mirror of
https://github.com/openclaw/openclaw.git
synced 2026-03-18 13:30:48 +00:00
33 lines
1.0 KiB
TypeScript
33 lines
1.0 KiB
TypeScript
import {
|
|
createPluginBackedWebSearchProvider,
|
|
getTopLevelCredentialValue,
|
|
setTopLevelCredentialValue,
|
|
} from "../../src/agents/tools/web-search-plugin-factory.js";
|
|
import { emptyPluginConfigSchema } from "../../src/plugins/config-schema.js";
|
|
import type { OpenClawPluginApi } from "../../src/plugins/types.js";
|
|
|
|
const bravePlugin = {
|
|
id: "brave",
|
|
name: "Brave Plugin",
|
|
description: "Bundled Brave plugin",
|
|
configSchema: emptyPluginConfigSchema(),
|
|
register(api: OpenClawPluginApi) {
|
|
api.registerWebSearchProvider(
|
|
createPluginBackedWebSearchProvider({
|
|
id: "brave",
|
|
label: "Brave Search",
|
|
hint: "Structured results · country/language/time filters",
|
|
envVars: ["BRAVE_API_KEY"],
|
|
placeholder: "BSA...",
|
|
signupUrl: "https://brave.com/search/api/",
|
|
docsUrl: "https://docs.openclaw.ai/brave-search",
|
|
autoDetectOrder: 10,
|
|
getCredentialValue: getTopLevelCredentialValue,
|
|
setCredentialValue: setTopLevelCredentialValue,
|
|
}),
|
|
);
|
|
},
|
|
};
|
|
|
|
export default bravePlugin;
|