@comma-agents/daemonProtocol
Shared Types
Reusable wire types — Usage, AgentCallResultWire, ErrorInfo, RunSummary, AgentStreamEventWire.
These types are used across multiple protocol messages.
Usage
Token usage statistics, included in strategy_completed, agent_output, step_completed, and AgentCallResultWire.
{ "promptTokens": 150, "completionTokens": 87 }AgentCallResultWire
Wire format for agent call results. Included in step_completed and the done stream event.
{
"text": "Found 3 issues: ...",
"usage": { "promptTokens": 50, "completionTokens": 30 },
"finishReason": "stop"
}ErrorInfo
Structured error information included in strategy_error events.
{ "code": "EXECUTION_ERROR", "message": "Model resolution failed" }Prop
Type
RunSummary
Summary of a run, included in strategy_list responses.
{
"runId": "run_abc123",
"strategyName": "Code Review Pipeline",
"status": "running",
"startedAt": "2025-01-15T10:30:00.000Z"
}Prop
Type
Run Statuses
| Status | Description |
|---|---|
pending | Run created but not yet started |
running | Flow is actively executing |
completed | Flow finished successfully |
error | Flow encountered an error |
cancelled | Flow was stopped via stop_run |
AgentStreamEventWire
Wire format for streaming events, included in agent_streaming messages. Discriminated union on type.
Prop
Type
See Strategy Observation for detailed field descriptions of each event variant.