@kodelyth/brave-plugin 2026.5.39
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/index.js +7 -0
- package/klaw.plugin.json +81 -0
- package/package.json +34 -0
- package/test-api.js +7 -0
- package/web-search-contract-api.js +7 -0
- package/web-search-provider.js +7 -0
package/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../../../dist/extensions/brave/index.js";
|
|
2
|
+
import defaultModule from "../../../dist/extensions/brave/index.js";
|
|
3
|
+
let defaultExport = defaultModule;
|
|
4
|
+
for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
|
|
5
|
+
defaultExport = defaultExport.default;
|
|
6
|
+
}
|
|
7
|
+
export { defaultExport as default };
|
package/klaw.plugin.json
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "brave",
|
|
3
|
+
"activation": {
|
|
4
|
+
"onStartup": false
|
|
5
|
+
},
|
|
6
|
+
"providerAuthEnvVars": {
|
|
7
|
+
"brave": [
|
|
8
|
+
"BRAVE_API_KEY"
|
|
9
|
+
]
|
|
10
|
+
},
|
|
11
|
+
"setup": {
|
|
12
|
+
"providers": [
|
|
13
|
+
{
|
|
14
|
+
"id": "brave",
|
|
15
|
+
"authMethods": [
|
|
16
|
+
"api-key"
|
|
17
|
+
],
|
|
18
|
+
"envVars": [
|
|
19
|
+
"BRAVE_API_KEY"
|
|
20
|
+
]
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
"uiHints": {
|
|
25
|
+
"webSearch.apiKey": {
|
|
26
|
+
"label": "Brave Search API Key",
|
|
27
|
+
"help": "Brave Search API key (fallback: BRAVE_API_KEY env var).",
|
|
28
|
+
"sensitive": true,
|
|
29
|
+
"placeholder": "BSA..."
|
|
30
|
+
},
|
|
31
|
+
"webSearch.mode": {
|
|
32
|
+
"label": "Brave Search Mode",
|
|
33
|
+
"help": "Brave Search mode: web or llm-context."
|
|
34
|
+
},
|
|
35
|
+
"webSearch.baseUrl": {
|
|
36
|
+
"label": "Brave Search Base URL",
|
|
37
|
+
"help": "Optional Brave-compatible API base URL for trusted proxies. Defaults to https://api.search.brave.com."
|
|
38
|
+
}
|
|
39
|
+
},
|
|
40
|
+
"contracts": {
|
|
41
|
+
"webSearchProviders": [
|
|
42
|
+
"brave"
|
|
43
|
+
]
|
|
44
|
+
},
|
|
45
|
+
"configContracts": {
|
|
46
|
+
"compatibilityRuntimePaths": [
|
|
47
|
+
"tools.web.search.apiKey"
|
|
48
|
+
]
|
|
49
|
+
},
|
|
50
|
+
"configSchema": {
|
|
51
|
+
"type": "object",
|
|
52
|
+
"additionalProperties": false,
|
|
53
|
+
"properties": {
|
|
54
|
+
"webSearch": {
|
|
55
|
+
"type": "object",
|
|
56
|
+
"additionalProperties": false,
|
|
57
|
+
"properties": {
|
|
58
|
+
"apiKey": {
|
|
59
|
+
"type": [
|
|
60
|
+
"string",
|
|
61
|
+
"object"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
"mode": {
|
|
65
|
+
"type": "string",
|
|
66
|
+
"enum": [
|
|
67
|
+
"web",
|
|
68
|
+
"llm-context"
|
|
69
|
+
]
|
|
70
|
+
},
|
|
71
|
+
"baseUrl": {
|
|
72
|
+
"type": [
|
|
73
|
+
"string",
|
|
74
|
+
"object"
|
|
75
|
+
]
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
}
|
package/package.json
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@kodelyth/brave-plugin",
|
|
3
|
+
"version": "2026.5.39",
|
|
4
|
+
"description": "Klaw Brave plugin",
|
|
5
|
+
"repository": {
|
|
6
|
+
"type": "git",
|
|
7
|
+
"url": "https://github.com/kodelyth/klaw"
|
|
8
|
+
},
|
|
9
|
+
"type": "module",
|
|
10
|
+
"devDependencies": {
|
|
11
|
+
"@kodelyth/plugin-sdk": "1.0.1"
|
|
12
|
+
},
|
|
13
|
+
"klaw": {
|
|
14
|
+
"extensions": [
|
|
15
|
+
"./index.js"
|
|
16
|
+
],
|
|
17
|
+
"install": {
|
|
18
|
+
"npmSpec": "@kodelyth/brave-plugin",
|
|
19
|
+
"defaultChoice": "npm",
|
|
20
|
+
"minHostVersion": ">=2026.4.10",
|
|
21
|
+
"allowInvalidConfigRecovery": true
|
|
22
|
+
},
|
|
23
|
+
"compat": {
|
|
24
|
+
"pluginApi": ">=2026.5.39"
|
|
25
|
+
},
|
|
26
|
+
"build": {
|
|
27
|
+
"klawVersion": "2026.5.39"
|
|
28
|
+
},
|
|
29
|
+
"release": {
|
|
30
|
+
"publishToClawHub": true,
|
|
31
|
+
"publishToNpm": true
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
package/test-api.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../../../dist/extensions/brave/test-api.js";
|
|
2
|
+
import * as module from "../../../dist/extensions/brave/test-api.js";
|
|
3
|
+
let defaultExport = "default" in module ? module.default : module;
|
|
4
|
+
for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
|
|
5
|
+
defaultExport = defaultExport.default;
|
|
6
|
+
}
|
|
7
|
+
export { defaultExport as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../../../dist/extensions/brave/web-search-contract-api.js";
|
|
2
|
+
import * as module from "../../../dist/extensions/brave/web-search-contract-api.js";
|
|
3
|
+
let defaultExport = "default" in module ? module.default : module;
|
|
4
|
+
for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
|
|
5
|
+
defaultExport = defaultExport.default;
|
|
6
|
+
}
|
|
7
|
+
export { defaultExport as default };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export * from "../../../dist/extensions/brave/web-search-provider.js";
|
|
2
|
+
import * as module from "../../../dist/extensions/brave/web-search-provider.js";
|
|
3
|
+
let defaultExport = "default" in module ? module.default : module;
|
|
4
|
+
for (let index = 0; index < 4 && defaultExport && typeof defaultExport === "object" && "default" in defaultExport; index += 1) {
|
|
5
|
+
defaultExport = defaultExport.default;
|
|
6
|
+
}
|
|
7
|
+
export { defaultExport as default };
|