browser-pilot 0.0.5 → 0.0.7

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 CHANGED
@@ -403,6 +403,45 @@ Output:
403
403
 
404
404
  Run `bp actions` for complete action reference.
405
405
 
406
+ ### Recording Browser Actions
407
+
408
+ Record human interactions to create automation recipes:
409
+
410
+ ```bash
411
+ # Auto-connect to local Chrome and record (creates new session)
412
+ bp record
413
+
414
+ # Use most recent session
415
+ bp record -s
416
+
417
+ # Use specific session with custom output file
418
+ bp record -s my-session -f login-flow.json
419
+
420
+ # Review and edit the recording
421
+ cat recording.json
422
+
423
+ # Replay the recording
424
+ bp exec -s my-session --file recording.json
425
+ ```
426
+
427
+ The output format is compatible with `page.batch()`:
428
+ ```json
429
+ {
430
+ "recordedAt": "2026-01-06T10:00:00.000Z",
431
+ "startUrl": "https://example.com",
432
+ "duration": 15000,
433
+ "steps": [
434
+ { "action": "fill", "selector": ["[data-testid=\"email\"]", "#email"], "value": "user@example.com" },
435
+ { "action": "click", "selector": ["[data-testid=\"submit\"]", "#login-btn"] }
436
+ ]
437
+ }
438
+ ```
439
+
440
+ **Notes:**
441
+ - Password fields are automatically redacted as `[REDACTED]`
442
+ - Selectors are multi-selector arrays ordered by reliability (data attributes > IDs > CSS paths)
443
+ - Edit the JSON to adjust selectors or add `optional: true` flags
444
+
406
445
  ## Examples
407
446
 
408
447
  ### Login Flow with Error Handling
@@ -1,5 +1,5 @@
1
- import { P as Page, S as Step, B as BatchOptions, b as BatchResult } from './types-DQhA8uQZ.cjs';
2
- export { A as ActionType, c as StepResult } from './types-DQhA8uQZ.cjs';
1
+ import { P as Page, S as Step, B as BatchOptions, b as BatchResult } from './types-TVlTA7nH.cjs';
2
+ export { A as ActionType, c as StepResult } from './types-TVlTA7nH.cjs';
3
3
  import './client-7Nqka5MV.cjs';
4
4
 
5
5
  /**
package/dist/actions.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { P as Page, S as Step, B as BatchOptions, b as BatchResult } from './types-DKz34hii.js';
2
- export { A as ActionType, c as StepResult } from './types-DKz34hii.js';
1
+ import { P as Page, S as Step, B as BatchOptions, b as BatchResult } from './types-CbdmaocU.js';
2
+ export { A as ActionType, c as StepResult } from './types-CbdmaocU.js';
3
3
  import './client-7Nqka5MV.js';
4
4
 
5
5
  /**
package/dist/browser.cjs CHANGED
@@ -1134,6 +1134,13 @@ var Page = class {
1134
1134
  this.cdp = cdp;
1135
1135
  this.batchExecutor = new BatchExecutor(this);
1136
1136
  }
1137
+ /**
1138
+ * Get the underlying CDP client for advanced operations.
1139
+ * Use with caution - prefer high-level Page methods when possible.
1140
+ */
1141
+ get cdpClient() {
1142
+ return this.cdp;
1143
+ }
1137
1144
  /**
1138
1145
  * Initialize the page (enable required CDP domains)
1139
1146
  */
@@ -1,7 +1,7 @@
1
1
  import { C as CDPClient } from './client-7Nqka5MV.cjs';
2
2
  import { C as ConnectOptions } from './types-D_uDqh0Z.cjs';
3
- import { P as Page } from './types-DQhA8uQZ.cjs';
4
- export { d as ActionOptions, e as ActionResult, C as ConsoleHandler, f as ConsoleMessage, g as ConsoleMessageType, h as CustomSelectConfig, D as Dialog, i as DialogHandler, j as DialogType, k as Download, E as ElementInfo, l as ElementNotFoundError, m as EmulationState, n as ErrorHandler, F as FileInput, o as FillOptions, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, p as NetworkIdleOptions, q as PageError, r as PageSnapshot, s as SnapshotNode, t as SubmitOptions, T as TimeoutError, u as TypeOptions, U as UserAgentMetadata, v as UserAgentOptions, V as ViewportOptions, W as WaitForOptions } from './types-DQhA8uQZ.cjs';
3
+ import { P as Page } from './types-TVlTA7nH.cjs';
4
+ export { d as ActionOptions, e as ActionResult, C as ConsoleHandler, f as ConsoleMessage, g as ConsoleMessageType, h as CustomSelectConfig, D as Dialog, i as DialogHandler, j as DialogType, k as Download, E as ElementInfo, l as ElementNotFoundError, m as EmulationState, n as ErrorHandler, F as FileInput, o as FillOptions, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, p as NetworkIdleOptions, q as PageError, r as PageSnapshot, s as SnapshotNode, t as SubmitOptions, T as TimeoutError, u as TypeOptions, U as UserAgentMetadata, v as UserAgentOptions, V as ViewportOptions, W as WaitForOptions } from './types-TVlTA7nH.cjs';
5
5
 
6
6
  /**
7
7
  * Browser class - manages CDP connection and pages
package/dist/browser.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { C as CDPClient } from './client-7Nqka5MV.js';
2
2
  import { C as ConnectOptions } from './types-D_uDqh0Z.js';
3
- import { P as Page } from './types-DKz34hii.js';
4
- export { d as ActionOptions, e as ActionResult, C as ConsoleHandler, f as ConsoleMessage, g as ConsoleMessageType, h as CustomSelectConfig, D as Dialog, i as DialogHandler, j as DialogType, k as Download, E as ElementInfo, l as ElementNotFoundError, m as EmulationState, n as ErrorHandler, F as FileInput, o as FillOptions, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, p as NetworkIdleOptions, q as PageError, r as PageSnapshot, s as SnapshotNode, t as SubmitOptions, T as TimeoutError, u as TypeOptions, U as UserAgentMetadata, v as UserAgentOptions, V as ViewportOptions, W as WaitForOptions } from './types-DKz34hii.js';
3
+ import { P as Page } from './types-CbdmaocU.js';
4
+ export { d as ActionOptions, e as ActionResult, C as ConsoleHandler, f as ConsoleMessage, g as ConsoleMessageType, h as CustomSelectConfig, D as Dialog, i as DialogHandler, j as DialogType, k as Download, E as ElementInfo, l as ElementNotFoundError, m as EmulationState, n as ErrorHandler, F as FileInput, o as FillOptions, G as GeolocationOptions, I as InteractiveElement, N as NavigationError, p as NetworkIdleOptions, q as PageError, r as PageSnapshot, s as SnapshotNode, t as SubmitOptions, T as TimeoutError, u as TypeOptions, U as UserAgentMetadata, v as UserAgentOptions, V as ViewportOptions, W as WaitForOptions } from './types-CbdmaocU.js';
5
5
 
6
6
  /**
7
7
  * Browser class - manages CDP connection and pages
package/dist/browser.mjs CHANGED
@@ -5,7 +5,7 @@ import {
5
5
  Page,
6
6
  TimeoutError,
7
7
  connect
8
- } from "./chunk-NP56KSAN.mjs";
8
+ } from "./chunk-PCNEJAJ7.mjs";
9
9
  import "./chunk-BCOZUKWS.mjs";
10
10
  import "./chunk-R3PS4PCM.mjs";
11
11
  import "./chunk-6RB3GKQP.mjs";
@@ -471,6 +471,13 @@ var Page = class {
471
471
  this.cdp = cdp;
472
472
  this.batchExecutor = new BatchExecutor(this);
473
473
  }
474
+ /**
475
+ * Get the underlying CDP client for advanced operations.
476
+ * Use with caution - prefer high-level Page methods when possible.
477
+ */
478
+ get cdpClient() {
479
+ return this.cdp;
480
+ }
474
481
  /**
475
482
  * Initialize the page (enable required CDP domains)
476
483
  */