mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
115 commits
| Author | SHA1 | Message | Date | |
|---|---|---|---|---|
|
|
d60ba71be0 | chore: version - exit prerelease mode | ||
|
|
5c87442ed7 |
chore: version packages (alpha) (#30203)
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-auth0@1.3.0-alpha.0 ## @mastra/auth-clerk@1.4.0-alpha.0 ## @mastra/auth-okta@0.3.0-alpha.0 ## @mastra/auth-supabase@1.2.0-alpha.0 ## @mastra/client-js@1.60.0-alpha.13 ## @mastra/auth@1.2.0-alpha.0 ## @mastra/core@1.83.0-alpha.13 ## @mastra/playground-ui@69.0.0-alpha.15 ## @mastra/rag@2.8.0-alpha.3 ## @mastra/server@1.83.0-alpha.13 ## @mastra/server-adapters-test-suite@0.3.0-alpha.5 ## @mastra/auth-better-auth@1.1.11-alpha.2 ## @mastra/auth-cloud@1.2.9-alpha.0 ## @mastra/auth-neon@0.3.6-alpha.1 ## @mastra/auth-workos@1.6.9-alpha.0 ## @mastra/discord@1.3.4-alpha.0 ## @mastra/react@1.15.0-alpha.13 ## @mastra/deployer-cloud@1.83.0-alpha.13 ## @mastra/deployer-cloudflare@1.2.42-alpha.3 ## @mastra/deployer-netlify@1.2.42-alpha.1 ## @mastra/deployer-sandbox@0.3.27-alpha.1 ## @mastra/deployer-vercel@1.2.42-alpha.1 ## @mastra/longmemeval@1.1.42-alpha.13 ## @mastra/opencode@0.1.42-alpha.13 ## @mastra/factory@0.28.0-alpha.15 ## create-factory@0.4.3-alpha.15 ## @mastra/code-sdk@1.19.0-alpha.15 ## mastracode@0.50.0-alpha.14 ## @mastra/agent-builder@1.2.1-alpha.5 ## mastra@1.39.0-alpha.15 ## @mastra/connect@1.4.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.13 ## @mastra/editor@0.17.1-alpha.7 ## @mastra/mcp@2.9.0-alpha.5 ## @mastra/mcp-docs-server@1.3.13-alpha.17 ## @mastra/memory@1.41.1-alpha.5 ## @mastra/schema-compat@1.4.0-alpha.2 ## @mastra/elysia@0.1.23-alpha.13 ## @mastra/express@1.5.27-alpha.13 ## @mastra/fastify@1.5.27-alpha.13 ## @mastra/hono@1.7.25-alpha.13 ## @mastra/koa@1.7.27-alpha.13 ## @mastra/nestjs@0.3.0-alpha.13 ## @mastra/next@0.2.41-alpha.13 ## @mastra/tanstack-start@0.2.41-alpha.13 ## @mastra/voice-google-gemini-live@0.14.19-alpha.2 ## @mastra/voice-openai-realtime@0.14.9-alpha.3 ## @mastra/voice-xai-realtime@0.2.18-alpha.2 ## @mastra/inngest@1.11.2-alpha.9 ## @mastra/temporal@0.6.0-alpha.13 ## create-mastra@1.39.0-alpha.15 ## @internal/playground@1.39.0-alpha.15 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
8d4abc4f88 |
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) | ||
|
|
1892f79532 |
chore: remove stale scripts, workspace entries and package metadata (#29891)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
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>
|
||
|
|
6deb16047f |
chore: version packages (alpha) (#29719)
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/slack@1.9.0-alpha.0 ## @mastra/factory@0.28.0-alpha.3 ## @mastra/code-sdk@1.19.0-alpha.3 ## mastracode@0.50.0-alpha.3 ## @mastra/observability@1.24.0-alpha.2 ## @mastra/core@1.83.0-alpha.3 ## @mastra/mcp-apps-components@0.1.0-alpha.3 ## @mastra/playground-ui@69.0.0-alpha.4 ## @mastra/server@1.83.0-alpha.3 ## @mastra/server-adapters-test-suite@0.3.0-alpha.1 ## @mastra/platform-workspace@1.13.0-alpha.0 ## @mastra/auth-better-auth@1.1.11-alpha.1 ## @mastra/client-js@1.60.0-alpha.3 ## @mastra/react@1.15.0-alpha.3 ## @mastra/deployer-cloud@1.83.0-alpha.3 ## @mastra/longmemeval@1.1.42-alpha.3 ## @mastra/opencode@0.1.42-alpha.3 ## create-factory@0.4.3-alpha.3 ## @mastra/arize@1.3.30-alpha.2 ## @mastra/arthur@0.4.30-alpha.2 ## @mastra/braintrust@1.3.27-alpha.2 ## @mastra/datadog@1.4.22-alpha.2 ## @mastra/deepeval@0.1.24-alpha.2 ## @mastra/laminar@1.3.32-alpha.2 ## @mastra/langfuse@1.6.6-alpha.2 ## @mastra/langsmith@1.4.3-alpha.2 ## @mastra/otel-bridge@1.5.22-alpha.2 ## @mastra/otel-exporter@1.5.2-alpha.2 ## @mastra/posthog@1.4.7-alpha.2 ## @mastra/sentry@1.2.32-alpha.2 ## @mastra/agent-builder@1.2.1-alpha.1 ## mastra@1.39.0-alpha.3 ## @mastra/connect@1.3.2-alpha.2 ## @mastra/deployer@1.83.0-alpha.3 ## @mastra/editor@0.17.1-alpha.2 ## @mastra/fastembed@1.3.7-alpha.0 ## @mastra/mcp-docs-server@1.3.13-alpha.6 ## @mastra/memory@1.41.1-alpha.1 ## @mastra/elysia@0.1.23-alpha.3 ## @mastra/express@1.5.27-alpha.3 ## @mastra/fastify@1.5.27-alpha.3 ## @mastra/hono@1.7.25-alpha.3 ## @mastra/koa@1.7.27-alpha.3 ## @mastra/nestjs@0.3.0-alpha.3 ## @mastra/next@0.2.41-alpha.3 ## @mastra/tanstack-start@0.2.41-alpha.3 ## @mastra/convex@1.8.1-alpha.0 ## @mastra/pg@1.36.0-alpha.2 ## @mastra/inngest@1.11.2-alpha.2 ## @mastra/temporal@0.6.0-alpha.3 ## create-mastra@1.39.0-alpha.3 ## @internal/playground@1.39.0-alpha.3 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
ac2a6401a0 |
feat(channels): experimental generative UI cards for Slack (#29820)
> Opened by @DSchau ## What Adds an experimental, opt-in `generativeUI` option for the **Slack** channel adapter. When set, agent runs on Slack get a `render_card` tool: the agent passes a [json-render](https://json-render.dev) spec and the card is posted to the thread as Block Kit (header, fields, `data_table`, charts, images, link buttons). Slack is the only platform this has been tested on, so the option is ignored on every other adapter. ```ts channels: { adapters: { slack: { adapter: createSlackAdapter(), generativeUI: true }, }, } ``` Off by default. `createSlackAdapter` comes from upstream `@chat-adapter/slack`, so the flag lives on Mastra's per-adapter config rather than the adapter factory. ## How - New `ChatChannelGenerativeUIProcessor` (`packages/core/src/channels/generative-ui.ts`), auto-added by `AgentChannels.getInputProcessors()` when the Slack adapter opts in. It adds `render_card` per step only for Slack runs with `generativeUI` on, so users don't wire tools by hand. Independent of `threadContext.addSystemMessage`. - `render_card` validates via `@json-render/chat`'s `toCard` with Slack limits (1 table, 100 rows, 20 columns, 10 fields, 2 charts, 20 chart points, 20-char chart labels, 50-char chart titles, 12 series). Invalid specs return `{ ok: false, issues }` without posting so the model can fix and retry; success returns `{ ok: true, messageId }`. - Slack fallbacks `toCard` limits don't cover (duplicate chart categories or series names, axis labels over 50 chars, tables over 10,000 cell chars) are also returned as issues. Without this the Slack adapter quietly downgrades the chart or table to a text block while the tool reports `ok: true`. - Tool description is a short component list plus the few Slack rules that cause rejected or degraded cards (no empty strings, mrkdwn, table/field/chart caps, public image URLs, unique link URLs). The stock `catalog.prompt()` is ~13k chars and targets JSONL-patch streaming, which doesn't fit a tool call. - `Button` is left out of the catalog: generic button clicks have no handler yet (only approval buttons are wired). `LinkButton` is kept. - `render_card` is added to `channelToolNames` so drivers don't also render a tool card for it. - `@json-render/chat` is an **optional peer** of `@mastra/core`, lazy-loaded with a literal dynamic import (same pattern as `chat-lazy.ts`), with a clear error if missing. It needs zod 4. **Reviewers: flag if a new optional peer on core is not OK.** - `@mastra/slack`'s `SlackAdapterChannelConfig` gets the same field, so Factory's `SlackIntegration({ adapterOptions: { generativeUI: true } })` works with no further changes. ## Not in this PR - Streaming a card in as it's generated (`streamCard`) - Interactive `Button`s with `onAction` routing ## Test plan - [x] `generative-ui.test.ts` uses the real json-render converters: tool injection, opt-out, non-channel runs, memory-thread fallback (cached), valid post, invalid spec / excluded `Button`, Slack table limit, post failure - [x] Agent-loop test in `integration.test.ts`: the model sees `render_card`, calls it, and the card is posted - [x] `getInputProcessors` tests: added when Slack opts in (even with `addSystemMessage: false`), absent by default, ignored on non-Slack adapters - [x] All 638 channel tests pass, `tsc --noEmit` clean for core and `@mastra/slack` - [ ] Beta Slack: snapshot this branch, set `adapterOptions: { generativeUI: true }` + add `@json-render/chat` in shipyard-beta, and ask for a status card <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This adds an optional way for a Slack agent to create and post structured cards, such as tables and charts. If a card is invalid or too large, the agent receives feedback so it can correct the card. ## Changes - Added the experimental `generativeUI` option for Slack. It is off by default and does not enable the feature on other adapters. - Added the `render_card` tool and input processor. When enabled, the tool converts a json-render spec to a Slack Block Kit card and posts it to the thread. - Added card validation. Invalid specs and cards that exceed supported limits return issues without posting; posting failures return an error. - Added optional `@json-render/chat` dependency support and documentation for setup and supported components. - Added unit and integration tests for opt-in behavior, card posting, validation, and failures. **Diff:** 14 files changed; 674 lines added and 7 removed. **Test and build results:** Not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com> Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
f21e0742ce | chore: version packages | ||
|
|
579eb0744b |
fix(teams): tolerate undecryptable install-store records (#29534)
## Summary A Teams channel installation whose stored bot credential can no longer be decrypted (e.g. `MASTRA_ENCRYPTION_KEY` changed after the bot was provisioned) crashed the runtime at boot and left no recovery path: - `TeamsInstallStore.list()` threw from `TeamsProvider.initialize()` on the first undecryptable row, so every deploy crashed (`Error: Unsupported state or unable to authenticate data`). - `disconnect()` hit the same throw via `getByAgent()` before reaching `deleteInstallation()`, so the orphaned record could never be purged and kept crashing subsequent deploys. This caused a production incident on Nov 5 where a project with a Teams channel could not deploy after its encryption key was edited. ## Fix Decrypt failures are now caught per record in the install store. An unreadable installation is returned with `secretUnreadable: true` and `appPassword` undefined (non-secret fields preserved), with an actionable error logged once per record. Boot skips activating unreadable installs, webhooks addressed to them return 404, and disconnect can find and delete the record so reconnecting re-provisions the bot cleanly. ## Test plan - New `install-store.test.ts`: round-trip under one key; wrong-key `list()` marks records unreadable without throwing; error logged once per record across reads; no-key reads marked unreadable; `deleteByAgent` removes unreadable rows. - `teams-provider.test.ts`: records seeded under a lost key — `initialize()` resolves instead of crashing; `disconnect()` deletes the record. - `@mastra/teams` vitest 55/55, `tsc --noEmit` clean. Fixes PLTFRM-3273. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 If Teams can no longer read a saved bot password, the runtime no longer stops because of that record. The installation is skipped, and disconnect can remove it so the agent can be connected again. ## Changes - The install store now returns records with unreadable secrets, preserves their other fields, omits `appPassword`, and marks them with `secretUnreadable: true`. - It logs an actionable decryption error once per installation. - The provider skips unreadable installations during initialization, excludes them from configured status, and returns 404 for their webhooks. - Disconnect can delete an unreadable installation. - Added tests for encryption-key changes, missing keys, logging, initialization, and deletion. ## Checks - Test and type-check results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- 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 | ||
|
|
ef92d71d94 |
chore: version packages (alpha) (#28499)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
5bb592a862 |
Allow shared Slack channels to opt into channel-wide tool approvals (#28542) | ||
|
|
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> |
||
|
|
dacb190944 |
chore: version packages (alpha) (#28009)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
40a522c142 |
chore(deps): update build tools (#27997) | ||
|
|
875a65748d |
feat(core): hide channel reply text, and only mention add_reaction when it's mounted (#28067)
## What this changes
**Hide reply text in a channel.** A new `textDisplay` adapter option.
With `textDisplay: 'hidden'`, the agent's reply text is never posted to
the channel; the agent speaks there only through tools the app gives it,
such as a reply tool. Tool display, approval prompts, error messages and
typing status work as before, and the text still reaches the agent's
stream and memory.
```ts
channels: {
adapters: {
slack: {
adapter: createSlackAdapter(),
textDisplay: 'hidden',
},
},
},
```
Why: agents in busy threads narrate each step ("Running the tests now",
"Comparing against main"). Letting an app route replies through a tool
means the agent posts when it has something to say, and models that
can't produce an empty reply can stay quiet by not calling the tool.
There was no way to do this before: handlers only decide whether a run
starts, and both drivers post every text chunk.
**Only mention `add_reaction` when it's mounted.** The channel system
instructions always told the model to "use the `add_reaction` tool" to
acknowledge without speaking. That tool only exists when the app passes
`channels.getTools()` to the agent, so agents without it called a tool
that wasn't there. The sentence is now added only when the step's tools
include `add_reaction`.
## How
- `ChannelAdapterBaseConfig.textDisplay?: 'show' | 'hidden'` (default
`'show'`), carried on the render context.
- `ChatChannelOutputProcessor` doesn't queue
`text-start`/`text-delta`/`text-end` for the drivers when hidden. It
still returns every chunk unchanged, so the caller's stream is
untouched.
- `ChatChannelProcessor` reads `tools` from `processInputStep` and only
adds the reaction sentence when `add_reaction` is present.
## Tests
- Output processor: hidden text posts nothing with the static and
streaming drivers; tool cards and errors still post; the chunk is passed
through to the stream unchanged.
- A real `Agent` streaming through channels with a mock model: the
system prompt the model receives mentions `add_reaction` only when
`channels.getTools()` is mounted.
- Red checks: removing the text filter fails 3 tests; always adding the
reaction sentence fails the processor test and the agent test.
- `src/channels`: 545 passed. Core `tsc --noEmit` clean, oxlint clean.
Docs: `docs/channels.mdx` (new "Reply only through a tool" section), and
`textDisplay` in the channels and Slack provider reference.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR lets channel applications hide normal agent replies while still
showing tool results, errors, approvals, and status updates. It also
prevents agents from being told to use `add_reaction` when that tool is
unavailable.
## Changes
- Added `textDisplay: 'show' | 'hidden'` to channel adapter and Slack
provider configuration.
- Passed `textDisplay` through the channel render context.
- Filtered hidden reply text from static and streaming channel output.
- Preserved tool displays, approval prompts, errors, typing status,
agent streams, and memory behavior.
- Added `add_reaction` guidance only when the tool is available.
- Updated channel and Slack documentation.
- Added tests for hidden text, streaming behavior, Slack configuration
propagation, and conditional reaction guidance.
## Validation
Reported validation includes 545 passing channel tests, a clean core
TypeScript check, and a clean Oxlint run.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: CalebBarnes <CalebBarnes@users.noreply.github.com>
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
a1e248bfe0 |
feat(factory): let Slack runs attach workspace files to the thread (#27351)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
4c22623ea3 | chore: version - exit prerelease mode | ||
|
|
98e53f781c | chore: version packages | ||
|
|
f3cf77305f |
security: Vanta remediation (2026-10-20) (#27828) | ||
|
|
71956e0430 | chore: version packages | ||
|
|
6dc66e6c69 |
feat(connect): add Microsoft Teams to Mastra Connect (tools + channel) (#27094)
## Summary Ships Microsoft Teams as a fully supported Mastra Connect provider: 25 Graph-backed tools and a messaging channel with delegated bot provisioning via the Teams Dev Portal. - Un-excludes `microsoft-teams` from the provider docs and documents the channel setup (no customer-side Azure app registration needed — Mastra provisions the Dev Portal bot; `MASTRA_ENCRYPTION_KEY` required). - `channels()` now fails with a configuration error when `MASTRA_ENCRYPTION_KEY` is missing **and** a Teams connection is active. The check runs at resolution time, so Slack/Discord-only projects are unaffected. - `@mastra/teams` provisions **SingleTenant** bots by default, deriving the tenant from the signed-in account's Graph token (`tid` claim). Microsoft no longer accepts new multi-tenant bot registrations; explicit `appType: 'MultiTenant'` remains available as an opt-out. - Smoke fixes: HTTPS placeholder messaging endpoint (Dev Portal rejects non-HTTPS), corrected scenario inputs for `create_chat` and `create_channel_tab`. Closes PLTFRM-2543. ## Test plan - `@mastra/connect` vitest: 336/336 pass; tsc clean - `@mastra/teams` vitest: 48/48 pass; tsc clean - Live tools smoke (`--provider microsoft-teams`): **25/25 pass** — real team/channel/message/reply lifecycle plus probe tools proving endpoint routing; cleanup deletes the created channel - Live channels smoke (`smoke-test:channels`): **3/3 suites pass, 0 fail** — resolver contract (12 checks), server mount + webhook 404s (6 checks), Teams layer 4 (12 checks): live Graph `/me`, Dev Portal secondary token, full bot provision via `connect()` → active installation → `disconnect()` → Entra app deleted (Graph 404) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## ELI5 Mastra Connect can now connect to Microsoft Teams, so people can talk to agents in Teams and agents can use Teams tools. Teams bot credentials remain encrypted when no environment encryption key is configured. ## Summary - Adds Microsoft Teams as a Connect channel and provider, with 25 Microsoft Graph-backed tools and generated provider documentation. - Uses `MASTRA_ENCRYPTION_KEY` when configured. Otherwise, derives an encryption key from the platform access token and logs a warning. Rotating that token can make stored credentials unreadable; disconnect and reconnect to provision them again. - Defaults delegated bot provisioning to single-tenant. The provider derives the tenant from the Graph token’s `tid` claim unless `appTenantId` is set. Explicit multi-tenant provisioning remains available. - Documents Teams setup, tenant admin consent, bot provisioning, and the Teams Developer Portal packaging step. - Updates Teams smoke-test inputs and uses an HTTPS endpoint for bot provisioning. ## Validation The PR objectives report passing tests, TypeScript checks, and smoke tests. These results are author-reported and 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> |
||
|
|
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> |
||
|
|
9fc60a1748 | chore: version packages | ||
|
|
af5086da68 |
fix(discord): stop the Gateway reconnect storm with a provider-owned, abortable reconnect loop (#26095)
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> |
||
|
|
5054905e58 |
feat(connect): e2e smoke suite for channels() (#25987)
## Summary Adds `smoke-test:channels`, an e2e smoke suite for the `channels()` resolver — the channel-provider path (Slack, Discord, Telegram) that the tools smoke suite (#25815) doesn't touch. Stacked on `connect/e2e-smoke-tests`. ```bash pnpm --filter @mastra/connect smoke-test:channels [--channel <id>] [--project-id <id>] ``` It verifies five layers against a live Platform project: - **Resolver contract** — construction guards (missing project id, invalid `ttlMs`), route mounting before any connection exists, TTL cache + `invalidate()`/`refresh()`, `disabled` overrides, and bogus `connectionId` pins (warn-and-skip). - **Server mount** — the resolver is handed to a real `Mastra` instance; the suite asserts the channel routes land in the merged `server.apiRoutes` with correct `requiresAuth` flags, mounts them exactly the way the production server adapter does (`handler` / `createHandler({ mastra })` onto Hono), and drives every platform's webhook endpoint with real HTTP requests (unknown webhook ids answer 404). - **Credential flow** — per connected channel: presence in the resolved map (proves credential late-binding, e.g. Discord's `sync()` → `configure()`), provider `id`/routes/`getInfo()`, a platform credential fetch, and a vendor whoami call (Discord `GET /users/@me` + `/applications/@me`, Slack `auth.test`, Telegram `getMe`). These deliberately bypass the proxy — channel providers call vendor APIs directly with the resolved token, so that direct path is what gets smoked. - **Discord full webhook flow** — the whole loop, end to end: the suite overrides the provider's Ed25519 public key with a locally generated pair (`providerOptions.publicKey`), `connect()`s an agent to a guild the bot is already in (`commands: []`, so the guild is not mutated), POSTs a **signed PING interaction** to the mounted route (200 PONG), POSTs a forged signature (401), then `disconnect()`s and verifies the installation is gone. Installations live in in-process channel storage, so nothing persists after the run. - **Slack manifest lifecycle** — `connect()` attempts a real `apps.manifest.create` mint with the token the platform serves (expecting a pending OAuth install + authorization URL), then `disconnect()` deletes the minted app via `apps.manifest.delete`. Today the `slack` integration serves a workspace bot token that Slack's manifest API rejects (`not_allowed_token_type`), so the mint records a **documented skip** — it still proves the manifest path is wired up to Slack's token gate. Once the channel is rekeyed to the `slack-channels` App Configuration integration (#25332), this exact flow runs the full mint + delete lifecycle (a `TODO(#25332)` marks the integration-id list for the rename). ### Companion fix: `@mastra/slack` `disconnect()` pending-app leak `connect()` mints a real Slack app before the OAuth install completes, but `disconnect()` only called `apps.manifest.delete` for **active** installations — disconnecting during the pending window removed the local record and orphaned the app in the Slack workspace. `disconnect()` now deletes the minted app for pending installations too (unit-tested, changeset included). This is also what keeps the smoke flow leak-free: every app the suite mints is deleted in the same run. Telegram's full flow needs `setWebhook` against the live bot plus a public callback URL, and Slack event delivery needs a completed OAuth install (pending installations are invisible to the events route by design) — both out of scope; those webhook routes are still exercised through the mounted server. The suite sends no messages and registers nothing with any vendor beyond the Slack app it deletes in the same run. `hono` is added as a devDependency (route mounting only); no `@mastra/connect` runtime changes. ## Test plan - Live run against the test project (`discord` + `slack` connected): - `channels-resolver` 10/10, `server-mount` 5/5, `discord` 11/11 (incl. full webhook flow), `slack` 6 pass + 1 documented skip (manifest token gate, pending #25332), `telegram` skipped (no connection) — **0 failures** - `@mastra/slack`: 92/92 tests (incl. new pending-disconnect deletes-app test), `tsc --noEmit` clean - `@mastra/connect`: `tsc --noEmit` clean (scripts included via tsconfig), `vitest` 268/268, lint 0 warnings/errors - Tools-suite audits unaffected: coverage 1014/1014, shape audit 0 findings --------- 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> |
||
|
|
53a5c68a20 |
fix(slack): hash normalized slash commands so drift detection doesn't misfire (#25625)
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> |
||
|
|
e15ae820d6 |
docs(teams): add README and CHANGELOG for @mastra/teams (#25480)
Co-authored-by: mastracode Co-authored-by: Charlie Green <284800079+mastra-platform[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> |
||
|
|
db45466af6 |
feat(channels): Microsoft Teams provider (#25331)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
3bc48716b8 |
chore: version packages (alpha) (#25042)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |