@lmzhen/dsh-evolution-merge 0.30.18 → 0.30.19

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 (143) hide show
  1. package/README.md +21 -4
  2. package/data/minhash_params.json +1063 -0
  3. package/lib/index.js +7313 -3272
  4. package/lib/types/adapters/channel.d.ts +1 -0
  5. package/lib/types/adapters/channel.js +15 -1
  6. package/lib/types/adapters/engine-screen.d.ts +1 -1
  7. package/lib/types/adapters/engine-screen.js +5 -2
  8. package/lib/types/adapters/model-runner.d.ts +0 -5
  9. package/lib/types/adapters/model-runner.js +8 -2
  10. package/lib/types/adapters/model.js +2 -1
  11. package/lib/types/adapters/select.js +12 -8
  12. package/lib/types/approve-command.d.ts +12 -1
  13. package/lib/types/approve-command.js +39 -6
  14. package/lib/types/authoring-flow.d.ts +16 -0
  15. package/lib/types/authoring-flow.js +37 -13
  16. package/lib/types/channel-port.d.ts +3 -1
  17. package/lib/types/channel-port.js +8 -3
  18. package/lib/types/command-defs.d.ts +5 -0
  19. package/lib/types/command-defs.js +33 -0
  20. package/lib/types/command-surface.d.ts +1 -1
  21. package/lib/types/command-surface.js +10 -43
  22. package/lib/types/commands.d.ts +3 -4
  23. package/lib/types/commands.js +33 -72
  24. package/lib/types/commit-assembly.d.ts +14 -1
  25. package/lib/types/commit-assembly.js +65 -9
  26. package/lib/types/commit-execute.d.ts +7 -1
  27. package/lib/types/commit-execute.js +54 -22
  28. package/lib/types/commit-plan.d.ts +7 -1
  29. package/lib/types/commit-plan.js +4 -0
  30. package/lib/types/commit-receipt.d.ts +3 -0
  31. package/lib/types/contracts.d.ts +43 -0
  32. package/lib/types/doctor.d.ts +11 -1
  33. package/lib/types/doctor.js +81 -27
  34. package/lib/types/domain/authoring-manifest.d.ts +26 -0
  35. package/lib/types/domain/authoring-manifest.js +43 -0
  36. package/lib/types/domain/engine-criteria.d.ts +10 -0
  37. package/lib/types/domain/engine-criteria.js +11 -0
  38. package/lib/types/domain/engine-input.d.ts +10 -0
  39. package/lib/types/domain/engine-input.js +26 -0
  40. package/lib/types/domain/errors.d.ts +15 -1
  41. package/lib/types/domain/errors.js +23 -4
  42. package/lib/types/domain/evidence-hash.d.ts +3 -0
  43. package/lib/types/domain/evidence-hash.js +14 -0
  44. package/lib/types/domain/failure-route.d.ts +14 -0
  45. package/lib/types/domain/failure-route.js +12 -0
  46. package/lib/types/domain/live-facts.d.ts +31 -0
  47. package/lib/types/domain/live-facts.js +54 -0
  48. package/lib/types/domain/merge-limits.d.ts +18 -0
  49. package/lib/types/domain/merge-limits.js +22 -0
  50. package/lib/types/domain/merge-report.d.ts +41 -0
  51. package/lib/types/domain/merge-report.js +2 -0
  52. package/lib/types/domain/merge-snapshot.d.ts +99 -0
  53. package/lib/types/domain/merge-snapshot.js +82 -0
  54. package/lib/types/domain/pair-ledger.d.ts +34 -0
  55. package/lib/types/domain/pair-ledger.js +96 -0
  56. package/lib/types/domain/pre-1b-backup.d.ts +43 -0
  57. package/lib/types/domain/pre-1b-backup.js +140 -0
  58. package/lib/types/domain/provider-key.d.ts +2 -0
  59. package/lib/types/domain/provider-key.js +11 -0
  60. package/lib/types/domain/read-probe.d.ts +5 -0
  61. package/lib/types/domain/read-probe.js +11 -0
  62. package/lib/types/domain/reconcile.d.ts +47 -0
  63. package/lib/types/domain/reconcile.js +178 -0
  64. package/lib/types/domain/resolve-pair.d.ts +2 -9
  65. package/lib/types/domain/resolve-pair.js +2 -15
  66. package/lib/types/domain/row-v4.d.ts +148 -0
  67. package/lib/types/domain/row-v4.js +159 -0
  68. package/lib/types/domain/run-coordinator.d.ts +51 -0
  69. package/lib/types/domain/run-coordinator.js +45 -0
  70. package/lib/types/domain/schema4.d.ts +53 -0
  71. package/lib/types/domain/schema4.js +129 -0
  72. package/lib/types/domain/selection-policy.d.ts +14 -0
  73. package/lib/types/domain/selection-policy.js +6 -0
  74. package/lib/types/domain/skipped-expiry.d.ts +5 -0
  75. package/lib/types/domain/skipped-expiry.js +16 -0
  76. package/lib/types/domain/stage-aggregate.d.ts +96 -0
  77. package/lib/types/domain/stage-aggregate.js +293 -0
  78. package/lib/types/domain/staging-index.d.ts +1 -0
  79. package/lib/types/domain/state-bootstrap.d.ts +43 -0
  80. package/lib/types/domain/state-bootstrap.js +267 -0
  81. package/lib/types/domain/state-v3.d.ts +3 -14
  82. package/lib/types/domain/state-v3.js +3 -79
  83. package/lib/types/domain/undo-journal.d.ts +19 -0
  84. package/lib/types/domain/undo-journal.js +20 -0
  85. package/lib/types/domain/undo-receipt.d.ts +18 -0
  86. package/lib/types/domain/undo-receipt.js +22 -0
  87. package/lib/types/domain/validation-plan.d.ts +65 -0
  88. package/lib/types/domain/validation-plan.js +49 -0
  89. package/lib/types/facts.d.ts +3 -1
  90. package/lib/types/facts.js +13 -16
  91. package/lib/types/index.d.ts +2 -0
  92. package/lib/types/index.js +181 -68
  93. package/lib/types/merge-command.d.ts +3 -1
  94. package/lib/types/merge-command.js +10 -6
  95. package/lib/types/merge-routes.d.ts +10 -5
  96. package/lib/types/merge-routes.js +72 -7
  97. package/lib/types/merge-tool.d.ts +1 -1
  98. package/lib/types/merge-tool.js +2 -2
  99. package/lib/types/metrics.js +1 -1
  100. package/lib/types/new-child-authoring.d.ts +2 -0
  101. package/lib/types/new-child-authoring.js +57 -10
  102. package/lib/types/params.d.ts +2 -4
  103. package/lib/types/params.js +13 -0
  104. package/lib/types/pending-actions.d.ts +2 -2
  105. package/lib/types/pending-actions.js +4 -4
  106. package/lib/types/prompts.d.ts +2 -4
  107. package/lib/types/prompts.js +21 -8
  108. package/lib/types/read-commands.d.ts +3 -3
  109. package/lib/types/read-commands.js +19 -28
  110. package/lib/types/recovery-coordinator.d.ts +34 -0
  111. package/lib/types/recovery-coordinator.js +84 -0
  112. package/lib/types/recovery-projection.d.ts +31 -0
  113. package/lib/types/recovery-projection.js +96 -0
  114. package/lib/types/resume-command.d.ts +5 -1
  115. package/lib/types/resume-command.js +46 -13
  116. package/lib/types/revision.d.ts +17 -0
  117. package/lib/types/revision.js +39 -3
  118. package/lib/types/round2-outcome.d.ts +2 -1
  119. package/lib/types/round2-outcome.js +59 -11
  120. package/lib/types/run-shell.d.ts +16 -2
  121. package/lib/types/run-shell.js +49 -5
  122. package/lib/types/runtime.d.ts +0 -5
  123. package/lib/types/runtime.js +274 -89
  124. package/lib/types/scan-command.d.ts +1 -0
  125. package/lib/types/scan-command.js +2 -0
  126. package/lib/types/scan-ports.d.ts +18 -0
  127. package/lib/types/scan-ports.js +49 -23
  128. package/lib/types/scan-run.d.ts +17 -0
  129. package/lib/types/scan-run.js +143 -48
  130. package/lib/types/stage-tool-registry.d.ts +7 -0
  131. package/lib/types/stage-tool-registry.js +12 -1
  132. package/lib/types/state.d.ts +5 -5
  133. package/lib/types/state.js +22 -69
  134. package/lib/types/status.d.ts +6 -1
  135. package/lib/types/status.js +47 -0
  136. package/lib/types/surface/body.d.ts +4 -0
  137. package/lib/types/surface/body.js +16 -0
  138. package/lib/types/surface/merge-view.d.ts +14 -0
  139. package/lib/types/surface/merge-view.js +126 -0
  140. package/lib/types/undo-operation.d.ts +24 -0
  141. package/lib/types/undo-operation.js +135 -0
  142. package/lib/types/wire.d.ts +22 -3
  143. package/package.json +6 -4
@@ -8,9 +8,9 @@ export type VerifySubState = 'queued' | 'running' | 'failed' | 'cancelled';
8
8
  export type StagingState = 'none' | 'kept' | 'cleared-source-ok' | 'cleared-source-gone';
9
9
  export type SkipOrigin = 'agent' | 'human' | 'system';
10
10
  export type SkipKind = 'agent-keep' | 'human-reject' | 'over-limit' | 'forced';
11
- export type ExpiredKind = 'target-taken' | 'source-changed' | 'skipped-ttl';
11
+ export type ExpiredKind = 'target-taken' | 'source-changed' | 'source-gone' | 'skipped-ttl';
12
12
  export type WireRunState = 'running' | 'succeeded' | 'failed' | 'cancelled' | 'awaiting-approval' | 'undone' | 'superseded' | 'interrupted' | 'orphan';
13
- export type ActionId = 'approve' | 'reject' | 'retry-candidates' | 'retry-resume' | 'discard' | 'restore' | 'pair' | 'status' | 'report' | 'cancel';
13
+ export type ActionId = 'approve' | 'reject' | 'retry-candidates' | 'retry-resume' | 'resume' | 'discard' | 'restore' | 'pair' | 'status' | 'report' | 'cancel';
14
14
  export interface MergeCounts {
15
15
  readonly active: {
16
16
  readonly verify: number;
@@ -48,6 +48,8 @@ export interface RowFact {
48
48
  readonly state: WireRowState;
49
49
  readonly queue: QueueId;
50
50
  readonly verifySubState?: VerifySubState;
51
+ /** Optional Batch4 projection; old staging remains compatibility. */
52
+ readonly stage?: 'present' | 'lost' | 'expired';
51
53
  readonly a: string;
52
54
  readonly b: string;
53
55
  readonly target?: {
@@ -84,6 +86,7 @@ export interface Facts {
84
86
  readonly readAt: number;
85
87
  readonly approval: {
86
88
  readonly mergeApproval: boolean;
89
+ readonly platformWrite?: boolean;
87
90
  };
88
91
  readonly counts: MergeCounts;
89
92
  readonly active: RunView | null;
@@ -119,10 +122,11 @@ export interface RunView {
119
122
  } | null;
120
123
  readonly startedAt: number;
121
124
  readonly endedAt?: number;
122
- readonly stopReason?: 'timeout' | 'cancelled' | 'error' | 'orphan';
125
+ readonly stopReason?: string;
123
126
  readonly failure?: FailureFact;
124
127
  readonly parentRunId?: string;
125
128
  readonly currentPairKey?: string;
129
+ readonly resultRef?: string;
126
130
  readonly summary?: {
127
131
  readonly merged: number;
128
132
  readonly kept: number;
@@ -150,6 +154,12 @@ export interface RunPair {
150
154
  export interface RunDetail extends RunView {
151
155
  readonly pairs: readonly RunPair[];
152
156
  readonly pairsTruncated: boolean;
157
+ readonly meta?: {
158
+ readonly pairKey?: string;
159
+ readonly phase?: string;
160
+ readonly approval?: string;
161
+ };
162
+ readonly reportRef?: string;
153
163
  }
154
164
  export interface RunsView {
155
165
  readonly wireVersion: 1;
@@ -170,9 +180,13 @@ export interface HistoryItem {
170
180
  readonly name: string;
171
181
  readonly kind: 'merged' | 'deleted' | 'split' | 'other';
172
182
  readonly reason: string;
183
+ readonly reasonCode?: string;
184
+ readonly generation?: number;
173
185
  readonly lastVersion: number;
174
186
  readonly archivedAt: number;
175
187
  readonly sourceRunId?: string;
188
+ readonly runId?: string;
189
+ readonly absorbedInto?: string;
176
190
  }
177
191
  export interface HistoryView {
178
192
  readonly wireVersion: 1;
@@ -205,6 +219,11 @@ export interface DoctorView {
205
219
  readonly code: 'E-323';
206
220
  readonly detail?: string;
207
221
  };
222
+ /** Set when the read model cannot read the merge state; the rows are empty placeholders. */
223
+ readonly blocked?: {
224
+ readonly code: string;
225
+ readonly message: string;
226
+ };
208
227
  readonly rows: readonly DoctorFact[];
209
228
  }
210
229
  export interface WireFailure {
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.30.18",
4
+ "version": "0.30.19",
5
5
  "publishConfig": {
6
6
  "access": "public"
7
7
  },
@@ -23,7 +23,8 @@
23
23
  "files": [
24
24
  "lib/**/*.js",
25
25
  "lib/types/**/*.d.ts",
26
- "data/**/*"
26
+ "data/**/*",
27
+ "package.json"
27
28
  ],
28
29
  "license": "MIT",
29
30
  "scripts": {
@@ -31,8 +32,9 @@
31
32
  },
32
33
  "dependencies": {
33
34
  "@deepseek-ai/schemastery": "^3.18.5",
34
- "@lmzhen/dsh-evolution-core": "^0.30.18",
35
- "@lmzhen/dsh-evolution-merge-engine": "0.30.18"
35
+ "@lmzhen/dsh-evolution-core": "^0.30.19",
36
+ "@lmzhen/dsh-evolution-commands": "^0.30.19",
37
+ "@lmzhen/dsh-evolution-merge-engine": "0.30.19"
36
38
  },
37
39
  "peerDependencies": {
38
40
  "@deepseek-ai/cordis": "^4.0.5"