@mastra/factory 0.25.0-alpha.5 → 0.25.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 +3 -1
- package/dist/boards/work-transition-policy.d.ts.map +1 -1
- package/dist/boards/work-transition-policy.js +3 -3
- package/dist/boards/work-transition-policy.js.map +1 -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 +11 -3
- 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/links.d.ts +24 -0
- package/dist/links.d.ts.map +1 -0
- package/dist/links.js +40 -0
- package/dist/links.js.map +1 -0
- 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/read-tools.d.ts.map +1 -1
- package/dist/tools/read-tools.js +18 -2
- package/dist/tools/read-tools.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/dist/tools/scope.js +1 -1
- package/dist/tools/scope.js.map +1 -1
- package/dist/tools/session-tools.d.ts.map +1 -1
- package/dist/tools/session-tools.js +21 -5
- package/dist/tools/session-tools.js.map +1 -1
- package/dist/tools/work-item-tools.d.ts.map +1 -1
- package/dist/tools/work-item-tools.js +7 -1
- package/dist/tools/work-item-tools.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 +12 -12
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
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-transition-policy.d.ts","sourceRoot":"","sources":["../../src/boards/work-transition-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,eAAO,MAAM,oBAAoB,EAAE,
|
|
1
|
+
{"version":3,"file":"work-transition-policy.d.ts","sourceRoot":"","sources":["../../src/boards/work-transition-policy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAC;AAEpE,eAAO,MAAM,oBAAoB,EAAE,qBAgGlC,CAAC"}
|
|
@@ -16,7 +16,7 @@ const workTransitionPolicy = (context) => {
|
|
|
16
16
|
if ((fromStage === "planning" || skipsPlanning) && toStage === "execute" && actor.type !== "human" && !plansAutoApproved && !planApproved) return {
|
|
17
17
|
type: "reject",
|
|
18
18
|
code: "approval_required",
|
|
19
|
-
reason: "Auto-approve plans is off
|
|
19
|
+
reason: "Auto-approve plans is off, so a person has to approve this plan. Ask them to say so in a chat they are signed in to (Slack, terminal, web); that turn can move the card into Building with factory_transition_work_item."
|
|
20
20
|
};
|
|
21
21
|
if (toStage === "done" && actor.type === "agent" && item.metadata?.reviewVerdict === "request changes") return {
|
|
22
22
|
type: "reject",
|
|
@@ -31,7 +31,7 @@ const workTransitionPolicy = (context) => {
|
|
|
31
31
|
if (fromStage === "intake" && actor.type === "agent" && item.metadata?.selfReviewNeedsHuman === true) return {
|
|
32
32
|
type: "reject",
|
|
33
33
|
code: "approval_required",
|
|
34
|
-
reason: "Self-review requested changes too many times and parked this work item for a
|
|
34
|
+
reason: "Self-review requested changes too many times and parked this work item for a person. Ask them to decide in a chat they are signed in to; that turn can move the card on with factory_transition_work_item."
|
|
35
35
|
};
|
|
36
36
|
if (fromStage === "review" && toStage === "done" && actor.type === "agent" && typeof item.metadata?.openPullRequestNumber !== "number" && item.metadata?.reviewVerdict === void 0 && item.metadata?.selfReviewVerdict !== "approve") return {
|
|
37
37
|
type: "reject",
|
|
@@ -43,7 +43,7 @@ const workTransitionPolicy = (context) => {
|
|
|
43
43
|
if (triageType != null && triageType !== "bug" && entersWork && !isHumanTransition && !item.acceptedAt) return {
|
|
44
44
|
type: "reject",
|
|
45
45
|
code: "approval_required",
|
|
46
|
-
reason: "A
|
|
46
|
+
reason: "A person must accept this non-bug work item before it enters Planning or Execute. Ask them to say so in a chat they are signed in to; that turn can move the card with factory_transition_work_item."
|
|
47
47
|
};
|
|
48
48
|
return {
|
|
49
49
|
type: "allow",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"work-transition-policy.js","names":[],"sources":["../../src/boards/work-transition-policy.ts"],"sourcesContent":["import type { BoardTransitionPolicy } from './transition-policy.js';\n\nexport const workTransitionPolicy: BoardTransitionPolicy = context => {\n const { item, requestedTriageType, actor, fromStage, toStage, isHumanTransition, plansAutoApproved, planApproved } =\n context;\n const triageAgent = actor.type === 'agent' && actor.role === 'triage';\n if (triageAgent && requestedTriageType === undefined) {\n return {\n type: 'reject',\n code: 'invalid_transition',\n reason: 'Triage transitions must report a structured triage classification.',\n };\n }\n if (item.triageType && requestedTriageType && item.triageType !== requestedTriageType) {\n return {\n type: 'reject',\n code: 'forbidden',\n reason: 'The persisted triage classification cannot be changed by a later transition.',\n };\n }\n // Planning is the approval boundary. When project auto-approval is off, only a\n // person or a successfully approved `submit_plan` result may move the card into Building.\n // An agent cannot skip Planning from Intake or Triage either; maintainer-configured\n // system rules may still route cards there.\n const skipsPlanning = (fromStage === 'intake' || fromStage === 'triage') && actor.type === 'agent';\n if (\n (fromStage === 'planning' || skipsPlanning) &&\n toStage === 'execute' &&\n actor.type !== 'human' &&\n !plansAutoApproved &&\n !planApproved\n ) {\n return {\n type: 'reject',\n code: 'approval_required',\n reason:\n 'Auto-approve plans is off
|
|
1
|
+
{"version":3,"file":"work-transition-policy.js","names":[],"sources":["../../src/boards/work-transition-policy.ts"],"sourcesContent":["import type { BoardTransitionPolicy } from './transition-policy.js';\n\nexport const workTransitionPolicy: BoardTransitionPolicy = context => {\n const { item, requestedTriageType, actor, fromStage, toStage, isHumanTransition, plansAutoApproved, planApproved } =\n context;\n const triageAgent = actor.type === 'agent' && actor.role === 'triage';\n if (triageAgent && requestedTriageType === undefined) {\n return {\n type: 'reject',\n code: 'invalid_transition',\n reason: 'Triage transitions must report a structured triage classification.',\n };\n }\n if (item.triageType && requestedTriageType && item.triageType !== requestedTriageType) {\n return {\n type: 'reject',\n code: 'forbidden',\n reason: 'The persisted triage classification cannot be changed by a later transition.',\n };\n }\n // Planning is the approval boundary. When project auto-approval is off, only a\n // person or a successfully approved `submit_plan` result may move the card into Building.\n // An agent cannot skip Planning from Intake or Triage either; maintainer-configured\n // system rules may still route cards there.\n const skipsPlanning = (fromStage === 'intake' || fromStage === 'triage') && actor.type === 'agent';\n if (\n (fromStage === 'planning' || skipsPlanning) &&\n toStage === 'execute' &&\n actor.type !== 'human' &&\n !plansAutoApproved &&\n !planApproved\n ) {\n return {\n type: 'reject',\n code: 'approval_required',\n reason:\n 'Auto-approve plans is off, so a person has to approve this plan. Ask them to say so in a chat they are signed in to (Slack, terminal, web); that turn can move the card into Building with factory_transition_work_item.',\n };\n }\n // A Factory review requested changes on this item's pull request. Closing the\n // work now would bury the finding; the next push re-reviews and updates it.\n if (toStage === 'done' && actor.type === 'agent' && item.metadata?.reviewVerdict === 'request changes') {\n return {\n type: 'reject',\n code: 'invalid_transition',\n reason:\n 'The latest Factory review requested changes on this pull request. Address them and push; the re-review updates the verdict. A merge or a maintainer can still close the work.',\n };\n }\n // The work ships when its pull request merges, and the merge closes the card.\n if (toStage === 'done' && actor.type === 'agent' && typeof item.metadata?.openPullRequestNumber === 'number') {\n return {\n type: 'reject',\n code: 'invalid_transition',\n reason: `Pull request #${item.metadata.openPullRequestNumber} is still open. The card moves to Done when it merges; a maintainer can still close the work.`,\n };\n }\n // Self-review hit its round limit and parked the card for a person.\n if (fromStage === 'intake' && actor.type === 'agent' && item.metadata?.selfReviewNeedsHuman === true) {\n return {\n type: 'reject',\n code: 'approval_required',\n reason:\n 'Self-review requested changes too many times and parked this work item for a person. Ask them to decide in a chat they are signed in to; that turn can move the card on with factory_transition_work_item.',\n };\n }\n // In Review without a change request, the card is waiting on self-review; an agent cannot close it from there.\n if (\n fromStage === 'review' &&\n toStage === 'done' &&\n actor.type === 'agent' &&\n typeof item.metadata?.openPullRequestNumber !== 'number' &&\n item.metadata?.reviewVerdict === undefined &&\n item.metadata?.selfReviewVerdict !== 'approve'\n ) {\n return {\n type: 'reject',\n code: 'invalid_transition',\n reason:\n 'This work item is in self-review and has no open change request yet. Record a self-review verdict instead; a maintainer can still close the work.',\n };\n }\n const triageType = item.triageType ?? requestedTriageType;\n const entersWork = toStage === 'planning' || toStage === 'execute';\n // An intermediate phase is not evidence of human approval.\n if (triageType != null && triageType !== 'bug' && entersWork && !isHumanTransition && !item.acceptedAt) {\n return {\n type: 'reject',\n code: 'approval_required',\n reason:\n 'A person must accept this non-bug work item before it enters Planning or Execute. Ask them to say so in a chat they are signed in to; that turn can move the card with factory_transition_work_item.',\n };\n }\n return {\n type: 'allow',\n ...(triageAgent && requestedTriageType ? { triageType: requestedTriageType } : {}),\n ...(isHumanTransition && entersWork && !item.acceptedAt ? { accept: true as const } : {}),\n };\n};\n"],"mappings":";AAEA,MAAa,wBAA8C,YAAW;CACpE,MAAM,EAAE,MAAM,qBAAqB,OAAO,WAAW,SAAS,mBAAmB,mBAAmB,iBAClG;CACF,MAAM,cAAc,MAAM,SAAS,WAAW,MAAM,SAAS;CAC7D,IAAI,eAAe,wBAAwB,KAAA,GACzC,OAAO;EACL,MAAM;EACN,MAAM;EACN,QAAQ;CACV;CAEF,IAAI,KAAK,cAAc,uBAAuB,KAAK,eAAe,qBAChE,OAAO;EACL,MAAM;EACN,MAAM;EACN,QAAQ;CACV;CAMF,MAAM,iBAAiB,cAAc,YAAY,cAAc,aAAa,MAAM,SAAS;CAC3F,KACG,cAAc,cAAc,kBAC7B,YAAY,aACZ,MAAM,SAAS,WACf,CAAC,qBACD,CAAC,cAED,OAAO;EACL,MAAM;EACN,MAAM;EACN,QACE;CACJ;CAIF,IAAI,YAAY,UAAU,MAAM,SAAS,WAAW,KAAK,UAAU,kBAAkB,mBACnF,OAAO;EACL,MAAM;EACN,MAAM;EACN,QACE;CACJ;CAGF,IAAI,YAAY,UAAU,MAAM,SAAS,WAAW,OAAO,KAAK,UAAU,0BAA0B,UAClG,OAAO;EACL,MAAM;EACN,MAAM;EACN,QAAQ,iBAAiB,KAAK,SAAS,sBAAsB;CAC/D;CAGF,IAAI,cAAc,YAAY,MAAM,SAAS,WAAW,KAAK,UAAU,yBAAyB,MAC9F,OAAO;EACL,MAAM;EACN,MAAM;EACN,QACE;CACJ;CAGF,IACE,cAAc,YACd,YAAY,UACZ,MAAM,SAAS,WACf,OAAO,KAAK,UAAU,0BAA0B,YAChD,KAAK,UAAU,kBAAkB,KAAA,KACjC,KAAK,UAAU,sBAAsB,WAErC,OAAO;EACL,MAAM;EACN,MAAM;EACN,QACE;CACJ;CAEF,MAAM,aAAa,KAAK,cAAc;CACtC,MAAM,aAAa,YAAY,cAAc,YAAY;CAEzD,IAAI,cAAc,QAAQ,eAAe,SAAS,cAAc,CAAC,qBAAqB,CAAC,KAAK,YAC1F,OAAO;EACL,MAAM;EACN,MAAM;EACN,QACE;CACJ;CAEF,OAAO;EACL,MAAM;EACN,GAAI,eAAe,sBAAsB,EAAE,YAAY,oBAAoB,IAAI,CAAC;EAChF,GAAI,qBAAqB,cAAc,CAAC,KAAK,aAAa,EAAE,QAAQ,KAAc,IAAI,CAAC;CACzF;AACF"}
|
|
@@ -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":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAiC,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAClG,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,wBAAwB,CAAC;AACxD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAC/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,KAAK,EAAkB,yBAAyB,EAAoB,MAAM,wBAAwB,CAAC;AAY1G,OAAO,KAAK,EAAiB,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAKvE,OAAO,KAAK,EAAE,kBAAkB,EAAgD,MAAM,wBAAwB,CAAC;AAE/G,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../src/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAMH,OAAO,KAAK,EAAiC,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAClG,OA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ACf,CAAC;KACH,CAAC;CACH;AAED,YAAY,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,MAAM,8BAA8B,CAAC;AAC3G,YAAY,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAE1D;;;;GAIG;AACH,MAAM,WAAW,6BAA6B;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAuGD,qBAAa,aAAa;;gBAiBZ,MAAM,EAAE,mBAAmB;IAsBvC;;;;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
|
} } : {},
|