@tomflow/proflow-dev-tunnel 0.1.5 → 0.1.7

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/DOCS.md ADDED
@@ -0,0 +1,27 @@
1
+ # @tomflow/proflow-dev-tunnel — Module Docs
2
+
3
+ Module ref: `dev-tunnel`
4
+ Domain: `deployment-governance`
5
+ Kind: `external-resource`
6
+
7
+ Governs the Microsoft Dev Tunnel public HTTPS ingress resource and its managed local host process.
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,7 @@
1
+ # @tomflow/proflow-dev-tunnel — Module Setup
2
+
3
+ Authenticate with Microsoft Dev Tunnels when requested, create or select the required tunnel, and allow the Module to establish and verify the public HTTPS ingress. The resulting tunnel id/public URL/evidence are Module-owned state or shared facts, not values to copy into Platform config.
4
+
5
+ ## Completion
6
+
7
+ Setup is complete only when the Module's own `status` reports `setupStatus=READY`. Re-running setup must re-observe reality; it must not resume from a blind historical step index.
@@ -1,141 +1,137 @@
1
- import type { ModuleOperationResult } from "@tomflow/proflow-module-contract";
2
- import type { DevTunnelRuntime, ErrorSemanticsProof, FileRelayProof } from "../src/resource-adapter.ts";
3
- type DevTunnelVerificationEvidence = {
4
- contract: "proflow.dev-tunnel-verification.v1";
5
- moduleVersion: string;
6
- publicBaseUrl: string;
7
- observedAt: string;
8
- fileRelay: FileRelayProof;
9
- errorSemantics: ErrorSemanticsProof;
10
- };
11
- export declare function readDevTunnelVerificationEvidence(file: string | undefined, publicBaseUrl: string): Promise<DevTunnelVerificationEvidence | undefined>;
12
- export declare function createBehaviorAdapter(input?: {
13
- runtime: DevTunnelRuntime;
14
- verifyErrorSemantics?: () => Promise<ErrorSemanticsProof>;
15
- verifyFileRelay?: () => Promise<FileRelayProof>;
16
- }): {
17
- describe: () => {
18
- result: ModuleOperationResult;
19
- observedEffects: never[];
20
- };
21
- preflight: () => {
22
- result: ModuleOperationResult;
23
- observedEffects: never[];
24
- };
25
- status: () => Promise<{
26
- result: ModuleOperationResult;
1
+ import { type ModuleCommandContext } from "@tomflow/proflow-module-contract";
2
+ export declare const behaviorAdapter: {
3
+ readonly install: (context: ModuleCommandContext) => Promise<{
4
+ result: {
5
+ readonly contract: "deployment.result.v1";
6
+ readonly ok: true;
7
+ readonly status: "SUCCEEDED";
8
+ readonly moduleRef: "dev-tunnel";
9
+ readonly moduleVersion: "0.1.7";
10
+ };
27
11
  observedEffects: never[];
28
12
  }>;
29
- verify: () => Promise<{
30
- result: ModuleOperationResult;
31
- observedEffects: never[];
13
+ readonly uninstall: (context: ModuleCommandContext) => Promise<{
14
+ result: {
15
+ readonly contract: "deployment.result.v1";
16
+ readonly ok: true;
17
+ readonly status: "SUCCEEDED";
18
+ readonly moduleRef: "dev-tunnel";
19
+ readonly moduleVersion: "0.1.7";
20
+ };
21
+ observedEffects: string[];
32
22
  } | {
33
23
  result: {
34
24
  contract: "deployment.result.v1";
35
- ok: boolean;
36
- status: "ACTION_REQUIRED" | "BLOCKED" | "FAILED" | "SUCCEEDED";
37
- moduleRef: string;
38
- moduleVersion: string;
39
- actionRequired?: {
40
- action: string;
41
- description: string;
42
- } | undefined;
43
- error?: {
44
- code: "APPLY_FAILED" | "COMMAND_FAILED" | "COMPATIBILITY_MISMATCH" | "CONFIG_REQUIRED" | "CONFORMANCE_FAILED" | "CONTRACT_INVALID" | "CORE_PACKAGE_REQUIRED" | "DEPENDENCY_UNRESOLVED" | "DOCTOR_FAILED" | "EXTERNAL_RESOURCE_UNAVAILABLE" | "INVALID_REQUEST" | "LIFECYCLE_UNSUPPORTED" | "MODULE_NOT_FOUND" | "PLAN_INVALID" | "PLAN_STALE" | "REQUIREMENT_UNMET" | "UNINSTALL_FAILED" | "UPGRADE_FAILED" | "VERIFY_FAILED";
25
+ moduleRef: "dev-tunnel";
26
+ moduleVersion: "0.1.7";
27
+ ok: false;
28
+ status: "FAILED";
29
+ error: {
30
+ code: "UNINSTALL_FAILED";
45
31
  message: string;
46
32
  retryable: boolean;
47
- } | undefined;
48
- resourceVersion?: string | undefined;
49
- data?: unknown;
50
- checks: import("../src/resource-adapter.ts").IngressCheck[];
33
+ };
51
34
  };
52
- observedEffects: string[];
53
- }>;
54
- doctor: () => Promise<{
55
- result: ModuleOperationResult;
56
35
  observedEffects: never[];
57
36
  }>;
58
- start: () => Promise<{
59
- result: ModuleOperationResult;
60
- observedEffects: string[];
61
- }>;
62
- stop: () => Promise<{
63
- result: ModuleOperationResult;
64
- observedEffects: string[];
65
- }>;
66
- uninstall: () => Promise<{
67
- result: ModuleOperationResult;
68
- observedEffects: string[];
69
- }>;
70
- restart: () => Promise<{
71
- result: ModuleOperationResult;
72
- observedEffects: string[];
73
- }>;
74
- };
75
- export declare const behaviorAdapter: {
76
- describe: () => {
77
- result: ModuleOperationResult;
37
+ readonly status: (context: ModuleCommandContext) => Promise<{
38
+ result: {
39
+ contract: "deployment.result.v1";
40
+ ok: true;
41
+ status: "SUCCEEDED";
42
+ moduleRef: "dev-tunnel";
43
+ moduleVersion: "0.1.7";
44
+ data: {
45
+ setupStatus: "ACTION_REQUIRED" | "READY";
46
+ runtimeStatus: "FAILED" | "RUNNING" | "STOPPED";
47
+ };
48
+ };
78
49
  observedEffects: never[];
79
- };
80
- preflight: () => {
81
- result: ModuleOperationResult;
50
+ }>;
51
+ readonly setup: (context: ModuleCommandContext) => Promise<{
52
+ result: {
53
+ contract: "deployment.result.v1";
54
+ moduleRef: "dev-tunnel";
55
+ moduleVersion: "0.1.7";
56
+ ok: false;
57
+ status: "ACTION_REQUIRED";
58
+ actionRequired: {
59
+ action: string;
60
+ description: string;
61
+ };
62
+ };
82
63
  observedEffects: never[];
83
- };
84
- status: () => Promise<{
85
- result: ModuleOperationResult;
64
+ } | {
65
+ result: {
66
+ readonly contract: "deployment.result.v1";
67
+ readonly ok: true;
68
+ readonly status: "SUCCEEDED";
69
+ readonly moduleRef: "dev-tunnel";
70
+ readonly moduleVersion: "0.1.7";
71
+ };
86
72
  observedEffects: never[];
87
73
  }>;
88
- verify: () => Promise<{
89
- result: ModuleOperationResult;
74
+ readonly docs: (_context: ModuleCommandContext) => Promise<{
75
+ result: {
76
+ contract: "deployment.result.v1";
77
+ ok: true;
78
+ status: "SUCCEEDED";
79
+ moduleRef: "dev-tunnel";
80
+ moduleVersion: "0.1.7";
81
+ data: {
82
+ docs: string;
83
+ setup: string;
84
+ };
85
+ };
90
86
  observedEffects: never[];
91
- } | {
87
+ }>;
88
+ readonly start: (context: ModuleCommandContext) => Promise<{
92
89
  result: {
93
90
  contract: "deployment.result.v1";
94
- ok: boolean;
95
- status: "ACTION_REQUIRED" | "BLOCKED" | "FAILED" | "SUCCEEDED";
96
- moduleRef: string;
97
- moduleVersion: string;
98
- actionRequired?: {
99
- action: string;
100
- description: string;
101
- } | undefined;
102
- error?: {
103
- code: "APPLY_FAILED" | "COMMAND_FAILED" | "COMPATIBILITY_MISMATCH" | "CONFIG_REQUIRED" | "CONFORMANCE_FAILED" | "CONTRACT_INVALID" | "CORE_PACKAGE_REQUIRED" | "DEPENDENCY_UNRESOLVED" | "DOCTOR_FAILED" | "EXTERNAL_RESOURCE_UNAVAILABLE" | "INVALID_REQUEST" | "LIFECYCLE_UNSUPPORTED" | "MODULE_NOT_FOUND" | "PLAN_INVALID" | "PLAN_STALE" | "REQUIREMENT_UNMET" | "UNINSTALL_FAILED" | "UPGRADE_FAILED" | "VERIFY_FAILED";
91
+ moduleRef: "dev-tunnel";
92
+ moduleVersion: "0.1.7";
93
+ ok: false;
94
+ status: "FAILED";
95
+ error: {
96
+ code: "START_FAILED";
104
97
  message: string;
105
98
  retryable: boolean;
106
- } | undefined;
107
- resourceVersion?: string | undefined;
108
- data?: unknown;
109
- checks: import("../src/resource-adapter.ts").IngressCheck[];
99
+ };
110
100
  };
111
- observedEffects: string[];
112
- }>;
113
- doctor: () => Promise<{
114
- result: ModuleOperationResult;
115
101
  observedEffects: never[];
116
- }>;
117
- start: () => Promise<{
118
- result: ModuleOperationResult;
119
- observedEffects: string[];
120
- }>;
121
- stop: () => Promise<{
122
- result: ModuleOperationResult;
123
- observedEffects: string[];
124
- }>;
125
- uninstall: () => Promise<{
126
- result: ModuleOperationResult;
102
+ } | {
103
+ result: {
104
+ contract: "deployment.result.v1";
105
+ ok: true;
106
+ status: "SUCCEEDED";
107
+ moduleRef: "dev-tunnel";
108
+ moduleVersion: "0.1.7";
109
+ data: import("../src/resource-adapter.ts").DevTunnelObservation;
110
+ };
127
111
  observedEffects: string[];
128
112
  }>;
129
- restart: () => Promise<{
130
- result: ModuleOperationResult;
113
+ readonly stop: (context: ModuleCommandContext) => Promise<{
114
+ result: {
115
+ readonly contract: "deployment.result.v1";
116
+ readonly ok: true;
117
+ readonly status: "SUCCEEDED";
118
+ readonly moduleRef: "dev-tunnel";
119
+ readonly moduleVersion: "0.1.7";
120
+ };
131
121
  observedEffects: string[];
122
+ } | {
123
+ result: {
124
+ contract: "deployment.result.v1";
125
+ moduleRef: "dev-tunnel";
126
+ moduleVersion: "0.1.7";
127
+ ok: false;
128
+ status: "FAILED";
129
+ error: {
130
+ code: "STOP_FAILED";
131
+ message: string;
132
+ retryable: boolean;
133
+ };
134
+ };
135
+ observedEffects: never[];
132
136
  }>;
133
137
  };
134
- export declare function createProductionBinding(input: {
135
- moduleRef: string;
136
- config: Record<string, string>;
137
- workspaceRoot: string;
138
- }): Promise<{
139
- behaviorAdapter: Record<string, unknown>;
140
- } | undefined>;
141
- export {};