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.
- package/dist/bruce-models.es5.js +16 -11
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +16 -11
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +1 -1
- package/dist/lib/mcp/navigator-chat.js +3 -0
- package/dist/lib/mcp/navigator-chat.js.map +1 -1
- package/dist/lib/mcp/navigator-mcp-websocket.js +12 -10
- package/dist/lib/mcp/navigator-mcp-websocket.js.map +1 -1
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/mcp/navigator-chat.d.ts +1 -0
- package/dist/types/mcp/navigator-mcp-websocket.d.ts +1 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -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
|
|
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
|
-
(
|
|
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
|
-
(
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
16641
|
+
const VERSION = "6.9.5";
|
|
16637
16642
|
|
|
16638
16643
|
exports.VERSION = VERSION;
|
|
16639
16644
|
exports.AbstractApi = AbstractApi;
|