@mastra/react 0.0.21-alpha.0 → 0.0.22-alpha.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.
Files changed (2) hide show
  1. package/CHANGELOG.md +39 -0
  2. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,44 @@
1
1
  # @mastra/react-hooks
2
2
 
3
+ ## 0.0.22-alpha.0
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies []:
8
+ - @mastra/client-js@0.16.16-alpha.0
9
+
10
+ ## 0.0.21
11
+
12
+ ### Patch Changes
13
+
14
+ - Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
15
+
16
+ - fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
17
+
18
+ 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.
19
+
20
+ **Backend changes (@mastra/core):**
21
+ - Add assistant messages to messageList immediately after LLM execution
22
+ - Flush messages synchronously before suspension to persist state
23
+ - Create thread if it doesn't exist before flushing
24
+ - Add metadata helpers to persist and remove tool approval state
25
+ - Pass saveQueueManager and memory context through workflow for immediate persistence
26
+
27
+ **Frontend changes (@mastra/react):**
28
+ - Extract runId from pending approvals to enable resumption after refresh
29
+ - Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
30
+ - Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
31
+ - Change runId from hardcoded `agentId` to unique `uuid()`
32
+
33
+ **UI changes (@mastra/playground-ui):**
34
+ - Handle tool calls awaiting approval in message initialization
35
+ - Convert approval metadata format when loading initial messages
36
+
37
+ Fixes #9745, #9906
38
+
39
+ - Updated dependencies []:
40
+ - @mastra/client-js@0.16.15
41
+
3
42
  ## 0.0.21-alpha.0
4
43
 
5
44
  ### 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.22-alpha.0",
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.16-alpha.0"
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.7-alpha.0"
70
70
  },
71
71
  "eslintConfig": {
72
72
  "extends": [