@lmzhen/dsh-evolution-merge 0.30.1 → 0.30.3
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 +328 -55
- package/lib/types/adapters/library.js +8 -0
- package/lib/types/commit-execute.d.ts +4 -0
- package/lib/types/commit-execute.js +13 -5
- package/lib/types/commit-recovery.d.ts +10 -0
- package/lib/types/commit-recovery.js +84 -0
- package/lib/types/commit-snapshot.d.ts +38 -0
- package/lib/types/commit-snapshot.js +65 -0
- package/lib/types/coordinator.d.ts +8 -0
- package/lib/types/coordinator.js +7 -2
- package/lib/types/decision.js +5 -1
- package/lib/types/index.js +8 -2
- package/lib/types/presentation-budget.d.ts +3 -0
- package/lib/types/presentation-budget.js +11 -0
- package/lib/types/revision.d.ts +4 -0
- package/lib/types/revision.js +12 -0
- package/lib/types/routes.d.ts +3 -0
- package/lib/types/routes.js +6 -3
- package/lib/types/runtime.js +50 -12
- package/lib/types/scan-command.d.ts +1 -0
- package/lib/types/scan-command.js +1 -0
- package/lib/types/scan-ports.js +6 -1
- package/lib/types/scan-run.d.ts +1 -0
- package/lib/types/scan-run.js +4 -2
- package/lib/types/skill-card.d.ts +1 -0
- package/lib/types/state.d.ts +8 -1
- package/lib/types/state.js +12 -5
- package/lib/types/status.js +3 -2
- package/package.json +3 -3
package/lib/types/state.js
CHANGED
|
@@ -55,16 +55,23 @@ export async function mutateMergeState(io, home, now, fn) {
|
|
|
55
55
|
void now;
|
|
56
56
|
return result;
|
|
57
57
|
}
|
|
58
|
-
export async function upsertRow(io, home, now, row) {
|
|
59
|
-
await mutateMergeState(io, home, now, (rows) => {
|
|
58
|
+
export async function upsertRow(io, home, now, row, expect = 'any') {
|
|
59
|
+
return await mutateMergeState(io, home, now, (rows) => {
|
|
60
60
|
const index = rows.findIndex(item => item.pairKey === row.pairKey);
|
|
61
|
+
const current = index < 0 ? undefined : rows[index];
|
|
62
|
+
if (current !== undefined && expect !== 'any' && (expect === 'absent' || queueOf(current.state) !== expect)) {
|
|
63
|
+
return { rows, result: { ok: false, current } };
|
|
64
|
+
}
|
|
65
|
+
if (current === undefined && expect !== 'any' && expect !== 'absent' && expect !== 'verify') {
|
|
66
|
+
return { rows, result: { ok: false, current: row } };
|
|
67
|
+
}
|
|
61
68
|
const normalized = { ...row, queue: queueOf(row.state) };
|
|
62
69
|
const next = [...rows];
|
|
63
|
-
if (
|
|
70
|
+
if (current === undefined)
|
|
64
71
|
next.push(normalized);
|
|
65
72
|
else
|
|
66
|
-
next[index] = { ...normalized, createdAt:
|
|
67
|
-
return { rows: next, result:
|
|
73
|
+
next[index] = { ...normalized, createdAt: current.createdAt };
|
|
74
|
+
return { rows: next, result: { ok: true } };
|
|
68
75
|
});
|
|
69
76
|
}
|
|
70
77
|
export async function moveRow(io, home, now, id, patch) {
|
package/lib/types/status.js
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { queueOf, stageOf } from "./contracts.js";
|
|
2
|
+
import { fitToolText } from "./presentation-budget.js";
|
|
2
3
|
export function countRows(rows) {
|
|
3
4
|
const counts = { verify: 0, pending: 0, fuse: 0, skipped: 0 };
|
|
4
5
|
for (const row of rows)
|
|
@@ -17,12 +18,12 @@ export function formatStatus(rows) {
|
|
|
17
18
|
];
|
|
18
19
|
for (const row of rows)
|
|
19
20
|
lines.push('- ' + describe(row));
|
|
20
|
-
return lines.join('\n');
|
|
21
|
+
return fitToolText(lines.join('\n'));
|
|
21
22
|
}
|
|
22
23
|
export function formatQueue(rows, queue) {
|
|
23
24
|
const selected = rows.filter(row => queueOf(row.state) === queue);
|
|
24
25
|
if (selected.length === 0)
|
|
25
26
|
return 'merge ' + queue + ': empty';
|
|
26
|
-
return ['merge ' + queue + ': ' + String(selected.length)].concat(selected.map(row => '- ' + describe(row))).join('\n');
|
|
27
|
+
return fitToolText(['merge ' + queue + ': ' + String(selected.length)].concat(selected.map(row => '- ' + describe(row))).join('\n'));
|
|
27
28
|
}
|
|
28
29
|
//# sourceMappingURL=status.js.map
|
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.
|
|
4
|
+
"version": "0.30.3",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
7
7
|
},
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"dependencies": {
|
|
29
29
|
"@deepseek-ai/schemastery": "^3.18.5",
|
|
30
|
-
"@lmzhen/dsh-evolution-core": "^0.30.
|
|
31
|
-
"@lmzhen/dsh-evolution-merge-engine": "^0.30.
|
|
30
|
+
"@lmzhen/dsh-evolution-core": "^0.30.3",
|
|
31
|
+
"@lmzhen/dsh-evolution-merge-engine": "^0.30.3"
|
|
32
32
|
},
|
|
33
33
|
"peerDependencies": {
|
|
34
34
|
"@deepseek-ai/cordis": "^4.0.5"
|