@mastra/ai-sdk 1.12.0-alpha.1 → 1.12.0
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/chat-route.d.ts +3 -3
- package/dist/convert-streams.d.ts +3 -3
- package/dist/docs/SKILL.md +1 -1
- package/dist/docs/assets/SOURCE_MAP.json +1 -1
- package/dist/helpers.d.ts +2 -2
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/middleware.d.ts +1 -1
- package/dist/public-types.d.ts +3 -3
- package/dist/transformers.d.ts +23 -23
- package/package.json +12 -12
- /package/dist/_types/{@internal_ai-sdk-v5@0.0.95 → @internal_ai-sdk-v5@0.0.96}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-sdk-v5@0.0.95 → @internal_ai-sdk-v5@0.0.96}/package.json +0 -0
- /package/dist/_types/{@internal_ai-v6@0.0.95 → @internal_ai-v6@0.0.96}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-v6@0.0.95 → @internal_ai-v6@0.0.96}/package.json +0 -0
- /package/dist/_types/{@internal_ai-v7@0.0.95 → @internal_ai-v7@0.0.96}/dist/index.d.ts +0 -0
- /package/dist/_types/{@internal_ai-v7@0.0.95 → @internal_ai-v7@0.0.96}/package.json +0 -0
package/dist/middleware.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { LanguageModelV2, LanguageModelV2Middleware } from './_types/@ai-sdk_provider@2.0.5/dist/index.js';
|
|
2
|
-
import type { LanguageModelV3 } from './_types/@internal_ai-v6@0.0.
|
|
2
|
+
import type { LanguageModelV3 } from './_types/@internal_ai-v6@0.0.96/dist/index.js';
|
|
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,6 +1,6 @@
|
|
|
1
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV5, UIMessage as UIMessageV5 } from './_types/@internal_ai-sdk-v5@0.0.
|
|
2
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6 } from './_types/@internal_ai-v6@0.0.
|
|
3
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV7, UIMessage as UIMessageV7 } from './_types/@internal_ai-v7@0.0.
|
|
1
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV5, UIMessage as UIMessageV5 } from './_types/@internal_ai-sdk-v5@0.0.96/dist/index.js';
|
|
2
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6 } from './_types/@internal_ai-v6@0.0.96/dist/index.js';
|
|
3
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV7, UIMessage as UIMessageV7 } from './_types/@internal_ai-v7@0.0.96/dist/index.js';
|
|
4
4
|
/**
|
|
5
5
|
* Adds the run's `traceId` to the options an AI SDK `messageMetadata` callback receives, so the callback can put it
|
|
6
6
|
* in message metadata (e.g. `({ part, traceId }) => (part.type === 'start' ? { traceId } : undefined)`).
|
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@0.0.
|
|
3
|
-
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6, UIMessageStreamOptions as UIMessageStreamOptionsV6 } from './_types/@internal_ai-v6@0.0.
|
|
2
|
+
import type { InferUIMessageChunk, UIMessage, UIMessageStreamOptions } from './_types/@internal_ai-sdk-v5@0.0.96/dist/index.js';
|
|
3
|
+
import type { InferUIMessageChunk as InferUIMessageChunkV6, UIMessage as UIMessageV6, UIMessageStreamOptions as UIMessageStreamOptionsV6 } from './_types/@internal_ai-v6@0.0.96/dist/index.js';
|
|
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';
|
|
@@ -164,7 +164,7 @@ export declare function WorkflowStreamToAISDKTransformer({ includeTextStreamPart
|
|
|
164
164
|
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolNetworkChunkType | ToolWorkflowChunkType | WorkflowDataPart | WorkflowStepDataPart | {
|
|
165
165
|
data?: string;
|
|
166
166
|
type?: 'start' | 'finish';
|
|
167
|
-
} | ChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.
|
|
167
|
+
} | ChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UITools>>>;
|
|
168
168
|
export declare function WorkflowStreamToAISDKV6Transformer({ includeTextStreamParts, sendReasoning, sendSources, }?: {
|
|
169
169
|
includeTextStreamParts?: boolean;
|
|
170
170
|
sendReasoning?: boolean;
|
|
@@ -172,7 +172,7 @@ export declare function WorkflowStreamToAISDKV6Transformer({ includeTextStreamPa
|
|
|
172
172
|
}): TransformStream<ChunkType<any>, ToolAgentChunkType | ToolNetworkChunkType | ToolWorkflowChunkType | WorkflowDataPart | WorkflowStepDataPart | {
|
|
173
173
|
data?: string;
|
|
174
174
|
type?: 'start' | 'finish';
|
|
175
|
-
} | ChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6@0.0.
|
|
175
|
+
} | ChunkType | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UITools>>>;
|
|
176
176
|
export declare function createAgentNetworkToAISDKTransformer<UI_CHUNK>(): TransformStream<NetworkChunkType, UI_CHUNK | DataChunkType | NetworkDataPart | {
|
|
177
177
|
data?: string;
|
|
178
178
|
type?: 'start' | 'finish';
|
|
@@ -180,11 +180,11 @@ export declare function createAgentNetworkToAISDKTransformer<UI_CHUNK>(): Transf
|
|
|
180
180
|
export declare function AgentNetworkToAISDKTransformer(): TransformStream<NetworkChunkType, DataChunkType | NetworkDataPart | {
|
|
181
181
|
data?: string;
|
|
182
182
|
type?: 'start' | 'finish';
|
|
183
|
-
} | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.
|
|
183
|
+
} | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UITools>>>;
|
|
184
184
|
export declare function AgentNetworkToAISDKV6Transformer(): TransformStream<NetworkChunkType, DataChunkType | NetworkDataPart | {
|
|
185
185
|
data?: string;
|
|
186
186
|
type?: 'start' | 'finish';
|
|
187
|
-
} | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6@0.0.
|
|
187
|
+
} | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UITools>>>;
|
|
188
188
|
export declare function createAgentStreamToAISDKTransformer<OUTPUT>(convertMastraChunkToAISDK: ConvertMastraChunkToAISDK, { lastMessageId, sendStart, sendFinish, sendReasoning, sendSources, messageMetadata, onError, includeSubAgentMetadata, }: {
|
|
189
189
|
lastMessageId?: string;
|
|
190
190
|
sendStart?: boolean;
|
|
@@ -222,7 +222,7 @@ export declare function transformAgent<OUTPUT>(payload: ChunkType<OUTPUT>, buffe
|
|
|
222
222
|
export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bufferedWorkflows: Map<string, BufferedWorkflowState>, isNested?: boolean, includeTextStreamParts?: boolean, streamOptions?: {
|
|
223
223
|
sendReasoning?: boolean;
|
|
224
224
|
sendSources?: boolean;
|
|
225
|
-
}, convertMastraChunkToAISDK?: ConvertMastraChunkToAISDK): (ToolAgentChunkType | ToolNetworkChunkType | ToolWorkflowChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.
|
|
225
|
+
}, convertMastraChunkToAISDK?: ConvertMastraChunkToAISDK): (ToolAgentChunkType | ToolNetworkChunkType | ToolWorkflowChunkType | InferUIMessageChunk<UIMessage<unknown, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").UITools>> | InferUIMessageChunkV6<UIMessageV6<unknown, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UIDataTypes, import("./_types/@internal_ai-v6@0.0.96/dist/index.js").UITools>> | undefined)[] | DataChunkType | ToolAgentChunkType | ToolNetworkChunkType | ToolWorkflowChunkType | WorkflowDataPart | {
|
|
226
226
|
type: `data-${string}`;
|
|
227
227
|
id?: string;
|
|
228
228
|
data: unknown;
|
|
@@ -236,7 +236,7 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
236
236
|
toolName: string;
|
|
237
237
|
input: unknown;
|
|
238
238
|
providerExecuted?: boolean;
|
|
239
|
-
providerMetadata?: import("./_types/@internal_ai-sdk-v5@0.0.
|
|
239
|
+
providerMetadata?: import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").ProviderMetadata;
|
|
240
240
|
dynamic?: boolean;
|
|
241
241
|
} | {
|
|
242
242
|
type: 'tool-input-error';
|
|
@@ -244,7 +244,7 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
244
244
|
toolName: string;
|
|
245
245
|
input: unknown;
|
|
246
246
|
providerExecuted?: boolean;
|
|
247
|
-
providerMetadata?: import("./_types/@internal_ai-sdk-v5@0.0.
|
|
247
|
+
providerMetadata?: import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").ProviderMetadata;
|
|
248
248
|
dynamic?: boolean;
|
|
249
249
|
errorText: string;
|
|
250
250
|
} | {
|
|
@@ -280,7 +280,7 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
280
280
|
messageMetadata?: unknown;
|
|
281
281
|
} | {
|
|
282
282
|
type: 'finish';
|
|
283
|
-
finishReason?: import("./_types/@internal_ai-sdk-v5@0.0.
|
|
283
|
+
finishReason?: import("./_types/@internal_ai-sdk-v5@0.0.96/dist/index.js").FinishReason;
|
|
284
284
|
messageMetadata?: unknown;
|
|
285
285
|
} | {
|
|
286
286
|
type: 'abort';
|
|
@@ -290,37 +290,37 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
290
290
|
} | {
|
|
291
291
|
type: 'text-start';
|
|
292
292
|
id: string;
|
|
293
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
293
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
294
294
|
} | {
|
|
295
295
|
type: 'text-delta';
|
|
296
296
|
delta: string;
|
|
297
297
|
id: string;
|
|
298
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
298
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
299
299
|
} | {
|
|
300
300
|
type: 'text-end';
|
|
301
301
|
id: string;
|
|
302
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
302
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
303
303
|
} | {
|
|
304
304
|
type: 'reasoning-start';
|
|
305
305
|
id: string;
|
|
306
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
306
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
307
307
|
} | {
|
|
308
308
|
type: 'reasoning-delta';
|
|
309
309
|
id: string;
|
|
310
310
|
delta: string;
|
|
311
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
311
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
312
312
|
} | {
|
|
313
313
|
type: 'reasoning-end';
|
|
314
314
|
id: string;
|
|
315
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
315
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
316
316
|
} | {
|
|
317
317
|
type: 'tool-input-available';
|
|
318
318
|
toolCallId: string;
|
|
319
319
|
toolName: string;
|
|
320
320
|
input: unknown;
|
|
321
321
|
providerExecuted?: boolean;
|
|
322
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
323
|
-
toolMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
322
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
323
|
+
toolMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").JSONObject;
|
|
324
324
|
dynamic?: boolean;
|
|
325
325
|
title?: string;
|
|
326
326
|
} | {
|
|
@@ -329,8 +329,8 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
329
329
|
toolName: string;
|
|
330
330
|
input: unknown;
|
|
331
331
|
providerExecuted?: boolean;
|
|
332
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
333
|
-
toolMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
332
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
333
|
+
toolMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").JSONObject;
|
|
334
334
|
dynamic?: boolean;
|
|
335
335
|
errorText: string;
|
|
336
336
|
title?: string;
|
|
@@ -349,19 +349,19 @@ export declare function transformWorkflow<OUTPUT>(payload: ChunkType<OUTPUT>, bu
|
|
|
349
349
|
sourceId: string;
|
|
350
350
|
url: string;
|
|
351
351
|
title?: string;
|
|
352
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
352
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
353
353
|
} | {
|
|
354
354
|
type: 'source-document';
|
|
355
355
|
sourceId: string;
|
|
356
356
|
mediaType: string;
|
|
357
357
|
title: string;
|
|
358
358
|
filename?: string;
|
|
359
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
359
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
360
360
|
} | {
|
|
361
361
|
type: 'file';
|
|
362
362
|
url: string;
|
|
363
363
|
mediaType: string;
|
|
364
|
-
providerMetadata?: import("./_types/@internal_ai-v6@0.0.
|
|
364
|
+
providerMetadata?: import("./_types/@internal_ai-v6@0.0.96/dist/index.js").ProviderMetadata;
|
|
365
365
|
} | readonly [WorkflowDataPart, WorkflowStepDataPart] | null | undefined;
|
|
366
366
|
type TransformNetworkResult = InferUIMessageChunk<UIMessage> | NetworkDataPart | DataChunkType | WorkflowStepDataPart;
|
|
367
367
|
export declare function transformNetwork(payload: NetworkChunkType, bufferedNetworks: Map<string, {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/ai-sdk",
|
|
3
|
-
"version": "1.12.0
|
|
3
|
+
"version": "1.12.0",
|
|
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",
|
|
@@ -47,17 +47,17 @@
|
|
|
47
47
|
"typescript": "^7.0.2",
|
|
48
48
|
"vitest": "5.1.0",
|
|
49
49
|
"zod": "^4.6.7",
|
|
50
|
-
"@internal/ai-sdk-v4": "0.0.
|
|
51
|
-
"@internal/ai-sdk-v5": "0.0.
|
|
52
|
-
"@internal/ai-v6": "0.0.
|
|
53
|
-
"@internal/ai-v7": "0.0.
|
|
54
|
-
"@internal/
|
|
55
|
-
"@internal/
|
|
56
|
-
"@internal/
|
|
57
|
-
"@internal/
|
|
58
|
-
"@mastra/core": "1.83.0
|
|
59
|
-
"@mastra/libsql": "1.30.0
|
|
60
|
-
"@mastra/memory": "1.41.1
|
|
50
|
+
"@internal/ai-sdk-v4": "0.0.96",
|
|
51
|
+
"@internal/ai-sdk-v5": "0.0.96",
|
|
52
|
+
"@internal/ai-v6": "0.0.96",
|
|
53
|
+
"@internal/ai-v7": "0.0.96",
|
|
54
|
+
"@internal/llm-recorder": "0.0.85",
|
|
55
|
+
"@internal/lint": "0.0.149",
|
|
56
|
+
"@internal/types-builder": "0.0.124",
|
|
57
|
+
"@internal/test-utils": "0.0.85",
|
|
58
|
+
"@mastra/core": "1.83.0",
|
|
59
|
+
"@mastra/libsql": "1.30.0",
|
|
60
|
+
"@mastra/memory": "1.41.1"
|
|
61
61
|
},
|
|
62
62
|
"keywords": [
|
|
63
63
|
"mastra",
|
/package/dist/_types/{@internal_ai-sdk-v5@0.0.95 → @internal_ai-sdk-v5@0.0.96}/dist/index.d.ts
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|