dsh-context-compression-improved 0.7.0-beta.1 → 0.7.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/.github/workflows/ci.yml +39 -39
- package/CHANGELOG.ja.md +217 -220
- package/CHANGELOG.ko.md +211 -214
- package/CHANGELOG.md +401 -376
- package/CHANGELOG.zh.md +196 -199
- package/README.md +97 -97
- package/README.zh.md +86 -86
- package/package.json +1 -1
- package/packages/selector/dsh.plugin.json +1 -1
- package/packages/selector/lib/client.d.ts +44 -0
- package/packages/selector/lib/client.js +1733 -6
- package/packages/selector/lib/{intent-gate.js → config.js} +799 -136
- package/packages/selector/lib/index.d.ts +13 -1
- package/packages/selector/lib/index.js +204 -3
- package/packages/selector/lib/profiles.d.ts +6 -0
- package/packages/selector/lib/pruner.d.ts +6 -0
- package/packages/selector/lib/pruner.js +90 -258
- package/packages/selector/lib/style.css +88 -46
- package/packages/selector/src/client/CompressionProfileControls.tsx +293 -226
- package/packages/selector/src/client/CompressionProfileSelector.module.css +199 -170
- package/packages/selector/src/client/CompressionProfileSelector.tsx +85 -83
- package/packages/selector/src/client/decode.ts +57 -53
- package/packages/selector/src/client/index.ts +307 -213
- package/packages/selector/src/client/locales/de.ts +141 -0
- package/packages/selector/src/client/locales/es.ts +141 -0
- package/packages/selector/src/client/locales/fr.ts +141 -0
- package/packages/selector/src/client/locales/it.ts +141 -0
- package/packages/selector/src/client/locales/ja.ts +141 -0
- package/packages/selector/src/client/locales/ko.ts +141 -0
- package/packages/selector/src/client/locales/ru.ts +141 -0
- package/packages/selector/src/client/locales.ts +282 -196
- package/packages/selector/src/client/monitor-fab.ts +336 -0
- package/packages/selector/src/client/savings-card.tsx +150 -0
- package/packages/selector/src/client/settings-section.tsx +140 -124
- package/packages/selector/src/deepseek-v4-tokenizer.ts +205 -205
- package/packages/selector/src/index.ts +207 -5
- package/packages/selector/src/preset-overlay.ts +629 -629
- package/packages/selector/src/profiles.ts +431 -414
- package/packages/selector/src/pruner/content.ts +198 -198
- package/packages/selector/src/pruner/state.ts +57 -57
- package/packages/selector/src/pruner.ts +2759 -2665
- package/packages/selector/src/runtime/audit.ts +303 -303
- package/packages/selector/src/runtime/config.ts +756 -731
- package/packages/selector/src/runtime/monitor.ts +235 -0
- package/packages/selector/src/runtime/reducers.ts +1674 -1674
- package/packages/selector/src/runtime/retrieve.ts +479 -457
- package/packages/selector/src/runtime/savings.ts +337 -0
- package/packages/selector/src/runtime/summary-command.ts +133 -133
- package/packages/selector/src/runtime/tokenpilot/advisor-prompt.ts +233 -233
- package/packages/selector/src/runtime/tokenpilot/advisor-state.ts +204 -204
- package/packages/selector/src/runtime/tokenpilot/intent-fold.ts +53 -53
- package/packages/selector/src/runtime/tokenpilot/intent-gate.ts +65 -65
- package/packages/selector/src/runtime/tokenpilot/intent-input-mask.ts +125 -125
- package/packages/selector/src/runtime/tokenpilot/intent-range.ts +37 -37
- package/packages/selector/src/runtime/tokenpilot/locator.ts +128 -128
- package/packages/selector/src/runtime/tokenpilot/sidechannel.ts +306 -306
- package/packages/selector/src/runtime/types.ts +365 -358
- package/packages/selector/tests/built/client-artifact.spec.ts +61 -61
- package/packages/selector/tests/code-skeleton.client.spec.ts +2 -2
- package/packages/selector/tests/custom-contract.client.spec.ts +2 -2
- package/packages/selector/tests/estimator-channel.client.spec.tsx +2 -0
- package/packages/selector/tests/estimator-route-registration.host.spec.ts +194 -188
- 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 +203 -203
- package/packages/selector/tests/monitor-fab.client.spec.ts +138 -0
- package/packages/selector/tests/runtime/auto-compact-config.spec.ts +523 -523
- package/packages/selector/tests/runtime/deepseek-v4-tokenizer.spec.ts +122 -122
- package/packages/selector/tests/runtime/intent-gate.spec.ts +62 -62
- package/packages/selector/tests/runtime/intent-summary.spec.ts +156 -156
- package/packages/selector/tests/runtime/monitor.spec.ts +301 -0
- package/packages/selector/tests/runtime/savings.spec.ts +120 -0
- package/packages/selector/tests/runtime/summary-command.spec.ts +154 -154
- package/packages/selector/tests/settings-seat.client.spec.ts +177 -165
- package/scripts/packed-components-smoke.mjs +734 -734
- package/scripts/packed-install-e2e.mjs +1 -1
- package/scripts/verify-release.mjs +1 -1
- package/tests/TEST_INVENTORY.md +41 -41
- package/tsconfig.tests.json +17 -17
- package/vitest.config.ts +57 -57
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Narrow type surface for the vendored 0.1.5 `SettingsProvider` (legacy test-host seam).
|
|
3
|
-
*
|
|
4
|
-
* The 0.1.7 `@deepseek-ai/dsh-settings` host replaced the namespace-registry
|
|
5
|
-
* provider with the declarative `SettingsForms` projector, but the plugin
|
|
6
|
-
* deliberately keeps the legacy `ctx.settings.get(ns)` read as a fallback
|
|
7
|
-
* "so a host that still serves the old service shape keeps working (test
|
|
8
|
-
* hosts do exactly that)" (src/index.ts). The host specs drive that fallback
|
|
9
|
-
* through this vendored base class — the verbatim 0.1.5-rc.2 implementation,
|
|
10
|
-
* not a behavioral re-implementation.
|
|
11
|
-
*
|
|
12
|
-
* Only the members the specs and the production fallback actually touch are
|
|
13
|
-
* declared; the full 0.1.5 surface exists at runtime in provider.js.
|
|
14
|
-
*/
|
|
15
|
-
import { Service } from '@deepseek-ai/cordis'
|
|
16
|
-
|
|
17
|
-
export declare abstract class SettingsProvider extends Service {
|
|
18
|
-
/** Register as the `settings` service of `ctx` (implementation: `super(ctx, 'settings')`). */
|
|
19
|
-
constructor(ctx: Context)
|
|
20
|
-
/** Whether {@linkcode LegacySettingsProvider.update} may persist through this provider. */
|
|
21
|
-
abstract readonly writable: boolean
|
|
22
|
-
/** Load the provider's raw document (namespace → raw section) once at init. */
|
|
23
|
-
protected abstract load(): Promise<Record<string, unknown>>
|
|
24
|
-
/** Durably store one namespace's merged user section. */
|
|
25
|
-
protected abstract persist(ns: string, section: Record<string, unknown>): Promise<void>
|
|
26
|
-
/** Register a namespace schema; duplicate registration fails loud. */
|
|
27
|
-
register(ns: string, schema: unknown, options?: unknown): unknown
|
|
28
|
-
/** Read one registered namespace's resolved value (undefined while unregistered). */
|
|
29
|
-
get(ns: string): unknown
|
|
30
|
-
/** Merge a patch into one registered namespace's user layer, validate, persist. */
|
|
31
|
-
update(ns: string, patch: object, expectedRevision?: number): Promise<void>
|
|
32
|
-
/** Replace one registered namespace's user section wholesale, validate, persist. */
|
|
33
|
-
replace(ns: string, section: object, expectedRevision?: number): Promise<void>
|
|
34
|
-
/** Apply path-addressed edits to one registered namespace's user section. */
|
|
35
|
-
mutate(ns: string, ops: readonly unknown[], expectedRevision?: number): Promise<void>
|
|
36
|
-
/** Describe every registered namespace for configuration surfaces. */
|
|
37
|
-
describe(options?: { redactSecrets?: boolean }): unknown[]
|
|
38
|
-
/** Non-file providers expose no open-document affordance. */
|
|
39
|
-
get documentPath(): string | undefined
|
|
40
|
-
prepareDocument(): Promise<string | undefined>
|
|
41
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* Narrow type surface for the vendored 0.1.5 `SettingsProvider` (legacy test-host seam).
|
|
3
|
+
*
|
|
4
|
+
* The 0.1.7 `@deepseek-ai/dsh-settings` host replaced the namespace-registry
|
|
5
|
+
* provider with the declarative `SettingsForms` projector, but the plugin
|
|
6
|
+
* deliberately keeps the legacy `ctx.settings.get(ns)` read as a fallback
|
|
7
|
+
* "so a host that still serves the old service shape keeps working (test
|
|
8
|
+
* hosts do exactly that)" (src/index.ts). The host specs drive that fallback
|
|
9
|
+
* through this vendored base class — the verbatim 0.1.5-rc.2 implementation,
|
|
10
|
+
* not a behavioral re-implementation.
|
|
11
|
+
*
|
|
12
|
+
* Only the members the specs and the production fallback actually touch are
|
|
13
|
+
* declared; the full 0.1.5 surface exists at runtime in provider.js.
|
|
14
|
+
*/
|
|
15
|
+
import { Service } from '@deepseek-ai/cordis'
|
|
16
|
+
|
|
17
|
+
export declare abstract class SettingsProvider extends Service {
|
|
18
|
+
/** Register as the `settings` service of `ctx` (implementation: `super(ctx, 'settings')`). */
|
|
19
|
+
constructor(ctx: Context)
|
|
20
|
+
/** Whether {@linkcode LegacySettingsProvider.update} may persist through this provider. */
|
|
21
|
+
abstract readonly writable: boolean
|
|
22
|
+
/** Load the provider's raw document (namespace → raw section) once at init. */
|
|
23
|
+
protected abstract load(): Promise<Record<string, unknown>>
|
|
24
|
+
/** Durably store one namespace's merged user section. */
|
|
25
|
+
protected abstract persist(ns: string, section: Record<string, unknown>): Promise<void>
|
|
26
|
+
/** Register a namespace schema; duplicate registration fails loud. */
|
|
27
|
+
register(ns: string, schema: unknown, options?: unknown): unknown
|
|
28
|
+
/** Read one registered namespace's resolved value (undefined while unregistered). */
|
|
29
|
+
get(ns: string): unknown
|
|
30
|
+
/** Merge a patch into one registered namespace's user layer, validate, persist. */
|
|
31
|
+
update(ns: string, patch: object, expectedRevision?: number): Promise<void>
|
|
32
|
+
/** Replace one registered namespace's user section wholesale, validate, persist. */
|
|
33
|
+
replace(ns: string, section: object, expectedRevision?: number): Promise<void>
|
|
34
|
+
/** Apply path-addressed edits to one registered namespace's user section. */
|
|
35
|
+
mutate(ns: string, ops: readonly unknown[], expectedRevision?: number): Promise<void>
|
|
36
|
+
/** Describe every registered namespace for configuration surfaces. */
|
|
37
|
+
describe(options?: { redactSecrets?: boolean }): unknown[]
|
|
38
|
+
/** Non-file providers expose no open-document affordance. */
|
|
39
|
+
get documentPath(): string | undefined
|
|
40
|
+
prepareDocument(): Promise<string | undefined>
|
|
41
|
+
}
|