@tomflow/proflow-execution-browser-extension 0.1.22 → 0.1.24
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 +12 -0
- package/dist/deployment/adapter.d.ts +10 -10
- package/dist/deployment/adapter.js +13 -2
- package/dist/deployment/descriptor.d.ts +1 -1
- package/dist/deployment/descriptor.js +1 -1
- package/dist/src/chrome-extension-state.d.ts +10 -0
- package/dist/src/chrome-extension-state.js +12 -0
- package/manifest.json +1 -1
- package/package.json +3 -3
- package/proflow.module.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @tomflow/proflow-execution-browser-extension
|
|
2
2
|
|
|
3
|
+
## 0.1.24
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Cover Chrome's observed delayed Secure Preferences flush while waiting for unpacked-extension registration to become enabled after pairing.
|
|
8
|
+
|
|
9
|
+
## 0.1.23
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- Wait for Chrome unpacked-extension registration to become observably enabled after heartbeat pairing before Browser setup reports success.
|
|
14
|
+
|
|
3
15
|
## 0.1.22
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -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.24";
|
|
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.24";
|
|
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.24";
|
|
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.24";
|
|
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.24";
|
|
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.24";
|
|
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.24";
|
|
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.24";
|
|
184
184
|
} | {
|
|
185
185
|
contract: "deployment.result.v1";
|
|
186
186
|
moduleRef: "execution-browser-extension";
|
|
187
|
-
moduleVersion: "0.1.
|
|
187
|
+
moduleVersion: "0.1.24";
|
|
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.24";
|
|
205
205
|
};
|
|
206
206
|
observedEffects: never[];
|
|
207
207
|
}>;
|
|
@@ -3,7 +3,7 @@ import { cp, mkdir, readFile, rm, writeFile } from "node:fs/promises";
|
|
|
3
3
|
import { basename, dirname, join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
5
5
|
import { deterministicLoopbackPort, ensureModuleSecretFile, moduleWorkspaceStateDirectory, readModuleSharedFacts, writeModuleSharedFacts, } from "@tomflow/proflow-module-contract";
|
|
6
|
-
import { probeChromeExtensionState } from "../src/chrome-extension-state.js";
|
|
6
|
+
import { probeChromeExtensionState, waitForChromeExtensionEnabled, } from "../src/chrome-extension-state.js";
|
|
7
7
|
import { openBrowserExtensionManager, runInteractiveBrowserExtensionSetup, } from "../src/install-workflow.js";
|
|
8
8
|
import { createBrowserExtensionPairingServer } from "../src/pairing.js";
|
|
9
9
|
import { descriptor } from "./descriptor.js";
|
|
@@ -535,7 +535,7 @@ export const behaviorAdapter = {
|
|
|
535
535
|
installFlow?.developerModeConfirmed !== true) {
|
|
536
536
|
await persistDeveloperModeConfirmation(context);
|
|
537
537
|
}
|
|
538
|
-
await runInteractiveBrowserExtensionSetup({
|
|
538
|
+
const paired = await runInteractiveBrowserExtensionSetup({
|
|
539
539
|
workspaceRoot: context.workspaceRoot,
|
|
540
540
|
...(input?.timeoutMs === undefined
|
|
541
541
|
? {}
|
|
@@ -543,6 +543,17 @@ export const behaviorAdapter = {
|
|
|
543
543
|
...(input?.desktop === undefined ? {} : { desktop: input.desktop }),
|
|
544
544
|
...(input?.pair === undefined ? {} : { pair: input.pair }),
|
|
545
545
|
});
|
|
546
|
+
if (input?.pair === undefined) {
|
|
547
|
+
const chromeState = await waitForChromeExtensionEnabled({
|
|
548
|
+
extensionId: paired.extensionId,
|
|
549
|
+
loadDir: browserExtensionLoadDir(context.workspaceRoot),
|
|
550
|
+
},
|
|
551
|
+
// Chrome persists unpacked-extension registration to Secure Preferences
|
|
552
|
+
// on a delayed flush. Keep this bounded, but cover the observed ~9s window.
|
|
553
|
+
{ timeoutMs: 15_000 });
|
|
554
|
+
if (chromeState !== "ENABLED")
|
|
555
|
+
throw new Error(`Chrome extension registration did not stabilize as ENABLED after pairing (${chromeState})`);
|
|
556
|
+
}
|
|
546
557
|
return {
|
|
547
558
|
result: base,
|
|
548
559
|
observedEffects: ["Materialize the unpacked MV3 extension package"],
|
|
@@ -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.24";
|
|
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.24",
|
|
7
7
|
kind: "browser-extension",
|
|
8
8
|
templateVersion: "1.0.0",
|
|
9
9
|
platformCompatibility: ">=1.0.0 <2.0.0",
|
|
@@ -1,4 +1,14 @@
|
|
|
1
1
|
export type ChromeExtensionState = "ENABLED" | "DISABLED" | "MISSING" | "UNKNOWN";
|
|
2
|
+
export type ChromeExtensionStateProbe = () => Promise<ChromeExtensionState>;
|
|
3
|
+
export declare function waitForChromeExtensionEnabled(input: {
|
|
4
|
+
extensionId: string;
|
|
5
|
+
loadDir: string;
|
|
6
|
+
userDataRoot?: string;
|
|
7
|
+
}, options?: {
|
|
8
|
+
timeoutMs?: number;
|
|
9
|
+
intervalMs?: number;
|
|
10
|
+
probe?: ChromeExtensionStateProbe;
|
|
11
|
+
}): Promise<ChromeExtensionState>;
|
|
2
12
|
export declare function probeChromeExtensionState(input: {
|
|
3
13
|
extensionId: string;
|
|
4
14
|
loadDir: string;
|
|
@@ -37,6 +37,18 @@ async function preferredProfiles(root) {
|
|
|
37
37
|
? [lastUsed, ...profiles.filter((name) => name !== lastUsed)]
|
|
38
38
|
: profiles;
|
|
39
39
|
}
|
|
40
|
+
export async function waitForChromeExtensionEnabled(input, options = {}) {
|
|
41
|
+
const timeoutMs = options.timeoutMs ?? 5_000;
|
|
42
|
+
const intervalMs = options.intervalMs ?? 100;
|
|
43
|
+
const probe = options.probe ?? (() => probeChromeExtensionState(input));
|
|
44
|
+
const deadline = Date.now() + timeoutMs;
|
|
45
|
+
let observed = await probe();
|
|
46
|
+
while (observed !== "ENABLED" && observed !== "DISABLED" && Date.now() < deadline) {
|
|
47
|
+
await new Promise((resolve) => setTimeout(resolve, intervalMs));
|
|
48
|
+
observed = await probe();
|
|
49
|
+
}
|
|
50
|
+
return observed;
|
|
51
|
+
}
|
|
40
52
|
export async function probeChromeExtensionState(input) {
|
|
41
53
|
const root = input.userDataRoot ?? defaultUserDataRoot();
|
|
42
54
|
if (!root)
|
package/manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tomflow/proflow-execution-browser-extension",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.24",
|
|
4
4
|
"description": "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -31,8 +31,8 @@
|
|
|
31
31
|
"@tomflow/proflow-module-contract": "^0.1.13"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@tomflow/proflow-
|
|
35
|
-
"@tomflow/proflow-
|
|
34
|
+
"@tomflow/proflow-execution-runtime": "^0.1.15",
|
|
35
|
+
"@tomflow/proflow-deployment-conformance": "^0.1.13"
|
|
36
36
|
},
|
|
37
37
|
"keywords": [
|
|
38
38
|
"proflow",
|
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.24",
|
|
7
7
|
"kind": "browser-extension",
|
|
8
8
|
"templateVersion": "1.0.0",
|
|
9
9
|
"platformCompatibility": ">=1.0.0 <2.0.0",
|