DSH Plugins Marketplace

DSH Plugins

Plugins

/

dsh-search-mgr

q

dsh-search-mgr

Manifest valid

配置dsh的搜索提供商。目前已支持Exa、DeepSeek(其他供应商后续更新)

UI (client)hasBundlePatch

dsh-search-mgr

A DeepSeek Harness bundle that adds a web-search provider manager to the Plugins page. The card offers a dropdown between DeepSeek native search and Exa; the choice is written to web.searchProvider immediately, so the next web_search uses the new provider without a restart or a Save click.

The package name is @local/dsh-exa-web-search because this checkout is linked into a local DSH profile. Rename the package and the row in cordis.patch.yml before publishing it to a registry.

Behavior

  • The built-in Web search settings page stays in place. This plugin adds a second card, Search provider, with a dropdown that selects either DeepSeek (native search) or Exa.
  • The dropdown writes web.searchProvider through the shared settings form, so a switch applies to the next search immediately; no restart and no separate Save click are needed.
  • With DeepSeek selected, the built-in Web search page remains visible and keeps owning the DeepSeek key, endpoint, and result settings. With Exa selected, that page is hidden from the card list and this card shows the Exa key and result settings instead.
  • With an Exa API key configured, searches call POST https://api.exa.ai/search with highlight contents and map results[] into citeable sources.
  • With no key, searches use Exa's hosted free MCP endpoint (https://mcp.exa.ai/mcp) and its web_search_exa tool, parsing the returned titles, URLs, publication dates, and highlights into the same source shape.
  • The key is stored in the harness credential store under EXA_API_KEY; the settings file never carries the secret.
  • maxResults defaults to 5 and is also bounded by dsh-tool-web's searchMaxResults (default 8).
  • The plugin never selects Exa on activation. It only restores the remembered native provider if it is disposed while Exa is still selected, so disabling the plugin cannot leave web.searchProvider pointing at a missing provider. The dropdown records the native provider in the plugin's previousProvider setting before it selects Exa; that live setting is what the restore uses.

Settings

Open Plugins → Built-in plugin configuration → Search provider:

  • Search provider — DeepSeek or Exa, applied immediately.
  • When Exa is active: key status, a password field that writes EXA_API_KEY, Clear key, the maximum result count (1–50, default 5), and reset.
  • When DeepSeek is active: a note pointing at the built-in Web search page, which stays available above.

The card is visible only while the Host serves this plugin's web-search-exa settings namespace, so it disappears with the plugin.

Install

This package is a bundle because package.json declares dsh.bundle.patch. Install the package directory through the harness plugin manager; the patch inserts the web-search-exa row. It deliberately does not disable ui-settings-web-search, so the DeepSeek page and its selection stay intact.

Verification

test/provider.test.mjs covers both transports:

  • parseMcpSearchText is checked against a representative ExaMCP text result;
  • an already-aborted search reports WEB_ABORTED;
  • live tests are opt-in with EXA_LIVE_TESTS=1: the keyed Exa API, the configured result cap, free ExaMCP, and a rejected key that must not echo the secret. Keyed cases read EXA_API_KEY from the environment.

test/selection.test.mjs checks the dispose-time provider fallback.

node test/provider.test.mjs
node test/selection.test.mjs

# Live network checks (the key is read from the environment, never printed):
EXA_LIVE_TESTS=1 EXA_API_KEY=... node test/provider.test.mjs

The tests import the harness packages through the profile or a workspace node_modules link to the harness installation.

Manual checks on the web profile:

  • selecting Exa writes web.searchProvider: exa immediately, without a reload or a Save click, and selecting DeepSeek writes the native provider id back;
  • web_search returns Exa's sources while Exa is selected and DeepSeek's sources after switching back;
  • the built-in Web search card disappears only while Exa is selected and returns immediately when DeepSeek is selected;
  • disabling the plugin while Exa is selected restores the native provider and removes the card.

Repository

https://github.com/qwunros/dsh-search-mgr

Comments

Loading…