@lmzhen/dsh-evolution-merge 0.47.0 → 0.48.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 (73) hide show
  1. package/lib/index.js +175 -758
  2. package/lib/types/adapters/engine-screen.d.ts +0 -3
  3. package/lib/types/authoring-flow.d.ts +5 -0
  4. package/lib/types/authoring-flow.js +17 -10
  5. package/lib/types/commit-execute.js +1 -22
  6. package/lib/types/contracts.d.ts +0 -1
  7. package/lib/types/contracts.js +0 -1
  8. package/lib/types/doctor.d.ts +0 -1
  9. package/lib/types/doctor.js +2 -31
  10. package/lib/types/domain/consistency.d.ts +0 -1
  11. package/lib/types/domain/consistency.js +2 -11
  12. package/lib/types/domain/merge-limits.d.ts +0 -10
  13. package/lib/types/domain/merge-limits.js +0 -3
  14. package/lib/types/domain/merge-snapshot.js +4 -6
  15. package/lib/types/domain/pair-ledger.d.ts +0 -1
  16. package/lib/types/domain/row-v3.d.ts +0 -45
  17. package/lib/types/domain/row-v3.js +0 -68
  18. package/lib/types/domain/row.d.ts +2 -84
  19. package/lib/types/domain/row.js +1 -110
  20. package/lib/types/domain/run-coordinator.d.ts +0 -24
  21. package/lib/types/domain/run-coordinator.js +0 -1
  22. package/lib/types/domain/stage-aggregate.d.ts +0 -42
  23. package/lib/types/domain/stage-aggregate.js +1 -116
  24. package/lib/types/domain/state.d.ts +1 -53
  25. package/lib/types/domain/state.js +0 -55
  26. package/lib/types/domain/undo-journal.d.ts +4 -4
  27. package/lib/types/domain/undo-journal.js +5 -7
  28. package/lib/types/index.d.ts +0 -1
  29. package/lib/types/index.js +0 -1
  30. package/lib/types/new-child-authoring.js +4 -10
  31. package/lib/types/prompts.d.ts +0 -1
  32. package/lib/types/prompts.js +0 -1
  33. package/lib/types/read-commands.d.ts +0 -1
  34. package/lib/types/read-commands.js +0 -4
  35. package/lib/types/recovery-projection.js +0 -3
  36. package/lib/types/round2-outcome.js +15 -37
  37. package/lib/types/scan-run.js +0 -3
  38. package/lib/types/skipped.d.ts +1 -2
  39. package/lib/types/skipped.js +0 -8
  40. package/lib/types/staging.d.ts +0 -2
  41. package/lib/types/staging.js +0 -9
  42. package/lib/types/state.d.ts +0 -2
  43. package/lib/types/state.js +0 -13
  44. package/lib/types/surface/merge-view.d.ts +1 -2
  45. package/lib/types/surface/merge-view.js +0 -1
  46. package/lib/types/undo-operation.js +0 -9
  47. package/lib/types/unit-protocol.d.ts +6 -0
  48. package/lib/types/unit-protocol.js +72 -102
  49. package/package.json +4 -4
  50. package/lib/types/commit-recovery.d.ts +0 -14
  51. package/lib/types/commit-recovery.js +0 -96
  52. package/lib/types/coordinator.d.ts +0 -77
  53. package/lib/types/coordinator.js +0 -137
  54. package/lib/types/domain/commit-journal-store.d.ts +0 -6
  55. package/lib/types/domain/commit-journal-store.js +0 -26
  56. package/lib/types/domain/commit-journal.d.ts +0 -16
  57. package/lib/types/domain/commit-journal.js +0 -26
  58. package/lib/types/domain/indexes.d.ts +0 -21
  59. package/lib/types/domain/indexes.js +0 -15
  60. package/lib/types/domain/merge-report.d.ts +0 -41
  61. package/lib/types/domain/merge-report.js +0 -2
  62. package/lib/types/domain/pair-index-store.d.ts +0 -6
  63. package/lib/types/domain/pair-index-store.js +0 -25
  64. package/lib/types/domain/pair-index.d.ts +0 -9
  65. package/lib/types/domain/pair-index.js +0 -28
  66. package/lib/types/domain/resolve-pair.d.ts +0 -4
  67. package/lib/types/domain/resolve-pair.js +0 -4
  68. package/lib/types/domain/row-tx.d.ts +0 -27
  69. package/lib/types/domain/row-tx.js +0 -31
  70. package/lib/types/domain/run-record.d.ts +0 -45
  71. package/lib/types/domain/run-record.js +0 -24
  72. package/lib/types/domain/state-v3.d.ts +0 -4
  73. package/lib/types/domain/state-v3.js +0 -4
@@ -1,45 +0,0 @@
1
- /** Pure RunRecord v2 types and derived 9-state projection. No IO. */
2
- export type RunStatus = 'running' | 'succeeded' | 'failed' | 'cancelled' | 'interrupted' | 'orphan';
3
- export type MergeStatus = 'running' | 'succeeded' | 'failed' | 'cancelled' | 'awaiting-approval' | 'undone' | 'superseded' | 'interrupted' | 'orphan';
4
- export type PairResult = 'pending' | 'merged' | 'kept' | 'failed' | 'cancelled' | 'undone';
5
- export interface PairRecord {
6
- readonly pairKey: string;
7
- readonly a: string;
8
- readonly b: string;
9
- readonly result: PairResult;
10
- readonly target?: {
11
- readonly requested: string;
12
- readonly actual?: string;
13
- readonly created?: boolean;
14
- };
15
- readonly stagingRef?: string;
16
- readonly committed?: boolean;
17
- }
18
- export interface PairIndexEntry {
19
- readonly pairKey: string;
20
- readonly runId: string;
21
- readonly result: PairResult;
22
- readonly target?: string;
23
- readonly reportRef?: string;
24
- }
25
- export interface RunRecordV2 {
26
- readonly id: string;
27
- readonly kind: 'merge';
28
- readonly status: RunStatus;
29
- readonly stage?: 'screening' | 'decide' | 'author' | 'commit' | 'settle';
30
- readonly approval?: 'on' | 'off';
31
- readonly parentRunId?: string;
32
- readonly pairKey?: string;
33
- readonly plane?: 'local' | 'foreign';
34
- readonly startedAt: number;
35
- readonly updatedAt: number;
36
- readonly endedAt?: number;
37
- readonly resultRef?: string;
38
- readonly failure?: string;
39
- readonly stagingRef?: string;
40
- readonly pairs: readonly PairRecord[];
41
- readonly supersededAt?: number;
42
- }
43
- export declare function deriveMergeStatus(record: RunRecordV2): MergeStatus;
44
- export declare function allCommittedUndone(record: RunRecordV2): boolean;
45
- //# sourceMappingURL=run-record.d.ts.map
@@ -1,24 +0,0 @@
1
- export function deriveMergeStatus(record) {
2
- if (record.supersededAt !== undefined)
3
- return 'superseded';
4
- if (record.status === 'interrupted')
5
- return 'interrupted';
6
- if (record.status === 'orphan')
7
- return 'orphan';
8
- if (record.status === 'failed' || record.status === 'cancelled')
9
- return record.status;
10
- if (record.status === 'running') {
11
- return record.approval === 'on' && record.pairs.some(pair => pair.result === 'pending')
12
- ? 'awaiting-approval'
13
- : 'running';
14
- }
15
- const committed = record.pairs.filter(pair => pair.committed === true);
16
- if (committed.length > 0 && committed.every(pair => pair.result === 'undone'))
17
- return 'undone';
18
- return 'succeeded';
19
- }
20
- export function allCommittedUndone(record) {
21
- const committed = record.pairs.filter(pair => pair.committed === true);
22
- return committed.length > 0 && committed.every(pair => pair.result === 'undone');
23
- }
24
- //# sourceMappingURL=run-record.js.map
@@ -1,4 +0,0 @@
1
- /** G3 schema-3 migration path constants; the only production gate is state-bootstrap. */
2
- import { v2BackupPath } from './state-bootstrap.ts';
3
- export { v2BackupPath };
4
- //# sourceMappingURL=state-v3.d.ts.map
@@ -1,4 +0,0 @@
1
- /** G3 schema-3 migration path constants; the only production gate is state-bootstrap. */
2
- import { v2BackupPath } from "./state-bootstrap.js";
3
- export { v2BackupPath };
4
- //# sourceMappingURL=state-v3.js.map