@lmzhen/dsh-evolution-merge 0.30.17 → 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.
- package/README.md +25 -7
- package/data/minhash_params.json +1063 -0
- package/lib/index.js +7308 -1800
- package/lib/types/adapters/channel.d.ts +1 -0
- package/lib/types/adapters/channel.js +15 -1
- package/lib/types/adapters/engine-screen.d.ts +1 -1
- package/lib/types/adapters/engine-screen.js +5 -2
- package/lib/types/adapters/library.js +4 -1
- package/lib/types/adapters/model-runner.d.ts +0 -5
- package/lib/types/adapters/model-runner.js +8 -2
- package/lib/types/adapters/model.d.ts +31 -0
- package/lib/types/adapters/model.js +47 -0
- package/lib/types/adapters/select.js +12 -8
- package/lib/types/approve-command.d.ts +14 -1
- package/lib/types/approve-command.js +72 -44
- package/lib/types/authoring-flow.d.ts +19 -1
- package/lib/types/authoring-flow.js +49 -15
- package/lib/types/channel-port.d.ts +3 -1
- package/lib/types/channel-port.js +8 -3
- package/lib/types/command-defs.d.ts +5 -0
- package/lib/types/command-defs.js +33 -0
- package/lib/types/command-surface.d.ts +5 -0
- package/lib/types/command-surface.js +11 -0
- package/lib/types/commands.d.ts +3 -4
- package/lib/types/commands.js +33 -72
- package/lib/types/commit-assembly.d.ts +16 -1
- package/lib/types/commit-assembly.js +72 -11
- package/lib/types/commit-execute.d.ts +14 -2
- package/lib/types/commit-execute.js +76 -14
- package/lib/types/commit-plan.d.ts +7 -1
- package/lib/types/commit-plan.js +4 -0
- package/lib/types/commit-receipt.d.ts +3 -0
- package/lib/types/commit-recovery.d.ts +7 -2
- package/lib/types/commit-recovery.js +73 -96
- package/lib/types/contracts.d.ts +44 -1
- package/lib/types/contracts.js +1 -1
- package/lib/types/coordinator.d.ts +3 -2
- package/lib/types/coordinator.js +4 -3
- package/lib/types/decision.js +1 -1
- package/lib/types/doctor.d.ts +18 -1
- package/lib/types/doctor.js +164 -10
- package/lib/types/domain/authoring-manifest.d.ts +26 -0
- package/lib/types/domain/authoring-manifest.js +43 -0
- package/lib/types/domain/claim.d.ts +4 -1
- package/lib/types/domain/claim.js +2 -2
- package/lib/types/domain/commit-journal-store.js +5 -1
- package/lib/types/domain/commit-journal.js +1 -1
- package/lib/types/domain/consistency.d.ts +22 -0
- package/lib/types/domain/consistency.js +50 -0
- package/lib/types/domain/engine-criteria.d.ts +10 -0
- package/lib/types/domain/engine-criteria.js +11 -0
- package/lib/types/domain/engine-input.d.ts +10 -0
- package/lib/types/domain/engine-input.js +26 -0
- package/lib/types/domain/errors.d.ts +15 -1
- package/lib/types/domain/errors.js +23 -4
- package/lib/types/domain/evidence-hash.d.ts +3 -0
- package/lib/types/domain/evidence-hash.js +14 -0
- package/lib/types/domain/failure-route.d.ts +14 -0
- package/lib/types/domain/failure-route.js +12 -0
- package/lib/types/domain/ledger.js +10 -1
- package/lib/types/domain/live-facts.d.ts +31 -0
- package/lib/types/domain/live-facts.js +54 -0
- package/lib/types/domain/merge-limits.d.ts +18 -0
- package/lib/types/domain/merge-limits.js +22 -0
- package/lib/types/domain/merge-report.d.ts +41 -0
- package/lib/types/domain/merge-report.js +2 -0
- package/lib/types/domain/merge-snapshot.d.ts +99 -0
- package/lib/types/domain/merge-snapshot.js +82 -0
- package/lib/types/domain/migrate-v3.d.ts +20 -0
- package/lib/types/domain/migrate-v3.js +68 -0
- package/lib/types/domain/pair-ledger.d.ts +34 -0
- package/lib/types/domain/pair-ledger.js +96 -0
- package/lib/types/domain/pre-1b-backup.d.ts +43 -0
- package/lib/types/domain/pre-1b-backup.js +140 -0
- package/lib/types/domain/provider-key.d.ts +2 -0
- package/lib/types/domain/provider-key.js +11 -0
- package/lib/types/domain/read-probe.d.ts +5 -0
- package/lib/types/domain/read-probe.js +11 -0
- package/lib/types/domain/reconcile.d.ts +47 -0
- package/lib/types/domain/reconcile.js +178 -0
- package/lib/types/domain/resolve-pair.d.ts +2 -9
- package/lib/types/domain/resolve-pair.js +2 -15
- package/lib/types/domain/row-tx.d.ts +27 -0
- package/lib/types/domain/row-tx.js +31 -0
- package/lib/types/domain/row-v3-bridge.d.ts +6 -0
- package/lib/types/domain/row-v3-bridge.js +47 -0
- package/lib/types/domain/row-v3.d.ts +113 -0
- package/lib/types/domain/row-v3.js +107 -0
- package/lib/types/domain/row-v4.d.ts +148 -0
- package/lib/types/domain/row-v4.js +159 -0
- package/lib/types/domain/row.d.ts +1 -0
- package/lib/types/domain/run-coordinator.d.ts +51 -0
- package/lib/types/domain/run-coordinator.js +45 -0
- package/lib/types/domain/schema4.d.ts +53 -0
- package/lib/types/domain/schema4.js +129 -0
- package/lib/types/domain/selection-policy.d.ts +14 -0
- package/lib/types/domain/selection-policy.js +6 -0
- package/lib/types/domain/skipped-expiry.d.ts +5 -0
- package/lib/types/domain/skipped-expiry.js +16 -0
- package/lib/types/domain/stage-aggregate.d.ts +96 -0
- package/lib/types/domain/stage-aggregate.js +293 -0
- package/lib/types/domain/staging-index.d.ts +15 -0
- package/lib/types/domain/staging-index.js +41 -0
- package/lib/types/domain/state-bootstrap.d.ts +43 -0
- package/lib/types/domain/state-bootstrap.js +267 -0
- package/lib/types/domain/state-v3.d.ts +4 -0
- package/lib/types/domain/state-v3.js +4 -0
- package/lib/types/domain/undo-journal.d.ts +19 -0
- package/lib/types/domain/undo-journal.js +20 -0
- package/lib/types/domain/undo-receipt.d.ts +18 -0
- package/lib/types/domain/undo-receipt.js +22 -0
- package/lib/types/domain/validation-plan.d.ts +65 -0
- package/lib/types/domain/validation-plan.js +49 -0
- package/lib/types/facts.d.ts +26 -0
- package/lib/types/facts.js +65 -0
- package/lib/types/gate-filter.d.ts +31 -0
- package/lib/types/gate-filter.js +64 -0
- package/lib/types/index.d.ts +7 -2
- package/lib/types/index.js +185 -82
- package/lib/types/ladder.js +1 -1
- package/lib/types/merge-command.d.ts +3 -1
- package/lib/types/merge-command.js +10 -6
- package/lib/types/merge-routes.d.ts +12 -7
- package/lib/types/merge-routes.js +87 -23
- package/lib/types/merge-tool.d.ts +1 -1
- package/lib/types/merge-tool.js +2 -2
- package/lib/types/metrics.d.ts +16 -0
- package/lib/types/metrics.js +27 -0
- package/lib/types/new-child-authoring.d.ts +5 -1
- package/lib/types/new-child-authoring.js +71 -13
- package/lib/types/params.d.ts +2 -4
- package/lib/types/params.js +13 -0
- package/lib/types/pending-actions.d.ts +2 -2
- package/lib/types/pending-actions.js +17 -17
- package/lib/types/prompts.d.ts +2 -4
- package/lib/types/prompts.js +21 -8
- package/lib/types/propose.d.ts +26 -0
- package/lib/types/propose.js +69 -0
- package/lib/types/read-commands.d.ts +4 -4
- package/lib/types/read-commands.js +19 -26
- package/lib/types/recovery-coordinator.d.ts +34 -0
- package/lib/types/recovery-coordinator.js +84 -0
- package/lib/types/recovery-projection.d.ts +31 -0
- package/lib/types/recovery-projection.js +96 -0
- package/lib/types/resume-command.d.ts +7 -1
- package/lib/types/resume-command.js +50 -14
- package/lib/types/revision.d.ts +17 -0
- package/lib/types/revision.js +39 -3
- package/lib/types/round2-outcome.d.ts +2 -1
- package/lib/types/round2-outcome.js +68 -12
- package/lib/types/run-shell.d.ts +16 -2
- package/lib/types/run-shell.js +49 -5
- package/lib/types/runtime.d.ts +4 -6
- package/lib/types/runtime.js +341 -86
- package/lib/types/scan-command.d.ts +1 -0
- package/lib/types/scan-command.js +2 -0
- package/lib/types/scan-ports.d.ts +21 -1
- package/lib/types/scan-ports.js +51 -23
- package/lib/types/scan-run.d.ts +17 -0
- package/lib/types/scan-run.js +221 -63
- package/lib/types/screening-port.d.ts +47 -0
- package/lib/types/screening-port.js +93 -0
- package/lib/types/screening.d.ts +30 -0
- package/lib/types/screening.js +75 -0
- package/lib/types/stage-tool-registry.d.ts +7 -0
- package/lib/types/stage-tool-registry.js +12 -1
- package/lib/types/state.d.ts +15 -1
- package/lib/types/state.js +39 -17
- package/lib/types/status.d.ts +8 -0
- package/lib/types/status.js +64 -0
- package/lib/types/surface/body.d.ts +4 -0
- package/lib/types/surface/body.js +16 -0
- package/lib/types/surface/merge-view.d.ts +14 -0
- package/lib/types/surface/merge-view.js +126 -0
- package/lib/types/target-claim.d.ts +1 -0
- package/lib/types/target-claim.js +63 -18
- package/lib/types/undo-operation.d.ts +24 -0
- package/lib/types/undo-operation.js +135 -0
- package/lib/types/unit-claim.d.ts +5 -0
- package/lib/types/unit-claim.js +15 -0
- package/lib/types/wire-projection.d.ts +36 -0
- package/lib/types/wire-projection.js +69 -0
- package/lib/types/wire.d.ts +273 -0
- package/lib/types/wire.js +3 -0
- package/package.json +10 -4
- package/lib/types/routes.d.ts +0 -70
- package/lib/types/routes.js +0 -78
package/lib/types/routes.js
DELETED
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import { queueOf, stageOf } from "./contracts.js";
|
|
2
|
-
import { countRows } from "./status.js";
|
|
3
|
-
export function toRowView(row) {
|
|
4
|
-
return {
|
|
5
|
-
id: row.id,
|
|
6
|
-
pairKey: row.pairKey,
|
|
7
|
-
a: row.a,
|
|
8
|
-
b: row.b,
|
|
9
|
-
state: row.state,
|
|
10
|
-
queue: queueOf(row.state),
|
|
11
|
-
stage: stageOf(row.state),
|
|
12
|
-
label: row.a + ' + ' + row.b,
|
|
13
|
-
updatedAt: row.updatedAt,
|
|
14
|
-
createdAt: row.createdAt,
|
|
15
|
-
...(row.decision?.target === undefined ? {} : { target: row.decision.target }),
|
|
16
|
-
...(row.decision?.confidence === undefined ? {} : { confidence: row.decision.confidence }),
|
|
17
|
-
...(row.decision?.aSummary === undefined ? {} : { aSummary: row.decision.aSummary }),
|
|
18
|
-
...(row.decision?.bSummary === undefined ? {} : { bSummary: row.decision.bSummary }),
|
|
19
|
-
...(row.decision?.rationale === undefined ? {} : { rationale: row.decision.rationale }),
|
|
20
|
-
...(row.failure === undefined ? {} : {
|
|
21
|
-
failure: { stage: row.failure.stage, code: row.failure.code, message: row.failure.message, retryable: row.failure.retryable },
|
|
22
|
-
}),
|
|
23
|
-
...(row.attempts === undefined ? {} : { attempts: row.attempts }),
|
|
24
|
-
...(row.origin === undefined ? {} : { origin: row.origin }),
|
|
25
|
-
...(row.stagingExpiresAt === undefined ? {} : { stagingExpiresAt: row.stagingExpiresAt }),
|
|
26
|
-
...(row.expired === undefined ? {} : { expired: row.expired }),
|
|
27
|
-
...(row.reason === undefined ? {} : { reason: row.reason }),
|
|
28
|
-
summary: [
|
|
29
|
-
row.decision?.aSummary ?? '未提供技能1摘要',
|
|
30
|
-
row.decision?.bSummary ?? '未提供技能2摘要',
|
|
31
|
-
row.decision?.rationale ?? row.reason ?? '未提供融合原因',
|
|
32
|
-
],
|
|
33
|
-
actions: row.state === 'pending'
|
|
34
|
-
? ['/evolution merge approve ' + row.id, '/evolution merge reject ' + row.id]
|
|
35
|
-
: row.state === 'skipped'
|
|
36
|
-
? ['/evolution merge skipped --restore ' + row.id]
|
|
37
|
-
: ['/evolution merge resume ' + row.id],
|
|
38
|
-
};
|
|
39
|
-
}
|
|
40
|
-
export function buildMergeView(rows, commands, latestRun, approval) {
|
|
41
|
-
const counts = countRows(rows);
|
|
42
|
-
return {
|
|
43
|
-
schemaVersion: 2,
|
|
44
|
-
counts,
|
|
45
|
-
tabs: [
|
|
46
|
-
{ queue: 'verify', count: counts.verify },
|
|
47
|
-
{ queue: 'pending', count: counts.pending },
|
|
48
|
-
{ queue: 'fuse', count: counts.fuse },
|
|
49
|
-
{ queue: 'skipped', count: counts.skipped },
|
|
50
|
-
],
|
|
51
|
-
commands,
|
|
52
|
-
...(latestRun === undefined ? {} : { latestRun }),
|
|
53
|
-
...(approval === undefined ? {} : { approval }),
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
export function pageQueue(rows, queue, cursor = 0, limit = 50) {
|
|
57
|
-
const filtered = rows.filter(row => queueOf(row.state) === queue);
|
|
58
|
-
const size = Math.max(1, Math.min(200, limit));
|
|
59
|
-
const start = Math.max(0, cursor);
|
|
60
|
-
const items = filtered.slice(start, start + size).map(toRowView);
|
|
61
|
-
const next = start + size < filtered.length ? String(start + size) : undefined;
|
|
62
|
-
return { queue, items, ...(next === undefined ? {} : { nextCursor: next }) };
|
|
63
|
-
}
|
|
64
|
-
export function toRunFact(run) {
|
|
65
|
-
return {
|
|
66
|
-
id: run.id,
|
|
67
|
-
state: run.state,
|
|
68
|
-
...(run.command === undefined ? {} : { command: run.command }),
|
|
69
|
-
...(run.stage === undefined ? {} : { stage: run.stage }),
|
|
70
|
-
...(run.progress === undefined ? {} : { progress: run.progress }),
|
|
71
|
-
startedAt: run.startedAt,
|
|
72
|
-
...(run.endedAt === undefined ? {} : { endedAt: run.endedAt }),
|
|
73
|
-
...(run.resultRef === undefined ? {} : { resultRef: run.resultRef }),
|
|
74
|
-
...(run.failure === undefined ? {} : { failure: run.failure }),
|
|
75
|
-
...(run.supersededAt === undefined ? {} : { supersededAt: run.supersededAt }),
|
|
76
|
-
};
|
|
77
|
-
}
|
|
78
|
-
//# sourceMappingURL=routes.js.map
|