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 debugger-pause freeze: every pup tab now skips ALL debugger pauses (Debugger.setSkipAllPauses+resume) so a page's 'debugger;' statement or a stray breakpoint can never freeze the window and its 3D viewer (John's wiki viewer locked up behind a 'Debugger paused in another tab' banner). Fix overlay-paint spam: dedup desktop_taskbar — only paint when the composed icon+tooltip+target actually changed since the last paint, instead of re-sending identical overlays every few seconds and flooding AD's activity log. Enforcer now treats a genuinely no-favicon page's generic glyph as final after 3 upgrade attempts (retried on navigation) rather than re-composing it every 10s forever.
5 files changed
+58−11
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.340",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.340/adom-bridge-puppeteer-v1.9.340.zip",- "sha256": "78bc3a3a711bd69090fc5f671240e6af86138bdf8f41456f48870234d66731b6",- "size": 631595,+ "version": "1.9.341",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.341/adom-bridge-puppeteer-v1.9.341.zip",+ "sha256": "6e63fbf43d9b1ba83c7bbc94918ec816485c14c3983386a40b05eba9b8a658ad",+ "size": 632961, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.340+1.9.341
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.340",+ "version": "1.9.341", "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/package-lock.json+2−2@@ -1,12 +1,12 @@ { "name": "adom-puppeteer-bridge",- "version": "1.0.0",+ "version": "1.9.291", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "adom-puppeteer-bridge",- "version": "1.0.0",+ "version": "1.9.291", "dependencies": { "puppeteer": "^24.43.1" },
src/server.js+50−3@@ -477,10 +477,30 @@ function scheduleCategoryRecheck(sessionId) { }, 1500)); } +// Make a pup-driven tab IMMUNE to debugger pauses. A page's `debugger;` statement (or a stray+// breakpoint) only pauses when the Debugger domain is enabled — but when it IS enabled (by a stale+// CDP client, a previously-opened DevTools, whatever), a single `debugger;` FREEZES the renderer,+// and because sibling tabs share the process the freeze locks the WHOLE window. John hit exactly+// this: the "Debugger paused in another tab" banner appeared and the wiki 3D viewer stopped+// responding. pup drives via CDP for AUTOMATION, never to debug page code, so it must never honor a+// pause. We enable Debugger, tell V8 to skip ALL pauses, and resume anything already frozen — then+// keep the session attached so the skip stays in force for this tab's whole life.+async function neutralizeDebugger(page) {+ try {+ const cdp = await page.target().createCDPSession();+ await cdp.send('Debugger.enable').catch(() => {});+ await cdp.send('Debugger.setSkipAllPauses', { skip: true }).catch(() => {});+ await cdp.send('Debugger.resume').catch(() => {}); // clears a pause already freezing the window+ try { page.__pupDbgCdp = cdp; } catch (e) {} // keep a ref so the session (and the skip) survive+ } catch (e) {}+}+ function attachTab(session, sessionId, page, { makeActive = true, opener = 'user', openerTabId = null } = {}) { const tabId = nextTabId(session); const errors = []; setupErrorCollection(page, errors);+ // Immunize this tab against debugger-statement / breakpoint freezes (see neutralizeDebugger).+ neutralizeDebugger(page); // v1.9.78 — SURVIVE A RENDERER CRASH (wiki issue #16). Under many heavy-SPA tabs plus rapid // navigate/eval/screenshot churn, one tab's renderer can crash (Chrome's per-tab 'Aw, Snap'). // puppeteer surfaces that as the page 'error' event; we mark the tab so every verb FAST-FAILS@@ -653,6 +673,8 @@ function attachTab(session, sessionId, page, { makeActive = true, opener = 'user page.on('framenavigated', (frame) => { try { if (frame !== page.mainFrame()) return; } catch (e) { return; } scheduleCategoryRecheck(sessionId);+ // New URL → give favicon detection a fresh start: a page that had none may now have one.+ try { session._overlayGenericFinal = false; session._overlayGenericTries = 0; } catch (e) {} // v1.9.324 (John: "EVERY verb OR EVENT that could change an icon MUST trigger a recalc"). // The favicon OVERLAY badge was only recomputed by explicit MUTATING_VERBS. Any navigation // pup did not itself initiate — a JS redirect, a <meta> refresh, a form submit, an SPA route@@ -4912,10 +4934,26 @@ async function applyAppOverlay(session, sessionId) { console.log(`[overlay] "${sessionId}" REFUSED to paint — no pup-owned hwnd confirmed (protecting non-pup taskbar buttons like Edge)`); return false; }+ const _tooltip = `Adom Pup — ${nm}${plateAuthed ? 'Adom wiki: SIGNED IN · ' : ''}${tabs} tab${tabs === 1 ? '' : 's'}${tabs > 1 ? ' (icon = active tab)' : ''}`;+ // DEDUP THE PAINT (John: "why are you sending overlay icons non-stop? every second? that's insane").+ // desktop_taskbar is a PowerShell round-trip on the user's desktop; re-sending an IDENTICAL overlay+ // is pure churn that spams AD's activity log and needlessly re-hits the taskbar. applyAppOverlay is+ // RE-RUN constantly and legitimately — the 4s enforcer sweep re-checks bare/generic windows, and a+ // framenavigated fires on every SPA route/redirect — but if the composed icon + tooltip + target are+ // unchanged since the last SUCCESSFUL paint, there is nothing to send. The signature includes the+ // appId so a base-tile RE-STAMP (which recreates the button and drops its overlay) still forces a+ // repaint, and the hwnd so a re-resolved handle repaints. Same rule as jump-list dedup: one commit+ // per real change, never a heartbeat.+ const _paintSig = `${session._hwnd}|${session._curAppId || ''}|${_tooltip}|${overlay}`;+ if (session._lastPaintSig === _paintSig) {+ session._appOverlay = true; // identical overlay already on the button — skip the AD round-trip+ return true;+ } await chrome.adCommand('desktop_taskbar', { hwnd: session._hwnd,- overlay: { icon: overlay, tooltip: `Adom Pup — ${nm}${plateAuthed ? 'Adom wiki: SIGNED IN · ' : ''}${tabs} tab${tabs === 1 ? '' : 's'}${tabs > 1 ? ' (icon = active tab)' : ''}` },+ overlay: { icon: overlay, tooltip: _tooltip }, }, { timeoutMs: 5000 });+ session._lastPaintSig = _paintSig; session._appOverlay = true; // v1.9.150 (John: 'prove what overlay icon you're showing and why'): record the WHAT and WHY // so list_windows can report it and test tables can prove it.@@ -14158,7 +14196,12 @@ server.listen(PORT, BIND_HOST, async () => { } if (pupSettings().overlayBadges !== 'on') continue; const bare = !s2._appOverlay;- const stuckGeneric = s2._appOverlay && s2._overlayIsGeneric;+ // A window whose page genuinely has NO favicon anywhere sits on the generic glyph forever, and+ // the enforcer would re-fetch + re-compose it every 10s for the life of the window (John saw the+ // churn in AD's log). Once we've re-attempted the upgrade a few times and the page STILL has no+ // favicon, accept the generic glyph as final and stop re-enforcing — until the tab NAVIGATES,+ // which clears the flag (framenavigated) so a new URL gets fresh upgrade attempts.+ const stuckGeneric = s2._appOverlay && s2._overlayIsGeneric && !s2._overlayGenericFinal; if (!bare && !stuckGeneric) continue; const last = s2._overlayEnforceAt || 0; // v1.9.329: a bare window is now a VISIBLE hole (the notch), so recover it fast — 4s, not 20s.@@ -14172,7 +14215,11 @@ server.listen(PORT, BIND_HOST, async () => { const wasGeneric = stuckGeneric; applyAppOverlay(s2, sid2).then(okp => { if (!okp) return;- if (wasGeneric && !s2._overlayIsGeneric) console.log(`[overlay] "${sid2}" UPGRADED generic → real favicon (enforcer re-fetched it)`);+ if (wasGeneric && !s2._overlayIsGeneric) { s2._overlayGenericTries = 0; console.log(`[overlay] "${sid2}" UPGRADED generic → real favicon (enforcer re-fetched it)`); }+ else if (wasGeneric && s2._overlayIsGeneric) {+ s2._overlayGenericTries = (s2._overlayGenericTries || 0) + 1;+ if (s2._overlayGenericTries >= 3) { s2._overlayGenericFinal = true; console.log(`[overlay] "${sid2}" still has no favicon after 3 upgrade attempts — accepting generic glyph as final; will retry on next navigation`); }+ } else if (bare) console.log(`[overlay] "${sid2}" ENFORCED (was bare) — every pup window must wear its overlay`); }).catch(() => {}); }