@lmzhen/dsh-evolution-curator 0.13.6 → 0.14.1

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_BOOT_GRACE_SECONDS, DEFAULT_CURATOR_INTERVAL_HOURS, DEFAULT_CURATOR_MODEL, DEFAULT_CURATOR_REVIEW_MAX_TOKENS, DEFAULT_HEALTH_THRESHOLDS, DEFAULT_MIN_IDLE_HOURS, DEFAULT_SKILL_LIMITS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, INSTANCE_KEYS, MAX_TIMER_DELAY_MS, SKILL_NAME_RE, buildCuratorRunReport, claimInstance, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, evolutionHome, evolutionIoAdapter, foldCuratorFields, installParamSection, isPresent, isUnknown, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, newSkillLibrary, paramNamespace, parseCuratorNominations, parseFrontmatter, policyStageLimits, probeList, probeMtime, readNumberParam, relatedSkillNames, releaseInstance, renderCuratorReportMarkdown, transactIo, updateSuppressedNames, usageObserved, versionTarget } 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_SKILL_LIMITS, DEFAULT_STALE_AFTER_DAYS, EvolutionGateSet, INSTANCE_KEYS, MAX_TIMER_DELAY_MS, SKILL_NAME_RE, buildCuratorRunReport, claimInstance, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, entryTarget, evolutionHome, evolutionIoAdapter, foldCuratorFields, installParamSection, isPresent, isUnknown, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, newSkillLibrary, paramNamespace, parseCuratorNominations, parseFrontmatter, policyStageLimits, probeList, probeMtime, readNumberParam, relatedSkillNames, releaseInstance, renderCuratorReportMarkdown, transactIo, 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.
@@ -1378,9 +1378,9 @@ var EvolutionCurator = class extends Service {
1378
1378
  };
1379
1379
  }
1380
1380
  const entry = versions.find((candidate) => candidate.v === target);
1381
- if (entry !== void 0 && versionTarget(entry.action) === "support") return {
1381
+ if (entry !== void 0 && entryTarget(entry, versions) === "support") return {
1382
1382
  ok: false,
1383
- message: `Version v${target} of "${name}" was written by '${entry.action}' and holds a SUPPORT FILE's bytes, not this skill's SKILL.md — undo restores the body only. The recorded bytes stay in the history store; copy the blob back over that file to restore them.`
1383
+ message: `Version v${target} of "${name}" ${entry.path === void 0 ? `was written by '${entry.action}' and` : `was written by '${entry.action}' to '${entry.path}' and`} holds a SUPPORT FILE's bytes, not this skill's SKILL.md — undo restores the body only. The recorded bytes stay in the history store; copy the blob back over that file to restore them.`
1384
1384
  };
1385
1385
  const content = await this.skills.readVersion(name, target);
1386
1386
  if (content === null) return {
@@ -1407,16 +1407,18 @@ var EvolutionCurator = class extends Service {
1407
1407
  * tree): the newest version whose content differs from the live bytes.
1408
1408
  *
1409
1409
  * Support-file versions are skipped in both branches: undo restores the skill BODY, and a version
1410
- * holding a support file's bytes is not a state the body was ever in (0.10.1). */
1410
+ * holding a support file's bytes is not a state the body was ever in (0.10.1). The skip asks core's
1411
+ * entry-level classification, so a support write's baseline is skipped too — its action says only
1412
+ * "this is what was there". */
1411
1413
  previousVersionOf(versions, liveHash) {
1412
1414
  const live = [...versions].reverse().find((entry) => entry.hash === liveHash);
1413
1415
  if (live?.beforeHash !== void 0) {
1414
1416
  const predecessor = [...versions].reverse().find((entry) => entry.hash === live.beforeHash);
1415
- if (predecessor !== void 0 && versionTarget(predecessor.action) !== "support") return predecessor.v;
1417
+ if (predecessor !== void 0 && entryTarget(predecessor, versions) !== "support") return predecessor.v;
1416
1418
  }
1417
1419
  for (let index = versions.length - 1; index >= 0; index -= 1) {
1418
1420
  const entry = versions[index];
1419
- if (entry !== void 0 && entry.hash !== liveHash && versionTarget(entry.action) !== "support") return entry.v;
1421
+ if (entry !== void 0 && entry.hash !== liveHash && entryTarget(entry, versions) !== "support") return entry.v;
1420
1422
  }
1421
1423
  }
1422
1424
  };
@@ -449,7 +449,9 @@ export declare class EvolutionCurator extends Service {
449
449
  * tree): the newest version whose content differs from the live bytes.
450
450
  *
451
451
  * Support-file versions are skipped in both branches: undo restores the skill BODY, and a version
452
- * holding a support file's bytes is not a state the body was ever in (0.10.1). */
452
+ * holding a support file's bytes is not a state the body was ever in (0.10.1). The skip asks core's
453
+ * entry-level classification, so a support write's baseline is skipped too — its action says only
454
+ * "this is what was there". */
453
455
  private previousVersionOf;
454
456
  }
455
457
  export default EvolutionCurator;
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.13.6",
4
+ "version": "0.14.1",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,20 +27,20 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.1",
30
- "@lmzhen/dsh-evolution-core": "^0.13.6"
30
+ "@lmzhen/dsh-evolution-core": "^0.14.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.1",
34
34
  "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
35
35
  "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
36
- "@lmzhen/dsh-evolution-io": "^0.13.6",
37
- "@lmzhen/dsh-evolution-state": "^0.13.6"
36
+ "@lmzhen/dsh-evolution-io": "^0.14.1",
37
+ "@lmzhen/dsh-evolution-state": "^0.14.1"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@deepseek-ai/dsh-llm": "^0.1.5-rc.2",
41
41
  "@deepseek-ai/dsh-session": "^0.1.5-rc.2",
42
- "@lmzhen/dsh-evolution-core": "^0.13.6",
43
- "@lmzhen/dsh-evolution-io": "^0.13.6",
44
- "@lmzhen/dsh-evolution-state": "^0.13.6"
42
+ "@lmzhen/dsh-evolution-core": "^0.14.1",
43
+ "@lmzhen/dsh-evolution-io": "^0.14.1",
44
+ "@lmzhen/dsh-evolution-state": "^0.14.1"
45
45
  }
46
46
  }