@lmzhen/dsh-evolution-curator 0.4.0 → 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/lib/index.js +10 -4
- package/package.json +7 -7
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.
|
|
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.4.
|
|
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.4.
|
|
37
|
-
"@lmzhen/dsh-evolution-state": "^0.4.
|
|
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.4.
|
|
43
|
-
"@lmzhen/dsh-evolution-io": "^0.4.
|
|
44
|
-
"@lmzhen/dsh-evolution-state": "^0.4.
|
|
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
|
}
|