@lmzhen/dsh-evolution-curator 0.3.56 → 0.3.57
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 +9 -7
- package/lib/types/index.d.ts +4 -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_HEALTH_THRESHOLDS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, SkillLibrary, buildCuratorRunReport, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, foldCuratorFields, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, parseCuratorNominations, parseFrontmatter, relatedSkillNames, renderCuratorReportMarkdown, updateSuppressedNames, usageObserved } from "@lmzhen/dsh-evolution-core";
|
|
6
|
+
import { CURATOR_DRY_RUN_BANNER, CURATOR_PROMPT, DEFAULT_ARCHIVE_AFTER_DAYS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, SKILL_NAME_RE, SkillLibrary, buildCuratorRunReport, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, foldCuratorFields, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, parseCuratorNominations, parseFrontmatter, relatedSkillNames, renderCuratorReportMarkdown, updateSuppressedNames, usageObserved } 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.
|
|
@@ -166,11 +166,10 @@ var EvolutionCurator = class extends Service {
|
|
|
166
166
|
return await this.curatorStateService()?.loadCuratorState() ?? null;
|
|
167
167
|
}
|
|
168
168
|
/**
|
|
169
|
-
* One automatic schedule check
|
|
170
|
-
*
|
|
171
|
-
*
|
|
172
|
-
*
|
|
173
|
-
* wake it, and never duplicates gate logic.
|
|
169
|
+
* One automatic schedule check. P2-11 (v11): the interval gate is exercised
|
|
170
|
+
* HERE as a cheap pre-check (persisted or in-memory clock) AND again inside
|
|
171
|
+
* run() as the authoritative gate — the docstring no longer claims the two
|
|
172
|
+
* never duplicate; a future interval change must update both.
|
|
174
173
|
*/
|
|
175
174
|
async autoCheck() {
|
|
176
175
|
try {
|
|
@@ -578,6 +577,7 @@ var EvolutionCurator = class extends Service {
|
|
|
578
577
|
if (!wasBundled) {
|
|
579
578
|
const archiveEntries = await this.io.list(join(this.skills.root, ".archive"));
|
|
580
579
|
for (const entry of archiveEntries) {
|
|
580
|
+
if (!SKILL_NAME_RE.test(name)) continue;
|
|
581
581
|
if (!new RegExp(`^${name}-\\d{14}(-[0-9a-z]{1,6})?$`).test(entry)) continue;
|
|
582
582
|
wasBundled = await this.io.exists(join(this.skills.root, ".archive", entry, markerEntryName("bundled")));
|
|
583
583
|
if (wasBundled) {
|
|
@@ -679,7 +679,9 @@ var EvolutionCurator = class extends Service {
|
|
|
679
679
|
const usageRegistry = this.ctx.get("skillUsage");
|
|
680
680
|
try {
|
|
681
681
|
await usageRegistry?.invalidate?.();
|
|
682
|
-
} catch {
|
|
682
|
+
} catch (error) {
|
|
683
|
+
this.ctx.logger.warn(`evolution-curator: skillUsage cache invalidate failed after curation: ${error instanceof Error ? error.message : String(error)}`);
|
|
684
|
+
}
|
|
683
685
|
return {
|
|
684
686
|
archivedSkills,
|
|
685
687
|
errors,
|
package/lib/types/index.d.ts
CHANGED
|
@@ -130,11 +130,10 @@ export declare class EvolutionCurator extends Service {
|
|
|
130
130
|
/** Current persisted curator state (read-only view for /evolution curator status). */
|
|
131
131
|
status(): Promise<CuratorStateRecordShape | null>;
|
|
132
132
|
/**
|
|
133
|
-
* One automatic schedule check
|
|
134
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
137
|
-
* wake it, and never duplicates gate logic.
|
|
133
|
+
* One automatic schedule check. P2-11 (v11): the interval gate is exercised
|
|
134
|
+
* HERE as a cheap pre-check (persisted or in-memory clock) AND again inside
|
|
135
|
+
* run() as the authoritative gate — the docstring no longer claims the two
|
|
136
|
+
* never duplicate; a future interval change must update both.
|
|
138
137
|
*/
|
|
139
138
|
private autoCheck;
|
|
140
139
|
/**
|
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.3.
|
|
4
|
+
"version": "0.3.57",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -31,20 +31,20 @@
|
|
|
31
31
|
"license": "MIT",
|
|
32
32
|
"dependencies": {
|
|
33
33
|
"@deepseek-ai/schemastery": "^3.18.1",
|
|
34
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
34
|
+
"@lmzhen/dsh-evolution-core": "^0.3.57"
|
|
35
35
|
},
|
|
36
36
|
"peerDependencies": {
|
|
37
37
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
38
38
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
39
39
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
40
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
41
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
40
|
+
"@lmzhen/dsh-evolution-io": "^0.3.57",
|
|
41
|
+
"@lmzhen/dsh-evolution-state": "^0.3.57"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
44
|
"@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
|
|
45
45
|
"@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
|
|
46
|
-
"@lmzhen/dsh-evolution-core": "^0.3.
|
|
47
|
-
"@lmzhen/dsh-evolution-io": "^0.3.
|
|
48
|
-
"@lmzhen/dsh-evolution-state": "^0.3.
|
|
46
|
+
"@lmzhen/dsh-evolution-core": "^0.3.57",
|
|
47
|
+
"@lmzhen/dsh-evolution-io": "^0.3.57",
|
|
48
|
+
"@lmzhen/dsh-evolution-state": "^0.3.57"
|
|
49
49
|
}
|
|
50
50
|
}
|