@letta-ai/letta-agent-sdk 0.8.76 → 0.8.78

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.
@@ -13518,6 +13518,7 @@ class RemoteTurnCoordinator {
13518
13518
  active.observedTurnEvidence = true;
13519
13519
  if (runId)
13520
13520
  active.runIds.add(runId);
13521
+ this.armTurnTimeout(active);
13521
13522
  }
13522
13523
  const sdkMessage = this.transformStreamDelta(delta);
13523
13524
  if (sdkMessage)
@@ -13583,12 +13584,17 @@ class RemoteTurnCoordinator {
13583
13584
  this.activeTurn = turn;
13584
13585
  turn.startedAt = Date.now();
13585
13586
  this._activeTurnStartedAt = turn.startedAt;
13586
- if (this.requestTimeoutMs !== undefined) {
13587
- turn.timeout = setTimeout(() => {
13588
- this.failTurn(turn, `Timed out waiting for ${this.label} turn`);
13589
- }, this.requestTimeoutMs);
13590
- turn.timeout.unref?.();
13591
- }
13587
+ this.armTurnTimeout(turn);
13588
+ }
13589
+ armTurnTimeout(turn) {
13590
+ if (this.requestTimeoutMs === undefined)
13591
+ return;
13592
+ if (turn.timeout)
13593
+ clearTimeout(turn.timeout);
13594
+ turn.timeout = setTimeout(() => {
13595
+ this.failTurn(turn, `Timed out waiting for ${this.label} turn`);
13596
+ }, this.requestTimeoutMs);
13597
+ turn.timeout.unref?.();
13592
13598
  }
13593
13599
  activateNextTurnFromProtocol() {
13594
13600
  if (this.activeTurn)
@@ -18230,4 +18236,4 @@ export {
18230
18236
  CloudManagedSandboxExpiredError
18231
18237
  };
18232
18238
 
18233
- //# debugId=214DC938EA1FA61564756E2164756E21
18239
+ //# debugId=E1CFC3CF63B8416B64756E2164756E21