dsh-cc/dsh-cc--packages-core-tool-web-fetch ↗★ 1

@dsh-cc/tool-web-fetch

替代内置网页抓取工具,可选提示词在廉价模型通道上摘要页面内容。 适合需要抓取网页并自动摘要的用户;使用提示词前须配置haiku模型别名。

套件
@dsh-cc/tool-web-fetch
相容性
待驗證
Harness 依賴範圍
>=0.1.5-rc.1
Cordis 依賴範圍
>=0.1.5-rc.1
版本
0.7.1
授權
Apache-2.0
最近更新
2026年9月16日

安裝

此插件尚未提供可驗證的 bundle,或相容性檢查未通過。請先閱讀倉庫說明。 閱讀完整 README ↗

@dsh-cc/tool-web-fetch

English | 中文

CC-style web_fetch replacement with an optional prompt. This package replaces the stock @deepseek-ai/dsh-tool-web web_fetch when the CC preset sets tool-web to fetch: false and mounts this row in cc-services instead.

Behavior

  • Without prompt (or with a blank/whitespace one): identical to the stock tool — the raw converted page text is returned.
  • With prompt and a configured haiku model alias (ccModelRoutes.resolve('haiku')): the fetched document is converted and passed, together with the prompt, to a one-shot summarize call on that cheap lane. The tool returns only the extraction. A string-form alias (haiku: deepseek-v4-flash, model only) inherits the missing provider from the calling agent's request-header; with no calling agent (hence no parent provider) the tool fails hard.
  • With prompt but the haiku alias unconfigured (no ccModelRoutes service or the resolver returns nothing): the tool throws web_fetch: prompt requires a configured haiku model alias before any fetch is performed — the page is not fetched, streamed, or returned.

The summarize call never carries a purpose field: the harness GenerateOptions.purpose union is closed ('compaction' | 'session-title'). A summary model that requests a tool or produces no text fails the call as an isError tool result.

Provider requirement

CC deployments use the stock @deepseek-ai/dsh-web-fetch-http executor from dsh-base (DNS-pinned, public-only per hop), with CC egress caps restated by the cc-shell bundle. The tool upgrades http: URLs to https: before the seam call (CC WebFetch parity); it never registers a provider itself — tests fake ctx.web.fetch.

Prompt guidance interplay

Setting tool-web fetch: false also drops the stock "Follow up with web_fetch" clause from the web_search system-prompt section. This package re-registers the tool:web_fetch prompt section (order 111) covering fetch guidance.

Known limits

  • No host allowlist in this package: SSRF policy lives in the executor — the stock provider resolves public-only addresses and pins them per hop, so the DNS-rebinding window is closed upstream (rc.1). Anything stricter belongs there, not here.
  • Tavily / Firecrawl are plugins/skills, not fetch backends for this tool.