@lmzhen/dsh-evolution-threat 0.3.83 → 0.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.
Files changed (2) hide show
  1. package/README.md +17 -33
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,44 +1,28 @@
1
1
  # @lmzhen/dsh-evolution-threat
2
2
 
3
- Write-time threat guard for evolution tools
3
+ Write-time threat guard for evolution tools: one monotonic `tools.guard()` scans the payload of
4
+ every evolution write tool and refuses the call on a pattern hit. It registers no prompt or tool
5
+ schema — a denial is its only model-visible effect.
4
6
 
5
- ## Model Experience
7
+ ## Model surface
6
8
 
7
- ### Indirect model surface
9
+ - **Model-visible:** nothing of its own: a refused write is the only thing the model notices.
10
+ - **Prompt prefix / KV cache:** unchanged by this package: family-level rules single-sourced in `packages/README.md` §"Model-visible prompt prefix and the KV cache".
11
+ - **Mount it?** yes — the `evolution-threat` row, in `evolution-host`/`evolution-all`/one-click `evolution-preset`.
8
12
 
9
- #### What the model sees
13
+ ## Configuration
10
14
 
11
- `@lmzhen/dsh-evolution-threat` registers no direct prompt or tool schema itself. Model-visible effects are owned by the packages that consume this service.
12
-
13
- #### Token effect
14
-
15
- Zero direct token effect from this package; consumers add any model-visible tokens.
16
-
17
- #### KV Cache effect
18
-
19
- Independent of request-prefix construction. This package does not alter the assembled prompt or tool list.
20
-
21
- ## Config
22
-
23
- - `maxScanChars` (default 65536): the scan window size in normalized characters.
24
- Legal range is `>= 4097` — a smaller window cannot guarantee full-coverage
25
- scanning (the overlap floor is `PATTERN_OVERLAP + 1` in evolution-core), so
26
- the schema rejects it at load and the assembly clamp falls back to the
27
- default. The whole text is always scanned in overlapping windows; this value
28
- is not a total cap.
29
-
30
- - `threatExemptLabels` (default `[]`): pattern labels the deployment knows to
31
- be benign. P2-4 (v14) closed the store-vs-guard asymmetry for the STORE
32
- gates (`SkillLibrary`/`MemoryStore` options) — but the exemption surface is
33
- per config site: this guard row, the tool-skill-manage row, the
34
- evolution-commands row (its own SkillLibrary for the command write paths),
35
- and the memory store options each carry their OWN list and must be set
36
- separately. A label exempted only on the store side still blocks here.
37
- (v17 audit: the evolution-commands site was missing from this enumeration.)
38
-
39
- ## Known Limitations and Deferred Work
15
+ - `enabled` (default `true`): master switch; off installs no guard.
16
+ - `maxScanChars` — `65536` — the scan window size in normalized characters. Legal range is `>= 4097` — a smaller window cannot guarantee full-coverage scanning (the overlap floor is `PATTERN_OVERLAP + 1` in evolution-core), so the schema rejects it at load and the assembly clamp falls back to the default. The whole text is always scanned in overlapping windows; this value is not a total cap.
17
+ - `threatExemptLabels` (default `[]`): pattern labels the deployment knows to be benign. The exemption surface is per config site: this guard row, the tool-skill-manage row, the evolution-commands row (its own SkillLibrary for the command write paths), the evolution-learning-graph row (its own SkillLibrary for the graph edit/delete write channel) and the memory store options each carry their OWN list and must be set separately. A label exempted only on the store side still blocks here.
40
18
 
19
+ ## Known limitations
41
20
 
42
21
  - No known durable consumer gaps at this time. Runtime contracts are covered by package and boundary tests.
43
22
 
44
23
  **Runtime invariant:** No companion is published. The platform auto-assembles nothing and the family mounts no `<pkg>/invariant` cordis row, so a companion here would never execute (v37 S2.1 / I-3).
24
+
25
+ ## Notes and history
26
+
27
+ - P2-4 (v14) closed the store-vs-guard asymmetry for the STORE gates (`SkillLibrary`/`MemoryStore` options)
28
+ - (v17 audit: the evolution-commands site was missing from this enumeration; the evolution-learning-graph site was missing from it as well.)
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-threat",
3
3
  "description": "Write-time threat guard for evolution tools (community build)",
4
- "version": "0.3.83",
4
+ "version": "0.4.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,7 +27,7 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.1",
30
- "@lmzhen/dsh-evolution-core": "^0.3.83"
30
+ "@lmzhen/dsh-evolution-core": "^0.4.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.1",
@@ -36,6 +36,6 @@
36
36
  "devDependencies": {
37
37
  "@deepseek-ai/dsh-agent-loop-testkit": "^0.1.5-rc.2",
38
38
  "@deepseek-ai/dsh-tools": "^0.1.5-rc.2",
39
- "@lmzhen/dsh-evolution-core": "^0.3.83"
39
+ "@lmzhen/dsh-evolution-core": "^0.4.0"
40
40
  }
41
41
  }