bruce-models 6.8.7 → 6.8.9

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.
@@ -16235,6 +16235,9 @@
16235
16235
  if (auth === null || auth === void 0 ? void 0 : auth.sessionId) {
16236
16236
  headers["X-Session-Id"] = auth.sessionId;
16237
16237
  }
16238
+ if (auth === null || auth === void 0 ? void 0 : auth.fingerprint) {
16239
+ headers["X-Fingerprint"] = auth.fingerprint;
16240
+ }
16238
16241
  const response = yield fetchImpl(this.buildUrl(path), Object.assign(Object.assign({}, init), { headers }));
16239
16242
  if (!response.ok) {
16240
16243
  const message = yield this.safeReadResponseText(response);
@@ -16297,7 +16300,7 @@
16297
16300
  }
16298
16301
  }
16299
16302
  connect(auth) {
16300
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
16303
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16301
16304
  if (auth) {
16302
16305
  this.currentAuth = auth;
16303
16306
  }
@@ -16305,14 +16308,14 @@
16305
16308
  (_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
16306
16309
  return;
16307
16310
  }
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.");
16311
+ if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)) {
16312
+ (_f = (_e = this.logger()).debug) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Missing accountId; connection not started.");
16310
16313
  return;
16311
16314
  }
16312
16315
  try {
16313
16316
  this.isConnecting = true;
16314
16317
  const url = this.buildUrl();
16315
- (_j = (_h = this.logger()).log) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Connecting to", url);
16318
+ (_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
16316
16319
  this.ws = new WebSocket(url);
16317
16320
  this.ws.onopen = (event) => {
16318
16321
  var _a, _b, _c, _d;
@@ -16339,7 +16342,7 @@
16339
16342
  };
16340
16343
  }
16341
16344
  catch (error) {
16342
- (_l = (_k = this.logger()).error) === null || _l === void 0 ? void 0 : _l.call(_k, "[NavigatorMcpWS] Failed to establish connection", error);
16345
+ (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
16343
16346
  this.isConnecting = false;
16344
16347
  }
16345
16348
  }
@@ -16373,13 +16376,20 @@
16373
16376
  return this.appendAuthParams(url);
16374
16377
  }
16375
16378
  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)) {
16379
+ var _a;
16380
+ if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
16378
16381
  return url;
16379
16382
  }
16380
16383
  const urlInstance = new URL(url);
16381
16384
  urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
16382
- urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16385
+ // Only add sessionId if it's provided (support anonymous access)
16386
+ if (this.currentAuth.sessionId) {
16387
+ urlInstance.searchParams.set("sessionId", this.currentAuth.sessionId);
16388
+ }
16389
+ // Only add fingerprint if it's provided
16390
+ if (this.currentAuth.fingerprint) {
16391
+ urlInstance.searchParams.set("fingerprint", this.currentAuth.fingerprint);
16392
+ }
16383
16393
  // Preserve the hash (unlikely to be used, but consistent with URL semantics)
16384
16394
  return urlInstance.toString();
16385
16395
  }
@@ -16436,7 +16446,7 @@
16436
16446
  }
16437
16447
 
16438
16448
  // This is updated with the package.json version on build.
16439
- const VERSION = "6.8.7";
16449
+ const VERSION = "6.8.9";
16440
16450
 
16441
16451
  exports.VERSION = VERSION;
16442
16452
  exports.AbstractApi = AbstractApi;