Files
collective-memory-repo/shared/long-term/decisions/browser-endpoints-mac5-mac7.md
2026-03-18 14:56:50 +08:00

82 lines
2.6 KiB
Markdown

# Browser endpoints registry for mac-5 takeover and mac-7 automation
Date: 2026-03-18
Status: accepted
## Purpose
Record the currently validated browser control endpoints so future automation and browser takeover tasks can reuse the right path without re-discovering ports.
## mac-5 local intelligent browser takeover
Use OpenClaw local browser attach on mac-5 for takeover of the real local Chrome session.
### Validated profile
- OpenClaw browser profile: `user`
- Driver/transport: `existing-session` via `chrome-mcp`
### Validation result
Validated on 2026-03-18:
- `openclaw browser --browser-profile user status` returned `running: true`
- `openclaw browser --browser-profile user tabs` listed live local tabs
### Operational meaning
This is the preferred path for smart takeover of the browser running on mac-5 itself.
## mac-7 browser automation service
mac-7 hosts the dedicated automation Chrome instance.
### Persistent local CDP service
- LaunchAgent plist:
- `~/Library/LaunchAgents/com.lingyuzeng.chrome-cdp-mac7.plist`
- Chrome executable:
- `/Applications/Google Chrome.app/Contents/MacOS/Google Chrome`
- Dedicated profile dir:
- `~/.openclaw/browser/mac7-automation-profile`
- Persistent local CDP listen address:
- `127.0.0.1:9333`
- Validation:
- `http://127.0.0.1:9333/json/version` returns standard CDP metadata and `webSocketDebuggerUrl`
### Persistent tailnet-facing listener
Validated on 2026-03-18:
- Tailscale IP on mac-7: `100.64.0.23`
- Persistent tailnet listener: `100.64.0.23:9223`
- Forward target: `127.0.0.1:9333`
- LaunchAgent:
- `~/Library/LaunchAgents/com.lingyuzeng.chrome-cdp-tailnet-proxy-mac7.plist`
- Proxy script:
- `~/.openclaw/bin/chrome_cdp_tailnet_proxy.py`
- Validation:
- `http://100.64.0.23:9223/json/version` returns `200 OK`
- returned `webSocketDebuggerUrl` is reachable on the tailnet-facing endpoint
### Important caveat
`tailscale serve` is not the active solution here.
Observed status:
- `tailscale serve status` => `No serve config`
The durable implementation is instead LaunchAgent + Python TCP proxy.
So future tasks should treat the endpoints as:
- **stable local automation endpoint on mac-7:** `127.0.0.1:9333`
- **stable tailnet remote endpoint on mac-7:** `100.64.0.23:9223`
## Usage guidance
- For mac-5 intelligent browser takeover: use OpenClaw local `user` profile.
- For mac-7 automation on the same machine: use CDP on `127.0.0.1:9333`.
- For mac-5 controlling mac-7 across the tailnet, do not assume `100.64.0.23:9223` is durable unless a persistent proxy/serve configuration is explicitly installed later.