//#region src/utils/errors.d.ts /** * Custom error types */ /** * Base error class */ declare class XlingError extends Error { constructor(message: string); } /** * Error thrown when a tool is not supported */ declare class UnsupportedToolError extends XlingError { constructor(tool: string); } /** * Error thrown for invalid scopes */ declare class InvalidScopeError extends XlingError { constructor(scope: string); } /** * Error thrown when a config file is missing */ declare class ConfigFileNotFoundError extends XlingError { constructor(path: string); } /** * Error thrown when parsing a config file fails */ declare class ConfigParseError extends XlingError { constructor(path: string, reason: string); } /** * Error thrown when a Codex profile cannot be found */ declare class ProfileNotFoundError extends XlingError { constructor(profile: string); } /** * Error thrown when a requested settings variant is missing */ declare class SettingsVariantNotFoundError extends XlingError { constructor(variant: string); } /** * Error thrown when a file cannot be written safely */ declare class FileWriteError extends XlingError { constructor(path: string, reason: string); } /** * Error thrown when the configured editor cannot be launched */ declare class EditorLaunchError extends XlingError { constructor(editor: string, reason: string); } /** * Error thrown when an executable is not found in PATH */ declare class ExecutableNotFoundError extends XlingError { constructor(executable: string, hint?: string); } /** * Error thrown when not in a git repository */ declare class GitRepositoryError extends XlingError { constructor(cwd: string); } /** * Error thrown when a git command fails */ declare class GitCommandError extends XlingError { constructor(command: string, stderr: string); } /** * Error thrown when a required payload field is missing or invalid */ declare class InvalidPayloadError extends XlingError { constructor(message: string); } /** * Error thrown when an action is not supported */ declare class UnsupportedActionError extends XlingError { constructor(action: string, context?: string); } /** * Error thrown when a validation fails */ declare class ValidationError extends XlingError { constructor(message: string); } /** * Error thrown when a PR operation fails */ declare class PROperationError extends XlingError { constructor(operation: string, reason: string); } /** * Error thrown when a worktree operation fails */ declare class WorktreeError extends XlingError { constructor(message: string); } /** * Error thrown when a council/discussion operation fails */ declare class CouncilError extends XlingError { constructor(message: string); } /** * Error thrown when probing a provider's available models fails */ declare class ModelProbeError extends XlingError { constructor(message: string); } //#endregion export { ConfigFileNotFoundError, ConfigParseError, CouncilError, EditorLaunchError, ExecutableNotFoundError, FileWriteError, GitCommandError, GitRepositoryError, InvalidPayloadError, InvalidScopeError, ModelProbeError, PROperationError, ProfileNotFoundError, SettingsVariantNotFoundError, UnsupportedActionError, UnsupportedToolError, ValidationError, WorktreeError, XlingError };