browser-pilot-cli 0.3.0-rc.6 → 0.4.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 +90 -27
- package/dist/cli.js +320 -438
- package/dist/daemon.js +1021 -719
- package/docs/architecture/browser-pilot-platform-spec.md +50 -19
- package/docs/integration/stdio-bridge.md +40 -16
- package/docs/plans/profile-context-routing.md +34 -9
- package/docs/plans/universal-agent-integration.md +18 -5
- package/docs/plans/v0.3.0-stabilization.md +24 -7
- 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.3.0.md +68 -0
- package/docs/releases/v0.4.0.md +62 -0
- package/package.json +7 -7
|
@@ -181,9 +181,14 @@ Chrome Profile contexts; those are not separate BrowserInstances.
|
|
|
181
181
|
One live regular browser context inside a BrowserInstance. Its public
|
|
182
182
|
`profileContextId` is opaque and scoped to the current browser connection
|
|
183
183
|
generation; the raw CDP browser-context ID is internal. A ProfileContext has a
|
|
184
|
-
connection-scoped neutral label,
|
|
184
|
+
connection-scoped neutral label, structured identity status and optional
|
|
185
|
+
verified Profile/account metadata, bounded
|
|
185
186
|
representative tabs, and current tab counts. Passive discovery never opens a
|
|
186
|
-
tab to infer
|
|
187
|
+
tab to infer Profile or account identity. Protocol 1.3 identity is an explicit visible
|
|
188
|
+
operation: it reads Chrome's reported Profile path, verifies it against the
|
|
189
|
+
BrowserInstance user-data root, then maps bounded Local State metadata to
|
|
190
|
+
structured Profile/account fields. Reconnect invalidates every ProfileContext
|
|
191
|
+
ID and cached identity.
|
|
187
192
|
|
|
188
193
|
### BrowserWorkspace
|
|
189
194
|
|
|
@@ -304,6 +309,14 @@ certificate exists, otherwise records unsigned state. Linux records unsigned
|
|
|
304
309
|
state. Build or release automation must fail on incomplete credentials and
|
|
305
310
|
must never describe an artifact as signed when signing did not run.
|
|
306
311
|
|
|
312
|
+
The supported native matrix is `darwin-arm64`, `linux-x64`, and `win32-x64`;
|
|
313
|
+
Intel Mac is not supported. Each release also publishes a versioned Agent
|
|
314
|
+
plugin/skill archive and checksum. A deterministic release index binds those
|
|
315
|
+
assets to the npm package version, exact compatible skill/CLI version, and
|
|
316
|
+
runtime protocol range. GitHub Release publication waits for successful npm
|
|
317
|
+
publication so consumers cannot observe a nominal release with only one half
|
|
318
|
+
of that distribution contract.
|
|
319
|
+
|
|
307
320
|
### Broker Locator and Startup
|
|
308
321
|
|
|
309
322
|
The executable, not an embedding Host, resolves the per-user Broker endpoint.
|
|
@@ -350,16 +363,21 @@ compatibility Workspace and Lease, then explicitly requests the browser
|
|
|
350
363
|
connection. Other browser commands require that connection and never trigger
|
|
351
364
|
authorization implicitly.
|
|
352
365
|
Existing and future eligible user tabs are available immediately. The command
|
|
353
|
-
returns the existing JSON shape during migration.
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
366
|
+
returns the existing JSON shape during migration. Every non-TTY failure,
|
|
367
|
+
including command parsing and local argument validation, includes a stable
|
|
368
|
+
machine code and `retryable` flag in addition to compatible human guidance.
|
|
369
|
+
One-shot processes
|
|
370
|
+
derive a stable Connection identity from `BROWSER_PILOT_CLIENT_KEY` or
|
|
371
|
+
`--client-key`, then use an idempotently keyed Workspace and renewable Lease
|
|
372
|
+
with a maximum five-minute TTL. Independent Agents use distinct stable keys;
|
|
373
|
+
the default key preserves single-Agent compatibility. Normal process exit leaves that transient
|
|
357
374
|
daemon-memory state available to the next command; expiry invalidates refs and
|
|
358
375
|
releases target control. No target, frame, session, Observation, ref, auth, or
|
|
359
376
|
network mapping is persisted to disk. `bp disconnect` explicitly releases the
|
|
360
377
|
compatibility Workspace and closes only its managed targets. It stops the
|
|
361
|
-
daemon only when called by the matching executable installation and no
|
|
362
|
-
embedded Connection remains; otherwise it returns
|
|
378
|
+
daemon only when called by the matching executable installation and no other
|
|
379
|
+
active Lease or embedded Connection remains; otherwise it returns
|
|
380
|
+
`protocol_incompatible` or
|
|
363
381
|
`broker_in_use` without replacing or terminating the Broker. JavaScript dialogs
|
|
364
382
|
remain pending and are handled explicitly with `bp dialogs` and `bp dialog`;
|
|
365
383
|
Workspace isolation prevents access to other clients' dialogs.
|
|
@@ -416,15 +434,17 @@ to ManagedTabSets.
|
|
|
416
434
|
`browser.tabs.list` inventories eligible tabs from every Profile context exposed
|
|
417
435
|
by the selected BrowserInstance. Existing targets are immediately controllable
|
|
418
436
|
and carry an opaque `profileContextId`. New managed work resolves a Profile from
|
|
419
|
-
an explicit context, the current
|
|
437
|
+
an explicit context, the current Lease-selected target, the Workspace selection, or a
|
|
420
438
|
single available context, in that order. Multiple contexts without an anchor
|
|
421
439
|
return `profile_selection_required` before creating a target. The Agent host
|
|
422
440
|
asks the user which Profile to use; Browser Pilot does not add an approval UI.
|
|
423
441
|
|
|
424
442
|
`browser.profiles.list` is passive and returns bounded, connection-scoped
|
|
425
|
-
summaries. `browser.profiles.
|
|
443
|
+
summaries. Protocol 1.3 `browser.profiles.identify` explicitly creates and
|
|
444
|
+
cleans temporary visible identity targets when account-aware identity is
|
|
445
|
+
needed. `browser.profiles.select` updates only the owning Workspace. A Chrome
|
|
426
446
|
reconnect invalidates old ProfileContext IDs and requires relisting and
|
|
427
|
-
reselection. Selection clears only the Lease's logical
|
|
447
|
+
reselection. Selection clears only the Lease's logical selected-target anchor; it
|
|
428
448
|
does not release control, activate a tab, or change Chrome focus. The exact
|
|
429
449
|
creation and compatibility algorithm is frozen in `docs/plans/profile-context-routing.md`.
|
|
430
450
|
|
|
@@ -485,6 +505,11 @@ creation. Protocol 1.0/1.1 clients retain existing-target control and automatic
|
|
|
485
505
|
single-context behavior, but an ambiguous multi-context open fails rather than
|
|
486
506
|
silently selecting a Profile.
|
|
487
507
|
|
|
508
|
+
Protocol 1.3 adds explicit verified Profile/account identity. Browser candidate
|
|
509
|
+
results use `userDataRoot`, Profile results use structured identity status and
|
|
510
|
+
fields, and tab inventory uses `selected` for the Lease-local target instead of
|
|
511
|
+
the ambiguous `active`. Protocol 1.2 retains its legacy field vocabulary.
|
|
512
|
+
|
|
488
513
|
### Tool Contract
|
|
489
514
|
|
|
490
515
|
`tools/list` is the canonical machine-readable manifest. Every tool declares:
|
|
@@ -579,8 +604,10 @@ Artifacts. Raw CDP is never listed. `eval` requires `developer.eval`.
|
|
|
579
604
|
opaque target ID. The Broker retires its target session and scoped state
|
|
580
605
|
before a different Lease can acquire control with that Lease's own opaque ID.
|
|
581
606
|
No handoff call accepts a foreign Lease or target ID.
|
|
582
|
-
- **BR-7:**
|
|
583
|
-
|
|
607
|
+
- **BR-7:** Browser Pilot returns controlling-client identity in scoped
|
|
608
|
+
protocol results and events so a Host may present it in Host-owned UI. With no
|
|
609
|
+
extension, Browser Pilot does not claim it can modify Chrome's browser chrome,
|
|
610
|
+
and it never injects status borders, labels, or controls into page DOM.
|
|
584
611
|
- **BR-21:** Exposing the CLI or bridge to an Agent is the product-level
|
|
585
612
|
browser-control authorization boundary. Chrome's own remote-debugging
|
|
586
613
|
authorization is requested only by explicit `bp connect`/`browser.connect`.
|
|
@@ -599,7 +626,9 @@ Artifacts. Raw CDP is never listed. `eval` requires `developer.eval`.
|
|
|
599
626
|
chain rooted in the same ManagedTabSet.
|
|
600
627
|
- **BR-26:** `tabs.list` returns eligible current and future tabs, tagging each
|
|
601
628
|
with origin and ManagedTabSet membership. Browser Pilot internal targets,
|
|
602
|
-
DevTools, and unsupported browser-internal targets
|
|
629
|
+
DevTools, extension-owned pages, and unsupported browser-internal targets
|
|
630
|
+
remain excluded. Excluded extension pages do not create or represent a
|
|
631
|
+
ProfileContext.
|
|
603
632
|
- **BR-27:** Bulk cleanup and `close --all` default to the ManagedTabSet. No
|
|
604
633
|
bulk operation closes user tabs outside it. Each user tab requires an
|
|
605
634
|
explicit target-specific close command.
|
|
@@ -607,9 +636,11 @@ Artifacts. Raw CDP is never listed. `eval` requires `developer.eval`.
|
|
|
607
636
|
not only `Target.getBrowserContexts`. Public ProfileContext IDs never expose
|
|
608
637
|
raw CDP identifiers and are invalid after browser reconnect.
|
|
609
638
|
- **BR-30:** Profile listing is passive. It cannot create, attach, activate, or
|
|
610
|
-
navigate a target solely to infer a Profile name.
|
|
611
|
-
|
|
612
|
-
|
|
639
|
+
navigate a target solely to infer a Profile name. Identity requires the
|
|
640
|
+
explicit protocol 1.3 operation, exact Profile-path verification, bounded
|
|
641
|
+
metadata reads, and verified cleanup. Unverified names are omitted instead
|
|
642
|
+
of guessed.
|
|
643
|
+
- **BR-31:** New-target Profile routing follows explicit context, selected target,
|
|
613
644
|
Workspace selection, then single available context. Multiple unanchored
|
|
614
645
|
contexts fail with `profile_selection_required` before browser dispatch.
|
|
615
646
|
- **BR-32:** Every ManagedTabSet is bound to at most one ProfileContext. Managed
|
|
@@ -917,7 +948,7 @@ fields, never on message text.
|
|
|
917
948
|
`BROWSER_PILOT_HOME`; Browser Pilot never creates a hidden version namespace.
|
|
918
949
|
- Broker shutdown is compare-and-stop: it requires the current Broker process
|
|
919
950
|
identity and matching executable installation identity, and refuses while
|
|
920
|
-
any embedded Connection remains live.
|
|
951
|
+
any embedded Connection or active Lease remains live.
|
|
921
952
|
- Additive tool and field changes use capability negotiation and schema
|
|
922
953
|
evolution. Breaking semantics require a protocol-major change.
|
|
923
954
|
- Unknown response fields are ignored; unknown request fields are rejected only
|
|
@@ -945,7 +976,7 @@ fields, never on message text.
|
|
|
945
976
|
- **FR-3 Multi-client isolation:** Concurrent clients have isolated control and
|
|
946
977
|
transient state.
|
|
947
978
|
- **AC-3:** Two clients can operate separate Pilot windows concurrently, and
|
|
948
|
-
refs,
|
|
979
|
+
refs, selected targets, frames, auth, rules, and close operations cannot cross
|
|
949
980
|
Workspace boundaries.
|
|
950
981
|
- **FR-4 User-browser control:** An Agent can list and control all eligible
|
|
951
982
|
current and future tabs in the selected BrowserInstance, including tabs the
|
|
@@ -17,6 +17,11 @@ Resolve an exact Browser Pilot executable version from one of these locations:
|
|
|
17
17
|
2. A project-local npm dependency.
|
|
18
18
|
3. A compatible global installation selected explicitly by the host.
|
|
19
19
|
|
|
20
|
+
For release bundles, verify the versioned release index first. It binds the npm
|
|
21
|
+
package, Agent plugin/skill compatible CLI range and tested version, protocol
|
|
22
|
+
range, supported native assets, and adjacent SHA-256 files. Native releases support `darwin-arm64`,
|
|
23
|
+
`linux-x64`, and `win32-x64`; Intel Mac is not supported.
|
|
24
|
+
|
|
20
25
|
Launch it directly, without a shell:
|
|
21
26
|
|
|
22
27
|
```text
|
|
@@ -105,13 +110,13 @@ exception because a browser dialog can pause the command that caused it.
|
|
|
105
110
|
`initialize` must be the first successful request on a bridge Connection:
|
|
106
111
|
|
|
107
112
|
```json
|
|
108
|
-
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"client":{"id":"com.example.agent","name":"Example Agent","version":"2.0.0","instanceId":"install:01J..."},"protocol":{"min":{"major":1,"minor":1},"max":{"major":1,"minor":
|
|
113
|
+
{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"client":{"id":"com.example.agent","name":"Example Agent","version":"2.0.0","instanceId":"install:01J..."},"protocol":{"min":{"major":1,"minor":1},"max":{"major":1,"minor":3}},"requestedCapabilities":["browser.control","workspace.manage","observation.read","action.input","artifact.read","event.read"],"launchMode":"embedded","limits":{"maxMessageBytes":1048576,"maxResultBytes":4194304}}}
|
|
109
114
|
```
|
|
110
115
|
|
|
111
116
|
The response returns the selected protocol, supported and granted
|
|
112
117
|
capabilities, executable and service versions, a process-stable Broker
|
|
113
118
|
identity, a Connection ID, browser candidates, and negotiated limits. Each
|
|
114
|
-
candidate has a stable `id`, product/channel
|
|
119
|
+
candidate has a stable `id`, product/channel and `userDataRoot`, aggregate
|
|
115
120
|
`state`, separate `processState`, `remoteDebuggingState`, and
|
|
116
121
|
`authorizationState`, plus structured `remediation` when action is needed.
|
|
117
122
|
Initialization succeeds when no candidate is ready, so a host can present setup
|
|
@@ -133,6 +138,13 @@ tab inventory and new-target operations. Protocol 1.0/1.1 clients retain their
|
|
|
133
138
|
existing tools; the Broker hides 1.2-only operations and rejects a manually
|
|
134
139
|
constructed Profile call with `protocol_incompatible`.
|
|
135
140
|
|
|
141
|
+
Protocol 1.3 adds the explicit `browser.profiles.identify` mutation and
|
|
142
|
+
structured Profile identity fields. Browser discovery returns `userDataRoot`
|
|
143
|
+
instead of the legacy candidate field `profile`, and tab inventory returns
|
|
144
|
+
`selected` instead of `active`. `selected` means the target selected by this
|
|
145
|
+
Lease; it does not describe Chrome foreground focus. Protocol 1.2 clients keep
|
|
146
|
+
the old field vocabulary and do not see the identity tool.
|
|
147
|
+
|
|
136
148
|
The initialize request and response use the service's fixed bootstrap limits.
|
|
137
149
|
The bridge switches limits only after the successful response has been written,
|
|
138
150
|
and waits for that switch before parsing a pipelined next line. Oversized
|
|
@@ -259,25 +271,36 @@ show another Chrome Allow dialog per Profile. `browser.tabs.list` returns every
|
|
|
259
271
|
eligible managed and user-opened tab across those contexts, each with an opaque
|
|
260
272
|
`profileContextId`. Existing tabs can be selected and controlled immediately;
|
|
261
273
|
Profile selection is routing for new managed targets, not a permission grant.
|
|
274
|
+
Browser-internal and extension-owned pages are excluded from ordinary tab and
|
|
275
|
+
Profile representative inventory.
|
|
262
276
|
|
|
263
|
-
Protocol 1.2 hosts should use this flow when creating independent work:
|
|
277
|
+
Protocol 1.2+ hosts should use this flow when creating independent work:
|
|
264
278
|
|
|
265
279
|
1. Call `browser.profiles.list`. It is passive and returns neutral labels,
|
|
266
280
|
bounded representative tabs, counts, and the Workspace selection.
|
|
267
|
-
2.
|
|
281
|
+
2. On protocol 1.3, if account-aware identity is needed, call
|
|
282
|
+
`browser.profiles.identify`. It briefly creates visible `chrome://version`
|
|
283
|
+
targets, verifies each reported path as an immediate child of the connected
|
|
284
|
+
`userDataRoot`, reads bounded Chrome Local State metadata, closes every
|
|
285
|
+
temporary target, and caches the result for one connection generation.
|
|
286
|
+
`refresh: true` explicitly re-probes.
|
|
287
|
+
3. If there is one Profile, `browser.open` can infer it. If there are several
|
|
268
288
|
and no current target or Workspace selection, ask the user which Profile to
|
|
269
289
|
use.
|
|
270
|
-
|
|
290
|
+
4. Call `browser.profiles.select` with the returned opaque ID, or pass that ID
|
|
271
291
|
directly as `browser.open.arguments.profileContextId`.
|
|
272
|
-
|
|
273
|
-
reconnect, relist Profiles, tabs, frames, and Observations.
|
|
274
|
-
|
|
275
|
-
Profile
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
292
|
+
5. Treat IDs and verified identity as scoped to the current browser connection
|
|
293
|
+
generation. After reconnect, relist Profiles, tabs, frames, and Observations.
|
|
294
|
+
|
|
295
|
+
Profile results use `identityStatus: unidentified | verified | unavailable`.
|
|
296
|
+
Only verified results may include `profileName`, `accountName`, `accountEmail`,
|
|
297
|
+
and `profileDirectory`; unavailable results include a stable
|
|
298
|
+
`identityErrorCode` rather than a guessed account. Current codes are
|
|
299
|
+
`profile_path_unavailable`, `profile_path_unverified`,
|
|
300
|
+
`local_state_unavailable`, and `profile_metadata_missing`. Never expose or persist raw
|
|
301
|
+
CDP context IDs. New-target routing uses an explicit call argument, the Lease's logical selected
|
|
279
302
|
target, the Workspace selection, or the only available context, in that order.
|
|
280
|
-
`browser.profiles.select` clears only the logical
|
|
303
|
+
`browser.profiles.select` clears only the logical selected-target anchor so its
|
|
281
304
|
selection applies to the next new managed target; it does not release control,
|
|
282
305
|
activate a user tab, or change Chrome focus.
|
|
283
306
|
|
|
@@ -598,7 +621,8 @@ The stdio `shutdown` method exits only that bridge and disconnects its Broker
|
|
|
598
621
|
Connection. The human `bp disconnect` command separately releases the one-shot
|
|
599
622
|
compatibility Workspace and requests daemon shutdown. The daemon accepts that
|
|
600
623
|
request only when the Broker process identity and executable installation
|
|
601
|
-
identity still match
|
|
624
|
+
identity still match, `embeddedConnections` is zero, and no other active Lease
|
|
625
|
+
remains. Otherwise it returns
|
|
602
626
|
`protocol_incompatible` or retryable `broker_in_use`; it never evicts an Agent
|
|
603
627
|
product to complete an upgrade.
|
|
604
628
|
|
|
@@ -626,9 +650,9 @@ pattern into their own integration and continue treating this document plus the
|
|
|
626
650
|
runtime manifest as authoritative.
|
|
627
651
|
|
|
628
652
|
The shared example launches an absolute executable path without a shell,
|
|
629
|
-
negotiates protocol 1.1 through 1.
|
|
653
|
+
negotiates protocol 1.1 through 1.3, discovers tools at runtime, and maps a host work scope
|
|
630
654
|
to a Workspace plus its active invocation to a renewable Lease. It never stores
|
|
631
|
-
|
|
655
|
+
a selected tab, frame, Observation, ref, credential, rule, Artifact, or event
|
|
632
656
|
cursor on disk. Host tool-call IDs become Command and idempotency identities;
|
|
633
657
|
transport loss after dispatch of a mutating operation is returned as
|
|
634
658
|
non-retryable `unknown_outcome`.
|
|
@@ -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
|
|
|
@@ -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.
|
|
@@ -93,9 +93,11 @@ Pilot. Tenon and OpenClaw are reference consumers only.
|
|
|
93
93
|
- [x] **A2.3** Replace global target/frame/session state with Workspace and
|
|
94
94
|
Lease state; provide a compatibility Workspace for one-shot CLI calls.
|
|
95
95
|
- Covers: FR-1, FR-3, AC-1, AC-3.
|
|
96
|
-
- Complete: the CLI
|
|
97
|
-
|
|
98
|
-
|
|
96
|
+
- Complete: the CLI derives a stable one-shot Connection identity from
|
|
97
|
+
`BROWSER_PILOT_CLIENT_KEY`/`--client-key`, plus an idempotently keyed
|
|
98
|
+
compatibility Workspace and renewable five-minute Lease. The default key
|
|
99
|
+
preserves single-Agent compatibility; distinct stable keys isolate Agents.
|
|
100
|
+
Every CLI command calls canonical tools; selected targets, frames, sessions,
|
|
99
101
|
Observations, refs, auth, rules, and request identity remain only in daemon
|
|
100
102
|
memory. No `state.json` or `refs.json` compatibility mapping remains.
|
|
101
103
|
- [x] **A2.4** Serialize commands through a per-target actor and implement
|
|
@@ -272,7 +274,8 @@ Pilot. Tenon and OpenClaw are reference consumers only.
|
|
|
272
274
|
version semantics. Health and schema-2 locator metadata expose the current
|
|
273
275
|
service, executable installation identity, protocol range, and bounded live
|
|
274
276
|
client counts. Protected compare-and-stop shutdown rejects mismatched
|
|
275
|
-
executables and returns `broker_in_use` while embedded Connections
|
|
277
|
+
executables and returns `broker_in_use` while embedded Connections or any
|
|
278
|
+
active Lease remains.
|
|
276
279
|
Owner-only version history retains only current/previous executable metadata
|
|
277
280
|
and no transient browser state. `BROWSER_PILOT_HOME` provides explicit
|
|
278
281
|
cross-platform isolation; incompatibility never triggers hidden replacement
|
|
@@ -290,7 +293,11 @@ Pilot. Tenon and OpenClaw are reference consumers only.
|
|
|
290
293
|
platform archives; macOS Developer ID/notarization and Windows Authenticode
|
|
291
294
|
hooks activate only with complete credentials, while unsigned/ad-hoc state
|
|
292
295
|
remains explicit. Release CI uses fixed official Node 22.17.0 native runners
|
|
293
|
-
and verifies every artifact before publishing it.
|
|
296
|
+
and verifies every artifact before publishing it. The supported native
|
|
297
|
+
matrix is Apple Silicon macOS, x64 Linux, and x64 Windows; Intel Mac is not
|
|
298
|
+
supported. A versioned release index binds these assets to the npm package,
|
|
299
|
+
exact Agent plugin/skill version, protocol range, and checksums, and GitHub
|
|
300
|
+
Release publication waits for npm publication.
|
|
294
301
|
|
|
295
302
|
### A7. Agent-neutral integration kit
|
|
296
303
|
|
|
@@ -318,6 +325,12 @@ Pilot. Tenon and OpenClaw are reference consumers only.
|
|
|
318
325
|
- [x] **A7.4** Update the Agent skill to teach direct one-shot use and embedded
|
|
319
326
|
stdio use without assuming a particular Agent runtime.
|
|
320
327
|
- Covers: FR-1, AC-1.
|
|
328
|
+
- Complete: the main skill is a bounded operating guide with progressive
|
|
329
|
+
command/stdio references, version-range CLI compatibility checking, stable
|
|
330
|
+
one-shot error recovery, explicit user-tab/Profile/tab-group boundaries,
|
|
331
|
+
local capture semantics, and generated Codex UI metadata. Release
|
|
332
|
+
verification and a machine-readable skill compatibility manifest prevent
|
|
333
|
+
silent CLI/skill version drift.
|
|
321
334
|
|
|
322
335
|
## Cross-Workstream Dependencies
|
|
323
336
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Browser Pilot v0.3.0 Stabilization Plan
|
|
2
2
|
|
|
3
|
-
Status: **
|
|
4
|
-
|
|
3
|
+
Status: **Complete**
|
|
4
|
+
Released baseline: `v0.3.0`, protocol `1.2`
|
|
5
5
|
|
|
6
6
|
## Goal
|
|
7
7
|
|
|
@@ -29,7 +29,7 @@ products depend on. No Agent-specific behavior enters Browser Pilot.
|
|
|
29
29
|
downloads, controlled Page-event ownership, browser-level completion paths,
|
|
30
30
|
and copy-only Artifacts. Verify unowned downloads are ignored and user source
|
|
31
31
|
files survive Artifact and Workspace cleanup.
|
|
32
|
-
- [x] Pass TypeScript,
|
|
32
|
+
- [x] Pass TypeScript, 277 Node, 109 Playwright, 13 stdio conformance, three
|
|
33
33
|
distribution-mode, and 13 host integration checks on the candidate source.
|
|
34
34
|
- [x] Publish `v0.3.0-rc.3` through trusted publishing and pass all 13 host
|
|
35
35
|
integration checks against the installed standalone release executable.
|
|
@@ -40,10 +40,19 @@ products depend on. No Agent-specific behavior enters Browser Pilot.
|
|
|
40
40
|
- [x] Publish `v0.3.0-rc.5` and verify text-targeted scrolling plus annotated
|
|
41
41
|
capture on GitHub. Managed cleanup preserved all user tabs but exposed a
|
|
42
42
|
transient closing-target inventory race.
|
|
43
|
-
- [
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
43
|
+
- [x] Publish `v0.3.0-rc.6` with generation-scoped managed-target tombstones.
|
|
44
|
+
The installed standalone returned `closed: 1, remaining: 6` immediately after
|
|
45
|
+
managed cleanup and left all six user tabs available, with no managed, busy,
|
|
46
|
+
controlled, or automatically active target.
|
|
47
|
+
- [x] Soak real Agent tasks through the installed candidates across multiple
|
|
48
|
+
Chrome Profiles: public GitHub reading, search, precise scrolling, screenshot
|
|
49
|
+
annotation, PDF export, a disposable form with verified input and submission,
|
|
50
|
+
and managed-only cleanup. User tabs and exported files were preserved.
|
|
51
|
+
- [x] Tag `v0.3.0`, publish a non-prerelease GitHub Release and npm
|
|
52
|
+
`latest=0.3.0`, and retain `next=0.3.0-rc.6` plus the local RC.6 standalone
|
|
53
|
+
as rollback paths. The installed stable executable connected through one
|
|
54
|
+
authorization request and repeated managed open/cleanup with
|
|
55
|
+
`closed: 1, remaining: 6`; all six user tabs remained available.
|
|
47
56
|
|
|
48
57
|
## Stable decision
|
|
49
58
|
|
|
@@ -54,3 +63,11 @@ an uncontrolled user tab. `v0.3.0-rc.2` must not be promoted. RC.3 preserves
|
|
|
54
63
|
Chrome's default download destination and creates an Artifact only after a
|
|
55
64
|
session-scoped Page event proves ownership and a browser-level completion event
|
|
56
65
|
provides the final path.
|
|
66
|
+
|
|
67
|
+
RC.4 through RC.6 then closed the remaining real-browser gaps in passive
|
|
68
|
+
connection status, text-targeted scroll verification, restrictive-CSP screenshot
|
|
69
|
+
annotation, and asynchronous managed-target closure. The published RC.6
|
|
70
|
+
standalone now satisfies every pre-stable source, distribution, Host, and live
|
|
71
|
+
Chrome gate above. The identical stable runtime passed the complete source and
|
|
72
|
+
distribution gates, published successfully on all three platforms, and passed
|
|
73
|
+
the installed user-Chrome smoke check.
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
# Browser Pilot 0.2.0
|
|
2
|
+
|
|
3
|
+
Browser Pilot 0.2.0 turns the original one-shot CLI into an Agent-neutral
|
|
4
|
+
browser control platform while preserving direct `bp` commands and the user's
|
|
5
|
+
real Chrome profile. It requires no browser extension.
|
|
6
|
+
|
|
7
|
+
## Highlights
|
|
8
|
+
|
|
9
|
+
- Adds a versioned `bridge --stdio` protocol for products embedding the
|
|
10
|
+
official executable, with runtime tool discovery and no required SDK or MCP
|
|
11
|
+
dependency.
|
|
12
|
+
- Adds a shared per-user Broker with isolated Workspaces, Leases, targets,
|
|
13
|
+
refs, network rules, auth state, events, and Artifacts for concurrent Agents.
|
|
14
|
+
- Lists and controls eligible user-opened tabs alongside Browser Pilot managed
|
|
15
|
+
tabs. Bulk cleanup and session release close only managed tabs.
|
|
16
|
+
- Makes Chrome discovery passive. Only an explicit `bp connect` or
|
|
17
|
+
`browser.connect` may request browser authorization, and concurrent requests
|
|
18
|
+
share one in-flight connection attempt without timer-driven retries.
|
|
19
|
+
- Replaces file-backed refs with ephemeral Observation-scoped identity across
|
|
20
|
+
browser generations, targets, frames, CDP sessions, loaders, and documents.
|
|
21
|
+
- Fuses accessibility, DOM, and layout information; supports Shadow DOM,
|
|
22
|
+
same-process frames, and OOPIFs with bounded output and typed stale-ref
|
|
23
|
+
failures.
|
|
24
|
+
- Adds verified click, input, keyboard, upload, scroll, and dropdown behavior,
|
|
25
|
+
including obstruction checks, controlled-input readback, and composite-action
|
|
26
|
+
cancellation when page state changes.
|
|
27
|
+
- Adds bounded read, search, DOM metadata, page geometry, annotated screenshot,
|
|
28
|
+
PDF, download Artifact, dialog, network interception, cookie, and HTTP auth
|
|
29
|
+
support.
|
|
30
|
+
- Adds typed browser events, disconnect/reconnect state, command idempotency,
|
|
31
|
+
deadlines, cancellation, unknown outcomes, event cursors, and protected
|
|
32
|
+
Artifact delivery.
|
|
33
|
+
- Adds npm, local project, and self-contained macOS, Linux, and Windows launch
|
|
34
|
+
modes plus a language-neutral stdio conformance suite and reference Tenon and
|
|
35
|
+
OpenClaw adapters.
|
|
36
|
+
|
|
37
|
+
## Upgrade Notes
|
|
38
|
+
|
|
39
|
+
- Chrome remote debugging must be enabled at
|
|
40
|
+
`chrome://inspect/#remote-debugging`.
|
|
41
|
+
- Browser authorization is explicit. Run `bp connect` once when Browser Pilot
|
|
42
|
+
reports that it is disconnected; ordinary discovery and bridge startup do
|
|
43
|
+
not prompt.
|
|
44
|
+
- Direct CLI behavior remains supported. Embedded products should launch the
|
|
45
|
+
pinned executable with `bridge --stdio` and depend only on the documented
|
|
46
|
+
protocol.
|
|
47
|
+
- Refs are intentionally transient. Obtain a fresh snapshot after navigation,
|
|
48
|
+
frame changes, reconnects, or `stale_ref` responses.
|
|
49
|
+
|
|
50
|
+
See the [platform specification](https://github.com/relixiaobo/browser-pilot/blob/v0.2.0/docs/architecture/browser-pilot-platform-spec.md),
|
|
51
|
+
[stdio integration contract](https://github.com/relixiaobo/browser-pilot/blob/v0.2.0/docs/integration/stdio-bridge.md),
|
|
52
|
+
and [conformance suite](https://github.com/relixiaobo/browser-pilot/blob/v0.2.0/docs/integration/stdio-conformance.md)
|
|
53
|
+
for the stable public contracts.
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
# Browser Pilot 0.2.1
|
|
2
|
+
|
|
3
|
+
This packaging-only patch adds the canonical GitHub repository metadata
|
|
4
|
+
required for npm Trusted Publishing provenance verification. Browser runtime,
|
|
5
|
+
protocol, CLI, and Agent integration behavior are unchanged from 0.2.0.
|
|
6
|
+
|
|
7
|
+
This is the first 0.2 stable version published through the package's GitHub
|
|
8
|
+
Actions OIDC Trusted Publisher. The npm package requires no long-lived publish
|
|
9
|
+
token, and its provenance identifies
|
|
10
|
+
`https://github.com/relixiaobo/browser-pilot` as the source repository.
|
|
11
|
+
|
|
12
|
+
See the [Browser Pilot 0.2.0 release](https://github.com/relixiaobo/browser-pilot/releases/tag/v0.2.0)
|
|
13
|
+
for the complete feature and upgrade notes.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Browser Pilot 0.2.2
|
|
2
|
+
|
|
3
|
+
This patch fixes executable ownership validation when a CLI command encounters
|
|
4
|
+
a compatible Broker started by another Browser Pilot installation.
|
|
5
|
+
|
|
6
|
+
The CLI now checks the Broker's executable version and identity before it
|
|
7
|
+
initializes its one-shot connection. A mismatched installation returns the
|
|
8
|
+
structured `protocol_incompatible` error without creating or changing Broker
|
|
9
|
+
session state. The executable that owns the Broker can therefore still shut it
|
|
10
|
+
down cleanly, which makes in-place upgrades deterministic and avoids a failed
|
|
11
|
+
command leaving the old Broker unusable.
|
|
12
|
+
|
|
13
|
+
Health responses from older compatible Brokers that do not expose executable
|
|
14
|
+
metadata remain supported. Current Brokers continue to enforce exact ownership
|
|
15
|
+
for protected shutdown.
|
|
16
|
+
|
|
17
|
+
Browser authorization, tab ownership, public protocol, and Agent integration
|
|
18
|
+
behavior are otherwise unchanged from 0.2.1.
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Browser Pilot 0.3.0
|
|
2
|
+
|
|
3
|
+
Browser Pilot 0.3.0 promotes the tested protocol 1.2 release candidate without
|
|
4
|
+
runtime changes. It provides Agent-neutral control of the user's real Chromium
|
|
5
|
+
browser through a CLI and a versioned stdio bridge, without a browser
|
|
6
|
+
extension.
|
|
7
|
+
|
|
8
|
+
## Universal Agent integration
|
|
9
|
+
|
|
10
|
+
- Agents with shell access can install or bundle the official executable and
|
|
11
|
+
use the one-shot `bp` commands.
|
|
12
|
+
- Long-lived Agent products can launch `browser-pilot bridge --stdio` and use
|
|
13
|
+
the same canonical browser tools, lifecycle, events, and Artifacts.
|
|
14
|
+
- One per-user Broker coordinates concurrent CLI and embedded clients through
|
|
15
|
+
isolated Connections, Workspaces, Leases, opaque target IDs, serialized
|
|
16
|
+
per-target commands, idempotency keys, deadlines, and event cursors.
|
|
17
|
+
- Browser Pilot contains no Tenon-, OpenClaw-, Codex-, or model-specific
|
|
18
|
+
behavior. Hosts adapt the public protocol rather than importing private
|
|
19
|
+
source modules.
|
|
20
|
+
|
|
21
|
+
## Real browser control
|
|
22
|
+
|
|
23
|
+
- Eligible tabs opened by the user are visible and explicitly controllable;
|
|
24
|
+
independently created managed tabs remain separately owned and
|
|
25
|
+
managed-only cleanup never closes or acquires a user tab.
|
|
26
|
+
- One authorized Chrome endpoint can expose several live Profiles. Agents can
|
|
27
|
+
inspect Profile context and route new managed work explicitly without
|
|
28
|
+
changing access to existing tabs.
|
|
29
|
+
- Observations fuse accessibility semantics with DOM state and geometry into
|
|
30
|
+
bounded, page-scoped numbered refs. Navigation, frame, document, target, and
|
|
31
|
+
Lease changes invalidate stale refs deterministically.
|
|
32
|
+
- Dedicated tools cover navigation, reading, targeted search, DOM queries,
|
|
33
|
+
click, verified native input, keyboard operations, scrolling, dropdowns,
|
|
34
|
+
frames, dialogs, uploads, cookies, HTTP authentication, and bounded network
|
|
35
|
+
observation or interception.
|
|
36
|
+
- Screenshots and PDFs are returned as protected Artifacts through stdio and
|
|
37
|
+
can be exported to explicit local paths through the CLI. Annotated
|
|
38
|
+
screenshots render in an isolated world and work on restrictive-CSP sites.
|
|
39
|
+
- Completed controlled downloads are copied into protected Artifacts while the
|
|
40
|
+
user's original Chrome download remains in place.
|
|
41
|
+
|
|
42
|
+
## Reliability and isolation
|
|
43
|
+
|
|
44
|
+
- Passive browser discovery never requests authorization. Concurrent explicit
|
|
45
|
+
connects share one in-flight connection attempt instead of multiplying
|
|
46
|
+
Chrome prompts.
|
|
47
|
+
- User-tab control is exclusive between unrelated Agent Leases and transfers
|
|
48
|
+
only through explicit release or cleanup.
|
|
49
|
+
- Browser restart advances the connection generation and invalidates old
|
|
50
|
+
Profile, target, session, frame, and Observation identities.
|
|
51
|
+
- Managed target identity remains generation-scoped while Chrome finishes an
|
|
52
|
+
asynchronous close, preventing a closing managed tab from briefly appearing
|
|
53
|
+
as a user tab.
|
|
54
|
+
- Action results include browser evidence and typed mismatch or unknown-outcome
|
|
55
|
+
states so an Agent can inspect before retrying a possibly mutating command.
|
|
56
|
+
|
|
57
|
+
## Validation
|
|
58
|
+
|
|
59
|
+
The published RC.6 standalone passed real multi-Profile Chrome tasks covering
|
|
60
|
+
public GitHub reading, search, precise text scrolling, restrictive-CSP
|
|
61
|
+
annotation, screenshot and PDF export, verified disposable form input and
|
|
62
|
+
submission, and managed-only cleanup. All six pre-existing user tabs remained
|
|
63
|
+
available and none was acquired during cleanup.
|
|
64
|
+
|
|
65
|
+
The stable source passed TypeScript checking, 277 Node tests, 109 isolated
|
|
66
|
+
Playwright tests, all three npm distribution modes, 13 stdio conformance checks,
|
|
67
|
+
and 13 isolated multi-Host integration checks. The stable version keeps the
|
|
68
|
+
same protocol 1.2 and runtime behavior as `v0.3.0-rc.6`.
|