← Commit history

bridge 0.0.27 (AD 1.9.84, issue #80): send X-Adom-Bridge-Token attribution header on outbound AD calls; no workaround to drop (direct-API usage already correct)

John Lauer ·44dc884c11 ·4mo ago ·parent 7fae2d6
5 files changed +14−9
bridge/BRIDGE_VERSION+1−1
@@ -1 +1 @@-0.0.26\ No newline at end of file+0.0.27\ No newline at end of file
bridge/bridge.json+1−1
@@ -2,7 +2,7 @@   "manifest_version": 1,   "name": "native-browser",   "displayName": "Adom Native Browser (Chrome + Edge)",-  "version": "0.0.26",+  "version": "0.0.27",   "description": "Drives the user's REAL signed-in Chrome/Edge via an installed extension (native-messaging transport). Mirrors the puppeteer bridge's verb surface as nbrowser_* but runs inside the actual logged-in profile, so cookies/SSO/saved-logins/captcha human-trust all work. The bridge binds an ephemeral loopback port (PORTS.md compliant) and writes a discovery file; the native-messaging host pumps stdio <-> this bridge; the extension never touches a TCP port.",   "homepage": "https://wiki.adom.inc/adom/adom-browser-extension",   "author": "Adom Inc.",
bridge/package.json+1−1
@@ -1,6 +1,6 @@ {   "name": "adom-native-browser-bridge",-  "version": "0.0.26",+  "version": "0.0.27",   "private": true,   "description": "adom-desktop bridge for the Adom native-browser extension (Chrome + Edge)",   "main": "server.js",
bridge/server.js+6−1
@@ -289,7 +289,12 @@ function adCommand(app, command, args) {   return new Promise((resolve) => {     let u; try { u = new URL('/command', discoverAdBase()); } catch { u = new URL('http://127.0.0.1:47200/command'); }     const data = Buffer.from(JSON.stringify({ app, command, args: args || {} }));-    const req = http.request({ host: u.hostname, port: u.port || 80, path: u.pathname, method: 'POST', headers: { 'content-type': 'application/json', 'content-length': data.length }, timeout: 20000 }, (res) => {+    // X-Adom-Bridge-Token is ATTRIBUTION only (AD 1.9.84) - AD injects ADOM_BRIDGE_TOKEN into our spawn+    // env; sending it badges our outbound calls as "bridge" in the Activity Log. It is NOT an approval+    // gate (we're trusted-by-install; AD binds 127.0.0.1 only). Omitting it is fine; a stale token 403s.+    const headers = { 'content-type': 'application/json', 'content-length': data.length };+    if (process.env.ADOM_BRIDGE_TOKEN) headers['x-adom-bridge-token'] = process.env.ADOM_BRIDGE_TOKEN;+    const req = http.request({ host: u.hostname, port: u.port || 80, path: u.pathname, method: 'POST', headers, timeout: 20000 }, (res) => {       let b = ''; res.on('data', (c) => (b += c)); res.on('end', () => { let j; try { j = JSON.parse(b); } catch { j = b; } resolve({ status: res.statusCode, body: j }); });     });     req.on('error', (e) => resolve({ status: 0, body: { error: String((e && e.message) || e) } }));
native-browser-bridge-manifest.json+5−5
@@ -1,8 +1,8 @@ {   "manifest_version": 1,-  "version": "0.0.26",-  "url": "native-browser-bridge-v0.0.26.bin",-  "sha256": "d0214fdea5ea8c757bdf4227040130553fc12f83a9f71eb0e9ce3d62f385e10a",-  "size": 28792,-  "released_at": "2026-07-04T17:43:20Z"+  "version": "0.0.27",+  "url": "native-browser-bridge-v0.0.27.bin",+  "sha256": "c257e6d606c8fde84b5afc9c3bbce8c7a5ad4e0fd84ff7b192ce3f6a2c1513bb",+  "size": 28996,+  "released_at": "2026-07-05T12:03:13Z" }\ No newline at end of file