// @bun
var __defProp = Object.defineProperty;
var __export = (target, all) => {
  for (var name in all)
    __defProp(target, name, {
      get: all[name],
      enumerable: true,
      configurable: true,
      set: (newValue) => all[name] = () => newValue
    });
};
var __esm = (fn, res) => () => (fn && (res = fn(fn = 0)), res);
var __require = import.meta.require;

// src/providers/types.ts
var ExternalProviderError, ProviderNotAvailableError, ProviderExecutionError, ContextCreationError;
var init_types = __esm(() => {
  ExternalProviderError = class ExternalProviderError extends Error {
    provider;
    code;
    cause;
    constructor(message, provider, code, cause) {
      super(message);
      this.provider = provider;
      this.code = code;
      this.cause = cause;
      this.name = "ExternalProviderError";
    }
  };
  ProviderNotAvailableError = class ProviderNotAvailableError extends ExternalProviderError {
    constructor(provider, reason) {
      super(`Provider '${provider}' is not available${reason ? `: ${reason}` : ""}`, provider, "PROVIDER_NOT_AVAILABLE");
      this.name = "ProviderNotAvailableError";
    }
  };
  ProviderExecutionError = class ProviderExecutionError extends ExternalProviderError {
    constructor(provider, message, cause) {
      super(message, provider, "EXECUTION_FAILED", cause);
      this.name = "ProviderExecutionError";
    }
  };
  ContextCreationError = class ContextCreationError extends ExternalProviderError {
    constructor(provider, message, cause) {
      super(message, provider, "CONTEXT_CREATION_FAILED", cause);
      this.name = "ContextCreationError";
    }
  };
});
init_types();

export {
  ProviderNotAvailableError,
  ProviderExecutionError,
  ExternalProviderError,
  ContextCreationError
};
