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

Compare commits

..

14 commits

Author SHA1 Message Date
mastra-platform[bot]
30852ab5fe
docs(client-js): align retry docs with the write default (#30435)
Co-authored-by: sdivyanshu90 <97019230+sdivyanshu90@users.noreply.github.com>
2026-11-17 09:22:33 +01:00
mastra-platform[bot]
657d2e2127
docs: clarify DurableAgent.abortThreadStream returns false while still forwarding the abort (#30439) 2026-11-17 09:01:13 +01:00
mastra-platform[bot]
cf6f1b0459
docs(otel): sort vendors alphabetically on OpenTelemetry integration page (#30670) 2026-11-17 08:58:25 +01:00
mastra-platform[bot]
3ff2824bd4
fix(factory-ui): show notification summaries as a readable inline line (#30662)
> Opened by @damien-schneider

## Description

When pending notifications are rolled into a summary, Factory chat
showed them as a row labeled "Notification summary" followed by the raw
summary text, e.g. `factory-session: 1`. The row also used the padded,
caption-sized activity style. It sat between inline signal lines like
"Factory sessions snapshot", so it looked out of place and read like
debug output.

The summary now renders like those inline lines and is built from the
structured fields every summary carries (`pending`, `bySource`,
`byPriority`):

- **Label and count:** "Notifications" followed by "1 new" / "4 new".
- **Sources:** one badge per source. With a single source it shows just
the name (`Factory session`). With several, each badge has its count
(`GitHub 3`, `My webhook 1`).
- **Source names:** a small map gives readable names for known sources
(`factory-session`, `github`, `gitlab`, `linear`, `jira`, `slack`). Any
other source shows its id in sentence case (`my-webhook` → "My
webhook"), so new sources need no code change.
- **Priority:** the bell is tinted only when something high or urgent is
pending.
- **Fallback:** a summary with no counts shows its original text.

The change is limited to `NotificationSummaryCard` in factory-ui. The
shared `NotificationActivity` component and individual notification rows
are unchanged.

## Test plan

- `TranscriptNotifications.msw.test.tsx` covers a single Factory session
summary (no raw `factory-session: 1` text), several sources including an
unmapped one, and the fallback with no counts.
- `pnpm typecheck`, oxlint and prettier pass on factory-ui.

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

ELI5: When many alerts are waiting, the app used to show a plain block
of raw text. Now it shows one short line that says how many are new and
where they came from.

## Summary

This PR changes how `NotificationSummaryCard` renders notification
summaries in factory-ui. The card now shows an inline activity line
instead of a padded row with raw summary text.

### Changes

**`TranscriptNotifications.tsx`** (+47/-2)

- Replaces the `NotificationActivity` call in `NotificationSummaryCard`
with an `Activity` line. The line contains a bell icon, a
"Notifications" label, and a status label.
- Shows `"<pending> new"` when `pending > 0` and at least one source has
a count above zero. Otherwise, shows `entry.message`.
- Adds one `Badge` per source with a positive count. With one source,
the badge shows the source name. With several sources, the badge shows
the name and count, for example `GitHub 3`.
- Tints the bell only when `byPriority` has an `urgent` or `high` count
above zero.
- Adds a `NOTIFICATION_SOURCE_NAMES` map for `factory-session`,
`github`, `gitlab`, `linear`, `jira`, and `slack`.
- Adds exported `notificationSourceName(source: string): string`. It
returns the mapped name for a known source. For an unknown source, it
replaces `-` and `_` with spaces and applies sentence case. An empty ID
is returned unchanged.
- Adds an own-key check when it looks up source names. IDs such as
`__proto__` do not match inherited object properties. These IDs use the
sentence-case fallback, so the component does not render an invalid
React child.
- Imports the `Activity`, `ActivityHeader`, `ActivityIcon`, and
`ActivityLabel` primitives and `Badge`.

**`TranscriptNotifications.msw.test.tsx`** (+67/-9)

- Replaces the test that checked for the summary under its own label.
- Adds a test for one pending `factory-session` notification. It checks
for `Notifications`, `1 new`, and `Factory session`. It checks that the
raw `factory-session: 1` text and any button are absent.
- Adds a test for multiple sources, including an unnamed source. It
checks the total and the per-source counts.
- Adds a test for a summary with no counts. It checks that the summary
message is shown.
- Adds a test that a source named `__proto__` displays as `Proto`.

### Scope

- The shared `NotificationActivity` component is not changed by this
diff.
- Individual notification rows are not changed by this diff.
- The diff touches only these two files under `mastracode/factory-ui/`.

### Verification

- The PR author reports that `pnpm typecheck`, oxlint, and prettier pass
on factory-ui. These results were not re-run for this summary.
- The new tests exist in the diff. Their pass or fail status was not
checked.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-16 23:52:44 -08:00
mastra-platform[bot]
4985b71a20
fix(playground-ui): run CodeDiff lines flush under the file header (#30668)
> Opened by @damien-schneider

## What

When the Factory changes panel stacks file diffs, a blank band shows
below each file's last line and above the next file's first line.
`@pierre/diffs` adds 8px of padding above the code, and by default it
always keeps room for a horizontal scrollbar under it. The design
system's `CodeDiff` places that code on the card fill, so both show up
as empty strips.

When a `CodeDiff` has a file header, it now sets a `data-header`
attribute. A matching rule in `code-diff.css`, next to the other
`--diffs-*` overrides, sets two of pierre's variables. pierre doesn't
set these itself, so the values reach the diff's shadow DOM:

- `--diffs-gap-block: 0px`: no padding above the first line or below the
last, and the "N unmodified lines" separators between hunks sit flush
too.
- `--diffs-overflow-override: auto`: the horizontal scrollbar only takes
room when lines overflow. Platforms with overlay scrollbars, like macOS,
reserve no room for it.

A `CodeDiff` without a header keeps its padding. That case is the
standalone diff in the observation detail view.

## Test plan

- [x] `vitest run src/ds/components/CodeDiff`: 6/6 pass
- [x] `oxlint` and `prettier --check` pass on the changed files
- [x] Storybook `Elements/CodeDiff` in Chromium with real scrollbars.
File list: 0px top and bottom padding and no scrollbar strip, where
before there was 8px of padding plus a 15px strip under every file. A
multi-hunk diff with overflowing lines: flush lines and separators, with
a scrollbar only on the diff that overflows. A diff without a header
keeps its 8px padding.
- [ ] Full `tsc` for `playground-ui` didn't finish in the sandbox. The
TSX change only adds a `data-header` attribute.


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

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

ELI5: When a code diff has a file name bar on top, the diff used to have
empty gaps. This change removes the gap under the bar. It also makes the
horizontal scrollbar appear only when the code is too wide.

## Summary

This change adjusts `CodeDiff` layout when a file header is present. The
outer container gets a `data-header` attribute. A CSS rule for that
attribute sets the block gap to `0px` and sets overflow to `auto`. Diffs
without a header are unchanged. A patch changeset for
`@mastra/playground-ui` documents the change.

## Changes

- `packages/playground-ui/src/ds/components/CodeDiff/code-diff.tsx`
(+5/-1): The root `div` sets `data-header` to an empty string when
`header` is provided. It sets the attribute to `undefined` otherwise.
The `ref` and class names are unchanged.
- `packages/playground-ui/src/ds/components/CodeDiff/code-diff.css`
(+7): Adds a comment and a `.code-diff[data-header]` rule. The rule sets
`--diffs-gap-block: 0px` and `--diffs-overflow-override: auto`.
- `.changeset/flush-diff-lines.md` (+5): Adds a patch entry for
`@mastra/playground-ui`. It states that headered diffs have no blank
band above the first line or below the last. It also states that the
horizontal scrollbar takes space only when lines overflow.

## Notes

- The diff does not set `padding-block: 0`, `scrollbar-width: thin`, or
any shadow-root selector. The PR objectives describe these, but the diff
does not contain them. This summary follows the diff.
- No exported or public declarations changed.
- Totals: 3 files changed, 17 lines added, 1 line removed.
- The PR objectives report that `vitest run src/ds/components/CodeDiff`
passed (6/6) and that `oxlint` and `prettier --check` passed. They also
report that full `tsc` did not finish. These results come from the PR
description. They were not re-run here.

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

---------

Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-16 23:51:12 -08:00
Eric Pinzur
135aa65c3c
fix(otel-bridge): deliver logs in apps on OpenTelemetry JS SDK 3 (#30546)
## Description

In an app on OpenTelemetry JS SDK 3, `OtelBridge` dropped every Mastra
log without an error. Spans were fine.

The bridge only looked for the app's global `LoggerProvider` in
`@opentelemetry/api-logs`. SDK 3 apps register theirs through `logs`
from `@opentelemetry/api` (1.10 and later), and the two registries don't
see each other, so the bridge got a no-op proxy.

The bridge now checks both registries on each log and each flush and
uses whichever holds a registered provider. SDK 2 apps keep working,
including when `@opentelemetry/api` 1.10 is installed next to SDK 2. A
provider registered after `new OtelBridge()` is picked up too. When
nothing is registered anywhere, the bridge says so once at debug level,
so a missing registration can be told apart from a bug.

```ts
// SDK 3 app
import { logs } from '@opentelemetry/api';
logs.setGlobalLoggerProvider(loggerProvider);

new OtelBridge(); // before: logs dropped. after: logs reach loggerProvider
```

Passing `new OtelBridge({ loggerProvider })` behaves as before.

The four new tests fail with the fix reverted. I also ran the built
bridge against the published `@opentelemetry/sdk-logs` 3.1.0 and
`@opentelemetry/api` 1.10.0 in a scratch project, and the log arrived
whether the provider was registered before or after the bridge was
constructed.

This does not move the package to SDK 3. That is tracked in #29696.

## Related issue(s)

Fixes #29695

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

- [x] I have linked the related issue(s) in the description above
- [ ] 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

---
_Generated by [Claude
Code](https://claude.ai/code/session_018e9kMajbtR6UM1nrfYpvGa)_

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

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

**ELI5:** Mastra sends its logs through the app's OpenTelemetry setup.
On newer OpenTelemetry versions, the app registers its log sender in a
different place. Mastra looked only in the old place, so it lost every
log. This PR makes Mastra look in both places.

## Summary

This PR fixes `@mastra/otel-bridge` so it drops no logs in apps that use
OpenTelemetry JS SDK 3. The bridge now finds the global `LoggerProvider`
in either registry:

- `logs` from `@opentelemetry/api`, used by SDK 3 apps.
- `logs` from `@opentelemetry/api-logs`, used by SDK 2 apps.

### Changes

- **`observability/otel-bridge/src/bridge.ts`**
- Adds `globalLogsApis()`. It reads `logs` from the `@opentelemetry/api`
namespace object, not as a named import. This keeps the module linkable
on `@opentelemetry/api` versions below 1.10, which do not export `logs`.
The `api-logs` registry is always checked too.
- Adds `getGlobalLoggerProvider()`. It returns the first provider that
is not an unregistered proxy. It also returns whether a provider was
registered. The proxy check tests for a `_setDelegate` function.
- Adds `resolveLogger()`. When no `loggerProvider` is passed in config,
it re-reads the global provider on each log emit. This picks up
providers registered after the bridge is constructed. If the provider
changes, it rebuilds the logger.
- When no provider is registered, `resolveLogger()` writes one debug
message. The message is written once per bridge instance. It explains
how to register a provider or pass one to `new OtelBridge({
loggerProvider })`.
- `flush()` uses the same global lookup for the logger provider when no
`loggerProvider` is passed in config.
  - The constructor uses the same lookup for its initial logger.
- An explicit `loggerProvider` in config is unchanged. It is never
re-resolved.
- **`.changeset/quiet-logs-arrive.md`**: adds a patch changeset for
`@mastra/otel-bridge`.
- **`observability/otel-bridge/src/bridge.test.ts`**: adds tests. They
cover a provider registered through `@opentelemetry/api`, with
registration before and after bridge construction. They also cover
flushing that provider and the single debug message when no provider is
registered. The author reports that four new tests fail with the fix
reverted.

### Scope

- Only log delivery changes. Span handling is not changed.
- The package stays on the SDK 2 line. The move to SDK 3 is tracked
separately in `#29696`.
- The author reports a scratch-project check with
`@opentelemetry/sdk-logs` 3.1.0 and `@opentelemetry/api` 1.10.0. In that
check, the log arrived whether registration happened before or after
bridge construction. This check was not run in CI as part of this
review.

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

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-17 12:52:26 +05:30
mastra-platform[bot]
c2fc2fca28
fix(factory): open the card's session from posted card links (#30666)
> Opened by @damien-schneider

## Summary

Factory card links that agents post (Slack replies, GitHub comments,
tool results like `factory_create_work_item` /
`factory_transition_work_item` / `factory_list_work_items`) opened the
board with `?item=<id>`. The UI treats that as a highlight on the board
list, so people landed on the list and had to find and click the card
again to reach its session.

`factoryWorkItemUrl()` now builds `/factories/<id>/cards/<workItemId>`.
That's the route a board click already uses: it redirects to the session
the card shows (the current phase's context, otherwise the most recently
visited one), or to a draft that starts one if the card has no session
yet. The `board` argument is gone because the card route resolves the
board on its own.

In-app board highlights (`?item=` from the attention list) stay as they
are.

## Test plan

- `mastracode/factory`: `links.test.ts`, `read-tools.test.ts`,
`work-item-tools.test.ts` updated to expect `/cards/<id>`. All 67 pass,
and `tsc --noEmit` is clean.
- `mastracode/factory-ui`: added a `CardDraftPage` MSW test showing that
`/cards/<id>` on a card with triage and work sessions, sitting in
Building, redirects to the work session's thread. The file's 12 tests
pass.


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

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

ELI5: When an agent posts a link to a work card, the link now opens that
card's work session. Before, it opened the board list. Readers now go
straight to the work they need.

## Summary

Posted card links now use the card route. `factoryWorkItemUrl()` returns
`/factories/<id>/cards/<workItemId>`. It no longer returns a board URL
with an `?item=<id>` query parameter.

The card route resolves the board, so the `board` input is removed from
`factoryWorkItemUrl()`. Its signature changes from `{ factoryProjectId,
board, workItemId }` to `{ factoryProjectId, workItemId }`.

The card route behaves as follows:
- It redirects to the session for the card's current phase when one
exists.
- If not, it redirects to the most recently visited session.
- If the card has no sessions, it opens a draft that starts a session.

### Changes by area

- **Link generation (`mastracode/factory/src/links.ts`):** Builds card
links from the project and work item IDs. The work item ID is
URL-encoded. The documentation describes the new routing.
- **Callers (`read-tools.ts`, `work-item-tools.ts`):** Stop passing the
board key to `factoryWorkItemUrl()`. Board-based stage validation and
transitions still use the work item's board.
- **Tests (`links.test.ts`, `read-tools.test.ts`,
`work-item-tools.test.ts`):** Expect `/cards/<id>` URLs. The
no-public-URL case expects `undefined`.
- **UI test
(`mastracode/factory-ui/src/ui/pages/__tests__/CardDraftPage.msw.test.tsx`):**
Adds a test. A card with `triage` and `work` sessions in the `execute`
stage redirects to the thread for the `work` session.
- **Changeset (`.changeset/card-links-open-session.md`):** Declares a
patch release for `@mastra/factory`.

Board highlights in the in-app attention list are unchanged.

### Scope

8 files changed, 47 lines added, 21 lines removed.

### Test status

The PR author reports these results. This summary does not verify them
against completed CI checks on the current head:
- `mastracode/factory`: 67 tests pass in the updated files. `tsc
--noEmit` is clean.
- `mastracode/factory-ui`: 12 tests in `CardDraftPage.msw.test.tsx`
pass.

### API impact

`factoryWorkItemUrl()` has a breaking signature change for direct
callers. The `board` input is removed. The changeset is a patch release.

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

Co-authored-by: mastra-platform[bot] <mastra-platform[bot]@users.noreply.github.com>
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-16 23:08:59 -08:00
Damien Schneider
ec3fd034e5
feat(factory): let org admins create skills for one Factory (#30647)
## Description

Factory could edit the skills an app already ships (#29042), but it
couldn't create new ones. Settings › Skills now has a **New skill**
button. An org admin enters a name, description and instructions, and
the skill belongs to that one Factory. No redeploy is needed. Agents
load it from their next session, and a board phase can run it as
`runner.skill`. Created skills show a **Custom** badge and can be edited
or deleted from the same dialog.

What changed:

- **Storage:**
- `factory_skill_overrides` gets an additive `kind` column (`edit` |
`created`). It defaults to `edit`, so existing rows keep working. I
checked that an existing Postgres table upgrades in place.
- `create()` and `updateCreated()` run under the existing revision-row
lock. A second create of a name returns null, and so does a save that
lands after a delete, so a late save doesn't bring the skill back.
- **Sessions:**
- Created skills come from the snapshot each workspace already loads for
edits, so there is no new query on the session path.
- `FactorySkillSource` serves a created skill when no code, folder or
built-in skill has a `SKILL.md` under that name. It also reserves the
name, so a repository skill with the same name stays hidden.
- A folder or file the app left behind under the name doesn't hide a
created skill.
  - Edits whose original skill was removed stay hidden, as before.
- **API:**
- `POST /web/factory/projects/:id/skills` with `{ name, content }`
creates a skill. It returns 409 `skill_exists` when an app skill or
another created skill already uses the name.
- `PUT /web/factory/projects/:id/skills/:name` updates a created skill,
and `DELETE` on the same path deletes one, returning `{ skill: null }`.
- Responses are built from the row that was written, not from a reread.
- Admins only. New audit actions: `factory.skill.created` and
`factory.skill.deleted`.
- **Boards:**
- Board validation and board problems count the project's created
skills, so a phase can run one.
- The board cache rechecks when the project's skill revision moves. If
the names can't be read, the boards still load, flag the skill as
missing, and aren't cached.
- A board *write* that can't read the names fails with the storage error
instead of `unknown_skill`.
- `upsertBoard()` checks each project listed in `projects`. A board for
`'all'` projects may only run app skills.
- **CLI:** new `mastra api factory skill create`. Route metadata is
regenerated.
- **UI:**
- New skill dialog, which reuses `SkillSimpleForm` with an editable name
and checks the name format client-side. The name is quoted in the
SKILL.md it writes, so names like `123` work.
  - **Custom** badge on the Skills page and the phase page.
  - **Delete** with an inline confirmation.

If an app later ships a skill with the same name, the app's skill takes
over the name and the Factory's text becomes an edit of it. It keeps
applying, the editor shows "original changed", and **Revert to
original** switches to the app's skill. Nothing is lost.

One review suggestion is deliberately not applied. CodeRabbit suggested
wiring the board cache's skill reader even when the `skill-overrides`
domain isn't ready at boot. Sessions get skill edits under the same
boot-time readiness check (`factory.ts`, where the workspace factory is
built). Changing only boards would let a board accept a skill that
sessions can't load, so both keep that check.

⚠️ **Before release:** `factory.skill.created` and
`factory.skill.deleted` must be registered in the WorkOS dashboard
(Audit Logs → Events), like the edit actions were.

## Related issue(s)

None. Follow-up to #29042 (skill edits) and #28823 (custom board
skills).

## 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)
- [x] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Test plan

All new tests use real storage and real routes, with no mocked storage.
I checked that each fix's test fails without that fix.

- **Storage (LibSQL and Postgres):**
  - create once per name, including under concurrency
  - `updateCreated` refuses after a delete, and never touches edits
  - an orphaned edit gives way to a created skill
  - an existing table upgrades in place
- **Routes:**
  - create, update and delete, each with its audit event
  - 409 for app-skill and duplicate names
  - 400 for an invalid SKILL.md or name
  - 403 for non-admins, and 404 for another org's project
  - an all-digit name works
- responses stay correct when another admin deletes the skill
mid-request
  - a created skill becomes an edit once the app ships the same name
- **Sessions:**
- the creating project's sessions load the skill, and another project's
don't
  - a delete reaches new and reused workspaces
  - a repository skill with the same name is hidden
  - a leftover folder or stray file doesn't hide the created skill
- **Boards and `upsertBoard()`:**
- a phase running a created skill is accepted, and flagged missing after
a delete
  - a names read that fails once recovers on the next load
  - a write fails with the storage error
  - named projects are each checked, and `'all'` stays app-only
- **UI (MSW):**
- create sends the expected SKILL.md (quoted name) and shows **Custom**
- an invalid name keeps Create disabled, and a 409 message shows in the
dialog
  - non-admins get no button
  - delete asks for confirmation
- **Results:**
- `@mastra/factory`: `check` and `lint` pass, and 32 focused test files
(920 tests) pass.
- `factory-ui`: `typecheck`, `test:unit` and the skills and board-config
MSW tests pass.
  - CLI descriptor test passes.
  - Not tried in a running Factory in a browser yet.

## Checklist

- [ ] I have linked the related issue(s) in the description above
- [x] 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

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

https://claude.ai/code/session_01VhgyDSnuLvveDjDQduz1fT

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

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

ELI5: Organization admins can now create a new skill for one Factory
project without a new app release. Sessions and board phases can then
use that skill. Admins can also edit or delete it.

## Overview

This change adds Factory-scoped skills. Admins create them in the UI or
the CLI. A created skill belongs to one Factory project. Admins can edit
and delete it. The skill works in sessions, board phases, and board
validation.

## Storage

- `SkillOverridesStorage` adds a `kind` field to each record. Valid
values are `edit` and `created`. The database default is `edit`.
- `upsert` accepts an optional `kind`. The default is `edit`.
- The new `create` method stores a created skill with an empty
`baseHash`. If a created skill with the same name exists, `create`
returns `null` and does not change the revision. Otherwise, it replaces
any existing row and increments the project revision in one transaction.
- `updateCreated` saves changes only to an existing created skill.
Otherwise, it returns `null`.
- The audit `skill` action list adds `created` and `deleted`.

## Catalog and sessions

- `FactorySkillInfo.origin` adds the value `project`. It adds optional
`created` metadata with `updatedBy` and `updatedAt`.
- `listFactorySkills` includes created overrides whose names do not
match an original skill. It sorts the combined list by name.
- A name that matches an original skill appears as an edit to that
original skill.
- The new `projectSkillNamesOf` adapter returns the storage revision and
the created-skill names for a board scope.
- `workspace.ts` adds an optional `created` flag to
`FactorySkillOverride`. Created skills appear as directories that
contain `SKILL.md`. Created skill names are excluded from repository
skills.

## Boards

- `ProjectBoardCache` accepts a `projectSkills` provider. It stores the
skill revision with each board check. It rechecks board skill problems
when the revision changes.
- If reading project skill names fails, the cache logs one warning per
project. It compiles with an empty set. It records an unreadable
revision so the next load retries.
- `findBoardSkillProblems` accepts a `projectSkills` set. A runner skill
that matches a project skill name counts as found.
- `BoardWrites.validate` accepts an optional `projectSkills` set. Board
create, replace, and validate paths pass it.
- `MastraFactory.upsertBoard` checks each named project against that
project's skill names. A board for `'all'` projects can use only app
skills.
- `factory.ts` supplies the resolver only when the `skill-overrides`
storage domain is ready.

## API

- The new `skillCreate` route is `POST
/web/factory/projects/:id/skills`. Its body schema checks the name and
content.
- The create handler returns `409` when the name matches an original
skill or when storage reports a conflict. Otherwise, it returns `201`
with the catalog entry.
- Edit works for a skill that has an original or an existing override of
kind `created`.
- Revert of a created skill deletes it, audits `factory.skill.deleted`,
and returns `skill: null`.

## CLI

- `mastra api factory skill create` uses the `skillCreate` route and
requires JSON input.
- The `update` and `revert` descriptions now cover project-created
skills.

## Factory UI

- `FactorySkillsSection` shows a **New skill** button when `factoryId`
is set and `canEdit` is true. It shows a **Custom** badge for
`project`-origin skills. `PhaseConfig` shows the same badge.
- `FactorySkillEditorDialog` supports create and edit. Its `skill` prop
is optional. Names allow lowercase letters and digits separated by
single hyphens, up to 64 characters. The description must be nonempty
after trimming.
- For project-origin skills, the dialog offers delete with confirmation.
Confirming calls the edit mutation with `content: null`.
- `useFactorySkillCreateMutation` is added. The edit and create
mutations invalidate the skills and board catalog queries.

## Notes

- If an app later ships a skill with the same name, the app skill takes
over the name. The Factory text remains as an edit. Reverting it removes
the Factory text.
- `factory.skill.created` and `factory.skill.deleted` must be registered
in WorkOS before release. The PR objectives state this requirement. The
diff does not verify it.

## Test coverage

- Storage tests cover create, the duplicate case, kind preservation on
upsert, replacement of an edit, and six concurrent creates that yield
one result.
- Route tests cover creation and audit records, edit and delete of
created skills, conflicts, invalid content, permission checks, and
app-skill takeover.
- Workspace tests cover session visibility, reuse, other projects, and
deletion.
- Board tests cover unknown-skill refusal and recovery after creation or
deletion.
- UI MSW tests cover creation, invalid names, duplicate-name errors,
admin-only access, and confirmed deletion.
- The PR author reports these results. This review did not verify them
against the current head:
  - `@mastra/factory` `check` and `lint` pass.
  - Focused suites pass across 32 files and 911 tests.
  - `factory-ui` `typecheck` and `test:unit` pass (776 tests).
  - The CLI descriptor test passes.

## Review metrics

- Files changed: 28. Lines added: 1447. Lines removed: 163.
- Review findings: not available.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-16 23:08:01 -08:00
dane-ai-mastra[bot]
f346f6c4af
chore: version packages (alpha) (#30660)
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/core@1.84.0-alpha.6

### Minor Changes

- Knowledge storage can supply scope declarations, access rules
included. ([#29428](https://github.com/mastra-ai/mastra/pull/29428))

A store returns declarations from `getScopeDeclarations()` (none by
default). Knowledge merges them under its config's: the config wins on a
key both declare, and a declaration that doesn't compile is skipped with
a warning. When stored scopes come from a skipped declaration, the
declaration check's error names that declaration and why it was skipped,
so it can be fixed in the store. The store's answer is reused for 30
seconds and read again after `renameScopeDeclaration`, so a declaration
the store adds, removes or changes (access rules included) applies
within that window without a store read on every call. Revoking access
through the store can therefore take up to 30 seconds to take effect.

  ```ts
  class ImportingKnowledgeStorage extends InMemoryKnowledgeStorage {
    override async getScopeDeclarations() {
      return {
        'imports:$name': {},
'linear:$account:$connection': { access: [{ principal: 'imports:all',
role: 'viewer' }] },
      };
    }
  }
  ```

Runs that hold `imports:all` then read every Linear connection's pages.
## @mastra/platform@0.1.0-alpha.1

### Minor Changes

- Added `PlatformBrowser`, a Stagehand browser backed by a Mastra
Platform browser session. By default it provisions a session with `POST
/v1/browsers/sessions` on the Platform and connects to the returned CDP
URL; pass `cdpUrl` to connect to a session you already provisioned, with
no token or API call. The access token falls back to
`MASTRA_PLATFORM_ACCESS_TOKEN` / `MASTRA_PLATFORM_SECRET_KEY`, the
project to `MASTRA_PROJECT_ID`, and the API URL to
`MASTRA_BROWSER_API_URL`. `@mastra/platform` now depends on
`@mastra/stagehand` at runtime.
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

  ```ts
  import { PlatformBrowser } from '@mastra/platform';

const agent = new Agent({ name: 'browser-agent', model, browser: new
PlatformBrowser() });
  ```

- Added `@mastra/platform`: hosted Mastra Platform Memory and Knowledge
clients, with Platform Sandbox and Filesystem re-exported from
`@mastra/platform-workspace`. `PlatformMemory` is a drop-in `memory` for
`Agent` that loads observations and recent messages from a Platform
Memory instance and saves each turn back; observation and reflection run
on the Platform. `PlatformMemoryClient` exposes the same API directly.
Credentials fall back to `MASTRA_PLATFORM_ACCESS_TOKEN` /
`MASTRA_PLATFORM_SECRET_KEY`. `PlatformMemory` uses
`MASTRA_MEMORY_INSTANCE_ID`; `PlatformKnowledge` uses
`MASTRA_KNOWLEDGE_INSTANCE_ID`. `PlatformKnowledge` takes every scope
declaration and access rule from its instance, Memory's and Platform
importers' included, and has no `scopes` option. Agents read imported
pages when their runs hold the scope an importer's rule grants (for now
`imports:all`).
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

  ```ts
import { PlatformMemory, PlatformKnowledge, PlatformSandbox,
PlatformFilesystem } from '@mastra/platform';

const agent = new Agent({ name: 'assistant', model, memory: new
PlatformMemory() });
  ```

### Patch Changes

- `PlatformKnowledge` now supports listing pins: `knowledge_pin` with
`kind: 'list'` pins a page's listing on hosted Knowledge instead of
refusing it as an old storage adapter.
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

- `PlatformMemory` fixes for read-only runs and working memory:
([#29428](https://github.com/mastra-ai/mastra/pull/29428))

- A read-only run (`memory: { options: { readOnly: true } }`) now sees
the thread's observations and unobserved messages, read through the
Memory instance's read-only context route. Before, it got no stored
context at all. It still saves nothing and starts no observation.
- The `workingMemory` option now delivers what it says: `readonly` and
`tool` add the resource's stored working memory to each run's prompt,
read fresh each run; `tool` also tells the agent to update it with
`updateWorkingMemory`; `off` leaves it out. Before, stored working
memory never reached the prompt in any mode.

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6

See [release notes](https://github.com/mastra-ai/mastra/releases) for
published changes.
## @mastra/client-js@1.60.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/react@1.15.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
## @mastra/deployer-cloud@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## @mastra/longmemeval@1.1.43-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/opencode@0.1.43-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/factory@0.29.0-alpha.7

### Patch Changes

- The **Activity** sort in the Factory sidebar now orders sessions that
share a status by their last update instead of their creation date, the
same as **Last updated** does. An older session that was updated since
no longer sinks below a newer one that was left alone.
([#30656](https://github.com/mastra-ai/mastra/pull/30656))

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/code-sdk@1.19.1-alpha.7
## create-factory@0.5.0-alpha.6

### Patch Changes

- Updated dependencies
[[`bfcb0f7`](bfcb0f738d),
[`383a19d`](383a19d047)]:
  - mastra@1.40.0-alpha.6
## @mastra/code-sdk@1.19.1-alpha.7

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
## mastracode@0.50.1-alpha.7

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/code-sdk@1.19.1-alpha.7
## mastra@1.40.0-alpha.6

### Patch Changes

- The Factory sidebar now groups sessions by board and shows a second
line under each session by default, with when it last changed and its
pull request. Turn on **Compact view** or set **Group** to **None** in
the sidebar's properties menu to get one line per session or a single
list back. Settings you already changed keep their values; the rest
follow the new defaults.
([#30656](https://github.com/mastra-ai/mastra/pull/30656))

- Factory **Settings** now shows theme and completion sound on **My
account**, next to your profile and log out, instead of on a separate
**Preferences** page. Settings opens on **My account**, and old
Preferences links go there.
([#30658](https://github.com/mastra-ai/mastra/pull/30658))

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## @mastra/deployer@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/mcp-docs-server@1.3.14-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/playground-ui@69.1.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
  - @mastra/react@1.15.1-alpha.6
## @mastra/server@1.84.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
## @mastra/elysia@0.1.24-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/express@1.5.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/fastify@1.5.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/hono@1.7.26-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/koa@1.7.28-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/nestjs@0.3.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/next@0.2.42-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/hono@1.7.26-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/tanstack-start@0.2.42-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/hono@1.7.26-alpha.6
  - @mastra/server@1.84.0-alpha.6
## @mastra/temporal@0.6.1-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/deployer@1.84.0-alpha.6
## create-mastra@1.40.0-alpha.6


## @internal/playground@1.40.0-alpha.6

### Patch Changes

- Updated dependencies
[[`0eb407e`](0eb407ebcc)]:
  - @mastra/core@1.84.0-alpha.6
  - @mastra/client-js@1.60.1-alpha.6
  - @mastra/react@1.15.1-alpha.6
  - @mastra/playground-ui@69.1.0-alpha.6

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-17 00:01:31 -07:00
Damien Schneider
de5af00226
fix(factory-ui): collapse empty board columns to vertical strips on phones (#30659)
## Description

In the Kanban board view on phones, empty columns stayed full width
(320px). Each one showed a count with its name written flat below it. A
board with mostly empty phases took several screens of sideways
scrolling to cross, and from the first screen you couldn't tell those
phases were there.

Desktop already showed empty columns as narrow strips with the phase
name written vertically. That only applied at the `lg` breakpoint. Now
it applies at every width. The change is limited to `BoardColumn.tsx`:
the `lg:` variants on the collapsed width, the count and action
placement, and the vertical label are now unconditional.

Desktop is unchanged: the before and after desktop screenshots are
byte-identical.

**Phone (390 × 844, touch), dark mode**

| | Before | After |
|---|---|---|
| Board as it opens | <img
src="https://raw.githubusercontent.com/mastra-ai/mastra/7bb4183dfa1faa22a063649244b0046c4a90f7d9/pr-assets/phone-before.png"
width="260" /> | <img
src="https://raw.githubusercontent.com/mastra-ai/mastra/7bb4183dfa1faa22a063649244b0046c4a90f7d9/pr-assets/phone-after.png"
width="260" /> |
| Scrolled to the far right | <img
src="https://raw.githubusercontent.com/mastra-ai/mastra/7bb4183dfa1faa22a063649244b0046c4a90f7d9/pr-assets/phone-far-edge-before.png"
width="260" /> | <img
src="https://raw.githubusercontent.com/mastra-ai/mastra/7bb4183dfa1faa22a063649244b0046c4a90f7d9/pr-assets/phone-far-edge-after.png"
width="260" /> |

Before, the board was about 2,320px wide on a phone and you had to
scroll past six full-width empty columns. Now it's about 736px, and all
the empty phases fit on one screen. On touch screens a strip shows its
`+` (create) button where desktop shows the count, the same as on a
touch laptop today.

**Desktop (unchanged)**

<img
src="https://raw.githubusercontent.com/mastra-ai/mastra/7bb4183dfa1faa22a063649244b0046c4a90f7d9/pr-assets/desktop-after.png"
width="600" />

The existing board MSW suites (`BoardPagePendingStates`,
`BoardPageEmptyStates`, `CustomBoardPage`) and the typecheck pass.

The screenshots are served from a commit on this branch (`7bb4183`) that
the next commit removes, so they aren't part of the diff.

No changeset: the change is only in `@internal/factory-ui`, which
changesets ignore, and other factory-ui-only fixes have shipped without
one.

## Related issue(s)

None filed. This was reported from a phone screenshot of the board view.

## Type of change

- [x] Bug fix (non-breaking change that fixes an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] Documentation update
- [ ] Code refactoring
- [ ] Performance improvement
- [ ] Test update

## Checklist

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

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

https://claude.ai/code/session_01VhgyDTBtDa6hrKYsrk39gW

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-16 22:00:01 -08:00
Damien Schneider
383a19d047
feat(factory-ui): show Preferences on My account (#30658)
## Description

Settings › Preferences had two rows, Theme and Completion sound. Both
are personal, like everything else on My account, so they now sit on My
account between Profile and Session. That leaves My account and
Connections in the sidebar's Account group.

**Before**: two pages.

![Before: My
account](https://raw.githubusercontent.com/mastra-ai/mastra/7b67e059d0c9d65c60bcbd00d164fa771bbd82f8/.pr-assets/preferences-in-my-account/before-account.png)

[Before: Preferences](``
https://raw.githubusercontent.com/mastra-ai/mastra/7b67e059d0c9d65c60bcbd00d164fa771bbd82f8/.pr-assets/preferences-in-my-account/before-preferences.png
``)

**After**: one page.

![After: My account with
Preferences](https://raw.githubusercontent.com/mastra-ai/mastra/7b67e059d0c9d65c60bcbd00d164fa771bbd82f8/.pr-assets/preferences-in-my-account/after-account.png)

Settings now opens on My account instead of Preferences. That covers the
avatar link at the bottom of the sidebar, the `/settings` index and
unknown sections. `/settings/preferences` is a retired section and
redirects to `/settings/account`, keeping search and return state, so
old links and bookmarks still work. Settings search and global search
find My account when you type "preferences", "theme" or "completion
sound".

Preferences render outside the account loading checks. Before, a failed
or pending `/auth/me` replaced the whole page with a notice. Now that
notice only replaces Profile, and the theme and sound controls stay
usable. `GeneralSettings` is renamed `PreferencesSettings`, and its test
is folded into the `AccountSettingsSection` tests.

Tests: MSW tests cover changing the theme from My account, theme and
sound still working when account details fail to load (this test fails
if Preferences goes back behind the account checks), the
`/settings/preferences` redirect, and settings search. Existing tests
that opened `/settings/preferences` now open `/settings/account`. The
affected files pass 85/85 on two runs. Typecheck, oxlint and prettier
are clean. `AppStartup.msw.test.tsx` has 8 failures, including the
Settings case, but they fail the same way on `main` (`GET /web/status`
waits for the sign-in check), so they're unrelated to this change.

The screenshots come from the real Vite dev server, with API responses
filled in by Playwright using placeholder account data. They're linked
by commit, and the second commit removes them from the tree. There's a
patch changeset for `mastra`.

## Related issue(s)

None. This came from a review of the settings layout.

## 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

- [ ] I have linked the related issue(s) in the description above
- [x] I have made corresponding changes to the documentation (if
applicable). No docs mention the Preferences page.
- [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

---
_Generated by [Claude
Code](https://claude.ai/code/session_01VhgyDSq83V7jJPCXfD2Grj)_

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

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

## ELI5

Settings now puts the theme and completion sound on the My account page.
Old links to the Preferences page send people to My account instead.

## Overview

This change removes the separate Preferences settings page in the
Factory UI. Its controls move to the My account page, between Profile
and Session. The Account sidebar group now lists only My account and
Connections.

## Behavior changes

- Settings opens on My account. This applies to the avatar link,
`/settings`, and unknown settings sections.
- `/settings/preferences` redirects to `/settings/account`. The redirect
keeps the search query and location state.
- Global search and settings search find My account for "preferences",
"theme", and "completion sound".
- The Preferences controls render outside the account-loading checks.
They stay usable when account details are pending or fail to load.
- The logout section appears only when authentication is enabled and the
user is signed in. Logout still clears MastraCode storage and redirects
to the logout URL.

## Code changes

- `GeneralSettings` is renamed to `PreferencesSettings`. Its subsection
title changes from "General" to "Preferences".
- `SettingsSection` no longer includes `preferences`.
`RETIRED_SETTINGS_SECTIONS` maps `preferences` to `account`.
- `useSettingsSection`, `SettingsPage`, the `/settings` router default,
and `SidebarSettingsLink` now use `account` instead of `preferences`.
- `SettingsPanel` no longer imports or renders `GeneralSettings`.
- `SettingsNavigation` removes the Preferences item and its
`IconColorPalette` import. Its search text moves to the My account item.
- `GlobalSearchNavigationResults` replaces the Preferences destination
with My account and updates its search keywords.
- `AccountSettingsSection` renders profile details through
`ProfileSubsection` and always includes `PreferencesSettings`.
- A changeset records a patch release for `mastra`.

## Tests

- `GeneralSettings.msw.test.tsx` is deleted. Its coverage moves to the
`AccountSettingsSection` tests.
- Tests added or updated:
- Switching the theme from System to Dark saves the choice to
`localStorage`.
- With account details failing to load, the theme can still change, and
the completion sound control stays visible without the logout button.
  - A retired `/preferences` route redirects to My account.
- Navigation tests start at the account route and expect the Account
group to show only My account and Connections.
- Search for "preferences", "theme", and "completion sound" finds My
account.
- The author reports 85/85 passing tests across two runs for the
affected files. The author also reports clean typecheck, oxlint, and
prettier results. These results were not verified against the current
head.
- The author reports 8 failures in `AppStartup.msw.test.tsx`, including
the Settings case. The author states that the same failures occur on
`main`, because `GET /web/status` waits for the sign-in check. This was
not verified.

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

---------

Co-authored-by: Claude <noreply@anthropic.com>
2026-11-16 21:49:44 -08:00
Damien Schneider
bfcb0f738d
fix(factory-ui): group sessions sidebar by board (#30656)
**─────── TLDR ───────**
> The Sessions sidebar now opens grouped by board with two-line rows, so
a fresh view shows where each session belongs and when it last moved.

The old defaults gave a new reader one flat list of titles: no board, no
date. The Activity sort also broke ties by creation date, so inside Idle
it read exactly like Last created.

### Behavior changed

someone opening the sidebar with no saved view
&nbsp;&nbsp;├─ **was** — one "All sessions" list, one line per session
&nbsp;&nbsp;└─ **now** — Work, custom boards, then User; last update
under each row

two sessions with the same status under Activity
&nbsp;&nbsp;├─ **was** — the newest created first, whatever changed
since
&nbsp;&nbsp;└─ **now** — the most recently updated first, as Last
updated does

someone who already picked None or Compact view
&nbsp;&nbsp;└─ **unchanged** — the view stores only what differs, so it
stays

### Decisions

- **Board grouping returns, Owner stays All** — Mine hides the Factory's
card sessions; one constant each to undo.
- **ties read `updatedAt` as stored** — it moves on rename, sandbox or
first message, not each chat turn; a per-run touch is separate.
- **server default stays `groupBy: 'none'`** — the sidebar always sends
`groupBy`; only raw API callers read it.

### Not verified

- [ ] the new defaults in a running sidebar — checked through the MSW
suites, not in a browser

---

> ██████████████████ **tests** `+47 −53` — net −6, the fixture that
undid the old default is gone
> ██ **changeset** `+10`
> █ **source** `+3 −3` — three one-line changes
2026-11-16 21:45:12 -08:00
mastra-platform[bot]
0eb407ebcc
Publish unified Platform clients for Memory, Knowledge, Browser, Sandbox, and Filesystem (#29428)
## Summary

Adds `@mastra/platform`: one package with clients for hosted Mastra
Platform services. It also changes `@mastra/core` Knowledge so that a
store can supply its own scope declarations.

### `@mastra/platform`
- `PlatformMemory` / `PlatformMemoryClient`: hosted Memory. It loads
observations and recent messages from a Platform Memory instance and
saves each turn back. Observation and reflection run on the Platform.
- Read-only runs (`readOnly: true`) read the thread's context through
the instance's read-only context route. They save nothing.
- `workingMemory: 'readonly' | 'tool' | 'off'` controls whether the
resource's stored working memory goes into each run's prompt. `tool`
also tells the agent to update it.
- `PlatformKnowledge`: hosted Knowledge. It forwards Knowledge
page-store operations to the Knowledge service and rebuilds Knowledge
error types from the error names the service returns.
- It takes no `scopes` option. The instance serves every scope
declaration and access rule (Memory's and importers' included) through
`getScopeDeclarations`, so access is changed in one place.
  - It supports listing pins.
- If the service doesn't have `getScopeDeclarations` yet, the client
treats that as no declarations. Only the service's own unknown-operation
404 (`Knowledge operation not found`) counts; a missing instance or any
other 404 still fails, so a misrouted client can't silently read no
declarations.
- `PlatformBrowser`: a Stagehand browser on a Platform browser session.
- By default it provisions a session through `POST
/v1/browsers/sessions` and connects to the returned CDP URL.
- Pass `cdpUrl` to connect to an existing session. That needs no token
and makes no API call.
  - Env vars: `MASTRA_PROJECT_ID` and `MASTRA_BROWSER_API_URL`.
  - New runtime dependency: `@mastra/stagehand`.
- `PlatformSandbox` / `PlatformFilesystem`: re-exported from
`@mastra/platform-workspace`.
- Credentials fall back to `MASTRA_PLATFORM_ACCESS_TOKEN`, then
`MASTRA_PLATFORM_SECRET_KEY`. Instance IDs come from
`MASTRA_MEMORY_INSTANCE_ID` and `MASTRA_KNOWLEDGE_INSTANCE_ID`; service
URLs can be overridden with `MASTRA_MEMORY_API_URL` and
`MASTRA_KNOWLEDGE_API_URL`.

### `@mastra/core` Knowledge (for core reviewers)
- `KnowledgeStorage.getScopeDeclarations()` is new and returns `{}` by
default. Knowledge merges the store's declarations under the config's:
  - On a key both declare, the config's declaration wins.
  - A store declaration that doesn't compile is skipped with a warning.
- Every Knowledge entry point now calls
`KnowledgeScopeRuntime.resolve()` before it runs: agent runs, host
writes, `readScopeFor`, `explainAccess` and `renameScopeDeclaration`.
- The store's answer is reused for 30 seconds and shared by concurrent
calls.
- A failed read isn't cached. The cache is also cleared after
`renameScopeDeclaration`, and a read that started before the rename
can't publish its answer after it.
- The cache also holds access rules, so revoking access through the
store can take up to 30 seconds. The changeset says so.
- The declarations are recompiled only when the store's answer changes.
- Without the cache, hosted Knowledge would make one extra HTTP call per
operation.
- The `'*'` access principal is gone. Access rules must name a declared
principal (for example `imports:all`).
- Public signatures are unchanged. `readScopeFor` and
`renameScopeDeclaration` already returned promises.

## Test plan (head `93ca37f845`)
- `pnpm exec vitest run packages/platform/src --config
packages/platform/vitest.config.ts`: 42 passed. 28 live tests were
skipped because they need hosted credentials.
- `pnpm --filter @mastra/platform exec tsc --noEmit`: clean. oxlint and
oxfmt: clean.
- `pnpm --filter @mastra/core exec vitest run src/knowledge`: 30 files,
318 tests passed. `pnpm --filter ./packages/core check`: clean.
- New tests:
- `store-scopes.test.ts`: call counts for `getScopeDeclarations` within
the 30-second window and after a rename, a retry after a failed read,
expiry of the 30-second window, a read started before `invalidate()` or
replaced by a newer read that must not publish its answer, and the
declaration-check error naming a skipped store declaration and why.
- `errors.test.ts`: the unknown-operation 404 reads as no declarations,
while a missing instance, any other 404 or a 500 still fails.
- `platform-browser.test.ts`: trailing slashes on the API URL are
dropped before the sessions path is added.
  - Each new test fails against a mutated implementation.
- Built ESM and CommonJS imports of `PlatformMemory`,
`PlatformKnowledge`, `PlatformBrowser`, `PlatformSandbox` and
`PlatformFilesystem`: 21 exports in each format.
- Hosted staging, snapshot `0.0.0-feat-platform-unified-20261117035452`
built from this head and installed from npm:
- `PlatformKnowledge`: a real `Agent` (only the model scripted) creates,
reads, notes, searches, lists, updates, pins and unpins a page in an org
scope through the Knowledge tools. Deleting the page as the agent is
refused because the run holds `editor`, not `owner`.
- `PlatformMemory` (`MASTRA_MEMORY_API_URL` set to the staging host):
two `Agent` turns on one thread; the second turn's prompt carries the
first, and all four messages are stored. The client's create, save,
list, context and working-memory calls work, and deleting the thread
works.
- `PlatformSandbox` and `PlatformFilesystem`: bucket write, read, list
and delete; a sandbox starts, runs `echo ok`, writes and reads a file,
and is destroyed; reattaching the destroyed sandbox fails with 410.
- Not yet run: `PlatformBrowser` hosted provisioning. Its endpoint,
`POST /v1/browsers/sessions`, is not deployed yet and returns 404.
Connecting through `cdpUrl` needs no Platform endpoint.

## Merged with main
Main was merged in (no rebase). The only code conflict was
`packages/core/src/knowledge/scope-runtime.ts`: it keeps main's
stale-row filtering from #30019 and this PR's narrowed return type.
`pnpm-lock.yaml` takes main's and was regenerated; only the
`packages/platform` importer differs. Main was merged in again at
`4c364b00ba` with no conflicts. Factory's requested changes are in: the
30-second reuse of store declarations, the PlatformBrowser changeset and
the removed `platform/*` workspace glob.

---------

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>
Co-authored-by: Jamie Lee Nichols <10267569+CodingButter@users.noreply.github.com>
Co-authored-by: Mastra Code (anthropic/claude-opus-5-5) <noreply@mastra.ai>
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
Co-authored-by: arctic-char <146986046+arctic-char@users.noreply.github.com>
Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
Co-authored-by: Tyler Barnes <tylerdbarnes@gmail.com>
2026-11-16 21:36:00 -08:00
dane-ai-mastra[bot]
3b426304ac
chore: version packages (alpha) (#30602)
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/factory@0.29.0-alpha.6

### Minor Changes

- Added personal custom providers. A custom OpenAI-compatible endpoint
is now saved either for yourself or for your organization, the same way
provider API keys are.
([#29879](https://github.com/mastra-ai/mastra/pull/29879))

- **Personal endpoints** are visible only to you and are used by your
personal sessions.
- **Organization endpoints** are used by work that runs on the
organization's credentials. Adding, editing or removing one now requires
an organization admin.
- Custom endpoints are added from the **Add provider** dialog and listed
with the other providers. The separate "Custom providers" section is
gone.
- Editing an endpoint without retyping its API key keeps the saved key,
as long as the URL stays on the same host. Moving it to another host
asks for the key again.
- Adding an endpoint under a name that is already in use is refused
instead of replacing the existing one. So are names reserved for a
built-in provider, its sign-in, or the Mastra Gateway (for example
"OpenAI", "OpenAI Codex" or "Mastra Gateway").
- A Factory hosted on the Mastra platform only calls custom endpoints at
a public HTTPS address. Saving one on plain HTTP, `localhost`, a private
network or the cloud metadata address is refused with a message
explaining why. Local and self-hosted Factories can still use endpoints
on their own machine or network, such as Ollama or vLLM.

  **Before you upgrade**

- Organization endpoints no longer apply to personal sessions. Add the
endpoint again as a personal one to keep using it there.
- On a hosted Factory, endpoints saved earlier on a local or plain-HTTP
address are marked "URL not allowed" and their models are no longer
offered. Edit them to a public HTTPS address.
- Review your organization's endpoints. One named like a built-in
provider (for example "OpenAI") still takes over that provider's models;
remove it or rename it.

The custom provider routes take a `scope` (`user` by default, or `org`).
Saving with `previousId` edits that provider; saving without it adds
one:

  ```http
  POST /web/config/custom-providers
{ "name": "My gateway", "url": "https://llm.example.com/v1", "models":
["my-model"], "scope": "org" }

  DELETE /web/config/custom-providers/my-gateway?scope=org
  ```

- Work Intake: what you select is what comes in.
([#30625](https://github.com/mastra-ai/mastra/pull/30625))

- **One list per service, no sync switches.** Settings → Work Intake
lists each connected service with its selected sources and an Add
account button. A service with nothing selected brings in nothing.
Dependabot alerts keep their own switch.
- **GitHub issues follow the list.** New GitHub issues become cards only
for repositories in the GitHub list. Pull requests still come from every
linked repository. On upgrade, every repository already linked to a
Factory is added to the list once, so nothing stops arriving. Linking a
repository adds it to the list unless the request sends `selectIntake:
false`, and adding a repository to the list brings in its open issues.
    To link a repository without bringing in its issues:

    ```http
POST
/web/factory/projects/:projectId/source-control-connections/:connectionId/repositories
{ "repository": { "externalId": "99", "slug": "acme/app" },
"selectIntake": false }
    ```

- **Vanta follows its selection.** Vulnerabilities sync only while the
Vanta source is selected. Organizations whose Vanta sync was on with
nothing selected get the source selected once on upgrade.
- **Routing has its own page.** The intake order and the Not routed list
moved from Settings to Routing in board settings.

- Fixed Factory server memory growing with every session it ever opened.
Factory now unloads a session from server memory when it stops the
session's sandbox (a card leaving a phase's context or finishing), and
after 30 minutes without activity. Sessions that are running, waiting on
an approval or answer, open in a browser tab, or running a background
process in their sandbox stay loaded. Unloading keeps the thread, its
messages, the session row and the sandbox, and the session's next
message, run, wake or opened tab loads it again. Without `auth`, a
deferred wake for an unloaded session waits until something else loads
it, as it does after a restart.
([#30612](https://github.com/mastra-ai/mastra/pull/30612))

Change the timeout with `idleSessionUnload`, or pass `false` to keep
every session loaded:

  ```ts
  const factory = new MastraFactory({
    storage,
idleSessionUnload: { idleMs: 60 * 60_000, sweepIntervalMs: 5 * 60_000 },
  });
  ```

- Asking a Factory session to work on a card now goes through the board,
the way the board's own buttons do. Before, asking a Slack or web
session to "review" a pull request that already had a card often ended
in a side session posting its review in the chat, while the card's own
review waited for approval.
([#30628](https://github.com/mastra-ai/mastra/pull/30628))

- `factory_transition_work_item` takes `rerun: true` to run the stage a
card is already in again, as the board's **Start** button does. The run
counts as approved by the person asking, and a busy card is refused as
on the board. A rerun needs a person in the turn. Without `rerun`, a
request for the card's own stage changes nothing and says whether its
run is waiting for approval. The result now includes the card's `url`.
- Asking for a side session still starts one. The tools now steer a
plain "review this pull request" to the pull request's card, and keep
side sessions for what people ask to run in one and for work no stage
does, such as pushing fixes to a pull request.
- Every tool that takes a work item also accepts the issue or pull
request it tracks: its link, `owner/repo#12`, `group/project!7`, or a
tracker key such as `ENG-42`. With several repositories linked, the link
finds the right card where a bare `#12` might not.
`factory_list_work_items` takes the same references as its query.
- `factory_inspect_work_item` lists the card's stage, whether it can run
again, and the stages its board lets it move to next.
- `factory_start_session` only starts side sessions. Its `workItem` and
`role` inputs are removed: they started a card's role without the
board's rules, such as which stage the card is in and whether it is
busy.

### Patch Changes

- Added `GET
/web/factory/projects/:id/work-items/:workItemId/session-repository`. It
returns the repository a session on the card starts in, resolved with
the same rules as the card's runs, or the reason the card has none.
([#30609](https://github.com/mastra-ai/mastra/pull/30609))

- Fixed reopened pull request review sessions loading the pull request's
AGENTS.md and CLAUDE.md as trusted instructions. After a review card
finished and the server restarted or unloaded the session, a new message
in that session read instruction files from the pull request branch.
Sessions that ever ran pull request or review work now keep reading
instructions from the base branch, or read none when the trusted branch
can't be determined.
([#30612](https://github.com/mastra-ai/mastra/pull/30612))

- **Settings › Tools** can now list each Mastra Connect connection's
tools. The new `GET /web/integrations/platform/connect-tools/tools`
route resolves the tools a session started by the signed-in user would
get: Factory's default Connect tools, or what the `tools` option
returns. It marks tools that ask for approval and lists the default
tools Factory leaves out because they delete or archive. When the tools
can't be resolved, it answers 502 `tools_unavailable` with the reason.
([#30610](https://github.com/mastra-ai/mastra/pull/30610))

- Fixed **Settings › Tools** saying Mastra Connect tools are off when a
Factory sets the `tools` option, even when that option uses Connect
tools (#30579). The page now lists the Platform project's connections
whenever the Factory has Platform credentials and `MASTRA_PROJECT_ID`,
and says that session tools come from code. When either one is missing,
the page names it instead of listing every possible cause.
([#30607](https://github.com/mastra-ai/mastra/pull/30607))

- Reduced the work the Factory server does to keep the session sidebar
and board up to date, and fixed session latency timestamps on LibSQL.
([#30648](https://github.com/mastra-ai/mastra/pull/30648))

- Projects without a linked repository no longer rebuild their session
list on every sidebar poll.
- Session activity now sorts only the cards that are running, waiting or
held by a session, instead of every card on the board.
- A session's first materialize, first message and first command times
are now recorded once when several Factory processes share one LibSQL
database, so a later write no longer replaces the first recorded time.

- Fixed slow reading of the pull request number from GitHub card keys
that contain very long runs of digits. The number returned is unchanged.
([#30577](https://github.com/mastra-ai/mastra/pull/30577))

- New, renamed and hidden sessions now show up in teammates' sidebars
right away, instead of after up to a minute, and the sidebar no longer
polls while a session starts. The `session-rows` and `session-activity`
answers no longer include `settling`: every change to either answer now
sends a frame on the project's feed.
([#30617](https://github.com/mastra-ai/mastra/pull/30617))

- Fixed deleting an intake rule being slow on remote databases and
breaking other open rule edits. A delete now removes only the deleted
rule instead of rewriting every rule after it, so the remaining rules
keep their order and revision and edits opened before the delete still
save. ([#30613](https://github.com/mastra-ai/mastra/pull/30613))

- Approving a held Factory run with `factory_resolve_proposal`, or
retrying a failed one with `factory_retry_decision`, now makes the
session follow the run's card, as moving the card already did. Before, a
Slack session that approved a card's review could promise to post the
result and then never hear how the review ended. Both results now
include the card's `url`.
([#30637](https://github.com/mastra-ai/mastra/pull/30637))

- Fixed board cards showing a different session status than the sidebar.
A card with a suggested run and a running session now shows it waits on
you on the board too, and a card with one working and one starting
session shows it working.
([#30624](https://github.com/mastra-ai/mastra/pull/30624))

- Fixed Factory starting a card's session in a repository the card
doesn't come from. When a card's repository wasn't linked to the
Factory, the draft started the session in the first linked repository
and wrote that repository onto the card. The draft now asks the server
which repository the card's session uses, and when there is none it
shows why, for example "Repository acme/docs is not linked to this
Factory.", starts nothing, and links to repository settings. When the
lookup itself fails, the draft offers Retry.
([#30609](https://github.com/mastra-ai/mastra/pull/30609))

A card from GitHub in a Factory whose repositories are all on GitLab, or
the reverse, is now refused the same way instead of starting in that
Factory's repository, even when a repository there has the same name.

- Improved sidebar performance in projects with many sessions. The
Factory now builds the session list once and reuses it for everyone
until a session, card or follow changes, so each sidebar request uses
about a third of the server CPU it did.
([#30616](https://github.com/mastra-ai/mastra/pull/30616))

- Fixed the session status in Factory's sidebar and board. A person's
own session now shows "Waiting on you" while its agent waits for their
answer, instead of "Working". A session now shows "Working" while it
runs on a thread opened after its first one, such as a new thread or a
Slack conversation. A session shows "Initializing" only while a run
waits on its first setup, so a session whose setup never finished, or
that never ran, no longer stays stuck on "Initializing".
([#30627](https://github.com/mastra-ai/mastra/pull/30627))

- Updated dependencies
[[`944bb3a`](944bb3ab0f),
[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`b1ba914`](b1ba914ea1),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/code-sdk@1.19.1-alpha.6
  - @mastra/core@1.84.0-alpha.5
  - @mastra/connect@1.4.1-alpha.2
## create-factory@0.5.0-alpha.5

### Minor Changes

- Added a `--tag <dist-tag>` option to `create-factory`. It pins the
scaffolded template's `mastra` and `@mastra/*` dependencies to the exact
versions published under that npm dist-tag, so you can try a new Factory
on prerelease packages:
([#30598](https://github.com/mastra-ai/mastra/pull/30598))

  ```sh
  npx create-factory@latest my-factory --tag alpha
  ```

When the pinned versions include prereleases and the project uses npm,
`create-factory` also writes `legacy-peer-deps=true` to the project's
`.npmrc`, because npm otherwise rejects the prerelease peer ranges.

### Patch Changes

- `create-factory --tag` now stops before installing when the npm
registry lookup for a Mastra package fails, instead of keeping that
package's template version and producing a project that mixes release
channels. A package that simply has no release under the tag still keeps
its template version with a warning.
([#30614](https://github.com/mastra-ai/mastra/pull/30614))

- Updated dependencies
[[`c638825`](c638825c83),
[`a6dbd29`](a6dbd29a4e),
[`3c7c003`](3c7c00383d),
[`b90d0ec`](b90d0ecd41),
[`e22c5a7`](e22c5a7035)]:
  - mastra@1.40.0-alpha.5
## @mastra/core@1.84.0-alpha.5

### Minor Changes

- Added `knowledge.movePage()` to move a page, with its child pages, to
a new parent or scope from your app. The page keeps its ID, notes, pins
and embeddings, and links by path follow it, so a sync that sees a page
move at its source no longer has to remove and re-create it.
([#30631](https://github.com/mastra-ai/mastra/pull/30631))

  ```ts
await knowledge.movePage({ scope: 'docs:acme', path: 'inbox/plan',
parent: 'projects/q4' });
  ```

Links by name now stay correct when a page moves or a new page takes a
name. A page moved to another scope, and every page under it,
re-resolves its `[[Name]]` links in the new scope. A link that pointed
at one page by name stops resolving once a second page answers to that
name. When more than 99 pages share that name, the write logs a warning
and `knowledge.reindexLinks()` repairs the rest.

- Added `knowledge.reembed()` to embed Knowledge pages and notes that
already exist, such as content written before `vector` and `embedder`
were configured or after switching embedders. It runs in batches with a
resumable cursor, doesn't change the pages, lists failures and pages
over the chunk cap, and stops early with a cursor when the embedder
keeps rate limiting.
([#30603](https://github.com/mastra-ai/mastra/pull/30603))

  ```ts
  let cursor: string | undefined;
  do {
const result = await knowledge.reembed({ scope: 'org:acme', cursor });
if (result.rateLimited) await new Promise(resolve => setTimeout(resolve,
60_000));
    cursor = result.nextCursor;
  } while (cursor);
  ```

### Patch Changes

- Fixed slow handling of Gateway base URLs and Supabase URLs that
contain very long runs of `/`. The resulting URLs are unchanged.
([#30577](https://github.com/mastra-ai/mastra/pull/30577))

- Fixed `run.restart()` running a step again when the workflow run
finished or suspended after `restart()` read it but before `restart()`
took it over from the process running it. Restarting a run that finished
now returns its stored result, and restarting a run that suspended fails
with the usual "This workflow run was not active" error.
([#30399](https://github.com/mastra-ai/mastra/pull/30399))

- Fixed workflow `.sleep()` and `.sleepUntil()` waits longer than about
24.8 days ending almost immediately. The next step now runs only after
the full wait, on the default and evented engines.
([#30395](https://github.com/mastra-ai/mastra/pull/30395))
## @mastra/auth-supabase@1.2.1-alpha.0

### Patch Changes

- Fixed slow handling of Gateway base URLs and Supabase URLs that
contain very long runs of `/`. The resulting URLs are unchanged.
([#30577](https://github.com/mastra-ai/mastra/pull/30577))
## @mastra/client-js@1.60.1-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/react@1.15.1-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/client-js@1.60.1-alpha.5
## @mastra/deployer-cloud@1.84.0-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/deployer@1.84.0-alpha.5
## @mastra/longmemeval@1.1.43-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/libsql@1.31.0-alpha.2
## @mastra/opencode@0.1.43-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/libsql@1.31.0-alpha.2
## @mastra/code-sdk@1.19.1-alpha.6

### Patch Changes

- Fixed custom OpenAI-compatible providers so they only ever
authenticate with the API key saved on the provider itself.
([#29879](https://github.com/mastra-ai/mastra/pull/29879))

- A custom provider is no longer given the saved credential of another
provider when their names match (for example a custom provider called
"OpenAI").
- A Mastra Gateway model (`mastra/...`) never runs on a custom provider
that shares its id, with or without a gateway key.
- Requests to a custom provider no longer follow redirects, so its API
key is never sent on to another address.
- A custom provider without an API key now works when sign-in is
enabled, instead of failing with a missing credential error.

If a custom provider in `settings.json` has no `apiKey` and relied on a
key you saved for the provider it is named after (for example with
`/api-keys`), set `apiKey` on the custom provider itself.

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34),
[`464810d`](464810dcf8)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/pg@1.37.0-alpha.3
  - @mastra/client-js@1.60.1-alpha.5
  - @mastra/libsql@1.31.0-alpha.2
## mastracode@0.50.1-alpha.6

### Patch Changes

- Added an ESM-only `mastracode/run-tui` export so a launcher can start
the Mastra Code TUI with extra session options, such as Knowledge and
its scopes: ([#30371](https://github.com/mastra-ai/mastra/pull/30371))

  ```ts
  import { runTui } from 'mastracode/run-tui';

await runTui({ createMastraCode: { knowledge: { key: 'team', instance:
knowledge }, scopes: ['org:acme'] } });
  ```

Options given here replace the values Mastra Code would pass for the
same keys, and apply to the interactive local TUI only. The `mastracode`
command behaves as before.

- Updated dependencies
[[`944bb3a`](944bb3ab0f),
[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34),
[`464810d`](464810dcf8)]:
  - @mastra/code-sdk@1.19.1-alpha.6
  - @mastra/core@1.84.0-alpha.5
  - @mastra/pg@1.37.0-alpha.3
  - @mastra/libsql@1.31.0-alpha.2
## @mastra/arize@1.3.31-alpha.1

### Patch Changes

- Raised the minimum versions of the OpenTelemetry SDK and OTLP exporter
dependencies (`@opentelemetry/sdk-trace-base` and `@opentelemetry/core`
`^2.12.1`, OTLP exporters `^0.223.1`) so they no longer resolve to
releases that pin `@opentelemetry/resources` 2.12.0, which is affected
by security advisory GHSA-qrww-3xmv-qhgm. If your project also depends
on OpenTelemetry packages directly, check that they resolve
`@opentelemetry/resources` 2.12.1 or later on the 2.x line, or 3.1.1 or
later on the 3.x line.
([#30580](https://github.com/mastra-ai/mastra/pull/30580))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`93b823a`](93b823a847),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/otel-exporter@1.5.3-alpha.1
## @mastra/arthur@0.4.31-alpha.1

### Patch Changes

- Raised the minimum versions of the OpenTelemetry SDK and OTLP exporter
dependencies (`@opentelemetry/sdk-trace-base` and `@opentelemetry/core`
`^2.12.1`, OTLP exporters `^0.223.1`) so they no longer resolve to
releases that pin `@opentelemetry/resources` 2.12.0, which is affected
by security advisory GHSA-qrww-3xmv-qhgm. If your project also depends
on OpenTelemetry packages directly, check that they resolve
`@opentelemetry/resources` 2.12.1 or later on the 2.x line, or 3.1.1 or
later on the 3.x line.
([#30580](https://github.com/mastra-ai/mastra/pull/30580))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`93b823a`](93b823a847),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/otel-exporter@1.5.3-alpha.1
## @mastra/laminar@1.3.33-alpha.1

### Patch Changes

- Raised the minimum versions of the OpenTelemetry SDK and OTLP exporter
dependencies (`@opentelemetry/sdk-trace-base` and `@opentelemetry/core`
`^2.12.1`, OTLP exporters `^0.223.1`) so they no longer resolve to
releases that pin `@opentelemetry/resources` 2.12.0, which is affected
by security advisory GHSA-qrww-3xmv-qhgm. If your project also depends
on OpenTelemetry packages directly, check that they resolve
`@opentelemetry/resources` 2.12.1 or later on the 2.x line, or 3.1.1 or
later on the 3.x line.
([#30580](https://github.com/mastra-ai/mastra/pull/30580))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/langfuse@1.6.7-alpha.1

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`93b823a`](93b823a847),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/otel-exporter@1.5.3-alpha.1
## @mastra/otel-bridge@1.5.23-alpha.1

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`93b823a`](93b823a847),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/otel-exporter@1.5.3-alpha.1
## @mastra/otel-exporter@1.5.3-alpha.1

### Patch Changes

- Raised the minimum versions of the OpenTelemetry SDK and OTLP exporter
dependencies (`@opentelemetry/sdk-trace-base` and `@opentelemetry/core`
`^2.12.1`, OTLP exporters `^0.223.1`) so they no longer resolve to
releases that pin `@opentelemetry/resources` 2.12.0, which is affected
by security advisory GHSA-qrww-3xmv-qhgm. If your project also depends
on OpenTelemetry packages directly, check that they resolve
`@opentelemetry/resources` 2.12.1 or later on the 2.x line, or 3.1.1 or
later on the 3.x line.
([#30580](https://github.com/mastra-ai/mastra/pull/30580))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/sentry@1.2.33-alpha.1

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`93b823a`](93b823a847),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/otel-exporter@1.5.3-alpha.1
## mastra@1.40.0-alpha.5

### Patch Changes

- The Factory **Settings › Tools** page shows how many tools sessions
get from each Mastra Connect connection. Expand one to see its tools
with their descriptions, which ones ask for approval, and which ones
Factory leaves out. With a `tools` option, a connection the code doesn't
use shows no tools, and the code's other tools are listed under **Other
tools from code**.
([#30610](https://github.com/mastra-ai/mastra/pull/30610))

- The Factory **Settings › Tools** page lists a project's Mastra Connect
connections when the Factory sets its session tools in code, with a note
that the `tools` option decides which of their tools sessions get. When
Connect isn't set up, it names the missing Platform credentials or
`MASTRA_PROJECT_ID` (#30579).
([#30607](https://github.com/mastra-ai/mastra/pull/30607))

- Added `mastra api factory work-item session-repository <project-id>
<work-item-id>`. It shows the repository a session on a Factory card
starts in, or why the card has none.
([#30609](https://github.com/mastra-ai/mastra/pull/30609))

- Fixed board cards showing a different session status than the sidebar.
A card with a suggested run and a running session now shows it waits on
you on the board too, and a card with one working and one starting
session shows it working.
([#30624](https://github.com/mastra-ai/mastra/pull/30624))

- Fixed the session status in Factory's sidebar and board. A person's
own session now shows "Waiting on you" while its agent waits for their
answer, instead of "Working". A session now shows "Working" while it
runs on a thread opened after its first one, such as a new thread or a
Slack conversation. A session shows "Initializing" only while a run
waits on its first setup, so a session whose setup never finished, or
that never ran, no longer stays stuck on "Initializing".
([#30627](https://github.com/mastra-ai/mastra/pull/30627))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/deployer@1.84.0-alpha.5
## @mastra/connect@1.4.1-alpha.2

### Patch Changes

- Fixed `posthog_run_query` failing provider-response validation
whenever PostHog returned column types, which it does for every query
with columns, even `select 1`. PostHog returns column types as
`[columnName, clickhouseType]` pairs, such as `[["count()", "UInt64"]]`,
and the tool now accepts them and returns them in that shape. The
inferred type of `types` in the tool's output changes from `string[]` to
`[string, string][]`, and a plain string entry, which PostHog never
sends, is now rejected. Fixes
[#30528](https://github.com/mastra-ai/mastra/issues/30528).
([#30541](https://github.com/mastra-ai/mastra/pull/30541))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/deployer@1.84.0-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/mcp-docs-server@1.3.14-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/playground-ui@69.1.0-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/client-js@1.60.1-alpha.5
  - @mastra/react@1.15.1-alpha.5
## @mastra/server@1.84.0-alpha.5

### Patch Changes

- Reduced memory and CPU use when clients stream agent controller
sessions. Each display-state update is now copied and serialized once
and shared by every client of the session, instead of once per client,
and the copy no longer duplicates message text or tool results. Display
state is now serialized the same way as other stream events, so the
bytes change for three kinds of value: an object with a `toJSON` method
is sent as that method's result, an error keeps its own enumerable
fields such as `statusCode`, and a value that cannot be cloned, such as
a function, is left out and no longer closes the stream.
([#30615](https://github.com/mastra-ai/mastra/pull/30615))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/elysia@0.1.24-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/express@1.5.28-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/fastify@1.5.28-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/hono@1.7.26-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/koa@1.7.28-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/nestjs@0.3.1-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
## @mastra/next@0.2.42-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
  - @mastra/hono@1.7.26-alpha.5
## @mastra/tanstack-start@0.2.42-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`0ed63d7`](0ed63d7308),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/server@1.84.0-alpha.5
  - @mastra/hono@1.7.26-alpha.5
## @mastra/pg@1.37.0-alpha.3

### Patch Changes

- Fixed `PgVector` calls failing with "Vector table ... does not exist"
after an index was deleted with `deleteIndex()` and created again while
that `PgVector` instance was still starting up. Also fixed
`createIndex()` on that instance keeping the previous metric when the
index was deleted and recreated, or rebuilt, during that time.
([#30578](https://github.com/mastra-ai/mastra/pull/30578))

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
## @mastra/temporal@0.6.1-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/deployer@1.84.0-alpha.5
## create-mastra@1.40.0-alpha.5


## @internal/playground@1.40.0-alpha.5

### Patch Changes

- Updated dependencies
[[`7518c05`](7518c05d6f),
[`b07dd23`](b07dd23713),
[`33fba78`](33fba78931),
[`e110fa6`](e110fa681a),
[`d0a2fa4`](d0a2fa4e34)]:
  - @mastra/core@1.84.0-alpha.5
  - @mastra/client-js@1.60.1-alpha.5
  - @mastra/react@1.15.1-alpha.5
  - @mastra/playground-ui@69.1.0-alpha.5

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-16 21:12:17 -08:00
224 changed files with 7316 additions and 2812 deletions

Some files were not shown because too many files have changed in this diff Show more