@trigger.dev/core 0.0.0-prerelease-20240603154820 → 0.0.0-prerelease-20240718194312
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/api-Pl9fxB8v.d.mts +13879 -0
- package/dist/api-sNoooMbT.d.ts +13879 -0
- package/dist/{catalog-dRKTgwQ7.d.ts → catalog-H7yFiZ60.d.mts} +52 -52
- package/dist/{catalog-XTlJQaMn.d.mts → catalog-h79CG5Wy.d.ts} +52 -52
- package/dist/{manager-JkbddlcO.d.mts → common-CLW82lkt.d.mts} +280 -16
- package/dist/{manager-JkbddlcO.d.ts → common-CLW82lkt.d.ts} +280 -16
- package/dist/{eventFilterMatches-2kHImluE.d.mts → eventFilter-66NaBAMi.d.mts} +1 -3
- package/dist/{eventFilterMatches-2kHImluE.d.ts → eventFilter-66NaBAMi.d.ts} +1 -3
- package/dist/eventFilterMatches.d.mts +6 -0
- package/dist/eventFilterMatches.d.ts +6 -0
- package/dist/eventFilterMatches.js +165 -0
- package/dist/eventFilterMatches.js.map +1 -0
- package/dist/eventFilterMatches.mjs +163 -0
- package/dist/eventFilterMatches.mjs.map +1 -0
- package/dist/index.d.mts +14 -16716
- package/dist/index.d.ts +14 -16716
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1 -1
- package/dist/index.mjs.map +1 -1
- package/dist/json-DBPEJQRe.d.mts +16 -0
- package/dist/json-DBPEJQRe.d.ts +16 -0
- package/dist/manager-KvCabW1a.d.mts +18 -0
- package/dist/manager-OBA35PzR.d.ts +18 -0
- package/dist/{messages-6_-q72KG.d.mts → messages-JvHJ83wv.d.mts} +2978 -291
- package/dist/{messages-6_-q72KG.d.ts → messages-JvHJ83wv.d.ts} +2978 -291
- package/dist/replacements.d.mts +22 -0
- package/dist/replacements.d.ts +22 -0
- package/dist/replacements.js +33 -0
- package/dist/replacements.js.map +1 -0
- package/dist/replacements.mjs +28 -0
- package/dist/replacements.mjs.map +1 -0
- package/dist/requestFilter-HNZQEpQb.d.ts +180 -0
- package/dist/requestFilter-b5W2_1oP.d.mts +180 -0
- package/dist/requestFilterMatches.d.mts +13 -0
- package/dist/requestFilterMatches.d.ts +13 -0
- package/dist/requestFilterMatches.js +238 -0
- package/dist/requestFilterMatches.js.map +1 -0
- package/dist/requestFilterMatches.mjs +235 -0
- package/dist/requestFilterMatches.mjs.map +1 -0
- package/dist/retry.d.mts +10 -0
- package/dist/retry.d.ts +10 -0
- package/dist/retry.js +100 -0
- package/dist/retry.js.map +1 -0
- package/dist/retry.mjs +97 -0
- package/dist/retry.mjs.map +1 -0
- package/dist/schemas/index.d.mts +2611 -0
- package/dist/schemas/index.d.ts +2611 -0
- package/dist/schemas/index.js +1630 -0
- package/dist/schemas/index.js.map +1 -0
- package/dist/schemas/index.mjs +1463 -0
- package/dist/schemas/index.mjs.map +1 -0
- package/dist/{schemas-r4ZP9S-F.d.mts → schemas-C9ssfehv.d.mts} +270 -33
- package/dist/{schemas-r4ZP9S-F.d.ts → schemas-C9ssfehv.d.ts} +270 -33
- package/dist/taskLogger-CzADe4je.d.ts +33 -0
- package/dist/taskLogger-r_AFTX45.d.mts +33 -0
- package/dist/tracer-N0p2Fuuv.d.mts +23 -0
- package/dist/tracer-N0p2Fuuv.d.ts +23 -0
- package/dist/types.d.mts +11 -0
- package/dist/types.d.ts +11 -0
- package/dist/types.js +4 -0
- package/dist/types.js.map +1 -0
- package/dist/types.mjs +3 -0
- package/dist/types.mjs.map +1 -0
- package/dist/utils.d.mts +7 -0
- package/dist/utils.d.ts +7 -0
- package/dist/utils.js +33 -0
- package/dist/utils.js.map +1 -0
- package/dist/utils.mjs +30 -0
- package/dist/utils.mjs.map +1 -0
- package/dist/v3/dev/index.d.mts +2 -1
- package/dist/v3/dev/index.d.ts +2 -1
- package/dist/v3/dev/index.js.map +1 -1
- package/dist/v3/dev/index.mjs.map +1 -1
- package/dist/v3/errors.d.mts +39 -0
- package/dist/v3/errors.d.ts +39 -0
- package/dist/v3/errors.js +204 -0
- package/dist/v3/errors.js.map +1 -0
- package/dist/v3/errors.mjs +195 -0
- package/dist/v3/errors.mjs.map +1 -0
- package/dist/v3/index.d.mts +143 -4720
- package/dist/v3/index.d.ts +143 -4720
- package/dist/v3/index.js +837 -624
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +824 -624
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/logger-api.d.mts +24 -0
- package/dist/v3/logger-api.d.ts +24 -0
- package/dist/v3/logger-api.js +118 -0
- package/dist/v3/logger-api.js.map +1 -0
- package/dist/v3/logger-api.mjs +116 -0
- package/dist/v3/logger-api.mjs.map +1 -0
- package/dist/v3/otel/index.js +36 -12
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +36 -12
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.d.mts +4 -3
- package/dist/v3/prod/index.d.ts +4 -3
- package/dist/v3/prod/index.js +7 -131
- package/dist/v3/prod/index.js.map +1 -1
- package/dist/v3/prod/index.mjs +7 -131
- package/dist/v3/prod/index.mjs.map +1 -1
- package/dist/v3/schemas/index.d.mts +4741 -0
- package/dist/v3/schemas/index.d.ts +4741 -0
- package/dist/v3/schemas/index.js +2039 -0
- package/dist/v3/schemas/index.js.map +1 -0
- package/dist/v3/schemas/index.mjs +1900 -0
- package/dist/v3/schemas/index.mjs.map +1 -0
- package/dist/v3/semanticInternalAttributes.d.mts +56 -0
- package/dist/v3/semanticInternalAttributes.d.ts +56 -0
- package/dist/v3/semanticInternalAttributes.js +61 -0
- package/dist/v3/semanticInternalAttributes.js.map +1 -0
- package/dist/v3/semanticInternalAttributes.mjs +59 -0
- package/dist/v3/semanticInternalAttributes.mjs.map +1 -0
- package/dist/v3/utils/durations.d.mts +15 -0
- package/dist/v3/utils/durations.d.ts +15 -0
- package/dist/v3/utils/durations.js +93 -0
- package/dist/v3/utils/durations.js.map +1 -0
- package/dist/v3/utils/durations.mjs +82 -0
- package/dist/v3/utils/durations.mjs.map +1 -0
- package/dist/v3/utils/flattenAttributes.d.mts +8 -0
- package/dist/v3/utils/flattenAttributes.d.ts +8 -0
- package/dist/v3/utils/flattenAttributes.js +131 -0
- package/dist/v3/utils/flattenAttributes.js.map +1 -0
- package/dist/v3/utils/flattenAttributes.mjs +126 -0
- package/dist/v3/utils/flattenAttributes.mjs.map +1 -0
- package/dist/v3/utils/ioSerialization.d.mts +21 -0
- package/dist/v3/utils/ioSerialization.d.ts +21 -0
- package/dist/v3/utils/ioSerialization.js +2367 -0
- package/dist/v3/utils/ioSerialization.js.map +1 -0
- package/dist/v3/utils/ioSerialization.mjs +2358 -0
- package/dist/v3/utils/ioSerialization.mjs.map +1 -0
- package/dist/v3/utils/omit.d.mts +3 -0
- package/dist/v3/utils/omit.d.ts +3 -0
- package/dist/v3/utils/omit.js +20 -0
- package/dist/v3/utils/omit.js.map +1 -0
- package/dist/v3/utils/omit.mjs +18 -0
- package/dist/v3/utils/omit.mjs.map +1 -0
- package/dist/v3/utils/retries.d.mts +46 -0
- package/dist/v3/utils/retries.d.ts +46 -0
- package/dist/v3/utils/retries.js +118 -0
- package/dist/v3/utils/retries.js.map +1 -0
- package/dist/v3/utils/retries.mjs +113 -0
- package/dist/v3/utils/retries.mjs.map +1 -0
- package/dist/v3/utils/timers.d.mts +6 -0
- package/dist/v3/utils/timers.d.ts +6 -0
- package/dist/v3/utils/timers.js +31 -0
- package/dist/v3/utils/timers.js.map +1 -0
- package/dist/v3/utils/timers.mjs +28 -0
- package/dist/v3/utils/timers.mjs.map +1 -0
- package/dist/v3/workers/index.d.mts +56 -8
- package/dist/v3/workers/index.d.ts +56 -8
- package/dist/v3/workers/index.js +719 -279
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +717 -280
- package/dist/v3/workers/index.mjs.map +1 -1
- package/dist/v3/zodIpc.js.map +1 -1
- package/dist/v3/zodIpc.mjs.map +1 -1
- package/dist/v3/zodMessageHandler.d.mts +16 -3
- package/dist/v3/zodMessageHandler.d.ts +16 -3
- package/dist/v3/zodMessageHandler.js +77 -23
- package/dist/v3/zodMessageHandler.js.map +1 -1
- package/dist/v3/zodMessageHandler.mjs +77 -23
- package/dist/v3/zodMessageHandler.mjs.map +1 -1
- package/dist/v3/zodNamespace.js +59 -28
- package/dist/v3/zodNamespace.js.map +1 -1
- package/dist/v3/zodNamespace.mjs +60 -29
- package/dist/v3/zodNamespace.mjs.map +1 -1
- package/dist/v3/zodSocket.d.mts +8 -3
- package/dist/v3/zodSocket.d.ts +8 -3
- package/dist/v3/zodSocket.js +56 -25
- package/dist/v3/zodSocket.js.map +1 -1
- package/dist/v3/zodSocket.mjs +57 -26
- package/dist/v3/zodSocket.mjs.map +1 -1
- package/dist/v3/zodfetch.d.mts +15 -58
- package/dist/v3/zodfetch.d.ts +15 -58
- package/dist/v3/zodfetch.js +246 -156
- package/dist/v3/zodfetch.js.map +1 -1
- package/dist/v3/zodfetch.mjs +244 -149
- package/dist/v3/zodfetch.mjs.map +1 -1
- package/dist/versions.d.mts +11 -0
- package/dist/versions.d.ts +11 -0
- package/dist/versions.js +31 -0
- package/dist/versions.js.map +1 -0
- package/dist/versions.mjs +27 -0
- package/dist/versions.mjs.map +1 -0
- package/package.json +152 -8
|
@@ -1,5 +1,42 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const MachineCpu: z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>;
|
|
4
|
+
type MachineCpu = z.infer<typeof MachineCpu>;
|
|
5
|
+
declare const MachineMemory: z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>;
|
|
6
|
+
type MachineMemory = z.infer<typeof MachineMemory>;
|
|
7
|
+
declare const MachinePresetName: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
|
|
8
|
+
type MachinePresetName = z.infer<typeof MachinePresetName>;
|
|
9
|
+
declare const MachineConfig: z.ZodObject<{
|
|
10
|
+
cpu: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
|
|
11
|
+
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>]>>;
|
|
12
|
+
preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
|
|
13
|
+
}, "strip", z.ZodTypeAny, {
|
|
14
|
+
cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
|
|
15
|
+
memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
|
|
16
|
+
preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
|
|
17
|
+
}, {
|
|
18
|
+
cpu?: 2 | 1 | 4 | 0.25 | 0.5 | undefined;
|
|
19
|
+
memory?: 2 | 1 | 4 | 0.25 | 0.5 | 8 | undefined;
|
|
20
|
+
preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
|
|
21
|
+
}>;
|
|
22
|
+
type MachineConfig = z.infer<typeof MachineConfig>;
|
|
23
|
+
declare const MachinePreset: z.ZodObject<{
|
|
24
|
+
name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
|
|
25
|
+
cpu: z.ZodNumber;
|
|
26
|
+
memory: z.ZodNumber;
|
|
27
|
+
centsPerMs: z.ZodNumber;
|
|
28
|
+
}, "strip", z.ZodTypeAny, {
|
|
29
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
30
|
+
cpu: number;
|
|
31
|
+
memory: number;
|
|
32
|
+
centsPerMs: number;
|
|
33
|
+
}, {
|
|
34
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
35
|
+
cpu: number;
|
|
36
|
+
memory: number;
|
|
37
|
+
centsPerMs: number;
|
|
38
|
+
}>;
|
|
39
|
+
type MachinePreset = z.infer<typeof MachinePreset>;
|
|
3
40
|
declare const TaskRunBuiltInError: z.ZodObject<{
|
|
4
41
|
type: z.ZodLiteral<"BUILT_IN_ERROR">;
|
|
5
42
|
name: z.ZodString;
|
|
@@ -57,14 +94,17 @@ declare const TaskRunInternalError: z.ZodObject<{
|
|
|
57
94
|
type: z.ZodLiteral<"INTERNAL_ERROR">;
|
|
58
95
|
code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_PROCESS_SIGKILL_TIMEOUT", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT", "TASK_RUN_HEARTBEAT_TIMEOUT"]>;
|
|
59
96
|
message: z.ZodOptional<z.ZodString>;
|
|
97
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
60
98
|
}, "strip", z.ZodTypeAny, {
|
|
61
99
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
62
100
|
type: "INTERNAL_ERROR";
|
|
63
101
|
message?: string | undefined;
|
|
102
|
+
stackTrace?: string | undefined;
|
|
64
103
|
}, {
|
|
65
104
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
66
105
|
type: "INTERNAL_ERROR";
|
|
67
106
|
message?: string | undefined;
|
|
107
|
+
stackTrace?: string | undefined;
|
|
68
108
|
}>;
|
|
69
109
|
type TaskRunInternalError = z.infer<typeof TaskRunInternalError>;
|
|
70
110
|
declare const TaskRunError: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
@@ -104,14 +144,17 @@ declare const TaskRunError: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
|
104
144
|
type: z.ZodLiteral<"INTERNAL_ERROR">;
|
|
105
145
|
code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_PROCESS_SIGKILL_TIMEOUT", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT", "TASK_RUN_HEARTBEAT_TIMEOUT"]>;
|
|
106
146
|
message: z.ZodOptional<z.ZodString>;
|
|
147
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
107
148
|
}, "strip", z.ZodTypeAny, {
|
|
108
149
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
109
150
|
type: "INTERNAL_ERROR";
|
|
110
151
|
message?: string | undefined;
|
|
152
|
+
stackTrace?: string | undefined;
|
|
111
153
|
}, {
|
|
112
154
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
113
155
|
type: "INTERNAL_ERROR";
|
|
114
156
|
message?: string | undefined;
|
|
157
|
+
stackTrace?: string | undefined;
|
|
115
158
|
}>]>;
|
|
116
159
|
type TaskRunError = z.infer<typeof TaskRunError>;
|
|
117
160
|
declare const TaskRun: z.ZodObject<{
|
|
@@ -122,16 +165,26 @@ declare const TaskRun: z.ZodObject<{
|
|
|
122
165
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
123
166
|
isTest: z.ZodDefault<z.ZodBoolean>;
|
|
124
167
|
createdAt: z.ZodDate;
|
|
168
|
+
startedAt: z.ZodDefault<z.ZodDate>;
|
|
125
169
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
170
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
171
|
+
durationMs: z.ZodDefault<z.ZodNumber>;
|
|
172
|
+
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
173
|
+
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
126
174
|
}, "strip", z.ZodTypeAny, {
|
|
127
175
|
id: string;
|
|
176
|
+
startedAt: Date;
|
|
128
177
|
payload: string;
|
|
129
178
|
payloadType: string;
|
|
130
179
|
tags: string[];
|
|
131
180
|
isTest: boolean;
|
|
132
181
|
createdAt: Date;
|
|
182
|
+
durationMs: number;
|
|
183
|
+
costInCents: number;
|
|
184
|
+
baseCostInCents: number;
|
|
133
185
|
context?: any;
|
|
134
186
|
idempotencyKey?: string | undefined;
|
|
187
|
+
maxAttempts?: number | undefined;
|
|
135
188
|
}, {
|
|
136
189
|
id: string;
|
|
137
190
|
payload: string;
|
|
@@ -140,7 +193,12 @@ declare const TaskRun: z.ZodObject<{
|
|
|
140
193
|
createdAt: Date;
|
|
141
194
|
context?: any;
|
|
142
195
|
isTest?: boolean | undefined;
|
|
196
|
+
startedAt?: Date | undefined;
|
|
143
197
|
idempotencyKey?: string | undefined;
|
|
198
|
+
maxAttempts?: number | undefined;
|
|
199
|
+
durationMs?: number | undefined;
|
|
200
|
+
costInCents?: number | undefined;
|
|
201
|
+
baseCostInCents?: number | undefined;
|
|
144
202
|
}>;
|
|
145
203
|
type TaskRun = z.infer<typeof TaskRun>;
|
|
146
204
|
declare const TaskRunExecutionTask: z.ZodObject<{
|
|
@@ -287,16 +345,26 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
287
345
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
288
346
|
isTest: z.ZodDefault<z.ZodBoolean>;
|
|
289
347
|
createdAt: z.ZodDate;
|
|
348
|
+
startedAt: z.ZodDefault<z.ZodDate>;
|
|
290
349
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
350
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
351
|
+
durationMs: z.ZodDefault<z.ZodNumber>;
|
|
352
|
+
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
353
|
+
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
291
354
|
}, "strip", z.ZodTypeAny, {
|
|
292
355
|
id: string;
|
|
356
|
+
startedAt: Date;
|
|
293
357
|
payload: string;
|
|
294
358
|
payloadType: string;
|
|
295
359
|
tags: string[];
|
|
296
360
|
isTest: boolean;
|
|
297
361
|
createdAt: Date;
|
|
362
|
+
durationMs: number;
|
|
363
|
+
costInCents: number;
|
|
364
|
+
baseCostInCents: number;
|
|
298
365
|
context?: any;
|
|
299
366
|
idempotencyKey?: string | undefined;
|
|
367
|
+
maxAttempts?: number | undefined;
|
|
300
368
|
}, {
|
|
301
369
|
id: string;
|
|
302
370
|
payload: string;
|
|
@@ -305,7 +373,12 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
305
373
|
createdAt: Date;
|
|
306
374
|
context?: any;
|
|
307
375
|
isTest?: boolean | undefined;
|
|
376
|
+
startedAt?: Date | undefined;
|
|
308
377
|
idempotencyKey?: string | undefined;
|
|
378
|
+
maxAttempts?: number | undefined;
|
|
379
|
+
durationMs?: number | undefined;
|
|
380
|
+
costInCents?: number | undefined;
|
|
381
|
+
baseCostInCents?: number | undefined;
|
|
309
382
|
}>;
|
|
310
383
|
queue: z.ZodObject<{
|
|
311
384
|
id: z.ZodString;
|
|
@@ -366,6 +439,22 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
366
439
|
}, {
|
|
367
440
|
id: string;
|
|
368
441
|
}>>;
|
|
442
|
+
machine: z.ZodOptional<z.ZodObject<{
|
|
443
|
+
name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
|
|
444
|
+
cpu: z.ZodNumber;
|
|
445
|
+
memory: z.ZodNumber;
|
|
446
|
+
centsPerMs: z.ZodNumber;
|
|
447
|
+
}, "strip", z.ZodTypeAny, {
|
|
448
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
449
|
+
cpu: number;
|
|
450
|
+
memory: number;
|
|
451
|
+
centsPerMs: number;
|
|
452
|
+
}, {
|
|
453
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
454
|
+
cpu: number;
|
|
455
|
+
memory: number;
|
|
456
|
+
centsPerMs: number;
|
|
457
|
+
}>>;
|
|
369
458
|
}, "strip", z.ZodTypeAny, {
|
|
370
459
|
task: {
|
|
371
460
|
id: string;
|
|
@@ -382,13 +471,18 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
382
471
|
};
|
|
383
472
|
run: {
|
|
384
473
|
id: string;
|
|
474
|
+
startedAt: Date;
|
|
385
475
|
payload: string;
|
|
386
476
|
payloadType: string;
|
|
387
477
|
tags: string[];
|
|
388
478
|
isTest: boolean;
|
|
389
479
|
createdAt: Date;
|
|
480
|
+
durationMs: number;
|
|
481
|
+
costInCents: number;
|
|
482
|
+
baseCostInCents: number;
|
|
390
483
|
context?: any;
|
|
391
484
|
idempotencyKey?: string | undefined;
|
|
485
|
+
maxAttempts?: number | undefined;
|
|
392
486
|
};
|
|
393
487
|
queue: {
|
|
394
488
|
id: string;
|
|
@@ -413,6 +507,12 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
413
507
|
batch?: {
|
|
414
508
|
id: string;
|
|
415
509
|
} | undefined;
|
|
510
|
+
machine?: {
|
|
511
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
512
|
+
cpu: number;
|
|
513
|
+
memory: number;
|
|
514
|
+
centsPerMs: number;
|
|
515
|
+
} | undefined;
|
|
416
516
|
}, {
|
|
417
517
|
task: {
|
|
418
518
|
id: string;
|
|
@@ -435,7 +535,12 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
435
535
|
createdAt: Date;
|
|
436
536
|
context?: any;
|
|
437
537
|
isTest?: boolean | undefined;
|
|
538
|
+
startedAt?: Date | undefined;
|
|
438
539
|
idempotencyKey?: string | undefined;
|
|
540
|
+
maxAttempts?: number | undefined;
|
|
541
|
+
durationMs?: number | undefined;
|
|
542
|
+
costInCents?: number | undefined;
|
|
543
|
+
baseCostInCents?: number | undefined;
|
|
439
544
|
};
|
|
440
545
|
queue: {
|
|
441
546
|
id: string;
|
|
@@ -460,6 +565,12 @@ declare const TaskRunExecution: z.ZodObject<{
|
|
|
460
565
|
batch?: {
|
|
461
566
|
id: string;
|
|
462
567
|
} | undefined;
|
|
568
|
+
machine?: {
|
|
569
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
570
|
+
cpu: number;
|
|
571
|
+
memory: number;
|
|
572
|
+
centsPerMs: number;
|
|
573
|
+
} | undefined;
|
|
463
574
|
}>;
|
|
464
575
|
type TaskRunExecution = z.infer<typeof TaskRunExecution>;
|
|
465
576
|
declare const TaskRunContext: z.ZodObject<{
|
|
@@ -502,21 +613,36 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
502
613
|
tags: z.ZodArray<z.ZodString, "many">;
|
|
503
614
|
isTest: z.ZodDefault<z.ZodBoolean>;
|
|
504
615
|
createdAt: z.ZodDate;
|
|
616
|
+
startedAt: z.ZodDefault<z.ZodDate>;
|
|
505
617
|
idempotencyKey: z.ZodOptional<z.ZodString>;
|
|
618
|
+
maxAttempts: z.ZodOptional<z.ZodNumber>;
|
|
619
|
+
durationMs: z.ZodDefault<z.ZodNumber>;
|
|
620
|
+
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
621
|
+
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
506
622
|
}, "payload" | "payloadType">, "strip", z.ZodTypeAny, {
|
|
507
623
|
id: string;
|
|
624
|
+
startedAt: Date;
|
|
508
625
|
tags: string[];
|
|
509
626
|
isTest: boolean;
|
|
510
627
|
createdAt: Date;
|
|
628
|
+
durationMs: number;
|
|
629
|
+
costInCents: number;
|
|
630
|
+
baseCostInCents: number;
|
|
511
631
|
context?: any;
|
|
512
632
|
idempotencyKey?: string | undefined;
|
|
633
|
+
maxAttempts?: number | undefined;
|
|
513
634
|
}, {
|
|
514
635
|
id: string;
|
|
515
636
|
tags: string[];
|
|
516
637
|
createdAt: Date;
|
|
638
|
+
startedAt?: Date | undefined;
|
|
517
639
|
context?: any;
|
|
518
640
|
isTest?: boolean | undefined;
|
|
519
641
|
idempotencyKey?: string | undefined;
|
|
642
|
+
maxAttempts?: number | undefined;
|
|
643
|
+
durationMs?: number | undefined;
|
|
644
|
+
costInCents?: number | undefined;
|
|
645
|
+
baseCostInCents?: number | undefined;
|
|
520
646
|
}>;
|
|
521
647
|
queue: z.ZodObject<{
|
|
522
648
|
id: z.ZodString;
|
|
@@ -577,6 +703,22 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
577
703
|
}, {
|
|
578
704
|
id: string;
|
|
579
705
|
}>>;
|
|
706
|
+
machine: z.ZodOptional<z.ZodObject<{
|
|
707
|
+
name: z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>;
|
|
708
|
+
cpu: z.ZodNumber;
|
|
709
|
+
memory: z.ZodNumber;
|
|
710
|
+
centsPerMs: z.ZodNumber;
|
|
711
|
+
}, "strip", z.ZodTypeAny, {
|
|
712
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
713
|
+
cpu: number;
|
|
714
|
+
memory: number;
|
|
715
|
+
centsPerMs: number;
|
|
716
|
+
}, {
|
|
717
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
718
|
+
cpu: number;
|
|
719
|
+
memory: number;
|
|
720
|
+
centsPerMs: number;
|
|
721
|
+
}>>;
|
|
580
722
|
}, "strip", z.ZodTypeAny, {
|
|
581
723
|
task: {
|
|
582
724
|
id: string;
|
|
@@ -591,11 +733,16 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
591
733
|
};
|
|
592
734
|
run: {
|
|
593
735
|
id: string;
|
|
736
|
+
startedAt: Date;
|
|
594
737
|
tags: string[];
|
|
595
738
|
isTest: boolean;
|
|
596
739
|
createdAt: Date;
|
|
740
|
+
durationMs: number;
|
|
741
|
+
costInCents: number;
|
|
742
|
+
baseCostInCents: number;
|
|
597
743
|
context?: any;
|
|
598
744
|
idempotencyKey?: string | undefined;
|
|
745
|
+
maxAttempts?: number | undefined;
|
|
599
746
|
};
|
|
600
747
|
queue: {
|
|
601
748
|
id: string;
|
|
@@ -620,6 +767,12 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
620
767
|
batch?: {
|
|
621
768
|
id: string;
|
|
622
769
|
} | undefined;
|
|
770
|
+
machine?: {
|
|
771
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
772
|
+
cpu: number;
|
|
773
|
+
memory: number;
|
|
774
|
+
centsPerMs: number;
|
|
775
|
+
} | undefined;
|
|
623
776
|
}, {
|
|
624
777
|
task: {
|
|
625
778
|
id: string;
|
|
@@ -636,9 +789,14 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
636
789
|
id: string;
|
|
637
790
|
tags: string[];
|
|
638
791
|
createdAt: Date;
|
|
792
|
+
startedAt?: Date | undefined;
|
|
639
793
|
context?: any;
|
|
640
794
|
isTest?: boolean | undefined;
|
|
641
795
|
idempotencyKey?: string | undefined;
|
|
796
|
+
maxAttempts?: number | undefined;
|
|
797
|
+
durationMs?: number | undefined;
|
|
798
|
+
costInCents?: number | undefined;
|
|
799
|
+
baseCostInCents?: number | undefined;
|
|
642
800
|
};
|
|
643
801
|
queue: {
|
|
644
802
|
id: string;
|
|
@@ -663,6 +821,12 @@ declare const TaskRunContext: z.ZodObject<{
|
|
|
663
821
|
batch?: {
|
|
664
822
|
id: string;
|
|
665
823
|
} | undefined;
|
|
824
|
+
machine?: {
|
|
825
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
826
|
+
cpu: number;
|
|
827
|
+
memory: number;
|
|
828
|
+
centsPerMs: number;
|
|
829
|
+
} | undefined;
|
|
666
830
|
}>;
|
|
667
831
|
type TaskRunContext = z.infer<typeof TaskRunContext>;
|
|
668
832
|
declare const TaskRunExecutionRetry: z.ZodObject<{
|
|
@@ -679,6 +843,14 @@ declare const TaskRunExecutionRetry: z.ZodObject<{
|
|
|
679
843
|
error?: unknown;
|
|
680
844
|
}>;
|
|
681
845
|
type TaskRunExecutionRetry = z.infer<typeof TaskRunExecutionRetry>;
|
|
846
|
+
declare const TaskRunExecutionUsage: z.ZodObject<{
|
|
847
|
+
durationMs: z.ZodNumber;
|
|
848
|
+
}, "strip", z.ZodTypeAny, {
|
|
849
|
+
durationMs: number;
|
|
850
|
+
}, {
|
|
851
|
+
durationMs: number;
|
|
852
|
+
}>;
|
|
853
|
+
type TaskRunExecutionUsage = z.infer<typeof TaskRunExecutionUsage>;
|
|
682
854
|
declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
683
855
|
ok: z.ZodLiteral<false>;
|
|
684
856
|
id: z.ZodString;
|
|
@@ -719,14 +891,17 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
719
891
|
type: z.ZodLiteral<"INTERNAL_ERROR">;
|
|
720
892
|
code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_PROCESS_SIGKILL_TIMEOUT", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT", "TASK_RUN_HEARTBEAT_TIMEOUT"]>;
|
|
721
893
|
message: z.ZodOptional<z.ZodString>;
|
|
894
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
722
895
|
}, "strip", z.ZodTypeAny, {
|
|
723
896
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
724
897
|
type: "INTERNAL_ERROR";
|
|
725
898
|
message?: string | undefined;
|
|
899
|
+
stackTrace?: string | undefined;
|
|
726
900
|
}, {
|
|
727
901
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
728
902
|
type: "INTERNAL_ERROR";
|
|
729
903
|
message?: string | undefined;
|
|
904
|
+
stackTrace?: string | undefined;
|
|
730
905
|
}>]>;
|
|
731
906
|
retry: z.ZodOptional<z.ZodObject<{
|
|
732
907
|
timestamp: z.ZodNumber;
|
|
@@ -742,6 +917,13 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
742
917
|
error?: unknown;
|
|
743
918
|
}>>;
|
|
744
919
|
skippedRetrying: z.ZodOptional<z.ZodBoolean>;
|
|
920
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
921
|
+
durationMs: z.ZodNumber;
|
|
922
|
+
}, "strip", z.ZodTypeAny, {
|
|
923
|
+
durationMs: number;
|
|
924
|
+
}, {
|
|
925
|
+
durationMs: number;
|
|
926
|
+
}>>;
|
|
745
927
|
}, "strip", z.ZodTypeAny, {
|
|
746
928
|
error: {
|
|
747
929
|
message: string;
|
|
@@ -758,6 +940,7 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
758
940
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
759
941
|
type: "INTERNAL_ERROR";
|
|
760
942
|
message?: string | undefined;
|
|
943
|
+
stackTrace?: string | undefined;
|
|
761
944
|
};
|
|
762
945
|
id: string;
|
|
763
946
|
ok: false;
|
|
@@ -767,6 +950,9 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
767
950
|
error?: unknown;
|
|
768
951
|
} | undefined;
|
|
769
952
|
skippedRetrying?: boolean | undefined;
|
|
953
|
+
usage?: {
|
|
954
|
+
durationMs: number;
|
|
955
|
+
} | undefined;
|
|
770
956
|
}, {
|
|
771
957
|
error: {
|
|
772
958
|
message: string;
|
|
@@ -783,6 +969,7 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
783
969
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
784
970
|
type: "INTERNAL_ERROR";
|
|
785
971
|
message?: string | undefined;
|
|
972
|
+
stackTrace?: string | undefined;
|
|
786
973
|
};
|
|
787
974
|
id: string;
|
|
788
975
|
ok: false;
|
|
@@ -792,6 +979,9 @@ declare const TaskRunFailedExecutionResult: z.ZodObject<{
|
|
|
792
979
|
error?: unknown;
|
|
793
980
|
} | undefined;
|
|
794
981
|
skippedRetrying?: boolean | undefined;
|
|
982
|
+
usage?: {
|
|
983
|
+
durationMs: number;
|
|
984
|
+
} | undefined;
|
|
795
985
|
}>;
|
|
796
986
|
type TaskRunFailedExecutionResult = z.infer<typeof TaskRunFailedExecutionResult>;
|
|
797
987
|
declare const TaskRunSuccessfulExecutionResult: z.ZodObject<{
|
|
@@ -799,16 +989,29 @@ declare const TaskRunSuccessfulExecutionResult: z.ZodObject<{
|
|
|
799
989
|
id: z.ZodString;
|
|
800
990
|
output: z.ZodOptional<z.ZodString>;
|
|
801
991
|
outputType: z.ZodString;
|
|
992
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
993
|
+
durationMs: z.ZodNumber;
|
|
994
|
+
}, "strip", z.ZodTypeAny, {
|
|
995
|
+
durationMs: number;
|
|
996
|
+
}, {
|
|
997
|
+
durationMs: number;
|
|
998
|
+
}>>;
|
|
802
999
|
}, "strip", z.ZodTypeAny, {
|
|
803
1000
|
id: string;
|
|
804
1001
|
ok: true;
|
|
805
1002
|
outputType: string;
|
|
806
1003
|
output?: string | undefined;
|
|
1004
|
+
usage?: {
|
|
1005
|
+
durationMs: number;
|
|
1006
|
+
} | undefined;
|
|
807
1007
|
}, {
|
|
808
1008
|
id: string;
|
|
809
1009
|
ok: true;
|
|
810
1010
|
outputType: string;
|
|
811
1011
|
output?: string | undefined;
|
|
1012
|
+
usage?: {
|
|
1013
|
+
durationMs: number;
|
|
1014
|
+
} | undefined;
|
|
812
1015
|
}>;
|
|
813
1016
|
type TaskRunSuccessfulExecutionResult = z.infer<typeof TaskRunSuccessfulExecutionResult>;
|
|
814
1017
|
declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject<{
|
|
@@ -816,16 +1019,29 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
816
1019
|
id: z.ZodString;
|
|
817
1020
|
output: z.ZodOptional<z.ZodString>;
|
|
818
1021
|
outputType: z.ZodString;
|
|
1022
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1023
|
+
durationMs: z.ZodNumber;
|
|
1024
|
+
}, "strip", z.ZodTypeAny, {
|
|
1025
|
+
durationMs: number;
|
|
1026
|
+
}, {
|
|
1027
|
+
durationMs: number;
|
|
1028
|
+
}>>;
|
|
819
1029
|
}, "strip", z.ZodTypeAny, {
|
|
820
1030
|
id: string;
|
|
821
1031
|
ok: true;
|
|
822
1032
|
outputType: string;
|
|
823
1033
|
output?: string | undefined;
|
|
1034
|
+
usage?: {
|
|
1035
|
+
durationMs: number;
|
|
1036
|
+
} | undefined;
|
|
824
1037
|
}, {
|
|
825
1038
|
id: string;
|
|
826
1039
|
ok: true;
|
|
827
1040
|
outputType: string;
|
|
828
1041
|
output?: string | undefined;
|
|
1042
|
+
usage?: {
|
|
1043
|
+
durationMs: number;
|
|
1044
|
+
} | undefined;
|
|
829
1045
|
}>, z.ZodObject<{
|
|
830
1046
|
ok: z.ZodLiteral<false>;
|
|
831
1047
|
id: z.ZodString;
|
|
@@ -866,14 +1082,17 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
866
1082
|
type: z.ZodLiteral<"INTERNAL_ERROR">;
|
|
867
1083
|
code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_PROCESS_SIGKILL_TIMEOUT", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT", "TASK_RUN_HEARTBEAT_TIMEOUT"]>;
|
|
868
1084
|
message: z.ZodOptional<z.ZodString>;
|
|
1085
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
869
1086
|
}, "strip", z.ZodTypeAny, {
|
|
870
1087
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
871
1088
|
type: "INTERNAL_ERROR";
|
|
872
1089
|
message?: string | undefined;
|
|
1090
|
+
stackTrace?: string | undefined;
|
|
873
1091
|
}, {
|
|
874
1092
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
875
1093
|
type: "INTERNAL_ERROR";
|
|
876
1094
|
message?: string | undefined;
|
|
1095
|
+
stackTrace?: string | undefined;
|
|
877
1096
|
}>]>;
|
|
878
1097
|
retry: z.ZodOptional<z.ZodObject<{
|
|
879
1098
|
timestamp: z.ZodNumber;
|
|
@@ -889,6 +1108,13 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
889
1108
|
error?: unknown;
|
|
890
1109
|
}>>;
|
|
891
1110
|
skippedRetrying: z.ZodOptional<z.ZodBoolean>;
|
|
1111
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1112
|
+
durationMs: z.ZodNumber;
|
|
1113
|
+
}, "strip", z.ZodTypeAny, {
|
|
1114
|
+
durationMs: number;
|
|
1115
|
+
}, {
|
|
1116
|
+
durationMs: number;
|
|
1117
|
+
}>>;
|
|
892
1118
|
}, "strip", z.ZodTypeAny, {
|
|
893
1119
|
error: {
|
|
894
1120
|
message: string;
|
|
@@ -905,6 +1131,7 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
905
1131
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
906
1132
|
type: "INTERNAL_ERROR";
|
|
907
1133
|
message?: string | undefined;
|
|
1134
|
+
stackTrace?: string | undefined;
|
|
908
1135
|
};
|
|
909
1136
|
id: string;
|
|
910
1137
|
ok: false;
|
|
@@ -914,6 +1141,9 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
914
1141
|
error?: unknown;
|
|
915
1142
|
} | undefined;
|
|
916
1143
|
skippedRetrying?: boolean | undefined;
|
|
1144
|
+
usage?: {
|
|
1145
|
+
durationMs: number;
|
|
1146
|
+
} | undefined;
|
|
917
1147
|
}, {
|
|
918
1148
|
error: {
|
|
919
1149
|
message: string;
|
|
@@ -930,6 +1160,7 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
930
1160
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
931
1161
|
type: "INTERNAL_ERROR";
|
|
932
1162
|
message?: string | undefined;
|
|
1163
|
+
stackTrace?: string | undefined;
|
|
933
1164
|
};
|
|
934
1165
|
id: string;
|
|
935
1166
|
ok: false;
|
|
@@ -939,6 +1170,9 @@ declare const TaskRunExecutionResult: z.ZodDiscriminatedUnion<"ok", [z.ZodObject
|
|
|
939
1170
|
error?: unknown;
|
|
940
1171
|
} | undefined;
|
|
941
1172
|
skippedRetrying?: boolean | undefined;
|
|
1173
|
+
usage?: {
|
|
1174
|
+
durationMs: number;
|
|
1175
|
+
} | undefined;
|
|
942
1176
|
}>]>;
|
|
943
1177
|
type TaskRunExecutionResult = z.infer<typeof TaskRunExecutionResult>;
|
|
944
1178
|
declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
@@ -948,16 +1182,29 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
948
1182
|
id: z.ZodString;
|
|
949
1183
|
output: z.ZodOptional<z.ZodString>;
|
|
950
1184
|
outputType: z.ZodString;
|
|
1185
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1186
|
+
durationMs: z.ZodNumber;
|
|
1187
|
+
}, "strip", z.ZodTypeAny, {
|
|
1188
|
+
durationMs: number;
|
|
1189
|
+
}, {
|
|
1190
|
+
durationMs: number;
|
|
1191
|
+
}>>;
|
|
951
1192
|
}, "strip", z.ZodTypeAny, {
|
|
952
1193
|
id: string;
|
|
953
1194
|
ok: true;
|
|
954
1195
|
outputType: string;
|
|
955
1196
|
output?: string | undefined;
|
|
1197
|
+
usage?: {
|
|
1198
|
+
durationMs: number;
|
|
1199
|
+
} | undefined;
|
|
956
1200
|
}, {
|
|
957
1201
|
id: string;
|
|
958
1202
|
ok: true;
|
|
959
1203
|
outputType: string;
|
|
960
1204
|
output?: string | undefined;
|
|
1205
|
+
usage?: {
|
|
1206
|
+
durationMs: number;
|
|
1207
|
+
} | undefined;
|
|
961
1208
|
}>, z.ZodObject<{
|
|
962
1209
|
ok: z.ZodLiteral<false>;
|
|
963
1210
|
id: z.ZodString;
|
|
@@ -998,14 +1245,17 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
998
1245
|
type: z.ZodLiteral<"INTERNAL_ERROR">;
|
|
999
1246
|
code: z.ZodEnum<["COULD_NOT_FIND_EXECUTOR", "COULD_NOT_FIND_TASK", "CONFIGURED_INCORRECTLY", "TASK_ALREADY_RUNNING", "TASK_EXECUTION_FAILED", "TASK_EXECUTION_ABORTED", "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE", "TASK_PROCESS_SIGKILL_TIMEOUT", "TASK_RUN_CANCELLED", "TASK_OUTPUT_ERROR", "HANDLE_ERROR_ERROR", "GRACEFUL_EXIT_TIMEOUT", "TASK_RUN_HEARTBEAT_TIMEOUT"]>;
|
|
1000
1247
|
message: z.ZodOptional<z.ZodString>;
|
|
1248
|
+
stackTrace: z.ZodOptional<z.ZodString>;
|
|
1001
1249
|
}, "strip", z.ZodTypeAny, {
|
|
1002
1250
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1003
1251
|
type: "INTERNAL_ERROR";
|
|
1004
1252
|
message?: string | undefined;
|
|
1253
|
+
stackTrace?: string | undefined;
|
|
1005
1254
|
}, {
|
|
1006
1255
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1007
1256
|
type: "INTERNAL_ERROR";
|
|
1008
1257
|
message?: string | undefined;
|
|
1258
|
+
stackTrace?: string | undefined;
|
|
1009
1259
|
}>]>;
|
|
1010
1260
|
retry: z.ZodOptional<z.ZodObject<{
|
|
1011
1261
|
timestamp: z.ZodNumber;
|
|
@@ -1021,6 +1271,13 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1021
1271
|
error?: unknown;
|
|
1022
1272
|
}>>;
|
|
1023
1273
|
skippedRetrying: z.ZodOptional<z.ZodBoolean>;
|
|
1274
|
+
usage: z.ZodOptional<z.ZodObject<{
|
|
1275
|
+
durationMs: z.ZodNumber;
|
|
1276
|
+
}, "strip", z.ZodTypeAny, {
|
|
1277
|
+
durationMs: number;
|
|
1278
|
+
}, {
|
|
1279
|
+
durationMs: number;
|
|
1280
|
+
}>>;
|
|
1024
1281
|
}, "strip", z.ZodTypeAny, {
|
|
1025
1282
|
error: {
|
|
1026
1283
|
message: string;
|
|
@@ -1037,6 +1294,7 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1037
1294
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1038
1295
|
type: "INTERNAL_ERROR";
|
|
1039
1296
|
message?: string | undefined;
|
|
1297
|
+
stackTrace?: string | undefined;
|
|
1040
1298
|
};
|
|
1041
1299
|
id: string;
|
|
1042
1300
|
ok: false;
|
|
@@ -1046,6 +1304,9 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1046
1304
|
error?: unknown;
|
|
1047
1305
|
} | undefined;
|
|
1048
1306
|
skippedRetrying?: boolean | undefined;
|
|
1307
|
+
usage?: {
|
|
1308
|
+
durationMs: number;
|
|
1309
|
+
} | undefined;
|
|
1049
1310
|
}, {
|
|
1050
1311
|
error: {
|
|
1051
1312
|
message: string;
|
|
@@ -1062,6 +1323,7 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1062
1323
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1063
1324
|
type: "INTERNAL_ERROR";
|
|
1064
1325
|
message?: string | undefined;
|
|
1326
|
+
stackTrace?: string | undefined;
|
|
1065
1327
|
};
|
|
1066
1328
|
id: string;
|
|
1067
1329
|
ok: false;
|
|
@@ -1071,6 +1333,9 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1071
1333
|
error?: unknown;
|
|
1072
1334
|
} | undefined;
|
|
1073
1335
|
skippedRetrying?: boolean | undefined;
|
|
1336
|
+
usage?: {
|
|
1337
|
+
durationMs: number;
|
|
1338
|
+
} | undefined;
|
|
1074
1339
|
}>]>, "many">;
|
|
1075
1340
|
}, "strip", z.ZodTypeAny, {
|
|
1076
1341
|
id: string;
|
|
@@ -1079,6 +1344,9 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1079
1344
|
ok: true;
|
|
1080
1345
|
outputType: string;
|
|
1081
1346
|
output?: string | undefined;
|
|
1347
|
+
usage?: {
|
|
1348
|
+
durationMs: number;
|
|
1349
|
+
} | undefined;
|
|
1082
1350
|
} | {
|
|
1083
1351
|
error: {
|
|
1084
1352
|
message: string;
|
|
@@ -1095,6 +1363,7 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1095
1363
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1096
1364
|
type: "INTERNAL_ERROR";
|
|
1097
1365
|
message?: string | undefined;
|
|
1366
|
+
stackTrace?: string | undefined;
|
|
1098
1367
|
};
|
|
1099
1368
|
id: string;
|
|
1100
1369
|
ok: false;
|
|
@@ -1104,6 +1373,9 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1104
1373
|
error?: unknown;
|
|
1105
1374
|
} | undefined;
|
|
1106
1375
|
skippedRetrying?: boolean | undefined;
|
|
1376
|
+
usage?: {
|
|
1377
|
+
durationMs: number;
|
|
1378
|
+
} | undefined;
|
|
1107
1379
|
})[];
|
|
1108
1380
|
}, {
|
|
1109
1381
|
id: string;
|
|
@@ -1112,6 +1384,9 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1112
1384
|
ok: true;
|
|
1113
1385
|
outputType: string;
|
|
1114
1386
|
output?: string | undefined;
|
|
1387
|
+
usage?: {
|
|
1388
|
+
durationMs: number;
|
|
1389
|
+
} | undefined;
|
|
1115
1390
|
} | {
|
|
1116
1391
|
error: {
|
|
1117
1392
|
message: string;
|
|
@@ -1128,6 +1403,7 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1128
1403
|
code: "COULD_NOT_FIND_EXECUTOR" | "COULD_NOT_FIND_TASK" | "CONFIGURED_INCORRECTLY" | "TASK_ALREADY_RUNNING" | "TASK_EXECUTION_FAILED" | "TASK_EXECUTION_ABORTED" | "TASK_PROCESS_EXITED_WITH_NON_ZERO_CODE" | "TASK_PROCESS_SIGKILL_TIMEOUT" | "TASK_RUN_CANCELLED" | "TASK_OUTPUT_ERROR" | "HANDLE_ERROR_ERROR" | "GRACEFUL_EXIT_TIMEOUT" | "TASK_RUN_HEARTBEAT_TIMEOUT";
|
|
1129
1404
|
type: "INTERNAL_ERROR";
|
|
1130
1405
|
message?: string | undefined;
|
|
1406
|
+
stackTrace?: string | undefined;
|
|
1131
1407
|
};
|
|
1132
1408
|
id: string;
|
|
1133
1409
|
ok: false;
|
|
@@ -1137,23 +1413,11 @@ declare const BatchTaskRunExecutionResult: z.ZodObject<{
|
|
|
1137
1413
|
error?: unknown;
|
|
1138
1414
|
} | undefined;
|
|
1139
1415
|
skippedRetrying?: boolean | undefined;
|
|
1416
|
+
usage?: {
|
|
1417
|
+
durationMs: number;
|
|
1418
|
+
} | undefined;
|
|
1140
1419
|
})[];
|
|
1141
1420
|
}>;
|
|
1142
1421
|
type BatchTaskRunExecutionResult = z.infer<typeof BatchTaskRunExecutionResult>;
|
|
1143
1422
|
|
|
1144
|
-
|
|
1145
|
-
disable(): void;
|
|
1146
|
-
waitUntil(date: Date): Promise<void>;
|
|
1147
|
-
waitForDuration(ms: number): Promise<void>;
|
|
1148
|
-
waitForTask(params: {
|
|
1149
|
-
id: string;
|
|
1150
|
-
ctx: TaskRunContext;
|
|
1151
|
-
}): Promise<TaskRunExecutionResult>;
|
|
1152
|
-
waitForBatch(params: {
|
|
1153
|
-
id: string;
|
|
1154
|
-
runs: string[];
|
|
1155
|
-
ctx: TaskRunContext;
|
|
1156
|
-
}): Promise<BatchTaskRunExecutionResult>;
|
|
1157
|
-
}
|
|
1158
|
-
|
|
1159
|
-
export { BatchTaskRunExecutionResult as B, type RuntimeManager as R, TaskRunExecutionResult as T, TaskRunContext as a, TaskRunExecution as b, TaskRunError as c, TaskRunBuiltInError as d, TaskRunCustomErrorObject as e, TaskRunStringError as f, TaskRunErrorCodes as g, TaskRunInternalError as h, TaskRun as i, TaskRunExecutionTask as j, TaskRunExecutionAttempt as k, TaskRunExecutionEnvironment as l, TaskRunExecutionOrganization as m, TaskRunExecutionProject as n, TaskRunExecutionQueue as o, TaskRunExecutionBatch as p, TaskRunExecutionRetry as q, TaskRunFailedExecutionResult as r, TaskRunSuccessfulExecutionResult as s };
|
|
1423
|
+
export { BatchTaskRunExecutionResult as B, MachinePresetName as M, TaskRunExecutionResult as T, TaskRunContext as a, TaskRunError as b, TaskRunExecution as c, MachineCpu as d, MachineMemory as e, MachineConfig as f, MachinePreset as g, TaskRunBuiltInError as h, TaskRunCustomErrorObject as i, TaskRunStringError as j, TaskRunErrorCodes as k, TaskRunInternalError as l, TaskRun as m, TaskRunExecutionTask as n, TaskRunExecutionAttempt as o, TaskRunExecutionEnvironment as p, TaskRunExecutionOrganization as q, TaskRunExecutionProject as r, TaskRunExecutionQueue as s, TaskRunExecutionBatch as t, TaskRunExecutionRetry as u, TaskRunExecutionUsage as v, TaskRunFailedExecutionResult as w, TaskRunSuccessfulExecutionResult as x };
|