@tomflow/proflow-agent-gateway 0.1.13 → 0.1.15
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,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-agent-gateway
|
|
2
2
|
|
|
3
|
+
## 0.1.15
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Add professional setup orchestration, Provider FAST/THINK input, recoverable managed Dev Tunnel provisioning, Browser installation guidance, and precise status diagnostics.
|
|
8
|
+
|
|
9
|
+
## 0.1.14
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Retire the obsolete Carrier package and Browser standalone management CLI, make Platform setup/status preserve owner and dependency semantics, and enforce read-only status observation across the final Real-3 deployment closeout.
|
|
14
|
+
|
|
3
15
|
## 0.1.13
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -6,7 +6,7 @@ export declare const behaviorAdapter: {
|
|
|
6
6
|
ok: true;
|
|
7
7
|
status: "SUCCEEDED";
|
|
8
8
|
moduleRef: "agent-gateway";
|
|
9
|
-
moduleVersion: "0.1.
|
|
9
|
+
moduleVersion: "0.1.15";
|
|
10
10
|
data: {
|
|
11
11
|
localBaseUrl: string;
|
|
12
12
|
publicBaseUrl?: string;
|
|
@@ -20,7 +20,7 @@ export declare const behaviorAdapter: {
|
|
|
20
20
|
readonly ok: true;
|
|
21
21
|
readonly status: "SUCCEEDED";
|
|
22
22
|
readonly moduleRef: "agent-gateway";
|
|
23
|
-
readonly moduleVersion: "0.1.
|
|
23
|
+
readonly moduleVersion: "0.1.15";
|
|
24
24
|
};
|
|
25
25
|
observedEffects: string[];
|
|
26
26
|
}>;
|
|
@@ -30,7 +30,7 @@ export declare const behaviorAdapter: {
|
|
|
30
30
|
ok: true;
|
|
31
31
|
status: "SUCCEEDED";
|
|
32
32
|
moduleRef: "agent-gateway";
|
|
33
|
-
moduleVersion: "0.1.
|
|
33
|
+
moduleVersion: "0.1.15";
|
|
34
34
|
data: {
|
|
35
35
|
setupStatus: "BLOCKED" | "READY";
|
|
36
36
|
runtimeStatus: "RUNNING" | "STOPPED";
|
|
@@ -47,52 +47,15 @@ export declare const behaviorAdapter: {
|
|
|
47
47
|
}>;
|
|
48
48
|
readonly setup: (context: ModuleCommandContext) => Promise<{
|
|
49
49
|
result: {
|
|
50
|
-
readonly contract: "deployment.result.v1";
|
|
51
|
-
readonly ok: true;
|
|
52
|
-
readonly status: "SUCCEEDED";
|
|
53
|
-
readonly moduleRef: "agent-gateway";
|
|
54
|
-
readonly moduleVersion: "0.1.13";
|
|
55
|
-
} | {
|
|
56
50
|
contract: "deployment.result.v1";
|
|
51
|
+
ok: true;
|
|
52
|
+
status: "SUCCEEDED";
|
|
57
53
|
moduleRef: "agent-gateway";
|
|
58
|
-
moduleVersion: "0.1.
|
|
59
|
-
ok: false;
|
|
60
|
-
status: "FAILED";
|
|
61
|
-
error: {
|
|
62
|
-
code: "SETUP_FAILED" | "START_FAILED" | "STOP_FAILED";
|
|
63
|
-
message: string;
|
|
64
|
-
retryable: boolean;
|
|
65
|
-
};
|
|
54
|
+
moduleVersion: "0.1.15";
|
|
66
55
|
data: {
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
readonly description: "Gateway 需要稳定的公开 HTTPS 地址。";
|
|
71
|
-
readonly state: "BLOCKED";
|
|
72
|
-
readonly responsible: "EXTERNAL";
|
|
73
|
-
readonly execution: {
|
|
74
|
-
readonly interactive: "platform setup --module dev-tunnel";
|
|
75
|
-
readonly nonInteractive: "platform setup --module dev-tunnel";
|
|
76
|
-
};
|
|
77
|
-
readonly requiredInputs: readonly [];
|
|
78
|
-
readonly verify: "platform status";
|
|
79
|
-
readonly successCondition: "配置状态变为“已就绪”";
|
|
80
|
-
readonly blockedReason: "dev-tunnel 尚未发布 publicBaseUrl";
|
|
81
|
-
}, {
|
|
82
|
-
readonly id: "STEP-AGENT-GATEWAY-02";
|
|
83
|
-
readonly title: "等待 Platform Host";
|
|
84
|
-
readonly description: "Gateway 下游应用端点和凭据尚不可用。";
|
|
85
|
-
readonly state: "BLOCKED";
|
|
86
|
-
readonly responsible: "EXTERNAL";
|
|
87
|
-
readonly execution: {
|
|
88
|
-
readonly interactive: "platform setup --module platform-host";
|
|
89
|
-
readonly nonInteractive: "platform setup --module platform-host";
|
|
90
|
-
};
|
|
91
|
-
readonly requiredInputs: readonly [];
|
|
92
|
-
readonly verify: "platform status";
|
|
93
|
-
readonly successCondition: "platform-host 已发布 endpoint、stateRoot 和 transport credential";
|
|
94
|
-
readonly blockedReason: "platform-host 尚未就绪";
|
|
95
|
-
}];
|
|
56
|
+
localBaseUrl: string;
|
|
57
|
+
publicBaseUrl?: string;
|
|
58
|
+
waitingFor?: string[];
|
|
96
59
|
};
|
|
97
60
|
};
|
|
98
61
|
observedEffects: never[];
|
|
@@ -103,7 +66,7 @@ export declare const behaviorAdapter: {
|
|
|
103
66
|
ok: true;
|
|
104
67
|
status: "SUCCEEDED";
|
|
105
68
|
moduleRef: "agent-gateway";
|
|
106
|
-
moduleVersion: "0.1.
|
|
69
|
+
moduleVersion: "0.1.15";
|
|
107
70
|
data: {
|
|
108
71
|
docs: string;
|
|
109
72
|
};
|
|
@@ -116,7 +79,7 @@ export declare const behaviorAdapter: {
|
|
|
116
79
|
ok: true;
|
|
117
80
|
status: "SUCCEEDED";
|
|
118
81
|
moduleRef: "agent-gateway";
|
|
119
|
-
moduleVersion: "0.1.
|
|
82
|
+
moduleVersion: "0.1.15";
|
|
120
83
|
data: {
|
|
121
84
|
host: string;
|
|
122
85
|
port: number;
|
|
@@ -127,7 +90,7 @@ export declare const behaviorAdapter: {
|
|
|
127
90
|
result: {
|
|
128
91
|
contract: "deployment.result.v1";
|
|
129
92
|
moduleRef: "agent-gateway";
|
|
130
|
-
moduleVersion: "0.1.
|
|
93
|
+
moduleVersion: "0.1.15";
|
|
131
94
|
ok: false;
|
|
132
95
|
status: "FAILED";
|
|
133
96
|
error: {
|
|
@@ -144,7 +107,7 @@ export declare const behaviorAdapter: {
|
|
|
144
107
|
readonly ok: true;
|
|
145
108
|
readonly status: "SUCCEEDED";
|
|
146
109
|
readonly moduleRef: "agent-gateway";
|
|
147
|
-
readonly moduleVersion: "0.1.
|
|
110
|
+
readonly moduleVersion: "0.1.15";
|
|
148
111
|
};
|
|
149
112
|
observedEffects: string[];
|
|
150
113
|
} | {
|
|
@@ -153,11 +116,11 @@ export declare const behaviorAdapter: {
|
|
|
153
116
|
readonly ok: true;
|
|
154
117
|
readonly status: "SUCCEEDED";
|
|
155
118
|
readonly moduleRef: "agent-gateway";
|
|
156
|
-
readonly moduleVersion: "0.1.
|
|
119
|
+
readonly moduleVersion: "0.1.15";
|
|
157
120
|
} | {
|
|
158
121
|
contract: "deployment.result.v1";
|
|
159
122
|
moduleRef: "agent-gateway";
|
|
160
|
-
moduleVersion: "0.1.
|
|
123
|
+
moduleVersion: "0.1.15";
|
|
161
124
|
ok: false;
|
|
162
125
|
status: "FAILED";
|
|
163
126
|
error: {
|
|
@@ -10,40 +10,6 @@ const base = {
|
|
|
10
10
|
moduleRef: descriptor.moduleRef,
|
|
11
11
|
moduleVersion: descriptor.moduleVersion,
|
|
12
12
|
};
|
|
13
|
-
const blockedSetupPlan = {
|
|
14
|
-
steps: [
|
|
15
|
-
{
|
|
16
|
-
id: "STEP-AGENT-GATEWAY-01",
|
|
17
|
-
title: "等待 Public Ingress",
|
|
18
|
-
description: "Gateway 需要稳定的公开 HTTPS 地址。",
|
|
19
|
-
state: "BLOCKED",
|
|
20
|
-
responsible: "EXTERNAL",
|
|
21
|
-
execution: {
|
|
22
|
-
interactive: "platform setup --module dev-tunnel",
|
|
23
|
-
nonInteractive: "platform setup --module dev-tunnel",
|
|
24
|
-
},
|
|
25
|
-
requiredInputs: [],
|
|
26
|
-
verify: "platform status",
|
|
27
|
-
successCondition: "配置状态变为“已就绪”",
|
|
28
|
-
blockedReason: "dev-tunnel 尚未发布 publicBaseUrl",
|
|
29
|
-
},
|
|
30
|
-
{
|
|
31
|
-
id: "STEP-AGENT-GATEWAY-02",
|
|
32
|
-
title: "等待 Platform Host",
|
|
33
|
-
description: "Gateway 下游应用端点和凭据尚不可用。",
|
|
34
|
-
state: "BLOCKED",
|
|
35
|
-
responsible: "EXTERNAL",
|
|
36
|
-
execution: {
|
|
37
|
-
interactive: "platform setup --module platform-host",
|
|
38
|
-
nonInteractive: "platform setup --module platform-host",
|
|
39
|
-
},
|
|
40
|
-
requiredInputs: [],
|
|
41
|
-
verify: "platform status",
|
|
42
|
-
successCondition: "platform-host 已发布 endpoint、stateRoot 和 transport credential",
|
|
43
|
-
blockedReason: "platform-host 尚未就绪",
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
};
|
|
47
13
|
const key = (context) => resolve(context.workspaceRoot);
|
|
48
14
|
const factString = (facts, name) => (typeof facts?.[name] === "string" ? String(facts[name]) : undefined);
|
|
49
15
|
async function ownFacts(context) {
|
|
@@ -54,22 +20,41 @@ async function ownFacts(context) {
|
|
|
54
20
|
await writeModuleSharedFacts(context, descriptor.moduleRef, facts);
|
|
55
21
|
return facts;
|
|
56
22
|
}
|
|
57
|
-
async function
|
|
23
|
+
async function readOwnFacts(context) {
|
|
24
|
+
const facts = await readModuleSharedFacts(context, descriptor.moduleRef);
|
|
25
|
+
const localBaseUrl = factString(facts, "localBaseUrl");
|
|
26
|
+
return localBaseUrl ? { localBaseUrl } : undefined;
|
|
27
|
+
}
|
|
28
|
+
async function dependencyObservation(context) {
|
|
58
29
|
const tunnel = await readModuleSharedFacts(context, "dev-tunnel");
|
|
59
30
|
const host = await readModuleSharedFacts(context, "platform-host");
|
|
60
31
|
const publicBaseUrl = factString(tunnel, "publicBaseUrl");
|
|
61
32
|
const downstreamBaseUrl = factString(host, "endpoint");
|
|
62
33
|
const downstreamCredentialFile = factString(host, "gatewayTransportCredentialFile");
|
|
63
34
|
const stateRoot = factString(host, "stateRoot");
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
downstreamCredentialFile
|
|
67
|
-
|
|
68
|
-
|
|
35
|
+
const missing = [
|
|
36
|
+
...(!publicBaseUrl ? ["dev-tunnel"] : []),
|
|
37
|
+
...(!downstreamBaseUrl || !downstreamCredentialFile || !stateRoot
|
|
38
|
+
? ["platform-host"]
|
|
39
|
+
: []),
|
|
40
|
+
];
|
|
41
|
+
const value = publicBaseUrl && downstreamBaseUrl && downstreamCredentialFile && stateRoot
|
|
42
|
+
? {
|
|
43
|
+
publicBaseUrl,
|
|
44
|
+
downstreamBaseUrl,
|
|
45
|
+
downstreamCredentialFile,
|
|
46
|
+
stateRoot,
|
|
47
|
+
}
|
|
69
48
|
: undefined;
|
|
49
|
+
return { value, missing };
|
|
50
|
+
}
|
|
51
|
+
async function dependencies(context) {
|
|
52
|
+
return (await dependencyObservation(context)).value;
|
|
70
53
|
}
|
|
71
54
|
async function running(context) {
|
|
72
|
-
const own = await
|
|
55
|
+
const own = await readOwnFacts(context);
|
|
56
|
+
if (!own)
|
|
57
|
+
return false;
|
|
73
58
|
try {
|
|
74
59
|
return (await fetch(`${own.localBaseUrl}/ready`, {
|
|
75
60
|
signal: AbortSignal.timeout(500),
|
|
@@ -123,7 +108,8 @@ export const behaviorAdapter = {
|
|
|
123
108
|
};
|
|
124
109
|
},
|
|
125
110
|
status: async (context) => {
|
|
126
|
-
const
|
|
111
|
+
const dependency = await dependencyObservation(context);
|
|
112
|
+
const ready = dependency.value;
|
|
127
113
|
return {
|
|
128
114
|
result: {
|
|
129
115
|
...base,
|
|
@@ -139,9 +125,11 @@ export const behaviorAdapter = {
|
|
|
139
125
|
{
|
|
140
126
|
scope: "SETUP",
|
|
141
127
|
code: "UPSTREAM_NOT_READY",
|
|
142
|
-
message: "
|
|
143
|
-
relatedModuleRefs:
|
|
144
|
-
nextCommand:
|
|
128
|
+
message: `等待 ${dependency.missing.join("、")} 完成前置配置`,
|
|
129
|
+
relatedModuleRefs: dependency.missing,
|
|
130
|
+
nextCommand: dependency.missing[0] === "dev-tunnel"
|
|
131
|
+
? "platform setup --module dev-tunnel"
|
|
132
|
+
: "platform setup",
|
|
145
133
|
},
|
|
146
134
|
],
|
|
147
135
|
}),
|
|
@@ -150,15 +138,21 @@ export const behaviorAdapter = {
|
|
|
150
138
|
observedEffects: [],
|
|
151
139
|
};
|
|
152
140
|
},
|
|
153
|
-
setup: async (context) =>
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
: {
|
|
157
|
-
...
|
|
158
|
-
data:
|
|
141
|
+
setup: async (context) => {
|
|
142
|
+
const dependency = await dependencyObservation(context);
|
|
143
|
+
return {
|
|
144
|
+
result: {
|
|
145
|
+
...base,
|
|
146
|
+
data: {
|
|
147
|
+
...(await ownFacts(context)),
|
|
148
|
+
...(dependency.value === undefined
|
|
149
|
+
? { waitingFor: dependency.missing }
|
|
150
|
+
: {}),
|
|
151
|
+
},
|
|
159
152
|
},
|
|
160
|
-
|
|
161
|
-
|
|
153
|
+
observedEffects: [],
|
|
154
|
+
};
|
|
155
|
+
},
|
|
162
156
|
docs: async (_context) => ({
|
|
163
157
|
result: {
|
|
164
158
|
...base,
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "agent-gateway";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-agent-gateway";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.15";
|
|
7
7
|
readonly kind: "service";
|
|
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: "agent-gateway",
|
|
5
5
|
packageName: "@tomflow/proflow-agent-gateway",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.15",
|
|
7
7
|
kind: "service",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-agent-gateway",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.15",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
"@tomflow/proflow-module-contract": "^0.1.13"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
|
-
"@tomflow/proflow-deployment-conformance": "^0.1.11",
|
|
32
|
-
"@tomflow/proflow-execution-browser-extension": "^0.1.13",
|
|
33
31
|
"@tomflow/proflow-agent-runtime": "^0.1.10",
|
|
32
|
+
"@tomflow/proflow-deployment-conformance": "^0.1.13",
|
|
33
|
+
"@tomflow/proflow-execution-browser-extension": "^0.1.15",
|
|
34
|
+
"@tomflow/proflow-platform-host": "^0.1.14",
|
|
35
|
+
"@tomflow/proflow-execution-runtime": "^0.1.15",
|
|
34
36
|
"@tomflow/proflow-task-migration-runner": "^0.1.11",
|
|
35
|
-
"@tomflow/proflow-execution-local": "^0.1.12",
|
|
36
|
-
"@tomflow/proflow-platform-host": "^0.1.13",
|
|
37
|
-
"@tomflow/proflow-execution-runtime": "^0.1.14",
|
|
38
37
|
"@tomflow/proflow-task-orchestration": "^0.1.9",
|
|
39
|
-
"@tomflow/proflow-task-store-sqlite": "^0.1.11"
|
|
38
|
+
"@tomflow/proflow-task-store-sqlite": "^0.1.11",
|
|
39
|
+
"@tomflow/proflow-execution-local": "^0.1.13"
|
|
40
40
|
},
|
|
41
41
|
"description": "The sole Custom GPT Actions HTTP ingress and OpenAI transport anti-corruption layer.",
|
|
42
42
|
"keywords": [
|
package/proflow.module.json
CHANGED