import type { MartinErrorCategory, MartinOutputMode, VerifiedHandoffOutcome } from "../contracts/index.js"; export declare function exitCodeForGovernedOutcome(outcome: VerifiedHandoffOutcome): number; export interface CliFailurePayload { ok: false; category: MartinErrorCategory; message: string; suggestion?: string; details?: Record; } export interface CliSuccessPayload { ok: true; data: T; warnings?: string[]; } export interface CliRenderInput { data: T; human: string | string[]; quiet?: string; warnings?: string[]; exitCode?: number; } export declare class CliCommandError extends Error { readonly category: MartinErrorCategory; readonly suggestion?: string; readonly details?: Record; constructor(category: MartinErrorCategory, message: string, options?: { suggestion?: string; details?: Record; }); } export declare function formatJson(value: unknown): string; export declare function renderCliSuccess(mode: MartinOutputMode, input: CliRenderInput): { exitCode: number; stdout: string; stderr: string; }; export declare function renderCliError(mode: MartinOutputMode, error: unknown): { exitCode: number; stdout: string; stderr: string; }; import type { MilestoneState, InlineMilestone, InteractivePrompt, RankName } from "./cli-milestone-state.js"; export declare function buildRankHeader(rank: RankName, termWidth: number): string; export type RunOutcome = "success" | "awaiting_signoff" | "approval_blocked" | "failure"; export declare function renderRunHeader(rank: RankName, outcome: RunOutcome, attempts: number, actualUsd: number, savedThisRun: number, lifetimeSaved: number, savingsConfidence: "confirmed" | "estimated" | "unavailable", receiptPersisted: boolean): string; export declare function renderInlineMilestone(milestone: InlineMilestone): string; export declare function renderLoopMilestoneBox(count: number, rank: RankName, prevRank: RankName | null): string; export interface MilestonePromptCtx { rank: RankName; prevRank: RankName | null; totalSavedUsd: number; successfulRunCount: number; starShownCount: number; } export interface MilestonePromptCallbacks { onStarConfirmed: () => Promise; onWaitlistJoined: (email: string) => Promise; onWaitlistDeclined: () => Promise; onFeedback: (score: number, featureVote?: string, email?: string) => Promise; } export declare function renderMilestonePrompt(prompt: InteractivePrompt, ctx: MilestonePromptCtx, callbacks: MilestonePromptCallbacks): Promise; export declare function renderLoopCard(state: MilestoneState | null): void;