@lmzhen/dsh-evolution-curator 0.3.83 → 0.4.1
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 +12 -22
- package/lib/index.js +10 -4
- package/package.json +7 -7
package/README.md
CHANGED
|
@@ -2,31 +2,18 @@
|
|
|
2
2
|
|
|
3
3
|
Deterministic skill lifecycle and recovery
|
|
4
4
|
|
|
5
|
-
## Model
|
|
5
|
+
## Model surface
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
`@lmzhen/dsh-evolution-curator` 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
|
-
## Known Limitations and Deferred Work
|
|
7
|
+
- **Model-visible:** nothing of its own: it registers no prompt section and no tool schema; the packages that consume this service own the model-visible effects.
|
|
8
|
+
- **Prompt prefix / KV cache:** independent of request-prefix construction — it does not alter the assembled prompt or tool list; family-level rules: `packages/README.md` §"Model-visible prompt prefix and the KV cache".
|
|
9
|
+
- **Mount it?** yes — the `evolution-curator` row, carried by the `evolution-host`, `evolution-all` and one-click `evolution-preset` bundles; it provides the `evolutionCurator` service the `/evolution curator …` commands and doctor read.
|
|
22
10
|
|
|
11
|
+
## Known limitations
|
|
23
12
|
|
|
24
13
|
- LLM nomination pass is advisory and disabled by default; deterministic lifecycle remains authoritative.
|
|
25
14
|
- Consolidation is a REAL merger path: the LLM nomination (when enabled / via `recommend()`) proposes
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
<target> <source...>` remains the direct manual path (P2-8, v11: the earlier "no LLM pass proposes
|
|
29
|
-
merge groups" wording contradicted the tested nomination chain).
|
|
15
|
+
merge groups, the control plane gates them and applies the mutation — merged source bodies are appended
|
|
16
|
+
verbatim rather than rewritten into a synthesized skill.
|
|
30
17
|
|
|
31
18
|
## Recovery and consolidation
|
|
32
19
|
|
|
@@ -35,9 +22,12 @@ Independent of request-prefix construction. This package does not alter the asse
|
|
|
35
22
|
- `consolidate(target, sources)` (service) / `/evolution consolidate` merges source bodies into the target, archives the sources with an absorbed-into marker, and folds their usage records into `archived` state. Both operations snapshot the full state first (`pre-consolidate` / `pre-restore`).
|
|
36
23
|
- `restoreSnapshot` (service) / `/evolution restore` rolls the state back to the latest snapshot: active tree, usage/suppression sidecars, `.archive/` and the curator state carried in the snapshot (`curator-state.json`), so the interval gate does not immediately re-fire after a rollback. Skills that were skipped at snapshot time (a live writer held their lock; recorded in the manifest's `skipped` list) are NOT restored — the restore result names them, and `.backups` may hold a copy. The restore itself is undoable — the pre-rollback safety snapshot preserves the current tree plus its state.
|
|
37
24
|
|
|
38
|
-
##
|
|
25
|
+
## Configuration
|
|
39
26
|
|
|
40
|
-
- `autoStart` (default true) arms an
|
|
27
|
+
- `autoStart` (default true) arms an HOURLY tick that only asks whether the due-ness interval (`intervalHours`, default 168 h) has elapsed — the tick is not the interval — plus a deferred catch-up check `bootGraceSeconds` (default 10) after host boot. Both decide due-ness from the **persisted** `lastRunAt`, so a restart with an overdue schedule runs the first pass within the boot grace instead of waiting a full interval. `bootGraceSeconds: 0` disables the deferral (not recommended: the check may run against a half-mounted host). All scheduling gates — interval, idle, first-run deferral, and the reentrancy guard — remain inside `run()`.
|
|
41
28
|
- `autoStart: false` disables both automatic checks; `/evolution curator run` (manual, gate-skipping) still works.
|
|
42
29
|
|
|
43
30
|
**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).
|
|
31
|
+
## Notes and history
|
|
32
|
+
|
|
33
|
+
- The one-click `/evolution consolidate <target> <source...>` remains the direct manual path (P2-8, v11: the earlier "no LLM pass proposes merge groups" wording contradicted the tested nomination chain).
|
package/lib/index.js
CHANGED
|
@@ -161,10 +161,16 @@ var EvolutionCurator = class extends Service {
|
|
|
161
161
|
}
|
|
162
162
|
lifecycle() {
|
|
163
163
|
const snapshot = this.ctx.get("evolutionPolicy")?.get();
|
|
164
|
+
const staleAfterDays = snapshot?.staleAfterDays ?? this.staleAfterDays;
|
|
165
|
+
let archiveAfterDays = snapshot?.archiveAfterDays ?? this.archiveAfterDays;
|
|
166
|
+
if (archiveAfterDays < staleAfterDays) {
|
|
167
|
+
this.ctx.logger.warn(`evolution-curator: policy archiveAfterDays (${archiveAfterDays}) < policy staleAfterDays (${staleAfterDays}); using the stale threshold as the archive threshold`);
|
|
168
|
+
archiveAfterDays = staleAfterDays;
|
|
169
|
+
}
|
|
164
170
|
return {
|
|
165
171
|
intervalHours: snapshot?.curatorIntervalHours ?? this.intervalHours,
|
|
166
|
-
staleAfterDays
|
|
167
|
-
archiveAfterDays
|
|
172
|
+
staleAfterDays,
|
|
173
|
+
archiveAfterDays
|
|
168
174
|
};
|
|
169
175
|
}
|
|
170
176
|
start() {
|
|
@@ -691,8 +697,8 @@ var EvolutionCurator = class extends Service {
|
|
|
691
697
|
const pausedNow = current?.paused ?? false;
|
|
692
698
|
return {
|
|
693
699
|
schemaVersion: 1,
|
|
694
|
-
lastRunAt: dryRun || runAborted ? persisted?.lastRunAt ?? this.lastRun : Date.now(),
|
|
695
|
-
runCount: dryRun || runAborted ? persisted?.runCount ?? 0 : (current?.runCount ?? 0) + 1,
|
|
700
|
+
lastRunAt: dryRun || runAborted ? current?.lastRunAt ?? persisted?.lastRunAt ?? this.lastRun : Date.now(),
|
|
701
|
+
runCount: dryRun || runAborted ? current?.runCount ?? persisted?.runCount ?? 0 : (current?.runCount ?? 0) + 1,
|
|
696
702
|
lastSummary: summary,
|
|
697
703
|
paused: pausedNow
|
|
698
704
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lmzhen/dsh-evolution-curator",
|
|
3
3
|
"description": "Deterministic skill lifecycle and recovery (community build)",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.1",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,20 +27,20 @@
|
|
|
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.1"
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
34
34
|
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
|
35
35
|
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
36
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
37
|
-
"@lmzhen/dsh-evolution-state": "^0.
|
|
36
|
+
"@lmzhen/dsh-evolution-io": "^0.4.1",
|
|
37
|
+
"@lmzhen/dsh-evolution-state": "^0.4.1"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
40
|
"@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
|
|
41
41
|
"@deepseek-ai/dsh-session": "^0.1.5-rc.2",
|
|
42
|
-
"@lmzhen/dsh-evolution-core": "^0.
|
|
43
|
-
"@lmzhen/dsh-evolution-io": "^0.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.
|
|
42
|
+
"@lmzhen/dsh-evolution-core": "^0.4.1",
|
|
43
|
+
"@lmzhen/dsh-evolution-io": "^0.4.1",
|
|
44
|
+
"@lmzhen/dsh-evolution-state": "^0.4.1"
|
|
45
45
|
}
|
|
46
46
|
}
|