← Commit history

v2.0.363: Attach session notices at the sendJSON chokepoint instead of inside the bug-invite path, which returns early whenever a response already carries the invite, so both notices were unreachable on exactly the verbs that matter.

John Lauer ·a953fa5fa5 ·1mo ago ·parent 7b8ba9b
5 files changed +42−35
adom-bridge-puppeteer-manifest.json+5−5
@@ -1,10 +1,10 @@ {   "manifest_version": 1,   "name": "puppeteer",-  "version": "2.0.362",-  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.362/adom-bridge-puppeteer-v2.0.362.zip",-  "sha256": "2bd200f10443a80361a1d198dc8de3c59fccfb49d6482131a78dd529886c6d8f",-  "size": 1530388,+  "version": "2.0.363",+  "url": "https://wiki.adom.inc/download/adom/pup-bridge/2.0.363/adom-bridge-puppeteer-v2.0.363.zip",+  "sha256": "494858bc7eea4f9ec353462562b179f6853628d6ae17149627b102bf2acf5bd3",+  "size": 1530586,   "verbPrefixes": [     "browser_",     "desktop_recorder_",@@ -12,5 +12,5 @@   ],   "healthEndpoint": "/status",   "statusVerb": "browser_readiness",-  "released_at": "2026-08-28T10:20:53.834333Z"+  "released_at": "2026-08-28T10:22:43.365541Z" }
package.json+1−1
@@ -1,6 +1,6 @@ {   "slug": "pup-bridge",-  "version": "2.0.362",+  "version": "2.0.363",   "type": "app",   "description": "The pup SKILL PACK \u2014 the AI skills that teach a cloud/container AI how to drive the Adom Desktop Puppeteer (pup) bridge (browser_* verbs): the everyday `pup` skill plus focused sub-skills for windows/sessions/tabs, screenshots+recording, browsers+Chrome install, and driving the Adom wiki. Installs into ~/.claude/skills + ~/.codex/skills. DOCS ONLY \u2014 this is NOT the bridge runtime. The bridge itself (the Node program that drives the browser) runs on the DESKTOP: Adom Desktop bundles it and auto-installs/updates it, and it's published separately on the Releases tab as adom-bridge-puppeteer-v<ver>.zip. The pkg version is kept in lockstep with the Release version so the page's max version row always carries BOTH a pkg tarball (skills) and a runtime zip (bridge) \u2014 a skills-only or runtime-only bump on the top row breaks constraint installs. TL;DR: pkg install = the skills for your AI; the bridge = the Release zip, which Adom Desktop manages for you.",   "keywords": [
src/BRIDGE_VERSION+1−1
@@ -1 +1 @@-2.0.362\ No newline at end of file+2.0.363\ 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": "2.0.362",+  "version": "2.0.363",   "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+34−27
@@ -12055,6 +12055,34 @@ function sessionForResponse(obj, argsIn) {     return null;   } catch (e) { return null; } }+// Notices that describe THIS session's state, delivered on the verbs that would otherwise report a+// confident wrong answer. Deliberately outside the bug-invite path: these are not bug reports.+function attachSessionNotices(obj, verb, argsIn) {+  try {+    if (!obj || typeof obj !== 'object' || Array.isArray(obj) || !verb) return;+    const sess = sessionForResponse(obj, argsIn);+    if (!sess) return;+    // AN EMULATED VIEWPORT IS INVISIBLE TO THE AI THAT SET IT (John, 2026-08-27). He found a window+    // rendering ~290px narrower than the browser window while the driving thread reported the page+    // was "taking up 100% width". Both were true: a CSS-level check measures the EMULATION, so a+    // page filling 1400 of 1400 reports 100% while the user looks at 1400 of 1690. Every honest+    // in-page measurement agrees with itself and disagrees with the screen, so the override has to+    // say so on the verbs used to measure and to look.+    if (obj._viewportOverride === undefined && VIEWPORT_SENSITIVE.has(verb)) {+      const ev = sess._emulatedViewport;+      if (ev && ev.width) {+        obj._viewportOverride = `This window has an EMULATED VIEWPORT of ${ev.width}x${ev.height}`+          + (ev.deviceScaleFactor ? ` @${ev.deviceScaleFactor}x` : '')+          + `, so it is NOT tracking the real OS window. Anything you measure in the page (innerWidth, clientWidth, a bounding rect) describes the emulation, not what the user sees: a page that fills this viewport can still leave dead space on their screen. Clear it with pup_set_viewport {"reset":true} when you are done emulating.`;+      }+    }+    // #80: the restart notice, delivered to the session it happened to rather than broadcast.+    if (obj._sessionNotice === undefined) {+      const n = drainSessionNotice(sess);+      if (n) obj._sessionNotice = n;+    }+  } catch (e) {}+} function maybeAttachBugInvite(obj, verb, argsIn) {   try {     if (!obj || typeof obj !== 'object' || Array.isArray(obj)) return;@@ -12088,33 +12116,6 @@ function maybeAttachBugInvite(obj, verb, argsIn) {         if (rep) obj._cleanupReport = rep;       }     } catch (e) {}-    // v2.0.361 (John, 2026-08-27): AN EMULATED VIEWPORT IS INVISIBLE TO THE AI THAT SET IT.-    // He found a window rendering its page ~290px narrower than the browser window, with dead space-    // down the side, and the driving thread had told him the page was "taking up 100% width". BOTH-    // were true and that is the trap: a CSS-level check (innerWidth, clientWidth, a rect) measures-    // the EMULATED viewport, so a page filling 1400 of 1400 reports 100% while the user looks at-    // 1400 of 1690. Every honest measurement an AI can make agrees with itself and disagrees with-    // the screen. So the override has to announce itself on the verbs used to MEASURE and to LOOK,-    // rather than only on the status verb nobody calls.-    try {-      if (!isProbe && obj._viewportOverride === undefined && VIEWPORT_SENSITIVE.has(verb)) {-        const _s2 = sessionForResponse(obj, argsIn);-        const _ev = _s2 && _s2._emulatedViewport;-        if (_ev && _ev.width) {-          obj._viewportOverride = `This window has an EMULATED VIEWPORT of ${_ev.width}x${_ev.height}`-            + (_ev.deviceScaleFactor ? ` @${_ev.deviceScaleFactor}x` : '')-            + `, so it is NOT tracking the real OS window. Anything you measure in the page (innerWidth, clientWidth, a bounding rect) describes the emulation, not what the user sees: a page that fills this viewport can still leave dead space on their screen. Clear it with pup_set_viewport {"reset":true} when you are done emulating.`;-        }-      }-    } catch (e) {}-    // #80: the TARGETED notice, delivered to the session it actually happened to.-    try {-      if (!isProbe && obj._sessionNotice === undefined) {-        const _s = sessionForResponse(obj, argsIn);-        const _n = _s && drainSessionNotice(_s);-        if (_n) obj._sessionNotice = _n;-      }-    } catch (e) {}     const isError = obj.success === false || !!obj.errorCode || (!!obj.error && obj.error !== '');     // A FAILURE always earns the invitation, even on a probe — that is the highest-value moment.     if (isError) { obj._reportIssues = bugReportInvite(true); return; }@@ -12134,6 +12135,12 @@ function sendJSON(res, obj, status = 200) {     // verb and the handler didn't already set its own _hint, attach the verb's     // canonical hint (+ related) from VERB_META. So EVERY pup_* call carries     // actionable guidance inline, matching the contract AD asks all bridges for.+    // v2.0.363: session notices are attached HERE, not inside maybeAttachBugInvite. That function+    // returns early on `if (obj._reportIssues) return`, and most substantive verbs already carry the+    // bug-report invite, so anything I put after that guard was unreachable for exactly the verbs+    // that matter. Two notices shipped into that dead zone before I read the control flow instead of+    // assuming it. They are independent of the invite and belong at the chokepoint itself.+    attachSessionNotices(obj, res && res._adomCommand, res && res._adomArgs);     maybeAttachBugInvite(obj, res && res._adomCommand, res && res._adomArgs);     if (obj && typeof obj === 'object' && !Array.isArray(obj)) {       const meta = res && res._adomCommand && VERB_META[res._adomCommand];