reactive-resume
reactive-resume
A one-of-a-kind resume builder that keeps your privacy in mind. Completely secure, customizable, portable, open-source and free forever. Try it out today!
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:TonyDua/dsh-web-search-exa
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
English | 简体中文
Adds Exa web search to DeepSeek Harness (dsh).
dsh plugin --profile web add @tonydua/dsh-web-search-exa
Restart dsh web and it works. No API key, no config edits, no provider to select.
Background, for reference only:
dsh-web-search-exa is dsh's Exa search provider. It uses Exa's REST API and is only useful once you configure an API key.You can ignore all of this by default. Read Selecting a provider only if you also run the official package, or if dsh reports an ambiguous provider.
Built with deepseek-v4-flash inside DeepSeek Harness (dsh).
mcp.exa.ai/mcp) and carry no credentials.web_search_advanced_exa, whose output is JSON in the REST field vocabulary, so sources carry real highlight snippets without text parsing.EXA_API_KEY switches to Exa's POST /search REST API for higher limits, with no behavior change.ctx.web seam; the model-facing web_search and web_fetch tools, their prompt sections, and the result cards all stay as they are.Pick one of three. The choice only decides where the code comes from; all three end up the same.
From npm. The dsh.bundle manifest ships the bundle patch, so the provider row is inserted for you and you do not edit any patch by hand.
dsh plugin --profile web add @tonydua/dsh-web-search-exa
From the GitHub Release. The same tarball, for when npm is unreachable.
dsh plugin --profile web add https://github.com/TonyDua/dsh-web-search-exa/releases/latest/download/dsh-web-search-exa.tgz
From the repository. Tracks main, including work not yet released.
dsh plugin --profile web add github:TonyDua/dsh-web-search-exa
For a local development checkout, use the same command with a path instead of a package name: dsh plugin --profile web add ../plugins/dsh-web-search-exa.
Restart dsh web afterwards. That is the whole procedure in most cases.
Skip this section unless you install the official package too.
Before each search, the dsh seam picks an available provider. If exactly one is available it is selected automatically. If more than one is available the seam raises WEB_PROVIDER_AMBIGUOUS and asks you to name one. So there are only two cases where you have to act:
exa, so dsh web fails at startup with WEB_DUPLICATE_PROVIDER. You must give this package a different id first, see Coexistence with the official package.WEB_PROVIDER_AMBIGUOUS. Another provider is available. Name the one you want.Two ways to name it:
# $DSH_HOME/profiles/web/cordis.patch.yml
- id: web
name: '@deepseek-ai/dsh-web'
config:
searchProvider: exa
Or set $DSH_WEB_SEARCH_PROVIDER=exa at runtime.
Restart dsh web after the change. The model-facing web_search tool then uses the selected provider; no tool configuration changes.
Release artifacts. CI packs this version's tarball, verifies it against every supported dsh version, attaches it to the GitHub Release, and publishes that same artifact to npm. So the release asset and the npm tarball are one file, not two builds that happen to match.
Profile install warnings. dsh profiles default to autoInstallPeers: false, and the harness's own services are provided at runtime by the dsh host rather than resolved by pnpm. If dsh plugin add reports peer warnings, add this to the profile's pnpm-workspace.yaml:
peerDependencyRules:
ignoreMissing:
- '@deepseek-ai/cordis'
- '@deepseek-ai/dsh-*'
| Key | Default | Meaning |
|---|---|---|
apiKey |
unset | Literal Exa API key. Empty or missing enables the anonymous MCP path. |
apiKeyEnv |
EXA_API_KEY |
Environment variable read when no literal apiKey is set. |
baseURL |
https://api.exa.ai |
Exa API base URL. The keyed REST path appends /search, matching the official dsh provider. |
apiURL |
unset | Deprecated full REST endpoint alias. Takes precedence over baseURL when set. |
mcpURL |
https://mcp.exa.ai/mcp?tools=web_search_exa,web_search_advanced_exa |
Exa hosted MCP endpoint, used by the anonymous path. The tools query is part of the default because the structured tool is not servable without it. Leave it out of your own URL and the plugin adds it for you. |
mcpTool |
web_search_advanced_exa |
Which MCP tool the anonymous path calls: the structured one, or web_search_exa for the older Title:-section text blob. See How it works. |
searchType |
auto |
REST retrieval mode: auto, keyword, or neural. Read on the REST path only. |
numResults |
unset | Default result count when a request carries no maxResults. |
highlightsPerResult |
1 |
Highlight sentences requested per result on the REST path. |
providerId |
exa |
Provider id registered into ctx.web. Change it only when this package and the official one are installed together, see Coexistence with the official package. |
Where to put the config: edit this plugin's config in $DSH_HOME/profiles/web/cordis.patch.yml, then restart dsh web. The environment variables EXA_API_KEY and $DSH_WEB_SEARCH_PROVIDER work too. apiKey is marked role('secret'), so no describe() response exposes its value.
In this version the config lives in the profile patch layer, not the Web UI, and there is no editable form. The Settings UI only renders cards that client plugins register by hand for fixed namespaces (shell, agent-loop, web-search-deepseek); it has no generic form for an arbitrary plugin namespace. The current state:
web-search-exa entry appears automatically once the plugin is enabled. The inventory reads live entries from the Cordis loader, so no extra code is involved.web-search-exa section through the ctx.settings.installSection API, and the data layer accepts writes. But no client card binds to it, so the UI does not show it. The built-in Web search card edits the official web-search-deepseek namespace, which is unrelated to this plugin.web_search calls render the usual web result cards through dsh-tool-web (sources, excerpts, dates), regardless of provider. Anonymous Exa results look identical to DeepSeek search results.Roadmap: the next version adds a client card registered into the settings.plugin.item slot and bound to the web-search-exa namespace, so every field in the table above becomes editable in Settings → Plugins.
| Condition | Path | Endpoint |
|---|---|---|
apiKey / EXA_API_KEY configured |
REST POST /search with Authorization: Bearer |
https://api.exa.ai/search (configurable via baseURL) |
| No key configured | Anonymous MCP tools/call web_search_advanced_exa (JSON-RPC 2.0, no credentials) |
https://mcp.exa.ai/mcp?tools=… (configurable) |
The anonymous MCP path sends no credentials; attribution rides the x-exa-source: dsh-anything header. Results are normalized to the seam's WebSearchSource shape (url, title, snippet, publishedAt), and the seam enforces maxResults on the way back.
The anonymous path calls web_search_advanced_exa by default. Its text content is a sanitized JSON search response whose entries use the same field names as the REST API, so a result maps to a source directly and no Title:-section text parsing is involved. Two consequences worth knowing:
?tools=…. The bare endpoint answers MCP error -32602: Tool web_search_advanced_exa not found, which is why that query is part of the default mcpURL and why the plugin splices it into any mcpURL that lacks it.enableHighlights the endpoint returns text-only entries, every result would lack a snippet, and the search would come back empty. The full text is discarded: a snippet is always a real highlight sentence, never generated and never lifted from the page body.searchType is not forwarded here. The plugin's setting uses the REST vocabulary (auto, keyword, neural) while the tool accepts its own (auto, fast, instant), so forwarding it would make a configured keyword or neural fail argument validation and take the whole anonymous path down. The tool's default is what auto asks for anyway.
Pinning mcpTool: web_search_exa restores the older text-blob path, where the same results arrive as Title:-led sections. Use it if Exa changes the structured tool's shape; a body that is not the expected JSON already falls back to section parsing on its own.
Because the structured tool returns a whole page of text per hit, a response can be large. Anonymous responses are capped at 256 KiB: the declared content-length is checked before the body is read, and a body that keeps growing is aborted mid-transfer. Over-limit responses fail as transient errors rather than being truncated or silently parsed.
The anonymous channel is a public endpoint run by Exa, and it is rate-limited. When you hit the limit the search fails with the code WEB_RATE_LIMITED and a message telling you to configure EXA_API_KEY. That code is ours, so that you and the model can tell throttling apart from a broken network.
With a key configured, searches use the REST path and are not subject to this limit.
What you will see:
WEB_RATE_LIMITED, telling you to configure a key.available() returns false.searchProvider: exa and the cooldown is active: the search reports WEB_PROVIDER_CONFIGURED_UNAVAILABLE.searchProvider and the cooldown is active: the seam skips this plugin and looks for another provider. With no other provider available it reports WEB_PROVIDER_UNAVAILABLE.Why it works this way. Before each search the seam calls available() to decide which provider to use. If this plugin always answered "available", a dead endpoint would make every search fail hard, and what the user sees is a broken dsh. So the plugin adds a circuit breaker: after 3 consecutive transient failures it admits it is temporarily unavailable, giving the seam a chance to choose someone else. That breaker is this plugin's design; Exa has no such mechanism.
How failures are counted. Only failures that a retry could fix: 5xx, 429, network errors, and unparseable response bodies. Three of them start a 5-minute cooldown, and any successful search clears the count immediately.
A 4xx other than 429 does not count. That is a configuration error and would fail identically on every retry, so hiding it behind a cooldown would only delay the same error by 5 minutes.
This trade-off has a cost. While Exa is down for those 5 minutes, a profile with a pinned searchProvider: exa reports an error instead of trying something else. The plugin cannot choose for you:
searchProvider: exa: predictable behavior normally, but no fallback once the breaker opens.searchProvider unset: it can fall back when the breaker opens, at the cost that the seam raises WEB_PROVIDER_AMBIGUOUS whenever several providers are usable, and you have to name one.Choose the second if you want fallback, and install only one alternative provider.
DeepSeek Harness has an official Exa provider, @deepseek-ai/dsh-web-search-exa, which you install separately; dsh does not include it by default. This package is its zero-config variant: it adds the anonymous MCP fallback the official one lacks and keeps the same REST behavior once you configure a key.
Official @deepseek-ai/dsh-web-search-exa |
This package @tonydua/dsh-web-search-exa |
|
|---|---|---|
REST path (POST /search) |
✅ the only path | ✅ used when a key is configured |
| Requires an API key | ✅ yes, an empty key makes it unavailable | ❌ no, with no key it uses the anonymous MCP fallback |
Anonymous MCP (mcp.exa.ai/mcp) |
❌ not implemented | ✅ the default path with no key |
| Zero-config install | ❌ | ✅ |
| Provider id | exa (fixed) |
exa by default, configurable via providerId |
| Cordis plugin name | web-search-exa |
web-search-exa |
| Config keys | apiKey, baseURL, searchType, numResults, highlightsPerResult |
apiKey, apiKeyEnv, baseURL, apiURL (legacy), mcpURL, mcpTool, searchType, numResults, highlightsPerResult, providerId |
Which to use:
EXA_API_KEY and want the officially maintained package: use the official one, it is the canonical implementation.providerId, see the next section.Both packages register the same provider id (exa) under ctx.web, and both use the cordis plugin name web-search-exa. The seam rejects duplicate ids with WEB_DUPLICATE_PROVIDER, so installing both into one profile without changing the config fails at startup.
Coexistence requires explicit configuration through the providerId switch:
exa; its id is fixed.providerId: exa-anon in this plugin's config; any unique string works.web seam. Use searchProvider: exa-anon for the anonymous variant, or searchProvider: exa for the official package. $DSH_WEB_SEARCH_PROVIDER works too.- insert:
- id: web-search-exa
name: '@tonydua/dsh-web-search-exa'
config:
providerId: exa-anon
- id: web
name: '@deepseek-ai/dsh-web'
config:
searchProvider: exa-anon
The simplest alternative is to install only one of the two packages per profile, which works with the default config.
dsh web fails at startup with duplicate loader entry id: web. This is a 0.1.2 bug, fixed in 0.1.4, so upgrading the plugin resolves it. If you already run 0.1.4 or later, please open an issue with dsh --version and your cordis.patch.yml, because a user patch that inserts a web row produces the same error.
Startup fails with Cannot read properties of undefined (reading 'prepare'). @deepseek-ai/dsh-tools is a dsh runtime singleton and must resolve to one physical package instance per profile. This plugin does not depend on it. The usual cause is another third-party plugin in the profile declaring it as an ordinary nested dependency rather than a peer dependency. Fix that plugin's dependency declaration, or have the profile's package manager resolve one shared instance, and only then investigate search errors.
A search reports WEB_PROVIDER_AMBIGUOUS. More than one provider is available. Name one explicitly as described in Selecting a provider.
A search reports WEB_PROVIDER_CONFIGURED_UNAVAILABLE. The provider you pinned is currently unavailable. This happens when the keyless channel's breaker is open, see What happens when a search fails.
There is no settings entry in the Web UI. This version has no UI card; configure through cordis.patch.yml or environment variables, see In the Web panel.
Every published dsh version from 0.1.2-alpha.2 to 0.2.1-alpha.1 has been tested. Testing means three things: installing that version in isolation, typechecking against its own declarations, and installing this plugin with npm under strict peer resolution. The last step is the one that fails most easily, because npm's peer rules are stricter than pnpm's. To reproduce: bash scripts/compat-matrix.sh.
| dsh line | Tested | Notes |
|---|---|---|
0.1.2-alpha.2 … 0.1.2-alpha.5 |
✅ | the oldest supported baseline |
0.1.2-rc.1 |
✅ | |
0.1.3-alpha.2 |
✅ | |
0.1.5-alpha.1, 0.1.5-alpha.2 |
✅ | |
0.1.5-rc.1, 0.1.5-rc.2, 0.1.5-rc.3 |
✅ | 0.1.5-rc.2 is also verified end to end: a real dsh --profile headless task searched through the anonymous MCP path with no API key |
0.1.6-alpha.1, 0.1.6-alpha.2 |
✅ | |
0.1.7-alpha.1 |
✅ | the settings service changed shape, see below |
0.2.0-rc.1, 0.2.0-rc.2 |
✅ | strict npm install beside the host, then a live keyless search |
0.2.1-alpha.1 |
✅ | same, and the only version that needs @deepseek-ai/cordis@4.0.5-alpha.1 |
Versions from the 0.2.0-rc.1 line onward are additionally declared, one full version at a time, under dsh.compatibility.dshReleases in package.json. That key is catalog metadata: the dsh runtime never reads it, and it does not affect resolution — registries such as DSH STORE require an exact per-version record, and a peer range is not installable evidence. The declarations cover 0.2.0-rc.1, 0.2.0-rc.2, and 0.2.1-alpha.1, all compatible.
Probing the real export surface of every version, the ctx.web seam turns out to be completely stable: WebError is always exported from dsh-web and extends HarnessError, launchEnvironmentOf is always present, and ctx.settings is mounted in every version. Only two things differ.
First, 0.1.7-alpha.1 replaced the settings API. SettingsProvider.installSection is gone, and the service became SettingsForms, which derives a config page from the Config schema the Loader already holds (SettingsDescriptor.schema, autoGenerate). Code that called that method unconditionally throws a TypeError there: the plugin loads but fails. It now probes for the method, calls it only when present, and does nothing otherwise. On 0.1.7+ the Loader's schema drives the form and the plugin has nothing to register.
Second, the @deepseek-ai/cordis line moves with dsh, and it moves through pre-releases: 0.1.5/0.1.6 peer it at ^4.0.2 (exactly 4.0.2 for 0.1.5-rc.3), 0.1.7 at ^4.0.3, 0.2.0 at ~4.0.4, and 0.2.1-alpha.1 at ~4.0.5-alpha.1. Install the version the host asks for, and be careful how you pin it: ^4.0.2 resolves to 4.0.4, which the 0.1.5 releases were not published against, and this plugin then fails to install strictly beside them. The matrix script reads that range and pins its floor as a concrete version. This plugin's own peer range also needed a >=4.0.5-alpha.1 comparator, without which 0.2.1-alpha.1 would not install at all.
Also supported across that whole range: @deepseek-ai/dsh-web, dsh-settings (optional), and dsh-launch-environment. Node.js needs >=22.19.0, matching the harness's own floor.
"@deepseek-ai/dsh-web": ">=0.1.2-alpha.2 || >=0.1.3-alpha.2 || >=0.1.4-0 || >=0.1.5-alpha.1 || >=0.1.6-alpha.1 || >=0.1.7-alpha.1 || >=0.1.8 || >=0.2.0-rc.1 || >=0.2.1-alpha.1"
That enumeration is the only form that installs across every published version under both pnpm and npm. The reason is one semver rule:
A prerelease version satisfies a range only if some comparator in that range carries a prerelease on the same
major.minor.patchtriple.
So >=0.1.2-rc.1 does not match 0.1.5-rc.2; the triples differ. A single open-ended lower bound cannot cover a project published as a series of prereleases, and * would also admit a future breaking 1.0.
Two things about the shape are easy to get wrong, and both were:
|| here does not widen the range, it picks a lower bound. Every comparator is an open-ended >=, so the whole expression is the union of "at or above X" for each X — which is simply "at or above the highest X". A comparator added for a lower release is dead weight: appending || >=0.2.0-rc.1 to a range ending in >=0.1.8 drops 0.1.8 and everything above it up to 0.2.0-rc.1, because the tuple rule above then has no 0.1.8 comparator to match against. This was caught by testing the range against the real published list rather than by reading it.0.2.0-rc.2 matches >=0.2.0-rc.1, but not >=0.2.1-alpha.1. 0.2.1-alpha.1 needs the second entry. The same rule applies to @deepseek-ai/cordis, whose own line moved through 4.0.5-alpha.1: >=4.0.2 excludes it, so the shipped range is >=4.0.2 || >=4.0.5-alpha.1. That one is not cosmetic — without it npm install of this plugin beside a 0.2.1-alpha.1 host fails with ERESOLVE.Measured against the real published artifacts:
| Range | Installs with npm |
|---|---|
>=0.1.2-rc.1 (the earliest form) |
1 of the 14 releases it was meant to cover |
The 0.1.8-terminated enumeration |
14 / 14 |
| The current enumeration | 20 / 20 of every published release from 0.1.2-alpha.2 to 0.2.1-alpha.1 |
This was measured, not reasoned. The open-ended range is fine on pnpm, which is what dsh plugin add uses. On npm it made 13 of the first 14 versions fail with ERESOLVE. If you hit that error installing an older release of this plugin with npm, upgrade, or pass --legacy-peer-deps temporarily.
A range that resolves is not the same as a version that was tested: the table above is 17 rows, while the enumeration resolves on 20 published releases. 0.1.7-alpha.2, 0.1.7-rc.1, and 0.1.7-rc.2 are the difference — they install, and are expected to work, but only 0.1.7-alpha.1 was actually run.
pnpm install
pnpm run build # tsdown -> lib/index.js + lib/index.d.ts
pnpm run typecheck # tsc --noEmit
pnpm test # builds, then runs the node:test suite against lib/
src/ is the only source directory. lib/ is still committed, because both the npm package and git-based installs consume it.
The anonymous MCP integration follows the web_search implementation in can1357/oh-my-pi (packages/coding-agent/src/web/search/providers/exa.ts and src/exa/mcp-client.ts) and the @oh-my-pi/exa plugin: the same "REST when a key exists, credential-free mcp.exa.ai/mcp otherwise" strategy, the same x-exa-source attribution header, and the same Title:-section response parsing. Thanks to the oh-my-pi (omp) project for building the zero-config Exa integration first.
Thanks also to Exa for providing and operating the free, unauthenticated hosted MCP server (mcp.exa.ai/mcp) that makes this package's zero-config default possible. Exa's hosted MCP is an official Exa product, and anonymous usage is rate-limited, see Rate limits.
Thanks to @kahlos (PR #1), who found that web_search_advanced_exa returns a sanitized structured response and that the endpoint does not serve it without a ?tools= query. Neither is documented; both were established by measurement. The anonymous path now uses that tool by default, and the older Title:-section path remains as the fallback.
See CHANGELOG.md for all notable changes.
MIT, see LICENSE.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: mcp、web-search。