"use strict";
/**
 * AIClient Interface
 *
 * Unified interface for all AI client implementations in MyContext CLI.
 * Supports both simple API calls and complex agentic workflows.
 */
Object.defineProperty(exports, "__esModule", { value: true });
exports.ContextOverflowError = exports.ToolExecutionError = exports.PermissionDeniedError = exports.AIClientError = void 0;
/**
 * Error types specific to AI operations
 */
class AIClientError extends Error {
    constructor(message, code, recoverable = false) {
        super(message);
        this.code = code;
        this.recoverable = recoverable;
        this.name = 'AIClientError';
    }
}
exports.AIClientError = AIClientError;
class PermissionDeniedError extends AIClientError {
    constructor(operation, target) {
        super(`Permission denied for operation '${operation}' on '${target}'`, 'PERMISSION_DENIED', true);
    }
}
exports.PermissionDeniedError = PermissionDeniedError;
class ToolExecutionError extends AIClientError {
    constructor(tool, message) {
        super(`Tool '${tool}' execution failed: ${message}`, 'TOOL_EXECUTION_FAILED', true);
    }
}
exports.ToolExecutionError = ToolExecutionError;
class ContextOverflowError extends AIClientError {
    constructor(currentTokens, maxTokens) {
        super(`Context overflow: ${currentTokens} tokens exceeds maximum ${maxTokens}`, 'CONTEXT_OVERFLOW', true);
    }
}
exports.ContextOverflowError = ContextOverflowError;
//# sourceMappingURL=AIClient.js.map