bruce-models 6.9.4 → 6.9.6

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