Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Options ¶
type Options struct {
Cwd string
Continue bool
Resume bool
NonTTYMode bool
ApprovalMode string
ToolFactories []ToolFactory
ModelFactory agent.ModelFactory
}
Options controls how runtime bootstraps.
type Runtime ¶
type Runtime struct {
Cwd string
GitBranch string
ApprovalEngine *approval.Engine
TaskRuntime *task.Runtime
TeamRegistry *team.Registry
TeammateEvents *agent.TeammateEventHub
Settings config.Resolved
ModelName string // display form: "provider/model" or session-restored name
Session *agent.Session
SessionStore *storage.Store
PluginCatalog *plugin.Catalog
SkillCatalog *skill.Catalog
MCPManager *mcpclient.Manager
MCPServers map[string]mcpclient.ServerConfig // for async connection in TUI
HookRunner *hooks.Runner // nil if no hooks configured
EnvHint string // non-empty when credentials come from environment variable
// Frontend-neutral session lifecycle, assembled by wireLifecycle.
// Restored from the session snapshot before any frontend runs.
PlanStore *storage.PlanStore
PlanManager *plan.Manager
GoalManager *goal.Manager
CronStore *cron.Store // nil when the cron tools are absent
// contains filtered or unexported fields
}
Runtime is the bootstrapped app runtime state.
func (*Runtime) ConnectMCP ¶ added in v0.2.2
ConnectMCP connects all configured MCP servers and warms the tool list. Blocking — async frontends run it in a goroutine. Returns nil when no servers are configured.
It deliberately never touches the session: session prompt state is not goroutine-safe, so MCP tools and instructions enter the session through exactly one writer — the before-prompt refresh hook, which MarkDirty arms and which runs on the prompt path ahead of the turn.
func (*Runtime) StartCron ¶ added in v0.2.2
StartCron starts the session cron scheduler. Fired prompts are delivered through onFire — the frontend decides how they enter the conversation (the TUI injects them as user prompts). Returns a stop function, or nil when no cron store is available. Print mode never starts cron: a one-shot run has no loop to schedule against.
type ToolFactory ¶
ToolFactory creates one tool instance for the given workspace.