@lmzhen/dsh-evolution-threat 0.32.4 → 0.32.6

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 +9 -20
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,28 +1,17 @@
1
1
  # @lmzhen/dsh-evolution-threat
2
2
 
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.
3
+ Write-time threat guard for the family model-writing tools. It is enabled by default and runs even when ordinary write approval is disabled.
6
4
 
7
- ## Model surface
5
+ ## Actual coverage
8
6
 
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`.
7
+ The guard scans calls whose tool name belongs to the family `EVOLUTION_WRITE_TOOLS` set. Memory calls scan `facts` and `content`, including entries in `operations[]`; skill calls scan `content`, `file_content`, and `new_string`. A matching threat label denies the allowed execution through `tools.guard`.
12
8
 
13
- ## Configuration
9
+ This is not a scan of every internal write. Curator jobs, merge orchestration, direct provider calls, generic file tools, and other paths outside the guarded tool set are not covered by this package.
14
10
 
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.
11
+ ## Configuration and limits
18
12
 
19
- ## Known limitations
13
+ - `enabled`: mounts the guard; default `true`.
14
+ - `maxScanChars`: normalized characters scanned per field; default 65,536. Values below the overlap-safe floor fall back to the default.
15
+ - `threatExemptLabels`: deployment-declared benign labels; default empty. These labels affect the scan and must be treated as security configuration.
20
16
 
21
- - No known durable consumer gaps at this time. Runtime contracts are covered by package and boundary tests.
22
-
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.)
17
+ The rule set is manually maintained and is not exhaustive. It is one write-control layer, not a general sandbox or a guarantee that every secret, injection, or exfiltration attempt will be detected.
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.32.4",
4
+ "version": "0.32.6",
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.5",
30
- "@lmzhen/dsh-evolution-core": "^0.32.4"
30
+ "@lmzhen/dsh-evolution-core": "^0.32.6"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.5",
@@ -36,7 +36,7 @@
36
36
  "devDependencies": {
37
37
  "@deepseek-ai/dsh-agent-loop-testkit": "^0.2.1-rc.2",
38
38
  "@deepseek-ai/dsh-tools": "^0.2.1-rc.2",
39
- "@lmzhen/dsh-evolution-core": "^0.32.4"
39
+ "@lmzhen/dsh-evolution-core": "^0.32.6"
40
40
  },
41
41
  "engines": {
42
42
  "dsh": ">=0.2.1-rc.2 <0.2.2-0"