@lmzhen/dsh-evolution-curator 0.32.5 → 0.33.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 (3) hide show
  1. package/README.md +8 -14
  2. package/lib/index.js +13 -3
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -1,23 +1,17 @@
1
1
  # @lmzhen/dsh-evolution-curator
2
2
 
3
- > 自动整理技能库:标 stale、归档、合并近重复。
3
+ Skill lifecycle service for stale detection, archiving, optional LLM nomination, snapshots, history, restore, and unit undo.
4
4
 
5
- ## 你会看到
5
+ Use `/evolution curator status`, `report`, or `run` for inspection and manual operation. Archive/restore/history/undo commands operate on the corresponding stored records; deleting a skill through curation means archiving, not hard deletion.
6
6
 
7
- `/evolution curator status/report/run`;归档/恢复/历史/撤销。
7
+ ## Defaults and scheduling
8
8
 
9
- ## 什么时候会用到
9
+ The plugin and `autoStart` default to enabled. An hourly timer checks due-ness; `curatorIntervalHours` defaults to 168 hours. Pause/resume overrides the startup schedule until that persisted override is cleared.
10
10
 
11
- 技能变多、长期不用、出现重复时。
11
+ `staleAfterDays` defaults to 30 and `archiveAfterDays` to 90, with archive required to be at least the stale threshold. The optional `llmReview` pass defaults off. Idle activity gates, protected/referenced names, unmanaged/builtin scope, health thresholds, and model limits are listed in [PARAMETERS.md](../PARAMETERS.md).
12
12
 
13
- ## 默认 / 前提
13
+ `root` must point at the same skill tree used by the catalog and write tools. `intervalHours` remains a readable deprecated alias of `curatorIntervalHours`; writes to the old name are refused (G0/S0.3).
14
14
 
15
- 默认定期跑;可暂停。
15
+ ## Failure boundary
16
16
 
17
- ## 边界
18
-
19
- 先快照,删除是归档;不会硬删。
20
-
21
- ## 维护者参考:参数别名(G0/S0.3)
22
-
23
- `intervalHours` → `curatorIntervalHours`。旧名仍可读,写入会拒绝。
17
+ A mutating pass takes snapshots and supports explicit restore/undo. That is not a promise that every failed run automatically rolls back the whole tree; inspect the run report and use the explicit recovery operation when needed. Notifications may be incomplete, so an archived skill can disappear from the catalog without a conversation notice.
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_HEALTH_THRESHOLDS, 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, blobPath, buildCuratorRunReport, claimInstance, clampOnce, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, entryTarget, eventsFile, evolutionHome, evolutionIoAdapter, executeUnitUndo, foldCuratorFields, historyIndexFile, isPresent, isUnknown, lintSkill, liveBool, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, newSkillLibrary, paramRowId, parseCuratorNominations, parseFrontmatter, parseHistoryIndex, pickWithPolicy, planUnitUndoAcross, policyStageLimits, probeList, probeText, readEvolutionEvents, readNumberParam, registerOwnerSettings, relatedSkillNames, releaseInstance, renderCuratorReportMarkdown, reportTime, reportsSweepLockTarget, resolveUnitMembers, sessionLastEventTime, staleRouteStubs, sweepReports, transactIo, unitMembersAreComplete, unwrapLive, updateSuppressedNames, usageObserved, userSetKeys, verifyPromptBundle, withTreeWrite, writeProposalReport } from "@lmzhen/dsh-evolution-core";
1
2
  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_HEALTH_THRESHOLDS, 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, blobPath, buildCuratorRunReport, claimInstance, clampOnce, clampedNumber, computeDedupGroups, computeLifecycleTransitions, computePrefixClusters, computeQualityScores, computeScopeView, contentHash, emptyRecord, entryTarget, eventsFile, evolutionHome, evolutionIoAdapter, executeUnitUndo, foldCuratorFields, historyIndexFile, isPresent, isUnknown, lintSkill, liveBool, loadSuppressedNames, loadUsage, markerEntryName, mutateUsage, newSkillLibrary, paramRowId, parseCuratorNominations, parseFrontmatter, parseHistoryIndex, pickWithPolicy, planUnitUndoAcross, policyStageLimits, probeList, probeText, readEvolutionEvents, readNumberParam, relatedSkillNames, releaseInstance, renderCuratorReportMarkdown, reportTime, reportsSweepLockTarget, resolveUnitMembers, sessionLastEventTime, staleRouteStubs, sweepReports, transactIo, unitMembersAreComplete, 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 { BlockAssembler, createUserMessage } from "@deepseek-ai/dsh-llm";
@@ -88,7 +88,7 @@ function referencedSkillNames(contents) {
88
88
  }
89
89
  return referencedBy;
90
90
  }
91
- var EvolutionCurator = class extends Service {
91
+ var EvolutionCurator = class EvolutionCurator extends Service {
92
92
  static inject = ["evolutionIo"];
93
93
  static Config = z.object({
94
94
  root: z.string().default(""),
@@ -172,6 +172,7 @@ var EvolutionCurator = class extends Service {
172
172
  instanceOwner = `evolution-curator[${process.pid}:${randomUUID().slice(0, 8)}]`;
173
173
  constructor(ctx, config = {}) {
174
174
  super(ctx, "evolutionCurator");
175
+ registerOwnerSettings(this.ctx, "evolution-curator", EvolutionCurator.Config);
175
176
  ctx.inject(["settings"], (injected) => {
176
177
  const settings = injected.settings;
177
178
  if (typeof settings?.configure !== "function") return;
@@ -1350,7 +1351,16 @@ var EvolutionCurator = class extends Service {
1350
1351
  const usage = await loadUsage(this.skills.root, this.io);
1351
1352
  const observed = usageObserved(usage);
1352
1353
  const rows = [];
1353
- for (const summary of await this.skills.model.list()) {
1354
+ let summaries;
1355
+ try {
1356
+ summaries = await this.skills.model.list();
1357
+ } catch {
1358
+ summaries = (await this.skills.treeNames()).map((name) => ({
1359
+ name,
1360
+ protectedBy: null
1361
+ }));
1362
+ }
1363
+ for (const summary of summaries) {
1354
1364
  const record = usage.get(summary.name);
1355
1365
  const assessment = await this.skills.assessHealth(summary.name, thresholds, observed && record ? {
1356
1366
  patchCount: record.patch_count,
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.32.5",
4
+ "version": "0.33.0",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -27,21 +27,21 @@
27
27
  "license": "MIT",
28
28
  "dependencies": {
29
29
  "@deepseek-ai/schemastery": "^3.18.5",
30
- "@lmzhen/dsh-evolution-core": "^0.32.5"
30
+ "@lmzhen/dsh-evolution-core": "^0.33.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.5",
34
34
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
35
35
  "@deepseek-ai/dsh-session": "^0.2.1-rc.2",
36
- "@lmzhen/dsh-evolution-io": "^0.32.5",
37
- "@lmzhen/dsh-evolution-state": "^0.32.5"
36
+ "@lmzhen/dsh-evolution-io": "^0.33.0",
37
+ "@lmzhen/dsh-evolution-state": "^0.33.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@deepseek-ai/dsh-llm": "^0.2.1-rc.2",
41
41
  "@deepseek-ai/dsh-session": "^0.2.1-rc.2",
42
- "@lmzhen/dsh-evolution-core": "^0.32.5",
43
- "@lmzhen/dsh-evolution-io": "^0.32.5",
44
- "@lmzhen/dsh-evolution-state": "^0.32.5"
42
+ "@lmzhen/dsh-evolution-core": "^0.33.0",
43
+ "@lmzhen/dsh-evolution-io": "^0.33.0",
44
+ "@lmzhen/dsh-evolution-state": "^0.33.0"
45
45
  },
46
46
  "engines": {
47
47
  "dsh": ">=0.2.1-rc.2 <0.2.2-0"