/** * The application boundary's projection of rendered failures into the * CLI-facing `AppError` envelope. * * The failure catalog recognizes and renders every typed failure the * workspace kernel and its features construct or carry once, into a * `StepFailure`; a plan step settles with the same value. This module * projects the rendered failure into the envelope and adds only what the * application itself supplied, so a failure reads the same whether it * surfaced here or inside a plan. * * @experimental This API is unstable and may change without notice. */ import { type StepFailure } from "@agentxm/workspace-kernel/operations"; import { AppError } from "./app-error.js"; import { type WorkspaceFailure } from "./failure-catalog.js"; /** * Project a rendered failure into the CLI-facing `AppError` envelope: the * category is the code, and every rendered field carries over 1:1. The * envelope supplies the category's default title where the rendering chose * none. */ export declare const stepFailureToAppError: (failure: StepFailure) => AppError; /** * Convert a workspace failure into the CLI-facing `AppError` envelope. An * `AppError` passes through unchanged. A selection the terminal interaction * could not obtain carries the interaction's own guidance as its cause, and * that guidance is what the terminal prints. */ export declare const toAppError: (error: WorkspaceFailure | AppError) => AppError; /** * Convert any failure a command can surface — a workspace failure, an * envelope that already travelled the channel, or an unrecognized value such * as a squashed defect — into the CLI-facing `AppError`. This is the one * classifier of an arbitrary failure: an unrecognized value is an internal * error whose reason is the message it carried, with the value as its cause. */ export declare const failureToAppError: (failure: unknown) => AppError; //# sourceMappingURL=conversions.d.ts.map