mirror of
https://github.com/moltbot/moltbot.git
synced 2026-05-13 15:47:28 +00:00
38 lines
1.1 KiB
TypeScript
38 lines
1.1 KiB
TypeScript
import type { OpenClawConfig } from "../config/types.openclaw.js";
|
|
import type {
|
|
PluginWebSearchProviderEntry,
|
|
WebSearchProviderToolDefinition,
|
|
} from "../plugins/web-provider-types.js";
|
|
import type { RuntimeWebSearchMetadata } from "../secrets/runtime-web-tools.types.js";
|
|
|
|
type WebSearchConfig = NonNullable<OpenClawConfig["tools"]>["web"] extends infer Web
|
|
? Web extends { search?: infer Search }
|
|
? Search
|
|
: undefined
|
|
: undefined;
|
|
|
|
export type ResolveWebSearchDefinitionParams = {
|
|
config?: OpenClawConfig;
|
|
sandboxed?: boolean;
|
|
runtimeWebSearch?: RuntimeWebSearchMetadata;
|
|
providerId?: string;
|
|
preferRuntimeProviders?: boolean;
|
|
};
|
|
|
|
export type RunWebSearchParams = ResolveWebSearchDefinitionParams & {
|
|
args: Record<string, unknown>;
|
|
};
|
|
|
|
export type RunWebSearchResult = {
|
|
provider: string;
|
|
result: Record<string, unknown>;
|
|
};
|
|
|
|
export type ListWebSearchProvidersParams = {
|
|
config?: OpenClawConfig;
|
|
};
|
|
|
|
export type RuntimeWebSearchProviderEntry = PluginWebSearchProviderEntry;
|
|
export type RuntimeWebSearchToolDefinition = WebSearchProviderToolDefinition;
|
|
export type RuntimeWebSearchConfig = WebSearchConfig;
|