@perstack/core 0.0.52 → 0.0.54

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 (122) hide show
  1. package/dist/src/adapters/event-creators.d.ts +26 -0
  2. package/dist/src/adapters/event-creators.d.ts.map +1 -0
  3. package/dist/src/adapters/event-creators.js +126 -0
  4. package/dist/src/adapters/event-creators.js.map +1 -0
  5. package/dist/src/adapters/index.d.ts +2 -0
  6. package/dist/src/adapters/index.d.ts.map +1 -0
  7. package/dist/src/adapters/index.js +2 -0
  8. package/dist/src/adapters/index.js.map +1 -0
  9. package/dist/src/constants/constants.d.ts +11 -0
  10. package/dist/src/constants/constants.d.ts.map +1 -0
  11. package/dist/src/constants/constants.js +13 -0
  12. package/dist/src/constants/constants.js.map +1 -0
  13. package/dist/src/errors.d.ts +4 -0
  14. package/dist/src/errors.d.ts.map +1 -0
  15. package/dist/src/errors.js +7 -0
  16. package/dist/src/errors.js.map +1 -0
  17. package/dist/src/index.d.ts +28 -6219
  18. package/dist/src/index.d.ts.map +1 -0
  19. package/dist/src/index.js +28 -1904
  20. package/dist/src/index.js.map +1 -1
  21. package/dist/src/known-models/index.d.ts +9 -0
  22. package/dist/src/known-models/index.d.ts.map +1 -0
  23. package/dist/src/known-models/index.js +216 -0
  24. package/dist/src/known-models/index.js.map +1 -0
  25. package/dist/src/schemas/activity.d.ts +2159 -0
  26. package/dist/src/schemas/activity.d.ts.map +1 -0
  27. package/dist/src/schemas/activity.js +209 -0
  28. package/dist/src/schemas/activity.js.map +1 -0
  29. package/dist/src/schemas/checkpoint.d.ts +338 -0
  30. package/dist/src/schemas/checkpoint.d.ts.map +1 -0
  31. package/dist/src/schemas/checkpoint.js +69 -0
  32. package/dist/src/schemas/checkpoint.js.map +1 -0
  33. package/dist/src/schemas/expert.d.ts +309 -0
  34. package/dist/src/schemas/expert.d.ts.map +1 -0
  35. package/dist/src/schemas/expert.js +70 -0
  36. package/dist/src/schemas/expert.js.map +1 -0
  37. package/dist/src/schemas/job.d.ts +44 -0
  38. package/dist/src/schemas/job.d.ts.map +1 -0
  39. package/dist/src/schemas/job.js +22 -0
  40. package/dist/src/schemas/job.js.map +1 -0
  41. package/dist/src/schemas/lockfile.d.ts +143 -0
  42. package/dist/src/schemas/lockfile.d.ts.map +1 -0
  43. package/dist/src/schemas/lockfile.js +26 -0
  44. package/dist/src/schemas/lockfile.js.map +1 -0
  45. package/dist/src/schemas/message-part.d.ts +239 -0
  46. package/dist/src/schemas/message-part.d.ts.map +1 -0
  47. package/dist/src/schemas/message-part.js +80 -0
  48. package/dist/src/schemas/message-part.js.map +1 -0
  49. package/dist/src/schemas/message.d.ts +236 -0
  50. package/dist/src/schemas/message.d.ts.map +1 -0
  51. package/dist/src/schemas/message.js +44 -0
  52. package/dist/src/schemas/message.js.map +1 -0
  53. package/dist/src/schemas/perstack-toml.d.ts +366 -0
  54. package/dist/src/schemas/perstack-toml.d.ts.map +1 -0
  55. package/dist/src/schemas/perstack-toml.js +175 -0
  56. package/dist/src/schemas/perstack-toml.js.map +1 -0
  57. package/dist/src/schemas/provider-config.d.ts +216 -0
  58. package/dist/src/schemas/provider-config.d.ts.map +1 -0
  59. package/dist/src/schemas/provider-config.js +86 -0
  60. package/dist/src/schemas/provider-config.js.map +1 -0
  61. package/dist/src/schemas/provider-tools.d.ts +93 -0
  62. package/dist/src/schemas/provider-tools.d.ts.map +1 -0
  63. package/dist/src/schemas/provider-tools.js +60 -0
  64. package/dist/src/schemas/provider-tools.js.map +1 -0
  65. package/dist/src/schemas/run-command.d.ts +127 -0
  66. package/dist/src/schemas/run-command.d.ts.map +1 -0
  67. package/dist/src/schemas/run-command.js +82 -0
  68. package/dist/src/schemas/run-command.js.map +1 -0
  69. package/dist/src/schemas/runtime-version.d.ts +4 -0
  70. package/dist/src/schemas/runtime-version.d.ts.map +1 -0
  71. package/dist/src/schemas/runtime-version.js +6 -0
  72. package/dist/src/schemas/runtime-version.js.map +1 -0
  73. package/dist/src/schemas/runtime.d.ts +1317 -0
  74. package/dist/src/schemas/runtime.d.ts.map +1 -0
  75. package/dist/src/schemas/runtime.js +205 -0
  76. package/dist/src/schemas/runtime.js.map +1 -0
  77. package/dist/src/schemas/skill-manager.d.ts +64 -0
  78. package/dist/src/schemas/skill-manager.d.ts.map +1 -0
  79. package/dist/src/schemas/skill-manager.js +2 -0
  80. package/dist/src/schemas/skill-manager.js.map +1 -0
  81. package/dist/src/schemas/skill.d.ts +147 -0
  82. package/dist/src/schemas/skill.d.ts.map +1 -0
  83. package/dist/src/schemas/skill.js +99 -0
  84. package/dist/src/schemas/skill.js.map +1 -0
  85. package/dist/src/schemas/step.d.ts +370 -0
  86. package/dist/src/schemas/step.d.ts.map +1 -0
  87. package/dist/src/schemas/step.js +21 -0
  88. package/dist/src/schemas/step.js.map +1 -0
  89. package/dist/src/schemas/tool-call.d.ts +19 -0
  90. package/dist/src/schemas/tool-call.d.ts.map +1 -0
  91. package/dist/src/schemas/tool-call.js +10 -0
  92. package/dist/src/schemas/tool-call.js.map +1 -0
  93. package/dist/src/schemas/tool-result.d.ts +86 -0
  94. package/dist/src/schemas/tool-result.d.ts.map +1 -0
  95. package/dist/src/schemas/tool-result.js +11 -0
  96. package/dist/src/schemas/tool-result.js.map +1 -0
  97. package/dist/src/schemas/usage.d.ts +22 -0
  98. package/dist/src/schemas/usage.d.ts.map +1 -0
  99. package/dist/src/schemas/usage.js +10 -0
  100. package/dist/src/schemas/usage.js.map +1 -0
  101. package/dist/src/utils/activity.d.ts +20 -0
  102. package/dist/src/utils/activity.d.ts.map +1 -0
  103. package/dist/src/utils/activity.js +449 -0
  104. package/dist/src/utils/activity.js.map +1 -0
  105. package/dist/src/utils/env-filter.d.ts +4 -0
  106. package/dist/src/utils/env-filter.d.ts.map +1 -0
  107. package/dist/src/utils/env-filter.js +50 -0
  108. package/dist/src/utils/env-filter.js.map +1 -0
  109. package/dist/src/utils/event-filter.d.ts +16 -0
  110. package/dist/src/utils/event-filter.d.ts.map +1 -0
  111. package/dist/src/utils/event-filter.js +31 -0
  112. package/dist/src/utils/event-filter.js.map +1 -0
  113. package/dist/src/utils/expert-type.d.ts +38 -0
  114. package/dist/src/utils/expert-type.d.ts.map +1 -0
  115. package/dist/src/utils/expert-type.js +88 -0
  116. package/dist/src/utils/expert-type.js.map +1 -0
  117. package/dist/src/utils/zod-error.d.ts +4 -0
  118. package/dist/src/utils/zod-error.d.ts.map +1 -0
  119. package/dist/src/utils/zod-error.js +17 -0
  120. package/dist/src/utils/zod-error.js.map +1 -0
  121. package/package.json +19 -17
  122. package/LICENSE +0 -202
@@ -0,0 +1,2159 @@
1
+ import { z } from "zod";
2
+ import type { MessagePart } from "./message-part.js";
3
+ /** Base fields shared by all activities */
4
+ interface BaseActivity {
5
+ /** Unique activity ID */
6
+ id: string;
7
+ /** Expert key that executed this activity */
8
+ expertKey: string;
9
+ /** Run ID this activity belongs to */
10
+ runId: string;
11
+ /** Previous activity ID for daisy chain within the same run */
12
+ previousActivityId?: string;
13
+ /** Delegation info if this run was delegated from another */
14
+ delegatedBy?: {
15
+ expertKey: string;
16
+ runId: string;
17
+ };
18
+ /** LLM's reasoning/thinking process before executing this action */
19
+ reasoning?: string;
20
+ }
21
+ /** Query activity - User input that starts a run */
22
+ export interface QueryActivity extends BaseActivity {
23
+ type: "query";
24
+ text: string;
25
+ }
26
+ export declare const queryActivitySchema: z.ZodObject<{
27
+ id: z.ZodString;
28
+ expertKey: z.ZodString;
29
+ runId: z.ZodString;
30
+ previousActivityId: z.ZodOptional<z.ZodString>;
31
+ delegatedBy: z.ZodOptional<z.ZodObject<{
32
+ expertKey: z.ZodString;
33
+ runId: z.ZodString;
34
+ }, z.core.$strip>>;
35
+ reasoning: z.ZodOptional<z.ZodString>;
36
+ type: z.ZodLiteral<"query">;
37
+ text: z.ZodString;
38
+ }, z.core.$strip>;
39
+ /** Retry activity - generation failed and will be retried */
40
+ export interface RetryActivity extends BaseActivity {
41
+ type: "retry";
42
+ error: string;
43
+ message: string;
44
+ }
45
+ export declare const retryActivitySchema: z.ZodObject<{
46
+ id: z.ZodString;
47
+ expertKey: z.ZodString;
48
+ runId: z.ZodString;
49
+ previousActivityId: z.ZodOptional<z.ZodString>;
50
+ delegatedBy: z.ZodOptional<z.ZodObject<{
51
+ expertKey: z.ZodString;
52
+ runId: z.ZodString;
53
+ }, z.core.$strip>>;
54
+ reasoning: z.ZodOptional<z.ZodString>;
55
+ type: z.ZodLiteral<"retry">;
56
+ error: z.ZodString;
57
+ message: z.ZodString;
58
+ }, z.core.$strip>;
59
+ /** Complete activity - Run completed successfully with final result */
60
+ export interface CompleteActivity extends BaseActivity {
61
+ type: "complete";
62
+ text: string;
63
+ }
64
+ export declare const completeActivitySchema: z.ZodObject<{
65
+ id: z.ZodString;
66
+ expertKey: z.ZodString;
67
+ runId: z.ZodString;
68
+ previousActivityId: z.ZodOptional<z.ZodString>;
69
+ delegatedBy: z.ZodOptional<z.ZodObject<{
70
+ expertKey: z.ZodString;
71
+ runId: z.ZodString;
72
+ }, z.core.$strip>>;
73
+ reasoning: z.ZodOptional<z.ZodString>;
74
+ type: z.ZodLiteral<"complete">;
75
+ text: z.ZodString;
76
+ }, z.core.$strip>;
77
+ /** Error activity - When run stopped by error */
78
+ export interface ErrorActivity extends BaseActivity {
79
+ type: "error";
80
+ error?: string;
81
+ errorName?: string;
82
+ isRetryable?: boolean;
83
+ }
84
+ export declare const errorActivitySchema: z.ZodObject<{
85
+ id: z.ZodString;
86
+ expertKey: z.ZodString;
87
+ runId: z.ZodString;
88
+ previousActivityId: z.ZodOptional<z.ZodString>;
89
+ delegatedBy: z.ZodOptional<z.ZodObject<{
90
+ expertKey: z.ZodString;
91
+ runId: z.ZodString;
92
+ }, z.core.$strip>>;
93
+ reasoning: z.ZodOptional<z.ZodString>;
94
+ type: z.ZodLiteral<"error">;
95
+ error: z.ZodOptional<z.ZodString>;
96
+ errorName: z.ZodOptional<z.ZodString>;
97
+ isRetryable: z.ZodOptional<z.ZodBoolean>;
98
+ }, z.core.$strip>;
99
+ /** Attempt completion activity - Expert signaling task completion */
100
+ export interface AttemptCompletionActivity extends BaseActivity {
101
+ type: "attemptCompletion";
102
+ remainingTodos?: Array<{
103
+ id: number;
104
+ title: string;
105
+ completed: boolean;
106
+ }>;
107
+ error?: string;
108
+ }
109
+ export declare const attemptCompletionActivitySchema: z.ZodObject<{
110
+ id: z.ZodString;
111
+ expertKey: z.ZodString;
112
+ runId: z.ZodString;
113
+ previousActivityId: z.ZodOptional<z.ZodString>;
114
+ delegatedBy: z.ZodOptional<z.ZodObject<{
115
+ expertKey: z.ZodString;
116
+ runId: z.ZodString;
117
+ }, z.core.$strip>>;
118
+ reasoning: z.ZodOptional<z.ZodString>;
119
+ type: z.ZodLiteral<"attemptCompletion">;
120
+ remainingTodos: z.ZodOptional<z.ZodArray<z.ZodObject<{
121
+ id: z.ZodNumber;
122
+ title: z.ZodString;
123
+ completed: z.ZodBoolean;
124
+ }, z.core.$strip>>>;
125
+ error: z.ZodOptional<z.ZodString>;
126
+ }, z.core.$strip>;
127
+ /** Todo activity - Expert managing todo list */
128
+ export interface TodoActivity extends BaseActivity {
129
+ type: "todo";
130
+ newTodos?: string[];
131
+ completedTodos?: number[];
132
+ todos: Array<{
133
+ id: number;
134
+ title: string;
135
+ completed: boolean;
136
+ }>;
137
+ error?: string;
138
+ }
139
+ export declare const todoActivitySchema: z.ZodObject<{
140
+ id: z.ZodString;
141
+ expertKey: z.ZodString;
142
+ runId: z.ZodString;
143
+ previousActivityId: z.ZodOptional<z.ZodString>;
144
+ delegatedBy: z.ZodOptional<z.ZodObject<{
145
+ expertKey: z.ZodString;
146
+ runId: z.ZodString;
147
+ }, z.core.$strip>>;
148
+ reasoning: z.ZodOptional<z.ZodString>;
149
+ type: z.ZodLiteral<"todo">;
150
+ newTodos: z.ZodOptional<z.ZodArray<z.ZodString>>;
151
+ completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
152
+ todos: z.ZodArray<z.ZodObject<{
153
+ id: z.ZodNumber;
154
+ title: z.ZodString;
155
+ completed: z.ZodBoolean;
156
+ }, z.core.$strip>>;
157
+ error: z.ZodOptional<z.ZodString>;
158
+ }, z.core.$strip>;
159
+ /** Clear todo activity - Expert clearing the todo list */
160
+ export interface ClearTodoActivity extends BaseActivity {
161
+ type: "clearTodo";
162
+ error?: string;
163
+ }
164
+ export declare const clearTodoActivitySchema: z.ZodObject<{
165
+ id: z.ZodString;
166
+ expertKey: z.ZodString;
167
+ runId: z.ZodString;
168
+ previousActivityId: z.ZodOptional<z.ZodString>;
169
+ delegatedBy: z.ZodOptional<z.ZodObject<{
170
+ expertKey: z.ZodString;
171
+ runId: z.ZodString;
172
+ }, z.core.$strip>>;
173
+ reasoning: z.ZodOptional<z.ZodString>;
174
+ type: z.ZodLiteral<"clearTodo">;
175
+ error: z.ZodOptional<z.ZodString>;
176
+ }, z.core.$strip>;
177
+ /** Read image file activity */
178
+ export interface ReadImageFileActivity extends BaseActivity {
179
+ type: "readImageFile";
180
+ path: string;
181
+ mimeType?: string;
182
+ size?: number;
183
+ error?: string;
184
+ }
185
+ export declare const readImageFileActivitySchema: z.ZodObject<{
186
+ id: z.ZodString;
187
+ expertKey: z.ZodString;
188
+ runId: z.ZodString;
189
+ previousActivityId: z.ZodOptional<z.ZodString>;
190
+ delegatedBy: z.ZodOptional<z.ZodObject<{
191
+ expertKey: z.ZodString;
192
+ runId: z.ZodString;
193
+ }, z.core.$strip>>;
194
+ reasoning: z.ZodOptional<z.ZodString>;
195
+ type: z.ZodLiteral<"readImageFile">;
196
+ path: z.ZodString;
197
+ mimeType: z.ZodOptional<z.ZodString>;
198
+ size: z.ZodOptional<z.ZodNumber>;
199
+ error: z.ZodOptional<z.ZodString>;
200
+ }, z.core.$strip>;
201
+ /** Read PDF file activity */
202
+ export interface ReadPdfFileActivity extends BaseActivity {
203
+ type: "readPdfFile";
204
+ path: string;
205
+ mimeType?: string;
206
+ size?: number;
207
+ error?: string;
208
+ }
209
+ export declare const readPdfFileActivitySchema: z.ZodObject<{
210
+ id: z.ZodString;
211
+ expertKey: z.ZodString;
212
+ runId: z.ZodString;
213
+ previousActivityId: z.ZodOptional<z.ZodString>;
214
+ delegatedBy: z.ZodOptional<z.ZodObject<{
215
+ expertKey: z.ZodString;
216
+ runId: z.ZodString;
217
+ }, z.core.$strip>>;
218
+ reasoning: z.ZodOptional<z.ZodString>;
219
+ type: z.ZodLiteral<"readPdfFile">;
220
+ path: z.ZodString;
221
+ mimeType: z.ZodOptional<z.ZodString>;
222
+ size: z.ZodOptional<z.ZodNumber>;
223
+ error: z.ZodOptional<z.ZodString>;
224
+ }, z.core.$strip>;
225
+ /** Read text file activity */
226
+ export interface ReadTextFileActivity extends BaseActivity {
227
+ type: "readTextFile";
228
+ path: string;
229
+ content?: string;
230
+ from?: number;
231
+ to?: number;
232
+ error?: string;
233
+ }
234
+ export declare const readTextFileActivitySchema: z.ZodObject<{
235
+ id: z.ZodString;
236
+ expertKey: z.ZodString;
237
+ runId: z.ZodString;
238
+ previousActivityId: z.ZodOptional<z.ZodString>;
239
+ delegatedBy: z.ZodOptional<z.ZodObject<{
240
+ expertKey: z.ZodString;
241
+ runId: z.ZodString;
242
+ }, z.core.$strip>>;
243
+ reasoning: z.ZodOptional<z.ZodString>;
244
+ type: z.ZodLiteral<"readTextFile">;
245
+ path: z.ZodString;
246
+ content: z.ZodOptional<z.ZodString>;
247
+ from: z.ZodOptional<z.ZodNumber>;
248
+ to: z.ZodOptional<z.ZodNumber>;
249
+ error: z.ZodOptional<z.ZodString>;
250
+ }, z.core.$strip>;
251
+ /** Edit text file activity */
252
+ export interface EditTextFileActivity extends BaseActivity {
253
+ type: "editTextFile";
254
+ path: string;
255
+ newText: string;
256
+ oldText: string;
257
+ error?: string;
258
+ }
259
+ export declare const editTextFileActivitySchema: z.ZodObject<{
260
+ id: z.ZodString;
261
+ expertKey: z.ZodString;
262
+ runId: z.ZodString;
263
+ previousActivityId: z.ZodOptional<z.ZodString>;
264
+ delegatedBy: z.ZodOptional<z.ZodObject<{
265
+ expertKey: z.ZodString;
266
+ runId: z.ZodString;
267
+ }, z.core.$strip>>;
268
+ reasoning: z.ZodOptional<z.ZodString>;
269
+ type: z.ZodLiteral<"editTextFile">;
270
+ path: z.ZodString;
271
+ newText: z.ZodString;
272
+ oldText: z.ZodString;
273
+ error: z.ZodOptional<z.ZodString>;
274
+ }, z.core.$strip>;
275
+ /** Write text file activity */
276
+ export interface WriteTextFileActivity extends BaseActivity {
277
+ type: "writeTextFile";
278
+ path: string;
279
+ text: string;
280
+ error?: string;
281
+ }
282
+ export declare const writeTextFileActivitySchema: z.ZodObject<{
283
+ id: z.ZodString;
284
+ expertKey: z.ZodString;
285
+ runId: z.ZodString;
286
+ previousActivityId: z.ZodOptional<z.ZodString>;
287
+ delegatedBy: z.ZodOptional<z.ZodObject<{
288
+ expertKey: z.ZodString;
289
+ runId: z.ZodString;
290
+ }, z.core.$strip>>;
291
+ reasoning: z.ZodOptional<z.ZodString>;
292
+ type: z.ZodLiteral<"writeTextFile">;
293
+ path: z.ZodString;
294
+ text: z.ZodString;
295
+ error: z.ZodOptional<z.ZodString>;
296
+ }, z.core.$strip>;
297
+ /** Exec activity - Command execution */
298
+ export interface ExecActivity extends BaseActivity {
299
+ type: "exec";
300
+ command: string;
301
+ args: string[];
302
+ cwd: string;
303
+ output?: string;
304
+ error?: string;
305
+ stdout?: string;
306
+ stderr?: string;
307
+ }
308
+ export declare const execActivitySchema: z.ZodObject<{
309
+ id: z.ZodString;
310
+ expertKey: z.ZodString;
311
+ runId: z.ZodString;
312
+ previousActivityId: z.ZodOptional<z.ZodString>;
313
+ delegatedBy: z.ZodOptional<z.ZodObject<{
314
+ expertKey: z.ZodString;
315
+ runId: z.ZodString;
316
+ }, z.core.$strip>>;
317
+ reasoning: z.ZodOptional<z.ZodString>;
318
+ type: z.ZodLiteral<"exec">;
319
+ command: z.ZodString;
320
+ args: z.ZodArray<z.ZodString>;
321
+ cwd: z.ZodString;
322
+ output: z.ZodOptional<z.ZodString>;
323
+ error: z.ZodOptional<z.ZodString>;
324
+ stdout: z.ZodOptional<z.ZodString>;
325
+ stderr: z.ZodOptional<z.ZodString>;
326
+ }, z.core.$strip>;
327
+ /** Delegate activity - Expert delegating to another Expert */
328
+ export interface DelegateActivity extends BaseActivity {
329
+ type: "delegate";
330
+ delegateExpertKey: string;
331
+ query: string;
332
+ }
333
+ export declare const delegateActivitySchema: z.ZodObject<{
334
+ id: z.ZodString;
335
+ expertKey: z.ZodString;
336
+ runId: z.ZodString;
337
+ previousActivityId: z.ZodOptional<z.ZodString>;
338
+ delegatedBy: z.ZodOptional<z.ZodObject<{
339
+ expertKey: z.ZodString;
340
+ runId: z.ZodString;
341
+ }, z.core.$strip>>;
342
+ reasoning: z.ZodOptional<z.ZodString>;
343
+ type: z.ZodLiteral<"delegate">;
344
+ delegateExpertKey: z.ZodString;
345
+ query: z.ZodString;
346
+ }, z.core.$strip>;
347
+ /** Delegation complete activity - All delegated experts have returned */
348
+ export interface DelegationCompleteActivity extends BaseActivity {
349
+ type: "delegationComplete";
350
+ count: number;
351
+ }
352
+ export declare const delegationCompleteActivitySchema: z.ZodObject<{
353
+ id: z.ZodString;
354
+ expertKey: z.ZodString;
355
+ runId: z.ZodString;
356
+ previousActivityId: z.ZodOptional<z.ZodString>;
357
+ delegatedBy: z.ZodOptional<z.ZodObject<{
358
+ expertKey: z.ZodString;
359
+ runId: z.ZodString;
360
+ }, z.core.$strip>>;
361
+ reasoning: z.ZodOptional<z.ZodString>;
362
+ type: z.ZodLiteral<"delegationComplete">;
363
+ count: z.ZodNumber;
364
+ }, z.core.$strip>;
365
+ /** Interactive tool activity - Tool requiring user interaction */
366
+ export interface InteractiveToolActivity extends BaseActivity {
367
+ type: "interactiveTool";
368
+ skillName: string;
369
+ toolName: string;
370
+ args: Record<string, unknown>;
371
+ }
372
+ export declare const interactiveToolActivitySchema: z.ZodObject<{
373
+ id: z.ZodString;
374
+ expertKey: z.ZodString;
375
+ runId: z.ZodString;
376
+ previousActivityId: z.ZodOptional<z.ZodString>;
377
+ delegatedBy: z.ZodOptional<z.ZodObject<{
378
+ expertKey: z.ZodString;
379
+ runId: z.ZodString;
380
+ }, z.core.$strip>>;
381
+ reasoning: z.ZodOptional<z.ZodString>;
382
+ type: z.ZodLiteral<"interactiveTool">;
383
+ skillName: z.ZodString;
384
+ toolName: z.ZodString;
385
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
386
+ }, z.core.$strip>;
387
+ /** General tool activity - Any other tool call */
388
+ export interface GeneralToolActivity extends BaseActivity {
389
+ type: "generalTool";
390
+ skillName: string;
391
+ toolName: string;
392
+ args: Record<string, unknown>;
393
+ result?: MessagePart[];
394
+ error?: string;
395
+ }
396
+ export declare const generalToolActivitySchema: z.ZodObject<{
397
+ id: z.ZodString;
398
+ expertKey: z.ZodString;
399
+ runId: z.ZodString;
400
+ previousActivityId: z.ZodOptional<z.ZodString>;
401
+ delegatedBy: z.ZodOptional<z.ZodObject<{
402
+ expertKey: z.ZodString;
403
+ runId: z.ZodString;
404
+ }, z.core.$strip>>;
405
+ reasoning: z.ZodOptional<z.ZodString>;
406
+ type: z.ZodLiteral<"generalTool">;
407
+ skillName: z.ZodString;
408
+ toolName: z.ZodString;
409
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
410
+ result: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
411
+ id: z.ZodString;
412
+ type: z.ZodLiteral<"textPart">;
413
+ text: z.ZodString;
414
+ }, z.core.$strip>, z.ZodObject<{
415
+ id: z.ZodString;
416
+ type: z.ZodLiteral<"imageUrlPart">;
417
+ url: z.ZodURL;
418
+ mimeType: z.ZodString;
419
+ }, z.core.$strip>, z.ZodObject<{
420
+ id: z.ZodString;
421
+ type: z.ZodLiteral<"imageInlinePart">;
422
+ encodedData: z.ZodString;
423
+ mimeType: z.ZodString;
424
+ }, z.core.$strip>, z.ZodObject<{
425
+ id: z.ZodString;
426
+ type: z.ZodLiteral<"imageBinaryPart">;
427
+ data: z.ZodString;
428
+ mimeType: z.ZodString;
429
+ }, z.core.$strip>, z.ZodObject<{
430
+ id: z.ZodString;
431
+ type: z.ZodLiteral<"fileUrlPart">;
432
+ url: z.ZodString;
433
+ mimeType: z.ZodString;
434
+ }, z.core.$strip>, z.ZodObject<{
435
+ id: z.ZodString;
436
+ type: z.ZodLiteral<"fileInlinePart">;
437
+ encodedData: z.ZodString;
438
+ mimeType: z.ZodString;
439
+ }, z.core.$strip>, z.ZodObject<{
440
+ id: z.ZodString;
441
+ type: z.ZodLiteral<"fileBinaryPart">;
442
+ data: z.ZodString;
443
+ mimeType: z.ZodString;
444
+ }, z.core.$strip>, z.ZodObject<{
445
+ id: z.ZodString;
446
+ type: z.ZodLiteral<"toolCallPart">;
447
+ toolCallId: z.ZodString;
448
+ toolName: z.ZodString;
449
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
450
+ }, z.core.$strip>, z.ZodObject<{
451
+ id: z.ZodString;
452
+ type: z.ZodLiteral<"toolResultPart">;
453
+ toolCallId: z.ZodString;
454
+ toolName: z.ZodString;
455
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
456
+ id: z.ZodString;
457
+ type: z.ZodLiteral<"textPart">;
458
+ text: z.ZodString;
459
+ }, z.core.$strip>, z.ZodObject<{
460
+ id: z.ZodString;
461
+ type: z.ZodLiteral<"imageInlinePart">;
462
+ encodedData: z.ZodString;
463
+ mimeType: z.ZodString;
464
+ }, z.core.$strip>, z.ZodObject<{
465
+ id: z.ZodString;
466
+ type: z.ZodLiteral<"fileInlinePart">;
467
+ encodedData: z.ZodString;
468
+ mimeType: z.ZodString;
469
+ }, z.core.$strip>]>>;
470
+ isError: z.ZodOptional<z.ZodBoolean>;
471
+ }, z.core.$strip>, z.ZodObject<{
472
+ id: z.ZodString;
473
+ type: z.ZodLiteral<"thinkingPart">;
474
+ thinking: z.ZodString;
475
+ signature: z.ZodOptional<z.ZodString>;
476
+ }, z.core.$strip>], "type">>>;
477
+ error: z.ZodOptional<z.ZodString>;
478
+ }, z.core.$strip>;
479
+ /** Add skill activity - Dynamically adding an MCP skill */
480
+ export interface AddSkillActivity extends BaseActivity {
481
+ type: "addSkill";
482
+ name: string;
483
+ skillType: string;
484
+ tools?: string[];
485
+ error?: string;
486
+ }
487
+ export declare const addSkillActivitySchema: z.ZodObject<{
488
+ id: z.ZodString;
489
+ expertKey: z.ZodString;
490
+ runId: z.ZodString;
491
+ previousActivityId: z.ZodOptional<z.ZodString>;
492
+ delegatedBy: z.ZodOptional<z.ZodObject<{
493
+ expertKey: z.ZodString;
494
+ runId: z.ZodString;
495
+ }, z.core.$strip>>;
496
+ reasoning: z.ZodOptional<z.ZodString>;
497
+ type: z.ZodLiteral<"addSkill">;
498
+ name: z.ZodString;
499
+ skillType: z.ZodString;
500
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
+ error: z.ZodOptional<z.ZodString>;
502
+ }, z.core.$strip>;
503
+ /** Remove skill activity - Dynamically removing an MCP skill */
504
+ export interface RemoveSkillActivity extends BaseActivity {
505
+ type: "removeSkill";
506
+ skillName: string;
507
+ error?: string;
508
+ }
509
+ export declare const removeSkillActivitySchema: z.ZodObject<{
510
+ id: z.ZodString;
511
+ expertKey: z.ZodString;
512
+ runId: z.ZodString;
513
+ previousActivityId: z.ZodOptional<z.ZodString>;
514
+ delegatedBy: z.ZodOptional<z.ZodObject<{
515
+ expertKey: z.ZodString;
516
+ runId: z.ZodString;
517
+ }, z.core.$strip>>;
518
+ reasoning: z.ZodOptional<z.ZodString>;
519
+ type: z.ZodLiteral<"removeSkill">;
520
+ skillName: z.ZodString;
521
+ error: z.ZodOptional<z.ZodString>;
522
+ }, z.core.$strip>;
523
+ /** Add delegate activity - Dynamically adding a delegate expert */
524
+ export interface AddDelegateActivity extends BaseActivity {
525
+ type: "addDelegate";
526
+ targetExpertKey: string;
527
+ delegateToolName?: string;
528
+ error?: string;
529
+ }
530
+ export declare const addDelegateActivitySchema: z.ZodObject<{
531
+ id: z.ZodString;
532
+ expertKey: z.ZodString;
533
+ runId: z.ZodString;
534
+ previousActivityId: z.ZodOptional<z.ZodString>;
535
+ delegatedBy: z.ZodOptional<z.ZodObject<{
536
+ expertKey: z.ZodString;
537
+ runId: z.ZodString;
538
+ }, z.core.$strip>>;
539
+ reasoning: z.ZodOptional<z.ZodString>;
540
+ type: z.ZodLiteral<"addDelegate">;
541
+ targetExpertKey: z.ZodString;
542
+ delegateToolName: z.ZodOptional<z.ZodString>;
543
+ error: z.ZodOptional<z.ZodString>;
544
+ }, z.core.$strip>;
545
+ /** Remove delegate activity - Dynamically removing a delegate expert */
546
+ export interface RemoveDelegateActivity extends BaseActivity {
547
+ type: "removeDelegate";
548
+ expertName: string;
549
+ error?: string;
550
+ }
551
+ export declare const removeDelegateActivitySchema: z.ZodObject<{
552
+ id: z.ZodString;
553
+ expertKey: z.ZodString;
554
+ runId: z.ZodString;
555
+ previousActivityId: z.ZodOptional<z.ZodString>;
556
+ delegatedBy: z.ZodOptional<z.ZodObject<{
557
+ expertKey: z.ZodString;
558
+ runId: z.ZodString;
559
+ }, z.core.$strip>>;
560
+ reasoning: z.ZodOptional<z.ZodString>;
561
+ type: z.ZodLiteral<"removeDelegate">;
562
+ expertName: z.ZodString;
563
+ error: z.ZodOptional<z.ZodString>;
564
+ }, z.core.$strip>;
565
+ /** Create expert activity - Dynamically creating an expert definition */
566
+ export interface CreateExpertActivity extends BaseActivity {
567
+ type: "createExpert";
568
+ targetKey: string;
569
+ description?: string;
570
+ resultExpertKey?: string;
571
+ error?: string;
572
+ }
573
+ export declare const createExpertActivitySchema: z.ZodObject<{
574
+ id: z.ZodString;
575
+ expertKey: z.ZodString;
576
+ runId: z.ZodString;
577
+ previousActivityId: z.ZodOptional<z.ZodString>;
578
+ delegatedBy: z.ZodOptional<z.ZodObject<{
579
+ expertKey: z.ZodString;
580
+ runId: z.ZodString;
581
+ }, z.core.$strip>>;
582
+ reasoning: z.ZodOptional<z.ZodString>;
583
+ type: z.ZodLiteral<"createExpert">;
584
+ targetKey: z.ZodString;
585
+ description: z.ZodOptional<z.ZodString>;
586
+ resultExpertKey: z.ZodOptional<z.ZodString>;
587
+ error: z.ZodOptional<z.ZodString>;
588
+ }, z.core.$strip>;
589
+ /** Union of all activity types */
590
+ export type Activity = QueryActivity | RetryActivity | CompleteActivity | ErrorActivity | AttemptCompletionActivity | TodoActivity | ClearTodoActivity | ReadImageFileActivity | ReadPdfFileActivity | ReadTextFileActivity | EditTextFileActivity | WriteTextFileActivity | ExecActivity | DelegateActivity | DelegationCompleteActivity | InteractiveToolActivity | GeneralToolActivity | AddSkillActivity | RemoveSkillActivity | AddDelegateActivity | RemoveDelegateActivity | CreateExpertActivity;
591
+ export declare const activitySchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
592
+ id: z.ZodString;
593
+ expertKey: z.ZodString;
594
+ runId: z.ZodString;
595
+ previousActivityId: z.ZodOptional<z.ZodString>;
596
+ delegatedBy: z.ZodOptional<z.ZodObject<{
597
+ expertKey: z.ZodString;
598
+ runId: z.ZodString;
599
+ }, z.core.$strip>>;
600
+ reasoning: z.ZodOptional<z.ZodString>;
601
+ type: z.ZodLiteral<"query">;
602
+ text: z.ZodString;
603
+ }, z.core.$strip>, z.ZodObject<{
604
+ id: z.ZodString;
605
+ expertKey: z.ZodString;
606
+ runId: z.ZodString;
607
+ previousActivityId: z.ZodOptional<z.ZodString>;
608
+ delegatedBy: z.ZodOptional<z.ZodObject<{
609
+ expertKey: z.ZodString;
610
+ runId: z.ZodString;
611
+ }, z.core.$strip>>;
612
+ reasoning: z.ZodOptional<z.ZodString>;
613
+ type: z.ZodLiteral<"retry">;
614
+ error: z.ZodString;
615
+ message: z.ZodString;
616
+ }, z.core.$strip>, z.ZodObject<{
617
+ id: z.ZodString;
618
+ expertKey: z.ZodString;
619
+ runId: z.ZodString;
620
+ previousActivityId: z.ZodOptional<z.ZodString>;
621
+ delegatedBy: z.ZodOptional<z.ZodObject<{
622
+ expertKey: z.ZodString;
623
+ runId: z.ZodString;
624
+ }, z.core.$strip>>;
625
+ reasoning: z.ZodOptional<z.ZodString>;
626
+ type: z.ZodLiteral<"complete">;
627
+ text: z.ZodString;
628
+ }, z.core.$strip>, z.ZodObject<{
629
+ id: z.ZodString;
630
+ expertKey: z.ZodString;
631
+ runId: z.ZodString;
632
+ previousActivityId: z.ZodOptional<z.ZodString>;
633
+ delegatedBy: z.ZodOptional<z.ZodObject<{
634
+ expertKey: z.ZodString;
635
+ runId: z.ZodString;
636
+ }, z.core.$strip>>;
637
+ reasoning: z.ZodOptional<z.ZodString>;
638
+ type: z.ZodLiteral<"error">;
639
+ error: z.ZodOptional<z.ZodString>;
640
+ errorName: z.ZodOptional<z.ZodString>;
641
+ isRetryable: z.ZodOptional<z.ZodBoolean>;
642
+ }, z.core.$strip>, z.ZodObject<{
643
+ id: z.ZodString;
644
+ expertKey: z.ZodString;
645
+ runId: z.ZodString;
646
+ previousActivityId: z.ZodOptional<z.ZodString>;
647
+ delegatedBy: z.ZodOptional<z.ZodObject<{
648
+ expertKey: z.ZodString;
649
+ runId: z.ZodString;
650
+ }, z.core.$strip>>;
651
+ reasoning: z.ZodOptional<z.ZodString>;
652
+ type: z.ZodLiteral<"attemptCompletion">;
653
+ remainingTodos: z.ZodOptional<z.ZodArray<z.ZodObject<{
654
+ id: z.ZodNumber;
655
+ title: z.ZodString;
656
+ completed: z.ZodBoolean;
657
+ }, z.core.$strip>>>;
658
+ error: z.ZodOptional<z.ZodString>;
659
+ }, z.core.$strip>, z.ZodObject<{
660
+ id: z.ZodString;
661
+ expertKey: z.ZodString;
662
+ runId: z.ZodString;
663
+ previousActivityId: z.ZodOptional<z.ZodString>;
664
+ delegatedBy: z.ZodOptional<z.ZodObject<{
665
+ expertKey: z.ZodString;
666
+ runId: z.ZodString;
667
+ }, z.core.$strip>>;
668
+ reasoning: z.ZodOptional<z.ZodString>;
669
+ type: z.ZodLiteral<"todo">;
670
+ newTodos: z.ZodOptional<z.ZodArray<z.ZodString>>;
671
+ completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
672
+ todos: z.ZodArray<z.ZodObject<{
673
+ id: z.ZodNumber;
674
+ title: z.ZodString;
675
+ completed: z.ZodBoolean;
676
+ }, z.core.$strip>>;
677
+ error: z.ZodOptional<z.ZodString>;
678
+ }, z.core.$strip>, z.ZodObject<{
679
+ id: z.ZodString;
680
+ expertKey: z.ZodString;
681
+ runId: z.ZodString;
682
+ previousActivityId: z.ZodOptional<z.ZodString>;
683
+ delegatedBy: z.ZodOptional<z.ZodObject<{
684
+ expertKey: z.ZodString;
685
+ runId: z.ZodString;
686
+ }, z.core.$strip>>;
687
+ reasoning: z.ZodOptional<z.ZodString>;
688
+ type: z.ZodLiteral<"clearTodo">;
689
+ error: z.ZodOptional<z.ZodString>;
690
+ }, z.core.$strip>, z.ZodObject<{
691
+ id: z.ZodString;
692
+ expertKey: z.ZodString;
693
+ runId: z.ZodString;
694
+ previousActivityId: z.ZodOptional<z.ZodString>;
695
+ delegatedBy: z.ZodOptional<z.ZodObject<{
696
+ expertKey: z.ZodString;
697
+ runId: z.ZodString;
698
+ }, z.core.$strip>>;
699
+ reasoning: z.ZodOptional<z.ZodString>;
700
+ type: z.ZodLiteral<"readImageFile">;
701
+ path: z.ZodString;
702
+ mimeType: z.ZodOptional<z.ZodString>;
703
+ size: z.ZodOptional<z.ZodNumber>;
704
+ error: z.ZodOptional<z.ZodString>;
705
+ }, z.core.$strip>, z.ZodObject<{
706
+ id: z.ZodString;
707
+ expertKey: z.ZodString;
708
+ runId: z.ZodString;
709
+ previousActivityId: z.ZodOptional<z.ZodString>;
710
+ delegatedBy: z.ZodOptional<z.ZodObject<{
711
+ expertKey: z.ZodString;
712
+ runId: z.ZodString;
713
+ }, z.core.$strip>>;
714
+ reasoning: z.ZodOptional<z.ZodString>;
715
+ type: z.ZodLiteral<"readPdfFile">;
716
+ path: z.ZodString;
717
+ mimeType: z.ZodOptional<z.ZodString>;
718
+ size: z.ZodOptional<z.ZodNumber>;
719
+ error: z.ZodOptional<z.ZodString>;
720
+ }, z.core.$strip>, z.ZodObject<{
721
+ id: z.ZodString;
722
+ expertKey: z.ZodString;
723
+ runId: z.ZodString;
724
+ previousActivityId: z.ZodOptional<z.ZodString>;
725
+ delegatedBy: z.ZodOptional<z.ZodObject<{
726
+ expertKey: z.ZodString;
727
+ runId: z.ZodString;
728
+ }, z.core.$strip>>;
729
+ reasoning: z.ZodOptional<z.ZodString>;
730
+ type: z.ZodLiteral<"readTextFile">;
731
+ path: z.ZodString;
732
+ content: z.ZodOptional<z.ZodString>;
733
+ from: z.ZodOptional<z.ZodNumber>;
734
+ to: z.ZodOptional<z.ZodNumber>;
735
+ error: z.ZodOptional<z.ZodString>;
736
+ }, z.core.$strip>, z.ZodObject<{
737
+ id: z.ZodString;
738
+ expertKey: z.ZodString;
739
+ runId: z.ZodString;
740
+ previousActivityId: z.ZodOptional<z.ZodString>;
741
+ delegatedBy: z.ZodOptional<z.ZodObject<{
742
+ expertKey: z.ZodString;
743
+ runId: z.ZodString;
744
+ }, z.core.$strip>>;
745
+ reasoning: z.ZodOptional<z.ZodString>;
746
+ type: z.ZodLiteral<"editTextFile">;
747
+ path: z.ZodString;
748
+ newText: z.ZodString;
749
+ oldText: z.ZodString;
750
+ error: z.ZodOptional<z.ZodString>;
751
+ }, z.core.$strip>, z.ZodObject<{
752
+ id: z.ZodString;
753
+ expertKey: z.ZodString;
754
+ runId: z.ZodString;
755
+ previousActivityId: z.ZodOptional<z.ZodString>;
756
+ delegatedBy: z.ZodOptional<z.ZodObject<{
757
+ expertKey: z.ZodString;
758
+ runId: z.ZodString;
759
+ }, z.core.$strip>>;
760
+ reasoning: z.ZodOptional<z.ZodString>;
761
+ type: z.ZodLiteral<"writeTextFile">;
762
+ path: z.ZodString;
763
+ text: z.ZodString;
764
+ error: z.ZodOptional<z.ZodString>;
765
+ }, z.core.$strip>, z.ZodObject<{
766
+ id: z.ZodString;
767
+ expertKey: z.ZodString;
768
+ runId: z.ZodString;
769
+ previousActivityId: z.ZodOptional<z.ZodString>;
770
+ delegatedBy: z.ZodOptional<z.ZodObject<{
771
+ expertKey: z.ZodString;
772
+ runId: z.ZodString;
773
+ }, z.core.$strip>>;
774
+ reasoning: z.ZodOptional<z.ZodString>;
775
+ type: z.ZodLiteral<"exec">;
776
+ command: z.ZodString;
777
+ args: z.ZodArray<z.ZodString>;
778
+ cwd: z.ZodString;
779
+ output: z.ZodOptional<z.ZodString>;
780
+ error: z.ZodOptional<z.ZodString>;
781
+ stdout: z.ZodOptional<z.ZodString>;
782
+ stderr: z.ZodOptional<z.ZodString>;
783
+ }, z.core.$strip>, z.ZodObject<{
784
+ id: z.ZodString;
785
+ expertKey: z.ZodString;
786
+ runId: z.ZodString;
787
+ previousActivityId: z.ZodOptional<z.ZodString>;
788
+ delegatedBy: z.ZodOptional<z.ZodObject<{
789
+ expertKey: z.ZodString;
790
+ runId: z.ZodString;
791
+ }, z.core.$strip>>;
792
+ reasoning: z.ZodOptional<z.ZodString>;
793
+ type: z.ZodLiteral<"delegate">;
794
+ delegateExpertKey: z.ZodString;
795
+ query: z.ZodString;
796
+ }, z.core.$strip>, z.ZodObject<{
797
+ id: z.ZodString;
798
+ expertKey: z.ZodString;
799
+ runId: z.ZodString;
800
+ previousActivityId: z.ZodOptional<z.ZodString>;
801
+ delegatedBy: z.ZodOptional<z.ZodObject<{
802
+ expertKey: z.ZodString;
803
+ runId: z.ZodString;
804
+ }, z.core.$strip>>;
805
+ reasoning: z.ZodOptional<z.ZodString>;
806
+ type: z.ZodLiteral<"delegationComplete">;
807
+ count: z.ZodNumber;
808
+ }, z.core.$strip>, z.ZodObject<{
809
+ id: z.ZodString;
810
+ expertKey: z.ZodString;
811
+ runId: z.ZodString;
812
+ previousActivityId: z.ZodOptional<z.ZodString>;
813
+ delegatedBy: z.ZodOptional<z.ZodObject<{
814
+ expertKey: z.ZodString;
815
+ runId: z.ZodString;
816
+ }, z.core.$strip>>;
817
+ reasoning: z.ZodOptional<z.ZodString>;
818
+ type: z.ZodLiteral<"interactiveTool">;
819
+ skillName: z.ZodString;
820
+ toolName: z.ZodString;
821
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
822
+ }, z.core.$strip>, z.ZodObject<{
823
+ id: z.ZodString;
824
+ expertKey: z.ZodString;
825
+ runId: z.ZodString;
826
+ previousActivityId: z.ZodOptional<z.ZodString>;
827
+ delegatedBy: z.ZodOptional<z.ZodObject<{
828
+ expertKey: z.ZodString;
829
+ runId: z.ZodString;
830
+ }, z.core.$strip>>;
831
+ reasoning: z.ZodOptional<z.ZodString>;
832
+ type: z.ZodLiteral<"generalTool">;
833
+ skillName: z.ZodString;
834
+ toolName: z.ZodString;
835
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
836
+ result: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
837
+ id: z.ZodString;
838
+ type: z.ZodLiteral<"textPart">;
839
+ text: z.ZodString;
840
+ }, z.core.$strip>, z.ZodObject<{
841
+ id: z.ZodString;
842
+ type: z.ZodLiteral<"imageUrlPart">;
843
+ url: z.ZodURL;
844
+ mimeType: z.ZodString;
845
+ }, z.core.$strip>, z.ZodObject<{
846
+ id: z.ZodString;
847
+ type: z.ZodLiteral<"imageInlinePart">;
848
+ encodedData: z.ZodString;
849
+ mimeType: z.ZodString;
850
+ }, z.core.$strip>, z.ZodObject<{
851
+ id: z.ZodString;
852
+ type: z.ZodLiteral<"imageBinaryPart">;
853
+ data: z.ZodString;
854
+ mimeType: z.ZodString;
855
+ }, z.core.$strip>, z.ZodObject<{
856
+ id: z.ZodString;
857
+ type: z.ZodLiteral<"fileUrlPart">;
858
+ url: z.ZodString;
859
+ mimeType: z.ZodString;
860
+ }, z.core.$strip>, z.ZodObject<{
861
+ id: z.ZodString;
862
+ type: z.ZodLiteral<"fileInlinePart">;
863
+ encodedData: z.ZodString;
864
+ mimeType: z.ZodString;
865
+ }, z.core.$strip>, z.ZodObject<{
866
+ id: z.ZodString;
867
+ type: z.ZodLiteral<"fileBinaryPart">;
868
+ data: z.ZodString;
869
+ mimeType: z.ZodString;
870
+ }, z.core.$strip>, z.ZodObject<{
871
+ id: z.ZodString;
872
+ type: z.ZodLiteral<"toolCallPart">;
873
+ toolCallId: z.ZodString;
874
+ toolName: z.ZodString;
875
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
876
+ }, z.core.$strip>, z.ZodObject<{
877
+ id: z.ZodString;
878
+ type: z.ZodLiteral<"toolResultPart">;
879
+ toolCallId: z.ZodString;
880
+ toolName: z.ZodString;
881
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
882
+ id: z.ZodString;
883
+ type: z.ZodLiteral<"textPart">;
884
+ text: z.ZodString;
885
+ }, z.core.$strip>, z.ZodObject<{
886
+ id: z.ZodString;
887
+ type: z.ZodLiteral<"imageInlinePart">;
888
+ encodedData: z.ZodString;
889
+ mimeType: z.ZodString;
890
+ }, z.core.$strip>, z.ZodObject<{
891
+ id: z.ZodString;
892
+ type: z.ZodLiteral<"fileInlinePart">;
893
+ encodedData: z.ZodString;
894
+ mimeType: z.ZodString;
895
+ }, z.core.$strip>]>>;
896
+ isError: z.ZodOptional<z.ZodBoolean>;
897
+ }, z.core.$strip>, z.ZodObject<{
898
+ id: z.ZodString;
899
+ type: z.ZodLiteral<"thinkingPart">;
900
+ thinking: z.ZodString;
901
+ signature: z.ZodOptional<z.ZodString>;
902
+ }, z.core.$strip>], "type">>>;
903
+ error: z.ZodOptional<z.ZodString>;
904
+ }, z.core.$strip>, z.ZodObject<{
905
+ id: z.ZodString;
906
+ expertKey: z.ZodString;
907
+ runId: z.ZodString;
908
+ previousActivityId: z.ZodOptional<z.ZodString>;
909
+ delegatedBy: z.ZodOptional<z.ZodObject<{
910
+ expertKey: z.ZodString;
911
+ runId: z.ZodString;
912
+ }, z.core.$strip>>;
913
+ reasoning: z.ZodOptional<z.ZodString>;
914
+ type: z.ZodLiteral<"addSkill">;
915
+ name: z.ZodString;
916
+ skillType: z.ZodString;
917
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
918
+ error: z.ZodOptional<z.ZodString>;
919
+ }, z.core.$strip>, z.ZodObject<{
920
+ id: z.ZodString;
921
+ expertKey: z.ZodString;
922
+ runId: z.ZodString;
923
+ previousActivityId: z.ZodOptional<z.ZodString>;
924
+ delegatedBy: z.ZodOptional<z.ZodObject<{
925
+ expertKey: z.ZodString;
926
+ runId: z.ZodString;
927
+ }, z.core.$strip>>;
928
+ reasoning: z.ZodOptional<z.ZodString>;
929
+ type: z.ZodLiteral<"removeSkill">;
930
+ skillName: z.ZodString;
931
+ error: z.ZodOptional<z.ZodString>;
932
+ }, z.core.$strip>, z.ZodObject<{
933
+ id: z.ZodString;
934
+ expertKey: z.ZodString;
935
+ runId: z.ZodString;
936
+ previousActivityId: z.ZodOptional<z.ZodString>;
937
+ delegatedBy: z.ZodOptional<z.ZodObject<{
938
+ expertKey: z.ZodString;
939
+ runId: z.ZodString;
940
+ }, z.core.$strip>>;
941
+ reasoning: z.ZodOptional<z.ZodString>;
942
+ type: z.ZodLiteral<"addDelegate">;
943
+ targetExpertKey: z.ZodString;
944
+ delegateToolName: z.ZodOptional<z.ZodString>;
945
+ error: z.ZodOptional<z.ZodString>;
946
+ }, z.core.$strip>, z.ZodObject<{
947
+ id: z.ZodString;
948
+ expertKey: z.ZodString;
949
+ runId: z.ZodString;
950
+ previousActivityId: z.ZodOptional<z.ZodString>;
951
+ delegatedBy: z.ZodOptional<z.ZodObject<{
952
+ expertKey: z.ZodString;
953
+ runId: z.ZodString;
954
+ }, z.core.$strip>>;
955
+ reasoning: z.ZodOptional<z.ZodString>;
956
+ type: z.ZodLiteral<"removeDelegate">;
957
+ expertName: z.ZodString;
958
+ error: z.ZodOptional<z.ZodString>;
959
+ }, z.core.$strip>, z.ZodObject<{
960
+ id: z.ZodString;
961
+ expertKey: z.ZodString;
962
+ runId: z.ZodString;
963
+ previousActivityId: z.ZodOptional<z.ZodString>;
964
+ delegatedBy: z.ZodOptional<z.ZodObject<{
965
+ expertKey: z.ZodString;
966
+ runId: z.ZodString;
967
+ }, z.core.$strip>>;
968
+ reasoning: z.ZodOptional<z.ZodString>;
969
+ type: z.ZodLiteral<"createExpert">;
970
+ targetKey: z.ZodString;
971
+ description: z.ZodOptional<z.ZodString>;
972
+ resultExpertKey: z.ZodOptional<z.ZodString>;
973
+ error: z.ZodOptional<z.ZodString>;
974
+ }, z.core.$strip>], "type">;
975
+ /** Activity type discriminator */
976
+ export type ActivityType = Activity["type"];
977
+ /** Group of parallel activities sharing the same reasoning */
978
+ export interface ParallelActivitiesGroup {
979
+ type: "parallelGroup";
980
+ /** Unique group ID */
981
+ id: string;
982
+ /** Expert key that executed these activities */
983
+ expertKey: string;
984
+ /** Run ID these activities belong to */
985
+ runId: string;
986
+ /** Shared reasoning for all activities in the group */
987
+ reasoning?: string;
988
+ /** Activities in this parallel group (without individual reasoning) */
989
+ activities: Activity[];
990
+ }
991
+ export declare const parallelActivitiesGroupSchema: z.ZodObject<{
992
+ type: z.ZodLiteral<"parallelGroup">;
993
+ id: z.ZodString;
994
+ expertKey: z.ZodString;
995
+ runId: z.ZodString;
996
+ reasoning: z.ZodOptional<z.ZodString>;
997
+ activities: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
998
+ id: z.ZodString;
999
+ expertKey: z.ZodString;
1000
+ runId: z.ZodString;
1001
+ previousActivityId: z.ZodOptional<z.ZodString>;
1002
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1003
+ expertKey: z.ZodString;
1004
+ runId: z.ZodString;
1005
+ }, z.core.$strip>>;
1006
+ reasoning: z.ZodOptional<z.ZodString>;
1007
+ type: z.ZodLiteral<"query">;
1008
+ text: z.ZodString;
1009
+ }, z.core.$strip>, z.ZodObject<{
1010
+ id: z.ZodString;
1011
+ expertKey: z.ZodString;
1012
+ runId: z.ZodString;
1013
+ previousActivityId: z.ZodOptional<z.ZodString>;
1014
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1015
+ expertKey: z.ZodString;
1016
+ runId: z.ZodString;
1017
+ }, z.core.$strip>>;
1018
+ reasoning: z.ZodOptional<z.ZodString>;
1019
+ type: z.ZodLiteral<"retry">;
1020
+ error: z.ZodString;
1021
+ message: z.ZodString;
1022
+ }, z.core.$strip>, z.ZodObject<{
1023
+ id: z.ZodString;
1024
+ expertKey: z.ZodString;
1025
+ runId: z.ZodString;
1026
+ previousActivityId: z.ZodOptional<z.ZodString>;
1027
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1028
+ expertKey: z.ZodString;
1029
+ runId: z.ZodString;
1030
+ }, z.core.$strip>>;
1031
+ reasoning: z.ZodOptional<z.ZodString>;
1032
+ type: z.ZodLiteral<"complete">;
1033
+ text: z.ZodString;
1034
+ }, z.core.$strip>, z.ZodObject<{
1035
+ id: z.ZodString;
1036
+ expertKey: z.ZodString;
1037
+ runId: z.ZodString;
1038
+ previousActivityId: z.ZodOptional<z.ZodString>;
1039
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1040
+ expertKey: z.ZodString;
1041
+ runId: z.ZodString;
1042
+ }, z.core.$strip>>;
1043
+ reasoning: z.ZodOptional<z.ZodString>;
1044
+ type: z.ZodLiteral<"error">;
1045
+ error: z.ZodOptional<z.ZodString>;
1046
+ errorName: z.ZodOptional<z.ZodString>;
1047
+ isRetryable: z.ZodOptional<z.ZodBoolean>;
1048
+ }, z.core.$strip>, z.ZodObject<{
1049
+ id: z.ZodString;
1050
+ expertKey: z.ZodString;
1051
+ runId: z.ZodString;
1052
+ previousActivityId: z.ZodOptional<z.ZodString>;
1053
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1054
+ expertKey: z.ZodString;
1055
+ runId: z.ZodString;
1056
+ }, z.core.$strip>>;
1057
+ reasoning: z.ZodOptional<z.ZodString>;
1058
+ type: z.ZodLiteral<"attemptCompletion">;
1059
+ remainingTodos: z.ZodOptional<z.ZodArray<z.ZodObject<{
1060
+ id: z.ZodNumber;
1061
+ title: z.ZodString;
1062
+ completed: z.ZodBoolean;
1063
+ }, z.core.$strip>>>;
1064
+ error: z.ZodOptional<z.ZodString>;
1065
+ }, z.core.$strip>, z.ZodObject<{
1066
+ id: z.ZodString;
1067
+ expertKey: z.ZodString;
1068
+ runId: z.ZodString;
1069
+ previousActivityId: z.ZodOptional<z.ZodString>;
1070
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1071
+ expertKey: z.ZodString;
1072
+ runId: z.ZodString;
1073
+ }, z.core.$strip>>;
1074
+ reasoning: z.ZodOptional<z.ZodString>;
1075
+ type: z.ZodLiteral<"todo">;
1076
+ newTodos: z.ZodOptional<z.ZodArray<z.ZodString>>;
1077
+ completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1078
+ todos: z.ZodArray<z.ZodObject<{
1079
+ id: z.ZodNumber;
1080
+ title: z.ZodString;
1081
+ completed: z.ZodBoolean;
1082
+ }, z.core.$strip>>;
1083
+ error: z.ZodOptional<z.ZodString>;
1084
+ }, z.core.$strip>, z.ZodObject<{
1085
+ id: z.ZodString;
1086
+ expertKey: z.ZodString;
1087
+ runId: z.ZodString;
1088
+ previousActivityId: z.ZodOptional<z.ZodString>;
1089
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1090
+ expertKey: z.ZodString;
1091
+ runId: z.ZodString;
1092
+ }, z.core.$strip>>;
1093
+ reasoning: z.ZodOptional<z.ZodString>;
1094
+ type: z.ZodLiteral<"clearTodo">;
1095
+ error: z.ZodOptional<z.ZodString>;
1096
+ }, z.core.$strip>, z.ZodObject<{
1097
+ id: z.ZodString;
1098
+ expertKey: z.ZodString;
1099
+ runId: z.ZodString;
1100
+ previousActivityId: z.ZodOptional<z.ZodString>;
1101
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1102
+ expertKey: z.ZodString;
1103
+ runId: z.ZodString;
1104
+ }, z.core.$strip>>;
1105
+ reasoning: z.ZodOptional<z.ZodString>;
1106
+ type: z.ZodLiteral<"readImageFile">;
1107
+ path: z.ZodString;
1108
+ mimeType: z.ZodOptional<z.ZodString>;
1109
+ size: z.ZodOptional<z.ZodNumber>;
1110
+ error: z.ZodOptional<z.ZodString>;
1111
+ }, z.core.$strip>, z.ZodObject<{
1112
+ id: z.ZodString;
1113
+ expertKey: z.ZodString;
1114
+ runId: z.ZodString;
1115
+ previousActivityId: z.ZodOptional<z.ZodString>;
1116
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1117
+ expertKey: z.ZodString;
1118
+ runId: z.ZodString;
1119
+ }, z.core.$strip>>;
1120
+ reasoning: z.ZodOptional<z.ZodString>;
1121
+ type: z.ZodLiteral<"readPdfFile">;
1122
+ path: z.ZodString;
1123
+ mimeType: z.ZodOptional<z.ZodString>;
1124
+ size: z.ZodOptional<z.ZodNumber>;
1125
+ error: z.ZodOptional<z.ZodString>;
1126
+ }, z.core.$strip>, z.ZodObject<{
1127
+ id: z.ZodString;
1128
+ expertKey: z.ZodString;
1129
+ runId: z.ZodString;
1130
+ previousActivityId: z.ZodOptional<z.ZodString>;
1131
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1132
+ expertKey: z.ZodString;
1133
+ runId: z.ZodString;
1134
+ }, z.core.$strip>>;
1135
+ reasoning: z.ZodOptional<z.ZodString>;
1136
+ type: z.ZodLiteral<"readTextFile">;
1137
+ path: z.ZodString;
1138
+ content: z.ZodOptional<z.ZodString>;
1139
+ from: z.ZodOptional<z.ZodNumber>;
1140
+ to: z.ZodOptional<z.ZodNumber>;
1141
+ error: z.ZodOptional<z.ZodString>;
1142
+ }, z.core.$strip>, z.ZodObject<{
1143
+ id: z.ZodString;
1144
+ expertKey: z.ZodString;
1145
+ runId: z.ZodString;
1146
+ previousActivityId: z.ZodOptional<z.ZodString>;
1147
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1148
+ expertKey: z.ZodString;
1149
+ runId: z.ZodString;
1150
+ }, z.core.$strip>>;
1151
+ reasoning: z.ZodOptional<z.ZodString>;
1152
+ type: z.ZodLiteral<"editTextFile">;
1153
+ path: z.ZodString;
1154
+ newText: z.ZodString;
1155
+ oldText: z.ZodString;
1156
+ error: z.ZodOptional<z.ZodString>;
1157
+ }, z.core.$strip>, z.ZodObject<{
1158
+ id: z.ZodString;
1159
+ expertKey: z.ZodString;
1160
+ runId: z.ZodString;
1161
+ previousActivityId: z.ZodOptional<z.ZodString>;
1162
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1163
+ expertKey: z.ZodString;
1164
+ runId: z.ZodString;
1165
+ }, z.core.$strip>>;
1166
+ reasoning: z.ZodOptional<z.ZodString>;
1167
+ type: z.ZodLiteral<"writeTextFile">;
1168
+ path: z.ZodString;
1169
+ text: z.ZodString;
1170
+ error: z.ZodOptional<z.ZodString>;
1171
+ }, z.core.$strip>, z.ZodObject<{
1172
+ id: z.ZodString;
1173
+ expertKey: z.ZodString;
1174
+ runId: z.ZodString;
1175
+ previousActivityId: z.ZodOptional<z.ZodString>;
1176
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1177
+ expertKey: z.ZodString;
1178
+ runId: z.ZodString;
1179
+ }, z.core.$strip>>;
1180
+ reasoning: z.ZodOptional<z.ZodString>;
1181
+ type: z.ZodLiteral<"exec">;
1182
+ command: z.ZodString;
1183
+ args: z.ZodArray<z.ZodString>;
1184
+ cwd: z.ZodString;
1185
+ output: z.ZodOptional<z.ZodString>;
1186
+ error: z.ZodOptional<z.ZodString>;
1187
+ stdout: z.ZodOptional<z.ZodString>;
1188
+ stderr: z.ZodOptional<z.ZodString>;
1189
+ }, z.core.$strip>, z.ZodObject<{
1190
+ id: z.ZodString;
1191
+ expertKey: z.ZodString;
1192
+ runId: z.ZodString;
1193
+ previousActivityId: z.ZodOptional<z.ZodString>;
1194
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1195
+ expertKey: z.ZodString;
1196
+ runId: z.ZodString;
1197
+ }, z.core.$strip>>;
1198
+ reasoning: z.ZodOptional<z.ZodString>;
1199
+ type: z.ZodLiteral<"delegate">;
1200
+ delegateExpertKey: z.ZodString;
1201
+ query: z.ZodString;
1202
+ }, z.core.$strip>, z.ZodObject<{
1203
+ id: z.ZodString;
1204
+ expertKey: z.ZodString;
1205
+ runId: z.ZodString;
1206
+ previousActivityId: z.ZodOptional<z.ZodString>;
1207
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1208
+ expertKey: z.ZodString;
1209
+ runId: z.ZodString;
1210
+ }, z.core.$strip>>;
1211
+ reasoning: z.ZodOptional<z.ZodString>;
1212
+ type: z.ZodLiteral<"delegationComplete">;
1213
+ count: z.ZodNumber;
1214
+ }, z.core.$strip>, z.ZodObject<{
1215
+ id: z.ZodString;
1216
+ expertKey: z.ZodString;
1217
+ runId: z.ZodString;
1218
+ previousActivityId: z.ZodOptional<z.ZodString>;
1219
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1220
+ expertKey: z.ZodString;
1221
+ runId: z.ZodString;
1222
+ }, z.core.$strip>>;
1223
+ reasoning: z.ZodOptional<z.ZodString>;
1224
+ type: z.ZodLiteral<"interactiveTool">;
1225
+ skillName: z.ZodString;
1226
+ toolName: z.ZodString;
1227
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1228
+ }, z.core.$strip>, z.ZodObject<{
1229
+ id: z.ZodString;
1230
+ expertKey: z.ZodString;
1231
+ runId: z.ZodString;
1232
+ previousActivityId: z.ZodOptional<z.ZodString>;
1233
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1234
+ expertKey: z.ZodString;
1235
+ runId: z.ZodString;
1236
+ }, z.core.$strip>>;
1237
+ reasoning: z.ZodOptional<z.ZodString>;
1238
+ type: z.ZodLiteral<"generalTool">;
1239
+ skillName: z.ZodString;
1240
+ toolName: z.ZodString;
1241
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1242
+ result: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1243
+ id: z.ZodString;
1244
+ type: z.ZodLiteral<"textPart">;
1245
+ text: z.ZodString;
1246
+ }, z.core.$strip>, z.ZodObject<{
1247
+ id: z.ZodString;
1248
+ type: z.ZodLiteral<"imageUrlPart">;
1249
+ url: z.ZodURL;
1250
+ mimeType: z.ZodString;
1251
+ }, z.core.$strip>, z.ZodObject<{
1252
+ id: z.ZodString;
1253
+ type: z.ZodLiteral<"imageInlinePart">;
1254
+ encodedData: z.ZodString;
1255
+ mimeType: z.ZodString;
1256
+ }, z.core.$strip>, z.ZodObject<{
1257
+ id: z.ZodString;
1258
+ type: z.ZodLiteral<"imageBinaryPart">;
1259
+ data: z.ZodString;
1260
+ mimeType: z.ZodString;
1261
+ }, z.core.$strip>, z.ZodObject<{
1262
+ id: z.ZodString;
1263
+ type: z.ZodLiteral<"fileUrlPart">;
1264
+ url: z.ZodString;
1265
+ mimeType: z.ZodString;
1266
+ }, z.core.$strip>, z.ZodObject<{
1267
+ id: z.ZodString;
1268
+ type: z.ZodLiteral<"fileInlinePart">;
1269
+ encodedData: z.ZodString;
1270
+ mimeType: z.ZodString;
1271
+ }, z.core.$strip>, z.ZodObject<{
1272
+ id: z.ZodString;
1273
+ type: z.ZodLiteral<"fileBinaryPart">;
1274
+ data: z.ZodString;
1275
+ mimeType: z.ZodString;
1276
+ }, z.core.$strip>, z.ZodObject<{
1277
+ id: z.ZodString;
1278
+ type: z.ZodLiteral<"toolCallPart">;
1279
+ toolCallId: z.ZodString;
1280
+ toolName: z.ZodString;
1281
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1282
+ }, z.core.$strip>, z.ZodObject<{
1283
+ id: z.ZodString;
1284
+ type: z.ZodLiteral<"toolResultPart">;
1285
+ toolCallId: z.ZodString;
1286
+ toolName: z.ZodString;
1287
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1288
+ id: z.ZodString;
1289
+ type: z.ZodLiteral<"textPart">;
1290
+ text: z.ZodString;
1291
+ }, z.core.$strip>, z.ZodObject<{
1292
+ id: z.ZodString;
1293
+ type: z.ZodLiteral<"imageInlinePart">;
1294
+ encodedData: z.ZodString;
1295
+ mimeType: z.ZodString;
1296
+ }, z.core.$strip>, z.ZodObject<{
1297
+ id: z.ZodString;
1298
+ type: z.ZodLiteral<"fileInlinePart">;
1299
+ encodedData: z.ZodString;
1300
+ mimeType: z.ZodString;
1301
+ }, z.core.$strip>]>>;
1302
+ isError: z.ZodOptional<z.ZodBoolean>;
1303
+ }, z.core.$strip>, z.ZodObject<{
1304
+ id: z.ZodString;
1305
+ type: z.ZodLiteral<"thinkingPart">;
1306
+ thinking: z.ZodString;
1307
+ signature: z.ZodOptional<z.ZodString>;
1308
+ }, z.core.$strip>], "type">>>;
1309
+ error: z.ZodOptional<z.ZodString>;
1310
+ }, z.core.$strip>, z.ZodObject<{
1311
+ id: z.ZodString;
1312
+ expertKey: z.ZodString;
1313
+ runId: z.ZodString;
1314
+ previousActivityId: z.ZodOptional<z.ZodString>;
1315
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1316
+ expertKey: z.ZodString;
1317
+ runId: z.ZodString;
1318
+ }, z.core.$strip>>;
1319
+ reasoning: z.ZodOptional<z.ZodString>;
1320
+ type: z.ZodLiteral<"addSkill">;
1321
+ name: z.ZodString;
1322
+ skillType: z.ZodString;
1323
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1324
+ error: z.ZodOptional<z.ZodString>;
1325
+ }, z.core.$strip>, z.ZodObject<{
1326
+ id: z.ZodString;
1327
+ expertKey: z.ZodString;
1328
+ runId: z.ZodString;
1329
+ previousActivityId: z.ZodOptional<z.ZodString>;
1330
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1331
+ expertKey: z.ZodString;
1332
+ runId: z.ZodString;
1333
+ }, z.core.$strip>>;
1334
+ reasoning: z.ZodOptional<z.ZodString>;
1335
+ type: z.ZodLiteral<"removeSkill">;
1336
+ skillName: z.ZodString;
1337
+ error: z.ZodOptional<z.ZodString>;
1338
+ }, z.core.$strip>, z.ZodObject<{
1339
+ id: z.ZodString;
1340
+ expertKey: z.ZodString;
1341
+ runId: z.ZodString;
1342
+ previousActivityId: z.ZodOptional<z.ZodString>;
1343
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1344
+ expertKey: z.ZodString;
1345
+ runId: z.ZodString;
1346
+ }, z.core.$strip>>;
1347
+ reasoning: z.ZodOptional<z.ZodString>;
1348
+ type: z.ZodLiteral<"addDelegate">;
1349
+ targetExpertKey: z.ZodString;
1350
+ delegateToolName: z.ZodOptional<z.ZodString>;
1351
+ error: z.ZodOptional<z.ZodString>;
1352
+ }, z.core.$strip>, z.ZodObject<{
1353
+ id: z.ZodString;
1354
+ expertKey: z.ZodString;
1355
+ runId: z.ZodString;
1356
+ previousActivityId: z.ZodOptional<z.ZodString>;
1357
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1358
+ expertKey: z.ZodString;
1359
+ runId: z.ZodString;
1360
+ }, z.core.$strip>>;
1361
+ reasoning: z.ZodOptional<z.ZodString>;
1362
+ type: z.ZodLiteral<"removeDelegate">;
1363
+ expertName: z.ZodString;
1364
+ error: z.ZodOptional<z.ZodString>;
1365
+ }, z.core.$strip>, z.ZodObject<{
1366
+ id: z.ZodString;
1367
+ expertKey: z.ZodString;
1368
+ runId: z.ZodString;
1369
+ previousActivityId: z.ZodOptional<z.ZodString>;
1370
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1371
+ expertKey: z.ZodString;
1372
+ runId: z.ZodString;
1373
+ }, z.core.$strip>>;
1374
+ reasoning: z.ZodOptional<z.ZodString>;
1375
+ type: z.ZodLiteral<"createExpert">;
1376
+ targetKey: z.ZodString;
1377
+ description: z.ZodOptional<z.ZodString>;
1378
+ resultExpertKey: z.ZodOptional<z.ZodString>;
1379
+ error: z.ZodOptional<z.ZodString>;
1380
+ }, z.core.$strip>], "type">>;
1381
+ }, z.core.$strip>;
1382
+ /** Activity or group of parallel activities */
1383
+ export type ActivityOrGroup = Activity | ParallelActivitiesGroup;
1384
+ export declare const activityOrGroupSchema: z.ZodUnion<readonly [z.ZodDiscriminatedUnion<[z.ZodObject<{
1385
+ id: z.ZodString;
1386
+ expertKey: z.ZodString;
1387
+ runId: z.ZodString;
1388
+ previousActivityId: z.ZodOptional<z.ZodString>;
1389
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1390
+ expertKey: z.ZodString;
1391
+ runId: z.ZodString;
1392
+ }, z.core.$strip>>;
1393
+ reasoning: z.ZodOptional<z.ZodString>;
1394
+ type: z.ZodLiteral<"query">;
1395
+ text: z.ZodString;
1396
+ }, z.core.$strip>, z.ZodObject<{
1397
+ id: z.ZodString;
1398
+ expertKey: z.ZodString;
1399
+ runId: z.ZodString;
1400
+ previousActivityId: z.ZodOptional<z.ZodString>;
1401
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1402
+ expertKey: z.ZodString;
1403
+ runId: z.ZodString;
1404
+ }, z.core.$strip>>;
1405
+ reasoning: z.ZodOptional<z.ZodString>;
1406
+ type: z.ZodLiteral<"retry">;
1407
+ error: z.ZodString;
1408
+ message: z.ZodString;
1409
+ }, z.core.$strip>, z.ZodObject<{
1410
+ id: z.ZodString;
1411
+ expertKey: z.ZodString;
1412
+ runId: z.ZodString;
1413
+ previousActivityId: z.ZodOptional<z.ZodString>;
1414
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1415
+ expertKey: z.ZodString;
1416
+ runId: z.ZodString;
1417
+ }, z.core.$strip>>;
1418
+ reasoning: z.ZodOptional<z.ZodString>;
1419
+ type: z.ZodLiteral<"complete">;
1420
+ text: z.ZodString;
1421
+ }, z.core.$strip>, z.ZodObject<{
1422
+ id: z.ZodString;
1423
+ expertKey: z.ZodString;
1424
+ runId: z.ZodString;
1425
+ previousActivityId: z.ZodOptional<z.ZodString>;
1426
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1427
+ expertKey: z.ZodString;
1428
+ runId: z.ZodString;
1429
+ }, z.core.$strip>>;
1430
+ reasoning: z.ZodOptional<z.ZodString>;
1431
+ type: z.ZodLiteral<"error">;
1432
+ error: z.ZodOptional<z.ZodString>;
1433
+ errorName: z.ZodOptional<z.ZodString>;
1434
+ isRetryable: z.ZodOptional<z.ZodBoolean>;
1435
+ }, z.core.$strip>, z.ZodObject<{
1436
+ id: z.ZodString;
1437
+ expertKey: z.ZodString;
1438
+ runId: z.ZodString;
1439
+ previousActivityId: z.ZodOptional<z.ZodString>;
1440
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1441
+ expertKey: z.ZodString;
1442
+ runId: z.ZodString;
1443
+ }, z.core.$strip>>;
1444
+ reasoning: z.ZodOptional<z.ZodString>;
1445
+ type: z.ZodLiteral<"attemptCompletion">;
1446
+ remainingTodos: z.ZodOptional<z.ZodArray<z.ZodObject<{
1447
+ id: z.ZodNumber;
1448
+ title: z.ZodString;
1449
+ completed: z.ZodBoolean;
1450
+ }, z.core.$strip>>>;
1451
+ error: z.ZodOptional<z.ZodString>;
1452
+ }, z.core.$strip>, z.ZodObject<{
1453
+ id: z.ZodString;
1454
+ expertKey: z.ZodString;
1455
+ runId: z.ZodString;
1456
+ previousActivityId: z.ZodOptional<z.ZodString>;
1457
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1458
+ expertKey: z.ZodString;
1459
+ runId: z.ZodString;
1460
+ }, z.core.$strip>>;
1461
+ reasoning: z.ZodOptional<z.ZodString>;
1462
+ type: z.ZodLiteral<"todo">;
1463
+ newTodos: z.ZodOptional<z.ZodArray<z.ZodString>>;
1464
+ completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1465
+ todos: z.ZodArray<z.ZodObject<{
1466
+ id: z.ZodNumber;
1467
+ title: z.ZodString;
1468
+ completed: z.ZodBoolean;
1469
+ }, z.core.$strip>>;
1470
+ error: z.ZodOptional<z.ZodString>;
1471
+ }, z.core.$strip>, z.ZodObject<{
1472
+ id: z.ZodString;
1473
+ expertKey: z.ZodString;
1474
+ runId: z.ZodString;
1475
+ previousActivityId: z.ZodOptional<z.ZodString>;
1476
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1477
+ expertKey: z.ZodString;
1478
+ runId: z.ZodString;
1479
+ }, z.core.$strip>>;
1480
+ reasoning: z.ZodOptional<z.ZodString>;
1481
+ type: z.ZodLiteral<"clearTodo">;
1482
+ error: z.ZodOptional<z.ZodString>;
1483
+ }, z.core.$strip>, z.ZodObject<{
1484
+ id: z.ZodString;
1485
+ expertKey: z.ZodString;
1486
+ runId: z.ZodString;
1487
+ previousActivityId: z.ZodOptional<z.ZodString>;
1488
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1489
+ expertKey: z.ZodString;
1490
+ runId: z.ZodString;
1491
+ }, z.core.$strip>>;
1492
+ reasoning: z.ZodOptional<z.ZodString>;
1493
+ type: z.ZodLiteral<"readImageFile">;
1494
+ path: z.ZodString;
1495
+ mimeType: z.ZodOptional<z.ZodString>;
1496
+ size: z.ZodOptional<z.ZodNumber>;
1497
+ error: z.ZodOptional<z.ZodString>;
1498
+ }, z.core.$strip>, z.ZodObject<{
1499
+ id: z.ZodString;
1500
+ expertKey: z.ZodString;
1501
+ runId: z.ZodString;
1502
+ previousActivityId: z.ZodOptional<z.ZodString>;
1503
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1504
+ expertKey: z.ZodString;
1505
+ runId: z.ZodString;
1506
+ }, z.core.$strip>>;
1507
+ reasoning: z.ZodOptional<z.ZodString>;
1508
+ type: z.ZodLiteral<"readPdfFile">;
1509
+ path: z.ZodString;
1510
+ mimeType: z.ZodOptional<z.ZodString>;
1511
+ size: z.ZodOptional<z.ZodNumber>;
1512
+ error: z.ZodOptional<z.ZodString>;
1513
+ }, z.core.$strip>, z.ZodObject<{
1514
+ id: z.ZodString;
1515
+ expertKey: z.ZodString;
1516
+ runId: z.ZodString;
1517
+ previousActivityId: z.ZodOptional<z.ZodString>;
1518
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1519
+ expertKey: z.ZodString;
1520
+ runId: z.ZodString;
1521
+ }, z.core.$strip>>;
1522
+ reasoning: z.ZodOptional<z.ZodString>;
1523
+ type: z.ZodLiteral<"readTextFile">;
1524
+ path: z.ZodString;
1525
+ content: z.ZodOptional<z.ZodString>;
1526
+ from: z.ZodOptional<z.ZodNumber>;
1527
+ to: z.ZodOptional<z.ZodNumber>;
1528
+ error: z.ZodOptional<z.ZodString>;
1529
+ }, z.core.$strip>, z.ZodObject<{
1530
+ id: z.ZodString;
1531
+ expertKey: z.ZodString;
1532
+ runId: z.ZodString;
1533
+ previousActivityId: z.ZodOptional<z.ZodString>;
1534
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1535
+ expertKey: z.ZodString;
1536
+ runId: z.ZodString;
1537
+ }, z.core.$strip>>;
1538
+ reasoning: z.ZodOptional<z.ZodString>;
1539
+ type: z.ZodLiteral<"editTextFile">;
1540
+ path: z.ZodString;
1541
+ newText: z.ZodString;
1542
+ oldText: z.ZodString;
1543
+ error: z.ZodOptional<z.ZodString>;
1544
+ }, z.core.$strip>, z.ZodObject<{
1545
+ id: z.ZodString;
1546
+ expertKey: z.ZodString;
1547
+ runId: z.ZodString;
1548
+ previousActivityId: z.ZodOptional<z.ZodString>;
1549
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1550
+ expertKey: z.ZodString;
1551
+ runId: z.ZodString;
1552
+ }, z.core.$strip>>;
1553
+ reasoning: z.ZodOptional<z.ZodString>;
1554
+ type: z.ZodLiteral<"writeTextFile">;
1555
+ path: z.ZodString;
1556
+ text: z.ZodString;
1557
+ error: z.ZodOptional<z.ZodString>;
1558
+ }, z.core.$strip>, z.ZodObject<{
1559
+ id: z.ZodString;
1560
+ expertKey: z.ZodString;
1561
+ runId: z.ZodString;
1562
+ previousActivityId: z.ZodOptional<z.ZodString>;
1563
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1564
+ expertKey: z.ZodString;
1565
+ runId: z.ZodString;
1566
+ }, z.core.$strip>>;
1567
+ reasoning: z.ZodOptional<z.ZodString>;
1568
+ type: z.ZodLiteral<"exec">;
1569
+ command: z.ZodString;
1570
+ args: z.ZodArray<z.ZodString>;
1571
+ cwd: z.ZodString;
1572
+ output: z.ZodOptional<z.ZodString>;
1573
+ error: z.ZodOptional<z.ZodString>;
1574
+ stdout: z.ZodOptional<z.ZodString>;
1575
+ stderr: z.ZodOptional<z.ZodString>;
1576
+ }, z.core.$strip>, z.ZodObject<{
1577
+ id: z.ZodString;
1578
+ expertKey: z.ZodString;
1579
+ runId: z.ZodString;
1580
+ previousActivityId: z.ZodOptional<z.ZodString>;
1581
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1582
+ expertKey: z.ZodString;
1583
+ runId: z.ZodString;
1584
+ }, z.core.$strip>>;
1585
+ reasoning: z.ZodOptional<z.ZodString>;
1586
+ type: z.ZodLiteral<"delegate">;
1587
+ delegateExpertKey: z.ZodString;
1588
+ query: z.ZodString;
1589
+ }, z.core.$strip>, z.ZodObject<{
1590
+ id: z.ZodString;
1591
+ expertKey: z.ZodString;
1592
+ runId: z.ZodString;
1593
+ previousActivityId: z.ZodOptional<z.ZodString>;
1594
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1595
+ expertKey: z.ZodString;
1596
+ runId: z.ZodString;
1597
+ }, z.core.$strip>>;
1598
+ reasoning: z.ZodOptional<z.ZodString>;
1599
+ type: z.ZodLiteral<"delegationComplete">;
1600
+ count: z.ZodNumber;
1601
+ }, z.core.$strip>, z.ZodObject<{
1602
+ id: z.ZodString;
1603
+ expertKey: z.ZodString;
1604
+ runId: z.ZodString;
1605
+ previousActivityId: z.ZodOptional<z.ZodString>;
1606
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1607
+ expertKey: z.ZodString;
1608
+ runId: z.ZodString;
1609
+ }, z.core.$strip>>;
1610
+ reasoning: z.ZodOptional<z.ZodString>;
1611
+ type: z.ZodLiteral<"interactiveTool">;
1612
+ skillName: z.ZodString;
1613
+ toolName: z.ZodString;
1614
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1615
+ }, z.core.$strip>, z.ZodObject<{
1616
+ id: z.ZodString;
1617
+ expertKey: z.ZodString;
1618
+ runId: z.ZodString;
1619
+ previousActivityId: z.ZodOptional<z.ZodString>;
1620
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1621
+ expertKey: z.ZodString;
1622
+ runId: z.ZodString;
1623
+ }, z.core.$strip>>;
1624
+ reasoning: z.ZodOptional<z.ZodString>;
1625
+ type: z.ZodLiteral<"generalTool">;
1626
+ skillName: z.ZodString;
1627
+ toolName: z.ZodString;
1628
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1629
+ result: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1630
+ id: z.ZodString;
1631
+ type: z.ZodLiteral<"textPart">;
1632
+ text: z.ZodString;
1633
+ }, z.core.$strip>, z.ZodObject<{
1634
+ id: z.ZodString;
1635
+ type: z.ZodLiteral<"imageUrlPart">;
1636
+ url: z.ZodURL;
1637
+ mimeType: z.ZodString;
1638
+ }, z.core.$strip>, z.ZodObject<{
1639
+ id: z.ZodString;
1640
+ type: z.ZodLiteral<"imageInlinePart">;
1641
+ encodedData: z.ZodString;
1642
+ mimeType: z.ZodString;
1643
+ }, z.core.$strip>, z.ZodObject<{
1644
+ id: z.ZodString;
1645
+ type: z.ZodLiteral<"imageBinaryPart">;
1646
+ data: z.ZodString;
1647
+ mimeType: z.ZodString;
1648
+ }, z.core.$strip>, z.ZodObject<{
1649
+ id: z.ZodString;
1650
+ type: z.ZodLiteral<"fileUrlPart">;
1651
+ url: z.ZodString;
1652
+ mimeType: z.ZodString;
1653
+ }, z.core.$strip>, z.ZodObject<{
1654
+ id: z.ZodString;
1655
+ type: z.ZodLiteral<"fileInlinePart">;
1656
+ encodedData: z.ZodString;
1657
+ mimeType: z.ZodString;
1658
+ }, z.core.$strip>, z.ZodObject<{
1659
+ id: z.ZodString;
1660
+ type: z.ZodLiteral<"fileBinaryPart">;
1661
+ data: z.ZodString;
1662
+ mimeType: z.ZodString;
1663
+ }, z.core.$strip>, z.ZodObject<{
1664
+ id: z.ZodString;
1665
+ type: z.ZodLiteral<"toolCallPart">;
1666
+ toolCallId: z.ZodString;
1667
+ toolName: z.ZodString;
1668
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
1669
+ }, z.core.$strip>, z.ZodObject<{
1670
+ id: z.ZodString;
1671
+ type: z.ZodLiteral<"toolResultPart">;
1672
+ toolCallId: z.ZodString;
1673
+ toolName: z.ZodString;
1674
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
1675
+ id: z.ZodString;
1676
+ type: z.ZodLiteral<"textPart">;
1677
+ text: z.ZodString;
1678
+ }, z.core.$strip>, z.ZodObject<{
1679
+ id: z.ZodString;
1680
+ type: z.ZodLiteral<"imageInlinePart">;
1681
+ encodedData: z.ZodString;
1682
+ mimeType: z.ZodString;
1683
+ }, z.core.$strip>, z.ZodObject<{
1684
+ id: z.ZodString;
1685
+ type: z.ZodLiteral<"fileInlinePart">;
1686
+ encodedData: z.ZodString;
1687
+ mimeType: z.ZodString;
1688
+ }, z.core.$strip>]>>;
1689
+ isError: z.ZodOptional<z.ZodBoolean>;
1690
+ }, z.core.$strip>, z.ZodObject<{
1691
+ id: z.ZodString;
1692
+ type: z.ZodLiteral<"thinkingPart">;
1693
+ thinking: z.ZodString;
1694
+ signature: z.ZodOptional<z.ZodString>;
1695
+ }, z.core.$strip>], "type">>>;
1696
+ error: z.ZodOptional<z.ZodString>;
1697
+ }, z.core.$strip>, z.ZodObject<{
1698
+ id: z.ZodString;
1699
+ expertKey: z.ZodString;
1700
+ runId: z.ZodString;
1701
+ previousActivityId: z.ZodOptional<z.ZodString>;
1702
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1703
+ expertKey: z.ZodString;
1704
+ runId: z.ZodString;
1705
+ }, z.core.$strip>>;
1706
+ reasoning: z.ZodOptional<z.ZodString>;
1707
+ type: z.ZodLiteral<"addSkill">;
1708
+ name: z.ZodString;
1709
+ skillType: z.ZodString;
1710
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
1711
+ error: z.ZodOptional<z.ZodString>;
1712
+ }, z.core.$strip>, z.ZodObject<{
1713
+ id: z.ZodString;
1714
+ expertKey: z.ZodString;
1715
+ runId: z.ZodString;
1716
+ previousActivityId: z.ZodOptional<z.ZodString>;
1717
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1718
+ expertKey: z.ZodString;
1719
+ runId: z.ZodString;
1720
+ }, z.core.$strip>>;
1721
+ reasoning: z.ZodOptional<z.ZodString>;
1722
+ type: z.ZodLiteral<"removeSkill">;
1723
+ skillName: z.ZodString;
1724
+ error: z.ZodOptional<z.ZodString>;
1725
+ }, z.core.$strip>, z.ZodObject<{
1726
+ id: z.ZodString;
1727
+ expertKey: z.ZodString;
1728
+ runId: z.ZodString;
1729
+ previousActivityId: z.ZodOptional<z.ZodString>;
1730
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1731
+ expertKey: z.ZodString;
1732
+ runId: z.ZodString;
1733
+ }, z.core.$strip>>;
1734
+ reasoning: z.ZodOptional<z.ZodString>;
1735
+ type: z.ZodLiteral<"addDelegate">;
1736
+ targetExpertKey: z.ZodString;
1737
+ delegateToolName: z.ZodOptional<z.ZodString>;
1738
+ error: z.ZodOptional<z.ZodString>;
1739
+ }, z.core.$strip>, z.ZodObject<{
1740
+ id: z.ZodString;
1741
+ expertKey: z.ZodString;
1742
+ runId: z.ZodString;
1743
+ previousActivityId: z.ZodOptional<z.ZodString>;
1744
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1745
+ expertKey: z.ZodString;
1746
+ runId: z.ZodString;
1747
+ }, z.core.$strip>>;
1748
+ reasoning: z.ZodOptional<z.ZodString>;
1749
+ type: z.ZodLiteral<"removeDelegate">;
1750
+ expertName: z.ZodString;
1751
+ error: z.ZodOptional<z.ZodString>;
1752
+ }, z.core.$strip>, z.ZodObject<{
1753
+ id: z.ZodString;
1754
+ expertKey: z.ZodString;
1755
+ runId: z.ZodString;
1756
+ previousActivityId: z.ZodOptional<z.ZodString>;
1757
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1758
+ expertKey: z.ZodString;
1759
+ runId: z.ZodString;
1760
+ }, z.core.$strip>>;
1761
+ reasoning: z.ZodOptional<z.ZodString>;
1762
+ type: z.ZodLiteral<"createExpert">;
1763
+ targetKey: z.ZodString;
1764
+ description: z.ZodOptional<z.ZodString>;
1765
+ resultExpertKey: z.ZodOptional<z.ZodString>;
1766
+ error: z.ZodOptional<z.ZodString>;
1767
+ }, z.core.$strip>], "type">, z.ZodObject<{
1768
+ type: z.ZodLiteral<"parallelGroup">;
1769
+ id: z.ZodString;
1770
+ expertKey: z.ZodString;
1771
+ runId: z.ZodString;
1772
+ reasoning: z.ZodOptional<z.ZodString>;
1773
+ activities: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
1774
+ id: z.ZodString;
1775
+ expertKey: z.ZodString;
1776
+ runId: z.ZodString;
1777
+ previousActivityId: z.ZodOptional<z.ZodString>;
1778
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1779
+ expertKey: z.ZodString;
1780
+ runId: z.ZodString;
1781
+ }, z.core.$strip>>;
1782
+ reasoning: z.ZodOptional<z.ZodString>;
1783
+ type: z.ZodLiteral<"query">;
1784
+ text: z.ZodString;
1785
+ }, z.core.$strip>, z.ZodObject<{
1786
+ id: z.ZodString;
1787
+ expertKey: z.ZodString;
1788
+ runId: z.ZodString;
1789
+ previousActivityId: z.ZodOptional<z.ZodString>;
1790
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1791
+ expertKey: z.ZodString;
1792
+ runId: z.ZodString;
1793
+ }, z.core.$strip>>;
1794
+ reasoning: z.ZodOptional<z.ZodString>;
1795
+ type: z.ZodLiteral<"retry">;
1796
+ error: z.ZodString;
1797
+ message: z.ZodString;
1798
+ }, z.core.$strip>, z.ZodObject<{
1799
+ id: z.ZodString;
1800
+ expertKey: z.ZodString;
1801
+ runId: z.ZodString;
1802
+ previousActivityId: z.ZodOptional<z.ZodString>;
1803
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1804
+ expertKey: z.ZodString;
1805
+ runId: z.ZodString;
1806
+ }, z.core.$strip>>;
1807
+ reasoning: z.ZodOptional<z.ZodString>;
1808
+ type: z.ZodLiteral<"complete">;
1809
+ text: z.ZodString;
1810
+ }, z.core.$strip>, z.ZodObject<{
1811
+ id: z.ZodString;
1812
+ expertKey: z.ZodString;
1813
+ runId: z.ZodString;
1814
+ previousActivityId: z.ZodOptional<z.ZodString>;
1815
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1816
+ expertKey: z.ZodString;
1817
+ runId: z.ZodString;
1818
+ }, z.core.$strip>>;
1819
+ reasoning: z.ZodOptional<z.ZodString>;
1820
+ type: z.ZodLiteral<"error">;
1821
+ error: z.ZodOptional<z.ZodString>;
1822
+ errorName: z.ZodOptional<z.ZodString>;
1823
+ isRetryable: z.ZodOptional<z.ZodBoolean>;
1824
+ }, z.core.$strip>, z.ZodObject<{
1825
+ id: z.ZodString;
1826
+ expertKey: z.ZodString;
1827
+ runId: z.ZodString;
1828
+ previousActivityId: z.ZodOptional<z.ZodString>;
1829
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1830
+ expertKey: z.ZodString;
1831
+ runId: z.ZodString;
1832
+ }, z.core.$strip>>;
1833
+ reasoning: z.ZodOptional<z.ZodString>;
1834
+ type: z.ZodLiteral<"attemptCompletion">;
1835
+ remainingTodos: z.ZodOptional<z.ZodArray<z.ZodObject<{
1836
+ id: z.ZodNumber;
1837
+ title: z.ZodString;
1838
+ completed: z.ZodBoolean;
1839
+ }, z.core.$strip>>>;
1840
+ error: z.ZodOptional<z.ZodString>;
1841
+ }, z.core.$strip>, z.ZodObject<{
1842
+ id: z.ZodString;
1843
+ expertKey: z.ZodString;
1844
+ runId: z.ZodString;
1845
+ previousActivityId: z.ZodOptional<z.ZodString>;
1846
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1847
+ expertKey: z.ZodString;
1848
+ runId: z.ZodString;
1849
+ }, z.core.$strip>>;
1850
+ reasoning: z.ZodOptional<z.ZodString>;
1851
+ type: z.ZodLiteral<"todo">;
1852
+ newTodos: z.ZodOptional<z.ZodArray<z.ZodString>>;
1853
+ completedTodos: z.ZodOptional<z.ZodArray<z.ZodNumber>>;
1854
+ todos: z.ZodArray<z.ZodObject<{
1855
+ id: z.ZodNumber;
1856
+ title: z.ZodString;
1857
+ completed: z.ZodBoolean;
1858
+ }, z.core.$strip>>;
1859
+ error: z.ZodOptional<z.ZodString>;
1860
+ }, z.core.$strip>, z.ZodObject<{
1861
+ id: z.ZodString;
1862
+ expertKey: z.ZodString;
1863
+ runId: z.ZodString;
1864
+ previousActivityId: z.ZodOptional<z.ZodString>;
1865
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1866
+ expertKey: z.ZodString;
1867
+ runId: z.ZodString;
1868
+ }, z.core.$strip>>;
1869
+ reasoning: z.ZodOptional<z.ZodString>;
1870
+ type: z.ZodLiteral<"clearTodo">;
1871
+ error: z.ZodOptional<z.ZodString>;
1872
+ }, z.core.$strip>, z.ZodObject<{
1873
+ id: z.ZodString;
1874
+ expertKey: z.ZodString;
1875
+ runId: z.ZodString;
1876
+ previousActivityId: z.ZodOptional<z.ZodString>;
1877
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1878
+ expertKey: z.ZodString;
1879
+ runId: z.ZodString;
1880
+ }, z.core.$strip>>;
1881
+ reasoning: z.ZodOptional<z.ZodString>;
1882
+ type: z.ZodLiteral<"readImageFile">;
1883
+ path: z.ZodString;
1884
+ mimeType: z.ZodOptional<z.ZodString>;
1885
+ size: z.ZodOptional<z.ZodNumber>;
1886
+ error: z.ZodOptional<z.ZodString>;
1887
+ }, z.core.$strip>, z.ZodObject<{
1888
+ id: z.ZodString;
1889
+ expertKey: z.ZodString;
1890
+ runId: z.ZodString;
1891
+ previousActivityId: z.ZodOptional<z.ZodString>;
1892
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1893
+ expertKey: z.ZodString;
1894
+ runId: z.ZodString;
1895
+ }, z.core.$strip>>;
1896
+ reasoning: z.ZodOptional<z.ZodString>;
1897
+ type: z.ZodLiteral<"readPdfFile">;
1898
+ path: z.ZodString;
1899
+ mimeType: z.ZodOptional<z.ZodString>;
1900
+ size: z.ZodOptional<z.ZodNumber>;
1901
+ error: z.ZodOptional<z.ZodString>;
1902
+ }, z.core.$strip>, z.ZodObject<{
1903
+ id: z.ZodString;
1904
+ expertKey: z.ZodString;
1905
+ runId: z.ZodString;
1906
+ previousActivityId: z.ZodOptional<z.ZodString>;
1907
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1908
+ expertKey: z.ZodString;
1909
+ runId: z.ZodString;
1910
+ }, z.core.$strip>>;
1911
+ reasoning: z.ZodOptional<z.ZodString>;
1912
+ type: z.ZodLiteral<"readTextFile">;
1913
+ path: z.ZodString;
1914
+ content: z.ZodOptional<z.ZodString>;
1915
+ from: z.ZodOptional<z.ZodNumber>;
1916
+ to: z.ZodOptional<z.ZodNumber>;
1917
+ error: z.ZodOptional<z.ZodString>;
1918
+ }, z.core.$strip>, z.ZodObject<{
1919
+ id: z.ZodString;
1920
+ expertKey: z.ZodString;
1921
+ runId: z.ZodString;
1922
+ previousActivityId: z.ZodOptional<z.ZodString>;
1923
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1924
+ expertKey: z.ZodString;
1925
+ runId: z.ZodString;
1926
+ }, z.core.$strip>>;
1927
+ reasoning: z.ZodOptional<z.ZodString>;
1928
+ type: z.ZodLiteral<"editTextFile">;
1929
+ path: z.ZodString;
1930
+ newText: z.ZodString;
1931
+ oldText: z.ZodString;
1932
+ error: z.ZodOptional<z.ZodString>;
1933
+ }, z.core.$strip>, z.ZodObject<{
1934
+ id: z.ZodString;
1935
+ expertKey: z.ZodString;
1936
+ runId: z.ZodString;
1937
+ previousActivityId: z.ZodOptional<z.ZodString>;
1938
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1939
+ expertKey: z.ZodString;
1940
+ runId: z.ZodString;
1941
+ }, z.core.$strip>>;
1942
+ reasoning: z.ZodOptional<z.ZodString>;
1943
+ type: z.ZodLiteral<"writeTextFile">;
1944
+ path: z.ZodString;
1945
+ text: z.ZodString;
1946
+ error: z.ZodOptional<z.ZodString>;
1947
+ }, z.core.$strip>, z.ZodObject<{
1948
+ id: z.ZodString;
1949
+ expertKey: z.ZodString;
1950
+ runId: z.ZodString;
1951
+ previousActivityId: z.ZodOptional<z.ZodString>;
1952
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1953
+ expertKey: z.ZodString;
1954
+ runId: z.ZodString;
1955
+ }, z.core.$strip>>;
1956
+ reasoning: z.ZodOptional<z.ZodString>;
1957
+ type: z.ZodLiteral<"exec">;
1958
+ command: z.ZodString;
1959
+ args: z.ZodArray<z.ZodString>;
1960
+ cwd: z.ZodString;
1961
+ output: z.ZodOptional<z.ZodString>;
1962
+ error: z.ZodOptional<z.ZodString>;
1963
+ stdout: z.ZodOptional<z.ZodString>;
1964
+ stderr: z.ZodOptional<z.ZodString>;
1965
+ }, z.core.$strip>, z.ZodObject<{
1966
+ id: z.ZodString;
1967
+ expertKey: z.ZodString;
1968
+ runId: z.ZodString;
1969
+ previousActivityId: z.ZodOptional<z.ZodString>;
1970
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1971
+ expertKey: z.ZodString;
1972
+ runId: z.ZodString;
1973
+ }, z.core.$strip>>;
1974
+ reasoning: z.ZodOptional<z.ZodString>;
1975
+ type: z.ZodLiteral<"delegate">;
1976
+ delegateExpertKey: z.ZodString;
1977
+ query: z.ZodString;
1978
+ }, z.core.$strip>, z.ZodObject<{
1979
+ id: z.ZodString;
1980
+ expertKey: z.ZodString;
1981
+ runId: z.ZodString;
1982
+ previousActivityId: z.ZodOptional<z.ZodString>;
1983
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1984
+ expertKey: z.ZodString;
1985
+ runId: z.ZodString;
1986
+ }, z.core.$strip>>;
1987
+ reasoning: z.ZodOptional<z.ZodString>;
1988
+ type: z.ZodLiteral<"delegationComplete">;
1989
+ count: z.ZodNumber;
1990
+ }, z.core.$strip>, z.ZodObject<{
1991
+ id: z.ZodString;
1992
+ expertKey: z.ZodString;
1993
+ runId: z.ZodString;
1994
+ previousActivityId: z.ZodOptional<z.ZodString>;
1995
+ delegatedBy: z.ZodOptional<z.ZodObject<{
1996
+ expertKey: z.ZodString;
1997
+ runId: z.ZodString;
1998
+ }, z.core.$strip>>;
1999
+ reasoning: z.ZodOptional<z.ZodString>;
2000
+ type: z.ZodLiteral<"interactiveTool">;
2001
+ skillName: z.ZodString;
2002
+ toolName: z.ZodString;
2003
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2004
+ }, z.core.$strip>, z.ZodObject<{
2005
+ id: z.ZodString;
2006
+ expertKey: z.ZodString;
2007
+ runId: z.ZodString;
2008
+ previousActivityId: z.ZodOptional<z.ZodString>;
2009
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2010
+ expertKey: z.ZodString;
2011
+ runId: z.ZodString;
2012
+ }, z.core.$strip>>;
2013
+ reasoning: z.ZodOptional<z.ZodString>;
2014
+ type: z.ZodLiteral<"generalTool">;
2015
+ skillName: z.ZodString;
2016
+ toolName: z.ZodString;
2017
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2018
+ result: z.ZodOptional<z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
2019
+ id: z.ZodString;
2020
+ type: z.ZodLiteral<"textPart">;
2021
+ text: z.ZodString;
2022
+ }, z.core.$strip>, z.ZodObject<{
2023
+ id: z.ZodString;
2024
+ type: z.ZodLiteral<"imageUrlPart">;
2025
+ url: z.ZodURL;
2026
+ mimeType: z.ZodString;
2027
+ }, z.core.$strip>, z.ZodObject<{
2028
+ id: z.ZodString;
2029
+ type: z.ZodLiteral<"imageInlinePart">;
2030
+ encodedData: z.ZodString;
2031
+ mimeType: z.ZodString;
2032
+ }, z.core.$strip>, z.ZodObject<{
2033
+ id: z.ZodString;
2034
+ type: z.ZodLiteral<"imageBinaryPart">;
2035
+ data: z.ZodString;
2036
+ mimeType: z.ZodString;
2037
+ }, z.core.$strip>, z.ZodObject<{
2038
+ id: z.ZodString;
2039
+ type: z.ZodLiteral<"fileUrlPart">;
2040
+ url: z.ZodString;
2041
+ mimeType: z.ZodString;
2042
+ }, z.core.$strip>, z.ZodObject<{
2043
+ id: z.ZodString;
2044
+ type: z.ZodLiteral<"fileInlinePart">;
2045
+ encodedData: z.ZodString;
2046
+ mimeType: z.ZodString;
2047
+ }, z.core.$strip>, z.ZodObject<{
2048
+ id: z.ZodString;
2049
+ type: z.ZodLiteral<"fileBinaryPart">;
2050
+ data: z.ZodString;
2051
+ mimeType: z.ZodString;
2052
+ }, z.core.$strip>, z.ZodObject<{
2053
+ id: z.ZodString;
2054
+ type: z.ZodLiteral<"toolCallPart">;
2055
+ toolCallId: z.ZodString;
2056
+ toolName: z.ZodString;
2057
+ args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
2058
+ }, z.core.$strip>, z.ZodObject<{
2059
+ id: z.ZodString;
2060
+ type: z.ZodLiteral<"toolResultPart">;
2061
+ toolCallId: z.ZodString;
2062
+ toolName: z.ZodString;
2063
+ contents: z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
2064
+ id: z.ZodString;
2065
+ type: z.ZodLiteral<"textPart">;
2066
+ text: z.ZodString;
2067
+ }, z.core.$strip>, z.ZodObject<{
2068
+ id: z.ZodString;
2069
+ type: z.ZodLiteral<"imageInlinePart">;
2070
+ encodedData: z.ZodString;
2071
+ mimeType: z.ZodString;
2072
+ }, z.core.$strip>, z.ZodObject<{
2073
+ id: z.ZodString;
2074
+ type: z.ZodLiteral<"fileInlinePart">;
2075
+ encodedData: z.ZodString;
2076
+ mimeType: z.ZodString;
2077
+ }, z.core.$strip>]>>;
2078
+ isError: z.ZodOptional<z.ZodBoolean>;
2079
+ }, z.core.$strip>, z.ZodObject<{
2080
+ id: z.ZodString;
2081
+ type: z.ZodLiteral<"thinkingPart">;
2082
+ thinking: z.ZodString;
2083
+ signature: z.ZodOptional<z.ZodString>;
2084
+ }, z.core.$strip>], "type">>>;
2085
+ error: z.ZodOptional<z.ZodString>;
2086
+ }, z.core.$strip>, z.ZodObject<{
2087
+ id: z.ZodString;
2088
+ expertKey: z.ZodString;
2089
+ runId: z.ZodString;
2090
+ previousActivityId: z.ZodOptional<z.ZodString>;
2091
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2092
+ expertKey: z.ZodString;
2093
+ runId: z.ZodString;
2094
+ }, z.core.$strip>>;
2095
+ reasoning: z.ZodOptional<z.ZodString>;
2096
+ type: z.ZodLiteral<"addSkill">;
2097
+ name: z.ZodString;
2098
+ skillType: z.ZodString;
2099
+ tools: z.ZodOptional<z.ZodArray<z.ZodString>>;
2100
+ error: z.ZodOptional<z.ZodString>;
2101
+ }, z.core.$strip>, z.ZodObject<{
2102
+ id: z.ZodString;
2103
+ expertKey: z.ZodString;
2104
+ runId: z.ZodString;
2105
+ previousActivityId: z.ZodOptional<z.ZodString>;
2106
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2107
+ expertKey: z.ZodString;
2108
+ runId: z.ZodString;
2109
+ }, z.core.$strip>>;
2110
+ reasoning: z.ZodOptional<z.ZodString>;
2111
+ type: z.ZodLiteral<"removeSkill">;
2112
+ skillName: z.ZodString;
2113
+ error: z.ZodOptional<z.ZodString>;
2114
+ }, z.core.$strip>, z.ZodObject<{
2115
+ id: z.ZodString;
2116
+ expertKey: z.ZodString;
2117
+ runId: z.ZodString;
2118
+ previousActivityId: z.ZodOptional<z.ZodString>;
2119
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2120
+ expertKey: z.ZodString;
2121
+ runId: z.ZodString;
2122
+ }, z.core.$strip>>;
2123
+ reasoning: z.ZodOptional<z.ZodString>;
2124
+ type: z.ZodLiteral<"addDelegate">;
2125
+ targetExpertKey: z.ZodString;
2126
+ delegateToolName: z.ZodOptional<z.ZodString>;
2127
+ error: z.ZodOptional<z.ZodString>;
2128
+ }, z.core.$strip>, z.ZodObject<{
2129
+ id: z.ZodString;
2130
+ expertKey: z.ZodString;
2131
+ runId: z.ZodString;
2132
+ previousActivityId: z.ZodOptional<z.ZodString>;
2133
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2134
+ expertKey: z.ZodString;
2135
+ runId: z.ZodString;
2136
+ }, z.core.$strip>>;
2137
+ reasoning: z.ZodOptional<z.ZodString>;
2138
+ type: z.ZodLiteral<"removeDelegate">;
2139
+ expertName: z.ZodString;
2140
+ error: z.ZodOptional<z.ZodString>;
2141
+ }, z.core.$strip>, z.ZodObject<{
2142
+ id: z.ZodString;
2143
+ expertKey: z.ZodString;
2144
+ runId: z.ZodString;
2145
+ previousActivityId: z.ZodOptional<z.ZodString>;
2146
+ delegatedBy: z.ZodOptional<z.ZodObject<{
2147
+ expertKey: z.ZodString;
2148
+ runId: z.ZodString;
2149
+ }, z.core.$strip>>;
2150
+ reasoning: z.ZodOptional<z.ZodString>;
2151
+ type: z.ZodLiteral<"createExpert">;
2152
+ targetKey: z.ZodString;
2153
+ description: z.ZodOptional<z.ZodString>;
2154
+ resultExpertKey: z.ZodOptional<z.ZodString>;
2155
+ error: z.ZodOptional<z.ZodString>;
2156
+ }, z.core.$strip>], "type">>;
2157
+ }, z.core.$strip>]>;
2158
+ export {};
2159
+ //# sourceMappingURL=activity.d.ts.map