@mastra/factory 0.10.0-alpha.8 → 0.10.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 +235 -0
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +1 -0
- package/dist/auth.js.map +1 -1
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +1 -0
- package/dist/factory.js.map +1 -1
- package/dist/integrations/base.d.ts +3 -1
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/integration.d.ts +14 -0
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +47 -1
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/routes.d.ts +5 -1
- package/dist/integrations/github/routes.d.ts.map +1 -1
- package/dist/integrations/github/routes.js +155 -3
- package/dist/integrations/github/routes.js.map +1 -1
- package/dist/integrations/github/session-subscriptions.d.ts +9 -0
- package/dist/integrations/github/session-subscriptions.d.ts.map +1 -1
- package/dist/integrations/github/session-subscriptions.js +39 -1
- package/dist/integrations/github/session-subscriptions.js.map +1 -1
- package/dist/integrations/linear/routes.d.ts.map +1 -1
- package/dist/integrations/linear/routes.js +50 -0
- package/dist/integrations/linear/routes.js.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts +3 -1
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +32 -0
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/routes/intake.d.ts +5 -0
- package/dist/routes/intake.d.ts.map +1 -1
- package/dist/routes/intake.js +70 -19
- package/dist/routes/intake.js.map +1 -1
- package/dist/routes/surface.d.ts +4 -2
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +1 -0
- package/dist/routes/surface.js.map +1 -1
- package/dist/rules/tools.d.ts.map +1 -1
- package/dist/rules/tools.js +9 -5
- package/dist/rules/tools.js.map +1 -1
- package/dist/rules/transition-service.d.ts +3 -1
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +14 -1
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +4 -1
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js +17 -1
- package/dist/rules/types.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +5 -0
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +17 -1
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/factory-skills/factory-triage/SKILL.md +7 -17
- package/package.json +9 -9
|
@@ -26,7 +26,7 @@ Gauge the people involved: the author's merged-PR/issue counts (`gh pr list --au
|
|
|
26
26
|
|
|
27
27
|
If the issue is vague, do not stop to ask for clarification. Investigate the most plausible reading of it, record that reading as an assumption, and note what extra information from the reporter would firm it up as an open question.
|
|
28
28
|
|
|
29
|
-
At the end of this phase, publish a small summary to the source issue as stated below. For GitHub issues,
|
|
29
|
+
At the end of this phase, publish a small summary to the source issue as stated below. For GitHub issues, call `github_upsert_factory_triage_comment` with the issue number and the marker-prefixed pending summary; it updates Factory’s canonical marked comment or creates it when absent. For Linear issues, publish the pending summary through Linear.
|
|
30
30
|
|
|
31
31
|
```markdown
|
|
32
32
|
<!-- mastra-factory-triage -->
|
|
@@ -134,20 +134,9 @@ For GitHub issues, fetch the current issue body, labels, and full comment thread
|
|
|
134
134
|
|
|
135
135
|
If you write the handoff to disk, use `.artifacts/factory-triage/issue-<number>.md`.
|
|
136
136
|
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
```bash
|
|
140
|
-
export FACTORY_COMMENT_AUTHOR=$(gh api user --jq .login)
|
|
141
|
-
COMMENT_ID=$(gh api --paginate "repos/$OWNER/$REPO/issues/$ISSUE/comments" \
|
|
142
|
-
--jq '.[] | select(.user.login == env.FACTORY_COMMENT_AUTHOR and (.body | contains("<!-- mastra-factory-triage -->"))) | .id' | sort -n | head -n1)
|
|
143
|
-
if [ -n "$COMMENT_ID" ]; then
|
|
144
|
-
gh api --method PATCH "repos/$OWNER/$REPO/issues/comments/$COMMENT_ID" -f body="$COMMENT_BODY"
|
|
145
|
-
else
|
|
146
|
-
gh api --method POST "repos/$OWNER/$REPO/issues/$ISSUE/comments" -f body="$COMMENT_BODY"
|
|
147
|
-
fi
|
|
148
|
-
```
|
|
137
|
+
Publish the handoff only with `github_upsert_factory_triage_comment`, passing the issue number and `COMMENT_BODY`. Set `COMMENT_BODY` to the marker followed by the structured handoff. The tool updates the oldest marked comment authored by Factory, or creates one when no Factory-owned marker remains. Use its returned canonical comment identity to confirm publication.
|
|
149
138
|
|
|
150
|
-
|
|
139
|
+
Never use `gh issue comment`, `gh api user`, a raw comment POST/PATCH, or an `--edit-last` fallback for the Factory triage marker. If the tool reports an error, fix the underlying issue or stop; do not publish an alternate marker comment.
|
|
151
140
|
|
|
152
141
|
After a GitHub comment is posted or updated, reconcile the labels before the terminal transition:
|
|
153
142
|
|
|
@@ -169,13 +158,14 @@ Apply only these label mutations. Do not remove `status: needs approval` merely
|
|
|
169
158
|
|
|
170
159
|
Post the same handoff as your final conversation message. Take the current stage and `expectedRevision` from the `factory-phase` signal.
|
|
171
160
|
|
|
172
|
-
- When the current stage is **Intake** or **Triage**, make the terminal `factory_transition_work_item` call
|
|
173
|
-
-
|
|
161
|
+
- When the current stage is **Intake** or **Triage**, make the terminal `factory_transition_work_item` call with `triageType` set to the exact `Type` from the handoff.
|
|
162
|
+
- Confirmed bugs with `Route: Plan fix` request `stage: "planning"`. Issues that should be closed request `stage: "done"` with the close rationale.
|
|
163
|
+
- Features and every other non-bug classification use `Route: Await approval` and request their current Intake/Triage stage. This records the classification without advancing; stop until a maintainer moves the card or starts the next run from the Factory UI.
|
|
174
164
|
- When the item is already in **Planning** or a later stage, this is a webhook-driven refresh: use `Route: No transition / refresh`, update the source-specific handoff, but do **not** request a stage transition. Report the updated verdict and stop.
|
|
175
165
|
|
|
176
166
|
`rationale` (max 1000 chars) — the triage verdict and headline understanding in a few sentences (e.g. "Genuine regression from <commit>; root cause understood; ready to plan a fix").
|
|
177
167
|
|
|
178
|
-
The transition is governed by the server's rules.
|
|
168
|
+
The transition is governed by the server's rules. An `approval_required` rejection means a maintainer must move the card or start the run from the Factory UI; never retry it toward Planning or Execute. For other initial-stage rejections, read the stated reason, address it (re-check the revision from the latest `factory-phase` signal, adjust the verdict if the rejection contests it), and retry once corrected. Once the transition succeeds, report the verdict and stop.
|
|
179
169
|
|
|
180
170
|
## Behavior Rules
|
|
181
171
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/factory",
|
|
3
|
-
"version": "0.10.0
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Mastra Software Factory module: the server core behind the Mastra Software Factory — storage domains, integrations, and surfaces for agent-powered software delivery",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -51,11 +51,11 @@
|
|
|
51
51
|
"@octokit/rest": "^22.0.1",
|
|
52
52
|
"hono": "^4.12.8",
|
|
53
53
|
"zod": "^4.3.6",
|
|
54
|
-
"@mastra/auth-workos": "1.6.4",
|
|
55
|
-
"@mastra/slack": "1.6.1",
|
|
56
54
|
"@mastra/auth-studio": "1.3.4",
|
|
57
|
-
"@mastra/
|
|
58
|
-
"@mastra/
|
|
55
|
+
"@mastra/core": "1.62.0",
|
|
56
|
+
"@mastra/auth-workos": "1.6.4",
|
|
57
|
+
"@mastra/code-sdk": "1.5.0",
|
|
58
|
+
"@mastra/slack": "1.6.1"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
61
|
"@types/node": "22.20.1",
|
|
@@ -64,10 +64,10 @@
|
|
|
64
64
|
"typescript": "^6.0.3",
|
|
65
65
|
"typescript-eslint": "^8.57.0",
|
|
66
66
|
"vitest": "4.1.10",
|
|
67
|
-
"@
|
|
68
|
-
"@mastra/
|
|
69
|
-
"@internal/
|
|
70
|
-
"@
|
|
67
|
+
"@internal/lint": "0.0.126",
|
|
68
|
+
"@mastra/pg": "1.22.0",
|
|
69
|
+
"@internal/types-builder": "0.0.101",
|
|
70
|
+
"@mastra/libsql": "1.22.0"
|
|
71
71
|
},
|
|
72
72
|
"engines": {
|
|
73
73
|
"node": ">=22.19.0"
|