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
1.8.61: adopt AD state:bottom for park z-order, last PS deleted from open path, legacy fallback for older AD
5 files changed
+46−15
CHANGELOG.md+15@@ -1,5 +1,20 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.61 — 2026-07-14 — 100% direct-API window management (AD shipped state:'bottom')++AD 1.9.114 shipped pup's feature request: `desktop_set_window_state {state:'bottom'}` — native+z-order send-to-back, background drive, title-resolved, returns `{sentToBack, wasForeground}`.+The park now uses it, deleting pup's LAST PowerShell from the open path (one AD call replaces+find_window + the P/Invoke SetWindowPos script). Legacy PS fallback kept for desktops on older AD.++## 1.8.60 — 2026-07-14 — Launch park bottoms UNCONDITIONALLY (escape hatch removed)++"Pup window is foreground at park time" is NOT a user signal: Windows reassigns the foreground to+a fresh window when the previous foreground window was just destroyed (e.g. a bridge-update+restart), which force-foregrounded windows the user never clicked (nxp.com, another thread's+cpconn). The user-click escape hatch is gone; a user who clicked during the ~2s launch gap clicks+once more and the window stays (nothing ever re-parks).+ ## 1.8.59 — 2026-07-14 — HARD RULE: never move a window on-screen until z-bottom is CONFIRMED Under a 3-parallel-open load, one window's hwnd lookup lagged, the z-bottom step failed, and the
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.8.60",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.60/adom-bridge-puppeteer-v1.8.60.zip",- "sha256": "be04223c0af71985dccf7d2d9cc2ee2a7e279d41f2a6446f69204750b00414db",- "size": 171087,+ "version": "1.8.61",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.61/adom-bridge-puppeteer-v1.8.61.zip",+ "sha256": "5ac407dc5c0060ebd44548209055a2c5769d8b991e2bcef44c83551ef5bfa317",+ "size": 171473, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.8.60+1.8.61
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.8.60",+ "version": "1.8.61", "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+25−9@@ -2021,24 +2021,40 @@ async function parkSessionWindowDirect(page, sessionId) { // behavior); the false-negative cost is a user who clicked during the ~2s launch gap // clicking ONCE more after the park — after which the window stays, since nothing // ever re-parks. Cheap. Do NOT reintroduce a foreground check here.- let hwnd = null, z = 'error';+ // v1.8.61: z-bottom via AD-CORE `desktop_set_window_state {state:'bottom'}` (shipped in AD+ // 1.9.114 per pup's feature request) — native, background-drive, resolves the window by+ // title itself, and returns {sentToBack, wasForeground}. This deletes pup's LAST PowerShell+ // from the open path; window management is now 100% direct API. Legacy fallback (older AD+ // that rejects state:'bottom'): the old find_window + osBottomUnlessForeground PS pair.+ const adBottom = async () => {+ try {+ const r = await chrome.adCommand('desktop_set_window_state', { titleContains: `(session: ${sessionId}`, state: 'bottom' }, { timeoutMs: 5000 });+ if (r && r.success === false) return { ok: false, err: r.error || 'error' };+ const raw = r && (typeof r.output === 'string' ? r.output : JSON.stringify(r.output || ''));+ const o = raw ? JSON.parse(raw) : {};+ const data = o.data || o;+ return { ok: !!data.sentToBack, wasForeground: !!data.wasForeground, err: data.sentToBack ? null : 'not sent to back' };+ } catch (e) { return { ok: false, err: e.message }; }+ };+ let bottomed = false, lastErr = 'error'; for (let attempt = 0; attempt < 8; attempt++) {- if (!hwnd) {+ const z = await adBottom();+ if (z.ok) { bottomed = true; break; }+ lastErr = z.err || 'error';+ if (/invalid|unknown|must be one of|maximize\|minimize/i.test(lastErr)) {+ // Older AD without state:'bottom' — legacy PS path, once per attempt.+ let hwnd = null; try { const r = await chrome.adCommand('desktop_find_window', { titleContains: `(session: ${sessionId}` }, { timeoutMs: 4000 }); const o = r && (typeof r.output === 'string' ? JSON.parse(r.output) : r.output || r); hwnd = (o && ((o.best && o.best.hwnd) || o.hwnd)) || null; } catch (e) {}- }- if (hwnd) {- z = osBottomUnlessForeground(hwnd, true); // force — always bottom at launch- if (z === 'bottomed') break;- hwnd = null; // stale hwnd (window recreated?) — re-resolve+ if (hwnd && osBottomUnlessForeground(hwnd, true) === 'bottomed') { bottomed = true; break; } } await new Promise(r2 => setTimeout(r2, 300)); }- if (z !== 'bottomed') {- console.log(`[park] "${sessionId}": z-bottom NOT confirmed (${z}) — leaving off-screen (no pop), self-heal will retry`);+ if (!bottomed) {+ console.log(`[park] "${sessionId}": z-bottom NOT confirmed (${lastErr}) — leaving off-screen (no pop), self-heal will retry`); return 'park-failed'; } // On-screen full-size WITHOUT activation — CDP move preserves z-order (we're at bottom).