@snylonue/dsh-context-policy 0.3.1 → 0.3.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.
- package/README.md +3 -1
- package/package.json +17 -17
- package/tests/current-host.test.ts +19 -6
package/README.md
CHANGED
|
@@ -5,7 +5,9 @@ Percentage-based automatic compaction and model-configurable token accounting fo
|
|
|
5
5
|
## Requirements
|
|
6
6
|
|
|
7
7
|
- Node.js 24 or later.
|
|
8
|
-
- DSH 0.2.1-rc.2
|
|
8
|
+
- DSH 0.2.1-rc.2 or 0.2.1-rc.3; older hosts and untested later releases are not declared compatible.
|
|
9
|
+
|
|
10
|
+
Both host versions pass the build, TypeScript checks, and the full 39-test suite, including plugin composition, token accounting, projection replay/checkpoints, and percentage compaction. Development dependencies are pinned to 0.2.1-rc.3.
|
|
9
11
|
|
|
10
12
|
## Installation
|
|
11
13
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@snylonue/dsh-context-policy",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.2",
|
|
4
4
|
"description": "Percentage-only compaction and model-configurable GPT and DeepSeek token counting for DSH",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"engines": {
|
|
16
16
|
"node": ">=24",
|
|
17
|
-
"dsh": "0.2.1-rc.2"
|
|
17
|
+
"dsh": "0.2.1-rc.2 || 0.2.1-rc.3"
|
|
18
18
|
},
|
|
19
19
|
"exports": {
|
|
20
20
|
".": {
|
|
@@ -68,13 +68,13 @@
|
|
|
68
68
|
},
|
|
69
69
|
"peerDependencies": {
|
|
70
70
|
"@deepseek-ai/cordis": "~4.0.5",
|
|
71
|
-
"@deepseek-ai/dsh-compaction": "0.2.1-rc.2",
|
|
72
|
-
"@deepseek-ai/dsh-compaction-basic": "0.2.1-rc.2",
|
|
73
|
-
"@deepseek-ai/dsh-llm": "0.2.1-rc.2",
|
|
74
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.2",
|
|
75
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.2",
|
|
76
|
-
"@deepseek-ai/dsh-token-meter": "0.2.1-rc.2",
|
|
77
|
-
"@deepseek-ai/dsh-util-values": "0.2.1-rc.2",
|
|
71
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
72
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
73
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
74
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
75
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
76
|
+
"@deepseek-ai/dsh-token-meter": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
77
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-rc.2 || 0.2.1-rc.3",
|
|
78
78
|
"@deepseek-ai/schemastery": "~3.18.5",
|
|
79
79
|
"zod": "^4.4.3"
|
|
80
80
|
},
|
|
@@ -87,14 +87,14 @@
|
|
|
87
87
|
"devDependencies": {
|
|
88
88
|
"@biomejs/biome": "2",
|
|
89
89
|
"@deepseek-ai/cordis": "4.0.5",
|
|
90
|
-
"@deepseek-ai/dsh-app-boot": "0.2.1-rc.
|
|
91
|
-
"@deepseek-ai/dsh-compaction": "0.2.1-rc.
|
|
92
|
-
"@deepseek-ai/dsh-compaction-basic": "0.2.1-rc.
|
|
93
|
-
"@deepseek-ai/dsh-llm": "0.2.1-rc.
|
|
94
|
-
"@deepseek-ai/dsh-session": "0.2.1-rc.
|
|
95
|
-
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.
|
|
96
|
-
"@deepseek-ai/dsh-token-meter": "0.2.1-rc.
|
|
97
|
-
"@deepseek-ai/dsh-util-values": "0.2.1-rc.
|
|
90
|
+
"@deepseek-ai/dsh-app-boot": "0.2.1-rc.3",
|
|
91
|
+
"@deepseek-ai/dsh-compaction": "0.2.1-rc.3",
|
|
92
|
+
"@deepseek-ai/dsh-compaction-basic": "0.2.1-rc.3",
|
|
93
|
+
"@deepseek-ai/dsh-llm": "0.2.1-rc.3",
|
|
94
|
+
"@deepseek-ai/dsh-session": "0.2.1-rc.3",
|
|
95
|
+
"@deepseek-ai/dsh-session-projection": "0.2.1-rc.3",
|
|
96
|
+
"@deepseek-ai/dsh-token-meter": "0.2.1-rc.3",
|
|
97
|
+
"@deepseek-ai/dsh-util-values": "0.2.1-rc.3",
|
|
98
98
|
"@deepseek-ai/schemastery": "3.18.5",
|
|
99
99
|
"@types/node": "24.19.0",
|
|
100
100
|
"typescript": "5.9.3",
|
|
@@ -2,14 +2,27 @@ import assert from "node:assert/strict";
|
|
|
2
2
|
import { readFileSync } from "node:fs";
|
|
3
3
|
import { test } from "node:test";
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
const supportedHosts = "0.2.1-rc.2 || 0.2.1-rc.3";
|
|
6
|
+
const testedHost = "0.2.1-rc.3";
|
|
7
|
+
|
|
8
|
+
test("declares only the verified DSH rc.2 and rc.3 hosts", () => {
|
|
6
9
|
const manifest = JSON.parse(
|
|
7
10
|
readFileSync(new URL("../package.json", import.meta.url), "utf8"),
|
|
8
11
|
);
|
|
9
|
-
assert.equal(manifest.engines.dsh,
|
|
12
|
+
assert.equal(manifest.engines.dsh, supportedHosts);
|
|
10
13
|
assert.equal(manifest.peerDependencies["@deepseek-ai/cordis"], "~4.0.5");
|
|
11
|
-
for (const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
14
|
+
for (const [name, version] of Object.entries(manifest.peerDependencies))
|
|
15
|
+
if (name.startsWith("@deepseek-ai/dsh-"))
|
|
16
|
+
assert.equal(version, supportedHosts, name);
|
|
17
|
+
for (const [name, version] of Object.entries(manifest.devDependencies)) {
|
|
18
|
+
if (!name.startsWith("@deepseek-ai/dsh-")) continue;
|
|
19
|
+
assert.equal(version, testedHost, name);
|
|
20
|
+
const installed = JSON.parse(
|
|
21
|
+
readFileSync(
|
|
22
|
+
new URL(`../node_modules/${name}/package.json`, import.meta.url),
|
|
23
|
+
"utf8",
|
|
24
|
+
),
|
|
25
|
+
);
|
|
26
|
+
assert.equal(installed.version, testedHost, `${name} installed version`);
|
|
27
|
+
}
|
|
15
28
|
});
|