Files
billion-context/dsh.bundle.patch.yml
T
awork 9cd10f1ed0 fix: keep dsh presets bootable when bili-native is disabled (#3662)
Disabling or kill-switching the dsh plugin removed the only provider of
biliBasicCompactionPolicy while the bundle patch kept gating all four
web-profile presets on it — every preset stayed pending forever and new/
resumed sessions failed with "Unknown agent preset: standard".

The load-time overlay + gate service now live in their own always-on
cordis entry (bili-compaction-gate), mounted alongside bili-native by
both patch carriers (dsh.bundle.patch.yml, launcher overlay). The entry
registers the transform and provides the service atomically (the #3354
ordering guarantee survives the split); whether it disables the preset
compaction rows is decided per process by a verdict bili-native sets
from apply() — an absent verdict (entry disabled, kill-switched, module
failed to load) leaves every row stock.

Behavior changes:
- disabling/kill-switching bili-native: presets used to pend forever
  (session creation bricked); they now boot with STOCK native compaction
  — compression off, dsh fully usable.
- bili-native module failing to load: previously a deliberate fail-safe
  brick; now falls back to stock with the #1729 wire-level refusal guard
  as backstop (availability over fail-safe-brick).
- new visible cordis entry bili-compaction-gate; disabling IT re-creates
  the pending state (documented in bundle patch header + CLIENTS /
  CONFIGURATION en+zh). Full uninstall: remove billion-context from
  dsh.profile.bundles.

Closes #3662
2026-10-21 22:07:48 +08:00

56 lines
2.7 KiB
YAML

# billion-context dsh bundle layer (#949).
# Mounted automatically when the profile's package.json lists billion-context
# in dsh.profile.bundles (`dsh plugin --profile <name> add billion-context`);
# the loader resolves `name` from the profile's node_modules.
# #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.
# #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.
- insert:
- id: bili-native
name: billion-context
- id: bili-compaction-gate
name: billion-context/dsh-compaction-gate
- 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
# merge), so each row restates every default code plus MALFORMED_RESPONSE —
# dropping any default code silently removes its retries. Rows absent on a
# given DSH version are skipped with a warning, never a boot failure.
- id: llm-deepseek
config:
retryPolicy:
mode: normal
retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, MALFORMED_RESPONSE]
- id: llm-deepseek-account
config:
retryPolicy:
mode: normal
retryableCodes: [EMPTY_RESPONSE, RATE_LIMIT, SERVER, TIMEOUT, TRANSPORT, MALFORMED_RESPONSE]