@lmzhen/dsh-evolution-curator 0.1.0-rc.13 → 0.1.0-rc.14

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 CHANGED
@@ -171,11 +171,7 @@ var EvolutionCurator = class extends Service {
171
171
  const snapshotPath = await this.skills.snapshotAll("pre-curator-run");
172
172
  const usage = await loadUsage(root, this.io);
173
173
  const suppressedNames = new Set(await loadSuppressedNames(root, this.io));
174
- const bundledNames = /* @__PURE__ */ new Set();
175
- for (const summary of await this.skills.list()) {
176
- if (!usage.has(summary.name)) usage.set(summary.name, emptyRecord());
177
- if (await this.skills.isBundled(summary.name)) bundledNames.add(summary.name);
178
- }
174
+ const bundledNames = await this.seedBaseline(usage);
179
175
  const result = computeLifecycleTransitions(usage, {
180
176
  staleAfterDays: lifecycle.staleAfterDays,
181
177
  archiveAfterDays: lifecycle.archiveAfterDays,
@@ -212,7 +208,11 @@ var EvolutionCurator = class extends Service {
212
208
  }
213
209
  }
214
210
  }
215
- if (suppressedChanged) await saveSuppressedNames(root, suppressedNames, this.io);
211
+ if (suppressedChanged) try {
212
+ await saveSuppressedNames(root, suppressedNames, this.io);
213
+ } catch {
214
+ this.ctx.logger.warn("evolution-curator: failed to persist suppressed names; archived built-ins may re-enter the lifecycle");
215
+ }
216
216
  await saveUsage(root, usage, this.io);
217
217
  this.lastRun = Date.now();
218
218
  const report = buildCuratorRunReport({
@@ -251,6 +251,19 @@ var EvolutionCurator = class extends Service {
251
251
  report
252
252
  };
253
253
  }
254
+ /**
255
+ * Seed baseline records for tree skills the sidecar has not seen yet, so
256
+ * their inactivity clock starts now (first-sight defer) and bundled skills
257
+ * become known candidates only when prune-builtins opts them in.
258
+ */
259
+ async seedBaseline(usage) {
260
+ const bundledNames = /* @__PURE__ */ new Set();
261
+ for (const summary of await this.skills.list()) {
262
+ if (!usage.has(summary.name)) usage.set(summary.name, emptyRecord());
263
+ if (await this.skills.isBundled(summary.name)) bundledNames.add(summary.name);
264
+ }
265
+ return bundledNames;
266
+ }
254
267
  recentSessionActive() {
255
268
  const agents = this.ctx.get("agents");
256
269
  if (!agents) return false;
@@ -309,7 +322,11 @@ var EvolutionCurator = class extends Service {
309
322
  if (record) record.state = "active";
310
323
  await saveUsage(this.skills.root, usage, this.io);
311
324
  const suppressed = new Set(await loadSuppressedNames(this.skills.root, this.io));
312
- if (suppressed.delete(name)) await saveSuppressedNames(this.skills.root, suppressed, this.io);
325
+ if (suppressed.delete(name)) try {
326
+ await saveSuppressedNames(this.skills.root, suppressed, this.io);
327
+ } catch {
328
+ this.ctx.logger.warn(`evolution-curator: failed to persist suppressed names after restoring ${name}`);
329
+ }
313
330
  return result;
314
331
  }
315
332
  };
@@ -78,6 +78,12 @@ export declare class EvolutionCurator extends Service {
78
78
  run(options?: {
79
79
  ignoreGates?: boolean;
80
80
  }): Promise<CuratorRunOutcome>;
81
+ /**
82
+ * Seed baseline records for tree skills the sidecar has not seen yet, so
83
+ * their inactivity clock starts now (first-sight defer) and bundled skills
84
+ * become known candidates only when prune-builtins opts them in.
85
+ */
86
+ private seedBaseline;
81
87
  private recentSessionActive;
82
88
  latestReport(): Promise<CuratorRunReport | null>;
83
89
  /**
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.13",
4
+ "version": "0.1.0-rc.14",
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.13"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.14"
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.13",
43
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.13"
42
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.14",
43
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.14"
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.13",
49
- "@lmzhen/dsh-evolution-io": "^0.1.0-rc.13",
50
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.13"
48
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.14",
49
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.14",
50
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.14"
51
51
  }
52
52
  }