@mastra/react 0.0.0-agent-error-handling-20251023180025

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 (51) hide show
  1. package/CHANGELOG.md +310 -0
  2. package/LICENSE.md +15 -0
  3. package/dist/index.cjs +1758 -0
  4. package/dist/index.cjs.map +1 -0
  5. package/dist/index.d.ts +2 -0
  6. package/dist/index.js +1694 -0
  7. package/dist/index.js.map +1 -0
  8. package/dist/react.css +719 -0
  9. package/dist/src/agent/hooks.d.ts +53 -0
  10. package/dist/src/agent/types.d.ts +16 -0
  11. package/dist/src/index.d.ts +6 -0
  12. package/dist/src/lib/ai-sdk/index.d.ts +4 -0
  13. package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.d.ts +12 -0
  14. package/dist/src/lib/ai-sdk/memory/resolveInitialMessages.test.d.ts +1 -0
  15. package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.d.ts +10 -0
  16. package/dist/src/lib/ai-sdk/transformers/AISdkNetworkTransformer.test.d.ts +1 -0
  17. package/dist/src/lib/ai-sdk/transformers/types.d.ts +10 -0
  18. package/dist/src/lib/ai-sdk/types.d.ts +21 -0
  19. package/dist/src/lib/ai-sdk/utils/toAssistantUIMessage.d.ts +14 -0
  20. package/dist/src/lib/ai-sdk/utils/toAssistantUIMessage.test.d.ts +1 -0
  21. package/dist/src/lib/ai-sdk/utils/toUIMessage.d.ts +17 -0
  22. package/dist/src/lib/ai-sdk/utils/toUIMessage.test.d.ts +1 -0
  23. package/dist/src/mastra-client-context.d.ts +10 -0
  24. package/dist/src/mastra-react-provider.d.ts +4 -0
  25. package/dist/src/ui/Code/Code.d.ts +13 -0
  26. package/dist/src/ui/Code/highlight.d.ts +3 -0
  27. package/dist/src/ui/Code/index.d.ts +1 -0
  28. package/dist/src/ui/Entity/Entity.d.ts +13 -0
  29. package/dist/src/ui/Entity/Entity.stories.d.ts +22 -0
  30. package/dist/src/ui/Entity/Entry.d.ts +9 -0
  31. package/dist/src/ui/Entity/ToolApproval.d.ts +10 -0
  32. package/dist/src/ui/Entity/context.d.ts +10 -0
  33. package/dist/src/ui/Entity/index.d.ts +4 -0
  34. package/dist/src/ui/Entity/types.d.ts +1 -0
  35. package/dist/src/ui/Icon/Icon.d.ts +11 -0
  36. package/dist/src/ui/Icon/index.d.ts +1 -0
  37. package/dist/src/ui/IconButton/IconButton.d.ts +8 -0
  38. package/dist/src/ui/IconButton/IconButton.stories.d.ts +12 -0
  39. package/dist/src/ui/IconButton/index.d.ts +1 -0
  40. package/dist/src/ui/Icons/AgentIcon.d.ts +2 -0
  41. package/dist/src/ui/Icons/ToolsIcon.d.ts +2 -0
  42. package/dist/src/ui/Icons/WorkflowIcon.d.ts +2 -0
  43. package/dist/src/ui/Icons/index.d.ts +3 -0
  44. package/dist/src/ui/Message/Message.d.ts +25 -0
  45. package/dist/src/ui/Message/Message.stories.d.ts +13 -0
  46. package/dist/src/ui/Message/index.d.ts +1 -0
  47. package/dist/src/ui/Tooltip/Tooltip.d.ts +8 -0
  48. package/dist/src/ui/Tooltip/Tooltip.stories.d.ts +12 -0
  49. package/dist/src/ui/Tooltip/index.d.ts +1 -0
  50. package/dist/src/ui/index.d.ts +7 -0
  51. package/package.json +85 -0
package/CHANGELOG.md ADDED
@@ -0,0 +1,310 @@
1
+ # @mastra/react-hooks
2
+
3
+ ## 0.0.0-agent-error-handling-20251023180025
4
+
5
+ ### Patch Changes
6
+
7
+ - Add tool call approval ([#8649](https://github.com/mastra-ai/mastra/pull/8649))
8
+
9
+ - Updated dependencies [[`5df9cce`](https://github.com/mastra-ai/mastra/commit/5df9cce1a753438413f64c11eeef8f845745c2a8), [`149c99e`](https://github.com/mastra-ai/mastra/commit/149c99e55de947e9a4bdaa76bb83dca7f96b61f8)]:
10
+ - @mastra/client-js@0.0.0-agent-error-handling-20251023180025
11
+
12
+ ## 0.0.10
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies []:
17
+ - @mastra/client-js@0.16.4
18
+
19
+ ## 0.0.10-alpha.0
20
+
21
+ ### Patch Changes
22
+
23
+ - Updated dependencies []:
24
+ - @mastra/client-js@0.16.4-alpha.0
25
+
26
+ ## 0.0.9
27
+
28
+ ### Patch Changes
29
+
30
+ - Updated dependencies []:
31
+ - @mastra/client-js@0.16.3
32
+
33
+ ## 0.0.9-alpha.0
34
+
35
+ ### Patch Changes
36
+
37
+ - Updated dependencies []:
38
+ - @mastra/client-js@0.16.3-alpha.0
39
+
40
+ ## 0.0.8
41
+
42
+ ### Patch Changes
43
+
44
+ - Fix perf issue: removed flush sync ([#9014](https://github.com/mastra-ai/mastra/pull/9014))
45
+
46
+ - Fix tool result in playground ([#9087](https://github.com/mastra-ai/mastra/pull/9087))
47
+
48
+ - Show agent tool output better in playground ([#9021](https://github.com/mastra-ai/mastra/pull/9021))
49
+
50
+ - Updated dependencies []:
51
+ - @mastra/client-js@0.16.2
52
+
53
+ ## 0.0.8-alpha.1
54
+
55
+ ### Patch Changes
56
+
57
+ - Fix perf issue: removed flush sync ([#9014](https://github.com/mastra-ai/mastra/pull/9014))
58
+
59
+ - Fix tool result in playground ([#9087](https://github.com/mastra-ai/mastra/pull/9087))
60
+
61
+ - Show agent tool output better in playground ([#9021](https://github.com/mastra-ai/mastra/pull/9021))
62
+
63
+ - Updated dependencies []:
64
+ - @mastra/client-js@0.16.2-alpha.1
65
+
66
+ ## 0.0.8-alpha.0
67
+
68
+ ### Patch Changes
69
+
70
+ - Updated dependencies []:
71
+ - @mastra/client-js@0.16.2-alpha.0
72
+
73
+ ## 0.0.7
74
+
75
+ ### Patch Changes
76
+
77
+ - Add @mastra/react to peer deps ([#8857](https://github.com/mastra-ai/mastra/pull/8857))
78
+
79
+ - Updated dependencies []:
80
+ - @mastra/client-js@0.16.1
81
+
82
+ ## 0.0.7-alpha.0
83
+
84
+ ### Patch Changes
85
+
86
+ - Add @mastra/react to peer deps ([#8857](https://github.com/mastra-ai/mastra/pull/8857))
87
+
88
+ - Updated dependencies []:
89
+ - @mastra/client-js@0.16.1-alpha.0
90
+
91
+ ## 0.0.6
92
+
93
+ ### Patch Changes
94
+
95
+ - Gracefully fix errors in react-sdk when error is an object ([#8703](https://github.com/mastra-ai/mastra/pull/8703))
96
+
97
+ - Prepares some basic set of homemade components ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
98
+
99
+ - Improve the surface API of the react sdk ([#8715](https://github.com/mastra-ai/mastra/pull/8715))
100
+
101
+ - Move react and react-dom deps to peer and dev deps ([#8698](https://github.com/mastra-ai/mastra/pull/8698))
102
+
103
+ - Fix back the tripwire verification inside the new react system ([#8674](https://github.com/mastra-ai/mastra/pull/8674))
104
+
105
+ - handle error case in react sdk ([#8676](https://github.com/mastra-ai/mastra/pull/8676))
106
+
107
+ - fix maxSteps model settings not being passed to generate and stream endpoints ([#8627](https://github.com/mastra-ai/mastra/pull/8627))
108
+
109
+ - Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
110
+
111
+ - Updated dependencies [[`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`78cfb6b`](https://github.com/mastra-ai/mastra/commit/78cfb6b66fe88bc848105fccb6459fd75413ec87)]:
112
+ - @mastra/client-js@0.16.0
113
+
114
+ ## 0.0.6-alpha.4
115
+
116
+ ### Patch Changes
117
+
118
+ - Updated dependencies []:
119
+ - @mastra/client-js@0.16.0-alpha.4
120
+
121
+ ## 0.0.6-alpha.3
122
+
123
+ ### Patch Changes
124
+
125
+ - Updated dependencies []:
126
+ - @mastra/client-js@0.16.0-alpha.3
127
+
128
+ ## 0.0.6-alpha.2
129
+
130
+ ### Patch Changes
131
+
132
+ - Updated dependencies []:
133
+ - @mastra/client-js@0.16.0-alpha.2
134
+
135
+ ## 0.0.6-alpha.1
136
+
137
+ ### Patch Changes
138
+
139
+ - Improve the surface API of the react sdk ([#8715](https://github.com/mastra-ai/mastra/pull/8715))
140
+
141
+ - Move react and react-dom deps to peer and dev deps ([#8698](https://github.com/mastra-ai/mastra/pull/8698))
142
+
143
+ - Stream finalResult from network loop ([#8795](https://github.com/mastra-ai/mastra/pull/8795))
144
+
145
+ - Updated dependencies []:
146
+ - @mastra/client-js@0.16.0-alpha.1
147
+
148
+ ## 0.0.6-alpha.0
149
+
150
+ ### Patch Changes
151
+
152
+ - Gracefully fix errors in react-sdk when error is an object ([#8703](https://github.com/mastra-ai/mastra/pull/8703))
153
+
154
+ - Prepares some basic set of homemade components ([#8619](https://github.com/mastra-ai/mastra/pull/8619))
155
+
156
+ - Fix back the tripwire verification inside the new react system ([#8674](https://github.com/mastra-ai/mastra/pull/8674))
157
+
158
+ - handle error case in react sdk ([#8676](https://github.com/mastra-ai/mastra/pull/8676))
159
+
160
+ - fix maxSteps model settings not being passed to generate and stream endpoints ([#8627](https://github.com/mastra-ai/mastra/pull/8627))
161
+
162
+ - Updated dependencies [[`7b1ef57`](https://github.com/mastra-ai/mastra/commit/7b1ef57fc071c2aa2a2e32905b18cd88719c5a39), [`78cfb6b`](https://github.com/mastra-ai/mastra/commit/78cfb6b66fe88bc848105fccb6459fd75413ec87)]:
163
+ - @mastra/client-js@0.16.0-alpha.0
164
+
165
+ ## 0.0.5
166
+
167
+ ### Patch Changes
168
+
169
+ - Updated dependencies []:
170
+ - @mastra/client-js@0.15.2
171
+
172
+ ## 0.0.5-alpha.1
173
+
174
+ ### Patch Changes
175
+
176
+ - Updated dependencies []:
177
+ - @mastra/client-js@0.15.2-alpha.1
178
+
179
+ ## 0.0.5-alpha.0
180
+
181
+ ### Patch Changes
182
+
183
+ - Updated dependencies []:
184
+ - @mastra/client-js@0.15.2-alpha.0
185
+
186
+ ## 0.0.4
187
+
188
+ ### Patch Changes
189
+
190
+ - Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
191
+
192
+ - add tripwire reason in playground ([#8568](https://github.com/mastra-ai/mastra/pull/8568))
193
+
194
+ - type fixes and missing changeset ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
195
+
196
+ - Convert WorkflowWatchResult to WorkflowResult in workflow graph ([#8541](https://github.com/mastra-ai/mastra/pull/8541))
197
+
198
+ - Updated dependencies [[`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa)]:
199
+ - @mastra/client-js@0.15.1
200
+
201
+ ## 0.0.4-alpha.4
202
+
203
+ ### Patch Changes
204
+
205
+ - Updated dependencies []:
206
+ - @mastra/client-js@0.15.1-alpha.4
207
+
208
+ ## 0.0.4-alpha.3
209
+
210
+ ### Patch Changes
211
+
212
+ - Updated dependencies []:
213
+ - @mastra/client-js@0.15.1-alpha.3
214
+
215
+ ## 0.0.4-alpha.2
216
+
217
+ ### Patch Changes
218
+
219
+ - Updated dependencies []:
220
+ - @mastra/client-js@0.15.1-alpha.2
221
+
222
+ ## 0.0.4-alpha.1
223
+
224
+ ### Patch Changes
225
+
226
+ - Mutable shared workflow run state ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
227
+
228
+ - add tripwire reason in playground ([#8568](https://github.com/mastra-ai/mastra/pull/8568))
229
+
230
+ - type fixes and missing changeset ([#8545](https://github.com/mastra-ai/mastra/pull/8545))
231
+
232
+ - Convert WorkflowWatchResult to WorkflowResult in workflow graph ([#8541](https://github.com/mastra-ai/mastra/pull/8541))
233
+
234
+ - Updated dependencies [[`4783b30`](https://github.com/mastra-ai/mastra/commit/4783b3063efea887825514b783ba27f67912c26d), [`2aee9e7`](https://github.com/mastra-ai/mastra/commit/2aee9e7d188b8b256a4ddc203ccefb366b4867fa)]:
235
+ - @mastra/client-js@0.15.1-alpha.1
236
+
237
+ ## 0.0.4-alpha.0
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies []:
242
+ - @mastra/client-js@0.15.1-alpha.0
243
+
244
+ ## 0.0.3
245
+
246
+ ### Patch Changes
247
+
248
+ - generateVNext into react SDK + to asistant ui message ([#8345](https://github.com/mastra-ai/mastra/pull/8345))
249
+
250
+ - distinguish between legacy and regular messages in agent chat for useChat usage ([#8409](https://github.com/mastra-ai/mastra/pull/8409))
251
+
252
+ - Updated dependencies [[`d41aee5`](https://github.com/mastra-ai/mastra/commit/d41aee526d124e35f42720a08e64043229193679), [`fbf6e32`](https://github.com/mastra-ai/mastra/commit/fbf6e324946332d0f5ed8930bf9d4d4479cefd7a), [`4753027`](https://github.com/mastra-ai/mastra/commit/4753027ee889288775c6958bdfeda03ff909af67)]:
253
+ - @mastra/client-js@0.15.0
254
+
255
+ ## 0.0.3-alpha.0
256
+
257
+ ### Patch Changes
258
+
259
+ - generateVNext into react SDK + to asistant ui message ([#8345](https://github.com/mastra-ai/mastra/pull/8345))
260
+
261
+ - distinguish between legacy and regular messages in agent chat for useChat usage ([#8409](https://github.com/mastra-ai/mastra/pull/8409))
262
+
263
+ - Updated dependencies [[`d41aee5`](https://github.com/mastra-ai/mastra/commit/d41aee526d124e35f42720a08e64043229193679), [`fbf6e32`](https://github.com/mastra-ai/mastra/commit/fbf6e324946332d0f5ed8930bf9d4d4479cefd7a), [`4753027`](https://github.com/mastra-ai/mastra/commit/4753027ee889288775c6958bdfeda03ff909af67)]:
264
+ - @mastra/client-js@0.15.0-alpha.0
265
+
266
+ ## 0.0.2
267
+
268
+ ### Patch Changes
269
+
270
+ - Updated dependencies []:
271
+ - @mastra/client-js@0.14.1
272
+
273
+ ## 0.0.2-alpha.1
274
+
275
+ ### Patch Changes
276
+
277
+ - Updated dependencies []:
278
+ - @mastra/client-js@0.14.1-alpha.1
279
+
280
+ ## 0.0.2-alpha.0
281
+
282
+ ### Patch Changes
283
+
284
+ - Updated dependencies []:
285
+ - @mastra/client-js@0.14.1-alpha.0
286
+
287
+ ## 0.0.1
288
+
289
+ ### Patch Changes
290
+
291
+ - modify the useMastraChat hook to useChat ([#8265](https://github.com/mastra-ai/mastra/pull/8265))
292
+
293
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67), [`5cb4596`](https://github.com/mastra-ai/mastra/commit/5cb4596c644104ea817bb0c5a07b8b1f8de595a8), [`86be6be`](https://github.com/mastra-ai/mastra/commit/86be6bee7e64b7d828a6b4eec283265c820dfa43), [`57b6dd5`](https://github.com/mastra-ai/mastra/commit/57b6dd50f9e6d92c0ed3e7199e6a92752025e3a1), [`ea8d386`](https://github.com/mastra-ai/mastra/commit/ea8d386cd8c5593664515fd5770c06bf2aa980ef), [`67b0f00`](https://github.com/mastra-ai/mastra/commit/67b0f005b520335c71fb85cbaa25df4ce8484a81), [`6f67656`](https://github.com/mastra-ai/mastra/commit/6f676562276926e2982401574d1e07157579be30)]:
294
+ - @mastra/client-js@0.14.0
295
+
296
+ ## 0.0.1-alpha.1
297
+
298
+ ### Patch Changes
299
+
300
+ - modify the useMastraChat hook to useChat ([#8265](https://github.com/mastra-ai/mastra/pull/8265))
301
+
302
+ - Updated dependencies [[`5cb4596`](https://github.com/mastra-ai/mastra/commit/5cb4596c644104ea817bb0c5a07b8b1f8de595a8), [`86be6be`](https://github.com/mastra-ai/mastra/commit/86be6bee7e64b7d828a6b4eec283265c820dfa43), [`57b6dd5`](https://github.com/mastra-ai/mastra/commit/57b6dd50f9e6d92c0ed3e7199e6a92752025e3a1), [`ea8d386`](https://github.com/mastra-ai/mastra/commit/ea8d386cd8c5593664515fd5770c06bf2aa980ef), [`6f67656`](https://github.com/mastra-ai/mastra/commit/6f676562276926e2982401574d1e07157579be30)]:
303
+ - @mastra/client-js@0.14.0-alpha.1
304
+
305
+ ## 0.0.1-alpha.1
306
+
307
+ ### Patch Changes
308
+
309
+ - Updated dependencies [[`dc099b4`](https://github.com/mastra-ai/mastra/commit/dc099b40fb31147ba3f362f98d991892033c4c67)]:
310
+ - @mastra/client-js@0.14.0-alpha.0
package/LICENSE.md ADDED
@@ -0,0 +1,15 @@
1
+ # Apache License 2.0
2
+
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
+
5
+ Licensed under the Apache License, Version 2.0 (the "License");
6
+ you may not use this file except in compliance with the License.
7
+ You may obtain a copy of the License at
8
+
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
+
11
+ Unless required by applicable law or agreed to in writing, software
12
+ distributed under the License is distributed on an "AS IS" BASIS,
13
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ See the License for the specific language governing permissions and
15
+ limitations under the License.