bruce-models 6.8.7 → 6.8.8

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.
@@ -16297,7 +16297,7 @@
16297
16297
  }
16298
16298
  }
16299
16299
  connect(auth) {
16300
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16300
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16301
16301
  if (auth) {
16302
16302
  this.currentAuth = auth;
16303
16303
  }
@@ -16305,14 +16305,14 @@
16305
16305
  (_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
16306
16306
  return;
16307
16307
  }
16308
- if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId) || !((_e = this.currentAuth) === null || _e === void 0 ? void 0 : _e.sessionId)) {
16309
- (_g = (_f = this.logger()).debug) === null || _g === void 0 ? void 0 : _g.call(_f, "[NavigatorMcpWS] Missing auth parameters; connection not started.");
16308
+ if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
16309
+ (_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
16310
16310
  return;
16311
16311
  }
16312
16312
  try {
16313
16313
  this.isConnecting = true;
16314
16314
  const url = this.buildUrl();
16315
- (_j = (_h = this.logger()).log) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Connecting to", url);
16315
+ (_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
16316
16316
  this.ws = new WebSocket(url);
16317
16317
  this.ws.onopen = (event) => {
16318
16318
  var _a, _b, _c, _d;
@@ -16339,7 +16339,7 @@
16339
16339
  };
16340
16340
  }
16341
16341
  catch (error) {
16342
- (_l = (_k = this.logger()).error) === null || _l === void 0 ? void 0 : _l.call(_k, "[NavigatorMcpWS] Failed to establish connection", error);
16342
+ (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
16343
16343
  this.isConnecting = false;
16344
16344
  }
16345
16345
  }
@@ -16373,13 +16373,16 @@
16373
16373
  return this.appendAuthParams(url);
16374
16374
  }
16375
16375
  appendAuthParams(url) {
16376
- var _a, _b;
16377
- if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId) || !((_b = this.currentAuth) === null || _b === void 0 ? void 0 : _b.sessionId)) {
16376
+ var _a;
16377
+ if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
16378
16378
  return url;
16379
16379
  }
16380
16380
  const urlInstance = new URL(url);
16381
16381
  urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16382
- urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16382
+ // Only add sessionId if it's provided (support anonymous access)
16383
+ if (this.currentAuth.sessionId) {
16384
+ urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16385
+ }
16383
16386
  // Preserve the hash (unlikely to be used, but consistent with URL semantics)
16384
16387
  return urlInstance.toString();
16385
16388
  }
@@ -16436,7 +16439,7 @@
16436
16439
  }
16437
16440
 
16438
16441
  // This is updated with the package.json version on build.
16439
- const VERSION = "6.8.7";
16442
+ const VERSION = "6.8.8";
16440
16443
 
16441
16444
  exports.VERSION = VERSION;
16442
16445
  exports.AbstractApi = AbstractApi;