@lmzhen/dsh-evolution-state-json 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.
- package/README.md +6 -21
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -1,28 +1,13 @@
|
|
|
1
1
|
# @lmzhen/dsh-evolution-state-json
|
|
2
2
|
|
|
3
|
-
JSON
|
|
4
|
-
files under the state root, so the medium behind `ctx.evolutionIo` can change without a format
|
|
5
|
-
change.
|
|
3
|
+
Default JSON state provider over the family IO seam. It stores review, curator, and pending records without requiring the platform storage-domain service.
|
|
6
4
|
|
|
7
|
-
|
|
5
|
+
`root` defaults to the evolution home. The principal files are `review-state.json`, `curator-state.json`, and `pending-state.json`; the pre-split `pending.json` is read-only legacy input that is retired after migration.
|
|
8
6
|
|
|
9
|
-
|
|
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-state-json` row, in `evolution-host`/`evolution-all`/one-click `evolution-preset` (it is the medium they pin).
|
|
7
|
+
## Retention and corruption behavior
|
|
12
8
|
|
|
13
|
-
|
|
9
|
+
Resolved pending records are capped at 200 in the live map. Older records move to `pending-state-archive.json`, whose own history rotates to a `.bak` sidecar after 5,000 records. Pending/executing work is not trimmed by the resolved cap. Review cadence state is capped at 500 sessions.
|
|
14
10
|
|
|
15
|
-
|
|
11
|
+
Malformed state is not accepted as an empty store. The provider preserves the original bytes in a `.corrupt` copy when possible and fails loudly so a later save cannot silently overwrite recoverable state. Quarantine copies have a bounded rescue window handled by the Node IO backend.
|
|
16
12
|
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
- Both tables are capped (200 pending, 500 sessions), and past the pending cap the DOMAIN provider deletes instead of archiving: this provider keeps an audit sidecar. The `updatedAt` stamp is stripped on read, so the consumer-facing record shape is unchanged.
|
|
20
|
-
- All shipped JSON media are **single-process**: the IO backend has no cross-process lock. A second process sharing `DSH_HOME` is not coordinated; route multi-process deployments to a platform-provided cross-process backend before relying on this provider.
|
|
21
|
-
|
|
22
|
-
**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).
|
|
23
|
-
|
|
24
|
-
## Notes and history
|
|
25
|
-
|
|
26
|
-
- P2-4 (v15): the live pending map is BOUNDED — resolved (approved/rejected) records are kept to the most recent `PENDING_RESOLVED_CAP` (200, seam constant in `evolution-state-storage`); the oldest by `resolvedAt` rotate into the `pending-state-archive.json` sidecar (with `.bak` rotation), which is JSON-provider-specific.
|
|
27
|
-
- V25-11 (v25): the review-state table is likewise BOUNDED: `REVIEW_STATE_SESSION_CAP` (500, seam constant) rows keyed by session; on every save the least-recently-active sessions (provider-stamped `updatedAt`, stored on disk only) are pruned.
|
|
28
|
-
- The JSON provider serializes writers inside one process only (the internal transact wrapper is not public API, audit v10 S-03). It does **not** claim cross-process safety; the shipped IO backend declares single-process.
|
|
13
|
+
Read-modify-write safety depends on the selected IO backend. The shipped Node backend serializes within one process only; see [evolution-io-node](../evolution-io-node/README.md) before sharing one home between processes.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-state-json",
|
|
3
3
|
"description": "JSON-file evolution state provider over the IO seam (community build)",
|
|
4
|
-
"version": "0.32.
|
|
4
|
+
"version": "0.32.6",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,17 +27,17 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.32.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.32.6"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.5",
|
|
34
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
35
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.32.
|
|
34
|
+
"@lmzhen/dsh-evolution-io": "^0.32.6",
|
|
35
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.32.6"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@lmzhen/dsh-evolution-io": "^0.32.
|
|
39
|
-
"@lmzhen/dsh-evolution-state-storage": "^0.32.
|
|
40
|
-
"@lmzhen/dsh-evolution-io-node": "^0.32.
|
|
38
|
+
"@lmzhen/dsh-evolution-io": "^0.32.6",
|
|
39
|
+
"@lmzhen/dsh-evolution-state-storage": "^0.32.6",
|
|
40
|
+
"@lmzhen/dsh-evolution-io-node": "^0.32.6"
|
|
41
41
|
},
|
|
42
42
|
"engines": {
|
|
43
43
|
"dsh": ">=0.2.1-rc.2 <0.2.2-0"
|