← Commit history

nb 0.4.8: bare pin_session pins to the session's resolved route, never to an empty-email pending socket

John Lauer ·439e7d3e68 ·2mo ago ·parent 8da2081
5 files changed +21−10
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.4.7+0.4.8
bridge/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "native-browser",   "displayName": "Adom Native Browser",-  "version": "0.4.7",+  "version": "0.4.8",   "expectedExtensionVersion": "0.2.5",   "description": "Drives the user's REAL signed-in Chrome/Edge, in two layers. Layer 1 (nb) needs NOTHING installed and works on any machine: nbrowser_open_os_window (open a URL in the user's real profile, background+flashing, the OAuth/consent path), nbrowser_os_windows, nbrowser_profiles, nbrowser_wake_profile, nbrowser_force_close. Layer 2 (nbe, the Adom Native Browser Extension) unlocks the rest: CDP driving (navigate/click/read/screenshot) inside their logged-in profile. The bridge binds an ephemeral loopback port and the native-messaging host pumps stdio <-> bridge.",   "homepage": "https://wiki.adom.inc/adom/nb-bridge",
bridge/package.json+1−1
@@ -1,6 +1,6 @@ {   "name": "adom-native-browser-bridge",-  "version": "0.4.7",+  "version": "0.4.8",   "private": true,   "description": "Native-browser bridge for Bridge (ab): layer 1 (nb) plus layer 2 via nbe, the Adom Native Browser Extension (Chrome + Edge).",   "main": "server.js",
bridge/server.js+13−2
@@ -1720,8 +1720,19 @@ function dispatch(verb, args) {       const sid = args && args.sessionId;       const want = String((args && (args.profile || args.email)) || '');       if (!sid) return resolve({ success: false, error: 'sessionId required', _hint: 'nbrowser_pin_session {sessionId, profile} pins that session to a profile so later verbs on it auto-route there.' });-      const hit = [...conns.keys()].find((k) => k === want || (conns.get(k).profile.email === want));-      if (!hit) return resolve({ success: false, error: `no connected profile matches '${want}'`, _hint: 'Run nbrowser_profiles to list connected profiles by key/email.' });+      // ⛔ want='' used to match the first conn with an EMPTY email - i.e. a pending-N/unlabelled socket.+      // The verb battery's bare pin_session {sessionId} thereby re-pinned its healthy session onto an+      // ancient never-reloaded Edge SW and 25 verbs "failed" (2026-08-22). A bare pin now pins to the+      // session's CURRENT resolved route; an email match requires a non-empty want.+      let hit;+      if (want) {+        hit = [...conns.keys()].find((k) => k === want || (conns.get(k).profile.email === want));+        if (!hit) return resolve({ success: false, error: `no connected profile matches '${want}'`, _hint: 'Run nbrowser_profiles to list connected profiles by key/email.' });+      } else {+        const cur = targetConn({ sessionId: sid });+        hit = (cur && cur.key) || null;+        if (!hit || isPending(hit)) return resolve({ success: false, error: 'no resolved profile to pin to - pass profile: explicitly', _hint: 'A bare pin_session pins the session to its current RESOLVED route. Right now that route is unresolved/none; run nbrowser_profiles and pass profile:"chrome:<email>".' });+      }       sessionProfile.set(sid, hit);       return resolve({ success: true, output: JSON.stringify({ ok: true, sessionId: sid, pinnedTo: hit, _hint: `Session "${sid}" is pinned to ${hit}. Any verb carrying this sessionId (without an explicit profile:) now routes there. Re-pin anytime.` }) });     }
native-browser-bridge-manifest.json+5−5
@@ -1,8 +1,8 @@ {   "manifest_version": 1,-  "version": "0.4.7",-  "url": "https://wiki.adom.inc/download/adom/nb-bridge/0.4.7/native-browser-bridge-v0.4.7.zip",-  "sha256": "bbcfedbc5240102ab83b6e53783e79f2f69f97fff2c47daeabe8a7766f23a034",-  "size": 105906,-  "released_at": "2026-08-22T14:30:58Z"+  "version": "0.4.8",+  "url": "https://wiki.adom.inc/download/adom/nb-bridge/0.4.8/native-browser-bridge-v0.4.8.zip",+  "sha256": "97c403016f95396b15545e4d609b9edc08c365c6f18822db5b88481d835eaa22",+  "size": 106215,+  "released_at": "2026-08-22T14:37:49Z" }