deepseek-harness-zhipu_plan_tools

browsertested: passnpmMIT

Zhipu (GLM Coding Plan) web suite as native DSH providers and tools: rebinds the built-in web_search and web_fetch to Zhipu web search and Markdown page reading, optionally registers github_search_doc / github_get_repo_structure / github_read_file repo tools, and adds a settings card with toggles an

下载量 / Downloads
1,845
依赖体积 / node_modules
0.65 MB
测试时间 / Tested
2026-11-06
DSH 版本 / Version
0.2.2-rc.1

Install

dsh plugin --profile web add deepseek-harness-zhipu_plan_tools

Sandbox test results

StageResult
1 install✓
2 list✓
3 mount✓
4 boot—

Four stages run in an isolated sandbox: install (network on) → list → mount → boot (last three with no network).

README

deepseek-harness-zhipu_plan_tools

智谱 MCP 三件套 · DeepSeek Harness 插件

[中文](README.md) · [English](README.en.md)

<p align="center">

<img alt="版本 0.1.8" src="https://img.shields.io/badge/%E7%89%88%E6%9C%AC-0.1.8-5965d8">

<img alt="功能 搜索/读取/仓库" src="https://img.shields.io/badge/%E5%8A%9F%E8%83%BD-%E6%90%9C%E7%B4%A2%20%C2%B7%20%E8%AF%BB%E5%8F%96%20%C2%B7%20%E4%BB%93%E5%BA%93-4aa3ff">

<img alt="MIT License" src="https://img.shields.io/badge/license-MIT-3b7a57">

</p>

把智谱(GLM Coding Plan)三个 MCP Server 的能力以 DSH 原生 provider / 工具形式接入:

内置 web_search / web_fetch 后端替换为智谱联网搜索与网页读取,并可选注册三个

github_* 开源仓库工具。全部设置都在插件卡片中保存并实时生效。

功能与设置顺序

在侧栏 「插件」页 → deepseek-harness-zhipu_plan_tools 页面(DSH 0.1.6+)查看配置表单。下表严格按表单从上到下排列:

设置 · 默认值 · 说明

启用智谱工具 · 开 · 总开关;关闭后搜索/读取进入兼容回退,仓库工具和相关提示卸载,设置入口保留

联网搜索(接管 web_search) · 开 · 通过智谱 web_search_prime 搜索,并替换模型可见的内置搜索说明

网页读取(接管 web_fetch) · 开 · 通过智谱 webReader 返回 Markdown;DSH v0.1.2 起 Web 端预设默认提供 web_fetch,安装后即生效

开源仓库工具 · 关 · 注册 github_search_doc、github_get_repo_structure、github_read_file

提示词中文化 · 关 · 将插件注入的提示、工具说明与 github_* 工具错误消息从默认英文切换为中文;工具名不变

凭据引用名 · ZAI_CODING_CN_API_KEY · 只保存引用名,不保存 API Key

卡片默认收起,底部依次为“恢复默认值 / 放弃修改 / 保存”。完整设置语义和关闭后的

回退边界见[行为契约](docs/behavior.md#设置语义)。

工作机制

  • 搜索/读取 = provider 替换:注册到 DSH web 服务的 provider,由 cordis.patch.yml

把 web 行的 searchProvider / fetchProvider 指向本插件;模型看到的工具名不变

(web_search / web_fetch),后端换成智谱。

  • 仓库工具 = 原生注册:三个 github_* 工具经 ctx.tools.register 注册,带系统提示

指引与通用卡片,60 秒协作超时;历史中的过期或畸形参数仅降级为通用卡片,不影响会话重放,实际执行仍严格校验参数。

  • 凭据:统一引用 ZAI_CODING_CN_API_KEY(智谱 GLM Coding Plan API Key),三层解析

(DSH 凭据服务 → 环境变量 → ~/.dsh/.credentials.yaml 直读);Key 永不写入配置或日志。

  • 尊重 Agent 预设:极简模式(minimal 预设)是“仅持久 shell + str_replace_editor”的双工具组合,该模式下不注册 web_search 阴影;zread 开启时还在该 Agent 作用域 deny 全局 github_* 工具(该 deny 不依赖 search 开关,插件启用即生效),保持双工具承诺。
  • 热更新:设置 applies: 'live' 实时生效;Host 产物在当前 DSH 版本下没有免重启热通道(hmr 服务面已移除 registerConfig/partialReload,profile bundle 又位于官方 watcher 默认排除的 node_modules 下),改 src/ 后需 npm run build 并由用户重启一次 dsh web,lib/client.js 的改动则由 DSH client HMR 自动换血。

环境要求

  • DeepSeek Harness >=0.2.0-rc.2 <0.3.0-0(package.json 的 engines.dsh 门禁;0.1.x 及更早会被宿主拒绝加载,0.3.0 起同样拒绝);Web 使用 web,Open Design stdio 使用 open-design,DSH 一次性任务可用 headless
  • Node.js ^22.19.0 || >=24.0.0
  • 智谱 GLM Coding Plan API Key;默认引用名为 ZAI_CODING_CN_API_KEY

安装

npm 注册表安装:

# Web GUI:持久安装
dsh plugin --profile web add deepseek-harness-zhipu_plan_tools

# Open Design 的真实 stdio profile
dsh plugin --profile open-design add deepseek-harness-zhipu_plan_tools

# 可选:DSH 自带 headless
dsh plugin --profile headless add deepseek-harness-zhipu_plan_tools

# 仅用于正在运行的 Web GUI 热安装
npx -y deepseek-harness-zhipu_plan_tools install --profile web

bundle 按 profile 隔离:Open Design 实际运行 dsh --profile open-design --stdio,不是 headless。两个非 Web profile 都在下一次短进程启动时加载;open-design 的 stdout 是严格 JSONL,本插件信息日志会改走 stderr。

桌面版 DSH(Electron 应用):本插件兼容桌面版(桌面 Host 端口 19387);桌面 profile(~/.dsh/profiles/desktop)由桌面应用独占,dsh plugin CLI 与本插件 CLI 都按名拒绝 --profile desktop。link 开发安装(桌面应用未运行时执行)——编辑 ~/.dsh/profiles/desktop/package.json:

"dependencies": { "deepseek-harness-zhipu_plan_tools": "link:<本仓库绝对路径>" },
"dsh": { "profile": { "bundles": [ /* 官方 bundle 保持原样,末尾追加 */ "deepseek-harness-zhipu_plan_tools" ] } }

在 profile 目录内执行 pnpm install 物化链接,启动桌面应用即挂载;改源码后 npm run build 并重启桌面应用;卸载移除两处条目后重新 pnpm install。搜索/网页读取的凭据存于 $DSH_HOME,Web 与桌面版共用。

本地源码联调:

npm install
node bin/dsh-zhipu.mjs install --profile web --link <项目绝对路径>
dsh plugin --profile open-design add "link:<项目绝对路径>"
dsh plugin --profile headless add "link:<项目绝对路径>"

本包 patch 含 web.config,项目桥接/临时行只用于 Web 热安装;其它 profile 使用官方持久通道。分别核对:

npx -y deepseek-harness-zhipu_plan_tools status --profile web
dsh plugin --profile open-design list
dsh --profile open-design --dump-default-config
dsh plugin --profile headless list

首次使用:添加 zai-coding-cn 提供商

使用本插件前,先在 DSH 设置中添加 zai-coding-cn 提供商(一个步骤,安装后只需做一次):

1. 打开 DSH 设置 → 模型;

2. 「提供方」下拉选择 zai-coding-cn(注意不是海外的 zai,本插件走智谱中国区端点 open.bigmodel.cn);

保存后 DSH 会自动使用 ZAI_CODING_CN_API_KEY 参数(即配置中 apiKeyEnv: ZAI_CODING_CN_API_KEY)

作为该提供商的 API Key——这正是本插件默认的凭据引用名 credentialRef。

因此你只需保证 ZAI_CODING_CN_API_KEY 已存在于环境变量或 ~/.dsh/.credentials.yaml,

插件零额外配置即可取到智谱 Coding Plan Key;若你在环境变量中配置了别的名字,可在插件页配置表单中

把 credentialRef 改成对应名字。

Open Design/stock headless 没有设置页面,但同一 ${DSH_HOME:-~/.dsh} 下共用 settings.yaml 与凭据:可先在 Web GUI 保存设置,后续 open-design / headless 进程读取同一 dsh-zhipu 命名空间。

web_fetch(网页读取)可用性

自 DSH v0.1.2 起,Web 端 agent 预设(standard / ptc / cordis)默认在模型工具目录中提供

web_fetch。本插件只接管其后端 provider、不改工具开关:安装挂载后 web_fetch 默认即走

智谱 webReader,无需额外启用步骤。

旧版 DSH(Web 组合尚未默认提供 web_fetch 时)才需要在 profile patch

(~/.dsh/profiles/web/cordis.patch.yml)中启用:

- id: tool-web
  config:
    fetch: true

数据边界:开启态抓取在智谱云端执行(本地不连接目标地址,URL 会提交给智谱 MCP);关闭态

回退本地受限 HTTP(S) 抓取,详见[行为契约](docs/behavior.md#web_fetch-启用边界)。

设置与数据

六个字段 enabled / search / reader / zread / zhPrompt / credentialRef 按上方卡片顺序存入

DSH settings.yaml 的 dsh-zhipu 命名空间。API Key 本身不进入该命名空间。

关闭 search / reader 会实时进入兼容回退(使用 DEEPSEEK_API_KEY 的 DeepSeek 搜索、

受限 HTTP(S) 文本抓取),但不会改写 profile 中静态绑定的 provider。要让其他 provider

重新接管仍需卸载本插件;精确边界见[关闭后的回退语义](docs/behavior.md#关闭后的回退语义)。

插件不上传额外数据、不做遥测;网络调用限于智谱官方 MCP、兼容回退端点和用户明确传入的 HTTP(S) 页面。

卸载

dsh plugin --profile web remove deepseek-harness-zhipu_plan_tools
dsh plugin --profile open-design remove deepseek-harness-zhipu_plan_tools
dsh plugin --profile headless remove deepseek-harness-zhipu_plan_tools
# 正在运行的 Web GUI 也可使用:
npx -y deepseek-harness-zhipu_plan_tools remove --profile web

卸载按 profile 独立清理;两个短进程 profile 从下一次调用起不再加载。settings.yaml 中的值可能保留。

开发

npm run typecheck   # 三个 tsconfig 全量类型检查
npm run build       # 

…(truncated)

Rendered from the README published on npm. Formatted only, not edited.

Versions

Published on npm::9,最后更新 2026-10-18

Links

GitHub · Homepage · npm

Same category