export declare const AGENT_FAILURE_CATEGORIES: {
    readonly EXTERNAL_ABORT: "external_abort";
    readonly PART_TIMEOUT: "part_timeout";
    readonly PROVIDER_ERROR: "provider_error";
    readonly STREAM_IDLE_TIMEOUT: "stream_idle_timeout";
};
export type AgentFailureCategory = typeof AGENT_FAILURE_CATEGORIES[keyof typeof AGENT_FAILURE_CATEGORIES];
export interface AgentFailureDetail {
    category: AgentFailureCategory;
    reason: string;
}
interface FormatAgentFailureOptions {
    includeCategoryPrefix?: boolean;
}
export declare function createPartTimeoutReason(timeoutMs: number): string;
export declare function createExternalAbortFailure(reason: unknown): AgentFailureDetail;
export declare function createPartTimeoutFailure(reason: unknown): AgentFailureDetail;
export declare function createProviderErrorFailure(reason: unknown): AgentFailureDetail;
export declare function createStreamIdleTimeoutFailure(reason: unknown): AgentFailureDetail;
export declare function classifyAbortSignalReason(reason: unknown): AgentFailureDetail;
export declare function formatAgentFailure(detail: AgentFailureDetail, options?: FormatAgentFailureOptions): string;
export {};
//# sourceMappingURL=agent-failure.d.ts.map