@tomflow/proflow-platform-cli 0.1.18 → 0.1.20
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 +12 -0
- package/README.md +32 -28
- package/dist/deployment/adapter.d.ts +7 -7
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/cli.js +12 -0
- package/package.json +2 -2
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-cli
|
|
2
2
|
|
|
3
|
+
## 0.1.20
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Close the frozen seven-command contract: enforce start and install safety gates, align Module result semantics and published documentation, and refresh current test evidence.
|
|
8
|
+
|
|
9
|
+
## 0.1.19
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Preserve the complete platform setup guidance when machine failures and human actions are present together.
|
|
14
|
+
|
|
3
15
|
## 0.1.18
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,64 +1,68 @@
|
|
|
1
1
|
# @tomflow/proflow-platform-cli
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Thin Workspace-level orchestration CLI for ProFlow package discovery, dependency ordering, command forwarding, result aggregation and package-manager operations.
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## Standard CLI
|
|
6
|
+
|
|
7
|
+
The top-level management surface is exactly seven commands:
|
|
6
8
|
|
|
7
9
|
```bash
|
|
8
|
-
platform modules
|
|
9
|
-
platform docs
|
|
10
10
|
platform install
|
|
11
11
|
platform uninstall
|
|
12
|
+
platform status
|
|
13
|
+
platform setup
|
|
14
|
+
platform docs
|
|
12
15
|
platform start
|
|
13
16
|
platform stop
|
|
14
17
|
```
|
|
15
18
|
|
|
16
|
-
Removed
|
|
19
|
+
Removed Platform routes such as `modules`, `preflight`, `verify`, `doctor`, `restart`, `plan`, `apply`, `upgrade` and `manifest` are not routable. Module-specific commands remain owned by their Module and are not proxied by Platform.
|
|
20
|
+
|
|
21
|
+
All seven commands accept `--workspace <path>`; without it, the CLI uses `process.cwd()`.
|
|
17
22
|
|
|
18
23
|
## Ownership
|
|
19
24
|
|
|
20
25
|
```text
|
|
21
|
-
Module
|
|
22
|
-
Platform
|
|
23
|
-
Package manager owns npm dependency
|
|
26
|
+
Module owns its behavior, private configuration and operational truth.
|
|
27
|
+
Platform owns discovery, dependency ordering, invocation, aggregation and package-manager orchestration.
|
|
28
|
+
Package manager owns npm dependency mutation.
|
|
24
29
|
```
|
|
25
30
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
`platform install [--workspace <path>]` resolves the explicit workspace or `process.cwd()`. The other five commands operate on `process.cwd()` and do not depend on a global current-workspace binding.
|
|
31
|
+
Platform does not interpret Module-private configuration or recreate a cross-Module configuration bus.
|
|
29
32
|
|
|
30
|
-
|
|
33
|
+
## Install / Uninstall
|
|
31
34
|
|
|
32
|
-
|
|
35
|
+
`platform install` validates or creates the minimal Workspace metadata, discovers the complete governed package set from the Registry, synchronizes that set, validates the installed descriptors, then invokes `Module.install` in dependency order. It does not perform human setup work.
|
|
33
36
|
|
|
34
|
-
|
|
37
|
+
`platform uninstall` invokes `Module.uninstall` in reverse dependency order before package removal. `.proflow` is Workspace/user data and is preserved unless an owning Module explicitly removes its own artifacts.
|
|
35
38
|
|
|
36
|
-
|
|
39
|
+
## Status
|
|
37
40
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
`platform modules` aggregates Module-owned status observations only:
|
|
41
|
+
`platform status` validates and aggregates only Module-owned observations:
|
|
41
42
|
|
|
42
43
|
```text
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
configStatus: READY | INCOMPLETE | INVALID
|
|
46
|
-
missingConfig? # only when INCOMPLETE
|
|
47
|
-
runtimeStatus: RUNNING | STOPPED | FAILED | UNKNOWN
|
|
44
|
+
setupStatus: READY | ACTION_REQUIRED | FAILED
|
|
45
|
+
runtimeStatus: RUNNING | STOPPED | FAILED | NOT_APPLICABLE
|
|
48
46
|
```
|
|
49
47
|
|
|
50
|
-
Platform
|
|
48
|
+
There is no Platform-derived configuration status, missing-input list, overall readiness or verification state.
|
|
49
|
+
|
|
50
|
+
## Setup
|
|
51
|
+
|
|
52
|
+
`platform setup` scans all discovered Modules in dependency order. It skips `READY` Modules, invokes `Module.setup` for every non-ready Module, continues after `ACTION_REQUIRED` or `FAILED`, and returns one complete aggregate.
|
|
53
|
+
|
|
54
|
+
Targeted `platform setup --module <moduleRef> --input '<json>'` forwards opaque input to the owning Module. Platform neither interprets that input nor creates Module-specific instructions.
|
|
51
55
|
|
|
52
56
|
## Docs
|
|
53
57
|
|
|
54
|
-
`platform docs`
|
|
58
|
+
`platform docs` invokes and aggregates `Module.docs`. `DOCS.md` and `SETUP.md` remain Module-owned knowledge.
|
|
55
59
|
|
|
56
60
|
## Start / Stop
|
|
57
61
|
|
|
58
|
-
|
|
62
|
+
`platform start` first completes the dependency-ordered `Module.status` setup gate. If any applicable Module has `setupStatus != READY`, no `Module.start` call is made. Once every Module is ready, starts run in dependency order and fail fast. A start failure does not trigger automatic rollback.
|
|
59
63
|
|
|
60
|
-
|
|
64
|
+
`platform stop` invokes `Module.stop` in reverse dependency order and fails fast.
|
|
61
65
|
|
|
62
66
|
## Boundary
|
|
63
67
|
|
|
64
|
-
The CLI
|
|
68
|
+
The CLI remains a thin, generic orchestration layer. Adding a conforming Module must not require Module-specific Platform business logic.
|
|
@@ -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.19";
|
|
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.19";
|
|
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.19";
|
|
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.19";
|
|
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.19";
|
|
54
54
|
data: {
|
|
55
55
|
docs: string;
|
|
56
56
|
setup: string;
|
|
@@ -64,7 +64,7 @@ export declare const behaviorAdapter: {
|
|
|
64
64
|
readonly ok: true;
|
|
65
65
|
readonly status: "SUCCEEDED";
|
|
66
66
|
readonly moduleRef: "platform-cli";
|
|
67
|
-
readonly moduleVersion: "0.1.
|
|
67
|
+
readonly moduleVersion: "0.1.19";
|
|
68
68
|
};
|
|
69
69
|
observedEffects: never[];
|
|
70
70
|
}>;
|
|
@@ -74,7 +74,7 @@ export declare const behaviorAdapter: {
|
|
|
74
74
|
readonly ok: true;
|
|
75
75
|
readonly status: "SUCCEEDED";
|
|
76
76
|
readonly moduleRef: "platform-cli";
|
|
77
|
-
readonly moduleVersion: "0.1.
|
|
77
|
+
readonly moduleVersion: "0.1.19";
|
|
78
78
|
};
|
|
79
79
|
observedEffects: never[];
|
|
80
80
|
}>;
|
|
@@ -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.19";
|
|
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.19",
|
|
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
|
@@ -415,12 +415,20 @@ function renderSetup(data) {
|
|
|
415
415
|
pending += 1;
|
|
416
416
|
lines.push(`## ${moduleRef} — ${status}`);
|
|
417
417
|
const actionRequired = raw.result.actionRequired;
|
|
418
|
+
const error = raw.result.error;
|
|
418
419
|
if (isRecord(actionRequired)) {
|
|
419
420
|
if (actionRequired.action !== undefined)
|
|
420
421
|
lines.push(`Action: ${String(actionRequired.action)}`);
|
|
421
422
|
if (actionRequired.description !== undefined)
|
|
422
423
|
lines.push(String(actionRequired.description));
|
|
423
424
|
}
|
|
425
|
+
else if (isRecord(error)) {
|
|
426
|
+
const code = error.code === undefined ? "FAILED" : String(error.code);
|
|
427
|
+
const message = error.message === undefined
|
|
428
|
+
? "Module setup failed."
|
|
429
|
+
: String(error.message);
|
|
430
|
+
lines.push(`Error: ${code} — ${message}`);
|
|
431
|
+
}
|
|
424
432
|
else if (raw.result.data !== undefined) {
|
|
425
433
|
lines.push(JSON.stringify(raw.result.data, null, 2));
|
|
426
434
|
}
|
|
@@ -433,6 +441,10 @@ function renderSetup(data) {
|
|
|
433
441
|
return lines.join("\n").trimEnd();
|
|
434
442
|
}
|
|
435
443
|
export function renderHumanResult(result) {
|
|
444
|
+
if (result.command === "setup" &&
|
|
445
|
+
isRecord(result.data) &&
|
|
446
|
+
Array.isArray(result.data.results))
|
|
447
|
+
return renderSetup(result.data);
|
|
436
448
|
if (result.status === "FAILED")
|
|
437
449
|
return `${result.command.toUpperCase()} FAILED${result.error ? ` [${result.error.code}] ${result.error.message}` : ""}`;
|
|
438
450
|
if (result.command === "help")
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-platform-cli",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.20",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"SETUP.md"
|
|
24
24
|
],
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@tomflow/proflow-module-contract": "^0.1.
|
|
26
|
+
"@tomflow/proflow-module-contract": "^0.1.6"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@tomflow/proflow-module-template": "^0.1.5",
|
package/proflow.module.json
CHANGED