Documentation
¶
Overview ¶
Package backend wires the app layer to a concrete store. LocalBackend opens the embedded SQLite database and constructs every app with the right dependencies. The CLI, server, and MCP surface all call into the same backend — nothing above this package reaches into the store.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LocalBackend ¶
type LocalBackend struct {
WorkspaceID models.WorkspaceID
Home string
DB *sql.DB
Store *sqlite.Store
Souls *apps.SoulApp
Personas *apps.PersonaApp
Rules *apps.RuleApp
Brains *apps.BrainApp
State *apps.StateApp
Compose *apps.ComposeApp
Versions *apps.VersionApp
Admin *apps.AdminApp
}
LocalBackend is the SQLite-backed, single-workspace backend.
func Open ¶
func Open(home string) (*LocalBackend, error)
Open opens the SQLite database under home, runs pending migrations, loads the config to resolve the workspace ID, and wires every app. Returns an error if home has no config — call Bootstrap first.
func (*LocalBackend) Close ¶
func (b *LocalBackend) Close() error
Close closes the underlying database connection.
Click to show internal directories.
Click to hide internal directories.