@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 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/workflows/workflow-builder/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;EAMrC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;EAOnC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAcvC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBvC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAUnC,CAAC;AAEH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAKrC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;EAOpC,CAAC;AAEH,eAAO,MAAM,yBAAyB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAWpC,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;EAGxC,CAAC;AAEH,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgBtC,CAAC;AAEH,eAAO,MAAM,iCAAiC,GAAI,YAAY,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiBhE,CAAC"}
@@ -0,0 +1,309 @@
1
+ import { z } from 'zod';
2
+ export declare const restrictedTaskManager: import("@mastra/core/tools").Tool<z.ZodObject<{
3
+ action: z.ZodEnum<["list", "update", "complete"]>;
4
+ tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
5
+ id: z.ZodString;
6
+ content: z.ZodOptional<z.ZodString>;
7
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
8
+ priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
9
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
10
+ notes: z.ZodOptional<z.ZodString>;
11
+ }, "strip", z.ZodTypeAny, {
12
+ status: "pending" | "in_progress" | "completed" | "blocked";
13
+ id: string;
14
+ dependencies?: string[] | undefined;
15
+ content?: string | undefined;
16
+ priority?: "high" | "medium" | "low" | undefined;
17
+ notes?: string | undefined;
18
+ }, {
19
+ status: "pending" | "in_progress" | "completed" | "blocked";
20
+ id: string;
21
+ dependencies?: string[] | undefined;
22
+ content?: string | undefined;
23
+ priority?: "high" | "medium" | "low" | undefined;
24
+ notes?: string | undefined;
25
+ }>, "many">>;
26
+ taskId: z.ZodOptional<z.ZodString>;
27
+ }, "strip", z.ZodTypeAny, {
28
+ action: "update" | "list" | "complete";
29
+ tasks?: {
30
+ status: "pending" | "in_progress" | "completed" | "blocked";
31
+ id: string;
32
+ dependencies?: string[] | undefined;
33
+ content?: string | undefined;
34
+ priority?: "high" | "medium" | "low" | undefined;
35
+ notes?: string | undefined;
36
+ }[] | undefined;
37
+ taskId?: string | undefined;
38
+ }, {
39
+ action: "update" | "list" | "complete";
40
+ tasks?: {
41
+ status: "pending" | "in_progress" | "completed" | "blocked";
42
+ id: string;
43
+ dependencies?: string[] | undefined;
44
+ content?: string | undefined;
45
+ priority?: "high" | "medium" | "low" | undefined;
46
+ notes?: string | undefined;
47
+ }[] | undefined;
48
+ taskId?: string | undefined;
49
+ }>, z.ZodObject<{
50
+ success: z.ZodBoolean;
51
+ tasks: z.ZodArray<z.ZodObject<{
52
+ id: z.ZodString;
53
+ content: z.ZodString;
54
+ status: z.ZodString;
55
+ priority: z.ZodString;
56
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
57
+ notes: z.ZodOptional<z.ZodString>;
58
+ createdAt: z.ZodString;
59
+ updatedAt: z.ZodString;
60
+ }, "strip", z.ZodTypeAny, {
61
+ status: string;
62
+ id: string;
63
+ content: string;
64
+ priority: string;
65
+ createdAt: string;
66
+ updatedAt: string;
67
+ dependencies?: string[] | undefined;
68
+ notes?: string | undefined;
69
+ }, {
70
+ status: string;
71
+ id: string;
72
+ content: string;
73
+ priority: string;
74
+ createdAt: string;
75
+ updatedAt: string;
76
+ dependencies?: string[] | undefined;
77
+ notes?: string | undefined;
78
+ }>, "many">;
79
+ message: z.ZodString;
80
+ }, "strip", z.ZodTypeAny, {
81
+ message: string;
82
+ success: boolean;
83
+ tasks: {
84
+ status: string;
85
+ id: string;
86
+ content: string;
87
+ priority: string;
88
+ createdAt: string;
89
+ updatedAt: string;
90
+ dependencies?: string[] | undefined;
91
+ notes?: string | undefined;
92
+ }[];
93
+ }, {
94
+ message: string;
95
+ success: boolean;
96
+ tasks: {
97
+ status: string;
98
+ id: string;
99
+ content: string;
100
+ priority: string;
101
+ createdAt: string;
102
+ updatedAt: string;
103
+ dependencies?: string[] | undefined;
104
+ notes?: string | undefined;
105
+ }[];
106
+ }>, import("@mastra/core").ToolExecutionContext<z.ZodObject<{
107
+ action: z.ZodEnum<["list", "update", "complete"]>;
108
+ tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
109
+ id: z.ZodString;
110
+ content: z.ZodOptional<z.ZodString>;
111
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
112
+ priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
113
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
114
+ notes: z.ZodOptional<z.ZodString>;
115
+ }, "strip", z.ZodTypeAny, {
116
+ status: "pending" | "in_progress" | "completed" | "blocked";
117
+ id: string;
118
+ dependencies?: string[] | undefined;
119
+ content?: string | undefined;
120
+ priority?: "high" | "medium" | "low" | undefined;
121
+ notes?: string | undefined;
122
+ }, {
123
+ status: "pending" | "in_progress" | "completed" | "blocked";
124
+ id: string;
125
+ dependencies?: string[] | undefined;
126
+ content?: string | undefined;
127
+ priority?: "high" | "medium" | "low" | undefined;
128
+ notes?: string | undefined;
129
+ }>, "many">>;
130
+ taskId: z.ZodOptional<z.ZodString>;
131
+ }, "strip", z.ZodTypeAny, {
132
+ action: "update" | "list" | "complete";
133
+ tasks?: {
134
+ status: "pending" | "in_progress" | "completed" | "blocked";
135
+ id: string;
136
+ dependencies?: string[] | undefined;
137
+ content?: string | undefined;
138
+ priority?: "high" | "medium" | "low" | undefined;
139
+ notes?: string | undefined;
140
+ }[] | undefined;
141
+ taskId?: string | undefined;
142
+ }, {
143
+ action: "update" | "list" | "complete";
144
+ tasks?: {
145
+ status: "pending" | "in_progress" | "completed" | "blocked";
146
+ id: string;
147
+ dependencies?: string[] | undefined;
148
+ content?: string | undefined;
149
+ priority?: "high" | "medium" | "low" | undefined;
150
+ notes?: string | undefined;
151
+ }[] | undefined;
152
+ taskId?: string | undefined;
153
+ }>>> & {
154
+ inputSchema: z.ZodObject<{
155
+ action: z.ZodEnum<["list", "update", "complete"]>;
156
+ tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
157
+ id: z.ZodString;
158
+ content: z.ZodOptional<z.ZodString>;
159
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
160
+ priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
161
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
162
+ notes: z.ZodOptional<z.ZodString>;
163
+ }, "strip", z.ZodTypeAny, {
164
+ status: "pending" | "in_progress" | "completed" | "blocked";
165
+ id: string;
166
+ dependencies?: string[] | undefined;
167
+ content?: string | undefined;
168
+ priority?: "high" | "medium" | "low" | undefined;
169
+ notes?: string | undefined;
170
+ }, {
171
+ status: "pending" | "in_progress" | "completed" | "blocked";
172
+ id: string;
173
+ dependencies?: string[] | undefined;
174
+ content?: string | undefined;
175
+ priority?: "high" | "medium" | "low" | undefined;
176
+ notes?: string | undefined;
177
+ }>, "many">>;
178
+ taskId: z.ZodOptional<z.ZodString>;
179
+ }, "strip", z.ZodTypeAny, {
180
+ action: "update" | "list" | "complete";
181
+ tasks?: {
182
+ status: "pending" | "in_progress" | "completed" | "blocked";
183
+ id: string;
184
+ dependencies?: string[] | undefined;
185
+ content?: string | undefined;
186
+ priority?: "high" | "medium" | "low" | undefined;
187
+ notes?: string | undefined;
188
+ }[] | undefined;
189
+ taskId?: string | undefined;
190
+ }, {
191
+ action: "update" | "list" | "complete";
192
+ tasks?: {
193
+ status: "pending" | "in_progress" | "completed" | "blocked";
194
+ id: string;
195
+ dependencies?: string[] | undefined;
196
+ content?: string | undefined;
197
+ priority?: "high" | "medium" | "low" | undefined;
198
+ notes?: string | undefined;
199
+ }[] | undefined;
200
+ taskId?: string | undefined;
201
+ }>;
202
+ outputSchema: z.ZodObject<{
203
+ success: z.ZodBoolean;
204
+ tasks: z.ZodArray<z.ZodObject<{
205
+ id: z.ZodString;
206
+ content: z.ZodString;
207
+ status: z.ZodString;
208
+ priority: z.ZodString;
209
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
210
+ notes: z.ZodOptional<z.ZodString>;
211
+ createdAt: z.ZodString;
212
+ updatedAt: z.ZodString;
213
+ }, "strip", z.ZodTypeAny, {
214
+ status: string;
215
+ id: string;
216
+ content: string;
217
+ priority: string;
218
+ createdAt: string;
219
+ updatedAt: string;
220
+ dependencies?: string[] | undefined;
221
+ notes?: string | undefined;
222
+ }, {
223
+ status: string;
224
+ id: string;
225
+ content: string;
226
+ priority: string;
227
+ createdAt: string;
228
+ updatedAt: string;
229
+ dependencies?: string[] | undefined;
230
+ notes?: string | undefined;
231
+ }>, "many">;
232
+ message: z.ZodString;
233
+ }, "strip", z.ZodTypeAny, {
234
+ message: string;
235
+ success: boolean;
236
+ tasks: {
237
+ status: string;
238
+ id: string;
239
+ content: string;
240
+ priority: string;
241
+ createdAt: string;
242
+ updatedAt: string;
243
+ dependencies?: string[] | undefined;
244
+ notes?: string | undefined;
245
+ }[];
246
+ }, {
247
+ message: string;
248
+ success: boolean;
249
+ tasks: {
250
+ status: string;
251
+ id: string;
252
+ content: string;
253
+ priority: string;
254
+ createdAt: string;
255
+ updatedAt: string;
256
+ dependencies?: string[] | undefined;
257
+ notes?: string | undefined;
258
+ }[];
259
+ }>;
260
+ execute: (context: import("@mastra/core").ToolExecutionContext<z.ZodObject<{
261
+ action: z.ZodEnum<["list", "update", "complete"]>;
262
+ tasks: z.ZodOptional<z.ZodArray<z.ZodObject<{
263
+ id: z.ZodString;
264
+ content: z.ZodOptional<z.ZodString>;
265
+ status: z.ZodEnum<["pending", "in_progress", "completed", "blocked"]>;
266
+ priority: z.ZodOptional<z.ZodEnum<["high", "medium", "low"]>>;
267
+ dependencies: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
268
+ notes: z.ZodOptional<z.ZodString>;
269
+ }, "strip", z.ZodTypeAny, {
270
+ status: "pending" | "in_progress" | "completed" | "blocked";
271
+ id: string;
272
+ dependencies?: string[] | undefined;
273
+ content?: string | undefined;
274
+ priority?: "high" | "medium" | "low" | undefined;
275
+ notes?: string | undefined;
276
+ }, {
277
+ status: "pending" | "in_progress" | "completed" | "blocked";
278
+ id: string;
279
+ dependencies?: string[] | undefined;
280
+ content?: string | undefined;
281
+ priority?: "high" | "medium" | "low" | undefined;
282
+ notes?: string | undefined;
283
+ }>, "many">>;
284
+ taskId: z.ZodOptional<z.ZodString>;
285
+ }, "strip", z.ZodTypeAny, {
286
+ action: "update" | "list" | "complete";
287
+ tasks?: {
288
+ status: "pending" | "in_progress" | "completed" | "blocked";
289
+ id: string;
290
+ dependencies?: string[] | undefined;
291
+ content?: string | undefined;
292
+ priority?: "high" | "medium" | "low" | undefined;
293
+ notes?: string | undefined;
294
+ }[] | undefined;
295
+ taskId?: string | undefined;
296
+ }, {
297
+ action: "update" | "list" | "complete";
298
+ tasks?: {
299
+ status: "pending" | "in_progress" | "completed" | "blocked";
300
+ id: string;
301
+ dependencies?: string[] | undefined;
302
+ content?: string | undefined;
303
+ priority?: "high" | "medium" | "low" | undefined;
304
+ notes?: string | undefined;
305
+ }[] | undefined;
306
+ taskId?: string | undefined;
307
+ }>>, options: import("ai").ToolExecutionOptions | import("ai").ToolCallOptions) => Promise<any>;
308
+ };
309
+ //# sourceMappingURL=tools.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../../src/workflows/workflow-builder/tools.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAmDhC,CAAC"}