package agent import ( "ollie/backend" "ollie/toolsrv" ) // Runtime holds the swappable per-agent configuration. It contains everything // that changes on an /agent switch but is stable across turns within the same // agent. The agent struct stores a pointer to the active Runtime; switching // agents replaces it atomically. type Runtime struct { Backend backend.Backend ToolServer toolsrv.Runner // the execute server (tool runtime, env, cwd) Preamble string // compiled system prompt Tools []backend.Tool ToolMeta map[string]toolsrv.ToolInfo // keyed by tool name — source of truth for all per-tool metadata Exec toolExecutor GenParams backend.GenerationParams MaxSteps int // toolRegistryRevision tracks the last-seen tool registry revision. When the // registry revision advances (after tool_load/unload), the next turn // will detect the mismatch and refetch. toolRegistryRevision uint64 // CompactionModel overrides the model used for context compaction. // Resolved from: agent config > OLLIE_COMPACTION_MODEL env > per-backend default. CompactionModel string // Messages holds non-fatal warnings from runtime construction // (e.g. tool listing errors). Surfaced once at session start. Messages []string }