browser-pilot-cli 0.3.0 → 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.
@@ -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, optional verified display metadata, bounded
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 its display name. Reconnect invalidates every ProfileContext ID.
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. Failures include a stable
354
- machine code in addition to compatible human guidance. One-shot processes use
355
- a fixed daemon-internal Connection, idempotently keyed Workspace, and renewable
356
- Lease with a maximum five-minute TTL. Normal process exit leaves that transient
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 live
362
- embedded Connection remains; otherwise it returns `protocol_incompatible` or
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 active target, the Workspace selection, or a
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.select` updates only the owning Workspace. A Chrome
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 active-target anchor; it
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:** The Pilot window visibly identifies the controlling client without
583
- injecting mutable content into the page DOM.
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 remain excluded.
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. Unverified names are
611
- omitted instead of guessed.
612
- - **BR-31:** New-target Profile routing follows explicit context, active target,
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, active targets, frames, auth, rules, and close operations cannot cross
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":2}},"requestedCapabilities":["browser.control","workspace.manage","observation.read","action.input","artifact.read","event.read"],"launchMode":"embedded","limits":{"maxMessageBytes":1048576,"maxResultBytes":4194304}}}
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/profile identity, aggregate
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. If there is one Profile, `browser.open` can infer it. If there are several
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
- 3. Call `browser.profiles.select` with the returned opaque ID, or pass that ID
290
+ 4. Call `browser.profiles.select` with the returned opaque ID, or pass that ID
271
291
  directly as `browser.open.arguments.profileContextId`.
272
- 4. Treat IDs as scoped to the current browser connection generation. After
273
- reconnect, relist Profiles, tabs, frames, and Observations.
274
-
275
- Profile names are included only when Browser Pilot has verified them without a
276
- visible discovery tab; otherwise hosts present the neutral label and
277
- representative page titles/URLs. Never expose or persist raw CDP context IDs.
278
- New-target routing uses an explicit call argument, the Lease's logical active
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 active-target anchor so its
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 and `embeddedConnections` is zero. Otherwise it returns
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.2, discovers tools at runtime, and maps a host work scope
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
- an active tab, frame, Observation, ref, credential, rule, Artifact, or event
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.3.0`, protocol `1.2`
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
- - an optional verified display name and Profile directory;
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 display name are resolved
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 active-target
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 active target context;
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, an active target remains an unambiguous anchor.
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.2, while the Broker continues to accept
170
- 1.0 and 1.1.
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, active-target, Workspace, and single-context resolution follow the
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 uses a fixed daemon-internal one-shot Connection plus
97
- idempotently keyed compatibility Workspace and renewable five-minute Lease.
98
- Every CLI command calls canonical tools; active targets, frames, sessions,
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 remain.
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: **In progress**
4
- Candidate baseline: `v0.3.0-rc.6`; release target: `v0.3.0`, protocol `1.2`
3
+ Status: **Complete**
4
+ Released baseline: `v0.3.0`, protocol `1.2`
5
5
 
6
6
  ## Goal
7
7
 
@@ -48,7 +48,11 @@ products depend on. No Agent-specific behavior enters Browser Pilot.
48
48
  Chrome Profiles: public GitHub reading, search, precise scrolling, screenshot
49
49
  annotation, PDF export, a disposable form with verified input and submission,
50
50
  and managed-only cleanup. User tabs and exported files were preserved.
51
- - [ ] Tag `v0.3.0`, publish npm `latest`, and verify upgrade/rollback metadata.
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.
52
56
 
53
57
  ## Stable decision
54
58
 
@@ -64,4 +68,6 @@ RC.4 through RC.6 then closed the remaining real-browser gaps in passive
64
68
  connection status, text-targeted scroll verification, restrictive-CSP screenshot
65
69
  annotation, and asynchronous managed-target closure. The published RC.6
66
70
  standalone now satisfies every pre-stable source, distribution, Host, and live
67
- Chrome gate above. Stable publication remains a separate explicit release step.
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,62 @@
1
+ # Browser Pilot 0.4.0
2
+
3
+ Browser Pilot 0.4.0 introduces protocol 1.3 while preserving protocol 1.0-1.2
4
+ compatibility and the extension-free browser control model.
5
+
6
+ ## Profile identity
7
+
8
+ - `browser.profiles.list` remains passive and returns neutral, connection-scoped
9
+ Profile contexts without opening or attaching to identity pages.
10
+ - New `browser.profiles.identify` explicitly creates temporary visible
11
+ `chrome://version` targets, verifies the reported Profile path against the
12
+ connected browser `userDataRoot`, reads bounded Chrome Local State metadata,
13
+ and proves cleanup before returning.
14
+ - Results distinguish `unidentified`, `verified`, and `unavailable`, with
15
+ structured Profile/account fields and stable failure codes. Identity is
16
+ cached only for one browser connection generation.
17
+ - `bp profiles --identify [--refresh]` exposes the same behavior. Profile and
18
+ tab selectors are one-based and may use a uniquely verified Profile name,
19
+ account name, or email address.
20
+
21
+ ## Agent isolation and vocabulary
22
+
23
+ - Direct one-shot CLI Agents can set a stable `BROWSER_PILOT_CLIENT_KEY` or
24
+ `--client-key`; different keys receive distinct Principal, Connection,
25
+ Workspace, and Lease state while repeated calls with one key reuse it.
26
+ - `bp disconnect` releases only its CLI namespace and cannot stop a Broker that
27
+ still has another active Lease or embedded Connection.
28
+ - Protocol 1.3 browser discovery uses `userDataRoot` instead of the ambiguous
29
+ legacy candidate field `profile`.
30
+ - Protocol 1.3 tab inventory uses `selected` for the Lease-local target instead
31
+ of `active`, which could be mistaken for Chrome foreground focus.
32
+
33
+ ## Page and target isolation
34
+
35
+ - Browser Pilot no longer injects a controller overlay or other status UI into
36
+ page DOM. Embedding Hosts may present returned controller identity in
37
+ Host-owned UI.
38
+ - Chrome and Edge extension pages are excluded from ordinary tab inventory and
39
+ Profile context evidence.
40
+ - Existing eligible user tabs remain fully controllable; managed-only cleanup
41
+ still leaves user tabs open.
42
+
43
+ ## Embedding
44
+
45
+ - The Tenon/OpenClaw-neutral reference adapter negotiates protocol 1.3 and
46
+ discovers the identity operation through the canonical runtime manifest.
47
+ - One-shot CLI, embedded stdio, local Artifact export, native image results,
48
+ and protocol 1.0-1.2 compatibility remain supported without a Native SDK,
49
+ MCP server, or browser extension.
50
+
51
+ ## CLI and distribution contract
52
+
53
+ - Every non-TTY one-shot failure now includes stable `code` and `retryable`
54
+ fields. Commander/parser and local input errors use `invalid_argument`, while
55
+ Broker errors preserve their protocol code and structured remediation.
56
+ - The versioned Agent plugin/skill records CLI `0.4.0` as its tested/minimum
57
+ version and accepts backward-compatible updates within the declared range. It
58
+ includes Codex UI metadata plus a machine-readable compatibility manifest.
59
+ - GitHub releases publish the plugin archive and checksum alongside a release
60
+ index that verifies the npm version, protocol range, and every native asset.
61
+ - Native targets are Apple Silicon macOS, x64 Linux, and x64 Windows. Intel Mac
62
+ is not supported and no `darwin-x64` asset is published.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "browser-pilot-cli",
3
- "version": "0.3.0",
3
+ "version": "0.4.0",
4
4
  "description": "CLI tool to control your browser via Chrome DevTools Protocol",
5
5
  "repository": "https://github.com/relixiaobo/browser-pilot",
6
6
  "type": "module",
@@ -14,6 +14,11 @@
14
14
  "build:standalone:js": "tsup --config tsup.standalone.config.ts",
15
15
  "build:standalone": "npm run build:standalone:js && node scripts/build-standalone.mjs",
16
16
  "package:standalone": "node scripts/package-standalone.mjs",
17
+ "package:agent-plugin": "node scripts/package-agent-plugin.mjs",
18
+ "package:release-index": "node scripts/build-release-index.mjs",
19
+ "release:sync-version": "node scripts/sync-release-version.mjs",
20
+ "release:check-version": "node scripts/sync-release-version.mjs --check",
21
+ "version": "node scripts/sync-release-version.mjs",
17
22
  "verify:standalone": "node scripts/verify-standalone.mjs",
18
23
  "dev": "tsup --watch",
19
24
  "start": "node dist/cli.js",
@@ -44,13 +49,7 @@
44
49
  "docs/plans/profile-context-routing.md",
45
50
  "docs/plans/v0.3.0-stabilization.md",
46
51
  "docs/plans/universal-agent-integration.md",
47
- "docs/releases/v0.3.0-rc.1.md",
48
- "docs/releases/v0.3.0-rc.2.md",
49
- "docs/releases/v0.3.0-rc.3.md",
50
- "docs/releases/v0.3.0-rc.4.md",
51
- "docs/releases/v0.3.0-rc.5.md",
52
- "docs/releases/v0.3.0-rc.6.md",
53
- "docs/releases/v0.3.0.md",
52
+ "docs/releases/",
54
53
  "README.md",
55
54
  "LICENSE"
56
55
  ],