mirror of
https://github.com/mastra-ai/mastra.git
synced 2026-11-17 08:44:46 +00:00
1,889 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> |
||
|
|
18168d518c |
feat(playground): show the built-in MCP server in Studio (#29932)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
8d4abc4f88 |
chore(deps): Vanta 2026-11-12 — raise undici to 8.12.4 / 7.30.2 (#30205) | ||
|
|
6ad8e7eb9d |
feat(ui): one settings layout across Studio, Factory and Platform (#29400)
## Description Settings pages in Studio, Factory and Platform each had their own layout: different widths, section headers with buttons, add rows at the bottom of lists, fields starting at different x positions. This gives all three one layout, built from reusable Playground UI components: - A 640px page column with the title above the sections. - Each section is a dimmed title above one borderless card. The card owns all row spacing (14px padding, inset hairlines), so rows carry no padding of their own. - Settings rows: label and description on the left, control on the right. Text fields share one width, selects hug their value up to that width, switches and buttons keep their size. - Lists: a count and the list's action in a header row at the top of the card, one empty row (text plus the same action) when there's nothing in it, and `SettingsItem` rows with one icon tile size, so every list lines up. - Input, InputGroup and select values use the regular-weight `text-body-sm`, like Textarea. This is the Playground UI, Studio and Factory half. The Platform half, mastra-ai/platform#4174, pins a snapshot of this branch. ## Before / After Every settings page in Studio and Factory, `origin/main` on the left and this branch on the right (1440×1800, dark). Platform's pages are in mastra-ai/platform#4174. | Before | After | | --- | --- | | <br>Studio · Settings | <br>Studio · Settings | | <br>Factory · My account | <br>Factory · My account | | <br>Factory · Preferences | <br>Factory · Preferences | | <br>Factory · Connections | <br>Factory · Connections | | <br>Factory · Models | <br>Factory · Models | | <br>Factory · Memory | <br>Factory · Memory | | <br>Factory · Skills | <br>Factory · Skills | | <br>Factory · Tools | <br>Factory · Tools | | <br>Factory · Behavior | <br>Factory · Behavior | | <br>Factory · Repositories | <br>Factory · Repositories | | <br>Factory · Work Intake | <br>Factory · Work Intake | | <br>Factory · Work board | <br>Factory · Work board | | <br>Factory · Manage Factory | <br>Factory · Manage Factory | One loading state everywhere (`SettingsSkeleton`, New/Settings Loading story), built from the real rows and list items:  ## What changed Playground UI (`@mastra/playground-ui/new/settings`): - `SettingsLayout`: the page column and title (`header` for an app's own header). - `SettingsTitle`: dimmed, inset to the card; `info` keeps a section description as a tooltip. - `SettingsContainer`: the card, owning row spacing. Rows with nothing in them take no space, so a list can always render its notice row. - `SettingsRow` / `SettingsFieldsetRow`: control column with shared field width; selects hug (`fieldTriggerWidthStyle` reads `--field-max-width`). With `controlPlacement="below"` the control fills the row. - New `SettingsListHeader`, `SettingsEmptyRow` (now takes an `action`), `SettingsItem`, `SettingsItemIcon`. `SettingsNoticeRow` stays. - New `SettingsSkeleton`: the one loading state for settings, placeholder rows (`variant="row"`) or list items (`variant="item"`) inside the same card. - Removed `SettingsAddRow` and `SettingsContainer`'s `variant`. `Section`'s deprecated rows keep their old look on their own code. Studio: the settings page uses `SettingsLayout` with its title in the column. URL, API prefix and request headers are one "Mastra connection" card. They only work as a set, so edits stay a draft: an "Unsaved changes · Discard · Save changes" row shows up once something changed, and saving applies all of it at once. This replaces "Save configuration", which sat under the headers and read as saving only them. The first-run connect screen keeps its own form. `@mastra/react`: `useAuthCapabilities` and `usePermissionPatterns` keep their last result while a new client loads (`keepPreviousData`). Before, every connection change gave them a new query key, and the auth and permission guards showed a full-page spinner until it answered, so the page went blank on each save. Factory: every settings page is on the shared components. Section stacks are fragments under `SettingsLayout`, lists with an action use the header or empty row (repositories, custom providers, speech-to-text keys, Connect, intake pickers), and logo and icon rows are `SettingsItem`s. Factory's own `SettingsAddRow`, `SettingsActionRow`, `SettingsSectionHeader` and `SettingsRowsSkeleton` are gone. Every settings loading state is `SettingsSkeleton` (Skills used to show plain "Loading skills…" text). Models keeps its routing diagram; its lane and defaults cards use the borderless settings surface. Work board keeps its form layout. Memory is split into Personal memory and Factory memory, and Build history is its own section. ## Testing 1. `mdev up storybook`: New/Settings, Page, Controls and Loading stories. 2. `mdev up studio`, open Settings: change the URL, prefix or a header and the unsaved row appears; Discard restores; Save applies everything without the page going blank. Change the theme. 3. Factory settings: every section, especially Models. Playground UI, Studio and Factory typecheck clean; the settings, Studio connection, Factory settings and Models tests pass, and CI is green. Not seen locally: a loading state on screen (they resolve too fast), Models with providers connected, and Factory's Memory form (no models in the local org). ## Related issue(s) Fixes PLTFRM-3135 ## Type of change - [ ] Bug fix (non-breaking change that fixes an issue) - [x] 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 - [ ] 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 <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes settings pages in Playground UI, Studio, and Factory use a more consistent layout. It adds shared building blocks so settings and lists are easier to organize and read. ## Summary - Add shared settings components in Playground UI, including a centered 640px layout, consistent containers and rows, list headers, empty and notice rows, and settings items. - Update the Playground settings page and Studio connection form to use the shared layout. Add `CopyInput` for read-only values with a copy action. - Update Factory settings, workspace, and connection views to use the shared components. Separate Personal memory and Factory memory, and give Build history its own section. - Remove older layout helpers, including `SettingsAddRow`, `SettingsSectionHeader`, and the settings container variant. - Add or update component tests and Storybook examples for the new settings patterns. **Checks:** not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
05a6931471 |
chore: version packages (alpha) (#30172)
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 ## @mastra/client-js@1.60.0-alpha.12 ### Minor Changes - Allow `querySpans()` to sort by `model` or `provider`. ([#30096](https://github.com/mastra-ai/mastra/pull/30096)) ```ts orderBy: [{ field: 'model', direction: 'asc' }]; ``` ### Patch Changes - The generated route types for scores now include the `SCORER` and `PROCESSOR` entity types, matching the entity types experiments can emit. ([#30145](https://github.com/mastra-ai/mastra/pull/30145)) - Add span-local error counts. ([#30088](https://github.com/mastra-ai/mastra/pull/30088)) - Updated dependencies [[`56f654f`]( |
||
|
|
43d1e9c16d |
fix(ui): fix hover highlight not covering the corner (#30047)
Hovering a card (the credits card in Platform's sidebar, project cards, any clickable `Card`) tinted a second rounded shape 1-2px inside the card, so a thin untinted ring showed along the edge, widest at the corners. Now the hover tint is the surface's own background, so it covers the whole surface and follows any corner radius exactly. The fix is in the shared `state-layer` utility, so every surface that uses it changes. ## Before / After Hovered, dark, zoomed 4x on the bottom-left corner. Look for the darker crescent at the corner in "Before". | | Before | After | | --- | --- | --- | | Platform project card | <img src="https://github.com/user-attachments/assets/7ed1f23b-c0f0-45b0-8313-f1b3ff39058c" width="300" alt="Before project"> | <img src="https://github.com/user-attachments/assets/bb3a627a-668a-4002-9392-57dc8f5f3520" width="300" alt="After project"> | | Platform credits card | <img src="https://github.com/user-attachments/assets/88896a43-4a0f-451f-950f-865d8917b2cf" width="300" alt="Before credits"> | <img src="https://github.com/user-attachments/assets/04700558-04ee-4ece-a240-428964035c48" width="300" alt="After credits"> | | `CardLink` | <img src="https://github.com/user-attachments/assets/00675559-99de-4ccf-ac54-d87c53ac74b9" width="300" alt="Before card"> | <img src="https://github.com/user-attachments/assets/bbe15805-fd38-4282-88da-3ca12efc94fd" width="300" alt="After card"> | | Composer attachment | <img src="https://github.com/user-attachments/assets/6bdf4093-2dad-4a83-85be-003dcdc93a7d" width="300" alt="Before attachment"> | <img src="https://github.com/user-attachments/assets/d325d318-7eea-4554-b489-12b7f7c011b7" width="300" alt="After attachment"> | | Workflow edge Data button | <img src="https://github.com/user-attachments/assets/580d836d-6cc0-4f78-87bb-f559d9c614d7" width="300" alt="Before edge"> | <img src="https://github.com/user-attachments/assets/a0c68b78-0e34-43e4-b102-eb1d81dd8c15" width="300" alt="After edge"> | | Ask-user option | <img src="https://github.com/user-attachments/assets/7611683d-9b2c-453a-a674-a3f9b5950272" width="300" alt="Before ask"> | <img src="https://github.com/user-attachments/assets/105ad584-4a9c-4f18-b10b-f3cf553ef00b" width="300" alt="After ask"> | ## What changed - `state-layer` paints its hover/press tint as a flat `background-image` over the element's fill, instead of a `::before` overlay inset by 1px. The browser clips it to the element's own shape, borders and inset-shadow rims draw over it, and `position`, `isolation` and the negative z-index are gone. `surfaceGroupStateLayerStyle` does the same. - Two consumers painted on the old layer and move to the new one: the composer attachment's dark fill goes to `--surface-tint`, and the edge Data button's selected fill becomes the same `--fill` image the utility uses for press. - 14 files only re-sort the `state-layer` class (the formatter orders it with the background utilities now). ## Why The overlay existed to keep the tint layered over an opaque fill (swapping `background-color` for a translucent rung makes the surface see-through) and to let it fade. It was shrunk 1px so it wouldn't cover the inset rim, which is what made the second shape. A background image keeps the layering and needs no shrinking. It can't fade, so these hovers are now instant, in line with the other instant-hover changes. ## Testing 1. Platform home: hover a project card. The tint reaches the edge, no darker crescent at the corner. Same for the sidebar Credits card. 2. Storybook, Layout/Card "Interactive links", AI/Composer attachments, Workflows/Edge data, AI/Ask user: hover each. Same result. 3. Workflows/Edge data "External inspector": click Data, move the pointer away. It keeps the selected fill. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes hover and press highlights cover the full shape of cards and buttons. Highlights now follow rounded corners, remain below borders and inner shadows, and switch instantly. ## Summary - Replaced the inset `::before` state layer with clipped `background-image` fills. - Updated grouped surfaces to use the same highlight approach. - Moved composer attachment fills to `--surface-tint`. - Preserved the selected fill for the workflow edge Data button. - Updated state-layer documentation and the theme export test. - Reordered `state-layer` classes in affected consumers. - Added a patch changeset for `@mastra/playground-ui`. **Scope:** 21 files changed; 48 insertions and 63 deletions. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
d97d3c5fd8 |
chore: version packages (alpha) (#30167)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
a4258a989c |
chore: version packages (alpha) (#30127)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
055a8c3b82 | chore: version packages | ||
|
|
7c40bc84b6 |
fix(react): load the Studio review queue page by page (#29291)
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> |
||
|
|
9e82af0237 |
chore: version packages (alpha) (#30074)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
b0ef22e7bf |
feat(schedules): Add bounded one-off schedules (#25131)
> Opened by @abhiaiyer91 Refs #24610 ## Summary Schedules can now fire once or stop after a given time, so you no longer need to pin a cron expression to a date and clean it up yourself. - **New `completed` status**: the scheduler and timing reconciliation set it when no automatic fires remain. It's written in the same atomic `nextFireAt` check-and-set used to claim a run, so a schedule still fires only once across instances. A cron with no future occurrence left also moves to `completed` instead of erroring. `pause`/`resume` on a completed schedule return 409. Changing `runAt`/`endAt` reactivates it only when the resulting timing can still fire. `list()` hides completed schedules unless you pass `status: 'completed'`. - **Declarative workflow schedules**: `createWorkflow({ schedule: { runAt } })` and `{ cron, endAt }` are supported. Past times are accepted so redeploys don't fail, and a completed schedule isn't re-armed unless its timing changes. - **Trigger kind**: one-off fires report `trigger.kind: 'once'`. - `run(id)` doesn't complete a one-off schedule. ## Surfaces - **Core**: types, validation, scheduler claim logic, create/update/pause/resume/list, declarative sync. - **Storage**: new nullable `run_at`/`end_at` columns for libsql, pg, mysql, mongodb, spanner, convex and in-memory. Existing columns are untouched: one-off schedules store `cron` as `''`. `updateScheduleNextFire` takes an optional `newStatus`. - **Server/client-js/CLI**: request bodies accept `runAt`/`endAt` (one-of rule checked in the schema). Responses include the new fields and `completed`. Route types and CLI route metadata regenerated. - **Studio**: shows the run time for one-off schedules, shows the `endAt` bound, adds a `completed` badge and hides pause/resume for completed schedules. - **Docs + changeset.** ## Not in this PR (remaining #24610 work) - ISO 8601 string inputs for `runAt`/`endAt` (numbers and `Date` are accepted today). - The template `schedule_once` tool. ## Test plan - [x] core: schedules, scheduler, cron, schedule-config and scheduler integration tests (260 passing), clean `tsc` - [x] Shared adapter suite gained tests for `runAt`/`endAt` round-trip and atomic status CAS. Passing on libsql, pg, mysql and mongodb (Docker), plus convex server tests. **Not run on Spanner (no emulator available); typecheck only.** - [x] server schedules handler tests (51 passing, including one-off/bounded creation and body validation) - [x] client-js and playground typecheck clean; playground schedules tests passing <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Schedules can now run once at a chosen time or repeat until a chosen end time. They complete when their planned runs are over, and changing their timing can make them active again. ## Summary - Added `runAt` for one-off agent and workflow schedules. API-created schedules require a future `runAt`; declarative workflow schedules can register past times as `completed`. - Added `endAt` for cron schedules. A schedule becomes `completed` when its next run would occur after `endAt`, or when no future run remains. - Completed schedules cannot be paused or resumed. Timing changes can reactivate a completed schedule when a future run remains. `list()` hides completed schedules unless callers filter with `status: 'completed'`. - Resuming a paused one-off schedule after its `runAt` has passed allows it to fire on the next scheduler tick. Calling `run(id)` manually does not complete a one-off schedule. - Added the `once` trigger kind for scheduled one-off agent fires. Manual runs remain `manual`. - Declarative workflow schedules preserve completed status across redeploys when timing is unchanged. Timing changes can re-arm them. - Updated schedule APIs, storage adapters, Studio, and documentation. Storage persists `runAt` and `endAt` and supports atomic status updates. ## Checks Current-head CI, build, and test results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> --------- Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com> Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com> Co-authored-by: NikAiyer <nick.aiyer@gmail.com> Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com> Co-authored-by: Ehindero Israel <iehindero419@stu.ui.edu.ng> |
||
|
|
3a6ca42696 |
chore: version packages (alpha) (#30026)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
9ee332c1fd |
feat(ui): rounded squircle favicon for Studio, Factory and docs (#30040)
The tab icon gets rounded corners, matching the rounded style used everywhere else in the UI. Today's tile has a 5% corner radius, which reads as a plain square at 16px. The new tile is a squircle (superellipse, n=7), the smooth corner shape app icons use. The logo is at 80% of the tile width and centered, so it has a little room from the corners. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/de26b6ac-83db-4212-9a46-a73b36daa714" width="400" alt="Before"> | <img src="https://github.com/user-attachments/assets/d1f885ba-c647-4fa6-9a7d-58e7b72dcf02" width="400" alt="After"> | ## What changed - Studio (`mastra-dark-tile.svg`, green dev variant), Factory (`mastra.svg`, `mastra-dev.svg` and the four session status icons) and the docs `favicon.ico` all come from the same source, so they stay identical. - Factory's status dot still sits on the logo's bottom-left dot. - `mastra studio` now serves `/mastra-dark-tile.svg` as a file. It still checked for the old `/mastra.svg` name, so the tab got the page HTML instead of the icon. ## Scope - Factory's PWA and apple-touch PNGs stay as they are: the OS masks those itself, so a rounded tile inside them would look double-rounded. - Platform and mastra.ai get the same icon in their own PRs. ## Testing 1. Run Studio or Factory: the tab shows the rounded tile (green logo in dev). 2. Factory: open a session, and the colored status dot shows on the same rounded tile. 3. Docs: the tab shows the rounded tile from `favicon.ico`. 4. Run `mastra studio`: the tab shows the rounded tile. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR makes the Mastra favicon more rounded across Studio, Factory, and the docs. It also makes Studio serve the correct icon file so browsers display it. ## Changes - Updated Studio, Factory, and Factory session-status SVGs with the rounded tile design. - Replaced the docs `favicon.ico`. - Updated Studio asset handling to serve `/mastra-dark-tile.svg`, including nested paths. - Added a test for serving the Studio favicon instead of the SPA HTML. - Added patch changesets for `mastra` and `@mastra/factory`. ## Validation - Test results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
695599b8ab |
chore: version packages (alpha) (#30013)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
8bce7717eb |
chore: version packages (alpha) (#29986)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
c22107fce3 |
chore(deps): update dependency @ai-sdk/provider-utils@>=3.0.0 <3.0.38 to v3.0.45 (#29844) | ||
|
|
23cc34a9c5 |
chore: version packages (alpha) (#29938)
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.28.0-alpha.6 ## @mastra/code-sdk@1.19.0-alpha.6 ## @mastra/playground-ui@69.0.0-alpha.7 ## @mastra/client-js@1.60.0-alpha.6 ## @mastra/react@1.15.0-alpha.6 ## @mastra/deployer-cloud@1.83.0-alpha.6 ## @mastra/longmemeval@1.1.42-alpha.6 ## @mastra/opencode@0.1.42-alpha.6 ## create-factory@0.4.3-alpha.6 ## mastracode@0.50.0-alpha.6 ## @mastra/agent-builder@1.2.1-alpha.3 ## mastra@1.39.0-alpha.6 ## @mastra/core@1.83.0-alpha.6 ## @mastra/deployer@1.83.0-alpha.6 ## @mastra/editor@0.17.1-alpha.4 ## @mastra/mcp@2.9.0-alpha.3 ## @mastra/mcp-docs-server@1.3.13-alpha.9 ## @mastra/memory@1.41.1-alpha.3 ## @mastra/rag@2.7.3-alpha.2 ## @mastra/schema-compat@1.3.18-alpha.0 ## @mastra/server@1.83.0-alpha.6 ## @mastra/elysia@0.1.23-alpha.6 ## @mastra/express@1.5.27-alpha.6 ## @mastra/fastify@1.5.27-alpha.6 ## @mastra/hono@1.7.25-alpha.6 ## @mastra/koa@1.7.27-alpha.6 ## @mastra/nestjs@0.3.0-alpha.6 ## @mastra/next@0.2.41-alpha.6 ## @mastra/server-adapters-test-suite@0.3.0-alpha.3 ## @mastra/tanstack-start@0.2.41-alpha.6 ## @mastra/upstash@1.6.1-alpha.0 ## @mastra/vectorize@1.1.5-alpha.0 ## @mastra/voice-google-gemini-live@0.14.19-alpha.0 ## @mastra/voice-openai-realtime@0.14.9-alpha.0 ## @mastra/voice-xai-realtime@0.2.18-alpha.0 ## @mastra/inngest@1.11.2-alpha.4 ## @mastra/temporal@0.6.0-alpha.6 ## create-mastra@1.39.0-alpha.6 ## @internal/playground@1.39.0-alpha.6 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
779d2875b1 |
chore: version packages (alpha) (#29912)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/auth-studio@1.4.0-alpha.1 ## @mastra/factory@0.28.0-alpha.5 ## @mastra/mcp-apps-components@0.1.0-alpha.5 ## @mastra/playground-ui@69.0.0-alpha.6 ## @mastra/client-js@1.60.0-alpha.5 ## @mastra/react@1.15.0-alpha.5 ## @mastra/deployer-cloud@1.83.0-alpha.5 ## @mastra/longmemeval@1.1.42-alpha.5 ## @mastra/opencode@0.1.42-alpha.5 ## create-factory@0.4.3-alpha.5 ## @mastra/code-sdk@1.19.0-alpha.5 ## mastracode@0.50.0-alpha.5 ## @mastra/agent-builder@1.2.1-alpha.2 ## mastra@1.39.0-alpha.5 ## @mastra/core@1.83.0-alpha.5 ## @mastra/deployer@1.83.0-alpha.5 ## @mastra/editor@0.17.1-alpha.3 ## @mastra/mcp@2.9.0-alpha.2 ## @mastra/mcp-docs-server@1.3.13-alpha.8 ## @mastra/memory@1.41.1-alpha.2 ## @mastra/rag@2.7.3-alpha.1 ## @mastra/server@1.83.0-alpha.5 ## @mastra/elysia@0.1.23-alpha.5 ## @mastra/express@1.5.27-alpha.5 ## @mastra/fastify@1.5.27-alpha.5 ## @mastra/hono@1.7.25-alpha.5 ## @mastra/koa@1.7.27-alpha.5 ## @mastra/nestjs@0.3.0-alpha.5 ## @mastra/next@0.2.41-alpha.5 ## @mastra/server-adapters-test-suite@0.3.0-alpha.2 ## @mastra/tanstack-start@0.2.41-alpha.5 ## @mastra/libsql@1.30.0-alpha.2 ## @mastra/turso@0.1.21-alpha.2 ## @mastra/inngest@1.11.2-alpha.3 ## @mastra/temporal@0.6.0-alpha.5 ## create-mastra@1.39.0-alpha.5 ## @internal/playground@1.39.0-alpha.5 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
3184be5329 |
fix(playground): swap Studio pages instantly instead of crossfading them (#29918)
Studio now swaps pages instantly. Every Studio link and `navigate()` call asked the browser for a view transition, so each click froze the old page, sidebar included, and crossfaded it into the new one over 250ms. The previous sidebar item faded out while the content blended, which made every click feel late. Products like Linear and Vercel's dashboard don't animate between top-level pages. ## Before / After Same clicks (Prompts → Agents → Workflows → Prompts → Agents). Before: https://github.com/user-attachments/assets/af1c93a6-7c1e-44d7-9fb7-ff594c12ad1b After: https://github.com/user-attachments/assets/6def0f84-fc0d-4fbe-9f3f-11b2d486d89d ## What changed - Studio's `Link` and the `navigate` it gives Playground UI no longer pass `viewTransition`. Added in "feat(playground-ui): add view transitions to internal sidebar links" and extended to `navigate()` in "feat: add dedicated agent session page". - Removed `isSamePageHref`, which only existed to skip that transition for search-param changes. - Platform and Factory never used this, so they're unaffected. ## Scope The deliberate transitions in Agent Builder (the chat composer gliding from the landing page to the chat, and the builder's own page changes that ask for `viewTransition: true`) are left as they are. ## Testing 1. Open Studio and click between Agents, Workflows and Prompts in the sidebar: the page and the selected item change at once, with no fade. 2. Open an agent's tool (`?tool=…`): the drawer still slides in as before. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Studio pages now switch immediately when you use a link or sidebar item. The old page no longer freezes and fades into the new page. ## Changes - Removed view-transition options from Playground links and navigation. - Removed the `isSamePageHref` helper and its tests. - Added a test that checks link navigation does not start a view transition. - Added a patch changeset. **Test results:** not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
06fa7df2a0 |
fix(ui): use Mona Sans's default letters in Studio and share fonts from Playground UI (#29915)
Studio draws an old-style double-storey "g" that no other Mastra app has. Studio switches on a Mona Sans stylistic set (`ss06`) for the whole page, and that set swaps the "g" for the double-storey version. Google Fonts, GitHub, the redesign in Figma, Platform and Factory all use Mona Sans's default letters, so this was a Studio-only bug. This PR removes it and moves our fonts into Playground UI, so every app loads them from one place instead of keeping its own copies. Part of PLTFRM-3364; Platform's half is mastra-ai/platform#4575. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/105f1252-aead-45f0-8401-b7d566805bb1" width="420" alt="Before eggs"> | <img src="https://github.com/user-attachments/assets/e4d8e455-2d0a-4fa0-9a2e-4f2e99fe9917" width="420" alt="After eggs"> | | <img src="https://github.com/user-attachments/assets/a1c29eaa-66c9-45de-8391-3ffb011a7aac" width="480" alt="Before garlic"> | <img src="https://github.com/user-attachments/assets/8e62f05e-43e2-45fa-b243-0be56ab0e81f" width="480" alt="After garlic"> | | <img src="https://github.com/user-attachments/assets/edae5be2-6f02-4036-a01a-324b1949c35d" width="480" alt="Before page"> | <img src="https://github.com/user-attachments/assets/6c285850-3bc0-41f8-a327-346cb27a464f" width="480" alt="After page"> | What `ss06` changes in Mona Sans: only the "g" and its accented forms. Default letters on top, `ss06` below: <img src="https://github.com/user-attachments/assets/6bc50fdc-a38f-4c7f-9f5b-9837378371d1" width="600" alt="What ss06 changes"> ## What changed - New `@mastra/playground-ui/fonts.css`: the package now ships Mona Sans and Commit Mono as woff2, split by script, with their OFL licences, and points the font tokens at them. No new dependencies. Studio, Factory and Storybook each import it, and their own font files and `@font-face` rules are gone. - Studio drops `ss06`, so it renders the default letters like every other app. - Studio now downloads one 96 KB woff2 for Latin text instead of a 349 KB TTF with every script. ## Scope - Platform gets the same file in a follow-up PR once a Playground UI snapshot includes it. - No weight, size or spacing changes. Apart from the "g", nothing should look different. ## Testing 1. Open a Studio chat with words like "eggs" or "garlic": the "g" is single-storey, like in Platform and Factory. 2. In the browser's network tab, Studio loads `mona-sans-latin-standard-normal-*.woff2`, and Commit Mono on pages with code. 3. Factory and Storybook render Mona Sans and Commit Mono as before. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 This PR gives Studio, Factory, and Storybook a shared set of fonts. It also removes a setting that changed the shape of the letter “g,” so Mona Sans uses its default letterforms. ## Changes - Added `@mastra/playground-ui/fonts.css` with Mona Sans and Commit Mono WOFF2 fonts split by script. Exported the stylesheet and font files from `@mastra/playground-ui`. - Updated Studio, Factory, and Storybook to import the shared font stylesheet. Removed their local font declarations and font files. - Removed the `ss06` setting from Studio’s main page and startup error screen. - Added a package export test that checks the stylesheet and its referenced WOFF2 files. - Added release changesets for `@mastra/playground-ui` and Studio. ## Validation - `git diff --check` passed. - Test, build, and CI results: not available. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
7c4dd88400 |
chore: version packages (alpha) (#29889)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
536b8bd4be |
test: fix three tests that keep failing release and adapter CI runs (#29900)
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> |
||
|
|
0adf28c60d |
feat(composer): share one composer and model picker between Studio and Factory (#29845)
**─────── TLDR ───────** > Studio and Factory now render the same chat composer from `@mastra/playground-ui`, with one model picker that also holds the thinking level. Each app used to build its own composer row, attach control and model switcher, so a fix in one never reached the other. The layout, attach menu, model picker and thinking ramp now live in playground-ui, and each app only passes its data. ### Behavior changed The "+" in the composer ├─ **was** — an image button in Factory, a popover in Studio └─ **now** — Camera, Photos, Files (and From a URL in Studio); a sheet on phones Picking a model and thinking level in Factory ├─ **was** — a model menu and a separate thinking button └─ **now** — one picker, thinking ramp inside, level shown as bars on the trigger Picking a model in Studio ├─ **was** — raw ids, no default, no way back to the agent's model └─ **now** — readable names, agent's model marked Default, one-click reset The thinking level control ├─ **was** — a bar chart slider └─ **now** — a row of brains; a pill stretches to the picked level and names it Factory loses its connection mid-draft ├─ **was** — the notice pushed the transcript and blocked typing └─ **now** — it floats over the status row; typing continues, Send waits ### Shape changed new in `@mastra/playground-ui` `ModelPicker` · `ComposerAttachMenu` · `ComposerStatus` · `ComposerActionsStart` · `ComposerActionsEnd` · `ComposerHeader placement="overlay"` removed from `@mastra/playground-ui` `ThinkingLevelSlider` — no callers in Mastra or platform; use `ThinkingLevelRamp` or `ThinkingLevelPicker` `ThinkingLevelRamp` keeps its props; only its look and pointer handling changed. Its stories are split into Ramp, Picker, Bars and Unavailable. ### Decisions - **readable names from raw ids only** — `formatModelName` turns `claude-opus-4-6` into "Claude Opus 4.6"; a `name` field is one prop away. - **the ramp stays a native range input underneath** — keyboard, screen readers and slider tests keep working; clicks and drags are handled on the row. - **dropped Factory's "Showing models this Factory's organization credentials can run" footer** — the picker header already names the credential. ### Not verified - [ ] the stretching pill in Safari — no Safari on this machine --- > ██████████████████ **source** `+1644 −776` > ████████ **tests** `+700 −157` > █████ **stories** `+495 −204` > █ **changeset** `+74` <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 Studio and Factory now share controls for choosing a model and adding attachments. This makes their composers more consistent while letting each app provide its own models and settings. ## Summary - Added `ModelPicker` to `@mastra/playground-ui` with provider filtering, model search, mobile and desktop layouts, default-model labels, and an optional reset action. Searches can include disconnected providers and show up to 50 matches. - Added shared composer components for attachment menus, status rows, action groups, and overlay headers. Studio and Factory now use shared composer controls. - Updated Factory’s composer so connection loss disables sending but not typing. The reconnect notice can appear as an overlay. - Updated thinking-level controls with a brain-cell ramp, loading and unavailable states, and an optional reset action. The ramp supports keyboard and assistive-technology input. Removed `ThinkingLevelSlider`. - Updated Studio’s model switcher to mark the configured agent model as the default and offer a reset when another model is selected. - Added tests and Storybook examples for the shared picker, attachment menus, composer layouts, and thinking-level controls. <!-- 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: Damien Schneider <damienschneider@damiens-MacBook-Pro.local> |
||
|
|
4bd4b7f48e |
chore(deps): update better-auth monorepo to v1.7.18 (#29714)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> |
||
|
|
009f632534 | chore: version packages | ||
|
|
f21e0742ce | chore: version packages | ||
|
|
43f77e77a0 |
ci: delete the Changed Test Gate (#29099)
## What this does
Deletes the Changed Test Gate workflow, its labeler workflow (which
labels PRs from the gate's result) and `scripts/pr-test-gate/`. The
gate's deployer rule is kept: it moves into Prebuild as a small
`Deployer E2E coverage` job.
## What the gate enforced, and what goes
The gate checked out the base branch, restored the PR's changed test
files on top of it, and ran them. Removing it drops two rules:
1. **Fail-before-fix.** If a PR changed tests, those tests had to fail
against the base branch ("Changed tests passed against the base branch.
They should fail before the PR code is applied."). This rule goes.
2. **External contributors must add tests.** A PR from outside the org
(`AUTHOR_ASSOCIATION` not OWNER/MEMBER/COLLABORATOR) with no changed
test files failed. This rule goes.
A third rule stays: **a PR that changes `packages/deployer/` must also
change `e2e-tests/monorepo/`** (`packages/deployer/AGENTS.md` and
`CHANGELOG.md` exempt; the same-repo Changesets release PR skipped).
It's now `Deployer E2E coverage` in `prebuild.yml`: a `git diff
--name-only` against the merge base, no install or build. It's its own
job rather than a step in `changes`, because a failing `changes` job
would skip every test job. `packages/deployer/AGENTS.md` now names that
job.
## Why dropping 1 and 2 is acceptable
- Neither rule was enforced at merge time: the gate isn't a required
check. The required checks are `Lint` and `Unit and E2E Tests / Merge
Test Reports`, and this PR touches neither.
- Of the gate's last 1000 runs, 8 failed. All 8 were the fail-before-fix
rule firing on tests that passed without the fix; each PR resolved it by
rewriting its tests. Across 812 gate logs from Aug–Oct, every run that
executed tests took the passing path (changed tests failed against base,
as required). So it shaped how a few tests were written, but no run
showed it stopping broken code from merging.
- It costs a runner, a checkout and a test run on every non-draft PR, on
top of Prebuild running the same changed tests against the PR head.
- External contributions still go through maintainer review, which can
ask for tests.
## Test plan
- [x] `rg` for remaining references: only two "former" comments and an
unrelated fixture name
- [x] `pnpm install --frozen-lockfile` works after removing
`scripts/pr-test-gate` (192 projects)
- [x] Deployer check shell logic run locally under `bash -eo pipefail`
with a stubbed diff: deployer-only change fails with the annotation;
deployer + `e2e-tests/monorepo/` passes; `AGENTS.md`/`CHANGELOG.md`-only
passes; no deployer change passes
- [ ] CI on this PR: no Changed Test Gate check appears; `Deployer E2E
coverage` passes
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This change removes the old system that checked whether pull requests
added and tested tests. It keeps one focused rule: changes to the
deployer package must include a monorepo E2E test change, with specified
documentation files exempt.
## Changes
- Deleted the Changed Test Gate workflow, its labeler workflow, and the
`scripts/pr-test-gate/` package.
- Added a separate `Deployer E2E coverage` job to Prebuild. The job
checks the merge-base diff and fails when a non-exempt file under
`packages/deployer/` changes without a file under `e2e-tests/monorepo/`.
- Exempted `packages/deployer/AGENTS.md` and
`packages/deployer/CHANGELOG.md` from the coverage check.
- Updated `packages/deployer/AGENTS.md` to refer to the Prebuild job.
- Updated comments in the memory simulation config and two test
link-provider files.
## Validation
The PR description reports that `pnpm install --frozen-lockfile`
succeeded across 192 projects and that the deployer-check shell logic
passed the listed local cases. CI validation is not confirmed: the
description says it is not yet known whether the old check disappears
and the new job passes.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
|
||
|
|
c4e0bc37c9 |
fix(playground-ui): polish the Knowledge explorer page view, tree and loading states (#29505) | ||
|
|
ccde1973bc |
fix(playground-ui): hide MCP App context from chat messages (#29500)
When you interact with an MCP App in Studio (for example, clicking "View
in traces" on a dashboard chart), the app's model context gets attached
to your next message as an `<mcp-app-context trust="untrusted">` block.
That's meant for the model only, but it was showing up in the user
bubble, in copied/saved-to-dataset text, and in the conversation
timeline's preview and "Jump to" labels.
Before, the user bubble showed:
```
Show me the traces for the selection I drilled into.
<mcp-app-context trust="untrusted">Context reported by an MCP App … {"page":"traces",…}</mcp-app-context>
```
After, it shows only:
```
Show me the traces for the selection I drilled into.
```
The model still receives and stores the context; it's only filtered out
at display time. The block builder moved into a shared
`@mastra/playground-ui/utils/mcp-app-context` util next to a matching
detector, so the playground send handler and the UI that hides it stay
in sync.
Tested with new MessageRow and thread rail tests (red before the fix),
the existing chat-provider tests that assert the model still gets the
context, and manually in Studio with the `examples/agent` dashboard
agent on both a reloaded thread and a live drilldown.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
MCP App context helps the model, but it is not meant to be part of the
chat people read. This change keeps that context out of message text and
conversation previews while still adding it to the user message sent to
the model.
## Summary
- Added shared `toUntrustedAppContext` and `isMcpAppContextText`
utilities in `@mastra/playground-ui`.
- Updated chat attachment splitting to omit MCP App context from
displayed message content.
- Updated conversation timeline summaries to omit MCP App context.
- Updated the chat send handler to use the shared builder when adding
MCP App context to a user message.
- Added tests for message rendering and conversation timeline summaries.
- Added a patch changeset for `@mastra/playground-ui`.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
ef2c85d7b3 |
feat(playground-ui): lay the Knowledge explorer's drawers over the graph (#29495)
The Knowledge graph now fills the explorer. The page tree and the selected page's details slide in as drawers over its edges instead of squeezing it, Graph and Page switch with tabs, and fits, the legend and zoom stay clear of the drawers. Narrow screens keep the stacked layout. Linear: PLTFRM-3263 | | Light | Dark | | --- | --- | --- | | Before |  |  | | After |  |  | https://github.com/user-attachments/assets/5f29d16d-1d4d-482c-bd6f-95c190765892 Hosts can pass `toolbarEnd` to add actions to the toolbar row, and `flush` to drop the graph's border when the page already frames it. Platform picks this up through a playground-ui snapshot in a follow-up PR. Verified: 279 knowledge tests pass (new drawer tests fail without the change), playground-ui typecheck and lint clean, checked in the browser at 1440 in light and dark and at 390. <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## ELI5 The Knowledge explorer keeps the graph visible while the page tree and page details open in panels on wide screens. Users can switch between Graph and Page views, and the graph adjusts its framing so the panels do not cover important content. ## Changes - Added optional `toolbarEnd` and `flush` props to `KnowledgePageExplorer`. - Added page-tree and selected-page drawers on wide screens. Narrow screens retain a stacked layout. - Added compact styling to `KnowledgePageDetail` for the details drawer. - Added graph pane insets for viewport fitting and selection positioning. If the insets leave no usable width, the graph uses the whole pane. - Added a collapsible graph legend and repositioned graph controls. - Updated Graph/Page tab tests and added drawer and viewport-fitting tests. - Added a minor `@mastra/playground-ui` changeset. The PR description reports 279 knowledge tests passing, clean playground-ui typecheck and lint, and browser checks at desktop and narrow widths in light and dark themes. These results were not independently verified. <!-- end of auto-generated comment: release notes by coderabbit.ai --> |
||
|
|
bfe3af4ae1 |
chore(deps): update better-auth monorepo to v1.7.15 (#29497) | ||
|
|
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> |
||
|
|
944d4bcb13 |
feat(mcp-apps-components): add prebuilt MCP Apps with a dashboard renderer (#29321)
This adds `@mastra/mcp-apps-components`, a package of prebuilt MCP Apps
you can serve from any `MCPServer`, plus the server and client changes
they need to read data safely as the signed-in user. Each app has its
own entry point (no root barrel). The first one is a dashboard renderer:
a tool returns a dashboard definition and the host renders it as live
observability charts.
```ts
import { MCPServer } from '@mastra/mcp';
import { dashboardRendererApp } from '@mastra/mcp-apps-components/dashboard-renderer';
import { observabilityAppTools } from '@mastra/mcp-apps-components/observability-tools';
new MCPServer({
id: 'dashboard-mcp-server',
name: 'Dashboard MCP Server',
version: '1.0.0',
appResources: { 'ui://mastra/dashboard': dashboardRendererApp() },
tools: { showObservabilityDashboard, ...observabilityAppTools },
});
```
## How it works
**The app.** A single self-contained HTML page, inlined into the
package's JS so it survives deployer bundling (Vercel, Netlify,
Cloudflare) with no file reads at runtime. Its iframe never reaches the
network: it reads data with `callServerTool` over the host's existing
MCP connection, so no CSP or `baseUrl` setup is needed. It follows the
host's light/dark theme. Drilldowns continue the conversation when the
host supports `ui/message`; on hosts that also support
`ui/update-model-context`, the app passes the exact filters as
structured context and posts a short prompt, otherwise it spells the
filters out in the message.
**Typed observability tools.** `observabilityAppTools` is 11 app-only
tools, one per read-only observability route the dashboard uses
(trace/span/metric/score aggregates, breakdowns, time series,
percentiles, and score listing). Each takes the route's own input schema
and runs the route in-process through the new `invokeRoute()`.
**`invokeRoute()` (`@mastra/server/server-adapter`).** Runs a JSON
server route in-process as the caller, with the same validation, RBAC
permission and FGA checks its HTTP endpoint applies on every adapter,
and returns `{ status, body }`. It does not re-authenticate: when auth
is configured, the request context must carry the user Mastra server
auth resolved, or the call gets a 401. Non-JSON routes throw, and
HTTP-only handler params (`request`, `registeredTools`, `taskStore`,
`routePrefix`) are not supplied.
**Caller identity in MCP tools.** MCP tools served over HTTP now see the
caller Mastra server auth resolved (user, permissions, roles, resource,
organization) in their `requestContext`, on Hono, Express, Fastify, Koa,
Elysia and NestJS. The server attaches it to the MCP request under a
symbol key, so it can only come from the server, never from
client-supplied auth claims.
**Hiding app-only tools.** `MCPClient.listTools()`/`listToolsets()` hide
tools marked `_meta.ui.visibility: ['app']` from agents.
**Studio host.** Studio advertises the host capabilities it handles
(tool calls, messages, model context), passes its theme, routes app tool
calls to the requested tool in the MCP tool playground, and refuses app
calls to model-only tools. App model context is added to the next user
message only, as a clearly delimited block of untrusted app data, never
as system instructions.
## Try it
`examples/agent` has a `dashboard-agent`. In Studio, try "Show me agent
runs over the last 7 days as a line chart".
## Docs
- New reference page for `invokeRoute()`.
- New "Use prebuilt Mastra apps" section in the MCP connections guide.
## Testing
- `invokeRoute` unit tests (auth, permission, validation, handler
errors, non-JSON routes).
- Shared MCP transport suite case, run on every adapter, checking tools
see the server-resolved user and permissions and unauthenticated calls
get 401.
- `observability-tools` tests through a real Hono server with auth and
RBAC: MCP calls, Studio relay, permission denial, invalid input, and a
bundled-consumer test for the inlined HTML.
- Playground and playground-ui tests for the app viewer and model
context handling.
- Manual Studio run: dashboard renders live data and drilldown sends the
context block with the next message.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR adds ready-made MCP apps, including a dashboard that shows
observability data. It also lets Studio display these apps and pass
their context to chat as untrusted user content.
## What changed
- Added `@mastra/mcp-apps-components` with a dashboard renderer and
app-only observability tools. The tools invoke server routes in-process
and use the routes’ validation and authorization checks.
- Added `invokeRoute()` for in-process execution of eligible JSON
routes.
- Updated MCP server adapters to pass trusted, server-resolved caller
identity to MCP tools. MCP client discovery filters app-only tools from
agent-facing listings.
- Updated Studio and the playground to render MCP apps, relay app tool
calls, provide host capabilities, restrict tool calls and links, and
attach app context to the next chat message.
- Added a dashboard agent example and documentation for MCP Apps and
`invokeRoute()`.
## Validation
The author reports tests for route invocation, observability tools, MCP
transports across all six adapters, and playground app and chat
behavior. The author also reports a manual Studio check. These results
were not independently verified.
The author reports that the npm reservation for
`@mastra/mcp-apps-components` remained open and required an npm
organization admin before merge.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|
||
|
|
cf03f8321e |
test(playground): select custom range times explicitly (#29429)
The calendar redesign in #29195 preserves the current times, but the metrics filter test still expects opening and applying the editor to reset them to midnight and 23:59. Set those times explicitly through the existing inputs and keep the URL assertions unchanged. This fixes the remaining metrics failure seen in #29289. #29422 already fixed the histogram test. One test file only; no production changes or changeset. Validation: all 13 tests in `metrics-filter-bar.msw.test.tsx` pass on Node 24. Removing the two input changes reproduces the original end-hour assertion failure. Changed-file type-aware lint, formatting, and `git diff --check` pass. The broader UI build reports type errors in unchanged `flame-graph.tsx`, `chart-frame.tsx`, and `field-wrapper.tsx`; this test-only PR leaves those untouched. |
||
|
|
b28ed08077 |
feat(playground-ui): chat annotations for Studio and Factory (#29310)
**─────── TLDR ───────** > In Studio and Factory chat you can select part of a reply, comment on it, and the agent gets it quoted in your next message. Until now, asking about one sentence of a long reply meant copying it into the message box and quoting it by hand. A selection inside one message now offers **Add to chat**. Each passage gets a numbered bubble in the transcript, the message box counts them, and Send turns them into a numbered list ahead of what you typed. ### Behavior changed text selected inside one message, in Studio or Factory └─ **new** — **Add to chat** floats over it, and Tab reaches it an added passage └─ **new** — a numbered bubble that scrolls with it; select it to comment or remove Send with annotations waiting └─ **new** — each passage quoted with its comment, then your text, if any a send that fails └─ **new** — its annotations come back, ahead of any added since a slash command in Factory └─ **unchanged** — runs as before; annotations wait for the next message text typed after dictating, in Studio └─ **fixed** — stays; each keystroke used to bring the dictated text back dictating right after `useSpeechRecognition` gets a new `agentId` └─ **fixed** — uses the browser until the new agent's voice is checked, instead of the previous agent ### Shape changed | | | | |---|---|---| | **+** | `ChatShell.Transcript` | the positioned reading column the bubbles travel with | | **~** | `ChatShell.Dock` | its `ComposerInput` is the one an added passage focuses | | **~** | `escapeRegExp` | annotations needed a third copy, now one in `lib/string` | | **~** | `useSpeechRecognition().start` | takes an optional `onTranscript`, called as each transcript is recognized | what Studio and Factory now mount, from `@mastra/playground-ui/components/ai/annotations` `ChatAnnotationsProvider` · `TranscriptAnnotations` · `ComposerAnnotations` · `useChatAnnotations()` · `formatAnnotatedMessage(text, annotations)` ### Decisions - **the transcript finds its composer through `ChatShell`** — neither app passes refs; a ref prop is the way back if you disagree - **the tint uses the CSS Custom Highlight API** — message text gets no wrapper elements; browsers without it show only the bubbles - **switching threads drops waiting annotations** — each one points at rendered text the switch unmounts - **effects only where React can't reach** — Add to chat's keys and dictated text moved to the handlers that own them, the pending dot's delay to the CSS entrance the trace skeletons use, and the voice check's reset to a value derived in render; the effects left subscribe to the browser, measure layout, or wait on data ### Not verified - [ ] right-click on a selection in macOS: the menu reset is covered in jsdom only, since Playwright cannot open the native menu - [ ] Safari and Firefox: the live runs used Chromium only, and Firefox's multi-range selection is covered in jsdom only - [ ] Factory against a live agent session: its live run used the real app with a mocked agent backend - [ ] Studio dictation in a browser: checked in jsdom only, with a stubbed `SpeechRecognition` - [ ] the pending dot's delay in Studio: the same classes as the trace skeletons, checked in the built stylesheet only --- > ██████████████████████ **tests** `+1545 −11` — 49% of the additions > ███████████████████ **source** `+1333 −147` > ██ **storybook** `+156` > ██ **changeset** `+108` > █ **docs** `+2` --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|
|
f9de87e210 |
test(ui): update date range tests for the new calendar (#29422)
## Description
Two tests still drove the old custom range editor (separate start/end
calendars, hour/minute/AM-PM selects) that the calendar redesign in
"feat(ui): redesign the calendar and custom date range picker" replaced.
One of them fails on main. This updates both to the new range calendar
and `<input type="time">` fields. No component changes.
- **Traces histogram** ("resets to the default preset even when that
range matches the zoom"): sets `End time` with the time input. The new
editor keeps the end's own time instead of defaulting to 11:59 PM, so
the first step now sets 23:59 explicitly.
- **Signals page** ("requests snapshots with inclusive start and end
timestamps"): "Last 7 days" only sets a start, so one click on July 25th
picks the end. The start now keeps the preset's time rather than
midnight, so the test sets `Start time` to 00:00. Same expected
timestamps as before.
Searched both packages and `packages/playground/e2e` for other tests on
the old calendar: none.
## Related issue(s)
None. Follow-up to the calendar redesign PR, whose changed-test gate
didn't run these.
## Type of change
- [ ] 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
## Testing
1. `pnpm turbo build -F @mastra/ai-sdk -F @mastra/playground-ui`
2. In `packages/playground-ui`: `pnpm exec vitest run
src/domains/traces/components/traces-explorer/__tests__/traces-explorer-histogram.msw.test.tsx`
(21 passed; 1 failed on main)
3. In `packages/playground`: `pnpm exec vitest run
src/ee/signals/__tests__/index.test.tsx` (26 passed; 1 failed on main)
## 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
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
The tests now use the redesigned calendar and its time fields to set
date ranges. This keeps the tests aligned with how the updated calendar
works.
## Changes
- The traces histogram test now sets the End time directly to `23:59`
and `00:00` for custom ranges.
- The signals page test now selects July 25 as the end date and sets the
start time to midnight.
- The signals test still checks the same start and end timestamps.
Test results and review-finding counts are not verified from the
available evidence.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
|
||
|
|
7cbddd8511 |
chore(ui): standardize metadata layout and enforce copy lint (#29312) | ||
|
|
9ce7e350ea |
chore(deps): lock file maintenance (#29341)
Co-authored-by: wardpeet <ward@coding-tech.com> Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com> |
||
|
|
a403c993a0 |
fix(ui): add Combobox popupWidth and wrap long options instead of cutting them off (#28851)
Combobox popups cut long option names off at 11rem, so Studio's model picker showed `moonshotai/kimi-k…` for most results, and breadcrumb switchers cut off agent and workflow names. Call sites can now pick a fixed popup width (`sm`, `md`, `lg`, `xl`), and every option label wraps to two lines before it truncates. CSS only: the width never changes while you filter. Same approach as shadcn's Combobox, which sets a fixed width on the popup per call site and lets rows wrap. ## Before / After | Before | After | | --- | --- | | <img src="https://github.com/user-attachments/assets/f62aab5e-8e6e-4797-89d9-7a4f3db7cb9d" width="480" alt="Before"> | <img src="https://github.com/user-attachments/assets/f548b0d7-2661-4689-a500-633e8dcd7a57" width="480" alt="After"> | | | Before | After | | --- | --- | --- | | Composer, long id | <img src="https://github.com/user-attachments/assets/7afbf00a-ee05-4ec4-804c-559156f53990" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/c73151d2-ae18-4336-9b8e-04db69832988" width="360" alt="After"> | | Composer, short ids | <img src="https://github.com/user-attachments/assets/c94fb35c-3b15-4720-bc16-fe1fe6fbf6d8" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/62b3bc21-4491-44b6-ae5f-95724ff98750" width="360" alt="After"> | | New experiment dialog | <img src="https://github.com/user-attachments/assets/8bbdf8a8-45f3-4309-9e94-4088014bceff" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/3e415ff5-482e-4521-9b1d-840717e5dfc6" width="360" alt="After"> | | Agent switcher | <img src="https://github.com/user-attachments/assets/04d9b964-d686-4dfe-9d47-ecbf31cbf33e" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/0ce42817-0317-4540-82c2-296982d6b28b" width="360" alt="After"> | | Workflow switcher | <img src="https://github.com/user-attachments/assets/039c42fc-7a07-403f-b5a2-586b2582205d" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/904e97f4-f1d0-46e9-b792-4f06e1f6c974" width="360" alt="After"> | | Dataset version switcher | <img src="https://github.com/user-attachments/assets/a9b7de1c-b49c-490d-8638-7a6bf78f9021" width="360" alt="Before"> | <img src="https://github.com/user-attachments/assets/efee5a7f-251d-4a37-8a7b-6c94422af468" width="360" alt="After"> | ## What changed - `Combobox` gets `popupWidth` (`sm` 12rem, `md` 16rem, `lg` 20rem, `xl` 24rem). Without it the popup keeps the trigger's width, as before. It's never narrower than the trigger or wider than the screen. - Option labels and descriptions wrap (ids break anywhere) and clamp at two lines, instead of truncating on one. - Call sites: model pickers (`LLMModels`) use `lg`; breadcrumb switchers (agent, workflow, dataset, dataset version, scorer, processor, MCP server) use `md` through the shared `crumbSwitcherTriggerProps`. Every other combobox keeps its width. ## Testing Checked in Studio (2x, dark), on this branch and with main's files swapped back in for "before": | Call site | Before | After | | --- | --- | --- | | Composer model picker, "kimi" | 176px, 7 of 9 cut off | 320px, none | | Composer, a 56-char id | cut off | wraps to two lines | | Composer, OpenAI | 176px | 320px (wider than needed for short ids) | | New experiment dialog model picker | 176px, 7 of 9 cut off | 320px, none | | Agent / workflow / dataset version switchers | 176px; 23 of 44, 8 of 16, 1 of 1 cut off | 256px, none | | Agent and scorer create forms, scorer picker | field width | unchanged | Not checked: Factory's model picker (only gets the two-line wrap; Factory didn't start locally because the shared local Platform crashed), and the review queue's model picker (no items in the seed). ## Type of change - [x] Bug fix (non-breaking change that fixes an issue) Fixes PLTFRM-2842 |
||
|
|
6e8dfcb83f | chore: version - exit prerelease mode | ||
|
|
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>
|
||
|
|
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> |
||
|
|
181dbb2a7d |
feat(playground-ui): Knowledge explorer link counts, steadier graph focus, and page links with hover cards in Studio chat (#29264)
Built on main after #29260 (Knowledge link index, |
||
|
|
4d2dbf509e |
feat(playground-ui): Knowledge explorer tree and graph that load lazily at scale (#29216)
## Description
Studio's Knowledge explorer has a sidebar tree and a graph of pages. On
a real docs instance with about 1,700 pages, both broke down:
- The graph loaded the first 250 pages up front and drew about 1,400
lines. It was unreadable, and pages outside those 250 couldn't be
reached from it.
- Clicking some sidebar rows did nothing. Collapsing a parent whose
child was selected sprang straight back open. Childless pages showed an
expand arrow that vanished when clicked.
- With a few Studio tabs open, a new tab sat on "Loading knowledge…"
until another tab closed.
This PR makes the explorer work at that size.
**Tree**
- Each tree level now comes with child counts. The core store gains
`countChildPages({ parentIds, read })` (one call per level, read-gated,
implemented for in-memory, LibSQL, Postgres, MySQL and MongoDB), and the
tree route returns `childCount` per page. When counting stops at the
scan limit, the count is marked as capped and shows as `1000+`.
- Only pages with children show an arrow. Clicking a parent row opens it
and loads its children. A parent collapses even when its selected child
is inside it.
- Older servers that don't send counts fall back to the previous
behaviour.
**Graph**
- The graph loads lazily, the same way the tree does. It starts from the
focused scope or page plus one level. Parents show a child-count badge
and stand-in dots until their children load, and each parent draws at
most 24 children with "+N more".
- The layout is radial around the focus, with depth rings. The focus is
larger and ringed, scopes and the focused page's ancestors are labelled
circles with a level icon, and the top level (nothing focused) and a
childless focus draw their first pages as circles with the rest as dots.
Three or more sibling scopes of the same type (for example, many
`thread:` scopes) collapse into one group dot that opens on click.
- Hovering a page draws its own links and names it in a solid tooltip
with a tail: kind, address, path, child count and links in and out. The
tooltip opens on the side of the dot that covers the least, and stays
readable when zoomed out. Everything else fades while you hover.
- Body-link and mention lines are off by default. The focused page shows
its own links in and out (up to 20 each way), and an "All links" toggle
draws every line. Circles show a link badge such as `→4 14→` (links in,
links out). An optional "Link counts" toggle writes each dot's total
inside it, and only dots with links grow.
- A floating Back button at the top right returns to the previously
focused page, and the graph has a legend that lists only the circle, dot
and line styles currently on screen.
- In graph view, the first click on a sidebar page focuses it and the
second click opens it.
**Tabs**
- Each Studio tab held its Knowledge change stream open. A few tabs used
up the browser's connection limit per host, so a new tab's requests
queued forever. Background tabs now close the stream, then reconnect and
refresh when they're shown again. Studio's own refresh stream is
separate and isn't changed here.
**Stacked on #29214 (body links).** This PR is based on that PR's
branch, because the graph draws body links, so the diff shows only the
tree and graph work. When #29214 merges, retarget this to `main`.
## Related issue(s)
Part of the Knowledge Studio alpha work (Knowledge explorer tree and
graph at scale). Not tracked as a GitHub issue.
## Type of change
- [x] New feature (non-breaking change that adds functionality)
- [x] Performance improvement
## Checklist
- [x] I have added tests that prove my fix is effective or that my
feature works
## Test plan
- `pnpm --filter ./packages/playground-ui typecheck`: passes
- playground-ui Knowledge suite (including the new graph work): 167/167;
Knowledge, chat and `MarkdownRenderer` suites passed at the previous
head (850/850)
- core Knowledge: 190/190, including a `countChildPages` contract case
for every store
- server Knowledge handlers: 42/42
- Studio Knowledge page: 26/26 (6 repeated runs), including closing and
reopening the stream in hidden tabs
- Each change has a test that fails without it.
- On the docs demo (about 1,700 pages): the unfocused graph went from
250 circles and 1,390 lines to 13 circles, 16 dots and 0 lines. Focusing
"The Mastra blog" (281 children) draws 24 children with "+257 more" and
its own 15 links. In the tree, childless arrows are gone, collapse
sticks, and clicking a parent loads its 91 children. With 3 or 4 tabs
open, each new tab loads in about 1s. No page errors at 390, 768 or 1440
px.
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
|
||
|
|
7ad1918a72 |
feat(playground-ui): readable failed Knowledge tool calls and linked knowledge_list cards in chat (#29215)
## Description
Two Knowledge tool cards in Studio chat were hard to read:
1. **Failed Knowledge calls showed `[object Object]`.** When a Knowledge
tool threw (for example, reading a page that does not exist), the error
crossed the wire as `{"name":"KnowledgeNotFoundError"}` with no message.
An `Error`'s `message` is non-enumerable, so serialising the stream
chunk dropped it, and the chat UI then stringified the object.
2. **`knowledge_list` results showed raw JSON**, and once they had a
card, the entries were plain text. In the same chat, `knowledge_search`
hits are links.
This PR fixes both:
- **Server (`@mastra/server`)**: when a stream chunk carries an `Error`
in `payload.error`, it is sent as a plain object that keeps `name` and
`message`. An error class's own `toJSON()` is used when it has one, so
curated fields like `code` and `cause` survive and private fields don't
leak (for example, a provider error's request body). Stacks are no
longer sent.
- **`@mastra/react`**: when a tool error has no usable message, it reads
as `"The tool call failed."`, never a JSON dump.
- **Knowledge cards (`@mastra/playground-ui`)**: a failed Knowledge call
gets its own card, such as "Couldn't read" with the page ref and the
message, instead of the generic failed row. `knowledge_list` results get
a card showing an indented tree with each entry's ref, child count and
description, plus a line when more entries exist. Each entry now links
to its page, the same way search hits do: scope roots (`site:mastra`,
`thread:…`) open their scope page, and nested `scope#path` entries open
at any depth.
- **Opening a page by reference (`@mastra/core`, `@mastra/server`)**:
list entries carry a ref, not a page id. `GET
/knowledge/:knowledgeKey/pages/:pageId` now also accepts a scope address
or a `scope#key/path` ref. It applies the same read check as an id
lookup, and an unknown or unreadable ref still returns 404. Studio's
Knowledge page then replaces the ref in the URL with the page id, so the
tree and graph can highlight the page.
- `KnowledgeLinksProvider` gets an optional `refHref`. Hosts that only
open pages by id leave it out, and list entries stay plain text there.
## Related issue(s)
Part of the Knowledge Studio alpha work (Knowledge tool cards in Studio
chat). Not tracked as a GitHub issue.
## Type of change
- [x] Bug fix (non-breaking change that fixes an issue)
- [x] New feature (non-breaking change that adds functionality)
## Checklist
- [x] I have added tests that prove my fix is effective or that my
feature works
## Test plan
- Server serialize and Knowledge handler tests: 445/445. These include
curating a provider error without leaking its request body, and a 404
for a ref outside the caller's read scope.
- `@mastra/react` accumulator: 195/195
- core `readKnowledgePage` by reference: 15/15. Two of these fail
without the change.
- playground-ui chat and Knowledge suites: 683/683. The list-link test
fails without the change.
- Studio Knowledge page: a ref in `?page=` opens the page and the URL
switches to its id.
- `pnpm --filter ./packages/playground-ui typecheck`: passes
- On the docs demo, a forced read of a missing page showed `[object
Object]` before and "Couldn't read" plus the message after. A
`knowledge_list` card had 0 of 3 scope entries and 0 of 50 page entries
linked before, and all 3 and all 50 linked after. No page errors at 390,
768 or 1440 px.
---------
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
|
||
|
|
886679eb10 |
chore: version packages (alpha) (#29205)
This PR was opened by the [Changesets release](https://github.com/changesets/action) GitHub action. When you're ready to do a release, you can merge this and publish to npm yourself or [setup this action to publish automatically](https://github.com/changesets/action#with-publishing). If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated. ⚠️⚠️⚠️⚠️⚠️⚠️ `main` is currently in **pre mode** so this branch has prereleases rather than normal releases. If you want to exit prereleases, run `changeset pre exit` on `main`. ⚠️⚠️⚠️⚠️⚠️⚠️ # Releases > The changelog information of each package has been omitted from this message, as the content exceeds the size limit. ## @mastra/client-js@1.59.0-alpha.2 ## @mastra/factory@0.27.0-alpha.2 ## @mastra/code-sdk@1.18.0-alpha.2 ## mastra@1.38.0-alpha.2 ## @mastra/core@1.82.0-alpha.2 ## @mastra/editor@0.17.0-alpha.2 ## @mastra/server@1.82.0-alpha.2 ## @mastra/clickhouse@1.29.0-alpha.1 ## @mastra/duckdb@1.18.0-alpha.1 ## @mastra/pg@1.35.0-alpha.2 ## @mastra/platform-workspace@1.12.0-alpha.1 ## @mastra/react@1.14.1-alpha.2 ## @mastra/deployer-cloud@1.82.0-alpha.2 ## @mastra/deployer-sandbox@0.3.26-alpha.1 ## @mastra/longmemeval@1.1.41-alpha.2 ## @mastra/opencode@0.1.41-alpha.2 ## @mastra/parallel@0.1.5-alpha.0 ## create-factory@0.4.2-alpha.2 ## mastracode@0.49.0-alpha.2 ## @mastra/arize@1.3.29-alpha.1 ## @mastra/arthur@0.4.29-alpha.1 ## @mastra/braintrust@1.3.26-alpha.1 ## @mastra/datadog@1.4.21-alpha.1 ## @mastra/deepeval@0.1.23-alpha.1 ## @mastra/laminar@1.3.31-alpha.1 ## @mastra/langfuse@1.6.5-alpha.1 ## @mastra/langsmith@1.4.2-alpha.1 ## @mastra/observability@1.23.1-alpha.1 ## @mastra/otel-bridge@1.5.21-alpha.1 ## @mastra/otel-exporter@1.5.1-alpha.1 ## @mastra/posthog@1.4.6-alpha.1 ## @mastra/sentry@1.2.31-alpha.2 ## @mastra/agent-builder@1.1.33-alpha.2 ## @mastra/deployer@1.82.0-alpha.2 ## @mastra/mcp@2.8.0-alpha.1 ## @mastra/mcp-docs-server@1.3.12-alpha.3 ## @mastra/memory@1.41.0-alpha.2 ## @mastra/playground-ui@68.0.0-alpha.2 ## @mastra/rag@2.7.2-alpha.0 ## @mastra/elysia@0.1.22-alpha.2 ## @mastra/express@1.5.26-alpha.2 ## @mastra/fastify@1.5.26-alpha.2 ## @mastra/hono@1.7.24-alpha.2 ## @mastra/koa@1.7.26-alpha.2 ## @mastra/nestjs@0.2.41-alpha.2 ## @mastra/next@0.2.40-alpha.2 ## @mastra/tanstack-start@0.2.40-alpha.2 ## @mastra/dsql@1.5.6-alpha.0 ## @mastra/libsql@1.29.0-alpha.1 ## @mastra/mongodb@1.26.0-alpha.1 ## @mastra/mssql@1.11.1-alpha.0 ## @mastra/mysql@0.16.0-alpha.2 ## @mastra/oracledb@0.5.6-alpha.0 ## @mastra/spanner@1.11.1-alpha.0 ## @mastra/turso@0.1.20-alpha.1 ## @mastra/voice-google@0.14.5-alpha.0 ## @mastra/inngest@1.11.1-alpha.1 ## @mastra/temporal@0.5.0-alpha.2 ## @mastra/e2b@0.16.1-alpha.1 ## create-mastra@1.38.0-alpha.2 ## @internal/playground@1.38.0-alpha.2 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> |
||
|
|
c7d27f650b |
feat(editor): make model fallback lists editable and persistent (#27287)
Adds opt-in Editor ownership for static model fallback lists on
code-defined agents.
```ts
new Agent({
id: 'support-agent',
model: [
{ id: 'primary', model: 'openai/gpt-5.4-mini' },
{ id: 'fallback', model: 'anthropic/claude-sonnet-4-5' },
],
editor: { model: true },
})
```
Studio can reorder models, change provider/model selections, and enable
or disable entries. These changes follow the configured Editor
persistence workflow:
- Database-backed Editor storage creates versioned drafts that can be
published.
- Code-backed Editor storage saves overrides to the filesystem or
through the configured pull-request workflow.
Persisted entries include their order, provider, model ID, enabled
state, and `maxRetries`. Immutable model IDs reconnect stored values to
code-defined entries while preserving non-serializable code
configuration.
Function-valued model configurations remain code-owned and read-only in
Studio.
This also adds storage support, model-list persistence through the
existing server mutation routes, generated client types, regression
coverage, documentation, and a changeset.
Closes #27089.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This lets teams edit and save an agent’s model fallback list in Studio
without changing code. The feature is opt-in, so existing agents keep
their current behavior by default.
## Summary
- Added `editor: { model: true }` support for code-defined agents.
- Added persistent `modelList` storage with entry IDs, provider, model
ID, enabled state, and `maxRetries`.
- Applied stored overrides by matching immutable entry IDs while
preserving code-owned configuration.
- Persisted reorder and update actions through Editor drafts and
publishing workflows.
- Added filesystem, LibSQL, server route, export, versioning, and client
cache support.
- Kept function-valued model configurations code-owned and read-only in
Studio.
- Updated ownership logic, API schemas, client behavior, and
documentation.
- Added regression coverage for runtime overrides, persistence, exports,
ownership, draft activation, storage compatibility, and query
invalidation.
- Added changesets for the affected packages.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
|