app

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Overview

Package app is Console's composition root. It wires the configured storage backend, the flag and status engines, and the LLM provider into a single App value that the server, CLI, and onboarding flows depend on. Nothing here contains business logic — it only assembles the pieces.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Config config.Config
	Store  store.Store
	Flags  *flags.Engine
	Status *status.Engine
	// LLM is the AI-Assisted onboarding provider. It is nil when no provider is
	// configured; callers must treat AI-Assisted mode as unavailable in that
	// case and fall back to Human mode.
	LLM llm.Provider
	// Notify fans status transitions and flag changes out to registered sinks.
	// Always non-nil; sinks are out-of-process notifier plugins (e.g. Slack).
	Notify *notify.Dispatcher
	// contains filtered or unexported fields
}

App holds the assembled, ready-to-use Console subsystems.

func New

func New(ctx context.Context, cfg config.Config) (*App, error)

New assembles an App from cfg. It opens the storage backend, constructs the flag and status engines (registering the built-in HTTP status provider), loads notifier and status-provider plugins, and selects the LLM provider when one is configured (all out-of-process). The caller owns Close.

func (*App) Close

func (a *App) Close() error

Close releases the App's resources: it stops any loaded plugin subprocesses (notifiers) and closes the store (which, for a store plugin, stops that subprocess too).

Jump to

Keyboard shortcuts

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