bruce-models 6.9.4 → 6.9.5

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.
@@ -16425,6 +16425,9 @@
16425
16425
  if (auth === null || auth === void 0 ? void 0 : auth.fingerprint) {
16426
16426
  headers["X-Fingerprint"] = auth.fingerprint;
16427
16427
  }
16428
+ if (auth === null || auth === void 0 ? void 0 : auth.apiBaseUrl) {
16429
+ headers["X-Api-Base-Url"] = auth.apiBaseUrl;
16430
+ }
16428
16431
  const response = yield fetchImpl(this.buildUrl(path), Object.assign(Object.assign({}, init), { headers }));
16429
16432
  if (!response.ok) {
16430
16433
  const message = yield this.safeReadResponseText(response);
@@ -16487,7 +16490,7 @@
16487
16490
  }
16488
16491
  }
16489
16492
  connect(auth) {
16490
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16493
+ var _a, _b, _c, _d, _e, _f, _g;
16491
16494
  if (auth) {
16492
16495
  this.currentAuth = auth;
16493
16496
  }
@@ -16495,14 +16498,10 @@
16495
16498
  (_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
16496
16499
  return;
16497
16500
  }
16498
- if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
16499
- (_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
16500
- return;
16501
- }
16502
16501
  try {
16503
16502
  this.isConnecting = true;
16504
16503
  const url = this.buildUrl();
16505
- (_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
16504
+ (_e = (_d = this.logger()).log) === null || _e === void 0 ? void 0 : _e.call(_d, "[NavigatorMcpWS] Connecting to", url);
16506
16505
  this.ws = new WebSocket(url);
16507
16506
  this.ws.onopen = (event) => {
16508
16507
  var _a, _b, _c, _d;
@@ -16529,7 +16528,7 @@
16529
16528
  };
16530
16529
  }
16531
16530
  catch (error) {
16532
- (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
16531
+ (_g = (_f = this.logger()).error) === null || _g === void 0 ? void 0 : _g.call(_f, "[NavigatorMcpWS] Failed to establish connection", error);
16533
16532
  this.isConnecting = false;
16534
16533
  }
16535
16534
  }
@@ -16563,12 +16562,14 @@
16563
16562
  return this.appendAuthParams(url);
16564
16563
  }
16565
16564
  appendAuthParams(url) {
16566
- var _a;
16567
- if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
16565
+ if (!this.currentAuth) {
16568
16566
  return url;
16569
16567
  }
16570
16568
  const urlInstance = new URL(url);
16571
- urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16569
+ // Add accountId if provided
16570
+ if (this.currentAuth.accountId) {
16571
+ urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16572
+ }
16572
16573
  // Only add sessionId if it's provided (support anonymous access)
16573
16574
  if (this.currentAuth.sessionId) {
16574
16575
  urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
@@ -16577,6 +16578,10 @@
16577
16578
  if (this.currentAuth.fingerprint) {
16578
16579
  urlInstance.searchParams.set("fingerprint", this.currentAuth.fingerprint);
16579
16580
  }
16581
+ // Add apiBaseUrl if provided (for anonymous access)
16582
+ if (this.currentAuth.apiBaseUrl) {
16583
+ urlInstance.searchParams.set("apiBaseUrl", this.currentAuth.apiBaseUrl);
16584
+ }
16580
16585
  // Preserve the hash (unlikely to be used, but consistent with URL semantics)
16581
16586
  return urlInstance.toString();
16582
16587
  }
@@ -16633,7 +16638,7 @@
16633
16638
  }
16634
16639
 
16635
16640
  // This is updated with the package.json version on build.
16636
- const VERSION = "6.9.4";
16641
+ const VERSION = "6.9.5";
16637
16642
 
16638
16643
  exports.VERSION = VERSION;
16639
16644
  exports.AbstractApi = AbstractApi;