sam-4screen-desktop 2026-9-14:13:3:7
This commit is contained in:
@@ -153,8 +153,9 @@ Direct browser control of your real Chrome via CDP (vendored from npm `pi-browse
|
||||
| **Placement** | **Per-project** via `/config-add ext pi-browser-harness` (active in `pi-browser_testing`) |
|
||||
| **Runtime deps** | `ws` only — **sharp dropped from optionalDeps** (libvips/libheif CVEs; screenshots work without auto-resize). `@mariozechner/pi-coding-agent` is dev-only (loader aliases to bundled runtime). vet scan: 0 critical/0 high/0 other on production tree; npm audit clean |
|
||||
| **Security model** | Agent gets access to your real Chrome session — the most powerful & least sandboxed option. Prefer a throwaway profile for untrusted pages. Chrome needs **remote debugging enabled**: `chrome://inspect/#remote-debugging` → tick Allow (per-session toggle) **or** relaunch once with `google-chrome --remote-debugging-port=9222` (persistent, and required to let the harness open its own window) |
|
||||
| **Prereqs** | Chrome installed & running (only `.27` has Chrome today; `.13` none; `.51` laptop offline). Daemon socket: `/tmp/pi-browser-daemon.sock` |
|
||||
| **Other machines** | `git -C ~/.agents pull` → `/config-add ext pi-browser-harness` → `/reload` → Chrome running with debug enabled → `/browser-setup` |
|
||||
| **Prereqs** | Chrome installed & running. Finder: daemon reads `DevToolsActivePort` in profile dirs → probes port 9222 → `BU_CDP_WS`/`BU_CDP_PORTS` env overrides. Daemon socket: `/tmp/pi-browser-daemon.sock` |
|
||||
| **Machine status** | `.27` ✅ installed + active (windowed Chrome, `chrome://inspect` toggle). `.51` ✅ Chrome + deps + extension pulled — **required `npm install` in the extension dir** (node_modules is gitignored) then `/browser-setup`. `.13` ✅ Chrome installed (home.nix `google-chrome`), **headless server mode** — see below |
|
||||
| **Headless Chrome on .13** (no GUI session needed) | `pkill -f "headless=new"` then `google-chrome --headless=new --remote-debugging-port=9222 --user-data-dir=$HOME/.chrome-pi &` — **Chrome 136+ REFUSES remote-debugging on the default data dir**, so `.chrome-pi` (or any custom dir) is required. One-off only: dies on ctrl-c/reboot (wrap in a systemd user service for persistence; paseo can also ensure it, but dies with paseo). Verify: `ss -tlnp \| grep 9222` → LISTEN. Confirmed working 2026-09-14 |
|
||||
| **Known quirks** | With the `chrome://inspect` *toggle* (not the launch flag), the harness cannot open its own window for the pinned profile — fix by relaunching Chrome with `--remote-debugging-port=9222`, or clear the profile selection to use whichever window exists. The daemon discovers Chrome via `DevToolsActivePort` files / port 9222 / `BU_CDP_WS` |
|
||||
| **Obsidian research** | Assessment of this + 4 other browser options (incl. camofox): [[AI Tools to try]] · Outline collection `Pi Browser Harness` · AGENT.md in `pi-browser_testing` |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user