dsh-context-compression-improved 0.8.0 → 0.9.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.
- package/.gitattributes +2 -2
- package/.githooks/pre-push +37 -37
- package/.github/workflows/ci.yml +39 -39
- package/CHANGELOG.de.md +41 -0
- package/CHANGELOG.es.md +41 -0
- package/CHANGELOG.fr.md +42 -0
- package/CHANGELOG.it.md +41 -0
- package/CHANGELOG.ja.md +35 -0
- package/CHANGELOG.ko.md +34 -0
- package/CHANGELOG.md +40 -0
- package/CHANGELOG.ru.md +37 -0
- package/CHANGELOG.zh.md +32 -0
- package/CONTRIBUTING.md +22 -22
- package/LICENSE +21 -21
- package/README.de.md +7 -9
- package/README.es.md +7 -9
- package/README.fr.md +7 -9
- package/README.it.md +7 -9
- package/README.ja.md +6 -2
- package/README.ko.md +6 -2
- package/README.md +96 -98
- package/README.ru.md +7 -9
- package/README.zh.md +89 -85
- package/SECURITY.md +18 -18
- package/THIRD_PARTY_NOTICES.md +14 -14
- package/docs/compat-0.1.5-report.md +77 -77
- package/docs/installation.de.md +5 -5
- package/docs/installation.es.md +5 -5
- package/docs/installation.fr.md +5 -5
- package/docs/installation.it.md +5 -5
- package/docs/installation.ja.md +5 -5
- package/docs/installation.ko.md +5 -5
- package/docs/installation.md +5 -5
- package/docs/installation.ru.md +5 -5
- package/docs/installation.zh.md +5 -5
- package/docs/repair-log.md +657 -657
- package/package.json +23 -22
- package/packages/selector/LICENSE +21 -21
- package/packages/selector/README.md +26 -26
- package/packages/selector/README.zh.md +24 -24
- package/packages/selector/THIRD_PARTY_NOTICES.md +32 -32
- package/packages/selector/cordis.patch.yml +27 -27
- package/packages/selector/docs/history-tool-call-working-set-spec.md +112 -112
- package/packages/selector/docs/native-tool-result-selector-spec.md +34 -34
- package/packages/selector/docs/subagent-cache-reuse-spec.md +46 -46
- package/packages/selector/dsh.plugin.json +16 -16
- package/packages/selector/lib/client.js +178 -21
- package/packages/selector/lib/host-generation.js +62 -0
- package/packages/selector/lib/index.js +208 -1
- package/packages/selector/lib/invariant.js +1 -1
- package/packages/selector/lib/pruner.js +41 -43
- package/packages/selector/lib/style.css +53 -53
- package/packages/selector/lib/tail-trim.js +73 -4
- package/packages/selector/package.json +80 -21
- package/packages/selector/screenshots.json +3 -3
- package/packages/selector/src/client/CustomPolicyEditor.tsx +216 -216
- package/packages/selector/src/client/EstimatorControls.tsx +277 -277
- package/packages/selector/src/client/bridge-scope.ts +125 -0
- package/packages/selector/src/client/index.ts +109 -31
- package/packages/selector/src/client/monitor-fab.ts +0 -2
- package/packages/selector/src/client/preset-options.ts +88 -88
- package/packages/selector/src/client/scope-face.ts +24 -24
- package/packages/selector/src/compat/host-generation.ts +96 -0
- package/packages/selector/src/compat/settings-lease.ts +108 -0
- package/packages/selector/src/compat/tool-result.ts +91 -0
- package/packages/selector/src/css-modules.d.ts +6 -6
- package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -205
- package/packages/selector/src/estimator-catalog.ts +104 -104
- package/packages/selector/src/index.ts +8 -0
- package/packages/selector/src/invariant.ts +113 -113
- package/packages/selector/src/preset-overlay.ts +626 -626
- package/packages/selector/src/pruner/content.ts +198 -198
- package/packages/selector/src/pruner/session.ts +97 -96
- package/packages/selector/src/pruner/tuning.ts +23 -23
- package/packages/selector/src/pruner/types.ts +78 -78
- package/packages/selector/src/pruner.ts +45 -40
- package/packages/selector/src/runtime/adaptive-cost.ts +205 -205
- package/packages/selector/src/runtime/custom-policy.ts +278 -278
- package/packages/selector/src/runtime/deepseek-official-pricing.ts +298 -298
- package/packages/selector/src/runtime/deepseek-v4-vision-tokens.ts +254 -254
- package/packages/selector/src/runtime/measurement.ts +431 -431
- package/packages/selector/src/runtime/reducers.ts +1674 -1674
- package/packages/selector/src/runtime/retrieve.ts +7 -3
- package/packages/selector/src/runtime/session-events.ts +30 -30
- package/packages/selector/src/runtime/tail-trim.ts +175 -165
- package/packages/selector/src/runtime/token-count.ts +72 -72
- package/packages/selector/src/runtime/tokenpilot/advisor.ts +419 -419
- package/packages/selector/src/runtime/tokenpilot/benefit.ts +200 -200
- package/packages/selector/src/runtime/tokenpilot/dedup.ts +81 -81
- package/packages/selector/src/runtime/tokenpilot/estimator.ts +151 -151
- package/packages/selector/src/runtime/tokenpilot/locator.ts +128 -128
- package/packages/selector/src/runtime/tokenpilot/read-state.ts +98 -98
- package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +303 -303
- package/packages/selector/src/runtime/toolclass.ts +103 -103
- package/packages/selector/src/runtime/value.ts +48 -48
- package/packages/selector/src/settings-bridge.ts +175 -0
- package/packages/selector/tests/advisor-report.host.spec.ts +223 -223
- package/packages/selector/tests/built/client-artifact.spec.ts +6 -9
- package/packages/selector/tests/cache-prefix-audit.spec.ts +123 -123
- package/packages/selector/tests/code-skeleton.client.spec.ts +98 -94
- package/packages/selector/tests/compat/compat-narrow-waist.spec.ts +150 -0
- package/packages/selector/tests/custom-contract.client.spec.ts +226 -223
- package/packages/selector/tests/estimator-catalog.spec.ts +70 -70
- package/packages/selector/tests/estimator-route-registration.host.spec.ts +199 -194
- package/packages/selector/tests/helpers/legacy-namespace.ts +35 -35
- package/packages/selector/tests/helpers/legacy-settings/index.ts +15 -15
- package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +41 -41
- package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +647 -647
- package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +78 -78
- package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +234 -234
- package/packages/selector/tests/host-preset-overlay.host.spec.ts +204 -204
- package/packages/selector/tests/preset-options-write.client.spec.ts +192 -188
- package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +200 -200
- package/packages/selector/tests/preset-overlay.host.spec.ts +246 -246
- package/packages/selector/tests/public/package-contract.client.spec.ts +11 -3
- package/packages/selector/tests/runtime/adaptive-cost.spec.ts +167 -167
- package/packages/selector/tests/runtime/advice-never-withholds.host.spec.ts +230 -230
- package/packages/selector/tests/runtime/advisor-invariant.spec.ts +272 -272
- package/packages/selector/tests/runtime/advisor.spec.ts +226 -226
- package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -523
- package/packages/selector/tests/runtime/char-basis.spec.ts +30 -30
- package/packages/selector/tests/runtime/code-skeleton.spec.ts +152 -152
- package/packages/selector/tests/runtime/deepseek-official-pricing.spec.ts +186 -186
- package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -122
- package/packages/selector/tests/runtime/deepseek-v4-vision-tokens.spec.ts +122 -122
- package/packages/selector/tests/runtime/deprecated-preset-options.spec.ts +96 -96
- package/packages/selector/tests/runtime/fixtures/profile-baseline.json +273 -273
- package/packages/selector/tests/runtime/fixtures/tokenizer-golden.json +106 -106
- package/packages/selector/tests/runtime/fixtures/vision-golden.json +459 -459
- package/packages/selector/tests/runtime/frequency-longstrings.spec.ts +74 -74
- package/packages/selector/tests/runtime/html-reducer.spec.ts +212 -212
- package/packages/selector/tests/runtime/line-mapping.spec.ts +153 -153
- package/packages/selector/tests/runtime/prose-reducers.spec.ts +133 -133
- package/packages/selector/tests/runtime/public/public-runtime.spec.ts +3 -3
- package/packages/selector/tests/runtime/read-input-cap.spec.ts +33 -33
- package/packages/selector/tests/runtime/search-reducer.spec.ts +110 -110
- package/packages/selector/tests/runtime/session-events.spec.ts +27 -27
- package/packages/selector/tests/runtime/sidechannel.spec.ts +241 -241
- package/packages/selector/tests/runtime/toc-and-bundled.spec.ts +159 -159
- package/packages/selector/tests/runtime/tokenizer-golden.spec.ts +53 -53
- package/packages/selector/tests/runtime/tokenpilot/benefit.spec.ts +217 -217
- package/packages/selector/tests/runtime/tokenpilot/dedup.spec.ts +52 -52
- package/packages/selector/tests/runtime/tokenpilot/estimator.spec.ts +79 -79
- package/packages/selector/tests/runtime/tokenpilot/locator.spec.ts +76 -76
- package/packages/selector/tests/runtime/tokenpilot/profile-baseline.spec.ts +116 -116
- package/packages/selector/tests/runtime/tokenpilot/read-state.spec.ts +82 -82
- package/packages/selector/tests/runtime/toolclass.spec.ts +156 -156
- package/packages/selector/tests/runtime/value.spec.ts +23 -23
- package/packages/selector/tests/settings-seat.client.spec.ts +45 -7
- package/packages/selector/tests/standing-generation.host.spec.ts +724 -724
- package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +269 -269
- package/packages/selector/tests/support/cache-prefix-audit.ts +105 -105
- package/packages/selector/tests/support/mock-adapter.ts +37 -37
- package/packages/selector/tests/support/ui-primitives.tsx +34 -34
- package/packages/selector/tsconfig.json +11 -11
- package/packages/selector/tsdown.client.config.ts +102 -102
- package/packages/selector/tsdown.config.ts +20 -20
- package/scripts/capture-profile-baseline.mjs +42 -42
- package/scripts/generate-tokenizer-fixtures.py +81 -81
- package/scripts/generate-vision-fixtures.py +208 -208
- package/scripts/hosts.mjs +74 -0
- package/scripts/packed-components-smoke.mjs +763 -732
- package/scripts/packed-install-e2e.mjs +1330 -1273
- package/scripts/sync-hosts.mjs +174 -0
- package/scripts/toolclass-corpus-replay.mjs +281 -281
- package/scripts/verify-release.mjs +335 -318
- package/tsconfig.base.json +18 -18
- package/tsconfig.json +7 -7
- package/tsconfig.tests.json +15 -15
- package/vitest.built.config.ts +9 -9
- package/vitest.config.ts +46 -43
package/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 WilliamShi666
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 WilliamShi666
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.de.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> Dieses Projekt unterstützt **ausschließlich DeepSeek-Modelle**. Verlustfreie Messung und verlustbehaftete Kompression hängen von den mitgelieferten offiziellen DeepSeek-Tokenizern ab (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Alles andere fällt offen aus (fail-open) und behält die ursprünglichen Tool-Ergebnisse bei. Das vollständige Sicherheitsmodell finden Sie im [Upstream-README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety).
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Unterstützte DSH-Hosts:** `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` (15 RC über die Linien 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## Was es ist
|
|
18
22
|
|
|
19
23
|
Langlaufende Agent-Aufgaben sammeln große Mengen an Tool-Ausgaben an. Dieses Community-Plugin fügt auswählbare, prüfbare Richtlinien hinzu, um diesen Tool-Ergebnis-Kontext zu reduzieren, ohne den Kern des DeepSeek Harness zu verändern:
|
|
@@ -47,16 +51,10 @@ Wählen Sie ein Kompressionsprofil, stellen Sie den Auto-Compact-Auslösepegel e
|
|
|
47
51
|
|
|
48
52
|
## Installation
|
|
49
53
|
|
|
50
|
-
**Empfohlen: Installation über npm.**
|
|
54
|
+
**Empfohlen: Installation über npm.** Eine einzige Version deckt alle unterstützten Harness-Linien ab — `latest` trägt die vollständige 15-rc-Aufzählung (0.1.0-rc.2 → 0.2.0-rc.2); die Runtime wählt die linienspezifischen Codepfade selbst.
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
|
-
dsh plugin --profile web add dsh-context-compression-improved@
|
|
54
|
-
# DSH 0.1.7 line:
|
|
55
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.7
|
|
56
|
-
# DSH 0.1.5 line:
|
|
57
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.5
|
|
58
|
-
# DSH 0.1.2 line:
|
|
59
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.2
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
60
58
|
dsh --profile web --dump-config
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -87,7 +85,7 @@ Beiträge folgen der Upstream-Disziplin: zuerst die fehlgeschlagene Regression h
|
|
|
87
85
|
|
|
88
86
|
## Kompatibilität
|
|
89
87
|
|
|
90
|
-
- Gegen die
|
|
88
|
+
- Gegen die offiziellen DeepSeek Harness Veröffentlichungen gebaut und getestet; die Peers enumerieren die vollständige Unterstützungsliste (`0.1.0-rc.2` → `0.2.0-rc.2`, sechs Linien) und das Plugin nutzt ausschließlich öffentliche Plugin- und Profil-APIs. Die Liste wird von `scripts/sync-hosts.mjs` aus `scripts/hosts.mjs` in den obigen verwalteten Block generiert.
|
|
91
89
|
- Erfordert Node `^22.19.0 || >=24` und pnpm `11.7.0`.
|
|
92
90
|
- Das Plugin nutzt nur öffentliche Harness-Erweiterungs-APIs und verändert keinen Harness-Kerncode. Inoffizielles Community-Projekt, weder mit DeepSeek verbunden noch von ihm unterstützt.
|
|
93
91
|
|
package/README.es.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> Este proyecto admite **únicamente modelos DeepSeek**. La medición sin pérdida y la compresión con pérdida dependen de los tokenizers oficiales de DeepSeek incluidos (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Todo lo demás falla de forma abierta (fail-open) y conserva los resultados de herramientas originales. Consulte el [README ascendente](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) para conocer el modelo de seguridad completo.
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Hosts DSH compatibles:** `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` (15 rc en las líneas 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## Qué es
|
|
18
22
|
|
|
19
23
|
Las tareas de agentes de larga duración acumulan una gran cantidad de salida de herramientas. Este plugin comunitario añade políticas seleccionables y auditables para reducir ese contexto de resultados de herramientas sin modificar el núcleo de DeepSeek Harness:
|
|
@@ -47,16 +51,10 @@ Elija un perfil de compresión, configure el nivel de disparo de Auto Compact y
|
|
|
47
51
|
|
|
48
52
|
## Instalación
|
|
49
53
|
|
|
50
|
-
**Recomendado: instalar desde npm.**
|
|
54
|
+
**Recomendado: instalar desde npm.** Una única versión cubre todas las líneas de Harness compatibles — `latest` lleva la enumeración completa de 15 rc (0.1.0-rc.2 → 0.2.0-rc.2); el runtime elige por sí solo las rutas de código de cada línea.
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
|
-
dsh plugin --profile web add dsh-context-compression-improved@
|
|
54
|
-
# DSH 0.1.7 line:
|
|
55
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.7
|
|
56
|
-
# DSH 0.1.5 line:
|
|
57
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.5
|
|
58
|
-
# DSH 0.1.2 line:
|
|
59
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.2
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
60
58
|
dsh --profile web --dump-config
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -87,7 +85,7 @@ Las contribuciones siguen la disciplina del upstream: añadir primero la regresi
|
|
|
87
85
|
|
|
88
86
|
## Compatibilidad
|
|
89
87
|
|
|
90
|
-
-
|
|
88
|
+
- Construido y probado contra las versiones oficiales de DeepSeek Harness; los peers enumeran la lista completa de soporte (`0.1.0-rc.2` → `0.2.0-rc.2`, seis líneas) y el plugin usa solo API públicas de plugin y de perfil. La lista la genera `scripts/sync-hosts.mjs` desde `scripts/hosts.mjs` hacia el bloque gestionado de arriba.
|
|
91
89
|
- Requiere Node `^22.19.0 || >=24` y pnpm `11.7.0`.
|
|
92
90
|
- El plugin usa solo API de extensión públicas del Harness y no modifica el código del núcleo del Harness. Proyecto comunitario no oficial, sin afiliación ni respaldo de DeepSeek.
|
|
93
91
|
|
package/README.fr.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> Ce projet prend en charge **uniquement les modèles DeepSeek**. La mesure sans perte et la compression avec perte dépendent des tokenizers DeepSeek officiels fournis (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Tout le reste échoue en mode ouvert (fail-open) et conserve les résultats d'outils originaux. Consultez le [README amont](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) pour le modèle de sécurité complet.
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Hôtes DSH pris en charge :** `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` (15 rc sur les lignes 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## Qu'est-ce que c'est
|
|
18
22
|
|
|
19
23
|
Les tâches d'agent de longue durée accumulent une grande quantité de sorties d'outils. Ce plugin communautaire ajoute des politiques sélectionnables et auditables pour réduire ce contexte de résultats d'outils sans modifier le cœur de DeepSeek Harness :
|
|
@@ -47,16 +51,10 @@ Choisissez un profil de compression, réglez le niveau de déclenchement de l'Au
|
|
|
47
51
|
|
|
48
52
|
## Installation
|
|
49
53
|
|
|
50
|
-
**Recommandé : installer depuis npm.**
|
|
54
|
+
**Recommandé : installer depuis npm.** Une seule version couvre toutes les lignes Harness prises en charge — `latest` porte l'énumération complète des 15 rc (0.1.0-rc.2 → 0.2.0-rc.2) ; le runtime choisit lui-même les chemins de code propres à chaque ligne.
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
|
-
dsh plugin --profile web add dsh-context-compression-improved@
|
|
54
|
-
# DSH 0.1.7 line:
|
|
55
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.7
|
|
56
|
-
# DSH 0.1.5 line:
|
|
57
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.5
|
|
58
|
-
# DSH 0.1.2 line:
|
|
59
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.2
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
60
58
|
dsh --profile web --dump-config
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -87,7 +85,7 @@ Les contributions suivent la discipline de l'amont : ajouter d'abord la régress
|
|
|
87
85
|
|
|
88
86
|
## Compatibilité
|
|
89
87
|
|
|
90
|
-
- Construit et testé contre
|
|
88
|
+
- Construit et testé contre les versions officielles de DeepSeek Harness ; les pairs énumèrent la liste complète de prise en charge (`0.1.0-rc.2` → `0.2.0-rc.2`, six lignes) et le plugin n'utilise que les API publiques de plugin et de profil. La liste est générée par `scripts/sync-hosts.mjs` depuis `scripts/hosts.mjs` vers le bloc géré ci-dessus.
|
|
91
89
|
- Nécessite Node `^22.19.0 || >=24` et pnpm `11.7.0`.
|
|
92
90
|
- Le plugin n'utilise que les API d'extension publiques du Harness et ne modifie pas le code du cœur du Harness. Projet communautaire non officiel, sans affiliation ni approbation de DeepSeek.
|
|
93
91
|
|
package/README.it.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> Questo progetto supporta **solo modelli DeepSeek**. La misura senza perdita e la compressione con perdita dipendono dai tokenizer DeepSeek ufficiali inclusi (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Tutto il resto fallisce in modo aperto (fail-open) e conserva i risultati degli strumenti originali. Vedere il [README upstream](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) per il modello di sicurezza completo.
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Host DSH supportati:** `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` (15 rc attraverso le linee 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## Che cos'è
|
|
18
22
|
|
|
19
23
|
Le attività degli agenti di lunga durata accumulano grandi quantità di output degli strumenti. Questo plugin della community aggiunge politiche selezionabili e verificabili per ridurre questo contesto di risultati degli strumenti senza modificare il core di DeepSeek Harness:
|
|
@@ -47,16 +51,10 @@ Scegliere un profilo di compressione, impostare il livello di attivazione dell'A
|
|
|
47
51
|
|
|
48
52
|
## Installazione
|
|
49
53
|
|
|
50
|
-
**Consigliato: installare da npm.** Un
|
|
54
|
+
**Consigliato: installare da npm.** Un'unica versione copre tutte le linee Harness supportate — `latest` porta l'enumerazione completa dei 15 rc (0.1.0-rc.2 → 0.2.0-rc.2); il runtime sceglie da solo i percorsi di codice di ciascuna linea.
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
|
-
dsh plugin --profile web add dsh-context-compression-improved@
|
|
54
|
-
# DSH 0.1.7 line:
|
|
55
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.7
|
|
56
|
-
# DSH 0.1.5 line:
|
|
57
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.5
|
|
58
|
-
# DSH 0.1.2 line:
|
|
59
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.2
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
60
58
|
dsh --profile web --dump-config
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -87,7 +85,7 @@ I contributi seguono la disciplina upstream: aggiungere prima la regressione che
|
|
|
87
85
|
|
|
88
86
|
## Compatibilità
|
|
89
87
|
|
|
90
|
-
- Compilato e testato contro
|
|
88
|
+
- Compilato e testato contro le release ufficiali di DeepSeek Harness; i peer enumerano l'elenco completo del supporto (`0.1.0-rc.2` → `0.2.0-rc.2`, sei linee) e il plugin usa solo API pubbliche di plugin e profilo. L'elenco è generato da `scripts/sync-hosts.mjs` da `scripts/hosts.mjs` nel blocco gestito qui sopra.
|
|
91
89
|
- Richiede Node `^22.19.0 || >=24` e pnpm `11.7.0`.
|
|
92
90
|
- Il plugin usa solo API di estensione pubbliche del Harness e non modifica il codice del core del Harness. Progetto comunitario non ufficiale, non affiliato né approvato da DeepSeek.
|
|
93
91
|
|
package/README.ja.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> 本プロジェクトは **DeepSeek モデルのみ**をサポートします。可逆的な計測と非可逆圧縮は、同梱の DeepSeek 公式トークナイザー(`deepseek-v4-flash`、`deepseek-v4-pro`、`deepseek-v4-flash-vision-exp`)に依存します。それ以外は fail-open で動作し、元のツール結果を保持します。安全モデルの詳細は[アップストリームの README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) を参照してください。
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **対応する 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.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 の 15 rc)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## これは何か
|
|
18
22
|
|
|
19
23
|
長時間稼働するエージェントタスクは大量のツール出力を蓄積します。本コミュニティプラグインは、DeepSeek Harness のコアを改変することなく、選択可能で監査可能なツール結果コンテキスト圧縮ポリシーを提供します:
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
|
|
48
52
|
## インストール
|
|
49
53
|
|
|
50
|
-
ソースからビルドしてインストールします —— 本フォークは npm にも `dsh-context-compression-improved`
|
|
54
|
+
ソースからビルドしてインストールします —— 本フォークは npm にも `dsh-context-compression-improved` として公開済みです(単一バージョンが全サポートラインをカバー:dist-tag `latest` が 15 rc 完全列挙 0.1.0-rc.2〜0.2.0-rc.2 を携え、ライン別コードパスはランタイムが自動選択)。内部パッケージ名は意図的にアップストリームのままです:
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
57
|
git clone https://github.com/drscrewdriver/dsh-context-compression-improved.git
|
|
@@ -74,7 +78,7 @@ pnpm verify:release
|
|
|
74
78
|
|
|
75
79
|
## 互換性
|
|
76
80
|
|
|
77
|
-
- 公式 DeepSeek Harness
|
|
81
|
+
- 公式 DeepSeek Harness リリースに対してビルド・テスト済み。peers はサポート対象の完全列挙(`0.1.0-rc.2`〜`0.2.0-rc.2`、6 ライン)を宣言し、公開されているプラグインおよびプロファイル API のみを使用します。リストは `scripts/sync-hosts.mjs` が `scripts/hosts.mjs` から上記の管理ブロックへ生成します。
|
|
78
82
|
- Node `^22.19.0 || >=24` と pnpm `11.7.0` が必要です。
|
|
79
83
|
- プラグインは Harness の公開拡張 API のみを使用し、Harness コアは改変しません。非公式のコミュニティプロジェクトであり、DeepSeek とは提携・承認関係にありません。
|
|
80
84
|
|
package/README.ko.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> 이 프로젝트는 **DeepSeek 모델만** 지원합니다. 손실 없는 측정과 손실 압축은 번들된 DeepSeek 공식 토크나이저(`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`)에 의존합니다. 그외의 경우 fail-open으로 동작하며 원본 도구 결과를 유지합니다. 전체 안전 모델은 [업스트림 README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety)를 참고하세요.
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **지원하는 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.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0 라인의 15개 rc)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## 이것은 무엇인가
|
|
18
22
|
|
|
19
23
|
장시간 실행되는 에이전트 작업은 대량의 도구 출력을 축적합니다. 이커뮤니티 플러그인은 DeepSeek Harness 코어를 수정하지 않고, 선택 가능하고 감사 가능한 도구 결과 컨텍스트 압축 정책을 제공합니다:
|
|
@@ -47,7 +51,7 @@
|
|
|
47
51
|
|
|
48
52
|
## 설치
|
|
49
53
|
|
|
50
|
-
소스에서 빌드하여 설치합니다 —— 이 포크는 npm에도 `dsh-context-compression-improved`로 게시되어 있습니다(
|
|
54
|
+
소스에서 빌드하여 설치합니다 —— 이 포크는 npm에도 `dsh-context-compression-improved`로 게시되어 있습니다(단일 버전이 모든 지원 라인을 커버: dist-tag `latest`가 15 rc 전체 열거 0.1.0-rc.2~0.2.0-rc.2를 담으며, 라인별 코드 경로는 런타임이 자동 선택). 내부 패키지 이름은 의도적으로 업스트림과 동일하게 유지됩니다:
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
57
|
git clone https://github.com/drscrewdriver/dsh-context-compression-improved.git
|
|
@@ -74,7 +78,7 @@ pnpm verify:release
|
|
|
74
78
|
|
|
75
79
|
## 호환성
|
|
76
80
|
|
|
77
|
-
- 공식 DeepSeek Harness
|
|
81
|
+
- 공식 DeepSeek Harness 릴리스 기준으로 빌드·테스트되었습니다. peers는 지원 대상 전체 열거(`0.1.0-rc.2`~`0.2.0-rc.2`, 6개 라인)를 선언하며 공개된 플러그인 및 프로파일 API만 사용합니다. 목록은 `scripts/sync-hosts.mjs`가 `scripts/hosts.mjs`에서 위의 관리 블록으로 생성합니다.
|
|
78
82
|
- Node `^22.19.0 || >=24`와 pnpm `11.7.0`이 필요합니다.
|
|
79
83
|
- 플러그인은 Harness의 공개 확장 API만 사용하며 Harness 코어를 수정하지 않습니다. 비공식 커뮤니티 프로젝트이며 DeepSeek과 제휴하거나 승인받지 않았습니다.
|
|
80
84
|
|
package/README.md
CHANGED
|
@@ -1,98 +1,96 @@
|
|
|
1
|
-
# dsh-context-compression-improved
|
|
2
|
-
|
|
3
|
-
> An improved fork of [dsh-context-compression-selector](https://github.com/WilliamShi666/dsh-context-compression-selector) — an auditable tool-result context-compression selector for DeepSeek Harness — adding an orthogonal **code-skeleton compression gate**.
|
|
4
|
-
|
|
5
|
-
[中文说明](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Italiano](README.it.md) · [Русский](README.ru.md) · [Español](README.es.md) · [Changelog](CHANGELOG.md) · [Installation guide](docs/installation.md)
|
|
6
|
-
|
|
7
|
-
> [!NOTE]
|
|
8
|
-
> **What this fork adds on top of upstream 0.1.0:**
|
|
9
|
-
>
|
|
10
|
-
> - An orthogonal **code-skeleton compression gate** (`codeSkeleton.enabled`, default off): the first exposure of an oversized fresh source-code tool result can keep a skeleton of imports and declarations — bodies elided, error lines kept — before the regular reducers run.
|
|
11
|
-
> - A settings toggle for that gate in the same selector settings section, independent of every compression profile.
|
|
12
|
-
> - An ESLint baseline wired into CI, a `test:watch` TDD loop, and documentation in English, Simplified Chinese, Japanese, and Korean.
|
|
13
|
-
|
|
14
|
-
> [!IMPORTANT]
|
|
15
|
-
> This project supports **DeepSeek models only**. Lossless measurement and lossy compression depend on the bundled official DeepSeek tokenizers (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Everything else fails open and keeps original tool results. See the [upstream README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) for the full safety model.
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
-
|
|
24
|
-
|
|
25
|
-
- **
|
|
26
|
-
- **
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- **
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
pnpm
|
|
78
|
-
pnpm
|
|
79
|
-
pnpm
|
|
80
|
-
pnpm
|
|
81
|
-
pnpm
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
-
|
|
97
|
-
- Fork additions (code-skeleton gate, tooling, localized docs): drscrewdriver.
|
|
98
|
-
- MIT — see [LICENSE](LICENSE) (upstream copyright notice retained) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for bundled tokenizer provenance.
|
|
1
|
+
# dsh-context-compression-improved
|
|
2
|
+
|
|
3
|
+
> An improved fork of [dsh-context-compression-selector](https://github.com/WilliamShi666/dsh-context-compression-selector) — an auditable tool-result context-compression selector for DeepSeek Harness — adding an orthogonal **code-skeleton compression gate**.
|
|
4
|
+
|
|
5
|
+
[中文说明](README.zh.md) · [日本語](README.ja.md) · [한국어](README.ko.md) · [Français](README.fr.md) · [Deutsch](README.de.md) · [Italiano](README.it.md) · [Русский](README.ru.md) · [Español](README.es.md) · [Changelog](CHANGELOG.md) · [Installation guide](docs/installation.md)
|
|
6
|
+
|
|
7
|
+
> [!NOTE]
|
|
8
|
+
> **What this fork adds on top of upstream 0.1.0:**
|
|
9
|
+
>
|
|
10
|
+
> - An orthogonal **code-skeleton compression gate** (`codeSkeleton.enabled`, default off): the first exposure of an oversized fresh source-code tool result can keep a skeleton of imports and declarations — bodies elided, error lines kept — before the regular reducers run.
|
|
11
|
+
> - A settings toggle for that gate in the same selector settings section, independent of every compression profile.
|
|
12
|
+
> - An ESLint baseline wired into CI, a `test:watch` TDD loop, and documentation in English, Simplified Chinese, Japanese, and Korean.
|
|
13
|
+
|
|
14
|
+
> [!IMPORTANT]
|
|
15
|
+
> This project supports **DeepSeek models only**. Lossless measurement and lossy compression depend on the bundled official DeepSeek tokenizers (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Everything else fails open and keeps original tool results. See the [upstream README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety) for the full safety model.
|
|
16
|
+
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Supported DSH hosts:** `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` (15 rc releases across lines 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
21
|
+
## What it is
|
|
22
|
+
|
|
23
|
+
Long-running agent tasks accumulate a large amount of tool output. This community plugin adds selectable, auditable policies for reducing that tool-result context without modifying DeepSeek Harness core:
|
|
24
|
+
|
|
25
|
+
- **Fresh** pre-compresses a newly oversized tool-result segment before the model receives it.
|
|
26
|
+
- **Aggregate** pre-compresses fresh material again when it still grows beyond its budget.
|
|
27
|
+
- **History / micro-compact** replaces eligible old tool results while preserving recent working context.
|
|
28
|
+
- **TailTrim** is an optional Custom-only tail reduction path.
|
|
29
|
+
- **Native** preserves the Harness-style head/middle/tail trimming as one explicit profile.
|
|
30
|
+
- **Code skeleton (new, orthogonal gate)** — see below.
|
|
31
|
+
|
|
32
|
+
Every decision is recorded: stage, reducer, trigger, skip reason, and exact token counts where available.
|
|
33
|
+
|
|
34
|
+
## Code skeleton gate (new)
|
|
35
|
+
|
|
36
|
+
When the gate is enabled, an oversized **fresh source-code tool result** (for example a large `read_file`) first tries a skeleton reduction: imports and type/function/class declarations are kept, function bodies are elided with a marker, and error lines inside elided bodies are preserved. If the skeleton cannot be produced or verified, the result falls back to the original head pruning — the gate can never make context worse.
|
|
37
|
+
|
|
38
|
+
Properties:
|
|
39
|
+
|
|
40
|
+
- **Orthogonal**: independent of the selected profile (`balanced`, `savings`, `cache-strict`, `adaptive`, `custom`, `off`, `native`). All profiles get the gate.
|
|
41
|
+
- **Off by default**: `codeSkeleton: { enabled: false }` until you turn it on.
|
|
42
|
+
- **Measurement-gated**: requires the exact DeepSeek tokenizer; without it the plugin fails open.
|
|
43
|
+
- **Session-frozen**: like all selector settings, changes affect newly observed sessions only.
|
|
44
|
+
- **Strictly parsed**: `codeSkeleton` must be exactly `{ enabled: boolean }`; malformed values throw on the runtime side and show as unreadable in the browser UI.
|
|
45
|
+
|
|
46
|
+
## Settings UI
|
|
47
|
+
|
|
48
|
+
Choose a compression profile, set the Auto Compact trigger level, and toggle code-skeleton compression in the same settings section. The toggle saves on change and shows the saved state on reload.
|
|
49
|
+
|
|
50
|
+

|
|
51
|
+
|
|
52
|
+
## Install
|
|
53
|
+
|
|
54
|
+
**Recommended: install from npm.** One version covers every supported Harness line — `latest` carries the full 15-rc enum (0.1.0-rc.2 → 0.2.0-rc.2); the runtime picks per-line code paths on its own.
|
|
55
|
+
|
|
56
|
+
```sh
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
58
|
+
dsh --profile web --dump-config
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
From source (alternative — the internal package names intentionally stay upstream's):
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
git clone https://github.com/drscrewdriver/dsh-context-compression-improved.git
|
|
65
|
+
cd dsh-context-compression-improved
|
|
66
|
+
pnpm install --frozen-lockfile
|
|
67
|
+
pnpm build
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
Then pack the selector package and add it to a Harness profile — the full walkthrough, including verification and uninstall steps, is in the [installation guide](docs/installation.md).
|
|
71
|
+
|
|
72
|
+
## Development
|
|
73
|
+
|
|
74
|
+
```sh
|
|
75
|
+
pnpm install --frozen-lockfile
|
|
76
|
+
pnpm lint # ESLint baseline (also enforced in CI)
|
|
77
|
+
pnpm typecheck # runtime + selector + tests tsc, plus the bundle step
|
|
78
|
+
pnpm test # full vitest suite
|
|
79
|
+
pnpm test:watch # TDD loop: write the failing regression first, then make it pass
|
|
80
|
+
pnpm build
|
|
81
|
+
pnpm verify:release
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Contributions follow the upstream discipline: add the failing regression first, keep every production change inside this repository, and explain “triggered”, “enabled but skipped”, and fail-open evidence separately. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
85
|
+
|
|
86
|
+
## Compatibility
|
|
87
|
+
|
|
88
|
+
- Built and tested against the official DeepSeek Harness releases; peers declare the full supported-hosts enum (`0.1.0-rc.2` → `0.2.0-rc.2`, six lines) and the plugin uses public plugin and profile APIs only. The supported list is generated into the managed block above by `scripts/sync-hosts.mjs` from `scripts/hosts.mjs`.
|
|
89
|
+
- Requires Node `^22.19.0 || >=24` and pnpm `11.7.0`.
|
|
90
|
+
- The plugin uses only public Harness extension APIs and does not modify Harness core code. Unofficial community project, not affiliated with or endorsed by DeepSeek.
|
|
91
|
+
|
|
92
|
+
## Credits and license
|
|
93
|
+
|
|
94
|
+
- Upstream project and all prior work: [WilliamShi666/dsh-context-compression-selector](https://github.com/WilliamShi666/dsh-context-compression-selector) by WilliamShi666 (MIT).
|
|
95
|
+
- Fork additions (code-skeleton gate, tooling, localized docs): drscrewdriver.
|
|
96
|
+
- MIT — see [LICENSE](LICENSE) (upstream copyright notice retained) and [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md) for bundled tokenizer provenance.
|
package/README.ru.md
CHANGED
|
@@ -14,6 +14,10 @@
|
|
|
14
14
|
> [!IMPORTANT]
|
|
15
15
|
> Этот проект поддерживает **только модели DeepSeek**. Измерение без потерь и сжатие с потерями опираются на входящие в поставку официальные токенизаторы DeepSeek (`deepseek-v4-flash`, `deepseek-v4-pro`, `deepseek-v4-flash-vision-exp`). Во всех остальных случаях плагин работает по принципу fail-open и сохраняет исходные результаты инструментов. Полную модель безопасности см. в [апстрим-README](https://github.com/WilliamShi666/dsh-context-compression-selector#model-support-and-safety).
|
|
16
16
|
|
|
17
|
+
<!-- host-compat:begin — generated by scripts/sync-hosts.mjs from scripts/hosts.mjs; DO NOT EDIT -->
|
|
18
|
+
- **Поддерживаемые хосты 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` (15 rc по линиям 0.1.0 / 0.1.1 / 0.1.2 / 0.1.5 / 0.1.7 / 0.2.0)
|
|
19
|
+
<!-- host-compat:end -->
|
|
20
|
+
|
|
17
21
|
## Что это такое
|
|
18
22
|
|
|
19
23
|
Долгоживущие задачи агентов накапливают большой объём вывода инструментов. Этот плагин сообщества добавляет выбираемые и проверяемые политики сокращения контекста результатов инструментов без изменения ядра DeepSeek Harness:
|
|
@@ -47,16 +51,10 @@
|
|
|
47
51
|
|
|
48
52
|
## Установка
|
|
49
53
|
|
|
50
|
-
**Рекомендуется: установка из npm.**
|
|
54
|
+
**Рекомендуется: установка из npm.** Одна версия обслуживает все поддерживаемые линейки Harness — `latest` несёт полный перечень из 15 rc (0.1.0-rc.2 → 0.2.0-rc.2); рантайм сам выбирает ветки кода для своей линейки.
|
|
51
55
|
|
|
52
56
|
```sh
|
|
53
|
-
dsh plugin --profile web add dsh-context-compression-improved@
|
|
54
|
-
# DSH 0.1.7 line:
|
|
55
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.7
|
|
56
|
-
# DSH 0.1.5 line:
|
|
57
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.5
|
|
58
|
-
# DSH 0.1.2 line:
|
|
59
|
-
# dsh plugin --profile web add dsh-context-compression-improved@dsh-0.1.2
|
|
57
|
+
dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
60
58
|
dsh --profile web --dump-config
|
|
61
59
|
```
|
|
62
60
|
|
|
@@ -87,7 +85,7 @@ pnpm verify:release
|
|
|
87
85
|
|
|
88
86
|
## Совместимость
|
|
89
87
|
|
|
90
|
-
- Собрано и протестировано против
|
|
88
|
+
- Собрано и протестировано против официальных релизов DeepSeek Harness; peers перечисляют полный список поддержки (`0.1.0-rc.2` → `0.2.0-rc.2`, шесть линеек), и плагин использует только публичные API плагинов и профилей. Список генерируется `scripts/sync-hosts.mjs` из `scripts/hosts.mjs` в управляемый блок выше.
|
|
91
89
|
- Требуются Node `^22.19.0 || >=24` и pnpm `11.7.0`.
|
|
92
90
|
- Плагин использует только публичные API расширений Harness и не изменяет код ядра Harness. Неофициальный проект сообщества, не связан с DeepSeek и не одобрен им.
|
|
93
91
|
|