跳到正文

cyijun/dsh-surfing-plugin

110最近提交 2026年8月14日

dsh-surfing-plugin DSH 插件

dsh-surfing-plugin 通过 ctx.web 服务将 SearXNG 和 Crawl4AI 集成到 DeepSeek Harness 中。它提供 web_search 和 web_fetch 功能,并保持原生 DSH 工具语义(超时、取消、结果限制)。该插件需要可访问的 SearXNG 和 Crawl4AI 服务,并支持通过环境变量或 YAML 进行广泛配置。

如何安装 dsh-surfing-plugin DSH 插件

dsh plugin --profile web add dsh-surfing-plugin

复制不会执行命令。安装 dsh-surfing-plugin DSH 插件前请核对仓库和版本。

dsh-surfing-plugin DSH 插件数据来源

dsh-surfing-plugin DSH 插件快照日期:2026年8月16日

discovered

dsh-surfing-plugin DSH 插件能做什么

  • 通过 SearXNG 进行网络搜索,可配置语言、分类、安全搜索和时间范围
  • 通过 Crawl4AI 进行网页抓取,可设置 Markdown 模式(raw、fit、citations)和内容大小限制
  • 支持两个服务的认证头与 API 密钥(环境变量或直接写入)
  • 按 URL 去重搜索结果,并将字段映射到 DSH 源格式
  • 将 Crawl4AI API 失败处理为结构化的 WebError 值

dsh-surfing-plugin DSH 插件适合哪些场景

  • 在 DSH 代理中启用网络搜索,无需依赖外部搜索 API
  • 抓取网页内容用于知识增强
  • 使用 SearXNG 和 Crawl4AI 自托管完整的网络访问管道
  • 与 DSH Web UI 集成,为每个代理预设提供搜索能力
  • 在无头 DSH 组件中与主机级别的 web_search 配合使用

dsh-surfing-plugin DSH 插件适合谁

  • 需要自托管网络搜索和抓取功能的 DSH 用户
  • 运行 SearXNG 和 Crawl4AI 服务并需要 DSH 提供者的开发者

dsh-surfing-plugin DSH 插件的限制

  • 需要可访问的外部 SearXNG 和 Crawl4AI 服务
  • Crawl4AI 必须在搜索格式中启用 JSON
  • Node.js 版本必须为 ^22.19.0 或 >=24.0.0
  • 仅支持 HTTP(S) 目标进行网页抓取,无法从 DSH 模型输入传递爬虫配置
  • 后端重定向被拒绝,以防凭据泄露

dsh-surfing-plugin DSH 插件的仓库 README 摘录

以下文字摘自 dsh-surfing-plugin DSH 插件的上游仓库 cyijun/dsh-surfing-plugin 的 README,版权归原作者,仅作引用。

English | [中文](README.zh.md) `dsh-surfing-plugin` adds self-hosted web access to [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness): `web_search` uses SearXNG and `web_fetch` uses Crawl4AI. It registers providers with DSH's `ctx.web` service, so the native tool names, arguments, rendering, timeouts, cancellation, and result limits remain unchanged. ## Architecture ```mermaid flowchart LR A[Native DSH web_search] --> B[surfing-searxng provider] B --> C[SearXNG /search] D[Native DSH web_fetch] --> E[surfing-crawl4ai provider] E --> F[Crawl4AI /crawl] ``` The bundled `cordis.patch.yml` mounts this plugin, selects `surfing-searxng` and `surfing-crawl4ai`, and adds a fetch-only native tool consumer. The separate consumer works in both DSH assemblies: headless keeps its host-level `web_search`, while the Web UI keeps the `web_search` mounted by each Agent Preset. The built-in DeepSeek search provider may remain mounted but is not selected. ## Requirements - Node.js `^22.19.0` or `>=24.0.0` - DeepSeek Harness `>=0.1.0-rc.6 <0.2.0` - Reachable SearXNG and Crawl4AI services - JSON enabled in SearXNG's `search.formats` ## Quick start The endpoint values may b

阅读完整 README仓库许可: MIT

dsh-surfing-plugin DSH 插件常见问题

是否需要单独运行 SearXNG 和 Crawl4AI?

是的,dsh-surfing-plugin 是一个提供者插件,需要连接到已有的 SearXNG 和 Crawl4AI 服务。安装插件前必须确保这两个服务可访问且已配置。插件本身不包含也不启动这些服务。

如何配置 SearXNG 或 Crawl4AI 的认证?

可以通过环境变量(如 SEARXNG_API_KEY、CRAWL4AI_API_TOKEN)或在 `cordis.patch.yml` 配置中的 `apiKey` 或 `apiKeyEnv` 字段直接设置认证。插件还支持自定义请求头名称和认证方案。建议使用环境变量以避免提交凭据。

这个插件能在 DSH Web UI 中使用吗?

可以,插件在无头模式和 Web UI 中都能工作。在 Web UI 中,每个代理预设会挂载 web_search 工具。插件注册的提供者可以在每个代理中选择。捆绑的 `cordis.patch.yml` 包含一个单独的消费者用于仅抓取模式。

如果 Crawl4AI API 返回错误会怎样?

Crawl4AI API 失败(如网络问题、无效 URL)会被插件转换为结构化的 `WebError` 值。目标页面的非 2xx HTTP 状态码仍作为成功的抓取结果返回,只有 Crawl4AI 服务本身报错才会触发 WebError。

如何卸载这个插件?

运行 `dsh plugin --profile web remove dsh-surfing-plugin` 即可从 DSH 配置文件中移除该插件。这将注销提供者并恢复默认搜索行为。