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

65 commits

Author SHA1 Message Date
dane-ai-mastra[bot]
34dbbd363e
chore: version packages (alpha) (#30241)
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.0

### Minor Changes

- Intake rules can now set a description on the cards they create, so
cards from integrations show the item's details instead of an empty
description. ([#30253](https://github.com/mastra-ai/mastra/pull/30253))

  ```ts
  return {
    type: 'upsertLinkedWorkItem',
    board: context.intake.board,
    source: 'github-dependabot-alert',
    sourceKey: alert.id,
    title: alert.title,
    description: alert.description,
    url: alert.url,
    stage: context.intake.initialPhase,
    // ...
  };
  ```

- Added Vanta vulnerabilities as a Factory intake source through
MastraConnect. Once you connect Vanta and enable it in intake settings,
each active vulnerability becomes a card labeled `security` with its
severity, package, and remediation date in the description.
([#30255](https://github.com/mastra-ai/mastra/pull/30255))

- Intake integrations are now off until you turn them on. A newly
connected integration no longer starts pulling items onto your boards
until you enable it in the intake settings.
([#30251](https://github.com/mastra-ai/mastra/pull/30251))

- Added two reads that serve a Factory board without sending every card.
`GET /web/factory/projects/:id/boards/:boardKey/phases` returns, for
each phase of the board, how many cards it holds and the first of them
in the order asked, after the search and filters given. `GET
/web/factory/projects/:id/work-items/filter-options` returns the labels
and people the board can be filtered by. `item=<card id>` also answers
for one card and its place in each phase, however deep it lies, without
listing the phase down to it. Each card is named with a `version` of its
body, which `?workItemId=` also sends, so a reader keeps the bodies it
holds and reads only the ones that changed.
([#30177](https://github.com/mastra-ai/mastra/pull/30177))

  ```ts
const res = await
fetch(`/web/factory/projects/${projectId}/boards/work/phases?label=bug&limit=10&cards=true`);
const { phases, matchingTotal, boardTotal, workItems } = await
res.json();
// phases: [{ phase: "intake", total: 42, cards: [{ id, version }, …] },
…]
  ```

- Added Dependabot alerts as a Factory intake source. Turn on **Sync
alerts** under GitHub in intake settings and pick repositories, or `PUT
/web/intake/config` with `{ "dependabot": { "enabled": true,
"sourceIds": ["owner/repo"] } }`. Open alerts in those repositories
become cards labeled `security` with the advisory details as the
description, and they close automatically when the alert is fixed or
dismissed. ([#30254](https://github.com/mastra-ai/mastra/pull/30254))

- Changing an intake route now warns you when cards already on your
boards match a different board, and offers to move those untouched cards
to the start of their new board.
([#30252](https://github.com/mastra-ai/mastra/pull/30252))

### Patch Changes

- Fixed who owns the sessions a Factory card runs in, and who can
approve what they wait on.
([#30146](https://github.com/mastra-ai/mastra/pull/30146))

  **Who owns a card's phase session**

- In a Factory that runs card work on the organization's model keys (the
`factory` and `hybrid` credential settings), every new phase session now
belongs to the Factory itself and uses the organization's keys and the
Factory's default model. That holds whoever moved the card: a person, an
agent, a webhook or a rule. Before, it ran as whoever connected the
repository, or as the person who approved the move.
- The person who moved or approved the card stays on record as the one
who did it. When they move a card from their own session, that session
follows the card, so it hears when the phase waits on someone and can
answer from there.
- If the organization has neither a model key nor a provider of its own,
the run stops with a clear "add an organization key or provider" message
and is not tried again on its own. Add one, then press Retry on the
card.
- In a Factory on personal credentials there are no organization keys,
so a phase runs as the person who moved or approved the card (or whose
session's agent moved it), and otherwise as the person who created the
Factory.

  Sessions that already exist keep their owner.

  **Approving a waiting tool call**

- The person who asked for the work, and anyone whose session follows
the card, can approve or decline any tool call the phase session is
waiting on, a plan or any other tool that asks first. They can do it
from their own session in the sidebar, with `factory_answer_approval`,
or over HTTP:

    ```http
    POST /web/user-sessions/:sessionId/parked-approval
    { "decision": "approve" }
    ```

Add `toolCallId` when the session waits on more than one approval.
Questions that need a typed answer are still answered in the session.

- A session following the card is told when the phase session waits on a
yes or no, for a plan or any other tool, with the call to answer it. In
the chat that notice now has Approve and Decline buttons and a link to
open the waiting session; a notice about a question that needs a typed
answer has the link only.
- Nobody is asked to approve what a phase approves itself: when a
phase's `exitTool` has `autoApprove` and the card matches
`autoApproveWhen`, the run carries on without a notice. This now works
for any exit tool that pauses for a yes or no, not only `submit_plan`.
- When two people answer the same call at once, one answer is used and
the other is told the call was already answered.
- The run then carries on as the phase session's owner. Before, it
carried on as whoever answered, and could fail with "the request has no
authenticated user".
- Following moves with a session: after a hand-over, the session's new
owner can answer and the old one cannot.

  **Sidebar**

A card's phase sessions now show under the session that asked for the
work when child sessions are revealed, marked "run by Factory" when the
Factory owns them, and that session shows "waiting on you", with Approve
and Decline in its menu, while one of them waits on the viewer.

- Mastra Code's Knowledge scopes now use canonical addresses, matching
`@mastra/core`'s one-segment scope values. Factory sessions hold their
org and project ids encoded (`org:acme%3Aeu` for org `acme:eu`), and the
`/knowledge` inspector and Factory Knowledge routes read the same
addresses the code agent writes, instead of encoding host scopes a
second time. ([#30019](https://github.com/mastra-ai/mastra/pull/30019))

- Sandboxes in a Factory with more than ten repositories can now reach
all of them with `git` and `gh`. The Factory mints each sandbox token
for at most ten repositories, so the sandbox now gets one token per
group of ten (`GH_TOKEN`, `GH_TOKEN_2`, …). Each checkout's git
credential helper uses the token that covers it, `github_refresh_token`
refreshes every group, and the environment note tells the agent which
variable to use for `gh` in each repository, for example
`GH_TOKEN=$GH_TOKEN_2 gh pr list -R owner/repo`. Before, a Factory over
ten repositories fell back to a token for the session repository only.
([#30121](https://github.com/mastra-ai/mastra/pull/30121))

- Fixed GitHub pull request cards losing their labels, so intake routes
that match on labels (for example `security`) now route pull requests
too. ([#30250](https://github.com/mastra-ai/mastra/pull/30250))

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`175b4b5`](175b4b5194),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/code-sdk@1.19.1-alpha.0
## @mastra/core@1.84.0-alpha.0

### Minor Changes

- **Breaking (Knowledge alpha):** a `$param` in a Knowledge scope
pattern now matches exactly one segment, so scope values can no longer
contain a raw `:`. Before, the last param took the rest of the address,
so `org:acme:viewer` counted as an `org:$orgId` scope and its holder got
that pattern's `self` rights there.
([#30019](https://github.com/mastra-ai/mastra/pull/30019))

- Agent `scopes` are canonical addresses. An id containing `:`, `/`, `#`
or `%` must be encoded with the new `encodeKnowledgeScopeId`. The raw
form (e.g. `org🅰️b` against `org:$orgId`) fails with "does not match a
declared scope type", and `%` is always read as an escape, so each scope
has one spelling.
- Memory ids are bound encoded: resource `slack:U123` becomes
`resource:slack%3AU123`.
- Patterns of one type with different segment counts no longer overlap,
so `org:$orgId` and `org:$orgId:viewer` can be declared side by side.
- `decodeKnowledgeScopeId` reads an id back from one segment of an
address.

  ```ts
  import { encodeKnowledgeScopeId } from '@mastra/core/knowledge';

const scope = `org:${encodeKnowledgeScopeId('auth0|a:b')}`; //
'org:auth0|a%3Ab', pass this in Agent scopes
  ```

  No data is rewritten:

- **Ids with a colon in the last segment get new addresses.** Before,
the last segment kept a raw `:` (`resource:slack:U123`); now it is
encoded (`resource:slack%3AU123`), so a run reaches a new, empty scope,
and pages, pins and notes stored under the old address stay there
unreached. Nothing moves them.
- **Every other id keeps its address if you pass it through
`encodeKnowledgeScopeId`.** `/`, `#` and `%` were already encoded the
same way, so `org:${encodeKnowledgeScopeId('a/b')}` reaches rows stored
from the raw `org:a/b`. Passing the old raw string unchanged does not:
`org:a/b` is refused, and a raw scope that happened to contain an escape
(`org:a%3Ab`, once stored as `org:a%253Ab`) now means the id `a:b`.
- **Stale rows get nothing from their new match.** A stored scope row
whose address now matches a different declaration than the one it was
created under (e.g. `org:acme:viewer` created under `org:$orgId`, once
`org:$orgId:viewer` is declared) gets none of the new declaration's
access. It is never a `belongsTo` parent, and using it as a scope of the
new declaration fails with an error. Prefix grants of the declaration it
was created under still let their holders read it, as before, without a
role on it.

### Patch Changes

- Fixed web search on models served through the Mastra gateway. An agent
using `webSearchTool` with a model such as `mastra/openai/gpt-6.1-sol`
failed every turn with `unknown tool type "openai:web_search"`, and on
Anthropic and Google models the tool was dropped without an error. These
models now use the gateway's web search.
([#30239](https://github.com/mastra-ai/mastra/pull/30239))

Other provider-native tools on gateway models now fail with a clear
error. Previously the gateway rejected them with a 400 or ignored them,
leaving the model without the tool.

- Fixed a run waiting on a tool approval losing its saved state when the
thread lease expired. This happened when the lease backend (such as
Redis) was down for too long. Before, the run's snapshot was deleted, so
the approval could not be resumed. Now the run resumes normally once the
backend is back. If another run took the thread first, a resume in the
same process is refused and the run keeps waiting.
([#27734](https://github.com/mastra-ai/mastra/pull/27734))
## @mastra/client-js@1.60.1-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## @mastra/react@1.15.1-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/client-js@1.60.1-alpha.0
## @mastra/deployer-cloud@1.84.0-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/deployer-cloudflare@1.2.43-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/deployer-netlify@1.2.43-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/deployer-sandbox@0.3.28-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/deployer-vercel@1.2.43-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/longmemeval@1.1.43-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## @mastra/opencode@0.1.43-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## create-factory@0.4.4-alpha.0

### Patch Changes

- `create-factory` no longer asks where your Factory project should run.
New projects are created in the US region by default. To create the
project in the EU instead, pass `--region eu`:
([#30249](https://github.com/mastra-ai/mastra/pull/30249))

  ```bash
  npx create-factory@latest my-mastra-factory --region eu
  ```

- Updated dependencies
[[`4a3920c`](4a3920c7bf),
[`f75eb1a`](f75eb1a197),
[`338ec03`](338ec03925),
[`28e243f`](28e243f638)]:
  - mastra@1.39.1-alpha.0
## @mastra/code-sdk@1.19.1-alpha.0

### Patch Changes

- Mastra Code's Knowledge scopes now use canonical addresses, matching
`@mastra/core`'s one-segment scope values. Factory sessions hold their
org and project ids encoded (`org:acme%3Aeu` for org `acme:eu`), and the
`/knowledge` inspector and Factory Knowledge routes read the same
addresses the code agent writes, instead of encoding host scopes a
second time. ([#30019](https://github.com/mastra-ai/mastra/pull/30019))

- Updated dependencies
[[`be818ec`](be818ecb53),
[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/github-signals@0.5.3-alpha.0
  - @mastra/core@1.84.0-alpha.0
  - @mastra/client-js@1.60.1-alpha.0
## mastracode@0.50.1-alpha.0

### Patch Changes

- Updated dependencies
[[`be818ec`](be818ecb53),
[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`175b4b5`](175b4b5194),
[`9abbec6`](9abbec671c)]:
  - @mastra/github-signals@0.5.3-alpha.0
  - @mastra/core@1.84.0-alpha.0
  - @mastra/code-sdk@1.19.1-alpha.0
## mastra@1.39.1-alpha.0

### Patch Changes

- Added `factory intake-route reroute-preview` and `factory intake-route
reroute` to `mastra api`, for listing and moving untouched cards whose
intake route now points at a different board.
([#30252](https://github.com/mastra-ai/mastra/pull/30252))

  ```sh
  mastra api factory intake-route reroute-preview <factoryProjectId>
  mastra api factory intake-route reroute <factoryProjectId>
  ```

- Improved the Factory board on large projects. The board now loads the
first cards of each phase, then more as you scroll. It no longer
downloads every card of the project.
([#30191](https://github.com/mastra-ai/mastra/pull/30191))

Search, filters and sorting now run on the server. Search matches cards
that contain every word typed, in any order. It also finds a card by its
number or source id.

- Fixed the checkmark on a finished Factory onboarding step sitting 12px
right of the step numbers below it.
([#30248](https://github.com/mastra-ai/mastra/pull/30248))

- Added `mastra api factory board phases` and `mastra api factory
work-item filter-options`, which read the first cards under each phase
of a Factory board and the labels and people it can be filtered by.
([#30177](https://github.com/mastra-ai/mastra/pull/30177))

  ```bash
mastra api factory board phases <project-id> work
'{"label":["bug"],"limit":10}'
  mastra api factory work-item filter-options <project-id>
  ```

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## @mastra/deployer@1.84.0-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/mcp-docs-server@1.3.14-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## @mastra/playground-ui@69.0.1-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/client-js@1.60.1-alpha.0
  - @mastra/react@1.15.1-alpha.0
## @mastra/server@1.84.0-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## @mastra/elysia@0.1.24-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/express@1.5.28-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/fastify@1.5.28-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/hono@1.7.26-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/koa@1.7.28-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/nestjs@0.3.1-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/next@0.2.42-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/hono@1.7.26-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/tanstack-start@0.2.42-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/hono@1.7.26-alpha.0
  - @mastra/server@1.84.0-alpha.0
## @mastra/github-signals@0.5.3-alpha.0

### Patch Changes

- Fixed delivery of authorized review comments and inline findings even
when bot summaries change or check status is unknown. Limit comment
bursts to ten findings and a counted overflow notice per poll.
([#30246](https://github.com/mastra-ai/mastra/pull/30246))

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
## @mastra/temporal@0.6.1-alpha.0

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/deployer@1.84.0-alpha.0
## create-mastra@1.39.1-alpha.0


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

### Patch Changes

- Updated dependencies
[[`175b4b5`](175b4b5194),
[`5266060`](5266060ccd),
[`9abbec6`](9abbec671c)]:
  - @mastra/core@1.84.0-alpha.0
  - @mastra/client-js@1.60.1-alpha.0
  - @mastra/react@1.15.1-alpha.0
  - @mastra/playground-ui@69.0.1-alpha.0

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-11-12 16:45:14 -08:00
Tyler Barnes
be818ecb53
fix(github-signals): deliver each review finding instead of only the latest comment (#30246)
## Summary

GitHub Signals could miss review findings while polling a pull request:

- It only read the newest comment, so a later bot summary or walkthrough
edit could hide earlier findings.
- Inline review comments were reduced to a count of unresolved threads,
so the agent never saw the finding itself.
- Comments from allowed bots, such as CodeRabbit, were dropped when CI
status was missing or unknown.

Now each new comment from an allowed author is delivered on its own,
with its author, `file:line` for inline comments, and a short excerpt.
Bot summaries and other comment noise are still filtered out.

## How it works

- Polling reads issue comments, submitted reviews and inline
review-thread comments from the existing local Gitcrawl SQLite snapshot.
This adds no GitHub API calls; author permission checks still use the
existing five-minute cache.
- A separate comment cursor stores the newest timestamp and the IDs of
comments at that timestamp. Comments with equal timestamps or later
edits do not replay or hide each other, and the cursor is kept across
restarts and re-subscribes.
- Each poll delivers at most ten individual comments for a pull request,
plus one notice with the number of hidden comments and a link.
- Comment bodies are sanitized and checked for noise before excerpts are
cut. In GraphQL inline comments, bot logins have no `[bot]` suffix, so
it is added before authorization. Only authors with type `Bot` are
changed.
- The first poll of a working subscription keeps the existing summary
notification.

## Tests

- New SQLite-backed public-poll tests run in working and review modes.
They cover summary edits hiding findings, inline findings, unknown CI
status, bursts and overflow, restarts, equal timestamps, authorization,
noise filtering, long hidden blocks, the first poll and re-subscribing.
These tests failed before the fix.
- `pnpm --filter @mastra/github-signals test`: 160 passed
- TypeScript, lint and build pass.


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

ELI5: GitHub Signals watches pull requests and sends alerts. This change
makes it send each new comment from an allowed author as its own alert,
so reviewers do not miss findings.

## Summary

This pull request changes how `@mastra/github-signals` delivers new pull
request comments during polling. Before this change, polling read only
the newest comment, and inline review comments were reduced to a count.
Polling now delivers each new authorized comment separately. Each
notification includes the author, an inline `file:line` location when
one exists, and a short excerpt.

### Behavior changes

- **Comment sources:** Polling reads issue comments and inline
review-thread comments from the local Gitcrawl SQLite snapshot. The
snapshot query combines issue comments with review-thread replies. It
returns comments oldest-first from the cutoff, up to 25 per query.
Without a cutoff, it returns the newest 20.
- **Comment cursor:** Each `GithubPRSubscription` stores
`lastObservedCommentsAt` and `lastObservedCommentKeys`. The cursor holds
the newest comment timestamp and the keys of comments at that timestamp.
Comments that share the timestamp are matched by key, so a restart does
not replay them. Later edits are handled through the same cursor.
- **Sync input:** `GithubSignalsSyncInput` accepts `commentsSince` and
`commentsSeenAtSince`. The snapshot query treats `commentsSince` as an
inclusive cutoff.
- **Delivery limit:** Each poll delivers up to 10 comments per pull
request. Additional authorized comments produce one collapsed notice
with a count and a link.
- **Authorization retry:** If the authorization lookup fails, the
comment cursor does not advance. The comments are retried on the next
poll. The same retry applies when the GitHub App owner lookup fails. A
lookup that returns HTTP 404 or `Not Found` does not trigger a retry.
Such lookups resolve to `undefined`.
- **Bot handling:** The bot-only activity guard is removed. Bot-only
activity no longer suppresses delivery by itself. Bot comments that
match the noise filters remain excluded.
- **Bot logins:** GraphQL inline-comment logins for authors of type
`Bot` receive a `[bot]` suffix before authorization.
- **Body size:** The snapshot query truncates comment bodies to 200,000
characters. Excerpts are cut after sanitization and filtering.
- **Snapshot fields:** `GithubPullRequestCommentSnapshot` adds
`createdAt`, `path`, `line`, and `threadId`. Inline locations and thread
IDs are passed to notifications as `reviewThreadId`.
- **First poll:** The first poll of a working subscription keeps the
existing summary notification.
- **Subscription persistence:** The comment cursor is kept when a
subscription is re-created.

### Files changed

- `.changeset/empty-years-fold.md`: Adds a patch changeset for
`@mastra/github-signals`.
- `signals/github/src/index.ts`: Adds the comment cursor, comment
selection, delivery cap, collapsed notice, retry logic, and snapshot
query changes. Changes +278/-43 lines.
- `signals/github/src/github-comment-delivery.test.ts`: Adds
parameterized tests for `working` and `review` modes. Adds 400 lines.
- `signals/github/src/github-gitcrawl-snapshot.test.ts`: Changes one
mock match from the table name to the `unresolved_count` alias.
- `signals/github/src/github-app-owner.ts`: Adds an optional
`onLookupFailure` callback to `GithubAppOwnerResolver.getOwner`. Adds an
`isNotFoundError` helper.
- `signals/github/src/github-app-owner.test.ts`: Adds tests for a
connection-reset error and for a 404 error.
- `signals/github/src/github-bot-authorization.test.ts`: Checks the
first two arguments of `getOwner` instead of requiring an exact argument
count.

### Public declaration changes

- `GithubPRSubscription`: adds optional `lastObservedCommentsAt` and
`lastObservedCommentKeys`.
- `GithubSignalsSyncInput`: adds optional `commentsSince` and
`commentsSeenAtSince`.
- `GithubPullRequestCommentSnapshot`: adds optional `createdAt`, `path`,
`line`, and `threadId`.
- `GithubAppOwnerResolver.getOwner`: adds optional parameter
`onLookupFailure?: () => void`.

### Verification

Not available for this review. No completed test run appears in the
supplied evidence. The PR objectives state that `pnpm --filter
@mastra/github-signals test` passed with 160 tests, and that TypeScript,
lint, and build passed. These results come from the author. They were
not reproduced here. The author also reports that the new tests failed
before the fix.

### Diff size

7 files changed, 721 lines added, 47 lines removed.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

---------

Co-authored-by: remy-builder[bot] <324360501+remy-builder[bot]@users.noreply.github.com>
2026-11-12 16:16:22 -08:00
Ward Peeters
b2ce66cef8
chore: run lint-staged for root files and the 16 packages without a config (#29898)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-11-10 14:08:55 +01:00
Dane - AI (Mastra)
40a522c142
chore(deps): update build tools (#27997) 2026-10-22 14:33:21 +02:00
dane-ai-mastra[bot]
4c22623ea3 chore: version - exit prerelease mode 2026-10-21 11:26:39 +00:00
Max Katz
9a423dae48
refactor(lint): replace ESLint with type-aware oxlint (#27476) 2026-10-18 10:38:35 -07:00
dane-ai-mastra[bot]
a15924e709 chore: version packages 2026-10-16 04:04:12 +00:00
dane-ai-mastra[bot]
8b35a6c1d6 chore: version - exit prerelease mode 2026-10-01 08:22:20 +00:00
dane-ai-mastra[bot]
b782191b6c chore: version packages 2026-09-30 16:07:15 +00:00
Ward Peeters
bc826e8fb1
refactor: use Web Crypto where synchronous contracts stay intact (#25462)
Co-authored-by: mastracode <284800079+mastra-platform[bot]@users.noreply.github.com>
2026-09-30 09:45:11 +02:00
dane-ai-mastra[bot]
429d7b9f93 chore: version - exit prerelease mode 2026-09-22 10:43:03 +00:00
dane-ai-mastra[bot]
28f5aa46d1 chore: version packages 2026-09-19 04:05:35 +00:00
Tyler Barnes
8808c0e8da
fix(github-signals): resolve gitcrawl credentials from the gh CLI
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.
2026-09-18 14:43:06 -07:00
dane-ai-mastra[bot]
d530790829 chore: version packages 2026-09-17 16:05:14 +00:00
Tyler Barnes
4ab64af6a6
feat(github-signals): authorize bots by GitHub App ownership (#24246)
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>
2026-09-16 22:54:32 -07:00
dane-ai-mastra[bot]
871bdaa595 chore: version - exit prerelease mode 2026-09-15 09:04:59 +00:00
dane-ai-mastra[bot]
2228df8a00 chore: version packages 2026-09-15 04:05:06 +00:00
Tyler Barnes
502ca89048
fix(notifications): mark viewed notifications seen and bound inbox listings (#23710)
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>
2026-09-14 13:11:35 -07:00
Tyler Barnes
2990bccd1c
fix(core): restore live signal delivery and AGENTS.md loading (#23554)
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>
2026-09-10 17:14:50 -07:00
Abhi Aiyer
4337eb6230
test: align signal expectations with hidden reminders (#23290)
## 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>
2026-09-07 21:11:30 -07:00
dane-ai-mastra[bot]
c19a93b095 chore: version - exit prerelease mode 2026-09-03 04:02:53 +00:00
dane-ai-mastra[bot]
e6de774069 chore: version packages 2026-09-02 16:20:22 +00:00
Lennart
e983f74987
chore(*): Update/unify/add READMEs (#22858)
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai>
2026-09-02 14:36:59 +02:00
dane-ai-mastra[bot]
fc968c8a9b chore: version packages 2026-09-01 16:28:50 +00:00
Lennart
28ce924276
chore(*): Remove CHANGELOG.md from npm files (#22737) 2026-09-01 10:47:20 +02:00
dane-ai-mastra[bot]
2190302152
chore: version packages (alpha) (#22605)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-31 11:48:29 -07:00
Tyler Barnes
604da153fe
feat: add multi-PR GitHub signal subscriptions (#22407)
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>
2026-08-31 10:30:07 -07:00
dane-ai-mastra[bot]
3cd96a3c5a chore: version - exit prerelease mode 2026-08-26 10:43:02 +00:00
dane-ai-mastra[bot]
73fa1abed0
chore: version packages (alpha) (#22320)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-25 18:03:44 -07:00
Daniel Lew
15f92d02bc
feat: add intent-aware GitHub PR subscriptions (#21542)
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai>
2026-08-25 16:41:13 -04:00
dane-ai-mastra[bot]
387c6b7f5a chore: version - exit prerelease mode 2026-08-12 04:41:36 +00:00
dane-ai-mastra[bot]
361c421ca2 chore: version packages 2026-08-10 04:36:45 +00:00
Jamie Nichols
1315d8f17e
feat(mastracode): let plugins contribute processors and signal providers (#20848)
Co-authored-by: Mastra Code (anthropic/claude-opus-5) <noreply@mastra.ai>
2026-08-09 16:32:00 -07:00
Jamie Nichols
32980a3e24
fix: drive deferred notification stream options through the delivery policy (#21113)
Co-authored-by: Mastra Code (anthropic/claude-fable-5)
Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
2026-08-09 16:24:41 -07:00
dane-ai-mastra[bot]
ac0a3b8bcd
chore: version packages (alpha) (#20769)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-08-07 17:59:10 -07:00
Damien Schneider
b9dab92feb
chore(github-signals): format index.ts (#20986) 2026-08-07 14:08:51 -07:00
STN2H4
9168b80120
fix(github-signals): cancel stale polling side effects (#20593)
Co-authored-by: Abhi Aiyer <abhiaiyer91@gmail.com>
2026-08-07 13:25:44 -07:00
dane-ai-mastra[bot]
ca935ef6de chore: version - exit prerelease mode 2026-08-05 20:21:53 +00:00
Roamin
92be47fbd2
fix(core): stop @mastra/ai-sdk/ui crashing in browser bundles (#20760)
Co-authored-by: Mastra Code (anthropic/claude-fable-5)
Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
2026-08-05 12:54:21 -07:00
林SO
0c1b8405fd
fix(github-signals): suppress noisy activity notifications (#20736) 2026-08-05 11:13:59 -07:00
dane-ai-mastra[bot]
b4c8440eef chore: version - exit prerelease mode 2026-08-05 00:05:07 +00:00
dane-ai-mastra[bot]
c5984b48f8 chore: version packages 2026-07-31 05:11:36 +00:00
Shane Thomas
5cbfdaae75
fix(github-signals): resolve gitcrawl db path across platforms (#19465)
Co-authored-by: Mastra Code (anthropic/claude-fable-5) <noreply@mastra.ai>
2026-07-30 21:58:37 +02:00
Ward Peeters
d271d37f30
chore: migrate package builds to tsdown (#19829)
Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-07-28 12:32:21 +02:00
Ward Peeters
bdeaef58f0
chore: migrate linting to oxlint (#20173)
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Mastra Code (openai/gpt-5.6-sol) <noreply@mastra.ai>
2026-07-25 01:04:02 +02:00
Ward Peeters
3a507cbd42
chore: migrate repository formatting to oxfmt (#19807)
Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-07-24 16:18:33 +02:00
Dane - AI (Mastra)
a4620cae04
chore(deps): update formatting & linting (#19388)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: wardpeet <ward@coding-tech.com>
2026-07-20 16:13:28 +02:00
dane-ai-mastra[bot]
57566498b5 chore: version - exit prerelease mode 2026-06-26 19:51:28 +00:00
dane-ai-mastra[bot]
fdbb7ea66d chore: version packages 2026-06-24 05:18:33 +00:00
Tyler Barnes
fbeda0c0f3
fix: preserve processor message boundaries (#18337)
## Summary

This PR fixes processor message reapplication so processors that return
a message array do not collapse assistant response boundaries when those
messages are written back to the agent message list.

The bug showed up with no-op `processOutputStep` processors running
alongside task state signals: reapplying the returned message array used
the normal message merge path, which could merge separate assistant
response messages together. That made later loop steps see stale
text/tool content from earlier steps.

Changes included here:

- Add a `merge: false` option to `MessageList.add()` and use it for
processor message-array reapply paths.
- Add AIMock regression coverage for no-op output step processors,
including TaskSignalProvider scenarios that previously replayed stale
step content.
- Update output processor unit expectations to preserve separate
assistant messages instead of relying on accidental re-merge behavior.
- Change GitHub signals' output-step processor to return `undefined`
when it only performs side effects, avoiding unnecessary
unchanged-message reapplication.
- Stabilize the GitHub polling inbox E2E assertion by checking the
visible tool result instead of shelling out to sqlite from the TUI.

## Test plan

- `pnpm exec vitest run
packages/core/src/loop/test-utils/aimock/scenarios/output-step-processor.scenario.test.ts
packages/core/src/processors/runner.test.ts --bail 1 --reporter=dot`
- `pnpm --filter @mastra/github-signals test -- --reporter=dot`
- `pnpm --filter ./packages/core check`

---------

Co-authored-by: Mastra Code (openai/gpt-5.5) <noreply@mastra.ai>
2026-06-23 22:00:33 -07:00