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
v2.0.239: The three status surfaces now share one core payload builder instead of each pasting the same version, enum accounting and identity settings, which is why the icon-audit field had landed on only one of them, and the raise verb builds its PowerShell from a single shared typedef rather than two copies of the same ten-line C-sharp helper.
4 files changed
+56−68
adom-bridge-puppeteer-manifest.json+5−5@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "2.0.238",- "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.238/adom-bridge-puppeteer-v2.0.238.zip",- "sha256": "f86b223139a10e4317e2e2b15ebbb2c565bc4556b545f506e652073e24ae6751",- "size": 944191,+ "version": "2.0.239",+ "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.239/adom-bridge-puppeteer-v2.0.239.zip",+ "sha256": "9987da7968e7cc7e075d4cc65ef47aa5836ba2bdc369d1e33397ca5d276f36fe",+ "size": 944160, "verbPrefixes": [ "browser_", "desktop_recorder_",@@ -12,5 +12,5 @@ ], "healthEndpoint": "/status", "statusVerb": "browser_readiness",- "released_at": "2026-08-18T12:58:12.696755Z"+ "released_at": "2026-08-18T13:29:29.437582Z" }
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.238+2.0.239
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.238",+ "version": "2.0.239", "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+49−61@@ -8090,6 +8090,48 @@ function requireLiveSession(res, args) { } return { sessionId, session: sessions.get(sessionId) }; }+// v2.0.239: /health, /status and the pup_status verb each hand-built the same core status fields+// (version, enum accounting, identity settings, session/active counts). The identical+// `settings: (() => {...})()` IIFE was pasted three times and the enum expression character for+// character. One builder; each surface spreads it and adds only what is genuinely its own.+function statusCore() {+ const st = pupSettings();+ return {+ version: BRIDGE_VERSION,+ // enum_windows accounting, so "is pup spamming ab?" is answered with a number, not an argument.+ // lastMin counts REAL ab calls in the last 60s (cache hits and coalesced callers are not counted).+ enumWindows: { total: _enumCalls, lastMin: (Date.now() - _enumWindow.at < 60000 ? _enumWindow.n : 0) },+ // the CURRENT identity mode, so a test harness asserts against what pup IS, not an assumption+ settings: {+ taskbarMode: st.aumidIcons !== 'on' ? 'plain' : (st.threadTiles === 'on' ? 'tiles' : 'aumid'),+ aumidIcons: st.aumidIcons, threadTiles: st.threadTiles,+ overlayBadges: st.overlayBadges, jumpLists: st.jumpLists,+ },+ iconAudit: _lastAudit ? { ok: _lastAudit.ok, at: _lastAudit.at, mode: _lastAudit.mode, findings: _lastAudit.findings.length, repaired: _lastAudit.repaired, reason: _lastAudit.reason } : null,+ sessionCount: sessions.size,+ activeSession: activeSessionId,+ };+}+// v2.0.239: the same 10-line C# raise helper was pasted into two script builders in the raise+// verb (and a third, already-deleted copy). One source of truth; callers append the invocation.+const PS_RAISE_TYPEDEF = [+ 'Add-Type @"',+ 'using System; using System.Runtime.InteropServices;',+ 'public class WinFocusH {',+ ' [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd);',+ ' [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);',+ ' [DllImport("user32.dll")] public static extern bool IsIconic(IntPtr hWnd);',+ ' [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);',+ ' [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int i, int v);',+ // background windows carry WS_EX_NOACTIVATE (they can never take focus). To actually SHOW one,+ // CLEAR that style first, then restore + foreground it.+ ' public static void Raise(IntPtr h){',+ ' int ex = GetWindowLong(h, -20); SetWindowLong(h, -20, ex & ~0x08000000);',+ ' if (IsIconic(h)) ShowWindow(h, 9); ShowWindow(h, 5); SetForegroundWindow(h);',+ ' }',+ '}',+ '"@',+]; async function reconcileModel(reason) { if (process.platform !== 'win32' || _reconcileBusy) return; _reconcileBusy = true;@@ -12849,23 +12891,10 @@ const server = http.createServer(async (req, res) => { sendJSON(res, { status: 'ok', bridge: 'puppeteer',- version: BRIDGE_VERSION,+ ...statusCore(), port: PORT, toolbar: { enabled: pupSettings().toolbarExtension !== 'off', ownerBadge: pupSettings().tbOwnerBadge !== 'off', snipHotkey: pupSettings().tbSnipHotkey !== 'off', floaty: pupSettings().tbFloatyPencil !== 'off' }, browserCount: browsers.size,- sessionCount: sessions.size,- // v2.0.172: enum_windows call accounting, so "is pup spamming ab?" is answered with a- // number instead of an argument. lastMin is REAL ab calls in the last 60s (cache hits and- // coalesced callers are not counted, which is the point).- enumWindows: { total: _enumCalls, lastMin: (Date.now() - _enumWindow.at < 60000 ? _enumWindow.n : 0) },- // v2.0.218 (selftest flakiness on a live box): expose the CURRENT identity mode so test- // harnesses can assert against what pup is actually in AT CHECK TIME, not an assumption —- // the user clicks the Settings matrix while tests run, and both are legitimate.- settings: (() => { const st = pupSettings(); return {- taskbarMode: st.aumidIcons !== 'on' ? 'plain' : (st.threadTiles === 'on' ? 'tiles' : 'aumid'),- aumidIcons: st.aumidIcons, threadTiles: st.threadTiles,- overlayBadges: st.overlayBadges, jumpLists: st.jumpLists }; })(),- activeSession: activeSessionId, sessions: sessionList, chrome: (chrome && chrome.readiness) ? chrome.readiness() : { ready: false, initializing: true }, });@@ -15406,20 +15435,7 @@ const server = http.createServer(async (req, res) => { if (hwnd) { const psPath = path.join(require('os').tmpdir(), '_adom_focus_hwnd.ps1'); fs.writeFileSync(psPath, [- 'Add-Type @"',- 'using System; using System.Runtime.InteropServices;',- 'public class WinFocusH {',- ' [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd);',- ' [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);',- ' [DllImport("user32.dll")] public static extern bool IsIconic(IntPtr hWnd);',- ' [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);',- ' [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int i, int v);',- ' public static void Raise(IntPtr h){',- ' int ex = GetWindowLong(h, -20); SetWindowLong(h, -20, ex & ~0x08000000);',- ' if (IsIconic(h)) ShowWindow(h, 9); ShowWindow(h, 5); SetForegroundWindow(h);',- ' }',- '}',- '"@',+ ...PS_RAISE_TYPEDEF, `[WinFocusH]::Raise([IntPtr]${hwnd})`, "Write-Output 'focused'", ].join('\n'), 'utf8');@@ -15446,32 +15462,17 @@ const server = http.createServer(async (req, res) => { // Write PowerShell script to temp file and execute (avoids quoting hell) const psScript = path.join(require('os').tmpdir(), '_adom_focus.ps1'); const psContent = [- 'Add-Type @"',- 'using System; using System.Runtime.InteropServices;',- 'public class WinFocus {',- ' [DllImport("user32.dll")] public static extern bool SetForegroundWindow(IntPtr hWnd);',- ' [DllImport("user32.dll")] public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);',- ' [DllImport("user32.dll")] public static extern bool IsIconic(IntPtr hWnd);',- ' [DllImport("user32.dll")] public static extern int GetWindowLong(IntPtr h, int i);',- ' [DllImport("user32.dll")] public static extern int SetWindowLong(IntPtr h, int i, int v);',- // v1.8.32: background windows carry WS_EX_NOACTIVATE (they can never take focus).- // To actually SHOW one, CLEAR that style first, then restore + foreground it.- ' public static void Raise(IntPtr h){',- ' int ex = GetWindowLong(h, -20); SetWindowLong(h, -20, ex & ~0x08000000);',- ' if (IsIconic(h)) ShowWindow(h, 9); ShowWindow(h, 5); SetForegroundWindow(h);',- ' }',- '}',- '"@',+ ...PS_RAISE_TYPEDEF, `$targetPid = ${pid}`, '$p = Get-Process -Id $targetPid -ErrorAction SilentlyContinue', 'if ($p -and $p.MainWindowHandle -ne 0) {',- ' [WinFocus]::Raise($p.MainWindowHandle)',+ ' [WinFocusH]::Raise($p.MainWindowHandle)', " Write-Output 'focused'", '} else {', ' Get-WmiObject Win32_Process | Where-Object { $_.ParentProcessId -eq $targetPid -and $_.Name -eq "chrome.exe" } | ForEach-Object {', ' $cp = Get-Process -Id $_.ProcessId -ErrorAction SilentlyContinue', ' if ($cp -and $cp.MainWindowHandle -ne 0) {',- ' [WinFocus]::Raise($cp.MainWindowHandle)',+ ' [WinFocusH]::Raise($cp.MainWindowHandle)', " Write-Output 'focused'", ' return', ' }',@@ -17417,15 +17418,7 @@ const server = http.createServer(async (req, res) => { ok: true, // v2.0.190: version + the enum_windows counter belong on the VERB payload (2.0.188 put // them on the HTTP /status chip only — the wrong surface for remote no-shell boxes).- version: BRIDGE_VERSION,- enumWindows: { total: _enumCalls, lastMin: (Date.now() - _enumWindow.at < 60000 ? _enumWindow.n : 0) },- iconAudit: _lastAudit ? { ok: _lastAudit.ok, at: _lastAudit.at, mode: _lastAudit.mode, findings: _lastAudit.findings.length, repaired: _lastAudit.repaired, reason: _lastAudit.reason } : null,- settings: (() => { const st = pupSettings(); return {- taskbarMode: st.aumidIcons !== 'on' ? 'plain' : (st.threadTiles === 'on' ? 'tiles' : 'aumid'),- aumidIcons: st.aumidIcons, threadTiles: st.threadTiles,- overlayBadges: st.overlayBadges, jumpLists: st.jumpLists }; })(),- sessionCount: sessions.size,- activeSession: activeSessionId,+ ...statusCore(), sessions: list, pupshotUrl, };@@ -17866,15 +17859,10 @@ const server = http.createServer(async (req, res) => { sendJSON(res, { ok: true, bridge: 'puppeteer',- version: BRIDGE_VERSION,+ ...statusCore(), adVersion: _adVersion, raiseGateBypassed: _adRaiseGateBypassed || undefined, led, summary, tooltip,- // v2.0.188: the enum_windows call counter rides pup_status too (not just /health), so the- // "is pup spamming ab?" question is answerable via a pup verb on ANY box, no shell needed.- enumWindows: { total: _enumCalls, lastMin: (Date.now() - _enumWindow.at < 60000 ? _enumWindow.n : 0) },- sessionCount: sessions.size,- activeSession: activeSessionId, sessions: list, chrome: rd, pupshotUrl,