@mastra/ai-sdk 1.4.5-alpha.0 → 1.4.7
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/chat-route.d.ts +8 -5
- package/dist/chat-route.d.ts.map +1 -1
- package/dist/index.cjs +4 -7
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +4 -7
- package/dist/index.js.map +1 -1
- package/dist/workflow-route.d.ts.map +1 -1
- package/package.json +12 -12
package/dist/index.js
CHANGED
|
@@ -9,7 +9,7 @@ import { TripWire, MessageList, aiV5ModelMessageToV2PromptMessage } from '@mastr
|
|
|
9
9
|
import { RequestContext } from '@mastra/core/di';
|
|
10
10
|
import { WorkingMemory, MessageHistory, SemanticRecall } from '@mastra/core/processors';
|
|
11
11
|
|
|
12
|
-
// ../../packages/_vendored/ai_v5/dist/chunk-
|
|
12
|
+
// ../../packages/_vendored/ai_v5/dist/chunk-OMTTDYJT.js
|
|
13
13
|
var marker = "vercel.ai.error";
|
|
14
14
|
var symbol = Symbol.for(marker);
|
|
15
15
|
var _a;
|
|
@@ -13862,7 +13862,9 @@ function toAISdkStream(stream, options = {
|
|
|
13862
13862
|
function extractV6NativeApproval(messages) {
|
|
13863
13863
|
const lastAssistantMsg = messages.at(-1);
|
|
13864
13864
|
if (!lastAssistantMsg || lastAssistantMsg.role !== "assistant") return null;
|
|
13865
|
-
|
|
13865
|
+
const parts = lastAssistantMsg.parts ?? [];
|
|
13866
|
+
for (let i = parts.length - 1; i >= 0; i--) {
|
|
13867
|
+
const part = parts[i];
|
|
13866
13868
|
if (!isToolUIPart2(part) || part.state !== "approval-responded") continue;
|
|
13867
13869
|
const lastSep = part.approval.id.lastIndexOf(APPROVAL_ID_SEPARATOR);
|
|
13868
13870
|
if (lastSep === -1) continue;
|
|
@@ -14279,11 +14281,6 @@ function workflowRoute({
|
|
|
14279
14281
|
if (!workflowToUse) {
|
|
14280
14282
|
throw new Error("Workflow ID is required");
|
|
14281
14283
|
}
|
|
14282
|
-
if (contextRequestContext && params.requestContext) {
|
|
14283
|
-
mastra.getLogger()?.warn(
|
|
14284
|
-
`"requestContext" from the request body will be ignored because "requestContext" is already set in the route options.`
|
|
14285
|
-
);
|
|
14286
|
-
}
|
|
14287
14284
|
const handlerOptions = {
|
|
14288
14285
|
mastra,
|
|
14289
14286
|
workflowId: workflowToUse,
|