import type { FinalReviewOutput } from '../../services/final-review/final-review-types.js'; import { type ProgramIO } from '../cli-helpers.js'; /** The two inputs a refusal envelope names, plus why it was refused. */ export type PrepareRefusal = { readonly rid: string; readonly code: string; readonly message: string; readonly sessionId: string; readonly auditGoalPath: string; readonly nextActions: string[]; }; /** Print one refusal envelope and mark the process failed. */ export declare function emitPrepareFailure(io: ProgramIO, json: boolean | undefined, refusal: PrepareRefusal, missingEnv?: readonly string[]): void; /** Where a resolved run reads its audit goal from. */ export type PrepareGoalPath = { readonly sessionId: string; readonly auditGoalPath: string; }; /** * Stub path: surface a structured "scaffold ready" envelope. * * The service is NOT called here — the stub runner answers the audit-goal * shape, not the 4-dim review shape, so running it through * `prepareFinalReview()` would only manufacture a malformed review. The * envelope confirms the route is wired end-to-end and reports the audit-goal * path the service WOULD read. */ export declare function emitStubEnvelope(io: ProgramIO, rid: string, goal: PrepareGoalPath, json: boolean | undefined): void; /** The success envelope of a real-provider run. */ export declare function emitReviewEnvelope(io: ProgramIO, result: { readonly rid: string; readonly goal: PrepareGoalPath; readonly model: string; readonly review: FinalReviewOutput; readonly json: boolean | undefined; }): void; /** * Map a thrown error to the CLI's error code. The LLM-layer errors already * carry codes precise enough to act on (`LLM_CREDENTIAL_MISSING`, * `LLM_REQUEST_FAILED`, …), so they are passed through rather than flattened * into one opaque failure. */ export declare function finalReviewErrorCode(error: unknown): string; export declare function finalReviewNextActions(code: string): string[];