@tomflow/proflow-platform-cli 0.1.16 → 0.1.18

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/DOCS.md +27 -0
  3. package/SETUP.md +27 -0
  4. package/dist/deployment/adapter.d.ts +58 -34
  5. package/dist/deployment/adapter.js +28 -12
  6. package/dist/deployment/descriptor.d.ts +5 -16
  7. package/dist/deployment/descriptor.js +10 -21
  8. package/dist/src/cli.js +173 -140
  9. package/dist/src/contracts.d.ts +0 -2
  10. package/dist/src/discovery/discover.d.ts +1 -3
  11. package/dist/src/discovery/discover.js +1 -10
  12. package/dist/src/errors.d.ts +1 -1
  13. package/dist/src/errors.js +0 -2
  14. package/dist/src/index.d.ts +0 -2
  15. package/dist/src/index.js +0 -1
  16. package/dist/src/lifecycle/dispatch.d.ts +4 -11
  17. package/dist/src/lifecycle/dispatch.js +28 -56
  18. package/dist/src/lifecycle/index.d.ts +4 -4
  19. package/dist/src/lifecycle/index.js +2 -2
  20. package/dist/src/lifecycle/thin.d.ts +19 -7
  21. package/dist/src/lifecycle/thin.js +83 -53
  22. package/dist/src/persistence/index.d.ts +0 -2
  23. package/dist/src/persistence/index.js +0 -1
  24. package/package.json +7 -5
  25. package/proflow.module.json +5 -20
  26. package/dist/src/binding/production-bindings.d.ts +0 -37
  27. package/dist/src/binding/production-bindings.js +0 -75
  28. package/dist/src/docs/aggregate.d.ts +0 -18
  29. package/dist/src/docs/aggregate.js +0 -44
  30. package/dist/src/docs/docs.d.ts +0 -16
  31. package/dist/src/docs/docs.js +0 -68
  32. package/dist/src/docs/index.d.ts +0 -2
  33. package/dist/src/docs/index.js +0 -1
  34. package/dist/src/persistence/config.d.ts +0 -6
  35. package/dist/src/persistence/config.js +0 -54
  36. package/dist/src/persistence/guards.d.ts +0 -1
  37. package/dist/src/persistence/guards.js +0 -7
package/CHANGELOG.md ADDED
@@ -0,0 +1,7 @@
1
+ # @tomflow/proflow-platform-cli
2
+
3
+ ## 0.1.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Align all Modules to the seven-command setup contract with executable package-owned setup guidance and full Platform setup aggregation.
package/DOCS.md ADDED
@@ -0,0 +1,27 @@
1
+ # @tomflow/proflow-platform-cli — Module Docs
2
+
3
+ Module ref: `platform-cli`
4
+ Domain: `deployment-governance`
5
+ Kind: `cli`
6
+
7
+ Thin Platform CLI for Module discovery, documentation, package synchronization and lifecycle orchestration.
8
+
9
+ ## Standard management surface
10
+
11
+ `install / uninstall / status / setup / docs / start / stop`
12
+
13
+ ## Provides
14
+
15
+ - None.
16
+
17
+ ## Requires
18
+
19
+ - None.
20
+
21
+ ## Public setup inputs
22
+
23
+ - None. Deterministic/private values and cross-Module shared facts are not public configuration.
24
+
25
+ ## Ownership boundary
26
+
27
+ Module business APIs and any module-specific extra commands remain package-owned. Platform does not proxy or interpret them. Current human/external preparation is documented in `SETUP.md`.
package/SETUP.md ADDED
@@ -0,0 +1,27 @@
1
+ # @tomflow/proflow-platform-cli — Module Setup
2
+
3
+ The Platform CLI owns orchestration only. It never interprets another Module's setup details. Global `platform setup` traverses every discovered Module, skips `READY` Modules, lets each non-ready Module run its own package-owned setup workflow, and aggregates every remaining `ACTION_REQUIRED` or `FAILED` result in one response.
4
+
5
+ ## Step 1 — Verify the Platform CLI Module
6
+
7
+ **Executable:**
8
+
9
+ ```bash
10
+ platform setup --module platform-cli
11
+ ```
12
+
13
+ **Success condition:**
14
+
15
+ `platform status` reports `platform-cli setup=READY`. No user/private path, token, loopback endpoint, or cross-Module fact is requested.
16
+
17
+ ## Step 2 — Run the full workspace setup guide
18
+
19
+ **Executable:**
20
+
21
+ ```bash
22
+ platform setup
23
+ ```
24
+
25
+ **Success condition:**
26
+
27
+ All automatically solvable Module setup work is completed in the same run, and every remaining human/external action is listed together. Re-running the command re-observes reality and continues until all required Modules report `setupStatus=READY`.
@@ -1,57 +1,81 @@
1
+ import type { ModuleCommandContext } from "@tomflow/proflow-module-contract";
1
2
  export declare const behaviorAdapter: {
2
- describe: () => {
3
+ readonly install: (_context: ModuleCommandContext) => Promise<{
3
4
  result: {
4
- contract: "deployment.result.v1";
5
- ok: boolean;
6
- status: "SUCCEEDED";
7
- moduleRef: "platform-cli";
8
- moduleVersion: "0.1.16";
9
- data?: {} | null;
5
+ readonly contract: "deployment.result.v1";
6
+ readonly ok: true;
7
+ readonly status: "SUCCEEDED";
8
+ readonly moduleRef: "platform-cli";
9
+ readonly moduleVersion: "0.1.18";
10
10
  };
11
11
  observedEffects: never[];
12
- };
13
- preflight: () => {
12
+ }>;
13
+ readonly uninstall: (_context: ModuleCommandContext) => Promise<{
14
14
  result: {
15
- contract: "deployment.result.v1";
16
- ok: boolean;
17
- status: "SUCCEEDED";
18
- moduleRef: "platform-cli";
19
- moduleVersion: "0.1.16";
20
- data?: {} | null;
15
+ readonly contract: "deployment.result.v1";
16
+ readonly ok: true;
17
+ readonly status: "SUCCEEDED";
18
+ readonly moduleRef: "platform-cli";
19
+ readonly moduleVersion: "0.1.18";
21
20
  };
22
21
  observedEffects: never[];
23
- };
24
- status: () => {
22
+ }>;
23
+ readonly status: (_context: ModuleCommandContext) => Promise<{
25
24
  result: {
26
25
  contract: "deployment.result.v1";
27
- ok: boolean;
26
+ ok: true;
28
27
  status: "SUCCEEDED";
29
28
  moduleRef: "platform-cli";
30
- moduleVersion: "0.1.16";
31
- data?: {} | null;
29
+ moduleVersion: "0.1.18";
30
+ data: {
31
+ readonly setupStatus: "READY";
32
+ readonly runtimeStatus: "NOT_APPLICABLE";
33
+ };
32
34
  };
33
35
  observedEffects: never[];
34
- };
35
- verify: () => {
36
+ }>;
37
+ readonly setup: (_context: ModuleCommandContext) => Promise<{
36
38
  result: {
37
- contract: "deployment.result.v1";
38
- ok: boolean;
39
- status: "SUCCEEDED";
40
- moduleRef: "platform-cli";
41
- moduleVersion: "0.1.16";
42
- data?: {} | null;
39
+ readonly contract: "deployment.result.v1";
40
+ readonly ok: true;
41
+ readonly status: "SUCCEEDED";
42
+ readonly moduleRef: "platform-cli";
43
+ readonly moduleVersion: "0.1.18";
43
44
  };
44
45
  observedEffects: never[];
45
- };
46
- doctor: () => {
46
+ }>;
47
+ readonly docs: (_context: ModuleCommandContext) => Promise<{
47
48
  result: {
48
49
  contract: "deployment.result.v1";
49
- ok: boolean;
50
+ ok: true;
50
51
  status: "SUCCEEDED";
51
52
  moduleRef: "platform-cli";
52
- moduleVersion: "0.1.16";
53
- data?: {} | null;
53
+ moduleVersion: "0.1.18";
54
+ data: {
55
+ docs: string;
56
+ setup: string;
57
+ };
58
+ };
59
+ observedEffects: never[];
60
+ }>;
61
+ readonly start: (_context: ModuleCommandContext) => Promise<{
62
+ result: {
63
+ readonly contract: "deployment.result.v1";
64
+ readonly ok: true;
65
+ readonly status: "SUCCEEDED";
66
+ readonly moduleRef: "platform-cli";
67
+ readonly moduleVersion: "0.1.18";
68
+ };
69
+ observedEffects: never[];
70
+ }>;
71
+ readonly stop: (_context: ModuleCommandContext) => Promise<{
72
+ result: {
73
+ readonly contract: "deployment.result.v1";
74
+ readonly ok: true;
75
+ readonly status: "SUCCEEDED";
76
+ readonly moduleRef: "platform-cli";
77
+ readonly moduleVersion: "0.1.18";
54
78
  };
55
79
  observedEffects: never[];
56
- };
80
+ }>;
57
81
  };
@@ -1,26 +1,42 @@
1
- import { observeDeclaredModuleStatus } from "@tomflow/proflow-module-contract";
2
1
  import { descriptor } from "./descriptor.js";
3
- const success = (data) => ({
2
+ const base = {
4
3
  contract: "deployment.result.v1",
5
4
  ok: true,
6
5
  status: "SUCCEEDED",
7
6
  moduleRef: descriptor.moduleRef,
8
7
  moduleVersion: descriptor.moduleVersion,
9
- ...(data === undefined ? {} : { data }),
10
- });
8
+ };
9
+ const noRuntime = {
10
+ setupStatus: "READY",
11
+ runtimeStatus: "NOT_APPLICABLE",
12
+ };
11
13
  export const behaviorAdapter = {
12
- describe: () => ({
13
- result: success({ role: "deployment-governance", kind: descriptor.kind }),
14
+ install: async (_context) => ({
15
+ result: base,
16
+ observedEffects: [],
17
+ }),
18
+ uninstall: async (_context) => ({
19
+ result: base,
20
+ observedEffects: [],
21
+ }),
22
+ status: async (_context) => ({
23
+ result: { ...base, data: noRuntime },
24
+ observedEffects: [],
25
+ }),
26
+ setup: async (_context) => ({
27
+ result: base,
28
+ observedEffects: [],
29
+ }),
30
+ docs: async (_context) => ({
31
+ result: { ...base, data: { docs: "DOCS.md", setup: "SETUP.md" } },
14
32
  observedEffects: [],
15
33
  }),
16
- preflight: () => ({ result: success(), observedEffects: [] }),
17
- status: () => ({
18
- result: success(observeDeclaredModuleStatus(descriptor, undefined, "UNKNOWN")),
34
+ start: async (_context) => ({
35
+ result: base,
19
36
  observedEffects: [],
20
37
  }),
21
- verify: () => ({
22
- result: success(),
38
+ stop: async (_context) => ({
39
+ result: base,
23
40
  observedEffects: [],
24
41
  }),
25
- doctor: () => ({ result: success(), observedEffects: [] }),
26
42
  };
@@ -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.16";
6
+ readonly moduleVersion: "0.1.18";
7
7
  readonly kind: "cli";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
@@ -19,20 +19,9 @@ export declare const descriptor: {
19
19
  readonly versionRange: ">=24.19.0";
20
20
  }];
21
21
  readonly configSlots: readonly [];
22
- readonly lifecycle: {
23
- readonly supported: readonly ["describe", "preflight", "status", "verify", "doctor"];
24
- };
25
- readonly verification: {
26
- readonly checks: readonly [{
27
- readonly id: "cli-surface";
28
- readonly description: "Deterministic command surface parses and dispatches";
29
- readonly lifecycle: "verify";
30
- }];
31
- };
32
22
  readonly effects: readonly [];
33
- readonly documentation: readonly [{
34
- readonly id: "overview";
35
- readonly path: "./README.md";
36
- readonly description: "Platform CLI package overview and command surface";
37
- }];
23
+ readonly documentation: {
24
+ readonly docs: "DOCS.md";
25
+ readonly setup: "SETUP.md";
26
+ };
38
27
  };
@@ -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.16",
6
+ moduleVersion: "0.1.18",
7
7
  kind: "cli",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
@@ -14,27 +14,16 @@ export const descriptor = {
14
14
  provides: [],
15
15
  requires: [],
16
16
  requirements: [
17
- { kind: "runtime", runtime: "node", versionRange: ">=24.19.0" },
18
- ],
19
- configSlots: [],
20
- lifecycle: {
21
- supported: ["describe", "preflight", "status", "verify", "doctor"],
22
- },
23
- verification: {
24
- checks: [
25
- {
26
- id: "cli-surface",
27
- description: "Deterministic command surface parses and dispatches",
28
- lifecycle: "verify",
29
- },
30
- ],
31
- },
32
- effects: [],
33
- documentation: [
34
17
  {
35
- id: "overview",
36
- path: "./README.md",
37
- description: "Platform CLI package overview and command surface",
18
+ kind: "runtime",
19
+ runtime: "node",
20
+ versionRange: ">=24.19.0",
38
21
  },
39
22
  ],
23
+ configSlots: [],
24
+ effects: [],
25
+ documentation: {
26
+ docs: "DOCS.md",
27
+ setup: "SETUP.md",
28
+ },
40
29
  };