返回目录
开发工具 插件

dsh-web-fetch-crw

jaco-tech/dsh-web-fetch-crw

crw (Firecrawl-compatible) fetch provider plugin for DeepSeek Harness (ctx.web) — no auth, no API key

Stars
0
Forks
0
Issues
2
更新
10 天前

PROJECT TOPICS

项目标签

INSTALL REFERENCE

安装参考

未验证
dsh plugin --profile web add github:jaco-tech/dsh-web-fetch-crw

该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。

PROJECT README

README

dsh-web-fetch-crw

dsh-plugin CI/CD

crw (Firecrawl-compatible) fetch provider plugin for DeepSeek Harness.

Registers a WebFetchProvider into ctx.web so that the existing web_fetch model tool retrieves page content through your crw instance — which converts HTML to clean markdown. No auth, no API key.

crw is a self-hosted web scraping and crawling service that implements the Firecrawl API. It provides a drop-in replacement for the Firecrawl /v1/scrape endpoint.

Install

npm install @jaco-tech/dsh-web-fetch-crw

Requires DeepSeek Harness 0.2.1-rc.5. The tested DSH dependency set pins @deepseek-ai/dsh-web and @deepseek-ai/dsh-settings exactly at 0.2.1-rc.5. @deepseek-ai/cordis is the deliberate exception: like the first-party DSH web plugins, this package declares the compatible patch range ~4.0.5. A consumer lockfile could in principle resolve a different 4.0.x cordis patch and create a second framework copy; this plugin's one-shot install is verified against cordis 4.0.5. Every DSH bump therefore needs a release of this package with its framework peers re-pinned (test/peer-pins.test.mjs enforces their presence and pin form). DSH 0.1.x is no longer supported; use @jaco-tech/dsh-web-fetch-crw@0.1 there.

Configure

1. Install the package

npm install @jaco-tech/dsh-web-fetch-crw

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-fetch-crw
      name: '@jaco-tech/dsh-web-fetch-crw'
      config:
        # Required: point at your crw (Firecrawl-compatible) instance
        baseURL: 'http://your-crw-instance:3000'

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

- replace:
    - id: web
      config:
        fetchProvider: crw

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_fetch tool in your agent will now use your crw 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-fetch-crw" card where you can edit the baseURL without editing YAML files. baseURL is a volatile setting: the provider reads it on every fetch, so an edit applies without restarting DSH.

How it works

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

export const name = "web-fetch-crw"
export const inject = ["web"]

export function apply(ctx, config) {
  ctx.web.registerFetchProvider({
    id: "crw",
    available() { /* URL.canParse(config.baseURL) */ },
    async fetch(request, signal) {
      // POST /v1/scrape { url, formats: ["markdown"] }
      // maps response to WebFetchResult (body as markdown text)
    }
  })
}

The existing @deepseek-ai/dsh-tool-web consumer calls ctx.web.fetch() — your crw instance serves the content automatically.

Provider interface

Method Behavior
available() Returns true when baseURL is a valid URL
fetch(request, signal?) POST /v1/scrape with { url, formats: ["markdown"] }. Returns the scraped markdown as kind: "text" body (no double-conversion through turndown).

Upstream

This plugin communicates with crw via its Firecrawl-compatible API (POST /v1/scrape). crw is a self-hosted web scraping and crawling service that renders pages (via Lightpanda or Chromium) and produces clean markdown. You need a running crw instance to use this plugin.

Release process

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

Requires the NPM_TOKEN secret to be set in the repository.

Development

npm install
npm run build
npm test    # builds, then imports the built package against the installed DSH (hermetic)

Verify a one-shot scratch install of DSH plus this package's npm pack tarball:

repo=$PWD
scratch=$(mktemp -d)
tarball=$(npm pack --pack-destination "$scratch" --silent)
printf '%s\n' \
  "{\"private\":true,\"dependencies\":{\"@deepseek-ai/dsh\":\"0.2.1-rc.5\",\"@jaco-tech/dsh-web-fetch-crw\":\"file:./$tarball\"}}" \
  > "$scratch/package.json"
(cd "$scratch" && npm install --no-audit --no-fund)
node "$repo/test/installed-tree-identity.mjs" "$scratch"

The final check is hermetic (it only reads the installed tree). It requires exactly one installed copy each of @deepseek-ai/dsh-web, @deepseek-ai/dsh-settings, and @deepseek-ai/cordis, and requires @deepseek-ai/cordis-plugin-group to be present.

License

MIT

CLASSIFICATION EVIDENCE

分类依据

项目类型插件
功能分类开发工具
规则置信度中

系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: api。