@mastra/libsql 0.0.0-fix-cloudflare-rest-api-20260210035116 → 0.0.0-fix-cloudflare-rest-api-20260225162901
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 +696 -3
- package/dist/docs/SKILL.md +36 -26
- package/dist/docs/{SOURCE_MAP.json → assets/SOURCE_MAP.json} +1 -1
- package/dist/docs/{agents/03-agent-approval.md → references/docs-agents-agent-approval.md} +114 -114
- package/dist/docs/references/docs-agents-agent-memory.md +209 -0
- package/dist/docs/{agents/04-network-approval.md → references/docs-agents-network-approval.md} +95 -94
- package/dist/docs/{agents/02-networks.md → references/docs-agents-networks.md} +64 -70
- package/dist/docs/{memory/06-memory-processors.md → references/docs-memory-memory-processors.md} +74 -78
- package/dist/docs/{memory/03-message-history.md → references/docs-memory-message-history.md} +85 -74
- package/dist/docs/{memory/01-overview.md → references/docs-memory-overview.md} +8 -8
- package/dist/docs/{memory/05-semantic-recall.md → references/docs-memory-semantic-recall.md} +77 -61
- package/dist/docs/{memory/02-storage.md → references/docs-memory-storage.md} +88 -88
- package/dist/docs/{memory/04-working-memory.md → references/docs-memory-working-memory.md} +54 -65
- package/dist/docs/{observability/01-overview.md → references/docs-observability-overview.md} +11 -14
- package/dist/docs/{observability/02-default.md → references/docs-observability-tracing-exporters-default.md} +31 -36
- package/dist/docs/{rag/01-retrieval.md → references/docs-rag-retrieval.md} +151 -184
- package/dist/docs/{workflows/01-snapshots.md → references/docs-workflows-snapshots.md} +33 -35
- package/dist/docs/{guides/01-ai-sdk.md → references/guides-agent-frameworks-ai-sdk.md} +58 -38
- package/dist/docs/references/reference-core-getMemory.md +50 -0
- package/dist/docs/references/reference-core-listMemory.md +56 -0
- package/dist/docs/references/reference-core-mastra-class.md +66 -0
- package/dist/docs/references/reference-memory-memory-class.md +147 -0
- package/dist/docs/references/reference-storage-composite.md +235 -0
- package/dist/docs/references/reference-storage-dynamodb.md +282 -0
- package/dist/docs/references/reference-storage-libsql.md +135 -0
- package/dist/docs/references/reference-vectors-libsql.md +305 -0
- package/dist/index.cjs +6905 -2080
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +6898 -2082
- package/dist/index.js.map +1 -1
- package/dist/storage/db/index.d.ts +2 -1
- package/dist/storage/db/index.d.ts.map +1 -1
- package/dist/storage/db/utils.d.ts.map +1 -1
- package/dist/storage/domains/agents/index.d.ts +9 -12
- package/dist/storage/domains/agents/index.d.ts.map +1 -1
- package/dist/storage/domains/blobs/index.d.ts +17 -0
- package/dist/storage/domains/blobs/index.d.ts.map +1 -0
- package/dist/storage/domains/datasets/index.d.ts +43 -0
- package/dist/storage/domains/datasets/index.d.ts.map +1 -0
- package/dist/storage/domains/experiments/index.d.ts +29 -0
- package/dist/storage/domains/experiments/index.d.ts.map +1 -0
- package/dist/storage/domains/mcp-clients/index.d.ts +26 -0
- package/dist/storage/domains/mcp-clients/index.d.ts.map +1 -0
- package/dist/storage/domains/mcp-servers/index.d.ts +26 -0
- package/dist/storage/domains/mcp-servers/index.d.ts.map +1 -0
- package/dist/storage/domains/memory/index.d.ts +8 -2
- package/dist/storage/domains/memory/index.d.ts.map +1 -1
- package/dist/storage/domains/prompt-blocks/index.d.ts +25 -0
- package/dist/storage/domains/prompt-blocks/index.d.ts.map +1 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts +26 -0
- package/dist/storage/domains/scorer-definitions/index.d.ts.map +1 -0
- package/dist/storage/domains/skills/index.d.ts +26 -0
- package/dist/storage/domains/skills/index.d.ts.map +1 -0
- package/dist/storage/domains/workspaces/index.d.ts +26 -0
- package/dist/storage/domains/workspaces/index.d.ts.map +1 -0
- package/dist/storage/index.d.ts +10 -1
- package/dist/storage/index.d.ts.map +1 -1
- package/package.json +9 -10
- package/dist/docs/README.md +0 -39
- package/dist/docs/agents/01-agent-memory.md +0 -166
- package/dist/docs/core/01-reference.md +0 -151
- package/dist/docs/memory/07-reference.md +0 -133
- package/dist/docs/storage/01-reference.md +0 -556
- package/dist/docs/vectors/01-reference.md +0 -213
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,699 @@
|
|
|
1
1
|
# @mastra/libsql
|
|
2
2
|
|
|
3
|
-
## 0.0.0-fix-cloudflare-rest-api-
|
|
3
|
+
## 0.0.0-fix-cloudflare-rest-api-20260225162901
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [[`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), [`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), [`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), [`453693b`](https://github.com/mastra-ai/mastra/commit/453693bf9e265ddccecef901d50da6caaea0fbc6), [`72df4a8`](https://github.com/mastra-ai/mastra/commit/72df4a8f9bf1a20cfd3d9006a4fdb597ad56d10a)]:
|
|
8
|
+
- @mastra/core@0.0.0-fix-cloudflare-rest-api-20260225162901
|
|
9
|
+
|
|
10
|
+
## 1.6.1
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- Fixed non-deterministic query ordering by adding secondary sort on id for dataset and dataset item queries. ([#13399](https://github.com/mastra-ai/mastra/pull/13399))
|
|
15
|
+
|
|
16
|
+
- Prompt blocks can now define their own variables schema (`requestContextSchema`), allowing you to create reusable prompt blocks with typed variable placeholders. The server now correctly computes and returns draft/published status for prompt blocks. Existing databases are automatically migrated when upgrading. ([#13351](https://github.com/mastra-ai/mastra/pull/13351))
|
|
17
|
+
|
|
18
|
+
- Updated dependencies [[`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), [`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)]:
|
|
19
|
+
- @mastra/core@1.7.0
|
|
20
|
+
|
|
21
|
+
## 1.6.1-alpha.0
|
|
22
|
+
|
|
23
|
+
### Patch Changes
|
|
24
|
+
|
|
25
|
+
- Fixed non-deterministic query ordering by adding secondary sort on id for dataset and dataset item queries. ([#13399](https://github.com/mastra-ai/mastra/pull/13399))
|
|
26
|
+
|
|
27
|
+
- Prompt blocks can now define their own variables schema (`requestContextSchema`), allowing you to create reusable prompt blocks with typed variable placeholders. The server now correctly computes and returns draft/published status for prompt blocks. Existing databases are automatically migrated when upgrading. ([#13351](https://github.com/mastra-ai/mastra/pull/13351))
|
|
28
|
+
|
|
29
|
+
- Updated dependencies [[`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), [`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)]:
|
|
30
|
+
- @mastra/core@1.7.0-alpha.0
|
|
31
|
+
|
|
32
|
+
## 1.6.0
|
|
33
|
+
|
|
34
|
+
### Minor Changes
|
|
35
|
+
|
|
36
|
+
- Added MCP server table and CRUD operations to storage adapters, enabling MCP server configurations to be persisted alongside agents and workflows. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- Added storage schema support for processor graphs on stored agents. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
41
|
+
|
|
42
|
+
- Storage adapters now return `suggestedContinuation` and `currentTask` fields on Observational Memory activation, enabling agents to maintain conversational context across activation boundaries. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
43
|
+
|
|
44
|
+
- Updated dependencies [[`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`940163f`](https://github.com/mastra-ai/mastra/commit/940163fc492401d7562301e6f106ccef4fefe06f), [`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), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`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)]:
|
|
45
|
+
- @mastra/core@1.6.0
|
|
46
|
+
|
|
47
|
+
## 1.6.0-alpha.0
|
|
48
|
+
|
|
49
|
+
### Minor Changes
|
|
50
|
+
|
|
51
|
+
- Added MCP server table and CRUD operations to storage adapters, enabling MCP server configurations to be persisted alongside agents and workflows. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
52
|
+
|
|
53
|
+
### Patch Changes
|
|
54
|
+
|
|
55
|
+
- Added storage schema support for processor graphs on stored agents. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
56
|
+
|
|
57
|
+
- Storage adapters now return `suggestedContinuation` and `currentTask` fields on Observational Memory activation, enabling agents to maintain conversational context across activation boundaries. ([#13357](https://github.com/mastra-ai/mastra/pull/13357))
|
|
58
|
+
|
|
59
|
+
- Updated dependencies [[`0d9efb4`](https://github.com/mastra-ai/mastra/commit/0d9efb47992c34aa90581c18b9f51f774f6252a5), [`5caa13d`](https://github.com/mastra-ai/mastra/commit/5caa13d1b2a496e2565ab124a11de9a51ad3e3b9), [`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), [`2b2e157`](https://github.com/mastra-ai/mastra/commit/2b2e157a092cd597d9d3f0000d62b8bb4a7348ed), [`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)]:
|
|
60
|
+
- @mastra/core@1.6.0-alpha.0
|
|
61
|
+
|
|
62
|
+
## 1.5.0
|
|
63
|
+
|
|
64
|
+
### Minor Changes
|
|
65
|
+
|
|
66
|
+
- 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))
|
|
67
|
+
|
|
68
|
+
**Filesystem-native skill versioning (draft → publish model):**
|
|
69
|
+
|
|
70
|
+
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:
|
|
71
|
+
- `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`
|
|
72
|
+
- Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
|
|
73
|
+
- Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
|
|
74
|
+
|
|
75
|
+
**Agent skill resolution strategies:**
|
|
76
|
+
|
|
77
|
+
Agents can reference skills with different resolution strategies:
|
|
78
|
+
- `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
|
|
79
|
+
- `pin: '<versionId>'` — Pins to a specific version, immune to publishes
|
|
80
|
+
- `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
|
|
81
|
+
|
|
82
|
+
**Blob storage infrastructure:**
|
|
83
|
+
- `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
|
|
84
|
+
- `InMemoryBlobStore` for testing
|
|
85
|
+
- LibSQL, Postgres, and MongoDB implementations
|
|
86
|
+
- `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
|
|
87
|
+
- `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
|
|
88
|
+
- `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
|
|
89
|
+
|
|
90
|
+
**New storage types:**
|
|
91
|
+
- `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
|
|
92
|
+
- `StorageWorkspaceRef` for ID-based or inline workspace references on agents
|
|
93
|
+
- `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
|
|
94
|
+
- `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
|
|
95
|
+
- `StorageBlobEntry` for content-addressable blob entries
|
|
96
|
+
- `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
|
|
97
|
+
|
|
98
|
+
**New editor namespaces:**
|
|
99
|
+
- `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
|
|
100
|
+
- `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
|
|
101
|
+
|
|
102
|
+
**Provider registries:**
|
|
103
|
+
- `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
|
|
104
|
+
- Built-in `local` filesystem and sandbox providers are auto-registered
|
|
105
|
+
- `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
|
|
106
|
+
- Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
|
|
107
|
+
|
|
108
|
+
**Storage adapter support:**
|
|
109
|
+
- LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
110
|
+
- Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
111
|
+
- MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
112
|
+
- All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
|
|
113
|
+
|
|
114
|
+
**Server endpoints:**
|
|
115
|
+
- `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
|
|
116
|
+
- `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
|
|
117
|
+
- `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
|
|
118
|
+
|
|
119
|
+
```ts
|
|
120
|
+
import { MastraEditor } from '@mastra/editor';
|
|
121
|
+
import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
|
|
122
|
+
import { e2bSandboxProvider } from '@mastra/e2b';
|
|
123
|
+
|
|
124
|
+
const editor = new MastraEditor({
|
|
125
|
+
filesystems: { s3: s3FilesystemProvider },
|
|
126
|
+
sandboxes: { e2b: e2bSandboxProvider },
|
|
127
|
+
blobStores: { s3: s3BlobStoreProvider },
|
|
128
|
+
});
|
|
129
|
+
|
|
130
|
+
// Create a skill and publish it
|
|
131
|
+
const skill = await editor.skill.create({
|
|
132
|
+
name: 'Code Review',
|
|
133
|
+
description: 'Reviews code for best practices',
|
|
134
|
+
instructions: 'Analyze the code and provide feedback...',
|
|
135
|
+
});
|
|
136
|
+
await editor.skill.publish(skill.id, source, 'skills/code-review');
|
|
137
|
+
|
|
138
|
+
// Agents resolve skills by strategy
|
|
139
|
+
await editor.agent.create({
|
|
140
|
+
name: 'Dev Assistant',
|
|
141
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
142
|
+
workspace: { type: 'id', workspaceId: workspace.id },
|
|
143
|
+
skills: { [skill.id]: { strategy: 'latest' } },
|
|
144
|
+
skillsFormat: 'xml',
|
|
145
|
+
});
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
- Added draft/publish version management for all editor primitives (agents, scorers, MCP clients, prompt blocks). ([#13061](https://github.com/mastra-ai/mastra/pull/13061))
|
|
149
|
+
|
|
150
|
+
**Status filtering on list endpoints** — All list endpoints now accept a `?status=draft|published|archived` query parameter to filter by entity status. Defaults to `published` to preserve backward compatibility.
|
|
151
|
+
|
|
152
|
+
**Draft vs published resolution on get-by-id endpoints** — All get-by-id endpoints now accept `?status=draft` to resolve the entity with its latest (unpublished) version, or `?status=published` (default) to resolve with the active published version.
|
|
153
|
+
|
|
154
|
+
**Edits no longer auto-publish** — When updating any primitive, a new version is created but `activeVersionId` is no longer automatically updated. Edits stay as drafts until explicitly published via the activate endpoint.
|
|
155
|
+
|
|
156
|
+
**Full version management for all primitives** — Scorers, MCP clients, and prompt blocks now have the same version management API that agents have: list versions, create version snapshots, get specific versions, activate/publish, restore from a previous version, delete versions, and compare versions.
|
|
157
|
+
|
|
158
|
+
**New prompt block CRUD routes** — Prompt blocks now have full server routes (`GET /stored/prompt-blocks`, `GET /stored/prompt-blocks/:id`, `POST`, `PATCH`, `DELETE`).
|
|
159
|
+
|
|
160
|
+
**New version endpoints** — Each primitive now exposes 7 version management endpoints under `/stored/{type}/:id/versions` (list, create, get, activate, restore, delete, compare).
|
|
161
|
+
|
|
162
|
+
```ts
|
|
163
|
+
// Fetch the published version (default behavior, backward compatible)
|
|
164
|
+
const published = await fetch('/api/stored/scorers/my-scorer');
|
|
165
|
+
|
|
166
|
+
// Fetch the draft version for editing in the UI
|
|
167
|
+
const draft = await fetch('/api/stored/scorers/my-scorer?status=draft');
|
|
168
|
+
|
|
169
|
+
// Publish a specific version
|
|
170
|
+
await fetch('/api/stored/scorers/my-scorer/versions/abc123/activate', { method: 'POST' });
|
|
171
|
+
|
|
172
|
+
// Compare two versions
|
|
173
|
+
const diff = await fetch('/api/stored/scorers/my-scorer/versions/compare?from=v1&to=v2');
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
### Patch Changes
|
|
177
|
+
|
|
178
|
+
- Dataset schemas now appear in the Edit Dataset dialog. Previously the `inputSchema` and `groundTruthSchema` fields were not passed to the dialog, so editing a dataset always showed empty schemas. ([#13175](https://github.com/mastra-ai/mastra/pull/13175))
|
|
179
|
+
|
|
180
|
+
Schema edits in the JSON editor no longer cause the cursor to jump to the top of the field. Typing `{"type": "object"}` in the schema editor now behaves like a normal text input instead of resetting on every keystroke.
|
|
181
|
+
|
|
182
|
+
Validation errors are now surfaced when updating a dataset schema that conflicts with existing items. For example, adding a `required: ["name"]` constraint when existing items lack a `name` field now shows "2 existing item(s) fail validation" in the dialog instead of silently dropping the error.
|
|
183
|
+
|
|
184
|
+
Disabling a dataset schema from the Studio UI now correctly clears it. Previously the server converted `null` (disable) to `undefined` (no change), so the old schema persisted and validation continued.
|
|
185
|
+
|
|
186
|
+
Workflow schemas fetched via `client.getWorkflow().getSchema()` are now correctly parsed. The server serializes schemas with `superjson`, but the client was using plain `JSON.parse`, yielding a `{json: {...}}` wrapper instead of the actual JSON Schema object.
|
|
187
|
+
|
|
188
|
+
- CMS draft support with status badges for agents. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
189
|
+
- Agent list now resolves the latest (draft) version for each stored agent, showing current edits rather than the last published state.
|
|
190
|
+
- Added `hasDraft` and `activeVersionId` fields to the agent list API response.
|
|
191
|
+
- Agent list badges: "Published" (green) when a published version exists, "Draft" (colored when unpublished changes exist, grayed out otherwise).
|
|
192
|
+
- Added `resolvedVersionId` to all `StorageResolved*Type` types so the server can detect whether the latest version differs from the active version.
|
|
193
|
+
- Added `status` option to `GetByIdOptions` to allow resolving draft vs published versions through the editor layer.
|
|
194
|
+
- 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.
|
|
195
|
+
- Added `ALTER TABLE` migration for `mastra_agent_versions` in libsql and pg to add newer columns (`mcpClients`, `requestContextSchema`, `workspace`, `skills`, `skillsFormat`).
|
|
196
|
+
|
|
197
|
+
- Added scorer version management and CMS draft/publish flow for scorers. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
198
|
+
- Added scorer version methods to the client SDK: `listVersions`, `createVersion`, `getVersion`, `activateVersion`, `restoreVersion`, `deleteVersion`, `compareVersions`.
|
|
199
|
+
- Added `ScorerVersionCombobox` for navigating scorer versions with Published/Draft labels.
|
|
200
|
+
- Scorer edit page now supports Save (draft) and Publish workflows with an "Unpublished changes" indicator.
|
|
201
|
+
- Storage list methods for agents and scorers no longer default to filtering only published entities, allowing drafts to appear in the playground.
|
|
202
|
+
|
|
203
|
+
- Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`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), [`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), [`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), [`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), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`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)]:
|
|
204
|
+
- @mastra/core@1.5.0
|
|
205
|
+
|
|
206
|
+
## 1.5.0-alpha.0
|
|
207
|
+
|
|
208
|
+
### Minor Changes
|
|
209
|
+
|
|
210
|
+
- 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))
|
|
211
|
+
|
|
212
|
+
**Filesystem-native skill versioning (draft → publish model):**
|
|
213
|
+
|
|
214
|
+
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:
|
|
215
|
+
- `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`
|
|
216
|
+
- Version switching via `editor.skill.update({ id, activeVersionId })` — Points the skill to a previous version without re-publishing
|
|
217
|
+
- Publishing a skill automatically invalidates cached agents that reference it, so they re-hydrate with the updated version on next access
|
|
218
|
+
|
|
219
|
+
**Agent skill resolution strategies:**
|
|
220
|
+
|
|
221
|
+
Agents can reference skills with different resolution strategies:
|
|
222
|
+
- `strategy: 'latest'` — Resolves the skill's active version (honors `activeVersionId` for rollback)
|
|
223
|
+
- `pin: '<versionId>'` — Pins to a specific version, immune to publishes
|
|
224
|
+
- `strategy: 'live'` — Reads directly from the live filesystem (no blob store)
|
|
225
|
+
|
|
226
|
+
**Blob storage infrastructure:**
|
|
227
|
+
- `BlobStore` abstract class for content-addressable storage keyed by SHA-256 hash
|
|
228
|
+
- `InMemoryBlobStore` for testing
|
|
229
|
+
- LibSQL, Postgres, and MongoDB implementations
|
|
230
|
+
- `S3BlobStore` for storing blobs in S3 or S3-compatible storage (AWS, R2, MinIO, DO Spaces)
|
|
231
|
+
- `BlobStoreProvider` interface and `MastraEditorConfig.blobStores` registry for pluggable blob storage
|
|
232
|
+
- `VersionedSkillSource` and `CompositeVersionedSkillSource` for reading skill files from the blob store at runtime
|
|
233
|
+
|
|
234
|
+
**New storage types:**
|
|
235
|
+
- `StorageWorkspaceSnapshotType` and `StorageSkillSnapshotType` with corresponding input/output types
|
|
236
|
+
- `StorageWorkspaceRef` for ID-based or inline workspace references on agents
|
|
237
|
+
- `StorageSkillConfig` for per-agent skill overrides (`pin`, `strategy`, description, instructions)
|
|
238
|
+
- `SkillVersionTree` and `SkillVersionTreeEntry` for tree manifests
|
|
239
|
+
- `StorageBlobEntry` for content-addressable blob entries
|
|
240
|
+
- `SKILL_BLOBS_SCHEMA` for the `mastra_skill_blobs` table
|
|
241
|
+
|
|
242
|
+
**New editor namespaces:**
|
|
243
|
+
- `editor.workspace` — CRUD for workspace configs, plus `hydrateSnapshotToWorkspace()` for resolving to runtime `Workspace` instances
|
|
244
|
+
- `editor.skill` — CRUD for skill definitions, plus `publish()` for filesystem-to-blob snapshots
|
|
245
|
+
|
|
246
|
+
**Provider registries:**
|
|
247
|
+
- `MastraEditorConfig` accepts `filesystems`, `sandboxes`, and `blobStores` provider registries (keyed by provider ID)
|
|
248
|
+
- Built-in `local` filesystem and sandbox providers are auto-registered
|
|
249
|
+
- `editor.resolveBlobStore()` resolves from provider registry or falls back to the storage backend's blobs domain
|
|
250
|
+
- Providers expose `id`, `name`, `description`, `configSchema` (JSON Schema for UI form rendering), and a factory method
|
|
251
|
+
|
|
252
|
+
**Storage adapter support:**
|
|
253
|
+
- LibSQL: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
254
|
+
- Postgres: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
255
|
+
- MongoDB: Full `workspaces`, `skills`, and `blobs` domain implementations
|
|
256
|
+
- All three include `workspace`, `skills`, and `skillsFormat` fields on agent versions
|
|
257
|
+
|
|
258
|
+
**Server endpoints:**
|
|
259
|
+
- `GET/POST/PATCH/DELETE /stored/workspaces` — CRUD for stored workspaces
|
|
260
|
+
- `GET/POST/PATCH/DELETE /stored/skills` — CRUD for stored skills
|
|
261
|
+
- `POST /stored/skills/:id/publish` — Publish a skill from a filesystem source
|
|
262
|
+
|
|
263
|
+
```ts
|
|
264
|
+
import { MastraEditor } from '@mastra/editor';
|
|
265
|
+
import { s3FilesystemProvider, s3BlobStoreProvider } from '@mastra/s3';
|
|
266
|
+
import { e2bSandboxProvider } from '@mastra/e2b';
|
|
267
|
+
|
|
268
|
+
const editor = new MastraEditor({
|
|
269
|
+
filesystems: { s3: s3FilesystemProvider },
|
|
270
|
+
sandboxes: { e2b: e2bSandboxProvider },
|
|
271
|
+
blobStores: { s3: s3BlobStoreProvider },
|
|
272
|
+
});
|
|
273
|
+
|
|
274
|
+
// Create a skill and publish it
|
|
275
|
+
const skill = await editor.skill.create({
|
|
276
|
+
name: 'Code Review',
|
|
277
|
+
description: 'Reviews code for best practices',
|
|
278
|
+
instructions: 'Analyze the code and provide feedback...',
|
|
279
|
+
});
|
|
280
|
+
await editor.skill.publish(skill.id, source, 'skills/code-review');
|
|
281
|
+
|
|
282
|
+
// Agents resolve skills by strategy
|
|
283
|
+
await editor.agent.create({
|
|
284
|
+
name: 'Dev Assistant',
|
|
285
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
286
|
+
workspace: { type: 'id', workspaceId: workspace.id },
|
|
287
|
+
skills: { [skill.id]: { strategy: 'latest' } },
|
|
288
|
+
skillsFormat: 'xml',
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
- Added draft/publish version management for all editor primitives (agents, scorers, MCP clients, prompt blocks). ([#13061](https://github.com/mastra-ai/mastra/pull/13061))
|
|
293
|
+
|
|
294
|
+
**Status filtering on list endpoints** — All list endpoints now accept a `?status=draft|published|archived` query parameter to filter by entity status. Defaults to `published` to preserve backward compatibility.
|
|
295
|
+
|
|
296
|
+
**Draft vs published resolution on get-by-id endpoints** — All get-by-id endpoints now accept `?status=draft` to resolve the entity with its latest (unpublished) version, or `?status=published` (default) to resolve with the active published version.
|
|
297
|
+
|
|
298
|
+
**Edits no longer auto-publish** — When updating any primitive, a new version is created but `activeVersionId` is no longer automatically updated. Edits stay as drafts until explicitly published via the activate endpoint.
|
|
299
|
+
|
|
300
|
+
**Full version management for all primitives** — Scorers, MCP clients, and prompt blocks now have the same version management API that agents have: list versions, create version snapshots, get specific versions, activate/publish, restore from a previous version, delete versions, and compare versions.
|
|
301
|
+
|
|
302
|
+
**New prompt block CRUD routes** — Prompt blocks now have full server routes (`GET /stored/prompt-blocks`, `GET /stored/prompt-blocks/:id`, `POST`, `PATCH`, `DELETE`).
|
|
303
|
+
|
|
304
|
+
**New version endpoints** — Each primitive now exposes 7 version management endpoints under `/stored/{type}/:id/versions` (list, create, get, activate, restore, delete, compare).
|
|
305
|
+
|
|
306
|
+
```ts
|
|
307
|
+
// Fetch the published version (default behavior, backward compatible)
|
|
308
|
+
const published = await fetch('/api/stored/scorers/my-scorer');
|
|
309
|
+
|
|
310
|
+
// Fetch the draft version for editing in the UI
|
|
311
|
+
const draft = await fetch('/api/stored/scorers/my-scorer?status=draft');
|
|
312
|
+
|
|
313
|
+
// Publish a specific version
|
|
314
|
+
await fetch('/api/stored/scorers/my-scorer/versions/abc123/activate', { method: 'POST' });
|
|
315
|
+
|
|
316
|
+
// Compare two versions
|
|
317
|
+
const diff = await fetch('/api/stored/scorers/my-scorer/versions/compare?from=v1&to=v2');
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
### Patch Changes
|
|
321
|
+
|
|
322
|
+
- Dataset schemas now appear in the Edit Dataset dialog. Previously the `inputSchema` and `groundTruthSchema` fields were not passed to the dialog, so editing a dataset always showed empty schemas. ([#13175](https://github.com/mastra-ai/mastra/pull/13175))
|
|
323
|
+
|
|
324
|
+
Schema edits in the JSON editor no longer cause the cursor to jump to the top of the field. Typing `{"type": "object"}` in the schema editor now behaves like a normal text input instead of resetting on every keystroke.
|
|
325
|
+
|
|
326
|
+
Validation errors are now surfaced when updating a dataset schema that conflicts with existing items. For example, adding a `required: ["name"]` constraint when existing items lack a `name` field now shows "2 existing item(s) fail validation" in the dialog instead of silently dropping the error.
|
|
327
|
+
|
|
328
|
+
Disabling a dataset schema from the Studio UI now correctly clears it. Previously the server converted `null` (disable) to `undefined` (no change), so the old schema persisted and validation continued.
|
|
329
|
+
|
|
330
|
+
Workflow schemas fetched via `client.getWorkflow().getSchema()` are now correctly parsed. The server serializes schemas with `superjson`, but the client was using plain `JSON.parse`, yielding a `{json: {...}}` wrapper instead of the actual JSON Schema object.
|
|
331
|
+
|
|
332
|
+
- CMS draft support with status badges for agents. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
333
|
+
- Agent list now resolves the latest (draft) version for each stored agent, showing current edits rather than the last published state.
|
|
334
|
+
- Added `hasDraft` and `activeVersionId` fields to the agent list API response.
|
|
335
|
+
- Agent list badges: "Published" (green) when a published version exists, "Draft" (colored when unpublished changes exist, grayed out otherwise).
|
|
336
|
+
- Added `resolvedVersionId` to all `StorageResolved*Type` types so the server can detect whether the latest version differs from the active version.
|
|
337
|
+
- Added `status` option to `GetByIdOptions` to allow resolving draft vs published versions through the editor layer.
|
|
338
|
+
- 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.
|
|
339
|
+
- Added `ALTER TABLE` migration for `mastra_agent_versions` in libsql and pg to add newer columns (`mcpClients`, `requestContextSchema`, `workspace`, `skills`, `skillsFormat`).
|
|
340
|
+
|
|
341
|
+
- Added scorer version management and CMS draft/publish flow for scorers. ([#13194](https://github.com/mastra-ai/mastra/pull/13194))
|
|
342
|
+
- Added scorer version methods to the client SDK: `listVersions`, `createVersion`, `getVersion`, `activateVersion`, `restoreVersion`, `deleteVersion`, `compareVersions`.
|
|
343
|
+
- Added `ScorerVersionCombobox` for navigating scorer versions with Published/Draft labels.
|
|
344
|
+
- Scorer edit page now supports Save (draft) and Publish workflows with an "Unpublished changes" indicator.
|
|
345
|
+
- Storage list methods for agents and scorers no longer default to filtering only published entities, allowing drafts to appear in the playground.
|
|
346
|
+
|
|
347
|
+
- Updated dependencies [[`252580a`](https://github.com/mastra-ai/mastra/commit/252580a71feb0e46d0ccab04a70a79ff6a2ee0ab), [`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), [`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), [`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), [`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), [`088d9ba`](https://github.com/mastra-ai/mastra/commit/088d9ba2577518703c52b0dccd617178d9ee6b0d), [`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)]:
|
|
348
|
+
- @mastra/core@1.5.0-alpha.0
|
|
349
|
+
|
|
350
|
+
## 1.4.0
|
|
351
|
+
|
|
352
|
+
### Minor Changes
|
|
353
|
+
|
|
354
|
+
- Added datasets and experiments storage implementations. Includes dataset CRUD, item versioning with SCD-2, experiment runs with scorer results, and table/type configurations for dataset and experiment tables. ([#12747](https://github.com/mastra-ai/mastra/pull/12747))
|
|
355
|
+
|
|
356
|
+
**Requires `@mastra/core` >= 1.4.0**
|
|
357
|
+
|
|
358
|
+
### Patch Changes
|
|
359
|
+
|
|
360
|
+
- Fixed agent version storage to persist the requestContextSchema field. Previously, requestContextSchema was defined on the agent snapshot type but was not included in the database schema, INSERT statements, or row parsing logic, causing it to be silently dropped when saving and loading agent versions. ([#13003](https://github.com/mastra-ai/mastra/pull/13003))
|
|
361
|
+
|
|
362
|
+
- Added MCP client storage domain and ToolProvider interface for integrating external tool catalogs with stored agents. ([#12974](https://github.com/mastra-ai/mastra/pull/12974))
|
|
363
|
+
|
|
364
|
+
**MCP Client Storage**
|
|
365
|
+
|
|
366
|
+
New storage domain for persisting MCP client configurations with CRUD operations. Each MCP client can contain multiple servers with independent tool selection:
|
|
367
|
+
|
|
368
|
+
```ts
|
|
369
|
+
// Store an MCP client with multiple servers
|
|
370
|
+
await storage.mcpClients.create({
|
|
371
|
+
id: 'my-mcp',
|
|
372
|
+
name: 'My MCP Client',
|
|
373
|
+
servers: {
|
|
374
|
+
'github-server': { url: 'https://mcp.github.com/sse' },
|
|
375
|
+
'slack-server': { url: 'https://mcp.slack.com/sse' },
|
|
376
|
+
},
|
|
377
|
+
});
|
|
378
|
+
```
|
|
379
|
+
|
|
380
|
+
LibSQL, PostgreSQL, and MongoDB storage adapters all implement the new MCP client domain.
|
|
381
|
+
|
|
382
|
+
**ToolProvider Interface**
|
|
383
|
+
|
|
384
|
+
New `ToolProvider` interface at `@mastra/core/tool-provider` enables third-party tool catalog integration (e.g., Composio, Arcade AI):
|
|
385
|
+
|
|
386
|
+
```ts
|
|
387
|
+
import type { ToolProvider } from '@mastra/core/tool-provider';
|
|
388
|
+
|
|
389
|
+
# Providers implement: listToolkits(), listTools(), getToolSchema(), resolveTools()
|
|
390
|
+
```
|
|
391
|
+
|
|
392
|
+
`resolveTools()` receives `requestContext` from the current request, enabling per-user API keys and credentials in multi-tenant setups:
|
|
393
|
+
|
|
394
|
+
```ts
|
|
395
|
+
const tools = await provider.resolveTools(slugs, configs, {
|
|
396
|
+
requestContext: { apiKey: 'user-specific-key', userId: 'tenant-123' },
|
|
397
|
+
});
|
|
398
|
+
```
|
|
399
|
+
|
|
400
|
+
**Tool Selection Semantics**
|
|
401
|
+
|
|
402
|
+
Both `mcpClients` and `integrationTools` on stored agents follow consistent three-state selection:
|
|
403
|
+
- `{ tools: undefined }` — provider registered, no tools selected
|
|
404
|
+
- `{ tools: {} }` — all tools from provider included
|
|
405
|
+
- `{ tools: { 'TOOL_SLUG': { description: '...' } } }` — specific tools with optional overrides
|
|
406
|
+
|
|
407
|
+
- 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), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`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), [`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)]:
|
|
408
|
+
- @mastra/core@1.4.0
|
|
409
|
+
|
|
410
|
+
## 1.4.0-alpha.0
|
|
411
|
+
|
|
412
|
+
### Minor Changes
|
|
413
|
+
|
|
414
|
+
- Added datasets and experiments storage implementations. Includes dataset CRUD, item versioning with SCD-2, experiment runs with scorer results, and table/type configurations for dataset and experiment tables. ([#12747](https://github.com/mastra-ai/mastra/pull/12747))
|
|
415
|
+
|
|
416
|
+
**Requires `@mastra/core` >= 1.4.0**
|
|
417
|
+
|
|
418
|
+
### Patch Changes
|
|
419
|
+
|
|
420
|
+
- Fixed agent version storage to persist the requestContextSchema field. Previously, requestContextSchema was defined on the agent snapshot type but was not included in the database schema, INSERT statements, or row parsing logic, causing it to be silently dropped when saving and loading agent versions. ([#13003](https://github.com/mastra-ai/mastra/pull/13003))
|
|
421
|
+
|
|
422
|
+
- Added MCP client storage domain and ToolProvider interface for integrating external tool catalogs with stored agents. ([#12974](https://github.com/mastra-ai/mastra/pull/12974))
|
|
423
|
+
|
|
424
|
+
**MCP Client Storage**
|
|
425
|
+
|
|
426
|
+
New storage domain for persisting MCP client configurations with CRUD operations. Each MCP client can contain multiple servers with independent tool selection:
|
|
427
|
+
|
|
428
|
+
```ts
|
|
429
|
+
// Store an MCP client with multiple servers
|
|
430
|
+
await storage.mcpClients.create({
|
|
431
|
+
id: 'my-mcp',
|
|
432
|
+
name: 'My MCP Client',
|
|
433
|
+
servers: {
|
|
434
|
+
'github-server': { url: 'https://mcp.github.com/sse' },
|
|
435
|
+
'slack-server': { url: 'https://mcp.slack.com/sse' },
|
|
436
|
+
},
|
|
437
|
+
});
|
|
438
|
+
```
|
|
439
|
+
|
|
440
|
+
LibSQL, PostgreSQL, and MongoDB storage adapters all implement the new MCP client domain.
|
|
441
|
+
|
|
442
|
+
**ToolProvider Interface**
|
|
443
|
+
|
|
444
|
+
New `ToolProvider` interface at `@mastra/core/tool-provider` enables third-party tool catalog integration (e.g., Composio, Arcade AI):
|
|
445
|
+
|
|
446
|
+
```ts
|
|
447
|
+
import type { ToolProvider } from '@mastra/core/tool-provider';
|
|
448
|
+
|
|
449
|
+
# Providers implement: listToolkits(), listTools(), getToolSchema(), resolveTools()
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
`resolveTools()` receives `requestContext` from the current request, enabling per-user API keys and credentials in multi-tenant setups:
|
|
453
|
+
|
|
454
|
+
```ts
|
|
455
|
+
const tools = await provider.resolveTools(slugs, configs, {
|
|
456
|
+
requestContext: { apiKey: 'user-specific-key', userId: 'tenant-123' },
|
|
457
|
+
});
|
|
458
|
+
```
|
|
459
|
+
|
|
460
|
+
**Tool Selection Semantics**
|
|
461
|
+
|
|
462
|
+
Both `mcpClients` and `integrationTools` on stored agents follow consistent three-state selection:
|
|
463
|
+
- `{ tools: undefined }` — provider registered, no tools selected
|
|
464
|
+
- `{ tools: {} }` — all tools from provider included
|
|
465
|
+
- `{ tools: { 'TOOL_SLUG': { description: '...' } } }` — specific tools with optional overrides
|
|
466
|
+
|
|
467
|
+
- 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), [`0831bbb`](https://github.com/mastra-ai/mastra/commit/0831bbb5bc750c18e9b22b45f18687c964b70828), [`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), [`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)]:
|
|
468
|
+
- @mastra/core@1.4.0-alpha.0
|
|
469
|
+
|
|
470
|
+
## 1.3.0
|
|
471
|
+
|
|
472
|
+
### Minor Changes
|
|
473
|
+
|
|
474
|
+
- **Updated storage adapters for generic storage domain API** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
|
|
475
|
+
|
|
476
|
+
All storage adapters now implement the unified `VersionedStorageDomain` method names. Entity-specific methods (`createAgent`, `getAgentById`, `deleteAgent`, etc.) have been replaced with generic equivalents (`create`, `getById`, `delete`, etc.) across agents, prompt blocks, and scorer definitions domains.
|
|
477
|
+
|
|
478
|
+
Added `scorer-definitions` domain support to all adapters.
|
|
479
|
+
|
|
480
|
+
**Before:**
|
|
481
|
+
|
|
482
|
+
```ts
|
|
483
|
+
const store = storage.getStore('agents');
|
|
484
|
+
await store.createAgent({ agent: input });
|
|
485
|
+
await store.getAgentById({ id: 'abc' });
|
|
486
|
+
await store.deleteAgent({ id: 'abc' });
|
|
487
|
+
```
|
|
488
|
+
|
|
489
|
+
**After:**
|
|
490
|
+
|
|
491
|
+
```ts
|
|
492
|
+
const store = storage.getStore('agents');
|
|
493
|
+
await store.create({ agent: input });
|
|
494
|
+
await store.getById('abc');
|
|
495
|
+
await store.delete('abc');
|
|
496
|
+
```
|
|
497
|
+
|
|
498
|
+
### Patch Changes
|
|
499
|
+
|
|
500
|
+
- Fixed observational memory progress bars resetting to zero after agent responses finish. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
|
|
501
|
+
|
|
502
|
+
- Fixed issues with stored agents ([#12790](https://github.com/mastra-ai/mastra/pull/12790))
|
|
503
|
+
|
|
504
|
+
- Supporting changes for async buffering in observational memory, including new config options, streaming events, and UI markers. ([#12891](https://github.com/mastra-ai/mastra/pull/12891))
|
|
505
|
+
|
|
506
|
+
- Added prompt block storage implementations. Each store supports full CRUD for prompt blocks and their versions, including JSON serialization for rules and metadata. Also updated agent instructions serialization to support the new `AgentInstructionBlock` array format alongside plain strings. ([#12776](https://github.com/mastra-ai/mastra/pull/12776))
|
|
507
|
+
|
|
508
|
+
- 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), [`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)]:
|
|
509
|
+
- @mastra/core@1.3.0
|
|
510
|
+
|
|
511
|
+
## 1.3.0-alpha.1
|
|
512
|
+
|
|
513
|
+
### Patch Changes
|
|
514
|
+
|
|
515
|
+
- Fixed observational memory progress bars resetting to zero after agent responses finish. The messages and observations sidebar bars now retain their values on stream completion, cancellation, and page reload. Also added a buffer-status endpoint so buffering badges resolve with accurate token counts instead of spinning forever when buffering outlives the stream. ([#12934](https://github.com/mastra-ai/mastra/pull/12934))
|
|
516
|
+
|
|
517
|
+
- Updated dependencies [[`b31c922`](https://github.com/mastra-ai/mastra/commit/b31c922215b513791d98feaea1b98784aa00803a)]:
|
|
518
|
+
- @mastra/core@1.3.0-alpha.2
|
|
519
|
+
|
|
520
|
+
## 1.3.0-alpha.0
|
|
521
|
+
|
|
522
|
+
### Minor Changes
|
|
523
|
+
|
|
524
|
+
- **Updated storage adapters for generic storage domain API** ([#12846](https://github.com/mastra-ai/mastra/pull/12846))
|
|
525
|
+
|
|
526
|
+
All storage adapters now implement the unified `VersionedStorageDomain` method names. Entity-specific methods (`createAgent`, `getAgentById`, `deleteAgent`, etc.) have been replaced with generic equivalents (`create`, `getById`, `delete`, etc.) across agents, prompt blocks, and scorer definitions domains.
|
|
527
|
+
|
|
528
|
+
Added `scorer-definitions` domain support to all adapters.
|
|
529
|
+
|
|
530
|
+
**Before:**
|
|
531
|
+
|
|
532
|
+
```ts
|
|
533
|
+
const store = storage.getStore('agents');
|
|
534
|
+
await store.createAgent({ agent: input });
|
|
535
|
+
await store.getAgentById({ id: 'abc' });
|
|
536
|
+
await store.deleteAgent({ id: 'abc' });
|
|
537
|
+
```
|
|
538
|
+
|
|
539
|
+
**After:**
|
|
540
|
+
|
|
541
|
+
```ts
|
|
542
|
+
const store = storage.getStore('agents');
|
|
543
|
+
await store.create({ agent: input });
|
|
544
|
+
await store.getById('abc');
|
|
545
|
+
await store.delete('abc');
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### Patch Changes
|
|
549
|
+
|
|
550
|
+
- Fixed issues with stored agents ([#12790](https://github.com/mastra-ai/mastra/pull/12790))
|
|
551
|
+
|
|
552
|
+
- **Async buffering for observational memory is now enabled by default.** Observations are pre-computed in the background as conversations grow — when the context window fills up, buffered observations activate instantly with no blocking LLM call. This keeps agents responsive during long conversations. ([#12891](https://github.com/mastra-ai/mastra/pull/12891))
|
|
553
|
+
|
|
554
|
+
**Default settings:**
|
|
555
|
+
- `observation.bufferTokens: 0.2` — buffer every 20% of `messageTokens` (~6k tokens with the default 30k threshold)
|
|
556
|
+
- `observation.bufferActivation: 0.8` — on activation, retain 20% of the message window
|
|
557
|
+
- `reflection.bufferActivation: 0.5` — start background reflection at 50% of the observation threshold
|
|
558
|
+
|
|
559
|
+
**Disabling async buffering:**
|
|
560
|
+
|
|
561
|
+
Set `observation.bufferTokens: false` to disable async buffering for both observations and reflections:
|
|
562
|
+
|
|
563
|
+
```ts
|
|
564
|
+
const memory = new Memory({
|
|
565
|
+
options: {
|
|
566
|
+
observationalMemory: {
|
|
567
|
+
model: 'google/gemini-2.5-flash',
|
|
568
|
+
observation: {
|
|
569
|
+
bufferTokens: false,
|
|
570
|
+
},
|
|
571
|
+
},
|
|
572
|
+
},
|
|
573
|
+
});
|
|
574
|
+
```
|
|
575
|
+
|
|
576
|
+
**Model is now required** when passing an observational memory config object. Use `observationalMemory: true` for the default (google/gemini-2.5-flash), or set a model explicitly:
|
|
577
|
+
|
|
578
|
+
```ts
|
|
579
|
+
// Uses default model (google/gemini-2.5-flash)
|
|
580
|
+
observationalMemory: true
|
|
581
|
+
|
|
582
|
+
// Explicit model
|
|
583
|
+
observationalMemory: {
|
|
584
|
+
model: "google/gemini-2.5-flash",
|
|
585
|
+
}
|
|
586
|
+
```
|
|
587
|
+
|
|
588
|
+
**`shareTokenBudget` requires `bufferTokens: false`** (temporary limitation). If you use `shareTokenBudget: true`, you must explicitly disable async buffering:
|
|
589
|
+
|
|
590
|
+
```ts
|
|
591
|
+
observationalMemory: {
|
|
592
|
+
model: "google/gemini-2.5-flash",
|
|
593
|
+
shareTokenBudget: true,
|
|
594
|
+
observation: { bufferTokens: false },
|
|
595
|
+
}
|
|
596
|
+
```
|
|
597
|
+
|
|
598
|
+
**New streaming event:** `data-om-status` replaces `data-om-progress` with a structured status object containing active window usage, buffered observation/reflection state, and projected activation impact.
|
|
599
|
+
|
|
600
|
+
**Buffering markers:** New `data-om-buffering-start`, `data-om-buffering-end`, and `data-om-buffering-failed` streaming events for UI feedback during background operations.
|
|
601
|
+
|
|
602
|
+
- Added prompt block storage implementations. Each store supports full CRUD for prompt blocks and their versions, including JSON serialization for rules and metadata. Also updated agent instructions serialization to support the new `AgentInstructionBlock` array format alongside plain strings. ([#12776](https://github.com/mastra-ai/mastra/pull/12776))
|
|
603
|
+
|
|
604
|
+
- 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)]:
|
|
605
|
+
- @mastra/core@1.3.0-alpha.1
|
|
606
|
+
|
|
607
|
+
## 1.2.0
|
|
608
|
+
|
|
609
|
+
### Minor Changes
|
|
610
|
+
|
|
611
|
+
- Added Observational Memory — a new memory system that keeps your agent's context window small while preserving long-term memory across conversations. ([#12599](https://github.com/mastra-ai/mastra/pull/12599))
|
|
612
|
+
|
|
613
|
+
**Why:** Long conversations cause context rot and waste tokens. Observational Memory compresses conversation history into observations (5–40x compression) and periodically condenses those into reflections. Your agent stays fast and focused, even after thousands of messages.
|
|
614
|
+
|
|
615
|
+
**Usage:**
|
|
616
|
+
|
|
617
|
+
```ts
|
|
618
|
+
import { Memory } from '@mastra/memory';
|
|
619
|
+
import { PostgresStore } from '@mastra/pg';
|
|
620
|
+
|
|
621
|
+
const memory = new Memory({
|
|
622
|
+
storage: new PostgresStore({ connectionString: process.env.DATABASE_URL }),
|
|
623
|
+
options: {
|
|
624
|
+
observationalMemory: true,
|
|
625
|
+
},
|
|
626
|
+
});
|
|
627
|
+
|
|
628
|
+
const agent = new Agent({
|
|
629
|
+
name: 'my-agent',
|
|
630
|
+
model: openai('gpt-4o'),
|
|
631
|
+
memory,
|
|
632
|
+
});
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
**What's new:**
|
|
636
|
+
- `observationalMemory: true` enables the three-tier memory system (recent messages → observations → reflections)
|
|
637
|
+
- Thread-scoped (per-conversation) and resource-scoped (shared across all threads for a user) modes
|
|
638
|
+
- Manual `observe()` API for triggering observation outside the normal agent loop
|
|
639
|
+
- New OM storage methods for pg, libsql, and mongodb adapters (conditionally enabled)
|
|
640
|
+
- `Agent.findProcessor()` method for looking up processors by ID
|
|
641
|
+
- `processorStates` for persisting processor state across loop iterations
|
|
642
|
+
- Abort signal propagation to processors
|
|
643
|
+
- `ProcessorStreamWriter` for custom stream events from processors
|
|
644
|
+
|
|
645
|
+
### Patch Changes
|
|
646
|
+
|
|
647
|
+
- Created @mastra/editor package for managing and resolving stored agent configurations ([#12631](https://github.com/mastra-ai/mastra/pull/12631))
|
|
648
|
+
|
|
649
|
+
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.
|
|
650
|
+
|
|
651
|
+
**Key Features:**
|
|
652
|
+
- **Agent Storage & Retrieval**: Store complete agent configurations including instructions, model settings, tools, workflows, nested agents, scorers, processors, and memory configuration
|
|
653
|
+
- **Version Management**: Create and manage multiple versions of agents, with support for activating specific versions
|
|
654
|
+
- **Dependency Resolution**: Automatically resolves and instantiates all agent dependencies (tools, workflows, sub-agents, etc.) from the Mastra registry
|
|
655
|
+
- **Caching**: Built-in caching for improved performance when repeatedly accessing stored agents
|
|
656
|
+
- **Type Safety**: Full TypeScript support with proper typing for stored configurations
|
|
657
|
+
|
|
658
|
+
**Usage Example:**
|
|
659
|
+
|
|
660
|
+
```typescript
|
|
661
|
+
import { MastraEditor } from '@mastra/editor';
|
|
662
|
+
import { Mastra } from '@mastra/core';
|
|
663
|
+
|
|
664
|
+
// Initialize editor with Mastra
|
|
665
|
+
const mastra = new Mastra({
|
|
666
|
+
/* config */
|
|
667
|
+
editor: new MastraEditor(),
|
|
668
|
+
});
|
|
669
|
+
|
|
670
|
+
// Store an agent configuration
|
|
671
|
+
const agentId = await mastra.storage.stores?.agents?.createAgent({
|
|
672
|
+
name: 'customer-support',
|
|
673
|
+
instructions: 'Help customers with inquiries',
|
|
674
|
+
model: { provider: 'openai', name: 'gpt-4' },
|
|
675
|
+
tools: ['search-kb', 'create-ticket'],
|
|
676
|
+
workflows: ['escalation-flow'],
|
|
677
|
+
memory: { vector: 'pinecone-db' },
|
|
678
|
+
});
|
|
679
|
+
|
|
680
|
+
// Retrieve and use the stored agent
|
|
681
|
+
const agent = await mastra.getEditor()?.getStoredAgentById(agentId);
|
|
682
|
+
const response = await agent?.generate('How do I reset my password?');
|
|
683
|
+
|
|
684
|
+
// List all stored agents
|
|
685
|
+
const agents = await mastra.getEditor()?.listStoredAgents({ pageSize: 10 });
|
|
686
|
+
```
|
|
687
|
+
|
|
688
|
+
**Storage Improvements:**
|
|
689
|
+
- Fixed JSONB handling in LibSQL, PostgreSQL, and MongoDB adapters
|
|
690
|
+
- Improved agent resolution queries to properly merge version data
|
|
691
|
+
- Enhanced type safety for serialized configurations
|
|
692
|
+
|
|
693
|
+
- 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)]:
|
|
694
|
+
- @mastra/core@1.2.0
|
|
695
|
+
|
|
696
|
+
## 1.2.0-alpha.0
|
|
4
697
|
|
|
5
698
|
### Minor Changes
|
|
6
699
|
|
|
@@ -86,8 +779,8 @@
|
|
|
86
779
|
- Improved agent resolution queries to properly merge version data
|
|
87
780
|
- Enhanced type safety for serialized configurations
|
|
88
781
|
|
|
89
|
-
- Updated dependencies [[`
|
|
90
|
-
- @mastra/core@
|
|
782
|
+
- 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)]:
|
|
783
|
+
- @mastra/core@1.2.0-alpha.1
|
|
91
784
|
|
|
92
785
|
## 1.1.0
|
|
93
786
|
|