dsh-context-compression-improved 0.7.0-beta.1 → 0.7.0-beta.2

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 (55) hide show
  1. package/.github/workflows/ci.yml +39 -39
  2. package/CHANGELOG.ja.md +217 -220
  3. package/CHANGELOG.ko.md +211 -214
  4. package/CHANGELOG.md +392 -376
  5. package/CHANGELOG.zh.md +196 -199
  6. package/README.md +97 -97
  7. package/README.zh.md +86 -86
  8. package/package.json +18 -17
  9. package/packages/selector/dsh.plugin.json +1 -1
  10. package/packages/selector/lib/client.js +733 -0
  11. package/packages/selector/lib/style.css +46 -46
  12. package/packages/selector/src/client/decode.ts +53 -53
  13. package/packages/selector/src/client/index.ts +30 -0
  14. package/packages/selector/src/client/locales/de.ts +98 -0
  15. package/packages/selector/src/client/locales/es.ts +98 -0
  16. package/packages/selector/src/client/locales/fr.ts +98 -0
  17. package/packages/selector/src/client/locales/it.ts +98 -0
  18. package/packages/selector/src/client/locales/ja.ts +98 -0
  19. package/packages/selector/src/client/locales/ko.ts +98 -0
  20. package/packages/selector/src/client/locales/ru.ts +98 -0
  21. package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -205
  22. package/packages/selector/src/preset-overlay.ts +629 -629
  23. package/packages/selector/src/profiles.ts +414 -414
  24. package/packages/selector/src/pruner/content.ts +198 -198
  25. package/packages/selector/src/pruner/state.ts +57 -57
  26. package/packages/selector/src/pruner.ts +2665 -2665
  27. package/packages/selector/src/runtime/audit.ts +303 -303
  28. package/packages/selector/src/runtime/config.ts +731 -731
  29. package/packages/selector/src/runtime/reducers.ts +1674 -1674
  30. package/packages/selector/src/runtime/summary-command.ts +133 -133
  31. package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +233 -233
  32. package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +204 -204
  33. package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +53 -53
  34. package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +65 -65
  35. package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +125 -125
  36. package/packages/selector/src/runtime/tokenpilot/intent-range.ts +37 -37
  37. package/packages/selector/src/runtime/tokenpilot/locator.ts +128 -128
  38. package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +306 -306
  39. package/packages/selector/src/runtime/types.ts +358 -358
  40. package/packages/selector/tests/built/client-artifact.spec.ts +61 -61
  41. package/packages/selector/tests/helpers/legacy-settings/index.ts +15 -15
  42. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.d.ts +41 -41
  43. package/packages/selector/tests/helpers/legacy-settings/legacy/provider.js +647 -647
  44. package/packages/selector/tests/helpers/legacy-settings/legacy/redact.js +78 -78
  45. package/packages/selector/tests/helpers/legacy-settings/legacy/util-values.js +234 -234
  46. package/packages/selector/tests/host-preset-overlay.host.spec.ts +203 -203
  47. package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -523
  48. package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -122
  49. package/packages/selector/tests/runtime/intent-gate.spec.ts +62 -62
  50. package/packages/selector/tests/runtime/intent-summary.spec.ts +156 -156
  51. package/packages/selector/tests/runtime/summary-command.spec.ts +154 -154
  52. package/scripts/packed-components-smoke.mjs +734 -734
  53. package/tests/TEST_INVENTORY.md +41 -41
  54. package/tsconfig.tests.json +17 -17
  55. package/vitest.config.ts +57 -57
@@ -1,41 +1,41 @@
1
- # Test inventory
2
-
3
- Every checked-in spec belongs to an active test project. There is no silent
4
- legacy-test allowlist.
5
-
6
- ## Root suite
7
-
8
- - Runtime: `packages/runtime/tests/**/*.spec.ts` under the `runtime` project.
9
- - Selector Host: `cache-prefix-audit.spec.ts` plus every `*.host.spec.ts` under
10
- the `selector-host` project.
11
- - Selector client: every `*.client.spec.ts` or `*.client.spec.tsx` under the
12
- `selector-client` project.
13
- - Built browser artifact: `packages/selector/tests/built/client-artifact.spec.ts`
14
- under the separate `vitest.built.config.ts` gate, after `pnpm build`.
15
-
16
- The root `pnpm test`, both package-local `pnpm test` commands, and
17
- `pnpm test:built` are release gates. `scripts/verify-release.mjs` compares the
18
- checked-in spec inventory with these project rules so a new test cannot be
19
- silently excluded.
20
-
21
- ## Removed transition tests
22
-
23
- The standalone extraction initially carried twelve specs copied from the
24
- integrated Harness worktree. They depended on removed private packages,
25
- monorepo-relative fixtures, or the retired `compaction/group-trim` event and
26
- were not executable in a public checkout. They were removed instead of
27
- reintroducing Harness core dependencies.
28
-
29
- Their supported behavior is covered by active public tests:
30
-
31
- - policy resolution, reducers, exact measurement, Fresh, Aggregate, routine
32
- and capacity-pressure History, Native pruning, TailTrim publication,
33
- recovery, replay and orphan fail-open behavior:
34
- `packages/selector/tests/runtime/public/public-runtime.spec.ts`;
35
- - Loader composition, preset overlay, Minimal pause/restore and parent/child
36
- service identity: `packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts`;
37
- - package/export/tarball contract:
38
- `packages/selector/tests/public/package-contract.client.spec.ts` and
39
- `scripts/packed-install-e2e.mjs`;
40
- - profile and Custom editor behavior:
41
- `packages/selector/tests/profiles.client.spec.tsx`.
1
+ # Test inventory
2
+
3
+ Every checked-in spec belongs to an active test project. There is no silent
4
+ legacy-test allowlist.
5
+
6
+ ## Root suite
7
+
8
+ - Runtime: `packages/selector/tests/runtime/**/*.spec.ts` under the `runtime` project.
9
+ - Selector Host: `cache-prefix-audit.spec.ts` plus every `*.host.spec.ts` under
10
+ the `selector-host` project.
11
+ - Selector client: every `*.client.spec.ts` or `*.client.spec.tsx` under the
12
+ `selector-client` project.
13
+ - Built browser artifact: `packages/selector/tests/built/client-artifact.spec.ts`
14
+ under the separate `vitest.built.config.ts` gate, after `pnpm build`.
15
+
16
+ The root `pnpm test`, both package-local `pnpm test` commands, and
17
+ `pnpm test:built` are release gates. `scripts/verify-release.mjs` compares the
18
+ checked-in spec inventory with these project rules so a new test cannot be
19
+ silently excluded.
20
+
21
+ ## Removed transition tests
22
+
23
+ The standalone extraction initially carried twelve specs copied from the
24
+ integrated Harness worktree. They depended on removed private packages,
25
+ monorepo-relative fixtures, or the retired `compaction/group-trim` event and
26
+ were not executable in a public checkout. They were removed instead of
27
+ reintroducing Harness core dependencies.
28
+
29
+ Their supported behavior is covered by active public tests:
30
+
31
+ - policy resolution, reducers, exact measurement, Fresh, Aggregate, routine
32
+ and capacity-pressure History, Native pruning, TailTrim publication,
33
+ recovery, replay and orphan fail-open behavior:
34
+ `packages/selector/tests/runtime/public/public-runtime.spec.ts`;
35
+ - Loader composition, preset overlay, Minimal pause/restore and parent/child
36
+ service identity: `packages/selector/tests/preset-overlay-loader.e2e.host.spec.ts`;
37
+ - package/export/tarball contract:
38
+ `packages/selector/tests/public/package-contract.client.spec.ts` and
39
+ `scripts/packed-install-e2e.mjs`;
40
+ - profile and Custom editor behavior:
41
+ `packages/selector/tests/profiles.client.spec.tsx`.
@@ -1,17 +1,17 @@
1
- {
2
- "extends": "./tsconfig.base.json",
3
- "compilerOptions": {
4
- "noEmit": true,
5
- "composite": false
6
- },
7
- "include": [
8
- "packages/selector/src/**/*.ts",
9
- "packages/selector/src/**/*.tsx",
10
- "packages/selector/tests/**/*.ts",
11
- "packages/selector/tests/**/*.tsx",
12
- "vitest.config.ts",
13
- "vitest.built.config.ts",
14
- "packages/selector/tsdown.config.ts",
15
- "packages/selector/tsdown.client.config.ts"
16
- ]
17
- }
1
+ {
2
+ "extends": "./tsconfig.base.json",
3
+ "compilerOptions": {
4
+ "noEmit": true,
5
+ "composite": false
6
+ },
7
+ "include": [
8
+ "packages/selector/src/**/*.ts",
9
+ "packages/selector/src/**/*.tsx",
10
+ "packages/selector/tests/**/*.ts",
11
+ "packages/selector/tests/**/*.tsx",
12
+ "vitest.config.ts",
13
+ "vitest.built.config.ts",
14
+ "packages/selector/tsdown.config.ts",
15
+ "packages/selector/tsdown.client.config.ts"
16
+ ]
17
+ }
package/vitest.config.ts CHANGED
@@ -1,57 +1,57 @@
1
- import { defineConfig } from 'vitest/config'
2
- import { fileURLToPath } from 'node:url'
3
-
4
- export default defineConfig({
5
- test: {
6
- passWithNoTests: false,
7
- coverage: {
8
- provider: 'v8',
9
- include: ['packages/selector/src/**'],
10
- exclude: ['**/*.d.ts'],
11
- reporter: ['text', 'json-summary'],
12
- // Ratcheted just under the measured 0.1.7 baseline
13
- // (lines 82.16 / functions 83.95 / branches 69.93 / statements 78.40).
14
- thresholds: {
15
- lines: 82,
16
- functions: 83,
17
- branches: 69,
18
- statements: 78,
19
- },
20
- },
21
- projects: [
22
- {
23
- test: {
24
- name: 'runtime',
25
- environment: 'node',
26
- include: ['packages/selector/tests/runtime/**/*.spec.ts'],
27
- },
28
- },
29
- {
30
- test: {
31
- name: 'selector-host',
32
- environment: 'node',
33
- include: [
34
- 'packages/selector/tests/cache-prefix-audit.spec.ts',
35
- 'packages/selector/tests/estimator-catalog.spec.ts',
36
- 'packages/selector/tests/**/*.host.spec.ts',
37
- ],
38
- },
39
- },
40
- {
41
- resolve: {
42
- alias: {
43
- '@deepseek-ai/dsh-client-ui-primitives': fileURLToPath(new URL(
44
- './packages/selector/tests/support/ui-primitives.tsx',
45
- import.meta.url,
46
- )),
47
- },
48
- },
49
- test: {
50
- name: 'selector-client',
51
- environment: 'jsdom',
52
- include: ['packages/selector/tests/**/*.client.spec.{ts,tsx}'],
53
- },
54
- },
55
- ],
56
- },
57
- })
1
+ import { defineConfig } from 'vitest/config'
2
+ import { fileURLToPath } from 'node:url'
3
+
4
+ export default defineConfig({
5
+ test: {
6
+ passWithNoTests: false,
7
+ coverage: {
8
+ provider: 'v8',
9
+ include: ['packages/selector/src/**'],
10
+ exclude: ['**/*.d.ts'],
11
+ reporter: ['text', 'json-summary'],
12
+ // Ratcheted just under the measured 0.1.7 baseline
13
+ // (lines 82.16 / functions 83.95 / branches 69.93 / statements 78.40).
14
+ thresholds: {
15
+ lines: 82,
16
+ functions: 83,
17
+ branches: 69,
18
+ statements: 78,
19
+ },
20
+ },
21
+ projects: [
22
+ {
23
+ test: {
24
+ name: 'runtime',
25
+ environment: 'node',
26
+ include: ['packages/selector/tests/runtime/**/*.spec.ts'],
27
+ },
28
+ },
29
+ {
30
+ test: {
31
+ name: 'selector-host',
32
+ environment: 'node',
33
+ include: [
34
+ 'packages/selector/tests/cache-prefix-audit.spec.ts',
35
+ 'packages/selector/tests/estimator-catalog.spec.ts',
36
+ 'packages/selector/tests/**/*.host.spec.ts',
37
+ ],
38
+ },
39
+ },
40
+ {
41
+ resolve: {
42
+ alias: {
43
+ '@deepseek-ai/dsh-client-ui-primitives': fileURLToPath(new URL(
44
+ './packages/selector/tests/support/ui-primitives.tsx',
45
+ import.meta.url,
46
+ )),
47
+ },
48
+ },
49
+ test: {
50
+ name: 'selector-client',
51
+ environment: 'jsdom',
52
+ include: ['packages/selector/tests/**/*.client.spec.{ts,tsx}'],
53
+ },
54
+ },
55
+ ],
56
+ },
57
+ })