// Export all error classes
export {
  // Base classes
  McpError,
  PublicMcpError,
  InternalMcpError,
  // Tool errors
  ToolNotFoundError,
  ToolNotConsentedError,
  ToolExecutionError,
  // Availability errors
  EntryUnavailableError,
  // Resource errors
  ResourceNotFoundError,
  ResourceReadError,
  InvalidResourceUriError,
  // Validation errors
  InvalidInputError,
  InvalidOutputError,
  InvalidMethodError,
  PayloadTooLargeError,
  // Rate limiting errors
  RateLimitError,
  QuotaExceededError,
  // Auth errors
  UnauthorizedError,
  // Session & client errors
  SessionMissingError,
  UnsupportedClientVersionError,
  // Internal errors
  GenericServerError,
  DependencyNotFoundError,
  InvalidHookFlowError,
  InvalidPluginScopeError,
  RequestContextNotAvailableError,
  // Configuration errors
  AuthConfigurationError,
  GlobalConfigNotFoundError,
  // Prompt errors
  PromptNotFoundError,
  PromptExecutionError,
  // Utilities
  isPublicError,
  toMcpError,
  formatMcpErrorResponse,
  extractPublicMessage,
  // Error codes
  MCP_ERROR_CODES,
  type McpErrorCode,
} from './mcp.error';

// Export authorization required error for progressive auth
export {
  // Schemas
  authorizationRequiredDataSchema,
  authorizationRequiredParamsSchema,
  authorizationRequiredMetaSchema,
  // Error class
  AuthorizationRequiredError,
} from './authorization-required.error';
export type {
  AuthorizationRequiredData,
  AuthorizationRequiredParams,
  AuthorizationRequiredMeta,
} from './authorization-required.error';

// Export tool-level credential gate error (checkToolCredentials stage)
export { ToolCredentialsRequiredError } from './tool-credentials-required.error';
export type { ToolCredentialsRequiredData } from './tool-credentials-required.error';

// Export error handler utilities
export { ErrorHandler, createErrorHandler, shouldStopExecution } from './error-handler';
export type { ErrorHandlerOptions } from './error-handler';

// Export agent errors
export {
  AgentNotFoundError,
  AgentExecutionError,
  AgentLoopExceededError,
  AgentTimeoutError,
  AgentVisibilityError,
  AgentLlmError,
  AgentConfigurationError,
  AgentNotConfiguredError,
  AgentToolNotFoundError,
} from './agent.errors';

// Export task errors (MCP 2025-11-25 background tasks)
export {
  TaskNotFoundError,
  TaskAlreadyTerminalError,
  TaskAugmentationNotSupportedError,
  TaskAugmentationRequiredError,
  TaskStoreNotInitializedError,
} from './task.error';

// Export elicitation errors
export {
  ElicitationNotSupportedError,
  ElicitationTimeoutError,
  ElicitationFallbackRequired,
  ElicitationStoreNotInitializedError,
  ElicitationDisabledError,
  ElicitationEncryptionError,
  ElicitationSubscriptionError,
} from './elicitation.error';

// Export remote MCP errors
export {
  // Connection errors
  RemoteConnectionError,
  RemoteDisconnectError,
  // Timeout errors
  RemoteTimeoutError,
  // Not found errors
  RemoteToolNotFoundError,
  RemoteResourceNotFoundError,
  RemotePromptNotFoundError,
  // Auth errors
  RemoteAuthError,
  RemoteAuthorizationError,
  // Execution errors
  RemoteToolExecutionError,
  RemoteResourceReadError,
  RemotePromptGetError,
  // Transport errors
  RemoteTransportError,
  RemoteUnsupportedTransportError,
  // Capability errors
  RemoteCapabilityDiscoveryError,
  RemoteCapabilityNotSupportedError,
  // Configuration errors
  RemoteConfigurationError,
  RemoteNotConnectedError,
  // Retry errors
  InvalidRetryOptionsError,
} from './remote.errors';

// Export normalization errors
export {
  MissingProvideError,
  InvalidUseClassError,
  InvalidUseFactoryError,
  InvalidUseValueError,
  InvalidEntityError,
} from './normalization.errors';

// Export registry errors
export {
  RegistryDefinitionNotFoundError,
  RegistryGraphEntryNotFoundError,
  RegistryDependencyNotRegisteredError,
  InvalidRegistryKindError,
  NameDisambiguationError,
  EntryValidationError,
  FlowNotRegisteredError,
  UnsupportedHookOwnerKindError,
} from './registry.errors';

// Export provider errors
export {
  ProviderNotRegisteredError,
  ProviderScopeMismatchError,
  ProviderNotInstantiatedError,
  DependencyCycleError,
  ProviderConstructionError,
  ProviderDependencyError,
  ProviderScopedAccessError,
  ProviderNotAvailableError,
  PluginDependencyError,
  InvalidDependencyScopeError,
} from './provider.errors';

// Export decorator errors
export { InvalidDecoratorMetadataError, HookTargetNotDefinedError } from './decorator.errors';

// Export transport errors
export {
  MethodNotImplementedError,
  UnsupportedTransportTypeError,
  TransportBusRequiredError,
  InvalidTransportSessionError,
  TransportNotConnectedError,
  TransportAlreadyStartedError,
  UnsupportedContentTypeError,
  TransportServiceNotAvailableError,
  SessionClaimConflictError,
} from './transport.errors';

// Export auth internal errors
export {
  EncryptionContextNotSetError,
  VaultLoadError,
  VaultNotFoundError,
  TokenNotAvailableError,
  TokenStoreRequiredError,
  NoProviderIdError,
  TokenLeakDetectedError,
  SessionSecretRequiredError,
  CredentialProviderAlreadyRegisteredError,
  AuthProvidersNotConfiguredError,
  OrchestratedAuthNotAvailableError,
  EncryptionKeyNotConfiguredError,
  SessionIdEmptyError,
  ElicitationSecretRequiredError,
  ScopeDeniedError,
  InMemoryStoreRequiredError,
  OrchestratorJwksNotAvailableError,
} from './auth-internal.errors';

// Export workflow errors
export {
  WorkflowStepNotFoundError,
  WorkflowTimeoutError,
  WorkflowDagValidationError,
  WorkflowJobTimeoutError,
} from './workflow.errors';

// Export ESM loader errors
export {
  EsmPackageLoadError,
  EsmVersionResolutionError,
  EsmManifestInvalidError,
  EsmCacheError,
  EsmRegistryAuthError,
  EsmInvalidSpecifierError,
} from './esm.errors';

// Export SDK errors
export {
  FlowExitedWithoutOutputError,
  ServerNotFoundError,
  ConfigNotFoundError,
  SessionVerificationFailedError,
  ContextExtensionNotAvailableError,
  ScopeConfigurationError,
  HaConfigurationError,
  InvokeStateMissingKeyError,
  SkillSessionError,
  InvalidSkillError,
  SkillInstructionFetchError,
  InvalidInstructionSourceError,
  SkillContextNotImplementedError,
  ServerlessHandlerNotInitializedError,
  MissingPromptArgumentError,
  DynamicAdapterNameError,
  AgentConfigKeyNotFoundError,
  AgentToolExecutionError,
  AgentMethodNotAvailableError,
  VercelKvNotSupportedError,
  VercelKvAsyncInitRequiredError,
  RequiredConfigUndefinedError,
  RegistryNotInitializedError,
  EnclaveExecutionError,
  FlowInputMissingError,
  DynamicJobDirectExecutionError,
} from './sdk.errors';
