@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
@@ -68,6 +68,37 @@ export declare class WorkloadHttpClient {
68
68
  };
69
69
  } & {
70
70
  execution: {
71
+ run: {
72
+ payload: string;
73
+ id: string;
74
+ payloadType: string;
75
+ tags: string[];
76
+ isTest: boolean;
77
+ createdAt: Date;
78
+ startedAt: Date;
79
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
80
+ idempotencyKey?: string | undefined;
81
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
82
+ maxAttempts?: number | undefined;
83
+ version?: string | undefined;
84
+ maxDuration?: number | undefined;
85
+ priority?: number | undefined;
86
+ baseCostInCents?: number | undefined;
87
+ parentTaskRunId?: string | undefined;
88
+ rootTaskRunId?: string | undefined;
89
+ durationMs?: number | undefined;
90
+ costInCents?: number | undefined;
91
+ region?: string | undefined;
92
+ } & {
93
+ traceContext?: Record<string, unknown> | undefined;
94
+ realtimeStreamsVersion?: string | undefined;
95
+ };
96
+ attempt: {
97
+ number: number;
98
+ startedAt: Date;
99
+ } & {
100
+ [k: string]: unknown;
101
+ };
71
102
  task: {
72
103
  id: string;
73
104
  filePath: string;
@@ -116,36 +147,6 @@ export declare class WorkloadHttpClient {
116
147
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
117
148
  centsPerMs: number;
118
149
  };
119
- attempt: {
120
- number: number;
121
- startedAt: Date;
122
- } & {
123
- [k: string]: unknown;
124
- };
125
- run: {
126
- payload: string;
127
- id: string;
128
- payloadType: string;
129
- tags: string[];
130
- isTest: boolean;
131
- createdAt: Date;
132
- startedAt: Date;
133
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
134
- idempotencyKey?: string | undefined;
135
- maxAttempts?: number | undefined;
136
- version?: string | undefined;
137
- maxDuration?: number | undefined;
138
- priority?: number | undefined;
139
- baseCostInCents?: number | undefined;
140
- parentTaskRunId?: string | undefined;
141
- rootTaskRunId?: string | undefined;
142
- durationMs?: number | undefined;
143
- costInCents?: number | undefined;
144
- region?: string | undefined;
145
- } & {
146
- traceContext?: Record<string, unknown> | undefined;
147
- realtimeStreamsVersion?: string | undefined;
148
- };
149
150
  batch?: {
150
151
  id: string;
151
152
  } | undefined;
@@ -203,7 +204,6 @@ export declare class WorkloadHttpClient {
203
204
  success: true;
204
205
  data: {
205
206
  snapshots: {
206
- version: "1";
207
207
  run: {
208
208
  status: import("../../index.js").TaskRunStatus;
209
209
  id: string;
@@ -211,6 +211,7 @@ export declare class WorkloadHttpClient {
211
211
  attemptNumber?: number | null | undefined;
212
212
  taskEventStore?: string | undefined;
213
213
  };
214
+ version: "1";
214
215
  snapshot: {
215
216
  id: string;
216
217
  createdAt: Date;
@@ -260,6 +261,20 @@ export declare class WorkloadHttpClient {
260
261
  sendDebugLog(runId: string, body: WorkloadDebugLogRequestBody): Promise<void>;
261
262
  /** @deprecated Not currently used */
262
263
  dequeue(): Promise<import("../../zodfetch.js").ApiResult<{
264
+ run: {
265
+ id: string;
266
+ isTest: boolean;
267
+ machine: {
268
+ cpu: number;
269
+ memory: number;
270
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
271
+ centsPerMs: number;
272
+ };
273
+ traceContext: Record<string, unknown>;
274
+ friendlyId: string;
275
+ attemptNumber: number;
276
+ masterQueue: string;
277
+ };
263
278
  version: "1";
264
279
  environment: {
265
280
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -276,20 +291,6 @@ export declare class WorkloadHttpClient {
276
291
  friendlyId?: string | undefined;
277
292
  imagePlatform?: string | undefined;
278
293
  };
279
- run: {
280
- id: string;
281
- isTest: boolean;
282
- machine: {
283
- cpu: number;
284
- memory: number;
285
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
286
- centsPerMs: number;
287
- };
288
- traceContext: Record<string, unknown>;
289
- friendlyId: string;
290
- attemptNumber: number;
291
- masterQueue: string;
292
- };
293
294
  snapshot: {
294
295
  id: string;
295
296
  createdAt: Date;
@@ -2145,6 +2145,7 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2145
2145
  createdAt: z.ZodDate;
2146
2146
  startedAt: z.ZodDefault<z.ZodDate>;
2147
2147
  idempotencyKey: z.ZodOptional<z.ZodString>;
2148
+ idempotencyKeyScope: z.ZodOptional<z.ZodEnum<["run", "attempt", "global"]>>;
2148
2149
  maxAttempts: z.ZodOptional<z.ZodNumber>;
2149
2150
  version: z.ZodOptional<z.ZodString>;
2150
2151
  metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../../index.js").DeserializedJson, z.ZodTypeDef, import("../../../index.js").DeserializedJson>>>;
@@ -2166,6 +2167,7 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2166
2167
  startedAt: Date;
2167
2168
  metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2168
2169
  idempotencyKey?: string | undefined;
2170
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2169
2171
  maxAttempts?: number | undefined;
2170
2172
  version?: string | undefined;
2171
2173
  maxDuration?: number | undefined;
@@ -2186,6 +2188,7 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2186
2188
  isTest?: boolean | undefined;
2187
2189
  startedAt?: Date | undefined;
2188
2190
  idempotencyKey?: string | undefined;
2191
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2189
2192
  maxAttempts?: number | undefined;
2190
2193
  version?: string | undefined;
2191
2194
  maxDuration?: number | undefined;
@@ -2207,6 +2210,37 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2207
2210
  realtimeStreamsVersion?: string | undefined;
2208
2211
  }>>;
2209
2212
  }, "strip", z.ZodTypeAny, {
2213
+ run: {
2214
+ payload: string;
2215
+ id: string;
2216
+ payloadType: string;
2217
+ tags: string[];
2218
+ isTest: boolean;
2219
+ createdAt: Date;
2220
+ startedAt: Date;
2221
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2222
+ idempotencyKey?: string | undefined;
2223
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2224
+ maxAttempts?: number | undefined;
2225
+ version?: string | undefined;
2226
+ maxDuration?: number | undefined;
2227
+ priority?: number | undefined;
2228
+ baseCostInCents?: number | undefined;
2229
+ parentTaskRunId?: string | undefined;
2230
+ rootTaskRunId?: string | undefined;
2231
+ durationMs?: number | undefined;
2232
+ costInCents?: number | undefined;
2233
+ region?: string | undefined;
2234
+ } & {
2235
+ traceContext?: Record<string, unknown> | undefined;
2236
+ realtimeStreamsVersion?: string | undefined;
2237
+ };
2238
+ attempt: {
2239
+ number: number;
2240
+ startedAt: Date;
2241
+ } & {
2242
+ [k: string]: unknown;
2243
+ };
2210
2244
  task: {
2211
2245
  id: string;
2212
2246
  filePath: string;
@@ -2255,36 +2289,6 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2255
2289
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2256
2290
  centsPerMs: number;
2257
2291
  };
2258
- attempt: {
2259
- number: number;
2260
- startedAt: Date;
2261
- } & {
2262
- [k: string]: unknown;
2263
- };
2264
- run: {
2265
- payload: string;
2266
- id: string;
2267
- payloadType: string;
2268
- tags: string[];
2269
- isTest: boolean;
2270
- createdAt: Date;
2271
- startedAt: Date;
2272
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2273
- idempotencyKey?: string | undefined;
2274
- maxAttempts?: number | undefined;
2275
- version?: string | undefined;
2276
- maxDuration?: number | undefined;
2277
- priority?: number | undefined;
2278
- baseCostInCents?: number | undefined;
2279
- parentTaskRunId?: string | undefined;
2280
- rootTaskRunId?: string | undefined;
2281
- durationMs?: number | undefined;
2282
- costInCents?: number | undefined;
2283
- region?: string | undefined;
2284
- } & {
2285
- traceContext?: Record<string, unknown> | undefined;
2286
- realtimeStreamsVersion?: string | undefined;
2287
- };
2288
2292
  batch?: {
2289
2293
  id: string;
2290
2294
  } | undefined;
@@ -2311,6 +2315,37 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2311
2315
  } | undefined;
2312
2316
  } | undefined;
2313
2317
  }, {
2318
+ run: {
2319
+ payload: string;
2320
+ id: string;
2321
+ payloadType: string;
2322
+ tags: string[];
2323
+ createdAt: Date;
2324
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2325
+ isTest?: boolean | undefined;
2326
+ startedAt?: Date | undefined;
2327
+ idempotencyKey?: string | undefined;
2328
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2329
+ maxAttempts?: number | undefined;
2330
+ version?: string | undefined;
2331
+ maxDuration?: number | undefined;
2332
+ priority?: number | undefined;
2333
+ baseCostInCents?: number | undefined;
2334
+ parentTaskRunId?: string | undefined;
2335
+ rootTaskRunId?: string | undefined;
2336
+ durationMs?: number | undefined;
2337
+ costInCents?: number | undefined;
2338
+ region?: string | undefined;
2339
+ } & {
2340
+ traceContext?: Record<string, unknown> | undefined;
2341
+ realtimeStreamsVersion?: string | undefined;
2342
+ };
2343
+ attempt: {
2344
+ number: number;
2345
+ startedAt: Date;
2346
+ } & {
2347
+ [k: string]: unknown;
2348
+ };
2314
2349
  task: {
2315
2350
  id: string;
2316
2351
  filePath: string;
@@ -2359,36 +2394,6 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2359
2394
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2360
2395
  centsPerMs: number;
2361
2396
  };
2362
- attempt: {
2363
- number: number;
2364
- startedAt: Date;
2365
- } & {
2366
- [k: string]: unknown;
2367
- };
2368
- run: {
2369
- payload: string;
2370
- id: string;
2371
- payloadType: string;
2372
- tags: string[];
2373
- createdAt: Date;
2374
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2375
- isTest?: boolean | undefined;
2376
- startedAt?: Date | undefined;
2377
- idempotencyKey?: string | undefined;
2378
- maxAttempts?: number | undefined;
2379
- version?: string | undefined;
2380
- maxDuration?: number | undefined;
2381
- priority?: number | undefined;
2382
- baseCostInCents?: number | undefined;
2383
- parentTaskRunId?: string | undefined;
2384
- rootTaskRunId?: string | undefined;
2385
- durationMs?: number | undefined;
2386
- costInCents?: number | undefined;
2387
- region?: string | undefined;
2388
- } & {
2389
- traceContext?: Record<string, unknown> | undefined;
2390
- realtimeStreamsVersion?: string | undefined;
2391
- };
2392
2397
  batch?: {
2393
2398
  id: string;
2394
2399
  } | undefined;
@@ -2417,6 +2422,37 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2417
2422
  }>;
2418
2423
  }, "strip", z.ZodTypeAny, {
2419
2424
  execution: {
2425
+ run: {
2426
+ payload: string;
2427
+ id: string;
2428
+ payloadType: string;
2429
+ tags: string[];
2430
+ isTest: boolean;
2431
+ createdAt: Date;
2432
+ startedAt: Date;
2433
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2434
+ idempotencyKey?: string | undefined;
2435
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2436
+ maxAttempts?: number | undefined;
2437
+ version?: string | undefined;
2438
+ maxDuration?: number | undefined;
2439
+ priority?: number | undefined;
2440
+ baseCostInCents?: number | undefined;
2441
+ parentTaskRunId?: string | undefined;
2442
+ rootTaskRunId?: string | undefined;
2443
+ durationMs?: number | undefined;
2444
+ costInCents?: number | undefined;
2445
+ region?: string | undefined;
2446
+ } & {
2447
+ traceContext?: Record<string, unknown> | undefined;
2448
+ realtimeStreamsVersion?: string | undefined;
2449
+ };
2450
+ attempt: {
2451
+ number: number;
2452
+ startedAt: Date;
2453
+ } & {
2454
+ [k: string]: unknown;
2455
+ };
2420
2456
  task: {
2421
2457
  id: string;
2422
2458
  filePath: string;
@@ -2465,36 +2501,6 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2465
2501
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2466
2502
  centsPerMs: number;
2467
2503
  };
2468
- attempt: {
2469
- number: number;
2470
- startedAt: Date;
2471
- } & {
2472
- [k: string]: unknown;
2473
- };
2474
- run: {
2475
- payload: string;
2476
- id: string;
2477
- payloadType: string;
2478
- tags: string[];
2479
- isTest: boolean;
2480
- createdAt: Date;
2481
- startedAt: Date;
2482
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2483
- idempotencyKey?: string | undefined;
2484
- maxAttempts?: number | undefined;
2485
- version?: string | undefined;
2486
- maxDuration?: number | undefined;
2487
- priority?: number | undefined;
2488
- baseCostInCents?: number | undefined;
2489
- parentTaskRunId?: string | undefined;
2490
- rootTaskRunId?: string | undefined;
2491
- durationMs?: number | undefined;
2492
- costInCents?: number | undefined;
2493
- region?: string | undefined;
2494
- } & {
2495
- traceContext?: Record<string, unknown> | undefined;
2496
- realtimeStreamsVersion?: string | undefined;
2497
- };
2498
2504
  batch?: {
2499
2505
  id: string;
2500
2506
  } | undefined;
@@ -2523,6 +2529,37 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2523
2529
  };
2524
2530
  }, {
2525
2531
  execution: {
2532
+ run: {
2533
+ payload: string;
2534
+ id: string;
2535
+ payloadType: string;
2536
+ tags: string[];
2537
+ createdAt: Date;
2538
+ metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2539
+ isTest?: boolean | undefined;
2540
+ startedAt?: Date | undefined;
2541
+ idempotencyKey?: string | undefined;
2542
+ idempotencyKeyScope?: "run" | "attempt" | "global" | undefined;
2543
+ maxAttempts?: number | undefined;
2544
+ version?: string | undefined;
2545
+ maxDuration?: number | undefined;
2546
+ priority?: number | undefined;
2547
+ baseCostInCents?: number | undefined;
2548
+ parentTaskRunId?: string | undefined;
2549
+ rootTaskRunId?: string | undefined;
2550
+ durationMs?: number | undefined;
2551
+ costInCents?: number | undefined;
2552
+ region?: string | undefined;
2553
+ } & {
2554
+ traceContext?: Record<string, unknown> | undefined;
2555
+ realtimeStreamsVersion?: string | undefined;
2556
+ };
2557
+ attempt: {
2558
+ number: number;
2559
+ startedAt: Date;
2560
+ } & {
2561
+ [k: string]: unknown;
2562
+ };
2526
2563
  task: {
2527
2564
  id: string;
2528
2565
  filePath: string;
@@ -2571,36 +2608,6 @@ export declare const WorkloadRunAttemptStartResponseBody: z.ZodIntersection<z.Zo
2571
2608
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
2572
2609
  centsPerMs: number;
2573
2610
  };
2574
- attempt: {
2575
- number: number;
2576
- startedAt: Date;
2577
- } & {
2578
- [k: string]: unknown;
2579
- };
2580
- run: {
2581
- payload: string;
2582
- id: string;
2583
- payloadType: string;
2584
- tags: string[];
2585
- createdAt: Date;
2586
- metadata?: Record<string, import("../../../index.js").DeserializedJson> | undefined;
2587
- isTest?: boolean | undefined;
2588
- startedAt?: Date | undefined;
2589
- idempotencyKey?: string | undefined;
2590
- maxAttempts?: number | undefined;
2591
- version?: string | undefined;
2592
- maxDuration?: number | undefined;
2593
- priority?: number | undefined;
2594
- baseCostInCents?: number | undefined;
2595
- parentTaskRunId?: string | undefined;
2596
- rootTaskRunId?: string | undefined;
2597
- durationMs?: number | undefined;
2598
- costInCents?: number | undefined;
2599
- region?: string | undefined;
2600
- } & {
2601
- traceContext?: Record<string, unknown> | undefined;
2602
- realtimeStreamsVersion?: string | undefined;
2603
- };
2604
2611
  batch?: {
2605
2612
  id: string;
2606
2613
  } | undefined;
@@ -2806,7 +2813,6 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2806
2813
  } | undefined;
2807
2814
  }>, "many">;
2808
2815
  }, "strip", z.ZodTypeAny, {
2809
- version: "1";
2810
2816
  run: {
2811
2817
  status: import("../../index.js").TaskRunStatus;
2812
2818
  id: string;
@@ -2814,6 +2820,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2814
2820
  attemptNumber?: number | null | undefined;
2815
2821
  taskEventStore?: string | undefined;
2816
2822
  };
2823
+ version: "1";
2817
2824
  snapshot: {
2818
2825
  id: string;
2819
2826
  createdAt: Date;
@@ -2858,7 +2865,6 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2858
2865
  reason?: string | null | undefined;
2859
2866
  } | undefined;
2860
2867
  }, {
2861
- version: "1";
2862
2868
  run: {
2863
2869
  status: import("../../index.js").TaskRunStatus;
2864
2870
  id: string;
@@ -2866,6 +2872,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2866
2872
  attemptNumber?: number | null | undefined;
2867
2873
  taskEventStore?: string | undefined;
2868
2874
  };
2875
+ version: "1";
2869
2876
  snapshot: {
2870
2877
  id: string;
2871
2878
  createdAt: Date;
@@ -2912,7 +2919,6 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2912
2919
  }>;
2913
2920
  }, "strip", z.ZodTypeAny, {
2914
2921
  execution: {
2915
- version: "1";
2916
2922
  run: {
2917
2923
  status: import("../../index.js").TaskRunStatus;
2918
2924
  id: string;
@@ -2920,6 +2926,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2920
2926
  attemptNumber?: number | null | undefined;
2921
2927
  taskEventStore?: string | undefined;
2922
2928
  };
2929
+ version: "1";
2923
2930
  snapshot: {
2924
2931
  id: string;
2925
2932
  createdAt: Date;
@@ -2966,7 +2973,6 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2966
2973
  };
2967
2974
  }, {
2968
2975
  execution: {
2969
- version: "1";
2970
2976
  run: {
2971
2977
  status: import("../../index.js").TaskRunStatus;
2972
2978
  id: string;
@@ -2974,6 +2980,7 @@ export declare const WorkloadRunLatestSnapshotResponseBody: z.ZodObject<{
2974
2980
  attemptNumber?: number | null | undefined;
2975
2981
  taskEventStore?: string | undefined;
2976
2982
  };
2983
+ version: "1";
2977
2984
  snapshot: {
2978
2985
  id: string;
2979
2986
  createdAt: Date;
@@ -3284,6 +3291,20 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
3284
3291
  values?: string[] | undefined;
3285
3292
  }>, "many">>;
3286
3293
  }, "strip", z.ZodTypeAny, {
3294
+ run: {
3295
+ id: string;
3296
+ isTest: boolean;
3297
+ machine: {
3298
+ cpu: number;
3299
+ memory: number;
3300
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3301
+ centsPerMs: number;
3302
+ };
3303
+ traceContext: Record<string, unknown>;
3304
+ friendlyId: string;
3305
+ attemptNumber: number;
3306
+ masterQueue: string;
3307
+ };
3287
3308
  version: "1";
3288
3309
  environment: {
3289
3310
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3300,20 +3321,6 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
3300
3321
  friendlyId?: string | undefined;
3301
3322
  imagePlatform?: string | undefined;
3302
3323
  };
3303
- run: {
3304
- id: string;
3305
- isTest: boolean;
3306
- machine: {
3307
- cpu: number;
3308
- memory: number;
3309
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3310
- centsPerMs: number;
3311
- };
3312
- traceContext: Record<string, unknown>;
3313
- friendlyId: string;
3314
- attemptNumber: number;
3315
- masterQueue: string;
3316
- };
3317
3324
  snapshot: {
3318
3325
  id: string;
3319
3326
  createdAt: Date;
@@ -3365,6 +3372,20 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
3365
3372
  values?: string[] | undefined;
3366
3373
  }[] | undefined;
3367
3374
  }, {
3375
+ run: {
3376
+ id: string;
3377
+ isTest: boolean;
3378
+ machine: {
3379
+ cpu: number;
3380
+ memory: number;
3381
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3382
+ centsPerMs: number;
3383
+ };
3384
+ traceContext: Record<string, unknown>;
3385
+ friendlyId: string;
3386
+ attemptNumber: number;
3387
+ masterQueue: string;
3388
+ };
3368
3389
  version: "1";
3369
3390
  environment: {
3370
3391
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
@@ -3381,20 +3402,6 @@ export declare const WorkloadDequeueFromVersionResponseBody: z.ZodArray<z.ZodObj
3381
3402
  friendlyId?: string | undefined;
3382
3403
  imagePlatform?: string | undefined;
3383
3404
  };
3384
- run: {
3385
- id: string;
3386
- isTest: boolean;
3387
- machine: {
3388
- cpu: number;
3389
- memory: number;
3390
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
3391
- centsPerMs: number;
3392
- };
3393
- traceContext: Record<string, unknown>;
3394
- friendlyId: string;
3395
- attemptNumber: number;
3396
- masterQueue: string;
3397
- };
3398
3405
  snapshot: {
3399
3406
  id: string;
3400
3407
  createdAt: Date;
@@ -3618,7 +3625,6 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3618
3625
  } | undefined;
3619
3626
  }>, "many">;
3620
3627
  }, "strip", z.ZodTypeAny, {
3621
- version: "1";
3622
3628
  run: {
3623
3629
  status: import("../../index.js").TaskRunStatus;
3624
3630
  id: string;
@@ -3626,6 +3632,7 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3626
3632
  attemptNumber?: number | null | undefined;
3627
3633
  taskEventStore?: string | undefined;
3628
3634
  };
3635
+ version: "1";
3629
3636
  snapshot: {
3630
3637
  id: string;
3631
3638
  createdAt: Date;
@@ -3670,7 +3677,6 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3670
3677
  reason?: string | null | undefined;
3671
3678
  } | undefined;
3672
3679
  }, {
3673
- version: "1";
3674
3680
  run: {
3675
3681
  status: import("../../index.js").TaskRunStatus;
3676
3682
  id: string;
@@ -3678,6 +3684,7 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3678
3684
  attemptNumber?: number | null | undefined;
3679
3685
  taskEventStore?: string | undefined;
3680
3686
  };
3687
+ version: "1";
3681
3688
  snapshot: {
3682
3689
  id: string;
3683
3690
  createdAt: Date;
@@ -3724,7 +3731,6 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3724
3731
  }>, "many">;
3725
3732
  }, "strip", z.ZodTypeAny, {
3726
3733
  snapshots: {
3727
- version: "1";
3728
3734
  run: {
3729
3735
  status: import("../../index.js").TaskRunStatus;
3730
3736
  id: string;
@@ -3732,6 +3738,7 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3732
3738
  attemptNumber?: number | null | undefined;
3733
3739
  taskEventStore?: string | undefined;
3734
3740
  };
3741
+ version: "1";
3735
3742
  snapshot: {
3736
3743
  id: string;
3737
3744
  createdAt: Date;
@@ -3778,7 +3785,6 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3778
3785
  }[];
3779
3786
  }, {
3780
3787
  snapshots: {
3781
- version: "1";
3782
3788
  run: {
3783
3789
  status: import("../../index.js").TaskRunStatus;
3784
3790
  id: string;
@@ -3786,6 +3792,7 @@ export declare const WorkloadRunSnapshotsSinceResponseBody: z.ZodObject<{
3786
3792
  attemptNumber?: number | null | undefined;
3787
3793
  taskEventStore?: string | undefined;
3788
3794
  };
3795
+ version: "1";
3789
3796
  snapshot: {
3790
3797
  id: string;
3791
3798
  createdAt: Date;