bruce-models 6.8.6 → 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.
- package/dist/bruce-models.es5.js +14 -13
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +14 -13
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/mcp/navigator-chat.js +2 -4
- package/dist/lib/mcp/navigator-chat.js.map +1 -1
- package/dist/lib/mcp/navigator-mcp-websocket.js +11 -8
- package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -16221,10 +16221,8 @@
|
|
|
16221
16221
|
if (path.startsWith("http://") || path.startsWith("https://")) {
|
|
16222
16222
|
return path;
|
|
16223
16223
|
}
|
|
16224
|
-
|
|
16225
|
-
|
|
16226
|
-
}
|
|
16227
|
-
return `${this.baseUrl}${path}`;
|
|
16224
|
+
// Use URL constructor to properly handle path joining and avoid double slashes
|
|
16225
|
+
return new URL(path, this.baseUrl).toString();
|
|
16228
16226
|
}
|
|
16229
16227
|
fetchFromEndpoint(path, init, auth) {
|
|
16230
16228
|
var _a;
|
|
@@ -16299,7 +16297,7 @@
|
|
|
16299
16297
|
}
|
|
16300
16298
|
}
|
|
16301
16299
|
connect(auth) {
|
|
16302
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k
|
|
16300
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
16303
16301
|
if (auth) {
|
|
16304
16302
|
this.currentAuth = auth;
|
|
16305
16303
|
}
|
|
@@ -16307,14 +16305,14 @@
|
|
|
16307
16305
|
(_c = (_b = this.logger()).debug) === null || _c === void 0 ? void 0 : _c.call(_b, "[NavigatorMcpWS] Connection already active or in-flight; skipping connect.");
|
|
16308
16306
|
return;
|
|
16309
16307
|
}
|
|
16310
|
-
if (!((_d = this.currentAuth) === null || _d === void 0 ? void 0 : _d.accountId)
|
|
16311
|
-
(
|
|
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.");
|
|
16312
16310
|
return;
|
|
16313
16311
|
}
|
|
16314
16312
|
try {
|
|
16315
16313
|
this.isConnecting = true;
|
|
16316
16314
|
const url = this.buildUrl();
|
|
16317
|
-
(
|
|
16315
|
+
(_h = (_g = this.logger()).log) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Connecting to", url);
|
|
16318
16316
|
this.ws = new WebSocket(url);
|
|
16319
16317
|
this.ws.onopen = (event) => {
|
|
16320
16318
|
var _a, _b, _c, _d;
|
|
@@ -16341,7 +16339,7 @@
|
|
|
16341
16339
|
};
|
|
16342
16340
|
}
|
|
16343
16341
|
catch (error) {
|
|
16344
|
-
(
|
|
16342
|
+
(_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Failed to establish connection", error);
|
|
16345
16343
|
this.isConnecting = false;
|
|
16346
16344
|
}
|
|
16347
16345
|
}
|
|
@@ -16375,13 +16373,16 @@
|
|
|
16375
16373
|
return this.appendAuthParams(url);
|
|
16376
16374
|
}
|
|
16377
16375
|
appendAuthParams(url) {
|
|
16378
|
-
var _a
|
|
16379
|
-
if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)
|
|
16376
|
+
var _a;
|
|
16377
|
+
if (!((_a = this.currentAuth) === null || _a === void 0 ? void 0 : _a.accountId)) {
|
|
16380
16378
|
return url;
|
|
16381
16379
|
}
|
|
16382
16380
|
const urlInstance = new URL(url);
|
|
16383
16381
|
urlInstance.searchParams.set("accountId", this.currentAuth.accountId);
|
|
16384
|
-
|
|
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
|
+
}
|
|
16385
16386
|
// Preserve the hash (unlikely to be used, but consistent with URL semantics)
|
|
16386
16387
|
return urlInstance.toString();
|
|
16387
16388
|
}
|
|
@@ -16438,7 +16439,7 @@
|
|
|
16438
16439
|
}
|
|
16439
16440
|
|
|
16440
16441
|
// This is updated with the package.json version on build.
|
|
16441
|
-
const VERSION = "6.8.
|
|
16442
|
+
const VERSION = "6.8.8";
|
|
16442
16443
|
|
|
16443
16444
|
exports.VERSION = VERSION;
|
|
16444
16445
|
exports.AbstractApi = AbstractApi;
|