@tomflow/proflow-platform-cli 0.1.24 → 0.1.26

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,43 +1,7 @@
1
1
  # @tomflow/proflow-platform-cli
2
2
 
3
- ## 0.1.24
3
+ ## 0.1.26
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Merge pnpm policy ownership across repeated installs so uninstall removes every ProFlow-introduced version exclusion while preserving user-owned entries.
8
-
9
- ## 0.1.23
10
-
11
- ### Patch Changes
12
-
13
- - Resolve DOCS.md from both source and built deployment adapters, prove all 24 built adapters return the published body, and announce package synchronization before the package manager blocks.
14
-
15
- ## 0.1.22
16
-
17
- ### Patch Changes
18
-
19
- - Replace JSON terminal protocols with typed CLI outcomes, add real-time Chinese progress and lifecycle summaries, publish DOCS content, standardize executable setup plans and package-owned setup commands, and preserve only user-owned pnpm policy during uninstall.
20
-
21
- ## 0.1.21
22
-
23
- ### Patch Changes
24
-
25
- - Republish the contract closure packages with rebuilt distribution artifacts so runtime descriptors and CLI version output match package metadata.
26
-
27
- ## 0.1.20
28
-
29
- ### Patch Changes
30
-
31
- - Close the frozen seven-command contract: enforce start and install safety gates, align Module result semantics and published documentation, and refresh current test evidence.
32
-
33
- ## 0.1.19
34
-
35
- ### Patch Changes
36
-
37
- - Preserve the complete platform setup guidance when machine failures and human actions are present together.
38
-
39
- ## 0.1.18
40
-
41
- ### Patch Changes
42
-
43
- - Align all Modules to the seven-command setup contract with executable package-owned setup guidance and full Platform setup aggregation.
7
+ - Republish the setup summary fix with installable registry dependency metadata.
@@ -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.24";
9
+ readonly moduleVersion: "0.1.26";
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.24";
19
+ readonly moduleVersion: "0.1.26";
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.24";
29
+ moduleVersion: "0.1.26";
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.24";
43
+ readonly moduleVersion: "0.1.26";
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.24";
53
+ moduleVersion: "0.1.26";
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.24";
66
+ readonly moduleVersion: "0.1.26";
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.24";
76
+ readonly moduleVersion: "0.1.26";
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.24";
6
+ readonly moduleVersion: "0.1.26";
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.24",
6
+ moduleVersion: "0.1.26",
7
7
  kind: "cli",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
package/dist/src/cli.js CHANGED
@@ -480,18 +480,23 @@ function renderSetup(data) {
480
480
  if (!isRecord(data) || !Array.isArray(data.results))
481
481
  return "没有需要执行的配置步骤。";
482
482
  const lines = ["ProFlow 配置", ""];
483
- let automatic = 0;
484
- let pending = 0;
483
+ const skipped = Array.isArray(data.skipped) ? data.skipped : [];
484
+ let ready = skipped.filter((item) => isRecord(item) && item.reason === "READY").length;
485
+ let needsAction = 0;
486
+ let blocked = 0;
485
487
  for (const raw of data.results) {
486
488
  if (!isRecord(raw) || !isRecord(raw.result))
487
489
  continue;
488
490
  const moduleRef = String(raw.moduleRef ?? raw.result.moduleRef ?? "unknown");
489
491
  const status = String(raw.result.status ?? "UNKNOWN");
490
492
  if (status === "SUCCEEDED") {
491
- automatic += 1;
493
+ ready += 1;
492
494
  continue;
493
495
  }
494
- pending += 1;
496
+ if (status === "FAILED")
497
+ blocked += 1;
498
+ else
499
+ needsAction += 1;
495
500
  lines.push(moduleRef);
496
501
  const plan = moduleSetupPlanDataSchema.safeParse(raw.result.data);
497
502
  if (plan.success) {
@@ -533,11 +538,9 @@ function renderSetup(data) {
533
538
  }
534
539
  lines.push("");
535
540
  }
536
- if (pending === 0)
537
- lines.push("全部模块均已就绪。 ");
538
- if (automatic > 0)
539
- lines.push(`本次自动完成:${automatic} 个模块`);
540
- lines.push(`汇总:${automatic} 个已就绪,${pending} 个待处理`);
541
+ if (needsAction === 0 && blocked === 0)
542
+ lines.push("全部模块均已就绪。");
543
+ lines.push(`汇总:${ready} 个已就绪,${needsAction} 个需要操作,${blocked} 个系统阻塞`);
541
544
  return lines.join("\n").trimEnd();
542
545
  }
543
546
  export function renderHumanResult(result) {
@@ -17,7 +17,7 @@ export interface ModuleBatchResult {
17
17
  }>;
18
18
  skipped?: Array<{
19
19
  moduleRef: string;
20
- reason: "RUNNING" | "STOPPED" | "NOT_APPLICABLE";
20
+ reason: "READY" | "RUNNING" | "STOPPED" | "NOT_APPLICABLE";
21
21
  }>;
22
22
  }
23
23
  export declare function observeStatuses(catalog: ModuleCatalog, modules: readonly ResolvedModule[], workspaceRoot: string, reporter?: PlatformProgressReporter): Promise<ModuleDispatchResult[]>;
@@ -152,6 +152,7 @@ export async function stopModulesThin(catalog, modules, workspaceRoot, reporter)
152
152
  }
153
153
  export async function setupModulesThin(catalog, modules, workspaceRoot, target, reporter) {
154
154
  const results = [];
155
+ const skipped = [];
155
156
  let matched = target === undefined;
156
157
  let completed = true;
157
158
  const modulesInOrder = ordered(modules);
@@ -178,6 +179,7 @@ export async function setupModulesThin(catalog, modules, workspaceRoot, target,
178
179
  }
179
180
  const observed = moduleStatusObservationSchema.parse(status.result.data);
180
181
  if (observed.setupStatus === "READY" && target?.input === undefined) {
182
+ skipped.push({ moduleRef: module.moduleRef, reason: "READY" });
181
183
  reportProgress(reporter, {
182
184
  command: "setup",
183
185
  phase: "setup",
@@ -200,7 +202,7 @@ export async function setupModulesThin(catalog, modules, workspaceRoot, target,
200
202
  status: succeeded(setup.result)
201
203
  ? "SUCCEEDED"
202
204
  : setup.result.status === "ACTION_REQUIRED"
203
- ? "SKIPPED"
205
+ ? "ACTION_REQUIRED"
204
206
  : "FAILED",
205
207
  message: module.moduleRef,
206
208
  });
@@ -212,7 +214,7 @@ export async function setupModulesThin(catalog, modules, workspaceRoot, target,
212
214
  }
213
215
  if (!matched)
214
216
  throw new PlatformError("INVALID_REQUEST", `setup target module ${target?.moduleRef ?? ""} was not discovered`);
215
- return { phase: "setup", results, completed };
217
+ return { phase: "setup", results, completed, skipped };
216
218
  }
217
219
  export async function startModulesThin(catalog, modules, workspaceRoot, reporter) {
218
220
  const results = [];
@@ -12,11 +12,13 @@ function progressLine(event, color) {
12
12
  : "";
13
13
  const suffix = event.status === "SUCCEEDED"
14
14
  ? "完成"
15
- : event.status === "FAILED"
16
- ? "失败"
17
- : event.status === "SKIPPED"
18
- ? "跳过"
19
- : "";
15
+ : event.status === "ACTION_REQUIRED"
16
+ ? "待处理"
17
+ : event.status === "FAILED"
18
+ ? "失败"
19
+ : event.status === "SKIPPED"
20
+ ? "跳过"
21
+ : "";
20
22
  if (!color || suffix === "")
21
23
  return `${prefix}${event.message}${suffix ? `… ${suffix}` : "…"}`;
22
24
  const tone = event.status === "SUCCEEDED"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-platform-cli",
3
- "version": "0.1.24",
3
+ "version": "0.1.26",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -27,8 +27,8 @@
27
27
  "@tomflow/proflow-module-contract": "^0.1.9"
28
28
  },
29
29
  "devDependencies": {
30
- "@tomflow/proflow-deployment-conformance": "^0.1.7",
31
- "@tomflow/proflow-module-template": "^0.1.7"
30
+ "@tomflow/proflow-module-template": "^0.1.7",
31
+ "@tomflow/proflow-deployment-conformance": "^0.1.7"
32
32
  },
33
33
  "description": "Thin Platform CLI for Module discovery, documentation, package synchronization and lifecycle orchestration.",
34
34
  "keywords": [
@@ -3,7 +3,7 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "platform-cli",
5
5
  "packageName": "@tomflow/proflow-platform-cli",
6
- "moduleVersion": "0.1.24",
6
+ "moduleVersion": "0.1.26",
7
7
  "kind": "cli",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",