Skip to main content

Module channel

Module channel 

Source
Expand description

Pure Channel types — no I/O; store logic lives in the mur-channel crate.

Durable on-disk formats:

  • ~/.mur/channels/<id>/events.jsonl — append-only event log
  • ~/.mur/channels/<id>/channel.yaml — manifest (cached view of log state)

§Schema versioning

CHANNEL_SCHEMA_VERSION guards both the event log rows and the manifest. Bump it ONLY when:

  1. A required field is renamed or removed, OR
  2. A field’s semantic meaning changes, OR
  3. A new EventKind variant carries semantics that older readers must not silently skip (readers skip unknown/unparseable lines for robustness, so bump only when a silent skip would corrupt state rather than merely omit optional data).

Adding a new optional field with #[serde(default)] does NOT require a bump.

§Backward reads

The event log must always remain fold-able from the beginning. When adding new optional fields, annotate them with #[serde(default)] so older rows written before the field existed still deserialize cleanly. Manifests follow the same rule: older channel.yaml files must load without error.

Structs§

Channel
The durable manifest (a cache of state derivable from the event log).
ChannelEvent
One append-only line in ~/.mur/channels/<id>/events.jsonl.
Goal
The intent a channel is working toward, with optional acceptance criteria.
Participant

Enums§

ChannelActor
Who produced an event / is a participant. Named ChannelActor to avoid colliding with the pre-existing mur_common::actor::Actor.
ChannelState
A2A v0.3 lifecycle vocabulary, serialized on the wire as kebab-case (input-required, canceled, etc.).
EventKind
ParticipantRole
The role a participant plays within a channel’s lifecycle.

Constants§

CHANNEL_SCHEMA_VERSION
Schema version for the manifest + event log; breaking changes bump this. v2: HitlResponse events carry approval authority — a reader that silently skips one could re-apply a gated effect (v3c).