@lumenflow/cli 3.16.0 → 3.16.1
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/dist/docs-sync.js +97 -46
- package/dist/docs-sync.js.map +1 -1
- package/dist/lumenflow-upgrade.js +19 -13
- package/dist/lumenflow-upgrade.js.map +1 -1
- package/package.json +8 -8
- package/packs/sidekick/.turbo/turbo-build.log +1 -1
- package/packs/sidekick/package.json +1 -1
- package/packs/software-delivery/.turbo/turbo-build.log +1 -1
- package/packs/software-delivery/package.json +1 -1
- package/dist/chunk-2D2VOCA4.js +0 -37
- package/dist/chunk-2D5KFYGX.js +0 -284
- package/dist/chunk-2GXVIN57.js +0 -14072
- package/dist/chunk-2MQ7HZWZ.js +0 -26
- package/dist/chunk-2UFQ3A3C.js +0 -643
- package/dist/chunk-3RG5ZIWI.js +0 -10
- package/dist/chunk-4N74J3UT.js +0 -15
- package/dist/chunk-5GTOXFYR.js +0 -392
- package/dist/chunk-5VY6MQMC.js +0 -240
- package/dist/chunk-67XVPMRY.js +0 -1297
- package/dist/chunk-6HO4GWJE.js +0 -164
- package/dist/chunk-6W5XHWYV.js +0 -1890
- package/dist/chunk-6X4EMYJQ.js +0 -64
- package/dist/chunk-6XYXI2NQ.js +0 -772
- package/dist/chunk-7ANSOV6Q.js +0 -285
- package/dist/chunk-A624LFLB.js +0 -1380
- package/dist/chunk-ADN5NHG4.js +0 -126
- package/dist/chunk-B7YJYJKG.js +0 -33
- package/dist/chunk-CCLHCPKG.js +0 -210
- package/dist/chunk-CK36VROC.js +0 -1584
- package/dist/chunk-D3UOFRSB.js +0 -81
- package/dist/chunk-DFR4DJBM.js +0 -230
- package/dist/chunk-DSYBDHYH.js +0 -79
- package/dist/chunk-DWMLTXKQ.js +0 -1176
- package/dist/chunk-E3REJTAJ.js +0 -28
- package/dist/chunk-EA3IVO64.js +0 -633
- package/dist/chunk-EK2AKZKD.js +0 -55
- package/dist/chunk-ELD7JTTT.js +0 -343
- package/dist/chunk-EX6TT2XI.js +0 -195
- package/dist/chunk-EXINSFZE.js +0 -82
- package/dist/chunk-EZ6ZBYBM.js +0 -510
- package/dist/chunk-FBKAPTJ2.js +0 -16
- package/dist/chunk-FVLV5RYH.js +0 -1118
- package/dist/chunk-GDNSBQVK.js +0 -2485
- package/dist/chunk-GPQHMBNN.js +0 -278
- package/dist/chunk-GTFJB67L.js +0 -68
- package/dist/chunk-HANJXVKW.js +0 -1127
- package/dist/chunk-HEVS5YLD.js +0 -269
- package/dist/chunk-HMEVZKPQ.js +0 -9
- package/dist/chunk-HRGSYNLM.js +0 -3511
- package/dist/chunk-ISZR5N4K.js +0 -60
- package/dist/chunk-J6SUPR2C.js +0 -226
- package/dist/chunk-JERYVEIZ.js +0 -244
- package/dist/chunk-JHHWGL2N.js +0 -87
- package/dist/chunk-JONWQUB5.js +0 -775
- package/dist/chunk-K2DIWWDM.js +0 -1766
- package/dist/chunk-KY4PGL5V.js +0 -969
- package/dist/chunk-L737LQ4C.js +0 -1285
- package/dist/chunk-LFTWYIB2.js +0 -497
- package/dist/chunk-LV47RFNJ.js +0 -41
- package/dist/chunk-MKSAITI7.js +0 -15
- package/dist/chunk-MZ7RKIX4.js +0 -212
- package/dist/chunk-NAP6CFSO.js +0 -84
- package/dist/chunk-ND6MY37M.js +0 -16
- package/dist/chunk-NMG736UR.js +0 -683
- package/dist/chunk-NRAXROED.js +0 -32
- package/dist/chunk-NRIZR3A7.js +0 -690
- package/dist/chunk-NX43BG3M.js +0 -233
- package/dist/chunk-O645XLSI.js +0 -297
- package/dist/chunk-OMJD6A3S.js +0 -235
- package/dist/chunk-QB6SJD4T.js +0 -430
- package/dist/chunk-QFSTL4J3.js +0 -276
- package/dist/chunk-QLGDFMFX.js +0 -212
- package/dist/chunk-RIAAGL2E.js +0 -13
- package/dist/chunk-RWO5XMZ6.js +0 -86
- package/dist/chunk-RXRKBBSM.js +0 -149
- package/dist/chunk-RZOZMML6.js +0 -363
- package/dist/chunk-U7I7FS7T.js +0 -113
- package/dist/chunk-UI42RODY.js +0 -717
- package/dist/chunk-UTVMVSCO.js +0 -519
- package/dist/chunk-V6OJGLBA.js +0 -1746
- package/dist/chunk-W2JHVH7D.js +0 -152
- package/dist/chunk-WD3Y7VQN.js +0 -280
- package/dist/chunk-WOCTQ5MS.js +0 -303
- package/dist/chunk-WZR3ZUNN.js +0 -696
- package/dist/chunk-XGI665H7.js +0 -150
- package/dist/chunk-XKY65P2T.js +0 -304
- package/dist/chunk-Y4CQZY65.js +0 -57
- package/dist/chunk-YFEXKLVE.js +0 -194
- package/dist/chunk-YHO3HS5X.js +0 -287
- package/dist/chunk-YLS7AZSX.js +0 -738
- package/dist/chunk-ZE473AO6.js +0 -49
- package/dist/chunk-ZF747T3O.js +0 -644
- package/dist/chunk-ZHCZHZH3.js +0 -43
- package/dist/chunk-ZZNZX2XY.js +0 -87
- package/dist/constants-7QAP3VQ4.js +0 -23
- package/dist/dist-IY3UUMWK.js +0 -33
- package/dist/invariants-runner-W5RGHCSU.js +0 -27
- package/dist/lane-lock-6J36HD5O.js +0 -35
- package/dist/mem-checkpoint-core-EANG2GVN.js +0 -14
- package/dist/mem-signal-core-2LZ2WYHW.js +0 -19
- package/dist/memory-store-OLB5FO7K.js +0 -18
- package/dist/service-6BYCOCO5.js +0 -13
- package/dist/spawn-policy-resolver-NTSZYQ6R.js +0 -17
- package/dist/spawn-task-builder-R4E2BHSW.js +0 -22
- package/dist/wu-done-pr-WLFFFEPJ.js +0 -25
- package/dist/wu-done-validation-3J5E36FE.js +0 -30
- package/dist/wu-duplicate-id-detector-5S7JHELK.js +0 -232
- package/packs/sidekick/.turbo/turbo-typecheck.log +0 -4
- package/packs/software-delivery/.turbo/turbo-typecheck.log +0 -4
package/dist/chunk-YHO3HS5X.js
DELETED
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
detectCycles
|
|
3
|
-
} from "./chunk-2GXVIN57.js";
|
|
4
|
-
import {
|
|
5
|
-
readWU,
|
|
6
|
-
readWUAsync
|
|
7
|
-
} from "./chunk-NRIZR3A7.js";
|
|
8
|
-
import {
|
|
9
|
-
WU_PATHS
|
|
10
|
-
} from "./chunk-6HO4GWJE.js";
|
|
11
|
-
import {
|
|
12
|
-
STRING_LITERALS
|
|
13
|
-
} from "./chunk-DWMLTXKQ.js";
|
|
14
|
-
import {
|
|
15
|
-
WU_STATUS
|
|
16
|
-
} from "./chunk-V6OJGLBA.js";
|
|
17
|
-
|
|
18
|
-
// ../core/dist/dependency-graph.js
|
|
19
|
-
import { existsSync, readdirSync, promises as fs } from "fs";
|
|
20
|
-
import path from "path";
|
|
21
|
-
var GRAPH_STATUS_MAP = {
|
|
22
|
-
done: WU_STATUS.DONE,
|
|
23
|
-
in_progress: WU_STATUS.IN_PROGRESS,
|
|
24
|
-
ready: WU_STATUS.READY,
|
|
25
|
-
blocked: WU_STATUS.BLOCKED
|
|
26
|
-
};
|
|
27
|
-
function toStringArray(value) {
|
|
28
|
-
if (!Array.isArray(value)) {
|
|
29
|
-
return [];
|
|
30
|
-
}
|
|
31
|
-
return value.filter((entry) => typeof entry === "string");
|
|
32
|
-
}
|
|
33
|
-
function toDependencyNode(id, doc) {
|
|
34
|
-
return {
|
|
35
|
-
id,
|
|
36
|
-
title: typeof doc.title === "string" ? doc.title : id,
|
|
37
|
-
status: typeof doc.status === "string" ? doc.status : "unknown",
|
|
38
|
-
blocks: toStringArray(doc.blocks),
|
|
39
|
-
blockedBy: toStringArray(doc.blocked_by)
|
|
40
|
-
};
|
|
41
|
-
}
|
|
42
|
-
function isGraphStatus(status) {
|
|
43
|
-
return status === GRAPH_STATUS_MAP.done || status === GRAPH_STATUS_MAP.in_progress || status === GRAPH_STATUS_MAP.ready || status === GRAPH_STATUS_MAP.blocked;
|
|
44
|
-
}
|
|
45
|
-
function toCycleDetectorGraph(graph) {
|
|
46
|
-
const normalized = /* @__PURE__ */ new Map();
|
|
47
|
-
for (const [id, node] of graph.entries()) {
|
|
48
|
-
normalized.set(id, {
|
|
49
|
-
id: node.id,
|
|
50
|
-
blocks: node.blocks,
|
|
51
|
-
blocked_by: node.blockedBy
|
|
52
|
-
});
|
|
53
|
-
}
|
|
54
|
-
return normalized;
|
|
55
|
-
}
|
|
56
|
-
function buildDependencyGraph() {
|
|
57
|
-
const wuDir = path.dirname(WU_PATHS.WU("dummy"));
|
|
58
|
-
const graph = /* @__PURE__ */ new Map();
|
|
59
|
-
if (!existsSync(wuDir)) {
|
|
60
|
-
return graph;
|
|
61
|
-
}
|
|
62
|
-
const files = readdirSync(wuDir).filter((f) => f.endsWith(".yaml") && f.startsWith("WU-"));
|
|
63
|
-
for (const f of files) {
|
|
64
|
-
const filePath = path.join(wuDir, f);
|
|
65
|
-
const id = f.replace(".yaml", "");
|
|
66
|
-
try {
|
|
67
|
-
const doc = readWU(filePath, id);
|
|
68
|
-
graph.set(id, toDependencyNode(id, doc));
|
|
69
|
-
} catch {
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
return graph;
|
|
73
|
-
}
|
|
74
|
-
async function buildDependencyGraphAsync() {
|
|
75
|
-
const wuDir = path.dirname(WU_PATHS.WU("dummy"));
|
|
76
|
-
const graph = /* @__PURE__ */ new Map();
|
|
77
|
-
try {
|
|
78
|
-
const files = await fs.readdir(wuDir);
|
|
79
|
-
const yamlFiles = files.filter((f) => f.endsWith(".yaml") && f.startsWith("WU-"));
|
|
80
|
-
const promises = yamlFiles.map(async (f) => {
|
|
81
|
-
const filePath = path.join(wuDir, f);
|
|
82
|
-
const id = f.replace(".yaml", "");
|
|
83
|
-
try {
|
|
84
|
-
const doc = await readWUAsync(filePath, id);
|
|
85
|
-
return toDependencyNode(id, doc);
|
|
86
|
-
} catch {
|
|
87
|
-
return null;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
|
-
const results = await Promise.all(promises);
|
|
91
|
-
for (const result of results) {
|
|
92
|
-
if (result) {
|
|
93
|
-
graph.set(result.id, result);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
} catch {
|
|
97
|
-
}
|
|
98
|
-
return graph;
|
|
99
|
-
}
|
|
100
|
-
function getUpstreamDependencies(graph, wuId, maxDepth = 10) {
|
|
101
|
-
const visited = /* @__PURE__ */ new Set();
|
|
102
|
-
const result = [];
|
|
103
|
-
function traverse(id, depth, pathSoFar) {
|
|
104
|
-
if (depth > maxDepth || visited.has(id))
|
|
105
|
-
return;
|
|
106
|
-
visited.add(id);
|
|
107
|
-
const node = graph.get(id);
|
|
108
|
-
if (!node)
|
|
109
|
-
return;
|
|
110
|
-
for (const dep of node.blockedBy) {
|
|
111
|
-
if (!visited.has(dep)) {
|
|
112
|
-
result.push({ id: dep, depth, path: [...pathSoFar, dep] });
|
|
113
|
-
traverse(dep, depth + 1, [...pathSoFar, dep]);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
}
|
|
117
|
-
traverse(wuId, 1, [wuId]);
|
|
118
|
-
return result;
|
|
119
|
-
}
|
|
120
|
-
function getDownstreamDependents(graph, wuId, maxDepth = 10) {
|
|
121
|
-
const visited = /* @__PURE__ */ new Set();
|
|
122
|
-
const result = [];
|
|
123
|
-
function traverse(id, depth, pathSoFar) {
|
|
124
|
-
if (depth > maxDepth || visited.has(id))
|
|
125
|
-
return;
|
|
126
|
-
visited.add(id);
|
|
127
|
-
const node = graph.get(id);
|
|
128
|
-
if (!node)
|
|
129
|
-
return;
|
|
130
|
-
for (const dep of node.blocks) {
|
|
131
|
-
if (!visited.has(dep)) {
|
|
132
|
-
result.push({ id: dep, depth, path: [...pathSoFar, dep] });
|
|
133
|
-
traverse(dep, depth + 1, [...pathSoFar, dep]);
|
|
134
|
-
}
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
traverse(wuId, 1, [wuId]);
|
|
138
|
-
return result;
|
|
139
|
-
}
|
|
140
|
-
function renderASCII(graph, rootId, options = {}) {
|
|
141
|
-
const { direction = "both", depth: maxDepth = 3 } = options;
|
|
142
|
-
const lines = [];
|
|
143
|
-
const root = graph.get(rootId);
|
|
144
|
-
if (!root) {
|
|
145
|
-
return `WU not found: ${rootId}`;
|
|
146
|
-
}
|
|
147
|
-
lines.push(`${rootId}: ${truncate(root.title, 50)}`);
|
|
148
|
-
lines.push("");
|
|
149
|
-
if (direction === "up" || direction === "both") {
|
|
150
|
-
const upstream = getUpstreamDependencies(graph, rootId, maxDepth);
|
|
151
|
-
if (upstream.length > 0) {
|
|
152
|
-
lines.push("Dependencies (blocked by):");
|
|
153
|
-
for (const dep of upstream) {
|
|
154
|
-
const node = graph.get(dep.id);
|
|
155
|
-
const status = node ? `[${node.status}]` : "[unknown]";
|
|
156
|
-
const title = node ? truncate(node.title, 40) : "";
|
|
157
|
-
const indent = " ".repeat(dep.depth);
|
|
158
|
-
lines.push(`${indent}+-- ${dep.id}: ${title} ${status}`);
|
|
159
|
-
}
|
|
160
|
-
lines.push("");
|
|
161
|
-
}
|
|
162
|
-
}
|
|
163
|
-
if (direction === "down" || direction === "both") {
|
|
164
|
-
const downstream = getDownstreamDependents(graph, rootId, maxDepth);
|
|
165
|
-
if (downstream.length > 0) {
|
|
166
|
-
lines.push("Dependents (blocks):");
|
|
167
|
-
for (const dep of downstream) {
|
|
168
|
-
const node = graph.get(dep.id);
|
|
169
|
-
const status = node ? `[${node.status}]` : "[unknown]";
|
|
170
|
-
const title = node ? truncate(node.title, 40) : "";
|
|
171
|
-
const indent = " ".repeat(dep.depth);
|
|
172
|
-
lines.push(`${indent}+-- ${dep.id}: ${title} ${status}`);
|
|
173
|
-
}
|
|
174
|
-
lines.push("");
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
const cycleResult = detectCycles(toCycleDetectorGraph(graph));
|
|
178
|
-
if (cycleResult.hasCycle) {
|
|
179
|
-
lines.push("\u26A0\uFE0F Circular dependencies detected:");
|
|
180
|
-
for (const cycle of cycleResult.cycles) {
|
|
181
|
-
lines.push(` ${cycle.join(" \u2192 ")}`);
|
|
182
|
-
}
|
|
183
|
-
lines.push("");
|
|
184
|
-
}
|
|
185
|
-
return lines.join(STRING_LITERALS.NEWLINE);
|
|
186
|
-
}
|
|
187
|
-
function renderMermaid(graph, options = {}) {
|
|
188
|
-
const { rootId, direction = "TD", depth: maxDepth = 3 } = options;
|
|
189
|
-
const lines = [];
|
|
190
|
-
const nodes = /* @__PURE__ */ new Set();
|
|
191
|
-
const edges = [];
|
|
192
|
-
if (rootId) {
|
|
193
|
-
const upstream = getUpstreamDependencies(graph, rootId, maxDepth);
|
|
194
|
-
const downstream = getDownstreamDependents(graph, rootId, maxDepth);
|
|
195
|
-
nodes.add(rootId);
|
|
196
|
-
for (const dep of upstream) {
|
|
197
|
-
nodes.add(dep.id);
|
|
198
|
-
}
|
|
199
|
-
for (const dep of downstream) {
|
|
200
|
-
nodes.add(dep.id);
|
|
201
|
-
}
|
|
202
|
-
for (const nodeId of nodes) {
|
|
203
|
-
const node = graph.get(nodeId);
|
|
204
|
-
if (!node)
|
|
205
|
-
continue;
|
|
206
|
-
for (const blockedBy of node.blockedBy) {
|
|
207
|
-
if (nodes.has(blockedBy)) {
|
|
208
|
-
edges.push({ from: blockedBy, to: nodeId });
|
|
209
|
-
}
|
|
210
|
-
}
|
|
211
|
-
}
|
|
212
|
-
} else {
|
|
213
|
-
for (const [nodeId, node] of graph.entries()) {
|
|
214
|
-
nodes.add(nodeId);
|
|
215
|
-
for (const blockedBy of node.blockedBy) {
|
|
216
|
-
if (graph.has(blockedBy)) {
|
|
217
|
-
edges.push({ from: blockedBy, to: nodeId });
|
|
218
|
-
}
|
|
219
|
-
}
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
lines.push(`flowchart ${direction}`);
|
|
223
|
-
for (const nodeId of nodes) {
|
|
224
|
-
const node = graph.get(nodeId);
|
|
225
|
-
if (node) {
|
|
226
|
-
const shortTitle = truncate(node.title, 30);
|
|
227
|
-
lines.push(` ${nodeId}["${nodeId}: ${shortTitle}<br/>${node.status}"]`);
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
lines.push("");
|
|
231
|
-
for (const { from, to } of edges) {
|
|
232
|
-
lines.push(` ${from} --> ${to}`);
|
|
233
|
-
}
|
|
234
|
-
lines.push("");
|
|
235
|
-
lines.push(" classDef done fill:#86efac,stroke:#22c55e");
|
|
236
|
-
lines.push(" classDef in_progress fill:#93c5fd,stroke:#3b82f6");
|
|
237
|
-
lines.push(" classDef ready fill:#fde68a,stroke:#f59e0b");
|
|
238
|
-
lines.push(" classDef blocked fill:#fca5a5,stroke:#ef4444");
|
|
239
|
-
const statusGroups = {
|
|
240
|
-
done: [],
|
|
241
|
-
in_progress: [],
|
|
242
|
-
ready: [],
|
|
243
|
-
blocked: []
|
|
244
|
-
};
|
|
245
|
-
for (const nodeId of nodes) {
|
|
246
|
-
const node = graph.get(nodeId);
|
|
247
|
-
if (node && isGraphStatus(node.status)) {
|
|
248
|
-
statusGroups[node.status].push(nodeId);
|
|
249
|
-
}
|
|
250
|
-
}
|
|
251
|
-
for (const [status, nodeIds] of Object.entries(statusGroups)) {
|
|
252
|
-
if (nodeIds.length > 0) {
|
|
253
|
-
lines.push(` class ${nodeIds.join(",")} ${status}`);
|
|
254
|
-
}
|
|
255
|
-
}
|
|
256
|
-
return lines.join(STRING_LITERALS.NEWLINE);
|
|
257
|
-
}
|
|
258
|
-
function validateGraph(graph) {
|
|
259
|
-
const allIds = new Set(graph.keys());
|
|
260
|
-
const orphans = [];
|
|
261
|
-
for (const [wuId, node] of graph.entries()) {
|
|
262
|
-
for (const ref of [...node.blocks, ...node.blockedBy]) {
|
|
263
|
-
if (!allIds.has(ref)) {
|
|
264
|
-
orphans.push({ wuId, ref });
|
|
265
|
-
}
|
|
266
|
-
}
|
|
267
|
-
}
|
|
268
|
-
const cycleResult = detectCycles(toCycleDetectorGraph(graph));
|
|
269
|
-
return {
|
|
270
|
-
hasCycle: cycleResult.hasCycle,
|
|
271
|
-
cycles: cycleResult.cycles,
|
|
272
|
-
orphans
|
|
273
|
-
};
|
|
274
|
-
}
|
|
275
|
-
function truncate(str, maxLen) {
|
|
276
|
-
if (!str)
|
|
277
|
-
return "";
|
|
278
|
-
return str.length > maxLen ? `${str.substring(0, maxLen - 3)}...` : str;
|
|
279
|
-
}
|
|
280
|
-
|
|
281
|
-
export {
|
|
282
|
-
buildDependencyGraph,
|
|
283
|
-
buildDependencyGraphAsync,
|
|
284
|
-
renderASCII,
|
|
285
|
-
renderMermaid,
|
|
286
|
-
validateGraph
|
|
287
|
-
};
|