@mastra/factory 0.25.0-alpha.5 → 0.25.0-alpha.6
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 +3 -1
- package/dist/default-thinking-level.d.ts +3 -0
- package/dist/default-thinking-level.d.ts.map +1 -0
- package/dist/default-thinking-level.js +5 -0
- package/dist/default-thinking-level.js.map +1 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +19 -5
- package/dist/factory.js.map +1 -1
- package/dist/integrations/gitlab/integration.d.ts +4 -0
- package/dist/integrations/gitlab/integration.d.ts.map +1 -1
- package/dist/integrations/gitlab/integration.js +10 -1
- package/dist/integrations/gitlab/integration.js.map +1 -1
- package/dist/integrations/gitlab/routes.d.ts +6 -0
- package/dist/integrations/gitlab/routes.d.ts.map +1 -1
- package/dist/integrations/gitlab/routes.js +153 -1
- package/dist/integrations/gitlab/routes.js.map +1 -1
- package/dist/integrations/gitlab/rules.d.ts.map +1 -1
- package/dist/integrations/gitlab/rules.js +4 -1
- package/dist/integrations/gitlab/rules.js.map +1 -1
- package/dist/integrations/jira/api.d.ts +1 -1
- package/dist/integrations/jira/api.d.ts.map +1 -1
- package/dist/integrations/jira/api.js +1 -1
- package/dist/integrations/jira/api.js.map +1 -1
- package/dist/integrations/jira/integration.d.ts +3 -1
- package/dist/integrations/jira/integration.d.ts.map +1 -1
- package/dist/integrations/jira/integration.js +17 -2
- package/dist/integrations/jira/integration.js.map +1 -1
- package/dist/integrations/pull-request-head.d.ts +1 -0
- package/dist/integrations/pull-request-head.d.ts.map +1 -1
- package/dist/integrations/pull-request-head.js +2 -1
- package/dist/integrations/pull-request-head.js.map +1 -1
- package/dist/integrations/slack/channel-reply-processor.d.ts +1 -0
- package/dist/integrations/slack/channel-reply-processor.d.ts.map +1 -1
- package/dist/integrations/slack/channel-reply-processor.js +5 -1
- package/dist/integrations/slack/channel-reply-processor.js.map +1 -1
- package/dist/integrations/slack/channel-session-link-processor.d.ts +1 -0
- package/dist/integrations/slack/channel-session-link-processor.d.ts.map +1 -1
- package/dist/integrations/slack/channel-session-link-processor.js +1 -1
- package/dist/integrations/slack/channel-session-link-processor.js.map +1 -1
- package/dist/integrations/slack/reply-tool.d.ts.map +1 -1
- package/dist/integrations/slack/reply-tool.js +3 -11
- package/dist/integrations/slack/reply-tool.js.map +1 -1
- package/dist/integrations/slack/run-error-card.d.ts +3 -0
- package/dist/integrations/slack/run-error-card.d.ts.map +1 -0
- package/dist/integrations/slack/run-error-card.js +44 -0
- package/dist/integrations/slack/run-error-card.js.map +1 -0
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +5 -1
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/routes/config.d.ts +3 -0
- package/dist/routes/config.d.ts.map +1 -1
- package/dist/routes/config.js +22 -1
- package/dist/routes/config.js.map +1 -1
- package/dist/routes/intake.js +5 -2
- package/dist/routes/intake.js.map +1 -1
- package/dist/routes/surface.js +1 -1
- package/dist/routes/surface.js.map +1 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +8 -1
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/run-error.d.ts +13 -0
- package/dist/run-error.d.ts.map +1 -0
- package/dist/run-error.js +81 -0
- package/dist/run-error.js.map +1 -0
- package/dist/session/thinking-default.d.ts +1 -1
- package/dist/session/thinking-default.d.ts.map +1 -1
- package/dist/session/thinking-default.js +10 -11
- package/dist/session/thinking-default.js.map +1 -1
- package/dist/storage/domains/intake/base.d.ts +5 -0
- package/dist/storage/domains/intake/base.d.ts.map +1 -1
- package/dist/storage/domains/intake/base.js +9 -0
- package/dist/storage/domains/intake/base.js.map +1 -1
- package/dist/storage/domains/projects/base.d.ts +0 -1
- package/dist/storage/domains/projects/base.d.ts.map +1 -1
- package/dist/storage/domains/projects/base.js +4 -4
- package/dist/storage/domains/projects/base.js.map +1 -1
- package/dist/tools/run-watch.d.ts +0 -2
- package/dist/tools/run-watch.d.ts.map +1 -1
- package/dist/tools/run-watch.js +3 -42
- package/dist/tools/run-watch.js.map +1 -1
- package/factory-skills/factory-gitlab-review/SKILL.md +1 -1
- package/factory-skills/factory-plan/SKILL.md +1 -1
- package/factory-skills/factory-rereview/SKILL.md +2 -1
- package/factory-skills/factory-review/SKILL.md +2 -1
- package/factory-skills/factory-self-review/SKILL.md +1 -1
- package/factory-skills/factory-triage/SKILL.md +46 -23
- package/package.json +10 -10
package/README.md
CHANGED
|
@@ -535,7 +535,7 @@ A decision _without_ the flag that reaches a card which already exists keeps the
|
|
|
535
535
|
|
|
536
536
|
Reconciliation re-applies label-derived placement. The issue sweep replays an open issue through the rules ingress whenever the issue's live labels differ from the card's stored ones — the `labeled`/`unlabeled` webhook may never have arrived (Factory was down, or the label was applied by something else). The deployment rule decides placement, exactly as at arrival, and the context carries the existing card on `item`, so one handler answers for both: a card still resting on the board's initial phase is landed the normal way, and a card that has already left it is re-placed with `skipRules` and no phase rule run. Cards parked by hand are untouched while an issue's labels are unchanged.
|
|
537
537
|
|
|
538
|
-
A delivery that concerns two cards is evaluated once per card, each under its own ingress identity: every decision is committed against one card, at that card's revision. A merged pull request is the standard case — its Review card closes and the Work item that wrote the code
|
|
538
|
+
A delivery that concerns two cards is evaluated once per card, each under its own ingress identity: every decision is committed against one card, at that card's revision. A merged pull request is the standard case — its Review card closes, and the built-in `pullRequestMerged` rule moves the Work item that wrote the code to Done. If that Work item has another pull request open, it stays where it is and its session is told which pull request is still out. An opening pull request is evaluated the same way. Its own Review card is filed by the arrival, the evaluation flagged `pullRequestIntake`, which is committed against the Work item that authored the pull request when provenance or a matching session branch names one; that binding is what links the new card to its item. The authoring item is then answered in a second evaluation of its own (`pullRequestIntake` unset), which is where a handler places the item that is now out for review. The built-in `pullRequestOpened` files the card only on the arrival and returns nothing for the authoring item.
|
|
539
539
|
|
|
540
540
|
### GitHub CLI authentication in Factory sessions
|
|
541
541
|
|
|
@@ -563,6 +563,8 @@ With no constructor options, the integration reads `GITLAB_ACCESS_TOKEN`, `GITLA
|
|
|
563
563
|
|
|
564
564
|
`GITLAB_BASE_URL` must use HTTPS. Plain HTTP is accepted only for loopback development instances (`localhost`, `127.0.0.0/8`, or `::1`), where the access token is sent without transport encryption.
|
|
565
565
|
|
|
566
|
+
Linking a GitLab repository imports its open issues and merge requests (up to five pages each). Without a webhook, later items are discovered when their lists are requested, and changed merge-request heads are recorded when the merge-request list is requested. Existing cards can still be reconciled. For ongoing issue changes, comments, and merge-request lifecycle events, configure the direct project webhook with `GITLAB_WEBHOOK_SECRET`.
|
|
567
|
+
|
|
566
568
|
For a Mastra Platform/Nango connection, use `PlatformGitLabIntegration`. `MastraFactory` installs it automatically whenever Platform credentials are configured and no integration with id `gitlab` was supplied. It discovers every active connection of the organization on the Platform's `gitlab` (OAuth) integration, proxies provider requests through `/v2/connections/{connectionId}/proxy`, and polls the Platform event log for GitLab events. `MASTRA_GITLAB_CONNECTION_ID` (or the `connectionId` constructor option) is optional and only narrows discovery to one connection. An explicit integration with id `gitlab` takes precedence.
|
|
567
569
|
|
|
568
570
|
```typescript
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-thinking-level.d.ts","sourceRoot":"","sources":["../src/default-thinking-level.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,2BAA2B,CAAC;AAEtE,eAAO,MAAM,sBAAsB,EAAE,oBAA+B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"default-thinking-level.js","names":[],"sources":["../src/default-thinking-level.ts"],"sourcesContent":["import type { ThinkingLevelSetting } from '@mastra/code-sdk/thinking';\n\nexport const DEFAULT_THINKING_LEVEL: ThinkingLevelSetting = 'medium';\n"],"mappings":";AAEA,MAAa,yBAA+C"}
|
package/dist/factory.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["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;;OAIG;IACH,IAAI,kBAAkB,IAAI,yBAAyB,GAAG,SAAS,CAI9D;IAED;;;;OAIG;IACG,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IA2hDpC;;;;OAIG;IACG,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB/B,iFAAiF;IAC3E,QAAQ,IAAI,OAAO,CAAC,IAAI,CAAC;CAGhC"}
|
package/dist/factory.js
CHANGED
|
@@ -647,11 +647,25 @@ var MastraFactory = class {
|
|
|
647
647
|
});
|
|
648
648
|
return repository ?? null;
|
|
649
649
|
} } : {},
|
|
650
|
-
...
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
650
|
+
...githubIntegration || gitlabIntegration ? { onProjectRepositoryLinked: ({ orgId, projectRepository }) => {
|
|
651
|
+
(async () => {
|
|
652
|
+
if (githubIntegration && await sourceControlStorage.forIntegration("github").projectRepositories.get({
|
|
653
|
+
orgId,
|
|
654
|
+
id: projectRepository.id
|
|
655
|
+
})) await githubIntegration.ingestLinkedRepositoryBacklog({
|
|
656
|
+
orgId,
|
|
657
|
+
projectRepositoryId: projectRepository.id
|
|
658
|
+
});
|
|
659
|
+
else if (gitlabIntegration) {
|
|
660
|
+
if (await sourceControlStorage.forIntegration("gitlab").projectRepositories.get({
|
|
661
|
+
orgId,
|
|
662
|
+
id: projectRepository.id
|
|
663
|
+
})) await gitlabIntegration.ingestLinkedRepositoryBacklog({
|
|
664
|
+
orgId,
|
|
665
|
+
projectRepositoryId: projectRepository.id
|
|
666
|
+
});
|
|
667
|
+
}
|
|
668
|
+
})().catch((error) => {
|
|
655
669
|
console.warn("[factory] Failed to import a linked repository backlog:", error);
|
|
656
670
|
});
|
|
657
671
|
} } : {},
|