@tomflow/proflow-execution-browser-extension 0.1.11 → 0.1.13

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.13
4
+
5
+ ### Patch Changes
6
+
7
+ - Ship the Phase 3 browser, tunnel, model automation, platform readiness, and documentation closure as one verifiable platform snapshot.
8
+
9
+ ## 0.1.12
10
+
11
+ ### Patch Changes
12
+
13
+ - 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.
14
+
3
15
  ## 0.1.11
4
16
 
5
17
  ### Patch Changes
package/DOCS.md CHANGED
@@ -6,13 +6,19 @@ Execution 领域拥有的 Chrome MV3 Extension,负责 Task UI、审批提醒
6
6
 
7
7
  ## 主要能力
8
8
 
9
- - 提供 New Task 与 Side Panel UI、Task Observer 和 System Observer
10
- - 创建、恢复和唤醒 Custom GPT Conversation,稳定观察 workerRef/c-id。
9
+ - 运行期提供 New Task 与 Side Panel UI、Task Observer、System Observer Browser Effect
10
+ - 运行期创建、恢复和唤醒 Custom GPT Conversation,稳定观察 workerRef/c-id。
11
+ - 部署期通过独立 `/gpts/editor` / `/gpts/editor/*` Provisioning Surface 物化 Custom GPT;该分支不进入 Task/Worker 状态机。
12
+ - 正常创建路径在单一 GPT Editor 会话中完成字段、Action Schema、API Key/Bearer、Knowledge ZIP、模型与 Capabilities 配置,再创建 Private GPT;不在 Create 后重新打开同一 GPT 做 Auth。
13
+ - Knowledge Bundle 在 Mac 侧先做 ZIP traversal/大小/内部类型校验,最终向 GPT Knowledge 上传 `custom-gpt-knowledge.zip` 本体;不把解包后的 `.md` 逐文件作为正常上传物。
14
+ - `FINALIZE_CUSTOM_GPT_AUTH` 只保留为显式 recovery/repair primitive,不属于正常 `createCustomGptRole` Golden Path。
11
15
  - 执行 DOM-first 浏览器操作,必要时使用截图与 Vision 辅助观察。
12
16
 
13
17
  ## 提供的 API 与 Public Contract
14
18
 
15
- - 提供 `execution-browser-executor` Contract,版本 `1.0.0`。
19
+ - 提供 `execution-browser-executor` Contract,版本 `1.0.0`,仅用于运行期 Browser Execution。
20
+ - 提供 `custom-gpt-web-provisioning` Contract,版本 `1.0.0`,仅用于部署期 Custom GPT Web Provisioning。
21
+ - 两条能力只共享 Extension/loopback transport 等底层设施,不共享业务状态机。
16
22
  - 通过本地 Bridge 接收 typed Browser operation 并返回 Evidence。
17
23
 
18
24
  ## 依赖的 Module、Contract 和外部资源
@@ -26,7 +32,9 @@ Execution 领域拥有的 Chrome MV3 Extension,负责 Task UI、审批提醒
26
32
 
27
33
  ## 使用方式
28
34
 
29
- 运行 `pnpm exec -- proflow-execution-browser-extension setup`,加载准备好的目录、登记 Extension IDReload 并验证 Bridge
35
+ 运行 `pnpm exec -- proflow-execution-browser-extension setup --workspace <workspace>`。ProFlow 会先准备 unpacked 目录、运行配置和本地 Bridge,并用真实 hello + heartbeat 尝试重验证已有扩展;已有扩展仍在线时不会再次打扰用户。只有未检测到在线扩展时,ProFlow 才把正确目录复制到剪贴板并打开 `chrome://extensions/`,提示用户完成安装操作:如果开发者模式尚未开启则先开启,然后点击“加载未打包的扩展程序”,在目录选择窗口中粘贴并确认目录。完成后无需回终端输入任何标识或状态;扩展身份、sessionhello/heartbeat、Browser Executor 配置和 setup evidence 都由机器自动发现、生成并验证。历史 pairing evidence 不能单独代替本次 live revalidation
36
+
37
+ 若 pairing 等待超时,ProFlow 保留已经准备好的扩展文件和机器配置,不写伪 READY evidence,并输出稳定错误代码 `PAIRING_TIMEOUT`。用户确认 Chrome 已完成加载后重新执行 `platform setup` 即可。Agent setup 随后通过 `custom-gpt-web-provisioning` 使用同一 Extension package 的部署期分支。
30
38
 
31
39
  ## 职责边界与限制
32
40
 
package/SETUP.md CHANGED
@@ -1,24 +1,20 @@
1
1
  # execution-browser-extension Setup
2
2
 
3
- ## STEP-EXECUTION-BROWSER-EXTENSION-01 — 准备扩展并打开 Chrome
3
+ ## STEP-EXECUTION-BROWSER-EXTENSION-01 — 加载扩展并自动配对
4
4
  Responsible: USER
5
- Interactive executable: `pnpm exec -- proflow-execution-browser-extension setup 01`
6
- Non-interactive executable: `pnpm exec -- proflow-execution-browser-extension setup 01`
5
+ Interactive executable: `pnpm exec -- proflow-execution-browser-extension setup`
6
+ Non-interactive executable: `pnpm exec -- proflow-execution-browser-extension setup`
7
7
  Required inputs: none
8
- Verify: `pnpm exec -- proflow-execution-browser-extension setup 01`
9
- Success condition: 扩展目录已生成并可选择。
10
-
11
- ## STEP-EXECUTION-BROWSER-EXTENSION-02 — 登记 Extension ID 并生成配置
12
- Responsible: USER
13
- Interactive executable: `pnpm exec -- proflow-execution-browser-extension setup 02`
14
- Non-interactive executable: `pnpm exec -- proflow-execution-browser-extension setup 02 --extension-id <id>`
15
- Required inputs: Chrome Extension ID
16
8
  Verify: `pnpm exec -- proflow-execution-browser-extension verify`
17
- Success condition: Extension ID 和运行配置已保存。
9
+ Success condition: 本地 pairing listener 已收到真实 Extension hello + heartbeat,并持久化部署证据。
10
+
11
+ 运行命令后,ProFlow 会先准备 unpacked 目录和所有机器配置,并尝试用真实 hello + heartbeat 重验证已有扩展。若已有扩展仍在线,则无需任何人工操作,setup 直接继续;只有未检测到在线扩展时,ProFlow 才把正确目录复制到剪贴板、打开 `chrome://extensions/` 并提示用户完成安装操作:如果开发者模式尚未开启则先开启,然后点击“加载未打包的扩展程序”,在目录选择窗口中粘贴并确认刚刚复制的目录。完成后无需回终端输入任何内容;扩展身份确认、Bridge 配置、hello/heartbeat 验证和 READY 状态均由 ProFlow 自动完成。历史 `setup.json` / verification evidence 不能单独跳过本次 live revalidation。
12
+
13
+ 若等待超时,已经准备好的扩展文件和机器配置会保留,且不会写入伪 READY evidence。用户只需确认 Chrome 中已经完成扩展加载,然后重新执行 `platform setup`;稳定错误代码为 `PAIRING_TIMEOUT`。
18
14
 
19
- ## STEP-EXECUTION-BROWSER-EXTENSION-03验证 Service Worker 与 Bridge
15
+ ## STEP-EXECUTION-BROWSER-EXTENSION-02验证部署状态
20
16
  Responsible: AI
21
- Interactive executable: `pnpm exec -- proflow-execution-browser-extension setup 03`
17
+ Interactive executable: `pnpm exec -- proflow-execution-browser-extension verify`
22
18
  Non-interactive executable: `pnpm exec -- proflow-execution-browser-extension verify`
23
19
  Required inputs: none
24
20
  Verify: `pnpm exec -- proflow-execution-browser-extension verify`
@@ -7,6 +7,16 @@ export declare function materializeProductionConfig(input: {
7
7
  }): Promise<{
8
8
  loadDir: string;
9
9
  }>;
10
+ export declare function pairBrowserExtensionSetup(context: ModuleCommandContext, options?: {
11
+ timeoutMs?: number;
12
+ onWaiting?: (input: {
13
+ loadDir: string;
14
+ endpoint: string;
15
+ }) => void | Promise<void>;
16
+ }): Promise<{
17
+ extensionId: string;
18
+ extensionInstanceId: string;
19
+ }>;
10
20
  export declare const behaviorAdapter: {
11
21
  readonly install: (context: ModuleCommandContext) => Promise<{
12
22
  result: {
@@ -14,7 +24,7 @@ export declare const behaviorAdapter: {
14
24
  ok: true;
15
25
  status: "SUCCEEDED";
16
26
  moduleRef: "execution-browser-extension";
17
- moduleVersion: "0.1.11";
27
+ moduleVersion: "0.1.13";
18
28
  data: {
19
29
  loadDir: string;
20
30
  };
@@ -27,7 +37,7 @@ export declare const behaviorAdapter: {
27
37
  readonly ok: true;
28
38
  readonly status: "SUCCEEDED";
29
39
  readonly moduleRef: "execution-browser-extension";
30
- readonly moduleVersion: "0.1.11";
40
+ readonly moduleVersion: "0.1.13";
31
41
  };
32
42
  observedEffects: never[];
33
43
  }>;
@@ -37,10 +47,17 @@ export declare const behaviorAdapter: {
37
47
  ok: true;
38
48
  status: "SUCCEEDED";
39
49
  moduleRef: "execution-browser-extension";
40
- moduleVersion: "0.1.11";
50
+ moduleVersion: "0.1.13";
41
51
  data: {
42
52
  setupStatus: "ACTION_REQUIRED" | "READY";
43
53
  runtimeStatus: "RUNNING" | "STOPPED";
54
+ issues?: {
55
+ scope: "SETUP";
56
+ code: string;
57
+ message: string;
58
+ relatedModuleRefs: string[];
59
+ nextCommand: string;
60
+ }[];
44
61
  };
45
62
  };
46
63
  observedEffects: string[];
@@ -49,7 +66,7 @@ export declare const behaviorAdapter: {
49
66
  result: {
50
67
  contract: "deployment.result.v1";
51
68
  moduleRef: "execution-browser-extension";
52
- moduleVersion: "0.1.11";
69
+ moduleVersion: "0.1.13";
53
70
  ok: false;
54
71
  status: "FAILED";
55
72
  error: {
@@ -59,70 +76,61 @@ export declare const behaviorAdapter: {
59
76
  };
60
77
  data: {
61
78
  readonly steps: readonly [{
62
- readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-04";
63
- readonly title: "修复扩展配置";
79
+ readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-RECOVER";
80
+ readonly title: "重新加载并自动配对扩展";
64
81
  readonly state: "BLOCKED";
65
82
  readonly responsible: "EXTERNAL";
66
83
  readonly execution: {
67
84
  readonly interactive: "pnpm exec -- proflow-execution-browser-extension setup";
68
- readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension setup --extension-id <id>";
85
+ readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension setup";
69
86
  };
70
87
  readonly requiredInputs: readonly [];
71
88
  readonly verify: "pnpm exec -- proflow-execution-browser-extension verify";
72
89
  readonly successCondition: "配置状态变为“已就绪”";
73
- readonly blockedReason: "Extension ID 或生成配置无效";
90
+ readonly blockedReason: "真实 Extension heartbeat 未到达或本地 pairing 失败";
74
91
  }];
75
92
  };
76
93
  };
77
94
  observedEffects: never[];
95
+ } | {
96
+ result: {
97
+ readonly contract: "deployment.result.v1";
98
+ readonly ok: true;
99
+ readonly status: "SUCCEEDED";
100
+ readonly moduleRef: "execution-browser-extension";
101
+ readonly moduleVersion: "0.1.13";
102
+ };
103
+ observedEffects: string[];
78
104
  } | {
79
105
  result: {
80
106
  contract: "deployment.result.v1";
81
107
  moduleRef: "execution-browser-extension";
82
- moduleVersion: "0.1.11";
108
+ moduleVersion: "0.1.13";
83
109
  ok: false;
84
110
  status: "ACTION_REQUIRED";
85
111
  data: {
86
112
  readonly steps: readonly [{
87
113
  readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-01";
88
- readonly title: "准备扩展并打开 Chrome";
89
- readonly description: "生成 unpacked 目录,复制路径并打开扩展管理页。";
114
+ readonly title: "加载扩展并自动配对";
115
+ readonly description: "准备 unpacked 目录和本地 Bridge,等待 Chrome Extension 的真实 hello + heartbeat。";
90
116
  readonly state: "TODO";
91
117
  readonly responsible: "USER";
92
118
  readonly execution: {
93
- readonly interactive: "pnpm exec -- proflow-execution-browser-extension setup 01";
94
- readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension setup 01";
119
+ readonly interactive: "pnpm exec -- proflow-execution-browser-extension setup";
120
+ readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension setup";
95
121
  };
96
122
  readonly requiredInputs: readonly [];
97
- readonly verify: "pnpm exec -- proflow-execution-browser-extension setup 01";
98
- readonly successCondition: "扩展目录已生成并可选择";
99
- readonly humanAction: "启用开发者模式并选择脚本复制的目录。";
100
- }, {
101
- readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-02";
102
- readonly title: "登记 Extension ID 并生成配置";
103
- readonly description: "保存扩展 ID,生成 Bridge 配置并提示 Reload。";
104
- readonly state: "TODO";
105
- readonly responsible: "USER";
106
- readonly execution: {
107
- readonly interactive: "pnpm exec -- proflow-execution-browser-extension setup 02";
108
- readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension setup 02 --extension-id <id>";
109
- };
110
- readonly requiredInputs: readonly [{
111
- readonly name: "extensionId";
112
- readonly description: "Chrome Extension ID";
113
- readonly sensitive: false;
114
- }];
115
123
  readonly verify: "pnpm exec -- proflow-execution-browser-extension verify";
116
- readonly successCondition: "Extension ID 和运行配置已保存";
117
- readonly humanAction: "复制扩展 ID,并在配置生成后点击 Reload。";
124
+ readonly successCondition: "Extension hello + heartbeat 已被本地 pairing listener 验证并持久化";
125
+ readonly humanAction: "启用开发者模式并加载脚本准备的 unpacked 目录;其余身份发现与验证自动完成。";
118
126
  }, {
119
- readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-03";
120
- readonly title: "验证 Service Worker 与 Bridge";
121
- readonly description: "重新观察扩展后台和本地 Bridge。";
127
+ readonly id: "STEP-EXECUTION-BROWSER-EXTENSION-02";
128
+ readonly title: "验证扩展部署状态";
129
+ readonly description: "读取 heartbeat 形成的持久化部署证据。";
122
130
  readonly state: "TODO";
123
131
  readonly responsible: "AI";
124
132
  readonly execution: {
125
- readonly interactive: "pnpm exec -- proflow-execution-browser-extension setup 03";
133
+ readonly interactive: "pnpm exec -- proflow-execution-browser-extension verify";
126
134
  readonly nonInteractive: "pnpm exec -- proflow-execution-browser-extension verify";
127
135
  };
128
136
  readonly requiredInputs: readonly [];
@@ -136,15 +144,6 @@ export declare const behaviorAdapter: {
136
144
  };
137
145
  };
138
146
  observedEffects: never[];
139
- } | {
140
- result: {
141
- readonly contract: "deployment.result.v1";
142
- readonly ok: true;
143
- readonly status: "SUCCEEDED";
144
- readonly moduleRef: "execution-browser-extension";
145
- readonly moduleVersion: "0.1.11";
146
- };
147
- observedEffects: string[];
148
147
  }>;
149
148
  readonly docs: (_context: ModuleCommandContext) => Promise<{
150
149
  result: {
@@ -152,7 +151,7 @@ export declare const behaviorAdapter: {
152
151
  ok: true;
153
152
  status: "SUCCEEDED";
154
153
  moduleRef: "execution-browser-extension";
155
- moduleVersion: "0.1.11";
154
+ moduleVersion: "0.1.13";
156
155
  data: {
157
156
  docs: string;
158
157
  };
@@ -165,11 +164,11 @@ export declare const behaviorAdapter: {
165
164
  readonly ok: true;
166
165
  readonly status: "SUCCEEDED";
167
166
  readonly moduleRef: "execution-browser-extension";
168
- readonly moduleVersion: "0.1.11";
167
+ readonly moduleVersion: "0.1.13";
169
168
  } | {
170
169
  contract: "deployment.result.v1";
171
170
  moduleRef: "execution-browser-extension";
172
- moduleVersion: "0.1.11";
171
+ moduleVersion: "0.1.13";
173
172
  ok: false;
174
173
  status: "FAILED";
175
174
  error: {
@@ -186,7 +185,7 @@ export declare const behaviorAdapter: {
186
185
  readonly ok: true;
187
186
  readonly status: "SUCCEEDED";
188
187
  readonly moduleRef: "execution-browser-extension";
189
- readonly moduleVersion: "0.1.11";
188
+ readonly moduleVersion: "0.1.13";
190
189
  };
191
190
  observedEffects: never[];
192
191
  }>;