@duvoai/cli 0.1.0 → 0.2.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.
Files changed (95) hide show
  1. package/README.md +71 -11
  2. package/dist/bin/duvo.js +11726 -6
  3. package/dist/bin/duvo.js.map +7 -0
  4. package/package.json +10 -8
  5. package/dist/api/agent-schemas.d.ts +0 -521
  6. package/dist/api/agent-schemas.js +0 -36
  7. package/dist/api/parse-fields.d.ts +0 -25
  8. package/dist/api/parse-fields.js +0 -86
  9. package/dist/api/read-input.d.ts +0 -6
  10. package/dist/api/read-input.js +0 -28
  11. package/dist/api/run-schemas.d.ts +0 -621
  12. package/dist/api/run-schemas.js +0 -91
  13. package/dist/bin/create-program.d.ts +0 -7
  14. package/dist/bin/create-program.js +0 -34
  15. package/dist/bin/duvo.d.ts +0 -2
  16. package/dist/client/client.d.ts +0 -23
  17. package/dist/client/client.js +0 -96
  18. package/dist/commands/agents/create.d.ts +0 -2
  19. package/dist/commands/agents/create.js +0 -182
  20. package/dist/commands/agents/get.d.ts +0 -2
  21. package/dist/commands/agents/get.js +0 -36
  22. package/dist/commands/agents/index.d.ts +0 -2
  23. package/dist/commands/agents/index.js +0 -11
  24. package/dist/commands/agents/list.d.ts +0 -2
  25. package/dist/commands/agents/list.js +0 -61
  26. package/dist/commands/api-render.d.ts +0 -8
  27. package/dist/commands/api-render.js +0 -72
  28. package/dist/commands/api.d.ts +0 -2
  29. package/dist/commands/api.js +0 -90
  30. package/dist/commands/login.d.ts +0 -2
  31. package/dist/commands/login.js +0 -80
  32. package/dist/commands/logout.d.ts +0 -2
  33. package/dist/commands/logout.js +0 -38
  34. package/dist/commands/profiles/index.d.ts +0 -2
  35. package/dist/commands/profiles/index.js +0 -13
  36. package/dist/commands/profiles/list.d.ts +0 -2
  37. package/dist/commands/profiles/list.js +0 -22
  38. package/dist/commands/profiles/remove.d.ts +0 -2
  39. package/dist/commands/profiles/remove.js +0 -30
  40. package/dist/commands/profiles/rename.d.ts +0 -2
  41. package/dist/commands/profiles/rename.js +0 -20
  42. package/dist/commands/profiles/render-list.d.ts +0 -12
  43. package/dist/commands/profiles/render-list.js +0 -37
  44. package/dist/commands/profiles/use.d.ts +0 -2
  45. package/dist/commands/profiles/use.js +0 -17
  46. package/dist/commands/runs/get.d.ts +0 -2
  47. package/dist/commands/runs/get.js +0 -59
  48. package/dist/commands/runs/index.d.ts +0 -2
  49. package/dist/commands/runs/index.js +0 -17
  50. package/dist/commands/runs/messages.d.ts +0 -2
  51. package/dist/commands/runs/messages.js +0 -80
  52. package/dist/commands/runs/respond.d.ts +0 -2
  53. package/dist/commands/runs/respond.js +0 -105
  54. package/dist/commands/runs/send-message.d.ts +0 -2
  55. package/dist/commands/runs/send-message.js +0 -41
  56. package/dist/commands/runs/start.d.ts +0 -2
  57. package/dist/commands/runs/start.js +0 -54
  58. package/dist/commands/runs/stop.d.ts +0 -2
  59. package/dist/commands/runs/stop.js +0 -41
  60. package/dist/commands/shared/confirm.d.ts +0 -19
  61. package/dist/commands/shared/confirm.js +0 -28
  62. package/dist/commands/shared/pagination.d.ts +0 -8
  63. package/dist/commands/shared/pagination.js +0 -24
  64. package/dist/commands/shared/profile-flag.d.ts +0 -8
  65. package/dist/commands/shared/profile-flag.js +0 -17
  66. package/dist/commands/shared/require-auth.d.ts +0 -12
  67. package/dist/commands/shared/require-auth.js +0 -18
  68. package/dist/commands/whoami.d.ts +0 -2
  69. package/dist/commands/whoami.js +0 -14
  70. package/dist/config/defaults.d.ts +0 -3
  71. package/dist/config/defaults.js +0 -4
  72. package/dist/config/env.d.ts +0 -17
  73. package/dist/config/env.js +0 -13
  74. package/dist/config/paths.d.ts +0 -2
  75. package/dist/config/paths.js +0 -14
  76. package/dist/config/profiles.d.ts +0 -24
  77. package/dist/config/profiles.js +0 -78
  78. package/dist/config/resolve.d.ts +0 -29
  79. package/dist/config/resolve.js +0 -46
  80. package/dist/config/store.d.ts +0 -4
  81. package/dist/config/store.js +0 -94
  82. package/dist/config/types.d.ts +0 -8
  83. package/dist/config/types.js +0 -1
  84. package/dist/errors.d.ts +0 -22
  85. package/dist/errors.js +0 -42
  86. package/dist/output/format.d.ts +0 -11
  87. package/dist/output/format.js +0 -26
  88. package/dist/output/green.d.ts +0 -5
  89. package/dist/output/green.js +0 -18
  90. package/dist/output/json.d.ts +0 -6
  91. package/dist/output/json.js +0 -8
  92. package/dist/output/table.d.ts +0 -16
  93. package/dist/output/table.js +0 -35
  94. package/dist/output/text.d.ts +0 -9
  95. package/dist/output/text.js +0 -13
@@ -1,621 +0,0 @@
1
- import { z } from "zod";
2
- declare const publicRunSchema: z.ZodObject<{
3
- id: z.ZodString;
4
- agent_id: z.ZodString;
5
- build_id: z.ZodString;
6
- status: z.ZodString;
7
- source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
8
- sandbox_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
9
- started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
10
- completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
11
- created_at: z.ZodString;
12
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
13
- human_in_the_loop_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
14
- }, "strip", z.ZodTypeAny, {
15
- status: string;
16
- id: string;
17
- created_at: string;
18
- agent_id: string;
19
- build_id: string;
20
- updated_at?: string | null | undefined;
21
- source?: string | null | undefined;
22
- sandbox_id?: string | null | undefined;
23
- started_at?: string | null | undefined;
24
- completed_at?: string | null | undefined;
25
- human_in_the_loop_enabled?: boolean | null | undefined;
26
- }, {
27
- status: string;
28
- id: string;
29
- created_at: string;
30
- agent_id: string;
31
- build_id: string;
32
- updated_at?: string | null | undefined;
33
- source?: string | null | undefined;
34
- sandbox_id?: string | null | undefined;
35
- started_at?: string | null | undefined;
36
- completed_at?: string | null | undefined;
37
- human_in_the_loop_enabled?: boolean | null | undefined;
38
- }>;
39
- export type PublicRun = z.infer<typeof publicRunSchema>;
40
- export declare const startRunResponseSchema: z.ZodObject<{
41
- run: z.ZodObject<{
42
- id: z.ZodString;
43
- agent_id: z.ZodString;
44
- build_id: z.ZodString;
45
- status: z.ZodString;
46
- source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
47
- sandbox_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
48
- started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
49
- completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
50
- created_at: z.ZodString;
51
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
52
- human_in_the_loop_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
53
- }, "strip", z.ZodTypeAny, {
54
- status: string;
55
- id: string;
56
- created_at: string;
57
- agent_id: string;
58
- build_id: string;
59
- updated_at?: string | null | undefined;
60
- source?: string | null | undefined;
61
- sandbox_id?: string | null | undefined;
62
- started_at?: string | null | undefined;
63
- completed_at?: string | null | undefined;
64
- human_in_the_loop_enabled?: boolean | null | undefined;
65
- }, {
66
- status: string;
67
- id: string;
68
- created_at: string;
69
- agent_id: string;
70
- build_id: string;
71
- updated_at?: string | null | undefined;
72
- source?: string | null | undefined;
73
- sandbox_id?: string | null | undefined;
74
- started_at?: string | null | undefined;
75
- completed_at?: string | null | undefined;
76
- human_in_the_loop_enabled?: boolean | null | undefined;
77
- }>;
78
- }, "strip", z.ZodTypeAny, {
79
- run: {
80
- status: string;
81
- id: string;
82
- created_at: string;
83
- agent_id: string;
84
- build_id: string;
85
- updated_at?: string | null | undefined;
86
- source?: string | null | undefined;
87
- sandbox_id?: string | null | undefined;
88
- started_at?: string | null | undefined;
89
- completed_at?: string | null | undefined;
90
- human_in_the_loop_enabled?: boolean | null | undefined;
91
- };
92
- }, {
93
- run: {
94
- status: string;
95
- id: string;
96
- created_at: string;
97
- agent_id: string;
98
- build_id: string;
99
- updated_at?: string | null | undefined;
100
- source?: string | null | undefined;
101
- sandbox_id?: string | null | undefined;
102
- started_at?: string | null | undefined;
103
- completed_at?: string | null | undefined;
104
- human_in_the_loop_enabled?: boolean | null | undefined;
105
- };
106
- }>;
107
- export type StartRunResponse = z.infer<typeof startRunResponseSchema>;
108
- declare const pendingHumanRequestSchema: z.ZodObject<{
109
- id: z.ZodString;
110
- title: z.ZodString;
111
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
112
- created_at: z.ZodString;
113
- type: z.ZodString;
114
- questions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
115
- question: z.ZodString;
116
- header: z.ZodOptional<z.ZodNullable<z.ZodString>>;
117
- options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
118
- label: z.ZodString;
119
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
120
- }, "strip", z.ZodTypeAny, {
121
- label: string;
122
- description?: string | null | undefined;
123
- }, {
124
- label: string;
125
- description?: string | null | undefined;
126
- }>, "many">>>;
127
- multi_select: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
128
- }, "strip", z.ZodTypeAny, {
129
- question: string;
130
- options?: {
131
- label: string;
132
- description?: string | null | undefined;
133
- }[] | null | undefined;
134
- header?: string | null | undefined;
135
- multi_select?: boolean | null | undefined;
136
- }, {
137
- question: string;
138
- options?: {
139
- label: string;
140
- description?: string | null | undefined;
141
- }[] | null | undefined;
142
- header?: string | null | undefined;
143
- multi_select?: boolean | null | undefined;
144
- }>, "many">>>;
145
- }, "strip", z.ZodTypeAny, {
146
- type: string;
147
- id: string;
148
- created_at: string;
149
- title: string;
150
- description?: string | null | undefined;
151
- questions?: {
152
- question: string;
153
- options?: {
154
- label: string;
155
- description?: string | null | undefined;
156
- }[] | null | undefined;
157
- header?: string | null | undefined;
158
- multi_select?: boolean | null | undefined;
159
- }[] | null | undefined;
160
- }, {
161
- type: string;
162
- id: string;
163
- created_at: string;
164
- title: string;
165
- description?: string | null | undefined;
166
- questions?: {
167
- question: string;
168
- options?: {
169
- label: string;
170
- description?: string | null | undefined;
171
- }[] | null | undefined;
172
- header?: string | null | undefined;
173
- multi_select?: boolean | null | undefined;
174
- }[] | null | undefined;
175
- }>;
176
- export type PendingHumanRequest = z.infer<typeof pendingHumanRequestSchema>;
177
- export declare const getRunResponseSchema: z.ZodObject<{
178
- run: z.ZodNullable<z.ZodObject<{
179
- id: z.ZodString;
180
- agent_id: z.ZodString;
181
- build_id: z.ZodString;
182
- status: z.ZodString;
183
- source: z.ZodOptional<z.ZodNullable<z.ZodString>>;
184
- sandbox_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
185
- started_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
186
- completed_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
187
- created_at: z.ZodString;
188
- updated_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
- human_in_the_loop_enabled: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
190
- }, "strip", z.ZodTypeAny, {
191
- status: string;
192
- id: string;
193
- created_at: string;
194
- agent_id: string;
195
- build_id: string;
196
- updated_at?: string | null | undefined;
197
- source?: string | null | undefined;
198
- sandbox_id?: string | null | undefined;
199
- started_at?: string | null | undefined;
200
- completed_at?: string | null | undefined;
201
- human_in_the_loop_enabled?: boolean | null | undefined;
202
- }, {
203
- status: string;
204
- id: string;
205
- created_at: string;
206
- agent_id: string;
207
- build_id: string;
208
- updated_at?: string | null | undefined;
209
- source?: string | null | undefined;
210
- sandbox_id?: string | null | undefined;
211
- started_at?: string | null | undefined;
212
- completed_at?: string | null | undefined;
213
- human_in_the_loop_enabled?: boolean | null | undefined;
214
- }>>;
215
- pending_human_request: z.ZodOptional<z.ZodNullable<z.ZodObject<{
216
- id: z.ZodString;
217
- title: z.ZodString;
218
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
219
- created_at: z.ZodString;
220
- type: z.ZodString;
221
- questions: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
222
- question: z.ZodString;
223
- header: z.ZodOptional<z.ZodNullable<z.ZodString>>;
224
- options: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodObject<{
225
- label: z.ZodString;
226
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
227
- }, "strip", z.ZodTypeAny, {
228
- label: string;
229
- description?: string | null | undefined;
230
- }, {
231
- label: string;
232
- description?: string | null | undefined;
233
- }>, "many">>>;
234
- multi_select: z.ZodOptional<z.ZodNullable<z.ZodBoolean>>;
235
- }, "strip", z.ZodTypeAny, {
236
- question: string;
237
- options?: {
238
- label: string;
239
- description?: string | null | undefined;
240
- }[] | null | undefined;
241
- header?: string | null | undefined;
242
- multi_select?: boolean | null | undefined;
243
- }, {
244
- question: string;
245
- options?: {
246
- label: string;
247
- description?: string | null | undefined;
248
- }[] | null | undefined;
249
- header?: string | null | undefined;
250
- multi_select?: boolean | null | undefined;
251
- }>, "many">>>;
252
- }, "strip", z.ZodTypeAny, {
253
- type: string;
254
- id: string;
255
- created_at: string;
256
- title: string;
257
- description?: string | null | undefined;
258
- questions?: {
259
- question: string;
260
- options?: {
261
- label: string;
262
- description?: string | null | undefined;
263
- }[] | null | undefined;
264
- header?: string | null | undefined;
265
- multi_select?: boolean | null | undefined;
266
- }[] | null | undefined;
267
- }, {
268
- type: string;
269
- id: string;
270
- created_at: string;
271
- title: string;
272
- description?: string | null | undefined;
273
- questions?: {
274
- question: string;
275
- options?: {
276
- label: string;
277
- description?: string | null | undefined;
278
- }[] | null | undefined;
279
- header?: string | null | undefined;
280
- multi_select?: boolean | null | undefined;
281
- }[] | null | undefined;
282
- }>>>;
283
- }, "strip", z.ZodTypeAny, {
284
- run: {
285
- status: string;
286
- id: string;
287
- created_at: string;
288
- agent_id: string;
289
- build_id: string;
290
- updated_at?: string | null | undefined;
291
- source?: string | null | undefined;
292
- sandbox_id?: string | null | undefined;
293
- started_at?: string | null | undefined;
294
- completed_at?: string | null | undefined;
295
- human_in_the_loop_enabled?: boolean | null | undefined;
296
- } | null;
297
- pending_human_request?: {
298
- type: string;
299
- id: string;
300
- created_at: string;
301
- title: string;
302
- description?: string | null | undefined;
303
- questions?: {
304
- question: string;
305
- options?: {
306
- label: string;
307
- description?: string | null | undefined;
308
- }[] | null | undefined;
309
- header?: string | null | undefined;
310
- multi_select?: boolean | null | undefined;
311
- }[] | null | undefined;
312
- } | null | undefined;
313
- }, {
314
- run: {
315
- status: string;
316
- id: string;
317
- created_at: string;
318
- agent_id: string;
319
- build_id: string;
320
- updated_at?: string | null | undefined;
321
- source?: string | null | undefined;
322
- sandbox_id?: string | null | undefined;
323
- started_at?: string | null | undefined;
324
- completed_at?: string | null | undefined;
325
- human_in_the_loop_enabled?: boolean | null | undefined;
326
- } | null;
327
- pending_human_request?: {
328
- type: string;
329
- id: string;
330
- created_at: string;
331
- title: string;
332
- description?: string | null | undefined;
333
- questions?: {
334
- question: string;
335
- options?: {
336
- label: string;
337
- description?: string | null | undefined;
338
- }[] | null | undefined;
339
- header?: string | null | undefined;
340
- multi_select?: boolean | null | undefined;
341
- }[] | null | undefined;
342
- } | null | undefined;
343
- }>;
344
- export type GetRunResponse = z.infer<typeof getRunResponseSchema>;
345
- export declare const stopRunResponseSchema: z.ZodObject<{
346
- success: z.ZodBoolean;
347
- message: z.ZodOptional<z.ZodNullable<z.ZodString>>;
348
- }, "strip", z.ZodTypeAny, {
349
- success: boolean;
350
- message?: string | null | undefined;
351
- }, {
352
- success: boolean;
353
- message?: string | null | undefined;
354
- }>;
355
- export type StopRunResponse = z.infer<typeof stopRunResponseSchema>;
356
- declare const runMessageSchema: z.ZodObject<{
357
- id: z.ZodString;
358
- type: z.ZodString;
359
- role: z.ZodString;
360
- timestamp: z.ZodString;
361
- text_content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
362
- tool_call: z.ZodOptional<z.ZodNullable<z.ZodObject<{
363
- id: z.ZodString;
364
- name: z.ZodString;
365
- arguments: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
366
- }, "strip", z.ZodTypeAny, {
367
- id: string;
368
- name: string;
369
- arguments?: Record<string, unknown> | null | undefined;
370
- }, {
371
- id: string;
372
- name: string;
373
- arguments?: Record<string, unknown> | null | undefined;
374
- }>>>;
375
- tool_result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
376
- tool_call_id: z.ZodString;
377
- result: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
378
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
379
- }, "strip", z.ZodTypeAny, {
380
- tool_call_id: string;
381
- result?: unknown;
382
- error?: string | null | undefined;
383
- }, {
384
- tool_call_id: string;
385
- result?: unknown;
386
- error?: string | null | undefined;
387
- }>>>;
388
- }, "strip", z.ZodTypeAny, {
389
- type: string;
390
- id: string;
391
- role: string;
392
- timestamp: string;
393
- text_content?: string | null | undefined;
394
- tool_call?: {
395
- id: string;
396
- name: string;
397
- arguments?: Record<string, unknown> | null | undefined;
398
- } | null | undefined;
399
- tool_result?: {
400
- tool_call_id: string;
401
- result?: unknown;
402
- error?: string | null | undefined;
403
- } | null | undefined;
404
- }, {
405
- type: string;
406
- id: string;
407
- role: string;
408
- timestamp: string;
409
- text_content?: string | null | undefined;
410
- tool_call?: {
411
- id: string;
412
- name: string;
413
- arguments?: Record<string, unknown> | null | undefined;
414
- } | null | undefined;
415
- tool_result?: {
416
- tool_call_id: string;
417
- result?: unknown;
418
- error?: string | null | undefined;
419
- } | null | undefined;
420
- }>;
421
- export type RunMessage = z.infer<typeof runMessageSchema>;
422
- export declare const listRunMessagesResponseSchema: z.ZodObject<{
423
- messages: z.ZodArray<z.ZodObject<{
424
- id: z.ZodString;
425
- type: z.ZodString;
426
- role: z.ZodString;
427
- timestamp: z.ZodString;
428
- text_content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
429
- tool_call: z.ZodOptional<z.ZodNullable<z.ZodObject<{
430
- id: z.ZodString;
431
- name: z.ZodString;
432
- arguments: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodUnknown>>>;
433
- }, "strip", z.ZodTypeAny, {
434
- id: string;
435
- name: string;
436
- arguments?: Record<string, unknown> | null | undefined;
437
- }, {
438
- id: string;
439
- name: string;
440
- arguments?: Record<string, unknown> | null | undefined;
441
- }>>>;
442
- tool_result: z.ZodOptional<z.ZodNullable<z.ZodObject<{
443
- tool_call_id: z.ZodString;
444
- result: z.ZodOptional<z.ZodNullable<z.ZodUnknown>>;
445
- error: z.ZodOptional<z.ZodNullable<z.ZodString>>;
446
- }, "strip", z.ZodTypeAny, {
447
- tool_call_id: string;
448
- result?: unknown;
449
- error?: string | null | undefined;
450
- }, {
451
- tool_call_id: string;
452
- result?: unknown;
453
- error?: string | null | undefined;
454
- }>>>;
455
- }, "strip", z.ZodTypeAny, {
456
- type: string;
457
- id: string;
458
- role: string;
459
- timestamp: string;
460
- text_content?: string | null | undefined;
461
- tool_call?: {
462
- id: string;
463
- name: string;
464
- arguments?: Record<string, unknown> | null | undefined;
465
- } | null | undefined;
466
- tool_result?: {
467
- tool_call_id: string;
468
- result?: unknown;
469
- error?: string | null | undefined;
470
- } | null | undefined;
471
- }, {
472
- type: string;
473
- id: string;
474
- role: string;
475
- timestamp: string;
476
- text_content?: string | null | undefined;
477
- tool_call?: {
478
- id: string;
479
- name: string;
480
- arguments?: Record<string, unknown> | null | undefined;
481
- } | null | undefined;
482
- tool_result?: {
483
- tool_call_id: string;
484
- result?: unknown;
485
- error?: string | null | undefined;
486
- } | null | undefined;
487
- }>, "many">;
488
- total: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
489
- limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
490
- offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
491
- }, "strip", z.ZodTypeAny, {
492
- messages: {
493
- type: string;
494
- id: string;
495
- role: string;
496
- timestamp: string;
497
- text_content?: string | null | undefined;
498
- tool_call?: {
499
- id: string;
500
- name: string;
501
- arguments?: Record<string, unknown> | null | undefined;
502
- } | null | undefined;
503
- tool_result?: {
504
- tool_call_id: string;
505
- result?: unknown;
506
- error?: string | null | undefined;
507
- } | null | undefined;
508
- }[];
509
- total?: number | null | undefined;
510
- limit?: number | null | undefined;
511
- offset?: number | null | undefined;
512
- }, {
513
- messages: {
514
- type: string;
515
- id: string;
516
- role: string;
517
- timestamp: string;
518
- text_content?: string | null | undefined;
519
- tool_call?: {
520
- id: string;
521
- name: string;
522
- arguments?: Record<string, unknown> | null | undefined;
523
- } | null | undefined;
524
- tool_result?: {
525
- tool_call_id: string;
526
- result?: unknown;
527
- error?: string | null | undefined;
528
- } | null | undefined;
529
- }[];
530
- total?: number | null | undefined;
531
- limit?: number | null | undefined;
532
- offset?: number | null | undefined;
533
- }>;
534
- export type ListRunMessagesResponse = z.infer<typeof listRunMessagesResponseSchema>;
535
- export declare const postRunMessageResponseSchema: z.ZodObject<{
536
- message: z.ZodObject<{
537
- id: z.ZodString;
538
- type: z.ZodString;
539
- role: z.ZodString;
540
- timestamp: z.ZodString;
541
- text_content: z.ZodString;
542
- }, "strip", z.ZodTypeAny, {
543
- type: string;
544
- id: string;
545
- role: string;
546
- timestamp: string;
547
- text_content: string;
548
- }, {
549
- type: string;
550
- id: string;
551
- role: string;
552
- timestamp: string;
553
- text_content: string;
554
- }>;
555
- }, "strip", z.ZodTypeAny, {
556
- message: {
557
- type: string;
558
- id: string;
559
- role: string;
560
- timestamp: string;
561
- text_content: string;
562
- };
563
- }, {
564
- message: {
565
- type: string;
566
- id: string;
567
- role: string;
568
- timestamp: string;
569
- text_content: string;
570
- };
571
- }>;
572
- export type PostRunMessageResponse = z.infer<typeof postRunMessageResponseSchema>;
573
- export declare const respondHumanRequestResponseSchema: z.ZodObject<{
574
- human_request: z.ZodObject<{
575
- id: z.ZodString;
576
- run_id: z.ZodString;
577
- title: z.ZodString;
578
- description: z.ZodOptional<z.ZodNullable<z.ZodString>>;
579
- response: z.ZodOptional<z.ZodNullable<z.ZodString>>;
580
- responded_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
581
- created_at: z.ZodString;
582
- }, "strip", z.ZodTypeAny, {
583
- id: string;
584
- created_at: string;
585
- title: string;
586
- run_id: string;
587
- description?: string | null | undefined;
588
- response?: string | null | undefined;
589
- responded_at?: string | null | undefined;
590
- }, {
591
- id: string;
592
- created_at: string;
593
- title: string;
594
- run_id: string;
595
- description?: string | null | undefined;
596
- response?: string | null | undefined;
597
- responded_at?: string | null | undefined;
598
- }>;
599
- }, "strip", z.ZodTypeAny, {
600
- human_request: {
601
- id: string;
602
- created_at: string;
603
- title: string;
604
- run_id: string;
605
- description?: string | null | undefined;
606
- response?: string | null | undefined;
607
- responded_at?: string | null | undefined;
608
- };
609
- }, {
610
- human_request: {
611
- id: string;
612
- created_at: string;
613
- title: string;
614
- run_id: string;
615
- description?: string | null | undefined;
616
- response?: string | null | undefined;
617
- responded_at?: string | null | undefined;
618
- };
619
- }>;
620
- export type RespondHumanRequestResponse = z.infer<typeof respondHumanRequestResponseSchema>;
621
- export {};
@@ -1,91 +0,0 @@
1
- import { z } from "zod";
2
- const publicRunSchema = z.object({
3
- id: z.string(),
4
- agent_id: z.string(),
5
- build_id: z.string(),
6
- status: z.string(),
7
- source: z.string().nullish(),
8
- sandbox_id: z.string().nullish(),
9
- started_at: z.string().nullish(),
10
- completed_at: z.string().nullish(),
11
- created_at: z.string(),
12
- updated_at: z.string().nullish(),
13
- human_in_the_loop_enabled: z.boolean().nullish(),
14
- });
15
- export const startRunResponseSchema = z.object({
16
- run: publicRunSchema,
17
- });
18
- const questionOptionSchema = z.object({
19
- label: z.string(),
20
- description: z.string().nullish(),
21
- });
22
- const questionSchema = z.object({
23
- question: z.string(),
24
- header: z.string().nullish(),
25
- options: z.array(questionOptionSchema).nullish(),
26
- multi_select: z.boolean().nullish(),
27
- });
28
- const pendingHumanRequestSchema = z.object({
29
- id: z.string(),
30
- title: z.string(),
31
- description: z.string().nullish(),
32
- created_at: z.string(),
33
- type: z.string(),
34
- questions: z.array(questionSchema).nullish(),
35
- });
36
- export const getRunResponseSchema = z.object({
37
- run: publicRunSchema.nullable(),
38
- pending_human_request: pendingHumanRequestSchema.nullish(),
39
- });
40
- export const stopRunResponseSchema = z.object({
41
- success: z.boolean(),
42
- message: z.string().nullish(),
43
- });
44
- const runMessageSchema = z.object({
45
- id: z.string(),
46
- type: z.string(),
47
- role: z.string(),
48
- timestamp: z.string(),
49
- text_content: z.string().nullish(),
50
- tool_call: z
51
- .object({
52
- id: z.string(),
53
- name: z.string(),
54
- arguments: z.record(z.unknown()).nullish(),
55
- })
56
- .nullish(),
57
- tool_result: z
58
- .object({
59
- tool_call_id: z.string(),
60
- result: z.unknown().nullish(),
61
- error: z.string().nullish(),
62
- })
63
- .nullish(),
64
- });
65
- export const listRunMessagesResponseSchema = z.object({
66
- messages: z.array(runMessageSchema),
67
- total: z.number().nullish(),
68
- limit: z.number().nullish(),
69
- offset: z.number().nullish(),
70
- });
71
- const postedMessageSchema = z.object({
72
- id: z.string(),
73
- type: z.string(),
74
- role: z.string(),
75
- timestamp: z.string(),
76
- text_content: z.string(),
77
- });
78
- export const postRunMessageResponseSchema = z.object({
79
- message: postedMessageSchema,
80
- });
81
- export const respondHumanRequestResponseSchema = z.object({
82
- human_request: z.object({
83
- id: z.string(),
84
- run_id: z.string(),
85
- title: z.string(),
86
- description: z.string().nullish(),
87
- response: z.string().nullish(),
88
- responded_at: z.string().nullish(),
89
- created_at: z.string(),
90
- }),
91
- });