@lmzhen/dsh-evolution-approval 0.3.74 → 0.3.77
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 +5 -14
- package/lib/invariant.js +0 -8
- package/lib/types/invariant.d.ts +0 -5
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ runners — `tool-memory` via `registerRunner('memory', …)` and
|
|
|
9
9
|
`tool-skill-manage` via `registerRunner('skill', …)` — so staged writes are
|
|
10
10
|
replayable only when the corresponding tool package is composed.
|
|
11
11
|
|
|
12
|
-
Run the
|
|
12
|
+
Run the package tests:
|
|
13
13
|
|
|
14
14
|
```sh
|
|
15
15
|
node node_modules/vitest/vitest.mjs run packages/evolution/evolution-approval/tests # overlay layout
|
|
@@ -38,3 +38,5 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
38
38
|
- `approve()` deduplicates concurrent approvals inside one process, and state providers resolve the pending record atomically. However, the replay runner executes **before** that atomic resolution, so two OS processes approving the same id can each perform the write once while only one process wins the audit transition. Run approvals from a single writer process, or make replay runners idempotent when multi-process approval is required.
|
|
39
39
|
- **Concurrent approve + reject on the same id (F-204).** Inside one process the dedupe keys are `approve:<id>` / `reject:<id>`, so the two paths are not serialized against each other. When an approve runner is slow, a reject resolves the still-executing record to `rejected` **without holding a claim**; the runner may then complete and the write can still land while the audit history reads `rejected` — the write effect, not the audit verdict, is what actually persists (`写效果以实际为准`). `reject` on an executing record reports this and asks you to verify the write state manually. Only reject a write after confirming no approve is in flight, or verify the write effect manually afterwards.
|
|
40
40
|
- **No staged-content freshness re-validation (F-328).** The staged record stores the `args` snapshot captured at request time and replays exactly those args, but does not record a content hash, so `approve()` does **not** re-check whether the on-disk skill/memory the write targets changed since staging. The write is applied as staged regardless. The pending surface (`/evolution pending --detail`) exposes the staged `args` so you can review what will actually be replayed before approving; there is no automatic drift warning if the target changed in the meantime.
|
|
41
|
+
|
|
42
|
+
**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).
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-approval",
|
|
3
3
|
"description": "Stage/pending approval service for Hermes-style self-evolution writes (community build)",
|
|
4
|
-
"version": "0.3.
|
|
4
|
+
"version": "0.3.77",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -18,10 +18,6 @@
|
|
|
18
18
|
"types": "./lib/types/index.d.ts",
|
|
19
19
|
"default": "./lib/index.js"
|
|
20
20
|
},
|
|
21
|
-
"./invariant": {
|
|
22
|
-
"types": "./lib/types/invariant.d.ts",
|
|
23
|
-
"default": "./lib/invariant.js"
|
|
24
|
-
},
|
|
25
21
|
"./package.json": "./package.json"
|
|
26
22
|
},
|
|
27
23
|
"files": [
|
|
@@ -33,17 +29,12 @@
|
|
|
33
29
|
"@deepseek-ai/schemastery": "^3.18.1"
|
|
34
30
|
},
|
|
35
31
|
"peerDependencies": {
|
|
36
|
-
"@deepseek-ai/dsh-invariants": "^0.1.5-rc.2",
|
|
37
32
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.3.
|
|
39
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
33
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.77",
|
|
34
|
+
"@lmzhen/dsh-evolution-state": "^0.3.77"
|
|
40
35
|
},
|
|
41
36
|
"devDependencies": {
|
|
42
|
-
"@
|
|
43
|
-
"@lmzhen/dsh-evolution-state
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.3.74",
|
|
45
|
-
"@lmzhen/dsh-evolution-io": "^0.3.74",
|
|
46
|
-
"@lmzhen/dsh-evolution-io-node": "^0.3.74",
|
|
47
|
-
"@lmzhen/dsh-evolution-state-json": "^0.3.74"
|
|
37
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.3.77",
|
|
38
|
+
"@lmzhen/dsh-evolution-state": "^0.3.77"
|
|
48
39
|
}
|
|
49
40
|
}
|
package/lib/invariant.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
//#region lib/types/invariant.js
|
|
2
|
-
const PACKAGE_NAME = "@lmzhen/dsh-evolution-approval";
|
|
3
|
-
const name = "evolution-approval-invariant";
|
|
4
|
-
const inject = ["invariants"];
|
|
5
|
-
const install = () => {};
|
|
6
|
-
const apply = (ctx) => Promise.resolve(ctx.invariants.register(PACKAGE_NAME, install));
|
|
7
|
-
//#endregion
|
|
8
|
-
export { apply, inject, name };
|
package/lib/types/invariant.d.ts
DELETED