UNPKG

@sema-agent/core

Version:

Stateless, task-oriented AI agent core

1,958 lines • 222 kB
import { type NoticeAttention } from "./governance-codes.js";
import { type NoticeTold } from "./notice-fact.js";
/**
 * A structured operator-facing notice ({@link RunnerDeps.onNotice}) — a fact the engine announces that
 * is neither an error nor part of the task result: today, a configured value that was discarded in
 * favor of another (the loud-bad-value discipline's announcement dialect). Structured so a host can
 * FORWARD it to its own user surface instead of losing it in process stderr.
 */
export interface EngineNotice {
    /** Stable machine-readable family, dot-namespaced. Current families:
     *  - `"config.autocompact_window_clamped"` (design/374 slice 1b) — a model declared
     *    `autoCompactTokens` ABOVE its physical window; the trigger-side geometry was clamped to the
     *    physical window (an autocompact window only ever lowers the trigger) and the bad value is
     *    announced once per prepared task; `detail: { modelId, declaredAutoCompactTokens,
     *    physicalWindow, sessionId, runId }` — `runId` is what makes the "once per prepared task" claim
     *    checkable, the session id beside it being shared by every run of the session.
     *  - `"config.env_timeout_discarded"` — a Bash timeout knob (option or env) held a value that is not
     *    the value in force; `detail: { knob, raw, usedMs }`.
     *  - `"config.materialize_env_discarded"` — `SEMA_TOOL_MATERIALIZE_STRATEGY` held a value outside the
     *    closed set in a seat where it is not in force; `detail: { raw, specStrategy? }`.
     *  - `"config.task_root_not_canonical"` (#759) — the task root this run was handed is not its own
     *    canonical path (a symlinked directory; `/var` → `/private/var` on macOS). Containment is judged
     *    on the CANONICAL spelling, so the deployment and the engine reason about two different
     *    directories: a target the host considers inside the root can be judged outside it. The run is
     *    unchanged — announce, never narrow, never repair — and the fix is to hand the canonical path in.
     *    Audience `operator` (a deployment wiring fact). `detail: { given, canonical, sessionId, runId }`
     *    — both spellings, so a consumer can diff them without guessing which one it holds. Once per
     *    prepared leg, and never for a root that already is its own canonical form (its absence is the
     *    claim that the two agree).
     *  - `"config.write_protection_target_view_absent"` — this leg's write-protection judge was compiled
     *    with NO execution environment while at least one path-confinable write tool is mounted, so it
     *    compares SPELLINGS against its table and nothing else: a write reaching a protected path only
     *    through an alias is cleared. Announce, never narrow — no verdict moves (an environment-less judge
     *    has no filesystem to resolve in). Audience `operator`. `detail: { tools, sessionId, runId }`,
     *    `tools` = the path-confinable write tools on the LEG-START roster, ascending. EXACTLY ONCE per
     *    prepared leg, never per judgment and never re-fired for a mid-run roster delta; absent ⇒ the judge
     *    has its target view, or no covered write tool was mounted AT PREPARE, or there is no judge —
     *    `wiringManifest.writeProtection` reports the judge's reading either way.
     *  - `"config.path_view_unresolved"` (#869; 7.48.0 `config.write_protection_unresolved`) — this leg's write-protection judge HAS a target view
     *    and one SOURCE of a judgment did not answer: the environment refused a spelling, could not follow a link,
     *    threw, or did not answer within the gate's deadline — on the target, its link chain or a root's key — or
     *    a deployment policy's guarded write rows did not come back. A target whose real destination (or chain)
     *    could not be determined is refused where the table has rows; an auxiliary source is absent on its own (a
     *    root exempts and places nothing; rows that did not come back are held, so the writes they could guard are
     *    not placed); every row an answering source met stays met — the judge's absence law. The disclosure is
     *    where a deployment learns its environment is the reason. Announce, never narrow — no verdict moves because of this notice; the
     *    verdict already moved when the environment failed to answer. Audience `operator`.
     *    `detail: { reason, cause, sessionId, runId }` — `reason` is `"unresolved-symlink"` (a link whose
     *    real target is unknowable) or `"unresolvable-target"` (everything else: a refused spelling, an
     *    errored or throwing probe), and `cause` is the environment's own first sentence for that reason.
     *    ONCE PER LEG PER `reason` — the fact is about the ENVIRONMENT, not about a write, so it carries no
     *    call identity and a second failing write of the same shape adds nothing. Absent ⇒ every judgment
     *    this leg made had the views it was compiled for, OR the judge never finished at all (a judgment the
     *    gate's bounded wait gave up on is reported on the hook-error lane instead, `onHookError`).
     *  - `"config.tool_card_undeclared"` (design/388 L4) — a tool minted a `details.type` card its definition
     *    (or its caller declaration's `renderHints.resultCards`) never declared; the card was dropped from
     *    `tool_end.structured`; once per leg per type; `detail: { type, sessionId, runId }`.
     *  - `"config.tool_face_undeclared"` (design/388 §2.7) — an MCP server's `toolFaces`/`toolAxes` or an A2A peer's `toolAxes` names a tool/skill the listing does not carry (nothing is unmounted; audience `operator`); once per leg per key; `detail: { server, tool, sessionId, runId }` (`server` holds the peer's name on A2A).
     *  - `"config.tool_face_invalid"` — a `toolFaces` overlay does not fit the tool's schema, so the tool is not mounted on this leg until it fits. Audience `user`, attention `act`: the session's tool set is short by it, and the sentence names the tool and its server and whom to ask.
     *    Once per leg per tool; `detail: { server, tool, sessionId, runId }` (the validator's diagnosis stays on `onError` `{ phase: "mcp" }`, never on this user notice).
     *  - `"agents.listing_truncated"` — the agent-type roster frame did not fit the same listing budget:
     *    at least one type is listed name-only (`nameOnly`) or not at all (`dropped`). Audience `operator`.
     *    `detail: { budgetBytes, total, kept, nameOnly: [name], dropped: [name], sessionId }`; the same
     *    firing rule as its skills sibling below (once per delivered frame, on the carrying message's receipt).
     *  - `"permission.allow_rule_not_used_in_auto"` — auto mode does not use an allow rule the person holds (`auto-strip.ts`): the calls
     *    it names go to the classifier. Said at the first call in `auto` the rule would have been read for, then not again in the
     *    conversation for that rule (`src/core/runner/auto-strip-notice.ts`). Audience `user`. `detail: { entry, source, reason, toolName,
     *    toolCallId, skill?, sessionId, sourceSessionId?, agentId?, runId }` — `source` ∈ `user` / `project` / `session` (a stored row's
     *    source) / `request` / `deployment` / `skill`, `reason` from {@link import("./auto-strip.js").AUTO_STRIP_REASONS}.
     *  - `"mods.registration_refused"` — an extension registration was not mounted: a registration admitted before it
     *    answered `{ refuse }` on `plugin.register`, or failed while judging it (fail-closed). The run goes on without it.
     *    Audience `user`, attention `act`. Once per refused registration per run. `detail: { name, seat, tier,
     *    provenance?, refusedBy, reason, sessionId }` (`provenance` as the host gave it, absent when none). 7.71.0 narrows it to the task seat.
     *  - `"mods.registration_refused_deployment"` (7.71.0) — the same, for the deployment seat (`RunnerDeps.mods`): audience
     *    `operator`, attention `act`; the same message, `detail` and frequency.
     *  - `"mods.package_key_unread"` — `loadModPackage` read a package whose `plugin.json` or `hooks.json` carries a member it does not
     *    read (another reader's — a skill's, a command's — or a misspelling): the package is loaded without it, and the member is listed on
     *    the registration's `unread`. Told when the package is read, outside any run, to the process's notice seat. Audience `operator`.
     *    Once per member per read; a package refused is told by its refusal alone. `detail: { package, file, key }` — `package` the
     *    package's directory (its real path), `file` the manifest's path inside it, `key` the member's name as a foreign line (one line,
     *    up to 60 characters, then the cut mark); never the member's value. The sentence sets the directory as a foreign line too.
     *  - `"mods.display_withheld"` — an answer for a window of an assistant message's display did not stand: its `classic.MessageDisplay`
     *    handler threw, answered a form the station cannot take, or the window was not answered within its own 10 s (counted from when
     *    its text settled, a dispatch slot's wait included). The handler is skipped (the ones below it answer in its place) and the window
     *    shows what the answers that stood left of it (a deadline skips every handler not yet answered) — the model's text when none did; the stored message and the model's view are
     *    unchanged. Audience `user`. Once per failing handler per window, said when the window is released. `detail: { messageId, turn, index, final, cause, registration?,
     *    sessionId }` (`cause` ∈ `threw` / `timeout` / `violation` / `reentry` / `deadline` / `fault`; `registration` names the failing
     *    extension, absent on `deadline` (the window's time ran out) and on `fault` (the engine's own failure to raise it)). A caller's stop says nothing.
     *  - `"mods.stop_ended"` — a stop event's answer carrying `end` (or a teammate event's, at a named teammate's stop point) closed the stop point: the run was not pushed
     *    back there (the answer's `block` and contexts, and the other seat's, were not fed to the model; the model is not told). It closes
     *    that stop point only — a one-shot submission still waits for what its lane is owed, and a later stop point asks again. Audience
     *    `user`. Once per stop point it closed. `detail: { event, registration, seat, reason?, sessionId, sourceSessionId?, agentId?, runId }`
     *    (`event` ∈ `classic.Stop` / `classic.SubagentStop` / `classic.TaskCompleted` / `classic.TeammateIdle`; `registration` the extension whose handler's answer carried `end` — an answer no
     *    registration produced carries none; `seat` ∈ `deployment` / `task`; `reason` the `end` text, bounded, absent when blank; the address
     *    keys are the leg notice's: a delegated leg's notice goes to its tree's root session and names the leg). A cancelled run says nothing.
     *    7.70.0 narrows it to an `end` that dropped no request of the task seat's to continue (attention `inform`); the other one is the next code.
     *  - `"mods.stop_continue_dropped"` (7.70.0) — the deployment seat's answer carrying `end` decided the stop point alone while the task
     *    seat's own answer asked the run to continue (a non-empty `block` or `additionalContext`): that request was dropped — the run was not
     *    pushed back, the model is not told. Audience `user`, attention `act`. Once per stop point it closed. `detail` as `mods.stop_ended`'s
     *    (`seat` is always `deployment`). One stop point closes under exactly one of the two codes.
     *  - `"skills.listing_truncated"` — the `<skills>` disclosure block did not fit its byte budget, so
     *    at least one skill is listed without its description (`nameOnly`) or, in the pathological case,
     *    not listed at all (`dropped`); the `Skill` tool still serves every one of them. Audience
     *    `operator` — raising `TaskSpec.skillListingBudgetFraction`, lowering `skillListingMaxDescChars`
     *    or declaring fewer skills are all deployment acts. `detail: { budgetBytes, descMaxChars, total,
     *    kept, nameOnly: [name], dropped: [name], sessionId }` — `budgetBytes` IS the budget in force;
     *    no ceiling stands above the declared fraction, so no second number rides beside it.
     *    Announced on the RECEIPT of the message that carried the frame — the leg's first user message, or
     *    the boundary steer that a drift (or a resume leg's initial listing) rides — once per delivered
     *    frame the budget actually degraded, and never for one that fit. Every count is read off that frame, so
     *    `total` is the whole roster on an initial listing and the newly announced set on a drift frame.
     *    A run whose deployment turned the listing off (`attachments.skillsListing: false`) emits nothing,
     *    since nothing is rendered. There is NO dedup key: each notice is one delivered frame`s cost, and
     *    a frame is delivered (and committed) once.
     *  - `"tool_result.offload_put_failed"` (#167) — a clear-with-offload put failed: THIS attempt stored nothing and nothing is
     *    re-inserted under the ref (an earlier attempt of the same idempotent re-put may have stored the row: a failed write, not an
     *    empty ref); `detail: { ref, sessionId, cause, occurrenceId }`, per occurrence (`ref` names the row, not the attempt), dedup
     *    key (code, occurrenceId). The session's own entry with no identity recorded is told ONCE PER SESSION instead (its own sentence).
     *  - `"tool_result.offload_put_unsettled"` — an engine-awaited tool-result store write did not settle at `OFFLOAD_PUT_WAIT_BOUND_MS` (10 000 ms), so the waiting site finished as unconfirmed: a cleared batch's request still goes out (never waited on again; each write runs on: lands ⇒ reads back, fails ⇒ `tool_result.offload_put_failed`),
     *    or a tool call's result is returned as is (and any unsettled `details` member carries no ref);
     *    told once per request batch, or once per tool call covering its body and `details` writes pending at the bound, `detail: { refs, sessionId, boundMs, occurrenceId }`; a cancel tells nothing.
     *  - `"tool_result.media_refused"` — an executed call's result carried media blocks (an image or a document, from
     *    an MCP server, a host tool, an engine tool or a `tool_result` hook's replacement) whose bytes the tool-result
     *    seat's admission refused: not a base64 payload, a media type outside the closed set, over the cap, bytes
     *    without the claimed type's signature, or bytes no processor could bring within the reject edge (or whose header
     *    states no size). Each such block already stands in the result as a text placeholder naming the tool and the refusal
     *    (never the bytes), so the model, `tool_end.output` and the transcript read that; this is the operator's account. A
     *    block refused for its SIZE (`raw_too_large`, `dimensions_too_large`, `base64_too_large`) has its bytes kept in the
     *    run's tool-result store and its placeholder names the `ref`, or why they were not kept (`notKept`: `no_byte_store` |
     *    `over_limit` | `store_failed`; the store's words in `saveError` whenever it threw, this account only). ONCE PER CALL.
     *    `detail: { toolName, toolCallId, refused: [{ type, reason, bytes, limit?, width?, height?, mimeType?, ref?, notKept?,
     *    saveError? }], sessionId, runId }` — closed-set words, counts, a media type only when it can be one (≤ 100 characters).
     *  - `"tool_result.media_persisted"` — an MCP tool call or resource read whose server sent binary content the result does
     *    not carry as a media block (audio; a blob outside the admission's image and document sets, a pdf for a model that reads
     *    no document, every blob a resource read returns): the result names each kept piece's ref, or says why it was not kept;
     *    the message is made of the counts. ONCE PER CALL (or read). `detail: { server, toolName, toolCallId, kept: [{ bytes,
     *    mimeType?, ref | notKept (+ limit on `over_limit`, + saveError whenever the store threw) }], sessionId, runId }`.
     *  - `"tool_result.read_refused"` — a run's `ReadToolResult` / `SaveToolResult` asked for a ref its tool-result store HOLDS
     *    but which is not the run's to read: the entry records another identity (principal and isolation scope), records none, was
     *    stored without provenance, or the store could not say whose it is. The model read the same miss sentence a ref that is not
     *    there reads (nothing tells it the ref exists); this is the operator's account. ONCE PER REFUSED READ. `detail: { ref,
     *    reason, reader: { principal, isolationScope? }, owner?: { sessionId?, taskId?, principal?, isolationScope? }, cause?,
     *    sessionId, occurrenceId }` — `reason` one of `other_identity` | `no_identity` | `unowned` | `owner_unreadable` |
     *    `owner_read_failed` | `no_owner_read`; `cause` (on `owner_read_failed`) the store's thrown text. A ref the store does not
     *    hold is never told — except `owner_read_failed`, told whether or not the ref exists (the store could not say; a store
     *    outage is not a miss). Dedup key: (code, occurrenceId).
     *  - `"artifact.owner_refused"` — an Artifact tool call whose host answers carried owner records the engine did not judge the
     *    run's own (`identityReadVerdict` against the run's identity): another identity's page the host did not mark as shared
     *    with the caller, a record naming no identity, one not of its shape, or none at all — withheld (the model read "no artifact
     *    at …", a conflict snapshot was not handed back, a listing row was dropped) — or a host that marked the run's own page as
     *    shared (the owner record decided; the page was treated as the run's own). AT MOST ONCE PER TOOL CALL. `detail: { action,
     *    reasons, count, write, plane, toolCallId, sessionId?, runId }` — `reasons` the distinct words of `other_identity` |
     *    `no_identity` | `owner_unreadable` | `no_owner` | `own_page_marked_shared`, `count` the answers and rows judged so, `write`
     *    `"unknown"` (a withheld publish answer was `ok`: it may have written) / `"none"` (none was a write's). No owner, no url. Dedup: (code, runId, toolCallId).
     *  - `"config.image_processor_unavailable"` — an image went to the model as it was, over the image admission's soft
     *    target (`IMAGE_ADMISSION.soft.targetBytes`), because the run has no image processor (`RunnerDeps.imageProcessor`
     *    is `false`, or sharp did not resolve). ONCE PER RUN, at the first such image wherever it entered (a tool's result,
     *    the task's images, an attachment). `detail: { bytes, targetBytes, sessionId, runId }`.
     *  - `"fs.staging_file_left"` — a whole-file replace (`NodeExecutionEnv.writeFile`) whose write itself SUCCEEDED could not
     *    remove the staged sibling it had written (the in-place rewrite after a refused rename, or after a refused staging open):
     *    the file is still on disk, up to the whole content. Audience `operator`. `detail: { path }`, the staged path. An environment
     *    with no `onNotice` seat tells it on the process's default seat (`setDefaultEngineNoticeSeat`), else as one process line (a
     *    failed write carries the same sentence in its error instead). ONCE PER LEFT FILE.
     *  - `"fs.staging_file_swept"` — a whole-file replace (`NodeExecutionEnv.writeFile`) removed the staged siblings of its target
     *    that a process which no longer runs had left behind (a process killed mid-write runs no cleanup): exactly the names the
     *    replace itself would mint for this target, under a pid that is gone, plain files with one name. A running writer's staged
     *    file is never touched. Audience `operator`. `detail: { count }` — how many, no names. An environment with no `onNotice`
     *    seat tells it on the process's default seat, else as one process line. ONCE PER WRITE THAT REMOVED ANY.
     *  - `"session.lineage_rerooted"` — the session this run continues has a log whose replay dropped records it could not read, and this
     *    says what the run lost. Two forms, told apart by `detail.break`: `true` — the branch the run reads broke at a parent the log does
     *    not hold, and the run continues from the entry that names that parent (the branch ends there, as a bounded window ends at its floor)
     *    instead of failing; `false` — the branch is whole (the log's last records were unreadable and its head fell back to the last one
     *    still readable, or the damage sat off the branch) and the run continues from `leaf`. A break the replay cannot account for (it
     *    dropped nothing) is refused `corrupt_session`, never re-rooted. Audience `user`. `detail: { break, recordsDropped, recordsTotal, leaf,
     *    entriesOnPath, sessionId, runId }` and, when `break` is `true`, `{ missingParentId, rootedAt, entriesCut }` — the replay's count
     *    (records, not entries), the entry the run continues from (`null` = nothing of the log is readable), the branch's length, the parent
     *    not in the log, the entry the branch starts at, and how many entries the log holds that do not descend from `rootedAt` (the history
     *    above the break and its side branches). Counts and entry ids only, never a record's words. ONCE PER PREPARED LEG for a whole branch,
     *    once per break for a broken one (and then the whole-branch form is not said), at the first read that met it — said when the acquire
     *    has settled on the attempt that holds, so an attempt that lost a write race and was run again is not described.
     *  - `"rewind.boundary_unrecorded"` — the file-history boundary of this turn was not recorded (the store answered a failure, or the
     *    capture did not finish within its 30 s fence): the turn goes on, and a rewind to its entry will refuse
     *    `rewind_snapshot.unresolvable`. Minted by the boundary seat where it hands the same failure to `onError` (`{ phase: "rewind" }`,
     *    the operator's half), so the two are one fact. Audience `user`. `detail: { sessionId, entryId, cause }` — `entryId` is the row
     *    of the person's input the boundary was for, `cause` the store's code (`FILE_HISTORY_ERROR_CODES`; `aborted` for the fence); never
     *    the store's message, never a path. ONCE PER FAILED CAPTURE, at most once per run.
     *  - `"rewind.file_left_as_is"` — a run's rewind left a tracked file as it is, not a refusal (a `leftAsIs` row; why = its class,
     *    `FILE_HISTORY_LEFT_AS_IS_CLASSES`). Audience `user`. The message names the key and its directory, as the run's note does;
     *    `detail: { sessionId, path, class }` — the key, no directory. ONCE PER SESSION PER FILE AND CLASS. `Runner.rewindFiles` says no notice: its answer's `leftAsIs` names each such file.
     *  - `"verify.verifier_is_implementer"` (`src/agents/verifier-independence.ts`) — the verification gate's verifier leg answered on the
     *    SAME resolved model id as the implementation leg it judged (`TaskResult.model` of the two: an unset `verifier` role falling back to
     *    the main model, a tier default that names the same entry, or a `verifierModel` that is the implementer's own), so the verdict is a
     *    model grading its own work and the outcome says `VerificationOutcome.independent: false`. The verification runs and its verdict
     *    stands — the notice and that bit are the disclosure. Said only when BOTH ids are known (a result that carries no `model` reads as
     *    "cannot say", not as independent); a mid-run degradation is not read (the compared ids are the engine-selected ones). ONCE PER GATE
     *    RUN, at the first verifier leg that read so. Audience `user`; `detail: { model, verifierSeat, sessionId? }` — `model` the
     *    shared id (bounded at 80), `verifierSeat` is `verifierModel` (the call named it) or `roles.verifier` (the role resolved it);
     *    `sessionId` (also lifted to the top level) is the implementation's session, absent when the result carries none.
     *  - `"workspace.sync_failed"` (`src/core/runner/workspace-sync.ts`) — an execution environment's `syncWorkspace` seat did not answer
     *    ok: it answered `{ ok: false }` (its own code), threw or answered outside the seam's shape (`unknown`), passed the engine's bound
     *    (`timeout`; the call may still be running), the run was cut while it ran (`aborted`), or it was not made beside an earlier sync
     *    of the workspace that did not return after its abort (`command_in_flight`). The run goes on, its result unchanged; a sync the
     *    result was still open for is also a `TaskResult.remoteEnvFailures` row (`op: "syncWorkspace"`). Audience `operator`. `detail:
     *    { reason, code, retryable, sessionId, runId? }` — never the adapter's message. ONCE PER SUCH SYNC; `command_in_flight` once a run.
     *  - `"workflow.governance_key_stripped"` (#235) — the fields of an LLM-authored workflow `agent(spec)`
     *    that did NOT cross the governed default-deny whitelist: an unrecognized/control-plane field, or a
     *    `readFace` value that is not the containment-tightening one. The spawn PROCEEDS on the deployment
     *    baseline (the strip is not a refusal in this window), which is why the drop is announced;
     *    `detail: { total, stripped: [{ key, reason }], omitted?, occurrenceId }`, the rendered key list
     *    bounded in count and length because the names come from the untrusted script. One aggregated
     *    notice per governed child build, not de-duplicated across builds: each spec is a distinct fact,
     *    and the uuidv7 `occurrenceId` minted at the announcement is what carries that claim to a consumer
     *    that would otherwise read two builds of one spec as one repeated notice. Dedup key: (code, occurrenceId).
     *  - `"workflow.agent_option_ignored"` (#505 ①) — the OPTIONS-object twin of the row above: keys of
     *    `agent(spec, opts)`'s SECOND argument that were not applied (unrecognized, or a known option
     *    whose value its type check rejected — `label: 42`). The spawn PROCEEDS without them, which is
     *    why the drop is announced. A separate code because the two membranes accept different key
     *    sets and the message names its own. `detail: { total, ignored: [key], omitted?, occurrenceId }`,
     *    same bounding and same per-call (never de-duplicated) semantics as the spec-side row; dedup
     *    key: (code, occurrenceId). NOT the whole family: a SPEC field written on the options object
     *    (`model`, `modelName`, `thinking`, …) is REFUSED at the membrane instead — a silently ignored
     *    `model` runs a different agent than the author asked for.
     *  - `"workflow.parked_decision_unused"` (#4390) — a person's decision for a card a finished workflow run parked on reached
     *    this leg (`RunInternals.workflowParkedResume`) and the engine did not use it to continue the run. Once per (leg, run) for the run's answer, and once more per reason and code for the decisions of that batch the judgment found settled for good (a drive refused them and no continuation had told it) that the run's answer does not name; a decision is told once per state (#4833): an answer that spends it (its reason's row of `WORKFLOW_PARK_UNUSED_REASON_CLASS` has a `spent` class, and no `kept` one or the answer carries that row's `spentWhen`) once for good, any other reason the park's holder can record once per state it names (the keys `reason`, `code`, `changed`, `inputs`, `holder`, `why`) — recorded on the park's holder, and a later hand-over in that state answered with nothing (`workflowParkDecisionOf` reads it);
     *    `detail: { runId, decisionIds, decisionKey, reason, holder?, code?, changed?, inputs?, why?, rowReason?, terminal?, continuedAs?, spent }` plus the leg's address,
     *    never the token; `reason` ∈ `WORKFLOW_PARK_UNUSED_REASONS`; `spent` (#5208, always a boolean: whether the answer spent these decisions for good; a notice without it is an older engine's) — what is left to do is `workflowParkUnusedClassOf(reason, spent)`. `ask_unanswerable` = not used, still deliverable; `decision_spent` = used and refused,
     *    a person decides again; `card_unresumable` = this engine never resumes the card (`terminal: true` = no release does); `continuing_elsewhere` = the claim
     *    is held elsewhere, `waiting_elsewhere` = continuing the run would add a waiting line — another line waits on a card (`holder` = its head run, or every head run when several lines wait): not used, still deliverable (once none of those lines waits); `run_not_ended` = the run that holds a card still waiting is recorded as running (its end was never written): not used, deliverable again only once that run has ended; a card no longer pending is `not_pending` whatever the run's record says. Audience user.
     *  - `"workflow.parked_decision_used"` (#5208) — the pair of the row above, the positive word: a continuation the engine started from the decisions this leg carried, told once by the leg that started it (a decision it carries is not among that run's unused notices); `detail: { runId, decisionIds, decisionKey, continuedAs }` plus the leg's address, never the token. `decisionKey` (both codes): the first 32 hex characters of the sha256 of the JSON `[runId, ids]` (`runId` the run the decisions name, never the leg that carried them; `ids` without repeats, ascending code-unit order) — compare it, never parse it; a notice's occurrence is (code, `decisionKey`, `reason`). Both codes are told before the leg's first request to its own model; on a leg that resumed to run the model's own `Workflow({ resumeFromRunId })` call for a run, with a Workflow tool mounted, neither is told for that run's readable decisions. The rest — guarantees, presence, limits — is docs/INTEGRATION-CORE.md's. Audience user; attention `audit` (off the screen).
     *  - `"workflow.record_unwritten"` (#4486) — a workflow run ended and its terminal record did not land: said on the default seat
     *    after the run has answered, at most once per run's end; its `detail` is on its row in `ENGINE_NOTICE_CODES`. Audience operator.
     *  - `"config.host_sink_failed"` — a host seat the run calls failed and was contained: it threw, or —
     *    since an `async` function satisfies a `=> void` seat — it returned a promise that rejected. The run
     *    is untouched (the seat's frame or event is dropped; delivery is never awaited, so a seat that never
     *    settles is not a failure and announces nothing). `detail: { site, cause }` — `site` names the seat:
     *    `"run_internals"` (a `RunInternals` sink — `onLegFrame`, `onActivity`, …), `"delegation_lifecycle"`
     *    (`RunnerDeps.onDelegationLifecycle`) or `"forward"` (the subagent display sink,
     *    `RunInternals.onForwardEvent`); `cause` is the thrown value's message. Audience `operator`: the seat
     *    is deployment wiring and nobody else can repair it. Dedup unit: once per engine-owned site name per
     *    run (the forward sink's counters ride `RunInternals.forwardScope`, which every copy of a run's
     *    internals carries), later failures counted only — a seat that fails on every frame costs ONE line.
     *    Replaces `config.forward_sink_failed` (that code's `detail.site` read `"runtask.onForwardEvent"`).
     *  - `"config.seat_malformed"` — a host seat is present but is not a function: the delegation-lifecycle
     *    observer (`RunnerDeps.onDelegationLifecycle` — its frames are not delivered) or a Node environment's
     *    `onSecretEnvScrub` (its findings fall back to the summary line). `detail: { seat }`. Audience
     *    `operator`. Once per process per seat.
     *  - `"config.session_delete_withheld"` — a `TtlSessionStore` was built over a repo that has a head read and a row read but no
     *    header-only placement read (`SessionRepo.placementOf`): the owner's delete is judged on the row's head, never on its log, so that store
     *    offers no owner's delete (`SessionStore.delete` is absent) until the repo answers the placement from its header. `detail:
     *    { missing: "placementOf" }`. Said on the default seat; audience `operator`; once per process.
     *  - `"config.env_knob_adjusted"` — a process-level numeric env knob was not used as written: ignored (not
     *    a positive whole number — the default stands), capped to its ceiling or raised to its floor; the
     *    sentence names the value asked for and the value in force. `detail: { name, applied? }` — `applied`
     *    is the number in force, absent when a downstream built-in default stands. Said on the default seat;
     *    audience `operator`; once per process per distinct sentence.
     *  - `"config.read_deny_home"` — placing read-deny rows under a home could not settle one of its facts:
     *    `detail.kind` is `"bad_value"` (an account value or an `ExecutionEnv.otherHomeDirs` list that is no home), `"in_workspace"`
     *    (an `otherHomeDirs` entry inside the task's workspace, placed nowhere), `"unanswered"` (the account
     *    lookup failed), `"auxiliary"` / `"config_root"` (a home or config root that did not answer its
     *    probes) — each once per process — or `"placement_lost"` (an engine defect: a tool band handed a home
     *    list that is not its placement's, said every time). Said on the default seat; audience `operator`.
     *  - `"config.permission_rules_skipped"` — `createPermissionRulePolicy` under `onInvalidRule: "skip"`
     *    dropped rules it could not compile and was given no `onIssue`. `detail: { count, codes }` — the
     *    number of rules and their distinct issue codes; the sentence names each rule. Said on the default
     *    seat; audience `operator`; once per construction.
     *  - `"config.process_start_time_unavailable"` — this host cannot report process start times, so every
     *    record naming a process (a file store's directory lock, a run claim, a memory writer's session
     *    account) is judged by pid alone. `detail: { reason }`. Said on the default seat; audience
     *    `operator`; once per process.
     *  - `"config.data_root_spelling_split"` — the memory root's value is written in a decomposed spelling: the engine opens its
     *    composed (NFC) spelling, and the written spelling's own directory holds data that one does not (`state: "moved"`) or both
     *    hold some (`"both"`); nothing is read from it or moved. `detail: { written, opened, state }`. Said on the default seat;
     *    audience `operator`, attention `act`; once per directory per process.
     *  - `"store.tail_segment_unjudged"` — a file store's JSONL tail segment larger than the judgeable bound
     *    was ended as a line, not judged; its bytes are untouched. `detail: { path }`. Said on the default
     *    seat, on a microtask after the write that repaired it; audience `operator`; once per repair.
     *  - `"store.append_log_parked"` — the append logs of this loaded module reached their descriptor budget, or an
     *    open met the process's descriptor limit and lowered it, and the least recently written ones released theirs
     *    (they reopen on their next write). `detail: { budget, cause }` (`budget_reached` | `descriptors_exhausted`).
     *    Said on the default seat, on a microtask after the work that parked; `operator`; once per (cause, budget value).
     *  - `"store.lock_retained"` — a lock this live process took could not be handed back, so it may still
     *    name this pid: `detail: { lock, path, pid }`, `lock` one of `"directory_fence"`, `"boot"` (a file
     *    store's data root) or `"mailbox"` (a box lock, unreadable at release or not removable). Said on the
     *    default seat; audience `operator`; once per failed release.
     *  - `"store.tree_id_stamp_incomplete"` — the file workflow-run store's open could not give some finished records their tree id
     *    (a write that failed or lost: `notStamped`), or its closing compaction failed (`notSynced`: the stamps read as written, and a
     *    crash before the store's next synced write loses them): `detail: { path, notStamped, notSynced, code }`, `code` the first
     *    failure's system code (`ENOSPC`, …). Said on the default seat; audience `operator`; once per open; the next open tries again.
     *  - `"store.lock_reclaimed_on_declaration"` — a file store's directory lock whose record names no pid
     *    namespace was removed because the host declared, with `declareDataRoot(root, { singleProcessTable:
     *    true })`, that every process opening that data root runs in this process table, and the process the
     *    record names is gone from it. `detail: { path, pid, root }` — the lock, the pid it named, the declared
     *    root that covers it. Said on the default seat; audience `operator`; once per lock removed.
     *  - `"store.process_anchor_unavailable"` (Linux; once per process) / `"store.process_anchor_lost"` (once per anchor):
     *    the process anchor of a directory lock could not be made, or stopped being its pipe — see `process-anchor.ts`.
     *  - `"memory.notice_unscoped"` — a memory notice (the engine's, or a file store's) named no single
     *    scope, so it was kept off every session's memory notices; said here only when the memory engine has
     *    no incident sink (with one, the sink is told `memory.announcement_withheld`). `detail: { stage }`.
     *    Said on the default seat; audience `operator`.
     *  - `"delegation.settlement_external"` — a background delegation settled EXTERNAL after launch: its
     *    session is marked and its unmarked committed contributions are challenged. `detail: { sessionId }`.
     *    Said on the default seat; audience `operator`; once per applied settlement.
     *  - `"delegation.settlement_write_failed"` — a background delegation's settlement verdict could not be
     *    written after its retries; the pending row expires as unproven at the settlement window.
     *    `detail: { verdict, sessionId, fork }`. Said on the notice seat of the runner that mounted the
     *    delegation tool; audience `operator`.
     *  - `"delegation.durable_row_unpersisted"` — a durable background-agent row's bookkeeping stopped:
     *    `detail.kind` is `"terminal_unrecoverable"` (a terminal flush the heartbeat could not land in 60
     *    re-drives), `"poisoned"` (the lane met a foreign writer or a write it could not recover — no more
     *    writes for that row) or `"admission"` (an org-admission verdict was not persisted); `detail.handle`
     *    names the row. Said on the default seat; audience `operator`. Formerly a process `warning` event.
     *  - `"delegation.parked_card_unreadable"` — the store sweep could not read a parked background agent's approval card
     *    (its body does not decode, or it carries no state word, and the store's listing states none): the row is left parked.
     *    `detail: { handle, scope, cause }`, `cause` `"decode"` | `"no_state"`; once per (scope, handle) per process; said on the
     *    default seat; audience `operator`. Formerly a process `warning` event.
     *  - `"delegation.agent_row_ending_unreadable"` — a stored background agent row's ending record does not read (its `outcome`, or the
     *    refused asks an earlier engine kept under their own key): the row is answered from its status words and its refusals read as not
     *    known (`refused.unreadable`). `detail: { handle, scope, member }`, `member` `"outcome"` | `"refusedAsks"`; once per (scope, handle)
     *    per process; said on the default seat; audience `operator`.
     *  - `"delegation.parked_card_id_untrusted"` — a parked background agent's approval card was read, but the id it carries does not
     *    pass the identity judge (`readGateIdentity` against the card's token): the agent's state (`AgentPark`) is read without the id and
     *    says `checkpointIdMissing: "untrusted"`. `detail: { handle, scope }` — never the id; once per (scope, handle) per process; said
     *    on the default seat; audience `operator`.
     *  - `"engine.debug_trace"` — an operator's opt-in trace: `SEMA_DEBUG_SHUTDOWN=1` (`detail.topic:
     *    "shutdown"` plus the step's own facts) or `SEMA_DEBUG_WORKFLOW_JOURNAL=1` (`detail: { topic:
     *    "workflow_journal", runId, callKey }`). One per traced step; said on the default seat; audience
     *    `operator`; never minted unless the flag is set.
     *  - `"memory.restore_withheld"` — a memory containment DID NOT write a committed baseline back: another
     *    writer held the path when the restore reached it, and those newer bytes were left standing.
     *    Containment is unaffected and the committed copy is still in the store, so reconciling the two is
     *    the host's act (audience `operator`). `detail: { paths: [{ path, entryId?, rev? }], sessionId? }`,
     *    `rev` = the declined generation. Dedup unit: once per containment PASS, never per path.
     *  - `"memory.project_scope_absent"` — the assembly point DECLARED that it could derive no project
     *    identity for this session's working root (`TaskSpec.memory.projectKey: { absent }`), so the
     *    layering it sent is used exactly as written: entries this session writes go to whatever the
     *    spec named, typically a layer shared with every other project. Audience `operator` — the
     *    reading is about how the deployment resolves working roots, and only an operator can change
     *    it; nothing retries and nothing is refused. `detail: { reason, taskRoot, sessionId,
     *    writeScope? }`, `reason` the deployment's own word (not_git | bare | unreadable),
     *    `writeScope` absent ⇔ a read-only layering. Minted at the DECLARATION rather than at the
     *    mount (the declaration is already the fact, and a mount that later fails must not swallow
     *    it). Dedup unit: once per prepared leg.
     *  - `"protocol.revocation_probe_failed"` (design/338) — the `protocolRevocations.revoked` probe threw or answered a
     *    non-boolean; an MCP server's and an outside A2A peer's requests go out, an inside A2A peer's are NOT sent, and this announces once per prepared leg,
     *    whichever protocol asked first (a resume prepares again and may announce again).
     *    `detail: { message, runId }` — still no sessionId (a deployment wiring fact, not session-attributed); `runId`
     *    (#499) makes the once-per-leg claim CHECKABLE without attributing the line to a conversation, an opaque
     *    invocation id saying which leg rather than whose. `"operator"` audience by its explicit {@link NOTICE_AUDIENCE}
     *    row (#433 made the registry total over the catalog — no engine-minted code is audience-defaulted any more). The
     *    refusal itself (`mcp.server_revoked` / `a2a.peer_revoked`) is a tool RESULT code, not a notice.
     *  - `"mcp.server_redialed"` — a host asked this run to RE-DIAL one MCP server (the run
     *    handle's `reconnectMcpServer` verb) and this is what came of it. `detail: { server, outcome,
     *    added, removed, reason?, sessionId, runId }` — `outcome` is the result's own three-word answer
     *    (`reconnected` / `refused` / `not_declared`) and `added`/`removed` are COUNTS of namespaced
     *    tool names, never the names themselves (a server's tool names are server-authored text and
     *    this is an operator line, not a disclosure channel). ONE code rather than a success code and a
     *    failure code: the outcome is data about one event, not two kinds of event, and both would
     *    carry the same presentation tier — a consumer alerting on failures reads one field.
     *    `"operator"` audience: re-dialing is deployment plumbing and a failed one leaves the server
     *    DOWN, which only the operator can act on. Dedup unit: once per ATTEMPT — never folded per run,
     *    because two attempts on one server are two different answers and folding the second would hide
     *    the one that says the server is still down.
     *  - `"mcp.authorization_required"` — an MCP server the user must authorize before it serves them:
     *    the leg's dial failed `unauthorized`, or a request was refused so and that refusal is its answer
     *    (a repeat-safe call refused 401 and sent once more on a renewed credential announces only if that
     *    send is refused too; a record whose reason is `seat_unavailable` owes the user nothing and is told by `mcp.server_unavailable`). The SAME fact as the failure record's `authorization`
     *    (`McpAuthorization`). `detail: { server, reason, authorizeUrl?, principal?, sessionId, runId }` —
     *    `reason` is `rejected` (401) / `scope` (403 insufficient_scope) / `none` (the seat holds no
     *    authorization for this user), `authorizeUrl` the seat's own (never the endpoint's
     *    `resource_metadata`, which rides the record only). The `message` names no address (it points at the host's prompt). `"user"` audience: nobody but the user can
     *    authorize; `sessionId` REQUIRED at the mint. Dedup unit: once per (leg, server) — a resume is a new
     *    leg and may announce again. A deployment that waits for the authorization keys on this notice; the
     *    leg itself does not park on it.
     *  - `"mcp.server_unavailable"` — an MCP server the leg could not reach (it failed to connect or to list its tools) and so SKIPPED: the
     *    run goes on with the tools of the servers that did connect, and this server's are missing from it. The person's half of the SAME
     *    warning the operator reads on `onError` (`{ phase: "mcp" }`, code `mcp.server_unavailable`): derived at the Runner's drain of the
     *    materialization's warning lane from the warning object itself, so the two are one fact; the wiring manifest's `mcp` row and the
     *    materialization's `statuses` already read `failed` and are not touched. `detail: { server, memory?, sessionId, runId }` — `server` is the
     *    declared entry's name, never the failure's text, a URL, a command or a path; `memory: "kept"` when the session's pool keeps the
     *    failure (it waited out the startup bound and is not dialed again), absent when it does not; `sessionId` the session whose MCP pool holds the
     *    attempt (a child's or a workflow agent's: its session tree's root session), `runId` the leg's. A server whose dial failed
     *    `unauthorized` (an authorization the user owes) is NOT told here — `mcp.authorization_required` is its notice; reason `seat_unavailable` owes none and IS told here. `"user"` audience; `sessionId` REQUIRED at the mint.
     *    Dedup unit: a fact per (server, memory) — the delivery throat's fact key ({@link NOTICE_FACT_KEY}), told while it holds and not
     *    again, judged against the leg's own session's record; a leg on which the server connected (or a host re-dial that connected it), or whose endpoint answered
     *    401 / 403 (an authorization the user owes, told by `mcp.authorization_required`), ends the server's fact ({@link endNoticeFact}), so a later failure is told again, and a
     *    kept failure a leg's own dial made (after a forget, or under a changed declaration) is told again too — a leg the session's
     *    memory answered (`recalled`) tells nothing. Never folded across servers (a second server's failure is its own fact).
     *  - `"mcp.server_connecting"` — the leg's wait for its MCP servers (before its first model request) has lasted `MCP_CONNECTING_NOTICE_AFTER_MS`
     *    and this server's attempt is still in the air: whom this task's start waits for (a root's, a child's, a workflow member's alike). `detail: { server, waitedMs, boundMs, sessionId, runId }`
     *    — the declared name, how long the wait has lasted, the server's startup bound (the wait lasts at most that, or the host's budget
     *    `RunnerDeps.mcpFirstRequestWaitMs` when it is less). `"user"` audience, attention `inform`. Dedup unit: once per leg per server — the
     *    fact is that leg's wait (the throat's fact key against a record of the wait's own, never the session's), so a later wait is told again.
     *  - `"mcp.credential_echoed"` —a protocol peer (an MCP server, an A2A peer) echoed a credential its
     *    connection's requests carried into what it said about itself: an MCP server's `serverInfo`, its
     *    instructions or its tool listing, an A2A peer's agent card. The engine reads that account through
     *    one eraser whose needle is the connection's credentials (`PeerCarrier.credentials`): free text
     *    holding one is erased in place (the redaction mark), a NAME holding one is refused, never
     *    rewritten (a tool or skill is not mounted, the server's info or the card's name is not
     *    projected). `detail: { protocol, server, where, sessionId, runId }` — `protocol` is `mcp` / `a2a`,
     *    `server` the declared entry's name, `where` the closed set `CREDENTIAL_ECHO_SITES`
     *    (`server_info` / `instructions` / `tool_listing` / `agent_card`); never a value. `"operator"`
     *    audience: the endpoint repeats what it is sent, which only whoever wired it can act on. Dedup unit:
     *    once per (materialization, server, site) for MCP and per (materialization, peer) for A2A.
     *  - `"a2a.peer_card_drift"` — an A2A peer registered inside the trust boundary (`A2aServerSpec.boundary: "inside"`) mounted, and
     *    its card and its registration's reviewed skills (`allowSkills`) differ: skills the card names that were not reviewed (not
     *    mounted) and reviewed skills the card no longer names (nothing mounts for them). The same two lists ride the peer's status row
     *    (`A2aPeerStatus.cardDrift`). `detail: { peer, unreviewed, missing, sessionId, runId }` — the skill ids, each spelled as a list entry is (`renderListEntry`:
     *    a JSON string, control / format / space characters as `\uXXXX`, cut after 122), one entry per id, each list sorted, at least one non-empty. `"operator"` audience: only whoever owns the registration can review it again. Dedup unit: once per
     *    session per (peer, unreviewed, missing) — the delivery throat's fact key ({@link NOTICE_FACT_KEY}), with no end read: a drift told stays told for the session
     *    (a card read in part makes "no drift" unknown, not true). Never minted for an
     *    outside peer (its `allowSkills` picks skills; it does not review them).
     *  - `"mcp.server_stderr"` — what a stdio MCP server wrote to its stderr while its connection was being established, judged whole with its credentials withheld (`mcp-stderr-lines.ts`; the reference's form: not read once the connection is up): one per dial that connected or failed and whose server wrote anything (a stopped dial tells none), its latest lines in the message (at most 32 lines, 2 048 characters). `detail: { server, outcome, lines, notShown, withheld, truncated }` — `outcome` `connected` / `failed`, `lines` the lines written (not blank) and read, `notShown` those the message does not carry, `withheld` those of them a credential's mark or the hold bound swallowed (all of them, the message carrying none, when a credential the dial's peer seat answered for it stands in what it wrote), `truncated` whether more was still arriving when the dial settled. No session — a pooled connection is dialed by one leg, whose seat hears it. `"operator"` audience.
     *  - `"config.models_swapped"` — `Runner.swapDeps` replaced the model catalog generation
     *    (zero-restart model switching; the `models` / `tiers` seats of the swappable set). `detail:
     *    { models, tiers, generation, occurrenceId }` — key COUNTS and the `generation` the swap leaves in force (a digest of
     *    its key material: the model names the candidate declares and the tier bindings in force over them,
     *    `catalogGenerationOf`), never the catalog itself. Every Runner a driver swaps to the SAME model names under the
     *    SAME tier bindings announces the SAME `generation` (and its own `occurrenceId`), so a consumer folds one swap
     *    announced by N Runners by (code, generation); equal key material is one generation. In-flight tasks
     *    finish on the models they resolved at prepare (natural snapshot); every later prepare resolves
     *    against the new generation. A failed swap (illegal tier binding, a refused candidate) throws
     *    atomically and mints nothing. The verb carries no run and no session and the payload is a pair
     *    of counts, so the uuidv7 `occurrenceId` minted at the announcement is what tells two deliveries of the
     *    same shape apart. Dedup key of one delivery: (code, occurrenceId); of one swap announced by several Runners: (code, generation).
     *  - `"config.read_face_swapped"` — `Runner.swapDeps` replaced the deployment's read-face
     *    declaration (`RunnerDeps.readFace`, the `readFace` seat of the swappable set) without a
     *    restart. `detail: { from, to, occurrenceId }` — the seat's previous and new value, each
     *    `"open"` | `"roots"` | `null` (`null` = no declaration; the engine default `roots` applies).
     *    The SEAT is announced, not a leg's resolved face: resolution (task seat, governance, the
     *    read-only mount) still runs per prepare. In-flight legs keep the face they prepared under;
     *    every later prepare resolves against the new declaration. A candidate outside the value gate
     *    (`assertContainmentFaceValue`) throws atomically and mints nothing. Own `occurrenceId` for the same
     *    reason as the catalog line (no run, no session, a two-word payload). Dedup key: (code, occurrenceId).
     *  - `"config.write_face_swapped"` — the same line for the WRITE seat (`RunnerDeps.writeFace`),
     *    same payload, same laws. A SEPARATE code rather than a face field on the line above: the audience
     *    table and every consumer table are keyed by code.
     *  - `"config.read_deny_swapped"` — `Runner.swapDeps` replaced the deployment's read-deny declaration
     *    (any of `READ_DENY_DEPLOYMENT_SEATS`; the request-release grant is told in the message only) without a
     *    restart; ONE line per swap. `detail: { seats, patterns, tiers, exclude, floorRequired, occurrenceId }` — the seats the
     *    swap named, then the declaration in force after it (additions and removals as counts, the tier selection
     *    by name, the floor requirement as its boolean; `null` = no declaration). In-flight legs keep the deny face they prepared under; every later
     *    prepare compiles against the new declaration. A candidate outside the seats' gates throws atomically and mints nothing. Dedup key: (code, occurrenceId).
     *  - `"config.read_deny_request_excluded"` — this leg's request released a granted built-in read deny row for its Read tool (`TaskSpec.readDenyBuiltinExclude`); once per such leg; `detail: { rows, sessionId, occurrenceId }`; audience user. Dedup key: (code, occurrenceId).
     *  - `"config.memory_consolidation_driver_swapped"` — `Runner.swapDeps` replaced the deployment's memory consolidation seat
     *    (`RunnerDeps.memoryConsolidationDriver`) without a restart; ONE line per swap. `detail: { shape, model, occurrenceId }` —
     *    key material only: the seat's shape (`"endpoint"` an endpoint triple, `"function"` a chat function, `"roles"` no chat — the
     *    role chain resolves at the run's start —, `"cleared"` the seat removed) and the model id it names (`null` when it names none);
     *    never the endpoint, the key or the knobs. The seat takes effect from the next consolidation that starts; one already running
     *    finishes on the seat it started with, so its provider still receives the rest of that run's requests. A refused candidate
     *    (the seat's snapshot, key intake, screen or the arming door) mints nothing. Dedup key: (code, occurrenceId).
     *  - `"config.context_settings_swapped"` — `Runner.swapDeps` replaced the deployment's per-model
     *    context-window overlay (`RunnerDeps.contextSettings`, the `contextSettings` seat of the swappable
     *    set) without a restart. Unlike every other swappable seat this one is read LIVE: a running leg
     *    measures its next boundary (the compaction trigger, the sanitize clamp, the request guard, the
     *    disclosed `contextUsage`) against the new windows, while its routing stays on the generation it
     *    prepared under. `detail: { words, declared, previousDeclared, occurrenceId }` — the declared model
     *    WORDS (the first eight) and the two counts, never the numbers: an overlay's values are deployment
     *    configuration and this line is an operator breadcrumb, not a config dump. A candidate outside the
     *    value gate (`assertContextSettingsValue`) throws atomically and mints nothing. Own `occurrenceId`
     *    for the same reason as the catalog line. Dedup key: (code, occurrenceId).
     *  - `"route.fallback_to_primary"` (the route pre-flight, `src/brain/route-adjudicator.ts`) — a
     *    DERIVED-leg model (role/tier/system-default resolution, never a caller-explicit one) was refused by the route judgment
     *    (a credential that does not pair, or `route.model_unavailable`: the deployment does not serve it) and the seat fell back to the primary model instead of sinking the task; the notice is the loud half of that swap.
     *    `detail: { seat, from, to, cause?, fixHint?, sessionId?, runId? }` — `cause` the refusal code (the judgment's own, or
     *    `route.judgment_failed` for one that threw / answered no verdict; cause / fixHint absent when it gave none); `sessionId` (#433, additive)
     *    rides when the adjudicating seat knows its session, and `runId` (#499, additive) names the
     *    INVOCATION whose seats were being resolved — both correlation keys only, the audience stays
     *    `"operator"` (see the registry's entitlement-not-routability note), and `runId` is what tells one
     *    task falling back twice apart from two tasks falling back once each.
     *    Explicitly-named models never mint this: they refuse at the brain's request gate instead.
     *  - `"route.classifier_unroutable"` (same pre-flight, the other POSTURE) — the derived classifier seat
     *    failed the same pairing pre-flight while the deployment had declared NO fallback
     *    (`RunnerDeps.autoMode.classifierFallback: "none"`), so the seat was KEPT and its calls are refused before dispatch (the model lane asks the same judgment) rather than served by the primary model. The line is why "no swap" is still not "no
     *    word". `detail: { seat, from, cause, fixHint, action: "refused", sessionId?, runId? }` — the twin
     *    above's keys MINUS `to` (nothing moved, and a `to` naming a model that was not used is the one lie a
     *    consumer cannot detect); `action` is the discriminator, so a reader never infers the posture from that
     *    absence. Audience `operator`, same entitlement reading as its twin. Dedup key: (code, seat) per run.
     *  - `"route.seat_detached"` (same pre-flight, the third POSTURE) — a derived seat no primary model can stand in for
     *    (the advisor tool: advising the agent with its own model is no advice) failed the pairing pre-flight, so the seat
     *    is taken off THIS run: the advisor tool is not mounted (the leg's manifest says `advisor.reason: "route_refused"`).
     *    `detail: { seat, from, cause, fixHint, action: "detached", sessionId?, runId? }` — `route.classifier_unroutable`'s
     *    keys, `action` the discriminator. Audience `operator`. Dedup key: (code, seat) per run.
     *  - `"advisor.not_attached"` (`src/core/advisor-verdict.ts`) — a task's `advisorModel` did not attach for a reason the
     *    person is told: `unknown_model`, `advisor_unranked`, `weakest_tier`, `main_unranked`, `pairing` (the advisor is on a
     *    weaker tier than the main model) or `hold_unknown` (whether the conversation switched it off could not be read).
     *    `detail: { advisorModel, mainModel, reason, sessionId, runId? }`. Root legs only (a delegated child tells nobody).
     *    Audience `user`. Dedup key: (code, reason, advisorModel, mainModel) per SESSION (the once-per-session record).
     *  - `"classifier.fallback"` (the classifier's candidate ladder, `src/core/runner/classifier-ladder.ts`)
     *    — a gated call's classification did NOT rule on the classifier seat and was re-asked on the model
     *    behind it. Sibling of `route.fallback_to_primary` one layer later: that one fires when the derived
     *    model is not ROUTABLE at all, this one when it is routable and still does not answer.
     *    `detail: { from, to, cause, sessionId?, runId? }` — `cause` is the `AutoModeFallbackCause` word, the
     *    two ids are the rungs. Dedup key: (code, from, cause) PER RUN; a second CAUSE on the same rung is
     *    its own line.
     *  - `"classifier.seat_rate_limited"` (same file, the per-decision observer; the decider's retirement,
     *    `src/core/auto-mode.ts`) — the classifier seat's dispatch ended on the provider's rate limit (an HTTP 429 that
     *    outlived the brain's backoff ladder) on `RunnerDeps.autoMode.rateLimitBreakAfter` CONSECUTIVE classifications, so
     *    for the rest of this run the seat is NOT ASKED again: every gated call is judged on the model behind it, without
     *    first waiting out the seat's backoff. Different fact from `classifier.fallback` (a call re-asked behind the
     *    seat; its throttle is the rung's cause) — this is the seat leaving the walk. `detail: { model, to, rung,
     *    consecutive, sessionId?, runId? }` — `model` the retired rung's id, `to` the model the walk now starts at,
     *    `rung` its ladder position, `consecutive` the count that tripped it (the configured bound). Once per retired
     *    rung per run (the retirement is the dedup); only a rung with a rung behind it can retire, so a one-rung ladder
     *    (`classifierFallback: "none"`) never mints it. Audience `user`: the rest of the user's run is judged by another
     *    model, the same consequence `classifier.unavailable` tells the user.
     *  - `"classifier.role_defaulted"` (`src/core/runner/classifier-ladder.ts`, the seat resolver) — no
     *    `classifier` role names a model, so another model STANDS IN for the seat. `detail: { model, reason,
     *    thinkingOffSpelled, sessionId?, runId? }` — `reason` ∈ `tier_below_main` (the nearest directly-bound
     *    tier below the run's main model) / `tier_table` (the static `flash` row, a main bound to no tier) /
     *    `role_fallback` (the `summarize → default` chain, no tiers) / `main_only` (the main model is the only
     *    model there is) / `role_unresolvable` (the role named a model the catalog cannot resolve; the main
     *    stands in); `thinkingOffSpelled` = whether that model's wire can carry a disable key. Minted
     *    AFTER the route pre-flight, so it names the seat actually used. Once per run.
     *  - `"classifier.contract_broken"` (same file, the round observer) — ONE model answered
     *    `AUTO_MODE_CLASSIFIER_CONTRACT_BROKEN_AFTER` CONSECUTIVE classifications without a verdict (each already
     *    re-asked once by the leg). `detail: { model, rung, consecutive, sessionId?, runId? }` — `rung` is the
     *    ladder position (0 the seat, 1 the model behind it), since two rungs may share an id. A ruling from
     *    that rung resets its count; an `unavailable` round neither counts nor resets. Once per run per rung,
     *    and by construction before the denial limit's third block hands the user its card.
     *  - `"classifier.unavailable"` (`src/core/runner/classifier-ladder.ts`, `classifierUnavailableNotice`; minted by
     *    both classifier stations — the leg's gate and an ancestor's frozen classifier in the policy fold) — a
     *    classification could NOT RULE (the classifier leg failed, or its per-level budget
     *    `RunnerDeps.autoMode.timeoutMs` ran out) and says where the call went, read off the station's one approval
     *    route (`approvalRouteOf`): `disposition: "asked"` = on to the live approver, or on to the durable park — the
     *    sentence names which route, never whether the park then commits (the handed-on ask carries `requiresRealApproval`, so no automatic lane answers
     *    it; a declared departure from CC, which refuses either way), `"denied"` = refused with the classifier's own
     *    sentence (route `none`: no approver and no park facility); the two delegation sites (`readDelegationReview`) mint it
     *    with `disposition: "proceeded"` (went ahead without a ruling; the result records `unreviewed`). `detail: { toolName,
     *    toolCallId, cause, site, disposition, refusedBySpend?, sessionId?, runId? }` — `cause` is the `AutoModeFallbackCause` word; `refusedBySpend` (`ceiling` / `closed`, at `call`) says the classification did not run because the spend account refused its request (cause `error`, the sentence says so); `site` ∈ `CLASSIFIER_REVIEW_SITES` (`call` at both per-call stations). Once per classification that could not answer (a call judged by an ancestor's
     *    classifier and the leg's own can carry two); not minted while the call is being aborted (a halt, or the run's end). Audience
     *    `user`: on a lane with no approval face this line is the only place the user hears why the call did not
     *    run. It is not a block — the denial limit does not count it. 7.70.0 narrows it to `disposition: "denied"` (attention
     *    `act`); the other two dispositions are their own codes, with the same `detail` and sentence:
     *  - `"classifier.unavailable_handed_on"` (7.70.0) — `site: "call"`, `disposition: "asked"`: the call went on to the live
     *    approver or the durable park, whose card or policy answers it. Audience `user`, attention `audit`.
     *  - `"classifier.review_skipped"` (7.70.0) — `site` `spawn` / `handback`, `disposition: "proceeded"`: the delegation went
     *    ahead without the classifier's check (its own gated calls are still judged one by one). Audience `user`, attention `act` (7.75.0; `inform` in 7.70.0–7.74.0).
     *  - `"route.credential_origin_mismatch"` (key↔URL pairing, `src/brain/route-adjudicator.ts`; announced by
     *    `src/core/runner/credential-refusal-seat.ts`) — a request was REFUSED, nothing sent, because the per-model
     *    credential it would carry is bound to another origin: the law binds a per-model credential to the origin
     *    (scheme + host + port) of the first request sent carrying it (or the one the host rebinds it to,
     *    `route.credential_rebound`): an entry whose `baseUrl` moved host with the same credential is refused (same-origin path moves
     *    are not); the request's failure carries the code (`[invalid_request] route.credential_origin_mismatch: …`). Minted only for a
     *    request whose answer is that refusal (`routeRefusalError`: the request gate's, or the model lane's for a requested model it
     *    refused before dispatch and no fallback served); a pre-flight or read-face judgment reports nothing, a hop refused on a walk
     *    another hop answered rides `skipped` (`model.fallback`), a derived seat falls back as `route.fallback_to_primary` names.
     *    Audience `user` (the operator: the sink). `detail: { modelId, boundOrigin, requestOrigin, boundBy?, sessionId, runId }`, origins
     *    in display spelling, never a credential or a digest; `boundBy` `"declaration"` (the answer's `credentialOrigin`) | `"table"`
     *    (first send, earlier answer, rebind) | `"generation"` (an undeclared answer across a catalog swap, `boundOrigin` empty), each its
     *    own message; absent only when a host's judgment does not say it (its message says so). Once per run per model, origins, boundBy.
     *  - `"route.credential_mismatch"` (the deployment credential's pairing, `src/brain/route-adjudicator.ts`; announced by the same
     *    seat, `src/core/runner/credential-refusal-seat.ts`, as the entry above) — a request was REFUSED, nothing sent, because the
     *    deployment credential is paired with the brain's root and this model's request was going to another: a credential does not
     *    follow a model to another host. The request's own failure carries the same code (`[invalid_request] route.credential_mismatch:
     *    …`). Minted only for a request whose answer is that refusal (`routeRefusalError`), as the entry above says. Audience `user`, for the same
     *    reader. `detail: { modelId, requestBaseUrl, configBaseUrl, sessionId, runId }` — the request's root and the declared root
     *    (`""` when the brain declares none) in display spelling, never a credential or a digest of one. Once per run per
     *    (modelId, requestBaseUrl, configBaseUrl).
     *  - `"route.credential_rebound"` (`rebindCredentialOrigin`, `src/brain/route-adjudicator.ts`) — the HOST moved a
     *    per-model credential's binding, explicitly: every secret the credential carries is now bound to the origin the
     *    named entry sends to, and a request carrying it anywhere else (another entry still on the old host included) is
     *    refused. Minted by the verb's own call, outside any run, through the `onNotice` the host hands it (else the
     *    throat's `console.warn` arm); once per call that changed the table, never for one that found every secret already
     *    there. Audience `operator`. `detail: { modelId, origin, previous, occurrenceId }` — `origin` and each `previous`
     *    origin in display spelling, never a credential or a digest of one; `occurrenceId` is minted at delivery (the
     *    call has no run and no session to key it by, as `config.models_swapped`).
     *  - `"route.response_model_mismatch"` — the provider answered a turn naming a model that is NOT the id
     *    the request was sent with (an alias, a pool or a gateway-side substitution looks exactly like this),
     *    so it is advisory, never a refusal: the engine keeps asking for the catalog's id and reports the
     *    served name beside it (`turn_end.responseModel` / `TaskResult.responseModel`). ONCE PER LEG PER
     *    (requested, reported) PAIR — a catalog fact, not a turn fact. Audience `operator`;
     *    `detail: { requested, reported, sessionId, runId }`. Absent ⇒ the provider echoed the requested id
     *    or named nothing — one reading, not two.
     *  - `"route.tool_call_id_folded"` (#1207) — the provider named a tool call with an id outside the shape the
     *    engine keys calls under (visible ASCII, 1–128, no `~`), so the brain keyed it under a deterministic fold
     *    (`ToolCall.id`) and keeps the provider's spelling beside it (`ToolCall.wireId`), handed back only to the
     *    provider; or (#1234) it gave two calls in ONE response the same id, so the brain renamed the later ones on
     *    both faces (every provider requires a request's call ids to be unique). Advisory: every call runs. ONCE PER
     *    RUN, on the first folded call — a gateway fact, not a call fact. Audience `operator`;
     *    `detail: { toolCallId, rawLength?, reason, sessionId, runId }` — `toolCallId` the engine id, `reason`
     *    `"charset"` (a control byte, a space, a non-ASCII unit or `~`), `"length"` (admitted characters, over 128)
     *    or `"duplicate"` (a renamed later call); `rawLength` present for the two shape reasons only; never the raw
     *    bytes. Absent ⇒ no call of the run was folded.
     *  - `"route.finish_reason_unknown"` (#1457) — the provider ended a response with a stream-end word (an
     *    OpenAI-family `finish_reason`) the brain does not read, or (#1529, either wire) with an ending seat holding no word
     *    at all (a number, `true`, an object — `?`). The turn is kept — its text and the stop its content
     *    implies — and the word rides `AssistantMessage.finishReasonUnknown` (and, when the run completes on that turn,
     *    `terminal.detail`); the notice is what keeps the keep from being a silent clean stop. ONCE PER LEG PER WORD.
     *    Audience `user` (the person reading the answer judges whether it is whole); `detail: { finishReason,
     *    sessionId, runId }` — the word in the provider echo shape, `?` when it had bytes outside it.
     *  - `"route.stream_end_ignored"` (#1457) — the provider's stream sent more after its first terminal statement, on
     *    either wire: a later ending (OpenAI-family `finish_reason`, Anthropic `stop_reason`), error frame or content (a
     *    delta, a block, a new message). The first ending decided the turn and nothing after it was added
     *    (`AssistantMessage.streamEndIgnored`). ONCE PER LEG PER (statement, word). Audience `user`; `detail: {
     *    statement: "ending" | "error" | "content", word, frames, sessionId, runId }` — `word` the first such frame's
     *    (for content, its kind), `frames` how many came. 7.70.0 narrows it to refused frames none of which carried the model's
     *    output — a later ending, an error, a frame that only closes or opens a message (attention `inform`); the next code is the other.
     *  - `"route.stream_content_dropped"` (7.70.0) — among the frames refused after the end, at least one carried the model's
     *    output (text, reasoning, a refusal, a tool call, or a block that opens one: `streamEndIgnored.contentDropped`), which the
     *    turn does not have. ONCE PER LEG PER word. Audience `user`, attention `act`; `detail: { word, ending?, frames, sessionId, runId }` —
     *    `word` the first such frame's kind, `ending` present iff the first late frame was itself an ending frame (`content_filter`, `length`, …), `frames` how many frames came after the end in all.
     *  - `"route.extra_body_reserved_dropped"` (#1520) — a request's `Model.extraBody` carried keys the wire adapter
     *    sets itself (`temperature`, `max_tokens`, `stop`, the thinking-enable keys, `messages`, `tools`, …), so the
     *    adapter stripped them and the request went out with the engine's value (or without the key); core wins, and
     *    that is said. One reading at the one strip site — the model spec of the task, a model spec a host brain
     *    rewrote for a single request, and the leg's internal calls (the compaction summary, mid-task or at the end of
     *    the task, and a side query fired from a tool) are announced alike. Advisory: the turn
     *    runs. ONCE PER LEG PER (api, key set) — a deployment fact, not a request fact. Audience `operator`;
     *    `detail: { keys, api, modelId, sessionId, runId }` — `keys` the key NAMES in `extraBody`'s order (never a
     *    value), `api` the wire the adapter speaks, `modelId` the catalog id the request was sent as.
     *  - `"model.capability_downgraded"` (#1830, #2394) — a capability the session's requests used was withheld from the model
     *    they were sent to. Images: replaced by a one-line placeholder because the model's entry declares no image
     *    input (`Model.input` without `"image"`; `capabilityOf` in `brain/model-capability.ts` is the one reading, and an
     *    entry that does not declare `input` keeps its images). The message names the model and the way out (declare the
     *    image input, or switch models). Never minted for reasoning a model declares off — the reasoning resolution's
     *    drop arm (`TaskResult.effectiveReasoning.dropped`) is that fact's face. ONCE PER SESSION PER (model, capability)
     *    (the session's announced record); one report per request also becomes the operator trace `vision.placeholder`.
     *    Also fast mode: a request that asked for fast speed of a model (a fallback hop's, a compaction summary's and a
     *    suggestion's included) whose wire or declaration cannot serve it went at standard speed (`applyFastModeToRequest`,
     *    `brain/fast-mode.ts`); a model an endpoint refused is said by `model.fast_mode_changed` instead. And thinking (#2394): a
     *    tier the call asked for did not take effect on a model whose entry does not declare `reasoning` — its endpoint refused
     *    the request that tried it and answered the same request without it, or a request that carried it broke off after it
     *    had begun answering (the stream engine's fall-back and endpoint memory); the message says which, names the tier and who
     *    can change it (the deployment's catalog entry; a restart once the endpoint is remembered); never for a call that asked
     *    no tier. Audience `user`; `detail: { model, capability, status, sessionId, runId }`, per capability — ONCE PER SESSION
     *    PER (model, capability) holds for each alike, so three capabilities withheld from one model are three notices:
     *
     *    | `capability` | `status` words | minted by |
     *    |---|---|---|
     *    | `image` | `declared_off` \| `unknown` (the entry's declaration) | the message assemblers (`reportImagesWithheld`, `brain/media-degrade.ts`) |
     *    | `fast_mode` | `not_first_party` \| `model_not_allowed` \| `unknown` (the entry's reason word) | the fast-mode applier (`applyFastModeToRequest`, `brain/fast-mode.ts`) |
     *    | `reasoning` | `downgraded` | the stream engine, once the request without the tier truly succeeded (`brain/stream-engine.ts`) |
     *  - `"model.fast_mode_changed"` (#1579; `src/core/runner/fast-mode-seat.ts`) — the session's fast mode changed during a leg: a
     *    request that carried fast speed met the provider pushing back (a rate limit, an overload) and fast speed pauses for the
     *    session until the cooldown ends; an endpoint refused fast speed or its beta (not asked of that endpoint again in this session);
     *    a cooldown ended; or — ONCE PER LEG, `detail.overage` — a request met a usage-credit cause and went again at standard
     *    speed alone. The request that met the push-back is re-sent at standard speed at once. ONCE PER CHANGE. Audience `user`;
     *    `detail: { model, state, reason?, cooldown?, overage?, sessionId, runId }` — the reading of `model` after it
     *    (`fastModeReadingOf`, `brain/fast-mode.ts` words; `cooldown.until` in epoch milliseconds).
     *  - `"model.fallback"` (#3567; `src/core/runner/model-fallback-seat.ts`) — a model request walked its `Model.fallbacks`
     *    chain: a fallback model answered (`outcome: "served"`) or none could (`"exhausted"`, the request ending with the requested
     *    model's own failure). Read off the answer's marker where the run books each answer — the main loop (`lane: "main"`) and
     *    the side-call book (`compaction` / `classifier` / `mod` / `advisor`); a call outside a leg's book announces nothing.
     *    ONCE PER SESSION PER (from, lane, to, reason, outcome) — the delivery throat's fact key ({@link NOTICE_FACT_KEY}), judged against the
     *    leg's own session's record (a compaction pass outside any run, against its pass); the requested model's own answer on that lane ends its walks
     *    there ({@link endNoticeFact}; another lane's answer ends nothing of them), so the next time it cannot serve there is told again. Audience `user`; `detail: { from, to, reason, outcome, chain, skipped?, lane,
     *    fromWindow?, toWindow?, sessionId, runId? }` — `chain` the hops tried after `from`, `skipped` the hops the deployment Brain's
     *    route judgment refused before sending (`{ model, code?, fixHint? }`, chain order; `route.judgment_failed` for a judgment that threw), the windows the models' `contextWindow`;
     *    `reason: "route_refused"`: the requested model ITSELF was refused before sending (its entry leads `skipped`). A walk that began and
     *    sent no hop (every hop it reached refused) is announced too — `exhausted`, `chain: []`, `skipped`, and no `to` /
     *    `toWindow` (no hop was tried; the answer, its marker-less message and `TaskResult.degraded` stay the requested model's own).
     *    Attention `act`. 7.70.0 narrows it to the main lane — the person's own request: a side call's walk is the next code.
     *  - `"model.fallback_side_call"` (7.70.0) — a side call's request (`lane` `compaction` / `classifier` / `mod` / `advisor`) walked its
     *    fallback chain. It does not change who answers the person, so it is the deployment's to watch: audience `operator`, attention
     *    `inform`. The same sentence, `detail` and once-told unit as `model.fallback` (fact key: `from` and `lane`, then `to`, `reason`
     *    and `outcome`; the requested model's own answer on that lane ends it).
     *  - `"context.tool_turn_repaired"` (#1224) — a provider request was built from a transcript that breaks the
     *    tool-turn law, and the request view restored it (`engine/llm/tool-turns.ts`; the transcript is never
     *    rewritten): a block after an assistant's tool calls moved ahead of them (`trailing_text`), a result recorded
     *    later moved up behind its call (`late_result`), a call with no result closed with the reconcile family's
     *    interrupted result (`missing_result`), a second result recorded for one call folded into the first
     *    (`duplicate_result`; an interrupted close beside a recorded result is left out, no recorded result is), a second
     *    call with an id its message already used left out — the message keeps the first, whose result carries every
     *    result recorded for the id (`duplicate_call`, #1241), a result no earlier call answers left out (`orphan_result`,
     *    #1242: its call is gone or it was recorded ahead of it; the one repair of the view as a whole, its ids once
     *    each in transcript order). Advisory:
     *    the run proceeds on the repaired request. Audience `operator`; `detail: { repairs: [{ form, toolCallIds }],
     *    sessionId, runId }`. ONCE PER RUN PER (form, calls) — the same broken turn is repaired on every request of
     *    the run and announced on the first. Absent ⇒ every request of the run already had the structure.
     *  - `"context.media_removed"` (#2874, #2988) — media left the model's view of a request while the transcript keeps it;
     *    each block's slot holds `[<image|document> N removed: <why>]` (`engine/llm/media-removed.ts`, N its ordinal among
     *    its message's blocks of that type). Audience `user`; `detail: { reason, images, documents, sessionId, runId }`,
     *    `reason` closed (`MEDIA_REMOVED_REASONS`):
     *     · `rejected_by_provider` — the provider refused a request because an image in it could not be processed (the
     *       failed turn's `errorKind: "image_unprocessable"`), so the request view removed the images of the newest message
     *       still carrying any (`engine/llm/rejected-images.ts`); the turn was re-sent without them and every later request
     *       of the session reads the same removal. `images` how many were removed from that message, `documents` 0. ONCE PER
     *       RUN PER REFUSAL; a refusal recorded before the run began is not announced again.
     *     · `media_budget` — the request's media no longer fit its limits (`IMAGE_ADMISSION.request`: the media-block count,
     *       the deployment's base64 budget `RunnerDeps.mediaBudgetBase64Chars`), so the oldest blocks were left out
     *       (`media-byte-cap.ts`). `images` / `documents` count the blocks this notice is the first to tell of: ONCE PER
     *       SESSION PER BLOCK, by the digest of its bytes (the session's announced record — bounded and best effort, so a
     *       block may be told again by a later run, never left untold); a request that was not sent tells of none.
     *  - `"context.tool_schema_removed"` (#2681) — the provider refused a request because of one tool's input schema and
     *    located the tool (the failed turn's `errorKind: "tool_schema_refused"`, `refusedTool`), so the turn was re-sent with
     *    that tool's parameters replaced by an empty object schema, and every later request built from a transcript the
     *    refusal's record stands in sends it so (`engine/llm/rejected-images.ts`; MCP and A2A tools only, at most 8 per such
     *    transcript; a compaction that summarizes the record away returns the schema until the provider refuses it again).
     *    The model can still call the tool. Audience `user`; `detail: { tool, sessionId, runId }`. ONCE PER REFUSAL.
     *  - `"context.messages_omitted"` (#1822) — the request's guard trim, the last resort after compaction declined, failed
     *    or did not get the request under its guard, left the OLDEST messages out of what the model sees (the model reads a line saying
     *    earlier messages were omitted; the session keeps every message): why compaction did not make it fit, what was left out, the way
     *    out. Audience `user`; `detail: { omitted, compaction?, sessionId, runId }`, `omitted` = how many messages that request left out,
     *    `compaction` = the in-turn compaction's verdict (`landed` yet too large / `noop` / `failed` / `paused` / `off` / `suppressed` /
     *    `cut`). ONCE PER TRIMMED STRETCH: told on the first trimmed request a context hook handed on, silent while the requests after it
     *    stay trimmed unless one leaves out more of the person's own messages (`userMessages`), said again after a request that fit (a
     *    provisional view the in-turn compaction replaced says nothing). A shell rendering "the context was not shrunk" reads this code for
     *    that request: the context the model saw WAS shrunk, by omission. A stretch's first request whose room (what the fixed prompt
     *    leaves of the guard line) cannot hold what it kept is said (`omitted` 0 only past the model's window) with `fixedTokens` /
     *    `lineTokens` / `roomTokens` / `neededTokens`.
     *  - `"instructions.withheld"` — an instruction file of the family `NESTED_MEMORY_LANE.declaration` names was not loaded and none of it
     *    reached the model: the Read admission did not pass it, or (a file the lane found by itself) it lies outside its root and the task root (unless the request's `TaskSpec.instructionFamily.externalIncludes` approves it — listed by this notice's `detail.path`).
     *    Audience `user`; `detail: { path, reason, sessionId, runId }` and, ONLY when the refused probe reached the file through an `@` include (any reason), `includedBy` (the including file's resolved absolute path, or the name of the host text that includes it) and `spelled` (the path after the `@` as the engine read it: a `#fragment` dropped, `\ ` read as a space) — a rules directory's file or a family member carries neither; an `outside_its_root` notice also carries `target` (the key the lane's resolution gave the file it judged — links followed; equal to `path` for a plain file named by its real spelling — present whenever that resolution named a key; the value a host sends back in `externalIncludes` to approve that file); a `rule_denied` notice carries `ruleLayer` (the served-read judge verdict's layer word only, never rule text) ONLY when the refusal is the judge's `deny` (resolve-time and read-time refusals carry none; the manifest's withheld row carries none); `reason` closed (`INSTRUCTIONS_WITHHELD_REASONS`:
     *    `rule_denied`, `outside_roots`, `approval_required`, `admission_unknown`, `target_moved`, `outside_its_root`, `unanchored` — an include that names a place, of a host text named by a label or on a leg with no hands (a relative one in a label's text is told to no one), `path` its spelling — and `too_many_texts` — a host text past the first 20, `path` the first such text's name, no include keys). ONCE PER (FILE, REASON) PER SESSION — keyed on the probed `path` + `reason` (+ `target` where the notice has one), across runs (not once per session: another file, or the same file for another reason, is told again; the same path reached both ways is told by the first probe — a refusal for lying outside the roots by its widest edge when the load ends, and only for a file no edge read in that load);
     *    a file an earlier run delivered under an approval stays in the session; the `message` ends with what a person can do about that reason; a delegated leg records it and says nothing. A file that exists but cannot be read (an I/O error, not text, past the read bound) is the operator's line instead (`onError` phase `degraded`, classification `attachment-read`), once per session per path.
     *  - `"instructions.outside_root"` (#4820) — a member the family names was LOADED though its real location (links followed) lies outside its root and the task root, as the reference reads it: audience `user`, attention `inform`, `detail: { path, target, sessionId, runId }` (never the contents), once per session per (`path`, `target`) when its frame reaches the transcript; a delegated leg records it and says nothing.
     *  - `"instructions.truncated"` (#2393) — an instruction file or a deployment's text (`hostRules`) was over the per-file cap and its frame carries only the first part (`cut.note` present — frontmatter or comment stripping alone never raises it): audience `user`, attention `inform`, `detail: { path, keptChars, droppedChars, sessionId, runId }` (`path` = the frame's label: resolved key for a disk file, deployment-supplied name for a host text; `keptChars` / `droppedChars` in UTF-16 code units of the processed text, not counting frame reminders or the cut note), told at the frame's receipt (the moment the frame is in the model's conversation; a send may still be refused after it), once per session per `path` on the leg's announce-once ledger; a delegated leg records it and tells nothing. Known: (a) the ledger keeps 200 digests, oldest out — after eviction the same file cut again is told again; (b) a ledger not persisted before a resume can tell again after it; (c) a notice sink that throws loses that one notice; (d) a cut in a delegated leg stays silent to the person.
     *  - `"instructions.family_undeclared"` (#4179) — a run was prepared with no instruction family declared (`TaskSpec.instructionFamily`
     *    absent, `projectMemory` not `"disabled"`): no run of this deployment reads an instruction file (CLAUDE.md or another) into the
     *    model's context, and the wiring manifest says only `projectMemory: "absent"`. Declare the family (which file names, which rules
     *    directory) to read them. Audience `operator`; `detail: { sessionId }` — the session of the run that first met the absence. ONCE PER NOTICE RECEIVER
     *    (the `onNotice` function: every run, session, delegated leg and further Runner built over the same function says nothing more; with no
     *    receiver wired, once per process at the default seat). A run whose request set `projectMemory: "disabled"` announces nothing: the request already said it.
     *  - `"task.completed_past_limit"` (#4184) — a run COMPLETED strictly past a ceiling the caller declared (`TaskSpec.limits`: a token or cost
     *    ceiling, the walltime window): its last turn answered and owed no further request, so nothing was cut and the verdict stays `completed`
     *    (a run that owed another request fails or parks on its axis, as before, and says so there; a ceiling only met, and a turn cap reached on
     *    the answer, are a run that used its allowance and say nothing). Audience `operator`; ONCE PER RUN, from the one evaluation
     *    `TaskResult.limitCrossed` reads — the notice and the member cannot disagree. `detail: { axis, limit, observed, sessionId, runId, taskId }`;
     *    `axis` ∈ `budget_tokens` | `budget_cost` | `walltime` (a parked run's `resource_limit` words), `limit` / `observed` in the axis's unit
     *    (tokens, micro-USD, ms; see `TaskResult.limitCrossed`). Branch on `detail.axis`, never on the sentence. On a plain run (no
     *    `resourceSuspend`) it rides beside `task.interrupt_unconsumed` (audience `user`: a stop landed after the answer, `origin` ∈ `budget` |
     *    `turns` | `walltime`); a resource-slice run that completed past a ceiling says only this one.
     *  - `"task.verdict_refused"` (#4366) — a leg's verdict call (`StructuredOutput` / `DeclareDone` / `ReportBlocked` / `ObserverReport`, the catalog's `verdict` rows)
     *    was refused at the gate and none was delivered on the run (a deny a cut leaves is no refusal; a paused result carries none). Audience `user`; ONCE PER RUN, exactly when the result carries `TaskResult.verdictRefused`
     *    (the same record). `detail: { toolName, toolCallId, deniedBy, settlement?, attempts, sessionId, runId, taskId? }`. Branch on the result's member.
     *  - `"task.tool_turn_incomplete"` (#1230) — the person's line for a tool turn the model was handed incomplete, beside
     *    the note the model itself reads. `detail.cause` (closed `TOOL_TURN_INCOMPLETE_CAUSES`): `truncated` — calls not received
     *    in full (arguments cut, or open at a frame the brain could not read or place), dropped (they did not run); `unnamed` — calls that arrived with no tool
     *    name, dropped the same way; `bad_frame` — streamed response frames
     *    that could not be read, dropped (the response may be missing content); `missing_result_synthesized` — a
     *    call of this run with no recorded result, which the request view closed as interrupted, outcome unknown (the
     *    `missing_result` repair above; a call that went unanswered before the run began is the transcript's history and
     *    is on that operator line only). Audience `"user"`; `detail: { cause, count, outcome?, finishReason?, inputTokens?,
     *    outputTokens?, contextWindow?, maxTokens?, reasksSoFar?, toolCallIds?, sessionId, runId }` — the five turn facts
     *    and `reasksSoFar` on `truncated` / `unnamed` only (#4716): `reasksSoFar` the re-asks this run's malformed-tool-use
     *    retry made before the turn the line is about (on a Runner run; other recovery lanes' continues are not counted);
     *    `count` the calls (or frames) of that cause in the turn or request that first showed it. Once for the cause that
     *    first showed it; `toolCallIds` on `missing_result_synthesized` only, each id in the provider echo shape (a stored
     *    id outside it is not shown; `count` still counts it). Closed-set words, a count and call ids only: never a tool
     *    name, an argument or the note's text. ONCE PER RUN PER CODE PER CAUSE. 7.71.0 narrows it to dropped calls whose turn's
     *    own message says what became of them (#1640), attention `inform`: `outcome` `terminal` (the lane failed the run on them,
     *    `model_output_invalid`; KL-4808-a) or `reissued` (the turn goes on and the next request asks the model to re-issue them).
     *  - `"task.tool_turn_unrecovered"` (7.71.0) — the rest of that line, attention `act`, `detail` without `outcome`: dropped
     *    calls whose turn states no outcome (a refusal, an abort, a completed turn with nothing to run, a torn stream; the
     *    sentence stops at "so they did not run"), `bad_frame`, `missing_result_synthesized`.
     *  - `"config.read_face_deployment_clamped"` (#237) — a deployment-wide `readFace: "open"` is not
     *    in force beside a read-only (verifier) mount: it clamps to "roots" without throwing
     *    (stricter-wins; the clamp verdict stands, only its occurrence was undisclosed). Announced
     *    once per `onNotice` SINK at the prepare station (the verifier lane would otherwise repeat it
     *    every spawn; the sink — not the deps object — is the unit because the Runner rebuilds its
     *    deps and `runTask` builds a Runner per call), unwired console arm once per process;
     *    a library-direct `createHandsToolkit` mount announces at toolkit creation (one per mount,
     *    through the band-local `HandsToolkitOptions.onNotice` seat, absent ⇒ `console.warn`);
     *    `detail: { seat, declared, inForce, cause }`.
     *  - `"config.write_face_deployment_clamped"` — the write seat's twin of the line above, with the
     *    same stations, the same once-per-sink ledger (its OWN ledger row) and the same detail shape. The
     *    cause differs in prose only: that mount carries no write faces at all.
     *  - `"config.tool_model_gate_removed"` (design/277) — the model gate trimmed default-mounted
     *    scaffold entries from a task's roster. One notice per (model, class), de-duplicated once per
     *    `onNotice` SINK on the (modelId, class, canonical sorted removed-name set) line (same unit
     *    as `config.read_face_deployment_clamped`: two deployments hosted in one process each hear
     *    their own trim; unwired console arm once per process) — same class with a different removal
     *    shape is a distinct fact and announces again;
     *    `detail: { modelId, gateClass, removed, restore }` (`restore` names the three valves).
     *  - `"config.tool_model_gate_unknown_class"` (design/277) — a `ToolSpec.modelGate` tag names a
     *    class the merged gate table has no row for: the tag is inert (fail-open — the tool stays
     *    mounted) and this is its loud half (a tag typo must not silently become "never gated" with
     *    nobody told). Once per `onNotice` sink per class (console arm once per process);
     *    `detail: { gateClass }`.
     *  - `"config.tool_model_gate_env_invalid"` (design/277, the NOTICE dialect of the same fact the
     *    refusal code carries) — `SEMA_TOOL_MODEL_GATE` holds a value outside `on|1|true|off|0|false`
     *    in a seat where it is NOT in force (nothing this prepare would gate): announced once per
     *    `onNotice` sink per value (console arm once per process) instead of lying in wait; where the
     *    value IS in force the prepare refuses with the same code as `TaskResult.errorCode` (one
     *    fact, one code, two loudness dialects); `detail: { raw }`.
     *  - `"config.artifact_host_invalid"` — `RunnerDeps.artifactHost` is wired but its `capabilities()`
     *    declaration fails one of the seat's invariants (see `ArtifactHostCapabilities`), or its `onMount`
     *    threw: the `Artifact` tool is not mounted for the task and this is the loud half (an absent seat
     *    is silent; a broken one must not look the same). Once per prepared leg;
     *    `detail: { problem, sessionId, runId }`.
     *  - `"config.execution_env_capability_invalid"` — an env (any env, local or remote) does not declare a key of its
     *    REQUIRED capability block (`ExecutionEnvCapabilities`: `isolation`, `suspendable`, `sharesProcessTable`,
     *    `canonicalPathAuthoritative`, `hostLocalPaths`, `externalContentTarget`, `io`, `keepsReadFloor`) as a boolean — absent
     *    (`valueType: "undefined"`), another type, or unreadable — and each reader takes that key's safe side, which the
     *    sentence names; or the block itself is not an object or cannot be read (`key: "capabilities"`), or an optional
     *    seam method is present but not a function (`key` = the method). Once per key per run, at admission;
     *    `detail: { key, valueType }`. Also minted for `withheldEnv` (`key: "withheldEnv"`) when neither a list of findings nor `"unknown"`,
     *    and for `inheritEnvForms` (`key: "inheritEnvForms"`) when malformed or unreadable (read fail-closed as `[]`), once per run at a shell call.
     *  - `"config.execution_env_failure_contract_broken"` (#4740) — the environment broke its failure contract (`execFailureBreachLedger`,
     *    `src/core/exec-outcome.ts`, where the breaches, the scope and the detail are); `detail: { breach, code, face, sessionId? }`.
     *  - `"config.read_deny_floor_unkept"` (#2936) — the run's read-deny table holds rows and its execution environment does
     *    not declare it keeps the byte floor (`capabilities.keepsReadFloor`): the engine refuses what a command names, but a
     *    recursive read under a root reads the files below it there, deny rows included. The notice dialect of the refusal
     *    `RunnerDeps.readDenyFloorRequired` turns it into (the prepare then fails with the same code, whoever's the rows are); never minted for an
     *    empty table or an environment that keeps the floor (the Stub of a run without hands keeps it by refusing every
     *    start), nor for a table whose rows are all the deployment's (its active built-in tiers and `RunnerDeps.readDenyPatterns`: the caller brought none, so it is not the session user's to hear and nothing is recorded as told — the run's record `TaskResult.readDenyFloor` still carries the fact). Told while the fact holds and not again — the delivery throat's fact key ({@link NOTICE_FACT_KEY}) is the code itself, judged against the
     *    leg's own session's record (each delegated child on its own environment and its own session); a leg that judged tables and found
     *    every one kept or empty ends the fact ({@link endNoticeFact}), so a later leg that finds it unkept is told again — and once per construction of a
     *    library-direct band that compiles its own table. Every run's own fact stays on its wiring manifest
     *    (`WiringManifest.readDenyFloor`). Audience `user` (the session's own reads can reach a forbidden file's bytes; the way out stays the operator's); `detail: { rowCount, callerRowCount, deploymentRowCount, sessionId?, runId? }` — the table's rows by whose they are, `rowCount` their sum (a band's are all `callerRowCount`); both ids on a run's notice, neither on a library-direct band's (no session).
     *  - `"config.read_floor_confinement_unavailable"` — a Node environment was asked to confine its starts to the floor
     *    (`readFloorConfinement: "os"`) and this host cannot (not macOS, or the seatbelt base does not apply here): the
     *    environment declares it does not keep the floor, and the run's own judgment (`config.read_deny_floor_unkept`)
     *    follows. Once per construction, at construction; `detail: { reason }`.
     *  - `"config.inherit_env_declared_late"` — a Node environment's `inheritEnv` list names a variable that a process-level
     *    own-credential declaration (`declareWithheldEnv`) made after the environment was built now withholds: every shell
     *    child the environment would start is refused, the command's failure carrying the same sentence. Said once per
     *    environment, at the first refused start (a read of the environment announces nothing); audience `operator` (the
     *    order of two wiring steps the deployment owns); `detail: { index, name }` — the entry, never a value. The sentence
     *    names the way out (build a new execution environment). The environment's own seat hears it once; a run on that
     *    environment also hands it to the Runner's seat (`RunnerDeps.onNotice`) — the same words, once per run, as a tool call
     *    ends — with `sessionId` and `runId` added to the detail: `{ index, name, sessionId, runId }`.
     *  - `"config.model_shell_unmounted"` — a leg with hands on an I/O environment and no start for model-written shell text ready
     *    (`ExecutionEnv.modelShell` undeclared or unavailable): Bash, Monitor and background commands are not offered; once per leg;
     *    audience `operator`; `detail: { reason: "undeclared" | "unavailable", cause? }` (built by `modelShellUnmountedNotice`).
     *  - `"config.shell_state_env_dropped"` — variables of `SHELL_STATE_ENV` a start did not pass (configuration's, and the host process's
     *    own by each row's rule), as the call that started it ends, each once per run; audience `operator`; `detail: { keys }`, names only.
     *  - `"config.command_sandbox_unavailable"` — the task requires a command sandbox (`TaskSpec.sandbox.enabled`) with
     *    `failIfUnavailable: false`, and its execution environment keeps none (`capabilities.commandSandbox` is not true): the
     *    run proceeds and its commands run unsandboxed. Under `failIfUnavailable` (its default) the prepare fails with the same
     *    code instead. Once per run, at prepare. Audience `user` (the person asked for the sandbox and does not have it);
     *    `detail: { reason, sessionId?, runId? }`.
     *  - `"config.secret_env_scrubbed"` (#1081) — the D1 fail-closed `scrub` policy, `"all"` (the `SEMA_` slots), or the deployment's
     *    own credentials (`declareWithheldEnv`: a declared name, or a value equal to a declared or engine-held
     *    credential value), withheld one or more keys from a spawned child's environment (a tool's shell, an
     *    oracle gate, or a language server).
     *    Once per PROCESS, shared by every scrub site ({@link import("./secret-env.js").announceSecretEnvScrub});
     *    `detail: { names, ownCredentials? }` — every withheld key's name, never a value; `ownCredentials`, present
     *    only when one was withheld, the subset that is the engine's own credentials, by name or by value, whichever
     *    rule withheld it (withheld under any policy, `"all"` included).
     *  - `"inherit_env.names_withheld"` (#1963) — the same fact for the person whose run drives a tool shell: the variables
     *    of the engine's environment that shell does not receive (`ExecutionEnv.withheldEnv`), the scrub's half (the run's
     *    `inheritEnv` hands them on; `"all"` not the `SEMA_` slots) and the engine's own credentials (no policy does). Audience `user`. Read as each
     *    call to the engine's own shell tool starts, on every leg (the answer can grow during a run: a credential the engine
     *    takes in when it first routes a model is withheld from the next child); once per SESSION per fact — the names
     *    under their reasons, the ways out offered, the leg; not the wording (the session's announced record). A delegated leg's goes to the delegation tree's root session and names the leg
     *    (`sourceSessionId`, `agentId?`, #3650). `detail: { state, names?, ownCredentials?, remedies?, sessionId, sourceSessionId?, agentId?, runId? }` — `state` `"withheld"`
     *    carries the operator row's split (names only, never a value); `"unknown"` (the environment answered `"unknown"`)
     *    carries no names and says the engine could not determine them. `remedies` (#4198, additive) lists the ways out as `{ kind }` ({@link import("./secret-env.js").WITHHELD_ENV_REMEDY_KINDS}); absent = none (all own credentials). `ExecutionEnv.inheritEnvForms` restricts only the sentence's inheritance forms (`detail.remedies` unchanged).
     *  - `"config.credential_not_withheld"` (#1816) — a credential value the engine was handed (a brain's key or credential
     *    header, a model entry's or a peer's credential header, a consolidation seat's key) is no credential (a placeholder
     *    such as `EMPTY`, fewer than eight characters, one character repeated): it is used as given, but a variable holding
     *    the same string is not withheld from a spawned child. Once per PROCESS per value
     *    ({@link import("./secret-env.js").holdOwnCredentialValues}); `detail: { reason }` — the kind, never the value. Delivered
     *    to `RunnerDeps.onNotice` from the `new Runner` receipt; the intakes with no seat in hand (a brain's construction,
     *    a request's route reading, a peer's dial, a directly built distiller seat) go to the default seat ({@link setDefaultEngineNoticeSeat}), else `console.warn`.
     *  - `"config.cross_boundary_posture_undeclared"` — a run whose tree executes on a target device (armed) on a deployment that
     *    configured no `RunnerDeps.crossBoundaryPosture`: the permissive `"single_user"` reading is in force. Once per run;
     *    `detail: { sessionId, runId, taint }` — `taint` lists the tree's taint bits
     *    ({@link import("./cross-boundary-taint.js").CROSS_BOUNDARY_TAINT_BITS}). Minted by
     *    {@link import("./cross-boundary-taint.js").crossBoundaryPostureUndeclaredNotice}. Audience `operator`.
     *  - `"config.cross_boundary_record_unwritten"` — a session's cross-boundary record the engine owed could not be written (the
     *    store threw, or answered with no entry id) and refused nothing: on a tree that is not governed no judgment reads the record;
     *    on a governed tree it stays owed — a prepare's by the leg's next write — and once none lands (a settle's failure is the leg's
     *    last write; a parked leg's suspend record landed before it) the next leg reads the content after the newest record as off-target,
     *    which the sentence says for the phase that failed. Once per state a leg could not write;
     *    `detail: { sessionId, runId, phase, governed, cause }` (`phase`: `prepare` / `exit` / `suspend` / `settle`, where that state
     *    first failed). Minted by {@link import("./cross-boundary-taint.js").crossBoundaryRecordUnwrittenNotice}. Audience `operator`.
     *  - `"config.plaintext_origins_admitted"` — the default plain-http admission list (`RunnerDeps.plaintextOrigins` not written, the
     *    posture not `multi_tenant`) admitted a credential-carrying plain-http send for the first time on its Runner: the origin, the
     *    list, the undeclared posture, how to narrow it and the outbound-proxy corner. Once per Runner; `detail: { origin, entries, source, postureDeclared }`. Minted by
     *    {@link import("./plaintext-origins-seat.js").plaintextOriginsAdmittedNotice}. Audience `operator`.
     *  - `"config.second_engine_copy"` — a second copy of the root export was evaluated beside a registered one: `engine-copies.ts` (its message, detail and seat).
     *  - `"config.permission_mode_unavailable"` — the permission mode a task requested is not the mode the leg runs
     *    under: the deployment denies it (`by: "operator_deny"` — `RuntimeCaps.bypassPermissions` / `autoMode` is
     *    `false`), a requested `auto` has no classifier face (`by: "face_absent"` — neither the leg's deps nor its chain carry
     *    one), or a child's declaration was folded under its parent's ceiling (`by: "inherited_ceiling"`). A CHILD's fold, of
     *    any of the three, is minted on the PARENT's stream too (`childSessionId` beside the parent's `sessionId` — a child's
     *    own manifest is not shown to the person). The leg runs in `effective` (always `default` for the first two arms),
     *    announced once per leg and once per steer that folds; `detail: { requested, effective, by, sessionId, runId,
     *    childSessionId? }` — `requested` is the word the fold folded (a child that requested nothing folds the word it
     *    inherited; the sentence says "(inherited)"). Audience `user`.
     *  - `"config.permission_mode_invalid"`, `"config.spec_retired_key"` and `"config.shell_gate_value_retired"`
     *    are ERROR codes, not notices (named here only to keep the mode family's spellings
     *    in one place): a `permissionMode` word outside the closed set (on the spec or on a checkpoint row), a spec
     *    carrying a retired mode key (`autoModeRequested`, `approverPosture`) and a `shellGate` value other than
     *    `"always"`. Each is a door refusal: the
     *    code rides the thrown error (the run fails, or the resume is refused) and never crosses
     *    {@link deliverEngineNotice}, so all three are deliberately absent from {@link ENGINE_NOTICE_CODES} /
     *    {@link NOTICE_AUDIENCE}, like `config.deps_retired_key`. A consumer diffing its own table against the
     *    catalog must not add a row for them; it reads them on the error's `code`.
     *  - A mode's RELEASE of an ask (`bypassPermissions` lets a call run that a person would have been asked about) is no
     *    notice: it is the released call's own record, `tool_end.gate.disposition.released` (`ModeRelease`: the mode, the
     *    class of the question, `readUnestablished` naming the read-deny table that could not be applied to what the call reads),
     *    and an Artifact shared read's result card (`details.released`). The two codes that once told it
     *    (`permission.ask_released_by_mode`, `permission.read_deny_unapplied`) are retired: neither is a member of
     *    {@link ENGINE_NOTICE_CODES}, and a consumer table must not keep a row for them.
     *  - `"permission.rule_store_unavailable"` — the person's persisted permission rules could not be read (a read
     *    failure, a corrupt or unreadable store, a read that did not answer in time), so that read's rows were SKIPPED:
     *    none of their allow, ask or deny rows took part in the decisions it served. Told under every mode (at `"call"`, class
     *    `rule_unreadable`: asking modes ask, a headless run refuses; under a mode that answers the class unasked — auto's classifier, the bypass
     *    release — the sentence states that cost, and the operator's notice below, `gate.disposition` `released` / `asked` and the trace also record it); at `"prepare"` the
     *    run's path tables lack the rows for the whole run. `detail.at` names the read that found it first: `"prepare"` (the path rows the run's file and
     *    shell checks take at run start — the next run reads them again) or `"call"` (one call's own rule check — every
     *    later call reads again, so the rows apply as soon as a read succeeds). Told once per SESSION per fault set — a fault first found at a
     *    call, once per run — through the session's announced record (`AnnounceOnceLedger.oncePerSession`): the first read that finds it tells it, a later run of
     *    the same session over the same fault set says nothing, a different fault set is told again, a run with no session record to read tells
     *    it once per run, and a delegated agent's child (a session of its own) tells it once itself; the trace keeps every read's line (`permission.rule_store_unreadable`).
     *    `detail: { at, sessionId, runId, faults }` — `faults` one `{ sources, reason }` per partition the read could not read (a read
     *    that failed whole: one over every partition it took out): `sources` the sources of the person's rules it took out (`user` and
     *    `project` are the durable partition's, `session` the session's), `reason` one of `not_readable` (the account is not allowed to
     *    read the folder or file), `read_failed` (any other failed read), `unsafe_permissions` (the folder is writable by group or
     *    others), `owner_mismatch` (the folder is another account's), `damaged` (the stored rules, or what holds them, are damaged or not in
     *    a form this engine reads: for a file store a link, not an ordinary file, bytes that are no rule file, or a marker that is none), `later_grammar` (a newer engine wrote them), `no_answer` (the read did not answer in time) or `unclassified` (a
     *    store that states none of these). The sentence names the partition, the cause and the repair; no path rides the notice (the store's own disclosure line carries where). Audience `user`.
     *  - `"permission.rule_store_unreadable_relaxed"` — the same fact where the leg's mode answers the class with nobody asked (`auto`, `bypassPermissions`), beside the person's notice above; once per SESSION per (fault set, mode) — a fault first found at a call, once per run — `detail: { at, mode, sessionId, runId, faults }` (as above; no rule text, no path). Also minted, under those modes only, for deny or ask rows whose rule itself could not be read (`EffectivePermissionRules.unreadableRows` other than `as_read`): the calls they may reach take the same class (`faults`: `damaged` over the sources their scopes name). Audience `operator`.
     *  - `"permission.revival_root_policy_unrestated"` (7.71.0) — a resume on the runner that holds a parked agent's chain live (it registered it when the agent last parked there: its spawn, or an earlier revival there), handed no root task policy (`RunInternals.rootPolicy` / `parkedResume.rootPolicy`) for a chain that carries the root task's own layer: the chain it runs under keeps that layer as registered (on another runner the same resume is refused for it). Said on the resuming runner's `onNotice` the moment the resume's claim is won, before the leg starts — an attempt refused before the claim, or one that loses it, says nothing; a start that fails after the claim and reopens the row says it again on the next won claim (no per-token suppression). `detail: { sessionId }` (the revived leg's). Audience `operator`, attention `act`.
     *  - `"config.entries_not_applied"` (7.70.0) — an entry the person wrote did not apply. One frame per kind (`detail.kind`, closed
     *    `ENTRIES_NOT_APPLIED_KINDS`), each told as its own mint decides and in its own sentence; `detail: { kind, entries, count, identity,
     *    …routing }` — `entries` at most the first eight (`ENTRIES_NOT_APPLIED_SHOWN`), each with `entry` (what the person wrote, as written:
     *    a rule's text through `noticeRuleText` — at most 1 024 code points, then the truncation mark; `(unreadable)` for a row whose text
     *    could not be read —, a server's name, a model word) and the kind's own members; `count` all of them; `identity` an opaque digest of
     *    the whole set (equal for the same set). Audience `user`, attention `act`. The kinds:
     *      · `stored_rule_row` — the person's store served rows that take no part in this run's checks (a foreign writer's or a hand
     *        edit's, in practice): project-scoped rows whose scope root is not a complete absolute path — a deny or ask row among them
     *        protects nothing — and allow rows whose text is not the canonical spelling of their stored fields, or a member of which
     *        could not be read as the type it holds (they allow nothing), until rewritten or removed; and rows of either personal
     *        partition a member of which could not be read (`EffectivePermissionRules.unreadableRows`: a deny/ask whose tool, match and
     *        path read, or whose text says them, applies as written; one neither of whose spellings reads — or an entry whose behavior
     *        word could not be read — stands at its strictest reading so no allow clears a call it may reach). Once per run, by whichever
     *        read met them first; one sentence per cause present. Each entry: `reason` (`scope_root_not_absolute` / `invalid_rule_text`
     *        / `metadata_mismatch`), `scopeRoot?` (scope rows only, neutralized and bounded), `member?` (the first member that could not
     *        be read), `behavior?` (a deny or ask row whose behavior word read), `element?` (host-supplied views only: `{ partition,
     *        index, read }`). Left-out rows first. Routing `sessionId`, `runId`.
     *      · `rule_text_unreadable` — a leg's own tool policy left out rules a person's settings layer (`user` / `project`) wrote whose
     *        text the compiler cannot read (`ToolPolicy.skippedRules`); a deny or ask rule among them is NOT in force, each in its own
     *        clause. At prepare on every leg, for rules no ancestor of its delegation chain holds; once per session per set. Each entry:
     *        `reason` (the issue code), `behavior`, `layer`. Routing: the leg notice's (`sessionId`, `sourceSessionId?`, `agentId?`), `runId`.
     *      · `mcp_injection_dropped` — an MCP server declaration was NOT mounted (request-lane drop at host intake, or agent-definition
     *        entry shadowed at spawn; minted through `mcpInjectionDroppedNotice`). One entry: `entry` (server name), `reason`
     *        (`MCP_INJECTION_DROP_REASONS`), `field?`, `agent?`. Routing `sessionId` (required at the mint; root session for agent drops).
     *      · `model_word_unknown` — a role seat (other than `default` and `classifier`) names a model word the catalog does not hold, or a
     *        tier the deployment's tiers leave absent, so the seat is read as an unset one and the run goes on. Once per SESSION per
     *        (seat, word, cause), root legs only. One entry: `entry` the word (bounded), `seat`, `role`, `reason` (`unknown_model_ref` /
     *        `tier_unbound`), `fallback` (the role's chain). Routing `sessionId`, `runId?`.
     *      · `allow_entry_inert` — allow-list entries that grant nothing (a skill's `allowed-tools`, the request's list: once per prepared
     *        task; the deployment's: once per Runner, at construction, no session). Each entry: the list (`source`, `skill?`, `list?`) and
     *        its reading (`reason` and the inert members). A skill's `disallowed-tools` entry that refuses nothing is
     *        `config.skill_deny_unreadable`.
     *      · `session_rule_unread` / `session_rule_named_no_tool` — a session's stored allow list (`toolAllow`, `RunnerDeps.sessionPolicyStore`)
     *        written in an earlier rule grammar holds entries this engine's grammar reads as no rule (they admit nothing), or that named no
     *        tool in grammar 0. Once per session per entry set per rules session. Each entry: `reader`; frame members `bucket`,
     *        `storedGrammar`, `rewrite` (`{ by: "rewrite_in_current_grammar", stampsGrammar }`), `rulesSessionId` with `sessionId` (both
     *        absent on a hand-built `createSessionRulePolicy`'s notice). · `setting_not_applied` (7.71.0) — see `src/core/shared-artifact-reads.ts`.
     *    RETIRED here (BREAKING, named; `NOTICE_CODE_LINEAGE`): `permission.rule_row_dropped`, `permission.settings_rules_skipped`,
     *    `mcp.injection_dropped`, `model.role_defaulted` and `permission.allowed_tool_not_granted` — each fact is one kind above (the
     *    last one's refusing side `config.skill_deny_unreadable`); last minted by 7.69.1.
     *  - `"config.skill_deny_unreadable"` (7.70.0; the spelling of the refusal the skill's activation meets) — a skill's `disallowed-tools`
     *    holds entries that refuse nothing, so the skill does not activate: a refusal that reads as nothing is not dropped. Once per
     *    prepared task. `detail: { entries, count, identity, sessionId? }` — each entry as `allow_entry_inert`'s. Audience `user`, attention `act`.
     *    Before 7.70.0 the refusing side of `permission.allowed_tool_not_granted`.
     *  - `"config.session_rules_earlier_grammar"` — a session's stored deny list (`toolDeny`) was written in an earlier rule grammar and
     *    holds entries this engine's grammar reads as no rule, so those rules refuse every call until they are rewritten. The message
     *    names the session, the bucket, the entries (the first five, the rest counted) and the way out. Audience `user`, attention `act`.
     *    Once per session per entry set per bucket per rules session (the session's announced record; runner/earlier-grammar-notice.ts).
     *    `detail: { bucket, storedGrammar, entries: [{ entry, reader }], rewrite: { by, stampsGrammar }, rulesSessionId, sessionId }` —
     *    `entry` through `noticeRuleText`, `reader` `no_rule`; `rulesSessionId` the session whose rules they are (an ancestor's on a
     *    delegated child), `sessionId` the run that read them — both absent on the notice a hand-built `createSessionRulePolicy` given no
     *    `onEarlierGrammar` tells through the default seat or a process line. 7.70.0 narrows it to this bucket: an allow-list entry so
     *    read is `config.entries_not_applied`, a revised meaning the next code.
     *  - `"config.session_rules_reread"` (7.70.0) — the same stored rules hold entries whose meaning a grammar revision after the row's
     *    changed: the entry keeps its writer's meaning, or takes this grammar's when its writer's could not read it, and the message says
     *    which, with both, and the way to this grammar's. Same `detail` (`reader` `grammar_revised`) and dedup unit. Audience `user`,
     *    attention `inform`.
     *  - `"config.legacy_tool_name"` — a tool policy's `deny` or `ask` list (the run's own policy, the session's stored rules, or the rules
     *    an ancestor's session handed down) holds names of tools the engine retired with NO successor (`TaskOutput`, `TeamCreate`, …: the
     *    retirement table's `removed` and `folded` lines). Such a name reaches no tool in any roster, so the prepare-time name audit leaves
     *    the entry out and the run goes on; this says so, because the person who wrote it believes it guards a tool. A retired name that
     *    was RENAMED (it has a successor the entry used to guard) is not here: it is still refused at prepare with the name to write, and
     *    the same code rides that thrown error. Audience `user`. Once per audited layer per prepared task, and only when the run goes on.
     *    `detail: { layer, entries: [{ field, entry, layer, guidance, source? }], total, sessionId }` — `layer` ∈ `caller_policy` / `session_rules` /
     *    `ancestor_session_rules` / `task_selector` (a task's tool-name lists) / `skill_table` (a skill's `disallowed-tools`; `source` names the list's
     *    owner), `field` ∈ `deny` / `ask`, `guidance` the retirement table's own line, `entries` unique by (field, entry, source) in scan order (at most 32), `total` every one.
     *  - `"config.toolpolicy.unmatched_names"` — a tool-name list the REQUEST's own seats wrote (a delegation definition's `allowTools` /
     *    `denyTools` in `TaskSpec.agents`, the run's own `allowTools` / `excludeTools`) holds a name no tool of the list's universe answers to
     *    (a misspelt name, a server this task does not declare). The entry is kept as written and the run goes on; this says so, because the
     *    person who wrote it believes the name guards or grants a tool. Audience `user`. One code, two faces: the operator reads the same
     *    sentence on `onError` (`phase: "config"`, the same `code`) — and ONLY there when the list is the deployment's (a delegation tool's
     *    own lists, a deployment's tool policy: the policy name audit's advisory carries the code on that channel alone). Once per session
     *    per entry. `detail: { where, side, entry, nearest?, sessionId }` — `where` names whose list it is, `side` ∈ `allowed` / `denied`,
     *    `entry` the name as written, `nearest` the nearest name a tool of the universe answers to when one is within two edits.
     *  - `"config.agent.unknown_tool"` — an entry of a DEFINITION's `allowTools` / `denyTools` that no tool name can be (`"Bash("`, `"a b"`,
     *    `""`, `"a b(x)"`: the rule syntax reads no name in it). The run goes on; the definition cannot be delegated to until the entry is
     *    fixed — the delegation to it is refused with this same code (`details: { error, reason: "grammar" }`), where it is used. Audience
     *    `user`: the person who wrote the definition believes the entry bounds the agent. One code, two faces: the operator reads the same
     *    sentence on `onError` (`phase: "config"`, the same `code`, `detail.reason`) — and ONLY there when the definition is one a
     *    delegation tool the deployment mounted carries. Once per session per list, naming its first such entry. `detail: { where, side, entry, reason: "grammar", sessionId }`.
     *  - `"config.durable_gate_unavailable"` — a durable-approval MANDATE is in force on a leg with NO
     *    park facility (no checkpoint store; or, for the entitlement, a delegated leg that cannot be resumed — `cause` below):
     *    the per-principal `forceDurableGate` entitlement, or the task's own
     *    `durableApproval` opt-in with no live approver seat (`durableMandateSourceOf`, the predicate the
     *    leg's children inherit). A mandate with no park facility cannot be honored: no ask of the leg can suspend, so each one resolves on the LIVE
     *    chain — a live approver / question face answers in-stream, and with none the ask is denied
     *    fail-closed — and NO durable approval record is written. The ask routing itself is not
     *    changed by the notice (a store-less leg never could park); the notice is its loud half,
     *    disclosed before the first ask of the leg. Audience
     *    `"user"` (the person whose asks will not be recorded is entitled to that; the operator hears
     *    it through the sink as always). Once per prepared task leg — a resume or a delegated child
     *    is its own leg and says so again; `detail: { sessionId, runId, principal?, cause, source, notResumableSource?,
     *    liveApprover, liveQuestionFace }` — `source` is `"force_durable_gate"` or `"durable_approval"`
     *    (which mandate is unhonored; the recovery differs); `cause` is `"no_deployment_store"` (the deployment wired none),
     *    `"task_store_disabled"` (`TaskSpec.checkpointStore: "disabled"`, the per-run off switch, on a leg whose deployment may well have a
     *    store — set by the host on its task, or by the engine on every fork child and the legs under it: the fix is the task's, or a non-fork delegation;
     *    a leg nobody resumes reads the next word first), or `"leg_not_resumable"` (the entitlement binds a leg whose
     *    parks nobody resumes — a synchronous or fork child, a background child whose lane cannot park; read before the store, so
     *    such a leg reads it with or without one. Such a leg parks no ask and nothing answers in its place: every permission ask is refused without consulting the
     *    approver, a question is refused, not shown — unlike the two store causes, whose asks resolve on the live chain);
     *    `notResumableSource` (`"lane"` | `"host"`, {@link import("./park-resumability.js").ApprovalParkNotResumable}): who says the leg's parks cannot be resumed — an engine lane that
     *    holds no resume seat for the leg, or the host's own `durableApproval: false` — the word the sentence's way out is chosen by, for a consumer that
     *    picks its own sentence for it. Present ONLY on `cause: "leg_not_resumable"`; absent on the two store causes, and absent on an engine from before
     *    this member (7.68.x): a reader takes absent as "the source is not known", never as a source of its own;
     *    `liveApprover` /
     *    `liveQuestionFace`: whether a live seat will EFFECTIVELY answer the leg's permission asks /
     *    questions in-stream (a delegated child under an inherited content mandate reads `false`
     *    even with a face wired — the marker withholds the question), or the fail-closed deny will. On `cause: "leg_not_resumable"`
     *    both are always `false`, and mean "no online seat will answer this leg's asks": the leg refuses every ask without asking anyone,
     *    whether or not an approver or a question face is wired on it — NOT "no approver was connected".
     *
     *  - `"task.user_steer_undrained"` / `"task.user_followup_undrained"` (#259) — user steers /
     *    follow-ups whose receipts said "queued" were still in their queue at agent_end: the run
     *    ended before any turn could drain them. One notice PER family (a consumer routing on `code`
     *    alone must not mistake a stranded follow-up for a stranded steer — same split as the settled
     *    frame's two count keys). They are NOT redelivered (a steer aimed at a finished run must not
     *    fire at the next one — unlike ENGINE notes, which pend per session); the loud half of the
     *    #257 contract's "accepted = enqueued, not consumed" sentence; what a host that re-sends one reads back is
     *    `notice.user_input_undrained.handoff` ({@link undrainedUserInputNotices});
     *    The words a person wrote on an approval card (a durable `policy_ask` allow's `feedback`) that did not reach the
     *    model are counted in the SAME account under the steer code — one more row of that family, `detail.kind:
     *    "approval_feedback"` (absent on every other row) — when the message carrying them never committed and the row did not come back
     *    (a returned row does not carry them: its next decide is fresh); when the pause tried to carry them forward and the parked-steer
     *    carrier refused, the row also names the store's refusal as `detail.carry` (`steering.invalid_content` | `steering.queue_full`) and
     *    its sentence says so (`cause` stays `leg_end`: the leg ended with them owed — the closed set has no carrier words);
     *    `detail: { <countKey>, cause, inputIds?, kind?, carry?, taskId?, sessionId?, runId? }` (`inputIds` — on the `leg_end` rows of the two
     *    families: the id of EACH input the count stands for, in the order the run would have served them (queue order: an
     *    `immediate`-tier input leads the ones accepted before it), the same key value the live `human_input` frame
     *    carries as `inputId` and a parked entry as `inputId`; present only when the ids name exactly the counted inputs — a lane
     *    where any counted input carried none reports its count alone, never a partial list — and never on an `approval_feedback` row,
     *    whose words are no input; a serving layer's arm carries it by the same rule — `crashed` does not, `park_expired` names the
     *    parked entries' ids — and carries no `runId`) (the `code` and the `countKey` of each family are the
     *    table {@link USER_INPUT_UNDRAINED_FAMILIES}, keyed by the lane the input was queued on — `injectionLaneOf` — and the
     *    minter writes exactly those; `cause` on both rows, closed `USER_INPUT_UNDRAINED_CAUSES`: `"leg_end"` — this engine's arm, the
     *    leg ended with it still owed, and the only one it mints; every other member (`"crashed"`, `"park_expired"`) is minted by the
     *    SERVING LAYER before the session's next run, for a loss this engine's process was not there to count, the family picked by
     *    the LANE the input was queued on (a `later` steer rides the follow-up lane). One code per family for every arm, so a consumer de-duplicating on `code` keeps
     *    one row; `sessionId` = #433's routing half for these two `"user"`-audience rows; `runId` = #499's
     *    per-run identity, the key this account is actually about — see
     *    {@link undrainedUserInputNotices}; all omitted when the caller has none, never fabricated). A delegated child
     *    leg is announced on its PARENT's session as well — the direct parent only — as a second row per family,
     *    `detail: { <countKey>, cause, taskId?, sessionId: <the parent's>, childSessionId }` (no `runId`: nothing
     *    carries the parent's), message tail `(a child leg, <childSessionId>)`; `childSessionId` present = a child reported it.
     *    Per-run, at most once per family (the terminal sweep is a single site) — which is why
     *    `taskId`/`sessionId` cannot key it: both answer the same value for two runs of one session.
     *    ① The family fires on the INTERRUPT path too, `abort()` being barred from emptying either queue
     *    before agent_end can count it. ② On a DURABLE PARK the verdict is
     *    settled at the run tail instead of at agent_end, because the tail first carries the still-
     *    undelivered input onto the committed checkpoint's parked-steer queue (the resume delivers it)
     *    — what is announced is the remainder that could NOT be carried, so a fully-migrated park says
     *    nothing at all and a queue-full / no-longer-pending row still says exactly what was lost.
     *
     *  - `"task.undelivered_input_dropped"` — a leg ended holding inputs another author wrote (an observer's report relayed to the child it
     *    watches) that it accepted and never read: they are dropped, never carried across a pause and never on the person's account above,
     *    so the person is told what their session lost. Audience `user`. One loss, two faces: the host's `onError` line (`phase: "degraded"`,
     *    classification `undelivered-input-dropped`, once per leg end) is the operator's, this notice is the person's. Told once per SESSION —
     *    the unit is the leg's own session (its announced record, the digest keyed on its session id): a later leg end on the same session
     *    says nothing more. The cap is best-effort, in the one direction the announced record always errs: a write the leg's exit could not
     *    persist, an older park mirror a resume reads, a second Runner on the session, or a record past its bound can tell a LATER loss again,
     *    never drop a first one. Addressed as every user-face notice of a leg is (`noticeAddressOf`): its own session on a top-level leg; the
     *    delegation tree's root on a delegated one, `sourceSessionId` / `agentId` naming the leg. `detail: { authors, sessionId, sourceSessionId?, agentId?, taskId, runId }` — `authors`
     *    counts the dropped inputs per author (the `INPUT_AUTHORS` words other than `operator`; only the authors that wrote one are keys).
     *
     *  - `"task.turn_interrupted"` (design/373) — a running turn was ACTUALLY CUT at a manufactured
     *    boundary: the in-flight provider stream / tool batch was aborted (finished tool calls keep
     *    their real results, never-started ones settle as paired results; the interruption marker
     *    line lands on the bare-halt lane only). **THREE mint lanes, one code** — the CUT is lane-independent, so it is one fact
     *    with one spelling, and `detail.cause` is the arm discriminator (a consumer that must tell
     *    them apart reads that key; one that only cares "a turn was cut" reads neither):
     *      · the STEER-NOW lane (design/373) — a caller-provenance steer with `priority: "now"` cut
     *        the turn and the run CONTINUES with the steer at the queue head.
     *        `detail: { inputId, sessionId, runId, actorId?, taskId }`, NO `cause` key — `inputId` is
     *        the steer's own correlation key (the `human_input` frame's id) and `actorId` the caller's
     *        asserted identity when one rode the steer.
     *      · the BARE-HALT lane (#504, {@link TaskStream.halt}) — the person's Esc-form stop cut the
     *        turn and the run does NOT continue: it collects to a clean, resumable
     *        `status:"completed"` ending carrying {@link TaskResult.haltedByUser}.
     *        `detail: { cause: "user_halt", sessionId, runId, taskId }` — no `inputId` and no
     *        `actorId`, because no text entered the model and the verb carries no caller identity. A
     *        consumer keying `detail.inputId` off this row must treat it as ABSENT on this lane.
     *        Fence tension: this notice asserts THE CUT only — when the cut
     *        raced an approval park whose commit was already in flight, the gate's durable leg may
     *        still collect to `suspended` (park wins, row redeemable, the park's abort owns the
     *        ending, no `haltedByUser`, plus a `task.halt_unconsumed`); the notice stands beside that
     *        terminal without contradiction, because a seat really was cut — `haltedByUser` answers
     *        the other question (was the halt CONSUMED), see that seat.
     *      · the EXTENSION lane (a mod's `$.turn.abort({ turn })`) — an extension ended the running model
     *        turn and the run goes on at the ordinary turn boundary (a queued follow-up opens the next
     *        turn, else the stop gate is asked, else the run completes carrying {@link TaskResult.turnAbortedBy}).
     *        `detail: { cause: "extension_abort", extension, turn, sessionId, runId, taskId }` — `extension`
     *        is the registration that asked, `turn` the turn number it ended; no `inputId`, no `actorId`. The notice
     *        rides the cut's ACCEPTANCE: a cut that lands after the request's end was delivered but before the loop
     *        obtained its final is accepted and announced, yet the turn still ends as its answer — that cut is then
     *        disclosed by `mods.turn_abort_unconsumed` (`detail.source: "extension"`) at the result's settlement.
     *        7.70.0 narrows this code to the two lanes above (attention `audit`: the echo of the person's own cut); this lane
     *        mints `mods.turn_aborted` (attention `act`, the same `detail`) — an extension's cut is its own fact.
     *    In every lane: one notice per REAL cut (a `now` that found nothing in flight or whose frame
     *    already rode the imminent boundary, and a halt with nothing in flight, announce nothing — no
     *    false interrupt claims); `runId` is the INVOCATION that was cut; every cut turn counts toward
     *    `maxTurns`, so an interrupt storm's cost is bounded and each of its cuts is on the record.
     *    Audience `"user"`: the person who forced the boundary is the one entitled to see that it landed.
     *    RETIRED here (BREAKING, named): `"task.injection_priority_unimplemented"` — the ladder is
     *    implemented, so the unhonored-knob disclosure it carried has no referent; consumers must
     *    judge ladder support by VERSION, never by that code's absence.
     *
     *  - `"task.halt_unconsumed"` — the user's stop verb ({@link TaskStream.halt}) was ANSWERED (not
     *    refused) but the run's ending was not its doing: the run's own ending stands and the result will
     *    NOT carry `haltedByUser` for it (the seat signs consumption, never acceptance). TWO mint points,
     *    one fact, one spelling, disjoint: the VERB arm — the halt arrived while the run's ending was already
     *    owned by its own abort, or after the loop's end (no turn cut, no boundary stopped — a compaction pass the
     *    run's tail was in is still cut, and says so on its own `compaction_outcome{mooted, reason:"cancelled"}`;
     *    once per such verb call, and only while no halt
     *    has been ACCEPTED on the run — after one was, the settle arm alone speaks for the run);
     *    the SETTLE arm — the halt was ACCEPTED (it may even have cut a live seat: `{turnCut:true}` +
     *    `task.turn_interrupted`) but the run ended for its own reason before the machinery consumed it —
     *    no interrupt settlement took the halt's cut as its cause and no boundary consult stopped the loop
     *    for it (a brain minting its own `aborted` final beside a late halt, a natural completion the halt
     *    arrived too late to prevent, an approval park whose commit won the race and whose abort owned the
     *    ending); once per such run, at the result's settlement. Either way the notice is the halt's trace
     *    beside the verb receipt. `detail: { source: "halt", sessionId, runId, taskId }` — `runId` is the run whose ending
     *    the halt failed to claim. Audience `"user"`. A REFUSED halt (typed `steering.not_running` throw)
     *    mints nothing: the refusal itself is the loud answer.
     *    Attention `act`. 7.70.0 narrows it to the person's halt: the trace of the OTHER request that asks to end a turn is its own code, next.
     *  - `"mods.turn_abort_unconsumed"` (7.70.0; before it, `task.halt_unconsumed` with `source: "extension"`) — an extension's
     *    `$.turn.abort` whose cut was ACCEPTED (`mods.turn_aborted` was announced) but that no settlement took as its turn's
     *    cause: the turn had already ended on its own outcome (its request's end was delivered before the cut, so it ends as an
     *    answer), or the run's own ending won. The result does NOT carry `turnAbortedBy` for it. One per such cut, at the result's
     *    settlement. `detail: { source: "extension", extension, turn, sessionId, runId, taskId }` — `extension` and `turn` are the
     *    cut's own (the ones its `mods.turn_aborted` carried). Audience `"user"`, attention `inform`: the turn's own outcome stands.
     *  - `"mods.turn_aborted"` (7.70.0; before it, `task.turn_interrupted` with `cause: "extension_abort"`) — an extension's
     *    `$.turn.abort({ turn })` cut the running model turn; the run goes on at the ordinary turn boundary. `detail: { cause:
     *    "extension_abort", extension, turn, sessionId, runId, taskId }`. One per real cut. Audience `"user"`, attention `act`: the
     *    person's run ended a turn on someone else's word.
     *
     *  - `"task.late_approval"` (design/384 slice 1) — a synchronous ask approval was NOT CONSUMED:
     *    a run or turn interrupt released the wait (the `resolveAsk` race arm detached the approver's
     *    promise; an unconsumed resolve is the approver releasing its wait, never a verdict), so the
     *    tool did NOT run and the approval was not honored. The notice asserts non-consumption ONLY —
     *    never an arrival order: an approval and an abort settling close together read as the abort
     *    (the resolver's documented one-directional residual — the engine never claims a person
     *    decided something it cannot show they did, and it equally never claims which came first).
     *    Minted only for a value that reads as an APPROVAL — an unconsumed
     *    deny/refusal is an ordinary release and leaves no trace, and an unconsumed REJECTION goes to
     *    `onError(phase:"hook")` instead (a failing callback, not an answer). One notice per
     *    unconsumed approval; `detail: { toolName, toolCallId, sessionId, runId, taskId }`. Audience `"user"`
     *    (whoever answered the card is the one entitled to hear the answer ran nothing); a host may
     *    forward it on its own wire.
     *
     *  - `"task.interrupt_unconsumed"` — a HARD stop ({@link TaskStream.interrupt}, the task's `signal`,
     *    the walltime or the turns limit, the budget gate) landed AFTER the run's last turn had already given its answer
     *    (`stopReason:"stop"`, not partial, and no steer / follow-up of the person's still pending — a
     *    queued continuation makes that "stop" work in progress, and a stop that cuts it stays the
     *    ordinary abort with its undrained-input account) and before the loop's end — what it aborted was the run's
     *    tail (a final-boundary compaction is mooted, a stop hook's wait is cut), never its work. The
     *    answer stands: the run ends `completed` with it as `result`, no `[Request interrupted by user]`
     *    marker is written and no `limits.*` terminal is minted for the axis that fired; this notice is
     *    the stop's only trace. Minted once per such run, after the terminal arbitration (so it never
     *    claims a completed ending the terminal did not give). A stop that cut a one-shot ending's wait for
     *    background tasks it started names each (runner/stop-tail-notice.ts; "nothing was cut or stopped" only
     *    when there were none); `detail: { sessionId, runId, taskId, origin, waitedFor }` with `waitedFor` those
     *    tasks, read as the notice is built — `{ taskId, taskType?, status?, description?, stopped? }` (`stopped` true when
     *    the run's end sweeps it, false when it keeps its own lifetime, absent with the row's fields when no row
     *    was read; `StopTailWaitedTask`; `[]` when none) — and `origin` ∈ `"interrupt"` (the verb) | `"walltime"` | `"turns"` |
     *    `"budget"` (the budget gate's stop on an answering turn; the spend is on `stats`) |
     *    `"signal"` (every other run-level abort: the task's own `signal`, a parent's cancel, a
     *    `destroy()`, a refused preempt — the leg names the four it can tell apart and files the rest
     *    here). Audience `"user"`. A stop that arrives AFTER the loop's end but before `done` aborted no
     *    live loop and mints nothing here: it is answered, the end-of-task compaction pass does not run past
     *    it (cut in flight — `compaction_outcome{mooted, reason:"cancelled"}` — or never started), and the
     *    loop's ending stands as it was. A stop that arrives once the result is out is refused typed (`steering.not_running`, every
     *    verb alike): the refusal itself is the loud answer.
     *
     *  - `"task.wait_ceiling_reached"` — a one-shot submission's ending (`TaskSpec.oneShot`) waited for the loop-type
     *    background tasks it started and stopped at the wait's own ceiling (`limits.oneShotWaitCeilingMs`, default 600 000 ms)
     *    with some still owed: no stop arrived — the wait gave up. The answer stands as the result. Once per such run, read as the
     *    notice is built, before the run-end sweep: `detail: { sessionId, runId, taskId?, ceilingMs, waitedFor }`, `waitedFor` the
     *    same reading `task.interrupt_unconsumed` carries (`{ taskId, taskType?, status?, description?, stopped? }`, never empty);
     *    the sentence names each task with what the run's end does to it. A stop that lands on the run's tail after this cut no wait:
     *    its `task.interrupt_unconsumed` carries `waitedFor: []`. Audience `"user"`, attention `act` (the result carries nothing from them).
     *
     *  - `"task.manager_launch_narrowed"` — a run that declares a member ledger (`TaskSpec.runLedger`) took its launch check
     *    (`managerLaunchCheck`) at prepare and starts narrowed: something it needs for part of its job is missing (read hands, the
     *    worker-record tool, an approval route for its workers' writes, the task list). Once per prepared leg:
     *    `detail: { sessionId, runId, taskId?, launch }`, `launch` the check (`{ verdict, items: [{ item, state, means? }] }`); the
     *    sentence names each missing item and what it means. An item that could not be read is `unknown` and narrows nothing. A check
     *    whose missing item refuses (no background delegation lane, no report tool) refuses the run instead (`config.invalid_argument`,
     *    `detail.reason: "run_ledger_unready"`). Audience `"user"`, attention `act`.
     *
     *  - `"approval.read_root_granted"` / `"approval.read_root_grant_rejected"` — an approver's `readRootGrant`
     *    (`AskOutcome`, with its `readRootGrantLasts`). GRANTED: it equalled the card's `readRootCandidate.dir` beside
     *    `allow: true`; the READ directories now include it (never the write roots), for `detail.lasts`: `"session"` — a
     *    session rule the session's later runs read too — or `"run"` (the sentence says why a session-long answer took the
     *    run: the card did not offer it, a policy answered, or the rule could not be written — `sessionUnconfirmed: true` when its
     *    write may have landed all the same); `detail: { dir, covers?, root, lasts, sessionUnconfirmed?, toolName, toolCallId,
     *    checkpointId, sessionId, runId, taskId }`, `root` = the canonical spelling held, `checkpointId` = the card's
     *    `AskRequest.checkpointId`. REJECTED: nothing changed (save a write the message says may have landed), the verdict stands; `detail: { reason,
     *    offered?, requested?, …same ids }`, `reason` ∈ `not_a_string` | `lasts_invalid` (a duration outside `"session"` /
     *    `"run"`, or one with no grant beside it) | `no_candidate` | `mismatch` | `unresolvable` | `resolves_elsewhere` |
     *    `admits_artifact_store` (the directory contains the wired local artifact store, lies inside it or is it) |
     *    `no_read_roots`. Once per answered ask whose grant was a choice that did not take; a grant riding a refusal does not
     *    apply and mints nothing. Audience `"user"`; attention `audit` for both.
     *  - `"approval.session_call_granted"` / `"approval.session_call_grant_rejected"` (`src/core/runner/session-call-grant-station.ts`) —
     *    an approver's `sessionCallGrant` (`AskOutcome`). GRANTED: the card's own `grant` beside `allow: true`, no edit, a person's answer,
     *    and the session row binding the call written (later calls of the session that read back the same binding are allowed by it);
     *    `detail: { rule, cwd, programs, toolName, toolCallId, checkpointId, sessionId, runId, taskId }` (`rule` = the row's text, the key
     *    `removePersistedRule` takes it back by; no word of the command; `checkpointId` = the card's `AskRequest.checkpointId`). REJECTED:
     *    nothing kept (save a write the message says may have landed); `detail: { reason, offered?, requested?, …same ids }` (`offered`: the card's key, when it offered one), `reason` ∈
     *    `SESSION_CALL_GRANT_REJECTIONS` (`not_written`: no longer keeping session rules, or the write failed). Once per answered ask whose
     *    member was a choice that did not take; a refusal, or the card's key in an answer no person gave, mints nothing. Audience `"user"`;
     *    attention `audit` for both (a record of the person's own answer; a surface joins either to its card by `checkpointId`).
     *  - `"approval.approver_defect"` (`src/core/runner/approver-defect-announcer.ts`, `approverDefectAnnouncer`; minted by the four stations that put an
     *    ask to an approver) — the approver THREW, or ANSWERED outside its contract (an answer that is not `true` / `false` /
     *    `"unavailable"` / the `{allow}` object, or an object the seam refuses: a reason that is no string, an attribution or a
     *    `decidedVia` it cannot read), and the call it was asked about was denied fail-closed — the tool did not run. The model reads that
     *    denial as it reads any other; this tells the one who wired the seat that the seat is broken.
     *    `detail: { toolName, toolCallId, cause, seat, sessionId, runId, taskId }` — `cause` ∈ `threw` / `out_of_contract`; `seat` ∈
     *    `policy` (an approver the deployment declared a policy, `asPolicyApprover`) / `approver` (any other); never the thrown text or the
     *    answer (the denial the model reads names them). Once per denied ask. Audience `"operator"`: the defect is the deployment's code.
     *
     *  - `"checkpoint.execution_outcome_unrecorded"` — the resumed leg's pending-call resolver disposed
     *    the decided action (executed it, delivered the refusal, or vetoed the person's yes) and filed
     *    the frame's record through `CheckpointStore.recordExecutionOutcome`, and the store answered
     *    `not_resolved` or `absent` — the row was reopened, expired or removed under the leg by another
     *    actor, so the row now reads `unknown` on its execution axis (`executionVerdict`). The
     *    execution result is NOT changed by the answer (the record is an account of what ran, never a
     *    gate on it); the notice is the loud half. Once per such resolution;
     *    `detail: { sessionId, runId, scope, word }` (`word` = the store's answer; the secret token never rides
     *    a notice) and exactly one of `checkpointId` / `checkpointIdMissing` — the row's identity as the identity judge
     *    (`readGateIdentity`) reads it. A DIFFERENT record already on file is not this notice — it
     *    is the `checkpoint.execution_outcome_conflict` throw (an engine defect, propagated).
     *
     *  - `"classifier.denial_limit"` (#548, "too many classifier denials in headless
     *    mode") — the auto-mode classifier's DENIAL LIMIT was reached (3 consecutive blocks, or 20 in the
     *    run; `RunnerDeps.autoMode.denialLimit`) and the fallback ask it turns into was never JUDGED by
     *    anyone. Two lanes reach it. SYNCHRONOUS: no approver to go to — none wired, a blanket
     *    `onAsk:"allow"` (refused for a real-approval ask), or an approver that reported unavailable with
     *    no durable park to take it. DURABLE: the fallback PARKED, and the decide that resolved the row
     *    reported a settlement the nobody-judged table reads as such (`hostDecision.decidedBy:"policy"` ⇒
     *    `policy_refused`) — a machine answered where the bound had asked for a person, so the last resort
     *    is the same one. A person's refusal (`"person"` ⇒ `human_refused`) is NOT this notice on either
     *    lane: someone looked. The run was STOPPED — a `failed` terminal, `code` the same code, `message`
     *    the limit sentence — rather than kept spending on a model the classifier denies without end; the
     *    triggering call's own result is the deny that stood. The two lanes' sentences differ in ONE
     *    clause (which of the two ways nobody answered), and the durable one states the counts the PARKED
     *    row carried, so a resume in a fresh process reports the streak that actually happened. Once per
     *    run leg (the first such fallback owns the terminal);
     *    `detail: { sessionId, runId, toolName, toolCallId, consecutive, total, limit, cause? }` — `limit` is
     *    `"consecutive"` | `"total"`, the bound that tripped; `cause: "approval_window_closed"` only when the policy refusal that
     *    ended the fallback named the seat `host_window_closed` (the sentence then says that window closed, not "headless"). Audience `"user"` (the person whose run
     *    ended is the one entitled to hear why, and to review the transcript the sentence points at).
     *    With an approver wired the same bound mints NO notice — the fallback ask reaches the person
     *    instead (`AskRequest.denialLimitFallback`).
     *
     *  - `"steering.parked_input_blocked"` (design/373 §4.3) — a PARKED steer entry was withheld when
     *    a resume redelivered it (any resume kind that drains parked steers — wake included) by the
     *    deployment's `userPromptSubmit` screen (block verdict, or a fail-closed non-answer/crash):
     *    the row was consumed with the checkpoint, the frame never reached the model, and the resume
     *    itself proceeds (a blocked instruction must never wedge a wake). The lifecycle half of the
     *    same fact is the entry's own `human_input` account with `delivery: "blocked"` — the two share
     *    the inputId, so "accepted at park, screened at redelivery" is auditable end to end. Audience
     *    `"user"` (the person whose instruction was withheld is the one entitled to re-issue it);
     *    `detail: { inputId?, sessionId, runId, taskId }` — `inputId` is the parked entry's stored
     *    correlation key (OPTIONAL: a row parked without one exists), and `runId` names the resume leg
     *    that withheld it, so a session resumed twice does not report two withholdings as one.
     *
     *  - `"memory.session_polluted"` (design/178 §3, #324a; message mode-aware since design/336) —
     *    this session's memory crossed into the one-way externally-exposed state (a tool classified
     *    as an external content source was invoked, directly or through a delegated child). Under
     *    `memoryProvenance: "carry"` (default) the message states the tag-admit semantics (ordinary
     *    writes commit with an origin marker; instruction-form files are withheld); under `"off"` it
     *    keeps the pre-336 sentence — writes no longer eligible for the long-term library. The
     *    notice states that VERDICT plus what a harvest does when it collects — it does
     *    not promise quarantine, because a `writeScope`-null layering and a declared-unavailable
     *    session both reach the zero-admission harvest arm (nothing collected ⇒ nothing captured), and
     *    a mark landing after the pre-commit pollution read leaves already-committed rows to the
     *    challenge sweep; what a harvest actually contained is the other code below. The challenge
     *    clause is a policy statement, not a receipt — a sweep that cannot run announces
     *    `"memory.challenge_sweep_failed"` on the engine's incident seat. Announced ONCE PER
     *    SESSION, at the mark seat: a repeat mark inside the process and a resumed session whose
     *    durable marker already exists stay quiet (the state is one-way, so a second line would carry
     *    no new fact); a pollution state that cannot be read announces rather than assuming it was
     *    already said. `detail: { reason, sessionId? }` — `reason` names the invoked tool and is
     *    neutralized/length-bounded (the name comes from the host/protocol roster).
     *  - `"memory.harvest_quarantined"` (design/178 §3, #324a) — a polluted session's harvest ran its
     *    containment: `count` ENTRY files written or changed in the session were withheld from the
     *    library, `moved` of them were physically moved into the control-plane quarantine directory,
     *    and `escalated` of them carry a `HarvestReport.quarantineFailures` row (a failed capture, a
     *    failed removal, or a file tombstoned in place — which counts as moved AND escalated, so the
     *    two numbers are read off the report's rows, never subtracted from each other). One notice PER
     *    HARVEST that withheld at least one entry file (a checkpoint harvest and the terminal harvest
     *    are distinct facts), never minted for a clean session; `detail: { count, moved, escalated,
     *    reportId?, reason?, sessionId? }` (`reason` absent ⇔ the pollution marker could not be re-read
     *    at report time — the withheld count stays true either way). `reportId` (#479) is the minting
     *    harvest's own occurrence identity ({@link import("./memory-engine/types.js").HarvestReport}
     *    `.reportId`, uuidv7): two harvests whose counts and paths coincide carry DISTINCT ids, a
     *    durable replay of the same notice carries the SAME id, and the hold family below shares this
     *    harvest's id — dedup on `(code, detail.reportId)`, never on `reportId` alone (absent only for
     *    a hand-built report; every engine-minted report carries it). The formerly registered index-only gap is
     *    CLOSED under `memoryProvenance: "carry"` (design/336 §6.3, #331): the mint condition reads
     *    `HarvestReport.containment`, so a containment whose only act was the derived-index rollback
     *    announces with `count: 0` and `detail.indexRolledBack: true`; under `"off"` the pre-336
     *    count>0 condition (and its silence on index-only containment) is kept byte-level.
     *  - `"memory.hold_opened"` / `"memory.hold_released"` / `"memory.hold_disposed"` (design/336
     *    §4/§6.3) — the instruction-hold lifecycle, derived from the same structured
     *    `HarvestReport.containment` signal (hold seats are only ever filled under
     *    `memoryProvenance: "carry"`): a PENDING session's instruction-form entry files were captured
     *    off the model-visible plane (`hold_opened`, `detail: { count, paths, reportId?, sessionId? }`
     *    — paths neutralized/length-bounded); previously held entries re-walked the full gate set and
     *    committed after their writer session settled clean or a host valve released them
     *    (`hold_released`, same detail shape); held entries moved to control-plane quarantine
     *    (`hold_disposed`, `detail.disposed: [{ path, terminal }]` with the closed terminal set
     *    dirty/expired/conflict/capture_lost/discarded — an `expired` terminal is explicitly a
     *    TIMEOUT, not a conviction, and the message names `resolveHold` as the recovery valve). At
     *    most one notice per family per harvest report; wording is factual, never threat-flavored
     *    (the design/336 §13-2 model-psyche guardrail). `detail.reportId` (#479) is shared by all
     *    three families AND `"memory.harvest_quarantined"` when they derive from the same harvest
     *    report — that sharing is the contract (one report, several distinct facts): dedup on
     *    `(code, detail.reportId)`; a repeat with the same pair is a replay, a new pair is a new fact. `hold_opened`: attention
     *    `inform` (7.71.0; `act` before).
     *  - `"memory.harvest_refused"` (#2424) — the boundary harvest ended in an incident: the deletion fuse
     *    (nothing deleted, removed files back from saved copies); a vanished/replaced write root (this save's
     *    changes were not written); or unreadable/unwritable memory records (this save could not be confirmed;
     *    a failure after the redo journal was written may still recover on reopen). One notice per refused
     *    report; `detail: { kind, committed, reportId?, sessionId? }` (`kind` = `HarvestReport.incident.kind`,
     *    `committed` = applied patch count, 0 unless another folder's changes committed). Engine-owned wording
     *    per kind: the record-error kind never relays raw error text (host logs and `onError` carry it).
     *  - `"memory.harvest_conflict"` (#2424) — the harvest committed, but the store did not take some of
     *    the session's changes: a per-id CAS miss (another writer committed a newer version first — the
     *    only case worded as concurrency) or the store's own refusal of the patch; those entries keep
     *    their stored version (a conflicted deletion leaves the entry in place). One notice per harvest
     *    with at least one conflict; `detail: { count, conflicts: [{ op, id, concurrent }], reportId?,
     *    sessionId? }` (first 20 rows; `concurrent` true ⇔ the CAS arm). Shares `detail.reportId` with
     *    the harvest's other notices — dedup on `(code, detail.reportId)`.
     *  - `"memory.delegation_static_mark_waived"` (design/324, #324 ruling ①) — the deployment set
     *    {@link RunnerDeps.memoryDelegationEvidence} to `"attested-only"` and a delegation call whose
     *    STATIC tool-face verdict would have marked this session's memory polluted (attestation
     *    missing/unknown + face can reach external content) was not marked: the waiver is announced —
     *    the explicit dual of `"memory.session_polluted"` for this arm, so the arm has a voice where a
     *    mark used to land. MINT-side guarantee only: delivery rides the shared guarded form
     *    ({@link deliverEngineNotice} — a wired sink that throws owns that loss, exactly as at every
     *    de-duplicating station), and the leg latch is consumed at mint. Minted only when a pollution
     *    face is mounted (a
     *    recorder-only child's mark is a no-op — nothing is waived there), at most ONCE PER PREPARED
     *    TASK LEG (a resume leg may announce again — a new leg's audit stream is a new fact;
     *    deliberately no durable once-per-session state), never on the `"static-face"` default, and
     *    never for a delivered `"external"` attestation (that mark still lands);
     *    `detail: { reason, subagentType?, sessionId?, runId }` — `runId` (#499) is what makes the
     *    ONCE-PER-LEG guarantee above checkable, since a resume leg may legitimately announce again and
     *    the session id cannot tell the two legs apart; `reason` is the same sentence the waived
     *    mark would have carried, neutralized/length-bounded (tool and agent-type names are
     *    host/model-controlled inputs).
     *  - `"memory.content_class_declared"` (design/378) — an `McpServerSpec` entry carries an explicit
     *    {@link McpServerSpec.contentOrigin}: the deployment declared this server's whole tool set to
     *    be inside (or explicitly outside) its trust boundary, so the protocol namespace's structural
     *    `"external"` no longer decides. The AUDIT line for a trust boundary an operator drew by
     *    configuration — which is why it announces on the explicit `"external"` value too: pinning is
     *    not a no-op (a declaration beats the `trustedTools` allowlist, so it forecloses the per-name
     *    exemption for this server's tools). One line per DECLARED ENTRY per prepared task leg, minted
     *    once at preparation and never per call (the declaration's whole effect is that calls stop
     *    marking; narrating each call would trade the saved mark for equal noise). Armed on the SAME
     *    condition as the classification it talks about — a leg with no engine-memory session and no
     *    provenance recorder classifies nothing, so there is no posture to report and no line is
     *    minted. `detail: { server,
     *    contentOrigin, toolCount, execIsExternalContent?, sessionId?, runId }` — `runId` (#499) names
     *    the LEG, which is what "one line per declared entry per prepared task leg" is a claim about:
     *    the session id beside it is shared by every leg of the session, so two legs reading one
     *    declaration used to mint byte-identical rows. `server` is the
     *    host-authored entry name, neutralized/length-bounded; `toolCount` is what this entry actually
     *    mounted (0 for a server that failed to connect — the declaration still stands and is still
     *    disclosed); `execIsExternalContent` rides the `"execution"` value only and reports the strict
     *    knob AS RESOLVED FOR THIS RUN, because that arm's posture depends on it. The message's closing
     *    clause is written per value so it can never describe a posture the run does not have. The
     *    entry's TRANSPORT is deliberately absent: it is a claim about a mutable host-owned object made
     *    long after the dial, and D-10 already rules topology is not evidence of the lineage this line
     *    audits — connection facts live on `MaterializedMcp.statuses` instead.
     *
     *  - `"memory.capture_opted_out"` (design/383 §2.8) — memory capture is OFF for this session and
     *    the switch provably TOOK: nothing the session produces will be committed to the long-term
     *    store and its contributions no longer enter consolidation. The user must be able to SEE the
     *    switch land rather than infer it from silence, which is why it is announced rather than left
     *    implicit. States three facts and an exit, and deliberately overclaims none of them: entries
     *    committed BEFORE the opt-out remain in the library and stay retrievable, entries already
     *    folded into consolidation products leave those products unaffected, and deleting committed
     *    content is a separate host action (the erase valve), never a side effect of this switch.
     *    `detail: { sessionId, origin }` — `origin` is the closed set
     *    `"declaration" | "flip-verb" | "standing-record" | "delegation-floor" | "fork-origin"`, and
     *    the message is written per value (a delegated child's inherited floor and a fork's inherited
     *    one-way record say so, rather than claiming the session declared it). Audience `"user"`.
     *    Dedup unit: once per SESSION — key `(code, detail.sessionId)`, so the standing-record resume
     *    arm folds into the standing entry instead of double-announcing. 7.70.0 narrows it to the origins the person did not
     *    give on this session (`standing-record`, `delegation-floor`, `fork-origin`); the person's own switch is next. Attention `inform` (7.71.0).
     *  - `"memory.capture_switched_off"` (7.70.0) — the same posture and message, landed by the person's own switch: `origin`
     *    `declaration` (the task declared `capture: "off"`) or `flip-verb` (the live verb). `detail: { sessionId, origin }`. Audience
     *    `"user"` — the frame still reaches the person's stream, where a surface confirms the switch landed — attention `audit`.
     *    Same dedup unit.
     *  - `"memory.capture_optout_unpersisted"` (design/383 §2.8) — the OPPOSITE receipt, and a
     *    separate code on purpose ("it is off for you" and "it could not be turned off" must never
     *    share a spelling): the opt-out could NOT be durably recorded (the control-plane write
     *    failed, or the memory phase failed before the record was made), so it is REFUSED rather than honored in-process under a
     *    switch that would silently stop holding at the next resume. Minted only beside that refusal — the throw carrying the same
     *    code — never beside a success, and no success notice is minted on this arm. `detail: { sessionId, ingress?, cause, retry,
     *    outsideReason? }` — why, and whether a retry can succeed (`mount-failed-notice.ts`). Audience `"user"` (the operator repairs the store, but the
     *    entitlement to the fact belongs to whoever asked for the privacy). **TWO ingresses, and they
     *    settle differently — a consumer must not read one as the other:**
     *      · PREPARE-TIME (a declared/inherited opt-out, before the run starts) — the refusal is
     *        TERMINAL: the task never runs and nothing is captured. Dedup unit: once per task, since
     *        the refusal it rides settles the task.
     *      · the LIVE FLIP VERB ({@link TaskStream.optOutMemoryCapture} mid-run) — the refusal is
     *        SCOPED TO THAT CALL: it rejects the verb's promise and nothing else. The run keeps going
     *        and capture is still ENABLED (the switch did not take), which is exactly why the notice
     *        is owed. Because no record was retained, a retry can fail the same way, so this ingress
     *        can announce ONCE PER ATTEMPT — a consumer de-duplicating per task would hide later
     *        failures of a switch the person is still trying to throw.
     *    Read the run's own outcome (or the verb's rejection) to tell the two apart; this code alone
     *    does not say whether anything stopped.
     *  - `"memory.mount_failed"` — a memory store that was asked for did not mount for this run (the memory phase's fail-open
     *    arm: the task runs without its memory). Minted under the guard that mints the run's `memoryless` / `mount-failed`
     *    observation, so the two are one fact; the operator's half is `onError` (`{ phase: "memory" }`), this is the person's.
     *    `detail: { sessionId, scopes, cause, outsideReason? }` — `scopes` what the task asked to mount (the whole span failed), `cause` the
     *    refusal's code when a member of `STORE_FORM_REFUSAL_CODES` or `memory.root_anchor_damaged`, else `"unclassified"`; `outsideReason`
     *    exactly when `cause` is `memory.target_outside_store` (its case); never the thrown text or a path. Audience `"user"`. Dedup: once per SESSION — key
     *    `(code, detail.sessionId)`; the phase mints once per leg whose mount failed. The model's half: the memory band's writes-unavailable notice.
     *  - `"memory.consolidation_incomplete"` (design/376, LLM consolidation driver) — a driver run
     *    settled without reaching the fixpoint: `detail` names the stop reason (the closed
     *    `ConsolidationRunStopReason` set), cycles done, and the residue (write-failure or
     *    fuse-refused groups by name). Advisory: committed cycles stand (add-only, never rolled
     *    back); the recovery verb is re-running the host driver, which resumes the same pending run.
     *  - `"memory.consolidation_withheld"` (design/383 §1.4) — the exposure partition engaged on a
     *    consolidation run, so the CLEAN arm's authoring prompts were composed WITHOUT the marked
     *    rows: anything this run's clean products say was written without them, and their silence on a
     *    topic therefore does not mean the library is silent on it (the withheld rows still stand and
     *    are still readable). OPERATOR audience (#692 C-a): the run happens outside any session, so
     *    there is no `sessionId` to route a user row to — the receipt's `withheldFromCleanArm` /
     *    `withheldNeverSent` are the reader-facing half. TWO counts, deliberately separate sentences and separate keys —
     *    `withheld` rows were kept out of the clean arm's prompts, and `neverSent` of those were not
     *    sent to the consolidation model AT ALL (a lone marked row has no group to fold, so it is
     *    withheld from every call). "Withheld from the clean arm" and "never left this machine" are
     *    different facts about a person's own data and must not be merged into one comforting number,
     *    which is why `sentToProvider` is carried as its own member rather than left to subtraction.
     *    `detail: { scope, runId, withheld, neverSent, sentToProvider }` — `scope` is
     *    neutralized/length-bounded. Audience `"user"`: the ONE consolidation row that is a reader's
     *    fact rather than an operator's (the other five report what a host-driven maintenance run DID;
     *    this one reports what the products a person will READ were written without). Minted once per
     *    run, beside the receipt — the dedup unit.
     *  - `"memory.consolidation_driver_superseded"` is an ERROR code, not a notice (named here only
     *    to keep the family's spellings in one place): a concurrent driver invocation took over this
     *    scope's run row (attempt fencing) and the losing worker's call THROWS with this `code` —
     *    it never crosses {@link deliverEngineNotice}, is deliberately absent from
     *    {@link ENGINE_NOTICE_CODES}/{@link NOTICE_AUDIENCE}, and sits in the non-governance
     *    disposition table with the error dispositions. The loser MUST NOT retry into the winner's
     *    account. A consumer diffing its own table against the catalog must not add a row for it.
     *
     *  - `"config.peer_admission_out_of_range"` (#551) — a `RunnerDeps.peerLane` field the
     *    resolver could not use: outside its legal range, or not a finite number at all (a string off
     *    an untyped host's wiring, `NaN`, `Infinity`). THAT FIELD falls back to its own default (never
     *    a clamp to the nearest edge, never a whole-config reject) and every other field is unaffected.
     *    One notice PER FIELD — two bad fields in one config are two notices — deduped per SINK on
     *    `(field, given)` rather than per call (the resolver runs on every SendMessage and every drain
     *    round; the fact is about the wiring, not about the call). Per SINK, not per process: two
     *    Runners in one process each own an `onNotice`, and a process-global ledger would deliver the
     *    fact to whichever resolved first and leave the other silently without its own disclosure. The
     *    unwired arm (no `onNotice`: the shared `console.warn` throat) latches per process instead —
     *    the console IS one process-wide channel. `detail: { field, given, default,
     *    range: [lo, hi], reason }`, where `reason` is `"out_of_range" | "not_a_finite_number"`.
     *    Audience `"operator"` (a configuration fact; the fix is the deployment's).
     *  - `"config.peer_lane_unmounted"` (design/385 §1.2⑥) — `RunnerDeps.peerDirectory` is wired but
     *    the cross-session lane could not mount on this leg: no `mailboxStore`, or one that does not
     *    declare `crossProcessSafe: true` (several terminals would share one session box on luck). The
     *    seat is inert for the run (no ListAgents, peer addresses refuse with the same reason). Once per
     *    prepared leg; `detail: { reason, code, mailboxWired, sessionId, runId }`. Audience `"operator"`
     *    (a wiring fact; the fix is the deployment's).
     *  - `"config.scheduler_store_unmoved"` — the env's scheduler backend declares `supported: true` but not
     *    `schedulerCapabilities.scopeKeys: "lane"`: no scheduler tool mounts. Once per declared value per sink;
     *    `detail: { declared }`. Audience `"operator"`.
     *  - `"peer.inbound_disposition"` (design/385 §1.2④ / §4.6 / §4.4) — a message parked in THIS
     *    session's own box was settled at the drain WITHOUT reaching the model. `detail.disposition` is
     *    the arm (closed set `PeerInboundDisposition`): `"refused"` (this session's `crossSessionInbound`
     *    setting, or a record whose typed fields cannot be rendered canonically), `"admission_refused"`
     *    (the drain-stage admission re-check: duplicate / hop loop / runaway — `cause` names it),
     *    `"notice_unrouted"` (a notice-kind record the notice face cannot render — no typed `notice`, or
     *    a state that does not fit its kind — settled without delivery, never ridden through the
     *    peer-message envelope), `"notice_user_only"` (a delivery receipt / idle notice whose sender this
     *    session's parity would HOLD: surfaced here for the user, not read by the model — CC's
     *    `modelVisible:false` arm; `cause` carries the rendered notice text), or `"held"` — the parity
     *    judgment held it: the message ENTERED this session's process-level held queue and was acked
     *    from the box (later messages are not blocked behind it), where it is re-judged at every
     *    boundary, released or refused with a receipt, and expires WITH a receipt under `dialogExpiry`
     *    (see `peer.held_settled`); `cause` is a `PeerInboundHoldCause` — the parity causes, or the
     *    drain gate's TRANSIENT `rate_limited` (that one does NOT enter the queue: the message stays in
     *    the box and the drain stops at its seq until the bucket refills). Disclosed once per seq per leg,
     *    and again when a re-judgment moves a held entry's cause. `detail: { disposition, cause, seq, box,
     *    fromSession?, sessionId, runId }`. Audience `"user"`: the session's user is the one who did
     *    not receive it. 7.70.0 narrows it to `refused` / `admission_refused` / `notice_unrouted` / `held` (attention `inform`);
     *    the other two arms are their own codes, below, with the same `detail`:
     *  - `"peer.inbound_unread"` (7.70.0) — `disposition: "resupply_exhausted"`: the message's frame was summarized away by a
     *    compaction, re-supplied once and summarized away again; the model never read it and the sender was not told. Attention `act`.
     *  - `"peer.notice_user_only"` (7.70.0) — `disposition: "notice_user_only"` for an idle notice, or a receipt saying the person's
     *    message was not delivered (held, denied, expired, dropped, refused): shown to the person only, the model did not read it —
     *    the person is its one reader. Attention `act`.
     *  - `"peer.receipt_delivered_user_only"` (7.70.0) — `disposition: "notice_user_only"` for a receipt saying the person's message
     *    was delivered: a success, shown to the person only. Attention `inform`.
     *  - `"peer.held_settled"` (design/385 §4.4, slice 4) — a message left THIS session's held queue.
     *    `detail.settlement` names how: `"delivered"` (a re-judgment or an approval released it into
     *    this session's model context), `"refused"` (the setting moved to refuse, or an approval met a
     *    refusing policy), `"expired"` (the `dialogExpiry` deadline, an eviction when the 100-entry queue
     *    was full, a cancelled review, a graceful shutdown, or a record another lease holder already settled),
     *    `"denied"` (the review face), `"dropped"` (the injection lane refused the released frame), `"retired"` (the card left
     *    this process with no decision taken: the record stays held in its box, or another consumer settled it).
     *    `detail.reason` is the trigger (`PeerHeldSettleReason`: `deadline | evicted | shutdown | rejudge |
     *    approved | denied | cancelled | inject_failed | superseded | decided_elsewhere`); the sender was sent the matching receipt
     *    whenever the record carried a reply address — except on `superseded` and `decided_elsewhere`, where the consumer that
     *    settled the record sent it.
     *    `detail: { settlement, reason, seq, box, fromSession?, heldCount, sessionId, runId }`. Audience
     *    `"user"`: it is this session's user who held (or was holding) the message. 7.70.0 narrows it to the ways out no one
     *    decided for the person (a deadline, an eviction, a shutdown, a refusal or a drop of a card no person had approved, a
     *    card retired or decided elsewhere; attention `inform`); the other two are their own codes, below, with the same `detail`:
     *  - `"peer.held_approval_unhonored"` (7.70.0) — a card a person approved (the approval itself, a card already `approved`, or
     *    one a person's approval handed over) ended `refused` (the policy refuses now) or `dropped` (the injection lane refused
     *    it): the approval was not honoured. Attention `act`.
     *  - `"peer.held_decision_applied"` (7.70.0) — a card `delivered`, or settled by the person's own deny (`denied`) or cancel
     *    (`expired` with `reason: "cancelled"`): the echo of the decision. Attention `audit`.
     *  - `"peer.idle_subscription"` (design/385 §5.2, slice 4) — a peer session asked to be told when
     *    THIS session next goes idle (`SendMessage … notify_when_idle`). `detail.outcome`: `"recorded"`
     *    / `"refreshed"` (a same-requester re-ask; the subscription is one-shot and expires unfired after
     *    12 h), `"full"` (the 32-entry table is full) or `"refused"` (this session's `crossSessionInbound`
     *    is `refuse`) — the last two answered the requester with an `unavailable` notice. `detail:
     *    { outcome, fromSession, live, seq, box, sessionId, runId }`. Audience `"user"`: the person whose
     *    session is being watched is the one entitled to know (CC announces it in the session UI). 7.70.0 narrows it to
     *    `recorded` / `refreshed` (attention `act`); `full` / `refused` are the next code.
     *  - `"peer.idle_subscription_declined"` (7.70.0) — the same ask answered `unavailable` (`outcome` `full` or `refused`): the
     *    requester was told, nothing of this session's is watched. Same `detail`. Audience `"user"`, attention `inform`.
     *
     *  - `"delegation.transcript_integrity"` (subagent transcript persistence) — a durable agent row
     *    with a BOUND transcript sessionId names a session the reading tree could not open — the store attests `not_found`, or the
     *    read's owner judgement refused the row (one sentence, no field tells which): declared transcript durability is contradicted. Minted only where
     *    durability IS declared — a deployment whose `fleet.subagentTranscripts` tier is `full`; under `rows`
     *    (transcripts follow a process-local store's fate) a gone transcript is the declared fate and nothing
     *    is announced (the per-call refusals still answer), and under `none` no row binds one. Announced at
     *    most once per (scope, handle, process) — `detail: { handle, scope? }`, scope = the resolved
     *    access scope of the read that found the gap — from the continuation read faces (SendMessage preflight /
     *    AgentTranscript's durable leg); the per-call honest refusals are unchanged, and the declared
     *    tier is NOT auto-downgraded (declaration-制 — observation reports, it never re-adjudicates).
     *  - `"delegation.ask_unresolvable"` — an `ask` reached its FINAL deny with nobody having judged it:
     *    the call's approval could not be RESOLVED. `detail.cause` (closed set `ASK_UNRESOLVABLE_CAUSES`):
     *    `approver_unavailable` — the approver consulted (the run's own seat, or an ancestor's frozen seat
     *    on a delegated child) answered `unavailable` and no park took the call (`tool_end.gate.settlement
     *    .kind:"approver_unavailable"`); `no_approver_wired` — no approver / question face is wired, or the
     *    seat is the deny posture (the headless auto-deny, `settlement.kind:"no_approver"`);
     *    `mandate_unreconstructible` — an inherited durable mandate binds the ask and this leg has no park
     *    facility (an in-fold deny, no settlement on the frame). The deny itself is unchanged (the
     *    fail-closed sentence as the tool result); this is its person-facing half, minted at the gate's ONE
     *    deny exit, once per tool call, by `ask-unresolvable-notice.ts`. `detail: { sessionId, toolName,
     *    toolCallId, cause, parkLaneExisted, remedy?, remedies?, notResumableSource? }` — `notResumableSource`
     *    (`"lane"` | `"host"`, {@link import("./park-resumability.js").ApprovalParkNotResumable}) is present ONLY when the refused call was a leg's whose
     *    parks nobody resumes (whichever `cause` it read as): who says so — the word the leg's way out is chosen by; absent on every other leg and on
     *    an engine from before this member (7.68.x), which a reader takes as "the source is not known". `parkLaneExisted` says whether a park lane was armed and
     *    declined/failed (`true`) or none existed (`false`, the usual shape); `remedy` (the two causes that say nobody
     *    could be asked — `approver_unavailable` and `no_approver_wired`; never `mandate_unreconstructible`)
     *    is the one sentence naming the caller-side change that would have let the call run, as the tool text carries it (for arguments
     *    no approval can be bound to, the binding's own sentence: the remedy's approver half would not let them run). Audience `"user"`: the refused
     *    work is the session user's own; the operator hears it through the sink like every code.
     *  - `"delegation.resume_lane_missing"` (#3334) — a parked agent resumed by a lane-less drive whose task registry holds no park of it: its completion is routed to its
     *    tree's root session — its live run on the drive's runner, else its durable box (`detail.path: "box"`) — or, where the root has no durable box (the sentence names why),
     *    the mount's sink; a submission waiting on it elsewhere is not settled by it. Once per drive, at the consume, on the notice seat of the runner the delegation tool runs on (7.70.0; the process default seat for a hand-built seat with no notice door). `detail: { taskId, rootSessionId?, path? }`. Audience `"operator"`.
     *  - `"delegation.spawn_depth_unknown"` — a background agent revived from a row that records no delegation depth
     *    (`BackgroundAgentRecord.spawnDepth`, absent on a row an earlier release wrote) runs without the delegation tool: the
     *    depth it was born at cannot be read, and the waking tool's depth is not its own. Once per revival, on the notice seat
     *    of the runner the delegation tool runs on. `detail: { taskId }`. Audience `"operator"`.
     *  - `"delegation.delivery_discarded"` (#3431) — a frame (a background task's completion, a monitor event, a child's message)
     *    addressed to an earlier occupant of a session id — the id deleted and created again, by another principal or the same
     *    one — was discarded instead of delivered to the occupant the id holds now. Once per frame, by the Runner's per-session
     *    notification store (`PendingSessionNotifications`), the one place the occupant comparison answers "another".
     *    `detail: { taskId, taskType, sessionId, path, addressed, current }` — `path` = the seat the frame would have reached
     *    under the current occupant (`"live"` its running conversation, `"box"` its durable box, `"drain"` its next run's
     *    turn-open delivery); `addressed` / `current` = whether each side's occupant carried a token (`"known"` / `"unknown"`),
     *    never the token. The frame's text never rides it. Audience `"operator"`.
     *
     *  - `"memory.consolidation_recommended"` (design/339 §2.2/§6.2) — the engine-minted per-scope
     *    session count crossed the consolidation thresholds (time gate open ∧ enough distinct
     *    sessions); minted at most once per crossing (a completed run re-arms the edge), NEVER when
     *    the deployment leaves consolidation off. ADVISORY: the host owns the verbs, nothing runs
     *    automatically; `detail: { scope, sessionsSince, reportId?, sessionId? }` — `reportId` (#479)
     *    is the minting harvest report's occurrence identity, shared with the harvest/hold family's
     *    notices of the same report (dedup on `(code, detail.reportId)`).
     *  - `"memory.consolidation_committed"` (design/339 §6.2) — a consolidation plan reached
     *    `completed`: products landed, superseded targets left the default read face (retained as
     *    evidence), intents settled; `detail: { planId, scope, products, superseded, intents }` —
     *    counts and engine-minted ids only, zero content.
     *  - `"memory.consolidation_conflict"` (design/339 §6.2) — a plan parked CONFLICT: at least one
     *    target did not reach its planned state (a concurrent write, a patch the store declined, or a
     *    target the re-judgment could no longer act on — the plan's audit rows carry the per-target
     *    reason). The REFUSED targets were not overwritten; patches the plan had already applied
     *    stand (discard rolls nothing back — the receipt's applied-vs-conflict counts say how many).
     *    Affected intents stay pending and wait for the host valve
     *    (`resolveConsolidationPlan` retry/discard); `detail: { planId, scope }`.
     *  - `"memory.consolidation_refused"` (design/339 §6.2) — the notice dialect of a consolidation
     *    verb's coded structured refusal (the verb itself throws
     *    {@link import("../core/memory-engine/consolidation.js").ConsolidationRefusedError});
     *    `detail: { refusalCode, scope?, occurrenceId? }`. `occurrenceId` (#495) is the THROWN ERROR's
     *    own id, minted once where the refusal happens and read off it by the notice factory — one
     *    throw rendered twice keeps one id, two refusals sharing a code/scope/message get two. Omitted
     *    (never fabricated) when the caller composes the line with no error in hand.
     *
     *  The six SERVER-minted rows ({@link NOTICE_MINTER} `"server"`) — catalogued so their audience and detail shape
     *  are read here like every other row; this engine never mints them. A server forwards them through the same sink.
     *  - `"permission.entry_mode_clamped"` — the permission mode the caller requested was clamped by the deployment's
     *    entry floor BEFORE the run reached this engine (the server's own clamp, through this package's
     *    `clampPermissionMode`), so the run starts under another mode. The disclosure is minted where the clamp happens:
     *    a fold this engine makes itself (a parent's ceiling, the deployment's deny bits, a missing classifier face) is
     *    `config.permission_mode_unavailable`, never this row. Audience `"user"`; `detail: { requested, effective,
     *    ceiling, sessionId }` — `requested` the caller's word, `effective` the word the run starts under, `ceiling`
     *    the floor that clamped it; no run id — the clamp happens at intake, before any run exists. Once per run.
     *  - `"memory.layer_locked_legacy"` — a memory layer an older engine left without its owner-write bit was found at
     *    boot; deletes in it will fail until the operator restores the bit. Audience `"operator"`; `detail: { layers,
     *    remedy }` — layer directory names and the one command. No session. Once per boot.
     *  - `"server.model_unreachable"` — a model call of this leg ended in error and its last request failed to
     *    connect. Audience `"user"`; `detail: { code, targetHost, remedy, sessionId, taskId?, proxyInUse? }` — `code`
     *    one of `UND_ERR_CONNECT_TIMEOUT` / `ECONNREFUSED` / `ENOTFOUND` / `EAI_AGAIN` / `EHOSTUNREACH` / `ENETUNREACH`;
     *    `targetHost` the model endpoint's `host:port`; `remedy` the constant `"check VPN / proxy; restart if the
     *    proxy changed since boot"`; `taskId` (server 7.121.0+) the run resource id of the leg this notice belongs to —
     *    absent on a streaming leg that has no run store, and the SAME value on a resumed leg and its original (a
     *    per-leg dedup folds the two into one line); `proxyInUse` present only when that request went through a proxy,
     *    its value the variable's name (`HTTP_PROXY` or `HTTPS_PROXY`), never the proxy address. No `runId`. Once per
     *    leg per target.
     *  - `"model.context_window_assumed"` — a model the catalog gives no `contextWindow` for ran on an assumed window the serving layer chose before the run reached this engine. Audience `"user"`; `detail: { model, assumedContextWindow, sessionId }` — the model's name and the window the run was sized on; no `runId`.
     *  - `"config.store_ephemeral"` (#3952) — the deployment declared this engine's session and checkpoint stores
     *    process-local: parking and resume hold only within the serving process. Present only when the deployment's
     *    store declares itself ephemeral; this package reads no such declaration and mints no such notice. Audience
     *    `"user"` — the person's parked work and later resume are what the declaration bounds, and the remedy (a
     *    durable store) stays the deployment's; `detail.sessionId` names the session. The sentence the person reads and
     *    how often it is told are the server's; this engine only catalogues the code.
     *  - `"memory.sync_layer_parked"` — a memory sync layer of the serving process stopped syncing on its cursor (cause `cursor_refused` |
     *    `cursor_unusable`) and stays stopped until the cursor is reset. Audience `"user"`, attention `"act"` (a server's frame skips the throat,
     *    so the server writes the attention member itself); `detail: { scope, cause, axis?, found?, wayOut, sessionId }` — `axis` / `found` as the
     *    engine's cursor-refusal detail when the cause is `cursor_refused`. Once per parking per serving process; the sentence is the server's,
     *    and this engine only catalogues the code.
     *
     *  Deliberately NOT a notice family: brain retry/reconnect liveness (a rate limit, a 5xx, a
     *  transient network failure being retried). Those are per-attempt liveness frames with their own
     *  frequency semantics and ride the wire `status` channel ({@link BrainStatus}), whose sink the
     *  Runner establishes unconditionally around every brain-driving call — no host seat to wire, no
     *  console fallback to flood. A reader looking for retry disclosure should look there, not here. */
    code: string;
    /** The exact human-readable line the unwired build prints via `console.warn` — same words, one text. */
    message: string;
    /** Machine-readable facts of the notice (knob names, arriving values, values in force). On a notice a leg raises about
     *  itself, `detail.taskId` is that leg's own task id — the one value its prepare minted (`Prepared.taskId`: a background
     *  sub-agent's registry task id, else the host's declared `TaskSpec.taskId`, else the leg's session id) — read the same way by
     *  every such code; the per-code shapes below list it where a code carries it. */
    detail?: Record<string, unknown>;
    /** The owning session, when the notice HAS one — an ATTRIBUTION/correlation key, never a
     *  projection permission: whether a notice may be surfaced onto that session's user-facing
     *  stream is decided by the code's {@link NOTICE_AUDIENCE} row alone ("audience is entitlement,
     *  not routability" — several `"operator"` rows carry a sessionId purely for correlation, and a
     *  projector keying on presence would push deployment facts at end users). Presence only makes
     *  routing structurally POSSIBLE; a session-less code structurally cannot be routed at all.
     *  Mint sites do not set this: {@link deliverEngineNotice} — the ONE delivery throat — lifts a
     *  string `detail.sessionId` here, so the typed key and the detail carriage can never disagree.
     *  Optional and absent for process/config-scoped codes. */
    sessionId?: string;
    /** How much attention the code asks of its audience ({@link NoticeAttention}): its {@link NOTICE_ATTENTION} row, written here by
     *  {@link deliverEngineNotice} — the ONE delivery throat — for every catalogued code. A session screen shows a notice whose audience
     *  is `"user"` and whose attention is `"act"`. ABSENT = it has not said, never "ignorable": the delivering engine is older than this
     *  member, the code is not catalogued, or the host minted the frame itself ({@link NOTICE_MINTER} `"server"` codes skip the throat)
     *  and did not write it ({@link noticeAttentionOf}). The throat reads it off the catalog alone: a value a mint or a host carried
     *  into the throat is taken off, so a code outside the catalog always leaves without it. A reader falls back to its own
     *  `NOTICE_ATTENTION`; an unknown value reads `"act"`. */
    attention?: NoticeAttention;
    /** The fact this notice tells, for a code the throat tells once per session per fact ({@link NOTICE_FACT_KEY}): an opaque
     *  string, equal on two notices that tell the same fact, compared only for equality. Written by the throat from the catalog
     *  alone (a value carried into the throat is taken off); absent for every other code.
     *
     *  The engine is the one de-duplicator of a code that carries it: the throat has already told the fact once per session and
     *  lets it be told again only after the fact ended (or after a told record that did not persist). A later frame with the same
     *  `factKey` is therefore the fact happening again — a reader must show it as a new notice and never fold it into the earlier
     *  one. This frame carries no `groupKey` and never will: grouping a per-occurrence code (one with no `factKey`) is the
     *  reader's own choice, over the detail members it chooses. */
    factKey?: string;
}
export { announceDigest, endNoticeFact, factUnder, type NoticeTold } from "./notice-fact.js";
/** The seats a call site can name to the throat ({@link deliverEngineNotice}'s `seat`): what the one-time line for a seat that holds a value
 *  that is not a function calls it. A call site that names none is told with the seats the throat serves listed together. */
declare const NOTICE_SEAT_NAMES: {
    readonly runner: "RunnerDeps.onNotice";
    readonly environment: "the `onNotice` option of the execution environment";
    readonly toolkit: "the `onNotice` option of the toolkit";
};
export type NoticeSeatName = keyof typeof NOTICE_SEAT_NAMES;
/** Install the process's default notice seat, for what the engine says where no seat is in hand (a brain's construction, a route reading, a peer's dial,
 *  a store, a tool band, a process-level knob, a memory engine a host built itself): a second call replaces it, `undefined` removes it (such notices then
 *  print as one process line), a seat a station holds always wins, anything but a function or `undefined` is refused (`config.invalid_argument`). */
export declare function setDefaultEngineNoticeSeat(seat: ((notice: EngineNotice) => void) | undefined): void;
/** Test seam (mirrors `__resetBashTimeoutAnnouncements`): never called by production code. */
export declare function __resetMalformedNoticeSeatAnnouncement(): void;
/**
 * The ONE delivery form behind every {@link RunnerDeps.onNotice} emission point (#170: the form was
 * triplicated across the emission stations, and every copy judged the seat with `!== undefined` — so a
 * PRESENT non-function seat (null, a config typo, an untyped host's JSON wiring) entered the wired arm,
 * threw `TypeError` on the call, and the swallow guard silenced BOTH channels at once). Contract:
 *  · a FUNCTION seat REPLACES the console line (a host forwarding notices to its own surface must not
 *    show every fact twice), swallow-guarded against both failure shapes the void-typed seat admits —
 *    a synchronous throw and an async sink's rejected promise (unhandled, that rejection is a
 *    process-level fault): a notice sink must never turn an announcement into a failure. Deliberately
 *    NO console fallback on sink failure: loudness ownership transfers with the wiring, and a console
 *    echo of a transient sink failure would double-send the fact. Corollary kept as-is: stations that
 *    de-duplicate ledger the line BEFORE this call, so a true-function sink that throws can in
 *    principle lose a ledgered line for the process lifetime — un-ledgering after the fact would race
 *    an async sink's late rejection and re-announce (double-send) on transient failures.
 *  · a PRESENT NON-function seat is a bad deployment value, and #123 (loud-bad-value law) forbids
 *    folding it to silence: the notice itself is printed as a process line (no line is lost), and the
 *    seat defect — the one fact every fallback would otherwise repeat — is announced once per process.
 *  · an ABSENT seat goes to the default seat a host installed ({@link setDefaultEngineNoticeSeat}; a function seat as above, and
 *    a present seat — non-function included — never falls through to it), else prints the notice's `message` as one process line.
 *  · a seat is never handed a notice its own delivery raised: while a seat is being called (and in every promise and timer it
 *    starts from there), a notice bound for that same seat is printed as a process line instead. Two seats that raise notices
 *    for each other stop the same way, at the first seat met again.
 *  · the code's presentation leaves with the frame: its {@link EngineNotice.attention} (the code's attention row) and, for a code
 *    told once per session per fact, its {@link EngineNotice.factKey} — both written here, after the routing lift, so `admission`
 *    and every seat read the frame as it leaves.
 *  · `admission`, when given, is asked once with the notice as it will leave (after the text pass and the routing lift): `false`
 *    hands it to no seat. A predicate that answers `false` has already said so on its own account (the occupant judge mints its
 *    `delegation.delivery_discarded`); it only judges and never rewrites the notice — the mint stays at the call site.
 *  · `told`, when given, is the session's record of what it was told: a notice with a fact key that record already holds is
 *    handed to no seat; one it does not hold is delivered (by whichever arm below) and then recorded. A code without a fact key,
 *    or a delivery with no `told`, is delivered every time, as its mint site decides. The key never names the seat it went to.
 *
 *  · `seat`, when given, is the name the call site knows its `onNotice` by ({@link NoticeSeatName}); the one-time line that says a
 *    present seat holds a value that is not a function names that seat. A call site that does not name it is told with the seats the
 *    throat serves listed together.
 *
 * Every process line goes through one writer ({@link writeProcessLine}), which is guarded: what the engine says can never fail
 * the call that said it, whichever arm it leaves by.
 */
export declare function deliverEngineNotice(onNotice: ((notice: EngineNotice) => void) | undefined, notice: EngineNotice, admission?: (notice: EngineNotice) => boolean, told?: NoticeTold, seat?: NoticeSeatName): void;
/**
 * #259 loud half, one notice PER FAMILY (`task.user_steer_undrained` / `task.user_followup_undrained`):
 * a consumer routing on `code` alone must never mistake a stranded follow-up for a stranded steer, so
 * the code carries exactly the semantics its name claims — the same two-key split the settled frame
 * uses. Pure (the terminal sweep race window is not constructible deterministically; this seam is).
 *
 * `sessionId` (#433, additive and optional): these two codes are the `"user"` audience rows whose
 * subject is the END USER's own lost input, and a disclosure that cannot say WHICH session lost it
 * has nowhere to be delivered — the audience registry and the routing key are the two halves of one
 * answer. Carried in `detail` like every other session-attributed code, so {@link deliverEngineNotice}
 * — the one throat — lifts it to the typed top-level key and the two spellings cannot disagree.
 * Omitted when the caller has none (never fabricated: the message is what the run lost, and a made-up
 * routing key would deliver it to the wrong stream).
 *
 * `runId` (#499, additive and optional): THE key for this account. The two ids above name the task and
 * the conversation, and both answer the same value for two runs of one session whenever the host
 * supplies no task id — so two runs each stranding one steer produced two byte-identical rows, read as
 * one repeated disclosure about one run. The account is per-RUN by its own contract sentence ("at most
 * once per family, per run"), so it must carry the run's own id. Same omit-never-fabricate rule.
 */
/** What a settled leg still owes a person BEFORE the compensation lane has had its say: the facts the
 *  terminal-adoption lane holds, carried to the settle lane that closes the account
 *  ({@link settleOwedUserInput}). */
export interface OwedUserInputAccount {
    /** The harness's at-agent_end snapshot, held because the tail still had something to say about it. */
    readonly held: HeldUserInputs | undefined;
    /** What a durable park's migration carried onto the new checkpoint, by family (`inputIds`: which inputs they were). */
    readonly migrated: {
        steer: number;
        followUp: number;
        inputIds?: OwedInputIds;
    };
    /** The resumed leg's undelivered continuation frames, and how many of them the migration carried. */
    readonly continuation: {
        /** `inputId`: the frame's own correlation key (a parked entry always carries one). */
        frames: ReadonlyArray<{
            seq?: number;
            inputId?: string;
        }>;
        carried: number;
        /** The `inputId`s of the frames counted in `carried`, when the migration recorded them. */
        carriedInputIds?: ReadonlyArray<string>;
        /** The approving person's words (a `policy_ask` allow's `feedback`), counted APART from `frames`: owed, and how many the migration carried.
         *  They are on no row of their own, and a returned row (the compensation reopened it) does not carry them either — its next decide is a
         *  fresh one the host may re-supply them on — so, unlike the caller's own frames, they are not announced when the row came back (the row is
         *  pending again and the person is asked again). `refusal`: the code the parked-steer carrier answered when the pause tried to carry them
         *  (`steering.invalid_content` — over its bound; `steering.queue_full`), the store's own words; absent when no carry was refused. */
        approval?: {
            owed: number;
            carried: number;
            refusal?: ApprovalCarryRefusal;
        };
    };
}
/** The ids of person inputs, per lane — each the `inputId` the input was accepted under (the same key value on the live
 *  `human_input` frame and on a parked entry). */
export interface OwedInputIds {
    readonly steer: ReadonlyArray<string>;
    readonly followUp: ReadonlyArray<string>;
}
/** The harness's at-agent_end count of person inputs still queued, per lane, with the ids of the ones that carried a park
 *  record (a list shorter than its count names only some of them). */
export interface HeldUserInputs {
    steer: number;
    followUp: number;
    inputIds?: OwedInputIds;
}
/**
 * The ids of the person inputs a harness-side park-record list stands for: the `inputId` each record carries (the record is
 * the steer verb's own `PendingSteerInput`, opaque to the harness). Total — a record without a string id contributes none, so
 * its lane's list falls short of the count and {@link undrainedUserInputNotices} then leaves that lane's count without a list.
 */
export declare function parkedInputIdsOf(records: {
    readonly steer: ReadonlyArray<unknown>;
    readonly followUp: ReadonlyArray<unknown>;
}): OwedInputIds;
/**
 * What this leg still OWES a person, one count per family — the input to {@link undrainedUserInputNotices}.
 * TWO lanes accept caller input and either can be holding some when a run ends: the harness's live queue
 * (`held`, the at-agent_end snapshot, minus what a durable park migrated onto the new checkpoint) and a resumed
 * leg's undelivered continuation frames (`owedContinuation` — the checkpoint's parked steers and the caller's
 * wake message, minus what the same migration carried). They are ONE book: a frame is owed for the same reason
 * on either lane — accepted, and never in the transcript — and counting the live queue alone is what let a leg
 * that committed no pause drop a person's instruction in silence (the original row is already spent by then).
 */
export declare function owedUserInputCounts(held: {
    steer: number;
    followUp: number;
} | undefined, migrated: {
    steer: number;
    followUp: number;
}, continuation: {
    frames: ReadonlyArray<{
        seq?: number;
    }>;
    carried: number;
    rowReturned: boolean;
}): {
    steer: number;
    followUp: number;
};
/**
 * WHICH inputs {@link owedUserInputCounts} counts — the same two lanes and the same rule, read as ids: the live queue's ids
 * less the ones the park migrated, plus the continuation frames the reopen did not bring back and the migration did not
 * carry (steer lane). The counts stay the authority: {@link undrainedUserInputNotices} puts a lane's list on its notice only
 * where the list names exactly that many inputs, so an input with no id, or a migration that recorded none, leaves that
 * lane's count without a list rather than with a wrong one.
 */
export declare function owedUserInputIds(held: HeldUserInputs | undefined, migrated: {
    steer: number;
    followUp: number;
    inputIds?: OwedInputIds;
}, continuation: {
    frames: ReadonlyArray<{
        seq?: number;
        inputId?: string;
    }>;
    carried: number;
    carriedInputIds?: ReadonlyArray<string>;
    rowReturned: boolean;
}): OwedInputIds;
/** Close the account — the ONE settlement point, called AFTER the reopen compensation with what that
 *  compensation actually did. Ordering is the whole rule: the counts are arithmetic, and the only fact they
 *  cannot be computed without is one the lane before this one does not have yet. EXACTLY ONCE per account,
 *  which is what lets the teardown call it again as a backstop for a settle lane that threw on its way here
 *  (an account nobody closes is the silence this seat exists to end; a second row would be the same loss
 *  counted twice). Keyed on the account OBJECT — one per run, minted by the lane that assembles it. NEVER
 *  THROWS: a station calls it from a teardown path where the run is already failing, and a disclosure that
 *  takes the cleanup down with it is worse than the silence it was fixing (the delivery itself contains a
 *  throwing seat and a throwing console; the counting before it is what this guard is for). */
export declare function settleOwedUserInput(account: OwedUserInputAccount, rowReturned: boolean, ids: {
    taskId?: string;
    sessionId?: string;
    runId?: string;
    parent?: ParentLegIds | undefined;
}, onNotice: ((notice: EngineNotice) => void) | undefined): void;
/**
 * Why a person's input is reported as not consumed — the `detail.cause` of BOTH undrained families (`task.user_steer_undrained` /
 * `task.user_followup_undrained`; the family is the lane the input was queued on). This engine mints `leg_end` only (the leg ended with
 * the input still owed); every other member is a serving layer's arm — a loss this engine's process is not there to count — minted before
 * the session's next run (the one member-level exception to {@link import("./governance-codes.js").NOTICE_MINTER}'s `"engine"` rows):
 *  · `crashed` — the process died before the leg settled, with an input the serving layer accepted not confirmed consumed (it MAY have been);
 *  · `park_expired` — an input parked on a durable checkpoint's parked-steer queue whose row ended `expired` before any resume of it delivered
 *    it (`human_input` `applied`) or withheld it (`steering.parked_input_blocked`); told on the row's run session (`checkpointRunSessionOf`), no parent copy.
 */
export declare const USER_INPUT_UNDRAINED_CAUSES: readonly ["leg_end", "crashed", "park_expired"];
export type UserInputUndrainedCause = (typeof USER_INPUT_UNDRAINED_CAUSES)[number];
/** What the parked-steer carrier answered (the checkpoint store's own refusal codes, not a set of this notice) when a pause tried to carry an
 *  approving person's words: refused as content / over its bound, or its queue was full. `detail.carry` of the approval row, absent otherwise. */
export type ApprovalCarryRefusal = "steering.invalid_content" | "steering.queue_full";
/**
 * The two families of the stranded-input account, keyed by the lane the input was queued on (`injectionLaneOf` maps a steer's
 * tier to it): the notice `code` the family is announced under, and the `detail` key that carries its count
 * (`detail[countKey]`, beside `cause`). {@link undrainedUserInputNotices} writes its rows with exactly these two spellings, so a
 * serving layer that mints one of its arms picks its family by lane and spells code and count key the way the engine does.
 */
export declare const USER_INPUT_UNDRAINED_FAMILIES: Readonly<{
    readonly steer: Readonly<{
        readonly code: "task.user_steer_undrained";
        readonly countKey: "steer";
    }>;
    readonly followUp: Readonly<{
        readonly code: "task.user_followup_undrained";
        readonly countKey: "followUp";
    }>;
}>;
/** Where a child leg's account is ALSO announced: its spawner's session, and that run's task id when the spawner carried one
 *  (it never carries the run id, and the row never invents one). */
interface ParentLegIds {
    readonly sessionId: string;
    readonly taskId?: string;
}
/**
 * The parent a leg reports to, read off the trusted run-scoped channel (`RunInternals.parentSessionId` / `parentTaskId`,
 * threaded by the delegation lanes from the spawner's own ids). `undefined` for a leg with no parent SESSION — a row
 * with no session to address cannot be projected anywhere, so a bare `parentTaskId` names no one.
 */
export declare function parentLegIds(internals: {
    readonly parentSessionId?: string;
    readonly parentTaskId?: string;
} | undefined): ParentLegIds | undefined;
/**
 * The rows for what a leg still owes a person. One session's view is the leg's own rows (`taskId` / `sessionId` /
 * `runId` — each omitted when the caller has none, never fabricated). A leg that has a PARENT is announced to it as well,
 * the way a child's folded permission mode is: after the leg's own rows come one copy per row, `detail.sessionId` the
 * parent's (and `taskId` the parent run's, when carried), `childSessionId` the leg's own session — the key a
 * consumer reads "a child reported this" from — and the message tail `(a child leg, <childSessionId>)`. The copy carries
 * no `runId`: the account is per run and nothing carries the parent's. Only the DIRECT parent hears: a grandchild's
 * row reaches its parent's session (the middle leg), not the root's. A parent that is no addressee — null, no or an empty session, or the leg's own session (which already
 * hears the row) — gets no copy, and the call never throws on it.
 *
 * @contract notice.user_input_undrained.handoff — a row's `detail.inputIds` names exactly the unread inputs it counts (present
 * when the list covers the count; a row of approval words carries none): each input's `inputId` — the one its caller handed the
 * steer verb (or the parked-steer append, `CheckpointStore.setPendingSteer`), else the one the engine minted at acceptance. An
 * input parked on a checkpoint keeps its id (the entry freezes it), so a resume's `applied` frame and a resumed leg's row name the
 * same one. A minted id is published only on the input's `human_input` frames, which carry no text, and neither call returns it —
 * so it is no key a caller can tie back to its own call: a host that means to re-send sends every steer with its own `inputId`,
 * and the row hands its ids back. The engine keeps no state across runs and never carries an unread input to a later run itself (a durable park is the one
 * carrier: the resume delivers it with no row — or, when the deployment's prompt screen withholds it on redelivery, tells it by
 * `steering.parked_input_blocked` under the same `detail.inputId`, not by this row). A host that re-sends an input under the same
 * `inputId` to a later run gets that run's own answer — read (its `applied` frame, no row) or not read (a row of that run, the
 * same id, that run's `runId`) — so the leg's own `leg_end` rows naming one `inputId` count the runs that ended with it unread (a parent's
 * copy, the row carrying `childSessionId`, repeats its child's row and is not another time; a `park_expired` row is a card that
 * expired holding it, not a run). The row's sentence states the
 * engine's part only ("NOT redelivered" by the engine); whether to re-send, and what the person is shown, is the host's.
 */
export declare function undrainedUserInputNotices(counts: {
    steer: number;
    followUp: number;
    inputIds?: {
        steer?: ReadonlyArray<string>;
        followUp?: ReadonlyArray<string>;
    };
    approvalFeedback?: number;
    approvalCarry?: ApprovalCarryRefusal;
}, taskId?: string, sessionId?: string, runId?: string, parent?: ParentLegIds): EngineNotice[];