dsh-web-search-searxng
Agent 与会话 活跃维护

dsh-web-search-searxng

jaco-tech/dsh-web-search-searxng

适配ctx.web模块的搜索提供方插件,依托SearXNG实现网页搜索,无需配置认证信息或API密钥,开箱即可获取公开搜索结果。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
TypeScript
主要语言
MIT
开源协议
18 KB
仓库大小
3 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:jaco-tech/dsh-web-search-searxng
git clone https://github.com/jaco-tech/dsh-web-search-searxng.git
git clone git@github.com:jaco-tech/dsh-web-search-searxng.git
README.md main

dsh-web-search-searxng

dsh-plugin
CI/CD

SearXNG-backed search provider plugin for DeepSeek Harness.

Registers a WebSearchProvider into ctx.web so that the existing web_search model tool routes through your SearXNG instance. No auth, no API key, no model calls — just a plain HTTP GET against SearXNG's JSON endpoint.

Install

npm install @jaco-tech/dsh-web-search-searxng

Configure

1. Install the package

npm install @jaco-tech/dsh-web-search-searxng

2. Add it to your DSH profile

Edit ~/.dsh/profiles/web/cordis.patch.yml (create it if it doesn't exist) and add:

- insert:
    - id: web-search-searxng
      name: '@jaco-tech/dsh-web-search-searxng'
      config:
        # Required: point at your SearXNG instance
        baseURL: 'http://your-searxng-instance:8888'
        # Optional filters:
        language: 'en'
        categories: 'general'
        timeRange: ''

If you have multiple search providers registered, pin ctx.web to use this one:

- replace:
    - id: web
      config:
        searchProvider: searxng

3. Restart DSH

Stop your running dsh process and start it again:

npx @deepseek-ai/dsh web

The plugin will be loaded automatically. The web_search tool in your agent will now use your SearXNG instance.

4. (Optional) Configure via the Web UI

Once DSH is running, go to Settings → Plugins in the Web UI. You'll see a "web-search-searxng" card where you can edit the baseURL and filter settings without editing YAML files.

How it works

This is a Cordis plugin that implements the WebSearchProvider interface from @deepseek-ai/dsh-web:

export const name = "web-search-searxng"
export const inject = ["web"]

export function apply(ctx, config) {
  ctx.web.registerSearchProvider({
    id: "searxng",
    available() { /* URL.canParse(config.baseURL) */ },
    async search(request, signal) {
      // GET /search?q=<query>&format=json
      // maps response to WebSearchResult
    }
  })
}

The existing @deepseek-ai/dsh-tool-web consumer calls ctx.web.search() — your SearXNG instance serves the results automatically.

Provider interface

Method Behavior
available() Returns true when baseURL is a valid URL
search(request, signal?) GET /search with q, format=json, optional language/categories/time_range params. Dedupes results by URL. Surfaces answers and infoboxes as provider-generated answer text.

Upstream

This plugin communicates with SearXNG via its JSON API (/search?format=json). SearXNG is a free internet metasearch engine which aggregates results from more than 70 search services. You need a running SearXNG instance to use this plugin.

Release process

# Tag and push — the CI workflow builds and publishes to npm automatically
git tag v0.1.0
git push origin v0.1.0

Requires the NPM_TOKEN secret to be set in the repository.

Development

npm install
npm run build

License

MIT