{"_id":"@dsh-ltctfer/dsh-web-search-brave","_rev":"6-5ab2d5d3a0922bddcad1e742ee089f65","name":"@dsh-ltctfer/dsh-web-search-brave","dist-tags":{"latest":"0.2.4"},"versions":{"0.1.0":{"name":"@dsh-ltctfer/dsh-web-search-brave","version":"0.1.0","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","_id":"@dsh-ltctfer/dsh-web-search-brave@0.1.0","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"dist":{"shasum":"9d51f60bf5a93aac1405bb303e65c09d3fa7cdf3","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.1.0.tgz","fileCount":6,"integrity":"sha512-Tsnh7LKW5ujvWMS5f9NZk6RwTjaF0gmHmenbXHUMhN+1VZ55iRAPrydjCVhlbgnUAvv+WWMRB3otvRAoQAH5KQ==","signatures":[{"sig":"MEUCIQDgnmferf1RCe/AquJoXan6Hb/X02Gb9lnuMY9PNVv9LwIgfmcpLk9am8L0vTT75bs/1YNyN6Q+fE8AIcemrqBG29c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":26229},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./package.json":"./package.json"},"gitHead":"bb68ef84cb7e122980d18b4094d8f2e778a46499","_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"repository":{"url":"git+https://github.com/LTctfer/dsh-web-search-brave.git","type":"git"},"_npmVersion":"11.6.2","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","directories":{},"_nodeVersion":"25.1.0","dependencies":{"undici":"^6.21.0","@deepseek-ai/schemastery":"^3.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-web-search-brave_0.1.0_1786696345671_0.9001420615188109","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@dsh-ltctfer/dsh-web-search-brave","version":"0.2.0","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","_id":"@dsh-ltctfer/dsh-web-search-brave@0.2.0","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"dist":{"shasum":"846d141dd6d8ac25abe39c58a31edecd5bede111","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.2.0.tgz","fileCount":6,"integrity":"sha512-NiEvvwjwEyTCiClSDoMrjvGr9EzwGCq013eMSlSToQYEb5NW4FIkfekveFgGsH9K7MqxCmTu+AHTPXBHWa/JbQ==","signatures":[{"sig":"MEUCIQCKXqrIXKmzGB5q07B4n4Tgap0WEoy4RrOwfE7IhVV/NQIgRmd+4pIx/i79ya5ZZ+v8YqEAoM8I1jzHz+Vxxs6dge0=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":31324},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./package.json":"./package.json"},"gitHead":"32a469805f8322a3228a54bb5f488ce1362cdd17","_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"repository":{"url":"git+https://github.com/LTctfer/dsh-web-search-brave.git","type":"git"},"_npmVersion":"11.6.2","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","directories":{},"_nodeVersion":"25.1.0","dependencies":{"undici":"^6.21.0","@deepseek-ai/schemastery":"^3.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-web-search-brave_0.2.0_1786698105229_0.20427297554077795","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@dsh-ltctfer/dsh-web-search-brave","version":"0.2.1","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","_id":"@dsh-ltctfer/dsh-web-search-brave@0.2.1","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"dsh":{"client":{"inject":["slots"],"platform":"web"}},"dist":{"shasum":"ecba81d7095a276654766af79329497374722b9d","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.2.1.tgz","fileCount":8,"integrity":"sha512-pPWb70cxBX4VKMeTvzyZcqra/HoovwXuPteC0LKplI4fqE30fEIAGCNFGKDg7VGFUR4GiNqpfkvf9XaUTN0eDA==","signatures":[{"sig":"MEYCIQDHdZF8t6mAM33/cgIGfD+Sk1AfIq5y2wfS6y1lLQxHcwIhAIyAvEAdbB+01QTDP4rkHpYvPDn48GX5xuPc3dyHOskA","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44835},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"2194f85702e1ca2f6cee541bf6032284123b1d85","_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"repository":{"url":"git+https://github.com/LTctfer/dsh-web-search-brave.git","type":"git"},"_npmVersion":"11.6.2","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","directories":{},"_nodeVersion":"25.1.0","dependencies":{"undici":"^6.21.0","@deepseek-ai/schemastery":"^3.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-web-search-brave_0.2.1_1786698894672_0.5083279662347926","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"@dsh-ltctfer/dsh-web-search-brave","version":"0.2.2","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","_id":"@dsh-ltctfer/dsh-web-search-brave@0.2.2","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"dsh":{"client":{"inject":["slots","settingsScope"],"platform":"web"}},"dist":{"shasum":"729b904facaa121e5f21de5c1c553dfb6f54bcdc","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.2.2.tgz","fileCount":8,"integrity":"sha512-/552WyZu8quLxSOq26t4VkMkFTpWbHOFsxxmQZACpt1juPIWkUjN4ymFJhnUFW+agFSb+NQ7nrqmvcKn7r+ZNA==","signatures":[{"sig":"MEQCIDJY0y8qIsvsfs2/7TKQxpOONGXSOwItdCh+7nh/9p5PAiBHpbPtkz1vYwWDFNBCyKe5Tkq9aJpiItx1Riyi/TcMqw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":44937},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"16239143b882860a26fb300b594329cb3fd7c2ed","_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"repository":{"url":"git+https://github.com/LTctfer/dsh-web-search-brave.git","type":"git"},"_npmVersion":"11.6.2","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","directories":{},"_nodeVersion":"25.1.0","dependencies":{"undici":"^6.21.0","@deepseek-ai/schemastery":"^3.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-web-search-brave_0.2.2_1786699350985_0.5304256293883212","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@dsh-ltctfer/dsh-web-search-brave","version":"0.2.3","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","_id":"@dsh-ltctfer/dsh-web-search-brave@0.2.3","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"dsh":{"client":{"inject":["slots"],"platform":"web"}},"dist":{"shasum":"8650fb138463fb71f93cc3a6e9472b28f2020605","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.2.3.tgz","fileCount":9,"integrity":"sha512-iXHFVxYnf8XyQJpqFcWzGgSXyZoKJANDs/wX+LdpDb37dctpNInfbxD98ZEgA9Z1QHDmn9+VNqM7SANnyXSykQ==","signatures":[{"sig":"MEYCIQCefORGVrO33zlGUS4nl1KgmW41TK+0z/VSunhX4bBJagIhAJs/moxIB97l0shPZGdwnwmOijqy9Q8hu32ZJxrmxLKb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56993},"main":"lib/index.js","type":"module","types":"lib/types/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"gitHead":"5c84478eab083ffb4662042bb1967c2d55941477","_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"repository":{"url":"git+https://github.com/LTctfer/dsh-web-search-brave.git","type":"git"},"_npmVersion":"11.6.2","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","directories":{},"_nodeVersion":"22.20.0","dependencies":{"undici":"^6.21.0","@deepseek-ai/schemastery":"^3.18.1"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"peerDependencies":{"@deepseek-ai/cordis":"^4.0.1","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6"},"_npmOperationalInternal":{"tmp":"tmp/dsh-web-search-brave_0.2.3_1786757649264_0.533389372346696","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@dsh-ltctfer/dsh-web-search-brave","description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","version":"0.2.4","publishConfig":{"access":"public"},"repository":{"type":"git","url":"git+https://github.com/LTctfer/dsh-web-search-brave.git"},"type":"module","main":"lib/index.js","types":"lib/types/index.d.ts","exports":{".":{"types":"./lib/types/index.d.ts","default":"./lib/index.js"},"./client":{"types":"./lib/types/client/index.d.ts","default":"./lib/client.js"},"./package.json":"./package.json"},"dsh":{"client":{"inject":["slots"],"platform":"web"}},"keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"license":"MIT","engines":{"node":">=20"},"peerDependencies":{"@deepseek-ai/dsh-credentials":"^0.1.0-rc.6","@deepseek-ai/dsh-launch-environment":"^0.1.0-rc.6","@deepseek-ai/dsh-settings":"^0.1.0-rc.6","@deepseek-ai/dsh-web":"^0.1.0-rc.6","@deepseek-ai/cordis":"^4.0.1"},"dependencies":{"@deepseek-ai/schemastery":"^3.18.1","undici":"^6.21.0"},"gitHead":"ccf0a55ab23a8d8beb49df49e5dc1a3ca180b3ea","_id":"@dsh-ltctfer/dsh-web-search-brave@0.2.4","bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","_nodeVersion":"22.20.0","_npmVersion":"11.6.2","dist":{"integrity":"sha512-qWMXSt1ZKdP2pZNmaMJoA0TDcZhEbnqe234XRfzTCrkm2qW+uvvgcaz0fE7NSWJ5UDzU3JAO+q6Je2GhRU9Ziw==","shasum":"6778534f9dd96e5807a2e96d7eaab7495e56ba56","tarball":"https://registry.npmjs.org/@dsh-ltctfer/dsh-web-search-brave/-/dsh-web-search-brave-0.2.4.tgz","fileCount":9,"unpackedSize":57814,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCzK0lTaWgegCOQuJs+g9jWpcgbxC69XBUaktL/LiObzgIhAO2HvLPM0IxPWT+H7EMXjyPODn6l2yalWME3Se9IOTsk"}]},"_npmUser":{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"},"directories":{},"maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dsh-web-search-brave_0.2.4_1786758468759_0.19889001145959284"},"_hasShrinkwrap":false}},"time":{"created":"2026-08-14T08:32:25.432Z","modified":"2026-08-15T01:47:49.062Z","0.1.0":"2026-08-14T08:32:25.804Z","0.2.0":"2026-08-14T09:01:45.372Z","0.2.1":"2026-08-14T09:14:54.827Z","0.2.2":"2026-08-14T09:22:31.145Z","0.2.3":"2026-08-15T01:34:09.427Z","0.2.4":"2026-08-15T01:47:48.906Z"},"bugs":{"url":"https://github.com/LTctfer/dsh-web-search-brave/issues"},"license":"MIT","homepage":"https://github.com/LTctfer/dsh-web-search-brave#readme","keywords":["deepseek-harness","dsh","dsh-plugin","cordis","web-search","brave-search"],"repository":{"type":"git","url":"git+https://github.com/LTctfer/dsh-web-search-brave.git"},"description":"Brave Search API-backed search provider for the DeepSeek Harness web capability seam (ctx.web). One search is one HTTP request - no model turn.","maintainers":[{"name":"dsh-ltctfer","email":"likunxiaolt@gmail.com"}],"readme":"# @dsh-ltctfer/dsh-web-search-brave\r\n\r\n[DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)（DSH）的 **Brave Search API** 网络搜索提供方插件，挂载到官方 web 能力接缝（`ctx.web`）。一次搜索就是一次 HTTP 请求——不需要模型参与，比 DeepSeek 官方提供方（每次搜索消耗一次完整模型轮次）更轻、更快。\r\n\r\n调用 Brave 官方搜索端点 `https://api.search.brave.com/res/v1/web/search`，把结构化 `web.results[]` 映射为接缝规范化的 `WebSearchResult`，模型看到的仍是稳定的 `web_search` 工具。\r\n\r\n## 特性\r\n\r\n- 纯检索端点：一次搜索 = 一次 HTTP 请求，无模型轮次开销；\r\n- 结构化映射：来源严格来自 `web.results[]`，绝不从模型文本中抓取 URL；\r\n- 完整错误语义：HTTP 失败、凭据缺失、调用方取消分别映射为 `WEB_PROVIDER_ERROR` / `WEB_PROVIDER_CREDENTIAL_MISSING` / `WEB_ABORTED`；\r\n- 支持取消（`AbortSignal`）、按调用方 `maxResults` 自动收敛请求条数、按 URL 去重；\r\n- 可选 `country` / `search_lang` / `freshness` 参数；\r\n- **自定义 API key 三选一**：设置页直接填 `apiKey`（最简单）、导出环境变量（默认 `BRAVE_API_KEY`，可改名）、或写入 DSH 凭据文件 —— 把插件分享给别人时，对方只需填入自己的 Brave 订阅 token 即可；\r\n- **内置 agent 引导**：系统提示词会宣告插件与 key 的配置方法，新用户遇到凭据缺失时，agent 能直接指导其配置。\r\n\r\n## 安装\r\n\r\n### 方式一：从 npm 安装（发布后）\r\n\r\n```sh\r\ndsh plugin --profile web add @dsh-ltctfer/dsh-web-search-brave\r\n```\r\n\r\n### 方式二：本地路径安装（开发调试）\r\n\r\n```sh\r\ndsh plugin --profile web add link:$(pwd)\r\n```\r\n\r\n## 配置\r\n\r\n插件注册 `web-search-brave` 设置段，然后在 `web` 接缝中**覆盖提供方**。这一步是必须的：DSH 基础包（`dsh-base`）把 `web` 的 `searchProvider` 固定为 `deepseek-official`，未配置 `DEEPSEEK_API_KEY` 的环境里每次 `web_search` 都会直接报错。以 profile 的 `cordis.patch.yml` 为例：\r\n\r\n```yaml\r\n# web_search provider: the base bundle pins `deepseek-official` (needs\r\n# DEEPSEEK_API_KEY). Override it to the Brave-backed provider (this plugin),\r\n# whose key lives in the `web-search-brave` settings section.\r\n- id: web\r\n  config:\r\n    searchProvider: brave-official\r\n\r\n- insert:\r\n    - id: web-search-brave\r\n      name: '@dsh-ltctfer/dsh-web-search-brave'\r\n      config:\r\n        apiKeyEnv: BRAVE_API_KEY\r\n        count: 10\r\n```\r\n\r\n> profile 的 `cordis.patch.yml` 被 dsh 热监视，保存后无需重启即可生效。\r\n\r\n### 设置卡片的原理\r\n\r\nDSH 设置页「插件」标签的官方设置表单走 `settingsScope` 服务，但宿主 apiproxy 只对**硬编码白名单**里的 namespace 开放（`agent-loop` / `shell` / `web-search-deepseek` 等），第三方插件的 namespace 一律返回「设置段不可用」。因此本插件自建了一个 **loopback settings bridge**：\r\n\r\n- 宿主侧注册 `GET/POST /api/dsh-web-search-brave/settings`（回环围栏：仅 127.0.0.1 + 同源标记放行），`GET` 返回脱敏后的 namespace 视图（schema / value / revision / writable），`POST` 把 path ops 交给官方 `settings.mutate` 落盘（校验、revision 锁、持久化与官方表单完全一致）；\r\n- 客户端「brave 搜索」卡片直接读写该路由，不经过官方 `settingsScope`；保存后搜索提供方即时生效；\r\n- 设置路由独立于 `enabled` 开关注册——即使提供方被关闭，设置页卡片仍可打开并重新启用。\r\n\r\n### 密钥（三选一，任选其一即可）\r\n\r\n插件按以下顺序解析 key，先命中的生效：\r\n\r\n1. **设置页 `apiKey`（推荐，最简单）**：打开 DSH 设置页 →「插件」标签 →「brave 搜索」卡片，在 **API Key** 输入框粘贴你的 Brave 订阅 token 并保存（`role('secret')`，不显示明文、不出现在 `describe()` 输出中）；同一卡片还能调 `apiKeyEnv` / `count` / `country` / `searchLang` / `freshness` / `proxy` 等参数；\r\n2. **环境变量**：启动 dsh 前导出 `BRAVE_API_KEY`（可经 `apiKeyEnv` 改名），如 `export BRAVE_API_KEY=<你的令牌>`；\r\n3. **凭据文件**：在 `$DSH_HOME/.credentials.yaml` 中追加 `BRAVE_API_KEY: <你的令牌>`。\r\n\r\n> 把插件分享给别人时，对方只需按**方式一**在设置页填入自己的 key，无需改任何文件或配置。\r\n\r\n### 配置项\r\n\r\n| 字段 | 默认值 | 说明 |\r\n| --- | --- | --- |\r\n| `apiKey` | — | 字面量订阅令牌（secret），设置时优先于凭据引用 |\r\n| `apiKeyEnv` | `BRAVE_API_KEY` | 凭据引用名，经凭据服务或启动环境解析 |\r\n| `baseURL` | `https://api.search.brave.com/res/v1/web/search` | Brave 搜索 API 端点 |\r\n| `count` | `10` | 每次搜索请求的结果条数（1–20，受调用方 `maxResults` 约束） |\r\n| `country` | — | 两位国家/地区码（如 `cn`、`us`） |\r\n| `searchLang` | — | 搜索语言（如 `zh-hans`、`en`） |\r\n| `freshness` | — | 时效过滤（如 `pd`、`pw`、`pm`、`py` 或 ISO 日期区间） |\r\n| `proxy` | 环境变量 | HTTP 代理 URL；默认取启动环境的 `HTTPS_PROXY` / `HTTP_PROXY`。Node 的 fetch 不读代理环境变量，且当 `api.search.brave.com` 的 DNS 被污染（解析到错误 IP）时，走代理可让域名在代理侧解析、绕过污染 |\r\n| `announceToAgent` | `true` | 是否在系统提示词中宣告插件（agent 可据此指导用户配置自己的 key） |\r\n| `enabled` | `true` | 总开关；关闭后不注册搜索提供方 |\r\n\r\n## 验证\r\n\r\n```sh\r\ndsh --profile web --dump-config   # 确认 web-search-brave 条目已挂载\r\n```\r\n\r\n或在对话中直接让模型使用 `web_search` 工具。\r\n\r\n## 致谢\r\n\r\n感谢 [linux.do](https://linux.do/) 社区——DSH 插件开发与交流的宝贵阵地。\r\n\r\n## 许可\r\n\r\nMIT。本插件的结构参考了官方 [@deepseek-ai/dsh-web-search-deepseek](https://github.com/deepseek-ai/deepseek-harness)（MIT），按 web 能力接缝的提供方规范实现。\r\n\r\n## 相关链接\r\n\r\n- [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness)\r\n- [Brave Search API](https://brave.com/search/api/)\r\n","readmeFilename":"README.md"}