Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3b572b1
fix(#5959): install globalThis.fetch as a plain data property; heal e…
Nov 9, 2026
790860a
docs(#5959): rewrite BILI_RECLAIM_FETCH_PATCH entries — data-property…
Nov 9, 2026
7fd23aa
docs(#5959): move BILI_RECLAIM_FETCH_PATCH table wording into the gen…
Nov 9, 2026
7ba8caf
fix(fetch-chain): make the integrity watchdog survive non-configurabl…
Nov 9, 2026
8f6d359
docs(config): move the BILI_RECLAIM_FETCH_PATCH description into the …
Nov 9, 2026
391a7e0
chore: sync master into the #5959 branch
Nov 9, 2026
0b32253
chore: merge upstream #5959 seed fix (identical to local docs commit)
Nov 9, 2026
c8bb6ab
test(#5959): drive the integrity tick in the #4516 dead-proxy wording…
Nov 9, 2026
1e53ad3
chore: sync master into the #5959 branch; resolve fetch-chain overlap…
Nov 10, 2026
0b78bde
fix: keep a throwing getter out of the watchdog's eviction read (#595…
Nov 10, 2026
b512c3b
fix: correct the give-up retry comment in the hostile-accessor selfhe…
Nov 10, 2026
56a6e80
Merge branch 'origin/master' into 2026-11-09_fetch-data-property-watc…
Nov 12, 2026
5762c7d
merge: sync origin/master into fetch-data-property-watchdog
Nov 13, 2026
d0a9f65
Merge remote-tracking branch 'upstream/master' into 2026-11-09_fetch-…
Nov 16, 2026
8ed56be
docs(architecture): add src/responses-system-sections.ts to the modul…
Nov 16, 2026
1a4450b
Merge remote-tracking branch 'upstream/master' into HEAD
Nov 16, 2026
eed90eb
merge: sync ci-fixes into fetch-data-property-watchdog (architecture …
Nov 16, 2026
245ecb1
fix(test): recalibrate #2929 probe anchor to nudge positions {3,5,11,14}
Nov 16, 2026
073dd88
Merge remote-tracking branch 'origin/ci-fixes' into sweep-6017
Nov 16, 2026
7247410
test(#2929): make fold probe schedule-independent + hermetic wire shape
Nov 16, 2026
242c974
Merge remote-tracking branch 'origin/ci-fixes' into 2026-11-09_fetch-…
Nov 16, 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
4 changes: 2 additions & 2 deletions docs/configuration.ja.md
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@
| `BILI_SESSIONS_DIR` | string | unset (XDG state path) | — | セッションレコードの保存先(パスの再配置)。 |
| `BILI_ENCRYPTION_KEY` | string | unset | — | 暗号化された永続化ペイロード用の鍵材料(シークレット)。 |
| `BILI_TUNNEL_ALLOWED_HOSTS` | string[] (csv) | unset | — | MITM トンネルレーン用のホスト許可リスト。 |
| `BILI_RECLAIM_FETCH_PATCH` | boolean-ish | on | — | シャットダウン時にグローバル fetch パッチを回収するためのトグル。 |
| `BILI_RECLAIM_FETCH_PATCH` | boolean-ish | on | — | ネイティブモードの fetch 自己修復ガード (#1158) のトグル: `0` で従来の直接インストール (ウォッチドッグなし) を維持する。 |
| `BILI_CONFLICT_SCAN` | boolean-ish | off | — | インストールレーンの競合スキャナープローブを有効にする。 |
| `BILI_CHAIN_MAX_FUTURE_SKEW_MS` | number | (built-in) | — | 未来にずれたチェーンチェックポイントタイムスタンプの許容範囲。 |
| `BILI_CHAIN_RECENT_WINDOW_MS` | number | (built-in) | — | チェーンチェックポイント検証用の最近ウィンドウサイズ。 |
Expand Down Expand Up @@ -2087,7 +2087,7 @@ ACP ネイティブエージェント(現在は `pi` 拡張機能)は、プ
| `BILI_PLUGIN_BYPASS` | x-bili-plugin-bypass パススルー判定のオペレーターオーバーライド (#6220)、リクエストごとに読み取り (再起動不要)。3 状態: **未設定**/`auto` = 現状 (受信ヘッダーがリクエストごとに判定); **`1`/`on`/`true`** = 強制バイパス (すべてのリクエストをそのまま転送 — ツール注入なし、nudge なし、セッションバインドなし); **`0`/`off`/`false`** = 常にバイパスしない (受信 x-bili-plugin-bypass ヘッダーをすべて無視); 識別できない値は `auto` として扱われます。#6220 の owner 承認により環境変数のみです — 設定ファイルへのミラーはありません。 |
| `BILI_PREFLIGHT_HOLD_MS` | 長時間のプリフライト圧縮が keep-alive バイトでクライアントを保持し始めるまでの猶予期間 (ms) (デフォルト `30000`; #568 を参照)。 |
| `BILI_STREAM_KEEPALIVE_MS` | ストリーミングフェーズのクライアント保持 (#1647): SSE レスポンスがこのミリ秒数にわたってクライアントにゼロバイトしか書き込んでいない場合、bili は 1 行の SSE コメント行 (`: bili-keepalive`、仕様レベルの no-op) を発行し、クライアントの undici `bodyTimeout` (デフォルト 300秒; Node 組み込み fetch はリクエストごとにオーバーライドできません) が、上流がリライター/ストリップパイプを飲み込むピンポンで応答している長時間プリフィルを殺すのを防ぎます。デフォルトは `15000`; `0` で無効にします。`BILI_PREFLIGHT_HOLD_MS` の兄弟で、後者は圧縮プリフライトの沈黙をカバーし、これはストリーミング中の上流起因の沈黙をカバーします。 |
| `BILI_RECLAIM_FETCH_PATCH` | `0` に設定すると、ネイティブモードの fetch 自己修復リアームを無効にします (#1158)。デフォルトでは、ネイティブ fetch インターセプトは `globalThis.fetch` をガード付きアクセサとしてインストールするため、`globalThis.fetch` を再インストールするサードパーティのパッチ (例: dsh-http-proxy の設定リフレッシュが凍結された pre-bili `originalFetch` を書き込む場合) は下流として再チェーンされ、モデルトラフィックは bili を通ってルーティングされ続けます。`0` の場合、従来の直接インストールが残ります: サードパーティのリアームが勝つため、そのセッションで bili はモデルトラフィックを見なくなります。**送信メモ:** ガードが保持されている間、クレームされたモデルトラフィックは bili プロキシ自身によってディスパッチされます — サードパーティチェーンの送信 (例: dsh-http-proxy で設定された SOCKS5 プロキシ; bili 自身のアップストリームプロキシングは HTTP プロキシのみサポート) に乗らなくなります。サードパーティの送信を復元する必要がある場合は、`0` を設定し、bili レベルで送信を設定してください (`"proxy": "http://…"` )。**共存メモ (#3528):** デフォルトのアクセサ形式は、`globalThis.fetch` がプレーンな書き込み可能データプロパティであることを要求するサードパーティコンポーネントと互換性がありません — 彼らはプロパティディスクリプタを読み取り、`value` を見つけず、ロード時に fetch 観測者を中断します (報告済み: DSH Desktop の Developer Tools / NodeJS 診断プラグイン、`@deepseek-ai/dsh-experimental-inspector`)。そのような観測者が従来の直接インストール経由でロードされるように `0` を設定してください (その後ホストを完全に再起動); 上記のトレードオフを受け入れます。#3528 を参照してください。 |
| `BILI_RECLAIM_FETCH_PATCH` | `0` に設定すると、ネイティブモードの fetch 自己修復ガード (#1158、#5959) を無効にします。デフォルトでは、ネイティブ fetch インターセプトは `globalThis.fetch` を**プレーンな書き込み可能データプロパティ**としてインストールします — ディスクリプタに `value` を持つことを要求するサードパーティ製コンポーネントと互換性があります (以前はガード付きアクセサであり、そのようなコンポーネントはロード時に中止していました; 報告済み: DSH Desktop の NodeJS 診断プラグイン `@deepseek-ai/dsh-experimental-inspector`、#3528、本変更により解決) — さらにディスクリプタを毎秒再読み込みする**整合性ウォッチドッグ**を備えます。あらゆる追い出しの形態 — サードパーティの再代入 (例: dsh-http-proxy の設定リフレッシュが凍結された pre-bili `originalFetch` を書き込む)、`DELETE` や `REDEFINE` (#2791)、敵意あるアクセサ — は同じ「下流として採用」ポリシーで 1 tick 以内に修復されるため、モデルトラフィックは bili を通ってルーティングされ続けます。スロットがすべての修復を拒否した場合 (書き込み不可、または書き込みを飲み込むアクセサ)、ガードは 3 回の連続した無効な修復後に諦めてエラーを記録し、スロットが再び利用可能になると自動的に再武装します。`0` の場合、従来の直接インストールが残りウォッチドッグは動きません: サードパーティの再武装が勝ち、そのセッションで bili はモデルトラフィックを見なくなります。**送信メモ:** ガードが保持されている間、クレームされたモデルトラフィックは bili プロキシ自身によってディスパッチされます — サードパーティチェーンの送信 (例: dsh-http-proxy で設定された SOCKS5 プロキシ; bili 自身のアップストリームプロキシングは HTTP プロキシのみサポート) に乗らなくなります。サードパーティの送信を復元する必要がある場合は、`0` を設定し、bili レベルで送信を設定してください (`"proxy": "http://…"` )。#1158、#2791、#3528、#5959 を参照してください。 |
| `BILI_RESIGN` | `0` に設定すると、#1884 の再署名アームをエンドツーエンドで展開解除します (修正前の動作: 署名されたボディは通常の書き換えパスに乗って上流で 401 で失敗します)。デフォルト: アーム済み — 再署名可能な (解決可能なクレデンシャルを持つ SDK-HMAC-SHA256) 署名されたモデルリクエストは、すべての送信ボディが再署名されてトンネルされます; このアームは dsh での設定を必要としません (クレデンシャルサービス経由のアカウントプール検出)。再署名できない (解決可能なクレデンシャルがない) BUILT-IN スキームのリクエストは、実行可能なメッセージとともにローカルで 403 で拒否されます — その修正 (クレデンシャルの提供) は実行可能です。検出されたその他のすべてのスキーム (SigV4、`x-ofm-signature` のようなゲートウェイ発明ヘッダー — 検出は形状ベース、#2090) は bili のどこにもクレデンシャルソースがないため、常に拒否されます (バイナリ契約: 再署名+圧縮、または拒否、署名なしでのパススルーは決してない): スキーム名を特定した 403、`resign-pending.json` に記憶され、bili がそのスキームの再署名機能をリリースするまで、すべての起動時に再警告されます (Web UI でも表示)。`BILI_RESIGN_PASSTHROUGH=1` は BUILT-IN スキームのみに対して、圧縮なしの逐語転送をオンにします — その他のすべてのスキームに対しては無効です。`enabled` / `passthrough` / `credentialRef` は [`resign`](#resign) ブロックの下に設定ファイルの双子を持ち、署名スキームをキーとします (`resign["sdk-hmac-sha256"]`; `providers.<url>.resign["<scheme>"]` はレベル 2 のオーバーライド) — 環境変数はファイルより優先されます。スキームキーはパススルーのオプトインを固定します: そのキーが設定されたスキームのみがトンネルされます。関連: `BILI_RESIGN_BENEFIT` (署名付き `maas_type: benefit` ヘッダーが付与される CodeArts ベネフィットモデルのコンマ区切りリスト — 3 層ツリー全体より優先; ファイル側の双子はレベル 3 の `models.<name>.benefit` ブール値で、未設定の場合は組み込みの `glm-5.3-flash,deepseek-v4.1-flash` にフォールバックし、dsh codearts プラグインの `CODEARTS_BENEFIT_FALLBACK` を反映) および `BILI_CODEARTS_REF` (有効な `codearts` アカウントを `$DSH_HOME/jet-hub/state.json` から検出する代わりに、再署名に使用される dsh クレデンシャルサービス ref を強制)。 |
| `BILI_CONFIG_FILE` | 設定ファイルのパスをオーバーライド (任意の JSON ファイルを指定)。 |
| `ACP_PORT` / `PORT` | リスニングポートをオーバーライド。 |
Expand Down
4 changes: 2 additions & 2 deletions docs/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -397,7 +397,7 @@ This index is generated from `website/config-reference/*.yaml` — edit the seed
| `BILI_SESSIONS_DIR` | string | unset (XDG state path) | — | Where session records are stored (path relocation). |
| `BILI_ENCRYPTION_KEY` | string | unset | — | Key material for encrypted persisted payloads (secret). |
| `BILI_TUNNEL_ALLOWED_HOSTS` | string[] (csv) | unset | — | Host allowlist for the MITM tunnel lane. |
| `BILI_RECLAIM_FETCH_PATCH` | boolean-ish | on | — | Toggle for reclaiming the global fetch patch on shutdown. |
| `BILI_RECLAIM_FETCH_PATCH` | boolean-ish | on | — | Toggle for the native-mode fetch self-heal guard (#1158): `0` keeps the classic direct install (no watchdog). |
| `BILI_CONFLICT_SCAN` | boolean-ish | off | — | Enable the install-lane conflict scanner probe. |
| `BILI_CHAIN_MAX_FUTURE_SKEW_MS` | number | (built-in) | — | Tolerance for future-skewed chain checkpoint timestamps. |
| `BILI_CHAIN_RECENT_WINDOW_MS` | number | (built-in) | — | Recent-window size for chain checkpoint validation. |
Expand Down Expand Up @@ -2100,7 +2100,7 @@ File keys resolve only when the matching env var is unset. Defaults in parenthes
| `BILI_IMAGE_RESCALE_MAX_DIM` | Longest-edge trigger threshold (px) for the egress downscale pass (#3400): an image is a rescale candidate when its longest edge exceeds this value OR its base64 body exceeds 100 KB; fit-inside resizing never upscales. Default `1600`; non-numeric or values below `128` are ignored (default applies). Env-only by design — no config-file mirror. See [`imageRescale`](#imagerescale). |
| `BILI_PREFLIGHT_HOLD_MS` | Grace period (ms) before a long preflight compression starts holding the client with keep-alive bytes (default `30000`; see #568). |
| `BILI_STREAM_KEEPALIVE_MS` | Streaming-phase client hold (#1647): when an SSE response has written zero bytes to the client for this many milliseconds, bili emits one SSE comment line (`: bili-keepalive`, a spec-level no-op) so the client's undici `bodyTimeout` (default 300s; Node built-in fetch cannot override it per request) cannot kill long prefills whose upstream pings the rewriter/strip pipes swallow. Default `15000`; `0` disables. Sibling of `BILI_PREFLIGHT_HOLD_MS`, which covers compression-preflight silence — this covers upstream-caused silence during streaming. |
| `BILI_RECLAIM_FETCH_PATCH` | Set to `0` to disable the native-mode fetch self-heal re-arm (#1158). By default the native fetch intercept installs `globalThis.fetch` as a guarded accessor, so a third-party patch that re-installs `globalThis.fetch` (e.g. dsh-http-proxy's settings refresh writing its frozen pre-bili `originalFetch`) is re-chained as the downstream and model traffic keeps routing through bili. With `0` the classic direct install stays: a third-party re-arm then wins and bili stops seeing model traffic for the session. **Egress note:** while the guard holds, claimed model traffic is dispatched by the bili proxy itself — it no longer rides the third-party chain's egress (e.g. a SOCKS5 proxy configured in dsh-http-proxy; bili's own upstream proxying supports HTTP proxies only). If you need the third-party egress back, set `0` and configure the egress at bili's level (`"proxy": "http://…"`). **Coexistence note (#3528):** the default accessor form is incompatible with third-party components that require `globalThis.fetch` to be a plain writable data property — they read its property descriptor, find no `value`, and abort their fetch observer at load (reported: DSH Desktop's Developer Tools / NodeJS diagnostic plugin, `@deepseek-ai/dsh-experimental-inspector`). Set `0` (then fully restart the host) so such observers load via the classic direct install; you accept the trade-offs above. See #3528. |
| `BILI_RECLAIM_FETCH_PATCH` | Set to `0` to disable the native-mode fetch self-heal guard (#1158, #5959). By default the native fetch intercept installs `globalThis.fetch` as a **plain writable data property** — compatible with third-party components that require the descriptor to carry a `value` (previously it was a guarded accessor and such components aborted at load; reported: DSH Desktop's NodeJS diagnostic plugin `@deepseek-ai/dsh-experimental-inspector`, #3528, resolved by this change) — plus an **integrity watchdog** that re-reads the descriptor every second. Every eviction shape — a third-party re-assignment (e.g. dsh-http-proxy's settings refresh writing its frozen pre-bili `originalFetch`), a `DELETE` or `REDEFINE` (#2791), or a hostile accessor — is healed within one tick under the same adopt-as-downstream policy, so model traffic keeps routing through bili. If the slot rejects every repair (non-writable, or an accessor that swallows writes) the guard gives up after 3 consecutive unproductive repairs and logs an error, then re-arms itself once the slot becomes usable again. With `0` the classic direct install stays and no watchdog runs: a third-party re-arm then wins and bili stops seeing model traffic for the session. **Egress note:** while the guard holds, claimed model traffic is dispatched by the bili proxy itself — it no longer rides the third-party chain's egress (e.g. a SOCKS5 proxy configured in dsh-http-proxy; bili's own upstream proxying supports HTTP proxies only). If you need the third-party egress back, set `0` and configure the egress at bili's level (`"proxy": "http://…"`). See #1158, #2791, #3528, #5959. |
| `BILI_RESIGN` | Set to `0` to un-deploy the #1884 re-sign arm end to end (pre-fix behavior: signed bodies ride the normal rewrite path and fail upstream with 401). Default: armed — a signed model request that can be re-signed (SDK-HMAC-SHA256 with a resolvable credential) tunnels with every egress body re-signed; the arm needs no configuration on dsh (account-pool discovery via the credentials service). A BUILT-IN-scheme request that CANNOT be re-signed (no resolvable credential) is refused locally with 403 and an actionable message — its fix (provide the credential) is actionable. Every OTHER detected scheme (SigV4, gateway-invented headers like `x-ofm-signature` — detection is shape-based, #2090) has no credential source anywhere in bili, so it is ALWAYS refused (binary contract: re-signed+compressed or refused, never passed through unsigned): a 403 naming the scheme, remembered in `resign-pending.json`, and re-warned at every startup (and shown in the web UI) until bili ships the scheme's re-signer. `BILI_RESIGN_PASSTHROUGH=1` turns on verbatim no-compression forwarding for the BUILT-IN scheme only — it is inert for every other scheme. `enabled` / `passthrough` / `credentialRef` have config-file twins under the [`resign`](#resign) block, keyed by signature scheme (`resign["sdk-hmac-sha256"]`; `providers.<url>.resign["<scheme>"]` is the level-2 override) — env vars win over the file. Scheme keys pin the passthrough opt-in: only the scheme whose key sets it tunnels. Related: `BILI_RESIGN_BENEFIT` (comma-separated list of CodeArts benefit models whose requests get the signed `maas_type: benefit` header — wins over the whole three-level tree; file-side twin is the level-3 `models.<name>.benefit` boolean, unset falls back to the built-in `glm-5.3-flash,deepseek-v4.1-flash`, mirroring the dsh codearts plugin's `CODEARTS_BENEFIT_FALLBACK`) and `BILI_CODEARTS_REF` (force the dsh credentials-service ref used for re-signing instead of discovering enabled `codearts` accounts from `$DSH_HOME/jet-hub/state.json`). |
| `BILI_CONFIG_FILE` | Override the config file path (point at any JSON file). |
| `ACP_PORT` / `PORT` | Override the listen port. |
Expand Down
Loading
Loading