UNPKG

codecrucible-synth

Version:

Production-Ready AI Development Platform with Multi-Voice Synthesis, Smithery MCP Integration, Enterprise Security, and Zero-Timeout Reliability

61 lines 2.58 kB
// Core Type Definitions for CodeCrucible Synth // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging export class SecurityError extends Error { code; risk; constructor(message, code = 'SECURITY_ERROR', risk = 'medium') { super(message); this.name = 'SecurityError'; this.code = code; this.risk = risk; } } // eslint-disable-next-line @typescript-eslint/no-unsafe-declaration-merging export class CLIError extends Error { code; exitCode; constructor(message, exitCode, code = 'CLI_ERROR') { super(message); this.name = 'CLIError'; this.code = code; this.exitCode = exitCode; } static timeout(operation) { return new CLIError(`Timeout occurred during ${operation}`, CLIExitCode.NETWORK_ERROR, 'TIMEOUT'); } static networkError(message) { return new CLIError(`Network error: ${message}`, CLIExitCode.NETWORK_ERROR, 'NETWORK_ERROR'); } } export var CLIExitCode; (function (CLIExitCode) { CLIExitCode[CLIExitCode["SUCCESS"] = 0] = "SUCCESS"; CLIExitCode[CLIExitCode["GENERAL_ERROR"] = 1] = "GENERAL_ERROR"; CLIExitCode[CLIExitCode["INVALID_ARGS"] = 2] = "INVALID_ARGS"; CLIExitCode[CLIExitCode["CONFIG_ERROR"] = 3] = "CONFIG_ERROR"; CLIExitCode[CLIExitCode["NETWORK_ERROR"] = 4] = "NETWORK_ERROR"; CLIExitCode[CLIExitCode["INVALID_INPUT"] = 5] = "INVALID_INPUT"; CLIExitCode[CLIExitCode["EXECUTION_FAILED"] = 6] = "EXECUTION_FAILED"; CLIExitCode[CLIExitCode["INITIALIZATION_FAILED"] = 7] = "INITIALIZATION_FAILED"; CLIExitCode[CLIExitCode["AUTHENTICATION_REQUIRED"] = 8] = "AUTHENTICATION_REQUIRED"; CLIExitCode[CLIExitCode["AUTHENTICATION_FAILED"] = 9] = "AUTHENTICATION_FAILED"; CLIExitCode[CLIExitCode["PERMISSION_DENIED"] = 10] = "PERMISSION_DENIED"; CLIExitCode[CLIExitCode["SECURITY_VIOLATION"] = 11] = "SECURITY_VIOLATION"; CLIExitCode[CLIExitCode["UNEXPECTED_ERROR"] = 99] = "UNEXPECTED_ERROR"; })(CLIExitCode || (CLIExitCode = {})); // Response Validator (placeholder) export const ResponseValidator = { validate: (response) => ({ isValid: true, errors: [] }), }; // Export classes for compatibility export const UnifiedClientConfig = {}; export const ModelRequest = {}; export const ModelResponse = {}; export const ProjectContext = {}; export const AppConfig = {}; export const AgentConfig = {}; export const ExecutionResult = {}; export const SynthesisResponse = {}; // Export for compatibility export const ExecutionMode = {}; //# sourceMappingURL=types.js.map