Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b85e797
feat(dsh): select models for native compaction with safe handoff
bluesmilery Nov 10, 2026
a0ece87
fix(dsh): meter summary tool schemas in host tokens
bluesmilery Nov 10, 2026
cd7b492
test(dsh): cover partial summary failure and concurrent ownership
bluesmilery Nov 11, 2026
c07914f
fix(dsh): preserve complementary facts across summary merges
bluesmilery Nov 11, 2026
5f82651
fix(dsh): keep model routing transparent to native compaction
bluesmilery Nov 11, 2026
c4a91e9
test(dsh): register isolated parity proxy workers for CI
bluesmilery Nov 11, 2026
9368f61
Merge remote-tracking branch 'origin/master' into wt-pr6123-conflict
Nov 12, 2026
08bf768
test: mask wall-clock timestamps in the dsh compaction parity test
Nov 12, 2026
d98db52
merge: sync origin/master into PR #6123 branch
Nov 14, 2026
88dea57
merge: sync origin/master (f648217cb8) into PR #6123 branch
Nov 15, 2026
ee64ad4
Merge remote-tracking branch 'origin/master' into wt-pr6123-conflict-r3
Nov 16, 2026
f9225e0
Merge remote-tracking branch 'origin/master' into 2026-11-10_dsh-mode…
Nov 18, 2026
7bb2966
docs: regenerate docs/configuration.ja.md for dsh.nativeCompactionMod…
Nov 18, 2026
15efcee
Merge remote-tracking branch 'origin/master' into 2026-11-10_dsh-mode…
Nov 19, 2026
d313e83
Merge remote-tracking branch 'origin/master' into 2026-11-10_dsh-mode…
Nov 23, 2026
d48bd5d
Merge remote-tracking branch 'origin/master' into pr-6123
Nov 24, 2026
1aae293
Merge remote-tracking branch 'origin/master' into pr-6123
Dec 1, 2026
fb4e82c
Keep selective compaction intact for runtime presets and scoped auxil…
bluesmilery Dec 2, 2026
8ecd662
Merge remote-tracking branch 'origin/master' into pr-6123
Dec 2, 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
2 changes: 2 additions & 0 deletions docs/README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 文档导航

- [DSH 按模型使用原生压缩](dsh-native-compaction.zh-CN.md):配置、同会话切换、兼容性与补丁维护。[English](dsh-native-compaction.md)

**billion-context** 的全部系统文档都集中在这个目录。仓库根目录只保留四个核心入口文件——`README.md`、`README.zh-CN.md`、`AGENTS.md`、`CHANGELOG.md`——外加受认可的社区 README 译本(`README.<locale>.md`,如 `README.ja.md`,批准于 2026-11-09 / #6000)。原根路径保留单行重定向占位(记账见 [lifecycle §5](lifecycle.md#5-卫生记录))。

> **全量目录:** [index.zh-CN.md](index.zh-CN.md) / [index.md](index.md) —— 每篇文档一行说明。本页是目录落地页:东西在哪、什么规则让它们保持新鲜。
Expand Down
2 changes: 2 additions & 0 deletions docs/architecture.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Architecture

DSH's opt-in [native model policy](dsh-native-compaction.md) branches before bili's HTTP/WS transforms. Its adapter owns the preset-local native backend; host replacement generations isolate later bili folds. The kernel and provider adapters are unchanged.

> One hub for the system's architecture. This page holds the **overall diagram** and the **module ledger**; each module gets its own page (en + `.zh-CN` + `.ja`) in this directory, each with its own diagram.
> 中文: [architecture.zh-CN.md](./architecture.zh-CN.md)
> 日本語: [architecture.ja.md](./architecture.ja.md)
Expand Down
2 changes: 2 additions & 0 deletions docs/architecture.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# 架构总览

DSH 可选的[原生模型策略](dsh-native-compaction.zh-CN.md)在 bili HTTP/WS 改写前分流。适配器控制预设内的原生压缩后端,用宿主持久化替换代数隔离后续 bili 压缩状态;kernel 与供应商适配器保持原样。

> 系统架构的唯一枢纽。本页放**整体架构图**与**模块总表**;每个模块在本目录下有独立页面(中英各一份),每页配自己的图。
> English: [architecture.md](./architecture.md)
> 日本語: [architecture.ja.md](./architecture.ja.md)
Expand Down
5 changes: 4 additions & 1 deletion docs/configuration.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,10 @@
| `compat.degenerateTurn` | "error" \| "passthrough" | error | BILI_DEGENERATE_TURN | プラグインチャットパイプで退化ターンのリトライ後も利用可能な出力がゼロだった場合の終了処理(#4913):インバンドストリームエラー(デフォルト、#870)または空ターンを通常の完了として通過させる(#870 以前)。 |
| `compat.noCacheControl` | boolean | false | BILI_NO_CACHE_CONTROL | Anthropic レーンの cache_control ブレークポイントを完全にスタンプしないようにします(独自のブレークポイントポリシーを持つ上流/リレー用のエスケープハッチ)。 |
| `compat.keepResponseId` | boolean | false | ACP_KEEP_RESPONSE_ID | カーネル再構築された Responses リクエストで previous_response_id を保持します(デフォルトでは削除するため、再構築されたボディは上流が発行したことのない ID を参照しません)。 |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | セクションは認識されるが、従来のエスケープハッチは削除された(#3666、#2028 を代替):`allowDshCompaction` キーおよび `BILI_ALLOW_DSH_COMPACTION` 環境変数はもはや存在しない — dsh ネイティブコンパクションは、すべてのレーンにおいてワイヤガードによって無条件に拒否される。残存する `dsh.allowDshCompaction` の値は、一度限りの非推奨警告とともに無視される;代わりにホスト側の抑制を適用すること(#3354/#2474)。ライブキー — `dsh.authoredCompaction`、`dsh.contextTab`、`dsh.contextTabLabel` — は以下のエントリに文書化されている。 |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | セクションは認識されるが、従来のエスケープハッチは削除された(#3666、#2028 を代替):`allowDshCompaction` キーおよび `BILI_ALLOW_DSH_COMPACTION` 環境変数はもはや存在しない — ワイヤガードは管理されていないネイティブコンパクションを拒否する。明示的な `dsh.nativeCompactionModels` ルールはホストの所有権を調整し、そのワイヤレーンをバイパスする。残存する `dsh.allowDshCompaction` の値は、一度限りの非推奨警告とともに無視される;代わりにホスト側の抑制を適用すること(#3354/#2474)。ライブキー — `dsh.authoredCompaction`、`dsh.contextTab`、`dsh.contextTabLabel` — は以下のエントリに文書化されている。 |
| `dsh.nativeCompactionModels` | { provider?: string, model: string }[] | [] | — | DSH Web プリセットの選択されたモデルをネイティブコンパクションに割り当てる(#6121)。正確な provider ID は任意;model は完全一致、または末尾 * の接頭辞で一致する(例:`gpt-*`、`codex/gpt-*`)。一致しないモデルは `bili` を維持する。宿主のリスタートが必要。ネイティブ要約は `bili` をバイパスし、宿主置換の世代は後続の `bili` 状態を分離する;対応プロファイル、引き渡し上限、更新ガイドは docs/dsh-native-compaction.md を参照。 |
| `dsh.nativeCompactionModels.model` | string | required per rule | — | 各ネイティブコンパクションルールの正確なモデル ID、または末尾 * で終わる接頭辞。表示名やその他のワイルドカード形式は受け入れられない。 |
| `dsh.nativeCompactionModels.provider` | string | omitted (all providers) | — | ネイティブコンパクションのモデルルールを 1 つに制限する、任意の正確な DSH provider ID。 |
| `dsh.authoredCompaction` | boolean | true (on, #3901 flip) | BILI_DSH_AUTHORED_COMPACTION | bili は dsh コンパクションの summarize 呼び出しを、拒否する代わりに折り畳みスナップショットでローカルに回答する(#3723/#3733)。0.1.203 のドッグフッド期間が維持されたため、デフォルトで ON。`false`(または環境変数 `BILI_DSH_AUTHORED_COMPACTION=0`)を設定すると、#1729 の拒否パスが復元される。 |
| `dsh.contextTab` | boolean | true | BILI_DSH_CONTEXT_TAB | DSH トップバーの「上下文」/「Context」会話タブを登録する(#3862/#4237):`false` にすると、そのタブのみが削除される — コンプレッション、設定セクション、その他のすべてのサーフェスは引き続き動作する。非表示にしてもコンプレッションは無効にならない;台帳は設定セクション(会话 サブページ)、プラグインバンドル設定フェイス、Web UI、および `/acp` コマンド経由で引き続きアクセス可能。次のページ読み込み / dsh リスタート時に有効になる(スロット登録はページ読み込み時に発生);デフォルト `true` = 現在の動作は変更なし。 |
| `dsh.contextTabLabel` | string | unset (built-in 「上下文」/「Context」) | — | DSH トップバーの Context タブのカスタム表示名(#4237)、例:別のプラグイン(dsh-context)が「上下文」の名前を所有している場合の "压缩账本"。トリムされた空でない文字列が組み込みラベルに優先される;空白または未設定の場合は組み込みにフォールバック。ファイル専用ティア(表示設定、#2030 に従い環境変数なし)。デフォルト未設定 = 組み込みラベルは変更なし。 |
Expand Down
5 changes: 4 additions & 1 deletion docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ This index is generated from `website/config-reference/*.yaml` — edit the seed
| `compat.degenerateTurn` | "error" \| "passthrough" | error | BILI_DEGENERATE_TURN | Terminal for the plugin chat pipe when the degenerate-turn retry ALSO ends with no usable output (#4913): in-band stream error (default, #870) or the empty turn passed through as a normal completion (pre-#870). |
| `compat.noCacheControl` | boolean | false | BILI_NO_CACHE_CONTROL | Stop stamping Anthropic-lane cache_control breakpoints entirely (escape hatch for upstreams/relays with their own breakpoint policy). |
| `compat.keepResponseId` | boolean | false | ACP_KEEP_RESPONSE_ID | Preserve previous_response_id on kernel-rebuilt Responses requests (default strips it so rebuilt bodies never reference ids the upstream never issued). |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | Section recognized but its former escape hatch is gone (#3666, superseding #2028): the allowDshCompaction key and the BILI_ALLOW_DSH_COMPACTION env var no longer exist — dsh native compaction is refused unconditionally by the wire guard on every lane. Leftover dsh.allowDshCompaction values are ignored with a one-time deprecation warning; apply host-side suppression instead (#3354/#2474). The live keys — dsh.authoredCompaction, dsh.contextTab, dsh.contextTabLabel — are documented in the following entries. |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | Section recognized but its former escape hatch is gone (#3666, superseding #2028): the allowDshCompaction key and the BILI_ALLOW_DSH_COMPACTION env var no longer exist — the wire guard refuses unmanaged native compaction. Explicit dsh.nativeCompactionModels rules coordinate host ownership and bypass that wire lane. Leftover dsh.allowDshCompaction values are ignored with a one-time deprecation warning; apply host-side suppression instead (#3354/#2474). The live keys — dsh.authoredCompaction, dsh.contextTab, dsh.contextTabLabel — are documented in the following entries. |
| `dsh.nativeCompactionModels` | { provider?: string, model: string }[] | [] | — | Opt selected DSH Web-preset models into native compaction (#6121). Exact provider ID is optional; model matches exactly or by a trailing * prefix, e.g. gpt-* or codex/gpt-*. Unmatched models keep bili. Requires a host restart. Native summaries bypass bili and host replacement generations isolate later bili state; see docs/dsh-native-compaction.md for supported profiles, handoff limits and update guidance. |
| `dsh.nativeCompactionModels.model` | string | required per rule | — | Each native-compaction rule's exact model ID or prefix ending in *. Display names and other wildcard forms are not accepted. |
| `dsh.nativeCompactionModels.provider` | string | omitted (all providers) | — | Optional exact DSH provider ID restricting one native-compaction model rule. |
| `dsh.authoredCompaction` | boolean | true (on, #3901 flip) | BILI_DSH_AUTHORED_COMPACTION | bili answers dsh compaction summarize calls locally with the folded snapshot instead of refusing (#3723/#3733). ON by default since the 0.1.203 dogfood window held; false (or env BILI_DSH_AUTHORED_COMPACTION=0) restores the #1729 refusal path. |
| `dsh.contextTab` | boolean | true | BILI_DSH_CONTEXT_TAB | Registers the DSH top-bar 「上下文」/「Context」 conversation tab at all (#3862/#4237): false removes ONLY that tab — compression, the settings section and every other surface keep working. Hiding never disables compression; the ledger stays reachable via the settings section (会话 subpage), the plugin bundle config face, the Web UI and the /acp command. Takes effect on the next page load / dsh restart (slot registration happens at page load); default true = today's behavior unchanged. |
| `dsh.contextTabLabel` | string | unset (built-in 「上下文」/「Context」) | — | Custom display name for the DSH top-bar Context tab (#4237), e.g. "压缩账本" when another plugin (dsh-context) owns the name 「上下文」. Trimmed non-empty string wins over the built-in label; blank or absent falls back to the built-in. File-only tier (display preference, no env knob per #2030). Default unset = built-in label unchanged. |
Expand Down
5 changes: 4 additions & 1 deletion docs/configuration.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@
| `compat.degenerateTurn` | "error" \| "passthrough" | error | BILI_DEGENERATE_TURN | plugin chat 管道的退化回合重试后仍无可用输出时的终局(#4913):带内流错误(默认,#870)或把空回合作为正常完成放行(pre-#870)。 |
| `compat.noCacheControl` | boolean | false | BILI_NO_CACHE_CONTROL | 完全停止 Anthropic 通道的 cache_control 断点打标(面向拒收该字段或有自有断点策略的上游/中继的逃生门)。 |
| `compat.keepResponseId` | boolean | false | ACP_KEEP_RESPONSE_ID | 在内核重建的 Responses 请求上保留 previous_response_id(默认剔除,使重建请求体永不引用上游从未签发过的响应 id)。 |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | 段仍被识别,但其原逃生门已移除(#3666,取代 #2028):allowDshCompaction 键与 BILI_ALLOW_DSH_COMPACTION 环境变量已不存在——dsh 原生压缩现在在所有线路上被无条件拒绝。遗留的 dsh.allowDshCompaction 取值会被忽略(一次性弃用警告);请改用宿主侧抑制(#3354/#2474)。存活的键——dsh.authoredCompaction、dsh.contextTab、dsh.contextTabLabel——见接下来的条目。 |
| `dsh` | object | {} | BILI_ALLOW_DSH_COMPACTION | 段仍被识别,但其原逃生门已移除(#3666,取代 #2028):allowDshCompaction 键与 BILI_ALLOW_DSH_COMPACTION 环境变量已不存在——线级守卫拒绝未受管理的原生压缩。显式 dsh.nativeCompactionModels 规则协调宿主压缩归属并绕过该线路。遗留的 dsh.allowDshCompaction 取值会被忽略(一次性弃用警告);请改用宿主侧抑制(#3354/#2474)。存活的键——dsh.authoredCompaction、dsh.contextTab、dsh.contextTabLabel——见接下来的条目。 |
| `dsh.nativeCompactionModels` | { provider?: string, model: string }[] | [] | — | 指定 DSH Web 预设中的模型使用原生压缩(#6121)。可选 provider 精确匹配;model 精确匹配或使用末尾 * 表示前缀,例如 gpt-*、codex/gpt-*。未匹配模型继续使用 bili,需重启宿主生效。原生摘要绕过 bili,宿主替换代数隔离后续 bili 状态;支持范围、切换边界和更新方式见 docs/dsh-native-compaction.zh-CN.md。 |
| `dsh.nativeCompactionModels.model` | string | required per rule | — | 每条原生压缩规则的模型 ID,精确匹配或末尾 * 前缀匹配,不使用显示名或其他通配形式。 |
| `dsh.nativeCompactionModels.provider` | string | omitted (all providers) | — | 可选的 DSH 供应商 ID,精确限定该条原生压缩模型规则。 |
| `dsh.authoredCompaction` | boolean | true (on, #3901 flip) | BILI_DSH_AUTHORED_COMPACTION | bili 用折叠快照本地应答 dsh 压缩摘要请求而非拒绝(#3723/#3733)。0.1.203 狗粮窗口守住后默认开启;false(或环境变量 BILI_DSH_AUTHORED_COMPACTION=0)恢复 #1729 拒绝路径。 |
| `dsh.contextTab` | boolean | true | BILI_DSH_CONTEXT_TAB | 是否注册 DSH 顶栏「上下文」会话标签页(#3862/#4237):false 只移除该标签页——压缩、设置页一节及其余所有入口不受影响。隐藏绝不关闭压缩;账本仍可从设置页(会话子页)、插件 bundle 配置面、Web UI 与 /acp 命令查看。下次页面加载 / dsh 重启生效(槽位注册发生在页面加载时);默认 true = 现状不变。 |
| `dsh.contextTabLabel` | string | unset (built-in 「上下文」/「Context」) | — | DSH 顶栏上下文标签页的自定义显示名(#4237),例如另一插件(dsh-context)已占用「上下文」时改为"压缩账本"。去空白后的非空字符串优先于内置名;留空或缺省回退内置名。仅文件层(显示偏好,按 #2030 不设 env 开关)。默认缺省 = 内置名不变。 |
Expand Down
Loading
Loading