UNPKG

@light-merlin-dark/tok

Version:

Fast token estimation and cost calculation for enterprise LLMs with CLI and MCP support

30 lines 1.09 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.CommandError = exports.ErrorCode = void 0; exports.createCommandError = createCommandError; var ErrorCode; (function (ErrorCode) { ErrorCode["INVALID_ARGUMENT"] = "INVALID_ARGUMENT"; ErrorCode["FILE_NOT_FOUND"] = "FILE_NOT_FOUND"; ErrorCode["PERMISSION_DENIED"] = "PERMISSION_DENIED"; ErrorCode["PROCESSING_ERROR"] = "PROCESSING_ERROR"; ErrorCode["ESTIMATION_ERROR"] = "ESTIMATION_ERROR"; ErrorCode["CONFIGURATION_ERROR"] = "CONFIGURATION_ERROR"; })(ErrorCode || (exports.ErrorCode = ErrorCode = {})); class CommandError extends Error { code; userMessage; details; constructor(code, userMessage, details) { super(userMessage); this.name = 'CommandError'; this.code = code; this.userMessage = userMessage; this.details = details; } } exports.CommandError = CommandError; function createCommandError(code, userMessage, details) { return new CommandError(code, userMessage, details); } //# sourceMappingURL=errors.js.map