import { i as OpenClawConfig } from "../types.openclaw-DBHlrrVj.js";
import { Ls as PluginWebFetchProviderEntry, Us as WebFetchProviderToolDefinition } from "../types-C0dQmare.js";
import { t as RuntimeWebFetchMetadata } from "../runtime-web-tools.types-BgJBzqWL.js";

//#region src/web-fetch/runtime.d.ts
type WebFetchConfig = NonNullable<OpenClawConfig["tools"]>["web"] extends infer Web ? Web extends {
  fetch?: infer Fetch;
} ? Fetch : undefined : undefined;
type ResolveWebFetchDefinitionParams = {
  config?: OpenClawConfig;
  sandboxed?: boolean;
  runtimeWebFetch?: RuntimeWebFetchMetadata;
  providerId?: string;
  preferRuntimeProviders?: boolean;
};
/** Resolves whether web_fetch is enabled for the current config/sandbox. */
declare function resolveWebFetchEnabled(params: {
  fetch?: WebFetchConfig;
  sandboxed?: boolean;
}): boolean;
/** Reports whether a web_fetch provider has usable credentials. */
declare function isWebFetchProviderConfigured(params: {
  provider: Pick<PluginWebFetchProviderEntry, "envVars" | "getConfiguredCredentialFallback" | "getConfiguredCredentialValue" | "getCredentialValue" | "requiresCredential">;
  config?: OpenClawConfig;
}): boolean;
/** Lists web_fetch providers available to runtime selection. */
declare function listWebFetchProviders(params?: {
  config?: OpenClawConfig;
}): PluginWebFetchProviderEntry[];
/** Lists plugin-configured web_fetch providers. */
declare function listConfiguredWebFetchProviders(params?: {
  config?: OpenClawConfig;
}): PluginWebFetchProviderEntry[];
/** Resolves the configured or auto-detected web_fetch provider id. */
declare function resolveWebFetchProviderId(params: {
  fetch?: WebFetchConfig;
  config?: OpenClawConfig;
  providers?: PluginWebFetchProviderEntry[];
}): string;
/** Resolves the executable web_fetch provider tool definition. */
declare function resolveWebFetchDefinition(options?: ResolveWebFetchDefinitionParams): {
  provider: PluginWebFetchProviderEntry;
  definition: WebFetchProviderToolDefinition;
} | null;
//#endregion
export { ResolveWebFetchDefinitionParams, isWebFetchProviderConfigured, listConfiguredWebFetchProviders, listWebFetchProviders, resolveWebFetchDefinition, resolveWebFetchEnabled, resolveWebFetchProviderId };