Expand description
Server-side session state — shared across all connections.
Structs§
- Approval
Gate - Builder for constructing a
ServerStatewith embedder-supplied dependencies. Embedders (e.g.tokhn-daemon) use this to inject their own memgine handle and other shared infrastructure; the Approval-gate policy for high-risk WS methods. - Chat
Session - In-flight
agents.chatsession bookkeeping. Created when a host client callsagents.chat, removed when the agent emits a terminalagent.chat.event(kind: "done"or"error"), when either side disconnects, or when the host cancels viaagents.chat.cancel. - Client
Session - Per-client session.
- RunMeta
- Daemon-side record of a single agent run (agent run tracing, U1).
- Server
State - Global server state shared across all connections.
- Server
State Config - standalone
car-serverbinary usesServerState::standalonewhich callswith_configunder the hood. - WsChannel
- Shared write half of the WebSocket, plus pending callback channels.
writeis type-erased viaWsSinkso the dispatcher can run against any transport-specific WebSocketStream (TCP or UDS today; axum-bridged in future) without templatizing every consumer. - WsMemgine
Ingest Sink - Per-meeting fanout sink that ingests transcript text into a
session-scoped memgine using the
Arc<tokio::sync::Mutex<...>>wrapper, then forwards every event upstream untouched. - WsTool
Executor - Tool executor that sends callbacks to the client over WebSocket.
- WsVoice
Event Sink - Voice event sink that forwards events to a specific WebSocket client
as
voice.eventJSON-RPC notifications.
Enums§
- A2aRoute
Auth - Server-side credentials for continuing an A2A-owned A2UI surface.
Constants§
- DEFAULT_
TOOL_ TIMEOUT_ MS - Default ceiling for the daemon→host
tools.executecallback wait when an action carries no explicittimeout_ms. Overridable viaCAR_TOOL_TIMEOUT(seconds). Raised from the old hardcoded 60s — real tools (build steps, CLI drivers, slow APIs) routinely run longer, and a 60s ceiling reaped them regardless of the agent’s budget (Parslee-ai/car#259). - RUN_
COMPLETE_ GRACE - Grace window applied on disconnect before a still-open run is marked
Incomplete(agent run tracing, U1 — R5). Short on purpose: it only has to cover the gap between a healthyruns.completebeing dispatched on a spawned task and its terminal record landing, not any real work. Long enough to absorb that scheduling jitter, short enough that a genuinely abandoned run is reportedIncompletepromptly.
Type Aliases§
- WsSink
- Type-erased WebSocket sink. The dispatch loop accepts either a
WebSocketStream<TcpStream>(the legacy car-server TCP listener) or aWebSocketStream<UnixStream>(the daemon-as-default UDS listener) — both implementSink<Message, Error = WsError>after the tungstenite handshake. Erasing the type here avoids cascading a generic parameter through every WsChannel / Session / ServerState touchpoint in the dispatcher.