@mastra/factory 0.26.0-alpha.0 → 0.26.0-alpha.2
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 +158 -57
- package/dist/auth.d.ts.map +1 -1
- package/dist/boards/card-facts.d.ts +5 -0
- package/dist/boards/card-facts.d.ts.map +1 -0
- package/dist/boards/card-facts.js +19 -0
- package/dist/boards/card-facts.js.map +1 -0
- package/dist/boards/define-board.d.ts +109 -13
- package/dist/boards/define-board.d.ts.map +1 -1
- package/dist/boards/define-board.js +163 -21
- package/dist/boards/define-board.js.map +1 -1
- package/dist/boards/index.d.ts +4 -3
- package/dist/boards/index.d.ts.map +1 -1
- package/dist/boards/index.js +3 -2
- package/dist/boards/index.js.map +1 -1
- package/dist/boards/legacy-plan-role.d.ts +14 -0
- package/dist/boards/legacy-plan-role.d.ts.map +1 -0
- package/dist/boards/legacy-plan-role.js +32 -0
- package/dist/boards/legacy-plan-role.js.map +1 -0
- package/dist/boards/phase-automation.d.ts +13 -0
- package/dist/boards/phase-automation.d.ts.map +1 -0
- package/dist/boards/phase-automation.js +25 -0
- package/dist/boards/phase-automation.js.map +1 -0
- package/dist/boards/phase-runner.d.ts +13 -0
- package/dist/boards/phase-runner.d.ts.map +1 -0
- package/dist/boards/phase-runner.js +44 -0
- package/dist/boards/phase-runner.js.map +1 -0
- package/dist/boards/relocate.d.ts.map +1 -1
- package/dist/boards/relocate.js +2 -0
- package/dist/boards/relocate.js.map +1 -1
- package/dist/boards/review.d.ts +1 -1
- package/dist/boards/review.d.ts.map +1 -1
- package/dist/boards/review.js +18 -18
- package/dist/boards/review.js.map +1 -1
- package/dist/boards/semantics.d.ts.map +1 -1
- package/dist/boards/semantics.js +11 -7
- package/dist/boards/semantics.js.map +1 -1
- package/dist/boards/transition-policy.d.ts +10 -10
- package/dist/boards/work-tool-rules.d.ts +3 -3
- package/dist/boards/work-tool-rules.d.ts.map +1 -1
- package/dist/boards/work-tool-rules.js +1 -1
- package/dist/boards/work-tool-rules.js.map +1 -1
- package/dist/boards/work.d.ts +3 -3
- package/dist/boards/work.d.ts.map +1 -1
- package/dist/boards/work.js +31 -29
- package/dist/boards/work.js.map +1 -1
- package/dist/environment/build-runner.d.ts +4 -4
- package/dist/environment/build-runner.d.ts.map +1 -1
- package/dist/environment/build-workflow.d.ts +6 -6
- package/dist/environment/build-workflow.js +1 -1
- package/dist/environment/build.d.ts +2 -2
- package/dist/environment/build.d.ts.map +1 -1
- package/dist/environment/build.js +2 -0
- package/dist/environment/build.js.map +1 -1
- package/dist/factory.d.ts +8 -0
- package/dist/factory.d.ts.map +1 -1
- package/dist/factory.js +8 -2
- package/dist/factory.js.map +1 -1
- package/dist/index.d.ts +3 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -2
- package/dist/integrations/github/app-identity.d.ts.map +1 -1
- package/dist/integrations/github/default-rules.d.ts +71 -71
- package/dist/integrations/github/default-rules.d.ts.map +1 -1
- package/dist/integrations/github/integration.d.ts +5 -4
- package/dist/integrations/github/integration.d.ts.map +1 -1
- package/dist/integrations/github/integration.js +10 -8
- package/dist/integrations/github/integration.js.map +1 -1
- package/dist/integrations/github/reconcile-worker.d.ts.map +1 -1
- package/dist/integrations/github/rules.d.ts.map +1 -1
- package/dist/integrations/github/sandbox.d.ts +2 -2
- package/dist/integrations/github/sandbox.d.ts.map +1 -1
- package/dist/integrations/github/sandbox.js +6 -1
- package/dist/integrations/github/sandbox.js.map +1 -1
- package/dist/integrations/gitlab/api.d.ts.map +1 -1
- package/dist/integrations/gitlab/default-rules.d.ts +38 -38
- package/dist/integrations/gitlab/default-rules.d.ts.map +1 -1
- package/dist/integrations/gitlab/integration.d.ts.map +1 -1
- package/dist/integrations/gitlab/rules.d.ts.map +1 -1
- package/dist/integrations/incidentio/api.d.ts.map +1 -1
- package/dist/integrations/incidentio/default-rules.d.ts +3 -3
- package/dist/integrations/incidentio/default-rules.d.ts.map +1 -1
- package/dist/integrations/incidentio/integration.d.ts.map +1 -1
- package/dist/integrations/incidentio/rules.d.ts.map +1 -1
- package/dist/integrations/issue-reconcile-worker.d.ts.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/default-rules.d.ts +3 -3
- package/dist/integrations/jira/default-rules.d.ts.map +1 -1
- package/dist/integrations/jira/integration.d.ts.map +1 -1
- package/dist/integrations/jira/rules.d.ts.map +1 -1
- package/dist/integrations/linear/default-rules.d.ts +8 -8
- package/dist/integrations/linear/default-rules.d.ts.map +1 -1
- package/dist/integrations/linear/integration.d.ts.map +1 -1
- package/dist/integrations/linear/rules.d.ts.map +1 -1
- package/dist/integrations/platform/api-client.d.ts.map +1 -1
- package/dist/integrations/platform/github/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.d.ts +5 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -1
- package/dist/integrations/platform/github/integration.js +7 -0
- package/dist/integrations/platform/github/integration.js.map +1 -1
- package/dist/integrations/platform/gitlab/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/gitlab/integration.d.ts.map +1 -1
- package/dist/integrations/platform/incidentio/integration.d.ts.map +1 -1
- package/dist/integrations/platform/jira/integration.d.ts.map +1 -1
- package/dist/integrations/platform/linear/event-worker.d.ts.map +1 -1
- package/dist/integrations/platform/linear/integration.d.ts.map +1 -1
- package/dist/integrations/slack/channel-reply-processor.d.ts.map +1 -1
- package/dist/integrations/slack/channel-session-link-processor.d.ts.map +1 -1
- package/dist/integrations/slack/feed-publisher.d.ts.map +1 -1
- package/dist/integrations/slack/integration.d.ts.map +1 -1
- package/dist/integrations/slack/reply-reminder-processor.d.ts.map +1 -1
- package/dist/integrations/slack/reply-tool.d.ts.map +1 -1
- package/dist/integrations/slack/slack.d.ts.map +1 -1
- package/dist/integrations/workos/integration.d.ts.map +1 -1
- package/dist/mcp/events.d.ts +3 -3
- package/dist/mcp/routes.js +1 -1
- package/dist/routes/attention-activity.d.ts +1 -1
- package/dist/routes/attention-activity.d.ts.map +1 -1
- package/dist/routes/attention-parked.d.ts +1 -1
- package/dist/routes/attention-parked.d.ts.map +1 -1
- package/dist/routes/attention-providers.d.ts +1 -1
- package/dist/routes/attention-providers.d.ts.map +1 -1
- package/dist/routes/automation-runs.d.ts.map +1 -1
- package/dist/routes/config.d.ts.map +1 -1
- package/dist/routes/contracts.d.ts +159 -136
- package/dist/routes/contracts.d.ts.map +1 -1
- package/dist/routes/contracts.js +23 -0
- package/dist/routes/contracts.js.map +1 -1
- package/dist/routes/fs.d.ts.map +1 -1
- package/dist/routes/fs.js +24 -0
- package/dist/routes/fs.js.map +1 -1
- package/dist/routes/intake.d.ts.map +1 -1
- package/dist/routes/knowledge.d.ts.map +1 -1
- package/dist/routes/oauth.d.ts.map +1 -1
- package/dist/routes/projects.d.ts.map +1 -1
- package/dist/routes/route.d.ts.map +1 -1
- package/dist/routes/skills.d.ts +3 -0
- package/dist/routes/skills.d.ts.map +1 -1
- package/dist/routes/skills.js +1 -1
- package/dist/routes/skills.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 +24 -22
- package/dist/routes/surface.js.map +1 -1
- package/dist/routes/telemetry.d.ts.map +1 -1
- package/dist/routes/tenant-credentials.d.ts.map +1 -1
- package/dist/routes/work-items.d.ts.map +1 -1
- package/dist/routes/work-items.js +19 -3
- package/dist/routes/work-items.js.map +1 -1
- package/dist/rules/decision-applicability.d.ts.map +1 -1
- package/dist/rules/decision-applicability.js +3 -1
- package/dist/rules/decision-applicability.js.map +1 -1
- package/dist/rules/dispatch-errors.d.ts.map +1 -1
- package/dist/rules/dispatch-errors.js +4 -0
- package/dist/rules/dispatch-errors.js.map +1 -1
- package/dist/rules/dispatcher.d.ts.map +1 -1
- package/dist/rules/dispatcher.js +17 -3
- package/dist/rules/dispatcher.js.map +1 -1
- package/dist/rules/processor.d.ts.map +1 -1
- package/dist/rules/processor.js +4 -2
- package/dist/rules/processor.js.map +1 -1
- package/dist/rules/rule-group.d.ts +29 -0
- package/dist/rules/rule-group.d.ts.map +1 -0
- package/dist/rules/rule-group.js +141 -0
- package/dist/rules/rule-group.js.map +1 -0
- package/dist/rules/start-coordinator.d.ts.map +1 -1
- package/dist/rules/terminal-cleanup.d.ts.map +1 -1
- package/dist/rules/tools.d.ts +1 -1
- package/dist/rules/tools.d.ts.map +1 -1
- package/dist/rules/transition-service.d.ts.map +1 -1
- package/dist/rules/transition-service.js +5 -3
- package/dist/rules/transition-service.js.map +1 -1
- package/dist/rules/types.d.ts +25 -14
- package/dist/rules/types.d.ts.map +1 -1
- package/dist/rules/types.js.map +1 -1
- package/dist/rules/validation.d.ts +2 -0
- package/dist/rules/validation.d.ts.map +1 -1
- package/dist/rules/validation.js +6 -3
- package/dist/rules/validation.js.map +1 -1
- package/dist/sandbox/callback-factory-sandbox.d.ts.map +1 -1
- package/dist/sandbox/local-factory-sandbox.d.ts +4 -1
- package/dist/sandbox/local-factory-sandbox.d.ts.map +1 -1
- package/dist/sandbox/local-factory-sandbox.js +1 -1
- package/dist/sandbox/local-factory-sandbox.js.map +1 -1
- package/dist/sandbox/session-retirement.d.ts.map +1 -1
- package/dist/session/environment-state-processor.d.ts.map +1 -1
- package/dist/session/factory-session.d.ts.map +1 -1
- package/dist/session/live-sessions.d.ts.map +1 -1
- package/dist/session/reply-credential-processor.d.ts.map +1 -1
- package/dist/session/run-audit.d.ts +1 -1
- package/dist/session/run-audit.d.ts.map +1 -1
- package/dist/skills/app-skills.d.ts +11 -0
- package/dist/skills/app-skills.d.ts.map +1 -0
- package/dist/skills/app-skills.js +37 -0
- package/dist/skills/app-skills.js.map +1 -0
- package/dist/skills/catalog.d.ts +9 -3
- package/dist/skills/catalog.d.ts.map +1 -1
- package/dist/skills/catalog.js +35 -19
- package/dist/skills/catalog.js.map +1 -1
- package/dist/skills/service.d.ts.map +1 -1
- package/dist/spa-static.d.ts.map +1 -1
- package/dist/storage/domains/audit/actions.d.ts +6 -6
- package/dist/storage/domains/audit/actions.d.ts.map +1 -1
- package/dist/storage/domains/audit/actors.d.ts +1 -1
- package/dist/storage/domains/audit/actors.d.ts.map +1 -1
- package/dist/storage/domains/audit/base.d.ts.map +1 -1
- package/dist/storage/domains/audit/domain.d.ts.map +1 -1
- package/dist/storage/domains/channel-identity/base.d.ts.map +1 -1
- package/dist/storage/domains/comments/base.d.ts.map +1 -1
- package/dist/storage/domains/comments/domain.d.ts.map +1 -1
- package/dist/storage/domains/comments/feed-context.d.ts.map +1 -1
- package/dist/storage/domains/credentials/base.d.ts.map +1 -1
- package/dist/storage/domains/custom-providers/base.d.ts.map +1 -1
- package/dist/storage/domains/filesystem/base.d.ts.map +1 -1
- package/dist/storage/domains/intake/base.d.ts.map +1 -1
- package/dist/storage/domains/integrations/base.d.ts.map +1 -1
- package/dist/storage/domains/memory-settings/base.d.ts.map +1 -1
- package/dist/storage/domains/model-defaults/base.d.ts.map +1 -1
- package/dist/storage/domains/projects/base.d.ts +1 -1
- package/dist/storage/domains/projects/base.d.ts.map +1 -1
- package/dist/storage/domains/queue-health/base.d.ts.map +1 -1
- package/dist/storage/domains/source-control/base.d.ts.map +1 -1
- package/dist/storage/domains/source-control/inmemory.d.ts +5 -5
- package/dist/storage/domains/source-control/inmemory.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.d.ts +2 -2
- package/dist/storage/domains/work-items/base.d.ts.map +1 -1
- package/dist/storage/domains/work-items/base.js +1 -0
- package/dist/storage/domains/work-items/base.js.map +1 -1
- package/dist/storage/domains/work-items/board-version.d.ts.map +1 -1
- package/dist/telemetry-types.d.ts +1 -1
- package/dist/telemetry-types.d.ts.map +1 -1
- package/dist/timing.d.ts.map +1 -1
- package/dist/tools/session-tools.d.ts.map +1 -1
- package/dist/tools/session-tools.js +3 -1
- package/dist/tools/session-tools.js.map +1 -1
- package/dist/tools/sessions-state-processor.d.ts.map +1 -1
- package/dist/tools/work-item-tools.js +1 -1
- package/dist/workspace.d.ts +15 -6
- package/dist/workspace.d.ts.map +1 -1
- package/dist/workspace.js +79 -18
- package/dist/workspace.js.map +1 -1
- package/package.json +9 -9
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
export { BoardDefinitionError, createBoardRegistry, defaultBoards, defineBoard, reviewBoard, workBoard, } from './boards/index.js';
|
|
2
|
-
export type { BoardDefinition, BoardEventIntegration, BoardEventRules, BoardPhaseDefinition, BoardRegistry, BoardSourceClosed, BoardTransition, BoardTransitionPolicy, BoardTransitionPolicyContext, BoardTransitionPolicyResult, InstalledBoard, ReviewBoardPhase, WorkBoardPhase, } from './boards/index.js';
|
|
1
|
+
export { BoardDefinitionError, createBoardRegistry, DEFAULT_PHASE_CONTEXT, defaultBoards, defineBoard, FACTORY_AGENT_ID, reviewBoard, workBoard, } from './boards/index.js';
|
|
2
|
+
export type { BoardDefinition, BoardEventIntegration, BoardEventRules, BoardPhase, BoardPhaseDefinition, BoardPhaseExitTool, BoardPhaseRunner, BoardRegistry, BoardSourceClosed, BoardTransition, BoardTransitionPolicy, BoardTransitionPolicyContext, BoardTransitionPolicyResult, InstalledBoard, ReviewBoardPhase, WorkBoardPhase, } from './boards/index.js';
|
|
3
|
+
export type { RuleCondition, RuleGroup, RuleOperator } from './rules/rule-group.js';
|
|
3
4
|
export { MastraFactory } from './factory.js';
|
|
4
5
|
export { waitForPendingFilesystemCapture } from './session/filesystem-capture.js';
|
|
5
6
|
export type { MastraArgs, MastraFactoryConfig, MastraFactorySandboxConfig, MastraFactorySandboxOption, FactorySandboxStart, } from './factory.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,oBAAoB,EACpB,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,WAAW,EACX,SAAS,GACV,MAAM,mBAAmB,CA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AM,4CAA4C,CAAC;AACpF,YAAY,EACV,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,GACxB,MAAM,4CAA4C,CAAC;AACpD,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,YAAY,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,sCAAsC,CAAC;AACxE,YAAY,EAAE,mBAAmB,EAAE,WAAW,EAAE,MAAM,sCAAsC,CAAC;AAC7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,YAAY,EAAE,WAAW,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,6BAA6B,EAAE,sCAAsC,EAAE,MAAM,wBAAwB,CAAC;AAC/G,YAAY,EACV,sBAAsB,EACtB,uBAAuB,EACvB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,wBAAwB,CAAC;AAChC,OAAO,EAAE,sBAAsB,EAAE,MAAM,WAAW,CAAC;AACnD,YAAY,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAInD,YAAY,EACV,kBAAkB,EAClB,kBAAkB,EAClB,gBAAgB,EAChB,gBAAgB,GACjB,MAAM,wBAAwB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createFactoryRouteAuth } from "./auth.js";
|
|
2
|
-
import { BoardDefinitionError, defineBoard } from "./boards/define-board.js";
|
|
2
|
+
import { BoardDefinitionError, DEFAULT_PHASE_CONTEXT, FACTORY_AGENT_ID, defineBoard } from "./boards/define-board.js";
|
|
3
3
|
import { reviewBoard } from "./boards/review.js";
|
|
4
4
|
import { workBoard } from "./boards/work.js";
|
|
5
5
|
import { createBoardRegistry, defaultBoards } from "./boards/registry.js";
|
|
@@ -12,4 +12,4 @@ import { LocalFactorySandbox } from "./sandbox/local-factory-sandbox.js";
|
|
|
12
12
|
import { createStateSigner } from "./state-signing.js";
|
|
13
13
|
import { ChannelIdentityStorage } from "./storage/domains/channel-identity/base.js";
|
|
14
14
|
import { MastraFactory } from "./factory.js";
|
|
15
|
-
export { BoardDefinitionError, ChannelIdentityStorage, FactoryProjectsStorage, LocalFactorySandbox, MastraFactory, WorkItemsStorage, createBoardRegistry, createFactoryRouteAuth, createFactorySecretEncryption, createPlaintextFactorySecretEncryption, createStateSigner, defaultBoards, defineBoard, reviewBoard, waitForPendingFilesystemCapture, workBoard };
|
|
15
|
+
export { BoardDefinitionError, ChannelIdentityStorage, DEFAULT_PHASE_CONTEXT, FACTORY_AGENT_ID, FactoryProjectsStorage, LocalFactorySandbox, MastraFactory, WorkItemsStorage, createBoardRegistry, createFactoryRouteAuth, createFactorySecretEncryption, createPlaintextFactorySecretEncryption, createStateSigner, defaultBoards, defineBoard, reviewBoard, waitForPendingFilesystemCapture, workBoard };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app-identity.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/app-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAiB;;
|
|
1
|
+
{"version":3,"file":"app-identity.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/app-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAiB;;IAI5B,YAAY,IAAI,CAAC,EAAE,MAAM,EAGxB;IAED,+EAA+E;IAC/E,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,sDAAsD;IACtD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI,CAGxD;IAED;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO,CAIjD;CACF"}
|
|
@@ -2,34 +2,34 @@ import type { FactoryGithubEventName, FactoryGithubRuleContext, FactoryRuleHandl
|
|
|
2
2
|
export type GithubRuleOverrides = Partial<Record<FactoryGithubEventName, FactoryRuleHandler<FactoryGithubRuleContext> | null | undefined>>;
|
|
3
3
|
export type GithubEventRules = Readonly<Record<FactoryGithubEventName, FactoryRuleHandler<FactoryGithubRuleContext> | null>>;
|
|
4
4
|
declare function retriageGithubIssue(context: FactoryGithubRuleContext): {
|
|
5
|
-
readonly type:
|
|
5
|
+
readonly type: 'invokeSkill';
|
|
6
6
|
readonly idempotencyKey: `${string}:factory-triage`;
|
|
7
|
-
readonly role:
|
|
8
|
-
readonly skillName:
|
|
9
|
-
readonly arguments: `Re-triage GitHub issue (${string}) after
|
|
7
|
+
readonly role: 'triage';
|
|
8
|
+
readonly skillName: 'factory-triage';
|
|
9
|
+
readonly arguments: `Re-triage GitHub issue (${string}) after comment created.` | `Re-triage GitHub issue (${string}) after comment deleted.` | `Re-triage GitHub issue (${string}) after comment edited.` | `Re-triage GitHub issue (${string}) after issue body edited.` | `Re-triage GitHub issue (${string}) after issue title and body edited.` | `Re-triage GitHub issue (${string}) after issue title edited.`;
|
|
10
10
|
} | undefined;
|
|
11
11
|
declare function issueOpened(context: FactoryGithubRuleContext): {
|
|
12
|
-
readonly type:
|
|
12
|
+
readonly type: 'upsertLinkedWorkItem';
|
|
13
13
|
readonly idempotencyKey: `${string}:issue-intake`;
|
|
14
14
|
readonly board: string;
|
|
15
|
-
readonly source:
|
|
15
|
+
readonly source: 'github-issue';
|
|
16
16
|
readonly sourceKey: string;
|
|
17
17
|
readonly title: string;
|
|
18
18
|
readonly url: string;
|
|
19
19
|
readonly stage: string;
|
|
20
20
|
readonly metadata: {
|
|
21
|
+
readonly githubRepositoryId: number;
|
|
22
|
+
readonly githubIssueNumber: number;
|
|
23
|
+
readonly sourceCreatedAt?: string | undefined;
|
|
24
|
+
readonly author?: string | undefined;
|
|
21
25
|
readonly authorTrusted: boolean;
|
|
22
26
|
readonly autoStartCandidate: boolean;
|
|
23
27
|
readonly assignees: string[];
|
|
24
28
|
readonly labels: string[];
|
|
25
|
-
readonly author?: string | undefined;
|
|
26
|
-
readonly sourceCreatedAt?: string | undefined;
|
|
27
|
-
readonly githubRepositoryId: number;
|
|
28
|
-
readonly githubIssueNumber: number;
|
|
29
29
|
};
|
|
30
30
|
} | undefined;
|
|
31
31
|
declare function issueClosed(context: FactoryGithubRuleContext): {
|
|
32
|
-
readonly type:
|
|
32
|
+
readonly type: 'transition';
|
|
33
33
|
readonly idempotencyKey: `${string}:issue-closed`;
|
|
34
34
|
readonly board: import("../../rules/types.js").FactoryRuleBoard;
|
|
35
35
|
readonly stage: string;
|
|
@@ -38,16 +38,18 @@ declare function issueClosed(context: FactoryGithubRuleContext): {
|
|
|
38
38
|
};
|
|
39
39
|
} | undefined;
|
|
40
40
|
declare function pullRequestOpened(context: FactoryGithubRuleContext): {
|
|
41
|
-
readonly type:
|
|
41
|
+
readonly type: 'upsertLinkedWorkItem';
|
|
42
42
|
readonly idempotencyKey: string;
|
|
43
|
-
readonly board:
|
|
44
|
-
readonly source:
|
|
43
|
+
readonly board: 'review';
|
|
44
|
+
readonly source: 'github-pr';
|
|
45
45
|
readonly sourceKey: string;
|
|
46
46
|
readonly title: string;
|
|
47
47
|
readonly url: string;
|
|
48
|
-
readonly stage: "
|
|
48
|
+
readonly stage: "intake" | "review";
|
|
49
49
|
readonly metadata: {
|
|
50
|
-
readonly
|
|
50
|
+
readonly githubRepositoryId: number;
|
|
51
|
+
readonly githubPullRequestNumber: number;
|
|
52
|
+
readonly sourceCreatedAt?: string | undefined;
|
|
51
53
|
readonly factoryAuthored: boolean;
|
|
52
54
|
readonly authorTrusted: boolean;
|
|
53
55
|
readonly autoStartCandidate: boolean;
|
|
@@ -59,50 +61,48 @@ declare function pullRequestOpened(context: FactoryGithubRuleContext): {
|
|
|
59
61
|
readonly labels: string[];
|
|
60
62
|
readonly headBranch: string;
|
|
61
63
|
readonly baseBranch: string;
|
|
62
|
-
readonly
|
|
63
|
-
readonly githubRepositoryId: number;
|
|
64
|
-
readonly githubPullRequestNumber: number;
|
|
64
|
+
readonly author?: string | undefined;
|
|
65
65
|
};
|
|
66
66
|
} | {
|
|
67
|
-
readonly type:
|
|
67
|
+
readonly type: 'transition';
|
|
68
68
|
readonly idempotencyKey: `${string}:out-for-review`;
|
|
69
|
-
readonly board:
|
|
70
|
-
readonly stage:
|
|
69
|
+
readonly board: 'work';
|
|
70
|
+
readonly stage: 'review';
|
|
71
71
|
} | undefined;
|
|
72
72
|
declare function pullRequestMerged(context: FactoryGithubRuleContext): {
|
|
73
|
-
readonly type:
|
|
73
|
+
readonly type: 'transition';
|
|
74
74
|
readonly idempotencyKey: `${string}:pull-request-merged`;
|
|
75
|
-
readonly board:
|
|
76
|
-
readonly stage:
|
|
75
|
+
readonly board: 'review';
|
|
76
|
+
readonly stage: 'done';
|
|
77
77
|
readonly message: {
|
|
78
78
|
readonly text: string;
|
|
79
79
|
};
|
|
80
80
|
readonly role?: undefined;
|
|
81
81
|
} | {
|
|
82
|
-
readonly type:
|
|
82
|
+
readonly type: 'sendMessage';
|
|
83
83
|
readonly idempotencyKey: `${string}:work-merged`;
|
|
84
|
-
readonly role:
|
|
84
|
+
readonly role: 'work';
|
|
85
85
|
readonly message: string;
|
|
86
86
|
readonly board?: undefined;
|
|
87
87
|
readonly stage?: undefined;
|
|
88
88
|
} | {
|
|
89
|
-
readonly
|
|
89
|
+
readonly role?: undefined;
|
|
90
|
+
readonly type: 'transition';
|
|
90
91
|
readonly idempotencyKey: `${string}:work-merged`;
|
|
91
|
-
readonly board:
|
|
92
|
-
readonly stage:
|
|
92
|
+
readonly board: 'work';
|
|
93
|
+
readonly stage: 'done';
|
|
93
94
|
readonly message: {
|
|
94
95
|
readonly text: `Pull request #${number} merged; this Work card was moved to Done.`;
|
|
95
96
|
};
|
|
96
|
-
readonly role?: undefined;
|
|
97
97
|
} | undefined;
|
|
98
98
|
declare function pullRequestReviewSubmitted(context: FactoryGithubRuleContext): {
|
|
99
|
-
readonly type:
|
|
99
|
+
readonly type: 'sendMessage';
|
|
100
100
|
readonly idempotencyKey: `${string}:address-review-feedback`;
|
|
101
|
-
readonly role:
|
|
102
|
-
readonly priority:
|
|
101
|
+
readonly role: 'work';
|
|
102
|
+
readonly priority: 'high';
|
|
103
103
|
readonly message: string;
|
|
104
104
|
} | {
|
|
105
|
-
readonly type:
|
|
105
|
+
readonly type: 'dismissStaleReviews';
|
|
106
106
|
readonly idempotencyKey: `${string}:dismiss-stale-reviews`;
|
|
107
107
|
readonly installationId: number;
|
|
108
108
|
readonly repository: string;
|
|
@@ -111,16 +111,18 @@ declare function pullRequestReviewSubmitted(context: FactoryGithubRuleContext):
|
|
|
111
111
|
readonly approvingAuthor: string;
|
|
112
112
|
} | undefined;
|
|
113
113
|
declare function addressPullRequestComment(context: FactoryGithubRuleContext): {
|
|
114
|
-
readonly type:
|
|
114
|
+
readonly type: 'upsertLinkedWorkItem';
|
|
115
115
|
readonly idempotencyKey: string;
|
|
116
|
-
readonly board:
|
|
117
|
-
readonly source:
|
|
116
|
+
readonly board: 'review';
|
|
117
|
+
readonly source: 'github-pr';
|
|
118
118
|
readonly sourceKey: string;
|
|
119
119
|
readonly title: string;
|
|
120
120
|
readonly url: string;
|
|
121
|
-
readonly stage: "
|
|
121
|
+
readonly stage: "intake" | "review";
|
|
122
122
|
readonly metadata: {
|
|
123
|
-
readonly
|
|
123
|
+
readonly githubRepositoryId: number;
|
|
124
|
+
readonly githubPullRequestNumber: number;
|
|
125
|
+
readonly sourceCreatedAt?: string | undefined;
|
|
124
126
|
readonly factoryAuthored: boolean;
|
|
125
127
|
readonly authorTrusted: boolean;
|
|
126
128
|
readonly autoStartCandidate: boolean;
|
|
@@ -132,43 +134,43 @@ declare function addressPullRequestComment(context: FactoryGithubRuleContext): {
|
|
|
132
134
|
readonly labels: string[];
|
|
133
135
|
readonly headBranch: string;
|
|
134
136
|
readonly baseBranch: string;
|
|
135
|
-
readonly
|
|
136
|
-
readonly githubRepositoryId: number;
|
|
137
|
-
readonly githubPullRequestNumber: number;
|
|
137
|
+
readonly author?: string | undefined;
|
|
138
138
|
};
|
|
139
139
|
} | {
|
|
140
|
-
readonly
|
|
141
|
-
readonly type: "transition";
|
|
142
|
-
readonly idempotencyKey: `${string}:re-review-requested`;
|
|
143
|
-
readonly board: "review";
|
|
144
|
-
readonly stage: "review";
|
|
145
|
-
} | {
|
|
146
|
-
readonly type: "sendMessage";
|
|
140
|
+
readonly type: 'sendMessage';
|
|
147
141
|
readonly idempotencyKey: `${string}:address-pull-request-comment`;
|
|
148
|
-
readonly role:
|
|
149
|
-
readonly priority:
|
|
142
|
+
readonly role: 'work';
|
|
143
|
+
readonly priority: 'high';
|
|
150
144
|
readonly message: string;
|
|
145
|
+
} | {
|
|
146
|
+
readonly type: 'transition';
|
|
147
|
+
readonly idempotencyKey: `${string}:re-review-requested`;
|
|
148
|
+
readonly board: 'review';
|
|
149
|
+
readonly stage: 'review';
|
|
150
|
+
readonly reenter?: boolean | undefined;
|
|
151
151
|
} | undefined;
|
|
152
152
|
declare function pullRequestClosed(context: FactoryGithubRuleContext): {
|
|
153
|
-
readonly type:
|
|
153
|
+
readonly type: 'transition';
|
|
154
154
|
readonly idempotencyKey: `${string}:pull-request-closed`;
|
|
155
|
-
readonly board:
|
|
156
|
-
readonly stage:
|
|
155
|
+
readonly board: 'review';
|
|
156
|
+
readonly stage: 'canceled';
|
|
157
157
|
readonly message: {
|
|
158
158
|
readonly text: string;
|
|
159
159
|
};
|
|
160
160
|
} | undefined;
|
|
161
161
|
declare function reReviewRequestedPullRequest(context: FactoryGithubRuleContext): {
|
|
162
|
-
readonly type:
|
|
162
|
+
readonly type: 'upsertLinkedWorkItem';
|
|
163
163
|
readonly idempotencyKey: string;
|
|
164
|
-
readonly board:
|
|
165
|
-
readonly source:
|
|
164
|
+
readonly board: 'review';
|
|
165
|
+
readonly source: 'github-pr';
|
|
166
166
|
readonly sourceKey: string;
|
|
167
167
|
readonly title: string;
|
|
168
168
|
readonly url: string;
|
|
169
|
-
readonly stage: "
|
|
169
|
+
readonly stage: "intake" | "review";
|
|
170
170
|
readonly metadata: {
|
|
171
|
-
readonly
|
|
171
|
+
readonly githubRepositoryId: number;
|
|
172
|
+
readonly githubPullRequestNumber: number;
|
|
173
|
+
readonly sourceCreatedAt?: string | undefined;
|
|
172
174
|
readonly factoryAuthored: boolean;
|
|
173
175
|
readonly authorTrusted: boolean;
|
|
174
176
|
readonly autoStartCandidate: boolean;
|
|
@@ -180,23 +182,21 @@ declare function reReviewRequestedPullRequest(context: FactoryGithubRuleContext)
|
|
|
180
182
|
readonly labels: string[];
|
|
181
183
|
readonly headBranch: string;
|
|
182
184
|
readonly baseBranch: string;
|
|
183
|
-
readonly
|
|
184
|
-
readonly githubRepositoryId: number;
|
|
185
|
-
readonly githubPullRequestNumber: number;
|
|
185
|
+
readonly author?: string | undefined;
|
|
186
186
|
};
|
|
187
187
|
} | {
|
|
188
|
-
readonly
|
|
189
|
-
readonly type: "transition";
|
|
188
|
+
readonly type: 'transition';
|
|
190
189
|
readonly idempotencyKey: `${string}:re-review-requested`;
|
|
191
|
-
readonly board:
|
|
192
|
-
readonly stage:
|
|
190
|
+
readonly board: 'review';
|
|
191
|
+
readonly stage: 'review';
|
|
192
|
+
readonly reenter?: boolean | undefined;
|
|
193
193
|
} | undefined;
|
|
194
194
|
declare function reReviewUpdatedPullRequest(context: FactoryGithubRuleContext): {
|
|
195
|
-
readonly
|
|
196
|
-
readonly type: "transition";
|
|
195
|
+
readonly type: 'transition';
|
|
197
196
|
readonly idempotencyKey: `${string}:re-review-updated`;
|
|
198
|
-
readonly board:
|
|
199
|
-
readonly stage:
|
|
197
|
+
readonly board: 'review';
|
|
198
|
+
readonly stage: 'review';
|
|
199
|
+
readonly reenter?: boolean | undefined;
|
|
200
200
|
} | undefined;
|
|
201
201
|
export declare const defaultGithubRules: Readonly<{
|
|
202
202
|
issueOpened: typeof issueOpened;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"default-rules.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/default-rules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGjH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAChG,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,CACpF,CAAC;AAUF,iBAAS,mBAAmB,CAAC,OAAO,EAAE,wBAAwB
|
|
1
|
+
{"version":3,"file":"default-rules.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/default-rules.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAGjH,MAAM,MAAM,mBAAmB,GAAG,OAAO,CACvC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,IAAI,GAAG,SAAS,CAAC,CAChG,CAAC;AACF,MAAM,MAAM,gBAAgB,GAAG,QAAQ,CACrC,MAAM,CAAC,sBAAsB,EAAE,kBAAkB,CAAC,wBAAwB,CAAC,GAAG,IAAI,CAAC,CACpF,CAAC;AAUF,iBAAS,mBAAmB,CAAC,OAAO,EAAE,wBAAwB;mBAwBpD,aAAa;;mBAEb,QAAQ;wBACH,gBAAgB;;cAG9B;AAyBD,iBAAS,WAAW,CAAC,OAAO,EAAE,wBAAwB;mBAM5C,sBAAsB;;;qBAGpB,cAAc;;;;;;;;;;;;;;;cAiBzB;AAED,iBAAS,WAAW,CAAC,OA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C,SAAS,CAAC,EAAE,mBAAmB,GAAG,gBAAgB,CAgBpF"}
|
|
@@ -180,10 +180,11 @@ export declare class GithubIntegration implements FactoryIntegration {
|
|
|
180
180
|
*/
|
|
181
181
|
getRepositoryCollaboratorPermission(installationId: number, repoFullName: string, username: string, signal?: AbortSignal): Promise<GithubRepositoryPermission | undefined>;
|
|
182
182
|
/**
|
|
183
|
-
* Fetch a single repo's metadata
|
|
184
|
-
*
|
|
185
|
-
*
|
|
186
|
-
*
|
|
183
|
+
* Fetch a single repo's metadata and confirm the installation was granted
|
|
184
|
+
* it. Returns `null` when the repo belongs to another installation or none
|
|
185
|
+
* (GitHub answers 404), so a client can't link an arbitrary repo under an
|
|
186
|
+
* installation id it merely owns. `repos.get` alone isn't enough: it returns
|
|
187
|
+
* any public repo to any token. Other upstream failures throw.
|
|
187
188
|
*/
|
|
188
189
|
getInstallationRepo(installationId: number, repoFullName: string): Promise<RepoSummary | null>;
|
|
189
190
|
/** Add labels to an issue (deduplicated; no-op on empty/malformed input). */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/integration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AAExD,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAGxC,OAAO,KAAK,EAGV,MAAM,EAKP,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAMV,cAAc,EACf,MAAM,uCAAuC,CAAC;AAC/C,OAAO,KAAK,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC3F,OAAO,KAAK,EAAE,gBAAgB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GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,EAAE,CAAC;IACpB,MAAM,EAAE,MAAM,EAAE,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,qEAAqE;AACrE,eAAO,MAAM,cAAc,KAAK,CAAC;AAKjC,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,YAAY,EAAE,CAAC;IACvB,0EAA0E;IAC1E,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;CACzB;AAED,MAAM,WAAW,yBAAyB;IACxC,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,uBAAuB;IACtC,uFAAuF;IACvF,KAAK,CAAC,EAAE,mBAAmB,CAAC;IAC5B,mDAAmD;IACnD,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,6CAA6C;IAC7C,YAAY,EAAE,MAAM,CAAC;IACrB,6DAA6D;IAC7D,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,EAAE,CAAC;CAC3B;AAKD,qBAAa,iBAAkB,YAAW,kBAAkB;;IAC1D,uEAAuE;IACvE,QAAQ,CAAC,EAAE,YAAY;IAGvB,IAAI,KAAK,IAAI,gBAAgB,CAE5B;IACD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAoFrB;IACF,QAAQ,CAAC,cAAc,EAAE,cAAc,CAmFrC;IACF;;;OAGG;IACH,QAAQ,CAAC,yBAAyB,QAAQ;
|
|
1
|
+
{"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/integration.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuB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,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAIpF;IAED,sEAAsE;IACtE,WAAW,IAAI,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAKrC;CACF"}
|
|
@@ -473,17 +473,18 @@ var GithubIntegration = class {
|
|
|
473
473
|
return settleOrAbort(lookup, signal, void 0);
|
|
474
474
|
}
|
|
475
475
|
/**
|
|
476
|
-
* Fetch a single repo's metadata
|
|
477
|
-
*
|
|
478
|
-
*
|
|
479
|
-
*
|
|
476
|
+
* Fetch a single repo's metadata and confirm the installation was granted
|
|
477
|
+
* it. Returns `null` when the repo belongs to another installation or none
|
|
478
|
+
* (GitHub answers 404), so a client can't link an arbitrary repo under an
|
|
479
|
+
* installation id it merely owns. `repos.get` alone isn't enough: it returns
|
|
480
|
+
* any public repo to any token. Other upstream failures throw.
|
|
480
481
|
*/
|
|
481
482
|
async getInstallationRepo(installationId, repoFullName) {
|
|
482
483
|
const parts = splitRepoFullName(repoFullName);
|
|
483
484
|
if (!parts) return null;
|
|
484
|
-
const octokit = this.getInstallationOctokit(installationId);
|
|
485
485
|
try {
|
|
486
|
-
const { data } = await
|
|
486
|
+
const [{ data: installation }, { data }] = await Promise.all([this.getAppOctokit().apps.getRepoInstallation(parts), this.getInstallationOctokit(installationId).repos.get(parts)]);
|
|
487
|
+
if (installation.id !== installationId) return null;
|
|
487
488
|
return {
|
|
488
489
|
id: data.id,
|
|
489
490
|
fullName: data.full_name,
|
|
@@ -493,8 +494,9 @@ var GithubIntegration = class {
|
|
|
493
494
|
private: data.private,
|
|
494
495
|
installationId
|
|
495
496
|
};
|
|
496
|
-
} catch {
|
|
497
|
-
return null;
|
|
497
|
+
} catch (error) {
|
|
498
|
+
if (error.status === 404) return null;
|
|
499
|
+
throw error;
|
|
498
500
|
}
|
|
499
501
|
}
|
|
500
502
|
async #listIntakeIssues(input) {
|