app

package
v0.22.0 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Overview

Package app is the composition root: it wires config, provider chain, smrti memory, tools, skills, sessions, and the agent loop into one unit shared by the CLI and the gateway daemon.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Cfg   *config.Config
	Bus   *bus.MessageBus
	Chain *provider.Chain
	// Cost prices every provider call the loop makes and holds the budget
	// caps; the CLI bar and the tray overview read their numbers from it.
	Cost     *cost.Meter
	Memory   memory.Engine
	Ambient  *memory.Ambient
	Registry *tools.Registry
	// Guard is the path rule every file-touching tool obeys; the gateway
	// hands it to connectors that read or write files themselves.
	Guard    *tools.PathGuard
	Sessions *session.Store
	Skills   *skills.Loader
	Loop     *agent.Loop
	Jobs     *jobs.Engine
	Cron     *cron.Service
	MCP      *mcp.Manager
	// Restart is how the upgrade tool reloads this process into the release
	// it just installed. Only a daemon fills it in.
	Restart *upgrade.Restarter
	// SmrtiUpgrade keeps the memory engine current, and is nil when memory is
	// off — there is then no engine to keep current.
	SmrtiUpgrade *upgrade.Smrti
	// contains filtered or unexported fields
}

func New

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

New assembles a fully wired Factor instance. The memory sidecar starts in the background; health flips asynchronously.

func (*App) Close

func (a *App) Close()

Jump to

Keyboard shortcuts

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