/**
 * Utils Module - Centralized exports for utility functions
 *
 * Note: Some modules have types with the same names (e.g., CacheEntry, CacheStats).
 * Import directly from the specific module if you need a specific version.
 */
// Core utilities - errors provides base error classes
export { 
// Base error classes
CodeBuddyError, APIKeyError, APIError, NetworkError, TimeoutError, FileError, FileNotFoundError, ToolExecutionError, InvalidCommandError, CommandExecutionError, ValidationError as CodeBuddyValidationError, ConfigurationError, MCPError, SearchError, ParserError, PathTraversalError, JSONParseError, LoopTimeoutError, 
// User-friendly error classes for better UX
UserFriendlyError, ModelNotFoundError, ToolArgumentParseError, ProviderNotAvailableError, 
// Utility functions
isCodeBuddyError, getErrorMessage, withTimeout, withRetry, createLoopGuard, } from "./errors.js";
// Logger
export { Logger, getLogger, createLogger, resetLogger, logger, isDebugEnabled, debug, } from "./logger.js";
// LRU Cache (primary cache implementation)
export { LRUCache, } from "./lru-cache.js";
// Path and input validation
export { PathValidator, getPathValidator, initializePathValidator, validatePath, isPathSafe, } from "./path-validator.js";
export { 
// String validators
validateString, validateStringLength, validatePattern, 
// Number validators
validateNumber, validateNumberRange, validatePositiveInteger, 
// Collection validators
validateArray, validateObject, validateChoice, validateBoolean, 
// Special validators
validateUrl, validateEmail, validateFilePath, 
// Composite validators
validateOptional, validateWithDefault, validateSchema, 
// Assertion helpers
assertValid, assertString, assertNumber, 
// Command validation
validateCommand, sanitizeForShell, 
// Path sanitization
sanitizeFilePath as sanitizeFilePathInput, isPathSafeForWrite, 
// URL sanitization
sanitizeUrl as sanitizeUrlInput, isUrlSafe as isUrlSafeInput, 
// Unified validators object (recommended API)
validators, 
// Tool validation
VALIDATION_LIMITS, TOOL_SCHEMAS, validateToolArgs, safeValidateToolArgs, ToolValidationError, } from "./input-validator.js";
// Settings and configuration
export { SettingsManager, getSettingsManager, } from "./settings-manager.js";
export { ConfigValidator, SCHEMAS, getConfigValidator, validateStartupConfig, } from "./config-validator.js";
export { getCurrentModel, loadModelConfig, getDefaultModels, updateCurrentModel, updateDefaultModel, } from "./model-config.js";
export { isSupportedModel, getModelInfo, validateModel, getDefaultModel, getSupportedModels, getModelsByProvider, suggestModel, formatModelInfo, } from "./model-utils.js";
// Cost and rate limiting
export { CostTracker, getCostTracker, } from "./cost-tracker.js";
export { RateLimiter, getRateLimiter, resetRateLimiter, rateLimited, } from "./rate-limiter.js";
// Caching - export with prefixed names to avoid conflicts
export { Cache, createCacheKey, } from "./cache.js";
export { ResponseCache, getResponseCache, resetResponseCache, } from "./response-cache.js";
export { SemanticCache, getApiCache, resetApiCache, createToolCacheKey, isCacheable, } from "./semantic-cache.js";
// Text processing
export { isWordBoundary, findWordStart, findWordEnd, moveToPreviousWord, moveToNextWord, deleteWordBefore, deleteWordAfter, getTextPosition, moveToLineStart, moveToLineEnd, deleteCharBefore, deleteCharAfter, insertText, } from "./text-utils.js";
export { sanitizeFilePath, sanitizeCommandArg, escapeRegex, sanitizeHTML, sanitizeEmail as sanitizeEmailAddress, sanitizeURL, isAlphanumeric, truncateString, removeControlCharacters, sanitizeJSON, sanitizePort, sanitizeLLMOutput, extractCommentaryToolCalls, } from "./sanitize.js";
export { TokenCounter, formatTokenCount, createTokenCounter, countTokens, } from "./token-counter.js";
// System utilities
export { AutonomyManager, getAutonomyManager, } from "./autonomy-manager.js";
export { ModelRouter, getModelRouter, } from "./model-router.js";
export { WorkspaceDetector, getWorkspaceDetector, detectWorkspace, } from "./workspace-detector.js";
export { ConfirmationService, } from "./confirmation-service.js";
export { SelfHealingEngine, getSelfHealingEngine, resetSelfHealingEngine, } from "./self-healing.js";
// Error handling
export { ERROR_TEMPLATES, formatError, formatErrorJson, createErrorContext, printError, printErrorJson, formatWarning, formatSuccess, formatInfo, } from "./error-formatter.js";
export { EXIT_CODES, EXIT_CODE_DESCRIPTIONS, exitWithCode, getExitCodeDescription, errorToExitCode, handleFatalError, } from "./exit-codes.js";
// Specialized utilities
export { parseTestOutput, isLikelyTestOutput, createTestResultsData, } from "./test-output-parser.js";
export { loadCustomCommands, getCustomCommand, processCommandPrompt, ensureCommandDirectories, createSampleCommand, } from "./custom-commands.js";
export { loadCustomInstructions } from "./custom-instructions.js";
export { ConversationExporter, getConversationExporter, resetConversationExporter, } from "./conversation-export.js";
export { generateCompletion, getInstallInstructions, printCompletion, getSlashCommands, getCliOptions, } from "./shell-completions.js";
// JSON validation with Zod
export { parseJSON, parseJSONSafe, parseJSONStrict, parseJSONUntyped, validateObject as validateObjectWithZod, formatZodError, isValidJSON, matchesSchema, 
// Common schemas
ConfigFileSchema, ApprovalModeConfigSchema, SettingsSchema, SessionSchema, CacheEntrySchema, ToolCallSchema, LLMResponseSchema, GitHubPRSchema, HookConfigSchema, 
// Re-export zod for convenience
z, } from "./json-validator.js";
// Stream helpers
export { withStreamTimeout, safeStreamRead, withMaxIterations, handleStreamError, createTimeoutController, mergeAsyncIterables, drainAsyncIterable, } from "./stream-helpers.js";
//# sourceMappingURL=index.js.map