Commit Graph

2 Commits

Author SHA1 Message Date
Suydev
598a6d55d1 feat(tools): add live-view tool with target-following and adaptive pacing
Provide a standalone viewer at tools/live-view.mjs that polls
Page.captureScreenshot with connection-aware target discovery.
Unlike the inline doc example, it follows the agent across pages:
it discovers targets through the global HTTP list and re-attaches
whenever the agent opens a new page. Capture pacing is adaptive:
fast while frames change, idle back-off otherwise, so watching
feels continuous without busy looping.

Part of #691.
2026-08-23 13:35:58 +04:00
Suydev
76f96225b5 docs(mcp): add guide for watching agent sessions live
Agents driving obscura through MCP, Puppeteer, or Playwright are
invisible because the browser is headless. Add a guide showing how
to stream what the browser sees to a local tab with a small
dependency-free Node script (Node 21+ native WebSocket).

The script attaches through Target.attachToTarget and polls
Page.captureScreenshot twice a second over Server-Sent Events.
Polling is deliberate: screencast frames stream only to the session
that drives the page, so a passive viewer goes quiet once an agent
session takes over. The guide documents that plus two more
behaviors found while building it: every screencast frame needs
screencastFrameAck or delivery stalls, and a bare page socket
refuses screencast commands with 503.

Fixes #691.
2026-08-22 21:58:55 +05:30