@mastra/react 0.0.0-refactor-agent-information-for-recomposable-ui-20251112151814 → 0.0.0-safe-stringify-telemetry-20251205024938

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/react.css CHANGED
@@ -1,4 +1,4 @@
1
- /*! tailwindcss v4.1.16 | MIT License | https://tailwindcss.com */
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 {
@@ -2,15 +2,16 @@ import { ModelSettings } from './types';
2
2
  import { UIMessage } from '@ai-sdk/react';
3
3
  import { MastraUIMessage } from '../lib/ai-sdk';
4
4
  import { CoreUserMessage } from '@mastra/core/llm';
5
- import { RequestContext } from '@mastra/core/request-context';
5
+ import { RuntimeContext } from '@mastra/core/runtime-context';
6
6
  import { ChunkType, NetworkChunkType } from '@mastra/core/stream';
7
7
  export interface MastraChatProps {
8
8
  agentId: string;
9
+ resourceId?: string;
9
10
  initializeMessages?: () => MastraUIMessage[];
10
11
  }
11
12
  interface SharedArgs {
12
13
  coreUserMessages: CoreUserMessage[];
13
- requestContext?: RequestContext;
14
+ runtimeContext?: RuntimeContext;
14
15
  threadId?: string;
15
16
  modelSettings?: ModelSettings;
16
17
  signal?: AbortSignal;
@@ -36,7 +37,7 @@ export type StreamArgs = SharedArgs & {
36
37
  export type NetworkArgs = SharedArgs & {
37
38
  onNetworkChunk?: (chunk: NetworkChunkType) => Promise<void>;
38
39
  };
39
- export declare const useChat: ({ agentId, initializeMessages }: MastraChatProps) => {
40
+ export declare const useChat: ({ agentId, resourceId, initializeMessages }: MastraChatProps) => {
40
41
  setMessages: import('react').Dispatch<import('react').SetStateAction<MastraUIMessage[]>>;
41
42
  sendMessage: ({ mode, ...args }: SendMessageArgs) => Promise<void>;
42
43
  isRunning: boolean;
@@ -1,4 +1,5 @@
1
1
  import { UIMessage } from '@ai-sdk/react';
2
+ import { CompleteAttachment } from '@assistant-ui/react';
2
3
  export type MastraUIMessageMetadata = {
3
4
  status?: 'warning' | 'error';
4
5
  } & ({
@@ -19,3 +20,12 @@ export type MastraUIMessageMetadata = {
19
20
  agentInput?: string | object | Array<object>;
20
21
  });
21
22
  export type MastraUIMessage = UIMessage<MastraUIMessageMetadata, any, any>;
23
+ /**
24
+ * Extended type for MastraUIMessage that may include additional properties
25
+ * from different sources (generate, toUIMessage, toNetworkUIMessage)
26
+ */
27
+ export type ExtendedMastraUIMessage = MastraUIMessage & {
28
+ createdAt?: Date;
29
+ metadata?: Record<string, unknown>;
30
+ experimental_attachments?: readonly CompleteAttachment[];
31
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/react",
3
- "version": "0.0.0-refactor-agent-information-for-recomposable-ui-20251112151814",
3
+ "version": "0.0.0-safe-stringify-telemetry-20251205024938",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mastra-ai/mastra.git",
@@ -33,12 +33,13 @@
33
33
  "CHANGELOG.md"
34
34
  ],
35
35
  "dependencies": {
36
+ "@lukeed/uuid": "^2.0.1",
36
37
  "@radix-ui/react-tooltip": "^1.2.7",
37
38
  "hast-util-to-jsx-runtime": "^2.3.6",
38
39
  "lucide-react": "^0.522.0",
39
40
  "shiki": "^1.29.2",
40
41
  "tailwind-merge": "^3.3.1",
41
- "@mastra/client-js": "0.0.0-refactor-agent-information-for-recomposable-ui-20251112151814"
42
+ "@mastra/client-js": "0.0.0-safe-stringify-telemetry-20251205024938"
42
43
  },
43
44
  "peerDependencies": {
44
45
  "react": ">=19.0.0",
@@ -47,8 +48,8 @@
47
48
  "devDependencies": {
48
49
  "@ai-sdk/react": "^2.0.57",
49
50
  "@assistant-ui/react": "^0.10.45",
50
- "@storybook/react-vite": "^9.1.16",
51
- "@tailwindcss/vite": "^4.1.16",
51
+ "@storybook/react-vite": "^9.1.10",
52
+ "@tailwindcss/vite": "^4.1.13",
52
53
  "@types/react": "^19.1.13",
53
54
  "@types/react-dom": "^19.1.9",
54
55
  "@vitejs/plugin-react": "^5.0.4",
@@ -65,15 +66,19 @@
65
66
  "vite": "^7.1.9",
66
67
  "vite-plugin-dts": "^4.5.4",
67
68
  "vitest": "^3.2.4",
68
- "@mastra/core": "0.0.0-refactor-agent-information-for-recomposable-ui-20251112151814"
69
+ "@mastra/core": "0.0.0-safe-stringify-telemetry-20251205024938"
69
70
  },
70
71
  "eslintConfig": {
71
72
  "extends": [
72
73
  "plugin:storybook/recommended"
73
74
  ]
74
75
  },
75
- "engines": {
76
- "node": ">=22.13.0"
76
+ "publishConfig": {
77
+ "access": "public",
78
+ "publish-branch": [
79
+ "main",
80
+ "0.x"
81
+ ]
77
82
  },
78
83
  "scripts": {
79
84
  "build": "vite build",
@@ -1,10 +0,0 @@
1
- import { CoreUserMessage } from '@mastra/core/llm';
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;