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.
@@ -16155,8 +16155,8 @@
16155
16155
  Tracking.GetData = GetData;
16156
16156
  })(exports.Tracking || (exports.Tracking = {}));
16157
16157
 
16158
- const JOB_POLL_INTERVAL_MS = 1000;
16159
- const JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16158
+ const DEFAULT_JOB_POLL_INTERVAL_MS = 1000;
16159
+ const DEFAULT_JOB_POLL_TIMEOUT_MS = 4 * 60 * 1000; // match server timeout (4 minutes)
16160
16160
  const DEFAULT_BASE_URL = "http://localhost:8888";
16161
16161
  /**
16162
16162
  * Lightweight client for the Navigator MCP chat HTTP endpoints.
@@ -16165,10 +16165,12 @@
16165
16165
  */
16166
16166
  class NavigatorChatClient {
16167
16167
  constructor(options = {}) {
16168
- var _a, _b;
16168
+ var _a, _b, _c, _d;
16169
16169
  this.baseUrl = (_a = options.baseUrl) !== null && _a !== void 0 ? _a : DEFAULT_BASE_URL;
16170
16170
  this.fetchImpl = options.fetchImpl;
16171
16171
  this.defaultHeaders = (_b = options.defaultHeaders) !== null && _b !== void 0 ? _b : {};
16172
+ this.jobPollIntervalMs = (_c = options.jobPollIntervalMs) !== null && _c !== void 0 ? _c : DEFAULT_JOB_POLL_INTERVAL_MS;
16173
+ this.jobPollTimeoutMs = (_d = options.jobPollTimeoutMs) !== null && _d !== void 0 ? _d : DEFAULT_JOB_POLL_TIMEOUT_MS;
16172
16174
  }
16173
16175
  /**
16174
16176
  * Ask a question via the MCP chat endpoint.
@@ -16244,11 +16246,11 @@
16244
16246
  }
16245
16247
  const pollPath = (_a = envelope.pollUrl) !== null && _a !== void 0 ? _a : `/chat/jobs/${envelope.jobId}`;
16246
16248
  const startedAt = Date.now();
16247
- while (Date.now() - startedAt < JOB_POLL_TIMEOUT_MS) {
16249
+ while (Date.now() - startedAt < this.jobPollTimeoutMs) {
16248
16250
  const statusPayload = yield this.fetchJobStatus(pollPath, auth);
16249
16251
  const status = statusPayload === null || statusPayload === void 0 ? void 0 : statusPayload.status;
16250
16252
  if (!status) {
16251
- yield this.delay(JOB_POLL_INTERVAL_MS);
16253
+ yield this.delay(this.jobPollIntervalMs);
16252
16254
  continue;
16253
16255
  }
16254
16256
  const combinedSteps = [
@@ -16273,7 +16275,7 @@
16273
16275
  const error = message.trim() || "Chat job failed";
16274
16276
  throw new Error(error);
16275
16277
  }
16276
- yield this.delay(JOB_POLL_INTERVAL_MS);
16278
+ yield this.delay(this.jobPollIntervalMs);
16277
16279
  }
16278
16280
  throw new Error("Chat job polling timed out. Please try again later.");
16279
16281
  });
@@ -16517,7 +16519,7 @@
16517
16519
  }
16518
16520
 
16519
16521
  // This is updated with the package.json version on build.
16520
- const VERSION = "6.9.1";
16522
+ const VERSION = "6.9.2";
16521
16523
 
16522
16524
  exports.VERSION = VERSION;
16523
16525
  exports.AbstractApi = AbstractApi;