@lmzhen/dsh-evolution-curator 0.44.0 → 0.45.0

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 +3 -13
  2. package/package.json +5 -7
package/lib/index.js CHANGED
@@ -1,5 +1,5 @@
1
- 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_MIN_IDLE_HOURS, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_LIMITS, DEFAULT_STALE_AFTER_DAYS, EXTRACT_PROMPT_HASH, EvolutionGateSet, INSTANCE_KEYS, MAX_TIMER_DELAY_MS, PROMPT_BUNDLE, SKILL_NAME_RE, acquireTreeWriteLock, authorityFrom, buildCuratorRunReport, claimInstance, clampOnce, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, eventsFile, evolutionHome, evolutionIoAdapter, foldCuratorFields, isPresent, isUnknown, liveBool, loadSuppressedNames, loadUsage, mutateUsage, paramRowId, parseCuratorNominations, pickWithPolicy, policyStageLimits, probeList, probeText, readEvolutionEvents, readNumberParam, registerOwnerSettings, releaseInstance, renderCuratorReportMarkdown, reportTime, reportsSweepLockTarget, sessionLastEventTime, sweepReports, transactIo, unwrapLive, updateSuppressedNames, usageObserved, userSetKeys, verifyPromptBundle, withTreeWrite, writeProposalReport } from "@lmzhen/dsh-evolution-core";
2
1
  import { Service } from "@deepseek-ai/cordis";
2
+ 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_MIN_IDLE_HOURS, DEFAULT_REVIEW_TIMEOUT_MS, DEFAULT_SKILL_LIMITS, DEFAULT_STALE_AFTER_DAYS, EXTRACT_PROMPT_HASH, EvolutionGateSet, HomeAuthority, INSTANCE_KEYS, MAX_TIMER_DELAY_MS, PROMPT_BUNDLE, SKILL_NAME_RE, authorityFrom, buildCuratorRunReport, claimInstance, clampOnce, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, eventsFile, evolutionHome, evolutionIoAdapter, foldCuratorFields, isPresent, isUnknown, liveBool, loadSuppressedNames, loadUsage, mutateUsage, paramRowId, parseCuratorNominations, pickWithPolicy, policyStageLimits, probeList, probeText, readEvolutionEvents, readNumberParam, releaseInstance, renderCuratorReportMarkdown, reportTime, reportsSweepLockTarget, sessionLastEventTime, sweepReports, transactIo, unwrapLive, updateSuppressedNames, usageObserved, userSetKeys, verifyPromptBundle, withTreeWrite, writeProposalReport } from "@lmzhen/dsh-evolution-core";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { dirname, join } from "node:path";
5
5
  import { createUserMessage } from "@lmzhen/dsh-evolution-core/platform";
@@ -84,7 +84,7 @@ function referencedSkillNames(contents) {
84
84
  }
85
85
  return referencedBy;
86
86
  }
87
- var EvolutionCurator = class EvolutionCurator extends Service {
87
+ var EvolutionCurator = class extends Service {
88
88
  static inject = ["evolutionIo"];
89
89
  static Config = z.object({
90
90
  root: z.string().default(""),
@@ -169,7 +169,6 @@ var EvolutionCurator = class EvolutionCurator extends Service {
169
169
  instanceOwner = `evolution-curator[${process.pid}:${randomUUID().slice(0, 8)}]`;
170
170
  constructor(ctx, config = {}) {
171
171
  super(ctx, "evolutionCurator");
172
- registerOwnerSettings(this.ctx, "evolution-curator", EvolutionCurator.Config);
173
172
  ctx.inject(["settings"], (injected) => {
174
173
  const settings = injected.settings;
175
174
  if (typeof settings?.configure !== "function") return;
@@ -647,16 +646,7 @@ var EvolutionCurator = class EvolutionCurator extends Service {
647
646
  /** Cross-process tree lock shared with merge runs; curator mutations take it only around apply. */
648
647
  async withMergeTreeLock(body) {
649
648
  if (this.homeFence !== void 0) return await this.homeFence.run(body);
650
- const acquired = await acquireTreeWriteLock({
651
- io: this.io,
652
- home: evolutionHome()
653
- });
654
- if (!acquired.ok) throw new Error("evolution-curator: merge tree lock unavailable (" + acquired.reason + ")" + (acquired.holder === void 0 ? "" : "; holder pid " + String(acquired.holder.pid)));
655
- try {
656
- return await body();
657
- } finally {
658
- await acquired.lock.release();
659
- }
649
+ return await new HomeAuthority({ home: evolutionHome() }).runExclusive("tree", body);
660
650
  }
661
651
  acquireMutex() {
662
652
  this.mutexDepth += 1;
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.44.0",
4
+ "version": "0.45.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -29,21 +29,19 @@
29
29
  "license": "MIT",
30
30
  "dependencies": {
31
31
  "@deepseek-ai/schemastery": "^3.18.5",
32
- "@lmzhen/dsh-evolution-core": "^0.44.0"
32
+ "@lmzhen/dsh-evolution-core": "^0.45.0"
33
33
  },
34
34
  "peerDependencies": {
35
35
  "@deepseek-ai/cordis": "^4.0.5",
36
36
  "@deepseek-ai/dsh-llm": "^0.2.2-rc.0",
37
37
  "@deepseek-ai/dsh-session": "^0.2.2-rc.0",
38
- "@lmzhen/dsh-evolution-io": "^0.44.0",
39
- "@lmzhen/dsh-evolution-state": "^0.44.0"
38
+ "@lmzhen/dsh-evolution-state": "^0.45.0"
40
39
  },
41
40
  "devDependencies": {
42
41
  "@deepseek-ai/dsh-llm": "^0.2.2-rc.0",
43
42
  "@deepseek-ai/dsh-session": "^0.2.2-rc.0",
44
- "@lmzhen/dsh-evolution-core": "^0.44.0",
45
- "@lmzhen/dsh-evolution-io": "^0.44.0",
46
- "@lmzhen/dsh-evolution-state": "^0.44.0"
43
+ "@lmzhen/dsh-evolution-core": "^0.45.0",
44
+ "@lmzhen/dsh-evolution-state": "^0.45.0"
47
45
  },
48
46
  "engines": {
49
47
  "dsh": ">=0.2.2-rc.0 <0.2.3-0"