dsh-community-fixes
其他 活跃维护

dsh-community-fixes

Robin1987China/dsh-community-fixes

将社区验证过的全部修复补丁打包成单行配置,一次性挂载所有防护与修复模块。省去逐个挑选、合并与启用的繁琐步骤,安装即用,配置集中统一,便于维护与追踪。

0
Stars 标星
0
Forks 分支
0
Watchers 关注
0
Open Issues
JavaScript
主要语言
MIT
开源协议
20 KB
仓库大小
2 个月前
最后推送
一键安装扩展 / 插件指令
dsh plugin --profile web add github:Robin1987China/dsh-community-fixes
git clone https://github.com/Robin1987China/dsh-community-fixes.git
git clone git@github.com:Robin1987China/dsh-community-fixes.git
README.md main

dsh-community-fixes

One install for the community's verified DeepSeek Harness fixes.

This is a bundle, not a plugin: it ships one patch layer that mounts every
verified fix into whatever dsh profile lists it. Adding one package name to
dsh.profile.bundles replaces installing and mounting each fix by hand.

中文说明见 README.zh.md。

Full symptom → root cause (with file:line) → workaround reference:
dsh-troubleshooting.

What it mounts

Fix Symptom it closes Standalone package
Connection RPC A plugin's connection.rpc.handle() channel answers HTTP 405 to browser callers because register() reads owner.webServer on a context that never injected it. dsh-connection-rpc-fix
Preset guard After an upgrade, New Session does nothing: a stale agent-presets.default id, or a user preset still naming a plugin config field a release renamed (persona text → prefix in 0.1.5-rc.1). dsh-preset-guard
Fork inbox guard A forked session starts holding the prompts its parent had queued but not yet delivered, and runs them as its first turn. dsh-plugin-fork-inbox-guard
Projection-cache report The projection cache stores each session's first user message whole in its titleInput row while the fallback title reads the first 40 bytes, and it never reaps a record whose session log is gone. This row reports the reclaimable bytes at start and writes nothing. dsh-session-check (row dsh-session-check/diag)

Each fix is a no-op when nothing is wrong, so leaving them mounted is safe. The
projection-cache row is read-only on purpose: reclaiming is an offline
operation (dsh-projcache apply) because the store is an in-memory table while a
process is running, so a boot-time sweeper would race the live one.

Install

dsh plugin --profile <your-profile> add dsh-community-fixes

Then add the bundle to that profile's dsh.profile.bundles
(~/.dsh/profiles/<your-profile>/package.json):

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

That is the whole install — two edits for every fix, instead of two per fix.

Turning one fix off

Your profile's own patch layer is applied after every bundle layer, so any
row this bundle inserts can be disabled there
(~/.dsh/profiles/<your-profile>/cordis.patch.yml):

- id: fork-inbox-guard
  disabled: true

Row ids: preset-guard, fork-inbox-guard, projcache-diag (inserted), and
connection (patched).

The projection-cache report

One line at start, and only when there is something worth saying (default
threshold 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`)

Nothing is written. To actually reclaim, stop the harness and run:

npx -y -p dsh-session-check dsh-projcache survey   # report only
npx -y -p dsh-session-check dsh-projcache apply    # reap + clamp, with backups

The line goes to stderr as well as ctx.logger, because the shipped
composition has no console log exporter: Cordis's default LoggerService only
installs an in-memory ring buffer, and a measured logger.warn from this row
produced no output at all in a dsh web run.

What is not included

Two parts of this work are not profile plugins, so they add no mount friction
and are deliberately not bundled here:

  • dsh-node-compat — a launcher for Node runtimes where @deepseek-ai/dsh's
    import.meta.main entry guard silently no-ops and the CLI exits 0 with no
    output. Run npx dsh-node-compat web.
  • dsh-session-check — a CLI that validates session logs the way the official
    validator does, and now also ships dsh-projcache for offline
    projection-cache maintenance. Only its read-only diagnostic row is mounted
    here; the reclaim itself stays a command you run deliberately.

Design note

A bundle cannot nest another bundle, so the connection patch is inlined here and
kept byte-identical to the standalone dsh-connection-rpc-fix. The two guard
packages are ordinary dependencies, so their modules resolve from this bundle's
own install.

Verified end to end: a profile whose bundles names only this package boots
clean, shows the inserted rows in --dump-config, and both guards actually
fire — see docs/verification.md.

License

MIT