@mastra/ai-sdk 1.4.3 → 1.4.4
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/CHANGELOG.md +18 -0
- package/dist/_types/@internal_ai-sdk-v5/dist/index.d.ts +4 -159
- package/dist/_types/@internal_ai-v6/dist/index.d.ts +4 -159
- package/dist/_types/@types_json-schema/index.d.ts +749 -0
- package/dist/chat-route.d.ts +2 -2
- package/dist/convert-streams.d.ts +2 -2
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +2 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +2 -2
- package/dist/public-types.d.ts +2 -2
- package/dist/transformers.d.ts +23 -23
- package/package.json +10 -10
package/dist/middleware.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { LanguageModelV2, LanguageModelV2Middleware } from './_types/@ai-sdk_provider/dist/index.
|
|
2
|
-
import type { LanguageModelV3 } from './_types/@internal_ai-v6/dist/index.
|
|
1
|
+
import type { LanguageModelV2, LanguageModelV2Middleware } from './_types/@ai-sdk_provider/dist/index.d.ts';
|
|
2
|
+
import type { LanguageModelV3 } from './_types/@internal_ai-v6/dist/index.d.ts';
|
|
3
3
|
import type { MemoryConfig, SemanticRecall as SemanticRecallConfig } from '@mastra/core/memory';
|
|
4
4
|
import type { InputProcessor, OutputProcessor } from '@mastra/core/processors';
|
|
5
5
|
import type { MemoryStorage } from '@mastra/core/storage';
|
package/dist/public-types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV5, UIMessage as UIMessageV5 } from './_types/@internal_ai-sdk-v5/dist/index.
|
|
2
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6 } from './_types/@internal_ai-v6/dist/index.
|
|
1
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV5, UIMessage as UIMessageV5 } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
|
|
2
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
|
|
3
3
|
export type V5UIMessage = UIMessageV5;
|
|
4
4
|
export type V6UIMessage = UIMessageV6;
|
|
5
5
|
export type SupportedUIMessage = V5UIMessage | V6UIMessage;
|
package/dist/transformers.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { TransformStream } from 'node:stream/web';
|
|
2
|
-
import type { InferUIMessageChunk, UIMessage, UIMessageStreamOptions } from './_types/@internal_ai-sdk-v5/dist/index.
|
|
3
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6, UIMessageStreamOptions as UIMessageStreamOptionsV6 } from './_types/@internal_ai-v6/dist/index.
|
|
2
|
+
import type { InferUIMessageChunk, UIMessage, UIMessageStreamOptions } from './_types/@internal_ai-sdk-v5/dist/index.d.ts';
|
|
3
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6, UIMessageStreamOptions as UIMessageStreamOptionsV6 } from './_types/@internal_ai-v6/dist/index.d.ts';
|
|
4
4
|
import type { LLMStepResult } from '@mastra/core/agent';
|
|
5
5
|
import type { ChunkType, DataChunkType, NetworkChunkType } from '@mastra/core/stream';
|
|
6
6
|
import type { WorkflowRunStatus, WorkflowStepStatus } from '@mastra/core/workflows';
|
|
@@ -100,7 +100,7 @@ export declare function WorkflowStreamToAISDKTransformer({ includeTextStreamPart
|
|
|
100
100
|
includeTextStreamParts?: boolean;
|
|
101
101
|
sendReasoning?: boolean;
|
|
102
102
|
sendSources?: boolean;
|
|
103
|
-
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | WorkflowDataPart | WorkflowStepDataPart | ChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5/dist/index.
|
|
103
|
+
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | WorkflowDataPart | WorkflowStepDataPart | ChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UITools>> | {
|
|
104
104
|
data?: string;
|
|
105
105
|
type?: "start" | "finish";
|
|
106
106
|
}>;
|
|
@@ -108,7 +108,7 @@ export declare function WorkflowStreamToAISDKV6Transformer({ includeTextStreamPa
|
|
|
108
108
|
includeTextStreamParts?: boolean;
|
|
109
109
|
sendReasoning?: boolean;
|
|
110
110
|
sendSources?: boolean;
|
|
111
|
-
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.
|
|
111
|
+
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-v6/dist/index.d.ts").UITools>> | WorkflowDataPart | WorkflowStepDataPart | ChunkType | {
|
|
112
112
|
data?: string;
|
|
113
113
|
type?: "start" | "finish";
|
|
114
114
|
}>;
|
|
@@ -116,11 +116,11 @@ export declare function createAgentNetworkToAISDKTransformer<UI_CHUNK>(): Transf
|
|
|
116
116
|
data?: string;
|
|
117
117
|
type?: "start" | "finish";
|
|
118
118
|
}>;
|
|
119
|
-
export declare function AgentNetworkToAISDKTransformer(): TransformStream<NetworkChunkType, DataChunkType | NetworkDataPart | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5/dist/index.
|
|
119
|
+
export declare function AgentNetworkToAISDKTransformer(): TransformStream<NetworkChunkType, DataChunkType | NetworkDataPart | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UITools>> | {
|
|
120
120
|
data?: string;
|
|
121
121
|
type?: "start" | "finish";
|
|
122
122
|
}>;
|
|
123
|
-
export declare function AgentNetworkToAISDKV6Transformer(): TransformStream<NetworkChunkType, DataChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.
|
|
123
|
+
export declare function AgentNetworkToAISDKV6Transformer(): TransformStream<NetworkChunkType, DataChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-v6/dist/index.d.ts").UITools>> | NetworkDataPart | {
|
|
124
124
|
data?: string;
|
|
125
125
|
type?: "start" | "finish";
|
|
126
126
|
}>;
|
|
@@ -170,7 +170,7 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
170
170
|
toolName: string;
|
|
171
171
|
input: unknown;
|
|
172
172
|
providerExecuted?: boolean;
|
|
173
|
-
providerMetadata?: import("./_types/@internal_ai-sdk-v5/dist/index.
|
|
173
|
+
providerMetadata?: import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").ProviderMetadata;
|
|
174
174
|
dynamic?: boolean;
|
|
175
175
|
} | {
|
|
176
176
|
type: "tool-input-error";
|
|
@@ -178,7 +178,7 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
178
178
|
toolName: string;
|
|
179
179
|
input: unknown;
|
|
180
180
|
providerExecuted?: boolean;
|
|
181
|
-
providerMetadata?: import("./_types/@internal_ai-sdk-v5/dist/index.
|
|
181
|
+
providerMetadata?: import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").ProviderMetadata;
|
|
182
182
|
dynamic?: boolean;
|
|
183
183
|
errorText: string;
|
|
184
184
|
} | {
|
|
@@ -213,37 +213,37 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
213
213
|
} | {
|
|
214
214
|
type: "text-start";
|
|
215
215
|
id: string;
|
|
216
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
216
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
217
217
|
} | {
|
|
218
218
|
type: "text-delta";
|
|
219
219
|
delta: string;
|
|
220
220
|
id: string;
|
|
221
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
221
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
222
222
|
} | {
|
|
223
223
|
type: "text-end";
|
|
224
224
|
id: string;
|
|
225
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
225
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
226
226
|
} | {
|
|
227
227
|
type: "reasoning-start";
|
|
228
228
|
id: string;
|
|
229
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
229
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
230
230
|
} | {
|
|
231
231
|
type: "reasoning-delta";
|
|
232
232
|
id: string;
|
|
233
233
|
delta: string;
|
|
234
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
234
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
235
235
|
} | {
|
|
236
236
|
type: "reasoning-end";
|
|
237
237
|
id: string;
|
|
238
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
238
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
239
239
|
} | {
|
|
240
240
|
type: "tool-input-available";
|
|
241
241
|
toolCallId: string;
|
|
242
242
|
toolName: string;
|
|
243
243
|
input: unknown;
|
|
244
244
|
providerExecuted?: boolean;
|
|
245
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
246
|
-
toolMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
245
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
246
|
+
toolMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").JSONObject;
|
|
247
247
|
dynamic?: boolean;
|
|
248
248
|
title?: string;
|
|
249
249
|
} | {
|
|
@@ -252,8 +252,8 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
252
252
|
toolName: string;
|
|
253
253
|
input: unknown;
|
|
254
254
|
providerExecuted?: boolean;
|
|
255
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
256
|
-
toolMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
255
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
256
|
+
toolMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").JSONObject;
|
|
257
257
|
dynamic?: boolean;
|
|
258
258
|
errorText: string;
|
|
259
259
|
title?: string;
|
|
@@ -269,19 +269,19 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
269
269
|
sourceId: string;
|
|
270
270
|
url: string;
|
|
271
271
|
title?: string;
|
|
272
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
272
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
273
273
|
} | {
|
|
274
274
|
type: "source-document";
|
|
275
275
|
sourceId: string;
|
|
276
276
|
mediaType: string;
|
|
277
277
|
title: string;
|
|
278
278
|
filename?: string;
|
|
279
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
279
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
280
280
|
} | {
|
|
281
281
|
type: "file";
|
|
282
282
|
url: string;
|
|
283
283
|
mediaType: string;
|
|
284
|
-
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.
|
|
284
|
+
providerMetadata?: import("./_types/@internal_ai-v6/dist/index.d.ts").ProviderMetadata;
|
|
285
285
|
} | ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | {
|
|
286
286
|
type: `data-${string}`;
|
|
287
287
|
id?: string;
|
|
@@ -296,9 +296,9 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
296
296
|
messageMetadata: unknown;
|
|
297
297
|
} | {
|
|
298
298
|
type: "finish";
|
|
299
|
-
finishReason?: import("./_types/@internal_ai-sdk-v5/dist/index.
|
|
299
|
+
finishReason?: import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").FinishReason;
|
|
300
300
|
messageMetadata?: unknown;
|
|
301
|
-
} | readonly [WorkflowDataPart, WorkflowStepDataPart] | (ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.
|
|
301
|
+
} | readonly [WorkflowDataPart, WorkflowStepDataPart] | (ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-v6/dist/index.d.ts").UITools>> | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UIDataTypes, import("./_types/@internal_ai-sdk-v5/dist/index.d.ts").UITools>> | undefined)[] | {
|
|
302
302
|
id?: string | undefined;
|
|
303
303
|
type: `data-${string}`;
|
|
304
304
|
data: any;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/ai-sdk",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.4",
|
|
4
4
|
"description": "Adds custom API routes to be compatible with the AI SDK UI parts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -45,15 +45,15 @@
|
|
|
45
45
|
"tsup": "^8.5.1",
|
|
46
46
|
"typescript": "^6.0.3",
|
|
47
47
|
"vitest": "4.1.5",
|
|
48
|
-
"zod": "^4.3
|
|
49
|
-
"@internal/ai-sdk-v4": "0.0.
|
|
50
|
-
"@internal/ai-v6": "0.0.
|
|
51
|
-
"@internal/
|
|
52
|
-
"@internal/
|
|
53
|
-
"@internal/lint": "0.0.
|
|
54
|
-
"@mastra/core": "1.
|
|
55
|
-
"@mastra/libsql": "1.
|
|
56
|
-
"@mastra/memory": "1.
|
|
48
|
+
"zod": "^4.4.3",
|
|
49
|
+
"@internal/ai-sdk-v4": "0.0.47",
|
|
50
|
+
"@internal/ai-v6": "0.0.47",
|
|
51
|
+
"@internal/types-builder": "0.0.75",
|
|
52
|
+
"@internal/ai-sdk-v5": "0.0.47",
|
|
53
|
+
"@internal/lint": "0.0.100",
|
|
54
|
+
"@mastra/core": "1.38.0",
|
|
55
|
+
"@mastra/libsql": "1.12.0",
|
|
56
|
+
"@mastra/memory": "1.20.1"
|
|
57
57
|
},
|
|
58
58
|
"keywords": [
|
|
59
59
|
"mastra",
|