import type { ErrorObject } from 'ajv';
import type { AjvErrorDetails, CallDiagnostics, FailureCategory, ToolStatus } from '../types.js';
/**
 * Central helper to classify an error into a ToolStatus value.
 *
 * - TOOL_STATUS.ABORTED   → the client explicitly aborted Request.
 * - TOOL_STATUS.SOFT_FAIL → User/client errors (HTTP 4xx, InvalidParams, validation issues).
 * - TOOL_STATUS.FAILED    → Server errors (HTTP 5xx, unknown, or unexpected exceptions).
 */
export declare function getToolStatusFromError(error: unknown, isAborted: boolean): ToolStatus;
export declare function classifyFailureCategory(error: unknown): FailureCategory;
export declare function extractAjvErrorDetails(errors: ErrorObject[] | null | undefined): AjvErrorDetails;
/**
 * Reads `toolTelemetry` from a tool response, strips it, and returns toolStatus + callDiagnostics.
 *
 * toolStatus resolution:
 * 1. `toolTelemetry.toolStatus` present → use it directly.
 * 2. `isError` set without toolStatus → SOFT_FAIL.
 * 3. Neither → SUCCEEDED.
 *
 * actorName/actorId are server-side context (from tool resolution).
 * Tool-reported actorId (e.g. from call-actor after resolution) takes precedence.
 */
export declare function extractToolTelemetry(res: Record<string, unknown>, actorName: string | undefined, actorId: string | undefined): {
    toolStatus: ToolStatus;
    callDiagnostics: CallDiagnostics;
};
//# sourceMappingURL=tool_status.d.ts.map