bruce-models 6.9.1 → 6.9.2

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.
@@ -16470,8 +16470,8 @@ var Tracking;
16470
16470
  Tracking.GetData = GetData;
16471
16471
  })(Tracking || (Tracking = {}));
16472
16472
 
16473
- const JOB_POLL_INTERVAL_MS = 1000;
16474
- const JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16473
+ const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
16474
+ const DEFAULT_JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16475
16475
  const DEFAULT_BASE_URL = "http://localhost:8888";
16476
16476
  /**
16477
16477
  * Lightweight client for the Navigator MCP chat HTTP endpoints.
@@ -16480,10 +16480,12 @@ const DEFAULT_BASE_URL = "http://localhost:8888";
16480
16480
  */
16481
16481
  class NavigatorChatClient {
16482
16482
  constructor(options = {}) {
16483
- var _a, _b;
16483
+ var _a, _b, _c, _d;
16484
16484
  this.baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : DEFAULT_BASE_URL;
16485
16485
  this.fetchImpl = options.fetchImpl;
16486
16486
  this.defaultHeaders = (_b = options.defaultHeaders) !== null && _b !== void 0 ? _b : {};
16487
+ this.jobPollIntervalMs = (_c = options.jobPollIntervalMs) !== null && _c !== void 0 ? _c : DEFAULT_JOB_POLL_INTERVAL_MS;
16488
+ this.jobPollTimeoutMs = (_d = options.jobPollTimeoutMs) !== null && _d !== void 0 ? _d : DEFAULT_JOB_POLL_TIMEOUT_MS;
16487
16489
  }
16488
16490
  /**
16489
16491
  * Ask a question via the MCP chat endpoint.
@@ -16559,11 +16561,11 @@ class NavigatorChatClient {
16559
16561
  }
16560
16562
  const pollPath = (_a = envelope.pollUrl) !== null && _a !== void 0 ? _a : `/chat/jobs/${envelope.jobId}`;
16561
16563
  const startedAt = Date.now();
16562
- while (Date.now() - startedAt < JOB_POLL_TIMEOUT_MS) {
16564
+ while (Date.now() - startedAt < this.jobPollTimeoutMs) {
16563
16565
  const statusPayload = yield this.fetchJobStatus(pollPath, auth);
16564
16566
  const status = statusPayload === null || statusPayload === void 0 ? void 0 : statusPayload.status;
16565
16567
  if (!status) {
16566
- yield this.delay(JOB_POLL_INTERVAL_MS);
16568
+ yield this.delay(this.jobPollIntervalMs);
16567
16569
  continue;
16568
16570
  }
16569
16571
  const combinedSteps = [
@@ -16588,7 +16590,7 @@ class NavigatorChatClient {
16588
16590
  const error = message.trim() || "Chat job failed";
16589
16591
  throw new Error(error);
16590
16592
  }
16591
- yield this.delay(JOB_POLL_INTERVAL_MS);
16593
+ yield this.delay(this.jobPollIntervalMs);
16592
16594
  }
16593
16595
  throw new Error("Chat job polling timed out. Please try again later.");
16594
16596
  });
@@ -16832,7 +16834,7 @@ class NavigatorMcpWebSocketClient {
16832
16834
  }
16833
16835
 
16834
16836
  // This is updated with the package.json version on build.
16835
- const VERSION = "6.9.1";
16837
+ const VERSION = "6.9.2";
16836
16838
 
16837
16839
  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 };
16838
16840
  //# sourceMappingURL=bruce-models.es5.js.map