Documentation
¶
Overview ¶
Package app assembles kōjō from its deployment config: the store, the day-2 config manager, the model gateway, the sandbox driver and its proxy, the surfaces, the engine and the HTTP server. The CLI's commands are thin wrappers around it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultImage ¶
func DefaultImage() string
DefaultImage is the sandbox image of kits that name none, unless sandbox.image overrides it: the toolchain image published with each release (deploy/toolchain).
Types ¶
type App ¶
type App struct {
Boot *config.Boot
Log *slog.Logger
Store store.Store
Config *config.Manager
Skills *skills.Resolver
Models models.Gateway
Driver sandbox.Driver
Proxy *proxy.Server // nil when the proxy is remote or unused
Forges map[string]forge.Forge
Chats map[string]chat.Adapter
Trackers map[string]tracker.Tracker
Engine *core.Engine
Eval *eval.Runner
Registry *prometheus.Registry
Image string
// ProxyClient drives a remote proxy; nil when it is embedded or unused.
// Its Run sends sandbox policies again after the proxy restarts.
ProxyClient *proxy.Client
// contains filtered or unexported fields
}
App is a built kōjō.
func (*App) Handler ¶
Handler builds the HTTP handler of the server: health, webhooks, chat routes, MCP, and the dashboard with its API. Metrics are on a port of their own (MetricsHandler).
func (*App) MetricsHandler ¶
MetricsHandler serves the Prometheus registry. It runs on server.metrics_listen, never on the main port.
type Options ¶
type Options struct {
Logger *slog.Logger
// MemoryStore uses the in-memory store instead of Postgres: `kojo eval
// --local` and tests. Nothing is persisted.
MemoryStore bool
// Migrate applies pending migrations while building (kojo serve).
Migrate bool
// NoSurfaces skips the forges and chat adapters (kojo eval --local).
NoSurfaces bool
// NoSeed leaves an empty database's day-2 config unwritten (kojo
// doctor, which only inspects).
NoSeed bool
// Fixtures replaces the built-in eval fixtures (kojo eval --local
// --factory: a repository's own laid over them). Nil means the built-in
// ones.
Fixtures fs.FS
}
Options change how Build assembles the app.