@mastra/editor 0.0.0-studio-deploy-20260404182525 → 0.0.0-studio-cli-20260504022012

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 CHANGED
@@ -1,13 +1,293 @@
1
1
  # @mastra/editor
2
2
 
3
- ## 0.0.0-studio-deploy-20260404182525
3
+ ## 0.0.0-studio-cli-20260504022012
4
4
 
5
5
  ### Patch Changes
6
6
 
7
- - Updated dependencies [[`c55b527`](https://github.com/mastra-ai/mastra/commit/c55b52758a31368b2077b0dbbc3badfe4063f560), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
8
- - @mastra/core@0.0.0-studio-deploy-20260404182525
9
- - @mastra/memory@0.0.0-studio-deploy-20260404182525
10
- - @mastra/mcp@0.0.0-studio-deploy-20260404182525
7
+ - Updated dependencies [[`6dcd65f`](https://github.com/mastra-ai/mastra/commit/6dcd65f2a34069e6dc43ba35f1d11119b9b40bef), [`c05c9a1`](https://github.com/mastra-ai/mastra/commit/c05c9a13230988cef6d438a62f37760f31927bc7), [`e24aacb`](https://github.com/mastra-ai/mastra/commit/e24aacba07bd66f5d95b636dc24016fca26b52cf), [`1c2dda8`](https://github.com/mastra-ai/mastra/commit/1c2dda805fbfccc0abf55d4cb20cc34402dc3f0c), [`c721164`](https://github.com/mastra-ai/mastra/commit/c7211643f7ac861f83b19a3757cc921487fc9d75), [`1b55954`](https://github.com/mastra-ai/mastra/commit/1b559541c1e08a10e49d01ffc51a634dfc37a286), [`319a94c`](https://github.com/mastra-ai/mastra/commit/319a94c6bf1f8f4ac8249a40b0c99b9c1e0d4598), [`5adc55e`](https://github.com/mastra-ai/mastra/commit/5adc55e63407be8ee977914957d68bcc2a075ceb), [`70017d7`](https://github.com/mastra-ai/mastra/commit/70017d72ab741b5d7040e2a15c251a317782e39e), [`568777e`](https://github.com/mastra-ai/mastra/commit/568777ea8af77a672270b448dfd3996f9e75a964), [`e4942bc`](https://github.com/mastra-ai/mastra/commit/e4942bc7fdc903572f7d84f26d5e15f9d39c763d)]:
8
+ - @mastra/core@0.0.0-studio-cli-20260504022012
9
+ - @mastra/memory@0.0.0-studio-cli-20260504022012
10
+ - @mastra/mcp@0.0.0-studio-cli-20260504022012
11
+
12
+ ## 0.7.23-alpha.0
13
+
14
+ ### Patch Changes
15
+
16
+ - Updated dependencies [[`c05c9a1`](https://github.com/mastra-ai/mastra/commit/c05c9a13230988cef6d438a62f37760f31927bc7), [`e24aacb`](https://github.com/mastra-ai/mastra/commit/e24aacba07bd66f5d95b636dc24016fca26b52cf), [`c721164`](https://github.com/mastra-ai/mastra/commit/c7211643f7ac861f83b19a3757cc921487fc9d75), [`1b55954`](https://github.com/mastra-ai/mastra/commit/1b559541c1e08a10e49d01ffc51a634dfc37a286), [`319a94c`](https://github.com/mastra-ai/mastra/commit/319a94c6bf1f8f4ac8249a40b0c99b9c1e0d4598), [`5adc55e`](https://github.com/mastra-ai/mastra/commit/5adc55e63407be8ee977914957d68bcc2a075ceb), [`70017d7`](https://github.com/mastra-ai/mastra/commit/70017d72ab741b5d7040e2a15c251a317782e39e), [`e4942bc`](https://github.com/mastra-ai/mastra/commit/e4942bc7fdc903572f7d84f26d5e15f9d39c763d)]:
17
+ - @mastra/core@1.32.0-alpha.1
18
+ - @mastra/memory@1.17.5-alpha.0
19
+
20
+ ## 0.7.22
21
+
22
+ ### Patch Changes
23
+
24
+ - Fix MCP client support in the agent editor: ([#15945](https://github.com/mastra-ai/mastra/pull/15945))
25
+ - MCP client form dirty state: Save button now enables after adding/removing MCP clients
26
+ - MCP tool name matching: Both bare and namespaced tool names are matched correctly
27
+ - Auth token forwarding: Token from cookie or header is forwarded to auth-protected MCP servers
28
+ - String interpolation: Request context variables in system prompts now resolve correctly
29
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`d587199`](https://github.com/mastra-ai/mastra/commit/d5871993c0371bde2b0717d6b47194755baa1443), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8), [`4b2e4f3`](https://github.com/mastra-ai/mastra/commit/4b2e4f3bc9f5a63dcbfccfa54f9474340c3cea58)]:
30
+ - @mastra/core@1.30.0
31
+ - @mastra/memory@1.17.4
32
+
33
+ ## 0.7.22-alpha.1
34
+
35
+ ### Patch Changes
36
+
37
+ - Fix MCP client support in the agent editor: ([#15945](https://github.com/mastra-ai/mastra/pull/15945))
38
+ - MCP client form dirty state: Save button now enables after adding/removing MCP clients
39
+ - MCP tool name matching: Both bare and namespaced tool names are matched correctly
40
+ - Auth token forwarding: Token from cookie or header is forwarded to auth-protected MCP servers
41
+ - String interpolation: Request context variables in system prompts now resolve correctly
42
+ - Updated dependencies [[`920c757`](https://github.com/mastra-ai/mastra/commit/920c75799c6bd71787d86deaf654a35af4c839ca), [`1fe2533`](https://github.com/mastra-ai/mastra/commit/1fe2533c4382ca6858aac7c4b63e888c2eac6541), [`f8694b6`](https://github.com/mastra-ai/mastra/commit/f8694b6fa0b7a5cde71d794c3bbef4957c55bcb8)]:
43
+ - @mastra/core@1.30.0-alpha.1
44
+
45
+ ## 0.7.22-alpha.0
46
+
47
+ ### Patch Changes
48
+
49
+ - Updated dependencies [[`d587199`](https://github.com/mastra-ai/mastra/commit/d5871993c0371bde2b0717d6b47194755baa1443), [`4b2e4f3`](https://github.com/mastra-ai/mastra/commit/4b2e4f3bc9f5a63dcbfccfa54f9474340c3cea58)]:
50
+ - @mastra/core@1.29.2-alpha.0
51
+ - @mastra/memory@1.17.4-alpha.0
52
+
53
+ ## 0.7.21
54
+
55
+ ### Patch Changes
56
+
57
+ - Fixed template variable interpolation for arrays and objects. Previously, using {{products}} where products is an array of objects would render as [object Object],[object Object]. Now arrays and objects are automatically JSON-stringified, so {{products}} correctly renders the full JSON representation. ([#15927](https://github.com/mastra-ai/mastra/pull/15927))
58
+
59
+ - Updated dependencies [[`6db978c`](https://github.com/mastra-ai/mastra/commit/6db978c42e94e75540a504f7230086f0b5cd35f9), [`95b001f`](https://github.com/mastra-ai/mastra/commit/95b001f750af6947ad9d174cd47abffc776663a5), [`512a013`](https://github.com/mastra-ai/mastra/commit/512a013f285aa9c0aa8f08a35b2ce09f9938b017), [`e9becde`](https://github.com/mastra-ai/mastra/commit/e9becdeed9176b9f8392e557bde12b933f99cf7a), [`703a443`](https://github.com/mastra-ai/mastra/commit/703a44390c587d9c0b8ae94ec4edd8afb2a74044), [`808df1b`](https://github.com/mastra-ai/mastra/commit/808df1b39358b5f10b7317107e42b1fda7c87185)]:
60
+ - @mastra/core@1.29.1
61
+ - @mastra/memory@1.17.3
62
+
63
+ ## 0.7.21-alpha.1
64
+
65
+ ### Patch Changes
66
+
67
+ - Fixed template variable interpolation for arrays and objects. Previously, using {{products}} where products is an array of objects would render as [object Object],[object Object]. Now arrays and objects are automatically JSON-stringified, so {{products}} correctly renders the full JSON representation. ([#15927](https://github.com/mastra-ai/mastra/pull/15927))
68
+
69
+ ## 0.7.21-alpha.0
70
+
71
+ ### Patch Changes
72
+
73
+ - Updated dependencies [[`95b001f`](https://github.com/mastra-ai/mastra/commit/95b001f750af6947ad9d174cd47abffc776663a5)]:
74
+ - @mastra/memory@1.17.3-alpha.0
75
+
76
+ ## 0.7.20
77
+
78
+ ### Patch Changes
79
+
80
+ - Updated dependencies [[`28caa5b`](https://github.com/mastra-ai/mastra/commit/28caa5b032358545af2589ed90636eccb4dd9d2f), [`c1ae974`](https://github.com/mastra-ai/mastra/commit/c1ae97491f6e57378ce880c3a397778c42adcdf1), [`b510d36`](https://github.com/mastra-ai/mastra/commit/b510d368f73dab6be2e2c2bc99035aaef1fb7d7a), [`10e1c9a`](https://github.com/mastra-ai/mastra/commit/10e1c9a6a99c14eb055d0f409b603e07af827e68), [`13b4d7c`](https://github.com/mastra-ai/mastra/commit/13b4d7c16de34dff9095d1cd80f22f544b6cfe75), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`c04417b`](https://github.com/mastra-ai/mastra/commit/c04417ba0a2e4ded66da4352331ef29cd4bd1d79), [`cf25a03`](https://github.com/mastra-ai/mastra/commit/cf25a03132164b9dc1e5dccf7394824e33007c51), [`8a71261`](https://github.com/mastra-ai/mastra/commit/8a71261e3954ae617c6f8e25767b951f99438ab2), [`9e973b0`](https://github.com/mastra-ai/mastra/commit/9e973b010dacfa15ac82b0072897319f5234b90a), [`dd934a0`](https://github.com/mastra-ai/mastra/commit/dd934a0982ce0f78712fbd559e4f2410bf594b39), [`ba6b0c5`](https://github.com/mastra-ai/mastra/commit/ba6b0c51bfce358554fd33c7f2bcd5593633f2ff), [`a6dac0a`](https://github.com/mastra-ai/mastra/commit/a6dac0a40c7181161b1add4e8534f962bcbc9aa7), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`6c8c6c7`](https://github.com/mastra-ai/mastra/commit/6c8c6c71518394321a4692614aa4b11f3bb0a343), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`7d056b6`](https://github.com/mastra-ai/mastra/commit/7d056b6ecf603cacaa0f663ff1df025ed885b6c1), [`9cef83b`](https://github.com/mastra-ai/mastra/commit/9cef83b8a642b8098747772921e3523b492bafbc), [`d30e215`](https://github.com/mastra-ai/mastra/commit/d30e2156c746bc9fd791745cec1cc24377b66789), [`021a60f`](https://github.com/mastra-ai/mastra/commit/021a60f1f3e0135a70ef23c58be7a9b3aaffe6b4), [`73f2809`](https://github.com/mastra-ai/mastra/commit/73f2809721db24e98cdf122539652a455211b450), [`aedeea4`](https://github.com/mastra-ai/mastra/commit/aedeea48a94f728323f040478775076b9574be50), [`26f1f94`](https://github.com/mastra-ai/mastra/commit/26f1f9490574b864ba1ecedf2c9632e0767a23bd), [`8126d86`](https://github.com/mastra-ai/mastra/commit/8126d8638411eacfafdc29036ac998e8757ea66f), [`8c39f81`](https://github.com/mastra-ai/mastra/commit/8c39f815c7d06f2cd11bb099a72805a20f2ab755), [`73b45fa`](https://github.com/mastra-ai/mastra/commit/73b45facdef4fbcb8af710c50f0646f18619dbaa), [`ae97520`](https://github.com/mastra-ai/mastra/commit/ae975206fdb0f6ef03c4d5bf94f7dc7c3f706c02), [`7a7b313`](https://github.com/mastra-ai/mastra/commit/7a7b3138fb3bcf0b0c740eaea07971e43d330ef3), [`441670a`](https://github.com/mastra-ai/mastra/commit/441670a02c9dc7731c52674f55481e7848a84523)]:
81
+ - @mastra/core@1.29.0
82
+ - @mastra/mcp@1.6.0
83
+ - @mastra/memory@1.17.2
84
+
85
+ ## 0.7.20-alpha.0
86
+
87
+ ### Patch Changes
88
+
89
+ - Updated dependencies [[`c1ae974`](https://github.com/mastra-ai/mastra/commit/c1ae97491f6e57378ce880c3a397778c42adcdf1), [`10e1c9a`](https://github.com/mastra-ai/mastra/commit/10e1c9a6a99c14eb055d0f409b603e07af827e68), [`13b4d7c`](https://github.com/mastra-ai/mastra/commit/13b4d7c16de34dff9095d1cd80f22f544b6cfe75), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`6c8c6c7`](https://github.com/mastra-ai/mastra/commit/6c8c6c71518394321a4692614aa4b11f3bb0a343), [`5a4b1ee`](https://github.com/mastra-ai/mastra/commit/5a4b1ee80212969621228104995589c0fa59e575), [`ec4cb26`](https://github.com/mastra-ai/mastra/commit/ec4cb26919972eb2031fea510f8f013e1d5b7ee2), [`8c39f81`](https://github.com/mastra-ai/mastra/commit/8c39f815c7d06f2cd11bb099a72805a20f2ab755)]:
90
+ - @mastra/core@1.29.0-alpha.6
91
+ - @mastra/mcp@1.6.0-alpha.0
92
+ - @mastra/memory@1.17.2-alpha.0
93
+
94
+ ## 0.7.19
95
+
96
+ ### Patch Changes
97
+
98
+ - Updated dependencies [[`733bf53`](https://github.com/mastra-ai/mastra/commit/733bf53d9352aedd3ef38c3d501edb275b65b43c), [`5405b3b`](https://github.com/mastra-ai/mastra/commit/5405b3b35325c5b8fb34fc7ac109bd2feb7bb6fe), [`45e29cb`](https://github.com/mastra-ai/mastra/commit/45e29cb5b5737f3083eb3852db02b944b9cf37ed), [`750b4d3`](https://github.com/mastra-ai/mastra/commit/750b4d3d8231f92e769b2c485921ac5a8ca639b9), [`c321127`](https://github.com/mastra-ai/mastra/commit/c3211275fc195de9ad1ead2746b354beb8eae6e8), [`a07bcef`](https://github.com/mastra-ai/mastra/commit/a07bcefea77c03d6d322caad973dca49b4b15fa1), [`696694e`](https://github.com/mastra-ai/mastra/commit/696694e00f29241a25dd1a1b749afa06c3a626b4), [`b084a80`](https://github.com/mastra-ai/mastra/commit/b084a800db0f82d62e1fc3d6e3e3480da1ba5a53), [`82b7a96`](https://github.com/mastra-ai/mastra/commit/82b7a964169636c1d1e0c694fc892a213b0179d5), [`e20a3d2`](https://github.com/mastra-ai/mastra/commit/e20a3d2cda9b94ca6625519da2e6492c335bd009), [`df97812`](https://github.com/mastra-ai/mastra/commit/df97812bd949dcafeb074b80ecab501724b49c3b), [`8bbe360`](https://github.com/mastra-ai/mastra/commit/8bbe36042af7fc4be0244dffd8913f6795179421), [`f6b8ba8`](https://github.com/mastra-ai/mastra/commit/f6b8ba8dbf533b7a8db90c72b6805ddc804a3a72), [`a07bcef`](https://github.com/mastra-ai/mastra/commit/a07bcefea77c03d6d322caad973dca49b4b15fa1)]:
99
+ - @mastra/core@1.28.0
100
+ - @mastra/memory@1.17.1
101
+ - @mastra/mcp@1.5.2
102
+
103
+ ## 0.7.19-alpha.0
104
+
105
+ ### Patch Changes
106
+
107
+ - Updated dependencies [[`750b4d3`](https://github.com/mastra-ai/mastra/commit/750b4d3d8231f92e769b2c485921ac5a8ca639b9)]:
108
+ - @mastra/core@1.28.0-alpha.1
109
+ - @mastra/memory@1.17.1-alpha.0
110
+
111
+ ## 0.7.18
112
+
113
+ ### Patch Changes
114
+
115
+ - Updated dependencies [[`f112db1`](https://github.com/mastra-ai/mastra/commit/f112db179557ae9b5a0f1d25dc47f928d7d61cd9), [`21d9706`](https://github.com/mastra-ai/mastra/commit/21d970604d89eee970cbf8013d26d7551aff6ea5), [`0a0aa94`](https://github.com/mastra-ai/mastra/commit/0a0aa94729592e99885af2efb90c56aaada62247), [`ed07df3`](https://github.com/mastra-ai/mastra/commit/ed07df32a9d539c8261e892fc1bade783f5b41a6), [`01a7d51`](https://github.com/mastra-ai/mastra/commit/01a7d513493d21562f677f98550f7ceb165ba78c), [`6e9ab07`](https://github.com/mastra-ai/mastra/commit/6e9ab07b7120e0f4ed1e117c45db0f94840f4afd)]:
116
+ - @mastra/core@1.27.0
117
+ - @mastra/memory@1.17.0
118
+
119
+ ## 0.7.18-alpha.0
120
+
121
+ ### Patch Changes
122
+
123
+ - Updated dependencies [[`0a0aa94`](https://github.com/mastra-ai/mastra/commit/0a0aa94729592e99885af2efb90c56aaada62247), [`01a7d51`](https://github.com/mastra-ai/mastra/commit/01a7d513493d21562f677f98550f7ceb165ba78c), [`6e9ab07`](https://github.com/mastra-ai/mastra/commit/6e9ab07b7120e0f4ed1e117c45db0f94840f4afd)]:
124
+ - @mastra/core@1.27.0-alpha.1
125
+ - @mastra/memory@1.17.0-alpha.0
126
+
127
+ ## 0.7.17
128
+
129
+ ### Patch Changes
130
+
131
+ - Updated dependencies [[`20f59b8`](https://github.com/mastra-ai/mastra/commit/20f59b876cf91199efbc49a0e36b391240708f08), [`aba393e`](https://github.com/mastra-ai/mastra/commit/aba393e2da7390c69b80e516a4f153cda6f09376), [`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`e2687a7`](https://github.com/mastra-ai/mastra/commit/e2687a7408790c384563816a9a28ed06735684c9), [`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`6315317`](https://github.com/mastra-ai/mastra/commit/63153175fe9a7b224e5be7c209bbebc01dd9b0d5), [`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`7db42a9`](https://github.com/mastra-ai/mastra/commit/7db42a9cccd3b29c44fb0731f792c51575e8421c), [`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`0a5fa1d`](https://github.com/mastra-ai/mastra/commit/0a5fa1d3cb0583889d06687155f26fd7d2edc76c), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`ea43e64`](https://github.com/mastra-ai/mastra/commit/ea43e646dd95d507694b6112b0bf1df22ad552b2), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`3a347a9`](https://github.com/mastra-ai/mastra/commit/3a347a95c563df027d082bcc82ddc31b88410744), [`9d3b24b`](https://github.com/mastra-ai/mastra/commit/9d3b24b19407ae9c09586cf7766d38dc4dff4a69), [`7020c06`](https://github.com/mastra-ai/mastra/commit/7020c0690b199d9da337f0e805f16948e557922e), [`00d1b16`](https://github.com/mastra-ai/mastra/commit/00d1b16b401199cb294fa23f43336547db4dca9b), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`16e34ca`](https://github.com/mastra-ai/mastra/commit/16e34caa98b9a114b17a6125e4e3fd87f169d0d0), [`7020c06`](https://github.com/mastra-ai/mastra/commit/7020c0690b199d9da337f0e805f16948e557922e), [`8786a61`](https://github.com/mastra-ai/mastra/commit/8786a61fa54ba265f85eeff9985ca39863d18bb6), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`af8a57e`](https://github.com/mastra-ai/mastra/commit/af8a57ed9ba9685ad8601d5b71ae3706da6222f9), [`d63ffdb`](https://github.com/mastra-ai/mastra/commit/d63ffdbb2c11e76fe5ea45faab44bc15460f010c), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`1bd5104`](https://github.com/mastra-ai/mastra/commit/1bd51048b6da93507276d6623e3fd96a9e1a8944), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653), [`c65aec3`](https://github.com/mastra-ai/mastra/commit/c65aec356cc037ee7c4b30ccea946807d4c4f443), [`8f1b280`](https://github.com/mastra-ai/mastra/commit/8f1b280b7fe6999ec654f160cb69c1a8719e7a57), [`92dcf02`](https://github.com/mastra-ai/mastra/commit/92dcf029294210ac91b090900c1a0555a425c57a), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`8fb2405`](https://github.com/mastra-ai/mastra/commit/8fb2405138f2d208b7962ad03f121ca25bcc28c5), [`12df98c`](https://github.com/mastra-ai/mastra/commit/12df98c4904643d9481f5c78f3bed443725b4c96)]:
132
+ - @mastra/core@1.26.0
133
+ - @mastra/schema-compat@1.2.9
134
+ - @mastra/memory@1.16.0
135
+ - @mastra/mcp@1.5.1
136
+
137
+ ## 0.7.17-alpha.4
138
+
139
+ ### Patch Changes
140
+
141
+ - Updated dependencies [[`a371ac5`](https://github.com/mastra-ai/mastra/commit/a371ac534aa1bb368a1acf9d8b313378dfdc787e), [`3a347a9`](https://github.com/mastra-ai/mastra/commit/3a347a95c563df027d082bcc82ddc31b88410744), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e), [`c80dc16`](https://github.com/mastra-ai/mastra/commit/c80dc16e113e6cc159f510ffde501ad4711b2189), [`47cee3e`](https://github.com/mastra-ai/mastra/commit/47cee3e137fe39109cf7fffd2a8cf47b76dc702e)]:
142
+ - @mastra/core@1.26.0-alpha.12
143
+ - @mastra/memory@1.16.0-alpha.4
144
+
145
+ ## 0.7.17-alpha.3
146
+
147
+ ### Patch Changes
148
+
149
+ - Updated dependencies [[`aba393e`](https://github.com/mastra-ai/mastra/commit/aba393e2da7390c69b80e516a4f153cda6f09376), [`0a5fa1d`](https://github.com/mastra-ai/mastra/commit/0a5fa1d3cb0583889d06687155f26fd7d2edc76c), [`ea43e64`](https://github.com/mastra-ai/mastra/commit/ea43e646dd95d507694b6112b0bf1df22ad552b2), [`00d1b16`](https://github.com/mastra-ai/mastra/commit/00d1b16b401199cb294fa23f43336547db4dca9b), [`af8a57e`](https://github.com/mastra-ai/mastra/commit/af8a57ed9ba9685ad8601d5b71ae3706da6222f9)]:
150
+ - @mastra/core@1.26.0-alpha.10
151
+ - @mastra/memory@1.16.0-alpha.3
152
+
153
+ ## 0.7.17-alpha.2
154
+
155
+ ### Patch Changes
156
+
157
+ - Updated dependencies [[`0474c2b`](https://github.com/mastra-ai/mastra/commit/0474c2b2e7c7e1ad8691dca031284841391ff1ef), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`f607106`](https://github.com/mastra-ai/mastra/commit/f607106854c6416c4a07d4082604b9f66d047221), [`62919a6`](https://github.com/mastra-ai/mastra/commit/62919a6ee0fbf3779ad21a97b1ec6696515d5104), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3), [`0fd90a2`](https://github.com/mastra-ai/mastra/commit/0fd90a215caf5fca8099c15a67ca03e4427747a3)]:
158
+ - @mastra/core@1.26.0-alpha.4
159
+ - @mastra/memory@1.16.0-alpha.2
160
+
161
+ ## 0.7.17-alpha.1
162
+
163
+ ### Patch Changes
164
+
165
+ - Updated dependencies [[`fdd54cf`](https://github.com/mastra-ai/mastra/commit/fdd54cf612a9af876e9fdd85e534454f6e7dd518), [`7db42a9`](https://github.com/mastra-ai/mastra/commit/7db42a9cccd3b29c44fb0731f792c51575e8421c), [`30456b6`](https://github.com/mastra-ai/mastra/commit/30456b6b08c8fd17e109dd093b73d93b65e83bc5), [`9d11a8c`](https://github.com/mastra-ai/mastra/commit/9d11a8c1c8924eb975a245a5884d40ca1b7e0491), [`d246696`](https://github.com/mastra-ai/mastra/commit/d246696139a3144a5b21b042d41c532688e957e1), [`354f9ce`](https://github.com/mastra-ai/mastra/commit/354f9ce1ca6af2074b6a196a23f8ec30012dccca), [`e9837b5`](https://github.com/mastra-ai/mastra/commit/e9837b53699e18711b09e0ca010a4106376f2653)]:
166
+ - @mastra/core@1.26.0-alpha.3
167
+ - @mastra/schema-compat@1.2.9-alpha.1
168
+ - @mastra/mcp@1.5.1-alpha.1
169
+ - @mastra/memory@1.16.0-alpha.1
170
+
171
+ ## 0.7.17-alpha.0
172
+
173
+ ### Patch Changes
174
+
175
+ - Updated dependencies [[`3d83d06`](https://github.com/mastra-ai/mastra/commit/3d83d06f776f00fb5f4163dddd32a030c5c20844), [`7e0e63e`](https://github.com/mastra-ai/mastra/commit/7e0e63e2e485e84442351f4c7a79a424c83539dc), [`9467ea8`](https://github.com/mastra-ai/mastra/commit/9467ea87695749a53dfc041576410ebf9ee7bb67), [`7338d94`](https://github.com/mastra-ai/mastra/commit/7338d949380cf68b095342e8e42610dc51d557c1), [`c65aec3`](https://github.com/mastra-ai/mastra/commit/c65aec356cc037ee7c4b30ccea946807d4c4f443)]:
176
+ - @mastra/core@1.26.0-alpha.2
177
+ - @mastra/memory@1.16.0-alpha.0
178
+ - @mastra/schema-compat@1.2.9-alpha.0
179
+ - @mastra/mcp@1.5.1-alpha.1
180
+
181
+ ## 0.7.16
182
+
183
+ ### Patch Changes
184
+
185
+ - Resolving stored agent versions no longer mutates the shared singleton agent instance. Instruction and tool overrides are now applied to an isolated clone, making concurrent version resolution safe and preventing overrides from leaking onto the global agent. ([#15314](https://github.com/mastra-ai/mastra/pull/15314))
186
+
187
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`8fad147`](https://github.com/mastra-ai/mastra/commit/8fad14759804179c8e080ce4d9dec6ef1a808b31), [`582644c`](https://github.com/mastra-ai/mastra/commit/582644c4a87f83b4f245a84d72b9e8590585012e), [`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e), [`5d84914`](https://github.com/mastra-ai/mastra/commit/5d84914e0e520c642a40329b210b413fcd139898), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fd2f314`](https://github.com/mastra-ai/mastra/commit/fd2f31473d3449b6b97e837ef8641264377f41a7), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`e80fead`](https://github.com/mastra-ai/mastra/commit/e80fead1412cc0d1b2f7d6a1ce5017d9e0098ff7), [`0287b64`](https://github.com/mastra-ai/mastra/commit/0287b644a5c3272755cf3112e71338106664103b), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6), [`5cf84a3`](https://github.com/mastra-ai/mastra/commit/5cf84a3e2b7aa69b3f674a6f312f1bf0ed7ebead), [`2a69802`](https://github.com/mastra-ai/mastra/commit/2a69802a0fc6d8a25a77fa6a42276e9d59a83914), [`5f3d4dd`](https://github.com/mastra-ai/mastra/commit/5f3d4ddf237241f4b238ac062ac61eadabed0770), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
188
+ - @mastra/core@1.25.0
189
+ - @mastra/memory@1.15.1
190
+ - @mastra/mcp@1.5.0
191
+ - @mastra/schema-compat@1.2.8
192
+
193
+ ## 0.7.16-alpha.2
194
+
195
+ ### Patch Changes
196
+
197
+ - Resolving stored agent versions no longer mutates the shared singleton agent instance. Instruction and tool overrides are now applied to an isolated clone, making concurrent version resolution safe and preventing overrides from leaking onto the global agent. ([#15314](https://github.com/mastra-ai/mastra/pull/15314))
198
+
199
+ - Updated dependencies [[`cbdf3e1`](https://github.com/mastra-ai/mastra/commit/cbdf3e12b3d0c30a6e5347be658e2009648c130a), [`8fe46d3`](https://github.com/mastra-ai/mastra/commit/8fe46d354027f3f0f0846e64219772348de106dd), [`18c67db`](https://github.com/mastra-ai/mastra/commit/18c67dbb9c9ebc26f26f65f7d3ff836e5691ef46), [`8dcc77e`](https://github.com/mastra-ai/mastra/commit/8dcc77e78a5340f5848f74b9e9f1b3da3513c1f5), [`aa67fc5`](https://github.com/mastra-ai/mastra/commit/aa67fc59ee8a5eeff1f23eb05970b8d7a536c8ff), [`fa8140b`](https://github.com/mastra-ai/mastra/commit/fa8140bcd4251d2e3ac85fdc5547dfc4f372b5be), [`190f452`](https://github.com/mastra-ai/mastra/commit/190f45258b0640e2adfc8219fa3258cdc5b8f071), [`7e7bf60`](https://github.com/mastra-ai/mastra/commit/7e7bf606886bf374a6f9d4ca9b09dd83d0533372), [`184907d`](https://github.com/mastra-ai/mastra/commit/184907d775d8609c03c26e78ccaf37315f3aa287), [`5f3d4dd`](https://github.com/mastra-ai/mastra/commit/5f3d4ddf237241f4b238ac062ac61eadabed0770), [`0c4cd13`](https://github.com/mastra-ai/mastra/commit/0c4cd131931c04ac5405373c932a242dbe88edd6), [`b16a753`](https://github.com/mastra-ai/mastra/commit/b16a753d5748440248d7df82e29bb987a9c8386c)]:
200
+ - @mastra/core@1.25.0-alpha.3
201
+ - @mastra/mcp@1.5.0-alpha.0
202
+
203
+ ## 0.7.16-alpha.1
204
+
205
+ ### Patch Changes
206
+
207
+ - Updated dependencies [[`4ba3bb1`](https://github.com/mastra-ai/mastra/commit/4ba3bb1e465ad2ddaba3bbf2bc47e0faec32985e), [`2a69802`](https://github.com/mastra-ai/mastra/commit/2a69802a0fc6d8a25a77fa6a42276e9d59a83914)]:
208
+ - @mastra/core@1.25.0-alpha.2
209
+ - @mastra/schema-compat@1.2.8-alpha.0
210
+ - @mastra/mcp@1.4.2
211
+ - @mastra/memory@1.15.1-alpha.1
212
+
213
+ ## 0.7.16-alpha.0
214
+
215
+ ### Patch Changes
216
+
217
+ - Updated dependencies [[`87df955`](https://github.com/mastra-ai/mastra/commit/87df955c028660c075873fd5d74af28233ce32eb), [`075e91a`](https://github.com/mastra-ai/mastra/commit/075e91a4549baf46ad7a42a6a8ac8dfa78cc09e6)]:
218
+ - @mastra/core@1.24.2-alpha.0
219
+ - @mastra/memory@1.15.1-alpha.0
220
+
221
+ ## 0.7.15
222
+
223
+ ### Patch Changes
224
+
225
+ - Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`60b7d4a`](https://github.com/mastra-ai/mastra/commit/60b7d4a428c6caeca94f4740978359bb40c4ab37), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa), [`153e864`](https://github.com/mastra-ai/mastra/commit/153e86476b425db7cd0dc8490050096e92964a38), [`f308d62`](https://github.com/mastra-ai/mastra/commit/f308d6206a083eeaccbca782be062c57076935d7), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa), [`6f714ec`](https://github.com/mastra-ai/mastra/commit/6f714ec9a5614222761fd6ea3d53af1da9ab6034), [`98209a0`](https://github.com/mastra-ai/mastra/commit/98209a03c35c5479c25cca26ee0c63eff81e6d74), [`2bdb5fd`](https://github.com/mastra-ai/mastra/commit/2bdb5fd887bfd81bdb71c4a5db22a4fda99f2591)]:
226
+ - @mastra/core@1.24.0
227
+ - @mastra/memory@1.15.0
228
+ - @mastra/mcp@1.4.2
229
+
230
+ ## 0.7.15-alpha.3
231
+
232
+ ### Patch Changes
233
+
234
+ - Updated dependencies [[`60b7d4a`](https://github.com/mastra-ai/mastra/commit/60b7d4a428c6caeca94f4740978359bb40c4ab37)]:
235
+ - @mastra/memory@1.15.0-alpha.3
236
+
237
+ ## 0.7.15-alpha.2
238
+
239
+ ### Patch Changes
240
+
241
+ - Updated dependencies [[`6f714ec`](https://github.com/mastra-ai/mastra/commit/6f714ec9a5614222761fd6ea3d53af1da9ab6034), [`2bdb5fd`](https://github.com/mastra-ai/mastra/commit/2bdb5fd887bfd81bdb71c4a5db22a4fda99f2591)]:
242
+ - @mastra/memory@1.15.0-alpha.2
243
+ - @mastra/mcp@1.4.2-alpha.1
244
+
245
+ ## 0.7.15-alpha.1
246
+
247
+ ### Patch Changes
248
+
249
+ - Updated dependencies [[`8db7663`](https://github.com/mastra-ai/mastra/commit/8db7663c9a9c735828094c359d2e327fd4f8fba3), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa), [`715710d`](https://github.com/mastra-ai/mastra/commit/715710d12fa47cf88e09d41f13843eddc29327b0), [`378c6c4`](https://github.com/mastra-ai/mastra/commit/378c6c4755726e8d8cf83a14809b350b90d46c62), [`9f91fd5`](https://github.com/mastra-ai/mastra/commit/9f91fd538ab2a44f8cc740bcad8e51205f74fbea), [`ba6fa9c`](https://github.com/mastra-ai/mastra/commit/ba6fa9cc0f3e1912c49fd70d4c3bb8c44903ddaa)]:
250
+ - @mastra/core@1.24.0-alpha.1
251
+ - @mastra/memory@1.15.0-alpha.1
252
+
253
+ ## 0.7.15-alpha.0
254
+
255
+ ### Patch Changes
256
+
257
+ - Updated dependencies [[`f308d62`](https://github.com/mastra-ai/mastra/commit/f308d6206a083eeaccbca782be062c57076935d7)]:
258
+ - @mastra/memory@1.15.0-alpha.0
259
+
260
+ ## 0.7.14
261
+
262
+ ### Patch Changes
263
+
264
+ - Updated dependencies [[`f32b9e1`](https://github.com/mastra-ai/mastra/commit/f32b9e115a3c754d1c8cfa3f4256fba87b09cfb7), [`7d6f521`](https://github.com/mastra-ai/mastra/commit/7d6f52164d0cca099f0b07cb2bba334360f1c8ab), [`a50d220`](https://github.com/mastra-ai/mastra/commit/a50d220b01ecbc5644d489a3d446c3bd4ab30245), [`665477b`](https://github.com/mastra-ai/mastra/commit/665477bc104fd52cfef8e7610d7664781a70c220), [`4cc2755`](https://github.com/mastra-ai/mastra/commit/4cc2755a7194cb08720ff2ab4dffb4b4a5103dfd), [`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`ed425d7`](https://github.com/mastra-ai/mastra/commit/ed425d78e7c66cbda8209fee910856f98c6c6b82), [`a4c0c78`](https://github.com/mastra-ai/mastra/commit/a4c0c78264013624e5fe369f9a27aa25f3401012), [`1371703`](https://github.com/mastra-ai/mastra/commit/1371703835080450ef3f9aea58059a95d0da2e5a), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`98f8a8b`](https://github.com/mastra-ai/mastra/commit/98f8a8bdf5761b9982f3ad3acbe7f1cc3efa71f3), [`ba6f7e9`](https://github.com/mastra-ai/mastra/commit/ba6f7e9086d8281393f2acae60fda61de3bff1f9), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a), [`aced936`](https://github.com/mastra-ai/mastra/commit/aced93644d7544ef631c530b960ba1278dcef7f4), [`1805ddc`](https://github.com/mastra-ai/mastra/commit/1805ddc9c9b3b14b63749735a13c05a45af43a80), [`fff91cf`](https://github.com/mastra-ai/mastra/commit/fff91cf914de0e731578aacebffdeebef82f0440), [`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
265
+ - @mastra/core@1.23.0
266
+ - @mastra/memory@1.14.0
267
+
268
+ ## 0.7.14-alpha.2
269
+
270
+ ### Patch Changes
271
+
272
+ - Updated dependencies [[`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`0df8321`](https://github.com/mastra-ai/mastra/commit/0df832196eeb2450ab77ce887e8553abdd44c5a6), [`aced936`](https://github.com/mastra-ai/mastra/commit/aced93644d7544ef631c530b960ba1278dcef7f4), [`ac7baf6`](https://github.com/mastra-ai/mastra/commit/ac7baf66ef1db15e03975ef4ebb02724f015a391), [`61109b3`](https://github.com/mastra-ai/mastra/commit/61109b34feb0e38d54bee4b8ca83eb7345b1d557), [`33f1ead`](https://github.com/mastra-ai/mastra/commit/33f1eadfa19c86953f593478e5fa371093b33779)]:
273
+ - @mastra/core@1.23.0-alpha.8
274
+ - @mastra/memory@1.14.0-alpha.2
275
+
276
+ ## 0.7.14-alpha.1
277
+
278
+ ### Patch Changes
279
+
280
+ - Updated dependencies [[`a4c0c78`](https://github.com/mastra-ai/mastra/commit/a4c0c78264013624e5fe369f9a27aa25f3401012), [`fff91cf`](https://github.com/mastra-ai/mastra/commit/fff91cf914de0e731578aacebffdeebef82f0440)]:
281
+ - @mastra/memory@1.14.0-alpha.1
282
+ - @mastra/core@1.23.0-alpha.4
283
+
284
+ ## 0.7.14-alpha.0
285
+
286
+ ### Patch Changes
287
+
288
+ - Updated dependencies [[`ed425d7`](https://github.com/mastra-ai/mastra/commit/ed425d78e7c66cbda8209fee910856f98c6c6b82), [`ba6f7e9`](https://github.com/mastra-ai/mastra/commit/ba6f7e9086d8281393f2acae60fda61de3bff1f9), [`7eb2596`](https://github.com/mastra-ai/mastra/commit/7eb25960d607e07468c9a10c5437abd2deaf1e9a)]:
289
+ - @mastra/core@1.23.0-alpha.0
290
+ - @mastra/memory@1.13.2-alpha.0
11
291
 
12
292
  ## 0.7.13
13
293
 
package/dist/index.cjs CHANGED
@@ -270,6 +270,9 @@ function renderTemplate(template, context) {
270
270
  (match, variablePath, singleFallback, doubleFallback) => {
271
271
  const resolved = resolvePath2(context, variablePath);
272
272
  if (resolved !== void 0 && resolved !== null) {
273
+ if (typeof resolved === "object") {
274
+ return JSON.stringify(resolved);
275
+ }
273
276
  return String(resolved);
274
277
  }
275
278
  const fallback = singleFallback ?? doubleFallback;
@@ -436,7 +439,7 @@ function buildWorkflow(entries, workflowId, ctx) {
436
439
  }
437
440
  const subWorkflow = buildWorkflow(branchEntries, `${workflowId}-parallel-branch-${branchIdx}`, ctx);
438
441
  return subWorkflow;
439
- }).filter(Boolean);
442
+ }).filter((s) => Boolean(s));
440
443
  if (branchSteps.length > 0) {
441
444
  workflow = workflow.parallel(branchSteps);
442
445
  workflow = workflow.map(mergeBranchOutputs);
@@ -538,7 +541,7 @@ var EditorMCPNamespace = class _EditorMCPNamespace extends CrudEditorNamespace {
538
541
  * Converts `url` from string to URL for HTTP servers.
539
542
  * Returns a plain object — callers must pass it to `new MCPClient()`.
540
543
  */
541
- static toMCPServerDefinition(serverConfig) {
544
+ static toMCPServerDefinition(serverConfig, requestInit) {
542
545
  if (serverConfig.type === "stdio") {
543
546
  return {
544
547
  command: serverConfig.command,
@@ -549,23 +552,23 @@ var EditorMCPNamespace = class _EditorMCPNamespace extends CrudEditorNamespace {
549
552
  }
550
553
  return {
551
554
  url: new URL(serverConfig.url),
552
- timeout: serverConfig.timeout
555
+ timeout: serverConfig.timeout,
556
+ ...requestInit ? { requestInit } : {}
553
557
  };
554
558
  }
555
559
  /**
556
560
  * Convert all servers in a stored MCP client to MCPClientOptions shape.
557
561
  */
558
- static toMCPClientOptions(config) {
562
+ static toMCPClientOptions(config, requestInit) {
559
563
  const servers = {};
560
564
  for (const [name, serverConfig] of Object.entries(config.servers)) {
561
- servers[name] = _EditorMCPNamespace.toMCPServerDefinition(serverConfig);
565
+ servers[name] = _EditorMCPNamespace.toMCPServerDefinition(serverConfig, requestInit);
562
566
  }
563
567
  return { id: config.id, servers };
564
568
  }
565
569
  };
566
570
 
567
571
  // src/namespaces/agent.ts
568
- var codeDefaults = /* @__PURE__ */ new WeakMap();
569
572
  var EditorAgentNamespace = class extends CrudEditorNamespace {
570
573
  async getStorageAdapter() {
571
574
  const storage = this.mastra?.getStorage();
@@ -657,13 +660,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
657
660
  * they may contain SDK instances or dynamic functions that cannot be safely serialized.
658
661
  * Returns the (possibly mutated) agent.
659
662
  */
660
- clearResolvedVersionId(agent) {
661
- const raw = agent.toRawConfig();
662
- if (!raw || !("resolvedVersionId" in raw)) return;
663
- const { resolvedVersionId: _removed, ...rest } = raw;
664
- agent.__setRawConfig(rest);
665
- }
666
- async applyStoredOverrides(agent, options) {
663
+ async applyStoredOverrides(agent, options, requestContext) {
667
664
  let storedConfig = null;
668
665
  try {
669
666
  this.ensureRegistered();
@@ -674,29 +671,21 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
674
671
  if (options && "versionId" in options) {
675
672
  throw error;
676
673
  }
677
- this.restoreCodeDefaults(agent);
678
- this.clearResolvedVersionId(agent);
679
674
  return agent;
680
675
  }
681
676
  if (!storedConfig) {
682
- this.restoreCodeDefaults(agent);
683
- this.clearResolvedVersionId(agent);
684
677
  return agent;
685
678
  }
686
679
  const requestedPublished = options && !("versionId" in options) && options.status === "published";
687
680
  if (requestedPublished && !storedConfig.activeVersionId) {
688
- this.restoreCodeDefaults(agent);
689
- this.clearResolvedVersionId(agent);
690
681
  return agent;
691
682
  }
692
- this.saveCodeDefaults(agent);
693
- this.restoreCodeDefaults(agent);
694
- this.saveCodeDefaults(agent);
683
+ const fork = agent.__fork();
695
684
  this.logger?.debug(`[applyStoredOverrides] Applying stored overrides to code agent "${agent.id}"`);
696
685
  if (storedConfig.instructions !== void 0 && storedConfig.instructions !== null) {
697
686
  const resolved = this.resolveStoredInstructions(storedConfig.instructions);
698
687
  if (resolved !== void 0) {
699
- agent.__updateInstructions(resolved);
688
+ fork.__updateInstructions(resolved);
700
689
  }
701
690
  }
702
691
  const hasStoredTools = storedConfig.tools != null;
@@ -708,10 +697,10 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
708
697
  const hasConditionalIntegrationTools = storedConfig.integrationTools != null && this.isConditionalVariants(storedConfig.integrationTools);
709
698
  const isDynamicTools = hasConditionalTools || hasConditionalMCPClients || hasConditionalIntegrationTools;
710
699
  if (isDynamicTools) {
711
- const originalTools = agent.listTools.bind(agent);
712
- const toolsFn = async ({ requestContext }) => {
713
- const codeTools = await originalTools({ requestContext });
714
- const ctx = requestContext.toJSON();
700
+ const originalTools = fork.listTools.bind(fork);
701
+ const toolsFn = async ({ requestContext: requestContext2 }) => {
702
+ const codeTools = await originalTools({ requestContext: requestContext2 });
703
+ const ctx = requestContext2.toJSON();
715
704
  const resolvedToolsConfig = hasConditionalTools ? this.accumulateObjectVariants(
716
705
  storedConfig.tools,
717
706
  ctx
@@ -721,7 +710,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
721
710
  storedConfig.mcpClients,
722
711
  ctx
723
712
  ) : storedConfig.mcpClients;
724
- const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig);
713
+ const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig, requestContext2);
725
714
  const resolvedIntegrationToolsConfig = hasConditionalIntegrationTools ? this.accumulateObjectVariants(
726
715
  storedConfig.integrationTools,
727
716
  ctx
@@ -729,55 +718,27 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
729
718
  const integrationTools = await this.resolveStoredIntegrationTools(resolvedIntegrationToolsConfig, ctx);
730
719
  return { ...codeTools, ...registryTools, ...mcpTools, ...integrationTools };
731
720
  };
732
- agent.__setTools(toolsFn);
721
+ fork.__setTools(toolsFn);
733
722
  } else {
734
- const codeTools = await agent.listTools();
723
+ const codeTools = await fork.listTools();
735
724
  const registryTools = this.resolveStoredTools(
736
725
  storedConfig.tools
737
726
  );
738
727
  const mcpTools = await this.resolveStoredMCPTools(
739
- storedConfig.mcpClients
728
+ storedConfig.mcpClients,
729
+ requestContext
740
730
  );
741
731
  const integrationTools = await this.resolveStoredIntegrationTools(
742
732
  storedConfig.integrationTools
743
733
  );
744
- agent.__setTools({ ...codeTools, ...registryTools, ...mcpTools, ...integrationTools });
734
+ fork.__setTools({ ...codeTools, ...registryTools, ...mcpTools, ...integrationTools });
745
735
  }
746
736
  }
747
737
  if (storedConfig.resolvedVersionId) {
748
- const existing = agent.toRawConfig() ?? {};
749
- agent.__setRawConfig({ ...existing, resolvedVersionId: storedConfig.resolvedVersionId });
750
- } else {
751
- this.clearResolvedVersionId(agent);
738
+ const existing = fork.toRawConfig() ?? {};
739
+ fork.__setRawConfig({ ...existing, resolvedVersionId: storedConfig.resolvedVersionId });
752
740
  }
753
- return agent;
754
- }
755
- /**
756
- * Save the agent's current field values to the module-level WeakMap
757
- * so they can be restored if the stored config is later removed.
758
- * Only saves on the first call (guards against overwriting originals with overridden values).
759
- *
760
- * Only instructions and tools are saved — these are the only fields
761
- * that `applyStoredOverrides` mutates.
762
- */
763
- saveCodeDefaults(agent) {
764
- if (codeDefaults.has(agent)) return;
765
- const fields = agent.__getOverridableFields();
766
- codeDefaults.set(agent, {
767
- instructions: fields.instructions,
768
- tools: fields.tools
769
- });
770
- }
771
- /**
772
- * Restore the agent's original code-defined field values from the WeakMap.
773
- * Clears the saved snapshot afterward.
774
- */
775
- restoreCodeDefaults(agent) {
776
- const saved = codeDefaults.get(agent);
777
- if (!saved) return;
778
- agent.__updateInstructions(saved.instructions);
779
- agent.__setTools(saved.tools);
780
- codeDefaults.delete(agent);
741
+ return fork;
781
742
  }
782
743
  // ============================================================================
783
744
  // Private helpers
@@ -850,7 +811,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
850
811
  storedAgent.mcpClients,
851
812
  ctx
852
813
  ) : storedAgent.mcpClients;
853
- const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig);
814
+ const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig, requestContext);
854
815
  const resolvedIntegrationToolsConfig = hasConditionalIntegrationTools ? this.accumulateObjectVariants(
855
816
  storedAgent.integrationTools,
856
817
  ctx
@@ -1083,10 +1044,12 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1083
1044
  * When `clientToolsConfig.tools` is an empty object `{}`, all tools from the source are included.
1084
1045
  * When specified with keys, only listed tools are included with optional description overrides.
1085
1046
  */
1086
- async resolveStoredMCPTools(mcpClients) {
1047
+ async resolveStoredMCPTools(mcpClients, requestContext) {
1087
1048
  if (!mcpClients || Object.keys(mcpClients).length === 0) return {};
1088
1049
  if (!this.mastra) return {};
1089
1050
  const allTools = {};
1051
+ const authToken = requestContext?.get("mastra__authToken");
1052
+ const authRequestInit = authToken ? { headers: { Authorization: `Bearer ${authToken}` } } : void 0;
1090
1053
  let MCPClient;
1091
1054
  for (const [clientId, clientToolsConfig] of Object.entries(mcpClients)) {
1092
1055
  try {
@@ -1105,7 +1068,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1105
1068
  continue;
1106
1069
  }
1107
1070
  }
1108
- const clientOptions = EditorMCPNamespace.toMCPClientOptions(storedClient);
1071
+ const clientOptions = EditorMCPNamespace.toMCPClientOptions(storedClient, authRequestInit);
1109
1072
  const client = new MCPClient(clientOptions);
1110
1073
  tools = await client.listTools();
1111
1074
  this.logger?.debug(`[resolveStoredMCPTools] Loaded tools from stored MCP client "${clientId}"`);
@@ -1130,9 +1093,10 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1130
1093
  if (!(bareToolName in clientServers[serverName].tools)) continue;
1131
1094
  }
1132
1095
  const hasAgentFilter = agentAllowedTools && Object.keys(agentAllowedTools).length > 0;
1133
- if (hasAgentFilter && !(namespacedToolName in agentAllowedTools)) continue;
1096
+ if (hasAgentFilter && !(namespacedToolName in agentAllowedTools) && !(bareToolName in agentAllowedTools))
1097
+ continue;
1134
1098
  const serverToolConfig = serverName ? clientServers?.[serverName]?.tools?.[bareToolName] : void 0;
1135
- const description = agentAllowedTools?.[namespacedToolName]?.description ?? serverToolConfig?.description;
1099
+ const description = agentAllowedTools?.[namespacedToolName]?.description ?? agentAllowedTools?.[bareToolName]?.description ?? serverToolConfig?.description;
1136
1100
  if (description) {
1137
1101
  allTools[namespacedToolName] = { ...tool, description };
1138
1102
  } else {
package/dist/index.d.cts CHANGED
@@ -115,26 +115,11 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
115
115
  * they may contain SDK instances or dynamic functions that cannot be safely serialized.
116
116
  * Returns the (possibly mutated) agent.
117
117
  */
118
- private clearResolvedVersionId;
119
118
  applyStoredOverrides(agent: Agent, options?: {
120
119
  status?: 'draft' | 'published';
121
120
  } | {
122
121
  versionId: string;
123
- }): Promise<Agent>;
124
- /**
125
- * Save the agent's current field values to the module-level WeakMap
126
- * so they can be restored if the stored config is later removed.
127
- * Only saves on the first call (guards against overwriting originals with overridden values).
128
- *
129
- * Only instructions and tools are saved — these are the only fields
130
- * that `applyStoredOverrides` mutates.
131
- */
132
- private saveCodeDefaults;
133
- /**
134
- * Restore the agent's original code-defined field values from the WeakMap.
135
- * Clears the saved snapshot afterward.
136
- */
137
- private restoreCodeDefaults;
122
+ }, requestContext?: RequestContext): Promise<Agent>;
138
123
  /**
139
124
  * Detect whether a StorageConditionalField value is a conditional variant array
140
125
  * (as opposed to the plain static value T).
@@ -230,11 +215,15 @@ declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPCli
230
215
  * Converts `url` from string to URL for HTTP servers.
231
216
  * Returns a plain object — callers must pass it to `new MCPClient()`.
232
217
  */
233
- static toMCPServerDefinition(serverConfig: StorageMCPServerConfig): Record<string, unknown>;
218
+ static toMCPServerDefinition(serverConfig: StorageMCPServerConfig, requestInit?: {
219
+ headers: Record<string, string>;
220
+ }): Record<string, unknown>;
234
221
  /**
235
222
  * Convert all servers in a stored MCP client to MCPClientOptions shape.
236
223
  */
237
- static toMCPClientOptions(config: StorageResolvedMCPClientType): {
224
+ static toMCPClientOptions(config: StorageResolvedMCPClientType, requestInit?: {
225
+ headers: Record<string, string>;
226
+ }): {
238
227
  id: string;
239
228
  servers: Record<string, Record<string, unknown>>;
240
229
  };
package/dist/index.d.ts CHANGED
@@ -115,26 +115,11 @@ declare class EditorAgentNamespace extends CrudEditorNamespace<StorageCreateAgen
115
115
  * they may contain SDK instances or dynamic functions that cannot be safely serialized.
116
116
  * Returns the (possibly mutated) agent.
117
117
  */
118
- private clearResolvedVersionId;
119
118
  applyStoredOverrides(agent: Agent, options?: {
120
119
  status?: 'draft' | 'published';
121
120
  } | {
122
121
  versionId: string;
123
- }): Promise<Agent>;
124
- /**
125
- * Save the agent's current field values to the module-level WeakMap
126
- * so they can be restored if the stored config is later removed.
127
- * Only saves on the first call (guards against overwriting originals with overridden values).
128
- *
129
- * Only instructions and tools are saved — these are the only fields
130
- * that `applyStoredOverrides` mutates.
131
- */
132
- private saveCodeDefaults;
133
- /**
134
- * Restore the agent's original code-defined field values from the WeakMap.
135
- * Clears the saved snapshot afterward.
136
- */
137
- private restoreCodeDefaults;
122
+ }, requestContext?: RequestContext): Promise<Agent>;
138
123
  /**
139
124
  * Detect whether a StorageConditionalField value is a conditional variant array
140
125
  * (as opposed to the plain static value T).
@@ -230,11 +215,15 @@ declare class EditorMCPNamespace extends CrudEditorNamespace<StorageCreateMCPCli
230
215
  * Converts `url` from string to URL for HTTP servers.
231
216
  * Returns a plain object — callers must pass it to `new MCPClient()`.
232
217
  */
233
- static toMCPServerDefinition(serverConfig: StorageMCPServerConfig): Record<string, unknown>;
218
+ static toMCPServerDefinition(serverConfig: StorageMCPServerConfig, requestInit?: {
219
+ headers: Record<string, string>;
220
+ }): Record<string, unknown>;
234
221
  /**
235
222
  * Convert all servers in a stored MCP client to MCPClientOptions shape.
236
223
  */
237
- static toMCPClientOptions(config: StorageResolvedMCPClientType): {
224
+ static toMCPClientOptions(config: StorageResolvedMCPClientType, requestInit?: {
225
+ headers: Record<string, string>;
226
+ }): {
238
227
  id: string;
239
228
  servers: Record<string, Record<string, unknown>>;
240
229
  };
package/dist/index.js CHANGED
@@ -222,6 +222,9 @@ function renderTemplate(template, context) {
222
222
  (match, variablePath, singleFallback, doubleFallback) => {
223
223
  const resolved = resolvePath2(context, variablePath);
224
224
  if (resolved !== void 0 && resolved !== null) {
225
+ if (typeof resolved === "object") {
226
+ return JSON.stringify(resolved);
227
+ }
225
228
  return String(resolved);
226
229
  }
227
230
  const fallback = singleFallback ?? doubleFallback;
@@ -388,7 +391,7 @@ function buildWorkflow(entries, workflowId, ctx) {
388
391
  }
389
392
  const subWorkflow = buildWorkflow(branchEntries, `${workflowId}-parallel-branch-${branchIdx}`, ctx);
390
393
  return subWorkflow;
391
- }).filter(Boolean);
394
+ }).filter((s) => Boolean(s));
392
395
  if (branchSteps.length > 0) {
393
396
  workflow = workflow.parallel(branchSteps);
394
397
  workflow = workflow.map(mergeBranchOutputs);
@@ -490,7 +493,7 @@ var EditorMCPNamespace = class _EditorMCPNamespace extends CrudEditorNamespace {
490
493
  * Converts `url` from string to URL for HTTP servers.
491
494
  * Returns a plain object — callers must pass it to `new MCPClient()`.
492
495
  */
493
- static toMCPServerDefinition(serverConfig) {
496
+ static toMCPServerDefinition(serverConfig, requestInit) {
494
497
  if (serverConfig.type === "stdio") {
495
498
  return {
496
499
  command: serverConfig.command,
@@ -501,23 +504,23 @@ var EditorMCPNamespace = class _EditorMCPNamespace extends CrudEditorNamespace {
501
504
  }
502
505
  return {
503
506
  url: new URL(serverConfig.url),
504
- timeout: serverConfig.timeout
507
+ timeout: serverConfig.timeout,
508
+ ...requestInit ? { requestInit } : {}
505
509
  };
506
510
  }
507
511
  /**
508
512
  * Convert all servers in a stored MCP client to MCPClientOptions shape.
509
513
  */
510
- static toMCPClientOptions(config) {
514
+ static toMCPClientOptions(config, requestInit) {
511
515
  const servers = {};
512
516
  for (const [name, serverConfig] of Object.entries(config.servers)) {
513
- servers[name] = _EditorMCPNamespace.toMCPServerDefinition(serverConfig);
517
+ servers[name] = _EditorMCPNamespace.toMCPServerDefinition(serverConfig, requestInit);
514
518
  }
515
519
  return { id: config.id, servers };
516
520
  }
517
521
  };
518
522
 
519
523
  // src/namespaces/agent.ts
520
- var codeDefaults = /* @__PURE__ */ new WeakMap();
521
524
  var EditorAgentNamespace = class extends CrudEditorNamespace {
522
525
  async getStorageAdapter() {
523
526
  const storage = this.mastra?.getStorage();
@@ -609,13 +612,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
609
612
  * they may contain SDK instances or dynamic functions that cannot be safely serialized.
610
613
  * Returns the (possibly mutated) agent.
611
614
  */
612
- clearResolvedVersionId(agent) {
613
- const raw = agent.toRawConfig();
614
- if (!raw || !("resolvedVersionId" in raw)) return;
615
- const { resolvedVersionId: _removed, ...rest } = raw;
616
- agent.__setRawConfig(rest);
617
- }
618
- async applyStoredOverrides(agent, options) {
615
+ async applyStoredOverrides(agent, options, requestContext) {
619
616
  let storedConfig = null;
620
617
  try {
621
618
  this.ensureRegistered();
@@ -626,29 +623,21 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
626
623
  if (options && "versionId" in options) {
627
624
  throw error;
628
625
  }
629
- this.restoreCodeDefaults(agent);
630
- this.clearResolvedVersionId(agent);
631
626
  return agent;
632
627
  }
633
628
  if (!storedConfig) {
634
- this.restoreCodeDefaults(agent);
635
- this.clearResolvedVersionId(agent);
636
629
  return agent;
637
630
  }
638
631
  const requestedPublished = options && !("versionId" in options) && options.status === "published";
639
632
  if (requestedPublished && !storedConfig.activeVersionId) {
640
- this.restoreCodeDefaults(agent);
641
- this.clearResolvedVersionId(agent);
642
633
  return agent;
643
634
  }
644
- this.saveCodeDefaults(agent);
645
- this.restoreCodeDefaults(agent);
646
- this.saveCodeDefaults(agent);
635
+ const fork = agent.__fork();
647
636
  this.logger?.debug(`[applyStoredOverrides] Applying stored overrides to code agent "${agent.id}"`);
648
637
  if (storedConfig.instructions !== void 0 && storedConfig.instructions !== null) {
649
638
  const resolved = this.resolveStoredInstructions(storedConfig.instructions);
650
639
  if (resolved !== void 0) {
651
- agent.__updateInstructions(resolved);
640
+ fork.__updateInstructions(resolved);
652
641
  }
653
642
  }
654
643
  const hasStoredTools = storedConfig.tools != null;
@@ -660,10 +649,10 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
660
649
  const hasConditionalIntegrationTools = storedConfig.integrationTools != null && this.isConditionalVariants(storedConfig.integrationTools);
661
650
  const isDynamicTools = hasConditionalTools || hasConditionalMCPClients || hasConditionalIntegrationTools;
662
651
  if (isDynamicTools) {
663
- const originalTools = agent.listTools.bind(agent);
664
- const toolsFn = async ({ requestContext }) => {
665
- const codeTools = await originalTools({ requestContext });
666
- const ctx = requestContext.toJSON();
652
+ const originalTools = fork.listTools.bind(fork);
653
+ const toolsFn = async ({ requestContext: requestContext2 }) => {
654
+ const codeTools = await originalTools({ requestContext: requestContext2 });
655
+ const ctx = requestContext2.toJSON();
667
656
  const resolvedToolsConfig = hasConditionalTools ? this.accumulateObjectVariants(
668
657
  storedConfig.tools,
669
658
  ctx
@@ -673,7 +662,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
673
662
  storedConfig.mcpClients,
674
663
  ctx
675
664
  ) : storedConfig.mcpClients;
676
- const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig);
665
+ const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig, requestContext2);
677
666
  const resolvedIntegrationToolsConfig = hasConditionalIntegrationTools ? this.accumulateObjectVariants(
678
667
  storedConfig.integrationTools,
679
668
  ctx
@@ -681,55 +670,27 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
681
670
  const integrationTools = await this.resolveStoredIntegrationTools(resolvedIntegrationToolsConfig, ctx);
682
671
  return { ...codeTools, ...registryTools, ...mcpTools, ...integrationTools };
683
672
  };
684
- agent.__setTools(toolsFn);
673
+ fork.__setTools(toolsFn);
685
674
  } else {
686
- const codeTools = await agent.listTools();
675
+ const codeTools = await fork.listTools();
687
676
  const registryTools = this.resolveStoredTools(
688
677
  storedConfig.tools
689
678
  );
690
679
  const mcpTools = await this.resolveStoredMCPTools(
691
- storedConfig.mcpClients
680
+ storedConfig.mcpClients,
681
+ requestContext
692
682
  );
693
683
  const integrationTools = await this.resolveStoredIntegrationTools(
694
684
  storedConfig.integrationTools
695
685
  );
696
- agent.__setTools({ ...codeTools, ...registryTools, ...mcpTools, ...integrationTools });
686
+ fork.__setTools({ ...codeTools, ...registryTools, ...mcpTools, ...integrationTools });
697
687
  }
698
688
  }
699
689
  if (storedConfig.resolvedVersionId) {
700
- const existing = agent.toRawConfig() ?? {};
701
- agent.__setRawConfig({ ...existing, resolvedVersionId: storedConfig.resolvedVersionId });
702
- } else {
703
- this.clearResolvedVersionId(agent);
690
+ const existing = fork.toRawConfig() ?? {};
691
+ fork.__setRawConfig({ ...existing, resolvedVersionId: storedConfig.resolvedVersionId });
704
692
  }
705
- return agent;
706
- }
707
- /**
708
- * Save the agent's current field values to the module-level WeakMap
709
- * so they can be restored if the stored config is later removed.
710
- * Only saves on the first call (guards against overwriting originals with overridden values).
711
- *
712
- * Only instructions and tools are saved — these are the only fields
713
- * that `applyStoredOverrides` mutates.
714
- */
715
- saveCodeDefaults(agent) {
716
- if (codeDefaults.has(agent)) return;
717
- const fields = agent.__getOverridableFields();
718
- codeDefaults.set(agent, {
719
- instructions: fields.instructions,
720
- tools: fields.tools
721
- });
722
- }
723
- /**
724
- * Restore the agent's original code-defined field values from the WeakMap.
725
- * Clears the saved snapshot afterward.
726
- */
727
- restoreCodeDefaults(agent) {
728
- const saved = codeDefaults.get(agent);
729
- if (!saved) return;
730
- agent.__updateInstructions(saved.instructions);
731
- agent.__setTools(saved.tools);
732
- codeDefaults.delete(agent);
693
+ return fork;
733
694
  }
734
695
  // ============================================================================
735
696
  // Private helpers
@@ -802,7 +763,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
802
763
  storedAgent.mcpClients,
803
764
  ctx
804
765
  ) : storedAgent.mcpClients;
805
- const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig);
766
+ const mcpTools = await this.resolveStoredMCPTools(resolvedMCPClientsConfig, requestContext);
806
767
  const resolvedIntegrationToolsConfig = hasConditionalIntegrationTools ? this.accumulateObjectVariants(
807
768
  storedAgent.integrationTools,
808
769
  ctx
@@ -1035,10 +996,12 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1035
996
  * When `clientToolsConfig.tools` is an empty object `{}`, all tools from the source are included.
1036
997
  * When specified with keys, only listed tools are included with optional description overrides.
1037
998
  */
1038
- async resolveStoredMCPTools(mcpClients) {
999
+ async resolveStoredMCPTools(mcpClients, requestContext) {
1039
1000
  if (!mcpClients || Object.keys(mcpClients).length === 0) return {};
1040
1001
  if (!this.mastra) return {};
1041
1002
  const allTools = {};
1003
+ const authToken = requestContext?.get("mastra__authToken");
1004
+ const authRequestInit = authToken ? { headers: { Authorization: `Bearer ${authToken}` } } : void 0;
1042
1005
  let MCPClient;
1043
1006
  for (const [clientId, clientToolsConfig] of Object.entries(mcpClients)) {
1044
1007
  try {
@@ -1057,7 +1020,7 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1057
1020
  continue;
1058
1021
  }
1059
1022
  }
1060
- const clientOptions = EditorMCPNamespace.toMCPClientOptions(storedClient);
1023
+ const clientOptions = EditorMCPNamespace.toMCPClientOptions(storedClient, authRequestInit);
1061
1024
  const client = new MCPClient(clientOptions);
1062
1025
  tools = await client.listTools();
1063
1026
  this.logger?.debug(`[resolveStoredMCPTools] Loaded tools from stored MCP client "${clientId}"`);
@@ -1082,9 +1045,10 @@ var EditorAgentNamespace = class extends CrudEditorNamespace {
1082
1045
  if (!(bareToolName in clientServers[serverName].tools)) continue;
1083
1046
  }
1084
1047
  const hasAgentFilter = agentAllowedTools && Object.keys(agentAllowedTools).length > 0;
1085
- if (hasAgentFilter && !(namespacedToolName in agentAllowedTools)) continue;
1048
+ if (hasAgentFilter && !(namespacedToolName in agentAllowedTools) && !(bareToolName in agentAllowedTools))
1049
+ continue;
1086
1050
  const serverToolConfig = serverName ? clientServers?.[serverName]?.tools?.[bareToolName] : void 0;
1087
- const description = agentAllowedTools?.[namespacedToolName]?.description ?? serverToolConfig?.description;
1051
+ const description = agentAllowedTools?.[namespacedToolName]?.description ?? agentAllowedTools?.[bareToolName]?.description ?? serverToolConfig?.description;
1088
1052
  if (description) {
1089
1053
  allTools[namespacedToolName] = { ...tool, description };
1090
1054
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@mastra/editor",
3
- "version": "0.0.0-studio-deploy-20260404182525",
3
+ "version": "0.0.0-studio-cli-20260504022012",
4
4
  "description": "Mastra Editor for agent management and instantiation",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",
@@ -65,28 +65,28 @@
65
65
  "@arcadeai/arcadejs": "^2.3.0",
66
66
  "@composio/core": "^0.6.5",
67
67
  "@composio/mastra": "^0.6.5",
68
- "@mastra/memory": "0.0.0-studio-deploy-20260404182525",
69
- "@mastra/schema-compat": "1.2.7"
68
+ "@mastra/memory": "0.0.0-studio-cli-20260504022012",
69
+ "@mastra/schema-compat": "1.2.9"
70
70
  },
71
71
  "devDependencies": {
72
72
  "@hono/node-server": "^1.19.11",
73
73
  "hono": "^4.12.8",
74
74
  "tsup": "^8.5.1",
75
- "typescript": "^5.9.3",
76
- "vitest": "4.0.18",
75
+ "typescript": "^6.0.3",
76
+ "vitest": "4.1.5",
77
77
  "zod": "^3.25.76",
78
- "@internal/ai-sdk-v4": "0.0.0-studio-deploy-20260404182525",
79
- "@internal/ai-sdk-v5": "0.0.0-studio-deploy-20260404182525",
80
- "@internal/ai-v6": "0.0.0-studio-deploy-20260404182525",
81
- "@mastra/core": "0.0.0-studio-deploy-20260404182525",
82
- "@mastra/hono": "0.0.0-studio-deploy-20260404182525",
83
- "@mastra/mcp": "0.0.0-studio-deploy-20260404182525",
84
- "@mastra/libsql": "0.0.0-studio-deploy-20260404182525"
78
+ "@internal/ai-sdk-v4": "0.0.0-studio-cli-20260504022012",
79
+ "@internal/ai-v6": "0.0.0-studio-cli-20260504022012",
80
+ "@internal/ai-sdk-v5": "0.0.0-studio-cli-20260504022012",
81
+ "@mastra/core": "0.0.0-studio-cli-20260504022012",
82
+ "@mastra/mcp": "0.0.0-studio-cli-20260504022012",
83
+ "@mastra/libsql": "0.0.0-studio-cli-20260504022012",
84
+ "@mastra/hono": "0.0.0-studio-cli-20260504022012"
85
85
  },
86
86
  "peerDependencies": {
87
87
  "zod": "^3.25.0 || ^4.0.0",
88
- "@mastra/core": "0.0.0-studio-deploy-20260404182525",
89
- "@mastra/mcp": "0.0.0-studio-deploy-20260404182525"
88
+ "@mastra/core": "0.0.0-studio-cli-20260504022012",
89
+ "@mastra/mcp": "0.0.0-studio-cli-20260504022012"
90
90
  },
91
91
  "peerDependenciesMeta": {
92
92
  "@mastra/mcp": {