Skip to main content

Module io

Module io 

Source
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§

CommandAccepted
runtime.command.accepted — the runtime took ownership of a submitted command (command_kind, e.g. turn.submit).
MuseRecord
One line of the muse exec --json stream: the journal envelope.
RunOutputDelta
run.output.delta — streamed model/agent output text.
RunStarted
run.lifecycle.started
RunTerminal
run.terminal.* — the run reached a terminal state. terminal carries the state (completed observed); text the final output; reason is populated on abnormal endings.
SessionRunLinked
session.run.linked — a run stream was attached to the session.
StreamRef
Reference to a journal stream.
TaskLifecycle
task.lifecycle.* — one step in a task’s lifecycle state machine.
TaskStreamLinked
task.stream.linked — a task stream was attached to a run.
TurnInputUser
turn.input.user — the user prompt as the runtime recorded it.

Enums§

Durability
Whether the record survives restart/replay.
MusePayload
Typed payload of a MuseRecord, discriminated by payload_type.
RecordType
Journal record classes.
StreamKind
Journal stream classes.
TaskLifecycleEvent
The event member of TaskLifecycle, tagged by kind.