@tomflow/proflow-execution-browser-extension 0.1.33 → 0.1.34
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/dist/deployment/adapter.d.ts +10 -10
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/bridge.d.ts +3 -0
- package/dist/src/bridge.js +23 -2
- package/dist/src/runtime-composition.d.ts +3 -0
- package/manifest.json +1 -1
- package/package.json +1 -1
- package/proflow.module.json +1 -1
|
@@ -47,7 +47,7 @@ export declare const behaviorAdapter: {
|
|
|
47
47
|
ok: true;
|
|
48
48
|
status: "SUCCEEDED";
|
|
49
49
|
moduleRef: "execution-browser-extension";
|
|
50
|
-
moduleVersion: "0.1.
|
|
50
|
+
moduleVersion: "0.1.34";
|
|
51
51
|
data: {
|
|
52
52
|
loadDir: string;
|
|
53
53
|
};
|
|
@@ -60,7 +60,7 @@ export declare const behaviorAdapter: {
|
|
|
60
60
|
readonly ok: true;
|
|
61
61
|
readonly status: "SUCCEEDED";
|
|
62
62
|
readonly moduleRef: "execution-browser-extension";
|
|
63
|
-
readonly moduleVersion: "0.1.
|
|
63
|
+
readonly moduleVersion: "0.1.34";
|
|
64
64
|
};
|
|
65
65
|
observedEffects: never[];
|
|
66
66
|
}>;
|
|
@@ -70,7 +70,7 @@ export declare const behaviorAdapter: {
|
|
|
70
70
|
ok: true;
|
|
71
71
|
status: "SUCCEEDED";
|
|
72
72
|
moduleRef: "execution-browser-extension";
|
|
73
|
-
moduleVersion: "0.1.
|
|
73
|
+
moduleVersion: "0.1.34";
|
|
74
74
|
data: {
|
|
75
75
|
setupStatus: "ACTION_REQUIRED" | "READY";
|
|
76
76
|
runtimeStatus: "NOT_APPLICABLE";
|
|
@@ -95,7 +95,7 @@ export declare const behaviorAdapter: {
|
|
|
95
95
|
result: {
|
|
96
96
|
contract: "deployment.result.v1";
|
|
97
97
|
moduleRef: "execution-browser-extension";
|
|
98
|
-
moduleVersion: "0.1.
|
|
98
|
+
moduleVersion: "0.1.34";
|
|
99
99
|
ok: false;
|
|
100
100
|
status: "ACTION_REQUIRED";
|
|
101
101
|
data: {
|
|
@@ -127,14 +127,14 @@ export declare const behaviorAdapter: {
|
|
|
127
127
|
readonly ok: true;
|
|
128
128
|
readonly status: "SUCCEEDED";
|
|
129
129
|
readonly moduleRef: "execution-browser-extension";
|
|
130
|
-
readonly moduleVersion: "0.1.
|
|
130
|
+
readonly moduleVersion: "0.1.34";
|
|
131
131
|
};
|
|
132
132
|
observedEffects: string[];
|
|
133
133
|
} | {
|
|
134
134
|
result: {
|
|
135
135
|
contract: "deployment.result.v1";
|
|
136
136
|
moduleRef: "execution-browser-extension";
|
|
137
|
-
moduleVersion: "0.1.
|
|
137
|
+
moduleVersion: "0.1.34";
|
|
138
138
|
ok: false;
|
|
139
139
|
status: "FAILED";
|
|
140
140
|
error: {
|
|
@@ -167,7 +167,7 @@ export declare const behaviorAdapter: {
|
|
|
167
167
|
ok: true;
|
|
168
168
|
status: "SUCCEEDED";
|
|
169
169
|
moduleRef: "execution-browser-extension";
|
|
170
|
-
moduleVersion: "0.1.
|
|
170
|
+
moduleVersion: "0.1.34";
|
|
171
171
|
data: {
|
|
172
172
|
docs: string;
|
|
173
173
|
};
|
|
@@ -180,11 +180,11 @@ export declare const behaviorAdapter: {
|
|
|
180
180
|
readonly ok: true;
|
|
181
181
|
readonly status: "SUCCEEDED";
|
|
182
182
|
readonly moduleRef: "execution-browser-extension";
|
|
183
|
-
readonly moduleVersion: "0.1.
|
|
183
|
+
readonly moduleVersion: "0.1.34";
|
|
184
184
|
} | {
|
|
185
185
|
contract: "deployment.result.v1";
|
|
186
186
|
moduleRef: "execution-browser-extension";
|
|
187
|
-
moduleVersion: "0.1.
|
|
187
|
+
moduleVersion: "0.1.34";
|
|
188
188
|
ok: false;
|
|
189
189
|
status: "FAILED";
|
|
190
190
|
error: {
|
|
@@ -201,7 +201,7 @@ export declare const behaviorAdapter: {
|
|
|
201
201
|
readonly ok: true;
|
|
202
202
|
readonly status: "SUCCEEDED";
|
|
203
203
|
readonly moduleRef: "execution-browser-extension";
|
|
204
|
-
readonly moduleVersion: "0.1.
|
|
204
|
+
readonly moduleVersion: "0.1.34";
|
|
205
205
|
};
|
|
206
206
|
observedEffects: never[];
|
|
207
207
|
}>;
|
|
@@ -3,7 +3,7 @@ export declare const descriptor: {
|
|
|
3
3
|
readonly contractVersion: "1.0.0";
|
|
4
4
|
readonly moduleRef: "execution-browser-extension";
|
|
5
5
|
readonly packageName: "@tomflow/proflow-execution-browser-extension";
|
|
6
|
-
readonly moduleVersion: "0.1.
|
|
6
|
+
readonly moduleVersion: "0.1.34";
|
|
7
7
|
readonly kind: "browser-extension";
|
|
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: "execution-browser-extension",
|
|
5
5
|
packageName: "@tomflow/proflow-execution-browser-extension",
|
|
6
|
-
moduleVersion: "0.1.
|
|
6
|
+
moduleVersion: "0.1.34",
|
|
7
7
|
kind: "browser-extension",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
package/dist/src/bridge.d.ts
CHANGED
|
@@ -28,6 +28,9 @@ export declare function createBrowserRealityBridgeServer(options: BrowserReality
|
|
|
28
28
|
extensionInstanceId: string | null;
|
|
29
29
|
queuedCommands: number;
|
|
30
30
|
pendingCommands: number;
|
|
31
|
+
lastCommandPollAt: string | null;
|
|
32
|
+
lastCommandDeliveredAt: string | null;
|
|
33
|
+
lastCommandResultAt: string | null;
|
|
31
34
|
};
|
|
32
35
|
close(): Promise<void>;
|
|
33
36
|
}>>;
|
package/dist/src/bridge.js
CHANGED
|
@@ -115,6 +115,9 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
115
115
|
const queue = [];
|
|
116
116
|
const pending = new Map();
|
|
117
117
|
let session;
|
|
118
|
+
let lastCommandPollAt = null;
|
|
119
|
+
let lastCommandDeliveredAt = null;
|
|
120
|
+
let lastCommandResultAt = null;
|
|
118
121
|
let closed = false;
|
|
119
122
|
let endpoint = "";
|
|
120
123
|
const taskBootstrap = new Map();
|
|
@@ -188,6 +191,11 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
188
191
|
browserCarrier: {
|
|
189
192
|
online: session !== undefined && now().getTime() - session.lastHeartbeatAt <= freshnessMs,
|
|
190
193
|
extensionInstanceId: session?.extensionInstanceId ?? null,
|
|
194
|
+
queuedCommands: queue.length,
|
|
195
|
+
pendingCommands: pending.size,
|
|
196
|
+
lastCommandPollAt,
|
|
197
|
+
lastCommandDeliveredAt,
|
|
198
|
+
lastCommandResultAt,
|
|
191
199
|
},
|
|
192
200
|
},
|
|
193
201
|
});
|
|
@@ -232,8 +240,14 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
232
240
|
if (!isRecord(body) ||
|
|
233
241
|
stringField(body, "extensionId") !== options.extensionId)
|
|
234
242
|
throw new BrowserRealityBridgeError("BRIDGE_AUTH_INVALID", "extension identity mismatch");
|
|
243
|
+
const extensionInstanceId = stringField(body, "extensionInstanceId");
|
|
244
|
+
if (session?.extensionInstanceId !== extensionInstanceId) {
|
|
245
|
+
lastCommandPollAt = null;
|
|
246
|
+
lastCommandDeliveredAt = null;
|
|
247
|
+
lastCommandResultAt = null;
|
|
248
|
+
}
|
|
235
249
|
session = {
|
|
236
|
-
extensionInstanceId
|
|
250
|
+
extensionInstanceId,
|
|
237
251
|
lastHeartbeatAt: now().getTime(),
|
|
238
252
|
};
|
|
239
253
|
send(response, 200, { accepted: true });
|
|
@@ -260,12 +274,15 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
260
274
|
return;
|
|
261
275
|
}
|
|
262
276
|
if (request.method === "GET" && url.pathname === "/v1/commands/next") {
|
|
263
|
-
|
|
277
|
+
const stamp = now();
|
|
278
|
+
session.lastHeartbeatAt = stamp.getTime();
|
|
279
|
+
lastCommandPollAt = stamp.toISOString();
|
|
264
280
|
const command = queue.shift();
|
|
265
281
|
if (command) {
|
|
266
282
|
const tracked = pending.get(command.commandId);
|
|
267
283
|
if (tracked)
|
|
268
284
|
tracked.stage = "DELIVERED";
|
|
285
|
+
lastCommandDeliveredAt = lastCommandPollAt;
|
|
269
286
|
}
|
|
270
287
|
send(response, command ? 200 : 204, command);
|
|
271
288
|
return;
|
|
@@ -280,6 +297,7 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
280
297
|
throw new BrowserRealityBridgeError("BRIDGE_INPUT_INVALID", "command result is stale or unknown");
|
|
281
298
|
pending.delete(commandId);
|
|
282
299
|
clearTimeout(command.timer);
|
|
300
|
+
lastCommandResultAt = now().toISOString();
|
|
283
301
|
if (body.ok === true)
|
|
284
302
|
command.resolve(body.value);
|
|
285
303
|
else
|
|
@@ -391,6 +409,9 @@ export async function createBrowserRealityBridgeServer(options) {
|
|
|
391
409
|
extensionInstanceId: session?.extensionInstanceId ?? null,
|
|
392
410
|
queuedCommands: queue.length,
|
|
393
411
|
pendingCommands: pending.size,
|
|
412
|
+
lastCommandPollAt,
|
|
413
|
+
lastCommandDeliveredAt,
|
|
414
|
+
lastCommandResultAt,
|
|
394
415
|
};
|
|
395
416
|
},
|
|
396
417
|
async close() {
|
|
@@ -91,6 +91,9 @@ export declare function createBrowserExecutorComposition(options: BrowserExecuto
|
|
|
91
91
|
extensionInstanceId: string | null;
|
|
92
92
|
queuedCommands: number;
|
|
93
93
|
pendingCommands: number;
|
|
94
|
+
lastCommandPollAt: string | null;
|
|
95
|
+
lastCommandDeliveredAt: string | null;
|
|
96
|
+
lastCommandResultAt: string | null;
|
|
94
97
|
};
|
|
95
98
|
close: () => Promise<void>;
|
|
96
99
|
}>>;
|
package/manifest.json
CHANGED
package/package.json
CHANGED
package/proflow.module.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"contractVersion": "1.0.0",
|
|
4
4
|
"moduleRef": "execution-browser-extension",
|
|
5
5
|
"packageName": "@tomflow/proflow-execution-browser-extension",
|
|
6
|
-
"moduleVersion": "0.1.
|
|
6
|
+
"moduleVersion": "0.1.34",
|
|
7
7
|
"kind": "browser-extension",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|