@lmzhen/dsh-evolution-curator 0.1.0-rc.43 → 0.1.0-rc.44

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 -11
  2. package/package.json +7 -7
package/lib/index.js CHANGED
@@ -3,12 +3,14 @@ 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, computeScopeView, 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, SkillLibrary, buildCuratorRunReport, computeLifecycleTransitions, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, loadSuppressedNames, loadUsage, parseCuratorNominations, relatedSkillNames, 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.
10
10
  * @module @lmzhen/dsh-evolution-curator
11
11
  */
12
+ /** Quality-warned skills may turn stale after this many idle days (package-private tunable, P2-8). */
13
+ const DEFAULT_QUALITY_WARN_STALE_AFTER_DAYS = 7;
12
14
  /**
13
15
  * Block LLM-nominated consolidations that would touch a gate-protected name:
14
16
  * exclude / referenced / suppressed skills must never merge (neither as the
@@ -28,7 +30,7 @@ var EvolutionCurator = class extends Service {
28
30
  archiveAfterDays: z.number().default(DEFAULT_ARCHIVE_AFTER_DAYS),
29
31
  llmReview: z.boolean().default(false),
30
32
  curatorProvider: z.string().default("deepseek-official"),
31
- qualityWarnStaleAfterDays: z.number().default(7),
33
+ qualityWarnStaleAfterDays: z.number().default(DEFAULT_QUALITY_WARN_STALE_AFTER_DAYS),
32
34
  minIdleHours: z.number().default(DEFAULT_MIN_IDLE_HOURS),
33
35
  excludeSkillNames: z.array(z.string()).default([]),
34
36
  manageUnmanaged: z.boolean().default(false),
@@ -68,7 +70,7 @@ var EvolutionCurator = class extends Service {
68
70
  this.archiveAfterDays = config.archiveAfterDays ?? DEFAULT_ARCHIVE_AFTER_DAYS;
69
71
  this.llmReview = config.llmReview ?? false;
70
72
  this.curatorProvider = config.curatorProvider ?? "deepseek-official";
71
- this.qualityWarnStaleAfterDays = config.qualityWarnStaleAfterDays ?? 7;
73
+ this.qualityWarnStaleAfterDays = config.qualityWarnStaleAfterDays ?? DEFAULT_QUALITY_WARN_STALE_AFTER_DAYS;
72
74
  this.minIdleHours = config.minIdleHours ?? DEFAULT_MIN_IDLE_HOURS;
73
75
  this.excludeSkillNames = new Set(config.excludeSkillNames ?? []);
74
76
  this.manageUnmanaged = config.manageUnmanaged ?? false;
@@ -455,14 +457,7 @@ var EvolutionCurator = class extends Service {
455
457
  for (const name of treeNames) {
456
458
  const content = await this.skills.read(name);
457
459
  if (!content) continue;
458
- const parsed = parseFrontmatter(content);
459
- if (!parsed) continue;
460
- const raw = parsed.frontmatter["related_skills"];
461
- if (typeof raw !== "string") continue;
462
- for (const match of Array.from(raw.matchAll(/[a-z0-9][a-z0-9-]*/g))) {
463
- const target = match[0];
464
- if (target && SKILL_NAME_RE.test(target) && target !== name) counts.set(target, (counts.get(target) ?? 0) + 1);
465
- }
460
+ for (const target of relatedSkillNames(content, name)) counts.set(target, (counts.get(target) ?? 0) + 1);
466
461
  }
467
462
  return counts;
468
463
  }
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.43",
4
+ "version": "0.1.0-rc.44",
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.43"
36
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.44"
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",
43
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.43"
42
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.44",
43
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.44"
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.43",
49
- "@lmzhen/dsh-evolution-io": "^0.1.0-rc.43",
50
- "@lmzhen/dsh-evolution-state": "^0.1.0-rc.43"
48
+ "@lmzhen/dsh-evolution-core": "^0.1.0-rc.44",
49
+ "@lmzhen/dsh-evolution-io": "^0.1.0-rc.44",
50
+ "@lmzhen/dsh-evolution-state": "^0.1.0-rc.44"
51
51
  }
52
52
  }