@anht3889/dsh-web-search-bundle
v0.2.0
Published
DeepSeek Harness multi-engine web-search provider and Settings section
Maintainers
Readme
@anht3889/dsh-web-search-bundle
Installable DeepSeek Harness Web-profile bundle that registers the dsh-web-search provider and its Settings section for Tavily, Brave Search, and SearXNG.
Prerequisites
- The
dshCLI and a Web profile. - For a source checkout: Node.js
^22.19or>=24, pnpm, and a sibling../deepseek-harnesscheckout. Client typecheck andtsdownextend that tree; published installs use the prebuilt package and do not need it. - A Tavily or Brave API key for that engine, or a private SearXNG instance you operate or trust.
Install
Add the published package to a profile. @anht3889/dsh-web-search-service is a nested dependency of this bundle, not a second plugin.
dsh plugin --profile web add @anht3889/dsh-web-search-bundleFrom the repository root of a local source checkout, build and add the workspace path instead of the npm name:
pnpm install && pnpm run build
dsh plugin --profile web add ./packages/bundleRestart the Web profile after either install:
dsh --profile webOpen Settings → 网络搜索 (Web search in the English locale), select an engine, enter its required key or URL, and save. Engine changes apply to the next search without another restart.
Engines
| Engine | Default base URL | Required configuration |
|---|---|---|
| Tavily | https://api.tavily.com | TAVILY_API_KEY |
| Brave Search | https://api.search.brave.com | BRAVE_API_KEY |
| SearXNG | None | Private instance base URL |
The initial engine is unselected, so the pinned provider is unavailable until an engine is configured. SearXNG has no public default: use a private instance you operate or trust, and enable JSON responses in its settings. Searches request format=json; a 403 response usually means the instance does not allow format: json.
Configuration and secrets
| Data | Default location |
|---|---|
| Engine selection and base URLs; no secret values | $DSH_HOME/web-search/config.json |
| Fallback key storage | $DSH_HOME/web-search/secrets.yaml |
| Key references | TAVILY_API_KEY, BRAVE_API_KEY |
Secret resolution uses the first non-empty value from the mounted ctx.credentials service, the private fallback file, then the process environment. Settings writes keys through ctx.credentials when it is mounted; otherwise it writes the fallback file. The HTTP API and Settings status expose only whether each key is configured, never its value.
If no Host webserver is mounted, the provider still supports headless searches, but the Settings UI and management HTTP routes are unavailable. Configure the same catalog and secret locations before starting that composition.
Runtime and HTTP
The bundle pins web.searchProvider to dsh-web-search. DeepSeek's deepseek-official provider remains installed but is unused while that pin is active; an unavailable wrapper does not silently fall back to it.
The manager publishes ctx.webSearchManager from @anht3889/dsh-web-search-service. Hosts without a loopback HTTP API use that service to manage the same runtime directly.
GETandPUT /web-search/configread or replace the non-secret catalog.GET /web-search/secretsreports configured flags only.PUT /web-search/secretsaccepts write-only key updates; omitted or empty values leave existing keys unchanged.
Restore DeepSeek search
Put this exact layer in the Web profile patch at $DSH_HOME/profiles/web/cordis.patch.yml:
- id: web
config:
searchProvider: deepseek-officialRestart the Web profile. A patch row replaces the complete web config, so add any other required web config keys to the same mapping.
Exports
| Export | Purpose |
|---|---|
| @anht3889/dsh-web-search-bundle | Host loader entry for the browser Settings plugin |
| @anht3889/dsh-web-search-bundle/manager | Provider manager and runtime API |
| @anht3889/dsh-web-search-bundle/client | Browser Settings plugin bundle |
| @anht3889/dsh-web-search-bundle/invariant | Package-owned invariant plugin |
| @anht3889/dsh-web-search-bundle/cordis.patch.yml | Installable profile patch |
| @anht3889/dsh-web-search-bundle/package.json | Package manifest |
Troubleshooting
WEB_PROVIDER_CONFIGURED_UNAVAILABLE: Select an engine. For SearXNG, also provide a valid absolute private-instance URL. There is no automatic DeepSeek fallback.- Missing Tavily or Brave key: Set the matching key in Settings,
ctx.credentials, the fallback secrets file, or the process environment. The provider can appear available before key resolution, but the search call fails withWEB_PROVIDER_ERRORwhen the key is absent. - SearXNG HTTP 403: Enable JSON output (
format: json) in the instance settings and confirm you are using your private instance. - Corrupt
config.json: Host startup fails if$DSH_HOME/web-search/config.jsonexists but is not valid JSON or fails catalog validation (unknown keys, invalid engine, or SearXNG selected without an absolute URL). Delete the file to restore the empty catalog, or fix the JSON. Do not put secrets in this file.
