Chuyển đến nội dung chính

dsh-community-fixes

Đã xác minh

dsh-community-fixes · v0.1.1 · MIT

One install for the community's verified DeepSeek Harness fixes: a bundle that mounts every guard and patch in a single profile line, plus a read-only projection-cache footprint report.

Cài đặt

dsh plugin add dsh-community-fixes

Xác nhận layer đã áp bằng dsh --profile default --dump-config — xem hướng dẫn cài plugin.

Mã nguồn

Thẻ

Tác giả

Readme

dsh-community-fixes

一次安装,装齐社区已验证的 DeepSeek Harness 修复。

这是一个 bundle(打包层),不是插件:它只提供一份补丁层,把全部已验证修复挂载进 任何列出它的 dsh profile。把一个包名加进 dsh.profile.bundles,替代逐个手工 安装与挂载。

English: README.md

完整的「症状 → 根因(含 file:line)→ 绕过」参考: dsh-troubleshooting。

它挂载什么

修复 关掉的症状 独立包
Connection RPC 插件的 connection.rpc.handle() 通道对浏览器返回 HTTP 405 —— register() 在一个未注入 webServer 的上下文上读取 owner.webServer。 dsh-connection-rpc-fix
Preset guard 升级后「新建会话」没反应:agent-presets.default 指向已改名的旧 id,或用户预设仍在用被版本改名的插件配置字段(0.1.5-rc.1 的 persona text → prefix)。 dsh-preset-guard
Fork inbox guard 分叉出的会话一开始就持有父会话已排队但未投递的提示词,并在子会话第一个回合执行它们。 dsh-plugin-fork-inbox-guard
投影缓存报告 投影缓存把每个会话的首条用户消息整条存进 titleInput 行,而 fallback 标题只读前 40 字节;并且日志消失后它从不回收记录。这一行在启动时报告可回收字节,不写任何东西。 dsh-session-check(行 dsh-session-check/diag)

每个修复在「本来就没问题」时都是空操作,所以长期挂着是安全的。

安装

dsh plugin --profile <你的 profile> add dsh-community-fixes

然后把该 bundle 加进这个 profile 的 dsh.profile.bundles (~/.dsh/profiles/<你的 profile>/package.json):

"dsh": {
  "profile": {
    "bundles": [
      "@deepseek-ai/dsh-base",
      "@deepseek-ai/dsh-web-app",
      "dsh-community-fixes"
    ]
  }
}

这就是全部安装步骤 —— 所有修复一共两处改动,而不是每个修复两处。

关掉其中某一个

profile 自己的补丁层在所有 bundle 层之后应用,所以在 ~/.dsh/profiles/<你的 profile>/cordis.patch.yml 里可以把本 bundle 插入的任何 行单独禁用:

- id: fork-inbox-guard
  disabled: true

行 id:preset-guard、fork-inbox-guard、projcache-diag(插入行),以及 connection(打补丁的行)。

投影缓存报告

启动时一行,且只在值得说的时候出现(默认阈值 1 MiB):

projection cache: 8.0 MB reclaimable — 2 of 2 records store a titleInput text (largest 8388608 chars,
8.0 MB total), while the fallback title reads only the first 4096 bytes. Reclaim offline with:
npx -y -p dsh-session-check dsh-projcache survey  (then `apply`)

它不写任何东西。真正回收请在 harness 停止后运行:

npx -y -p dsh-session-check dsh-projcache survey   # 只报告
npx -y -p dsh-session-check dsh-projcache apply    # 回收 + 裁剪,带备份

这一行同时写 stderr 和 ctx.logger:出厂装配里没有 console 日志 exporter——Cordis 默认的 LoggerService 只装了一个内存环形缓冲,实测这一行的 logger.warn 在 dsh web 运行时完全没有输出。

不在本包内的部分

这轮工作里有两部分不是 profile 插件,因此没有挂载摩擦,也刻意不打包进来:

  • dsh-node-compat —— 在 @deepseek-ai/dsh 的 import.meta.main 入口守卫 静默失效、CLI 以 0 退出且无输出的 Node 运行时上启动 dsh。用法: npx dsh-node-compat web。
  • dsh-session-check —— 按官方校验器规则检查会话日志的 CLI,现在还带 dsh-projcache,用于离线回收投影缓存。这里只挂了它的只读诊断行;回收本身仍然是你主动执行的命令。

设计说明

bundle 不能嵌套 bundle,因此 connection 补丁在这里内联,并与独立的 dsh-connection-rpc-fix 保持逐字节一致。两个 guard 包是普通依赖,模块由本 bundle 自身的安装解析。

已端到端验证:一个 bundles 里只列出本包的 profile 能干净启动, --dump-config 显示插入的行,且两个 guard 都真实生效 —— 见 docs/verification.md。

许可证

MIT