Skip to main content

Module delivery_state

Module delivery_state 

Source
Expand description

The memory delivery’s shared state: the deliveries being composed and cached, the frontend fallback’s claims, the compaction boundaries a block’s CLI wrote and the notices parked behind them. The handlers (server/memory_delivery_handlers.rs) drive it; the stdout readers under blockcontroller record the boundaries and take the parked notices, so it sits below both.

Structs§

Delivery
DeliveryKey
DeliveryState
Deliveries and fallback claims, behind one lock so “who claimed this event first” is decided atomically.
EntrySize
One item of a delivery as the notice shows it: one card row (SPEC_CONTEXT_DELIVERY_2026_09_30 §3.1, §3.4). label and source are what older builds read; the rest is per-item detail. Sizes are those of what was delivered, so an item cut by the part cap reports its slice.
FallbackDelivery
A re-delivery srv composed for the frontend’s fallback (CD2b).
StartupDetail
What a startup_file item adds (SPEC_LAUNCH_CONTEXT_WORKSPACE_RULE_AND_ STARTUP_FILES_2026_09_30.md §4.1, backend::startup_files).

Enums§

FallbackClaim
What the fallback’s claim found.

Constants§

BOUNDARY_ORIGINS_MAX
How many compaction boundaries’ origins are remembered. Boundary uuids are unique across blocks.
CLAIM_WINDOW_MS
How long a claim on one event (a session start, a compaction) holds: the hook and the frontend’s fallback for the same event arrive within seconds of each other, and one block has no two such events that close. Not for a fallback that waited behind a turn: a dated claim (DeliveryState::claim_event) covers that.
DELIVERY_TTL_MS
How long a composed delivery stays cached for its remaining parts and acknowledgements. The hooks of one session start run within seconds.
EVENT_SLACK_MS
A fresh session’s agentmux_session_outcome frame can be written just after the respawn it reports (retry_after_resume_failure), so a hook delivery composed up to this long before the frame is still that session’s.
PARKED_NOTICE_WAIT
How long a compaction’s notice waits for its boundary before it is written anyway, so a CLI that never writes one still leaves the card.
PENDING_POLL
PENDING_WAIT
How long the fallback waits for a hook delivery still in flight, and how often it looks. A hook that never finishes must not leave the agent with no memory, so after this the fallback delivers instead.

Functions§

state_lock