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.365: pup_set_viewport reset now verifies the clear instead of assuming it, forces a reflow before measuring, and returns ok:false with a reopen hint when the override survives; every viewport response carries innerWidth, outerWidth and emulated, so an AI can finally tell an emulated window from a real one; and the override warning names whether the user is seeing dead space or cropped content.
5 files changed
+55−13
adom-bridge-puppeteer-manifest.json+5−5@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "2.0.364",- "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.364/adom-bridge-puppeteer-v2.0.364.zip",- "sha256": "63767c3c9b85ee2c6a613baa8317034d9db7b8ab542124f403a10550f5aa5a6b",- "size": 1530870,+ "version": "2.0.365",+ "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.365/adom-bridge-puppeteer-v2.0.365.zip",+ "sha256": "abc55cea839d6ad0cce98a8898427f0ec92a425b997e7d340d9f8d226bcb92f5",+ "size": 1532144, "verbPrefixes": [ "browser_", "desktop_recorder_",@@ -12,5 +12,5 @@ ], "healthEndpoint": "/status", "statusVerb": "browser_readiness",- "released_at": "2026-08-28T10:25:08.486232Z"+ "released_at": "2026-08-28T10:36:26.089217Z" }
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "pup-bridge",- "version": "2.0.364",+ "version": "2.0.365", "type": "app", "description": "The pup SKILL PACK \u2014 the AI skills that teach a cloud/container AI how to drive the Adom Desktop Puppeteer (pup) bridge (browser_* verbs): the everyday `pup` skill plus focused sub-skills for windows/sessions/tabs, screenshots+recording, browsers+Chrome install, and driving the Adom wiki. Installs into ~/.claude/skills + ~/.codex/skills. DOCS ONLY \u2014 this is NOT the bridge runtime. The bridge itself (the Node program that drives the browser) runs on the DESKTOP: Adom Desktop bundles it and auto-installs/updates it, and it's published separately on the Releases tab as adom-bridge-puppeteer-v<ver>.zip. The pkg version is kept in lockstep with the Release version so the page's max version row always carries BOTH a pkg tarball (skills) and a runtime zip (bridge) \u2014 a skills-only or runtime-only bump on the top row breaks constraint installs. TL;DR: pkg install = the skills for your AI; the bridge = the Release zip, which Adom Desktop manages for you.", "keywords": [
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.364+2.0.365
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.364",+ "version": "2.0.365", "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+47−5@@ -12080,9 +12080,20 @@ function attachSessionNotices(obj, verb, argsIn) { if (obj._viewportOverride === undefined && VIEWPORT_SENSITIVE.has(verb)) { const ev = sess._emulatedViewport; if (ev && ev.width) {+ // Both failure directions are real and they look opposite on screen. NARROWER than the+ // window leaves dead space down the side; WIDER crops content off the edge, which is the+ // one that hides information from the user. Name which one this is.+ const outer = Number(sess._lastOuterWidth) || null;+ let shape = '';+ if (outer && ev.width > outer + 4) {+ shape = ` The emulation is WIDER than the OS window (${ev.width} vs ${outer}), so the user is seeing this page CROPPED: roughly ${ev.width - outer}px of it is off the right edge of their window.`;+ } else if (outer && ev.width < outer - 4) {+ shape = ` The emulation is NARROWER than the OS window (${ev.width} vs ${outer}), so the user is seeing dead space beside the page.`;+ } obj._viewportOverride = `This window has an EMULATED VIEWPORT of ${ev.width}x${ev.height}` + (ev.deviceScaleFactor ? ` @${ev.deviceScaleFactor}x` : '')- + `, so it is NOT tracking the real OS window. Anything you measure in the page (innerWidth, clientWidth, a bounding rect) describes the emulation, not what the user sees: a page that fills this viewport can still leave dead space on their screen. Clear it with pup_set_viewport {"reset":true} when you are done emulating.`;+ + `, so it is NOT tracking the real OS window.` + shape+ + ` Anything you measure in the page (innerWidth, clientWidth, a bounding rect) describes the emulation, not what the user sees. Clear it with pup_set_viewport {"reset":true} when you are done emulating.`; } } // #80: the restart notice, delivered to the session it happened to rather than broadcast.@@ -17147,10 +17158,35 @@ const server = http.createServer(async (req, res) => { const wantsReset = args.reset === true || (args.width === undefined && args.height === undefined); if (wantsReset) { try {+ // v2.0.365 (project-a5's report). VERIFY THE CLEAR, do not assume it. They measured a+ // reset that returned ok:true with "innerWidth now 2200" — the OVERRIDE width, not the+ // real one — while the override was still in force through a reload. A reset that+ // reports the number it was supposed to remove is worse than a failure, because the+ // caller then trusts a window that is still cropping content off the user's screen.+ const _prev = session._emulatedViewport ? Number(session._emulatedViewport.width) : null; await tab.page.setViewport(null);+ // Belt and braces: puppeteer's setViewport(null) does not always reach the metrics+ // override on a page that was emulated earlier in its life, so clear it at the+ // protocol level too. Harmless when there is nothing to clear.+ try { const _cdp = await tab.page.createCDPSession(); await _cdp.send('Emulation.clearDeviceMetricsOverride'); await _cdp.detach().catch(() => {}); } catch (e) {} session._emulatedViewport = null;- const dims = await tab.page.evaluate(() => ({ innerWidth: window.innerWidth, innerHeight: window.innerHeight, devicePixelRatio: window.devicePixelRatio }));- sendJSON(res, { success: true, output: JSON.stringify({ ok: true, sessionId: resolvedId, tabId, reset: true, ...dims,+ // Measure AFTER a forced reflow, and measure the OUTER window too: outerWidth is the+ // one number an emulated viewport cannot fake, so innerWidth-vs-outerWidth is how an+ // AI can finally tell an emulated window from a real one (their ask (b)).+ await tab.page.evaluate(() => new Promise(r => requestAnimationFrame(() => requestAnimationFrame(r))));+ const dims = await tab.page.evaluate(() => ({+ innerWidth: window.innerWidth, innerHeight: window.innerHeight,+ outerWidth: window.outerWidth, devicePixelRatio: window.devicePixelRatio,+ }));+ // If it still reads as the width we just removed, the clear did NOT take. Say so.+ if (_prev && Math.abs(dims.innerWidth - _prev) <= 2) {+ sendJSON(res, { success: false, error: `the viewport override did not clear: the page still reports innerWidth ${dims.innerWidth}, which is the override width`,+ errorCode: 'viewport_reset_failed',+ output: JSON.stringify({ ok: false, sessionId: resolvedId, tabId, emulated: true, ...dims }),+ _hint: `pup could not remove the emulation from this window. Close and reopen it (pup_close_window then pup_open_window) — a fresh window reports the real size. Do NOT trust in-page measurements from this window meanwhile: the page believes it is ${dims.innerWidth}px wide while the OS window is ${dims.outerWidth}px, so the user is seeing it cropped.` });+ return;+ }+ sendJSON(res, { success: true, output: JSON.stringify({ ok: true, sessionId: resolvedId, tabId, reset: true, emulated: false, ...dims, _hint: `Viewport override CLEARED — this window tracks the real OS window again (innerWidth now ${dims.innerWidth}, dpr ${dims.devicePixelRatio}). Resizing the window will reflow the page normally.` }) }); } catch (e) { sendJSON(res, { success: false, error: `clearing the viewport override failed: ${e.message}` }); } return;@@ -17162,13 +17198,19 @@ const server = http.createServer(async (req, res) => { } const dsf = Number(args.deviceScaleFactor) || 1; try {+ // Capture the REAL window width BEFORE emulating. outerWidth is the one number the+ // override cannot fake, and it is what lets every later warning say whether the user is+ // seeing dead space or seeing content cropped off their screen.+ let _outerBefore = null;+ try { _outerBefore = await tab.page.evaluate(() => window.outerWidth); } catch (e) {} await tab.page.setViewport({ width: Math.round(vw), height: Math.round(vh), deviceScaleFactor: dsf });+ if (_outerBefore) session._lastOuterWidth = _outerBefore; // Fix 2 of 4: RECORD the override so pup_status / pup_list_windows can report it. session._emulatedViewport = { width: Math.round(vw), height: Math.round(vh), deviceScaleFactor: dsf };- const dims = await tab.page.evaluate(() => ({ innerWidth: window.innerWidth, innerHeight: window.innerHeight, devicePixelRatio: window.devicePixelRatio }));+ const dims = await tab.page.evaluate(() => ({ innerWidth: window.innerWidth, innerHeight: window.innerHeight, outerWidth: window.outerWidth, devicePixelRatio: window.devicePixelRatio })); // Fix 3 of 4: the hint must state the LIFECYCLE, not just the benefit. The old text sold // the feature and never said the effect is permanent for the life of the window.- sendJSON(res, { success: true, output: JSON.stringify({ ok: true, sessionId: resolvedId, tabId, applied: { width: Math.round(vw), height: Math.round(vh), deviceScaleFactor: dsf }, ...dims,+ sendJSON(res, { success: true, output: JSON.stringify({ ok: true, sessionId: resolvedId, tabId, emulated: true, realOuterWidth: _outerBefore, applied: { width: Math.round(vw), height: Math.round(vh), deviceScaleFactor: dsf }, ...dims, _hint: `Viewport PINNED to ${Math.round(vw)}×${Math.round(vh)} (innerWidth now ${dims.innerWidth}). ⚠ THIS PERSISTS: it survives navigation AND hard reload, and while it is set the window NO LONGER TRACKS OS RESIZING — a human resizing this window will see the page not reflow, which reads exactly like an app layout bug. CLEAR IT when you are done: pup_set_viewport {"sessionId":"${resolvedId}","reset":true}. It is reported as emulatedViewport in pup_status / pup_list_windows.` }) }); } catch (e) { sendJSON(res, { success: false, error: `setViewport failed: ${e.message}` }); } return;