← Commit history

Step 2 of the durable-profile plan: default to ONE shared, persistent 'you' profile instead of a throwaway per-session dir. Before this, an open with no explicit profile used the sessionId as the profile name, so every window was a fresh empty jar: signed out of everything, and app localStorage (e.g. Orbital Lab's saved 3D prefs, John's report) vanished when a new window opened. Now the default resolves to DEFAULT_PROFILE ('adom-you'), a durable profile every window shares, so logins/cookies/localStorage accumulate and are shared across all pup windows (the wiki already proved this jar-sharing model with adom-wiki-authed). Sharing a profile does NOT collapse windows into tabs: measured earlier that two sessions on one profile are two OS windows with two taskbar buttons in one Chrome process, so per-window identity is untouched. Order preserved: explicit profile honored; {isolated:true} gives a private throwaway dir (fresh-login test / act-as-other-user); wiki PUBLIC view stays per-session so the logged-out view is genuinely fresh; wiki AUTHED stays the shared vault. Step 1 (reparent so Chrome survives a bridge restart) is the prerequisite that makes a durable shared jar safe from dirty-kill corruption. Open hint and SKILL.md updated to teach the persistent/shared model and the isolation escape hatch.

John Lauer ·346762ec4b ·3mo ago ·parent d897a2a
4 files changed +32−8
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.9.122",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.122/adom-bridge-puppeteer-v1.9.122.zip",-  "sha256": "f8f2f825d7bddfd0daa0924deff198bed82fb2cddf2c1d80138c7cca1c60b15b",-  "size": 388449,+  "version": "1.9.123",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.9.123/adom-bridge-puppeteer-v1.9.123.zip",+  "sha256": "1e9f3473a1698833361747d65c6acecdf9068cc144d56301ff1c61c7b3cee914",+  "size": 389415,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.9.122+1.9.123
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "1.9.122",+  "version": "1.9.123",   "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+26−2
@@ -2896,6 +2896,17 @@ async function brandSweep(reason) { // together let a user VERIFY publish visibility — e.g. "did source leak to the public?" (a // hide_source page shows source to authed, binaries-only to public). const WIKI_AUTH_PROFILE = 'adom-wiki-authed';+// v1.9.123 (step 2 of John's durable-profile plan) — THE shared, persistent "you" profile.+// Before this, an open with no explicit profile defaulted to the sessionId, i.e. a throwaway+// data dir per window: every new window was signed out of everything and app localStorage+// (e.g. Orbital Lab's saved 3D prefs) vanished. Now the default is ONE durable profile that+// every window shares, so logins/cookies/localStorage ACCUMULATE and are shared across all+// pup windows (the wiki already proved this jar-sharing model with adom-wiki-authed). Each+// window still gets its OWN OS window + taskbar identity — sharing a profile does NOT collapse+// windows into tabs (measured: two sessions on one profile = two windows, two taskbar buttons,+// one Chrome process). Step 1 (reparent so Chrome survives a bridge restart) is what makes a+// durable profile safe: without it, repeated dirty kills would rot the shared jar.+const DEFAULT_PROFILE = 'adom-you'; function isWikiUrl(u) { try { return /(^|\.)wiki\.adom\.inc$/i.test(new URL(u).hostname); } catch (e) { return false; } } // v1.8.99: the SSO session covers the whole Adom ecosystem, not just the wiki. Gate the authed // treatment on ANY adom.inc host (wiki + other Adom properties). NON-Adom sites (ti.com,@@ -6545,7 +6556,17 @@ const server = http.createServer(async (req, res) => {           // session still gets its OWN window; they share only the cookie jar (proven: two           // different threads, both authed, separate windows).           if (args.wikiView === 'authed' && isAdomUrl(args.url)) args.profile = WIKI_AUTH_PROFILE;-          if (!args.profile) args.profile = args.sessionId;+          // v1.9.123: default now resolves to the durable shared "you" profile, NOT a throwaway+          // per-session dir. Order matters:+          //   explicit profile        -> honored as-is (the managed/named escape hatch)+          //   isolated:true           -> a private throwaway dir (fresh-login test, act-as-other-user)+          //   wiki PUBLIC view        -> per-session, UNCHANGED (keeps the logged-out view truly fresh)+          //   everything else         -> DEFAULT_PROFILE (durable, shared, credential-accumulating)+          if (!args.profile) {+            if (args.isolated === true) args.profile = 'iso-' + args.sessionId;+            else if (isAdomUrl(args.url)) args.profile = args.sessionId;   // wiki public: unchanged+            else args.profile = DEFAULT_PROFILE;+          }           const sessionId = args.sessionId;           // v1.9.110 (issue #22): NEVER LEAVE A SESSION UNOWNED, and settle ownership at ADMISSION.           // The owner is the explicit `owner` arg when given, else the calling AI thread's own name@@ -6852,7 +6873,10 @@ const server = http.createServer(async (req, res) => {               _hint: (() => {                 const rc = (res && res._renderCheck) || null;                 const broken = rc && rc.ok === false && (rc.signals || []).length;-                const rest = `${wikiHint}${authSteerHint(args.url)}${fgDenyHint}${appIconHint}${bgHint}${ownHint}${fpsHint} ${brep._hint}${staleWindowsHint()}${adUpgradeHint()}`;+                const profileNote = args.profile === DEFAULT_PROFILE+                  ? ` PROFILE: this window uses pup's durable shared "${DEFAULT_PROFILE}" profile — logins, cookies and localStorage are SAVED and SHARED across ALL pup windows, so a site you sign into once stays signed in everywhere and app state (localStorage) persists between windows. This is deliberate. For a PRIVATE throwaway window instead (a fresh-login test, or acting as a different user), reopen with {isolated:true} or an explicit {profile:"<name>"}.`+                  : ((args.wikiView === 'authed') ? '' : ` PROFILE: "${args.profile}" — a durable named profile; its storage persists and is shared by any window that names the same profile.`);+                const rest = `${wikiHint}${authSteerHint(args.url)}${fgDenyHint}${appIconHint}${bgHint}${profileNote}${ownHint}${fpsHint} ${brep._hint}${staleWindowsHint()}${adUpgradeHint()}`;                 if (!broken) return rest;                 const st = (typeof rc.httpStatus === 'number') ? ` (HTTP ${rc.httpStatus})` : '';                 return `⛔ THE PAGE YOU JUST OPENED IS BROKEN: ${rc.signals.join(', ')}${st}`