MSSZSD3925/dsh-toolkit ↗★ 0

dsh-toolkit

DSH 小功能合集:QQ 远程驾驶、跨会话提问、界面暂停按钮、重启与重启后自动续跑、贵时段纪律按时间注入

Package
dsh-toolkit
Compatibility
Unverified
Harness peer range
*
Version
0.4.1
License
MIT
Last updated
Oct 31, 2026

Other repositories with this package name

Install

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:MSSZSD3925/dsh-toolkit

配置

cordis.patch.yml 是分组的:qq: / session_ask: / pause: / restart: / peak: 分别对应各模块的 Config。写成 schema 里有的键;写错的键不会让插件加载失败(schemastery 的 object 是非 strict 的,未知键会被原样 merge 进 config 后忽略),但那个配置也就等于没写, 排查时容易误以为生效了。三个模块的配置键风格统一为 snake_case;pause 的旧键 routePrefix / waitSeconds 仍被兼容读取。

换个机器要改的键:qq.allow_users(QQ 号白名单,空列表等于拒收所有人)、 qq.napcat_path、qq.dsh_exe、restart.*_path。

本机真值放本地覆盖文件

仓库是公开的,cordis.patch.yml 里的默认值保持中性:qq.allow_users 是空列表(谁都进不来)、 qq.napcat_path 与 qq.dsh_exe 是空串、restart.*_path 不写(走 $DSH_HOME 下的默认路径)。 个人的 QQ 号与机器路径写在 ${DSH_HOME:-~/.dsh}/dsh-toolkit.local.json,插件启动时深合并覆盖模板:

{
  "qq": { "allow_users": [392593439], "napcat_path": "D:/…", "dsh_exe": "D:/…" },
  "restart": { "log_path": "C:/Users/…/dsh-restart.log",
               "request_path": "C:/Users/…/dsh-restart-request.json",
               "resume_path": "C:/Users/…/dsh-toolkit-resume.json" }
}

只写要覆盖的键,数组与标量直接替换。文件不存在或 JSON 坏了只告警、不影响启动; 启动日志出现 [dsh-toolkit] 本地配置已合并:… 就说明生效了。

这样 git checkout/reset/pull 冲掉 cordis.patch.yml 也不会把 QQ 白名单和路径一起 冲成占位符——2026-10-30 23:46 的一次 reset 就因此让重启静默失效、QQ 全部失联。

从终端启动 DSH 用 _tools/start-dsh.cmd:它会清掉 ELECTRON_RUN_AS_NODE (否则 exe 被当 Node 跑、秒退),再让计划任务 DSH Start 拉起(shell 起的进程会随 会话结束被回收;本机 schtasks.exe 被安全策略拦,脚本里用的是 cmdlet)。

pause 段的键:pause.route_prefix(默认 /dsh-pause)、pause.wait_seconds (没人管时多少秒自动继续,0 表示一直等)。

与配置有关的键

除 enable/ws_url/allow_users 这些必须项外,上面功能对应: approval_remote、approval_timeout_secs、questions_remote、 question_timeout_secs、progress_secs、link_proxy_port、link_public_host。 cordis.patch.yml 里没写的键走 schema 默认值;多写一个不存在的键会让插件加载失败。