dsh-context-compression-improved 0.9.8 → 0.9.9-beta.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 (239) hide show
  1. package/README.md +15 -98
  2. package/README.zh.md +14 -92
  3. package/THIRD_PARTY_NOTICES.md +25 -7
  4. package/{packages/selector/dsh.plugin.json → dsh.plugin.json} +1 -1
  5. package/{packages/selector/lib → lib}/client.d.ts +16 -0
  6. package/{packages/selector/lib → lib}/client.js +393 -116
  7. package/{packages/selector/lib → lib}/index.js +829 -10
  8. package/{packages/selector/lib → lib}/invariant.js +2 -1
  9. package/{packages/selector/lib → lib}/pruner.d.ts +1 -1
  10. package/{packages/selector/lib → lib}/pruner.js +77 -983
  11. package/lib/savings-integral.js +4515 -0
  12. package/{packages/selector/lib → lib}/tail-trim.js +2 -90
  13. package/lib/tool-result.js +150 -0
  14. package/package.json +125 -112
  15. package/screenshots.json +3 -6
  16. package/.gitattributes +0 -2
  17. package/.githooks/pre-push +0 -37
  18. package/.github/workflows/ci.yml +0 -39
  19. package/CHANGELOG.de.md +0 -580
  20. package/CHANGELOG.es.md +0 -588
  21. package/CHANGELOG.fr.md +0 -576
  22. package/CHANGELOG.it.md +0 -577
  23. package/CHANGELOG.ja.md +0 -261
  24. package/CHANGELOG.ko.md +0 -254
  25. package/CHANGELOG.md +0 -536
  26. package/CHANGELOG.ru.md +0 -554
  27. package/CHANGELOG.zh.md +0 -236
  28. package/CONTRIBUTING.md +0 -22
  29. package/README.de.md +0 -96
  30. package/README.es.md +0 -96
  31. package/README.fr.md +0 -96
  32. package/README.it.md +0 -96
  33. package/README.ja.md +0 -102
  34. package/README.ko.md +0 -102
  35. package/README.ru.md +0 -96
  36. package/SECURITY.md +0 -18
  37. package/assets/board.png +0 -0
  38. package/assets/context.png +0 -0
  39. package/docs/assets/context-compression-selector-profiles.jpg +0 -0
  40. package/docs/assets/context-compression-selector-settings.png +0 -0
  41. package/docs/compat-0.1.5-report.md +0 -77
  42. package/docs/installation.de.md +0 -104
  43. package/docs/installation.es.md +0 -104
  44. package/docs/installation.fr.md +0 -104
  45. package/docs/installation.it.md +0 -104
  46. package/docs/installation.ja.md +0 -78
  47. package/docs/installation.ko.md +0 -78
  48. package/docs/installation.md +0 -103
  49. package/docs/installation.ru.md +0 -104
  50. package/docs/installation.zh.md +0 -100
  51. package/docs/repair-log.md +0 -657
  52. package/eslint.config.js +0 -30
  53. package/packages/selector/LICENSE +0 -21
  54. package/packages/selector/README.md +0 -26
  55. package/packages/selector/README.zh.md +0 -24
  56. package/packages/selector/THIRD_PARTY_NOTICES.md +0 -32
  57. package/packages/selector/docs/history-tool-call-working-set-spec.md +0 -112
  58. package/packages/selector/docs/native-tool-result-selector-spec.md +0 -34
  59. package/packages/selector/docs/subagent-cache-reuse-spec.md +0 -46
  60. package/packages/selector/lib/config.js +0 -1777
  61. package/packages/selector/lib/host-generation.js +0 -62
  62. package/packages/selector/lib/style.css +0 -350
  63. package/packages/selector/package.json +0 -174
  64. package/packages/selector/screenshots.json +0 -3
  65. package/packages/selector/src/client/CompressionProfileControls.tsx +0 -293
  66. package/packages/selector/src/client/CompressionProfileSelector.module.css +0 -199
  67. package/packages/selector/src/client/CompressionProfileSelector.tsx +0 -85
  68. package/packages/selector/src/client/CustomPolicyEditor.tsx +0 -216
  69. package/packages/selector/src/client/EstimatorControls.tsx +0 -277
  70. package/packages/selector/src/client/bridge-scope.ts +0 -125
  71. package/packages/selector/src/client/decode.ts +0 -57
  72. package/packages/selector/src/client/index.ts +0 -421
  73. package/packages/selector/src/client/locales/de.ts +0 -142
  74. package/packages/selector/src/client/locales/es.ts +0 -142
  75. package/packages/selector/src/client/locales/fr.ts +0 -142
  76. package/packages/selector/src/client/locales/it.ts +0 -142
  77. package/packages/selector/src/client/locales/ja.ts +0 -142
  78. package/packages/selector/src/client/locales/ko.ts +0 -142
  79. package/packages/selector/src/client/locales/ru.ts +0 -142
  80. package/packages/selector/src/client/locales.ts +0 -284
  81. package/packages/selector/src/client/monitor-fab.ts +0 -349
  82. package/packages/selector/src/client/preset-options.ts +0 -88
  83. package/packages/selector/src/client/savings-card.tsx +0 -150
  84. package/packages/selector/src/client/scope-face.ts +0 -24
  85. package/packages/selector/src/client/settings-section.tsx +0 -140
  86. package/packages/selector/src/compat/host-generation.ts +0 -96
  87. package/packages/selector/src/compat/llm-messages.ts +0 -50
  88. package/packages/selector/src/compat/settings-lease.ts +0 -108
  89. package/packages/selector/src/compat/tool-result.ts +0 -91
  90. package/packages/selector/src/css-modules.d.ts +0 -6
  91. package/packages/selector/src/deepseek-v4-tokenizer.ts +0 -205
  92. package/packages/selector/src/estimator-catalog.ts +0 -104
  93. package/packages/selector/src/index.ts +0 -655
  94. package/packages/selector/src/invariant.ts +0 -113
  95. package/packages/selector/src/preset-overlay.ts +0 -749
  96. package/packages/selector/src/profiles.ts +0 -431
  97. package/packages/selector/src/pruner/content.ts +0 -198
  98. package/packages/selector/src/pruner/session.ts +0 -97
  99. package/packages/selector/src/pruner/state.ts +0 -61
  100. package/packages/selector/src/pruner/tuning.ts +0 -23
  101. package/packages/selector/src/pruner/types.ts +0 -78
  102. package/packages/selector/src/pruner.ts +0 -2868
  103. package/packages/selector/src/runtime/adaptive-cost.ts +0 -205
  104. package/packages/selector/src/runtime/audit.ts +0 -303
  105. package/packages/selector/src/runtime/config.ts +0 -756
  106. package/packages/selector/src/runtime/custom-policy.ts +0 -278
  107. package/packages/selector/src/runtime/deepseek-official-pricing.ts +0 -298
  108. package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +0 -254
  109. package/packages/selector/src/runtime/measurement.ts +0 -444
  110. package/packages/selector/src/runtime/monitor.ts +0 -235
  111. package/packages/selector/src/runtime/reducers.ts +0 -1754
  112. package/packages/selector/src/runtime/retrieve.ts +0 -484
  113. package/packages/selector/src/runtime/savings-projection.ts +0 -226
  114. package/packages/selector/src/runtime/savings.ts +0 -417
  115. package/packages/selector/src/runtime/session-events.ts +0 -30
  116. package/packages/selector/src/runtime/summary-command.ts +0 -127
  117. package/packages/selector/src/runtime/tail-trim.ts +0 -176
  118. package/packages/selector/src/runtime/token-count.ts +0 -72
  119. package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +0 -233
  120. package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +0 -204
  121. package/packages/selector/src/runtime/tokenpilot/advisor.ts +0 -419
  122. package/packages/selector/src/runtime/tokenpilot/benefit.ts +0 -200
  123. package/packages/selector/src/runtime/tokenpilot/dedup.ts +0 -81
  124. package/packages/selector/src/runtime/tokenpilot/estimator.ts +0 -151
  125. package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +0 -53
  126. package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +0 -65
  127. package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +0 -125
  128. package/packages/selector/src/runtime/tokenpilot/intent-range.ts +0 -37
  129. package/packages/selector/src/runtime/tokenpilot/locator.ts +0 -128
  130. package/packages/selector/src/runtime/tokenpilot/read-state.ts +0 -98
  131. package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +0 -303
  132. package/packages/selector/src/runtime/toolclass.ts +0 -103
  133. package/packages/selector/src/runtime/types.ts +0 -365
  134. package/packages/selector/src/runtime/value.ts +0 -48
  135. package/packages/selector/src/settings-bridge.ts +0 -175
  136. package/packages/selector/tests/advisor-report.host.spec.ts +0 -223
  137. package/packages/selector/tests/auto-compact.client.spec.tsx +0 -214
  138. package/packages/selector/tests/built/client-artifact.spec.ts +0 -56
  139. package/packages/selector/tests/cache-prefix-audit.spec.ts +0 -123
  140. package/packages/selector/tests/code-skeleton.client.spec.ts +0 -98
  141. package/packages/selector/tests/compat/compat-narrow-waist.spec.ts +0 -150
  142. package/packages/selector/tests/custom-contract.client.spec.ts +0 -226
  143. package/packages/selector/tests/estimator-catalog.spec.ts +0 -70
  144. package/packages/selector/tests/estimator-channel.client.spec.tsx +0 -253
  145. package/packages/selector/tests/estimator-route-registration.host.spec.ts +0 -199
  146. package/packages/selector/tests/helpers/legacy-namespace.ts +0 -35
  147. package/packages/selector/tests/helpers/legacy-settings/index.ts +0 -15
  148. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +0 -41
  149. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +0 -647
  150. package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +0 -78
  151. package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +0 -234
  152. package/packages/selector/tests/host-preset-overlay.host.spec.ts +0 -204
  153. package/packages/selector/tests/monitor-fab.client.spec.ts +0 -138
  154. package/packages/selector/tests/preset-options-write.client.spec.ts +0 -192
  155. package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +0 -200
  156. package/packages/selector/tests/preset-overlay.host.spec.ts +0 -246
  157. package/packages/selector/tests/profiles.client.spec.tsx +0 -436
  158. package/packages/selector/tests/public/package-contract.client.spec.ts +0 -86
  159. package/packages/selector/tests/runtime/adaptive-cost.spec.ts +0 -167
  160. package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +0 -230
  161. package/packages/selector/tests/runtime/advisor-invariant.spec.ts +0 -272
  162. package/packages/selector/tests/runtime/advisor.spec.ts +0 -226
  163. package/packages/selector/tests/runtime/audit.spec.ts +0 -275
  164. package/packages/selector/tests/runtime/auto-compact-config.spec.ts +0 -523
  165. package/packages/selector/tests/runtime/char-basis.spec.ts +0 -30
  166. package/packages/selector/tests/runtime/code-skeleton.spec.ts +0 -152
  167. package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +0 -186
  168. package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +0 -122
  169. package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +0 -122
  170. package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +0 -96
  171. package/packages/selector/tests/runtime/fixtures/profile-baseline.json +0 -273
  172. package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +0 -106
  173. package/packages/selector/tests/runtime/fixtures/vision-golden.json +0 -459
  174. package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +0 -74
  175. package/packages/selector/tests/runtime/fresh-gate.spec.ts +0 -43
  176. package/packages/selector/tests/runtime/html-reducer.spec.ts +0 -212
  177. package/packages/selector/tests/runtime/intent-gate.spec.ts +0 -62
  178. package/packages/selector/tests/runtime/intent-summary.spec.ts +0 -156
  179. package/packages/selector/tests/runtime/jsonl-reducer.spec.ts +0 -79
  180. package/packages/selector/tests/runtime/line-mapping.spec.ts +0 -153
  181. package/packages/selector/tests/runtime/monitor.spec.ts +0 -301
  182. package/packages/selector/tests/runtime/prose-reducers.spec.ts +0 -133
  183. package/packages/selector/tests/runtime/public/public-runtime.spec.ts +0 -2782
  184. package/packages/selector/tests/runtime/read-input-cap.spec.ts +0 -33
  185. package/packages/selector/tests/runtime/savings-projection.spec.ts +0 -89
  186. package/packages/selector/tests/runtime/savings.spec.ts +0 -139
  187. package/packages/selector/tests/runtime/search-reducer.spec.ts +0 -110
  188. package/packages/selector/tests/runtime/session-events.spec.ts +0 -27
  189. package/packages/selector/tests/runtime/settings-unwrap.spec.ts +0 -58
  190. package/packages/selector/tests/runtime/sidechannel.spec.ts +0 -241
  191. package/packages/selector/tests/runtime/summary-command.spec.ts +0 -154
  192. package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +0 -159
  193. package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +0 -53
  194. package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +0 -217
  195. package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +0 -52
  196. package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +0 -79
  197. package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +0 -76
  198. package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +0 -119
  199. package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +0 -82
  200. package/packages/selector/tests/runtime/toolclass.spec.ts +0 -156
  201. package/packages/selector/tests/runtime/value.spec.ts +0 -23
  202. package/packages/selector/tests/settings-seat.client.spec.ts +0 -215
  203. package/packages/selector/tests/standing-generation.host.spec.ts +0 -724
  204. package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +0 -269
  205. package/packages/selector/tests/support/cache-prefix-audit.ts +0 -105
  206. package/packages/selector/tests/support/mock-adapter.ts +0 -37
  207. package/packages/selector/tests/support/ui-primitives.tsx +0 -34
  208. package/packages/selector/tsconfig.json +0 -11
  209. package/packages/selector/tsdown.client.config.ts +0 -102
  210. package/packages/selector/tsdown.config.ts +0 -20
  211. package/pnpm-workspace.yaml +0 -72
  212. package/scripts/capture-profile-baseline.mjs +0 -42
  213. package/scripts/cell-browser-e2e.mjs +0 -354
  214. package/scripts/generate-tokenizer-fixtures.py +0 -81
  215. package/scripts/generate-vision-fixtures.py +0 -208
  216. package/scripts/hosts.mjs +0 -78
  217. package/scripts/packed-components-smoke.mjs +0 -763
  218. package/scripts/packed-install-e2e.mjs +0 -1346
  219. package/scripts/sync-hosts.mjs +0 -174
  220. package/scripts/toolclass-corpus-replay.mjs +0 -281
  221. package/scripts/verify-release.mjs +0 -335
  222. package/tests/TEST_INVENTORY.md +0 -41
  223. package/tsconfig.base.json +0 -18
  224. package/tsconfig.json +0 -7
  225. package/tsconfig.tests.json +0 -15
  226. package/vitest.built.config.ts +0 -9
  227. package/vitest.config.ts +0 -46
  228. /package/{packages/selector/assets → assets}/deepseek-v4/LICENSE.DeepSeek-V4-Pro.txt +0 -0
  229. /package/{packages/selector/assets → assets}/deepseek-v4/manifest.json +0 -0
  230. /package/{packages/selector/assets → assets}/deepseek-v4/tokenizer.json +0 -0
  231. /package/{packages/selector/assets → assets}/deepseek-v4/tokenizer_config.json +0 -0
  232. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/LICENSE.DeepSeek-V4-Flash-Vision-Exp.txt +0 -0
  233. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/manifest.json +0 -0
  234. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/tokenizer.json +0 -0
  235. /package/{packages/selector/assets → assets}/deepseek-v4-vision-exp/tokenizer_config.json +0 -0
  236. /package/{packages/selector/cordis.patch.yml → cordis.patch.yml} +0 -0
  237. /package/{packages/selector/lib → lib}/index.d.ts +0 -0
  238. /package/{packages/selector/lib → lib}/invariant.d.ts +0 -0
  239. /package/{packages/selector/lib → lib}/profiles.d.ts +0 -0
@@ -1,62 +0,0 @@
1
- //#region src/compat/host-generation.ts
2
- let cached;
3
- /**
4
- * Pure classifier from a RESOLVED settings service face. A service that still
5
- * exposes `register` is a pre-0.1.7 host (0.1.0–0.1.5 lines, dsh-settings pack
6
- * evidence — verified on the real 0.1.0-rc.2 host: `register(ns, schema,
7
- * options)` at dsh-settings/lib/index.js:311); from 0.1.7-rc.1 the service
8
- * drops register entirely and settings live in the loader-managed entry
9
- * config.
10
- */
11
- function classifySettingsFace(settings) {
12
- return typeof settings?.register === "function" ? "legacy" : "modern";
13
- }
14
- /**
15
- * Probe the host generation from the settings service face.
16
- *
17
- * A verdict is only CACHED from a resolved service object. Rows compose
18
- * before host services on every line (measured: the wire-time probe on a real
19
- * 0.1.0-rc.2 cell saw no settings service yet and the old code cached
20
- * 'modern' forever — the legacy lease arm went dead on the exact line it was
21
- * built for). While the service is absent the answer is a provisional
22
- * 'modern' and deliberately uncached, so the definitive
23
- * `noteResolvedSettingsService` evidence can still flip it.
24
- */
25
- function detectHostGeneration(ctx) {
26
- if (cached !== void 0) return cached;
27
- let settings;
28
- try {
29
- settings = ctx.get("settings");
30
- } catch {
31
- return "modern";
32
- }
33
- if (settings === null || typeof settings !== "object") return "modern";
34
- cached = classifySettingsFace(settings);
35
- return cached;
36
- }
37
- /**
38
- * Definitive verdict from the resolved service (evidence observed, not
39
- * guessed): the settings inject callback calls this once the service has
40
- * actually composed. Always (re)writes the cache — a provisional earlier
41
- * verdict must not survive real evidence.
42
- */
43
- function noteResolvedSettingsService(settings) {
44
- cached = classifySettingsFace(settings);
45
- return cached;
46
- }
47
- /**
48
- * Server-plane snapshot for code paths that hold no ctx (the tool-result
49
- * adapters). The bridge's inject callback has already noted the resolved
50
- * service by the time any session message flows, so this reads real evidence
51
- * on every line; without it the only safe answer is the provisional default.
52
- */
53
- function hostGenerationSnapshot() {
54
- return cached ?? "modern";
55
- }
56
- function compatLog(ctx, level = "info") {
57
- if (detectHostGeneration(ctx) === "legacy") return (message, ...rest) => console[level](`[dsh-context-compression-improved] ${message}`, ...rest);
58
- const sink = ctx.logger?.[level]?.bind(ctx.logger) ?? ((...rest) => console[level](...rest));
59
- return (message, ...rest) => sink(`[dsh-context-compression-improved] ${message}`, ...rest);
60
- }
61
- //#endregion
62
- export { noteResolvedSettingsService as i, detectHostGeneration as n, hostGenerationSnapshot as r, compatLog as t };
@@ -1,350 +0,0 @@
1
- .WcpPCW_settingsSection {
2
- max-width: 720px;
3
- color: var(--dsw-alias-label-primary);
4
- flex-direction: column;
5
- gap: 12px;
6
- display: flex;
7
- }
8
-
9
- .WcpPCW_settingsTitle {
10
- color: var(--dsw-alias-label-primary);
11
- margin: 0;
12
- font-size: 16px;
13
- font-weight: 500;
14
- line-height: 24px;
15
- }
16
-
17
- .WcpPCW_settingsDescription {
18
- color: var(--dsw-alias-label-tertiary);
19
- margin: 0;
20
- font-size: 14px;
21
- line-height: 22px;
22
- }
23
-
24
- .WcpPCW_root {
25
- width: 100%;
26
- }
27
-
28
- .WcpPCW_profileGrid {
29
- grid-template-columns: repeat(2, minmax(0, 1fr));
30
- gap: 10px;
31
- display: grid;
32
- }
33
-
34
- .WcpPCW_profileCard {
35
- border: 1px solid var(--dsw-alias-border-l2);
36
- min-height: 112px;
37
- color: var(--dsw-alias-label-primary);
38
- cursor: pointer;
39
- text-align: left;
40
- background: none;
41
- border-radius: 10px;
42
- flex-direction: column;
43
- gap: 8px;
44
- padding: 14px;
45
- display: flex;
46
- }
47
-
48
- .WcpPCW_profileCard:hover:not(:disabled) {
49
- background: var(--dsw-alias-interactive-bg-hover);
50
- }
51
-
52
- .WcpPCW_profileCard[aria-pressed="true"] {
53
- border-color: var(--dsw-alias-label-primary);
54
- }
55
-
56
- .WcpPCW_profileCard:active:not(:disabled) {
57
- transform: scale(.99);
58
- }
59
-
60
- .WcpPCW_profileCard:disabled {
61
- cursor: default;
62
- opacity: .6;
63
- }
64
-
65
- .WcpPCW_profileCard:focus-visible {
66
- outline-offset: 2px;
67
- outline: 2px solid;
68
- }
69
-
70
- .WcpPCW_profileCardTop {
71
- align-items: center;
72
- gap: 8px;
73
- display: flex;
74
- }
75
-
76
- .WcpPCW_profileCardTitle {
77
- font-size: 14px;
78
- font-weight: 500;
79
- line-height: 20px;
80
- }
81
-
82
- .WcpPCW_profileCurrent {
83
- background: var(--dsw-alias-label-primary);
84
- color: var(--dsw-alias-bg-base);
85
- border-radius: 999px;
86
- padding: 1px 6px;
87
- font-size: 10px;
88
- line-height: 14px;
89
- }
90
-
91
- .WcpPCW_profileCardDetail {
92
- color: var(--dsw-alias-label-secondary);
93
- font-size: 12px;
94
- line-height: 18px;
95
- }
96
-
97
- .WcpPCW_button {
98
- border: 1px solid var(--dsw-alias-border-l2);
99
- width: 100%;
100
- min-height: 34px;
101
- color: var(--dsw-alias-label-primary);
102
- cursor: pointer;
103
- text-align: left;
104
- background: none;
105
- border-radius: 10px;
106
- align-items: center;
107
- gap: 8px;
108
- padding: 6px 8px;
109
- display: flex;
110
- }
111
-
112
- .WcpPCW_button:hover {
113
- background: var(--dsw-alias-interactive-bg-hover);
114
- }
115
-
116
- .WcpPCW_button:disabled {
117
- cursor: default;
118
- opacity: .6;
119
- }
120
-
121
- .WcpPCW_copy {
122
- flex: 1;
123
- min-width: 0;
124
- }
125
-
126
- .WcpPCW_label {
127
- color: var(--dsw-alias-label-tertiary);
128
- font-size: 11px;
129
- line-height: 14px;
130
- }
131
-
132
- .WcpPCW_value {
133
- text-overflow: ellipsis;
134
- white-space: nowrap;
135
- font-size: 13px;
136
- line-height: 17px;
137
- overflow: hidden;
138
- }
139
-
140
- .WcpPCW_chevron {
141
- color: var(--dsw-alias-label-secondary);
142
- flex: none;
143
- }
144
-
145
- .WcpPCW_menuCopy {
146
- flex-direction: column;
147
- gap: 2px;
148
- min-width: 220px;
149
- display: flex;
150
- }
151
-
152
- .WcpPCW_menuTitle {
153
- font-size: 13px;
154
- line-height: 17px;
155
- }
156
-
157
- .WcpPCW_menuDetail {
158
- white-space: normal;
159
- max-width: 290px;
160
- color: var(--dsw-alias-label-tertiary);
161
- font-size: 11px;
162
- line-height: 15px;
163
- }
164
-
165
- .WcpPCW_error {
166
- color: var(--dsw-alias-state-error-primary);
167
- padding: 4px 8px 0;
168
- font-size: 11px;
169
- line-height: 15px;
170
- }
171
-
172
- .WcpPCW_unavailable {
173
- color: var(--dsw-alias-label-tertiary);
174
- padding: 4px 8px 0;
175
- font-size: 11px;
176
- line-height: 15px;
177
- }
178
-
179
- .WcpPCW_settingsHint {
180
- color: var(--dsw-alias-label-secondary);
181
- padding: 4px 8px 0;
182
- font-size: 11px;
183
- line-height: 15px;
184
- }
185
-
186
- .WcpPCW_pricing {
187
- color: var(--dsw-alias-label-tertiary);
188
- padding: 4px 8px 0;
189
- font-size: 11px;
190
- line-height: 15px;
191
- }
192
-
193
- .WcpPCW_custom {
194
- border-top: 1px solid var(--dsw-alias-border-l2);
195
- margin-top: 16px;
196
- padding: 16px 0 0;
197
- }
198
-
199
- .WcpPCW_customTitle {
200
- margin: 0 0 6px;
201
- font-size: 13px;
202
- line-height: 17px;
203
- }
204
-
205
- .WcpPCW_customNote {
206
- color: var(--dsw-alias-label-tertiary);
207
- margin: 4px 0;
208
- font-size: 11px;
209
- line-height: 15px;
210
- }
211
-
212
- .WcpPCW_stage {
213
- border: 0;
214
- border-top: 1px solid var(--dsw-alias-border-l2);
215
- margin: 12px 0 0;
216
- padding: 12px 0 0;
217
- }
218
-
219
- .WcpPCW_stageToggle {
220
- align-items: center;
221
- gap: 6px;
222
- font-size: 12px;
223
- line-height: 16px;
224
- display: inline-flex;
225
- }
226
-
227
- .WcpPCW_fieldGrid {
228
- grid-template-columns: 1fr;
229
- gap: 8px;
230
- display: grid;
231
- }
232
-
233
- .WcpPCW_field {
234
- min-width: 0;
235
- color: var(--dsw-alias-label-secondary);
236
- flex-direction: column;
237
- gap: 4px;
238
- margin-top: 8px;
239
- font-size: 11px;
240
- line-height: 15px;
241
- display: flex;
242
- }
243
-
244
- .WcpPCW_field input, .WcpPCW_field select {
245
- box-sizing: border-box;
246
- border: 1px solid var(--dsw-alias-border-l2);
247
- background: var(--dsw-alias-bg-base);
248
- width: 100%;
249
- min-width: 0;
250
- min-height: 30px;
251
- color: var(--dsw-alias-label-primary);
252
- border-radius: 7px;
253
- padding: 4px 6px;
254
- }
255
-
256
- .WcpPCW_field input:focus-visible, .WcpPCW_field select:focus-visible, .WcpPCW_actions button:focus-visible {
257
- outline-offset: 2px;
258
- outline: 2px solid;
259
- }
260
-
261
- .WcpPCW_actions {
262
- flex-wrap: wrap;
263
- gap: 8px;
264
- margin-top: 10px;
265
- display: flex;
266
- }
267
-
268
- .WcpPCW_actions button {
269
- border: 1px solid var(--dsw-alias-border-l2);
270
- min-height: 30px;
271
- color: var(--dsw-alias-label-primary);
272
- background: none;
273
- border-radius: 7px;
274
- padding: 4px 8px;
275
- }
276
-
277
- .WcpPCW_actions button:active:not(:disabled) {
278
- transform: scale(.98);
279
- }
280
-
281
- .WcpPCW_actions button:disabled {
282
- opacity: .6;
283
- }
284
-
285
- @media (width <= 560px) {
286
- .WcpPCW_profileGrid {
287
- grid-template-columns: 1fr;
288
- }
289
- }
290
-
291
- .WcpPCW_autoCompact {
292
- border: 1px solid #80808059;
293
- border-radius: 8px;
294
- margin-top: 24px;
295
- padding: 16px;
296
- }
297
-
298
- .WcpPCW_autoCompactTitle {
299
- margin: 0 0 8px;
300
- font-size: 15px;
301
- font-weight: 600;
302
- }
303
-
304
- .WcpPCW_autoCompactRisk {
305
- opacity: .9;
306
- margin: 8px 0 0;
307
- font-size: 12px;
308
- }
309
-
310
- .WcpPCW_savingsCard {
311
- border: 1px solid #ffffff1a;
312
- border-radius: 8px;
313
- flex-direction: column;
314
- gap: 4px;
315
- margin-top: 14px;
316
- padding: 10px 12px;
317
- display: flex;
318
- }
319
-
320
- .WcpPCW_savingsRow {
321
- justify-content: space-between;
322
- align-items: baseline;
323
- gap: 12px;
324
- display: flex;
325
- }
326
-
327
- .WcpPCW_savingsNetPositive strong {
328
- color: #30d158;
329
- }
330
-
331
- .WcpPCW_savingsNetNegative strong {
332
- color: #ff9f0a;
333
- }
334
-
335
- .WcpPCW_savingsMuted {
336
- opacity: .66;
337
- font-size: .92em;
338
- }
339
-
340
- .WcpPCW_savingsBreakdown {
341
- border-top: 1px solid #ffffff14;
342
- margin-top: 4px;
343
- padding-top: 4px;
344
- }
345
-
346
- .WcpPCW_savingsNote {
347
- opacity: .5;
348
- margin-top: 4px;
349
- font-size: .85em;
350
- }
@@ -1,174 +0,0 @@
1
- {
2
- "name": "dsh-context-compression-improved",
3
- "version": "0.9.8",
4
- "description": "One-install context-compression selector bundle for DeepSeek Harness",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "types": "lib/index.d.ts",
8
- "exports": {
9
- ".": {
10
- "types": "./lib/index.d.ts",
11
- "default": "./lib/index.js"
12
- },
13
- "./invariant": {
14
- "types": "./lib/invariant.d.ts",
15
- "default": "./lib/invariant.js"
16
- },
17
- "./pruner": {
18
- "types": "./lib/pruner.d.ts",
19
- "default": "./lib/pruner.js"
20
- },
21
- "./client": {
22
- "types": "./lib/client.d.ts",
23
- "default": "./lib/client.js"
24
- },
25
- "./package.json": "./package.json"
26
- },
27
- "files": [
28
- "lib/**/*.js",
29
- "lib/**/*.d.ts",
30
- "cordis.patch.yml",
31
- "dsh.plugin.json",
32
- "screenshots.json",
33
- "assets",
34
- "README.md",
35
- "README.zh.md",
36
- "LICENSE",
37
- "THIRD_PARTY_NOTICES.md"
38
- ],
39
- "dsh": {
40
- "client": {
41
- "inject": [
42
- "@deepseek-ai/dsh-client-locale",
43
- "@deepseek-ai/dsh-client-ui-slots",
44
- "@deepseek-ai/dsh-client-ui-settings"
45
- ],
46
- "platform": "web"
47
- },
48
- "bundle": {
49
- "patch": "./cordis.patch.yml"
50
- }
51
- },
52
- "scripts": {
53
- "bundle": "tsdown --config tsdown.config.ts && tsdown --config tsdown.client.config.ts",
54
- "typecheck": "tsc --noEmit -p tsconfig.json",
55
- "test": "vitest run --root ../.. --config vitest.config.ts --project runtime --project selector-host --project selector-client",
56
- "pack:dry-run": "npm pack --dry-run"
57
- },
58
- "repository": {
59
- "type": "git",
60
- "url": "git+https://github.com/drscrewdriver/dsh-context-compression-improved.git",
61
- "directory": "packages/selector"
62
- },
63
- "homepage": "https://github.com/drscrewdriver/dsh-context-compression-improved#readme",
64
- "bugs": {
65
- "url": "https://github.com/drscrewdriver/dsh-context-compression-improved/issues"
66
- },
67
- "author": "WilliamShi666",
68
- "engines": {
69
- "node": "^22.19.0 || >=24.0.0",
70
- "dsh": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2"
71
- },
72
- "keywords": [
73
- "deepseek",
74
- "harness",
75
- "context",
76
- "compression",
77
- "plugin"
78
- ],
79
- "license": "MIT",
80
- "publishConfig": {
81
- "access": "public",
82
- "registry": "https://registry.npmjs.org",
83
- "tag": "latest"
84
- },
85
- "dependencies": {
86
- "@deepseek-ai/schemastery": "3.18.4",
87
- "@huggingface/tokenizers": "0.1.3",
88
- "js-yaml": "^4.3.2"
89
- },
90
- "peerDependencies": {
91
- "@deepseek-ai/cordis": ">=4.0.1 <5",
92
- "@deepseek-ai/cordis-plugin-include": ">=1.0.6 <2",
93
- "@deepseek-ai/cordis-plugin-loader": ">=1.0.2 <2",
94
- "@deepseek-ai/dsh-agent": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
95
- "@deepseek-ai/dsh-agent-presets": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
96
- "@deepseek-ai/dsh-client-locale": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
97
- "@deepseek-ai/dsh-client-store": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
98
- "@deepseek-ai/dsh-client-ui-primitives": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
99
- "@deepseek-ai/dsh-client-ui-session": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
100
- "@deepseek-ai/dsh-client-ui-settings": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
101
- "@deepseek-ai/dsh-client-ui-slots": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
102
- "@deepseek-ai/dsh-client-ui-workspace": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
103
- "@deepseek-ai/dsh-command-compact": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
104
- "@deepseek-ai/dsh-compaction": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
105
- "@deepseek-ai/dsh-compaction-basic": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
106
- "@deepseek-ai/dsh-invariants": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
107
- "@deepseek-ai/dsh-llm": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
108
- "@deepseek-ai/dsh-session": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
109
- "@deepseek-ai/dsh-settings": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
110
- "@deepseek-ai/dsh-system-prompt": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
111
- "@deepseek-ai/dsh-token-meter": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
112
- "@deepseek-ai/dsh-tools": "0.1.0-rc.2 || 0.1.0-rc.3 || 0.1.0-rc.6 || 0.1.0-rc.7 || 0.1.0-rc.8 || 0.1.1-rc.1 || 0.1.1-rc.2 || 0.1.2-rc.1 || 0.1.5-rc.1 || 0.1.5-rc.2 || 0.1.5-rc.3 || 0.1.7-rc.1 || 0.1.7-rc.2 || 0.2.0-rc.1 || 0.2.0-rc.2 || 0.2.1-rc.1 || 0.2.1-rc.2",
113
- "react": ">=18 <19"
114
- },
115
- "peerDependenciesMeta": {
116
- "@deepseek-ai/dsh-agent": {
117
- "optional": true
118
- },
119
- "@deepseek-ai/dsh-agent-presets": {
120
- "optional": true
121
- },
122
- "@deepseek-ai/dsh-client-locale": {
123
- "optional": true
124
- },
125
- "@deepseek-ai/dsh-client-store": {
126
- "optional": true
127
- },
128
- "@deepseek-ai/dsh-client-ui-primitives": {
129
- "optional": true
130
- },
131
- "@deepseek-ai/dsh-client-ui-session": {
132
- "optional": true
133
- },
134
- "@deepseek-ai/dsh-client-ui-settings": {
135
- "optional": true
136
- },
137
- "@deepseek-ai/dsh-client-ui-slots": {
138
- "optional": true
139
- },
140
- "@deepseek-ai/dsh-client-ui-workspace": {
141
- "optional": true
142
- },
143
- "@deepseek-ai/dsh-command-compact": {
144
- "optional": true
145
- },
146
- "@deepseek-ai/dsh-compaction": {
147
- "optional": true
148
- },
149
- "@deepseek-ai/dsh-compaction-basic": {
150
- "optional": true
151
- },
152
- "@deepseek-ai/dsh-invariants": {
153
- "optional": true
154
- },
155
- "@deepseek-ai/dsh-llm": {
156
- "optional": true
157
- },
158
- "@deepseek-ai/dsh-session": {
159
- "optional": true
160
- },
161
- "@deepseek-ai/dsh-settings": {
162
- "optional": true
163
- },
164
- "@deepseek-ai/dsh-system-prompt": {
165
- "optional": true
166
- },
167
- "@deepseek-ai/dsh-token-meter": {
168
- "optional": true
169
- },
170
- "@deepseek-ai/dsh-tools": {
171
- "optional": true
172
- }
173
- }
174
- }
@@ -1,3 +0,0 @@
1
- {
2
- "screenshots": []
3
- }