@mastra/react 0.0.0-monorepo-binary-20251013210052 → 0.0.0-partial-response-backport-20251204204441
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 +347 -2
- package/dist/index.cjs +439 -122
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +440 -124
- package/dist/index.js.map +1 -1
- package/dist/react.css +1 -1
- package/dist/src/agent/hooks.d.ts +9 -1
- 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 +17 -0
- package/dist/src/lib/ai-sdk/utils/toUIMessage.test.d.ts +1 -0
- package/package.json +22 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,313 @@
|
|
|
1
1
|
# @mastra/react-hooks
|
|
2
2
|
|
|
3
|
-
## 0.0.0-
|
|
3
|
+
## 0.0.0-partial-response-backport-20251204204441
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`5de72e1`](https://github.com/mastra-ai/mastra/commit/5de72e1a3fa51b860e7e0a606b66cf6f97fc100c), [`2b62302`](https://github.com/mastra-ai/mastra/commit/2b623027a9d65c1dbc963bf651e9e6a9d09da1fa), [`d233ca0`](https://github.com/mastra-ai/mastra/commit/d233ca0939760cbf1f4d2d594a436939124cf10f)]:
|
|
8
|
+
- @mastra/client-js@0.0.0-partial-response-backport-20251204204441
|
|
9
|
+
|
|
10
|
+
## 0.0.22-alpha.0
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Updated dependencies []:
|
|
15
|
+
- @mastra/client-js@0.16.16-alpha.0
|
|
16
|
+
|
|
17
|
+
## 0.0.21
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
|
|
22
|
+
|
|
23
|
+
- fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
|
|
24
|
+
|
|
25
|
+
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.
|
|
26
|
+
|
|
27
|
+
**Backend changes (@mastra/core):**
|
|
28
|
+
- Add assistant messages to messageList immediately after LLM execution
|
|
29
|
+
- Flush messages synchronously before suspension to persist state
|
|
30
|
+
- Create thread if it doesn't exist before flushing
|
|
31
|
+
- Add metadata helpers to persist and remove tool approval state
|
|
32
|
+
- Pass saveQueueManager and memory context through workflow for immediate persistence
|
|
33
|
+
|
|
34
|
+
**Frontend changes (@mastra/react):**
|
|
35
|
+
- Extract runId from pending approvals to enable resumption after refresh
|
|
36
|
+
- Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
|
|
37
|
+
- Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
|
|
38
|
+
- Change runId from hardcoded `agentId` to unique `uuid()`
|
|
39
|
+
|
|
40
|
+
**UI changes (@mastra/playground-ui):**
|
|
41
|
+
- Handle tool calls awaiting approval in message initialization
|
|
42
|
+
- Convert approval metadata format when loading initial messages
|
|
43
|
+
|
|
44
|
+
Fixes #9745, #9906
|
|
45
|
+
|
|
46
|
+
- Updated dependencies []:
|
|
47
|
+
- @mastra/client-js@0.16.15
|
|
48
|
+
|
|
49
|
+
## 0.0.21-alpha.0
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Configurable resourceId in react useChat ([#10561](https://github.com/mastra-ai/mastra/pull/10561))
|
|
54
|
+
|
|
55
|
+
- fix(agent): persist messages before tool suspension ([#10542](https://github.com/mastra-ai/mastra/pull/10542))
|
|
56
|
+
|
|
57
|
+
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.
|
|
58
|
+
|
|
59
|
+
**Backend changes (@mastra/core):**
|
|
60
|
+
- Add assistant messages to messageList immediately after LLM execution
|
|
61
|
+
- Flush messages synchronously before suspension to persist state
|
|
62
|
+
- Create thread if it doesn't exist before flushing
|
|
63
|
+
- Add metadata helpers to persist and remove tool approval state
|
|
64
|
+
- Pass saveQueueManager and memory context through workflow for immediate persistence
|
|
65
|
+
|
|
66
|
+
**Frontend changes (@mastra/react):**
|
|
67
|
+
- Extract runId from pending approvals to enable resumption after refresh
|
|
68
|
+
- Convert `pendingToolApprovals` (DB format) to `requireApprovalMetadata` (runtime format)
|
|
69
|
+
- Handle both `dynamic-tool` and `tool-{NAME}` part types for approval state
|
|
70
|
+
- Change runId from hardcoded `agentId` to unique `uuid()`
|
|
71
|
+
|
|
72
|
+
**UI changes (@mastra/playground-ui):**
|
|
73
|
+
- Handle tool calls awaiting approval in message initialization
|
|
74
|
+
- Convert approval metadata format when loading initial messages
|
|
75
|
+
|
|
76
|
+
Fixes #9745, #9906
|
|
77
|
+
|
|
78
|
+
- Updated dependencies []:
|
|
79
|
+
- @mastra/client-js@0.16.15-alpha.0
|
|
80
|
+
|
|
81
|
+
## 0.0.20
|
|
82
|
+
|
|
83
|
+
### Patch Changes
|
|
84
|
+
|
|
85
|
+
- Updated dependencies []:
|
|
86
|
+
- @mastra/client-js@0.16.14
|
|
87
|
+
|
|
88
|
+
## 0.0.20-alpha.0
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- Updated dependencies []:
|
|
93
|
+
- @mastra/client-js@0.16.14-alpha.0
|
|
94
|
+
|
|
95
|
+
## 0.0.19
|
|
96
|
+
|
|
97
|
+
### Patch Changes
|
|
98
|
+
|
|
99
|
+
- Updated dependencies []:
|
|
100
|
+
- @mastra/client-js@0.16.13
|
|
101
|
+
|
|
102
|
+
## 0.0.19-alpha.0
|
|
103
|
+
|
|
104
|
+
### Patch Changes
|
|
105
|
+
|
|
106
|
+
- Updated dependencies []:
|
|
107
|
+
- @mastra/client-js@0.16.13-alpha.0
|
|
108
|
+
|
|
109
|
+
## 0.0.18
|
|
110
|
+
|
|
111
|
+
### Patch Changes
|
|
112
|
+
|
|
113
|
+
- Updated dependencies [[`91fa2b0`](https://github.com/mastra-ai/mastra/commit/91fa2b0cf077561d835baef8519a1422f1decd55)]:
|
|
114
|
+
- @mastra/client-js@0.16.12
|
|
115
|
+
|
|
116
|
+
## 0.0.18-alpha.0
|
|
117
|
+
|
|
118
|
+
### Patch Changes
|
|
119
|
+
|
|
120
|
+
- Updated dependencies [[`91fa2b0`](https://github.com/mastra-ai/mastra/commit/91fa2b0cf077561d835baef8519a1422f1decd55)]:
|
|
121
|
+
- @mastra/client-js@0.16.12-alpha.0
|
|
122
|
+
|
|
123
|
+
## 0.0.17
|
|
124
|
+
|
|
125
|
+
### Patch Changes
|
|
126
|
+
|
|
127
|
+
- Updated dependencies []:
|
|
128
|
+
- @mastra/client-js@0.16.11
|
|
129
|
+
|
|
130
|
+
## 0.0.17-alpha.0
|
|
131
|
+
|
|
132
|
+
### Patch Changes
|
|
133
|
+
|
|
134
|
+
- Updated dependencies []:
|
|
135
|
+
- @mastra/client-js@0.16.11-alpha.0
|
|
136
|
+
|
|
137
|
+
## 0.0.16
|
|
138
|
+
|
|
139
|
+
### Patch Changes
|
|
140
|
+
|
|
141
|
+
- Updated dependencies [[`082393c`](https://github.com/mastra-ai/mastra/commit/082393c002f3751113a48da28e4c0ed3db9824d7)]:
|
|
142
|
+
- @mastra/client-js@0.16.10
|
|
143
|
+
|
|
144
|
+
## 0.0.16-alpha.0
|
|
145
|
+
|
|
146
|
+
### Patch Changes
|
|
147
|
+
|
|
148
|
+
- Updated dependencies [[`082393c`](https://github.com/mastra-ai/mastra/commit/082393c002f3751113a48da28e4c0ed3db9824d7)]:
|
|
149
|
+
- @mastra/client-js@0.16.10-alpha.0
|
|
150
|
+
|
|
151
|
+
## 0.0.15
|
|
152
|
+
|
|
153
|
+
### Patch Changes
|
|
154
|
+
|
|
155
|
+
- update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
|
|
156
|
+
|
|
157
|
+
- Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`139588d`](https://github.com/mastra-ai/mastra/commit/139588df7755c9111a3060f72a789c1a8c95e091), [`186b29b`](https://github.com/mastra-ai/mastra/commit/186b29bd51ac1dcc24ad3825fdb7207a6d6391a6)]:
|
|
158
|
+
- @mastra/client-js@0.16.9
|
|
159
|
+
|
|
160
|
+
## 0.0.15-alpha.0
|
|
161
|
+
|
|
162
|
+
### Patch Changes
|
|
163
|
+
|
|
164
|
+
- update peerdeps ([`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc))
|
|
165
|
+
|
|
166
|
+
- Updated dependencies [[`5ca1cca`](https://github.com/mastra-ai/mastra/commit/5ca1ccac61ffa7141e6d9fa8f22d3ad4d03bf5dc), [`23c2614`](https://github.com/mastra-ai/mastra/commit/23c26140fdbf04b8c59e8d7d52106d67dad962ec), [`139588d`](https://github.com/mastra-ai/mastra/commit/139588df7755c9111a3060f72a789c1a8c95e091), [`186b29b`](https://github.com/mastra-ai/mastra/commit/186b29bd51ac1dcc24ad3825fdb7207a6d6391a6)]:
|
|
167
|
+
- @mastra/client-js@0.16.9-alpha.0
|
|
168
|
+
|
|
169
|
+
## 0.0.14
|
|
170
|
+
|
|
171
|
+
### Patch Changes
|
|
172
|
+
|
|
173
|
+
- Updated dependencies [[`b55bbce`](https://github.com/mastra-ai/mastra/commit/b55bbce89404d35fdd967012dd503fae343d4c2d), [`e742d37`](https://github.com/mastra-ai/mastra/commit/e742d371f24ef8059670cc05e9aee308eac068b9)]:
|
|
174
|
+
- @mastra/client-js@0.16.8
|
|
175
|
+
|
|
176
|
+
## 0.0.14-alpha.0
|
|
177
|
+
|
|
178
|
+
### Patch Changes
|
|
179
|
+
|
|
180
|
+
- Updated dependencies [[`b55bbce`](https://github.com/mastra-ai/mastra/commit/b55bbce89404d35fdd967012dd503fae343d4c2d), [`e742d37`](https://github.com/mastra-ai/mastra/commit/e742d371f24ef8059670cc05e9aee308eac068b9)]:
|
|
181
|
+
- @mastra/client-js@0.16.8-alpha.0
|
|
182
|
+
|
|
183
|
+
## 0.0.13
|
|
184
|
+
|
|
185
|
+
### Patch Changes
|
|
186
|
+
|
|
187
|
+
- Updated dependencies []:
|
|
188
|
+
- @mastra/client-js@0.16.7
|
|
189
|
+
|
|
190
|
+
## 0.0.13-alpha.1
|
|
191
|
+
|
|
192
|
+
### Patch Changes
|
|
193
|
+
|
|
194
|
+
- Updated dependencies []:
|
|
195
|
+
- @mastra/client-js@0.16.7-alpha.1
|
|
196
|
+
|
|
197
|
+
## 0.0.13-alpha.0
|
|
198
|
+
|
|
199
|
+
### Patch Changes
|
|
200
|
+
|
|
201
|
+
- Updated dependencies []:
|
|
202
|
+
- @mastra/client-js@0.16.7-alpha.0
|
|
203
|
+
|
|
204
|
+
## 0.0.12
|
|
205
|
+
|
|
206
|
+
### Patch Changes
|
|
207
|
+
|
|
208
|
+
- Fix peerdependencies ([`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de))
|
|
209
|
+
|
|
210
|
+
- Updated dependencies [[`eb7c1c8`](https://github.com/mastra-ai/mastra/commit/eb7c1c8c592d8fb16dfd250e337d9cdc73c8d5de)]:
|
|
211
|
+
- @mastra/client-js@0.16.6
|
|
212
|
+
|
|
213
|
+
## 0.0.11
|
|
214
|
+
|
|
215
|
+
### Patch Changes
|
|
216
|
+
|
|
217
|
+
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
218
|
+
|
|
219
|
+
- Updated dependencies [[`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`2060766`](https://github.com/mastra-ai/mastra/commit/20607667bf78ea104cca3e15dfb93ae0b62c9d18)]:
|
|
220
|
+
- @mastra/client-js@0.16.5
|
|
221
|
+
|
|
222
|
+
## 0.0.11-alpha.0
|
|
223
|
+
|
|
224
|
+
### Patch Changes
|
|
225
|
+
|
|
226
|
+
- Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
|
|
227
|
+
|
|
228
|
+
- Updated dependencies [[`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`2060766`](https://github.com/mastra-ai/mastra/commit/20607667bf78ea104cca3e15dfb93ae0b62c9d18)]:
|
|
229
|
+
- @mastra/client-js@0.16.5-alpha.0
|
|
230
|
+
|
|
231
|
+
## 0.0.10
|
|
232
|
+
|
|
233
|
+
### Patch Changes
|
|
234
|
+
|
|
235
|
+
- Updated dependencies []:
|
|
236
|
+
- @mastra/client-js@0.16.4
|
|
237
|
+
|
|
238
|
+
## 0.0.10-alpha.0
|
|
239
|
+
|
|
240
|
+
### Patch Changes
|
|
241
|
+
|
|
242
|
+
- Updated dependencies []:
|
|
243
|
+
- @mastra/client-js@0.16.4-alpha.0
|
|
244
|
+
|
|
245
|
+
## 0.0.9
|
|
246
|
+
|
|
247
|
+
### Patch Changes
|
|
248
|
+
|
|
249
|
+
- Updated dependencies []:
|
|
250
|
+
- @mastra/client-js@0.16.3
|
|
251
|
+
|
|
252
|
+
## 0.0.9-alpha.0
|
|
253
|
+
|
|
254
|
+
### Patch Changes
|
|
255
|
+
|
|
256
|
+
- Updated dependencies []:
|
|
257
|
+
- @mastra/client-js@0.16.3-alpha.0
|
|
258
|
+
|
|
259
|
+
## 0.0.8
|
|
260
|
+
|
|
261
|
+
### Patch Changes
|
|
262
|
+
|
|
263
|
+
- Fix perf issue: removed flush sync ([#9014](https://github.com/mastra-ai/mastra/pull/9014))
|
|
264
|
+
|
|
265
|
+
- Fix tool result in playground ([#9087](https://github.com/mastra-ai/mastra/pull/9087))
|
|
266
|
+
|
|
267
|
+
- Show agent tool output better in playground ([#9021](https://github.com/mastra-ai/mastra/pull/9021))
|
|
268
|
+
|
|
269
|
+
- Updated dependencies []:
|
|
270
|
+
- @mastra/client-js@0.16.2
|
|
271
|
+
|
|
272
|
+
## 0.0.8-alpha.1
|
|
273
|
+
|
|
274
|
+
### Patch Changes
|
|
275
|
+
|
|
276
|
+
- Fix perf issue: removed flush sync ([#9014](https://github.com/mastra-ai/mastra/pull/9014))
|
|
277
|
+
|
|
278
|
+
- Fix tool result in playground ([#9087](https://github.com/mastra-ai/mastra/pull/9087))
|
|
279
|
+
|
|
280
|
+
- Show agent tool output better in playground ([#9021](https://github.com/mastra-ai/mastra/pull/9021))
|
|
281
|
+
|
|
282
|
+
- Updated dependencies []:
|
|
283
|
+
- @mastra/client-js@0.16.2-alpha.1
|
|
284
|
+
|
|
285
|
+
## 0.0.8-alpha.0
|
|
286
|
+
|
|
287
|
+
### Patch Changes
|
|
288
|
+
|
|
289
|
+
- Updated dependencies []:
|
|
290
|
+
- @mastra/client-js@0.16.2-alpha.0
|
|
291
|
+
|
|
292
|
+
## 0.0.7
|
|
293
|
+
|
|
294
|
+
### Patch Changes
|
|
295
|
+
|
|
296
|
+
- Add @mastra/react to peer deps ([#8857](https://github.com/mastra-ai/mastra/pull/8857))
|
|
297
|
+
|
|
298
|
+
- Updated dependencies []:
|
|
299
|
+
- @mastra/client-js@0.16.1
|
|
300
|
+
|
|
301
|
+
## 0.0.7-alpha.0
|
|
302
|
+
|
|
303
|
+
### Patch Changes
|
|
304
|
+
|
|
305
|
+
- Add @mastra/react to peer deps ([#8857](https://github.com/mastra-ai/mastra/pull/8857))
|
|
306
|
+
|
|
307
|
+
- Updated dependencies []:
|
|
308
|
+
- @mastra/client-js@0.16.1-alpha.0
|
|
309
|
+
|
|
310
|
+
## 0.0.6
|
|
4
311
|
|
|
5
312
|
### Patch Changes
|
|
6
313
|
|
|
@@ -10,14 +317,52 @@
|
|
|
10
317
|
|
|
11
318
|
- Improve the surface API of the react sdk ([#8715](https://github.com/mastra-ai/mastra/pull/8715))
|
|
12
319
|
|
|
320
|
+
- Move react and react-dom deps to peer and dev deps ([#8698](https://github.com/mastra-ai/mastra/pull/8698))
|
|
321
|
+
|
|
13
322
|
- Fix back the tripwire verification inside the new react system ([#8674](https://github.com/mastra-ai/mastra/pull/8674))
|
|
14
323
|
|
|
15
324
|
- handle error case in react sdk ([#8676](https://github.com/mastra-ai/mastra/pull/8676))
|
|
16
325
|
|
|
17
326
|
- fix maxSteps model settings not being passed to generate and stream endpoints ([#8627](https://github.com/mastra-ai/mastra/pull/8627))
|
|
18
327
|
|
|
328
|
+
- Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
329
|
+
|
|
19
330
|
- Updated dependencies [[`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`78cfb6b`](https://github.com/mastra-ai/mastra/commit/78cfb6b66fe88bc848105fccb6459fd75413ec87)]:
|
|
20
|
-
- @mastra/client-js@0.
|
|
331
|
+
- @mastra/client-js@0.16.0
|
|
332
|
+
|
|
333
|
+
## 0.0.6-alpha.4
|
|
334
|
+
|
|
335
|
+
### Patch Changes
|
|
336
|
+
|
|
337
|
+
- Updated dependencies []:
|
|
338
|
+
- @mastra/client-js@0.16.0-alpha.4
|
|
339
|
+
|
|
340
|
+
## 0.0.6-alpha.3
|
|
341
|
+
|
|
342
|
+
### Patch Changes
|
|
343
|
+
|
|
344
|
+
- Updated dependencies []:
|
|
345
|
+
- @mastra/client-js@0.16.0-alpha.3
|
|
346
|
+
|
|
347
|
+
## 0.0.6-alpha.2
|
|
348
|
+
|
|
349
|
+
### Patch Changes
|
|
350
|
+
|
|
351
|
+
- Updated dependencies []:
|
|
352
|
+
- @mastra/client-js@0.16.0-alpha.2
|
|
353
|
+
|
|
354
|
+
## 0.0.6-alpha.1
|
|
355
|
+
|
|
356
|
+
### Patch Changes
|
|
357
|
+
|
|
358
|
+
- Improve the surface API of the react sdk ([#8715](https://github.com/mastra-ai/mastra/pull/8715))
|
|
359
|
+
|
|
360
|
+
- Move react and react-dom deps to peer and dev deps ([#8698](https://github.com/mastra-ai/mastra/pull/8698))
|
|
361
|
+
|
|
362
|
+
- Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
|
|
363
|
+
|
|
364
|
+
- Updated dependencies []:
|
|
365
|
+
- @mastra/client-js@0.16.0-alpha.1
|
|
21
366
|
|
|
22
367
|
## 0.0.6-alpha.0
|
|
23
368
|
|