pilot_auth
Save browser session state to a JSON file to reuse authentication across sessions, or load and clear saved sessions. Useful for skipping re-login and transferring credentials.
Instructions
Save, load, or clear browser session state (cookies + localStorage + sessionStorage) to/from a JSON file. Use when the user wants to authenticate once and reuse credentials across sessions, skip re-login flows, or transfer session state between runs. Complement to pilot_import_cookies — use pilot_auth for Pilot-managed state, pilot_import_cookies for one-time import from a real browser.
Parameters:
action: "save" — write current session to file; "load" — restore session from file; "clear" — clear cookies and storage from browser
path: File path to save or load (e.g., "~/.pilot/github.json"). Required for save/load actions.
Returns:
save: Count of cookies saved and the file path.
load: Count of cookies restored.
clear: Confirmation that cookies and storage were cleared.
Errors:
"Session file not found": The path does not exist. Run with action="save" first.
"Browser not launched": Navigate to a URL first to initialize the browser.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| action | Yes | Action to perform | |
| path | No | File path to save or load session state (e.g., "~/.pilot/session.json") |