@mastra/mcp-docs-server 1.0.0-beta.24 → 1.0.0-beta.26

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 (68) hide show
  1. package/.docs/organized/changelogs/%40internal%2Fplayground.md +20 -0
  2. package/.docs/organized/changelogs/%40mastra%2Fagent-builder.md +9 -9
  3. package/.docs/organized/changelogs/%40mastra%2Fai-sdk.md +10 -10
  4. package/.docs/organized/changelogs/%40mastra%2Fclickhouse.md +105 -105
  5. package/.docs/organized/changelogs/%40mastra%2Fclient-js.md +123 -123
  6. package/.docs/organized/changelogs/%40mastra%2Fcloudflare-d1.md +80 -80
  7. package/.docs/organized/changelogs/%40mastra%2Fcloudflare.md +80 -80
  8. package/.docs/organized/changelogs/%40mastra%2Fcodemod.md +51 -0
  9. package/.docs/organized/changelogs/%40mastra%2Fconvex.md +88 -50
  10. package/.docs/organized/changelogs/%40mastra%2Fcore.md +141 -141
  11. package/.docs/organized/changelogs/%40mastra%2Fdeployer-cloud.md +17 -17
  12. package/.docs/organized/changelogs/%40mastra%2Fdeployer.md +19 -19
  13. package/.docs/organized/changelogs/%40mastra%2Fdynamodb.md +80 -80
  14. package/.docs/organized/changelogs/%40mastra%2Flance.md +80 -80
  15. package/.docs/organized/changelogs/%40mastra%2Flibsql.md +105 -105
  16. package/.docs/organized/changelogs/%40mastra%2Fmcp-docs-server.md +15 -15
  17. package/.docs/organized/changelogs/%40mastra%2Fmemory.md +50 -50
  18. package/.docs/organized/changelogs/%40mastra%2Fmongodb.md +105 -105
  19. package/.docs/organized/changelogs/%40mastra%2Fmssql.md +105 -105
  20. package/.docs/organized/changelogs/%40mastra%2Fpg.md +105 -105
  21. package/.docs/organized/changelogs/%40mastra%2Fplayground-ui.md +76 -76
  22. package/.docs/organized/changelogs/%40mastra%2Freact.md +67 -67
  23. package/.docs/organized/changelogs/%40mastra%2Fschema-compat.md +8 -0
  24. package/.docs/organized/changelogs/%40mastra%2Fserver.md +110 -110
  25. package/.docs/organized/changelogs/%40mastra%2Fupstash.md +80 -80
  26. package/.docs/organized/changelogs/create-mastra.md +7 -7
  27. package/.docs/organized/changelogs/mastra.md +41 -41
  28. package/.docs/raw/agents/agent-approval.mdx +61 -0
  29. package/.docs/raw/agents/agent-memory.mdx +4 -0
  30. package/.docs/raw/agents/processors.mdx +1 -2
  31. package/.docs/raw/course/03-agent-memory/07-understanding-memory-threads.md +35 -0
  32. package/.docs/raw/guides/migrations/upgrade-to-v1/agent.mdx +1 -2
  33. package/.docs/raw/guides/migrations/upgrade-to-v1/cli.mdx +15 -1
  34. package/.docs/raw/guides/migrations/upgrade-to-v1/client.mdx +10 -0
  35. package/.docs/raw/guides/migrations/upgrade-to-v1/storage.mdx +140 -11
  36. package/.docs/raw/memory/storage.mdx +18 -3
  37. package/.docs/raw/observability/tracing/bridges/otel.mdx +1 -2
  38. package/.docs/raw/observability/tracing/overview.mdx +11 -25
  39. package/.docs/raw/reference/agents/generate.mdx +46 -3
  40. package/.docs/raw/reference/cli/mastra.mdx +20 -4
  41. package/.docs/raw/reference/client-js/agents.mdx +40 -9
  42. package/.docs/raw/reference/client-js/error-handling.mdx +1 -3
  43. package/.docs/raw/reference/configuration.mdx +1 -1
  44. package/.docs/raw/reference/core/getStorage.mdx +1 -1
  45. package/.docs/raw/reference/core/getStoredAgentById.mdx +1 -1
  46. package/.docs/raw/reference/core/listStoredAgents.mdx +1 -1
  47. package/.docs/raw/reference/core/mastra-class.mdx +1 -1
  48. package/.docs/raw/reference/core/setStorage.mdx +2 -2
  49. package/.docs/raw/reference/memory/clone-utilities.mdx +1 -1
  50. package/.docs/raw/reference/memory/createThread.mdx +2 -2
  51. package/.docs/raw/reference/memory/getThreadById.mdx +1 -1
  52. package/.docs/raw/reference/memory/listThreads.mdx +187 -0
  53. package/.docs/raw/reference/memory/memory-class.mdx +2 -2
  54. package/.docs/raw/reference/observability/tracing/bridges/otel.mdx +1 -2
  55. package/.docs/raw/reference/observability/tracing/exporters/arize.mdx +1 -2
  56. package/.docs/raw/reference/observability/tracing/exporters/otel.mdx +1 -2
  57. package/.docs/raw/reference/server/create-route.mdx +1 -1
  58. package/.docs/raw/reference/storage/composite.mdx +16 -16
  59. package/.docs/raw/server/auth/auth0.mdx +17 -8
  60. package/.docs/raw/server/auth/clerk.mdx +18 -8
  61. package/.docs/raw/server/auth/firebase.mdx +23 -11
  62. package/.docs/raw/server/auth/jwt.mdx +4 -3
  63. package/.docs/raw/server/auth/supabase.mdx +28 -19
  64. package/.docs/raw/server/auth/workos.mdx +17 -8
  65. package/.docs/raw/server/mastra-client.mdx +8 -25
  66. package/CHANGELOG.md +14 -0
  67. package/package.json +3 -3
  68. package/.docs/raw/reference/memory/listThreadsByResourceId.mdx +0 -112
@@ -1,3 +1,23 @@
1
1
  # @internal/playground
2
2
 
3
+ ## 1.0.0-beta.18
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`5c9bfe4`](https://github.com/mastra-ai/mastra/commit/5c9bfe44a5eef79f2885c5af31791ef10b508cbd), [`026b848`](https://github.com/mastra-ai/mastra/commit/026b8483fbf5b6d977be8f7e6aac8d15c75558ac), [`ffa553a`](https://github.com/mastra-ai/mastra/commit/ffa553a3edc1bd17d73669fba66d6b6f4ac10897)]:
8
+ - @mastra/playground-ui@7.0.0-beta.26
9
+ - @mastra/client-js@1.0.0-beta.26
10
+ - @mastra/core@1.0.0-beta.26
11
+ - @mastra/react@0.1.0-beta.26
12
+
13
+ ## 1.0.0-beta.17
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`3d1f794`](https://github.com/mastra-ai/mastra/commit/3d1f79420a16a0bb162794a21cfc10305912a554), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
18
+ - @mastra/core@1.0.0-beta.25
19
+ - @mastra/client-js@1.0.0-beta.25
20
+ - @mastra/react@1.0.0-beta.25
21
+ - @mastra/playground-ui@7.0.0-beta.25
22
+
3
23
  ## 0.0.5
@@ -1,5 +1,13 @@
1
1
  # @mastra/agent-builder
2
2
 
3
+ ## 1.0.0-beta.15
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
8
+ - @mastra/core@1.0.0-beta.25
9
+ - @mastra/memory@1.0.0-beta.15
10
+
3
11
  ## 1.0.0-beta.14
4
12
 
5
13
  ### Patch Changes
@@ -491,12 +499,4 @@
491
499
 
492
500
  ### Patch Changes
493
501
 
494
- - clean up console logs in monorepo ([#7926](https://github.com/mastra-ai/mastra/pull/7926))
495
-
496
- - Update peerdep of @mastra/core ([#7619](https://github.com/mastra-ai/mastra/pull/7619))
497
-
498
- - Update package.json and README ([#7886](https://github.com/mastra-ai/mastra/pull/7886))
499
-
500
- - Updated dependencies [[`197cbb2`](https://github.com/mastra-ai/mastra/commit/197cbb248fc8cb4bbf61bf70b770f1388b445df2), [`a1bb887`](https://github.com/mastra-ai/mastra/commit/a1bb887e8bfae44230f487648da72e96ef824561), [`6590763`](https://github.com/mastra-ai/mastra/commit/65907630ef4bf4127067cecd1cb21b56f55d5f1b), [`fb84c21`](https://github.com/mastra-ai/mastra/commit/fb84c21859d09bdc8f158bd5412bdc4b5835a61c), [`5802bf5`](https://github.com/mastra-ai/mastra/commit/5802bf57f6182e4b67c28d7d91abed349a8d14f3), [`5bda53a`](https://github.com/mastra-ai/mastra/commit/5bda53a9747bfa7d876d754fc92c83a06e503f62), [`c2eade3`](https://github.com/mastra-ai/mastra/commit/c2eade3508ef309662f065e5f340d7840295dd53), [`f26a8fd`](https://github.com/mastra-ai/mastra/commit/f26a8fd99fcb0497a5d86c28324430d7f6a5fb83), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382), [`222965a`](https://github.com/mastra-ai/mastra/commit/222965a98ce8197b86673ec594244650b5960257), [`6047778`](https://github.com/mastra-ai/mastra/commit/6047778e501df460648f31decddf8e443f36e373), [`a0f5f1c`](https://github.com/mastra-ai/mastra/commit/a0f5f1ca39c3c5c6d26202e9fcab986b4fe14568), [`9d4fc09`](https://github.com/mastra-ai/mastra/commit/9d4fc09b2ad55caa7738c7ceb3a905e454f74cdd), [`05c7abf`](https://github.com/mastra-ai/mastra/commit/05c7abfe105a015b7760c9bf33ff4419727502a0), [`0324ceb`](https://github.com/mastra-ai/mastra/commit/0324ceb8af9d16c12a531f90e575f6aab797ac81), [`d75ccf0`](https://github.com/mastra-ai/mastra/commit/d75ccf06dfd2582b916aa12624e3cd61b279edf1), [`0f9d227`](https://github.com/mastra-ai/mastra/commit/0f9d227890a98db33865abbea39daf407cd55ef7), [`b356f5f`](https://github.com/mastra-ai/mastra/commit/b356f5f7566cb3edb755d91f00b72fc1420b2a37), [`de056a0`](https://github.com/mastra-ai/mastra/commit/de056a02cbb43f6aa0380ab2150ea404af9ec0dd), [`f5ce05f`](https://github.com/mastra-ai/mastra/commit/f5ce05f831d42c69559bf4c0fdb46ccb920fc3a3), [`60c9cec`](https://github.com/mastra-ai/mastra/commit/60c9cec7048a79a87440f7840c383875bd710d93), [`c93532a`](https://github.com/mastra-ai/mastra/commit/c93532a340b80e4dd946d4c138d9381de5f70399), [`6cb1fcb`](https://github.com/mastra-ai/mastra/commit/6cb1fcbc8d0378ffed0d17784c96e68f30cb0272), [`aee4f00`](https://github.com/mastra-ai/mastra/commit/aee4f00e61e1a42e81a6d74ff149dbe69e32695a), [`9f6f30f`](https://github.com/mastra-ai/mastra/commit/9f6f30f04ec6648bbca798ea8aad59317c40d8db), [`547c621`](https://github.com/mastra-ai/mastra/commit/547c62104af3f7a551b3754e9cbdf0a3fbba15e4), [`897995e`](https://github.com/mastra-ai/mastra/commit/897995e630d572fe2891e7ede817938cabb43251), [`0fed8f2`](https://github.com/mastra-ai/mastra/commit/0fed8f2aa84b167b3415ea6f8f70755775132c8d), [`4f9ea8c`](https://github.com/mastra-ai/mastra/commit/4f9ea8c95ea74ba9abbf3b2ab6106c7d7bc45689), [`c4dbd12`](https://github.com/mastra-ai/mastra/commit/c4dbd12a05e75db124c5d8abff3d893ea1b88c30), [`1a1fbe6`](https://github.com/mastra-ai/mastra/commit/1a1fbe66efb7d94abc373ed0dd9676adb8122454), [`d706fad`](https://github.com/mastra-ai/mastra/commit/d706fad6e6e4b72357b18d229ba38e6c913c0e70), [`87fd07f`](https://github.com/mastra-ai/mastra/commit/87fd07ff35387a38728967163460231b5d33ae3b), [`5c3768f`](https://github.com/mastra-ai/mastra/commit/5c3768fa959454232ad76715c381f4aac00c6881), [`2685a78`](https://github.com/mastra-ai/mastra/commit/2685a78f224b8b04e20d4fab5ac1adb638190071), [`36f39c0`](https://github.com/mastra-ai/mastra/commit/36f39c00dc794952dc3c11aab91c2fa8bca74b11), [`239b5a4`](https://github.com/mastra-ai/mastra/commit/239b5a497aeae2e8b4d764f46217cfff2284788e), [`8a3f5e4`](https://github.com/mastra-ai/mastra/commit/8a3f5e4212ec36b302957deb4bd47005ab598382)]:
501
-
502
- ... 240 more lines hidden. See full changelog in package directory.
502
+ ... 248 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,14 @@
1
1
  # @mastra/ai-sdk
2
2
 
3
+ ## 1.0.0-beta.16
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed start chunk being dropped when using toAISdkStream with partial options. The start message with messageId is now correctly emitted according to the AI SDK stream protocol. ([#12069](https://github.com/mastra-ai/mastra/pull/12069))
8
+
9
+ - Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
10
+ - @mastra/core@1.0.0-beta.25
11
+
3
12
  ## 1.0.0-beta.15
4
13
 
5
14
  ### Major Changes
@@ -489,14 +498,5 @@
489
498
  ```
490
499
 
491
500
  - Updated dependencies [[`352a5d6`](https://github.com/mastra-ai/mastra/commit/352a5d625cfe09849b21e8f52a24c9f0366759d5), [`a0a5b4b`](https://github.com/mastra-ai/mastra/commit/a0a5b4bbebe6c701ebbadf744873aa0d5ca01371), [`69ea758`](https://github.com/mastra-ai/mastra/commit/69ea758358edd7117f191c2e69c8bb5fc79e7a1a), [`993ad98`](https://github.com/mastra-ai/mastra/commit/993ad98d7ad3bebda9ecef5fec5c94349a0d04bc), [`3ff2c17`](https://github.com/mastra-ai/mastra/commit/3ff2c17a58e312fad5ea37377262c12d92ca0908)]:
492
- - @mastra/core@1.0.0-beta.4
493
-
494
- ## 1.0.0-beta.2
495
-
496
- ### Major Changes
497
-
498
- - Add sendStart, sendFinish, sendReasoning, and sendSources options to toAISdkV5Stream function, allowing fine-grained control over which message chunks are included in the converted stream. Previously, these values were hardcoded in the transformer. ([#10127](https://github.com/mastra-ai/mastra/pull/10127))
499
-
500
- BREAKING CHANGE: AgentStreamToAISDKTransformer now accepts an options object instead of a single lastMessageId parameter
501
501
 
502
- ... 428 more lines hidden. See full changelog in package directory.
502
+ ... 437 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,109 @@
1
1
  # @mastra/clickhouse
2
2
 
3
+ ## 1.0.0-beta.12
4
+
5
+ ### Patch Changes
6
+
7
+ - Fixed duplicate spans migration issue across all storage backends. When upgrading from older versions, existing duplicate (traceId, spanId) combinations in the spans table could prevent the unique constraint from being created. The migration deduplicates spans before adding the constraint. ([#12073](https://github.com/mastra-ai/mastra/pull/12073))
8
+
9
+ **Deduplication rules (in priority order):**
10
+ 1. Keep completed spans (those with `endedAt` set) over incomplete spans
11
+ 2. Among spans with the same completion status, keep the one with the newest `updatedAt`
12
+ 3. Use `createdAt` as the final tiebreaker
13
+
14
+ **What changed:**
15
+ - Added `migrateSpans()` method to observability stores for manual migration
16
+ - Added `checkSpansMigrationStatus()` method to check if migration is needed
17
+ - All stores use optimized single-query deduplication to avoid memory issues on large tables
18
+
19
+ **Usage example:**
20
+
21
+ ```typescript
22
+ const observability = await storage.getStore('observability');
23
+ const status = await observability.checkSpansMigrationStatus();
24
+ if (status.needsMigration) {
25
+ const result = await observability.migrateSpans();
26
+ console.log(`Migration complete: ${result.duplicatesRemoved} duplicates removed`);
27
+ }
28
+ ```
29
+
30
+ Fixes #11840
31
+
32
+ - Renamed MastraStorage to MastraCompositeStore for better clarity. The old MastraStorage name remains available as a deprecated alias for backward compatibility, but will be removed in a future version. ([#12093](https://github.com/mastra-ai/mastra/pull/12093))
33
+
34
+ **Migration:**
35
+
36
+ Update your imports and usage:
37
+
38
+ ```typescript
39
+ // Before
40
+ import { MastraStorage } from '@mastra/core/storage';
41
+
42
+ const storage = new MastraStorage({
43
+ id: 'composite',
44
+ domains: { ... }
45
+ });
46
+
47
+ // After
48
+ import { MastraCompositeStore } from '@mastra/core/storage';
49
+
50
+ const storage = new MastraCompositeStore({
51
+ id: 'composite',
52
+ domains: { ... }
53
+ });
54
+ ```
55
+
56
+ The new name better reflects that this is a composite storage implementation that routes different domains (workflows, traces, messages) to different underlying stores, avoiding confusion with the general "Mastra Storage" concept.
57
+
58
+ - Updated dependencies [[`026b848`](https://github.com/mastra-ai/mastra/commit/026b8483fbf5b6d977be8f7e6aac8d15c75558ac), [`ffa553a`](https://github.com/mastra-ai/mastra/commit/ffa553a3edc1bd17d73669fba66d6b6f4ac10897)]:
59
+ - @mastra/core@1.0.0-beta.26
60
+
61
+ ## 1.0.0-beta.11
62
+
63
+ ### Patch Changes
64
+
65
+ - Added new `listThreads` method for flexible thread filtering across all storage adapters. ([#11832](https://github.com/mastra-ai/mastra/pull/11832))
66
+
67
+ **New Features**
68
+ - Filter threads by `resourceId`, `metadata`, or both (with AND logic for metadata key-value pairs)
69
+ - All filter parameters are optional, allowing you to list all threads or filter as needed
70
+ - Full pagination and sorting support
71
+
72
+ **Example Usage**
73
+
74
+ ```typescript
75
+ // List all threads
76
+ const allThreads = await memory.listThreads({});
77
+
78
+ // Filter by resourceId only
79
+ const userThreads = await memory.listThreads({
80
+ filter: { resourceId: 'user-123' },
81
+ });
82
+
83
+ // Filter by metadata only
84
+ const supportThreads = await memory.listThreads({
85
+ filter: { metadata: { category: 'support' } },
86
+ });
87
+
88
+ // Filter by both with pagination
89
+ const filteredThreads = await memory.listThreads({
90
+ filter: {
91
+ resourceId: 'user-123',
92
+ metadata: { priority: 'high', status: 'open' },
93
+ },
94
+ orderBy: { field: 'updatedAt', direction: 'DESC' },
95
+ page: 0,
96
+ perPage: 20,
97
+ });
98
+ ```
99
+
100
+ **Security Improvements**
101
+ - Added validation to prevent SQL injection via malicious metadata keys
102
+ - Added pagination parameter validation to prevent integer overflow attacks
103
+
104
+ - Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
105
+ - @mastra/core@1.0.0-beta.25
106
+
3
107
  ## 1.0.0-beta.10
4
108
 
5
109
  ### Patch Changes
@@ -394,109 +498,5 @@
394
498
  **After:**
395
499
 
396
500
  ```typescript
397
- const result = await workflow.execute({ input });
398
- if (result.status === 'failed') {
399
- // Custom properties are preserved
400
- console.log(result.error.message); // "Step execution failed"
401
- console.log(result.error.statusCode); // 429
402
- console.log(result.error.cause?.name); // "RateLimitError"
403
- }
404
- ```
405
-
406
- **Type change:** `WorkflowState.error` and `WorkflowRunState.error` types changed from `string | Error` to `SerializedError`.
407
-
408
- Other changes:
409
- - Added `UpdateWorkflowStateOptions` type for workflow state updates
410
-
411
- - fix: make getSqlType consistent across storage adapters ([#11112](https://github.com/mastra-ai/mastra/pull/11112))
412
- - PostgreSQL: use `getSqlType()` in `createTable` instead of `toUpperCase()`
413
- - LibSQL: use `getSqlType()` in `createTable`, return `JSONB` for jsonb type (matches SQLite 3.45+ support)
414
- - ClickHouse: use `getSqlType()` in `createTable` instead of `COLUMN_TYPES` constant, add missing types (uuid, float, boolean)
415
- - Remove unused `getSqlType()` and `getDefaultValue()` from `MastraStorage` base class (all stores use `StoreOperations` versions)
416
-
417
- - Updated dependencies [[`d5ed981`](https://github.com/mastra-ai/mastra/commit/d5ed981c8701c1b8a27a5f35a9a2f7d9244e695f), [`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808), [`932d63d`](https://github.com/mastra-ai/mastra/commit/932d63dd51be9c8bf1e00e3671fe65606c6fb9cd), [`b760b73`](https://github.com/mastra-ai/mastra/commit/b760b731aca7c8a3f041f61d57a7f125ae9cb215), [`695a621`](https://github.com/mastra-ai/mastra/commit/695a621528bdabeb87f83c2277cf2bb084c7f2b4), [`2b459f4`](https://github.com/mastra-ai/mastra/commit/2b459f466fd91688eeb2a44801dc23f7f8a887ab), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`24b76d8`](https://github.com/mastra-ai/mastra/commit/24b76d8e17656269c8ed09a0c038adb9cc2ae95a), [`243a823`](https://github.com/mastra-ai/mastra/commit/243a8239c5906f5c94e4f78b54676793f7510ae3), [`486352b`](https://github.com/mastra-ai/mastra/commit/486352b66c746602b68a95839f830de14c7fb8c0), [`c61fac3`](https://github.com/mastra-ai/mastra/commit/c61fac3add96f0dcce0208c07415279e2537eb62), [`6f14f70`](https://github.com/mastra-ai/mastra/commit/6f14f706ccaaf81b69544b6c1b75ab66a41e5317), [`09e4bae`](https://github.com/mastra-ai/mastra/commit/09e4bae18dd5357d2ae078a4a95a2af32168ab08), [`4524734`](https://github.com/mastra-ai/mastra/commit/45247343e384717a7c8404296275c56201d6470f), [`2a53598`](https://github.com/mastra-ai/mastra/commit/2a53598c6d8cfeb904a7fc74e57e526d751c8fa6), [`c7cd3c7`](https://github.com/mastra-ai/mastra/commit/c7cd3c7a187d7aaf79e2ca139de328bf609a14b4), [`847c212`](https://github.com/mastra-ai/mastra/commit/847c212caba7df0d6f2fc756b494ac3c75c3720d), [`6f941c4`](https://github.com/mastra-ai/mastra/commit/6f941c438ca5f578619788acc7608fc2e23bd176)]:
418
- - @mastra/core@1.0.0-beta.12
419
-
420
- ## 1.0.0-beta.5
421
-
422
- ### Patch Changes
423
-
424
- - Add delete workflow run API ([#10991](https://github.com/mastra-ai/mastra/pull/10991))
425
-
426
- ```typescript
427
- await workflow.deleteWorkflowRunById(runId);
428
- ```
429
-
430
- - Updated dependencies [[`edb07e4`](https://github.com/mastra-ai/mastra/commit/edb07e49283e0c28bd094a60e03439bf6ecf0221), [`b7e17d3`](https://github.com/mastra-ai/mastra/commit/b7e17d3f5390bb5a71efc112204413656fcdc18d), [`261473a`](https://github.com/mastra-ai/mastra/commit/261473ac637e633064a22076671e2e02b002214d), [`5d7000f`](https://github.com/mastra-ai/mastra/commit/5d7000f757cd65ea9dc5b05e662fd83dfd44e932), [`4f0331a`](https://github.com/mastra-ai/mastra/commit/4f0331a79bf6eb5ee598a5086e55de4b5a0ada03), [`8a000da`](https://github.com/mastra-ai/mastra/commit/8a000da0c09c679a2312f6b3aa05b2ca78ca7393)]:
431
- - @mastra/core@1.0.0-beta.10
432
-
433
- ## 1.0.0-beta.4
434
-
435
- ### Patch Changes
436
-
437
- - Fix saveScore not persisting ID correctly, breaking getScoreById retrieval ([#10915](https://github.com/mastra-ai/mastra/pull/10915))
438
-
439
- **What Changed**
440
- - saveScore now correctly returns scores that can be retrieved with getScoreById
441
- - Validation errors now include contextual information (scorer, entity, trace details) for easier debugging
442
-
443
- **Impact**
444
- Previously, calling getScoreById after saveScore would return null because the generated ID wasn't persisted to the database. This is now fixed across all store implementations, ensuring consistent behavior and data integrity.
445
-
446
- - Updated dependencies [[`0d41fe2`](https://github.com/mastra-ai/mastra/commit/0d41fe245355dfc66d61a0d9c85d9400aac351ff), [`6b3ba91`](https://github.com/mastra-ai/mastra/commit/6b3ba91494cc10394df96782f349a4f7b1e152cc), [`7907fd1`](https://github.com/mastra-ai/mastra/commit/7907fd1c5059813b7b870b81ca71041dc807331b)]:
447
- - @mastra/core@1.0.0-beta.8
448
-
449
- ## 1.0.0-beta.3
450
-
451
- ### Minor Changes
452
-
453
- - Add `disableInit` option to all storage adapters ([#10851](https://github.com/mastra-ai/mastra/pull/10851))
454
-
455
- Adds a new `disableInit` config option to all storage providers that allows users to disable automatic table creation/migrations at runtime. This is useful for CI/CD pipelines where you want to run migrations during deployment with elevated credentials, then run the application with `disableInit: true` so it doesn't attempt schema changes at runtime.
456
-
457
- ```typescript
458
- // CI/CD script - run migrations
459
- const storage = new PostgresStore({
460
- connectionString: DATABASE_URL,
461
- id: 'pg-storage',
462
- });
463
- await storage.init();
464
-
465
- // Runtime - skip auto-init
466
- const storage = new PostgresStore({
467
- connectionString: DATABASE_URL,
468
- id: 'pg-storage',
469
- disableInit: true,
470
- });
471
- ```
472
-
473
- ### Patch Changes
474
-
475
- - Standardize error IDs across all storage and vector stores using centralized helper functions (`createStorageErrorId` and `createVectorErrorId`). This ensures consistent error ID patterns (`MASTRA_STORAGE_{STORE}_{OPERATION}_{STATUS}` and `MASTRA_VECTOR_{STORE}_{OPERATION}_{STATUS}`) across the codebase for better error tracking and debugging. ([#10913](https://github.com/mastra-ai/mastra/pull/10913))
476
-
477
- - Updated dependencies [[`3076c67`](https://github.com/mastra-ai/mastra/commit/3076c6778b18988ae7d5c4c5c466366974b2d63f), [`85d7ee1`](https://github.com/mastra-ai/mastra/commit/85d7ee18ff4e14d625a8a30ec6656bb49804989b), [`c6c1092`](https://github.com/mastra-ai/mastra/commit/c6c1092f8fbf76109303f69e000e96fd1960c4ce), [`81dc110`](https://github.com/mastra-ai/mastra/commit/81dc11008d147cf5bdc8996ead1aa61dbdebb6fc), [`7aedb74`](https://github.com/mastra-ai/mastra/commit/7aedb74883adf66af38e270e4068fd42e7a37036), [`8f02d80`](https://github.com/mastra-ai/mastra/commit/8f02d800777397e4b45d7f1ad041988a8b0c6630), [`d7aad50`](https://github.com/mastra-ai/mastra/commit/d7aad501ce61646b76b4b511e558ac4eea9884d0), [`ce0a73a`](https://github.com/mastra-ai/mastra/commit/ce0a73abeaa75b10ca38f9e40a255a645d50ebfb), [`a02e542`](https://github.com/mastra-ai/mastra/commit/a02e542d23179bad250b044b17ff023caa61739f), [`a372c64`](https://github.com/mastra-ai/mastra/commit/a372c640ad1fd12e8f0613cebdc682fc156b4d95), [`8846867`](https://github.com/mastra-ai/mastra/commit/8846867ffa9a3746767618e314bebac08eb77d87), [`42a42cf`](https://github.com/mastra-ai/mastra/commit/42a42cf3132b9786feecbb8c13c583dce5b0e198), [`ae08bf0`](https://github.com/mastra-ai/mastra/commit/ae08bf0ebc6a4e4da992b711c4a389c32ba84cf4), [`21735a7`](https://github.com/mastra-ai/mastra/commit/21735a7ef306963554a69a89b44f06c3bcd85141), [`1d877b8`](https://github.com/mastra-ai/mastra/commit/1d877b8d7b536a251c1a7a18db7ddcf4f68d6f8b)]:
478
- - @mastra/core@1.0.0-beta.7
479
-
480
- ## 1.0.0-beta.2
481
-
482
- ### Patch Changes
483
-
484
- - feat(storage): support querying messages from multiple threads ([#10663](https://github.com/mastra-ai/mastra/pull/10663))
485
- - Fixed TypeScript errors where `threadId: string | string[]` was being passed to places expecting `Scalar` type
486
- - Added proper multi-thread support for `listMessages` across all adapters when `threadId` is an array
487
- - Updated `_getIncludedMessages` to look up message threadId by ID (since message IDs are globally unique)
488
- - **upstash**: Added `msg-idx:{messageId}` index for O(1) message lookups (backwards compatible with fallback to scan for old messages, with automatic backfill)
489
-
490
- - fix: ensure score responses match saved payloads for Mastra Stores. ([#10557](https://github.com/mastra-ai/mastra/pull/10557))
491
-
492
- - Unify transformScoreRow functions across storage adapters ([#10648](https://github.com/mastra-ai/mastra/pull/10648))
493
-
494
- Added a unified `transformScoreRow` function in `@mastra/core/storage` that provides schema-driven row transformation for score data. This eliminates code duplication across 10 storage adapters while maintaining store-specific behavior through configurable options:
495
- - `preferredTimestampFields`: Preferred source fields for timestamps (PostgreSQL, Cloudflare D1)
496
- - `convertTimestamps`: Convert timestamp strings to Date objects (MSSQL, MongoDB, ClickHouse)
497
- - `nullValuePattern`: Skip values matching pattern (ClickHouse's `'_null_'`)
498
- - `fieldMappings`: Map source column names to schema fields (LibSQL's `additionalLLMContext`)
499
-
500
- Each store adapter now uses the unified function with appropriate options, reducing ~200 lines of duplicate transformation logic while ensuring consistent behavior across all storage backends.
501
501
 
502
- ... 1690 more lines hidden. See full changelog in package directory.
502
+ ... 1794 more lines hidden. See full changelog in package directory.
@@ -1,5 +1,127 @@
1
1
  # @mastra/client-js
2
2
 
3
+ ## 1.0.0-beta.26
4
+
5
+ ### Patch Changes
6
+
7
+ - Improve type handling with Zod ([#12091](https://github.com/mastra-ai/mastra/pull/12091))
8
+
9
+ - Updated dependencies [[`026b848`](https://github.com/mastra-ai/mastra/commit/026b8483fbf5b6d977be8f7e6aac8d15c75558ac), [`ffa553a`](https://github.com/mastra-ai/mastra/commit/ffa553a3edc1bd17d73669fba66d6b6f4ac10897)]:
10
+ - @mastra/core@1.0.0-beta.26
11
+
12
+ ## 1.0.0-beta.25
13
+
14
+ ### Minor Changes
15
+
16
+ - Added human-in-the-loop (HITL) tool approval support for `generate()` method. ([#12056](https://github.com/mastra-ai/mastra/pull/12056))
17
+
18
+ **Why:** This provides parity between `stream()` and `generate()` for tool approval flows, allowing non-streaming use cases to leverage `requireToolApproval` without needing to switch to streaming.
19
+
20
+ Previously, tool approval with `requireToolApproval` only worked with `stream()`. Now you can use the same approval flow with `generate()` for non-streaming use cases.
21
+
22
+ **Using tool approval with generate()**
23
+
24
+ ```typescript
25
+ const output = await agent.generate('Find user John', {
26
+ requireToolApproval: true,
27
+ });
28
+
29
+ // Check if a tool is waiting for approval
30
+ if (output.finishReason === 'suspended') {
31
+ console.log('Tool requires approval:', output.suspendPayload.toolName);
32
+
33
+ // Approve the tool call
34
+ const result = await agent.approveToolCallGenerate({
35
+ runId: output.runId,
36
+ toolCallId: output.suspendPayload.toolCallId,
37
+ });
38
+
39
+ console.log(result.text);
40
+ }
41
+ ```
42
+
43
+ **Declining a tool call**
44
+
45
+ ```typescript
46
+ if (output.finishReason === 'suspended') {
47
+ const result = await agent.declineToolCallGenerate({
48
+ runId: output.runId,
49
+ toolCallId: output.suspendPayload.toolCallId,
50
+ });
51
+ }
52
+ ```
53
+
54
+ **New methods added:**
55
+ - `agent.approveToolCallGenerate({ runId, toolCallId })` - Approves a pending tool call and returns the complete result
56
+ - `agent.declineToolCallGenerate({ runId, toolCallId })` - Declines a pending tool call and returns the complete result
57
+
58
+ **Server routes added:**
59
+ - `POST /api/agents/:agentId/approve-tool-call-generate`
60
+ - `POST /api/agents/:agentId/decline-tool-call-generate`
61
+
62
+ The playground UI now also supports tool approval when using generate mode.
63
+
64
+ - Added processor resource to the JavaScript client SDK. You can now list processors, get processor details, and execute processors via the client: ([#12059](https://github.com/mastra-ai/mastra/pull/12059))
65
+
66
+ ```typescript
67
+ // List all processors
68
+ const processors = await client.listProcessors();
69
+
70
+ // Get processor details
71
+ const details = await client.getProcessor('my-processor').details();
72
+
73
+ // Execute a processor
74
+ const result = await client.getProcessor('my-processor').execute({
75
+ phase: 'input',
76
+ messages: [{ role: 'user', content: { format: 2, parts: [{ type: 'text', text: 'Hello' }] } }],
77
+ });
78
+ ```
79
+
80
+ - Added new `listThreads` method for flexible thread filtering across all storage adapters. ([#11832](https://github.com/mastra-ai/mastra/pull/11832))
81
+
82
+ **New Features**
83
+ - Filter threads by `resourceId`, `metadata`, or both (with AND logic for metadata key-value pairs)
84
+ - All filter parameters are optional, allowing you to list all threads or filter as needed
85
+ - Full pagination and sorting support
86
+
87
+ **Example Usage**
88
+
89
+ ```typescript
90
+ // List all threads
91
+ const allThreads = await memory.listThreads({});
92
+
93
+ // Filter by resourceId only
94
+ const userThreads = await memory.listThreads({
95
+ filter: { resourceId: 'user-123' },
96
+ });
97
+
98
+ // Filter by metadata only
99
+ const supportThreads = await memory.listThreads({
100
+ filter: { metadata: { category: 'support' } },
101
+ });
102
+
103
+ // Filter by both with pagination
104
+ const filteredThreads = await memory.listThreads({
105
+ filter: {
106
+ resourceId: 'user-123',
107
+ metadata: { priority: 'high', status: 'open' },
108
+ },
109
+ orderBy: { field: 'updatedAt', direction: 'DESC' },
110
+ page: 0,
111
+ perPage: 20,
112
+ });
113
+ ```
114
+
115
+ **Security Improvements**
116
+ - Added validation to prevent SQL injection via malicious metadata keys
117
+ - Added pagination parameter validation to prevent integer overflow attacks
118
+
119
+ ### Patch Changes
120
+
121
+ - Updated dependencies [[`ed3e3dd`](https://github.com/mastra-ai/mastra/commit/ed3e3ddec69d564fe2b125e083437f76331f1283), [`6833c69`](https://github.com/mastra-ai/mastra/commit/6833c69607418d257750bbcdd84638993d343539), [`47b1c16`](https://github.com/mastra-ai/mastra/commit/47b1c16a01c7ffb6765fe1e499b49092f8b7eba3), [`3a76a80`](https://github.com/mastra-ai/mastra/commit/3a76a80284cb71a0faa975abb3d4b2a9631e60cd), [`8538a0d`](https://github.com/mastra-ai/mastra/commit/8538a0d232619bf55dad7ddc2a8b0ca77c679a87), [`9312dcd`](https://github.com/mastra-ai/mastra/commit/9312dcd1c6f5b321929e7d382e763d95fdc030f5)]:
122
+ - @mastra/core@1.0.0-beta.25
123
+ - @mastra/schema-compat@1.0.0-beta.8
124
+
3
125
  ## 1.0.0-beta.24
4
126
 
5
127
  ### Major Changes
@@ -377,126 +499,4 @@
377
499
  const client = new MastraClient({ baseUrl: 'http://localhost:4111' });
378
500
  const workflow = client.getWorkflow('myWorkflow');
379
501
 
380
- // Get only status (minimal payload - fastest)
381
- const statusOnly = await workflow.runExecutionResult(runId, {
382
- fields: ['status'],
383
- });
384
- console.log(statusOnly.status); // 'success' | 'failed' | 'running' | etc.
385
-
386
- // Get status and result
387
- const statusAndResult = await workflow.runExecutionResult(runId, {
388
- fields: ['status', 'result'],
389
- });
390
-
391
- // Get all fields but without nested workflow data (faster)
392
- const resultWithoutNested = await workflow.runExecutionResult(runId, {
393
- withNestedWorkflows: false,
394
- });
395
-
396
- // Get specific fields without nested workflow data
397
- const optimized = await workflow.runExecutionResult(runId, {
398
- fields: ['status', 'steps'],
399
- withNestedWorkflows: false,
400
- });
401
-
402
- // Get full execution result (default behavior)
403
- const fullResult = await workflow.runExecutionResult(runId);
404
- ```
405
-
406
- ## Core API Changes
407
-
408
- The `Workflow.getWorkflowRunExecutionResult` method now accepts an options object:
409
-
410
- ```typescript
411
- await workflow.getWorkflowRunExecutionResult(runId, {
412
- withNestedWorkflows: false, // default: true, set to false to skip nested workflow data
413
- fields: ['status', 'result'], // optional field filtering
414
- });
415
- ```
416
-
417
- ## Inngest Compatibility
418
-
419
- The `@mastra/inngest` package has been updated to use the new options object API. This is a non-breaking internal change - no action required from inngest workflow users.
420
-
421
- ## Performance Impact
422
-
423
- For workflows with large step outputs:
424
- - Requesting only `status`: ~99% reduction in payload size
425
- - Requesting `status,result,error`: ~95% reduction in payload size
426
- - Using `withNestedWorkflows=false`: Avoids expensive nested workflow data fetching
427
- - Combining both: Maximum performance optimization
428
-
429
- - Fix delayed promises rejecting when stream suspends on tool-call-approval ([#11278](https://github.com/mastra-ai/mastra/pull/11278))
430
-
431
- When a stream ends in suspended state (e.g., requiring tool approval), the delayed promises like `toolResults`, `toolCalls`, `text`, etc. now resolve with partial results instead of rejecting with an error. This allows consumers to access data that was produced before the suspension.
432
-
433
- Also improves generic type inference for `LLMStepResult` and related types throughout the streaming infrastructure.
434
-
435
- - Updated dependencies [[`4f94ed8`](https://github.com/mastra-ai/mastra/commit/4f94ed8177abfde3ec536e3574883e075423350c), [`ac3cc23`](https://github.com/mastra-ai/mastra/commit/ac3cc2397d1966bc0fc2736a223abc449d3c7719), [`a86f4df`](https://github.com/mastra-ai/mastra/commit/a86f4df0407311e0d2ea49b9a541f0938810d6a9), [`029540c`](https://github.com/mastra-ai/mastra/commit/029540ca1e582fc2dd8d288ecd4a9b0f31a954ef), [`66741d1`](https://github.com/mastra-ai/mastra/commit/66741d1a99c4f42cf23a16109939e8348ac6852e), [`01b20fe`](https://github.com/mastra-ai/mastra/commit/01b20fefb7c67c2b7d79417598ef4e60256d1225), [`0dbf199`](https://github.com/mastra-ai/mastra/commit/0dbf199110f22192ce5c95b1c8148d4872b4d119), [`a7ce182`](https://github.com/mastra-ai/mastra/commit/a7ce1822a8785ce45d62dd5c911af465e144f7d7)]:
436
- - @mastra/core@1.0.0-beta.14
437
-
438
- ## 1.0.0-beta.13
439
-
440
- ### Patch Changes
441
-
442
- - Updated dependencies [[`919a22b`](https://github.com/mastra-ai/mastra/commit/919a22b25876f9ed5891efe5facbe682c30ff497)]:
443
- - @mastra/core@1.0.0-beta.13
444
-
445
- ## 1.0.0-beta.12
446
-
447
- ### Patch Changes
448
-
449
- - Embed AI types to fix peerdeps mismatches ([`9650cce`](https://github.com/mastra-ai/mastra/commit/9650cce52a1d917ff9114653398e2a0f5c3ba808))
450
-
451
- - Add resourceId to workflow routes ([#11166](https://github.com/mastra-ai/mastra/pull/11166))
452
-
453
- - Add `Run` instance to client-js. `workflow.createRun` returns the `Run` instance which can be used for the different run methods. ([#11207](https://github.com/mastra-ai/mastra/pull/11207))
454
- With this change, run methods cannot be called directly on workflow instance anymore
455
-
456
- ```diff
457
- - const result = await workflow.stream({ runId: '123', inputData: { ... } });
458
- + const run = await workflow.createRun({ runId: '123' });
459
- + const stream = await run.stream({ inputData: { ... } });
460
- ```
461
-
462
- - Deserialize workflow errors on the client side ([#10992](https://github.com/mastra-ai/mastra/pull/10992))
463
-
464
- When workflows fail, the server sends error data as JSON over HTTP. This change deserializes those errors back to proper `Error` instances on the client.
465
-
466
- **Before:**
467
-
468
- ```typescript
469
- const result = await workflow.startAsync({ input });
470
- if (result.status === 'failed') {
471
- // result.error was a plain object, couldn't use instanceof
472
- console.log(result.error.message); // TypeScript error
473
- }
474
- ```
475
-
476
- **After:**
477
-
478
- ```typescript
479
- const result = await workflow.startAsync({ input });
480
- if (result.status === 'failed') {
481
- // result.error is now a proper Error instance
482
- if (result.error instanceof MyCustomError) {
483
- console.log(result.error.statusCode); // Works!
484
- }
485
- }
486
- ```
487
-
488
- This enables proper error handling and type checking in client applications, allowing developers to implement error-specific recovery logic based on custom error types and properties.
489
-
490
- Features:
491
- - `instanceof Error` checks
492
- - Access to `error.message`, `error.name`, `error.stack`
493
- - Preservation of custom error properties (e.g., `statusCode`, `responseHeaders`)
494
- - Nested error tracking via `error.cause`
495
-
496
- Affected methods:
497
- - `startAsync()`
498
- - `resumeAsync()`
499
- - `restartAsync()`
500
- - `timeTravelAsync()`
501
-
502
- ... 3810 more lines hidden. See full changelog in package directory.
502
+ ... 3932 more lines hidden. See full changelog in package directory.