@tomflow/proflow-execution-browser-extension 0.1.15 → 0.1.17

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-execution-browser-extension
2
2
 
3
+ ## 0.1.17
4
+
5
+ ### Patch Changes
6
+
7
+ - Repack the Deployment Closeout release from freshly rebuilt artifacts and enforce build + publishability before every canonical publish.
8
+
9
+ ## 0.1.16
10
+
11
+ ### Patch Changes
12
+
13
+ - 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.
14
+
3
15
  ## 0.1.15
4
16
 
5
17
  ### Patch Changes
package/DOCS.md CHANGED
@@ -32,7 +32,7 @@ Execution 领域拥有的 Chrome MV3 Extension,负责 Task UI、审批提醒
32
32
 
33
33
  ## 使用方式
34
34
 
35
- 运行 `platform setup --workspace <workspace> --module execution-browser-extension`。ProFlow 会先准备 unpacked 目录、运行配置和本地 Bridge,并用真实 hello + heartbeat 尝试重验证已有扩展;已有扩展仍在线时不会再次打扰用户。只有未检测到在线扩展时,ProFlow 才把正确目录复制到剪贴板并打开 `chrome://extensions/`,提示用户完成安装操作:如果开发者模式尚未开启则先开启,然后点击“加载未打包的扩展程序”,在目录选择窗口中粘贴并确认目录。完成后无需回终端输入任何标识或状态;扩展身份、session、hello/heartbeat、Browser Executor 配置和 setup evidence 都由机器自动发现、生成并验证。历史 pairing evidence 不能单独代替本次 live revalidation。
35
+ 运行 `platform setup --workspace <workspace>`。ProFlow 会先准备 unpacked 目录、运行配置和本地 Bridge,并用真实 hello + heartbeat 尝试重验证已有扩展;已有扩展仍在线时不会再次打扰用户。只有未检测到在线扩展时,ProFlow 才按步骤打开 `chrome://extensions/`、确认开发者模式、复制正确目录并指导加载。完成后无需输入任何标识或状态;扩展身份、session、hello/heartbeat、Browser Executor 配置和 setup evidence 都由模块自行发现、生成并验证。历史 pairing evidence 不能单独代替本次 live revalidation。
36
36
 
37
37
  若 pairing 等待超时,ProFlow 保留已经准备好的扩展文件和机器配置,不写伪 READY evidence,并输出稳定错误代码 `PAIRING_TIMEOUT`。用户确认 Chrome 已完成加载后重新执行 `platform setup` 即可。Agent setup 随后通过 `custom-gpt-web-provisioning` 使用同一 Extension package 的部署期分支。
38
38
 
package/SETUP.md CHANGED
@@ -2,8 +2,8 @@
2
2
 
3
3
  ## STEP-EXECUTION-BROWSER-EXTENSION-01 — 加载扩展并自动配对
4
4
  Responsible: USER
5
- Interactive executable: `platform setup --module execution-browser-extension`
6
- Non-interactive executable: `platform setup --module execution-browser-extension`
5
+ Interactive executable: `platform setup`
6
+ Non-interactive executable: `platform setup`
7
7
  Required inputs: none
8
8
  Verify: `platform status`
9
9
  Success condition: 本地 pairing listener 已收到真实 Extension hello + heartbeat,并持久化部署证据。
@@ -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.15";
27
+ moduleVersion: "0.1.17";
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.15";
40
+ readonly moduleVersion: "0.1.17";
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.15";
50
+ moduleVersion: "0.1.17";
51
51
  data: {
52
52
  setupStatus: "ACTION_REQUIRED" | "READY";
53
53
  runtimeStatus: "NOT_APPLICABLE";
@@ -60,22 +60,52 @@ export declare const behaviorAdapter: {
60
60
  }[];
61
61
  };
62
62
  };
63
- observedEffects: string[];
63
+ observedEffects: never[];
64
64
  }>;
65
65
  readonly setup: (context: ModuleCommandContext) => Promise<{
66
+ result: {
67
+ contract: "deployment.result.v1";
68
+ moduleRef: "execution-browser-extension";
69
+ moduleVersion: "0.1.17";
70
+ ok: false;
71
+ status: "ACTION_REQUIRED";
72
+ data: {
73
+ steps: {
74
+ id: string;
75
+ title: string;
76
+ description: string;
77
+ state: "TODO";
78
+ responsible: "USER";
79
+ execution: {
80
+ interactive: string;
81
+ nonInteractive: string;
82
+ };
83
+ requiredInputs: never[];
84
+ verify: string;
85
+ successCondition: string;
86
+ humanAction: string;
87
+ }[];
88
+ };
89
+ actionRequired: {
90
+ action: string;
91
+ description: string;
92
+ };
93
+ };
94
+ observedEffects: never[];
95
+ } | {
66
96
  result: {
67
97
  readonly contract: "deployment.result.v1";
68
98
  readonly ok: true;
69
99
  readonly status: "SUCCEEDED";
70
100
  readonly moduleRef: "execution-browser-extension";
71
- readonly moduleVersion: "0.1.15";
101
+ readonly moduleVersion: "0.1.17";
72
102
  };
73
103
  observedEffects: string[];
74
104
  } | {
75
105
  result: {
76
106
  contract: "deployment.result.v1";
77
107
  moduleRef: "execution-browser-extension";
78
- moduleVersion: "0.1.15";
108
+ moduleVersion: "0.1.17";
79
109
  ok: false;
80
110
  status: "FAILED";
81
111
  error: {
@@ -90,8 +120,8 @@ export declare const behaviorAdapter: {
90
120
  readonly state: "BLOCKED";
91
121
  readonly responsible: "EXTERNAL";
92
122
  readonly execution: {
93
- readonly interactive: "platform setup --module execution-browser-extension";
94
- readonly nonInteractive: "platform setup --module execution-browser-extension";
123
+ readonly interactive: "platform setup";
124
+ readonly nonInteractive: "platform setup";
95
125
  };
96
126
  readonly requiredInputs: readonly [];
97
127
  readonly verify: "platform status";
@@ -108,7 +138,7 @@ export declare const behaviorAdapter: {
108
138
  ok: true;
109
139
  status: "SUCCEEDED";
110
140
  moduleRef: "execution-browser-extension";
111
- moduleVersion: "0.1.15";
141
+ moduleVersion: "0.1.17";
112
142
  data: {
113
143
  docs: string;
114
144
  };
@@ -121,11 +151,11 @@ export declare const behaviorAdapter: {
121
151
  readonly ok: true;
122
152
  readonly status: "SUCCEEDED";
123
153
  readonly moduleRef: "execution-browser-extension";
124
- readonly moduleVersion: "0.1.15";
154
+ readonly moduleVersion: "0.1.17";
125
155
  } | {
126
156
  contract: "deployment.result.v1";
127
157
  moduleRef: "execution-browser-extension";
128
- moduleVersion: "0.1.15";
158
+ moduleVersion: "0.1.17";
129
159
  ok: false;
130
160
  status: "FAILED";
131
161
  error: {
@@ -142,7 +172,7 @@ export declare const behaviorAdapter: {
142
172
  readonly ok: true;
143
173
  readonly status: "SUCCEEDED";
144
174
  readonly moduleRef: "execution-browser-extension";
145
- readonly moduleVersion: "0.1.15";
175
+ readonly moduleVersion: "0.1.17";
146
176
  };
147
177
  observedEffects: never[];
148
178
  }>;
@@ -3,7 +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 { runInteractiveBrowserExtensionSetup } from "../src/install-workflow.js";
6
+ import { openBrowserExtensionManager, runInteractiveBrowserExtensionSetup, } from "../src/install-workflow.js";
7
7
  import { createBrowserExtensionPairingServer } from "../src/pairing.js";
8
8
  import { descriptor } from "./descriptor.js";
9
9
  const base = {
@@ -21,8 +21,8 @@ const blockedSetupPlan = {
21
21
  state: "BLOCKED",
22
22
  responsible: "EXTERNAL",
23
23
  execution: {
24
- interactive: "platform setup --module execution-browser-extension",
25
- nonInteractive: "platform setup --module execution-browser-extension",
24
+ interactive: "platform setup",
25
+ nonInteractive: "platform setup",
26
26
  },
27
27
  requiredInputs: [],
28
28
  verify: "platform status",
@@ -312,15 +312,13 @@ export const behaviorAdapter = {
312
312
  code: "EXTENSION_LOAD_REQUIRED",
313
313
  message: "Chrome 扩展尚未加载或缺少可验证的运行证据",
314
314
  relatedModuleRefs: ["chrome-runtime"],
315
- nextCommand: "platform setup --module execution-browser-extension",
315
+ nextCommand: "platform setup",
316
316
  },
317
317
  ],
318
318
  }),
319
319
  },
320
320
  },
321
- observedEffects: evidence
322
- ? ["Observes real Chrome MV3 load evidence"]
323
- : [],
321
+ observedEffects: [],
324
322
  };
325
323
  },
326
324
  setup: async (context) => {
@@ -328,6 +326,40 @@ export const behaviorAdapter = {
328
326
  const input = typeof context.input === "object" && context.input !== null
329
327
  ? context.input
330
328
  : undefined;
329
+ if (input?.developerModeConfirmed !== true) {
330
+ await openBrowserExtensionManager(input?.desktop);
331
+ return {
332
+ result: {
333
+ ...base,
334
+ ok: false,
335
+ status: "ACTION_REQUIRED",
336
+ data: {
337
+ steps: [
338
+ {
339
+ id: "STEP-EXECUTION-BROWSER-EXTENSION-01",
340
+ title: "开启 Chrome 开发者模式",
341
+ description: "请在刚打开的扩展管理页开启右上角“开发者模式”。",
342
+ state: "TODO",
343
+ responsible: "USER",
344
+ execution: {
345
+ interactive: "platform setup",
346
+ nonInteractive: "platform setup",
347
+ },
348
+ requiredInputs: [],
349
+ verify: "platform status",
350
+ successCondition: "用户确认开发者模式已开启",
351
+ humanAction: "开启开发者模式后返回终端确认",
352
+ },
353
+ ],
354
+ },
355
+ actionRequired: {
356
+ action: "confirm-browser-developer-mode",
357
+ description: "请开启 Chrome 开发者模式后确认。",
358
+ },
359
+ },
360
+ observedEffects: [],
361
+ };
362
+ }
331
363
  await runInteractiveBrowserExtensionSetup({
332
364
  workspaceRoot: context.workspaceRoot,
333
365
  ...(input?.timeoutMs === undefined
@@ -338,11 +370,7 @@ export const behaviorAdapter = {
338
370
  });
339
371
  return {
340
372
  result: base,
341
- observedEffects: [
342
- "Materializes browser runtime configuration",
343
- "Opens Chrome extension management",
344
- "Persists heartbeat-proven Chrome MV3 pairing evidence",
345
- ],
373
+ observedEffects: ["Materialize the unpacked MV3 extension package"],
346
374
  };
347
375
  }
348
376
  catch (error) {
@@ -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.15";
6
+ readonly moduleVersion: "0.1.17";
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.15",
6
+ moduleVersion: "0.1.17",
7
7
  kind: "browser-extension",
8
8
  templateVersion: "1.0.0",
9
9
  platformCompatibility: ">=1.0.0 <2.0.0",
@@ -18,6 +18,7 @@ export type BrowserExtensionPair = (context: {
18
18
  export declare function browserExtensionInstallInstruction(loadDir: string): string;
19
19
  export declare function browserExtensionSetupSuccessMessage(): string;
20
20
  export declare function browserExtensionSetupFailureMessage(error: unknown): string;
21
+ export declare function openBrowserExtensionManager(desktop?: BrowserExtensionDesktop): Promise<void>;
21
22
  export declare function runInteractiveBrowserExtensionSetup(input: {
22
23
  workspaceRoot: string;
23
24
  timeoutMs?: number;
@@ -1,6 +1,6 @@
1
1
  import { spawn, spawnSync } from "node:child_process";
2
2
  export function browserExtensionInstallInstruction(loadDir) {
3
- return `\nChrome 浏览器扩展\n\n第一步|开启开发者模式\n请在已经打开的 Chrome 扩展管理页开启右上角“开发者模式”。\n\n第二步|加载扩展目录\n扩展目录路径已复制到剪贴板:\n${loadDir}\n\n1. 点击“加载未打包的扩展程序”\n2. 在目录选择窗口按 Cmd+Shift+G\n3. 按 Cmd+V 粘贴路径,然后按 Enter\n4. 点击 Select(选择)\n\n完成后无需返回输入任何内容。ProFlow 会自动检测 pairing 与 heartbeat 并继续。\n`;
3
+ return `\n步骤 2/2|加载浏览器扩展\n\n扩展目录已复制到剪贴板:\n${loadDir}\n\n1. 点击“加载未打包的扩展程序”\n2. 在目录选择窗口按 Cmd+Shift+G\n3. 按 Cmd+V 粘贴路径,然后按 Enter\n4. 点击 Select(选择)\n\n完成后无需返回终端输入内容。ProFlow 正在自动等待扩展连接。\n`;
4
4
  }
5
5
  export function browserExtensionSetupSuccessMessage() {
6
6
  return "\n✓ Chrome 浏览器扩展已连接\n✓ 配置与真实 heartbeat 验证通过\n\n浏览器扩展:READY\n";
@@ -49,6 +49,9 @@ function systemDesktop() {
49
49
  },
50
50
  };
51
51
  }
52
+ export async function openBrowserExtensionManager(desktop = systemDesktop()) {
53
+ await desktop.openExtensionsPage();
54
+ }
52
55
  export async function runInteractiveBrowserExtensionSetup(input) {
53
56
  const desktop = input.desktop ?? systemDesktop();
54
57
  const pair = input.pair ??
package/manifest.json CHANGED
@@ -1,17 +1,28 @@
1
1
  {
2
2
  "manifest_version": 3,
3
3
  "name": "ProFlow Execution Browser",
4
- "version": "0.1.15",
5
- "permissions": ["tabs", "storage", "sidePanel"],
6
- "host_permissions": ["https://chatgpt.com/*", "http://127.0.0.1/*"],
4
+ "version": "0.1.17",
5
+ "permissions": [
6
+ "tabs",
7
+ "storage",
8
+ "sidePanel"
9
+ ],
10
+ "host_permissions": [
11
+ "https://chatgpt.com/*",
12
+ "http://127.0.0.1/*"
13
+ ],
7
14
  "background": {
8
15
  "service_worker": "dist/extension/background.js",
9
16
  "type": "module"
10
17
  },
11
18
  "content_scripts": [
12
19
  {
13
- "matches": ["https://chatgpt.com/g/*"],
14
- "js": ["dist/extension/content.js"],
20
+ "matches": [
21
+ "https://chatgpt.com/g/*"
22
+ ],
23
+ "js": [
24
+ "dist/extension/content.js"
25
+ ],
15
26
  "run_at": "document_idle"
16
27
  },
17
28
  {
@@ -19,7 +30,9 @@
19
30
  "https://chatgpt.com/gpts/editor",
20
31
  "https://chatgpt.com/gpts/editor/*"
21
32
  ],
22
- "js": ["dist/extension/provisioning-content.js"],
33
+ "js": [
34
+ "dist/extension/provisioning-content.js"
35
+ ],
23
36
  "run_at": "document_idle"
24
37
  }
25
38
  ],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tomflow/proflow-execution-browser-extension",
3
- "version": "0.1.15",
3
+ "version": "0.1.17",
4
4
  "description": "Execution-owned MV3 Browser executor, evidence provider and browser application surface.",
5
5
  "type": "module",
6
6
  "publishConfig": {
@@ -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.15",
6
+ "moduleVersion": "0.1.17",
7
7
  "kind": "browser-extension",
8
8
  "templateVersion": "1.0.0",
9
9
  "platformCompatibility": ">=1.0.0 <2.0.0",