mirror of
https://github.com/openclaw/openclaw.git
synced 2026-05-08 23:50:44 +00:00
Add an Exa web-search contract artifact and use single bundled plugin-scoped webSearch config as a provider hint. This keeps runtime secret resolution on metadata-only surfaces instead of importing full provider tool implementations.
30 lines
935 B
TypeScript
30 lines
935 B
TypeScript
import {
|
|
createWebSearchProviderContractFields,
|
|
type WebSearchProviderPlugin,
|
|
} from "openclaw/plugin-sdk/provider-web-search-contract";
|
|
|
|
export function createExaWebSearchProvider(): WebSearchProviderPlugin {
|
|
const credentialPath = "plugins.entries.exa.config.webSearch.apiKey";
|
|
|
|
return {
|
|
id: "exa",
|
|
label: "Exa Search",
|
|
hint: "Neural + keyword search with date filters and content extraction",
|
|
onboardingScopes: ["text-inference"],
|
|
credentialLabel: "Exa API key",
|
|
envVars: ["EXA_API_KEY"],
|
|
placeholder: "exa-...",
|
|
signupUrl: "https://exa.ai/",
|
|
docsUrl: "https://docs.openclaw.ai/tools/web",
|
|
autoDetectOrder: 65,
|
|
credentialPath,
|
|
...createWebSearchProviderContractFields({
|
|
credentialPath,
|
|
searchCredential: { type: "scoped", scopeId: "exa" },
|
|
configuredCredential: { pluginId: "exa" },
|
|
selectionPluginId: "exa",
|
|
}),
|
|
createTool: () => null,
|
|
};
|
|
}
|