@mastra/core 0.17.1 → 0.18.0-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 (111) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/dist/agent/agent.d.ts +8 -8
  3. package/dist/agent/agent.d.ts.map +1 -1
  4. package/dist/agent/agent.types.d.ts +16 -14
  5. package/dist/agent/agent.types.d.ts.map +1 -1
  6. package/dist/agent/index.cjs +8 -8
  7. package/dist/agent/index.js +1 -1
  8. package/dist/agent/input-processor/index.cjs +6 -6
  9. package/dist/agent/input-processor/index.js +1 -1
  10. package/dist/agent/types.d.ts +16 -12
  11. package/dist/agent/types.d.ts.map +1 -1
  12. package/dist/agent/workflows/prepare-stream/index.d.ts +91 -14
  13. package/dist/agent/workflows/prepare-stream/index.d.ts.map +1 -1
  14. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts +41 -3
  15. package/dist/agent/workflows/prepare-stream/map-results-step.d.ts.map +1 -1
  16. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts +46 -9
  17. package/dist/agent/workflows/prepare-stream/prepare-memory-step.d.ts.map +1 -1
  18. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts +45 -5
  19. package/dist/agent/workflows/prepare-stream/prepare-tools-step.d.ts.map +1 -1
  20. package/dist/agent/workflows/prepare-stream/schema.d.ts +177 -0
  21. package/dist/agent/workflows/prepare-stream/schema.d.ts.map +1 -0
  22. package/dist/agent/workflows/prepare-stream/stream-step.d.ts +4 -3
  23. package/dist/agent/workflows/prepare-stream/stream-step.d.ts.map +1 -1
  24. package/dist/{chunk-UWKCUNHP.js → chunk-4VMYYXFD.js} +7 -43
  25. package/dist/chunk-4VMYYXFD.js.map +1 -0
  26. package/dist/{chunk-L5FY7VP5.js → chunk-5GZUTAC3.js} +38 -32
  27. package/dist/chunk-5GZUTAC3.js.map +1 -0
  28. package/dist/{chunk-ZV3G5C6V.cjs → chunk-6V4L7V2Q.cjs} +38 -31
  29. package/dist/chunk-6V4L7V2Q.cjs.map +1 -0
  30. package/dist/{chunk-UPFFSRA4.cjs → chunk-BFLZKJAS.cjs} +12 -8
  31. package/dist/chunk-BFLZKJAS.cjs.map +1 -0
  32. package/dist/{chunk-IWX7LVOC.cjs → chunk-GCUTIOQR.cjs} +6 -6
  33. package/dist/{chunk-IWX7LVOC.cjs.map → chunk-GCUTIOQR.cjs.map} +1 -1
  34. package/dist/{chunk-2B4M56ZH.js → chunk-GGMAYEJY.js} +8 -4
  35. package/dist/chunk-GGMAYEJY.js.map +1 -0
  36. package/dist/{chunk-WYMPYP4G.js → chunk-ROT2EVXS.js} +3 -3
  37. package/dist/{chunk-WYMPYP4G.js.map → chunk-ROT2EVXS.js.map} +1 -1
  38. package/dist/{chunk-GH7NHMTJ.cjs → chunk-SVZWWLGF.cjs} +4 -4
  39. package/dist/{chunk-GH7NHMTJ.cjs.map → chunk-SVZWWLGF.cjs.map} +1 -1
  40. package/dist/{chunk-M2JGKIUZ.cjs → chunk-SYLRGTK6.cjs} +11 -47
  41. package/dist/chunk-SYLRGTK6.cjs.map +1 -0
  42. package/dist/{chunk-ZP2FDJMD.js → chunk-TKIKIC36.js} +4 -4
  43. package/dist/{chunk-ZP2FDJMD.js.map → chunk-TKIKIC36.js.map} +1 -1
  44. package/dist/index.cjs +21 -17
  45. package/dist/index.js +4 -4
  46. package/dist/llm/model/model.loop.d.ts +1 -1
  47. package/dist/llm/model/model.loop.d.ts.map +1 -1
  48. package/dist/llm/model/model.loop.types.d.ts +3 -3
  49. package/dist/llm/model/model.loop.types.d.ts.map +1 -1
  50. package/dist/loop/index.cjs +2 -2
  51. package/dist/loop/index.js +1 -1
  52. package/dist/loop/loop.d.ts +1 -1
  53. package/dist/loop/loop.d.ts.map +1 -1
  54. package/dist/loop/network/index.d.ts +8 -10
  55. package/dist/loop/network/index.d.ts.map +1 -1
  56. package/dist/loop/types.d.ts +3 -3
  57. package/dist/loop/types.d.ts.map +1 -1
  58. package/dist/loop/workflows/agentic-execution/index.d.ts +1 -1
  59. package/dist/loop/workflows/agentic-execution/index.d.ts.map +1 -1
  60. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts +1 -1
  61. package/dist/loop/workflows/agentic-execution/llm-execution-step.d.ts.map +1 -1
  62. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts +1 -1
  63. package/dist/loop/workflows/agentic-execution/llm-mapping-step.d.ts.map +1 -1
  64. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts +1 -1
  65. package/dist/loop/workflows/agentic-execution/tool-call-step.d.ts.map +1 -1
  66. package/dist/loop/workflows/agentic-loop/index.d.ts +2 -2
  67. package/dist/loop/workflows/agentic-loop/index.d.ts.map +1 -1
  68. package/dist/loop/workflows/stream.d.ts +1 -1
  69. package/dist/loop/workflows/stream.d.ts.map +1 -1
  70. package/dist/mastra/index.cjs +2 -2
  71. package/dist/mastra/index.js +1 -1
  72. package/dist/memory/types.d.ts +9 -8
  73. package/dist/memory/types.d.ts.map +1 -1
  74. package/dist/network/vNext/index.cjs +27 -27
  75. package/dist/network/vNext/index.d.ts +17 -17
  76. package/dist/network/vNext/index.js +1 -1
  77. package/dist/processors/index.cjs +10 -10
  78. package/dist/processors/index.js +1 -1
  79. package/dist/processors/processors/structured-output.d.ts +4 -4
  80. package/dist/processors/processors/structured-output.d.ts.map +1 -1
  81. package/dist/relevance/index.cjs +4 -4
  82. package/dist/relevance/index.js +1 -1
  83. package/dist/scores/base.d.ts +24 -1
  84. package/dist/scores/base.d.ts.map +1 -1
  85. package/dist/scores/index.cjs +8 -8
  86. package/dist/scores/index.js +1 -1
  87. package/dist/stream/aisdk/v5/execute.d.ts +2 -2
  88. package/dist/stream/aisdk/v5/execute.d.ts.map +1 -1
  89. package/dist/stream/base/schema.d.ts +1 -1
  90. package/dist/stream/base/schema.d.ts.map +1 -1
  91. package/dist/stream/index.cjs +4 -4
  92. package/dist/stream/index.js +1 -1
  93. package/dist/workflows/default.d.ts.map +1 -1
  94. package/dist/workflows/evented/index.cjs +10 -10
  95. package/dist/workflows/evented/index.js +1 -1
  96. package/dist/workflows/evented/step-executor.d.ts.map +1 -1
  97. package/dist/workflows/index.cjs +14 -10
  98. package/dist/workflows/index.js +1 -1
  99. package/dist/workflows/legacy/index.cjs +22 -22
  100. package/dist/workflows/legacy/index.js +1 -1
  101. package/dist/workflows/step.d.ts +4 -2
  102. package/dist/workflows/step.d.ts.map +1 -1
  103. package/package.json +1 -1
  104. package/dist/agent/workflows/prepare-stream/types.d.ts +0 -23
  105. package/dist/agent/workflows/prepare-stream/types.d.ts.map +0 -1
  106. package/dist/chunk-2B4M56ZH.js.map +0 -1
  107. package/dist/chunk-L5FY7VP5.js.map +0 -1
  108. package/dist/chunk-M2JGKIUZ.cjs.map +0 -1
  109. package/dist/chunk-UPFFSRA4.cjs.map +0 -1
  110. package/dist/chunk-UWKCUNHP.js.map +0 -1
  111. package/dist/chunk-ZV3G5C6V.cjs.map +0 -1
@@ -1,12 +1,14 @@
1
1
  import { z } from 'zod';
2
2
  import type { AISpan, AISpanType } from '../../../ai-tracing/index.js';
3
+ import type { SystemMessage } from '../../../llm/index.js';
3
4
  import type { MastraMemory } from '../../../memory/memory.js';
4
5
  import type { MemoryConfig, StorageThreadType } from '../../../memory/types.js';
5
6
  import type { RuntimeContext } from '../../../runtime-context/index.js';
7
+ import { AISDKV5OutputStream, MastraModelOutput } from '../../../stream/index.js';
6
8
  import type { OutputSchema } from '../../../stream/base/schema.js';
7
9
  import type { InnerAgentExecutionOptions } from '../../agent.types.js';
8
10
  import type { SaveQueueManager } from '../../save-queue/index.js';
9
- import type { AgentCapabilities } from './types.js';
11
+ import type { AgentCapabilities } from './schema.js';
10
12
  interface CreatePrepareStreamWorkflowOptions<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
11
13
  capabilities: AgentCapabilities;
12
14
  options: InnerAgentExecutionOptions<OUTPUT, FORMAT>;
@@ -19,36 +21,111 @@ interface CreatePrepareStreamWorkflowOptions<OUTPUT extends OutputSchema | undef
19
21
  agentAISpan: AISpan<AISpanType.AGENT_RUN>;
20
22
  methodType: 'generate' | 'stream' | 'streamVNext' | 'generateVNext';
21
23
  format?: FORMAT;
22
- instructions: string;
24
+ instructions: SystemMessage;
23
25
  memoryConfig?: MemoryConfig;
24
26
  memory?: MastraMemory;
25
27
  saveQueueManager: SaveQueueManager;
26
28
  returnScorerData?: boolean;
27
29
  }
28
- export declare function createPrepareStreamWorkflow<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, agentAISpan, methodType, format, instructions, memoryConfig, memory, saveQueueManager, returnScorerData, }: CreatePrepareStreamWorkflowOptions<OUTPUT, FORMAT>): import("../../../workflows").Workflow<import("../../..").DefaultEngineType, (import("../../..").Step<"prepare-tools-step", z.ZodAny, z.ZodObject<{
29
- convertedTools: z.ZodRecord<z.ZodString, z.ZodAny>;
30
+ export declare function createPrepareStreamWorkflow<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, agentAISpan, methodType, format, instructions, memoryConfig, memory, saveQueueManager, returnScorerData, }: CreatePrepareStreamWorkflowOptions<OUTPUT, FORMAT>): import("../../../workflows").Workflow<import("../../..").DefaultEngineType, (import("../../..").Step<"prepare-tools-step", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
31
+ convertedTools: z.ZodRecord<z.ZodString, z.ZodObject<{
32
+ id: z.ZodOptional<z.ZodString>;
33
+ description: z.ZodOptional<z.ZodString>;
34
+ parameters: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>;
35
+ outputSchema: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>>;
36
+ execute: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodPromise<z.ZodAny>>>;
37
+ type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"function">, z.ZodLiteral<"provider-defined">, z.ZodUndefined]>>;
38
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
39
+ }, "strip", z.ZodTypeAny, {
40
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
41
+ outputSchema?: any;
42
+ type?: "function" | "provider-defined" | undefined;
43
+ id?: string | undefined;
44
+ description?: string | undefined;
45
+ args?: Record<string, any> | undefined;
46
+ parameters?: any;
47
+ }, {
48
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
49
+ outputSchema?: any;
50
+ type?: "function" | "provider-defined" | undefined;
51
+ id?: string | undefined;
52
+ description?: string | undefined;
53
+ args?: Record<string, any> | undefined;
54
+ parameters?: any;
55
+ }>>;
30
56
  }, "strip", z.ZodTypeAny, {
31
- convertedTools: Record<string, any>;
57
+ convertedTools: Record<string, {
58
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
59
+ outputSchema?: any;
60
+ type?: "function" | "provider-defined" | undefined;
61
+ id?: string | undefined;
62
+ description?: string | undefined;
63
+ args?: Record<string, any> | undefined;
64
+ parameters?: any;
65
+ }>;
32
66
  }, {
33
- convertedTools: Record<string, any>;
34
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType> | import("../../..").Step<"prepare-memory-step", z.ZodAny, z.ZodObject<{
67
+ convertedTools: Record<string, {
68
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
69
+ outputSchema?: any;
70
+ type?: "function" | "provider-defined" | undefined;
71
+ id?: string | undefined;
72
+ description?: string | undefined;
73
+ args?: Record<string, any> | undefined;
74
+ parameters?: any;
75
+ }>;
76
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType> | import("../../..").Step<"prepare-memory-step", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
35
77
  threadExists: z.ZodBoolean;
36
- thread: z.ZodAny;
37
- messageList: z.ZodAny;
78
+ thread: z.ZodOptional<z.ZodObject<{
79
+ id: z.ZodString;
80
+ title: z.ZodOptional<z.ZodString>;
81
+ resourceId: z.ZodString;
82
+ createdAt: z.ZodDate;
83
+ updatedAt: z.ZodDate;
84
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
85
+ }, "strip", z.ZodTypeAny, {
86
+ resourceId: string;
87
+ id: string;
88
+ createdAt: Date;
89
+ updatedAt: Date;
90
+ title?: string | undefined;
91
+ metadata?: Record<string, any> | undefined;
92
+ }, {
93
+ resourceId: string;
94
+ id: string;
95
+ createdAt: Date;
96
+ updatedAt: Date;
97
+ title?: string | undefined;
98
+ metadata?: Record<string, any> | undefined;
99
+ }>>;
100
+ messageList: z.ZodType<import("../..").MessageList, z.ZodTypeDef, import("../..").MessageList>;
38
101
  tripwire: z.ZodOptional<z.ZodBoolean>;
39
102
  tripwireReason: z.ZodOptional<z.ZodString>;
40
103
  }, "strip", z.ZodTypeAny, {
104
+ messageList: import("../..").MessageList;
41
105
  threadExists: boolean;
42
- messageList?: any;
43
106
  tripwire?: boolean | undefined;
44
107
  tripwireReason?: string | undefined;
45
- thread?: any;
108
+ thread?: {
109
+ resourceId: string;
110
+ id: string;
111
+ createdAt: Date;
112
+ updatedAt: Date;
113
+ title?: string | undefined;
114
+ metadata?: Record<string, any> | undefined;
115
+ } | undefined;
46
116
  }, {
117
+ messageList: import("../..").MessageList;
47
118
  threadExists: boolean;
48
- messageList?: any;
49
119
  tripwire?: boolean | undefined;
50
120
  tripwireReason?: string | undefined;
51
- thread?: any;
52
- }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>)[], "execution-workflow", z.ZodAny, z.ZodAny, z.ZodAny>;
121
+ thread?: {
122
+ resourceId: string;
123
+ id: string;
124
+ createdAt: Date;
125
+ updatedAt: Date;
126
+ title?: string | undefined;
127
+ metadata?: Record<string, any> | undefined;
128
+ } | undefined;
129
+ }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType> | import("../../..").Step<"stream-text-step", z.ZodAny, z.ZodUnion<[z.ZodType<MastraModelOutput<undefined>, z.ZodTypeDef, MastraModelOutput<undefined>>, z.ZodType<AISDKV5OutputStream<undefined>, z.ZodTypeDef, AISDKV5OutputStream<undefined>>]>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>)[], "execution-workflow", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodUnion<[z.ZodType<MastraModelOutput<OUTPUT | undefined>, z.ZodTypeDef, MastraModelOutput<OUTPUT | undefined>>, z.ZodType<AISDKV5OutputStream<OUTPUT | undefined>, z.ZodTypeDef, AISDKV5OutputStream<OUTPUT | undefined>>]>, z.ZodUnion<[z.ZodType<MastraModelOutput<OUTPUT | undefined>, z.ZodTypeDef, MastraModelOutput<OUTPUT | undefined>>, z.ZodType<AISDKV5OutputStream<OUTPUT | undefined>, z.ZodTypeDef, AISDKV5OutputStream<OUTPUT | undefined>>]>>;
53
130
  export {};
54
131
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,iB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AE,MAAM,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,CAAC;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,aAAa,CAAC;IAC5B,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED,wBAAgB,2BAA2B,CACzC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,KAAK,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,YAAY,EACZ,YAAY,EACZ,MAAM,EACN,gBAAgB,EAChB,gBAAgB,GACjB,EAAE,kCAAkC,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;09BAmEpD"}
@@ -1,11 +1,14 @@
1
1
  import type { AISpan, AISpanType } from '../../../ai-tracing/index.js';
2
+ import type { SystemMessage } from '../../../llm/index.js';
3
+ import type { ModelLoopStreamArgs } from '../../../llm/model/model.loop.types.js';
2
4
  import type { MastraMemory } from '../../../memory/memory.js';
3
5
  import type { MemoryConfig } from '../../../memory/types.js';
4
6
  import type { RuntimeContext } from '../../../runtime-context/index.js';
5
7
  import type { OutputSchema } from '../../../stream/base/schema.js';
8
+ import type { ChunkType } from '../../../stream/types.js';
6
9
  import type { InnerAgentExecutionOptions } from '../../agent.types.js';
7
10
  import type { SaveQueueManager } from '../../save-queue/index.js';
8
- import type { AgentCapabilities } from './types.js';
11
+ import type { AgentCapabilities, PrepareMemoryStepOutput, PrepareToolsStepOutput } from './schema.js';
9
12
  interface MapResultsStepOptions<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
10
13
  capabilities: AgentCapabilities;
11
14
  options: InnerAgentExecutionOptions<OUTPUT, FORMAT>;
@@ -16,8 +19,43 @@ interface MapResultsStepOptions<OUTPUT extends OutputSchema | undefined = undefi
16
19
  memoryConfig?: MemoryConfig;
17
20
  saveQueueManager: SaveQueueManager;
18
21
  agentAISpan: AISpan<AISpanType.AGENT_RUN>;
19
- instructions: string;
22
+ instructions: SystemMessage;
20
23
  }
21
- export declare function createMapResultsStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, resourceId, runId, runtimeContext, memory, memoryConfig, saveQueueManager, agentAISpan, instructions, }: MapResultsStepOptions<OUTPUT, FORMAT>): ({ inputData, bail }: any) => Promise<any>;
24
+ export declare function createMapResultsStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, resourceId, runId, runtimeContext, memory, memoryConfig, saveQueueManager, agentAISpan, instructions, }: MapResultsStepOptions<OUTPUT, FORMAT>): ({ inputData, bail, }: {
25
+ inputData: {
26
+ "prepare-tools-step": PrepareToolsStepOutput;
27
+ "prepare-memory-step": PrepareMemoryStepOutput;
28
+ };
29
+ bail: <T>(value: T) => T;
30
+ }) => Promise<{
31
+ textStream: AsyncGenerator<never, void, unknown>;
32
+ fullStream: ReadableStream<ChunkType>;
33
+ objectStream: ReadableStream<any>;
34
+ text: Promise<string>;
35
+ usage: Promise<{
36
+ inputTokens: number;
37
+ outputTokens: number;
38
+ totalTokens: number;
39
+ }>;
40
+ finishReason: Promise<string>;
41
+ tripwire: boolean;
42
+ tripwireReason: string | undefined;
43
+ response: {
44
+ id: `${string}-${string}-${string}-${string}-${string}`;
45
+ timestamp: Date;
46
+ modelId: string;
47
+ messages: never[];
48
+ };
49
+ toolCalls: Promise<never[]>;
50
+ toolResults: Promise<never[]>;
51
+ warnings: Promise<undefined>;
52
+ request: {
53
+ body: string;
54
+ };
55
+ object: undefined;
56
+ experimental_output: undefined;
57
+ steps: undefined;
58
+ experimental_providerMetadata: undefined;
59
+ } | ModelLoopStreamArgs<any, OUTPUT>>;
22
60
  export {};
23
61
  //# sourceMappingURL=map-results-step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"map-results-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/map-results-step.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAqB,MAAM,uBAAuB,CAAC;AAE7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,UAAU,qBAAqB,CAC7B,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;IAEzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,gBAAgB,EAAE,gBAAgB,CAAC;IACnC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAgB,oBAAoB,CAClC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,UAAU,EACV,KAAK,EACL,cAAc,EACd,MAAM,EACN,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,GACb,EAAE,qBAAqB,CAAC,MAAM,EAAE,MAAM,CAAC,IACxB,qBAAqB,GAAG,kBA4MvC"}
1
+ {"version":3,"file":"map-results-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/map-results-step.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAC;AAC/E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAE/D,OAAO,K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AC;KAChD,CAAC;IACF,IAAI,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,KAAK,CAAC,CAAC;CAC1B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sCAsMF"}
@@ -1,11 +1,13 @@
1
1
  import { z } from 'zod';
2
2
  import type { AISpan, AISpanType } from '../../../ai-tracing/index.js';
3
+ import type { SystemMessage } from '../../../llm/index.js';
3
4
  import type { MastraMemory } from '../../../memory/memory.js';
4
5
  import type { MemoryConfig, StorageThreadType } from '../../../memory/types.js';
5
6
  import type { RuntimeContext } from '../../../runtime-context/index.js';
6
7
  import type { OutputSchema } from '../../../stream/base/schema.js';
7
8
  import type { InnerAgentExecutionOptions } from '../../agent.types.js';
8
- import type { AgentCapabilities } from './types.js';
9
+ import { MessageList } from '../../message-list/index.js';
10
+ import type { AgentCapabilities } from './schema.js';
9
11
  interface PrepareMemoryStepOptions<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
10
12
  capabilities: AgentCapabilities;
11
13
  options: InnerAgentExecutionOptions<OUTPUT, FORMAT>;
@@ -18,28 +20,63 @@ interface PrepareMemoryStepOptions<OUTPUT extends OutputSchema | undefined = und
18
20
  agentAISpan: AISpan<AISpanType.AGENT_RUN>;
19
21
  methodType: 'generate' | 'stream' | 'streamVNext' | 'generateVNext';
20
22
  format?: FORMAT;
21
- instructions: string;
23
+ instructions: SystemMessage;
22
24
  memoryConfig?: MemoryConfig;
23
25
  memory?: MastraMemory;
24
26
  }
25
- export declare function createPrepareMemoryStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, instructions, memoryConfig, memory, }: PrepareMemoryStepOptions<OUTPUT, FORMAT>): import("../../..").Step<"prepare-memory-step", z.ZodAny, z.ZodObject<{
27
+ export declare function createPrepareMemoryStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, instructions, memoryConfig, memory, }: PrepareMemoryStepOptions<OUTPUT, FORMAT>): import("../../..").Step<"prepare-memory-step", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
26
28
  threadExists: z.ZodBoolean;
27
- thread: z.ZodAny;
28
- messageList: z.ZodAny;
29
+ thread: z.ZodOptional<z.ZodObject<{
30
+ id: z.ZodString;
31
+ title: z.ZodOptional<z.ZodString>;
32
+ resourceId: z.ZodString;
33
+ createdAt: z.ZodDate;
34
+ updatedAt: z.ZodDate;
35
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
36
+ }, "strip", z.ZodTypeAny, {
37
+ resourceId: string;
38
+ id: string;
39
+ createdAt: Date;
40
+ updatedAt: Date;
41
+ title?: string | undefined;
42
+ metadata?: Record<string, any> | undefined;
43
+ }, {
44
+ resourceId: string;
45
+ id: string;
46
+ createdAt: Date;
47
+ updatedAt: Date;
48
+ title?: string | undefined;
49
+ metadata?: Record<string, any> | undefined;
50
+ }>>;
51
+ messageList: z.ZodType<MessageList, z.ZodTypeDef, MessageList>;
29
52
  tripwire: z.ZodOptional<z.ZodBoolean>;
30
53
  tripwireReason: z.ZodOptional<z.ZodString>;
31
54
  }, "strip", z.ZodTypeAny, {
55
+ messageList: MessageList;
32
56
  threadExists: boolean;
33
- messageList?: any;
34
57
  tripwire?: boolean | undefined;
35
58
  tripwireReason?: string | undefined;
36
- thread?: any;
59
+ thread?: {
60
+ resourceId: string;
61
+ id: string;
62
+ createdAt: Date;
63
+ updatedAt: Date;
64
+ title?: string | undefined;
65
+ metadata?: Record<string, any> | undefined;
66
+ } | undefined;
37
67
  }, {
68
+ messageList: MessageList;
38
69
  threadExists: boolean;
39
- messageList?: any;
40
70
  tripwire?: boolean | undefined;
41
71
  tripwireReason?: string | undefined;
42
- thread?: any;
72
+ thread?: {
73
+ resourceId: string;
74
+ id: string;
75
+ createdAt: Date;
76
+ updatedAt: Date;
77
+ title?: string | undefined;
78
+ metadata?: Record<string, any> | undefined;
79
+ } | undefined;
43
80
  }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>;
44
81
  export {};
45
82
  //# sourceMappingURL=prepare-memory-step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-memory-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/prepare-memory-step.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAG9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAEpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AA2BjD,UAAU,wBAAwB,CAChC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;IAEzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,CAAC;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,uBAAuB,CACrC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,KAAK,EACL,cAAc,EACd,YAAY,EACZ,YAAY,EACZ,MAAM,GACP,EAAE,wBAAwB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;gHAuN1C"}
1
+ {"version":3,"file":"prepare-memory-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/prepare-memory-step.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAE9D,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAClD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,EAAE,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{ RuntimeContext } from '../../../runtime-context/index.js';
6
6
  import type { OutputSchema } from '../../../stream/base/schema.js';
7
7
  import type { InnerAgentExecutionOptions } from '../../agent.types.js';
8
- import type { AgentCapabilities } from './types.js';
8
+ import type { AgentCapabilities } from './schema.js';
9
9
  interface PrepareToolsStepOptions<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
10
10
  capabilities: AgentCapabilities;
11
11
  options: InnerAgentExecutionOptions<OUTPUT, FORMAT>;
@@ -20,12 +20,52 @@ interface PrepareToolsStepOptions<OUTPUT extends OutputSchema | undefined = unde
20
20
  format?: FORMAT;
21
21
  memory?: MastraMemory;
22
22
  }
23
- export declare function createPrepareToolsStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, agentAISpan, methodType, format, memory, }: PrepareToolsStepOptions<OUTPUT, FORMAT>): import("../../..").Step<"prepare-tools-step", z.ZodAny, z.ZodObject<{
24
- convertedTools: z.ZodRecord<z.ZodString, z.ZodAny>;
23
+ export declare function createPrepareToolsStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, options, threadFromArgs, resourceId, runId, runtimeContext, agentAISpan, methodType, format, memory, }: PrepareToolsStepOptions<OUTPUT, FORMAT>): import("../../..").Step<"prepare-tools-step", z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, z.ZodObject<{
24
+ convertedTools: z.ZodRecord<z.ZodString, z.ZodObject<{
25
+ id: z.ZodOptional<z.ZodString>;
26
+ description: z.ZodOptional<z.ZodString>;
27
+ parameters: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>;
28
+ outputSchema: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>>;
29
+ execute: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodPromise<z.ZodAny>>>;
30
+ type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"function">, z.ZodLiteral<"provider-defined">, z.ZodUndefined]>>;
31
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
32
+ }, "strip", z.ZodTypeAny, {
33
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
34
+ outputSchema?: any;
35
+ type?: "function" | "provider-defined" | undefined;
36
+ id?: string | undefined;
37
+ description?: string | undefined;
38
+ args?: Record<string, any> | undefined;
39
+ parameters?: any;
40
+ }, {
41
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
42
+ outputSchema?: any;
43
+ type?: "function" | "provider-defined" | undefined;
44
+ id?: string | undefined;
45
+ description?: string | undefined;
46
+ args?: Record<string, any> | undefined;
47
+ parameters?: any;
48
+ }>>;
25
49
  }, "strip", z.ZodTypeAny, {
26
- convertedTools: Record<string, any>;
50
+ convertedTools: Record<string, {
51
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
52
+ outputSchema?: any;
53
+ type?: "function" | "provider-defined" | undefined;
54
+ id?: string | undefined;
55
+ description?: string | undefined;
56
+ args?: Record<string, any> | undefined;
57
+ parameters?: any;
58
+ }>;
27
59
  }, {
28
- convertedTools: Record<string, any>;
60
+ convertedTools: Record<string, {
61
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
62
+ outputSchema?: any;
63
+ type?: "function" | "provider-defined" | undefined;
64
+ id?: string | undefined;
65
+ description?: string | undefined;
66
+ args?: Record<string, any> | undefined;
67
+ parameters?: any;
68
+ }>;
29
69
  }>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>;
30
70
  export {};
31
71
  //# sourceMappingURL=prepare-tools-step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-tools-step.d.ts","sourceRoot":"","sources":["../../../../src/ag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AAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,KAAK,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,GACP,EAAE,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;gHA6CzC"}
1
+ {"version":3,"file":"prepare-tools-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/prepare-tools-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,qBAAqB,CAAC;AAC9D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC;AAC/D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AACpE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAGlD,UAAU,uBAAuB,CAC/B,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;IAEzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,OAAO,EAAE,0BAA0B,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IACpD,cAAc,CAAC,EAAE,CAAC,OAAO,CAAC,iBAAiB,CAAC,GAAG;QAAE,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC,GAAG,SAAS,CAAC;IAC3E,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,cAAc,EAAE,cAAc,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;IAC1C,UAAU,EAAE,UAAU,GAAG,QAAQ,GAAG,aAAa,GAAG,eAAe,CAAC;IACpE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,YAAY,CAAC;CACvB;AAED,wBAAgB,sBAAsB,CACpC,MAAM,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACnD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,EACzD,EACA,YAAY,EACZ,OAAO,EACP,cAAc,EACd,UAAU,EACV,KAAK,EACL,cAAc,EACd,WAAW,EACX,UAAU,EACV,MAAM,EACN,MAAM,GACP,EAAE,uBAAuB,CAAC,MAAM,EAAE,MAAM,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;gHA2CzC"}
@@ -0,0 +1,177 @@
1
+ import { z } from 'zod';
2
+ import type { MastraBase } from '../../../base.js';
3
+ import type { MastraLLMVNext } from '../../../llm/model/model.loop.js';
4
+ import type { Mastra } from '../../../mastra/index.js';
5
+ import type { OutputProcessor } from '../../../processors/index.js';
6
+ import type { DynamicArgument } from '../../../types.js';
7
+ import type { Agent } from '../../agent.js';
8
+ import { MessageList } from '../../message-list/index.js';
9
+ import type { AgentExecuteOnFinishOptions } from '../../types.js';
10
+ export type AgentCapabilities = {
11
+ agentName: string;
12
+ logger: MastraBase['logger'];
13
+ getMemory: Agent['getMemory'];
14
+ getModel: Agent['getModel'];
15
+ generateMessageId: Mastra['generateId'];
16
+ _agentNetworkAppend?: boolean;
17
+ saveStepMessages: Agent['saveStepMessages'];
18
+ convertTools: Agent['convertTools'];
19
+ getMemoryMessages: Agent['getMemoryMessages'];
20
+ runInputProcessors: Agent['__runInputProcessors'];
21
+ executeOnFinish: (args: AgentExecuteOnFinishOptions) => Promise<void>;
22
+ outputProcessors?: DynamicArgument<OutputProcessor[]>;
23
+ llm: MastraLLMVNext;
24
+ };
25
+ declare const coreToolSchema: z.ZodObject<{
26
+ id: z.ZodOptional<z.ZodString>;
27
+ description: z.ZodOptional<z.ZodString>;
28
+ parameters: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>;
29
+ outputSchema: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>>;
30
+ execute: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodPromise<z.ZodAny>>>;
31
+ type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"function">, z.ZodLiteral<"provider-defined">, z.ZodUndefined]>>;
32
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
33
+ }, "strip", z.ZodTypeAny, {
34
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
35
+ outputSchema?: any;
36
+ type?: "function" | "provider-defined" | undefined;
37
+ id?: string | undefined;
38
+ description?: string | undefined;
39
+ args?: Record<string, any> | undefined;
40
+ parameters?: any;
41
+ }, {
42
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
43
+ outputSchema?: any;
44
+ type?: "function" | "provider-defined" | undefined;
45
+ id?: string | undefined;
46
+ description?: string | undefined;
47
+ args?: Record<string, any> | undefined;
48
+ parameters?: any;
49
+ }>;
50
+ export type CoreTool = z.infer<typeof coreToolSchema>;
51
+ export declare const storageThreadSchema: z.ZodObject<{
52
+ id: z.ZodString;
53
+ title: z.ZodOptional<z.ZodString>;
54
+ resourceId: z.ZodString;
55
+ createdAt: z.ZodDate;
56
+ updatedAt: z.ZodDate;
57
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
58
+ }, "strip", z.ZodTypeAny, {
59
+ resourceId: string;
60
+ id: string;
61
+ createdAt: Date;
62
+ updatedAt: Date;
63
+ title?: string | undefined;
64
+ metadata?: Record<string, any> | undefined;
65
+ }, {
66
+ resourceId: string;
67
+ id: string;
68
+ createdAt: Date;
69
+ updatedAt: Date;
70
+ title?: string | undefined;
71
+ metadata?: Record<string, any> | undefined;
72
+ }>;
73
+ export declare const prepareToolsStepOutputSchema: z.ZodObject<{
74
+ convertedTools: z.ZodRecord<z.ZodString, z.ZodObject<{
75
+ id: z.ZodOptional<z.ZodString>;
76
+ description: z.ZodOptional<z.ZodString>;
77
+ parameters: z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>;
78
+ outputSchema: z.ZodOptional<z.ZodUnion<[z.ZodRecord<z.ZodString, z.ZodAny>, z.ZodAny]>>;
79
+ execute: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny, z.ZodAny], null>, z.ZodPromise<z.ZodAny>>>;
80
+ type: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<"function">, z.ZodLiteral<"provider-defined">, z.ZodUndefined]>>;
81
+ args: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
82
+ }, "strip", z.ZodTypeAny, {
83
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
84
+ outputSchema?: any;
85
+ type?: "function" | "provider-defined" | undefined;
86
+ id?: string | undefined;
87
+ description?: string | undefined;
88
+ args?: Record<string, any> | undefined;
89
+ parameters?: any;
90
+ }, {
91
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
92
+ outputSchema?: any;
93
+ type?: "function" | "provider-defined" | undefined;
94
+ id?: string | undefined;
95
+ description?: string | undefined;
96
+ args?: Record<string, any> | undefined;
97
+ parameters?: any;
98
+ }>>;
99
+ }, "strip", z.ZodTypeAny, {
100
+ convertedTools: Record<string, {
101
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
102
+ outputSchema?: any;
103
+ type?: "function" | "provider-defined" | undefined;
104
+ id?: string | undefined;
105
+ description?: string | undefined;
106
+ args?: Record<string, any> | undefined;
107
+ parameters?: any;
108
+ }>;
109
+ }, {
110
+ convertedTools: Record<string, {
111
+ execute?: ((args_0: any, args_1: any) => Promise<any>) | undefined;
112
+ outputSchema?: any;
113
+ type?: "function" | "provider-defined" | undefined;
114
+ id?: string | undefined;
115
+ description?: string | undefined;
116
+ args?: Record<string, any> | undefined;
117
+ parameters?: any;
118
+ }>;
119
+ }>;
120
+ export declare const prepareMemoryStepOutputSchema: z.ZodObject<{
121
+ threadExists: z.ZodBoolean;
122
+ thread: z.ZodOptional<z.ZodObject<{
123
+ id: z.ZodString;
124
+ title: z.ZodOptional<z.ZodString>;
125
+ resourceId: z.ZodString;
126
+ createdAt: z.ZodDate;
127
+ updatedAt: z.ZodDate;
128
+ metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodAny>>;
129
+ }, "strip", z.ZodTypeAny, {
130
+ resourceId: string;
131
+ id: string;
132
+ createdAt: Date;
133
+ updatedAt: Date;
134
+ title?: string | undefined;
135
+ metadata?: Record<string, any> | undefined;
136
+ }, {
137
+ resourceId: string;
138
+ id: string;
139
+ createdAt: Date;
140
+ updatedAt: Date;
141
+ title?: string | undefined;
142
+ metadata?: Record<string, any> | undefined;
143
+ }>>;
144
+ messageList: z.ZodType<MessageList, z.ZodTypeDef, MessageList>;
145
+ tripwire: z.ZodOptional<z.ZodBoolean>;
146
+ tripwireReason: z.ZodOptional<z.ZodString>;
147
+ }, "strip", z.ZodTypeAny, {
148
+ messageList: MessageList;
149
+ threadExists: boolean;
150
+ tripwire?: boolean | undefined;
151
+ tripwireReason?: string | undefined;
152
+ thread?: {
153
+ resourceId: string;
154
+ id: string;
155
+ createdAt: Date;
156
+ updatedAt: Date;
157
+ title?: string | undefined;
158
+ metadata?: Record<string, any> | undefined;
159
+ } | undefined;
160
+ }, {
161
+ messageList: MessageList;
162
+ threadExists: boolean;
163
+ tripwire?: boolean | undefined;
164
+ tripwireReason?: string | undefined;
165
+ thread?: {
166
+ resourceId: string;
167
+ id: string;
168
+ createdAt: Date;
169
+ updatedAt: Date;
170
+ title?: string | undefined;
171
+ metadata?: Record<string, any> | undefined;
172
+ } | undefined;
173
+ }>;
174
+ export type PrepareMemoryStepOutput = z.infer<typeof prepareMemoryStepOutputSchema>;
175
+ export type PrepareToolsStepOutput = z.infer<typeof prepareToolsStepOutputSchema>;
176
+ export {};
177
+ //# sourceMappingURL=schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AACpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AAC9C,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACjD,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,aAAa,CAAC;AAE/D,MAAM,MAAM,iBAAiB,GAAG;IAC9B,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IAC7B,SAAS,EAAE,KAAK,CAAC,WAAW,CAAC,CAAC;IAC9B,QAAQ,EAAE,KAAK,CAAC,UAAU,CAAC,CAAC;IAC5B,iBAAiB,EAAE,MAAM,CAAC,YAAY,CAAC,CAAC;IACxC,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,gBAAgB,EAAE,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAC5C,YAAY,EAAE,KAAK,CAAC,cAAc,CAAC,CAAC;IACpC,iBAAiB,EAAE,KAAK,CAAC,mBAAmB,CAAC,CAAC;IAC9C,kBAAkB,EAAE,KAAK,CAAC,sBAAsB,CAAC,CAAC;IAClD,eAAe,EAAE,CAAC,IAAI,EAAE,2BAA2B,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACtE,gBAAgB,CAAC,EAAE,eAAe,CAAC,eAAe,EAAE,CAAC,CAAC;IACtD,GAAG,EAAE,cAAc,CAAC;CACrB,CAAC;AAEF,QAAA,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;EAWlB,CAAC;AAEH,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAEtD,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;;EAO9B,CAAC;AAEH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAEvC,CAAC;AAEH,eAAO,MAAM,6BAA6B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMxC,CAAC;AAEH,MAAM,MAAM,uBAAuB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC;AACpF,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC"}
@@ -1,12 +1,13 @@
1
1
  import { z } from 'zod';
2
+ import { AISDKV5OutputStream, MastraModelOutput } from '../../../stream/index.js';
2
3
  import type { OutputSchema } from '../../../stream/base/schema.js';
3
- import type { AgentCapabilities } from './types.js';
4
- interface StreamStepOptions<_OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
4
+ import type { AgentCapabilities } from './schema.js';
5
+ interface StreamStepOptions<FORMAT extends 'aisdk' | 'mastra' | undefined = undefined> {
5
6
  capabilities: AgentCapabilities;
6
7
  runId: string;
7
8
  returnScorerData?: boolean;
8
9
  format?: FORMAT;
9
10
  }
10
- export declare function createStreamStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, runId, returnScorerData, format }: StreamStepOptions<OUTPUT, FORMAT>): import("../../..").Step<"stream-text-step", z.ZodAny, z.ZodAny, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>;
11
+ export declare function createStreamStep<OUTPUT extends OutputSchema | undefined = undefined, FORMAT extends 'aisdk' | 'mastra' | undefined = undefined>({ capabilities, runId, returnScorerData, format }: StreamStepOptions<FORMAT>): import("../../..").Step<"stream-text-step", z.ZodAny, z.ZodUnion<[z.ZodType<MastraModelOutput<OUTPUT | undefined>, z.ZodTypeDef, MastraModelOutput<OUTPUT | undefined>>, z.ZodType<AISDKV5OutputStream<OUTPUT | undefined>, z.ZodTypeDef, AISDKV5OutputStream<OUTPUT | undefined>>]>, z.ZodType<any, z.ZodTypeDef, any>, z.ZodType<any, z.ZodTypeDef, any>, import("../../..").DefaultEngineType>;
11
12
  export {};
12
13
  //# sourceMappingURL=stream-step.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"stream-step.d.ts","sourceRoot":"","sources":["../../../../src/agent/workflows/prepare-stream/stream-step.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAEhE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAEjD,UAAU,iBAAiB,CACzB,OAAO,SAAS,YAAY,GAAG,SAAS,GAAG,SAAS,EACpD,MAAM,SAAS,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS;IAEzD,YAAY,EAAE,iBAAiB,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,MAAM,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