/** * Exit code signaling a child escalation (mirror of child/escalation.ts — * duplicated on purpose so the child adapter keeps zero src/ imports). */ export declare const ESCALATION_EXIT_CODE = 42; /** Env var marking a child lane as a subagent session (ask_master gate). */ export declare const ESCALATION_RUN_ID_ENV = "PI_SUBAGENTS_RUN_ID"; /** Env var carrying the escalation dir (the parent's steer dir). */ export declare const ESCALATION_DIR_ENV = "PI_SUBAGENTS_ESCALATION_DIR"; /** Payload of a `.escalation.json` file (mirror of the child shape). */ export interface EscalationFilePayload { runId: string; message: string; timestamp: number; } /** Resolve the escalation file path for a run id. */ export declare function escalationFilePath(runId: string, dir: string): string; /** Outcome of a consume-once escalation read. */ export interface ConsumedEscalation { /** True when an escalation file was found (and consumed/deleted). */ consumed: boolean; /** The escalated message; absent when no file existed or it was invalid. */ message?: string; } /** * Consume the escalation file for `runId` (read + IMMEDIATE delete). Never * throws: a missing file returns `{ consumed: false }`, and an invalid payload * is still consumed (deleted) so a corrupt file cannot wedge a lane. */ export declare function consumeEscalation(runId: string | undefined, dir: string | undefined): ConsumedEscalation;