buckyos 0.7.203 → 0.7.205

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/cli/version.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  // Generated by scripts/generate-cli-version.mjs. Do not edit.
2
- export const PACKAGE_VERSION = '0.7.203'
2
+ export const PACKAGE_VERSION = '0.7.205'
3
3
  export const TOOL_VERSION = PACKAGE_VERSION
4
4
  export const SDK_VERSION = PACKAGE_VERSION
5
5
  export const PROTOCOL_VERSION = '1'
@@ -4464,6 +4464,7 @@ class KEventReader {
4464
4464
  return this.closePromise;
4465
4465
  }
4466
4466
  }
4467
+ const SILENT_PERIODS = 3;
4467
4468
  class BrowserKEventReader extends KEventReader {
4468
4469
  constructor(streamUrl, patterns, keepaliveMs, fetcher, sessionTokenProvider, signal) {
4469
4470
  super();
@@ -4567,12 +4568,21 @@ class BrowserKEventReader extends KEventReader {
4567
4568
  const reader = body.getReader();
4568
4569
  const decoder = new TextDecoder();
4569
4570
  let buffer = "";
4571
+ let silentPeriods = 0;
4572
+ const watchdog = setInterval(() => {
4573
+ silentPeriods += 1;
4574
+ if (silentPeriods >= SILENT_PERIODS) {
4575
+ this.controller.abort();
4576
+ void reader.cancel().catch(() => void 0);
4577
+ }
4578
+ }, this.keepaliveMs);
4570
4579
  try {
4571
4580
  while (!this.controller.signal.aborted) {
4572
4581
  const { value, done } = await reader.read();
4573
4582
  if (done) {
4574
4583
  break;
4575
4584
  }
4585
+ silentPeriods = 0;
4576
4586
  buffer += decoder.decode(value, { stream: true });
4577
4587
  buffer = this.processFrameBuffer(buffer, onFrame);
4578
4588
  }
@@ -4582,6 +4592,7 @@ class BrowserKEventReader extends KEventReader {
4582
4592
  this.handleFrameLine(buffer, onFrame);
4583
4593
  }
4584
4594
  } finally {
4595
+ clearInterval(watchdog);
4585
4596
  try {
4586
4597
  await reader.cancel();
4587
4598
  } catch {
@@ -32687,4 +32698,4 @@ export {
32687
32698
  NOTIFY_SESSION_PREFIX as y,
32688
32699
  NOTIFY_CHOICE_CONTROL_ID as z
32689
32700
  };
32690
- //# sourceMappingURL=aiws_write-0606e098.mjs.map
32701
+ //# sourceMappingURL=aiws_write-47c90e76.mjs.map