browser-pilot-cli 0.1.5 → 0.2.1
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/LICENSE +21 -0
- package/README.md +193 -27
- package/dist/cli.js +3885 -846
- package/dist/daemon.js +13749 -145
- package/dist/managed-target-janitor.js +490 -0
- package/docs/architecture/browser-pilot-platform-spec.md +965 -0
- package/docs/integration/stdio-bridge.md +614 -0
- package/docs/integration/stdio-conformance.md +51 -0
- package/docs/plans/browser-capability-evolution.md +410 -0
- package/docs/plans/universal-agent-integration.md +337 -0
- package/package.json +39 -6
- package/scripts/run-stdio-conformance.mjs +698 -0
- package/dist/chunk-77SA2ZLI.js +0 -18
- package/dist/defuddle-bundle-B7XUXIMB.js +0 -7
|
@@ -0,0 +1,410 @@
|
|
|
1
|
+
# Browser Capability and Reliability Evolution Plan
|
|
2
|
+
|
|
3
|
+
Status: **Implemented through B7**
|
|
4
|
+
Source of truth: `docs/architecture/browser-pilot-platform-spec.md`
|
|
5
|
+
Workstream: B
|
|
6
|
+
|
|
7
|
+
## Goal
|
|
8
|
+
|
|
9
|
+
Improve Browser Pilot's page understanding, frame correctness, action
|
|
10
|
+
reliability, event production, and Agent guidance using validated ideas from
|
|
11
|
+
browser-use while preserving Browser Pilot's controlled target model, network
|
|
12
|
+
capabilities, real-profile behavior, and CLI workflow.
|
|
13
|
+
|
|
14
|
+
Research baseline: browser-use commit
|
|
15
|
+
`24e96d35a5f94794130a06b0e4b1acdeefc4a23f`.
|
|
16
|
+
|
|
17
|
+
## Adopt, Adapt, and Reject
|
|
18
|
+
|
|
19
|
+
Adopt or adapt:
|
|
20
|
+
|
|
21
|
+
- DOM + AX + DOMSnapshot fusion.
|
|
22
|
+
- CDP-session-aware element identity.
|
|
23
|
+
- Visible quads and occlusion checks.
|
|
24
|
+
- Checkbox/radio post-click verification.
|
|
25
|
+
- React/Vue/contenteditable input readback.
|
|
26
|
+
- Remaining-action cancellation after page, frame, focus, or document change.
|
|
27
|
+
- Typed browser watchdog events.
|
|
28
|
+
- Guidance for autocomplete, modals, filters, 403 responses, and loops.
|
|
29
|
+
- Multiple bounded page representations: interactive refs, readable text,
|
|
30
|
+
targeted text search, DOM metadata, and annotated screenshots.
|
|
31
|
+
- First-class page/container scrolling and verified native/custom dropdown
|
|
32
|
+
operations.
|
|
33
|
+
- Repeated-action detection that also checks whether bounded page state changed.
|
|
34
|
+
|
|
35
|
+
Do not copy:
|
|
36
|
+
|
|
37
|
+
- Automatic acceptance of confirm or beforeunload dialogs.
|
|
38
|
+
- Cloud browser, captcha, or hosted-session architecture.
|
|
39
|
+
- A concurrency model that treats the user's Chrome as one globally shared
|
|
40
|
+
Agent browser.
|
|
41
|
+
- Agent-framework-specific history, memory, or model prompting internals.
|
|
42
|
+
|
|
43
|
+
Preserve Browser Pilot advantages:
|
|
44
|
+
|
|
45
|
+
- Network observe/block/mock/header operations.
|
|
46
|
+
- HTTP auth, cookies, PDF, and explicit Pilot windows.
|
|
47
|
+
- Concise URL/read/snapshot/eval guidance for direct CLI Agents.
|
|
48
|
+
|
|
49
|
+
## Delivery Order
|
|
50
|
+
|
|
51
|
+
### B0. Establish baselines and shared contracts
|
|
52
|
+
|
|
53
|
+
- [x] **B0.1** Record browser-use ideas to adopt, adapt, and reject.
|
|
54
|
+
- Covers: FR-8, AC-8.
|
|
55
|
+
- [x] **B0.2** Build a fixture matrix for AX-only, DOM-only, shadow DOM,
|
|
56
|
+
same-origin iframe, cross-origin/OOPIF, overlays, contenteditable, React
|
|
57
|
+
controlled input, navigation, and document replacement.
|
|
58
|
+
- Covers: AC-8.
|
|
59
|
+
- Complete: a reusable local fixture catalog defines every listed scenario
|
|
60
|
+
with bounded explicit signals and no third-party dependency. Isolated
|
|
61
|
+
system-Chrome tests verify AX-vs-DOM semantics, open Shadow DOM, overlay hit
|
|
62
|
+
testing, rich editing, asynchronous controlled-input rollback, same-origin
|
|
63
|
+
frames, a forced cross-origin OOPIF target, top-level navigation, and same-URL
|
|
64
|
+
Document replacement. The compatibility fixture server exposes the same
|
|
65
|
+
catalog for later public-surface regression tests.
|
|
66
|
+
- [x] **B0.3** Freeze Observation v1 public fields, internal node identity,
|
|
67
|
+
invalidation reasons, limits, and truncation metadata with Workstream A.
|
|
68
|
+
- Covers: BR-13 through BR-16, NFR-1.
|
|
69
|
+
- Complete: runtime constants and canonical schemas now define the public
|
|
70
|
+
fields, deterministic truncation reasons, field/aggregate/depth/UTF-8 byte
|
|
71
|
+
limits, TTL, and capacity. Internal resolution binds process, browser
|
|
72
|
+
generation, Workspace, Lease, target, CDP session, frame, loader, Document
|
|
73
|
+
backend identity, and backend node. Same-context `stale_ref` errors expose a
|
|
74
|
+
stable invalidation reason while ownership mismatches remain opaque. Direct
|
|
75
|
+
CLI snapshots now preserve truncation metadata as additive JSON fields.
|
|
76
|
+
- A0 decision: `document_replaced` is an additive optional
|
|
77
|
+
`stale_ref.context.reason` under protocol 1.0 and 1.1. Older clients already
|
|
78
|
+
branch on `stale_ref` and rebuild state; no capability or version change is
|
|
79
|
+
required.
|
|
80
|
+
- [x] **B0.4** Add quantitative baselines: observable target recall, false
|
|
81
|
+
interactable rate, action verification failures, stale-ref detection, and
|
|
82
|
+
output size.
|
|
83
|
+
- Covers: FR-8.
|
|
84
|
+
- Complete: a versioned, local-only system-Chrome corpus now measures all ten
|
|
85
|
+
capability fixtures through Browser Pilot Observations, including selected
|
|
86
|
+
same-process and OOPIF frames. The recorded v1 baseline is 10/10 actionable
|
|
87
|
+
target recall, 2/12 false interactable refs, 2/2 expected action failures
|
|
88
|
+
detected, 2/2 same-document stale refs detected, and an initial 208-byte
|
|
89
|
+
maximum normalized Observation sample. B7 intentionally added bounded page
|
|
90
|
+
geometry and re-baselined that maximum at 426 bytes, still far below the
|
|
91
|
+
2 MiB protocol budget. Ground truth uses only public role/name pairs;
|
|
92
|
+
ephemeral origins, selectors, and CDP identity are excluded.
|
|
93
|
+
|
|
94
|
+
### B1. Build the observation engine
|
|
95
|
+
|
|
96
|
+
- [x] **B1.1** Collect DOMSnapshot layout and frame metadata alongside AX
|
|
97
|
+
nodes, without exposing raw page dumps to the Agent.
|
|
98
|
+
- Covers: BR-16, CON-5.
|
|
99
|
+
- Complete: every Observation now captures DOMSnapshot documents, shared
|
|
100
|
+
strings, frame/document relationships, backend-node identity, attributes,
|
|
101
|
+
browser clickable state, form state, computed display/visibility/opacity/
|
|
102
|
+
pointer behavior, layout bounds, and paint order in an ephemeral internal
|
|
103
|
+
index. Raw DOMSnapshot data, attributes, selectors, layout, and CDP IDs are
|
|
104
|
+
never returned or persisted.
|
|
105
|
+
- [x] **B1.2** Fuse AX semantics, DOM attributes, layout bounds, visibility,
|
|
106
|
+
editability, and form state into normalized observable elements.
|
|
107
|
+
- Covers: AC-8.
|
|
108
|
+
- Complete: AX role/name/value remain authoritative while DOM facts fill
|
|
109
|
+
missing names, values, checked state, autocomplete state, and modal
|
|
110
|
+
ancestry. Visible browser-marked clickable nodes absent from the semantic
|
|
111
|
+
AX surface become bounded DOM-only controls in stable document order.
|
|
112
|
+
Hidden, zero-layout, disabled, readonly, inert, and duplicate candidates
|
|
113
|
+
are excluded. Unit and isolated system-Chrome fixtures cover AX-only,
|
|
114
|
+
DOM-only, hidden/disabled controls, Shadow DOM, contenteditable, and
|
|
115
|
+
controlled-input readback without changing Observation v1 fields.
|
|
116
|
+
- [x] **B1.3** Preserve Shadow DOM traversal and add session-aware frame/OOPIF
|
|
117
|
+
traversal with deterministic ordering.
|
|
118
|
+
- Covers: AC-8.
|
|
119
|
+
- Complete: frame discovery now recursively joins same-process frame trees
|
|
120
|
+
with descendant OOPIF targets in stable parent-first order while excluding
|
|
121
|
+
iframe targets owned by other tabs. Observations, refs, actions, reads,
|
|
122
|
+
evaluation, uploads, captures, dialogs, network handling, continuity, and
|
|
123
|
+
invalidation use the selected frame's actual CDP session. Same-process
|
|
124
|
+
pointer coordinates are translated through the live frame-owner content
|
|
125
|
+
box; OOPIF roots remain frame-local. Child sessions are detached and their
|
|
126
|
+
state invalidated on navigation, detach, Lease release, reconnect, and
|
|
127
|
+
target teardown.
|
|
128
|
+
- [x] **B1.4** Add explicit element/page/text limits and truncation reasons;
|
|
129
|
+
keep output lean enough for Agent context.
|
|
130
|
+
- Covers: BR-16, NFR-1.
|
|
131
|
+
- Complete: Observation v1 enforces field and aggregate text limits, requested
|
|
132
|
+
and absolute element limits, AX tree depth, and a 2 MiB UTF-8 serialized
|
|
133
|
+
data budget. It emits canonical reasons in deterministic order, stores only
|
|
134
|
+
returned refs, and preserves the metadata through both Broker results and
|
|
135
|
+
additive direct-CLI JSON fields.
|
|
136
|
+
|
|
137
|
+
### B2. Replace ref storage and resolution
|
|
138
|
+
|
|
139
|
+
- [x] **B2.1** Move refs out of `~/.browser-pilot/refs.json` into ephemeral,
|
|
140
|
+
Workspace-scoped Observation records.
|
|
141
|
+
- Covers: FR-3, BR-13.
|
|
142
|
+
- Complete: Broker and direct CLI calls use the same bounded in-memory
|
|
143
|
+
Observation records scoped by Workspace, Lease, target, session, loader,
|
|
144
|
+
and browser generation. The file-backed ref store has been removed.
|
|
145
|
+
- [x] **B2.2** Resolve refs using browser generation, target, CDP session,
|
|
146
|
+
frame, loader, backend node, and document generation.
|
|
147
|
+
- Covers: BR-13 through BR-15.
|
|
148
|
+
- Complete: Observations bind and validate browser process and
|
|
149
|
+
connection generation, Workspace, Lease, target, CDP session, selected
|
|
150
|
+
frame, loader, Document backend identity, and per-ref backend node before
|
|
151
|
+
live-node resolution. Direct CLI refs resolve through the compatibility
|
|
152
|
+
Workspace's latest live Observation rather than a separate mapping.
|
|
153
|
+
- [x] **B2.3** Hard-invalidate on navigation, loader replacement, frame/session
|
|
154
|
+
detach, target detach, and reconnect, emitting typed reasons.
|
|
155
|
+
- Covers: BR-14, AC-5.
|
|
156
|
+
- Complete: every listed lifecycle, including browser generation restoration,
|
|
157
|
+
invalidates Broker and CLI refs with a typed `stale_ref` result.
|
|
158
|
+
- [x] **B2.4** Revalidate live nodes after same-document mutation and return
|
|
159
|
+
`stale_ref` instead of acting on a changed semantic target.
|
|
160
|
+
- Covers: BR-15, AC-8.
|
|
161
|
+
- Complete: ref-based click, type, and upload now resolve the original
|
|
162
|
+
backend node and revalidate its connected state plus the same AX-first,
|
|
163
|
+
DOM-fallback role/name identity used by Observation. Ordinary controls use
|
|
164
|
+
a targeted partial AX query; AX-name fallbacks and DOM-only controls use a
|
|
165
|
+
current DOMSnapshot and retain browser clickability checks. A removed node,
|
|
166
|
+
changed role/name, or lost DOM-only clickability returns the existing
|
|
167
|
+
`stale_ref` without a new protocol reason, browser identity, or semantic
|
|
168
|
+
text in the error. Only that ref fails: the Observation and its unchanged
|
|
169
|
+
refs remain usable. Broker tools and compatibility CLI actions now execute
|
|
170
|
+
the same canonical validator path.
|
|
171
|
+
|
|
172
|
+
### B3. Make actions verifiable
|
|
173
|
+
|
|
174
|
+
- [x] **B3.1** Before pointer actions, verify current bounds, viewport
|
|
175
|
+
intersection, hit-test target, enabled state, and obstruction.
|
|
176
|
+
- Covers: AC-8.
|
|
177
|
+
- Complete: ref clicks now scroll and revalidate connected layout, viewport
|
|
178
|
+
intersection, native/ARIA disabled state, and multiple hit-test points
|
|
179
|
+
across visible client rects. Descendant, associated-label, and shadow-host
|
|
180
|
+
hits are accepted; detached refs return `stale_ref`, while non-interactable
|
|
181
|
+
refs return bounded `action_not_verified` reasons before any pointer event.
|
|
182
|
+
Explicit coordinate clicks remain the low-level escape hatch.
|
|
183
|
+
- [x] **B3.2** After click, verify expected checkbox, radio, selection, focus,
|
|
184
|
+
dialog, navigation, popup, or document effects where observable.
|
|
185
|
+
- Covers: AC-8.
|
|
186
|
+
- Complete: click results now contain bounded typed evidence for native and
|
|
187
|
+
ARIA checked, selected, pressed, expanded, and composed focus state. The
|
|
188
|
+
Broker merges loader/URL changes, normalized Observation differences,
|
|
189
|
+
dialog openings, and attributable popup creation without exposing raw CDP
|
|
190
|
+
IDs. Expected checkbox/radio/option state failures report `mismatch`;
|
|
191
|
+
coordinate and otherwise unobservable clicks report `unavailable`.
|
|
192
|
+
- [x] **B3.3** Unify input behavior for native fields, controlled React/Vue
|
|
193
|
+
fields, and contenteditable; read back the effective value/content.
|
|
194
|
+
- Covers: AC-8.
|
|
195
|
+
- Complete: text controls, email/number controls, and contenteditable now use
|
|
196
|
+
Chrome's native editing path with trusted, cancelable input semantics;
|
|
197
|
+
date/time/color/range controls use a bounded value path without emitting an
|
|
198
|
+
early `change`. Targets are classified and rejected before dispatch when
|
|
199
|
+
detached, disabled, readonly, inert, or unsupported. Final readback detects
|
|
200
|
+
framework acceptance, synchronous/asynchronous rollback, browser
|
|
201
|
+
sanitization, and editor interception. Password evidence contains lengths
|
|
202
|
+
only, deep open-Shadow-DOM focus is readable, and keyboard clear uses
|
|
203
|
+
Chrome's `SelectAll` editing command.
|
|
204
|
+
- [x] **B3.4** Return typed action evidence and failure reasons instead of
|
|
205
|
+
reporting success solely because CDP dispatch completed.
|
|
206
|
+
- Covers: command reliability contract.
|
|
207
|
+
- Complete: click, type, keyboard, press, and upload results use bounded
|
|
208
|
+
discriminated evidence. Press combines focused-backend-node control changes
|
|
209
|
+
with Broker-owned navigation, document, dialog, and popup signals. Upload
|
|
210
|
+
verifies the selected file count and browser filename after dispatch.
|
|
211
|
+
Unsupported effects report `unavailable`; observable wrong states report
|
|
212
|
+
`mismatch`; exact machine input can raise `action_not_verified`. Legacy CLI
|
|
213
|
+
output remains compatible.
|
|
214
|
+
- [x] **B3.5** Stop any remaining composite action steps when target, frame,
|
|
215
|
+
focus, loader, or document generation changes unexpectedly.
|
|
216
|
+
- Covers: BR-10 through BR-12, AC-5.
|
|
217
|
+
- Complete: Broker and compatibility CLI actions create the same isolated
|
|
218
|
+
CDP continuity guard. It pins target/session ownership, browser generation,
|
|
219
|
+
selected frame, loader, and Document identity; type/keyboard additionally
|
|
220
|
+
pin deep composed focus. Checks run between clear, delete, per-character
|
|
221
|
+
keyboard input, and submit. Pre-mutation changes return retryable
|
|
222
|
+
`action_not_verified`; partial mutations preserve a structured
|
|
223
|
+
`unknown_outcome`, stop all remaining steps, and are never replayed.
|
|
224
|
+
|
|
225
|
+
### B4. Produce typed browser events and recovery state
|
|
226
|
+
|
|
227
|
+
- [x] **B4.1** Normalize CDP events into the BrowserEvent taxonomy for
|
|
228
|
+
navigation, document, target, popup, dialog, download, connection, and
|
|
229
|
+
observation invalidation.
|
|
230
|
+
- Covers: event contract, NFR-3.
|
|
231
|
+
- Complete: navigation, document change, target attach/detach and control,
|
|
232
|
+
managed popup, dialog, Observation invalidation, Command status, and Lease
|
|
233
|
+
expiry, sanitized Workspace network, scoped download, and browser connection
|
|
234
|
+
recovery producers are connected.
|
|
235
|
+
- [x] **B4.2** Add watchdogs for browser disconnect, stalled navigation,
|
|
236
|
+
detached frames, unhandled dialogs, and repeated no-progress actions.
|
|
237
|
+
- Covers: FR-5, FR-8.
|
|
238
|
+
- Complete: WebSocket loss emits connection state and leaves the browser
|
|
239
|
+
disconnected. Selected-profile endpoint metadata refreshes passively, while
|
|
240
|
+
only an explicit `browser.connect` can establish another WebSocket. Navigation timeouts return structured
|
|
241
|
+
`unknown_outcome`; selected-frame detach clears frame state; pending dialogs
|
|
242
|
+
emit a bounded reminder without auto-response; and browser-observable action
|
|
243
|
+
evidence drives a Lease/target-scoped no-progress streak. Timers and streaks
|
|
244
|
+
are transient, cleaned up with their owning resources, and never expose raw
|
|
245
|
+
CDP IDs, refs, typed text, or credentials.
|
|
246
|
+
- [x] **B4.3** Replace dialog auto-accept with explicit pending state and
|
|
247
|
+
accept/dismiss commands.
|
|
248
|
+
- Covers: DEC-5.
|
|
249
|
+
- Complete: daemon auto-accept is removed; pending Broker dialogs are
|
|
250
|
+
Lease/target scoped and use explicit list/respond tools without target-actor
|
|
251
|
+
deadlock. One-shot CLI calls use an isolated explicit list/respond path.
|
|
252
|
+
- [x] **B4.4** Ensure event producers are deterministic under target actor
|
|
253
|
+
serialization and reconnect generations.
|
|
254
|
+
- Covers: NFR-4.
|
|
255
|
+
- Complete: Browser events and Command records carry their source connection
|
|
256
|
+
generation. The Broker fences queued commands before dispatch and completed
|
|
257
|
+
results after execution, retains old-generation Command terminal and
|
|
258
|
+
reconnect cleanup events, and drops delayed ordinary CDP events from retired
|
|
259
|
+
generations. Target inventory refreshes serialize per Workspace and verify
|
|
260
|
+
their generation before applying an awaited snapshot. Tests cover same-target
|
|
261
|
+
ordering, cross-target interleaving, reconnect races, and stale inventory.
|
|
262
|
+
|
|
263
|
+
### B5. Improve Agent-facing guidance and data handling
|
|
264
|
+
|
|
265
|
+
- [x] **B5.1** Add structured hints for autocomplete, modal overlays, filters,
|
|
266
|
+
blocked/403 pages, login transitions, downloads, and repeated action loops.
|
|
267
|
+
- Covers: FR-8.
|
|
268
|
+
- Complete: Observation results now contain a bounded discriminated `hints`
|
|
269
|
+
array derived from DOM/AX signals without collecting page text or input
|
|
270
|
+
values. Authentication transitions are scoped to the live target session
|
|
271
|
+
and selected frame. Main-document 403/429, target-session download states,
|
|
272
|
+
and the no-progress threshold publish the same Agent-neutral hint contract
|
|
273
|
+
in events; subresource failures are excluded. Refs, reason text, counts,
|
|
274
|
+
and arrays are bounded, and focused tests cover all hint variants.
|
|
275
|
+
- A0 decision: this is an optional additive output field under protocol 1.0
|
|
276
|
+
and 1.1, with no new capability. It exposes no operation and derives only
|
|
277
|
+
data already covered by `observation.read` or `event.read`; older clients
|
|
278
|
+
ignore unknown response fields and older executors may omit it.
|
|
279
|
+
- [x] **B5.2** Mark passwords, cookies, auth, network bodies, uploads,
|
|
280
|
+
downloads, screenshots, and selected page text with sensitivity metadata.
|
|
281
|
+
- Covers: CON-5.
|
|
282
|
+
- Complete: the canonical tool schemas now carry validated
|
|
283
|
+
`x-browser-pilot-sensitivity` annotations on selected page text,
|
|
284
|
+
Observation element values, auth fields, cookie values, network
|
|
285
|
+
headers/bodies, upload Artifact references, prompt text, and eval content.
|
|
286
|
+
Tool-level possible classifications must cover every field annotation.
|
|
287
|
+
Password-capable Observation results declare `credential`; existing
|
|
288
|
+
password action evidence remains value-free and reports only `sensitive`
|
|
289
|
+
plus bounded lengths. Artifacts and events retain their runtime sensitivity.
|
|
290
|
+
- A0 decision: field annotations are additive schema metadata under protocol
|
|
291
|
+
1.0 and 1.1 and do not change argument or result value shapes. No new
|
|
292
|
+
capability is required; older clients ignore the annotation, while updated
|
|
293
|
+
adapters propagate it when constructing model content.
|
|
294
|
+
- [x] **B5.3** Return model-sized screenshot previews and original Artifacts
|
|
295
|
+
through Workstream A's Artifact service.
|
|
296
|
+
- Covers: BR-20, AC-6.
|
|
297
|
+
- Complete: large machine captures return a Chrome-scaled preview by default
|
|
298
|
+
and an optional original with an explicit `previewOf` relationship.
|
|
299
|
+
- [x] **B5.4** Update the universal skill with decision guidance grounded in
|
|
300
|
+
actual tool errors and state, not framework-specific prompts.
|
|
301
|
+
- Covers: FR-1, FR-8.
|
|
302
|
+
- Complete: the Agent-neutral skill now separates direct one-shot CLI use
|
|
303
|
+
from embedded stdio integration, starts from current tab/page state, uses
|
|
304
|
+
fresh refs, verifies action results, and gives explicit recovery decisions
|
|
305
|
+
for structured evidence, hints, stable errors, events, reconnects, dialogs,
|
|
306
|
+
and Artifacts. Command guidance now reflects all-tab inventory, explicit
|
|
307
|
+
dialog handling, managed-only bulk cleanup, and actual local capture output.
|
|
308
|
+
It names no Agent framework in its runtime decisions and adds no adapter or
|
|
309
|
+
prompt-specific production behavior.
|
|
310
|
+
|
|
311
|
+
### B6. Reliability and regression gates
|
|
312
|
+
|
|
313
|
+
- [x] **B6.1** Add deterministic fixture tests for every B0.2 scenario and
|
|
314
|
+
every invalidation transition.
|
|
315
|
+
- Covers: AC-3, AC-5, AC-8.
|
|
316
|
+
- Complete: the local system-Chrome benchmark manifest is exhaustively tied
|
|
317
|
+
to all ten B0.2 scenarios and observes same-process frames and OOPIFs through
|
|
318
|
+
their actual session models. A canonical transition matrix exhaustively
|
|
319
|
+
covers all twelve Observation invalidation reasons and asserts the typed
|
|
320
|
+
owner-visible `stale_ref` result. Expiry now preserves its `expired` reason
|
|
321
|
+
for the owning context while remaining opaque across Workspace boundaries.
|
|
322
|
+
- [x] **B6.2** Add action verification tests for obstruction, checkbox/radio,
|
|
323
|
+
controlled inputs, contenteditable, focus loss, popup, and navigation.
|
|
324
|
+
- Covers: AC-8.
|
|
325
|
+
- Complete: isolated system-Chrome tests cover trusted controlled-input
|
|
326
|
+
events and rollback, canceled `beforeinput`, native email/number selection,
|
|
327
|
+
nested contenteditable replacement/append, blocked fields, special value
|
|
328
|
+
controls, native checkbox and radio click success plus prevented-default
|
|
329
|
+
mismatch, Shadow DOM readback, keyboard clear, press effects, upload
|
|
330
|
+
readback, real obstruction, and composite focus loss. Public tool-surface
|
|
331
|
+
tests verify typed obstruction failure, loader replacement cancellation,
|
|
332
|
+
and merged navigation, Document, dialog, and popup evidence for click and
|
|
333
|
+
press actions.
|
|
334
|
+
- [x] **B6.3** Add real-site canaries that report drift without making release
|
|
335
|
+
tests depend on third-party availability.
|
|
336
|
+
- Covers: FR-8.
|
|
337
|
+
- Complete: the existing real-site suite now preflights its third-party host,
|
|
338
|
+
marks transport availability failures explicitly, and treats missing
|
|
339
|
+
expected controls as drift instead of silently skipping behavior. An
|
|
340
|
+
Agent-neutral reporter writes a bounded versioned JSON report that
|
|
341
|
+
distinguishes `healthy`, `drift`, `unavailable`, and runner `error` states.
|
|
342
|
+
`npm run test:canary` is non-blocking, strict mode remains available, and
|
|
343
|
+
the deterministic release command does not execute the canary project.
|
|
344
|
+
- [x] **B6.4** Compare metrics against B0.4 and reject changes that increase
|
|
345
|
+
unsafe false-positive interactions or unbounded output.
|
|
346
|
+
- Covers: NFR-1, AC-8.
|
|
347
|
+
- Complete: `npm run test:capabilities` compares the live isolated-Chrome
|
|
348
|
+
report with the versioned B0.4 baseline using directional gates. Recall,
|
|
349
|
+
action-failure detection, and stale-ref detection may increase; the false
|
|
350
|
+
interactable rate may decrease. Corpus drift, unclassified refs, any metric
|
|
351
|
+
regression, output growth beyond the recorded maximum, or violation of the
|
|
352
|
+
protocol byte budget fails the gate.
|
|
353
|
+
|
|
354
|
+
### B7. Add adaptive page primitives from browser-use
|
|
355
|
+
|
|
356
|
+
- [x] **B7.1** Add bounded visible-text search and bounded CSS element
|
|
357
|
+
inspection as distinct page representations.
|
|
358
|
+
- Complete: `browser.search` returns at most 200 visible matches with nearby
|
|
359
|
+
context and viewport geometry. `browser.elements.find` returns at most 200
|
|
360
|
+
safe metadata records and only explicitly requested attributes. Both can
|
|
361
|
+
traverse open Shadow DOM, expose no DOM/CDP handles, and use the existing
|
|
362
|
+
`observation.read` capability.
|
|
363
|
+
- [x] **B7.2** Add first-class scrolling with fresh page state.
|
|
364
|
+
- Complete: `browser.scroll` supports page, selector, Observation ref, text,
|
|
365
|
+
relative distance, and start/end boundaries. It returns typed evidence and
|
|
366
|
+
a fresh Observation whose optional `page` block reports viewport/document
|
|
367
|
+
dimensions, scroll position, remaining pixels, and percentages.
|
|
368
|
+
- [x] **B7.3** Add native and ARIA dropdown inspection and selection.
|
|
369
|
+
- Complete: native selects enumerate bounded options, emit input/change, and
|
|
370
|
+
verify browser state. Custom controls use trusted ref clicks, refresh the
|
|
371
|
+
Observation after opening, and select only an option ref from that fresh
|
|
372
|
+
state. No framework-specific selectors or persistent handles were added.
|
|
373
|
+
- [x] **B7.4** Add screenshot annotations without changing the page.
|
|
374
|
+
- Complete: viewport capture can revalidate up to 200 refs from one
|
|
375
|
+
Observation, read live geometry, and draw numbered boxes on an unattached
|
|
376
|
+
canvas in a Chrome isolated world. Screenshot bytes are never evaluated in
|
|
377
|
+
the page's default world. Full-page/selector combinations fail explicitly,
|
|
378
|
+
output remains a protected Artifact, and tests assert the page DOM is unchanged.
|
|
379
|
+
- [x] **B7.5** Detect repeated identical actions against stagnant page state.
|
|
380
|
+
- Complete: action signatures and bounded page fingerprints remain internal.
|
|
381
|
+
Three repeated actions without a fingerprint change emit the existing
|
|
382
|
+
`watchdog.no_progress` event and `repeated_action` hint with reason
|
|
383
|
+
`stagnant_page`; action parameters, typed values, page text, and hashes are
|
|
384
|
+
not exposed.
|
|
385
|
+
- [x] **B7.6** Keep the additions Agent-neutral and backward compatible.
|
|
386
|
+
- Complete: one-shot CLI commands and Broker `tools/list` share the canonical
|
|
387
|
+
implementations. The tools reuse existing capabilities and are additive
|
|
388
|
+
for protocol 1.0/1.1. Multi-action queues, LLM extraction, planning, and
|
|
389
|
+
memory remain Host-Agent responsibilities.
|
|
390
|
+
|
|
391
|
+
## Parallel Work Rules
|
|
392
|
+
|
|
393
|
+
- B1 can proceed while A1 extracts service modules, provided it targets the
|
|
394
|
+
agreed Observation interface rather than Commander handlers.
|
|
395
|
+
- B2 must use A2 Workspace target control and may not introduce another
|
|
396
|
+
persistent ref store.
|
|
397
|
+
- B3 depends on the per-target ordering boundary from A2.4 but its pure action
|
|
398
|
+
verification logic and fixtures can be developed earlier.
|
|
399
|
+
- B4 event producers can run in parallel with A4 transport delivery.
|
|
400
|
+
- B5 Artifact work integrates only after A5 defines storage and authorization.
|
|
401
|
+
- Any proposed public field or error change returns to A0 contract review and
|
|
402
|
+
receives a version/capability decision before implementation.
|
|
403
|
+
|
|
404
|
+
## Release Gate
|
|
405
|
+
|
|
406
|
+
Workstream B is complete only when AC-8 passes through the public tool surface,
|
|
407
|
+
all existing CLI/network tests remain green, stale refs fail closed across
|
|
408
|
+
targets and frames, action success includes evidence, output is bounded, and no
|
|
409
|
+
adopted browser-use behavior weakens Browser Pilot's ManagedTabSet,
|
|
410
|
+
Workspace/Lease isolation, target-control, Host policy, or dialog rules.
|