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
Fix the full-browser hang introduced by my own 1.9.122 reparent (John: 'why does normal chrome work fine but you get frozen a lot?' — with a frozen tab spinner mid-load). Measured signature: one Chrome process wedged at the UI level (frozen spinner, CDP HTTP endpoint dead, trivial evals timing out) while the process stayed alive and SIBLING pup Chromes on other profiles answered instantly. Root cause: cmd's 'start /b' keeps the child in cmd's transient hidden console and passes that console's handles as Chrome's std handles; when conhost died with cmd, Chrome could block writing to the stale handles — a hazard Explorer-launched Chrome never has (no console at all). The reparent now goes through PowerShell Start-Process, which launches a GUI exe with NO console and null std handles while still orphaning Chrome from the bridge tree (the restart-survival win is kept). Recovery from the live hang cost nothing: kill the wedged process, reopen, and the durable profile lands straight back in Gmail signed in. Remaining known freeze-class, explicitly NOT fixed here: pup serializes verbs per session, so a slow page.goto queues every later verb into 'Request timed out' — that is issue #16 territory and needs its own change.
4 files changed
+18−12
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.130",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.130/adom-bridge-puppeteer-v1.9.130.zip",- "sha256": "c689d09ae3481799d49b6c27f310947495a18b655d842e49bb7211ef083c070a",- "size": 393814,+ "version": "1.9.131",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.131/adom-bridge-puppeteer-v1.9.131.zip",+ "sha256": "5962c25b7eae7f2f2f40d724db9a880616dc616cbb9fd40ff6743c9f1b8b8917",+ "size": 394085, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.130+1.9.131
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.130",+ "version": "1.9.131", "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+12−6@@ -4946,12 +4946,18 @@ async function getOrLaunchBrowser(profileName, { freshProfile = false, strictPer const reparented = process.platform === 'win32' && !!userDataDir; let child; if (reparented) {- // Full control of quoting (the taskbar-command lesson): build the command string- // ourselves and pass it verbatim, rather than letting Node re-quote through cmd.- const winQuote = (a) => /[\s"]/.test(a) ? '"' + String(a).replace(/"/g, '""') + '"' : a;- const startCmd = `start "" /b ${winQuote(chromePath)} ${chromeArgs.map(winQuote).join(' ')}`;- child = spawn('cmd.exe', ['/d', '/s', '/c', startCmd], {- windowsVerbatimArguments: true, windowsHide: true, detached: true, stdio: 'ignore',+ // v1.9.131 — REPARENT WITHOUT A CONSOLE. The 1.9.122 `cmd /c start /b` spawn kept Chrome+ // attached to cmd's transient hidden console (`/b` = same console) and passed its console+ // handles as Chrome's std handles; when that conhost died with cmd, Chrome could BLOCK on a+ // write to the stale handles — measured today as a FULL browser hang (frozen tab spinner,+ // CDP HTTP endpoint dead, process alive; sibling Chromes fine). Explorer-launched Chrome+ // never has a console, which is why John's normal Chrome never does this. PowerShell's+ // Start-Process launches a GUI exe with NO console and null std handles, and PowerShell's+ // exit orphans Chrome from the bridge tree exactly like cmd did (the reparent is kept).+ const psq = (a) => `'${String(a).replace(/'/g, "''")}'`;+ const psCmd = `Start-Process -FilePath ${psq(chromePath)} -ArgumentList ${chromeArgs.map(psq).join(',')}`;+ child = spawn('powershell.exe', ['-NoProfile', '-ExecutionPolicy', 'Bypass', '-Command', psCmd], {+ windowsHide: true, detached: true, stdio: 'ignore', }); } else { child = spawn(chromePath, chromeArgs, { detached: true, stdio: 'ignore', windowsHide: false });