Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7894e87
fix(claude): stop force-exiting the SessionStart hook
Sentryea Nov 17, 2026
4ae6dcc
test(claude): pin the real SessionStart entry's graceful-exit contrac…
Nov 17, 2026
58f25be
fix(dsh): read the config hook's fiber argument instead of `this` (#7…
resec Nov 18, 2026
5401431
test(dsh): drive the config hook with the fiber argument
resec Nov 18, 2026
58f21e8
test: finish the (fiber, next) binding alignment the previous commit …
Nov 18, 2026
f43ac93
fix(dsh): alarm when the host-plane compaction-basic override is gone…
resec Nov 18, 2026
d98c6a6
fix(dsh): keep HostPlaneEntry internal (unused-exports gate)
resec Nov 18, 2026
359b1c4
fix(dsh): size each llm/stream dispatch against its own model and awa…
xiaobaifly7 Nov 17, 2026
89a3c2f
fix(dsh): replace the fail-closed preset gate with a post-load reconc…
resec Nov 18, 2026
9954dab
fix(dsh): keep ReconcileEntry and LoaderFace internal (unused-exports…
resec Nov 18, 2026
aa780f0
docs(dsh): the gate entry no longer bricks when disabled (#7111)
Nov 18, 2026
d590876
fix: bound cold Codex catalog request waits
xiaoyanzi191 Nov 16, 2026
fced2ba
test: read catalog deadline results from settled promises
xiaoyanzi191 Nov 16, 2026
4d77710
refactor(catalog): name the cold/warm deadline defaults
Nov 16, 2026
ef09e4c
docs(catalog): explain why late-response cleanup swallows errors
Nov 16, 2026
3799e83
fix: refresh resident accounting after idle spills
xiaoyanzi191 Nov 16, 2026
4a6034b
fix: retain pre-spill weight when recording evictions
xiaoyanzi191 Nov 16, 2026
0ec6ac6
test: assert cached weight drops after content-store spill
xiaoyanzi191 Nov 16, 2026
baef3c7
fix(opencode-v2): remove permission:allow so ACP tools can be allowli…
MorningStar0709 Nov 15, 2026
8b0e39d
docs(architecture): list src/responses-system-sections.ts in referenc…
MorningStar0709 Nov 16, 2026
c7ec68a
fix(architecture): dedupe responses-system-sections.ts entry after ci…
Nov 16, 2026
3f2b2a1
fix: guard repeated external summary failures
Nov 16, 2026
42d73d8
fix: recognize pi-web-access 0.46 shared proxy marker and keep inline…
sx4im Nov 15, 2026
9d31c80
fix: route inline-origin requests in-process even with a pi-web-acces…
sx4im Nov 16, 2026
4c482bd
fix(server): exclude the foreign protocol's conversation field from t…
sx4im Nov 15, 2026
0660c44
fix(server): thread the lane protocol through the #554 side-request g…
Nov 15, 2026
49c63bd
test: move the #6828 dual-shape guard regression to the side-lane sui…
Nov 15, 2026
6455cf8
fix: exclude model-hidden DSH fields from the measured body (#6844)
sx4im Nov 15, 2026
32d7ae5
refactor: re-arrange the #6844 comment that split the #554 paragraph
Nov 15, 2026
8220c62
fix: name the field dominating the other bucket in measured-doom 413s…
Nov 15, 2026
d452783
test: e2e both-ways fuse regression for #6844
Nov 15, 2026
be78906
fix: take an advisor reply's context from its last call, not the summ…
MohammadErfan-Jabbari Nov 16, 2026
bf4a236
test(dsh): pass the entry name as the fiber arg the #7115 listener re…
Nov 18, 2026
49a2cec
refactor: drop the dead MODEL_HIDDEN_BODY_KEYS const superseded by is…
Nov 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 16 additions & 9 deletions docs/clients.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,13 @@ Two lanes, same plugin (#941):
registers a cordis `internal/config` overlay (vendored from
deshark42/dsh-compaction-basic-disable, MIT) that marks the preset's
`compaction-basic` and `command-compact` rows `disabled: true` while
bili owns the lane, and the preset gate rows in the bundle patch make
each Web preset wait for that overlay's service before it can register.
Native
bili owns the lane. The four Web presets used to WAIT for that overlay's
service through an entry-level `inject`, which is fail-closed (no
optional dependency, no timeout, no fallback): a missing gate service
left them pending forever and bricked session creation while the host
still booted. Since #7111 they no longer wait — a preset mounted before
the gate entry activates is re-submitted once it does, so losing the gate
service costs the overlay, never the session. Native
auto-compaction is OFF in these profiles too (and `/compact` is
unavailable there — that is EXPECTED, not a bug (#4002): bili owns
compression on the lane, so the preset's compact command and its
Expand All @@ -141,10 +145,9 @@ Two lanes, same plugin (#941):
ACP compression is unaffected. Since #4147 the overlay matches
STRUCTURALLY — any entry whose resolved `config.plugins` nests
`compaction-basic`/`command-compact` rows gets them disabled, custom
and profile-local presets exactly like the factory ones (the four
gate-row ids in `dsh.bundle.patch.yml` are ordering insurance for the
factory roster, not the coverage boundary — a profile shipping other
preset ids is covered by the structural walk). The one-time `[dsh-client]`
and profile-local presets exactly like the factory ones (a profile
shipping other preset ids is covered by the structural walk; there is no
id list to keep in sync since #7111). The one-time `[dsh-client]`
boot note names the actual entries the overlay rewrote (#3962), so a
patch-row miss on a renamed roster is visible without reading the host
loader log. The overlay rides an
Expand All @@ -171,8 +174,12 @@ Two lanes, same plugin (#941):
separate always-on `bili-compaction-gate` entry: disabling or
kill-switching (`BILLION_CONTEXT_PLUGIN=0`) `bili-native` hands the
lane back to STOCK dsh behavior — presets boot normally and native
auto-compaction returns; compression is simply off. Do NOT disable
`bili-compaction-gate` itself — that re-creates the brick. To fully
auto-compaction returns; compression is simply off. Do NOT disable
`bili-compaction-gate` itself: since #7111 that no longer bricks session
creation (the presets are fail-open), but it leaves native compaction
ARMED while bili owns the lane — a dsh checkpoint landing outside bili's
knowledge destroys the compression substrate (the #1729 wire-level
refusal is only the backstop). To fully
uninstall, remove `billion-context` from the profile's
`dsh.profile.bundles` (and its dependency) and restart: the whole
patch layer disappears and `compaction-basic` returns to stock
Expand Down
4 changes: 2 additions & 2 deletions docs/clients.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
- **桌面应用(Electron 宿主):** 同一插件也运行在 deepseek-harness **desktop** 应用内(经其应用内插件管理器安装)。此时 bootstrap 在应用进程内拉起代理:该进程的 `process.execPath` 是 Electron 二进制而非 Node,GUI 的 PATH 又不含常规安装目录 —— `resolveNodeRuntime`(#819/#1429)先探测众所周知的安装位置(`/opt/homebrew/bin`、`/usr/local/bin`、Volta 等),再回退到以纯 Node 方式运行应用自身二进制(`ELECTRON_RUN_AS_NODE=1`,强制注入子进程 env),于是无需 PATH 里有独立 Node 也能零配置压缩;设 `BILLION_CONTEXT_NODE` 可强制指定某个 Node(优先于两者)。#1429 之前该路径在 spawn 前抛错,所有会话静默降级为直连(不压缩),只能从 bili.log 里发现。
- **自动更新保持各 profile 同步:** 刷新有两个触发器 —— 全局自更新完成后,以及**profile 自己的代理**在周期检查里发现注册表有新版本时(全局 bili 从不运行也一样刷新,#1196 —— 插件市场安装的用户往往根本没有全局安装)。两种触发器都扫描 `~/.dsh/profiles/*/package.json`,把注册表钉住的 `billion-context` 依赖刷新到目标版本(全局触发器刷到新全局版本,自触发刷到注册表最新),统一经 dsh 自己的 `plugin add` 通道,绝不在位覆盖 —— 加载的插件与代理从此不再漂移(#953);钉在本地源的 profile 不动。刷新是尽力而为,失败下个周期重试,绝不会让代理或更新本身失败。
- **已报告:Profile 安装下部分传输零代理流量(#1158,调查中):** dsh `llm-pi-ai` 层的部分传输服务会话**从未有任何模型请求到达代理**(日志无 `processTurn`,调用 bili 工具返回 404 "no model request has arrived"),而同宿主的其他 provider 正常。根因仍在用运行时证据定性 —— 候选:传输层 fetch 形态(SDK 注入 fetch / 非全局 dispatcher)或宿主侧归属缺口导致流量未被 takeover gate 认领。检测:此类情况会打一次性 `[plugin] NO MODEL REQUESTS seen for conversation …` 告警,dsh 插件还会把归属 gate 放行的每个端点各记一条日志(每进程一次)。期间可靠规避:改用 `bili dsh` 启动 —— 启动器的 settings overlay 会把那些 provider 的 `baseURL` 重写为 `/bili/` URL,无论传输层使用哪种 fetch、归属状态如何,流量都必然过代理。
- **Web profile 压缩(#1772,#3354 解决):** 当 profile 的 bundles 含 `@deepseek-ai/dsh-web-app` 时,真正运行的 `compaction-basic` 实例位于 agent preset(`preset-standard.config.plugins`)内部 —— dsh 的 patch 引擎只按 id 索引顶层条目与真 group(`group: true` 且 config 为数组)的子项,preset 内的嵌套行任何 patch 层都无法**按 id 直寻**。于是 bundle 里的 `auto: false` 落在 web-app 已禁用的宿主平面行上、什么都没改。#3354 起 bili 在**加载期**补上这一环:一个**常驻**的 bundle 条目 `bili-compaction-gate`(与 `bili-native` 并列的独立 cordis 条目,由同一组 patch 层挂载,因此 `bili-native` 被禁用或 kill-switch 时它仍然存活,#3662)注册一个 cordis `internal/config` overlay(移植自 deshark42/dsh-compaction-basic-disable,MIT),在 bili 持有该泳道期间把 preset 里的 `compaction-basic` 与 `command-compact` 行标记为 `disabled: true`;#4147 起该匹配是**结构化**的 —— 任何 entry 的 `config.plugins` 里嵌套了这两个包的行都会被禁用,自定义/本地 preset 与官方 preset 一视同仁(`dsh.bundle.patch.yml` 里的四个门控 id 只是对官方 roster 的顺序保险,不是覆盖边界);bundle patch 里的 preset 门控行让每个 Web preset 在注册前等待该 overlay 的服务。这些 profile 里原生自动压缩同样关闭(且 `/compact` 在那里不可用 —— 这是**预期行为而非 bug**(#4002):该泳道的压缩由 bili 接管,preset 的 compact 命令与自动压缩被有意一并撤下;按设计**没有**重新打开的开关(#3651/#3666),见 configuration.md);ACP 压缩不受影响。启动的一次性 `[dsh-client]` 日志会列出 overlay 实际改写过的 entry(#3962),patch 行落空(如 roster 改名)无需翻宿主 loader 日志即可见。overlay 依赖 dsh 的内部钩子、对版本敏感 —— 若在新/旧 dsh 构建上仍见到 dsh 压缩 checkpoint 落地,回退到 #2474 配方:profile 层 patch(你 profile 自己的 `cordis.patch.yml`,在所有 bundle 之后生效)用同 id + **完整快照** `config` 整体覆盖 preset-standard —— 从 `dsh --profile <name> --dump-config` 抄下完整的 preset config,在其 `compaction-basic` 行下加 `config.auto: false`,把结果追加进 `cordis.patch.yml`。Config 替换是**整体语义**(片段会静默丢掉一切未重述的键 —— 不只是其他插件,连 preset 自己的 `id`/`order` 身份也会丢,可能使 roster 无法识别该 preset);`- insert:` 同 id 则是在末尾追加一条死行而非合并。dsh 升级 preset 后快照冻结 roster、需重抄一次。此类 profile 启动时插件打一条一次性 `[dsh-client]` 日志,说明两条路径。
- **禁用与移除插件的区别(#3662):** #3662 之前,禁用 `bili-native`(dsh 插件管理器,或任何 patch 层里写 `disabled: true`)会把门控服务的**唯一**提供方一并移除,而 preset 行仍在等它 —— 四个 Web preset 永久 pending,新建/恢复会话全部报 `Unknown agent preset: standard`。现在该服务住在独立的常驻条目 `bili-compaction-gate` 里:禁用或 kill-switch(`BILLION_CONTEXT_PLUGIN=0`)`bili-native` 只是把泳道交还 dsh **原生行为** —— preset 正常注册、原生自动压缩恢复,bili 压缩则完全关闭。请勿禁用 `bili-compaction-gate` 本身 —— 那会重新造成「砖」。要彻底卸载:从 profile 的 `dsh.profile.bundles`(及其依赖)里移除 `billion-context` 后重启 —— 整个 patch 层消失,`compaction-basic` 回到原生默认 `auto: true`。若卡在 #3662 之前的版本且插件已被禁用:升级即自愈(patch 层按 bundles 里列出的包装载,与 `bili-native` 的启用状态无关);手动解砖是在 HOME 层 patch `$DSH_HOME/cordis.patch.yml`(`DSH_HOME` 未设时为 `~/.dsh/cordis.patch.yml`)追加四行 `- id: preset-standard` / `preset-ptc` / `preset-minimal` / `preset-cordis`,各配 `inject: null` —— 顶层键为整体替换,清掉 pending 锁。
- **Web profile 压缩(#1772,#3354 解决):** 当 profile 的 bundles 含 `@deepseek-ai/dsh-web-app` 时,真正运行的 `compaction-basic` 实例位于 agent preset(`preset-standard.config.plugins`)内部 —— dsh 的 patch 引擎只按 id 索引顶层条目与真 group(`group: true` 且 config 为数组)的子项,preset 内的嵌套行任何 patch 层都无法**按 id 直寻**。于是 bundle 里的 `auto: false` 落在 web-app 已禁用的宿主平面行上、什么都没改。#3354 起 bili 在**加载期**补上这一环:一个**常驻**的 bundle 条目 `bili-compaction-gate`(与 `bili-native` 并列的独立 cordis 条目,由同一组 patch 层挂载,因此 `bili-native` 被禁用或 kill-switch 时它仍然存活,#3662)注册一个 cordis `internal/config` overlay(移植自 deshark42/dsh-compaction-basic-disable,MIT),在 bili 持有该泳道期间把 preset 里的 `compaction-basic` 与 `command-compact` 行标记为 `disabled: true`;#4147 起该匹配是**结构化**的 —— 任何 entry 的 `config.plugins` 里嵌套了这两个包的行都会被禁用,自定义/本地 preset 与官方 preset 一视同仁(#7111 起不再有需要同步的门控 id 列表);preset 不再等待该 overlay 的服务 —— 条目级 `inject` 是 fail-closed(无可选依赖、无超时、无降级),服务一旦缺席四个 preset 就永久 pending、会话无法创建而宿主照常启动;现在改由 gate 条目在激活后对已挂载的 preset 重新提交配置,丢失该服务只损失 overlay,不损失会话。这些 profile 里原生自动压缩同样关闭(且 `/compact` 在那里不可用 —— 这是**预期行为而非 bug**(#4002):该泳道的压缩由 bili 接管,preset 的 compact 命令与自动压缩被有意一并撤下;按设计**没有**重新打开的开关(#3651/#3666),见 configuration.md);ACP 压缩不受影响。启动的一次性 `[dsh-client]` 日志会列出 overlay 实际改写过的 entry(#3962),patch 行落空(如 roster 改名)无需翻宿主 loader 日志即可见。overlay 依赖 dsh 的内部钩子、对版本敏感 —— 若在新/旧 dsh 构建上仍见到 dsh 压缩 checkpoint 落地,回退到 #2474 配方:profile 层 patch(你 profile 自己的 `cordis.patch.yml`,在所有 bundle 之后生效)用同 id + **完整快照** `config` 整体覆盖 preset-standard —— 从 `dsh --profile <name> --dump-config` 抄下完整的 preset config,在其 `compaction-basic` 行下加 `config.auto: false`,把结果追加进 `cordis.patch.yml`。Config 替换是**整体语义**(片段会静默丢掉一切未重述的键 —— 不只是其他插件,连 preset 自己的 `id`/`order` 身份也会丢,可能使 roster 无法识别该 preset);`- insert:` 同 id 则是在末尾追加一条死行而非合并。dsh 升级 preset 后快照冻结 roster、需重抄一次。此类 profile 启动时插件打一条一次性 `[dsh-client]` 日志,说明两条路径。
- **禁用与移除插件的区别(#3662):** #3662 之前,禁用 `bili-native`(dsh 插件管理器,或任何 patch 层里写 `disabled: true`)会把门控服务的**唯一**提供方一并移除,而 preset 行仍在等它 —— 四个 Web preset 永久 pending,新建/恢复会话全部报 `Unknown agent preset: standard`。现在该服务住在独立的常驻条目 `bili-compaction-gate` 里:禁用或 kill-switch(`BILLION_CONTEXT_PLUGIN=0`)`bili-native` 只是把泳道交还 dsh **原生行为** —— preset 正常注册、原生自动压缩恢复,bili 压缩则完全关闭。请勿禁用 `bili-compaction-gate` 本身:#7111 起禁用它不再造成「砖」(preset 已 fail-open),但会让原生压缩在 bili 持有泳道期间保持**激活** —— dsh 的 checkpoint 落在 bili 不知情处会摧毁压缩基底(#1729 的 wire 级拒绝只是兜底)。要彻底卸载:从 profile 的 `dsh.profile.bundles`(及其依赖)里移除 `billion-context` 后重启 —— 整个 patch 层消失,`compaction-basic` 回到原生默认 `auto: true`。若卡在 #3662 之前的版本且插件已被禁用:升级即自愈(patch 层按 bundles 里列出的包装载,与 `bili-native` 的启用状态无关);手动解砖是在 HOME 层 patch `$DSH_HOME/cordis.patch.yml`(`DSH_HOME` 未设时为 `~/.dsh/cordis.patch.yml`)追加四行 `- id: preset-standard` / `preset-ptc` / `preset-minimal` / `preset-cordis`,各配 `inject: null` —— 顶层键为整体替换,清掉 pending 锁。
- **全局副本在加载期抢占 profile 副本(#2891):** dsh 解析 `dsh.profile.bundles` 里的裸包名 `billion-context` 时是 installation-anchor-first —— 先在自己的安装树(全局 npm root)里找,再找 profile 的 `node_modules`。因此只要机器上存在一份全局 `billion-context`,dsh 就加载**全局那份**,profile 里装的被静默忽略 —— 不崩溃、无日志。两者版本不一致时,实际运行的可能与 profile 声明的不同(例如 #1590 之前的全局没有 `dsh.client` web 面,设置页菜单凭空消失)。这一事实默认情况下处处不可见:`bili doctor` 现在会按 profile 逐一标记任何版本不一致的全局/本地对(#2891);用 `dsh --profile <name> --dump-config`(读该 bundle 的 `name:` 行)可核对 dsh 实际加载了哪份。

`bili dsh` 启动下插件**附看**(attach)启动器的代理(不二次拉起)。裸上游 URL 与 spawn 模式一样重写为 `<proxy>/bili/<url>`(回环代理目标永不被代理 env 拦截,等于直接绕开 MITM);已经路由的 `/bili/` 前缀请求原样放行、只盖章。已知局限:手动 `/compact` 没有 dsh 侧事件钩子,其边界交给内核的自然 ingest diff(自动压缩现已处处关闭 —— 宿主平面经 bundle patch,web profile 的 preset 经 #3354 加载期 overlay;见上方 Web profile 说明)。
Expand Down
39 changes: 16 additions & 23 deletions dsh.bundle.patch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,23 @@
# #1772/#2474/#3354: the `auto: false` below targets the HOST-PLANE
# compaction-basic row. In profiles bundling @deepseek-ai/dsh-web-app that row
# is disabled and the running instance lives inside the agent presets, whose
# nested rows no patch layer can address by id — the preset gate rows below
# make each Web preset wait for the load-time overlay the bili-compaction-gate
# entry registers (vendored from deshark42/dsh-compaction-basic-disable, MIT,
# #3354; see src/agent/dsh-compaction-disable.ts). A profile-level full-snapshot
# override of preset-standard (#2474) remains the fallback for dsh builds
# whose internal 'internal/config' hook moved.
# nested rows no patch layer can address by id. The bili-compaction-gate entry
# rewrites those rows through the load-time overlay (vendored from
# deshark42/dsh-compaction-basic-disable, MIT, #3354; see
# src/agent/dsh-compaction-disable.ts) and, since #7111, also reconciles the
# presets that were already mounted before it activated. A profile-level
# full-snapshot override of preset-standard (#2474) remains the fallback for
# dsh builds whose internal 'internal/config' hook moved.
# #7111: the four preset rows are deliberately NOT gated on the gate entry any
# more. An entry-level inject is fail-closed — cordis has no optional
# dependency, no timeout and no fallback — so any missing gate service left all
# four presets pending forever (agent-presets/not-found on session create)
# while the host still booted and served its UI. Losing the gate service now
# costs the overlay, not the session.
# #3662: the gate lives in its OWN always-on entry, not in bili-native —
# disabling or kill-switching bili-native must leave the gate service alive so
# the presets fall back to STOCK dsh compaction instead of pending forever
# (the old wiring bricked session creation on exactly that path). Do NOT
# disable the bili-compaction-gate entry itself: it carries the service the
# presets wait on; to uninstall, remove billion-context from
# dsh.profile.bundles instead.
# disabling or kill-switching bili-native must leave the gate service and the
# overlay alive so the presets fall back to STOCK dsh compaction. To uninstall,
# remove billion-context from dsh.profile.bundles.
- insert:
- id: bili-native
name: billion-context
Expand All @@ -26,17 +30,6 @@
- id: compaction-basic
config:
auto: false
# #3354: keep in sync with writeDshAcpPatch in src/launcher.ts — entry inject
# lists are REPLACED by patches, not concatenated; if a future dsh ships its
# own inject list on these entries, merge manually in BOTH layers.
- id: preset-standard
inject: [biliBasicCompactionPolicy]
- id: preset-ptc
inject: [biliBasicCompactionPolicy]
- id: preset-minimal
inject: [biliBasicCompactionPolicy]
- id: preset-cordis
inject: [biliBasicCompactionPolicy]
# #2605: DSH's default retry whitelist omits MALFORMED_RESPONSE, so one
# sampling flake that breaks a tool-call argument JSON kills the whole turn
# unretried. A patch replaces the targeted row's WHOLE config (no deep
Expand Down
Loading
Loading