@mastra/agent-builder 0.0.0-rag-chunk-extract-llm-option-20250926183645 → 0.0.0-remove-unused-model-providers-api-20251030210744

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.
package/dist/types.d.ts CHANGED
@@ -32,8 +32,8 @@ export interface AgentBuilderConfig {
32
32
  * Options for generating agents with AgentBuilder
33
33
  */
34
34
  export interface GenerateAgentOptions {
35
- /** Runtime context for the generation */
36
- runtimeContext?: any;
35
+ /** Request Context for the generation */
36
+ requestContext?: any;
37
37
  /** Output format preference */
38
38
  outputFormat?: 'code' | 'explanation' | 'both';
39
39
  }
package/dist/utils.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { exec as execNodejs, execFile as execFileNodejs } from 'child_process';
2
2
  import type { SpawnOptions } from 'child_process';
3
3
  import type { MastraLanguageModel } from '@mastra/core/agent';
4
- import type { RuntimeContext } from '@mastra/core/runtime-context';
4
+ import type { RequestContext } from '@mastra/core/request-context';
5
5
  import type { UnitKind } from './types.js';
6
6
  export declare const exec: typeof execNodejs.__promisify__;
7
7
  export declare const execFile: typeof execFileNodejs.__promisify__;
@@ -58,14 +58,14 @@ export declare function gitCheckoutBranch(branchName: string, targetPath: string
58
58
  export declare function backupAndReplaceFile(sourceFile: string, targetFile: string): Promise<void>;
59
59
  export declare function renameAndCopyFile(sourceFile: string, targetFile: string): Promise<string>;
60
60
  export declare const isValidMastraLanguageModel: (model: any) => model is MastraLanguageModel;
61
- export declare const resolveTargetPath: (inputData: any, runtimeContext: any) => string;
61
+ export declare const resolveTargetPath: (inputData: any, requestContext: any) => string;
62
62
  export declare const mergeGitignoreFiles: (targetContent: string, templateContent: string, templateSlug: string) => string;
63
63
  export declare const mergeEnvFiles: (targetContent: string, templateVariables: Record<string, string>, templateSlug: string) => string;
64
64
  export declare const detectAISDKVersion: (projectPath: string) => Promise<"v1" | "v2">;
65
65
  export declare const createModelInstance: (provider: string, modelId: string, version?: "v1" | "v2") => Promise<MastraLanguageModel | null>;
66
- export declare const resolveModel: ({ runtimeContext, defaultModel, projectPath, }: {
67
- runtimeContext: RuntimeContext;
68
- defaultModel?: MastraLanguageModel;
66
+ export declare const resolveModel: ({ requestContext, defaultModel, projectPath, }: {
67
+ requestContext: RequestContext;
68
+ defaultModel?: MastraLanguageModel | string;
69
69
  projectPath?: string;
70
70
  }) => Promise<MastraLanguageModel>;
71
71
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,IAAI,UAAU,EAAE,QAAQ,IAAI,cAAc,EAAsB,MAAM,eAAe,CAAC;AACnG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAOlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC9D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAEnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,eAAO,MAAM,IAAI,iCAAwB,CAAC;AAC1C,eAAO,MAAM,QAAQ,qCAA4B,CAAC;AA0DlD,wBAAgB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,GAAG,oBAiBlE;AAGD,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC,CAOvD;AAED,wBAAsB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAQnE;AAGD,wBAAgB,eAAe,CAC7B,OAAO,EAAE,MAAM,EACf,IAAI,EAAE,MAAM,EAAE,EACd,OAAO,EAAE,YAAY,GACpB,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,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GAAG,OAAO,CAAC,MAAM,CAAC,CAiB/F;AAGD,eAAO,MAAM,0BAA0B,GAAI,OAAO,GAAG,KAAG,KAAK,IAAI,mBAEhE,CAAC;AAGF,eAAO,MAAM,iBAAiB,GAAI,WAAW,GAAG,EAAE,gBAAgB,GAAG,KAAG,MA4BvE,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAAI,eAAe,MAAM,EAAE,iBAAiB,MAAM,EAAE,cAAc,MAAM,KAAG,MAyD1G,CAAC;AAGF,eAAO,MAAM,aAAa,GACxB,eAAe,MAAM,EACrB,mBAAmB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACzC,cAAc,MAAM,KACnB,MAkDF,CAAC;AAGF,eAAO,MAAM,kBAAkB,GAAU,aAAa,MAAM,KAAG,OAAO,CAAC,IAAI,GAAG,IAAI,CA2CjF,CAAC;AAGF,eAAO,MAAM,mBAAmB,GAC9B,UAAU,MAAM,EAChB,SAAS,MAAM,EACf,UAAS,IAAI,GAAG,IAAW,KAC1B,OAAO,CAAC,mBAAmB,GAAG,IAAI,CA6CpC,CAAC;AAGF,eAAO,MAAM,YAAY,GAAU,gDAIhC;IACD,cAAc,EAAE,cAAc,CAAC;IAC/B,YAAY,CAAC,EAAE,mBAAmB,GAAG,MAAM,CAAC;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,KAAG,OAAO,CAAC,mBAAmB,CAiC9B,CAAC"}
@@ -15,16 +15,16 @@ export declare const PlanningIterationInputSchema: z.ZodObject<{
15
15
  file: string;
16
16
  name: string;
17
17
  description?: string | undefined;
18
- steps?: string[] | undefined;
19
18
  outputSchema?: any;
20
19
  inputSchema?: any;
20
+ steps?: string[] | undefined;
21
21
  }, {
22
22
  file: string;
23
23
  name: string;
24
24
  description?: string | undefined;
25
- steps?: string[] | undefined;
26
25
  outputSchema?: any;
27
26
  inputSchema?: any;
27
+ steps?: string[] | undefined;
28
28
  }>, "many">;
29
29
  projectStructure: z.ZodObject<{
30
30
  success: z.ZodBoolean;
@@ -156,9 +156,9 @@ export declare const PlanningIterationInputSchema: z.ZodObject<{
156
156
  file: string;
157
157
  name: string;
158
158
  description?: string | undefined;
159
- steps?: string[] | undefined;
160
159
  outputSchema?: any;
161
160
  inputSchema?: any;
161
+ steps?: string[] | undefined;
162
162
  }[];
163
163
  projectStructure: {
164
164
  message: string;
@@ -201,9 +201,9 @@ export declare const PlanningIterationInputSchema: z.ZodObject<{
201
201
  file: string;
202
202
  name: string;
203
203
  description?: string | undefined;
204
- steps?: string[] | undefined;
205
204
  outputSchema?: any;
206
205
  inputSchema?: any;
206
+ steps?: string[] | undefined;
207
207
  }[];
208
208
  projectStructure: {
209
209
  message: string;
@@ -1,4 +1,8 @@
1
- export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core").DefaultEngineType, (import("@mastra/core").Step<"planning-iteration", import("zod").ZodObject<{
1
+ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core").DefaultEngineType, (import("@mastra/core").Step<"planning-iteration", import("zod").ZodObject<any, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
2
+ [x: string]: any;
3
+ }, {
4
+ [x: string]: any;
5
+ }>, import("zod").ZodObject<{
2
6
  action: import("zod").ZodEnum<["create", "edit"]>;
3
7
  workflowName: import("zod").ZodOptional<import("zod").ZodString>;
4
8
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -14,16 +18,16 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
14
18
  file: string;
15
19
  name: string;
16
20
  description?: string | undefined;
17
- steps?: string[] | undefined;
18
21
  outputSchema?: any;
19
22
  inputSchema?: any;
23
+ steps?: string[] | undefined;
20
24
  }, {
21
25
  file: string;
22
26
  name: string;
23
27
  description?: string | undefined;
24
- steps?: string[] | undefined;
25
28
  outputSchema?: any;
26
29
  inputSchema?: any;
30
+ steps?: string[] | undefined;
27
31
  }>, "many">;
28
32
  projectStructure: import("zod").ZodObject<{
29
33
  success: import("zod").ZodBoolean;
@@ -155,9 +159,9 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
155
159
  file: string;
156
160
  name: string;
157
161
  description?: string | undefined;
158
- steps?: string[] | undefined;
159
162
  outputSchema?: any;
160
163
  inputSchema?: any;
164
+ steps?: string[] | undefined;
161
165
  }[];
162
166
  projectStructure: {
163
167
  message: string;
@@ -200,9 +204,9 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
200
204
  file: string;
201
205
  name: string;
202
206
  description?: string | undefined;
203
- steps?: string[] | undefined;
204
207
  outputSchema?: any;
205
208
  inputSchema?: any;
209
+ steps?: string[] | undefined;
206
210
  }[];
207
211
  projectStructure: {
208
212
  message: string;
@@ -446,7 +450,11 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
446
450
  }[];
447
451
  reasoning: string;
448
452
  };
449
- }>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"task-approval", import("zod").ZodObject<{
453
+ }>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"task-approval", import("zod").ZodObject<any, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
454
+ [x: string]: any;
455
+ }, {
456
+ [x: string]: any;
457
+ }>, import("zod").ZodObject<{
450
458
  success: import("zod").ZodBoolean;
451
459
  tasks: import("zod").ZodArray<import("zod").ZodObject<{
452
460
  id: import("zod").ZodString;
@@ -647,7 +655,11 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
647
655
  status?: "pending" | "in_progress" | "completed" | "blocked" | undefined;
648
656
  dependencies?: string[] | undefined;
649
657
  }[];
650
- }>, import("@mastra/core").DefaultEngineType>)[], "planning-and-approval", import("zod").ZodObject<{
658
+ }>, import("@mastra/core").DefaultEngineType>)[], "planning-and-approval", import("zod").ZodObject<any, import("zod").UnknownKeysParam, import("zod").ZodTypeAny, {
659
+ [x: string]: any;
660
+ }, {
661
+ [x: string]: any;
662
+ }>, import("zod").ZodObject<{
651
663
  action: import("zod").ZodEnum<["create", "edit"]>;
652
664
  workflowName: import("zod").ZodOptional<import("zod").ZodString>;
653
665
  description: import("zod").ZodOptional<import("zod").ZodString>;
@@ -663,16 +675,16 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
663
675
  file: string;
664
676
  name: string;
665
677
  description?: string | undefined;
666
- steps?: string[] | undefined;
667
678
  outputSchema?: any;
668
679
  inputSchema?: any;
680
+ steps?: string[] | undefined;
669
681
  }, {
670
682
  file: string;
671
683
  name: string;
672
684
  description?: string | undefined;
673
- steps?: string[] | undefined;
674
685
  outputSchema?: any;
675
686
  inputSchema?: any;
687
+ steps?: string[] | undefined;
676
688
  }>, "many">;
677
689
  projectStructure: import("zod").ZodObject<{
678
690
  success: import("zod").ZodBoolean;
@@ -804,9 +816,9 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
804
816
  file: string;
805
817
  name: string;
806
818
  description?: string | undefined;
807
- steps?: string[] | undefined;
808
819
  outputSchema?: any;
809
820
  inputSchema?: any;
821
+ steps?: string[] | undefined;
810
822
  }[];
811
823
  projectStructure: {
812
824
  message: string;
@@ -849,9 +861,9 @@ export declare const planningAndApprovalWorkflow: import("@mastra/core/workflows
849
861
  file: string;
850
862
  name: string;
851
863
  description?: string | undefined;
852
- steps?: string[] | undefined;
853
864
  outputSchema?: any;
854
865
  inputSchema?: any;
866
+ steps?: string[] | undefined;
855
867
  }[];
856
868
  projectStructure: {
857
869
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"task-planning.d.ts","sourceRoot":"","sources":["../../../src/workflows/task-planning/task-planning.ts"],"names":[],"mappings":"AA0PA,eAAO,MAAM,2BAA2B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0B7B,CAAC"}
@@ -1,5 +1,9 @@
1
1
  import { z } from 'zod';
2
- export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core").DefaultEngineType, (import("@mastra/core").Step<"clone-template", z.ZodObject<{
2
+ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflows").Workflow<import("@mastra/core").DefaultEngineType, (import("@mastra/core").Step<"clone-template", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
3
+ [x: string]: any;
4
+ }, {
5
+ [x: string]: any;
6
+ }>, z.ZodObject<{
3
7
  repo: z.ZodString;
4
8
  ref: z.ZodOptional<z.ZodString>;
5
9
  slug: z.ZodOptional<z.ZodString>;
@@ -38,7 +42,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
38
42
  targetPath?: string | undefined;
39
43
  success?: boolean | undefined;
40
44
  error?: string | undefined;
41
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"analyze-package", z.ZodObject<{
45
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"analyze-package", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
46
+ [x: string]: any;
47
+ }, {
48
+ [x: string]: any;
49
+ }>, z.ZodObject<{
42
50
  templateDir: z.ZodString;
43
51
  commitSha: z.ZodString;
44
52
  slug: z.ZodString;
@@ -89,7 +97,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
89
97
  devDependencies?: Record<string, string> | undefined;
90
98
  peerDependencies?: Record<string, string> | undefined;
91
99
  scripts?: Record<string, string> | undefined;
92
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"discover-units", z.ZodObject<{
100
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"discover-units", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
101
+ [x: string]: any;
102
+ }, {
103
+ [x: string]: any;
104
+ }>, z.ZodObject<{
93
105
  templateDir: z.ZodString;
94
106
  commitSha: z.ZodString;
95
107
  slug: z.ZodString;
@@ -142,7 +154,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
142
154
  }[];
143
155
  success?: boolean | undefined;
144
156
  error?: string | undefined;
145
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"order-units", z.ZodObject<{
157
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"order-units", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
158
+ [x: string]: any;
159
+ }, {
160
+ [x: string]: any;
161
+ }>, z.ZodObject<{
146
162
  units: z.ZodArray<z.ZodObject<{
147
163
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
148
164
  id: z.ZodString;
@@ -206,7 +222,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
206
222
  }[];
207
223
  success?: boolean | undefined;
208
224
  error?: string | undefined;
209
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"package-merge", z.ZodObject<{
225
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"package-merge", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
226
+ [x: string]: any;
227
+ }, {
228
+ [x: string]: any;
229
+ }>, z.ZodObject<{
210
230
  commitSha: z.ZodString;
211
231
  slug: z.ZodString;
212
232
  targetPath: z.ZodOptional<z.ZodString>;
@@ -286,7 +306,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
286
306
  success: boolean;
287
307
  applied: boolean;
288
308
  error?: string | undefined;
289
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"install", z.ZodObject<{
309
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"install", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
310
+ [x: string]: any;
311
+ }, {
312
+ [x: string]: any;
313
+ }>, z.ZodObject<{
290
314
  targetPath: z.ZodString;
291
315
  }, "strip", z.ZodTypeAny, {
292
316
  targetPath: string;
@@ -301,7 +325,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
301
325
  }, {
302
326
  success: boolean;
303
327
  error?: string | undefined;
304
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"programmatic-file-copy", z.ZodObject<{
328
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"programmatic-file-copy", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
329
+ [x: string]: any;
330
+ }, {
331
+ [x: string]: any;
332
+ }>, z.ZodObject<{
305
333
  orderedUnits: z.ZodArray<z.ZodObject<{
306
334
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
307
335
  id: z.ZodString;
@@ -447,7 +475,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
447
475
  targetFile: string;
448
476
  }[];
449
477
  error?: string | undefined;
450
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"intelligent-merge", z.ZodObject<{
478
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"intelligent-merge", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
479
+ [x: string]: any;
480
+ }, {
481
+ [x: string]: any;
482
+ }>, z.ZodObject<{
451
483
  conflicts: z.ZodArray<z.ZodObject<{
452
484
  unit: z.ZodObject<{
453
485
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
@@ -617,7 +649,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
617
649
  resolution: string;
618
650
  }[];
619
651
  error?: string | undefined;
620
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"validation-and-fix", z.ZodObject<{
652
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"validation-and-fix", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
653
+ [x: string]: any;
654
+ }, {
655
+ [x: string]: any;
656
+ }>, z.ZodObject<{
621
657
  commitSha: z.ZodString;
622
658
  slug: z.ZodString;
623
659
  targetPath: z.ZodOptional<z.ZodString>;
@@ -789,7 +825,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
789
825
  errors?: any[] | undefined;
790
826
  };
791
827
  error?: string | undefined;
792
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType>)[], "agent-builder-template", z.ZodObject<{
828
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType>)[], "agent-builder-template", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
829
+ [x: string]: any;
830
+ }, {
831
+ [x: string]: any;
832
+ }>, z.ZodObject<{
793
833
  repo: z.ZodString;
794
834
  ref: z.ZodOptional<z.ZodString>;
795
835
  slug: z.ZodOptional<z.ZodString>;
@@ -1052,7 +1092,11 @@ export declare const agentBuilderTemplateWorkflow: import("@mastra/core/workflow
1052
1092
  validationSuccess?: boolean | undefined;
1053
1093
  } | undefined;
1054
1094
  }>>;
1055
- export declare function mergeTemplateBySlug(slug: string, targetPath?: string): Promise<import("@mastra/core").WorkflowResult<z.ZodObject<{
1095
+ export declare function mergeTemplateBySlug(slug: string, targetPath?: string): Promise<import("@mastra/core").WorkflowResult<z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1096
+ [x: string]: any;
1097
+ }, {
1098
+ [x: string]: any;
1099
+ }>, z.ZodObject<{
1056
1100
  repo: z.ZodString;
1057
1101
  ref: z.ZodOptional<z.ZodString>;
1058
1102
  slug: z.ZodOptional<z.ZodString>;
@@ -1192,7 +1236,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1192
1236
  mergeSuccess?: boolean | undefined;
1193
1237
  validationSuccess?: boolean | undefined;
1194
1238
  } | undefined;
1195
- }>, (import("@mastra/core").Step<"clone-template", z.ZodObject<{
1239
+ }>, (import("@mastra/core").Step<"clone-template", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1240
+ [x: string]: any;
1241
+ }, {
1242
+ [x: string]: any;
1243
+ }>, z.ZodObject<{
1196
1244
  repo: z.ZodString;
1197
1245
  ref: z.ZodOptional<z.ZodString>;
1198
1246
  slug: z.ZodOptional<z.ZodString>;
@@ -1231,7 +1279,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1231
1279
  targetPath?: string | undefined;
1232
1280
  success?: boolean | undefined;
1233
1281
  error?: string | undefined;
1234
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"analyze-package", z.ZodObject<{
1282
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"analyze-package", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1283
+ [x: string]: any;
1284
+ }, {
1285
+ [x: string]: any;
1286
+ }>, z.ZodObject<{
1235
1287
  templateDir: z.ZodString;
1236
1288
  commitSha: z.ZodString;
1237
1289
  slug: z.ZodString;
@@ -1282,7 +1334,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1282
1334
  devDependencies?: Record<string, string> | undefined;
1283
1335
  peerDependencies?: Record<string, string> | undefined;
1284
1336
  scripts?: Record<string, string> | undefined;
1285
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"discover-units", z.ZodObject<{
1337
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"discover-units", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1338
+ [x: string]: any;
1339
+ }, {
1340
+ [x: string]: any;
1341
+ }>, z.ZodObject<{
1286
1342
  templateDir: z.ZodString;
1287
1343
  commitSha: z.ZodString;
1288
1344
  slug: z.ZodString;
@@ -1335,7 +1391,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1335
1391
  }[];
1336
1392
  success?: boolean | undefined;
1337
1393
  error?: string | undefined;
1338
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"order-units", z.ZodObject<{
1394
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"order-units", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1395
+ [x: string]: any;
1396
+ }, {
1397
+ [x: string]: any;
1398
+ }>, z.ZodObject<{
1339
1399
  units: z.ZodArray<z.ZodObject<{
1340
1400
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
1341
1401
  id: z.ZodString;
@@ -1399,7 +1459,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1399
1459
  }[];
1400
1460
  success?: boolean | undefined;
1401
1461
  error?: string | undefined;
1402
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"package-merge", z.ZodObject<{
1462
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"package-merge", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1463
+ [x: string]: any;
1464
+ }, {
1465
+ [x: string]: any;
1466
+ }>, z.ZodObject<{
1403
1467
  commitSha: z.ZodString;
1404
1468
  slug: z.ZodString;
1405
1469
  targetPath: z.ZodOptional<z.ZodString>;
@@ -1479,7 +1543,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1479
1543
  success: boolean;
1480
1544
  applied: boolean;
1481
1545
  error?: string | undefined;
1482
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"install", z.ZodObject<{
1546
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"install", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1547
+ [x: string]: any;
1548
+ }, {
1549
+ [x: string]: any;
1550
+ }>, z.ZodObject<{
1483
1551
  targetPath: z.ZodString;
1484
1552
  }, "strip", z.ZodTypeAny, {
1485
1553
  targetPath: string;
@@ -1494,7 +1562,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1494
1562
  }, {
1495
1563
  success: boolean;
1496
1564
  error?: string | undefined;
1497
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"programmatic-file-copy", z.ZodObject<{
1565
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"programmatic-file-copy", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1566
+ [x: string]: any;
1567
+ }, {
1568
+ [x: string]: any;
1569
+ }>, z.ZodObject<{
1498
1570
  orderedUnits: z.ZodArray<z.ZodObject<{
1499
1571
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
1500
1572
  id: z.ZodString;
@@ -1640,7 +1712,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1640
1712
  targetFile: string;
1641
1713
  }[];
1642
1714
  error?: string | undefined;
1643
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"intelligent-merge", z.ZodObject<{
1715
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"intelligent-merge", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1716
+ [x: string]: any;
1717
+ }, {
1718
+ [x: string]: any;
1719
+ }>, z.ZodObject<{
1644
1720
  conflicts: z.ZodArray<z.ZodObject<{
1645
1721
  unit: z.ZodObject<{
1646
1722
  kind: z.ZodEnum<["mcp-server", "tool", "workflow", "agent", "integration", "network", "other"]>;
@@ -1810,7 +1886,11 @@ export declare function mergeTemplateBySlug(slug: string, targetPath?: string):
1810
1886
  resolution: string;
1811
1887
  }[];
1812
1888
  error?: string | undefined;
1813
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"validation-and-fix", z.ZodObject<{
1889
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("@mastra/core").DefaultEngineType> | import("@mastra/core").Step<"validation-and-fix", z.ZodObject<any, z.UnknownKeysParam, z.ZodTypeAny, {
1890
+ [x: string]: any;
1891
+ }, {
1892
+ [x: string]: any;
1893
+ }>, z.ZodObject<{
1814
1894
  commitSha: z.ZodString;
1815
1895
  slug: z.ZodString;
1816
1896
  targetPath: z.ZodOptional<z.ZodString>;
@@ -1 +1 @@
1
- {"version":3,"file":"template-builder.d.ts","sourceRoot":"","sources":["../../../src/workflows/template-builder/template-builder.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AA0gDxB,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yHAU1E"}
@@ -1,4 +1,4 @@
1
- export declare const workflowResearch = "\n## \uD83D\uDD0D **COMPREHENSIVE MASTRA WORKFLOW RESEARCH SUMMARY**\n\nBased on extensive research of Mastra documentation and examples, here's essential information for building effective Mastra workflows:\n\n### **\uD83D\uDCCB WORKFLOW FUNDAMENTALS**\n\n**Core Components:**\n- **`createWorkflow()`**: Main factory function that creates workflow instances\n- **`createStep()`**: Creates individual workflow steps with typed inputs/outputs \n- **`.commit()`**: Finalizes workflow definition (REQUIRED to make workflows executable)\n- **Zod schemas**: Used for strict input/output typing and validation\n\n**Basic Structure:**\n```typescript\nimport { createWorkflow, createStep } from \"@mastra/core/workflows\";\nimport { z } from \"zod\";\n\nconst workflow = createWorkflow({\n id: \"unique-workflow-id\", // Required: kebab-case recommended\n description: \"What this workflow does\", // Optional but recommended\n inputSchema: z.object({...}), // Required: Defines workflow inputs\n outputSchema: z.object({...}) // Required: Defines final outputs\n})\n .then(step1) // Chain steps sequentially\n .then(step2)\n .commit(); // CRITICAL: Makes workflow executable\n```\n\n### **\uD83D\uDD27 STEP CREATION PATTERNS**\n\n**Standard Step Definition:**\n```typescript\nconst myStep = createStep({\n id: \"step-id\", // Required: unique identifier\n description: \"Step description\", // Recommended for clarity\n inputSchema: z.object({...}), // Required: input validation\n outputSchema: z.object({...}), // Required: output validation\n execute: async ({ inputData, mastra, getStepResult, getInitData }) => {\n // Step logic here\n return { /* matches outputSchema */ };\n }\n});\n```\n\n**Execute Function Parameters:**\n- `inputData`: Validated input matching inputSchema\n- `mastra`: Access to Mastra instance (agents, tools, other workflows)\n- `getStepResult(stepInstance)`: Get results from previous steps\n- `getInitData()`: Access original workflow input data\n- `runtimeContext`: Runtime dependency injection context\n- `runCount`: Number of times this step has run (useful for retries)\n\n### **\uD83D\uDD04 CONTROL FLOW METHODS**\n\n**Sequential Execution:**\n- `.then(step)`: Execute steps one after another\n- Data flows automatically if schemas match\n\n**Parallel Execution:**\n- `.parallel([step1, step2])`: Run steps simultaneously\n- All parallel steps complete before continuing\n\n**Conditional Logic:**\n- `.branch([[condition, step], [condition, step]])`: Execute different steps based on conditions\n- Conditions evaluated sequentially, matching steps run in parallel\n\n**Loops:**\n- `.dountil(step, condition)`: Repeat until condition becomes true\n- `.dowhile(step, condition)`: Repeat while condition is true \n- `.foreach(step, {concurrency: N})`: Execute step for each array item\n\n**Data Transformation:**\n- `.map(({ inputData, getStepResult, getInitData }) => transformedData)`: Transform data between steps\n\n### **\u23F8\uFE0F SUSPEND & RESUME CAPABILITIES**\n\n**For Human-in-the-Loop Workflows:**\n```typescript\nconst userInputStep = createStep({\n id: \"user-input\",\n suspendSchema: z.object({}), // Schema for suspension payload\n resumeSchema: z.object({ // Schema for resume data\n userResponse: z.string()\n }),\n execute: async ({ resumeData, suspend }) => {\n if (!resumeData?.userResponse) {\n await suspend({}); // Pause workflow\n return { response: \"\" };\n }\n return { response: resumeData.userResponse };\n }\n});\n```\n\n**Resume Workflow:**\n```typescript\nconst result = await run.start({ inputData: {...} });\nif (result.status === \"suspended\") {\n await run.resume({\n step: result.suspended[0], // Or specific step ID\n resumeData: { userResponse: \"answer\" }\n });\n}\n```\n\n### **\uD83D\uDEE0\uFE0F INTEGRATING AGENTS & TOOLS**\n\n**Using Agents in Steps:**\n```typescript\n// Method 1: Agent as step\nconst agentStep = createStep(myAgent);\n\n// Method 2: Call agent in execute function\nconst step = createStep({\n execute: async ({ inputData }) => {\n const result = await myAgent.generate(prompt);\n return { output: result.text };\n }\n});\n```\n\n**Using Tools in Steps:**\n```typescript\n// Method 1: Tool as step \nconst toolStep = createStep(myTool);\n\n// Method 2: Call tool in execute function\nconst step = createStep({\n execute: async ({ inputData, runtimeContext }) => {\n const result = await myTool.execute({\n context: inputData,\n runtimeContext\n });\n return result;\n }\n});\n```\n\n### **\uD83D\uDDC2\uFE0F PROJECT ORGANIZATION PATTERNS**\n\n**MANDATORY Workflow Organization:**\nEach workflow MUST be organized in its own dedicated folder with separated concerns:\n\n```\nsrc/mastra/workflows/\n\u251C\u2500\u2500 my-workflow-name/ # Kebab-case folder name\n\u2502 \u251C\u2500\u2500 types.ts # All Zod schemas and TypeScript types\n\u2502 \u251C\u2500\u2500 steps.ts # All individual step definitions\n\u2502 \u251C\u2500\u2500 workflow.ts # Main workflow composition and export\n\u2502 \u2514\u2500\u2500 utils.ts # Helper functions (if needed)\n\u251C\u2500\u2500 another-workflow/\n\u2502 \u251C\u2500\u2500 types.ts\n\u2502 \u251C\u2500\u2500 steps.ts\n\u2502 \u251C\u2500\u2500 workflow.ts\n\u2502 \u2514\u2500\u2500 utils.ts\n\u2514\u2500\u2500 index.ts # Export all workflows\n```\n\n**CRITICAL File Organization Rules:**\n- **ALWAYS create a dedicated folder** for each workflow\n- **Folder names MUST be kebab-case** version of workflow name\n- **types.ts**: Define all input/output schemas, validation types, and interfaces\n- **steps.ts**: Create all individual step definitions using createStep()\n- **workflow.ts**: Compose steps into workflow using createWorkflow() and export the final workflow\n- **utils.ts**: Any helper functions, constants, or utilities (create only if needed)\n- **NEVER put everything in one file** - always separate concerns properly\n\n**Workflow Registration:**\n```typescript\n// src/mastra/index.ts\nexport const mastra = new Mastra({\n workflows: {\n sendEmailWorkflow, // Use camelCase for keys\n dataProcessingWorkflow\n },\n storage: new LibSQLStore({ url: 'file:./mastra.db' }), // Required for suspend/resume\n});\n```\n\n### **\uD83D\uDCE6 ESSENTIAL DEPENDENCIES**\n\n**Required Packages:**\n```json\n{\n \"dependencies\": {\n \"@mastra/core\": \"latest\",\n \"zod\": \"^3.25.67\"\n }\n}\n```\n\n**Additional Packages (as needed):**\n- `@mastra/libsql`: For workflow state persistence\n- `@ai-sdk/openai`: For AI model integration\n- `ai`: For AI SDK functionality\n\n### **\u2705 WORKFLOW BEST PRACTICES**\n\n**Schema Design:**\n- Use descriptive property names in schemas\n- Make schemas as specific as possible (avoid `z.any()`)\n- Include validation for required business logic\n\n**Error Handling:**\n- Use `try/catch` blocks in step execute functions\n- Return meaningful error messages\n- Consider using `bail()` for early successful exits\n\n**Step Organization:**\n- Keep steps focused on single responsibilities\n- Use descriptive step IDs (kebab-case recommended)\n- Create reusable steps for common operations\n\n**Data Flow:**\n- Use `.map()` when schemas don't align between steps\n- Access previous step results with `getStepResult(stepInstance)`\n- Use `getInitData()` to access original workflow input\n\n### **\uD83D\uDE80 EXECUTION PATTERNS**\n\n**Running Workflows:**\n```typescript\n// Create and start run\nconst run = await workflow.createRunAsync();\nconst result = await run.start({ inputData: {...} });\n\n// Stream execution for real-time monitoring\nconst stream = await run.streamVNext({ inputData: {...} });\nfor await (const chunk of stream) {\n console.log(chunk);\n}\n\n// Watch for events\nrun.watch((event) => console.log(event));\n```\n\n**Workflow Status Types:**\n- `\"success\"`: Completed successfully\n- `\"suspended\"`: Paused awaiting input\n- `\"failed\"`: Encountered error\n\n### **\uD83D\uDD17 ADVANCED FEATURES**\n\n**Nested Workflows:**\n- Use workflows as steps: `.then(otherWorkflow)`\n- Enable complex workflow composition\n\n**Runtime Context:**\n- Pass shared data across all steps\n- Enable dependency injection patterns\n\n**Streaming & Events:**\n- Real-time workflow monitoring\n- Integration with external event systems\n\n**Cloning:**\n- `cloneWorkflow(original, {id: \"new-id\"})`: Reuse workflow structure\n- `cloneStep(original, {id: \"new-id\"})`: Reuse step logic\n\nThis comprehensive research provides the foundation for creating robust, maintainable Mastra workflows with proper typing, error handling, and architectural patterns.\n";
1
+ export declare const workflowResearch = "\n## \uD83D\uDD0D **COMPREHENSIVE MASTRA WORKFLOW RESEARCH SUMMARY**\n\nBased on extensive research of Mastra documentation and examples, here's essential information for building effective Mastra workflows:\n\n### **\uD83D\uDCCB WORKFLOW FUNDAMENTALS**\n\n**Core Components:**\n- **`createWorkflow()`**: Main factory function that creates workflow instances\n- **`createStep()`**: Creates individual workflow steps with typed inputs/outputs \n- **`.commit()`**: Finalizes workflow definition (REQUIRED to make workflows executable)\n- **Zod schemas**: Used for strict input/output typing and validation\n\n**Basic Structure:**\n```typescript\nimport { createWorkflow, createStep } from \"@mastra/core/workflows\";\nimport { z } from \"zod\";\n\nconst workflow = createWorkflow({\n id: \"unique-workflow-id\", // Required: kebab-case recommended\n description: \"What this workflow does\", // Optional but recommended\n inputSchema: z.object({...}), // Required: Defines workflow inputs\n outputSchema: z.object({...}) // Required: Defines final outputs\n})\n .then(step1) // Chain steps sequentially\n .then(step2)\n .commit(); // CRITICAL: Makes workflow executable\n```\n\n### **\uD83D\uDD27 STEP CREATION PATTERNS**\n\n**Standard Step Definition:**\n```typescript\nconst myStep = createStep({\n id: \"step-id\", // Required: unique identifier\n description: \"Step description\", // Recommended for clarity\n inputSchema: z.object({...}), // Required: input validation\n outputSchema: z.object({...}), // Required: output validation\n execute: async ({ inputData, mastra, getStepResult, getInitData }) => {\n // Step logic here\n return { /* matches outputSchema */ };\n }\n});\n```\n\n**Execute Function Parameters:**\n- `inputData`: Validated input matching inputSchema\n- `mastra`: Access to Mastra instance (agents, tools, other workflows)\n- `getStepResult(stepInstance)`: Get results from previous steps\n- `getInitData()`: Access original workflow input data\n- `requestContext`: Runtime dependency injection context\n- `runCount`: Number of times this step has run (useful for retries)\n\n### **\uD83D\uDD04 CONTROL FLOW METHODS**\n\n**Sequential Execution:**\n- `.then(step)`: Execute steps one after another\n- Data flows automatically if schemas match\n\n**Parallel Execution:**\n- `.parallel([step1, step2])`: Run steps simultaneously\n- All parallel steps complete before continuing\n\n**Conditional Logic:**\n- `.branch([[condition, step], [condition, step]])`: Execute different steps based on conditions\n- Conditions evaluated sequentially, matching steps run in parallel\n\n**Loops:**\n- `.dountil(step, condition)`: Repeat until condition becomes true\n- `.dowhile(step, condition)`: Repeat while condition is true \n- `.foreach(step, {concurrency: N})`: Execute step for each array item\n\n**Data Transformation:**\n- `.map(({ inputData, getStepResult, getInitData }) => transformedData)`: Transform data between steps\n\n### **\u23F8\uFE0F SUSPEND & RESUME CAPABILITIES**\n\n**For Human-in-the-Loop Workflows:**\n```typescript\nconst userInputStep = createStep({\n id: \"user-input\",\n suspendSchema: z.object({}), // Schema for suspension payload\n resumeSchema: z.object({ // Schema for resume data\n userResponse: z.string()\n }),\n execute: async ({ resumeData, suspend }) => {\n if (!resumeData?.userResponse) {\n await suspend({}); // Pause workflow\n return { response: \"\" };\n }\n return { response: resumeData.userResponse };\n }\n});\n```\n\n**Resume Workflow:**\n```typescript\nconst result = await run.start({ inputData: {...} });\nif (result.status === \"suspended\") {\n await run.resume({\n step: result.suspended[0], // Or specific step ID\n resumeData: { userResponse: \"answer\" }\n });\n}\n```\n\n### **\uD83D\uDEE0\uFE0F INTEGRATING AGENTS & TOOLS**\n\n**Using Agents in Steps:**\n```typescript\n// Method 1: Agent as step\nconst agentStep = createStep(myAgent);\n\n// Method 2: Call agent in execute function\nconst step = createStep({\n execute: async ({ inputData }) => {\n const result = await myAgent.generate(prompt);\n return { output: result.text };\n }\n});\n```\n\n**Using Tools in Steps:**\n```typescript\n// Method 1: Tool as step \nconst toolStep = createStep(myTool);\n\n// Method 2: Call tool in execute function\nconst step = createStep({\n execute: async ({ inputData, requestContext }) => {\n const result = await myTool.execute({\n context: inputData,\n requestContext\n });\n return result;\n }\n});\n```\n\n### **\uD83D\uDDC2\uFE0F PROJECT ORGANIZATION PATTERNS**\n\n**MANDATORY Workflow Organization:**\nEach workflow MUST be organized in its own dedicated folder with separated concerns:\n\n```\nsrc/mastra/workflows/\n\u251C\u2500\u2500 my-workflow-name/ # Kebab-case folder name\n\u2502 \u251C\u2500\u2500 types.ts # All Zod schemas and TypeScript types\n\u2502 \u251C\u2500\u2500 steps.ts # All individual step definitions\n\u2502 \u251C\u2500\u2500 workflow.ts # Main workflow composition and export\n\u2502 \u2514\u2500\u2500 utils.ts # Helper functions (if needed)\n\u251C\u2500\u2500 another-workflow/\n\u2502 \u251C\u2500\u2500 types.ts\n\u2502 \u251C\u2500\u2500 steps.ts\n\u2502 \u251C\u2500\u2500 workflow.ts\n\u2502 \u2514\u2500\u2500 utils.ts\n\u2514\u2500\u2500 index.ts # Export all workflows\n```\n\n**CRITICAL File Organization Rules:**\n- **ALWAYS create a dedicated folder** for each workflow\n- **Folder names MUST be kebab-case** version of workflow name\n- **types.ts**: Define all input/output schemas, validation types, and interfaces\n- **steps.ts**: Create all individual step definitions using createStep()\n- **workflow.ts**: Compose steps into workflow using createWorkflow() and export the final workflow\n- **utils.ts**: Any helper functions, constants, or utilities (create only if needed)\n- **NEVER put everything in one file** - always separate concerns properly\n\n**Workflow Registration:**\n```typescript\n// src/mastra/index.ts\nexport const mastra = new Mastra({\n workflows: {\n sendEmailWorkflow, // Use camelCase for keys\n dataProcessingWorkflow\n },\n storage: new LibSQLStore({ url: 'file:./mastra.db' }), // Required for suspend/resume\n});\n```\n\n### **\uD83D\uDCE6 ESSENTIAL DEPENDENCIES**\n\n**Required Packages:**\n```json\n{\n \"dependencies\": {\n \"@mastra/core\": \"latest\",\n \"zod\": \"^3.25.67\"\n }\n}\n```\n\n**Additional Packages (as needed):**\n- `@mastra/libsql`: For workflow state persistence\n- `@ai-sdk/openai`: For AI model integration\n- `ai`: For AI SDK functionality\n\n### **\u2705 WORKFLOW BEST PRACTICES**\n\n**Schema Design:**\n- Use descriptive property names in schemas\n- Make schemas as specific as possible (avoid `z.any()`)\n- Include validation for required business logic\n\n**Error Handling:**\n- Use `try/catch` blocks in step execute functions\n- Return meaningful error messages\n- Consider using `bail()` for early successful exits\n\n**Step Organization:**\n- Keep steps focused on single responsibilities\n- Use descriptive step IDs (kebab-case recommended)\n- Create reusable steps for common operations\n\n**Data Flow:**\n- Use `.map()` when schemas don't align between steps\n- Access previous step results with `getStepResult(stepInstance)`\n- Use `getInitData()` to access original workflow input\n\n### **\uD83D\uDE80 EXECUTION PATTERNS**\n\n**Running Workflows:**\n```typescript\n// Create and start run\nconst run = await workflow.createRunAsync();\nconst result = await run.start({ inputData: {...} });\n\n// Stream execution for real-time monitoring\nconst stream = await run.streamVNext({ inputData: {...} });\nfor await (const chunk of stream) {\n console.log(chunk);\n}\n\n// Watch for events\nrun.watch((event) => console.log(event));\n```\n\n**Workflow Status Types:**\n- `\"success\"`: Completed successfully\n- `\"suspended\"`: Paused awaiting input\n- `\"failed\"`: Encountered error\n\n### **\uD83D\uDD17 ADVANCED FEATURES**\n\n**Nested Workflows:**\n- Use workflows as steps: `.then(otherWorkflow)`\n- Enable complex workflow composition\n\n**Request Context:**\n- Pass shared data across all steps\n- Enable dependency injection patterns\n\n**Streaming & Events:**\n- Real-time workflow monitoring\n- Integration with external event systems\n\n**Cloning:**\n- `cloneWorkflow(original, {id: \"new-id\"})`: Reuse workflow structure\n- `cloneStep(original, {id: \"new-id\"})`: Reuse step logic\n\nThis comprehensive research provides the foundation for creating robust, maintainable Mastra workflows with proper typing, error handling, and architectural patterns.\n";
2
2
  /**
3
3
  * Prompts and instructions for workflow builder agents
4
4
  */