@lmzhen/dsh-evolution-curator 0.1.0-rc.26 → 0.1.0-rc.27

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
@@ -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, SKILL_NAME_RE, SkillLibrary, buildCuratorRunReport, computeLifecycleTransitions, computeQualityScores, emptyRecord, evolutionHome, evolutionIoAdapter, loadSuppressedNames, loadUsage, parseCuratorNominations, parseFrontmatter, saveSuppressedNames, saveUsage } 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, SKILL_NAME_RE, SkillLibrary, buildCuratorRunReport, computeLifecycleTransitions, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, loadSuppressedNames, loadUsage, parseCuratorNominations, parseFrontmatter, saveSuppressedNames, saveUsage } 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.
@@ -286,6 +286,8 @@ var EvolutionCurator = class extends Service {
286
286
  treeNames.add(summary.name);
287
287
  if (!usage.has(summary.name)) usage.set(summary.name, emptyRecord());
288
288
  if (await this.skills.isBundled(summary.name)) bundledNames.add(summary.name);
289
+ const record = usage.get(summary.name);
290
+ if (record) record.pinned = await this.skills.isPinned(summary.name);
289
291
  }
290
292
  return {
291
293
  bundledNames,
@@ -433,6 +435,27 @@ var EvolutionCurator = class extends Service {
433
435
  }
434
436
  }
435
437
  /**
438
+ * Read-only lifecycle scope classification: which skills are in scope,
439
+ * watched (stale/quality-warned), exempted, or protected. Uses the same
440
+ * candidate gate as `run()` (`computeScopeView` / `lifecycleCandidate`),
441
+ * so the view always predicts what a curator pass may touch.
442
+ */
443
+ async scopeView() {
444
+ const root = this.skills.root;
445
+ const usage = await loadUsage(root, this.io);
446
+ const { bundledNames } = await this.seedBaseline(usage);
447
+ return computeScopeView(usage, {
448
+ staleAfterDays: this.lifecycle().staleAfterDays,
449
+ archiveAfterDays: this.lifecycle().archiveAfterDays,
450
+ excludeSkillNames: this.excludeSkillNames,
451
+ referencedSkillNames: this.referencedSkillNames,
452
+ suppressedNames: new Set(await loadSuppressedNames(root, this.io)),
453
+ manageUnmanaged: this.manageUnmanaged,
454
+ pruneBuiltins: this.pruneBuiltins,
455
+ bundledNames
456
+ });
457
+ }
458
+ /**
436
459
  * Control-plane consolidation: merge source skill bodies into `target`,
437
460
  * archive the sources with an absorbed-into marker, and fold their usage
438
461
  * records into `archived` state. Snapshot-then-mutate, never a hard delete.
@@ -5,7 +5,7 @@
5
5
  import { Context, Service } from '@deepseek-ai/cordis';
6
6
  import type Schema from '@deepseek-ai/schemastery';
7
7
  import { SkillLibrary } from '@deepseek-ai/dsh-evolution-core';
8
- import { type CuratorNominations, type CuratorRunReport, type SkillActionResult } from '@deepseek-ai/dsh-evolution-core';
8
+ import { type CuratorNominations, type CuratorRunReport, type ScopeView, type SkillActionResult } from '@deepseek-ai/dsh-evolution-core';
9
9
  declare module '@deepseek-ai/cordis' {
10
10
  interface Context {
11
11
  evolutionCurator: EvolutionCurator;
@@ -124,6 +124,13 @@ export declare class EvolutionCurator extends Service {
124
124
  private applyMutations;
125
125
  private recentSessionActive;
126
126
  latestReport(): Promise<CuratorRunReport | null>;
127
+ /**
128
+ * Read-only lifecycle scope classification: which skills are in scope,
129
+ * watched (stale/quality-warned), exempted, or protected. Uses the same
130
+ * candidate gate as `run()` (`computeScopeView` / `lifecycleCandidate`),
131
+ * so the view always predicts what a curator pass may touch.
132
+ */
133
+ scopeView(): Promise<ScopeView>;
127
134
  /**
128
135
  * Control-plane consolidation: merge source skill bodies into `target`,
129
136
  * 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.26",
4
+ "version": "0.1.0-rc.27",
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.26"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.27"
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.26",
43
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.26"
42
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.27",
43
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.27"
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.26",
49
- "@lmzhen/dsh-evolution-io": "^0.1.0-rc.26",
50
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.26"
48
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.27",
49
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.27",
50
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.27"
51
51
  }
52
52
  }