@tomflow/proflow-execution-browser-extension 0.1.3 → 0.1.4

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.
@@ -0,0 +1,33 @@
1
+ # execution-browser-extension configuration
2
+
3
+ Canonical public config: `.proflow/config/execution-browser-extension.json`
4
+
5
+ This file is Workspace-owned data. `platform uninstall` does not delete it. Values are JSON strings. Raw secrets must not be stored here; `secretRef` fields contain opaque references only.
6
+
7
+ ## Fields
8
+
9
+ | Key | Type | Required | Sensitive | Source | Meaning |
10
+ |---|---|---:|---:|---|---|
11
+ | `bridge.endpoint` | `url` | yes | no | User or owning external/runtime Module supplies the reachable endpoint URL. | Loopback Browser Reality Bridge endpoint |
12
+ | `bridge.token` | `path` | yes | yes | User or owning Module supplies an absolute/local path that exists on this Workspace. | File containing the Browser Reality Bridge extension token |
13
+ | `taskApplication.endpoint` | `url` | yes | no | User or owning external/runtime Module supplies the reachable endpoint URL. | Loopback Platform Host Task application endpoint |
14
+ | `taskApplication.token` | `path` | yes | yes | User or owning Module supplies an absolute/local path that exists on this Workspace. | File containing the Platform Host Task application token |
15
+ | `approvalApplication.endpoint` | `url` | yes | no | User or owning external/runtime Module supplies the reachable endpoint URL. | Loopback Platform Host Approval application endpoint |
16
+ | `approvalApplication.token` | `path` | yes | yes | User or owning Module supplies an absolute/local path that exists on this Workspace. | File containing the Platform Host Approval application token |
17
+ | `verificationEvidenceFile` | `path` | yes | no | User or owning Module supplies an absolute/local path that exists on this Workspace. | JSON evidence file written after real Chrome loads the Deployment-managed MV3 extension and its Service Worker runs |
18
+ | `chromeRuntimeModuleRef` | `moduleRef` | no | no | Another installed ProFlow Module reference selected from `platform docs` / Module topology. | External resource module governing the Chrome runtime |
19
+ | `carrierModuleRef` | `moduleRef` | no | no | Another installed ProFlow Module reference selected from `platform docs` / Module topology. | External resource module governing the Custom GPT carrier |
20
+
21
+ ## Materialize
22
+
23
+ Create or update the canonical JSON object at:
24
+
25
+ `.proflow/config/execution-browser-extension.json`
26
+
27
+ Use only declared keys and string values. Do not create a second Platform configuration database.
28
+
29
+ The Browser Extension also requires a package-owned physical runtime config artifact. After the canonical Module config is present, run `proflow-execution-browser-extension materialize-config --workspace <path>`. This package-owned command writes the private runtime artifact under `.proflow/deployment/browser-extension/execution-browser-extension/`; `platform start` must not perform this materialization implicitly.
30
+
31
+ ## Base completion check
32
+
33
+ Run `platform modules`. This Module should no longer report required keys in `missingConfig`. `platform start` performs the authoritative Module-owned validation before starting anything.
@@ -3,7 +3,7 @@ export declare const behaviorAdapter: {
3
3
  result: {
4
4
  contract: "deployment.result.v1";
5
5
  moduleRef: "execution-browser-extension";
6
- moduleVersion: "0.1.3";
6
+ moduleVersion: "0.1.4";
7
7
  ok: boolean;
8
8
  status: string;
9
9
  };
@@ -13,7 +13,7 @@ export declare const behaviorAdapter: {
13
13
  result: {
14
14
  contract: "deployment.result.v1";
15
15
  moduleRef: "execution-browser-extension";
16
- moduleVersion: "0.1.3";
16
+ moduleVersion: "0.1.4";
17
17
  ok: boolean;
18
18
  status: string;
19
19
  };
@@ -23,12 +23,13 @@ export declare const behaviorAdapter: {
23
23
  result: {
24
24
  contract: "deployment.result.v1";
25
25
  moduleRef: "execution-browser-extension";
26
- moduleVersion: "0.1.3";
26
+ moduleVersion: "0.1.4";
27
27
  ok: boolean;
28
28
  status: string;
29
- actionRequired: {
30
- action: string;
31
- description: string;
29
+ data: {
30
+ configStatus: "INCOMPLETE" | "INVALID" | "READY";
31
+ missingConfig?: string[] | undefined;
32
+ runtimeStatus: "FAILED" | "RUNNING" | "STOPPED" | "UNKNOWN";
32
33
  };
33
34
  };
34
35
  observedEffects: never[];
@@ -37,7 +38,7 @@ export declare const behaviorAdapter: {
37
38
  result: {
38
39
  contract: "deployment.result.v1";
39
40
  moduleRef: "execution-browser-extension";
40
- moduleVersion: "0.1.3";
41
+ moduleVersion: "0.1.4";
41
42
  ok: boolean;
42
43
  status: string;
43
44
  checks: {
@@ -52,7 +53,7 @@ export declare const behaviorAdapter: {
52
53
  result: {
53
54
  contract: "deployment.result.v1";
54
55
  moduleRef: "execution-browser-extension";
55
- moduleVersion: "0.1.3";
56
+ moduleVersion: "0.1.4";
56
57
  ok: boolean;
57
58
  status: string;
58
59
  };
@@ -1,6 +1,7 @@
1
1
  import { cp, mkdir, readFile, writeFile } from "node:fs/promises";
2
2
  import { basename, dirname, join } from "node:path";
3
3
  import { fileURLToPath } from "node:url";
4
+ import { observeDeclaredModuleStatus } from "@tomflow/proflow-module-contract";
4
5
  import { descriptor } from "./descriptor.js";
5
6
  const base = {
6
7
  contract: "deployment.result.v1",
@@ -19,12 +20,9 @@ export const behaviorAdapter = {
19
20
  status: () => ({
20
21
  result: {
21
22
  ...base,
22
- ok: false,
23
- status: "ACTION_REQUIRED",
24
- actionRequired: {
25
- action: "verify-real-carrier",
26
- description: "Load in real Chrome and collect ChatGPT E3/E4 evidence",
27
- },
23
+ ok: true,
24
+ status: "SUCCEEDED",
25
+ data: observeDeclaredModuleStatus(descriptor, undefined, "UNKNOWN"),
28
26
  },
29
27
  observedEffects: [],
30
28
  }),
@@ -170,25 +168,21 @@ export function createProductionBinding(input) {
170
168
  },
171
169
  observedEffects: [],
172
170
  }),
173
- status: async () => ({
174
- result: (await configured())
175
- ? {
171
+ status: async () => {
172
+ const isConfigured = await configured();
173
+ const evidence = await readBrowserVerificationEvidence(verificationEvidenceFile, loadDir);
174
+ return {
175
+ result: {
176
176
  ...boundBase,
177
177
  ok: true,
178
178
  status: "SUCCEEDED",
179
- data: { loadDir, configMaterialized: true },
180
- }
181
- : {
182
- ...boundBase,
183
- ok: false,
184
- status: "ACTION_REQUIRED",
185
- actionRequired: {
186
- action: "configure-browser-extension",
187
- description: "Browser Extension runtime config is not materialized",
188
- },
179
+ data: observeDeclaredModuleStatus(descriptor, input.config, evidence ? "RUNNING" : "STOPPED", isConfigured),
189
180
  },
190
- observedEffects: [],
191
- }),
181
+ observedEffects: evidence
182
+ ? ["Observes real Chrome MV3 load evidence"]
183
+ : [],
184
+ };
185
+ },
192
186
  verify: async () => {
193
187
  const evidence = await readBrowserVerificationEvidence(verificationEvidenceFile, loadDir);
194
188
  return {
@@ -3,11 +3,10 @@ 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.3";
6
+ readonly moduleVersion: "0.1.4";
7
7
  readonly kind: "browser-extension";
8
8
  readonly templateVersion: "1.0.0";
9
9
  readonly platformCompatibility: ">=1.0.0 <2.0.0";
10
- readonly installClass: "core";
11
10
  readonly identity: {
12
11
  readonly domain: "execution";
13
12
  readonly summary: "Execution-owned MV3 Browser executor, evidence provider and browser application surface.";
@@ -104,5 +103,9 @@ export declare const descriptor: {
104
103
  readonly id: "overview";
105
104
  readonly path: "./README.md";
106
105
  readonly description: "Package-owned module overview";
106
+ }, {
107
+ readonly id: "configuration";
108
+ readonly path: "./CONFIGURATION.md";
109
+ readonly description: "Module configuration fields, sources and materialization instructions";
107
110
  }];
108
111
  };
@@ -3,23 +3,40 @@ 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.3",
6
+ moduleVersion: "0.1.4",
7
7
  kind: "browser-extension",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
10
- installClass: "core",
11
10
  identity: {
12
11
  domain: "execution",
13
12
  summary: "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
14
13
  },
15
- provides: [{ contractRef: "execution-browser-executor", version: "1.0.0" }],
14
+ provides: [
15
+ {
16
+ contractRef: "execution-browser-executor",
17
+ version: "1.0.0",
18
+ },
19
+ ],
16
20
  requires: [
17
- { contractRef: "execution", versionRange: ">=1.0.0 <2.0.0" },
18
- { contractRef: "task-orchestration", versionRange: ">=1.0.0 <2.0.0" },
19
- { contractRef: "agent-runtime", versionRange: ">=1.0.0 <2.0.0" },
21
+ {
22
+ contractRef: "execution",
23
+ versionRange: ">=1.0.0 <2.0.0",
24
+ },
25
+ {
26
+ contractRef: "task-orchestration",
27
+ versionRange: ">=1.0.0 <2.0.0",
28
+ },
29
+ {
30
+ contractRef: "agent-runtime",
31
+ versionRange: ">=1.0.0 <2.0.0",
32
+ },
20
33
  ],
21
34
  requirements: [
22
- { kind: "runtime", runtime: "browser", versionRange: ">=1" },
35
+ {
36
+ kind: "runtime",
37
+ runtime: "browser",
38
+ versionRange: ">=1",
39
+ },
23
40
  {
24
41
  kind: "human",
25
42
  action: "Load and verify the unpacked MV3 extension in the real Chrome profile",
@@ -111,5 +128,10 @@ export const descriptor = {
111
128
  path: "./README.md",
112
129
  description: "Package-owned module overview",
113
130
  },
131
+ {
132
+ id: "configuration",
133
+ path: "./CONFIGURATION.md",
134
+ description: "Module configuration fields, sources and materialization instructions",
135
+ },
114
136
  ],
115
137
  };
@@ -0,0 +1,4 @@
1
+ #!/usr/bin/env node
2
+ export declare function materializeBrowserExtensionConfig(workspaceRoot: string): Promise<{
3
+ loadDir: string;
4
+ }>;
@@ -0,0 +1,42 @@
1
+ #!/usr/bin/env node
2
+ import { readFile } from "node:fs/promises";
3
+ import { resolve } from "node:path";
4
+ import { materializeProductionConfig } from "../deployment/adapter.js";
5
+ function workspaceFromArgs(args) {
6
+ if (args[0] !== "materialize-config") {
7
+ throw new Error("Usage: proflow-execution-browser-extension materialize-config [--workspace /absolute/path]");
8
+ }
9
+ const workspaceIndex = args.indexOf("--workspace");
10
+ if (workspaceIndex < 0)
11
+ return process.cwd();
12
+ const value = args[workspaceIndex + 1];
13
+ if (!value || args.length !== 3) {
14
+ throw new Error("Usage: proflow-execution-browser-extension materialize-config [--workspace /absolute/path]");
15
+ }
16
+ return resolve(value);
17
+ }
18
+ export async function materializeBrowserExtensionConfig(workspaceRoot) {
19
+ const configPath = resolve(workspaceRoot, ".proflow", "config", "execution-browser-extension.json");
20
+ const parsed = JSON.parse(await readFile(configPath, "utf8"));
21
+ if (typeof parsed !== "object" || parsed === null || Array.isArray(parsed)) {
22
+ throw new Error("execution-browser-extension config must be a JSON object");
23
+ }
24
+ const config = Object.fromEntries(Object.entries(parsed).map(([key, value]) => {
25
+ if (typeof value !== "string") {
26
+ throw new Error(`browser extension config ${key} must be a string`);
27
+ }
28
+ return [key, value];
29
+ }));
30
+ return materializeProductionConfig({
31
+ moduleRef: "execution-browser-extension",
32
+ config,
33
+ workspaceRoot,
34
+ });
35
+ }
36
+ async function main() {
37
+ const workspaceRoot = workspaceFromArgs(process.argv.slice(2));
38
+ const result = await materializeBrowserExtensionConfig(workspaceRoot);
39
+ process.stdout.write(`${JSON.stringify({ status: "MATERIALIZED", ...result })}\n`);
40
+ }
41
+ if (import.meta.main)
42
+ await main();
package/manifest.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "ProFlow Execution Browser",
4
- "version": "0.1.3",
4
+ "version": "0.1.4",
5
5
  "permissions": ["tabs", "storage", "sidePanel"],
6
6
  "host_permissions": ["https://chatgpt.com/*", "http://127.0.0.1/*"],
7
7
  "background": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-browser-extension",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -11,7 +11,8 @@
11
11
  "./bridge": "./dist/src/bridge.js",
12
12
  "./deployment/adapter": "./dist/deployment/adapter.js",
13
13
  "./deployment/descriptor": "./dist/deployment/descriptor.js",
14
- "./runtime-composition": "./dist/src/runtime-composition.js"
14
+ "./runtime-composition": "./dist/src/runtime-composition.js",
15
+ "./configure": "./dist/src/configure.js"
15
16
  },
16
17
  "files": [
17
18
  "dist",
@@ -21,15 +22,15 @@
21
22
  "proflow.module.json",
22
23
  "conformance.json",
23
24
  "README.md",
24
- "self-install.mjs"
25
+ "CONFIGURATION.md"
25
26
  ],
26
27
  "dependencies": {
27
- "@tomflow/proflow-execution-contracts": "^0.1.2"
28
+ "@tomflow/proflow-module-contract": "^0.1.2",
29
+ "@tomflow/proflow-execution-contracts": "^0.1.3"
28
30
  },
29
31
  "devDependencies": {
30
- "@tomflow/proflow-module-contract": "^0.1.1",
31
- "@tomflow/proflow-deployment-conformance": "^0.1.2",
32
- "@tomflow/proflow-execution-runtime": "^0.1.2"
32
+ "@tomflow/proflow-deployment-conformance": "^0.1.3",
33
+ "@tomflow/proflow-execution-runtime": "^0.1.5"
33
34
  },
34
35
  "keywords": [
35
36
  "proflow",
@@ -38,20 +39,11 @@
38
39
  ],
39
40
  "proflow": {
40
41
  "module": true,
41
- "installClass": "core",
42
- "installRequires": [
43
- "@tomflow/proflow-agent-runtime",
44
- "@tomflow/proflow-chatgpt-carrier",
45
- "@tomflow/proflow-chrome-runtime",
46
- "@tomflow/proflow-execution-contracts",
47
- "@tomflow/proflow-execution-runtime",
48
- "@tomflow/proflow-task-orchestration"
49
- ],
50
42
  "descriptor": "./dist/deployment/descriptor.js",
51
43
  "manifest": "./proflow.module.json"
52
44
  },
53
45
  "bin": {
54
- "proflow-execution-browser-extension": "./self-install.mjs"
46
+ "proflow-execution-browser-extension": "./dist/src/configure.js"
55
47
  },
56
48
  "scripts": {
57
49
  "test": "node --test tests/**/*.test.ts",
@@ -3,11 +3,10 @@
3
3
  "contractVersion": "1.0.0",
4
4
  "moduleRef": "execution-browser-extension",
5
5
  "packageName": "@tomflow/proflow-execution-browser-extension",
6
- "moduleVersion": "0.1.3",
6
+ "moduleVersion": "0.1.4",
7
7
  "kind": "browser-extension",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",
10
- "installClass": "core",
11
10
  "identity": {
12
11
  "domain": "execution",
13
12
  "summary": "Execution-owned MV3 Browser executor, evidence provider and browser application surface."
@@ -128,6 +127,11 @@
128
127
  "id": "overview",
129
128
  "path": "./README.md",
130
129
  "description": "Package-owned module overview"
130
+ },
131
+ {
132
+ "id": "configuration",
133
+ "path": "./CONFIGURATION.md",
134
+ "description": "Module configuration fields, sources and materialization instructions"
131
135
  }
132
136
  ]
133
137
  }
package/CHANGELOG.md DELETED
@@ -1,19 +0,0 @@
1
- # @tomflow/proflow-execution-browser-extension
2
-
3
- ## 0.1.3
4
-
5
- ### Patch Changes
6
-
7
- - Real-1 final remediation and black-box release closure
8
-
9
- ## 0.1.2
10
-
11
- ### Patch Changes
12
-
13
- - Close the Real-1 global Platform control-plane contract across every published ProFlow package. Platform CLI now owns one durable global Workspace binding with canonical identity, cross-process operation locking, cwd/`--workspace` install targeting, cross-directory instance commands, whole-instance uninstall/rebind, and deterministic npm/yarn/pnpm Workspace package-manager selection. Every package-owned install entry, including newly generated Module Template packages, delegates to the Shell-global `platform` command and fails closed when that global CLI is unavailable; Deployment Conformance and the formal test plans mechanically enforce the same rule across all 24 packages.
14
-
15
- ## 0.1.1
16
-
17
- ### Patch Changes
18
-
19
- - Close Real-1 deployment graph and Fresh Workspace bootstrap gaps: remove Contract-library runtime-provider aliases, correct Execution/Model dependency direction, materialize logical/moduleRef providers through `installRequires`, enforce repository graph validation, and keep self-install executables stable without package-manager worktree mutation.
package/self-install.mjs DELETED
@@ -1,35 +0,0 @@
1
- #!/usr/bin/env node
2
- import { spawnSync } from "node:child_process";
3
-
4
- const [command, ...rest] = process.argv.slice(2);
5
- const usage =
6
- "Usage: npx @tomflow/proflow-execution-browser-extension install\n";
7
- if (command === "--help" || command === "-h") {
8
- process.stdout.write(usage);
9
- process.exit(0);
10
- }
11
- if (command !== "install" || rest.length > 0) {
12
- process.stderr.write(usage);
13
- process.exit(2);
14
- }
15
- const executable = process.platform === "win32" ? "platform.cmd" : "platform";
16
- const result = spawnSync(
17
- executable,
18
- [
19
- "install",
20
- "@tomflow/proflow-execution-browser-extension",
21
- "--workspace",
22
- process.cwd(),
23
- ],
24
- { cwd: process.cwd(), env: process.env, stdio: "inherit" },
25
- );
26
- if (result.error) {
27
- if (result.error.code === "ENOENT") {
28
- process.stderr.write(
29
- "GLOBAL_PLATFORM_CLI_REQUIRED: install @tomflow/proflow-platform-cli globally before package-owned install\n",
30
- );
31
- process.exit(127);
32
- }
33
- throw result.error;
34
- }
35
- process.exit(result.status ?? 1);