This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and publish to npm
yourself or [setup this action to publish
automatically](https://github.com/changesets/action#with-publishing). If
you're not ready to do a release yet, that's fine, whenever you add more
changesets to main, this PR will be updated.
⚠️⚠️⚠️⚠️⚠️⚠️
`main` is currently in **pre mode** so this branch has prereleases
rather than normal releases. If you want to exit prereleases, run
`changeset pre exit` on `main`.
⚠️⚠️⚠️⚠️⚠️⚠️
# Releases
> The changelog information of each package has been omitted from this
message, as the content exceeds the size limit.
## @mastra/factory@0.27.0-alpha.3
## @mastra/agent-builder@1.2.0-alpha.3
## @mastra/core@1.82.0-alpha.3
## @mastra/mcp@2.8.0-alpha.2
## @mastra/memory@1.41.0-alpha.3
## @mastra/playground-ui@68.0.0-alpha.3
## @mastra/ring-signals@0.1.0-alpha.0
## @mastra/libsql@1.29.0-alpha.2
## @mastra/mongodb@1.26.0-alpha.2
## @mastra/mysql@0.16.0-alpha.3
## @mastra/pg@1.35.0-alpha.3
## @mastra/discord@1.3.3-alpha.0
## @mastra/slack@1.8.1-alpha.0
## @mastra/teams@0.1.4-alpha.0
## @mastra/telegram@0.2.5-alpha.0
## @mastra/client-js@1.59.0-alpha.3
## @mastra/react@1.14.1-alpha.3
## @mastra/deployer-cloud@1.82.0-alpha.3
## @mastra/longmemeval@1.1.41-alpha.3
## @mastra/opencode@0.1.41-alpha.3
## create-factory@0.4.2-alpha.3
## @mastra/code-sdk@1.18.0-alpha.3
## mastracode@0.49.0-alpha.3
## @mastra/arize@1.3.29-alpha.2
## @mastra/arthur@0.4.29-alpha.2
## @mastra/laminar@1.3.31-alpha.2
## @mastra/langfuse@1.6.5-alpha.2
## @mastra/otel-bridge@1.5.21-alpha.2
## @mastra/otel-exporter@1.5.1-alpha.2
## @mastra/sentry@1.2.31-alpha.3
## mastra@1.38.0-alpha.3
## @mastra/connect@1.3.1-alpha.1
## @mastra/deployer@1.82.0-alpha.3
## @mastra/editor@0.17.0-alpha.3
## @mastra/evals@1.10.11-alpha.0
## @mastra/mcp-docs-server@1.3.12-alpha.4
## @mastra/server@1.82.0-alpha.3
## @mastra/elysia@0.1.22-alpha.3
## @mastra/express@1.5.26-alpha.3
## @mastra/fastify@1.5.26-alpha.3
## @mastra/hono@1.7.24-alpha.3
## @mastra/koa@1.7.26-alpha.3
## @mastra/nestjs@0.2.41-alpha.3
## @mastra/next@0.2.40-alpha.3
## @mastra/tanstack-start@0.2.40-alpha.3
## @mastra/turso@0.1.20-alpha.2
## @mastra/inngest@1.11.1-alpha.2
## @mastra/temporal@0.5.0-alpha.3
## create-mastra@1.38.0-alpha.3
## @internal/playground@1.38.0-alpha.3
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
## Description
Adds `@mastra/ring-signals` (`signals/ring`), a `SignalProvider` for
Ring doorbells and cameras, plus its integration guide and reference
page.
- `RingSignals` verifies Ring webhooks (`X-Signature`, HMAC-SHA256 over
the raw body) and sends each enabled event to agent threads as a
notification signal. Devices route to threads added with
`subscribeThread(target, deviceId)`, otherwise to the `target` option
(object or resolver), otherwise to `{ resourceId: <agent id>, threadId:
<deviceId> }`.
- `getRoutes()` returns the Ring routes (`POST /ring/token`, `GET
/ring/link`, `POST /ring/webhook`, `GET /ring/home`, `GET
/ring/media/:kind/:deviceId/:timestamp`), which Mastra adds to the
server automatically.
- Account linking stores each linked account in the channels storage
domain, with tokens encrypted (AES-256-GCM) when `encryptionKey` /
`MASTRA_ENCRYPTION_KEY` is set. Unlinking the app in Ring removes the
stored tokens.
- `ring_snapshot` and `ring_clip` tools fetch media with the linked
account, return signed, expiring media links, and attach files on
channel threads.
- Ported from the working prototype in PaulieScanlon/iot-home-security;
package layout follows `signals/github`. Adds a changeset (minor), a
CODEOWNERS entry, and the lockfile importer.
Tests (`signals/ring/src/ring-signals.test.ts`) run the provider inside
a real `Mastra` + `Agent` + `InMemoryStore`, call the routes through
Hono, and stub only `fetch` for the Ring API and the agent's
`sendNotificationSignal`.
## Related issue(s)
DEVED-559
## 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
## Checklist
- [x] 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
Link to Devin session:
https://app.devin.ai/sessions/2cbcddf6003e48f1b776d172de84527c
Open in Devin Desktop:
https://app.devin.ai/desktop/session/2cbcddf6003e48f1b776d172de84527c?variant=devin
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
<!-- coderabbit-ai-generated:v1 -->
## ELI5
This PR adds a Ring integration for Mastra agents. Ring doorbell and
camera events can reach agent threads, and agents can request snapshots
or video clips for those events.
## What changed
- Added the `@mastra/ring-signals` package with a `RingSignals`
provider, Ring API client, configuration types, and public exports.
- Added webhook signature verification and event routing. Events go to
device subscribers first, then to the configured target, or to a default
agent thread.
- Added account-linking, token, webhook, home, and signed media routes.
Mastra registers the provider’s routes automatically.
- Stored linked Ring accounts in the channels storage domain. Tokens are
encrypted when `encryptionKey` or `MASTRA_ENCRYPTION_KEY` is configured.
Ring unlink events remove stored account tokens.
- Added `ring_snapshot` and `ring_clip` tools. They fetch media from
Ring and can attach files to channel threads. Signed media links are
available when `baseUrl` is configured.
- Added integration and API reference documentation, sidebar entries, a
changeset, and a CODEOWNERS rule.
## Tests
The PR adds tests for provider routes, webhook handling, account
linking, token storage, media links, and tool configuration. Test
execution results were not provided.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
An expired GitHub token exported in the environment made PR syncing fail with a 401, even when `gh` could still resolve a working credential. gitcrawl takes the first non-empty value of `GITHUB_TOKEN` and only finds out it is invalid when GitHub rejects it, so the stale value was sent on every call. That is easy to hit in a long-lived session, where a wrapper exports an installation token that expires after an hour and never refreshes.
Each sync now resolves a fresh credential from the `gh` CLI and passes it to gitcrawl, so the exported value is never consulted. `gh auth token` is asked with `GH_TOKEN` and `GITHUB_TOKEN` removed from the child environment — in every casing, since Windows treats environment names case-insensitively — because `gh` returns those variables verbatim and would otherwise hand back the same credential being replaced.
The author permission and GitHub app owner lookups use the same credential. Both spawn `gh` without options and inherited the same stale token: the app owner lookup swallowed the resulting 401 into `undefined`, which made authorization read as "not authorized" and silently disabled permission gating instead of reporting an error.
Verified against the real `gh` and `gitcrawl` binaries with a stale token exported, alongside focused unit tests, the package test suite, typecheck, lint, and format checks.
GitHub Signals can now accept comments from unlisted GitHub App bots
when the app is owned by the repository organization or by a user with
an authorized repository permission. Explicit ignore entries still win,
and failed or unsupported owner lookups remain denied.
This keeps `authorizedBots` as the explicit allowlist, reuses
`authorizedPermissions` for user app owners, and caches successful owner
lookups for 24 hours. It includes focused tests, documentation, and a
minor changeset.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
GitHub Signals can now recognize comments from certain GitHub App bots
without listing every bot manually. It trusts apps owned by the
repository organization or by users with sufficient repository access,
while keeping explicit blocks effective.
## Changes
- Added `GithubAppOwnerResolver` to resolve GitHub App owners with `gh
api apps/{slug}`.
- Cached successful owner lookups for 24 hours.
- Authorized organization-owned apps when the owner matches the
repository organization.
- Authorized user-owned apps through `authorizedPermissions`.
- Preserved `authorizedBots` as the explicit allowlist.
- Applied explicit ignore entries before all other checks.
- Denied unresolved, unsupported, malformed, or failed owner lookups.
- Prevented stale polling generations from authorizing comments or
writing cache entries.
- Used `raw_json.submitted_at` for GitHub review timestamps when needed.
- Added focused tests for owner resolution, caching, authorization,
denial, cancellation, and review snapshots.
- Updated GitHub Signals documentation and added a changeset.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: remy-builder[bot] <4813995+remy-builder[bot]@users.noreply.github.com>
The `notification_inbox` tool had no way for notifications to leave
`pending` unless the agent called `markSeen`/`dismiss` one id at a time.
Notifications that were only surfaced through a summary digest stayed
pending forever, so every `list` returned the whole backlog. In one live
session that was 96 GitHub records (~360KB of JSON) in a single tool
result, which pushed the thread straight past the observational-memory
threshold and forced a synchronous observation every turn.
Now viewing a notification counts as reading it. `list`, `read`, and
`search` mark the returned unread records seen, `list` defaults to
unread records and a page of 20, and the response reports `hasMore` and
`markedSeen`. Internal `metadata` / `payload` bookkeeping is dropped
from the agent-facing records.
Before, every call returned everything, forever:
```ts
await tool.execute({ action: 'list' });
// { notifications: [ /* all 96, full metadata, still pending */ ] }
await tool.execute({ action: 'list' });
// same 96 again
```
After, repeated lists drain the backlog:
```ts
await tool.execute({ action: 'list' });
// { notifications: [ /* 20, status: 'seen', no metadata/payload */ ], hasMore: true, markedSeen: 20 }
await tool.execute({ action: 'list' });
// { notifications: [ /* next 20 */ ], hasMore: true, markedSeen: 20 }
```
On the GitHub side, PR notification records were mirroring every
agent-facing field (title, state, comment excerpt, full check objects)
into `metadata.github` on top of `attributes`, roughly doubling each
record. `metadata.github` now only keeps the sync bookkeeping the change
detector needs. Check names live in `attributes` as flat strings since
signal attributes are rendered with `String(value)`, and failing checks
get a `failingCheckUrls` attribute so the agent can link to the run.
`GithubSignalAgent.sendNotificationSignal` is now typed with
`SendNotificationSignalInput` instead of `unknown` so a non-scalar
attribute fails typecheck.
```ts
attributes: {
ciState: 'failure',
failingChecks: 'Quality assurance',
failingCheckUrls: 'Quality assurance: https://github.com/mastra-ai/mastra/actions/runs/1',
}
```
Tests cover the drain (25 pending → 20 + 5 disjoint pages → empty), the
`markedSeen` count when a status write fails, the stripped projection,
and that every GitHub notification attribute is a scalar. Verified with
`packages/core` notifications + agent-signals suites, `signals/github`,
and `mastracode/sdk` extra-tools, plus typecheck and lint on the touched
packages.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
When an agent views notifications, the tool marks them as seen. It shows
unread notifications first, supports paging, and hides internal data
from agent responses.
## Changes
- Updated `notification_inbox`:
- Defaults `list` to unread notifications.
- Returns pages of 20 notifications.
- Reports `hasMore` and `markedSeen`.
- Marks returned unread notifications as seen for `list`, `read`, and
`search`.
- Requires a search query for `search`.
- Requires a non-empty `id` for `markSeen`, `dismiss`, and `archive`.
- Omits internal `metadata` and `payload` fields.
- Reports only successfully updated notifications as seen.
- Updated GitHub notifications:
- Stores agent-facing fields as scalar attributes.
- Removes duplicated fields from `metadata.github`.
- Adds `failingCheckUrls` for failed checks.
- Preserves review-mode change-detection fields.
- Uses the typed `SendNotificationSignalInput`.
- Added patch changesets for `@mastra/core` and
`@mastra/github-signals`.
- Expanded tests for pagination, backlog draining, status-write
failures, response projections, whitespace-only IDs, schema validation,
and GitHub attributes.
- Updated related SDK expectations and package test, typecheck, and lint
coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
PR #23214 introduced a patch-level breaking change by suppressing
reactive and system-reminder events from live streams without an opt-in.
This restores the previous default and adds caller-local `hideSignals`
for streams, thread subscriptions, and memory recall. Model context,
storage, transforms, and other subscribers remain unchanged; recall
keeps its existing defaults. Shared execution options accept
`hideSignals` on `generate()` and `resumeGenerate()` without filtering
their results.
```ts
const output = await agent.stream('Review the changes', {
hideSignals: ['reactive', 'system-reminder'],
});
```
Separately, fixes AGENTS.md discovery when completed tool results move
between message sets. Instruction lookup scans newest-first,
deduplicates covered paths, and preserves trusted-ref isolation across
filesystem aliases. Observational memory behavior is unchanged.
Verified with focused core, memory, SDK, and consumer suites; terminal
E2E checks for instruction loading and notifications; and clean-HEAD
CLI/built-package proofs for injection, live visibility, independent
filtering/replay, and recall. The latest cleanup additionally passes 214
focused runtime tests, type/parity checks, and the docs production
build, including regular/durable generate and resume no-op coverage.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
Live streams now show important updates by default. Callers can hide all
or selected signal types without changing saved data, model context, or
generated results. The PR also improves `AGENTS.md` discovery when tool
results move or use filesystem aliases.
## Changes
- Restored `reactive` and `system-reminder` signals in live, replayed,
durable, and thread streams.
- Added caller-local `hideSignals` filtering for streams, thread
subscriptions, and `Memory.recall()`.
- Supported boolean and selected signal-type filters with legacy
signal-name normalization.
- Preserved unfiltered signals for model context, storage, transforms,
shared fanout, and aggregate results.
- Added `hideSignals` support to `generate()` and `resumeGenerate()`
without filtering their results.
- Preserved deprecated `includeSystemReminders` behavior and precedence
rules.
- Improved instruction discovery with newest-first scanning, moved
tool-result handling, path deduplication, filesystem identity
resolution, and trusted Git-reference paths.
- Added documentation and runtime, memory, SDK, type, CLI, terminal E2E,
built-package, and documentation coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: mastra-platform[bot] <284800079+mastra-platform[bot]@users.noreply.github.com>
## Summary
- update stale processor and GitHub Signal tests to stop expecting
reactive system reminders in live chunk streams
- update the CLI dev fixture for the current `statSync`-based entry-file
lookup
- align the Mastra Code goal-handoff E2E assertion with the rendered
plan UI
These test corrections unblock verification of #23189 without changing
its provider-metadata implementation.
## Test plan
- focused Core processor and workflow tests (172 passed)
- CLI unit suite (1,107 passed)
- GitHub Signals suite (104 passed)
- AI SDK helper tests (19 passed)
- Core MessageList v6 tests (25 passed)
- focused `plan-approval-goal-handoff` Mastra Code E2E (passed)
- Core, CLI, and Mastra Code typechecks
- Prettier, Oxlint, and `git diff --check`
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR keeps tool information intact when messages travel between
Mastra and the AI SDK. It also updates tests and fixtures to match
current stream and UI behavior.
## Changes
- Preserve tool-result `providerMetadata`, including
`mastra.modelOutput`, across AI SDK v5 and v6 conversions.
- Merge tool-call and tool-result metadata, with result metadata taking
precedence.
- Detect v6 messages that contain `resultProviderMetadata`.
- Add regression tests for metadata preservation, merging, and omission
when absent.
- Add patch changesets for `@mastra/core` and `@mastra/ai-sdk`.
- Update processor and GitHub Signal tests to expect no reactive
`data-signal` stream chunks.
- Update the CLI development fixture for `statSync` file detection.
- Align the Mastra Code goal-handoff test with the current rendered plan
flow.
- Update the goal-step test to verify persisted feedback without live
signal output.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Lucas Pradel <169302645+pradelgorithm@users.noreply.github.com>
Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
This adds multi-PR GitHub signal subscriptions so a thread can follow
several PRs at once from the TUI or through the GitHub signal tools.
The GitHub command now opens a small menu with subscribe, unsubscribe,
list, token, poll interval, sync, and debug actions. Subscribe uses a
picker with “my PRs” and repo search, supports space-to-select multiple
PRs, and shows a loading state while `gh pr list` runs. Existing inline
commands still work, including review/working mode:
```txt
/github subscribe mastra-ai/mastra#123 --mode review
/github unsubscribe mastra-ai/mastra#123
/github sync
/github debug
```
The agent tools now use a clearer batch shape instead of mixing legacy
top-level PR fields:
```json
{
"prs": [
{ "owner": "mastra-ai", "repo": "mastra", "number": 123 },
{ "owner": "mastra-ai", "repo": "mastra", "number": 456 }
],
"mode": "working"
}
```
Unsubscribe supports the same `prs` array or `all: true`. Stored
subscription data remains backward compatible, including older
subscriptions without a mode or dedupe key.
This also adds poll interval settings, shows `2 PRs` in the status line
when multiple PRs are followed, filters low-value bot comments like
CodeRabbit “review skipped”/change-stack noise, and avoids re-sending
the same latest comment notification when only PR bookkeeping changes.
Verified with focused provider, SDK, TUI, and GitHub e2e coverage after
rebasing onto latest main.
<img width="1952" height="826" alt="image (52)"
src="https://github.com/user-attachments/assets/9c0977a0-c9ab-490f-bdd5-3a02fe7a3c9b"
/>
<img width="1498" height="866" alt="image (53)"
src="https://github.com/user-attachments/assets/4abea093-43be-4fa8-8bd0-4abab7b66a00"
/>
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## ELI5
This PR lets users track several GitHub pull requests at once. It adds
menus and search tools to manage subscriptions, reduces duplicate or
unhelpful notifications, and keeps existing subscriptions working.
## Changes
- Added multi-PR subscribe and unsubscribe support through GitHub tools
and TUI commands.
- Added GitHub Signals actions for subscribe, unsubscribe, list,
unsubscribe all, token help, poll interval, sync, and debug.
- Added a searchable PR picker with “My open PRs” and repository search
views.
- Added configurable polling intervals with validation and persistence.
- Added batch tool inputs through a `prs` array with per-PR results and
subscription summaries.
- Preserved legacy ownerless subscription IDs, inline commands, and
review/working modes.
- Rejected ambiguous ownerless legacy PR IDs when multiple
repository-qualified candidates exist.
- Filtered repetitive low-value bot comments.
- Prevented duplicate notifications for unchanged latest comments.
- Invalidated active polling before subscription updates and restarted
polling when subscriptions remained.
- Updated the status line to show one PR number or a count of active
subscriptions.
- Added provider, SDK, TUI, settings, and end-to-end coverage.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>