@mastra/react 0.4.3 → 0.5.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/CHANGELOG.md +128 -0
- package/dist/agent/extractRunIdFromMessages.d.ts +9 -2
- package/dist/agent/extractRunIdFromMessages.d.ts.map +1 -1
- package/dist/agent/hooks.d.ts +9 -11
- package/dist/agent/hooks.d.ts.map +1 -1
- package/dist/agent/types.d.ts +5 -1
- package/dist/agent/types.d.ts.map +1 -1
- package/dist/index.cjs +1342 -1476
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1342 -1476
- package/dist/index.js.map +1 -1
- package/dist/lib/mastra-db/accumulator.d.ts +48 -0
- package/dist/lib/mastra-db/accumulator.d.ts.map +1 -0
- package/dist/lib/mastra-db/formatCompletionFeedback.d.ts.map +1 -0
- package/dist/lib/mastra-db/fromCoreUserMessage.d.ts +11 -0
- package/dist/lib/mastra-db/fromCoreUserMessage.d.ts.map +1 -0
- package/dist/lib/mastra-db/index.d.ts +5 -0
- package/dist/lib/mastra-db/index.d.ts.map +1 -0
- package/dist/lib/mastra-db/types.d.ts +156 -0
- package/dist/lib/mastra-db/types.d.ts.map +1 -0
- package/dist/ui/MessageFactory/MessageFactory.d.ts +22 -0
- package/dist/ui/MessageFactory/MessageFactory.d.ts.map +1 -0
- package/dist/ui/MessageFactory/index.d.ts +3 -0
- package/dist/ui/MessageFactory/index.d.ts.map +1 -0
- package/dist/ui/MessageFactory/types.d.ts +164 -0
- package/dist/ui/MessageFactory/types.d.ts.map +1 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui/index.d.ts.map +1 -1
- package/package.json +6 -10
- package/dist/lib/ai-sdk/index.d.ts +0 -5
- package/dist/lib/ai-sdk/index.d.ts.map +0 -1
- package/dist/lib/ai-sdk/memory/resolveInitialMessages.d.ts +0 -13
- package/dist/lib/ai-sdk/memory/resolveInitialMessages.d.ts.map +0 -1
- package/dist/lib/ai-sdk/transformers/AISdkNetworkTransformer.d.ts +0 -11
- package/dist/lib/ai-sdk/transformers/AISdkNetworkTransformer.d.ts.map +0 -1
- package/dist/lib/ai-sdk/transformers/types.d.ts +0 -11
- package/dist/lib/ai-sdk/transformers/types.d.ts.map +0 -1
- package/dist/lib/ai-sdk/types.d.ts +0 -145
- package/dist/lib/ai-sdk/types.d.ts.map +0 -1
- package/dist/lib/ai-sdk/utils/formatCompletionFeedback.d.ts.map +0 -1
- package/dist/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.d.ts +0 -11
- package/dist/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.d.ts.map +0 -1
- package/dist/lib/ai-sdk/utils/toAssistantUIMessage.d.ts +0 -15
- package/dist/lib/ai-sdk/utils/toAssistantUIMessage.d.ts.map +0 -1
- package/dist/lib/ai-sdk/utils/toUIMessage.d.ts +0 -20
- package/dist/lib/ai-sdk/utils/toUIMessage.d.ts.map +0 -1
- /package/dist/lib/{ai-sdk/utils → mastra-db}/formatCompletionFeedback.d.ts +0 -0
|
@@ -1,145 +0,0 @@
|
|
|
1
|
-
import type { UIMessage } from '@ai-sdk/react';
|
|
2
|
-
import type { CompleteAttachment } from '@assistant-ui/react';
|
|
3
|
-
/**
|
|
4
|
-
* Tripwire metadata included when a processor triggers a tripwire
|
|
5
|
-
*/
|
|
6
|
-
export type TripwireMetadata = {
|
|
7
|
-
/** Whether the agent should retry with feedback */
|
|
8
|
-
retry?: boolean;
|
|
9
|
-
/** Custom metadata from the processor */
|
|
10
|
-
tripwirePayload?: unknown;
|
|
11
|
-
/** ID of the processor that triggered the tripwire */
|
|
12
|
-
processorId?: string;
|
|
13
|
-
};
|
|
14
|
-
export type MastraUIMessageMetadata = {
|
|
15
|
-
status?: 'warning' | 'error' | 'tripwire';
|
|
16
|
-
/** Tripwire-specific metadata when status is 'tripwire' */
|
|
17
|
-
tripwire?: TripwireMetadata;
|
|
18
|
-
} & ({
|
|
19
|
-
mode: 'generate';
|
|
20
|
-
completionResult?: {
|
|
21
|
-
passed: boolean;
|
|
22
|
-
suppressFeedback?: boolean;
|
|
23
|
-
};
|
|
24
|
-
runningBackgroundTasksCount?: number;
|
|
25
|
-
requireApprovalMetadata?: {
|
|
26
|
-
[toolName: string]: {
|
|
27
|
-
toolCallId: string;
|
|
28
|
-
toolName: string;
|
|
29
|
-
args: Record<string, any>;
|
|
30
|
-
runId?: string;
|
|
31
|
-
};
|
|
32
|
-
};
|
|
33
|
-
suspendedTools?: {
|
|
34
|
-
[toolName: string]: {
|
|
35
|
-
toolCallId: string;
|
|
36
|
-
toolName: string;
|
|
37
|
-
args: Record<string, any>;
|
|
38
|
-
suspendPayload: any;
|
|
39
|
-
runId?: string;
|
|
40
|
-
};
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Per-tool-call background-task metadata keyed by `toolCallId`. A single
|
|
44
|
-
* assistant message can carry multiple concurrent background-dispatched
|
|
45
|
-
* tool calls, so timing/ID is stored per call rather than as one value
|
|
46
|
-
* on the message.
|
|
47
|
-
*/
|
|
48
|
-
backgroundTasks?: Record<string, {
|
|
49
|
-
startedAt: Date;
|
|
50
|
-
completedAt?: Date;
|
|
51
|
-
suspendedAt?: Date;
|
|
52
|
-
taskId: string;
|
|
53
|
-
}>;
|
|
54
|
-
} | {
|
|
55
|
-
mode: 'stream';
|
|
56
|
-
completionResult?: {
|
|
57
|
-
passed: boolean;
|
|
58
|
-
suppressFeedback?: boolean;
|
|
59
|
-
};
|
|
60
|
-
runningBackgroundTasksCount?: number;
|
|
61
|
-
requireApprovalMetadata?: {
|
|
62
|
-
[toolName: string]: {
|
|
63
|
-
toolCallId: string;
|
|
64
|
-
toolName: string;
|
|
65
|
-
args: Record<string, any>;
|
|
66
|
-
runId?: string;
|
|
67
|
-
};
|
|
68
|
-
};
|
|
69
|
-
suspendedTools?: {
|
|
70
|
-
[toolName: string]: {
|
|
71
|
-
toolCallId: string;
|
|
72
|
-
toolName: string;
|
|
73
|
-
args: Record<string, any>;
|
|
74
|
-
suspendPayload: any;
|
|
75
|
-
runId?: string;
|
|
76
|
-
};
|
|
77
|
-
};
|
|
78
|
-
/**
|
|
79
|
-
* Per-tool-call background-task metadata keyed by `toolCallId`. A single
|
|
80
|
-
* assistant message can carry multiple concurrent background-dispatched
|
|
81
|
-
* tool calls, so timing/ID is stored per call rather than as one value
|
|
82
|
-
* on the message.
|
|
83
|
-
*/
|
|
84
|
-
backgroundTasks?: Record<string, {
|
|
85
|
-
startedAt: Date;
|
|
86
|
-
completedAt?: Date;
|
|
87
|
-
suspendedAt?: Date;
|
|
88
|
-
taskId: string;
|
|
89
|
-
}>;
|
|
90
|
-
} | {
|
|
91
|
-
mode: 'network';
|
|
92
|
-
from?: 'AGENT' | 'WORKFLOW' | 'TOOL';
|
|
93
|
-
selectionReason?: string;
|
|
94
|
-
agentInput?: string | object | Array<object>;
|
|
95
|
-
hasMoreMessages?: boolean;
|
|
96
|
-
completionResult?: {
|
|
97
|
-
passed: boolean;
|
|
98
|
-
suppressFeedback?: boolean;
|
|
99
|
-
};
|
|
100
|
-
requireApprovalMetadata?: {
|
|
101
|
-
[toolName: string]: {
|
|
102
|
-
toolCallId: string;
|
|
103
|
-
toolName: string;
|
|
104
|
-
args: Record<string, any>;
|
|
105
|
-
runId?: string;
|
|
106
|
-
};
|
|
107
|
-
};
|
|
108
|
-
suspendedTools?: {
|
|
109
|
-
[toolName: string]: {
|
|
110
|
-
toolCallId: string;
|
|
111
|
-
toolName: string;
|
|
112
|
-
args: Record<string, any>;
|
|
113
|
-
suspendPayload: any;
|
|
114
|
-
runId?: string;
|
|
115
|
-
};
|
|
116
|
-
};
|
|
117
|
-
});
|
|
118
|
-
/**
|
|
119
|
-
* Mastra-extended text part with textId for tracking separate text streams.
|
|
120
|
-
*
|
|
121
|
-
* This follows the same pattern as the existing `state` property which is already
|
|
122
|
-
* added to text parts in the codebase. Both `state` and `textId` are Mastra-specific
|
|
123
|
-
* extensions to the standard AI SDK TextUIPart.
|
|
124
|
-
*/
|
|
125
|
-
export type MastraExtendedTextPart = {
|
|
126
|
-
type: 'text';
|
|
127
|
-
text: string;
|
|
128
|
-
/** Unique identifier for this text stream (from chunk.payload.id) */
|
|
129
|
-
textId?: string;
|
|
130
|
-
/** Streaming state - already exists in codebase for text parts */
|
|
131
|
-
state?: 'streaming' | 'done';
|
|
132
|
-
/** Provider-specific metadata */
|
|
133
|
-
providerMetadata?: any;
|
|
134
|
-
};
|
|
135
|
-
export type MastraUIMessage = UIMessage<MastraUIMessageMetadata, any, any>;
|
|
136
|
-
/**
|
|
137
|
-
* Extended type for MastraUIMessage that may include additional properties
|
|
138
|
-
* from different sources (generate, toUIMessage, toNetworkUIMessage)
|
|
139
|
-
*/
|
|
140
|
-
export type ExtendedMastraUIMessage = MastraUIMessage & {
|
|
141
|
-
createdAt?: Date;
|
|
142
|
-
metadata?: Record<string, unknown>;
|
|
143
|
-
experimental_attachments?: readonly CompleteAttachment[];
|
|
144
|
-
};
|
|
145
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/lib/ai-sdk/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE9D;;GAEG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,mDAAmD;IACnD,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,yCAAyC;IACzC,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,sDAAsD;IACtD,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG;IACpC,MAAM,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,UAAU,CAAC;IAC1C,2DAA2D;IAC3D,QAAQ,C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Ac,CAAC,EAAE;QACf,CAAC,QAAQ,EAAE,MAAM,GAAG;YAClB,UAAU,EAAE,MAAM,CAAC;YACnB,QAAQ,EAAE,MAAM,CAAC;YACjB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;YAC1B,cAAc,EAAE,GAAG,CAAC;YACpB,KAAK,CAAC,EAAE,MAAM,CAAC;SAChB,CAAC;KACH,CAAC;CACH,CACJ,CAAC;AAEF;;;;;;GAMG;AACH,MAAM,MAAM,sBAAsB,GAAG;IACnC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,qEAAqE;IACrE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,kEAAkE;IAClE,KAAK,CAAC,EAAE,WAAW,GAAG,MAAM,CAAC;IAC7B,iCAAiC;IACjC,gBAAgB,CAAC,EAAE,GAAG,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,SAAS,CAAC,uBAAuB,EAAE,GAAG,EAAE,GAAG,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,MAAM,uBAAuB,GAAG,eAAe,GAAG;IACtD,SAAS,CAAC,EAAE,IAAI,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACnC,wBAAwB,CAAC,EAAE,SAAS,kBAAkB,EAAE,CAAC;CAC1D,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"formatCompletionFeedback.d.ts","sourceRoot":"","sources":["../../../../src/lib/ai-sdk/utils/formatCompletionFeedback.ts"],"names":[],"mappings":"AAAA,KAAK,sBAAsB,GAAG;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,OAAO,CAAC;IAChB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF,KAAK,gBAAgB,GAAG;IACtB,QAAQ,EAAE,OAAO,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,OAAO,EAAE,sBAAsB,EAAE,CAAC;IAClC,QAAQ,EAAE,OAAO,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;CACvB,CAAC;AAyCF,eAAO,MAAM,wBAAwB,GAAI,QAAQ,gBAAgB,EAAE,qBAAqB,OAAO,KAAG,MAOjG,CAAC;AAEF,eAAO,MAAM,8BAA8B,GAAI,QAAQ,gBAAgB,EAAE,qBAAqB,OAAO,KAAG,MAOvG,CAAC"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { CoreUserMessage } from '@mastra/core/llm';
|
|
2
|
-
import type { MastraUIMessage } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a CoreUserMessage to a MastraUIMessage (UIMessage format).
|
|
5
|
-
*
|
|
6
|
-
* Handles all CoreUserMessage content types:
|
|
7
|
-
* - String content → single text part
|
|
8
|
-
* - Array content with text/image/file parts → corresponding UIMessage parts
|
|
9
|
-
*/
|
|
10
|
-
export declare const fromCoreUserMessageToUIMessage: (coreUserMessage: CoreUserMessage) => MastraUIMessage;
|
|
11
|
-
//# sourceMappingURL=fromCoreUserMessageToUIMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fromCoreUserMessageToUIMessage.d.ts","sourceRoot":"","sources":["../../../../src/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACxD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEhD;;;;;;GAMG;AACH,eAAO,MAAM,8BAA8B,GAAI,iBAAiB,eAAe,KAAG,eAqEjF,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { ThreadMessageLike } from '@assistant-ui/react';
|
|
2
|
-
import type { MastraUIMessage } from '../types.js';
|
|
3
|
-
/**
|
|
4
|
-
* Converts a Mastra UIMessage (from AI SDK) to a ThreadMessageLike format compatible with @assistant-ui/react.
|
|
5
|
-
*
|
|
6
|
-
* This function handles UIMessages from three sources:
|
|
7
|
-
* - agent.generate: Full output with all message parts
|
|
8
|
-
* - toUIMessage: Streaming chunks accumulated into UIMessages
|
|
9
|
-
* - toNetworkUIMessage: Network execution events accumulated into UIMessages
|
|
10
|
-
*
|
|
11
|
-
* @param message - The MastraUIMessage to convert
|
|
12
|
-
* @returns A ThreadMessageLike compatible with @assistant-ui/react
|
|
13
|
-
*/
|
|
14
|
-
export declare const toAssistantUIMessage: (message: MastraUIMessage) => ThreadMessageLike;
|
|
15
|
-
//# sourceMappingURL=toAssistantUIMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toAssistantUIMessage.d.ts","sourceRoot":"","sources":["../../../../src/lib/ai-sdk/utils/toAssistantUIMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAiB,MAAM,qBAAqB,CAAC;AAE5E,OAAO,KAAK,EAA2B,eAAe,EAAE,MAAM,UAAU,CAAC;AASzE;;;;;;;;;;GAUG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,eAAe,KAAG,iBAoN/D,CAAC"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ChunkType } from '@mastra/core/stream';
|
|
2
|
-
import type { WorkflowStreamResult } from '@mastra/core/workflows';
|
|
3
|
-
import type { MastraUIMessage, MastraUIMessageMetadata } from '../types.js';
|
|
4
|
-
type StreamChunk = {
|
|
5
|
-
type: string;
|
|
6
|
-
payload: any;
|
|
7
|
-
runId: string;
|
|
8
|
-
from: 'AGENT' | 'WORKFLOW';
|
|
9
|
-
};
|
|
10
|
-
export declare const markStreamingPartsDone: (message: MastraUIMessage) => MastraUIMessage;
|
|
11
|
-
export declare const finishStreamingAssistantMessage: (conversation: MastraUIMessage[]) => MastraUIMessage[];
|
|
12
|
-
export declare const mapWorkflowStreamChunkToWatchResult: (prev: WorkflowStreamResult<any, any, any, any>, chunk: StreamChunk) => WorkflowStreamResult<any, any, any, any>;
|
|
13
|
-
export interface ToUIMessageArgs {
|
|
14
|
-
chunk: ChunkType;
|
|
15
|
-
conversation: MastraUIMessage[];
|
|
16
|
-
metadata: MastraUIMessageMetadata;
|
|
17
|
-
}
|
|
18
|
-
export declare const toUIMessage: ({ chunk, conversation, metadata }: ToUIMessageArgs) => MastraUIMessage[];
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=toUIMessage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"toUIMessage.d.ts","sourceRoot":"","sources":["../../../../src/lib/ai-sdk/utils/toUIMessage.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkB,SAAS,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,KAAK,EAAE,oBAAoB,EAAc,MAAM,wBAAwB,CAAC;AAC/E,OAAO,KAAK,EAAE,eAAe,EAAE,uBAAuB,EAA0B,MAAM,UAAU,CAAC;AAGjG,KAAK,WAAW,GAAG;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,GAAG,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,OAAO,GAAG,UAAU,CAAC;CAC5B,CAAC;AAEF,eAAO,MAAM,sBAAsB,GAAI,SAAS,eAAe,KAAG,eAehE,CAAC;AAEH,eAAO,MAAM,+BAA+B,GAAI,cAAc,eAAe,EAAE,sBAK9E,CAAC;AAkBF,eAAO,MAAM,mCAAmC,GAC9C,MAAM,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC,EAC9C,OAAO,WAAW,KACjB,oBAAoB,CAAC,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CA0GzC,CAAC;AAmGF,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,SAAS,CAAC;IACjB,YAAY,EAAE,eAAe,EAAE,CAAC;IAChC,QAAQ,EAAE,uBAAuB,CAAC;CACnC;AAED,eAAO,MAAM,WAAW,GAAI,mCAAmC,eAAe,KAAG,eAAe,EAmyB/F,CAAC"}
|
|
File without changes
|