browser-pilot-cli 0.3.0 → 0.5.0
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/README.md +270 -354
- package/dist/cli.js +1285 -2864
- package/dist/daemon.js +1142 -887
- package/docs/architecture/browser-pilot-platform-spec.md +440 -1013
- package/docs/plans/browser-capability-evolution.md +6 -6
- package/docs/plans/profile-context-routing.md +35 -10
- package/docs/plans/universal-agent-integration.md +121 -335
- package/docs/plans/v0.3.0-stabilization.md +10 -4
- package/docs/releases/v0.2.0.md +53 -0
- package/docs/releases/v0.2.1.md +13 -0
- package/docs/releases/v0.2.2.md +18 -0
- package/docs/releases/v0.4.0.md +62 -0
- package/docs/releases/v0.5.0.md +93 -0
- package/package.json +8 -15
- package/docs/integration/stdio-bridge.md +0 -670
- package/docs/integration/stdio-conformance.md +0 -51
- package/scripts/run-stdio-conformance.mjs +0 -698
|
@@ -299,11 +299,11 @@ Preserve Browser Pilot advantages:
|
|
|
299
299
|
- [x] **B5.4** Update the universal skill with decision guidance grounded in
|
|
300
300
|
actual tool errors and state, not framework-specific prompts.
|
|
301
301
|
- Covers: FR-1, FR-8.
|
|
302
|
-
- Complete: the Agent-neutral skill now
|
|
303
|
-
|
|
302
|
+
- Complete: the Agent-neutral skill now uses the same CLI workflow for
|
|
303
|
+
Agent-installed and product-bundled use, starts from current tab/page state, uses
|
|
304
304
|
fresh refs, verifies action results, and gives explicit recovery decisions
|
|
305
|
-
for structured evidence, hints, stable errors,
|
|
306
|
-
|
|
305
|
+
for structured evidence, hints, stable errors, reconnects, dialogs, and
|
|
306
|
+
local file results. Command guidance now reflects all-tab inventory, explicit
|
|
307
307
|
dialog handling, managed-only bulk cleanup, and actual local capture output.
|
|
308
308
|
It names no Agent framework in its runtime decisions and adds no adapter or
|
|
309
309
|
prompt-specific production behavior.
|
|
@@ -383,8 +383,8 @@ Preserve Browser Pilot advantages:
|
|
|
383
383
|
`stagnant_page`; action parameters, typed values, page text, and hashes are
|
|
384
384
|
not exposed.
|
|
385
385
|
- [x] **B7.6** Keep the additions Agent-neutral and backward compatible.
|
|
386
|
-
- Complete:
|
|
387
|
-
implementations. The
|
|
386
|
+
- Complete: all CLI commands use the Broker's canonical internal
|
|
387
|
+
implementations and schemas. The commands reuse existing capabilities and are additive
|
|
388
388
|
for protocol 1.0/1.1. Multi-action queues, LLM extraction, planning, and
|
|
389
389
|
memory remain Host-Agent responsibilities.
|
|
390
390
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Profile Context Routing Plan
|
|
2
2
|
|
|
3
3
|
Status: **Complete**
|
|
4
|
-
Target: Browser Pilot `v0.
|
|
4
|
+
Target: Browser Pilot `v0.4.0`, protocol `1.3`
|
|
5
5
|
Source of truth: `docs/architecture/browser-pilot-platform-spec.md`
|
|
6
6
|
|
|
7
7
|
## Goal
|
|
@@ -53,7 +53,8 @@ It has:
|
|
|
53
53
|
- an internal raw CDP browser-context ID, never exposed;
|
|
54
54
|
- the owning BrowserInstance and connection generation;
|
|
55
55
|
- a connection-scoped neutral label;
|
|
56
|
-
-
|
|
56
|
+
- connection-generation-scoped identity status plus optional verified Profile
|
|
57
|
+
name, account name/email, and Profile directory;
|
|
57
58
|
- current total and eligible tab counts;
|
|
58
59
|
- one or more bounded representative targets for routing and user recognition.
|
|
59
60
|
|
|
@@ -99,10 +100,31 @@ Protocol 1.2 adds:
|
|
|
99
100
|
Profile summaries and representative eligible tabs. It never opens, navigates,
|
|
100
101
|
attaches to, or focuses a target merely to discover a display name.
|
|
101
102
|
|
|
103
|
+
## Protocol 1.3
|
|
104
|
+
|
|
105
|
+
Protocol 1.3 adds `browser.profiles.identify` as an explicit, mutating identity
|
|
106
|
+
operation. For each requested unidentified Profile it creates a temporary
|
|
107
|
+
visible `chrome://version` target in that exact context, reads `#profile_path`,
|
|
108
|
+
verifies that path as an immediate child of the connected browser's
|
|
109
|
+
`userDataRoot`, reads bounded metadata from Chrome `Local State`, then detaches
|
|
110
|
+
and proves the temporary target was closed. Failure to prove cleanup returns
|
|
111
|
+
`unknown_outcome`; Browser Pilot never silently leaves an identity page behind.
|
|
112
|
+
|
|
113
|
+
Results use `identityStatus: unidentified | verified | unavailable` plus
|
|
114
|
+
optional `profileName`, `accountName`, `accountEmail`, `profileDirectory`, and a
|
|
115
|
+
stable `identityErrorCode`. Identity is cached only for the current browser
|
|
116
|
+
connection generation. `refresh: true` explicitly re-probes. No directory
|
|
117
|
+
ordering, tab title, or raw context ID is treated as account identity.
|
|
118
|
+
|
|
119
|
+
Protocol 1.3 also renames browser candidate `profile` to `userDataRoot` and tab
|
|
120
|
+
inventory `active` to `selected`. The latter is the Lease's logical target, not
|
|
121
|
+
Chrome foreground focus. Protocol 1.2 clients retain their legacy fields.
|
|
122
|
+
|
|
102
123
|
`browser.profiles.select` accepts only a public `profileContextId`. Human CLI
|
|
103
|
-
selectors such as index, neutral label, or verified
|
|
124
|
+
selectors such as one-based index, neutral label, or verified Profile/account
|
|
125
|
+
name or email are resolved
|
|
104
126
|
client-side from a fresh list. The machine protocol never accepts an ambiguous
|
|
105
|
-
free-form selector. Selecting a Profile clears the Lease's logical
|
|
127
|
+
free-form selector. Selecting a Profile clears the Lease's logical selected-target
|
|
106
128
|
anchor without releasing control or changing Chrome focus, so the next new
|
|
107
129
|
managed target uses that explicit Workspace selection.
|
|
108
130
|
|
|
@@ -112,7 +134,7 @@ When `browser.open` needs a new target, resolve exactly one Profile context in
|
|
|
112
134
|
this order:
|
|
113
135
|
|
|
114
136
|
1. an explicit, current-generation `profileContextId`;
|
|
115
|
-
2. the current Lease's
|
|
137
|
+
2. the current Lease's selected target context;
|
|
116
138
|
3. the Workspace's current, valid selection;
|
|
117
139
|
4. the only currently available Profile context;
|
|
118
140
|
5. otherwise fail with `profile_selection_required` before browser dispatch.
|
|
@@ -161,13 +183,13 @@ candidate targets were closed.
|
|
|
161
183
|
- Protocol 1.0/1.1 clients continue to list and control existing tabs.
|
|
162
184
|
- In a single available context, their existing `browser.open` behavior remains
|
|
163
185
|
automatic.
|
|
164
|
-
- In multiple contexts,
|
|
186
|
+
- In multiple contexts, a selected target remains an unambiguous anchor.
|
|
165
187
|
- With multiple contexts and no anchor, older clients receive a structured
|
|
166
188
|
failure and Browser Pilot never silently chooses the first context.
|
|
167
189
|
- New Profile fields on existing results are additive; raw CDP IDs remain
|
|
168
190
|
private.
|
|
169
|
-
- The current CLI negotiates protocol 1.
|
|
170
|
-
1.0
|
|
191
|
+
- The current CLI negotiates protocol 1.3, while the Broker continues to accept
|
|
192
|
+
1.0 through 1.2.
|
|
171
193
|
|
|
172
194
|
## Delivery
|
|
173
195
|
|
|
@@ -176,7 +198,7 @@ candidate targets were closed.
|
|
|
176
198
|
- [x] P2: implement Profile context registry, target propagation, Workspace
|
|
177
199
|
selection, multiple ManagedTabSets, and janitor adoption.
|
|
178
200
|
- [x] P3: implement `bp profiles`, `bp profile`, and `bp open --profile`.
|
|
179
|
-
- [x] P4: update
|
|
201
|
+
- [x] P4: update CLI integration guidance, skill, and release docs.
|
|
180
202
|
- [x] P5: add protocol, dual-Profile, concurrency, reconnect, cleanup, and
|
|
181
203
|
compatibility tests.
|
|
182
204
|
- [x] P6: run real Chrome acceptance and publish `v0.3.0-rc.2`.
|
|
@@ -186,13 +208,16 @@ candidate targets were closed.
|
|
|
186
208
|
- [x] All eligible user tabs across live Profile contexts appear in one inventory.
|
|
187
209
|
- [x] Existing user tabs can be controlled without selecting a Profile first.
|
|
188
210
|
- [x] No multi-context open silently selects a first Profile.
|
|
189
|
-
- [x] Explicit,
|
|
211
|
+
- [x] Explicit, selected-target, Workspace, and single-context resolution follow the
|
|
190
212
|
specified order.
|
|
191
213
|
- [x] Every managed target and popup matches its ManagedTabSet Profile context.
|
|
192
214
|
- [x] Two Workspaces may select different contexts and create targets concurrently
|
|
193
215
|
without cross-routing.
|
|
194
216
|
- [x] Reconnect invalidates old Profile IDs, target mappings, frames, and refs.
|
|
195
217
|
- [x] Passive listing creates no target and never focuses or navigates a user tab.
|
|
218
|
+
- [x] Explicit identity verifies Profile paths, returns structured account-aware
|
|
219
|
+
fields, cleans temporary targets, caches only within one connection
|
|
220
|
+
generation, and never guesses unavailable metadata.
|
|
196
221
|
- [x] Janitor EOF/SIGKILL cleanup closes fallback-created managed windows but never
|
|
197
222
|
user tabs.
|
|
198
223
|
- [x] Protocol 1.1 clients retain existing-tab control and cannot open ambiguously.
|
|
@@ -1,339 +1,125 @@
|
|
|
1
|
-
# Universal Agent Integration Plan
|
|
1
|
+
# Universal Agent CLI Integration Plan
|
|
2
2
|
|
|
3
|
-
Status:
|
|
4
|
-
|
|
5
|
-
Workstream: A
|
|
3
|
+
Status: implementation and local release verification complete for the
|
|
4
|
+
CLI-only architecture; formal publication remains.
|
|
6
5
|
|
|
7
6
|
## Goal
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
- Keep
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- [x]
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
- [x]
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
- [x]
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
- [x]
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
- [x]
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- [x]
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
- [x]
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
- [x]
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
- Complete: `createBrowserControlPolicy` exposes all eligible user tabs and
|
|
128
|
-
validates optional `deniedOperations` without any Agent-specific policy.
|
|
129
|
-
- [x] **A2.7** Build eligible user-tab discovery and internal-target exclusion.
|
|
130
|
-
- Covers: CON-2, FLOW-5, BR-2, BR-25, BR-26, FR-4.
|
|
131
|
-
- Acceptance: current and future ordinary tabs are returned, while managed
|
|
132
|
-
targets, Browser Pilot internal targets, DevTools, unsupported internal
|
|
133
|
-
pages, and non-page targets are excluded.
|
|
134
|
-
- Complete: `CdpBrowserTargetCatalog` implements the CDP catalog boundary.
|
|
135
|
-
- [x] **A2.8** Merge ManagedTabSets and all eligible user tabs in
|
|
136
|
-
ControlledTarget resolution, listing, switching, and popup inheritance.
|
|
137
|
-
- Covers: BR-1, BR-2, BR-23 through BR-27.
|
|
138
|
-
- Acceptance: `tabs.list` returns managed and user tabs with
|
|
139
|
-
origin metadata; conflicting control reports `target_busy`; bulk cleanup
|
|
140
|
-
closes only managed tabs; closing a user tab is explicit.
|
|
141
|
-
- Complete: `MemoryControlledTargetRegistry`, `TargetInventoryService`, and
|
|
142
|
-
`CdpBrowserTargetCatalog` now provide opaque per-Workspace target IDs,
|
|
143
|
-
immediate managed/user inventory merging, dynamic new-tab discovery,
|
|
144
|
-
physical-target Lease exclusion across Principals, ineligible-target
|
|
145
|
-
invalidation, managed-popup inheritance, and safe managed-only bulk close.
|
|
146
|
-
`tools/call` now lists, switches to, and explicitly closes both origins;
|
|
147
|
-
Workspace release closes only managed targets. The compatibility CLI
|
|
148
|
-
retains the same all-tab behavior.
|
|
149
|
-
|
|
150
|
-
### A3. Add bounded runtime lifecycle and command semantics
|
|
151
|
-
|
|
152
|
-
- [x] **A3.1** Add in-memory Workspace, Lease, target assignment, command,
|
|
153
|
-
idempotency, and bounded journal stores.
|
|
154
|
-
- Covers: FR-5, NFR-2, NFR-5.
|
|
155
|
-
- Complete: Workspace, Lease, target assignment, Command, idempotency, and
|
|
156
|
-
per-Workspace event stores are bounded and live in daemon memory.
|
|
157
|
-
- [x] **A3.2** Implement heartbeat, expiry, release, crash recovery, and
|
|
158
|
-
idempotent cleanup for Workspaces and Leases.
|
|
159
|
-
- Covers: AC-5, NFR-5.
|
|
160
|
-
- Broker restart invalidates transient state; clients initialize, list, and
|
|
161
|
-
observe again. Do not recover stale browser state from disk.
|
|
162
|
-
- Complete: Lease heartbeat/expiry/release, EOF cleanup, idle Connection and
|
|
163
|
-
Workspace reclamation, and idempotent Workspace release are implemented.
|
|
164
|
-
Target, auth, network, frame, Observation, Artifact, and partial download
|
|
165
|
-
cleanup is connected. Browser connection loss now rejects tools, invalidates
|
|
166
|
-
sessions/refs, passively rediscovers the selected profile, and advances
|
|
167
|
-
generation only after an explicit reconnect succeeds. A private child janitor solely owns the browser-level CDP
|
|
168
|
-
connection, proxies daemon traffic over IPC, tracks verified managed popup
|
|
169
|
-
descendants, and closes them on daemon-pipe EOF, including `SIGKILL`,
|
|
170
|
-
without persisting target IDs or grouping by browser window. Process-level
|
|
171
|
-
tests prove user tabs survive and only one browser WebSocket is opened.
|
|
172
|
-
- [x] **A3.3** Implement command accepted/dispatched/completed,
|
|
173
|
-
`unknown_outcome`, deadline, cancellation, and duplicate-call behavior.
|
|
174
|
-
- Covers: BR-8 through BR-12, AC-5.
|
|
175
|
-
- Complete: caller or Broker IDs, Workspace-scoped idempotency, bounded
|
|
176
|
-
terminal outcomes, pre-dispatch cancellation, best-effort post-dispatch
|
|
177
|
-
cancellation, deadlines, cached results, and no-replay unknown outcomes are
|
|
178
|
-
enforced through the public bridge.
|
|
179
|
-
- [x] **A3.4** Replace dialog auto-acceptance with typed events and explicit
|
|
180
|
-
accept/dismiss commands.
|
|
181
|
-
- Covers: DEC-5, event contract.
|
|
182
|
-
- Complete: dialogs stay pending, emit opened/closed events, and can be listed
|
|
183
|
-
and explicitly accepted or dismissed through out-of-band dialog tools.
|
|
184
|
-
One-shot CLI dialogs use those same Workspace-scoped canonical tools and
|
|
185
|
-
cannot list or respond to another Workspace's dialogs.
|
|
186
|
-
|
|
187
|
-
### A4. Deliver the stdio bridge
|
|
188
|
-
|
|
189
|
-
- [x] **A4.1** Implement strict NDJSON framing, JSON-RPC parsing, stdout/stderr
|
|
190
|
-
separation, initialization, and graceful shutdown.
|
|
191
|
-
- Covers: FR-2, NFR-1.
|
|
192
|
-
- Complete: fatal UTF-8 decoding, bounded line assembly, strict JSON-RPC
|
|
193
|
-
envelopes, ordered normal dispatch, command-control bypass, notification
|
|
194
|
-
semantics, stdout-only protocol, EOF cleanup, bridge-only shutdown, and
|
|
195
|
-
structured framing errors are covered by black-box stream tests.
|
|
196
|
-
- [x] **A4.2** Implement tool discovery/call, Workspace/Lease lifecycle,
|
|
197
|
-
cancellation, and structured errors.
|
|
198
|
-
- Covers: AC-2, FR-7.
|
|
199
|
-
- Includes direct all-tab inventory and optional Host-configured operation
|
|
200
|
-
removal. There are no browser-access approval methods.
|
|
201
|
-
- Complete: canonical `tools/list`, validated `tools/call`, Workspace/Lease
|
|
202
|
-
lifecycle, all-tab inventory, and production implementation filtering are
|
|
203
|
-
implemented. `commands/get/cancel` can overtake a pending call on the same
|
|
204
|
-
stdio connection and return structured outcomes.
|
|
205
|
-
- [x] **A4.3** Implement event notifications plus cursor polling and
|
|
206
|
-
`cursor_expired` recovery.
|
|
207
|
-
- Covers: events contract, NFR-3.
|
|
208
|
-
- Complete: bounded Workspace journals, explicit initial cursors, ordered
|
|
209
|
-
replay, `cursor_expired` bounds, Principal isolation, best-effort stdio
|
|
210
|
-
notifications, and daemon notification long-polling are implemented.
|
|
211
|
-
- [x] **A4.4** Add protocol backpressure, negotiated message limits, and
|
|
212
|
-
malformed-client isolation.
|
|
213
|
-
- Covers: NFR-1, NFR-5.
|
|
214
|
-
- Complete: protocol 1.1 negotiates per-Connection message/result ceilings;
|
|
215
|
-
bootstrap and pipelined framing apply them deterministically. Input/output
|
|
216
|
-
backpressure, bounded ordinary/control call queues, oversized-result
|
|
217
|
-
replacement, notification dropping with cursor recovery, and bridge-local
|
|
218
|
-
malformed-client termination prevent one client from exhausting or
|
|
219
|
-
terminating another.
|
|
220
|
-
|
|
221
|
-
### A5. Deliver secure Artifacts
|
|
222
|
-
|
|
223
|
-
- [x] **A5.1** Add protected Artifact storage, metadata, quotas, TTL, preview
|
|
224
|
-
relationships, retain/release, and cleanup.
|
|
225
|
-
- Covers: BR-17 through BR-20, FR-6.
|
|
226
|
-
- [x] **A5.2** Return screenshot, PDF, and download results as Artifacts while
|
|
227
|
-
keeping explicit CLI export behavior compatible.
|
|
228
|
-
- Covers: AC-1, AC-6.
|
|
229
|
-
- Complete: screenshot and PDF tools return scoped Artifacts; large captures
|
|
230
|
-
produce model-sized previews with optional originals. Session-scoped Page
|
|
231
|
-
events establish download ownership, and browser-level completion events
|
|
232
|
-
copy only those files into protected `download` Artifacts without publishing
|
|
233
|
-
Chrome source paths or CDP GUIDs.
|
|
234
|
-
- [x] **A5.3** Add adapter-facing file authorization and revoke access on
|
|
235
|
-
release or expiry.
|
|
236
|
-
- Covers: CON-5, NFR-5.
|
|
237
|
-
- Complete: import/get/export/retain/release require an owning active Workspace
|
|
238
|
-
and Lease. `artifacts/import` copies an absolute client-authorized path to a
|
|
239
|
-
`user_file` / `upload_input` Artifact, and `browser.upload` accepts only that
|
|
240
|
-
kind. Release, expiry, Workspace cleanup, and Broker shutdown delete Broker
|
|
241
|
-
bytes without deleting the source file.
|
|
242
|
-
|
|
243
|
-
### A6. Browser discovery and multi-version operation
|
|
244
|
-
|
|
245
|
-
- [x] **A6.1** Return structured browser candidates and setup remediation;
|
|
246
|
-
persist only explicit or deterministic selection.
|
|
247
|
-
- Covers: browser discovery contract.
|
|
248
|
-
- Complete: discovery enumerates installed supported product/profile candidates
|
|
249
|
-
with stable IDs and separate process, remote-debugging, and authorization
|
|
250
|
-
state. `initialize`, `browser.discover`, and `bp browsers` are passive and
|
|
251
|
-
return bounded remediation; the Broker can start before any candidate is
|
|
252
|
-
ready, connect candidates only through explicit `browser.connect`, and route ready browser instances by
|
|
253
|
-
`browserId`. Selection is explicit (`--browser`/`browserId`) or stable-order
|
|
254
|
-
deterministic and remains daemon-memory state only.
|
|
255
|
-
- [x] **A6.2** Define the per-user Broker locator, socket/pipe permissions,
|
|
256
|
-
startup locking, stale process recovery, and platform-specific paths.
|
|
257
|
-
- Covers: FR-7, CON-5.
|
|
258
|
-
- Complete: a versioned, owner-only locator records the per-user endpoint and
|
|
259
|
-
Broker process identity. Unix uses a mode-`0600` domain socket with a
|
|
260
|
-
deterministic short runtime path when required; Windows uses a per-user
|
|
261
|
-
named pipe. State/runtime directories and metadata are owner-only. An
|
|
262
|
-
atomic startup lock plus a post-lock health check makes concurrent launch a
|
|
263
|
-
single-winner operation. Broker startup never requests Chrome authorization;
|
|
264
|
-
concurrent explicit connect calls share one in-flight attempt. Dead owners are
|
|
265
|
-
reclaimed without killing a PID; live but unresponsive ready Brokers fail
|
|
266
|
-
with explicit remediation and are never silently replaced.
|
|
267
|
-
- [x] **A6.3** Implement executable/protocol negotiation, live-client upgrade
|
|
268
|
-
protection, rollback metadata, and deliberate version isolation.
|
|
269
|
-
- Covers: AC-7, NFR-2.
|
|
270
|
-
- Complete: compatible embedded clients negotiate and reuse the running
|
|
271
|
-
Broker, while the one-shot compatibility CLI retains exact executable
|
|
272
|
-
version semantics. Health and schema-2 locator metadata expose the current
|
|
273
|
-
service, executable installation identity, protocol range, and bounded live
|
|
274
|
-
client counts. Protected compare-and-stop shutdown rejects mismatched
|
|
275
|
-
executables and returns `broker_in_use` while embedded Connections remain.
|
|
276
|
-
Owner-only version history retains only current/previous executable metadata
|
|
277
|
-
and no transient browser state. `BROWSER_PILOT_HOME` provides explicit
|
|
278
|
-
cross-platform isolation; incompatibility never triggers hidden replacement
|
|
279
|
-
or isolation. Process tests cover reuse, incompatibility, shutdown
|
|
280
|
-
protection, crash recovery, and two intentional Broker namespaces.
|
|
281
|
-
- [x] **A6.4** Preserve global npm, local npm/npx, and product-bundled launch
|
|
282
|
-
modes. Add signed/self-contained artifacts where each platform permits.
|
|
283
|
-
- Covers: FR-1, FR-2.
|
|
284
|
-
- Complete: build-time version injection and a runtime layout abstraction
|
|
285
|
-
preserve adjacent-script npm installs while allowing one Node SEA executable
|
|
286
|
-
to serve the public CLI and reserved private Broker/janitor roles. Packed
|
|
287
|
-
global npm, local npm/npx, and product-owned absolute-path launches pass
|
|
288
|
-
black-box version, bridge, Broker startup, and cleanup tests. Native bundles
|
|
289
|
-
include actual-state signature metadata, SHA-256 manifests, licenses, and
|
|
290
|
-
platform archives; macOS Developer ID/notarization and Windows Authenticode
|
|
291
|
-
hooks activate only with complete credentials, while unsigned/ad-hoc state
|
|
292
|
-
remains explicit. Release CI uses fixed official Node 22.17.0 native runners
|
|
293
|
-
and verifies every artifact before publishing it.
|
|
294
|
-
|
|
295
|
-
### A7. Agent-neutral integration kit
|
|
296
|
-
|
|
297
|
-
- [x] **A7.1** Publish the process adapter contract: launch, initialize,
|
|
298
|
-
manifest registration, tool calls, event handling, Artifact conversion, and
|
|
299
|
-
cleanup.
|
|
300
|
-
- Covers: AC-2, AC-6.
|
|
301
|
-
- [x] **A7.2** Build a language-neutral conformance runner that treats the
|
|
302
|
-
executable as a black box.
|
|
303
|
-
- Covers: FR-2 through FR-7.
|
|
304
|
-
- [x] **A7.3** Add Tenon and OpenClaw adapters as separate examples or consumer
|
|
305
|
-
changes. Keep their lifecycle mapping out of Browser Pilot production code.
|
|
306
|
-
- Covers: DEC-1, CON-3.
|
|
307
|
-
- Complete: source-only Tenon and OpenClaw adapters consume only
|
|
308
|
-
`bridge --stdio`, runtime `tools/list`, and protected Artifact files. They
|
|
309
|
-
map Thread/Turn and Agent-session/run lifecycles to transient
|
|
310
|
-
Workspace/Lease contexts, require explicit targets, derive Command identity
|
|
311
|
-
from host tool-call IDs, convert screenshots to native image content, export
|
|
312
|
-
files to host-owned absolute paths, explicitly acknowledge processed event
|
|
313
|
-
cursors, and invalidate local state on failed cleanup. Concurrent begin,
|
|
314
|
-
initialization/release failure, cursor recovery, media conversion, bounded
|
|
315
|
-
model text, structured errors, and unknown outcomes are covered by process
|
|
316
|
-
tests. The examples remain excluded from the npm package and no
|
|
317
|
-
Agent-specific concept enters production code.
|
|
318
|
-
- [x] **A7.4** Update the Agent skill to teach direct one-shot use and embedded
|
|
319
|
-
stdio use without assuming a particular Agent runtime.
|
|
320
|
-
- Covers: FR-1, AC-1.
|
|
321
|
-
|
|
322
|
-
## Cross-Workstream Dependencies
|
|
323
|
-
|
|
324
|
-
- A0.2 and B0.1 jointly own the Observation/ref public contract.
|
|
325
|
-
- A1 exposes internal service interfaces; B1-B4 implement improved behavior
|
|
326
|
-
behind those interfaces.
|
|
327
|
-
- A2 target actors provide B3 action ordering and document-change cancellation.
|
|
328
|
-
- A4 events depend on B4 event producers but can be tested initially with
|
|
329
|
-
synthetic Broker events.
|
|
330
|
-
- A5 Artifact delivery is required before B5 screenshot guidance is complete.
|
|
331
|
-
|
|
332
|
-
## Release Gate
|
|
333
|
-
|
|
334
|
-
Workstream A is complete only when AC-1 through AC-7 pass, existing CLI tests
|
|
335
|
-
remain green, two concurrent reference clients are isolated, all eligible user
|
|
336
|
-
tabs are combined with the Agent's managed tabs without a grant step, bulk
|
|
337
|
-
cleanup leaves user tabs open, Host-disabled operations fail before dispatch,
|
|
338
|
-
and a client can send a screenshot Artifact to its runtime's native image
|
|
339
|
-
content without an SDK or MCP dependency.
|
|
8
|
+
Allow any shell-capable Agent to control the user's eligible Chrome tabs by
|
|
9
|
+
installing the Browser Pilot skill and invoking the same `bp` CLI, whether the
|
|
10
|
+
CLI was installed by the Agent or bundled by an Agent product.
|
|
11
|
+
|
|
12
|
+
```text
|
|
13
|
+
Agent -> skill -> existing shell tool -> bp CLI -> shared Broker -> Chrome
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
The integration must not require an extension, MCP, Native SDK, native Browser
|
|
17
|
+
Pilot tools, a persistent adapter, or Agent-specific runtime code.
|
|
18
|
+
|
|
19
|
+
## Decisions
|
|
20
|
+
|
|
21
|
+
- [x] Keep one public Agent interface: skill plus CLI.
|
|
22
|
+
- [x] Keep the Broker and CDP transport private.
|
|
23
|
+
- [x] Use stable `BROWSER_PILOT_CLIENT_KEY` values for independent Agents.
|
|
24
|
+
- [x] Preserve logical Agent state across short-lived CLI calls.
|
|
25
|
+
- [x] Expose all eligible managed and user-opened tabs.
|
|
26
|
+
- [x] Keep user tabs open during release and crash cleanup.
|
|
27
|
+
- [x] Leave task-intent permission policy to the Agent host.
|
|
28
|
+
- [x] Support product bundling by putting a pinned CLI on the Agent `PATH`.
|
|
29
|
+
- [x] Support Apple Silicon macOS, x64 Linux, and x64 Windows only.
|
|
30
|
+
|
|
31
|
+
## Workstream A: CLI Contract
|
|
32
|
+
|
|
33
|
+
- [x] Provide stable JSON success and error results.
|
|
34
|
+
- [x] Add stable error codes to parser, input, service, and browser failures.
|
|
35
|
+
- [x] Make `--client-key` discoverable in top-level help.
|
|
36
|
+
- [x] Add `bp status` with service, browser, selected state, command state, and
|
|
37
|
+
structured recovery.
|
|
38
|
+
- [x] Add bounded `bp commands`, `bp command`, and `bp cancel` commands.
|
|
39
|
+
- [x] Add global `--request-id` and deterministic idempotent recovery.
|
|
40
|
+
- [x] Add global `--timeout` and best-effort cancellation on process signals.
|
|
41
|
+
- [x] Add browser-visible `bp wait` conditions.
|
|
42
|
+
- [x] Add download list/export commands.
|
|
43
|
+
- [x] Add `BROWSER_PILOT_OUTPUT_DIR` and structured file metadata.
|
|
44
|
+
- [x] Keep `bp --help` as the canonical runtime command inventory.
|
|
45
|
+
|
|
46
|
+
## Workstream B: Shared State and Concurrency
|
|
47
|
+
|
|
48
|
+
- [x] Replace global active-tab/ref files with Broker-owned keyed state.
|
|
49
|
+
- [x] Isolate selected profile, target, frame, refs, auth, network rules,
|
|
50
|
+
downloads, and commands by Agent key.
|
|
51
|
+
- [x] Serialize commands per physical tab and allow independent tabs to run in
|
|
52
|
+
parallel.
|
|
53
|
+
- [x] Enforce one controlling Agent per physical user tab.
|
|
54
|
+
- [x] Return stable `target_busy` rather than stealing control.
|
|
55
|
+
- [x] Reclaim expired state and managed targets.
|
|
56
|
+
- [x] Preserve user tabs on Agent release and crash cleanup.
|
|
57
|
+
- [x] Invalidate browser-generation-scoped state after reconnect.
|
|
58
|
+
|
|
59
|
+
## Workstream C: Cross-Installation Broker Reuse
|
|
60
|
+
|
|
61
|
+
- [x] Negotiate compatibility by protocol rather than executable path.
|
|
62
|
+
- [x] Allow compatible global and product-bundled CLIs to share one Broker.
|
|
63
|
+
- [x] Keep one stable Agent principal across compatible CLI versions.
|
|
64
|
+
- [x] Use separate internal client sessions when compatible versions differ.
|
|
65
|
+
- [x] Let `bp disconnect` release the invoking Agent's namespace from any
|
|
66
|
+
compatible installation.
|
|
67
|
+
- [x] Require exact executable identity only for whole-Broker shutdown.
|
|
68
|
+
- [x] Refuse incompatible protocol clients without replacing the live Broker.
|
|
69
|
+
- [x] Support explicit incompatible isolation through `BROWSER_PILOT_HOME`.
|
|
70
|
+
|
|
71
|
+
## Workstream D: Product Embedding
|
|
72
|
+
|
|
73
|
+
- [x] Document one generic integration for Tenon, OpenClaw, and other Agents.
|
|
74
|
+
- [x] Require the complete skill and a normal command runner.
|
|
75
|
+
- [x] Require a pinned native CLI or npm CLI plus pinned Node runtime.
|
|
76
|
+
- [x] Put the bundled CLI directory on the Agent command environment's `PATH`.
|
|
77
|
+
- [x] Inject a stable client key per logical Agent.
|
|
78
|
+
- [x] Inject a task-owned absolute output directory.
|
|
79
|
+
- [x] Return files by absolute path for the host's existing image/file tools.
|
|
80
|
+
- [x] Avoid command-to-native-tool mapping and permanent tool-schema context.
|
|
81
|
+
- [x] Keep Agent-managed and bundled installs on the same behavior path.
|
|
82
|
+
|
|
83
|
+
## Workstream E: Skill and Documentation
|
|
84
|
+
|
|
85
|
+
- [x] Keep the main skill focused on the browser operating loop.
|
|
86
|
+
- [x] Split command, recovery, async, and embedding details into on-demand
|
|
87
|
+
references.
|
|
88
|
+
- [x] Remove internal state IDs and transport concepts from Agent guidance.
|
|
89
|
+
- [x] Document all eligible user tabs and explicit user-tab close behavior.
|
|
90
|
+
- [x] Document Chrome profile identity and routing.
|
|
91
|
+
- [x] Document tab-group control limitations without limiting grouped tabs.
|
|
92
|
+
- [x] Document local screenshot, PDF, download, and network-body results.
|
|
93
|
+
- [x] Document stable request recovery and uncertain mutation rules.
|
|
94
|
+
|
|
95
|
+
## Workstream F: Distribution
|
|
96
|
+
|
|
97
|
+
- [x] Keep CLI, plugin, skill compatibility, and marketplace versions synced
|
|
98
|
+
from the root package version.
|
|
99
|
+
- [x] Publish a release index binding CLI, skill range, protocol, platforms,
|
|
100
|
+
checksums, and tested version.
|
|
101
|
+
- [x] Exclude Intel Mac assets.
|
|
102
|
+
- [x] Verify global, local, and product-bundled npm use.
|
|
103
|
+
- [x] Verify native archives do not need system Node.
|
|
104
|
+
- [x] Bump the next release version and produce local release artifacts.
|
|
105
|
+
- [ ] Publish the npm package, plugin archive, native archives, checksums, and
|
|
106
|
+
release index.
|
|
107
|
+
|
|
108
|
+
## Acceptance Criteria
|
|
109
|
+
|
|
110
|
+
- [x] An Agent can install Browser Pilot itself and follow the skill.
|
|
111
|
+
- [x] A product can bundle Browser Pilot without adding native browser tools.
|
|
112
|
+
- [x] Two Agent products can share one Broker with isolated state.
|
|
113
|
+
- [x] A compatible bundled CLI can use a Broker started by a global CLI.
|
|
114
|
+
- [x] A compatible non-owner CLI can disconnect cleanly without stopping that
|
|
115
|
+
Broker.
|
|
116
|
+
- [x] Every eligible user-opened tab can be selected and controlled.
|
|
117
|
+
- [x] The same physical tab cannot be controlled by two Agents concurrently.
|
|
118
|
+
- [x] Browser authorization is requested only by explicit connection.
|
|
119
|
+
- [x] Stable request IDs prevent duplicate dispatch during recovery.
|
|
120
|
+
- [x] Screenshots, PDFs, downloads, and saved bodies are available as local
|
|
121
|
+
files with structured metadata.
|
|
122
|
+
- [x] Removed persistent adapter commands are absent from CLI help and release
|
|
123
|
+
packages.
|
|
124
|
+
- [x] Full unit, Playwright, distribution, standalone, and controlled real
|
|
125
|
+
Chrome release gates pass for the new version.
|