0
Fork 0
mirror of https://github.com/mastra-ai/mastra.git synced 2026-11-17 08:44:46 +00:00
Commit graph

125 commits

Author SHA1 Message Date
dane-ai-mastra[bot]
d60ba71be0 chore: version - exit prerelease mode 2026-11-12 21:12:29 +00:00
dane-ai-mastra[bot]
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>
2026-11-12 12:07:03 -08:00
dane-ai-mastra[bot]
055a8c3b82 chore: version packages 2026-11-12 04:17:40 +00:00
mastra-platform[bot]
2d4284603a
Fix MCP core compatibility, Windows browser paths, and AI SDK tool titles (#30125) 2026-11-11 15:45:01 -08:00
dane-ai-mastra[bot]
9e82af0237
chore: version packages (alpha) (#30074)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-11 14:21:14 -08:00
arctic-char
bb0e97e2aa
feat(connect): use connected tools through Code Mode (#29583)
This adds `codeMode()` to the connect `tools()` resolver, so an agent
can call its connected tools from one TypeScript program instead of one
tool call per step. It's handy when a task fans out across many calls or
providers.

```ts
import { tools } from '@mastra/connect'
import { LocalSandbox } from '@mastra/core/workspace'

const code = tools().codeMode({ sandbox: new LocalSandbox() })

const agent = new Agent({
  instructions: async ctx => ['You are helpful.', await code.instructions(ctx)],
  tools: code.tools,
  // ...
})
```

`createCodeMode()` takes a fixed tool record, but connect tools change
with each request, so `codeMode()` returns per-request `tools` and
`instructions` functions. Both use the same resolution within a request,
so the instructions never describe a function the program can't call.
Tools that need approval, and `request_connection`, stay regular agent
tools so the run can still pause for them. When nothing is connected you
get just the direct tools and an empty instructions string.

Declaring every connected function in the instructions costs about 4k
tokens per provider (over 150k for the whole catalog) on every turn. So
when the declarations would pass about 10k tokens, `codeMode()` lists
only the function names and gives the agent a `search_functions` tool.
The agent searches by task or by exact name, gets the TypeScript
declarations back, then writes the program. Every function stays
callable from the program. `toolSearch: true` or `false` picks the mode
explicitly.

Tested against a real Agent, the real Linear tools and a real sandbox
process, with only the model and the platform HTTP faked (498/498
connect tests). I also ran it live with gpt-4o-mini against a real
project: the model wrote one program that called the connected Word,
Excel and PowerPoint accounts through the platform proxy. With tool
search forced on, gpt-5-mini got a 789-token instruction block listing
45 names, searched for the Word and Excel list functions and the drive
lookup, then wrote one program that read the real OneDrive. Docs are in
the connect `tools()` reference, with a pointer from the Code Mode
guide.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

Agents can use connected tools in one TypeScript program instead of
calling each tool separately. Agents can look up tool details when
needed, while approval-required tools remain directly controlled by the
agent.

## Summary

- Added `codeMode(options)` to static, dynamic, and `.with()` Connect
tool resolvers.
- Returned `tools` and `instructions` functions resolve the same
connections for each request.
- Shared builds remain cached for up to 30 seconds for the same request
context.
- Approval-required and suspended tools, including `request_connection`,
remain direct agent tools.
- Added `search_functions` for on-demand function declarations.
- Tool search activates automatically above about 10,000 declaration
tokens. `toolSearch` can force it on or off.
- Added documentation, a changeset, and integration tests.
- Test 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>
Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
2026-11-11 12:02:32 -05:00
Leo
10b2ac6614
fix(connect): accept Fireflies keyword lists and numeric speaker ids (#29538)
## Summary

`fireflies_get_transcript` in `@mastra/connect` threw a ZodError on most
real Fireflies transcripts. Two fields cause it: the live API sends
`summary.keywords` as a list of strings and `speakers[].id` as a number,
but the schema accepts only strings. `fireflies_list_transcripts` kept
working, so agents could list calls but couldn't read any of them.

The tool now accepts both shapes from Fireflies. Its output doesn't
change: keywords come back as one comma-separated string and speaker ids
as strings. That's the same way the tool already handles `action_items`
and sentence `speaker_id`.

`src/providers/**` is generated from NangoHQ/integration-templates and
can't be hand-edited, and upstream has no fix yet. So the change is a
Mastra-side generator override, next to the existing Office
`get-user-drive` override, and Fireflies is regenerated from its
existing pin (`9f836014ab8b`):

```diff
 // scripts/generate-provider.ts, fireflies/get-transcript only
 ProviderSummarySchema
+  keywords: string | string[]          -> joined with ', ' in the output
 SpeakerSchema
+ProviderSpeakerSchema: id string | number  -> String(id) in the output
 TranscriptSchema
-  speakers: z.array(SpeakerSchema)
+  speakers: z.array(ProviderSpeakerSchema)
```

Each rewrite has to match the template exactly once. If upstream changes
any of those pieces, generation stops with "the upstream template shape
changed" instead of quietly shipping the old schema. Regenerating
changes only `tools/get-transcript.ts` and its manifest checksum; the
other 26 Fireflies files are unchanged.

I checked the rest of the response schema against Fireflies' published
GraphQL types (Transcript, Summary, Speaker, Sentence,
MeetingAttendeeModel, MeetingInfo, MeetingAnalytics). Only these two
fields break. The sentence fields were already fixed in #27156, and
everything else matches.

## Evidence

The tests call the public `tools()` resolver against a real localhost
HTTP server standing in for the Mastra platform. Only the Fireflies
GraphQL payload is scripted, using the shape from the issue.

- **Before** (main's generated tool, new tests): 3 failed, 5 passed. The
failures are the issue's errors:
  ```
× returns a transcript whose keywords are a list and whose speaker ids
are numbers
  × returns a transcript whose keywords are a list
  × returns a transcript whose speaker ids are numbers
data.transcript.summary.keywords: Invalid input: expected string,
received array
data.transcript.speakers.0.id: Invalid input: expected string, received
number
  ```
**After:** `src/__tests__/fireflies-transcript.test.ts` passes 8 of 8.
Covered: list keywords, numeric ids, both together, string inputs, an
empty list (returns `''`), nulls kept as null, omitted fields left
absent, and a non-string, non-number id still rejected.
- **Generator:** `provider-commands.test.ts` adds 8 tests: one checks
that the override is applied, and 7 drift cases (one per rewrite) check
that a changed template fails generation. With the override switched
off, they fail.
- `@mastra/connect` suite: 482 of 482 pass. `tsc --noEmit`, `oxlint
--type-aware` and `oxfmt --check` pass on the changed files.
- **Not checked:** a live Fireflies account. The smoke scenario only
probes a synthetic transcript id, so it can't parse a real transcript
body.

## Merge Danger

**Door:** two-way. Revert the commit, or drop the override and
regenerate.

**Blast radius:** `fireflies_get_transcript` only. The output type is
the same, so existing callers keep working.

Follow-ups:
- Fix this in NangoHQ/integration-templates, then move the Fireflies pin
and delete the override.
- Consider returning `keywords` as `string[]` in a future minor release,
to match `fireflies_list_transcripts`. Joining with `', '` loses the
boundary of a keyword that itself contains a comma.

Closes #29401

## Council review

| Round | Sol (GPT-6.1 Sol): Correctness / Tests / Scope / Code quality
| Opus 5.5: Correctness / Tests / Scope / Code quality | Grok 4.7 |
|---|---|---|---|
| 1 | 9.5 / 9 / 10 / 9 | not seated (Sol-only round) | empty seat |
| 2 | 9 / 9 / 10 / 9 | 9 / 9 / 9 / 8.5 | empty seat |
| 3 | 10 / 9.5 / 10 / 10 | 9 / 9 / 9 / 9 | empty seat |

Created with Claude Opus 5.5 in T3 Code.

🤖 Generated with [Claude Code](https://claude.com/claude-code)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5
Fireflies sometimes sends transcript details in formats this tool did
not expect. This change lets the tool read those details and return them
in its existing format.

## Summary
- Accept `summary.keywords` as strings or string arrays. Join arrays
with `", "`.
- Accept speaker IDs as strings or numbers. Convert numeric IDs to
strings.
- Add a Fireflies `get-transcript` generator override.
- Stop generation when an expected template pattern does not match
exactly once.
- Add regression tests for normalization, null and omitted values,
invalid speaker IDs, and template drift.
- Add a patch changeset for `@mastra/connect`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-11 11:22:19 -05:00
dane-ai-mastra[bot]
3a6ca42696
chore: version packages (alpha) (#30026)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-11 08:16:57 -08:00
arctic-char
b244478626
fix(connect): unblock Excel workbook deletes and fix Microsoft Office smoke scenarios (#30065)
## Description

The Excel delete workbook tool failed with a 423 "resource locked" error
after the workbook was edited. Graph's sessionless workbook writes (like
`update_range`) leave a co-authoring lock that lasts about 30 minutes,
so deletes failed until it expired. The delegated Excel delete-workbook
tool now sends `Prefer: bypass-shared-lock`:

```ts
await platformProxy.delete({
  endpoint: `/v1.0/me/drive/items/${encodeURIComponent(input.itemId)}`,
  headers: { Prefer: 'bypass-shared-lock' },
  // ...
});
```

The header is injected by the provider generator so it survives
regeneration, and a generator test covers it. The client-credentials
Excel variant is unchanged. One tradeoff: the bypass also overrides a
lock held by a person who has the workbook open, so the file goes to the
recycle bin anyway. `NangoHQ/integration-templates` is no longer
available, so the generated tool and manifest checksum were updated to
match the generator's output instead of regenerated.

While running the Microsoft smoke tests live, I also fixed the
scenarios. Word now sends `content` instead of `contentBase64`. On
personal accounts, Excel treats the tenant-only calls (users, sites) as
skips, and it retries read-after-write checks to absorb lag from
sessionless writes. PowerPoint now generates a valid minimal .pptx, so
PDF export no longer rejects it as corrupt, and finds copies by listing
the drive root instead of waiting for the search index.

## Related issue(s)

None, found while running the live Microsoft smoke tests.

## 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
- [x] Test update

## Checklist

- [ ] I have linked the related issue(s) in the description above
- [ ] I have made corresponding changes to the documentation (if
applicable)
- [x] I have added tests that prove my fix is effective or that my
feature works
- [ ] I have addressed all Coderabbit comments on this PR

## Test plan

- `pnpm --filter @mastra/connect smoke-test` with Word, Excel,
PowerPoint, Teams and Outlook: 5/5 pass live, no leaked files. The Excel
delete succeeds right after `update_range`; without the header it
returns 423.
- The generator test fails without the override and passes with it.
- In a clean Linux container: frozen-lockfile install, `turbo build
--filter @mastra/connect`, and `tsc` all pass. The connect tests pass
apart from intermittent 5s timeouts in `provider-commands.test.ts`,
which also happen on `main`.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR helps Excel delete files that remain temporarily locked after
editing. It also makes Microsoft Office smoke tests use valid files and
handle delayed results.

## Changes

- Add `Prefer: bypass-shared-lock` to delegated Excel `delete-workbook`
requests.
- Keep the client-credentials Excel variant unchanged.
- Add generator tests for both variants.
- Update the generated tool and manifest checksum.
- Add minimal XLSX and PPTX builders.
- Retry Excel read-after-write checks.
- Skip unsupported tenant-only operations for personal accounts.
- Find copied PowerPoint files by listing the drive root.
- Send Word updates with `content` instead of `contentBase64`.
- Add a patch changeset for `@mastra/connect`.

## Validation

The PR reports passing live smoke tests for Word, Excel, PowerPoint,
Teams, and Outlook. It also reports passing installation, build, and
TypeScript checks. Connect tests passed except for intermittent
`provider-commands.test.ts` timeouts also reported on `main`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-11 11:09:00 -05:00
dane-ai-mastra[bot]
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>
2026-11-10 10:33:29 +01:00
dane-ai-mastra[bot]
f21e0742ce chore: version packages 2026-11-07 04:18:11 +00:00
Lennart
1025e7eeff
docs(connect): one Connect page and one integration page per provider (#29465)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
2026-11-05 10:28:52 -08:00
Lennart
ee5a1b0282
docs: make packages frontmatter more precise (#29499)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-04 17:49:54 -08:00
dane-ai-mastra[bot]
675caf0613
chore: version packages (alpha) (#29336)
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.

⚠️⚠️⚠️⚠️⚠️⚠️

`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.

⚠️⚠️⚠️⚠️⚠️⚠️

# Releases

> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.

## @mastra/client-js@1.60.0-alpha.0


## @mastra/react@1.15.0-alpha.0


## @mastra/factory@0.28.0-alpha.0


## @mastra/code-sdk@1.19.0-alpha.0


## mastra@1.39.0-alpha.0


## @mastra/core@1.83.0-alpha.0


## @mastra/mcp@2.9.0-alpha.0


## @mastra/mcp-apps-components@0.1.0-alpha.0


## @mastra/playground-ui@69.0.0-alpha.0


## @mastra/server@1.83.0-alpha.0


## @mastra/nestjs@0.3.0-alpha.0


## @mastra/clickhouse@1.30.0-alpha.0


## @mastra/duckdb@1.19.0-alpha.0


## @mastra/libsql@1.30.0-alpha.0


## @mastra/pg@1.36.0-alpha.0


## @mastra/temporal@0.6.0-alpha.0


## @mastra/auth-better-auth@1.1.11-alpha.0


## @mastra/deployer-cloud@1.83.0-alpha.0


## @mastra/deployer-cloudflare@1.2.42-alpha.0


## @mastra/deployer-netlify@1.2.42-alpha.0


## @mastra/deployer-sandbox@0.3.27-alpha.0


## @mastra/deployer-vercel@1.2.42-alpha.0


## @mastra/longmemeval@1.1.42-alpha.0


## @mastra/opencode@0.1.42-alpha.0


## create-factory@0.4.3-alpha.0


## mastracode@0.49.1-alpha.0


## @mastra/arize@1.3.30-alpha.0


## @mastra/arthur@0.4.30-alpha.0


## @mastra/braintrust@1.3.27-alpha.0


## @mastra/datadog@1.4.22-alpha.0


## @mastra/deepeval@0.1.24-alpha.0


## @mastra/laminar@1.3.32-alpha.0


## @mastra/langfuse@1.6.6-alpha.0


## @mastra/langsmith@1.4.3-alpha.0


## @mastra/observability@1.23.2-alpha.0


## @mastra/otel-bridge@1.5.22-alpha.0


## @mastra/otel-exporter@1.5.2-alpha.0


## @mastra/posthog@1.4.7-alpha.0


## @mastra/sentry@1.2.32-alpha.0


## @mastra/agent-builder@1.2.1-alpha.0


## @mastra/connect@1.3.2-alpha.0


## create-mastra@1.39.0-alpha.0


## @mastra/deployer@1.83.0-alpha.0


## @mastra/editor@0.17.1-alpha.0


## @mastra/mcp-docs-server@1.3.13-alpha.0


## @mastra/memory@1.41.1-alpha.0


## @mastra/rag@2.7.3-alpha.0


## @mastra/redis-streams@0.8.1-alpha.0


## @mastra/elysia@0.1.23-alpha.0


## @mastra/express@1.5.27-alpha.0


## @mastra/fastify@1.5.27-alpha.0


## @mastra/hono@1.7.25-alpha.0


## @mastra/koa@1.7.27-alpha.0


## @mastra/next@0.2.41-alpha.0


## @mastra/tanstack-start@0.2.41-alpha.0


## @mastra/spanner@1.11.2-alpha.0


## @mastra/turso@0.1.21-alpha.0


## @mastra/inngest@1.11.2-alpha.0


## @mastra/gcs@0.3.6-alpha.0


## @internal/playground@1.39.0-alpha.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-04 14:40:27 -08:00
mastra-platform[bot]
f9feb98ba3
fix(core,mcp): keep submitted values out of tool validation logs (#29331)
> Opened by @user_01KN2T7F5T2WYEMHY58VJGPZ8R

Fixes #29318

## Problem
When a tool rejects its input, output, suspend data, or resume data, the
validation error message repeats the submitted values (for example
`Provided arguments: {"email": "person@example.com"}`). That's on
purpose, so the model can see what it sent and fix the call. But the
same message was also written to the logs, which put user data such as
email addresses into log output.

## Change
- **Core** (`tools/validation.ts`, `tool-builder/builder.ts`,
`tool.ts`): a new `getValidationIssuePaths()` helper returns the dotted
field paths that failed validation (or `root` for top-level issues).
Validation-failure logs now contain the tool metadata plus `issuePaths`
and no longer include the full message. This covers input, output,
suspend-data, and resume-data validation.
- **MCP** (`server/server.ts`): the "rejected its input" warnings for
plain tools and `run_` workflow tools log `issuePaths` instead of the
message. `MCP_SERVER_TOOL_EXECUTE_FAILED` no longer puts the serialized
`args` into exception details.
- The error returned to the model or MCP caller is the same as before.

## Tests
- `builder.test.ts`: five new tests (input, resume data, suspend data,
AI SDK tool output, Mastra tool output). Each one checks that no logger
call contains the sensitive value and that `issuePaths` is logged. All
five fail without the fix.
- `server-validation-logging.test.ts`: a new MCP end-to-end test over
HTTP. It checks that the caller still gets the validation error and that
server logs only contain `issuePaths`. It fails without the fix.
- Two existing assertions in `validation.test.ts` expected the old
message in the log. They now expect the sanitized form.
- Results: `packages/core` `src/tools` 531 passed, `tsc` clean.
`packages/mcp` `src/server` 565 passed. One stdio events test failed
only when the full suite ran in parallel; it passed when rerun on its
own.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

When a tool rejects information, its logs should not repeat the
information people sent. This change logs the tool and the fields that
failed, while keeping errors available to callers.

## Summary

- Updated core validation logs for tool input, output, suspend data, and
resume data. Logs include tool metadata and failing field paths instead
of validation messages that may contain submitted values.
- Added the public `getValidationIssuePaths` helper. It returns dotted
paths, uses `root` for top-level errors, and masks undeclared property
names.
- Updated MCP server validation logs to report failing field paths. MCP
tool-execution failure details no longer include serialized arguments.
- Updated MCP client logs to omit submitted arguments, server error
text, and full error messages or stacks. Output-validation logs report
issue paths. Other error logs use `errorKind`, which filters error names
and codes.
- Sanitized tracked exceptions for remote MCP tool and task failures.
Caller-facing errors remain available.
- Added core and MCP logging tests.
- Raised the minimum `@mastra/core` peer version to `1.82.0-0` for
`@mastra/mcp`, `@mastra/connect`, and `@mastra/code-sdk`.

## Test results

The PR reports 531 passing core tool tests and a clean TypeScript check.
It reports 565 passing MCP server tests. One stdio events test failed in
a parallel full-suite run, then passed when rerun alone.
<!-- 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>
2026-11-04 01:59:48 +00:00
dane-ai-mastra[bot]
6e8dfcb83f chore: version - exit prerelease mode 2026-11-03 23:45:58 +00:00
arctic-char
608022dc1e
feat(connect): resume the agent and refresh its tools after an end-user connects in Studio (#29210)
## Summary

When an agent needs a provider the end user hasn't connected, it calls
the built-in `request_connection` tool, which renders a connect card in
Studio chat. Before this PR, the user connected and then nothing
happened. The agent had already finished its turn, its tool list was
cached for up to 30 seconds, and the Connections page showed a bare
spinner while loading.

**The agent continues from the tool result (`@mastra/connect`,
`@mastra/playground-ui`)**
- Inside an agent run, `request_connection` now suspends the run while
the connect card is up, the same pattern `ask_user` uses.
- When the connection settles, the card resumes the paused call with `{
provider, status: 'active' }`, or `{ provider, status: 'failed', error
}` carrying the same reason the card shows (closed window, rejected
credentials, connection limit). No chat message is sent.
- On resume, the tool checks the platform instead of trusting the resume
data, then returns the prompt with a `message` such as `"Linear
connected successfully."`, or `"Linear could not be connected:
<reason>"` plus an `error` field. The agent reads that tool result and
keeps going. If the platform shows the connection active, success wins
over a reported failure.
- The run only pauses when the agent names one specific unconnected
provider; omitted, unknown, or already-connected providers, and calls
made outside an agent run, return immediately as before.

**New tools show up right away**
- Server: a connect or disconnect through `userConnectRoutes()`
invalidates the cached tool snapshot for that resource, so the next
resolution includes the new provider's tools. A fetch that started
before the change can't hide the new connection.
- Studio: agent and tool queries refresh when a connection activates or
is disconnected.

**Connections page loading state**
- The table renders with skeleton rows from first paint, instead of a
spinner followed by the table.

## Test plan

- [x] `@mastra/connect`: 466/466. New `connect-prompt-resume.test.ts`
drives a real `Agent` with a mock model: it suspends, resumes with
success, resumes with no real connection, resumes with a failure reason,
prefers the platform state over a failure that raced a success, and
passes through when already connected or unnamed.
`connection-freshness.test.ts` covers cache invalidation, including the
in-flight race. Lint and typecheck are clean.
- [x] `@mastra/playground-ui` chat + connect domains: 608/608 (MSW). The
card resumes the paused tool once and sends no chat message. It waits
for a running stream to stop, doesn't resume a call that was already
resumed or that finished, and resumes with the failure reason when
authorization is rejected, the connection settles non-active, or the
session can't be created (409 connection limit). `ToolCard` routes a
paused call to the connect card. Typecheck is clean.
- [x] Live (real model, local dev server): the run pauses with a
`tool-call-suspended` connect prompt. `resume-stream` returns the tool
result `"Linear is not connected yet."` because the platform re-check
rejected the unconnected provider. Resuming with `status: 'failed'` and
a connection-limit reason returns that reason in the tool result, and
the agent tells the user to disconnect an existing Linear connection and
retry. Studio shows the paused run as the connect card, with no extra
user message.
- [ ] Live end-to-end OAuth: connect Linear from the card and watch the
agent continue (needs an interactive provider login)


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

When an agent needs someone to connect an account, Studio pauses the
agent and continues after the connection is active. Studio then
refreshes the available tools and shows placeholders while connection
data loads.

## Changes

- `request_connection` pauses an agent run when the agent names one
specific, unconnected provider. After activation, the chat card resumes
the paused call with the provider and active status, without sending a
new chat message.
- The tool returns immediately when the provider is already connected,
omitted, or unknown, or when it runs outside an agent run.
- `@mastra/connect` refreshes cached tool snapshots after a connection
changes. It handles user-scoped and global connections and avoids
redundant refreshes for matching status reports.
- Studio cancels and invalidates connection, agent, agents, and tools
queries after a connection settles or is disconnected.
- The Connections page shows skeleton rows while provider or connection
data is pending, including when the browser is offline and the query is
paused.

## Validation

The PR objectives report 459/459 passing `@mastra/connect` tests and
605/605 passing `@mastra/playground-ui` chat and connect tests. They
also report clean lint and type checks. A live test with a real model
and local dev server reportedly confirmed that an agent run pauses and
resumes with “Linear is not connected yet.” Live end-to-end OAuth was
not tested because it requires an interactive provider login.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-03 15:07:18 -08:00
dane-ai-mastra[bot]
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>
2026-11-03 13:59:38 -07:00
Dane - AI (Mastra)
6922a1c101
chore(deps): update dependency ts-morph to v28 (#29128) 2026-11-01 08:09:49 -08:00
dane-ai-mastra[bot]
eed9cc214e chore: version packages 2026-11-01 04:20:58 +00:00
mastra-platform[bot]
1537e2c8e1
fix(connect): keep cold Discord imports outside behavior test timeouts (#29068) 2026-10-31 12:11:23 -07:00
dane-ai-mastra[bot]
77076a1012 chore: version - exit prerelease mode 2026-10-30 23:02:25 +00:00
dane-ai-mastra[bot]
582ef17a2b
chore: version packages (alpha) (#28888)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-30 14:56:53 -07:00
arctic-char
5af331d0c2
feat(connect): add SharePoint Online toolset (#26284)
## Summary

Adds the SharePoint Online toolset to `@mastra/connect` (53 tools).

Generated from the shared NangoHQ/integration-templates pin
(bb789a55bfcf) via the add-provider workflow. Largest Microsoft 365
toolset in this split.

Split out of #25597 so each toolset ships as its own reviewable PR.

## Scope

- `packages/connect/src/providers/sharepoint-online/` — `53`
auto-generated tool files, `tools.ts`, `index.ts`, `.manifest.json`
- `packages/connect/src/providers/index.ts` — new import + barrel entry
- `packages/connect/src/__tests__/registry.test.ts` — new ID in the
expected provider list
- Changeset: `@mastra/connect` minor

## Test plan

- [ ] `pnpm --filter @mastra/connect test` passes
- [ ] `pnpm --filter @mastra/connect lint` clean
- [ ] `pnpm --filter @mastra/connect generate:provider-docs` regenerates
`reference/connect/providers.mdx` (run before merging to pick up the new
row and tool count)
- [ ] Smoke scenario authored + `pnpm smoke-test --provider
sharepoint-online` passes against a real connection (tracked in
PLTFRM-2551)

## Follow-ups

Tracked in Linear PLTFRM-2551: platform catalog entry, OAuth app,
scopes, smoke scenario, docs, and launch checklist.

## Account-aware smoke coverage

- exercises all 53 SharePoint Online tools for work/school connections
- reads `MASTRA_SMOKE_MICROSOFT_ACCOUNT_TYPE` before making Graph calls
- self-skips with an explicit work/school requirement when a personal
account is selected
- keeps the existing run-scoped SharePoint cleanup lifecycle


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR adds tools that let Mastra work with SharePoint Online. They
help an agent find and manage sites, files, lists, and pages, including
downloading file content.

## Summary

- Adds 53 SharePoint Online tools to `@mastra/connect` for sites, drives
and drive items, lists and list items, content types, columns, and site
pages.
- Registers the provider and adds it to the provider reference.
- Adds an opt-in smoke-test scenario. It skips personal Microsoft
accounts and requires a configured test site. When a test-tenant grantee
is configured, it tests permission operations without sending
invitations. Otherwise, it probes those operations with synthetic IDs.
The scenario uses run-scoped records and attempts cleanup.

## Validation

The supplied information does not confirm test, lint, or
documentation-generation results. The real-connection smoke test was
listed as planned validation, but its completion is not confirmed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Saba Tchikhinashvili <saba.chikhina@gmail.com>
2026-10-30 17:53:59 -04:00
arctic-char
c293432bd4
feat(connect): add Microsoft Excel toolset with proxy pagination and safer Graph cursors (#26283)
## Summary

Adds the Microsoft Excel toolset to `@mastra/connect` with 27 Microsoft
Graph tools, proxy pagination, endpoint-scoped cursor validation, and an
account-aware smoke scenario.

The provider now matches Platform's delegated OAuth model.
`get_user_drive` resolves the connected user's OneDrive through
`/me/drive` when `userId` is omitted, while retaining the explicit
tenant-user path for work/school accounts. The smoke scenario tries the
connected-user drive first and treats tenant-directory and SharePoint
failures as account capability boundaries rather than connection
failures.

## What changed

- generated 27 Excel tools from the shared Nango template pin under the
delegated `microsoft-excel` provider ID
- added `/me/drive` discovery for the connected user
- preserved the Graph cursor constraints for `list_users`, `list_sites`,
and `list_workbooks`
- added runtime pagination for `list_worksheets`
- made Graph next-page query handling preserve `$skiptoken` values
- surfaced nested provider error codes when Graph returns an empty
message
- covered all 27 tools in the Excel smoke scenario

The shared generator/runtime support is split into #27314.

## Test plan

- [x] `pnpm --filter @mastra/connect test` — 18 files, 379 tests, `tsc
--noEmit` clean
- [x] `pnpm --filter @mastra/connect lint`
- [x] `pnpm turbo build:lib --filter=@mastra/connect`
- [x] provider regeneration — 27 tools, 0 skipped
- [x] smoke scenario static validation — 27/27 tools covered, 0
input-shape findings
- [ ] live delegated OAuth smoke run — Platform credentials are
unavailable in the current review environment; required before merge

## Follow-up

Platform launch work remains tracked in PLTFRM-2553.

## Account-aware smoke coverage

- exercises all 27 Excel tools
- uses `MASTRA_SMOKE_MICROSOFT_ACCOUNT_TYPE` to classify Microsoft Graph
workbook API limitations
- skips the 19 known personal-account-unsupported workbook operations
only when the selected account is explicitly personal and Graph returns
a capability error
- preserves failures for unexpected responses and work/school accounts


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This adds Microsoft Excel tools to Mastra Connect so agents can work
with Excel files in Microsoft 365. It also improves how Connect follows
Graph pages and reports Graph errors.

## What changed

- Added the delegated `microsoft-excel` provider with 27 tools for
drives, workbooks, worksheets, ranges, tables, charts, defined names,
users, and sites.
- When `userId` is omitted, `getUserDrive` now uses the connected user’s
`/me/drive`. An explicit `userId` still selects that user’s drive.
- Added pagination for `list_worksheets` and URL validation for Graph
cursors used by user, site, and workbook listing tools.
- Updated proxy query merging to preserve existing URL parameters. Error
details now include nested provider codes when the error message is
empty.
- Added provider generation support, documentation, a smoke-test
scenario, and changesets.

## Validation

The PR objectives report passing Connect tests, lint, library build,
provider regeneration, and smoke-scenario static validation. A live
delegated OAuth smoke run was not tested because Platform credentials
were unavailable.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Roamin <97863888+roaminro@users.noreply.github.com>
2026-10-30 17:19:28 -04:00
Dane - AI (Mastra)
af8f128f34
chore(deps): update dependency prettier to v3.9.10 (#29021)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2026-10-30 13:53:19 -07:00
dane-ai-mastra[bot]
4f12792ed1
chore: version packages (alpha) (#28722)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-29 08:37:01 -07:00
arctic-char
246621d1c4
feat(connect): add Microsoft Word toolset (#26282)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-28 18:09:27 -07:00
Caleb Barnes
ea46e0d831
fix(connect): drop unused catch binding that fails lint on main (#28763)
## Summary

The Outlook attachment download tool in `@mastra/connect` had an unused
catch binding (`catch (_err)`), which fails the `Lint` check on every PR
based on current `main` (e.g. #28502, #28636, #28746, #28762). This
drops the binding.

No behavior change, so no changeset.

## Testing

- `pnpm lint` in `packages/connect`: 0 warnings, 0 errors.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

The Outlook attachment tool caught errors without using them. This
change removes the unused name so lint passes, without changing what the
tool does.

## Changes

- Removed the unused `_err` binding from the catch clause in
`packages/connect/src/providers/outlook/tools/download-message-attachment.ts`.
- The author reports that `pnpm lint` in `packages/connect` completed
with 0 warnings and 0 errors.

<!-- 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>
2026-10-28 14:15:50 -07:00
arctic-char
9afe13546d
feat(connect): add Outlook (Microsoft 365 mail) toolset (#26281)
## Summary

Adds the Outlook (Microsoft 365 mail) toolset to `@mastra/connect` (30
tools).

Generated from the shared NangoHQ/integration-templates pin
(bb789a55bfcf) via the add-provider workflow. Uses Microsoft Graph
through the platform proxy.

Split out of #25597 so each toolset ships as its own reviewable PR.

## Scope

- `packages/connect/src/providers/outlook/` — `30` auto-generated tool
files, `tools.ts`, `index.ts`, `.manifest.json`
- `packages/connect/src/providers/index.ts` — new import + barrel entry
- `packages/connect/src/__tests__/registry.test.ts` — new ID in the
expected provider list
- Changeset: `@mastra/connect` minor

## Test plan

- [ ] `pnpm --filter @mastra/connect test` passes
- [ ] `pnpm --filter @mastra/connect lint` clean
- [ ] `pnpm --filter @mastra/connect generate:provider-docs` regenerates
`reference/connect/providers.mdx` (run before merging to pick up the new
row and tool count)
- [ ] Smoke scenario authored + `pnpm smoke-test --provider outlook`
passes against a real connection (tracked in PLTFRM-2549)

## Follow-ups

Tracked in Linear PLTFRM-2549: platform catalog entry, OAuth app,
scopes, smoke scenario, docs, and launch checklist.

## Account-aware smoke coverage

- exercises all 30 Outlook tools
- uses `MASTRA_SMOKE_MICROSOFT_ACCOUNT_TYPE` to distinguish personal and
work/school capability failures
- route-probes operations unavailable to personal accounts instead of
treating them as credential failures
- never sends external email during smoke runs


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This change adds Outlook support to `@mastra/connect`. It gives
applications tools to work with Microsoft 365 email, folders,
attachments, calendars, and events through Microsoft Graph.

## Changes

- Added and registered the Outlook provider with 30 tools.
- Added tools for mail, drafts, replies, attachments, folders,
calendars, and events.
- Added input and output validation, pagination, retries, response
mapping, and error handling.
- Added provider documentation, registry coverage, metadata, and a minor
changeset with a usage example.
- Added an Outlook smoke-test scenario with account capability checks,
probes for unsupported operations, and cleanup.

## Validation

Test and lint results were not provided. The listed validation plan
includes Connect tests, linting, provider documentation generation, and
a real-connection smoke test.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: labifrancis <10200603+labifrancis@users.noreply.github.com>
2026-10-28 16:29:58 -04:00
dane-ai-mastra[bot]
6a191d46dc chore: version - exit prerelease mode 2026-10-28 13:15:52 +00:00
Damien Schneider
976fde7416
refactor(lint): enable no-else-return at root (#28601)
Enables `no-else-return: error` in the root Oxlint config and removes
186 redundant `else` branches across 111 source/test files. Existing
rule defaults are retained.

Reviewed every code diff for behavior preservation. An independent
TypeScript AST comparison confirms that changes are limited to removing
`else` after returning branches, with the same expressions, statement
order, return values, and `try`/`catch`/`finally` boundaries. All
181,158 identifier occurrences retain their bindings. The recorder
replay path keeps an explicit block: flattening it would shadow the
earlier request `body` with the response `body` and introduce a
temporal-dead-zone error.

Extends the existing monorepo optimized-dependency test to assert that a
raw TypeScript workspace package, including its enum and transitive
dependency, still executes in the production bundle.

Validation: the root rule-only scan passes on 15,273 files with zero
diagnostics; formatting and `git diff --check` pass. Schema
compatibility tests: 1,060 passed, 9 skipped. Recorder runtime tests: 21
passed. The core selection initially passed 3,513 tests; rerunning the
suites requiring local server/cache access passed 185 tests, with one
remaining cache-file assertion also reproduced on unchanged `main`.

Remaining validation limits: four asset-download cases cannot reach
`placehold.co`; the changed-file lint run reports six import-order
errors reproduced on unchanged files from `main`. Deployer unit tests
and the monorepo test could not run because this checkout lacks required
package dependencies (`fs-extra`/workspace links and `get-port`,
respectively). These limits are left visible for CI. No changeset is
included because this is a behavior-preserving lint cleanup.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5
This PR makes the code easier to read by removing `else` branches that
are not needed after a return. It also enables a rule that catches those
branches and adds a test for loading a raw TypeScript workspace package
in a production bundle.

## Summary
- Enables Oxlint’s `no-else-return` rule at error severity and removes
186 redundant `else` branches across 111 files.
- Extends the monorepo optimized-dependencies test to check a raw
TypeScript workspace package, its enum, and a transitive dependency.
- Updates the deployer’s transpile-package path pattern.
- In workflow event processing, a truthy branch index with no matching
child now falls through to publish a skipped-step end event. Previously,
this case published no event.
- Keeps the recorder replay block explicit to avoid request/response
`body` shadowing and a temporal-dead-zone error.

## Validation
Reported checks passed: the rule-only scan across 15,273 files,
formatting, `git diff --check`, schema compatibility tests (1,060
passed, 9 skipped), recorder runtime tests (21 passed), and an initial
core test selection (3,513 passed).

Some test limits remain. Four asset-download cases could not reach
`placehold.co`. Changed-file lint reported six import-order errors that
also occur on unchanged files from `main`. Deployer unit tests and the
monorepo test could not run because dependencies were unavailable. On
rerun, suites requiring local server/cache access had 185 passes; one
cache-file assertion also reproduced on unchanged `main`.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-28 12:30:27 +01:00
Damien Schneider
7701b35eaa
chore(lint): enable safe syntax simplification rules at root (#28582)
Enables all eleven requested Oxlint rules as errors in the root config
and migrates the 115 existing findings across 55 files. JSX curly-brace
simplification is limited to props (`props: 'never', children:
'ignore'`), boolean props use shorthand, and empty elements become
self-closing.

The manual edits preserve the exact continued-string and template
values, remove redundant assignment-side non-null assertions, and retain
the indexed-read assertion in fastembed's compound assignment. The
BigInt and octal conversions use native globals and exact values
supported by the existing compilation targets. No lint suppressions were
added.

Validation: the eleven-rule scan reports zero diagnostics; before/after
emitted-JavaScript comparison passes for all 55 migrated files,
including 31 JSX files, after normalizing only the reviewed syntax
rewrites. Formatting and whitespace checks pass. Core utility/clone
tests (146), fastembed pooling tests (9), the changed A2A signature test
(1), and fastembed build-config typechecking pass. The root lint scan
retains the same 1,244 pre-existing diagnostics with no new findings.
GitHub CI now also passes the full lint/format job, build, Mastra Code
typecheck, generated-file check, and bundle validation. Local UI/evals
runs were limited by missing dependencies; the CodeDiff folding failure
was reproduced on unchanged baseline code. A second audit confirmed
native unshadowed globals for all five literal conversions, pure targets
for all twelve assignment rewrites, no references or direct eval in all
eight simplified catches, and ordinary semantics for both computed keys.

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR turns on more code-style checks and updates existing code to
pass them. The changes simplify syntax while preserving the intended
behavior.

## Changes

- Enabled eleven Oxlint rules as errors in the root configuration.
- Updated 115 findings across 55 files. Changes include simpler string
and JSX syntax, compound assignments, native BigInt and octal literals,
and catch clauses without unused error variables.
- Configured JSX curly-brace simplification for props only. JSX children
remain unchanged.
- Removed redundant assignment-side non-null assertions while retaining
the indexed-read assertion needed for fastembed’s compound assignment.
- Added no lint suppressions.

## Validation

The author reports zero diagnostics from the eleven-rule scan and no new
findings in the root lint scan, which retains 1,244 pre-existing
diagnostics. Before-and-after emitted-JavaScript comparisons reportedly
pass for all 55 changed files after normalizing the reviewed syntax
rewrites. Formatting and whitespace checks also pass.

Reported tests include 146 core utility and clone tests, 9 fastembed
pooling tests, 1 changed A2A signature test, and fastembed build-config
typechecking. Full workspace lint and the UI/evals suites were limited
by missing dependencies in the checkout. The CodeDiff folding test fails
on unchanged baseline code.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-27 14:00:25 +01:00
dane-ai-mastra[bot]
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>
2026-10-26 13:49:15 -07:00
Damien Schneider
0f82b38ed4
refactor(lint): flatten lone if statements in else branches (#28431)
Enable `no-lonely-if` in the shared Oxlint config and flatten 38 lone
`if` statements in `else` blocks across 35 files. For example, `else {
if (condition) { ... } }` becomes `else if (condition) { ... }`.
Conditions, evaluation order, statements, comments, and local bindings
are preserved. No package filters or lint exceptions are added.

Strengthen the existing monorepo test to execute another named export
from an optimized dependency. Comparisons of TypeScript syntax, emitted
JavaScript, raw template text, comments, and local bindings pass for all
35 migrated files after normalizing only the redundant else blocks. The
rule clears all 15,094 scanned files.

[CI lint and formatting
pass](https://github.com/mastra-ai/mastra/actions/runs/40344286057/job/121647174331)
for `36ca4471f9`. All 634 focused tests, four package typechecks (core,
playground, connect, and deployer), 57 packaged build tasks, and two
selected published-package monorepo E2E cases pass. The broader local
lint run hit a Tailwind design-system precomputation timeout; CI lint
succeeds. Live vendor and external-database suites were not run locally.

[DuckDB CI has two existing capability-list assertion
failures](https://github.com/mastra-ai/mastra/actions/runs/40344286246/job/121649643109):
its implementation advertises `span-aggregate`, while the expected lists
omit it. The failures reproduce locally, and the relevant implementation
and tests are unchanged from the base commit.

This maintenance PR intentionally contains no changeset and requests no
package releases. The missing-changeset check may fail.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

<!-- coderabbit-ai-generated:v1 -->

## ELI5
This PR turns on a lint rule that asks for simpler branching in code. It
updates the affected code and adds a leap-year check to an existing
test.

## Changes
- Enables Oxlint’s `no-lonely-if` rule in the shared configuration.
- Flattens 38 lone `if` statements across 35 files. The PR description
reports that the changes preserve behavior.
- Extends the optimized-dependency monorepo test to check `isLeapYear`.

## Validation
- The PR description reports that CI lint and formatting pass.
- It also reports 634 focused tests, four package typechecks, 57
packaged build tasks, and two selected monorepo E2E cases pass.
- The PR description notes two existing DuckDB CI capability-list
assertion failures. It reports that the related implementation and tests
are unchanged from the base commit.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-26 18:44:48 +01:00
arctic-char
3332a987e5
feat(connect): add Microsoft PowerPoint toolset (#26285)
## Summary

Adds the Microsoft PowerPoint toolset to `@mastra/connect` with 18
Microsoft Graph tools and a full lifecycle smoke scenario for Platform's
delegated OAuth model.

The shared upstream template is still named
`microsoft-powerpoint-oauth2-cc`, so it is generated locally as
`microsoft-powerpoint`. The delegated Office adapter changes
`get_user_drive` to resolve the connected user's OneDrive through
`/me/drive` when `userId` is omitted, while retaining the explicit
tenant-user path for work/school accounts.

## Scope

- `packages/connect/src/providers/microsoft-powerpoint/` — 18 generated
tools, registry entry, and manifest
- delegated current-user drive discovery via `/me/drive`
- account-aware drive discovery in the smoke scenario
- presentation create/read/update/share/copy/move/delete lifecycle
coverage
- generated provider reference documentation

The shared generator/runtime support is split into #27314.

## Test plan

- [x] `pnpm --filter @mastra/connect test` — 17 files, 343 tests, `tsc
--noEmit` clean
- [x] `pnpm --filter @mastra/connect lint`
- [x] `pnpm turbo build:lib --filter=@mastra/connect`
- [x] provider regeneration — 18 tools, 0 skipped
- [ ] live delegated OAuth smoke run

## Follow-up

Platform launch work remains tracked in PLTFRM-2554.

## Account-aware smoke coverage

- exercises all 18 PowerPoint tools
- reports the selected Microsoft account type in the scenario output
- classifies tenant-directory and SharePoint discovery errors as
capability skips only for explicit personal-account runs
- uses anonymous sharing for personal accounts and organization sharing
for work/school accounts


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR adds tools that let Mastra work with Microsoft PowerPoint files
stored in OneDrive or SharePoint. The tools can find, create, read,
update, share, copy, move, and delete presentations.

## Summary

- Adds 18 Microsoft Graph tools for presentation and drive operations,
sharing, permissions, versions, thumbnails, and content export.
- Registers the `microsoft-powerpoint` provider and adds its manifest
and documentation.
- Uses `/me/drive` to find the current user’s drive when no `userId` is
provided.
- Adds a smoke-test scenario for the presentation lifecycle, with
account-aware handling for personal and work or school accounts.

## Validation

The PR objectives report that the connect test suite passed with 17
files and 343 tests, and that `tsc --noEmit`, lint, library build, and
provider regeneration completed. A live delegated OAuth smoke run is
unchecked.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Grayson Hicks <graysonhicks@gmail.com>
2026-10-26 12:04:14 -04:00
Ward Peeters
ce5d4731ee
chore(deps): update dependencies across the monorepo (#28417)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-26 16:59:30 +01:00
arctic-char
c3bf4fd583
feat(connect): add OneDrive toolset (#26287)
## Summary

Adds the OneDrive toolset to `@mastra/connect` (20 tools).

Generated from the shared NangoHQ/integration-templates pin
(bb789a55bfcf) via the add-provider workflow. Uses Microsoft Graph
through the platform proxy, including `responseType: 'arraybuffer'` for
binary payloads.

Split out of #25597 so each toolset ships as its own reviewable PR.

## Scope

- `packages/connect/src/providers/one-drive/` — `20` auto-generated tool
files, `tools.ts`, `index.ts`, `.manifest.json`
- `packages/connect/src/providers/index.ts` — new import + barrel entry
- `packages/connect/src/__tests__/registry.test.ts` — new ID in the
expected provider list
- Changeset: `@mastra/connect` minor

## Test plan

- [ ] `pnpm --filter @mastra/connect test` passes
- [ ] `pnpm --filter @mastra/connect lint` clean
- [ ] `pnpm --filter @mastra/connect generate:provider-docs` regenerates
`reference/connect/providers.mdx` (run before merging to pick up the new
row and tool count)
- [ ] Smoke scenario authored + `pnpm smoke-test --provider one-drive`
passes against a real connection (tracked in PLTFRM-2550)

## Follow-ups

Tracked in Linear PLTFRM-2550: platform catalog entry, OAuth app,
scopes, smoke scenario, docs, and launch checklist.

## Account-aware smoke coverage

- exercises all 20 OneDrive for Business tools through a run-scoped file
lifecycle
- reads `MASTRA_SMOKE_MICROSOFT_ACCOUNT_TYPE` before making Graph calls
- self-skips with an explicit work/school requirement when a personal
account is selected
- avoids external invitations and cleans up created files and folders


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This adds tools that let applications work with files and folders in
OneDrive through `@mastra/connect`. It also registers and documents the
provider and adds a smoke-test scenario for connected accounts.

## Changes

- Adds 20 OneDrive tools for drive discovery, file and folder
operations, sharing, permissions, search, versions, and uploads.
- Registers the `one-drive` provider and updates the provider
documentation and display name.
- Adds a smoke-test scenario that skips personal Microsoft accounts and
exercises file and folder operations with run-specific names and
cleanup.
- Adds a minor changeset for `@mastra/connect`.

## Testing

The package tests, lint, provider-doc generation, and real-connection
smoke test are listed as unchecked. No passing test results are
reported.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-26 09:21:11 -04:00
dane-ai-mastra[bot]
dac22288b0 chore: version packages 2026-10-25 04:28:20 +00:00
arctic-char
c2e7dcc219
fix(connect): generate Office tools for delegated OAuth (#27314)
## Summary
- adapt shared Microsoft Office templates to resolve the connected
user's OneDrive through `/me/drive` when no user ID is provided
- preserve generic `nango.proxy()`, typed proxy calls, and `randomUUID`
template patterns during generation
- keep the client-credentials variants unchanged while generating
delegated Excel, Word, and PowerPoint toolsets

## Test plan
- `pnpm test` in `packages/connect` (340 tests)
- `pnpm lint` in `packages/connect`
- `pnpm build:lib` in `packages/connect`

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## ELI5

This change helps Mastra find provider templates that are linked under
another name. It also helps generated Microsoft Office tools use the
signed-in user’s OneDrive, while keeping existing ways to make provider
requests available.

## Changes

- Provider discovery now includes symlinked templates that resolve to a
provider with an `actions` entry.
- Office Excel, Word, and PowerPoint drive actions use `/v1.0/me/drive`
when no user ID is provided. When a user ID is present, generation keeps
the user-specific endpoint.
- Provider generation preserves supported `nango.proxy()` and typed
proxy patterns. It also rewrites supported unaliased `randomUUID`
imports to `globalThis.crypto.randomUUID()`.
- `PlatformProxy` now exposes `proxy()`. The method accepts an optional
HTTP method and defaults to `GET`.
- Added tests for proxy behavior, symlinked provider aliases, delegated
Office generation, and supported template patterns.

## Testing

The author reports running `pnpm test` (340 tests), `pnpm lint`, and
`pnpm build:lib` in `packages/connect`. These results were not
independently verified.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-10-23 13:18:47 -04:00
dane-ai-mastra[bot]
dacb190944
chore: version packages (alpha) (#28009)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-23 13:57:18 +02:00
Ward Peeters
461ee61237
fix: repair build and test failures surfaced by the release-PR run (#28139)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-22 16:48:29 +02:00
Dane - AI (Mastra)
40a522c142
chore(deps): update build tools (#27997) 2026-10-22 14:33:21 +02:00
arctic-char
17a574679b
feat(playground): Studio Connections page + end-user connect flow (#26928)
## Summary

Adds the Studio Connections experience and completes the launch-gated
end-user connection flow across `@mastra/connect`,
`@mastra/playground-ui`, and the Playground app.

## Studio Connections page

- Add `/connections` with separate **Your connections** and **Global
connections** sections.
- Detect whether `userConnectRoutes()` is mounted through `GET
/connect/providers`.
- Distinguish not-mounted (`404`) from identity/configuration errors
(`401`).
- Create sessions, open the launch gate, poll every two seconds for up
to five minutes, and refresh the list after settlement.
- Treat polling `404`s as pending during eventual consistency.
- Handle blocked or closed popups without an impure React state update.
- Allow disconnecting user-scoped connections; global connections remain
read-only.
- Register the route as public in the Studio permission map because the
server-side end-user resolver is the authorization boundary.

## OAuth launch gate

- Add `GET /connect/connections/:id/launch`.
- Resolve the current resource identity before requesting the vendor URL
from Platform.
- Redirect only when Platform confirms the pending session belongs to
the same project/resource scope.
- Preserve not-found parity for cross-user, expired, unknown, global, or
settled sessions.

Platform support is provided by
[mastra-ai/platform#3500](https://github.com/mastra-ai/platform/pull/3500).

## Built-in connection prompt

- Auto-inject `request_connection` for resource-scoped tool resolution
when `connectPrompt` is enabled.
- Make `connectPrompt: true` the default and support `connectPrompt:
false` as an opt-out.
- Render the structured tool payload as a Studio chat card with provider
status, Connect actions, launch-gate behavior, polling, and a Connected
state.
- Move reusable connection types, hooks, and UI into the
`@mastra/playground-ui` connect domain.

## Project-managed provider policy

- Load the project's `endUserProviders` setting from Platform when
`providers` is omitted.
- Preserve code-level precedence: an explicit application allowlist wins
over the project setting.
- Treat an unconfigured project setting as the full catalog, an empty
project list as disabled, and a non-empty list as an allowlist.
- Cache project settings for 30 seconds and deduplicate concurrent
lookups.
- Apply the effective policy consistently to `userConnectRoutes()` and
the built-in `request_connection` tool.

The dedicated documentation is split into
[#27334](https://github.com/mastra-ai/mastra/pull/27334).

## Platform stack

-
[mastra-ai/platform#3479](https://github.com/mastra-ai/platform/pull/3479)
— schema
-
[mastra-ai/platform#3482](https://github.com/mastra-ai/platform/pull/3482)
— API, enforcement, and project provider settings
-
[mastra-ai/platform#3485](https://github.com/mastra-ai/platform/pull/3485)
— Platform UI and provider settings controls
-
[mastra-ai/platform#3500](https://github.com/mastra-ai/platform/pull/3500)
— launch gate

## Test plan

- `pnpm --filter @mastra/connect test`
- `pnpm --filter @mastra/connect exec tsc --noEmit`
- `pnpm --filter @mastra/connect lint`
- `pnpm --filter @mastra/playground-ui test`
- `pnpm --filter @mastra/playground test`
- Verify route capability gating, identity failures, global/user
separation, disconnect/refetch, popup fallback, launch-gate ownership,
project-policy inheritance and overrides, prompt-tool filtering, and
chat-card settlement.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR adds a Connections area where users can connect, view, and
disconnect provider accounts. It also lets Studio chat ask users to
connect a provider when a tool needs access.

## Summary

- Added the `/connections` Playground page and navigation entry.
- Added user and global connection views, provider search, connection
setup, disconnect actions, status polling, and error states.
- Added reusable connection hooks and UI components in
`@mastra/playground-ui`.
- Added headless and hosted authorization flows, launch-gate polling,
popup handling, retries, and cancellation.
- Added the built-in `request_connection` tool for resource-scoped
`tools()` calls.
- Added Studio rendering for `request_connection` results through a new
connect tool card.
- Added `userConnectRoutes()` support for provider catalogs, sessions,
statuses, disconnects, and launch redirects.
- Added session ownership and resource identity validation.
- Added project-managed provider policies with code allowlists taking
precedence over Platform settings.
- Added full-catalog defaults, disabled empty policies, 30-second
caching, and concurrent lookup deduplication.
- Preserved visibility and management of existing connections after
provider policies change.
- Updated public route registration, documentation, changesets,
fixtures, and tests.

## Verification

Reported verification includes:

- 415/415 `@mastra/connect` tests passed.
- Connect lint and build completed.
- 17 focused Playground connection tests passed.
- Playground UI typecheck, lint, and build completed.
- Focused Remark/Vale checks completed.
- Changeset status and `git diff --check` completed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Stack Audit <stack-audit@example.invalid>
Co-authored-by: Justin Levine <20596508+jal-co@users.noreply.github.com>
2026-10-21 17:04:01 -04:00
dane-ai-mastra[bot]
4c22623ea3 chore: version - exit prerelease mode 2026-10-21 11:26:39 +00:00
dane-ai-mastra[bot]
595eae144e
chore: version packages (alpha) (#27914)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-21 09:21:52 +02:00
Daniel Lew
f54f8b2df2
feat: Studio UI for MCP server events (#27674)
Refs #27278

**Stack:** #27320 (PR0 base) → #27326 (PR1 client) → #27324 (PR2 server)
→ #27333 (PR3 webhook) → #27330 (PR4 signals) → #27331 (PR5 interop) →
**this PR (PR6 Studio)**

## What

Studio can now inspect the events an MCP server declares (experimental):

- **MCP server page**: an "Events" list shows each event type with its
delivery modes (push / poll / webhook). Servers without events look
exactly as before and make no extra request.
- **Event drawer** (`/mcps/:serverId?event=<name>`): the Overview tab
shows the argument and payload schemas. The Playground tab has an
arguments form built from the input schema and a live panel:
  - Push types get Start/Stop; poll-only types get "Poll once".
- Occurrences are listed newest first, with collapsible JSON data, the
cursor (copyable), and a "Gap: events may have been skipped" marker when
the server reports truncation.
- Under `mastra dev`, emit-fed types get "Send test event" from the
payload schema. The test occurrence (eventId `mastra-test-…`, "test"
badge) arrives through the open stream.
  - Closing the drawer or navigating away aborts the stream.
- **Agent threads**: MCP event notifications read `<server> · <event>`
(or `… · subscription ended`) instead of `mcp-events / mcp-event`, keep
priority/status badges, label the body as untrusted MCP server data, and
show a "gap" badge on truncated occurrences.

## How

- `@mastra/core`: optional `getEventsInfo()` / `getEventsInspector()` on
`MCPServerBase` plus info/frame types and stable error ids. Not
abstract; servers without events are unaffected.
- `@mastra/mcp`: the `events/poll` and `events/stream` handler bodies
moved into `pollEvent` / `openEventStream` (pure move; existing tests
unchanged), and a new inspector calls them, so Studio uses the same code
path as MCP clients. Test emits are stamped through the existing
`eventId` option (`emit()` has no `_meta` option), so the wire is
unchanged.
- `@mastra/server`: `GET /mcp/:serverId/events`, `POST
…/:eventName/poll`, `POST …/:eventName/stream` (SSE), `POST
…/:eventName/emit`. All `requiresAuth`. Emit is registered statically
(keeps generated route types env-independent) but returns 404 unless
`MASTRA_DEV === 'true'`. Known errors map to generic 4xx; anything else
is logged and returns a generic 500. Poll and stream share
`mcp:execute`; emit is `mcp:write`. `events_capability` added to server
list/detail.
- `@mastra/client-js`: `getMcpServerEvents`, `pollMcpServerEvent`,
`streamMcpServerEvent` (async iterable, cancelled on abort or break),
`emitMcpServerEvent`.

Traces: `AGENT_RUN` spans already carry `attributes.signal` (including
`server`, `event`, `kind`, `truncated`), and the span panel's Attributes
section shows it, so no trace UI change.

## Test plan

- `packages/mcp`: `pnpm test:server` — 213 passed (incl. new inspector
tests: abort and disconnect-before-first-frame leave no listener, server
close ends local streams).
- `packages/server`: MCP handlers + server-adapter — 455 passed
(list/poll/stream/emit, abort cleanup, emit gating on/off `MASTRA_DEV`,
auth with a provider configured, no upstream detail in 500s); generators
+ `check:permissions` clean.
- `client-js`: `resources/mcp.test.ts` — 17 passed.
- `packages/playground`: MCP domain MSW tests — 37 passed (events list
gating, schemas, stream start/stop/unmount abort, gap marker, poll-only,
error state, test-emit visibility and round trip).
- `packages/playground-ui`: chat messages — 237 passed.
- `tsc --noEmit` on core, mcp, server, client-js, playground,
playground-ui; eslint/prettier on changed files.

## Screenshots

Taken from a project created with `create-mastra`, linked to this stack
and run with `mastra dev`.

<details><summary>MCP server page: Events section with delivery
badges</summary>

![MCP server page: Events section with delivery
badges](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/00-server-events-list.png)

</details>

<details><summary>Server without events: page unchanged</summary>

![Server without events: page
unchanged](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/01-plain-server-no-events.png)

</details>

<details><summary>Event drawer, Overview: argument and payload
schemas</summary>

![Event drawer, Overview: argument and payload
schemas](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/02-drawer-overview-ticket.png)

</details>

<details><summary>Playground tab: arguments form, not
listening</summary>

![Playground tab: arguments form, not
listening](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/03-playground-idle.png)

</details>

<details><summary>Listening, no occurrences yet</summary>

![Listening, no occurrences
yet](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/04-live-empty.png)

</details>

<details><summary>Live occurrences (project A only; B filtered), incl. a
"test" event sent from Studio</summary>

![Live occurrences (project A only; B filtered), incl. a "test" event
sent from
Studio](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/05-live-occurrences.png)

</details>

<details><summary>Occurrence expanded to JSON</summary>

![Occurrence expanded to
JSON](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/06-occurrence-expanded.png)

</details>

<details><summary>Stopped: cursor kept</summary>

![Stopped: cursor
kept](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/07-stopped.png)

</details>

<details><summary>Gap marker after the server buffer overflowed while
stopped</summary>

![Gap marker after the server buffer overflowed while
stopped](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/08-gap-marker.png)

</details>

<details><summary>Poll-only type: "Poll once", no Start or test
emit</summary>

![Poll-only type: "Poll once", no Start or test
emit](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/09-poll-only-idle.png)

</details>

<details><summary>Poll-only results after polling ("Polled")</summary>

![Poll-only results after polling
("Polled")](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/10-poll-only-results.png)

</details>

<details><summary>MCP servers list</summary>

![MCP servers
list](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/11-mcps-list.png)

</details>

<details><summary>Agent thread: notices read "http ·
ticket.created"</summary>

![Agent thread: notices read "http ·
ticket.created"](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/20-thread-mcp-event-notices.png)

</details>

<details><summary>Notice expanded: untrusted MCP event data</summary>

![Notice expanded: untrusted MCP event
data](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/21-thread-mcp-event-expanded.png)

</details>

<details><summary>Trace of the signal-triggered agent run</summary>

![Trace of the signal-triggered agent
run](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/22-trace-agent-run.png)

</details>

<details><summary>AGENT_RUN span: signal attribute with server and
event</summary>

![AGENT_RUN span: signal attribute with server and
event](https://raw.githubusercontent.com/mastra-ai/mastra/a0d5fbbcfdd3d97726bd9636595d7048e060ca15/24-trace-signal-attribute.png)

</details>


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->

## ELI5

This PR lets Studio show and monitor events from MCP servers. Users can
view event details, receive or poll events, see missed events, and send
test events during development.

## What changed

- Added experimental MCP event APIs across core, MCP, server, and client
packages.
- Added event discovery, polling, SSE streaming, cursors, gap markers,
authorization, stream limits, and sanitized errors.
- Added `events_capability` to MCP server metadata.
- Added Studio event lists and drawers with schemas, delivery modes,
event history, polling, streaming, and development-only test emission.
- Added MCP event notifications to agent threads with untrusted-data
labels and gap indicators.
- Added client methods:
  - `getMcpServerEvents`
  - `pollMcpServerEvent`
  - `streamMcpServerEvent`
  - `emitMcpServerEvent`
- Updated `@mastra/mcp` and `@mastra/connect` to require `@mastra/core
>=1.79.0-0`.
- Added changesets and broad unit, route, client, MSW, and UI test
coverage.

## Validation

The author reports successful test, type-check, lint, formatting,
permission, generator, peer-dependency, and import checks. Reported test
counts include MCP server 228, client 493, server MCP handlers 60,
client-js 797, playground MCP 39, and playground UI 238.

Final test status is not independently established here.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-10-20 22:45:08 -04:00
dane-ai-mastra[bot]
dfe15b70fc
chore: version packages (alpha) (#27861)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-10-20 14:35:52 -07:00
arctic-char
828b8f291e
feat(connect): end-user connections — resource-scoped tools + userConnectRoutes() (#26923)
## Summary

Adds the core `@mastra/connect` APIs for resolving integration tools and
connection management in an end-user resource scope.

`tools({ resourceId })` resolves both project-global connections and
connections owned by that resource. `userConnectRoutes()` provides a
mountable HTTP surface for listing providers, creating connection
sessions, polling status, disconnecting, and serving a hosted connection
page.

## Resource-scoped tools

- Accept `resourceId` as a string or callback.
- Send the resource assertion on Platform tool, credential, and MCP
requests.
- Resolve global and resource-scoped connections together.
- Maintain bounded per-resource snapshots with deduplicated refreshes
and cooldown after failures.
- Share MCP client state across tools instances while bounding the
shared-state registry.
- Defer evicted-snapshot disconnects briefly so in-flight requests can
finish safely.

## `userConnectRoutes()`

- Resolve the application's project and end-user resource identity.
- Expose provider catalog, connection list/detail, session creation,
polling, disconnect, and a hosted connection page.
- Require an explicit code-level provider allowlist in this base PR and
return not-found parity outside it.
- Enforce resource ownership before exposing or mutating a connection.
- Forward the resource assertion to Platform routes.
- Validate `returnTo` as a same-site relative path to prevent open
redirects.
- Redact Platform errors before returning them to the browser.
- Provide a self-contained hosted popup/poll flow with a two-second
polling interval and five-minute cap.

The follow-up [#26928](https://github.com/mastra-ai/mastra/pull/26928)
makes `providers` optional, inherits project-managed provider policy,
adds the launch-gated redirect, injects the built-in connection prompt
tool, and adds the Studio UI. Provider-policy documentation is split
into [#27334](https://github.com/mastra-ai/mastra/pull/27334).

## Platform dependencies

-
[mastra-ai/platform#3479](https://github.com/mastra-ai/platform/pull/3479)
— schema
-
[mastra-ai/platform#3482](https://github.com/mastra-ai/platform/pull/3482)
— API and enforcement

## Test plan

- `pnpm --filter @mastra/connect test`
- `pnpm --filter @mastra/connect exec tsc --noEmit`
- `pnpm --filter @mastra/connect lint`
- `pnpm --filter @mastra/connect build:lib`
- Verify global and resource-scoped tool resolution, cache
isolation/eviction, MCP assertions, route identity enforcement, provider
allowlisting, and open-redirect rejection.



<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5

This PR lets each end user safely connect their own services. It adds
tools and routes that find, create, monitor, and remove connections for
the correct user.

## What changed

- Added resource-scoped connection resolution with `tools({ resourceId
})`.
- Added resource assertions to Platform, credential, and MCP requests.
- Added bounded caching, shared MCP clients, refresh handling, and
disconnect cleanup.
- Added `userConnectRoutes()` for provider listing, connection sessions,
status checks, connection management, disconnect operations, and hosted
connection pages.
- Enforced provider allowlists and resource ownership.
- Rejected unsafe `returnTo` redirects.
- Added a hosted popup flow with two-second polling and a five-minute
timeout.
- Added `resourceId` support to `credential()`.
- Exported the new routes and supporting types.
- Added documentation, unit tests, and type tests.

## Validation

The supplied context lists tests, type checks, linting, and builds, but
it does not report execution results.

## Review status

No substantive review findings or requested changes were reported.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: Stack Audit <stack-audit@example.invalid>
2026-10-20 14:01:35 -04:00
dane-ai-mastra[bot]
03e4a73b78
chore: version packages (alpha) (#27375) 2026-10-19 20:45:49 +02:00