@mastra/editor 0.0.0-agent-chat-ui-20260305212602
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 +1185 -0
- package/LICENSE.md +30 -0
- package/dist/arcade.cjs +293 -0
- package/dist/arcade.d.cts +66 -0
- package/dist/arcade.d.ts +66 -0
- package/dist/arcade.js +266 -0
- package/dist/composio.cjs +143 -0
- package/dist/composio.d.cts +59 -0
- package/dist/composio.d.ts +59 -0
- package/dist/composio.js +116 -0
- package/dist/index.cjs +2059 -0
- package/dist/index.d.cts +457 -0
- package/dist/index.d.ts +457 -0
- package/dist/index.js +2010 -0
- package/dist/storage/index.cjs +36 -0
- package/dist/storage/index.d.cts +1 -0
- package/dist/storage/index.d.ts +1 -0
- package/dist/storage/index.js +13 -0
- package/package.json +107 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,1185 @@
|
|
|
1
|
+
# @mastra/editor
|
|
2
|
+
|
|
3
|
+
## 0.0.0-agent-chat-ui-20260305212602
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Added `FilesystemStore`, a file-based storage adapter for editor domains. Stores agent configurations, prompt blocks, scorer definitions, MCP clients, MCP servers, workspaces, and skills as JSON files in a local directory (default: `.mastra-storage/`). Only published snapshots are written to disk — version history is kept in memory. Use with `MastraCompositeStore`'s `editor` shorthand to enable Git-friendly editor configurations. ([#13727](https://github.com/mastra-ai/mastra/pull/13727))
|
|
8
|
+
|
|
9
|
+
```typescript
|
|
10
|
+
import { FilesystemStore, MastraCompositeStore } from '@mastra/core/storage';
|
|
11
|
+
import { PostgresStore } from '@mastra/pg';
|
|
12
|
+
|
|
13
|
+
export const mastra = new Mastra({
|
|
14
|
+
storage: new MastraCompositeStore({
|
|
15
|
+
id: 'composite',
|
|
16
|
+
default: new PostgresStore({ id: 'pg', connectionString: process.env.DATABASE_URL }),
|
|
17
|
+
editor: new FilesystemStore({ dir: '.mastra-storage' }),
|
|
18
|
+
}),
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Added `applyStoredOverrides` to the editor agent namespace. When a stored configuration exists for a code-defined agent, the editor merges the stored **instructions** and **tools** on top of the code agent's values at runtime. Model, memory, workspace, and other code-defined fields are never overridden — they may contain SDK instances or dynamic functions that cannot be safely serialized. Original code-defined values are preserved via a WeakMap and restored if the stored override is deleted.
|
|
23
|
+
|
|
24
|
+
### Patch Changes
|
|
25
|
+
|
|
26
|
+
- Updated dependencies [[`41e48c1`](https://github.com/mastra-ai/mastra/commit/41e48c198eee846478e60c02ec432c19d322a517), [`82469d3`](https://github.com/mastra-ai/mastra/commit/82469d3135d5a49dd8dc8feec0ff398b4e0225a0), [`33e2fd5`](https://github.com/mastra-ai/mastra/commit/33e2fd5088f83666df17401e2da68c943dbc0448), [`7ef6e2c`](https://github.com/mastra-ai/mastra/commit/7ef6e2c61be5a42e26f55d15b5902866fc76634f), [`08072ec`](https://github.com/mastra-ai/mastra/commit/08072ec54b5dfe810ed66c0d583ae9d1a9103c11), [`ef9d0f0`](https://github.com/mastra-ai/mastra/commit/ef9d0f0fa98ff225b17afe071f5b84a9258dc142), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`9e21667`](https://github.com/mastra-ai/mastra/commit/9e2166746df81da8f1f933a918741fc52f922c70), [`fa37d39`](https://github.com/mastra-ai/mastra/commit/fa37d39910421feaf8847716292e3d65dd4f30c2), [`b12d2a5`](https://github.com/mastra-ai/mastra/commit/b12d2a59a48be0477cabae66eb6cf0fc94a7d40d), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`71c38bf`](https://github.com/mastra-ai/mastra/commit/71c38bf905905148ecd0e75c07c1f9825d299b76), [`f993c38`](https://github.com/mastra-ai/mastra/commit/f993c3848c97479b813231be872443bedeced6ab), [`f51849a`](https://github.com/mastra-ai/mastra/commit/f51849a568935122b5100b7ee69704e6d680cf7b), [`3ceb231`](https://github.com/mastra-ai/mastra/commit/3ceb2317aad7da36df5053e7c84f9381eeb68d11), [`9bf3a0d`](https://github.com/mastra-ai/mastra/commit/9bf3a0dac602787925f1762f1f0387d7b4a59620), [`cafa045`](https://github.com/mastra-ai/mastra/commit/cafa0453c9de141ad50c09a13894622dffdd9978), [`1fd9ddb`](https://github.com/mastra-ai/mastra/commit/1fd9ddbb3fe83b281b12bd2e27e426ae86288266), [`1391f22`](https://github.com/mastra-ai/mastra/commit/1391f227ff197080de185ac1073c1d1568c0631f), [`ef888d2`](https://github.com/mastra-ai/mastra/commit/ef888d23c77f85f4c202228b63f8fd9b6d9361af), [`e7a567c`](https://github.com/mastra-ai/mastra/commit/e7a567cfb3e65c955a07d0167cb1b4141f5bda01), [`3626623`](https://github.com/mastra-ai/mastra/commit/36266238eb7db78fce2ac34187194613f6f53733), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443), [`d9d228c`](https://github.com/mastra-ai/mastra/commit/d9d228c0c6ae82ae6ce3b540a3a56b2b1c2b8d98), [`5576507`](https://github.com/mastra-ai/mastra/commit/55765071e360fb97e443aa0a91ccf7e1cd8d92aa), [`79d69c9`](https://github.com/mastra-ai/mastra/commit/79d69c9d5f842ff1c31352fb6026f04c1f6190f3), [`94f44b8`](https://github.com/mastra-ai/mastra/commit/94f44b827ce57b179e50f4916a84c0fa6e7f3b8c), [`13187db`](https://github.com/mastra-ai/mastra/commit/13187dbac880174232dedc5a501ff6c5d0fe59bc), [`2ae5311`](https://github.com/mastra-ai/mastra/commit/2ae531185fff66a80fa165c0999e3d801900e89d), [`6135ef4`](https://github.com/mastra-ai/mastra/commit/6135ef4f5288652bf45f616ec590607e4c95f443)]:
|
|
27
|
+
- @mastra/core@0.0.0-agent-chat-ui-20260305212602
|
|
28
|
+
- @mastra/memory@0.0.0-agent-chat-ui-20260305212602
|
|
29
|
+
- @mastra/mcp@0.0.0-agent-chat-ui-20260305212602
|
|
30
|
+
|
|
31
|
+
## 0.6.3
|
|
32
|
+
|
|
33
|
+
### Patch Changes
|
|
34
|
+
|
|
35
|
+
- Updated dependencies [[`504fc8b`](https://github.com/mastra-ai/mastra/commit/504fc8b9d0ddab717577ad3bf9c95ea4bd5377bd), [`f9c150b`](https://github.com/mastra-ai/mastra/commit/f9c150b7595ad05ad9cc9a11098e2944361e8c22), [`88de7e8`](https://github.com/mastra-ai/mastra/commit/88de7e8dfe4b7e1951a9e441bb33136e705ce24e), [`edee4b3`](https://github.com/mastra-ai/mastra/commit/edee4b37dff0af515fc7cc0e8d71ee39e6a762f0), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`3790c75`](https://github.com/mastra-ai/mastra/commit/3790c7578cc6a47d854eb12d89e6b1912867fe29), [`e7a235b`](https://github.com/mastra-ai/mastra/commit/e7a235be6472e0c870ed6c791ddb17c492dc188b), [`d51d298`](https://github.com/mastra-ai/mastra/commit/d51d298953967aab1f58ec965b644d109214f085), [`6dbeeb9`](https://github.com/mastra-ai/mastra/commit/6dbeeb94a8b1eebb727300d1a98961f882180794), [`d5f0d8d`](https://github.com/mastra-ai/mastra/commit/d5f0d8d6a03e515ddaa9b5da19b7e44b8357b07b), [`09c3b18`](https://github.com/mastra-ai/mastra/commit/09c3b1802ff14e243a8a8baea327440bc8cc2e32), [`b896379`](https://github.com/mastra-ai/mastra/commit/b8963791c6afa79484645fcec596a201f936b9a2), [`b896379`](https://github.com/mastra-ai/mastra/commit/b8963791c6afa79484645fcec596a201f936b9a2), [`85c84eb`](https://github.com/mastra-ai/mastra/commit/85c84ebb78aebfcba9d209c8e152b16d7a00cb71), [`a89272a`](https://github.com/mastra-ai/mastra/commit/a89272a5d71939b9fcd284e6a6dc1dd091a6bdcf), [`ee9c8df`](https://github.com/mastra-ai/mastra/commit/ee9c8df644f19d055af5f496bf4942705f5a47b7), [`77b4a25`](https://github.com/mastra-ai/mastra/commit/77b4a254e51907f8ff3a3ba95596a18e93ae4b35), [`276246e`](https://github.com/mastra-ai/mastra/commit/276246e0b9066a1ea48bbc70df84dbe528daaf99), [`08ecfdb`](https://github.com/mastra-ai/mastra/commit/08ecfdbdad6fb8285deef86a034bdf4a6047cfca), [`d5f628c`](https://github.com/mastra-ai/mastra/commit/d5f628ca86c6f6f3ff1035d52f635df32dd81cab), [`24f7204`](https://github.com/mastra-ai/mastra/commit/24f72046eb35b47c75d36193af4fb817b588720d), [`359d687`](https://github.com/mastra-ai/mastra/commit/359d687527ab95a79e0ec0487dcecec8d9c7c7dc), [`524c0f3`](https://github.com/mastra-ai/mastra/commit/524c0f3c434c3d9d18f66338dcef383d6161b59c), [`c18a0e9`](https://github.com/mastra-ai/mastra/commit/c18a0e9cef1e4ca004b2963d35e4cfc031971eac), [`4bd21ea`](https://github.com/mastra-ai/mastra/commit/4bd21ea43d44d0a0427414fc047577f9f0aa3bec), [`115a7a4`](https://github.com/mastra-ai/mastra/commit/115a7a47db5e9896fec12ae6507501adb9ec89bf), [`22a48ae`](https://github.com/mastra-ai/mastra/commit/22a48ae2513eb54d8d79dad361fddbca97a155e8), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9e77e8f`](https://github.com/mastra-ai/mastra/commit/9e77e8f0e823ef58cb448dd1f390fce987a101f3), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`7edf78f`](https://github.com/mastra-ai/mastra/commit/7edf78f80422c43e84585f08ba11df0d4d0b73c5), [`1c4221c`](https://github.com/mastra-ai/mastra/commit/1c4221cf6032ec98d0e094d4ee11da3e48490d96), [`d25b9ea`](https://github.com/mastra-ai/mastra/commit/d25b9eabd400167255a97b690ffbc4ee4097ded5), [`fe1ce5c`](https://github.com/mastra-ai/mastra/commit/fe1ce5c9211c03d561606fda95cbfe7df1d9a9b5), [`b03c0e0`](https://github.com/mastra-ai/mastra/commit/b03c0e0389a799523929a458b0509c9e4244d562), [`0a8366b`](https://github.com/mastra-ai/mastra/commit/0a8366b0a692fcdde56c4d526e4cf03c502ae4ac), [`56f2018`](https://github.com/mastra-ai/mastra/commit/56f2018cb38969c11933e815a5f70cf631d3964a), [`85664e9`](https://github.com/mastra-ai/mastra/commit/85664e9fd857320fbc245e301f764f45f66f32a3), [`bc79650`](https://github.com/mastra-ai/mastra/commit/bc796500c6e0334faa158a96077e3fb332274869), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`3a3a59e`](https://github.com/mastra-ai/mastra/commit/3a3a59e8ffaa6a985fe3d9a126a3f5ade11a6724), [`3108d4e`](https://github.com/mastra-ai/mastra/commit/3108d4e649c9fddbf03253a6feeb388a5fa9fa5a), [`0c33b2c`](https://github.com/mastra-ai/mastra/commit/0c33b2c9db537f815e1c59e2c898ffce2e395a79), [`191e5bd`](https://github.com/mastra-ai/mastra/commit/191e5bd29b82f5bda35243945790da7bc7b695c2), [`fde104d`](https://github.com/mastra-ai/mastra/commit/fde104da80935d6e0dd24327e86a51011fcb3173), [`f77cd94`](https://github.com/mastra-ai/mastra/commit/f77cd94c44eabed490384e7d19232a865e13214c), [`e8135c7`](https://github.com/mastra-ai/mastra/commit/e8135c7e300dac5040670eec7eab896ac6092e30), [`daca48f`](https://github.com/mastra-ai/mastra/commit/daca48f0fb17b7ae0b62a2ac40cf0e491b2fd0b7), [`257d14f`](https://github.com/mastra-ai/mastra/commit/257d14faca5931f2e4186fc165b6f0b1f915deee), [`352f25d`](https://github.com/mastra-ai/mastra/commit/352f25da316b24cdd5b410fd8dddf6a8b763da2a), [`93477d0`](https://github.com/mastra-ai/mastra/commit/93477d0769b8a13ea5ed73d508d967fb23eaeed9), [`31c78b3`](https://github.com/mastra-ai/mastra/commit/31c78b3eb28f58a8017f1dcc795c33214d87feac), [`0bc0720`](https://github.com/mastra-ai/mastra/commit/0bc07201095791858087cc56f353fcd65e87ab54), [`36516ac`](https://github.com/mastra-ai/mastra/commit/36516aca1021cbeb42e74751b46a2614101f37c8), [`e947652`](https://github.com/mastra-ai/mastra/commit/e9476527fdecb4449e54570e80dfaf8466901254), [`23b43dd`](https://github.com/mastra-ai/mastra/commit/23b43ddd0e3db05dee828c2733faa2496b7b0319), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`ec248f6`](https://github.com/mastra-ai/mastra/commit/ec248f6b56e8a037c066c49b2178e2507471d988)]:
|
|
36
|
+
- @mastra/core@1.9.0
|
|
37
|
+
- @mastra/memory@1.6.0
|
|
38
|
+
- @mastra/mcp@1.0.3
|
|
39
|
+
|
|
40
|
+
## 0.6.3-alpha.0
|
|
41
|
+
|
|
42
|
+
### Patch Changes
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`504fc8b`](https://github.com/mastra-ai/mastra/commit/504fc8b9d0ddab717577ad3bf9c95ea4bd5377bd), [`f9c150b`](https://github.com/mastra-ai/mastra/commit/f9c150b7595ad05ad9cc9a11098e2944361e8c22), [`88de7e8`](https://github.com/mastra-ai/mastra/commit/88de7e8dfe4b7e1951a9e441bb33136e705ce24e), [`edee4b3`](https://github.com/mastra-ai/mastra/commit/edee4b37dff0af515fc7cc0e8d71ee39e6a762f0), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`3790c75`](https://github.com/mastra-ai/mastra/commit/3790c7578cc6a47d854eb12d89e6b1912867fe29), [`e7a235b`](https://github.com/mastra-ai/mastra/commit/e7a235be6472e0c870ed6c791ddb17c492dc188b), [`d51d298`](https://github.com/mastra-ai/mastra/commit/d51d298953967aab1f58ec965b644d109214f085), [`6dbeeb9`](https://github.com/mastra-ai/mastra/commit/6dbeeb94a8b1eebb727300d1a98961f882180794), [`d5f0d8d`](https://github.com/mastra-ai/mastra/commit/d5f0d8d6a03e515ddaa9b5da19b7e44b8357b07b), [`09c3b18`](https://github.com/mastra-ai/mastra/commit/09c3b1802ff14e243a8a8baea327440bc8cc2e32), [`b896379`](https://github.com/mastra-ai/mastra/commit/b8963791c6afa79484645fcec596a201f936b9a2), [`b896379`](https://github.com/mastra-ai/mastra/commit/b8963791c6afa79484645fcec596a201f936b9a2), [`85c84eb`](https://github.com/mastra-ai/mastra/commit/85c84ebb78aebfcba9d209c8e152b16d7a00cb71), [`a89272a`](https://github.com/mastra-ai/mastra/commit/a89272a5d71939b9fcd284e6a6dc1dd091a6bdcf), [`ee9c8df`](https://github.com/mastra-ai/mastra/commit/ee9c8df644f19d055af5f496bf4942705f5a47b7), [`77b4a25`](https://github.com/mastra-ai/mastra/commit/77b4a254e51907f8ff3a3ba95596a18e93ae4b35), [`276246e`](https://github.com/mastra-ai/mastra/commit/276246e0b9066a1ea48bbc70df84dbe528daaf99), [`08ecfdb`](https://github.com/mastra-ai/mastra/commit/08ecfdbdad6fb8285deef86a034bdf4a6047cfca), [`d5f628c`](https://github.com/mastra-ai/mastra/commit/d5f628ca86c6f6f3ff1035d52f635df32dd81cab), [`24f7204`](https://github.com/mastra-ai/mastra/commit/24f72046eb35b47c75d36193af4fb817b588720d), [`359d687`](https://github.com/mastra-ai/mastra/commit/359d687527ab95a79e0ec0487dcecec8d9c7c7dc), [`524c0f3`](https://github.com/mastra-ai/mastra/commit/524c0f3c434c3d9d18f66338dcef383d6161b59c), [`c18a0e9`](https://github.com/mastra-ai/mastra/commit/c18a0e9cef1e4ca004b2963d35e4cfc031971eac), [`4bd21ea`](https://github.com/mastra-ai/mastra/commit/4bd21ea43d44d0a0427414fc047577f9f0aa3bec), [`115a7a4`](https://github.com/mastra-ai/mastra/commit/115a7a47db5e9896fec12ae6507501adb9ec89bf), [`22a48ae`](https://github.com/mastra-ai/mastra/commit/22a48ae2513eb54d8d79dad361fddbca97a155e8), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9e77e8f`](https://github.com/mastra-ai/mastra/commit/9e77e8f0e823ef58cb448dd1f390fce987a101f3), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`7edf78f`](https://github.com/mastra-ai/mastra/commit/7edf78f80422c43e84585f08ba11df0d4d0b73c5), [`1c4221c`](https://github.com/mastra-ai/mastra/commit/1c4221cf6032ec98d0e094d4ee11da3e48490d96), [`d25b9ea`](https://github.com/mastra-ai/mastra/commit/d25b9eabd400167255a97b690ffbc4ee4097ded5), [`fe1ce5c`](https://github.com/mastra-ai/mastra/commit/fe1ce5c9211c03d561606fda95cbfe7df1d9a9b5), [`b03c0e0`](https://github.com/mastra-ai/mastra/commit/b03c0e0389a799523929a458b0509c9e4244d562), [`0a8366b`](https://github.com/mastra-ai/mastra/commit/0a8366b0a692fcdde56c4d526e4cf03c502ae4ac), [`56f2018`](https://github.com/mastra-ai/mastra/commit/56f2018cb38969c11933e815a5f70cf631d3964a), [`85664e9`](https://github.com/mastra-ai/mastra/commit/85664e9fd857320fbc245e301f764f45f66f32a3), [`bc79650`](https://github.com/mastra-ai/mastra/commit/bc796500c6e0334faa158a96077e3fb332274869), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`9311c17`](https://github.com/mastra-ai/mastra/commit/9311c17d7a0640d9c4da2e71b814dc67c57c6369), [`3a3a59e`](https://github.com/mastra-ai/mastra/commit/3a3a59e8ffaa6a985fe3d9a126a3f5ade11a6724), [`3108d4e`](https://github.com/mastra-ai/mastra/commit/3108d4e649c9fddbf03253a6feeb388a5fa9fa5a), [`0c33b2c`](https://github.com/mastra-ai/mastra/commit/0c33b2c9db537f815e1c59e2c898ffce2e395a79), [`191e5bd`](https://github.com/mastra-ai/mastra/commit/191e5bd29b82f5bda35243945790da7bc7b695c2), [`fde104d`](https://github.com/mastra-ai/mastra/commit/fde104da80935d6e0dd24327e86a51011fcb3173), [`f77cd94`](https://github.com/mastra-ai/mastra/commit/f77cd94c44eabed490384e7d19232a865e13214c), [`e8135c7`](https://github.com/mastra-ai/mastra/commit/e8135c7e300dac5040670eec7eab896ac6092e30), [`daca48f`](https://github.com/mastra-ai/mastra/commit/daca48f0fb17b7ae0b62a2ac40cf0e491b2fd0b7), [`257d14f`](https://github.com/mastra-ai/mastra/commit/257d14faca5931f2e4186fc165b6f0b1f915deee), [`352f25d`](https://github.com/mastra-ai/mastra/commit/352f25da316b24cdd5b410fd8dddf6a8b763da2a), [`93477d0`](https://github.com/mastra-ai/mastra/commit/93477d0769b8a13ea5ed73d508d967fb23eaeed9), [`31c78b3`](https://github.com/mastra-ai/mastra/commit/31c78b3eb28f58a8017f1dcc795c33214d87feac), [`0bc0720`](https://github.com/mastra-ai/mastra/commit/0bc07201095791858087cc56f353fcd65e87ab54), [`36516ac`](https://github.com/mastra-ai/mastra/commit/36516aca1021cbeb42e74751b46a2614101f37c8), [`e947652`](https://github.com/mastra-ai/mastra/commit/e9476527fdecb4449e54570e80dfaf8466901254), [`23b43dd`](https://github.com/mastra-ai/mastra/commit/23b43ddd0e3db05dee828c2733faa2496b7b0319), [`3c6ef79`](https://github.com/mastra-ai/mastra/commit/3c6ef798481e00d6d22563be2de98818fd4dd5e0), [`9257d01`](https://github.com/mastra-ai/mastra/commit/9257d01d1366d81f84c582fe02b5e200cf9621f4), [`ec248f6`](https://github.com/mastra-ai/mastra/commit/ec248f6b56e8a037c066c49b2178e2507471d988)]:
|
|
45
|
+
- @mastra/core@1.9.0-alpha.0
|
|
46
|
+
- @mastra/memory@1.6.0-alpha.0
|
|
47
|
+
- @mastra/mcp@1.0.3-alpha.0
|
|
48
|
+
|
|
49
|
+
## 0.6.2
|
|
50
|
+
|
|
51
|
+
### Patch Changes
|
|
52
|
+
|
|
53
|
+
- Updated dependencies [[`df170fd`](https://github.com/mastra-ai/mastra/commit/df170fd139b55f845bfd2de8488b16435bd3d0da), [`ae55343`](https://github.com/mastra-ai/mastra/commit/ae5534397fc006fd6eef3e4f80c235bcdc9289ef), [`b8621e2`](https://github.com/mastra-ai/mastra/commit/b8621e25e70cae69a9343353f878a9112493a2fe), [`c290cec`](https://github.com/mastra-ai/mastra/commit/c290cec5bf9107225de42942b56b487107aa9dce), [`f03e794`](https://github.com/mastra-ai/mastra/commit/f03e794630f812b56e95aad54f7b1993dc003add), [`aa4a5ae`](https://github.com/mastra-ai/mastra/commit/aa4a5aedb80d8d6837bab8cbb2e301215d1ba3e9), [`de3f584`](https://github.com/mastra-ai/mastra/commit/de3f58408752a8d80a295275c7f23fc306cf7f4f), [`74ae019`](https://github.com/mastra-ai/mastra/commit/74ae0197a6895f8897c369038c643d7e32dd84c2), [`d3fb010`](https://github.com/mastra-ai/mastra/commit/d3fb010c98f575f1c0614452667396e2653815f6), [`702ee1c`](https://github.com/mastra-ai/mastra/commit/702ee1c41be67cc532b4dbe89bcb62143508f6f0), [`f495051`](https://github.com/mastra-ai/mastra/commit/f495051eb6496a720f637fc85b6d69941c12554c), [`e622f1d`](https://github.com/mastra-ai/mastra/commit/e622f1d3ab346a8e6aca6d1fe2eac99bd961e50b), [`8d14a59`](https://github.com/mastra-ai/mastra/commit/8d14a591d46fbbbe81baa33c9c267d596f790329), [`861f111`](https://github.com/mastra-ai/mastra/commit/861f11189211b20ddb70d8df81a6b901fc78d11e), [`00f43e8`](https://github.com/mastra-ai/mastra/commit/00f43e8e97a80c82b27d5bd30494f10a715a1df9), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`96a1702`](https://github.com/mastra-ai/mastra/commit/96a1702ce362c50dda20c8b4a228b4ad1a36a17a), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`114e7c1`](https://github.com/mastra-ai/mastra/commit/114e7c146ac682925f0fb37376c1be70e5d6e6e5), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
|
|
54
|
+
- @mastra/core@1.8.0
|
|
55
|
+
- @mastra/mcp@1.0.2
|
|
56
|
+
- @mastra/schema-compat@1.1.3
|
|
57
|
+
- @mastra/memory@1.5.2
|
|
58
|
+
|
|
59
|
+
## 0.6.2-alpha.0
|
|
60
|
+
|
|
61
|
+
### Patch Changes
|
|
62
|
+
|
|
63
|
+
- Updated dependencies [[`df170fd`](https://github.com/mastra-ai/mastra/commit/df170fd139b55f845bfd2de8488b16435bd3d0da), [`ae55343`](https://github.com/mastra-ai/mastra/commit/ae5534397fc006fd6eef3e4f80c235bcdc9289ef), [`b8621e2`](https://github.com/mastra-ai/mastra/commit/b8621e25e70cae69a9343353f878a9112493a2fe), [`c290cec`](https://github.com/mastra-ai/mastra/commit/c290cec5bf9107225de42942b56b487107aa9dce), [`f03e794`](https://github.com/mastra-ai/mastra/commit/f03e794630f812b56e95aad54f7b1993dc003add), [`aa4a5ae`](https://github.com/mastra-ai/mastra/commit/aa4a5aedb80d8d6837bab8cbb2e301215d1ba3e9), [`de3f584`](https://github.com/mastra-ai/mastra/commit/de3f58408752a8d80a295275c7f23fc306cf7f4f), [`74ae019`](https://github.com/mastra-ai/mastra/commit/74ae0197a6895f8897c369038c643d7e32dd84c2), [`d3fb010`](https://github.com/mastra-ai/mastra/commit/d3fb010c98f575f1c0614452667396e2653815f6), [`702ee1c`](https://github.com/mastra-ai/mastra/commit/702ee1c41be67cc532b4dbe89bcb62143508f6f0), [`f495051`](https://github.com/mastra-ai/mastra/commit/f495051eb6496a720f637fc85b6d69941c12554c), [`e622f1d`](https://github.com/mastra-ai/mastra/commit/e622f1d3ab346a8e6aca6d1fe2eac99bd961e50b), [`8d14a59`](https://github.com/mastra-ai/mastra/commit/8d14a591d46fbbbe81baa33c9c267d596f790329), [`861f111`](https://github.com/mastra-ai/mastra/commit/861f11189211b20ddb70d8df81a6b901fc78d11e), [`00f43e8`](https://github.com/mastra-ai/mastra/commit/00f43e8e97a80c82b27d5bd30494f10a715a1df9), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`96a1702`](https://github.com/mastra-ai/mastra/commit/96a1702ce362c50dda20c8b4a228b4ad1a36a17a), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`114e7c1`](https://github.com/mastra-ai/mastra/commit/114e7c146ac682925f0fb37376c1be70e5d6e6e5), [`cb9f921`](https://github.com/mastra-ai/mastra/commit/cb9f921320913975657abb1404855d8c510f7ac5), [`1b6f651`](https://github.com/mastra-ai/mastra/commit/1b6f65127d4a0d6c38d0a1055cb84527db529d6b), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
|
|
64
|
+
- @mastra/core@1.8.0-alpha.0
|
|
65
|
+
- @mastra/mcp@1.0.2-alpha.0
|
|
66
|
+
- @mastra/schema-compat@1.1.3-alpha.0
|
|
67
|
+
- @mastra/memory@1.5.2-alpha.0
|
|
68
|
+
|
|
69
|
+
## 0.6.1
|
|
70
|
+
|
|
71
|
+
### Patch Changes
|
|
72
|
+
|
|
73
|
+
- Updated dependencies [[`e8afc44`](https://github.com/mastra-ai/mastra/commit/e8afc44a41f24ffe8b8ae4a5ee27cfddbe7934a6), [`24284ff`](https://github.com/mastra-ai/mastra/commit/24284ffae306ddf0ab83273e13f033520839ef40), [`f5097cc`](https://github.com/mastra-ai/mastra/commit/f5097cc8a813c82c3378882c31178320cadeb655), [`71e237f`](https://github.com/mastra-ai/mastra/commit/71e237fa852a3ad9a50a3ddb3b5f3b20b9a8181c), [`c2e02f1`](https://github.com/mastra-ai/mastra/commit/c2e02f181843cbda8db6fd893adce85edc0f8742), [`13a291e`](https://github.com/mastra-ai/mastra/commit/13a291ebb9f9bca80befa0d9166b916bb348e8e9), [`397af5a`](https://github.com/mastra-ai/mastra/commit/397af5a69f34d4157f51a7c8da3f1ded1e1d611c), [`d4701f7`](https://github.com/mastra-ai/mastra/commit/d4701f7e24822b081b70f9c806c39411b1a712e7), [`2b40831`](https://github.com/mastra-ai/mastra/commit/2b40831dcca2275c9570ddf09b7f25ba3e8dc7fc), [`6184727`](https://github.com/mastra-ai/mastra/commit/6184727e812bf7a65cee209bacec3a2f5a16e923), [`0c338b8`](https://github.com/mastra-ai/mastra/commit/0c338b87362dcd95ff8191ca00df645b6953f534), [`6f6385b`](https://github.com/mastra-ai/mastra/commit/6f6385be5b33687cd21e71fc27e972e6928bb34c), [`14aba61`](https://github.com/mastra-ai/mastra/commit/14aba61b9cff76d72bc7ef6f3a83ae2c5d059193), [`dd9dd1c`](https://github.com/mastra-ai/mastra/commit/dd9dd1c9ae32ae79093f8c4adde1732ac6357233)]:
|
|
74
|
+
- @mastra/memory@1.5.1
|
|
75
|
+
- @mastra/core@1.7.0
|
|
76
|
+
|
|
77
|
+
## 0.6.1-alpha.0
|
|
78
|
+
|
|
79
|
+
### Patch Changes
|
|
80
|
+
|
|
81
|
+
- Updated dependencies [[`e8afc44`](https://github.com/mastra-ai/mastra/commit/e8afc44a41f24ffe8b8ae4a5ee27cfddbe7934a6), [`24284ff`](https://github.com/mastra-ai/mastra/commit/24284ffae306ddf0ab83273e13f033520839ef40), [`f5097cc`](https://github.com/mastra-ai/mastra/commit/f5097cc8a813c82c3378882c31178320cadeb655), [`71e237f`](https://github.com/mastra-ai/mastra/commit/71e237fa852a3ad9a50a3ddb3b5f3b20b9a8181c), [`c2e02f1`](https://github.com/mastra-ai/mastra/commit/c2e02f181843cbda8db6fd893adce85edc0f8742), [`13a291e`](https://github.com/mastra-ai/mastra/commit/13a291ebb9f9bca80befa0d9166b916bb348e8e9), [`397af5a`](https://github.com/mastra-ai/mastra/commit/397af5a69f34d4157f51a7c8da3f1ded1e1d611c), [`d4701f7`](https://github.com/mastra-ai/mastra/commit/d4701f7e24822b081b70f9c806c39411b1a712e7), [`2b40831`](https://github.com/mastra-ai/mastra/commit/2b40831dcca2275c9570ddf09b7f25ba3e8dc7fc), [`6184727`](https://github.com/mastra-ai/mastra/commit/6184727e812bf7a65cee209bacec3a2f5a16e923), [`6f6385b`](https://github.com/mastra-ai/mastra/commit/6f6385be5b33687cd21e71fc27e972e6928bb34c), [`14aba61`](https://github.com/mastra-ai/mastra/commit/14aba61b9cff76d72bc7ef6f3a83ae2c5d059193), [`dd9dd1c`](https://github.com/mastra-ai/mastra/commit/dd9dd1c9ae32ae79093f8c4adde1732ac6357233)]:
|
|
82
|
+
- @mastra/memory@1.5.1-alpha.0
|
|
83
|
+
- @mastra/core@1.7.0-alpha.0
|
|
84
|
+
|
|
85
|
+
## 0.6.0
|
|
86
|
+
|
|
87
|
+
### Minor Changes
|
|
88
|
+
|
|
89
|
+
- Added Processor Providers — a new system for configuring and hydrating processors on stored agents. Define custom processor types with config schemas, available phases, and a factory method, then compose them into serializable processor graphs that support sequential, parallel, and conditional execution. ([#13219](https://github.com/mastra-ai/mastra/pull/13219))
|
|
90
|
+
|
|
91
|
+
**Example — custom processor provider:**
|
|
92
|
+
|
|
93
|
+
```ts
|
|
94
|
+
import { MastraEditor } from '@mastra/editor';
|
|
95
|
+
|
|
96
|
+
// Built-in processors (token-limiter, unicode-normalizer, etc.) are registered automatically.
|
|
97
|
+
// Only register custom providers for your own processors:
|
|
98
|
+
const editor = new MastraEditor({
|
|
99
|
+
processorProviders: {
|
|
100
|
+
'my-custom-filter': myCustomFilterProvider,
|
|
101
|
+
},
|
|
102
|
+
});
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
**Example — stored agent with a processor graph:**
|
|
106
|
+
|
|
107
|
+
```ts
|
|
108
|
+
const agentConfig = {
|
|
109
|
+
inputProcessors: {
|
|
110
|
+
steps: [
|
|
111
|
+
{
|
|
112
|
+
type: 'step',
|
|
113
|
+
step: { id: 'norm', providerId: 'unicode-normalizer', config: {}, enabledPhases: ['processInput'] },
|
|
114
|
+
},
|
|
115
|
+
{
|
|
116
|
+
type: 'step',
|
|
117
|
+
step: {
|
|
118
|
+
id: 'limit',
|
|
119
|
+
providerId: 'token-limiter',
|
|
120
|
+
config: { limit: 4000 },
|
|
121
|
+
enabledPhases: ['processInput', 'processOutputStream'],
|
|
122
|
+
},
|
|
123
|
+
},
|
|
124
|
+
],
|
|
125
|
+
},
|
|
126
|
+
};
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
- Added MCP server storage and editor support. MCP server configurations can now be persisted in storage and managed through the editor CMS. The editor's `mcpServer` namespace provides full CRUD operations and automatically hydrates stored configs into running `MCPServer` instances by resolving tool, agent, and workflow references from the Mastra registry. ([#13285](https://github.com/mastra-ai/mastra/pull/13285))
|
|
130
|
+
|
|
131
|
+
```ts
|
|
132
|
+
const editor = new MastraEditor();
|
|
133
|
+
const mastra = new Mastra({
|
|
134
|
+
tools: { getWeather: weatherTool, calculate: calculatorTool },
|
|
135
|
+
storage: new LibSQLStore({ url: ':memory:' }),
|
|
136
|
+
editor,
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
// Store an MCP server config referencing tools by ID
|
|
140
|
+
const server = await editor.mcpServer.create({
|
|
141
|
+
id: 'my-server',
|
|
142
|
+
name: 'My MCP Server',
|
|
143
|
+
version: '1.0.0',
|
|
144
|
+
tools: { getWeather: {}, calculate: { description: 'Custom description' } },
|
|
145
|
+
});
|
|
146
|
+
|
|
147
|
+
// Retrieve — automatically hydrates into a real MCPServer with resolved tools
|
|
148
|
+
const mcp = await editor.mcpServer.getById('my-server');
|
|
149
|
+
const tools = mcp.tools(); // { getWeather: ..., calculate: ... }
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
### Patch Changes
|
|
153
|
+
|
|
154
|
+
- Updated dependencies [[`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`7184d87`](https://github.com/mastra-ai/mastra/commit/7184d87c9237d26862f500ccfd0c9f9eadd38ddf), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`270dd16`](https://github.com/mastra-ai/mastra/commit/270dd168a86698a699d8a9de8dbce1a40f72d862), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`b260123`](https://github.com/mastra-ai/mastra/commit/b2601234bd093d358c92081a58f9b0befdae52b3), [`47892c8`](https://github.com/mastra-ai/mastra/commit/47892c85708eac348209f99f10f9a5f5267e11c0), [`45bb78b`](https://github.com/mastra-ai/mastra/commit/45bb78b70bd9db29678fe49476cd9f4ed01bfd0b), [`70eef84`](https://github.com/mastra-ai/mastra/commit/70eef84b8f44493598fdafa2980a0e7283415eda), [`d84e52d`](https://github.com/mastra-ai/mastra/commit/d84e52d0f6511283ddd21ed5fe7f945449d0f799), [`24b80af`](https://github.com/mastra-ai/mastra/commit/24b80af87da93bb84d389340181e17b7477fa9ca), [`608e156`](https://github.com/mastra-ai/mastra/commit/608e156def954c9604c5e3f6d9dfce3bcc7aeab0), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`59d30b5`](https://github.com/mastra-ai/mastra/commit/59d30b5d0cb44ea7a1c440e7460dfb57eac9a9b5), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`c204b63`](https://github.com/mastra-ai/mastra/commit/c204b632d19e66acb6d6e19b11c4540dd6ad5380), [`742a417`](https://github.com/mastra-ai/mastra/commit/742a417896088220a3b5560c354c45c5ca6d88b9)]:
|
|
155
|
+
- @mastra/core@1.6.0
|
|
156
|
+
- @mastra/schema-compat@1.1.2
|
|
157
|
+
- @mastra/memory@1.5.0
|
|
158
|
+
|
|
159
|
+
## 0.6.0-alpha.0
|
|
160
|
+
|
|
161
|
+
### Minor Changes
|
|
162
|
+
|
|
163
|
+
- Added Processor Providers — a new system for configuring and hydrating processors on stored agents. Define custom processor types with config schemas, available phases, and a factory method, then compose them into serializable processor graphs that support sequential, parallel, and conditional execution. ([#13219](https://github.com/mastra-ai/mastra/pull/13219))
|
|
164
|
+
|
|
165
|
+
**Example — custom processor provider:**
|
|
166
|
+
|
|
167
|
+
```ts
|
|
168
|
+
import { MastraEditor } from '@mastra/editor';
|
|
169
|
+
|
|
170
|
+
// Built-in processors (token-limiter, unicode-normalizer, etc.) are registered automatically.
|
|
171
|
+
// Only register custom providers for your own processors:
|
|
172
|
+
const editor = new MastraEditor({
|
|
173
|
+
processorProviders: {
|
|
174
|
+
'my-custom-filter': myCustomFilterProvider,
|
|
175
|
+
},
|
|
176
|
+
});
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
**Example — stored agent with a processor graph:**
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
const agentConfig = {
|
|
183
|
+
inputProcessors: {
|
|
184
|
+
steps: [
|
|
185
|
+
{
|
|
186
|
+
type: 'step',
|
|
187
|
+
step: { id: 'norm', providerId: 'unicode-normalizer', config: {}, enabledPhases: ['processInput'] },
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
type: 'step',
|
|
191
|
+
step: {
|
|
192
|
+
id: 'limit',
|
|
193
|
+
providerId: 'token-limiter',
|
|
194
|
+
config: { limit: 4000 },
|
|
195
|
+
enabledPhases: ['processInput', 'processOutputStream'],
|
|
196
|
+
},
|
|
197
|
+
},
|
|
198
|
+
],
|
|
199
|
+
},
|
|
200
|
+
};
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
- Added MCP server storage and editor support. MCP server configurations can now be persisted in storage and managed through the editor CMS. The editor's `mcpServer` namespace provides full CRUD operations and automatically hydrates stored configs into running `MCPServer` instances by resolving tool, agent, and workflow references from the Mastra registry. ([#13285](https://github.com/mastra-ai/mastra/pull/13285))
|
|
204
|
+
|
|
205
|
+
```ts
|
|
206
|
+
const editor = new MastraEditor();
|
|
207
|
+
const mastra = new Mastra({
|
|
208
|
+
tools: { getWeather: weatherTool, calculate: calculatorTool },
|
|
209
|
+
storage: new LibSQLStore({ url: ':memory:' }),
|
|
210
|
+
editor,
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
// Store an MCP server config referencing tools by ID
|
|
214
|
+
const server = await editor.mcpServer.create({
|
|
215
|
+
id: 'my-server',
|
|
216
|
+
name: 'My MCP Server',
|
|
217
|
+
version: '1.0.0',
|
|
218
|
+
tools: { getWeather: {}, calculate: { description: 'Custom description' } },
|
|
219
|
+
});
|
|
220
|
+
|
|
221
|
+
// Retrieve — automatically hydrates into a real MCPServer with resolved tools
|
|
222
|
+
const mcp = await editor.mcpServer.getById('my-server');
|
|
223
|
+
const tools = mcp.tools(); // { getWeather: ..., calculate: ... }
|
|
224
|
+
```
|
|
225
|
+
|
|
226
|
+
### Patch Changes
|
|
227
|
+
|
|
228
|
+
- Updated dependencies [[`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`7184d87`](https://github.com/mastra-ai/mastra/commit/7184d87c9237d26862f500ccfd0c9f9eadd38ddf), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`270dd16`](https://github.com/mastra-ai/mastra/commit/270dd168a86698a699d8a9de8dbce1a40f72d862), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`b260123`](https://github.com/mastra-ai/mastra/commit/b2601234bd093d358c92081a58f9b0befdae52b3), [`47892c8`](https://github.com/mastra-ai/mastra/commit/47892c85708eac348209f99f10f9a5f5267e11c0), [`45bb78b`](https://github.com/mastra-ai/mastra/commit/45bb78b70bd9db29678fe49476cd9f4ed01bfd0b), [`70eef84`](https://github.com/mastra-ai/mastra/commit/70eef84b8f44493598fdafa2980a0e7283415eda), [`d84e52d`](https://github.com/mastra-ai/mastra/commit/d84e52d0f6511283ddd21ed5fe7f945449d0f799), [`24b80af`](https://github.com/mastra-ai/mastra/commit/24b80af87da93bb84d389340181e17b7477fa9ca), [`608e156`](https://github.com/mastra-ai/mastra/commit/608e156def954c9604c5e3f6d9dfce3bcc7aeab0), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`59d30b5`](https://github.com/mastra-ai/mastra/commit/59d30b5d0cb44ea7a1c440e7460dfb57eac9a9b5), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`78d1c80`](https://github.com/mastra-ai/mastra/commit/78d1c808ad90201897a300af551bcc1d34458a20), [`c204b63`](https://github.com/mastra-ai/mastra/commit/c204b632d19e66acb6d6e19b11c4540dd6ad5380), [`742a417`](https://github.com/mastra-ai/mastra/commit/742a417896088220a3b5560c354c45c5ca6d88b9)]:
|
|
229
|
+
- @mastra/core@1.6.0-alpha.0
|
|
230
|
+
- @mastra/schema-compat@1.1.2-alpha.0
|
|
231
|
+
- @mastra/memory@1.5.0-alpha.0
|
|
232
|
+
|
|
233
|
+
## 0.5.0
|
|
234
|
+
|
|
235
|
+
### Minor Changes
|
|
236
|
+
|
|
237
|
+
- Added workspace and skill storage domains with full CRUD, versioning, and implementations across LibSQL, Postgres, and MongoDB. Added `editor.workspace` and `editor.skill` namespaces for managing workspace configurations and skill definitions through the editor. Agents stored in the editor can now reference workspaces (by ID or inline config) and skills, with full hydration to runtime `Workspace` instances during agent resolution. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
|
|
238
|
+
|
|
239
|
+
**Filesystem-native skill versioning (draft → publish model):**
|
|
240
|
+
|
|
241
|
+
Skills are versioned as filesystem trees with content-addressable blob storage. The editing surface (live filesystem) is separated from the serving surface (versioned blob store), enabling a `draft → publish` workflow:
|
|
242
|
+
- `editor.skill.publish(skillId, source, skillPath)` — Snapshots a skill directory from the filesystem into blob storage, creates a new version with a tree manifest, and sets `activeVersionId`
|
|
243
|
+
- Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
|
|
244
|
+
- Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
|
|
245
|
+
|
|
246
|
+
**Agent skill resolution strategies:**
|
|
247
|
+
|
|
248
|
+
Agents can reference skills with different resolution strategies:
|
|
249
|
+
- `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
|
|
250
|
+
- `pin: '<versionId>'` — Pins to a specific version, immune to publishes
|
|
251
|
+
- `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
|
|
252
|
+
|
|
253
|
+
**Blob storage infrastructure:**
|
|
254
|
+
- `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
|
|
255
|
+
- `InMemoryBlobStore` for testing
|
|
256
|
+
- LibSQL, Postgres, and MongoDB implementations
|
|
257
|
+
- `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
|
|
258
|
+
- `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
|
|
259
|
+
- `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
|
|
260
|
+
|
|
261
|
+
**New storage types:**
|
|
262
|
+
- `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
|
|
263
|
+
- `StorageWorkspaceRef` for ID-based or inline workspace references on agents
|
|
264
|
+
- `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
|
|
265
|
+
- `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
|
|
266
|
+
- `StorageBlobEntry` for content-addressable blob entries
|
|
267
|
+
- `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
|
|
268
|
+
|
|
269
|
+
**New editor namespaces:**
|
|
270
|
+
- `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
|
|
271
|
+
- `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
|
|
272
|
+
|
|
273
|
+
**Provider registries:**
|
|
274
|
+
- `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
|
|
275
|
+
- Built-in `local` filesystem and sandbox providers are auto-registered
|
|
276
|
+
- `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
|
|
277
|
+
- Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
|
|
278
|
+
|
|
279
|
+
**Storage adapter support:**
|
|
280
|
+
- LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
281
|
+
- Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
282
|
+
- MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
283
|
+
- All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
|
|
284
|
+
|
|
285
|
+
**Server endpoints:**
|
|
286
|
+
- `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
|
|
287
|
+
- `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
|
|
288
|
+
- `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
|
|
289
|
+
|
|
290
|
+
```ts
|
|
291
|
+
import { MastraEditor } from '@mastra/editor';
|
|
292
|
+
import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
|
|
293
|
+
import { e2bSandboxProvider } from '@mastra/e2b';
|
|
294
|
+
|
|
295
|
+
const editor = new MastraEditor({
|
|
296
|
+
filesystems: { s3: s3FilesystemProvider },
|
|
297
|
+
sandboxes: { e2b: e2bSandboxProvider },
|
|
298
|
+
blobStores: { s3: s3BlobStoreProvider },
|
|
299
|
+
});
|
|
300
|
+
|
|
301
|
+
// Create a skill and publish it
|
|
302
|
+
const skill = await editor.skill.create({
|
|
303
|
+
name: 'Code Review',
|
|
304
|
+
description: 'Reviews code for best practices',
|
|
305
|
+
instructions: 'Analyze the code and provide feedback...',
|
|
306
|
+
});
|
|
307
|
+
await editor.skill.publish(skill.id, source, 'skills/code-review');
|
|
308
|
+
|
|
309
|
+
// Agents resolve skills by strategy
|
|
310
|
+
await editor.agent.create({
|
|
311
|
+
name: 'Dev Assistant',
|
|
312
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
313
|
+
workspace: { type: 'id', workspaceId: workspace.id },
|
|
314
|
+
skills: { [skill.id]: { strategy: 'latest' } },
|
|
315
|
+
skillsFormat: 'xml',
|
|
316
|
+
});
|
|
317
|
+
```
|
|
318
|
+
|
|
319
|
+
### Patch Changes
|
|
320
|
+
|
|
321
|
+
- Fixed conditional rules not being persisted for workflows, agents, and scorers when creating or updating agents in the CMS. Rules configured on these entities are now correctly saved to storage. ([#13044](https://github.com/mastra-ai/mastra/pull/13044))
|
|
322
|
+
|
|
323
|
+
- CMS draft support with status badges for agents. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
324
|
+
- Agent list now resolves the latest (draft) version for each stored agent, showing current edits rather than the last published state.
|
|
325
|
+
- Added `hasDraft` and `activeVersionId` fields to the agent list API response.
|
|
326
|
+
- Agent list badges: "Published" (green) when a published version exists, "Draft" (colored when unpublished changes exist, grayed out otherwise).
|
|
327
|
+
- Added `resolvedVersionId` to all `StorageResolved*Type` types so the server can detect whether the latest version differs from the active version.
|
|
328
|
+
- Added `status` option to `GetByIdOptions` to allow resolving draft vs published versions through the editor layer.
|
|
329
|
+
- Fixed editor cache not being cleared on version activate, restore, and delete — all four versioned domains (agents, scorers, prompt-blocks, mcp-clients) now clear the cache after version mutations.
|
|
330
|
+
- Added `ALTER TABLE` migration for `mastra_agent_versions` in libsql and pg to add newer columns (`mcpClients`, `requestContextSchema`, `workspace`, `skills`, `skillsFormat`).
|
|
331
|
+
|
|
332
|
+
- Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`5c75261`](https://github.com/mastra-ai/mastra/commit/5c7526120d936757d4ffb7b82232e1641ebd45cb), [`e27d832`](https://github.com/mastra-ai/mastra/commit/e27d83281b5e166fd63a13969689e928d8605944), [`e37ef84`](https://github.com/mastra-ai/mastra/commit/e37ef8404043c94ca0c8e35ecdedb093b8087878), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`10cf521`](https://github.com/mastra-ai/mastra/commit/10cf52183344743a0d7babe24cd24fd78870c354), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`efdb682`](https://github.com/mastra-ai/mastra/commit/efdb682887f6522149769383908f9790c188ab88), [`0dee7a0`](https://github.com/mastra-ai/mastra/commit/0dee7a0ff4c2507e6eb6e6ee5f9738877ebd4ad1), [`04c2c8e`](https://github.com/mastra-ai/mastra/commit/04c2c8e888984364194131aecb490a3d6e920e61), [`02dc07a`](https://github.com/mastra-ai/mastra/commit/02dc07acc4ad42d93335825e3308f5b42266eba2), [`8650e4d`](https://github.com/mastra-ai/mastra/commit/8650e4d3579a2c3a13e2dba7ec6ee7c82c7f61a8), [`bd222d3`](https://github.com/mastra-ai/mastra/commit/bd222d39e292bfcc4a2d9a9e6ec3976cc5a4f22f), [`bb7262b`](https://github.com/mastra-ai/mastra/commit/bb7262b7c0ca76320d985b40510b6ffbbb936582), [`1415bcd`](https://github.com/mastra-ai/mastra/commit/1415bcd894baba03e07640b3b1986037db49559d), [`cf1c6e7`](https://github.com/mastra-ai/mastra/commit/cf1c6e789b131f55638fed52183a89d5078b4876), [`5ffadfe`](https://github.com/mastra-ai/mastra/commit/5ffadfefb1468ac2612b20bb84d24c39de6961c0), [`1e1339c`](https://github.com/mastra-ai/mastra/commit/1e1339cc276e571a48cfff5014487877086bfe68), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`d03df73`](https://github.com/mastra-ai/mastra/commit/d03df73f8fe9496064a33e1c3b74ba0479bf9ee6), [`79b8f45`](https://github.com/mastra-ai/mastra/commit/79b8f45a6767e1a5c3d56cd3c5b1214326b81661), [`9bbf08e`](https://github.com/mastra-ai/mastra/commit/9bbf08e3c20731c79dea13a765895b9fcf29cbf1), [`0a25952`](https://github.com/mastra-ai/mastra/commit/0a259526b5e1ac11e6efa53db1f140272962af2d), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`3264a04`](https://github.com/mastra-ai/mastra/commit/3264a04e30340c3c5447433300a035ea0878df85), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`aea6217`](https://github.com/mastra-ai/mastra/commit/aea621790bfb2291431b08da0cc5e6e150303ae7), [`b6a855e`](https://github.com/mastra-ai/mastra/commit/b6a855edc056e088279075506442ba1d6fa6def9), [`ae408ea`](https://github.com/mastra-ai/mastra/commit/ae408ea7128f0d2710b78d8623185198e7cb19c1), [`17e942e`](https://github.com/mastra-ai/mastra/commit/17e942eee2ba44985b1f807e6208cdde672f82f9), [`2015cf9`](https://github.com/mastra-ai/mastra/commit/2015cf921649f44c3f5bcd32a2c052335f8e49b4), [`7ef454e`](https://github.com/mastra-ai/mastra/commit/7ef454eaf9dcec6de60021c8f42192052dd490d6), [`2be1d99`](https://github.com/mastra-ai/mastra/commit/2be1d99564ce79acc4846071082bff353035a87a), [`2708fa1`](https://github.com/mastra-ai/mastra/commit/2708fa1055ac91c03e08b598869f6b8fb51fa37f), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ec53e89`](https://github.com/mastra-ai/mastra/commit/ec53e8939c76c638991e21af762e51378eff7543), [`9b5a8cb`](https://github.com/mastra-ai/mastra/commit/9b5a8cb13e120811b0bf14140ada314f1c067894), [`607e66b`](https://github.com/mastra-ai/mastra/commit/607e66b02dc7f531ee37799f3456aa2dc0ca7ac5), [`a215d06`](https://github.com/mastra-ai/mastra/commit/a215d06758dcf590eabfe0b7afd4ae39bdbf082c), [`6909c74`](https://github.com/mastra-ai/mastra/commit/6909c74a7781e0447d475e9dbc1dc871b700f426), [`192438f`](https://github.com/mastra-ai/mastra/commit/192438f8a90c4f375e955f8ff179bf8dc6821a83)]:
|
|
333
|
+
- @mastra/core@1.5.0
|
|
334
|
+
- @mastra/memory@1.4.0
|
|
335
|
+
- @mastra/schema-compat@1.1.1
|
|
336
|
+
|
|
337
|
+
## 0.5.0-alpha.1
|
|
338
|
+
|
|
339
|
+
### Patch Changes
|
|
340
|
+
|
|
341
|
+
- Updated dependencies [[`1415bcd`](https://github.com/mastra-ai/mastra/commit/1415bcd894baba03e07640b3b1986037db49559d)]:
|
|
342
|
+
- @mastra/schema-compat@1.1.1-alpha.0
|
|
343
|
+
- @mastra/core@1.5.0-alpha.1
|
|
344
|
+
- @mastra/memory@1.4.0-alpha.1
|
|
345
|
+
|
|
346
|
+
## 0.5.0-alpha.0
|
|
347
|
+
|
|
348
|
+
### Minor Changes
|
|
349
|
+
|
|
350
|
+
- Added workspace and skill storage domains with full CRUD, versioning, and implementations across LibSQL, Postgres, and MongoDB. Added `editor.workspace` and `editor.skill` namespaces for managing workspace configurations and skill definitions through the editor. Agents stored in the editor can now reference workspaces (by ID or inline config) and skills, with full hydration to runtime `Workspace` instances during agent resolution. ([#13156](https://github.com/mastra-ai/mastra/pull/13156))
|
|
351
|
+
|
|
352
|
+
**Filesystem-native skill versioning (draft → publish model):**
|
|
353
|
+
|
|
354
|
+
Skills are versioned as filesystem trees with content-addressable blob storage. The editing surface (live filesystem) is separated from the serving surface (versioned blob store), enabling a `draft → publish` workflow:
|
|
355
|
+
- `editor.skill.publish(skillId, source, skillPath)` — Snapshots a skill directory from the filesystem into blob storage, creates a new version with a tree manifest, and sets `activeVersionId`
|
|
356
|
+
- Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
|
|
357
|
+
- Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
|
|
358
|
+
|
|
359
|
+
**Agent skill resolution strategies:**
|
|
360
|
+
|
|
361
|
+
Agents can reference skills with different resolution strategies:
|
|
362
|
+
- `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
|
|
363
|
+
- `pin: '<versionId>'` — Pins to a specific version, immune to publishes
|
|
364
|
+
- `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
|
|
365
|
+
|
|
366
|
+
**Blob storage infrastructure:**
|
|
367
|
+
- `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
|
|
368
|
+
- `InMemoryBlobStore` for testing
|
|
369
|
+
- LibSQL, Postgres, and MongoDB implementations
|
|
370
|
+
- `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
|
|
371
|
+
- `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
|
|
372
|
+
- `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
|
|
373
|
+
|
|
374
|
+
**New storage types:**
|
|
375
|
+
- `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
|
|
376
|
+
- `StorageWorkspaceRef` for ID-based or inline workspace references on agents
|
|
377
|
+
- `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
|
|
378
|
+
- `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
|
|
379
|
+
- `StorageBlobEntry` for content-addressable blob entries
|
|
380
|
+
- `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
|
|
381
|
+
|
|
382
|
+
**New editor namespaces:**
|
|
383
|
+
- `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
|
|
384
|
+
- `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
|
|
385
|
+
|
|
386
|
+
**Provider registries:**
|
|
387
|
+
- `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
|
|
388
|
+
- Built-in `local` filesystem and sandbox providers are auto-registered
|
|
389
|
+
- `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
|
|
390
|
+
- Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
|
|
391
|
+
|
|
392
|
+
**Storage adapter support:**
|
|
393
|
+
- LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
394
|
+
- Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
395
|
+
- MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
396
|
+
- All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
|
|
397
|
+
|
|
398
|
+
**Server endpoints:**
|
|
399
|
+
- `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
|
|
400
|
+
- `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
|
|
401
|
+
- `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
|
|
402
|
+
|
|
403
|
+
```ts
|
|
404
|
+
import { MastraEditor } from '@mastra/editor';
|
|
405
|
+
import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
|
|
406
|
+
import { e2bSandboxProvider } from '@mastra/e2b';
|
|
407
|
+
|
|
408
|
+
const editor = new MastraEditor({
|
|
409
|
+
filesystems: { s3: s3FilesystemProvider },
|
|
410
|
+
sandboxes: { e2b: e2bSandboxProvider },
|
|
411
|
+
blobStores: { s3: s3BlobStoreProvider },
|
|
412
|
+
});
|
|
413
|
+
|
|
414
|
+
// Create a skill and publish it
|
|
415
|
+
const skill = await editor.skill.create({
|
|
416
|
+
name: 'Code Review',
|
|
417
|
+
description: 'Reviews code for best practices',
|
|
418
|
+
instructions: 'Analyze the code and provide feedback...',
|
|
419
|
+
});
|
|
420
|
+
await editor.skill.publish(skill.id, source, 'skills/code-review');
|
|
421
|
+
|
|
422
|
+
// Agents resolve skills by strategy
|
|
423
|
+
await editor.agent.create({
|
|
424
|
+
name: 'Dev Assistant',
|
|
425
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
426
|
+
workspace: { type: 'id', workspaceId: workspace.id },
|
|
427
|
+
skills: { [skill.id]: { strategy: 'latest' } },
|
|
428
|
+
skillsFormat: 'xml',
|
|
429
|
+
});
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
### Patch Changes
|
|
433
|
+
|
|
434
|
+
- Fixed conditional rules not being persisted for workflows, agents, and scorers when creating or updating agents in the CMS. Rules configured on these entities are now correctly saved to storage. ([#13044](https://github.com/mastra-ai/mastra/pull/13044))
|
|
435
|
+
|
|
436
|
+
- CMS draft support with status badges for agents. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
437
|
+
- Agent list now resolves the latest (draft) version for each stored agent, showing current edits rather than the last published state.
|
|
438
|
+
- Added `hasDraft` and `activeVersionId` fields to the agent list API response.
|
|
439
|
+
- Agent list badges: "Published" (green) when a published version exists, "Draft" (colored when unpublished changes exist, grayed out otherwise).
|
|
440
|
+
- Added `resolvedVersionId` to all `StorageResolved*Type` types so the server can detect whether the latest version differs from the active version.
|
|
441
|
+
- Added `status` option to `GetByIdOptions` to allow resolving draft vs published versions through the editor layer.
|
|
442
|
+
- Fixed editor cache not being cleared on version activate, restore, and delete — all four versioned domains (agents, scorers, prompt-blocks, mcp-clients) now clear the cache after version mutations.
|
|
443
|
+
- Added `ALTER TABLE` migration for `mastra_agent_versions` in libsql and pg to add newer columns (`mcpClients`, `requestContextSchema`, `workspace`, `skills`, `skillsFormat`).
|
|
444
|
+
|
|
445
|
+
- Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`f8e819f`](https://github.com/mastra-ai/mastra/commit/f8e819fabdfdc43d2da546a3ad81ba23685f603d), [`5c75261`](https://github.com/mastra-ai/mastra/commit/5c7526120d936757d4ffb7b82232e1641ebd45cb), [`e27d832`](https://github.com/mastra-ai/mastra/commit/e27d83281b5e166fd63a13969689e928d8605944), [`e37ef84`](https://github.com/mastra-ai/mastra/commit/e37ef8404043c94ca0c8e35ecdedb093b8087878), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`10cf521`](https://github.com/mastra-ai/mastra/commit/10cf52183344743a0d7babe24cd24fd78870c354), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`efdb682`](https://github.com/mastra-ai/mastra/commit/efdb682887f6522149769383908f9790c188ab88), [`0dee7a0`](https://github.com/mastra-ai/mastra/commit/0dee7a0ff4c2507e6eb6e6ee5f9738877ebd4ad1), [`04c2c8e`](https://github.com/mastra-ai/mastra/commit/04c2c8e888984364194131aecb490a3d6e920e61), [`02dc07a`](https://github.com/mastra-ai/mastra/commit/02dc07acc4ad42d93335825e3308f5b42266eba2), [`8650e4d`](https://github.com/mastra-ai/mastra/commit/8650e4d3579a2c3a13e2dba7ec6ee7c82c7f61a8), [`bd222d3`](https://github.com/mastra-ai/mastra/commit/bd222d39e292bfcc4a2d9a9e6ec3976cc5a4f22f), [`bb7262b`](https://github.com/mastra-ai/mastra/commit/bb7262b7c0ca76320d985b40510b6ffbbb936582), [`cf1c6e7`](https://github.com/mastra-ai/mastra/commit/cf1c6e789b131f55638fed52183a89d5078b4876), [`5ffadfe`](https://github.com/mastra-ai/mastra/commit/5ffadfefb1468ac2612b20bb84d24c39de6961c0), [`1e1339c`](https://github.com/mastra-ai/mastra/commit/1e1339cc276e571a48cfff5014487877086bfe68), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`d03df73`](https://github.com/mastra-ai/mastra/commit/d03df73f8fe9496064a33e1c3b74ba0479bf9ee6), [`79b8f45`](https://github.com/mastra-ai/mastra/commit/79b8f45a6767e1a5c3d56cd3c5b1214326b81661), [`9bbf08e`](https://github.com/mastra-ai/mastra/commit/9bbf08e3c20731c79dea13a765895b9fcf29cbf1), [`0a25952`](https://github.com/mastra-ai/mastra/commit/0a259526b5e1ac11e6efa53db1f140272962af2d), [`ffa5468`](https://github.com/mastra-ai/mastra/commit/ffa546857fc4821753979b3a34e13b4d76fbbcd4), [`3264a04`](https://github.com/mastra-ai/mastra/commit/3264a04e30340c3c5447433300a035ea0878df85), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`6fdd3d4`](https://github.com/mastra-ai/mastra/commit/6fdd3d451a07a8e7e216c62ac364f8dd8e36c2af), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`74fbebd`](https://github.com/mastra-ai/mastra/commit/74fbebd918a03832a2864965a8bea59bf617d3a2), [`aea6217`](https://github.com/mastra-ai/mastra/commit/aea621790bfb2291431b08da0cc5e6e150303ae7), [`b6a855e`](https://github.com/mastra-ai/mastra/commit/b6a855edc056e088279075506442ba1d6fa6def9), [`ae408ea`](https://github.com/mastra-ai/mastra/commit/ae408ea7128f0d2710b78d8623185198e7cb19c1), [`17e942e`](https://github.com/mastra-ai/mastra/commit/17e942eee2ba44985b1f807e6208cdde672f82f9), [`2015cf9`](https://github.com/mastra-ai/mastra/commit/2015cf921649f44c3f5bcd32a2c052335f8e49b4), [`7ef454e`](https://github.com/mastra-ai/mastra/commit/7ef454eaf9dcec6de60021c8f42192052dd490d6), [`2be1d99`](https://github.com/mastra-ai/mastra/commit/2be1d99564ce79acc4846071082bff353035a87a), [`2708fa1`](https://github.com/mastra-ai/mastra/commit/2708fa1055ac91c03e08b598869f6b8fb51fa37f), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ba74aef`](https://github.com/mastra-ai/mastra/commit/ba74aef5716142dbbe931351f5243c9c6e4128a9), [`ec53e89`](https://github.com/mastra-ai/mastra/commit/ec53e8939c76c638991e21af762e51378eff7543), [`9b5a8cb`](https://github.com/mastra-ai/mastra/commit/9b5a8cb13e120811b0bf14140ada314f1c067894), [`607e66b`](https://github.com/mastra-ai/mastra/commit/607e66b02dc7f531ee37799f3456aa2dc0ca7ac5), [`a215d06`](https://github.com/mastra-ai/mastra/commit/a215d06758dcf590eabfe0b7afd4ae39bdbf082c), [`6909c74`](https://github.com/mastra-ai/mastra/commit/6909c74a7781e0447d475e9dbc1dc871b700f426), [`192438f`](https://github.com/mastra-ai/mastra/commit/192438f8a90c4f375e955f8ff179bf8dc6821a83)]:
|
|
446
|
+
- @mastra/core@1.5.0-alpha.0
|
|
447
|
+
- @mastra/memory@1.4.0-alpha.0
|
|
448
|
+
|
|
449
|
+
## 0.4.0
|
|
450
|
+
|
|
451
|
+
### Minor Changes
|
|
452
|
+
|
|
453
|
+
- Added observational memory configuration support for stored agents. When creating or editing a stored agent in the playground, you can now enable observational memory and configure its settings including model provider/name, scope (thread or resource), share token budget, and detailed observer/reflector parameters like token limits, buffer settings, and blocking thresholds. The configuration is serialized as part of the agent's memory config and round-trips through storage. ([#12962](https://github.com/mastra-ai/mastra/pull/12962))
|
|
454
|
+
|
|
455
|
+
**Example usage in the playground:**
|
|
456
|
+
|
|
457
|
+
Enable the Observational Memory toggle in the Memory section, then configure:
|
|
458
|
+
- Top-level model (provider + model) used by both observer and reflector
|
|
459
|
+
- Scope: `thread` (per-conversation) or `resource` (shared across threads)
|
|
460
|
+
- Expand **Observer** or **Reflector** sections to override models and tune token budgets
|
|
461
|
+
|
|
462
|
+
**Programmatic usage via client SDK:**
|
|
463
|
+
|
|
464
|
+
```ts
|
|
465
|
+
await client.createStoredAgent({
|
|
466
|
+
name: 'My Agent',
|
|
467
|
+
// ...other config
|
|
468
|
+
memory: {
|
|
469
|
+
observationalMemory: true, // enable with defaults
|
|
470
|
+
options: { lastMessages: 40 },
|
|
471
|
+
},
|
|
472
|
+
});
|
|
473
|
+
|
|
474
|
+
// Or with custom configuration:
|
|
475
|
+
await client.createStoredAgent({
|
|
476
|
+
name: 'My Agent',
|
|
477
|
+
memory: {
|
|
478
|
+
observationalMemory: {
|
|
479
|
+
model: 'google/gemini-2.5-flash',
|
|
480
|
+
scope: 'resource',
|
|
481
|
+
shareTokenBudget: true,
|
|
482
|
+
observation: { messageTokens: 50000 },
|
|
483
|
+
reflection: { observationTokens: 60000 },
|
|
484
|
+
},
|
|
485
|
+
options: { lastMessages: 40 },
|
|
486
|
+
},
|
|
487
|
+
});
|
|
488
|
+
```
|
|
489
|
+
|
|
490
|
+
**Programmatic usage via editor:**
|
|
491
|
+
|
|
492
|
+
```ts
|
|
493
|
+
await editor.agent.create({
|
|
494
|
+
name: 'My Agent',
|
|
495
|
+
// ...other config
|
|
496
|
+
memory: {
|
|
497
|
+
observationalMemory: true, // enable with defaults
|
|
498
|
+
options: { lastMessages: 40 },
|
|
499
|
+
},
|
|
500
|
+
});
|
|
501
|
+
|
|
502
|
+
// Or with custom configuration:
|
|
503
|
+
await editor.agent.create({
|
|
504
|
+
name: 'My Agent',
|
|
505
|
+
memory: {
|
|
506
|
+
observationalMemory: {
|
|
507
|
+
model: 'google/gemini-2.5-flash',
|
|
508
|
+
scope: 'resource',
|
|
509
|
+
shareTokenBudget: true,
|
|
510
|
+
observation: { messageTokens: 50000 },
|
|
511
|
+
reflection: { observationTokens: 60000 },
|
|
512
|
+
},
|
|
513
|
+
options: { lastMessages: 40 },
|
|
514
|
+
},
|
|
515
|
+
});
|
|
516
|
+
```
|
|
517
|
+
|
|
518
|
+
- Added MCP client management, integration tools resolution, and built-in Composio and Arcade AI tool providers. ([#12974](https://github.com/mastra-ai/mastra/pull/12974))
|
|
519
|
+
|
|
520
|
+
**MCP Client Namespace**
|
|
521
|
+
|
|
522
|
+
New `editor.mcpClient` namespace for managing stored MCP client configurations with full CRUD operations. Stored agents can reference MCP clients with per-server tool filtering.
|
|
523
|
+
|
|
524
|
+
**Integration Tools**
|
|
525
|
+
|
|
526
|
+
Stored agents now support an `integrationTools` conditional field that resolves tools from registered `ToolProvider` instances at hydration time:
|
|
527
|
+
|
|
528
|
+
```ts
|
|
529
|
+
import { MastraEditor } from '@mastra/editor';
|
|
530
|
+
import { ComposioToolProvider } from '@mastra/editor/composio';
|
|
531
|
+
import { ArcadeToolProvider } from '@mastra/editor/arcade';
|
|
532
|
+
|
|
533
|
+
const editor = new MastraEditor({
|
|
534
|
+
// ...
|
|
535
|
+
toolProviders: {
|
|
536
|
+
composio: new ComposioToolProvider({ apiKey: '...' }),
|
|
537
|
+
arcade: new ArcadeToolProvider({ apiKey: '...' }),
|
|
538
|
+
},
|
|
539
|
+
});
|
|
540
|
+
```
|
|
541
|
+
|
|
542
|
+
**Built-in Tool Providers**
|
|
543
|
+
- `@mastra/editor/composio` — Composio tool provider with toolkit/tool discovery and execution via `@composio/core` and `@composio/mastra` SDKs
|
|
544
|
+
- `@mastra/editor/arcade` — Arcade AI tool provider with a pre-seeded catalog of 93 toolkits, tool discovery, and execution via `@arcadeai/arcadejs` SDK
|
|
545
|
+
|
|
546
|
+
Each provider is a separate entry point — importing `@mastra/editor` alone does not load any provider SDK code.
|
|
547
|
+
|
|
548
|
+
### Patch Changes
|
|
549
|
+
|
|
550
|
+
- Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b373564`](https://github.com/mastra-ai/mastra/commit/b37356491d43b4d53067f10cb669abaf2502f218), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`191bc3a`](https://github.com/mastra-ai/mastra/commit/191bc3adfdbe4b262dbc93b7d9c3d6c6a3c8ef92), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`74fb394`](https://github.com/mastra-ai/mastra/commit/74fb3944f51f55e1fc1ca65eede4254d8fe72aa3), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`cb8c38e`](https://github.com/mastra-ai/mastra/commit/cb8c38e6f855ad190383a7112ba95abef072d490), [`7567222`](https://github.com/mastra-ai/mastra/commit/7567222b1366f0d39980594792dd9d5060bfe2ab), [`af71458`](https://github.com/mastra-ai/mastra/commit/af71458e3b566f09c11d0e5a0a836dc818e7a24a), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3cbf121`](https://github.com/mastra-ai/mastra/commit/3cbf121f55418141924754a83102aade89835947)]:
|
|
551
|
+
- @mastra/core@1.4.0
|
|
552
|
+
- @mastra/memory@1.3.0
|
|
553
|
+
|
|
554
|
+
## 0.4.0-alpha.0
|
|
555
|
+
|
|
556
|
+
### Minor Changes
|
|
557
|
+
|
|
558
|
+
- Added observational memory configuration support for stored agents. When creating or editing a stored agent in the playground, you can now enable observational memory and configure its settings including model provider/name, scope (thread or resource), share token budget, and detailed observer/reflector parameters like token limits, buffer settings, and blocking thresholds. The configuration is serialized as part of the agent's memory config and round-trips through storage. ([#12962](https://github.com/mastra-ai/mastra/pull/12962))
|
|
559
|
+
|
|
560
|
+
**Example usage in the playground:**
|
|
561
|
+
|
|
562
|
+
Enable the Observational Memory toggle in the Memory section, then configure:
|
|
563
|
+
- Top-level model (provider + model) used by both observer and reflector
|
|
564
|
+
- Scope: `thread` (per-conversation) or `resource` (shared across threads)
|
|
565
|
+
- Expand **Observer** or **Reflector** sections to override models and tune token budgets
|
|
566
|
+
|
|
567
|
+
**Programmatic usage via client SDK:**
|
|
568
|
+
|
|
569
|
+
```ts
|
|
570
|
+
await client.createStoredAgent({
|
|
571
|
+
name: 'My Agent',
|
|
572
|
+
// ...other config
|
|
573
|
+
memory: {
|
|
574
|
+
observationalMemory: true, // enable with defaults
|
|
575
|
+
options: { lastMessages: 40 },
|
|
576
|
+
},
|
|
577
|
+
});
|
|
578
|
+
|
|
579
|
+
// Or with custom configuration:
|
|
580
|
+
await client.createStoredAgent({
|
|
581
|
+
name: 'My Agent',
|
|
582
|
+
memory: {
|
|
583
|
+
observationalMemory: {
|
|
584
|
+
model: 'google/gemini-2.5-flash',
|
|
585
|
+
scope: 'resource',
|
|
586
|
+
shareTokenBudget: true,
|
|
587
|
+
observation: { messageTokens: 50000 },
|
|
588
|
+
reflection: { observationTokens: 60000 },
|
|
589
|
+
},
|
|
590
|
+
options: { lastMessages: 40 },
|
|
591
|
+
},
|
|
592
|
+
});
|
|
593
|
+
```
|
|
594
|
+
|
|
595
|
+
**Programmatic usage via editor:**
|
|
596
|
+
|
|
597
|
+
```ts
|
|
598
|
+
await editor.agent.create({
|
|
599
|
+
name: 'My Agent',
|
|
600
|
+
// ...other config
|
|
601
|
+
memory: {
|
|
602
|
+
observationalMemory: true, // enable with defaults
|
|
603
|
+
options: { lastMessages: 40 },
|
|
604
|
+
},
|
|
605
|
+
});
|
|
606
|
+
|
|
607
|
+
// Or with custom configuration:
|
|
608
|
+
await editor.agent.create({
|
|
609
|
+
name: 'My Agent',
|
|
610
|
+
memory: {
|
|
611
|
+
observationalMemory: {
|
|
612
|
+
model: 'google/gemini-2.5-flash',
|
|
613
|
+
scope: 'resource',
|
|
614
|
+
shareTokenBudget: true,
|
|
615
|
+
observation: { messageTokens: 50000 },
|
|
616
|
+
reflection: { observationTokens: 60000 },
|
|
617
|
+
},
|
|
618
|
+
options: { lastMessages: 40 },
|
|
619
|
+
},
|
|
620
|
+
});
|
|
621
|
+
```
|
|
622
|
+
|
|
623
|
+
- Added MCP client management, integration tools resolution, and built-in Composio and Arcade AI tool providers. ([#12974](https://github.com/mastra-ai/mastra/pull/12974))
|
|
624
|
+
|
|
625
|
+
**MCP Client Namespace**
|
|
626
|
+
|
|
627
|
+
New `editor.mcpClient` namespace for managing stored MCP client configurations with full CRUD operations. Stored agents can reference MCP clients with per-server tool filtering.
|
|
628
|
+
|
|
629
|
+
**Integration Tools**
|
|
630
|
+
|
|
631
|
+
Stored agents now support an `integrationTools` conditional field that resolves tools from registered `ToolProvider` instances at hydration time:
|
|
632
|
+
|
|
633
|
+
```ts
|
|
634
|
+
import { MastraEditor } from '@mastra/editor';
|
|
635
|
+
import { ComposioToolProvider } from '@mastra/editor/composio';
|
|
636
|
+
import { ArcadeToolProvider } from '@mastra/editor/arcade';
|
|
637
|
+
|
|
638
|
+
const editor = new MastraEditor({
|
|
639
|
+
// ...
|
|
640
|
+
toolProviders: {
|
|
641
|
+
composio: new ComposioToolProvider({ apiKey: '...' }),
|
|
642
|
+
arcade: new ArcadeToolProvider({ apiKey: '...' }),
|
|
643
|
+
},
|
|
644
|
+
});
|
|
645
|
+
```
|
|
646
|
+
|
|
647
|
+
**Built-in Tool Providers**
|
|
648
|
+
- `@mastra/editor/composio` — Composio tool provider with toolkit/tool discovery and execution via `@composio/core` and `@composio/mastra` SDKs
|
|
649
|
+
- `@mastra/editor/arcade` — Arcade AI tool provider with a pre-seeded catalog of 93 toolkits, tool discovery, and execution via `@arcadeai/arcadejs` SDK
|
|
650
|
+
|
|
651
|
+
Each provider is a separate entry point — importing `@mastra/editor` alone does not load any provider SDK code.
|
|
652
|
+
|
|
653
|
+
### Patch Changes
|
|
654
|
+
|
|
655
|
+
- Updated dependencies [[`7ef618f`](https://github.com/mastra-ai/mastra/commit/7ef618f3c49c27e2f6b27d7f564c557c0734325b), [`b373564`](https://github.com/mastra-ai/mastra/commit/b37356491d43b4d53067f10cb669abaf2502f218), [`927c2af`](https://github.com/mastra-ai/mastra/commit/927c2af9792286c122e04409efce0f3c804f777f), [`b896b41`](https://github.com/mastra-ai/mastra/commit/b896b41343de7fcc14442fb40fe82d189e65bbe2), [`6415277`](https://github.com/mastra-ai/mastra/commit/6415277a438faa00db2af850ead5dee25f40c428), [`191bc3a`](https://github.com/mastra-ai/mastra/commit/191bc3adfdbe4b262dbc93b7d9c3d6c6a3c8ef92), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`74fb394`](https://github.com/mastra-ai/mastra/commit/74fb3944f51f55e1fc1ca65eede4254d8fe72aa3), [`63f7eda`](https://github.com/mastra-ai/mastra/commit/63f7eda605eb3e0c8c35ee3912ffe7c999c69f69), [`a5b67a3`](https://github.com/mastra-ai/mastra/commit/a5b67a3589a74415feb663a55d1858324a2afde9), [`877b02c`](https://github.com/mastra-ai/mastra/commit/877b02cdbb15e199184c7f2b8f217be8d3ebada7), [`cb8c38e`](https://github.com/mastra-ai/mastra/commit/cb8c38e6f855ad190383a7112ba95abef072d490), [`7567222`](https://github.com/mastra-ai/mastra/commit/7567222b1366f0d39980594792dd9d5060bfe2ab), [`af71458`](https://github.com/mastra-ai/mastra/commit/af71458e3b566f09c11d0e5a0a836dc818e7a24a), [`eb36bd8`](https://github.com/mastra-ai/mastra/commit/eb36bd8c52fcd6ec9674ac3b7a6412405b5983e1), [`3cbf121`](https://github.com/mastra-ai/mastra/commit/3cbf121f55418141924754a83102aade89835947)]:
|
|
656
|
+
- @mastra/core@1.4.0-alpha.0
|
|
657
|
+
- @mastra/memory@1.3.0-alpha.0
|
|
658
|
+
|
|
659
|
+
## 0.3.0
|
|
660
|
+
|
|
661
|
+
### Minor Changes
|
|
662
|
+
|
|
663
|
+
- Added `requestContextSchema` and rule-based conditional fields for stored agents. ([#12896](https://github.com/mastra-ai/mastra/pull/12896))
|
|
664
|
+
|
|
665
|
+
Stored agent fields (`tools`, `model`, `workflows`, `agents`, `memory`, `scorers`, `inputProcessors`, `outputProcessors`, `defaultOptions`) can now be configured as conditional variants with rule groups that evaluate against request context at runtime. All matching variants accumulate — arrays are concatenated and objects are shallow-merged — so agents dynamically compose their configuration based on the incoming request context.
|
|
666
|
+
|
|
667
|
+
**New `requestContextSchema` field**
|
|
668
|
+
|
|
669
|
+
Stored agents now accept an optional `requestContextSchema` (JSON Schema) that is converted to a Zod schema and passed to the Agent constructor, enabling request context validation.
|
|
670
|
+
|
|
671
|
+
**Conditional field example**
|
|
672
|
+
|
|
673
|
+
```ts
|
|
674
|
+
await agentsStore.create({
|
|
675
|
+
agent: {
|
|
676
|
+
id: 'my-agent',
|
|
677
|
+
name: 'My Agent',
|
|
678
|
+
instructions: 'You are a helpful assistant',
|
|
679
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
680
|
+
tools: [
|
|
681
|
+
{ value: { 'basic-tool': {} } },
|
|
682
|
+
{
|
|
683
|
+
value: { 'premium-tool': {} },
|
|
684
|
+
rules: {
|
|
685
|
+
operator: 'AND',
|
|
686
|
+
conditions: [{ field: 'tier', operator: 'equals', value: 'premium' }],
|
|
687
|
+
},
|
|
688
|
+
},
|
|
689
|
+
],
|
|
690
|
+
requestContextSchema: {
|
|
691
|
+
type: 'object',
|
|
692
|
+
properties: { tier: { type: 'string' } },
|
|
693
|
+
},
|
|
694
|
+
},
|
|
695
|
+
});
|
|
696
|
+
```
|
|
697
|
+
|
|
698
|
+
- Added dynamic instructions for stored agents. Agent instructions can now be composed from reusable prompt blocks with conditional rules and variable interpolation, enabling a prompt-CMS-like editing experience. ([#12861](https://github.com/mastra-ai/mastra/pull/12861))
|
|
699
|
+
|
|
700
|
+
**Instruction blocks** can be mixed in an agent's instructions array:
|
|
701
|
+
- `text` — static text with `{{variable}}` interpolation
|
|
702
|
+
- `prompt_block_ref` — reference to a versioned prompt block stored in the database
|
|
703
|
+
- `prompt_block` — inline prompt block with optional conditional rules
|
|
704
|
+
|
|
705
|
+
**Creating a prompt block and using it in a stored agent:**
|
|
706
|
+
|
|
707
|
+
```ts
|
|
708
|
+
// Create a reusable prompt block
|
|
709
|
+
const block = await editor.createPromptBlock({
|
|
710
|
+
id: 'security-rules',
|
|
711
|
+
name: 'Security Rules',
|
|
712
|
+
content: "You must verify the user's identity. The user's role is {{user.role}}.",
|
|
713
|
+
rules: {
|
|
714
|
+
operator: 'AND',
|
|
715
|
+
conditions: [{ field: 'user.isAuthenticated', operator: 'equals', value: true }],
|
|
716
|
+
},
|
|
717
|
+
});
|
|
718
|
+
|
|
719
|
+
// Create a stored agent that references the prompt block
|
|
720
|
+
await editor.createStoredAgent({
|
|
721
|
+
id: 'support-agent',
|
|
722
|
+
name: 'Support Agent',
|
|
723
|
+
instructions: [
|
|
724
|
+
{ type: 'text', content: 'You are a helpful support agent for {{company}}.' },
|
|
725
|
+
{ type: 'prompt_block_ref', id: 'security-rules' },
|
|
726
|
+
{
|
|
727
|
+
type: 'prompt_block',
|
|
728
|
+
content: 'Always be polite.',
|
|
729
|
+
rules: { operator: 'AND', conditions: [{ field: 'tone', operator: 'equals', value: 'formal' }] },
|
|
730
|
+
},
|
|
731
|
+
],
|
|
732
|
+
model: { provider: 'openai', name: 'gpt-4o' },
|
|
733
|
+
});
|
|
734
|
+
|
|
735
|
+
// At runtime, instructions resolve dynamically based on request context
|
|
736
|
+
const agent = await editor.getStoredAgentById('support-agent');
|
|
737
|
+
const result = await agent.generate('Help me reset my password', {
|
|
738
|
+
requestContext: new RequestContext([
|
|
739
|
+
['company', 'Acme Corp'],
|
|
740
|
+
['user.isAuthenticated', true],
|
|
741
|
+
['user.role', 'admin'],
|
|
742
|
+
['tone', 'formal'],
|
|
743
|
+
]),
|
|
744
|
+
});
|
|
745
|
+
```
|
|
746
|
+
|
|
747
|
+
Prompt blocks are versioned — updating a block's content takes effect immediately for all agents referencing it, with no cache clearing required.
|
|
748
|
+
|
|
749
|
+
- **Added stored scorer definitions, editor namespace pattern, and generic storage domains** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
|
|
750
|
+
- Added a new `scorer-definitions` storage domain for storing LLM-as-judge and preset scorer configurations in the database
|
|
751
|
+
- Introduced a `VersionedStorageDomain` generic base class that unifies `AgentsStorage`, `PromptBlocksStorage`, and `ScorerDefinitionsStorage` with shared CRUD methods (`create`, `getById`, `getByIdResolved`, `update`, `delete`, `list`, `listResolved`)
|
|
752
|
+
- Flattened stored scorer type system: replaced nested `preset`/`customLLMJudge` config with top-level `type`, `instructions`, `scoreRange`, and `presetConfig` fields
|
|
753
|
+
- Refactored `MastraEditor` to use a namespace pattern (`editor.agent.*`, `editor.scorer.*`, `editor.prompt.*`) backed by a `CrudEditorNamespace` base class with built-in caching and an `onCacheEvict` hook
|
|
754
|
+
- Added `rawConfig` support to `MastraBase` and `MastraScorer` via `toRawConfig()`, so hydrated primitives carry their stored configuration
|
|
755
|
+
- Added prompt block and scorer registration to the `Mastra` class (`addPromptBlock`, `removePromptBlock`, `addScorer`, `removeScorer`)
|
|
756
|
+
|
|
757
|
+
**Creating a stored scorer (LLM-as-judge):**
|
|
758
|
+
|
|
759
|
+
```ts
|
|
760
|
+
const scorer = await editor.scorer.create({
|
|
761
|
+
id: 'my-scorer',
|
|
762
|
+
name: 'Response Quality',
|
|
763
|
+
type: 'llm-judge',
|
|
764
|
+
instructions: 'Evaluate the response for accuracy and helpfulness.',
|
|
765
|
+
model: { provider: 'openai', name: 'gpt-4o' },
|
|
766
|
+
scoreRange: { min: 0, max: 1 },
|
|
767
|
+
});
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
**Retrieving and resolving a stored scorer:**
|
|
771
|
+
|
|
772
|
+
```ts
|
|
773
|
+
// Fetch the stored definition from DB
|
|
774
|
+
const definition = await editor.scorer.getById('my-scorer');
|
|
775
|
+
|
|
776
|
+
// Resolve it into a runnable MastraScorer instance
|
|
777
|
+
const runnableScorer = editor.scorer.resolve(definition);
|
|
778
|
+
|
|
779
|
+
// Execute the scorer
|
|
780
|
+
const result = await runnableScorer.run({
|
|
781
|
+
input: 'What is the capital of France?',
|
|
782
|
+
output: 'The capital of France is Paris.',
|
|
783
|
+
});
|
|
784
|
+
```
|
|
785
|
+
|
|
786
|
+
**Editor namespace pattern (before/after):**
|
|
787
|
+
|
|
788
|
+
```ts
|
|
789
|
+
// Before
|
|
790
|
+
const agent = await editor.getStoredAgentById('abc');
|
|
791
|
+
const prompts = await editor.listPromptBlocks();
|
|
792
|
+
|
|
793
|
+
// After
|
|
794
|
+
const agent = await editor.agent.getById('abc');
|
|
795
|
+
const prompts = await editor.prompt.list();
|
|
796
|
+
```
|
|
797
|
+
|
|
798
|
+
**Generic storage domain methods (before/after):**
|
|
799
|
+
|
|
800
|
+
```ts
|
|
801
|
+
// Before
|
|
802
|
+
const store = storage.getStore('agents');
|
|
803
|
+
await store.createAgent({ agent: input });
|
|
804
|
+
await store.getAgentById({ id: 'abc' });
|
|
805
|
+
await store.deleteAgent({ id: 'abc' });
|
|
806
|
+
|
|
807
|
+
// After
|
|
808
|
+
const store = storage.getStore('agents');
|
|
809
|
+
await store.create({ agent: input });
|
|
810
|
+
await store.getById('abc');
|
|
811
|
+
await store.delete('abc');
|
|
812
|
+
```
|
|
813
|
+
|
|
814
|
+
- Add tool description overrides for stored agents: ([#12794](https://github.com/mastra-ai/mastra/pull/12794))
|
|
815
|
+
- Changed stored agent `tools` field from `string[]` to `Record<string, { description?: string }>` to allow per-tool description overrides
|
|
816
|
+
- When a stored agent specifies a custom `description` for a tool, the override is applied at resolution time
|
|
817
|
+
- Updated server API schemas, client SDK types, and editor resolution logic accordingly
|
|
818
|
+
|
|
819
|
+
- **Breaking:** Removed `cloneAgent()` from the `Agent` class. Agent cloning is now handled by the editor package via `editor.agent.clone()`. ([#12904](https://github.com/mastra-ai/mastra/pull/12904))
|
|
820
|
+
|
|
821
|
+
If you were calling `agent.cloneAgent()` directly, use the editor's agent namespace instead:
|
|
822
|
+
|
|
823
|
+
```ts
|
|
824
|
+
// Before
|
|
825
|
+
const result = await agent.cloneAgent({ newId: 'my-clone' });
|
|
826
|
+
|
|
827
|
+
// After
|
|
828
|
+
const editor = mastra.getEditor();
|
|
829
|
+
const result = await editor.agent.clone(agent, { newId: 'my-clone' });
|
|
830
|
+
```
|
|
831
|
+
|
|
832
|
+
**Why:** The `Agent` class should not be responsible for storage serialization. The editor package already handles converting between runtime agents and stored configurations, so cloning belongs there.
|
|
833
|
+
|
|
834
|
+
**Added** `getConfiguredProcessorIds()` to the `Agent` class, which returns raw input/output processor IDs for the agent's configuration.
|
|
835
|
+
|
|
836
|
+
### Patch Changes
|
|
837
|
+
|
|
838
|
+
- Fixed stale agent data in CMS pages by adding removeAgent method to Mastra and updating clearStoredAgentCache to clear both Editor cache and Mastra registry when stored agents are updated or deleted ([#12693](https://github.com/mastra-ai/mastra/pull/12693))
|
|
839
|
+
|
|
840
|
+
- Fixed stored scorers not being registered on the Mastra instance. Scorers created via the editor are now automatically discoverable through `mastra.getScorer()` and `mastra.getScorerById()`, matching the existing behavior of stored agents. Previously, stored scorers could only be resolved inline but were invisible to the runtime registry, causing lookups to fail. ([#12903](https://github.com/mastra-ai/mastra/pull/12903))
|
|
841
|
+
|
|
842
|
+
- Fix memory persistence: ([#12704](https://github.com/mastra-ai/mastra/pull/12704))
|
|
843
|
+
- Fixed memory persistence bug by handling missing vector store gracefully
|
|
844
|
+
- When semantic recall is enabled but no vector store is configured, it now disables semantic recall instead of failing
|
|
845
|
+
- Fixed type compatibility for `embedder` field when creating agents from stored config
|
|
846
|
+
|
|
847
|
+
- Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`2e02cd7`](https://github.com/mastra-ai/mastra/commit/2e02cd7e08ba2d84a275c80d80c069d2b8b66211), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
|
|
848
|
+
- @mastra/core@1.3.0
|
|
849
|
+
- @mastra/memory@1.2.0
|
|
850
|
+
|
|
851
|
+
## 0.3.0-alpha.3
|
|
852
|
+
|
|
853
|
+
### Patch Changes
|
|
854
|
+
|
|
855
|
+
- Updated dependencies [[`2e02cd7`](https://github.com/mastra-ai/mastra/commit/2e02cd7e08ba2d84a275c80d80c069d2b8b66211)]:
|
|
856
|
+
- @mastra/memory@1.2.0-alpha.2
|
|
857
|
+
|
|
858
|
+
## 0.3.0-alpha.2
|
|
859
|
+
|
|
860
|
+
### Patch Changes
|
|
861
|
+
|
|
862
|
+
- Updated dependencies [[`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a)]:
|
|
863
|
+
- @mastra/memory@1.2.0-alpha.1
|
|
864
|
+
- @mastra/core@1.3.0-alpha.2
|
|
865
|
+
|
|
866
|
+
## 0.3.0-alpha.1
|
|
867
|
+
|
|
868
|
+
### Minor Changes
|
|
869
|
+
|
|
870
|
+
- Added `requestContextSchema` and rule-based conditional fields for stored agents. ([#12896](https://github.com/mastra-ai/mastra/pull/12896))
|
|
871
|
+
|
|
872
|
+
Stored agent fields (`tools`, `model`, `workflows`, `agents`, `memory`, `scorers`, `inputProcessors`, `outputProcessors`, `defaultOptions`) can now be configured as conditional variants with rule groups that evaluate against request context at runtime. All matching variants accumulate — arrays are concatenated and objects are shallow-merged — so agents dynamically compose their configuration based on the incoming request context.
|
|
873
|
+
|
|
874
|
+
**New `requestContextSchema` field**
|
|
875
|
+
|
|
876
|
+
Stored agents now accept an optional `requestContextSchema` (JSON Schema) that is converted to a Zod schema and passed to the Agent constructor, enabling request context validation.
|
|
877
|
+
|
|
878
|
+
**Conditional field example**
|
|
879
|
+
|
|
880
|
+
```ts
|
|
881
|
+
await agentsStore.create({
|
|
882
|
+
agent: {
|
|
883
|
+
id: 'my-agent',
|
|
884
|
+
name: 'My Agent',
|
|
885
|
+
instructions: 'You are a helpful assistant',
|
|
886
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
887
|
+
tools: [
|
|
888
|
+
{ value: { 'basic-tool': {} } },
|
|
889
|
+
{
|
|
890
|
+
value: { 'premium-tool': {} },
|
|
891
|
+
rules: {
|
|
892
|
+
operator: 'AND',
|
|
893
|
+
conditions: [{ field: 'tier', operator: 'equals', value: 'premium' }],
|
|
894
|
+
},
|
|
895
|
+
},
|
|
896
|
+
],
|
|
897
|
+
requestContextSchema: {
|
|
898
|
+
type: 'object',
|
|
899
|
+
properties: { tier: { type: 'string' } },
|
|
900
|
+
},
|
|
901
|
+
},
|
|
902
|
+
});
|
|
903
|
+
```
|
|
904
|
+
|
|
905
|
+
- Added dynamic instructions for stored agents. Agent instructions can now be composed from reusable prompt blocks with conditional rules and variable interpolation, enabling a prompt-CMS-like editing experience. ([#12861](https://github.com/mastra-ai/mastra/pull/12861))
|
|
906
|
+
|
|
907
|
+
**Instruction blocks** can be mixed in an agent's instructions array:
|
|
908
|
+
- `text` — static text with `{{variable}}` interpolation
|
|
909
|
+
- `prompt_block_ref` — reference to a versioned prompt block stored in the database
|
|
910
|
+
- `prompt_block` — inline prompt block with optional conditional rules
|
|
911
|
+
|
|
912
|
+
**Creating a prompt block and using it in a stored agent:**
|
|
913
|
+
|
|
914
|
+
```ts
|
|
915
|
+
// Create a reusable prompt block
|
|
916
|
+
const block = await editor.createPromptBlock({
|
|
917
|
+
id: 'security-rules',
|
|
918
|
+
name: 'Security Rules',
|
|
919
|
+
content: "You must verify the user's identity. The user's role is {{user.role}}.",
|
|
920
|
+
rules: {
|
|
921
|
+
operator: 'AND',
|
|
922
|
+
conditions: [{ field: 'user.isAuthenticated', operator: 'equals', value: true }],
|
|
923
|
+
},
|
|
924
|
+
});
|
|
925
|
+
|
|
926
|
+
// Create a stored agent that references the prompt block
|
|
927
|
+
await editor.createStoredAgent({
|
|
928
|
+
id: 'support-agent',
|
|
929
|
+
name: 'Support Agent',
|
|
930
|
+
instructions: [
|
|
931
|
+
{ type: 'text', content: 'You are a helpful support agent for {{company}}.' },
|
|
932
|
+
{ type: 'prompt_block_ref', id: 'security-rules' },
|
|
933
|
+
{
|
|
934
|
+
type: 'prompt_block',
|
|
935
|
+
content: 'Always be polite.',
|
|
936
|
+
rules: { operator: 'AND', conditions: [{ field: 'tone', operator: 'equals', value: 'formal' }] },
|
|
937
|
+
},
|
|
938
|
+
],
|
|
939
|
+
model: { provider: 'openai', name: 'gpt-4o' },
|
|
940
|
+
});
|
|
941
|
+
|
|
942
|
+
// At runtime, instructions resolve dynamically based on request context
|
|
943
|
+
const agent = await editor.getStoredAgentById('support-agent');
|
|
944
|
+
const result = await agent.generate('Help me reset my password', {
|
|
945
|
+
requestContext: new RequestContext([
|
|
946
|
+
['company', 'Acme Corp'],
|
|
947
|
+
['user.isAuthenticated', true],
|
|
948
|
+
['user.role', 'admin'],
|
|
949
|
+
['tone', 'formal'],
|
|
950
|
+
]),
|
|
951
|
+
});
|
|
952
|
+
```
|
|
953
|
+
|
|
954
|
+
Prompt blocks are versioned — updating a block's content takes effect immediately for all agents referencing it, with no cache clearing required.
|
|
955
|
+
|
|
956
|
+
- **Added stored scorer definitions, editor namespace pattern, and generic storage domains** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
|
|
957
|
+
- Added a new `scorer-definitions` storage domain for storing LLM-as-judge and preset scorer configurations in the database
|
|
958
|
+
- Introduced a `VersionedStorageDomain` generic base class that unifies `AgentsStorage`, `PromptBlocksStorage`, and `ScorerDefinitionsStorage` with shared CRUD methods (`create`, `getById`, `getByIdResolved`, `update`, `delete`, `list`, `listResolved`)
|
|
959
|
+
- Flattened stored scorer type system: replaced nested `preset`/`customLLMJudge` config with top-level `type`, `instructions`, `scoreRange`, and `presetConfig` fields
|
|
960
|
+
- Refactored `MastraEditor` to use a namespace pattern (`editor.agent.*`, `editor.scorer.*`, `editor.prompt.*`) backed by a `CrudEditorNamespace` base class with built-in caching and an `onCacheEvict` hook
|
|
961
|
+
- Added `rawConfig` support to `MastraBase` and `MastraScorer` via `toRawConfig()`, so hydrated primitives carry their stored configuration
|
|
962
|
+
- Added prompt block and scorer registration to the `Mastra` class (`addPromptBlock`, `removePromptBlock`, `addScorer`, `removeScorer`)
|
|
963
|
+
|
|
964
|
+
**Creating a stored scorer (LLM-as-judge):**
|
|
965
|
+
|
|
966
|
+
```ts
|
|
967
|
+
const scorer = await editor.scorer.create({
|
|
968
|
+
id: 'my-scorer',
|
|
969
|
+
name: 'Response Quality',
|
|
970
|
+
type: 'llm-judge',
|
|
971
|
+
instructions: 'Evaluate the response for accuracy and helpfulness.',
|
|
972
|
+
model: { provider: 'openai', name: 'gpt-4o' },
|
|
973
|
+
scoreRange: { min: 0, max: 1 },
|
|
974
|
+
});
|
|
975
|
+
```
|
|
976
|
+
|
|
977
|
+
**Retrieving and resolving a stored scorer:**
|
|
978
|
+
|
|
979
|
+
```ts
|
|
980
|
+
// Fetch the stored definition from DB
|
|
981
|
+
const definition = await editor.scorer.getById('my-scorer');
|
|
982
|
+
|
|
983
|
+
// Resolve it into a runnable MastraScorer instance
|
|
984
|
+
const runnableScorer = editor.scorer.resolve(definition);
|
|
985
|
+
|
|
986
|
+
// Execute the scorer
|
|
987
|
+
const result = await runnableScorer.run({
|
|
988
|
+
input: 'What is the capital of France?',
|
|
989
|
+
output: 'The capital of France is Paris.',
|
|
990
|
+
});
|
|
991
|
+
```
|
|
992
|
+
|
|
993
|
+
**Editor namespace pattern (before/after):**
|
|
994
|
+
|
|
995
|
+
```ts
|
|
996
|
+
// Before
|
|
997
|
+
const agent = await editor.getStoredAgentById('abc');
|
|
998
|
+
const prompts = await editor.listPromptBlocks();
|
|
999
|
+
|
|
1000
|
+
// After
|
|
1001
|
+
const agent = await editor.agent.getById('abc');
|
|
1002
|
+
const prompts = await editor.prompt.list();
|
|
1003
|
+
```
|
|
1004
|
+
|
|
1005
|
+
**Generic storage domain methods (before/after):**
|
|
1006
|
+
|
|
1007
|
+
```ts
|
|
1008
|
+
// Before
|
|
1009
|
+
const store = storage.getStore('agents');
|
|
1010
|
+
await store.createAgent({ agent: input });
|
|
1011
|
+
await store.getAgentById({ id: 'abc' });
|
|
1012
|
+
await store.deleteAgent({ id: 'abc' });
|
|
1013
|
+
|
|
1014
|
+
// After
|
|
1015
|
+
const store = storage.getStore('agents');
|
|
1016
|
+
await store.create({ agent: input });
|
|
1017
|
+
await store.getById('abc');
|
|
1018
|
+
await store.delete('abc');
|
|
1019
|
+
```
|
|
1020
|
+
|
|
1021
|
+
- Add tool description overrides for stored agents: ([#12794](https://github.com/mastra-ai/mastra/pull/12794))
|
|
1022
|
+
- Changed stored agent `tools` field from `string[]` to `Record<string, { description?: string }>` to allow per-tool description overrides
|
|
1023
|
+
- When a stored agent specifies a custom `description` for a tool, the override is applied at resolution time
|
|
1024
|
+
- Updated server API schemas, client SDK types, and editor resolution logic accordingly
|
|
1025
|
+
|
|
1026
|
+
- **Breaking:** Removed `cloneAgent()` from the `Agent` class. Agent cloning is now handled by the editor package via `editor.agent.clone()`. ([#12904](https://github.com/mastra-ai/mastra/pull/12904))
|
|
1027
|
+
|
|
1028
|
+
If you were calling `agent.cloneAgent()` directly, use the editor's agent namespace instead:
|
|
1029
|
+
|
|
1030
|
+
```ts
|
|
1031
|
+
// Before
|
|
1032
|
+
const result = await agent.cloneAgent({ newId: 'my-clone' });
|
|
1033
|
+
|
|
1034
|
+
// After
|
|
1035
|
+
const editor = mastra.getEditor();
|
|
1036
|
+
const result = await editor.agent.clone(agent, { newId: 'my-clone' });
|
|
1037
|
+
```
|
|
1038
|
+
|
|
1039
|
+
**Why:** The `Agent` class should not be responsible for storage serialization. The editor package already handles converting between runtime agents and stored configurations, so cloning belongs there.
|
|
1040
|
+
|
|
1041
|
+
**Added** `getConfiguredProcessorIds()` to the `Agent` class, which returns raw input/output processor IDs for the agent's configuration.
|
|
1042
|
+
|
|
1043
|
+
### Patch Changes
|
|
1044
|
+
|
|
1045
|
+
- Fixed stored scorers not being registered on the Mastra instance. Scorers created via the editor are now automatically discoverable through `mastra.getScorer()` and `mastra.getScorerById()`, matching the existing behavior of stored agents. Previously, stored scorers could only be resolved inline but were invisible to the runtime registry, causing lookups to fail. ([#12903](https://github.com/mastra-ai/mastra/pull/12903))
|
|
1046
|
+
|
|
1047
|
+
- Updated dependencies [[`717ffab`](https://github.com/mastra-ai/mastra/commit/717ffab42cfd58ff723b5c19ada4939997773004), [`e4b6dab`](https://github.com/mastra-ai/mastra/commit/e4b6dab171c5960e340b3ea3ea6da8d64d2b8672), [`5719fa8`](https://github.com/mastra-ai/mastra/commit/5719fa8880e86e8affe698ec4b3807c7e0e0a06f), [`83cda45`](https://github.com/mastra-ai/mastra/commit/83cda4523e588558466892bff8f80f631a36945a), [`11804ad`](https://github.com/mastra-ai/mastra/commit/11804adf1d6be46ebe216be40a43b39bb8b397d7), [`aa95f95`](https://github.com/mastra-ai/mastra/commit/aa95f958b186ae5c9f4219c88e268f5565c277a2), [`f5501ae`](https://github.com/mastra-ai/mastra/commit/f5501aedb0a11106c7db7e480d6eaf3971b7bda8), [`44573af`](https://github.com/mastra-ai/mastra/commit/44573afad0a4bc86f627d6cbc0207961cdcb3bc3), [`00e3861`](https://github.com/mastra-ai/mastra/commit/00e3861863fbfee78faeb1ebbdc7c0223aae13ff), [`7bfbc52`](https://github.com/mastra-ai/mastra/commit/7bfbc52a8604feb0fff2c0a082c13c0c2a3df1a2), [`1445994`](https://github.com/mastra-ai/mastra/commit/1445994aee19c9334a6a101cf7bd80ca7ed4d186), [`61f44a2`](https://github.com/mastra-ai/mastra/commit/61f44a26861c89e364f367ff40825bdb7f19df55), [`37145d2`](https://github.com/mastra-ai/mastra/commit/37145d25f99dc31f1a9105576e5452609843ce32), [`fdad759`](https://github.com/mastra-ai/mastra/commit/fdad75939ff008b27625f5ec0ce9c6915d99d9ec), [`e4569c5`](https://github.com/mastra-ai/mastra/commit/e4569c589e00c4061a686c9eb85afe1b7050b0a8), [`7309a85`](https://github.com/mastra-ai/mastra/commit/7309a85427281a8be23f4fb80ca52e18eaffd596), [`99424f6`](https://github.com/mastra-ai/mastra/commit/99424f6862ffb679c4ec6765501486034754a4c2), [`44eb452`](https://github.com/mastra-ai/mastra/commit/44eb4529b10603c279688318bebf3048543a1d61), [`6c40593`](https://github.com/mastra-ai/mastra/commit/6c40593d6d2b1b68b0c45d1a3a4c6ac5ecac3937), [`8c1135d`](https://github.com/mastra-ai/mastra/commit/8c1135dfb91b057283eae7ee11f9ec28753cc64f), [`dd39e54`](https://github.com/mastra-ai/mastra/commit/dd39e54ea34532c995b33bee6e0e808bf41a7341), [`b6fad9a`](https://github.com/mastra-ai/mastra/commit/b6fad9a602182b1cc0df47cd8c55004fa829ad61), [`4129c07`](https://github.com/mastra-ai/mastra/commit/4129c073349b5a66643fd8136ebfe9d7097cf793), [`5b930ab`](https://github.com/mastra-ai/mastra/commit/5b930aba1834d9898e8460a49d15106f31ac7c8d), [`4be93d0`](https://github.com/mastra-ai/mastra/commit/4be93d09d68e20aaf0ea3f210749422719618b5f), [`047635c`](https://github.com/mastra-ai/mastra/commit/047635ccd7861d726c62d135560c0022a5490aec), [`8c90ff4`](https://github.com/mastra-ai/mastra/commit/8c90ff4d3414e7f2a2d216ea91274644f7b29133), [`ed232d1`](https://github.com/mastra-ai/mastra/commit/ed232d1583f403925dc5ae45f7bee948cf2a182b), [`3891795`](https://github.com/mastra-ai/mastra/commit/38917953518eb4154a984ee36e6ededdcfe80f72), [`4f955b2`](https://github.com/mastra-ai/mastra/commit/4f955b20c7f66ed282ee1fd8709696fa64c4f19d), [`55a4c90`](https://github.com/mastra-ai/mastra/commit/55a4c9044ac7454349b9f6aeba0bbab5ee65d10f)]:
|
|
1048
|
+
- @mastra/core@1.3.0-alpha.1
|
|
1049
|
+
- @mastra/memory@1.2.0-alpha.0
|
|
1050
|
+
|
|
1051
|
+
## 0.2.1-alpha.0
|
|
1052
|
+
|
|
1053
|
+
### Patch Changes
|
|
1054
|
+
|
|
1055
|
+
- Fixed stale agent data in CMS pages by adding removeAgent method to Mastra and updating clearStoredAgentCache to clear both Editor cache and Mastra registry when stored agents are updated or deleted ([#12693](https://github.com/mastra-ai/mastra/pull/12693))
|
|
1056
|
+
|
|
1057
|
+
- Fix memory persistence: ([#12704](https://github.com/mastra-ai/mastra/pull/12704))
|
|
1058
|
+
- Fixed memory persistence bug by handling missing vector store gracefully
|
|
1059
|
+
- When semantic recall is enabled but no vector store is configured, it now disables semantic recall instead of failing
|
|
1060
|
+
- Fixed type compatibility for `embedder` field when creating agents from stored config
|
|
1061
|
+
|
|
1062
|
+
- Updated dependencies [[`90f7894`](https://github.com/mastra-ai/mastra/commit/90f7894568dc9481f40a4d29672234fae23090bb), [`8109aee`](https://github.com/mastra-ai/mastra/commit/8109aeeab758e16cd4255a6c36f044b70eefc6a6)]:
|
|
1063
|
+
- @mastra/core@1.2.1-alpha.0
|
|
1064
|
+
|
|
1065
|
+
## 0.2.0
|
|
1066
|
+
|
|
1067
|
+
### Minor Changes
|
|
1068
|
+
|
|
1069
|
+
- Created @mastra/editor package for managing and resolving stored agent configurations ([#12631](https://github.com/mastra-ai/mastra/pull/12631))
|
|
1070
|
+
|
|
1071
|
+
This major addition introduces the editor package, which provides a complete solution for storing, versioning, and instantiating agent configurations from a database. The editor seamlessly integrates with Mastra's storage layer to enable dynamic agent management.
|
|
1072
|
+
|
|
1073
|
+
**Key Features:**
|
|
1074
|
+
- **Agent Storage & Retrieval**: Store complete agent configurations including instructions, model settings, tools, workflows, nested agents, scorers, processors, and memory configuration
|
|
1075
|
+
- **Version Management**: Create and manage multiple versions of agents, with support for activating specific versions
|
|
1076
|
+
- **Dependency Resolution**: Automatically resolves and instantiates all agent dependencies (tools, workflows, sub-agents, etc.) from the Mastra registry
|
|
1077
|
+
- **Caching**: Built-in caching for improved performance when repeatedly accessing stored agents
|
|
1078
|
+
- **Type Safety**: Full TypeScript support with proper typing for stored configurations
|
|
1079
|
+
|
|
1080
|
+
**Usage Example:**
|
|
1081
|
+
|
|
1082
|
+
```typescript
|
|
1083
|
+
import { MastraEditor } from '@mastra/editor';
|
|
1084
|
+
import { Mastra } from '@mastra/core';
|
|
1085
|
+
|
|
1086
|
+
// Initialize editor with Mastra
|
|
1087
|
+
const mastra = new Mastra({
|
|
1088
|
+
/* config */
|
|
1089
|
+
editor: new MastraEditor(),
|
|
1090
|
+
});
|
|
1091
|
+
|
|
1092
|
+
// Store an agent configuration
|
|
1093
|
+
const agentId = await mastra.storage.stores?.agents?.createAgent({
|
|
1094
|
+
name: 'customer-support',
|
|
1095
|
+
instructions: 'Help customers with inquiries',
|
|
1096
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
1097
|
+
tools: ['search-kb', 'create-ticket'],
|
|
1098
|
+
workflows: ['escalation-flow'],
|
|
1099
|
+
memory: { vector: 'pinecone-db' },
|
|
1100
|
+
});
|
|
1101
|
+
|
|
1102
|
+
// Retrieve and use the stored agent
|
|
1103
|
+
const agent = await mastra.getEditor()?.getStoredAgentById(agentId);
|
|
1104
|
+
const response = await agent?.generate('How do I reset my password?');
|
|
1105
|
+
|
|
1106
|
+
// List all stored agents
|
|
1107
|
+
const agents = await mastra.getEditor()?.listStoredAgents({ pageSize: 10 });
|
|
1108
|
+
```
|
|
1109
|
+
|
|
1110
|
+
**Storage Improvements:**
|
|
1111
|
+
- Fixed JSONB handling in LibSQL, PostgreSQL, and MongoDB adapters
|
|
1112
|
+
- Improved agent resolution queries to properly merge version data
|
|
1113
|
+
- Enhanced type safety for serialized configurations
|
|
1114
|
+
|
|
1115
|
+
### Patch Changes
|
|
1116
|
+
|
|
1117
|
+
- Updated dependencies [[`e6fc281`](https://github.com/mastra-ai/mastra/commit/e6fc281896a3584e9e06465b356a44fe7faade65), [`97be6c8`](https://github.com/mastra-ai/mastra/commit/97be6c8963130fca8a664fcf99d7b3a38e463595), [`2770921`](https://github.com/mastra-ai/mastra/commit/2770921eec4d55a36b278d15c3a83f694e462ee5), [`b1695db`](https://github.com/mastra-ai/mastra/commit/b1695db2d7be0c329d499619c7881899649188d0), [`5fe1fe0`](https://github.com/mastra-ai/mastra/commit/5fe1fe0109faf2c87db34b725d8a4571a594f80e), [`4133d48`](https://github.com/mastra-ai/mastra/commit/4133d48eaa354cdb45920dc6265732ffbc96788d), [`5dd01cc`](https://github.com/mastra-ai/mastra/commit/5dd01cce68d61874aa3ecbd91ee17884cfd5aca2), [`13e0a2a`](https://github.com/mastra-ai/mastra/commit/13e0a2a2bcec01ff4d701274b3727d5e907a6a01), [`f6673b8`](https://github.com/mastra-ai/mastra/commit/f6673b893b65b7d273ad25ead42e990704cc1e17), [`cd6be8a`](https://github.com/mastra-ai/mastra/commit/cd6be8ad32741cd41cabf508355bb31b71e8a5bd), [`9eb4e8e`](https://github.com/mastra-ai/mastra/commit/9eb4e8e39efbdcfff7a40ff2ce07ce2714c65fa8), [`c987384`](https://github.com/mastra-ai/mastra/commit/c987384d6c8ca844a9701d7778f09f5a88da7f9f), [`cb8cc12`](https://github.com/mastra-ai/mastra/commit/cb8cc12bfadd526aa95a01125076f1da44e4afa7), [`aa37c84`](https://github.com/mastra-ai/mastra/commit/aa37c84d29b7db68c72517337932ef486c316275), [`62f5d50`](https://github.com/mastra-ai/mastra/commit/62f5d5043debbba497dacb7ab008fe86b38b8de3), [`47eba72`](https://github.com/mastra-ai/mastra/commit/47eba72f0397d0d14fbe324b97940c3d55e5a525)]:
|
|
1118
|
+
- @mastra/core@1.2.0
|
|
1119
|
+
- @mastra/memory@1.1.0
|
|
1120
|
+
|
|
1121
|
+
## 0.2.0-alpha.0
|
|
1122
|
+
|
|
1123
|
+
### Minor Changes
|
|
1124
|
+
|
|
1125
|
+
- Created @mastra/editor package for managing and resolving stored agent configurations ([#12631](https://github.com/mastra-ai/mastra/pull/12631))
|
|
1126
|
+
|
|
1127
|
+
This major addition introduces the editor package, which provides a complete solution for storing, versioning, and instantiating agent configurations from a database. The editor seamlessly integrates with Mastra's storage layer to enable dynamic agent management.
|
|
1128
|
+
|
|
1129
|
+
**Key Features:**
|
|
1130
|
+
- **Agent Storage & Retrieval**: Store complete agent configurations including instructions, model settings, tools, workflows, nested agents, scorers, processors, and memory configuration
|
|
1131
|
+
- **Version Management**: Create and manage multiple versions of agents, with support for activating specific versions
|
|
1132
|
+
- **Dependency Resolution**: Automatically resolves and instantiates all agent dependencies (tools, workflows, sub-agents, etc.) from the Mastra registry
|
|
1133
|
+
- **Caching**: Built-in caching for improved performance when repeatedly accessing stored agents
|
|
1134
|
+
- **Type Safety**: Full TypeScript support with proper typing for stored configurations
|
|
1135
|
+
|
|
1136
|
+
**Usage Example:**
|
|
1137
|
+
|
|
1138
|
+
```typescript
|
|
1139
|
+
import { MastraEditor } from '@mastra/editor';
|
|
1140
|
+
import { Mastra } from '@mastra/core';
|
|
1141
|
+
|
|
1142
|
+
// Initialize editor with Mastra
|
|
1143
|
+
const mastra = new Mastra({
|
|
1144
|
+
/* config */
|
|
1145
|
+
editor: new MastraEditor(),
|
|
1146
|
+
});
|
|
1147
|
+
|
|
1148
|
+
// Store an agent configuration
|
|
1149
|
+
const agentId = await mastra.storage.stores?.agents?.createAgent({
|
|
1150
|
+
name: 'customer-support',
|
|
1151
|
+
instructions: 'Help customers with inquiries',
|
|
1152
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
1153
|
+
tools: ['search-kb', 'create-ticket'],
|
|
1154
|
+
workflows: ['escalation-flow'],
|
|
1155
|
+
memory: { vector: 'pinecone-db' },
|
|
1156
|
+
});
|
|
1157
|
+
|
|
1158
|
+
// Retrieve and use the stored agent
|
|
1159
|
+
const agent = await mastra.getEditor()?.getStoredAgentById(agentId);
|
|
1160
|
+
const response = await agent?.generate('How do I reset my password?');
|
|
1161
|
+
|
|
1162
|
+
// List all stored agents
|
|
1163
|
+
const agents = await mastra.getEditor()?.listStoredAgents({ pageSize: 10 });
|
|
1164
|
+
```
|
|
1165
|
+
|
|
1166
|
+
**Storage Improvements:**
|
|
1167
|
+
- Fixed JSONB handling in LibSQL, PostgreSQL, and MongoDB adapters
|
|
1168
|
+
- Improved agent resolution queries to properly merge version data
|
|
1169
|
+
- Enhanced type safety for serialized configurations
|
|
1170
|
+
|
|
1171
|
+
### Patch Changes
|
|
1172
|
+
|
|
1173
|
+
- Updated dependencies [[`2770921`](https://github.com/mastra-ai/mastra/commit/2770921eec4d55a36b278d15c3a83f694e462ee5), [`b1695db`](https://github.com/mastra-ai/mastra/commit/b1695db2d7be0c329d499619c7881899649188d0), [`4133d48`](https://github.com/mastra-ai/mastra/commit/4133d48eaa354cdb45920dc6265732ffbc96788d), [`5dd01cc`](https://github.com/mastra-ai/mastra/commit/5dd01cce68d61874aa3ecbd91ee17884cfd5aca2), [`13e0a2a`](https://github.com/mastra-ai/mastra/commit/13e0a2a2bcec01ff4d701274b3727d5e907a6a01), [`c987384`](https://github.com/mastra-ai/mastra/commit/c987384d6c8ca844a9701d7778f09f5a88da7f9f), [`cb8cc12`](https://github.com/mastra-ai/mastra/commit/cb8cc12bfadd526aa95a01125076f1da44e4afa7), [`62f5d50`](https://github.com/mastra-ai/mastra/commit/62f5d5043debbba497dacb7ab008fe86b38b8de3)]:
|
|
1174
|
+
- @mastra/memory@1.1.0-alpha.1
|
|
1175
|
+
- @mastra/core@1.2.0-alpha.1
|
|
1176
|
+
|
|
1177
|
+
## 0.1.0
|
|
1178
|
+
|
|
1179
|
+
### Minor Changes
|
|
1180
|
+
|
|
1181
|
+
- Initial release of @mastra/editor
|
|
1182
|
+
- Agent storage and retrieval from database
|
|
1183
|
+
- Dynamic agent creation from stored configurations
|
|
1184
|
+
- Support for tools, workflows, nested agents, memory, and scorers
|
|
1185
|
+
- Integration with Mastra core for seamless agent management
|