bruce-models 6.8.4 → 6.8.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.
@@ -16505,8 +16505,13 @@ class NavigatorChatClient {
16505
16505
  }, auth);
16506
16506
  const data = yield this.parseJson(response);
16507
16507
  const text = (_b = (_a = data === null || data === void 0 ? void 0 : data.Text) !== null && _a !== void 0 ? _a : data === null || data === void 0 ? void 0 : data.text) !== null && _b !== void 0 ? _b : "";
16508
+ const rawSteps = Array.isArray(data === null || data === void 0 ? void 0 : data.steps) ? data.steps : [];
16509
+ const steps = rawSteps
16510
+ .filter((step) => step)
16511
+ .map((step, idx) => (Object.assign(Object.assign({}, step), { index: typeof (step === null || step === void 0 ? void 0 : step.index) === "number" ? step.index : idx })));
16508
16512
  return {
16509
16513
  text,
16514
+ steps,
16510
16515
  raw: data
16511
16516
  };
16512
16517
  });
@@ -16696,20 +16701,25 @@ class NavigatorMcpWebSocketClient {
16696
16701
  return urlInstance.toString();
16697
16702
  }
16698
16703
  handleMessage(raw) {
16699
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
16704
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
16700
16705
  return __awaiter(this, void 0, void 0, function* () {
16701
16706
  try {
16702
16707
  const message = typeof raw === "string" ? JSON.parse(raw) : raw;
16703
16708
  const method = message === null || message === void 0 ? void 0 : message.method;
16709
+ if (method === "chat/event") {
16710
+ const payload = ((_a = message === null || message === void 0 ? void 0 : message.params) !== null && _a !== void 0 ? _a : {});
16711
+ (_c = (_b = this.options).onChatEvent) === null || _c === void 0 ? void 0 : _c.call(_b, payload);
16712
+ return;
16713
+ }
16704
16714
  if (method !== "tools/call") {
16705
- (_b = (_a = this.logger()).debug) === null || _b === void 0 ? void 0 : _b.call(_a, "[NavigatorMcpWS] Ignoring non tool-call message", message);
16715
+ (_e = (_d = this.logger()).debug) === null || _e === void 0 ? void 0 : _e.call(_d, "[NavigatorMcpWS] Ignoring unsupported message", message);
16706
16716
  return;
16707
16717
  }
16708
- const toolName = (_c = message === null || message === void 0 ? void 0 : message.params) === null || _c === void 0 ? void 0 : _c.name;
16709
- const toolArgs = (_d = message === null || message === void 0 ? void 0 : message.params) === null || _d === void 0 ? void 0 : _d.arguments;
16718
+ const toolName = (_f = message === null || message === void 0 ? void 0 : message.params) === null || _f === void 0 ? void 0 : _f.name;
16719
+ const toolArgs = (_g = message === null || message === void 0 ? void 0 : message.params) === null || _g === void 0 ? void 0 : _g.arguments;
16710
16720
  const messageId = message === null || message === void 0 ? void 0 : message.id;
16711
16721
  if (!toolName) {
16712
- (_f = (_e = this.logger()).warn) === null || _f === void 0 ? void 0 : _f.call(_e, "[NavigatorMcpWS] Received tool call without name", message);
16722
+ (_j = (_h = this.logger()).warn) === null || _j === void 0 ? void 0 : _j.call(_h, "[NavigatorMcpWS] Received tool call without name", message);
16713
16723
  return;
16714
16724
  }
16715
16725
  let result;
@@ -16721,7 +16731,7 @@ class NavigatorMcpWebSocketClient {
16721
16731
  });
16722
16732
  }
16723
16733
  catch (error) {
16724
- (_h = (_g = this.logger()).error) === null || _h === void 0 ? void 0 : _h.call(_g, "[NavigatorMcpWS] Tool handler threw", error);
16734
+ (_l = (_k = this.logger()).error) === null || _l === void 0 ? void 0 : _l.call(_k, "[NavigatorMcpWS] Tool handler threw", error);
16725
16735
  result = `Error: ${error instanceof Error ? error.message : String(error)}`;
16726
16736
  }
16727
16737
  this.send({
@@ -16731,7 +16741,7 @@ class NavigatorMcpWebSocketClient {
16731
16741
  });
16732
16742
  }
16733
16743
  catch (error) {
16734
- (_k = (_j = this.logger()).error) === null || _k === void 0 ? void 0 : _k.call(_j, "[NavigatorMcpWS] Invalid message", error);
16744
+ (_o = (_m = this.logger()).error) === null || _o === void 0 ? void 0 : _o.call(_m, "[NavigatorMcpWS] Invalid message", error);
16735
16745
  }
16736
16746
  });
16737
16747
  }
@@ -16743,7 +16753,7 @@ class NavigatorMcpWebSocketClient {
16743
16753
  }
16744
16754
 
16745
16755
  // This is updated with the package.json version on build.
16746
- const VERSION = "6.8.4";
16756
+ const VERSION = "6.8.6";
16747
16757
 
16748
16758
  export { VERSION, Assembly, AnnDocument, CustomForm, AbstractApi, Api, BruceApi, GlobalApi, GuardianApi, ApiGetters, Calculator, Bounds, BruceEvent, CacheControl, Camera, Cartes, Carto, Color, DelayQueue, Geometry, UTC, BruceVariable, LRUCache, GeoJson, EntityAttachmentType, EntityAttachment, EntityComment, EntityLink, EntityLod, EntityLodCategory, EntityRelationType, EntityRelation, EntitySource, EntityTag, EntityType, Entity, EntityCoords, EntityAttribute, EntityHistoricData, EntityTableView, Comment, ClientFile, ProgramKey, ZoomControl, MenuItem, ProjectViewBookmark, ProjectView, ProjectViewLegacyTile, ProjectViewTile, ProjectViewLegacy, ProjectViewLegacyBookmark, ProjectViewBookmarkGroup, PendingAction, MessageBroker, HostingLocation, Style, Tileset, Permission, Session, UserGroup, User, UserMfaMethod, Account, AccountInvite, AccountFeatures, AccountLimits, AccountTemplate, AccountType, EncryptUtils, MathUtils, ObjectUtils, PathUtils, UrlUtils, DataLab, DataLabGroup, ImportAssembly, ImportCad, ImportCsv, ImportJson, ImportGeoJson, ImportKml, ImportedFile, ExportBrz, ExportUsd, Markup, Uploader, Plugin, ENVIRONMENT, DataSource, Scenario, Tracking, NavigatorChatClient, NavigatorMcpWebSocketClient };
16749
16759
  //# sourceMappingURL=bruce-models.es5.js.map