browser-pilot 0.0.16 → 0.0.18
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 +39 -0
- package/dist/actions.cjs +797 -69
- package/dist/actions.d.cts +101 -4
- package/dist/actions.d.ts +101 -4
- package/dist/actions.mjs +17 -1
- package/dist/{browser-ZCR6AA4D.mjs → browser-GHQRYU4R.mjs} +2 -2
- package/dist/browser.cjs +1366 -72
- package/dist/browser.d.cts +230 -6
- package/dist/browser.d.ts +230 -6
- package/dist/browser.mjs +37 -5
- package/dist/{chunk-EZNZ72VA.mjs → chunk-ASEIFKKV.mjs} +126 -0
- package/dist/{chunk-TJ5B56NV.mjs → chunk-FSB25GRR.mjs} +129 -1
- package/dist/chunk-MIJ7UIKB.mjs +96 -0
- package/dist/{chunk-6GBYX7C2.mjs → chunk-MRY3HRFJ.mjs} +799 -353
- package/dist/chunk-OIHU7OFY.mjs +91 -0
- package/dist/{chunk-NNEHWWHL.mjs → chunk-SW52ALBD.mjs} +588 -5
- package/dist/{chunk-V3VLBQAM.mjs → chunk-ZDODXEBD.mjs} +586 -69
- package/dist/cli.mjs +784 -176
- package/dist/combobox-RAKBA2BW.mjs +6 -0
- package/dist/index.cjs +1669 -71
- package/dist/index.d.cts +58 -7
- package/dist/index.d.ts +58 -7
- package/dist/index.mjs +192 -3
- package/dist/{page-IUUTJ3SW.mjs → page-SD64DY3F.mjs} +1 -1
- package/dist/providers.cjs +127 -0
- package/dist/providers.d.cts +38 -3
- package/dist/providers.d.ts +38 -3
- package/dist/providers.mjs +3 -1
- package/dist/{types-BzM-IfsL.d.ts → types-B_v62K7C.d.ts} +146 -2
- package/dist/{types-DeVSWhXj.d.cts → types-D2pJQpWs.d.cts} +7 -1
- package/dist/{types-DeVSWhXj.d.ts → types-D2pJQpWs.d.ts} +7 -1
- package/dist/{types-BflRmiDz.d.cts → types-Yuybzq53.d.cts} +146 -2
- package/dist/upload-E6MCC2OF.mjs +6 -0
- package/package.json +10 -3
package/README.md
CHANGED
|
@@ -12,6 +12,7 @@ Browser Pilot now teaches one workflow model:
|
|
|
12
12
|
|
|
13
13
|
- inspect the page
|
|
14
14
|
- act in the browser
|
|
15
|
+
- review structured business state
|
|
15
16
|
- record a manual workflow
|
|
16
17
|
- trace behavior over time
|
|
17
18
|
- exercise voice/media and browser conditions
|
|
@@ -52,16 +53,22 @@ Legacy/manual fallback still works with a separate debug profile:
|
|
|
52
53
|
| Job | Primary commands |
|
|
53
54
|
| --- | --- |
|
|
54
55
|
| Inspect page state | `snapshot`, `page`, `forms`, `text`, `targets`, `diagnose` |
|
|
56
|
+
| Review structured state | `review` |
|
|
55
57
|
| Act in the browser | `exec`, `run` |
|
|
56
58
|
| Capture a human demo | `record` |
|
|
57
59
|
| Investigate behavior over time | `trace` |
|
|
58
60
|
| Exercise voice/media | `audio` |
|
|
59
61
|
| Change browser conditions | `env` |
|
|
60
62
|
|
|
63
|
+
Start with `bp --help` to see the routed command tree and `bp --version` to confirm the CLI build.
|
|
64
|
+
|
|
65
|
+
Use `bp snapshot -i` to find clickable/fillable refs, `bp text` for long-form copy, `bp review` for structured business outcomes, and `bp diagnose` when targeting fails. Use `bp eval` only as an escape hatch.
|
|
66
|
+
|
|
61
67
|
## Golden path 1: automate a page
|
|
62
68
|
|
|
63
69
|
```bash
|
|
64
70
|
bp connect --name dev
|
|
71
|
+
bp exec -s dev '{"action":"goto","url":"https://example.com"}'
|
|
65
72
|
bp snapshot -i -s dev
|
|
66
73
|
bp exec -s dev '[
|
|
67
74
|
{"action":"fill","selector":"ref:e5","value":"user@example.com"},
|
|
@@ -72,6 +79,21 @@ bp exec -s dev '[
|
|
|
72
79
|
|
|
73
80
|
Use `bp snapshot -i` first. Refs are the default targeting strategy.
|
|
74
81
|
|
|
82
|
+
For reading or verification after actions:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
bp text -s dev --selector main
|
|
86
|
+
bp review -s dev --json
|
|
87
|
+
bp diagnose -s dev 'submit'
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
Best practices from real usage:
|
|
91
|
+
|
|
92
|
+
- `bp page` is a compact overview. It caches the refs it shows, but use `bp snapshot -i` when you need the full actionable list.
|
|
93
|
+
- On commerce and content-heavy sites, scope reading with `bp text --selector main` to avoid nav, drawers, and footer noise.
|
|
94
|
+
- `bp review` works best on confirmations, detail pages, tables, alerts, and key-value layouts. It is usually the wrong first read on catalog grids.
|
|
95
|
+
- After `bp trace start`, begin with `bp trace summary --view session` before narrower views like `console` or `ws`.
|
|
96
|
+
|
|
75
97
|
## Golden path 2: capture a manual workflow and derive automation
|
|
76
98
|
|
|
77
99
|
```bash
|
|
@@ -121,6 +143,23 @@ bp env visibility hidden -s realtime
|
|
|
121
143
|
- `listen` preserved as a compatibility alias to `trace tail`
|
|
122
144
|
- `audio` for active control, `trace` for explanation, `env` for browser-state controls
|
|
123
145
|
|
|
146
|
+
## Cloud provider
|
|
147
|
+
|
|
148
|
+
When local Chrome is not available, [Browser Use](https://browser-use.com) is the recommended cloud provider:
|
|
149
|
+
|
|
150
|
+
```bash
|
|
151
|
+
BROWSER_USE_API_KEY=bu_... bp connect --provider browser-use
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
```typescript
|
|
155
|
+
const browser = await connect({
|
|
156
|
+
provider: 'browser-use',
|
|
157
|
+
apiKey: process.env.BROWSER_USE_API_KEY,
|
|
158
|
+
});
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
See [Providers](./docs/providers.md) for BrowserBase, Browserless, and other options.
|
|
162
|
+
|
|
124
163
|
## Programmatic example
|
|
125
164
|
|
|
126
165
|
```typescript
|