/** Public, host-neutral failure guidance. Messages and codes never contain server error bodies. */ export type AgentFailureCategory = 'tool_not_loaded' | 'capability_changed' | 'transport_unavailable' | 'authorization_unavailable' | 'unsupported' | 'invocation_outcome_unknown' | 'unknown_failure' | 'cancelled' | 'invalid_request' | 'task_control' | 'knowledge_reference_unavailable'; export type AgentFailureOperation = 'search' | 'invoke' | 'resume' | 'inspect' | 'authorize' | 'scope' | 'tool_dispatch'; export type AgentFailureOrigin = 'core' | 'sdk' | 'mcp' | 'dsh' | 'host'; export type AgentFailureDispatch = 'not_dispatched' | 'attempted' | 'unknown'; export type AgentFailureNextAction = 'rediscover' | 'retry_discovery' | 'restore_scope' | 'reauthorize' | 'check_compatibility' | 'resume_original' | 'inspect_original' | 'search_knowledge' | 'none'; export type AgentFailureFeedback = { schema: 'bailing.agent-feedback.v1'; category: AgentFailureCategory; code: string; origin: AgentFailureOrigin; operation: AgentFailureOperation; dispatch: AgentFailureDispatch; /** Applies only to next_action, never permission to create another business invocation. */ retryable: boolean; next_action: AgentFailureNextAction; invocation_id?: string; disposition?: 'accepted_unknown' | 'definitive_rejection' | 'refresh_required'; message: string; }; export type AgentFailureContext = { operation: AgentFailureOperation; origin?: AgentFailureOrigin; dispatch?: AgentFailureDispatch; invocationId?: string; }; export declare const AGENT_TASK_ERROR_CODES: readonly ["TASK_REQUIRED", "TASK_UNSUPPORTED", "TASK_SCOPE_BLOCKED", "TASK_MEMBER_MISMATCH", "TASK_BINDING_CONFLICT", "TASK_PAUSED", "TASK_CANCELLED", "TASK_EXPIRED", "TASK_WRITE_BUDGET_EXHAUSTED", "TASK_CONCURRENCY_EXHAUSTED", "TASK_TOOL_NOT_ALLOWED", "TASK_REVISION_CONFLICT", "TASK_RECORD_INVALID", "TASK_UNAVAILABLE", "TASK_NOT_FOUND", "TASK_RUN_INACTIVE", "TASK_INVALID_INPUT", "TASK_DISPATCH_UNCERTAIN"]; /** Classify only stable codes, typed status, and dispatch facts supplied by the producing layer. */ export declare function describeAgentFailure(error: unknown, context: AgentFailureContext): AgentFailureFeedback; /** Attach the same sanitized value consumed by the MCP adapter and other client hosts. */ export declare function attachAgentFailure(error: unknown, context: AgentFailureContext): Error & { feedback: AgentFailureFeedback; }; /** An HTTP success can still carry an unresolved business result. Keep its existing state and ID. */ export declare function reconciliationFeedback(invocationId: string, operation?: 'invoke' | 'resume' | 'inspect'): AgentFailureFeedback; //# sourceMappingURL=agent-feedback.d.ts.map