UNPKG

mcp-ai-agent-guidelines

Version:

A comprehensive Model Context Protocol server providing advanced tools, resources, and prompts for implementing AI agent best practices

82 lines 2.83 kB
/** * A2A-specific error types for tool orchestration * * Extends the base error system with specialized errors for: * - Tool invocation failures * - Recursion depth violations * - Timeout enforcement * - Orchestration workflow errors */ /** * Base error class for A2A operations with consistent structure */ declare class A2AOperationError extends Error { readonly code: string; readonly context?: Record<string, unknown>; readonly timestamp: Date; constructor(message: string, code: string, context?: Record<string, unknown>); } /** * Error thrown when a tool invocation fails */ export declare class ToolInvocationError extends A2AOperationError { readonly toolName: string; constructor(toolName: string, message: string, context?: Record<string, unknown>); } /** * Error thrown when recursion depth limit is exceeded */ export declare class RecursionDepthError extends A2AOperationError { readonly currentDepth: number; readonly maxDepth: number; constructor(currentDepth: number, maxDepth: number, context?: Record<string, unknown>); } /** * Error thrown when a tool execution times out */ export declare class ToolTimeoutError extends A2AOperationError { readonly toolName: string; readonly timeoutMs: number; constructor(toolName: string, timeoutMs: number, context?: Record<string, unknown>); } /** * Error thrown when the entire chain execution times out */ export declare class ChainTimeoutError extends A2AOperationError { readonly chainTimeoutMs: number; readonly toolsCompleted: number; constructor(chainTimeoutMs: number, toolsCompleted: number, context?: Record<string, unknown>); } /** * Error thrown when a tool is not found in the registry */ export declare class ToolNotFoundError extends A2AOperationError { readonly toolName: string; constructor(toolName: string, context?: Record<string, unknown>); } /** * Error thrown when a tool is not allowed to invoke another tool */ export declare class ToolInvocationNotAllowedError extends A2AOperationError { readonly callerTool: string; readonly targetTool: string; constructor(callerTool: string, targetTool: string, context?: Record<string, unknown>); } /** * Error thrown when orchestration workflow execution fails */ export declare class OrchestrationError extends A2AOperationError { readonly workflowName?: string; constructor(message: string, context?: Record<string, unknown> & { workflowName?: string; }); } /** * Error thrown when execution strategy is invalid or cannot be executed */ export declare class ExecutionStrategyError extends A2AOperationError { readonly strategy: string; constructor(strategy: string, message: string, context?: Record<string, unknown>); } export {}; //# sourceMappingURL=a2a-errors.d.ts.map