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
Put the owning AI thread ABOVE the taskbar hover-preview, where John was actually looking. The header Windows draws above the preview IS the window title (Chrome derives it from document.title), so the tooltip work in 1.9.101 was real but invisible there. The thread tag now LEADS the title โ 'adom-tsci ยท Example Domain (session: x)' โ so it survives the ~25-30 char truncation in that header and answers 'which of my 20 threads made this window' at a glance. Implemented WITHOUT adding a third title mutator: the code already documents that two observers writing the same region ping-pong forever, peg the renderer and flood CDP (which hung browser_open_tab on Edge), so the wiki glyph and the new thread tag are now ONE composed prefix slot under ONE observer, applied in a fixed order, and stripping only ever removes decorations we know we wrote (never a page title that merely contains a middot). Tag capped at 18 chars; re-asserted after navigation.
4 files changed
+71−21
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "1.9.102",- "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.102/adom-bridge-puppeteer-v1.9.102.zip",- "sha256": "ba56c4fd17822628b5aace0c1041e0660ddd52f4067d2bad27ba421a9bc265c1",- "size": 373367,+ "version": "1.9.103",+ "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.103/adom-bridge-puppeteer-v1.9.103.zip",+ "sha256": "857266cdc9e15637c8d293a368e821d7c08afff4d9b36a29a17ac37962a2771e",+ "size": 374488, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-1.9.102+1.9.103
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "1.9.102",+ "version": "1.9.103", "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+65−15@@ -2871,22 +2871,61 @@ async function autoSignWikiFromDesktop(page, nextPath) { // it, and it doesn't fight the session-suffix injector (that touches the END, this the START). // v1.9.1: WORD label, not a cryptic emoji (John saw a bare ๐ and had no idea what it meant). // The tab title leads with "๐ Logged in ยท " or "๐ Public ยท " so the mode is unmistakable.+// v1.9.103 (John: "show that info above the preview") โ UNIFIED TITLE DECORATION, one observer.+// The text Windows draws above the taskbar hover-preview IS the window title, and Chrome derives that+// from document.title, so the ONLY way to get the owning AI thread up there is to decorate the title.+// There were already TWO title mutators (this wiki glyph prefixing the START, and the session-suffix+// injector appending the END) and the code comments record why a THIRD is dangerous: two observers+// writing the same region ping-pong forever, peg the renderer and flood CDP (that HUNG browser_open_tab+// on Edge). So instead of adding one, the prefix is now a SINGLE composed slot: an AI-thread tag and the+// wiki label are both written by one applier under one observer, in a fixed order, and stripping only+// ever removes decorations we know we wrote (never a page title that merely contains " ยท ").+// Result: "adom-tsci ยท Example Domain (session: x)" โ the thread is the FIRST thing visible, so it+// survives the ~25-30 char truncation in the preview header, which is the whole point.+function _titleDecorFn(state) {+ try {+ window.__pupThreadTag = state.threadTag === null ? window.__pupThreadTag : state.threadTag;+ window.__pupWikiLabel = state.wikiLabel === null ? window.__pupWikiLabel : state.wikiLabel;+ const strip = (t) => {+ let out = t;+ const tag = window.__pupThreadTag;+ const pull = () => {+ if (tag && out.indexOf(tag + ' \u00b7 ') === 0) { out = out.slice(tag.length + 3); return true; }+ const m = out.match(/^(?:\u25CF Logged in|\u25CB Public|\uD83D\uDD13 Logged in|\uD83D\uDCD6 Public) \u00b7 /);+ if (m) { out = out.slice(m[0].length); return true; }+ return false;+ };+ for (let i = 0; i < 4 && pull(); i++) {}+ return out;+ };+ const apply = () => {+ try {+ const parts = [];+ if (window.__pupThreadTag) parts.push(window.__pupThreadTag);+ if (window.__pupWikiLabel) parts.push(window.__pupWikiLabel);+ const decor = parts.length ? parts.join(' \u00b7 ') + ' \u00b7 ' : '';+ const base = strip(document.title || '');+ const want = decor + base;+ if ((document.title || '') !== want) document.title = want;+ } catch (e) {}+ };+ window.__pupApplyTitleDecor = apply;+ apply();+ const t = document.querySelector('title') || document.head || document.documentElement;+ if (t && !window.__pupDecorObs) {+ try { window.__pupDecorObs = new MutationObserver(apply); window.__pupDecorObs.observe(t, { childList: true, subtree: true, characterData: true }); } catch (e) {}+ }+ } catch (e) {}+}+// Set/refresh the decoration. Pass null for a slot you are not changing.+async function setTitleDecor(page, { threadTag = null, wikiLabel = null } = {}) {+ const st = { threadTag, wikiLabel };+ try { await page.evaluateOnNewDocument(_titleDecorFn, st); } catch (e) {}+ try { await page.evaluate(_titleDecorFn, st); } catch (e) {}+}+// Back-compat shim: every existing caller passes a wiki label and expects the old behaviour. async function setWikiModeGlyph(page, label) {- const fn = (lbl) => {- try {- window.__pupWikiLabel = lbl;- const prefix = lbl + ' ยท ';- // v1.9.19: strip the CURRENT monochrome prefixes and any LEGACY emoji one, so a window- // carried over from an older bridge heals instead of stacking two prefixes.- const strip = (t) => t.replace(/^(?:[\u25CF\u25CB]|\uD83D[\uDD13\uDCD6])\s?(?:Logged in|Public)\s\u00b7\s/, '');- const ensure = () => { try { const cur = document.title || ''; if (!cur.startsWith(prefix)) document.title = prefix + strip(cur); } catch (e) {} };- ensure();- const t = document.querySelector('title') || document.head || document.documentElement;- if (t && !window.__pupWikiGlyphObs) { try { window.__pupWikiGlyphObs = new MutationObserver(ensure); window.__pupWikiGlyphObs.observe(t, { childList: true, subtree: true, characterData: true }); } catch (e) {} }- } catch (e) {}- };- try { await page.evaluateOnNewDocument(fn, label); } catch (e) {}- try { await page.evaluate(fn, label); } catch (e) {}+ return setTitleDecor(page, { wikiLabel: label }); } function wikiViewHint(url, view, auth) {@@ -6240,6 +6279,14 @@ const server = http.createServer(async (req, res) => { session._lastThread = _callerThread; session._lastContainer = _callerContainer; console.log(`[caller] "${sessionId}" owned by AI thread "${_callerThread}"${_callerContainer ? ` (${_callerContainer})` : ''}`);+ // v1.9.103: put the thread FIRST in the window title, which is the text Windows draws above+ // the taskbar hover-preview. Kept SHORT (18 chars) on purpose: that header truncates around+ // 25-30 chars, so a long tag would push out the page title AND get cut itself. This is the+ // one surface that answers "which of my 20 threads made this window" at a glance.+ try {+ const tag = String(_callerThread).trim().slice(0, 18);+ if (tag) { session._threadTag = tag; await setTitleDecor(session.page, { threadTag: tag }); }+ } catch (e) {} } if (session && _appIconB64) { session._appIconB64 = _appIconB64; session._appIconMime = 'image/png'; } if (session && _appName) session._appName = _appName;@@ -8251,6 +8298,9 @@ const server = http.createServer(async (req, res) => { setTimeout(() => { if (session) session._faviconRetried = false; applyAppOverlay(session, resolvedId).catch(() => {}); }, 4500); // v1.9.1: on an Adom nav, re-check auth (login may have completed since open) and // refresh the tab label so it becomes "๐ Logged in" once actually authenticated.+ // v1.9.103: a navigation replaces the document, so re-assert the thread tag (cheap, and+ // evaluateOnNewDocument already re-runs it at document-start; this covers the live page).+ try { if (session && session._threadTag) setTitleDecor(session.page, { threadTag: session._threadTag }).catch(() => {}); } catch (e) {} if (isAdomUrl(args.url)) { setTimeout(async () => { try {