@tomflow/proflow-platform-cli 0.1.41 → 0.1.43
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/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.43
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Close the Fresh deployment deadlock between Custom GPT provisioning and Gateway runtime startup: materialize the Agent Runtime owned durable Role credential store during deployment setup, and temporarily bootstrap only the required service dependency closure while agent-package setup performs real Gateway health and authenticated Action verification.
|
|
8
|
+
|
|
9
|
+
## 0.1.42
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Repack the Deployment Closeout release from freshly rebuilt artifacts and enforce build + publishability before every canonical publish.
|
|
14
|
+
|
|
3
15
|
## 0.1.41
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
|
|
|
6
6
|
readonly ok: true;
|
|
7
7
|
readonly status: "SUCCEEDED";
|
|
8
8
|
readonly moduleRef: "platform-cli";
|
|
9
|
-
readonly moduleVersion: "0.1.
|
|
9
|
+
readonly moduleVersion: "0.1.43";
|
|
10
10
|
};
|
|
11
11
|
observedEffects: never[];
|
|
12
12
|
}>;
|
|
@@ -16,7 +16,7 @@ export declare const behaviorAdapter: {
|
|
|
16
16
|
readonly ok: true;
|
|
17
17
|
readonly status: "SUCCEEDED";
|
|
18
18
|
readonly moduleRef: "platform-cli";
|
|
19
|
-
readonly moduleVersion: "0.1.
|
|
19
|
+
readonly moduleVersion: "0.1.43";
|
|
20
20
|
};
|
|
21
21
|
observedEffects: never[];
|
|
22
22
|
}>;
|
|
@@ -26,7 +26,7 @@ export declare const behaviorAdapter: {
|
|
|
26
26
|
ok: true;
|
|
27
27
|
status: "SUCCEEDED";
|
|
28
28
|
moduleRef: "platform-cli";
|
|
29
|
-
moduleVersion: "0.1.
|
|
29
|
+
moduleVersion: "0.1.43";
|
|
30
30
|
data: {
|
|
31
31
|
readonly setupStatus: "READY";
|
|
32
32
|
readonly runtimeStatus: "NOT_APPLICABLE";
|
|
@@ -40,7 +40,7 @@ export declare const behaviorAdapter: {
|
|
|
40
40
|
readonly ok: true;
|
|
41
41
|
readonly status: "SUCCEEDED";
|
|
42
42
|
readonly moduleRef: "platform-cli";
|
|
43
|
-
readonly moduleVersion: "0.1.
|
|
43
|
+
readonly moduleVersion: "0.1.43";
|
|
44
44
|
};
|
|
45
45
|
observedEffects: never[];
|
|
46
46
|
}>;
|
|
@@ -50,7 +50,7 @@ export declare const behaviorAdapter: {
|
|
|
50
50
|
ok: true;
|
|
51
51
|
status: "SUCCEEDED";
|
|
52
52
|
moduleRef: "platform-cli";
|
|
53
|
-
moduleVersion: "0.1.
|
|
53
|
+
moduleVersion: "0.1.43";
|
|
54
54
|
data: {
|
|
55
55
|
docs: string;
|
|
56
56
|
};
|
|
@@ -63,7 +63,7 @@ export declare const behaviorAdapter: {
|
|
|
63
63
|
readonly ok: true;
|
|
64
64
|
readonly status: "SUCCEEDED";
|
|
65
65
|
readonly moduleRef: "platform-cli";
|
|
66
|
-
readonly moduleVersion: "0.1.
|
|
66
|
+
readonly moduleVersion: "0.1.43";
|
|
67
67
|
};
|
|
68
68
|
observedEffects: never[];
|
|
69
69
|
}>;
|
|
@@ -73,7 +73,7 @@ export declare const behaviorAdapter: {
|
|
|
73
73
|
readonly ok: true;
|
|
74
74
|
readonly status: "SUCCEEDED";
|
|
75
75
|
readonly moduleRef: "platform-cli";
|
|
76
|
-
readonly moduleVersion: "0.1.
|
|
76
|
+
readonly moduleVersion: "0.1.43";
|
|
77
77
|
};
|
|
78
78
|
observedEffects: never[];
|
|
79
79
|
}>;
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "platform-cli";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-platform-cli";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.43";
|
|
7
7
|
readonly kind: "cli";
|
|
8
8
|
readonly templateVersion: "1.0.0";
|
|
9
9
|
readonly platformCompatibility: ">=1.0.0 <2.0.0";
|
|
@@ -3,7 +3,7 @@ export const descriptor = {
|
|
|
3
3
|
contractVersion: "1.0.0",
|
|
4
4
|
moduleRef: "platform-cli",
|
|
5
5
|
packageName: "@tomflow/proflow-platform-cli",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.43",
|
|
7
7
|
kind: "cli",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
@@ -222,27 +222,85 @@ export async function setupModulesThin(catalog, modules, workspaceRoot, target,
|
|
|
222
222
|
.map((moduleRef) => byRef.get(moduleRef))
|
|
223
223
|
.filter((module) => module !== undefined);
|
|
224
224
|
let completed = true;
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
225
|
+
const temporaryRuntimeRefs = [];
|
|
226
|
+
const temporaryRuntimeSet = new Set();
|
|
227
|
+
const dependencyClosure = (moduleRef) => {
|
|
228
|
+
const closure = new Set();
|
|
229
|
+
const visit = (ref) => {
|
|
230
|
+
for (const dependency of dependenciesByRef.get(ref) ?? []) {
|
|
231
|
+
if (closure.has(dependency))
|
|
232
|
+
continue;
|
|
233
|
+
closure.add(dependency);
|
|
234
|
+
visit(dependency);
|
|
235
|
+
}
|
|
236
|
+
};
|
|
237
|
+
visit(moduleRef);
|
|
238
|
+
return closure;
|
|
239
|
+
};
|
|
240
|
+
const ensureSetupRuntimeDependencies = async (module) => {
|
|
241
|
+
if (module.kind !== "agent-package")
|
|
242
|
+
return true;
|
|
243
|
+
const closure = dependencyClosure(module.moduleRef);
|
|
244
|
+
for (const dependencyRef of graph.order) {
|
|
245
|
+
if (!closure.has(dependencyRef))
|
|
246
|
+
continue;
|
|
247
|
+
const dependency = byRef.get(dependencyRef);
|
|
248
|
+
if (dependency?.kind !== "service")
|
|
249
|
+
continue;
|
|
250
|
+
const status = await dispatchModuleCommand(catalog, dependency, "status", context(workspaceRoot));
|
|
251
|
+
if (!succeeded(status.result)) {
|
|
252
|
+
blockers.push({
|
|
253
|
+
moduleRef: dependencyRef,
|
|
254
|
+
setupStatus: "FAILED",
|
|
255
|
+
reason: status.result.error?.message ?? "临时运行依赖状态检查失败",
|
|
256
|
+
});
|
|
257
|
+
completed = false;
|
|
258
|
+
return false;
|
|
259
|
+
}
|
|
260
|
+
const observed = moduleStatusObservationSchema.parse(status.result.data);
|
|
261
|
+
if (observed.setupStatus !== "READY") {
|
|
262
|
+
const issue = observed.issues?.find((item) => item.scope === "SETUP");
|
|
263
|
+
blockers.push({
|
|
264
|
+
moduleRef: dependencyRef,
|
|
265
|
+
setupStatus: observed.setupStatus,
|
|
266
|
+
...(issue
|
|
267
|
+
? { reason: issue.message, nextCommand: issue.nextCommand }
|
|
268
|
+
: {}),
|
|
269
|
+
});
|
|
270
|
+
completed = false;
|
|
271
|
+
return false;
|
|
272
|
+
}
|
|
273
|
+
if (observed.runtimeStatus === "RUNNING" ||
|
|
274
|
+
observed.runtimeStatus === "NOT_APPLICABLE")
|
|
275
|
+
continue;
|
|
276
|
+
if (observed.runtimeStatus !== "STOPPED") {
|
|
277
|
+
blockers.push({
|
|
278
|
+
moduleRef: dependencyRef,
|
|
279
|
+
setupStatus: "FAILED",
|
|
280
|
+
reason: `临时运行依赖 ${dependencyRef} 处于 ${observed.runtimeStatus}`,
|
|
281
|
+
});
|
|
282
|
+
completed = false;
|
|
283
|
+
return false;
|
|
284
|
+
}
|
|
285
|
+
const started = await dispatchModuleCommand(catalog, dependency, "start", context(workspaceRoot));
|
|
286
|
+
if (!succeeded(started.result)) {
|
|
287
|
+
blockers.push({
|
|
288
|
+
moduleRef: dependencyRef,
|
|
289
|
+
setupStatus: "FAILED",
|
|
290
|
+
reason: started.result.error?.message ?? `临时启动 ${dependencyRef} 失败`,
|
|
291
|
+
});
|
|
292
|
+
completed = false;
|
|
293
|
+
return false;
|
|
294
|
+
}
|
|
295
|
+
if (!temporaryRuntimeSet.has(dependencyRef)) {
|
|
296
|
+
temporaryRuntimeSet.add(dependencyRef);
|
|
297
|
+
temporaryRuntimeRefs.push(dependencyRef);
|
|
298
|
+
}
|
|
242
299
|
}
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
300
|
+
return true;
|
|
301
|
+
};
|
|
302
|
+
try {
|
|
303
|
+
for (const [index, module] of modulesInOrder.entries()) {
|
|
246
304
|
reportProgress(reporter, {
|
|
247
305
|
command: "setup",
|
|
248
306
|
phase: "setup",
|
|
@@ -251,53 +309,93 @@ export async function setupModulesThin(catalog, modules, workspaceRoot, target,
|
|
|
251
309
|
current: index + 1,
|
|
252
310
|
total: modulesInOrder.length,
|
|
253
311
|
moduleRef: module.moduleRef,
|
|
254
|
-
status: "
|
|
312
|
+
status: "STARTED",
|
|
255
313
|
message: module.moduleRef,
|
|
256
314
|
});
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
? "ACTION_REQUIRED"
|
|
274
|
-
: "FAILED",
|
|
275
|
-
message: module.moduleRef,
|
|
276
|
-
});
|
|
277
|
-
if (!succeeded(setup.result)) {
|
|
278
|
-
completed = false;
|
|
279
|
-
}
|
|
280
|
-
const reconciled = await dispatchModuleCommand(catalog, module, "status", context(workspaceRoot));
|
|
281
|
-
if (!succeeded(reconciled.result)) {
|
|
282
|
-
results.push(reconciled);
|
|
283
|
-
completed = false;
|
|
284
|
-
}
|
|
285
|
-
else {
|
|
286
|
-
const reconciledStatus = moduleStatusObservationSchema.parse(reconciled.result.data);
|
|
287
|
-
if (reconciledStatus.setupStatus !== "READY") {
|
|
288
|
-
const issue = reconciledStatus.issues?.find((item) => item.scope === "SETUP");
|
|
289
|
-
blockers.push({
|
|
315
|
+
const status = await dispatchModuleCommand(catalog, module, "status", context(workspaceRoot));
|
|
316
|
+
if (!succeeded(status.result)) {
|
|
317
|
+
results.push(status);
|
|
318
|
+
completed = false;
|
|
319
|
+
break;
|
|
320
|
+
}
|
|
321
|
+
const observed = moduleStatusObservationSchema.parse(status.result.data);
|
|
322
|
+
if (observed.setupStatus === "READY" && target === undefined) {
|
|
323
|
+
skipped.push({ moduleRef: module.moduleRef, reason: "READY" });
|
|
324
|
+
reportProgress(reporter, {
|
|
325
|
+
command: "setup",
|
|
326
|
+
phase: "setup",
|
|
327
|
+
kind: "detail",
|
|
328
|
+
retention: "REPLACE",
|
|
329
|
+
current: index + 1,
|
|
330
|
+
total: modulesInOrder.length,
|
|
290
331
|
moduleRef: module.moduleRef,
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
? {}
|
|
294
|
-
: { reason: issue.message, nextCommand: issue.nextCommand }),
|
|
332
|
+
status: "SKIPPED",
|
|
333
|
+
message: module.moduleRef,
|
|
295
334
|
});
|
|
335
|
+
continue;
|
|
336
|
+
}
|
|
337
|
+
if (!(await ensureSetupRuntimeDependencies(module)))
|
|
338
|
+
break;
|
|
339
|
+
await beforeSetup?.(module.moduleRef);
|
|
340
|
+
const setup = await dispatchModuleCommand(catalog, module, "setup", context(workspaceRoot, target?.input));
|
|
341
|
+
results.push(setup);
|
|
342
|
+
reportProgress(reporter, {
|
|
343
|
+
command: "setup",
|
|
344
|
+
phase: "setup",
|
|
345
|
+
kind: "detail",
|
|
346
|
+
retention: "REPLACE",
|
|
347
|
+
current: index + 1,
|
|
348
|
+
total: modulesInOrder.length,
|
|
349
|
+
moduleRef: module.moduleRef,
|
|
350
|
+
status: succeeded(setup.result)
|
|
351
|
+
? "SUCCEEDED"
|
|
352
|
+
: setup.result.status === "ACTION_REQUIRED"
|
|
353
|
+
? "ACTION_REQUIRED"
|
|
354
|
+
: "FAILED",
|
|
355
|
+
message: module.moduleRef,
|
|
356
|
+
});
|
|
357
|
+
if (!succeeded(setup.result)) {
|
|
296
358
|
completed = false;
|
|
297
359
|
}
|
|
360
|
+
const reconciled = await dispatchModuleCommand(catalog, module, "status", context(workspaceRoot));
|
|
361
|
+
if (!succeeded(reconciled.result)) {
|
|
362
|
+
results.push(reconciled);
|
|
363
|
+
completed = false;
|
|
364
|
+
}
|
|
365
|
+
else {
|
|
366
|
+
const reconciledStatus = moduleStatusObservationSchema.parse(reconciled.result.data);
|
|
367
|
+
if (reconciledStatus.setupStatus !== "READY") {
|
|
368
|
+
const issue = reconciledStatus.issues?.find((item) => item.scope === "SETUP");
|
|
369
|
+
blockers.push({
|
|
370
|
+
moduleRef: module.moduleRef,
|
|
371
|
+
setupStatus: reconciledStatus.setupStatus,
|
|
372
|
+
...(issue === undefined
|
|
373
|
+
? {}
|
|
374
|
+
: { reason: issue.message, nextCommand: issue.nextCommand }),
|
|
375
|
+
});
|
|
376
|
+
completed = false;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
if (!succeeded(setup.result) || blockers.length > 0)
|
|
380
|
+
break;
|
|
381
|
+
}
|
|
382
|
+
}
|
|
383
|
+
finally {
|
|
384
|
+
for (const dependencyRef of [...temporaryRuntimeRefs].reverse()) {
|
|
385
|
+
const dependency = byRef.get(dependencyRef);
|
|
386
|
+
if (!dependency)
|
|
387
|
+
continue;
|
|
388
|
+
const stopped = await dispatchModuleCommand(catalog, dependency, "stop", context(workspaceRoot));
|
|
389
|
+
if (!succeeded(stopped.result)) {
|
|
390
|
+
completed = false;
|
|
391
|
+
blockers.push({
|
|
392
|
+
moduleRef: dependencyRef,
|
|
393
|
+
setupStatus: "FAILED",
|
|
394
|
+
reason: stopped.result.error?.message ??
|
|
395
|
+
`临时运行依赖 ${dependencyRef} 清理失败`,
|
|
396
|
+
});
|
|
397
|
+
}
|
|
298
398
|
}
|
|
299
|
-
if (!succeeded(setup.result) || blockers.length > 0)
|
|
300
|
-
break;
|
|
301
399
|
}
|
|
302
400
|
return {
|
|
303
401
|
phase: "setup",
|
package/package.json
CHANGED
package/proflow.module.json
CHANGED