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
Fix the dashboard's dead script. The action buttons added in 1.9.226 inlined onclick handlers INSIDE the page's template literal, and the nested quote-escaping produced a JavaScript syntax error — so the script never executed, SNAP was never defined, and the page rendered its static shell with zero data while the backend was working perfectly. Replaced every inline handler with data attributes plus ONE delegated click listener, which removes the nested-escaping layer entirely so this class of bug cannot recur. Also added a pre-ship check that extracts DASHBOARD_HTML, pulls out its <script>, and parses it with new Function() — node --check only validates the outer file and cannot see inside a template literal, which is exactly why four consecutive ships passed their syntax check while shipping a broken page.
4 files changed
+30−16
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.226",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.226/adom-bridge-puppeteer-v1.9.226.zip",- "sha256": "441b469687009d67a58937f7737bf94e32b35380065977f89c071ad4ba5105f7",- "size": 454305,+ "version": "1.9.227",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.227/adom-bridge-puppeteer-v1.9.227.zip",+ "sha256": "7d5a187e833f6fd16e6973b399b6e8de75dbc078a36d02122ec25c3080631df0",+ "size": 454581, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.226+1.9.227
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.226",+ "version": "1.9.227", "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+24−10@@ -7910,9 +7910,9 @@ footer{color:#5c6c7a;font-size:11px;padding:6px 18px 22px} <span class="pill" id="cM" style="display:none">minimal-touch</span> <select id="f"><option value="">all AI threads</option></select> <input id="q" placeholder="filter url / session…" size="22">- <button class="btn" onclick="act({action:'flash-all'})">flash all</button>- <button class="btn" onclick="act({action:'unflash-all'})">clear flashes</button>- <button class="btn danger" onclick="if(confirm('Close ALL pup windows?'))act({action:'close-all'})">close all</button>+ <button class="btn" data-act="flash-all">flash all</button>+ <button class="btn" data-act="unflash-all">clear flashes</button>+ <button class="btn danger" data-act="close-all" data-confirm="Close ALL pup windows?">close all</button> <span class="sub" id="age"></span> </header> <main id="m"><div class="empty">connecting…</div></main>@@ -7945,8 +7945,8 @@ function render(){ +'<div class="tbhead"><img class="tbicon" src="/dashboard/badge?session='+encodeURIComponent(g.wins[0].sessionId)+'&t='+d.ts+'" onerror="this.style.visibility=\'hidden\'">' +'<span class="tblabel">'+esc(g.label)+'</span>' +'<span class="tbmeta">taskbar button · '+g.wins.length+' window'+(g.wins.length>1?'s':'')+' · '+esc(g.grouping)+'</span>'- +'<button class="btn sm" onclick="g_flash('+JSON.stringify(JSON.stringify(g.windows))+',0)">flash</button>'- +'<button class="btn sm" onclick="g_flash('+JSON.stringify(JSON.stringify(g.windows))+',1)">clear</button></div>'+ +'<button class="btn sm" data-act="flash-group" data-ids="'+esc(g.windows.join(','))+'">flash</button>'+ +'<button class="btn sm" data-act="unflash-group" data-ids="'+esc(g.windows.join(','))+'">clear</button></div>' + g.wins.map(w=>{ const crashed=w.tabs.some(t=>t.crashed)||w.lostBrowser; return '<div class="card '+(w.foreground?'fg':'')+(crashed?' crash':'')+'">'@@ -7954,9 +7954,9 @@ function render(){ +'<img class="badge" src="/dashboard/badge?session='+encodeURIComponent(w.sessionId)+'&t='+d.ts+'" onerror="this.style.visibility=\'hidden\'">' +'<span class="sid">'+esc(w.sessionId)+'</span>' +'<span class="sub">'+esc(w.profile)+' · '+ago(w.uptimeMs)+'</span>'- +'<button class="btn sm" onclick="act({action:\'flash\',sessionId:'+JSON.stringify(w.sessionId)+'})">flash</button>'- +'<button class="btn sm" onclick="act({action:\'unflash\',sessionId:'+JSON.stringify(w.sessionId)+'})">clear</button>'- +'<button class="btn sm danger" onclick="act({action:\'close-window\',sessionId:'+JSON.stringify(w.sessionId)+'})">close</button>'+ +'<button class="btn sm" data-act="flash" data-sid="'+esc(w.sessionId)+'">flash</button>'+ +'<button class="btn sm" data-act="unflash" data-sid="'+esc(w.sessionId)+'">clear</button>'+ +'<button class="btn sm danger" data-act="close-window" data-sid="'+esc(w.sessionId)+'" data-confirm="Close window '+esc(w.sessionId)+'?">close</button>' +'</div>' +'<div class="tags">' +'<span class="tag '+(w.foreground?'fg':'bg')+'">'+(w.foreground?'FOREGROUND':'background')+'</span>'@@ -7985,13 +7985,27 @@ function render(){ +'<img class="fav" src="/dashboard/favicon?session='+encodeURIComponent(w.sessionId)+'&tab='+encodeURIComponent(t.tabId)+'" onerror="this.style.visibility=\'hidden\'">' +'<span class="id">'+esc(t.tabId)+'</span><span class="u">'+esc(t.title||t.url||'—')+'</span>' +(t.crashed?'<span class="x">crashed</span>':'')- +'<button class="btn xs" onclick="act({action:\'close-tab\',sessionId:'+JSON.stringify(w.sessionId)+',tabId:'+JSON.stringify(t.tabId)+'})">×</button>'+ +'<button class="btn xs" data-act="close-tab" data-sid="'+esc(w.sessionId)+'" data-tid="'+esc(t.tabId)+'">×</button>' +'</div>').join('')+'</div>' +'</div>';}).join('')+'</div>').join('') : '<div class="empty">no pup windows open'+(th||q?' matching this filter':'')+'</div>'; $('#ft').textContent='bridge up '+ago(d.bridge.uptimeMs)+' · '+d.bridge.platform+' · deps '+(d.bridge.depsOk?'ok':'MISSING')+' · profiles: '+Object.entries(d.profiles).map(([k,v])=>k+'('+v+')').join(', '); } async function act(p){try{await fetch('/dashboard/action',{method:'POST',headers:{'Content-Type':'application/json'},body:JSON.stringify(p)});}catch(e){}}-function g_flash(list,stop){try{JSON.parse(list).forEach(s=>act({action:stop?'unflash':'flash',sessionId:s}));}catch(e){}}+// v1.9.227: ONE delegated listener. The previous build inlined onclick handlers inside the page's+// template literal, and the nested quote-escaping produced a SYNTAX ERROR that killed the whole+// script — the shell rendered but no data ever did. Data attributes + delegation removes every layer+// of nested escaping, so this class of bug cannot recur.+document.addEventListener('click', ev => {+ const b = ev.target.closest('[data-act]'); if (!b) return;+ const a = b.dataset.act, c = b.dataset.confirm;+ if (c && !confirm(c)) return;+ if (a === 'flash-group' || a === 'unflash-group') {+ (b.dataset.ids || '').split(',').filter(Boolean)+ .forEach(sid => act({ action: a === 'flash-group' ? 'flash' : 'unflash', sessionId: sid }));+ return;+ }+ act({ action: a, sessionId: b.dataset.sid, tabId: b.dataset.tid });+}); $('#f').onchange=render; $('#q').oninput=render; const es=new EventSource('/dashboard/events'); es.onmessage=e=>{SNAP=JSON.parse(e.data);$('#live').classList.remove('stale');render();};