@tomflow/proflow-dev-tunnel 0.1.11 → 0.1.12
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 +6 -0
- package/DOCS.md +1 -1
- package/SETUP.md +3 -3
- package/dist/deployment/adapter.d.ts +14 -14
- package/dist/deployment/adapter.js +3 -3
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/cli.js +6 -0
- package/package.json +1 -1
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
package/DOCS.md
CHANGED
|
@@ -8,6 +8,6 @@ Dev Tunnel(开发隧道)把本机 Agent Gateway 安全地映射为公开 HTT
|
|
|
8
8
|
|
|
9
9
|
## 如何配置
|
|
10
10
|
|
|
11
|
-
运行 `proflow-dev-tunnel setup`。向导会检查 `devtunnel` 工具和登录状态,列出现有 Tunnel(隧道),协助选择或创建持久隧道,然后保存并验证公开地址。
|
|
11
|
+
运行 `pnpm exec -- proflow-dev-tunnel setup`。向导会检查 `devtunnel` 工具和登录状态,列出现有 Tunnel(隧道),协助选择或创建持久隧道,然后保存并验证公开地址。
|
|
12
12
|
|
|
13
13
|
公开地址会被外部服务访问,请只暴露 ProFlow 网关需要的端口。
|
package/SETUP.md
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
## STEP-DEV-TUNNEL-01 — 选择或创建持久 Tunnel
|
|
4
4
|
|
|
5
5
|
Responsible: USER
|
|
6
|
-
Interactive executable: `proflow-dev-tunnel setup`
|
|
7
|
-
Non-interactive executable: `proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>`
|
|
6
|
+
Interactive executable: `pnpm exec -- proflow-dev-tunnel setup`
|
|
7
|
+
Non-interactive executable: `pnpm exec -- proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>`
|
|
8
8
|
Required inputs: Tunnel ID、公开 HTTPS URL
|
|
9
|
-
Verify: `proflow-dev-tunnel verify`
|
|
9
|
+
Verify: `pnpm exec -- proflow-dev-tunnel verify`
|
|
10
10
|
Success condition: `dev-tunnel.setupStatus=READY`.
|
|
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
|
|
|
6
6
|
readonly ok: true;
|
|
7
7
|
readonly status: "SUCCEEDED";
|
|
8
8
|
readonly moduleRef: "dev-tunnel";
|
|
9
|
-
readonly moduleVersion: "0.1.
|
|
9
|
+
readonly moduleVersion: "0.1.12";
|
|
10
10
|
};
|
|
11
11
|
observedEffects: never[];
|
|
12
12
|
}>;
|
|
@@ -16,14 +16,14 @@ export declare const behaviorAdapter: {
|
|
|
16
16
|
readonly ok: true;
|
|
17
17
|
readonly status: "SUCCEEDED";
|
|
18
18
|
readonly moduleRef: "dev-tunnel";
|
|
19
|
-
readonly moduleVersion: "0.1.
|
|
19
|
+
readonly moduleVersion: "0.1.12";
|
|
20
20
|
};
|
|
21
21
|
observedEffects: string[];
|
|
22
22
|
} | {
|
|
23
23
|
result: {
|
|
24
24
|
contract: "deployment.result.v1";
|
|
25
25
|
moduleRef: "dev-tunnel";
|
|
26
|
-
moduleVersion: "0.1.
|
|
26
|
+
moduleVersion: "0.1.12";
|
|
27
27
|
ok: false;
|
|
28
28
|
status: "FAILED";
|
|
29
29
|
error: {
|
|
@@ -40,7 +40,7 @@ export declare const behaviorAdapter: {
|
|
|
40
40
|
ok: true;
|
|
41
41
|
status: "SUCCEEDED";
|
|
42
42
|
moduleRef: "dev-tunnel";
|
|
43
|
-
moduleVersion: "0.1.
|
|
43
|
+
moduleVersion: "0.1.12";
|
|
44
44
|
data: {
|
|
45
45
|
setupStatus: "ACTION_REQUIRED" | "READY";
|
|
46
46
|
runtimeStatus: "FAILED" | "RUNNING" | "STOPPED";
|
|
@@ -52,7 +52,7 @@ export declare const behaviorAdapter: {
|
|
|
52
52
|
result: {
|
|
53
53
|
contract: "deployment.result.v1";
|
|
54
54
|
moduleRef: "dev-tunnel";
|
|
55
|
-
moduleVersion: "0.1.
|
|
55
|
+
moduleVersion: "0.1.12";
|
|
56
56
|
ok: false;
|
|
57
57
|
status: "ACTION_REQUIRED";
|
|
58
58
|
data: {
|
|
@@ -62,8 +62,8 @@ export declare const behaviorAdapter: {
|
|
|
62
62
|
readonly state: "TODO";
|
|
63
63
|
readonly responsible: "USER";
|
|
64
64
|
readonly execution: {
|
|
65
|
-
readonly interactive: "proflow-dev-tunnel setup";
|
|
66
|
-
readonly nonInteractive: "proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>";
|
|
65
|
+
readonly interactive: "pnpm exec -- proflow-dev-tunnel setup";
|
|
66
|
+
readonly nonInteractive: "pnpm exec -- proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>";
|
|
67
67
|
};
|
|
68
68
|
readonly requiredInputs: readonly [{
|
|
69
69
|
readonly name: "tunnelId";
|
|
@@ -74,7 +74,7 @@ export declare const behaviorAdapter: {
|
|
|
74
74
|
readonly description: "公开 HTTPS URL";
|
|
75
75
|
readonly sensitive: false;
|
|
76
76
|
}];
|
|
77
|
-
readonly verify: "proflow-dev-tunnel verify";
|
|
77
|
+
readonly verify: "pnpm exec -- proflow-dev-tunnel verify";
|
|
78
78
|
readonly successCondition: "配置状态变为“已就绪”";
|
|
79
79
|
}];
|
|
80
80
|
};
|
|
@@ -90,7 +90,7 @@ export declare const behaviorAdapter: {
|
|
|
90
90
|
readonly ok: true;
|
|
91
91
|
readonly status: "SUCCEEDED";
|
|
92
92
|
readonly moduleRef: "dev-tunnel";
|
|
93
|
-
readonly moduleVersion: "0.1.
|
|
93
|
+
readonly moduleVersion: "0.1.12";
|
|
94
94
|
};
|
|
95
95
|
observedEffects: never[];
|
|
96
96
|
}>;
|
|
@@ -100,7 +100,7 @@ export declare const behaviorAdapter: {
|
|
|
100
100
|
ok: true;
|
|
101
101
|
status: "SUCCEEDED";
|
|
102
102
|
moduleRef: "dev-tunnel";
|
|
103
|
-
moduleVersion: "0.1.
|
|
103
|
+
moduleVersion: "0.1.12";
|
|
104
104
|
data: {
|
|
105
105
|
docs: string;
|
|
106
106
|
};
|
|
@@ -111,7 +111,7 @@ export declare const behaviorAdapter: {
|
|
|
111
111
|
result: {
|
|
112
112
|
contract: "deployment.result.v1";
|
|
113
113
|
moduleRef: "dev-tunnel";
|
|
114
|
-
moduleVersion: "0.1.
|
|
114
|
+
moduleVersion: "0.1.12";
|
|
115
115
|
ok: false;
|
|
116
116
|
status: "FAILED";
|
|
117
117
|
error: {
|
|
@@ -127,7 +127,7 @@ export declare const behaviorAdapter: {
|
|
|
127
127
|
ok: true;
|
|
128
128
|
status: "SUCCEEDED";
|
|
129
129
|
moduleRef: "dev-tunnel";
|
|
130
|
-
moduleVersion: "0.1.
|
|
130
|
+
moduleVersion: "0.1.12";
|
|
131
131
|
data: import("../src/resource-adapter.ts").DevTunnelObservation;
|
|
132
132
|
};
|
|
133
133
|
observedEffects: string[];
|
|
@@ -138,14 +138,14 @@ export declare const behaviorAdapter: {
|
|
|
138
138
|
readonly ok: true;
|
|
139
139
|
readonly status: "SUCCEEDED";
|
|
140
140
|
readonly moduleRef: "dev-tunnel";
|
|
141
|
-
readonly moduleVersion: "0.1.
|
|
141
|
+
readonly moduleVersion: "0.1.12";
|
|
142
142
|
};
|
|
143
143
|
observedEffects: string[];
|
|
144
144
|
} | {
|
|
145
145
|
result: {
|
|
146
146
|
contract: "deployment.result.v1";
|
|
147
147
|
moduleRef: "dev-tunnel";
|
|
148
|
-
moduleVersion: "0.1.
|
|
148
|
+
moduleVersion: "0.1.12";
|
|
149
149
|
ok: false;
|
|
150
150
|
status: "FAILED";
|
|
151
151
|
error: {
|
|
@@ -19,8 +19,8 @@ const setupPlan = {
|
|
|
19
19
|
state: "TODO",
|
|
20
20
|
responsible: "USER",
|
|
21
21
|
execution: {
|
|
22
|
-
interactive: "proflow-dev-tunnel setup",
|
|
23
|
-
nonInteractive: "proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>",
|
|
22
|
+
interactive: "pnpm exec -- proflow-dev-tunnel setup",
|
|
23
|
+
nonInteractive: "pnpm exec -- proflow-dev-tunnel setup --tunnel-id <id> --public-base-url <url>",
|
|
24
24
|
},
|
|
25
25
|
requiredInputs: [
|
|
26
26
|
{ name: "tunnelId", description: "Tunnel ID", sensitive: false },
|
|
@@ -30,7 +30,7 @@ const setupPlan = {
|
|
|
30
30
|
sensitive: false,
|
|
31
31
|
},
|
|
32
32
|
],
|
|
33
|
-
verify: "proflow-dev-tunnel verify",
|
|
33
|
+
verify: "pnpm exec -- proflow-dev-tunnel verify",
|
|
34
34
|
successCondition: "配置状态变为“已就绪”",
|
|
35
35
|
},
|
|
36
36
|
],
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "dev-tunnel";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-dev-tunnel";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.12";
|
|
7
7
|
readonly kind: "external-resource";
|
|
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: "dev-tunnel",
|
|
5
5
|
packageName: "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.12",
|
|
7
7
|
kind: "external-resource",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/dist/src/cli.js
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
import { spawnSync } from "node:child_process";
|
|
3
3
|
import { createInterface } from "node:readline/promises";
|
|
4
4
|
import { behaviorAdapter } from "../deployment/adapter.js";
|
|
5
|
+
function reportFatal(error) {
|
|
6
|
+
process.stderr.write(`✕ 配置失败\n ${error instanceof Error ? error.message : String(error)}\n`);
|
|
7
|
+
process.exitCode = 1;
|
|
8
|
+
}
|
|
9
|
+
process.on("uncaughtException", reportFatal);
|
|
10
|
+
process.on("unhandledRejection", reportFatal);
|
|
5
11
|
function option(args, name) {
|
|
6
12
|
const index = args.indexOf(name);
|
|
7
13
|
return index >= 0 ? args[index + 1] : undefined;
|
package/package.json
CHANGED
package/proflow.module.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "dev-tunnel",
|
|
5
5
|
"packageName": "@tomflow/proflow-dev-tunnel",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.12",
|
|
7
7
|
"kind": "external-resource",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|