Skip to main contentModule sidecar
Source pub use governor::RequestGovernor;pub use server::spawn_sidecar;
- governor
- Request governor — micro-queuing engine for tool dispatch.
- handlers
- HTTP endpoint handlers for the symforge sidecar.
- port_file
- Port and PID file management for the HTTP sidecar.
- router
- Axum router wiring all sidecar endpoints.
- server
- Sidecar server spawner.
- SidecarHandle
- Handle returned by
spawn_sidecar. Dropping this or sending on shutdown_tx
gracefully stops the background axum server and cleans up port/PID files. - SidecarState
- Axum state type bundling the shared index, token statistics, and pre-edit symbol cache.
- StatsSnapshot
- Lightweight snapshot of all token stats counters. Returned by
/stats. - SymbolSnapshot
- Lightweight snapshot of a symbol used to detect pre/post-edit changes.
- TokenStats
- In-memory atomic counters tracking hook fires and estimated token savings per hook type.
- build_with_budget
- Join
items with newlines, stopping before exceeding max_bytes.