← Commit history

1.8.78: AD-version probe with visible warning when the raise gate is bypassed on pre-1.9.124 AD

John Lauer ·04b4ea26a5 · ·parent c269d2e
5 files changed +55−7
CHANGELOG.md+9
@@ -1,5 +1,14 @@ # Changelog — Adom Desktop Puppeteer Bridge +## 1.8.78 — 2026-07-18 — AD-version awareness: warn when the raise gate is bypassed++Every AD capability gap self-gates silently (identity → badge, bottom/force → PS fallback) EXCEPT+one: AD <1.9.124 intercepts browser_raise_os_window natively, so pup's foreground gate silently+does not exist there — a policy hole, not cosmetics. pup now probes the AD version at startup and,+on affected boxes: logs a warning, turns the status chip yellow with an update-AD note, exposes+`adVersion` + `raiseGateBypassed` on /status, and appends an upgrade advisory to open-response+hints. Boxes on current AD see nothing.+ ## 1.8.77 — 2026-07-18 — pup owns its own provisioning: warmup ALWAYS ensures CfT  John: "isn't that your decision? why would you need AD to change anything?" Correct — the
adom-bridge-puppeteer-manifest.json+4−4
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "1.8.77",-  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.77/adom-bridge-puppeteer-v1.8.77.zip",-  "sha256": "cca221788b02d23db70b4efb49407cfbf1bf5588838b2c80d2a1dbcd1e48dd79",-  "size": 190127,+  "version": "1.8.78",+  "url": "https://wiki.adom.inc/download/adom/adom-desktop-puppeteer-bridge/1.8.78/adom-bridge-puppeteer-v1.8.78.zip",+  "sha256": "bb4910c431530d6f86b4dfe6bcfe335c9d87d7b8cd7cb879cfa095d7b49a9949",+  "size": 191056,   "verbPrefixes": [     "browser_",     "desktop_recorder_",
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-1.8.77\ No newline at end of file+1.8.78\ No newline at end of file
src/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "puppeteer",   "displayName": "Puppeteer (Chrome for Testing + Native)",-  "version": "1.8.77",+  "version": "1.8.78",   "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.",   "homepage": "https://wiki.adom.inc/adom/adom-desktop",   "author": "Adom Inc.",
src/server.js+40−1
@@ -1584,6 +1584,37 @@ function pupBadgeB64() { // there) and owns its icon in its install dir — change branding = ship a new pup release with a // NEW icon FILENAME (Windows caches decoded icons by path). Self-gating: on AD <1.9.134 the // verbs are unknown -> _identitySupported=false -> the overlay badge fallback keeps working.+// v1.8.78: AD-version awareness. Most capability gaps self-gate silently (identity -> badge,+// bottom/force -> PS fallback) and need no nagging. ONE gap is a POLICY hole, not cosmetics:+// AD <1.9.124 intercepts browser_raise_os_window natively, so pup's foreground gate (reason+// required + audit trail) silently does not exist there. pup can't enforce through an+// interceptor, but it can KNOW and SAY SO — probed once at startup, surfaced in /status and+// open-response hints so users/AIs are told to update AD rather than trusting a gate that+// isn't there.+let _adVersion = null;+let _adRaiseGateBypassed = false;+function _verLt(a, b) {+  const pa = String(a).split('.').map(Number), pb = String(b).split('.').map(Number);+  for (let i = 0; i < 3; i++) { if ((pa[i] || 0) < (pb[i] || 0)) return true; if ((pa[i] || 0) > (pb[i] || 0)) return false; }+  return false;+}+async function probeAdVersion() {+  try {+    const r = await chrome.adCommand('update_status', {}, { timeoutMs: 6000 });+    const raw = r && (typeof r.output === 'string' && r.output ? JSON.parse(r.output) : r.output || r);+    const v = (raw && (raw.currentVersion || (raw.data && raw.data.currentVersion))) || (r && r.currentVersion) || null;+    if (v) {+      _adVersion = v;+      _adRaiseGateBypassed = _verLt(v, '1.9.124');+      console.log(`[adver] AD ${v}${_adRaiseGateBypassed ? ' — WARNING: <1.9.124 intercepts raise, the foreground gate is BYPASSED on this box; recommend updating Adom Desktop' : ''}`);+    }+  } catch (e) {}+}+function adUpgradeHint() {+  return _adRaiseGateBypassed+    ? ` ⚠ AD ${_adVersion} on this desktop is older than 1.9.124: it intercepts browser_raise_os_window natively, so pup's foreground gate (foregroundReason + audit trail) does NOT apply to raises here. Recommend the user update Adom Desktop (update_check / the footer banner) — everything else degrades gracefully, this is the one policy gap.`+    : '';+} const PUP_APP_ID = 'Adom.Pup'; const PUP_DISPLAY_NAME = 'Adom Pup'; let _identitySupported = null;   // null = unprobed@@ -4012,7 +4043,7 @@ const server = http.createServer(async (req, res) => {               reused: reuse ? { navigatedAway: reuse.navigatedAway, previousUrl: reuse.previousUrl, previousOwner: reuse.previousOwner, takeover: reuse.takeover } : null,               owner: session.owner || null,               foregroundDenied: fgDenied ? 'foreground_reason_required' : undefined,-              _hint: `${authSteerHint(args.url)}${fgDenyHint}${bgHint}${ownHint} ${brep._hint}${staleWindowsHint()}`,+              _hint: `${authSteerHint(args.url)}${fgDenyHint}${bgHint}${ownHint} ${brep._hint}${staleWindowsHint()}${adUpgradeHint()}`,               ...info,             }),           });@@ -5869,10 +5900,17 @@ const server = http.createServer(async (req, res) => {         led = 'green'; summary = `${sessions.size} window${sessions.size === 1 ? '' : 's'} · ${rd.browserKind}`;         tooltip = `Puppeteer bridge v${BRIDGE_VERSION} — ready\nDrives ${rd.browserKind} (${rd.browserSource}) · ${sessions.size} session(s)${rd.chromeForTestingInstalled ? `\nCfT ${rd.chromeBuildId || ''} cached as fallback` : ''}`;       }+      // v1.8.78: the ONE non-cosmetic degradation on old AD gets a visible chip warning.+      if (_adRaiseGateBypassed) {+        if (led === 'green') led = 'yellow';+        tooltip += `\n⚠ AD ${_adVersion} < 1.9.124: raise intercepted — the foreground gate does not apply on this box. Update Adom Desktop.`;+      }       sendJSON(res, {         ok: true,         bridge: 'puppeteer',         version: BRIDGE_VERSION,+        adVersion: _adVersion,+        raiseGateBypassed: _adRaiseGateBypassed || undefined,         led, summary, tooltip,         sessionCount: sessions.size,         activeSession: activeSessionId,@@ -5924,6 +5962,7 @@ server.listen(PORT, BIND_HOST, async () => {   // shortcut whose pin launches a managed pup window). Loopback call from the bridge itself —   // trusted transport, no relay gating. Self-gates on AD <1.9.134 (unknown verb).   setTimeout(() => { ensurePupIdentityRegistered().catch(() => {}); }, 2500);+  setTimeout(() => { probeAdVersion().catch(() => {}); }, 1500);    // Recover sessions from disk (reconnect to Chrome windows that survived bridge restart)   try {