This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/factory@0.29.0-alpha.1
## @mastra/core@1.84.0-alpha.1
## @mastra/playground-ui@69.1.0-alpha.1
## @mastra/client-js@1.60.1-alpha.1
## @mastra/react@1.15.1-alpha.1
## @mastra/deployer-cloud@1.84.0-alpha.1
## @mastra/longmemeval@1.1.43-alpha.1
## @mastra/opencode@0.1.43-alpha.1
## create-factory@0.4.4-alpha.1
## @mastra/code-sdk@1.19.1-alpha.1
## mastracode@0.50.1-alpha.1
## @mastra/arize@1.3.31-alpha.0
## @mastra/arthur@0.4.31-alpha.0
## @mastra/braintrust@1.3.28-alpha.0
## @mastra/datadog@1.4.23-alpha.0
## @mastra/deepeval@0.1.25-alpha.0
## @mastra/laminar@1.3.33-alpha.0
## @mastra/langfuse@1.6.7-alpha.0
## @mastra/langsmith@1.4.4-alpha.0
## @mastra/observability@1.24.1-alpha.0
## @mastra/otel-bridge@1.5.23-alpha.0
## @mastra/otel-exporter@1.5.3-alpha.0
## @mastra/posthog@1.4.8-alpha.0
## @mastra/sentry@1.2.33-alpha.0
## @mastra/agent-builder@1.2.2-alpha.0
## mastra@1.39.1-alpha.1
## @mastra/connect@1.4.1-alpha.0
## @mastra/deployer@1.84.0-alpha.1
## @mastra/editor@0.17.2-alpha.0
## @mastra/mcp-docs-server@1.3.14-alpha.1
## @mastra/memory@1.41.2-alpha.0
## @mastra/server@1.84.0-alpha.1
## @mastra/google-cloud-pubsub@1.1.8-alpha.0
## @mastra/redis-streams@0.8.2-alpha.0
## @mastra/valkey-streams@0.6.3-alpha.0
## @mastra/elysia@0.1.24-alpha.1
## @mastra/express@1.5.28-alpha.1
## @mastra/fastify@1.5.28-alpha.1
## @mastra/hono@1.7.26-alpha.1
## @mastra/koa@1.7.28-alpha.1
## @mastra/nestjs@0.3.1-alpha.1
## @mastra/next@0.2.42-alpha.1
## @mastra/tanstack-start@0.2.42-alpha.1
## @mastra/clickhouse@1.30.1-alpha.0
## @mastra/cloudflare@1.8.1-alpha.0
## @mastra/cloudflare-d1@1.5.1-alpha.0
## @mastra/convex@1.9.1-alpha.0
## @mastra/dsql@1.5.8-alpha.0
## @mastra/dynamodb@1.5.2-alpha.0
## @mastra/libsql@1.30.1-alpha.0
## @mastra/mongodb@1.27.1-alpha.0
## @mastra/mssql@1.11.2-alpha.0
## @mastra/mysql@0.17.1-alpha.0
## @mastra/oracledb@0.5.7-alpha.0
## @mastra/pg@1.36.1-alpha.0
## @mastra/redis@1.4.14-alpha.0
## @mastra/spanner@1.12.1-alpha.0
## @mastra/turso@0.1.22-alpha.0
## @mastra/upstash@1.6.2-alpha.0
## @mastra/valkey@0.2.10-alpha.0
## @mastra/temporal@0.6.1-alpha.1
## @mastra/daytona@0.11.6-alpha.0
## create-mastra@1.39.1-alpha.1
## @internal/playground@1.39.1-alpha.1
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/auth-studio@1.4.0-alpha.1
## @mastra/factory@0.28.0-alpha.5
## @mastra/mcp-apps-components@0.1.0-alpha.5
## @mastra/playground-ui@69.0.0-alpha.6
## @mastra/client-js@1.60.0-alpha.5
## @mastra/react@1.15.0-alpha.5
## @mastra/deployer-cloud@1.83.0-alpha.5
## @mastra/longmemeval@1.1.42-alpha.5
## @mastra/opencode@0.1.42-alpha.5
## create-factory@0.4.3-alpha.5
## @mastra/code-sdk@1.19.0-alpha.5
## mastracode@0.50.0-alpha.5
## @mastra/agent-builder@1.2.1-alpha.2
## mastra@1.39.0-alpha.5
## @mastra/core@1.83.0-alpha.5
## @mastra/deployer@1.83.0-alpha.5
## @mastra/editor@0.17.1-alpha.3
## @mastra/mcp@2.9.0-alpha.2
## @mastra/mcp-docs-server@1.3.13-alpha.8
## @mastra/memory@1.41.1-alpha.2
## @mastra/rag@2.7.3-alpha.1
## @mastra/server@1.83.0-alpha.5
## @mastra/elysia@0.1.23-alpha.5
## @mastra/express@1.5.27-alpha.5
## @mastra/fastify@1.5.27-alpha.5
## @mastra/hono@1.7.25-alpha.5
## @mastra/koa@1.7.27-alpha.5
## @mastra/nestjs@0.3.0-alpha.5
## @mastra/next@0.2.41-alpha.5
## @mastra/server-adapters-test-suite@0.3.0-alpha.2
## @mastra/tanstack-start@0.2.41-alpha.5
## @mastra/libsql@1.30.0-alpha.2
## @mastra/turso@0.1.21-alpha.2
## @mastra/inngest@1.11.2-alpha.3
## @mastra/temporal@0.6.0-alpha.5
## create-mastra@1.39.0-alpha.5
## @internal/playground@1.39.0-alpha.5
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/client-js@1.60.0-alpha.0
## @mastra/react@1.15.0-alpha.0
## @mastra/factory@0.28.0-alpha.0
## @mastra/code-sdk@1.19.0-alpha.0
## mastra@1.39.0-alpha.0
## @mastra/core@1.83.0-alpha.0
## @mastra/mcp@2.9.0-alpha.0
## @mastra/mcp-apps-components@0.1.0-alpha.0
## @mastra/playground-ui@69.0.0-alpha.0
## @mastra/server@1.83.0-alpha.0
## @mastra/nestjs@0.3.0-alpha.0
## @mastra/clickhouse@1.30.0-alpha.0
## @mastra/duckdb@1.19.0-alpha.0
## @mastra/libsql@1.30.0-alpha.0
## @mastra/pg@1.36.0-alpha.0
## @mastra/temporal@0.6.0-alpha.0
## @mastra/auth-better-auth@1.1.11-alpha.0
## @mastra/deployer-cloud@1.83.0-alpha.0
## @mastra/deployer-cloudflare@1.2.42-alpha.0
## @mastra/deployer-netlify@1.2.42-alpha.0
## @mastra/deployer-sandbox@0.3.27-alpha.0
## @mastra/deployer-vercel@1.2.42-alpha.0
## @mastra/longmemeval@1.1.42-alpha.0
## @mastra/opencode@0.1.42-alpha.0
## create-factory@0.4.3-alpha.0
## mastracode@0.49.1-alpha.0
## @mastra/arize@1.3.30-alpha.0
## @mastra/arthur@0.4.30-alpha.0
## @mastra/braintrust@1.3.27-alpha.0
## @mastra/datadog@1.4.22-alpha.0
## @mastra/deepeval@0.1.24-alpha.0
## @mastra/laminar@1.3.32-alpha.0
## @mastra/langfuse@1.6.6-alpha.0
## @mastra/langsmith@1.4.3-alpha.0
## @mastra/observability@1.23.2-alpha.0
## @mastra/otel-bridge@1.5.22-alpha.0
## @mastra/otel-exporter@1.5.2-alpha.0
## @mastra/posthog@1.4.7-alpha.0
## @mastra/sentry@1.2.32-alpha.0
## @mastra/agent-builder@1.2.1-alpha.0
## @mastra/connect@1.3.2-alpha.0
## create-mastra@1.39.0-alpha.0
## @mastra/deployer@1.83.0-alpha.0
## @mastra/editor@0.17.1-alpha.0
## @mastra/mcp-docs-server@1.3.13-alpha.0
## @mastra/memory@1.41.1-alpha.0
## @mastra/rag@2.7.3-alpha.0
## @mastra/redis-streams@0.8.1-alpha.0
## @mastra/elysia@0.1.23-alpha.0
## @mastra/express@1.5.27-alpha.0
## @mastra/fastify@1.5.27-alpha.0
## @mastra/hono@1.7.25-alpha.0
## @mastra/koa@1.7.27-alpha.0
## @mastra/next@0.2.41-alpha.0
## @mastra/tanstack-start@0.2.41-alpha.0
## @mastra/spanner@1.11.2-alpha.0
## @mastra/turso@0.1.21-alpha.0
## @mastra/inngest@1.11.2-alpha.0
## @mastra/gcs@0.3.6-alpha.0
## @internal/playground@1.39.0-alpha.0
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/factory@0.27.0-alpha.3
## @mastra/agent-builder@1.2.0-alpha.3
## @mastra/core@1.82.0-alpha.3
## @mastra/mcp@2.8.0-alpha.2
## @mastra/memory@1.41.0-alpha.3
## @mastra/playground-ui@68.0.0-alpha.3
## @mastra/ring-signals@0.1.0-alpha.0
## @mastra/libsql@1.29.0-alpha.2
## @mastra/mongodb@1.26.0-alpha.2
## @mastra/mysql@0.16.0-alpha.3
## @mastra/pg@1.35.0-alpha.3
## @mastra/discord@1.3.3-alpha.0
## @mastra/slack@1.8.1-alpha.0
## @mastra/teams@0.1.4-alpha.0
## @mastra/telegram@0.2.5-alpha.0
## @mastra/client-js@1.59.0-alpha.3
## @mastra/react@1.14.1-alpha.3
## @mastra/deployer-cloud@1.82.0-alpha.3
## @mastra/longmemeval@1.1.41-alpha.3
## @mastra/opencode@0.1.41-alpha.3
## create-factory@0.4.2-alpha.3
## @mastra/code-sdk@1.18.0-alpha.3
## mastracode@0.49.0-alpha.3
## @mastra/arize@1.3.29-alpha.2
## @mastra/arthur@0.4.29-alpha.2
## @mastra/laminar@1.3.31-alpha.2
## @mastra/langfuse@1.6.5-alpha.2
## @mastra/otel-bridge@1.5.21-alpha.2
## @mastra/otel-exporter@1.5.1-alpha.2
## @mastra/sentry@1.2.31-alpha.3
## mastra@1.38.0-alpha.3
## @mastra/connect@1.3.1-alpha.1
## @mastra/deployer@1.82.0-alpha.3
## @mastra/editor@0.17.0-alpha.3
## @mastra/evals@1.10.11-alpha.0
## @mastra/mcp-docs-server@1.3.12-alpha.4
## @mastra/server@1.82.0-alpha.3
## @mastra/elysia@0.1.22-alpha.3
## @mastra/express@1.5.26-alpha.3
## @mastra/fastify@1.5.26-alpha.3
## @mastra/hono@1.7.24-alpha.3
## @mastra/koa@1.7.26-alpha.3
## @mastra/nestjs@0.2.41-alpha.3
## @mastra/next@0.2.40-alpha.3
## @mastra/tanstack-start@0.2.40-alpha.3
## @mastra/turso@0.1.20-alpha.2
## @mastra/inngest@1.11.1-alpha.2
## @mastra/temporal@0.5.0-alpha.3
## create-mastra@1.38.0-alpha.3
## @internal/playground@1.38.0-alpha.3
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/client-js@1.59.0-alpha.2
## @mastra/factory@0.27.0-alpha.2
## @mastra/code-sdk@1.18.0-alpha.2
## mastra@1.38.0-alpha.2
## @mastra/core@1.82.0-alpha.2
## @mastra/editor@0.17.0-alpha.2
## @mastra/server@1.82.0-alpha.2
## @mastra/clickhouse@1.29.0-alpha.1
## @mastra/duckdb@1.18.0-alpha.1
## @mastra/pg@1.35.0-alpha.2
## @mastra/platform-workspace@1.12.0-alpha.1
## @mastra/react@1.14.1-alpha.2
## @mastra/deployer-cloud@1.82.0-alpha.2
## @mastra/deployer-sandbox@0.3.26-alpha.1
## @mastra/longmemeval@1.1.41-alpha.2
## @mastra/opencode@0.1.41-alpha.2
## @mastra/parallel@0.1.5-alpha.0
## create-factory@0.4.2-alpha.2
## mastracode@0.49.0-alpha.2
## @mastra/arize@1.3.29-alpha.1
## @mastra/arthur@0.4.29-alpha.1
## @mastra/braintrust@1.3.26-alpha.1
## @mastra/datadog@1.4.21-alpha.1
## @mastra/deepeval@0.1.23-alpha.1
## @mastra/laminar@1.3.31-alpha.1
## @mastra/langfuse@1.6.5-alpha.1
## @mastra/langsmith@1.4.2-alpha.1
## @mastra/observability@1.23.1-alpha.1
## @mastra/otel-bridge@1.5.21-alpha.1
## @mastra/otel-exporter@1.5.1-alpha.1
## @mastra/posthog@1.4.6-alpha.1
## @mastra/sentry@1.2.31-alpha.2
## @mastra/agent-builder@1.1.33-alpha.2
## @mastra/deployer@1.82.0-alpha.2
## @mastra/mcp@2.8.0-alpha.1
## @mastra/mcp-docs-server@1.3.12-alpha.3
## @mastra/memory@1.41.0-alpha.2
## @mastra/playground-ui@68.0.0-alpha.2
## @mastra/rag@2.7.2-alpha.0
## @mastra/elysia@0.1.22-alpha.2
## @mastra/express@1.5.26-alpha.2
## @mastra/fastify@1.5.26-alpha.2
## @mastra/hono@1.7.24-alpha.2
## @mastra/koa@1.7.26-alpha.2
## @mastra/nestjs@0.2.41-alpha.2
## @mastra/next@0.2.40-alpha.2
## @mastra/tanstack-start@0.2.40-alpha.2
## @mastra/dsql@1.5.6-alpha.0
## @mastra/libsql@1.29.0-alpha.1
## @mastra/mongodb@1.26.0-alpha.1
## @mastra/mssql@1.11.1-alpha.0
## @mastra/mysql@0.16.0-alpha.2
## @mastra/oracledb@0.5.6-alpha.0
## @mastra/spanner@1.11.1-alpha.0
## @mastra/turso@0.1.20-alpha.1
## @mastra/voice-google@0.14.5-alpha.0
## @mastra/inngest@1.11.1-alpha.1
## @mastra/temporal@0.5.0-alpha.2
## @mastra/e2b@0.16.1-alpha.1
## create-mastra@1.38.0-alpha.2
## @internal/playground@1.38.0-alpha.2
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
> Supersedes #22507, closed during the Knowledge pause. GitHub cannot
reopen it because the branch was rebased onto current `main`; its review
history stays on #22507.
Wave: 1 of 4
Segment: W1.2 of 8
Purpose: Add normalized Knowledge v2 physical storage and explicit
reset-safe schema negotiation for LibSQL and PostgreSQL while preserving
MySQL and MongoDB v1 compatibility.
Previous PR: https://github.com/mastra-ai/mastra/pull/26017
Next PR: https://github.com/mastra-ai/mastra/pull/26019
Previous wave: None
Next wave: feat/knowledge-v2-w2-contract (planned)
## Summary
- creates and indexes all 15 Knowledge-owned v2 tables in LibSQL and
PostgreSQL
- requires every expected table/column plus an adapter-owned completion
marker before treating a schema as compatible
- keeps normalized node/record scope projections, activity linkage, CAS
versions, mentions, and semantic outbox writes transactionally coherent
- integrates PostgreSQL schema inspection with the shared init snapshot
and keeps explicit reset limited to Knowledge-owned objects
- registers normalized tables in Core and InMemory without changing
MySQL/MongoDB v1 schemas
## Test plan
- `pnpm build:core`
- `pnpm --filter ./packages/core check`
- `pnpm --dir packages/core exec vitest run
src/storage/domains/knowledge/__tests__/base.test.ts
src/storage/domains/knowledge/__tests__/scope.test.ts --reporter=dot
--bail 1`
- `pnpm --filter ./stores/libsql test -- --reporter=dot --bail 1` (997
passed, 19 skipped)
- `pnpm --dir stores/libsql exec vitest run
src/storage/domains/knowledge/index.test.ts --reporter=dot --bail 1` (29
passed)
- `pnpm --dir stores/pg exec vitest run
src/storage/domains/knowledge/index.test.ts
src/storage/db/schema-snapshot.test.ts
src/storage/db/schema-snapshot.stress.test.ts --reporter=dot --bail 1`
(46 passed)
- MySQL v1 Knowledge focused suite (27 passed)
- Turbo builds for LibSQL, PostgreSQL, MySQL, and MongoDB
- Prettier, Oxlint, and `git diff --check`
## Known unrelated baseline evidence
- PostgreSQL full suite passed 2,038 tests with 121 skipped; one
workflow planner-index assertion selected a different valid index.
- MongoDB focused v1 Knowledge testing exposed the shipped
unified-collection unique-index collision for record documents with null
node-only keys; this PR does not modify MongoDB.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This update gives Knowledge a more organized way to store its data in
LibSQL and PostgreSQL. It creates the new tables when Knowledge is first
used, and it stops if it finds a database layout it cannot safely
recognize.
## Changes
- Added Knowledge v2 schemas and compatibility checks. Initialization
verifies all required tables and columns, plus a schema-version marker.
- Added normalized storage for scopes, grants, addresses, imports,
proposals, activity, and other Knowledge data. LibSQL and PostgreSQL
maintain scope links and record versions during Knowledge updates.
- Made Knowledge initialization lazy. `storage.init()` skips Knowledge.
When automatic initialization is enabled,
`storage.getStore('knowledge')` activates it. Call
`storage.initKnowledge()` to activate it explicitly.
- Added guarded handling for recognized published v1 schemas. The
adapter drops those tables without migrating their data. Unrecognized
layouts remain unchanged and require an explicit reset.
- Limited `dangerouslyReset()` to Knowledge-owned data. PostgreSQL reset
fails if dependencies prevent the operation.
- Removed the `maxScope` ceiling from Knowledge storage and
`Subconscious` configuration. Knowledge writes can use any scope visible
to the conversation.
- Preserved MySQL and MongoDB Knowledge schemas.
## Validation
The PR description reports passing build, type-check, lint, formatting,
and focused storage tests. Reported results include 997 LibSQL tests, 46
PostgreSQL Knowledge and schema-snapshot tests, and 27 MySQL v1
Knowledge tests. The PostgreSQL full suite reportedly passed 2,038
tests, with 121 skipped.
The description also reports a MongoDB focused-test unique-index
collision involving record documents with null node-only keys. This PR
does not change MongoDB’s schema. These test results are author-reported
and were not independently verified here.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
Co-authored-by: Jamie Lee Nichols <10267569+CodingButter@users.noreply.github.com>