@lmzhen/dsh-evolution-curator 0.1.0-rc.71 → 0.1.0-rc.72

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.
Files changed (2) hide show
  1. package/lib/index.js +6 -1
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -378,6 +378,7 @@ var EvolutionCurator = class extends Service {
378
378
  suppressedNames,
379
379
  root,
380
380
  recommendPool: new Set(recommendPool),
381
+ stateOwned: new Set([...result.transitions.map((t) => t.name), ...archiveCandidates]),
381
382
  failedFrom: new Map(result.transitions.filter((t) => t.to === "archived").map((t) => [t.name, t.from]))
382
383
  });
383
384
  if (!dryRun) this.lastRun = Date.now();
@@ -499,6 +500,7 @@ var EvolutionCurator = class extends Service {
499
500
  const executedConsolidations = [];
500
501
  let suppressedChanged = false;
501
502
  const suppressedAdded = /* @__PURE__ */ new Set();
503
+ const stateOwned = new Set(input.stateOwned ?? []);
502
504
  for (const name of archiveCandidates) {
503
505
  const archived = await this.skills.archive(name, {
504
506
  reason: "Lifecycle: reached archive threshold",
@@ -510,6 +512,7 @@ var EvolutionCurator = class extends Service {
510
512
  if (record && (from === "stale" || from === "active")) {
511
513
  record.state = from;
512
514
  record.archived_at = null;
515
+ stateOwned.add(name);
513
516
  }
514
517
  errors.push(`${name}: ${archived.message}`);
515
518
  } else {
@@ -517,6 +520,7 @@ var EvolutionCurator = class extends Service {
517
520
  if (record) {
518
521
  record.state = "archived";
519
522
  record.archived_at = (/* @__PURE__ */ new Date()).toISOString();
523
+ stateOwned.add(name);
520
524
  }
521
525
  archivedSkills.push({
522
526
  name,
@@ -550,6 +554,7 @@ var EvolutionCurator = class extends Service {
550
554
  if (record) {
551
555
  record.state = "archived";
552
556
  record.archived_at = (/* @__PURE__ */ new Date()).toISOString();
557
+ stateOwned.add(nomination.from);
553
558
  }
554
559
  alreadyArchived.add(nomination.from);
555
560
  executedConsolidations.push({
@@ -571,7 +576,7 @@ var EvolutionCurator = class extends Service {
571
576
  }
572
577
  try {
573
578
  await mutateUsage(root, this.io, (disk) => {
574
- foldCuratorFields(disk, usage);
579
+ foldCuratorFields(disk, usage, stateOwned);
575
580
  });
576
581
  } catch {
577
582
  this.ctx.logger.warn("evolution-curator: failed to persist usage sidecar");
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.71",
4
+ "version": "0.1.0-rc.72",
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.71"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.72"
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.71",
43
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.71"
42
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.72",
43
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.72"
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.71",
49
- "@lmzhen/dsh-evolution-io": "^0.1.0-rc.71",
50
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.71"
48
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.72",
49
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.72",
50
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.72"
51
51
  }
52
52
  }