@ai-sdk/harness-codex 1.0.189 → 1.0.191

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.
@@ -152,6 +152,11 @@ export type CodexHarnessSettings = {
152
152
  * milliseconds up to 2 seconds.
153
153
  */
154
154
  readonly reconnect?: SandboxChannelReconnectOptions;
155
+ /**
156
+ * WebSocket ping interval in milliseconds. Defaults to 20_000. Set to 0 to
157
+ * disable. Two unanswered pings terminate the socket and trigger reconnect.
158
+ */
159
+ readonly keepAliveMs?: number;
155
160
  // TODO: Remove in the next major version.
156
161
  /**
157
162
  * @deprecated Sandbox bridge authentication now uses adapter-generated
@@ -405,6 +410,7 @@ export function createCodex(
405
410
  onDiagnostic,
406
411
  onBridgeError,
407
412
  reconnect: settings.reconnect,
413
+ keepAliveMs: settings.keepAliveMs,
408
414
  });
409
415
  await attachChannel.open(isContinue ? { resume: true } : undefined);
410
416
  return createSession({
@@ -563,6 +569,7 @@ export function createCodex(
563
569
  onDiagnostic,
564
570
  onBridgeError,
565
571
  reconnect: settings.reconnect,
572
+ keepAliveMs: settings.keepAliveMs,
566
573
  // In replay mode the respawned bridge reloaded the finished turn from
567
574
  // disk; seed the cursor and resume so it streams the tail (incl.
568
575
  // `finish`).