Skip to main content

Run events

The machine-readable record of one b10x-loom run, written as one JSON object per line on standard output when the operator asks for it. Every line carries the stream's schema version. The records project what the run already does: the route it took, each model turn, each tool call a model made, the usage a provider reported, each agent session metaharness ran for it, named by its trace-ir/1 digest and summarized, the approvals the run stopped for, and exactly one terminal record, last, with the stop reason and the process exit status. A record adds no authority and is not evidence.

intake.events is one of intake's bounded contexts. All domains.

Types​

ApprovalEvent​

intake.events.ApprovalEvent is a record of one field:

  • actions — List<String>

RouteEvent​

intake.events.RouteEvent is a record of two fields:

  • protocol — String
  • accepted — Boolean

RunEvent​

intake.events.RunEvent is one of seven shapes, told apart by a kind field — tagged, so a decoder never has to guess which branch it is reading:

  • Approval — intake.events.ApprovalEvent
  • Route — intake.events.RouteEvent
  • Session — intake.events.SessionEvent
  • Terminal — intake.events.TerminalEvent
  • ToolCall — intake.events.ToolCallEvent
  • Turn — intake.events.TurnEvent
  • Usage — intake.events.UsageEvent

RunEventLine​

intake.events.RunEventLine is a record of two fields:

  • schema_version — intake.events.SchemaVersion
  • event — intake.events.RunEvent

SchemaVersion​

intake.events.SchemaVersion is one of V1.

SessionEvent​

intake.events.SessionEvent is a record of 21 fields:

  • transcript_digest — Optional<String>, which may be absent
  • source — Optional<String>, which may be absent
  • adapter — Optional<String>, which may be absent
  • model — Optional<String>, which may be absent
  • models — Optional<List<intake.events.SessionModel>>, which may be absent
  • turns — Optional<Integer>, which may be absent
  • tokens_basis — Optional<String>, which may be absent
  • input_tokens — Optional<Integer>, which may be absent
  • output_tokens — Optional<Integer>, which may be absent
  • cache_read_input_tokens — Optional<Integer>, which may be absent
  • cache_creation_input_tokens — Optional<Integer>, which may be absent
  • cost_usd — Optional<Decimal>, which may be absent
  • duration_ms — Optional<Integer>, which may be absent
  • duration_api_ms — Optional<Integer>, which may be absent
  • first_timestamp_ms — Optional<Integer>, which may be absent
  • last_timestamp_ms — Optional<Integer>, which may be absent
  • is_error — Optional<Boolean>, which may be absent
  • stop_reason — Optional<String>, which may be absent
  • tool_calls — Optional<List<intake.events.SessionToolCall>>, which may be absent
  • unk — Optional<Integer>, which may be absent
  • projection_error — Optional<String>, which may be absent

SessionModel​

intake.events.SessionModel is a record of six fields:

  • name — String
  • input_tokens — Optional<Integer>, which may be absent
  • output_tokens — Optional<Integer>, which may be absent
  • cache_read_input_tokens — Optional<Integer>, which may be absent
  • cache_creation_input_tokens — Optional<Integer>, which may be absent
  • cost_usd — Optional<Decimal>, which may be absent

SessionToolCall​

intake.events.SessionToolCall is a record of four fields:

  • call_id — Optional<String>, which may be absent
  • name — Optional<String>, which may be absent
  • answered — Boolean
  • error — Optional<Boolean>, which may be absent

TerminalEvent​

intake.events.TerminalEvent is a record of six fields:

  • stop_reason — Optional<intake.routing.StopReason>, which may be absent
  • exit_status — Integer
  • protocol — Optional<String>, which may be absent
  • steps — Optional<Integer>, which may be absent
  • error — Optional<String>, which may be absent
  • unperformed_actions — Optional<List<String>>, which may be absent

ToolCallEvent​

intake.events.ToolCallEvent is a record of four fields:

  • turn — Integer
  • call_id — String
  • name — String
  • arguments — String

TurnEvent​

intake.events.TurnEvent is a record of four fields:

  • turn — Integer
  • phase — intake.context.RequestPhase
  • model — String
  • turn_stop — String

UsageEvent​

intake.events.UsageEvent is a record of eight fields:

  • turn — Integer
  • model — String
  • input_tokens — Optional<Integer>, which may be absent
  • output_tokens — Optional<Integer>, which may be absent
  • cached_input_tokens — Optional<Integer>, which may be absent
  • cache_creation_input_tokens — Optional<Integer>, which may be absent
  • reasoning_output_tokens — Optional<Integer>, which may be absent
  • final_usage — Boolean

One of the types above is reached by nothing else in this system: intake.events.RunEventLine. No entity, view, command, event, error or crossing names it, so it is either vocabulary something outside this specification uses or a leftover — and only a person can tell which.


Generated from intake v1 · model digest 91e7b24c1442a41a622f4feaa84db250d7769d7784122bae93f2e0cda0c64c8e · contract digest slice-sha256/2:a708dcb37dfd6f01f017f11b3480c7819b1e1bc01597f82bd9d4370d2fc438df. Do not edit this file; change the specification and regenerate it with task docs-generate.