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
Visible animated cursor for pup's in-page clicks (John: 'you need the simulated mouse like what nb has so the user knows that you're controlling the mouse'). New showPupCursor injects a teal Adom pointer that GLIDES from its last position to the click target and PULSES a ring on click, via CDP so it rides on top of any page (pointer-events:none, max z-index, drop-shadow). browser_click now glides the cursor to the target (selector's bounding-rect center, or the x/y) and waits ~440ms before firing the real trusted click, so the user watching a foregrounded window sees pup drive the mouse just like the nbrowser extension's cursor. Default on; {showCursor:false} disables. Best-effort — a page that blocks injection just skips the visual, the click still fires. This is the in-page half (covers ~all vendor download-button clicking, John's hours-of-library-downloading use case); the OS-level cursor overlay for native dialogs / cross-origin FedCM surfaces (driven by AD's desktop_click) is an AD-core capability to be filed separately.
4 files changed
+48−8
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.163",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.163/adom-bridge-puppeteer-v1.9.163.zip",- "sha256": "8c0026b2ae6231539e043a58fac0cbd2cfcaaa240656556841036ccc574de9aa",- "size": 402788,+ "version": "1.9.164",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.164/adom-bridge-puppeteer-v1.9.164.zip",+ "sha256": "13781e3e38888fc5e24bfb5a56c720ba7376fc4345864e6fc1be444cb5810c78",+ "size": 404028, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.163+1.9.164
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.163",+ "version": "1.9.164", "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/server.js+42−2@@ -1543,6 +1543,36 @@ process.on('exit', () => { process.on('SIGINT', () => { process.exit(0); }); process.on('SIGTERM', () => { process.exit(0); }); +// v1.9.164 (John: 'you need the simulated mouse like what nb has so the user knows you're+// controlling the mouse'). An in-page animated cursor for pup's clicks: a teal Adom pointer that+// GLIDES from its last spot to the click target and PULSES a ring on click. Injected via CDP so it+// rides on top of whatever page is loaded (pointer-events:none, max z-index). Only visible when the+// window is on-screen — which is exactly when the user is watching pup drive. Best-effort; a page+// that blocks injection (rare) just doesn't show it, the click still fires.+async function showPupCursor(page, x, y, { click = true } = {}) {+ try {+ await page.evaluate((tx, ty, doClick) => {+ const ID = '__pupCursor';+ let c = document.getElementById(ID);+ if (!c) {+ c = document.createElement('div'); c.id = ID;+ c.style.cssText = 'position:fixed;left:0;top:0;width:24px;height:24px;z-index:2147483647;pointer-events:none;transition:transform .40s cubic-bezier(.22,1,.36,1);will-change:transform;filter:drop-shadow(0 2px 3px rgba(0,0,0,.45));';+ c.innerHTML = '<svg width="24" height="24" viewBox="0 0 24 24"><path d="M4 2 L4 19 L8.6 14.6 L11.7 22 L14.6 20.8 L11.5 13.6 L18 13.6 Z" fill="#12e0c4" stroke="#08302c" stroke-width="1.3" stroke-linejoin="round"/></svg>';+ (document.body || document.documentElement).appendChild(c);+ c.style.transform = 'translate(' + Math.round(innerWidth/2) + 'px,' + Math.round(innerHeight/2) + 'px)';+ void c.offsetWidth; // force the start position before the glide transition+ }+ c.style.transform = 'translate(' + tx + 'px,' + ty + 'px)';+ if (doClick) setTimeout(() => {+ const ring = document.createElement('div');+ ring.style.cssText = 'position:fixed;left:' + tx + 'px;top:' + ty + 'px;width:10px;height:10px;margin:-5px 0 0 -5px;border:2px solid #12e0c4;border-radius:50%;z-index:2147483646;pointer-events:none;opacity:.95;transition:all .5s ease-out;';+ (document.body || document.documentElement).appendChild(ring);+ requestAnimationFrame(() => { ring.style.width='44px'; ring.style.height='44px'; ring.style.margin='-22px 0 0 -22px'; ring.style.opacity='0'; });+ setTimeout(() => ring.remove(), 540);+ }, 400);+ }, Math.round(x), Math.round(y), !!click);+ } catch (e) {}+} function setupErrorCollection(pg, errorsArr) { // v1.9.163 (crash fix): bounded buffer + NO requestfailed listener. The requestfailed listener // enabled the CDP Network domain, whose per-request event stream is a firehose on request-heavy@@ -8418,8 +8448,18 @@ const server = http.createServer(async (req, res) => { try { ({ tab, tabId } = resolveTabOrError(session, resolvedId, args)); } catch (e) { sendTabResolveError(res, e); return; } try {- if (args.selector) await withTimeout(tab.page.click(args.selector), 10_000, 'page.click');- else await withTimeout(tab.page.mouse.click(Number(args.x), Number(args.y)), 10_000, 'mouse.click');+ // v1.9.164: show the animated cursor gliding to the target BEFORE the real click, so the+ // user can see pup is driving. Default on; {showCursor:false} skips it.+ const _cursor = args.showCursor !== false;+ if (args.selector) {+ let _box = null;+ try { _box = await tab.page.$eval(args.selector, el => { const r = el.getBoundingClientRect(); return { x: r.x + r.width / 2, y: r.y + r.height / 2 }; }); } catch (e) {}+ if (_cursor && _box) { await showPupCursor(tab.page, _box.x, _box.y); await new Promise(r => setTimeout(r, 440)); }+ await withTimeout(tab.page.click(args.selector), 10_000, 'page.click');+ } else {+ if (_cursor) { await showPupCursor(tab.page, Number(args.x), Number(args.y)); await new Promise(r => setTimeout(r, 440)); }+ await withTimeout(tab.page.mouse.click(Number(args.x), Number(args.y)), 10_000, 'mouse.click');+ } sendJSON(res, { success: true, output: JSON.stringify({ ok: true, clicked: args.selector || { x: Number(args.x), y: Number(args.y) }, sessionId: resolvedId, tabId, _hint: 'Click dispatched (isTrusted, CDP-level). Verify the effect with browser_eval (e.g. document.title or a state probe) — a click that hit nothing still returns ok.' }) }); } catch (e) { sendJSON(res, { success: false, errorCode: 'click_failed', error: `browser_click failed: ${e.message}`, _hint: args.selector ? `Selector "${args.selector}" may not exist/be visible. Probe it first: browser_eval {"expr":"!!document.querySelector('${args.selector}')"} — or click by x/y from a browser_screenshot.` : 'x/y click failed — coordinates are page-viewport pixels; take a browser_screenshot to aim.' });