/** * The closed set of cross-module Msg/Cmd discriminant strings. Declared `as * const` so each entry is usable as both a value (construction / reducer keys / * switch labels) and, via `typeof MsgType.X`, a literal type (`readonly _tag:` * fields). The single source of truth for issue #60. */ declare const MsgType: { /** The "run the port for `key`" effect Cmd resilient-call emits. */ readonly ResilientRun: "resilient_run"; /** * PRIVATE success settle Msg (read only by `agentEvents`, #47). The engine * mints it from the run Cmd's outcome (ADR 0021), so it is `_ok`. */ readonly ResilientOk: "resilient_run_ok"; /** Failure settle Msg — routed to `settle` (back off via retry). */ readonly ResilientErr: "resilient_run_err"; /** Begin a run. */ readonly AgentStart: "agent_start"; /** PRIVATE tool-fan-out success settle Msg (read only by `agentEvents`, #47). */ readonly AgentToolOk: "agent_tool_ok"; /** Tool-fan-out failure settle Msg. */ readonly AgentToolErr: "agent_tool_err"; /** * Re-fire the one outstanding effect on rehydrate (the do↔agent seam). Fired * by `do/host`'s `autoBoot` via the typed `agentBootMsg` constructor, matched * by the agent reducer — see `AgentBootPort` in `../agent`. */ readonly AgentBoot: "agent_boot"; /** * Stop the run from outside and settle it `cancelled` — what an `AbortSignal` * handed to `driveToDone` / a defined agent's `run` dispatches on abort. A * transition, never a throw: the outcome lands in the Model, so a reload reads * a run that ended rather than one to resume. */ readonly AgentCancel: "agent_cancel"; /** * The "summarize the oldest N turns" effect Cmd the agent emits when its * `CompactionPolicy` asks to compact before a brain call. A DEDICATED * round-trip (design B1), distinct from the brain call's `resilient_run`, so * compaction is its own honest `Awaiting` state — see `../agent`. */ readonly CompactRun: "compact_run"; /** Compaction round-trip resolved — carries the summary text the fold-back folds. */ readonly CompactOk: "compact_ok"; /** Compaction round-trip failed (exhausted retry) — surfaced as data, not a stall. */ readonly CompactErr: "compact_err"; /** The 401 the consumer dispatches when a guarded call comes back unauthorized. */ readonly Unauthorized: "unauthorized"; }; /** The union of every discriminant string in the protocol. */ type MsgTypeValue = (typeof MsgType)[keyof typeof MsgType]; export { MsgType as M, type MsgTypeValue as a };