@mastra/react 0.0.0-monorepo-binary-20251013210052 → 0.0.0-sidebar-window-undefined-fix-20251029233656
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 +130 -2
- package/dist/index.cjs +437 -113
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +438 -115
- package/dist/index.js.map +1 -1
- package/dist/react.css +1 -1
- package/dist/src/agent/hooks.d.ts +7 -0
- package/dist/src/agent/types.d.ts +1 -0
- package/dist/src/lib/ai-sdk/index.d.ts +1 -0
- package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.d.ts +10 -0
- package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.test.d.ts +1 -0
- package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.d.ts +1 -0
- package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.test.d.ts +1 -0
- package/dist/src/lib/ai-sdk/types.d.ts +7 -0
- package/dist/src/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.d.ts +10 -0
- package/dist/src/lib/ai-sdk/utils/fromCoreUserMessageToUIMessage.test.d.ts +1 -0
- package/dist/src/lib/ai-sdk/utils/toUIMessage.test.d.ts +1 -0
- package/package.json +14 -9
package/dist/react.css
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! tailwindcss v4.1.
|
|
1
|
+
/*! tailwindcss v4.1.15 | MIT License | https://tailwindcss.com */
|
|
2
2
|
@layer properties {
|
|
3
3
|
@supports (((-webkit-hyphens: none)) and (not (margin-trim: inline))) or ((-moz-orient: inline) and (not (color: rgb(from red r g b)))) {
|
|
4
4
|
*, :before, :after, ::backdrop {
|
|
@@ -41,6 +41,13 @@ export declare const useChat: ({ agentId, initializeMessages }: MastraChatProps)
|
|
|
41
41
|
sendMessage: ({ mode, ...args }: SendMessageArgs) => Promise<void>;
|
|
42
42
|
isRunning: boolean;
|
|
43
43
|
messages: MastraUIMessage[];
|
|
44
|
+
approveToolCall: (toolCallId: string) => Promise<void>;
|
|
45
|
+
declineToolCall: (toolCallId: string) => Promise<void>;
|
|
44
46
|
cancelRun: () => void;
|
|
47
|
+
toolCallApprovals: {
|
|
48
|
+
[toolCallId: string]: {
|
|
49
|
+
status: "approved" | "declined";
|
|
50
|
+
};
|
|
51
|
+
};
|
|
45
52
|
};
|
|
46
53
|
export {};
|
|
@@ -1,2 +1,12 @@
|
|
|
1
1
|
import { MastraUIMessage } from '../types';
|
|
2
|
+
interface ChildMessage {
|
|
3
|
+
type: 'tool' | 'text';
|
|
4
|
+
toolCallId?: string;
|
|
5
|
+
toolName?: string;
|
|
6
|
+
args?: Record<string, unknown>;
|
|
7
|
+
toolOutput?: Record<string, unknown>;
|
|
8
|
+
content?: string;
|
|
9
|
+
}
|
|
2
10
|
export declare const resolveInitialMessages: (messages: MastraUIMessage[]) => MastraUIMessage[];
|
|
11
|
+
export declare const resolveToChildMessages: (messages: MastraUIMessage[]) => ChildMessage[];
|
|
12
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -3,6 +3,7 @@ import { Transformer, TransformerArgs } from './types';
|
|
|
3
3
|
import { MastraUIMessage } from '../types';
|
|
4
4
|
export declare class AISdkNetworkTransformer implements Transformer<NetworkChunkType> {
|
|
5
5
|
transform({ chunk, conversation, metadata }: TransformerArgs<NetworkChunkType>): MastraUIMessage[];
|
|
6
|
+
private handleRoutingAgentConversation;
|
|
6
7
|
private handleAgentConversation;
|
|
7
8
|
private handleWorkflowConversation;
|
|
8
9
|
private handleToolConversation;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -5,6 +5,13 @@ export type MastraUIMessageMetadata = {
|
|
|
5
5
|
mode: 'generate';
|
|
6
6
|
} | {
|
|
7
7
|
mode: 'stream';
|
|
8
|
+
requireApprovalMetadata?: {
|
|
9
|
+
[toolCallId: string]: {
|
|
10
|
+
toolCallId: string;
|
|
11
|
+
toolName: string;
|
|
12
|
+
args: Record<string, any>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
8
15
|
} | {
|
|
9
16
|
mode: 'network';
|
|
10
17
|
from?: 'AGENT' | 'WORKFLOW';
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CoreUserMessage } from '@mastra/core';
|
|
2
|
+
import { MastraUIMessage } from '../types';
|
|
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;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/react",
|
|
3
|
-
"version": "0.0.0-
|
|
3
|
+
"version": "0.0.0-sidebar-window-undefined-fix-20251029233656",
|
|
4
4
|
"repository": {
|
|
5
5
|
"type": "git",
|
|
6
6
|
"url": "git+https://github.com/mastra-ai/mastra.git",
|
|
@@ -36,11 +36,13 @@
|
|
|
36
36
|
"@radix-ui/react-tooltip": "^1.2.7",
|
|
37
37
|
"hast-util-to-jsx-runtime": "^2.3.6",
|
|
38
38
|
"lucide-react": "^0.522.0",
|
|
39
|
-
"react": "^19.1.1",
|
|
40
|
-
"react-dom": "^19.1.1",
|
|
41
39
|
"shiki": "^1.29.2",
|
|
42
40
|
"tailwind-merge": "^3.3.1",
|
|
43
|
-
"@mastra/client-js": "0.0.0-
|
|
41
|
+
"@mastra/client-js": "0.0.0-sidebar-window-undefined-fix-20251029233656"
|
|
42
|
+
},
|
|
43
|
+
"peerDependencies": {
|
|
44
|
+
"react": ">=19.0.0",
|
|
45
|
+
"react-dom": ">=19.0.0"
|
|
44
46
|
},
|
|
45
47
|
"devDependencies": {
|
|
46
48
|
"@ai-sdk/react": "^2.0.57",
|
|
@@ -49,18 +51,21 @@
|
|
|
49
51
|
"@tailwindcss/vite": "^4.1.13",
|
|
50
52
|
"@types/react": "^19.1.13",
|
|
51
53
|
"@types/react-dom": "^19.1.9",
|
|
52
|
-
"@vitejs/plugin-react": "^5.0.
|
|
54
|
+
"@vitejs/plugin-react": "^5.0.4",
|
|
55
|
+
"@vitest/coverage-v8": "3.2.3",
|
|
53
56
|
"@vitest/ui": "^3.2.4",
|
|
54
|
-
"eslint": "^9.
|
|
55
|
-
"eslint-plugin-storybook": "^9.1.
|
|
57
|
+
"eslint": "^9.37.0",
|
|
58
|
+
"eslint-plugin-storybook": "^9.1.12",
|
|
59
|
+
"react": ">=19.0.0",
|
|
60
|
+
"react-dom": ">=19.0.0",
|
|
56
61
|
"rollup-plugin-node-externals": "^8.0.1",
|
|
57
62
|
"storybook": "^9.1.10",
|
|
58
63
|
"tailwindcss": "^4",
|
|
59
64
|
"typescript": "^5.8.3",
|
|
60
|
-
"vite": "^7.1.
|
|
65
|
+
"vite": "^7.1.9",
|
|
61
66
|
"vite-plugin-dts": "^4.5.4",
|
|
62
67
|
"vitest": "^3.2.4",
|
|
63
|
-
"@mastra/core": "0.0.0-
|
|
68
|
+
"@mastra/core": "0.0.0-sidebar-window-undefined-fix-20251029233656"
|
|
64
69
|
},
|
|
65
70
|
"eslintConfig": {
|
|
66
71
|
"extends": [
|