@mastra/ai-sdk 1.12.0-alpha.0 → 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 +14 -14
- package/dist/docs/references/reference-streaming-agents-stream.md +1 -1
- package/dist/helpers.d.ts +4 -3
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.cjs +12 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +12 -5
- 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/index.js
CHANGED
|
@@ -10,7 +10,7 @@ import { ReadableStream as ReadableStream$1, TransformStream as TransformStream$
|
|
|
10
10
|
import { MessageList, TripWire, aiV5ModelMessageToV2PromptMessage } from "@mastra/core/agent";
|
|
11
11
|
import { RequestContext as RequestContext$1 } from "@mastra/core/di";
|
|
12
12
|
import { MessageHistory, SemanticRecall, WorkingMemory } from "@mastra/core/processors";
|
|
13
|
-
// ../../packages/_vendored/ai_v5/dist/dist-
|
|
13
|
+
// ../../packages/_vendored/ai_v5/dist/dist-BESblyT5.js
|
|
14
14
|
var marker$1$4 = "vercel.ai.error";
|
|
15
15
|
var symbol$1$4 = Symbol.for(marker$1$4);
|
|
16
16
|
var _a$1$4;
|
|
@@ -3259,7 +3259,7 @@ function createUIMessageStream$2({ execute, onError = () => "An error occurred."
|
|
|
3259
3259
|
getOutcome: () => outcome
|
|
3260
3260
|
});
|
|
3261
3261
|
}
|
|
3262
|
-
// ../../packages/_vendored/ai_v6/dist/dist-
|
|
3262
|
+
// ../../packages/_vendored/ai_v6/dist/dist-DRzIKDJV.js
|
|
3263
3263
|
var marker$1$2 = "vercel.ai.error";
|
|
3264
3264
|
var symbol$1$2 = Symbol.for(marker$1$2);
|
|
3265
3265
|
var _a$1;
|
|
@@ -6950,7 +6950,7 @@ var doWrap = ({ model, middleware: { transformParams, wrapGenerate, wrapStream,
|
|
|
6950
6950
|
}
|
|
6951
6951
|
};
|
|
6952
6952
|
};
|
|
6953
|
-
// ../../packages/_vendored/ai_v7/dist/dist-
|
|
6953
|
+
// ../../packages/_vendored/ai_v7/dist/dist-MpcKalG3.js
|
|
6954
6954
|
/**
|
|
6955
6955
|
* Symbol used for identifying AI SDK Error instances.
|
|
6956
6956
|
* Enables checking if an error is an instance of AISDKError across package versions.
|
|
@@ -10039,7 +10039,7 @@ function convertBackgroundTaskChunkToDataChunk(chunk) {
|
|
|
10039
10039
|
}
|
|
10040
10040
|
};
|
|
10041
10041
|
}
|
|
10042
|
-
function convertMastraChunkToAISDKBase({ chunk, mode = "stream", normalizeWarnings, normalizeUsage, normalizeFinishReason, includeRawFinishReason = false }) {
|
|
10042
|
+
function convertMastraChunkToAISDKBase({ chunk, mode = "stream", normalizeWarnings, normalizeUsage, normalizeFinishReason, includeRawFinishReason = false, includeToolTitle = false }) {
|
|
10043
10043
|
const displayInputTransform = getTransformedToolPayload(chunk.metadata, "display", "input-available");
|
|
10044
10044
|
const displayInputDeltaTransform = getTransformedToolPayload(chunk.metadata, "display", "input-delta");
|
|
10045
10045
|
const displayOutputTransform = getTransformedToolPayload(chunk.metadata, "display", "output-available");
|
|
@@ -10126,6 +10126,7 @@ function convertMastraChunkToAISDKBase({ chunk, mode = "stream", normalizeWarnin
|
|
|
10126
10126
|
providerMetadata: chunk.payload.providerMetadata,
|
|
10127
10127
|
providerExecuted: chunk.payload.providerExecuted,
|
|
10128
10128
|
toolName: chunk.payload.toolName,
|
|
10129
|
+
...includeToolTitle && chunk.payload.title != null ? { title: chunk.payload.title } : {},
|
|
10129
10130
|
input: hasTransformedToolPayload(displayInputTransform) ? displayInputTransform.transformed : chunk.payload.args,
|
|
10130
10131
|
...chunk.payload.observability ? { observability: chunk.payload.observability } : {},
|
|
10131
10132
|
...chunk.payload.toolMetadata ? { toolMetadata: chunk.payload.toolMetadata } : {}
|
|
@@ -10193,6 +10194,7 @@ function convertMastraChunkToAISDKBase({ chunk, mode = "stream", normalizeWarnin
|
|
|
10193
10194
|
type: "tool-input-start",
|
|
10194
10195
|
id: chunk.payload.toolCallId,
|
|
10195
10196
|
toolName: chunk.payload.toolName,
|
|
10197
|
+
...includeToolTitle && chunk.payload.title != null ? { title: chunk.payload.title } : {},
|
|
10196
10198
|
dynamic: !!chunk.payload.dynamic,
|
|
10197
10199
|
providerMetadata: chunk.payload.providerMetadata,
|
|
10198
10200
|
providerExecuted: chunk.payload.providerExecuted,
|
|
@@ -10385,7 +10387,8 @@ function convertMastraChunkToAISDKv6({ chunk, mode = "stream" }) {
|
|
|
10385
10387
|
normalizeWarnings: normalizeV6Warnings,
|
|
10386
10388
|
normalizeUsage: normalizeV6Usage,
|
|
10387
10389
|
normalizeFinishReason: toAISDKFinishReasonV6,
|
|
10388
|
-
includeRawFinishReason: true
|
|
10390
|
+
includeRawFinishReason: true,
|
|
10391
|
+
includeToolTitle: true
|
|
10389
10392
|
});
|
|
10390
10393
|
}
|
|
10391
10394
|
function createToolOutputAncestryEntry(toolCallId, toolName) {
|
|
@@ -10496,10 +10499,12 @@ function convertFullStreamChunkToUIMessageStream({ part, messageMetadataValue, s
|
|
|
10496
10499
|
return;
|
|
10497
10500
|
case "tool-input-start": {
|
|
10498
10501
|
const toolMetadata = part.toolMetadata;
|
|
10502
|
+
const title = part.title;
|
|
10499
10503
|
return {
|
|
10500
10504
|
type: "tool-input-start",
|
|
10501
10505
|
toolCallId: part.id,
|
|
10502
10506
|
toolName: part.toolName,
|
|
10507
|
+
...title != null ? { title } : {},
|
|
10503
10508
|
...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},
|
|
10504
10509
|
...part.dynamic != null ? { dynamic: part.dynamic } : {},
|
|
10505
10510
|
...toolMetadata != null ? { toolMetadata } : {}
|
|
@@ -10513,10 +10518,12 @@ function convertFullStreamChunkToUIMessageStream({ part, messageMetadataValue, s
|
|
|
10513
10518
|
case "tool-call": {
|
|
10514
10519
|
const observability = part.observability;
|
|
10515
10520
|
const toolMetadata = part.toolMetadata;
|
|
10521
|
+
const title = part.title;
|
|
10516
10522
|
return {
|
|
10517
10523
|
type: "tool-input-available",
|
|
10518
10524
|
toolCallId: part.toolCallId,
|
|
10519
10525
|
toolName: part.toolName,
|
|
10526
|
+
...title != null ? { title } : {},
|
|
10520
10527
|
input: part.input,
|
|
10521
10528
|
...part.providerExecuted != null ? { providerExecuted: part.providerExecuted } : {},
|
|
10522
10529
|
...part.providerMetadata != null ? { providerMetadata: part.providerMetadata } : {},
|