@trigger.dev/core 4.3.1 → 4.3.3

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 (113) hide show
  1. package/dist/commonjs/v3/apiClient/index.js +32 -8
  2. package/dist/commonjs/v3/apiClient/index.js.map +1 -1
  3. package/dist/commonjs/v3/apiClient/streamBatchItems.test.js +39 -0
  4. package/dist/commonjs/v3/apiClient/streamBatchItems.test.js.map +1 -1
  5. package/dist/commonjs/v3/idempotency-key-catalog/catalog.d.ts +9 -0
  6. package/dist/commonjs/v3/idempotency-key-catalog/catalog.js +3 -0
  7. package/dist/commonjs/v3/idempotency-key-catalog/catalog.js.map +1 -0
  8. package/dist/commonjs/v3/idempotency-key-catalog/index.d.ts +9 -0
  9. package/dist/commonjs/v3/idempotency-key-catalog/index.js +33 -0
  10. package/dist/commonjs/v3/idempotency-key-catalog/index.js.map +1 -0
  11. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.d.ts +8 -0
  12. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js +35 -0
  13. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js.map +1 -0
  14. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.d.ts +1 -0
  15. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js +161 -0
  16. package/dist/commonjs/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js.map +1 -0
  17. package/dist/commonjs/v3/idempotency-key-catalog-api.d.ts +3 -0
  18. package/dist/commonjs/v3/idempotency-key-catalog-api.js +9 -0
  19. package/dist/commonjs/v3/idempotency-key-catalog-api.js.map +1 -0
  20. package/dist/commonjs/v3/idempotencyKeys.d.ts +51 -4
  21. package/dist/commonjs/v3/idempotencyKeys.js +97 -5
  22. package/dist/commonjs/v3/idempotencyKeys.js.map +1 -1
  23. package/dist/commonjs/v3/imports/superjson-cjs.cjs.map +1 -0
  24. package/dist/commonjs/v3/imports/superjson.d.ts +1 -0
  25. package/dist/commonjs/v3/imports/superjson.js +13 -0
  26. package/dist/commonjs/v3/runEngineWorker/supervisor/http.d.ts +61 -60
  27. package/dist/commonjs/v3/runEngineWorker/supervisor/schemas.d.ts +191 -184
  28. package/dist/commonjs/v3/runEngineWorker/workload/http.d.ts +46 -45
  29. package/dist/commonjs/v3/runEngineWorker/workload/schemas.d.ts +163 -156
  30. package/dist/commonjs/v3/schemas/api.d.ts +246 -56
  31. package/dist/commonjs/v3/schemas/api.js +14 -3
  32. package/dist/commonjs/v3/schemas/api.js.map +1 -1
  33. package/dist/commonjs/v3/schemas/checkpoints.d.ts +66 -66
  34. package/dist/commonjs/v3/schemas/common.d.ts +215 -177
  35. package/dist/commonjs/v3/schemas/common.js +6 -0
  36. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  37. package/dist/commonjs/v3/schemas/messages.d.ts +2149 -2032
  38. package/dist/commonjs/v3/schemas/runEngine.d.ts +157 -150
  39. package/dist/commonjs/v3/schemas/schemas.d.ts +281 -262
  40. package/dist/commonjs/v3/schemas/webhooks.d.ts +68 -68
  41. package/dist/commonjs/v3/serverOnly/idempotencyKeys.d.ts +36 -0
  42. package/dist/commonjs/v3/serverOnly/idempotencyKeys.js +58 -0
  43. package/dist/commonjs/v3/serverOnly/idempotencyKeys.js.map +1 -0
  44. package/dist/commonjs/v3/serverOnly/index.d.ts +1 -0
  45. package/dist/commonjs/v3/serverOnly/index.js +1 -0
  46. package/dist/commonjs/v3/serverOnly/index.js.map +1 -1
  47. package/dist/commonjs/v3/types/tools.js +2 -2
  48. package/dist/commonjs/v3/types/tools.js.map +1 -1
  49. package/dist/commonjs/v3/utils/flattenAttributes.d.ts +2 -2
  50. package/dist/commonjs/v3/utils/flattenAttributes.js +24 -13
  51. package/dist/commonjs/v3/utils/flattenAttributes.js.map +1 -1
  52. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  53. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  54. package/dist/commonjs/v3/utils/ioSerialization.js +15 -27
  55. package/dist/commonjs/v3/utils/ioSerialization.js.map +1 -1
  56. package/dist/commonjs/version.js +1 -1
  57. package/dist/esm/v3/apiClient/index.js +32 -8
  58. package/dist/esm/v3/apiClient/index.js.map +1 -1
  59. package/dist/esm/v3/apiClient/streamBatchItems.test.js +39 -0
  60. package/dist/esm/v3/apiClient/streamBatchItems.test.js.map +1 -1
  61. package/dist/esm/v3/idempotency-key-catalog/catalog.d.ts +9 -0
  62. package/dist/esm/v3/idempotency-key-catalog/catalog.js +2 -0
  63. package/dist/esm/v3/idempotency-key-catalog/catalog.js.map +1 -0
  64. package/dist/esm/v3/idempotency-key-catalog/index.d.ts +9 -0
  65. package/dist/esm/v3/idempotency-key-catalog/index.js +29 -0
  66. package/dist/esm/v3/idempotency-key-catalog/index.js.map +1 -0
  67. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.d.ts +8 -0
  68. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js +31 -0
  69. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.js.map +1 -0
  70. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.d.ts +1 -0
  71. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js +159 -0
  72. package/dist/esm/v3/idempotency-key-catalog/lruIdempotencyKeyCatalog.test.js.map +1 -0
  73. package/dist/esm/v3/idempotency-key-catalog-api.d.ts +3 -0
  74. package/dist/esm/v3/idempotency-key-catalog-api.js +6 -0
  75. package/dist/esm/v3/idempotency-key-catalog-api.js.map +1 -0
  76. package/dist/esm/v3/idempotencyKeys.d.ts +51 -4
  77. package/dist/esm/v3/idempotencyKeys.js +96 -5
  78. package/dist/esm/v3/idempotencyKeys.js.map +1 -1
  79. package/dist/esm/v3/imports/superjson.d.ts +2 -0
  80. package/dist/esm/v3/imports/superjson.js +10 -0
  81. package/dist/esm/v3/imports/superjson.js.map +1 -0
  82. package/dist/esm/v3/runEngineWorker/supervisor/http.d.ts +61 -60
  83. package/dist/esm/v3/runEngineWorker/supervisor/schemas.d.ts +191 -184
  84. package/dist/esm/v3/runEngineWorker/workload/http.d.ts +46 -45
  85. package/dist/esm/v3/runEngineWorker/workload/schemas.d.ts +163 -156
  86. package/dist/esm/v3/schemas/api.d.ts +246 -56
  87. package/dist/esm/v3/schemas/api.js +11 -0
  88. package/dist/esm/v3/schemas/api.js.map +1 -1
  89. package/dist/esm/v3/schemas/checkpoints.d.ts +66 -66
  90. package/dist/esm/v3/schemas/common.d.ts +215 -177
  91. package/dist/esm/v3/schemas/common.js +6 -0
  92. package/dist/esm/v3/schemas/common.js.map +1 -1
  93. package/dist/esm/v3/schemas/messages.d.ts +2149 -2032
  94. package/dist/esm/v3/schemas/runEngine.d.ts +157 -150
  95. package/dist/esm/v3/schemas/schemas.d.ts +281 -262
  96. package/dist/esm/v3/schemas/webhooks.d.ts +68 -68
  97. package/dist/esm/v3/serverOnly/idempotencyKeys.d.ts +36 -0
  98. package/dist/esm/v3/serverOnly/idempotencyKeys.js +51 -0
  99. package/dist/esm/v3/serverOnly/idempotencyKeys.js.map +1 -0
  100. package/dist/esm/v3/serverOnly/index.d.ts +1 -0
  101. package/dist/esm/v3/serverOnly/index.js +1 -0
  102. package/dist/esm/v3/serverOnly/index.js.map +1 -1
  103. package/dist/esm/v3/types/tools.js +2 -2
  104. package/dist/esm/v3/types/tools.js.map +1 -1
  105. package/dist/esm/v3/utils/flattenAttributes.d.ts +2 -2
  106. package/dist/esm/v3/utils/flattenAttributes.js +24 -13
  107. package/dist/esm/v3/utils/flattenAttributes.js.map +1 -1
  108. package/dist/esm/v3/utils/globals.d.ts +2 -0
  109. package/dist/esm/v3/utils/globals.js.map +1 -1
  110. package/dist/esm/v3/utils/ioSerialization.js +9 -24
  111. package/dist/esm/v3/utils/ioSerialization.js.map +1 -1
  112. package/dist/esm/version.js +1 -1
  113. package/package.json +2 -2
@@ -485,6 +485,20 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
485
485
  values?: string[] | undefined;
486
486
  }>, "many">>;
487
487
  }, "strip", z.ZodTypeAny, {
488
+ run: {
489
+ id: string;
490
+ isTest: boolean;
491
+ machine: {
492
+ cpu: number;
493
+ memory: number;
494
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
495
+ centsPerMs: number;
496
+ };
497
+ traceContext: Record<string, unknown>;
498
+ friendlyId: string;
499
+ attemptNumber: number;
500
+ masterQueue: string;
501
+ };
488
502
  version: "1";
489
503
  environment: {
490
504
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -501,20 +515,6 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
501
515
  friendlyId?: string | undefined;
502
516
  imagePlatform?: string | undefined;
503
517
  };
504
- run: {
505
- id: string;
506
- isTest: boolean;
507
- machine: {
508
- cpu: number;
509
- memory: number;
510
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
511
- centsPerMs: number;
512
- };
513
- traceContext: Record<string, unknown>;
514
- friendlyId: string;
515
- attemptNumber: number;
516
- masterQueue: string;
517
- };
518
518
  snapshot: {
519
519
  id: string;
520
520
  createdAt: Date;
@@ -566,6 +566,20 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
566
566
  values?: string[] | undefined;
567
567
  }[] | undefined;
568
568
  }, {
569
+ run: {
570
+ id: string;
571
+ isTest: boolean;
572
+ machine: {
573
+ cpu: number;
574
+ memory: number;
575
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
576
+ centsPerMs: number;
577
+ };
578
+ traceContext: Record<string, unknown>;
579
+ friendlyId: string;
580
+ attemptNumber: number;
581
+ masterQueue: string;
582
+ };
569
583
  version: "1";
570
584
  environment: {
571
585
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -582,20 +596,6 @@ export declare const WorkerApiDequeueResponseBody: z.ZodArray<z.ZodObject<{
582
596
  friendlyId?: string | undefined;
583
597
  imagePlatform?: string | undefined;
584
598
  };
585
- run: {
586
- id: string;
587
- isTest: boolean;
588
- machine: {
589
- cpu: number;
590
- memory: number;
591
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
592
- centsPerMs: number;
593
- };
594
- traceContext: Record<string, unknown>;
595
- friendlyId: string;
596
- attemptNumber: number;
597
- masterQueue: string;
598
- };
599
599
  snapshot: {
600
600
  id: string;
601
601
  createdAt: Date;
@@ -1018,6 +1018,7 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1018
1018
  createdAt: z.ZodDate;
1019
1019
  startedAt: z.ZodDefault<z.ZodDate>;
1020
1020
  idempotencyKey: z.ZodOptional<z.ZodString>;
1021
+ idempotencyKeyScope: z.ZodOptional<z.ZodEnum<["run", "attempt", "global"]>>;
1021
1022
  maxAttempts: z.ZodOptional<z.ZodNumber>;
1022
1023
  version: z.ZodOptional<z.ZodString>;
1023
1024
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../../index.js").DeserializedJson, z.ZodTypeDef, import("../../../index.js").DeserializedJson>>>;
@@ -1039,6 +1040,7 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1039
1040
  startedAt: Date;
1040
1041
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1041
1042
  idempotencyKey?: string | undefined;
1043
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1042
1044
  maxAttempts?: number | undefined;
1043
1045
  version?: string | undefined;
1044
1046
  maxDuration?: number | undefined;
@@ -1059,6 +1061,7 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1059
1061
  isTest?: boolean | undefined;
1060
1062
  startedAt?: Date | undefined;
1061
1063
  idempotencyKey?: string | undefined;
1064
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1062
1065
  maxAttempts?: number | undefined;
1063
1066
  version?: string | undefined;
1064
1067
  maxDuration?: number | undefined;
@@ -1080,6 +1083,37 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1080
1083
  realtimeStreamsVersion?: string | undefined;
1081
1084
  }>>;
1082
1085
  }, "strip", z.ZodTypeAny, {
1086
+ run: {
1087
+ payload: string;
1088
+ id: string;
1089
+ payloadType: string;
1090
+ tags: string[];
1091
+ isTest: boolean;
1092
+ createdAt: Date;
1093
+ startedAt: Date;
1094
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1095
+ idempotencyKey?: string | undefined;
1096
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1097
+ maxAttempts?: number | undefined;
1098
+ version?: string | undefined;
1099
+ maxDuration?: number | undefined;
1100
+ priority?: number | undefined;
1101
+ baseCostInCents?: number | undefined;
1102
+ parentTaskRunId?: string | undefined;
1103
+ rootTaskRunId?: string | undefined;
1104
+ durationMs?: number | undefined;
1105
+ costInCents?: number | undefined;
1106
+ region?: string | undefined;
1107
+ } & {
1108
+ traceContext?: Record<string, unknown> | undefined;
1109
+ realtimeStreamsVersion?: string | undefined;
1110
+ };
1111
+ attempt: {
1112
+ number: number;
1113
+ startedAt: Date;
1114
+ } & {
1115
+ [k: string]: unknown;
1116
+ };
1083
1117
  task: {
1084
1118
  id: string;
1085
1119
  filePath: string;
@@ -1128,36 +1162,6 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1128
1162
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1129
1163
  centsPerMs: number;
1130
1164
  };
1131
- attempt: {
1132
- number: number;
1133
- startedAt: Date;
1134
- } & {
1135
- [k: string]: unknown;
1136
- };
1137
- run: {
1138
- payload: string;
1139
- id: string;
1140
- payloadType: string;
1141
- tags: string[];
1142
- isTest: boolean;
1143
- createdAt: Date;
1144
- startedAt: Date;
1145
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1146
- idempotencyKey?: string | undefined;
1147
- maxAttempts?: number | undefined;
1148
- version?: string | undefined;
1149
- maxDuration?: number | undefined;
1150
- priority?: number | undefined;
1151
- baseCostInCents?: number | undefined;
1152
- parentTaskRunId?: string | undefined;
1153
- rootTaskRunId?: string | undefined;
1154
- durationMs?: number | undefined;
1155
- costInCents?: number | undefined;
1156
- region?: string | undefined;
1157
- } & {
1158
- traceContext?: Record<string, unknown> | undefined;
1159
- realtimeStreamsVersion?: string | undefined;
1160
- };
1161
1165
  batch?: {
1162
1166
  id: string;
1163
1167
  } | undefined;
@@ -1184,6 +1188,37 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1184
1188
  } | undefined;
1185
1189
  } | undefined;
1186
1190
  }, {
1191
+ run: {
1192
+ payload: string;
1193
+ id: string;
1194
+ payloadType: string;
1195
+ tags: string[];
1196
+ createdAt: Date;
1197
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1198
+ isTest?: boolean | undefined;
1199
+ startedAt?: Date | undefined;
1200
+ idempotencyKey?: string | undefined;
1201
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1202
+ maxAttempts?: number | undefined;
1203
+ version?: string | undefined;
1204
+ maxDuration?: number | undefined;
1205
+ priority?: number | undefined;
1206
+ baseCostInCents?: number | undefined;
1207
+ parentTaskRunId?: string | undefined;
1208
+ rootTaskRunId?: string | undefined;
1209
+ durationMs?: number | undefined;
1210
+ costInCents?: number | undefined;
1211
+ region?: string | undefined;
1212
+ } & {
1213
+ traceContext?: Record<string, unknown> | undefined;
1214
+ realtimeStreamsVersion?: string | undefined;
1215
+ };
1216
+ attempt: {
1217
+ number: number;
1218
+ startedAt: Date;
1219
+ } & {
1220
+ [k: string]: unknown;
1221
+ };
1187
1222
  task: {
1188
1223
  id: string;
1189
1224
  filePath: string;
@@ -1232,36 +1267,6 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1232
1267
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1233
1268
  centsPerMs: number;
1234
1269
  };
1235
- attempt: {
1236
- number: number;
1237
- startedAt: Date;
1238
- } & {
1239
- [k: string]: unknown;
1240
- };
1241
- run: {
1242
- payload: string;
1243
- id: string;
1244
- payloadType: string;
1245
- tags: string[];
1246
- createdAt: Date;
1247
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1248
- isTest?: boolean | undefined;
1249
- startedAt?: Date | undefined;
1250
- idempotencyKey?: string | undefined;
1251
- maxAttempts?: number | undefined;
1252
- version?: string | undefined;
1253
- maxDuration?: number | undefined;
1254
- priority?: number | undefined;
1255
- baseCostInCents?: number | undefined;
1256
- parentTaskRunId?: string | undefined;
1257
- rootTaskRunId?: string | undefined;
1258
- durationMs?: number | undefined;
1259
- costInCents?: number | undefined;
1260
- region?: string | undefined;
1261
- } & {
1262
- traceContext?: Record<string, unknown> | undefined;
1263
- realtimeStreamsVersion?: string | undefined;
1264
- };
1265
1270
  batch?: {
1266
1271
  id: string;
1267
1272
  } | undefined;
@@ -1290,6 +1295,37 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1290
1295
  }>;
1291
1296
  }, "strip", z.ZodTypeAny, {
1292
1297
  execution: {
1298
+ run: {
1299
+ payload: string;
1300
+ id: string;
1301
+ payloadType: string;
1302
+ tags: string[];
1303
+ isTest: boolean;
1304
+ createdAt: Date;
1305
+ startedAt: Date;
1306
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1307
+ idempotencyKey?: string | undefined;
1308
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1309
+ maxAttempts?: number | undefined;
1310
+ version?: string | undefined;
1311
+ maxDuration?: number | undefined;
1312
+ priority?: number | undefined;
1313
+ baseCostInCents?: number | undefined;
1314
+ parentTaskRunId?: string | undefined;
1315
+ rootTaskRunId?: string | undefined;
1316
+ durationMs?: number | undefined;
1317
+ costInCents?: number | undefined;
1318
+ region?: string | undefined;
1319
+ } & {
1320
+ traceContext?: Record<string, unknown> | undefined;
1321
+ realtimeStreamsVersion?: string | undefined;
1322
+ };
1323
+ attempt: {
1324
+ number: number;
1325
+ startedAt: Date;
1326
+ } & {
1327
+ [k: string]: unknown;
1328
+ };
1293
1329
  task: {
1294
1330
  id: string;
1295
1331
  filePath: string;
@@ -1338,36 +1374,6 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1338
1374
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1339
1375
  centsPerMs: number;
1340
1376
  };
1341
- attempt: {
1342
- number: number;
1343
- startedAt: Date;
1344
- } & {
1345
- [k: string]: unknown;
1346
- };
1347
- run: {
1348
- payload: string;
1349
- id: string;
1350
- payloadType: string;
1351
- tags: string[];
1352
- isTest: boolean;
1353
- createdAt: Date;
1354
- startedAt: Date;
1355
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1356
- idempotencyKey?: string | undefined;
1357
- maxAttempts?: number | undefined;
1358
- version?: string | undefined;
1359
- maxDuration?: number | undefined;
1360
- priority?: number | undefined;
1361
- baseCostInCents?: number | undefined;
1362
- parentTaskRunId?: string | undefined;
1363
- rootTaskRunId?: string | undefined;
1364
- durationMs?: number | undefined;
1365
- costInCents?: number | undefined;
1366
- region?: string | undefined;
1367
- } & {
1368
- traceContext?: Record<string, unknown> | undefined;
1369
- realtimeStreamsVersion?: string | undefined;
1370
- };
1371
1377
  batch?: {
1372
1378
  id: string;
1373
1379
  } | undefined;
@@ -1396,6 +1402,37 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1396
1402
  };
1397
1403
  }, {
1398
1404
  execution: {
1405
+ run: {
1406
+ payload: string;
1407
+ id: string;
1408
+ payloadType: string;
1409
+ tags: string[];
1410
+ createdAt: Date;
1411
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1412
+ isTest?: boolean | undefined;
1413
+ startedAt?: Date | undefined;
1414
+ idempotencyKey?: string | undefined;
1415
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
1416
+ maxAttempts?: number | undefined;
1417
+ version?: string | undefined;
1418
+ maxDuration?: number | undefined;
1419
+ priority?: number | undefined;
1420
+ baseCostInCents?: number | undefined;
1421
+ parentTaskRunId?: string | undefined;
1422
+ rootTaskRunId?: string | undefined;
1423
+ durationMs?: number | undefined;
1424
+ costInCents?: number | undefined;
1425
+ region?: string | undefined;
1426
+ } & {
1427
+ traceContext?: Record<string, unknown> | undefined;
1428
+ realtimeStreamsVersion?: string | undefined;
1429
+ };
1430
+ attempt: {
1431
+ number: number;
1432
+ startedAt: Date;
1433
+ } & {
1434
+ [k: string]: unknown;
1435
+ };
1399
1436
  task: {
1400
1437
  id: string;
1401
1438
  filePath: string;
@@ -1444,36 +1481,6 @@ export declare const WorkerApiRunAttemptStartResponseBody: z.ZodIntersection<z.Z
1444
1481
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1445
1482
  centsPerMs: number;
1446
1483
  };
1447
- attempt: {
1448
- number: number;
1449
- startedAt: Date;
1450
- } & {
1451
- [k: string]: unknown;
1452
- };
1453
- run: {
1454
- payload: string;
1455
- id: string;
1456
- payloadType: string;
1457
- tags: string[];
1458
- createdAt: Date;
1459
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
1460
- isTest?: boolean | undefined;
1461
- startedAt?: Date | undefined;
1462
- idempotencyKey?: string | undefined;
1463
- maxAttempts?: number | undefined;
1464
- version?: string | undefined;
1465
- maxDuration?: number | undefined;
1466
- priority?: number | undefined;
1467
- baseCostInCents?: number | undefined;
1468
- parentTaskRunId?: string | undefined;
1469
- rootTaskRunId?: string | undefined;
1470
- durationMs?: number | undefined;
1471
- costInCents?: number | undefined;
1472
- region?: string | undefined;
1473
- } & {
1474
- traceContext?: Record<string, unknown> | undefined;
1475
- realtimeStreamsVersion?: string | undefined;
1476
- };
1477
1484
  batch?: {
1478
1485
  id: string;
1479
1486
  } | undefined;
@@ -3367,7 +3374,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3367
3374
  } | undefined;
3368
3375
  }>, "many">;
3369
3376
  }, "strip", z.ZodTypeAny, {
3370
- version: "1";
3371
3377
  run: {
3372
3378
  status: import("../../schemas/runEngine.js").TaskRunStatus;
3373
3379
  id: string;
@@ -3375,6 +3381,7 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3375
3381
  attemptNumber?: number | null | undefined;
3376
3382
  taskEventStore?: string | undefined;
3377
3383
  };
3384
+ version: "1";
3378
3385
  snapshot: {
3379
3386
  id: string;
3380
3387
  createdAt: Date;
@@ -3419,7 +3426,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3419
3426
  reason?: string | null | undefined;
3420
3427
  } | undefined;
3421
3428
  }, {
3422
- version: "1";
3423
3429
  run: {
3424
3430
  status: import("../../schemas/runEngine.js").TaskRunStatus;
3425
3431
  id: string;
@@ -3427,6 +3433,7 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3427
3433
  attemptNumber?: number | null | undefined;
3428
3434
  taskEventStore?: string | undefined;
3429
3435
  };
3436
+ version: "1";
3430
3437
  snapshot: {
3431
3438
  id: string;
3432
3439
  createdAt: Date;
@@ -3473,7 +3480,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3473
3480
  }>;
3474
3481
  }, "strip", z.ZodTypeAny, {
3475
3482
  execution: {
3476
- version: "1";
3477
3483
  run: {
3478
3484
  status: import("../../schemas/runEngine.js").TaskRunStatus;
3479
3485
  id: string;
@@ -3481,6 +3487,7 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3481
3487
  attemptNumber?: number | null | undefined;
3482
3488
  taskEventStore?: string | undefined;
3483
3489
  };
3490
+ version: "1";
3484
3491
  snapshot: {
3485
3492
  id: string;
3486
3493
  createdAt: Date;
@@ -3527,7 +3534,6 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3527
3534
  };
3528
3535
  }, {
3529
3536
  execution: {
3530
- version: "1";
3531
3537
  run: {
3532
3538
  status: import("../../schemas/runEngine.js").TaskRunStatus;
3533
3539
  id: string;
@@ -3535,6 +3541,7 @@ export declare const WorkerApiRunLatestSnapshotResponseBody: z.ZodObject<{
3535
3541
  attemptNumber?: number | null | undefined;
3536
3542
  taskEventStore?: string | undefined;
3537
3543
  };
3544
+ version: "1";
3538
3545
  snapshot: {
3539
3546
  id: string;
3540
3547
  createdAt: Date;
@@ -3831,6 +3838,20 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3831
3838
  values?: string[] | undefined;
3832
3839
  }>, "many">>;
3833
3840
  }, "strip", z.ZodTypeAny, {
3841
+ run: {
3842
+ id: string;
3843
+ isTest: boolean;
3844
+ machine: {
3845
+ cpu: number;
3846
+ memory: number;
3847
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3848
+ centsPerMs: number;
3849
+ };
3850
+ traceContext: Record<string, unknown>;
3851
+ friendlyId: string;
3852
+ attemptNumber: number;
3853
+ masterQueue: string;
3854
+ };
3834
3855
  version: "1";
3835
3856
  environment: {
3836
3857
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3847,20 +3868,6 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3847
3868
  friendlyId?: string | undefined;
3848
3869
  imagePlatform?: string | undefined;
3849
3870
  };
3850
- run: {
3851
- id: string;
3852
- isTest: boolean;
3853
- machine: {
3854
- cpu: number;
3855
- memory: number;
3856
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3857
- centsPerMs: number;
3858
- };
3859
- traceContext: Record<string, unknown>;
3860
- friendlyId: string;
3861
- attemptNumber: number;
3862
- masterQueue: string;
3863
- };
3864
3871
  snapshot: {
3865
3872
  id: string;
3866
3873
  createdAt: Date;
@@ -3912,6 +3919,20 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3912
3919
  values?: string[] | undefined;
3913
3920
  }[] | undefined;
3914
3921
  }, {
3922
+ run: {
3923
+ id: string;
3924
+ isTest: boolean;
3925
+ machine: {
3926
+ cpu: number;
3927
+ memory: number;
3928
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3929
+ centsPerMs: number;
3930
+ };
3931
+ traceContext: Record<string, unknown>;
3932
+ friendlyId: string;
3933
+ attemptNumber: number;
3934
+ masterQueue: string;
3935
+ };
3915
3936
  version: "1";
3916
3937
  environment: {
3917
3938
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3928,20 +3949,6 @@ export declare const WorkerApiDequeueFromVersionResponseBody: z.ZodArray<z.ZodOb
3928
3949
  friendlyId?: string | undefined;
3929
3950
  imagePlatform?: string | undefined;
3930
3951
  };
3931
- run: {
3932
- id: string;
3933
- isTest: boolean;
3934
- machine: {
3935
- cpu: number;
3936
- memory: number;
3937
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3938
- centsPerMs: number;
3939
- };
3940
- traceContext: Record<string, unknown>;
3941
- friendlyId: string;
3942
- attemptNumber: number;
3943
- masterQueue: string;
3944
- };
3945
3952
  snapshot: {
3946
3953
  id: string;
3947
3954
  createdAt: Date;
@@ -4209,7 +4216,6 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4209
4216
  } | undefined;
4210
4217
  }>, "many">;
4211
4218
  }, "strip", z.ZodTypeAny, {
4212
- version: "1";
4213
4219
  run: {
4214
4220
  status: import("../../schemas/runEngine.js").TaskRunStatus;
4215
4221
  id: string;
@@ -4217,6 +4223,7 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4217
4223
  attemptNumber?: number | null | undefined;
4218
4224
  taskEventStore?: string | undefined;
4219
4225
  };
4226
+ version: "1";
4220
4227
  snapshot: {
4221
4228
  id: string;
4222
4229
  createdAt: Date;
@@ -4261,7 +4268,6 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4261
4268
  reason?: string | null | undefined;
4262
4269
  } | undefined;
4263
4270
  }, {
4264
- version: "1";
4265
4271
  run: {
4266
4272
  status: import("../../schemas/runEngine.js").TaskRunStatus;
4267
4273
  id: string;
@@ -4269,6 +4275,7 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4269
4275
  attemptNumber?: number | null | undefined;
4270
4276
  taskEventStore?: string | undefined;
4271
4277
  };
4278
+ version: "1";
4272
4279
  snapshot: {
4273
4280
  id: string;
4274
4281
  createdAt: Date;
@@ -4315,7 +4322,6 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4315
4322
  }>, "many">;
4316
4323
  }, "strip", z.ZodTypeAny, {
4317
4324
  snapshots: {
4318
- version: "1";
4319
4325
  run: {
4320
4326
  status: import("../../schemas/runEngine.js").TaskRunStatus;
4321
4327
  id: string;
@@ -4323,6 +4329,7 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4323
4329
  attemptNumber?: number | null | undefined;
4324
4330
  taskEventStore?: string | undefined;
4325
4331
  };
4332
+ version: "1";
4326
4333
  snapshot: {
4327
4334
  id: string;
4328
4335
  createdAt: Date;
@@ -4369,7 +4376,6 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4369
4376
  }[];
4370
4377
  }, {
4371
4378
  snapshots: {
4372
- version: "1";
4373
4379
  run: {
4374
4380
  status: import("../../schemas/runEngine.js").TaskRunStatus;
4375
4381
  id: string;
@@ -4377,6 +4383,7 @@ export declare const WorkerApiRunSnapshotsSinceResponseBody: z.ZodObject<{
4377
4383
  attemptNumber?: number | null | undefined;
4378
4384
  taskEventStore?: string | undefined;
4379
4385
  };
4386
+ version: "1";
4380
4387
  snapshot: {
4381
4388
  id: string;
4382
4389
  createdAt: Date;