跳到正文

TYEclipse/dsh-webfetch

30最近提交 2026年8月16日

dsh-webfetch DSH 插件

dsh-webfetch 提供两个只读工具(web_fetch 和 web_links),让智能体能够获取并解析网页内容。零运行时依赖,仅使用 Node.js 内置模块和全局 fetch。安全设计:不发送凭证,有大小/时间限制,仅允许 http/https。

如何安装 dsh-webfetch DSH 插件

dsh plugin --profile web add github:TYEclipse/dsh-webfetch

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

dsh-webfetch DSH 插件数据来源

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

discovered

dsh-webfetch DSH 插件能做什么

  • 抓取网页并提取干净的 Markdown 或纯文本,保留标题、链接、列表和代码块。
  • 通过 web_links 工具可选提取页面中的所有链接(解析为绝对地址、去重)。
  • 可通过插件 YAML 配置超时时间、最大字节数、最大字符数、最大重定向次数和用户代理。
  • 内容类型门控:仅解析 text/html 和 text/plain 响应,剥离脚本、样式和注释。
  • 字符集感知:认可 Content-Type 字符集,回退到 <meta charset> 嗅探,最后使用 UTF-8。
  • 零运行时依赖:仅依赖 Node.js 内置模块和全局 fetch。
  • 绝不发送凭证:拒绝包含凭据的 URL,不附加 Cookie 或 Authorization 头。
  • 所有参数均有上限:硬超时、重定向次数限制、响应大小上限、提取文本上限(超出时标记 truncated)。

dsh-webfetch DSH 插件适合哪些场景

  • 智能体读取搜索结果中 URL 的全文以回答用户问题。
  • 智能体收集页面中的所有链接以映射站点结构或爬取相关页面。
  • 智能体从新闻文章或文档页面中提取干净文本用于摘要。
  • 智能体并行抓取多个页面并比较内容。
  • 智能体获取页面以验证信息或从网页源中提取特定细节。

dsh-webfetch DSH 插件适合谁

  • 使用 DeepSeek Harness 构建需要网页阅读能力的 AI 智能体的开发者。
  • 希望智能体能够自主浏览和提取 URL 内容的高级用户。

dsh-webfetch DSH 插件的限制

  • 仅支持 http/https 协议;file:、ftp:、javascript: 等协议被拒绝。
  • 仅解析 text/html 和 text/plain 响应;其他类型(如 PDF、JSON)被忽略。
  • 响应大小和提取文本有上限(默认 1.5MB 和 50000 字符);大页面可能被截断。
  • 不支持 JavaScript 渲染:依赖 JS 加载内容的页面可能无法完整获取。
  • 需要智能体环境具有网络访问权限;离线或内网 URL 可能无法访问。

dsh-webfetch DSH 插件的仓库 README 摘录

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

> 为 DeepSeek Harness 智能体装上「阅读器」:给定 URL,抓取网页并提取干净的 Markdown / 纯文本正文,附带链接清单。零运行时依赖,只读,不发送任何凭证。 > [English](#english) | 中文简介 A web page reader plugin for [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) (`dsh`). `dsh` agents can search, but until now they could not *read the page behind a URL*. `dsh-webfetch` closes that gap with two read-only tools and **zero runtime dependencies** (Node built-ins + global `fetch` only). ## Tools ### `web_fetch` Fetch a web page and extract its readable content. | Parameter | Type | Default | Description | | ------------- | -------------------- | ---------- | -------------------------------------------------------------- | | `url` | string (required) | — | Full http/https URL of the page to fetch. | | `format` | `'markdown' \| 'text'` | `markdown` | Markdown keeps headings, links, lists and code fences; `text` is plain prose. | | `extractLinks`| boolean | `false` | Also return every link found on the page (resolved, absolute). | | `maxChars` | number | `50000` | Cap on extr

阅读完整 README仓库许可: MIT

dsh-webfetch DSH 插件常见问题

如何安装 dsh-webfetch?

在终端中运行 `dsh plugin --profile web add github:TYEclipse/dsh-webfetch`。你也可以固定版本,例如 `dsh plugin --profile web add github:TYEclipse/dsh-webfetch#v0.1.0`。安装后重启智能体会话,工具即可使用。

可以配置超时或请求大小吗?

可以,所有设置都是可选的,有合理的默认值。你可以在 DSH 配置文件的 `plugins.dsh-webfetch` 下添加 YAML 配置块。例如设置 `timeoutMs: 20000`、`maxBytes: 3000000`、`maxChars: 100000`、`maxRedirects: 5` 和 `userAgent: "MyAgent/1.0"`。

dsh-webfetch 会发送 Cookie 或凭证吗?

不会,该插件设计为只读,绝不发送凭证。包含凭据的 URL 会被拒绝,不会附加任何 Cookie 或 Authorization 头。它仅以普通 HTTP 请求方式获取页面。

支持哪些类型的 URL?

仅接受 http 和 https URL。出于安全原因,其他协议如 file:、ftp:、javascript:、data: 等会被拒绝。包含内嵌凭据的 URL 也会被拒绝。

如何获取页面中的所有链接?

使用 `web_links` 工具,传入目标 URL。你可以通过 `limit` 参数(1–200,默认 50)控制返回的最大链接数量。该工具返回解析为绝对地址、去重后的链接及其可见标签。