@trigger.dev/core 0.0.0-prerelease-20250213143202 → 0.0.0-python-preview-20250226140121

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 (151) hide show
  1. package/dist/commonjs/schemas/api.d.ts +1999 -1999
  2. package/dist/commonjs/schemas/events.d.ts +8 -8
  3. package/dist/commonjs/schemas/fetch.d.ts +54 -54
  4. package/dist/commonjs/schemas/integrations.d.ts +4 -4
  5. package/dist/commonjs/schemas/notifications.d.ts +80 -80
  6. package/dist/commonjs/schemas/properties.d.ts +4 -4
  7. package/dist/commonjs/schemas/request.d.ts +4 -4
  8. package/dist/commonjs/schemas/requestFilter.d.ts +2 -2
  9. package/dist/commonjs/schemas/runs.d.ts +39 -39
  10. package/dist/commonjs/schemas/schedules.d.ts +12 -12
  11. package/dist/commonjs/schemas/statuses.d.ts +24 -24
  12. package/dist/commonjs/schemas/tasks.d.ts +50 -50
  13. package/dist/commonjs/schemas/triggers.d.ts +36 -36
  14. package/dist/commonjs/v3/apiClient/index.d.ts +51 -51
  15. package/dist/commonjs/v3/apiClientManager/index.d.ts +1 -1
  16. package/dist/commonjs/v3/apps/provider.d.ts +1 -0
  17. package/dist/commonjs/v3/apps/provider.js +1 -0
  18. package/dist/commonjs/v3/apps/provider.js.map +1 -1
  19. package/dist/commonjs/v3/errors.d.ts +1 -0
  20. package/dist/commonjs/v3/errors.js +31 -0
  21. package/dist/commonjs/v3/errors.js.map +1 -1
  22. package/dist/commonjs/v3/index.d.ts +1 -0
  23. package/dist/commonjs/v3/index.js +1 -0
  24. package/dist/commonjs/v3/index.js.map +1 -1
  25. package/dist/commonjs/v3/links.d.ts +3 -0
  26. package/dist/commonjs/v3/links.js +3 -0
  27. package/dist/commonjs/v3/links.js.map +1 -1
  28. package/dist/commonjs/v3/run-timeline-metrics-api.d.ts +2 -0
  29. package/dist/commonjs/v3/run-timeline-metrics-api.js +8 -0
  30. package/dist/commonjs/v3/run-timeline-metrics-api.js.map +1 -0
  31. package/dist/commonjs/v3/runTimelineMetrics/index.d.ts +23 -0
  32. package/dist/commonjs/v3/runTimelineMetrics/index.js +160 -0
  33. package/dist/commonjs/v3/runTimelineMetrics/index.js.map +1 -0
  34. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.d.ts +13 -0
  35. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.js +52 -0
  36. package/dist/commonjs/v3/runTimelineMetrics/runTimelineMetricsManager.js.map +1 -0
  37. package/dist/commonjs/v3/runTimelineMetrics/types.d.ts +11 -0
  38. package/dist/commonjs/v3/runTimelineMetrics/types.js +3 -0
  39. package/dist/commonjs/v3/runTimelineMetrics/types.js.map +1 -0
  40. package/dist/commonjs/v3/schemas/api.d.ts +293 -293
  41. package/dist/commonjs/v3/schemas/build.d.ts +196 -196
  42. package/dist/commonjs/v3/schemas/common.d.ts +24 -24
  43. package/dist/commonjs/v3/schemas/common.js +1 -0
  44. package/dist/commonjs/v3/schemas/common.js.map +1 -1
  45. package/dist/commonjs/v3/schemas/fetch.d.ts +13 -13
  46. package/dist/commonjs/v3/schemas/messages.d.ts +6605 -4119
  47. package/dist/commonjs/v3/schemas/messages.js +22 -0
  48. package/dist/commonjs/v3/schemas/messages.js.map +1 -1
  49. package/dist/commonjs/v3/schemas/openTelemetry.d.ts +20 -20
  50. package/dist/commonjs/v3/schemas/resources.d.ts +52 -52
  51. package/dist/commonjs/v3/schemas/schemas.d.ts +485 -352
  52. package/dist/commonjs/v3/schemas/schemas.js +17 -1
  53. package/dist/commonjs/v3/schemas/schemas.js.map +1 -1
  54. package/dist/commonjs/v3/schemas/webhooks.d.ts +238 -238
  55. package/dist/commonjs/v3/semanticInternalAttributes.d.ts +1 -0
  56. package/dist/commonjs/v3/semanticInternalAttributes.js +1 -0
  57. package/dist/commonjs/v3/semanticInternalAttributes.js.map +1 -1
  58. package/dist/commonjs/v3/taskContext/index.js +1 -1
  59. package/dist/commonjs/v3/taskContext/index.js.map +1 -1
  60. package/dist/commonjs/v3/tracer.d.ts +10 -2
  61. package/dist/commonjs/v3/tracer.js +13 -4
  62. package/dist/commonjs/v3/tracer.js.map +1 -1
  63. package/dist/commonjs/v3/utils/flattenAttributes.js.map +1 -1
  64. package/dist/commonjs/v3/utils/globals.d.ts +2 -0
  65. package/dist/commonjs/v3/utils/globals.js.map +1 -1
  66. package/dist/commonjs/v3/workers/index.d.ts +1 -0
  67. package/dist/commonjs/v3/workers/index.js +3 -1
  68. package/dist/commonjs/v3/workers/index.js.map +1 -1
  69. package/dist/commonjs/v3/workers/taskExecutor.js +19 -9
  70. package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
  71. package/dist/commonjs/v3/zodMessageHandler.d.ts +2 -2
  72. package/dist/commonjs/v3/zodSocket.d.ts +2 -2
  73. package/dist/commonjs/v3/zodSocket.js +3 -2
  74. package/dist/commonjs/v3/zodSocket.js.map +1 -1
  75. package/dist/commonjs/version.js +1 -1
  76. package/dist/esm/schemas/api.d.ts +2001 -2001
  77. package/dist/esm/schemas/events.d.ts +8 -8
  78. package/dist/esm/schemas/fetch.d.ts +54 -54
  79. package/dist/esm/schemas/integrations.d.ts +4 -4
  80. package/dist/esm/schemas/notifications.d.ts +80 -80
  81. package/dist/esm/schemas/properties.d.ts +4 -4
  82. package/dist/esm/schemas/request.d.ts +4 -4
  83. package/dist/esm/schemas/requestFilter.d.ts +2 -2
  84. package/dist/esm/schemas/runs.d.ts +39 -39
  85. package/dist/esm/schemas/schedules.d.ts +12 -12
  86. package/dist/esm/schemas/statuses.d.ts +24 -24
  87. package/dist/esm/schemas/tasks.d.ts +50 -50
  88. package/dist/esm/schemas/triggers.d.ts +36 -36
  89. package/dist/esm/v3/apiClient/index.d.ts +51 -51
  90. package/dist/esm/v3/apiClientManager/index.d.ts +1 -1
  91. package/dist/esm/v3/apps/provider.d.ts +1 -0
  92. package/dist/esm/v3/apps/provider.js +1 -0
  93. package/dist/esm/v3/apps/provider.js.map +1 -1
  94. package/dist/esm/v3/errors.d.ts +1 -0
  95. package/dist/esm/v3/errors.js +30 -0
  96. package/dist/esm/v3/errors.js.map +1 -1
  97. package/dist/esm/v3/index.d.ts +1 -0
  98. package/dist/esm/v3/index.js +1 -0
  99. package/dist/esm/v3/index.js.map +1 -1
  100. package/dist/esm/v3/links.d.ts +3 -0
  101. package/dist/esm/v3/links.js +3 -0
  102. package/dist/esm/v3/links.js.map +1 -1
  103. package/dist/esm/v3/run-timeline-metrics-api.d.ts +2 -0
  104. package/dist/esm/v3/run-timeline-metrics-api.js +5 -0
  105. package/dist/esm/v3/run-timeline-metrics-api.js.map +1 -0
  106. package/dist/esm/v3/runTimelineMetrics/index.d.ts +23 -0
  107. package/dist/esm/v3/runTimelineMetrics/index.js +156 -0
  108. package/dist/esm/v3/runTimelineMetrics/index.js.map +1 -0
  109. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.d.ts +13 -0
  110. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.js +47 -0
  111. package/dist/esm/v3/runTimelineMetrics/runTimelineMetricsManager.js.map +1 -0
  112. package/dist/esm/v3/runTimelineMetrics/types.d.ts +11 -0
  113. package/dist/esm/v3/runTimelineMetrics/types.js +2 -0
  114. package/dist/esm/v3/runTimelineMetrics/types.js.map +1 -0
  115. package/dist/esm/v3/schemas/api.d.ts +293 -293
  116. package/dist/esm/v3/schemas/build.d.ts +196 -196
  117. package/dist/esm/v3/schemas/common.d.ts +24 -24
  118. package/dist/esm/v3/schemas/common.js +1 -0
  119. package/dist/esm/v3/schemas/common.js.map +1 -1
  120. package/dist/esm/v3/schemas/fetch.d.ts +13 -13
  121. package/dist/esm/v3/schemas/messages.d.ts +6605 -4119
  122. package/dist/esm/v3/schemas/messages.js +23 -1
  123. package/dist/esm/v3/schemas/messages.js.map +1 -1
  124. package/dist/esm/v3/schemas/openTelemetry.d.ts +20 -20
  125. package/dist/esm/v3/schemas/resources.d.ts +52 -52
  126. package/dist/esm/v3/schemas/schemas.d.ts +485 -352
  127. package/dist/esm/v3/schemas/schemas.js +16 -0
  128. package/dist/esm/v3/schemas/schemas.js.map +1 -1
  129. package/dist/esm/v3/schemas/webhooks.d.ts +238 -238
  130. package/dist/esm/v3/semanticInternalAttributes.d.ts +1 -0
  131. package/dist/esm/v3/semanticInternalAttributes.js +1 -0
  132. package/dist/esm/v3/semanticInternalAttributes.js.map +1 -1
  133. package/dist/esm/v3/taskContext/index.js +1 -1
  134. package/dist/esm/v3/taskContext/index.js.map +1 -1
  135. package/dist/esm/v3/tracer.d.ts +10 -2
  136. package/dist/esm/v3/tracer.js +13 -4
  137. package/dist/esm/v3/tracer.js.map +1 -1
  138. package/dist/esm/v3/utils/flattenAttributes.js.map +1 -1
  139. package/dist/esm/v3/utils/globals.d.ts +2 -0
  140. package/dist/esm/v3/utils/globals.js.map +1 -1
  141. package/dist/esm/v3/workers/index.d.ts +1 -0
  142. package/dist/esm/v3/workers/index.js +1 -0
  143. package/dist/esm/v3/workers/index.js.map +1 -1
  144. package/dist/esm/v3/workers/taskExecutor.js +20 -10
  145. package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
  146. package/dist/esm/v3/zodMessageHandler.d.ts +2 -2
  147. package/dist/esm/v3/zodSocket.d.ts +2 -2
  148. package/dist/esm/v3/zodSocket.js +3 -2
  149. package/dist/esm/v3/zodSocket.js.map +1 -1
  150. package/dist/esm/version.js +1 -1
  151. package/package.json +1 -1
@@ -2,6 +2,40 @@ import { z } from "zod";
2
2
  import { RequireKeys } from "../types/index.js";
3
3
  export declare const EnvironmentType: z.ZodEnum<["PRODUCTION", "STAGING", "DEVELOPMENT", "PREVIEW"]>;
4
4
  export type EnvironmentType = z.infer<typeof EnvironmentType>;
5
+ export declare const TaskRunExecutionMetric: z.ZodObject<{
6
+ name: z.ZodString;
7
+ event: z.ZodString;
8
+ timestamp: z.ZodNumber;
9
+ duration: z.ZodNumber;
10
+ }, "strip", z.ZodTypeAny, {
11
+ name: string;
12
+ event: string;
13
+ timestamp: number;
14
+ duration: number;
15
+ }, {
16
+ name: string;
17
+ event: string;
18
+ timestamp: number;
19
+ duration: number;
20
+ }>;
21
+ export type TaskRunExecutionMetric = z.infer<typeof TaskRunExecutionMetric>;
22
+ export declare const TaskRunExecutionMetrics: z.ZodArray<z.ZodObject<{
23
+ name: z.ZodString;
24
+ event: z.ZodString;
25
+ timestamp: z.ZodNumber;
26
+ duration: z.ZodNumber;
27
+ }, "strip", z.ZodTypeAny, {
28
+ name: string;
29
+ event: string;
30
+ timestamp: number;
31
+ duration: number;
32
+ }, {
33
+ name: string;
34
+ event: string;
35
+ timestamp: number;
36
+ duration: number;
37
+ }>, "many">;
38
+ export type TaskRunExecutionMetrics = z.infer<typeof TaskRunExecutionMetrics>;
5
39
  export declare const TaskRunExecutionPayload: z.ZodObject<{
6
40
  execution: z.ZodObject<{
7
41
  task: z.ZodObject<{
@@ -58,36 +92,36 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
58
92
  maxDuration: z.ZodOptional<z.ZodNumber>;
59
93
  }, "strip", z.ZodTypeAny, {
60
94
  id: string;
61
- createdAt: Date;
62
95
  startedAt: Date;
63
- isTest: boolean;
64
- tags: string[];
65
96
  payload: string;
66
97
  payloadType: string;
98
+ tags: string[];
99
+ isTest: boolean;
100
+ createdAt: Date;
67
101
  durationMs: number;
68
102
  costInCents: number;
69
103
  baseCostInCents: number;
70
- version?: string | undefined;
71
- idempotencyKey?: string | undefined;
72
104
  context?: any;
105
+ idempotencyKey?: string | undefined;
73
106
  maxAttempts?: number | undefined;
107
+ version?: string | undefined;
74
108
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
75
109
  maxDuration?: number | undefined;
76
110
  }, {
77
111
  id: string;
78
- createdAt: Date;
79
- tags: string[];
80
112
  payload: string;
81
113
  payloadType: string;
82
- version?: string | undefined;
114
+ tags: string[];
115
+ createdAt: Date;
83
116
  startedAt?: Date | undefined;
117
+ context?: any;
84
118
  isTest?: boolean | undefined;
85
119
  idempotencyKey?: string | undefined;
86
- context?: any;
87
120
  maxAttempts?: number | undefined;
88
121
  durationMs?: number | undefined;
89
122
  costInCents?: number | undefined;
90
123
  baseCostInCents?: number | undefined;
124
+ version?: string | undefined;
91
125
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
92
126
  maxDuration?: number | undefined;
93
127
  }>;
@@ -167,67 +201,41 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
167
201
  centsPerMs: number;
168
202
  }>>;
169
203
  }, "strip", z.ZodTypeAny, {
170
- environment: {
171
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
172
- id: string;
173
- slug: string;
174
- };
175
- organization: {
176
- name: string;
177
- id: string;
178
- slug: string;
179
- };
180
- project: {
181
- name: string;
182
- id: string;
183
- slug: string;
184
- ref: string;
185
- };
186
204
  task: {
187
205
  id: string;
188
206
  filePath: string;
189
207
  exportName: string;
190
208
  };
209
+ attempt: {
210
+ number: number;
211
+ status: string;
212
+ id: string;
213
+ startedAt: Date;
214
+ backgroundWorkerId: string;
215
+ backgroundWorkerTaskId: string;
216
+ };
191
217
  run: {
192
218
  id: string;
193
- createdAt: Date;
194
219
  startedAt: Date;
195
- isTest: boolean;
196
- tags: string[];
197
220
  payload: string;
198
221
  payloadType: string;
222
+ tags: string[];
223
+ isTest: boolean;
224
+ createdAt: Date;
199
225
  durationMs: number;
200
226
  costInCents: number;
201
227
  baseCostInCents: number;
202
- version?: string | undefined;
203
- idempotencyKey?: string | undefined;
204
228
  context?: any;
229
+ idempotencyKey?: string | undefined;
205
230
  maxAttempts?: number | undefined;
231
+ version?: string | undefined;
206
232
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
207
233
  maxDuration?: number | undefined;
208
234
  };
209
- attempt: {
210
- number: number;
211
- status: string;
212
- id: string;
213
- startedAt: Date;
214
- backgroundWorkerId: string;
215
- backgroundWorkerTaskId: string;
216
- };
217
235
  queue: {
218
236
  name: string;
219
237
  id: string;
220
238
  };
221
- machine?: {
222
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
223
- cpu: number;
224
- memory: number;
225
- centsPerMs: number;
226
- } | undefined;
227
- batch?: {
228
- id: string;
229
- } | undefined;
230
- }, {
231
239
  environment: {
232
240
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
233
241
  id: string;
@@ -244,55 +252,51 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
244
252
  slug: string;
245
253
  ref: string;
246
254
  };
255
+ batch?: {
256
+ id: string;
257
+ } | undefined;
258
+ machine?: {
259
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
260
+ cpu: number;
261
+ memory: number;
262
+ centsPerMs: number;
263
+ } | undefined;
264
+ }, {
247
265
  task: {
248
266
  id: string;
249
267
  filePath: string;
250
268
  exportName: string;
251
269
  };
270
+ attempt: {
271
+ number: number;
272
+ status: string;
273
+ id: string;
274
+ startedAt: Date;
275
+ backgroundWorkerId: string;
276
+ backgroundWorkerTaskId: string;
277
+ };
252
278
  run: {
253
279
  id: string;
254
- createdAt: Date;
255
- tags: string[];
256
280
  payload: string;
257
281
  payloadType: string;
258
- version?: string | undefined;
282
+ tags: string[];
283
+ createdAt: Date;
259
284
  startedAt?: Date | undefined;
285
+ context?: any;
260
286
  isTest?: boolean | undefined;
261
287
  idempotencyKey?: string | undefined;
262
- context?: any;
263
288
  maxAttempts?: number | undefined;
264
289
  durationMs?: number | undefined;
265
290
  costInCents?: number | undefined;
266
291
  baseCostInCents?: number | undefined;
292
+ version?: string | undefined;
267
293
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
268
294
  maxDuration?: number | undefined;
269
295
  };
270
- attempt: {
271
- number: number;
272
- status: string;
273
- id: string;
274
- startedAt: Date;
275
- backgroundWorkerId: string;
276
- backgroundWorkerTaskId: string;
277
- };
278
296
  queue: {
279
297
  name: string;
280
298
  id: string;
281
299
  };
282
- machine?: {
283
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
284
- cpu: number;
285
- memory: number;
286
- centsPerMs: number;
287
- } | undefined;
288
- batch?: {
289
- id: string;
290
- } | undefined;
291
- }>;
292
- traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
293
- environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
294
- }, "strip", z.ZodTypeAny, {
295
- execution: {
296
300
  environment: {
297
301
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
298
302
  id: string;
@@ -309,55 +313,71 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
309
313
  slug: string;
310
314
  ref: string;
311
315
  };
316
+ batch?: {
317
+ id: string;
318
+ } | undefined;
319
+ machine?: {
320
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
321
+ cpu: number;
322
+ memory: number;
323
+ centsPerMs: number;
324
+ } | undefined;
325
+ }>;
326
+ traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
327
+ environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
328
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
329
+ name: z.ZodString;
330
+ event: z.ZodString;
331
+ timestamp: z.ZodNumber;
332
+ duration: z.ZodNumber;
333
+ }, "strip", z.ZodTypeAny, {
334
+ name: string;
335
+ event: string;
336
+ timestamp: number;
337
+ duration: number;
338
+ }, {
339
+ name: string;
340
+ event: string;
341
+ timestamp: number;
342
+ duration: number;
343
+ }>, "many">>;
344
+ }, "strip", z.ZodTypeAny, {
345
+ execution: {
312
346
  task: {
313
347
  id: string;
314
348
  filePath: string;
315
349
  exportName: string;
316
350
  };
351
+ attempt: {
352
+ number: number;
353
+ status: string;
354
+ id: string;
355
+ startedAt: Date;
356
+ backgroundWorkerId: string;
357
+ backgroundWorkerTaskId: string;
358
+ };
317
359
  run: {
318
360
  id: string;
319
- createdAt: Date;
320
361
  startedAt: Date;
321
- isTest: boolean;
322
- tags: string[];
323
362
  payload: string;
324
363
  payloadType: string;
364
+ tags: string[];
365
+ isTest: boolean;
366
+ createdAt: Date;
325
367
  durationMs: number;
326
368
  costInCents: number;
327
369
  baseCostInCents: number;
328
- version?: string | undefined;
329
- idempotencyKey?: string | undefined;
330
370
  context?: any;
371
+ idempotencyKey?: string | undefined;
331
372
  maxAttempts?: number | undefined;
373
+ version?: string | undefined;
332
374
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
333
375
  maxDuration?: number | undefined;
334
376
  };
335
- attempt: {
336
- number: number;
337
- status: string;
338
- id: string;
339
- startedAt: Date;
340
- backgroundWorkerId: string;
341
- backgroundWorkerTaskId: string;
342
- };
343
377
  queue: {
344
378
  name: string;
345
379
  id: string;
346
380
  };
347
- machine?: {
348
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
349
- cpu: number;
350
- memory: number;
351
- centsPerMs: number;
352
- } | undefined;
353
- batch?: {
354
- id: string;
355
- } | undefined;
356
- };
357
- traceContext: Record<string, unknown>;
358
- environment?: Record<string, string> | undefined;
359
- }, {
360
- execution: {
361
381
  environment: {
362
382
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
363
383
  id: string;
@@ -374,53 +394,95 @@ export declare const TaskRunExecutionPayload: z.ZodObject<{
374
394
  slug: string;
375
395
  ref: string;
376
396
  };
397
+ batch?: {
398
+ id: string;
399
+ } | undefined;
400
+ machine?: {
401
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
402
+ cpu: number;
403
+ memory: number;
404
+ centsPerMs: number;
405
+ } | undefined;
406
+ };
407
+ traceContext: Record<string, unknown>;
408
+ environment?: Record<string, string> | undefined;
409
+ metrics?: {
410
+ name: string;
411
+ event: string;
412
+ timestamp: number;
413
+ duration: number;
414
+ }[] | undefined;
415
+ }, {
416
+ execution: {
377
417
  task: {
378
418
  id: string;
379
419
  filePath: string;
380
420
  exportName: string;
381
421
  };
422
+ attempt: {
423
+ number: number;
424
+ status: string;
425
+ id: string;
426
+ startedAt: Date;
427
+ backgroundWorkerId: string;
428
+ backgroundWorkerTaskId: string;
429
+ };
382
430
  run: {
383
431
  id: string;
384
- createdAt: Date;
385
- tags: string[];
386
432
  payload: string;
387
433
  payloadType: string;
388
- version?: string | undefined;
434
+ tags: string[];
435
+ createdAt: Date;
389
436
  startedAt?: Date | undefined;
437
+ context?: any;
390
438
  isTest?: boolean | undefined;
391
439
  idempotencyKey?: string | undefined;
392
- context?: any;
393
440
  maxAttempts?: number | undefined;
394
441
  durationMs?: number | undefined;
395
442
  costInCents?: number | undefined;
396
443
  baseCostInCents?: number | undefined;
444
+ version?: string | undefined;
397
445
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
398
446
  maxDuration?: number | undefined;
399
447
  };
400
- attempt: {
401
- number: number;
402
- status: string;
448
+ queue: {
449
+ name: string;
403
450
  id: string;
404
- startedAt: Date;
405
- backgroundWorkerId: string;
406
- backgroundWorkerTaskId: string;
407
451
  };
408
- queue: {
452
+ environment: {
453
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
454
+ id: string;
455
+ slug: string;
456
+ };
457
+ organization: {
458
+ name: string;
459
+ id: string;
460
+ slug: string;
461
+ };
462
+ project: {
409
463
  name: string;
410
464
  id: string;
465
+ slug: string;
466
+ ref: string;
411
467
  };
468
+ batch?: {
469
+ id: string;
470
+ } | undefined;
412
471
  machine?: {
413
472
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
414
473
  cpu: number;
415
474
  memory: number;
416
475
  centsPerMs: number;
417
476
  } | undefined;
418
- batch?: {
419
- id: string;
420
- } | undefined;
421
477
  };
422
478
  traceContext: Record<string, unknown>;
423
479
  environment?: Record<string, string> | undefined;
480
+ metrics?: {
481
+ name: string;
482
+ event: string;
483
+ timestamp: number;
484
+ duration: number;
485
+ }[] | undefined;
424
486
  }>;
425
487
  export type TaskRunExecutionPayload = z.infer<typeof TaskRunExecutionPayload>;
426
488
  export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<{
@@ -478,36 +540,36 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
478
540
  maxDuration: z.ZodOptional<z.ZodNumber>;
479
541
  }, "strip", z.ZodTypeAny, {
480
542
  id: string;
481
- createdAt: Date;
482
543
  startedAt: Date;
483
- isTest: boolean;
484
- tags: string[];
485
544
  payload: string;
486
545
  payloadType: string;
546
+ tags: string[];
547
+ isTest: boolean;
548
+ createdAt: Date;
487
549
  durationMs: number;
488
550
  costInCents: number;
489
551
  baseCostInCents: number;
490
- version?: string | undefined;
491
- idempotencyKey?: string | undefined;
492
552
  context?: any;
553
+ idempotencyKey?: string | undefined;
493
554
  maxAttempts?: number | undefined;
555
+ version?: string | undefined;
494
556
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
495
557
  maxDuration?: number | undefined;
496
558
  }, {
497
559
  id: string;
498
- createdAt: Date;
499
- tags: string[];
500
560
  payload: string;
501
561
  payloadType: string;
502
- version?: string | undefined;
562
+ tags: string[];
563
+ createdAt: Date;
503
564
  startedAt?: Date | undefined;
565
+ context?: any;
504
566
  isTest?: boolean | undefined;
505
567
  idempotencyKey?: string | undefined;
506
- context?: any;
507
568
  maxAttempts?: number | undefined;
508
569
  durationMs?: number | undefined;
509
570
  costInCents?: number | undefined;
510
571
  baseCostInCents?: number | undefined;
572
+ version?: string | undefined;
511
573
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
512
574
  maxDuration?: number | undefined;
513
575
  }>;
@@ -617,72 +679,41 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
617
679
  centsPerMs: number;
618
680
  }>>;
619
681
  }>, "strip", z.ZodTypeAny, {
620
- environment: {
621
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
622
- id: string;
623
- slug: string;
624
- };
625
- organization: {
626
- name: string;
627
- id: string;
628
- slug: string;
629
- };
630
- project: {
631
- name: string;
632
- id: string;
633
- slug: string;
634
- ref: string;
635
- };
636
682
  task: {
637
683
  id: string;
638
684
  filePath: string;
639
685
  exportName: string;
640
686
  };
687
+ attempt: {
688
+ number: number;
689
+ status: string;
690
+ id: string;
691
+ startedAt: Date;
692
+ backgroundWorkerId: string;
693
+ backgroundWorkerTaskId: string;
694
+ };
641
695
  run: {
642
696
  id: string;
643
- createdAt: Date;
644
697
  startedAt: Date;
645
- isTest: boolean;
646
- tags: string[];
647
698
  payload: string;
648
699
  payloadType: string;
700
+ tags: string[];
701
+ isTest: boolean;
702
+ createdAt: Date;
649
703
  durationMs: number;
650
704
  costInCents: number;
651
705
  baseCostInCents: number;
652
- version?: string | undefined;
653
- idempotencyKey?: string | undefined;
654
706
  context?: any;
707
+ idempotencyKey?: string | undefined;
655
708
  maxAttempts?: number | undefined;
709
+ version?: string | undefined;
656
710
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
657
711
  maxDuration?: number | undefined;
658
712
  };
659
- machine: {
660
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
661
- cpu: number;
662
- memory: number;
663
- centsPerMs: number;
664
- };
665
- attempt: {
666
- number: number;
667
- status: string;
668
- id: string;
669
- startedAt: Date;
670
- backgroundWorkerId: string;
671
- backgroundWorkerTaskId: string;
672
- };
673
713
  queue: {
674
714
  name: string;
675
715
  id: string;
676
716
  };
677
- worker: {
678
- id: string;
679
- version: string;
680
- contentHash: string;
681
- };
682
- batch?: {
683
- id: string;
684
- } | undefined;
685
- }, {
686
717
  environment: {
687
718
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
688
719
  id: string;
@@ -699,55 +730,86 @@ export declare const ProdTaskRunExecution: z.ZodObject<z.objectUtil.extendShape<
699
730
  slug: string;
700
731
  ref: string;
701
732
  };
733
+ machine: {
734
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
735
+ cpu: number;
736
+ memory: number;
737
+ centsPerMs: number;
738
+ };
739
+ worker: {
740
+ id: string;
741
+ version: string;
742
+ contentHash: string;
743
+ };
744
+ batch?: {
745
+ id: string;
746
+ } | undefined;
747
+ }, {
702
748
  task: {
703
749
  id: string;
704
750
  filePath: string;
705
751
  exportName: string;
706
752
  };
753
+ attempt: {
754
+ number: number;
755
+ status: string;
756
+ id: string;
757
+ startedAt: Date;
758
+ backgroundWorkerId: string;
759
+ backgroundWorkerTaskId: string;
760
+ };
707
761
  run: {
708
762
  id: string;
709
- createdAt: Date;
710
- tags: string[];
711
763
  payload: string;
712
764
  payloadType: string;
713
- version?: string | undefined;
765
+ tags: string[];
766
+ createdAt: Date;
714
767
  startedAt?: Date | undefined;
768
+ context?: any;
715
769
  isTest?: boolean | undefined;
716
770
  idempotencyKey?: string | undefined;
717
- context?: any;
718
771
  maxAttempts?: number | undefined;
719
772
  durationMs?: number | undefined;
720
773
  costInCents?: number | undefined;
721
774
  baseCostInCents?: number | undefined;
775
+ version?: string | undefined;
722
776
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
723
777
  maxDuration?: number | undefined;
724
778
  };
725
- attempt: {
726
- number: number;
727
- status: string;
779
+ queue: {
780
+ name: string;
728
781
  id: string;
729
- startedAt: Date;
730
- backgroundWorkerId: string;
731
- backgroundWorkerTaskId: string;
732
782
  };
733
- queue: {
783
+ environment: {
784
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
785
+ id: string;
786
+ slug: string;
787
+ };
788
+ organization: {
734
789
  name: string;
735
790
  id: string;
791
+ slug: string;
792
+ };
793
+ project: {
794
+ name: string;
795
+ id: string;
796
+ slug: string;
797
+ ref: string;
736
798
  };
737
799
  worker: {
738
800
  id: string;
739
801
  version: string;
740
802
  contentHash: string;
741
803
  };
804
+ batch?: {
805
+ id: string;
806
+ } | undefined;
742
807
  machine?: {
743
808
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
744
809
  cpu: number;
745
810
  memory: number;
746
811
  centsPerMs: number;
747
812
  } | undefined;
748
- batch?: {
749
- id: string;
750
- } | undefined;
751
813
  }>;
752
814
  export type ProdTaskRunExecution = z.infer<typeof ProdTaskRunExecution>;
753
815
  export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
@@ -806,36 +868,36 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
806
868
  maxDuration: z.ZodOptional<z.ZodNumber>;
807
869
  }, "strip", z.ZodTypeAny, {
808
870
  id: string;
809
- createdAt: Date;
810
871
  startedAt: Date;
811
- isTest: boolean;
812
- tags: string[];
813
872
  payload: string;
814
873
  payloadType: string;
874
+ tags: string[];
875
+ isTest: boolean;
876
+ createdAt: Date;
815
877
  durationMs: number;
816
878
  costInCents: number;
817
879
  baseCostInCents: number;
818
- version?: string | undefined;
819
- idempotencyKey?: string | undefined;
820
880
  context?: any;
881
+ idempotencyKey?: string | undefined;
821
882
  maxAttempts?: number | undefined;
883
+ version?: string | undefined;
822
884
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
823
885
  maxDuration?: number | undefined;
824
886
  }, {
825
887
  id: string;
826
- createdAt: Date;
827
- tags: string[];
828
888
  payload: string;
829
889
  payloadType: string;
830
- version?: string | undefined;
890
+ tags: string[];
891
+ createdAt: Date;
831
892
  startedAt?: Date | undefined;
893
+ context?: any;
832
894
  isTest?: boolean | undefined;
833
895
  idempotencyKey?: string | undefined;
834
- context?: any;
835
896
  maxAttempts?: number | undefined;
836
897
  durationMs?: number | undefined;
837
898
  costInCents?: number | undefined;
838
899
  baseCostInCents?: number | undefined;
900
+ version?: string | undefined;
839
901
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
840
902
  maxDuration?: number | undefined;
841
903
  }>;
@@ -945,51 +1007,11 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
945
1007
  centsPerMs: number;
946
1008
  }>>;
947
1009
  }>, "strip", z.ZodTypeAny, {
948
- environment: {
949
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
950
- id: string;
951
- slug: string;
952
- };
953
- organization: {
954
- name: string;
955
- id: string;
956
- slug: string;
957
- };
958
- project: {
959
- name: string;
960
- id: string;
961
- slug: string;
962
- ref: string;
963
- };
964
1010
  task: {
965
1011
  id: string;
966
1012
  filePath: string;
967
1013
  exportName: string;
968
1014
  };
969
- run: {
970
- id: string;
971
- createdAt: Date;
972
- startedAt: Date;
973
- isTest: boolean;
974
- tags: string[];
975
- payload: string;
976
- payloadType: string;
977
- durationMs: number;
978
- costInCents: number;
979
- baseCostInCents: number;
980
- version?: string | undefined;
981
- idempotencyKey?: string | undefined;
982
- context?: any;
983
- maxAttempts?: number | undefined;
984
- metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
985
- maxDuration?: number | undefined;
986
- };
987
- machine: {
988
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
989
- cpu: number;
990
- memory: number;
991
- centsPerMs: number;
992
- };
993
1015
  attempt: {
994
1016
  number: number;
995
1017
  status: string;
@@ -998,19 +1020,28 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
998
1020
  backgroundWorkerId: string;
999
1021
  backgroundWorkerTaskId: string;
1000
1022
  };
1023
+ run: {
1024
+ id: string;
1025
+ startedAt: Date;
1026
+ payload: string;
1027
+ payloadType: string;
1028
+ tags: string[];
1029
+ isTest: boolean;
1030
+ createdAt: Date;
1031
+ durationMs: number;
1032
+ costInCents: number;
1033
+ baseCostInCents: number;
1034
+ context?: any;
1035
+ idempotencyKey?: string | undefined;
1036
+ maxAttempts?: number | undefined;
1037
+ version?: string | undefined;
1038
+ metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1039
+ maxDuration?: number | undefined;
1040
+ };
1001
1041
  queue: {
1002
1042
  name: string;
1003
1043
  id: string;
1004
1044
  };
1005
- worker: {
1006
- id: string;
1007
- version: string;
1008
- contentHash: string;
1009
- };
1010
- batch?: {
1011
- id: string;
1012
- } | undefined;
1013
- }, {
1014
1045
  environment: {
1015
1046
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1016
1047
  id: string;
@@ -1027,130 +1058,142 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1027
1058
  slug: string;
1028
1059
  ref: string;
1029
1060
  };
1061
+ machine: {
1062
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1063
+ cpu: number;
1064
+ memory: number;
1065
+ centsPerMs: number;
1066
+ };
1067
+ worker: {
1068
+ id: string;
1069
+ version: string;
1070
+ contentHash: string;
1071
+ };
1072
+ batch?: {
1073
+ id: string;
1074
+ } | undefined;
1075
+ }, {
1030
1076
  task: {
1031
1077
  id: string;
1032
1078
  filePath: string;
1033
1079
  exportName: string;
1034
1080
  };
1081
+ attempt: {
1082
+ number: number;
1083
+ status: string;
1084
+ id: string;
1085
+ startedAt: Date;
1086
+ backgroundWorkerId: string;
1087
+ backgroundWorkerTaskId: string;
1088
+ };
1035
1089
  run: {
1036
1090
  id: string;
1037
- createdAt: Date;
1038
- tags: string[];
1039
1091
  payload: string;
1040
1092
  payloadType: string;
1041
- version?: string | undefined;
1093
+ tags: string[];
1094
+ createdAt: Date;
1042
1095
  startedAt?: Date | undefined;
1096
+ context?: any;
1043
1097
  isTest?: boolean | undefined;
1044
1098
  idempotencyKey?: string | undefined;
1045
- context?: any;
1046
1099
  maxAttempts?: number | undefined;
1047
1100
  durationMs?: number | undefined;
1048
1101
  costInCents?: number | undefined;
1049
1102
  baseCostInCents?: number | undefined;
1103
+ version?: string | undefined;
1050
1104
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1051
1105
  maxDuration?: number | undefined;
1052
1106
  };
1053
- attempt: {
1054
- number: number;
1055
- status: string;
1107
+ queue: {
1108
+ name: string;
1056
1109
  id: string;
1057
- startedAt: Date;
1058
- backgroundWorkerId: string;
1059
- backgroundWorkerTaskId: string;
1060
1110
  };
1061
- queue: {
1111
+ environment: {
1112
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1113
+ id: string;
1114
+ slug: string;
1115
+ };
1116
+ organization: {
1117
+ name: string;
1118
+ id: string;
1119
+ slug: string;
1120
+ };
1121
+ project: {
1062
1122
  name: string;
1063
1123
  id: string;
1124
+ slug: string;
1125
+ ref: string;
1064
1126
  };
1065
1127
  worker: {
1066
1128
  id: string;
1067
1129
  version: string;
1068
1130
  contentHash: string;
1069
1131
  };
1132
+ batch?: {
1133
+ id: string;
1134
+ } | undefined;
1070
1135
  machine?: {
1071
1136
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1072
1137
  cpu: number;
1073
1138
  memory: number;
1074
1139
  centsPerMs: number;
1075
1140
  } | undefined;
1076
- batch?: {
1077
- id: string;
1078
- } | undefined;
1079
1141
  }>;
1080
1142
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1081
1143
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
1144
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
1145
+ name: z.ZodString;
1146
+ event: z.ZodString;
1147
+ timestamp: z.ZodNumber;
1148
+ duration: z.ZodNumber;
1149
+ }, "strip", z.ZodTypeAny, {
1150
+ name: string;
1151
+ event: string;
1152
+ timestamp: number;
1153
+ duration: number;
1154
+ }, {
1155
+ name: string;
1156
+ event: string;
1157
+ timestamp: number;
1158
+ duration: number;
1159
+ }>, "many">>;
1082
1160
  }, "strip", z.ZodTypeAny, {
1083
1161
  execution: {
1084
- environment: {
1085
- type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1086
- id: string;
1087
- slug: string;
1088
- };
1089
- organization: {
1090
- name: string;
1091
- id: string;
1092
- slug: string;
1093
- };
1094
- project: {
1095
- name: string;
1096
- id: string;
1097
- slug: string;
1098
- ref: string;
1099
- };
1100
1162
  task: {
1101
1163
  id: string;
1102
1164
  filePath: string;
1103
1165
  exportName: string;
1104
1166
  };
1167
+ attempt: {
1168
+ number: number;
1169
+ status: string;
1170
+ id: string;
1171
+ startedAt: Date;
1172
+ backgroundWorkerId: string;
1173
+ backgroundWorkerTaskId: string;
1174
+ };
1105
1175
  run: {
1106
1176
  id: string;
1107
- createdAt: Date;
1108
1177
  startedAt: Date;
1109
- isTest: boolean;
1110
- tags: string[];
1111
1178
  payload: string;
1112
1179
  payloadType: string;
1180
+ tags: string[];
1181
+ isTest: boolean;
1182
+ createdAt: Date;
1113
1183
  durationMs: number;
1114
1184
  costInCents: number;
1115
1185
  baseCostInCents: number;
1116
- version?: string | undefined;
1117
- idempotencyKey?: string | undefined;
1118
1186
  context?: any;
1187
+ idempotencyKey?: string | undefined;
1119
1188
  maxAttempts?: number | undefined;
1189
+ version?: string | undefined;
1120
1190
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1121
1191
  maxDuration?: number | undefined;
1122
1192
  };
1123
- machine: {
1124
- name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1125
- cpu: number;
1126
- memory: number;
1127
- centsPerMs: number;
1128
- };
1129
- attempt: {
1130
- number: number;
1131
- status: string;
1132
- id: string;
1133
- startedAt: Date;
1134
- backgroundWorkerId: string;
1135
- backgroundWorkerTaskId: string;
1136
- };
1137
1193
  queue: {
1138
1194
  name: string;
1139
1195
  id: string;
1140
1196
  };
1141
- worker: {
1142
- id: string;
1143
- version: string;
1144
- contentHash: string;
1145
- };
1146
- batch?: {
1147
- id: string;
1148
- } | undefined;
1149
- };
1150
- traceContext: Record<string, unknown>;
1151
- environment?: Record<string, string> | undefined;
1152
- }, {
1153
- execution: {
1154
1197
  environment: {
1155
1198
  type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1156
1199
  id: string;
@@ -1167,58 +1210,105 @@ export declare const ProdTaskRunExecutionPayload: z.ZodObject<{
1167
1210
  slug: string;
1168
1211
  ref: string;
1169
1212
  };
1213
+ machine: {
1214
+ name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1215
+ cpu: number;
1216
+ memory: number;
1217
+ centsPerMs: number;
1218
+ };
1219
+ worker: {
1220
+ id: string;
1221
+ version: string;
1222
+ contentHash: string;
1223
+ };
1224
+ batch?: {
1225
+ id: string;
1226
+ } | undefined;
1227
+ };
1228
+ traceContext: Record<string, unknown>;
1229
+ environment?: Record<string, string> | undefined;
1230
+ metrics?: {
1231
+ name: string;
1232
+ event: string;
1233
+ timestamp: number;
1234
+ duration: number;
1235
+ }[] | undefined;
1236
+ }, {
1237
+ execution: {
1170
1238
  task: {
1171
1239
  id: string;
1172
1240
  filePath: string;
1173
1241
  exportName: string;
1174
1242
  };
1243
+ attempt: {
1244
+ number: number;
1245
+ status: string;
1246
+ id: string;
1247
+ startedAt: Date;
1248
+ backgroundWorkerId: string;
1249
+ backgroundWorkerTaskId: string;
1250
+ };
1175
1251
  run: {
1176
1252
  id: string;
1177
- createdAt: Date;
1178
- tags: string[];
1179
1253
  payload: string;
1180
1254
  payloadType: string;
1181
- version?: string | undefined;
1255
+ tags: string[];
1256
+ createdAt: Date;
1182
1257
  startedAt?: Date | undefined;
1258
+ context?: any;
1183
1259
  isTest?: boolean | undefined;
1184
1260
  idempotencyKey?: string | undefined;
1185
- context?: any;
1186
1261
  maxAttempts?: number | undefined;
1187
1262
  durationMs?: number | undefined;
1188
1263
  costInCents?: number | undefined;
1189
1264
  baseCostInCents?: number | undefined;
1265
+ version?: string | undefined;
1190
1266
  metadata?: Record<string, import("../../index.js").DeserializedJson> | undefined;
1191
1267
  maxDuration?: number | undefined;
1192
1268
  };
1193
- attempt: {
1194
- number: number;
1195
- status: string;
1269
+ queue: {
1270
+ name: string;
1196
1271
  id: string;
1197
- startedAt: Date;
1198
- backgroundWorkerId: string;
1199
- backgroundWorkerTaskId: string;
1200
1272
  };
1201
- queue: {
1273
+ environment: {
1274
+ type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
1275
+ id: string;
1276
+ slug: string;
1277
+ };
1278
+ organization: {
1202
1279
  name: string;
1203
1280
  id: string;
1281
+ slug: string;
1282
+ };
1283
+ project: {
1284
+ name: string;
1285
+ id: string;
1286
+ slug: string;
1287
+ ref: string;
1204
1288
  };
1205
1289
  worker: {
1206
1290
  id: string;
1207
1291
  version: string;
1208
1292
  contentHash: string;
1209
1293
  };
1294
+ batch?: {
1295
+ id: string;
1296
+ } | undefined;
1210
1297
  machine?: {
1211
1298
  name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
1212
1299
  cpu: number;
1213
1300
  memory: number;
1214
1301
  centsPerMs: number;
1215
1302
  } | undefined;
1216
- batch?: {
1217
- id: string;
1218
- } | undefined;
1219
1303
  };
1220
1304
  traceContext: Record<string, unknown>;
1221
1305
  environment?: Record<string, string> | undefined;
1306
+ metrics?: {
1307
+ name: string;
1308
+ event: string;
1309
+ timestamp: number;
1310
+ duration: number;
1311
+ }[] | undefined;
1222
1312
  }>;
1223
1313
  export type ProdTaskRunExecutionPayload = z.infer<typeof ProdTaskRunExecutionPayload>;
1224
1314
  export declare const FixedWindowRateLimit: z.ZodObject<{
@@ -1595,12 +1685,12 @@ export declare const TaskMetadata: z.ZodObject<{
1595
1685
  memory: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>;
1596
1686
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1597
1687
  }, "strip", z.ZodTypeAny, {
1598
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1599
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1688
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1689
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1600
1690
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1601
1691
  }, {
1602
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1603
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1692
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1693
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1604
1694
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1605
1695
  }>>;
1606
1696
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -1617,17 +1707,17 @@ export declare const TaskMetadata: z.ZodObject<{
1617
1707
  maxDuration: z.ZodOptional<z.ZodNumber>;
1618
1708
  }, "strip", z.ZodTypeAny, {
1619
1709
  id: string;
1620
- triggerSource?: string | undefined;
1621
- machine?: {
1622
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1623
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1624
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1625
- } | undefined;
1626
1710
  maxDuration?: number | undefined;
1627
1711
  queue?: {
1628
1712
  name?: string | undefined;
1629
1713
  concurrencyLimit?: number | null | undefined;
1630
1714
  } | undefined;
1715
+ machine?: {
1716
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1717
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1718
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1719
+ } | undefined;
1720
+ description?: string | undefined;
1631
1721
  retry?: {
1632
1722
  maxAttempts?: number | undefined;
1633
1723
  factor?: number | undefined;
@@ -1638,24 +1728,24 @@ export declare const TaskMetadata: z.ZodObject<{
1638
1728
  machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1639
1729
  } | undefined;
1640
1730
  } | undefined;
1641
- description?: string | undefined;
1731
+ triggerSource?: string | undefined;
1642
1732
  schedule?: {
1643
1733
  cron: string;
1644
1734
  timezone: string;
1645
1735
  } | undefined;
1646
1736
  }, {
1647
1737
  id: string;
1648
- triggerSource?: string | undefined;
1649
- machine?: {
1650
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1651
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1652
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1653
- } | undefined;
1654
1738
  maxDuration?: number | undefined;
1655
1739
  queue?: {
1656
1740
  name?: string | undefined;
1657
1741
  concurrencyLimit?: number | null | undefined;
1658
1742
  } | undefined;
1743
+ machine?: {
1744
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1745
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1746
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1747
+ } | undefined;
1748
+ description?: string | undefined;
1659
1749
  retry?: {
1660
1750
  maxAttempts?: number | undefined;
1661
1751
  factor?: number | undefined;
@@ -1666,7 +1756,7 @@ export declare const TaskMetadata: z.ZodObject<{
1666
1756
  machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1667
1757
  } | undefined;
1668
1758
  } | undefined;
1669
- description?: string | undefined;
1759
+ triggerSource?: string | undefined;
1670
1760
  schedule?: {
1671
1761
  cron: string;
1672
1762
  timezone: string;
@@ -1800,12 +1890,12 @@ export declare const TaskManifest: z.ZodObject<{
1800
1890
  memory: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>;
1801
1891
  preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
1802
1892
  }, "strip", z.ZodTypeAny, {
1803
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1804
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1893
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1894
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1805
1895
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1806
1896
  }, {
1807
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1808
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1897
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1898
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1809
1899
  preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1810
1900
  }>>;
1811
1901
  triggerSource: z.ZodOptional<z.ZodString>;
@@ -1825,17 +1915,17 @@ export declare const TaskManifest: z.ZodObject<{
1825
1915
  filePath: string;
1826
1916
  exportName: string;
1827
1917
  entryPoint: string;
1828
- triggerSource?: string | undefined;
1829
- machine?: {
1830
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1831
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1832
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1833
- } | undefined;
1834
1918
  maxDuration?: number | undefined;
1835
1919
  queue?: {
1836
1920
  name?: string | undefined;
1837
1921
  concurrencyLimit?: number | null | undefined;
1838
1922
  } | undefined;
1923
+ machine?: {
1924
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1925
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1926
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1927
+ } | undefined;
1928
+ description?: string | undefined;
1839
1929
  retry?: {
1840
1930
  maxAttempts?: number | undefined;
1841
1931
  factor?: number | undefined;
@@ -1846,7 +1936,7 @@ export declare const TaskManifest: z.ZodObject<{
1846
1936
  machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1847
1937
  } | undefined;
1848
1938
  } | undefined;
1849
- description?: string | undefined;
1939
+ triggerSource?: string | undefined;
1850
1940
  schedule?: {
1851
1941
  cron: string;
1852
1942
  timezone: string;
@@ -1856,17 +1946,17 @@ export declare const TaskManifest: z.ZodObject<{
1856
1946
  filePath: string;
1857
1947
  exportName: string;
1858
1948
  entryPoint: string;
1859
- triggerSource?: string | undefined;
1860
- machine?: {
1861
- cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
1862
- memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
1863
- preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1864
- } | undefined;
1865
1949
  maxDuration?: number | undefined;
1866
1950
  queue?: {
1867
1951
  name?: string | undefined;
1868
1952
  concurrencyLimit?: number | null | undefined;
1869
1953
  } | undefined;
1954
+ machine?: {
1955
+ cpu?: 4 | 2 | 1 | 0.25 | 0.5 | undefined;
1956
+ memory?: 4 | 2 | 1 | 0.25 | 0.5 | 8 | undefined;
1957
+ preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1958
+ } | undefined;
1959
+ description?: string | undefined;
1870
1960
  retry?: {
1871
1961
  maxAttempts?: number | undefined;
1872
1962
  factor?: number | undefined;
@@ -1877,7 +1967,7 @@ export declare const TaskManifest: z.ZodObject<{
1877
1967
  machine?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
1878
1968
  } | undefined;
1879
1969
  } | undefined;
1880
- description?: string | undefined;
1970
+ triggerSource?: string | undefined;
1881
1971
  schedule?: {
1882
1972
  cron: string;
1883
1973
  timezone: string;
@@ -2039,12 +2129,34 @@ export declare const TaskRunExecutionLazyAttemptPayload: z.ZodObject<{
2039
2129
  isTest: z.ZodBoolean;
2040
2130
  traceContext: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2041
2131
  environment: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
2132
+ metrics: z.ZodOptional<z.ZodArray<z.ZodObject<{
2133
+ name: z.ZodString;
2134
+ event: z.ZodString;
2135
+ timestamp: z.ZodNumber;
2136
+ duration: z.ZodNumber;
2137
+ }, "strip", z.ZodTypeAny, {
2138
+ name: string;
2139
+ event: string;
2140
+ timestamp: number;
2141
+ duration: number;
2142
+ }, {
2143
+ name: string;
2144
+ event: string;
2145
+ timestamp: number;
2146
+ duration: number;
2147
+ }>, "many">>;
2042
2148
  }, "strip", z.ZodTypeAny, {
2043
2149
  isTest: boolean;
2044
2150
  traceContext: Record<string, unknown>;
2045
2151
  runId: string;
2046
2152
  messageId: string;
2047
2153
  environment?: Record<string, string> | undefined;
2154
+ metrics?: {
2155
+ name: string;
2156
+ event: string;
2157
+ timestamp: number;
2158
+ duration: number;
2159
+ }[] | undefined;
2048
2160
  attemptCount?: number | undefined;
2049
2161
  }, {
2050
2162
  isTest: boolean;
@@ -2052,6 +2164,27 @@ export declare const TaskRunExecutionLazyAttemptPayload: z.ZodObject<{
2052
2164
  runId: string;
2053
2165
  messageId: string;
2054
2166
  environment?: Record<string, string> | undefined;
2167
+ metrics?: {
2168
+ name: string;
2169
+ event: string;
2170
+ timestamp: number;
2171
+ duration: number;
2172
+ }[] | undefined;
2055
2173
  attemptCount?: number | undefined;
2056
2174
  }>;
2057
2175
  export type TaskRunExecutionLazyAttemptPayload = z.infer<typeof TaskRunExecutionLazyAttemptPayload>;
2176
+ export declare const ManualCheckpointMetadata: z.ZodObject<{
2177
+ /** NOT a friendly ID */
2178
+ attemptId: z.ZodString;
2179
+ previousRunStatus: z.ZodString;
2180
+ previousAttemptStatus: z.ZodString;
2181
+ }, "strip", z.ZodTypeAny, {
2182
+ attemptId: string;
2183
+ previousRunStatus: string;
2184
+ previousAttemptStatus: string;
2185
+ }, {
2186
+ attemptId: string;
2187
+ previousRunStatus: string;
2188
+ previousAttemptStatus: string;
2189
+ }>;
2190
+ export type ManualCheckpointMetadata = z.infer<typeof ManualCheckpointMetadata>;