@mastra/agent-builder 0.0.1-alpha.1 → 0.0.1-alpha.2

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