@mastra/factory 0.8.0-alpha.9 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +630 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +41 -3
- package/dist/factory.js.map +1 -1
- package/dist/integrations/base.d.ts +8 -0
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/app-identity.d.ts +43 -0
- package/dist/integrations/github/app-identity.d.ts.map +1 -0
- package/dist/integrations/github/app-identity.js +62 -0
- package/dist/integrations/github/app-identity.js.map +1 -0
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +3 -1
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/reconcile-worker.d.ts +5 -0
- package/dist/integrations/github/reconcile-worker.d.ts.map +1 -1
- package/dist/integrations/github/reconcile-worker.js +7 -0
- package/dist/integrations/github/reconcile-worker.js.map +1 -1
- package/dist/integrations/github/routes.d.ts.map +1 -1
- package/dist/integrations/github/routes.js +11 -6
- package/dist/integrations/github/routes.js.map +1 -1
- package/dist/integrations/github/rules.d.ts +8 -0
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/rules.js +30 -8
- package/dist/integrations/github/rules.js.map +1 -1
- package/dist/integrations/github/sandbox.d.ts +39 -6
- package/dist/integrations/github/sandbox.d.ts.map +1 -1
- package/dist/integrations/github/sandbox.js +48 -14
- package/dist/integrations/github/sandbox.js.map +1 -1
- package/dist/integrations/github/webhook.d.ts +20 -0
- package/dist/integrations/github/webhook.d.ts.map +1 -1
- package/dist/integrations/github/webhook.js +32 -5
- package/dist/integrations/github/webhook.js.map +1 -1
- package/dist/integrations/linear/rules.d.ts.map +1 -1
- package/dist/integrations/linear/rules.js +2 -1
- package/dist/integrations/linear/rules.js.map +1 -1
- package/dist/integrations/platform/github/event-worker.d.ts +11 -0
- package/dist/integrations/platform/github/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/github/event-worker.js +53 -14
- package/dist/integrations/platform/github/event-worker.js.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts +7 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +40 -4
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +2 -1
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/routes/config.d.ts +12 -6
- package/dist/routes/config.d.ts.map +1 -1
- package/dist/routes/config.js +97 -56
- package/dist/routes/config.js.map +1 -1
- package/dist/routes/knowledge.d.ts +152 -0
- package/dist/routes/knowledge.d.ts.map +1 -0
- package/dist/routes/knowledge.js +442 -0
- package/dist/routes/knowledge.js.map +1 -0
- package/dist/routes/projects.d.ts +9 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +8 -0
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/surface.d.ts +6 -0
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +9 -0
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +3 -1
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/binding-context.d.ts.map +1 -1
- package/dist/rules/binding-context.js +4 -1
- package/dist/rules/binding-context.js.map +1 -1
- package/dist/rules/defaults.d.ts.map +1 -1
- package/dist/rules/defaults.js +87 -4
- package/dist/rules/defaults.js.map +1 -1
- package/dist/rules/dispatcher.d.ts +6 -0
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +118 -16
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/processor.d.ts.map +1 -1
- package/dist/rules/processor.js +20 -7
- package/dist/rules/processor.js.map +1 -1
- package/dist/rules/resolve.d.ts +1 -0
- package/dist/rules/resolve.d.ts.map +1 -1
- package/dist/rules/resolve.js +3 -2
- package/dist/rules/resolve.js.map +1 -1
- package/dist/rules/start-coordinator.d.ts +2 -0
- package/dist/rules/start-coordinator.d.ts.map +1 -1
- package/dist/rules/start-coordinator.js +3 -1
- package/dist/rules/start-coordinator.js.map +1 -1
- package/dist/rules/terminal-cleanup.d.ts +23 -0
- package/dist/rules/terminal-cleanup.d.ts.map +1 -0
- package/dist/rules/terminal-cleanup.js +43 -0
- package/dist/rules/terminal-cleanup.js.map +1 -0
- package/dist/rules/tools.d.ts.map +1 -1
- package/dist/rules/tools.js +24 -2
- package/dist/rules/tools.js.map +1 -1
- package/dist/rules/transition-service.d.ts +3 -0
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +10 -6
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +32 -3
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js +2 -0
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +8 -3
- package/dist/rules/validation.js.map +1 -1
- package/dist/sandbox/base-checkpoint-triggers.d.ts +77 -0
- package/dist/sandbox/base-checkpoint-triggers.d.ts.map +1 -0
- package/dist/sandbox/base-checkpoint-triggers.js +137 -0
- package/dist/sandbox/base-checkpoint-triggers.js.map +1 -0
- package/dist/sandbox/base-checkpoint.d.ts +59 -0
- package/dist/sandbox/base-checkpoint.d.ts.map +1 -0
- package/dist/sandbox/base-checkpoint.js +145 -0
- package/dist/sandbox/base-checkpoint.js.map +1 -0
- package/dist/sandbox/fleet.d.ts +32 -0
- package/dist/sandbox/fleet.d.ts.map +1 -1
- package/dist/sandbox/fleet.js +39 -10
- package/dist/sandbox/fleet.js.map +1 -1
- package/dist/session/checkpoint-capture.d.ts +3 -2
- package/dist/session/checkpoint-capture.d.ts.map +1 -1
- package/dist/session/checkpoint-capture.js +3 -3
- package/dist/session/checkpoint-capture.js.map +1 -1
- package/dist/session/factory-session.d.ts.map +1 -1
- package/dist/session/factory-session.js +2 -1
- package/dist/session/factory-session.js.map +1 -1
- package/dist/session/model-pack-hydration.d.ts +55 -0
- package/dist/session/model-pack-hydration.d.ts.map +1 -0
- package/dist/session/model-pack-hydration.js +56 -0
- package/dist/session/model-pack-hydration.js.map +1 -0
- package/dist/skills/service.d.ts +9 -0
- package/dist/skills/service.d.ts.map +1 -1
- package/dist/skills/service.js +10 -1
- package/dist/skills/service.js.map +1 -1
- package/dist/storage/domains/model-packs/base.d.ts +26 -0
- package/dist/storage/domains/model-packs/base.d.ts.map +1 -1
- package/dist/storage/domains/model-packs/base.js +102 -13
- package/dist/storage/domains/model-packs/base.js.map +1 -1
- package/dist/storage/domains/source-control/base.d.ts +47 -1
- package/dist/storage/domains/source-control/base.d.ts.map +1 -1
- package/dist/storage/domains/source-control/base.js +78 -19
- package/dist/storage/domains/source-control/base.js.map +1 -1
- package/dist/storage/domains/source-control/inmemory.d.ts +11 -3
- package/dist/storage/domains/source-control/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/source-control/inmemory.js +10 -1
- package/dist/storage/domains/source-control/inmemory.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +67 -1
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +140 -12
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/workspace.d.ts +31 -2
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +225 -54
- package/dist/workspace.js.map +1 -1
- package/factory-skills/factory-plan/SKILL.md +1 -1
- package/factory-skills/factory-rereview/SKILL.md +3 -3
- package/factory-skills/factory-review/SKILL.md +3 -3
- package/factory-skills/factory-triage/SKILL.md +2 -0
- package/package.json +9 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,635 @@
|
|
|
1
1
|
# @mastra/factory
|
|
2
2
|
|
|
3
|
+
## 0.8.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Add per-repository worktree teardown commands and run them during terminal, explicit, and destructive Factory session cleanup. ([#21564](https://github.com/mastra-ai/mastra/pull/21564))
|
|
8
|
+
|
|
9
|
+
- Made Factory session workspace resolution lazy. Resolving a session now returns the workspace immediately with a lazy sandbox handle; sandbox provisioning, repository materialization, branch checkout, and setup run in the background at session start (or on the first filesystem/sandbox operation) instead of blocking agent start. Storage reads during resolution are parallelized, failed background materializations are retried on the next use, and metadata-only resolutions such as thread-list polling never trigger sandbox work. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
10
|
+
|
|
11
|
+
- Added org-visible Factory sessions: sessions store a visibility property derived from origin, org members can open org-visible sessions, and factory-ui shows session owners and access errors. ([#21460](https://github.com/mastra-ai/mastra/pull/21460))
|
|
12
|
+
|
|
13
|
+
- Added foundational support for an upcoming experimental memory capability across storage, runtime, and developer tooling. ([#19538](https://github.com/mastra-ai/mastra/pull/19538))
|
|
14
|
+
|
|
15
|
+
- Added a configurable allowlist of reviewer bots that can trigger GitHub review and comment notifications. Set MASTRACODE_GITHUB_AUTHORIZED_BOTS (comma-separated logins) or pass authorizedBots to GithubIntegration to trust bots beyond the built-in defaults; previously only coderabbitai[bot] and devin-ai-integration[bot] were accepted and every other bot was dropped without a log line. Bot logins now match case-insensitively and rejected senders are logged. Fixes #21621 ([#21697](https://github.com/mastra-ai/mastra/pull/21697))
|
|
16
|
+
|
|
17
|
+
- Sped up new Factory agent sessions with warm repo base checkpoints. When a repository is connected, Factory now builds a base sandbox checkpoint (clone plus setup command) in the background, rebuilds it when pull requests merge to the default branch or pushes land there, and keeps it fresh via the periodic reconcile sweep. New sessions boot from the base checkpoint and skip the full clone and setup, falling back to the previous cold path when no checkpoint is available. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
18
|
+
|
|
19
|
+
### Patch Changes
|
|
20
|
+
|
|
21
|
+
- Speed up the local dev watch for the design system: `pnpm dev:ui` now rebuilds `@mastra/playground-ui` on save, so design-system edits show up in the Factory UI without a manual rebuild. `pnpm dev:playground` picks up the same watch. The watch starts from a full build and then skips type declaration emit on every rebuild, which brings each save from ~9s down to ~1.5s. ([#21646](https://github.com/mastra-ai/mastra/pull/21646))
|
|
22
|
+
|
|
23
|
+
Declarations stay frozen at that starting build for the length of a dev session — run `pnpm --filter @mastra/playground-ui build` after changing a component's props. The published build is unchanged and still emits declarations.
|
|
24
|
+
|
|
25
|
+
- Factory sessions can start before their sandbox is ready: resolving a session returns its workspace immediately, and background checkpoint-build failures now show up in logs instead of disappearing. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
26
|
+
|
|
27
|
+
- Fixed session materialization timing being overwritten when sessions resume. The initial-materialize timestamp is now recorded once and preserved across idle-reap, checkpoint restore, and sandbox recreation, so time-to-first-materialize measurements reflect the true initial cost. Historical metrics captured before this fix are not backfilled. ([#21520](https://github.com/mastra-ai/mastra/pull/21520))
|
|
28
|
+
|
|
29
|
+
- Prevent Factory handoff files from colliding across work items ([#21763](https://github.com/mastra-ai/mastra/pull/21763))
|
|
30
|
+
|
|
31
|
+
- Added Factory session state to browser tabs and the sidebar, so a running session can be followed without switching to its window. ([#21426](https://github.com/mastra-ai/mastra/pull/21426))
|
|
32
|
+
|
|
33
|
+
- Session tab favicons are color-coded: amber while initializing, green while the agent works, blue when it is your turn, red on failure.
|
|
34
|
+
- Sidebar status dots now cover workspaces and user sessions alike, with Initializing / Working / Ready tooltips in the same three colors, so a tab and its sidebar row read the same.
|
|
35
|
+
- Failures show on the favicon only; the sidebar has no error dot yet.
|
|
36
|
+
- Tab titles show the session's identifier — `#1567` for GitHub pull requests and issues, `COR-210` for Linear — or the thread title for user sessions.
|
|
37
|
+
- Board kickoff toasts gained a **New Tab** action, so a ready session opens without leaving the board.
|
|
38
|
+
- Fixed a pinned session losing its sidebar slot when five other sessions were busy at once.
|
|
39
|
+
|
|
40
|
+
- Fixed Linear issue reconciliation for issues that are not assigned to a project. ([#21601](https://github.com/mastra-ai/mastra/pull/21601))
|
|
41
|
+
|
|
42
|
+
- Fixed workspace failures vanishing from the chat transcript. A workspace that failed to clone or start only flipped an internal flag that nothing rendered, so the session simply looked stuck with no reason given. The failure now appears as an error notice in the transcript — the same message the terminal already printed — for both the `workspace_error` and the failing `workspace_status_changed` event. ([#21746](https://github.com/mastra-ai/mastra/pull/21746))
|
|
43
|
+
|
|
44
|
+
- Fixed the Factory chat transcript drawing the same content twice after coming back to a tab. While a run streams, leaving the tab drops the event stream and the transcript refetches on return: an assistant reply the server had persisted as its own step, and a steer whose live event was missed, both landed on screen a second time. The refetched window is now paired against what is already drawn — by message id, by tool call, then by the text itself — so it only inserts what is genuinely missing. ([#21651](https://github.com/mastra-ai/mastra/pull/21651))
|
|
45
|
+
|
|
46
|
+
Also fixed a tool call rendering as two half-filled cards when a steer interrupted it: live tool state followed the newest assistant message instead of staying with the call it belongs to.
|
|
47
|
+
|
|
48
|
+
- Resume a skill run that was aborted out from under it. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
49
|
+
|
|
50
|
+
An aborted run was recorded as a terminal failure on the assumption that an
|
|
51
|
+
abort is deliberate. In practice the dominant cause is the process going away
|
|
52
|
+
underneath the run — an operator restarting the server — and the run stream does
|
|
53
|
+
not say which happened. Cards were dead-ending at attempt 1 with nothing on the
|
|
54
|
+
board to press, needing a human to nudge each one by hand after every restart.
|
|
55
|
+
|
|
56
|
+
Aborted runs are now retried like any other interrupted work, still bounded by
|
|
57
|
+
the existing attempt cap.
|
|
58
|
+
|
|
59
|
+
- Stop Factory from waking itself on its own GitHub comments. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
60
|
+
|
|
61
|
+
Factory recognised its own writes by comparing the event sender against
|
|
62
|
+
`GITHUB_APP_SLUG`. That variable names the deployment's own self-hosted GitHub
|
|
63
|
+
App, which is a different App than the one a Platform deployment posts as — and
|
|
64
|
+
on such a deployment it is legitimately unset, so the check compared against
|
|
65
|
+
`undefined[bot]` and never matched. Every self-loop guard silently failed open.
|
|
66
|
+
|
|
67
|
+
The visible result: triage published its handoff comment, that comment came back
|
|
68
|
+
through ingress, re-invoked triage, and cancelled the run that had written it —
|
|
69
|
+
leaving the public verdict stuck at "Pending" while both runs reported success.
|
|
70
|
+
|
|
71
|
+
The Platform integration now names the App it actually posts as, overridable
|
|
72
|
+
with `MASTRA_PLATFORM_GITHUB_APP_SLUG`, and identity resolution is centralised so
|
|
73
|
+
an unresolved identity is reported as _unknown_ rather than collapsing into
|
|
74
|
+
"not Factory".
|
|
75
|
+
|
|
76
|
+
- Let a Factory run finish its stage when the previous role handed off in the same ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
77
|
+
session.
|
|
78
|
+
|
|
79
|
+
`factory_transition_work_item` re-checked its authority at execution time by
|
|
80
|
+
comparing the live run binding against the binding row that existed when the
|
|
81
|
+
tool was built, requiring the same row id. But handing the next role its turn in
|
|
82
|
+
an existing session legitimately rotates that row: the previous role's binding is
|
|
83
|
+
revoked and a new one is issued for the same session and the same work item.
|
|
84
|
+
Tools built for the earlier role stay live across that rotation, so they were
|
|
85
|
+
keyed to a row that the handoff itself had just replaced.
|
|
86
|
+
|
|
87
|
+
The visible result: planning produced a complete plan, called its terminal
|
|
88
|
+
transition to `execute`, and was refused with "Factory agent binding is
|
|
89
|
+
unavailable, revoked, or no longer matches this session." The item stopped in
|
|
90
|
+
Planning with the plan written but never advanced, and the decision that carried
|
|
91
|
+
it reported success. Every leg that continues an item in an existing session —
|
|
92
|
+
planning after triage, and the review-feedback wakes — failed the same way.
|
|
93
|
+
|
|
94
|
+
Authority is now the work item the session is bound to rather than the
|
|
95
|
+
individual binding row, so a rotation no longer strands the run it exists to
|
|
96
|
+
start. Re-pointing a session at a _different_ work item is still refused.
|
|
97
|
+
|
|
98
|
+
- Start the implementation run when a work item enters Building. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
99
|
+
|
|
100
|
+
Building was the one stage on the Work board with no entry rule, so an item
|
|
101
|
+
arriving there stopped: the plan was approved and nothing picked it up until
|
|
102
|
+
somebody pressed Build by hand. Every other stage advances itself, which made
|
|
103
|
+
Building the single manual step in an otherwise continuous path from intake to
|
|
104
|
+
review.
|
|
105
|
+
|
|
106
|
+
The run it starts carries a prompt rather than activating a skill. Skills exist
|
|
107
|
+
here to define a handoff — a terminal message later rules match on to decide
|
|
108
|
+
what happens next — and Building already has one: it ends by opening a pull
|
|
109
|
+
request, which arrives as its own event and raises the Review card. Rules could
|
|
110
|
+
previously only express "invoke this skill", so the decision vocabulary now
|
|
111
|
+
accepts a prompt as the alternative to a skill name.
|
|
112
|
+
|
|
113
|
+
- Credit the reporter as a co-author on work their issue caused ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
114
|
+
|
|
115
|
+
When Factory builds a fix for a GitHub issue, the build prompt now asks for a
|
|
116
|
+
`Co-Authored-By` trailer naming the person who reported it, so the reporter shows
|
|
117
|
+
up as a contributor on the pull request rather than only in the issue thread.
|
|
118
|
+
|
|
119
|
+
Only GitHub issues qualify. A Linear card stamps a display name and a manual card
|
|
120
|
+
stamps nothing, and neither resolves to the GitHub account a trailer needs, so
|
|
121
|
+
those are left uncredited rather than credited to nobody. Issues Factory filed
|
|
122
|
+
itself are skipped.
|
|
123
|
+
|
|
124
|
+
Intake already stamped the reporter's login but the stage rules could not see it;
|
|
125
|
+
the intake-stamped metadata now reaches rules that run on a stage.
|
|
126
|
+
|
|
127
|
+
- Stop reporting a skill kickoff as successful when it was queued onto a run that was already ending. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
128
|
+
|
|
129
|
+
Signals sent into an active session settle as `deliver`, which acknowledges routing but promises nothing about execution. If the in-flight run finished before draining its queue, the prompt was dropped: no turn started, no error surfaced, and the decision was marked succeeded while the work item sat in its new stage with nobody working on it. The dispatcher now confirms the signal actually landed in the thread and retries the decision when it did not, so the next attempt finds the session idle and takes the instrumented wake path.
|
|
130
|
+
|
|
131
|
+
- Dismiss runs still parked on a work item when it reaches a terminal stage. A merged or closed pull request cannot answer a suggested run, so the card no longer keeps asking. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
132
|
+
|
|
133
|
+
- Check who sent a GitHub comment or review before letting it wake an agent, and ingest default-branch `push` events. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
134
|
+
|
|
135
|
+
The sender gate listed event kinds under names the webhook classifier never produces, so the identity check that keeps untrusted commenters from waking Factory agents was skipped for every comment and review event. The gate now names the kinds the classifier actually emits. Separately, `push` events were dropped by the event filter before ingestion; they are now ingested and forwarded to Factory's event pipeline so downstream consumers (such as the upcoming warm base-checkpoint refresh) can observe default-branch pushes.
|
|
136
|
+
|
|
137
|
+
- Ingest `pull_request.opened` from the Platform event poller so a newly opened pull request mints its Review card. The poller forwards an allow-list of events to the rules engine, and `opened` was missing from it — so on deployments without a direct webhook (the only path a local deployment has), a pull request the factory authored itself was never reviewed. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
138
|
+
|
|
139
|
+
- Keep kickoff skill resolution off the sandbox so clicking Review on a board card no longer blocks on full sandbox provisioning. Project skill roots (`.claude/skills`, `.agents/skills`, `<configDir>/skills`) are guarded while the session sandbox is unmaterialized — discovery reports them empty instead of forcing materialization — and a skills rescan fires automatically once materialization completes so repo-local skills become visible. Bundled Factory skills (e.g. factory-review) resolve from local disk in milliseconds. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
140
|
+
|
|
141
|
+
- Stop the GitHub event worker from crashing when it is constructed before source-control storage is initialized. ([#21801](https://github.com/mastra-ai/mastra/pull/21801))
|
|
142
|
+
|
|
143
|
+
`workers()` dereferenced the integration's source-control storage eagerly while building the reconcile worker, but that storage is only attached later by `versionControl.initialize`. A deployment that constructs workers first crashed with "source-control storage has not been initialized". The worker now receives a lazy handle that resolves the storage slices at call time, once the worker is actually running.
|
|
144
|
+
|
|
145
|
+
- Deliver GitHub review feedback to the factory rules on the polling path. Submitted reviews and new pull request comments were dropped before the rules engine ran, so the agent that authored a branch was never woken when a reviewer asked for changes. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
146
|
+
|
|
147
|
+
- Route pull request comments to the agent that authored the pull request, and stop provenance from branding commenters as Factory. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
148
|
+
|
|
149
|
+
Comments on a PR arrive as `issue_comment` with `issue.pull_request` set, and the ingress explicitly dropped them. That closed the most common feedback path of all: on a Factory-authored PR, GitHub refuses a formal `--approve`/`--request-changes` verdict from the account that opened it, so the review skill falls back to `gh pr comment` — which was discarded. External review bots leaving plain comments were dropped for the same reason.
|
|
150
|
+
|
|
151
|
+
A new `pullRequestCommentCreated` rule event now carries those comments, reading the pull request from the `issue` payload so provenance binds the comment to the authoring Work item rather than mistaking the number for an issue's. The default rule sends a high-priority `sendMessage` to the `work` role, which wakes an idle session. Factory's own comments are ignored, because `factoryAuthored` cannot distinguish the Work role from the Review role and reacting to them would let an agent wake itself in a loop.
|
|
152
|
+
|
|
153
|
+
Separately, `factoryAuthored` was derived from PR provenance for every event, which proves the _pull request_ came from Factory, not the sender of the event. Any human or review bot commenting on a Factory-authored PR was therefore marked as Factory. Provenance-based attribution is now skipped for events whose sender is responding to the PR — comments, submitted reviews, and re-requested reviews — where only the app login identifies Factory.
|
|
154
|
+
|
|
155
|
+
- Wait for the run that swallowed a kickoff, instead of racing it. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
156
|
+
|
|
157
|
+
A signal queued onto an already-running turn can be dropped when that turn ends
|
|
158
|
+
before draining its queue. That case was detected correctly and then handed to
|
|
159
|
+
the generic exponential backoff, which spends all five attempts inside about
|
|
160
|
+
thirty seconds — while the run it is waiting on takes minutes. Every attempt
|
|
161
|
+
landed on the same busy session and the card gave up roughly ten times too early.
|
|
162
|
+
|
|
163
|
+
The dispatcher now waits for the in-flight run to end and redelivers into the
|
|
164
|
+
freed session, which is the event that actually resolves the condition. The
|
|
165
|
+
decision settles within its original lease without spending the retry budget, and
|
|
166
|
+
a redelivery that is dropped again still goes back on the queue.
|
|
167
|
+
|
|
168
|
+
- Only credit reporters who are real GitHub accounts ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
169
|
+
|
|
170
|
+
The issue poller stamps a placeholder login when GitHub returns no author, which
|
|
171
|
+
would have become a `Co-Authored-By` trailer crediting an account nobody owns.
|
|
172
|
+
Reporter credit now requires a login that matches GitHub's grammar.
|
|
173
|
+
|
|
174
|
+
- Re-review a pull request when a push lands while its card is still in Reviewing. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
175
|
+
|
|
176
|
+
A push to a card already sitting in Reviewing was dropped rather than deferred:
|
|
177
|
+
the rule returned nothing, and once the in-flight pass finished it transitioned
|
|
178
|
+
to Done having reviewed code that was no longer current, with no record that
|
|
179
|
+
newer commits had arrived. That is the exact ordering the review loop produces —
|
|
180
|
+
a review asks for changes, the authoring agent pushes a fix, and the fix lands
|
|
181
|
+
before the card finishes leaving Reviewing.
|
|
182
|
+
|
|
183
|
+
Only Intake now suppresses the re-review. A push during Reviewing re-enters the
|
|
184
|
+
stage, which supersedes the stale pass: the stage rule already cancels the run
|
|
185
|
+
in flight and selects the right skill for the entry it sees.
|
|
186
|
+
|
|
187
|
+
Transition decisions carry a `reenter` flag for this, since a transition to the
|
|
188
|
+
stage an item already holds is otherwise inert — the common case is a board
|
|
189
|
+
being corrected into a state it already has, not work that needs restarting.
|
|
190
|
+
|
|
191
|
+
- Credit the author on review follow-up pull requests ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
192
|
+
|
|
193
|
+
When a review pass ships mechanical fixes as a follow-up pull request, those
|
|
194
|
+
commits now carry a `Co-Authored-By` trailer for the human whose work they build
|
|
195
|
+
on — the reviewed pull request's author, or, when that author is a bot, the
|
|
196
|
+
reporter of the issue the pull request closes.
|
|
197
|
+
|
|
198
|
+
- Carry pull request review feedback back to the agent that wrote the code. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
199
|
+
|
|
200
|
+
A `changes_requested` review is meant to wake the authoring work session, but
|
|
201
|
+
when the pull request carried no provenance the event resolved to the pull
|
|
202
|
+
request's own Review card. `addressReviewFeedback` deliberately refuses to act
|
|
203
|
+
on the review board — a Review card reacting to its own posted review would loop
|
|
204
|
+
the reviewer against itself — so the wake was dropped and the author never heard
|
|
205
|
+
about the feedback.
|
|
206
|
+
|
|
207
|
+
Review and pull request comment events now follow the linked card's
|
|
208
|
+
`parentWorkItemId` back to the item that authored the pull request, so the
|
|
209
|
+
existing guard becomes true for the right item instead of never. A pull request
|
|
210
|
+
card with no authoring item still emits nothing.
|
|
211
|
+
|
|
212
|
+
- Close the work/review loop: a review that requests changes now wakes the agent that authored the pull request. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
213
|
+
|
|
214
|
+
`pull_request_review` webhooks were accepted and classified urgent, but no matching rule event existed, so the delivery was dropped after classification and the authoring agent was never told. PR subscriptions did not cover this — they sync PR activity into a thread's notification inbox for the agent to read on its _next_ turn, but nothing starts that turn.
|
|
215
|
+
|
|
216
|
+
A new `pullRequestReviewSubmitted` rule event maps `pull_request_review`/`submitted`, and the default rule sends a high-priority `sendMessage` to the `work` role, which wakes an idle session. Only `changes_requested` fires; `approved` and `commented` stay quiet, and the Review card that posted the review never reacts to its own output.
|
|
217
|
+
|
|
218
|
+
- Send Factory's own pull requests straight to Review. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
219
|
+
|
|
220
|
+
A pull request entered Review only when its author passed a repository-collaborator
|
|
221
|
+
permission check. A GitHub App bot is never a collaborator, so every pull request
|
|
222
|
+
Factory opened itself scored as untrusted and parked in Intake, waiting on a human
|
|
223
|
+
click — the exact opposite of the intent, since those are the pull requests whose
|
|
224
|
+
provenance Factory knows best.
|
|
225
|
+
|
|
226
|
+
Factory authorship is now its own trust signal for pull requests: the branch came
|
|
227
|
+
from a Work run this Factory dispatched. Issues are deliberately unchanged, because
|
|
228
|
+
auto-triaging an issue Factory opened is a self-loop with no upside.
|
|
229
|
+
|
|
230
|
+
- Stop a running local Factory session from wedging when its checkout directory disappears. A tool spawned into a removed directory fails with `spawn /bin/sh ENOENT` — an error that names the shell rather than the sandbox — so it was never recognized as a dead sandbox, and every later filesystem or command tool (including GitHub token refresh) failed the same way for the rest of the run. A missing working directory is now treated as the local equivalent of a destroyed sandbox: if the session is still live, the revival ladder rebuilds the checkout and retries the command; if the session was retired (retirement deletes the checkout on purpose), the run fails fast with a clear retirement error instead of resurrecting the retired checkout — before provisioning anything, so a retired session never consumes a sandbox or fleet budget slot, and a sandbox already mid-build when retirement lands is torn down rather than left bound to a dead session. A missing _command_ reports the same ENOENT code, so the working directory is probed to tell the two apart and healthy sandboxes are never rebuilt for an unknown command. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
231
|
+
|
|
232
|
+
- Report what actually happened to a Factory run. A human dragging a card on the board now arms the item, so the run it asks for starts instead of parking for approval, and a run that dies mid-flight — a provider error, or a cancellation by the next decision — is recorded as failed on the decision instead of reported as a success. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
233
|
+
|
|
234
|
+
- Factory sessions now revive a sandbox that dies mid-session instead of erroring the turn. When a command fails with a destroyed-sandbox error (for example after idle garbage collection), or with an exec-transport error whose connection never opened (so the command provably never started), the session drops the dead handle, re-runs the provisioning pipeline (reattach, checkpoint-seeded provision, or fresh clone), and retries the command once. Transport errors where the command may have already run are surfaced instead of replayed, so side effects like `git commit` cannot execute twice. Concurrent failures coalesce onto a single revival. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
235
|
+
|
|
236
|
+
- Retire a parked proposal when the run it asked for starts anyway. Approving a ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
237
|
+
proposal mints a fresh decision rather than dispatching the parked one, so the
|
|
238
|
+
original stayed `proposed` forever and the card kept asking to start a run that
|
|
239
|
+
had already finished. The dispatcher now dismisses proposals for the same work
|
|
240
|
+
item and role as any `invokeSkill` it dispatches, so the waiting badge only ever
|
|
241
|
+
marks a loop that is genuinely stopped.
|
|
242
|
+
|
|
243
|
+
- Make the board honest about runs it is waiting on, and about clicks that fail. ([#21766](https://github.com/mastra-ai/mastra/pull/21766))
|
|
244
|
+
|
|
245
|
+
Four gaps closed on the work board:
|
|
246
|
+
|
|
247
|
+
- A card click that failed while refreshing workspaces before starting a run did
|
|
248
|
+
nothing at all — no run, no error. It now surfaces the failure instead of
|
|
249
|
+
swallowing it, so an expired session reads as an expired session.
|
|
250
|
+
- A run a rule proposed could not be approved from the card. The card menu now
|
|
251
|
+
offers it.
|
|
252
|
+
- After a plan was approved, the Building run became unreachable from the card,
|
|
253
|
+
leaving the item stranded mid-loop.
|
|
254
|
+
- A card with a proposed run looked idle. It now says it is waiting on someone,
|
|
255
|
+
with the approval inline.
|
|
256
|
+
|
|
257
|
+
- Stop showing "Linked card could not be filed" when nothing failed. ([#21766](https://github.com/mastra-ai/mastra/pull/21766))
|
|
258
|
+
|
|
259
|
+
A linked-card decision that already succeeded is deliberately reset to `retry`
|
|
260
|
+
when its card is rematerialized, so the card gets re-filed. The board read any
|
|
261
|
+
`retry` as "already failed at least once" and put an error on the card, so a
|
|
262
|
+
routine replay looked like a broken automation — 16 cards were showing a failure
|
|
263
|
+
nobody caused.
|
|
264
|
+
|
|
265
|
+
A card now reports an error only when the effect has actually been attempted or
|
|
266
|
+
left an error behind. A replay reads as what it is: the work it is doing.
|
|
267
|
+
|
|
268
|
+
- Fixed Factory completion so moving a GitHub issue to Done marks it as pending close and removes its remaining triage status labels. ([#21515](https://github.com/mastra-ai/mastra/pull/21515))
|
|
269
|
+
|
|
270
|
+
- Deliver GitHub pull request signals to the session that actually owns the subscribed thread, and skip subscriptions whose thread this deployment does not hold. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
271
|
+
|
|
272
|
+
A subscription records the Factory project as its resource, but an unscoped session registers under its own id, so delivery looked for the thread under a resource that did not own it and failed with "Thread not found" on every matching event. Delivery now reads the thread from storage to find its owning resource. A subscription naming a thread that is absent is skipped rather than failed, so a pull request's events reaching a deployment that never owned the thread no longer fabricate a session or retry in a loop.
|
|
273
|
+
|
|
274
|
+
- Fixed observational memory in Factory web user sessions ignoring the stored memory settings. Sessions created from the web UI now start with the observer and reflector models, thresholds, and attachment preferences saved in your memory settings, instead of falling back to the built-in default model — which failed with a missing API key error when that provider was not configured. ([#21423](https://github.com/mastra-ai/mastra/pull/21423))
|
|
275
|
+
|
|
276
|
+
- Fixed restarting a review after deleting its thread. It no longer fails with "git clone failed: a branch named ... already exists". Reused Platform sandboxes now delete the previous session's local branches when they are recycled. A new session for the same branch starts fresh from the base branch. Branch checkout also recovers from leftover or broken branch refs instead of failing the workspace. ([#21268](https://github.com/mastra-ai/mastra/pull/21268))
|
|
277
|
+
|
|
278
|
+
- The Review board now has a Canceled column. A pull request closed without merging used to reappear in Intake — the queue of pull requests still waiting for review — carrying a "Canceled" chip to explain why it looked out of place. It now sits in its own column. ([#21323](https://github.com/mastra-ai/mastra/pull/21323))
|
|
279
|
+
|
|
280
|
+
- Fixed the Factory session favicons being nearly invisible in light-themed browsers: the Mastra mark now switches to black on light and white on dark, matching the default favicon, and the state dots use the design system's light-theme accents so amber, green, blue, and red stay legible on a white tab strip. ([#21510](https://github.com/mastra-ai/mastra/pull/21510))
|
|
281
|
+
|
|
282
|
+
- Improved Factory stage handling so run routes and board columns stay aligned with the rule stage vocabulary. ([#21516](https://github.com/mastra-ai/mastra/pull/21516))
|
|
283
|
+
|
|
284
|
+
- Smoothed out the chat transcript. A streamed reply now reveals at a steady pace instead of arriving in clumps, and a tool card that turns up while the agent is working fades in rather than popping onto the page. Both stop for readers who ask for reduced motion. ([#21499](https://github.com/mastra-ai/mastra/pull/21499))
|
|
285
|
+
|
|
286
|
+
- Improved chat scrolling in the factory. Sending a message now scrolls once and parks it near the top with room under it, and the view stays on the agent's newest output — tool progress, subagents, the streamed reply — instead of standing still or jumping back up to what you just sent. ([#21523](https://github.com/mastra-ai/mastra/pull/21523))
|
|
287
|
+
|
|
288
|
+
Scroll up to read back and the chat stops following. Return to the bottom and it picks the stream up again. The jump-to-latest button no longer flickers when you send a message.
|
|
289
|
+
|
|
290
|
+
The room under the live turn is released when the run ends, so a finished conversation settles against the composer instead of leaving most of the window blank.
|
|
291
|
+
|
|
292
|
+
- Board cards now show one status line instead of stacking several. A card reports what you just triggered, then what a rule is doing on its own, then what a click will do — one thing at a time, in that order. ([#21323](https://github.com/mastra-ai/mastra/pull/21323))
|
|
293
|
+
|
|
294
|
+
Automatic actions say what they do rather than where they sit in a queue. A card reads "Starting an automated run…" while a rule works, and "Automated run could not start" when it gives up, with the raw error one hover away next to Retry. An action the server is still re-attempting says "— retrying…", so a card looping through retries no longer looks like one starting for the first time.
|
|
295
|
+
|
|
296
|
+
Unfiled GitHub and Linear items now use the same card as filed work. Clicking anywhere on the card starts its default run and reports "Starting run…" while that resolves, instead of looking inert. A link to the issue or pull request sits beside the title, and the remaining actions are in the card's actions menu.
|
|
297
|
+
|
|
298
|
+
A resting card also shows less. The click hint and the actions menu fade in when you point at the card or reach it with the keyboard, the hint shares the author's line instead of taking a row of its own, and labels are shorter. Touch screens have no hover, so they keep both visible.
|
|
299
|
+
|
|
300
|
+
- The turn-end filesystem capture no longer blocks agent turn completion. Readers of the persisted workspace file listing wait up to 10 seconds for the in-flight capture to observe the just-ended turn's files; if a capture takes longer, a reader can temporarily receive the previous listing. ([#21679](https://github.com/mastra-ai/mastra/pull/21679))
|
|
301
|
+
|
|
302
|
+
- Platform GitHub event polling is now scoped to the repositories linked to a Factory project. Previously the worker polled every repository the underlying GitHub App installation exposed, which for customers who grant broad org access meant hundreds of unnecessary requests per polling cycle. With this change, no polling happens for repositories that are not linked to a project, and repositories added or removed from a project are picked up automatically on the next polling cycle — no worker restart or additional configuration required. ([#21772](https://github.com/mastra-ai/mastra/pull/21772))
|
|
303
|
+
|
|
304
|
+
- Fixed how the Factory chat transcript reads agent controller events. It branched on an `om_activation.enabled` flag the controller never sends, and cast token usage and memory progress into hand-written shapes that had drifted from the streamed payloads. Both now read the shapes the controller actually emits, so the status line and memory rings stay correct as those payloads evolve. ([#21739](https://github.com/mastra-ai/mastra/pull/21739))
|
|
305
|
+
|
|
306
|
+
- Fixed model packs so each user can set a default for new interactive Factory chats while preserving thread-specific pack and model choices, refreshing edited packs, and leaving Factory work runs unaffected. ([#21762](https://github.com/mastra-ai/mastra/pull/21762))
|
|
307
|
+
|
|
308
|
+
- Fixed Linear intake so issues only land in the Factory project their Linear project is routed to. Previously, opening any board pulled in every selected Linear project's open issues and auto-triaged them there, repeating for each Factory project you viewed. ([#21698](https://github.com/mastra-ai/mastra/pull/21698))
|
|
309
|
+
|
|
310
|
+
**Routing Linear projects**
|
|
311
|
+
|
|
312
|
+
In Settings › Intake, each selected Linear project now picks the Factory it feeds. A project left unrouted no longer feeds any board, and boards only show the Linear intake feed for projects routed to them. Organizations with a single Factory keep working with no configuration.
|
|
313
|
+
|
|
314
|
+
**Deleted cards stay deleted**
|
|
315
|
+
|
|
316
|
+
Removing an intake card now also clears the stored routing decision behind it, so it no longer reappears on the next intake poll.
|
|
317
|
+
|
|
318
|
+
Fixes #21614
|
|
319
|
+
|
|
320
|
+
- Updated dependencies [[`587f6ef`](https://github.com/mastra-ai/mastra/commit/587f6efcfc25880b93760a8607d1cd381ec612fe), [`7e096f0`](https://github.com/mastra-ai/mastra/commit/7e096f02f0dddbf09b85d306458351245ed2f886), [`d7e6745`](https://github.com/mastra-ai/mastra/commit/d7e67456954863c55440ea9c49bc6ceb9949972d), [`6223446`](https://github.com/mastra-ai/mastra/commit/6223446ddce6166e96e0ba5e00d628b615dee8ca), [`15101bb`](https://github.com/mastra-ai/mastra/commit/15101bb53c0d934f31af6b8813b88191e382a5e5), [`4e7a421`](https://github.com/mastra-ai/mastra/commit/4e7a421dce8a48742f785d1e93ad2f43a572b282), [`c2c3deb`](https://github.com/mastra-ai/mastra/commit/c2c3debcf670c7082d0a5e553aa99818a864698c), [`d8308a2`](https://github.com/mastra-ai/mastra/commit/d8308a2be3c07e777393d1017a381dcae3890d30), [`b0a2a07`](https://github.com/mastra-ai/mastra/commit/b0a2a07800d42bd9823292e7db832374ed084c9c), [`74e5bd3`](https://github.com/mastra-ai/mastra/commit/74e5bd315b8b3a1e04cb6cf480bb0f5fc4951dc8), [`242e324`](https://github.com/mastra-ai/mastra/commit/242e3241e73cbd5c9bb86a31ebb49ca0256488d4), [`217e967`](https://github.com/mastra-ai/mastra/commit/217e9672d8b3160eb729d8e9f0044949e88da239), [`d774e89`](https://github.com/mastra-ai/mastra/commit/d774e8930c781df8c9effe3763e6b501c099b6cc), [`9c27a53`](https://github.com/mastra-ai/mastra/commit/9c27a53cd9d3de4f3f025bc387d94ce371c33f95), [`3a634e9`](https://github.com/mastra-ai/mastra/commit/3a634e9b32e3c47db3f287292ce37e862a02e005), [`8f0a332`](https://github.com/mastra-ai/mastra/commit/8f0a3321bf180368d76fe7b36aa1a8f60f00b6de), [`0b4f108`](https://github.com/mastra-ai/mastra/commit/0b4f1089aa8d92e67c2a8e99726822c5ee410784), [`8a4a4af`](https://github.com/mastra-ai/mastra/commit/8a4a4af31358fa3af79b962f87cf9a89f2c07aa9), [`9acb50f`](https://github.com/mastra-ai/mastra/commit/9acb50f71cec9c362f06820033f90ae6b1f8282f), [`46e9e3f`](https://github.com/mastra-ai/mastra/commit/46e9e3f73babe1bc70080a596cf2ac0b9da48519), [`3f9a190`](https://github.com/mastra-ai/mastra/commit/3f9a19057c027155867b9317294ee4ca7bd0581a), [`dff25a1`](https://github.com/mastra-ai/mastra/commit/dff25a1103fa72ee082a9b6f805ebeb5ce400753), [`6db7a5d`](https://github.com/mastra-ai/mastra/commit/6db7a5dd3dd2b6f7ef75dcd804fcffef5fa83963), [`217e967`](https://github.com/mastra-ai/mastra/commit/217e9672d8b3160eb729d8e9f0044949e88da239), [`583e235`](https://github.com/mastra-ai/mastra/commit/583e23519c13af16c1746f9c49722d011216611b), [`b098de9`](https://github.com/mastra-ai/mastra/commit/b098de9d7cb9f672e0883a5c716465a3a689693d), [`e8808e3`](https://github.com/mastra-ai/mastra/commit/e8808e3d8eb585a2565be53e56a7e0e1477352a4), [`a77f8d4`](https://github.com/mastra-ai/mastra/commit/a77f8d4740d2178a74c41e4bf678b4fcd8fa0bb2), [`7f78585`](https://github.com/mastra-ai/mastra/commit/7f785857e401570e2ffb316911f126ed363aa537), [`33374ba`](https://github.com/mastra-ai/mastra/commit/33374ba359e4fb13eaa918ae925fe167a3c55414), [`940bf5c`](https://github.com/mastra-ai/mastra/commit/940bf5ccf04f2c9ebd8a1390431733222a03b1cd), [`566e080`](https://github.com/mastra-ai/mastra/commit/566e080ac4296ef2ba84a99c496a1c19706fa2df), [`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`58c43d3`](https://github.com/mastra-ai/mastra/commit/58c43d3f7cb2eeaeb8ac733ae71dde822348e588), [`ef6e295`](https://github.com/mastra-ai/mastra/commit/ef6e295b59bc25a5b61b633a89c97bcfce9fb465), [`208e1b3`](https://github.com/mastra-ai/mastra/commit/208e1b39f30f4b386e494394e9d71d96f0f90241), [`c938d34`](https://github.com/mastra-ai/mastra/commit/c938d34739936c8ecbabd67ad6a4a4396f41c4c6), [`88ddc7c`](https://github.com/mastra-ai/mastra/commit/88ddc7ce01d40175f13a3228b789a906779680bd), [`f2a4afd`](https://github.com/mastra-ai/mastra/commit/f2a4afd7e37e809669001ed17724b341a5c1f45e), [`d438148`](https://github.com/mastra-ai/mastra/commit/d438148e222c1e2fb3c652725ce75680962ebec4), [`ba05fe0`](https://github.com/mastra-ai/mastra/commit/ba05fe0738f70cb686777546e968237d09269142), [`40d358e`](https://github.com/mastra-ai/mastra/commit/40d358e29d55543803e64b49241122f598ffabc7), [`d26a8d4`](https://github.com/mastra-ai/mastra/commit/d26a8d4281f28414715b333c85bedaf70d0b2890), [`e80cd7e`](https://github.com/mastra-ai/mastra/commit/e80cd7e7683e7d732e1cc6784bcac1d2640d2ce3), [`ccbbcd9`](https://github.com/mastra-ai/mastra/commit/ccbbcd974eedff4367a54ed0e24c9ee742ab2f61), [`1d9a0ea`](https://github.com/mastra-ai/mastra/commit/1d9a0ea4a9901baee6cd56737243bd6d1f631ac0), [`677cdc6`](https://github.com/mastra-ai/mastra/commit/677cdc6af564dec29a13464d12b7ab2a4efc22e9), [`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`a7dd322`](https://github.com/mastra-ai/mastra/commit/a7dd32247d95afc539f483ca37f4594af0387f59), [`3f5c6f7`](https://github.com/mastra-ai/mastra/commit/3f5c6f728ea35da344248de9aa070f12849f3aa0), [`a318490`](https://github.com/mastra-ai/mastra/commit/a318490e17da32f338d50929c770d901a9b3dd72), [`b860493`](https://github.com/mastra-ai/mastra/commit/b86049391100e665d579f700c8a2034c036defc3), [`d4be8c1`](https://github.com/mastra-ai/mastra/commit/d4be8c1739d22d621e3f78790e1dd5eb5ecc3589), [`a5d2eb1`](https://github.com/mastra-ai/mastra/commit/a5d2eb10347eade1ae2816d88f466c25186c54a5), [`3667679`](https://github.com/mastra-ai/mastra/commit/3667679db057edfb086846d13369fdda4902ad65), [`49696e8`](https://github.com/mastra-ai/mastra/commit/49696e8e42f870674a0a58f5abcd22cc54dd2864), [`2ef2f23`](https://github.com/mastra-ai/mastra/commit/2ef2f230a7aed342e7dc3b2000cd42e4c43e08a7), [`763e0c6`](https://github.com/mastra-ai/mastra/commit/763e0c61e04d76ad9a9efd301aa57525ca0cbea9), [`298aafd`](https://github.com/mastra-ai/mastra/commit/298aafd70d7fea6517b6e2a4b55f3ef9e824d96b), [`20504b2`](https://github.com/mastra-ai/mastra/commit/20504b2ecebd0e077acda3d457ab57480a98ed3e), [`77e6b1b`](https://github.com/mastra-ai/mastra/commit/77e6b1bc4c46ce94fe501023fb4393c812ec6be3), [`c5f964d`](https://github.com/mastra-ai/mastra/commit/c5f964d3f77064e978f8066ec506eed77ba5c63c), [`23e0be2`](https://github.com/mastra-ai/mastra/commit/23e0be261381e49534b4ff3101c60ee64a946cbf), [`7fc8806`](https://github.com/mastra-ai/mastra/commit/7fc880627d3cbf995d31ea0e8b807bf15417e651), [`0e02eac`](https://github.com/mastra-ai/mastra/commit/0e02eacdb2e30e1697a41910b41163742a181dc1), [`4df174c`](https://github.com/mastra-ai/mastra/commit/4df174c32bddf093a82f273070b8380aef7c9e90), [`f7c25b5`](https://github.com/mastra-ai/mastra/commit/f7c25b5106ddfb48e591f98df7a51e0f2dd01dba), [`7aad631`](https://github.com/mastra-ai/mastra/commit/7aad631b43bc10db77d5b8c66b200d7a49d18bf2), [`512100a`](https://github.com/mastra-ai/mastra/commit/512100a7d8b7e9c920f2590c6b3612f5de0d3cff), [`e81744c`](https://github.com/mastra-ai/mastra/commit/e81744cd13c46619c142dc521dc0baac47607a84), [`f8f653f`](https://github.com/mastra-ai/mastra/commit/f8f653f10980d01a73706cc3c8689ca5e40ce808), [`dc09cc1`](https://github.com/mastra-ai/mastra/commit/dc09cc1083d861cde192c1cd235324dc75b8c731), [`9ef432b`](https://github.com/mastra-ai/mastra/commit/9ef432b6faa534b57b0d182a610e13dd9a7123ff), [`36b4649`](https://github.com/mastra-ai/mastra/commit/36b4649045a3a380cbab8ceca866db4086223aff), [`b9cf308`](https://github.com/mastra-ai/mastra/commit/b9cf30846f97f99ac1906ee8a68f4f2d117b0378), [`2e1d098`](https://github.com/mastra-ai/mastra/commit/2e1d0984e325fd319d32ea182f596b3170be3847), [`377eb81`](https://github.com/mastra-ai/mastra/commit/377eb81ce43b964e3a6b541df172da74a8ff3716), [`1794a79`](https://github.com/mastra-ai/mastra/commit/1794a79178c418004a7261b1ad9114066f7ef01d), [`0cdc5dc`](https://github.com/mastra-ai/mastra/commit/0cdc5dc69024957815da4f51acc4119eb4f447d7), [`5740ec6`](https://github.com/mastra-ai/mastra/commit/5740ec60c760ffdfbfaa59d603d03b847c864e05)]:
|
|
321
|
+
- @mastra/core@1.60.0
|
|
322
|
+
- @mastra/code-sdk@1.3.0
|
|
323
|
+
- @mastra/auth-studio@1.3.4
|
|
324
|
+
|
|
325
|
+
## 0.8.0-alpha.16
|
|
326
|
+
|
|
327
|
+
### Minor Changes
|
|
328
|
+
|
|
329
|
+
- Made Factory session workspace resolution lazy. Resolving a session now returns the workspace immediately with a lazy sandbox handle; sandbox provisioning, repository materialization, branch checkout, and setup run in the background at session start (or on the first filesystem/sandbox operation) instead of blocking agent start. Storage reads during resolution are parallelized, failed background materializations are retried on the next use, and metadata-only resolutions such as thread-list polling never trigger sandbox work. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
330
|
+
|
|
331
|
+
- Sped up new Factory agent sessions with warm repo base checkpoints. When a repository is connected, Factory now builds a base sandbox checkpoint (clone plus setup command) in the background, rebuilds it when pull requests merge to the default branch or pushes land there, and keeps it fresh via the periodic reconcile sweep. New sessions boot from the base checkpoint and skip the full clone and setup, falling back to the previous cold path when no checkpoint is available. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
332
|
+
|
|
333
|
+
### Patch Changes
|
|
334
|
+
|
|
335
|
+
- Factory sessions can start before their sandbox is ready: resolving a session returns its workspace immediately, and background checkpoint-build failures now show up in logs instead of disappearing. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
336
|
+
|
|
337
|
+
- Stop a running local Factory session from wedging when its checkout directory disappears. A tool spawned into a removed directory fails with `spawn /bin/sh ENOENT` — an error that names the shell rather than the sandbox — so it was never recognized as a dead sandbox, and every later filesystem or command tool (including GitHub token refresh) failed the same way for the rest of the run. A missing working directory is now treated as the local equivalent of a destroyed sandbox: if the session is still live, the revival ladder rebuilds the checkout and retries the command; if the session was retired (retirement deletes the checkout on purpose), the run fails fast with a clear retirement error instead of resurrecting the retired checkout — before provisioning anything, so a retired session never consumes a sandbox or fleet budget slot, and a sandbox already mid-build when retirement lands is torn down rather than left bound to a dead session. A missing _command_ reports the same ENOENT code, so the working directory is probed to tell the two apart and healthy sandboxes are never rebuilt for an unknown command. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
338
|
+
|
|
339
|
+
- Factory sessions now revive a sandbox that dies mid-session instead of erroring the turn. When a command fails with a destroyed-sandbox error (for example after idle garbage collection), or with an exec-transport error whose connection never opened (so the command provably never started), the session drops the dead handle, re-runs the provisioning pipeline (reattach, checkpoint-seeded provision, or fresh clone), and retries the command once. Transport errors where the command may have already run are surfaced instead of replayed, so side effects like `git commit` cannot execute twice. Concurrent failures coalesce onto a single revival. ([#21803](https://github.com/mastra-ai/mastra/pull/21803))
|
|
340
|
+
|
|
341
|
+
- Updated dependencies [[`58c43d3`](https://github.com/mastra-ai/mastra/commit/58c43d3f7cb2eeaeb8ac733ae71dde822348e588)]:
|
|
342
|
+
- @mastra/core@1.60.0-alpha.14
|
|
343
|
+
- @mastra/code-sdk@1.3.0-alpha.14
|
|
344
|
+
|
|
345
|
+
## 0.8.0-alpha.15
|
|
346
|
+
|
|
347
|
+
### Patch Changes
|
|
348
|
+
|
|
349
|
+
- Fixed model packs so each user can set a default for new interactive Factory chats while preserving thread-specific pack and model choices, refreshing edited packs, and leaving Factory work runs unaffected. ([#21762](https://github.com/mastra-ai/mastra/pull/21762))
|
|
350
|
+
|
|
351
|
+
## 0.8.0-alpha.14
|
|
352
|
+
|
|
353
|
+
### Minor Changes
|
|
354
|
+
|
|
355
|
+
- Added foundational support for an upcoming experimental memory capability across storage, runtime, and developer tooling. ([#19538](https://github.com/mastra-ai/mastra/pull/19538))
|
|
356
|
+
|
|
357
|
+
### Patch Changes
|
|
358
|
+
|
|
359
|
+
- Resume a skill run that was aborted out from under it. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
360
|
+
|
|
361
|
+
An aborted run was recorded as a terminal failure on the assumption that an
|
|
362
|
+
abort is deliberate. In practice the dominant cause is the process going away
|
|
363
|
+
underneath the run — an operator restarting the server — and the run stream does
|
|
364
|
+
not say which happened. Cards were dead-ending at attempt 1 with nothing on the
|
|
365
|
+
board to press, needing a human to nudge each one by hand after every restart.
|
|
366
|
+
|
|
367
|
+
Aborted runs are now retried like any other interrupted work, still bounded by
|
|
368
|
+
the existing attempt cap.
|
|
369
|
+
|
|
370
|
+
- Stop Factory from waking itself on its own GitHub comments. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
371
|
+
|
|
372
|
+
Factory recognised its own writes by comparing the event sender against
|
|
373
|
+
`GITHUB_APP_SLUG`. That variable names the deployment's own self-hosted GitHub
|
|
374
|
+
App, which is a different App than the one a Platform deployment posts as — and
|
|
375
|
+
on such a deployment it is legitimately unset, so the check compared against
|
|
376
|
+
`undefined[bot]` and never matched. Every self-loop guard silently failed open.
|
|
377
|
+
|
|
378
|
+
The visible result: triage published its handoff comment, that comment came back
|
|
379
|
+
through ingress, re-invoked triage, and cancelled the run that had written it —
|
|
380
|
+
leaving the public verdict stuck at "Pending" while both runs reported success.
|
|
381
|
+
|
|
382
|
+
The Platform integration now names the App it actually posts as, overridable
|
|
383
|
+
with `MASTRA_PLATFORM_GITHUB_APP_SLUG`, and identity resolution is centralised so
|
|
384
|
+
an unresolved identity is reported as _unknown_ rather than collapsing into
|
|
385
|
+
"not Factory".
|
|
386
|
+
|
|
387
|
+
- Let a Factory run finish its stage when the previous role handed off in the same ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
388
|
+
session.
|
|
389
|
+
|
|
390
|
+
`factory_transition_work_item` re-checked its authority at execution time by
|
|
391
|
+
comparing the live run binding against the binding row that existed when the
|
|
392
|
+
tool was built, requiring the same row id. But handing the next role its turn in
|
|
393
|
+
an existing session legitimately rotates that row: the previous role's binding is
|
|
394
|
+
revoked and a new one is issued for the same session and the same work item.
|
|
395
|
+
Tools built for the earlier role stay live across that rotation, so they were
|
|
396
|
+
keyed to a row that the handoff itself had just replaced.
|
|
397
|
+
|
|
398
|
+
The visible result: planning produced a complete plan, called its terminal
|
|
399
|
+
transition to `execute`, and was refused with "Factory agent binding is
|
|
400
|
+
unavailable, revoked, or no longer matches this session." The item stopped in
|
|
401
|
+
Planning with the plan written but never advanced, and the decision that carried
|
|
402
|
+
it reported success. Every leg that continues an item in an existing session —
|
|
403
|
+
planning after triage, and the review-feedback wakes — failed the same way.
|
|
404
|
+
|
|
405
|
+
Authority is now the work item the session is bound to rather than the
|
|
406
|
+
individual binding row, so a rotation no longer strands the run it exists to
|
|
407
|
+
start. Re-pointing a session at a _different_ work item is still refused.
|
|
408
|
+
|
|
409
|
+
- Start the implementation run when a work item enters Building. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
410
|
+
|
|
411
|
+
Building was the one stage on the Work board with no entry rule, so an item
|
|
412
|
+
arriving there stopped: the plan was approved and nothing picked it up until
|
|
413
|
+
somebody pressed Build by hand. Every other stage advances itself, which made
|
|
414
|
+
Building the single manual step in an otherwise continuous path from intake to
|
|
415
|
+
review.
|
|
416
|
+
|
|
417
|
+
The run it starts carries a prompt rather than activating a skill. Skills exist
|
|
418
|
+
here to define a handoff — a terminal message later rules match on to decide
|
|
419
|
+
what happens next — and Building already has one: it ends by opening a pull
|
|
420
|
+
request, which arrives as its own event and raises the Review card. Rules could
|
|
421
|
+
previously only express "invoke this skill", so the decision vocabulary now
|
|
422
|
+
accepts a prompt as the alternative to a skill name.
|
|
423
|
+
|
|
424
|
+
- Credit the reporter as a co-author on work their issue caused ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
425
|
+
|
|
426
|
+
When Factory builds a fix for a GitHub issue, the build prompt now asks for a
|
|
427
|
+
`Co-Authored-By` trailer naming the person who reported it, so the reporter shows
|
|
428
|
+
up as a contributor on the pull request rather than only in the issue thread.
|
|
429
|
+
|
|
430
|
+
Only GitHub issues qualify. A Linear card stamps a display name and a manual card
|
|
431
|
+
stamps nothing, and neither resolves to the GitHub account a trailer needs, so
|
|
432
|
+
those are left uncredited rather than credited to nobody. Issues Factory filed
|
|
433
|
+
itself are skipped.
|
|
434
|
+
|
|
435
|
+
Intake already stamped the reporter's login but the stage rules could not see it;
|
|
436
|
+
the intake-stamped metadata now reaches rules that run on a stage.
|
|
437
|
+
|
|
438
|
+
- Stop reporting a skill kickoff as successful when it was queued onto a run that was already ending. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
439
|
+
|
|
440
|
+
Signals sent into an active session settle as `deliver`, which acknowledges routing but promises nothing about execution. If the in-flight run finished before draining its queue, the prompt was dropped: no turn started, no error surfaced, and the decision was marked succeeded while the work item sat in its new stage with nobody working on it. The dispatcher now confirms the signal actually landed in the thread and retries the decision when it did not, so the next attempt finds the session idle and takes the instrumented wake path.
|
|
441
|
+
|
|
442
|
+
- Dismiss runs still parked on a work item when it reaches a terminal stage. A merged or closed pull request cannot answer a suggested run, so the card no longer keeps asking. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
443
|
+
|
|
444
|
+
- Check who sent a GitHub comment or review before letting it wake an agent, and ingest default-branch `push` events. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
445
|
+
|
|
446
|
+
The sender gate listed event kinds under names the webhook classifier never produces, so the identity check that keeps untrusted commenters from waking Factory agents was skipped for every comment and review event. The gate now names the kinds the classifier actually emits. Separately, `push` events were dropped by the event filter before ingestion; they are now ingested and forwarded to Factory's event pipeline so downstream consumers (such as the upcoming warm base-checkpoint refresh) can observe default-branch pushes.
|
|
447
|
+
|
|
448
|
+
- Ingest `pull_request.opened` from the Platform event poller so a newly opened pull request mints its Review card. The poller forwards an allow-list of events to the rules engine, and `opened` was missing from it — so on deployments without a direct webhook (the only path a local deployment has), a pull request the factory authored itself was never reviewed. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
449
|
+
|
|
450
|
+
- Keep kickoff skill resolution off the sandbox so clicking Review on a board card no longer blocks on full sandbox provisioning. Project skill roots (`.claude/skills`, `.agents/skills`, `<configDir>/skills`) are guarded while the session sandbox is unmaterialized — discovery reports them empty instead of forcing materialization — and a skills rescan fires automatically once materialization completes so repo-local skills become visible. Bundled Factory skills (e.g. factory-review) resolve from local disk in milliseconds. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
451
|
+
|
|
452
|
+
- Stop the GitHub event worker from crashing when it is constructed before source-control storage is initialized. ([#21801](https://github.com/mastra-ai/mastra/pull/21801))
|
|
453
|
+
|
|
454
|
+
`workers()` dereferenced the integration's source-control storage eagerly while building the reconcile worker, but that storage is only attached later by `versionControl.initialize`. A deployment that constructs workers first crashed with "source-control storage has not been initialized". The worker now receives a lazy handle that resolves the storage slices at call time, once the worker is actually running.
|
|
455
|
+
|
|
456
|
+
- Deliver GitHub review feedback to the factory rules on the polling path. Submitted reviews and new pull request comments were dropped before the rules engine ran, so the agent that authored a branch was never woken when a reviewer asked for changes. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
457
|
+
|
|
458
|
+
- Route pull request comments to the agent that authored the pull request, and stop provenance from branding commenters as Factory. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
459
|
+
|
|
460
|
+
Comments on a PR arrive as `issue_comment` with `issue.pull_request` set, and the ingress explicitly dropped them. That closed the most common feedback path of all: on a Factory-authored PR, GitHub refuses a formal `--approve`/`--request-changes` verdict from the account that opened it, so the review skill falls back to `gh pr comment` — which was discarded. External review bots leaving plain comments were dropped for the same reason.
|
|
461
|
+
|
|
462
|
+
A new `pullRequestCommentCreated` rule event now carries those comments, reading the pull request from the `issue` payload so provenance binds the comment to the authoring Work item rather than mistaking the number for an issue's. The default rule sends a high-priority `sendMessage` to the `work` role, which wakes an idle session. Factory's own comments are ignored, because `factoryAuthored` cannot distinguish the Work role from the Review role and reacting to them would let an agent wake itself in a loop.
|
|
463
|
+
|
|
464
|
+
Separately, `factoryAuthored` was derived from PR provenance for every event, which proves the _pull request_ came from Factory, not the sender of the event. Any human or review bot commenting on a Factory-authored PR was therefore marked as Factory. Provenance-based attribution is now skipped for events whose sender is responding to the PR — comments, submitted reviews, and re-requested reviews — where only the app login identifies Factory.
|
|
465
|
+
|
|
466
|
+
- Wait for the run that swallowed a kickoff, instead of racing it. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
467
|
+
|
|
468
|
+
A signal queued onto an already-running turn can be dropped when that turn ends
|
|
469
|
+
before draining its queue. That case was detected correctly and then handed to
|
|
470
|
+
the generic exponential backoff, which spends all five attempts inside about
|
|
471
|
+
thirty seconds — while the run it is waiting on takes minutes. Every attempt
|
|
472
|
+
landed on the same busy session and the card gave up roughly ten times too early.
|
|
473
|
+
|
|
474
|
+
The dispatcher now waits for the in-flight run to end and redelivers into the
|
|
475
|
+
freed session, which is the event that actually resolves the condition. The
|
|
476
|
+
decision settles within its original lease without spending the retry budget, and
|
|
477
|
+
a redelivery that is dropped again still goes back on the queue.
|
|
478
|
+
|
|
479
|
+
- Only credit reporters who are real GitHub accounts ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
480
|
+
|
|
481
|
+
The issue poller stamps a placeholder login when GitHub returns no author, which
|
|
482
|
+
would have become a `Co-Authored-By` trailer crediting an account nobody owns.
|
|
483
|
+
Reporter credit now requires a login that matches GitHub's grammar.
|
|
484
|
+
|
|
485
|
+
- Re-review a pull request when a push lands while its card is still in Reviewing. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
486
|
+
|
|
487
|
+
A push to a card already sitting in Reviewing was dropped rather than deferred:
|
|
488
|
+
the rule returned nothing, and once the in-flight pass finished it transitioned
|
|
489
|
+
to Done having reviewed code that was no longer current, with no record that
|
|
490
|
+
newer commits had arrived. That is the exact ordering the review loop produces —
|
|
491
|
+
a review asks for changes, the authoring agent pushes a fix, and the fix lands
|
|
492
|
+
before the card finishes leaving Reviewing.
|
|
493
|
+
|
|
494
|
+
Only Intake now suppresses the re-review. A push during Reviewing re-enters the
|
|
495
|
+
stage, which supersedes the stale pass: the stage rule already cancels the run
|
|
496
|
+
in flight and selects the right skill for the entry it sees.
|
|
497
|
+
|
|
498
|
+
Transition decisions carry a `reenter` flag for this, since a transition to the
|
|
499
|
+
stage an item already holds is otherwise inert — the common case is a board
|
|
500
|
+
being corrected into a state it already has, not work that needs restarting.
|
|
501
|
+
|
|
502
|
+
- Credit the author on review follow-up pull requests ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
503
|
+
|
|
504
|
+
When a review pass ships mechanical fixes as a follow-up pull request, those
|
|
505
|
+
commits now carry a `Co-Authored-By` trailer for the human whose work they build
|
|
506
|
+
on — the reviewed pull request's author, or, when that author is a bot, the
|
|
507
|
+
reporter of the issue the pull request closes.
|
|
508
|
+
|
|
509
|
+
- Carry pull request review feedback back to the agent that wrote the code. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
510
|
+
|
|
511
|
+
A `changes_requested` review is meant to wake the authoring work session, but
|
|
512
|
+
when the pull request carried no provenance the event resolved to the pull
|
|
513
|
+
request's own Review card. `addressReviewFeedback` deliberately refuses to act
|
|
514
|
+
on the review board — a Review card reacting to its own posted review would loop
|
|
515
|
+
the reviewer against itself — so the wake was dropped and the author never heard
|
|
516
|
+
about the feedback.
|
|
517
|
+
|
|
518
|
+
Review and pull request comment events now follow the linked card's
|
|
519
|
+
`parentWorkItemId` back to the item that authored the pull request, so the
|
|
520
|
+
existing guard becomes true for the right item instead of never. A pull request
|
|
521
|
+
card with no authoring item still emits nothing.
|
|
522
|
+
|
|
523
|
+
- Close the work/review loop: a review that requests changes now wakes the agent that authored the pull request. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
524
|
+
|
|
525
|
+
`pull_request_review` webhooks were accepted and classified urgent, but no matching rule event existed, so the delivery was dropped after classification and the authoring agent was never told. PR subscriptions did not cover this — they sync PR activity into a thread's notification inbox for the agent to read on its _next_ turn, but nothing starts that turn.
|
|
526
|
+
|
|
527
|
+
A new `pullRequestReviewSubmitted` rule event maps `pull_request_review`/`submitted`, and the default rule sends a high-priority `sendMessage` to the `work` role, which wakes an idle session. Only `changes_requested` fires; `approved` and `commented` stay quiet, and the Review card that posted the review never reacts to its own output.
|
|
528
|
+
|
|
529
|
+
- Send Factory's own pull requests straight to Review. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
530
|
+
|
|
531
|
+
A pull request entered Review only when its author passed a repository-collaborator
|
|
532
|
+
permission check. A GitHub App bot is never a collaborator, so every pull request
|
|
533
|
+
Factory opened itself scored as untrusted and parked in Intake, waiting on a human
|
|
534
|
+
click — the exact opposite of the intent, since those are the pull requests whose
|
|
535
|
+
provenance Factory knows best.
|
|
536
|
+
|
|
537
|
+
Factory authorship is now its own trust signal for pull requests: the branch came
|
|
538
|
+
from a Work run this Factory dispatched. Issues are deliberately unchanged, because
|
|
539
|
+
auto-triaging an issue Factory opened is a self-loop with no upside.
|
|
540
|
+
|
|
541
|
+
- Report what actually happened to a Factory run. A human dragging a card on the board now arms the item, so the run it asks for starts instead of parking for approval, and a run that dies mid-flight — a provider error, or a cancellation by the next decision — is recorded as failed on the decision instead of reported as a success. ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
542
|
+
|
|
543
|
+
- Retire a parked proposal when the run it asked for starts anyway. Approving a ([#21802](https://github.com/mastra-ai/mastra/pull/21802))
|
|
544
|
+
proposal mints a fresh decision rather than dispatching the parked one, so the
|
|
545
|
+
original stayed `proposed` forever and the card kept asking to start a run that
|
|
546
|
+
had already finished. The dispatcher now dismisses proposals for the same work
|
|
547
|
+
item and role as any `invokeSkill` it dispatches, so the waiting badge only ever
|
|
548
|
+
marks a loop that is genuinely stopped.
|
|
549
|
+
|
|
550
|
+
- Deliver GitHub pull request signals to the session that actually owns the subscribed thread, and skip subscriptions whose thread this deployment does not hold. ([#21800](https://github.com/mastra-ai/mastra/pull/21800))
|
|
551
|
+
|
|
552
|
+
A subscription records the Factory project as its resource, but an unscoped session registers under its own id, so delivery looked for the thread under a resource that did not own it and failed with "Thread not found" on every matching event. Delivery now reads the thread from storage to find its owning resource. A subscription naming a thread that is absent is skipped rather than failed, so a pull request's events reaching a deployment that never owned the thread no longer fabricate a session or retry in a loop.
|
|
553
|
+
|
|
554
|
+
- Fixed restarting a review after deleting its thread. It no longer fails with "git clone failed: a branch named ... already exists". Reused Platform sandboxes now delete the previous session's local branches when they are recycled. A new session for the same branch starts fresh from the base branch. Branch checkout also recovers from leftover or broken branch refs instead of failing the workspace. ([#21268](https://github.com/mastra-ai/mastra/pull/21268))
|
|
555
|
+
|
|
556
|
+
- Updated dependencies [[`566e080`](https://github.com/mastra-ai/mastra/commit/566e080ac4296ef2ba84a99c496a1c19706fa2df), [`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`c549e2f`](https://github.com/mastra-ai/mastra/commit/c549e2f40edc1cac5d9e74e82f90da22b48df084), [`2ef2f23`](https://github.com/mastra-ai/mastra/commit/2ef2f230a7aed342e7dc3b2000cd42e4c43e08a7), [`5740ec6`](https://github.com/mastra-ai/mastra/commit/5740ec60c760ffdfbfaa59d603d03b847c864e05)]:
|
|
557
|
+
- @mastra/code-sdk@1.3.0-alpha.13
|
|
558
|
+
- @mastra/core@1.60.0-alpha.13
|
|
559
|
+
|
|
560
|
+
## 0.8.0-alpha.13
|
|
561
|
+
|
|
562
|
+
### Minor Changes
|
|
563
|
+
|
|
564
|
+
- Added org-visible Factory sessions: sessions store a visibility property derived from origin, org members can open org-visible sessions, and factory-ui shows session owners and access errors. ([#21460](https://github.com/mastra-ai/mastra/pull/21460))
|
|
565
|
+
|
|
566
|
+
### Patch Changes
|
|
567
|
+
|
|
568
|
+
- Prevent Factory handoff files from colliding across work items ([#21763](https://github.com/mastra-ai/mastra/pull/21763))
|
|
569
|
+
|
|
570
|
+
- Fixed workspace failures vanishing from the chat transcript. A workspace that failed to clone or start only flipped an internal flag that nothing rendered, so the session simply looked stuck with no reason given. The failure now appears as an error notice in the transcript — the same message the terminal already printed — for both the `workspace_error` and the failing `workspace_status_changed` event. ([#21746](https://github.com/mastra-ai/mastra/pull/21746))
|
|
571
|
+
|
|
572
|
+
- Make the board honest about runs it is waiting on, and about clicks that fail. ([#21766](https://github.com/mastra-ai/mastra/pull/21766))
|
|
573
|
+
|
|
574
|
+
Four gaps closed on the work board:
|
|
575
|
+
|
|
576
|
+
- A card click that failed while refreshing workspaces before starting a run did
|
|
577
|
+
nothing at all — no run, no error. It now surfaces the failure instead of
|
|
578
|
+
swallowing it, so an expired session reads as an expired session.
|
|
579
|
+
- A run a rule proposed could not be approved from the card. The card menu now
|
|
580
|
+
offers it.
|
|
581
|
+
- After a plan was approved, the Building run became unreachable from the card,
|
|
582
|
+
leaving the item stranded mid-loop.
|
|
583
|
+
- A card with a proposed run looked idle. It now says it is waiting on someone,
|
|
584
|
+
with the approval inline.
|
|
585
|
+
|
|
586
|
+
- Stop showing "Linked card could not be filed" when nothing failed. ([#21766](https://github.com/mastra-ai/mastra/pull/21766))
|
|
587
|
+
|
|
588
|
+
A linked-card decision that already succeeded is deliberately reset to `retry`
|
|
589
|
+
when its card is rematerialized, so the card gets re-filed. The board read any
|
|
590
|
+
`retry` as "already failed at least once" and put an error on the card, so a
|
|
591
|
+
routine replay looked like a broken automation — 16 cards were showing a failure
|
|
592
|
+
nobody caused.
|
|
593
|
+
|
|
594
|
+
A card now reports an error only when the effect has actually been attempted or
|
|
595
|
+
left an error behind. A replay reads as what it is: the work it is doing.
|
|
596
|
+
|
|
597
|
+
- Platform GitHub event polling is now scoped to the repositories linked to a Factory project. Previously the worker polled every repository the underlying GitHub App installation exposed, which for customers who grant broad org access meant hundreds of unnecessary requests per polling cycle. With this change, no polling happens for repositories that are not linked to a project, and repositories added or removed from a project are picked up automatically on the next polling cycle — no worker restart or additional configuration required. ([#21772](https://github.com/mastra-ai/mastra/pull/21772))
|
|
598
|
+
|
|
599
|
+
- Updated dependencies [[`6db7a5d`](https://github.com/mastra-ai/mastra/commit/6db7a5dd3dd2b6f7ef75dcd804fcffef5fa83963), [`0cdc5dc`](https://github.com/mastra-ai/mastra/commit/0cdc5dc69024957815da4f51acc4119eb4f447d7)]:
|
|
600
|
+
- @mastra/core@1.60.0-alpha.12
|
|
601
|
+
- @mastra/code-sdk@1.3.0-alpha.12
|
|
602
|
+
|
|
603
|
+
## 0.8.0-alpha.12
|
|
604
|
+
|
|
605
|
+
### Patch Changes
|
|
606
|
+
|
|
607
|
+
- Speed up the local dev watch for the design system: `pnpm dev:ui` now rebuilds `@mastra/playground-ui` on save, so design-system edits show up in the Factory UI without a manual rebuild. `pnpm dev:playground` picks up the same watch. The watch starts from a full build and then skips type declaration emit on every rebuild, which brings each save from ~9s down to ~1.5s. ([#21646](https://github.com/mastra-ai/mastra/pull/21646))
|
|
608
|
+
|
|
609
|
+
Declarations stay frozen at that starting build for the length of a dev session — run `pnpm --filter @mastra/playground-ui build` after changing a component's props. The published build is unchanged and still emits declarations.
|
|
610
|
+
|
|
611
|
+
- Fixed how the Factory chat transcript reads agent controller events. It branched on an `om_activation.enabled` flag the controller never sends, and cast token usage and memory progress into hand-written shapes that had drifted from the streamed payloads. Both now read the shapes the controller actually emits, so the status line and memory rings stay correct as those payloads evolve. ([#21739](https://github.com/mastra-ai/mastra/pull/21739))
|
|
612
|
+
|
|
613
|
+
- Updated dependencies [[`6223446`](https://github.com/mastra-ai/mastra/commit/6223446ddce6166e96e0ba5e00d628b615dee8ca), [`583e235`](https://github.com/mastra-ai/mastra/commit/583e23519c13af16c1746f9c49722d011216611b), [`a77f8d4`](https://github.com/mastra-ai/mastra/commit/a77f8d4740d2178a74c41e4bf678b4fcd8fa0bb2), [`40d358e`](https://github.com/mastra-ai/mastra/commit/40d358e29d55543803e64b49241122f598ffabc7), [`e80cd7e`](https://github.com/mastra-ai/mastra/commit/e80cd7e7683e7d732e1cc6784bcac1d2640d2ce3), [`20504b2`](https://github.com/mastra-ai/mastra/commit/20504b2ecebd0e077acda3d457ab57480a98ed3e)]:
|
|
614
|
+
- @mastra/core@1.60.0-alpha.11
|
|
615
|
+
- @mastra/code-sdk@1.3.0-alpha.11
|
|
616
|
+
|
|
617
|
+
## 0.8.0-alpha.11
|
|
618
|
+
|
|
619
|
+
### Patch Changes
|
|
620
|
+
|
|
621
|
+
- Updated dependencies [[`b860493`](https://github.com/mastra-ai/mastra/commit/b86049391100e665d579f700c8a2034c036defc3)]:
|
|
622
|
+
- @mastra/core@1.60.0-alpha.10
|
|
623
|
+
- @mastra/code-sdk@1.3.0-alpha.10
|
|
624
|
+
|
|
625
|
+
## 0.8.0-alpha.10
|
|
626
|
+
|
|
627
|
+
### Patch Changes
|
|
628
|
+
|
|
629
|
+
- Updated dependencies [[`b0a2a07`](https://github.com/mastra-ai/mastra/commit/b0a2a07800d42bd9823292e7db832374ed084c9c), [`ccbbcd9`](https://github.com/mastra-ai/mastra/commit/ccbbcd974eedff4367a54ed0e24c9ee742ab2f61), [`3f5c6f7`](https://github.com/mastra-ai/mastra/commit/3f5c6f728ea35da344248de9aa070f12849f3aa0), [`77e6b1b`](https://github.com/mastra-ai/mastra/commit/77e6b1bc4c46ce94fe501023fb4393c812ec6be3), [`2e1d098`](https://github.com/mastra-ai/mastra/commit/2e1d0984e325fd319d32ea182f596b3170be3847)]:
|
|
630
|
+
- @mastra/core@1.60.0-alpha.9
|
|
631
|
+
- @mastra/code-sdk@1.3.0-alpha.9
|
|
632
|
+
|
|
3
633
|
## 0.8.0-alpha.9
|
|
4
634
|
|
|
5
635
|
### Minor Changes
|