export type PreflightResult = "proceed" | "halt" | "escalate"; /** Structured gate failure shape emitted by preflight-gate.cjs on stdout (exit 1). */ export interface GateFailureData { phase: string; reasonCode: string; detail: string; remediation: string; } /** Extended result carrying the structured failure alongside the status enum. */ export interface PreflightOutcome { result: PreflightResult; /** Parsed structured failure from stdout, or null on pass / escalate. */ gateFailure: GateFailureData | null; } export declare function runPreflightGate(preflightGate: string, role: string, taskId: string, cwd: string, entityType?: "task" | "bug"): PreflightResult; /** * Run postflight-gate.cjs after a phase subagent returns, before FSM advance. * Mirrors runPreflightGateWithData — same argv-array discipline, same structured-JSON * parsing from stdout on exit 1. * * Returns: * "ok" — gate passed (or no outputs block for this phase); advance may proceed. * "unsatisfied" — gate failed; do NOT advance FSM; halt and call runHaltAdvisor. * "error" — gate binary missing or parse error; treat as pass-through (additive). */ export declare function runPostflightGate(postflightGate: string, role: string, taskId: string, cwd: string): { result: "ok" | "unsatisfied" | "error"; gateFailure: GateFailureData | null; }; /** * Upgraded variant that returns structured failure data alongside the status enum. * Callers that need the advisory data should use this function directly. */ export declare function runPreflightGateWithData(preflightGate: string, role: string, taskId: string, cwd: string, entityType?: "task" | "bug"): PreflightOutcome;