Expand description
JSON-lines wire protocol over unix domain socket.
Structs§
- Alias
Info - One configured alias entry: a short name pointing at a target.
- Model
Info - Project
Info Entry - Project metadata returned by the
GetProjectInforequest. - Project
Stats Info - Project-wide usage / cost totals, aggregated across every session (archived included) belonging to a project.
- Session
Info - Session
Result - Result for a single session in WaitSessions response.
- Session
Stats - Cumulative session usage statistics.
- Task
History Info - Entry in the task history log (
task_historytable). - Task
Info - Task info for wire protocol (mirrors tasks_db::Task but protocol-owned).
- Task
Message Info - Task message info for wire protocol.
- Task
Relation Info - Task relation info for wire protocol.
- Task
Session Info - Session recorded against a task, enriched with best-effort live state.
- Task
Wait Reasons - Per-task wait-reason bundle attached to a
TaskOverviewresponse. - Token
Stats
Enums§
- Chat
Attachment - Attachments to a
Request::Chatmessage. - Request
- Response
- Task
Wait Reason - Why a task is waiting / not yet dispatched. Mirrors the plugin-side
WaitReasonenum intau-agent-plugin-tasks.
Constants§
- SHUTTING_
DOWN_ ERROR - Sentinel message used by
Response::Error { message }when a request was refused because the server is in the shutdown-drain window.
Functions§
- format_
stats - Format session stats as a compact one-line summary like pi’s footer:
↑12K ↓81K R18M W353K $13.434 (sub) 18.4%/200K - format_
subscription_ usage - Format subscription usage as a compact footer string.
- format_
tokens - Format a token count for display: 1234 → “1.2K”, 1234567 → “1.2M”.
- format_
utilization - Format utilization (already 0–100 from the API) as a compact percentage string.
- is_
shutting_ down_ error - Returns true if
erris the distinctive “server is shutting down” signal produced by the server during its drain window. Used by clients to trigger reconnect/retry paths instead of surfacing the error to the user. - is_
subscription_ usage_ error - Returns true if
errlooks like a failure surfaced by the Anthropic subscription-usage poll path (/v1/messages/usage//api/oauth/usage). Used by clients as defence-in-depth: the server-side handler in #940 no longer sendsResponse::Errorfor these failures — it falls back to a cached or defaultResponse::SubscriptionUsage— but if a future code path were to regress and emit such an error over the wire, clients can recognize it as out-of-band and refrain from tearing down streaming UI state (in-flight tool calls, agent phase, etc.).