@mastra/factory 0.0.0-aggregate-trace-20261015182851
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/LICENSE.md +32 -0
- package/README.md +671 -0
- package/dist/auth.d.ts +201 -0
- package/dist/auth.d.ts.map +1 -0
- package/dist/auth.js +623 -0
- package/dist/auth.js.map +1 -0
- package/dist/boards/define-board.d.ts +111 -0
- package/dist/boards/define-board.d.ts.map +1 -0
- package/dist/boards/define-board.js +156 -0
- package/dist/boards/define-board.js.map +1 -0
- package/dist/boards/index.d.ts +14 -0
- package/dist/boards/index.d.ts.map +1 -0
- package/dist/boards/index.js +21 -0
- package/dist/boards/index.js.map +1 -0
- package/dist/boards/registry.d.ts +16 -0
- package/dist/boards/registry.d.ts.map +1 -0
- package/dist/boards/registry.js +25 -0
- package/dist/boards/registry.js.map +1 -0
- package/dist/boards/relocate.d.ts +21 -0
- package/dist/boards/relocate.d.ts.map +1 -0
- package/dist/boards/relocate.js +58 -0
- package/dist/boards/relocate.js.map +1 -0
- package/dist/boards/review.d.ts +6 -0
- package/dist/boards/review.d.ts.map +1 -0
- package/dist/boards/review.js +104 -0
- package/dist/boards/review.js.map +1 -0
- package/dist/boards/semantics.d.ts +68 -0
- package/dist/boards/semantics.d.ts.map +1 -0
- package/dist/boards/semantics.js +119 -0
- package/dist/boards/semantics.js.map +1 -0
- package/dist/boards/transition-policy.d.ts +67 -0
- package/dist/boards/transition-policy.d.ts.map +1 -0
- package/dist/boards/transition-policy.js +36 -0
- package/dist/boards/transition-policy.js.map +1 -0
- package/dist/boards/work-tool-rules.d.ts +8 -0
- package/dist/boards/work-tool-rules.d.ts.map +1 -0
- package/dist/boards/work-tool-rules.js +20 -0
- package/dist/boards/work-tool-rules.js.map +1 -0
- package/dist/boards/work-transition-policy.d.ts +3 -0
- package/dist/boards/work-transition-policy.d.ts.map +1 -0
- package/dist/boards/work-transition-policy.js +46 -0
- package/dist/boards/work-transition-policy.js.map +1 -0
- package/dist/boards/work.d.ts +4 -0
- package/dist/boards/work.d.ts.map +1 -0
- package/dist/boards/work.js +222 -0
- package/dist/boards/work.js.map +1 -0
- package/dist/capabilities/connection.d.ts +9 -0
- package/dist/capabilities/connection.d.ts.map +1 -0
- package/dist/capabilities/connection.js +1 -0
- package/dist/capabilities/intake.d.ts +153 -0
- package/dist/capabilities/intake.d.ts.map +1 -0
- package/dist/capabilities/intake.js +1 -0
- package/dist/capabilities/version-control.d.ts +268 -0
- package/dist/capabilities/version-control.d.ts.map +1 -0
- package/dist/capabilities/version-control.js +1 -0
- package/dist/environment/build-runner.d.ts +72 -0
- package/dist/environment/build-runner.d.ts.map +1 -0
- package/dist/environment/build-runner.js +131 -0
- package/dist/environment/build-runner.js.map +1 -0
- package/dist/environment/build-schedule.d.ts +40 -0
- package/dist/environment/build-schedule.d.ts.map +1 -0
- package/dist/environment/build-schedule.js +94 -0
- package/dist/environment/build-schedule.js.map +1 -0
- package/dist/environment/build-workflow.d.ts +62 -0
- package/dist/environment/build-workflow.d.ts.map +1 -0
- package/dist/environment/build-workflow.js +149 -0
- package/dist/environment/build-workflow.js.map +1 -0
- package/dist/environment/build.d.ts +111 -0
- package/dist/environment/build.d.ts.map +1 -0
- package/dist/environment/build.js +344 -0
- package/dist/environment/build.js.map +1 -0
- package/dist/environment/heads.d.ts +36 -0
- package/dist/environment/heads.d.ts.map +1 -0
- package/dist/environment/heads.js +60 -0
- package/dist/environment/heads.js.map +1 -0
- package/dist/factory.d.ts +225 -0
- package/dist/factory.d.ts.map +1 -0
- package/dist/factory.js +1006 -0
- package/dist/factory.js.map +1 -0
- package/dist/feed-events.d.ts +13 -0
- package/dist/feed-events.d.ts.map +1 -0
- package/dist/feed-events.js +25 -0
- package/dist/feed-events.js.map +1 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +15 -0
- package/dist/integrations/base.d.ts +302 -0
- package/dist/integrations/base.d.ts.map +1 -0
- package/dist/integrations/base.js +1 -0
- package/dist/integrations/github/acceptance-labels.d.ts +16 -0
- package/dist/integrations/github/acceptance-labels.d.ts.map +1 -0
- package/dist/integrations/github/acceptance-labels.js +55 -0
- package/dist/integrations/github/acceptance-labels.js.map +1 -0
- package/dist/integrations/github/app-identity.d.ts +43 -0
- package/dist/integrations/github/app-identity.d.ts.map +1 -0
- package/dist/integrations/github/app-identity.js +62 -0
- package/dist/integrations/github/app-identity.js.map +1 -0
- package/dist/integrations/github/commits.d.ts +40 -0
- package/dist/integrations/github/commits.d.ts.map +1 -0
- package/dist/integrations/github/commits.js +48 -0
- package/dist/integrations/github/commits.js.map +1 -0
- package/dist/integrations/github/config.d.ts +60 -0
- package/dist/integrations/github/config.d.ts.map +1 -0
- package/dist/integrations/github/config.js +42 -0
- package/dist/integrations/github/config.js.map +1 -0
- package/dist/integrations/github/default-rules.d.ts +218 -0
- package/dist/integrations/github/default-rules.d.ts.map +1 -0
- package/dist/integrations/github/default-rules.js +296 -0
- package/dist/integrations/github/default-rules.js.map +1 -0
- package/dist/integrations/github/integration.d.ts +270 -0
- package/dist/integrations/github/integration.d.ts.map +1 -0
- package/dist/integrations/github/integration.js +1375 -0
- package/dist/integrations/github/integration.js.map +1 -0
- package/dist/integrations/github/issue-reconciler.d.ts +28 -0
- package/dist/integrations/github/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/github/issue-reconciler.js +138 -0
- package/dist/integrations/github/issue-reconciler.js.map +1 -0
- package/dist/integrations/github/pat.d.ts +38 -0
- package/dist/integrations/github/pat.d.ts.map +1 -0
- package/dist/integrations/github/pat.js +59 -0
- package/dist/integrations/github/pat.js.map +1 -0
- package/dist/integrations/github/provenance.d.ts +34 -0
- package/dist/integrations/github/provenance.d.ts.map +1 -0
- package/dist/integrations/github/provenance.js +91 -0
- package/dist/integrations/github/provenance.js.map +1 -0
- package/dist/integrations/github/reconcile-worker.d.ts +45 -0
- package/dist/integrations/github/reconcile-worker.d.ts.map +1 -0
- package/dist/integrations/github/reconcile-worker.js +189 -0
- package/dist/integrations/github/reconcile-worker.js.map +1 -0
- package/dist/integrations/github/reconciliation-config.d.ts +3 -0
- package/dist/integrations/github/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/github/reconciliation-config.js +19 -0
- package/dist/integrations/github/reconciliation-config.js.map +1 -0
- package/dist/integrations/github/routes.d.ts +90 -0
- package/dist/integrations/github/routes.d.ts.map +1 -0
- package/dist/integrations/github/routes.js +1362 -0
- package/dist/integrations/github/routes.js.map +1 -0
- package/dist/integrations/github/rules.d.ts +173 -0
- package/dist/integrations/github/rules.d.ts.map +1 -0
- package/dist/integrations/github/rules.js +1021 -0
- package/dist/integrations/github/rules.js.map +1 -0
- package/dist/integrations/github/sandbox-release.d.ts +25 -0
- package/dist/integrations/github/sandbox-release.d.ts.map +1 -0
- package/dist/integrations/github/sandbox-release.js +38 -0
- package/dist/integrations/github/sandbox-release.js.map +1 -0
- package/dist/integrations/github/sandbox.d.ts +234 -0
- package/dist/integrations/github/sandbox.d.ts.map +1 -0
- package/dist/integrations/github/sandbox.js +947 -0
- package/dist/integrations/github/sandbox.js.map +1 -0
- package/dist/integrations/github/session-subscriptions.d.ts +28 -0
- package/dist/integrations/github/session-subscriptions.d.ts.map +1 -0
- package/dist/integrations/github/session-subscriptions.js +283 -0
- package/dist/integrations/github/session-subscriptions.js.map +1 -0
- package/dist/integrations/github/settle-or-abort.d.ts +7 -0
- package/dist/integrations/github/settle-or-abort.d.ts.map +1 -0
- package/dist/integrations/github/settle-or-abort.js +25 -0
- package/dist/integrations/github/settle-or-abort.js.map +1 -0
- package/dist/integrations/github/stale-reviews.d.ts +22 -0
- package/dist/integrations/github/stale-reviews.d.ts.map +1 -0
- package/dist/integrations/github/stale-reviews.js +70 -0
- package/dist/integrations/github/stale-reviews.js.map +1 -0
- package/dist/integrations/github/subscriptions.d.ts +54 -0
- package/dist/integrations/github/subscriptions.d.ts.map +1 -0
- package/dist/integrations/github/subscriptions.js +64 -0
- package/dist/integrations/github/subscriptions.js.map +1 -0
- package/dist/integrations/github/token-refresh.d.ts +31 -0
- package/dist/integrations/github/token-refresh.d.ts.map +1 -0
- package/dist/integrations/github/token-refresh.js +42 -0
- package/dist/integrations/github/token-refresh.js.map +1 -0
- package/dist/integrations/github/webhook.d.ts +139 -0
- package/dist/integrations/github/webhook.d.ts.map +1 -0
- package/dist/integrations/github/webhook.js +432 -0
- package/dist/integrations/github/webhook.js.map +1 -0
- 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 +180 -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 +474 -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 +502 -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 +193 -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 +621 -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/agent-tools.d.ts +49 -0
- package/dist/integrations/incidentio/agent-tools.d.ts.map +1 -0
- package/dist/integrations/incidentio/agent-tools.js +90 -0
- package/dist/integrations/incidentio/agent-tools.js.map +1 -0
- package/dist/integrations/incidentio/api.d.ts +400 -0
- package/dist/integrations/incidentio/api.d.ts.map +1 -0
- package/dist/integrations/incidentio/api.js +192 -0
- package/dist/integrations/incidentio/api.js.map +1 -0
- package/dist/integrations/incidentio/claim.d.ts +8 -0
- package/dist/integrations/incidentio/claim.d.ts.map +1 -0
- package/dist/integrations/incidentio/claim.js +14 -0
- package/dist/integrations/incidentio/claim.js.map +1 -0
- package/dist/integrations/incidentio/default-rules.d.ts +46 -0
- package/dist/integrations/incidentio/default-rules.d.ts.map +1 -0
- package/dist/integrations/incidentio/default-rules.js +68 -0
- package/dist/integrations/incidentio/default-rules.js.map +1 -0
- package/dist/integrations/incidentio/intake.d.ts +10 -0
- package/dist/integrations/incidentio/intake.d.ts.map +1 -0
- package/dist/integrations/incidentio/intake.js +307 -0
- package/dist/integrations/incidentio/intake.js.map +1 -0
- package/dist/integrations/incidentio/integration.d.ts +63 -0
- package/dist/integrations/incidentio/integration.d.ts.map +1 -0
- package/dist/integrations/incidentio/integration.js +141 -0
- package/dist/integrations/incidentio/integration.js.map +1 -0
- package/dist/integrations/incidentio/issue-reconciler.d.ts +10 -0
- package/dist/integrations/incidentio/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/incidentio/issue-reconciler.js +75 -0
- package/dist/integrations/incidentio/issue-reconciler.js.map +1 -0
- package/dist/integrations/incidentio/reconciliation-config.d.ts +3 -0
- package/dist/integrations/incidentio/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/incidentio/reconciliation-config.js +17 -0
- package/dist/integrations/incidentio/reconciliation-config.js.map +1 -0
- package/dist/integrations/incidentio/routes.d.ts +76 -0
- package/dist/integrations/incidentio/routes.d.ts.map +1 -0
- package/dist/integrations/incidentio/routes.js +249 -0
- package/dist/integrations/incidentio/routes.js.map +1 -0
- package/dist/integrations/incidentio/rules.d.ts +55 -0
- package/dist/integrations/incidentio/rules.d.ts.map +1 -0
- package/dist/integrations/incidentio/rules.js +189 -0
- package/dist/integrations/incidentio/rules.js.map +1 -0
- package/dist/integrations/issue-reconcile-worker.d.ts +19 -0
- package/dist/integrations/issue-reconcile-worker.d.ts.map +1 -0
- package/dist/integrations/issue-reconcile-worker.js +97 -0
- package/dist/integrations/issue-reconcile-worker.js.map +1 -0
- package/dist/integrations/issue-reconciler.d.ts +51 -0
- package/dist/integrations/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/issue-reconciler.js +158 -0
- package/dist/integrations/issue-reconciler.js.map +1 -0
- package/dist/integrations/jira/adf.d.ts +26 -0
- package/dist/integrations/jira/adf.d.ts.map +1 -0
- package/dist/integrations/jira/adf.js +73 -0
- package/dist/integrations/jira/adf.js.map +1 -0
- package/dist/integrations/jira/agent-tools.d.ts +45 -0
- package/dist/integrations/jira/agent-tools.d.ts.map +1 -0
- package/dist/integrations/jira/agent-tools.js +87 -0
- package/dist/integrations/jira/agent-tools.js.map +1 -0
- package/dist/integrations/jira/api.d.ts +157 -0
- package/dist/integrations/jira/api.d.ts.map +1 -0
- package/dist/integrations/jira/api.js +141 -0
- package/dist/integrations/jira/api.js.map +1 -0
- package/dist/integrations/jira/claim.d.ts +9 -0
- package/dist/integrations/jira/claim.d.ts.map +1 -0
- package/dist/integrations/jira/claim.js +15 -0
- package/dist/integrations/jira/claim.js.map +1 -0
- package/dist/integrations/jira/default-rules.d.ts +47 -0
- package/dist/integrations/jira/default-rules.d.ts.map +1 -0
- package/dist/integrations/jira/default-rules.js +69 -0
- package/dist/integrations/jira/default-rules.js.map +1 -0
- package/dist/integrations/jira/integration.d.ts +114 -0
- package/dist/integrations/jira/integration.d.ts.map +1 -0
- package/dist/integrations/jira/integration.js +407 -0
- package/dist/integrations/jira/integration.js.map +1 -0
- package/dist/integrations/jira/issue-reconciler.d.ts +10 -0
- package/dist/integrations/jira/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/jira/issue-reconciler.js +70 -0
- package/dist/integrations/jira/issue-reconciler.js.map +1 -0
- package/dist/integrations/jira/reconciliation-config.d.ts +3 -0
- package/dist/integrations/jira/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/jira/reconciliation-config.js +17 -0
- package/dist/integrations/jira/reconciliation-config.js.map +1 -0
- package/dist/integrations/jira/routes.d.ts +54 -0
- package/dist/integrations/jira/routes.d.ts.map +1 -0
- package/dist/integrations/jira/routes.js +260 -0
- package/dist/integrations/jira/routes.js.map +1 -0
- package/dist/integrations/jira/rules.d.ts +57 -0
- package/dist/integrations/jira/rules.d.ts.map +1 -0
- package/dist/integrations/jira/rules.js +189 -0
- package/dist/integrations/jira/rules.js.map +1 -0
- package/dist/integrations/linear/agent-tools.d.ts +34 -0
- package/dist/integrations/linear/agent-tools.d.ts.map +1 -0
- package/dist/integrations/linear/agent-tools.js +87 -0
- package/dist/integrations/linear/agent-tools.js.map +1 -0
- package/dist/integrations/linear/claim.d.ts +8 -0
- package/dist/integrations/linear/claim.d.ts.map +1 -0
- package/dist/integrations/linear/claim.js +14 -0
- package/dist/integrations/linear/claim.js.map +1 -0
- package/dist/integrations/linear/default-rules.d.ts +46 -0
- package/dist/integrations/linear/default-rules.d.ts.map +1 -0
- package/dist/integrations/linear/default-rules.js +70 -0
- package/dist/integrations/linear/default-rules.js.map +1 -0
- package/dist/integrations/linear/integration.d.ts +260 -0
- package/dist/integrations/linear/integration.d.ts.map +1 -0
- package/dist/integrations/linear/integration.js +900 -0
- package/dist/integrations/linear/integration.js.map +1 -0
- package/dist/integrations/linear/issue-reconciler.d.ts +8 -0
- package/dist/integrations/linear/issue-reconciler.d.ts.map +1 -0
- package/dist/integrations/linear/issue-reconciler.js +73 -0
- package/dist/integrations/linear/issue-reconciler.js.map +1 -0
- package/dist/integrations/linear/reconciliation-config.d.ts +3 -0
- package/dist/integrations/linear/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/linear/reconciliation-config.js +21 -0
- package/dist/integrations/linear/reconciliation-config.js.map +1 -0
- package/dist/integrations/linear/routes.d.ts +81 -0
- package/dist/integrations/linear/routes.d.ts.map +1 -0
- package/dist/integrations/linear/routes.js +380 -0
- package/dist/integrations/linear/routes.js.map +1 -0
- package/dist/integrations/linear/rules.d.ts +54 -0
- package/dist/integrations/linear/rules.d.ts.map +1 -0
- package/dist/integrations/linear/rules.js +189 -0
- package/dist/integrations/linear/rules.js.map +1 -0
- package/dist/integrations/linear/storage.d.ts +65 -0
- package/dist/integrations/linear/storage.d.ts.map +1 -0
- package/dist/integrations/linear/storage.js +1 -0
- package/dist/integrations/platform/api-client.d.ts +26 -0
- package/dist/integrations/platform/api-client.d.ts.map +1 -0
- package/dist/integrations/platform/api-client.js +177 -0
- package/dist/integrations/platform/api-client.js.map +1 -0
- package/dist/integrations/platform/connect/routes.d.ts +39 -0
- package/dist/integrations/platform/connect/routes.d.ts.map +1 -0
- package/dist/integrations/platform/connect/routes.js +133 -0
- package/dist/integrations/platform/connect/routes.js.map +1 -0
- package/dist/integrations/platform/github/event-worker.d.ts +58 -0
- package/dist/integrations/platform/github/event-worker.d.ts.map +1 -0
- package/dist/integrations/platform/github/event-worker.js +449 -0
- package/dist/integrations/platform/github/event-worker.js.map +1 -0
- package/dist/integrations/platform/github/integration.d.ts +89 -0
- package/dist/integrations/platform/github/integration.d.ts.map +1 -0
- package/dist/integrations/platform/github/integration.js +1266 -0
- package/dist/integrations/platform/github/integration.js.map +1 -0
- 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 +305 -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 +113 -0
- package/dist/integrations/platform/gitlab/integration.js.map +1 -0
- package/dist/integrations/platform/incidentio/integration.d.ts +74 -0
- package/dist/integrations/platform/incidentio/integration.d.ts.map +1 -0
- package/dist/integrations/platform/incidentio/integration.js +406 -0
- package/dist/integrations/platform/incidentio/integration.js.map +1 -0
- package/dist/integrations/platform/jira/agent-tools.d.ts +36 -0
- package/dist/integrations/platform/jira/agent-tools.d.ts.map +1 -0
- package/dist/integrations/platform/jira/agent-tools.js +85 -0
- package/dist/integrations/platform/jira/agent-tools.js.map +1 -0
- package/dist/integrations/platform/jira/integration.d.ts +65 -0
- package/dist/integrations/platform/jira/integration.d.ts.map +1 -0
- package/dist/integrations/platform/jira/integration.js +546 -0
- package/dist/integrations/platform/jira/integration.js.map +1 -0
- package/dist/integrations/platform/jira/routes.d.ts +55 -0
- package/dist/integrations/platform/jira/routes.d.ts.map +1 -0
- package/dist/integrations/platform/jira/routes.js +274 -0
- package/dist/integrations/platform/jira/routes.js.map +1 -0
- package/dist/integrations/platform/linear/event-worker.d.ts +105 -0
- package/dist/integrations/platform/linear/event-worker.d.ts.map +1 -0
- package/dist/integrations/platform/linear/event-worker.js +379 -0
- package/dist/integrations/platform/linear/event-worker.js.map +1 -0
- package/dist/integrations/platform/linear/integration.d.ts +92 -0
- package/dist/integrations/platform/linear/integration.d.ts.map +1 -0
- package/dist/integrations/platform/linear/integration.js +754 -0
- package/dist/integrations/platform/linear/integration.js.map +1 -0
- package/dist/integrations/pull-request-head.d.ts +18 -0
- package/dist/integrations/pull-request-head.d.ts.map +1 -0
- package/dist/integrations/pull-request-head.js +45 -0
- package/dist/integrations/pull-request-head.js.map +1 -0
- package/dist/integrations/reconciliation-config.d.ts +3 -0
- package/dist/integrations/reconciliation-config.d.ts.map +1 -0
- package/dist/integrations/reconciliation-config.js +16 -0
- package/dist/integrations/reconciliation-config.js.map +1 -0
- package/dist/integrations/slack/connect-route.d.ts +46 -0
- package/dist/integrations/slack/connect-route.d.ts.map +1 -0
- package/dist/integrations/slack/connect-route.js +186 -0
- package/dist/integrations/slack/connect-route.js.map +1 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts +8 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.d.ts.map +1 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.js +1985 -0
- package/dist/integrations/slack/emoji-shortcodes.generated.js.map +1 -0
- package/dist/integrations/slack/emoji.d.ts +3 -0
- package/dist/integrations/slack/emoji.d.ts.map +1 -0
- package/dist/integrations/slack/emoji.js +12 -0
- package/dist/integrations/slack/emoji.js.map +1 -0
- package/dist/integrations/slack/feed-publisher.d.ts +26 -0
- package/dist/integrations/slack/feed-publisher.d.ts.map +1 -0
- package/dist/integrations/slack/feed-publisher.js +44 -0
- package/dist/integrations/slack/feed-publisher.js.map +1 -0
- package/dist/integrations/slack/integration.d.ts +80 -0
- package/dist/integrations/slack/integration.d.ts.map +1 -0
- package/dist/integrations/slack/integration.js +93 -0
- package/dist/integrations/slack/integration.js.map +1 -0
- package/dist/integrations/slack/slack.d.ts +205 -0
- package/dist/integrations/slack/slack.d.ts.map +1 -0
- package/dist/integrations/slack/slack.js +653 -0
- package/dist/integrations/slack/slack.js.map +1 -0
- package/dist/integrations/subscription-session.d.ts +49 -0
- package/dist/integrations/subscription-session.d.ts.map +1 -0
- package/dist/integrations/subscription-session.js +103 -0
- package/dist/integrations/subscription-session.js.map +1 -0
- package/dist/integrations/workos/integration.d.ts +39 -0
- package/dist/integrations/workos/integration.d.ts.map +1 -0
- package/dist/integrations/workos/integration.js +91 -0
- package/dist/integrations/workos/integration.js.map +1 -0
- package/dist/packages/_internals/workspace/dist/index.js +48 -0
- package/dist/packages/_internals/workspace/dist/index.js.map +1 -0
- package/dist/platform-auth-host.d.ts +4 -0
- package/dist/platform-auth-host.d.ts.map +1 -0
- package/dist/platform-auth-host.js +18 -0
- package/dist/platform-auth-host.js.map +1 -0
- package/dist/review-verdict.d.ts +6 -0
- package/dist/review-verdict.d.ts.map +1 -0
- package/dist/review-verdict.js +14 -0
- package/dist/review-verdict.js.map +1 -0
- package/dist/routes/attention-activity.d.ts +23 -0
- package/dist/routes/attention-activity.d.ts.map +1 -0
- package/dist/routes/attention-activity.js +152 -0
- package/dist/routes/attention-activity.js.map +1 -0
- package/dist/routes/attention-parked.d.ts +22 -0
- package/dist/routes/attention-parked.d.ts.map +1 -0
- package/dist/routes/attention-parked.js +136 -0
- package/dist/routes/attention-parked.js.map +1 -0
- package/dist/routes/attention-proposed.d.ts +3 -0
- package/dist/routes/attention-proposed.d.ts.map +1 -0
- package/dist/routes/attention-proposed.js +21 -0
- package/dist/routes/attention-proposed.js.map +1 -0
- package/dist/routes/attention-providers.d.ts +159 -0
- package/dist/routes/attention-providers.d.ts.map +1 -0
- package/dist/routes/attention-providers.js +524 -0
- package/dist/routes/attention-providers.js.map +1 -0
- package/dist/routes/attention.d.ts +23 -0
- package/dist/routes/attention.d.ts.map +1 -0
- package/dist/routes/attention.js +219 -0
- package/dist/routes/attention.js.map +1 -0
- package/dist/routes/automation-runs.d.ts +37 -0
- package/dist/routes/automation-runs.d.ts.map +1 -0
- package/dist/routes/automation-runs.js +196 -0
- package/dist/routes/automation-runs.js.map +1 -0
- package/dist/routes/config.d.ts +238 -0
- package/dist/routes/config.d.ts.map +1 -0
- package/dist/routes/config.js +1011 -0
- package/dist/routes/config.js.map +1 -0
- package/dist/routes/contracts.d.ts +1080 -0
- package/dist/routes/contracts.d.ts.map +1 -0
- package/dist/routes/contracts.js +673 -0
- package/dist/routes/contracts.js.map +1 -0
- package/dist/routes/custom-provider-source.d.ts +52 -0
- package/dist/routes/custom-provider-source.d.ts.map +1 -0
- package/dist/routes/custom-provider-source.js +124 -0
- package/dist/routes/custom-provider-source.js.map +1 -0
- package/dist/routes/fs.d.ts +189 -0
- package/dist/routes/fs.d.ts.map +1 -0
- package/dist/routes/fs.js +916 -0
- package/dist/routes/fs.js.map +1 -0
- package/dist/routes/intake.d.ts +64 -0
- package/dist/routes/intake.d.ts.map +1 -0
- package/dist/routes/intake.js +627 -0
- package/dist/routes/intake.js.map +1 -0
- package/dist/routes/knowledge.d.ts +247 -0
- package/dist/routes/knowledge.d.ts.map +1 -0
- package/dist/routes/knowledge.js +1128 -0
- package/dist/routes/knowledge.js.map +1 -0
- package/dist/routes/oauth.d.ts +43 -0
- package/dist/routes/oauth.d.ts.map +1 -0
- package/dist/routes/oauth.js +477 -0
- package/dist/routes/oauth.js.map +1 -0
- package/dist/routes/projects.d.ts +68 -0
- package/dist/routes/projects.d.ts.map +1 -0
- package/dist/routes/projects.js +919 -0
- package/dist/routes/projects.js.map +1 -0
- package/dist/routes/provider-credentials.d.ts +82 -0
- package/dist/routes/provider-credentials.d.ts.map +1 -0
- package/dist/routes/provider-credentials.js +80 -0
- package/dist/routes/provider-credentials.js.map +1 -0
- package/dist/routes/route.d.ts +48 -0
- package/dist/routes/route.d.ts.map +1 -0
- package/dist/routes/route.js +15 -0
- package/dist/routes/route.js.map +1 -0
- package/dist/routes/skills.d.ts +30 -0
- package/dist/routes/skills.d.ts.map +1 -0
- package/dist/routes/skills.js +198 -0
- package/dist/routes/skills.js.map +1 -0
- package/dist/routes/source-control-sessions.d.ts +22 -0
- package/dist/routes/source-control-sessions.d.ts.map +1 -0
- package/dist/routes/source-control-sessions.js +356 -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/supervisor.d.ts +25 -0
- package/dist/routes/supervisor.d.ts.map +1 -0
- package/dist/routes/supervisor.js +35 -0
- package/dist/routes/supervisor.js.map +1 -0
- package/dist/routes/surface.d.ts +133 -0
- package/dist/routes/surface.d.ts.map +1 -0
- package/dist/routes/surface.js +518 -0
- package/dist/routes/surface.js.map +1 -0
- package/dist/routes/telemetry.d.ts +13 -0
- package/dist/routes/telemetry.d.ts.map +1 -0
- package/dist/routes/telemetry.js +60 -0
- package/dist/routes/telemetry.js.map +1 -0
- package/dist/routes/tenant-credentials.d.ts +87 -0
- package/dist/routes/tenant-credentials.d.ts.map +1 -0
- package/dist/routes/tenant-credentials.js +219 -0
- package/dist/routes/tenant-credentials.js.map +1 -0
- package/dist/routes/work-items.d.ts +49 -0
- package/dist/routes/work-items.d.ts.map +1 -0
- package/dist/routes/work-items.js +633 -0
- package/dist/routes/work-items.js.map +1 -0
- package/dist/rules/binding-context.d.ts +59 -0
- package/dist/rules/binding-context.d.ts.map +1 -0
- package/dist/rules/binding-context.js +134 -0
- package/dist/rules/binding-context.js.map +1 -0
- package/dist/rules/decision-applicability.d.ts +32 -0
- package/dist/rules/decision-applicability.d.ts.map +1 -0
- package/dist/rules/decision-applicability.js +56 -0
- package/dist/rules/decision-applicability.js.map +1 -0
- package/dist/rules/dispatch-errors.d.ts +13 -0
- package/dist/rules/dispatch-errors.d.ts.map +1 -0
- package/dist/rules/dispatch-errors.js +105 -0
- package/dist/rules/dispatch-errors.js.map +1 -0
- package/dist/rules/dispatcher.d.ts +86 -0
- package/dist/rules/dispatcher.d.ts.map +1 -0
- package/dist/rules/dispatcher.js +1159 -0
- package/dist/rules/dispatcher.js.map +1 -0
- package/dist/rules/event-rules.d.ts +23 -0
- package/dist/rules/event-rules.d.ts.map +1 -0
- package/dist/rules/event-rules.js +46 -0
- package/dist/rules/event-rules.js.map +1 -0
- package/dist/rules/index.d.ts +6 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +4 -0
- package/dist/rules/processor.d.ts +90 -0
- package/dist/rules/processor.d.ts.map +1 -0
- package/dist/rules/processor.js +486 -0
- package/dist/rules/processor.js.map +1 -0
- package/dist/rules/resolve.d.ts +15 -0
- package/dist/rules/resolve.d.ts.map +1 -0
- package/dist/rules/resolve.js +23 -0
- package/dist/rules/resolve.js.map +1 -0
- package/dist/rules/review-source-tool.d.ts +105 -0
- package/dist/rules/review-source-tool.d.ts.map +1 -0
- package/dist/rules/review-source-tool.js +109 -0
- package/dist/rules/review-source-tool.js.map +1 -0
- package/dist/rules/start-coordinator.d.ts +64 -0
- package/dist/rules/start-coordinator.d.ts.map +1 -0
- package/dist/rules/start-coordinator.js +246 -0
- package/dist/rules/start-coordinator.js.map +1 -0
- package/dist/rules/terminal-cleanup.d.ts +38 -0
- package/dist/rules/terminal-cleanup.d.ts.map +1 -0
- package/dist/rules/terminal-cleanup.js +68 -0
- package/dist/rules/terminal-cleanup.js.map +1 -0
- package/dist/rules/tools.d.ts +15 -0
- package/dist/rules/tools.d.ts.map +1 -0
- package/dist/rules/tools.js +185 -0
- package/dist/rules/tools.js.map +1 -0
- package/dist/rules/transition-service.d.ts +93 -0
- package/dist/rules/transition-service.d.ts.map +1 -0
- package/dist/rules/transition-service.js +402 -0
- package/dist/rules/transition-service.js.map +1 -0
- package/dist/rules/types.d.ts +553 -0
- package/dist/rules/types.d.ts.map +1 -0
- package/dist/rules/types.js +154 -0
- package/dist/rules/types.js.map +1 -0
- package/dist/rules/validation.d.ts +21 -0
- package/dist/rules/validation.d.ts.map +1 -0
- package/dist/rules/validation.js +327 -0
- package/dist/rules/validation.js.map +1 -0
- package/dist/sandbox/callback-factory-sandbox.d.ts +15 -0
- package/dist/sandbox/callback-factory-sandbox.d.ts.map +1 -0
- package/dist/sandbox/callback-factory-sandbox.js +22 -0
- package/dist/sandbox/callback-factory-sandbox.js.map +1 -0
- 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/local-factory-sandbox.d.ts +20 -0
- package/dist/sandbox/local-factory-sandbox.d.ts.map +1 -0
- package/dist/sandbox/local-factory-sandbox.js +27 -0
- package/dist/sandbox/local-factory-sandbox.js.map +1 -0
- package/dist/sandbox/materialization.d.ts +41 -0
- package/dist/sandbox/materialization.d.ts.map +1 -0
- package/dist/sandbox/materialization.js +18 -0
- package/dist/sandbox/materialization.js.map +1 -0
- package/dist/sandbox/session-retirement.d.ts +45 -0
- package/dist/sandbox/session-retirement.d.ts.map +1 -0
- package/dist/sandbox/session-retirement.js +153 -0
- package/dist/sandbox/session-retirement.js.map +1 -0
- package/dist/sandbox/session-sandbox.d.ts +185 -0
- package/dist/sandbox/session-sandbox.d.ts.map +1 -0
- package/dist/sandbox/session-sandbox.js +248 -0
- package/dist/sandbox/session-sandbox.js.map +1 -0
- package/dist/sandbox/workdir.d.ts +45 -0
- package/dist/sandbox/workdir.d.ts.map +1 -0
- package/dist/sandbox/workdir.js +64 -0
- package/dist/sandbox/workdir.js.map +1 -0
- package/dist/secret-encryption.d.ts +25 -0
- package/dist/secret-encryption.d.ts.map +1 -0
- package/dist/secret-encryption.js +107 -0
- package/dist/secret-encryption.js.map +1 -0
- package/dist/server-error.d.ts +12 -0
- package/dist/server-error.d.ts.map +1 -0
- package/dist/server-error.js +16 -0
- package/dist/server-error.js.map +1 -0
- package/dist/session/credential-policy.d.ts +20 -0
- package/dist/session/credential-policy.d.ts.map +1 -0
- package/dist/session/credential-policy.js +70 -0
- package/dist/session/credential-policy.js.map +1 -0
- package/dist/session/default-model-hydration.d.ts +46 -0
- package/dist/session/default-model-hydration.d.ts.map +1 -0
- package/dist/session/default-model-hydration.js +85 -0
- package/dist/session/default-model-hydration.js.map +1 -0
- package/dist/session/environment-repositories.d.ts +31 -0
- package/dist/session/environment-repositories.d.ts.map +1 -0
- package/dist/session/environment-repositories.js +89 -0
- package/dist/session/environment-repositories.js.map +1 -0
- package/dist/session/environment-state-processor.d.ts +59 -0
- package/dist/session/environment-state-processor.d.ts.map +1 -0
- package/dist/session/environment-state-processor.js +105 -0
- package/dist/session/environment-state-processor.js.map +1 -0
- package/dist/session/factory-session.d.ts +159 -0
- package/dist/session/factory-session.d.ts.map +1 -0
- package/dist/session/factory-session.js +226 -0
- package/dist/session/factory-session.js.map +1 -0
- package/dist/session/filesystem-capture.d.ts +50 -0
- package/dist/session/filesystem-capture.d.ts.map +1 -0
- package/dist/session/filesystem-capture.js +231 -0
- package/dist/session/filesystem-capture.js.map +1 -0
- package/dist/session/first-exec-capture.d.ts +38 -0
- package/dist/session/first-exec-capture.d.ts.map +1 -0
- package/dist/session/first-exec-capture.js +91 -0
- package/dist/session/first-exec-capture.js.map +1 -0
- package/dist/session/first-message-capture.d.ts +33 -0
- package/dist/session/first-message-capture.d.ts.map +1 -0
- package/dist/session/first-message-capture.js +35 -0
- package/dist/session/first-message-capture.js.map +1 -0
- package/dist/session/live-sessions.d.ts +63 -0
- package/dist/session/live-sessions.d.ts.map +1 -0
- package/dist/session/live-sessions.js +90 -0
- package/dist/session/live-sessions.js.map +1 -0
- package/dist/session/memory-settings-hydration.d.ts +36 -0
- package/dist/session/memory-settings-hydration.d.ts.map +1 -0
- package/dist/session/memory-settings-hydration.js +43 -0
- package/dist/session/memory-settings-hydration.js.map +1 -0
- package/dist/session/org-seed.d.ts +67 -0
- package/dist/session/org-seed.d.ts.map +1 -0
- package/dist/session/org-seed.js +53 -0
- package/dist/session/org-seed.js.map +1 -0
- package/dist/session/run-audit.d.ts +54 -0
- package/dist/session/run-audit.d.ts.map +1 -0
- package/dist/session/run-audit.js +124 -0
- package/dist/session/run-audit.js.map +1 -0
- package/dist/session/session-title.d.ts +7 -0
- package/dist/session/session-title.d.ts.map +1 -0
- package/dist/session/session-title.js +14 -0
- package/dist/session/session-title.js.map +1 -0
- package/dist/session/shell-commands.d.ts +5 -0
- package/dist/session/shell-commands.d.ts.map +1 -0
- package/dist/session/shell-commands.js +25 -0
- package/dist/session/shell-commands.js.map +1 -0
- package/dist/session/source-control-tools.d.ts +25 -0
- package/dist/session/source-control-tools.d.ts.map +1 -0
- package/dist/session/source-control-tools.js +594 -0
- package/dist/session/source-control-tools.js.map +1 -0
- package/dist/session/thread-title-mirror.d.ts +35 -0
- package/dist/session/thread-title-mirror.d.ts.map +1 -0
- package/dist/session/thread-title-mirror.js +51 -0
- package/dist/session/thread-title-mirror.js.map +1 -0
- package/dist/session/work-item-repository.d.ts +21 -0
- package/dist/session/work-item-repository.d.ts.map +1 -0
- package/dist/session/work-item-repository.js +113 -0
- package/dist/session/work-item-repository.js.map +1 -0
- package/dist/skills/catalog.d.ts +14 -0
- package/dist/skills/catalog.d.ts.map +1 -0
- package/dist/skills/catalog.js +62 -0
- package/dist/skills/catalog.js.map +1 -0
- package/dist/skills/service.d.ts +70 -0
- package/dist/skills/service.d.ts.map +1 -0
- package/dist/skills/service.js +88 -0
- package/dist/skills/service.js.map +1 -0
- package/dist/spa-static.d.ts +33 -0
- package/dist/spa-static.d.ts.map +1 -0
- package/dist/spa-static.js +104 -0
- package/dist/spa-static.js.map +1 -0
- package/dist/state-signing.d.ts +59 -0
- package/dist/state-signing.d.ts.map +1 -0
- package/dist/state-signing.js +83 -0
- package/dist/state-signing.js.map +1 -0
- package/dist/storage/domains/audit/actions.d.ts +24 -0
- package/dist/storage/domains/audit/actions.d.ts.map +1 -0
- package/dist/storage/domains/audit/actions.js +69 -0
- package/dist/storage/domains/audit/actions.js.map +1 -0
- package/dist/storage/domains/audit/actors.d.ts +5 -0
- package/dist/storage/domains/audit/actors.d.ts.map +1 -0
- package/dist/storage/domains/audit/actors.js +25 -0
- package/dist/storage/domains/audit/actors.js.map +1 -0
- package/dist/storage/domains/audit/agent-audit.d.ts +30 -0
- package/dist/storage/domains/audit/agent-audit.d.ts.map +1 -0
- package/dist/storage/domains/audit/agent-audit.js +93 -0
- package/dist/storage/domains/audit/agent-audit.js.map +1 -0
- package/dist/storage/domains/audit/base.d.ts +133 -0
- package/dist/storage/domains/audit/base.d.ts.map +1 -0
- package/dist/storage/domains/audit/base.js +206 -0
- package/dist/storage/domains/audit/base.js.map +1 -0
- package/dist/storage/domains/audit/domain.d.ts +79 -0
- package/dist/storage/domains/audit/domain.d.ts.map +1 -0
- package/dist/storage/domains/audit/domain.js +248 -0
- package/dist/storage/domains/audit/domain.js.map +1 -0
- package/dist/storage/domains/audit/wire.d.ts +24 -0
- package/dist/storage/domains/audit/wire.d.ts.map +1 -0
- package/dist/storage/domains/audit/wire.js +16 -0
- package/dist/storage/domains/audit/wire.js.map +1 -0
- package/dist/storage/domains/channel-identity/base.d.ts +100 -0
- package/dist/storage/domains/channel-identity/base.d.ts.map +1 -0
- package/dist/storage/domains/channel-identity/base.js +164 -0
- package/dist/storage/domains/channel-identity/base.js.map +1 -0
- package/dist/storage/domains/comments/activity.d.ts +40 -0
- package/dist/storage/domains/comments/activity.d.ts.map +1 -0
- package/dist/storage/domains/comments/activity.js +94 -0
- package/dist/storage/domains/comments/activity.js.map +1 -0
- package/dist/storage/domains/comments/actor.d.ts +51 -0
- package/dist/storage/domains/comments/actor.d.ts.map +1 -0
- package/dist/storage/domains/comments/actor.js +38 -0
- package/dist/storage/domains/comments/actor.js.map +1 -0
- package/dist/storage/domains/comments/base.d.ts +245 -0
- package/dist/storage/domains/comments/base.d.ts.map +1 -0
- package/dist/storage/domains/comments/base.js +533 -0
- package/dist/storage/domains/comments/base.js.map +1 -0
- package/dist/storage/domains/comments/domain.d.ts +135 -0
- package/dist/storage/domains/comments/domain.d.ts.map +1 -0
- package/dist/storage/domains/comments/domain.js +285 -0
- package/dist/storage/domains/comments/domain.js.map +1 -0
- package/dist/storage/domains/comments/feed-context.d.ts +22 -0
- package/dist/storage/domains/comments/feed-context.d.ts.map +1 -0
- package/dist/storage/domains/comments/feed-context.js +89 -0
- package/dist/storage/domains/comments/feed-context.js.map +1 -0
- package/dist/storage/domains/comments/feed-sync.d.ts +21 -0
- package/dist/storage/domains/comments/feed-sync.d.ts.map +1 -0
- package/dist/storage/domains/comments/feed-sync.js +1 -0
- package/dist/storage/domains/comments/parse.d.ts +23 -0
- package/dist/storage/domains/comments/parse.d.ts.map +1 -0
- package/dist/storage/domains/comments/parse.js +90 -0
- package/dist/storage/domains/comments/parse.js.map +1 -0
- package/dist/storage/domains/comments/routes.d.ts +24 -0
- package/dist/storage/domains/comments/routes.d.ts.map +1 -0
- package/dist/storage/domains/comments/routes.js +302 -0
- package/dist/storage/domains/comments/routes.js.map +1 -0
- package/dist/storage/domains/comments/schema.d.ts +5 -0
- package/dist/storage/domains/comments/schema.d.ts.map +1 -0
- package/dist/storage/domains/comments/schema.js +179 -0
- package/dist/storage/domains/comments/schema.js.map +1 -0
- package/dist/storage/domains/comments/wire.d.ts +40 -0
- package/dist/storage/domains/comments/wire.d.ts.map +1 -0
- package/dist/storage/domains/comments/wire.js +37 -0
- package/dist/storage/domains/comments/wire.js.map +1 -0
- package/dist/storage/domains/credentials/base.d.ts +136 -0
- package/dist/storage/domains/credentials/base.d.ts.map +1 -0
- package/dist/storage/domains/credentials/base.js +294 -0
- package/dist/storage/domains/credentials/base.js.map +1 -0
- package/dist/storage/domains/custom-providers/base.d.ts +59 -0
- package/dist/storage/domains/custom-providers/base.d.ts.map +1 -0
- package/dist/storage/domains/custom-providers/base.js +176 -0
- package/dist/storage/domains/custom-providers/base.js.map +1 -0
- package/dist/storage/domains/filesystem/base.d.ts +26 -0
- package/dist/storage/domains/filesystem/base.d.ts.map +1 -0
- package/dist/storage/domains/filesystem/base.js +74 -0
- package/dist/storage/domains/filesystem/base.js.map +1 -0
- package/dist/storage/domains/intake/base.d.ts +150 -0
- package/dist/storage/domains/intake/base.d.ts.map +1 -0
- package/dist/storage/domains/intake/base.js +431 -0
- package/dist/storage/domains/intake/base.js.map +1 -0
- package/dist/storage/domains/integrations/base.d.ts +128 -0
- package/dist/storage/domains/integrations/base.d.ts.map +1 -0
- package/dist/storage/domains/integrations/base.js +333 -0
- package/dist/storage/domains/integrations/base.js.map +1 -0
- package/dist/storage/domains/memory-settings/base.d.ts +58 -0
- package/dist/storage/domains/memory-settings/base.d.ts.map +1 -0
- package/dist/storage/domains/memory-settings/base.js +129 -0
- package/dist/storage/domains/memory-settings/base.js.map +1 -0
- package/dist/storage/domains/model-defaults/base.d.ts +29 -0
- package/dist/storage/domains/model-defaults/base.d.ts.map +1 -0
- package/dist/storage/domains/model-defaults/base.js +79 -0
- package/dist/storage/domains/model-defaults/base.js.map +1 -0
- package/dist/storage/domains/projects/base.d.ts +191 -0
- package/dist/storage/domains/projects/base.d.ts.map +1 -0
- package/dist/storage/domains/projects/base.js +352 -0
- package/dist/storage/domains/projects/base.js.map +1 -0
- package/dist/storage/domains/queue-health/base.d.ts +52 -0
- package/dist/storage/domains/queue-health/base.d.ts.map +1 -0
- package/dist/storage/domains/queue-health/base.js +122 -0
- package/dist/storage/domains/queue-health/base.js.map +1 -0
- package/dist/storage/domains/source-control/base.d.ts +422 -0
- package/dist/storage/domains/source-control/base.d.ts.map +1 -0
- package/dist/storage/domains/source-control/base.js +1114 -0
- package/dist/storage/domains/source-control/base.js.map +1 -0
- package/dist/storage/domains/source-control/inmemory.d.ts +147 -0
- package/dist/storage/domains/source-control/inmemory.d.ts.map +1 -0
- package/dist/storage/domains/source-control/inmemory.js +416 -0
- package/dist/storage/domains/source-control/inmemory.js.map +1 -0
- package/dist/storage/domains/work-items/base.d.ts +794 -0
- package/dist/storage/domains/work-items/base.d.ts.map +1 -0
- package/dist/storage/domains/work-items/base.js +2747 -0
- package/dist/storage/domains/work-items/base.js.map +1 -0
- package/dist/storage/domains/work-items/board-version.d.ts +26 -0
- package/dist/storage/domains/work-items/board-version.d.ts.map +1 -0
- package/dist/storage/domains/work-items/board-version.js +110 -0
- package/dist/storage/domains/work-items/board-version.js.map +1 -0
- package/dist/storage/domains/work-items/metrics.d.ts +97 -0
- package/dist/storage/domains/work-items/metrics.d.ts.map +1 -0
- package/dist/storage/domains/work-items/metrics.js +226 -0
- package/dist/storage/domains/work-items/metrics.js.map +1 -0
- package/dist/supervisor/health-worker.d.ts +19 -0
- package/dist/supervisor/health-worker.d.ts.map +1 -0
- package/dist/supervisor/health-worker.js +74 -0
- package/dist/supervisor/health-worker.js.map +1 -0
- package/dist/supervisor/health.d.ts +79 -0
- package/dist/supervisor/health.d.ts.map +1 -0
- package/dist/supervisor/health.js +228 -0
- package/dist/supervisor/health.js.map +1 -0
- package/dist/supervisor/instructions.d.ts +6 -0
- package/dist/supervisor/instructions.d.ts.map +1 -0
- package/dist/supervisor/instructions.js +66 -0
- package/dist/supervisor/instructions.js.map +1 -0
- package/dist/supervisor/read-tools.d.ts +43 -0
- package/dist/supervisor/read-tools.d.ts.map +1 -0
- package/dist/supervisor/read-tools.js +343 -0
- package/dist/supervisor/read-tools.js.map +1 -0
- package/dist/supervisor/session-messaging.d.ts +26 -0
- package/dist/supervisor/session-messaging.d.ts.map +1 -0
- package/dist/supervisor/session-messaging.js +21 -0
- package/dist/supervisor/session-messaging.js.map +1 -0
- package/dist/supervisor/session.d.ts +38 -0
- package/dist/supervisor/session.d.ts.map +1 -0
- package/dist/supervisor/session.js +79 -0
- package/dist/supervisor/session.js.map +1 -0
- package/dist/supervisor/write-tools.d.ts +30 -0
- package/dist/supervisor/write-tools.d.ts.map +1 -0
- package/dist/supervisor/write-tools.js +231 -0
- package/dist/supervisor/write-tools.js.map +1 -0
- package/dist/telemetry-types.d.ts +7 -0
- package/dist/telemetry-types.d.ts.map +1 -0
- package/dist/telemetry-types.js +24 -0
- package/dist/telemetry-types.js.map +1 -0
- package/dist/telemetry.d.ts +9 -0
- package/dist/telemetry.d.ts.map +1 -0
- package/dist/telemetry.js +47 -0
- package/dist/telemetry.js.map +1 -0
- package/dist/timing.d.ts +15 -0
- package/dist/timing.d.ts.map +1 -0
- package/dist/timing.js +34 -0
- package/dist/timing.js.map +1 -0
- package/dist/work-item-branch.d.ts +33 -0
- package/dist/work-item-branch.d.ts.map +1 -0
- package/dist/work-item-branch.js +70 -0
- package/dist/work-item-branch.js.map +1 -0
- package/dist/workspace.d.ts +131 -0
- package/dist/workspace.d.ts.map +1 -0
- package/dist/workspace.js +995 -0
- package/dist/workspace.js.map +1 -0
- package/factory-skills/configure-factory-rules/SKILL.md +122 -0
- package/factory-skills/factory-complete-issue/SKILL.md +24 -0
- package/factory-skills/factory-gitlab-rereview/SKILL.md +22 -0
- package/factory-skills/factory-gitlab-review/SKILL.md +48 -0
- package/factory-skills/factory-plan/SKILL.md +72 -0
- package/factory-skills/factory-rereview/SKILL.md +225 -0
- package/factory-skills/factory-review/SKILL.md +214 -0
- 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/factory-skills/factory-triage/SKILL.md +197 -0
- package/package.json +92 -0
|
@@ -0,0 +1,416 @@
|
|
|
1
|
+
import { UniqueViolationError } from "@mastra/core/storage";
|
|
2
|
+
//#region src/storage/domains/source-control/inmemory.ts
|
|
3
|
+
/** In-memory provider-scoped source-control handle for route tests. */
|
|
4
|
+
var SourceControlStorageInMemory = class {
|
|
5
|
+
integrationId;
|
|
6
|
+
installationsRows = [];
|
|
7
|
+
repositoriesRows = [];
|
|
8
|
+
connectionsRows = [];
|
|
9
|
+
projectRepositoriesRows = [];
|
|
10
|
+
sessionsRows = [];
|
|
11
|
+
sessionRepositoriesRows = [];
|
|
12
|
+
constructor(integrationId = "github") {
|
|
13
|
+
this.integrationId = integrationId;
|
|
14
|
+
}
|
|
15
|
+
installations = {
|
|
16
|
+
list: async ({ orgId }) => this.installationsRows.filter((row) => row.orgId === orgId),
|
|
17
|
+
get: async ({ orgId, id }) => this.installationsRows.find((row) => row.orgId === orgId && row.id === id) ?? null,
|
|
18
|
+
findByExternalId: async ({ orgId, externalId }) => this.installationsRows.find((row) => row.orgId === orgId && row.externalId === externalId) ?? null,
|
|
19
|
+
upsert: async (input) => {
|
|
20
|
+
const existing = this.installationsRows.find((row) => row.orgId === input.orgId && row.externalId === input.externalId);
|
|
21
|
+
if (existing) {
|
|
22
|
+
Object.assign(existing, {
|
|
23
|
+
connectedByUserId: input.connectedByUserId,
|
|
24
|
+
accountName: input.accountName ?? null,
|
|
25
|
+
accountType: input.accountType ?? null,
|
|
26
|
+
providerMetadata: input.providerMetadata ?? {}
|
|
27
|
+
});
|
|
28
|
+
return existing;
|
|
29
|
+
}
|
|
30
|
+
const created = {
|
|
31
|
+
id: globalThis.crypto.randomUUID(),
|
|
32
|
+
integrationId: this.integrationId,
|
|
33
|
+
orgId: input.orgId,
|
|
34
|
+
connectedByUserId: input.connectedByUserId,
|
|
35
|
+
externalId: input.externalId,
|
|
36
|
+
accountName: input.accountName ?? null,
|
|
37
|
+
accountType: input.accountType ?? null,
|
|
38
|
+
providerMetadata: input.providerMetadata ?? {},
|
|
39
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
40
|
+
};
|
|
41
|
+
this.installationsRows.push(created);
|
|
42
|
+
return created;
|
|
43
|
+
},
|
|
44
|
+
delete: async ({ orgId, id }) => {
|
|
45
|
+
const index = this.installationsRows.findIndex((row) => row.orgId === orgId && row.id === id);
|
|
46
|
+
if (index < 0) return false;
|
|
47
|
+
this.installationsRows.splice(index, 1);
|
|
48
|
+
return true;
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
repositories = {
|
|
52
|
+
list: async ({ orgId, installationId }) => {
|
|
53
|
+
return await this.installations.get({
|
|
54
|
+
orgId,
|
|
55
|
+
id: installationId
|
|
56
|
+
}) ? this.repositoriesRows.filter((row) => row.installationId === installationId) : [];
|
|
57
|
+
},
|
|
58
|
+
get: async ({ orgId, id }) => {
|
|
59
|
+
const row = this.repositoriesRows.find((candidate) => candidate.id === id);
|
|
60
|
+
if (!row) return null;
|
|
61
|
+
return await this.installations.get({
|
|
62
|
+
orgId,
|
|
63
|
+
id: row.installationId
|
|
64
|
+
}) ? row : null;
|
|
65
|
+
},
|
|
66
|
+
findByExternalId: async ({ orgId, installationId, externalId }) => {
|
|
67
|
+
return (await this.repositories.list({
|
|
68
|
+
orgId,
|
|
69
|
+
installationId
|
|
70
|
+
})).find((row) => row.externalId === externalId) ?? null;
|
|
71
|
+
},
|
|
72
|
+
findBySlug: async ({ orgId, installationId, slug }) => {
|
|
73
|
+
return (await this.repositories.list({
|
|
74
|
+
orgId,
|
|
75
|
+
installationId
|
|
76
|
+
})).find((row) => row.slug === slug) ?? null;
|
|
77
|
+
},
|
|
78
|
+
upsert: async ({ orgId, input }) => {
|
|
79
|
+
if (!await this.installations.get({
|
|
80
|
+
orgId,
|
|
81
|
+
id: input.installationId
|
|
82
|
+
})) throw new Error("Source-control installation not found");
|
|
83
|
+
const existing = this.repositoriesRows.find((row) => row.installationId === input.installationId && row.externalId === input.externalId);
|
|
84
|
+
const now = /* @__PURE__ */ new Date();
|
|
85
|
+
if (existing) {
|
|
86
|
+
Object.assign(existing, {
|
|
87
|
+
slug: input.slug,
|
|
88
|
+
defaultBranch: input.defaultBranch,
|
|
89
|
+
providerMetadata: input.providerMetadata ?? {},
|
|
90
|
+
updatedAt: now
|
|
91
|
+
});
|
|
92
|
+
return existing;
|
|
93
|
+
}
|
|
94
|
+
const created = {
|
|
95
|
+
id: globalThis.crypto.randomUUID(),
|
|
96
|
+
installationId: input.installationId,
|
|
97
|
+
externalId: input.externalId,
|
|
98
|
+
slug: input.slug,
|
|
99
|
+
defaultBranch: input.defaultBranch,
|
|
100
|
+
providerMetadata: input.providerMetadata ?? {},
|
|
101
|
+
createdAt: now,
|
|
102
|
+
updatedAt: now
|
|
103
|
+
};
|
|
104
|
+
this.repositoriesRows.push(created);
|
|
105
|
+
return created;
|
|
106
|
+
},
|
|
107
|
+
migrateInstallation: async ({ orgId, id, newInstallationId }) => {
|
|
108
|
+
const existing = await this.repositories.get({
|
|
109
|
+
orgId,
|
|
110
|
+
id
|
|
111
|
+
});
|
|
112
|
+
if (!existing) throw new Error(`Repository ${id} not found in organization ${orgId}`);
|
|
113
|
+
if (!await this.installations.get({
|
|
114
|
+
orgId,
|
|
115
|
+
id: newInstallationId
|
|
116
|
+
})) throw new Error("Source-control installation not found");
|
|
117
|
+
const conflict = this.repositoriesRows.find((row) => row.installationId === newInstallationId && row.externalId === existing.externalId);
|
|
118
|
+
if (conflict) return conflict;
|
|
119
|
+
existing.installationId = newInstallationId;
|
|
120
|
+
existing.updatedAt = /* @__PURE__ */ new Date();
|
|
121
|
+
for (const conn of this.connectionsRows) if (conn.installationId === existing.installationId) conn.installationId = newInstallationId;
|
|
122
|
+
return existing;
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
connections = {
|
|
126
|
+
list: async ({ factoryProjectId }) => this.connectionsRows.filter((row) => row.factoryProjectId === factoryProjectId),
|
|
127
|
+
get: async ({ orgId, id }) => {
|
|
128
|
+
const row = this.connectionsRows.find((candidate) => candidate.id === id);
|
|
129
|
+
if (!row) return null;
|
|
130
|
+
return await this.installations.get({
|
|
131
|
+
orgId,
|
|
132
|
+
id: row.installationId
|
|
133
|
+
}) ? row : null;
|
|
134
|
+
},
|
|
135
|
+
create: async (input) => {
|
|
136
|
+
if (!await this.installations.get({
|
|
137
|
+
orgId: input.orgId,
|
|
138
|
+
id: input.installationId
|
|
139
|
+
})) throw new Error("Source-control installation not found");
|
|
140
|
+
const existing = this.connectionsRows.find((row) => row.factoryProjectId === input.factoryProjectId && row.integrationId === this.integrationId && row.installationId === input.installationId);
|
|
141
|
+
if (existing) return existing;
|
|
142
|
+
const created = {
|
|
143
|
+
id: globalThis.crypto.randomUUID(),
|
|
144
|
+
factoryProjectId: input.factoryProjectId,
|
|
145
|
+
integrationId: this.integrationId,
|
|
146
|
+
installationId: input.installationId,
|
|
147
|
+
createdByUserId: input.createdByUserId,
|
|
148
|
+
createdAt: /* @__PURE__ */ new Date()
|
|
149
|
+
};
|
|
150
|
+
this.connectionsRows.push(created);
|
|
151
|
+
return created;
|
|
152
|
+
},
|
|
153
|
+
delete: async ({ orgId, id }) => {
|
|
154
|
+
if (!await this.connections.get({
|
|
155
|
+
orgId,
|
|
156
|
+
id
|
|
157
|
+
})) return false;
|
|
158
|
+
for (const link of this.projectRepositoriesRows.filter((row) => row.connectionId === id)) await this.projectRepositories.unlink({
|
|
159
|
+
orgId,
|
|
160
|
+
id: link.id
|
|
161
|
+
});
|
|
162
|
+
this.connectionsRows.splice(0, this.connectionsRows.length, ...this.connectionsRows.filter((row) => row.id !== id));
|
|
163
|
+
return true;
|
|
164
|
+
}
|
|
165
|
+
};
|
|
166
|
+
projectRepositories = {
|
|
167
|
+
list: async ({ orgId, connectionId }) => await this.connections.get({
|
|
168
|
+
orgId,
|
|
169
|
+
id: connectionId
|
|
170
|
+
}) ? this.projectRepositoriesRows.filter((row) => row.connectionId === connectionId) : [],
|
|
171
|
+
listConfiguredExternalKeys: async () => {
|
|
172
|
+
const keys = /* @__PURE__ */ new Map();
|
|
173
|
+
for (const connection of this.connectionsRows.filter((row) => row.integrationId === this.integrationId)) {
|
|
174
|
+
const installation = this.installationsRows.find((row) => row.id === connection.installationId);
|
|
175
|
+
if (!installation) continue;
|
|
176
|
+
for (const link of this.projectRepositoriesRows.filter((row) => row.connectionId === connection.id)) {
|
|
177
|
+
const repository = this.repositoriesRows.find((row) => row.id === link.repositoryId);
|
|
178
|
+
if (!repository) continue;
|
|
179
|
+
keys.set(`${installation.externalId}\u0000${repository.externalId}`, {
|
|
180
|
+
installationExternalId: installation.externalId,
|
|
181
|
+
repositoryExternalId: repository.externalId
|
|
182
|
+
});
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
return [...keys.values()];
|
|
186
|
+
},
|
|
187
|
+
listByExternalRepository: async ({ installationExternalId, repositoryExternalId }) => {
|
|
188
|
+
const targets = [];
|
|
189
|
+
for (const installation of this.installationsRows.filter((row) => row.externalId === installationExternalId)) {
|
|
190
|
+
const repository = this.repositoriesRows.find((row) => row.installationId === installation.id && row.externalId === repositoryExternalId);
|
|
191
|
+
if (!repository) continue;
|
|
192
|
+
for (const projectRepository of this.projectRepositoriesRows.filter((row) => row.repositoryId === repository.id)) {
|
|
193
|
+
const connection = this.connectionsRows.find((row) => row.id === projectRepository.connectionId && row.installationId === installation.id && row.integrationId === this.integrationId);
|
|
194
|
+
if (!connection) continue;
|
|
195
|
+
targets.push({
|
|
196
|
+
orgId: installation.orgId,
|
|
197
|
+
factoryProjectId: connection.factoryProjectId,
|
|
198
|
+
projectRepository
|
|
199
|
+
});
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
return targets;
|
|
203
|
+
},
|
|
204
|
+
listByProject: async ({ orgId, factoryProjectId }) => {
|
|
205
|
+
const connectionIds = new Set((await this.connections.list({
|
|
206
|
+
orgId,
|
|
207
|
+
factoryProjectId
|
|
208
|
+
})).filter((row) => row.integrationId === this.integrationId).map((row) => row.id));
|
|
209
|
+
return this.projectRepositoriesRows.filter((row) => connectionIds.has(row.connectionId)).sort((a, b) => a.position - b.position || a.createdAt.getTime() - b.createdAt.getTime());
|
|
210
|
+
},
|
|
211
|
+
get: async ({ orgId, id }) => {
|
|
212
|
+
const row = this.projectRepositoriesRows.find((candidate) => candidate.id === id);
|
|
213
|
+
if (!row) return null;
|
|
214
|
+
return await this.connections.get({
|
|
215
|
+
orgId,
|
|
216
|
+
id: row.connectionId
|
|
217
|
+
}) ? row : null;
|
|
218
|
+
},
|
|
219
|
+
link: async (input) => {
|
|
220
|
+
const connection = await this.connections.get({
|
|
221
|
+
orgId: input.orgId,
|
|
222
|
+
id: input.connectionId
|
|
223
|
+
});
|
|
224
|
+
const repository = await this.repositories.get({
|
|
225
|
+
orgId: input.orgId,
|
|
226
|
+
id: input.repositoryId
|
|
227
|
+
});
|
|
228
|
+
if (!connection || !repository || repository.installationId !== connection.installationId) throw new Error("Source-control connection or repository not found");
|
|
229
|
+
const existing = this.projectRepositoriesRows.find((row) => row.connectionId === input.connectionId && row.repositoryId === input.repositoryId);
|
|
230
|
+
if (existing) return existing;
|
|
231
|
+
const siblingConnectionIds = new Set(this.connectionsRows.filter((row) => row.factoryProjectId === connection.factoryProjectId).map((row) => row.id));
|
|
232
|
+
const siblings = this.projectRepositoriesRows.filter((row) => siblingConnectionIds.has(row.connectionId));
|
|
233
|
+
const position = 1 + Math.max(0, ...siblings.map((row) => row.position));
|
|
234
|
+
const inEnvironment = !siblings.some((row) => row.inEnvironment && this.repositoriesRows.find((candidate) => candidate.id === row.repositoryId)?.slug === repository.slug);
|
|
235
|
+
const now = /* @__PURE__ */ new Date();
|
|
236
|
+
const created = {
|
|
237
|
+
id: globalThis.crypto.randomUUID(),
|
|
238
|
+
connectionId: input.connectionId,
|
|
239
|
+
repositoryId: input.repositoryId,
|
|
240
|
+
createdByUserId: input.createdByUserId,
|
|
241
|
+
branch: input.branch ?? null,
|
|
242
|
+
sandboxProvider: input.sandboxProvider,
|
|
243
|
+
sandboxWorkdir: input.sandboxWorkdir,
|
|
244
|
+
setupCommand: input.setupCommand ?? null,
|
|
245
|
+
teardownCommand: input.teardownCommand ?? null,
|
|
246
|
+
position,
|
|
247
|
+
inEnvironment,
|
|
248
|
+
lastBuildStatus: "unbuilt",
|
|
249
|
+
lastBuildError: null,
|
|
250
|
+
lastBuiltAt: null,
|
|
251
|
+
createdAt: now,
|
|
252
|
+
updatedAt: now
|
|
253
|
+
};
|
|
254
|
+
this.projectRepositoriesRows.push(created);
|
|
255
|
+
return created;
|
|
256
|
+
},
|
|
257
|
+
update: async ({ orgId, id, input }) => {
|
|
258
|
+
const row = await this.projectRepositories.get({
|
|
259
|
+
orgId,
|
|
260
|
+
id
|
|
261
|
+
});
|
|
262
|
+
if (!row) return null;
|
|
263
|
+
Object.assign(row, input, { updatedAt: /* @__PURE__ */ new Date() });
|
|
264
|
+
return row;
|
|
265
|
+
},
|
|
266
|
+
setBuildStatus: async ({ orgId, id, status, error, builtAt }) => {
|
|
267
|
+
const row = await this.projectRepositories.get({
|
|
268
|
+
orgId,
|
|
269
|
+
id
|
|
270
|
+
});
|
|
271
|
+
if (!row) return null;
|
|
272
|
+
Object.assign(row, {
|
|
273
|
+
lastBuildStatus: status,
|
|
274
|
+
lastBuildError: error ?? null,
|
|
275
|
+
lastBuiltAt: builtAt ?? null,
|
|
276
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
277
|
+
});
|
|
278
|
+
return row;
|
|
279
|
+
},
|
|
280
|
+
unlink: async ({ orgId, id }) => {
|
|
281
|
+
if (!await this.projectRepositories.get({
|
|
282
|
+
orgId,
|
|
283
|
+
id
|
|
284
|
+
})) return false;
|
|
285
|
+
const sessionIds = new Set(this.sessionsRows.filter((row) => row.projectRepositoryId === id).map((r) => r.sessionId));
|
|
286
|
+
this.sessionRepositoriesRows = this.sessionRepositoriesRows.filter((row) => row.projectRepositoryId !== id && !sessionIds.has(row.sessionId));
|
|
287
|
+
this.sessionsRows.splice(0, this.sessionsRows.length, ...this.sessionsRows.filter((row) => row.projectRepositoryId !== id));
|
|
288
|
+
this.projectRepositoriesRows.splice(0, this.projectRepositoriesRows.length, ...this.projectRepositoriesRows.filter((row) => row.id !== id));
|
|
289
|
+
return true;
|
|
290
|
+
}
|
|
291
|
+
};
|
|
292
|
+
sessions = {
|
|
293
|
+
list: async ({ projectRepositoryId, viewerUserId }) => this.sessionsRows.filter((row) => row.projectRepositoryId === projectRepositoryId && (row.visibility !== "private" || row.userId === viewerUserId)),
|
|
294
|
+
listByProjectRepository: async ({ projectRepositoryId }) => this.sessionsRows.filter((row) => row.projectRepositoryId === projectRepositoryId),
|
|
295
|
+
listByProject: async ({ orgId, factoryProjectId, viewerUserId }) => {
|
|
296
|
+
const connectionIds = new Set(this.connectionsRows.filter((row) => row.factoryProjectId === factoryProjectId).map((row) => row.id));
|
|
297
|
+
const linkIds = new Set(this.projectRepositoriesRows.filter((row) => connectionIds.has(row.connectionId)).map((row) => row.id));
|
|
298
|
+
return this.sessionsRows.filter((row) => row.factoryProjectId === factoryProjectId && row.orgId === orgId && row.projectRepositoryId !== null && linkIds.has(row.projectRepositoryId) && (row.visibility !== "private" || row.userId === viewerUserId));
|
|
299
|
+
},
|
|
300
|
+
getBySessionId: async (sessionId) => {
|
|
301
|
+
const row = this.sessionsRows.find((candidate) => candidate.sessionId === sessionId);
|
|
302
|
+
if (!row) return null;
|
|
303
|
+
return this.projectRepositoriesRows.some((link) => link.id === row.projectRepositoryId) ? row : null;
|
|
304
|
+
},
|
|
305
|
+
rename: async ({ sessionId, title }) => {
|
|
306
|
+
const row = this.sessionsRows.find((candidate) => candidate.sessionId === sessionId);
|
|
307
|
+
if (row) {
|
|
308
|
+
row.title = title;
|
|
309
|
+
row.updatedAt = /* @__PURE__ */ new Date();
|
|
310
|
+
}
|
|
311
|
+
},
|
|
312
|
+
getForBranch: async (args) => this.sessionsRows.find((row) => ("factoryProjectId" in args ? row.factoryProjectId === args.factoryProjectId && this.projectRepositoriesRows.some((link) => link.id === row.projectRepositoryId) : row.projectRepositoryId === args.projectRepositoryId) && row.userId === args.userId && row.branch === args.branch) ?? null,
|
|
313
|
+
create: async (input) => {
|
|
314
|
+
const link = this.projectRepositoriesRows.find((row) => row.id === input.projectRepositoryId);
|
|
315
|
+
const connection = link && this.connectionsRows.find((row) => row.id === link.connectionId);
|
|
316
|
+
if (!connection) throw new Error("Project repository not found for this integration.");
|
|
317
|
+
if (input.factoryProjectId !== void 0 && input.factoryProjectId !== connection.factoryProjectId) throw new Error("Session factory does not match the repository link.");
|
|
318
|
+
const factoryProjectId = connection.factoryProjectId;
|
|
319
|
+
const existing = await this.sessions.getForBranch({
|
|
320
|
+
projectRepositoryId: input.projectRepositoryId,
|
|
321
|
+
userId: input.userId,
|
|
322
|
+
branch: input.branch
|
|
323
|
+
});
|
|
324
|
+
if (existing) return existing;
|
|
325
|
+
if (this.sessionsRows.some((row) => row.sessionId === input.sessionId)) throw new UniqueViolationError("Source-control session ID already exists");
|
|
326
|
+
if (this.sessionsRows.some((row) => row.factoryProjectId === factoryProjectId && row.userId === input.userId && row.branch === input.branch)) throw new UniqueViolationError("Source-control session branch already exists in this factory");
|
|
327
|
+
const now = /* @__PURE__ */ new Date();
|
|
328
|
+
const session = {
|
|
329
|
+
id: globalThis.crypto.randomUUID(),
|
|
330
|
+
...input,
|
|
331
|
+
factoryProjectId,
|
|
332
|
+
title: input.title ?? null,
|
|
333
|
+
visibility: input.visibility ?? "org",
|
|
334
|
+
sandboxId: null,
|
|
335
|
+
sandboxWorkdir: null,
|
|
336
|
+
materializedAt: null,
|
|
337
|
+
firstMessageAt: null,
|
|
338
|
+
firstMeaningfulExecAt: null,
|
|
339
|
+
createdAt: now,
|
|
340
|
+
updatedAt: now
|
|
341
|
+
};
|
|
342
|
+
this.sessionsRows.push(session);
|
|
343
|
+
return session;
|
|
344
|
+
},
|
|
345
|
+
setSandbox: async ({ id, sandboxId, sandboxWorkdir }) => {
|
|
346
|
+
const row = this.sessionsRows.find((candidate) => candidate.id === id);
|
|
347
|
+
if (row) Object.assign(row, {
|
|
348
|
+
sandboxId,
|
|
349
|
+
sandboxWorkdir,
|
|
350
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
351
|
+
});
|
|
352
|
+
},
|
|
353
|
+
markMaterialized: async ({ id }) => {
|
|
354
|
+
const row = this.sessionsRows.find((candidate) => candidate.id === id);
|
|
355
|
+
if (row && row.materializedAt === null) Object.assign(row, {
|
|
356
|
+
materializedAt: /* @__PURE__ */ new Date(),
|
|
357
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
358
|
+
});
|
|
359
|
+
},
|
|
360
|
+
markFirstMessage: async ({ sessionId }) => {
|
|
361
|
+
const row = this.sessionsRows.find((candidate) => candidate.sessionId === sessionId);
|
|
362
|
+
if (row && row.firstMessageAt === null) Object.assign(row, {
|
|
363
|
+
firstMessageAt: /* @__PURE__ */ new Date(),
|
|
364
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
365
|
+
});
|
|
366
|
+
},
|
|
367
|
+
markFirstMeaningfulExec: async ({ sessionId }) => {
|
|
368
|
+
const row = this.sessionsRows.find((candidate) => candidate.sessionId === sessionId);
|
|
369
|
+
if (row && row.firstMeaningfulExecAt === null) Object.assign(row, {
|
|
370
|
+
firstMeaningfulExecAt: /* @__PURE__ */ new Date(),
|
|
371
|
+
updatedAt: /* @__PURE__ */ new Date()
|
|
372
|
+
});
|
|
373
|
+
},
|
|
374
|
+
delete: async (id) => {
|
|
375
|
+
const row = this.sessionsRows.find((candidate) => candidate.id === id);
|
|
376
|
+
if (row) this.sessionRepositoriesRows = this.sessionRepositoriesRows.filter((r) => r.sessionId !== row.sessionId);
|
|
377
|
+
this.sessionsRows.splice(0, this.sessionsRows.length, ...this.sessionsRows.filter((row) => row.id !== id));
|
|
378
|
+
}
|
|
379
|
+
};
|
|
380
|
+
sessionRepositories = {
|
|
381
|
+
upsert: async (input) => {
|
|
382
|
+
const now = /* @__PURE__ */ new Date();
|
|
383
|
+
const existing = this.sessionRepositoriesRows.find((row) => row.sessionId === input.sessionId && row.projectRepositoryId === input.projectRepositoryId);
|
|
384
|
+
if (existing) {
|
|
385
|
+
if (input.branch !== void 0) {
|
|
386
|
+
existing.branch = input.branch;
|
|
387
|
+
existing.pushedAt = input.pushedAt ?? now;
|
|
388
|
+
} else if (input.pushedAt) existing.pushedAt = input.pushedAt;
|
|
389
|
+
if (input.changeRequestId !== void 0) existing.changeRequestId = input.changeRequestId;
|
|
390
|
+
if (input.changeRequestUrl !== void 0) existing.changeRequestUrl = input.changeRequestUrl;
|
|
391
|
+
existing.updatedAt = now;
|
|
392
|
+
return existing;
|
|
393
|
+
}
|
|
394
|
+
const branch = input.branch ?? input.fallbackBranch;
|
|
395
|
+
if (!branch) throw new Error("A session repository row needs a branch when it is first recorded.");
|
|
396
|
+
const created = {
|
|
397
|
+
id: globalThis.crypto.randomUUID(),
|
|
398
|
+
sessionId: input.sessionId,
|
|
399
|
+
projectRepositoryId: input.projectRepositoryId,
|
|
400
|
+
branch,
|
|
401
|
+
changeRequestId: input.changeRequestId ?? null,
|
|
402
|
+
changeRequestUrl: input.changeRequestUrl ?? null,
|
|
403
|
+
pushedAt: input.pushedAt ?? now,
|
|
404
|
+
updatedAt: now,
|
|
405
|
+
createdAt: now
|
|
406
|
+
};
|
|
407
|
+
this.sessionRepositoriesRows.push(created);
|
|
408
|
+
return created;
|
|
409
|
+
},
|
|
410
|
+
listBySession: async ({ sessionId }) => this.sessionRepositoriesRows.filter((row) => row.sessionId === sessionId)
|
|
411
|
+
};
|
|
412
|
+
};
|
|
413
|
+
//#endregion
|
|
414
|
+
export { SourceControlStorageInMemory };
|
|
415
|
+
|
|
416
|
+
//# sourceMappingURL=inmemory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inmemory.js","names":[],"sources":["../../../../src/storage/domains/source-control/inmemory.ts"],"sourcesContent":["import { UniqueViolationError } from '@mastra/core/storage';\n\nimport type {\n ConfiguredExternalRepositoryKey,\n CreateProjectSourceControlConnectionInput,\n CreateSourceControlSessionInput,\n ExternalRepositoryProjectTarget,\n LinkProjectRepositoryInput,\n ProjectRepository,\n ProjectSourceControlConnection,\n SessionBranchKey,\n SetProjectRepositoryBuildStatusInput,\n SourceControlInstallation,\n SourceControlRepository,\n SourceControlSession,\n SourceControlSessionRepository,\n SourceControlStorageHandle,\n UpdateProjectRepositoryInput,\n UpsertSessionRepositoryInput,\n UpsertSourceControlInstallationInput,\n UpsertSourceControlRepositoryInput,\n} from './base.js';\n\n/** In-memory provider-scoped source-control handle for route tests. */\nexport class SourceControlStorageInMemory implements SourceControlStorageHandle {\n readonly integrationId: string;\n installationsRows: SourceControlInstallation[] = [];\n repositoriesRows: SourceControlRepository[] = [];\n connectionsRows: ProjectSourceControlConnection[] = [];\n projectRepositoriesRows: ProjectRepository[] = [];\n sessionsRows: SourceControlSession[] = [];\n sessionRepositoriesRows: SourceControlSessionRepository[] = [];\n\n constructor(integrationId = 'github') {\n this.integrationId = integrationId;\n }\n\n readonly installations = {\n list: async ({ orgId }: { orgId: string }): Promise<SourceControlInstallation[]> =>\n this.installationsRows.filter(row => row.orgId === orgId),\n get: async ({ orgId, id }: { orgId: string; id: string }): Promise<SourceControlInstallation | null> =>\n this.installationsRows.find(row => row.orgId === orgId && row.id === id) ?? null,\n findByExternalId: async ({\n orgId,\n externalId,\n }: {\n orgId: string;\n externalId: string;\n }): Promise<SourceControlInstallation | null> =>\n this.installationsRows.find(row => row.orgId === orgId && row.externalId === externalId) ?? null,\n upsert: async (input: UpsertSourceControlInstallationInput): Promise<SourceControlInstallation> => {\n const existing = this.installationsRows.find(\n row => row.orgId === input.orgId && row.externalId === input.externalId,\n );\n if (existing) {\n Object.assign(existing, {\n connectedByUserId: input.connectedByUserId,\n accountName: input.accountName ?? null,\n accountType: input.accountType ?? null,\n providerMetadata: input.providerMetadata ?? {},\n });\n return existing;\n }\n const created: SourceControlInstallation = {\n id: globalThis.crypto.randomUUID(),\n integrationId: this.integrationId,\n orgId: input.orgId,\n connectedByUserId: input.connectedByUserId,\n externalId: input.externalId,\n accountName: input.accountName ?? null,\n accountType: input.accountType ?? null,\n providerMetadata: input.providerMetadata ?? {},\n createdAt: new Date(),\n };\n this.installationsRows.push(created);\n return created;\n },\n delete: async ({ orgId, id }: { orgId: string; id: string }): Promise<boolean> => {\n const index = this.installationsRows.findIndex(row => row.orgId === orgId && row.id === id);\n if (index < 0) return false;\n this.installationsRows.splice(index, 1);\n return true;\n },\n };\n\n readonly repositories = {\n list: async ({ orgId, installationId }: { orgId: string; installationId: string }) => {\n const installation = await this.installations.get({ orgId, id: installationId });\n return installation ? this.repositoriesRows.filter(row => row.installationId === installationId) : [];\n },\n get: async ({ orgId, id }: { orgId: string; id: string }): Promise<SourceControlRepository | null> => {\n const row = this.repositoriesRows.find(candidate => candidate.id === id);\n if (!row) return null;\n return (await this.installations.get({ orgId, id: row.installationId })) ? row : null;\n },\n findByExternalId: async ({\n orgId,\n installationId,\n externalId,\n }: {\n orgId: string;\n installationId: string;\n externalId: string;\n }) => {\n const rows = await this.repositories.list({ orgId, installationId });\n return rows.find(row => row.externalId === externalId) ?? null;\n },\n findBySlug: async ({ orgId, installationId, slug }: { orgId: string; installationId: string; slug: string }) => {\n const rows = await this.repositories.list({ orgId, installationId });\n return rows.find(row => row.slug === slug) ?? null;\n },\n upsert: async ({\n orgId,\n input,\n }: {\n orgId: string;\n input: UpsertSourceControlRepositoryInput;\n }): Promise<SourceControlRepository> => {\n if (!(await this.installations.get({ orgId, id: input.installationId }))) {\n throw new Error('Source-control installation not found');\n }\n const existing = this.repositoriesRows.find(\n row => row.installationId === input.installationId && row.externalId === input.externalId,\n );\n const now = new Date();\n if (existing) {\n Object.assign(existing, {\n slug: input.slug,\n defaultBranch: input.defaultBranch,\n providerMetadata: input.providerMetadata ?? {},\n updatedAt: now,\n });\n return existing;\n }\n const created: SourceControlRepository = {\n id: globalThis.crypto.randomUUID(),\n installationId: input.installationId,\n externalId: input.externalId,\n slug: input.slug,\n defaultBranch: input.defaultBranch,\n providerMetadata: input.providerMetadata ?? {},\n createdAt: now,\n updatedAt: now,\n };\n this.repositoriesRows.push(created);\n return created;\n },\n migrateInstallation: async ({\n orgId,\n id,\n newInstallationId,\n }: {\n orgId: string;\n id: string;\n newInstallationId: string;\n }) => {\n const existing = await this.repositories.get({ orgId, id });\n if (!existing) {\n throw new Error(`Repository ${id} not found in organization ${orgId}`);\n }\n if (!(await this.installations.get({ orgId, id: newInstallationId }))) {\n throw new Error('Source-control installation not found');\n }\n // Check if a repository with the same external_id exists under the new installation\n const conflict = this.repositoriesRows.find(\n row => row.installationId === newInstallationId && row.externalId === existing.externalId,\n );\n if (conflict) {\n // Return the existing repository under the new installation\n return conflict;\n }\n // Update the repository's installation\n existing.installationId = newInstallationId;\n existing.updatedAt = new Date();\n // Migrate dependent connections to the new installation\n for (const conn of this.connectionsRows) {\n if (conn.installationId === existing.installationId) {\n conn.installationId = newInstallationId;\n }\n }\n return existing;\n },\n };\n\n readonly connections = {\n list: async ({ factoryProjectId }: { orgId: string; factoryProjectId: string }) =>\n this.connectionsRows.filter(row => row.factoryProjectId === factoryProjectId),\n get: async ({ orgId, id }: { orgId: string; id: string }): Promise<ProjectSourceControlConnection | null> => {\n const row = this.connectionsRows.find(candidate => candidate.id === id);\n if (!row) return null;\n return (await this.installations.get({ orgId, id: row.installationId })) ? row : null;\n },\n create: async (input: CreateProjectSourceControlConnectionInput): Promise<ProjectSourceControlConnection> => {\n if (!(await this.installations.get({ orgId: input.orgId, id: input.installationId }))) {\n throw new Error('Source-control installation not found');\n }\n const existing = this.connectionsRows.find(\n row =>\n row.factoryProjectId === input.factoryProjectId &&\n row.integrationId === this.integrationId &&\n row.installationId === input.installationId,\n );\n if (existing) return existing;\n const created: ProjectSourceControlConnection = {\n id: globalThis.crypto.randomUUID(),\n factoryProjectId: input.factoryProjectId,\n integrationId: this.integrationId,\n installationId: input.installationId,\n createdByUserId: input.createdByUserId,\n createdAt: new Date(),\n };\n this.connectionsRows.push(created);\n return created;\n },\n delete: async ({ orgId, id }: { orgId: string; id: string }): Promise<boolean> => {\n if (!(await this.connections.get({ orgId, id }))) return false;\n for (const link of this.projectRepositoriesRows.filter(row => row.connectionId === id)) {\n await this.projectRepositories.unlink({ orgId, id: link.id });\n }\n this.connectionsRows.splice(0, this.connectionsRows.length, ...this.connectionsRows.filter(row => row.id !== id));\n return true;\n },\n };\n\n readonly projectRepositories = {\n list: async ({ orgId, connectionId }: { orgId: string; connectionId: string }) =>\n (await this.connections.get({ orgId, id: connectionId }))\n ? this.projectRepositoriesRows.filter(row => row.connectionId === connectionId)\n : [],\n listConfiguredExternalKeys: async (): Promise<ConfiguredExternalRepositoryKey[]> => {\n const keys = new Map<string, ConfiguredExternalRepositoryKey>();\n for (const connection of this.connectionsRows.filter(row => row.integrationId === this.integrationId)) {\n const installation = this.installationsRows.find(row => row.id === connection.installationId);\n if (!installation) continue;\n for (const link of this.projectRepositoriesRows.filter(row => row.connectionId === connection.id)) {\n const repository = this.repositoriesRows.find(row => row.id === link.repositoryId);\n if (!repository) continue;\n keys.set(`${installation.externalId}\\u0000${repository.externalId}`, {\n installationExternalId: installation.externalId,\n repositoryExternalId: repository.externalId,\n });\n }\n }\n return [...keys.values()];\n },\n listByExternalRepository: async ({\n installationExternalId,\n repositoryExternalId,\n }: {\n installationExternalId: string;\n repositoryExternalId: string;\n }): Promise<ExternalRepositoryProjectTarget[]> => {\n const targets: ExternalRepositoryProjectTarget[] = [];\n for (const installation of this.installationsRows.filter(row => row.externalId === installationExternalId)) {\n const repository = this.repositoriesRows.find(\n row => row.installationId === installation.id && row.externalId === repositoryExternalId,\n );\n if (!repository) continue;\n for (const projectRepository of this.projectRepositoriesRows.filter(\n row => row.repositoryId === repository.id,\n )) {\n const connection = this.connectionsRows.find(\n row =>\n row.id === projectRepository.connectionId &&\n row.installationId === installation.id &&\n row.integrationId === this.integrationId,\n );\n if (!connection) continue;\n targets.push({\n orgId: installation.orgId,\n factoryProjectId: connection.factoryProjectId,\n projectRepository,\n });\n }\n }\n return targets;\n },\n listByProject: async ({ orgId, factoryProjectId }: { orgId: string; factoryProjectId: string }) => {\n const connectionIds = new Set(\n (await this.connections.list({ orgId, factoryProjectId }))\n .filter(row => row.integrationId === this.integrationId)\n .map(row => row.id),\n );\n return this.projectRepositoriesRows\n .filter(row => connectionIds.has(row.connectionId))\n .sort((a, b) => a.position - b.position || a.createdAt.getTime() - b.createdAt.getTime());\n },\n get: async ({ orgId, id }: { orgId: string; id: string }): Promise<ProjectRepository | null> => {\n const row = this.projectRepositoriesRows.find(candidate => candidate.id === id);\n if (!row) return null;\n return (await this.connections.get({ orgId, id: row.connectionId })) ? row : null;\n },\n link: async (input: LinkProjectRepositoryInput): Promise<ProjectRepository> => {\n const connection = await this.connections.get({ orgId: input.orgId, id: input.connectionId });\n const repository = await this.repositories.get({ orgId: input.orgId, id: input.repositoryId });\n if (!connection || !repository || repository.installationId !== connection.installationId) {\n throw new Error('Source-control connection or repository not found');\n }\n const existing = this.projectRepositoriesRows.find(\n row => row.connectionId === input.connectionId && row.repositoryId === input.repositoryId,\n );\n if (existing) return existing;\n // Mirrors base.ts: order and dedupe span every connection of the project.\n const siblingConnectionIds = new Set(\n this.connectionsRows.filter(row => row.factoryProjectId === connection.factoryProjectId).map(row => row.id),\n );\n const siblings = this.projectRepositoriesRows.filter(row => siblingConnectionIds.has(row.connectionId));\n const position = 1 + Math.max(0, ...siblings.map(row => row.position));\n const inEnvironment = !siblings.some(\n row =>\n row.inEnvironment &&\n this.repositoriesRows.find(candidate => candidate.id === row.repositoryId)?.slug === repository.slug,\n );\n const now = new Date();\n const created: ProjectRepository = {\n id: globalThis.crypto.randomUUID(),\n connectionId: input.connectionId,\n repositoryId: input.repositoryId,\n createdByUserId: input.createdByUserId,\n branch: input.branch ?? null,\n sandboxProvider: input.sandboxProvider,\n sandboxWorkdir: input.sandboxWorkdir,\n setupCommand: input.setupCommand ?? null,\n teardownCommand: input.teardownCommand ?? null,\n position,\n inEnvironment,\n lastBuildStatus: 'unbuilt',\n lastBuildError: null,\n lastBuiltAt: null,\n createdAt: now,\n updatedAt: now,\n };\n this.projectRepositoriesRows.push(created);\n return created;\n },\n update: async ({\n orgId,\n id,\n input,\n }: {\n orgId: string;\n id: string;\n input: UpdateProjectRepositoryInput;\n }): Promise<ProjectRepository | null> => {\n const row = await this.projectRepositories.get({ orgId, id });\n if (!row) return null;\n Object.assign(row, input, { updatedAt: new Date() });\n return row;\n },\n setBuildStatus: async ({\n orgId,\n id,\n status,\n error,\n builtAt,\n }: SetProjectRepositoryBuildStatusInput): Promise<ProjectRepository | null> => {\n const row = await this.projectRepositories.get({ orgId, id });\n if (!row) return null;\n Object.assign(row, {\n lastBuildStatus: status,\n lastBuildError: error ?? null,\n lastBuiltAt: builtAt ?? null,\n updatedAt: new Date(),\n });\n return row;\n },\n unlink: async ({ orgId, id }: { orgId: string; id: string }): Promise<boolean> => {\n if (!(await this.projectRepositories.get({ orgId, id }))) return false;\n const sessionIds = new Set(this.sessionsRows.filter(row => row.projectRepositoryId === id).map(r => r.sessionId));\n this.sessionRepositoriesRows = this.sessionRepositoriesRows.filter(\n row => row.projectRepositoryId !== id && !sessionIds.has(row.sessionId),\n );\n this.sessionsRows.splice(\n 0,\n this.sessionsRows.length,\n ...this.sessionsRows.filter(row => row.projectRepositoryId !== id),\n );\n this.projectRepositoriesRows.splice(\n 0,\n this.projectRepositoriesRows.length,\n ...this.projectRepositoriesRows.filter(row => row.id !== id),\n );\n return true;\n },\n };\n\n readonly sessions = {\n list: async ({ projectRepositoryId, viewerUserId }: { projectRepositoryId: string; viewerUserId: string }) =>\n this.sessionsRows.filter(\n row =>\n row.projectRepositoryId === projectRepositoryId &&\n (row.visibility !== 'private' || row.userId === viewerUserId),\n ),\n listByProjectRepository: async ({ projectRepositoryId }: { projectRepositoryId: string }) =>\n this.sessionsRows.filter(row => row.projectRepositoryId === projectRepositoryId),\n listByProject: async ({\n orgId,\n factoryProjectId,\n viewerUserId,\n }: {\n orgId: string;\n factoryProjectId: string;\n viewerUserId: string;\n }) => {\n const connectionIds = new Set(\n this.connectionsRows.filter(row => row.factoryProjectId === factoryProjectId).map(row => row.id),\n );\n const linkIds = new Set(\n this.projectRepositoriesRows.filter(row => connectionIds.has(row.connectionId)).map(row => row.id),\n );\n return this.sessionsRows.filter(\n row =>\n row.factoryProjectId === factoryProjectId &&\n row.orgId === orgId &&\n row.projectRepositoryId !== null &&\n linkIds.has(row.projectRepositoryId) &&\n (row.visibility !== 'private' || row.userId === viewerUserId),\n );\n },\n getBySessionId: async (sessionId: string): Promise<SourceControlSession | null> => {\n const row = this.sessionsRows.find(candidate => candidate.sessionId === sessionId);\n if (!row) return null;\n // Mirrors base.ts: a session whose project-repository link is gone does not resolve.\n return this.projectRepositoriesRows.some(link => link.id === row.projectRepositoryId) ? row : null;\n },\n rename: async ({ sessionId, title }: { sessionId: string; title: string }): Promise<void> => {\n const row = this.sessionsRows.find(candidate => candidate.sessionId === sessionId);\n if (row) {\n row.title = title;\n row.updatedAt = new Date();\n }\n },\n getForBranch: async (args: SessionBranchKey): Promise<SourceControlSession | null> =>\n this.sessionsRows.find(\n row =>\n ('factoryProjectId' in args\n ? row.factoryProjectId === args.factoryProjectId &&\n // Mirrors base.ts: only sessions on this integration's links resolve.\n this.projectRepositoriesRows.some(link => link.id === row.projectRepositoryId)\n : row.projectRepositoryId === args.projectRepositoryId) &&\n row.userId === args.userId &&\n row.branch === args.branch,\n ) ?? null,\n create: async (input: CreateSourceControlSessionInput): Promise<SourceControlSession> => {\n const link = this.projectRepositoriesRows.find(row => row.id === input.projectRepositoryId);\n const connection = link && this.connectionsRows.find(row => row.id === link.connectionId);\n if (!connection) throw new Error('Project repository not found for this integration.');\n if (input.factoryProjectId !== undefined && input.factoryProjectId !== connection.factoryProjectId) {\n throw new Error('Session factory does not match the repository link.');\n }\n const factoryProjectId = connection.factoryProjectId;\n // Mirrors base.ts: reuse is keyed by the link; another link's branch is a unique violation below.\n const existing = await this.sessions.getForBranch({\n projectRepositoryId: input.projectRepositoryId,\n userId: input.userId,\n branch: input.branch,\n });\n if (existing) return existing;\n // Both checks stay synchronous with the push below so concurrent creates see each other, as a unique index would.\n if (this.sessionsRows.some(row => row.sessionId === input.sessionId)) {\n throw new UniqueViolationError('Source-control session ID already exists');\n }\n if (\n this.sessionsRows.some(\n row =>\n row.factoryProjectId === factoryProjectId && row.userId === input.userId && row.branch === input.branch,\n )\n ) {\n throw new UniqueViolationError('Source-control session branch already exists in this factory');\n }\n const now = new Date();\n const session: SourceControlSession = {\n id: globalThis.crypto.randomUUID(),\n ...input,\n factoryProjectId,\n title: input.title ?? null,\n visibility: input.visibility ?? 'org',\n sandboxId: null,\n sandboxWorkdir: null,\n materializedAt: null,\n firstMessageAt: null,\n firstMeaningfulExecAt: null,\n createdAt: now,\n updatedAt: now,\n };\n this.sessionsRows.push(session);\n return session;\n },\n setSandbox: async ({\n id,\n sandboxId,\n sandboxWorkdir,\n }: {\n id: string;\n sandboxId: string | null;\n sandboxWorkdir: string;\n }) => {\n const row = this.sessionsRows.find(candidate => candidate.id === id);\n if (row) Object.assign(row, { sandboxId, sandboxWorkdir, updatedAt: new Date() });\n },\n markMaterialized: async ({ id }: { id: string }) => {\n const row = this.sessionsRows.find(candidate => candidate.id === id);\n if (row && row.materializedAt === null) Object.assign(row, { materializedAt: new Date(), updatedAt: new Date() });\n },\n markFirstMessage: async ({ sessionId }: { sessionId: string }) => {\n const row = this.sessionsRows.find(candidate => candidate.sessionId === sessionId);\n if (row && row.firstMessageAt === null) Object.assign(row, { firstMessageAt: new Date(), updatedAt: new Date() });\n },\n markFirstMeaningfulExec: async ({ sessionId }: { sessionId: string }) => {\n const row = this.sessionsRows.find(candidate => candidate.sessionId === sessionId);\n if (row && row.firstMeaningfulExecAt === null) {\n Object.assign(row, { firstMeaningfulExecAt: new Date(), updatedAt: new Date() });\n }\n },\n delete: async (id: string) => {\n const row = this.sessionsRows.find(candidate => candidate.id === id);\n if (row) {\n this.sessionRepositoriesRows = this.sessionRepositoriesRows.filter(r => r.sessionId !== row.sessionId);\n }\n this.sessionsRows.splice(0, this.sessionsRows.length, ...this.sessionsRows.filter(row => row.id !== id));\n },\n };\n\n readonly sessionRepositories = {\n upsert: async (input: UpsertSessionRepositoryInput): Promise<SourceControlSessionRepository> => {\n const now = new Date();\n const existing = this.sessionRepositoriesRows.find(\n row => row.sessionId === input.sessionId && row.projectRepositoryId === input.projectRepositoryId,\n );\n if (existing) {\n if (input.branch !== undefined) {\n existing.branch = input.branch;\n existing.pushedAt = input.pushedAt ?? now;\n } else if (input.pushedAt) {\n existing.pushedAt = input.pushedAt;\n }\n if (input.changeRequestId !== undefined) existing.changeRequestId = input.changeRequestId;\n if (input.changeRequestUrl !== undefined) existing.changeRequestUrl = input.changeRequestUrl;\n existing.updatedAt = now;\n return existing;\n }\n const branch = input.branch ?? input.fallbackBranch;\n if (!branch) throw new Error('A session repository row needs a branch when it is first recorded.');\n const created: SourceControlSessionRepository = {\n id: globalThis.crypto.randomUUID(),\n sessionId: input.sessionId,\n projectRepositoryId: input.projectRepositoryId,\n branch,\n changeRequestId: input.changeRequestId ?? null,\n changeRequestUrl: input.changeRequestUrl ?? null,\n pushedAt: input.pushedAt ?? now,\n updatedAt: now,\n createdAt: now,\n };\n this.sessionRepositoriesRows.push(created);\n return created;\n },\n listBySession: async ({ sessionId }: { sessionId: string }): Promise<SourceControlSessionRepository[]> =>\n this.sessionRepositoriesRows.filter(row => row.sessionId === sessionId),\n };\n}\n"],"mappings":";;;AAwBA,IAAa,+BAAb,MAAgF;CAC9E;CACA,oBAAiD,CAAC;CAClD,mBAA8C,CAAC;CAC/C,kBAAoD,CAAC;CACrD,0BAA+C,CAAC;CAChD,eAAuC,CAAC;CACxC,0BAA4D,CAAC;CAE7D,YAAY,gBAAgB,UAAU;EACpC,KAAK,gBAAgB;CACvB;CAEA,gBAAyB;EACvB,MAAM,OAAO,EAAE,YACb,KAAK,kBAAkB,QAAO,QAAO,IAAI,UAAU,KAAK;EAC1D,KAAK,OAAO,EAAE,OAAO,SACnB,KAAK,kBAAkB,MAAK,QAAO,IAAI,UAAU,SAAS,IAAI,OAAO,EAAE,KAAK;EAC9E,kBAAkB,OAAO,EACvB,OACA,iBAKA,KAAK,kBAAkB,MAAK,QAAO,IAAI,UAAU,SAAS,IAAI,eAAe,UAAU,KAAK;EAC9F,QAAQ,OAAO,UAAoF;GACjG,MAAM,WAAW,KAAK,kBAAkB,MACtC,QAAO,IAAI,UAAU,MAAM,SAAS,IAAI,eAAe,MAAM,UAC/D;GACA,IAAI,UAAU;IACZ,OAAO,OAAO,UAAU;KACtB,mBAAmB,MAAM;KACzB,aAAa,MAAM,eAAe;KAClC,a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