@mastra/react 0.0.21-alpha.0 → 0.0.21

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.
Files changed (2) hide show
  1. package/CHANGELOG.md +32 -0
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,37 @@
1
1
  # @mastra/react-hooks
2
2
 
3
+ ## 0.0.21
4
+
5
+ ### Patch Changes
6
+
7
+ - Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
8
+
9
+ - fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
10
+
11
+ Fixes issues where thread and messages were not saved before suspension when tools require approval or call suspend() during execution. This caused conversation history to be lost if users refreshed during tool approval or suspension.
12
+
13
+ **Backend changes (@mastra/core):**
14
+ - Add assistant messages to messageList immediately after LLM execution
15
+ - Flush messages synchronously before suspension to persist state
16
+ - Create thread if it doesn't exist before flushing
17
+ - Add metadata helpers to persist and remove tool approval state
18
+ - Pass saveQueueManager and memory context through workflow for immediate persistence
19
+
20
+ **Frontend changes (@mastra/react):**
21
+ - Extract runId from pending approvals to enable resumption after refresh
22
+ - Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
23
+ - Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
24
+ - Change runId from hardcoded `agentId` to unique `uuid()`
25
+
26
+ **UI changes (@mastra/playground-ui):**
27
+ - Handle tool calls awaiting approval in message initialization
28
+ - Convert approval metadata format when loading initial messages
29
+
30
+ Fixes #9745, #9906
31
+
32
+ - Updated dependencies []:
33
+ - @mastra/client-js@0.16.15
34
+
3
35
  ## 0.0.21-alpha.0
4
36
 
5
37
  ### Patch Changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/react",
3
- "version": "0.0.21-alpha.0",
3
+ "version": "0.0.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/mastra-ai/mastra.git",
@@ -39,7 +39,7 @@
39
39
  "lucide-react": "^0.522.0",
40
40
  "shiki": "^1.29.2",
41
41
  "tailwind-merge": "^3.3.1",
42
- "@mastra/client-js": "0.16.15-alpha.0"
42
+ "@mastra/client-js": "0.16.15"
43
43
  },
44
44
  "peerDependencies": {
45
45
  "react": ">=19.0.0",
@@ -66,7 +66,7 @@
66
66
  "vite": "^7.1.9",
67
67
  "vite-plugin-dts": "^4.5.4",
68
68
  "vitest": "^3.2.4",
69
- "@mastra/core": "0.24.6-alpha.0"
69
+ "@mastra/core": "0.24.6"
70
70
  },
71
71
  "eslintConfig": {
72
72
  "extends": [