@mastra/client-js 0.0.0-tsconfig-compile-20250703214351 → 0.0.0-update-scorers-api-20250801170445

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 (76) hide show
  1. package/CHANGELOG.md +401 -2
  2. package/LICENSE.md +11 -42
  3. package/README.md +1 -0
  4. package/dist/adapters/agui.d.ts +23 -0
  5. package/dist/adapters/agui.d.ts.map +1 -0
  6. package/dist/client.d.ts +265 -0
  7. package/dist/client.d.ts.map +1 -0
  8. package/dist/example.d.ts +2 -0
  9. package/dist/example.d.ts.map +1 -0
  10. package/dist/index.cjs +269 -67
  11. package/dist/index.cjs.map +1 -0
  12. package/dist/index.d.ts +4 -1164
  13. package/dist/index.d.ts.map +1 -0
  14. package/dist/index.js +268 -66
  15. package/dist/index.js.map +1 -0
  16. package/dist/resources/a2a.d.ts +44 -0
  17. package/dist/resources/a2a.d.ts.map +1 -0
  18. package/dist/resources/agent.d.ts +112 -0
  19. package/dist/resources/agent.d.ts.map +1 -0
  20. package/dist/resources/base.d.ts +13 -0
  21. package/dist/resources/base.d.ts.map +1 -0
  22. package/dist/resources/index.d.ts +11 -0
  23. package/dist/resources/index.d.ts.map +1 -0
  24. package/dist/resources/legacy-workflow.d.ts +87 -0
  25. package/dist/resources/legacy-workflow.d.ts.map +1 -0
  26. package/dist/resources/mcp-tool.d.ts +27 -0
  27. package/dist/resources/mcp-tool.d.ts.map +1 -0
  28. package/dist/resources/memory-thread.d.ts +53 -0
  29. package/dist/resources/memory-thread.d.ts.map +1 -0
  30. package/dist/resources/network-memory-thread.d.ts +47 -0
  31. package/dist/resources/network-memory-thread.d.ts.map +1 -0
  32. package/dist/resources/network.d.ts +30 -0
  33. package/dist/resources/network.d.ts.map +1 -0
  34. package/dist/resources/tool.d.ts +23 -0
  35. package/dist/resources/tool.d.ts.map +1 -0
  36. package/dist/resources/vNextNetwork.d.ts +42 -0
  37. package/dist/resources/vNextNetwork.d.ts.map +1 -0
  38. package/dist/resources/vector.d.ts +48 -0
  39. package/dist/resources/vector.d.ts.map +1 -0
  40. package/dist/resources/workflow.d.ts +154 -0
  41. package/dist/resources/workflow.d.ts.map +1 -0
  42. package/dist/types.d.ts +422 -0
  43. package/dist/types.d.ts.map +1 -0
  44. package/dist/utils/index.d.ts +3 -0
  45. package/dist/utils/index.d.ts.map +1 -0
  46. package/dist/utils/process-client-tools.d.ts +3 -0
  47. package/dist/utils/process-client-tools.d.ts.map +1 -0
  48. package/dist/utils/zod-to-json-schema.d.ts +105 -0
  49. package/dist/utils/zod-to-json-schema.d.ts.map +1 -0
  50. package/integration-tests/agui-adapter.test.ts +122 -0
  51. package/integration-tests/package.json +18 -0
  52. package/integration-tests/src/mastra/index.ts +35 -0
  53. package/integration-tests/vitest.config.ts +9 -0
  54. package/package.json +12 -8
  55. package/src/adapters/agui.test.ts +145 -3
  56. package/src/client.ts +145 -2
  57. package/src/example.ts +45 -17
  58. package/src/index.test.ts +402 -6
  59. package/src/index.ts +1 -0
  60. package/src/resources/agent.ts +46 -24
  61. package/src/resources/base.ts +6 -1
  62. package/src/resources/memory-thread.test.ts +285 -0
  63. package/src/resources/memory-thread.ts +36 -0
  64. package/src/resources/network-memory-thread.test.ts +269 -0
  65. package/src/resources/network-memory-thread.ts +18 -0
  66. package/src/resources/network.ts +4 -3
  67. package/src/resources/vNextNetwork.ts +22 -5
  68. package/src/resources/workflow.ts +17 -3
  69. package/src/types.ts +90 -10
  70. package/src/utils/process-client-tools.ts +1 -1
  71. package/src/v2-messages.test.ts +180 -0
  72. package/tsconfig.build.json +9 -0
  73. package/tsconfig.json +1 -1
  74. package/tsup.config.ts +22 -0
  75. package/.turbo/turbo-build.log +0 -19
  76. package/dist/index.d.cts +0 -1164
package/CHANGELOG.md CHANGED
@@ -1,12 +1,411 @@
1
1
  # @mastra/client-js
2
2
 
3
- ## 0.0.0-tsconfig-compile-20250703214351
3
+ ## 0.0.0-update-scorers-api-20250801170445
4
4
 
5
5
  ### Patch Changes
6
6
 
7
+ - Updated dependencies [c6f12c7]
8
+ - @mastra/core@0.0.0-update-scorers-api-20250801170445
9
+
10
+ ## 0.10.18
11
+
12
+ ### Patch Changes
13
+
14
+ - 6690a16: dependencies updates:
15
+ - Updated dependency [`@ag-ui/client@^0.0.35` ↗︎](https://www.npmjs.com/package/@ag-ui/client/v/0.0.35) (from `^0.0.27`, in `dependencies`)
16
+ - Updated dependencies [33dcb07]
17
+ - Updated dependencies [d0d9500]
18
+ - Updated dependencies [d30b1a0]
19
+ - Updated dependencies [bff87f7]
20
+ - Updated dependencies [b4a8df0]
21
+ - @mastra/core@0.12.1
22
+
23
+ ## 0.10.18-alpha.1
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies [d0d9500]
28
+ - @mastra/core@0.12.1-alpha.1
29
+
30
+ ## 0.10.18-alpha.0
31
+
32
+ ### Patch Changes
33
+
34
+ - 6690a16: dependencies updates:
35
+ - Updated dependency [`@ag-ui/client@^0.0.35` ↗︎](https://www.npmjs.com/package/@ag-ui/client/v/0.0.35) (from `^0.0.27`, in `dependencies`)
36
+ - Updated dependencies [33dcb07]
37
+ - Updated dependencies [d30b1a0]
38
+ - Updated dependencies [bff87f7]
39
+ - Updated dependencies [b4a8df0]
40
+ - @mastra/core@0.12.1-alpha.0
41
+
42
+ ## 0.10.17
43
+
44
+ ### Patch Changes
45
+
46
+ - aa2715b: process stream response error handling
47
+ - 6bd354c: Should not send content type if body instance of FormData
48
+ - cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
49
+ - b641ba3: fix: save score params
50
+ - 9802f42: Added types and tests to ensure client-js and hono endpoints can save memory messages where the input is either a v1 or v2 mastra message
51
+ - 1ac8f6b: deduplicate message
52
+ - b8efbb9: feat: add flexible deleteMessages method to memory API
53
+ - Added `memory.deleteMessages(input)` method that accepts multiple input types:
54
+ - Single message ID as string: `deleteMessages('msg-123')`
55
+ - Array of message IDs: `deleteMessages(['msg-1', 'msg-2'])`
56
+ - Message object with id property: `deleteMessages({ id: 'msg-123' })`
57
+ - Array of message objects: `deleteMessages([{ id: 'msg-1' }, { id: 'msg-2' }])`
58
+ - Implemented in all storage adapters (LibSQL, PostgreSQL, Upstash, InMemory)
59
+ - Added REST API endpoint: `POST /api/memory/messages/delete`
60
+ - Updated client SDK: `thread.deleteMessages()` accepts all input types
61
+ - Updates thread timestamps when messages are deleted
62
+ - Added comprehensive test coverage and documentation
63
+
64
+ - Updated dependencies [510e2c8]
65
+ - Updated dependencies [2f72fb2]
66
+ - Updated dependencies [27cc97a]
67
+ - Updated dependencies [3f89307]
68
+ - Updated dependencies [9eda7d4]
69
+ - Updated dependencies [9d49408]
70
+ - Updated dependencies [41daa63]
71
+ - Updated dependencies [ad0a58b]
72
+ - Updated dependencies [254a36b]
73
+ - Updated dependencies [2ecf658]
74
+ - Updated dependencies [7a7754f]
75
+ - Updated dependencies [fc92d80]
76
+ - Updated dependencies [e0f73c6]
77
+ - Updated dependencies [0b89602]
78
+ - Updated dependencies [4d37822]
79
+ - Updated dependencies [23a6a7c]
80
+ - Updated dependencies [cda801d]
81
+ - Updated dependencies [a77c823]
82
+ - Updated dependencies [ff9c125]
83
+ - Updated dependencies [09bca64]
84
+ - Updated dependencies [b8efbb9]
85
+ - Updated dependencies [71466e7]
86
+ - Updated dependencies [0c99fbe]
87
+ - @mastra/core@0.12.0
88
+
89
+ ## 0.10.17-alpha.5
90
+
91
+ ### Patch Changes
92
+
93
+ - @mastra/core@0.12.0-alpha.5
94
+
95
+ ## 0.10.17-alpha.4
96
+
97
+ ### Patch Changes
98
+
99
+ - Updated dependencies [ad0a58b]
100
+ - @mastra/core@0.12.0-alpha.4
101
+
102
+ ## 0.10.17-alpha.3
103
+
104
+ ### Patch Changes
105
+
106
+ - 9802f42: Added types and tests to ensure client-js and hono endpoints can save memory messages where the input is either a v1 or v2 mastra message
107
+ - 1ac8f6b: deduplicate message
108
+ - @mastra/core@0.12.0-alpha.3
109
+
110
+ ## 0.10.17-alpha.2
111
+
112
+ ### Patch Changes
113
+
114
+ - aa2715b: process stream response error handling
115
+ - b8efbb9: feat: add flexible deleteMessages method to memory API
116
+ - Added `memory.deleteMessages(input)` method that accepts multiple input types:
117
+ - Single message ID as string: `deleteMessages('msg-123')`
118
+ - Array of message IDs: `deleteMessages(['msg-1', 'msg-2'])`
119
+ - Message object with id property: `deleteMessages({ id: 'msg-123' })`
120
+ - Array of message objects: `deleteMessages([{ id: 'msg-1' }, { id: 'msg-2' }])`
121
+ - Implemented in all storage adapters (LibSQL, PostgreSQL, Upstash, InMemory)
122
+ - Added REST API endpoint: `POST /api/memory/messages/delete`
123
+ - Updated client SDK: `thread.deleteMessages()` accepts all input types
124
+ - Updates thread timestamps when messages are deleted
125
+ - Added comprehensive test coverage and documentation
126
+
127
+ - Updated dependencies [27cc97a]
128
+ - Updated dependencies [41daa63]
129
+ - Updated dependencies [254a36b]
130
+ - Updated dependencies [0b89602]
131
+ - Updated dependencies [4d37822]
132
+ - Updated dependencies [ff9c125]
133
+ - Updated dependencies [b8efbb9]
134
+ - Updated dependencies [71466e7]
135
+ - Updated dependencies [0c99fbe]
136
+ - @mastra/core@0.12.0-alpha.2
137
+
138
+ ## 0.10.17-alpha.1
139
+
140
+ ### Patch Changes
141
+
142
+ - cda801d: Added the ability to pass in metadata for UIMessage and MastraMessageV2 in client-js and agent.stream/generate
143
+ - Updated dependencies [e0f73c6]
144
+ - Updated dependencies [cda801d]
145
+ - Updated dependencies [a77c823]
146
+ - @mastra/core@0.12.0-alpha.1
147
+
148
+ ## 0.10.17-alpha.0
149
+
150
+ ### Patch Changes
151
+
152
+ - 6bd354c: Should not send content type if body instance of FormData
153
+ - b641ba3: fix: save score params
154
+ - Updated dependencies [510e2c8]
155
+ - Updated dependencies [2f72fb2]
156
+ - Updated dependencies [3f89307]
157
+ - Updated dependencies [9eda7d4]
158
+ - Updated dependencies [9d49408]
159
+ - Updated dependencies [2ecf658]
160
+ - Updated dependencies [7a7754f]
161
+ - Updated dependencies [fc92d80]
162
+ - Updated dependencies [23a6a7c]
163
+ - Updated dependencies [09bca64]
164
+ - @mastra/core@0.12.0-alpha.0
165
+
166
+ ## 0.10.16
167
+
168
+ ### Patch Changes
169
+
170
+ - @mastra/core@0.11.1
171
+
172
+ ## 0.10.15
173
+
174
+ ### Patch Changes
175
+
176
+ - 4832752: Do not set content-type header when making POST/PUT requests without a body
177
+ - f248d53: Adding `getMessagesPaginated` to the serve, deployer, and client-js
178
+ - 2affc57: Fix output type of network loop
179
+ - 032cb66: ClientJS
180
+ - 7827943: Handle streaming large data
181
+ - 65e3395: Add Scores playground-ui and add scorer hooks
182
+ - 80c2b06: Fix agent chat stop button to cancel stream/generate reqs in the playground
183
+ - 6f6e651: Alias createRun -> createRunAsync to match Mastra Workflow class
184
+ - Updated dependencies [f248d53]
185
+ - Updated dependencies [2affc57]
186
+ - Updated dependencies [66e13e3]
187
+ - Updated dependencies [edd9482]
188
+ - Updated dependencies [18344d7]
189
+ - Updated dependencies [9d372c2]
190
+ - Updated dependencies [40c2525]
191
+ - Updated dependencies [e473f27]
192
+ - Updated dependencies [032cb66]
193
+ - Updated dependencies [703ac71]
194
+ - Updated dependencies [a723d69]
195
+ - Updated dependencies [7827943]
196
+ - Updated dependencies [5889a31]
197
+ - Updated dependencies [bf1e7e7]
198
+ - Updated dependencies [65e3395]
199
+ - Updated dependencies [4933192]
200
+ - Updated dependencies [d1c77a4]
201
+ - Updated dependencies [bea9dd1]
202
+ - Updated dependencies [dcd4802]
203
+ - Updated dependencies [cbddd18]
204
+ - Updated dependencies [7ba91fa]
205
+ - @mastra/core@0.11.0
206
+
207
+ ## 0.10.15-alpha.3
208
+
209
+ ### Patch Changes
210
+
211
+ - @mastra/core@0.11.0-alpha.3
212
+
213
+ ## 0.10.15-alpha.2
214
+
215
+ ### Patch Changes
216
+
217
+ - 4832752: Do not set content-type header when making POST/PUT requests without a body
218
+ - f248d53: Adding `getMessagesPaginated` to the serve, deployer, and client-js
219
+ - 2affc57: Fix output type of network loop
220
+ - 032cb66: ClientJS
221
+ - 65e3395: Add Scores playground-ui and add scorer hooks
222
+ - 80c2b06: Fix agent chat stop button to cancel stream/generate reqs in the playground
223
+ - 6f6e651: Alias createRun -> createRunAsync to match Mastra Workflow class
224
+ - Updated dependencies [f248d53]
225
+ - Updated dependencies [2affc57]
226
+ - Updated dependencies [66e13e3]
227
+ - Updated dependencies [edd9482]
228
+ - Updated dependencies [18344d7]
229
+ - Updated dependencies [9d372c2]
230
+ - Updated dependencies [40c2525]
231
+ - Updated dependencies [e473f27]
232
+ - Updated dependencies [032cb66]
233
+ - Updated dependencies [703ac71]
234
+ - Updated dependencies [a723d69]
235
+ - Updated dependencies [5889a31]
236
+ - Updated dependencies [65e3395]
237
+ - Updated dependencies [4933192]
238
+ - Updated dependencies [d1c77a4]
239
+ - Updated dependencies [bea9dd1]
240
+ - Updated dependencies [dcd4802]
241
+ - Updated dependencies [7ba91fa]
242
+ - @mastra/core@0.11.0-alpha.2
243
+
244
+ ## 0.10.15-alpha.1
245
+
246
+ ### Patch Changes
247
+
248
+ - @mastra/core@0.11.0-alpha.1
249
+
250
+ ## 0.10.15-alpha.0
251
+
252
+ ### Patch Changes
253
+
254
+ - 7827943: Handle streaming large data
255
+ - Updated dependencies [7827943]
256
+ - Updated dependencies [bf1e7e7]
257
+ - Updated dependencies [cbddd18]
258
+ - @mastra/core@0.11.0-alpha.0
259
+
260
+ ## 0.10.14
261
+
262
+ ### Patch Changes
263
+
264
+ - 31f9f6b: Replace crypto randomUUID in client SDK"
265
+ - 1aa60b1: Pipe runtimeContext to vNext network agent stream and generate steps, wire up runtimeContext for vNext Networks in cliet SDK & playground
266
+ - 626b0f4: [Cloud-126] Working Memory Playground - Added working memory to playground to allow users to view/edit working memory
267
+ - Updated dependencies [0b56518]
268
+ - Updated dependencies [db5cc15]
269
+ - Updated dependencies [2ba5b76]
270
+ - Updated dependencies [5237998]
271
+ - Updated dependencies [c3a30de]
272
+ - Updated dependencies [37c1acd]
273
+ - Updated dependencies [1aa60b1]
274
+ - Updated dependencies [89ec9d4]
275
+ - Updated dependencies [cf3a184]
276
+ - Updated dependencies [d6bfd60]
277
+ - Updated dependencies [626b0f4]
278
+ - Updated dependencies [c22a91f]
279
+ - Updated dependencies [f7403ab]
280
+ - Updated dependencies [6c89d7f]
281
+ - @mastra/core@0.10.15
282
+
283
+ ## 0.10.14-alpha.1
284
+
285
+ ### Patch Changes
286
+
287
+ - Updated dependencies [0b56518]
288
+ - Updated dependencies [2ba5b76]
289
+ - Updated dependencies [c3a30de]
290
+ - Updated dependencies [cf3a184]
291
+ - Updated dependencies [d6bfd60]
292
+ - @mastra/core@0.10.15-alpha.1
293
+
294
+ ## 0.10.14-alpha.0
295
+
296
+ ### Patch Changes
297
+
298
+ - 31f9f6b: Replace crypto randomUUID in client SDK"
299
+ - 1aa60b1: Pipe runtimeContext to vNext network agent stream and generate steps, wire up runtimeContext for vNext Networks in cliet SDK & playground
300
+ - 626b0f4: [Cloud-126] Working Memory Playground - Added working memory to playground to allow users to view/edit working memory
301
+ - Updated dependencies [db5cc15]
302
+ - Updated dependencies [5237998]
303
+ - Updated dependencies [37c1acd]
304
+ - Updated dependencies [1aa60b1]
305
+ - Updated dependencies [89ec9d4]
306
+ - Updated dependencies [626b0f4]
307
+ - Updated dependencies [c22a91f]
308
+ - Updated dependencies [f7403ab]
309
+ - Updated dependencies [6c89d7f]
310
+ - @mastra/core@0.10.15-alpha.0
311
+
312
+ ## 0.10.13
313
+
314
+ ### Patch Changes
315
+
316
+ - @mastra/core@0.10.14
317
+
318
+ ## 0.10.11
319
+
320
+ ### Patch Changes
321
+
322
+ - 9468be4: Fix error on agent generate while using antropic
323
+ - 44731a4: Client SDK - Expose processTextStream util for agent textstream with structured output
324
+ - Updated dependencies [b4a9811]
325
+ - Updated dependencies [4d5583d]
326
+ - @mastra/core@0.10.12
327
+
328
+ ## 0.10.11-alpha.1
329
+
330
+ ### Patch Changes
331
+
332
+ - Updated dependencies [4d5583d]
333
+ - @mastra/core@0.10.12-alpha.1
334
+
335
+ ## 0.10.11-alpha.0
336
+
337
+ ### Patch Changes
338
+
339
+ - 9468be4: Fix error on agent generate while using antropic
340
+ - 44731a4: Client SDK - Expose processTextStream util for agent textstream with structured output
341
+ - Updated dependencies [b4a9811]
342
+ - @mastra/core@0.10.12-alpha.0
343
+
344
+ ## 0.10.10
345
+
346
+ ### Patch Changes
347
+
348
+ - 18da791: Add abortSignal to client SDK options
349
+ - Updated dependencies [2873c7f]
350
+ - Updated dependencies [1c1c6a1]
351
+ - Updated dependencies [f8ce2cc]
352
+ - Updated dependencies [8c846b6]
353
+ - Updated dependencies [c7bbf1e]
354
+ - Updated dependencies [8722d53]
355
+ - Updated dependencies [565cc0c]
356
+ - Updated dependencies [b790fd1]
357
+ - Updated dependencies [132027f]
358
+ - Updated dependencies [0c85311]
359
+ - Updated dependencies [d7ed04d]
360
+ - Updated dependencies [cb16baf]
361
+ - Updated dependencies [f36e4f1]
362
+ - Updated dependencies [7f6e403]
363
+ - @mastra/core@0.10.11
364
+
365
+ ## 0.10.10-alpha.4
366
+
367
+ ### Patch Changes
368
+
369
+ - @mastra/core@0.10.11-alpha.4
370
+
371
+ ## 0.10.10-alpha.3
372
+
373
+ ### Patch Changes
374
+
375
+ - Updated dependencies [c7bbf1e]
376
+ - Updated dependencies [8722d53]
377
+ - Updated dependencies [132027f]
378
+ - Updated dependencies [0c85311]
379
+ - Updated dependencies [cb16baf]
380
+ - @mastra/core@0.10.11-alpha.3
381
+
382
+ ## 0.10.10-alpha.2
383
+
384
+ ### Patch Changes
385
+
386
+ - 18da791: Add abortSignal to client SDK options
387
+ - Updated dependencies [2873c7f]
388
+ - Updated dependencies [1c1c6a1]
389
+ - Updated dependencies [565cc0c]
390
+ - @mastra/core@0.10.11-alpha.2
391
+
392
+ ## 0.10.10-alpha.1
393
+
394
+ ### Patch Changes
395
+
396
+ - Updated dependencies [7f6e403]
397
+ - @mastra/core@0.10.11-alpha.1
398
+
399
+ ## 0.10.10-alpha.0
400
+
401
+ ### Patch Changes
402
+
403
+ - Updated dependencies [f8ce2cc]
404
+ - Updated dependencies [8c846b6]
7
405
  - Updated dependencies [b790fd1]
406
+ - Updated dependencies [d7ed04d]
8
407
  - Updated dependencies [f36e4f1]
9
- - @mastra/core@0.0.0-tsconfig-compile-20250703214351
408
+ - @mastra/core@0.10.11-alpha.0
10
409
 
11
410
  ## 0.10.9
12
411
 
package/LICENSE.md CHANGED
@@ -1,46 +1,15 @@
1
- # Elastic License 2.0 (ELv2)
1
+ # Apache License 2.0
2
2
 
3
- Copyright (c) 2025 Mastra AI, Inc.
3
+ Copyright (c) 2025 Kepler Software, Inc.
4
4
 
5
- **Acceptance**
6
- By using the software, you agree to all of the terms and conditions below.
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
7
8
 
8
- **Copyright License**
9
- The licensor grants you a non-exclusive, royalty-free, worldwide, non-sublicensable, non-transferable license to use, copy, distribute, make available, and prepare derivative works of the software, in each case subject to the limitations and conditions below
9
+ http://www.apache.org/licenses/LICENSE-2.0
10
10
 
11
- **Limitations**
12
- You may not provide the software to third parties as a hosted or managed service, where the service provides users with access to any substantial set of the features or functionality of the software.
13
-
14
- You may not move, change, disable, or circumvent the license key functionality in the software, and you may not remove or obscure any functionality in the software that is protected by the license key.
15
-
16
- You may not alter, remove, or obscure any licensing, copyright, or other notices of the licensor in the software. Any use of the licensor’s trademarks is subject to applicable law.
17
-
18
- **Patents**
19
- The licensor grants you a license, under any patent claims the licensor can license, or becomes able to license, to make, have made, use, sell, offer for sale, import and have imported the software, in each case subject to the limitations and conditions in this license. This license does not cover any patent claims that you cause to be infringed by modifications or additions to the software. If you or your company make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
20
-
21
- **Notices**
22
- You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms.
23
-
24
- If you modify the software, you must include in any modified copies of the software prominent notices stating that you have modified the software.
25
-
26
- **No Other Rights**
27
- These terms do not imply any licenses other than those expressly granted in these terms.
28
-
29
- **Termination**
30
- If you use the software in violation of these terms, such use is not licensed, and your licenses will automatically terminate. If the licensor provides you with a notice of your violation, and you cease all violation of this license no later than 30 days after you receive that notice, your licenses will be reinstated retroactively. However, if you violate these terms after such reinstatement, any additional violation of these terms will cause your licenses to terminate automatically and permanently.
31
-
32
- **No Liability**
33
- As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.
34
-
35
- **Definitions**
36
- The _licensor_ is the entity offering these terms, and the _software_ is the software the licensor makes available under these terms, including any portion of it.
37
-
38
- _you_ refers to the individual or entity agreeing to these terms.
39
-
40
- _your company_ is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization. _control_ means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise. Control can be direct or indirect.
41
-
42
- _your licenses_ are all the licenses granted to you for the software under these terms.
43
-
44
- _use_ means anything you do with the software requiring one of your licenses.
45
-
46
- _trademark_ means trademarks, service marks, and similar rights.
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.
package/README.md CHANGED
@@ -80,6 +80,7 @@ const client = new MastraClient({
80
80
  - `getWorkflow(workflowId)`: Get a workflow instance
81
81
  - `workflow.details()`: Get workflow details
82
82
  - `workflow.createRun()`: Create workflow run
83
+ - `workflow.createRunAsync()`: Create workflow run (alias)
83
84
  - `workflow.startAsync(params)`: Execute the workflow and wait for execution results
84
85
  - `workflow.resumeAsync(parmas)`: Resume suspended workflow step async
85
86
  - `workflow.watch({runId},(record)=>{})`: Watch the step transitions of the workflow run
@@ -0,0 +1,23 @@
1
+ import type { AgentConfig, BaseEvent, Message, RunAgentInput } from '@ag-ui/client';
2
+ import { AbstractAgent } from '@ag-ui/client';
3
+ import type { CoreMessage } from '@mastra/core';
4
+ import { Observable } from 'rxjs';
5
+ import type { Agent } from '../resources/agent';
6
+ interface MastraAgentConfig extends AgentConfig {
7
+ agent: Agent;
8
+ agentId: string;
9
+ resourceId?: string;
10
+ }
11
+ export declare class AGUIAdapter extends AbstractAgent {
12
+ agent: Agent;
13
+ resourceId?: string;
14
+ constructor({ agent, agentId, resourceId, ...rest }: MastraAgentConfig);
15
+ protected run(input: RunAgentInput): Observable<BaseEvent>;
16
+ }
17
+ /**
18
+ * Generates a UUID v4 that works in both browser and Node.js environments
19
+ */
20
+ export declare function generateUUID(): string;
21
+ export declare function convertMessagesToMastraMessages(messages: Message[]): CoreMessage[];
22
+ export {};
23
+ //# sourceMappingURL=agui.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agui.d.ts","sourceRoot":"","sources":["../../src/adapters/agui.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,WAAW,EACX,SAAS,EACT,OAAO,EACP,aAAa,EASd,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,MAAM,CAAC;AAClC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AAEhD,UAAU,iBAAkB,SAAQ,WAAW;IAC7C,KAAK,EAAE,KAAK,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,qBAAa,WAAY,SAAQ,aAAa;IAC5C,KAAK,EAAE,KAAK,CAAC;IACb,UAAU,CAAC,EAAE,MAAM,CAAC;gBACR,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,GAAG,IAAI,EAAE,EAAE,iBAAiB;IAStE,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC;CA+G3D;AAED;;GAEG;AACH,wBAAgB,YAAY,IAAI,MAAM,CAgCrC;AAED,wBAAgB,+BAA+B,CAAC,QAAQ,EAAE,OAAO,EAAE,GAAG,WAAW,EAAE,CAkDlF"}