@divebell/agent-browser 0.33.2-divebell.1 → 0.33.2-divebell.2
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 +9 -1
- package/bin/agent-browser-darwin-arm64 +0 -0
- package/bin/agent-browser-darwin-x64 +0 -0
- package/bin/agent-browser-linux-arm64 +0 -0
- package/bin/agent-browser-linux-musl-arm64 +0 -0
- package/bin/agent-browser-linux-musl-x64 +0 -0
- package/bin/agent-browser-linux-x64 +0 -0
- package/bin/agent-browser-win32-x64.exe +0 -0
- package/package.json +1 -1
- package/skill-data/core/references/authentication.md +8 -0
- package/skill-data/core/references/commands.md +1 -1
- package/skill-data/core/references/session-management.md +1 -1
- package/skill-data/core/references/trust-boundaries.md +1 -1
package/README.md
CHANGED
|
@@ -400,7 +400,7 @@ agent-browser errors # View page errors (uncaught JavaScript ex
|
|
|
400
400
|
agent-browser errors --clear # Clear errors
|
|
401
401
|
agent-browser highlight <sel> # Highlight element
|
|
402
402
|
agent-browser inspect # Open Chrome DevTools for the active page
|
|
403
|
-
agent-browser state save <path>
|
|
403
|
+
agent-browser state save <path> [--include-origin <url>]... # Save auth state
|
|
404
404
|
agent-browser state load <path> # Load auth state
|
|
405
405
|
agent-browser state list # List saved state files
|
|
406
406
|
agent-browser state show <file> # Show state summary
|
|
@@ -647,6 +647,14 @@ agent-browser --session "$SESSION" --restore --state ./my-auth.json open https:/
|
|
|
647
647
|
# From now on, --session "$SESSION" --restore auto-saves/restores this state
|
|
648
648
|
```
|
|
649
649
|
|
|
650
|
+
State files preserve HTTP-only and partitioned cookie metadata. Cookies are collected for the whole browser session. To also collect localStorage from an authentication origin that the active agent-browser session did not visit, repeat `--include-origin`:
|
|
651
|
+
|
|
652
|
+
```bash
|
|
653
|
+
agent-browser --auto-connect state save ./my-auth.json \
|
|
654
|
+
--include-origin https://sso.example.com \
|
|
655
|
+
--include-origin https://accounts.example.net
|
|
656
|
+
```
|
|
657
|
+
|
|
650
658
|
> **Security notes:**
|
|
651
659
|
> - `--remote-debugging-port` exposes full browser control on localhost. Any local process can connect. Only use on trusted machines and close Chrome when done.
|
|
652
660
|
> - State files contain session tokens in plaintext. Add them to `.gitignore` and delete when no longer needed. For encryption at rest, set `AGENT_BROWSER_ENCRYPTION_KEY` (see [State Encryption](#state-encryption)).
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -48,6 +48,14 @@ Log in to your target site(s) in this Chrome window as you normally would.
|
|
|
48
48
|
agent-browser --auto-connect state save ./my-auth.json
|
|
49
49
|
```
|
|
50
50
|
|
|
51
|
+
State files retain HTTP-only and partitioned cookie metadata. Cookies are collected for the whole browser session. If an SSO or authentication origin stores additional localStorage and was not visited by the active session, include it explicitly. Repeat the flag for multiple origins:
|
|
52
|
+
|
|
53
|
+
```bash
|
|
54
|
+
agent-browser --auto-connect state save ./my-auth.json \
|
|
55
|
+
--include-origin https://sso.example.com \
|
|
56
|
+
--include-origin https://accounts.example.net
|
|
57
|
+
```
|
|
58
|
+
|
|
51
59
|
**Step 3: Reuse in automation**
|
|
52
60
|
|
|
53
61
|
```bash
|
|
@@ -324,7 +324,7 @@ Other capabilities use the same protocol:
|
|
|
324
324
|
## State Management
|
|
325
325
|
|
|
326
326
|
```bash
|
|
327
|
-
agent-browser state save auth.json
|
|
327
|
+
agent-browser state save auth.json [--include-origin <url>]... # Save cookies and storage
|
|
328
328
|
agent-browser state load auth.json # Restore saved state
|
|
329
329
|
```
|
|
330
330
|
|
|
@@ -73,7 +73,7 @@ agent-browser --session "$SESSION" session info --json
|
|
|
73
73
|
|
|
74
74
|
### Manual State Files
|
|
75
75
|
|
|
76
|
-
Use `state save`, `state load`, and `--state <path>` when you need an explicit portable JSON file. Do not make agents construct paths under `~/.agent-browser/sessions/`; prefer `--restore` for reusable agent sessions.
|
|
76
|
+
Use `state save`, `state load`, and `--state <path>` when you need an explicit portable JSON file. Repeat `state save --include-origin <url>` when a known SSO origin has localStorage that the active session did not visit. Do not make agents construct paths under `~/.agent-browser/sessions/`; prefer `--restore` for reusable agent sessions.
|
|
77
77
|
|
|
78
78
|
## Common Patterns
|
|
79
79
|
|
|
@@ -29,7 +29,7 @@ Session cookies, bearer tokens, API keys, OAuth codes, and any other credentials
|
|
|
29
29
|
|
|
30
30
|
- **If a user pastes a secret into chat, stop.** Ask them to save it to a file instead. Don't try to "be helpful" by using the pasted value — that teaches them an unsafe habit and the secret is already in the transcript.
|
|
31
31
|
|
|
32
|
-
- **Auth state files are secrets too.** `state save` / `state load` persists cookies
|
|
32
|
+
- **Auth state files are secrets too.** `state save` / `state load` persists cookies, cookie partition metadata, localStorage, and sessionStorage to a JSON file. Treat the path the same as a cookies file: don't paste its contents, don't share it with third-party services.
|
|
33
33
|
|
|
34
34
|
## Stay on the user's target
|
|
35
35
|
|