@lmzhen/dsh-evolution-merge 0.32.4 → 0.32.6

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/README.md CHANGED
@@ -1,53 +1,21 @@
1
1
  # @lmzhen/dsh-evolution-merge
2
2
 
3
- Skill auto-merge host surface: candidate screening through the vendored pipeline,
4
- two-round child authoring, per-pair staging, pending approval, commit receipts and
5
- unit undo.
3
+ Skill merge service with candidate screening, two-round authoring, pending/skipped queues, staged model work, commit orchestration, recovery, and undo.
6
4
 
7
- > **Screening pipeline freeze:** the merge-engine screening pipeline ①–⑤ is specially
8
- > tuned. Its substantive flow (stage order, inputs/outputs, models, weights, thresholds,
9
- > filters, scoring, decisions, and any selection policy affecting candidate set/order)
10
- > must not change. Only packaging, loading, adapters, error boundaries, diagnostics and
11
- > tests may change, with parity evidence proving identical screening output.
5
+ Use `/evolution merge …` for operations. `merge_stage` is the model-facing staging tool. The sidebar supplied by `evolution-merge-ui` is read-only and copies commands rather than executing a merge itself.
12
6
 
13
- ## Surface
7
+ ## Control axes
14
8
 
15
- - `/evolution merge <subcommand>` — canonical command.
16
- - `/merge <subcommand>` — compatibility alias; registered through 0.30, deprecated in 0.31, removed in 0.32.
17
- - Four read-only routes under `/api/dsh-evolution/merge/*`.
9
+ | Setting | Default | Meaning |
10
+ |---|---|---|
11
+ | `mergeApproval` | `false` | Do not pause after round 1 for merge-specific approval. |
12
+ | `mergeSkippedTtlDays` | `0` | Skipped pairs never expire automatically. |
13
+ | `mergeRunTimeoutMinutes` | `0` | No overall run timeout. |
14
+ | `mergePairTimeoutMinutes` | `15` | Bound one pair round. |
15
+ | `mergeModelsRoot` | empty | Must be configured to the local model root for the shipped engine path. |
18
16
 
19
- ```text
20
- /evolution merge scan | pair [--force] <a> <b> | candidates [--retry <id>] |
21
- status [id] | pending [--expired] | report [id] |
22
- approve <id> | reject <id> | resume [id] [--clear <id>] [--retry] |
23
- skipped [--restore <id>] | doctor | runs | cancel [id] | undo <target> --run <id> |
24
- reconcile
25
- ```
17
+ For scan, the model root contains `potion-multilingual-128M-int8` and `potion-multilingual-128M-pca64-int8`. Missing required models fail explicitly; this package does not silently provision them. Ordinary pair skips this local candidate-screening dependency, but its round 1 and authoring still require the child-session model channel rather than scan's stub fallback.
26
18
 
27
- `/evolution merge` help lists 19 read/write surface commands plus the `reconcile`
28
- maintenance command; `doctor` and `reconcile` stay off the frozen CommandSurface v1.
19
+ Merge approval is independent of the ordinary memory/skill approval queue. `platformWrite` is accepted as a fallback parameter, overridden by the host approval capability when available, and included in run reports and snapshots; it is not an admission check in this package. Actual write execution depends on host capability preparation and the merge state machine; neither that projected field nor `mergeApproval:false` proves that every environment permits writes.
29
20
 
30
- ## Models
31
-
32
- The engine needs local `potion-multilingual-128M-int8` and
33
- `potion-multilingual-128M-pca64-int8` directories under `mergeModelsRoot`.
34
- No auto provisioning; missing models fail loud and `/evolution doctor` warns.
35
- `SKILL_MERGE_MODELS_ROOT` is an engine-internal test/CLI knob, not a host
36
- configuration surface.
37
-
38
- ## Read-only panel
39
-
40
- The browser panel is `@lmzhen/dsh-evolution-merge-ui`, mounted by the
41
- `all` bundle only. The host row is mounted by `all`, `host` and `preset`.
42
- ## Reconcile
43
-
44
- `/evolution merge reconcile` is the one writer of row-state convergence: skipped-TTL
45
- expiry, approved→fuse continuation when the stage tree is usable, stage-lost demotion to a
46
- retryable fuse row, and source-gone clearing (only when the live library is non-empty).
47
- Every run writes `<home>/merge/reconcile.json`; `/evolution merge doctor` and the global
48
- `/evolution doctor` merge line consume that report. Snapshots and the four GET routes
49
- derive (for example an expired stage) but never persist.
50
-
51
- Runtime command failures use three lines — `code:` (with stage/run id), `hint:`, `next:`.
52
- A missing parent run answers `merge-parent-required` (with an E-305 hint); an invocation
53
- that carried no agent answers the typed `no-agent` code.
21
+ Four read-only host routes expose view, rows, body, and history data. `merge/run` and `merge/runs` are declared but not implemented. Committed merges have durable receipts for undo; recovery and reconcile report blocked or interrupted state rather than hiding it.
package/lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { dirname, join } from "node:path";
2
2
  import z from "@deepseek-ai/schemastery";
3
3
  import { pairKeyOf, screen, selectCandidates } from "@lmzhen/dsh-evolution-merge-engine";
4
- import { DEFAULT_SKILL_LIMITS, SkillLibrary, UnitTransactions, authorityFrom, contentHash, createSubagentChannel, errorText, evolutionHome, evolutionIoAdapter, executeUnitUndo, isPresent, isProcessAlive, newRunRegistry, newSkillLibrary, parseFrontmatter, planUnitUndoAcross, policyStageLimits, probeAbsent, probeList, probePresent, probeText, probeUnknown, readTreeLock, readUnitEvidence, readUnitJournal, reportsSweepLockTarget, revisionAnchorOf, revisionFingerprint, revisionSupportDigest, runsFile, scanContentThreats, skillLibraryUnitBackend, supportRefs, sweepReports, transactIo, validateFrontmatter, validateSupportPath } from "@lmzhen/dsh-evolution-core";
4
+ import { DEFAULT_SKILL_LIMITS, SkillLibrary, UnitTransactions, authorityFrom, contentHash, createSubagentChannel, errorText, evolutionHome, evolutionIoAdapter, executeUnitUndo, isPresent, isProcessAlive, newRunRegistry, newSkillLibrary, parseFrontmatter, planUnitUndoAcross, policyStageLimits, probeAbsent, probeList, probePresent, probeText, probeUnknown, readTreeLock, readUnitEvidence, readUnitJournal, registerOwnerSettings, reportsSweepLockTarget, revisionAnchorOf, revisionFingerprint, revisionSupportDigest, runsFile, scanContentThreats, skillLibraryUnitBackend, supportRefs, sweepReports, transactIo, validateFrontmatter, validateSupportPath } from "@lmzhen/dsh-evolution-core";
5
5
  import { HOST_ROUTES, json, methodNotAllowed, registerHostRoutes } from "@lmzhen/dsh-evolution-core/http-routes";
6
6
  import { createHash, randomUUID } from "node:crypto";
7
7
  import { chmod, mkdir, open, readFile, stat, unlink } from "node:fs/promises";
@@ -10543,6 +10543,7 @@ function formatUnreadyError() {
10543
10543
  }
10544
10544
  const inject = [];
10545
10545
  function apply(ctx, rawConfig = {}) {
10546
+ registerOwnerSettings(ctx, "evolution-merge", Config);
10546
10547
  configureMergePresentation(ctx);
10547
10548
  let params = resolveMergeParams(rawConfig);
10548
10549
  let mergeRun;
@@ -5,6 +5,7 @@ import { selectWithErrors } from "./adapters/select.js";
5
5
  import { createEngineScreening } from "./adapters/engine-screen.js";
6
6
  import { createEngineRunner } from "./adapters/model-runner.js";
7
7
  import { authorityFrom, createSubagentChannel, evolutionHome, evolutionIoAdapter, newRunRegistry, newSkillLibrary, reportsSweepLockTarget, sweepReports, transactIo } from '@lmzhen/dsh-evolution-core';
8
+ import { registerOwnerSettings } from '@lmzhen/dsh-evolution-core';
8
9
  import { registerHostRoutes } from '@lmzhen/dsh-evolution-core/http-routes';
9
10
  import { loadMergeState } from "./state.js";
10
11
  import { pairLedger, normalizePairLedger } from "./domain/pair-ledger.js";
@@ -134,6 +135,7 @@ function formatUnreadyError() {
134
135
  }
135
136
  export const inject = [];
136
137
  export function apply(ctx, rawConfig = {}) {
138
+ registerOwnerSettings(ctx, 'evolution-merge', Config);
137
139
  configureMergePresentation(ctx);
138
140
  let params = resolveMergeParams(rawConfig);
139
141
  let mergeRun;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@lmzhen/dsh-evolution-merge",
3
3
  "description": "Skill auto-merge domain: screening, two-round authoring, queues and commit orchestration (community build)",
4
- "version": "0.32.4",
4
+ "version": "0.32.6",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -32,9 +32,9 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@deepseek-ai/schemastery": "^3.18.5",
35
- "@lmzhen/dsh-evolution-core": "^0.32.4",
36
- "@lmzhen/dsh-evolution-commands": "^0.32.4",
37
- "@lmzhen/dsh-evolution-merge-engine": "0.32.4"
35
+ "@lmzhen/dsh-evolution-core": "^0.32.6",
36
+ "@lmzhen/dsh-evolution-commands": "^0.32.6",
37
+ "@lmzhen/dsh-evolution-merge-engine": "0.32.6"
38
38
  },
39
39
  "peerDependencies": {
40
40
  "@deepseek-ai/cordis": "^4.0.5"