dsh-context-compression-improved 0.2.0 → 0.3.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 +1 -1
- package/.github/workflows/ci.yml +1 -7
- package/CHANGELOG.ja.md +18 -21
- package/CHANGELOG.ko.md +17 -21
- package/CHANGELOG.md +16 -17
- package/CHANGELOG.zh.md +15 -18
- package/CONTRIBUTING.md +1 -1
- package/README.ja.md +1 -20
- package/README.ko.md +12 -30
- package/README.md +1 -19
- package/README.zh.md +5 -21
- package/THIRD_PARTY_NOTICES.md +2 -2
- package/docs/compat-0.1.5-report.md +77 -0
- package/docs/installation.ja.md +6 -4
- package/docs/installation.ko.md +9 -7
- package/docs/installation.md +3 -1
- package/docs/installation.zh.md +3 -2
- package/docs/repair-log.md +54 -33
- package/eslint.config.js +2 -2
- package/package.json +56 -36
- package/packages/selector/README.md +7 -12
- package/packages/selector/README.zh.md +6 -13
- package/packages/selector/THIRD_PARTY_NOTICES.md +2 -8
- package/packages/selector/cordis.patch.yml +7 -5
- package/packages/selector/dsh.plugin.json +2 -2
- package/packages/selector/lib/client.d.ts +31 -5
- package/packages/selector/lib/client.js +100 -82
- package/packages/selector/lib/index.d.ts +8 -20
- package/packages/selector/lib/index.js +9 -14
- package/packages/selector/lib/invariant.js +4 -4
- package/packages/selector/lib/pruner.d.ts +13 -4
- package/packages/selector/lib/pruner.js +91 -46
- package/packages/selector/lib/tail-trim.js +13 -4
- package/packages/selector/package.json +23 -23
- package/packages/selector/screenshots.json +1 -4
- package/packages/selector/src/client/CompressionProfileControls.tsx +5 -8
- package/packages/selector/src/client/CompressionProfileSelector.tsx +9 -5
- package/packages/selector/src/client/EstimatorControls.tsx +28 -32
- package/packages/selector/src/client/index.ts +101 -63
- package/packages/selector/src/client/locales.ts +0 -2
- package/packages/selector/src/client/preset-options.ts +49 -35
- package/packages/selector/src/client/settings-section.tsx +4 -6
- package/packages/selector/src/deepseek-v4-tokenizer.ts +0 -5
- package/packages/selector/src/index.ts +41 -46
- package/packages/selector/src/invariant.ts +5 -5
- package/packages/selector/src/pruner.ts +67 -36
- package/packages/selector/src/runtime/measurement.ts +6 -2
- package/packages/selector/src/runtime/session-events.ts +14 -1
- package/packages/selector/src/runtime/tail-trim.ts +4 -4
- package/packages/selector/src/runtime/tokenpilot/estimator.ts +34 -3
- package/packages/selector/src/runtime/types.ts +1 -1
- package/packages/selector/tests/auto-compact.client.spec.tsx +0 -13
- package/packages/selector/tests/built/client-artifact.spec.ts +5 -1
- package/packages/selector/tests/code-skeleton.client.spec.ts +2 -1
- package/packages/selector/tests/custom-contract.client.spec.ts +2 -1
- package/packages/selector/tests/estimator-channel.client.spec.tsx +16 -11
- package/packages/selector/tests/estimator-route-registration.host.spec.ts +12 -0
- package/packages/selector/tests/host-preset-overlay.host.spec.ts +6 -4
- package/packages/selector/tests/preset-options-write.client.spec.ts +87 -79
- package/packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts +17 -12
- package/packages/selector/tests/preset-overlay.host.spec.ts +5 -2
- package/packages/selector/tests/profiles.client.spec.tsx +3 -3
- package/packages/selector/tests/public/package-contract.client.spec.ts +27 -3
- package/packages/selector/tests/runtime/public/public-runtime.spec.ts +103 -81
- package/packages/selector/tests/runtime/session-events.spec.ts +1 -1
- package/packages/selector/tests/settings-seat.client.spec.ts +86 -0
- package/packages/selector/tests/standing-generation.host.spec.ts +88 -71
- package/packages/selector/tests/subagent-cache-reuse.host.spec.ts +24 -21
- package/pnpm-workspace.yaml +52 -5
- package/scripts/capture-profile-baseline.mjs +42 -0
- package/scripts/generate-tokenizer-fixtures.py +5 -5
- package/scripts/generate-vision-fixtures.py +2 -2
- package/scripts/{packed-components-smoke.ts → packed-components-smoke.mjs} +116 -119
- package/scripts/{packed-install-e2e.ts → packed-install-e2e.mjs} +188 -160
- package/scripts/{verify-release.ts → verify-release.mjs} +70 -94
- package/tests/TEST_INVENTORY.md +6 -7
- package/scripts/capture-profile-baseline.ts +0 -80
- package/tsconfig.scripts.json +0 -13
- /package/{packages/selector/assets/screenshots → docs/assets}/context-compression-selector-profiles.jpg +0 -0
- /package/{packages/selector/assets/screenshots → docs/assets}/context-compression-selector-settings.png +0 -0
package/docs/installation.ja.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](installation.md) · [中文](installation.zh.md) · [日本語](installation.ja.md) · [한국어](installation.ko.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
このガイドではソースからフォークをインストールします。フォークはまだ npm に公開されておらず、
|
|
6
|
+
パッケージ名は意図的に上流と同一です(`dsh-context-compression-improved` の単一パッケージで、
|
|
7
|
+
以前は別パッケージだった runtime も同梱されます)。
|
|
6
8
|
|
|
7
9
|
## 前提条件
|
|
8
10
|
|
|
@@ -22,14 +24,14 @@ pnpm build
|
|
|
22
24
|
|
|
23
25
|
`pnpm build` はすべてのパッケージの両方のライブラリ成果物をバンドルします(`tsdown`)。インストール前にフルスイートを実行したい場合は `pnpm test` を実行してください。
|
|
24
26
|
|
|
25
|
-
## 2. Bundle エントリーパッケージを
|
|
27
|
+
## 2. Bundle エントリーパッケージをpack
|
|
26
28
|
|
|
27
29
|
selector パッケージが唯一の Bundle エントリーで、ランタイムはその正確なバージョン依存として付いてきます:
|
|
28
30
|
|
|
29
31
|
```sh
|
|
30
32
|
cd packages/selector
|
|
31
33
|
pnpm pack
|
|
32
|
-
# →
|
|
34
|
+
# →dsh-context-compression-improved-0.1.0.tgz
|
|
33
35
|
cd ../..
|
|
34
36
|
```
|
|
35
37
|
|
|
@@ -48,7 +50,7 @@ dsh --profile web --dump-config
|
|
|
48
50
|
|
|
49
51
|
## 4. コードスケルトンゲートを有効にする
|
|
50
52
|
|
|
51
|
-
DeepSeek Harness
|
|
53
|
+
DeepSeek Harness の設定→**Context compression selector** を開きます:
|
|
52
54
|
|
|
53
55
|
1. 圧縮プロファイルを選択します(ゲートはすべてのプロファイルに対して直交します)。
|
|
54
56
|
2. 必要に応じて Auto Compact トリガーレベルを調整します(50–90%、デフォルト 80%)。
|
package/docs/installation.ko.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](installation.md) · [中文](installation.zh.md) · [日本語](installation.ja.md) · [한국어](installation.ko.md)
|
|
4
4
|
|
|
5
|
-
이 가이드는
|
|
5
|
+
이 가이드는 소스에서 포크를 설치합니다. 포크는 아직 npm에 게시되지 않았으며, 패키지 이름은
|
|
6
|
+
의도적으로 업스트림과 동일합니다(`dsh-context-compression-improved` 단일 패키지이며,
|
|
7
|
+
예전에 별도 패키지였던 runtime이 함께 포함됩니다).
|
|
6
8
|
|
|
7
9
|
## 사전 요구 사항
|
|
8
10
|
|
|
@@ -20,7 +22,7 @@ pnpm install --frozen-lockfile
|
|
|
20
22
|
pnpm build
|
|
21
23
|
```
|
|
22
24
|
|
|
23
|
-
`pnpm build`는 모든
|
|
25
|
+
`pnpm build`는 모든 패키지의두라이브러리 산출물을 번들합니다(`tsdown`). 설치 전에 전체 테스트 스위트를 실행하려면 `pnpm test`를 먼저 실행하세요.
|
|
24
26
|
|
|
25
27
|
## 2. Bundle 엔트리 패키지를 pack
|
|
26
28
|
|
|
@@ -52,14 +54,14 @@ DeepSeek Harness 설정 → **Context compression selector**를 엽니다:
|
|
|
52
54
|
|
|
53
55
|
1. 압축 프로파일을 선택합니다(게이트는 모든 프로파일에 대해 직교합니다).
|
|
54
56
|
2. 필요하면 Auto Compact 트리거 레벨을 조정합니다(50–90%, 기본값 80%).
|
|
55
|
-
3. **Code skeleton compression**을 **On**으로 설정합니다. 토글은
|
|
57
|
+
3. **Code skeleton compression**을 **On**으로 설정합니다. 토글은 변경시저장됩니다.
|
|
56
58
|
|
|
57
|
-
다른 셀렉터 설정과 마찬가지로 값은 세션이 처음 관찰하는 시점에
|
|
59
|
+
다른 셀렉터 설정과 마찬가지로 값은 세션이 처음 관찰하는 시점에 고정됩니다—게이트는 새로 관찰된 세션에만 적용되며, 실행 중인 작업에는 적용되지 않습니다.
|
|
58
60
|
|
|
59
61
|
## 5. 업데이트 및 제거
|
|
60
62
|
|
|
61
63
|
```sh
|
|
62
|
-
# 업데이트: pull, 재빌드, 재
|
|
64
|
+
# 업데이트: pull, 재빌드, 재pack, 새 tarball을 다시 추가
|
|
63
65
|
git pull && pnpm install --frozen-lockfile && pnpm build
|
|
64
66
|
cd packages/selector && pnpm pack && cd ../..
|
|
65
67
|
dsh plugin --profile web add packages/selector/dsh-context-compression-improved-0.1.0.tgz
|
|
@@ -71,6 +73,6 @@ dsh plugin --profile web remove dsh-context-compression-improved
|
|
|
71
73
|
## 문제 해결
|
|
72
74
|
|
|
73
75
|
- **덤프에 Bundle이 활성으로 표시되지 않음**: 프로파일을 재시작하고, 셀렉터 엔트리 패키지(런타임이 아닌)를 추가했는지, Harness 버전이 호환 peer 범위 내인지 확인하세요.
|
|
74
|
-
- **도구 결과가 한 번도 스켈레톤 압축되지 않음**: 게이트는 기본값이 off입니다. 토글을
|
|
75
|
-
- **토글이 읽을 수 없음으로 표시됨**: 저장된 `codeSkeleton` 섹션이 엄격한 브라우저 디코드에 실패했습니다(정확히 `{ enabled: boolean }
|
|
76
|
+
- **도구 결과가 한 번도 스켈레톤 압축되지 않음**: 게이트는 기본값이 off입니다. 토글을 확인하세요 압축은 정확한 토크나이저 모델 경로에서 새로 들어온 초대형 소스코드 도구 결과에만 적용되며, 모든 건너뜀은 사유와 함께 감사 기록에 남습니다.
|
|
77
|
+
- **토글이 읽을 수 없음으로 표시됨**: 저장된 `codeSkeleton` 섹션이 엄격한 브라우저 디코드에 실패했습니다(정확히 `{ enabled: boolean }`이어야함. 잘못된 섹션을제거하면 기본값으로 돌아갑니다.
|
|
76
78
|
- **업데이트 단계 실패**: 플러그인은 npm 패키지 의미론을 따릅니다. 사용 중인 Harness 빌드가 tarball 간 업그레이드를 거부하면 먼저 이전 버전을 제거하세요.
|
package/docs/installation.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](installation.md) · [中文](installation.zh.md) · [日本語](installation.ja.md) · [한국어](installation.ko.md)
|
|
4
4
|
|
|
5
|
-
This guide installs the fork from source. The fork is
|
|
5
|
+
This guide installs the fork from source. The fork is not yet published to npm; the internal
|
|
6
|
+
package name intentionally stays upstream's (`dsh-context-compression-improved`). The runtime
|
|
7
|
+
that used to be a second package is now part of it, so one install brings the whole stack.
|
|
6
8
|
|
|
7
9
|
## Prerequisites
|
|
8
10
|
|
package/docs/installation.zh.md
CHANGED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
> [English](installation.md) · [中文](installation.zh.md) · [日本語](installation.ja.md) · [한국어](installation.ko.md)
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本教程从源码安装 fork。fork 尚未发布到 npm;包名有意与上游保持一致:
|
|
6
|
+
`dsh-context-compression-improved`(单一包 —— 原先独立发布的 runtime 包已并入其中)。
|
|
6
7
|
|
|
7
8
|
## 前置条件
|
|
8
9
|
|
|
@@ -48,7 +49,7 @@ dsh --profile web --dump-config
|
|
|
48
49
|
|
|
49
50
|
## 4. 打开代码骨架门
|
|
50
51
|
|
|
51
|
-
打开 DeepSeek Harness 设置 →
|
|
52
|
+
打开 DeepSeek Harness 设置 → **上下文压缩选择器*:
|
|
52
53
|
|
|
53
54
|
1. 选择一个压缩 Profile(这道门与所有 Profile 正交)。
|
|
54
55
|
2. 按需调整 Auto Compact 触发水位(50–90%,默认 80%)。
|
package/docs/repair-log.md
CHANGED
|
@@ -415,7 +415,7 @@ deterministic.
|
|
|
415
415
|
| 7 | `pnpm verify:release` | exit 0 |
|
|
416
416
|
| 8 | `pnpm pack:dry-run` | exit 0 |
|
|
417
417
|
| 9 | `pnpm test:e2e:packed` (`DSH_E2E_MODE=dev`) | exit 0 |
|
|
418
|
-
| 10 | `pnpm test:e2e:packed` (release mode) |
|
|
418
|
+
| 10 | `pnpm test:e2e:packed` (release mode) | **blocked** — external precondition, see below |
|
|
419
419
|
|
|
420
420
|
### Gate 5 — the failure set is nondeterministic; do not cite it as "4 known failures"
|
|
421
421
|
|
|
@@ -456,38 +456,13 @@ assertions that assume a coarser clock.
|
|
|
456
456
|
item by item" is unsatisfiable — the baseline has no single failure set. Compare
|
|
457
457
|
*ever-failed* sets over at least three interleaved runs per side instead.
|
|
458
458
|
|
|
459
|
-
### Gate 10 —
|
|
459
|
+
### Gate 10 — external precondition, not a defect
|
|
460
460
|
|
|
461
|
-
Release mode
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
packument responded 404`.
|
|
467
|
-
|
|
468
|
-
This was recorded here as an external precondition. That was wrong. The literal was a
|
|
469
|
-
fixture defect — exactly the hardcoded-version class this repository's own doctrine names —
|
|
470
|
-
and it is fixed: the predecessor is now whatever the registry actually offers, resolved by
|
|
471
|
-
publication order from `packument.time` (not semver order, which avoids a semver dependency
|
|
472
|
-
and handles prereleases), and `predecessorFound` keys both release-mode gates instead of a
|
|
473
|
-
hardcoded version.
|
|
474
|
-
|
|
475
|
-
| Registry state | `upgradeLeg` | Release outcome |
|
|
476
|
-
| --- | --- | --- |
|
|
477
|
-
| package unpublished (404) | `skipped-package-not-published` | pass, skip recorded |
|
|
478
|
-
| published, no other version | `skipped-no-earlier-release` | pass, skip recorded |
|
|
479
|
-
| published, earlier version exists | `installed` | pass only when the leg installed |
|
|
480
|
-
| any other fetch or tarball failure | — | throws |
|
|
481
|
-
|
|
482
|
-
Only the third row runs the leg. Where a predecessor exists the gate stays fail-closed: a
|
|
483
|
-
leg reporting anything other than `installed` throws. Where none exists the skip is never
|
|
484
|
-
silent — it is emitted as `UPGRADE_LEG_SKIPPED <reason>` in the report, and
|
|
485
|
-
`officialCloneSmoke` falls back to that marker rather than passing vacuous on a package that
|
|
486
|
-
has never shipped.
|
|
487
|
-
|
|
488
|
-
This is a one-time bridge. Once the first version is published, `predecessorFound` is true
|
|
489
|
-
on every subsequent run and the upgrade leg is a hard requirement again — which is the
|
|
490
|
-
state the gate was always meant to enforce.
|
|
461
|
+
Release mode needs the *published* previous release to build the upgrade leg of its
|
|
462
|
+
fixture. `0.1.0-beta.2` was never published, so the fixture aborts with `release gate
|
|
463
|
+
requires the published previous release for the upgrade leg: packument responded 404`.
|
|
464
|
+
`DSH_E2E_MODE=dev` (gate 9) is the runnable leg and passes. Blocked on publishing, not on
|
|
465
|
+
this repository.
|
|
491
466
|
|
|
492
467
|
### Criterion withdrawn
|
|
493
468
|
|
|
@@ -524,6 +499,7 @@ The merged package keeps **one** invariant companion, and it is the runtime's: `
|
|
|
524
499
|
| `feat/ctx-preset-v2` @ `455f74f` | **present (crash)** | partial | n/a before merge | needed | affected; D1/D2 fixed on merge branch |
|
|
525
500
|
| merged single package | eliminated | fixed (all four subpaths) | **gated** | delivered | this change |
|
|
526
501
|
| `compat/0.1.5` @ `d7c592d` | no (lazy) | **absent** | n/a | needed | **inherits the whole contract** |
|
|
502
|
+
| `ts/0.1.5` @ `refactor/ts-0.1.5-merge` | no | **fixed by the R3 replay** (root manifest is the install surface, `./pruner` + `./invariant` declared) | **gated** (shared `lib/config.js` chunk added by the replay) | needed (script delivered) | contract inherited; D7 re-checked and the route defect it masked fixed —see below |
|
|
527
503
|
| `baseline/pre-god-module-split`, `main` @ `e337bf5` | no | **absent, no `lib/`** | n/a | needed | not distributable by design |
|
|
528
504
|
| any future single-package release | structurally impossible | — | **permanent gate** | — | inherits D3 |
|
|
529
505
|
| every branch on this host | — | — | — | — | was **blocked by D6**; the profile install now completes, so real-machine verification is unblocked |
|
|
@@ -537,11 +513,49 @@ The merged package keeps **one** invariant companion, and it is the runtime's: `
|
|
|
537
513
|
| `compat/0.1.5` @ `d7c592d` | `value as WebServerLike` — the service itself | **correct; never had D7** |
|
|
538
514
|
| `feat/ctx-preset-v2` @ `e588f1c`, `ts/0.1.2+` @ `0eb5183` | `{ register }` — a detached method | **carries D7** |
|
|
539
515
|
| `baseline/pre-god-module-split`, `main` @ `e337bf5` | no such helper | n/a |
|
|
516
|
+
| `ts/0.1.5` @ `refactor/ts-0.1.5-merge` | `value as WebServerLike` —the service itself | **correct; never had D7**. The helper was taken from this line, not from the V2 line |
|
|
540
517
|
|
|
541
518
|
The defect was introduced on the V2 line, not inherited from the 0.1.x line. That inverts the
|
|
542
519
|
usual direction of these hand-offs: **the 0.1.5 replay must not copy this helper out of
|
|
543
520
|
`feat/ctx-preset-v2`.** Take `compat`'s body, or the fixed one from `00afcfc`; they agree.
|
|
544
521
|
|
|
522
|
+
## `ts/0.1.5` (compat) verdicts —2026-09-15
|
|
523
|
+
|
|
524
|
+
Branch `refactor/ts-0.1.5-merge`, the R3 replay of the single-package install contract
|
|
525
|
+
(`6941d2f` merge, `e511fe8` contract specs, `165f495` route registration, `e7e927c` lint
|
|
526
|
+
paths, `66c8c63` toolchain sweep, `6f2cb51` rebuilt artifacts, `75e3327` settings schema).
|
|
527
|
+
|
|
528
|
+
| Defect | Verdict on this line |
|
|
529
|
+
| --- | --- |
|
|
530
|
+
| D1 —host entry statically imports a sibling package | **unaffected.** This line had already inlined the namespace and downgraded the settings schema to `z.any()` (`ab2175a`) to keep the entry free of cross-package imports; the replay removed the reason for both. |
|
|
531
|
+
| D2 —root manifest missing the install contract | **fixed by the replay.** The root manifest is the install surface again: `name`, `main`, `types`, `exports` (`.`, `./invariant`, `./pruner`, `./client`), `dependencies`, `dsh`. |
|
|
532
|
+
| D3 —build chunks not committed | **gated here too.** The replay reintroduced a shared chunk (`lib/config.js`, imported by both entries through the settings schema), so the artifact-graph gate was run red 鈫?green: 11 artifacts, every relative import resolves, every non-CSS artifact is inside the `files` whitelist and tracked, no `.css` entry declared. |
|
|
533
|
+
| D4 —consumer profile leftovers | **same status as the other lines**: the hygiene script is delivered, the profile side is a host precondition the operator runs. |
|
|
534
|
+
| D5 —`compat/0.1.5` predates the install contract | **this replay is the D5 action.** |
|
|
535
|
+
| D6 —profile blocks dependency reconciliation | **unchanged.** No `os error 5` in this round; the `katex` write gap is still on the books for the next subtree replacement. |
|
|
536
|
+
| D7 —estimator catalog route never registered | **the detached-method body was never here**, but the route still had a registration defect of its own: the injection gate asked for `webServer`, `llm` and `agentDefaultModel`, and an unsatisfied `ctx.inject` callback is silent, so a usable `webServer` with a late `llm` left the plugin with no HTTP API at all. Fixed by `165f495` (dual prefix, guarded two-channel registration, per-request service resolution, `console` lifecycle lines); guard `estimator-route-registration.host.spec.ts`, six cases, falsified against the old gate (4 of 6 red). |
|
|
537
|
+
| U1 —the estimator card hides itself | **present, not fixed on this line.** The 0.1.5 client still renders nothing when the profile or channel does not enable the estimator, so the block disappears without saying why. The 0.1.2 line fixed this in `bb1f496`; this replay did not carry the client change. Recorded here so it is not silently inherited —porting it is a client-side item, not part of the install contract. |
|
|
538
|
+
|
|
539
|
+
**Estimator defects as first reported (`D-1` route, `D-2` save awareness).** `D-1` is D7 above;
|
|
540
|
+
on this line it was the over-broad gate, now fixed. `D-2` (explicit save button with three-state
|
|
541
|
+
feedback) is **not implemented on either line**: this branch still commits on blur, exactly like
|
|
542
|
+
`ts/0.1.2+`, where the item was explicitly descoped once the real defect turned out to be the
|
|
543
|
+
route.
|
|
544
|
+
|
|
545
|
+
**One more defect found and fixed by the replay.** `ab2175a` downgraded the settings schema to
|
|
546
|
+
`z.any()`, and that schema was the only thing publishing the daily Custom defaults, so
|
|
547
|
+
`settings.get('context-compression')` no longer carried `custom`. It was already failing before
|
|
548
|
+
the merge: the loader E2E case `publishes the daily Custom defaults from the plugin-owned
|
|
549
|
+
settings row` and the packed install E2E both stop on `settings.custom` being undefined, and the
|
|
550
|
+
five `public-runtime` Auto Compact cases assert audits derived from the same document. `75e3327`
|
|
551
|
+
restores `ContextCompressionSettingsSchema` in both `settings.register` calls, matching the
|
|
552
|
+
0.1.2 line.
|
|
553
|
+
|
|
554
|
+
**Suite effect of this branch, same machine and command:** 22 failed / 358 passed before
|
|
555
|
+
(`d7c592d`), 1 failed / 365 passed after. The remaining failure is the Windows mtime flake in
|
|
556
|
+
`standing-generation.host.spec.ts` that the compat report already documents as environment
|
|
557
|
+
caused.
|
|
558
|
+
|
|
545
559
|
## Inheritance rules
|
|
546
560
|
|
|
547
561
|
1. **The root manifest is the install contract**: `name`, `main`, `types`, `exports`,
|
|
@@ -575,8 +589,15 @@ usual direction of these hand-offs: **the 0.1.5 replay must not copy this helper
|
|
|
575
589
|
| Date | Entry | Action |
|
|
576
590
|
| --- | --- | --- |
|
|
577
591
|
| 2026-09-14 | D1–D5 | Ledger created; D1 fixed; D2 fixed for `dependencies`/`./pruner`; D3 gate added and verified; D4 delivered as a script; D5 recorded for `compat/0.1.5` |
|
|
578
|
-
| 2026-09-14 | D2 | `./invariant` added to the root `exports`; root and package manifests now agree. Ten-gate closure ledger added, with the gate-5 flakiness evidence and the withdrawn identity-hash criterion |
|
|
592
|
+
| 2026-09-14 | D2 | `./invariant` added to the root `exports`; root and package manifests now agree. Ten-gate closure ledger added, with the gate-5 flakiness evidence and the withdrawn identity-hash criterion || 2026-09-15 | D2/D3 | `ts/0.1.2+` fast-forwarded onto the god-module-split branch (`04f86e4`) and pushed; the rebuild reproduces the committed `lib/` blob for blob |
|
|
593
|
+
| 2026-09-15 | D5 | `ts/0.1.5` replay: runtime merged into the selector package, root manifest made the install surface, toolchain/scripts/CI swept to one package, artifacts committed, D3 gate green |
|
|
594
|
+
| 2026-09-15 | D7 | `ts/0.1.5` route registration rewritten to the verified pattern; guard added and falsified against the old gate |
|
|
595
|
+
| 2026-09-15 | settings defaults | `z.any()` reverted to `ContextCompressionSettingsSchema` on `ts/0.1.5`; the loader E2E, the packed E2E and the five Auto Compact cases pass again || 2026-09-15 | docs | `ts/0.1.5` docs swept to the single package (four-language installation guides, selector READMEs, `THIRD_PARTY_NOTICES`, `TEST_INVENTORY`, four CHANGELOGs) |
|
|
596
|
+
| 2026-09-15 | known doc defect | `README.md`, `README.zh.md` and the three localized installation guides carry a handful of corrupted non-ASCII bytes (`0xE2` sequences) **on both lines, pre-dating this work**. The stale two-package sentences were replaced with correct text; the surrounding corruption still needs a regeneration pass from the English source. Recorded so it is not mistaken for a merge artifact |
|
|
579
597
|
| 2026-09-14 | D6 | Profile dependency-reconciliation blocker diagnosed: two independent `os error 5` sources (one ACL-denied directory; mapped native modules held by the live host), plus the ownership-vs-write-right criterion warning. Delivered as a dry-runnable script |
|
|
580
598
|
| 2026-09-15 | D6 | **Resolved.** One plain `pnpm install` in the profile converged (`+256 -16`, exit 0); the lockfile repointed itself and the `_pacquet-stage_` residue is gone. Cleared by convergence over successive attempts, not by the ACL repair — the `katex` denial stays on record |
|
|
581
599
|
| 2026-09-15 | D7 | **The estimator catalog route had never registered at all.** `asWebServer` detached `register` from the service, `this` became the wrapper, the host threw inside `register`, and a catch-all swallowed it. Fixed by passing the service itself; 200 verified on the real host; the injection, isolation and transport hypotheses recorded earlier are withdrawn |
|
|
582
600
|
| 2026-09-15 | U1 | **The estimator card was hidden by its own gate.** Off TokenPilot-inspired the section rendered `null`, so the reader saw a missing feature rather than a gated one. The heading and anchor are now kept and the hidden branch names the profile that unlocks the card; the gate itself is unchanged. Guard added with a counter-proof; the save-affordance question stays open |
|
|
601
|
+
| 2026-09-15 | doc corruption — mechanism | **Diagnosed.** A damaged spot is the 2-byte prefix of a three-byte UTF-8 character followed by `0x3F`: the character lost its third byte and, in most spots, the byte that followed it was consumed too (a double-byte-code-page decode/write pair collapse; 0 or 1 bytes lost per spot). The damage is **inherited, not produced here**: the newest valid blob of every affected file is `e337bf5`, while the same files are already defective at the `compat/0.1.5` baseline `d7c592d` and at `04f86e4`. Ten files carry it, not five — `README.{zh,ja,ko}.md` and `scripts/packed-install-e2e.mjs` were missed by the earlier note |
|
|
602
|
+
| 2026-09-15 | doc corruption — repaired | **Batch I / T-I2.** All ten files repaired by restoring each damaged spot from `e337bf5`, with three independent checks: the restored character must carry the surviving 2-byte prefix; re-corrupting the repair reproduces the previous bytes exactly (so the edit touches nothing but the damage, and no line, no EOL and no other character moves); and the repair must agree with the valid ancestor everywhere outside the restored spots. Every affected file is now valid UTF-8. The English `README.md` is the clean case: ten spots, all `—`/quote characters plus their following space, zero other differences from the ancestor |
|
|
603
|
+
| 2026-09-15 | ledger encoding | The twelve `—` characters in this file had been mangled to `鈥?` by the PowerShell port of the ledger (the 0.1.2 source has none); restored. Same class as the doc corruption above, introduced by that one-time port rather than inherited |
|
package/eslint.config.js
CHANGED
|
@@ -4,12 +4,12 @@ import tseslint from 'typescript-eslint'
|
|
|
4
4
|
|
|
5
5
|
export default tseslint.config(
|
|
6
6
|
{
|
|
7
|
-
ignores: ['**/node_modules/**', '**/lib/**', '**/dist/**', '**/
|
|
7
|
+
ignores: ['**/node_modules/**', '**/lib/**', '**/dist/**', '**/coverage/**', 'docs/**'],
|
|
8
8
|
},
|
|
9
9
|
js.configs.recommended,
|
|
10
10
|
...tseslint.configs.recommended,
|
|
11
11
|
{
|
|
12
|
-
files: ['packages/**/*.{ts,tsx}', 'scripts/**/*.{js,mjs
|
|
12
|
+
files: ['packages/**/*.{ts,tsx}', 'scripts/**/*.{js,mjs}', 'eslint.config.js'],
|
|
13
13
|
languageOptions: {
|
|
14
14
|
globals: { ...globals.browser, ...globals.node },
|
|
15
15
|
},
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-context-compression-improved",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org",
|
|
6
6
|
"access": "public",
|
|
7
|
-
"tag": "dsh-0.1.
|
|
7
|
+
"tag": "dsh-0.1.5"
|
|
8
8
|
},
|
|
9
9
|
"type": "module",
|
|
10
10
|
"main": "packages/selector/lib/index.js",
|
|
@@ -36,9 +36,8 @@
|
|
|
36
36
|
"client": {
|
|
37
37
|
"inject": [
|
|
38
38
|
"@deepseek-ai/dsh-client-locale",
|
|
39
|
-
"@deepseek-ai/dsh-client-
|
|
40
|
-
"@deepseek-ai/dsh-client-ui-settings"
|
|
41
|
-
"@deepseek-ai/dsh-client-ui-workspace"
|
|
39
|
+
"@deepseek-ai/dsh-client-ui-slots",
|
|
40
|
+
"@deepseek-ai/dsh-client-ui-settings"
|
|
42
41
|
],
|
|
43
42
|
"platform": "web"
|
|
44
43
|
},
|
|
@@ -50,11 +49,10 @@
|
|
|
50
49
|
"packageManager": "pnpm@11.7.0",
|
|
51
50
|
"engines": {
|
|
52
51
|
"node": "^22.19.0 || >=24.0.0",
|
|
53
|
-
"dsh": ">=0.1.
|
|
52
|
+
"dsh": ">=0.1.5-alpha.1 <0.2.0-0"
|
|
54
53
|
},
|
|
55
54
|
"scripts": {
|
|
56
55
|
"build": "pnpm -r --if-present run bundle",
|
|
57
|
-
"build:scripts": "tsc -p tsconfig.scripts.json",
|
|
58
56
|
"typecheck": "pnpm --filter dsh-context-compression-improved run bundle && pnpm --filter dsh-context-compression-improved run typecheck && pnpm run typecheck:tests",
|
|
59
57
|
"typecheck:tests": "tsc --noEmit -p tsconfig.tests.json",
|
|
60
58
|
"lint": "eslint packages scripts eslint.config.js",
|
|
@@ -62,9 +60,9 @@
|
|
|
62
60
|
"test": "vitest run",
|
|
63
61
|
"test:watch": "vitest",
|
|
64
62
|
"test:built": "vitest run --config vitest.built.config.ts",
|
|
65
|
-
"test:e2e:packed": "node scripts
|
|
63
|
+
"test:e2e:packed": "node scripts/packed-install-e2e.mjs",
|
|
66
64
|
"test:unit": "vitest run",
|
|
67
|
-
"verify:release": "node scripts
|
|
65
|
+
"verify:release": "node scripts/verify-release.mjs",
|
|
68
66
|
"pack:dry-run": "pnpm -r --if-present run pack:dry-run"
|
|
69
67
|
},
|
|
70
68
|
"devDependencies": {
|
|
@@ -72,33 +70,55 @@
|
|
|
72
70
|
"@deepseek-ai/cordis-plugin-group": "1.0.1",
|
|
73
71
|
"@deepseek-ai/cordis-plugin-include": "1.0.6",
|
|
74
72
|
"@deepseek-ai/cordis-plugin-loader": "1.0.2",
|
|
75
|
-
"@deepseek-ai/dsh-agent": "0.1.
|
|
76
|
-
"@deepseek-ai/dsh-agent-loop": "0.1.
|
|
77
|
-
"@deepseek-ai/dsh-agent-loop-testkit": "0.1.
|
|
78
|
-
"@deepseek-ai/dsh-agent-presets": "0.1.
|
|
79
|
-
"@deepseek-ai/dsh-
|
|
80
|
-
"@deepseek-ai/dsh-
|
|
81
|
-
"@deepseek-ai/dsh-
|
|
82
|
-
"@deepseek-ai/dsh-
|
|
83
|
-
"@deepseek-ai/dsh-
|
|
84
|
-
"@deepseek-ai/dsh-client-
|
|
85
|
-
"@deepseek-ai/dsh-
|
|
86
|
-
"@deepseek-ai/dsh-
|
|
87
|
-
"@deepseek-ai/dsh-
|
|
88
|
-
"@deepseek-ai/dsh-
|
|
89
|
-
"@deepseek-ai/dsh-
|
|
90
|
-
"@deepseek-ai/dsh-
|
|
91
|
-
"@deepseek-ai/dsh-
|
|
92
|
-
"@deepseek-ai/dsh-
|
|
93
|
-
"@deepseek-ai/dsh-
|
|
94
|
-
"@deepseek-ai/dsh-
|
|
95
|
-
"@deepseek-ai/dsh-
|
|
96
|
-
"@deepseek-ai/dsh-
|
|
97
|
-
"@deepseek-ai/dsh-
|
|
98
|
-
"@deepseek-ai/dsh-
|
|
99
|
-
"@deepseek-ai/dsh-
|
|
100
|
-
"@deepseek-ai/dsh-
|
|
101
|
-
"@deepseek-ai/
|
|
73
|
+
"@deepseek-ai/dsh-agent": "0.1.5-rc.2",
|
|
74
|
+
"@deepseek-ai/dsh-agent-loop": "0.1.5-rc.2",
|
|
75
|
+
"@deepseek-ai/dsh-agent-loop-testkit": "0.1.5-rc.2",
|
|
76
|
+
"@deepseek-ai/dsh-agent-presets": "0.1.5-rc.2",
|
|
77
|
+
"@deepseek-ai/dsh-anonymous-user-id": "0.1.5-rc.2",
|
|
78
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.5-rc.2",
|
|
79
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.5-rc.2",
|
|
80
|
+
"@deepseek-ai/dsh-atomic-write": "0.1.5-rc.2",
|
|
81
|
+
"@deepseek-ai/dsh-attachment": "0.1.5-rc.2",
|
|
82
|
+
"@deepseek-ai/dsh-client-locale": "0.1.5-rc.2",
|
|
83
|
+
"@deepseek-ai/dsh-client-store": "0.1.5-rc.2",
|
|
84
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.1.5-rc.2",
|
|
85
|
+
"@deepseek-ai/dsh-client-ui-session": "0.1.5-rc.2",
|
|
86
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.5-rc.2",
|
|
87
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.5-rc.2",
|
|
88
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.1.5-rc.2",
|
|
89
|
+
"@deepseek-ai/dsh-code-runtime": "0.1.5-rc.2",
|
|
90
|
+
"@deepseek-ai/dsh-command-compact": "0.1.5-rc.2",
|
|
91
|
+
"@deepseek-ai/dsh-commands": "0.1.5-rc.2",
|
|
92
|
+
"@deepseek-ai/dsh-compaction": "0.1.5-rc.2",
|
|
93
|
+
"@deepseek-ai/dsh-compaction-basic": "0.1.5-rc.2",
|
|
94
|
+
"@deepseek-ai/dsh-cordis-host-runner": "0.1.5-rc.2",
|
|
95
|
+
"@deepseek-ai/dsh-credentials": "0.1.5-rc.2",
|
|
96
|
+
"@deepseek-ai/dsh-goal": "0.1.5-rc.2",
|
|
97
|
+
"@deepseek-ai/dsh-home-paths": "0.1.5-rc.2",
|
|
98
|
+
"@deepseek-ai/dsh-host-plugin-inventory": "0.1.5-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-invariants": "0.1.5-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-jobs": "0.1.5-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-launch-environment": "0.1.5-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-llm": "0.1.5-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-llm-deepseek": "0.1.5-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-llm-retry": "0.1.5-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-message-feedback": "0.1.5-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-sandbox": "0.1.5-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-scope": "0.1.5-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-session": "0.1.5-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-session-persistence": "0.1.5-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-session-projection": "0.1.5-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-settings": "0.1.5-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-subagent": "0.1.5-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-subagent-fork-in-process": "0.1.5-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-subagent-in-process-driver": "0.1.5-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-subagent-spawn-in-process": "0.1.5-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.5-rc.2",
|
|
117
|
+
"@deepseek-ai/dsh-token-meter": "0.1.5-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-tools": "0.1.5-rc.2",
|
|
119
|
+
"@deepseek-ai/dsh-user-approval": "0.1.5-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-user-questions": "0.1.5-rc.2",
|
|
121
|
+
"@deepseek-ai/schemastery": "3.18.2",
|
|
102
122
|
"@eslint/js": "^10.0.1",
|
|
103
123
|
"@testing-library/react": "^16.3.2",
|
|
104
124
|
"@tsdown/css": "^0.22.14",
|
|
@@ -9,18 +9,13 @@ dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
|
9
9
|
dsh --profile web --dump-config
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
This one command installs the
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
Lossy rewrites require exact same-revision counts before and after replacement. Verified model ids are `deepseek-v4-flash`, `deepseek-v4-pro`, and `deepseek-v4-flash-vision-exp`. Vision text counting uses the separately pinned `deepseek-ai/DeepSeek-V4-Flash-Vision-Exp` tokenizer. Vision images use the official image-processor arithmetic validated against official golden fixtures and are reported as `tokenizer-estimate`: the four alignment residues over valid intrinsic dimensions are collapsed to their midpoint, with 384 tokens retained as the per-image upper bound; malformed or unevaluable dimensions use a fixed 256-token fallback. The estimate is not exact because the absolute prompt position and the adapter's final image projection are not publicly observable. Image-bearing tool-result candidates remain exact-ineligible and intact; unknown models, unavailable tokenizer assets, unsafe tool groups, and incomplete text measurements still fail open.
|
|
19
|
-
|
|
20
|
-
Audit log records use the prefix `context-compression audit ` and distinguish policy snapshots, skipped/disabled components, committed rewrites, fail-open errors, and observed core `compaction/summary` events. No audit record contains prompt or tool-result content.
|
|
21
|
-
|
|
22
|
-
The first `policy-frozen` record carries the complete settings/deployment snapshot. It is emitted through the Harness logger, so its retention follows the configured log sink; standard prune/replacement Session events remain the durable proof of committed rewrites. This package does not hard-code a private path below `~/.dsh`.
|
|
12
|
+
This one command installs the single `dsh-context-compression-improved` package: the compression
|
|
13
|
+
runtime, the Host settings, the Web UI and the reversible preset overlay all ship in it.
|
|
14
|
+
The Bundle contributes Host settings, the Web UI, and a reversible preset overlay. All presets
|
|
15
|
+
except the exact built-in `minimal` id receive the compression stack; switching non-Minimal
|
|
16
|
+
presets preserves the saved selector settings. Minimal pauses plugin compression without
|
|
17
|
+
deleting the setting.
|
|
23
18
|
|
|
24
19
|
Verified compatibility: DeepSeek Harness `dsh-v0.1.1-rc.2` and `dsh-v0.1.2-alpha.5`, Node `^22.19.0 || >=24`. No Harness core patch is required.
|
|
25
20
|
|
|
26
|
-
See the [full README](https://github.com/WilliamShi666/dsh-context-compression-improved#readme) for profiles, defaults, audit evidence, Adaptive/cache limitations, upgrade/removal, and security guidance.
|
|
21
|
+
See the [full README](https://github.com/WilliamShi666/dsh-context-compression-improved#readme) for profiles, defaults, audit evidence, Adaptive/cache limitations, upgrade/removal, and security guidance. This package is not affiliated with or endorsed by DeepSeek.
|
|
@@ -9,18 +9,11 @@ dsh plugin --profile web add dsh-context-compression-improved@latest
|
|
|
9
9
|
dsh --profile web --dump-config
|
|
10
10
|
```
|
|
11
11
|
|
|
12
|
-
|
|
12
|
+
这一条命令安装单一的 `dsh-context-compression-improved` 包:压缩运行时、Host 设置、Web UI
|
|
13
|
+
与可逆 preset overlay 全部包含在其中。除 id 精确等于内置 `minimal` 的 preset 外,
|
|
14
|
+
其他 preset 都会获得压缩能力;非 Minimal preset 之间切换时已保存设置保持不变。
|
|
15
|
+
Minimal 只暂停插件压缩,不删除设置。
|
|
13
16
|
|
|
14
|
-
|
|
17
|
+
已验证兼容 DeepSeek Harness `dsh-v0.1.1-rc.2` 与 `dsh-v0.1.2-alpha.5`,Node `^22.19.0 || >=24`。不需要修改 Harness 核心。
|
|
15
18
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
有损改写要求 replacement 前后取得同 revision 的 exact count。明确验证过的模型 id 为 `deepseek-v4-flash`、`deepseek-v4-pro` 与 `deepseek-v4-flash-vision-exp`。视觉模型的文本计数使用独立固定的 `deepseek-ai/DeepSeek-V4-Flash-Vision-Exp` tokenizer。图像 token 使用由官方 golden fixtures 逐项验证的官方图像处理算术,并以 `tokenizer-estimate` 上报:有效 intrinsic 尺寸的四种对齐位置取中值,每张图片保留 384 token 上限;尺寸畸形或无法计算时固定计为 256 token。由于绝对 prompt 位置与 adapter 最终图片投影不可公开观测,该数值不标记为 exact。含图片的工具结果候选仍不具备 exact 资格并保持原样;未知模型、tokenizer 资产不可用、不安全工具组或文本计量不完整时继续 fail-open。
|
|
19
|
-
|
|
20
|
-
审计日志以 `context-compression audit ` 开头,区分策略快照、组件关闭/跳过、已提交 rewrite、fail-open 错误和已观察到的核心 `compaction/summary`。审计记录不包含 prompt 或工具结果正文。
|
|
21
|
-
|
|
22
|
-
首次 `policy-frozen` 会携带完整 settings/deployment 快照。它通过 Harness logger 输出,因此保留期限由部署的日志 sink 决定;标准 prune/replacement Session event 仍是已提交 rewrite 的持久证据。本包不会在 `~/.dsh` 下硬编码私有路径。
|
|
23
|
-
|
|
24
|
-
已验证兼容:DeepSeek Harness `dsh-v0.1.1-rc.2` 与 `dsh-v0.1.2-alpha.5`,Node `^22.19.0 || >=24`。不需要修改 Harness 核心。
|
|
25
|
-
|
|
26
|
-
Profile、默认值、审计证据、Adaptive/cache 限制、升级/卸载与安全说明见[完整 README](https://github.com/WilliamShi666/dsh-context-compression-improved#readme)。Tokenizer 来源与校验和在 `assets/deepseek-v4/manifest.json`、`assets/deepseek-v4-vision-exp/manifest.json`,并汇总于 [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md)。本包与 DeepSeek 无隶属或背书关系。
|
|
19
|
+
Profile、默认值、审计证据、Adaptive/cache 限制、升级/卸载与安全说明见[完整 README](https://github.com/WilliamShi666/dsh-context-compression-improved#readme)。本包与 DeepSeek 无隶属或背书关系。
|
|
@@ -24,14 +24,8 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
|
24
24
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
25
25
|
SOFTWARE.
|
|
26
26
|
|
|
27
|
-
This package
|
|
28
|
-
|
|
29
|
-
- `deepseek-ai/DeepSeek-V4-Pro` revision `0e1a0e5e52aea73055f50fef6f2423db370265b6` (serves `deepseek-v4-flash` and `deepseek-v4-pro`), in `assets/deepseek-v4/`.
|
|
30
|
-
- `deepseek-ai/DeepSeek-V4-Flash-Vision-Exp` revision `6821d6ad3681a4b137b066b76094fa82ebd0a380` (serves `deepseek-v4-flash-vision-exp`), in `assets/deepseek-v4-vision-exp/`. This tokenizer is a distinct artifact, not an alias of the V4 Pro tokenizer.
|
|
31
|
-
|
|
32
|
-
The exact provenance and SHA-256 values are in each directory's `manifest.json`; the upstream license text ships beside the assets. The vision image-token arithmetic is a port of the repository's `inference/image_processor.py` at the same pinned revision.
|
|
33
|
-
|
|
34
|
-
This package depends on `@huggingface/tokenizers` 0.1.3 under Apache-2.0. Its NPM package carries the dependency license text.
|
|
27
|
+
This package carries the official DeepSeek tokenizer assets, with their exact license and
|
|
28
|
+
provenance manifests, under `assets/`.
|
|
35
29
|
|
|
36
30
|
This package depends on `js-yaml` under MIT; its production dependency `argparse` is licensed under Python-2.0. Their NPM packages carry the dependency license texts.
|
|
37
31
|
|
|
@@ -6,11 +6,13 @@
|
|
|
6
6
|
name: 'dsh-context-compression-improved'
|
|
7
7
|
config:
|
|
8
8
|
presetOverlay: true
|
|
9
|
-
# The estimator catalog route rides its own row
|
|
10
|
-
#
|
|
11
|
-
# `
|
|
12
|
-
#
|
|
13
|
-
#
|
|
9
|
+
# The estimator catalog route rides its own row so the compression stack
|
|
10
|
+
# stays loadable on profiles that have no host web server. Measured on the
|
|
11
|
+
# host source: `dsh-host-webserver.register` performs no authorization check
|
|
12
|
+
# and `ctx.get(name)` only asks whether the providing fiber is active, so
|
|
13
|
+
# this `inject` is belt-and-braces — the row is simply absent instead of
|
|
14
|
+
# announcing a pending route on a webServer-less profile. The two-channel
|
|
15
|
+
# registration inside the plugin covers both arrival orders on its own.
|
|
14
16
|
- id: context-compression-improved-estimator-catalog
|
|
15
17
|
name: 'dsh-context-compression-improved'
|
|
16
18
|
inject:
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"id": "dsh-external/dsh-context-compression-improved",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "./lib/index.js",
|
|
5
5
|
"description": "Auditable tool-result context-compression selector with code-skeleton gate for DeepSeek Harness",
|
|
6
6
|
"engines": {
|
|
7
|
-
"dsh": ">=0.1.
|
|
7
|
+
"dsh": ">=0.1.5-alpha.1 <0.2.0-0"
|
|
8
8
|
},
|
|
9
9
|
"contributes": {
|
|
10
10
|
"tools": [],
|
|
@@ -1,5 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import
|
|
1
|
+
import { Context } from "@deepseek-ai/cordis";
|
|
2
|
+
import "@deepseek-ai/dsh-settings/types";
|
|
3
|
+
import { SettingsScope } from "@deepseek-ai/dsh-client-ui-settings/client";
|
|
4
|
+
import { InjectFace, PropsLocale } from "@deepseek-ai/dsh-client-ui-slots";
|
|
3
5
|
//#region src/profiles.d.ts
|
|
4
6
|
/** Public context-compression choices shared by the Host schema and browser selector. */
|
|
5
7
|
declare const COMPRESSION_PROFILES: readonly ["off", "native", "balanced", "cache-strict", "savings", "adaptive", "tokenpilot-inspired", "custom"];
|
|
@@ -123,7 +125,6 @@ declare const zh: {
|
|
|
123
125
|
'estimator.description': string;
|
|
124
126
|
'estimator.mode': string;
|
|
125
127
|
'estimator.mode.off': string;
|
|
126
|
-
'estimator.followHost': string;
|
|
127
128
|
'estimator.mode.host': string;
|
|
128
129
|
'estimator.mode.direct': string;
|
|
129
130
|
'estimator.inactive': string;
|
|
@@ -215,7 +216,15 @@ interface CompressionSelectorInjected {
|
|
|
215
216
|
/** Patch of `presetOptions` members; an explicit `undefined` clears that field. */
|
|
216
217
|
savePresetOptions: (options: PresetOptionsPatch) => Promise<void>;
|
|
217
218
|
}
|
|
218
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Owner-agnostic panel props: the same component registers under the 0.1.5
|
|
221
|
+
* `settings.plugins.tab` card (no owner props) and the legacy
|
|
222
|
+
* `settings.section` page (whose shell supplies `close`), so the section
|
|
223
|
+
* owner share stays optional.
|
|
224
|
+
*/
|
|
225
|
+
type CompressionProfileSelectorProps = {
|
|
226
|
+
close?: () => void;
|
|
227
|
+
} & PropsLocale<'context-compression'> & InjectFace<CompressionSelectorInjected>;
|
|
219
228
|
declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
220
229
|
interface LocaleNamespaceMap {
|
|
221
230
|
'context-compression': ContextCompressionLocaleKey;
|
|
@@ -223,7 +232,24 @@ declare module '@deepseek-ai/dsh-client-ui-slots' {
|
|
|
223
232
|
}
|
|
224
233
|
//#endregion
|
|
225
234
|
//#region src/client/index.d.ts
|
|
235
|
+
/**
|
|
236
|
+
* Harness 0.1.5 mounts the web core's `slots` service on the client context
|
|
237
|
+
* but no longer ships a public type for it; declare the face this plugin
|
|
238
|
+
* consumes (same shape dsh-thinking-levels and dsh-prime-memory rely on).
|
|
239
|
+
* `inject` factories may be sync (return a disposer) or generator (yield the
|
|
240
|
+
* registration); slot options are validated at runtime per slot kind, which
|
|
241
|
+
* lets one entry supply both `id` (Desktop, list) and `key` (CLI, keyed).
|
|
242
|
+
*/
|
|
243
|
+
interface SlotsService {
|
|
244
|
+
inject(slot: string, register: () => (() => void) | Generator<() => void>): () => void;
|
|
245
|
+
register(options: Record<string, unknown>, component: unknown): () => void;
|
|
246
|
+
}
|
|
247
|
+
declare module '@deepseek-ai/cordis' {
|
|
248
|
+
interface Context {
|
|
249
|
+
slots: SlotsService;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
226
252
|
declare const inject: string[];
|
|
227
|
-
declare function apply(ctx:
|
|
253
|
+
declare function apply(ctx: Context): void;
|
|
228
254
|
//#endregion
|
|
229
255
|
export { type CompressionProfile, type CompressionProfileSelectorProps, type CompressionSelectorInjected, type ContextCompressionSettings, apply, inject };
|