@openserv-labs/sdk 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,1308 @@
1
+ import { z } from 'zod';
2
+ import type { ChatCompletionMessageParam } from 'openai/resources/chat/completions';
3
+ export type CapabilityFuncParams<Schema extends z.ZodTypeAny> = {
4
+ args: z.infer<Schema>;
5
+ action?: z.infer<typeof actionSchema>;
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 doTaskActionSchema: z.ZodObject<{
11
+ type: z.ZodLiteral<"do-task">;
12
+ me: z.ZodIntersection<z.ZodObject<{
13
+ id: z.ZodNumber;
14
+ name: z.ZodString;
15
+ kind: z.ZodEnum<["external", "eliza", "openserv"]>;
16
+ }, "strip", z.ZodTypeAny, {
17
+ name: string;
18
+ id: number;
19
+ kind: "external" | "eliza" | "openserv";
20
+ }, {
21
+ name: string;
22
+ id: number;
23
+ kind: "external" | "eliza" | "openserv";
24
+ }>, z.ZodUnion<[z.ZodObject<{
25
+ isBuiltByAgentBuilder: z.ZodLiteral<false>;
26
+ }, "strip", z.ZodTypeAny, {
27
+ isBuiltByAgentBuilder: false;
28
+ }, {
29
+ isBuiltByAgentBuilder: false;
30
+ }>, z.ZodObject<{
31
+ isBuiltByAgentBuilder: z.ZodLiteral<true>;
32
+ systemPrompt: z.ZodString;
33
+ }, "strip", z.ZodTypeAny, {
34
+ isBuiltByAgentBuilder: true;
35
+ systemPrompt: string;
36
+ }, {
37
+ isBuiltByAgentBuilder: true;
38
+ systemPrompt: string;
39
+ }>]>>;
40
+ task: z.ZodObject<{
41
+ id: z.ZodNumber;
42
+ description: z.ZodString;
43
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
44
+ expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
45
+ input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
+ dependencies: z.ZodArray<z.ZodObject<{
47
+ id: z.ZodNumber;
48
+ description: z.ZodString;
49
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
+ status: z.ZodEnum<["to-do", "in-progress", "human-assistance-required", "error", "done", "cancelled"]>;
51
+ attachments: z.ZodArray<z.ZodObject<{
52
+ id: z.ZodNumber;
53
+ path: z.ZodString;
54
+ fullUrl: z.ZodString;
55
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
56
+ }, "strip", z.ZodTypeAny, {
57
+ path: string;
58
+ id: number;
59
+ fullUrl: string;
60
+ summary?: string | null | undefined;
61
+ }, {
62
+ path: string;
63
+ id: number;
64
+ fullUrl: string;
65
+ summary?: string | null | undefined;
66
+ }>, "many">;
67
+ }, "strip", z.ZodTypeAny, {
68
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
69
+ description: string;
70
+ id: number;
71
+ attachments: {
72
+ path: string;
73
+ id: number;
74
+ fullUrl: string;
75
+ summary?: string | null | undefined;
76
+ }[];
77
+ output?: string | null | undefined;
78
+ }, {
79
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
80
+ description: string;
81
+ id: number;
82
+ attachments: {
83
+ path: string;
84
+ id: number;
85
+ fullUrl: string;
86
+ summary?: string | null | undefined;
87
+ }[];
88
+ output?: string | null | undefined;
89
+ }>, "many">;
90
+ humanAssistanceRequests: z.ZodArray<z.ZodObject<{
91
+ agentDump: z.ZodUnknown;
92
+ humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
93
+ id: z.ZodNumber;
94
+ question: z.ZodString;
95
+ status: z.ZodEnum<["pending", "responded"]>;
96
+ type: z.ZodEnum<["text", "project-manager-plan-review"]>;
97
+ }, "strip", z.ZodTypeAny, {
98
+ type: "text" | "project-manager-plan-review";
99
+ status: "pending" | "responded";
100
+ id: number;
101
+ question: string;
102
+ agentDump?: unknown;
103
+ humanResponse?: string | null | undefined;
104
+ }, {
105
+ type: "text" | "project-manager-plan-review";
106
+ status: "pending" | "responded";
107
+ id: number;
108
+ question: string;
109
+ agentDump?: unknown;
110
+ humanResponse?: string | null | undefined;
111
+ }>, "many">;
112
+ }, "strip", z.ZodTypeAny, {
113
+ description: string;
114
+ id: number;
115
+ dependencies: {
116
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
117
+ description: string;
118
+ id: number;
119
+ attachments: {
120
+ path: string;
121
+ id: number;
122
+ fullUrl: string;
123
+ summary?: string | null | undefined;
124
+ }[];
125
+ output?: string | null | undefined;
126
+ }[];
127
+ humanAssistanceRequests: {
128
+ type: "text" | "project-manager-plan-review";
129
+ status: "pending" | "responded";
130
+ id: number;
131
+ question: string;
132
+ agentDump?: unknown;
133
+ humanResponse?: string | null | undefined;
134
+ }[];
135
+ body?: string | null | undefined;
136
+ expectedOutput?: string | null | undefined;
137
+ input?: string | null | undefined;
138
+ }, {
139
+ description: string;
140
+ id: number;
141
+ dependencies: {
142
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
143
+ description: string;
144
+ id: number;
145
+ attachments: {
146
+ path: string;
147
+ id: number;
148
+ fullUrl: string;
149
+ summary?: string | null | undefined;
150
+ }[];
151
+ output?: string | null | undefined;
152
+ }[];
153
+ humanAssistanceRequests: {
154
+ type: "text" | "project-manager-plan-review";
155
+ status: "pending" | "responded";
156
+ id: number;
157
+ question: string;
158
+ agentDump?: unknown;
159
+ humanResponse?: string | null | undefined;
160
+ }[];
161
+ body?: string | null | undefined;
162
+ expectedOutput?: string | null | undefined;
163
+ input?: string | null | undefined;
164
+ }>;
165
+ workspace: z.ZodObject<{
166
+ id: z.ZodNumber;
167
+ goal: z.ZodString;
168
+ bucket_folder: z.ZodString;
169
+ agents: z.ZodArray<z.ZodObject<{
170
+ id: z.ZodNumber;
171
+ name: z.ZodString;
172
+ capabilities_description: z.ZodString;
173
+ }, "strip", z.ZodTypeAny, {
174
+ name: string;
175
+ id: number;
176
+ capabilities_description: string;
177
+ }, {
178
+ name: string;
179
+ id: number;
180
+ capabilities_description: string;
181
+ }>, "many">;
182
+ }, "strip", z.ZodTypeAny, {
183
+ id: number;
184
+ goal: string;
185
+ bucket_folder: string;
186
+ agents: {
187
+ name: string;
188
+ id: number;
189
+ capabilities_description: string;
190
+ }[];
191
+ }, {
192
+ id: number;
193
+ goal: string;
194
+ bucket_folder: string;
195
+ agents: {
196
+ name: string;
197
+ id: number;
198
+ capabilities_description: string;
199
+ }[];
200
+ }>;
201
+ integrations: z.ZodArray<z.ZodObject<{
202
+ id: z.ZodNumber;
203
+ connection_id: z.ZodString;
204
+ provider_config_key: z.ZodString;
205
+ provider: z.ZodString;
206
+ created: z.ZodString;
207
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
208
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
209
+ openAPI: z.ZodObject<{
210
+ title: z.ZodString;
211
+ description: z.ZodString;
212
+ }, "strip", z.ZodTypeAny, {
213
+ description: string;
214
+ title: string;
215
+ }, {
216
+ description: string;
217
+ title: string;
218
+ }>;
219
+ }, "strip", z.ZodTypeAny, {
220
+ id: number;
221
+ connection_id: string;
222
+ provider_config_key: string;
223
+ provider: string;
224
+ created: string;
225
+ openAPI: {
226
+ description: string;
227
+ title: string;
228
+ };
229
+ metadata?: Record<string, unknown> | null | undefined;
230
+ scopes?: string[] | undefined;
231
+ }, {
232
+ id: number;
233
+ connection_id: string;
234
+ provider_config_key: string;
235
+ provider: string;
236
+ created: string;
237
+ openAPI: {
238
+ description: string;
239
+ title: string;
240
+ };
241
+ metadata?: Record<string, unknown> | null | undefined;
242
+ scopes?: string[] | undefined;
243
+ }>, "many">;
244
+ memories: z.ZodArray<z.ZodObject<{
245
+ id: z.ZodNumber;
246
+ memory: z.ZodString;
247
+ createdAt: z.ZodDate;
248
+ }, "strip", z.ZodTypeAny, {
249
+ id: number;
250
+ memory: string;
251
+ createdAt: Date;
252
+ }, {
253
+ id: number;
254
+ memory: string;
255
+ createdAt: Date;
256
+ }>, "many">;
257
+ }, "strip", z.ZodTypeAny, {
258
+ type: "do-task";
259
+ me: {
260
+ name: string;
261
+ id: number;
262
+ kind: "external" | "eliza" | "openserv";
263
+ } & ({
264
+ isBuiltByAgentBuilder: false;
265
+ } | {
266
+ isBuiltByAgentBuilder: true;
267
+ systemPrompt: string;
268
+ });
269
+ task: {
270
+ description: string;
271
+ id: number;
272
+ dependencies: {
273
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
274
+ description: string;
275
+ id: number;
276
+ attachments: {
277
+ path: string;
278
+ id: number;
279
+ fullUrl: string;
280
+ summary?: string | null | undefined;
281
+ }[];
282
+ output?: string | null | undefined;
283
+ }[];
284
+ humanAssistanceRequests: {
285
+ type: "text" | "project-manager-plan-review";
286
+ status: "pending" | "responded";
287
+ id: number;
288
+ question: string;
289
+ agentDump?: unknown;
290
+ humanResponse?: string | null | undefined;
291
+ }[];
292
+ body?: string | null | undefined;
293
+ expectedOutput?: string | null | undefined;
294
+ input?: string | null | undefined;
295
+ };
296
+ workspace: {
297
+ id: number;
298
+ goal: string;
299
+ bucket_folder: string;
300
+ agents: {
301
+ name: string;
302
+ id: number;
303
+ capabilities_description: string;
304
+ }[];
305
+ };
306
+ integrations: {
307
+ id: number;
308
+ connection_id: string;
309
+ provider_config_key: string;
310
+ provider: string;
311
+ created: string;
312
+ openAPI: {
313
+ description: string;
314
+ title: string;
315
+ };
316
+ metadata?: Record<string, unknown> | null | undefined;
317
+ scopes?: string[] | undefined;
318
+ }[];
319
+ memories: {
320
+ id: number;
321
+ memory: string;
322
+ createdAt: Date;
323
+ }[];
324
+ }, {
325
+ type: "do-task";
326
+ me: {
327
+ name: string;
328
+ id: number;
329
+ kind: "external" | "eliza" | "openserv";
330
+ } & ({
331
+ isBuiltByAgentBuilder: false;
332
+ } | {
333
+ isBuiltByAgentBuilder: true;
334
+ systemPrompt: string;
335
+ });
336
+ task: {
337
+ description: string;
338
+ id: number;
339
+ dependencies: {
340
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
341
+ description: string;
342
+ id: number;
343
+ attachments: {
344
+ path: string;
345
+ id: number;
346
+ fullUrl: string;
347
+ summary?: string | null | undefined;
348
+ }[];
349
+ output?: string | null | undefined;
350
+ }[];
351
+ humanAssistanceRequests: {
352
+ type: "text" | "project-manager-plan-review";
353
+ status: "pending" | "responded";
354
+ id: number;
355
+ question: string;
356
+ agentDump?: unknown;
357
+ humanResponse?: string | null | undefined;
358
+ }[];
359
+ body?: string | null | undefined;
360
+ expectedOutput?: string | null | undefined;
361
+ input?: string | null | undefined;
362
+ };
363
+ workspace: {
364
+ id: number;
365
+ goal: string;
366
+ bucket_folder: string;
367
+ agents: {
368
+ name: string;
369
+ id: number;
370
+ capabilities_description: string;
371
+ }[];
372
+ };
373
+ integrations: {
374
+ id: number;
375
+ connection_id: string;
376
+ provider_config_key: string;
377
+ provider: string;
378
+ created: string;
379
+ openAPI: {
380
+ description: string;
381
+ title: string;
382
+ };
383
+ metadata?: Record<string, unknown> | null | undefined;
384
+ scopes?: string[] | undefined;
385
+ }[];
386
+ memories: {
387
+ id: number;
388
+ memory: string;
389
+ createdAt: Date;
390
+ }[];
391
+ }>;
392
+ export declare const respondChatMessageActionSchema: z.ZodObject<{
393
+ type: z.ZodLiteral<"respond-chat-message">;
394
+ me: z.ZodIntersection<z.ZodObject<{
395
+ id: z.ZodNumber;
396
+ name: z.ZodString;
397
+ kind: z.ZodEnum<["external", "eliza", "openserv"]>;
398
+ }, "strip", z.ZodTypeAny, {
399
+ name: string;
400
+ id: number;
401
+ kind: "external" | "eliza" | "openserv";
402
+ }, {
403
+ name: string;
404
+ id: number;
405
+ kind: "external" | "eliza" | "openserv";
406
+ }>, z.ZodDiscriminatedUnion<"isBuiltByAgentBuilder", [z.ZodObject<{
407
+ isBuiltByAgentBuilder: z.ZodLiteral<false>;
408
+ }, "strip", z.ZodTypeAny, {
409
+ isBuiltByAgentBuilder: false;
410
+ }, {
411
+ isBuiltByAgentBuilder: false;
412
+ }>, z.ZodObject<{
413
+ isBuiltByAgentBuilder: z.ZodLiteral<true>;
414
+ systemPrompt: z.ZodString;
415
+ }, "strip", z.ZodTypeAny, {
416
+ isBuiltByAgentBuilder: true;
417
+ systemPrompt: string;
418
+ }, {
419
+ isBuiltByAgentBuilder: true;
420
+ systemPrompt: string;
421
+ }>]>>;
422
+ messages: z.ZodArray<z.ZodObject<{
423
+ author: z.ZodEnum<["agent", "user"]>;
424
+ createdAt: z.ZodDate;
425
+ id: z.ZodNumber;
426
+ message: z.ZodString;
427
+ }, "strip", z.ZodTypeAny, {
428
+ message: string;
429
+ id: number;
430
+ createdAt: Date;
431
+ author: "agent" | "user";
432
+ }, {
433
+ message: string;
434
+ id: number;
435
+ createdAt: Date;
436
+ author: "agent" | "user";
437
+ }>, "many">;
438
+ workspace: z.ZodObject<{
439
+ id: z.ZodNumber;
440
+ goal: z.ZodString;
441
+ bucket_folder: z.ZodString;
442
+ agents: z.ZodArray<z.ZodObject<{
443
+ id: z.ZodNumber;
444
+ name: z.ZodString;
445
+ capabilities_description: z.ZodString;
446
+ }, "strip", z.ZodTypeAny, {
447
+ name: string;
448
+ id: number;
449
+ capabilities_description: string;
450
+ }, {
451
+ name: string;
452
+ id: number;
453
+ capabilities_description: string;
454
+ }>, "many">;
455
+ }, "strip", z.ZodTypeAny, {
456
+ id: number;
457
+ goal: string;
458
+ bucket_folder: string;
459
+ agents: {
460
+ name: string;
461
+ id: number;
462
+ capabilities_description: string;
463
+ }[];
464
+ }, {
465
+ id: number;
466
+ goal: string;
467
+ bucket_folder: string;
468
+ agents: {
469
+ name: string;
470
+ id: number;
471
+ capabilities_description: string;
472
+ }[];
473
+ }>;
474
+ integrations: z.ZodArray<z.ZodObject<{
475
+ id: z.ZodNumber;
476
+ connection_id: z.ZodString;
477
+ provider_config_key: z.ZodString;
478
+ provider: z.ZodString;
479
+ created: z.ZodOptional<z.ZodString>;
480
+ metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
481
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
482
+ openAPI: z.ZodObject<{
483
+ title: z.ZodString;
484
+ description: z.ZodString;
485
+ }, "strip", z.ZodTypeAny, {
486
+ description: string;
487
+ title: string;
488
+ }, {
489
+ description: string;
490
+ title: string;
491
+ }>;
492
+ }, "strip", z.ZodTypeAny, {
493
+ id: number;
494
+ connection_id: string;
495
+ provider_config_key: string;
496
+ provider: string;
497
+ openAPI: {
498
+ description: string;
499
+ title: string;
500
+ };
501
+ created?: string | undefined;
502
+ metadata?: Record<string, unknown> | null | undefined;
503
+ scopes?: string[] | undefined;
504
+ }, {
505
+ id: number;
506
+ connection_id: string;
507
+ provider_config_key: string;
508
+ provider: string;
509
+ openAPI: {
510
+ description: string;
511
+ title: string;
512
+ };
513
+ created?: string | undefined;
514
+ metadata?: Record<string, unknown> | null | undefined;
515
+ scopes?: string[] | undefined;
516
+ }>, "many">;
517
+ memories: z.ZodArray<z.ZodObject<{
518
+ id: z.ZodNumber;
519
+ memory: z.ZodString;
520
+ createdAt: z.ZodDate;
521
+ }, "strip", z.ZodTypeAny, {
522
+ id: number;
523
+ memory: string;
524
+ createdAt: Date;
525
+ }, {
526
+ id: number;
527
+ memory: string;
528
+ createdAt: Date;
529
+ }>, "many">;
530
+ }, "strip", z.ZodTypeAny, {
531
+ type: "respond-chat-message";
532
+ me: {
533
+ name: string;
534
+ id: number;
535
+ kind: "external" | "eliza" | "openserv";
536
+ } & ({
537
+ isBuiltByAgentBuilder: false;
538
+ } | {
539
+ isBuiltByAgentBuilder: true;
540
+ systemPrompt: string;
541
+ });
542
+ workspace: {
543
+ id: number;
544
+ goal: string;
545
+ bucket_folder: string;
546
+ agents: {
547
+ name: string;
548
+ id: number;
549
+ capabilities_description: string;
550
+ }[];
551
+ };
552
+ integrations: {
553
+ id: number;
554
+ connection_id: string;
555
+ provider_config_key: string;
556
+ provider: string;
557
+ openAPI: {
558
+ description: string;
559
+ title: string;
560
+ };
561
+ created?: string | undefined;
562
+ metadata?: Record<string, unknown> | null | undefined;
563
+ scopes?: string[] | undefined;
564
+ }[];
565
+ memories: {
566
+ id: number;
567
+ memory: string;
568
+ createdAt: Date;
569
+ }[];
570
+ messages: {
571
+ message: string;
572
+ id: number;
573
+ createdAt: Date;
574
+ author: "agent" | "user";
575
+ }[];
576
+ }, {
577
+ type: "respond-chat-message";
578
+ me: {
579
+ name: string;
580
+ id: number;
581
+ kind: "external" | "eliza" | "openserv";
582
+ } & ({
583
+ isBuiltByAgentBuilder: false;
584
+ } | {
585
+ isBuiltByAgentBuilder: true;
586
+ systemPrompt: string;
587
+ });
588
+ workspace: {
589
+ id: number;
590
+ goal: string;
591
+ bucket_folder: string;
592
+ agents: {
593
+ name: string;
594
+ id: number;
595
+ capabilities_description: string;
596
+ }[];
597
+ };
598
+ integrations: {
599
+ id: number;
600
+ connection_id: string;
601
+ provider_config_key: string;
602
+ provider: string;
603
+ openAPI: {
604
+ description: string;
605
+ title: string;
606
+ };
607
+ created?: string | undefined;
608
+ metadata?: Record<string, unknown> | null | undefined;
609
+ scopes?: string[] | undefined;
610
+ }[];
611
+ memories: {
612
+ id: number;
613
+ memory: string;
614
+ createdAt: Date;
615
+ }[];
616
+ messages: {
617
+ message: string;
618
+ id: number;
619
+ createdAt: Date;
620
+ author: "agent" | "user";
621
+ }[];
622
+ }>;
623
+ export declare const actionSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
624
+ type: z.ZodLiteral<"do-task">;
625
+ me: z.ZodIntersection<z.ZodObject<{
626
+ id: z.ZodNumber;
627
+ name: z.ZodString;
628
+ kind: z.ZodEnum<["external", "eliza", "openserv"]>;
629
+ }, "strip", z.ZodTypeAny, {
630
+ name: string;
631
+ id: number;
632
+ kind: "external" | "eliza" | "openserv";
633
+ }, {
634
+ name: string;
635
+ id: number;
636
+ kind: "external" | "eliza" | "openserv";
637
+ }>, z.ZodUnion<[z.ZodObject<{
638
+ isBuiltByAgentBuilder: z.ZodLiteral<false>;
639
+ }, "strip", z.ZodTypeAny, {
640
+ isBuiltByAgentBuilder: false;
641
+ }, {
642
+ isBuiltByAgentBuilder: false;
643
+ }>, z.ZodObject<{
644
+ isBuiltByAgentBuilder: z.ZodLiteral<true>;
645
+ systemPrompt: z.ZodString;
646
+ }, "strip", z.ZodTypeAny, {
647
+ isBuiltByAgentBuilder: true;
648
+ systemPrompt: string;
649
+ }, {
650
+ isBuiltByAgentBuilder: true;
651
+ systemPrompt: string;
652
+ }>]>>;
653
+ task: z.ZodObject<{
654
+ id: z.ZodNumber;
655
+ description: z.ZodString;
656
+ body: z.ZodOptional<z.ZodNullable<z.ZodString>>;
657
+ expectedOutput: z.ZodOptional<z.ZodNullable<z.ZodString>>;
658
+ input: z.ZodOptional<z.ZodNullable<z.ZodString>>;
659
+ dependencies: z.ZodArray<z.ZodObject<{
660
+ id: z.ZodNumber;
661
+ description: z.ZodString;
662
+ output: z.ZodOptional<z.ZodNullable<z.ZodString>>;
663
+ status: z.ZodEnum<["to-do", "in-progress", "human-assistance-required", "error", "done", "cancelled"]>;
664
+ attachments: z.ZodArray<z.ZodObject<{
665
+ id: z.ZodNumber;
666
+ path: z.ZodString;
667
+ fullUrl: z.ZodString;
668
+ summary: z.ZodOptional<z.ZodNullable<z.ZodString>>;
669
+ }, "strip", z.ZodTypeAny, {
670
+ path: string;
671
+ id: number;
672
+ fullUrl: string;
673
+ summary?: string | null | undefined;
674
+ }, {
675
+ path: string;
676
+ id: number;
677
+ fullUrl: string;
678
+ summary?: string | null | undefined;
679
+ }>, "many">;
680
+ }, "strip", z.ZodTypeAny, {
681
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
682
+ description: string;
683
+ id: number;
684
+ attachments: {
685
+ path: string;
686
+ id: number;
687
+ fullUrl: string;
688
+ summary?: string | null | undefined;
689
+ }[];
690
+ output?: string | null | undefined;
691
+ }, {
692
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
693
+ description: string;
694
+ id: number;
695
+ attachments: {
696
+ path: string;
697
+ id: number;
698
+ fullUrl: string;
699
+ summary?: string | null | undefined;
700
+ }[];
701
+ output?: string | null | undefined;
702
+ }>, "many">;
703
+ humanAssistanceRequests: z.ZodArray<z.ZodObject<{
704
+ agentDump: z.ZodUnknown;
705
+ humanResponse: z.ZodOptional<z.ZodNullable<z.ZodString>>;
706
+ id: z.ZodNumber;
707
+ question: z.ZodString;
708
+ status: z.ZodEnum<["pending", "responded"]>;
709
+ type: z.ZodEnum<["text", "project-manager-plan-review"]>;
710
+ }, "strip", z.ZodTypeAny, {
711
+ type: "text" | "project-manager-plan-review";
712
+ status: "pending" | "responded";
713
+ id: number;
714
+ question: string;
715
+ agentDump?: unknown;
716
+ humanResponse?: string | null | undefined;
717
+ }, {
718
+ type: "text" | "project-manager-plan-review";
719
+ status: "pending" | "responded";
720
+ id: number;
721
+ question: string;
722
+ agentDump?: unknown;
723
+ humanResponse?: string | null | undefined;
724
+ }>, "many">;
725
+ }, "strip", z.ZodTypeAny, {
726
+ description: string;
727
+ id: number;
728
+ dependencies: {
729
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
730
+ description: string;
731
+ id: number;
732
+ attachments: {
733
+ path: string;
734
+ id: number;
735
+ fullUrl: string;
736
+ summary?: string | null | undefined;
737
+ }[];
738
+ output?: string | null | undefined;
739
+ }[];
740
+ humanAssistanceRequests: {
741
+ type: "text" | "project-manager-plan-review";
742
+ status: "pending" | "responded";
743
+ id: number;
744
+ question: string;
745
+ agentDump?: unknown;
746
+ humanResponse?: string | null | undefined;
747
+ }[];
748
+ body?: string | null | undefined;
749
+ expectedOutput?: string | null | undefined;
750
+ input?: string | null | undefined;
751
+ }, {
752
+ description: string;
753
+ id: number;
754
+ dependencies: {
755
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
756
+ description: string;
757
+ id: number;
758
+ attachments: {
759
+ path: string;
760
+ id: number;
761
+ fullUrl: string;
762
+ summary?: string | null | undefined;
763
+ }[];
764
+ output?: string | null | undefined;
765
+ }[];
766
+ humanAssistanceRequests: {
767
+ type: "text" | "project-manager-plan-review";
768
+ status: "pending" | "responded";
769
+ id: number;
770
+ question: string;
771
+ agentDump?: unknown;
772
+ humanResponse?: string | null | undefined;
773
+ }[];
774
+ body?: string | null | undefined;
775
+ expectedOutput?: string | null | undefined;
776
+ input?: string | null | undefined;
777
+ }>;
778
+ workspace: z.ZodObject<{
779
+ id: z.ZodNumber;
780
+ goal: z.ZodString;
781
+ bucket_folder: z.ZodString;
782
+ agents: z.ZodArray<z.ZodObject<{
783
+ id: z.ZodNumber;
784
+ name: z.ZodString;
785
+ capabilities_description: z.ZodString;
786
+ }, "strip", z.ZodTypeAny, {
787
+ name: string;
788
+ id: number;
789
+ capabilities_description: string;
790
+ }, {
791
+ name: string;
792
+ id: number;
793
+ capabilities_description: string;
794
+ }>, "many">;
795
+ }, "strip", z.ZodTypeAny, {
796
+ id: number;
797
+ goal: string;
798
+ bucket_folder: string;
799
+ agents: {
800
+ name: string;
801
+ id: number;
802
+ capabilities_description: string;
803
+ }[];
804
+ }, {
805
+ id: number;
806
+ goal: string;
807
+ bucket_folder: string;
808
+ agents: {
809
+ name: string;
810
+ id: number;
811
+ capabilities_description: string;
812
+ }[];
813
+ }>;
814
+ integrations: z.ZodArray<z.ZodObject<{
815
+ id: z.ZodNumber;
816
+ connection_id: z.ZodString;
817
+ provider_config_key: z.ZodString;
818
+ provider: z.ZodString;
819
+ created: z.ZodString;
820
+ metadata: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
821
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
822
+ openAPI: z.ZodObject<{
823
+ title: z.ZodString;
824
+ description: z.ZodString;
825
+ }, "strip", z.ZodTypeAny, {
826
+ description: string;
827
+ title: string;
828
+ }, {
829
+ description: string;
830
+ title: string;
831
+ }>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ id: number;
834
+ connection_id: string;
835
+ provider_config_key: string;
836
+ provider: string;
837
+ created: string;
838
+ openAPI: {
839
+ description: string;
840
+ title: string;
841
+ };
842
+ metadata?: Record<string, unknown> | null | undefined;
843
+ scopes?: string[] | undefined;
844
+ }, {
845
+ id: number;
846
+ connection_id: string;
847
+ provider_config_key: string;
848
+ provider: string;
849
+ created: string;
850
+ openAPI: {
851
+ description: string;
852
+ title: string;
853
+ };
854
+ metadata?: Record<string, unknown> | null | undefined;
855
+ scopes?: string[] | undefined;
856
+ }>, "many">;
857
+ memories: z.ZodArray<z.ZodObject<{
858
+ id: z.ZodNumber;
859
+ memory: z.ZodString;
860
+ createdAt: z.ZodDate;
861
+ }, "strip", z.ZodTypeAny, {
862
+ id: number;
863
+ memory: string;
864
+ createdAt: Date;
865
+ }, {
866
+ id: number;
867
+ memory: string;
868
+ createdAt: Date;
869
+ }>, "many">;
870
+ }, "strip", z.ZodTypeAny, {
871
+ type: "do-task";
872
+ me: {
873
+ name: string;
874
+ id: number;
875
+ kind: "external" | "eliza" | "openserv";
876
+ } & ({
877
+ isBuiltByAgentBuilder: false;
878
+ } | {
879
+ isBuiltByAgentBuilder: true;
880
+ systemPrompt: string;
881
+ });
882
+ task: {
883
+ description: string;
884
+ id: number;
885
+ dependencies: {
886
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
887
+ description: string;
888
+ id: number;
889
+ attachments: {
890
+ path: string;
891
+ id: number;
892
+ fullUrl: string;
893
+ summary?: string | null | undefined;
894
+ }[];
895
+ output?: string | null | undefined;
896
+ }[];
897
+ humanAssistanceRequests: {
898
+ type: "text" | "project-manager-plan-review";
899
+ status: "pending" | "responded";
900
+ id: number;
901
+ question: string;
902
+ agentDump?: unknown;
903
+ humanResponse?: string | null | undefined;
904
+ }[];
905
+ body?: string | null | undefined;
906
+ expectedOutput?: string | null | undefined;
907
+ input?: string | null | undefined;
908
+ };
909
+ workspace: {
910
+ id: number;
911
+ goal: string;
912
+ bucket_folder: string;
913
+ agents: {
914
+ name: string;
915
+ id: number;
916
+ capabilities_description: string;
917
+ }[];
918
+ };
919
+ integrations: {
920
+ id: number;
921
+ connection_id: string;
922
+ provider_config_key: string;
923
+ provider: string;
924
+ created: string;
925
+ openAPI: {
926
+ description: string;
927
+ title: string;
928
+ };
929
+ metadata?: Record<string, unknown> | null | undefined;
930
+ scopes?: string[] | undefined;
931
+ }[];
932
+ memories: {
933
+ id: number;
934
+ memory: string;
935
+ createdAt: Date;
936
+ }[];
937
+ }, {
938
+ type: "do-task";
939
+ me: {
940
+ name: string;
941
+ id: number;
942
+ kind: "external" | "eliza" | "openserv";
943
+ } & ({
944
+ isBuiltByAgentBuilder: false;
945
+ } | {
946
+ isBuiltByAgentBuilder: true;
947
+ systemPrompt: string;
948
+ });
949
+ task: {
950
+ description: string;
951
+ id: number;
952
+ dependencies: {
953
+ status: "error" | "to-do" | "in-progress" | "human-assistance-required" | "done" | "cancelled";
954
+ description: string;
955
+ id: number;
956
+ attachments: {
957
+ path: string;
958
+ id: number;
959
+ fullUrl: string;
960
+ summary?: string | null | undefined;
961
+ }[];
962
+ output?: string | null | undefined;
963
+ }[];
964
+ humanAssistanceRequests: {
965
+ type: "text" | "project-manager-plan-review";
966
+ status: "pending" | "responded";
967
+ id: number;
968
+ question: string;
969
+ agentDump?: unknown;
970
+ humanResponse?: string | null | undefined;
971
+ }[];
972
+ body?: string | null | undefined;
973
+ expectedOutput?: string | null | undefined;
974
+ input?: string | null | undefined;
975
+ };
976
+ workspace: {
977
+ id: number;
978
+ goal: string;
979
+ bucket_folder: string;
980
+ agents: {
981
+ name: string;
982
+ id: number;
983
+ capabilities_description: string;
984
+ }[];
985
+ };
986
+ integrations: {
987
+ id: number;
988
+ connection_id: string;
989
+ provider_config_key: string;
990
+ provider: string;
991
+ created: string;
992
+ openAPI: {
993
+ description: string;
994
+ title: string;
995
+ };
996
+ metadata?: Record<string, unknown> | null | undefined;
997
+ scopes?: string[] | undefined;
998
+ }[];
999
+ memories: {
1000
+ id: number;
1001
+ memory: string;
1002
+ createdAt: Date;
1003
+ }[];
1004
+ }>, z.ZodObject<{
1005
+ type: z.ZodLiteral<"respond-chat-message">;
1006
+ me: z.ZodIntersection<z.ZodObject<{
1007
+ id: z.ZodNumber;
1008
+ name: z.ZodString;
1009
+ kind: z.ZodEnum<["external", "eliza", "openserv"]>;
1010
+ }, "strip", z.ZodTypeAny, {
1011
+ name: string;
1012
+ id: number;
1013
+ kind: "external" | "eliza" | "openserv";
1014
+ }, {
1015
+ name: string;
1016
+ id: number;
1017
+ kind: "external" | "eliza" | "openserv";
1018
+ }>, z.ZodDiscriminatedUnion<"isBuiltByAgentBuilder", [z.ZodObject<{
1019
+ isBuiltByAgentBuilder: z.ZodLiteral<false>;
1020
+ }, "strip", z.ZodTypeAny, {
1021
+ isBuiltByAgentBuilder: false;
1022
+ }, {
1023
+ isBuiltByAgentBuilder: false;
1024
+ }>, z.ZodObject<{
1025
+ isBuiltByAgentBuilder: z.ZodLiteral<true>;
1026
+ systemPrompt: z.ZodString;
1027
+ }, "strip", z.ZodTypeAny, {
1028
+ isBuiltByAgentBuilder: true;
1029
+ systemPrompt: string;
1030
+ }, {
1031
+ isBuiltByAgentBuilder: true;
1032
+ systemPrompt: string;
1033
+ }>]>>;
1034
+ messages: z.ZodArray<z.ZodObject<{
1035
+ author: z.ZodEnum<["agent", "user"]>;
1036
+ createdAt: z.ZodDate;
1037
+ id: z.ZodNumber;
1038
+ message: z.ZodString;
1039
+ }, "strip", z.ZodTypeAny, {
1040
+ message: string;
1041
+ id: number;
1042
+ createdAt: Date;
1043
+ author: "agent" | "user";
1044
+ }, {
1045
+ message: string;
1046
+ id: number;
1047
+ createdAt: Date;
1048
+ author: "agent" | "user";
1049
+ }>, "many">;
1050
+ workspace: z.ZodObject<{
1051
+ id: z.ZodNumber;
1052
+ goal: z.ZodString;
1053
+ bucket_folder: z.ZodString;
1054
+ agents: z.ZodArray<z.ZodObject<{
1055
+ id: z.ZodNumber;
1056
+ name: z.ZodString;
1057
+ capabilities_description: z.ZodString;
1058
+ }, "strip", z.ZodTypeAny, {
1059
+ name: string;
1060
+ id: number;
1061
+ capabilities_description: string;
1062
+ }, {
1063
+ name: string;
1064
+ id: number;
1065
+ capabilities_description: string;
1066
+ }>, "many">;
1067
+ }, "strip", z.ZodTypeAny, {
1068
+ id: number;
1069
+ goal: string;
1070
+ bucket_folder: string;
1071
+ agents: {
1072
+ name: string;
1073
+ id: number;
1074
+ capabilities_description: string;
1075
+ }[];
1076
+ }, {
1077
+ id: number;
1078
+ goal: string;
1079
+ bucket_folder: string;
1080
+ agents: {
1081
+ name: string;
1082
+ id: number;
1083
+ capabilities_description: string;
1084
+ }[];
1085
+ }>;
1086
+ integrations: z.ZodArray<z.ZodObject<{
1087
+ id: z.ZodNumber;
1088
+ connection_id: z.ZodString;
1089
+ provider_config_key: z.ZodString;
1090
+ provider: z.ZodString;
1091
+ created: z.ZodOptional<z.ZodString>;
1092
+ metadata: z.ZodOptional<z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>>;
1093
+ scopes: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
1094
+ openAPI: z.ZodObject<{
1095
+ title: z.ZodString;
1096
+ description: z.ZodString;
1097
+ }, "strip", z.ZodTypeAny, {
1098
+ description: string;
1099
+ title: string;
1100
+ }, {
1101
+ description: string;
1102
+ title: string;
1103
+ }>;
1104
+ }, "strip", z.ZodTypeAny, {
1105
+ id: number;
1106
+ connection_id: string;
1107
+ provider_config_key: string;
1108
+ provider: string;
1109
+ openAPI: {
1110
+ description: string;
1111
+ title: string;
1112
+ };
1113
+ created?: string | undefined;
1114
+ metadata?: Record<string, unknown> | null | undefined;
1115
+ scopes?: string[] | undefined;
1116
+ }, {
1117
+ id: number;
1118
+ connection_id: string;
1119
+ provider_config_key: string;
1120
+ provider: string;
1121
+ openAPI: {
1122
+ description: string;
1123
+ title: string;
1124
+ };
1125
+ created?: string | undefined;
1126
+ metadata?: Record<string, unknown> | null | undefined;
1127
+ scopes?: string[] | undefined;
1128
+ }>, "many">;
1129
+ memories: z.ZodArray<z.ZodObject<{
1130
+ id: z.ZodNumber;
1131
+ memory: z.ZodString;
1132
+ createdAt: z.ZodDate;
1133
+ }, "strip", z.ZodTypeAny, {
1134
+ id: number;
1135
+ memory: string;
1136
+ createdAt: Date;
1137
+ }, {
1138
+ id: number;
1139
+ memory: string;
1140
+ createdAt: Date;
1141
+ }>, "many">;
1142
+ }, "strip", z.ZodTypeAny, {
1143
+ type: "respond-chat-message";
1144
+ me: {
1145
+ name: string;
1146
+ id: number;
1147
+ kind: "external" | "eliza" | "openserv";
1148
+ } & ({
1149
+ isBuiltByAgentBuilder: false;
1150
+ } | {
1151
+ isBuiltByAgentBuilder: true;
1152
+ systemPrompt: string;
1153
+ });
1154
+ workspace: {
1155
+ id: number;
1156
+ goal: string;
1157
+ bucket_folder: string;
1158
+ agents: {
1159
+ name: string;
1160
+ id: number;
1161
+ capabilities_description: string;
1162
+ }[];
1163
+ };
1164
+ integrations: {
1165
+ id: number;
1166
+ connection_id: string;
1167
+ provider_config_key: string;
1168
+ provider: string;
1169
+ openAPI: {
1170
+ description: string;
1171
+ title: string;
1172
+ };
1173
+ created?: string | undefined;
1174
+ metadata?: Record<string, unknown> | null | undefined;
1175
+ scopes?: string[] | undefined;
1176
+ }[];
1177
+ memories: {
1178
+ id: number;
1179
+ memory: string;
1180
+ createdAt: Date;
1181
+ }[];
1182
+ messages: {
1183
+ message: string;
1184
+ id: number;
1185
+ createdAt: Date;
1186
+ author: "agent" | "user";
1187
+ }[];
1188
+ }, {
1189
+ type: "respond-chat-message";
1190
+ me: {
1191
+ name: string;
1192
+ id: number;
1193
+ kind: "external" | "eliza" | "openserv";
1194
+ } & ({
1195
+ isBuiltByAgentBuilder: false;
1196
+ } | {
1197
+ isBuiltByAgentBuilder: true;
1198
+ systemPrompt: string;
1199
+ });
1200
+ workspace: {
1201
+ id: number;
1202
+ goal: string;
1203
+ bucket_folder: string;
1204
+ agents: {
1205
+ name: string;
1206
+ id: number;
1207
+ capabilities_description: string;
1208
+ }[];
1209
+ };
1210
+ integrations: {
1211
+ id: number;
1212
+ connection_id: string;
1213
+ provider_config_key: string;
1214
+ provider: string;
1215
+ openAPI: {
1216
+ description: string;
1217
+ title: string;
1218
+ };
1219
+ created?: string | undefined;
1220
+ metadata?: Record<string, unknown> | null | undefined;
1221
+ scopes?: string[] | undefined;
1222
+ }[];
1223
+ memories: {
1224
+ id: number;
1225
+ memory: string;
1226
+ createdAt: Date;
1227
+ }[];
1228
+ messages: {
1229
+ message: string;
1230
+ id: number;
1231
+ createdAt: Date;
1232
+ author: "agent" | "user";
1233
+ }[];
1234
+ }>]>;
1235
+ export interface GetFilesParams {
1236
+ workspaceId: number;
1237
+ }
1238
+ export declare const getFilesParamsSchema: z.ZodObject<{
1239
+ workspaceId: z.ZodNumber;
1240
+ }, "strip", z.ZodTypeAny, {
1241
+ workspaceId: number;
1242
+ }, {
1243
+ workspaceId: number;
1244
+ }>;
1245
+ export interface UploadFileParams {
1246
+ workspaceId: number;
1247
+ path: string;
1248
+ taskIds?: number[] | number | null;
1249
+ skipSummarizer?: boolean;
1250
+ file: Buffer | string;
1251
+ }
1252
+ export interface MarkTaskAsErroredParams {
1253
+ workspaceId: number;
1254
+ taskId: number;
1255
+ error: string;
1256
+ }
1257
+ export interface CompleteTaskParams {
1258
+ workspaceId: number;
1259
+ taskId: number;
1260
+ output: string;
1261
+ }
1262
+ export interface SendChatMessageParams {
1263
+ workspaceId: number;
1264
+ agentId: number;
1265
+ message: string;
1266
+ }
1267
+ export interface GetTaskDetailParams {
1268
+ workspaceId: number;
1269
+ taskId: number;
1270
+ }
1271
+ export interface GetAgentsParams {
1272
+ workspaceId: number;
1273
+ }
1274
+ export interface GetTasksParams {
1275
+ workspaceId: number;
1276
+ }
1277
+ export interface CreateTaskParams {
1278
+ workspaceId: number;
1279
+ assignee: number;
1280
+ description: string;
1281
+ body: string;
1282
+ input: string;
1283
+ expectedOutput: string;
1284
+ dependencies: number[];
1285
+ }
1286
+ export interface AddLogToTaskParams {
1287
+ workspaceId: number;
1288
+ taskId: number;
1289
+ severity: 'info' | 'warning' | 'error';
1290
+ type: 'text' | 'openai-message';
1291
+ body: string | object;
1292
+ }
1293
+ export interface RequestHumanAssistanceParams {
1294
+ workspaceId: number;
1295
+ taskId: number;
1296
+ type: 'text' | 'project-manager-plan-review';
1297
+ question: string | object;
1298
+ agentDump?: object;
1299
+ }
1300
+ export interface UpdateTaskStatusParams {
1301
+ workspaceId: number;
1302
+ taskId: number;
1303
+ status: TaskStatus;
1304
+ }
1305
+ export interface ProcessParams {
1306
+ messages: ChatCompletionMessageParam[];
1307
+ }
1308
+ //# sourceMappingURL=types.d.ts.map