@meistrari/sandbox-sdk 1.0.7 → 1.0.8

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/dist/index.cjs CHANGED
@@ -301,6 +301,14 @@ class SandboxClient {
301
301
  if (!run.isComplete) {
302
302
  const elapsedMs = Date.now() - streamStartMs;
303
303
  const remainingMs = timeoutMs - elapsedMs;
304
+ if (remainingMs <= 0) {
305
+ yield {
306
+ type: "error",
307
+ runId,
308
+ content: "Timeout exceeded before polling fallback could start"
309
+ };
310
+ return;
311
+ }
304
312
  const intervalMs = 500;
305
313
  const maxAttempts = Math.max(1, Math.floor(remainingMs / intervalMs));
306
314
  run = await run.waitForCompletion({ intervalMs, maxAttempts });
package/dist/index.mjs CHANGED
@@ -299,6 +299,14 @@ class SandboxClient {
299
299
  if (!run.isComplete) {
300
300
  const elapsedMs = Date.now() - streamStartMs;
301
301
  const remainingMs = timeoutMs - elapsedMs;
302
+ if (remainingMs <= 0) {
303
+ yield {
304
+ type: "error",
305
+ runId,
306
+ content: "Timeout exceeded before polling fallback could start"
307
+ };
308
+ return;
309
+ }
302
310
  const intervalMs = 500;
303
311
  const maxAttempts = Math.max(1, Math.floor(remainingMs / intervalMs));
304
312
  run = await run.waitForCompletion({ intervalMs, maxAttempts });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meistrari/sandbox-sdk",
3
- "version": "1.0.7",
3
+ "version": "1.0.8",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {