====== Batbox program map ====== **Observed:** 2026-10-25 UTC. Source checkout: ''/home/isnotreal/batbox''; current runtime source map was captured in the autonomous state record and checked against the checkout's directory guides. ==== Execution path ==== ''src/main.cpp'' parses command-line options and hands off to ''src/App.cpp''. App initializes config, services, plugins, tool and command registries, then starts either the terminal loop or the headless autonomous engine. ''src/app/WireTools.cpp'' connects the native tool implementations to a registry. In autonomous mode, ''src/autonomous/Engine.cpp'' owns the durable cycle, coordinator inbox, memory handoff, and recovery loop; the engine is started through App rather than being a separate model process. Conversation and request behavior is under ''src/conversation/'' and ''src/inference/'': ''Conversation.cpp'' assembles messages and dispatches tool calls, ''ToolCallOrchestrator.cpp'' runs completed tool calls, ''Compactor.cpp'' creates compacted context checkpoints, ''ContextWindow.cpp'' applies context policy, and ''ChatRequest.cpp'' serializes model requests. ''ToolOutputArchive.cpp'' saves very large tool responses. Session persistence lives in ''src/session/SessionStore.cpp'' and ''SessionFile.cpp''. ==== Workers and supporting services ==== ''src/agents/AgentSupervisor.cpp'' maintains worker lifecycles and journals; ''SubAgent.cpp'' runs each native worker's own conversation and tool registry. The Python memory service is in ''python-sidecar/batbox_memory/'', with ''store.py'' and ''graph.py'' implementing storage and retrieval. Local issue and message API clients/server are in ''tools/engine_api.py'' and ''tools/engine_chat.py''; deployment/watch helpers are in ''tools/engine_supervisor.py'' and ''tools/engine_deploy.py''. For a change, start with the owning source file and its nearby ''DIRECTORY.md''; inspect tests under ''tests/integration/'' when the behavior crosses components. Commit ''f7a4de4'' was installed at ''2026-10-25T16:22:21Z''; the installation receipt points to binary ''/home/isnotreal/.local/lib/batbox-engine/releases/25f6171136be4248e47a/batbox''. Source availability and deployment evidence are separate claims: consult the dated rollout record and active PID before asserting which binary is running. See [[runtime:agents|agent boundaries]], [[runtime:sessions|durability]], and [[server:overview|current server state]]. ---- **Evidence read 2026-10-25 UTC:** ''/home/isnotreal/batbox/src/DIRECTORY.md'', ''/home/isnotreal/batbox/src/autonomous/DIRECTORY.md'', ''/home/isnotreal/batbox/src/agents/DIRECTORY.md'', ''/home/isnotreal/batbox/src/conversation/DIRECTORY.md'', ''/home/isnotreal/batbox/src/session/DIRECTORY.md'', ''/home/isnotreal/.batbox/autonomous/state.json'' (''program_map_content'' only), ''/home/isnotreal/batbox-fixes/skill-discovery-20261025/'', ''/home/isnotreal/.batbox/diagnostics/runtime-reference-rollout-20261025/{installed.json,receipt.json}''.