dsh-limit-break 1.2.1 → 1.4.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/CHANGELOG.md CHANGED
@@ -5,6 +5,39 @@ All notable changes to `dsh-limit-break`. Format follows
5
5
 
6
6
  ## Unreleased
7
7
 
8
+ ## 1.4.0 — 2026-10-22
9
+
10
+ ### Removed
11
+ - **`memory_prune` is gone.** Added in 1.3.0 and removed 18 hours later, because adding a tool
12
+ to a running plugin **bricks existing sessions**: DSH projects the new tool as a
13
+ `tool_addition` block when an old session resumes, and the API rejects the whole turn
14
+ (`messages.196: tool_addition blocks can only be in system messages`). Two sessions died
15
+ that way. The pruner logic was sound; the delivery was not. A plugin's tool set is part of
16
+ the session ABI, not an implementation detail.
17
+ - `tools/prune-selftest.mjs` removed with the tool; `writeJsonAtomic` was only used by the
18
+ pruner and went with it.
19
+
20
+ ### Rules adopted
21
+ - The four tools are **frozen for the 1.x line**. No new tool, no removal: both change the
22
+ tool set that old sessions were created under.
23
+ - Nothing is lost by removing the pruner: the store schema is unchanged, `facts.archive.json`
24
+ stays valid, and 1.2.x / 1.3.0 stores load as-is.
25
+ ## 1.3.0 — 2026-10-22
26
+
27
+ ### Added
28
+ - **`memory_prune`: the manual cleanup, made repeatable.** The 2026-10-21 session pruned a
29
+ 27-fact store to 17 by hand — merging benchmark facts into a suite, deleting session state,
30
+ dropping derivative copies. That judgment is now a tool with deterministic rules:
31
+ `session-state` (a fact that reads as conversational state) and `exact-duplicate` (same
32
+ statement; the richer fact survives). It reports a plan first, applies only with
33
+ `apply: true`, copies the store to `facts.json.bak-<timestamp>`, and moves removed facts to
34
+ `facts.archive.json`. Nothing is ever deleted. Softer suspicions — two facts citing the same
35
+ measurements, two facts claiming opposite things on one topic — are returned as read-only
36
+ warnings, since they need a human call.
37
+ - `tools/prune-selftest.mjs` covers the dry run (must not touch the store), the apply path
38
+ (archive + backup), the richer-duplicate rule, and idempotence (a second run must not grow
39
+ the archive).
40
+
8
41
  ## 1.2.1 — 2026-10-21
9
42
 
10
43
  ### Fixed
package/MAINTAIN.md CHANGED
@@ -14,7 +14,7 @@ cd D:/deepseek-harness/default-workspace/capability-demo/plugin/dsh-limit-break
14
14
  PY="C:/Users/lenovo/.dsh/dsh-runtimes/dsh-primary-runtime/dependencies/python/python.exe"
15
15
  $PY tools/maintain.py status # 我发布的版本在哪、PR 合没合、装的是不是 latest
16
16
  $PY tools/maintain.py probe # 重新测一遍环境,和上次的 baseline 做 diff
17
- $PY tools/maintain.py verify # 契约测试:4 个工具是否仍然注册成功
17
+ $PY tools/maintain.py verify # 契约测试:5 个工具是否仍然注册成功
18
18
  ```
19
19
 
20
20
  先读 `facts.json` 里 `topic` 为 `maintenance` / `release` 的条目,再看 `probe` 的
package/README.md CHANGED
@@ -10,9 +10,14 @@ self-benchmark: two things an agent is normally told it cannot do, made cheap en
10
10
  | `resilient_fetch` | Fetch with a four-rung ladder and a report of which rung answered. |
11
11
  | `memory_stats` | Where the store is, how many facts, how big. |
12
12
 
13
- Zero dependencies. No import-time side effects. Everything fails soft — a broken store or a dead
13
+ Zero npm dependencies. No import-time side effects. Everything fails soft — a broken store or a dead
14
14
  network returns an error object, never an exception that could take the host down.
15
15
 
16
+ **Runtime requirement: `curl`.** Rung 1 of the fetch ladder is plain `fetch` and needs nothing; rungs
17
+ 2–4 (IPv6 → IPv4 → sibling hostname) shell out to `curl`, so it has to be on `PATH`. Windows 10+,
18
+ macOS and mainstream Linux all ship it. Without it the ladder degrades to rung 1 and says so in the
19
+ report instead of pretending it climbed.
20
+
16
21
  ## Why these four
17
22
 
18
23
  **Memory.** A session starts from zero. A store on disk plus a read at the start is enough to beat
package/lib/index.js CHANGED
@@ -630,7 +630,9 @@ export function apply(ctx, config) {
630
630
  'limit-break: memory_stats tool'
631
631
  )
632
632
 
633
- diag(config, 'mounted', { tools: ['memory_recall', 'memory_save', 'resilient_fetch', 'memory_stats'] })
633
+ diag(config, 'mounted', {
634
+ tools: ['memory_recall', 'memory_save', 'resilient_fetch', 'memory_stats']
635
+ })
634
636
  }
635
637
 
636
638
  export default { name, inject, apply }
package/package.json CHANGED
@@ -1,51 +1,51 @@
1
- {
2
- "name": "dsh-limit-break",
3
- "version": "1.2.1",
4
- "description": "Durable cross-session memory and a fetch ladder that survives hostname-keyed blocking — four small tools for DeepSeek Harness.",
5
- "type": "module",
6
- "main": "lib/index.js",
7
- "exports": {
8
- ".": "./lib/index.js",
9
- "./package.json": "./package.json"
10
- },
11
- "files": [
12
- "lib/",
13
- "cordis.patch.yml",
14
- "README.md",
15
- "LICENSE",
16
- "tools/",
17
- "MAINTAIN.md",
18
- "CHANGELOG.md"
19
- ],
20
- "keywords": [
21
- "deepseek",
22
- "deepseek-harness",
23
- "dsh",
24
- "dsh-plugin",
25
- "memory",
26
- "long-term-memory",
27
- "fetch",
28
- "network"
29
- ],
30
- "engines": {
31
- "node": ">=22.6"
32
- },
33
- "license": "MIT",
34
- "author": {
35
- "name": "mapingyue",
36
- "email": "2067984403@qq.com"
37
- },
38
- "repository": {
39
- "type": "git",
40
- "url": "git+https://github.com/Ma354/dsh-limit-break.git"
41
- },
42
- "homepage": "https://github.com/Ma354/dsh-limit-break#readme",
43
- "bugs": {
44
- "url": "https://github.com/Ma354/dsh-limit-break/issues"
45
- },
46
- "dsh": {
47
- "bundle": {
48
- "patch": "./cordis.patch.yml"
49
- }
50
- }
51
- }
1
+ {
2
+ "name": "dsh-limit-break",
3
+ "version": "1.4.0",
4
+ "description": "Durable cross-session memory and a fetch ladder that survives hostname-keyed blocking — four small tools for DeepSeek Harness.",
5
+ "type": "module",
6
+ "main": "lib/index.js",
7
+ "exports": {
8
+ ".": "./lib/index.js",
9
+ "./package.json": "./package.json"
10
+ },
11
+ "files": [
12
+ "lib/",
13
+ "cordis.patch.yml",
14
+ "README.md",
15
+ "LICENSE",
16
+ "tools/",
17
+ "MAINTAIN.md",
18
+ "CHANGELOG.md"
19
+ ],
20
+ "keywords": [
21
+ "deepseek",
22
+ "deepseek-harness",
23
+ "dsh",
24
+ "dsh-plugin",
25
+ "memory",
26
+ "long-term-memory",
27
+ "fetch",
28
+ "network"
29
+ ],
30
+ "engines": {
31
+ "node": ">=22.6"
32
+ },
33
+ "license": "MIT",
34
+ "author": {
35
+ "name": "mapingyue",
36
+ "email": "2067984403@qq.com"
37
+ },
38
+ "repository": {
39
+ "type": "git",
40
+ "url": "git+https://github.com/Ma354/dsh-limit-break.git"
41
+ },
42
+ "homepage": "https://github.com/Ma354/dsh-limit-break#readme",
43
+ "bugs": {
44
+ "url": "https://github.com/Ma354/dsh-limit-break/issues"
45
+ },
46
+ "dsh": {
47
+ "bundle": {
48
+ "patch": "./cordis.patch.yml"
49
+ }
50
+ }
51
+ }