@mastra/ai-sdk 0.0.0-pgvector-index-fix-20250905222058 → 0.0.0-playground-studio-again-20251114100107
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 +360 -10
- package/README.md +65 -1
- package/dist/chat-route.d.ts +14 -0
- package/dist/chat-route.d.ts.map +1 -0
- package/dist/convert-messages.d.ts +10 -0
- package/dist/convert-messages.d.ts.map +1 -0
- package/dist/convert-streams.d.ts +18 -0
- package/dist/convert-streams.d.ts.map +1 -0
- package/dist/helpers.d.ts +37 -0
- package/dist/helpers.d.ts.map +1 -0
- package/dist/index.cjs +1212 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -16
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1209 -5
- package/dist/index.js.map +1 -1
- package/dist/network-route.d.ts +14 -0
- package/dist/network-route.d.ts.map +1 -0
- package/dist/to-ai-sdk-format.d.ts +16 -0
- package/dist/to-ai-sdk-format.d.ts.map +1 -0
- package/dist/transformers.d.ts +133 -0
- package/dist/transformers.d.ts.map +1 -0
- package/dist/ui.cjs +16 -0
- package/dist/ui.cjs.map +1 -0
- package/dist/ui.d.ts +2 -0
- package/dist/ui.d.ts.map +1 -0
- package/dist/ui.js +13 -0
- package/dist/ui.js.map +1 -0
- package/dist/utils.d.ts +10 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/workflow-route.d.ts +10 -0
- package/dist/workflow-route.d.ts.map +1 -0
- package/package.json +26 -8
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { PartialSchemaOutput, OutputSchema, DataChunkType, ChunkType } from '@mastra/core/stream';
|
|
2
|
+
import type { InferUIMessageChunk, ObjectStreamPart, TextStreamPart, ToolSet, UIMessage } from 'ai';
|
|
3
|
+
export type OutputChunkType<OUTPUT extends OutputSchema = undefined> = TextStreamPart<ToolSet> | ObjectStreamPart<PartialSchemaOutput<OUTPUT>> | undefined;
|
|
4
|
+
export type ToolAgentChunkType = {
|
|
5
|
+
type: 'tool-agent';
|
|
6
|
+
toolCallId: string;
|
|
7
|
+
payload: any;
|
|
8
|
+
};
|
|
9
|
+
export type ToolWorkflowChunkType = {
|
|
10
|
+
type: 'tool-workflow';
|
|
11
|
+
toolCallId: string;
|
|
12
|
+
payload: any;
|
|
13
|
+
};
|
|
14
|
+
export type ToolNetworkChunkType = {
|
|
15
|
+
type: 'tool-network';
|
|
16
|
+
toolCallId: string;
|
|
17
|
+
payload: any;
|
|
18
|
+
};
|
|
19
|
+
export declare function convertMastraChunkToAISDKv5<OUTPUT extends OutputSchema = undefined>({ chunk, mode, }: {
|
|
20
|
+
chunk: ChunkType<OUTPUT>;
|
|
21
|
+
mode?: 'generate' | 'stream';
|
|
22
|
+
}): OutputChunkType<OUTPUT>;
|
|
23
|
+
export declare function convertFullStreamChunkToUIMessageStream<UI_MESSAGE extends UIMessage>({ part, messageMetadataValue, sendReasoning, sendSources, onError, sendStart, sendFinish, responseMessageId, }: {
|
|
24
|
+
part: TextStreamPart<ToolSet> | DataChunkType | {
|
|
25
|
+
type: 'tool-output';
|
|
26
|
+
toolCallId: string;
|
|
27
|
+
output: any;
|
|
28
|
+
};
|
|
29
|
+
messageMetadataValue?: unknown;
|
|
30
|
+
sendReasoning?: boolean;
|
|
31
|
+
sendSources?: boolean;
|
|
32
|
+
onError: (error: unknown) => string;
|
|
33
|
+
sendStart?: boolean;
|
|
34
|
+
sendFinish?: boolean;
|
|
35
|
+
responseMessageId?: string;
|
|
36
|
+
}): InferUIMessageChunk<UI_MESSAGE> | ToolAgentChunkType | ToolWorkflowChunkType | ToolNetworkChunkType | undefined;
|
|
37
|
+
//# sourceMappingURL=helpers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../src/helpers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,YAAY,EAAE,aAAa,EAAE,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