app
Pup - the AI's own browser
Public Made by Adomby adom
pup gives your AI a real browser on your desktop that it drives completely, in the background, signed in as you: windows that never jump in front of your work, one shared profile that learns your logins, and every window labeled on the taskbar with its AI thread's name.
← Commit history
Crashed-renderer recovery: require STABLY-alive (two consecutive readyState reads ~700ms apart) before declaring a respawn successful — a fresh renderer flickers a transient execution context mid-navigation, so the old single-probe check falsely reported success then the page was still crashing. browser_navigate now also reports tab_renderer_crashed_unrecovered (close+reopen hint) when respawn does not take, symmetric with browser_reload. So recovery either genuinely brings the tab back or cleanly tells the caller to close+reopen — never a false success.
4 files changed
+28−10
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.177",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.177/adom-bridge-puppeteer-v1.9.177.zip",- "sha256": "1b429b02deffb531bb9a1615db63ddc857cf994e42f1ea5b2a26b3babbd5fe32",- "size": 413529,+ "version": "1.9.178",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.178/adom-bridge-puppeteer-v1.9.178.zip",+ "sha256": "377038bfe79d5e95b0ffbecd07a6274c20fc0d10895d2c7cd7579d6d4eee2f7b",+ "size": 413808, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.177+1.9.178
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.177",+ "version": "1.9.178", "description": "Drives a browser ALREADY on the machine \u2014 installed Chrome, else Microsoft Edge (every Windows PC ships with Edge) \u2014 launched with a FRESH isolated profile, so the common case has NO ~150 MB Chrome-for-Testing download and it never touches the user's real tabs/logins. Binds its local server to LOOPBACK (127.0.0.1) only, so no Windows Firewall 'allow Node through the firewall' prompt ever pops. Chrome for Testing is fetched only as a LAST RESORT if the machine has no Chromium browser at all. SPAWN-VERIFIED fallback: pup tries each detected browser (Chrome \u2192 Edge \u2192 CfT) and actually launches it, falling through to the next if one won't start (and handling browsers like Edge that relaunch onto another PID), so a corrupt/partial install never hard-fails an open. The browser that launches is cached as the default (persisted across restarts) so it isn't re-probed each time. On spawn the bridge SELF-WARMS: detects browsers + disk, and only if the box has no Chrome/Edge and no cached CfT does it background-fetch CfT so the first open is instant. browser_use pins a specific browser (chrome | edge | cft | auto); {browser:'chrome',install:true} downloads & installs REAL Google Chrome (user-scoped, no admin) on an Edge-only box. browser_readiness (READ-ONLY) reports which browser will be used + the full candidate list + the default + free disk. Every failure returns a specific errorCode + _hint (chrome_install_no_disk, chrome_download_network, chrome_install_permission, chrome_stable_not_detected, \u2026). Launches with FULL browser permissions by default for full debug (strictPermissions:true opts out). Headful automation: open/close windows+tabs, navigate, screenshot, eval JS, record. pup is a GENERIC, non-profile browser only \u2014 every session is a fresh isolated Chrome/Edge process, never the user's real signed-in browser; profile defaults to sessionId. To drive the user's REAL Chrome/Edge (their profile, cookies, SSO), use the Adom browser EXTENSION's nbrowser_* verbs \u2014 a separate bridge, not pup's job. macOS (v1.9.74+): full parity with mac-native mechanics \u2014 background-by-default is the app-level hide (windows stay drivable/screenshottable while hidden), raise/lower map to unhide+activate/hide, browser_alert_window posts a native toast whose click focuses the window, browser_use {browser:'chrome',install:true} installs Chrome from the official dmg, and taskbar identity/badging remains Windows-only.", "homepage": "https://wiki.adom.inc/adom/adom-desktop", "author": "Adom Inc.",
src/server.js+22−4@@ -819,13 +819,26 @@ async function respawnCrashedRenderer(page, url) { } page.__pupRespawning = true; let cdp = null;+ // STABLY alive, not just a transient hit: a fresh renderer flickers an execution context DURING+ // its navigation, so a single successful probe is a false positive (the page is still mid-crash-+ // recovery and 'Execution context was destroyed' fires a beat later). Require readyState to read+ // as a real value on TWO probes ~700ms apart before declaring recovery.+ const stablyAlive = async () => {+ try {+ const rs = await withTimeout(page.evaluate('document.readyState'), 1500, 'probe');+ return rs === 'loading' || rs === 'interactive' || rs === 'complete';+ } catch (e) { return false; }+ }; try { cdp = await withTimeout(page.target().createCDPSession(), 4000, 'cdp-session'); try { await withTimeout(cdp.send('Page.navigate', { url: url || 'about:blank' }), 8000, 'page-navigate'); } catch (e) {}- const deadline = Date.now() + 6000;+ const deadline = Date.now() + 10000; while (Date.now() < deadline) {- await new Promise(r => setTimeout(r, 400));- try { await withTimeout(page.evaluate('1'), 1500, 'respawn-probe'); return true; } catch (e) { /* frame still respawning */ }+ await new Promise(r => setTimeout(r, 500));+ if (await stablyAlive()) {+ await new Promise(r => setTimeout(r, 700));+ if (await stablyAlive()) return true; // two consecutive good reads = genuinely back+ } } return false; } catch (e) {@@ -9361,8 +9374,13 @@ const server = http.createServer(async (req, res) => { // requested URL — that spawns a fresh renderer in place and lands on the target page. if (tab._crashed) { const ok = await respawnCrashedRenderer(tab.page, args.url);+ if (!ok) {+ console.log(`[crash] session "${resolvedId}" tab ${tabId} navigate respawn did NOT take — advising close+reopen`);+ sendJSON(res, { success: false, error: `Tab "${tabId}" renderer crashed and in-place respawn to ${args.url} did not recover it (Chrome may be too memory-pressured). Close and reopen: browser_close_window {sessionId:"${resolvedId}"} then browser_open_window {sessionId:"${resolvedId}", url:"${args.url}"}. Closing other heavy pup windows first frees memory.`, errorCode: 'tab_renderer_crashed_unrecovered', sessionId: resolvedId, tabId });+ return;+ } tab._crashed = false; delete tab._crashedAt; delete tab._crashReason;- console.log(`[crash] session "${resolvedId}" tab ${tabId} navigate recovered a crashed renderer via respawn (${ok ? 'ok' : 'sent'})`);+ console.log(`[crash] session "${resolvedId}" tab ${tabId} navigate recovered a crashed renderer via respawn`); } else { try { await withTimeout(