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
Park windows on RECOVERY and on RECLAIM (background-by-default was only enforced on the launch path, so after a reboot every recovered window sat in the foreground), and log every incoming verb for auditability
4 files changed
+39−6
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.69",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.69/adom-bridge-puppeteer-v1.9.69.zip",- "sha256": "1b1827cb5cde7b8760ec1cfae05512732b4060876e478a7fef3c84e38eb91287",- "size": 307079,+ "version": "1.9.70",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.70/adom-bridge-puppeteer-v1.9.70.zip",+ "sha256": "772931bf7efec33b44ffe39b1bca532c5873a931215d10f4b52212b22ce05055",+ "size": 307851, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.69+1.9.70
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.69",+ "version": "1.9.70", "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.", "homepage": "https://wiki.adom.inc/adom/adom-desktop", "author": "Adom Inc.",
src/server.js+33@@ -1271,6 +1271,17 @@ async function recoverSessions() { // circuit breaker doesn't quarantine a healthy session on the next boot. try { let u = null; try { u = page.url(); } catch (e) {} saveSessionFile(sessionId, profileName, u); } catch (e) {} console.log(`Recovered session "${sessionId}" (profile: ${profileName}, URL: ${page.url()})`);+ // v1.9.70 — RE-PARK ON RECOVERY. The background-by-default rule was only ever enforced on the+ // LAUNCH path. Recovery re-attaches to a window that already exists, and after a REBOOT the OS+ // restores those Chrome/Edge windows in the FOREGROUND — so every recovered pup window sat on+ // top of the user's screen and nothing ever pushed it back down. That is John's "after my reboot+ // almost all pup windows are opening in the foreground". Park unless the session was explicitly+ // left in the foreground by a user-granted raise (that state is recorded on the session file).+ if (!session._foreground) {+ parkSessionWindowDirect(page, sessionId)+ .then(r => console.log(`[park] "${sessionId}" (recovered): ${r}`))+ .catch(e => console.log(`[park] "${sessionId}" (recovered) failed: ${e.message}`));+ } } catch (e) { console.error(`Failed to recover session "${sessionId}": ${e.message}`); deleteSessionFile(sessionId);@@ -3035,6 +3046,12 @@ async function reclaimUnmanagedWindows() { try { await retagSessionTitle(group[0], newId, profileName); } catch (e) {} console.log(`[reclaim] UNMANAGED window on "${profileName}" (${group.length} tab(s)) adopted as "${newId}" — ${(u || '').slice(0, 60)}`); refreshWindowChrome(ns, newId).catch(() => {});+ // v1.9.70: a RECLAIMED window was never parked either. These are windows pup did not launch+ // (an openerless popup, or an orphan whose session died), so they arrive wherever the shell+ // put them — usually on top. Background them like any pup-launched window.+ parkSessionWindowDirect(group[0], newId)+ .then(r => console.log(`[park] "${newId}" (reclaimed): ${r}`))+ .catch(() => {}); try { saveSessionFile(newId, profileName, u); } catch (e) {} reclaimed++; }@@ -5304,6 +5321,22 @@ const server = http.createServer(async (req, res) => { } } + // v1.9.70 — AUDIT EVERY INCOMING VERB. John: "do you even log all the actions against you?"+ // Fair — the log recorded what the bridge DID (park/identity/overlay) but never WHAT WAS ASKED+ // of it, so a question like "what foregrounded this window?" was unanswerable after the fact.+ // One compact line per verb, with the session and the few args that change behaviour.+ if (command && command !== 'bridge_log_read') {+ const _a = [];+ if (args.sessionId) _a.push(`session=${args.sessionId}`);+ if (args.url) _a.push(`url=${String(args.url).slice(0, 60)}`);+ if (args.foreground) _a.push('foreground=true');+ if (args.foregroundReason) _a.push('foregroundReason=YES');+ if (args.view) _a.push(`view=${args.view}`);+ if (args.tabId) _a.push(`tab=${args.tabId}`);+ if (args.owner) _a.push(`owner=${args.owner}`);+ console.log(`[verb] ${command}${_a.length ? ' ' + _a.join(' ') : ''}`);+ }+ // v1.9.57: light the taskbar progress bar while a thread is driving THIS window. Broader than // MUTATING_VERBS above on purpose — a screenshot or an eval is still an agent working in that // window, and that is exactly what the user wants to see. Status/polling verbs are excluded