@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,302 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `FactoryIntegration` — the common contract for pluggable web integrations
|
|
3
|
+
* (GitHub, Linear, third-party).
|
|
4
|
+
*
|
|
5
|
+
* Each integration is a self-contained class: the deploy entry
|
|
6
|
+
* (`src/mastra/index.ts`) reads that integration's env vars ONCE, constructs
|
|
7
|
+
* an instance with explicit credentials, and passes it to `MastraFactory`
|
|
8
|
+
* via `integrations: [...]`. The factory registers the pieces each instance
|
|
9
|
+
* provides — HTTP routes, agent/session tools, diagnostics — into the system.
|
|
10
|
+
* No system code reads integration env vars or imports integration free
|
|
11
|
+
* functions; everything downstream talks to instances through this interface.
|
|
12
|
+
*
|
|
13
|
+
* An absent integration means: its routes never mount, its tools never
|
|
14
|
+
* register, diagnostics report "not configured", and the server boots fine.
|
|
15
|
+
* Third parties add capabilities by implementing this same interface — no
|
|
16
|
+
* factory changes required (the same capability-based philosophy as the
|
|
17
|
+
* sandbox machine's `derive()` gate).
|
|
18
|
+
*/
|
|
19
|
+
import type { MastraCodeConfig, MountedMastraCode } from '@mastra/code-sdk';
|
|
20
|
+
import type { AgentControllerChannelsConfig, ChannelAdapterConfig } from '@mastra/core/channels';
|
|
21
|
+
import type { RequestContext } from '@mastra/core/request-context';
|
|
22
|
+
import type { ApiRoute, IUserProvider } from '@mastra/core/server';
|
|
23
|
+
import type { FactoryStorage } from '@mastra/core/storage';
|
|
24
|
+
import type { MastraWorker } from '@mastra/core/worker';
|
|
25
|
+
import type { FactorySandbox } from '@mastra/core/workspace';
|
|
26
|
+
import type { BoardRegistry } from '../boards/index.js';
|
|
27
|
+
import type { Intake } from '../capabilities/intake.js';
|
|
28
|
+
import type { VersionControl } from '../capabilities/version-control.js';
|
|
29
|
+
import type { RouteAuth } from '../routes/route.js';
|
|
30
|
+
import type { SessionRetirementCoordinator } from '../sandbox/session-retirement.js';
|
|
31
|
+
import type { StateSigner } from '../state-signing.js';
|
|
32
|
+
import type { AuditEventRow } from '../storage/domains/audit/base.js';
|
|
33
|
+
import type { AuditEmitter } from '../storage/domains/audit/domain.js';
|
|
34
|
+
import type { ChannelIdentityStorage } from '../storage/domains/channel-identity/base.js';
|
|
35
|
+
import type { CommentsDomain } from '../storage/domains/comments/domain.js';
|
|
36
|
+
import type { WorkItemFeedPublisher } from '../storage/domains/comments/feed-sync.js';
|
|
37
|
+
import type { IntakeStorage } from '../storage/domains/intake/base.js';
|
|
38
|
+
import type { IntegrationStorageHandle } from '../storage/domains/integrations/base.js';
|
|
39
|
+
import type { MemorySettingsStorage } from '../storage/domains/memory-settings/base.js';
|
|
40
|
+
import type { ModelDefaultsStorage } from '../storage/domains/model-defaults/base.js';
|
|
41
|
+
import type { FactoryProjectsStorage } from '../storage/domains/projects/base.js';
|
|
42
|
+
import type { SourceControlStorageHandle } from '../storage/domains/source-control/base.js';
|
|
43
|
+
import type { WorkItemsStorage } from '../storage/domains/work-items/base.js';
|
|
44
|
+
/** A push to a repository linked to a project, as a version-control integration reports it. */
|
|
45
|
+
export interface RepositoryPushEvent {
|
|
46
|
+
orgId: string;
|
|
47
|
+
factoryProjectId: string;
|
|
48
|
+
projectRepository: {
|
|
49
|
+
id: string;
|
|
50
|
+
inEnvironment: boolean;
|
|
51
|
+
};
|
|
52
|
+
/** The pushed git ref, for example `refs/heads/main`. */
|
|
53
|
+
ref: string;
|
|
54
|
+
/** The repository's default branch as the provider reports it. */
|
|
55
|
+
defaultBranch: string;
|
|
56
|
+
}
|
|
57
|
+
/** Factory-owned hooks integrations may invoke. */
|
|
58
|
+
export interface IntegrationHooks {
|
|
59
|
+
emitAudit?: AuditEmitter['emit'];
|
|
60
|
+
/** Hand a push off for an environment build; never blocks the webhook and never throws. */
|
|
61
|
+
onRepositoryPush?: (event: RepositoryPushEvent) => void;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Tool records integrations contribute — the same static-record shape the
|
|
65
|
+
* SDK's `extraTools` accepts, so the factory can merge every integration's
|
|
66
|
+
* tools into one dynamic tool set.
|
|
67
|
+
*/
|
|
68
|
+
export type IntegrationTools = Extract<NonNullable<MastraCodeConfig['extraTools']>, Record<string, unknown>>;
|
|
69
|
+
export interface IntegrationPostToolContext {
|
|
70
|
+
toolName: string;
|
|
71
|
+
input: unknown;
|
|
72
|
+
output?: unknown;
|
|
73
|
+
error?: unknown;
|
|
74
|
+
context: unknown;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Everything the factory hands an integration when collecting its routes.
|
|
78
|
+
* Built once per boot in `MastraFactory.prepare()`.
|
|
79
|
+
*/
|
|
80
|
+
export interface IntegrationContext {
|
|
81
|
+
/** Host auth seam — integration routes resolve callers through this. */
|
|
82
|
+
auth: RouteAuth;
|
|
83
|
+
/** Optional user directory for resolving persisted user ids to display profiles. */
|
|
84
|
+
users?: Pick<IUserProvider, 'getUser' | 'getUsers'>;
|
|
85
|
+
/**
|
|
86
|
+
* The deploy's sandbox callback for per-project and per-session
|
|
87
|
+
* sandboxes. Absent when no sandbox is configured — sandbox-backed
|
|
88
|
+
* routes respond 503.
|
|
89
|
+
*/
|
|
90
|
+
sandbox?: FactorySandbox;
|
|
91
|
+
/**
|
|
92
|
+
* Root factory storage backend and source of the `appDbConfigured`
|
|
93
|
+
* diagnostic. Absent when the host runs without an application database.
|
|
94
|
+
*/
|
|
95
|
+
factoryStorage?: FactoryStorage;
|
|
96
|
+
/** Browser-facing origin (OAuth redirect base), no trailing slash. */
|
|
97
|
+
baseUrl?: string;
|
|
98
|
+
/** Mounted agent controller for webhook → session signal delivery. */
|
|
99
|
+
controller?: MountedMastraCode['controller'];
|
|
100
|
+
/**
|
|
101
|
+
* Shared OAuth state signer created by the factory. One signer per boot, so
|
|
102
|
+
* every integration's OAuth flow signs and verifies with the same secret.
|
|
103
|
+
*/
|
|
104
|
+
stateSigner?: StateSigner;
|
|
105
|
+
/** Shared source-control session retirement lifecycle used by integration routes. */
|
|
106
|
+
sessionRetirement?: SessionRetirementCoordinator;
|
|
107
|
+
/** Work-items domain slice — deleting a session strips the refs work items hold on it. */
|
|
108
|
+
workItems?: Pick<WorkItemsStorage, 'clearSessionReferences'>;
|
|
109
|
+
/** Feed slice for ingesting platform messages; present once work items are ready. */
|
|
110
|
+
feed?: Pick<CommentsDomain, 'createComment'>;
|
|
111
|
+
/** Persistence handles pre-scoped to this integration's stable id. */
|
|
112
|
+
storage: {
|
|
113
|
+
generic: IntegrationStorageHandle;
|
|
114
|
+
sourceControl: SourceControlStorageHandle;
|
|
115
|
+
/**
|
|
116
|
+
* The factory's source-control-owning integration's storage handle
|
|
117
|
+
* (today: GitHub when registered; the handle carries its own
|
|
118
|
+
* `integrationId`). Channel integrations use it to make sessions
|
|
119
|
+
* repo-backed without the entry hand-wiring a source-control slice.
|
|
120
|
+
* Absent when no source-control owner is registered.
|
|
121
|
+
*/
|
|
122
|
+
sourceControlOwner?: SourceControlStorageHandle;
|
|
123
|
+
/** Every registered source-control partition, for project-aware provider selection. */
|
|
124
|
+
sourceControls: readonly SourceControlStorageHandle[];
|
|
125
|
+
/** Factory projects domain — e.g. resolving a project's default model. */
|
|
126
|
+
projects: FactoryProjectsStorage;
|
|
127
|
+
/**
|
|
128
|
+
* Observational-memory settings domain, so a session an integration starts
|
|
129
|
+
* adopts the same memory configuration the web kickoff applies.
|
|
130
|
+
*/
|
|
131
|
+
memorySettings: MemorySettingsStorage;
|
|
132
|
+
/**
|
|
133
|
+
* Per-user default model. A channel integration reads the linked sender's
|
|
134
|
+
* default to start a session on the model that user chose rather than the
|
|
135
|
+
* factory's shared default.
|
|
136
|
+
*/
|
|
137
|
+
modelDefaults: ModelDefaultsStorage;
|
|
138
|
+
/** Cross-integration intake selection (which sources are synced). */
|
|
139
|
+
intake: IntakeStorage;
|
|
140
|
+
/**
|
|
141
|
+
* Reverse index from a chat-platform sender to a Mastra tenant. Channel
|
|
142
|
+
* integrations resolve an inbound sender through this to run under the
|
|
143
|
+
* right user's credentials.
|
|
144
|
+
*/
|
|
145
|
+
channelIdentity: ChannelIdentityStorage;
|
|
146
|
+
};
|
|
147
|
+
/**
|
|
148
|
+
* Factory runtime available when the work-item domain is ready.
|
|
149
|
+
* Integrations attach their own provider event rules to their ingress
|
|
150
|
+
* surfaces instead of relying on provider-specific services in the host.
|
|
151
|
+
*/
|
|
152
|
+
runtime?: {
|
|
153
|
+
/** Operator-maintained provenance label stamped on audit rows. */
|
|
154
|
+
configVersion: string;
|
|
155
|
+
workItems: WorkItemsStorage;
|
|
156
|
+
/** Installed boards, so integrations read phase semantics instead of matching names. */
|
|
157
|
+
boards: BoardRegistry;
|
|
158
|
+
};
|
|
159
|
+
/** System hooks integrations may invoke. */
|
|
160
|
+
hooks?: IntegrationHooks;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* One adapter entry in a {@link FactoryChannelsConfig} adapter map.
|
|
164
|
+
*
|
|
165
|
+
* Core's adapter-map entry is `ChannelAdapterConfig | Adapter<any, any>`, and
|
|
166
|
+
* `ChannelAdapterConfig` is itself a union — so this MUST be a type alias, not
|
|
167
|
+
* an interface extends (illegal on unions). Factory's contract deliberately
|
|
168
|
+
* EXCLUDES the bare-`Adapter` shorthand core accepts: entries use the config
|
|
169
|
+
* form so future per-platform extras (e.g. a `resolveWorkspaceId`, connect
|
|
170
|
+
* handlers) have a home. Today the alias adds no fields; it is the stable
|
|
171
|
+
* extension point.
|
|
172
|
+
*/
|
|
173
|
+
export type FactoryChannelAdapterEntry = ChannelAdapterConfig;
|
|
174
|
+
/**
|
|
175
|
+
* The channels contribution a {@link FactoryIntegration} returns from
|
|
176
|
+
* `channels()`. A config object, not a built instance — the factory constructs
|
|
177
|
+
* the `AgentControllerChannels` at the attach site.
|
|
178
|
+
*
|
|
179
|
+
* The adapter-map key is the platform identity (`'slack'`, `'discord'`, …).
|
|
180
|
+
* One integration = one platform = one entry is the norm: the map shape is
|
|
181
|
+
* inherited from core (one `AgentControllerChannels` instance drives multiple
|
|
182
|
+
* adapters) and is where cross-integration merging will happen later — it is
|
|
183
|
+
* NOT an invitation for a single integration to bundle multiple platforms.
|
|
184
|
+
* Note the top-level `handlers` and resolvers are shared across all adapters
|
|
185
|
+
* in the map. Entries use the config form; the bare-`Adapter` shorthand core
|
|
186
|
+
* accepts is deliberately excluded (see {@link FactoryChannelAdapterEntry}).
|
|
187
|
+
*/
|
|
188
|
+
export interface FactoryChannelsConfig extends Omit<AgentControllerChannelsConfig, 'adapters'> {
|
|
189
|
+
adapters: Record<string, FactoryChannelAdapterEntry>;
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* A pluggable web integration. Implementations own their credentials
|
|
193
|
+
* (validated at construction), their API surface, and their HTTP routes.
|
|
194
|
+
*/
|
|
195
|
+
export interface FactoryIntegration {
|
|
196
|
+
/** Stable identifier: `'github'`, `'linear'`, custom ids for third parties. */
|
|
197
|
+
readonly id: string;
|
|
198
|
+
/** Issue-oriented capability consumed by Intake. */
|
|
199
|
+
readonly intake?: Intake;
|
|
200
|
+
/** Repository, installation, and pull-request capability. */
|
|
201
|
+
readonly versionControl?: VersionControl;
|
|
202
|
+
/**
|
|
203
|
+
* Bind the integration's generic persistence handle. Called once by the
|
|
204
|
+
* factory during `prepare()` (before routes/tools/workers are collected),
|
|
205
|
+
* so instance methods that run outside an `IntegrationContext` — per-request
|
|
206
|
+
* agent tools, intake capability calls — reach storage without a service
|
|
207
|
+
* locator. Mirrors `sourceControl.initialize`.
|
|
208
|
+
*/
|
|
209
|
+
initialize?(args: {
|
|
210
|
+
storage: IntegrationStorageHandle;
|
|
211
|
+
projects: FactoryProjectsStorage;
|
|
212
|
+
auth: RouteAuth;
|
|
213
|
+
/** Cross-integration intake selection/binding domain, for per-request authorization. */
|
|
214
|
+
intake: IntakeStorage;
|
|
215
|
+
sourceControl?: SourceControlStorageHandle;
|
|
216
|
+
}): void;
|
|
217
|
+
/**
|
|
218
|
+
* The integration's full HTTP surface (status, OAuth, webhooks, feature
|
|
219
|
+
* routes), as Mastra `apiRoutes`. Called once at boot; the factory folds
|
|
220
|
+
* the result into the server's route table.
|
|
221
|
+
*/
|
|
222
|
+
routes(ctx: IntegrationContext): ApiRoute[];
|
|
223
|
+
/**
|
|
224
|
+
* Org-scoped agent tools resolved per request (e.g. Linear's issue tools).
|
|
225
|
+
* Optional capability; the factory merges results into the SDK's async
|
|
226
|
+
* `extraTools` provider.
|
|
227
|
+
*/
|
|
228
|
+
agentTools?(args: {
|
|
229
|
+
requestContext: RequestContext;
|
|
230
|
+
}): Promise<IntegrationTools>;
|
|
231
|
+
/**
|
|
232
|
+
* Session-scoped tools (e.g. GitHub's PR subscribe/unsubscribe). Optional
|
|
233
|
+
* capability, resolved synchronously per request.
|
|
234
|
+
*/
|
|
235
|
+
sessionTools?(args: {
|
|
236
|
+
requestContext: RequestContext;
|
|
237
|
+
}): IntegrationTools;
|
|
238
|
+
/**
|
|
239
|
+
* Optional provider-owned observer for successful or failed tool calls.
|
|
240
|
+
* The factory invokes every configured observer independently so one
|
|
241
|
+
* integration cannot prevent another from observing the same tool result.
|
|
242
|
+
*/
|
|
243
|
+
postToolObserver?(args: {
|
|
244
|
+
toolContext: IntegrationPostToolContext;
|
|
245
|
+
requestContext?: RequestContext;
|
|
246
|
+
}): Promise<void>;
|
|
247
|
+
/**
|
|
248
|
+
* Background workers the integration needs running for its lifecycle
|
|
249
|
+
* (e.g. polling an upstream that doesn't support webhooks). Optional
|
|
250
|
+
* capability: called once at boot for READY integrations only; the factory
|
|
251
|
+
* folds the returned workers into the server Mastra's `workers` option, so
|
|
252
|
+
* they are merged with the built-in workers and started with them
|
|
253
|
+
* (`startWorkers()`). Worker names must be unique across integrations —
|
|
254
|
+
* duplicates fail the `new Mastra(...)` construction loudly.
|
|
255
|
+
*/
|
|
256
|
+
workers?(ctx: IntegrationContext): MastraWorker[];
|
|
257
|
+
/**
|
|
258
|
+
* Chat-platform channels this integration contributes (Slack, Discord, …).
|
|
259
|
+
* Called once at boot for READY integrations only; the factory constructs an
|
|
260
|
+
* `AgentControllerChannels` from the returned config and attaches it to the
|
|
261
|
+
* mounted agent controller via `setChannels`, so inbound platform messages
|
|
262
|
+
* reach the same agents the web UI drives.
|
|
263
|
+
*
|
|
264
|
+
* An integration providing this slot also declares a dependency on the
|
|
265
|
+
* `channel-identity` domain, which the factory folds into its readiness
|
|
266
|
+
* gate — so an integration whose reverse index isn't migrated yet reports
|
|
267
|
+
* not-ready and its channels never attach, rather than dispatching runs it
|
|
268
|
+
* can't resolve a tenant for.
|
|
269
|
+
*
|
|
270
|
+
* Only one integration may provide channels; the factory fails loud at boot
|
|
271
|
+
* on a second, because `setChannels` replaces rather than merges and the
|
|
272
|
+
* loser would silently never receive a message.
|
|
273
|
+
*/
|
|
274
|
+
channels?(ctx: IntegrationContext): FactoryChannelsConfig;
|
|
275
|
+
/**
|
|
276
|
+
* Mirrors web feed comments outward — to the platform thread a work item is
|
|
277
|
+
* bound to, a webhook, or an issue tracker. Collected from every READY
|
|
278
|
+
* integration independent of `channels()`: an integration may publish without
|
|
279
|
+
* owning a chat channel.
|
|
280
|
+
*/
|
|
281
|
+
feedPublisher?(ctx: IntegrationContext): WorkItemFeedPublisher;
|
|
282
|
+
/**
|
|
283
|
+
* Non-secret config snapshot (booleans + names only, never values). The
|
|
284
|
+
* factory merges it into system diagnostics/startup logs.
|
|
285
|
+
*/
|
|
286
|
+
diagnostics(): Record<string, unknown>;
|
|
287
|
+
/**
|
|
288
|
+
* Optional best-effort destination for locally persisted audit events.
|
|
289
|
+
* Audit export remains independent of the configured web auth adapter.
|
|
290
|
+
*/
|
|
291
|
+
audit?(args: {
|
|
292
|
+
event: AuditEventRow;
|
|
293
|
+
}): Promise<void>;
|
|
294
|
+
/**
|
|
295
|
+
* True when the integration signs OAuth `state` and therefore needs a
|
|
296
|
+
* replica-stable signer. The factory fails loud at boot when a registered
|
|
297
|
+
* integration requires stability but only a per-process random secret is
|
|
298
|
+
* available (see `./state-signing.ts`).
|
|
299
|
+
*/
|
|
300
|
+
readonly requiresStableStateSigner?: boolean;
|
|
301
|
+
}
|
|
302
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/integrations/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAC5E,OAAO,KAAK,EAAE,6BAA6B,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AACjG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,KAAK,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,qB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C,MAAM,EAAE,OAAO,CAAC,CAAC;IACvC;;;OAGG;IACH,KAAK,CAAC,CAAC,IAAI,EAAE;QAAE,KAAK,EAAE,aAAa,CAAA;KAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACtD;;;;;OAKG;IACH,QAAQ,CAAC,yBAAyB,CAAC,EAAE,OAAO,CAAC;CAC9C"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { SourceControlStorageHandle } from '../../storage/domains/source-control/base.js';
|
|
2
|
+
import type { WorkItemRow } from '../../storage/domains/work-items/base.js';
|
|
3
|
+
import type { GithubIntegration } from './integration.js';
|
|
4
|
+
export interface ReconcileAcceptanceLabelsInput {
|
|
5
|
+
orgId: string;
|
|
6
|
+
factoryProjectId: string;
|
|
7
|
+
item: WorkItemRow;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* Reflect a maintainer's acceptance of a triaged GitHub issue back on the
|
|
11
|
+
* issue: the triage skill stamps `status: needs approval` and never removes it,
|
|
12
|
+
* so the approval gesture on the board is the only point that can clear it.
|
|
13
|
+
* Best-effort — every failure is a warning, never a rejected transition.
|
|
14
|
+
*/
|
|
15
|
+
export declare function reconcileGithubAcceptanceLabels(github: GithubIntegration, sourceControl: SourceControlStorageHandle, input: ReconcileAcceptanceLabelsInput): Promise<void>;
|
|
16
|
+
//# sourceMappingURL=acceptance-labels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-labels.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/acceptance-labels.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,8CAA8C,CAAC;AAC/F,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,0CAA0C,CAAC;AAC5E,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AAE1D,MAAM,WAAW,8BAA8B;IAC7C,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,IAAI,EAAE,WAAW,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAsB,+BAA+B,CACnD,MAAM,EAAE,iBAAiB,EACzB,aAAa,EAAE,0BAA0B,EACzC,KAAK,EAAE,8BAA8B,GACpC,OAAO,CAAC,IAAI,CAAC,CAgBf"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { NEEDS_APPROVAL_LABEL } from "../../rules/types.js";
|
|
2
|
+
//#region src/integrations/github/acceptance-labels.ts
|
|
3
|
+
/**
|
|
4
|
+
* Reflect a maintainer's acceptance of a triaged GitHub issue back on the
|
|
5
|
+
* issue: the triage skill stamps `status: needs approval` and never removes it,
|
|
6
|
+
* so the approval gesture on the board is the only point that can clear it.
|
|
7
|
+
* Best-effort — every failure is a warning, never a rejected transition.
|
|
8
|
+
*/
|
|
9
|
+
async function reconcileGithubAcceptanceLabels(github, sourceControl, input) {
|
|
10
|
+
const { item } = input;
|
|
11
|
+
if (item.externalSource?.integrationId !== "github" || item.externalSource.type !== "issue") return;
|
|
12
|
+
const repositoryId = item.metadata?.githubRepositoryId;
|
|
13
|
+
const issueNumber = item.metadata?.githubIssueNumber;
|
|
14
|
+
if (typeof repositoryId !== "number" || typeof issueNumber !== "number" || issueNumber < 1) return;
|
|
15
|
+
try {
|
|
16
|
+
const target = await resolveRepository(sourceControl, input.orgId, input.factoryProjectId, repositoryId);
|
|
17
|
+
if (!target) return;
|
|
18
|
+
await github.removeIssueLabel(target.installationId, target.slug, issueNumber, NEEDS_APPROVAL_LABEL);
|
|
19
|
+
} catch (error) {
|
|
20
|
+
if (error.status === 404) return;
|
|
21
|
+
console.warn(`[factory] could not clear "${NEEDS_APPROVAL_LABEL}" for work item ${item.id}:`, error);
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
async function resolveRepository(sourceControl, orgId, factoryProjectId, externalRepositoryId) {
|
|
25
|
+
for (const connection of await sourceControl.connections.list({
|
|
26
|
+
orgId,
|
|
27
|
+
factoryProjectId
|
|
28
|
+
})) {
|
|
29
|
+
const installation = await sourceControl.installations.get({
|
|
30
|
+
orgId,
|
|
31
|
+
id: connection.installationId
|
|
32
|
+
});
|
|
33
|
+
if (!installation) continue;
|
|
34
|
+
for (const link of await sourceControl.projectRepositories.list({
|
|
35
|
+
orgId,
|
|
36
|
+
connectionId: connection.id
|
|
37
|
+
})) {
|
|
38
|
+
const repository = await sourceControl.repositories.get({
|
|
39
|
+
orgId,
|
|
40
|
+
id: link.repositoryId
|
|
41
|
+
});
|
|
42
|
+
if (!repository || Number(repository.externalId) !== externalRepositoryId) continue;
|
|
43
|
+
const installationId = Number(installation.externalId);
|
|
44
|
+
if (!Number.isInteger(installationId)) return void 0;
|
|
45
|
+
return {
|
|
46
|
+
installationId,
|
|
47
|
+
slug: repository.slug
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
//#endregion
|
|
53
|
+
export { reconcileGithubAcceptanceLabels };
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=acceptance-labels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"acceptance-labels.js","names":[],"sources":["../../../src/integrations/github/acceptance-labels.ts"],"sourcesContent":["import { NEEDS_APPROVAL_LABEL } from '../../rules/types.js';\nimport type { SourceControlStorageHandle } from '../../storage/domains/source-control/base.js';\nimport type { WorkItemRow } from '../../storage/domains/work-items/base.js';\nimport type { GithubIntegration } from './integration.js';\n\nexport interface ReconcileAcceptanceLabelsInput {\n orgId: string;\n factoryProjectId: string;\n item: WorkItemRow;\n}\n\n/**\n * Reflect a maintainer's acceptance of a triaged GitHub issue back on the\n * issue: the triage skill stamps `status: needs approval` and never removes it,\n * so the approval gesture on the board is the only point that can clear it.\n * Best-effort — every failure is a warning, never a rejected transition.\n */\nexport async function reconcileGithubAcceptanceLabels(\n github: GithubIntegration,\n sourceControl: SourceControlStorageHandle,\n input: ReconcileAcceptanceLabelsInput,\n): Promise<void> {\n const { item } = input;\n if (item.externalSource?.integrationId !== 'github' || item.externalSource.type !== 'issue') return;\n const repositoryId = item.metadata?.githubRepositoryId;\n const issueNumber = item.metadata?.githubIssueNumber;\n if (typeof repositoryId !== 'number' || typeof issueNumber !== 'number' || issueNumber < 1) return;\n\n try {\n const target = await resolveRepository(sourceControl, input.orgId, input.factoryProjectId, repositoryId);\n if (!target) return;\n await github.removeIssueLabel(target.installationId, target.slug, issueNumber, NEEDS_APPROVAL_LABEL);\n } catch (error) {\n // GitHub answers 404 when the label is not on the issue; nothing to clear.\n if ((error as { status?: number }).status === 404) return;\n console.warn(`[factory] could not clear \"${NEEDS_APPROVAL_LABEL}\" for work item ${item.id}:`, error);\n }\n}\n\nasync function resolveRepository(\n sourceControl: SourceControlStorageHandle,\n orgId: string,\n factoryProjectId: string,\n externalRepositoryId: number,\n): Promise<{ installationId: number; slug: string } | undefined> {\n for (const connection of await sourceControl.connections.list({ orgId, factoryProjectId })) {\n const installation = await sourceControl.installations.get({ orgId, id: connection.installationId });\n if (!installation) continue;\n for (const link of await sourceControl.projectRepositories.list({ orgId, connectionId: connection.id })) {\n const repository = await sourceControl.repositories.get({ orgId, id: link.repositoryId });\n if (!repository || Number(repository.externalId) !== externalRepositoryId) continue;\n const installationId = Number(installation.externalId);\n if (!Number.isInteger(installationId)) return undefined;\n return { installationId, slug: repository.slug };\n }\n }\n return undefined;\n}\n"],"mappings":";;;;;;;;AAiBA,eAAsB,gCACpB,QACA,eACA,OACe;CACf,MAAM,EAAE,SAAS;CACjB,IAAI,KAAK,gBAAgB,kBAAkB,YAAY,KAAK,eAAe,SAAS,SAAS;CAC7F,MAAM,eAAe,KAAK,UAAU;CACpC,MAAM,cAAc,KAAK,UAAU;CACnC,IAAI,OAAO,iBAAiB,YAAY,OAAO,gBAAgB,YAAY,cAAc,GAAG;CAE5F,IAAI;EACF,MAAM,SAAS,MAAM,kBAAkB,eAAe,MAAM,OAAO,MAAM,kBAAkB,YAAY;EACvG,IAAI,CAAC,QAAQ;EACb,MAAM,OAAO,iBAAiB,OAAO,gBAAgB,OAAO,MAAM,aAAa,oBAAoB;CACrG,SAAS,OAAO;EAEd,IAAK,MAA8B,WAAW,KAAK;EACnD,QAAQ,KAAK,8BAA8B,qBAAqB,kBAAkB,KAAK,GAAG,IAAI,KAAK;CACrG;AACF;AAEA,eAAe,kBACb,eACA,OACA,kBACA,sBAC+D;CAC/D,KAAK,MAAM,cAAc,MAAM,cAAc,YAAY,KAAK;EAAE;EAAO;CAAiB,CAAC,GAAG;EAC1F,MAAM,eAAe,MAAM,cAAc,cAAc,IAAI;GAAE;GAAO,IAAI,WAAW;EAAe,CAAC;EACnG,IAAI,CAAC,cAAc;EACnB,KAAK,MAAM,QAAQ,MAAM,cAAc,oBAAoB,KAAK;GAAE;GAAO,cAAc,WAAW;EAAG,CAAC,GAAG;GACvG,MAAM,aAAa,MAAM,cAAc,aAAa,IAAI;IAAE;IAAO,IAAI,KAAK;GAAa,CAAC;GACxF,IAAI,CAAC,cAAc,OAAO,WAAW,UAAU,MAAM,sBAAsB;GAC3E,MAAM,iBAAiB,OAAO,aAAa,UAAU;GACrD,IAAI,CAAC,OAAO,UAAU,cAAc,GAAG,OAAO,KAAA;GAC9C,OAAO;IAAE;IAAgB,MAAM,WAAW;GAAK;EACjD;CACF;AAEF"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Factory's own GitHub identity.
|
|
3
|
+
*
|
|
4
|
+
* Factory must recognise its own writes, or it wakes itself: a handoff comment
|
|
5
|
+
* arrives back through ingress, fires the rule that authored it, and cancels the
|
|
6
|
+
* run mid-flight. Every self-loop guard depends on answering "is this me?".
|
|
7
|
+
*
|
|
8
|
+
* The answer is not free. On a Platform deployment the credentials that post as
|
|
9
|
+
* `mastra-platform[bot]` do not carry that login, and `GITHUB_APP_SLUG`
|
|
10
|
+
* describes a *different*, self-hosted App — so it is legitimately unset. A bare
|
|
11
|
+
* `login === `${slug}[bot]`` therefore compares against `undefined[bot]`, never
|
|
12
|
+
* matches, and silently disables every guard while looking correct.
|
|
13
|
+
*
|
|
14
|
+
* Two sources, in order of trust:
|
|
15
|
+
*
|
|
16
|
+
* 1. **Observed.** Every comment Factory creates comes back with its author.
|
|
17
|
+
* That is authoritative, costs no extra request, and needs no configuration —
|
|
18
|
+
* Factory learns its own name the first time it speaks.
|
|
19
|
+
* 2. **Configured.** `slug` from a self-hosted GitHub App, when present.
|
|
20
|
+
*
|
|
21
|
+
* When neither is available the identity is *unknown*, which is distinct from
|
|
22
|
+
* "not Factory". Callers must handle it explicitly rather than inherit a `false`.
|
|
23
|
+
*/
|
|
24
|
+
export declare class GithubAppIdentity {
|
|
25
|
+
#private;
|
|
26
|
+
constructor(slug?: string);
|
|
27
|
+
/** The login Factory posts as, or `undefined` when it cannot be determined. */
|
|
28
|
+
get login(): string | undefined;
|
|
29
|
+
/** True once Factory can recognise its own writes. */
|
|
30
|
+
get known(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Record the author GitHub reported for a write Factory just made. Observed
|
|
33
|
+
* identity wins over configuration: it is what GitHub actually attributes the
|
|
34
|
+
* write to, whereas the slug is a claim about a possibly-different App.
|
|
35
|
+
*/
|
|
36
|
+
observeSelfAuthor(login: string | null | undefined): void;
|
|
37
|
+
/**
|
|
38
|
+
* Whether `login` is Factory. Returns `false` when the identity is unknown —
|
|
39
|
+
* callers that must not fail open should check {@link known} first.
|
|
40
|
+
*/
|
|
41
|
+
matches(login: string | null | undefined): boolean;
|
|
42
|
+
}
|
|
43
|
+
//# sourceMappingURL=app-identity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-identity.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/app-identity.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,qBAAa,iBAAiB;;gBAIhB,IAAI,CAAC,EAAE,MAAM;IAKzB,+EAA+E;IAC/E,IAAI,KAAK,IAAI,MAAM,GAAG,SAAS,CAE9B;IAED,sDAAsD;IACtD,IAAI,KAAK,IAAI,OAAO,CAEnB;IAED;;;;OAIG;IACH,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,IAAI;IAKzD;;;OAGG;IACH,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,OAAO;CAKnD"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
//#region src/integrations/github/app-identity.ts
|
|
2
|
+
/**
|
|
3
|
+
* Factory's own GitHub identity.
|
|
4
|
+
*
|
|
5
|
+
* Factory must recognise its own writes, or it wakes itself: a handoff comment
|
|
6
|
+
* arrives back through ingress, fires the rule that authored it, and cancels the
|
|
7
|
+
* run mid-flight. Every self-loop guard depends on answering "is this me?".
|
|
8
|
+
*
|
|
9
|
+
* The answer is not free. On a Platform deployment the credentials that post as
|
|
10
|
+
* `mastra-platform[bot]` do not carry that login, and `GITHUB_APP_SLUG`
|
|
11
|
+
* describes a *different*, self-hosted App — so it is legitimately unset. A bare
|
|
12
|
+
* `login === `${slug}[bot]`` therefore compares against `undefined[bot]`, never
|
|
13
|
+
* matches, and silently disables every guard while looking correct.
|
|
14
|
+
*
|
|
15
|
+
* Two sources, in order of trust:
|
|
16
|
+
*
|
|
17
|
+
* 1. **Observed.** Every comment Factory creates comes back with its author.
|
|
18
|
+
* That is authoritative, costs no extra request, and needs no configuration —
|
|
19
|
+
* Factory learns its own name the first time it speaks.
|
|
20
|
+
* 2. **Configured.** `slug` from a self-hosted GitHub App, when present.
|
|
21
|
+
*
|
|
22
|
+
* When neither is available the identity is *unknown*, which is distinct from
|
|
23
|
+
* "not Factory". Callers must handle it explicitly rather than inherit a `false`.
|
|
24
|
+
*/
|
|
25
|
+
var GithubAppIdentity = class {
|
|
26
|
+
#configuredLogin;
|
|
27
|
+
#observedLogin;
|
|
28
|
+
constructor(slug) {
|
|
29
|
+
const trimmed = slug?.trim();
|
|
30
|
+
this.#configuredLogin = trimmed ? `${trimmed.toLowerCase()}[bot]` : void 0;
|
|
31
|
+
}
|
|
32
|
+
/** The login Factory posts as, or `undefined` when it cannot be determined. */
|
|
33
|
+
get login() {
|
|
34
|
+
return this.#observedLogin ?? this.#configuredLogin;
|
|
35
|
+
}
|
|
36
|
+
/** True once Factory can recognise its own writes. */
|
|
37
|
+
get known() {
|
|
38
|
+
return this.login !== void 0;
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* Record the author GitHub reported for a write Factory just made. Observed
|
|
42
|
+
* identity wins over configuration: it is what GitHub actually attributes the
|
|
43
|
+
* write to, whereas the slug is a claim about a possibly-different App.
|
|
44
|
+
*/
|
|
45
|
+
observeSelfAuthor(login) {
|
|
46
|
+
const trimmed = login?.trim().toLowerCase();
|
|
47
|
+
if (trimmed) this.#observedLogin = trimmed;
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Whether `login` is Factory. Returns `false` when the identity is unknown —
|
|
51
|
+
* callers that must not fail open should check {@link known} first.
|
|
52
|
+
*/
|
|
53
|
+
matches(login) {
|
|
54
|
+
const self = this.login;
|
|
55
|
+
if (!self || !login) return false;
|
|
56
|
+
return login.trim().toLowerCase() === self;
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
//#endregion
|
|
60
|
+
export { GithubAppIdentity };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=app-identity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"app-identity.js","names":["#configuredLogin","#observedLogin"],"sources":["../../../src/integrations/github/app-identity.ts"],"sourcesContent":["/**\n * Factory's own GitHub identity.\n *\n * Factory must recognise its own writes, or it wakes itself: a handoff comment\n * arrives back through ingress, fires the rule that authored it, and cancels the\n * run mid-flight. Every self-loop guard depends on answering \"is this me?\".\n *\n * The answer is not free. On a Platform deployment the credentials that post as\n * `mastra-platform[bot]` do not carry that login, and `GITHUB_APP_SLUG`\n * describes a *different*, self-hosted App — so it is legitimately unset. A bare\n * `login === `${slug}[bot]`` therefore compares against `undefined[bot]`, never\n * matches, and silently disables every guard while looking correct.\n *\n * Two sources, in order of trust:\n *\n * 1. **Observed.** Every comment Factory creates comes back with its author.\n * That is authoritative, costs no extra request, and needs no configuration —\n * Factory learns its own name the first time it speaks.\n * 2. **Configured.** `slug` from a self-hosted GitHub App, when present.\n *\n * When neither is available the identity is *unknown*, which is distinct from\n * \"not Factory\". Callers must handle it explicitly rather than inherit a `false`.\n */\nexport class GithubAppIdentity {\n #configuredLogin: string | undefined;\n #observedLogin: string | undefined;\n\n constructor(slug?: string) {\n const trimmed = slug?.trim();\n this.#configuredLogin = trimmed ? `${trimmed.toLowerCase()}[bot]` : undefined;\n }\n\n /** The login Factory posts as, or `undefined` when it cannot be determined. */\n get login(): string | undefined {\n return this.#observedLogin ?? this.#configuredLogin;\n }\n\n /** True once Factory can recognise its own writes. */\n get known(): boolean {\n return this.login !== undefined;\n }\n\n /**\n * Record the author GitHub reported for a write Factory just made. Observed\n * identity wins over configuration: it is what GitHub actually attributes the\n * write to, whereas the slug is a claim about a possibly-different App.\n */\n observeSelfAuthor(login: string | null | undefined): void {\n const trimmed = login?.trim().toLowerCase();\n if (trimmed) this.#observedLogin = trimmed;\n }\n\n /**\n * Whether `login` is Factory. Returns `false` when the identity is unknown —\n * callers that must not fail open should check {@link known} first.\n */\n matches(login: string | null | undefined): boolean {\n const self = this.login;\n if (!self || !login) return false;\n return login.trim().toLowerCase() === self;\n }\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AAuBA,IAAa,oBAAb,MAA+B;CAC7B;CACA;CAEA,YAAY,MAAe;EACzB,MAAM,UAAU,MAAM,KAAK;EAC3B,KAAKA,mBAAmB,UAAU,GAAG,QAAQ,YAAY,EAAE,SAAS,KAAA;CACtE;;CAGA,IAAI,QAA4B;EAC9B,OAAO,KAAKC,kBAAkB,KAAKD;CACrC;;CAGA,IAAI,QAAiB;EACnB,OAAO,KAAK,UAAU,KAAA;CACxB;;;;;;CAOA,kBAAkB,OAAwC;EACxD,MAAM,UAAU,OAAO,KAAK,CAAC,CAAC,YAAY;EAC1C,IAAI,SAAS,KAAKC,iBAAiB;CACrC;;;;;CAMA,QAAQ,OAA2C;EACjD,MAAM,OAAO,KAAK;EAClB,IAAI,CAAC,QAAQ,CAAC,OAAO,OAAO;EAC5B,OAAO,MAAM,KAAK,CAAC,CAAC,YAAY,MAAM;CACxC;AACF"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Read with the installation token that already clones and pushes, not through
|
|
3
|
+
* `getInstallationOctokit`: the Platform deployment answers that with a
|
|
4
|
+
* pull-request-only stub, so `repos.*` is undefined there at runtime while the
|
|
5
|
+
* cast keeps the compiler quiet.
|
|
6
|
+
*/
|
|
7
|
+
import type { VersionControl } from '../../capabilities/version-control.js';
|
|
8
|
+
export interface RepositoryCommit {
|
|
9
|
+
sha: string;
|
|
10
|
+
message: string;
|
|
11
|
+
author: string | null;
|
|
12
|
+
avatarUrl: string | null;
|
|
13
|
+
committedAt: string | null;
|
|
14
|
+
url: string;
|
|
15
|
+
}
|
|
16
|
+
export declare function listRepositoryCommits(github: {
|
|
17
|
+
versionControl: Pick<VersionControl, 'getRepositoryAccess'>;
|
|
18
|
+
}, input: {
|
|
19
|
+
orgId: string;
|
|
20
|
+
project: {
|
|
21
|
+
repository: {
|
|
22
|
+
id: string;
|
|
23
|
+
slug: string;
|
|
24
|
+
};
|
|
25
|
+
};
|
|
26
|
+
branch: string;
|
|
27
|
+
limit: number;
|
|
28
|
+
}): Promise<RepositoryCommit[]>;
|
|
29
|
+
/** The commit a branch points at right now, as a full sha. Throws when GitHub rejects the lookup. */
|
|
30
|
+
export declare function getBranchHead(github: {
|
|
31
|
+
versionControl: Pick<VersionControl, 'getRepositoryAccess'>;
|
|
32
|
+
}, input: {
|
|
33
|
+
orgId: string;
|
|
34
|
+
repository: {
|
|
35
|
+
id: string;
|
|
36
|
+
slug: string;
|
|
37
|
+
};
|
|
38
|
+
branch: string;
|
|
39
|
+
}): Promise<string>;
|
|
40
|
+
//# sourceMappingURL=commits.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commits.d.ts","sourceRoot":"","sources":["../../../src/integrations/github/commits.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAI5E,MAAM,WAAW,gBAAgB;IAC/B,GAAG,EAAE,MAAM,CAAC;IACZ,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,GAAG,EAAE,MAAM,CAAC;CACb;AASD,wBAAsB,qBAAqB,CACzC,MAAM,EAAE;IAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAA;CAAE,EACvE,KAAK,EAAE;IACL,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE;QAAE,UAAU,EAAE;YAAE,EAAE,EAAE,MAAM,CAAC;YAAC,IAAI,EAAE,MAAM,CAAA;SAAE,CAAA;KAAE,CAAC;IACtD,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf,GACA,OAAO,CAAC,gBAAgB,EAAE,CAAC,CA2B7B;AAID,qGAAqG;AACrG,wBAAsB,aAAa,CACjC,MAAM,EAAE;IAAE,cAAc,EAAE,IAAI,CAAC,cAAc,EAAE,qBAAqB,CAAC,CAAA;CAAE,EACvE,KAAK,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACjF,OAAO,CAAC,MAAM,CAAC,CA0BjB"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
//#region src/integrations/github/commits.ts
|
|
2
|
+
const GITHUB_API = "https://api.github.com";
|
|
3
|
+
async function listRepositoryCommits(github, input) {
|
|
4
|
+
const access = await github.versionControl.getRepositoryAccess({
|
|
5
|
+
orgId: input.orgId,
|
|
6
|
+
repositoryId: input.project.repository.id
|
|
7
|
+
});
|
|
8
|
+
const query = new URLSearchParams({
|
|
9
|
+
sha: input.branch,
|
|
10
|
+
per_page: String(input.limit)
|
|
11
|
+
});
|
|
12
|
+
const response = await fetch(`${GITHUB_API}/repos/${input.project.repository.slug}/commits?${query}`, { headers: {
|
|
13
|
+
accept: "application/vnd.github+json",
|
|
14
|
+
...access.authorization ? { authorization: `Bearer ${access.authorization.token}` } : {}
|
|
15
|
+
} });
|
|
16
|
+
if (!response.ok) throw new Error(`GitHub rejected the commit listing for ${input.project.repository.slug} (${response.status}).`);
|
|
17
|
+
return (await response.json()).map((entry) => ({
|
|
18
|
+
sha: entry.sha,
|
|
19
|
+
message: entry.commit.message.split("\n")[0] ?? "",
|
|
20
|
+
author: entry.author?.login ?? entry.commit.author?.name ?? null,
|
|
21
|
+
avatarUrl: entry.author?.avatar_url ?? null,
|
|
22
|
+
committedAt: entry.commit.author?.date ?? null,
|
|
23
|
+
url: entry.html_url
|
|
24
|
+
}));
|
|
25
|
+
}
|
|
26
|
+
const SHA_PATTERN = /^[0-9a-f]{40}$/;
|
|
27
|
+
/** The commit a branch points at right now, as a full sha. Throws when GitHub rejects the lookup. */
|
|
28
|
+
async function getBranchHead(github, input) {
|
|
29
|
+
const access = await github.versionControl.getRepositoryAccess({
|
|
30
|
+
orgId: input.orgId,
|
|
31
|
+
repositoryId: input.repository.id
|
|
32
|
+
});
|
|
33
|
+
const response = await fetch(`${GITHUB_API}/repos/${input.repository.slug}/commits/${encodeURIComponent(input.branch)}`, {
|
|
34
|
+
headers: {
|
|
35
|
+
accept: "application/vnd.github.sha",
|
|
36
|
+
...access.authorization ? { authorization: `Bearer ${access.authorization.token}` } : {}
|
|
37
|
+
},
|
|
38
|
+
signal: AbortSignal.timeout(1e4)
|
|
39
|
+
});
|
|
40
|
+
if (!response.ok) throw new Error(`GitHub rejected the head lookup for ${input.repository.slug}@${input.branch} (${response.status}).`);
|
|
41
|
+
const sha = (await response.text()).trim();
|
|
42
|
+
if (!SHA_PATTERN.test(sha)) throw new Error(`GitHub returned no commit sha for ${input.repository.slug}@${input.branch}.`);
|
|
43
|
+
return sha;
|
|
44
|
+
}
|
|
45
|
+
//#endregion
|
|
46
|
+
export { getBranchHead, listRepositoryCommits };
|
|
47
|
+
|
|
48
|
+
//# sourceMappingURL=commits.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"commits.js","names":[],"sources":["../../../src/integrations/github/commits.ts"],"sourcesContent":["/**\n * Read with the installation token that already clones and pushes, not through\n * `getInstallationOctokit`: the Platform deployment answers that with a\n * pull-request-only stub, so `repos.*` is undefined there at runtime while the\n * cast keeps the compiler quiet.\n */\n\nimport type { VersionControl } from '../../capabilities/version-control.js';\n\nconst GITHUB_API = 'https://api.github.com';\n\nexport interface RepositoryCommit {\n sha: string;\n message: string;\n author: string | null;\n avatarUrl: string | null;\n committedAt: string | null;\n url: string;\n}\n\ninterface GithubCommitResponse {\n sha: string;\n html_url: string;\n commit: { message: string; author: { name?: string; date?: string } | null };\n author: { login: string; avatar_url: string } | null;\n}\n\nexport async function listRepositoryCommits(\n github: { versionControl: Pick<VersionControl, 'getRepositoryAccess'> },\n input: {\n orgId: string;\n project: { repository: { id: string; slug: string } };\n branch: string;\n limit: number;\n },\n): Promise<RepositoryCommit[]> {\n const access = await github.versionControl.getRepositoryAccess({\n orgId: input.orgId,\n repositoryId: input.project.repository.id,\n });\n\n const query = new URLSearchParams({ sha: input.branch, per_page: String(input.limit) });\n const response = await fetch(`${GITHUB_API}/repos/${input.project.repository.slug}/commits?${query}`, {\n headers: {\n accept: 'application/vnd.github+json',\n ...(access.authorization ? { authorization: `Bearer ${access.authorization.token}` } : {}),\n },\n });\n\n if (!response.ok) {\n throw new Error(`GitHub rejected the commit listing for ${input.project.repository.slug} (${response.status}).`);\n }\n\n const commits = (await response.json()) as GithubCommitResponse[];\n return commits.map(entry => ({\n sha: entry.sha,\n message: entry.commit.message.split('\\n')[0] ?? '',\n author: entry.author?.login ?? entry.commit.author?.name ?? null,\n avatarUrl: entry.author?.avatar_url ?? null,\n committedAt: entry.commit.author?.date ?? null,\n url: entry.html_url,\n }));\n}\n\nconst SHA_PATTERN = /^[0-9a-f]{40}$/;\n\n/** The commit a branch points at right now, as a full sha. Throws when GitHub rejects the lookup. */\nexport async function getBranchHead(\n github: { versionControl: Pick<VersionControl, 'getRepositoryAccess'> },\n input: { orgId: string; repository: { id: string; slug: string }; branch: string },\n): Promise<string> {\n const access = await github.versionControl.getRepositoryAccess({\n orgId: input.orgId,\n repositoryId: input.repository.id,\n });\n\n const response = await fetch(\n `${GITHUB_API}/repos/${input.repository.slug}/commits/${encodeURIComponent(input.branch)}`,\n {\n headers: {\n accept: 'application/vnd.github.sha',\n ...(access.authorization ? { authorization: `Bearer ${access.authorization.token}` } : {}),\n },\n signal: AbortSignal.timeout(10_000),\n },\n );\n\n if (!response.ok) {\n throw new Error(`GitHub rejected the head lookup for ${input.repository.slug}@${input.branch} (${response.status}).`);\n }\n\n const sha = (await response.text()).trim();\n if (!SHA_PATTERN.test(sha)) {\n throw new Error(`GitHub returned no commit sha for ${input.repository.slug}@${input.branch}.`);\n }\n return sha;\n}\n"],"mappings":";AASA,MAAM,aAAa;AAkBnB,eAAsB,sBACpB,QACA,OAM6B;CAC7B,MAAM,SAAS,MAAM,OAAO,eAAe,oBAAoB;EAC7D,OAAO,MAAM;EACb,cAAc,MAAM,QAAQ,WAAW;CACzC,CAAC;CAED,MAAM,QAAQ,IAAI,gBAA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