@trigger.dev/core 0.0.0-prerelease-20250430143421 → 0.0.0-prerelease-20250503193704

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.
Files changed (115) hide show
  1. package/dist/commonjs/utils.d.ts +6 -0
  2. package/dist/commonjs/utils.js +14 -0
  3. package/dist/commonjs/utils.js.map +1 -1
  4. package/dist/commonjs/v3/apiClient/index.d.ts +43 -43
  5. package/dist/commonjs/v3/apiClientManager/index.d.ts +1 -1
  6. package/dist/commonjs/v3/lifecycle-hooks-api.d.ts +1 -1
  7. package/dist/commonjs/v3/lifecycleHooks/index.d.ts +7 -1
  8. package/dist/commonjs/v3/lifecycleHooks/index.js +18 -0
  9. package/dist/commonjs/v3/lifecycleHooks/index.js.map +1 -1
  10. package/dist/commonjs/v3/lifecycleHooks/manager.d.ts +18 -3
  11. package/dist/commonjs/v3/lifecycleHooks/manager.js +49 -2
  12. package/dist/commonjs/v3/lifecycleHooks/manager.js.map +1 -1
  13. package/dist/commonjs/v3/lifecycleHooks/types.d.ts +26 -10
  14. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +17 -17
  15. package/dist/commonjs/v3/runEngineWorker/supervisor/queueConsumer.d.ts +4 -2
  16. package/dist/commonjs/v3/runEngineWorker/supervisor/queueConsumer.js +11 -5
  17. package/dist/commonjs/v3/runEngineWorker/supervisor/queueConsumer.js.map +1 -1
  18. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +164 -164
  19. package/dist/commonjs/v3/runEngineWorker/supervisor/session.d.ts +3 -3
  20. package/dist/commonjs/v3/runEngineWorker/supervisor/session.js +2 -4
  21. package/dist/commonjs/v3/runEngineWorker/supervisor/session.js.map +1 -1
  22. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +12 -12
  23. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +142 -142
  24. package/dist/commonjs/v3/schemas/api.d.ts +214 -214
  25. package/dist/commonjs/v3/schemas/build.d.ts +164 -164
  26. package/dist/commonjs/v3/schemas/checkpoints.d.ts +18 -18
  27. package/dist/commonjs/v3/schemas/common.d.ts +171 -171
  28. package/dist/commonjs/v3/schemas/fetch.d.ts +10 -10
  29. package/dist/commonjs/v3/schemas/messages.d.ts +3046 -3036
  30. package/dist/commonjs/v3/schemas/messages.js +6 -0
  31. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  32. package/dist/commonjs/v3/schemas/resources.d.ts +34 -34
  33. package/dist/commonjs/v3/schemas/runEngine.d.ts +68 -68
  34. package/dist/commonjs/v3/schemas/schemas.d.ts +128 -128
  35. package/dist/commonjs/v3/schemas/style.d.ts +2 -2
  36. package/dist/commonjs/v3/schemas/webhooks.d.ts +166 -166
  37. package/dist/commonjs/v3/streams/asyncIterableStream.d.ts +2 -1
  38. package/dist/commonjs/v3/streams/asyncIterableStream.js +4 -0
  39. package/dist/commonjs/v3/streams/asyncIterableStream.js.map +1 -1
  40. package/dist/commonjs/v3/timeout/api.d.ts +1 -1
  41. package/dist/commonjs/v3/timeout/api.js +4 -4
  42. package/dist/commonjs/v3/timeout/api.js.map +1 -1
  43. package/dist/commonjs/v3/timeout/types.d.ts +1 -1
  44. package/dist/commonjs/v3/timeout/usageTimeoutManager.d.ts +2 -1
  45. package/dist/commonjs/v3/timeout/usageTimeoutManager.js +10 -3
  46. package/dist/commonjs/v3/timeout/usageTimeoutManager.js.map +1 -1
  47. package/dist/commonjs/v3/tryCatch.d.ts +3 -4
  48. package/dist/commonjs/v3/types/tasks.d.ts +17 -9
  49. package/dist/commonjs/v3/types/tasks.js.map +1 -1
  50. package/dist/commonjs/v3/usage/devUsageManager.js +3 -1
  51. package/dist/commonjs/v3/usage/devUsageManager.js.map +1 -1
  52. package/dist/commonjs/v3/usage-api.d.ts +1 -0
  53. package/dist/commonjs/v3/workers/taskExecutor.d.ts +1 -1
  54. package/dist/commonjs/v3/workers/taskExecutor.js +76 -16
  55. package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
  56. package/dist/commonjs/v3/zodMessageHandler.d.ts +1 -1
  57. package/dist/commonjs/version.js +1 -1
  58. package/dist/esm/utils.d.ts +6 -0
  59. package/dist/esm/utils.js +13 -0
  60. package/dist/esm/utils.js.map +1 -1
  61. package/dist/esm/v3/apiClient/index.d.ts +43 -43
  62. package/dist/esm/v3/apiClientManager/index.d.ts +1 -1
  63. package/dist/esm/v3/lifecycle-hooks-api.d.ts +1 -1
  64. package/dist/esm/v3/lifecycleHooks/index.d.ts +7 -1
  65. package/dist/esm/v3/lifecycleHooks/index.js +18 -0
  66. package/dist/esm/v3/lifecycleHooks/index.js.map +1 -1
  67. package/dist/esm/v3/lifecycleHooks/manager.d.ts +18 -3
  68. package/dist/esm/v3/lifecycleHooks/manager.js +49 -2
  69. package/dist/esm/v3/lifecycleHooks/manager.js.map +1 -1
  70. package/dist/esm/v3/lifecycleHooks/types.d.ts +26 -10
  71. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +17 -17
  72. package/dist/esm/v3/runEngineWorker/supervisor/queueConsumer.d.ts +4 -2
  73. package/dist/esm/v3/runEngineWorker/supervisor/queueConsumer.js +11 -5
  74. package/dist/esm/v3/runEngineWorker/supervisor/queueConsumer.js.map +1 -1
  75. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +164 -164
  76. package/dist/esm/v3/runEngineWorker/supervisor/session.d.ts +3 -3
  77. package/dist/esm/v3/runEngineWorker/supervisor/session.js +2 -4
  78. package/dist/esm/v3/runEngineWorker/supervisor/session.js.map +1 -1
  79. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +12 -12
  80. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +142 -142
  81. package/dist/esm/v3/schemas/api.d.ts +214 -214
  82. package/dist/esm/v3/schemas/build.d.ts +164 -164
  83. package/dist/esm/v3/schemas/checkpoints.d.ts +18 -18
  84. package/dist/esm/v3/schemas/common.d.ts +171 -171
  85. package/dist/esm/v3/schemas/fetch.d.ts +10 -10
  86. package/dist/esm/v3/schemas/messages.d.ts +3046 -3036
  87. package/dist/esm/v3/schemas/messages.js +6 -0
  88. package/dist/esm/v3/schemas/messages.js.map +1 -1
  89. package/dist/esm/v3/schemas/resources.d.ts +34 -34
  90. package/dist/esm/v3/schemas/runEngine.d.ts +68 -68
  91. package/dist/esm/v3/schemas/schemas.d.ts +128 -128
  92. package/dist/esm/v3/schemas/style.d.ts +2 -2
  93. package/dist/esm/v3/schemas/webhooks.d.ts +166 -166
  94. package/dist/esm/v3/streams/asyncIterableStream.d.ts +2 -1
  95. package/dist/esm/v3/streams/asyncIterableStream.js +3 -0
  96. package/dist/esm/v3/streams/asyncIterableStream.js.map +1 -1
  97. package/dist/esm/v3/timeout/api.d.ts +1 -1
  98. package/dist/esm/v3/timeout/api.js +4 -4
  99. package/dist/esm/v3/timeout/api.js.map +1 -1
  100. package/dist/esm/v3/timeout/types.d.ts +1 -1
  101. package/dist/esm/v3/timeout/usageTimeoutManager.d.ts +2 -1
  102. package/dist/esm/v3/timeout/usageTimeoutManager.js +10 -3
  103. package/dist/esm/v3/timeout/usageTimeoutManager.js.map +1 -1
  104. package/dist/esm/v3/tryCatch.d.ts +3 -4
  105. package/dist/esm/v3/types/tasks.d.ts +17 -9
  106. package/dist/esm/v3/types/tasks.js.map +1 -1
  107. package/dist/esm/v3/usage/devUsageManager.js +3 -1
  108. package/dist/esm/v3/usage/devUsageManager.js.map +1 -1
  109. package/dist/esm/v3/usage-api.d.ts +1 -0
  110. package/dist/esm/v3/workers/taskExecutor.d.ts +1 -1
  111. package/dist/esm/v3/workers/taskExecutor.js +77 -17
  112. package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
  113. package/dist/esm/v3/zodMessageHandler.d.ts +1 -1
  114. package/dist/esm/version.js +1 -1
  115. package/package.json +1 -1
@@ -179,23 +179,23 @@ export declare const WorkerApiConnectResponseBody: z.ZodObject<{
179
179
  type: z.ZodString;
180
180
  name: z.ZodString;
181
181
  }, "strip", z.ZodTypeAny, {
182
- name: string;
183
182
  type: string;
184
- }, {
185
183
  name: string;
184
+ }, {
186
185
  type: string;
186
+ name: string;
187
187
  }>;
188
188
  }, "strip", z.ZodTypeAny, {
189
189
  ok: true;
190
190
  workerGroup: {
191
- name: string;
192
191
  type: string;
192
+ name: string;
193
193
  };
194
194
  }, {
195
195
  ok: true;
196
196
  workerGroup: {
197
- name: string;
198
197
  type: string;
198
+ name: string;
199
199
  };
200
200
  }>;
201
201
  export type WorkerApiConnectResponseBody = z.infer<typeof WorkerApiConnectResponseBody>;
@@ -316,10 +316,12 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
316
316
  }, "strip", z.ZodTypeAny, {
317
317
  type: import("../../schemas/runEngine.js").WaitpointType;
318
318
  id: string;
319
- friendlyId: string;
320
319
  completedAt: Date;
320
+ friendlyId: string;
321
321
  outputIsError: boolean;
322
322
  idempotencyKey?: string | undefined;
323
+ output?: string | undefined;
324
+ outputType?: string | undefined;
323
325
  index?: number | undefined;
324
326
  completedByTaskRun?: {
325
327
  id: string;
@@ -334,15 +336,15 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
334
336
  id: string;
335
337
  friendlyId: string;
336
338
  } | undefined;
337
- output?: string | undefined;
338
- outputType?: string | undefined;
339
339
  }, {
340
340
  type: import("../../schemas/runEngine.js").WaitpointType;
341
341
  id: string;
342
- friendlyId: string;
343
342
  completedAt: Date;
343
+ friendlyId: string;
344
344
  outputIsError: boolean;
345
345
  idempotencyKey?: string | undefined;
346
+ output?: string | undefined;
347
+ outputType?: string | undefined;
346
348
  index?: number | undefined;
347
349
  completedByTaskRun?: {
348
350
  id: string;
@@ -357,8 +359,6 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
357
359
  id: string;
358
360
  friendlyId: string;
359
361
  } | undefined;
360
- output?: string | undefined;
361
- outputType?: string | undefined;
362
362
  }>, "many">;
363
363
  backgroundWorker: z.ZodObject<{
364
364
  id: z.ZodString;
@@ -393,14 +393,14 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
393
393
  memory: z.ZodNumber;
394
394
  centsPerMs: z.ZodNumber;
395
395
  }, "strip", z.ZodTypeAny, {
396
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
397
396
  cpu: number;
398
397
  memory: number;
398
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
399
399
  centsPerMs: number;
400
400
  }, {
401
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
402
401
  cpu: number;
403
402
  memory: number;
403
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
404
404
  centsPerMs: number;
405
405
  }>;
406
406
  attemptNumber: z.ZodNumber;
@@ -411,9 +411,9 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
411
411
  isTest: boolean;
412
412
  traceContext: Record<string, unknown>;
413
413
  machine: {
414
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
415
414
  cpu: number;
416
415
  memory: number;
416
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
417
417
  centsPerMs: number;
418
418
  };
419
419
  friendlyId: string;
@@ -424,9 +424,9 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
424
424
  isTest: boolean;
425
425
  traceContext: Record<string, unknown>;
426
426
  machine: {
427
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
428
427
  cpu: number;
429
428
  memory: number;
429
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
430
430
  centsPerMs: number;
431
431
  };
432
432
  friendlyId: string;
@@ -464,9 +464,9 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
464
464
  isTest: boolean;
465
465
  traceContext: Record<string, unknown>;
466
466
  machine: {
467
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
468
467
  cpu: number;
469
468
  memory: number;
469
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
470
470
  centsPerMs: number;
471
471
  };
472
472
  friendlyId: string;
@@ -492,10 +492,12 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
492
492
  completedWaitpoints: {
493
493
  type: import("../../schemas/runEngine.js").WaitpointType;
494
494
  id: string;
495
- friendlyId: string;
496
495
  completedAt: Date;
496
+ friendlyId: string;
497
497
  outputIsError: boolean;
498
498
  idempotencyKey?: string | undefined;
499
+ output?: string | undefined;
500
+ outputType?: string | undefined;
499
501
  index?: number | undefined;
500
502
  completedByTaskRun?: {
501
503
  id: string;
@@ -510,8 +512,6 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
510
512
  id: string;
511
513
  friendlyId: string;
512
514
  } | undefined;
513
- output?: string | undefined;
514
- outputType?: string | undefined;
515
515
  }[];
516
516
  dequeuedAt: Date;
517
517
  backgroundWorker: {
@@ -538,9 +538,9 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
538
538
  isTest: boolean;
539
539
  traceContext: Record<string, unknown>;
540
540
  machine: {
541
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
542
541
  cpu: number;
543
542
  memory: number;
543
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
544
544
  centsPerMs: number;
545
545
  };
546
546
  friendlyId: string;
@@ -566,10 +566,12 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
566
566
  completedWaitpoints: {
567
567
  type: import("../../schemas/runEngine.js").WaitpointType;
568
568
  id: string;
569
- friendlyId: string;
570
569
  completedAt: Date;
570
+ friendlyId: string;
571
571
  outputIsError: boolean;
572
572
  idempotencyKey?: string | undefined;
573
+ output?: string | undefined;
574
+ outputType?: string | undefined;
573
575
  index?: number | undefined;
574
576
  completedByTaskRun?: {
575
577
  id: string;
@@ -584,8 +586,6 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
584
586
  id: string;
585
587
  friendlyId: string;
586
588
  } | undefined;
587
- output?: string | undefined;
588
- outputType?: string | undefined;
589
589
  }[];
590
590
  dequeuedAt: Date;
591
591
  backgroundWorker: {
@@ -749,37 +749,37 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
749
749
  baseCostInCents: z.ZodDefault<z.ZodNumber>;
750
750
  priority: z.ZodOptional<z.ZodNumber>;
751
751
  }, "strip", z.ZodTypeAny, {
752
- id: string;
753
- startedAt: Date;
754
752
  payload: string;
753
+ id: string;
755
754
  payloadType: string;
756
755
  tags: string[];
757
756
  isTest: boolean;
758
757
  createdAt: Date;
758
+ startedAt: Date;
759
759
  durationMs: number;
760
760
  costInCents: number;
761
761
  baseCostInCents: number;
762
+ context?: any;
763
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
762
764
  idempotencyKey?: string | undefined;
763
765
  maxAttempts?: number | undefined;
764
766
  version?: string | undefined;
765
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
766
767
  maxDuration?: number | undefined;
767
- context?: any;
768
768
  priority?: number | undefined;
769
769
  }, {
770
- id: string;
771
770
  payload: string;
771
+ id: string;
772
772
  payloadType: string;
773
773
  tags: string[];
774
774
  createdAt: Date;
775
- startedAt?: Date | undefined;
775
+ context?: any;
776
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
776
777
  isTest?: boolean | undefined;
778
+ startedAt?: Date | undefined;
777
779
  idempotencyKey?: string | undefined;
778
780
  maxAttempts?: number | undefined;
779
781
  version?: string | undefined;
780
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
781
782
  maxDuration?: number | undefined;
782
- context?: any;
783
783
  durationMs?: number | undefined;
784
784
  costInCents?: number | undefined;
785
785
  baseCostInCents?: number | undefined;
@@ -856,14 +856,14 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
856
856
  memory: z.ZodNumber;
857
857
  centsPerMs: z.ZodNumber;
858
858
  }, "strip", z.ZodTypeAny, {
859
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
860
859
  cpu: number;
861
860
  memory: number;
861
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
862
862
  centsPerMs: number;
863
863
  }, {
864
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
865
864
  cpu: number;
866
865
  memory: number;
866
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
867
867
  centsPerMs: number;
868
868
  }>;
869
869
  }, "strip", z.ZodTypeAny, {
@@ -881,22 +881,22 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
881
881
  backgroundWorkerTaskId: string;
882
882
  };
883
883
  run: {
884
- id: string;
885
- startedAt: Date;
886
884
  payload: string;
885
+ id: string;
887
886
  payloadType: string;
888
887
  tags: string[];
889
888
  isTest: boolean;
890
889
  createdAt: Date;
890
+ startedAt: Date;
891
891
  durationMs: number;
892
892
  costInCents: number;
893
893
  baseCostInCents: number;
894
+ context?: any;
895
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
894
896
  idempotencyKey?: string | undefined;
895
897
  maxAttempts?: number | undefined;
896
898
  version?: string | undefined;
897
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
898
899
  maxDuration?: number | undefined;
899
- context?: any;
900
900
  priority?: number | undefined;
901
901
  } & {
902
902
  traceContext?: Record<string, unknown> | undefined;
@@ -922,9 +922,9 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
922
922
  ref: string;
923
923
  };
924
924
  machine: {
925
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
926
925
  cpu: number;
927
926
  memory: number;
927
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
928
928
  centsPerMs: number;
929
929
  };
930
930
  batch?: {
@@ -945,19 +945,19 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
945
945
  backgroundWorkerTaskId: string;
946
946
  };
947
947
  run: {
948
- id: string;
949
948
  payload: string;
949
+ id: string;
950
950
  payloadType: string;
951
951
  tags: string[];
952
952
  createdAt: Date;
953
- startedAt?: Date | undefined;
953
+ context?: any;
954
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
954
955
  isTest?: boolean | undefined;
956
+ startedAt?: Date | undefined;
955
957
  idempotencyKey?: string | undefined;
956
958
  maxAttempts?: number | undefined;
957
959
  version?: string | undefined;
958
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
959
960
  maxDuration?: number | undefined;
960
- context?: any;
961
961
  durationMs?: number | undefined;
962
962
  costInCents?: number | undefined;
963
963
  baseCostInCents?: number | undefined;
@@ -986,9 +986,9 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
986
986
  ref: string;
987
987
  };
988
988
  machine: {
989
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
990
989
  cpu: number;
991
990
  memory: number;
991
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
992
992
  centsPerMs: number;
993
993
  };
994
994
  batch?: {
@@ -1011,22 +1011,22 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1011
1011
  backgroundWorkerTaskId: string;
1012
1012
  };
1013
1013
  run: {
1014
- id: string;
1015
- startedAt: Date;
1016
1014
  payload: string;
1015
+ id: string;
1017
1016
  payloadType: string;
1018
1017
  tags: string[];
1019
1018
  isTest: boolean;
1020
1019
  createdAt: Date;
1020
+ startedAt: Date;
1021
1021
  durationMs: number;
1022
1022
  costInCents: number;
1023
1023
  baseCostInCents: number;
1024
+ context?: any;
1025
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1024
1026
  idempotencyKey?: string | undefined;
1025
1027
  maxAttempts?: number | undefined;
1026
1028
  version?: string | undefined;
1027
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1028
1029
  maxDuration?: number | undefined;
1029
- context?: any;
1030
1030
  priority?: number | undefined;
1031
1031
  } & {
1032
1032
  traceContext?: Record<string, unknown> | undefined;
@@ -1052,9 +1052,9 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1052
1052
  ref: string;
1053
1053
  };
1054
1054
  machine: {
1055
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1056
1055
  cpu: number;
1057
1056
  memory: number;
1057
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1058
1058
  centsPerMs: number;
1059
1059
  };
1060
1060
  batch?: {
@@ -1077,19 +1077,19 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1077
1077
  backgroundWorkerTaskId: string;
1078
1078
  };
1079
1079
  run: {
1080
- id: string;
1081
1080
  payload: string;
1081
+ id: string;
1082
1082
  payloadType: string;
1083
1083
  tags: string[];
1084
1084
  createdAt: Date;
1085
- startedAt?: Date | undefined;
1085
+ context?: any;
1086
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1086
1087
  isTest?: boolean | undefined;
1088
+ startedAt?: Date | undefined;
1087
1089
  idempotencyKey?: string | undefined;
1088
1090
  maxAttempts?: number | undefined;
1089
1091
  version?: string | undefined;
1090
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1091
1092
  maxDuration?: number | undefined;
1092
- context?: any;
1093
1093
  durationMs?: number | undefined;
1094
1094
  costInCents?: number | undefined;
1095
1095
  baseCostInCents?: number | undefined;
@@ -1118,9 +1118,9 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1118
1118
  ref: string;
1119
1119
  };
1120
1120
  machine: {
1121
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1122
1121
  cpu: number;
1123
1122
  memory: number;
1123
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1124
1124
  centsPerMs: number;
1125
1125
  };
1126
1126
  batch?: {
@@ -1496,9 +1496,9 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
1496
1496
  })[] | undefined;
1497
1497
  }>>;
1498
1498
  }, "strip", z.ZodTypeAny, {
1499
+ ok: true;
1499
1500
  id: string;
1500
1501
  outputType: string;
1501
- ok: true;
1502
1502
  metadata?: {
1503
1503
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1504
1504
  operations?: ({
@@ -1571,15 +1571,15 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
1571
1571
  key: string;
1572
1572
  })[] | undefined;
1573
1573
  } | undefined;
1574
- output?: string | undefined;
1575
1574
  usage?: {
1576
1575
  durationMs: number;
1577
1576
  } | undefined;
1578
1577
  taskIdentifier?: string | undefined;
1578
+ output?: string | undefined;
1579
1579
  }, {
1580
+ ok: true;
1580
1581
  id: string;
1581
1582
  outputType: string;
1582
- ok: true;
1583
1583
  metadata?: {
1584
1584
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1585
1585
  operations?: ({
@@ -1652,11 +1652,11 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
1652
1652
  key: string;
1653
1653
  })[] | undefined;
1654
1654
  } | undefined;
1655
- output?: string | undefined;
1656
1655
  usage?: {
1657
1656
  durationMs: number;
1658
1657
  } | undefined;
1659
1658
  taskIdentifier?: string | undefined;
1659
+ output?: string | undefined;
1660
1660
  }>, z.ZodObject<{
1661
1661
  ok: z.ZodLiteral<false>;
1662
1662
  id: z.ZodString;
@@ -1666,14 +1666,14 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
1666
1666
  message: z.ZodString;
1667
1667
  stackTrace: z.ZodString;
1668
1668
  }, "strip", z.ZodTypeAny, {
1669
- name: string;
1670
1669
  message: string;
1671
1670
  type: "BUILT_IN_ERROR";
1671
+ name: string;
1672
1672
  stackTrace: string;
1673
1673
  }, {
1674
- name: string;
1675
1674
  message: string;
1676
1675
  type: "BUILT_IN_ERROR";
1676
+ name: string;
1677
1677
  stackTrace: string;
1678
1678
  }>, z.ZodObject<{
1679
1679
  type: z.ZodLiteral<"CUSTOM_ERROR">;
@@ -2078,16 +2078,10 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2078
2078
  })[] | undefined;
2079
2079
  }>>;
2080
2080
  }, "strip", z.ZodTypeAny, {
2081
- id: string;
2082
2081
  error: {
2083
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2084
- type: "INTERNAL_ERROR";
2085
- message?: string | undefined;
2086
- stackTrace?: string | undefined;
2087
- } | {
2088
- name: string;
2089
2082
  message: string;
2090
2083
  type: "BUILT_IN_ERROR";
2084
+ name: string;
2091
2085
  stackTrace: string;
2092
2086
  } | {
2093
2087
  type: "CUSTOM_ERROR";
@@ -2095,8 +2089,14 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2095
2089
  } | {
2096
2090
  type: "STRING_ERROR";
2097
2091
  raw: string;
2092
+ } | {
2093
+ code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2094
+ type: "INTERNAL_ERROR";
2095
+ message?: string | undefined;
2096
+ stackTrace?: string | undefined;
2098
2097
  };
2099
2098
  ok: false;
2099
+ id: string;
2100
2100
  metadata?: {
2101
2101
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2102
2102
  operations?: ({
@@ -2174,22 +2174,16 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2174
2174
  delay: number;
2175
2175
  error?: unknown;
2176
2176
  } | undefined;
2177
+ skippedRetrying?: boolean | undefined;
2177
2178
  usage?: {
2178
2179
  durationMs: number;
2179
2180
  } | undefined;
2180
2181
  taskIdentifier?: string | undefined;
2181
- skippedRetrying?: boolean | undefined;
2182
2182
  }, {
2183
- id: string;
2184
2183
  error: {
2185
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2186
- type: "INTERNAL_ERROR";
2187
- message?: string | undefined;
2188
- stackTrace?: string | undefined;
2189
- } | {
2190
- name: string;
2191
2184
  message: string;
2192
2185
  type: "BUILT_IN_ERROR";
2186
+ name: string;
2193
2187
  stackTrace: string;
2194
2188
  } | {
2195
2189
  type: "CUSTOM_ERROR";
@@ -2197,8 +2191,14 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2197
2191
  } | {
2198
2192
  type: "STRING_ERROR";
2199
2193
  raw: string;
2194
+ } | {
2195
+ code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2196
+ type: "INTERNAL_ERROR";
2197
+ message?: string | undefined;
2198
+ stackTrace?: string | undefined;
2200
2199
  };
2201
2200
  ok: false;
2201
+ id: string;
2202
2202
  metadata?: {
2203
2203
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2204
2204
  operations?: ({
@@ -2276,17 +2276,33 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2276
2276
  delay: number;
2277
2277
  error?: unknown;
2278
2278
  } | undefined;
2279
+ skippedRetrying?: boolean | undefined;
2279
2280
  usage?: {
2280
2281
  durationMs: number;
2281
2282
  } | undefined;
2282
2283
  taskIdentifier?: string | undefined;
2283
- skippedRetrying?: boolean | undefined;
2284
2284
  }>]>;
2285
2285
  }, "strip", z.ZodTypeAny, {
2286
2286
  completion: {
2287
+ error: {
2288
+ message: string;
2289
+ type: "BUILT_IN_ERROR";
2290
+ name: string;
2291
+ stackTrace: string;
2292
+ } | {
2293
+ type: "CUSTOM_ERROR";
2294
+ raw: string;
2295
+ } | {
2296
+ type: "STRING_ERROR";
2297
+ raw: string;
2298
+ } | {
2299
+ code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2300
+ type: "INTERNAL_ERROR";
2301
+ message?: string | undefined;
2302
+ stackTrace?: string | undefined;
2303
+ };
2304
+ ok: false;
2287
2305
  id: string;
2288
- outputType: string;
2289
- ok: true;
2290
2306
  metadata?: {
2291
2307
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2292
2308
  operations?: ({
@@ -2359,31 +2375,20 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2359
2375
  key: string;
2360
2376
  })[] | undefined;
2361
2377
  } | undefined;
2362
- output?: string | undefined;
2378
+ retry?: {
2379
+ timestamp: number;
2380
+ delay: number;
2381
+ error?: unknown;
2382
+ } | undefined;
2383
+ skippedRetrying?: boolean | undefined;
2363
2384
  usage?: {
2364
2385
  durationMs: number;
2365
2386
  } | undefined;
2366
2387
  taskIdentifier?: string | undefined;
2367
2388
  } | {
2389
+ ok: true;
2368
2390
  id: string;
2369
- error: {
2370
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2371
- type: "INTERNAL_ERROR";
2372
- message?: string | undefined;
2373
- stackTrace?: string | undefined;
2374
- } | {
2375
- name: string;
2376
- message: string;
2377
- type: "BUILT_IN_ERROR";
2378
- stackTrace: string;
2379
- } | {
2380
- type: "CUSTOM_ERROR";
2381
- raw: string;
2382
- } | {
2383
- type: "STRING_ERROR";
2384
- raw: string;
2385
- };
2386
- ok: false;
2391
+ outputType: string;
2387
2392
  metadata?: {
2388
2393
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2389
2394
  operations?: ({
@@ -2456,22 +2461,33 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2456
2461
  key: string;
2457
2462
  })[] | undefined;
2458
2463
  } | undefined;
2459
- retry?: {
2460
- timestamp: number;
2461
- delay: number;
2462
- error?: unknown;
2463
- } | undefined;
2464
2464
  usage?: {
2465
2465
  durationMs: number;
2466
2466
  } | undefined;
2467
2467
  taskIdentifier?: string | undefined;
2468
- skippedRetrying?: boolean | undefined;
2468
+ output?: string | undefined;
2469
2469
  };
2470
2470
  }, {
2471
2471
  completion: {
2472
+ error: {
2473
+ message: string;
2474
+ type: "BUILT_IN_ERROR";
2475
+ name: string;
2476
+ stackTrace: string;
2477
+ } | {
2478
+ type: "CUSTOM_ERROR";
2479
+ raw: string;
2480
+ } | {
2481
+ type: "STRING_ERROR";
2482
+ raw: string;
2483
+ } | {
2484
+ code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2485
+ type: "INTERNAL_ERROR";
2486
+ message?: string | undefined;
2487
+ stackTrace?: string | undefined;
2488
+ };
2489
+ ok: false;
2472
2490
  id: string;
2473
- outputType: string;
2474
- ok: true;
2475
2491
  metadata?: {
2476
2492
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2477
2493
  operations?: ({
@@ -2544,31 +2560,20 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2544
2560
  key: string;
2545
2561
  })[] | undefined;
2546
2562
  } | undefined;
2547
- output?: string | undefined;
2563
+ retry?: {
2564
+ timestamp: number;
2565
+ delay: number;
2566
+ error?: unknown;
2567
+ } | undefined;
2568
+ skippedRetrying?: boolean | undefined;
2548
2569
  usage?: {
2549
2570
  durationMs: number;
2550
2571
  } | undefined;
2551
2572
  taskIdentifier?: string | undefined;
2552
2573
  } | {
2574
+ ok: true;
2553
2575
  id: string;
2554
- error: {
2555
- code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "COULD_NOT_IMPORT_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_PROCESS_SIGSEGV" | "TASK_PROCESS_SIGTERM" | "TASK_PROCESS_OOM_KILLED" | "TASK_PROCESS_MAYBE_OOM_KILLED" | "TASK_RUN_CANCELLED" | "TASK_INPUT_ERROR" | "TASK_OUTPUT_ERROR" | "TASK_MIDDLEWARE_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT" | "TASK_RUN_CRASHED" | "MAX_DURATION_EXCEEDED" | "DISK_SPACE_EXCEEDED" | "POD_EVICTED" | "POD_UNKNOWN_ERROR" | "TASK_HAS_N0_EXECUTION_SNAPSHOT" | "TASK_DEQUEUED_INVALID_STATE" | "TASK_DEQUEUED_QUEUE_NOT_FOUND" | "TASK_RUN_DEQUEUED_MAX_RETRIES" | "TASK_RUN_STALLED_EXECUTING" | "TASK_RUN_STALLED_EXECUTING_WITH_WAITPOINTS" | "OUTDATED_SDK_VERSION" | "TASK_DID_CONCURRENT_WAIT" | "RECURSIVE_WAIT_DEADLOCK";
2556
- type: "INTERNAL_ERROR";
2557
- message?: string | undefined;
2558
- stackTrace?: string | undefined;
2559
- } | {
2560
- name: string;
2561
- message: string;
2562
- type: "BUILT_IN_ERROR";
2563
- stackTrace: string;
2564
- } | {
2565
- type: "CUSTOM_ERROR";
2566
- raw: string;
2567
- } | {
2568
- type: "STRING_ERROR";
2569
- raw: string;
2570
- };
2571
- ok: false;
2576
+ outputType: string;
2572
2577
  metadata?: {
2573
2578
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2574
2579
  operations?: ({
@@ -2641,16 +2646,11 @@ export declare const WorkerApiRunAttemptCompleteRequestBody: z.ZodObject<{
2641
2646
  key: string;
2642
2647
  })[] | undefined;
2643
2648
  } | undefined;
2644
- retry?: {
2645
- timestamp: number;
2646
- delay: number;
2647
- error?: unknown;
2648
- } | undefined;
2649
2649
  usage?: {
2650
2650
  durationMs: number;
2651
2651
  } | undefined;
2652
2652
  taskIdentifier?: string | undefined;
2653
- skippedRetrying?: boolean | undefined;
2653
+ output?: string | undefined;
2654
2654
  };
2655
2655
  }>;
2656
2656
  export type WorkerApiRunAttemptCompleteRequestBody = z.infer<typeof WorkerApiRunAttemptCompleteRequestBody>;
@@ -2877,10 +2877,12 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2877
2877
  }, "strip", z.ZodTypeAny, {
2878
2878
  type: import("../../schemas/runEngine.js").WaitpointType;
2879
2879
  id: string;
2880
- friendlyId: string;
2881
2880
  completedAt: Date;
2881
+ friendlyId: string;
2882
2882
  outputIsError: boolean;
2883
2883
  idempotencyKey?: string | undefined;
2884
+ output?: string | undefined;
2885
+ outputType?: string | undefined;
2884
2886
  index?: number | undefined;
2885
2887
  completedByTaskRun?: {
2886
2888
  id: string;
@@ -2895,15 +2897,15 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2895
2897
  id: string;
2896
2898
  friendlyId: string;
2897
2899
  } | undefined;
2898
- output?: string | undefined;
2899
- outputType?: string | undefined;
2900
2900
  }, {
2901
2901
  type: import("../../schemas/runEngine.js").WaitpointType;
2902
2902
  id: string;
2903
- friendlyId: string;
2904
2903
  completedAt: Date;
2904
+ friendlyId: string;
2905
2905
  outputIsError: boolean;
2906
2906
  idempotencyKey?: string | undefined;
2907
+ output?: string | undefined;
2908
+ outputType?: string | undefined;
2907
2909
  index?: number | undefined;
2908
2910
  completedByTaskRun?: {
2909
2911
  id: string;
@@ -2918,8 +2920,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2918
2920
  id: string;
2919
2921
  friendlyId: string;
2920
2922
  } | undefined;
2921
- output?: string | undefined;
2922
- outputType?: string | undefined;
2923
2923
  }>, "many">;
2924
2924
  }, "strip", z.ZodTypeAny, {
2925
2925
  version: "1";
@@ -2938,10 +2938,12 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2938
2938
  completedWaitpoints: {
2939
2939
  type: import("../../schemas/runEngine.js").WaitpointType;
2940
2940
  id: string;
2941
- friendlyId: string;
2942
2941
  completedAt: Date;
2942
+ friendlyId: string;
2943
2943
  outputIsError: boolean;
2944
2944
  idempotencyKey?: string | undefined;
2945
+ output?: string | undefined;
2946
+ outputType?: string | undefined;
2945
2947
  index?: number | undefined;
2946
2948
  completedByTaskRun?: {
2947
2949
  id: string;
@@ -2956,8 +2958,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2956
2958
  id: string;
2957
2959
  friendlyId: string;
2958
2960
  } | undefined;
2959
- output?: string | undefined;
2960
- outputType?: string | undefined;
2961
2961
  }[];
2962
2962
  batch?: {
2963
2963
  id: string;
@@ -2988,10 +2988,12 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
2988
2988
  completedWaitpoints: {
2989
2989
  type: import("../../schemas/runEngine.js").WaitpointType;
2990
2990
  id: string;
2991
- friendlyId: string;
2992
2991
  completedAt: Date;
2992
+ friendlyId: string;
2993
2993
  outputIsError: boolean;
2994
2994
  idempotencyKey?: string | undefined;
2995
+ output?: string | undefined;
2996
+ outputType?: string | undefined;
2995
2997
  index?: number | undefined;
2996
2998
  completedByTaskRun?: {
2997
2999
  id: string;
@@ -3006,8 +3008,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3006
3008
  id: string;
3007
3009
  friendlyId: string;
3008
3010
  } | undefined;
3009
- output?: string | undefined;
3010
- outputType?: string | undefined;
3011
3011
  }[];
3012
3012
  batch?: {
3013
3013
  id: string;
@@ -3040,10 +3040,12 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3040
3040
  completedWaitpoints: {
3041
3041
  type: import("../../schemas/runEngine.js").WaitpointType;
3042
3042
  id: string;
3043
- friendlyId: string;
3044
3043
  completedAt: Date;
3044
+ friendlyId: string;
3045
3045
  outputIsError: boolean;
3046
3046
  idempotencyKey?: string | undefined;
3047
+ output?: string | undefined;
3048
+ outputType?: string | undefined;
3047
3049
  index?: number | undefined;
3048
3050
  completedByTaskRun?: {
3049
3051
  id: string;
@@ -3058,8 +3060,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3058
3060
  id: string;
3059
3061
  friendlyId: string;
3060
3062
  } | undefined;
3061
- output?: string | undefined;
3062
- outputType?: string | undefined;
3063
3063
  }[];
3064
3064
  batch?: {
3065
3065
  id: string;
@@ -3092,10 +3092,12 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3092
3092
  completedWaitpoints: {
3093
3093
  type: import("../../schemas/runEngine.js").WaitpointType;
3094
3094
  id: string;
3095
- friendlyId: string;
3096
3095
  completedAt: Date;
3096
+ friendlyId: string;
3097
3097
  outputIsError: boolean;
3098
3098
  idempotencyKey?: string | undefined;
3099
+ output?: string | undefined;
3100
+ outputType?: string | undefined;
3099
3101
  index?: number | undefined;
3100
3102
  completedByTaskRun?: {
3101
3103
  id: string;
@@ -3110,8 +3112,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3110
3112
  id: string;
3111
3113
  friendlyId: string;
3112
3114
  } | undefined;
3113
- output?: string | undefined;
3114
- outputType?: string | undefined;
3115
3115
  }[];
3116
3116
  batch?: {
3117
3117
  id: string;
@@ -3219,10 +3219,12 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3219
3219
  }, "strip", z.ZodTypeAny, {
3220
3220
  type: import("../../schemas/runEngine.js").WaitpointType;
3221
3221
  id: string;
3222
- friendlyId: string;
3223
3222
  completedAt: Date;
3223
+ friendlyId: string;
3224
3224
  outputIsError: boolean;
3225
3225
  idempotencyKey?: string | undefined;
3226
+ output?: string | undefined;
3227
+ outputType?: string | undefined;
3226
3228
  index?: number | undefined;
3227
3229
  completedByTaskRun?: {
3228
3230
  id: string;
@@ -3237,15 +3239,15 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3237
3239
  id: string;
3238
3240
  friendlyId: string;
3239
3241
  } | undefined;
3240
- output?: string | undefined;
3241
- outputType?: string | undefined;
3242
3242
  }, {
3243
3243
  type: import("../../schemas/runEngine.js").WaitpointType;
3244
3244
  id: string;
3245
- friendlyId: string;
3246
3245
  completedAt: Date;
3246
+ friendlyId: string;
3247
3247
  outputIsError: boolean;
3248
3248
  idempotencyKey?: string | undefined;
3249
+ output?: string | undefined;
3250
+ outputType?: string | undefined;
3249
3251
  index?: number | undefined;
3250
3252
  completedByTaskRun?: {
3251
3253
  id: string;
@@ -3260,8 +3262,6 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3260
3262
  id: string;
3261
3263
  friendlyId: string;
3262
3264
  } | undefined;
3263
- output?: string | undefined;
3264
- outputType?: string | undefined;
3265
3265
  }>, "many">;
3266
3266
  backgroundWorker: z.ZodObject<{
3267
3267
  id: z.ZodString;
@@ -3296,14 +3296,14 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3296
3296
  memory: z.ZodNumber;
3297
3297
  centsPerMs: z.ZodNumber;
3298
3298
  }, "strip", z.ZodTypeAny, {
3299
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3300
3299
  cpu: number;
3301
3300
  memory: number;
3301
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3302
3302
  centsPerMs: number;
3303
3303
  }, {
3304
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3305
3304
  cpu: number;
3306
3305
  memory: number;
3306
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3307
3307
  centsPerMs: number;
3308
3308
  }>;
3309
3309
  attemptNumber: z.ZodNumber;
@@ -3314,9 +3314,9 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3314
3314
  isTest: boolean;
3315
3315
  traceContext: Record<string, unknown>;
3316
3316
  machine: {
3317
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3318
3317
  cpu: number;
3319
3318
  memory: number;
3319
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3320
3320
  centsPerMs: number;
3321
3321
  };
3322
3322
  friendlyId: string;
@@ -3327,9 +3327,9 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3327
3327
  isTest: boolean;
3328
3328
  traceContext: Record<string, unknown>;
3329
3329
  machine: {
3330
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3331
3330
  cpu: number;
3332
3331
  memory: number;
3332
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3333
3333
  centsPerMs: number;
3334
3334
  };
3335
3335
  friendlyId: string;
@@ -3367,9 +3367,9 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3367
3367
  isTest: boolean;
3368
3368
  traceContext: Record<string, unknown>;
3369
3369
  machine: {
3370
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3371
3370
  cpu: number;
3372
3371
  memory: number;
3372
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3373
3373
  centsPerMs: number;
3374
3374
  };
3375
3375
  friendlyId: string;
@@ -3395,10 +3395,12 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3395
3395
  completedWaitpoints: {
3396
3396
  type: import("../../schemas/runEngine.js").WaitpointType;
3397
3397
  id: string;
3398
- friendlyId: string;
3399
3398
  completedAt: Date;
3399
+ friendlyId: string;
3400
3400
  outputIsError: boolean;
3401
3401
  idempotencyKey?: string | undefined;
3402
+ output?: string | undefined;
3403
+ outputType?: string | undefined;
3402
3404
  index?: number | undefined;
3403
3405
  completedByTaskRun?: {
3404
3406
  id: string;
@@ -3413,8 +3415,6 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3413
3415
  id: string;
3414
3416
  friendlyId: string;
3415
3417
  } | undefined;
3416
- output?: string | undefined;
3417
- outputType?: string | undefined;
3418
3418
  }[];
3419
3419
  dequeuedAt: Date;
3420
3420
  backgroundWorker: {
@@ -3441,9 +3441,9 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3441
3441
  isTest: boolean;
3442
3442
  traceContext: Record<string, unknown>;
3443
3443
  machine: {
3444
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3445
3444
  cpu: number;
3446
3445
  memory: number;
3446
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3447
3447
  centsPerMs: number;
3448
3448
  };
3449
3449
  friendlyId: string;
@@ -3469,10 +3469,12 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3469
3469
  completedWaitpoints: {
3470
3470
  type: import("../../schemas/runEngine.js").WaitpointType;
3471
3471
  id: string;
3472
- friendlyId: string;
3473
3472
  completedAt: Date;
3473
+ friendlyId: string;
3474
3474
  outputIsError: boolean;
3475
3475
  idempotencyKey?: string | undefined;
3476
+ output?: string | undefined;
3477
+ outputType?: string | undefined;
3476
3478
  index?: number | undefined;
3477
3479
  completedByTaskRun?: {
3478
3480
  id: string;
@@ -3487,8 +3489,6 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3487
3489
  id: string;
3488
3490
  friendlyId: string;
3489
3491
  } | undefined;
3490
- output?: string | undefined;
3491
- outputType?: string | undefined;
3492
3492
  }[];
3493
3493
  dequeuedAt: Date;
3494
3494
  backgroundWorker: {