- Home
- Plugins
- Tools & Capabilities
- dsh-web-custom
dsh-web-custom
runfali/dsh-web-custom
Pluggable web search + fetch for DSH: take over the native web_search / web_fetch seams with AnySearch or any JSON endpoint, and add standalone CDP / Tavily extract tools — one bundle, one settings card.
Install
dsh plugin --profile web add github:runfali/dsh-web-customREADME
dsh-web-custom
One DSH bundle for the web seam: a search provider that replaces the native web_search, an extract provider that replaces web_fetch with automatic plain-HTTP fallback, and two standalone fetch tools (web_fetch_cdp, web_fetch_tavily) — all behind one live-reload settings card.
One bundle owns both provider keys, so the search and fetch sides can never drift apart: one config namespace, one settings card, one atomic switch.
Why one bundle
The host picks providers from the web row of the profile patch:
- id: web
config:
searchProvider: custom
fetchProvider: anysearch
A bundle that owns only one of the two keys leaves the other half to the profile user layer, where the next edit easily overwrites it. This bundle writes both keys at once. A duplicate provider id on the same seam throws WEB_DUPLICATE_PROVIDER at load, so two bundles cannot serve the same provider — switching is atomic by construction.
Capabilities
| Surface | Who serves it | Provider id | Notes |
|---|---|---|---|
web_search (native) | AnySearch /v1/search or any JSON endpoint | custom | Anonymous free tier without a key; Bearer with one |
web_fetch (native) | AnySearch /v1/extract, falls back to plain HTTP | anysearch | PDF / raw files / zhihu return 422 from extract and are fetched directly |
web_fetch_cdp | CDP browser (cloakbrowser) | — | Rendered pages, JS-heavy sites |
web_fetch_tavily | Tavily Extract API | — | Fast, no browser, needs a Tavily key |
Requirements
- DeepSeek Harness
>=0.1.2-alpha.3 <0.1.8 || >=0.1.5-alpha.1 <0.1.6 || >=0.1.7-alpha.0 <0.1.8 || >=0.2.0-alpha.0 <0.3.0 || >=0.2.1-alpha.0 <0.3.0 || >=0.2.2-alpha.0 <0.3.0 - Node.js
>=22 - No runtime dependencies (peer-only; the client card uses the official
@deepseek-ai/dsh-client-ui-primitives).
Install
Stop the host first (it reads bundles and patches at boot). Then, from the host:
dsh plugin --profile desktop add /path/to/dsh-web-custom
# or, after publishing: add dsh-web-custom
The included cordis.patch.yml already declares both provider keys. Restart the host, then open the plugin's settings card.
Upgrading from the earlier split bundles
Skip this section unless you previously installed dsh-web-fetch and dsh-web-search-custom. Remove both before restarting — they register the same provider ids, and a duplicate id fails the load with WEB_DUPLICATE_PROVIDER:
dsh plugin --profile desktop remove dsh-web-fetchdsh plugin --profile desktop remove dsh-web-search-custom- Delete the
- id: web-fetch/- id: web-search-customrows from the profile patch. - Make sure the
- id: webrow carries bothsearchProvider: customandfetchProvider: anysearch.
See Migrating an existing config for the 29 config keys.
Configuration
One namespace — web-custom — with 29 fields, all .volatile() (saved from the settings card applies live, no restart). The card groups them into Search / AnySearch / CDP / Tavily.
| Group | Fields | Defaults |
|---|---|---|
| Search | searchApi, searchUrl, searchApiKey, searchMaxResults, searchMethod, searchBody, searchHeaders, searchAuthHeader, searchAuthScheme, searchTimeoutMs, searchResultsPath, searchUrlField, searchTitleField, searchSnippetField, searchPublishedField | auto / https://api.anysearch.com/v1/search / '' / 10 / GET / {"query":"{query}"} / {} / Authorization / Bearer / 30000 / results / url / title / content / publishedDate |
| AnySearch extract | anysearchEnabled, anysearchEndpoint, anysearchApiKey, anysearchTimeoutMs, anysearchFallbackToHttp, anysearchMaxChars | true / https://api.anysearch.com/v1/extract / '' / 30000 / true / 100000 |
| CDP | cdpEnabled, cdpEndpoint, cdpTimeoutMs, cdpWaitMs | true / http://127.0.0.1:9222 / 60000 / 2000 |
| Tavily | tavilyEnabled, tavilyEndpoint, tavilyApiKey, tavilyTimeoutMs | false / https://api.tavily.com/extract / '' / 30000 |
searchApiKey and anysearchApiKey are intentionally separate: the generic search mode may point at a third-party JSON endpoint (SearXNG etc.). Filling both with the same as_sk_… key is fine.
Environment overrides for the search side: WEB_SEARCH_CUSTOM_API, WEB_SEARCH_CUSTOM_URL, WEB_SEARCH_CUSTOM_API_KEY, WEB_SEARCH_CUSTOM_MAX_RESULTS, WEB_SEARCH_CUSTOM_HEADERS, WEB_SEARCH_CUSTOM_TIMEOUT_MS.
Migrating an existing config
tools/migrate-config.mjs reads the rows left by the earlier split bundles and emits the 29-key web-custom config. It never prints secret values:
# dry-run: per-key report (masked secrets, value presence only)
node tools/migrate-config.mjs --patch ~/.dsh/profiles/desktop/cordis.patch.yml
# preflight: exit 1 when a pre-merge row or key is missing
node tools/migrate-config.mjs --patch <patch> --check
# candidate patch with real values (contains secrets — delete after use)
node tools/migrate-config.mjs --patch <patch> --out web-custom-candidate.yml
Mapping rule: the 15 search keys gain a search prefix (api → searchApi, timeoutMs → searchTimeoutMs, …); the 14 fetch keys keep their names. Switch while the host is stopped: remove both old packages and rows, paste the new row, add this bundle, start the host. Keep the backup patch until the acceptance checks pass.
Tests
pnpm install
npm test
Suites: entry (declaration surface, 29 volatile fields, key-set equality), host-integration (real Cordis + WebRuntime + ToolRuntime + SettingsForms + compatibility gate), search-provider, the two strategy units + CDP frame codec + AnySearch extract unit, and the client smoke test (dual view, read-only, staging, save landing).
Known traps
- Atomic switch: two bundles serving the same seam fail the load with
WEB_DUPLICATE_PROVIDER. - Configured-but-unavailable: if the
webrow names our provider but it reports unavailable (e.g. emptysearchUrl), the host throwsWEB_PROVIDER_CONFIGURED_UNAVAILABLEinstead of falling back. - Fallback off + empty key: with
anysearchFallbackToHttpdisabled and noanysearchApiKey, the extract provider reports unavailable and the host fails everyweb_fetchwith the same no-fallback error. Keep the fallback on, or fill the key. - Official "Web search" settings page rewrites the whole
- id: webconfig. Re-check both keys after touching that page. - Two fetch concepts:
web_fetchis the native tool served by theanysearchprovider;web_fetch_cdp/web_fetch_tavilyare separate tools registered by this plugin. Their errors nameweb-custom.
License
MIT
Related plugins
archify (deepseek-harness)
tt-a1i/archify
WeKnora (dsh-weknora)
tencent/weknora
next-ai-draw-io (dsh-plugin)
dayuanjiang/next-ai-draw-io
weknora
tencent/weknora