ZhaoAndy821/dsh-zcode-connector

Drive the ZCode (Z.ai) desktop client as a model channel from DeepSeek Harness over CDP — the app mints its own attestation, so account-bound quota is spent by the first-party client.

Project Overview项目介绍

DSH ZCode Connector is a DSH-native plugin that lets DeepSeek Harness (DSH) use the locally running ZCode (Z.ai) desktop application as a model channel by driving the client's own graphical interface over the Chrome DevTools Protocol, rather than treating the grant as an extractable API key. The repository ships three cooperating pieces: a local OpenAI-compatible bridge at bridge/zcode-bridge.mjs exposing POST /v1/chat/completions, which types the prompt into the live ZCode window and waits for the turn to finish before returning the answer; the host-side dsh-zcode-connect plugin that adds a loopback-only status route plus a self-contained HTML panel (no React, no build step) showing the account, plan, live quota, loaded capabilities, what the connector installed, and what background activity is currently in flight; and an MCP stdio server at mcp/server.mjs that DSH consumes through @deepseek-ai/dsh-mcp-client, exposing status, background runs, ask, and provisioning tools to any MCP client.

The intended audience is developers and teams who want to fold ZCode's promotional grants into their own tooling without breaching the vendor's terms of service. A typical run begins with launching the ZCode desktop app and signing in, then leaving it running on the system (it can stay minimised behind other work because input is delivered through CDP, independent of window stacking and OS focus). Once the DSH plugin is mounted, requests arrive over the loopback bridge or MCP, the prompt is verified character-for-character against the cleared composer, and the answer is read back from the client's own transcript so long tool-heavy turns survive intact. The connector additionally ships three skills — dsh-handoff, dsh-grunt-batch, dsh-fanout — and a zcode_install_agent role so a primary agent can split work into 5–15 item chunks, launch one subagent per chunk in a single message, and merge the machine-readable ASCII reports.

Runtime requirements are Node.js plus an already-signed-in ZCode desktop client, while the plugin pulls in @deepseek-ai/schemastery; the bridge attaches to the single renderer page (file://…/renderer/index.html) via public CDP and freezes its layout viewport only for the duration of one request, never moving or resizing the OS window. By design the connector is serialised — one account, one session, one conversation at a time, no parallel-call path and no retry storming — and the client's own renderer mints the per-request attestation, so the call path is identical to pressing Send by hand. The account credential is read only to query the plan API, never leaves in a response or the panel HTML (the account section reports identity and token length only), and node test/verify.mjs asserts that no token ever leaks. The repository is MIT-licensed and works with ZCode's native subagent, CronCreate, Monitor, ScheduleWakeup, and free Idle-time queues.

DSH ZCode Connector 是一个面向 DeepSeek Harness(DSH)的原生插件,让 DSH 通过 Chrome DevTools Protocol 直接驱动本地 ZCode(Z.ai)桌面客户端的界面,把客户端自身作为一条模型通道来使用。它由三部分组成:本地 OpenAI 兼容端点 bridge/zcode-bridge.mjs(监听 POST /v1/chat/completions,把提示键入正在运行的 ZCode 窗口并返回回答)、DSH 端 dsh-zcode-connect 插件(提供仅回环的状态路由和自包含的 HTML 面板,展示账号、套餐、实时配额、已加载能力及后台运行情况),以及 mcp/server.mjs(一个零依赖、纯手写的 JSON-RPC stdio MCP 服务器,通过 @deepseek-ai/dsh-mcp-client 被 DSH 消费)。

它面向需要把 ZCode 客户端赠送的活动额度纳入自有工具链、又不愿绕过客户端用户协议的开发者与团队。典型流程是:先启动 ZCode 桌面应用并登录,让它在系统中保持运行(即使最小化也行),然后在 DSH 端挂载本插件,通过本地 OpenAI 兼容端点或 MCP 工具发起请求,桥接程序会把提示以逐字校验的方式键入客户端渲染页并从官方会话记录中读取回答;面板和 MCP 则用来查看后台任务、计划配额与子代理活动。

依赖方面,运行时需要 Node.js、Chrome DevTools Protocol 通道、ZCode 桌面客户端已登录的运行实例,以及插件所需的 @deepseek-ai/schemastery;客户端的账号凭据只用于查询计划 API,绝不出现在响应、日志或面板 HTML 中,自检脚本 node test/verify.mjs 会断言这一点。一次仅支持一个账号、一个会话和一次串行请求,并行调用和重试风暴被刻意关闭,项目以 MIT 协议发布。

Pre-install check安装前体检Compatibility · Security兼容性 · 安全性 2 warnings2 项注意
  • Only 4 stars - very few users, little community feedback星标只有 4,几乎没人在用,遇到问题缺少社区反馈
  • Desktop client: installation downloads an executable - verify the publisher and checksums桌面客户端:安装会下载可执行文件,请核对发布者与校验和
DSH walks through these 9 checksDSH 会逐条核对这 9 项

Compatibility兼容性

  • DSH, Node, OS and profile requirementsDSH 版本 / Node 版本 / 操作系统 / profile 是否满足要求
  • External dependencies and runtimes (Electron / Python / Docker, ...)外部依赖与运行时(Electron / Python / Docker 等)是否齐备
  • Conflicts with installed plugins: command names, skill / tool names, ports, duplicate MCP registration与已装插件是否冲突:命令名、skill / tool 重名、端口占用、重复 MCP 注册

Security安全性

  • Repo matches the facts registered here; archived or abandoned?仓库是否与页面登记一致,是否归档或长期停更
  • Safety of preinstall / install / postinstall and install.sh / setup.ps1preinstall / install / postinstall 与 install.sh、setup.ps1 是否安全
  • curl|bash, download-then-execute, obfuscation, unrelated domains → stop immediatelycurl|bash、下载即执行、混淆代码、无关域名 → 立刻停止
  • Typosquatting or unmaintained packages among the new dependencies新增依赖里有没有 typosquatting 或无人维护的包
  • Requested permissions vs. what the feature actually needs申请了哪些权限、是否超出功能所需(filesystem / network / shell / clipboard)
  • Any sudo / admin requirement, plus uninstall and rollback是否要求 sudo / 管理员权限,以及卸载与回滚方式

Anything uncertain must be marked unknown with a note on how to confirm it. This site's signal screen is a static snapshot, not a security audit.拿不准的必须标「未知」并说明要我怎么确认。本站的信号筛查是静态快照,不能替代安全审计。

Or use CLI install (for developers)或使用命令行安装(适合开发者)

CLI Install命令行安装

dsh plugin --profile web add github:ZhaoAndy821/dsh-zcode-connector

把 ZhaoAndy821/dsh-zcode-connector 加入你的 DSH 配置(web profile)即可启用。

READMEREADME

DSH ZCode Connector

Use the ZCode (Z.ai) desktop app as a model channel from DeepSeek Harness (DSH) — by driving the app's own GUI over Chrome DevTools Protocol, not by pretending it is an API key.

It ships three things:

Piece What it does
bridge/zcode-bridge.mjs Local OpenAI-compatible endpoint (POST /v1/chat/completions) that types a prompt into the running ZCode window, waits for the turn to finish, and returns the answer; the plugin ships this same file and starts it on demand
plugin dsh-zcode-connect Host half with three loopback routes (status JSON, the HTML panel, and an on-demand bridge start) plus a client half that puts the panel in DSH's right sidebar as a tab — account, plan, live quota, loaded capabilities, what this connector installed, and what the client is running in the background right now
mcp/server.mjs MCP stdio server exposing status, background runs, ask, and provisioning tools to any MCP client (DSH consumes it through @deepseek-ai/dsh-mcp-client)

Why drive the GUI instead of using an API key

Measured on a real install, not inferred:

  • ZCode's promo grants (for example ZCode Weekend Build, 300,000,000 GLM-5.3-Flash tokens) are declared in the client's own catalog as account-bound: "access": { "type": "zhipu-account", "mode": "start-plan" }. There is no API key to extract.
  • The only inference route for such a grant, POST https://zcode.z.ai/api/v1/zcode-plan/anthropic/v1/messages, accepts the account token but answers {"code":3007,"msg":"captcha verify failed"} without X-Aliyun-Captcha-Verify-Param — an Aliyun traceless-captcha proof minted per request inside ZCode's renderer.
  • The documented platform routes do not carry the grant: with the same account, https://open.bigmodel.cn/api/anthropic and /api/coding/paas/v4 answer {"code":"1113","message":"余额不足或无可用资源包,请充值。"}, and the ZCode account token is 401 on https://api.z.ai/api/anthropic.

So the way to reach that quota from your own tooling is to let the first-party client make the call and drive its UI. That is what this project does — and it is the reason the grant is reachable here at all.

Showing the opening section of the README — the full document lives in the repository以上为 README 开头摘要,完整文档在仓库内 · View the full README on GitHub →在 GitHub 查看完整 README →

← 上一个 Prev dsh-ui-model-selection-collapsible 下一个 Next widget-dock →