mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
46 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
8d4abc4f88 |
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) | ||
|
|
80db9c3ba2 |
chore: run oxfmt instead of prettier in the last six pre-commit configs (#29892)
We moved from Prettier to oxfmt a while ago and CI checks formatting
with `oxfmt --check`, but six packages still ran `prettier --write` in
their pre-commit hook: the Discord, Teams and Telegram channels, the
Turso and OracleDB stores, and the DeepEval observability package. A
commit touching those could get reformatted by Prettier and then fail
the format check in CI.
They now use the same command as every other package.
```diff
- '*.{json,md,yml,yaml}': ['prettier --write'],
+ '*.{json,md,yml,yaml}': ['oxfmt --no-error-on-unmatched-pattern'],
```
`explorations/longmemeval` still uses Prettier in its hook. I left it
alone because `explorations/` is excluded from the oxfmt check.
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
6e8dfcb83f | chore: version - exit prerelease mode | ||
|
|
4bc3aa672f |
chore: version packages (alpha) (#29255)
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> |
||
|
|
3bdb4ec5f4 |
chore(deps): update build tools (major) (#29026)
> [!NOTE] > This PR body was truncated due to platform limits. This PR contains the following updates: | Package | Type | Update | Change | Pending | |---|---|---|---|---| | [@vitest/coverage-v8](https://vitest.dev/guide/coverage) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/coverage-v8)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fcoverage-v8/4.1.12/5.0.5) | `5.1.0` | | [@vitest/mocker@>=2.1.0 <4.1.12](https://redirect.github.com/vitest-dev/vitest/tree/main/packages/mocker) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/mocker)) | pnpm-workspace.overrides | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fmocker@>=2.1.0 <4.1.12/4.1.12/5.0.5) | `5.1.0` | | [@vitest/ui](https://vitest.dev/guide/ui) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/ui)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/@vitest%2fui/4.1.12/5.0.5) | `5.1.0` | | [dotenv](https://redirect.github.com/motdotla/dotenv) | devDependencies | major | [`^17.4.2` → `^18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | | | [dotenv](https://redirect.github.com/motdotla/dotenv) | devDependencies | major | [`17.4.2` → `18.0.9`](https://renovatebot.com/diffs/npm/dotenv/17.4.2/18.0.9) | | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | devDependencies | major | [`^4.1.12` → `^5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | pnpm.catalog.default | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | devDependencies | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest/4.1.12/5.0.5) | `5.1.0` | | [vitest@>=2.1.0 <4.1.12](https://vitest.dev) ([source](https://redirect.github.com/vitest-dev/vitest/tree/HEAD/packages/vitest)) | pnpm-workspace.overrides | major | [`4.1.12` → `5.0.5`](https://renovatebot.com/diffs/npm/vitest@>=2.1.0 <4.1.12/4.1.12/5.0.5) | `5.1.0` | --- > [!WARNING] > Some dependencies could not be looked up. Check the [Dependency Dashboard](../issues/9505) for more information. --- ### Release Notes <details> <summary>vitest-dev/vitest (@​vitest/coverage-v8)</summary> ### [`v5.0.5`](https://redirect.github.com/vitest-dev/vitest/releases/tag/v5.0.5) [Compare Source](https://redirect.github.com/vitest-dev/vitest/compare/v5.0.4...v5.0.5) ##### 🐞 Bug Fixes - Keep vite default `fs.deny` with api token file - by [@​hi-ogawa](https://redirect.github.com/hi-ogawa), **Hiroshi Ogawa** and **Claude Opus 5.5** in [#​11578](https://redirect.github.com/vitest-dev/vitest/issues/11578) [<samp>(28dc1)</samp>]( |
||
|
|
2d01b00f0d |
fix(channels): keep chat and @chat-adapter/* on one version (#29285)
## Description `@mastra/discord` pinned `@chat-adapter/discord` to `4.40.0` and `@mastra/teams` used `~4.40.0`, while `@mastra/core` moved `chat` to `^4.43.0`. Every `@chat-adapter/*` release depends on the exact `chat` release with the same version, so an app with core plus either package installs two copies of `chat`: ```sh pnpm add @mastra/core@1.81.0 @mastra/discord@1.3.2 @mastra/teams zod@4 ls node_modules/.pnpm | grep '^chat@' # chat@4.40.0_zod@4.6.7 # chat@4.44.0_zod@4.6.7 ``` The discord pin was correct when it landed in #25002 (it matched core's `chat` at the time). It went stale when #28417 bumped core, slack and telegram but not discord or teams. Renovate didn't catch it because the "Chat adapter" group only matched `chat` and `@chat-adapter/slack`. This PR: - moves `chat` and all four `@chat-adapter/*` packages into the pnpm catalog at `^4.44.0`, and points core, `@mastra/factory` and the channel packages at `catalog:` - widens the Renovate "Chat adapter" group to `@chat-adapter/*` - drops the "pinned to 4.40.0" wording from the discord README Installing the packed core, discord and teams tarballs into a fresh app now gives a single `chat@4.44.0`, and the repo lockfile has one `chat` entry. Tested locally: typecheck and tests for `@mastra/discord`, `@mastra/slack`, `@mastra/teams`, `@mastra/telegram`, core `src/channels`, the factory Slack integration, and core/factory typecheck. The two smaller requests in the issue (passing an adapter instance to `DiscordProvider`, back-off in core's `startGatewayLoop`) are out of scope here. ## Related issue(s) Fixes #29283 ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) - [ ] New feature (non-breaking change that adds functionality) - [ ] Breaking change (fix or feature that would cause existing functionality to change) - [ ] Documentation update - [ ] Code refactoring - [ ] Performance improvement - [ ] Test update ## Checklist - [x] I have linked the related issue(s) in the description above - [x] I have made corresponding changes to the documentation (if applicable) - [ ] I have added tests that prove my fix is effective or that my feature works - [ ] I have addressed all Coderabbit comments on this PR <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Mastra and its channel packages now use matching versions of the chat software. This helps prevent apps from installing separate copies that may not work together. ## Changes - Added `chat` and the Discord, Slack, Teams, and Telegram adapters to the pnpm catalog at `^4.44.0`. - Updated core, factory, and all four channel packages to use catalog versions. - Expanded Renovate’s “Chat adapter” group to match every `@chat-adapter/*` package and `chat`. - Updated the Discord README to remove the adapter pin wording and clarify the reaction retry behavior. - Added changesets for patch releases of the affected packages. ## Validation The author reports that packed core, Discord, and Teams packages install one `chat@4.44.0` in a fresh app, and that the repository lockfile has one `chat` entry. The author also reports passing typechecks and tests for Discord, Slack, Teams, Telegram, core channels, and the factory Slack integration. Accepting an adapter instance in `DiscordProvider` and adding back-off to core’s `startGatewayLoop` are out of scope. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
6a191d46dc | chore: version - exit prerelease mode | ||
|
|
2c646b53d0 |
chore: version packages (alpha) (#28399)
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.25.0-alpha.5 ## @mastra/langsmith@1.4.0-alpha.2 ## @mastra/connect@1.2.0-alpha.2 ## @mastra/core@1.80.0-alpha.4 ## @mastra/playground-ui@66.0.0-alpha.4 ## @mastra/acp@0.4.4-alpha.0 ## @mastra/claude@0.3.4-alpha.0 ## @mastra/cursor@0.3.4-alpha.0 ## @mastra/openai@1.1.4-alpha.0 ## @mastra/auth-auth0@1.2.6-alpha.0 ## @mastra/auth-better-auth@1.1.9-alpha.0 ## @mastra/auth-clerk@1.3.2-alpha.0 ## @mastra/auth-cloud@1.2.8-alpha.0 ## @mastra/auth-firebase@1.1.5-alpha.0 ## @mastra/auth-google@0.1.7-alpha.0 ## @mastra/auth-neon@0.3.5-alpha.0 ## @mastra/auth-okta@0.2.6-alpha.0 ## @mastra/auth-studio@1.3.11-alpha.1 ## @mastra/auth-supabase@1.1.6-alpha.0 ## @mastra/auth-workos@1.6.8-alpha.0 ## @mastra/agent-browser@0.5.5-alpha.0 ## @mastra/browser-viewer@0.2.6-alpha.0 ## @mastra/browser-firecrawl@0.2.5-alpha.1 ## @mastra/stagehand@0.3.7-alpha.1 ## @mastra/discord@1.3.2-alpha.0 ## @mastra/slack@1.8.0-alpha.1 ## @mastra/teams@0.1.3-alpha.0 ## @mastra/telegram@0.2.4-alpha.0 ## @mastra/client-js@1.57.0-alpha.4 ## @mastra/react@1.13.0-alpha.4 ## @mastra/isolated-vm@0.1.4-alpha.0 ## @mastra/quickjs@0.1.5-alpha.0 ## @mastra/deployer-cloud@1.80.0-alpha.4 ## @mastra/deployer-cloudflare@1.2.39-alpha.1 ## @mastra/deployer-netlify@1.2.39-alpha.1 ## @mastra/deployer-sandbox@0.3.24-alpha.1 ## @mastra/deployer-vercel@1.2.39-alpha.1 ## @mastra/voyageai@0.4.3-alpha.0 ## @mastra/longmemeval@1.1.39-alpha.4 ## @mastra/livekit@0.5.2-alpha.0 ## @mastra/opencode@0.1.39-alpha.4 ## @mastra/parallel@0.1.4-alpha.0 ## create-factory@0.3.1-alpha.4 ## @mastra/code-sdk@1.15.1-alpha.5 ## mastracode@0.48.1-alpha.4 ## @mastra/arize@1.3.27-alpha.2 ## @mastra/arthur@0.4.27-alpha.2 ## @mastra/braintrust@1.3.24-alpha.2 ## @mastra/datadog@1.4.19-alpha.2 ## @mastra/deepeval@0.1.21-alpha.2 ## @mastra/laminar@1.3.29-alpha.2 ## @mastra/langfuse@1.6.3-alpha.2 ## @mastra/observability@1.21.1-alpha.2 ## @mastra/otel-bridge@1.5.19-alpha.2 ## @mastra/otel-exporter@1.4.10-alpha.2 ## @mastra/posthog@1.4.4-alpha.2 ## @mastra/sentry@1.2.29-alpha.2 ## @mastra/agent-builder@1.1.31-alpha.2 ## @mastra/auth@1.1.5-alpha.0 ## mastra@1.36.0-alpha.4 ## @mastra/codemod@1.1.8-alpha.0 ## create-mastra@1.36.0-alpha.4 ## @mastra/deployer@1.80.0-alpha.4 ## @mastra/editor@0.16.5-alpha.2 ## @mastra/evals@1.10.9-alpha.0 ## @mastra/fastembed@1.3.5-alpha.2 ## @mastra/loggers@1.3.10-alpha.1 ## @mastra/mcp@2.6.0-alpha.1 ## @mastra/mcp-docs-server@1.3.10-alpha.7 ## @mastra/mcp-registry-registry@1.1.7-alpha.0 ## @mastra/memory@1.39.1-alpha.2 ## @mastra/rag@2.7.1-alpha.0 ## @mastra/schema-compat@1.3.17-alpha.0 ## @mastra/server@1.80.0-alpha.4 ## @mastra/google-cloud-pubsub@1.1.5-alpha.1 ## @mastra/redis-streams@0.6.5-alpha.1 ## @mastra/valkey-streams@0.5.7-alpha.1 ## @mastra/elysia@0.1.20-alpha.4 ## @mastra/express@1.5.24-alpha.4 ## @mastra/fastify@1.5.24-alpha.4 ## @mastra/hono@1.7.22-alpha.4 ## @mastra/koa@1.7.24-alpha.4 ## @mastra/nestjs@0.2.39-alpha.4 ## @mastra/next@0.2.38-alpha.4 ## @mastra/server-adapters-test-suite@0.1.4-alpha.2 ## @mastra/tanstack-start@0.2.38-alpha.4 ## @mastra/astra@1.1.3-alpha.0 ## @mastra/azure-ai-search@0.1.2-alpha.1 ## @mastra/chroma@1.1.5-alpha.0 ## @mastra/clickhouse@1.27.0-alpha.1 ## @mastra/cloudflare@1.7.6-alpha.0 ## @mastra/cloudflare-d1@1.4.5-alpha.1 ## @mastra/convex@1.7.6-alpha.0 ## @mastra/couchbase@1.1.4-alpha.1 ## @mastra/dsql@1.5.5-alpha.0 ## @mastra/duckdb@1.16.0-alpha.1 ## @mastra/dynamodb@1.4.5-alpha.1 ## @mastra/elasticsearch@1.4.6-alpha.1 ## @mastra/lance@1.5.2-alpha.1 ## @mastra/libsql@1.27.1-alpha.0 ## @mastra/mongodb@1.24.1-alpha.1 ## @mastra/mssql@1.10.6-alpha.0 ## @mastra/mysql@0.14.1-alpha.0 ## @mastra/opensearch@1.1.4-alpha.1 ## @mastra/oracledb@0.5.5-alpha.0 ## @mastra/pg@1.33.0-alpha.2 ## @mastra/pinecone@1.1.3-alpha.0 ## @mastra/qdrant@1.1.6-alpha.0 ## @mastra/redis@1.4.12-alpha.1 ## @mastra/s3vectors@1.1.5-alpha.0 ## @mastra/spanner@1.10.1-alpha.1 ## @mastra/turbopuffer@1.2.3-alpha.0 ## @mastra/turso@0.1.18-alpha.0 ## @mastra/upstash@1.5.5-alpha.1 ## @mastra/valkey@0.2.8-alpha.1 ## @mastra/vectorize@1.1.4-alpha.0 ## @mastra/weaviate@0.1.4-alpha.0 ## @mastra/voice-aws-nova-sonic@0.2.6-alpha.0 ## @mastra/voice-azure@0.12.3-alpha.0 ## @mastra/voice-cloudflare@0.13.4-alpha.0 ## @mastra/voice-deepgram@0.13.3-alpha.0 ## @mastra/voice-elevenlabs@0.13.3-alpha.0 ## @mastra/voice-gladia@0.13.3-alpha.0 ## @mastra/voice-google@0.14.4-alpha.0 ## @mastra/voice-google-gemini-live@0.14.18-alpha.0 ## @mastra/voice-inworld@0.4.6-alpha.0 ## @mastra/voice-mistral@0.1.3-alpha.0 ## @mastra/voice-modelslab@0.2.3-alpha.0 ## @mastra/voice-murf@0.13.3-alpha.0 ## @mastra/voice-openai@0.13.4-alpha.0 ## @mastra/voice-openai-realtime@0.14.8-alpha.0 ## @mastra/voice-playai@0.13.3-alpha.0 ## @mastra/voice-sarvam@1.1.4-alpha.0 ## @mastra/voice-speechify@0.14.3-alpha.0 ## @mastra/voice-xai-realtime@0.2.17-alpha.0 ## @mastra/inngest@1.10.8-alpha.3 ## @mastra/temporal@0.4.18-alpha.4 ## @mastra/agentcore@0.5.3-alpha.0 ## @mastra/agentfs@0.2.3-alpha.0 ## @mastra/apple-container@0.5.2-alpha.0 ## @mastra/archil@0.3.2-alpha.0 ## @mastra/azure@0.3.3-alpha.1 ## @mastra/blaxel@0.10.2-alpha.0 ## @mastra/cloudflare-sandbox@0.5.4-alpha.0 ## @mastra/daytona@0.11.4-alpha.0 ## @mastra/docker@0.12.1-alpha.0 ## @mastra/e2b@0.15.1-alpha.1 ## @mastra/e2b-desktop@0.1.10-alpha.1 ## @mastra/files-sdk@0.3.3-alpha.0 ## @mastra/gcs@0.3.5-alpha.1 ## @mastra/google-drive@0.2.4-alpha.0 ## @mastra/mesa@0.3.3-alpha.0 ## @mastra/modal@0.7.3-alpha.0 ## @mastra/platform-workspace@1.10.0-alpha.1 ## @mastra/railway@0.10.2-alpha.1 ## @mastra/s3@0.6.5-alpha.1 ## @mastra/sprites@0.1.2-alpha.0 ## @mastra/vercel@1.6.2-alpha.0 ## @internal/playground@1.36.0-alpha.4 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
ce5d4731ee |
chore(deps): update dependencies across the monorepo (#28417)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
40a522c142 |
chore(deps): update build tools (#27997) | ||
|
|
4c22623ea3 | chore: version - exit prerelease mode | ||
|
|
98e53f781c | chore: version packages | ||
|
|
f3cf77305f |
security: Vanta remediation (2026-10-20) (#27828) | ||
|
|
a15924e709 | chore: version packages | ||
|
|
b10b70fd77 | chore: version - exit prerelease mode | ||
|
|
2a478e00a1 | chore: version packages | ||
|
|
6babc6d526 |
fix(channels): honor MASTRA_SERVER_URL for public base-URL derivation (#26026)
## Summary Deployed Mastra servers bind an address like `0.0.0.0:3000` that is never publicly reachable, but the Slack/Telegram/Teams channel providers derive OAuth callback and webhook URLs from the server bind config when no explicit public URL is configured. In practice that broke every channel on a deployed server: - **Slack** minted app manifests with `http://0.0.0.0:3000/slack/oauth/callback` as the OAuth redirect, stranding users on an unreachable URL after authorizing. - **Telegram** `setWebhook` failed with `Bad Request: bad webhook: An HTTPS URL must be provided for webhook`. - **Teams** registered unreachable Bot Framework messaging endpoints. The only workaround was passing `server: { studioHost, studioProtocol, studioPort }` to the `Mastra` instance by hand. ## Change All three providers now consult the **`MASTRA_SERVER_URL`** environment variable — the server's public URL, which deployment platforms can inject on every deploy — in their base-URL derivation. Precedence (most to least specific): 1. Explicit `baseUrl` provider config 2. `server.studioHost` / `studioProtocol` / `studioPort` overrides on the Mastra instance 3. `MASTRA_SERVER_URL` env var 4. Bind host/port derivation (unchanged) Existing setups are unaffected: the env var only applies when neither an explicit `baseUrl` nor a `server.studio*` override is present. Note: on Mastra platform deploys the server and studio have distinct public URLs — webhooks and OAuth callbacks must target the **server** URL (the studio URL sits behind platform auth, which would reject vendor callbacks). A companion platform change injects `MASTRA_SERVER_URL` with the server-domain URL. ## Test plan - `@mastra/slack` 94/94 (new: manifest minted against `MASTRA_SERVER_URL`; `server.studio*` beats the env var) - `@mastra/telegram` 73/73 (new: `setWebhook` registered against `MASTRA_SERVER_URL`; `server.studio*` beats the env var) - `@mastra/teams` 47/47 (new: messaging endpoint registered against `MASTRA_SERVER_URL`) - `tsc --noEmit` clean on all three packages <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 When a channel needs a public URL, it can now use `MASTRA_SERVER_URL` instead of guessing from the server’s local address. This helps Slack, Telegram, and Teams reach deployed endpoints. ## Summary - Slack, Telegram, and Teams use the trimmed `MASTRA_SERVER_URL` when no provider `baseUrl` or `server.studio*` override is configured. - Explicit provider `baseUrl` and `server.studio*` settings keep precedence. If the environment URL is not used, providers retain their existing server-derived URL behavior. - Added tests for environment URL use and precedence, and a changeset for patch releases of all three packages. Test results and current review finding counts were not provided. <!-- end of auto-generated comment: release notes by coderabbit.ai --> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
f8d0bacdd0 |
chore: version packages (alpha) (#25721)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
8a5278a8ab |
fix(channels): surface channel connection state correctly in studio (#25993)
## Summary Connecting an agent to a Telegram or Discord channel from studio looked broken even when the platform connection was healthy: Telegram showed a "Not configured" badge, and Discord never flipped to "Connected" after the operator authorized the bot. This PR fixes all three compounding causes so channel state in studio reflects reality. **@mastra/telegram — "Not configured" despite a working credential** `getInfo().isConfigured` only became true once an active installation existed, ignoring the credential source entirely. A Telegram channel backed by a platform credential (tokenResolver) or a configured bot token was fully ready to connect but still rendered as unconfigured. `getInfo()` now counts a credential source as configured, matching Discord's existing behavior. **@mastra/discord — installs stuck "pending" forever** The bot-invite URL carries no `redirect_uri`. Each user configures their own Discord app, so they *could* register one — but they shouldn't have to, and today nothing does, so nothing calls back when authorization completes. A pending install also has no adapter, so no interaction could activate it either. `connect()` now snapshots the bot's guild membership when it issues an invite, and `listInstallations()` reconciles: when exactly one guild has appeared since the snapshot (and no other pending install could claim it), the install activates through the same path as a first interaction. Ambiguous diffs (zero or multiple new guilds, unknown membership) stay pending and keep the existing first-interaction activation as the fallback. **Studio — OAuth navigated the current tab away** The oauth connect result redirected the studio tab itself to the authorization URL, stranding the user on the provider's success page and destroying the tab whose focus-return would have refetched installations. The oauth result now opens in a new tab (with a popup-blocked toast on failure), like deep links already did. Returning to the studio tab fires React Query's window-focus refetch of the installations query, which triggers the Discord reconcile server-side and flips the badge to "Connected". ## Test plan - `@mastra/telegram`: 71/71 tests pass, including new cases asserting `isConfigured` is true with a bot token or token resolver and false with neither. - `@mastra/discord`: 69/69 tests pass, including 7 new reconcile tests covering snapshot capture, single-new-guild activation, ambiguous diffs, multi-claimant conflicts, membership-fetch failures, and snapshot clearing. - Playground: 22/22 MSW tests pass across publish-channel-dialogs, connect-channel-message, and integrations suites, updated to assert the new-tab oauth behavior and the popup-blocked toast. - Typecheck and lint clean for all three packages; changesets added for `@mastra/telegram` and `@mastra/discord`. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 Studio can now show more accurate channel connection status. Telegram credentials count as configured before the first connection. For Discord, Studio can ask the server to check whether a pending invite finished, and the server only connects it when the guild can be identified safely. ## Changes - **Telegram:** `getInfo().isConfigured` now uses `isConfigured()`. It returns true when an installation is active or when `botToken` or `tokenResolver` is set. - **Discord:** Pending installs record a guild snapshot and related invite details. `listInstallations()` is a read; `reconcileInstallation(agentId)` explicitly checks pending installs and activates only safely attributed guilds. Snapshots expire after 30 minutes and are tied to the application credential. Ambiguous cases remain pending for activation on first interaction. - **Reconciliation API:** Added `POST /channels/:platform/:agentId/reconcile` and client methods to request reconciliation. The React hook refreshes installation data after reconciliation. - **Studio OAuth:** Discord opens a tab during the user action and then navigates it to the authorization URL. Slack uses the current tab. If opening a tab fails, the flow tries another tab and then current-tab navigation. Immediate results and errors close an unused pre-opened tab. - **Focus handling:** Studio reconciles pending installs on window focus only while a pending install exists. The installations query no longer refetches on every focus. - **Microsoft Teams icon:** Studio now renders an icon for the `teams` platform ID. ## Tests and checks The supplied objectives report 71/71 Telegram tests, 69/69 Discord tests, and 22/22 Playground MSW tests passing. They also report clean typecheck and lint results. These results were not independently verified. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
41461bda6d |
fix(ci): unbreak unit and qdrant store suites under the undici 8 override (#25864)
Two CI failures trace back to the same place: forcing undici 8.11.2 repo-wide in #25853. The channel provider tests (telegram 32, teams 9, plus discord 13 which was broken the same way) captured the mock request body with `JSON.parse(String(opts.body))`. undici 8 stopped handing reply callbacks the raw string body — it arrives as a chunk array or async iterable — so the parse threw on "[object Object]" inside the mock reply, the fetch rejected, and the tests hung until the 5s timeout. Reply callbacks are now async and read the body through a small helper: ```ts .reply(200, async opts => { captured = JSON.parse(await readMockBody(opts.body)); return { ok: true, result: true }; }) ``` The qdrant store tests failed with `UND_ERR_INVALID_ARG` because `@qdrant/js-client-rest` imports undici itself and passes an Agent as `dispatcher` to global fetch. That paired an undici 8 dispatcher with the undici 7.x Node bundles for fetch, and undici 8 rejects the handler ("invalid onRequestStart method"). The blanket `undici@<8.11.2: 8.11.2` override ignored the client's declared `^6.24.0` range, so this puts that one consumer back: ```yaml '@qdrant/js-client-rest>undici': 6.29.0 ``` Everything else stays on 8.11.2, and 6.29.0 has no known advisories — though Vanta should sign off on the exemption since their rule was the reason for the blanket pin. Test plan: ran each affected suite locally — telegram 69/69, teams 46/46, discord 63/63, qdrant 235/235 (all red before), with tsc and oxfmt clean on the changed files. No changeset: the test files aren't published, and pnpm-workspace.yaml is repo config. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 Undici changed how some test tools provide request data, which caused several tests to fail when they tried to read it. This PR updates the tests to read that data correctly and keeps the Qdrant client on a compatible Undici version. ## Changes - Updated Telegram, Teams, and Discord test callbacks to read request bodies from strings, byte arrays, chunk arrays, and async iterables before parsing them. The helpers join byte chunks before decoding them as UTF-8. - Added a package-specific override so `@qdrant/js-client-rest` uses Undici 6.29.0. Other consumers remain subject to the existing Undici 8.11.2 override. ## Validation The PR author reports that the affected suites pass: Telegram 69/69, Teams 46/46, Discord 63/63, and Qdrant 235/235. The author also reports clean `tsc` and `oxfmt` checks on the changed files. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
4358322b7b |
chore(deps): override upstream-blocked vulnerable transitive deps (#25853) | ||
|
|
8b35a6c1d6 | chore: version - exit prerelease mode | ||
|
|
de967f00ab | chore: version packages | ||
|
|
0718aaccc1 |
fix(telegram): reject connecting one bot to two agents in polling mode (#25645)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
b782191b6c | chore: version packages | ||
|
|
bc826e8fb1 |
refactor: use Web Crypto where synchronous contracts stay intact (#25462)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
5306a14346 | chore: version - exit prerelease mode | ||
|
|
a821a5b721 |
chore: version packages (alpha) (#25388)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
1eccabc1b9 |
feat: delegated Telegram bot token resolution via the platform (#25272)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
6721bffd7e | chore: version - exit prerelease mode | ||
|
|
87960fc4bb |
chore: version packages (alpha) (#24968)
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/discord@1.1.0-alpha.0 ## @mastra/client-js@1.50.0-alpha.1 ## @mastra/connect@0.4.0-alpha.0 ## @mastra/core@1.71.0-alpha.1 ## @mastra/playground-ui@59.0.0-alpha.1 ## @mastra/server@1.71.0-alpha.1 ## @mastra/telegram@0.1.3-alpha.0 ## @mastra/ai-sdk@1.10.5-alpha.0 ## @mastra/react@1.6.3-alpha.1 ## @mastra/deployer-cloud@1.71.0-alpha.1 ## @mastra/longmemeval@1.1.30-alpha.1 ## @mastra/opencode@0.1.30-alpha.1 ## @mastra/factory@0.17.2-alpha.1 ## create-factory@0.2.3-alpha.1 ## @mastra/code-sdk@1.8.3-alpha.1 ## mastracode@0.42.2-alpha.1 ## @mastra/arize@1.3.19-alpha.0 ## @mastra/arthur@0.4.19-alpha.0 ## @mastra/braintrust@1.3.16-alpha.0 ## @mastra/datadog@1.4.11-alpha.0 ## @mastra/deepeval@0.1.13-alpha.0 ## @mastra/laminar@1.3.21-alpha.0 ## @mastra/langfuse@1.5.10-alpha.0 ## @mastra/langsmith@1.3.21-alpha.0 ## @mastra/observability@1.18.1-alpha.0 ## @mastra/otel-bridge@1.5.11-alpha.1 ## @mastra/otel-exporter@1.4.2-alpha.0 ## @mastra/posthog@1.3.13-alpha.0 ## @mastra/sentry@1.2.21-alpha.0 ## @mastra/agent-builder@1.1.22-alpha.0 ## mastra@1.31.3-alpha.1 ## @mastra/deployer@1.71.0-alpha.1 ## @mastra/editor@0.15.3-alpha.0 ## @mastra/fastembed@1.3.2-alpha.0 ## @mastra/mcp-docs-server@1.3.1-alpha.2 ## @mastra/memory@1.32.1-alpha.0 ## @mastra/elysia@0.1.11-alpha.1 ## @mastra/express@1.5.15-alpha.1 ## @mastra/fastify@1.5.15-alpha.1 ## @mastra/hono@1.7.13-alpha.1 ## @mastra/koa@1.7.15-alpha.1 ## @mastra/nestjs@0.2.30-alpha.1 ## @mastra/next@0.2.29-alpha.1 ## @mastra/tanstack-start@0.2.29-alpha.1 ## @mastra/clickhouse@1.21.1-alpha.0 ## @mastra/duckdb@1.11.1-alpha.1 ## @mastra/libsql@1.23.3-alpha.0 ## @mastra/mysql@0.10.2-alpha.0 ## @mastra/oracledb@0.4.1-alpha.0 ## @mastra/pg@1.27.1-alpha.0 ## @mastra/spanner@1.8.2-alpha.0 ## @mastra/turso@0.1.9-alpha.0 ## @mastra/temporal@0.4.9-alpha.1 ## create-mastra@1.31.3-alpha.1 ## @internal/playground@1.31.3-alpha.1 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
1640470792 |
feat(connect): channels() resolver for Slack, Telegram, Discord (#24912)
## Summary Adds `channels()` as the second top-level function in `@mastra/connect`, alongside `tools()` (renamed from `connect()`). Segment 01 of the two-segment `@mastra/connect` channels launch; segment 02 adds README + changeset ([#24913](https://github.com/mastra-ai/mastra/pull/24913) via `feat/connect-channels-docs`). At runtime, `channels()` resolves each channel-capable project connection into a `ChannelProvider` instance from `@mastra/{slack,telegram,discord}` and returns the `Record<string, ChannelProvider>` shape that `Mastra({ channels })` already accepts: ```ts import { Mastra } from '@mastra/core/mastra'; import { Agent } from '@mastra/core/agent'; import { openai } from '@ai-sdk/openai'; import { tools, channels } from '@mastra/connect'; const pat = new Agent({ name: 'Pat', instructions: 'You are Pat.', model: openai('gpt-4o'), tools: tools({ projectId }), }); export const mastra = new Mastra({ agents: { pat }, channels: await channels({ projectId }), }); ``` Launch ships three providers, each returning the corresponding first-party `ChannelProvider` — same shape as if the user constructed it by hand: | Provider | Peer package | Return | | ---------- | -------------------- | -------------------------------------------------------------------------------------------- | | `slack` | `@mastra/slack` | `new SlackProvider({ refreshToken, ...providerOptions })` | | `telegram` | `@mastra/telegram` | `new TelegramProvider({ botToken, ...providerOptions })` | | `discord` | `@mastra/discord` | `new DiscordProvider({ app: { botToken, applicationId, publicKey }, ...providerOptions })` | ## What's in this PR - **`@mastra/connect` — `channels(options)`**. Mirrors `environment()` / `tools()`: pinned `connectionId`, per-integration `providerOptions`, `disabled` opt-out, snapshot cache with `ttlMs` + stale-serve on outage, and `invalidate()` / `refresh()` / `disconnect()` handles on the resolver. Return value is callable with `({ requestContext, mastra })` and thenable, so `await channels({ projectId })` yields `Record<string, ChannelProvider>` directly. - **Reserved `providerOptions`**. Credentials and framework-managed fields are locked down per provider — passing them via `providerOptions` is rejected at compile time (typed `Omit<>` on the per-integration options) and stripped at runtime with a warning. Slack reserves `baseUrl`/`token`/`refreshToken`/`encryptionKey`; Telegram reserves `baseUrl`/`apiBaseUrl`/`botToken`/`encryptionKey`; Discord reserves `baseUrl`/`botToken` (`applicationId` and `publicKey` are **not** reserved — they're non-secret metadata the app can override). - **Ambiguity handling**. When more than one active connection exists for the same provider and no pin is set, `channels()` picks the first active connection and logs a warning naming the chosen id and the ignored ids. No `envVar` fallback — pin explicitly with `integrations.<id>.connectionId` when the choice matters. - **`@mastra/connect` — `ChannelProviderRegistration` + `CHANNELS` registry**. Hand-maintained registry with three entries; each `build()` reads the credential (plus optional metadata for Discord's `applicationId`/`publicKey`), strips reserved options, and constructs the corresponding `ChannelProvider`. - **Optional peer deps**. `@mastra/{slack,telegram,discord}` sit under `peerDependencies` with `peerDependenciesMeta.<name>.optional = true`, and each `build()` imports its peer via a literal `await import()` (deployer bundlers see the specifier). A missing peer is downgraded to a warn-and-skip so the rest of the provider map keeps working. - **`@mastra/telegram` — construction-time `botToken`**. `TelegramProvider` now accepts `botToken` in its config, auto-installs a shared bot on `__attach()`, and `configure({ botToken })` rotates the credential — same shape as `SlackProvider.configure({ refreshToken })`. `connect()` falls back to the construction-time token when the caller doesn't supply one. Two colocated regression tests. ## Tests - **`@mastra/connect`** — 20 tests in `packages/connect/src/__tests__/channels.test.ts` cover startup validation (`projectId` + `ttlMs`), resolver shape (callable + thenable + handles), single-active resolution, pinned `connectionId` (both valid and mismatched), multi-connection ambiguity → warn + use first (asserts warning names chosen + ignored ids), `needs_reauth` → skip, `disabled: true` → skip, `providerOptions` merging into constructor call, **reserved-field stripping** (asserts framework-managed fields never reach the provider constructor and each strip logs), cache + `invalidate()` + `refresh()`, stale-serve on platform outage, all three provider contributors constructing with the right credential shape, and multi-provider resolution. - **Type-level** — `packages/connect/src/channels.test-d.ts` asserts `ChannelsResolver` is assignable to what `Mastra({ channels })` accepts, and `@ts-expect-error` markers assert reserved fields are rejected at compile time (nine markers across all three providers). - **`@mastra/telegram`** — 2 new tests in the sibling package cover the construction-time `botToken` + `configure()` rotation paths. **All gates green** on the whole stack: `@mastra/connect` 209/209 ✓, `@mastra/telegram` 47/47 ✓, `@mastra/slack` 67/67 ✓, `@mastra/discord` 55/55 ✓. Typecheck, lint (0/0), and build clean across the stack. ## Non-goals for this PR (per plan) - Docs and changeset — segment 02 (`feat/connect-channels-docs`, PR #24913). - Live smoke tests — segment 02, real workspace round-trip against Slack + Telegram + Discord. - New adapter packages — Connect wraps existing `@mastra/{slack,telegram,discord}` providers; no reimplementation. ## Related - Base branch: `feat/mastra-discord-rebased` ([#25002](https://github.com/mastra-ai/mastra/pull/25002)) — rebase-and-revive of the original `@mastra/discord` provider from #21177. - Docs PR: `feat/connect-channels-docs` — stacked on this branch. Ship deadline: Wednesday, Sep 30 as part of the Connect launch. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 This PR helps Mastra connect agents to Slack, Telegram, and Discord using saved project connections. It also adds tools for passing connection credentials into sandboxes and lets Telegram use a default bot token. ## Summary - Add `channels()` to `@mastra/connect`. It builds Slack, Telegram, and Discord channel providers from active project connections. It supports connection selection, provider options, caching, refresh, invalidation, and skipping unavailable optional adapters with a warning. - Update `@mastra/core` to accept deferred channel configuration and resolve it during registration. Add a readiness gate so deferred resolutions complete before API routes are captured. - Add a default `botToken` to Telegram provider configuration. A token passed to `connect()` takes precedence. - Add `environment()` to `@mastra/connect` for exposing project connection credentials to sandbox processes. GitHub credentials map to `GH_TOKEN` and `GITHUB_TOKEN`; its start hook configures Git credential access. - Rename the tools resolver API to `tools()` and retain `connect()` and `PROVIDERS` as deprecated compatibility aliases. - Add provider type checks and tests for channel resolution, sandbox environments, resolver aliases, and Telegram token behavior. ## Validation The author reports that Connect and Core tests, type checks, lint, and build checks passed. These results were not independently verified. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Mastra Code (anthropic/claude-opus-4-7) <noreply@mastra.ai> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
429d7b9f93 | chore: version - exit prerelease mode | ||
|
|
adf6cc46fb | chore: version packages | ||
|
|
164e197aa5 |
fix: bump vulnerable dependencies to patched releases (#24027)
Co-authored-by: Cursor Agent <cursoragent@cursor.com> |
||
|
|
acfb794929 |
fix(ci): discover omitted Vitest projects in root test runs (#23965) | ||
|
|
c19a93b095 | chore: version - exit prerelease mode | ||
|
|
e6de774069 | chore: version packages | ||
|
|
e983f74987 |
chore(*): Update/unify/add READMEs (#22858)
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai> |
||
|
|
fc968c8a9b | chore: version packages | ||
|
|
28ce924276 |
chore(*): Remove CHANGELOG.md from npm files (#22737) | ||
|
|
d50fe06cbf |
chore: upgrade monorepo to TypeScript 7 (#22459)
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai> |
||
|
|
387c6b7f5a | chore: version - exit prerelease mode | ||
|
|
5876d1c77a |
chore: version packages (alpha) (#21059)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
6d845e9d30 |
Unbreak the telegram package build on main (#21098)
Co-authored-by: Mastra Code (anthropic/claude-opus-5) <noreply@mastra.ai> |
||
|
|
bdcb81d9c6 |
feat(channels): add @mastra/telegram channel provider (#19975)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com> Co-authored-by: Mastra Code <noreply@mastra.ai> |