dsh-cloudflare-browser-run
Agent 与会话 活跃维护

dsh-cloudflare-browser-run

RealAlexandreAI/dsh-cloudflare-browser-run

依托Cloudflare边缘浏览器的运行能力,提供markdown内容转换、网页全页高清截图及PDF文档生成三类核心功能,无需本地部署复杂运行环境,调用简洁接口即可快速获取处理结果,轻量易用,可快速集成到各类web工具业务流程中。

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

dsh-cloudflare-browser-run — real browser access for DeepSeek Harness

dsh-cloudflare-browser-run

A DeepSeek Harness plugin that gives the agent real browser access: headless Chrome on Cloudflare's network, so JS-rendered pages, screenshots, and PDFs all just work.

Port of pi-cloudflare-browser-run, built to the dsh (Cordis) plugin spec.

English · 中文

Why

The built-in web_fetch is a plain HTTP fetch — JS pages come back empty and SSRF protection is deferred upstream. This plugin adds a real browser:

  • clean markdown from any public page (SPA/JS included)
  • screenshots (PNG) and PDFs
  • login-capable sessions and WebMCP sites

Quick start

dsh plugin --profile web add dsh-cloudflare-browser-run

Configure credentials in your profile/settings layer:

- id: cloudflare-browser-run
  name: dsh-cloudflare-browser-run
  config:
    cf_api_token: <your token>
    cf_account_id: <your account id>

Token: Cloudflare dashboard → API Tokens → Browser Rendering: Edit template.
Account id: dash.cloudflare.com/<ACCOUNT_ID>/....

Tools

tool what it does
browse fetch a public URL → clean markdown (default); action = screenshot | pdf
screenshot save the page as PNG locally, returns the file path
pdf save the page as PDF locally, returns the file path

Config

key required meaning
cf_api_token ✅ your API token (Browser Rendering:Edit)
cf_account_id ✅ your Cloudflare account id
cf_api_base – API base override
output_dir – where screenshots/PDFs land (default OS temp)

Privacy

  • Public web only: every URL passes an SSRF guard (localhost / private IPs / IPv6 literals / userinfo rejected) before the API is called.
  • The token lives only in your config file — never logged, never stored by the plugin.
  • Browser Run identifies itself as a well-behaved bot, the compliant way to fetch.

Development

npm install
npm run typecheck
npm test          # SSRF guard / config / API shape
npm run build

Live API test (not part of npm test):

DSH_TEST_CF_TOKEN=<token> DSH_TEST_CF_ACCOUNT=<account> node --import tsx tests/real/real-cf.mjs

License

MIT