Expand description
Typed models of the muse exec --json JSONL event stream.
Every stdout line is one MuseRecord — an event-sourced journal
envelope with a lazily-typed payload. The envelope is fully typed; the
payload stays raw JSON on the record (so round-trips are byte-faithful
and unknown future payload types survive) and is lifted into a
MusePayload on demand via MuseRecord::typed_payload.
Shapes in this module are derived from captured real output of
Muse Code (see test_cases/*.jsonl), not from documentation — the wire
is the contract. Payload types not yet observed (the journal also
records approvals, edits, and subagent lifecycle under a live provider)
deserialize as MusePayload::Unknown rather than failing.
Structs§
- Command
Accepted runtime.command.accepted— the runtime took ownership of a submitted command (command_kind, e.g.turn.submit).- Model
Configured run.model.configured— which model/profile/provider the run resolved to (live providers only; the echo provider never emits it).- Muse
Record - One line of the
muse exec --jsonstream: the journal envelope. - RunOutput
Delta run.output.delta— streamed model/agent output text.- RunStarted
run.lifecycle.started- RunTerminal
run.terminal.*— the run reached a terminal state.terminalcarries the state (completedobserved);textthe final output;reasonis populated on abnormal endings.- Session
RunLinked session.run.linked— a run stream was attached to the session.- Stream
Ref - Reference to a journal stream.
- Task
Lifecycle task.lifecycle.*— one step in a task’s lifecycle state machine.- Task
Stream Linked task.stream.linked— a task stream was attached to a run.- Tool
Result tool.result— outcome of one tool invocation (live providers only).- Turn
Input User turn.input.user— the user prompt as the runtime recorded it.
Enums§
- Durability
- Whether the record survives restart/replay.
- Muse
Payload - Typed payload of a
MuseRecord, discriminated bypayload_type. - Record
Type - Journal record classes.
- Stream
Kind - Journal stream classes.
- Task
Lifecycle Event - The
eventmember ofTaskLifecycle, tagged bykind.