bootstrap

package
v0.0.8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 28, 2026 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotGitRepo = errors.New("not a git repository")

ErrNotGitRepo indicates the current directory is not a git repository

Functions

func BuildPluginConfigsAndDefs

func BuildPluginConfigsAndDefs(plugins []plugin.Plugin) (map[string]*model.PluginConfig, map[string]plugin.Plugin)

BuildPluginConfigsAndDefs builds per-plugin configs and a name->definition map for view/controller wiring.

func EnsureGitRepo added in v0.0.7

func EnsureGitRepo() error

EnsureGitRepo validates that the current directory is a git repository. Returns ErrNotGitRepo if the current directory is not a git repository.

func EnsureProjectInitialized

func EnsureProjectInitialized(tikiSkillContent, dokiSkillContent string) (bool, error)

EnsureProjectInitialized ensures the project is properly initialized. It takes the embedded skill content for tiki and doki. Returns (proceed, error) where proceed indicates if the user wants to continue.

func InitHeaderAndLayoutModels

func InitHeaderAndLayoutModels() (*model.HeaderConfig, *model.LayoutModel)

InitHeaderAndLayoutModels creates the header config and layout model with persisted visibility preferences applied.

func InitHeaderBaseStats

func InitHeaderBaseStats(headerConfig *model.HeaderConfig, tikiStore *tikistore.TikiStore)

InitHeaderBaseStats initializes base header stats that are always visible regardless of view.

func InitLogging

func InitLogging(cfg *config.Config) slog.Level

InitLogging sets up application logging with the configured log level. It opens a log file next to the executable (tiki.log) or falls back to stderr. Returns the configured log level.

func InitPluginActionRegistry

func InitPluginActionRegistry(plugins []plugin.Plugin)

InitPluginActionRegistry initializes the controller plugin action registry from loaded plugin activation keys.

func InitStores

func InitStores() (*tikistore.TikiStore, store.Store, error)

InitStores initializes the task stores. Returns the tikiStore, a generic store interface, and any error.

func LoadConfig added in v0.0.7

func LoadConfig() (*config.Config, error)

LoadConfig loads the application configuration. Returns an error if configuration loading fails.

func LoadPlugins

func LoadPlugins() []plugin.Plugin

LoadPlugins loads plugins from disk and returns nil on failure.

Types

type BootstrapResult

type BootstrapResult struct {
	Cfg      *config.Config
	LogLevel slog.Level
	// SystemInfo contains client environment information collected during bootstrap.
	// Fields include: OS, Architecture, TermType, DetectedTheme, ColorSupport, ColorCount.
	// Collected early using terminfo lookup (no screen initialization needed).
	SystemInfo       *sysinfo.SystemInfo
	TikiStore        *tikistore.TikiStore
	TaskStore        store.Store
	HeaderConfig     *model.HeaderConfig
	LayoutModel      *model.LayoutModel
	Plugins          []plugin.Plugin
	PluginConfigs    map[string]*model.PluginConfig
	PluginDefs       map[string]plugin.Plugin
	App              *tview.Application
	Controllers      *Controllers
	InputRouter      *controller.InputRouter
	ViewFactory      *view.ViewFactory
	HeaderWidget     *header.HeaderWidget
	RootLayout       *view.RootLayout
	Context          context.Context
	CancelFunc       context.CancelFunc
	TikiSkillContent string
	DokiSkillContent string
}

BootstrapResult contains all initialized application components.

func Bootstrap

func Bootstrap(tikiSkillContent, dokiSkillContent string) (*BootstrapResult, error)

Bootstrap orchestrates the complete application initialization sequence. It takes the embedded AI skill content and returns all initialized components.

type Controllers

Controllers holds all application controllers.

func BuildControllers

func BuildControllers(
	app *tview.Application,
	taskStore store.Store,
	plugins []plugin.Plugin,
	pluginConfigs map[string]*model.PluginConfig,
) *Controllers

BuildControllers constructs navigation/domain/plugin controllers for the application.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL