@mastra/agent-builder 1.1.33-alpha.2 → 1.2.0-alpha.3

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.
@@ -1,3 +1,216 @@
1
+ /**
2
+ * Builds a new planning-and-approval sub-workflow on every call. See `createAgentBuilderWorkflows` for when to use
3
+ * a factory instead of the shared `planningAndApprovalWorkflow`.
4
+ */
5
+ export declare function createPlanningAndApprovalWorkflow(): import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, (import("@mastra/core/workflows").Step<"planning-iteration", unknown, {
6
+ action: "create" | "edit";
7
+ workflowName?: string | undefined;
8
+ description?: string | undefined;
9
+ requirements?: string | undefined;
10
+ discoveredWorkflows: {
11
+ name: string;
12
+ file: string;
13
+ description?: string | undefined;
14
+ inputSchema?: any;
15
+ outputSchema?: any;
16
+ steps?: string[] | undefined;
17
+ }[];
18
+ projectStructure: {
19
+ success: boolean;
20
+ structure: {
21
+ hasWorkflowsDir: boolean;
22
+ hasAgentsDir: boolean;
23
+ hasToolsDir: boolean;
24
+ hasMastraIndex: boolean;
25
+ existingWorkflows: string[];
26
+ existingAgents: string[];
27
+ existingTools: string[];
28
+ };
29
+ dependencies: Record<string, string>;
30
+ message: string;
31
+ error?: string | undefined;
32
+ };
33
+ research: {
34
+ success: boolean;
35
+ documentation: {
36
+ workflowPatterns: string[];
37
+ stepExamples: string[];
38
+ bestPractices: string[];
39
+ };
40
+ webResources: {
41
+ title: string;
42
+ url: string;
43
+ snippet: string;
44
+ relevance: number;
45
+ }[];
46
+ message: string;
47
+ error?: string | undefined;
48
+ };
49
+ userAnswers?: Record<string, string> | undefined;
50
+ }, {
51
+ success: boolean;
52
+ tasks: {
53
+ id: string;
54
+ content: string;
55
+ status: "blocked" | "completed" | "in_progress" | "pending";
56
+ priority: "high" | "low" | "medium";
57
+ dependencies?: string[] | undefined;
58
+ notes: string;
59
+ }[];
60
+ questions: {
61
+ id: string;
62
+ question: string;
63
+ type: "boolean" | "choice" | "text";
64
+ options?: string[] | undefined;
65
+ context?: string | undefined;
66
+ }[];
67
+ reasoning: string;
68
+ planComplete: boolean;
69
+ message: string;
70
+ error?: string | undefined;
71
+ allPreviousQuestions?: any[] | undefined;
72
+ allPreviousAnswers?: Record<string, string> | undefined;
73
+ }, {
74
+ answers: Record<string, string>;
75
+ }, {
76
+ questions: {
77
+ id: string;
78
+ question: string;
79
+ type: "boolean" | "choice" | "text";
80
+ options?: string[] | undefined;
81
+ context?: string | undefined;
82
+ }[];
83
+ message: string;
84
+ currentPlan: {
85
+ tasks: {
86
+ id: string;
87
+ content: string;
88
+ status: "blocked" | "completed" | "in_progress" | "pending";
89
+ priority: "high" | "low" | "medium";
90
+ dependencies?: string[] | undefined;
91
+ notes: string;
92
+ }[];
93
+ reasoning: string;
94
+ };
95
+ }, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"task-approval", unknown, {
96
+ success: boolean;
97
+ tasks: {
98
+ id: string;
99
+ content: string;
100
+ status: "blocked" | "completed" | "in_progress" | "pending";
101
+ priority: "high" | "low" | "medium";
102
+ dependencies?: string[] | undefined;
103
+ notes: string;
104
+ }[];
105
+ questions: {
106
+ id: string;
107
+ question: string;
108
+ type: "boolean" | "choice" | "text";
109
+ options?: string[] | undefined;
110
+ context?: string | undefined;
111
+ }[];
112
+ reasoning: string;
113
+ planComplete: boolean;
114
+ message: string;
115
+ error?: string | undefined;
116
+ allPreviousQuestions?: any[] | undefined;
117
+ allPreviousAnswers?: Record<string, string> | undefined;
118
+ }, {
119
+ approved: boolean;
120
+ tasks: {
121
+ id: string;
122
+ content: string;
123
+ status: "blocked" | "completed" | "in_progress" | "pending";
124
+ priority: "high" | "low" | "medium";
125
+ dependencies?: string[] | undefined;
126
+ notes: string;
127
+ }[];
128
+ message: string;
129
+ userFeedback?: string | undefined;
130
+ }, {
131
+ approved: boolean;
132
+ modifications?: string | undefined;
133
+ }, {
134
+ taskList: {
135
+ id: string;
136
+ content: string;
137
+ status: "blocked" | "completed" | "in_progress" | "pending";
138
+ priority: "high" | "low" | "medium";
139
+ dependencies?: string[] | undefined;
140
+ notes: string;
141
+ }[];
142
+ summary: string;
143
+ message: string;
144
+ }, import("@mastra/core/workflows").DefaultEngineType, unknown>)[], "planning-and-approval", unknown, {
145
+ action: "create" | "edit";
146
+ workflowName?: string | undefined;
147
+ description?: string | undefined;
148
+ requirements?: string | undefined;
149
+ discoveredWorkflows: {
150
+ name: string;
151
+ file: string;
152
+ description?: string | undefined;
153
+ inputSchema?: any;
154
+ outputSchema?: any;
155
+ steps?: string[] | undefined;
156
+ }[];
157
+ projectStructure: {
158
+ success: boolean;
159
+ structure: {
160
+ hasWorkflowsDir: boolean;
161
+ hasAgentsDir: boolean;
162
+ hasToolsDir: boolean;
163
+ hasMastraIndex: boolean;
164
+ existingWorkflows: string[];
165
+ existingAgents: string[];
166
+ existingTools: string[];
167
+ };
168
+ dependencies: Record<string, string>;
169
+ message: string;
170
+ error?: string | undefined;
171
+ };
172
+ research: {
173
+ success: boolean;
174
+ documentation: {
175
+ workflowPatterns: string[];
176
+ stepExamples: string[];
177
+ bestPractices: string[];
178
+ };
179
+ webResources: {
180
+ title: string;
181
+ url: string;
182
+ snippet: string;
183
+ relevance: number;
184
+ }[];
185
+ message: string;
186
+ error?: string | undefined;
187
+ };
188
+ userAnswers?: Record<string, string> | undefined;
189
+ }, {
190
+ approved: boolean;
191
+ tasks: {
192
+ id: string;
193
+ content: string;
194
+ status: "blocked" | "completed" | "in_progress" | "pending";
195
+ priority: "high" | "low" | "medium";
196
+ dependencies?: string[] | undefined;
197
+ notes: string;
198
+ }[];
199
+ message: string;
200
+ userFeedback?: string | undefined;
201
+ }, {
202
+ approved: boolean;
203
+ tasks: {
204
+ id: string;
205
+ content: string;
206
+ status: "blocked" | "completed" | "in_progress" | "pending";
207
+ priority: "high" | "low" | "medium";
208
+ dependencies?: string[] | undefined;
209
+ notes: string;
210
+ }[];
211
+ message: string;
212
+ userFeedback?: string | undefined;
213
+ }, unknown>;
1
214
  export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, (import("@mastra/core/workflows").Step<"planning-iteration", unknown, {
2
215
  action: "create" | "edit";
3
216
  workflowName?: string | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"task-planning.d.ts","sourceRoot":"","sources":["../../../src/workflows/task-planning/task-planning.ts"],"names":[],"mappings":"AAgQA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0B7B,CAAC"}
1
+ {"version":3,"file":"task-planning.d.ts","sourceRoot":"","sources":["../../../src/workflows/task-planning/task-planning.ts"],"names":[],"mappings":"AA+PA;;;GAGG;AACH,wBAAgB,iCAAiC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA8BhD;AAED,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAsC,CAAC"}
@@ -1,3 +1,262 @@
1
+ /**
2
+ * Builds a new template-merge workflow on every call. See `createAgentBuilderWorkflows` for when to use a factory
3
+ * instead of the shared `agentBuilderTemplateWorkflow`.
4
+ */
5
+ export declare function createAgentBuilderTemplateWorkflow(): import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, (import("@mastra/core/workflows").Step<"analyze-package", unknown, {
6
+ templateDir: string;
7
+ commitSha: string;
8
+ slug: string;
9
+ success?: boolean | undefined;
10
+ error?: string | undefined;
11
+ targetPath?: string | undefined;
12
+ }, {
13
+ name?: string | undefined;
14
+ version?: string | undefined;
15
+ description?: string | undefined;
16
+ dependencies?: Record<string, string> | undefined;
17
+ devDependencies?: Record<string, string> | undefined;
18
+ peerDependencies?: Record<string, string> | undefined;
19
+ scripts?: Record<string, string> | undefined;
20
+ success?: boolean | undefined;
21
+ error?: string | undefined;
22
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"clone-template", unknown, {
23
+ repo: string;
24
+ ref?: string | undefined;
25
+ slug?: string | undefined;
26
+ targetPath?: string | undefined;
27
+ variables?: Record<string, string> | undefined;
28
+ }, {
29
+ templateDir: string;
30
+ commitSha: string;
31
+ slug: string;
32
+ success?: boolean | undefined;
33
+ error?: string | undefined;
34
+ targetPath?: string | undefined;
35
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"discover-units", unknown, {
36
+ templateDir: string;
37
+ commitSha: string;
38
+ slug: string;
39
+ success?: boolean | undefined;
40
+ error?: string | undefined;
41
+ targetPath?: string | undefined;
42
+ }, {
43
+ units: {
44
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
45
+ id: string;
46
+ file: string;
47
+ }[];
48
+ success?: boolean | undefined;
49
+ error?: string | undefined;
50
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"install", unknown, {
51
+ targetPath?: string | undefined;
52
+ }, {
53
+ success: boolean;
54
+ error?: string | undefined;
55
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"intelligent-merge", unknown, {
56
+ conflicts: {
57
+ unit: {
58
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
59
+ id: string;
60
+ };
61
+ issue: string;
62
+ sourceFile: string;
63
+ targetFile: string;
64
+ }[];
65
+ copiedFiles: {
66
+ source: string;
67
+ destination: string;
68
+ unit: {
69
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
70
+ id: string;
71
+ };
72
+ }[];
73
+ templateDir: string;
74
+ commitSha: string;
75
+ slug: string;
76
+ targetPath?: string | undefined;
77
+ branchName?: string | undefined;
78
+ }, {
79
+ success: boolean;
80
+ applied: boolean;
81
+ message: string;
82
+ conflictsResolved: {
83
+ unit: {
84
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
85
+ id: string;
86
+ };
87
+ issue: string;
88
+ resolution: string;
89
+ }[];
90
+ error?: string | undefined;
91
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"order-units", unknown, {
92
+ units: {
93
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
94
+ id: string;
95
+ file: string;
96
+ }[];
97
+ success?: boolean | undefined;
98
+ error?: string | undefined;
99
+ }, {
100
+ orderedUnits: {
101
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
102
+ id: string;
103
+ file: string;
104
+ }[];
105
+ success?: boolean | undefined;
106
+ error?: string | undefined;
107
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"package-merge", unknown, {
108
+ commitSha: string;
109
+ slug: string;
110
+ targetPath?: string | undefined;
111
+ packageInfo: {
112
+ name?: string | undefined;
113
+ version?: string | undefined;
114
+ description?: string | undefined;
115
+ dependencies?: Record<string, string> | undefined;
116
+ devDependencies?: Record<string, string> | undefined;
117
+ peerDependencies?: Record<string, string> | undefined;
118
+ scripts?: Record<string, string> | undefined;
119
+ success?: boolean | undefined;
120
+ error?: string | undefined;
121
+ };
122
+ }, {
123
+ success: boolean;
124
+ applied: boolean;
125
+ message: string;
126
+ error?: string | undefined;
127
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"programmatic-file-copy", unknown, {
128
+ orderedUnits: {
129
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
130
+ id: string;
131
+ file: string;
132
+ }[];
133
+ templateDir: string;
134
+ commitSha: string;
135
+ slug: string;
136
+ targetPath?: string | undefined;
137
+ variables?: Record<string, string> | undefined;
138
+ }, {
139
+ success: boolean;
140
+ copiedFiles: {
141
+ source: string;
142
+ destination: string;
143
+ unit: {
144
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
145
+ id: string;
146
+ };
147
+ }[];
148
+ conflicts: {
149
+ unit: {
150
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
151
+ id: string;
152
+ };
153
+ issue: string;
154
+ sourceFile: string;
155
+ targetFile: string;
156
+ }[];
157
+ message: string;
158
+ error?: string | undefined;
159
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown> | import("@mastra/core/workflows").Step<"validation-and-fix", unknown, {
160
+ commitSha: string;
161
+ slug: string;
162
+ targetPath?: string | undefined;
163
+ templateDir: string;
164
+ orderedUnits: {
165
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
166
+ id: string;
167
+ file: string;
168
+ }[];
169
+ copiedFiles: {
170
+ source: string;
171
+ destination: string;
172
+ unit: {
173
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
174
+ id: string;
175
+ };
176
+ }[];
177
+ conflictsResolved?: {
178
+ unit: {
179
+ kind: "agent" | "integration" | "mcp-server" | "network" | "other" | "tool" | "workflow";
180
+ id: string;
181
+ };
182
+ issue: string;
183
+ resolution: string;
184
+ }[] | undefined;
185
+ maxIterations: number;
186
+ }, {
187
+ success: boolean;
188
+ applied: boolean;
189
+ message: string;
190
+ validationResults: {
191
+ valid: boolean;
192
+ errorsFixed: number;
193
+ remainingErrors: number;
194
+ errors?: any[] | undefined;
195
+ };
196
+ error?: string | undefined;
197
+ }, unknown, unknown, import("@mastra/core/workflows").DefaultEngineType, unknown>)[], "agent-builder-template", unknown, {
198
+ repo: string;
199
+ ref?: string | undefined;
200
+ slug?: string | undefined;
201
+ targetPath?: string | undefined;
202
+ variables?: Record<string, string> | undefined;
203
+ }, {
204
+ success: boolean;
205
+ applied: boolean;
206
+ branchName?: string | undefined;
207
+ message: string;
208
+ validationResults?: {
209
+ valid: boolean;
210
+ errorsFixed: number;
211
+ remainingErrors: number;
212
+ errors?: any[] | undefined;
213
+ } | undefined;
214
+ error?: string | undefined;
215
+ errors?: string[] | undefined;
216
+ stepResults?: {
217
+ cloneSuccess?: boolean | undefined;
218
+ analyzeSuccess?: boolean | undefined;
219
+ discoverSuccess?: boolean | undefined;
220
+ orderSuccess?: boolean | undefined;
221
+ prepareBranchSuccess?: boolean | undefined;
222
+ packageMergeSuccess?: boolean | undefined;
223
+ installSuccess?: boolean | undefined;
224
+ copySuccess?: boolean | undefined;
225
+ mergeSuccess?: boolean | undefined;
226
+ validationSuccess?: boolean | undefined;
227
+ filesCopied: number;
228
+ conflictsSkipped: number;
229
+ conflictsResolved: number;
230
+ } | undefined;
231
+ }, {
232
+ success: boolean;
233
+ applied: boolean;
234
+ branchName?: string | undefined;
235
+ message: string;
236
+ validationResults?: {
237
+ valid: boolean;
238
+ errorsFixed: number;
239
+ remainingErrors: number;
240
+ errors?: any[] | undefined;
241
+ } | undefined;
242
+ error?: string | undefined;
243
+ errors?: string[] | undefined;
244
+ stepResults?: {
245
+ cloneSuccess?: boolean | undefined;
246
+ analyzeSuccess?: boolean | undefined;
247
+ discoverSuccess?: boolean | undefined;
248
+ orderSuccess?: boolean | undefined;
249
+ prepareBranchSuccess?: boolean | undefined;
250
+ packageMergeSuccess?: boolean | undefined;
251
+ installSuccess?: boolean | undefined;
252
+ copySuccess?: boolean | undefined;
253
+ mergeSuccess?: boolean | undefined;
254
+ validationSuccess?: boolean | undefined;
255
+ filesCopied: number;
256
+ conflictsSkipped: number;
257
+ conflictsResolved: number;
258
+ } | undefined;
259
+ }, unknown>;
1
260
  export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core/workflows").DefaultEngineType, (import("@mastra/core/workflows").Step<"analyze-package", unknown, {
2
261
  templateDir: string;
3
262
  commitSha: string;
@@ -1 +1 @@
1
- {"version":3,"file":"template-builder.d.ts","sourceRoot":"","sources":["../../../src/workflows/template-builder/template-builder.ts"],"names":[],"mappings":"AA+iDA,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WA0N9B,CAAC;AAGZ,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAU1E"}
1
+ {"version":3,"file":"template-builder.d.ts","sourceRoot":"","sources":["../../../src/workflows/template-builder/template-builder.ts"],"names":[],"mappings":"AA8iDA;;;GAGG;AACH,wBAAgB,kCAAkC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;YA4NjD;AAED,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAAuC,CAAC;AAGjF,wBAAsB,mBAAmB,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,CAAC,EAAE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;uFAU1E"}