Skip to main content

Module container_compaction_started

Module container_compaction_started 

Source
Expand description

POST /api/v1/agent/compaction-started: a container agent’s agentmux-bashwrap precompact (Claude Code’s PreCompact hook) telling srv the CLI is compacting, so the pane shows “Compacting…”.

/agentmux/wps/publish is a generic relay: it republishes an undeclared event to any scope, so a container token is refused there (container::credential). This route takes one event, compaction_started, for one scope, the container’s own block:<id>, and only as the typed CompactionStarted. A request that is not a container’s, names another event or scope, or is not a CompactionStarted never reaches the broker. It is the host’s publish with the same envelope, so the client sends the same body to a different path.

Constants§

MAX_BODY_BYTES 🔒
The largest request body: the three small fields of a CompactionStarted, with its envelope.
PERSIST 🔒
Live subscribers only, never replayed: as the host’s PreCompact hook asks (persist: 0, #2378), because nothing marks the end of a compaction on this event, and a replayed start would bring “Compacting…” back for one that has finished. srv decides it here; the container’s value is not read.

Functions§

check 🔒
The event to publish for block_id’s req, or why the request is refused.
handle_container_compaction_started 🔒
refuse 🔒