Shuffle-1992/dsh-connect-zcode ↗★ 0
dsh-connect-zcode
把 ZCode(Z.ai / 智谱 BigModel)接入 DeepSeek Harness:Coding Plan 走标准 anthropic 通道,Start Plan / 活动赠送额度走官方 agent app-server 通道;含模型显隐、200K/1M 上下文预算、推理档/图片能力面板与赠送额度进度条。 适合需要使用智谱 BigModel 额度或 Coding 计划的用户。
Install
$
npx -p @deepseek-ai/dsh dsh plugin --profile web add github:Shuffle-1992/dsh-connect-zcodeREADME
Read the full README ↗配置
插件 config(cordis.patch.yml 或 profile 覆盖):
| 键 | 默认 | 说明 |
|---|---|---|
planKey | builtin:bigmodel-coding-plan | 只接的套餐条目 |
contextWindow | 200000 | 基础上下文窗口(CLI 实测有效 200k;config 名义 1M 不默认采信,仅作官方 Max 档可选) |
maxConcurrent | 2 | 并发推理上界(1..2) |
credentialPath | 空 = ~/.zcode/v2/config.json | ZCode 配置路径 |
switchPath | ~/.dsh/zcode-dispatch.switch.json | 冻结开关真值文件(缺文件/损坏 = 开启) |
ledgerPath | ~/.dsh/zcode-runs.jsonl | 额度台账(追加写) |
enabledModelIds | [] | 模型显隐勾选(设置面板写入);空 = 全部显示,非空 = 只显示列出的 id |
contextBudgets | {} | 上下文预算(T22,面板写入):模型 id → 官方 Max 档值(1000000);缺省 = 200K |
modelOverrides | {} | 无官方数据模型的开关(T22,面板写入):{reasoning?, image?};官方数据锁定的模型忽略此项 |
环境变量(覆盖默认值):
| 变量 | 作用 |
|---|---|
ZCODE_CONNECT_SWITCH_PATH | 冻结开关路径 |
ZCODE_CONNECT_LEDGER_PATH | 台账路径 |
ZCODE_CONNECT_MODULES_ROOT | 宿主 LLM 栈的 node_modules 根 |
ZCODE_CONNECT_DSH_RESOURCES | DSH 的 resources 目录(asar 兜底) |
配置项
| 键 | 默认 | 说明 |
|---|---|---|
appServer | false | 总开关 |
zcodeCliPath | 空 = 自动探测 | zcode.cjs 路径。ZCode 常装在非系统盘,自动探测含盘符扫描;仍找不到就显式填绝对路径 |
zcodeCliNode | node | 运行 zcode.cjs 的 node |
zcodeDataBaseDir | 空 = 用户主目录 | 读 runtime/provider/**/zcode-builtin.json 的根 |
appServerCredentialStorePath | 空 = ~/.zcode/v2/credentials.json | Start Plan token 来源 |
appServerAccountProviderId | 空 = 按 oauth:active_provider 自动选 | 注入 account:bigmodel-start-plan / account:zai-start-plan |
appServerModels | ['GLM-5.3-Flash'] | 暴露给 DSH 的模型(内置目录:GLM-5.3-Flash / GLM-5.2 / GLM-5-Turbo;不含 GLM-5.3,builtin 未给 start-plan 声明它) |
appServerReasoningLevel | max | session/setModel 的推理档(low/high/max) |
appServerToolPolicy | allow-all | ⚠️ 安全面,见下 |
appServerInjectAccount | true | 注入套餐账户(GUI 同款) |
appServerWorkspace | 空 = 用户主目录 | 会话工作目录(勿指向巨型目录树,agent 启动会扫它) |
appServerRpcTimeoutMs | 120000 | 单次 RPC 超时 |
appServerTurnTimeoutMs | 900000 | 单回合超时 |
childEnvAllow | [] | 额外透传给子进程的 env 名(默认只放行系统基础变量与 ZCODE_*) |