import { lstatSync } from "node:fs"; import { type RunEvent, type RunFacts } from "@claudexor/schema"; import type { JobRecord } from "./server.js"; /** * Pure (no filesystem) validation binding a durable terminal event's RunFacts * payload to the command's run identity and the terminal envelope. Both the * already-reconciled fast path and full artifact recovery MUST share this * check so a skipped repair never skips authority validation. */ export declare function recoveredTerminalFacts(record: JobRecord, terminal: RunEvent): { facts: RunFacts; terminalSeq: number; }; /** The durable terminal command result derived from validated RunFacts. */ export declare function terminalCommandResult(record: JobRecord, facts: RunFacts): { lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded"; facts: { lifecycle: "cancelled" | "failed" | "interrupted" | "succeeded"; noChanges: boolean | null; checks: "failed" | "not_configured" | "passed"; review: "approved" | "blocked" | "not_run"; review_requested?: boolean | undefined; reason: "budget_exhausted" | "budget_overshoot" | "checks_failed" | "context_capacity_exhausted" | "cost_unverifiable" | "crash_interrupted" | "harness_failed" | "host_cancelled" | "input_required" | "no_changes" | "not_converged" | "owner_task_gone" | "review_blocked" | "stuck_no_progress" | "user_cancelled" | "wall_clock_exceeded" | "work_incomplete" | "work_report_contract" | "workspace_unavailable" | null; work_state?: { state: "completed" | "incomplete" | "needs_input" | "unverified"; source: "absent" | "constrained" | "validated"; required_inputs?: { kind: "context" | "credential" | "decision" | "external_dependency" | "file" | "permission"; locator: string | null; description: string; }[] | undefined; } | undefined; }; runId: string; taskId: string; runDir: string; }; /** ENOENT-tolerant lstat: retention may have legitimately reclaimed the path. */ export declare function lstatOrNull(path: string): ReturnType | null; //# sourceMappingURL=terminal-authority.d.ts.map