@lmzhen/dsh-evolution-curator 0.1.0-rc.28 → 0.1.0-rc.29
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 +15 -5
- package/lib/types/index.d.ts +2 -0
- package/package.json +7 -7
package/lib/index.js
CHANGED
|
@@ -247,7 +247,8 @@ var EvolutionCurator = class extends Service {
|
|
|
247
247
|
usage,
|
|
248
248
|
bundledNames,
|
|
249
249
|
suppressedNames,
|
|
250
|
-
root
|
|
250
|
+
root,
|
|
251
|
+
failedFrom: new Map(result.transitions.filter((t) => t.to === "archived").map((t) => [t.name, t.from]))
|
|
251
252
|
});
|
|
252
253
|
if (!dryRun) this.lastRun = Date.now();
|
|
253
254
|
const report = buildCuratorRunReport({
|
|
@@ -364,7 +365,7 @@ var EvolutionCurator = class extends Service {
|
|
|
364
365
|
errors: [],
|
|
365
366
|
suppressedChanged: false
|
|
366
367
|
};
|
|
367
|
-
const { archiveCandidates, nominations, treeNames, usage, bundledNames, suppressedNames, root } = input;
|
|
368
|
+
const { archiveCandidates, nominations, treeNames, usage, bundledNames, suppressedNames, root, failedFrom } = input;
|
|
368
369
|
const errors = [];
|
|
369
370
|
const archivedSkills = [];
|
|
370
371
|
let suppressedChanged = false;
|
|
@@ -375,7 +376,8 @@ var EvolutionCurator = class extends Service {
|
|
|
375
376
|
});
|
|
376
377
|
if (!archived.ok) {
|
|
377
378
|
const record = usage.get(name);
|
|
378
|
-
|
|
379
|
+
const from = failedFrom?.get(name);
|
|
380
|
+
if (record && (from === "stale" || from === "active")) record.state = from;
|
|
379
381
|
errors.push(`${name}: ${archived.message}`);
|
|
380
382
|
} else {
|
|
381
383
|
archivedSkills.push({
|
|
@@ -409,7 +411,7 @@ var EvolutionCurator = class extends Service {
|
|
|
409
411
|
alreadyArchived.add(nomination.from);
|
|
410
412
|
archivedSkills.push({
|
|
411
413
|
name: nomination.from,
|
|
412
|
-
path:
|
|
414
|
+
path: join(this.skills.root, ".archive", nomination.from),
|
|
413
415
|
reason: `Consolidated into ${nomination.into}`
|
|
414
416
|
});
|
|
415
417
|
}
|
|
@@ -471,7 +473,13 @@ var EvolutionCurator = class extends Service {
|
|
|
471
473
|
manageUnmanaged: this.manageUnmanaged,
|
|
472
474
|
pruneBuiltins: this.pruneBuiltins,
|
|
473
475
|
bundledNames
|
|
474
|
-
});
|
|
476
|
+
}, await this.protectedNameMap());
|
|
477
|
+
}
|
|
478
|
+
/** marker info (pinned/bundled/hub-installed) per skill, from the library list. */
|
|
479
|
+
async protectedNameMap() {
|
|
480
|
+
const map = /* @__PURE__ */ new Map();
|
|
481
|
+
for (const summary of await this.skills.list()) if (summary.protectedBy !== null) map.set(summary.name, summary.protectedBy);
|
|
482
|
+
return map;
|
|
475
483
|
}
|
|
476
484
|
/**
|
|
477
485
|
* Control-plane consolidation: merge source skill bodies into `target`,
|
|
@@ -491,6 +499,7 @@ var EvolutionCurator = class extends Service {
|
|
|
491
499
|
for (const source of sources) {
|
|
492
500
|
const record = usage.get(source);
|
|
493
501
|
if (record) record.state = "archived";
|
|
502
|
+
if (record) record.archived_at = (/* @__PURE__ */ new Date()).toISOString();
|
|
494
503
|
}
|
|
495
504
|
await saveUsage(this.skills.root, usage, this.io);
|
|
496
505
|
return result;
|
|
@@ -506,6 +515,7 @@ var EvolutionCurator = class extends Service {
|
|
|
506
515
|
const usage = await loadUsage(this.skills.root, this.io);
|
|
507
516
|
const record = usage.get(name);
|
|
508
517
|
if (record) record.state = "active";
|
|
518
|
+
if (record) record.archived_at = null;
|
|
509
519
|
await saveUsage(this.skills.root, usage, this.io);
|
|
510
520
|
const suppressed = new Set(await loadSuppressedNames(this.skills.root, this.io));
|
|
511
521
|
if (suppressed.delete(name)) try {
|
package/lib/types/index.d.ts
CHANGED
|
@@ -142,6 +142,8 @@ export declare class EvolutionCurator extends Service {
|
|
|
142
142
|
* so the view always predicts what a curator pass may touch.
|
|
143
143
|
*/
|
|
144
144
|
scopeView(): Promise<ScopeView>;
|
|
145
|
+
/** marker info (pinned/bundled/hub-installed) per skill, from the library list. */
|
|
146
|
+
private protectedNameMap;
|
|
145
147
|
/**
|
|
146
148
|
* Control-plane consolidation: merge source skill bodies into `target`,
|
|
147
149
|
* archive the sources with an absorbed-into marker, and fold their usage
|
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.29",
|
|
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.29"
|
|
37
37
|
},
|
|
38
38
|
"peerDependencies": {
|
|
39
39
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
40
40
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
41
41
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
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.29",
|
|
43
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.29"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@deepseek-ai/dsh-invariants": "^0.1.0-rc.6",
|
|
47
47
|
"@deepseek-ai/dsh-llm": "^0.1.0-rc.6",
|
|
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.29",
|
|
49
|
+
"@lmzhen/dsh-evolution-io": "^0.1.0-rc.29",
|
|
50
|
+
"@lmzhen/dsh-evolution-state": "^0.1.0-rc.29"
|
|
51
51
|
}
|
|
52
52
|
}
|