/**
 * Workflow run-error classification (spec R6 / D49 / AI-5).
 *
 * Turns a raw thrown Error message into a human-readable, classified WorkflowError so the canvas can
 * show 人话 (never a stack) + the right next-step buttons (0 死端). Pure & deterministic — unit
 * tested. The executors throw plain Error(message); this maps those messages to a class + 中文说明.
 */
export type WorkflowErrorClass = "user" | "capability" | "network" | "system";
/** Next-step buttons the canvas offers for an error (0 死端 — every failure has a way forward). */
export type WorkflowErrorAction = "ai_fix" | "rerun_node" | "rerun_all" | "open_credentials" | "swap_capability";
export interface WorkflowError {
    class: WorkflowErrorClass;
    /** Plain-language Chinese explanation (NO stack trace). */
    message: string;
    /** What to do about it, in one line. */
    hint?: string;
    /** Ordered next-step actions for the UI (first = primary). */
    actions: WorkflowErrorAction[];
    /** Truncated raw message, for the advanced/debug view only. */
    detail?: string;
}
/**
 * Classify a node failure. `raw` is the thrown error's message; `opts.nodeKind` refines wording.
 * Order matters: credential/auth and capability checks run before the generic "param" check.
 */
export declare function classifyWorkflowError(raw: string, opts?: {
    nodeKind?: string;
}): WorkflowError;
