import { PublicMcpError } from '../../errors'; import type { ToolAuthorizationResult } from '../session/skill-session.types'; /** * Error thrown when a tool call is not authorized by the active skill(s). * * This error is thrown in 'strict' policy mode when a tool not in the * skill's allowlist is called. Supports both single and multiple active skills. * * @example * ```typescript * const authResult = sessionManager.checkToolAuthorization('some_tool'); * if (!authResult.allowed) { * throw new ToolNotAllowedError(authResult); * } * ``` */ export declare class ToolNotAllowedError extends PublicMcpError { readonly mcpErrorCode: -32600; readonly toolName: string; readonly skillId: string | undefined; readonly skillName: string | undefined; readonly activeSkillIds: string[]; readonly activeSkillNames: string[]; readonly reason: ToolAuthorizationResult['reason']; readonly allowedTools: string[]; constructor(authResult: ToolAuthorizationResult, allowedTools?: string[]); private static formatMessage; /** * Format the skill display string, handling multiple active skills. */ private static formatSkillDisplay; getPublicMessage(): string; toJsonRpcError(): { code: -32600; message: string; data: { toolName: string; skillId: string | undefined; skillName: string | undefined; activeSkillIds: string[]; activeSkillNames: string[]; reason: "skill_allowlist" | "dynamically_approved" | "no_active_skill" | "not_in_allowlist" | "denied" | "rate_limited"; allowedTools: string[]; }; }; } /** * Error thrown when tool approval is required but not granted. */ export declare class ToolApprovalRequiredError extends PublicMcpError { readonly mcpErrorCode: -32600; readonly toolName: string; readonly skillId: string | undefined; constructor(toolName: string, skillId?: string); getPublicMessage(): string; toJsonRpcError(): { code: -32600; message: string; data: { toolName: string; skillId: string | undefined; requiresApproval: boolean; }; }; } //# sourceMappingURL=tool-not-allowed.error.d.ts.map