@lmzhen/dsh-evolution-curator 0.1.0-rc.63 → 0.1.0-rc.64
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 +21 -5
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import { randomUUID } from "node:crypto";
|
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { BlockAssembler, createUserMessage } from "@deepseek-ai/dsh-llm";
|
|
5
5
|
import z from "@deepseek-ai/schemastery";
|
|
6
|
-
import { CURATOR_DRY_RUN_BANNER, CURATOR_PROMPT, DEFAULT_ARCHIVE_AFTER_DAYS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, SkillLibrary, buildCuratorRunReport, computeDedupGroups, computeLifecycleTransitions, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, loadSuppressedNames, loadUsage, parseCuratorNominations, relatedSkillNames, renderCuratorReportMarkdown, saveUsage, updateSuppressedNames } from "@lmzhen/dsh-evolution-core";
|
|
6
|
+
import { CURATOR_DRY_RUN_BANNER, CURATOR_PROMPT, DEFAULT_ARCHIVE_AFTER_DAYS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, SkillLibrary, buildCuratorRunReport, computeDedupGroups, computeLifecycleTransitions, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, loadSuppressedNames, loadUsage, mutateUsage, parseCuratorNominations, relatedSkillNames, renderCuratorReportMarkdown, saveUsage, updateSuppressedNames } from "@lmzhen/dsh-evolution-core";
|
|
7
7
|
//#region lib/types/index.js
|
|
8
8
|
/**
|
|
9
9
|
* Deterministic skill lifecycle curator with interval gate and archive.
|
|
@@ -563,7 +563,9 @@ var EvolutionCurator = class extends Service {
|
|
|
563
563
|
this.ctx.logger.warn("evolution-curator: failed to persist suppressed names; archived built-ins may re-enter the lifecycle");
|
|
564
564
|
}
|
|
565
565
|
try {
|
|
566
|
-
await
|
|
566
|
+
await mutateUsage(root, this.io, (disk) => {
|
|
567
|
+
for (const [name, record] of usage) disk.set(name, record);
|
|
568
|
+
});
|
|
567
569
|
} catch {
|
|
568
570
|
this.ctx.logger.warn("evolution-curator: failed to persist usage sidecar");
|
|
569
571
|
}
|
|
@@ -627,9 +629,23 @@ var EvolutionCurator = class extends Service {
|
|
|
627
629
|
}
|
|
628
630
|
async latestReport() {
|
|
629
631
|
const reportsRoot = join(evolutionHome(), "reports");
|
|
630
|
-
const
|
|
631
|
-
|
|
632
|
-
const
|
|
632
|
+
const names = (await this.io.list(reportsRoot)).filter((name) => name.startsWith("curator-") && name.endsWith(".json")).sort();
|
|
633
|
+
let latest = null;
|
|
634
|
+
for (const name of names) {
|
|
635
|
+
const raw = await this.io.readText(join(reportsRoot, name));
|
|
636
|
+
if (raw === null) continue;
|
|
637
|
+
try {
|
|
638
|
+
const parsed = JSON.parse(raw);
|
|
639
|
+
const startedAt = typeof parsed.startedAt === "string" ? Date.parse(parsed.startedAt) : 0;
|
|
640
|
+
if (!Number.isFinite(startedAt)) continue;
|
|
641
|
+
if (latest === null || startedAt > latest.startedAt) latest = {
|
|
642
|
+
name,
|
|
643
|
+
startedAt
|
|
644
|
+
};
|
|
645
|
+
} catch {}
|
|
646
|
+
}
|
|
647
|
+
if (latest === null) return null;
|
|
648
|
+
const raw = await this.io.readText(join(reportsRoot, latest.name));
|
|
633
649
|
if (raw === null) return null;
|
|
634
650
|
try {
|
|
635
651
|
return JSON.parse(raw);
|
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.1.0-rc.
|
|
4
|
+
"version": "0.1.0-rc.64",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -33,20 +33,20 @@
|
|
|
33
33
|
"license": "MIT",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
36
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
36
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.64"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
40
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
41
41
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
42
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
43
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
42
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.64",
|
|
43
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.64"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
47
47
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
48
|
-
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.
|
|
49
|
-
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.
|
|
50
|
-
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.
|
|
48
|
+
"@lmzhen/dsh-evolution-core": "^0.1.0-rc.64",
|
|
49
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.64",
|
|
50
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.64"
|
|
51
51
|
}
|
|
52
52
|
}
|