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
Round-trip symmetry for the wiki view toggle plus the identity extension. John round-tripped the toggle and caught the asymmetry: the public direction relaunched into a throwaway jar but the logged-in direction signed in the throwaway itself instead of coming home, so authed from any toggle-created iso jar now takes the tab-preserving relaunch back to shared adom-you where logins enrich the shared store. The Chrome profile chip stops leaking internal names: anonymous jars read Adom anonymous. A second delayed raise fixes the toggle window returning in the background after a user click. The Chromium launches-when-Windows-starts promo infobar is suppressed in layers (candidate feature disables plus disable-field-trial-config, which is also the determinism WHY-CFT promises, plus promotional-tabs pref). And the new Adom Identity extension rides every adom-you launch: the toolbar icon is the user's avatar (staged from settings at launch, favicon fallback), click for the identity card explaining the shared adom-you profile; pinned via the computed unpacked id, algorithm validated against a live id
11 files changed
+141−17
adom-bridge-puppeteer-manifest.json+4−4src/BRIDGE_VERSION+1−1src/bridge.json+1−1src/extension-identity/fg-500.woff2src/extension-identity/fg-700.woff2src/extension-identity/identity.html+39src/extension-identity/identity.js+10src/extension-identity/manifest.json+18src/extension-identity/satoshi-400.woff2src/extension-identity/satoshi-500.woff2src/server.js+68−11adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "2.0.56",- "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.56/adom-bridge-puppeteer-v2.0.56.zip",- "sha256": "84543102de7229b2bfe08868902228d659266589fe13a99e40feac8680b09646",- "size": 745602,+ "version": "2.0.57",+ "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.57/adom-bridge-puppeteer-v2.0.57.zip",+ "sha256": "d94306acd21385f02f54fb6c1838f2f49f941c089b5c6ace10873796b0b2e553",+ "size": 826249, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.56+2.0.57
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.56",+ "version": "2.0.57", "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/extension-identity/fg-500.woff2added⋯ 1 unchanged line ⋯
src/extension-identity/fg-700.woff2added⋯ 1 unchanged line ⋯
src/extension-identity/identity.htmladded+39@@ -0,0 +1,39 @@+<!doctype html>+<html>+<head>+<meta charset="utf-8">+<style>+ @font-face { font-family: 'Familjen Grotesk'; font-weight: 700; src: url(fg-700.woff2) format('woff2'); }+ @font-face { font-family: 'Satoshi'; font-weight: 400; src: url(satoshi-400.woff2) format('woff2'); }+ @font-face { font-family: 'Satoshi'; font-weight: 500; src: url(satoshi-500.woff2) format('woff2'); }+ :root { color-scheme: dark; }+ body { margin: 0; width: 264px; background: #0d1117; color: #c9d1d9;+ font: 400 13px 'Satoshi', sans-serif; border: 1px solid #30363d; }+ .card { padding: 16px 16px 12px; text-align: center; }+ .card img.avatar { width: 56px; height: 56px; border-radius: 50%; border: 2px solid #00b8b1;+ display: block; margin: 0 auto 10px; background: #161b22; }+ .who { font: 700 16px 'Familjen Grotesk', sans-serif; color: #e6edf3; }+ .as { font-size: 11px; color: #8b949e; margin-bottom: 10px; }+ .desc { text-align: left; font-size: 12px; line-height: 1.5; color: #c9d1d9;+ background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 10px 12px; }+ .desc b { color: #00d4cb; font-weight: 500; }+ .foot { padding: 8px 16px 10px; font: 400 10.5px 'JetBrains Mono', monospace; color: #8b949e;+ border-top: 1px solid #30363d; margin-top: 12px; display: flex; justify-content: space-between; }+ .foot .dot { color: #3fb950; }+</style>+</head>+<body>+ <div class="card">+ <img class="avatar" src="icon128.png" alt="">+ <div class="who">adom-you</div>+ <div class="as">the shared Adom browsing profile</div>+ <div class="desc">+ Every pup window on this profile surfs as <b>adom-you</b>: logins made here are remembered in+ the shared credential store, so pup can sign in for you next time on every site it has seen.+ Throwaway windows use isolated profiles and never carry this identity.+ </div>+ </div>+ <div class="foot"><span><span class="dot">●</span> managed by pup</span><span id="ver"></span></div>+ <script src="identity.js"></script>+</body>+</html>
src/extension-identity/identity.jsadded+10@@ -0,0 +1,10 @@+// Identity card: version stamp from pup /health when reachable (cosmetic only).+(async () => {+ for (const port of [64230, 8851]) {+ try {+ const r = await fetch(`http://127.0.0.1:${port}/health`, { signal: AbortSignal.timeout(1000) });+ const j = await r.json();+ if (j && j.bridge === 'puppeteer') { document.getElementById('ver').textContent = 'pup ' + (j.version || ''); return; }+ } catch (e) {}+ }+})();
src/extension-identity/manifest.jsonadded+18@@ -0,0 +1,18 @@+{+ "manifest_version": 3,+ "name": "Adom Identity",+ "version": "0.1.0",+ "description": "Who this browser is surfing as: the shared adom-you profile. Click for the identity card.",+ "action": {+ "default_popup": "identity.html",+ "default_title": "Surfing as adom-you"+ },+ "icons": {+ "16": "icon16.png",+ "48": "icon48.png",+ "128": "icon128.png"+ },+ "host_permissions": [+ "http://127.0.0.1/*"+ ]+}
src/extension-identity/satoshi-400.woff2added⋯ 1 unchanged line ⋯
src/extension-identity/satoshi-500.woff2added⋯ 1 unchanged line ⋯
src/server.js+68−11@@ -2472,12 +2472,16 @@ function prepareCleanProfile(userDataDir) { // it is the same on every machine that stages to ~/.adom/pup-extension. try { if (pupSettings().toolbarExtension !== 'off') {- const PIN_ID = 'hifinjmfmabkmichcicmfckakhokmpbh'; prefs.extensions = prefs.extensions || {}; const pins = Array.isArray(prefs.extensions.pinned_extensions) ? prefs.extensions.pinned_extensions : [];- if (!pins.includes(PIN_ID)) { pins.push(PIN_ID); prefs.extensions.pinned_extensions = pins; }+ for (const d of [path.join(os.homedir(), '.adom', 'pup-extension'), path.join(os.homedir(), '.adom', 'pup-identity-extension')]) {+ const id2 = unpackedExtensionId(d);+ if (!pins.includes(id2)) pins.push(id2);+ }+ prefs.extensions.pinned_extensions = pins; } } catch (e) {}+ try { prefs.browser = prefs.browser || {}; prefs.browser.promotional_tabs_enabled = false; } catch (e) {} prefs.profile.exit_type = 'Normal'; prefs.profile.exited_cleanly = true; // v1.9.129: the durable profile exists to ACCUMULATE logins — make sure Chrome's own@@ -5588,12 +5592,10 @@ async function showCaptureToast(pg, previewDataUrl, line1) { // browser is CfT and the toolbarExtension setting is on, every profile launch carries the flag // and every window is BORN with the toolbar: no install step exists at all. This helper just // stages the extension files at a stable path for the flag to point at.-function stageToolbarExtension() {- if (process.platform !== 'win32') return null;- if (pupSettings().toolbarExtension === 'off') return null;- const srcDir = path.join(__dirname, 'extension');+function _stageExtDir(srcName, dstName) {+ const srcDir = path.join(__dirname, srcName); if (!fs.existsSync(path.join(srcDir, 'manifest.json'))) return null;- const dstDir = path.join(os.homedir(), '.adom', 'pup-extension');+ const dstDir = path.join(os.homedir(), '.adom', dstName); try { fs.mkdirSync(dstDir, { recursive: true }); for (const f of fs.readdirSync(srcDir)) {@@ -5603,6 +5605,40 @@ function stageToolbarExtension() { return dstDir; } catch (e) { return null; } }+function stageToolbarExtension() {+ if (process.platform !== 'win32') return null;+ if (pupSettings().toolbarExtension === 'off') return null;+ return _stageExtDir('extension', 'pup-extension');+}+// v2.0.57 (John: "we could never show the Adom profile avatar in the chrome toolbar — now we+// can"): a second staged extension whose toolbar icon IS the user's avatar, click → the identity+// card ("surfing as adom-you"). Rides ONLY the adom-you profile (an isolated throwaway carrying+// the identity would lie). The avatar (settings.identityAvatarB64, same source as the owner chip)+// overrides the icon files at stage time; the Adom favicon stays as the fallback.+async function stageIdentityExtension() {+ if (process.platform !== 'win32') return null;+ if (pupSettings().toolbarExtension === 'off') return null;+ const dstDir = _stageExtDir('extension-identity', 'pup-identity-extension');+ if (!dstDir) return null;+ try {+ const b64 = pupSettings().identityAvatarB64;+ if (b64) {+ const sharp = require('sharp');+ const buf = Buffer.from(String(b64).replace(/^data:image\/[a-z+]+;base64,/, ''), 'base64');+ for (const size of [16, 48, 128]) {+ const out = await sharp(buf).resize(size, size, { fit: 'cover' }).png().toBuffer();+ fs.writeFileSync(path.join(dstDir, `icon${size}.png`), out);+ }+ }+ } catch (e) {}+ return dstDir;+}+// Chromium's unpacked-extension id: first 16 bytes of SHA-256 over the UTF-16LE path, hex mapped+// a..p. Validated against a live id 2026-08-10 (utf16le is the correct encoding on Windows).+function unpackedExtensionId(dir) {+ const h = require('crypto').createHash('sha256').update(Buffer.from(dir, 'utf16le')).digest('hex').slice(0, 32);+ return [...h].map(c => String.fromCharCode('a'.charCodeAt(0) + parseInt(c, 16))).join('');+} async function startAnnotation(session, sessionId, callerThread, opts) { const tab = (session.activeTabId && (session.tabs || []).find(t => t.tabId === session.activeTabId)) || (session.tabs || [])[0]; const pg = tab && tab.page;@@ -7647,6 +7683,14 @@ async function getOrLaunchBrowser(profileName, { freshProfile = false, strictPer '--no-first-run', '--no-default-browser-check', '--disable-default-apps', '--disable-sync', '--disable-background-networking', '--disable-infobars',+ // v2.0.57 (John: the "Chromium now launches when Windows starts" promo infobar on fresh+ // profiles is hideous): layered suppression. Unknown --disable-features names are ignored+ // harmlessly, so we name every plausible id for the launch-on-startup promo; and+ // --disable-field-trial-config turns off the experiment config that gates promos like it,+ // which is also the determinism WHY-CFT promises (same browser on every machine).+ '--disable-field-trial-config',+ '--disable-features=WinLaunchOnLogon,LaunchChromeOnWindowsLogon,StartupBoost,BeginBrowsingInstantly,DesktopStartupPromo,IPH_LaunchOnStartup',+ '--ash-no-nudges', // ADOM-YOU VISUAL IDENTITY (John, 2026-08-06). A custom logo image on the // Chrome profile chip is impossible for a local non-signed-in profile // (faking the gaia picture shows a gray generic + a permanent "Action@@ -7812,7 +7856,8 @@ async function getOrLaunchBrowser(profileName, { freshProfile = false, strictPer // own name so the user can still tell windows apart. Both wear the // Adom-logo avatar so ANY pup window is visually distinct from real Chrome. brandPupProfile(userDataDir, profileName,- profileName === DEFAULT_PROFILE ? 'Adom' : ('Adom · ' + profileName));+ profileName === DEFAULT_PROFILE ? 'Adom'+ : (/^iso-.*-pub$/.test(profileName) ? 'Adom · anonymous' : ('Adom · ' + profileName))); } // ─── Helper: kill any Chrome processes locking this profile dir ───@@ -8014,8 +8059,11 @@ async function getOrLaunchBrowser(profileName, { freshProfile = false, strictPer return b; }; - // v2.0.53: stage the toolbar extension; CfT candidates carry it as --load-extension below.+ // v2.0.53/57: stage the extensions; CfT candidates carry them as --load-extension below.+ // The identity extension rides ONLY adom-you (throwaway profiles must not claim the identity). const _tbExtDir = stageToolbarExtension();+ const _idExtDir = (path.basename(userDataDir || '') === 'adom-you') ? await stageIdentityExtension() : null;+ const _extDirs = [_tbExtDir, _idExtDir].filter(Boolean); // ─── Spawn-verified launch: try each candidate browser in order, up to 3 ─── // attempts each (with orphan/lock cleanup between attempts). If a browser can't@@ -8037,7 +8085,7 @@ async function getOrLaunchBrowser(profileName, { freshProfile = false, strictPer else delete launchOpts.executablePath; // v2.0.53: the toolbar rides ONLY on CfT (branded Chrome ignores/removed the flag). launchOpts.args = launchOpts.args.filter(a => !a.startsWith('--load-extension='));- if (_tbExtDir && cand.kind === 'chrome-for-testing') launchOpts.args.push(`--load-extension=${_tbExtDir}`);+ if (_extDirs.length && cand.kind === 'chrome-for-testing') launchOpts.args.push(`--load-extension=${_extDirs.join(',')}`); lastErr = null; for (let attempt = 1; attempt <= MAX_ATTEMPTS; attempt++) { try {@@ -11914,7 +11962,12 @@ const server = http.createServer(async (req, res) => { // profile; every other window keeps its login. let _profileShared = /adom-wiki-authed|adom-you/i.test(session.profileName || ''); try { for (const [k5, s5] of sessions) { if (k5 !== sessionId && s5 && s5.profileName === session.profileName) { _profileShared = true; break; } } } catch (e) {}- const _canInPlace = (view === 'authed') ? true : !_profileShared;+ // v2.0.57 (John round-tripped the toggle: authed direction signed in the THROWAWAY+ // profile instead of coming home): in-place authed is only correct when the window is+ // NOT on a toggle-created iso-* jar. From a throwaway, the authed direction takes the+ // tab-preserving relaunch back to the shared adom-you jar, so the round trip is+ // symmetric and logins land where they enrich the shared credential store.+ const _canInPlace = (view === 'authed') ? !/^iso-/.test(session.profileName || '') : !_profileShared; if (_canInPlace) { try { let targetUrl = null;@@ -12114,6 +12167,10 @@ const server = http.createServer(async (req, res) => { // the user's active window — the reason John "never saw the switch work"). Plus a taskbar // flash as a belt-and-suspenders notice in case Windows' foreground lock denies the raise. await osRaiseSessionWindow(s2, sessionId, 'you clicked the taskbar menu to switch this wiki view');+ // v2.0.57 (John: "it re-opened in the bg which didn't make sense, I was in the fg"):+ // one delayed second raise — the first can lose the foreground race while the new+ // window is still materializing.+ setTimeout(() => { try { const s4 = sessions.get(sessionId); if (s4) osRaiseSessionWindow(s4, sessionId, 'finishing the view switch you clicked').catch(() => {}); } catch (e) {} }, 2500); // v1.9.29 BUG FIX: VERIFY the window actually came back. John clicked the toggle, the old // window closed, captions fired, and NO window returned: the relaunch had happened but the // window stayed unfindable/off-screen (the identity stamp logged "No visible window"),