/** * Durable escalation registry (DEC-095, Drumbeat D7). When an agent exhausts its * relance budget (DEC-086 `scanDrumbeat` → `exhausted`), the daemon must stop * looping and **escalate to the PRINCIPAL** (DEC-084: the engagement owner, not * EXECUTIF) over the `alert` channel (DEC-040). The relance cap is the anti-loop * guard; this registry is the escalation that replaces further relances. * * Parallel to the drumbeat/blockage registries: `/.h2a/escalation/.json`. */ /** * Why the escalation fired. `relance-exhausted` (D7, relance budget spent); * `watchdog-escalate` / `reroute-suggested` (D5, the reflexive watchdog decided * a human must look, or that the work should be reassigned). */ export type H2AEscalationReason = "relance-exhausted" | "watchdog-escalate" | "reroute-suggested"; export interface H2AEscalationRecord { readonly instance: string; readonly reason: H2AEscalationReason; /** Relance count at the time the budget was exhausted. */ readonly relanceCount: number; /** Escalation channel (DEC-040). Defaults to `alert`. */ readonly channel: string; /** Symbolic target — the scope's competent authority. Defaults to `PRINCIPAL` (DEC-084). */ readonly to: string; readonly at: string; } export interface RecordEscalationInput { readonly instance: string; readonly reason: H2AEscalationReason; readonly relanceCount: number; readonly channel?: string; readonly to?: string; } /** * Record (upsert) an escalation. Idempotent per instance: a repeated escalation * for the same exhausted instance overwrites with the latest count/time rather * than piling up — the PRINCIPAL needs one open alert per agent, not a flood. */ export declare function recordEscalation(root: string, input: RecordEscalationInput, now?: number): H2AEscalationRecord; export declare function readEscalation(root: string, instance: string): H2AEscalationRecord | undefined; export declare function listEscalations(root: string): H2AEscalationRecord[]; /** Clear an escalation — call when the agent is cleanly resumed/finished. */ export declare function clearEscalation(root: string, instance: string): void; //# sourceMappingURL=registry.d.ts.map