dsh-plugin-ai-super-search: A Free Toolset for Taking Over DSH's Native Search

Introduction

The built-in web_search tool in DeepSeek Harness (DSH) calls the official paid API by default, consuming Tokens and incurring costs. dsh-plugin-ai-super-search takes over this tool and provides free fallback paths including TinyFish, AnySearch, Bing scraping, Jina, and DuckDuckGo, achieving search with zero additional Token consumption.

Installation and Enablement

This plugin is provided as a bundle. After installation, it automatically overlays configuration patches into the profile.

  1. Install the plugin:
    dsh plugin --profile <profile> add dsh-plugin-ai-super-search
  1. Verify the installation:
    Run the following command to check whether the plugin is loaded correctly:
    dsh --profile <profile> --dump-config
After startup, the plugin list should show `ai-super-search` (module name `dsh-plugin-ai-super-search`), with status active. The tool list should show four independent tools: `ai_super_search_web_search`, `ai_super_search_fetch_url`, `ai_super_search_local_files`, and `ai_super_search_code`.
  1. Check dependencies:
    Ensure the node_modules/dsh-plugin-ai-super-search folder exists. If this link is missing, the loader silently skips the entire patch layer, causing search to fall back to the official paid channel without any error.

  2. Desktop installation:
    The desktop profile for the desktop (Electron) app is exclusively managed by the app, and the CLI rejects operations on it. Please install or uninstall via Settings → Plugin Manager in the desktop app. The dsh plugin command only applies to web, acp, headless, or other CLI-managed profiles.

Core Features

The plugin mainly includes two capabilities:

  1. Take over native web_search:
    Uses cordis.patch.yml to switch web.searchProvider to backends provided by the plugin, such as tinyfish, so the built-in DSH web_search tool uses the free path directly.

  2. Provide an independent tool group:

    • ai_super_search_web_search: Search the web for free, with a multi-engine fallback chain.
    • ai_super_search_fetch_url: Reads web page content with Jina Reader, falling back to direct HTML fetch on failure.
    • ai_super_search_local_files: Searches text files within a specified root directory.
    • ai_super_search_code: Searches code within a specified root directory and returns language, line numbers, and context.

Free Search Chain

The actual order of the search chain is determined by webSearch() in src/search.js. Available backends include TinyFish, AnySearch, Bing (scraping), Jina, and DuckDuckGo Lite. Even if no Key is configured, the plugin automatically falls back and does not interrupt the search function.

Order Backend Entry Condition
0 DSH_SEARCH_ENGINE Takes priority when explicitly set; falls back in order after failure
1 TinyFish Requires TINYFISH_API_KEY to be configured
2 AnySearch Can join without a Key; uses anonymous IP-based quota
3 Bing Can join without a Key; directly scrapes the result page HTML
4 Jina Setting DSH_JINA_API_KEY can increase quota
5 DuckDuckGo Lite No-JS lightweight fallback

You can specify the preferred engine via the DSH_SEARCH_ENGINE environment variable.

Frontend Presentation

The plugin implements presentation hooks fully consistent with the official web_search, ensuring the search cards displayed in the frontend match the official ones:

  • output.render: Generates model-side text (Markdown source code list).
  • output.presentationMeta: Provides replayable metadata { sources, truncated }.
  • presentCall: Displays the running card.
  • presentResult: Displays the enriched complete card.

Troubleshooting

If the search feature does not work after installation, check the following two points:

  1. Bundle resolution failure:
    If the bundle name declared in package.json cannot be found as a corresponding link in node_modules (for example, the package name changed without reinstallation, or an old link-projection mechanism failed), the loader silently skips the entire patch layer. The plugin list may then show the plugin as inactive or missing. Rerun pnpm install to ensure node_modules exists.

  2. Configuration file error:
    The cordis.yml in the profile directory is an “empty root patch file” and is overwritten on every startup. The valid configuration source order is: patches bundled with each bundle → the profile’s cordis.patch.yml → $DSH_HOME/cordis.patch.yml → --patch overlay. Modifying cordis.yml has no effect.

Use Cases and Notes

  • Use case: Developers or agent developers who frequently use search and want to reduce Token costs.
  • Runtime privileges: The plugin runs with the permissions of the current DSH process. Review the source code and license before installation.
  • Build scripts: When installing from GitHub, if using pnpm >= 10, build scripts for git dependencies are rejected by default. Add an allowBuilds configuration to pnpm-workspace.yaml or specify a version when installing (e.g., #<sha>).

References

  • GitHub repository: https://github.com/huguangyu666/dsh-plugin-ai-super-search
  • Community directory: https://www.skillhub.cn/plugins/huguangyu666/dsh-plugin-ai-super-search
羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye