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 two wonks the mimic ralph reproduced from John's real 3-thread workload. One: after any bridge respawn every recovered window lost its taskbar identity (no handle, no overlay, unbrandable) because all four ownership proofs are dead for a recovered window, so the perfectly good persisted hwnd was discarded and the wiggle fallback could not disambiguate the shared profile. Recovery now records Chrome's persisted pid next to the restored hwnd, and hwndBelongsToPup accepts the pair (handle still owned by the exact process it was recorded under, and Chrome outlives pup respawns) as proof by continuity. Two: windows randomly ended up frozen with a 3-task jump list missing both view toggles, because a wiki window's categorized appId can commit before its login view resolves and the freeze locked that incomplete menu forever; wiki-category windows now freeze only once the view tasks are actually in the menu. Found by dev-skills/pup-taskbar-identity/ralph_mimic.sh, the new harness that replays John's observed workload including the respawn-recovery leg
4 files changed
+36−8
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "2.0.42",- "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.42/adom-bridge-puppeteer-v2.0.42.zip",- "sha256": "a3f7256aca74941816be46abefeb68fdabdeeca35002a19ddf3f80edd0cd33a9",- "size": 645881,+ "version": "2.0.43",+ "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.43/adom-bridge-puppeteer-v2.0.43.zip",+ "sha256": "cca60c0bdf6b2e5417cdc9b84c1d979fc0e3d827dfaed13cba61f8456cdff7fa",+ "size": 646715, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.42+2.0.43
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.42",+ "version": "2.0.43", "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. pup_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. pup_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, pup_alert_window posts a native toast whose click focuses the window, pup_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-bridge", "author": "Adom Inc.",
src/server.js+30−2@@ -1972,7 +1972,18 @@ async function recoverSessions() { // respawn, so this lets the window skip the width-wiggle entirely; resolveSessionHwndByBounds // still validates it via hwndBelongsToPup before any paint, so a stale/recycled handle is // discarded. This is the fix for "every window came back hwnd=None after a ship."- if (sf._hwnd) session._hwnd = Number(sf._hwnd);+ if (sf._hwnd) {+ session._hwnd = Number(sf._hwnd);+ // v2.0.43 (mimic-ralph: EVERY recovered window came back NO-HANDLE/NO-OVERLAY after a+ // respawn): restoring the hwnd is useless if hwndBelongsToPup then REJECTS it — and it did,+ // every time, because all four ownership proofs are dead for a recovered window (no birth+ // capture in this process, stale pid tracking, dead parent, title tag removed in 2.0.24).+ // The honest proof we DO have: this session file also persisted Chrome's pid, and Chrome+ // never restarted across a pup respawn — so "persisted hwnd whose CURRENT owner pid equals+ // the persisted Chrome pid" ties the handle to the exact process it was born under. Record+ // the pid; hwndBelongsToPup accepts that pair as proof (and learns the pid for siblings).+ if (pid) session._recoveredHwndPid = Number(pid) || null;+ } // v1.9.202 (John's icon audit): a recovered window came back with NO taskbar badge. Under // minimalTouch the overlay is applied only on OPEN and NAVIGATE, and the re-stamp sweeps that // used to cover recovery are gated off — so every bridge restart left surviving windows bare@@ -3985,7 +3996,12 @@ async function updateWikiJumplist(session, sessionId, opts) { // commit to it is all we ever need; later view/active-tab flips are no-ops. Checking the appId // shape (rather than session._frozenAppId, which is only set after the stamp returns) freezes on the // very first real commit instead of a beat later, killing the settle rebuilds too.- if (appId && appId.indexOf('.' + sessionId + '.') >= 0) session._jlFrozen = true;+ // v2.0.43 (mimic-ralph: windows randomly frozen at a 3-task menu, no view toggles): a wiki+ // window's categorized appId can commit BEFORE its login view resolves, and freezing on that+ // commit locks the incomplete menu forever. Freeze a wiki-category window only once the menu+ // actually carries the view tasks; non-wiki windows still freeze on first categorized commit.+ const _menuComplete = (view === 'authed' || view === 'public') || appId.indexOf('.wiki') < 0;+ if (appId && appId.indexOf('.' + sessionId + '.') >= 0 && _menuComplete) session._jlFrozen = true; // Surface the header-branding outcome: it is the ONLY programmatic signal that the app-tile row // actually took our icon (the rendered menu itself cannot be captured from the cloud). let hb = null, hic = null;@@ -5490,6 +5506,18 @@ async function hwndBelongsToPup(hwnd, session) { const born = session && (session.tabs || []).some(t => t && t.page && Number(t.page.__pupHwnd) === Number(hwnd)); if (born) { learnConfirmedPid(prof, pid); return true; } } catch (e) {}+ // v2.0.43: RECOVERED-HANDLE PROOF. A respawned pup can't have birth-captured anything, but the+ // session file persisted both the hwnd AND Chrome's pid at capture time, and Chrome outlives pup+ // respawns — so this exact pair (the handle still owned by the very process it was recorded+ // under) is proof by continuity. Without this branch every recovered window failed all proofs,+ // its perfectly good persisted handle was discarded, and the wiggle fallback couldn't+ // disambiguate the shared profile (mimic-ralph: NOT-RESOLVED-x4 on every window, every respawn).+ try {+ if (session && session._recoveredHwndPid && Number(session._hwnd) === Number(hwnd)+ && Number(pid) === Number(session._recoveredHwndPid)) {+ learnConfirmedPid(prof, pid); return true;+ }+ } catch (e) {} const own = pupBrowserPidSet(prof || undefined); if (own.has(pid)) return true; try {