Lightpanda requires one CDP connection per tab (vs Chrome's shared-WS
model). Add a Backend selector in pkg/browser/, branched lifecycle, and
per-tab connection tracking via pageConns.
- Backend type (chrome | lightpanda), WithBackend option, Backend()
accessor. Auto-detected from /json/version when unset.
- Lightpanda OpenTab mints a fresh conn, calls
Target.createBrowserContext (required per-conn) + createTarget.
- ListTabs / getPage are local-map only on Lightpanda (no /json/list,
no auto-reconnect).
- Shared closeManagedPageLocked helper used by CloseTab, evict, and
the idle-page reaper.
- Screenshot tool action errors out on Lightpanda (returns a
placeholder image upstream; route the agent to snapshot instead).
Prevent resource leaks and hanging actions in the browser tool:
- Per-action context timeout (default 30s, configurable via timeoutMs param or config)
- Idle page reaper goroutine closes pages unused for 10min (configurable)
- Max pages per tenant (default 5) with LRU eviction
- RefStore cleanup on page close/evict/reap to prevent memory leaks