Skip to content

architecture package index

github-actions[bot] edited this page Oct 22, 2026 · 53 revisions

Package index

Canonical map of every Go package under internal/ and cmd/, plus non-Go integration roots. Use this when you need to find where something lives before reading code.

Tiers

Tier Meaning
Core Entry, runtime loop, LLM, persistence — start here for turn/REPL bugs
Feature Tools, slash, skills, MCP, checkpoints — behavior you extend
Support Config, paths, UX helpers, search, auth plumbing
Integration Cursor sidecar, updater, provider wizards

Deep dives stay in linked articles; this file is the single checklist.

Core

Path Role Article
cmd/solomon/ Binary entry: CLI flags, wizard, Runtime bootstrap Startup and CLI
cmd/solomon/server/ Detached local server lifecycle commands and log reader Local server
cmd/solomon/server/detach/ Platform-specific process detachment for the local server Local server
internal/server/ Local HTTP host: health, Vite reverse proxy, process lifecycle Local server
internal/guicustom/ Local daemon client for chat-driven GUI customization without restarting sessions Local server
internal/agent/ Root agent package: SlashDispatch re-export (slash_forward.go) Skills and slash
internal/agent/runtime/ REPL, turns, session I/O, MCP init, Cursor hooks Runtime hub
internal/agent/runtime/btw/ Transient /btw side questions and output buffering Agent turn pipeline
internal/agent/runtime/btw/input/ Terminal acquisition for /btw listener input Agent turn pipeline
internal/agent/runtime/btw/listener/ Streaming-time /btw trigger listener Agent turn pipeline
internal/agent/runtime/turnloop/ Agent turn loop: stream, tool exec, compaction, interrupt Agent turn pipeline
internal/agent/runtime/toolbatch/ Concurrent execution of requested native tool batches Agent turn pipeline
internal/agent/runtime/repl/ REPL loop, readline wiring Runtime — REPL
internal/agent/runtime/repl/editor/ Multiline raw-mode editor (keys, render, history, @ picker) Runtime — REPL
internal/agent/runtime/repl/replhl/ Input syntax highlighting (@, shell lines) Runtime — REPL
internal/agent/runtime/repl/shellhist/ Shell command history for ! replay Runtime — REPL
internal/agent/runtime/repl/shelllex/ Shell line lexer for highlighting/completion Runtime — REPL
internal/agent/runtime/replcomplete/ Tab completion (slash, @, paths) Runtime — REPL
internal/agent/runtime/multiline/ Bracket/quote-aware multiline terminal modes Runtime — REPL
internal/llm/ Streaming chat facade, usage, backend factory LLM layer
internal/llm/anthropic/ Anthropic Messages API adapter LLM layer
internal/llm/apitype/ Shared request/response type helpers LLM layer
internal/llm/images/ Image part encoding for multimodal calls LLM layer
internal/llm/images/token/ Image token encoding and [img-N] placeholder expansion LLM layer
internal/llm/promptparts/ Prompt token split helpers for usage display LLM layer
internal/llm/stream/ OpenAI completion streaming (StreamText, StreamAssistantTurn) LLM layer
internal/llm/streamio/ Stream read/write utilities LLM layer
internal/llm/transport/ HTTP transport, retries, stream integrity LLM layer
internal/tokcount/ Tiktoken o200k_base prompt estimates (messages, tools, vision) LLM layer
internal/chatstore/ Session JSON read/write, images on disk Sessions and storage
internal/project/ Project hex id, workspace root resolution Sessions and storage
internal/paths/ ~/.solomon layout helpers Sessions and storage
internal/config/ TOML config load/merge Configuration
internal/prompt/ System prompt render (RenderAgent, RenderChat) Plan vs build
internal/prompt/templates/ Embedded .tmpl defaults (copied to ~/.solomon/prompts/templates/ at runtime) Plan vs build, Configuration
internal/prompt/shellutils/ OS-specific shell hints in templates Supporting packages

Feature

Path Role Article
internal/agent/tools/ Native OpenAI tools (plan/build), router Exec Native tools
internal/agent/toolenv/ Env struct — callbacks and deps passed into every tool Native tools
internal/agent/slash/ Slash line parse and dispatch Skills and slash
internal/agent/commands/ Slash command implementations Skills and slash
internal/agent/commands/connect/ /connect provider wizard Startup and CLI
internal/agent/cievents/ JSON/JSONL event schema for exec --json Runtime — orchestration
internal/tooling/ Invocation type, legacy <tool_calls> XML Native tools
internal/sandbox/compile/ Go source → WASM for orchestrate scripts Plan vs build
internal/sandbox/host/ wazero host module, SDK RPC bridge Plan vs build
internal/sandbox/ipc/ JSON line protocol for worker ↔ parent Plan vs build
internal/sandbox/parent/ Spawn and drive sandbox-worker subprocess Plan vs build
internal/sandbox/run/ wazero runtime, WASM module cache Plan vs build
internal/sandbox/sdk/ Script-facing API (ReadFile, Shell, …) Plan vs build
internal/sandbox/worker/ solomon sandbox-worker serve loop Plan vs build
internal/tooloutput/ Tool result truncation and spill to temp/ Supporting packages
internal/tooloutput/process/ Cross-process temp cleanup coordination Supporting packages
internal/mcp/ MCP client manager and OpenAI adapter MCP integration
internal/cloak/ Go-owned native CloakBrowser client and minimal official Playwright shim MCP integration
internal/skills/ Skill registry, install, search Skills and slash
internal/checkpoint/ Checkpoint sequences, labels, goto Checkpoints
internal/checkpoint/staging/ Byte snapshots for file restore Checkpoints
internal/instructions/ AGENTS.md / fallbacks loader Supporting packages
internal/search/ Legacy web search backends plus the internal Exa/Parallel router and monthly balance state Supporting packages
internal/webfetch/ Legacy HTTP fetch plus internal Exa/Parallel/native CloakBrowser fetch adapters and router Supporting packages
internal/research/ Research engine: asynchronous jobs, parsing, quality checks, LLM integration Deep research
internal/research/html/ HTML rendering templates for research results Deep research
internal/roles/ Manual subagent score catalog, table formatting, and role lookup Native tools
internal/roles/benchmarks/ Disabled automatic benchmark score storage, refresh, and publishing Native tools
internal/roles/scoring/ Disabled automatic benchmark normalization and aggregation helpers Native tools
internal/pathglob/ Glob ** matching for find Native tools
internal/plan/ Plan file read, write, sections, todos, status Plan vs build
internal/gitignore/ .gitignore matcher for find Native tools
internal/atmention/ @ file/folder tags and picker scoring Runtime — REPL
internal/docs/ Embedded docs corpus, BM25 retrieval for docsRetrieval and /docs Supporting packages

Support

Path Role Article
internal/lifecycle/ Linux, Windows and macOS daemon/client update coordination and recovery Building and releases
internal/logging/ File logs under ~/.solomon/logs Supporting packages
internal/termcolor/ Lipgloss palette, usage line, NO_COLOR Supporting packages
internal/clipboard/ Cross-platform image paste in REPL Supporting packages
internal/desktopgit/ Machine-readable Git history and status parsing for the desktop bridge Supporting packages
internal/title/ Chat title slug and LLM refinement Supporting packages
internal/modelsapi/ List models from provider API Supporting packages
internal/modelcatalogcache/ Persistent cache for provider model catalog lookups Supporting packages
internal/modelsdev/ Development model catalog source and normalization Supporting packages
internal/logo/ ASCII banner Supporting packages
internal/auth/anthropic/claude/ Claude Sub OAuth, token refresh, shared SDK client and Claude Code version lookup/cache LLM layer
internal/auth/openai/codex/ ChatGPT Sub OAuth, token refresh LLM layer
internal/auth/openai/codex/chat/ Codex chat request shaping LLM layer
internal/auth/cursor/ Cursor Sub OAuth, model catalog, direct Agent endpoint LLM layer
internal/providersetup/ Provider onboard during /connect Supporting packages
internal/providerui/ Provider connection bridge for the desktop UI Supporting packages
internal/webfetch/ HTTP client for fetching web content (cookie jar, user agent) Supporting packages

Integration

Path Role Article
internal/integrations/claude/ Official Claude SDK sidecar process and CLI login LLM layer
internal/integrations/cursor/ Sidecar install paths, process manager, embed Cursor integration
internal/integrations/cursor/agent/ Cursor Agent SDK runtime wrapper (Go) Cursor integration
internal/updater/ GitHub release check, install, restart Supporting packages
integrations/claude/ Node.js sidecar for the official Claude Agent SDK (not Go) LLM layer
integrations/cursor/ Node.js OpenAI-compatible proxy (not Go) Cursor integration
test/ Integration and unit tests (package test) Testing

toolenv — tool execution context

Native tools receive an Env built by Runtime.toolEnv(). The type lives in internal/agent/toolenv/; internal/agent/tools/env.go re-exports it as tools.Env so handlers stay in the tools package without import cycles.

Field Set by runtime Used for
ProjHex, ProjRoot session project Path resolution, spill paths
Cfg loaded TOML Web search merge, tool limits
MCP InitMCP dispatchExternal MCP calls
RunNested, RunNestedWithSystem turn loop subagent tool
SetMode, CurrentMode REPL / tools Plan vs build guards
CheckpointStageProjAbs, CheckpointBeforeProjAbs, CheckpointRecordEdit, CheckpointCpSeq checkpoint hooks editFile staging for /goto
ActivateInstructionsFromAbsPath, ActivateInstructionsFromShellCommand, MergeInstructionBlock instructions loader readFile / shell activating AGENTS.md

When adding a tool that needs runtime state, extend toolenv.Env first, wire fields in runtime/exec.go toolEnv(), then read them from the handler in internal/agent/tools/.

Alphabetical quick reference

Path Tier
cmd/solomon/ Core
cmd/solomon/server/ Core
cmd/solomon/server/detach/ Core
internal/agent/ Core
internal/agent/cievents/ Feature
internal/agent/commands/ Feature
internal/agent/commands/connect/ Feature
internal/agent/runtime/ Core
internal/agent/runtime/btw/ Core
internal/agent/runtime/btw/input/ Core
internal/agent/runtime/btw/listener/ Core
internal/agent/runtime/turnloop/ Core
internal/agent/runtime/multiline/ Core
internal/agent/runtime/repl/ Core
internal/agent/runtime/repl/editor/ Core
internal/agent/runtime/repl/replhl/ Core
internal/agent/runtime/repl/shellhist/ Core
internal/agent/runtime/repl/shelllex/ Core
internal/agent/runtime/replcomplete/ Core
internal/agent/slash/ Feature
internal/agent/toolenv/ Feature
internal/agent/tools/ Feature
internal/atmention/ Feature
internal/auth/anthropic/claude/ Support
internal/auth/openai/codex/ Support
internal/auth/openai/codex/chat/ Support
internal/chatstore/ Core
internal/checkpoint/ Feature
internal/checkpoint/staging/ Feature
internal/clipboard/ Support
internal/config/ Core
internal/desktopgit/ Support
internal/docs/ Feature
internal/gitignore/ Feature
internal/instructions/ Feature
internal/integrations/claude/ Integration
internal/integrations/cursor/ Integration
internal/integrations/cursor/agent/ Integration
internal/llm/ Core
internal/llm/anthropic/ Core
internal/llm/apitype/ Core
internal/llm/images/ Core
internal/llm/images/token/ Core
internal/llm/promptparts/ Core
internal/llm/stream/ Core
internal/llm/streamio/ Core
internal/llm/transport/ Core
internal/logging/ Support
internal/logo/ Support
internal/mcp/ Feature
internal/modelcatalogcache/ Support
internal/modelsapi/ Support
internal/modelsdev/ Support
internal/pathglob/ Feature
internal/plan/ Feature
internal/paths/ Core
internal/project/ Core
internal/prompt/ Core
internal/prompt/shellutils/ Core
internal/providersetup/ Support
internal/providerui/ Support
internal/research/ Feature
internal/research/html/ Feature
internal/roles/ Feature
internal/roles/benchmarks/ Feature
internal/roles/scoring/ Feature
internal/search/ Feature
internal/server/ Core
internal/sandbox/compile/ Feature
internal/sandbox/host/ Feature
internal/sandbox/ipc/ Feature
internal/sandbox/parent/ Feature
internal/sandbox/run/ Feature
internal/sandbox/sdk/ Feature
internal/sandbox/worker/ Feature
internal/skills/ Feature
internal/termcolor/ Support
internal/title/ Support
internal/tokcount/ Core
internal/webfetch/ Support
internal/tooling/ Feature
internal/tooloutput/ Feature
internal/tooloutput/process/ Feature
internal/updater/ Integration
integrations/claude/ Integration
integrations/cursor/ Integration
test/ Integration

See also

Clone this wiki locally