@tomflow/proflow-execution-browser-extension 0.1.18 → 0.1.19

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.
@@ -24,7 +24,7 @@ export declare const behaviorAdapter: {
24
24
  ok: true;
25
25
  status: "SUCCEEDED";
26
26
  moduleRef: "execution-browser-extension";
27
- moduleVersion: "0.1.18";
27
+ moduleVersion: "0.1.19";
28
28
  data: {
29
29
  loadDir: string;
30
30
  };
@@ -37,7 +37,7 @@ export declare const behaviorAdapter: {
37
37
  readonly ok: true;
38
38
  readonly status: "SUCCEEDED";
39
39
  readonly moduleRef: "execution-browser-extension";
40
- readonly moduleVersion: "0.1.18";
40
+ readonly moduleVersion: "0.1.19";
41
41
  };
42
42
  observedEffects: never[];
43
43
  }>;
@@ -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.18";
50
+ moduleVersion: "0.1.19";
51
51
  data: {
52
52
  setupStatus: "ACTION_REQUIRED" | "READY";
53
53
  runtimeStatus: "NOT_APPLICABLE";
@@ -66,7 +66,7 @@ export declare const behaviorAdapter: {
66
66
  result: {
67
67
  contract: "deployment.result.v1";
68
68
  moduleRef: "execution-browser-extension";
69
- moduleVersion: "0.1.18";
69
+ moduleVersion: "0.1.19";
70
70
  ok: false;
71
71
  status: "ACTION_REQUIRED";
72
72
  data: {
@@ -98,14 +98,14 @@ export declare const behaviorAdapter: {
98
98
  readonly ok: true;
99
99
  readonly status: "SUCCEEDED";
100
100
  readonly moduleRef: "execution-browser-extension";
101
- readonly moduleVersion: "0.1.18";
101
+ readonly moduleVersion: "0.1.19";
102
102
  };
103
103
  observedEffects: string[];
104
104
  } | {
105
105
  result: {
106
106
  contract: "deployment.result.v1";
107
107
  moduleRef: "execution-browser-extension";
108
- moduleVersion: "0.1.18";
108
+ moduleVersion: "0.1.19";
109
109
  ok: false;
110
110
  status: "FAILED";
111
111
  error: {
@@ -138,7 +138,7 @@ export declare const behaviorAdapter: {
138
138
  ok: true;
139
139
  status: "SUCCEEDED";
140
140
  moduleRef: "execution-browser-extension";
141
- moduleVersion: "0.1.18";
141
+ moduleVersion: "0.1.19";
142
142
  data: {
143
143
  docs: string;
144
144
  };
@@ -151,11 +151,11 @@ export declare const behaviorAdapter: {
151
151
  readonly ok: true;
152
152
  readonly status: "SUCCEEDED";
153
153
  readonly moduleRef: "execution-browser-extension";
154
- readonly moduleVersion: "0.1.18";
154
+ readonly moduleVersion: "0.1.19";
155
155
  } | {
156
156
  contract: "deployment.result.v1";
157
157
  moduleRef: "execution-browser-extension";
158
- moduleVersion: "0.1.18";
158
+ moduleVersion: "0.1.19";
159
159
  ok: false;
160
160
  status: "FAILED";
161
161
  error: {
@@ -172,7 +172,7 @@ export declare const behaviorAdapter: {
172
172
  readonly ok: true;
173
173
  readonly status: "SUCCEEDED";
174
174
  readonly moduleRef: "execution-browser-extension";
175
- readonly moduleVersion: "0.1.18";
175
+ readonly moduleVersion: "0.1.19";
176
176
  };
177
177
  observedEffects: never[];
178
178
  }>;
@@ -3,6 +3,7 @@ import { cp, mkdir, readFile, 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
7
  import { openBrowserExtensionManager, runInteractiveBrowserExtensionSetup, } from "../src/install-workflow.js";
7
8
  import { createBrowserExtensionPairingServer } from "../src/pairing.js";
8
9
  import { descriptor } from "./descriptor.js";
@@ -310,7 +311,16 @@ export const behaviorAdapter = {
310
311
  const loadDir = browserExtensionLoadDir(context.workspaceRoot);
311
312
  const setup = await readSetup(context);
312
313
  const evidence = await readEvidence(context, loadDir);
313
- const setupReady = Boolean(setup && evidence && setup.extensionId === evidence.extensionId);
314
+ const chromeState = setup && evidence && setup.extensionId === evidence.extensionId
315
+ ? await probeChromeExtensionState({
316
+ extensionId: evidence.extensionId,
317
+ loadDir,
318
+ })
319
+ : "MISSING";
320
+ const setupReady = Boolean(setup &&
321
+ evidence &&
322
+ setup.extensionId === evidence.extensionId &&
323
+ chromeState === "ENABLED");
314
324
  return {
315
325
  result: {
316
326
  ...base,
@@ -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.18";
6
+ readonly moduleVersion: "0.1.19";
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.18",
6
+ moduleVersion: "0.1.19",
7
7
  kind: "browser-extension",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
@@ -0,0 +1,6 @@
1
+ export type ChromeExtensionState = "ENABLED" | "DISABLED" | "MISSING" | "UNKNOWN";
2
+ export declare function probeChromeExtensionState(input: {
3
+ extensionId: string;
4
+ loadDir: string;
5
+ userDataRoot?: string;
6
+ }): Promise<ChromeExtensionState>;
@@ -0,0 +1,66 @@
1
+ import { readdir, readFile } from "node:fs/promises";
2
+ import { homedir } from "node:os";
3
+ import { join, resolve } from "node:path";
4
+ function defaultUserDataRoot() {
5
+ if (process.platform === "darwin")
6
+ return join(homedir(), "Library", "Application Support", "Google", "Chrome");
7
+ if (process.platform === "linux")
8
+ return join(homedir(), ".config", "google-chrome");
9
+ if (process.platform === "win32" && process.env.LOCALAPPDATA)
10
+ return join(process.env.LOCALAPPDATA, "Google", "Chrome", "User Data");
11
+ return undefined;
12
+ }
13
+ function entryState(entry, expectedLoadDir) {
14
+ if (typeof entry.path !== "string" || resolve(entry.path) !== expectedLoadDir)
15
+ return undefined;
16
+ const disabledByReason = Array.isArray(entry.disable_reasons) && entry.disable_reasons.length > 0;
17
+ const disabledByState = entry.state === 0;
18
+ return disabledByReason || disabledByState ? "DISABLED" : "ENABLED";
19
+ }
20
+ async function settingsFrom(path) {
21
+ const raw = JSON.parse(await readFile(path, "utf8"));
22
+ return raw.extensions?.settings ?? {};
23
+ }
24
+ async function preferredProfiles(root) {
25
+ let lastUsed;
26
+ try {
27
+ const localState = JSON.parse(await readFile(join(root, "Local State"), "utf8"));
28
+ if (typeof localState.profile?.last_used === "string")
29
+ lastUsed = localState.profile.last_used;
30
+ }
31
+ catch { }
32
+ const entries = await readdir(root, { withFileTypes: true });
33
+ const profiles = entries
34
+ .filter((entry) => entry.isDirectory() && /^(Default|Profile \d+)$/.test(entry.name))
35
+ .map((entry) => entry.name);
36
+ return lastUsed && profiles.includes(lastUsed)
37
+ ? [lastUsed, ...profiles.filter((name) => name !== lastUsed)]
38
+ : profiles;
39
+ }
40
+ export async function probeChromeExtensionState(input) {
41
+ const root = input.userDataRoot ?? defaultUserDataRoot();
42
+ if (!root)
43
+ return "UNKNOWN";
44
+ const expectedLoadDir = resolve(input.loadDir);
45
+ try {
46
+ const profiles = await preferredProfiles(root);
47
+ let sawMatchingDisabled = false;
48
+ for (const profile of profiles) {
49
+ for (const file of ["Secure Preferences", "Preferences"]) {
50
+ try {
51
+ const settings = await settingsFrom(join(root, profile, file));
52
+ const observed = entryState(settings[input.extensionId] ?? {}, expectedLoadDir);
53
+ if (observed === "ENABLED")
54
+ return "ENABLED";
55
+ if (observed === "DISABLED")
56
+ sawMatchingDisabled = true;
57
+ }
58
+ catch { }
59
+ }
60
+ }
61
+ return sawMatchingDisabled ? "DISABLED" : "MISSING";
62
+ }
63
+ catch {
64
+ return "UNKNOWN";
65
+ }
66
+ }
package/manifest.json CHANGED
@@ -1,28 +1,17 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "ProFlow Execution Browser",
4
- "version": "0.1.18",
5
- "permissions": [
6
- "tabs",
7
- "storage",
8
- "sidePanel"
9
- ],
10
- "host_permissions": [
11
- "https://chatgpt.com/*",
12
- "http://127.0.0.1/*"
13
- ],
4
+ "version": "0.1.19",
5
+ "permissions": ["tabs", "storage", "sidePanel"],
6
+ "host_permissions": ["https://chatgpt.com/*", "http://127.0.0.1/*"],
14
7
  "background": {
15
8
  "service_worker": "dist/extension/background.js",
16
9
  "type": "module"
17
10
  },
18
11
  "content_scripts": [
19
12
  {
20
- "matches": [
21
- "https://chatgpt.com/g/*"
22
- ],
23
- "js": [
24
- "dist/extension/content.js"
25
- ],
13
+ "matches": ["https://chatgpt.com/g/*"],
14
+ "js": ["dist/extension/content.js"],
26
15
  "run_at": "document_idle"
27
16
  },
28
17
  {
@@ -30,9 +19,7 @@
30
19
  "https://chatgpt.com/gpts/editor",
31
20
  "https://chatgpt.com/gpts/editor/*"
32
21
  ],
33
- "js": [
34
- "dist/extension/provisioning-content.js"
35
- ],
22
+ "js": ["dist/extension/provisioning-content.js"],
36
23
  "run_at": "document_idle"
37
24
  }
38
25
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-browser-extension",
3
- "version": "0.1.18",
3
+ "version": "0.1.19",
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-deployment-conformance": "^0.1.13",
35
- "@tomflow/proflow-execution-runtime": "^0.1.15"
34
+ "@tomflow/proflow-execution-runtime": "^0.1.15",
35
+ "@tomflow/proflow-deployment-conformance": "^0.1.13"
36
36
  },
37
37
  "keywords": [
38
38
  "proflow",
@@ -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.18",
6
+ "moduleVersion": "0.1.19",
7
7
  "kind": "browser-extension",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",
package/CHANGELOG.md DELETED
@@ -1,79 +0,0 @@
1
- # @tomflow/proflow-execution-browser-extension
2
-
3
- ## 0.1.18
4
-
5
- ### Patch Changes
6
-
7
- - Close the final Deployment replay defects: make Dev Tunnel CLI version probing tolerate real service latency, keep Browser Extension setup idempotent across retries, and remember a non-sensitive Provider endpoint across temporary outages without fabricating readiness.
8
-
9
- ## 0.1.17
10
-
11
- ### Patch Changes
12
-
13
- - Repack the Deployment Closeout release from freshly rebuilt artifacts and enforce build + publishability before every canonical publish.
14
-
15
- ## 0.1.16
16
-
17
- ### Patch Changes
18
-
19
- - Harden Deployment Closeout: fail closed on partial installs and package-manager conflicts, normalize Git workspace isolation, make Dev Tunnel status fast and resumable without fabricating login failures, and align Browser Extension setup/conformance behavior.
20
-
21
- ## 0.1.15
22
-
23
- ### Patch Changes
24
-
25
- - Add professional setup orchestration, Provider FAST/THINK input, recoverable managed Dev Tunnel provisioning, Browser installation guidance, and precise status diagnostics.
26
-
27
- ## 0.1.14
28
-
29
- ### Patch Changes
30
-
31
- - 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.
32
-
33
- ## 0.1.13
34
-
35
- ### Patch Changes
36
-
37
- - Ship the Phase 3 browser, tunnel, model automation, platform readiness, and documentation closure as one verifiable platform snapshot.
38
-
39
- ## 0.1.12
40
-
41
- ### Patch Changes
42
-
43
- - Distinguish dependency blocking from verified failure, expose Module-owned status diagnostics, remove automatic docs paging, consolidate start checks, add contextual help, and clarify uninstall output.
44
-
45
- ## 0.1.11
46
-
47
- ### Patch Changes
48
-
49
- - Upgrade the ProFlow terminal experience, stream Registry and package-manager progress, publish structured Chinese Module documentation, and provide numbered package-owned Setup assistants.
50
-
51
- ## 0.1.10
52
-
53
- ### Patch Changes
54
-
55
- - Make every setup command directly runnable from a workspace and render setup failures without Node stack traces.
56
-
57
- ## 0.1.9
58
-
59
- ### Patch Changes
60
-
61
- - Improve terminal progress and localized status output, publish readable Chinese module docs, and add guided setup assistants for external resources.
62
-
63
- ## 0.1.8
64
-
65
- ### Patch Changes
66
-
67
- - Resolve DOCS.md from both source and built deployment adapters, prove all 24 built adapters return the published body, and announce package synchronization before the package manager blocks.
68
-
69
- ## 0.1.7
70
-
71
- ### Patch Changes
72
-
73
- - Replace JSON terminal protocols with typed CLI outcomes, add real-time Chinese progress and lifecycle summaries, publish DOCS content, standardize executable setup plans and package-owned setup commands, and preserve only user-owned pnpm policy during uninstall.
74
-
75
- ## 0.1.6
76
-
77
- ### Patch Changes
78
-
79
- - Align all Modules to the seven-command setup contract with executable package-owned setup guidance and full Platform setup aggregation.