@openclaw/brave-plugin 2026.5.26 → 2026.5.27-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{brave-web-search-provider-fWQQZtaW.js → brave-web-search-provider-Dt95Xy8Y.js} +1 -22
- package/dist/index.js +1 -1
- package/dist/web-search-contract-api.js +2 -2
- package/dist/web-search-provider.js +1 -1
- package/npm-shrinkwrap.json +2 -2
- package/openclaw.plugin.json +2 -0
- package/package.json +5 -5
package/dist/{brave-web-search-provider-fWQQZtaW.js → brave-web-search-provider-Dt95Xy8Y.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { isDiagnosticFlagEnabled } from "openclaw/plugin-sdk/diagnostic-runtime";
|
|
2
|
-
import { createWebSearchProviderContractFields } from "openclaw/plugin-sdk/provider-web-search-config-contract";
|
|
2
|
+
import { createWebSearchProviderContractFields, mergeScopedSearchConfig, resolveProviderWebSearchPluginConfig } from "openclaw/plugin-sdk/provider-web-search-config-contract";
|
|
3
3
|
import { isRecord } from "openclaw/plugin-sdk/string-coerce-runtime";
|
|
4
4
|
//#region extensions/brave/src/brave-web-search-provider.ts
|
|
5
5
|
const BRAVE_CREDENTIAL_PATH = "plugins.entries.brave.config.webSearch.apiKey";
|
|
@@ -51,14 +51,6 @@ const BraveSearchSchema = {
|
|
|
51
51
|
}
|
|
52
52
|
}
|
|
53
53
|
};
|
|
54
|
-
function resolveProviderWebSearchPluginConfig(config, pluginId) {
|
|
55
|
-
if (!isRecord(config)) return;
|
|
56
|
-
const plugins = isRecord(config.plugins) ? config.plugins : void 0;
|
|
57
|
-
const entries = isRecord(plugins?.entries) ? plugins.entries : void 0;
|
|
58
|
-
const entry = isRecord(entries?.[pluginId]) ? entries[pluginId] : void 0;
|
|
59
|
-
const pluginConfig = isRecord(entry?.config) ? entry.config : void 0;
|
|
60
|
-
return isRecord(pluginConfig?.webSearch) ? pluginConfig.webSearch : void 0;
|
|
61
|
-
}
|
|
62
54
|
function resolveLegacyTopLevelBraveCredential(config) {
|
|
63
55
|
if (!isRecord(config)) return;
|
|
64
56
|
const tools = isRecord(config.tools) ? config.tools : void 0;
|
|
@@ -73,19 +65,6 @@ function resolveLegacyTopLevelBraveCredential(config) {
|
|
|
73
65
|
function resolveConfiguredBraveCredential(config) {
|
|
74
66
|
return resolveProviderWebSearchPluginConfig(config, "brave")?.apiKey ?? resolveLegacyTopLevelBraveCredential(config)?.value;
|
|
75
67
|
}
|
|
76
|
-
function mergeScopedSearchConfig(searchConfig, key, pluginConfig, options) {
|
|
77
|
-
if (!pluginConfig) return searchConfig;
|
|
78
|
-
const currentScoped = isRecord(searchConfig?.[key]) ? searchConfig?.[key] : {};
|
|
79
|
-
const next = {
|
|
80
|
-
...searchConfig,
|
|
81
|
-
[key]: {
|
|
82
|
-
...currentScoped,
|
|
83
|
-
...pluginConfig
|
|
84
|
-
}
|
|
85
|
-
};
|
|
86
|
-
if (options?.mirrorApiKeyToTopLevel && pluginConfig.apiKey !== void 0) next.apiKey = pluginConfig.apiKey;
|
|
87
|
-
return next;
|
|
88
|
-
}
|
|
89
68
|
function resolveBraveMode(searchConfig) {
|
|
90
69
|
return (isRecord(searchConfig?.brave) ? searchConfig.brave : void 0)?.mode === "llm-context" ? "llm-context" : "web";
|
|
91
70
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as createBraveWebSearchProvider } from "./brave-web-search-provider-
|
|
1
|
+
import { t as createBraveWebSearchProvider } from "./brave-web-search-provider-Dt95Xy8Y.js";
|
|
2
2
|
import { definePluginEntry } from "openclaw/plugin-sdk/plugin-entry";
|
|
3
3
|
//#region extensions/brave/index.ts
|
|
4
4
|
var brave_default = definePluginEntry({
|
|
@@ -12,7 +12,7 @@ function resolveLegacyTopLevelBraveCredential(config) {
|
|
|
12
12
|
value: search.apiKey
|
|
13
13
|
};
|
|
14
14
|
}
|
|
15
|
-
function resolveProviderWebSearchPluginConfig(config, pluginId) {
|
|
15
|
+
function resolveProviderWebSearchPluginConfig$1(config, pluginId) {
|
|
16
16
|
if (!isRecord(config)) return;
|
|
17
17
|
const plugins = isRecord(config.plugins) ? config.plugins : void 0;
|
|
18
18
|
const entries = isRecord(plugins?.entries) ? plugins.entries : void 0;
|
|
@@ -21,7 +21,7 @@ function resolveProviderWebSearchPluginConfig(config, pluginId) {
|
|
|
21
21
|
return isRecord(pluginConfig?.webSearch) ? pluginConfig.webSearch : void 0;
|
|
22
22
|
}
|
|
23
23
|
function resolveConfiguredBraveCredential(config) {
|
|
24
|
-
return resolveProviderWebSearchPluginConfig(config, "brave")?.apiKey ?? resolveLegacyTopLevelBraveCredential(config)?.value;
|
|
24
|
+
return resolveProviderWebSearchPluginConfig$1(config, "brave")?.apiKey ?? resolveLegacyTopLevelBraveCredential(config)?.value;
|
|
25
25
|
}
|
|
26
26
|
function createBraveWebSearchProvider() {
|
|
27
27
|
const credentialPath = "plugins.entries.brave.config.webSearch.apiKey";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { t as createBraveWebSearchProvider } from "./brave-web-search-provider-
|
|
1
|
+
import { t as createBraveWebSearchProvider } from "./brave-web-search-provider-Dt95Xy8Y.js";
|
|
2
2
|
export { createBraveWebSearchProvider };
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/brave-plugin",
|
|
3
|
-
"version": "2026.5.
|
|
3
|
+
"version": "2026.5.27-beta.1",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@openclaw/brave-plugin",
|
|
9
|
-
"version": "2026.5.
|
|
9
|
+
"version": "2026.5.27-beta.1"
|
|
10
10
|
}
|
|
11
11
|
}
|
|
12
12
|
}
|
package/openclaw.plugin.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openclaw/brave-plugin",
|
|
3
|
-
"version": "2026.5.
|
|
4
|
-
"description": "OpenClaw Brave plugin",
|
|
3
|
+
"version": "2026.5.27-beta.1",
|
|
4
|
+
"description": "OpenClaw Brave Search provider plugin for web search.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "https://github.com/openclaw/openclaw"
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
"allowInvalidConfigRecovery": true
|
|
19
19
|
},
|
|
20
20
|
"compat": {
|
|
21
|
-
"pluginApi": ">=2026.5.
|
|
21
|
+
"pluginApi": ">=2026.5.27-beta.1"
|
|
22
22
|
},
|
|
23
23
|
"build": {
|
|
24
|
-
"openclawVersion": "2026.5.
|
|
24
|
+
"openclawVersion": "2026.5.27-beta.1"
|
|
25
25
|
},
|
|
26
26
|
"release": {
|
|
27
27
|
"publishToClawHub": true,
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"npm-shrinkwrap.json"
|
|
38
38
|
],
|
|
39
39
|
"peerDependencies": {
|
|
40
|
-
"openclaw": ">=2026.5.
|
|
40
|
+
"openclaw": ">=2026.5.27-beta.1"
|
|
41
41
|
},
|
|
42
42
|
"peerDependenciesMeta": {
|
|
43
43
|
"openclaw": {
|