dsh-context-compression-improved 0.11.4 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (330) hide show
  1. package/.agents/plans/improve/checklist.md +32 -0
  2. package/.agents/plans/improve/findings.md +102 -0
  3. package/.agents/plans/improve/spec.md +53 -0
  4. package/.agents/plans/improve/tasks.md +70 -0
  5. package/.gitattributes +2 -0
  6. package/.githooks/pre-push +37 -0
  7. package/.github/workflows/ci.yml +47 -0
  8. package/CHANGELOG.de.md +580 -0
  9. package/CHANGELOG.es.md +588 -0
  10. package/CHANGELOG.fr.md +576 -0
  11. package/CHANGELOG.it.md +577 -0
  12. package/CHANGELOG.ja.md +261 -0
  13. package/CHANGELOG.ko.md +254 -0
  14. package/CHANGELOG.md +582 -0
  15. package/CHANGELOG.pt.md +167 -0
  16. package/CHANGELOG.ru.md +554 -0
  17. package/CHANGELOG.zh.md +247 -0
  18. package/CONTRIBUTING.md +22 -0
  19. package/README.de.md +96 -0
  20. package/README.es.md +96 -0
  21. package/README.fr.md +96 -0
  22. package/README.it.md +96 -0
  23. package/README.ja.md +102 -0
  24. package/README.ko.md +102 -0
  25. package/README.md +121 -15
  26. package/README.pt.md +96 -0
  27. package/README.ru.md +96 -0
  28. package/README.zh.md +104 -14
  29. package/SECURITY.md +18 -0
  30. package/THIRD_PARTY_NOTICES.md +7 -25
  31. package/assets/board.png +0 -0
  32. package/assets/context.png +0 -0
  33. package/assets/dshfind-card.svg +33 -0
  34. package/docs/assets/context-compression-selector-profiles.jpg +0 -0
  35. package/docs/assets/context-compression-selector-settings.png +0 -0
  36. package/docs/compat-0.1.5-report.md +77 -0
  37. package/docs/installation.de.md +104 -0
  38. package/docs/installation.es.md +104 -0
  39. package/docs/installation.fr.md +104 -0
  40. package/docs/installation.it.md +104 -0
  41. package/docs/installation.ja.md +78 -0
  42. package/docs/installation.ko.md +78 -0
  43. package/docs/installation.md +103 -0
  44. package/docs/installation.ru.md +104 -0
  45. package/docs/installation.zh.md +100 -0
  46. package/docs/repair-log.md +657 -0
  47. package/docs/shallow-teaching-preset-template.md +46 -0
  48. package/eslint.config.js +30 -0
  49. package/package.json +112 -127
  50. package/packages/selector/LICENSE +21 -0
  51. package/packages/selector/README.md +26 -0
  52. package/packages/selector/README.zh.md +24 -0
  53. package/packages/selector/THIRD_PARTY_NOTICES.md +32 -0
  54. package/packages/selector/docs/history-tool-call-working-set-spec.md +112 -0
  55. package/packages/selector/docs/native-tool-result-selector-spec.md +34 -0
  56. package/packages/selector/docs/subagent-cache-reuse-spec.md +46 -0
  57. package/{dsh.plugin.json → packages/selector/dsh.plugin.json} +2 -2
  58. package/{lib → packages/selector/lib}/client.js +400 -0
  59. package/packages/selector/lib/style.css +350 -0
  60. package/packages/selector/package.json +180 -0
  61. package/packages/selector/screenshots.json +3 -0
  62. package/packages/selector/src/client/CompressionProfileControls.tsx +352 -0
  63. package/packages/selector/src/client/CompressionProfileSelector.module.css +199 -0
  64. package/packages/selector/src/client/CompressionProfileSelector.tsx +89 -0
  65. package/packages/selector/src/client/CustomPolicyEditor.tsx +216 -0
  66. package/packages/selector/src/client/EstimatorControls.tsx +277 -0
  67. package/packages/selector/src/client/bridge-scope.ts +125 -0
  68. package/packages/selector/src/client/decode.ts +68 -0
  69. package/packages/selector/src/client/fab-pos.ts +71 -0
  70. package/packages/selector/src/client/guide-steps.ts +50 -0
  71. package/packages/selector/src/client/guide.tsx +368 -0
  72. package/packages/selector/src/client/index.ts +456 -0
  73. package/packages/selector/src/client/locales/de.ts +167 -0
  74. package/packages/selector/src/client/locales/es.ts +167 -0
  75. package/packages/selector/src/client/locales/fr.ts +167 -0
  76. package/packages/selector/src/client/locales/it.ts +167 -0
  77. package/packages/selector/src/client/locales/ja.ts +167 -0
  78. package/packages/selector/src/client/locales/ko.ts +167 -0
  79. package/packages/selector/src/client/locales/pt.ts +167 -0
  80. package/packages/selector/src/client/locales/ru.ts +167 -0
  81. package/packages/selector/src/client/locales.ts +334 -0
  82. package/packages/selector/src/client/monitor-fab.ts +445 -0
  83. package/packages/selector/src/client/preset-options.ts +88 -0
  84. package/packages/selector/src/client/savings-card.tsx +269 -0
  85. package/packages/selector/src/client/scope-face.ts +24 -0
  86. package/packages/selector/src/client/settings-section.tsx +171 -0
  87. package/packages/selector/src/compat/host-generation.ts +96 -0
  88. package/packages/selector/src/compat/llm-messages.ts +50 -0
  89. package/packages/selector/src/compat/settings-lease.ts +108 -0
  90. package/packages/selector/src/compat/tool-result.ts +91 -0
  91. package/packages/selector/src/css-modules.d.ts +6 -0
  92. package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -0
  93. package/packages/selector/src/estimator-catalog.ts +104 -0
  94. package/packages/selector/src/index.ts +909 -0
  95. package/packages/selector/src/invariant.ts +113 -0
  96. package/packages/selector/src/preset-overlay.ts +749 -0
  97. package/packages/selector/src/profiles.ts +554 -0
  98. package/packages/selector/src/pruner/content.ts +199 -0
  99. package/packages/selector/src/pruner/session.ts +97 -0
  100. package/packages/selector/src/pruner/state.ts +61 -0
  101. package/packages/selector/src/pruner/tuning.ts +23 -0
  102. package/packages/selector/src/pruner/types.ts +78 -0
  103. package/packages/selector/src/pruner.ts +3222 -0
  104. package/packages/selector/src/runtime/adaptive-cost.ts +205 -0
  105. package/packages/selector/src/runtime/audit.ts +321 -0
  106. package/packages/selector/src/runtime/config.ts +887 -0
  107. package/packages/selector/src/runtime/custom-policy.ts +300 -0
  108. package/packages/selector/src/runtime/deepseek-official-pricing.ts +298 -0
  109. package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +254 -0
  110. package/packages/selector/src/runtime/display-prefs.ts +98 -0
  111. package/packages/selector/src/runtime/fold-router.ts +143 -0
  112. package/packages/selector/src/runtime/measurement.ts +444 -0
  113. package/packages/selector/src/runtime/monitor.ts +341 -0
  114. package/packages/selector/src/runtime/panel-command.ts +213 -0
  115. package/packages/selector/src/runtime/reducers.ts +1755 -0
  116. package/packages/selector/src/runtime/retrieve.ts +505 -0
  117. package/packages/selector/src/runtime/savings-integral.ts +117 -0
  118. package/packages/selector/src/runtime/savings-projection.ts +229 -0
  119. package/packages/selector/src/runtime/savings-verify.ts +446 -0
  120. package/packages/selector/src/runtime/savings.ts +526 -0
  121. package/packages/selector/src/runtime/sediment-card.ts +126 -0
  122. package/packages/selector/src/runtime/sediment-clock.ts +87 -0
  123. package/packages/selector/src/runtime/sediment-guard.ts +136 -0
  124. package/packages/selector/src/runtime/sediment-publish.ts +144 -0
  125. package/packages/selector/src/runtime/sediment-span.ts +170 -0
  126. package/packages/selector/src/runtime/sediment.ts +209 -0
  127. package/packages/selector/src/runtime/session-events.ts +30 -0
  128. package/packages/selector/src/runtime/session-file-decode.ts +523 -0
  129. package/packages/selector/src/runtime/shallow-tools.ts +342 -0
  130. package/packages/selector/src/runtime/stats-backfill.ts +541 -0
  131. package/packages/selector/src/runtime/stats-db.ts +492 -0
  132. package/packages/selector/src/runtime/stats-schema.ts +123 -0
  133. package/packages/selector/src/runtime/stats-sync.ts +307 -0
  134. package/packages/selector/src/runtime/summary-command.ts +127 -0
  135. package/packages/selector/src/runtime/tail-trim.ts +177 -0
  136. package/packages/selector/src/runtime/token-count.ts +72 -0
  137. package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +233 -0
  138. package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +204 -0
  139. package/packages/selector/src/runtime/tokenpilot/advisor.ts +419 -0
  140. package/packages/selector/src/runtime/tokenpilot/benefit.ts +200 -0
  141. package/packages/selector/src/runtime/tokenpilot/dedup.ts +82 -0
  142. package/packages/selector/src/runtime/tokenpilot/estimator.ts +151 -0
  143. package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +53 -0
  144. package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +65 -0
  145. package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +125 -0
  146. package/packages/selector/src/runtime/tokenpilot/intent-range.ts +37 -0
  147. package/packages/selector/src/runtime/tokenpilot/locator.ts +129 -0
  148. package/packages/selector/src/runtime/tokenpilot/read-state.ts +98 -0
  149. package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +303 -0
  150. package/packages/selector/src/runtime/tool-names.ts +42 -0
  151. package/packages/selector/src/runtime/toolclass.ts +103 -0
  152. package/packages/selector/src/runtime/triage/masks.ts +128 -0
  153. package/packages/selector/src/runtime/triage/shallow.ts +132 -0
  154. package/packages/selector/src/runtime/triage/signals.ts +167 -0
  155. package/packages/selector/src/runtime/triage/types.ts +125 -0
  156. package/packages/selector/src/runtime/types.ts +396 -0
  157. package/packages/selector/src/runtime/value.ts +48 -0
  158. package/packages/selector/src/settings-bridge.ts +175 -0
  159. package/packages/selector/src/tui-command.ts +99 -0
  160. package/packages/selector/tests/advisor-report.host.spec.ts +223 -0
  161. package/packages/selector/tests/auto-compact.client.spec.tsx +214 -0
  162. package/packages/selector/tests/built/client-artifact.spec.ts +56 -0
  163. package/packages/selector/tests/cache-prefix-audit.spec.ts +123 -0
  164. package/packages/selector/tests/code-skeleton.client.spec.ts +98 -0
  165. package/packages/selector/tests/compat/compat-narrow-waist.spec.ts +150 -0
  166. package/packages/selector/tests/custom-contract.client.spec.ts +226 -0
  167. package/packages/selector/tests/estimator-catalog.spec.ts +70 -0
  168. package/packages/selector/tests/estimator-channel.client.spec.tsx +253 -0
  169. package/packages/selector/tests/estimator-route-registration.host.spec.ts +202 -0
  170. package/packages/selector/tests/fab-pos.client.spec.ts +47 -0
  171. package/packages/selector/tests/fixtures/sediment-pool/52adc205-cloud-5.orig.txt +231 -0
  172. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-25.orig.txt +236 -0
  173. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-38.orig.txt +220 -0
  174. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-42.orig.txt +140 -0
  175. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-cloud-53.orig.txt +117 -0
  176. package/packages/selector/tests/fixtures/sediment-pool/95fcba5d-local-10.orig.txt +67 -0
  177. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-45.orig.txt +119 -0
  178. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-49.orig.txt +119 -0
  179. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-63.orig.txt +131 -0
  180. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-75.orig.txt +196 -0
  181. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-76.orig.txt +71 -0
  182. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-85.orig.txt +126 -0
  183. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-86.orig.txt +86 -0
  184. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-87.orig.txt +50 -0
  185. package/packages/selector/tests/fixtures/sediment-pool/a7a767c0-cloud-96.orig.txt +102 -0
  186. package/packages/selector/tests/helpers/legacy-namespace.ts +35 -0
  187. package/packages/selector/tests/helpers/legacy-settings/index.ts +15 -0
  188. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +41 -0
  189. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +647 -0
  190. package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +78 -0
  191. package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +234 -0
  192. package/packages/selector/tests/host-preset-overlay.host.spec.ts +204 -0
  193. package/packages/selector/tests/monitor-fab.client.spec.ts +240 -0
  194. package/packages/selector/tests/preset-options-write.client.spec.ts +192 -0
  195. package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +200 -0
  196. package/packages/selector/tests/preset-overlay.host.spec.ts +246 -0
  197. package/packages/selector/tests/profiles.client.spec.tsx +436 -0
  198. package/packages/selector/tests/ptc-custom-write.client.spec.ts +86 -0
  199. package/packages/selector/tests/public/package-contract.client.spec.ts +91 -0
  200. package/packages/selector/tests/runtime/adaptive-cost.spec.ts +167 -0
  201. package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +230 -0
  202. package/packages/selector/tests/runtime/advisor-invariant.spec.ts +272 -0
  203. package/packages/selector/tests/runtime/advisor.spec.ts +226 -0
  204. package/packages/selector/tests/runtime/audit.spec.ts +275 -0
  205. package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -0
  206. package/packages/selector/tests/runtime/behavior-lock-profiles.spec.ts +128 -0
  207. package/packages/selector/tests/runtime/char-basis.spec.ts +30 -0
  208. package/packages/selector/tests/runtime/code-skeleton.spec.ts +152 -0
  209. package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +186 -0
  210. package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -0
  211. package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +122 -0
  212. package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +96 -0
  213. package/packages/selector/tests/runtime/fallback-diversity.spec.ts +75 -0
  214. package/packages/selector/tests/runtime/fixtures/profile-baseline.json +273 -0
  215. package/packages/selector/tests/runtime/fixtures/session-v4-dump.jsonl +46 -0
  216. package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +106 -0
  217. package/packages/selector/tests/runtime/fixtures/vision-golden.json +459 -0
  218. package/packages/selector/tests/runtime/fold-router.spec.ts +140 -0
  219. package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +74 -0
  220. package/packages/selector/tests/runtime/fresh-gate.spec.ts +43 -0
  221. package/packages/selector/tests/runtime/html-reducer.spec.ts +212 -0
  222. package/packages/selector/tests/runtime/intent-gate.spec.ts +62 -0
  223. package/packages/selector/tests/runtime/intent-summary.spec.ts +156 -0
  224. package/packages/selector/tests/runtime/jsonl-reducer.spec.ts +79 -0
  225. package/packages/selector/tests/runtime/line-mapping.spec.ts +153 -0
  226. package/packages/selector/tests/runtime/monitor.spec.ts +354 -0
  227. package/packages/selector/tests/runtime/panel-command.spec.ts +101 -0
  228. package/packages/selector/tests/runtime/prose-reducers.spec.ts +133 -0
  229. package/packages/selector/tests/runtime/ptc-profile.spec.ts +133 -0
  230. package/packages/selector/tests/runtime/public/public-runtime.spec.ts +2795 -0
  231. package/packages/selector/tests/runtime/read-input-cap.spec.ts +33 -0
  232. package/packages/selector/tests/runtime/savings-accounting.spec.ts +291 -0
  233. package/packages/selector/tests/runtime/savings-integral.spec.ts +169 -0
  234. package/packages/selector/tests/runtime/savings-projection.spec.ts +89 -0
  235. package/packages/selector/tests/runtime/savings-verify.spec.ts +226 -0
  236. package/packages/selector/tests/runtime/savings.spec.ts +139 -0
  237. package/packages/selector/tests/runtime/search-reducer.spec.ts +110 -0
  238. package/packages/selector/tests/runtime/sediment-card.spec.ts +111 -0
  239. package/packages/selector/tests/runtime/sediment-config.spec.ts +56 -0
  240. package/packages/selector/tests/runtime/sediment-guard.spec.ts +71 -0
  241. package/packages/selector/tests/runtime/sediment-masks.spec.ts +95 -0
  242. package/packages/selector/tests/runtime/sediment-orchestrator.spec.ts +166 -0
  243. package/packages/selector/tests/runtime/sediment-pool-share.spec.ts +65 -0
  244. package/packages/selector/tests/runtime/sediment-publish.spec.ts +142 -0
  245. package/packages/selector/tests/runtime/sediment-real-shapes.spec.ts +158 -0
  246. package/packages/selector/tests/runtime/sediment-settings.spec.ts +73 -0
  247. package/packages/selector/tests/runtime/sediment-signals.spec.ts +124 -0
  248. package/packages/selector/tests/runtime/sediment-span.spec.ts +92 -0
  249. package/packages/selector/tests/runtime/session-events.spec.ts +27 -0
  250. package/packages/selector/tests/runtime/session-file-decode.spec.ts +281 -0
  251. package/packages/selector/tests/runtime/settings-unwrap.spec.ts +58 -0
  252. package/packages/selector/tests/runtime/shallow-primitives.spec.ts +135 -0
  253. package/packages/selector/tests/runtime/sidechannel.spec.ts +241 -0
  254. package/packages/selector/tests/runtime/source-kind-audit.spec.ts +79 -0
  255. package/packages/selector/tests/runtime/stats-backfill-scheduler.spec.ts +167 -0
  256. package/packages/selector/tests/runtime/stats-backfill.spec.ts +350 -0
  257. package/packages/selector/tests/runtime/stats-db.spec.ts +361 -0
  258. package/packages/selector/tests/runtime/stats-privacy.spec.ts +55 -0
  259. package/packages/selector/tests/runtime/stats-sync.spec.ts +278 -0
  260. package/packages/selector/tests/runtime/summary-command.spec.ts +154 -0
  261. package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +159 -0
  262. package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +53 -0
  263. package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +217 -0
  264. package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +52 -0
  265. package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +79 -0
  266. package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +76 -0
  267. package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +121 -0
  268. package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +82 -0
  269. package/packages/selector/tests/runtime/toolclass.spec.ts +156 -0
  270. package/packages/selector/tests/runtime/value.spec.ts +23 -0
  271. package/packages/selector/tests/savings-sessions.client.spec.tsx +140 -0
  272. package/packages/selector/tests/settings-seat.client.spec.ts +215 -0
  273. package/packages/selector/tests/standing-generation.host.spec.ts +729 -0
  274. package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +269 -0
  275. package/packages/selector/tests/support/cache-prefix-audit.ts +105 -0
  276. package/packages/selector/tests/support/mock-adapter.ts +37 -0
  277. package/packages/selector/tests/support/ui-primitives.tsx +34 -0
  278. package/packages/selector/tsconfig.json +11 -0
  279. package/packages/selector/tsdown.client.config.ts +102 -0
  280. package/packages/selector/tsdown.config.ts +20 -0
  281. package/pnpm-workspace.yaml +76 -0
  282. package/screenshots.json +6 -3
  283. package/scripts/capture-profile-baseline.mjs +42 -0
  284. package/scripts/cell-browser-e2e.mjs +354 -0
  285. package/scripts/generate-tokenizer-fixtures.py +81 -0
  286. package/scripts/generate-vision-fixtures.py +208 -0
  287. package/scripts/hosts.d.mts +3 -0
  288. package/scripts/hosts.mjs +81 -0
  289. package/scripts/packed-components-smoke.mjs +763 -0
  290. package/scripts/packed-install-e2e.mjs +1346 -0
  291. package/scripts/sediment-latency-report.mjs +63 -0
  292. package/scripts/sync-hosts.mjs +176 -0
  293. package/scripts/toolclass-corpus-replay.mjs +281 -0
  294. package/scripts/verify-release.mjs +342 -0
  295. package/tests/TEST_INVENTORY.md +41 -0
  296. package/tsconfig.base.json +18 -0
  297. package/tsconfig.json +7 -0
  298. package/tsconfig.tests.json +15 -0
  299. package/vitest.built.config.ts +9 -0
  300. package/vitest.config.ts +54 -0
  301. /package/{assets → packages/selector/assets}/deepseek-v4/LICENSE.DeepSeek-V4-Pro.txt +0 -0
  302. /package/{assets → packages/selector/assets}/deepseek-v4/manifest.json +0 -0
  303. /package/{assets → packages/selector/assets}/deepseek-v4/tokenizer.json +0 -0
  304. /package/{assets → packages/selector/assets}/deepseek-v4/tokenizer_config.json +0 -0
  305. /package/{assets → packages/selector/assets}/deepseek-v4-vision-exp/LICENSE.DeepSeek-V4-Flash-Vision-Exp.txt +0 -0
  306. /package/{assets → packages/selector/assets}/deepseek-v4-vision-exp/manifest.json +0 -0
  307. /package/{assets → packages/selector/assets}/deepseek-v4-vision-exp/tokenizer.json +0 -0
  308. /package/{assets → packages/selector/assets}/deepseek-v4-vision-exp/tokenizer_config.json +0 -0
  309. /package/{cordis.patch.yml → packages/selector/cordis.patch.yml} +0 -0
  310. /package/{lib → packages/selector/lib}/client.d.ts +0 -0
  311. /package/{lib → packages/selector/lib}/index.d.ts +0 -0
  312. /package/{lib → packages/selector/lib}/index.js +0 -0
  313. /package/{lib → packages/selector/lib}/invariant.d.ts +0 -0
  314. /package/{lib → packages/selector/lib}/invariant.js +0 -0
  315. /package/{lib → packages/selector/lib}/profiles.d.ts +0 -0
  316. /package/{lib → packages/selector/lib}/pruner.d.ts +0 -0
  317. /package/{lib → packages/selector/lib}/pruner.js +0 -0
  318. /package/{lib → packages/selector/lib}/savings-integral.js +0 -0
  319. /package/{lib → packages/selector/lib}/tail-trim.js +0 -0
  320. /package/{lib → packages/selector/lib}/tool-result.js +0 -0
  321. /package/{locale → packages/selector/locale}/de.json +0 -0
  322. /package/{locale → packages/selector/locale}/en.json +0 -0
  323. /package/{locale → packages/selector/locale}/es.json +0 -0
  324. /package/{locale → packages/selector/locale}/fr.json +0 -0
  325. /package/{locale → packages/selector/locale}/it.json +0 -0
  326. /package/{locale → packages/selector/locale}/ja.json +0 -0
  327. /package/{locale → packages/selector/locale}/ko.json +0 -0
  328. /package/{locale → packages/selector/locale}/pt.json +0 -0
  329. /package/{locale → packages/selector/locale}/ru.json +0 -0
  330. /package/{locale → packages/selector/locale}/zh.json +0 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,582 @@
1
+ # Changelog
2
+
3
+ ## 0.12.1 (2026-11-25)
4
+
5
+ - feat(guide): 引导新增第 4 步「压缩与折叠走本地直连端点」(zh + en)——估计器通道选「直连 OpenAI 兼容端点」+ 端点地址(/v1)+ 小模型(该区块仅「TokenPilot 启发模式」提供),轮尾折叠的两层端点(高吞吐档 ≤2K / 稳定档 2~8K)走 `sediment.foldMode: direct` + `foldBaseUrl` / `foldStrata*` / `foldLocal35*`;停在「宿主模型」时压缩与对话共用 provider/model,每轮裁剪都在吃对话 token。前 3 步正文逐字未动。
6
+ - feat(guide): 「重新查看引导」入口从设置页底部移到标题与描述之下、贴士之前,并改为恒定渲染(原为收起后才出现)。跳过标记与十语外壳语义不变(`dsh.guide.context-compression.skipped`)。
7
+
8
+ ## 0.12.0 (2026-11-24)
9
+
10
+ - feat(guide): 首次使用引导(3 步)——设置页顶部三步教学:压缩档位(平衡 / 节省 / PTC,代码骨架、轮尾沉降、回合末意图摘要为正交开关,Auto Compact 水位才随档位联动)、首轮冻结策略(会话首次被运行时观察即冻结,当前会话无反应≠保存失败;沉降会把原消息撤出对话视图,可卡内序号回捞)、监控读数(悬浮面板的净节省 / 毛节省 / 负节省 / 缓存命中率 / 成本估算;设置页「节省统计(本进程)」首次裁剪前为空)。底部恒定重开入口。
11
+ - feat(guide): 引导外壳自带十语(zh·en·ja·ko·fr·de·it·ru·es·pt),按 `<html lang>` 取词、认不出落 en;步骤正文 zh/en,其余语种回退 en 不留空白。Skip 与「开始使用」都写 `dsh.guide.context-compression.skipped`——看过即不再自动弹,跳过后可从底部重开。
12
+ - 引导件 `packages/selector/src/client/guide.tsx` 是 `mine-dsh-plugins/_tools/guide-kit/guide.tsx` 的生成副本(顶部有勿手改横幅),九个自有插件共用同一套交互;样式注入与存储访问全部能力探测 + try/catch。
13
+ - 全量:899 tests / 899 pass / 1 skipped。
14
+
15
+ ## 0.11.4
16
+
17
+ - i18n: add Portuguese (pt-BR) locale — runtime dictionary (`Português (Brasil)` in the selector language list), `locale/*.json` package metadata for all ten languages, README/CHANGELOG mirrors and bidirectional nav links.
18
+
19
+ ## 0.11.3
20
+
21
+ - 修复多语言注册告警噪音:`addLanguage`/`register` 命中重复注册时改为良性跳过(同 media-lens)。
22
+ - 修复服务端类型错误:`candidates[0]` 在 `noUncheckedIndexedAccess` 下为 `string | undefined`,改为 `as const` 元组。
23
+
24
+ ## 0.11.2
25
+
26
+ - 终端面(dsh-tui / Desktop 命令面板同源):压缩设置只读面(status)。
27
+
28
+
29
+ ## 0.11.0 (2026-11-07)
30
+
31
+ - sediment: turn-tail sedimentation (default OFF, `sediment.enabled` gate) — whole-turn atomic replacement with three guards (reason=completed only / summary-quality tiering: closing ≥ floor → closing, else fold-model, else mechanical-only / tail round always kept), line-level protection pool (signals.ts, 0.4% size for 100% error-line recall), mask line for large reads and file writes (manifest-first, skeleton gutter), rewrite-cost guard (saved ≥ tail rewrite × ratio; community 1:15 re-pay defense), shortening proof before every publish, and `publishSettledCard()` reusing the generation-gated tail-trim release surface. PTC-aware aging short-circuit (omnibus runner registered + no direct write-family observed ⇒ rule-based superseded aging disabled, only while sediment is on) and a K=5 negative-feedback loop that tightens to conservative mode (rewrite guard ≥5x, fresh-large-only cuts). Fold channel (fold-router.ts): tiered LAN endpoints ≤2K→strata 8s / 2–8K→local-35 12–15s / >8K refused, queue depth 1, retries 0, max_tokens 400; observability line `context-compression sediment fold (…): tier=… ok=… latencyMs=…` consumed by scripts/sediment-latency-report.mjs (p50/p95/p99). Landing is pinned against the real durable event envelope (tests/runtime/sediment-real-shapes.spec.ts).
32
+ - shallow: upgrade-discard pair primitives — `type(path)` O(1) head-sample picker (≤2KB, five-shape classify), `skeleton` with split checkpoint (path/coverage/ref/structure-fingerprint, never discardable) + body, `discard(ref)` with direction-asymmetric coverage guard (fully-read ⊇ skeleton coverage ⇒ refuse), sibling-pair footer on full reads, retrieve-as-undo; model-initiated discards booked separately (`component: shallow-discard`) so the feedback loop never miscounts them.
33
+ - ui: settings row (same section as codeSkeleton, nine locales), monitor sediment block (cuts / conservative reason), panel disclosure text for the surface-visible removal; teaching-preset patch template at docs/shallow-teaching-preset-template.md (preset-level, zero injection for non-PTC presets).
34
+ - gates: root engines/peers migrated to range shape (`>=0.1.1-rc.2 <0.3.0`) with verify-release range-shape check; package-contract spec single-sourced from scripts/hosts.mjs; the range engines are accepted by host 0.2.1-rc.5 in a live install where 15+ enum-shaped plugins are skipped.
35
+
36
+
37
+ ## 0.10.2 (2026-10-28)
38
+
39
+ - fab: monitor floating ball position persistence switched to viewport-fraction ({fx,fy}, 4-dec) — corner-follow promise on restart/maximize/resolution change, replacing the absolute-pixel model that only *looked* fine because resize-clamp kept it on-screen. Legacy {x,y} archives normalize on load (zero migration). Pure layout module `src/client/fab-pos.ts` is byte-identical with dsh-browser-cdp's (dual-side sync discipline); pinned by fab-pos.client.spec.ts (6) + rewritten monitor-fab position specs (fraction persist / legacy normalize / resize re-derive).
40
+
41
+
42
+ ## 0.10.0 (2026-10-24)
43
+
44
+ - hosts: 0.2.1-rc.3 declaration-level enum addendum (18 rc; contract plane zero diff per host source-analysis) — shipped together with the stats feature below.
45
+
46
+
47
+ - stats: per-session 面板与持久化——节省统计三层口径(存量仪表 / 累计按 N 次 call 积分 / 缓存分权省钱估计)落 SQLite(`~/.dsh/storages/dsh-context-compression/stats.sqlite`,双驱动:better-sqlite3 optional → `node:sqlite`,缺席可见降级);claims 以 (session_id, 绝对 seq, kind, component, basis) 复合主键幂等入库(BC #2671 双教训防御断言),原文与自由文本绝不落库;召回记账修复(offset 按存活面收敛、同 basis 翻负折叠 a−(b+R) 下限 −b、环形缓冲驱逐保护在面条目);旧会话 jsonl 行为回填(sessionQuery 服务面优先 + 只读代次解码 fallback,分块调度、水位幂等、绝不写会话文件);新增 `GET /savings/sessions` 分页面板端点(/savings 与 /monitor 契约冻结不动);`/ccip` 面板实时控制命令(rows/mode/session/flush/backfill,optional commands 注入六线安全);9 语面板键新增与"重启归零"文案替换;审计 errorMessage 首行+截断净化(自由文本不入持久面)。
48
+
49
+ ## 0.9.8 (2026-10-18)
50
+
51
+ - hosts: 追加 0.2.1-rc.2 声明面枚举(34/34 @deepseek-ai/* 宿主 peer 逐包 npm 实测 rc.2 在版;本插件不触 ctx.web provider 与 conversation.input.model.label 槽,代码零改动,纯元数据发版;农场 rc.2 格挂账待命)
52
+
53
+ All notable changes use this file. The project follows semantic versioning after `0.1.0`.
54
+
55
+ ## 0.9.3 - 2026-10-08
56
+
57
+ ### Fixed
58
+
59
+ - **≤0.1.1 resume killer: tool-result-pruner loader entry failed to import**.
60
+ The 0.1.0/0.1.1 host loader module table serves a `@deepseek-ai/dsh-session`
61
+ without the `SessionSeq` / `deriveEventMessage` runtime exports; the static
62
+ named imports in `pruner.ts` / `runtime/measurement.ts` died at ESM link
63
+ time, the loader entry failed to mount, and the whole `standard` agent
64
+ preset mount failed — every session resume on the two oldest cells errored
65
+ with "failed to apply loader entry compaction … does not provide an export
66
+ named 'SessionSeq'" (2026-10-08 five-cell reproduction). Both imports are
67
+ now namespace soft-imports with feature-detected fallbacks: `SessionSeq`
68
+ degrades to identity (old-line session seqs are plain numbers; the brand is
69
+ new-line paranoia), `deriveEventMessage` degrades to null which the
70
+ measurement adapter already maps to `unavailableTokenCount`. CJS-interop
71
+ shapes (named exports under `default`) are covered too.
72
+
73
+ ## 0.9.2 - 2026-10-08
74
+
75
+ ### Reverted
76
+
77
+ - **Standalone settings.section restored (family-tab consolidation rolled back
78
+ for this plugin)**: the 上下文压缩选择器 sidebar entry (`settings.section`,
79
+ order 17, the exact 0.9.0 registration and component identity) is back as the
80
+ only settings-nav seat; the `dsh-family.tab` contributor tab introduced in
81
+ 0.9.1 is removed. 2026-10-08 user verdict: perm-gate and cci were never in
82
+ the family tab-ification scope — both plugins ship independent insections.
83
+ The `plugins.bundle.config` bundle-detail card is unchanged and keeps the
84
+ shared `sectionViaAdapter` closure adapter (now bundle-card-only).
85
+ - Tests: the four client specs (`settings-seat` / `code-skeleton` /
86
+ `custom-contract` / `preset-options-write`) are restored to the 0.9.0
87
+ contracts — settings.section seat pinned at order 17 with
88
+ `ContextCompressionSettingsSection` as the mounted component.
89
+
90
+ ## 0.9.1 - 2026-10-08
91
+
92
+ ### Changed
93
+
94
+ - **Settings consolidated into the family in-section tab**: the top-level
95
+ `settings.section` sidebar entry (上下文压缩选择器) is retired; the settings
96
+ panel now appears only as a contributor tab inside the 起子插件设置 family
97
+ section (`dsh-family.tab`, order 55), matching the 2026-10-08 fleet-wide
98
+ consolidation decision (perm-gate compat.8 removes its duplicated seats in
99
+ the same batch). The component goes through the shared closure
100
+ `useCompression` adapter (extracted from the `plugins.bundle.config` card,
101
+ which now reuses it) because neither the family-tab nor the bundle-detail
102
+ render chain maps `inject.hooks` into component hooks. Eager-bound `tNav`
103
+ label retained (search-index 0.5.3 family-tab incident). Server-side
104
+ settings bridge, lease, estimator-catalog and savings routes unchanged.
105
+
106
+ ### Fixed
107
+
108
+ - `packages/selector/dsh.plugin.json` version metadata was stale at
109
+ `0.9.0-alpha.4` while the package shipped 0.9.0.
110
+
111
+ ## 0.9.0 - 2026-10-08
112
+
113
+ ### Added
114
+
115
+ - **One version for every Harness line**: 0.9.0 is a single release serving all 15 rc
116
+ from 0.1.0-rc.2 to 0.2.0-rc.2 (six host lines). The per-line dist-tag scheme is
117
+ retired — after publishing, `latest`, `dsh-0.1.2`, `dsh-0.1.5`, `dsh-0.1.7` and
118
+ `dsh-0.2.0` all point at 0.9.0.
119
+ - **Three-generation settings waist**: at startup the plugin detects which settings
120
+ face the host exposes — the legacy `settings.register` service (0.1.0-0.1.5) or
121
+ loader-managed volatile config + `configForms` (0.1.7+/0.2.0) — and arms only the
122
+ matching client surface (`settings.section` vs `configForms`), plus the
123
+ `plugins.bundle.config` package-detail card on 0.1.7+.
124
+ - **Settings bridge**: on legacy lines tools read and write through a lease-writable
125
+ settings namespace (enveloped tool results); on modern lines they read the
126
+ configForms document directly, and bridge writes return 409 by design.
127
+ - The `plugins.bundle.config` detail card renders the full settings component via a
128
+ closure-built `useCompression` (the package-detail chain has no hookContext, so
129
+ entry-level hook injection is unavailable there).
130
+
131
+ ### Fixed
132
+
133
+ - The generation probe no longer caches a provisional answer at wire time: absence of
134
+ the settings service during row composition (before host services exist) is
135
+ re-resolved when the service actually injects — the legacy lease arm was previously
136
+ dead on 0.1.0.
137
+ - The tail-trim validator compares the replacement's source kind against the
138
+ generation-gated writer instead of a hardcoded plugin id, so it no longer rejects
139
+ its own legacy enveloped output.
140
+ - The configForms client arm resolves the service off the injected owner context's
141
+ `.configForms` property; using the raw Context as the handle made `get()` return
142
+ `undefined` and the host slot boundary abdicated the settings section into a dead
143
+ cell on 0.1.7.
144
+
145
+ ### Changed
146
+
147
+ - All `@deepseek-ai/dsh-*` peer ranges and `engines.dsh` enumerate the 15 rc
148
+ explicitly, so no engine/peer gate blocks installation on any host line.
149
+
150
+
151
+ ## 0.8.0 - 2026-10-02
152
+
153
+ > 0.2.0-beta 渠道(beta.3-beta.7)转正。本期主线功能(节省统计、意图摘要、
154
+ > 压缩监控悬浮球、会话绑定、上下文占用条、灾难性遗忘区建议压缩)已同步
155
+ > cherry-pick 到 compat/0.1.7 / compat/0.1.5 / compat/0.1.2 三条适配线。
156
+ > 各 beta 节保留于下方,内容即 0.8.0 的完整变更清单。
157
+
158
+ ## 0.8.0-beta.7 - 2026-10-02
159
+
160
+ ### Added
161
+
162
+ - **灾难性遗忘区建议压缩**: the monitor snapshot carries a `suggestion` block — when
163
+ observed context occupancy reaches `MONITOR_SUGGEST_PCT` (0.7, deliberately one notch
164
+ below the host Auto Compact default of 80%) the floating bubble lights up (breathing
165
+ tint) and the panel shows a localized hint recommending compression or history trimming.
166
+ - Context occupancy observation is decoupled from the intent-summary gate: every turn
167
+ records live tokens vs the auto-compact-derived window, so the occupancy bar and the
168
+ suggestion work even with intent summaries off (previously the bar stayed empty).
169
+
170
+ ## 0.8.0-beta.6 - 2026-10-02
171
+
172
+ ### Added
173
+
174
+ - **Session binding for the floating monitor**: a deliberately invisible `conversation.input.left`
175
+ seat captures the active session id (pm longtask precedent) — the panel now shows the bound
176
+ session's data and its override buttons act on that session instead of the default one.
177
+ - **Context occupancy bar** in the panel: the turn-tail postflight observes live tokens vs the
178
+ auto-compact-derived window per session; the panel renders the occupancy percentage
179
+ (hot tint past 70%).
180
+
181
+ ### Fixed
182
+
183
+ - Client specs that captured the settings face by `inject` presence now key off the
184
+ `settings.section` seat explicitly (the input-bar binder's `inject` is a session callback).
185
+
186
+ ## 0.8.0-beta.5 - 2026-10-02
187
+
188
+ ### Added
189
+
190
+ - **Compression monitor floating panel (FAB)**: a draggable bubble beside the input area
191
+ (visibility switch in the settings section, default off) that polls a new
192
+ `GET /{endpoint,api}/.../monitor` snapshot — net/gross savings, cache hit rate, cost
193
+ estimate, and the turn-tail intent-summary gate state — with session override buttons
194
+ driving the same state machine as `/ctx-summary`. Skeleton adapted from the withdrawn
195
+ pm longtask FAB (d29bcb1); negative net savings light the bubble.
196
+ - The savings pricing helper moved to `runtime/monitor.ts` (shared by the savings and
197
+ monitor routes; no behavior change).
198
+
199
+ ## 0.8.0-beta.4 - 2026-10-02
200
+
201
+ ### Added
202
+
203
+ - **Turn-tail intent summary** (merged from the feat/intent-summary line): growth-gated turn-boundary postflight folds the consumed increment into per-candidate `intent-summary` blocks; `/ctx-summary off|on|status` gives a session-scoped override; the settings section now carries its own on/off card (nine languages) instead of relying on host forms.
204
+ - `@deepseek-ai/dsh-commands` joins the installation-provided runtime set (the command registry import), and the release gates track the post-merge chunk graph (`lib/intent-gate.js`).
205
+
206
+ ## 0.8.0-beta.3 - 2026-10-01
207
+
208
+ ### Added
209
+
210
+ - **Savings statistics with honest accounting** (inspired by the dsh-token-optimizer concept): every published reduction now lands in a per-process ledger (`runtime/savings.ts`) keyed by the rewrite audit's own `tokensBefore − tokensAfter` — realized savings only, never the theoretical maximum. **Negative savings are paired, not ignored**: the original text of each reduction is SHA-256 registered, and when the model later re-reads that content in full (a new tool result whose hash matches, or a `context_compression_retrieve` return), the re-read tokens are booked as an offset against the earlier claim — skeleton-then-full-read nets negative, exactly as it should. Exact-tokenizer and chars/4 bases are aggregated separately and never merged into one number.
211
+ - Surfaces: read-only `GET /{endpoint,api}/dsh-context-compression-improved/savings` snapshot route (always-on, aggregates only — no session content), and a savings card in the settings section (net/gross/offsets, per-component breakdown, recent offsets) in all nine UI languages.
212
+ - **Usage aggregation & cache-hit monitoring** (the dsh-token-optimizer monitor concept, merged with the honest ledger): every fresh request boundary records the official TokenMeter usage of the last completed request into the same per-session ledger; the snapshot aggregates real input/output/cache-read/cache-write tokens and derives the cache hit rate — the health metric that tells you whether compression is actually saving money or just destroying prefix cache. Sessions are bucketed per net savings (top 8), and a one-line per-session account (net, offsets, requests, cache hit) is logged to the Harness logger on `session/disposed` (probe-registered: hosts without the event stay silent).
213
+ - **Cost estimation on the snapshot route**: when the current host route resolves to an official DeepSeek price record, the response carries the actual aggregated cost plus an estimated saved cost (net exact tokens priced at the cache-miss input band, explicitly labeled an estimate); third-party routes fail closed to no pricing rather than inventing numbers.
214
+
215
+ ## 0.8.0-beta.2 - 2026-10-01
216
+
217
+ ### Added
218
+
219
+ - Japanese (`ja`) and Korean (`ko`) UI locale dictionaries for the selector settings section, bringing the client surface to nine languages (zh / en / de / es / fr / it / ja / ko / ru). Both dictionaries are type-checked against `ContextCompressionLocaleKey`, so a future selector key cannot silently miss a translation; labels are self-described (`日本語` / `한국어`) and fall back to English per key.
220
+
221
+ ## 0.8.0-beta.1 - 2026-09-30
222
+
223
+ ### Changed
224
+
225
+ - Harness 0.2.0 compatibility line: all 23 `@deepseek-ai/dsh-*` peer ranges moved to
226
+ `>=0.2.0-rc.1 <0.2.1-0`, and `engines.dsh` follows in all three manifests (root,
227
+ selector package, plugin manifest). `publishConfig.tag` becomes `dsh-0.2.0`; the 0.1.7
228
+ line remains served from `dsh-0.1.7` (now `0.7.0-beta.1`), the 0.1.5/0.1.2 lines from
229
+ their own dist-tags.
230
+ - 39 of the 41 pinned overrides and 46 of the 48 dev-dependencies moved to `0.2.0-rc.1`;
231
+ `@deepseek-ai/dsh-agent-presets` (`0.1.6-alpha.2`) and `@deepseek-ai/dsh-code-runtime`
232
+ (`0.1.5-rc.3`) keep their pins — neither package has any 0.2.0-line release.
233
+ - Release gates re-targeted: the packed-install e2e harness pin now checks out the
234
+ official `dsh-v0.2.0-rc.1` tree (`4878cdab`), and the built-artifact contract test
235
+ asserts the `configForms` client slot (renamed from `settingsScope` on the 0.1.7 line).
236
+
237
+ ## 0.6.5 - 2026-09-29
238
+
239
+ ### Fixed
240
+
241
+ - Dev-dependency alignment to the Harness 0.1.7 line: 46 of the 48 `@deepseek-ai/dsh-*`
242
+ dev-dependencies moved from the precise `0.1.5-rc.2` pin to the precise `0.1.7-rc.2` pin,
243
+ and `pnpm-lock.yaml` was regenerated from a clean tree. Typecheck, build, test, lint, and
244
+ `verify:release` now run against the real 0.1.7-rc.2 baseline instead of validating the
245
+ 0.1.7 adaptations against 0.1.5 inputs (a false green). Two packages have no 0.1.7-line
246
+ release at all and keep their install-time pinned values: `@deepseek-ai/dsh-agent-presets`
247
+ (`0.1.6-alpha.2`) and `@deepseek-ai/dsh-code-runtime` (`0.1.5-rc.3`). `react-dom` gained an
248
+ explicit `^18.2.0` dev-dependency so a fresh resolution cannot pair React-DOM 19 with
249
+ React 18 under the test suites.
250
+ - The test-host settings seam was rebuilt against the real 0.1.7 host: `SettingsProvider`
251
+ no longer exists in `@deepseek-ai/dsh-settings` (replaced by the declarative
252
+ `SettingsForms`), while the plugin keeps the legacy `ctx.settings.get(ns)` read as a
253
+ host-shape fallback. The specs now mount a vendored copy of the 0.1.5-rc.2 provider
254
+ (`tests/helpers/legacy-settings/`) to exercise exactly that fallback, and the
255
+ legacy-namespace registrar narrows the service at the seam. The live DeepSeek harness test
256
+ registers the provider through the 0.1.7 adapter seam instead of the removed
257
+ self-contained `llm-deepseek` plugin.
258
+ - Test adaptations surfaced by the real baseline: the compaction-engine fixtures pass
259
+ `headroomTokens: 0` (0.1.7-rc.2 defaults a 65536-token compaction headroom, which swallows
260
+ the fixtures' 1k-token probe windows), and the tool-result asset assertion follows the
261
+ first-class `role: 'tool'` message shape (no wrapping `tool-result` content block).
262
+ - Release gates re-pinned to the official 0.1.7 release: `verify-release.mjs` and the packed
263
+ E2E now assert selector peers `>=0.1.7-rc.1 <0.2.0-0`, and the packed E2E's official-harness
264
+ clone asserts tag `dsh-v0.1.7-rc.2` (commit `477b4f42`, tree `e3e63253`).
265
+ - `packages/selector/dsh.plugin.json` now carries the release version (0.6.5; every earlier
266
+ 0.6.x shipped it frozen at 0.1.0) and declares the honest engine range
267
+ `>=0.1.7-rc.1 <0.2.0-0`.
268
+ - Lint debt from the 0.6.3 manual adaptations cleared: unused imports/locals removed in
269
+ `src/index.ts`, `src/client/index.ts`, `src/pruner.ts`, and three host specs; the
270
+ standing-generation staging-leftover scan now scopes to the spec's own store so a
271
+ concurrently publishing spec cannot fail it.
272
+
273
+ ## 0.6.4 - 2026-09-26
274
+
275
+ ### Fixed
276
+
277
+ - The client locale binder is eager: switching the host locale now re-renders the
278
+ compression settings UI without a remount.
279
+ - Released from a stash and never committed to any branch (the working tree that published it
280
+ was lost); compat/0.1.7 restored the exact content in 0.6.5 and byte-verified it against
281
+ the registry tarball before continuing.
282
+
283
+ ## 0.5.4 - 2026-09-20
284
+
285
+ ### Fixed
286
+
287
+ - The install surface declares `@deepseek-ai/schemastery` as a runtime dependency. The packaged
288
+ runtime imports it unconditionally (`import z from '@deepseek-ai/schemastery'` in
289
+ `packages/selector/lib/index.js`, `lib/pruner.js` and `lib/advisor-state.js`), but 0.5.3
290
+ declared it nowhere a consumer install reads: the shipped root manifest listed only
291
+ `@huggingface/tokenizers` and `js-yaml`, and `packages/selector/package.json` listed it as a
292
+ peer, which no package manager consults for a nested package it installs. Resolution therefore
293
+ depended on an unrelated installed package hoisting `@deepseek-ai/schemastery` into the
294
+ profile. In a clean install the import fell through to the Harness installation's
295
+ shared-module fallback at `$DSH_HOME/profiles/node_modules`; where that fallback held no built
296
+ package, every plugin entry failed to load and the host booted without the Bundle layer. Both
297
+ manifests now pin `3.18.2`, the version this release is built and tested against, and the
298
+ selector package no longer claims a peer obligation it does not have.
299
+
300
+ ### Added
301
+
302
+ - `verify:release` derives the install-surface dependencies from the bare specifiers the
303
+ packaged runtime files import, instead of naming `@huggingface/tokenizers` and `js-yaml` by
304
+ hand. Which packages ship with the plugin and which the Harness installation provides is a
305
+ reviewed list, and an import whose provider is in neither manifest fails the gate with the
306
+ missing name. The gate was added as a negative control against the unfixed manifests, where it
307
+ failed on `@deepseek-ai/schemastery`.
308
+
309
+ ## 0.5.3 - 2026-09-20
310
+
311
+ ### Fixed
312
+
313
+ - The Bundle patch no longer sets the retired review route flag. `reviewQueueRoute` was
314
+ removed from the plugin's Config schema when the review gate was retired, but it stayed in
315
+ `packages/selector/cordis.patch.yml`, where it advertised a route that can never register.
316
+ Hosts tolerate the unknown key today (the plugin loads and serves — verified on a live host),
317
+ so this is a stale-config defect rather than a break, but it would break on any host that
318
+ validates plugin config strictly.
319
+ - Generated artifacts are pinned to LF (`packages/selector/lib/** text eol=lf`). With
320
+ `core.autocrlf=true` every checkout rewrote the committed `lib/**` to CRLF, so any branch
321
+ switch or merge left the whole artifact directory reported as modified with EOL-only
322
+ differences. Nothing was ever committed from that state, but it made every tree look dirty
323
+ and it would hide a real artifact change.
324
+
325
+ ### Added
326
+
327
+ - A negative-control contract pin on the Bundle patch: it fails when a retired config key is
328
+ set in the patch (asserted on key-setting lines, so the explanatory comment may still name
329
+ the key), and it requires the live `estimatorCatalogRoute` flag to stay wired.
330
+
331
+ ### Tests
332
+
333
+ - The client seat contract also pins the older-host degradation: a host that does not declare
334
+ the seat rejects the registration at the slot boundary, and `apply()` must swallow it and
335
+ warn instead of taking every settings entry down with it.
336
+
337
+ ## 0.5.2 - 2026-09-20
338
+
339
+ ### Changed
340
+
341
+ - The human-gated review pipeline (beta) is **retired**. Its semantics are replaced by
342
+ advice: the benefit model still prices every pass as ONE merged mutation, but the band it
343
+ computes (`profitable` / `high-impact` / `slow-payback` / `unpriceable` / `not-worth-it`)
344
+ is now published as a `reduction-advice` audit record and snapshotted onto the advisor
345
+ report route — it never withholds, delays, or rewrites a reduction. The gate contradicted
346
+ the feature's own requirement (a reduction must never block automatic processing) and, with
347
+ the shipped defaults (`reviewMode` on plus a 4,000-token high-impact threshold against an
348
+ 8,192-token fresh trigger), diverted 100% of a fresh batch into human review, leaving the
349
+ automatic path effectively off for anyone who opted in. The advice thresholds are now
350
+ module constants (α `0.1`, high-impact `4,000` tokens): nothing acts on them, so they are
351
+ no longer settings.
352
+ - Removed with the gate: the review queue and its `storageDomain` adapter, the process-wide
353
+ registry, the `review-queue` / `review-decide` HTTP routes and the `reviewQueueRoute`
354
+ deployment flag, the `shell.overlay` client panel, the `reviewMode` /
355
+ `reviewTimeoutTurns` / `cacheHitDiscountAlpha` / `reviewHighImpactTokens` settings keys,
356
+ and the `review-outcome` audit kind. The four settings keys stay ACCEPTED and IGNORED by
357
+ both decoders — an existing document (the live one carries `reviewMode: false`) still loads
358
+ and still renders its settings card — and never reach the resolved policy. The read-only
359
+ `GET .../advisor-report` route additionally serves `lastAdvice`.
360
+
361
+ ### Added
362
+
363
+ - Regression pins for the retirement: a host-integration spec drives the exact settings that
364
+ used to divert everything (`reviewMode: true`, `reviewHighImpactTokens: 1`) and asserts the
365
+ fresh batch LANDS, described by a `high-impact` advice record; a deprecation-contract spec
366
+ pins accept-and-ignore for the retired keys on both the runtime parser and the browser
367
+ decoder.
368
+
369
+ ### Rollback
370
+
371
+ - Reinstall the last release that still ships the gate: `npm dist-tag add
372
+ dsh-context-compression-improved@0.5.1 dsh-0.1.5 --registry https://registry.npmjs.org/`
373
+ then `dsh plugin --profile web add dsh-context-compression-improved@0.5.1`.
374
+
375
+ ## 0.5.1 - 2026-09-20
376
+
377
+ ### Fixed
378
+
379
+ - Concurrent preset-overlay composition of one identity no longer fails on Windows.
380
+ Publication is now serialized per destination path, and when the atomic rename still
381
+ loses the race the destination is confirmed to already carry this staging file's
382
+ `{mtimeMs, size}` standing key before the publish reports success. Windows `MoveFileEx`
383
+ reports that lost race as `EPERM`/`EBUSY` where POSIX `rename` simply replaces the
384
+ destination, which made `standingKeyFor()` throw during concurrent session start. A
385
+ destination that does not match still fails loudly, so a silently reused generation
386
+ stays forbidden.
387
+ - Release-gate and test repairs that had been hiding this and other pre-existing red
388
+ gates: stale identifiers and a retired audit reason in the packed smokes, a stale
389
+ client-inject expectation, and Windows-only spawn traps (`git` and multi-line
390
+ `node -e` scripts were routed through `cmd.exe`, which rewrote their arguments).
391
+
392
+ ## 0.5.0 - 2026-09-20
393
+
394
+ ### Added
395
+
396
+ - Advisory relevance advisor (statistics and suggestions only, default off): at every turn
397
+ boundary a fire-and-forget pass summarizes the session's tail-task semantics from the
398
+ most recent `todo/write` event (falling back to recent user text), incrementally scores
399
+ historical tool-result candidates for content-and-comment relevance against the current
400
+ task, and computes a prefix-decay figure (character-pressure-weighted mean relevance).
401
+ Low-relevance old segments are marked `recertified` as suggestions for later
402
+ history-aggressiveness decisions — nothing this round consumes them, and advisor output
403
+ can never suppress, delay, or rewrite any reduction that would land (pinned by a
404
+ dedicated invariant test). Configure through the `presetOptions.advisor*` settings keys
405
+ (`advisorMode` `''|'host'|'direct'`, default `''`; the direct channel reuses the
406
+ estimator endpoint; `SideChannel` gained an optional overrides parameter so the
407
+ estimator's transport is shared without sharing its configuration). Observability: new
408
+ `advisor-outcome` audit records (content-free, one per phase: summary / scoring / decay)
409
+ and a read-only `GET .../advisor-report?sessionId=` HTTP route (opt-in deployment flag
410
+ `advisorReportRoute`, mirroring the review routes). Client UI is intentionally absent
411
+ this round.
412
+
413
+ ## 0.4.0 - 2026-09-20
414
+
415
+ ### Fixed
416
+
417
+ - The plugin no longer depends on the routed model id: every planning gate now decides on
418
+ the character basis (Unicode code points via `characterPressure` / `pressureCost`) instead
419
+ of exact tokenizer counts, so a route without a bundled tokenizer (the live
420
+ `deepseek-flash`) lands rewrites again instead of silently skipping. Token thresholds keep
421
+ their names and values (converted at the documented 4.0 chars/token convention, frozen
422
+ profile baseline untouched); token figures become telemetry, labelled honestly by the new
423
+ `measurementBasis` field on rewrite audit records (`exact-tokenizer` vs `characters`,
424
+ with `tokenizerId: 'characters'` / `tokenizerRevision: 'chars-per-token-4.0'` when derived).
425
+ Rollback: `git revert 7a1972a` restores the exact-tokenizer gates as a single unit; confirm
426
+ no later change re-introduced a model-id split that relies on this commit first.
427
+
428
+ ### Added
429
+
430
+ - Batch-level benefit pricing (R1): a review pass is priced as ONE merged mutation — the
431
+ tail KV-cache refill penalty is paid once per batch instead of per candidate, so real
432
+ batches (5×50k with a 64k tail) reach the auto band instead of all dropping.
433
+ - Original-event line mapping (R9a): terminal normalization returns folded lines that each
434
+ carry their 1-based original-event line number; `retrieve` reads raw events, so printed
435
+ ranges resolve to the right lines.
436
+ - Document skeleton and universal prose keep (R8/R8b): structured documents keep headings,
437
+ section first/last lines, list starts and table headers; every other non-code text keeps
438
+ head AND tail with an R9 line-range marker (prose was previously head-only truncated).
439
+ - Two-tier search folding (R10, fixes D8): a lossless per-file L1 locator plus a
440
+ water-filled L2 content quota.
441
+ - Non-adjacent frequency folding (R11): separated exact repeats (up to 8.37% of large
442
+ results) fold to first occurrence plus one counted marker.
443
+ - Long-string placeholders (R12): base64/hex/UUID blobs become length summaries with a
444
+ 16-char recognition prefix.
445
+ - Two-stage HTML reduction (R13, fixes D9): `html-slim` then `html-skeleton`, line-aligned
446
+ so original line numbers survive.
447
+ - R9b anchors: contiguous masks cite original line ranges, scatter masks report
448
+ `lines 1-N scanned, K kept`, and every retrieve hint carries a pasteable
449
+ `{"ref":…,"start_line":N,"max_lines":80}`.
450
+ - Document census: omitted-document summaries list section headings instead of a constant
451
+ `0 error, 0 warn, N info` histogram.
452
+
453
+ ## 0.3.1 - 2026-09-18
454
+
455
+ ### Changed
456
+
457
+ - The runtime package is merged into the selector package: one install brings the whole
458
+ stack, the repository root is the install surface (`name`, `main`, `types`, `exports` with
459
+ `./pruner` and `./invariant`, `dependencies`, `dsh`), and the toolchain, scripts and CI were
460
+ swept to the single package. The verified estimator-catalog registration (dual prefix, guarded
461
+ two-channel activation, per-request service resolution, visible lifecycle lines) was replayed
462
+ onto this line with a host-side guard; the settings schema that `ab2175a` had downgraded to
463
+ `z.any()` is restored, so the daily Custom defaults are published again.
464
+ - Adapt to the official DeepSeek Harness `v0.1.5-rc.2` on this branch. All `@deepseek-ai/dsh-*` dev dependencies and the pinned e2e host set move from `0.1.1-rc.2` to `0.1.5-rc.2` (cordis `4.0.2`, schemastery `3.18.2`), including the new split packages (`dsh-session-projection`, `dsh-session-persistence`, `dsh-atomic-write`, `dsh-home-paths`, `dsh-sandbox`, and related) and the `dsh-client-store` client stack.
465
+ - Surface replace operations now use the v3 `startSeq`/`endSeq` shape with branded `SessionSeq` values; `compaction/prune` manifests keep the durable `start`/`end` fields. Events are resolved from surface nodes by seq lookup instead of array indexing.
466
+ - The client bundle no longer imports the removed `@deepseek-ai/dsh-client-runtime`: settings types now come from `@deepseek-ai/dsh-client-ui-settings` and the session hooks merge from `@deepseek-ai/dsh-client-ui-session`. `engines.dsh >=0.1.5-alpha.1 <0.2.0-0` is declared in both package manifests and `dsh.plugin.json`.
467
+ - Harness 0.1.5 no longer exposes the session `agentPreset` to the browser, so the client can no longer detect Minimal-only sessions; the selector stays selectable and the old unavailable banner is unreachable.
468
+ - Test batteries updated for 0.1.5 semantics: cordis plugin starts require `.await()`, the Token Meter requires a mounted `SessionProjectionRegistry`, assistant events carry `stream: []`, and settings namespaces are plain strings.
469
+
470
+ ### Fixed
471
+
472
+ - The estimator card no longer demands an API key on the Harness host channel. Selecting the host channel shows the live provider/model dropdowns, names the route that would actually run (explicit override, else the session default), and renders neither a key field nor a second manual model input: the base URL, the model text field, and the write-only key belong to the direct endpoint channel alone.
473
+ - `presetOptions` writes are path-addressed. Writing the whole section replaced it, so touching any second estimator field (a provider, a model, an endpoint) deleted `estimatorMode` and every sibling override — silently switching the estimator back off while the panel still reported a successful save. Each field now writes only itself, `undefined` clears exactly the field it names, and the confirmation read validates the same field set instead of the mode alone.
474
+ - New coverage: `packages/selector/tests/preset-options-write.client.spec.ts` (path-scoped writes, sibling preservation, explicit clears, no-op patches, uncommitted-write reporting) and `packages/selector/tests/estimator-channel.client.spec.tsx` (per-channel fields, catalog dropdowns, manual fallback).
475
+
476
+
477
+ ### Added
478
+
479
+ - New `tokenpilot-inspired` profile: a TokenPilot-paper-inspired capability matrix layered on the Balanced thresholds, selected explicitly from the settings UI; every pre-existing profile keeps a byte-identical resolved policy (enforced by a captured-baseline golden test).
480
+ - Byte-identical repeated tool-result dedup: an oversized repeat is replaced with a pointer to the first occurrence's append-only original event (`dedupe-pointer`), with a per-session SHA-256 index (2,048-entry insertion-order eviction, hash+seq metadata only).
481
+ - No-net-savings guard: replacements whose text is not smaller than the original are rejected even when the exact tokenizer reports a token saving.
482
+ - Recovery exemption: recovery-tool output is permanently exempt from every reduction pass via a unified per-session exemption set, preventing compress-restore oscillation.
483
+ - Auto Compact summary locator: after `compaction/end`, the landed summary checkpoint gains an Exact Sources block (shadowed seq range, spill files, touched files) so summarized-away details stay recoverable; skipped when it would locate nothing concrete.
484
+ - Read-state semantics: a historical read whose file was later mutated is `superseded` and takes the small whole-result placeholder; optional error/warn/info clustering of omitted lines is appended to historical placeholders.
485
+ - Optional residual-utility estimator (three channels: off / Harness host model / direct OpenAI-compatible endpoint) with per-session exponential backoff, strict timeout, advisory-only verdicts consumed by the next pressure pass, and numeric-only `estimator-outcome` audits. The estimator card appears only while the new profile is selected; the API key is write-only in settings and never enters the frozen policy, audits, or logs.
486
+ - New audit records: `summary-locator` and `estimator-outcome`; the rewrite record covers dedup via the `dedupe-pointer` reducer. Audit field allowlists are unchanged.
487
+ - Simplified Chinese and English copy for the new profile and estimator card; unit and golden coverage under `packages/runtime/tests/tokenpilot/`.
488
+
489
+ - Orthogonal code-skeleton compression gate (`codeSkeleton.enabled`, default off): the first exposure of an oversized fresh source-code tool result can keep an imports-and-declarations skeleton with bodies elided and error lines preserved, falling back to the original head pruning. The gate is independent of every profile and gated on exact tokenizer measurement.
490
+ - Settings-UI toggle for the gate in the selector settings section, with Simplified Chinese and English copy.
491
+ - Browser/runtime decode parity for the new section, confirm-on-write contract tests for `saveCodeSkeleton`, and a full-document parity matrix extension.
492
+
493
+ ### Changed
494
+
495
+ - Added an ESLint flat-config baseline (`pnpm lint`, enforced in CI) and a `pnpm test:watch` TDD loop; removed dead imports and hardened two error paths surfaced by the lint baseline.
496
+ - This repository is now maintained as an improved fork of `WilliamShi666/dsh-context-compression-selector`; documentation ships in English, Simplified Chinese, Japanese, and Korean.
497
+
498
+ ## 0.1.0 - 2026-09-03
499
+
500
+ ### Added
501
+
502
+ - Stable release of DeepSeek V4 Flash Vision tokenizer integration for `deepseek-v4-flash-vision-exp`, including exact text counting and bounded image-token estimates.
503
+ - User-configurable model-driven Auto Compact threshold in the selector settings section.
504
+ - Auto Compact threshold linkage for each standard profile's History / micro-compact watermarks and related compression parameters.
505
+
506
+ ### Changed
507
+
508
+ - The threshold editor now uses one direct numeric input; the slider and fixed quick-value buttons were removed.
509
+ - Runtime session-event access supports both the established Harness `events` accessor and the newer `snapshotEvents()` public API.
510
+
511
+ ## 0.1.0-beta.4 - 2026-09-02
512
+
513
+ ### Fixed
514
+
515
+ - Support the official DeepSeek Harness `dsh-v0.1.2-alpha.5` public API while retaining compatibility with the existing `0.1.1-rc.2` peer range. The plugin now owns the two small immutable-value helpers that the newer Harness no longer exports, and uses the same public `context-compression` namespace literal accepted by both Settings implementations. No Harness core code is modified.
516
+
517
+ ## 0.1.0-beta.3 - 2026-09-01
518
+
519
+ ### Scope
520
+
521
+ This is a staged release. Exact **text-class** token counting for `deepseek-v4-flash-vision-exp`, best-effort bounded **vision-class image** estimates, and the Auto Compact threshold/UI/audit work are delivered. Exact image measurement remains **BLOCKED upstream**: the current measurement seam exposes neither the adapter's projected request-image dimensions nor the absolute serialized position, so estimates cannot be promoted to `exact-tokenizer`.
522
+
523
+ ### Added
524
+
525
+ - DeepSeek V4 Flash Vision support for `deepseek-v4-flash-vision-exp` via a separately bundled official tokenizer pinned at `deepseek-ai/DeepSeek-V4-Flash-Vision-Exp` revision `6821d6ad3681a4b137b066b76094fa82ebd0a380`. Text, reasoning, tool-call arguments, and pure-text tool results are counted exactly; image-bearing tool-result candidates stay fail-open.
526
+ - Vision image-token arithmetic ported line-by-line from the official `inference/image_processor.py` (patch size 14, downsample 3, 384-token cap, min pixels 147456, 8:1 aspect clamp, and position-dependent alignment padding), validated against golden fixtures generated by executing the official Python implementation. Valid intrinsic dimensions now produce `tokenizer-estimate` at the midpoint of all four alignment residues with a 384-token per-image upper bound; malformed or unevaluable dimensions use a documented 256-token fallback. Mixed text/image surfaces aggregate exact text and estimated images without promoting them to exact.
527
+ - `autoCompact.thresholdPercent` setting (default 80, integer 50–90, step 1) with one shared validation contract across the settings UI, the persisted schema, and the runtime resolver. The editor lives inside the context-compression selector settings section.
528
+ - Standard-profile History linkage to the Auto Compact watermark: `A = floor(C × a)` rescales the History trigger, minimum reclaim, and recent-token tail; `D = floor(A × 0.875)` replaces the fixed 0.7 capacity-pressure ratio as the micro-compact last-chance gate; one batch must justify its cache break by pulling the complete request back below the deadline. Defaults at 80% reproduce the previous numbers exactly.
529
+ - The preset overlay writes the saved threshold into the generated `compaction-basic` composition as `thresholdRatio` (with `retainRatio` pinned at 0.16) and, from the same read, into the plugin runtime's deployment config as `autoCompactThresholdPercent`, so one standing generation never runs Auto Compact and micro compact on two different thresholds. Any generation-identity change — threshold, source, or module paths, including equal-length ones — produces a new standing composition generation. Deterministic identity-derived stamps use an 8-hex whole-second window; equal-prefix identities can collide in that first window on a coarse filesystem, so the overlay observes the staging file's real `mtimeMs+size` key and escalates to later hash windows before the atomic rename. Content, permissions, and the final unique stamp are complete before publication; already-running sessions keep their frozen policy.
530
+ - `policy-resolved` audits now record the Auto Compact coordination facts (threshold percent, `A`, `D`, parameter source — including `deployment-override`/`mixed` when deployment config replaces linked History watermarks), the routed provider/model, and the bundled tokenizer identity.
531
+ - Persisted settings reject present-but-invalid sections (`profile: null`, `custom: null`, own-property `undefined`) before any schema default can absorb them; a malformed stored document freezes the session losslessly (`profile: off`, audited as `settingsInvalidFallback: lossless-off`) instead of silently enabling the lossy Balanced default. The browser decoder applies the same rule and canonicalizes legacy Custom v1/v2 documents to the same v3 document the runtime resolver produces.
532
+ - The History planner returns a discriminated outcome, and `component-evaluation` audits distinguish the full skip taxonomy: `below-profile-trigger`, `below-micro-deadline`, `exact-tokenizer-unavailable`, `no-safe-candidates` (only recovery-tool output or already-cleared results), `protected-working-set` (everything inside the protected tail), `insufficient-reclaim` and `cannot-reach-deadline-target` (with the reached/required token numbers), `adaptive-cost-rejected`, and `recovery-tool-unavailable`.
533
+
534
+ ### Known limitations
535
+
536
+ - Images never claim exact counts. The official expansion depends on the absolute prompt position (system prompt, chat-template framing, adapter image handles) and on the adapter's final request-image projection (including per-route `imagePixelBudget`/`imageDetail` overrides and byte-cap reprojection), none of which is exposed through the current measurement seam. Intrinsic/default estimates may therefore differ materially from provider accounting. Upstream capability requests remain projected request-image dimensions and the absolute serialized position exposed to token-meter extensions.
537
+ - History skips the whole batch whenever any tool-result candidate lacks an exact count, including image-bearing candidates, even though sibling text candidates are individually exact.
538
+ - Custom remains manual token mode; its History parameters do not follow the Auto Compact watermark.
539
+ - A vision token breakdown UI is not shipped; image estimates and the intrinsic alignment diagnostic are available on the measured token view, while lossy rewrite proofs still require exact counts.
540
+
541
+ ### Deferred
542
+
543
+ - Audit `modality` field and the tokenizer artifact SHA-256 inside audit records (the audits already carry the routed provider/model and tokenizer identity).
544
+ - Publishing the (now complete) runtime skip-reason taxonomy as a user-facing documentation table.
545
+ - Custom-profile display of the A/D watermarks and an above-D warning; Custom remains fully manual.
546
+ - Vision token breakdown UI and promotion of image estimates to exact measurement.
547
+
548
+ ## 0.1.0-beta.2 - 2026-08-28
549
+
550
+ ### Fixed
551
+
552
+ - Resolve the official DeepSeek V4 Flash tokenizer route so Fresh and Aggregate can evaluate tool results for the supported V4 models.
553
+ - Run Cache Strict History at the real request boundary once its configured capacity-pressure condition is met; trigger the capacity condition at 70% routed-context utilization.
554
+ - Disable Harness-native head/middle/tail tool-result pruning whenever a selector profile is active, leaving the selector as the sole tool-result compactor.
555
+
556
+ ### Changed
557
+
558
+ - Protect the newest 10 agent tool calls and a 64,000-token tool-result tail window before History/microcompact rewrites older results.
559
+
560
+ ## 0.1.0-beta.1 - 2026-08-27
561
+
562
+ ### Added
563
+
564
+ - One-install DeepSeek Harness Product Bundle backed by a separate exact-version runtime package.
565
+ - Web profile selector with preset-stable settings and an explicit built-in Minimal exception.
566
+ - Fresh, Aggregate, routine/capacity-aware History, Native tool-result pruning, and default-off Custom TailTrim.
567
+ - Standard-event TailTrim protocol using `compaction/prune` plus recoverable `user/message` replacement.
568
+ - Plugin-owned `context_compression_retrieve` recovery tool.
569
+ - Structured, content-free policy, evaluation, rewrite, failure, and Native auto-compact audit records.
570
+ - Pinned official DeepSeek V4 tokenizer assets with runtime SHA-256 validation and upstream license.
571
+ - Public-API component E2E, preset/Minimal, and parent/fork/spawn cache-prefix regression tests.
572
+
573
+ ### Compatibility
574
+
575
+ - Verified against DeepSeek Harness `dsh-v0.1.1-rc.2` public packages.
576
+ - Exact tokenizer mapping is currently limited to `deepseek-v4-flash` and `deepseek-v4-pro`.
577
+
578
+ ### Known limitations
579
+
580
+ - Adaptive ordinary History fails closed when public request-level route/cache evidence is incomplete; capacity pressure remains a separate safety override.
581
+ - Cache-prefix tests prove native fork inheritance and identical serialized prefixes, not a provider-specific cache allocation or a guaranteed DeepSeek cache hit.
582
+ - Settings snapshots and first-exposure decisions are process-local to the mounted runtime.