mirror of
https://github.com/browseros-ai/BrowserOS.git
synced 2026-05-13 23:53:25 +00:00
* feat: add get_console_logs tool to surface browser console output Captures Runtime.consoleAPICalled, Runtime.exceptionThrown, and Log.entryAdded CDP events per page with a FIFO ring buffer (500 entries). - ConsoleCollector: per-page buffers with O(1) session routing via Map lookup - Session-aware CDP event dispatching (onSessionEvent) in CdpBackend - Log.enable() added alongside Runtime.enable() in attachToPage - Single tool with level hierarchy, text search, limit, and clear params - Buffer clears on main-frame navigation, cleaned up on page close * fix: address review — handle session re-attach, remove dead code - ConsoleCollector.attach() now updates session mapping on re-attach instead of early-returning, preventing silent event drops after target detach/re-attach (e.g. tab crash, cross-process navigation) - Remove unused clearConsoleLogs() and ConsoleCollector.clear()