bruce-models 6.9.1 → 6.9.3

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.
@@ -9431,9 +9431,14 @@ var ClientFile;
9431
9431
  percent: 100,
9432
9432
  uploaded: true
9433
9433
  });
9434
- return {
9435
- tempFileId: tempFile["TempFile.ID"]
9436
- };
9434
+ // Keeping any other magic properties in there.
9435
+ // When we upload a plant-3dz file it also returns its 'projects' which is a fun magic side-effect we really need to kill.
9436
+ const res = Object.assign({}, tempFile);
9437
+ if (res["TempFile.ID"]) {
9438
+ res.tempFileId = res["TempFile.ID"];
9439
+ delete res["TempFile.ID"];
9440
+ }
9441
+ return res;
9437
9442
  });
9438
9443
  }
9439
9444
  ClientFile.UploadTemp = UploadTemp;
@@ -16470,8 +16475,8 @@ var Tracking;
16470
16475
  Tracking.GetData = GetData;
16471
16476
  })(Tracking || (Tracking = {}));
16472
16477
 
16473
- const JOB_POLL_INTERVAL_MS = 1000;
16474
- const JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16478
+ const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
16479
+ const DEFAULT_JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16475
16480
  const DEFAULT_BASE_URL = "http://localhost:8888";
16476
16481
  /**
16477
16482
  * Lightweight client for the Navigator MCP chat HTTP endpoints.
@@ -16480,10 +16485,12 @@ const DEFAULT_BASE_URL = "http://localhost:8888";
16480
16485
  */
16481
16486
  class NavigatorChatClient {
16482
16487
  constructor(options = {}) {
16483
- var _a, _b;
16488
+ var _a, _b, _c, _d;
16484
16489
  this.baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : DEFAULT_BASE_URL;
16485
16490
  this.fetchImpl = options.fetchImpl;
16486
16491
  this.defaultHeaders = (_b = options.defaultHeaders) !== null && _b !== void 0 ? _b : {};
16492
+ this.jobPollIntervalMs = (_c = options.jobPollIntervalMs) !== null && _c !== void 0 ? _c : DEFAULT_JOB_POLL_INTERVAL_MS;
16493
+ this.jobPollTimeoutMs = (_d = options.jobPollTimeoutMs) !== null && _d !== void 0 ? _d : DEFAULT_JOB_POLL_TIMEOUT_MS;
16487
16494
  }
16488
16495
  /**
16489
16496
  * Ask a question via the MCP chat endpoint.
@@ -16559,11 +16566,11 @@ class NavigatorChatClient {
16559
16566
  }
16560
16567
  const pollPath = (_a = envelope.pollUrl) !== null && _a !== void 0 ? _a : `/chat/jobs/${envelope.jobId}`;
16561
16568
  const startedAt = Date.now();
16562
- while (Date.now() - startedAt < JOB_POLL_TIMEOUT_MS) {
16569
+ while (Date.now() - startedAt < this.jobPollTimeoutMs) {
16563
16570
  const statusPayload = yield this.fetchJobStatus(pollPath, auth);
16564
16571
  const status = statusPayload === null || statusPayload === void 0 ? void 0 : statusPayload.status;
16565
16572
  if (!status) {
16566
- yield this.delay(JOB_POLL_INTERVAL_MS);
16573
+ yield this.delay(this.jobPollIntervalMs);
16567
16574
  continue;
16568
16575
  }
16569
16576
  const combinedSteps = [
@@ -16588,7 +16595,7 @@ class NavigatorChatClient {
16588
16595
  const error = message.trim() || "Chat job failed";
16589
16596
  throw new Error(error);
16590
16597
  }
16591
- yield this.delay(JOB_POLL_INTERVAL_MS);
16598
+ yield this.delay(this.jobPollIntervalMs);
16592
16599
  }
16593
16600
  throw new Error("Chat job polling timed out. Please try again later.");
16594
16601
  });
@@ -16832,7 +16839,7 @@ class NavigatorMcpWebSocketClient {
16832
16839
  }
16833
16840
 
16834
16841
  // This is updated with the package.json version on build.
16835
- const VERSION = "6.9.1";
16842
+ const VERSION = "6.9.3";
16836
16843
 
16837
16844
  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
16845
  //# sourceMappingURL=bruce-models.es5.js.map