@lmzhen/dsh-evolution-curator 0.3.67 → 0.3.68

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 +11 -3
  2. package/package.json +7 -7
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_BOOT_GRACE_SECONDS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_CURATOR_REVIEW_MAX_TOKENS, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, SKILL_NAME_RE, SkillLibrary, buildCuratorRunReport, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, foldCuratorFields, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, parseCuratorNominations, parseFrontmatter, relatedSkillNames, renderCuratorReportMarkdown, resolveSkillsRoot, updateSuppressedNames, usageObserved } from "@lmzhen/dsh-evolution-core";
6
+ import { CURATOR_DRY_RUN_BANNER, CURATOR_PROMPT, DEFAULT_ARCHIVE_AFTER_DAYS, DEFAULT_CURATOR_BOOT_GRACE_SECONDS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_CURATOR_MODEL, DEFAULT_CURATOR_REVIEW_MAX_TOKENS, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, MAX_TIMER_DELAY_MS, SKILL_NAME_RE, SkillLibrary, buildCuratorRunReport, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, emptyRecord, evolutionHome, evolutionIoAdapter, foldCuratorFields, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, parseCuratorNominations, parseFrontmatter, relatedSkillNames, renderCuratorReportMarkdown, resolveSkillsRoot, updateSuppressedNames, usageObserved } 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.
@@ -17,7 +17,6 @@ const DEFAULT_QUALITY_WARN_STALE_AFTER_DAYS = 7;
17
17
  * 120s matches the review subagent default; the 32-bit ceiling is Node's
18
18
  * timer-delay limit (`AbortSignal.timeout` throws above it). */
19
19
  const DEFAULT_CURATOR_REVIEW_TIMEOUT_MS = 12e4;
20
- const MAX_TIMER_DELAY_MS = 2147483647;
21
20
  /**
22
21
  * Block LLM-nominated consolidations that would touch a gate-protected name:
23
22
  * exclude / referenced / suppressed skills must never merge (neither as the
@@ -255,7 +254,7 @@ var EvolutionCurator = class extends Service {
255
254
  if (candidates.length === 0) return empty;
256
255
  const llm = this.ctx.get("llm");
257
256
  if (!llm) return empty;
258
- const model = this.ctx.get("evolutionPolicy")?.get()?.curatorModel ?? "deepseek-v4-pro";
257
+ const model = this.ctx.get("evolutionPolicy")?.get()?.curatorModel ?? DEFAULT_CURATOR_MODEL;
259
258
  const clusters = computePrefixClusters(candidates);
260
259
  const clusterLines = clusters.length === 0 ? ["Prefix clusters observed in the candidate list: (none)"] : ["Prefix clusters observed in the candidate list (orientation only — verify against the names above; you may also flag additional clusters):", ...clusters.map((cluster) => `- '${cluster.key}': ${cluster.members.join(", ")}`)];
261
260
  const prompt = [
@@ -566,6 +565,15 @@ var EvolutionCurator = class extends Service {
566
565
  reason: errors.find((item) => item.startsWith(`${name}:`))?.slice(name.length + 2) ?? "unknown"
567
566
  };
568
567
  }),
568
+ ...(() => {
569
+ const attributed = new Set([...archiveCandidates, ...gatedNominations.consolidations.map((item) => item.from)]);
570
+ const loose = errors.filter((error) => ![...attributed].some((name) => error.startsWith(`${name}:`)));
571
+ const abort = loose.find((error) => error.startsWith("run aborted"));
572
+ return {
573
+ ...abort === void 0 ? {} : { aborted: abort.slice(13) },
574
+ ...loose.length === 0 ? {} : { unattributed: loose }
575
+ };
576
+ })(),
569
577
  consolidated,
570
578
  ...snapshotPath === void 0 ? {} : { snapshotPath },
571
579
  llmReviewEnabled: this.llmReview,
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.3.67",
4
+ "version": "0.3.68",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -31,20 +31,20 @@
31
31
  "license": "MIT",
32
32
  "dependencies": {
33
33
  "@deepseek-ai/schemastery": "^3.18.1",
34
- "@lmzhen/dsh-evolution-core": "^0.3.67"
34
+ "@lmzhen/dsh-evolution-core": "^0.3.68"
35
35
  },
36
36
  "peerDependencies": {
37
37
  "@deepseek-ai/cordis": "^4.0.1",
38
38
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
39
39
  "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
40
- "@lmzhen/dsh-evolution-io": "^0.3.67",
41
- "@lmzhen/dsh-evolution-state": "^0.3.67"
40
+ "@lmzhen/dsh-evolution-io": "^0.3.68",
41
+ "@lmzhen/dsh-evolution-state": "^0.3.68"
42
42
  },
43
43
  "devDependencies": {
44
44
  "@deepseek-ai/dsh-invariants": "^0.1.1-rc.2",
45
45
  "@deepseek-ai/dsh-llm": "^0.1.1-rc.2",
46
- "@lmzhen/dsh-evolution-core": "^0.3.67",
47
- "@lmzhen/dsh-evolution-io": "^0.3.67",
48
- "@lmzhen/dsh-evolution-state": "^0.3.67"
46
+ "@lmzhen/dsh-evolution-core": "^0.3.68",
47
+ "@lmzhen/dsh-evolution-io": "^0.3.68",
48
+ "@lmzhen/dsh-evolution-state": "^0.3.68"
49
49
  }
50
50
  }