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
PreCompacthook 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’sreq, or why the request is refused. - handle_
container_ 🔒compaction_ started - refuse 🔒