Skip to main content

Module event

Module event 

Source

Re-exports§

pub use crate::effect_settlement::ExternalEffectSettlement;

Structs§

AgentRosterRow
One sub-agent’s live row in the session agent rail (F1). Accumulated by the daemon from the child session’s UsageUpdated/ToolCallStarted events.
CompactionFederationDecisionV1
CompactionFederationSelectionReceiptV1
Selection receipt carried inside a compaction-federation decision: which items the decision covers and a content hash Membrane can use to detect a stale or substituted selection.
EventCorrelationV1
Optional causal/cross-runtime correlation carried beside a canonical event. These fields identify relationships only; session/sequence/kind remain owned by ProtocolEvent and SQLite rather than being duplicated in the envelope.
EventEnvelopeV1
Stable metadata wrapper for one durable the host app event.
GoalSnapshotV1
Canonical goal truth shared by SSE and session hydration.
GoalStepV1
A verified, daemon-owned step in a goal plan.
MiddlewareDecisionEvidence
ModelRouteDecisionPayload
ProtocolEvent::ModelRouteDecision payload (ADR §D5 observability). Kept as its own struct (not inlined into the enum variant) so host_router’s RouteDecision and this wire type can evolve independently — the seam maps one to the other explicitly.
OrchestrationObservation
An orchestration observation attached to OrchestrationObservationRecorded.
PriceSnapshot
Pinned pricing snapshot carried on ProtocolEvent::ModelRouteDecision (ADR docs/canon/daemon-master-canon-atoms.md §D5). Mirrors the (model, prompt_per_m, completion_per_m, source, fetched_at, hash) tuple named in §D4 for pricing refresh, but this crate carries no dependency on host_router/host_providers (pure data crate) — the seam that emits the event fills these fields from the live roster.
ProtocolEventMeta
RunBudgetExhausted
RunOriginFailure
RunOwnershipFailure
SelfReviewProposalDraft
SessionUsageRollup
Aggregate token/cost totals across a session’s sub-agents (F1 → F2 contract). The budget meter for a Goal reads THIS (parent + all children), never the parent engine’s usage alone.
UserQuestion
A structured question the agent asks the operator (Claude-Code AskUserQuestion).
UserQuestionOption
One selectable option in a UserQuestion.
VerificationIssue
A verification issue item inside VerificationFinished.

Enums§

EventDurability
Whether an event is canonical replay truth or an ephemeral live projection. Durable facts belong in SQLite and must survive reconnect/replay. Live projections may be dropped/reordered without changing settled session truth.
ProtocolEvent
RunBudgetKind
RunFailureKind
Typed failure categories for run governance (Lane B3 / C3). Emitted by the engine when a run-side invariant rejects a tool dispatch. The variants here are wire-stable so downstream consumers (desktop budget meter, error toasts, telemetry) can react deterministically — every failure has a discriminator and the call site that produced it.
RunOwnershipAction
SelfReviewProposalKind
ShellExitStatus
Typed, reaped terminal status of a shell child (foreground or background). Reported only after the child has been waited on, so a consumer never sees an exit status for a process that may still be running.

Constants§

COMPACTION_FEDERATION_SCHEMA_V1
CRA-09 joint wire contract (interface-handoffs.json row compaction-federation-v1): the one compatible public shape the host app’s compactor-consumer and Membrane’s federation-catalog both code against.
EVENT_ENVELOPE_SCHEMA_V1

Functions§

stable_event_id