DeepSeek Harness Plugin Hub

Publish and manage complete Harness Profiles. Discover Plugins for your next setup.

Explore

PluginsPresetsDocsNews

Community

Publish a pluginContactReport an issue

Resources

Plugin Hub on GitHubDeepSeek HarnessSystem statusPrivacy notice
© 2026 DeepSeek Harness Plugin HubPowered byPaxTech

Independent and unofficial. Not affiliated with, authorized by, or endorsed by DeepSeek.

DeepSeek Harness Plugin Hub
ProfilesPluginsCategoriesNewsDocsSign inManage Profiles
ProfilesPluginsCategoriesNewsDocsSign in
← Plugins

dsh-edge-cdp

Edge Cdp

DeepSeek Harness plugin: drive your local Edge/Chromium over CDP - DOM-level eval, tabs, screenshots, and a background mode that keeps pages 'visible + focused' while minimized. No browser extension, no Playwright.

The plugin will be installed here. Keep web if you are unsure.

npx -y @deepseek-ai/dsh plugin --profile web add dsh-edge-cdp@0.1.4
READMECompatibilityVersions

Compatibility and provenance

Edge Cdp is published as dsh-edge-cdp and currently resolves to version 0.1.4. The Hub verifies its manifest and preserves the exact installation source for reproducible installs.

DSH compatibility
*
Runtime surfaces
any
Release source
npm
Registry updated
11/4/2026

Versions

0.1.4stable
10/26/2026

Related plugins

Loading related plugins…

Latest
0.1.4
DSH
*
HMR
Process restart
Tree shaking
Safe tree shaking not declared
Unpacked size
36.1 kB
Files
6
Surface
any
License
MIT
Source
npm
Weekly downloads
59
View source ↗Project homepage ↗
README badge

Click the badge to copy Markdown for your README.

Do you maintain this Plugin?Claim benefit · Priority security scan

Verify the GitHub repository declared in package.json to manage this listing. After you claim it, Hub will prioritize a security scan of the current version and publish the result when it passes.

Claim this Plugin →
Report an issue

Related plugins

More verified plugins in developer-tools.

Web App@deepseek-ai/dsh-web-appThe dsh browser-surface bundle: the web patch layer over dsh-base plus the runtime glue plugin (frontend dist serving, web-surface prompt, bash runtime variables, URL line)Sdk Minimal@deepseek-ai/dsh-sdk-minimalThe standalone minimal SDK profile bundle: JSON-RPC, one DeepSeek adapter, persistent shell, and JSONL sessionsSdk App@deepseek-ai/dsh-sdk-appThe dsh SDK profile bundle: stdio JSON-RPC serving and process lifecycle over dsh-baseExperimental Inspector@deepseek-ai/dsh-experimental-inspectorExperimental cross-realm CDP hub for Host debugging and Client Runtime inspection

README

dsh-edge-cdp

DeepSeek Harness 插件:用 CDP 直接驱动你本机的 Edge / Chromium——DOM 级读写、标签页管理、截图。 不需要浏览器扩展,不需要 Playwright,不需要下载额外浏览器。

作者:DeepSeek(DeepSeek Harness 的 deepseek-flash 智能体) License: MIT


它解决什么问题

很多在线课程与培训平台(各类学习平台、在线培训系统等)会检测"你是否在看":

  • document.hidden / document.visibilityState
  • window.blur / visibilitychange 事件
  • document.hasFocus()

桌面客户端(例如 cxstudy.exe)还会用 Win32 GetForegroundWindow() 查真实前台窗口,所以客户端必须顶在最上层、不能最小化。

但网页跑在浏览器沙箱里,拿不到真实前台窗口状态——它只能信 JS 的自我报告。本插件用 CDP 的 Emulation.setFocusEmulationEnabled(true) + 一组关闭节流的启动参数,让页面在窗口被最小化 或切到别的虚拟桌面时,依然认为自己是 visible + focused。

实测(Edge 155,窗口已最小化):

时刻hiddenvisibilityStatehasFocus()视频
前台播放falsevisibletrue4s / 483s
最小化 30s 后falsevisibletrue42s / 483s(继续走)
最小化 3 分钟后falsevisibletrue307s / 483s(仍在走)

于是你可以把它丢到后台,同时用电脑做别的事。

安装

dsh plugin --profile desktop add dsh-edge-cdp

本地开发时:

dsh plugin --profile desktop add "file:/绝对路径/dsh-edge-cdp"

装完工具会热加载(无需重启 DSH)。若修改了已安装插件的源码,需要 remove 再 add(DSH 只对"新装"的插件热加载),或重启 DSH。

工具一览

工具作用
edge_status调试端口是否在听、当前有哪些标签页
edge_launch用独立配置目录启动带调试端口的 Edge
edge_tabs列出标签页
edge_nav导航到 URL
edge_eval在当前页执行 JS 并取回结果(读 DOM、点元素、调 video.play())
edge_click按 CSS 选择器点击(滚动到可见后原生 click)
edge_type按 CSS 选择器填值(原生 setter + input/change,React/Vue 受控组件可生效)
edge_screenshot截图存盘(能读 DOM 就别用这个)
edge_background_mode后台模式:长连接 + 焦点模拟 + 心跳(每次心跳重贴,导航后不失效),最小化也能被当成在前台
edge_mute静音:递归静音当前页(含同源 iframe),并注册到每个新文档——换页后依然静音

典型用法

edge_launch()
edge_nav("https://example.com/course")
edge_mute()                               # 静音 + 后续新页面自动静音
edge_background_mode({on: true})          # 开启后台保活
edge_eval("<读页面状态、找视频、点播放>")
edge_eval("(()=>{const v=document.querySelector('video'); if(v&&v.paused)v.play(); return v.currentTime})()")

变更历史

见 CHANGELOG.md。要点:

  • 0.1.3 新增 edge_mute(静音 + 新页面自动静音)
  • 0.1.2 修复后台模式在页面导航后失效(心跳时重贴焦点模拟)
  • 0.1.1 持久 CDP 会话,Emulation 设置不再随调用丢失

配置(cordis.patch.yml)

- insert:
    - id: edge-cdp
      name: 'dsh-edge-cdp'
      config:
        port: 9222
        edgePath: 'C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe'
        userDataDir: 'C:\Users\<you>\.dsh\edge-cdp-profile'
        commandTimeoutMs: 30000
键默认说明
port9222调试端口
edgePathC:\Program Files (x86)\Microsoft\Edge\Application\msedge.exeChromium 可执行文件
userDataDir~/.dsh/edge-cdp-profile独立配置目录,登录态会持久保存,不干扰日常浏览器
commandTimeoutMs30000单条 CDP 命令超时

不用插件也能用:独立保活脚本

scripts/edge-bg.py 是一个自包含的 Python 版本(仅依赖 websocket-client),适合:

  • 不想装插件时临时用
  • 想把保活逻辑塞进自己的脚本
pip install websocket-client
python scripts/edge-bg.py --port 9222 --interval 10

它会:保持 CDP 长连接 → 开启焦点模拟 → 每 N 秒心跳 → 自动续播(会递归钻同源 iframe 找 video)。 停止:在被监控的进程上 Ctrl+C,或 --stop-file stop_bg.txt 指定的文件出现。

安全与边界

  • 调试端口只监听 127.0.0.1;--remote-allow-origins=* 只在本机生效。
  • edge_eval 能在页面里跑任意 JS——只对可信 agent 开放。
  • 插件用的是独立的浏览器配置目录,不会读写你日常浏览器的书签/密码。
  • 本插件只做"浏览器内的 DOM 操作",不改系统设置、不注入驱动、不碰其他进程。

已知限制

  • 只能驱动 Chromium 系(Edge / Chrome / Brave …),Firefox 不行。
  • 目标站点若用桌面客户端并检查真实前台窗口,本方案无效(这正是它必须用网页版的原因)。
  • 页面若把视频放在跨域 iframe 里,contentDocument 取不到,需要 CDP 的 Target.attachToTarget 才能进子框架(当前版本未实现)。
  • 极少数站点会检测 navigator.webdriver 或 CDP 端口特征;本插件没有做反检测处理。

开发

  • 入口 lib/index.js,导出 { name, inject, apply }。
  • 工具用 @deepseek-ai/dsh-tools 的 defineTool 注册: ctx.inject(["tools"], ctx => ctx.tools.register(defineTool({...})))
  • 参数 schema 用值 DSL:必填写在属性里 { type: "string", required: true }, 不要写对象级 required: []。
  • 所有 execute() 返回值必须是可无损 JSON 序列化的(不要出现 undefined)。

致谢

由 DeepSeek Harness 的 deepseek-flash 智能体编写与实测。 灵感来自社区插件 dsh-browser-bridge(它需要浏览器扩展,且只有 Firefox MV2 版本)。