@maintainer-pro/ai-bridge 0.1.27 → 0.1.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@maintainer-pro/ai-bridge",
3
- "version": "0.1.27",
3
+ "version": "0.1.28",
4
4
  "description": "Local bridge daemon that pairs a machine to Maintainer Pro and configures multiple client sandboxes.",
5
5
  "keywords": [
6
6
  "maintainer-pro",
@@ -28,7 +28,7 @@
28
28
  "node": ">=22"
29
29
  },
30
30
  "dependencies": {
31
- "@maintainer-pro/ai-cli": "^0.1.14",
31
+ "@maintainer-pro/ai-cli": "^0.1.15",
32
32
  "@maintainer-pro/ai-server": "^0.1.8"
33
33
  }
34
34
  }
@@ -1281,14 +1281,25 @@ function shareProxyShim(p, portMap, rewriteMappedLocalUrls, bypassCors) {
1281
1281
  if (typeof body === "string") arguments[0] = rewriteText(body);
1282
1282
  return xs.apply(this, arguments);
1283
1283
  };
1284
+ function asNavUrl(u) {
1285
+ if (u == null || u === "") return u;
1286
+ if (typeof u === "string") return addNav(u);
1287
+ try {
1288
+ if (typeof URL !== "undefined" && u instanceof URL) return addNav(u.href);
1289
+ } catch (e) {}
1290
+ try {
1291
+ return addNav(String(u));
1292
+ } catch (e) {}
1293
+ return u;
1294
+ }
1284
1295
  var ps = history.pushState.bind(history);
1285
1296
  history.pushState = function (s, t, u) {
1286
- if (typeof u === "string") u = addNav(u);
1297
+ if (u != null && u !== "") u = asNavUrl(u);
1287
1298
  return ps(s, t, u);
1288
1299
  };
1289
1300
  var rs = history.replaceState.bind(history);
1290
1301
  history.replaceState = function (s, t, u) {
1291
- if (typeof u === "string") u = addNav(u);
1302
+ if (u != null && u !== "") u = asNavUrl(u);
1292
1303
  return rs(s, t, u);
1293
1304
  };
1294
1305
  var WS = window.WebSocket;