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
Close issue 42, the wiki sign-in race across shared-profile pup windows: auto-sign from the desktop wiki token now runs for the shared adom-you profile on ANY adom URL that is not the deliberately-anonymous public or isolated view, not only when wikiView:authed is explicitly requested, so a fresh window whose shared cookie has not landed yet no longer paints signed-out while its siblings show signed-in; it fires only on a definite 401 (never a probe timeout) so an already-signed-in window is never re-navigated, and it schedules an overlay repaint so the taskbar hover thumbnail drops any cached signed-out frame
4 files changed
+25−13
adom-bridge-puppeteer-manifest.json+4−4@@ -1,10 +1,10 @@ { "manifest_version": 1, "name": "puppeteer",- "version": "2.0.28",- "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.28/adom-bridge-puppeteer-v2.0.28.zip",- "sha256": "bbd10344fcf8fb9dc26e21ef8770118e14782d8fa40f0e375c8a3ff39f83f50a",- "size": 640433,+ "version": "2.0.29",+ "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.29/adom-bridge-puppeteer-v2.0.29.zip",+ "sha256": "494c7c2781cd5868a25a3732beccb0b83a91da9cc687fb4b8733d2e6769ebc2c",+ "size": 640743, "verbPrefixes": [ "browser_", "desktop_recorder_",
src/BRIDGE_VERSION+1−1@@ -1 +1 @@-2.0.28+2.0.29
src/bridge.json+1−1@@ -2,7 +2,7 @@ "manifest_version": 1, "name": "puppeteer", "displayName": "Puppeteer (Chrome for Testing + Native)",- "version": "2.0.28",+ "version": "2.0.29", "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/server.js+19−7@@ -10564,18 +10564,30 @@ const server = http.createServer(async (req, res) => { } const appIconHint = appIconReprimand(args.url, _appIconWorn); // v1.8.93: wiki dual-view hint + auth-state check.+ // v2.0.29 (#42, John saw one thread's fresh window render signed-OUT while its siblings on+ // the SAME shared profile rendered signed-in): the shared adom-you profile is SUPPOSED to be+ // signed in as the user. Check auth on EVERY adom URL that is not the deliberately-anonymous+ // public/isolated view — not just explicit wikiView:"authed" — so the omitted-view case+ // (the common one) is covered too. let _wikiAuth = null;- if (session && isAdomUrl(args.url)) {- if (args.wikiView === 'authed') { try { _wikiAuth = await Promise.race([checkWikiAuth(session.page), new Promise(r => setTimeout(() => r({ authed: false }), 3500))]); } catch (e) {} }+ const _wantsSignedIn = session && isAdomUrl(args.url) && args.wikiView !== 'public' && !args.isolated;+ if (_wantsSignedIn) {+ try { _wikiAuth = await Promise.race([checkWikiAuth(session.page), new Promise(r => setTimeout(() => r({ authed: false, unknown: true }), 3500))]); } catch (e) {} }- // v1.9.88 — authed view requested but the vault isn't signed in yet: AUTO-SIGN from AD's- // stored desktop token BEFORE reporting wikiLoginNeeded, so the AI-driven open never makes- // the user log in by hand either (same mechanism as the jump-list toggle).- if (session && isAdomUrl(args.url) && args.wikiView === 'authed' && (!_wikiAuth || !_wikiAuth.authed)) {+ // v1.9.88/v2.0.29 — DEFINITELY signed out (a real 401, not a probe timeout) but the desktop+ // holds a wiki token: AUTO-SIGN from it BEFORE the first visible paint settles, so the window+ // never shows a signed-out frame (which is also what the taskbar hover thumbnail would cache).+ if (_wantsSignedIn && _wikiAuth && _wikiAuth.authed === false && !_wikiAuth.unknown && readDesktopWikiToken()) { try { const _np = (() => { try { const u2 = new URL(args.url); return u2.pathname + u2.search; } catch (e) { return '/adom'; } })(); const _who = await autoSignWikiFromDesktop(session.page, _np);- if (_who) { _wikiAuth = { authed: true, user: _who !== 'authed' ? _who : undefined, autoSigned: true }; console.log(`[wikiview] "${sessionId}" open wikiView:authed AUTO-SIGNED from AD desktop token (${_who})`); }+ if (_who) {+ _wikiAuth = { authed: true, user: _who !== 'authed' ? _who : undefined, autoSigned: true };+ session._wikiAuthed = true;+ console.log(`[wikiview] "${sessionId}" ${args.wikiView || 'shared'} AUTO-SIGNED from AD desktop token (${_who}) — was signed out at first paint (#42)`);+ // repaint so the taskbar thumbnail drops any cached signed-out frame+ if (process.platform === 'win32') { try { scheduleOverlayRefresh(sessionId); } catch (e) {} }+ } } catch (e) {} } // v1.9.175: pass args.wikiView VERBATIM so the hint distinguishes omit (shared, logged in)