@lineai/agent-platform-types 0.1.0

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.
@@ -0,0 +1,584 @@
1
+ import { z } from 'zod';
2
+ /**
3
+ * Persisted records returned by the agent platform API. These represent
4
+ * Firestore documents the orchestrator owns:
5
+ *
6
+ * organizations/{orgId}/projects/{projectId}/services/agent-platform/
7
+ * tasks/{taskId} ← TaskRecord
8
+ * tasks/{taskId}/runs/{runId} ← RunRecord
9
+ */
10
+ export declare const TaskStatusSchema: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
11
+ export type TaskStatus = z.infer<typeof TaskStatusSchema>;
12
+ export declare const RunStatusSchema: z.ZodEnum<["running", "succeeded", "failed"]>;
13
+ export type RunStatus = z.infer<typeof RunStatusSchema>;
14
+ export declare const RunMetricsSchema: z.ZodObject<{
15
+ turns: z.ZodNumber;
16
+ durationMs: z.ZodNumber;
17
+ tokens: z.ZodOptional<z.ZodObject<{
18
+ input: z.ZodNumber;
19
+ output: z.ZodNumber;
20
+ cacheRead: z.ZodOptional<z.ZodNumber>;
21
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
22
+ source: z.ZodEnum<["sdk", "reconciled"]>;
23
+ }, "strip", z.ZodTypeAny, {
24
+ input: number;
25
+ output: number;
26
+ source: "sdk" | "reconciled";
27
+ cacheRead?: number | undefined;
28
+ cacheCreation?: number | undefined;
29
+ }, {
30
+ input: number;
31
+ output: number;
32
+ source: "sdk" | "reconciled";
33
+ cacheRead?: number | undefined;
34
+ cacheCreation?: number | undefined;
35
+ }>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ turns: number;
38
+ durationMs: number;
39
+ tokens?: {
40
+ input: number;
41
+ output: number;
42
+ source: "sdk" | "reconciled";
43
+ cacheRead?: number | undefined;
44
+ cacheCreation?: number | undefined;
45
+ } | undefined;
46
+ }, {
47
+ turns: number;
48
+ durationMs: number;
49
+ tokens?: {
50
+ input: number;
51
+ output: number;
52
+ source: "sdk" | "reconciled";
53
+ cacheRead?: number | undefined;
54
+ cacheCreation?: number | undefined;
55
+ } | undefined;
56
+ }>;
57
+ export type RunMetrics = z.infer<typeof RunMetricsSchema>;
58
+ export declare const RunRecordSchema: z.ZodObject<{
59
+ id: z.ZodString;
60
+ taskId: z.ZodString;
61
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
62
+ sessionId: z.ZodOptional<z.ZodString>;
63
+ jobName: z.ZodOptional<z.ZodString>;
64
+ startedAt: z.ZodString;
65
+ completedAt: z.ZodOptional<z.ZodString>;
66
+ result: z.ZodOptional<z.ZodString>;
67
+ error: z.ZodOptional<z.ZodString>;
68
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
69
+ metrics: z.ZodObject<{
70
+ turns: z.ZodNumber;
71
+ durationMs: z.ZodNumber;
72
+ tokens: z.ZodOptional<z.ZodObject<{
73
+ input: z.ZodNumber;
74
+ output: z.ZodNumber;
75
+ cacheRead: z.ZodOptional<z.ZodNumber>;
76
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
77
+ source: z.ZodEnum<["sdk", "reconciled"]>;
78
+ }, "strip", z.ZodTypeAny, {
79
+ input: number;
80
+ output: number;
81
+ source: "sdk" | "reconciled";
82
+ cacheRead?: number | undefined;
83
+ cacheCreation?: number | undefined;
84
+ }, {
85
+ input: number;
86
+ output: number;
87
+ source: "sdk" | "reconciled";
88
+ cacheRead?: number | undefined;
89
+ cacheCreation?: number | undefined;
90
+ }>>;
91
+ }, "strip", z.ZodTypeAny, {
92
+ turns: number;
93
+ durationMs: number;
94
+ tokens?: {
95
+ input: number;
96
+ output: number;
97
+ source: "sdk" | "reconciled";
98
+ cacheRead?: number | undefined;
99
+ cacheCreation?: number | undefined;
100
+ } | undefined;
101
+ }, {
102
+ turns: number;
103
+ durationMs: number;
104
+ tokens?: {
105
+ input: number;
106
+ output: number;
107
+ source: "sdk" | "reconciled";
108
+ cacheRead?: number | undefined;
109
+ cacheCreation?: number | undefined;
110
+ } | undefined;
111
+ }>;
112
+ }, "strip", z.ZodTypeAny, {
113
+ status: "running" | "succeeded" | "failed";
114
+ id: string;
115
+ taskId: string;
116
+ startedAt: string;
117
+ artifacts: string[];
118
+ metrics: {
119
+ turns: number;
120
+ durationMs: number;
121
+ tokens?: {
122
+ input: number;
123
+ output: number;
124
+ source: "sdk" | "reconciled";
125
+ cacheRead?: number | undefined;
126
+ cacheCreation?: number | undefined;
127
+ } | undefined;
128
+ };
129
+ sessionId?: string | undefined;
130
+ jobName?: string | undefined;
131
+ completedAt?: string | undefined;
132
+ result?: string | undefined;
133
+ error?: string | undefined;
134
+ }, {
135
+ status: "running" | "succeeded" | "failed";
136
+ id: string;
137
+ taskId: string;
138
+ startedAt: string;
139
+ metrics: {
140
+ turns: number;
141
+ durationMs: number;
142
+ tokens?: {
143
+ input: number;
144
+ output: number;
145
+ source: "sdk" | "reconciled";
146
+ cacheRead?: number | undefined;
147
+ cacheCreation?: number | undefined;
148
+ } | undefined;
149
+ };
150
+ sessionId?: string | undefined;
151
+ jobName?: string | undefined;
152
+ completedAt?: string | undefined;
153
+ result?: string | undefined;
154
+ error?: string | undefined;
155
+ artifacts?: string[] | undefined;
156
+ }>;
157
+ export type RunRecord = z.infer<typeof RunRecordSchema>;
158
+ export declare const TaskRecordSchema: z.ZodObject<{
159
+ id: z.ZodString;
160
+ workflowId: z.ZodOptional<z.ZodString>;
161
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
162
+ createdAt: z.ZodString;
163
+ createdBy: z.ZodString;
164
+ idempotencyKey: z.ZodOptional<z.ZodString>;
165
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
166
+ callbackUrl: z.ZodOptional<z.ZodString>;
167
+ orgId: z.ZodString;
168
+ projectId: z.ZodString;
169
+ }, "strip", z.ZodTypeAny, {
170
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
171
+ id: string;
172
+ createdBy: string;
173
+ definition: Record<string, unknown>;
174
+ createdAt: string;
175
+ orgId: string;
176
+ projectId: string;
177
+ idempotencyKey?: string | undefined;
178
+ callbackUrl?: string | undefined;
179
+ workflowId?: string | undefined;
180
+ }, {
181
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
182
+ id: string;
183
+ createdBy: string;
184
+ definition: Record<string, unknown>;
185
+ createdAt: string;
186
+ orgId: string;
187
+ projectId: string;
188
+ idempotencyKey?: string | undefined;
189
+ callbackUrl?: string | undefined;
190
+ workflowId?: string | undefined;
191
+ }>;
192
+ export type TaskRecord = z.infer<typeof TaskRecordSchema>;
193
+ export declare const TaskDetailResponseSchema: z.ZodObject<{
194
+ id: z.ZodString;
195
+ workflowId: z.ZodOptional<z.ZodString>;
196
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
197
+ createdAt: z.ZodString;
198
+ createdBy: z.ZodString;
199
+ idempotencyKey: z.ZodOptional<z.ZodString>;
200
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
201
+ callbackUrl: z.ZodOptional<z.ZodString>;
202
+ orgId: z.ZodString;
203
+ projectId: z.ZodString;
204
+ } & {
205
+ latestRun: z.ZodOptional<z.ZodObject<{
206
+ id: z.ZodString;
207
+ taskId: z.ZodString;
208
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
209
+ sessionId: z.ZodOptional<z.ZodString>;
210
+ jobName: z.ZodOptional<z.ZodString>;
211
+ startedAt: z.ZodString;
212
+ completedAt: z.ZodOptional<z.ZodString>;
213
+ result: z.ZodOptional<z.ZodString>;
214
+ error: z.ZodOptional<z.ZodString>;
215
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
216
+ metrics: z.ZodObject<{
217
+ turns: z.ZodNumber;
218
+ durationMs: z.ZodNumber;
219
+ tokens: z.ZodOptional<z.ZodObject<{
220
+ input: z.ZodNumber;
221
+ output: z.ZodNumber;
222
+ cacheRead: z.ZodOptional<z.ZodNumber>;
223
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
224
+ source: z.ZodEnum<["sdk", "reconciled"]>;
225
+ }, "strip", z.ZodTypeAny, {
226
+ input: number;
227
+ output: number;
228
+ source: "sdk" | "reconciled";
229
+ cacheRead?: number | undefined;
230
+ cacheCreation?: number | undefined;
231
+ }, {
232
+ input: number;
233
+ output: number;
234
+ source: "sdk" | "reconciled";
235
+ cacheRead?: number | undefined;
236
+ cacheCreation?: number | undefined;
237
+ }>>;
238
+ }, "strip", z.ZodTypeAny, {
239
+ turns: number;
240
+ durationMs: number;
241
+ tokens?: {
242
+ input: number;
243
+ output: number;
244
+ source: "sdk" | "reconciled";
245
+ cacheRead?: number | undefined;
246
+ cacheCreation?: number | undefined;
247
+ } | undefined;
248
+ }, {
249
+ turns: number;
250
+ durationMs: number;
251
+ tokens?: {
252
+ input: number;
253
+ output: number;
254
+ source: "sdk" | "reconciled";
255
+ cacheRead?: number | undefined;
256
+ cacheCreation?: number | undefined;
257
+ } | undefined;
258
+ }>;
259
+ }, "strip", z.ZodTypeAny, {
260
+ status: "running" | "succeeded" | "failed";
261
+ id: string;
262
+ taskId: string;
263
+ startedAt: string;
264
+ artifacts: string[];
265
+ metrics: {
266
+ turns: number;
267
+ durationMs: number;
268
+ tokens?: {
269
+ input: number;
270
+ output: number;
271
+ source: "sdk" | "reconciled";
272
+ cacheRead?: number | undefined;
273
+ cacheCreation?: number | undefined;
274
+ } | undefined;
275
+ };
276
+ sessionId?: string | undefined;
277
+ jobName?: string | undefined;
278
+ completedAt?: string | undefined;
279
+ result?: string | undefined;
280
+ error?: string | undefined;
281
+ }, {
282
+ status: "running" | "succeeded" | "failed";
283
+ id: string;
284
+ taskId: string;
285
+ startedAt: string;
286
+ metrics: {
287
+ turns: number;
288
+ durationMs: number;
289
+ tokens?: {
290
+ input: number;
291
+ output: number;
292
+ source: "sdk" | "reconciled";
293
+ cacheRead?: number | undefined;
294
+ cacheCreation?: number | undefined;
295
+ } | undefined;
296
+ };
297
+ sessionId?: string | undefined;
298
+ jobName?: string | undefined;
299
+ completedAt?: string | undefined;
300
+ result?: string | undefined;
301
+ error?: string | undefined;
302
+ artifacts?: string[] | undefined;
303
+ }>>;
304
+ runs: z.ZodOptional<z.ZodArray<z.ZodObject<{
305
+ id: z.ZodString;
306
+ taskId: z.ZodString;
307
+ status: z.ZodEnum<["running", "succeeded", "failed"]>;
308
+ sessionId: z.ZodOptional<z.ZodString>;
309
+ jobName: z.ZodOptional<z.ZodString>;
310
+ startedAt: z.ZodString;
311
+ completedAt: z.ZodOptional<z.ZodString>;
312
+ result: z.ZodOptional<z.ZodString>;
313
+ error: z.ZodOptional<z.ZodString>;
314
+ artifacts: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
315
+ metrics: z.ZodObject<{
316
+ turns: z.ZodNumber;
317
+ durationMs: z.ZodNumber;
318
+ tokens: z.ZodOptional<z.ZodObject<{
319
+ input: z.ZodNumber;
320
+ output: z.ZodNumber;
321
+ cacheRead: z.ZodOptional<z.ZodNumber>;
322
+ cacheCreation: z.ZodOptional<z.ZodNumber>;
323
+ source: z.ZodEnum<["sdk", "reconciled"]>;
324
+ }, "strip", z.ZodTypeAny, {
325
+ input: number;
326
+ output: number;
327
+ source: "sdk" | "reconciled";
328
+ cacheRead?: number | undefined;
329
+ cacheCreation?: number | undefined;
330
+ }, {
331
+ input: number;
332
+ output: number;
333
+ source: "sdk" | "reconciled";
334
+ cacheRead?: number | undefined;
335
+ cacheCreation?: number | undefined;
336
+ }>>;
337
+ }, "strip", z.ZodTypeAny, {
338
+ turns: number;
339
+ durationMs: number;
340
+ tokens?: {
341
+ input: number;
342
+ output: number;
343
+ source: "sdk" | "reconciled";
344
+ cacheRead?: number | undefined;
345
+ cacheCreation?: number | undefined;
346
+ } | undefined;
347
+ }, {
348
+ turns: number;
349
+ durationMs: number;
350
+ tokens?: {
351
+ input: number;
352
+ output: number;
353
+ source: "sdk" | "reconciled";
354
+ cacheRead?: number | undefined;
355
+ cacheCreation?: number | undefined;
356
+ } | undefined;
357
+ }>;
358
+ }, "strip", z.ZodTypeAny, {
359
+ status: "running" | "succeeded" | "failed";
360
+ id: string;
361
+ taskId: string;
362
+ startedAt: string;
363
+ artifacts: string[];
364
+ metrics: {
365
+ turns: number;
366
+ durationMs: number;
367
+ tokens?: {
368
+ input: number;
369
+ output: number;
370
+ source: "sdk" | "reconciled";
371
+ cacheRead?: number | undefined;
372
+ cacheCreation?: number | undefined;
373
+ } | undefined;
374
+ };
375
+ sessionId?: string | undefined;
376
+ jobName?: string | undefined;
377
+ completedAt?: string | undefined;
378
+ result?: string | undefined;
379
+ error?: string | undefined;
380
+ }, {
381
+ status: "running" | "succeeded" | "failed";
382
+ id: string;
383
+ taskId: string;
384
+ startedAt: string;
385
+ metrics: {
386
+ turns: number;
387
+ durationMs: number;
388
+ tokens?: {
389
+ input: number;
390
+ output: number;
391
+ source: "sdk" | "reconciled";
392
+ cacheRead?: number | undefined;
393
+ cacheCreation?: number | undefined;
394
+ } | undefined;
395
+ };
396
+ sessionId?: string | undefined;
397
+ jobName?: string | undefined;
398
+ completedAt?: string | undefined;
399
+ result?: string | undefined;
400
+ error?: string | undefined;
401
+ artifacts?: string[] | undefined;
402
+ }>, "many">>;
403
+ }, "strip", z.ZodTypeAny, {
404
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
405
+ id: string;
406
+ createdBy: string;
407
+ definition: Record<string, unknown>;
408
+ createdAt: string;
409
+ orgId: string;
410
+ projectId: string;
411
+ idempotencyKey?: string | undefined;
412
+ callbackUrl?: string | undefined;
413
+ workflowId?: string | undefined;
414
+ latestRun?: {
415
+ status: "running" | "succeeded" | "failed";
416
+ id: string;
417
+ taskId: string;
418
+ startedAt: string;
419
+ artifacts: string[];
420
+ metrics: {
421
+ turns: number;
422
+ durationMs: number;
423
+ tokens?: {
424
+ input: number;
425
+ output: number;
426
+ source: "sdk" | "reconciled";
427
+ cacheRead?: number | undefined;
428
+ cacheCreation?: number | undefined;
429
+ } | undefined;
430
+ };
431
+ sessionId?: string | undefined;
432
+ jobName?: string | undefined;
433
+ completedAt?: string | undefined;
434
+ result?: string | undefined;
435
+ error?: string | undefined;
436
+ } | undefined;
437
+ runs?: {
438
+ status: "running" | "succeeded" | "failed";
439
+ id: string;
440
+ taskId: string;
441
+ startedAt: string;
442
+ artifacts: string[];
443
+ metrics: {
444
+ turns: number;
445
+ durationMs: number;
446
+ tokens?: {
447
+ input: number;
448
+ output: number;
449
+ source: "sdk" | "reconciled";
450
+ cacheRead?: number | undefined;
451
+ cacheCreation?: number | undefined;
452
+ } | undefined;
453
+ };
454
+ sessionId?: string | undefined;
455
+ jobName?: string | undefined;
456
+ completedAt?: string | undefined;
457
+ result?: string | undefined;
458
+ error?: string | undefined;
459
+ }[] | undefined;
460
+ }, {
461
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
462
+ id: string;
463
+ createdBy: string;
464
+ definition: Record<string, unknown>;
465
+ createdAt: string;
466
+ orgId: string;
467
+ projectId: string;
468
+ idempotencyKey?: string | undefined;
469
+ callbackUrl?: string | undefined;
470
+ workflowId?: string | undefined;
471
+ latestRun?: {
472
+ status: "running" | "succeeded" | "failed";
473
+ id: string;
474
+ taskId: string;
475
+ startedAt: string;
476
+ metrics: {
477
+ turns: number;
478
+ durationMs: number;
479
+ tokens?: {
480
+ input: number;
481
+ output: number;
482
+ source: "sdk" | "reconciled";
483
+ cacheRead?: number | undefined;
484
+ cacheCreation?: number | undefined;
485
+ } | undefined;
486
+ };
487
+ sessionId?: string | undefined;
488
+ jobName?: string | undefined;
489
+ completedAt?: string | undefined;
490
+ result?: string | undefined;
491
+ error?: string | undefined;
492
+ artifacts?: string[] | undefined;
493
+ } | undefined;
494
+ runs?: {
495
+ status: "running" | "succeeded" | "failed";
496
+ id: string;
497
+ taskId: string;
498
+ startedAt: string;
499
+ metrics: {
500
+ turns: number;
501
+ durationMs: number;
502
+ tokens?: {
503
+ input: number;
504
+ output: number;
505
+ source: "sdk" | "reconciled";
506
+ cacheRead?: number | undefined;
507
+ cacheCreation?: number | undefined;
508
+ } | undefined;
509
+ };
510
+ sessionId?: string | undefined;
511
+ jobName?: string | undefined;
512
+ completedAt?: string | undefined;
513
+ result?: string | undefined;
514
+ error?: string | undefined;
515
+ artifacts?: string[] | undefined;
516
+ }[] | undefined;
517
+ }>;
518
+ export type TaskDetailResponse = z.infer<typeof TaskDetailResponseSchema>;
519
+ export declare const TaskListResponseSchema: z.ZodObject<{
520
+ tasks: z.ZodArray<z.ZodObject<{
521
+ id: z.ZodString;
522
+ workflowId: z.ZodOptional<z.ZodString>;
523
+ status: z.ZodEnum<["pending", "running", "succeeded", "failed", "cancelled"]>;
524
+ createdAt: z.ZodString;
525
+ createdBy: z.ZodString;
526
+ idempotencyKey: z.ZodOptional<z.ZodString>;
527
+ definition: z.ZodRecord<z.ZodString, z.ZodUnknown>;
528
+ callbackUrl: z.ZodOptional<z.ZodString>;
529
+ orgId: z.ZodString;
530
+ projectId: z.ZodString;
531
+ }, "strip", z.ZodTypeAny, {
532
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
533
+ id: string;
534
+ createdBy: string;
535
+ definition: Record<string, unknown>;
536
+ createdAt: string;
537
+ orgId: string;
538
+ projectId: string;
539
+ idempotencyKey?: string | undefined;
540
+ callbackUrl?: string | undefined;
541
+ workflowId?: string | undefined;
542
+ }, {
543
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
544
+ id: string;
545
+ createdBy: string;
546
+ definition: Record<string, unknown>;
547
+ createdAt: string;
548
+ orgId: string;
549
+ projectId: string;
550
+ idempotencyKey?: string | undefined;
551
+ callbackUrl?: string | undefined;
552
+ workflowId?: string | undefined;
553
+ }>, "many">;
554
+ nextPageToken: z.ZodOptional<z.ZodString>;
555
+ }, "strip", z.ZodTypeAny, {
556
+ tasks: {
557
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
558
+ id: string;
559
+ createdBy: string;
560
+ definition: Record<string, unknown>;
561
+ createdAt: string;
562
+ orgId: string;
563
+ projectId: string;
564
+ idempotencyKey?: string | undefined;
565
+ callbackUrl?: string | undefined;
566
+ workflowId?: string | undefined;
567
+ }[];
568
+ nextPageToken?: string | undefined;
569
+ }, {
570
+ tasks: {
571
+ status: "pending" | "running" | "succeeded" | "failed" | "cancelled";
572
+ id: string;
573
+ createdBy: string;
574
+ definition: Record<string, unknown>;
575
+ createdAt: string;
576
+ orgId: string;
577
+ projectId: string;
578
+ idempotencyKey?: string | undefined;
579
+ callbackUrl?: string | undefined;
580
+ workflowId?: string | undefined;
581
+ }[];
582
+ nextPageToken?: string | undefined;
583
+ }>;
584
+ export type TaskListResponse = z.infer<typeof TaskListResponseSchema>;
@@ -0,0 +1,67 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TaskListResponseSchema = exports.TaskDetailResponseSchema = exports.TaskRecordSchema = exports.RunRecordSchema = exports.RunMetricsSchema = exports.RunStatusSchema = exports.TaskStatusSchema = void 0;
4
+ const zod_1 = require("zod");
5
+ /**
6
+ * Persisted records returned by the agent platform API. These represent
7
+ * Firestore documents the orchestrator owns:
8
+ *
9
+ * organizations/{orgId}/projects/{projectId}/services/agent-platform/
10
+ * tasks/{taskId} ← TaskRecord
11
+ * tasks/{taskId}/runs/{runId} ← RunRecord
12
+ */
13
+ exports.TaskStatusSchema = zod_1.z.enum([
14
+ 'pending',
15
+ 'running',
16
+ 'succeeded',
17
+ 'failed',
18
+ 'cancelled',
19
+ ]);
20
+ exports.RunStatusSchema = zod_1.z.enum(['running', 'succeeded', 'failed']);
21
+ exports.RunMetricsSchema = zod_1.z.object({
22
+ turns: zod_1.z.number(),
23
+ durationMs: zod_1.z.number(),
24
+ tokens: zod_1.z
25
+ .object({
26
+ input: zod_1.z.number(),
27
+ output: zod_1.z.number(),
28
+ cacheRead: zod_1.z.number().optional(),
29
+ cacheCreation: zod_1.z.number().optional(),
30
+ source: zod_1.z.enum(['sdk', 'reconciled']),
31
+ })
32
+ .optional(),
33
+ });
34
+ exports.RunRecordSchema = zod_1.z.object({
35
+ id: zod_1.z.string(),
36
+ taskId: zod_1.z.string(),
37
+ status: exports.RunStatusSchema,
38
+ sessionId: zod_1.z.string().optional(),
39
+ jobName: zod_1.z.string().optional(),
40
+ startedAt: zod_1.z.string(),
41
+ completedAt: zod_1.z.string().optional(),
42
+ result: zod_1.z.string().optional(),
43
+ error: zod_1.z.string().optional(),
44
+ artifacts: zod_1.z.array(zod_1.z.string()).default([]),
45
+ metrics: exports.RunMetricsSchema,
46
+ });
47
+ exports.TaskRecordSchema = zod_1.z.object({
48
+ id: zod_1.z.string(),
49
+ workflowId: zod_1.z.string().optional(),
50
+ status: exports.TaskStatusSchema,
51
+ createdAt: zod_1.z.string(),
52
+ createdBy: zod_1.z.string(),
53
+ idempotencyKey: zod_1.z.string().optional(),
54
+ definition: zod_1.z.record(zod_1.z.unknown()),
55
+ callbackUrl: zod_1.z.string().optional(),
56
+ orgId: zod_1.z.string(),
57
+ projectId: zod_1.z.string(),
58
+ });
59
+ exports.TaskDetailResponseSchema = exports.TaskRecordSchema.extend({
60
+ latestRun: exports.RunRecordSchema.optional(),
61
+ runs: zod_1.z.array(exports.RunRecordSchema).optional(),
62
+ });
63
+ exports.TaskListResponseSchema = zod_1.z.object({
64
+ tasks: zod_1.z.array(exports.TaskRecordSchema),
65
+ nextPageToken: zod_1.z.string().optional(),
66
+ });
67
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicmVjb3Jkcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9yZWNvcmRzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7OztBQUFBLDZCQUF3QjtBQUV4Qjs7Ozs7OztHQU9HO0FBRVUsUUFBQSxnQkFBZ0IsR0FBRyxPQUFDLENBQUMsSUFBSSxDQUFDO0lBQ3JDLFNBQVM7SUFDVCxTQUFTO0lBQ1QsV0FBVztJQUNYLF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