@mastra/factory 0.13.0-alpha.6 → 0.13.0-alpha.7
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/README.md +35 -0
- package/dist/boards/index.d.ts +4 -3
- package/dist/boards/index.d.ts.map +1 -1
- package/dist/boards/index.js +2 -1
- package/dist/boards/index.js.map +1 -1
- package/dist/boards/registry.d.ts +16 -0
- package/dist/boards/registry.d.ts.map +1 -0
- package/dist/boards/registry.js +27 -0
- package/dist/boards/registry.js.map +1 -0
- package/dist/boards/review.js +1 -1
- package/dist/boards/work.js +2 -2
- package/dist/factory.d.ts +6 -1
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +10 -0
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/integrations/github/default-rules.d.ts +194 -0
- package/dist/integrations/github/default-rules.d.ts.map +1 -0
- package/dist/integrations/github/default-rules.js +230 -0
- package/dist/integrations/github/default-rules.js.map +1 -0
- package/dist/integrations/github/integration.d.ts +4 -0
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +6 -0
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/rules.d.ts +3 -1
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/rules.js +1 -2
- package/dist/integrations/github/rules.js.map +1 -1
- package/dist/integrations/linear/rules.js +1 -1
- package/dist/integrations/platform/github/integration.d.ts +4 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +6 -0
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/slack/slack.d.ts +3 -1
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +19 -1
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/routes/surface.d.ts +3 -0
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +2 -1
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/work-items.d.ts +3 -0
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +48 -15
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/defaults.d.ts.map +1 -1
- package/dist/rules/defaults.js +1 -229
- package/dist/rules/defaults.js.map +1 -1
- package/dist/rules/index.d.ts +2 -2
- package/dist/rules/index.d.ts.map +1 -1
- package/dist/rules/index.js +2 -2
- package/dist/rules/processor.d.ts +2 -0
- package/dist/rules/processor.d.ts.map +1 -1
- package/dist/rules/processor.js +9 -7
- package/dist/rules/processor.js.map +1 -1
- package/dist/rules/resolve.d.ts +4 -4
- package/dist/rules/resolve.d.ts.map +1 -1
- package/dist/rules/resolve.js +4 -6
- package/dist/rules/resolve.js.map +1 -1
- package/dist/rules/transition-service.d.ts +2 -0
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +16 -10
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +3 -8
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js +1 -1
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +1 -9
- package/dist/rules/validation.js.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +11 -1
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +22 -2
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/factory-skills/configure-factory-rules/SKILL.md +12 -4
- package/package.json +6 -6
|
@@ -12,18 +12,26 @@ Help the user change Factory policy in the typed deployment configuration. Facto
|
|
|
12
12
|
1. Search for `new MastraFactory`, `defaultFactoryRules`, and the `rules` property.
|
|
13
13
|
2. Read the existing rule configuration and its tests before editing.
|
|
14
14
|
3. Import rule helpers and types from the same local Factory module used by the deployment.
|
|
15
|
-
4.
|
|
15
|
+
4. For board, tool, or Linear rules, start with `defaultFactoryRules({ version, overrides })` if needed and pass the result to `MastraFactory`. For GitHub rules, configure the installed GitHub integration constructor directly.
|
|
16
16
|
|
|
17
17
|
Do not guess a file path. Factory deployments can assemble `MastraFactory` from different entry points.
|
|
18
18
|
|
|
19
19
|
## Preserve the public shape
|
|
20
20
|
|
|
21
|
-
Use
|
|
21
|
+
Use the global rules tree for board, tool, and Linear handlers:
|
|
22
22
|
|
|
23
23
|
- `work.<stage>.<source>.onEnter` or `onExit`
|
|
24
24
|
- `review.<stage>.<source>.onEnter` or `onExit`
|
|
25
25
|
- `tools.<toolName>.onResult`
|
|
26
|
-
- `
|
|
26
|
+
- `linear.<event>.onEvent`
|
|
27
|
+
|
|
28
|
+
Configure GitHub on the installed `GithubIntegration` or `PlatformGithubIntegration` constructor instead:
|
|
29
|
+
|
|
30
|
+
```typescript
|
|
31
|
+
new PlatformGithubIntegration({ rules: { issueCommentCreated: null } });
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
GitHub integrations exclusively own their event handlers; configure them through constructor `rules[event]`, not the global Factory rules tree. A function replaces the default, `null` disables that event's handler, and omitted or `undefined` values retain defaults. Constructors validate names and handler values, then copy and freeze the effective map per instance. Disabling a handler does not disable webhook authentication or reconciliation bookkeeping.
|
|
27
35
|
|
|
28
36
|
Do not create an `actions` config or execute authoritative policy in React. Each handler returns one typed `FactoryRuleDecision` or `undefined`.
|
|
29
37
|
|
|
@@ -35,7 +43,7 @@ An override replaces the exact handler leaf. It does not compose with the built-
|
|
|
35
43
|
|
|
36
44
|
Before replacing a built-in leaf:
|
|
37
45
|
|
|
38
|
-
1.
|
|
46
|
+
1. Find and read the built-in handler: GitHub handlers live in `src/integrations/github/default-rules.ts` within the Factory package; global defaults live in `src/rules/defaults.ts`.
|
|
39
47
|
2. Decide whether the replacement must preserve part of that behavior explicitly.
|
|
40
48
|
3. Use only fields exposed by the typed context. Do not reach into Factory storage or raw webhook payloads.
|
|
41
49
|
4. Return `undefined` to allow the ingress with no decision, or return a typed rejection or bounded structured decision.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mastra/factory",
|
|
3
|
-
"version": "0.13.0-alpha.
|
|
3
|
+
"version": "0.13.0-alpha.7",
|
|
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": {
|
|
@@ -52,9 +52,9 @@
|
|
|
52
52
|
"zod": "^4.3.6",
|
|
53
53
|
"@mastra/auth-studio": "1.3.5",
|
|
54
54
|
"@mastra/auth-workos": "1.6.5",
|
|
55
|
-
"@mastra/
|
|
56
|
-
"@mastra/
|
|
57
|
-
"@mastra/
|
|
55
|
+
"@mastra/slack": "1.6.3",
|
|
56
|
+
"@mastra/code-sdk": "1.7.0-alpha.6",
|
|
57
|
+
"@mastra/core": "1.65.0-alpha.5"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"@types/node": "22.20.1",
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"typescript": "^6.0.3",
|
|
64
64
|
"typescript-eslint": "^8.57.0",
|
|
65
65
|
"vitest": "4.1.10",
|
|
66
|
-
"@mastra/libsql": "1.22.4-alpha.0",
|
|
67
|
-
"@mastra/pg": "1.23.0-alpha.1",
|
|
68
66
|
"@internal/lint": "0.0.130",
|
|
67
|
+
"@mastra/pg": "1.23.0-alpha.1",
|
|
68
|
+
"@mastra/libsql": "1.22.4-alpha.0",
|
|
69
69
|
"@internal/workspace": "0.0.2",
|
|
70
70
|
"@internal/types-builder": "0.0.105"
|
|
71
71
|
},
|