@lmzhen/dsh-evolution-activity 0.3.82 → 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.
- package/README.md +18 -24
- package/lib/index.js +8 -7
- package/lib/types/index.d.ts +8 -15
- package/package.json +5 -5
package/README.md
CHANGED
|
@@ -1,34 +1,28 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @lmzhen/dsh-evolution-activity
|
|
2
2
|
|
|
3
|
-
Durable activity store for self-evolution plan outcomes
|
|
3
|
+
Durable activity store for self-evolution plan outcomes: it subscribes to the `evolution/plan-applied`
|
|
4
|
+
process event (payload v2, with sessionId) and append-merges every outcome into
|
|
5
|
+
`$DSH_HOME/evolution/activity.json` through the evolution IO seam — load → fold → save under an
|
|
6
|
+
in-process queue, so records survive host restarts and are readable without a session. A
|
|
7
|
+
session log carrying `evolution/*` types is refused wholesale at resume, so plan-outcome
|
|
8
|
+
durability lives here; a storage-domain table is deferred until a consumer needs domain routing.
|
|
4
9
|
|
|
5
|
-
##
|
|
10
|
+
## Model surface
|
|
6
11
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
### Indirect model surface
|
|
12
|
-
|
|
13
|
-
#### What the model sees
|
|
14
|
-
|
|
15
|
-
`@deepseek-ai/dsh-evolution-activity` registers no direct prompt or tool schema itself. Model-visible effects are owned by the packages that consume this service.
|
|
16
|
-
|
|
17
|
-
#### Token effect
|
|
18
|
-
|
|
19
|
-
Zero direct token effect from this package; consumers add any model-visible tokens.
|
|
20
|
-
|
|
21
|
-
#### KV Cache effect
|
|
22
|
-
|
|
23
|
-
Independent of request-prefix construction. This package does not alter the assembled prompt or tool list.
|
|
12
|
+
- **Model-visible:** nothing of its own: the rows and commands that read the sidecar own the injection; it backs `/evolution replay` (`evolution-replay`).
|
|
13
|
+
- **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".
|
|
14
|
+
- **Mount it?** yes — the `evolution-activity` row, in `evolution-host`/`evolution-all`/one-click `evolution-preset`.
|
|
24
15
|
|
|
25
16
|
## Configuration
|
|
26
17
|
|
|
27
|
-
- `maxItems
|
|
28
|
-
|
|
29
|
-
## Known Limitations and Deferred Work
|
|
18
|
+
- `maxItems` (default `DEFAULT_MAX_ITEMS = 200`): bound on the retained sidecar; a non-finite value falls back to the default, a non-positive value fails loud at the schema.
|
|
30
19
|
|
|
20
|
+
## Known limitations
|
|
31
21
|
|
|
32
|
-
- Each event lands through `transactIo` (like `feedback.json`), so append cycles are cross-process atomic at the single-write granularity; the read-modify-write of one event is serialized in-process and atomic on disk. A multi-record batch is still one event at a time
|
|
22
|
+
- Each event lands through `transactIo` (like `feedback.json`), so append cycles are cross-process atomic at the single-write granularity; the read-modify-write of one event is serialized in-process and atomic on disk. A multi-record batch is still one event at a time: no batch transaction exists.
|
|
33
23
|
|
|
34
24
|
**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).
|
|
25
|
+
|
|
26
|
+
## Notes and history
|
|
27
|
+
|
|
28
|
+
- A non-finite value (NaN/±Infinity) falls back to the default (0.3.19, S6.4 guard), while a non-positive value (0 or negative) fails loud at the schema (`z.number().min(1)`) because `slice(-0)` would keep everything and disable the retention window (G3.1, 0.3.23).
|
package/lib/index.js
CHANGED
|
@@ -83,13 +83,14 @@ async function loadActivityState(root, io) {
|
|
|
83
83
|
};
|
|
84
84
|
}
|
|
85
85
|
/**
|
|
86
|
-
* H-06: the read barrier over the sidecar
|
|
87
|
-
*
|
|
88
|
-
* replay
|
|
89
|
-
* "
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
86
|
+
* H-06: the read barrier over the sidecar — records only, no corruption
|
|
87
|
+
* verdict. @internal Test-only: no production caller (verified by grep
|
|
88
|
+
* 2026-09-16); replay consumes {@link loadActivityState} — the V24-13 claim
|
|
89
|
+
* that `loadActivity` "HAS a production consumer — evolution-replay" was
|
|
90
|
+
* inaccurate (PLAN S5.2). Kept exported so the published surface does not
|
|
91
|
+
* break. The single-writer rule is unchanged: `apply()`'s transact listener
|
|
92
|
+
* remains the only WRITE path. Consumers that must not read an unreadable
|
|
93
|
+
* sidecar as "no history" use {@link loadActivityState}.
|
|
93
94
|
*/
|
|
94
95
|
async function loadActivity(root, io) {
|
|
95
96
|
return (await loadActivityState(root, io)).records;
|
package/lib/types/index.d.ts
CHANGED
|
@@ -52,14 +52,6 @@ export declare function applyActivityEvent(items: EvolutionActivityRecord[], eve
|
|
|
52
52
|
* `parseActivityContent` is the matching single reader. */
|
|
53
53
|
export declare function serializeActivity(items: EvolutionActivityRecord[]): string;
|
|
54
54
|
export declare function parseActivityContent(raw: string | null): EvolutionActivityRecord[];
|
|
55
|
-
/**
|
|
56
|
-
* H-06: the read barrier over the sidecar. V24-13 (v24): `loadActivity` now
|
|
57
|
-
* HAS a production consumer — `evolution-replay` backfills its `/evolution
|
|
58
|
-
* replay` leaderboard from this store at mount (the two packages'
|
|
59
|
-
* "persistence is the activity store's job" contract is actually wired
|
|
60
|
-
* through this call). The single-writer rule is unchanged: `apply()`'s
|
|
61
|
-
* transact listener remains the only WRITE path.
|
|
62
|
-
*/
|
|
63
55
|
/**
|
|
64
56
|
* FLOW6-6 (v43, the read side of H-3): the sidecar's records PLUS whether the
|
|
65
57
|
* bytes could be read as THIS format. `parseActivityContent` answers `[]` for
|
|
@@ -83,13 +75,14 @@ export interface ActivityLoad {
|
|
|
83
75
|
*/
|
|
84
76
|
export declare function loadActivityState(root: string, io: EvolutionIoLike): Promise<ActivityLoad>;
|
|
85
77
|
/**
|
|
86
|
-
* H-06: the read barrier over the sidecar
|
|
87
|
-
*
|
|
88
|
-
* replay
|
|
89
|
-
* "
|
|
90
|
-
*
|
|
91
|
-
*
|
|
92
|
-
*
|
|
78
|
+
* H-06: the read barrier over the sidecar — records only, no corruption
|
|
79
|
+
* verdict. @internal Test-only: no production caller (verified by grep
|
|
80
|
+
* 2026-09-16); replay consumes {@link loadActivityState} — the V24-13 claim
|
|
81
|
+
* that `loadActivity` "HAS a production consumer — evolution-replay" was
|
|
82
|
+
* inaccurate (PLAN S5.2). Kept exported so the published surface does not
|
|
83
|
+
* break. The single-writer rule is unchanged: `apply()`'s transact listener
|
|
84
|
+
* remains the only WRITE path. Consumers that must not read an unreadable
|
|
85
|
+
* sidecar as "no history" use {@link loadActivityState}.
|
|
93
86
|
*/
|
|
94
87
|
export declare function loadActivity(root: string, io: EvolutionIoLike): Promise<EvolutionActivityRecord[]>;
|
|
95
88
|
/** True when bytes exist but are not a readable activity envelope: unparsable
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-activity",
|
|
3
3
|
"description": "Durable activity store for self-evolution plan outcomes (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,15 +27,15 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.4.0"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.1"
|
|
34
34
|
},
|
|
35
35
|
"devDependencies": {
|
|
36
36
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
37
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
38
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
39
|
-
"@lmzhen/dsh-evolution-io-node": "^0.
|
|
37
|
+
"@lmzhen/dsh-evolution-core": "^0.4.0",
|
|
38
|
+
"@lmzhen/dsh-evolution-io": "^0.4.0",
|
|
39
|
+
"@lmzhen/dsh-evolution-io-node": "^0.4.0"
|
|
40
40
|
}
|
|
41
41
|
}
|