/**
 * 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.
 */
export { CodeBuddyError, APIKeyError, APIError, NetworkError, TimeoutError, FileError, FileNotFoundError, ToolExecutionError, InvalidCommandError, CommandExecutionError, ValidationError as CodeBuddyValidationError, ConfigurationError, MCPError, SearchError, ParserError, PathTraversalError, JSONParseError, LoopTimeoutError, UserFriendlyError, ModelNotFoundError, ToolArgumentParseError, ProviderNotAvailableError, isCodeBuddyError, getErrorMessage, withTimeout, withRetry, createLoopGuard, type LoopGuardOptions, type UserFriendlyErrorOptions, } from "./errors.js";
export { Logger, LogLevel, LogFormat, LogContext, LogEntry, LoggerOptions, getLogger, createLogger, resetLogger, logger, isDebugEnabled, debug, } from "./logger.js";
export { LRUCache, LRUCacheOptions, CacheEntry as LRUCacheEntry, CacheStats as LRUCacheStats, } from "./lru-cache.js";
export { PathValidator, PathValidatorOptions, PathValidationResult, getPathValidator, initializePathValidator, validatePath, isPathSafe, } from "./path-validator.js";
export { ValidationResult, ValidationOptions, validateString, validateStringLength, validatePattern, validateNumber, validateNumberRange, validatePositiveInteger, validateArray, validateObject, validateChoice, validateBoolean, validateUrl, validateEmail, validateFilePath, validateOptional, validateWithDefault, validateSchema, assertValid, assertString, assertNumber, validateCommand, sanitizeForShell, sanitizeFilePath as sanitizeFilePathInput, isPathSafeForWrite, sanitizeUrl as sanitizeUrlInput, isUrlSafe as isUrlSafeInput, validators, type UnifiedValidationResult, type PathValidationOptions, type UrlValidationOptions, type JsonParseOptions, type SanitizeOptions, VALIDATION_LIMITS, TOOL_SCHEMAS, validateToolArgs, safeValidateToolArgs, ToolValidationError, } from "./input-validator.js";
export { SettingsManager, getSettingsManager, } from "./settings-manager.js";
export type { UserSettings, ProjectSettings, } from "./settings-manager.js";
export { ConfigValidator, ValidationError as ConfigValidationError, ValidationResult as ConfigValidationResult, JSONSchema, SCHEMAS, getConfigValidator, validateStartupConfig, } from "./config-validator.js";
export { ModelConfig as ModelConfigType, ModelOption, getCurrentModel, loadModelConfig, getDefaultModels, updateCurrentModel, updateDefaultModel, } from "./model-config.js";
export { ModelName, ModelProvider, ModelInfo, isSupportedModel, getModelInfo, validateModel, getDefaultModel, getSupportedModels, getModelsByProvider, suggestModel, formatModelInfo, } from "./model-utils.js";
export { CostTracker, TokenUsage, CostReport, CostConfig, ModelPricing, getCostTracker, } from "./cost-tracker.js";
export { RateLimiter, RateLimitConfig, RateLimitStatus, QueuedRequest, getRateLimiter, resetRateLimiter, rateLimited, } from "./rate-limiter.js";
export { Cache, CacheEntry as SimpleCacheEntry, createCacheKey, } from "./cache.js";
export { ResponseCache, CacheEntry as ResponseCacheEntry, CacheStats as ResponseCacheStats, getResponseCache, resetResponseCache, } from "./response-cache.js";
export { SemanticCache, CacheEntry as SemanticCacheEntry, CacheConfig as SemanticCacheConfig, CacheStats as SemanticCacheStats, CacheLookupResult, getApiCache, resetApiCache, createToolCacheKey, isCacheable, } from "./semantic-cache.js";
export { TextPosition, TextSelection, 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, ExtractedToolCall, extractCommentaryToolCalls, } from "./sanitize.js";
export { TokenCounter, formatTokenCount, createTokenCounter, countTokens, } from "./token-counter.js";
export { AutonomyManager, AutonomyLevel, AutonomyConfig, YOLOConfig, getAutonomyManager, } from "./autonomy-manager.js";
export { ModelRouter, ModelRouterConfig, ModelConfig as RouterModelConfig, TaskType, getModelRouter, } from "./model-router.js";
export { WorkspaceDetector, WorkspaceConfig, ProjectType, PackageManager, getWorkspaceDetector, detectWorkspace, } from "./workspace-detector.js";
export { ConfirmationService, ConfirmationOptions, ConfirmationResult, } from "./confirmation-service.js";
export { SelfHealingEngine, SelfHealingOptions, FixAttempt, SelfHealingResult, getSelfHealingEngine, resetSelfHealingEngine, } from "./self-healing.js";
export { ErrorContext, ERROR_TEMPLATES, formatError, formatErrorJson, createErrorContext, printError, printErrorJson, formatWarning, formatSuccess, formatInfo, } from "./error-formatter.js";
export { EXIT_CODES, ExitCode, EXIT_CODE_DESCRIPTIONS, exitWithCode, getExitCodeDescription, errorToExitCode, handleFatalError, } from "./exit-codes.js";
export { ParseResult as TestParseResult, parseTestOutput, isLikelyTestOutput, createTestResultsData, } from "./test-output-parser.js";
export { CustomCommand, loadCustomCommands, getCustomCommand, processCommandPrompt, ensureCommandDirectories, createSampleCommand, } from "./custom-commands.js";
export { loadCustomInstructions } from "./custom-instructions.js";
export { ConversationExporter, ExportOptions, getConversationExporter, resetConversationExporter, } from "./conversation-export.js";
export { ShellType, CompletionOption, generateCompletion, getInstallInstructions, printCompletion, getSlashCommands, getCliOptions, } from "./shell-completions.js";
export { parseJSON, parseJSONSafe, parseJSONStrict, parseJSONUntyped, validateObject as validateObjectWithZod, formatZodError, isValidJSON, matchesSchema, ConfigFileSchema, ApprovalModeConfigSchema, SettingsSchema, SessionSchema, CacheEntrySchema, ToolCallSchema, LLMResponseSchema, GitHubPRSchema, HookConfigSchema, z, type ParseResult as ZodParseResult, type ValidationOptions as ZodValidationOptions, } from "./json-validator.js";
export { withStreamTimeout, safeStreamRead, withMaxIterations, handleStreamError, createTimeoutController, mergeAsyncIterables, drainAsyncIterable, type StreamTimeoutOptions, type SafeStreamReadOptions, type SafeStreamReadResult, type StreamErrorContext, } from "./stream-helpers.js";
