@lmzhen/dsh-evolution-curator 0.41.0 → 0.42.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.
package/lib/index.js CHANGED
@@ -1,16 +1,12 @@
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
+ 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
2
  import { Service } from "@deepseek-ai/cordis";
3
3
  import { randomUUID } from "node:crypto";
4
4
  import { dirname, join } from "node:path";
5
- import { createUserMessage } from "@deepseek-ai/dsh-llm";
5
+ import { createUserMessage } from "@lmzhen/dsh-evolution-core/platform";
6
6
  import z from "@deepseek-ai/schemastery";
7
+ import { DEFAULT_HEALTH_THRESHOLDS, blobPath, entryTarget, historyIndexFile, lintSkill, markerEntryName, newSkillLibrary, parseFrontmatter, parseHistoryIndex, relatedSkillNames } from "@lmzhen/dsh-evolution-core/skills";
8
+ import { executeUnitUndo, planUnitUndoAcross, resolveUnitMembers, staleRouteStubs, unitMembersAreComplete } from "@lmzhen/dsh-evolution-core/write";
7
9
  //#region lib/types/unit-undo-plan.js
8
- /**
9
- * G3a: the pure half of `undoUnit` — deciding WHAT to write back, with no io and no host.
10
- *
11
- * The slot rules live in core (`planUnitUndoAcross`); this adapter keeps the curator’s
12
- * single-skill call shape and splits the body op out of the support ops.
13
- */
14
10
  /** The newest unit the index carries, or undefined when no entry has a unit id yet. */
15
11
  function newestUnitId(versions) {
16
12
  for (let i = versions.length - 1; i >= 0; i -= 1) {
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { Context, Service } from '@deepseek-ai/cordis';
6
6
  import type { Volatile } from '@deepseek-ai/cordis';
7
- import type { ContextFormed } from '@deepseek-ai/dsh-llm';
7
+ import type { ContextFormed } from '@lmzhen/dsh-evolution-core/platform';
8
8
  declare module '@deepseek-ai/dsh-llm' {
9
9
  interface MessageSourceMap {
10
10
  'evolution-curator': {
@@ -13,9 +13,12 @@ declare module '@deepseek-ai/dsh-llm' {
13
13
  }
14
14
  }
15
15
  import z from '@deepseek-ai/schemastery';
16
- import { EvolutionGateSet, type SkillLibrary } from '@lmzhen/dsh-evolution-core';
17
- import { type CuratorConsolidation, type CuratorNominations, type CuratorRunReport, type ScopeView, type SkillActionResult, type SkillHealthVerdict } from '@lmzhen/dsh-evolution-core';
18
- import type { SkillVersion } from '@lmzhen/dsh-evolution-core';
16
+ import { EvolutionGateSet } from '@lmzhen/dsh-evolution-core';
17
+ import { type SkillLibrary } from '@lmzhen/dsh-evolution-core/skills';
18
+ import { type CuratorConsolidation, type CuratorNominations, type CuratorRunReport, type ScopeView } from '@lmzhen/dsh-evolution-core';
19
+ import { type SkillHealthVerdict } from '@lmzhen/dsh-evolution-core/skills';
20
+ import { type SkillActionResult } from '@lmzhen/dsh-evolution-core/skills';
21
+ import type { SkillVersion } from '@lmzhen/dsh-evolution-core/skills';
19
22
  import type { CuratorStateRecord } from '@lmzhen/dsh-evolution-state';
20
23
  /** B-10 (v18): the optional LLM nomination pass gets its own timeout so a
21
24
  * hung/unresponsive provider cannot hold the control-plane mutex forever
@@ -118,8 +121,8 @@ export interface CuratorSettings {
118
121
  * @param value - the resolved section the platform hands the owner.
119
122
  */
120
123
  export declare function validateCuratorSettings(value: Pick<CuratorSettings, 'archiveAfterDays' | 'staleAfterDays'>): void;
121
- /** Outcome of one curator run pass. */
122
- export interface CuratorRunOutcome {
124
+ /** Domain result of one curator pass; lifecycle outcome lives in the contract. */
125
+ export interface CuratorRunResult {
123
126
  stale: string[];
124
127
  archived: string[];
125
128
  errors: string[];
@@ -385,7 +388,7 @@ export declare class EvolutionCurator extends Service {
385
388
  run(options?: {
386
389
  ignoreGates?: boolean;
387
390
  dryRun?: boolean;
388
- }): Promise<CuratorRunOutcome>;
391
+ }): Promise<CuratorRunResult>;
389
392
  /**
390
393
  * P1 (v16): the control-plane mutex — ONE promise chain serializing run(),
391
394
  * restore() and consolidate(). Replaces the v15 draft (`running` flag +
@@ -4,7 +4,7 @@
4
4
  * The slot rules live in core (`planUnitUndoAcross`); this adapter keeps the curator’s
5
5
  * single-skill call shape and splits the body op out of the support ops.
6
6
  */
7
- import { type SkillVersion } from '@lmzhen/dsh-evolution-core';
7
+ import { type SkillVersion } from '@lmzhen/dsh-evolution-core/skills';
8
8
  /** One support path’s action inside a unit undo. */
9
9
  export interface UnitUndoOp {
10
10
  /** True when the unit created the file (no pre-unit bytes) ⇒ remove it, anchored. */
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.41.0",
4
+ "version": "0.42.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.41.0"
30
+ "@lmzhen/dsh-evolution-core": "^0.42.0"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@deepseek-ai/cordis": "^4.0.5",
34
34
  "@deepseek-ai/dsh-llm": "^0.2.2-rc.0",
35
35
  "@deepseek-ai/dsh-session": "^0.2.2-rc.0",
36
- "@lmzhen/dsh-evolution-io": "^0.41.0",
37
- "@lmzhen/dsh-evolution-state": "^0.41.0"
36
+ "@lmzhen/dsh-evolution-io": "^0.42.0",
37
+ "@lmzhen/dsh-evolution-state": "^0.42.0"
38
38
  },
39
39
  "devDependencies": {
40
40
  "@deepseek-ai/dsh-llm": "^0.2.2-rc.0",
41
41
  "@deepseek-ai/dsh-session": "^0.2.2-rc.0",
42
- "@lmzhen/dsh-evolution-core": "^0.41.0",
43
- "@lmzhen/dsh-evolution-io": "^0.41.0",
44
- "@lmzhen/dsh-evolution-state": "^0.41.0"
42
+ "@lmzhen/dsh-evolution-core": "^0.42.0",
43
+ "@lmzhen/dsh-evolution-io": "^0.42.0",
44
+ "@lmzhen/dsh-evolution-state": "^0.42.0"
45
45
  },
46
46
  "engines": {
47
47
  "dsh": ">=0.2.2-rc.0 <0.2.3-0"