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.399 (insiders): pup-bridge#94: canonical pup_screen_record_*/pup_recorder_* names for the Chrome screen-share recorder (desktop_* names stay as aliases until ab-core serves them natively, adom-bridge#143), recorder responses carry the naming/ownership hint. ship.sh publishes the skills pkg before creating the release (a release-born version row never gets the tarball, adom/wiki#188). Archive size shown when the download is reused.
4 files changed
+38−17
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.398+2.0.399
src/bridge.json+10−3@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.398",+ "version": "2.0.399", "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.",@@ -78,7 +78,13 @@ "pup_scroll", "pup_set_viewport", "pup_screenshot_element",- "pup_render_html"+ "pup_render_html",+ "pup_recorder_open",+ "pup_screen_record_start",+ "pup_screen_record_stop",+ "pup_screen_record_status",+ "pup_screen_record_list",+ "pup_recorder_close" ], "statusVerb": "pup_readiness", "updateManifestUrl": "https://wiki.adom.inc/api/v1/pages/pup-bridge/files/adom-bridge-puppeteer-manifest.json",@@ -137,5 +143,6 @@ }, "uninstall": "pup_uninstall", "insidersManifestUrl": "https://wiki.adom.inc/api/v1/pages/insiders/files/pup-bridge/version.json",- "_insidersNote": "ab 2.0.99+ probes this manifest FIRST with the desktop user's own wiki login; 200 + parseable = that user follows the insiders tier (readers of the shared private adom/insiders page). Any failure falls back to updateManifestUrl silently. Convention: adom/insiders carries ONLY <product>/version.json manifests; the bytes are releases on this product's own page. The public manifest moves only via tools/promote.sh with a human's attestation (pup-bridge#86)."+ "_insidersNote": "ab 2.0.99+ probes this manifest FIRST with the desktop user's own wiki login; 200 + parseable = that user follows the insiders tier (readers of the shared private adom/insiders page). Any failure falls back to updateManifestUrl silently. Convention: adom/insiders carries ONLY <product>/version.json manifests; the bytes are releases on this product's own page. The public manifest moves only via tools/promote.sh with a human's attestation (pup-bridge#86).",+ "_recorderNaming": "pup-bridge#94 / adom-bridge#143: pup_screen_record_* + pup_recorder_* are the canonical names of pup's Chrome screen-share recorder; desktop_record_* / desktop_recorder_* stay as aliases (and the two desktop_ prefixes stay claimed) ONLY until ab-core serves them natively, then both leave this manifest." }
src/chrome.js+2−1@@ -490,13 +490,14 @@ function installChrome({ onProgress } = {}) { state.errorCode = 'chrome_download_failed'; throw new Error(`the Chrome for Testing archive is not on disk after the download (${archive || 'no path returned'})`); }+ if (!state.bytesTotal) { try { state.bytesTotal = fs.statSync(archive).size; state.bytesDownloaded = state.bytesTotal; state.progressPct = 100; } catch {} } // archive reused from disk: no download callback fired const { computeExecutablePath: _cep } = require('@puppeteer/browsers'); const expectedExe = _cep({ browser: Browser.CHROME, buildId, cacheDir: cacheDir() }); let versionedDir = path.dirname(expectedExe); while (versionedDir && !path.basename(versionedDir).includes(buildId) && path.dirname(versionedDir) !== versionedDir) versionedDir = path.dirname(versionedDir); const partial = versionedDir + '.partial'; state.phase = 'unpacking'; state.unpackStartedAt = Date.now(); state.unpackBytes = 0; state.unpackMethod = null;- console.log(`[chrome] downloaded ${archive} (${state.bytesTotal} bytes) — unpacking into ${partial}`);+ console.log(`[chrome] archive ${archive} (${state.bytesTotal} bytes) on disk — unpacking into ${partial}`); const un = await unpackSupervised(archive, partial, { onBytes: (b) => { state.unpackBytes = b; }, onMethod: (m) => { state.unpackMethod = m; } }); const exeInPartial = path.join(partial, path.relative(versionedDir, expectedExe)); if (!fileExists(exeInPartial)) {
src/server.js+25−12@@ -15047,9 +15047,15 @@ const server = http.createServer(async (req, res) => { V('pup_record_stop', 'Stop recording; returns the saved file.', { sessionId: 'required str' }, 30, { sessionId: 'work' }), V('pup_record_status', 'Recording status for a session.', { sessionId: 'required str' }, 10, { sessionId: 'work' }), V('pup_record_list', 'List recordings.', {}, 10, {}),- V('desktop_recorder_open', 'Open the desktop screen-recorder UI. (ab-core capability served by pup on its behalf until adom-bridge#143; moving out of pup.)', {}, 20, {}),- V('desktop_record_start', 'Start a desktop screen recording. (ab-core capability served by pup on its behalf until adom-bridge#143; moving out of pup.)', { outPath: 'optional str' }, 20, {}),- V('desktop_record_stop', 'Stop the desktop screen recording; returns the file.', {}, 30, {}),+ V('pup_recorder_open', 'Open pup\'s Chrome screen-share recorder HUD (WebM; consent = the visible HUD). Canonical name (pup-bridge#94).', { reason: 'str (required)' }, 20, {}),+ V('pup_screen_record_start', 'Start a whole-screen recording through Chrome screen-share (WebM VP9, system audio + mic). Canonical name; for a background no-browser MP4 of one window use ab-core desktop_record_window_start.', { reason: 'str (required)', confirmDesktopNotTabRecording: 'true', fps: 'int', audio: 'bool', maxDurationMs: 'int' }, 20, {}),+ V('pup_screen_record_stop', 'Stop the Chrome screen recording; returns the .webm path.', {}, 30, {}),+ V('pup_screen_record_status', 'Status of the Chrome screen recorder + any active clip.', {}, 10, {}),+ V('pup_screen_record_list', 'List completed Chrome screen recordings on disk.', {}, 10, {}),+ V('pup_recorder_close', 'Close the Chrome screen-recorder HUD (auto-stops a clip).', {}, 15, {}),+ V('desktop_recorder_open', 'ALIAS of pup_recorder_open (routes to ab-core once its native recorder lands, adom-bridge#143).', {}, 20, {}),+ V('desktop_record_start', 'ALIAS of pup_screen_record_start (routes to ab-core once its native recorder lands, adom-bridge#143).', { outPath: 'optional str' }, 20, {}),+ V('desktop_record_stop', 'ALIAS of pup_screen_record_stop.', {}, 30, {}), V('pup_readiness', 'Readiness + which browser pup will drive (installed Chrome/Edge, or cached Chrome for Testing) + the full candidate list and current default. READ-ONLY; never downloads.', {}, 10, {}), V('pup_prewarm', 'Install Chrome for Testing WITHOUT opening a window, and pin it as the default. Use when you specifically want CfT rather than the machine\'s installed Chrome/Edge.', { wait: 'optional bool — block until installed', setDefault: 'optional bool (default true) — pin CfT as the default' }, 240, {}), V('pup_use', 'Pin (or clear) the browser pup drives by default: chrome | edge | cft | auto (or an explicit executablePath). "cft" fetches Chrome for Testing then pins it. With {browser:"chrome", install:true} it DOWNLOADS & INSTALLS real Google Chrome on an Edge-only box, then pins it — SILENT on a normal PC; on a locked-down box (VM/managed device) it needs a Windows approval, so the bridge pops a native "click YES on the UAC" notification and, if it expires, re-notifies with a one-tap "Approve now" (all autonomous — no AI turn). Poll pup_readiness.chromeStablePhase: installing → awaiting_uac → ready. Persists across restarts; launch still spawn-verifies + falls back.', { browser: '"chrome" | "edge" | "cft" | "auto"', install: 'optional bool — with browser:"chrome", install real Chrome if missing', elevate: 'optional "auto"(default)|true|false — auto: quiet install, prompt only if it needs admin; false: never prompt; true: go straight to the prompt', executablePath: 'optional — pin an exact browser binary' }, 240, {}),@@ -15080,9 +15086,9 @@ const server = http.createServer(async (req, res) => { V('pup_wait', 'Wait N ms (or for a selector) before the next step.', { sessionId: 'required str', ms: 'optional int', selector: 'optional str' }, 60, { sessionId: 'work', ms: 500 }), V('pup_rescan', 'Recover orphaned sessions: reconnect dropped CDP sockets + rebuild sessions from window titles. Pass adoptOrphans:true to also adopt untagged tabs.', { adoptOrphans: 'optional bool' }, 30, {}), V('pup_close', 'Close ALL pup sessions + windows at once (destructive). NOTE: `{}` here does NOT mean "the active session" the way it does on other session-scoped verbs — with no args this closes EVERY window, across every AI thread on the machine, with no confirmation. To close ONE window use pup_close_window {sessionId}. Pass {sessionId} here only if you genuinely mean that one session.', {}, 20, {}),- V('desktop_record_status', 'Status of the desktop screen recorder + any active clip.', {}, 10, {}),- V('desktop_record_list', 'List completed desktop recordings on disk.', {}, 10, {}),- V('desktop_recorder_close', 'Close the desktop screen-recorder UI.', {}, 15, {}),+ V('desktop_record_status', 'ALIAS of pup_screen_record_status.', {}, 10, {}),+ V('desktop_record_list', 'ALIAS of pup_screen_record_list.', {}, 10, {}),+ V('desktop_recorder_close', 'ALIAS of pup_recorder_close.', {}, 15, {}), V('pup_configure', 'Get/set user-facing pup preferences (persisted across bridge updates). taskbarGrouping: "split" (default — one taskbar button PER WINDOW, each badged with its own tab count; best for telling AI threads apart) | "grouped" (all pup windows stack under ONE "Adom Pup" button, badge shows window count; tidy taskbar). Applies to live windows immediately. Ask the USER which they prefer before changing it — this is their taskbar. WINDOWS ONLY: macOS has no taskbar, so the setting is stored but INERT there; the reply carries platform + taskbarSupported so branch on those, not on this text.', { taskbarGrouping: 'optional "split"|"grouped"', taskbarActivity: 'optional "progress"|"flash"|"off" — how pup signals it is working on a window, on that window\'s taskbar button: a determinate progress bar sized to the operation\'s running-average time (default), the old orange flash, or nothing. Replaces the former openFlash/autoFlash/agentActivity toggles.', reportIssues: 'optional "on"|"off" — pup\'s bug-report invitation (_reportIssues), on by default', autoLogin: 'optional "on"|"off" — auto-fill a vault-matched login form on page load (fill only, never submits), on by default', overlaySize: 'optional "50"|"100" — how big the favicon badge is drawn on the taskbar button. "50" (the DEFAULT) draws it at half size so it stays clear of the thread tile\'s bottom line of text; "100" is the older, larger badge' }, 15, { taskbarGrouping: 'grouped' }), V('pup_describe', 'This list — the bridge\'s verbs + schemas, for AD\'s Verbs tab.', {}, 10, {}), ] });@@ -19972,10 +19978,11 @@ const server = http.createServer(async (req, res) => { } // ─── Desktop recording (HUD) ───────────────────────────────────+ case 'pup_recorder_open': case 'desktop_recorder_open': { try { await ensureRecorderWindowOpen(args.reason);- sendJSON(res, { success: true, output: JSON.stringify({+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify({ ok: true, opened: true, reason: desktopRecorder.reason, })}); } catch (e) {@@ -19983,24 +19990,27 @@ const server = http.createServer(async (req, res) => { } return; }+ case 'pup_screen_record_start': case 'desktop_record_start': { try { const r = await desktopRecordStartImpl(args);- sendJSON(res, { success: true, output: JSON.stringify({ ok: true, ...r })});+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify({ ok: true, ...r })}); } catch (e) { sendJSON(res, { success: false, error: e.message }); } return; }+ case 'pup_screen_record_stop': case 'desktop_record_stop': { try { const r = await desktopRecordStopImpl(args);- sendJSON(res, { success: true, output: JSON.stringify({ ok: true, ...r })});+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify({ ok: true, ...r })}); } catch (e) { sendJSON(res, { success: false, error: e.message }); } return; }+ case 'pup_screen_record_status': case 'desktop_record_status': { const cur = desktopRecorder.current; const status = {@@ -20016,19 +20026,21 @@ const server = http.createServer(async (req, res) => { } : null, clipsThisSession: desktopRecorder.clipsThisSession, };- sendJSON(res, { success: true, output: JSON.stringify(status) });+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify(status) }); return; }+ case 'pup_screen_record_list': case 'desktop_record_list': {- sendJSON(res, { success: true, output: JSON.stringify({+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify({ ok: true, recordings: desktopRecordListImpl(), })}); return; }+ case 'pup_recorder_close': case 'desktop_recorder_close': { try { const summary = await closeRecorderWindow();- sendJSON(res, { success: true, output: JSON.stringify({+ sendJSON(res, { success: true, _hint: SCREEN_RECORDER_HINT, output: JSON.stringify({ ok: true, sessionSummary: summary, })}); } catch (e) {@@ -21128,6 +21140,7 @@ let FFMPEG_PATH = null; // v1.8.20: re-callable (was a boot-only IIFE). Recording verbs call it LAZILY when // FFMPEG_PATH is still null, so a user who installs ffmpeg AFTER the bridge started can // record immediately — no bridge restart needed. Re-scans cleanly each call.+const SCREEN_RECORDER_HINT = 'This is pup\'s CHROME screen-share recorder (getDisplayMedia -> WebM VP9, consent = the visible recorder HUD, system audio + mic mixing, cross-platform). Canonical names: pup_screen_record_start/stop/status/list + pup_recorder_open/close (pup-bridge#94); the desktop_record_* / desktop_recorder_* names are aliases that route to ab-core once its native recorder lands (adom-bridge#143). For a no-browser MP4 of ONE window captured in the background (occluded is fine, no picker), use ab-core\'s desktop_record_window_start/stop/status instead.'; function detectFFmpeg() { FFMPEG_PATH = null; const { spawnSync } = require('child_process');