@mastra/factory 0.16.0-alpha.9 → 0.16.1-alpha.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/README.md +37 -0
- package/dist/auth.js +1 -1
- package/dist/auth.js.map +1 -1
- package/dist/boards/review.d.ts.map +1 -1
- package/dist/boards/review.js +19 -8
- package/dist/boards/review.js.map +1 -1
- package/dist/boards/work.d.ts.map +1 -1
- package/dist/boards/work.js +31 -3
- package/dist/boards/work.js.map +1 -1
- package/dist/capabilities/intake.d.ts +4 -0
- package/dist/capabilities/intake.d.ts.map +1 -1
- package/dist/capabilities/version-control.d.ts +15 -0
- package/dist/capabilities/version-control.d.ts.map +1 -1
- package/dist/factory.d.ts +7 -7
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +100 -40
- package/dist/factory.js.map +1 -1
- package/dist/integrations/base.d.ts +3 -0
- package/dist/integrations/base.d.ts.map +1 -1
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +21 -0
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/routes.js +2 -1
- package/dist/integrations/github/routes.js.map +1 -1
- package/dist/integrations/github/sandbox.d.ts +41 -42
- package/dist/integrations/github/sandbox.d.ts.map +1 -1
- package/dist/integrations/github/sandbox.js +416 -227
- package/dist/integrations/github/sandbox.js.map +1 -1
- package/dist/integrations/github/webhook.d.ts +2 -5
- package/dist/integrations/github/webhook.d.ts.map +1 -1
- package/dist/integrations/github/webhook.js +8 -48
- package/dist/integrations/github/webhook.js.map +1 -1
- package/dist/integrations/gitlab/agent-tools.d.ts +14 -0
- package/dist/integrations/gitlab/agent-tools.d.ts.map +1 -0
- package/dist/integrations/gitlab/agent-tools.js +42 -0
- package/dist/integrations/gitlab/agent-tools.js.map +1 -0
- package/dist/integrations/gitlab/api.d.ts +222 -0
- package/dist/integrations/gitlab/api.d.ts.map +1 -0
- package/dist/integrations/gitlab/api.js +274 -0
- package/dist/integrations/gitlab/api.js.map +1 -0
- package/dist/integrations/gitlab/default-rules.d.ts +125 -0
- package/dist/integrations/gitlab/default-rules.d.ts.map +1 -0
- package/dist/integrations/gitlab/default-rules.js +172 -0
- package/dist/integrations/gitlab/default-rules.js.map +1 -0
- package/dist/integrations/gitlab/integration.d.ts +138 -0
- package/dist/integrations/gitlab/integration.d.ts.map +1 -0
- package/dist/integrations/gitlab/integration.js +705 -0
- package/dist/integrations/gitlab/integration.js.map +1 -0
- package/dist/integrations/gitlab/issue-reconciler.d.ts +6 -0
- package/dist/integrations/gitlab/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/gitlab/issue-reconciler.js +123 -0
- package/dist/integrations/gitlab/issue-reconciler.js.map +1 -0
- package/dist/integrations/gitlab/merge-request-reconciler.d.ts +6 -0
- package/dist/integrations/gitlab/merge-request-reconciler.d.ts.map +1 -0
- package/dist/integrations/gitlab/merge-request-reconciler.js +267 -0
- package/dist/integrations/gitlab/merge-request-reconciler.js.map +1 -0
- package/dist/integrations/gitlab/reconciler.d.ts +5 -0
- package/dist/integrations/gitlab/reconciler.d.ts.map +1 -0
- package/dist/integrations/gitlab/reconciler.js +31 -0
- package/dist/integrations/gitlab/reconciler.js.map +1 -0
- package/dist/integrations/gitlab/reconciliation-config.d.ts +3 -0
- package/dist/integrations/gitlab/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/gitlab/reconciliation-config.js +17 -0
- package/dist/integrations/gitlab/reconciliation-config.js.map +1 -0
- package/dist/integrations/gitlab/routes.d.ts +20 -0
- package/dist/integrations/gitlab/routes.d.ts.map +1 -0
- package/dist/integrations/gitlab/routes.js +473 -0
- package/dist/integrations/gitlab/routes.js.map +1 -0
- package/dist/integrations/gitlab/rules.d.ts +35 -0
- package/dist/integrations/gitlab/rules.d.ts.map +1 -0
- package/dist/integrations/gitlab/rules.js +391 -0
- package/dist/integrations/gitlab/rules.js.map +1 -0
- package/dist/integrations/gitlab/session-subscriptions.d.ts +32 -0
- package/dist/integrations/gitlab/session-subscriptions.d.ts.map +1 -0
- package/dist/integrations/gitlab/session-subscriptions.js +192 -0
- package/dist/integrations/gitlab/session-subscriptions.js.map +1 -0
- package/dist/integrations/gitlab/subscriptions.d.ts +70 -0
- package/dist/integrations/gitlab/subscriptions.d.ts.map +1 -0
- package/dist/integrations/gitlab/subscriptions.js +76 -0
- package/dist/integrations/gitlab/subscriptions.js.map +1 -0
- package/dist/integrations/gitlab/version-control.d.ts +16 -0
- package/dist/integrations/gitlab/version-control.d.ts.map +1 -0
- package/dist/integrations/gitlab/version-control.js +622 -0
- package/dist/integrations/gitlab/version-control.js.map +1 -0
- package/dist/integrations/gitlab/webhook-dispatch.d.ts +75 -0
- package/dist/integrations/gitlab/webhook-dispatch.d.ts.map +1 -0
- package/dist/integrations/gitlab/webhook-dispatch.js +235 -0
- package/dist/integrations/gitlab/webhook-dispatch.js.map +1 -0
- package/dist/integrations/gitlab/webhook.d.ts +72 -0
- package/dist/integrations/gitlab/webhook.d.ts.map +1 -0
- package/dist/integrations/gitlab/webhook.js +201 -0
- package/dist/integrations/gitlab/webhook.js.map +1 -0
- package/dist/integrations/incidentio/integration.js +1 -1
- package/dist/integrations/issue-reconciler.d.ts +3 -3
- package/dist/integrations/issue-reconciler.d.ts.map +1 -1
- package/dist/integrations/issue-reconciler.js +22 -2
- package/dist/integrations/issue-reconciler.js.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +21 -0
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/platform/gitlab/event-worker.d.ts +64 -0
- package/dist/integrations/platform/gitlab/event-worker.d.ts.map +1 -0
- package/dist/integrations/platform/gitlab/event-worker.js +306 -0
- package/dist/integrations/platform/gitlab/event-worker.js.map +1 -0
- package/dist/integrations/platform/gitlab/integration.d.ts +57 -0
- package/dist/integrations/platform/gitlab/integration.d.ts.map +1 -0
- package/dist/integrations/platform/gitlab/integration.js +125 -0
- package/dist/integrations/platform/gitlab/integration.js.map +1 -0
- package/dist/integrations/platform/incidentio/integration.js +1 -1
- package/dist/integrations/slack/integration.d.ts.map +1 -1
- package/dist/integrations/slack/integration.js +3 -3
- package/dist/integrations/slack/integration.js.map +1 -1
- package/dist/integrations/slack/slack.d.ts +2 -0
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/slack/slack.js +21 -7
- package/dist/integrations/slack/slack.js.map +1 -1
- package/dist/integrations/subscription-session.d.ts +37 -0
- package/dist/integrations/subscription-session.d.ts.map +1 -0
- package/dist/integrations/subscription-session.js +83 -0
- package/dist/integrations/subscription-session.js.map +1 -0
- package/dist/packages/_internals/workspace/dist/index.js +1 -11
- package/dist/packages/_internals/workspace/dist/index.js.map +1 -1
- package/dist/routes/intake.d.ts.map +1 -1
- package/dist/routes/intake.js +4 -2
- package/dist/routes/intake.js.map +1 -1
- package/dist/routes/oauth.js +1 -1
- package/dist/routes/projects.d.ts +1 -0
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/projects.js +1 -0
- package/dist/routes/projects.js.map +1 -1
- package/dist/routes/source-control-sessions.d.ts +20 -0
- package/dist/routes/source-control-sessions.d.ts.map +1 -0
- package/dist/routes/source-control-sessions.js +319 -0
- package/dist/routes/source-control-sessions.js.map +1 -0
- package/dist/routes/source-control-settings.d.ts +10 -0
- package/dist/routes/source-control-settings.d.ts.map +1 -0
- package/dist/routes/source-control-settings.js +87 -0
- package/dist/routes/source-control-settings.js.map +1 -0
- package/dist/routes/surface.d.ts +3 -3
- package/dist/routes/surface.d.ts.map +1 -1
- package/dist/routes/surface.js +55 -13
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/tenant-credentials.d.ts +8 -0
- package/dist/routes/tenant-credentials.d.ts.map +1 -1
- package/dist/routes/tenant-credentials.js +20 -3
- package/dist/routes/tenant-credentials.js.map +1 -1
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +1 -1
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +7 -1
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/start-coordinator.d.ts +1 -1
- package/dist/rules/start-coordinator.d.ts.map +1 -1
- package/dist/rules/start-coordinator.js +3 -2
- package/dist/rules/start-coordinator.js.map +1 -1
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +6 -3
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +67 -3
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js +23 -2
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +2 -0
- package/dist/rules/validation.js.map +1 -1
- package/dist/sandbox/git-ref.d.ts +7 -0
- package/dist/sandbox/git-ref.d.ts.map +1 -0
- package/dist/sandbox/git-ref.js +15 -0
- package/dist/sandbox/git-ref.js.map +1 -0
- package/dist/sandbox/session-retirement.js +1 -1
- package/dist/sandbox/workdir.d.ts.map +1 -1
- package/dist/sandbox/workdir.js +6 -6
- package/dist/sandbox/workdir.js.map +1 -1
- package/dist/session/factory-session.d.ts +31 -1
- package/dist/session/factory-session.d.ts.map +1 -1
- package/dist/session/factory-session.js +60 -1
- package/dist/session/factory-session.js.map +1 -1
- package/dist/session/source-control-tools.d.ts +16 -0
- package/dist/session/source-control-tools.d.ts.map +1 -0
- package/dist/session/source-control-tools.js +472 -0
- package/dist/session/source-control-tools.js.map +1 -0
- package/dist/storage/domains/intake/base.d.ts +18 -0
- package/dist/storage/domains/intake/base.d.ts.map +1 -1
- package/dist/storage/domains/intake/base.js +77 -0
- package/dist/storage/domains/intake/base.js.map +1 -1
- package/dist/work-item-branch.d.ts +3 -1
- package/dist/work-item-branch.d.ts.map +1 -1
- package/dist/work-item-branch.js +22 -4
- package/dist/work-item-branch.js.map +1 -1
- package/dist/workspace.d.ts +15 -1
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +57 -23
- package/dist/workspace.js.map +1 -1
- package/factory-skills/factory-gitlab-rereview/SKILL.md +19 -0
- package/factory-skills/factory-gitlab-review/SKILL.md +30 -0
- package/factory-skills/factory-rereview/SKILL.md +13 -6
- package/factory-skills/factory-review/SKILL.md +13 -6
- package/factory-skills/factory-review/references/archaeology.md +225 -0
- package/factory-skills/factory-review/references/categories/README.md +34 -0
- package/factory-skills/factory-review/references/categories/behavior-change.md +36 -0
- package/factory-skills/factory-review/references/categories/bug-fix.md +37 -0
- package/factory-skills/factory-review/references/categories/docs.md +32 -0
- package/factory-skills/factory-review/references/categories/experimental-flagged.md +34 -0
- package/factory-skills/factory-review/references/categories/infra-tooling.md +37 -0
- package/factory-skills/factory-review/references/categories/internal-capability.md +35 -0
- package/factory-skills/factory-review/references/categories/large-cross-cutting.md +35 -0
- package/factory-skills/factory-review/references/categories/mechanical.md +36 -0
- package/factory-skills/factory-review/references/categories/performance.md +33 -0
- package/factory-skills/factory-review/references/categories/public-api.md +38 -0
- package/factory-skills/factory-review/references/categories/refactor.md +35 -0
- package/factory-skills/factory-review/references/categories/revert.md +31 -0
- package/factory-skills/factory-review/references/categories/schema-storage.md +39 -0
- package/factory-skills/factory-review/references/categories/security.md +35 -0
- package/factory-skills/factory-review/references/categories/tests-only.md +38 -0
- package/package.json +9 -9
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"intake.d.ts","sourceRoot":"","sources":["../../src/capabilities/intake.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE;QACN,IAAI,EAAE,MAA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uF;AACvF,MAAM,WAAW,MAAM;IACrB;;;OAGG;IACH,qBAAqB,CAAC,CAAC,KAAK,EAAE,0BAA0B,GAAG,OAAO,CAAC,sBAAsB,GAAG,IAAI,CAAC,CAAC;IAClG,WAAW,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,YAAY,EAAE,CAAC,CAAC;IACpE,SAAS,CAAC,KAAK,EAAE,oBAAoB,GAAG,OAAO,CAAC,cAAc,CAAC,CAAC;IAChE,UAAU,CAAC,KAAK,EAAE,qBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC;IACnE,QAAQ,CAAC,KAAK,EAAE,mBAAmB,GAAG,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;IACxE,aAAa,CAAC,KAAK,EAAE,wBAAwB,GAAG,OAAO,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAC;IACrF;;;;;;OAMG;IACH,WAAW,CAAC,KAAK,EAAE,sBAAsB,GAAG,OAAO,CAAC,WAAW,GAAG,IAAI,CAAC,CAAC;CACzE"}
|
|
@@ -17,8 +17,13 @@ export interface RepositoryAccess {
|
|
|
17
17
|
authorization?: {
|
|
18
18
|
scheme: 'bearer';
|
|
19
19
|
token: string;
|
|
20
|
+
username?: string;
|
|
20
21
|
};
|
|
21
22
|
}
|
|
23
|
+
export interface RepositoryTarget {
|
|
24
|
+
connection: IntegrationConnection;
|
|
25
|
+
sourceId: string;
|
|
26
|
+
}
|
|
22
27
|
export type PullRequestState = 'open' | 'closed';
|
|
23
28
|
export interface PullRequest {
|
|
24
29
|
id: string;
|
|
@@ -192,6 +197,9 @@ export type CreateReviewCommentInput = CreateReviewCommentBase & ({
|
|
|
192
197
|
});
|
|
193
198
|
export type UpdateReviewCommentInput = UpdatePullRequestCommentInput;
|
|
194
199
|
export type DeleteReviewCommentInput = DeletePullRequestCommentInput;
|
|
200
|
+
export interface ResolveReviewThreadInput extends DeleteReviewCommentInput {
|
|
201
|
+
resolved: boolean;
|
|
202
|
+
}
|
|
195
203
|
export interface RequestedReviewers {
|
|
196
204
|
users: string[];
|
|
197
205
|
teams: string[];
|
|
@@ -215,6 +223,11 @@ export interface VersionControl {
|
|
|
215
223
|
installationId: string;
|
|
216
224
|
repositories: RepositoryInput[];
|
|
217
225
|
}): Promise<SourceControlRepository[]>;
|
|
226
|
+
/** Resolve the provider-owned reference for a durably registered repository. */
|
|
227
|
+
getRepositoryTarget(input: {
|
|
228
|
+
orgId: string;
|
|
229
|
+
repositoryId: string;
|
|
230
|
+
}): Promise<RepositoryTarget>;
|
|
218
231
|
getRepositoryAccess(input: {
|
|
219
232
|
orgId: string;
|
|
220
233
|
repositoryId: string;
|
|
@@ -236,6 +249,8 @@ export interface VersionControl {
|
|
|
236
249
|
submitReview(input: SubmitReviewInput): Promise<Review>;
|
|
237
250
|
dismissReview(input: DismissReviewInput): Promise<Review>;
|
|
238
251
|
deletePendingReview(input: ReviewRef): Promise<void>;
|
|
252
|
+
/** Optional because not every provider exposes resolvable review threads. */
|
|
253
|
+
resolveReviewThread?(input: ResolveReviewThreadInput): Promise<void>;
|
|
239
254
|
listReviewComments(input: ListReviewCommentsInput): Promise<ReviewCommentPage>;
|
|
240
255
|
createReviewComment(input: CreateReviewCommentInput): Promise<ReviewComment>;
|
|
241
256
|
updateReviewComment(input: UpdateReviewCommentInput): Promise<ReviewComment>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version-control.d.ts","sourceRoot":"","sources":["../../src/capabilities/version-control.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,yBAAyB,EACzB,uBAAuB,EACvB,0BAA0B,EAC3B,MAAM,2CAA2C,CAAC;AACnD,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAE7D,MAAM,WAAW,iBAAiB;IAChC,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM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config instances
|
|
5
5
|
* (auth adapter, pubsub) and passes them here explicitly. The only provider
|
|
6
|
-
* defaults constructed here are Platform GitHub, Jira, and
|
|
7
|
-
* when Platform credentials exist and the caller did not
|
|
8
|
-
* integrations.
|
|
6
|
+
* defaults constructed here are Platform GitHub, GitLab, Jira, incident.io, and
|
|
7
|
+
* Linear integrations when Platform credentials exist and the caller did not
|
|
8
|
+
* provide those integrations.
|
|
9
9
|
*
|
|
10
10
|
* `prepare()` resolves feature readiness, threads every dependency explicitly,
|
|
11
11
|
* assembles the web routes/middleware, and returns the constructor args for
|
|
@@ -110,10 +110,10 @@ export interface MastraFactoryConfig {
|
|
|
110
110
|
* Registered capability providers. The factory registers the pieces each
|
|
111
111
|
* `FactoryIntegration` instance provides — HTTP routes, storage domains,
|
|
112
112
|
* agent/session tools, intake, source control, and diagnostics — into the
|
|
113
|
-
* system. When Platform credentials are configured, missing `github
|
|
114
|
-
* `linear` integrations default to their Platform-backed
|
|
115
|
-
* Missing `jira` and `incidentio` integrations also default
|
|
116
|
-
* Platform-backed implementations, which discover visible `jira` and
|
|
113
|
+
* system. When Platform credentials are configured, missing `github`,
|
|
114
|
+
* `gitlab`, and `linear` integrations default to their Platform-backed
|
|
115
|
+
* implementations. Missing `jira` and `incidentio` integrations also default
|
|
116
|
+
* to their Platform-backed implementations, which discover visible `jira` and
|
|
117
117
|
* `incident-io` connections at runtime.
|
|
118
118
|
*/
|
|
119
119
|
integrations?: FactoryIntegration[];
|
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;AAQH,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAClD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAGlD,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qBAAqB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/factory.js
CHANGED
|
@@ -7,32 +7,33 @@ import "./boards/index.js";
|
|
|
7
7
|
import { touchFeed } from "./feed-events.js";
|
|
8
8
|
import { reconcileGithubAcceptanceLabels } from "./integrations/github/acceptance-labels.js";
|
|
9
9
|
import { recordFactoryPullRequestProvenance, resolveFactoryPullRequestParentWorkItemId } from "./integrations/github/provenance.js";
|
|
10
|
-
import { isValidGitRef } from "./integrations/github/sandbox.js";
|
|
11
10
|
import { PlatformApiClient, platformApiClientConfigFromEnv } from "./integrations/platform/api-client.js";
|
|
12
11
|
import { buildPlatformConnectRoutes } from "./integrations/platform/connect/routes.js";
|
|
13
12
|
import { WorkItemsStorage } from "./storage/domains/work-items/base.js";
|
|
14
13
|
import { IntakeStorage } from "./storage/domains/intake/base.js";
|
|
14
|
+
import { isValidGitRef } from "./sandbox/git-ref.js";
|
|
15
|
+
import { createPlaintextFactorySecretEncryption } from "./secret-encryption.js";
|
|
16
|
+
import { ModelCredentialsStorage } from "./storage/domains/credentials/base.js";
|
|
17
|
+
import { createTenantCredentialPrimer, primeTenantCredentials, registerTenantCredentialResolver } from "./routes/tenant-credentials.js";
|
|
15
18
|
import { PlatformGithubIntegration } from "./integrations/platform/github/integration.js";
|
|
19
|
+
import { PlatformGitLabIntegration } from "./integrations/platform/gitlab/integration.js";
|
|
16
20
|
import { PlatformIncidentioIntegration } from "./integrations/platform/incidentio/integration.js";
|
|
17
21
|
import { PlatformJiraIntegration } from "./integrations/platform/jira/integration.js";
|
|
18
22
|
import { PlatformLinearIntegration } from "./integrations/platform/linear/integration.js";
|
|
19
23
|
import { createCustomProvidersPrimer, registerCustomProvidersSource } from "./routes/custom-provider-source.js";
|
|
20
24
|
import { ProjectRoutes } from "./routes/projects.js";
|
|
21
25
|
import { MemorySettingsStorage } from "./storage/domains/memory-settings/base.js";
|
|
26
|
+
import { SourceControlStorage } from "./storage/domains/source-control/base.js";
|
|
22
27
|
import { hydrateSessionMemorySettings } from "./session/memory-settings-hydration.js";
|
|
23
|
-
import { refreshFactorySessionMemorySettings } from "./session/factory-session.js";
|
|
28
|
+
import { createSourceControlSessionLookup, refreshFactorySessionMemorySettings } from "./session/factory-session.js";
|
|
24
29
|
import { FactoryTransitionService } from "./rules/transition-service.js";
|
|
25
|
-
import { SourceControlStorage } from "./storage/domains/source-control/base.js";
|
|
26
30
|
import { AuditStorage } from "./storage/domains/audit/base.js";
|
|
27
31
|
import { AuditDomain } from "./storage/domains/audit/domain.js";
|
|
28
32
|
import { hydrateSessionModelPack } from "./session/model-pack-hydration.js";
|
|
29
33
|
import { observeSessionFirstExec } from "./session/first-exec-capture.js";
|
|
30
34
|
import { observeSessionFilesystem } from "./session/filesystem-capture.js";
|
|
31
|
-
import { createPlaintextFactorySecretEncryption } from "./secret-encryption.js";
|
|
32
|
-
import { ModelCredentialsStorage } from "./storage/domains/credentials/base.js";
|
|
33
35
|
import { hydrateSupervisorSession, parseSupervisorResourceId, resolveSupervisorScope } from "./supervisor/session.js";
|
|
34
36
|
import { FactoryWorkspaceRegistry, createWorkspaceFactory } from "./workspace.js";
|
|
35
|
-
import { createTenantCredentialPrimer, primeTenantCredentials, registerTenantCredentialResolver } from "./routes/tenant-credentials.js";
|
|
36
37
|
import { QueueHealthStorage } from "./storage/domains/queue-health/base.js";
|
|
37
38
|
import { assembleFactoryApiRoutes, buildIntegrationContext } from "./routes/surface.js";
|
|
38
39
|
import { TelemetryRoutes } from "./routes/telemetry.js";
|
|
@@ -46,6 +47,7 @@ import { SessionRetirementCoordinator } from "./sandbox/session-retirement.js";
|
|
|
46
47
|
import { handleServerError } from "./server-error.js";
|
|
47
48
|
import { observeSessionFirstMessage } from "./session/first-message-capture.js";
|
|
48
49
|
import { LiveSessions } from "./session/live-sessions.js";
|
|
50
|
+
import { createSourceControlTools } from "./session/source-control-tools.js";
|
|
49
51
|
import { observeSessionThreadTitle } from "./session/thread-title-mirror.js";
|
|
50
52
|
import { createSpaStaticMiddleware, resolveUiDistDir } from "./spa-static.js";
|
|
51
53
|
import { createStateSigner } from "./state-signing.js";
|
|
@@ -74,9 +76,9 @@ import { EventEmitterPubSub } from "@mastra/core/events";
|
|
|
74
76
|
*
|
|
75
77
|
* The consumer's deploy entry constructs deployment-specific config instances
|
|
76
78
|
* (auth adapter, pubsub) and passes them here explicitly. The only provider
|
|
77
|
-
* defaults constructed here are Platform GitHub, Jira, and
|
|
78
|
-
* when Platform credentials exist and the caller did not
|
|
79
|
-
* integrations.
|
|
79
|
+
* defaults constructed here are Platform GitHub, GitLab, Jira, incident.io, and
|
|
80
|
+
* Linear integrations when Platform credentials exist and the caller did not
|
|
81
|
+
* provide those integrations.
|
|
80
82
|
*
|
|
81
83
|
* `prepare()` resolves feature readiness, threads every dependency explicitly,
|
|
82
84
|
* assembles the web routes/middleware, and returns the constructor args for
|
|
@@ -197,6 +199,7 @@ var MastraFactory = class {
|
|
|
197
199
|
if (!integrations.some((integration) => integration.id === "github")) integrations.push(new PlatformGithubIntegration({ slug: this.#config.platform?.githubAppSlug }));
|
|
198
200
|
if (!integrations.some((integration) => integration.id === "incidentio")) integrations.push(new PlatformIncidentioIntegration());
|
|
199
201
|
if (!integrations.some((integration) => integration.id === "jira")) integrations.push(new PlatformJiraIntegration());
|
|
202
|
+
if (!integrations.some((integration) => integration.id === "gitlab")) integrations.push(new PlatformGitLabIntegration());
|
|
200
203
|
if (!integrations.some((integration) => integration.id === "linear")) integrations.push(new PlatformLinearIntegration());
|
|
201
204
|
}
|
|
202
205
|
const integrationIds = /* @__PURE__ */ new Set();
|
|
@@ -278,14 +281,17 @@ var MastraFactory = class {
|
|
|
278
281
|
authEnabled: Boolean(auth)
|
|
279
282
|
});
|
|
280
283
|
for (const integration of integrations) {
|
|
284
|
+
const integrationSourceControl = integration.versionControl ? sourceControlStorage.forIntegration(integration.id) : void 0;
|
|
281
285
|
integration.initialize?.({
|
|
282
286
|
storage: integrationStorage.forIntegration(integration.id),
|
|
283
287
|
projects: factoryProjectsStorage,
|
|
284
288
|
auth: routeAuth,
|
|
285
|
-
intake: intakeStorage
|
|
289
|
+
intake: intakeStorage,
|
|
290
|
+
...integrationSourceControl ? { sourceControl: integrationSourceControl } : {}
|
|
286
291
|
});
|
|
287
|
-
if (integration.versionControl) integration.versionControl.initialize({ storage:
|
|
292
|
+
if (integration.versionControl && integrationSourceControl) integration.versionControl.initialize({ storage: integrationSourceControl });
|
|
288
293
|
}
|
|
294
|
+
const sourceControlSessions = createSourceControlSessionLookup([.../* @__PURE__ */ new Set(["github", ...integrations.filter((integration) => integration.versionControl).map(({ id }) => id)])].map((id) => sourceControlStorage.forIntegration(id)));
|
|
289
295
|
const integrationRegistrations = integrations.map((integration) => {
|
|
290
296
|
const requiredDomains = [
|
|
291
297
|
"integrations",
|
|
@@ -304,14 +310,27 @@ var MastraFactory = class {
|
|
|
304
310
|
const factoryReady = storage.isDomainReady("projects") && storage.isDomainReady("work-items");
|
|
305
311
|
const knowledgeEnabled = process.env.MASTRACODE_EXPERIMENTAL_SUBCONSCIOUS === "1";
|
|
306
312
|
const githubIntegration = integrations.find((integration) => integration.id === "github");
|
|
313
|
+
const gitlabIntegration = integrations.find((integration) => integration.id === "gitlab" && integration.intake && integration.versionControl);
|
|
307
314
|
const workItemsReady = storage.isDomainReady("work-items");
|
|
308
315
|
const sessionRetirement = sandboxConfig && storage.isDomainReady("source-control") ? new SessionRetirementCoordinator({ invalidateSession: (sessionId) => workspaceRegistry.invalidateSession(sessionId) }) : void 0;
|
|
309
|
-
const retireTerminalSessions = sessionRetirement &&
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
316
|
+
const retireTerminalSessions = sessionRetirement && workItemsReady ? async ({ orgId, workItemId }) => {
|
|
317
|
+
const item = await workItemsStorage.get({
|
|
318
|
+
orgId,
|
|
319
|
+
id: workItemId
|
|
320
|
+
});
|
|
321
|
+
if (!item) return;
|
|
322
|
+
const sessionIds = [...new Set(Object.values(item.sessions).map((session) => session.sessionId))];
|
|
323
|
+
await Promise.all(sessionIds.map(async (sessionId) => {
|
|
324
|
+
const sourceControl = await sourceControlSessions.getSourceControlBySessionId(sessionId);
|
|
325
|
+
if (!sourceControl) return;
|
|
326
|
+
await sessionRetirement.retireSession({
|
|
327
|
+
sourceControl,
|
|
328
|
+
orgId,
|
|
329
|
+
sessionId,
|
|
330
|
+
deleteSession: false
|
|
331
|
+
});
|
|
332
|
+
}));
|
|
333
|
+
} : void 0;
|
|
315
334
|
const terminalCleanup = workItemsReady ? createTerminalStageCleanup({
|
|
316
335
|
workItems: workItemsStorage,
|
|
317
336
|
reconcileBinding: async (binding) => {
|
|
@@ -352,28 +371,51 @@ var MastraFactory = class {
|
|
|
352
371
|
projects: factoryProjectsStorage,
|
|
353
372
|
sourceControl: sourceControlStorage,
|
|
354
373
|
versionControlIntegrationIds: integrations.filter((integration) => integration.versionControl).map((integration) => integration.id),
|
|
355
|
-
...githubIntegration ? { resolveRepository: async ({ integrationId, orgId, installationId, externalId, slug }) => {
|
|
356
|
-
if (integrationId
|
|
357
|
-
|
|
374
|
+
...githubIntegration || gitlabIntegration ? { resolveRepository: async ({ integrationId, orgId, userId, installationId, externalId, slug }) => {
|
|
375
|
+
if (githubIntegration && integrationId === githubIntegration.id) {
|
|
376
|
+
const installation = await githubIntegration.sourceControlStorage.installations.get({
|
|
377
|
+
orgId,
|
|
378
|
+
id: installationId
|
|
379
|
+
});
|
|
380
|
+
if (!installation) return null;
|
|
381
|
+
const selected = (await githubIntegration.listInstallationRepos(Number(installation.externalId))).find((repo) => repo.id.toString() === externalId && repo.fullName === slug);
|
|
382
|
+
if (!selected) return null;
|
|
383
|
+
return githubIntegration.sourceControlStorage.repositories.upsert({
|
|
384
|
+
orgId,
|
|
385
|
+
input: {
|
|
386
|
+
installationId,
|
|
387
|
+
externalId,
|
|
388
|
+
slug: selected.fullName,
|
|
389
|
+
defaultBranch: isValidGitRef(selected.defaultBranch) ? selected.defaultBranch : "main",
|
|
390
|
+
providerMetadata: {
|
|
391
|
+
private: selected.private,
|
|
392
|
+
owner: selected.owner
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
if (!gitlabIntegration?.intake || !gitlabIntegration.versionControl || integrationId !== gitlabIntegration.id) return null;
|
|
398
|
+
const installation = await sourceControlStorage.forIntegration(gitlabIntegration.id).installations.get({
|
|
358
399
|
orgId,
|
|
359
400
|
id: installationId
|
|
360
401
|
});
|
|
361
402
|
if (!installation) return null;
|
|
362
|
-
const selected = (await
|
|
403
|
+
const selected = (await gitlabIntegration.intake.listSources({
|
|
404
|
+
orgId,
|
|
405
|
+
userId
|
|
406
|
+
})).find((source) => source.name === slug && typeof source.metadata?.projectId === "string" && source.metadata.projectId === externalId && source.metadata.connectionId === installation.externalId);
|
|
363
407
|
if (!selected) return null;
|
|
364
|
-
|
|
408
|
+
const [repository] = await gitlabIntegration.versionControl.registerRepositories({
|
|
365
409
|
orgId,
|
|
366
|
-
|
|
367
|
-
|
|
410
|
+
installationId,
|
|
411
|
+
repositories: [{
|
|
368
412
|
externalId,
|
|
369
|
-
slug
|
|
370
|
-
defaultBranch: isValidGitRef(selected.defaultBranch) ? selected.defaultBranch : "main",
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
owner: selected.owner
|
|
374
|
-
}
|
|
375
|
-
}
|
|
413
|
+
slug,
|
|
414
|
+
defaultBranch: typeof selected.metadata?.defaultBranch === "string" && isValidGitRef(selected.metadata.defaultBranch) ? selected.metadata.defaultBranch : "main",
|
|
415
|
+
metadata: selected.metadata
|
|
416
|
+
}]
|
|
376
417
|
});
|
|
418
|
+
return repository ?? null;
|
|
377
419
|
} } : {},
|
|
378
420
|
...sessionRetirement ? { sessionRetirement } : {},
|
|
379
421
|
...workItemsReady ? { workItems: workItemsStorage } : {}
|
|
@@ -400,13 +442,23 @@ var MastraFactory = class {
|
|
|
400
442
|
}
|
|
401
443
|
})();
|
|
402
444
|
const toolIntegrations = integrationRegistrations.filter(({ integration }) => integration.agentTools || integration.sessionTools);
|
|
445
|
+
const sourceControlToolProviders = integrations.flatMap((integration) => integration.versionControl ? [{
|
|
446
|
+
id: integration.id,
|
|
447
|
+
versionControl: integration.versionControl,
|
|
448
|
+
storage: sourceControlStorage.forIntegration(integration.id)
|
|
449
|
+
}] : []);
|
|
403
450
|
const prepared = await timedPhase("prepare.controllerMount", () => prepareAgentControllerMount({
|
|
404
451
|
controllerId: CONTROLLER_ID,
|
|
405
452
|
coAuthor: { name: "mastra-platform[bot]" },
|
|
406
453
|
workspace: createWorkspaceFactory({
|
|
407
454
|
...sandboxConfig ? { sandbox: sandboxConfig } : {},
|
|
408
455
|
...this.#config.sandboxStart ? { sandboxStart: this.#config.sandboxStart } : {},
|
|
409
|
-
|
|
456
|
+
sourceControls: integrations.flatMap((integration) => integration.versionControl ? [{
|
|
457
|
+
id: integration.id,
|
|
458
|
+
versionControl: integration.versionControl,
|
|
459
|
+
storage: sourceControlStorage.forIntegration(integration.id),
|
|
460
|
+
...integration.id === "github" && githubIntegration ? { github: githubIntegration } : {}
|
|
461
|
+
}] : []),
|
|
410
462
|
...factoryProjectsStorage ? { projects: factoryProjectsStorage } : {},
|
|
411
463
|
...workItemsStorage ? { workItems: workItemsStorage } : {},
|
|
412
464
|
workspaceRegistry
|
|
@@ -427,7 +479,7 @@ var MastraFactory = class {
|
|
|
427
479
|
...mastraStorageBackend ? { storageBackend: mastraStorageBackend } : {},
|
|
428
480
|
...factoryProcessor ? { inputProcessors: [factoryProcessor] } : {},
|
|
429
481
|
...vector ? { vector } : {},
|
|
430
|
-
...toolIntegrations.length > 0 || workItemsStorage && transitionService ? { extraTools: async ({ requestContext }) => {
|
|
482
|
+
...toolIntegrations.length > 0 || sourceControlToolProviders.length > 0 || workItemsStorage && transitionService ? { extraTools: async ({ requestContext }) => {
|
|
431
483
|
const tools = {};
|
|
432
484
|
const toolOwners = /* @__PURE__ */ new Map();
|
|
433
485
|
const mergeTools = (ownerId, contributed) => {
|
|
@@ -438,13 +490,18 @@ var MastraFactory = class {
|
|
|
438
490
|
tools[name] = tool;
|
|
439
491
|
}
|
|
440
492
|
};
|
|
493
|
+
if (storage.isDomainReady("source-control")) mergeTools("source-control", createSourceControlTools({
|
|
494
|
+
requestContext,
|
|
495
|
+
providers: sourceControlToolProviders,
|
|
496
|
+
audit: auditDomain
|
|
497
|
+
}));
|
|
441
498
|
if (workItemsStorage && transitionService) {
|
|
442
499
|
mergeTools("factory", await createFactoryTransitionTools({
|
|
443
500
|
requestContext,
|
|
444
501
|
storage: workItemsStorage,
|
|
445
502
|
transitionService,
|
|
446
503
|
boards: this.#boards,
|
|
447
|
-
...storage.isDomainReady("source-control") ? { sessions:
|
|
504
|
+
...storage.isDomainReady("source-control") ? { sessions: sourceControlSessions } : {}
|
|
448
505
|
}));
|
|
449
506
|
const supervisorScope = await resolveSupervisorScope({
|
|
450
507
|
requestContext,
|
|
@@ -649,11 +706,11 @@ var MastraFactory = class {
|
|
|
649
706
|
prepared.base.controller.onSessionCreated((session) => {
|
|
650
707
|
observeSessionFilesystem(session, {
|
|
651
708
|
filesystem: filesystemStorage,
|
|
652
|
-
sourceControl:
|
|
709
|
+
sourceControl: { sessions: sourceControlSessions }
|
|
653
710
|
});
|
|
654
|
-
observeSessionFirstMessage(session, { sourceControl:
|
|
655
|
-
observeSessionFirstExec(session, { sourceControl:
|
|
656
|
-
observeSessionThreadTitle(session, { sourceControl:
|
|
711
|
+
observeSessionFirstMessage(session, { sourceControl: { sessions: sourceControlSessions } });
|
|
712
|
+
observeSessionFirstExec(session, { sourceControl: { sessions: sourceControlSessions } });
|
|
713
|
+
observeSessionThreadTitle(session, { sourceControl: { sessions: sourceControlSessions } });
|
|
657
714
|
observeSessionRunEnd(session, { audit: auditDomain });
|
|
658
715
|
});
|
|
659
716
|
prepared.base.controller.onSessionCreated((session) => hydrateSupervisorSession(session, {
|
|
@@ -663,12 +720,12 @@ var MastraFactory = class {
|
|
|
663
720
|
console.warn("[Factory Supervisor] Failed to hydrate supervisor session", { error: error instanceof Error ? error.message : String(error) });
|
|
664
721
|
}), { blocking: true });
|
|
665
722
|
prepared.base.controller.onSessionCreated((session) => hydrateSessionMemorySettings(session, {
|
|
666
|
-
sourceControl:
|
|
723
|
+
sourceControl: { sessions: sourceControlSessions },
|
|
667
724
|
projects: factoryProjectsStorage,
|
|
668
725
|
memorySettings: memorySettingsStorage
|
|
669
726
|
}), { blocking: true });
|
|
670
727
|
prepared.base.controller.onSessionCreated((session) => hydrateSessionModelPack(session, {
|
|
671
|
-
sourceControl:
|
|
728
|
+
sourceControl: { sessions: sourceControlSessions },
|
|
672
729
|
workItems: workItemsStorage,
|
|
673
730
|
modelPacks: modelPacksStorage
|
|
674
731
|
}), { blocking: true });
|
|
@@ -686,6 +743,7 @@ var MastraFactory = class {
|
|
|
686
743
|
factoryStorage: storage,
|
|
687
744
|
integrationStorage,
|
|
688
745
|
sourceControlStorage,
|
|
746
|
+
integrations: integrationRegistrations,
|
|
689
747
|
configVersion,
|
|
690
748
|
boardRegistry: this.#boards,
|
|
691
749
|
factoryReady,
|
|
@@ -705,6 +763,7 @@ var MastraFactory = class {
|
|
|
705
763
|
factoryStorage: storage,
|
|
706
764
|
integrationStorage,
|
|
707
765
|
sourceControlStorage,
|
|
766
|
+
integrations: integrationRegistrations,
|
|
708
767
|
configVersion,
|
|
709
768
|
boardRegistry: this.#boards,
|
|
710
769
|
factoryReady,
|
|
@@ -728,6 +787,7 @@ var MastraFactory = class {
|
|
|
728
787
|
factoryStorage: storage,
|
|
729
788
|
integrationStorage,
|
|
730
789
|
sourceControlStorage,
|
|
790
|
+
integrations: integrationRegistrations,
|
|
731
791
|
configVersion,
|
|
732
792
|
boardRegistry: this.#boards,
|
|
733
793
|
factoryReady,
|