import { type ProgramIO } from '../cli-helpers.js'; /** One refusal from the `--from-dag` path, as the fields the envelope needs. */ export type DagFailure = { readonly role: string; readonly code: string; readonly message: string; readonly extra?: Record; readonly nextActions: readonly string[]; }; /** * Emit a `sub-agent.dispatch` failure envelope and mark the process failed. * * Returns `null` so every caller can read `if (readDag(...) === null) return;` * — the three statements (print, exit code, return) are one decision and stay * together, which is also what keeps each call site inside * `max-lines-per-function`. */ export declare function emitDagFailure(io: ProgramIO, asJson: boolean, failure: DagFailure): null;