@sema-agent/core
Version:
Stateless, task-oriented AI agent core
965 lines • 68.4 kB
TypeScript
import type { AssertAllKeysHandled } from "./ask-origin.js";
/** The engine's one retry vocabulary, defined here and nowhere else — can repeating the same request succeed?
* `transient` = a later retry can succeed with nothing changed first (the cause clears by itself, with no stated
* horizon: a control plane briefly absent, contention, an interrupted call); `terminal` = repeating it changes
* nothing until something named changes first — a verdict (a policy, or a usage window until the `retryAfterMs` it
* states), the deployment, the store or the input. Governance codes and file-history faults answer in it. */
export type GovernanceRetryClass = "transient" | "terminal";
/** Is `value` one of the two words — the one membership reading (keyed by the type: a word added there is a missing
* row here, at compile time). */
export declare function isGovernanceRetryClass(value: unknown): value is GovernanceRetryClass;
/**
* The closed governance-code registry. tsc forces every entry to a valid class; the gate test
* forces the naming convention and pack-family completeness. Adding a code = one deliberate row.
*/
export declare const GOVERNANCE_CODES: {
readonly "usage.window_exhausted": "terminal";
readonly "memory.admission_required": "transient";
readonly "memory.admission_denied": "terminal";
readonly "config.compliance_required": "transient";
readonly "config.compliance_denied": "terminal";
readonly "config.locked_key": "terminal";
readonly "memory.capture_optout_denied": "terminal";
};
export type GovernanceCode = keyof typeof GOVERNANCE_CODES;
/**
* `memory.*` error codes DELIBERATELY outside governance: engine incident codes (announce /
* partition incidents, tail truncation, consolidation outcomes) —
* mechanical faults and disclosures, not per-principal policy verdicts; they classify
* as `logic`. The gate test forces every `memory.*` literal minted in src/ to appear EITHER in
* {@link GOVERNANCE_CODES} or here — a new code gets NAMED and dispositioned, never silently
* classified.
*
* THREE dispositions cover every row below, and each group NAMES the one it takes instead of
* re-deriving it:
* · POSTURE — a disclosure about something that already happened (a mark, a hold, a withholding, a
* recommendation, a declared trust boundary). The act is done when the code mints, so no principal
* is judged and there is no retry decision to carry.
* · CONTROL-PLANE IO — a mechanical fault on the engine's own account (a durable write, a sweep, a
* lease, a backend, a rebuildable projection). Operator attention, never a verdict.
* · CALLER SHAPE — a refusal thrown at a HOST valve API (missing audit attribution, an
* out-of-vocabulary verdict or action, an unknown id, an unresolvable row state). Retrying the same
* wrong call cannot succeed, which is why no retry class fits it either.
*/
export declare const NON_GOVERNANCE_MEMORY_CODES: ReadonlySet<string>;
/**
* Look up a code's governance retry class. Registered code ⇒ its table class; unregistered
* `usage.*` ⇒ `"terminal"` (the prefix family's shipped classification); anything else ⇒
* `undefined` (NOT governance — the caller falls through to its ordinary taxonomy).
*/
export declare function governanceRetryClass(code: string): GovernanceRetryClass | undefined;
/**
* The CLOSED set of codes the `spec.tools` DECLARATION door refuses a caller's tool entry with, at prepare,
* before anything mounts: the entry cannot be built from its own members, or the caller changed its array after the run
* fixed the roster (`config.tool_mount_denied`), a
* member over a roster row's wire bound (`config.tool_roster_bound` / `config.tool_name_too_long` /
* `config.tool_contract_too_long`), a schema over the row's key bounds (`config.tool_schema_bound`), a
* declared face or result card the schema / namespace cannot carry, a `perTurn` member other than `true`, or a per-turn tool whose
* name or alias another mounted tool also answers to (`config.tool_face_invalid` — also the code an MCP server entry's
* unreadable `toolFaces` is refused with at the task preparation door and at `materializeMcpTools`), a name or
* alias outside the caller tool name contract — one no rule can name, or one carrying the protocol namespace separator
* (`config.tool_name_invalid`), an egress tool declared other than
* `write` (`config.egress_requires_write_effect` — also minted, same meaning, for a protocol tool's resolved
* axes), a name the run reserves for a tool the engine injects (`config.reserved_tool_name` — structured output,
* the skill tool, tool search, the offload reader, an injected protocol tool; `runGoal`'s completion tool, which
* refuses before any run). `config.tool_roster_bound` is also the roster's own bound: a leg whose mounted face would mint more
* than `TOOL_ROSTER_MAX_ENTRIES` rows is refused where prepare mints the roster, after the mounts and before any row; at
* run time the same judge refuses a domain swap over it, and the MCP refresh / re-dial reads that refusal as the server's
* empty listing, not as the run's failure. Each prepare-time refusal ends the run `failed` with the code on
* `terminal.code`. A caller-shape refusal, not a policy
* verdict: none of these is a governance code ({@link GOVERNANCE_CODES}); re-issuing the same declaration
* changes nothing. Every mint site at the door types its code against this set.
*/
export declare const TOOL_DECLARATION_CODES: readonly ["config.tool_mount_denied", "config.tool_roster_bound", "config.tool_name_too_long", "config.tool_contract_too_long", "config.tool_schema_bound", "config.tool_face_invalid", "config.tool_name_invalid", "config.egress_requires_write_effect", "config.reserved_tool_name"];
/** A code in {@link TOOL_DECLARATION_CODES}. */
export type ToolDeclarationCode = (typeof TOOL_DECLARATION_CODES)[number];
/**
* The CLOSED registry of reasons a permission-rule sync round may refuse an inbound record or move a
* local row into the quarantine area (design/182 §4.3/§5.2/§8.1). Same doctrine as
* {@link GOVERNANCE_CODES}: the machine reads THIS table, never free text — "silently dropped" is a
* contract violation, so every drop names a registered code and a consumer can branch on it.
*
* These are DISCLOSURE codes, not subagent error codes: they never enter {@link GOVERNANCE_CODES}
* (that table classifies a failed child's error for retry, and its gate enforces a suffix convention
* these codes do not carry). The value states which side of the wire loses bytes:
* `inbound-refused` = the peer's copy was refused here (the peer still holds it — no loss);
* `local-quarantined` = a LOCAL row left the live view into the quarantine area (bytes preserved,
* disclosed, re-enterable only through a new consent).
*/
export declare const RULE_SYNC_DROP_CODES: {
/** The single validator refused the rule text (e.g. a bare-interpreter prefix). Both directions. */
readonly invalid_rule_text: "inbound-refused-or-local-quarantined";
/** Stored tool/match/command disagree with the re-projection of the rule text. Both directions. */
readonly metadata_mismatch: "inbound-refused-or-local-quarantined";
/** An inbound dot claims THIS replica's actor above its minted counter — forgery on our own name.
* Covers adds, a tombstone's `deletedBy`, AND a tombstone's `removedDots` (a tombstone naming our
* future dot would pre-position a kill for an approval not yet given). */
readonly own_actor_forged: "inbound-refused";
/** An inbound add reuses a dot that already identifies a DIFFERENT (rule, scope) row — a dot is
* minted once for one add, so a reuse is damage or forgery, and admitting it would let quarantine
* or tombstone identity on one row reach the other. */
readonly dot_identity_conflict: "inbound-refused";
/** A live local add at-or-below the collected GC frontier and absent from the inbound state — the
* residue of an already-recycled tombstone. Never resurrected; quarantined and disclosed. */
readonly below_gc_frontier: "local-quarantined";
/** The server refused this local row (its response `dropped` names it); it leaves the live view so
* it does not ride — and get refused on — every future round. */
readonly server_rejected: "local-quarantined";
/** design/382 §4.3 — the row carries a SESSION scope, which the durable face (store, sync wire,
* at-rest bytes) structurally never holds: a session authorization lives in its session's overlay
* and dies with it. The row is dropped and disclosed, never landed and never quarantined (the
* quarantine area is itself durable — parking a session row there would persist it). Inbound-
* refused in every reachable case: the direct write arms refuse session scopes LOUDLY
* (`unsupported.session_scope_store`) before one can become local. */
readonly session_scope_not_durable: "inbound-refused";
};
/** Every reason a sync round may drop or quarantine a record. Closed set; free text is not a member. */
export type RuleSyncDropReason = keyof typeof RULE_SYNC_DROP_CODES;
/** The subset that may appear on a LOCAL quarantined row (design/182 §8.1 `quarantine` instruction /
* fence arm / local screening). `own_actor_forged` is inbound-only by construction;
* `session_scope_not_durable` never quarantines — the quarantine area is durable, and a session row
* parked there would be a session row persisted (design/382 §4.3). */
export type RuleQuarantineReason = Exclude<RuleSyncDropReason, "own_actor_forged" | "session_scope_not_durable">;
/**
* WHO a notice code is for. `"user"` = a session-scoped disclosure the end user of that session is
* entitled to see (safe to project onto that session's event stream); `"operator"` = a
* deployment/config/ops fact for whoever runs the process.
*
* Two values, deliberately. "Can this notice be routed to a session" is NOT an audience value — it
* is the presence of `EngineNotice.sessionId`, a per-EMISSION fact. A third value would fold a
* routing property into an entitlement vocabulary, and the two answer different questions: several
* codes below carry a session attribution while the person entitled to the fact is still the
* operator (a failed offload write, a routing fallback, a consolidation recommendation).
*
* Entitlement is who has the right to know, not who can fix it. A fact that changed what THIS session's run did —
* a deny row not kept under a recursive read, a model word the person named that the catalog does not hold, an input
* withheld from the model — is the session user's to hear even when the remedy is the operator's; a row stays
* `"operator"` only when the run itself is unchanged and the fact is the deployment's own.
*
* The audience answers who has the right to know, never whether the fact goes on the session's screen: that is
* {@link NoticeAttention}, the second property of every code.
*/
export type NoticeAudience = "user" | "operator";
/**
* HOW MUCH ATTENTION a notice code asks of whoever its audience names — the second property of every catalogued code,
* orthogonal to {@link NoticeAudience} (every one of the six pairs has codes):
* · `"act"` — that party has something to do, or must not go on believing what is not so (a person's input not used,
* a tool set missing, a requested protection not in force; for an operator: a value, seat or wiring to fix);
* · `"inform"` — a fact that party may want when it comes to look (a posture, an advisory, a contained failure);
* · `"audit"` — a record: the echo of an action that party (or its deployment) just took, or a lifecycle step whose
* fact another record also carries.
*
* The reading a surface applies: the session's screen shows a notice whose audience is `"user"` AND whose attention is
* `"act"`; `"inform"` belongs on the surface a person opens to look (a status view); `"audit"` is for machine readers
* only. An `"operator"` code's attention speaks to the operator's surfaces and never puts it on a session's screen.
*
* Like the audience it is a property of the CODE, read from {@link NOTICE_ATTENTION}; the delivery throat stamps it on
* each frame ({@link import("./engine-notice.js").EngineNotice.attention}) so a reader built against another version of
* this package reads the answer of the engine that minted the frame. A frame WITHOUT it has not said, which is not
* "ignorable": it was delivered by an engine older than this property, or carries a code outside the catalog, or was minted
* by the host itself — a {@link NOTICE_MINTER} `"server"` code does not pass the throat, so its minter writes the member
* ({@link noticeAttentionOf}) or leaves it off. Such a reader falls back to the table it was built with. A value the
* reader does not know (a later version may add a word) reads as `"act"`.
*/
export type NoticeAttention = "act" | "inform" | "audit";
/**
* The CLOSED catalog of EngineNotice codes — every code this engine mints, plus the few a server mints through the
* same sink ({@link NOTICE_MINTER}) — the enumeration half of the presentation registry below, and the thing a
* consumer's own audience table can be diffed against (that is the point of exporting it: a downstream table with a
* row missing, or a row for a code no longer minted, is a mechanically detectable disagreement rather than an
* argument).
*
* Kept in LOCKSTEP with {@link NOTICE_AUDIENCE} and {@link NOTICE_MINTER} by the compiler (`satisfies
* Record<EngineNoticeCode, …>` below: a catalog entry with no row, or a row for a non-member, is a tsc error — a
* mirrored enumeration that is only checked at runtime is a mirror that drifts). The other half — "is the catalog
* itself still complete?" — cannot be a type: `EngineNotice.code` is declared `string` (a host may forward its own),
* so the gate test (governance-codes.test.ts) scans src/ for notice mint shapes and names any code that is minted but
* unregistered, an engine-minted code that is no longer minted, or a server-minted code minted here.
*
* Each row's own story — what fires it, its `detail` shape, its dedup unit and its audience — lives at
* the union's catalog ({@link EngineNotice.code}). The groups below say only which family a row joins,
* so the catalog is not written a second time here and the two cannot drift.
*/
export declare const ENGINE_NOTICE_CODES: readonly ["config.autocompact_window_clamped", "config.env_timeout_discarded", "config.materialize_env_discarded", "config.models_swapped", "config.context_settings_swapped", "config.read_face_swapped", "config.read_face_deployment_clamped", "config.write_face_swapped", "config.write_face_deployment_clamped", "config.read_deny_swapped", "config.memory_consolidation_driver_swapped", "config.tool_model_gate_removed", "config.tool_model_gate_unknown_class", "config.tool_model_gate_env_invalid", "config.artifact_host_invalid", "config.task_root_not_canonical", "config.write_protection_target_view_absent", "config.path_view_unresolved", "config.execution_env_capability_invalid", "config.execution_env_failure_contract_broken", "config.read_deny_floor_unkept", "config.read_floor_confinement_unavailable", "config.inherit_env_declared_late", "config.model_shell_unmounted", "config.shell_state_env_dropped", "config.command_sandbox_unavailable", "config.tool_card_undeclared", "config.tool_face_undeclared", "config.tool_face_invalid", "config.host_sink_failed", "config.seat_malformed", "config.session_delete_withheld", "config.env_knob_adjusted", "config.read_deny_home", "config.permission_rules_skipped", "config.process_start_time_unavailable", "config.data_root_spelling_split", "config.durable_gate_unavailable", "config.peer_admission_out_of_range", "config.peer_lane_unmounted", "config.scheduler_store_unmoved", "config.secret_env_scrubbed", "inherit_env.names_withheld", "config.credential_not_withheld", "config.cross_boundary_posture_undeclared", "config.cross_boundary_record_unwritten", "config.plaintext_origins_admitted", "config.second_engine_copy", "config.permission_mode_unavailable", "permission.rule_store_unavailable", "permission.rule_store_unreadable_relaxed", "config.entries_not_applied", "config.session_rules_earlier_grammar", "config.session_rules_reread", "config.skill_deny_unreadable", "config.legacy_tool_name", "config.toolpolicy.unmatched_names", "config.agent.unknown_tool", "permission.allow_rule_not_used_in_auto", "permission.revival_root_policy_unrestated", "mods.registration_refused", "mods.registration_refused_deployment", "mods.display_withheld", "mods.stop_ended", "mods.stop_continue_dropped", "mods.package_key_unread", "peer.inbound_disposition", "peer.inbound_unread", "peer.notice_user_only", "peer.receipt_delivered_user_only", "peer.held_settled", "peer.held_approval_unhonored", "peer.held_decision_applied", "peer.idle_subscription", "peer.idle_subscription_declined", "classifier.denial_limit", "classifier.fallback", "classifier.seat_rate_limited", "classifier.role_defaulted", "classifier.contract_broken", "classifier.unavailable", "classifier.unavailable_handed_on", "classifier.review_skipped", "checkpoint.execution_outcome_unrecorded", "delegation.transcript_integrity", "delegation.ask_unresolvable", "delegation.resume_lane_missing", "delegation.spawn_depth_unknown", "delegation.delivery_discarded", "delegation.settlement_external", "delegation.settlement_write_failed", "delegation.durable_row_unpersisted", "delegation.parked_card_unreadable", "delegation.parked_card_id_untrusted", "delegation.agent_row_ending_unreadable", "protocol.revocation_probe_failed", "mcp.server_redialed", "mcp.authorization_required", "mcp.server_unavailable", "mcp.server_connecting", "mcp.credential_echoed", "a2a.peer_card_drift", "mcp.server_stderr", "workflow.governance_key_stripped", "workflow.agent_option_ignored", "workflow.parked_decision_unused", "workflow.parked_decision_used", "workflow.record_unwritten", "memory.session_polluted", "memory.harvest_quarantined", "memory.harvest_refused", "memory.harvest_conflict", "memory.delegation_static_mark_waived", "memory.content_class_declared", "memory.hold_opened", "memory.hold_released", "memory.hold_disposed", "memory.consolidation_recommended", "memory.consolidation_committed", "memory.consolidation_conflict", "memory.consolidation_incomplete", "memory.consolidation_refused", "memory.consolidation_withheld", "memory.restore_withheld", "memory.project_scope_absent", "memory.notice_unscoped", "route.fallback_to_primary", "route.classifier_unroutable", "route.seat_detached", "advisor.not_attached", "route.credential_origin_mismatch", "route.credential_mismatch", "route.credential_rebound", "route.response_model_mismatch", "route.tool_call_id_folded", "route.finish_reason_unknown", "route.stream_end_ignored", "route.stream_content_dropped", "route.extra_body_reserved_dropped", "model.capability_downgraded", "model.fast_mode_changed", "model.fallback", "model.fallback_side_call", "context.tool_turn_repaired", "context.media_removed", "context.tool_schema_removed", "context.messages_omitted", "instructions.withheld", "instructions.outside_root", "instructions.truncated", "instructions.family_undeclared", "task.user_steer_undrained", "task.user_followup_undrained", "task.undelivered_input_dropped", "steering.parked_input_blocked", "task.turn_interrupted", "task.halt_unconsumed", "mods.turn_aborted", "mods.turn_abort_unconsumed", "task.late_approval", "task.interrupt_unconsumed", "task.wait_ceiling_reached", "task.manager_launch_narrowed", "task.completed_past_limit", "task.verdict_refused", "task.tool_turn_incomplete", "task.tool_turn_unrecovered", "approval.read_root_granted", "approval.read_root_grant_rejected", "approval.session_call_granted", "approval.session_call_grant_rejected", "approval.approver_defect", "memory.capture_opted_out", "memory.capture_switched_off", "memory.capture_optout_unpersisted", "memory.mount_failed", "skills.listing_truncated", "agents.listing_truncated", "tool_result.offload_put_failed", "tool_result.offload_put_unsettled", "tool_result.media_refused", "tool_result.media_persisted", "tool_result.read_refused", "artifact.owner_refused", "config.image_processor_unavailable", "fs.staging_file_left", "fs.staging_file_swept", "store.tail_segment_unjudged", "store.lock_retained", "store.lock_reclaimed_on_declaration", "store.append_log_parked", "store.tree_id_stamp_incomplete", "store.process_anchor_unavailable", "store.process_anchor_lost", "engine.debug_trace", "session.lineage_rerooted", "rewind.boundary_unrecorded", "rewind.file_left_as_is", "verify.verifier_is_implementer", "workspace.sync_failed", "memory.layer_locked_legacy", "server.model_unreachable", "permission.entry_mode_clamped", "model.context_window_assumed", "config.store_ephemeral", "memory.sync_layer_parked", "config.read_deny_request_excluded"];
/** A catalogued code (see {@link ENGINE_NOTICE_CODES}); {@link NOTICE_MINTER} says who mints it. NOT the type of
* `EngineNotice.code`, which stays `string` — a host forwarding its own notices through the same
* sink is a supported shape, and narrowing that field would break it. */
export type EngineNoticeCode = (typeof ENGINE_NOTICE_CODES)[number];
/**
* The presentation-tier registry (the server's wire whitelist retires into this table once
* shipped): one row per {@link ENGINE_NOTICE_CODES} member. Presentation tier is a property of the
* CODE (closed set, one code one tier) — never of an individual emission, which is why this is a
* registry and not an EngineNotice field (the attention row beside it is the same kind of property: the
* delivery throat copies the code's value onto each frame, and no mint site chooses it). Codes absent from the table (a host's own code forwarded
* through the same sink) read as `"operator"`: the conservative default, never push an unclassified
* code at an end user. Orthogonal to {@link NON_GOVERNANCE_MEMORY_CODES} (a retry-semantics table,
* not presentation).
*
* The judgment applied per row: WHO IS ENTITLED to the fact, not who could be shown it. A notice
* that a session can be attributed to is still an operator's fact when the person who would act on
* it runs the deployment — three rows below are exactly that case and say so. Whether an entitled
* person is shown it on the session's screen is the code's attention row ({@link NOTICE_ATTENTION_TABLE}),
* not this one.
*/
declare const NOTICE_AUDIENCE_TABLE: {
readonly "memory.session_polluted": "user";
readonly "memory.harvest_quarantined": "user";
readonly "memory.harvest_refused": "user";
readonly "memory.harvest_conflict": "user";
readonly "memory.delegation_static_mark_waived": "user";
readonly "memory.hold_opened": "user";
readonly "memory.hold_released": "user";
readonly "memory.hold_disposed": "user";
readonly "task.user_steer_undrained": "user";
readonly "task.user_followup_undrained": "user";
readonly "task.undelivered_input_dropped": "user";
readonly "classifier.denial_limit": "user";
readonly "classifier.unavailable": "user";
readonly "classifier.unavailable_handed_on": "user";
readonly "classifier.review_skipped": "user";
readonly "classifier.fallback": "operator";
readonly "classifier.seat_rate_limited": "user";
readonly "classifier.role_defaulted": "operator";
readonly "classifier.contract_broken": "operator";
readonly "task.turn_interrupted": "user";
readonly "mods.turn_aborted": "user";
readonly "mods.turn_abort_unconsumed": "user";
readonly "steering.parked_input_blocked": "user";
readonly "task.halt_unconsumed": "user";
readonly "task.late_approval": "user";
readonly "task.interrupt_unconsumed": "user";
readonly "task.wait_ceiling_reached": "user";
readonly "task.manager_launch_narrowed": "user";
readonly "task.tool_turn_incomplete": "user";
readonly "task.tool_turn_unrecovered": "user";
readonly "task.completed_past_limit": "operator";
readonly "route.finish_reason_unknown": "user";
readonly "route.stream_end_ignored": "user";
readonly "route.stream_content_dropped": "user";
readonly "route.credential_origin_mismatch": "user";
readonly "route.credential_mismatch": "user";
readonly "approval.read_root_granted": "user";
readonly "approval.read_root_grant_rejected": "user";
readonly "approval.session_call_granted": "user";
readonly "approval.session_call_grant_rejected": "user";
readonly "approval.approver_defect": "operator";
readonly "config.durable_gate_unavailable": "user";
readonly "config.permission_mode_unavailable": "user";
readonly "permission.rule_store_unavailable": "user";
readonly "permission.rule_store_unreadable_relaxed": "operator";
readonly "config.entries_not_applied": "user";
readonly "config.session_rules_earlier_grammar": "user";
readonly "config.session_rules_reread": "user";
readonly "config.skill_deny_unreadable": "user";
readonly "config.legacy_tool_name": "user";
readonly "config.toolpolicy.unmatched_names": "user";
readonly "config.agent.unknown_tool": "user";
readonly "permission.allow_rule_not_used_in_auto": "user";
readonly "permission.revival_root_policy_unrestated": "operator";
readonly "mods.registration_refused": "user";
readonly "mods.display_withheld": "user";
readonly "mods.stop_ended": "user";
readonly "mods.stop_continue_dropped": "user";
readonly "memory.capture_opted_out": "user";
readonly "memory.capture_switched_off": "user";
readonly "memory.capture_optout_unpersisted": "user";
readonly "memory.mount_failed": "user";
readonly "memory.consolidation_withheld": "operator";
readonly "delegation.ask_unresolvable": "user";
readonly "workflow.parked_decision_unused": "user";
readonly "workflow.parked_decision_used": "user";
readonly "task.verdict_refused": "user";
readonly "inherit_env.names_withheld": "user";
readonly "mods.registration_refused_deployment": "operator";
readonly "config.autocompact_window_clamped": "operator";
readonly "config.env_timeout_discarded": "operator";
readonly "config.materialize_env_discarded": "operator";
readonly "config.models_swapped": "operator";
readonly "config.context_settings_swapped": "operator";
readonly "config.read_face_swapped": "operator";
readonly "config.read_face_deployment_clamped": "operator";
readonly "config.write_face_swapped": "operator";
readonly "config.write_face_deployment_clamped": "operator";
readonly "config.read_deny_swapped": "operator";
readonly "config.memory_consolidation_driver_swapped": "operator";
readonly "config.tool_model_gate_removed": "operator";
readonly "config.tool_model_gate_unknown_class": "operator";
readonly "config.tool_model_gate_env_invalid": "operator";
readonly "config.artifact_host_invalid": "operator";
readonly "config.task_root_not_canonical": "operator";
readonly "config.write_protection_target_view_absent": "operator";
readonly "config.path_view_unresolved": "operator";
readonly "config.execution_env_capability_invalid": "operator";
readonly "config.execution_env_failure_contract_broken": "operator";
readonly "config.read_deny_floor_unkept": "user";
readonly "config.read_floor_confinement_unavailable": "operator";
readonly "config.inherit_env_declared_late": "operator";
readonly "config.model_shell_unmounted": "operator";
readonly "config.shell_state_env_dropped": "operator";
readonly "config.command_sandbox_unavailable": "user";
readonly "config.tool_card_undeclared": "operator";
readonly "config.tool_face_undeclared": "operator";
readonly "config.tool_face_invalid": "user";
readonly "config.peer_lane_unmounted": "operator";
readonly "config.scheduler_store_unmoved": "operator";
readonly "config.peer_admission_out_of_range": "operator";
readonly "config.secret_env_scrubbed": "operator";
readonly "config.credential_not_withheld": "operator";
readonly "config.cross_boundary_posture_undeclared": "operator";
readonly "config.cross_boundary_record_unwritten": "operator";
readonly "config.plaintext_origins_admitted": "operator";
readonly "config.second_engine_copy": "operator";
readonly "peer.inbound_disposition": "user";
readonly "peer.held_settled": "user";
readonly "peer.idle_subscription": "user";
readonly "peer.inbound_unread": "user";
readonly "peer.notice_user_only": "user";
readonly "peer.receipt_delivered_user_only": "user";
readonly "peer.held_approval_unhonored": "user";
readonly "peer.held_decision_applied": "user";
readonly "peer.idle_subscription_declined": "user";
readonly "delegation.transcript_integrity": "operator";
readonly "delegation.resume_lane_missing": "operator";
readonly "delegation.spawn_depth_unknown": "operator";
readonly "delegation.delivery_discarded": "operator";
readonly "checkpoint.execution_outcome_unrecorded": "operator";
readonly "protocol.revocation_probe_failed": "operator";
readonly "mcp.server_redialed": "operator";
readonly "mcp.authorization_required": "user";
readonly "mcp.server_unavailable": "user";
readonly "mcp.server_connecting": "user";
readonly "mcp.credential_echoed": "operator";
readonly "a2a.peer_card_drift": "operator";
readonly "mcp.server_stderr": "operator";
readonly "workflow.governance_key_stripped": "operator";
readonly "workflow.agent_option_ignored": "operator";
readonly "mods.package_key_unread": "operator";
readonly "workflow.record_unwritten": "operator";
readonly "memory.content_class_declared": "operator";
readonly "memory.consolidation_recommended": "operator";
readonly "memory.consolidation_committed": "operator";
readonly "memory.consolidation_conflict": "operator";
readonly "memory.consolidation_incomplete": "operator";
readonly "memory.consolidation_refused": "operator";
readonly "memory.restore_withheld": "operator";
readonly "memory.project_scope_absent": "operator";
readonly "route.fallback_to_primary": "operator";
readonly "route.classifier_unroutable": "operator";
readonly "route.seat_detached": "operator";
readonly "route.credential_rebound": "operator";
readonly "advisor.not_attached": "user";
readonly "route.response_model_mismatch": "operator";
readonly "route.tool_call_id_folded": "operator";
readonly "route.extra_body_reserved_dropped": "operator";
readonly "model.capability_downgraded": "user";
readonly "model.fast_mode_changed": "user";
readonly "model.fallback": "user";
readonly "model.fallback_side_call": "operator";
readonly "context.tool_turn_repaired": "operator";
readonly "context.media_removed": "user";
readonly "context.tool_schema_removed": "user";
readonly "context.messages_omitted": "user";
readonly "instructions.withheld": "user";
readonly "instructions.outside_root": "user";
readonly "instructions.truncated": "user";
readonly "instructions.family_undeclared": "operator";
readonly "skills.listing_truncated": "operator";
readonly "agents.listing_truncated": "operator";
readonly "tool_result.offload_put_failed": "operator";
readonly "tool_result.offload_put_unsettled": "operator";
readonly "tool_result.media_refused": "operator";
readonly "tool_result.media_persisted": "operator";
readonly "tool_result.read_refused": "operator";
readonly "artifact.owner_refused": "operator";
readonly "config.image_processor_unavailable": "operator";
readonly "fs.staging_file_left": "operator";
readonly "fs.staging_file_swept": "operator";
readonly "session.lineage_rerooted": "user";
readonly "rewind.boundary_unrecorded": "user";
readonly "rewind.file_left_as_is": "user";
readonly "verify.verifier_is_implementer": "user";
readonly "config.host_sink_failed": "operator";
readonly "config.seat_malformed": "operator";
readonly "config.session_delete_withheld": "operator";
readonly "config.env_knob_adjusted": "operator";
readonly "config.read_deny_home": "operator";
readonly "config.permission_rules_skipped": "operator";
readonly "config.process_start_time_unavailable": "operator";
readonly "config.data_root_spelling_split": "operator";
readonly "store.tail_segment_unjudged": "operator";
readonly "store.lock_retained": "operator";
readonly "store.lock_reclaimed_on_declaration": "operator";
readonly "store.append_log_parked": "operator";
readonly "store.tree_id_stamp_incomplete": "operator";
readonly "store.process_anchor_unavailable": "operator";
readonly "store.process_anchor_lost": "operator";
readonly "memory.notice_unscoped": "operator";
readonly "delegation.settlement_external": "operator";
readonly "delegation.settlement_write_failed": "operator";
readonly "delegation.durable_row_unpersisted": "operator";
readonly "delegation.parked_card_unreadable": "operator";
readonly "delegation.parked_card_id_untrusted": "operator";
readonly "delegation.agent_row_ending_unreadable": "operator";
readonly "engine.debug_trace": "operator";
readonly "workspace.sync_failed": "operator";
readonly "server.model_unreachable": "user";
readonly "permission.entry_mode_clamped": "user";
readonly "model.context_window_assumed": "user";
readonly "memory.layer_locked_legacy": "operator";
readonly "config.store_ephemeral": "user";
readonly "memory.sync_layer_parked": "user";
readonly "config.read_deny_request_excluded": "user";
};
/** Compile-time fence: every catalogued code has an audience row (and, via `satisfies`, only those). */
export type AudienceTableCoversEveryNoticeCode = AssertAllKeysHandled<Exclude<EngineNoticeCode, keyof typeof NOTICE_AUDIENCE_TABLE>>;
/**
* The presentation-tier registry — see {@link NOTICE_AUDIENCE_TABLE} for the per-row judgment.
* The exported TYPE stays the open `Record<string, …>` on purpose: a consumer indexing it with a
* runtime string (a code off a wire, a host's own) must keep compiling. The lockstep with
* {@link ENGINE_NOTICE_CODES} is enforced on the table above, where narrowing costs nobody anything.
*/
export declare const NOTICE_AUDIENCE: Readonly<Record<string, NoticeAudience>>;
/** The audience for `code` — the catalog's own rows only; an unregistered code, or a name an object inherits (`constructor`, `valueOf`, …), reads `"operator"`. */
export declare function noticeAudienceOf(code: string): NoticeAudience;
/**
* The attention registry ({@link NoticeAttention}): one row per {@link ENGINE_NOTICE_CODES} member, kept in lockstep by the
* compiler like the audience table. Grouped by audience × attention; within a group, catalog order. The judgment per row:
* does the party its audience names have something to do, or would it go on believing what is not so, without being told
* now (`"act"`); is it a fact that party may want when it looks (`"inform"`); or is it a record whose fact the party already
* holds — the echo of its own action, or a lifecycle step another record carries (`"audit"`). A code with one arm that is
* `"act"` is `"act"` as a whole (a code answers one value; arms that need different values are different facts).
*/
declare const NOTICE_ATTENTION_TABLE: {
readonly "config.command_sandbox_unavailable": "act";
readonly "config.durable_gate_unavailable": "act";
readonly "config.permission_mode_unavailable": "act";
readonly "permission.rule_store_unavailable": "act";
readonly "config.entries_not_applied": "act";
readonly "config.session_rules_earlier_grammar": "act";
readonly "config.skill_deny_unreadable": "act";
readonly "config.legacy_tool_name": "act";
readonly "config.toolpolicy.unmatched_names": "act";
readonly "config.agent.unknown_tool": "act";
readonly "mods.registration_refused": "act";
readonly "mods.stop_continue_dropped": "act";
readonly "peer.inbound_unread": "act";
readonly "peer.notice_user_only": "act";
readonly "peer.held_approval_unhonored": "act";
readonly "peer.idle_subscription": "act";
readonly "classifier.denial_limit": "act";
readonly "classifier.unavailable": "act";
readonly "delegation.ask_unresolvable": "act";
readonly "mcp.authorization_required": "act";
readonly "mcp.server_unavailable": "act";
readonly "config.tool_face_invalid": "act";
readonly "workflow.parked_decision_unused": "act";
readonly "memory.harvest_quarantined": "act";
readonly "memory.harvest_refused": "act";
readonly "memory.harvest_conflict": "act";
readonly "memory.hold_disposed": "act";
readonly "advisor.not_attached": "act";
readonly "route.finish_reason_unknown": "act";
readonly "route.stream_content_dropped": "act";
readonly "model.capability_downgraded": "act";
readonly "model.fallback": "act";
readonly "context.media_removed": "act";
readonly "context.messages_omitted": "act";
readonly "context.tool_schema_removed": "act";
readonly "instructions.withheld": "act";
readonly "instructions.outside_root": "inform";
readonly "instructions.truncated": "inform";
readonly "task.user_steer_undrained": "act";
readonly "task.user_followup_undrained": "act";
readonly "steering.parked_input_blocked": "act";
readonly "mods.turn_aborted": "act";
readonly "task.tool_turn_unrecovered": "act";
readonly "task.halt_unconsumed": "act";
readonly "task.interrupt_unconsumed": "act";
readonly "task.wait_ceiling_reached": "act";
readonly "task.manager_launch_narrowed": "act";
readonly "task.late_approval": "act";
readonly "memory.capture_optout_unpersisted": "act";
readonly "memory.mount_failed": "act";
readonly "session.lineage_rerooted": "act";
readonly "server.model_unreachable": "act";
readonly "permission.entry_mode_clamped": "act";
readonly "memory.sync_layer_parked": "act";
readonly "classifier.seat_rate_limited": "act";
readonly "classifier.review_skipped": "act";
readonly "config.read_deny_floor_unkept": "inform";
readonly "mcp.server_connecting": "inform";
readonly "inherit_env.names_withheld": "inform";
readonly "mods.display_withheld": "inform";
readonly "memory.session_polluted": "inform";
readonly "task.tool_turn_incomplete": "inform";
readonly "model.context_window_assumed": "inform";
readonly "config.store_ephemeral": "inform";
readonly "route.credential_origin_mismatch": "inform";
readonly "route.credential_mismatch": "inform";
readonly "model.fast_mode_changed": "inform";
readonly "task.undelivered_input_dropped": "inform";
readonly "task.verdict_refused": "inform";
readonly "rewind.boundary_unrecorded": "inform";
readonly "verify.verifier_is_implementer": "inform";
readonly "memory.capture_opted_out": "inform";
readonly "memory.hold_opened": "inform";
readonly "mods.stop_ended": "inform";
readonly "peer.inbound_disposition": "inform";
readonly "peer.receipt_delivered_user_only": "inform";
readonly "peer.held_settled": "inform";
readonly "peer.idle_subscription_declined": "inform";
readonly "config.session_rules_reread": "inform";
readonly "route.stream_end_ignored": "inform";
readonly "mods.turn_abort_unconsumed": "inform";
readonly "approval.read_root_grant_rejected": "audit";
readonly "approval.session_call_grant_rejected": "audit";
readonly "task.turn_interrupted": "audit";
readonly "classifier.unavailable_handed_on": "audit";
readonly "peer.held_decision_applied": "audit";
readonly "memory.capture_switched_off": "audit";
readonly "rewind.file_left_as_is": "audit";
readonly "permission.allow_rule_not_used_in_auto": "audit";
readonly "memory.delegation_static_mark_waived": "audit";
readonly "memory.hold_released": "audit";
readonly "approval.read_root_granted": "audit";
readonly "workflow.parked_decision_used": "audit";
readonly "approval.session_call_granted": "audit";
readonly "mods.registration_refused_deployment": "act";
readonly "config.autocompact_window_clamped": "act";
readonly "config.env_timeout_discarded": "act";
readonly "config.materialize_env_discarded": "act";
readonly "config.tool_model_gate_unknown_class": "act";
readonly "config.tool_model_gate_env_invalid": "act";
readonly "config.artifact_host_invalid": "act";
readonly "config.task_root_not_canonical": "act";
readonly "config.write_protection_target_view_absent": "act";
readonly "config.path_view_unresolved": "act";
readonly "config.execution_env_capability_invalid": "act";
readonly "config.execution_env_failure_contract_broken": "act";
readonly "config.inherit_env_declared_late": "act";
readonly "config.model_shell_unmounted": "act";
readonly "config.shell_state_env_dropped": "act";
readonly "config.tool_card_undeclared": "act";
readonly "config.tool_face_undeclared": "act";
readonly "config.host_sink_failed": "act";
readonly "config.seat_malformed": "act";
readonly "config.session_delete_withheld": "act";
readonly "config.env_knob_adjusted": "act";
readonly "config.read_deny_home": "act";
readonly "config.permission_rules_skipped": "act";
readonly "config.peer_admission_out_of_range": "act";
readonly "config.peer_lane_unmounted": "act";
readonly "config.scheduler_store_unmoved": "act";
readonly "config.credential_not_withheld": "act";
readonly "config.cross_boundary_posture_undeclared": "act";
readonly "config.cross_boundary_record_unwritten": "act";
readonly "config.plaintext_origins_admitted": "inform";
readonly "config.second_engine_copy": "act";
readonly "permission.rule_store_unreadable_relaxed": "act";
readonly "permission.revival_root_policy_unrestated": "act";
readonly "classifier.contract_broken": "act";
readonly "checkpoint.execution_outcome_unrecorded": "act";
readonly "delegation.transcript_integrity": "act";
readonly "delegation.settlement_write_failed": "act";
readonly "delegation.durable_row_unpersisted": "act";
readonly "delegation.parked_card_unreadable": "act";
readonly "delegation.parked_card_id_untrusted": "act";
readonly "delegation.agent_row_ending_unreadable": "act";
readonly "protocol.revocation_probe_failed": "act";
readonly "mcp.credential_echoed": "act";
readonly "a2a.peer_card_drift": "act";
readonly "workflow.record_unwritten": "act";
readonly "memory.consolidation_conflict": "act";
readonly "memory.consolidation_incomplete": "act";
readonly "memory.restore_withheld": "act";
readonly "route.fallback_to_primary": "act";
readonly "route.classifier_unroutable": "act";
readonly "route.seat_detached": "act";
readonly "route.extra_body_reserved_dropped": "act";
readonly "instructions.family_undeclared": "act";
readonly "approval.approver_defect": "act";
readonly "tool_result.offload_put_failed": "act";
readonly "tool_result.offload_put_unsettled": "act";
readonly "artifact.owner_refused": "act";
readonly "fs.staging_file_left": "act";
readonly "store.lock_retained": "act";
readonly "store.tree_id_stamp_incomplete": "act";
readonly "store.process_anchor_lost": "act";
readonly "workspace.sync_failed": "act";
readonly "memory.layer_locked_legacy": "act";
readonly "model.fallback_side_call": "inform";
readonly "config.read_face_deployment_clamped": "inform";
readonly "config.write_face_deployment_clamped": "inform";
readonly "config.tool_model_gate_removed": "inform";
readonly "config.read_floor_confinement_unavailable": "inform";
readonly "config.process_start_time_unavailable": "inform";
readonly "config.data_root_spelling_split": "act";
readonly "store.process_anchor_unavailable": "inform";
readonly "config.secret_env_scrubbed": "inform";
readonly "classifier.fallback": "inform";
readonly "classifier.role_defaulted": "inform";
readonly "delegation.resume_lane_missing": "inform";
readonly "delegation.spawn_depth_unknown": "inform";
readonly "delegation.settlement_external": "inform";
readonly "mcp.server_stderr": "inform";
readonly "workflow.governance_key_stripped": "inform";
readonly "workflow.agent_option_ignored": "inform";
readonly "mods.package_key_unread": "inform";
readonly "memory.consolidation_recommended": "inform";
readonly "memory.consolidation_refused": "inform";
readonly "memory.consolidation_withheld": "inform";
readonly "memory.project_scope_absent": "inform";
readonly "memory.notice_unscoped": "inform";
readonly "route.response_model_mismatch": "inform";
readonly "route.tool_call_id_folded": "inform";
readonly "context.tool_turn_repaired": "inform";
readonly "task.completed_past_limit": "inform";
readonly "skills.listing_truncated": "inform";
readonly "agents.listing_truncated": "inform";
readonly "tool_result.media_refused": "inform";
readonly "config.image_processor_unavailable": "inform";
readonly "store.tail_segment_unjudged": "inform";
readonly "store.append_log_parked": "inform";
readonly "config.models_swapped": "audit";
readonly "config.context_settings_swapped": "audit";
readonly "config.read_face_swapped": "audit";
readonly "config.write_face_swapped": "audit";
readonly "config.read_deny_swapped": "audit";
readonly "config.memory_consolidation_driver_swapped": "audit";
readonly "delegation.delivery_discarded": "audit";
readonly "mcp.server_redialed": "audit";
readonly "memory.content_class_declared": "audit";
readonly "memory.consolidation_committed": "audit";
readonly "route.credential_rebound": "audit";
readonly "tool_result.media_persisted": "audit";
readonly "tool_result.read_refused": "audit";
readonly "fs.staging_file_swept": "audit";
readonly "store.lock_reclaimed_on_declaration": "audit";
readonly "engine.debug_trace": "audit";
readonly "config.read_deny_request_excluded": "inform";
};
/** Compile-time fence: every catalogued code has an attention row (and, via `satisfies`, only those). */
export type AttentionTableCoversEveryNoticeCode = AssertAllKeysHandled<Exclude<EngineNoticeCode, keyof typeof NOTICE_ATTENTION_TABLE>>;
/** The attention registry — see {@link NOTICE_ATTENTION_TABLE}. The open `Record<string, …>` type for the same reason as
* {@link NOTICE_AUDIENCE}: a consumer indexes it with a runtime string. */
export declare const NOTICE_ATTENTION: Readonly<Record<string, NoticeAttention>>;
/** The attention of `code`, or `undefined` for a code outside the catalog: no guess — an unclassified code's attention is
* not this engine's to state (its audience reads `"operator"` by {@link noticeAudienceOf}, which keeps it off any screen). */
export declare function noticeAttentionOf(code: string): NoticeAttention | undefined;
/** One code's fact: which `detail` members name what the fact is ABOUT (`subject`; empty = the code itself) and which tell one
* fact of that subject from another (`variant`). A member's value is read as the notice leaves (after the text pass), so two
* notices that leave alike are one fact. */
export interface NoticeFactKeyRow {
readonly subject: readonly string[];
readonly variant: readonly string[];
}
/**
* The codes the delivery throat tells once per session per fact (`deliverEngineNotice`'s `told`), and what one fact is. A code
* with no row is told on every delivery, as its mint site decides (its own dedup unit, stated at its catalog row).
*
* ONE RULE FOR THE END OF A FACT. A fact is told while it holds and not again; the station that judges it reads it on every
* pass, and a pass that finds it no longer holding ends it (`endNoticeFact`) for the whole subject at once — every fact under
* that subject is released from the session's record, so the next time it holds it is told again. What ends each, and where it is
* read: a server connected, its endpoint answered 401 / 403 (an authorization the user owes), or the pool's memory of its failure gone (the MCP dial, prepare
* and a host's re-dial); a leg's every table judged kept or empty (read at the leg's end, when its latch is final); the requested model itself answered, on
* the lane the walk was told on (the accounting points that read an answer). A fact whose station does not read it again has no end: it
* stays told for the session — `a2a.peer_card_drift` is one: its drift is computed off the card a leg read, a card read in part (an
* extended card that did not answer) makes "no drift" unknown rather than true, and no read of that is written yet.
*/
export declare const NOTICE_FACT_KEY: Readonly<Partial<Record<EngineNoticeCode, NoticeFactKeyRow>>>;
/**
* WHO MINTS a catalogued code: `"engine"` = this package (the catalog gate finds its mint site in src/); `"server"` = a
* server process that forwards its own notices through the same sink — registered here so its audience comes from
* {@link NOTICE_AUDIENCE} like every other row, and NEVER minted by this package (the catalog gate reds a mint site for
* one in src/). One code, one minter: a code two processes mint would be two facts under one spelling.
*
* Member-level exception, stated where a consumer reads the minter: `task.user_steer_undrained` and
* `task.user_followup_undrained` are engine rows; of their `detail.cause` (`USER_INPUT_UNDRAINED_CAUSES`) this engine mints `leg_end` only,
* and every other member is minted by the server — a loss this engine's process is not there to count; the server picks the code by the
* lane the input was queued on, as this engine does. Each code keeps one row here and one spelling for every arm.
*/
export type NoticeMinter = "engine" | "server";
declare const NOTICE_MINTER_TABLE: {
readonly "config.autocompact_window_clamped": "engine";
readonly "config.env_timeout_discarded": "engine";
readonly "config.materialize_env_discarded": "engine";
readonly "config.models_swapped": "engine";
readonly "config.context_settings_swapped": "engine";
readonly "config.read_face_swapped": "engine";
readonly "config.read_face_deployment_clamped": "engine";
readonly "config.write_face_swapped": "engine";
readonly "config.write_face_deployment_clamped": "engine";
readonly "config.read_deny_swapped": "engine";
readonly "config.memory_consolidation_driver_swapped": "engine";
readonly "config.tool_model_gate_removed": "engine";
readonly "config.tool_model_gate_unknown_class": "engine";
readonly "config.tool_model_gate_env_invalid": "engine";
readonly "config.artifact_host_invalid": "engine";
readonly "config.task_root_not_canonical": "engine";
readonly "config.write_protection_target_view_absent": "engine";
readonly "config.path_view_unresolved": "engine";
readonly "config.execution_env_capability_invalid": "engine";
readonly "config.execution_env_failure_contract_broken": "engine";
readonly "config.read_deny_floor_unkept": "engine";
readonly "config.read_floor_confinement_unavailable": "engine";
readonly "config.inherit_env_declared_late": "engine";
readonly "config.model_shell_unmounted": "engine";
readonly "config.shell_state_env_dropped": "engine";
readonly "config.command_sandbox_unavailable": "engine";
readonly "config.tool_card_undeclared": "engine";
readonly "config.tool_face_undeclared": "engine";
readonly "config.tool_face_invalid": "engine";
readonly "config.host_sink_failed": "engine";
readonly "config.seat_malformed": "engine";
readonly "config.session_delete_withheld": "engine";
readonly "config.env_knob_adjusted": "engine";
readonly "config.read_deny_home": "engine";
readonly "config.permission_rules_skipped": "engine";
readonly "config.process_start_time_unavailable": "engine";
readonly "config.data_root_spelling_split": "engine";
readonly "config.durable_gate_unavailable": "engine";
readonly "config.peer_admission_out_of_range": "engine";
readonly "config.peer_lane_unmounted": "engine";
readonly "config.scheduler_store_unmoved": "engine";
readonly "config.secret_env_scrubbed": "engine";
readonly "inherit_env.names_withheld": "engine";
readonly "config.credential_not_withheld": "engine";
readonly "config.cross_boundary_posture_undeclared": "engine";
readonly "config.cross_boundary_record_unwritten": "engine";
readonly "config.plaintext_origins_admitted": "engine";
readonly "config.second_engine_copy": "engine";
readonly "config.permission_mode_unavailable": "engine";
readonly "permission.rule_store_unavailable": "engine";
readonly "permission.rule_store_unreadable_relaxed": "engine";
readonly "config.entries_not_applied": "engine";
readonly "config.session_rules_earlier_grammar": "engine";
readonly "config.session_rules_reread": "engine";
readonly "config.skill_deny_unreadable": "engine";
readonly "config.legacy_tool_name": "engine";
readonly "config.toolpolicy.unmatched_names": "engine";
readonly "config.agent.unknown_tool": "engine";
readonly "permission.allow_rule_not_used_in_auto": "engine";
readonly "permission.revival_root_policy_unrestated": "engine";
readonly "mods.registration_refused": "engine";
readonly "mods.registration_refused_deployment": "engine";
readonly "mods.display_withheld": "engine";
readonly "mods.stop_ended": "engine";
readonly "mods.stop_continue_dropped": "engine";
readonly "mods.package_key_unread": "engine";
readonly "peer.inbound_disposition": "engine";
readonly "peer.held_settled": "engine";
readonly "peer.idle_subscription": "engine";
readonly "peer.idle_subscription_declined": "engine";
readonly "peer.inbound_unread": "engine";
readonly "peer.notice_user_only": "engine";
readonly "peer.receipt_delivered_user_only": "engine";
readonly "peer.held_approval_unhonored": "engine";
readonly "peer.held_decision_applied": "engine";
readonly "classifier.denial_limit": "engine";
readonly "classifier.fallback": "engine";
readonly "classifier.seat_rate_limited": "engine";
readonly "classifier.role_defaulted": "engine";
readonly "classifier.contract_broken": "engine";
readonly "classifier.unavailable": "engine";
readonly "classifier.unavailable_handed_on": "engine";
readonly "classifier.review_skipped": "engine";
readonly "checkpoint.execution_outcome_unrecorded": "engine";
readonly "delegation.transcript_integrity": "engine";
readonly "delegation.ask_unresolvable": "engine";
readonly "delegation.resume_lane_missing": "engine";
readonly "delegation.spawn_depth_unknown": "engine";
readonly "delegation.delivery_discarded": "engine";
readonly "delegation.settlement_external": "engine";
readonly "delegation.settlement_write_failed": "engine";
readonly "delegation.durable_row_unpersisted": "engine";
readonly "delegation.parked_card_unreadable": "engine";
readonly "delegation.parked_card_id_untrusted": "engine";
readonly "delegation.agent_row_ending_unreadable": "engine";
readonly "protocol.revocation_probe_failed": "engine";
readonly "mcp.server_redialed": "engine";
readonly "mcp.authorization_required": "engine";
readonly "mcp.server_unavailable": "engine";
readonly "mcp.server_connecting": "engine";
readonly "mcp.credential_echoed": "engine";
readonly "a2a.peer_card_drift": "engine";
readonly "mcp.server_stderr": "engine";
readonly "workflow.governance_key_stripped": "engine";
readonly "workflow.agent_option_ignored": "engine";
readonly "workflow.parked_decision_unused": "engine";
readonly "workflow.parked_decision_used": "engine";
readonly "workflow.record_unwritten": "engine";
readonly "memory.session_polluted": "engine";
readonly "memory.harvest_quarantined": "engine";
readonly "memory.harvest_refused": "engine";
readonly "memory.harvest_conflict": "engine";
readonly "memory.delegation_static_mark_waived": "engine";
readonly "memory.content_class_declared": "engine";
readonly "memory.hold_opened": "engine";
readonly "memory.hold_released": "engine";
readonly "memory.hold_disposed": "engine";
readonly "memory.consolidation_recommended": "engine";
readonly "memory.consolidation_committed": "engine";
readonly "memory.consolidation_conflict": "engine";
readonly "memory.consolidation_incomplete": "engine";
readonly "memory.consolidation_refused": "engine";
readonly "memory.consolidation_withheld": "engine";
readonly "memory.restore_withheld": "engine";
readonly "memory.project_scope_absent": "engine";
readonly "memory.notice_unscoped": "engine";
readonly "route.fallback_to_primary": "engine";
readonly "route.classifier_unroutable": "engine";
readonly "route.seat_detached": "engine";
readonly "advisor.not_attached": "engine";
readonly "route.credential_origin_mismatch": "engine";
readonly "route.credential_mismatch": "engine";
readonly "route.credential_rebound": "engine";
readonly "route.response_model_mismatch": "engine";
readonly "route.tool_call_id_folded": "engine";
readonly "route.finish_reason_unknown": "engine";
readonly "route.stream_end_ignored": "engine";
readonly "route.stream_content_dropped": "engine";
readonly "route.extra_body_reserved_dropped": "engine";
readonly "model.capability_downgraded": "engine";
readonly "model.fast_mode_changed": "engine";
readonly "model.fallback": "engine";
readonly "model.fallback_side_call": "engine";
readonly "context.tool_turn_repaired": "engine";
readonly "context.media_removed": "engine";
readonly "context.tool_schema_removed": "engine";
readonly "context.messages_omitted": "engine";
readonly "instructions.withheld": "engine";
readonly "instructions.outside_root": "engine";
readonly "instructions.truncated": "engine";
readonly "instructions.family_undeclared": "engine";
readonly "task.user_steer_undrained": "engine";
readonly "task.user_followup_undrained": "engine";
readonly "task.undelivered_input_dropped": "engine";
readonly "steering.parked_input_blocked": "engine";
readonly "task.turn_interrupted": "engine";
readonly "task.halt_unconsumed": "engine";
readonly "mods.turn_aborted": "engine";
readonly "mods.turn_abort_unconsumed": "engine";
readonly "task.late_approval": "engine";
readonly "task.interrupt_unconsumed": "engine";
readonly "task.wait_ceiling_reached": "engine";
readonly "task.manager_launch_narrowed": "engine";
readonly "task.completed_past_limit": "engine";
readonly "task.verdict_refused": "engine";
readonly "task.tool_turn_incomplete": "engine";
readonly "task.tool_turn_unrecovered": "engine";
readonly "approval.read_root_granted": "engine";
readonly "approval.read_root_grant_rejected": "engine";
readonly "approval.session_call_granted": "engine";
readonly "approval.session_call_grant_rejected": "engine";
readonly "approval.approver_defect": "engine";
readonly "memory.capture_opted_out": "engine";
readonly "memory.capture_switched_off": "engine";
readonly "memory.capture_optout_unpersisted": "engine";
readonly "memory.mount_failed": "engine";
readonly "skills.listing_truncated": "engine";
readonly "agents.listing_truncated": "engine";
readonly "tool_result.offload_put_failed": "engine";
readonly "tool_result.offload_put_unsettled": "engine";
readonly "tool_result.media_refused": "engine";
readonly "tool_result.media_persisted": "engine";
readonly "tool_result.read_refused": "engine";
readonly "artifact.owner_refused": "engine";
readonly "config.image_processor_unavailable": "engine";
readonly "fs.staging_file_left": "engine";
readonly "fs.staging_file_swept": "engine";
readonly "store.tail_segment_unjudged": "engine";
readonly "store.lock_retained": "engine";
readonly "store.lock_reclaimed_on_declaration": "engine";
readonly "store.append_log_parked": "engine";
readonly "store.tree_id_stamp_incomplete": "engine";
readonly "store.process_anchor_unavailable": "engine";
readonly "store.process_anchor_lost": "engine";
readonly "engine.debug_trace": "engine";
readonly "session.lineage_rerooted": "engine";
readonly "rewind.boundary_unrecorded": "engine";
readonly "rewind.file_left_as_is": "engine";
readonly "verify.verifier_is_implementer": "engine";
readonly "workspace.sync_failed": "engine";
readonly "memory.layer_locked_legacy": "server";
readonly "server.model_unreachable": "server";
readonly "permission.entry_mode_clamped": "server";
readonly "model.context_window_assumed": "server";
readonly "config.store_ephemeral": "server";
readonly "memory.sync_layer_parked": "server";
readonly "config.read_deny_request_excluded": "engine";
};
/** Compile-time fence: every catalogued code has a minter row (and, via `satisfies`, only those). */
export type MinterTableCoversEveryNoticeCode = AssertAllKeysHandled<Exclude<EngineNoticeCode, keyof typeof NOTICE_MINTER_TABLE>>;
/** The minter registry — see {@link NoticeMinter}. Frozen: a caller writing a row would move the catalog gate's verdict. */
export declare const NOTICE_MINTER: Readonly<Record<EngineNoticeCode, NoticeMinter>>;
/** One branch a code gave up: the code it is told under from that release on, and which of the old code's frames it is —
* `detail` the members that pick them out where the old frame carried them, `when` the same in words (always present) — and
* where each member of the old frame's `detail` went, with the values the new frame carries where the old one had no member
* (`toDetail`). `detail` reads the OLD frame, `toDetail` the NEW one (the frame told under `to`).
*
* Which branch an old frame is, per element where a selector reads `a[].b`: a branch whose `detail` selectors all hold comes first;
* with none, a retired code's branch without a selector takes it, and under a narrowed code it stays under the code itself (a
* narrowed code's branch without a selector is one the old frame cannot pick out: its `when` says what decides). A selector stays
* necessary, not sufficient: two branches it leaves, or a narrowed code's branch it picks, are told apart by `when`. The table
* maps what the old frame says — what the older engine read — not what this engine says reading the same stored input again. */
export interface NoticeCodeBranch {
readonly to: string;
readonly when: string;
/** Members of the old frame's own `detail`, by path as in {@link keys} (`a`, `a.b`, `a[].b`), and the values this branch's facts carry
* there. Necessary, not sufficient: a frame that matches may still be another branch or the narrowed code itself (another member,
* or one the old frame did not carry, decides), so it names the branches a frame could be. A selector on an `a[].b` path reads per
* element: one old frame can hold elements of more than one branch, and is split by element. A member the old frame could omit is
* not selected on (a selector names values, not absence): the branch says so in `when`. */
readonly detail?: Readonly<Record<string, readonly string[]>>;
/** Every member of the old frame's `detail`, by path (`a`, `a.b`, `a[].b` for each element of a list), -> its path in the new
* frame's `detail`, or `null` where the new frame does not carry it (the code itself now says it). Every member, unchanged
* ones included: a reader maps an old frame by this column alone. */
readonly keys: Readonly<Record<string, string | null>>;
/** Members the new frame carries that the old one did not, by path as in {@link keys}. */
readonly added?: readonly string[];
/** Members of the NEW frame's `detail` (the frame told under {@link to}), by path as in {@link keys}, and the words this branch's
* facts carry there: for `config.entries_not_applied`, `{ kind: ["stored_rule_row"] }`. Every path is one of {@link added} — a
* member the old frame carried is the old frame's ({@link keys} maps it; a selector on it is {@link detail}'s), never here — and every member of `added` whose
* word the branch decides (the same for every frame of its facts, whatever their entries) is here; one whose value each frame's
* own facts decide (`count`, `identity`, an entry's `reason`) is not. The values are words, as `detail`'s are: a number a branch
* fixes (`count` 1 of a one-entry kind) is said in `when`. Necessary, not sufficient: a new frame of this branch's facts carries
* one of the words, and a frame carrying one may be another branch's (or a fact no older code told). An `a[].b` path reads per
* element: every element of the branch's facts carries one of the words. More than one word means the old frame does not say
* which: the branch says so in `when`. */
readonly toDetail?: Readonly<Record<string, readonly string[]>>;
/** A list the old frame carried whole and the new one bounds: its new path -> how many it shows (`count` counts them all). */
readonly bounded?: Readonly<Record<string, number>>;
}
/** How a catalogued notice code changed in a release. `narrowed`: the spelling stays and is minted for fewer facts — the branches
* that left it, and its attention before and after as that release shipped it (a row records its release: a later release that
* moves the code's attention without narrowing it again leaves the row as it is, and the catalog's row is the word today; its
* audience is the catalog's: no narrowing recorded here moved a code's audience, so {@link noticeAudienceOf} reads the same before
* and after). A release changes a code's attention alone without a row here: the frame carries the word (`EngineNotice.attention`). `retired`: the spelling is no longer minted — the last
* release that minted it, its attention and its audience there (the catalog no longer holds the code, so neither can be asked of
* it), and where each of its facts is told now (`into` is empty where no notice code tells it any more: a refusal replaced the notice). */
export type NoticeCodeChange = {
readonly change: "narrowed";
readonly in: string;
readonly attentionBefore: NoticeAttention;
readonly attentionAfter: NoticeAttention;
readonly branches: readonly NoticeCodeBranch[];
} | {
readonly change: "retired";
readonly in: string;
readonly lastMintedIn: string;
readonly lastAttention: NoticeAttention;
readonly lastAudience: NoticeAudience;
readonly into: readonly NoticeCodeBranch[];
};
/**
* THE record of notice codes a release narrowed or retired — the one list a reader of an older engine's frames maps them by. The
* release notes' hard-breaking lines, the wire manifest (`scripts/wire-changes.mjs`, its `noticeLineage` section and breaking
* items) and the catalog rows read it; a gate holds each narrowed code in the catalog and each retired one out of it. A code
* changed in an earlier release than any row here was not recorded in it. A package root export: a consumer that reads frames an
* older engine wrote or sent (a stored session log, a recorded stream, a deployment mid-upgrade) maps each code through this table
* instead of keeping its own copy — a code that is a key here and not in {@link ENGINE_NOTICE_CODES} is a retired one. A plain
* object: look a code up with `Object.hasOwn`, since `NOTICE_CODE_LINEAGE["constructor"]` is an inherited member, not a row.
*/
export declare const NOTICE_CODE_LINEAGE: Readonly<Record<string, NoticeCodeChange>>;
export {};