@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,633 @@
|
|
|
1
|
+
import { createBoardRegistry } from "../boards/registry.js";
|
|
2
|
+
import "../boards/index.js";
|
|
3
|
+
import { effectiveModelScope } from "../storage/domains/projects/base.js";
|
|
4
|
+
import { FACTORY_PULL_REQUEST_RECONCILIATION_KEY, FACTORY_RULE_MATERIALIZATION_KEY, WorkItemRelationError, WorkItemUpdateConflictError } from "../storage/domains/work-items/base.js";
|
|
5
|
+
import { EXTERNAL_SOURCE_MISSING_KEY } from "../integrations/issue-reconciler.js";
|
|
6
|
+
import { FACTORY_ROUTE_CONTRACTS } from "./contracts.js";
|
|
7
|
+
import { Route } from "./route.js";
|
|
8
|
+
import { FactoryStartTransitionError, WorkItemRepositoryError } from "../rules/start-coordinator.js";
|
|
9
|
+
import { auditRequestOrigin } from "../storage/domains/audit/domain.js";
|
|
10
|
+
import { decisionRetryable, overtakenDecisionIds } from "../rules/decision-applicability.js";
|
|
11
|
+
import { thresholdsOrDefault } from "../storage/domains/queue-health/base.js";
|
|
12
|
+
import { computeFactoryMetrics, parseMetricsRange } from "../storage/domains/work-items/metrics.js";
|
|
13
|
+
import { factoryDecisionType } from "./attention-providers.js";
|
|
14
|
+
import { buildAttentionRoutes } from "./attention.js";
|
|
15
|
+
import { buildSupervisorRoutes } from "./supervisor.js";
|
|
16
|
+
import { registerApiRoute } from "@mastra/core/server";
|
|
17
|
+
//#region src/routes/work-items.ts
|
|
18
|
+
/** The card as clients see it, without the dispatcher's internal bookkeeping. */
|
|
19
|
+
function toWireWorkItem(item) {
|
|
20
|
+
if (!item.metadata || !("factoryRuleMaterializationKey" in item.metadata) && !("factoryPullRequestReconciliation" in item.metadata) && !("externalSourceMissingAt" in item.metadata)) return item;
|
|
21
|
+
return {
|
|
22
|
+
...item,
|
|
23
|
+
metadata: publicWorkItemMetadata(item.metadata) ?? {}
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
/** Session ids of the listed cards that the predicate picks, each once. */
|
|
27
|
+
function sessionIdsWhere(items, predicate) {
|
|
28
|
+
const picked = /* @__PURE__ */ new Set();
|
|
29
|
+
for (const item of items) for (const { sessionId } of Object.values(item.sessions)) if (predicate(sessionId)) picked.add(sessionId);
|
|
30
|
+
return [...picked];
|
|
31
|
+
}
|
|
32
|
+
function loose(c) {
|
|
33
|
+
return c;
|
|
34
|
+
}
|
|
35
|
+
function publicWorkItemMetadata(value) {
|
|
36
|
+
if (value === null) return null;
|
|
37
|
+
const { [FACTORY_RULE_MATERIALIZATION_KEY]: _materialization, [FACTORY_PULL_REQUEST_RECONCILIATION_KEY]: _reconciliation, [EXTERNAL_SOURCE_MISSING_KEY]: _externalSourceMissingAt, ...metadata } = value;
|
|
38
|
+
return metadata;
|
|
39
|
+
}
|
|
40
|
+
/** Validate an untrusted create body. Unknown keys are dropped. */
|
|
41
|
+
function parseCreateWorkItem(body) {
|
|
42
|
+
const parsed = FACTORY_ROUTE_CONTRACTS.workItemCreate.bodySchema.safeParse(body);
|
|
43
|
+
return parsed.success ? parsed.data : null;
|
|
44
|
+
}
|
|
45
|
+
/** Validate an untrusted patch body. Unknown keys are dropped. */
|
|
46
|
+
function parseUpdateWorkItem(body) {
|
|
47
|
+
const parsed = FACTORY_ROUTE_CONTRACTS.workItemUpdate.bodySchema.safeParse(body);
|
|
48
|
+
return parsed.success ? parsed.data : null;
|
|
49
|
+
}
|
|
50
|
+
async function readJson(c) {
|
|
51
|
+
try {
|
|
52
|
+
return await c.req.json();
|
|
53
|
+
} catch {
|
|
54
|
+
return;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
/** Fields a PATCH touched, for the bounded `updated` event summary. */
|
|
58
|
+
function patchedFields(patch) {
|
|
59
|
+
return Object.keys(patch).filter((key) => patch[key] !== void 0);
|
|
60
|
+
}
|
|
61
|
+
function parseTransitionBody(body) {
|
|
62
|
+
const parsed = FACTORY_ROUTE_CONTRACTS.workItemTransition.bodySchema.safeParse(body);
|
|
63
|
+
return parsed.success ? parsed.data : null;
|
|
64
|
+
}
|
|
65
|
+
function parseStartBody(body, tenant, factoryProjectId, modelScope) {
|
|
66
|
+
const parsed = FACTORY_ROUTE_CONTRACTS.workItemStart.bodySchema.safeParse(body);
|
|
67
|
+
return parsed.success ? {
|
|
68
|
+
...tenant,
|
|
69
|
+
factoryProjectId,
|
|
70
|
+
modelScope,
|
|
71
|
+
...parsed.data
|
|
72
|
+
} : null;
|
|
73
|
+
}
|
|
74
|
+
function encodeDecisionCursor(decision) {
|
|
75
|
+
return Buffer.from(JSON.stringify([decision.createdAt.toISOString(), decision.id]), "utf8").toString("base64url");
|
|
76
|
+
}
|
|
77
|
+
/** A proposed transition names the seat its lane addresses, so the card can label what approving starts. */
|
|
78
|
+
function summaryRole(boards, decision) {
|
|
79
|
+
if (typeof decision.role === "string") return decision.role.slice(0, 32);
|
|
80
|
+
if (decision.type !== "transition") return null;
|
|
81
|
+
const { board, stage } = decision;
|
|
82
|
+
if (typeof board !== "string" || typeof stage !== "string") return null;
|
|
83
|
+
return boards.get(board)?.roleForPhase(stage) ?? null;
|
|
84
|
+
}
|
|
85
|
+
/** A linked-card decision names where the card is synced from, so the UI can say "GitHub" rather than "a linked card". */
|
|
86
|
+
function summarySource(decision) {
|
|
87
|
+
if (decision.type !== "upsertLinkedWorkItem") return null;
|
|
88
|
+
const source = decision.source;
|
|
89
|
+
return source === "github-issue" || source === "github-pr" || source === "gitlab-issue" || source === "gitlab-pr" || source === "linear-issue" || source === "manual" ? source : null;
|
|
90
|
+
}
|
|
91
|
+
function decisionSummary(boards, decision, overtaken = false) {
|
|
92
|
+
return {
|
|
93
|
+
id: decision.id,
|
|
94
|
+
evaluationId: decision.evaluationId,
|
|
95
|
+
workItemId: decision.workItemId,
|
|
96
|
+
type: factoryDecisionType(decision),
|
|
97
|
+
role: summaryRole(boards, decision.decision),
|
|
98
|
+
source: summarySource(decision.decision),
|
|
99
|
+
status: decision.status,
|
|
100
|
+
attempts: decision.attempts,
|
|
101
|
+
failureOccurrence: decision.failureOccurrence,
|
|
102
|
+
failureCode: decision.failureCode,
|
|
103
|
+
canRetry: decisionRetryable(decision, overtaken),
|
|
104
|
+
lastError: decision.lastError?.slice(0, 512) ?? null,
|
|
105
|
+
createdAt: decision.createdAt.toISOString(),
|
|
106
|
+
updatedAt: decision.updatedAt.toISOString(),
|
|
107
|
+
completedAt: decision.completedAt?.toISOString() ?? null
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
var WorkItemRoutes = class extends Route {
|
|
111
|
+
#defaultBoards;
|
|
112
|
+
get #boards() {
|
|
113
|
+
return this.deps.boardRegistry ?? (this.#defaultBoards ??= createBoardRegistry());
|
|
114
|
+
}
|
|
115
|
+
/** Resolve the `(orgId, userId)` tenant or a ready-to-return error response. */
|
|
116
|
+
async #resolveTenant(c) {
|
|
117
|
+
await this.deps.auth.ensureUser(c);
|
|
118
|
+
const tenant = this.deps.auth.tenant(c);
|
|
119
|
+
if (!tenant) return { response: c.json({ error: "unauthorized" }, 401) };
|
|
120
|
+
if (!tenant.orgId) return { response: c.json({
|
|
121
|
+
error: "organization_required",
|
|
122
|
+
message: "The Factory board requires an organization."
|
|
123
|
+
}, 403) };
|
|
124
|
+
return {
|
|
125
|
+
orgId: tenant.orgId,
|
|
126
|
+
userId: tenant.userId
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
/**
|
|
130
|
+
* Resolve the tenant AND the org-owned project from the `:id` param. Work
|
|
131
|
+
* items hang off a project, so listing/creating requires the project to
|
|
132
|
+
* exist in the caller's org.
|
|
133
|
+
*/
|
|
134
|
+
async #resolveProject(c) {
|
|
135
|
+
const tenant = await this.#resolveTenant(c);
|
|
136
|
+
if ("response" in tenant) return tenant;
|
|
137
|
+
const parsedPath = FACTORY_ROUTE_CONTRACTS.projectGet.pathSchema.safeParse({ id: c.req.param("id") });
|
|
138
|
+
if (!parsedPath.success) return { response: c.json({ error: "Project not found" }, 404) };
|
|
139
|
+
const projectId = parsedPath.data.id;
|
|
140
|
+
const { projects } = this.deps;
|
|
141
|
+
await projects.ensureReady();
|
|
142
|
+
const project = await projects.get({
|
|
143
|
+
orgId: tenant.orgId,
|
|
144
|
+
id: projectId
|
|
145
|
+
});
|
|
146
|
+
if (!project) return { response: c.json({ error: "Project not found" }, 404) };
|
|
147
|
+
const modelScope = effectiveModelScope(project.modelScope, "run");
|
|
148
|
+
return {
|
|
149
|
+
...tenant,
|
|
150
|
+
factoryProjectId: projectId,
|
|
151
|
+
modelScope,
|
|
152
|
+
defaultModelId: modelScope === "factory" ? project.defaultModelId : null
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
async #auditWorkItemPatch({ context, item, patch }) {
|
|
156
|
+
await this.deps.audit.emit({
|
|
157
|
+
context,
|
|
158
|
+
input: {
|
|
159
|
+
action: "factory.work_item.updated",
|
|
160
|
+
factoryProjectId: item.factoryProjectId,
|
|
161
|
+
targets: [{
|
|
162
|
+
type: "work_item",
|
|
163
|
+
id: item.id,
|
|
164
|
+
name: item.title
|
|
165
|
+
}],
|
|
166
|
+
metadata: { fields: patchedFields(patch) }
|
|
167
|
+
}
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
/** Releasing a parked run and dropping it: same request, opposite outcomes, both audited as consent. */
|
|
171
|
+
#proposalRoute({ verb, settle }) {
|
|
172
|
+
const { audit, workItems } = this.deps;
|
|
173
|
+
const contract = verb === "approve" ? FACTORY_ROUTE_CONTRACTS.decisionApprove : FACTORY_ROUTE_CONTRACTS.decisionDismiss;
|
|
174
|
+
return registerApiRoute(contract.path, {
|
|
175
|
+
method: contract.method,
|
|
176
|
+
requiresAuth: false,
|
|
177
|
+
handler: async (c) => {
|
|
178
|
+
const context = loose(c);
|
|
179
|
+
const resolved = await this.#resolveProject(context);
|
|
180
|
+
if ("response" in resolved) return resolved.response;
|
|
181
|
+
const parsedPath = contract.pathSchema.safeParse({
|
|
182
|
+
id: resolved.factoryProjectId,
|
|
183
|
+
decisionId: context.req.param("decisionId")
|
|
184
|
+
});
|
|
185
|
+
if (!parsedPath.success) return c.json({ error: "invalid_decision_id" }, 422);
|
|
186
|
+
const { decisionId } = parsedPath.data;
|
|
187
|
+
await workItems.ensureReady();
|
|
188
|
+
const now = /* @__PURE__ */ new Date();
|
|
189
|
+
const decision = await settle(resolved.orgId, resolved.factoryProjectId, decisionId, now, resolved.userId);
|
|
190
|
+
if (!decision) return c.json({ error: "decision_not_proposed" }, 409);
|
|
191
|
+
await audit.emit({
|
|
192
|
+
context,
|
|
193
|
+
input: {
|
|
194
|
+
action: verb === "approve" ? "factory.run.approved" : "factory.run.dismissed",
|
|
195
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
196
|
+
targets: decision.workItemId ? [{
|
|
197
|
+
type: "work_item",
|
|
198
|
+
id: decision.workItemId
|
|
199
|
+
}] : [{
|
|
200
|
+
type: "rule_decision",
|
|
201
|
+
id: decision.id
|
|
202
|
+
}],
|
|
203
|
+
metadata: {
|
|
204
|
+
decisionId: decision.id,
|
|
205
|
+
effect: factoryDecisionType(decision)
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
});
|
|
209
|
+
return c.json({ decision: decisionSummary(this.#boards, decision) });
|
|
210
|
+
}
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
/** Build the Factory work-item routes as Mastra `apiRoutes`. */
|
|
214
|
+
routes() {
|
|
215
|
+
const { audit, workItems, queueHealth, transitionService, startCoordinator, liveSessions } = this.deps;
|
|
216
|
+
return [
|
|
217
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.boardCatalog.path, {
|
|
218
|
+
method: FACTORY_ROUTE_CONTRACTS.boardCatalog.method,
|
|
219
|
+
requiresAuth: false,
|
|
220
|
+
handler: async (c) => {
|
|
221
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
222
|
+
if ("response" in resolved) return resolved.response;
|
|
223
|
+
return c.json({ boards: [...this.#boards].map(([id, board]) => ({
|
|
224
|
+
id,
|
|
225
|
+
title: board.title,
|
|
226
|
+
initialPhase: board.initialPhase,
|
|
227
|
+
phases: Object.entries(board.phases).map(([phaseId, phase]) => ({
|
|
228
|
+
id: phaseId,
|
|
229
|
+
title: phase.title,
|
|
230
|
+
kind: phase.kind,
|
|
231
|
+
...phase.kind === "working" ? { role: phase.role } : {},
|
|
232
|
+
transitions: (board.transitions[phaseId] ?? []).map(({ outcome, to }) => ({
|
|
233
|
+
outcome,
|
|
234
|
+
to
|
|
235
|
+
}))
|
|
236
|
+
}))
|
|
237
|
+
})) });
|
|
238
|
+
}
|
|
239
|
+
}),
|
|
240
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemList.path, {
|
|
241
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemList.method,
|
|
242
|
+
requiresAuth: false,
|
|
243
|
+
handler: async (c) => {
|
|
244
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
245
|
+
if ("response" in resolved) return resolved.response;
|
|
246
|
+
await workItems.ensureReady();
|
|
247
|
+
const items = await workItems.list({
|
|
248
|
+
orgId: resolved.orgId,
|
|
249
|
+
factoryProjectId: resolved.factoryProjectId
|
|
250
|
+
});
|
|
251
|
+
return c.json({
|
|
252
|
+
workItems: items.map(toWireWorkItem),
|
|
253
|
+
runningSessionIds: sessionIdsWhere(items, (sessionId) => liveSessions.isRunning(sessionId)),
|
|
254
|
+
parkedSessionIds: sessionIdsWhere(items, (sessionId) => liveSessions.parked(sessionId) !== void 0)
|
|
255
|
+
});
|
|
256
|
+
}
|
|
257
|
+
}),
|
|
258
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.metricsGet.path, {
|
|
259
|
+
method: FACTORY_ROUTE_CONTRACTS.metricsGet.method,
|
|
260
|
+
requiresAuth: false,
|
|
261
|
+
handler: async (c) => {
|
|
262
|
+
const context = loose(c);
|
|
263
|
+
const resolved = await this.#resolveProject(context);
|
|
264
|
+
if ("response" in resolved) return resolved.response;
|
|
265
|
+
const query = FACTORY_ROUTE_CONTRACTS.metricsGet.querySchema.safeParse({
|
|
266
|
+
from: context.req.query("from"),
|
|
267
|
+
to: context.req.query("to")
|
|
268
|
+
});
|
|
269
|
+
if (!query.success) return c.json({ error: "invalid_metrics_range" }, 400);
|
|
270
|
+
const { windowStart, windowEnd } = parseMetricsRange(query.data.from, query.data.to, /* @__PURE__ */ new Date());
|
|
271
|
+
await workItems.ensureReady();
|
|
272
|
+
const items = await workItems.list({
|
|
273
|
+
orgId: resolved.orgId,
|
|
274
|
+
factoryProjectId: resolved.factoryProjectId
|
|
275
|
+
});
|
|
276
|
+
return c.json({ metrics: computeFactoryMetrics(items, {
|
|
277
|
+
windowStart,
|
|
278
|
+
windowEnd
|
|
279
|
+
}) });
|
|
280
|
+
}
|
|
281
|
+
}),
|
|
282
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.healthThresholdsGet.path, {
|
|
283
|
+
method: FACTORY_ROUTE_CONTRACTS.healthThresholdsGet.method,
|
|
284
|
+
requiresAuth: false,
|
|
285
|
+
handler: async (c) => {
|
|
286
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
287
|
+
if ("response" in resolved) return resolved.response;
|
|
288
|
+
await queueHealth.ensureReady();
|
|
289
|
+
const stored = await queueHealth.getConfig(resolved.orgId, resolved.factoryProjectId);
|
|
290
|
+
return c.json({ thresholds: thresholdsOrDefault(stored) });
|
|
291
|
+
}
|
|
292
|
+
}),
|
|
293
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.decisionList.path, {
|
|
294
|
+
method: FACTORY_ROUTE_CONTRACTS.decisionList.method,
|
|
295
|
+
requiresAuth: false,
|
|
296
|
+
handler: async (c) => {
|
|
297
|
+
const context = loose(c);
|
|
298
|
+
const resolved = await this.#resolveProject(context);
|
|
299
|
+
if ("response" in resolved) return resolved.response;
|
|
300
|
+
const query = FACTORY_ROUTE_CONTRACTS.decisionList.querySchema.safeParse({
|
|
301
|
+
statuses: context.req.query("statuses"),
|
|
302
|
+
before: context.req.query("before"),
|
|
303
|
+
limit: context.req.query("limit")
|
|
304
|
+
});
|
|
305
|
+
if (!query.success) {
|
|
306
|
+
const field = query.error.issues[0]?.path[0];
|
|
307
|
+
return c.json({ error: field === "before" ? "invalid_cursor" : "invalid_decision_query" }, 400);
|
|
308
|
+
}
|
|
309
|
+
await workItems.ensureReady();
|
|
310
|
+
const page = await workItems.listDeferredDecisionPage({
|
|
311
|
+
orgId: resolved.orgId,
|
|
312
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
313
|
+
statuses: query.data.statuses,
|
|
314
|
+
before: query.data.before,
|
|
315
|
+
limit: query.data.limit
|
|
316
|
+
});
|
|
317
|
+
const last = page.decisions.at(-1);
|
|
318
|
+
const overtaken = await overtakenDecisionIds(workItems, this.#boards, resolved, page.decisions.filter((decision) => decision.status === "failed"));
|
|
319
|
+
return c.json({
|
|
320
|
+
decisions: page.decisions.map((decision) => decisionSummary(this.#boards, decision, overtaken.has(decision.id))),
|
|
321
|
+
...page.hasMore && last ? { nextCursor: encodeDecisionCursor(last) } : {}
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
}),
|
|
325
|
+
...buildAttentionRoutes({
|
|
326
|
+
workItems,
|
|
327
|
+
boards: this.#boards,
|
|
328
|
+
comments: this.deps.comments,
|
|
329
|
+
liveSessions,
|
|
330
|
+
resolveProject: (context) => this.#resolveProject(loose(context))
|
|
331
|
+
}),
|
|
332
|
+
...buildSupervisorRoutes({
|
|
333
|
+
workItems,
|
|
334
|
+
boards: this.#boards,
|
|
335
|
+
resolveProject: (context) => this.#resolveProject(loose(context))
|
|
336
|
+
}),
|
|
337
|
+
this.#proposalRoute({
|
|
338
|
+
verb: "approve",
|
|
339
|
+
settle: workItems.approveDeferredDecision.bind(workItems)
|
|
340
|
+
}),
|
|
341
|
+
this.#proposalRoute({
|
|
342
|
+
verb: "dismiss",
|
|
343
|
+
settle: workItems.dismissDeferredDecision.bind(workItems)
|
|
344
|
+
}),
|
|
345
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.decisionRetry.path, {
|
|
346
|
+
method: FACTORY_ROUTE_CONTRACTS.decisionRetry.method,
|
|
347
|
+
requiresAuth: false,
|
|
348
|
+
handler: async (c) => {
|
|
349
|
+
const context = loose(c);
|
|
350
|
+
const resolved = await this.#resolveProject(context);
|
|
351
|
+
if ("response" in resolved) return resolved.response;
|
|
352
|
+
const parsedPath = FACTORY_ROUTE_CONTRACTS.decisionRetry.pathSchema.safeParse({
|
|
353
|
+
id: resolved.factoryProjectId,
|
|
354
|
+
decisionId: context.req.param("decisionId")
|
|
355
|
+
});
|
|
356
|
+
if (!parsedPath.success) return c.json({ error: "invalid_decision_id" }, 422);
|
|
357
|
+
const { decisionId } = parsedPath.data;
|
|
358
|
+
await workItems.ensureReady();
|
|
359
|
+
const current = await workItems.getDeferredDecision(resolved.orgId, resolved.factoryProjectId, decisionId);
|
|
360
|
+
if (!current || !decisionRetryable(current, false)) return c.json({ error: "decision_not_retryable" }, 409);
|
|
361
|
+
if ((await overtakenDecisionIds(workItems, this.#boards, resolved, [current])).size > 0) return c.json({ error: "decision_not_retryable" }, 409);
|
|
362
|
+
const decision = await workItems.retryDeferredDecision(resolved.orgId, resolved.factoryProjectId, decisionId, /* @__PURE__ */ new Date());
|
|
363
|
+
if (!decision) return c.json({ error: "decision_not_retryable" }, 409);
|
|
364
|
+
return c.json({ decision: decisionSummary(this.#boards, decision) });
|
|
365
|
+
}
|
|
366
|
+
}),
|
|
367
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemCreate.path, {
|
|
368
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemCreate.method,
|
|
369
|
+
requiresAuth: false,
|
|
370
|
+
handler: async (c) => {
|
|
371
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
372
|
+
if ("response" in resolved) return resolved.response;
|
|
373
|
+
const body = await readJson(loose(c));
|
|
374
|
+
if (body === void 0) return c.json({ error: "Invalid JSON body" }, 400);
|
|
375
|
+
const input = parseCreateWorkItem(body);
|
|
376
|
+
if (!input) return c.json({ error: "invalid_work_item" }, 400);
|
|
377
|
+
const boardId = input.board ?? (input.externalSource?.type === "pull-request" ? "review" : "work");
|
|
378
|
+
const board = this.#boards.get(boardId);
|
|
379
|
+
if (!board) return c.json({
|
|
380
|
+
error: "invalid_board",
|
|
381
|
+
message: `Board '${boardId}' is not installed.`
|
|
382
|
+
}, 422);
|
|
383
|
+
const initialStages = input.stages ?? [board.initialPhase];
|
|
384
|
+
if (initialStages.length !== 1 || initialStages[0] !== board.initialPhase) return c.json({
|
|
385
|
+
error: "governed_transition_required",
|
|
386
|
+
message: `New work items must enter through the '${board.initialPhase}' phase of board '${boardId}'.`
|
|
387
|
+
}, 409);
|
|
388
|
+
await workItems.ensureReady();
|
|
389
|
+
try {
|
|
390
|
+
const result = await workItems.upsert({
|
|
391
|
+
orgId: resolved.orgId,
|
|
392
|
+
userId: resolved.userId,
|
|
393
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
394
|
+
input: {
|
|
395
|
+
...input,
|
|
396
|
+
board: boardId,
|
|
397
|
+
stages: initialStages
|
|
398
|
+
},
|
|
399
|
+
reuseMode: "non-stage"
|
|
400
|
+
});
|
|
401
|
+
let item = result.item;
|
|
402
|
+
if (result.created) {
|
|
403
|
+
if (!transitionService) {
|
|
404
|
+
await workItems.delete({
|
|
405
|
+
orgId: resolved.orgId,
|
|
406
|
+
id: item.id
|
|
407
|
+
});
|
|
408
|
+
return c.json({ error: "factory_transitions_unavailable" }, 503);
|
|
409
|
+
}
|
|
410
|
+
const entered = await transitionService.transition({
|
|
411
|
+
orgId: resolved.orgId,
|
|
412
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
413
|
+
workItemId: item.id,
|
|
414
|
+
board: boardId,
|
|
415
|
+
stage: board.initialPhase,
|
|
416
|
+
expectedRevision: item.revision,
|
|
417
|
+
actor: {
|
|
418
|
+
type: "human",
|
|
419
|
+
id: resolved.userId
|
|
420
|
+
},
|
|
421
|
+
...auditRequestOrigin(loose(c)),
|
|
422
|
+
ingress: {
|
|
423
|
+
type: "human",
|
|
424
|
+
identity: `work-item:${item.id}:initial-entry`
|
|
425
|
+
},
|
|
426
|
+
cause: "work_item_created",
|
|
427
|
+
initialEntry: true
|
|
428
|
+
});
|
|
429
|
+
if (entered.status === "rejected") {
|
|
430
|
+
await workItems.delete({
|
|
431
|
+
orgId: resolved.orgId,
|
|
432
|
+
id: item.id
|
|
433
|
+
});
|
|
434
|
+
return c.json({
|
|
435
|
+
status: "rejected",
|
|
436
|
+
code: entered.code,
|
|
437
|
+
reason: entered.reason
|
|
438
|
+
}, 422);
|
|
439
|
+
}
|
|
440
|
+
item = await workItems.getForProject(resolved.orgId, resolved.factoryProjectId, item.id) ?? item;
|
|
441
|
+
await audit.emit({
|
|
442
|
+
context: loose(c),
|
|
443
|
+
input: {
|
|
444
|
+
action: "factory.work_item.created",
|
|
445
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
446
|
+
targets: [{
|
|
447
|
+
type: "work_item",
|
|
448
|
+
id: item.id,
|
|
449
|
+
name: item.title
|
|
450
|
+
}],
|
|
451
|
+
metadata: {
|
|
452
|
+
externalSource: item.externalSource,
|
|
453
|
+
stages: item.stages
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
});
|
|
457
|
+
} else {
|
|
458
|
+
const { stages: _stages, sessions: _sessions, ...boundedPatch } = input;
|
|
459
|
+
await this.#auditWorkItemPatch({
|
|
460
|
+
context: loose(c),
|
|
461
|
+
item,
|
|
462
|
+
patch: boundedPatch
|
|
463
|
+
});
|
|
464
|
+
}
|
|
465
|
+
return c.json({ workItem: toWireWorkItem(item) });
|
|
466
|
+
} catch (error) {
|
|
467
|
+
if (error instanceof WorkItemRelationError) return c.json({
|
|
468
|
+
error: error.code,
|
|
469
|
+
message: error.message
|
|
470
|
+
}, 400);
|
|
471
|
+
throw error;
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
}),
|
|
475
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemTransition.path, {
|
|
476
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemTransition.method,
|
|
477
|
+
requiresAuth: false,
|
|
478
|
+
handler: async (c) => {
|
|
479
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
480
|
+
if ("response" in resolved) return resolved.response;
|
|
481
|
+
const context = loose(c);
|
|
482
|
+
const parsedPath = FACTORY_ROUTE_CONTRACTS.workItemTransition.pathSchema.safeParse({
|
|
483
|
+
id: resolved.factoryProjectId,
|
|
484
|
+
workItemId: context.req.param("workItemId")
|
|
485
|
+
});
|
|
486
|
+
if (!parsedPath.success) return c.json({ error: "Work item not found" }, 404);
|
|
487
|
+
const { workItemId } = parsedPath.data;
|
|
488
|
+
const parsed = parseTransitionBody(await readJson(context));
|
|
489
|
+
if (!parsed) return c.json({ error: "invalid_transition_request" }, 400);
|
|
490
|
+
if (!transitionService) return c.json({ error: "factory_transition_unavailable" }, 503);
|
|
491
|
+
await workItems.ensureReady();
|
|
492
|
+
const result = await transitionService.transition({
|
|
493
|
+
...parsed,
|
|
494
|
+
orgId: resolved.orgId,
|
|
495
|
+
factoryProjectId: resolved.factoryProjectId,
|
|
496
|
+
workItemId,
|
|
497
|
+
actor: {
|
|
498
|
+
type: "human",
|
|
499
|
+
id: resolved.userId
|
|
500
|
+
},
|
|
501
|
+
...auditRequestOrigin(loose(c)),
|
|
502
|
+
ingress: {
|
|
503
|
+
...parsed.ingress,
|
|
504
|
+
identity: `human:${resolved.userId}:${parsed.ingress.identity}`
|
|
505
|
+
}
|
|
506
|
+
});
|
|
507
|
+
if (result.status === "accepted") return c.json({ result });
|
|
508
|
+
return c.json({ result }, result.code === "stale" ? 409 : 422);
|
|
509
|
+
}
|
|
510
|
+
}),
|
|
511
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemStart.path, {
|
|
512
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemStart.method,
|
|
513
|
+
requiresAuth: false,
|
|
514
|
+
handler: async (c) => {
|
|
515
|
+
const resolved = await this.#resolveProject(loose(c));
|
|
516
|
+
if ("response" in resolved) return resolved.response;
|
|
517
|
+
if (!startCoordinator) return c.json({ error: "factory_start_unavailable" }, 503);
|
|
518
|
+
const input = parseStartBody(await readJson(loose(c)), resolved, resolved.factoryProjectId, resolved.modelScope);
|
|
519
|
+
if (!input) return c.json({ error: "invalid_factory_start" }, 400);
|
|
520
|
+
input.requestContext = loose(c).get("requestContext");
|
|
521
|
+
input.defaultModelId = resolved.defaultModelId ?? void 0;
|
|
522
|
+
await workItems.ensureReady();
|
|
523
|
+
let prepared;
|
|
524
|
+
try {
|
|
525
|
+
prepared = await startCoordinator.prepare(input);
|
|
526
|
+
} catch (error) {
|
|
527
|
+
if (error instanceof FactoryStartTransitionError) return c.json({ result: error.result }, error.result.code === "stale" ? 409 : 422);
|
|
528
|
+
if (error instanceof WorkItemRepositoryError) return c.json({
|
|
529
|
+
error: error.code,
|
|
530
|
+
message: error.message,
|
|
531
|
+
candidates: error.candidates
|
|
532
|
+
}, 409);
|
|
533
|
+
throw error;
|
|
534
|
+
}
|
|
535
|
+
return c.json({ prepared }, 202);
|
|
536
|
+
}
|
|
537
|
+
}),
|
|
538
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemUpdate.path, {
|
|
539
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemUpdate.method,
|
|
540
|
+
requiresAuth: false,
|
|
541
|
+
handler: async (c) => {
|
|
542
|
+
const tenant = await this.#resolveTenant(loose(c));
|
|
543
|
+
if ("response" in tenant) return tenant.response;
|
|
544
|
+
const context = loose(c);
|
|
545
|
+
const parsedPath = FACTORY_ROUTE_CONTRACTS.workItemUpdate.pathSchema.safeParse({ id: context.req.param("id") });
|
|
546
|
+
if (!parsedPath.success) return c.json({ error: "Work item not found" }, 404);
|
|
547
|
+
const { id } = parsedPath.data;
|
|
548
|
+
const body = await readJson(context);
|
|
549
|
+
if (body === void 0) return c.json({ error: "Invalid JSON body" }, 400);
|
|
550
|
+
const patch = parseUpdateWorkItem(body);
|
|
551
|
+
if (!patch) return c.json({ error: "invalid_work_item_patch" }, 400);
|
|
552
|
+
await workItems.ensureReady();
|
|
553
|
+
const existing = await workItems.get({
|
|
554
|
+
orgId: tenant.orgId,
|
|
555
|
+
id
|
|
556
|
+
});
|
|
557
|
+
if (!existing) return c.json({ error: "Work item not found" }, 404);
|
|
558
|
+
if (patch.board !== void 0) {
|
|
559
|
+
const board = this.#boards.get(patch.board);
|
|
560
|
+
const stage = patch.stages?.length === 1 ? patch.stages[0] : void 0;
|
|
561
|
+
if (existing.board !== null) return c.json({ error: "board_already_assigned" }, 409);
|
|
562
|
+
if (!board) return c.json({ error: "board_not_installed" }, 400);
|
|
563
|
+
if (!stage || !Object.prototype.hasOwnProperty.call(board.phases, stage)) return c.json({ error: "invalid_board_migration_phase" }, 400);
|
|
564
|
+
} else if (patch.stages !== void 0) return c.json({
|
|
565
|
+
error: "governed_transition_required",
|
|
566
|
+
message: "Use the Factory transition endpoint to move stages."
|
|
567
|
+
}, 409);
|
|
568
|
+
try {
|
|
569
|
+
const updated = await workItems.update({
|
|
570
|
+
orgId: tenant.orgId,
|
|
571
|
+
id,
|
|
572
|
+
userId: tenant.userId,
|
|
573
|
+
patch,
|
|
574
|
+
...patch.board !== void 0 ? {
|
|
575
|
+
expectedRevision: existing.revision,
|
|
576
|
+
expectedBoard: null
|
|
577
|
+
} : {}
|
|
578
|
+
});
|
|
579
|
+
if (!updated) return c.json({ error: "Work item not found" }, 404);
|
|
580
|
+
await this.#auditWorkItemPatch({
|
|
581
|
+
context: loose(c),
|
|
582
|
+
item: updated.item,
|
|
583
|
+
patch
|
|
584
|
+
});
|
|
585
|
+
return c.json({ workItem: toWireWorkItem(updated.item) });
|
|
586
|
+
} catch (error) {
|
|
587
|
+
if (error instanceof WorkItemRelationError) return c.json({
|
|
588
|
+
error: error.code,
|
|
589
|
+
message: error.message
|
|
590
|
+
}, 400);
|
|
591
|
+
if (error instanceof WorkItemUpdateConflictError) return c.json({ error: error.reason === "board" ? "board_already_assigned" : error.code }, 409);
|
|
592
|
+
throw error;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
}),
|
|
596
|
+
registerApiRoute(FACTORY_ROUTE_CONTRACTS.workItemDelete.path, {
|
|
597
|
+
method: FACTORY_ROUTE_CONTRACTS.workItemDelete.method,
|
|
598
|
+
requiresAuth: false,
|
|
599
|
+
handler: async (c) => {
|
|
600
|
+
const tenant = await this.#resolveTenant(loose(c));
|
|
601
|
+
if ("response" in tenant) return tenant.response;
|
|
602
|
+
const context = loose(c);
|
|
603
|
+
const parsedPath = FACTORY_ROUTE_CONTRACTS.workItemDelete.pathSchema.safeParse({ id: context.req.param("id") });
|
|
604
|
+
if (!parsedPath.success) return c.json({ error: "Work item not found" }, 404);
|
|
605
|
+
const { id } = parsedPath.data;
|
|
606
|
+
await workItems.ensureReady();
|
|
607
|
+
const deleted = await workItems.delete({
|
|
608
|
+
orgId: tenant.orgId,
|
|
609
|
+
id
|
|
610
|
+
});
|
|
611
|
+
if (!deleted) return c.json({ error: "Work item not found" }, 404);
|
|
612
|
+
await audit.emit({
|
|
613
|
+
context: loose(c),
|
|
614
|
+
input: {
|
|
615
|
+
action: "factory.work_item.deleted",
|
|
616
|
+
factoryProjectId: deleted.factoryProjectId,
|
|
617
|
+
targets: [{
|
|
618
|
+
type: "work_item",
|
|
619
|
+
id: deleted.id,
|
|
620
|
+
name: deleted.title
|
|
621
|
+
}]
|
|
622
|
+
}
|
|
623
|
+
});
|
|
624
|
+
return c.json({ ok: true });
|
|
625
|
+
}
|
|
626
|
+
})
|
|
627
|
+
];
|
|
628
|
+
}
|
|
629
|
+
};
|
|
630
|
+
//#endregion
|
|
631
|
+
export { WorkItemRoutes, parseCreateWorkItem, parseUpdateWorkItem };
|
|
632
|
+
|
|
633
|
+
//# sourceMappingURL=work-items.js.map
|