@openserv-labs/sdk 1.8.1 → 1.8.2

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/types.d.ts CHANGED
@@ -1,2966 +1,226 @@
1
- import { z } from 'zod';
1
+ import type { z } from 'zod';
2
2
  import type { ChatCompletionMessageParam } from 'openai/resources/chat/completions';
3
3
  export type CapabilityFuncParams<Schema extends z.ZodTypeAny> = {
4
4
  args: z.infer<Schema>;
5
- action?: z.infer<typeof actionSchema>;
5
+ action?: ActionSchema;
6
6
  };
7
- export declare const agentKind: z.ZodEnum<["external", "eliza", "openserv"]>;
8
- export declare const taskStatusSchema: z.ZodEnum<["to-do", "in-progress", "human-assistance-required", "error", "done", "cancelled"]>;
9
- export type TaskStatus = z.infer<typeof taskStatusSchema>;
10
- export declare const chatMessageArtifacts: z.ZodArray<z.ZodIntersection<z.ZodObject<{
11
- id: z.ZodString;
12
- }, "strip", z.ZodTypeAny, {
7
+ export type AgentKind = 'external' | 'eliza' | 'openserv';
8
+ export type TaskStatus = 'to-do' | 'in-progress' | 'human-assistance-required' | 'error' | 'done' | 'cancelled';
9
+ type JSONArtifact = {
13
10
  id: string;
14
- }, {
15
- id: string;
16
- }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
17
- type: z.ZodLiteral<"json">;
18
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
19
- }, "strip", z.ZodTypeAny, {
20
- type: "json";
21
- data: Record<string, unknown>;
22
- }, {
23
- type: "json";
11
+ type: 'json';
24
12
  data: Record<string, unknown>;
25
- }>, z.ZodObject<{
26
- type: z.ZodLiteral<"artifact-card">;
27
- data: z.ZodUnknown;
28
- }, "strip", z.ZodTypeAny, {
29
- type: "artifact-card";
30
- data?: unknown;
31
- }, {
32
- type: "artifact-card";
33
- data?: unknown;
34
- }>, z.ZodObject<{
35
- type: z.ZodLiteral<"artifact-card-response">;
36
- artifactId: z.ZodString;
37
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
38
- }, "strip", z.ZodTypeAny, {
39
- type: "artifact-card-response";
40
- artifactId: string;
41
- data?: unknown;
42
- }, {
43
- type: "artifact-card-response";
44
- artifactId: string;
45
- data?: unknown;
46
- }>]>>, "many">;
47
- export declare const chatMessageParts: z.ZodObject<{
48
- artifacts: z.ZodArray<z.ZodIntersection<z.ZodObject<{
49
- id: z.ZodString;
50
- }, "strip", z.ZodTypeAny, {
51
- id: string;
52
- }, {
53
- id: string;
54
- }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
55
- type: z.ZodLiteral<"json">;
56
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
57
- }, "strip", z.ZodTypeAny, {
58
- type: "json";
59
- data: Record<string, unknown>;
60
- }, {
61
- type: "json";
62
- data: Record<string, unknown>;
63
- }>, z.ZodObject<{
64
- type: z.ZodLiteral<"artifact-card">;
65
- data: z.ZodUnknown;
66
- }, "strip", z.ZodTypeAny, {
67
- type: "artifact-card";
68
- data?: unknown;
69
- }, {
70
- type: "artifact-card";
71
- data?: unknown;
72
- }>, z.ZodObject<{
73
- type: z.ZodLiteral<"artifact-card-response">;
74
- artifactId: z.ZodString;
75
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
76
- }, "strip", z.ZodTypeAny, {
77
- type: "artifact-card-response";
78
- artifactId: string;
79
- data?: unknown;
80
- }, {
81
- type: "artifact-card-response";
82
- artifactId: string;
83
- data?: unknown;
84
- }>]>>, "many">;
85
- }, "strip", z.ZodTypeAny, {
86
- artifacts: ({
87
- id: string;
88
- } & ({
89
- type: "json";
90
- data: Record<string, unknown>;
91
- } | {
92
- type: "artifact-card";
93
- data?: unknown;
94
- } | {
95
- type: "artifact-card-response";
96
- artifactId: string;
97
- data?: unknown;
98
- }))[];
99
- }, {
100
- artifacts: ({
101
- id: string;
102
- } & ({
103
- type: "json";
104
- data: Record<string, unknown>;
105
- } | {
106
- type: "artifact-card";
107
- data?: unknown;
108
- } | {
109
- type: "artifact-card-response";
110
- artifactId: string;
111
- data?: unknown;
112
- }))[];
113
- }>;
114
- export declare const doTaskActionSchema: z.ZodObject<{
115
- type: z.ZodLiteral<"do-task">;
116
- workspaceUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
- taskUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
118
- explicitInput: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
119
- triggerEvents: z.ZodArray<z.ZodObject<{
120
- name: z.ZodString;
121
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
122
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
123
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
124
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
125
- payload: z.ZodArray<z.ZodObject<{
126
- event: z.ZodUnknown;
127
- summary: z.ZodString;
128
- }, "strip", z.ZodTypeAny, {
129
- summary: string;
130
- event?: unknown;
131
- }, {
132
- summary: string;
133
- event?: unknown;
134
- }>, "many">;
135
- }, "strip", z.ZodTypeAny, {
136
- name: string;
137
- integrationType: "custom" | "nango" | "internal";
138
- payload: {
139
- summary: string;
140
- event?: unknown;
141
- }[];
142
- description?: string | null | undefined;
143
- integrationName?: string | null | undefined;
144
- trigger_name?: string | null | undefined;
145
- }, {
146
- name: string;
147
- integrationType: "custom" | "nango" | "internal";
148
- payload: {
149
- summary: string;
150
- event?: unknown;
151
- }[];
152
- description?: string | null | undefined;
153
- integrationName?: string | null | undefined;
154
- trigger_name?: string | null | undefined;
155
- }>, "many">;
156
- sessionHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
157
- tasks: z.ZodArray<z.ZodObject<{
158
- id: z.ZodNumber;
159
- description: z.ZodString;
160
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
161
- expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
162
- input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
163
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
164
- }, "strip", z.ZodTypeAny, {
165
- description: string;
166
- id: number;
167
- body?: string | null | undefined;
168
- expectedOutput?: string | null | undefined;
169
- input?: string | null | undefined;
170
- output?: string | null | undefined;
171
- }, {
172
- description: string;
173
- id: number;
174
- body?: string | null | undefined;
175
- expectedOutput?: string | null | undefined;
176
- input?: string | null | undefined;
177
- output?: string | null | undefined;
178
- }>, "many">;
179
- triggerEvents: z.ZodArray<z.ZodObject<{
180
- name: z.ZodString;
181
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
182
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
183
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
184
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
- payload: z.ZodArray<z.ZodObject<{
186
- event: z.ZodUnknown;
187
- summary: z.ZodString;
188
- }, "strip", z.ZodTypeAny, {
189
- summary: string;
190
- event?: unknown;
191
- }, {
192
- summary: string;
193
- event?: unknown;
194
- }>, "many">;
195
- }, "strip", z.ZodTypeAny, {
196
- name: string;
197
- integrationType: "custom" | "nango" | "internal";
198
- payload: {
199
- summary: string;
200
- event?: unknown;
201
- }[];
202
- description?: string | null | undefined;
203
- integrationName?: string | null | undefined;
204
- trigger_name?: string | null | undefined;
205
- }, {
206
- name: string;
207
- integrationType: "custom" | "nango" | "internal";
208
- payload: {
209
- summary: string;
210
- event?: unknown;
211
- }[];
212
- description?: string | null | undefined;
213
- integrationName?: string | null | undefined;
214
- trigger_name?: string | null | undefined;
215
- }>, "many">;
216
- }, "strip", z.ZodTypeAny, {
217
- triggerEvents: {
218
- name: string;
219
- integrationType: "custom" | "nango" | "internal";
220
- payload: {
221
- summary: string;
222
- event?: unknown;
223
- }[];
224
- description?: string | null | undefined;
225
- integrationName?: string | null | undefined;
226
- trigger_name?: string | null | undefined;
227
- }[];
228
- tasks: {
229
- description: string;
230
- id: number;
231
- body?: string | null | undefined;
232
- expectedOutput?: string | null | undefined;
233
- input?: string | null | undefined;
234
- output?: string | null | undefined;
235
- }[];
236
- }, {
237
- triggerEvents: {
238
- name: string;
239
- integrationType: "custom" | "nango" | "internal";
240
- payload: {
241
- summary: string;
242
- event?: unknown;
243
- }[];
244
- description?: string | null | undefined;
245
- integrationName?: string | null | undefined;
246
- trigger_name?: string | null | undefined;
247
- }[];
248
- tasks: {
249
- description: string;
250
- id: number;
251
- body?: string | null | undefined;
252
- expectedOutput?: string | null | undefined;
253
- input?: string | null | undefined;
254
- output?: string | null | undefined;
255
- }[];
256
- }>, "many">>;
257
- me: z.ZodIntersection<z.ZodObject<{
258
- id: z.ZodNumber;
259
- name: z.ZodString;
260
- kind: z.ZodEnum<["external", "eliza", "openserv"]>;
261
- }, "strip", z.ZodTypeAny, {
262
- name: string;
263
- id: number;
264
- kind: "external" | "eliza" | "openserv";
265
- }, {
266
- name: string;
267
- id: number;
268
- kind: "external" | "eliza" | "openserv";
269
- }>, z.ZodUnion<[z.ZodObject<{
270
- isBuiltByAgentBuilder: z.ZodLiteral<false>;
271
- }, "strip", z.ZodTypeAny, {
272
- isBuiltByAgentBuilder: false;
273
- }, {
274
- isBuiltByAgentBuilder: false;
275
- }>, z.ZodObject<{
276
- isBuiltByAgentBuilder: z.ZodLiteral<true>;
277
- systemPrompt: z.ZodString;
278
- }, "strip", z.ZodTypeAny, {
279
- isBuiltByAgentBuilder: true;
280
- systemPrompt: string;
281
- }, {
282
- isBuiltByAgentBuilder: true;
283
- systemPrompt: string;
284
- }>]>>;
285
- task: z.ZodObject<{
286
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
287
- description: z.ZodString;
288
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
289
- expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
290
- input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
291
- dependencies: z.ZodArray<z.ZodObject<{
292
- id: z.ZodNumber;
293
- description: z.ZodString;
294
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
295
- status: z.ZodEnum<["to-do", "in-progress", "human-assistance-required", "error", "done", "cancelled"]>;
296
- attachments: z.ZodArray<z.ZodObject<{
297
- id: z.ZodNumber;
298
- path: z.ZodString;
299
- fullUrl: z.ZodString;
300
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
301
- }, "strip", z.ZodTypeAny, {
302
- path: string;
303
- id: number;
304
- fullUrl: string;
305
- summary?: string | null | undefined;
306
- }, {
307
- path: string;
308
- id: number;
309
- fullUrl: string;
310
- summary?: string | null | undefined;
311
- }>, "many">;
312
- }, "strip", z.ZodTypeAny, {
313
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
314
- description: string;
315
- id: number;
316
- attachments: {
317
- path: string;
318
- id: number;
319
- fullUrl: string;
320
- summary?: string | null | undefined;
321
- }[];
322
- output?: string | null | undefined;
323
- }, {
324
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
325
- description: string;
326
- id: number;
327
- attachments: {
328
- path: string;
329
- id: number;
330
- fullUrl: string;
331
- summary?: string | null | undefined;
332
- }[];
333
- output?: string | null | undefined;
334
- }>, "many">;
335
- humanAssistanceRequests: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
336
- type: z.ZodLiteral<"text">;
337
- question: z.ZodObject<{
338
- type: z.ZodLiteral<"text">;
339
- question: z.ZodString;
340
- }, "strip", z.ZodTypeAny, {
341
- type: "text";
342
- question: string;
343
- }, {
344
- type: "text";
345
- question: string;
346
- }>;
347
- }, "strip", z.ZodTypeAny, {
348
- type: "text";
349
- question: {
350
- type: "text";
351
- question: string;
352
- };
353
- }, {
354
- type: "text";
355
- question: {
356
- type: "text";
357
- question: string;
358
- };
359
- }>, z.ZodObject<{
360
- type: z.ZodLiteral<"project-manager-plan-review">;
361
- question: z.ZodObject<{
362
- tasks: z.ZodArray<z.ZodObject<{
363
- index: z.ZodNumber;
364
- assigneeAgentId: z.ZodNumber;
365
- assigneeAgentName: z.ZodString;
366
- taskDescription: z.ZodString;
367
- taskBody: z.ZodString;
368
- input: z.ZodString;
369
- expectedOutput: z.ZodString;
370
- }, "strip", z.ZodTypeAny, {
371
- expectedOutput: string;
372
- input: string;
373
- index: number;
374
- assigneeAgentId: number;
375
- assigneeAgentName: string;
376
- taskDescription: string;
377
- taskBody: string;
378
- }, {
379
- expectedOutput: string;
380
- input: string;
381
- index: number;
382
- assigneeAgentId: number;
383
- assigneeAgentName: string;
384
- taskDescription: string;
385
- taskBody: string;
386
- }>, "many">;
387
- } & {
388
- type: z.ZodLiteral<"project-manager-plan-review">;
389
- }, "strip", z.ZodTypeAny, {
390
- type: "project-manager-plan-review";
391
- tasks: {
392
- expectedOutput: string;
393
- input: string;
394
- index: number;
395
- assigneeAgentId: number;
396
- assigneeAgentName: string;
397
- taskDescription: string;
398
- taskBody: string;
399
- }[];
400
- }, {
401
- type: "project-manager-plan-review";
402
- tasks: {
403
- expectedOutput: string;
404
- input: string;
405
- index: number;
406
- assigneeAgentId: number;
407
- assigneeAgentName: string;
408
- taskDescription: string;
409
- taskBody: string;
410
- }[];
411
- }>;
412
- }, "strip", z.ZodTypeAny, {
413
- type: "project-manager-plan-review";
414
- question: {
415
- type: "project-manager-plan-review";
416
- tasks: {
417
- expectedOutput: string;
418
- input: string;
419
- index: number;
420
- assigneeAgentId: number;
421
- assigneeAgentName: string;
422
- taskDescription: string;
423
- taskBody: string;
424
- }[];
425
- };
426
- }, {
427
- type: "project-manager-plan-review";
428
- question: {
429
- type: "project-manager-plan-review";
430
- tasks: {
431
- expectedOutput: string;
432
- input: string;
433
- index: number;
434
- assigneeAgentId: number;
435
- assigneeAgentName: string;
436
- taskDescription: string;
437
- taskBody: string;
438
- }[];
439
- };
440
- }>, z.ZodObject<{
441
- type: z.ZodLiteral<"insufficient-balance">;
442
- question: z.ZodObject<{
443
- type: z.ZodLiteral<"insufficient-balance">;
444
- }, "strip", z.ZodTypeAny, {
445
- type: "insufficient-balance";
446
- }, {
447
- type: "insufficient-balance";
448
- }>;
449
- }, "strip", z.ZodTypeAny, {
450
- type: "insufficient-balance";
451
- question: {
452
- type: "insufficient-balance";
453
- };
454
- }, {
455
- type: "insufficient-balance";
456
- question: {
457
- type: "insufficient-balance";
458
- };
459
- }>, z.ZodObject<{
460
- type: z.ZodLiteral<"json">;
461
- question: z.ZodAny;
462
- }, "strip", z.ZodTypeAny, {
463
- type: "json";
464
- question?: any;
465
- }, {
466
- type: "json";
467
- question?: any;
468
- }>]>, z.ZodObject<{
469
- agentDump: z.ZodUnknown;
470
- humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
471
- id: z.ZodNumber;
472
- status: z.ZodEnum<["pending", "responded"]>;
473
- }, "strip", z.ZodTypeAny, {
474
- status: "pending" | "responded";
475
- id: number;
476
- agentDump?: unknown;
477
- humanResponse?: string | null | undefined;
478
- }, {
479
- status: "pending" | "responded";
480
- id: number;
481
- agentDump?: unknown;
482
- humanResponse?: string | null | undefined;
483
- }>>, "many">;
484
- triggerEvent: z.ZodOptional<z.ZodObject<{
485
- name: z.ZodString;
486
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
487
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
488
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
489
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
490
- payload: z.ZodArray<z.ZodObject<{
491
- event: z.ZodUnknown;
492
- summary: z.ZodString;
493
- }, "strip", z.ZodTypeAny, {
494
- summary: string;
495
- event?: unknown;
496
- }, {
497
- summary: string;
498
- event?: unknown;
499
- }>, "many">;
500
- }, "strip", z.ZodTypeAny, {
501
- name: string;
502
- integrationType: "custom" | "nango" | "internal";
503
- payload: {
504
- summary: string;
505
- event?: unknown;
506
- }[];
507
- description?: string | null | undefined;
508
- integrationName?: string | null | undefined;
509
- trigger_name?: string | null | undefined;
510
- }, {
511
- name: string;
512
- integrationType: "custom" | "nango" | "internal";
513
- payload: {
514
- summary: string;
515
- event?: unknown;
516
- }[];
517
- description?: string | null | undefined;
518
- integrationName?: string | null | undefined;
519
- trigger_name?: string | null | undefined;
520
- }>>;
521
- }, "strip", z.ZodTypeAny, {
522
- description: string;
523
- id: string | number;
524
- dependencies: {
525
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
526
- description: string;
527
- id: number;
528
- attachments: {
529
- path: string;
530
- id: number;
531
- fullUrl: string;
532
- summary?: string | null | undefined;
533
- }[];
534
- output?: string | null | undefined;
535
- }[];
536
- humanAssistanceRequests: (({
537
- type: "text";
538
- question: {
539
- type: "text";
540
- question: string;
541
- };
542
- } | {
543
- type: "project-manager-plan-review";
544
- question: {
545
- type: "project-manager-plan-review";
546
- tasks: {
547
- expectedOutput: string;
548
- input: string;
549
- index: number;
550
- assigneeAgentId: number;
551
- assigneeAgentName: string;
552
- taskDescription: string;
553
- taskBody: string;
554
- }[];
555
- };
556
- } | {
557
- type: "insufficient-balance";
558
- question: {
559
- type: "insufficient-balance";
560
- };
561
- } | {
562
- type: "json";
563
- question?: any;
564
- }) & {
565
- status: "pending" | "responded";
566
- id: number;
567
- agentDump?: unknown;
568
- humanResponse?: string | null | undefined;
569
- })[];
570
- body?: string | null | undefined;
571
- expectedOutput?: string | null | undefined;
572
- input?: string | null | undefined;
573
- triggerEvent?: {
574
- name: string;
575
- integrationType: "custom" | "nango" | "internal";
576
- payload: {
577
- summary: string;
578
- event?: unknown;
579
- }[];
580
- description?: string | null | undefined;
581
- integrationName?: string | null | undefined;
582
- trigger_name?: string | null | undefined;
583
- } | undefined;
584
- }, {
585
- description: string;
586
- id: string | number;
587
- dependencies: {
588
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
589
- description: string;
590
- id: number;
591
- attachments: {
592
- path: string;
593
- id: number;
594
- fullUrl: string;
595
- summary?: string | null | undefined;
596
- }[];
597
- output?: string | null | undefined;
598
- }[];
599
- humanAssistanceRequests: (({
600
- type: "text";
601
- question: {
602
- type: "text";
603
- question: string;
604
- };
605
- } | {
606
- type: "project-manager-plan-review";
607
- question: {
608
- type: "project-manager-plan-review";
609
- tasks: {
610
- expectedOutput: string;
611
- input: string;
612
- index: number;
613
- assigneeAgentId: number;
614
- assigneeAgentName: string;
615
- taskDescription: string;
616
- taskBody: string;
617
- }[];
618
- };
619
- } | {
620
- type: "insufficient-balance";
621
- question: {
622
- type: "insufficient-balance";
623
- };
624
- } | {
625
- type: "json";
626
- question?: any;
627
- }) & {
628
- status: "pending" | "responded";
629
- id: number;
630
- agentDump?: unknown;
631
- humanResponse?: string | null | undefined;
632
- })[];
633
- body?: string | null | undefined;
634
- expectedOutput?: string | null | undefined;
635
- input?: string | null | undefined;
636
- triggerEvent?: {
637
- name: string;
638
- integrationType: "custom" | "nango" | "internal";
639
- payload: {
640
- summary: string;
641
- event?: unknown;
642
- }[];
643
- description?: string | null | undefined;
644
- integrationName?: string | null | undefined;
645
- trigger_name?: string | null | undefined;
646
- } | undefined;
647
- }>;
648
- workspace: z.ZodObject<{
649
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
650
- goal: z.ZodString;
651
- bucket_folder: z.ZodString;
652
- latest_workspace_execution_status: z.ZodOptional<z.ZodEnum<["error", "active", "deleted", "idle", "running", "paused", "completed", "timed-out"]>>;
653
- agents: z.ZodArray<z.ZodObject<{
654
- id: z.ZodNumber;
655
- name: z.ZodString;
656
- capabilities_description: z.ZodString;
657
- integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
658
- id: z.ZodString;
659
- type: z.ZodEnum<["nango", "custom", "internal"]>;
660
- identifier: z.ZodString;
661
- name: z.ZodString;
662
- description: z.ZodString;
663
- scopes: z.ZodArray<z.ZodString, "many">;
664
- connectionName: z.ZodString;
665
- }, "strip", z.ZodTypeAny, {
666
- name: string;
667
- type: "custom" | "nango" | "internal";
668
- description: string;
669
- id: string;
670
- identifier: string;
671
- scopes: string[];
672
- connectionName: string;
673
- }, {
674
- name: string;
675
- type: "custom" | "nango" | "internal";
676
- description: string;
677
- id: string;
678
- identifier: string;
679
- scopes: string[];
680
- connectionName: string;
681
- }>, "many">>;
682
- }, "strip", z.ZodTypeAny, {
683
- name: string;
684
- id: number;
685
- capabilities_description: string;
686
- integrations?: {
687
- name: string;
688
- type: "custom" | "nango" | "internal";
689
- description: string;
690
- id: string;
691
- identifier: string;
692
- scopes: string[];
693
- connectionName: string;
694
- }[] | undefined;
695
- }, {
696
- name: string;
697
- id: number;
698
- capabilities_description: string;
699
- integrations?: {
700
- name: string;
701
- type: "custom" | "nango" | "internal";
702
- description: string;
703
- id: string;
704
- identifier: string;
705
- scopes: string[];
706
- connectionName: string;
707
- }[] | undefined;
708
- }>, "many">;
709
- }, "strip", z.ZodTypeAny, {
710
- id: string | number;
711
- goal: string;
712
- bucket_folder: string;
713
- agents: {
714
- name: string;
715
- id: number;
716
- capabilities_description: string;
717
- integrations?: {
718
- name: string;
719
- type: "custom" | "nango" | "internal";
720
- description: string;
721
- id: string;
722
- identifier: string;
723
- scopes: string[];
724
- connectionName: string;
725
- }[] | undefined;
726
- }[];
727
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
728
- }, {
729
- id: string | number;
730
- goal: string;
731
- bucket_folder: string;
732
- agents: {
733
- name: string;
734
- id: number;
735
- capabilities_description: string;
736
- integrations?: {
737
- name: string;
738
- type: "custom" | "nango" | "internal";
739
- description: string;
740
- id: string;
741
- identifier: string;
742
- scopes: string[];
743
- connectionName: string;
744
- }[] | undefined;
745
- }[];
746
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
747
- }>;
748
- workspaceExecutionId: z.ZodOptional<z.ZodNumber>;
749
- integrations: z.ZodArray<z.ZodObject<{
750
- id: z.ZodString;
751
- type: z.ZodEnum<["nango", "custom", "internal"]>;
752
- identifier: z.ZodString;
753
- name: z.ZodString;
754
- description: z.ZodString;
755
- scopes: z.ZodArray<z.ZodString, "many">;
756
- connectionName: z.ZodString;
757
- }, "strip", z.ZodTypeAny, {
758
- name: string;
759
- type: "custom" | "nango" | "internal";
760
- description: string;
761
- id: string;
762
- identifier: string;
763
- scopes: string[];
764
- connectionName: string;
765
- }, {
766
- name: string;
767
- type: "custom" | "nango" | "internal";
768
- description: string;
769
- id: string;
770
- identifier: string;
771
- scopes: string[];
772
- connectionName: string;
773
- }>, "many">;
774
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
775
- id: z.ZodString;
776
- name: z.ZodString;
777
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
778
- url: z.ZodString;
779
- headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
780
- transport: z.ZodEnum<["http", "sse"]>;
781
- tools: z.ZodArray<z.ZodObject<{
782
- name: z.ZodString;
783
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
784
- inputSchema: z.ZodAny;
785
- }, "strip", z.ZodTypeAny, {
786
- name: string;
787
- description?: string | null | undefined;
788
- inputSchema?: any;
789
- }, {
790
- name: string;
791
- description?: string | null | undefined;
792
- inputSchema?: any;
793
- }>, "many">;
794
- }, "strip", z.ZodTypeAny, {
795
- name: string;
796
- id: string;
797
- url: string;
798
- transport: "http" | "sse";
799
- tools: {
800
- name: string;
801
- description?: string | null | undefined;
802
- inputSchema?: any;
803
- }[];
804
- description?: string | null | undefined;
805
- headers?: Record<string, string> | null | undefined;
806
- }, {
807
- name: string;
808
- id: string;
809
- url: string;
810
- transport: "http" | "sse";
811
- tools: {
812
- name: string;
813
- description?: string | null | undefined;
814
- inputSchema?: any;
815
- }[];
816
- description?: string | null | undefined;
817
- headers?: Record<string, string> | null | undefined;
818
- }>, "many">>;
819
- agentKnowledgeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
820
- id: z.ZodNumber;
821
- path: z.ZodString;
822
- state: z.ZodEnum<["pending", "processing", "processed", "error", "skipped"]>;
823
- }, "strip", z.ZodTypeAny, {
824
- path: string;
825
- id: number;
826
- state: "error" | "pending" | "processing" | "processed" | "skipped";
827
- }, {
828
- path: string;
829
- id: number;
830
- state: "error" | "pending" | "processing" | "processed" | "skipped";
831
- }>, "many">>;
832
- memories: z.ZodArray<z.ZodObject<{
833
- id: z.ZodNumber;
834
- memory: z.ZodString;
835
- createdAt: z.ZodDate;
836
- }, "strip", z.ZodTypeAny, {
837
- id: number;
838
- memory: string;
839
- createdAt: Date;
840
- }, {
841
- id: number;
842
- memory: string;
843
- createdAt: Date;
844
- }>, "many">;
845
- }, "strip", z.ZodTypeAny, {
846
- type: "do-task";
847
- triggerEvents: {
848
- name: string;
849
- integrationType: "custom" | "nango" | "internal";
850
- payload: {
851
- summary: string;
852
- event?: unknown;
853
- }[];
854
- description?: string | null | undefined;
855
- integrationName?: string | null | undefined;
856
- trigger_name?: string | null | undefined;
857
- }[];
858
- me: {
859
- name: string;
860
- id: number;
861
- kind: "external" | "eliza" | "openserv";
862
- } & ({
863
- isBuiltByAgentBuilder: false;
864
- } | {
865
- isBuiltByAgentBuilder: true;
866
- systemPrompt: string;
867
- });
868
- task: {
869
- description: string;
870
- id: string | number;
871
- dependencies: {
872
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
873
- description: string;
874
- id: number;
875
- attachments: {
876
- path: string;
877
- id: number;
878
- fullUrl: string;
879
- summary?: string | null | undefined;
880
- }[];
881
- output?: string | null | undefined;
882
- }[];
883
- humanAssistanceRequests: (({
884
- type: "text";
885
- question: {
886
- type: "text";
887
- question: string;
888
- };
889
- } | {
890
- type: "project-manager-plan-review";
891
- question: {
892
- type: "project-manager-plan-review";
893
- tasks: {
894
- expectedOutput: string;
895
- input: string;
896
- index: number;
897
- assigneeAgentId: number;
898
- assigneeAgentName: string;
899
- taskDescription: string;
900
- taskBody: string;
901
- }[];
902
- };
903
- } | {
904
- type: "insufficient-balance";
905
- question: {
906
- type: "insufficient-balance";
907
- };
908
- } | {
909
- type: "json";
910
- question?: any;
911
- }) & {
912
- status: "pending" | "responded";
913
- id: number;
914
- agentDump?: unknown;
915
- humanResponse?: string | null | undefined;
916
- })[];
917
- body?: string | null | undefined;
918
- expectedOutput?: string | null | undefined;
919
- input?: string | null | undefined;
920
- triggerEvent?: {
921
- name: string;
922
- integrationType: "custom" | "nango" | "internal";
923
- payload: {
924
- summary: string;
925
- event?: unknown;
926
- }[];
927
- description?: string | null | undefined;
928
- integrationName?: string | null | undefined;
929
- trigger_name?: string | null | undefined;
930
- } | undefined;
931
- };
932
- workspace: {
933
- id: string | number;
934
- goal: string;
935
- bucket_folder: string;
936
- agents: {
937
- name: string;
938
- id: number;
939
- capabilities_description: string;
940
- integrations?: {
941
- name: string;
942
- type: "custom" | "nango" | "internal";
943
- description: string;
944
- id: string;
945
- identifier: string;
946
- scopes: string[];
947
- connectionName: string;
948
- }[] | undefined;
949
- }[];
950
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
951
- };
952
- integrations: {
953
- name: string;
954
- type: "custom" | "nango" | "internal";
955
- description: string;
956
- id: string;
957
- identifier: string;
958
- scopes: string[];
959
- connectionName: string;
960
- }[];
961
- memories: {
962
- id: number;
963
- memory: string;
964
- createdAt: Date;
965
- }[];
966
- workspaceUpdateToken?: string | null | undefined;
967
- taskUpdateToken?: string | null | undefined;
968
- explicitInput?: unknown;
969
- sessionHistory?: {
970
- triggerEvents: {
971
- name: string;
972
- integrationType: "custom" | "nango" | "internal";
973
- payload: {
974
- summary: string;
975
- event?: unknown;
976
- }[];
977
- description?: string | null | undefined;
978
- integrationName?: string | null | undefined;
979
- trigger_name?: string | null | undefined;
980
- }[];
981
- tasks: {
982
- description: string;
983
- id: number;
984
- body?: string | null | undefined;
985
- expectedOutput?: string | null | undefined;
986
- input?: string | null | undefined;
987
- output?: string | null | undefined;
988
- }[];
989
- }[] | undefined;
990
- workspaceExecutionId?: number | undefined;
991
- mcpServers?: {
992
- name: string;
993
- id: string;
994
- url: string;
995
- transport: "http" | "sse";
996
- tools: {
997
- name: string;
998
- description?: string | null | undefined;
999
- inputSchema?: any;
1000
- }[];
1001
- description?: string | null | undefined;
1002
- headers?: Record<string, string> | null | undefined;
1003
- }[] | undefined;
1004
- agentKnowledgeFiles?: {
1005
- path: string;
1006
- id: number;
1007
- state: "error" | "pending" | "processing" | "processed" | "skipped";
1008
- }[] | undefined;
1009
- }, {
1010
- type: "do-task";
1011
- triggerEvents: {
1012
- name: string;
1013
- integrationType: "custom" | "nango" | "internal";
1014
- payload: {
1015
- summary: string;
1016
- event?: unknown;
1017
- }[];
1018
- description?: string | null | undefined;
1019
- integrationName?: string | null | undefined;
1020
- trigger_name?: string | null | undefined;
1021
- }[];
1022
- me: {
1023
- name: string;
1024
- id: number;
1025
- kind: "external" | "eliza" | "openserv";
1026
- } & ({
1027
- isBuiltByAgentBuilder: false;
1028
- } | {
1029
- isBuiltByAgentBuilder: true;
1030
- systemPrompt: string;
1031
- });
1032
- task: {
1033
- description: string;
1034
- id: string | number;
1035
- dependencies: {
1036
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
1037
- description: string;
1038
- id: number;
1039
- attachments: {
1040
- path: string;
1041
- id: number;
1042
- fullUrl: string;
1043
- summary?: string | null | undefined;
1044
- }[];
1045
- output?: string | null | undefined;
1046
- }[];
1047
- humanAssistanceRequests: (({
1048
- type: "text";
1049
- question: {
1050
- type: "text";
1051
- question: string;
1052
- };
1053
- } | {
1054
- type: "project-manager-plan-review";
1055
- question: {
1056
- type: "project-manager-plan-review";
1057
- tasks: {
1058
- expectedOutput: string;
1059
- input: string;
1060
- index: number;
1061
- assigneeAgentId: number;
1062
- assigneeAgentName: string;
1063
- taskDescription: string;
1064
- taskBody: string;
1065
- }[];
1066
- };
1067
- } | {
1068
- type: "insufficient-balance";
1069
- question: {
1070
- type: "insufficient-balance";
1071
- };
1072
- } | {
1073
- type: "json";
1074
- question?: any;
1075
- }) & {
1076
- status: "pending" | "responded";
1077
- id: number;
1078
- agentDump?: unknown;
1079
- humanResponse?: string | null | undefined;
1080
- })[];
1081
- body?: string | null | undefined;
1082
- expectedOutput?: string | null | undefined;
1083
- input?: string | null | undefined;
1084
- triggerEvent?: {
1085
- name: string;
1086
- integrationType: "custom" | "nango" | "internal";
1087
- payload: {
1088
- summary: string;
1089
- event?: unknown;
1090
- }[];
1091
- description?: string | null | undefined;
1092
- integrationName?: string | null | undefined;
1093
- trigger_name?: string | null | undefined;
1094
- } | undefined;
1095
- };
1096
- workspace: {
1097
- id: string | number;
1098
- goal: string;
1099
- bucket_folder: string;
1100
- agents: {
1101
- name: string;
1102
- id: number;
1103
- capabilities_description: string;
1104
- integrations?: {
1105
- name: string;
1106
- type: "custom" | "nango" | "internal";
1107
- description: string;
1108
- id: string;
1109
- identifier: string;
1110
- scopes: string[];
1111
- connectionName: string;
1112
- }[] | undefined;
1113
- }[];
1114
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
1115
- };
1116
- integrations: {
1117
- name: string;
1118
- type: "custom" | "nango" | "internal";
1119
- description: string;
1120
- id: string;
1121
- identifier: string;
1122
- scopes: string[];
1123
- connectionName: string;
1124
- }[];
1125
- memories: {
1126
- id: number;
1127
- memory: string;
1128
- createdAt: Date;
1129
- }[];
1130
- workspaceUpdateToken?: string | null | undefined;
1131
- taskUpdateToken?: string | null | undefined;
1132
- explicitInput?: unknown;
1133
- sessionHistory?: {
1134
- triggerEvents: {
1135
- name: string;
1136
- integrationType: "custom" | "nango" | "internal";
1137
- payload: {
1138
- summary: string;
1139
- event?: unknown;
1140
- }[];
1141
- description?: string | null | undefined;
1142
- integrationName?: string | null | undefined;
1143
- trigger_name?: string | null | undefined;
1144
- }[];
1145
- tasks: {
1146
- description: string;
1147
- id: number;
1148
- body?: string | null | undefined;
1149
- expectedOutput?: string | null | undefined;
1150
- input?: string | null | undefined;
1151
- output?: string | null | undefined;
1152
- }[];
1153
- }[] | undefined;
1154
- workspaceExecutionId?: number | undefined;
1155
- mcpServers?: {
1156
- name: string;
1157
- id: string;
1158
- url: string;
1159
- transport: "http" | "sse";
1160
- tools: {
1161
- name: string;
1162
- description?: string | null | undefined;
1163
- inputSchema?: any;
1164
- }[];
1165
- description?: string | null | undefined;
1166
- headers?: Record<string, string> | null | undefined;
1167
- }[] | undefined;
1168
- agentKnowledgeFiles?: {
1169
- path: string;
1170
- id: number;
1171
- state: "error" | "pending" | "processing" | "processed" | "skipped";
1172
- }[] | undefined;
1173
- }>;
1174
- export declare const respondChatMessageActionSchema: z.ZodObject<{
1175
- type: z.ZodLiteral<"respond-chat-message">;
1176
- workspaceUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1177
- me: z.ZodIntersection<z.ZodObject<{
1178
- id: z.ZodNumber;
1179
- name: z.ZodString;
1180
- kind: z.ZodEnum<["external", "eliza", "openserv"]>;
1181
- }, "strip", z.ZodTypeAny, {
1182
- name: string;
1183
- id: number;
1184
- kind: "external" | "eliza" | "openserv";
1185
- }, {
1186
- name: string;
1187
- id: number;
1188
- kind: "external" | "eliza" | "openserv";
1189
- }>, z.ZodDiscriminatedUnion<"isBuiltByAgentBuilder", [z.ZodObject<{
1190
- isBuiltByAgentBuilder: z.ZodLiteral<false>;
1191
- }, "strip", z.ZodTypeAny, {
1192
- isBuiltByAgentBuilder: false;
1193
- }, {
1194
- isBuiltByAgentBuilder: false;
1195
- }>, z.ZodObject<{
1196
- isBuiltByAgentBuilder: z.ZodLiteral<true>;
1197
- systemPrompt: z.ZodString;
1198
- }, "strip", z.ZodTypeAny, {
1199
- isBuiltByAgentBuilder: true;
1200
- systemPrompt: string;
1201
- }, {
1202
- isBuiltByAgentBuilder: true;
1203
- systemPrompt: string;
1204
- }>]>>;
1205
- messages: z.ZodArray<z.ZodObject<{
1206
- author: z.ZodEnum<["agent", "user"]>;
1207
- createdAt: z.ZodDate;
1208
- id: z.ZodNumber;
1209
- message: z.ZodString;
1210
- parts: z.ZodDefault<z.ZodOptional<z.ZodObject<{
1211
- artifacts: z.ZodArray<z.ZodIntersection<z.ZodObject<{
1212
- id: z.ZodString;
1213
- }, "strip", z.ZodTypeAny, {
1214
- id: string;
1215
- }, {
1216
- id: string;
1217
- }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1218
- type: z.ZodLiteral<"json">;
1219
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1220
- }, "strip", z.ZodTypeAny, {
1221
- type: "json";
1222
- data: Record<string, unknown>;
1223
- }, {
1224
- type: "json";
1225
- data: Record<string, unknown>;
1226
- }>, z.ZodObject<{
1227
- type: z.ZodLiteral<"artifact-card">;
1228
- data: z.ZodUnknown;
1229
- }, "strip", z.ZodTypeAny, {
1230
- type: "artifact-card";
1231
- data?: unknown;
1232
- }, {
1233
- type: "artifact-card";
1234
- data?: unknown;
1235
- }>, z.ZodObject<{
1236
- type: z.ZodLiteral<"artifact-card-response">;
1237
- artifactId: z.ZodString;
1238
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1239
- }, "strip", z.ZodTypeAny, {
1240
- type: "artifact-card-response";
1241
- artifactId: string;
1242
- data?: unknown;
1243
- }, {
1244
- type: "artifact-card-response";
1245
- artifactId: string;
1246
- data?: unknown;
1247
- }>]>>, "many">;
1248
- }, "strip", z.ZodTypeAny, {
1249
- artifacts: ({
1250
- id: string;
1251
- } & ({
1252
- type: "json";
1253
- data: Record<string, unknown>;
1254
- } | {
1255
- type: "artifact-card";
1256
- data?: unknown;
1257
- } | {
1258
- type: "artifact-card-response";
1259
- artifactId: string;
1260
- data?: unknown;
1261
- }))[];
1262
- }, {
1263
- artifacts: ({
1264
- id: string;
1265
- } & ({
1266
- type: "json";
1267
- data: Record<string, unknown>;
1268
- } | {
1269
- type: "artifact-card";
1270
- data?: unknown;
1271
- } | {
1272
- type: "artifact-card-response";
1273
- artifactId: string;
1274
- data?: unknown;
1275
- }))[];
1276
- }>>>;
1277
- }, "strip", z.ZodTypeAny, {
1278
- message: string;
1279
- id: number;
1280
- createdAt: Date;
1281
- author: "agent" | "user";
1282
- parts: {
1283
- artifacts: ({
1284
- id: string;
1285
- } & ({
1286
- type: "json";
1287
- data: Record<string, unknown>;
1288
- } | {
1289
- type: "artifact-card";
1290
- data?: unknown;
1291
- } | {
1292
- type: "artifact-card-response";
1293
- artifactId: string;
1294
- data?: unknown;
1295
- }))[];
1296
- };
1297
- }, {
1298
- message: string;
1299
- id: number;
1300
- createdAt: Date;
1301
- author: "agent" | "user";
1302
- parts?: {
1303
- artifacts: ({
1304
- id: string;
1305
- } & ({
1306
- type: "json";
1307
- data: Record<string, unknown>;
1308
- } | {
1309
- type: "artifact-card";
1310
- data?: unknown;
1311
- } | {
1312
- type: "artifact-card-response";
1313
- artifactId: string;
1314
- data?: unknown;
1315
- }))[];
1316
- } | undefined;
1317
- }>, "many">;
1318
- workspace: z.ZodObject<{
1319
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1320
- goal: z.ZodString;
1321
- bucket_folder: z.ZodString;
1322
- latest_workspace_execution_status: z.ZodOptional<z.ZodEnum<["error", "active", "deleted", "idle", "running", "paused", "completed", "timed-out"]>>;
1323
- agents: z.ZodArray<z.ZodObject<{
1324
- id: z.ZodNumber;
1325
- name: z.ZodString;
1326
- capabilities_description: z.ZodString;
1327
- }, "strip", z.ZodTypeAny, {
1328
- name: string;
1329
- id: number;
1330
- capabilities_description: string;
1331
- }, {
1332
- name: string;
1333
- id: number;
1334
- capabilities_description: string;
1335
- }>, "many">;
1336
- }, "strip", z.ZodTypeAny, {
1337
- id: string | number;
1338
- goal: string;
1339
- bucket_folder: string;
1340
- agents: {
1341
- name: string;
1342
- id: number;
1343
- capabilities_description: string;
1344
- }[];
1345
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
1346
- }, {
1347
- id: string | number;
1348
- goal: string;
1349
- bucket_folder: string;
1350
- agents: {
1351
- name: string;
1352
- id: number;
1353
- capabilities_description: string;
1354
- }[];
1355
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
1356
- }>;
1357
- integrations: z.ZodArray<z.ZodObject<{
1358
- id: z.ZodString;
1359
- type: z.ZodEnum<["nango", "custom", "internal"]>;
1360
- identifier: z.ZodString;
1361
- name: z.ZodString;
1362
- description: z.ZodString;
1363
- scopes: z.ZodArray<z.ZodString, "many">;
1364
- connectionName: z.ZodString;
1365
- }, "strip", z.ZodTypeAny, {
1366
- name: string;
1367
- type: "custom" | "nango" | "internal";
1368
- description: string;
1369
- id: string;
1370
- identifier: string;
1371
- scopes: string[];
1372
- connectionName: string;
1373
- }, {
1374
- name: string;
1375
- type: "custom" | "nango" | "internal";
1376
- description: string;
1377
- id: string;
1378
- identifier: string;
1379
- scopes: string[];
1380
- connectionName: string;
1381
- }>, "many">;
1382
- memories: z.ZodArray<z.ZodObject<{
1383
- id: z.ZodNumber;
1384
- memory: z.ZodString;
1385
- createdAt: z.ZodDate;
1386
- }, "strip", z.ZodTypeAny, {
1387
- id: number;
1388
- memory: string;
1389
- createdAt: Date;
1390
- }, {
1391
- id: number;
1392
- memory: string;
1393
- createdAt: Date;
1394
- }>, "many">;
1395
- }, "strip", z.ZodTypeAny, {
1396
- type: "respond-chat-message";
1397
- me: {
1398
- name: string;
1399
- id: number;
1400
- kind: "external" | "eliza" | "openserv";
1401
- } & ({
1402
- isBuiltByAgentBuilder: false;
1403
- } | {
1404
- isBuiltByAgentBuilder: true;
1405
- systemPrompt: string;
1406
- });
1407
- workspace: {
1408
- id: string | number;
1409
- goal: string;
1410
- bucket_folder: string;
1411
- agents: {
1412
- name: string;
1413
- id: number;
1414
- capabilities_description: string;
1415
- }[];
1416
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
13
+ };
14
+ type IntegrationType = 'nango' | 'custom' | 'internal';
15
+ type IntegrationConnectionSchema = {
16
+ id: string;
17
+ type: IntegrationType;
18
+ identifier: string;
19
+ name: string;
20
+ description: string;
21
+ scopes: string[];
22
+ connectionName: string;
23
+ };
24
+ type MCPToolSchema = {
25
+ name: string;
26
+ description: string | null;
27
+ inputSchema: unknown;
28
+ };
29
+ type MCPServerSchema = {
30
+ id: string;
31
+ name: string;
32
+ description?: string | null;
33
+ url: string;
34
+ headers?: Record<string, string> | null;
35
+ transport: 'http' | 'sse';
36
+ tools: MCPToolSchema[];
37
+ };
38
+ type ProjectManagerPlanReviewTask = {
39
+ index: number;
40
+ assigneeAgentId: number;
41
+ assigneeAgentName: string;
42
+ taskDescription: string;
43
+ taskBody: string;
44
+ input: string;
45
+ expectedOutput: string;
46
+ };
47
+ type ProjectManagerPlanReviewHumanAssistanceQuestion = {
48
+ tasks: ProjectManagerPlanReviewTask[];
49
+ };
50
+ type TextHumanAssistanceRequest = {
51
+ type: 'text';
52
+ question: {
53
+ type: 'text';
54
+ question: string;
1417
55
  };
1418
- integrations: {
1419
- name: string;
1420
- type: "custom" | "nango" | "internal";
1421
- description: string;
1422
- id: string;
1423
- identifier: string;
1424
- scopes: string[];
1425
- connectionName: string;
1426
- }[];
1427
- memories: {
1428
- id: number;
1429
- memory: string;
1430
- createdAt: Date;
1431
- }[];
1432
- messages: {
1433
- message: string;
1434
- id: number;
1435
- createdAt: Date;
1436
- author: "agent" | "user";
1437
- parts: {
1438
- artifacts: ({
1439
- id: string;
1440
- } & ({
1441
- type: "json";
1442
- data: Record<string, unknown>;
1443
- } | {
1444
- type: "artifact-card";
1445
- data?: unknown;
1446
- } | {
1447
- type: "artifact-card-response";
1448
- artifactId: string;
1449
- data?: unknown;
1450
- }))[];
1451
- };
1452
- }[];
1453
- workspaceUpdateToken?: string | null | undefined;
1454
- }, {
1455
- type: "respond-chat-message";
1456
- me: {
1457
- name: string;
1458
- id: number;
1459
- kind: "external" | "eliza" | "openserv";
1460
- } & ({
1461
- isBuiltByAgentBuilder: false;
1462
- } | {
1463
- isBuiltByAgentBuilder: true;
1464
- systemPrompt: string;
1465
- });
1466
- workspace: {
1467
- id: string | number;
1468
- goal: string;
1469
- bucket_folder: string;
1470
- agents: {
1471
- name: string;
1472
- id: number;
1473
- capabilities_description: string;
1474
- }[];
1475
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
56
+ };
57
+ type ProjectManagerPlanReviewHumanAssistanceRequest = {
58
+ type: 'project-manager-plan-review';
59
+ question: ProjectManagerPlanReviewHumanAssistanceQuestion & {
60
+ type: 'project-manager-plan-review';
1476
61
  };
1477
- integrations: {
1478
- name: string;
1479
- type: "custom" | "nango" | "internal";
1480
- description: string;
1481
- id: string;
1482
- identifier: string;
1483
- scopes: string[];
1484
- connectionName: string;
1485
- }[];
1486
- memories: {
1487
- id: number;
1488
- memory: string;
1489
- createdAt: Date;
1490
- }[];
1491
- messages: {
1492
- message: string;
1493
- id: number;
1494
- createdAt: Date;
1495
- author: "agent" | "user";
1496
- parts?: {
1497
- artifacts: ({
1498
- id: string;
1499
- } & ({
1500
- type: "json";
1501
- data: Record<string, unknown>;
1502
- } | {
1503
- type: "artifact-card";
1504
- data?: unknown;
1505
- } | {
1506
- type: "artifact-card-response";
1507
- artifactId: string;
1508
- data?: unknown;
1509
- }))[];
1510
- } | undefined;
1511
- }[];
1512
- workspaceUpdateToken?: string | null | undefined;
1513
- }>;
1514
- export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1515
- type: z.ZodLiteral<"do-task">;
1516
- workspaceUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1517
- taskUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1518
- explicitInput: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
1519
- triggerEvents: z.ZodArray<z.ZodObject<{
1520
- name: z.ZodString;
1521
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1522
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1523
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
1524
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1525
- payload: z.ZodArray<z.ZodObject<{
1526
- event: z.ZodUnknown;
1527
- summary: z.ZodString;
1528
- }, "strip", z.ZodTypeAny, {
1529
- summary: string;
1530
- event?: unknown;
1531
- }, {
1532
- summary: string;
1533
- event?: unknown;
1534
- }>, "many">;
1535
- }, "strip", z.ZodTypeAny, {
1536
- name: string;
1537
- integrationType: "custom" | "nango" | "internal";
1538
- payload: {
1539
- summary: string;
1540
- event?: unknown;
1541
- }[];
1542
- description?: string | null | undefined;
1543
- integrationName?: string | null | undefined;
1544
- trigger_name?: string | null | undefined;
1545
- }, {
1546
- name: string;
1547
- integrationType: "custom" | "nango" | "internal";
1548
- payload: {
1549
- summary: string;
1550
- event?: unknown;
1551
- }[];
1552
- description?: string | null | undefined;
1553
- integrationName?: string | null | undefined;
1554
- trigger_name?: string | null | undefined;
1555
- }>, "many">;
1556
- sessionHistory: z.ZodOptional<z.ZodArray<z.ZodObject<{
1557
- tasks: z.ZodArray<z.ZodObject<{
1558
- id: z.ZodNumber;
1559
- description: z.ZodString;
1560
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1561
- expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1562
- input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1563
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1564
- }, "strip", z.ZodTypeAny, {
1565
- description: string;
1566
- id: number;
1567
- body?: string | null | undefined;
1568
- expectedOutput?: string | null | undefined;
1569
- input?: string | null | undefined;
1570
- output?: string | null | undefined;
1571
- }, {
1572
- description: string;
1573
- id: number;
1574
- body?: string | null | undefined;
1575
- expectedOutput?: string | null | undefined;
1576
- input?: string | null | undefined;
1577
- output?: string | null | undefined;
1578
- }>, "many">;
1579
- triggerEvents: z.ZodArray<z.ZodObject<{
1580
- name: z.ZodString;
1581
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1582
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1583
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
1584
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1585
- payload: z.ZodArray<z.ZodObject<{
1586
- event: z.ZodUnknown;
1587
- summary: z.ZodString;
1588
- }, "strip", z.ZodTypeAny, {
1589
- summary: string;
1590
- event?: unknown;
1591
- }, {
1592
- summary: string;
1593
- event?: unknown;
1594
- }>, "many">;
1595
- }, "strip", z.ZodTypeAny, {
1596
- name: string;
1597
- integrationType: "custom" | "nango" | "internal";
1598
- payload: {
1599
- summary: string;
1600
- event?: unknown;
1601
- }[];
1602
- description?: string | null | undefined;
1603
- integrationName?: string | null | undefined;
1604
- trigger_name?: string | null | undefined;
1605
- }, {
1606
- name: string;
1607
- integrationType: "custom" | "nango" | "internal";
1608
- payload: {
1609
- summary: string;
1610
- event?: unknown;
1611
- }[];
1612
- description?: string | null | undefined;
1613
- integrationName?: string | null | undefined;
1614
- trigger_name?: string | null | undefined;
1615
- }>, "many">;
1616
- }, "strip", z.ZodTypeAny, {
1617
- triggerEvents: {
1618
- name: string;
1619
- integrationType: "custom" | "nango" | "internal";
1620
- payload: {
1621
- summary: string;
1622
- event?: unknown;
1623
- }[];
1624
- description?: string | null | undefined;
1625
- integrationName?: string | null | undefined;
1626
- trigger_name?: string | null | undefined;
1627
- }[];
1628
- tasks: {
1629
- description: string;
1630
- id: number;
1631
- body?: string | null | undefined;
1632
- expectedOutput?: string | null | undefined;
1633
- input?: string | null | undefined;
1634
- output?: string | null | undefined;
1635
- }[];
1636
- }, {
1637
- triggerEvents: {
1638
- name: string;
1639
- integrationType: "custom" | "nango" | "internal";
1640
- payload: {
1641
- summary: string;
1642
- event?: unknown;
1643
- }[];
1644
- description?: string | null | undefined;
1645
- integrationName?: string | null | undefined;
1646
- trigger_name?: string | null | undefined;
1647
- }[];
1648
- tasks: {
1649
- description: string;
1650
- id: number;
1651
- body?: string | null | undefined;
1652
- expectedOutput?: string | null | undefined;
1653
- input?: string | null | undefined;
1654
- output?: string | null | undefined;
1655
- }[];
1656
- }>, "many">>;
1657
- me: z.ZodIntersection<z.ZodObject<{
1658
- id: z.ZodNumber;
1659
- name: z.ZodString;
1660
- kind: z.ZodEnum<["external", "eliza", "openserv"]>;
1661
- }, "strip", z.ZodTypeAny, {
1662
- name: string;
1663
- id: number;
1664
- kind: "external" | "eliza" | "openserv";
1665
- }, {
1666
- name: string;
1667
- id: number;
1668
- kind: "external" | "eliza" | "openserv";
1669
- }>, z.ZodUnion<[z.ZodObject<{
1670
- isBuiltByAgentBuilder: z.ZodLiteral<false>;
1671
- }, "strip", z.ZodTypeAny, {
1672
- isBuiltByAgentBuilder: false;
1673
- }, {
1674
- isBuiltByAgentBuilder: false;
1675
- }>, z.ZodObject<{
1676
- isBuiltByAgentBuilder: z.ZodLiteral<true>;
1677
- systemPrompt: z.ZodString;
1678
- }, "strip", z.ZodTypeAny, {
1679
- isBuiltByAgentBuilder: true;
1680
- systemPrompt: string;
1681
- }, {
1682
- isBuiltByAgentBuilder: true;
1683
- systemPrompt: string;
1684
- }>]>>;
1685
- task: z.ZodObject<{
1686
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
1687
- description: z.ZodString;
1688
- body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1689
- expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1690
- input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1691
- dependencies: z.ZodArray<z.ZodObject<{
1692
- id: z.ZodNumber;
1693
- description: z.ZodString;
1694
- output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1695
- status: z.ZodEnum<["to-do", "in-progress", "human-assistance-required", "error", "done", "cancelled"]>;
1696
- attachments: z.ZodArray<z.ZodObject<{
1697
- id: z.ZodNumber;
1698
- path: z.ZodString;
1699
- fullUrl: z.ZodString;
1700
- summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1701
- }, "strip", z.ZodTypeAny, {
1702
- path: string;
1703
- id: number;
1704
- fullUrl: string;
1705
- summary?: string | null | undefined;
1706
- }, {
1707
- path: string;
1708
- id: number;
1709
- fullUrl: string;
1710
- summary?: string | null | undefined;
1711
- }>, "many">;
1712
- }, "strip", z.ZodTypeAny, {
1713
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
1714
- description: string;
1715
- id: number;
1716
- attachments: {
1717
- path: string;
1718
- id: number;
1719
- fullUrl: string;
1720
- summary?: string | null | undefined;
1721
- }[];
1722
- output?: string | null | undefined;
1723
- }, {
1724
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
1725
- description: string;
1726
- id: number;
1727
- attachments: {
1728
- path: string;
1729
- id: number;
1730
- fullUrl: string;
1731
- summary?: string | null | undefined;
1732
- }[];
1733
- output?: string | null | undefined;
1734
- }>, "many">;
1735
- humanAssistanceRequests: z.ZodArray<z.ZodIntersection<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
1736
- type: z.ZodLiteral<"text">;
1737
- question: z.ZodObject<{
1738
- type: z.ZodLiteral<"text">;
1739
- question: z.ZodString;
1740
- }, "strip", z.ZodTypeAny, {
1741
- type: "text";
1742
- question: string;
1743
- }, {
1744
- type: "text";
1745
- question: string;
1746
- }>;
1747
- }, "strip", z.ZodTypeAny, {
1748
- type: "text";
1749
- question: {
1750
- type: "text";
1751
- question: string;
1752
- };
1753
- }, {
1754
- type: "text";
1755
- question: {
1756
- type: "text";
1757
- question: string;
1758
- };
1759
- }>, z.ZodObject<{
1760
- type: z.ZodLiteral<"project-manager-plan-review">;
1761
- question: z.ZodObject<{
1762
- tasks: z.ZodArray<z.ZodObject<{
1763
- index: z.ZodNumber;
1764
- assigneeAgentId: z.ZodNumber;
1765
- assigneeAgentName: z.ZodString;
1766
- taskDescription: z.ZodString;
1767
- taskBody: z.ZodString;
1768
- input: z.ZodString;
1769
- expectedOutput: z.ZodString;
1770
- }, "strip", z.ZodTypeAny, {
1771
- expectedOutput: string;
1772
- input: string;
1773
- index: number;
1774
- assigneeAgentId: number;
1775
- assigneeAgentName: string;
1776
- taskDescription: string;
1777
- taskBody: string;
1778
- }, {
1779
- expectedOutput: string;
1780
- input: string;
1781
- index: number;
1782
- assigneeAgentId: number;
1783
- assigneeAgentName: string;
1784
- taskDescription: string;
1785
- taskBody: string;
1786
- }>, "many">;
1787
- } & {
1788
- type: z.ZodLiteral<"project-manager-plan-review">;
1789
- }, "strip", z.ZodTypeAny, {
1790
- type: "project-manager-plan-review";
1791
- tasks: {
1792
- expectedOutput: string;
1793
- input: string;
1794
- index: number;
1795
- assigneeAgentId: number;
1796
- assigneeAgentName: string;
1797
- taskDescription: string;
1798
- taskBody: string;
1799
- }[];
1800
- }, {
1801
- type: "project-manager-plan-review";
1802
- tasks: {
1803
- expectedOutput: string;
1804
- input: string;
1805
- index: number;
1806
- assigneeAgentId: number;
1807
- assigneeAgentName: string;
1808
- taskDescription: string;
1809
- taskBody: string;
1810
- }[];
1811
- }>;
1812
- }, "strip", z.ZodTypeAny, {
1813
- type: "project-manager-plan-review";
1814
- question: {
1815
- type: "project-manager-plan-review";
1816
- tasks: {
1817
- expectedOutput: string;
1818
- input: string;
1819
- index: number;
1820
- assigneeAgentId: number;
1821
- assigneeAgentName: string;
1822
- taskDescription: string;
1823
- taskBody: string;
1824
- }[];
1825
- };
1826
- }, {
1827
- type: "project-manager-plan-review";
1828
- question: {
1829
- type: "project-manager-plan-review";
1830
- tasks: {
1831
- expectedOutput: string;
1832
- input: string;
1833
- index: number;
1834
- assigneeAgentId: number;
1835
- assigneeAgentName: string;
1836
- taskDescription: string;
1837
- taskBody: string;
1838
- }[];
1839
- };
1840
- }>, z.ZodObject<{
1841
- type: z.ZodLiteral<"insufficient-balance">;
1842
- question: z.ZodObject<{
1843
- type: z.ZodLiteral<"insufficient-balance">;
1844
- }, "strip", z.ZodTypeAny, {
1845
- type: "insufficient-balance";
1846
- }, {
1847
- type: "insufficient-balance";
1848
- }>;
1849
- }, "strip", z.ZodTypeAny, {
1850
- type: "insufficient-balance";
1851
- question: {
1852
- type: "insufficient-balance";
1853
- };
1854
- }, {
1855
- type: "insufficient-balance";
1856
- question: {
1857
- type: "insufficient-balance";
1858
- };
1859
- }>, z.ZodObject<{
1860
- type: z.ZodLiteral<"json">;
1861
- question: z.ZodAny;
1862
- }, "strip", z.ZodTypeAny, {
1863
- type: "json";
1864
- question?: any;
1865
- }, {
1866
- type: "json";
1867
- question?: any;
1868
- }>]>, z.ZodObject<{
1869
- agentDump: z.ZodUnknown;
1870
- humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1871
- id: z.ZodNumber;
1872
- status: z.ZodEnum<["pending", "responded"]>;
1873
- }, "strip", z.ZodTypeAny, {
1874
- status: "pending" | "responded";
1875
- id: number;
1876
- agentDump?: unknown;
1877
- humanResponse?: string | null | undefined;
1878
- }, {
1879
- status: "pending" | "responded";
1880
- id: number;
1881
- agentDump?: unknown;
1882
- humanResponse?: string | null | undefined;
1883
- }>>, "many">;
1884
- triggerEvent: z.ZodOptional<z.ZodObject<{
1885
- name: z.ZodString;
1886
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1887
- integrationName: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1888
- integrationType: z.ZodEnum<["nango", "custom", "internal"]>;
1889
- trigger_name: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1890
- payload: z.ZodArray<z.ZodObject<{
1891
- event: z.ZodUnknown;
1892
- summary: z.ZodString;
1893
- }, "strip", z.ZodTypeAny, {
1894
- summary: string;
1895
- event?: unknown;
1896
- }, {
1897
- summary: string;
1898
- event?: unknown;
1899
- }>, "many">;
1900
- }, "strip", z.ZodTypeAny, {
1901
- name: string;
1902
- integrationType: "custom" | "nango" | "internal";
1903
- payload: {
1904
- summary: string;
1905
- event?: unknown;
1906
- }[];
1907
- description?: string | null | undefined;
1908
- integrationName?: string | null | undefined;
1909
- trigger_name?: string | null | undefined;
1910
- }, {
1911
- name: string;
1912
- integrationType: "custom" | "nango" | "internal";
1913
- payload: {
1914
- summary: string;
1915
- event?: unknown;
1916
- }[];
1917
- description?: string | null | undefined;
1918
- integrationName?: string | null | undefined;
1919
- trigger_name?: string | null | undefined;
1920
- }>>;
1921
- }, "strip", z.ZodTypeAny, {
1922
- description: string;
1923
- id: string | number;
1924
- dependencies: {
1925
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
1926
- description: string;
1927
- id: number;
1928
- attachments: {
1929
- path: string;
1930
- id: number;
1931
- fullUrl: string;
1932
- summary?: string | null | undefined;
1933
- }[];
1934
- output?: string | null | undefined;
1935
- }[];
1936
- humanAssistanceRequests: (({
1937
- type: "text";
1938
- question: {
1939
- type: "text";
1940
- question: string;
1941
- };
1942
- } | {
1943
- type: "project-manager-plan-review";
1944
- question: {
1945
- type: "project-manager-plan-review";
1946
- tasks: {
1947
- expectedOutput: string;
1948
- input: string;
1949
- index: number;
1950
- assigneeAgentId: number;
1951
- assigneeAgentName: string;
1952
- taskDescription: string;
1953
- taskBody: string;
1954
- }[];
1955
- };
1956
- } | {
1957
- type: "insufficient-balance";
1958
- question: {
1959
- type: "insufficient-balance";
1960
- };
1961
- } | {
1962
- type: "json";
1963
- question?: any;
1964
- }) & {
1965
- status: "pending" | "responded";
1966
- id: number;
1967
- agentDump?: unknown;
1968
- humanResponse?: string | null | undefined;
1969
- })[];
1970
- body?: string | null | undefined;
1971
- expectedOutput?: string | null | undefined;
1972
- input?: string | null | undefined;
1973
- triggerEvent?: {
1974
- name: string;
1975
- integrationType: "custom" | "nango" | "internal";
1976
- payload: {
1977
- summary: string;
1978
- event?: unknown;
1979
- }[];
1980
- description?: string | null | undefined;
1981
- integrationName?: string | null | undefined;
1982
- trigger_name?: string | null | undefined;
1983
- } | undefined;
1984
- }, {
1985
- description: string;
1986
- id: string | number;
1987
- dependencies: {
1988
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
1989
- description: string;
1990
- id: number;
1991
- attachments: {
1992
- path: string;
1993
- id: number;
1994
- fullUrl: string;
1995
- summary?: string | null | undefined;
1996
- }[];
1997
- output?: string | null | undefined;
1998
- }[];
1999
- humanAssistanceRequests: (({
2000
- type: "text";
2001
- question: {
2002
- type: "text";
2003
- question: string;
2004
- };
2005
- } | {
2006
- type: "project-manager-plan-review";
2007
- question: {
2008
- type: "project-manager-plan-review";
2009
- tasks: {
2010
- expectedOutput: string;
2011
- input: string;
2012
- index: number;
2013
- assigneeAgentId: number;
2014
- assigneeAgentName: string;
2015
- taskDescription: string;
2016
- taskBody: string;
2017
- }[];
2018
- };
2019
- } | {
2020
- type: "insufficient-balance";
2021
- question: {
2022
- type: "insufficient-balance";
2023
- };
2024
- } | {
2025
- type: "json";
2026
- question?: any;
2027
- }) & {
2028
- status: "pending" | "responded";
2029
- id: number;
2030
- agentDump?: unknown;
2031
- humanResponse?: string | null | undefined;
2032
- })[];
2033
- body?: string | null | undefined;
2034
- expectedOutput?: string | null | undefined;
2035
- input?: string | null | undefined;
2036
- triggerEvent?: {
2037
- name: string;
2038
- integrationType: "custom" | "nango" | "internal";
2039
- payload: {
2040
- summary: string;
2041
- event?: unknown;
2042
- }[];
2043
- description?: string | null | undefined;
2044
- integrationName?: string | null | undefined;
2045
- trigger_name?: string | null | undefined;
2046
- } | undefined;
2047
- }>;
2048
- workspace: z.ZodObject<{
2049
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2050
- goal: z.ZodString;
2051
- bucket_folder: z.ZodString;
2052
- latest_workspace_execution_status: z.ZodOptional<z.ZodEnum<["error", "active", "deleted", "idle", "running", "paused", "completed", "timed-out"]>>;
2053
- agents: z.ZodArray<z.ZodObject<{
2054
- id: z.ZodNumber;
2055
- name: z.ZodString;
2056
- capabilities_description: z.ZodString;
2057
- integrations: z.ZodOptional<z.ZodArray<z.ZodObject<{
2058
- id: z.ZodString;
2059
- type: z.ZodEnum<["nango", "custom", "internal"]>;
2060
- identifier: z.ZodString;
2061
- name: z.ZodString;
2062
- description: z.ZodString;
2063
- scopes: z.ZodArray<z.ZodString, "many">;
2064
- connectionName: z.ZodString;
2065
- }, "strip", z.ZodTypeAny, {
2066
- name: string;
2067
- type: "custom" | "nango" | "internal";
2068
- description: string;
2069
- id: string;
2070
- identifier: string;
2071
- scopes: string[];
2072
- connectionName: string;
2073
- }, {
2074
- name: string;
2075
- type: "custom" | "nango" | "internal";
2076
- description: string;
2077
- id: string;
2078
- identifier: string;
2079
- scopes: string[];
2080
- connectionName: string;
2081
- }>, "many">>;
2082
- }, "strip", z.ZodTypeAny, {
2083
- name: string;
2084
- id: number;
2085
- capabilities_description: string;
2086
- integrations?: {
2087
- name: string;
2088
- type: "custom" | "nango" | "internal";
2089
- description: string;
2090
- id: string;
2091
- identifier: string;
2092
- scopes: string[];
2093
- connectionName: string;
2094
- }[] | undefined;
2095
- }, {
2096
- name: string;
2097
- id: number;
2098
- capabilities_description: string;
2099
- integrations?: {
2100
- name: string;
2101
- type: "custom" | "nango" | "internal";
2102
- description: string;
2103
- id: string;
2104
- identifier: string;
2105
- scopes: string[];
2106
- connectionName: string;
2107
- }[] | undefined;
2108
- }>, "many">;
2109
- }, "strip", z.ZodTypeAny, {
2110
- id: string | number;
2111
- goal: string;
2112
- bucket_folder: string;
2113
- agents: {
2114
- name: string;
2115
- id: number;
2116
- capabilities_description: string;
2117
- integrations?: {
2118
- name: string;
2119
- type: "custom" | "nango" | "internal";
2120
- description: string;
2121
- id: string;
2122
- identifier: string;
2123
- scopes: string[];
2124
- connectionName: string;
2125
- }[] | undefined;
2126
- }[];
2127
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2128
- }, {
2129
- id: string | number;
2130
- goal: string;
2131
- bucket_folder: string;
2132
- agents: {
2133
- name: string;
2134
- id: number;
2135
- capabilities_description: string;
2136
- integrations?: {
2137
- name: string;
2138
- type: "custom" | "nango" | "internal";
2139
- description: string;
2140
- id: string;
2141
- identifier: string;
2142
- scopes: string[];
2143
- connectionName: string;
2144
- }[] | undefined;
2145
- }[];
2146
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2147
- }>;
2148
- workspaceExecutionId: z.ZodOptional<z.ZodNumber>;
2149
- integrations: z.ZodArray<z.ZodObject<{
2150
- id: z.ZodString;
2151
- type: z.ZodEnum<["nango", "custom", "internal"]>;
2152
- identifier: z.ZodString;
2153
- name: z.ZodString;
2154
- description: z.ZodString;
2155
- scopes: z.ZodArray<z.ZodString, "many">;
2156
- connectionName: z.ZodString;
2157
- }, "strip", z.ZodTypeAny, {
2158
- name: string;
2159
- type: "custom" | "nango" | "internal";
2160
- description: string;
2161
- id: string;
2162
- identifier: string;
2163
- scopes: string[];
2164
- connectionName: string;
2165
- }, {
2166
- name: string;
2167
- type: "custom" | "nango" | "internal";
2168
- description: string;
2169
- id: string;
2170
- identifier: string;
2171
- scopes: string[];
2172
- connectionName: string;
2173
- }>, "many">;
2174
- mcpServers: z.ZodOptional<z.ZodArray<z.ZodObject<{
2175
- id: z.ZodString;
2176
- name: z.ZodString;
2177
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2178
- url: z.ZodString;
2179
- headers: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodString>>>;
2180
- transport: z.ZodEnum<["http", "sse"]>;
2181
- tools: z.ZodArray<z.ZodObject<{
2182
- name: z.ZodString;
2183
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2184
- inputSchema: z.ZodAny;
2185
- }, "strip", z.ZodTypeAny, {
2186
- name: string;
2187
- description?: string | null | undefined;
2188
- inputSchema?: any;
2189
- }, {
2190
- name: string;
2191
- description?: string | null | undefined;
2192
- inputSchema?: any;
2193
- }>, "many">;
2194
- }, "strip", z.ZodTypeAny, {
2195
- name: string;
2196
- id: string;
2197
- url: string;
2198
- transport: "http" | "sse";
2199
- tools: {
2200
- name: string;
2201
- description?: string | null | undefined;
2202
- inputSchema?: any;
2203
- }[];
2204
- description?: string | null | undefined;
2205
- headers?: Record<string, string> | null | undefined;
2206
- }, {
2207
- name: string;
2208
- id: string;
2209
- url: string;
2210
- transport: "http" | "sse";
2211
- tools: {
2212
- name: string;
2213
- description?: string | null | undefined;
2214
- inputSchema?: any;
2215
- }[];
2216
- description?: string | null | undefined;
2217
- headers?: Record<string, string> | null | undefined;
2218
- }>, "many">>;
2219
- agentKnowledgeFiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
2220
- id: z.ZodNumber;
2221
- path: z.ZodString;
2222
- state: z.ZodEnum<["pending", "processing", "processed", "error", "skipped"]>;
2223
- }, "strip", z.ZodTypeAny, {
2224
- path: string;
2225
- id: number;
2226
- state: "error" | "pending" | "processing" | "processed" | "skipped";
2227
- }, {
2228
- path: string;
2229
- id: number;
2230
- state: "error" | "pending" | "processing" | "processed" | "skipped";
2231
- }>, "many">>;
2232
- memories: z.ZodArray<z.ZodObject<{
2233
- id: z.ZodNumber;
2234
- memory: z.ZodString;
2235
- createdAt: z.ZodDate;
2236
- }, "strip", z.ZodTypeAny, {
2237
- id: number;
2238
- memory: string;
2239
- createdAt: Date;
2240
- }, {
2241
- id: number;
2242
- memory: string;
2243
- createdAt: Date;
2244
- }>, "many">;
2245
- }, "strip", z.ZodTypeAny, {
2246
- type: "do-task";
2247
- triggerEvents: {
2248
- name: string;
2249
- integrationType: "custom" | "nango" | "internal";
2250
- payload: {
2251
- summary: string;
2252
- event?: unknown;
2253
- }[];
2254
- description?: string | null | undefined;
2255
- integrationName?: string | null | undefined;
2256
- trigger_name?: string | null | undefined;
2257
- }[];
2258
- me: {
2259
- name: string;
2260
- id: number;
2261
- kind: "external" | "eliza" | "openserv";
2262
- } & ({
2263
- isBuiltByAgentBuilder: false;
2264
- } | {
2265
- isBuiltByAgentBuilder: true;
2266
- systemPrompt: string;
2267
- });
2268
- task: {
2269
- description: string;
2270
- id: string | number;
2271
- dependencies: {
2272
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
2273
- description: string;
2274
- id: number;
2275
- attachments: {
2276
- path: string;
2277
- id: number;
2278
- fullUrl: string;
2279
- summary?: string | null | undefined;
2280
- }[];
2281
- output?: string | null | undefined;
2282
- }[];
2283
- humanAssistanceRequests: (({
2284
- type: "text";
2285
- question: {
2286
- type: "text";
2287
- question: string;
2288
- };
2289
- } | {
2290
- type: "project-manager-plan-review";
2291
- question: {
2292
- type: "project-manager-plan-review";
2293
- tasks: {
2294
- expectedOutput: string;
2295
- input: string;
2296
- index: number;
2297
- assigneeAgentId: number;
2298
- assigneeAgentName: string;
2299
- taskDescription: string;
2300
- taskBody: string;
2301
- }[];
2302
- };
2303
- } | {
2304
- type: "insufficient-balance";
2305
- question: {
2306
- type: "insufficient-balance";
2307
- };
2308
- } | {
2309
- type: "json";
2310
- question?: any;
2311
- }) & {
2312
- status: "pending" | "responded";
2313
- id: number;
2314
- agentDump?: unknown;
2315
- humanResponse?: string | null | undefined;
2316
- })[];
2317
- body?: string | null | undefined;
2318
- expectedOutput?: string | null | undefined;
2319
- input?: string | null | undefined;
2320
- triggerEvent?: {
2321
- name: string;
2322
- integrationType: "custom" | "nango" | "internal";
2323
- payload: {
2324
- summary: string;
2325
- event?: unknown;
2326
- }[];
2327
- description?: string | null | undefined;
2328
- integrationName?: string | null | undefined;
2329
- trigger_name?: string | null | undefined;
2330
- } | undefined;
62
+ };
63
+ type InsufficientBalanceHumanAssistanceRequest = {
64
+ type: 'insufficient-balance';
65
+ question: {
66
+ type: 'insufficient-balance';
2331
67
  };
2332
- workspace: {
2333
- id: string | number;
2334
- goal: string;
2335
- bucket_folder: string;
2336
- agents: {
2337
- name: string;
2338
- id: number;
2339
- capabilities_description: string;
2340
- integrations?: {
2341
- name: string;
2342
- type: "custom" | "nango" | "internal";
2343
- description: string;
2344
- id: string;
2345
- identifier: string;
2346
- scopes: string[];
2347
- connectionName: string;
2348
- }[] | undefined;
2349
- }[];
2350
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
68
+ };
69
+ type JSONHumanAssistanceRequest = {
70
+ type: 'json';
71
+ question: {
72
+ type: 'json';
73
+ question: unknown;
2351
74
  };
2352
- integrations: {
2353
- name: string;
2354
- type: "custom" | "nango" | "internal";
2355
- description: string;
2356
- id: string;
2357
- identifier: string;
2358
- scopes: string[];
2359
- connectionName: string;
2360
- }[];
2361
- memories: {
2362
- id: number;
2363
- memory: string;
2364
- createdAt: Date;
75
+ };
76
+ type HumanAssistanceRequest = TextHumanAssistanceRequest | ProjectManagerPlanReviewHumanAssistanceRequest | InsufficientBalanceHumanAssistanceRequest | JSONHumanAssistanceRequest;
77
+ type TriggerEvent = {
78
+ name: string;
79
+ description?: string | null;
80
+ integrationName?: string | null;
81
+ integrationType: IntegrationType;
82
+ trigger_name?: string | null;
83
+ payload: {
84
+ event: unknown;
85
+ summary: string;
2365
86
  }[];
2366
- workspaceUpdateToken?: string | null | undefined;
2367
- taskUpdateToken?: string | null | undefined;
2368
- explicitInput?: unknown;
2369
- sessionHistory?: {
2370
- triggerEvents: {
2371
- name: string;
2372
- integrationType: "custom" | "nango" | "internal";
2373
- payload: {
2374
- summary: string;
2375
- event?: unknown;
2376
- }[];
2377
- description?: string | null | undefined;
2378
- integrationName?: string | null | undefined;
2379
- trigger_name?: string | null | undefined;
2380
- }[];
2381
- tasks: {
2382
- description: string;
2383
- id: number;
2384
- body?: string | null | undefined;
2385
- expectedOutput?: string | null | undefined;
2386
- input?: string | null | undefined;
2387
- output?: string | null | undefined;
2388
- }[];
2389
- }[] | undefined;
2390
- workspaceExecutionId?: number | undefined;
2391
- mcpServers?: {
2392
- name: string;
87
+ };
88
+ type TaskDependency = {
89
+ id: number | string;
90
+ description: string;
91
+ output?: string | null;
92
+ status: TaskStatus;
93
+ attachments: {
2393
94
  id: string;
2394
- url: string;
2395
- transport: "http" | "sse";
2396
- tools: {
2397
- name: string;
2398
- description?: string | null | undefined;
2399
- inputSchema?: any;
2400
- }[];
2401
- description?: string | null | undefined;
2402
- headers?: Record<string, string> | null | undefined;
2403
- }[] | undefined;
2404
- agentKnowledgeFiles?: {
2405
95
  path: string;
2406
- id: number;
2407
- state: "error" | "pending" | "processing" | "processed" | "skipped";
2408
- }[] | undefined;
2409
- }, {
2410
- type: "do-task";
2411
- triggerEvents: {
2412
- name: string;
2413
- integrationType: "custom" | "nango" | "internal";
2414
- payload: {
2415
- summary: string;
2416
- event?: unknown;
2417
- }[];
2418
- description?: string | null | undefined;
2419
- integrationName?: string | null | undefined;
2420
- trigger_name?: string | null | undefined;
96
+ fullUrl: string;
97
+ summary?: string | null;
2421
98
  }[];
2422
- me: {
2423
- name: string;
2424
- id: number;
2425
- kind: "external" | "eliza" | "openserv";
2426
- } & ({
2427
- isBuiltByAgentBuilder: false;
2428
- } | {
2429
- isBuiltByAgentBuilder: true;
2430
- systemPrompt: string;
2431
- });
99
+ };
100
+ type WorkspaceAgent = {
101
+ id: number;
102
+ name: string;
103
+ capabilities_description: string;
104
+ integrations?: IntegrationConnectionSchema[];
105
+ };
106
+ type ExecutionStatus = 'error' | 'active' | 'deleted' | 'idle' | 'running' | 'paused' | 'completed' | 'timed-out';
107
+ type ActionWorkspace = {
108
+ id: number | string;
109
+ goal: string;
110
+ bucket_folder: string;
111
+ latest_workspace_execution_status?: ExecutionStatus;
112
+ agents: WorkspaceAgent[];
113
+ };
114
+ type NoCodeActionAssignee = {
115
+ id: number;
116
+ name: string;
117
+ kind: AgentKind;
118
+ isBuiltByAgentBuilder: true;
119
+ systemPrompt: string;
120
+ };
121
+ type CustomActionAssignee = {
122
+ id: number;
123
+ name: string;
124
+ kind: AgentKind;
125
+ isBuiltByAgentBuilder: false;
126
+ };
127
+ type ActionAssignee = NoCodeActionAssignee | CustomActionAssignee;
128
+ type Memory = {
129
+ id: number;
130
+ memory: string;
131
+ createdAt: string | Date;
132
+ };
133
+ type SessionHistoryTask = {
134
+ id: number;
135
+ description: string;
136
+ body?: string | null;
137
+ expectedOutput?: string | null;
138
+ input?: string | null;
139
+ output?: string | null;
140
+ };
141
+ type SessionHistoryItem = {
142
+ tasks: SessionHistoryTask[];
143
+ triggerEvents: TriggerEvent[];
144
+ };
145
+ type AgentKnowledgeFile = {
146
+ id: number;
147
+ path: string;
148
+ state: 'pending' | 'processing' | 'processed' | 'error' | 'skipped';
149
+ };
150
+ export type DoTaskActionSchema = {
151
+ type: 'do-task';
152
+ workspaceUpdateToken?: string | null;
153
+ taskUpdateToken?: string | null;
154
+ explicitInput?: unknown | null;
155
+ triggerEvents?: TriggerEvent[];
156
+ sessionHistory?: SessionHistoryItem[];
157
+ me: ActionAssignee;
2432
158
  task: {
159
+ id: number | string;
2433
160
  description: string;
2434
- id: string | number;
2435
- dependencies: {
2436
- status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
2437
- description: string;
2438
- id: number;
2439
- attachments: {
2440
- path: string;
2441
- id: number;
2442
- fullUrl: string;
2443
- summary?: string | null | undefined;
2444
- }[];
2445
- output?: string | null | undefined;
2446
- }[];
2447
- humanAssistanceRequests: (({
2448
- type: "text";
2449
- question: {
2450
- type: "text";
2451
- question: string;
2452
- };
2453
- } | {
2454
- type: "project-manager-plan-review";
2455
- question: {
2456
- type: "project-manager-plan-review";
2457
- tasks: {
2458
- expectedOutput: string;
2459
- input: string;
2460
- index: number;
2461
- assigneeAgentId: number;
2462
- assigneeAgentName: string;
2463
- taskDescription: string;
2464
- taskBody: string;
2465
- }[];
2466
- };
2467
- } | {
2468
- type: "insufficient-balance";
2469
- question: {
2470
- type: "insufficient-balance";
2471
- };
2472
- } | {
2473
- type: "json";
2474
- question?: any;
2475
- }) & {
2476
- status: "pending" | "responded";
2477
- id: number;
2478
- agentDump?: unknown;
2479
- humanResponse?: string | null | undefined;
161
+ body?: string | null;
162
+ expectedOutput?: string | null;
163
+ input?: string | null;
164
+ dependencies: TaskDependency[];
165
+ humanAssistanceRequests: (HumanAssistanceRequest & {
166
+ agentDump: unknown;
167
+ humanResponse?: string | null;
168
+ id: number;
169
+ status: 'pending' | 'responded';
2480
170
  })[];
2481
- body?: string | null | undefined;
2482
- expectedOutput?: string | null | undefined;
2483
- input?: string | null | undefined;
2484
- triggerEvent?: {
2485
- name: string;
2486
- integrationType: "custom" | "nango" | "internal";
2487
- payload: {
2488
- summary: string;
2489
- event?: unknown;
2490
- }[];
2491
- description?: string | null | undefined;
2492
- integrationName?: string | null | undefined;
2493
- trigger_name?: string | null | undefined;
2494
- } | undefined;
2495
- };
2496
- workspace: {
2497
- id: string | number;
2498
- goal: string;
2499
- bucket_folder: string;
2500
- agents: {
2501
- name: string;
2502
- id: number;
2503
- capabilities_description: string;
2504
- integrations?: {
2505
- name: string;
2506
- type: "custom" | "nango" | "internal";
2507
- description: string;
2508
- id: string;
2509
- identifier: string;
2510
- scopes: string[];
2511
- connectionName: string;
2512
- }[] | undefined;
2513
- }[];
2514
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2515
- };
2516
- integrations: {
2517
- name: string;
2518
- type: "custom" | "nango" | "internal";
2519
- description: string;
2520
- id: string;
2521
- identifier: string;
2522
- scopes: string[];
2523
- connectionName: string;
2524
- }[];
2525
- memories: {
2526
- id: number;
2527
- memory: string;
2528
- createdAt: Date;
2529
- }[];
2530
- workspaceUpdateToken?: string | null | undefined;
2531
- taskUpdateToken?: string | null | undefined;
2532
- explicitInput?: unknown;
2533
- sessionHistory?: {
2534
- triggerEvents: {
2535
- name: string;
2536
- integrationType: "custom" | "nango" | "internal";
2537
- payload: {
2538
- summary: string;
2539
- event?: unknown;
2540
- }[];
2541
- description?: string | null | undefined;
2542
- integrationName?: string | null | undefined;
2543
- trigger_name?: string | null | undefined;
2544
- }[];
2545
- tasks: {
2546
- description: string;
2547
- id: number;
2548
- body?: string | null | undefined;
2549
- expectedOutput?: string | null | undefined;
2550
- input?: string | null | undefined;
2551
- output?: string | null | undefined;
2552
- }[];
2553
- }[] | undefined;
2554
- workspaceExecutionId?: number | undefined;
2555
- mcpServers?: {
2556
- name: string;
2557
- id: string;
2558
- url: string;
2559
- transport: "http" | "sse";
2560
- tools: {
2561
- name: string;
2562
- description?: string | null | undefined;
2563
- inputSchema?: any;
2564
- }[];
2565
- description?: string | null | undefined;
2566
- headers?: Record<string, string> | null | undefined;
2567
- }[] | undefined;
2568
- agentKnowledgeFiles?: {
2569
- path: string;
2570
- id: number;
2571
- state: "error" | "pending" | "processing" | "processed" | "skipped";
2572
- }[] | undefined;
2573
- }>, z.ZodObject<{
2574
- type: z.ZodLiteral<"respond-chat-message">;
2575
- workspaceUpdateToken: z.ZodOptional<z.ZodNullable<z.ZodString>>;
2576
- me: z.ZodIntersection<z.ZodObject<{
2577
- id: z.ZodNumber;
2578
- name: z.ZodString;
2579
- kind: z.ZodEnum<["external", "eliza", "openserv"]>;
2580
- }, "strip", z.ZodTypeAny, {
2581
- name: string;
2582
- id: number;
2583
- kind: "external" | "eliza" | "openserv";
2584
- }, {
2585
- name: string;
2586
- id: number;
2587
- kind: "external" | "eliza" | "openserv";
2588
- }>, z.ZodDiscriminatedUnion<"isBuiltByAgentBuilder", [z.ZodObject<{
2589
- isBuiltByAgentBuilder: z.ZodLiteral<false>;
2590
- }, "strip", z.ZodTypeAny, {
2591
- isBuiltByAgentBuilder: false;
2592
- }, {
2593
- isBuiltByAgentBuilder: false;
2594
- }>, z.ZodObject<{
2595
- isBuiltByAgentBuilder: z.ZodLiteral<true>;
2596
- systemPrompt: z.ZodString;
2597
- }, "strip", z.ZodTypeAny, {
2598
- isBuiltByAgentBuilder: true;
2599
- systemPrompt: string;
2600
- }, {
2601
- isBuiltByAgentBuilder: true;
2602
- systemPrompt: string;
2603
- }>]>>;
2604
- messages: z.ZodArray<z.ZodObject<{
2605
- author: z.ZodEnum<["agent", "user"]>;
2606
- createdAt: z.ZodDate;
2607
- id: z.ZodNumber;
2608
- message: z.ZodString;
2609
- parts: z.ZodDefault<z.ZodOptional<z.ZodObject<{
2610
- artifacts: z.ZodArray<z.ZodIntersection<z.ZodObject<{
2611
- id: z.ZodString;
2612
- }, "strip", z.ZodTypeAny, {
2613
- id: string;
2614
- }, {
2615
- id: string;
2616
- }>, z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
2617
- type: z.ZodLiteral<"json">;
2618
- data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2619
- }, "strip", z.ZodTypeAny, {
2620
- type: "json";
2621
- data: Record<string, unknown>;
2622
- }, {
2623
- type: "json";
2624
- data: Record<string, unknown>;
2625
- }>, z.ZodObject<{
2626
- type: z.ZodLiteral<"artifact-card">;
2627
- data: z.ZodUnknown;
2628
- }, "strip", z.ZodTypeAny, {
2629
- type: "artifact-card";
2630
- data?: unknown;
2631
- }, {
2632
- type: "artifact-card";
2633
- data?: unknown;
2634
- }>, z.ZodObject<{
2635
- type: z.ZodLiteral<"artifact-card-response">;
2636
- artifactId: z.ZodString;
2637
- data: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
2638
- }, "strip", z.ZodTypeAny, {
2639
- type: "artifact-card-response";
2640
- artifactId: string;
2641
- data?: unknown;
2642
- }, {
2643
- type: "artifact-card-response";
2644
- artifactId: string;
2645
- data?: unknown;
2646
- }>]>>, "many">;
2647
- }, "strip", z.ZodTypeAny, {
2648
- artifacts: ({
2649
- id: string;
2650
- } & ({
2651
- type: "json";
2652
- data: Record<string, unknown>;
2653
- } | {
2654
- type: "artifact-card";
2655
- data?: unknown;
2656
- } | {
2657
- type: "artifact-card-response";
2658
- artifactId: string;
2659
- data?: unknown;
2660
- }))[];
2661
- }, {
2662
- artifacts: ({
2663
- id: string;
2664
- } & ({
2665
- type: "json";
2666
- data: Record<string, unknown>;
2667
- } | {
2668
- type: "artifact-card";
2669
- data?: unknown;
2670
- } | {
2671
- type: "artifact-card-response";
2672
- artifactId: string;
2673
- data?: unknown;
2674
- }))[];
2675
- }>>>;
2676
- }, "strip", z.ZodTypeAny, {
2677
- message: string;
2678
- id: number;
2679
- createdAt: Date;
2680
- author: "agent" | "user";
2681
- parts: {
2682
- artifacts: ({
2683
- id: string;
2684
- } & ({
2685
- type: "json";
2686
- data: Record<string, unknown>;
2687
- } | {
2688
- type: "artifact-card";
2689
- data?: unknown;
2690
- } | {
2691
- type: "artifact-card-response";
2692
- artifactId: string;
2693
- data?: unknown;
2694
- }))[];
2695
- };
2696
- }, {
2697
- message: string;
2698
- id: number;
2699
- createdAt: Date;
2700
- author: "agent" | "user";
2701
- parts?: {
2702
- artifacts: ({
2703
- id: string;
2704
- } & ({
2705
- type: "json";
2706
- data: Record<string, unknown>;
2707
- } | {
2708
- type: "artifact-card";
2709
- data?: unknown;
2710
- } | {
2711
- type: "artifact-card-response";
2712
- artifactId: string;
2713
- data?: unknown;
2714
- }))[];
2715
- } | undefined;
2716
- }>, "many">;
2717
- workspace: z.ZodObject<{
2718
- id: z.ZodUnion<[z.ZodNumber, z.ZodString]>;
2719
- goal: z.ZodString;
2720
- bucket_folder: z.ZodString;
2721
- latest_workspace_execution_status: z.ZodOptional<z.ZodEnum<["error", "active", "deleted", "idle", "running", "paused", "completed", "timed-out"]>>;
2722
- agents: z.ZodArray<z.ZodObject<{
2723
- id: z.ZodNumber;
2724
- name: z.ZodString;
2725
- capabilities_description: z.ZodString;
2726
- }, "strip", z.ZodTypeAny, {
2727
- name: string;
2728
- id: number;
2729
- capabilities_description: string;
2730
- }, {
2731
- name: string;
2732
- id: number;
2733
- capabilities_description: string;
2734
- }>, "many">;
2735
- }, "strip", z.ZodTypeAny, {
2736
- id: string | number;
2737
- goal: string;
2738
- bucket_folder: string;
2739
- agents: {
2740
- name: string;
2741
- id: number;
2742
- capabilities_description: string;
2743
- }[];
2744
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2745
- }, {
2746
- id: string | number;
2747
- goal: string;
2748
- bucket_folder: string;
2749
- agents: {
2750
- name: string;
2751
- id: number;
2752
- capabilities_description: string;
2753
- }[];
2754
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2755
- }>;
2756
- integrations: z.ZodArray<z.ZodObject<{
2757
- id: z.ZodString;
2758
- type: z.ZodEnum<["nango", "custom", "internal"]>;
2759
- identifier: z.ZodString;
2760
- name: z.ZodString;
2761
- description: z.ZodString;
2762
- scopes: z.ZodArray<z.ZodString, "many">;
2763
- connectionName: z.ZodString;
2764
- }, "strip", z.ZodTypeAny, {
2765
- name: string;
2766
- type: "custom" | "nango" | "internal";
2767
- description: string;
2768
- id: string;
2769
- identifier: string;
2770
- scopes: string[];
2771
- connectionName: string;
2772
- }, {
2773
- name: string;
2774
- type: "custom" | "nango" | "internal";
2775
- description: string;
2776
- id: string;
2777
- identifier: string;
2778
- scopes: string[];
2779
- connectionName: string;
2780
- }>, "many">;
2781
- memories: z.ZodArray<z.ZodObject<{
2782
- id: z.ZodNumber;
2783
- memory: z.ZodString;
2784
- createdAt: z.ZodDate;
2785
- }, "strip", z.ZodTypeAny, {
2786
- id: number;
2787
- memory: string;
2788
- createdAt: Date;
2789
- }, {
2790
- id: number;
2791
- memory: string;
2792
- createdAt: Date;
2793
- }>, "many">;
2794
- }, "strip", z.ZodTypeAny, {
2795
- type: "respond-chat-message";
2796
- me: {
2797
- name: string;
2798
- id: number;
2799
- kind: "external" | "eliza" | "openserv";
2800
- } & ({
2801
- isBuiltByAgentBuilder: false;
2802
- } | {
2803
- isBuiltByAgentBuilder: true;
2804
- systemPrompt: string;
2805
- });
2806
- workspace: {
2807
- id: string | number;
2808
- goal: string;
2809
- bucket_folder: string;
2810
- agents: {
2811
- name: string;
2812
- id: number;
2813
- capabilities_description: string;
2814
- }[];
2815
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
171
+ triggerEvent?: TriggerEvent | null;
2816
172
  };
2817
- integrations: {
2818
- name: string;
2819
- type: "custom" | "nango" | "internal";
2820
- description: string;
2821
- id: string;
2822
- identifier: string;
2823
- scopes: string[];
2824
- connectionName: string;
2825
- }[];
2826
- memories: {
2827
- id: number;
2828
- memory: string;
2829
- createdAt: Date;
2830
- }[];
2831
- messages: {
2832
- message: string;
173
+ workspace: ActionWorkspace;
174
+ workspaceExecutionId?: number;
175
+ integrations: IntegrationConnectionSchema[];
176
+ mcpServers?: MCPServerSchema[];
177
+ agentKnowledgeFiles?: AgentKnowledgeFile[];
178
+ memories: Memory[];
179
+ };
180
+ type ArtifactCard = {
181
+ id: string;
182
+ type: 'artifact-card';
183
+ data: unknown;
184
+ };
185
+ type ArtifactCardResponse = {
186
+ id: string;
187
+ type: 'artifact-card-response';
188
+ artifactId: string;
189
+ data: unknown | null;
190
+ };
191
+ type ChatMessageArtifact = JSONArtifact | ArtifactCard | ArtifactCardResponse;
192
+ type ChatMessageParts = {
193
+ artifacts: ChatMessageArtifact[];
194
+ };
195
+ type ChatMessage = {
196
+ author: 'agent' | 'user';
197
+ createdAt: string | Date;
198
+ id: number;
199
+ message: string;
200
+ parts: ChatMessageParts;
201
+ };
202
+ export type RespondChatMessageActionSchema = {
203
+ type: 'respond-chat-message';
204
+ workspaceUpdateToken?: string | null;
205
+ me: ActionAssignee;
206
+ messages: ChatMessage[];
207
+ workspace: ActionWorkspace;
208
+ integrations: IntegrationConnectionSchema[];
209
+ memories: Memory[];
210
+ };
211
+ export type ActionSchema = DoTaskActionSchema | RespondChatMessageActionSchema;
212
+ export type AgentChatMessagesResponse = {
213
+ agent: {
2833
214
  id: number;
2834
- createdAt: Date;
2835
- author: "agent" | "user";
2836
- parts: {
2837
- artifacts: ({
2838
- id: string;
2839
- } & ({
2840
- type: "json";
2841
- data: Record<string, unknown>;
2842
- } | {
2843
- type: "artifact-card";
2844
- data?: unknown;
2845
- } | {
2846
- type: "artifact-card-response";
2847
- artifactId: string;
2848
- data?: unknown;
2849
- }))[];
2850
- };
2851
- }[];
2852
- workspaceUpdateToken?: string | null | undefined;
2853
- }, {
2854
- type: "respond-chat-message";
2855
- me: {
2856
215
  name: string;
2857
- id: number;
2858
- kind: "external" | "eliza" | "openserv";
2859
- } & ({
2860
- isBuiltByAgentBuilder: false;
2861
- } | {
2862
- isBuiltByAgentBuilder: true;
2863
- systemPrompt: string;
2864
- });
2865
- workspace: {
2866
- id: string | number;
2867
- goal: string;
2868
- bucket_folder: string;
2869
- agents: {
2870
- name: string;
2871
- id: number;
2872
- capabilities_description: string;
2873
- }[];
2874
- latest_workspace_execution_status?: "error" | "active" | "deleted" | "idle" | "running" | "paused" | "completed" | "timed-out" | undefined;
2875
216
  };
2876
- integrations: {
2877
- name: string;
2878
- type: "custom" | "nango" | "internal";
2879
- description: string;
2880
- id: string;
2881
- identifier: string;
2882
- scopes: string[];
2883
- connectionName: string;
2884
- }[];
2885
- memories: {
2886
- id: number;
2887
- memory: string;
2888
- createdAt: Date;
2889
- }[];
2890
217
  messages: {
2891
- message: string;
2892
- id: number;
218
+ author: 'agent' | 'user';
2893
219
  createdAt: Date;
2894
- author: "agent" | "user";
2895
- parts?: {
2896
- artifacts: ({
2897
- id: string;
2898
- } & ({
2899
- type: "json";
2900
- data: Record<string, unknown>;
2901
- } | {
2902
- type: "artifact-card";
2903
- data?: unknown;
2904
- } | {
2905
- type: "artifact-card-response";
2906
- artifactId: string;
2907
- data?: unknown;
2908
- }))[];
2909
- } | undefined;
2910
- }[];
2911
- workspaceUpdateToken?: string | null | undefined;
2912
- }>]>;
2913
- declare const agentChatMessagesResponseSchema: z.ZodObject<{
2914
- agent: z.ZodObject<{
2915
- id: z.ZodNumber;
2916
- name: z.ZodString;
2917
- }, "strip", z.ZodTypeAny, {
2918
- name: string;
2919
- id: number;
2920
- }, {
2921
- name: string;
2922
220
  id: number;
2923
- }>;
2924
- messages: z.ZodArray<z.ZodObject<{
2925
- author: z.ZodEnum<["agent", "user"]>;
2926
- createdAt: z.ZodDate;
2927
- id: z.ZodNumber;
2928
- message: z.ZodString;
2929
- }, "strip", z.ZodTypeAny, {
2930
221
  message: string;
2931
- id: number;
2932
- createdAt: Date;
2933
- author: "agent" | "user";
2934
- }, {
2935
- message: string;
2936
- id: number;
2937
- createdAt: Date;
2938
- author: "agent" | "user";
2939
- }>, "many">;
2940
- }, "strip", z.ZodTypeAny, {
2941
- messages: {
2942
- message: string;
2943
- id: number;
2944
- createdAt: Date;
2945
- author: "agent" | "user";
2946
222
  }[];
2947
- agent: {
2948
- name: string;
2949
- id: number;
2950
- };
2951
- }, {
2952
- messages: {
2953
- message: string;
2954
- id: number;
2955
- createdAt: Date;
2956
- author: "agent" | "user";
2957
- }[];
2958
- agent: {
2959
- name: string;
2960
- id: number;
2961
- };
2962
- }>;
2963
- export type AgentChatMessagesResponse = z.infer<typeof agentChatMessagesResponseSchema>;
223
+ };
2964
224
  type WorkspaceId = string | number;
2965
225
  type TaskId = string | number;
2966
226
  export interface GetFilesParams {
@@ -3081,7 +341,7 @@ export interface CreateTaskParams {
3081
341
  body: string;
3082
342
  input: string;
3083
343
  expectedOutput: string;
3084
- dependencies: number[];
344
+ dependencies: number[] | string[];
3085
345
  }
3086
346
  export type CreateTaskResponse = {
3087
347
  id: number;