Runtime Internals
internal/clients/openaiimplements model discovery, chat requests, tool aliases, and the bounded tool loop.internal/mcpowns stdio JSON-RPC, discovery, schemas, permission mapping, policy, timeouts, and result limits.internal/ragowns index validation, BM25 search, excerpts, and the local retrieval tool.internal/changeowns snapshot discovery, structured proposals, temporary materialization, validators, diff construction, approval, and apply.internal/auditowns append-only records, replay, state transitions, metadata sanitation, synchronization, and queries.internal/webcomposes those domains into native and OpenAI-compatible HTTP workflows.
For Chat and Alertmanager, internal/web retrieves local context, forces one
structured investigation-plan submission, filters the catalog to authorized
read-only tools, validates the selected names and arguments, executes every
planned check, and appends each ToolResult before final reasoning. The normal
bounded tool loop remains available for adaptive follow-up calls. Retrieved
runbook text is guidance and never changes the registry or policy.
The single-generation semaphore in Web protects a local inference server from concurrent overload.