@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,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lower attention tier: one collapsed row per (work item, participant), bumped
|
|
3
|
+
* per comment to stale-date read receipts. Participants derive per write —
|
|
4
|
+
* recent authors + creator, minus the comment's mentions; nothing subscribes.
|
|
5
|
+
*/
|
|
6
|
+
import type { FactoryStorageOps } from '@mastra/core/storage';
|
|
7
|
+
import type { FactoryMentionRef, WorkItemCommentRow } from './base.js';
|
|
8
|
+
/** Ceiling: an author silent for this many comments stops receiving; a real participants table is the upgrade. */
|
|
9
|
+
export declare const PARTICIPANT_SCAN_LIMIT = 200;
|
|
10
|
+
export interface WorkItemActivityRow {
|
|
11
|
+
id: string;
|
|
12
|
+
orgId: string;
|
|
13
|
+
factoryProjectId: string;
|
|
14
|
+
workItemId: string;
|
|
15
|
+
participantId: string;
|
|
16
|
+
occurrence: number;
|
|
17
|
+
latestCommentId: string;
|
|
18
|
+
latestAuthorId: string;
|
|
19
|
+
latestAuthorName: string | null;
|
|
20
|
+
occurredAt: Date;
|
|
21
|
+
}
|
|
22
|
+
export declare function fanOutWorkItemActivity(ops: FactoryStorageOps, { comment, recentAuthors, createdBy, mentions, now, }: {
|
|
23
|
+
comment: WorkItemCommentRow;
|
|
24
|
+
recentAuthors: string[];
|
|
25
|
+
createdBy: string;
|
|
26
|
+
mentions: FactoryMentionRef[];
|
|
27
|
+
now?: Date;
|
|
28
|
+
}): Promise<void>;
|
|
29
|
+
/** One bounded keyset page of a participant's activity rows, newest-first. */
|
|
30
|
+
export declare function listActivityForUser(ops: FactoryStorageOps, { orgId, factoryProjectId, userId, before, limit, }: {
|
|
31
|
+
orgId: string;
|
|
32
|
+
factoryProjectId: string;
|
|
33
|
+
userId: string;
|
|
34
|
+
before?: {
|
|
35
|
+
occurredAt: Date;
|
|
36
|
+
id: string;
|
|
37
|
+
};
|
|
38
|
+
limit: number;
|
|
39
|
+
}): Promise<WorkItemActivityRow[]>;
|
|
40
|
+
//# sourceMappingURL=activity.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/comments/activity.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAI9D,OAAO,KAAK,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAKvE,kHAAkH;AAClH,eAAO,MAAM,sBAAsB,MAAM,CAAC;AAE1C,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;IACxB,cAAc,EAAE,MAAM,CAAC;IACvB,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAC;IAChC,UAAU,EAAE,IAAI,CAAC;CAClB;AA0GD,wBAAsB,sBAAsB,CAC1C,GAAG,EAAE,iBAAiB,EACtB,EACE,OAAO,EACP,aAAa,EACb,SAAS,EACT,QAAQ,EACR,GAAgB,GACjB,EAAE;IACD,OAAO,EAAE,kBAAkB,CAAC;IAC5B,aAAa,EAAE,MAAM,EAAE,CAAC;IACxB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,iBAAiB,EAAE,CAAC;IAC9B,GAAG,CAAC,EAAE,IAAI,CAAC;CACZ,GACA,OAAO,CAAC,IAAI,CAAC,CAIf;AAED,8EAA8E;AAC9E,wBAAsB,mBAAmB,CACvC,GAAG,EAAE,iBAAiB,EACtB,EACE,KAAK,EACL,gBAAgB,EAChB,MAAM,EACN,MAAM,EACN,KAAK,GACN,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE;QAAE,UAAU,EAAE,IAAI,CAAC;QAAC,EAAE,EAAE,MAAM,CAAA;KAAE,CAAC;IAC1C,KAAK,EAAE,MAAM,CAAC;CACf,GACA,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAchC"}
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
import { isMentionableActorId } from "./actor.js";
|
|
2
|
+
import { UniqueViolationError } from "@mastra/core/storage";
|
|
3
|
+
//#region src/storage/domains/comments/activity.ts
|
|
4
|
+
/** The actor rule-materialized work items are created by; a phantom, never a participant. */
|
|
5
|
+
const RULE_DISPATCHER_ACTOR_ID = "factory-rule-dispatcher";
|
|
6
|
+
/** Ceiling: an author silent for this many comments stops receiving; a real participants table is the upgrade. */
|
|
7
|
+
const PARTICIPANT_SCAN_LIMIT = 200;
|
|
8
|
+
function toWorkItemActivity(row) {
|
|
9
|
+
return {
|
|
10
|
+
id: row.id,
|
|
11
|
+
orgId: row.org_id,
|
|
12
|
+
factoryProjectId: row.factory_project_id,
|
|
13
|
+
workItemId: row.work_item_id,
|
|
14
|
+
participantId: row.participant_id,
|
|
15
|
+
occurrence: Number(row.occurrence),
|
|
16
|
+
latestCommentId: row.latest_comment_id,
|
|
17
|
+
latestAuthorId: row.latest_author_id,
|
|
18
|
+
latestAuthorName: row.latest_author_name,
|
|
19
|
+
occurredAt: row.occurred_at
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Everyone who should hear about `comment`: the item's recent human comment
|
|
24
|
+
* authors plus its creator, minus the author themselves and anyone the comment
|
|
25
|
+
* already mentions.
|
|
26
|
+
*/
|
|
27
|
+
function activityParticipants({ recentAuthors, createdBy, comment, mentions }) {
|
|
28
|
+
const excluded = /* @__PURE__ */ new Set([comment.author.id, ...mentions.map((mention) => mention.id)]);
|
|
29
|
+
const candidates = [...recentAuthors, createdBy].filter((id) => id !== RULE_DISPATCHER_ACTOR_ID && isMentionableActorId(id) && !excluded.has(id));
|
|
30
|
+
return [...new Set(candidates)];
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Bumps one participant's row, or opens it at occurrence 1. The pointer only
|
|
34
|
+
* ever moves forward, so a backdated ingest can't bury a row someone read.
|
|
35
|
+
*
|
|
36
|
+
* `UniqueViolationError` stays contained here: `create()`'s recover path tests
|
|
37
|
+
* only `instanceof` and would misread an escaped one as a source-key replay.
|
|
38
|
+
*/
|
|
39
|
+
async function bumpParticipant(ops, comment, participantId, now) {
|
|
40
|
+
const where = {
|
|
41
|
+
work_item_id: comment.workItemId,
|
|
42
|
+
participant_id: participantId,
|
|
43
|
+
org_id: comment.orgId,
|
|
44
|
+
factory_project_id: comment.factoryProjectId
|
|
45
|
+
};
|
|
46
|
+
const pointer = {
|
|
47
|
+
latest_comment_id: comment.id,
|
|
48
|
+
latest_author_id: comment.author.id,
|
|
49
|
+
latest_author_name: comment.author.displayName ?? null,
|
|
50
|
+
occurred_at: comment.occurredAt
|
|
51
|
+
};
|
|
52
|
+
const bump = () => ops.updateAtomic("work_item_activity", where, (current) => ({
|
|
53
|
+
occurrence: Number(current.occurrence) + 1,
|
|
54
|
+
...current.occurred_at.getTime() <= comment.occurredAt.getTime() ? pointer : {},
|
|
55
|
+
updated_at: now
|
|
56
|
+
}));
|
|
57
|
+
if (await bump()) return;
|
|
58
|
+
try {
|
|
59
|
+
await ops.insertOne("work_item_activity", {
|
|
60
|
+
...where,
|
|
61
|
+
...pointer,
|
|
62
|
+
occurrence: 1,
|
|
63
|
+
created_at: now,
|
|
64
|
+
updated_at: now
|
|
65
|
+
});
|
|
66
|
+
} catch (error) {
|
|
67
|
+
if (!(error instanceof UniqueViolationError)) throw error;
|
|
68
|
+
await bump();
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
async function fanOutWorkItemActivity(ops, { comment, recentAuthors, createdBy, mentions, now = /* @__PURE__ */ new Date() }) {
|
|
72
|
+
for (const participantId of activityParticipants({
|
|
73
|
+
recentAuthors,
|
|
74
|
+
createdBy,
|
|
75
|
+
comment,
|
|
76
|
+
mentions
|
|
77
|
+
})) await bumpParticipant(ops, comment, participantId, now);
|
|
78
|
+
}
|
|
79
|
+
/** One bounded keyset page of a participant's activity rows, newest-first. */
|
|
80
|
+
async function listActivityForUser(ops, { orgId, factoryProjectId, userId, before, limit }) {
|
|
81
|
+
return (await ops.findMany("work_item_activity", {
|
|
82
|
+
org_id: orgId,
|
|
83
|
+
factory_project_id: factoryProjectId,
|
|
84
|
+
participant_id: userId
|
|
85
|
+
}, {
|
|
86
|
+
orderBy: [["occurred_at", "desc"], ["id", "desc"]],
|
|
87
|
+
limit,
|
|
88
|
+
...before ? { cursor: { values: [before.occurredAt, before.id] } } : {}
|
|
89
|
+
})).map(toWorkItemActivity);
|
|
90
|
+
}
|
|
91
|
+
//#endregion
|
|
92
|
+
export { PARTICIPANT_SCAN_LIMIT, fanOutWorkItemActivity, listActivityForUser };
|
|
93
|
+
|
|
94
|
+
//# sourceMappingURL=activity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"activity.js","names":[],"sources":["../../../../src/storage/domains/comments/activity.ts"],"sourcesContent":["/**\n * Lower attention tier: one collapsed row per (work item, participant), bumped\n * per comment to stale-date read receipts. Participants derive per write —\n * recent authors + creator, minus the comment's mentions; nothing subscribes.\n */\n\nimport type { FactoryStorageOps } from '@mastra/core/storage';\nimport { UniqueViolationError } from '@mastra/core/storage';\n\nimport { isMentionableActorId } from './actor.js';\nimport type { FactoryMentionRef, WorkItemCommentRow } from './base.js';\n\n/** The actor rule-materialized work items are created by; a phantom, never a participant. */\nconst RULE_DISPATCHER_ACTOR_ID = 'factory-rule-dispatcher';\n\n/** Ceiling: an author silent for this many comments stops receiving; a real participants table is the upgrade. */\nexport const PARTICIPANT_SCAN_LIMIT = 200;\n\nexport interface WorkItemActivityRow {\n id: string;\n orgId: string;\n factoryProjectId: string;\n workItemId: string;\n participantId: string;\n occurrence: number;\n latestCommentId: string;\n latestAuthorId: string;\n latestAuthorName: string | null;\n occurredAt: Date;\n}\n\ninterface WorkItemActivityDbRow extends Record<string, unknown> {\n id: string;\n org_id: string;\n factory_project_id: string;\n work_item_id: string;\n participant_id: string;\n occurrence: number;\n latest_comment_id: string;\n latest_author_id: string;\n latest_author_name: string | null;\n occurred_at: Date;\n created_at: Date;\n updated_at: Date;\n}\n\nfunction toWorkItemActivity(row: WorkItemActivityDbRow): WorkItemActivityRow {\n return {\n id: row.id,\n orgId: row.org_id,\n factoryProjectId: row.factory_project_id,\n workItemId: row.work_item_id,\n participantId: row.participant_id,\n occurrence: Number(row.occurrence),\n latestCommentId: row.latest_comment_id,\n latestAuthorId: row.latest_author_id,\n latestAuthorName: row.latest_author_name,\n occurredAt: row.occurred_at,\n };\n}\n\n/**\n * Everyone who should hear about `comment`: the item's recent human comment\n * authors plus its creator, minus the author themselves and anyone the comment\n * already mentions.\n */\nfunction activityParticipants({\n recentAuthors,\n createdBy,\n comment,\n mentions,\n}: {\n recentAuthors: string[];\n createdBy: string;\n comment: WorkItemCommentRow;\n mentions: FactoryMentionRef[];\n}): string[] {\n const excluded = new Set([comment.author.id, ...mentions.map(mention => mention.id)]);\n const candidates = [...recentAuthors, createdBy].filter(\n id => id !== RULE_DISPATCHER_ACTOR_ID && isMentionableActorId(id) && !excluded.has(id),\n );\n return [...new Set(candidates)];\n}\n\n/**\n * Bumps one participant's row, or opens it at occurrence 1. The pointer only\n * ever moves forward, so a backdated ingest can't bury a row someone read.\n *\n * `UniqueViolationError` stays contained here: `create()`'s recover path tests\n * only `instanceof` and would misread an escaped one as a source-key replay.\n */\nasync function bumpParticipant(\n ops: FactoryStorageOps,\n comment: WorkItemCommentRow,\n participantId: string,\n now: Date,\n): Promise<void> {\n const where = {\n work_item_id: comment.workItemId,\n participant_id: participantId,\n org_id: comment.orgId,\n factory_project_id: comment.factoryProjectId,\n };\n const pointer = {\n latest_comment_id: comment.id,\n latest_author_id: comment.author.id,\n latest_author_name: comment.author.displayName ?? null,\n occurred_at: comment.occurredAt,\n };\n // Mutator reads only `current`: a query inside `updateAtomic` checks out a\n // second pool connection while the first is held open.\n const bump = () =>\n ops.updateAtomic<WorkItemActivityDbRow>('work_item_activity', where, current => ({\n occurrence: Number(current.occurrence) + 1,\n ...(current.occurred_at.getTime() <= comment.occurredAt.getTime() ? pointer : {}),\n updated_at: now,\n }));\n\n if (await bump()) return;\n try {\n await ops.insertOne<WorkItemActivityDbRow>('work_item_activity', {\n ...where,\n ...pointer,\n occurrence: 1,\n created_at: now,\n updated_at: now,\n });\n } catch (error) {\n if (!(error instanceof UniqueViolationError)) throw error;\n // Someone opened the row between the miss and the insert. A second miss\n // means a concurrent item delete purged it — nothing left to bump.\n await bump();\n }\n}\n\nexport async function fanOutWorkItemActivity(\n ops: FactoryStorageOps,\n {\n comment,\n recentAuthors,\n createdBy,\n mentions,\n now = new Date(),\n }: {\n comment: WorkItemCommentRow;\n recentAuthors: string[];\n createdBy: string;\n mentions: FactoryMentionRef[];\n now?: Date;\n },\n): Promise<void> {\n for (const participantId of activityParticipants({ recentAuthors, createdBy, comment, mentions })) {\n await bumpParticipant(ops, comment, participantId, now);\n }\n}\n\n/** One bounded keyset page of a participant's activity rows, newest-first. */\nexport async function listActivityForUser(\n ops: FactoryStorageOps,\n {\n orgId,\n factoryProjectId,\n userId,\n before,\n limit,\n }: {\n orgId: string;\n factoryProjectId: string;\n userId: string;\n before?: { occurredAt: Date; id: string };\n limit: number;\n },\n): Promise<WorkItemActivityRow[]> {\n const rows = await ops.findMany<WorkItemActivityDbRow>(\n 'work_item_activity',\n { org_id: orgId, factory_project_id: factoryProjectId, participant_id: userId },\n {\n orderBy: [\n ['occurred_at', 'desc'],\n ['id', 'desc'],\n ],\n limit,\n ...(before ? { cursor: { values: [before.occurredAt, before.id] } } : {}),\n },\n );\n return rows.map(toWorkItemActivity);\n}\n"],"mappings":";;;;AAaA,MAAM,2BAA2B;;AAGjC,MAAa,yBAAyB;AA8BtC,SAAS,mBAAmB,KAAiD;CAC3E,OAAO;EACL,IAAI,IAAI;EACR,OAAO,IAAI;EACX,kBAAkB,IAAI;EACtB,YAAY,IAAI;EAChB,eAAe,IAAI;EACnB,YAAY,OAAO,IAAI,UAAU;EACjC,iBAAiB,IAAI;EACrB,gBAAgB,IAAI;EACpB,kBAAkB,IAAI;EACtB,YAAY,IAAI;CAClB;AACF;;;;;;AAOA,SAAS,qBAAqB,EAC5B,eACA,WACA,SACA,YAMW;CACX,MAAM,2BAAW,IAAI,IAAI,CAAC,QAAQ,OAAO,IAAI,GAAG,SAAS,KAAI,YAAW,QAAQ,EAAE,CAAC,CAAC;CACpF,MAAM,aAAa,CAAC,GAAG,eAAe,SAAS,CA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AM,MAAM,CACf;EACA;EACA,GAAI,SAAS,EAAE,QAAQ,EAAE,QAAQ,CAAC,OAAO,YAAY,OAAO,EAAE,EAAE,EAAE,IAAI,CAAC;CACzE,CACF,EAAA,CACY,IAAI,kBAAkB;AACpC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* FactoryActorRef — the one author contract for everything a person, agent, or
|
|
3
|
+
* integration writes into a factory (comment rows today; thread-message
|
|
4
|
+
* attribution and agent-authored entries reuse it later).
|
|
5
|
+
*
|
|
6
|
+
* Conventions:
|
|
7
|
+
* - Agent actor ids are `agent:<bindingId>` (the transition-service convention):
|
|
8
|
+
* a binding id routes back to the live session via run bindings. Audit's
|
|
9
|
+
* `agent:<threadId>` form diverges; both satisfy `isAgentActor`.
|
|
10
|
+
* - `id` is a namespaced string: only bare WorkOS ids (no `:`) are resolvable
|
|
11
|
+
* or mentionable. External senders get `<platform>:<externalUserId>` plus a
|
|
12
|
+
* display snapshot captured at write time.
|
|
13
|
+
*/
|
|
14
|
+
import type { ChannelAccountLink } from '../channel-identity/base.js';
|
|
15
|
+
export type FactoryActorKind = 'user' | 'agent' | 'integration';
|
|
16
|
+
/**
|
|
17
|
+
* Superset of core's channel author metadata — deliberately NOT that exact
|
|
18
|
+
* shape: `teamId` lives on the raw platform event (never on the author), and
|
|
19
|
+
* `channel_account_links` keys on `(platform, teamId, userId)`, so ingest must
|
|
20
|
+
* capture it here or the identity is unlinkable.
|
|
21
|
+
*/
|
|
22
|
+
export interface FactoryActorExternalIdentity {
|
|
23
|
+
platform: string;
|
|
24
|
+
teamId?: string;
|
|
25
|
+
messageId?: string;
|
|
26
|
+
userId: string;
|
|
27
|
+
userName?: string;
|
|
28
|
+
fullName?: string;
|
|
29
|
+
mention?: string;
|
|
30
|
+
isBot?: boolean | 'unknown';
|
|
31
|
+
}
|
|
32
|
+
export interface FactoryActorRef {
|
|
33
|
+
kind: FactoryActorKind;
|
|
34
|
+
id: string;
|
|
35
|
+
displayName?: string;
|
|
36
|
+
avatarUrl?: string;
|
|
37
|
+
external?: FactoryActorExternalIdentity;
|
|
38
|
+
}
|
|
39
|
+
export declare function isMentionableActorId(id: string): boolean;
|
|
40
|
+
export declare function actorFromAuthUser(userId: string, user?: {
|
|
41
|
+
name?: string;
|
|
42
|
+
email?: string;
|
|
43
|
+
avatarUrl?: string;
|
|
44
|
+
}): FactoryActorRef;
|
|
45
|
+
export declare function actorFromAgentBinding(bindingId: string, displayName?: string): FactoryActorRef;
|
|
46
|
+
/**
|
|
47
|
+
* A linked platform sender becomes the linked tenant user; an unlinked one
|
|
48
|
+
* stays a namespaced external identity with its display snapshot.
|
|
49
|
+
*/
|
|
50
|
+
export declare function actorFromChannelAuthor(external: FactoryActorExternalIdentity, link?: Pick<ChannelAccountLink, 'userId'> | null): FactoryActorRef;
|
|
51
|
+
//# sourceMappingURL=actor.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/comments/actor.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAEtE,MAAM,MAAM,gBAAgB,GAAG,MAAM,GAAG,OAAO,GAAG,aAAa,CAAC;AAEhE;;;;;GAKG;AACH,MAAM,WAAW,4BAA4B;IAC3C,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,KAAK,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAC7B;AAED,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,gBAAgB,CAAC;IACvB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,4BAA4B,CAAC;CACzC;AAED,wBAAgB,oBAAoB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAExD;AAED,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,MAAM,EACd,IAAI,CAAC,EAAE;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,GAC3D,eAAe,CASjB;AAED,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,EAAE,WAAW,CAAC,EAAE,MAAM,GAAG,eAAe,CAM9F;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,QAAQ,EAAE,4BAA4B,EACtC,IAAI,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,QAAQ,CAAC,GAAG,IAAI,GAC/C,eAAe,CAQjB"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
//#region src/storage/domains/comments/actor.ts
|
|
2
|
+
function isMentionableActorId(id) {
|
|
3
|
+
return id.length > 0 && !id.includes(":");
|
|
4
|
+
}
|
|
5
|
+
function actorFromAuthUser(userId, user) {
|
|
6
|
+
const displayName = user?.name?.trim() || user?.email?.trim();
|
|
7
|
+
const avatarUrl = user?.avatarUrl?.trim();
|
|
8
|
+
return {
|
|
9
|
+
kind: "user",
|
|
10
|
+
id: userId,
|
|
11
|
+
...displayName ? { displayName } : {},
|
|
12
|
+
...avatarUrl ? { avatarUrl } : {}
|
|
13
|
+
};
|
|
14
|
+
}
|
|
15
|
+
function actorFromAgentBinding(bindingId, displayName) {
|
|
16
|
+
return {
|
|
17
|
+
kind: "agent",
|
|
18
|
+
id: `agent:${bindingId}`,
|
|
19
|
+
...displayName ? { displayName } : {}
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A linked platform sender becomes the linked tenant user; an unlinked one
|
|
24
|
+
* stays a namespaced external identity with its display snapshot.
|
|
25
|
+
*/
|
|
26
|
+
function actorFromChannelAuthor(external, link) {
|
|
27
|
+
const displayName = external.fullName?.trim() || external.userName?.trim();
|
|
28
|
+
return {
|
|
29
|
+
kind: "user",
|
|
30
|
+
id: link?.userId ?? `${external.platform}:${external.userId}`,
|
|
31
|
+
...displayName ? { displayName } : {},
|
|
32
|
+
external
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
//#endregion
|
|
36
|
+
export { actorFromAgentBinding, actorFromAuthUser, actorFromChannelAuthor, isMentionableActorId };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=actor.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"actor.js","names":[],"sources":["../../../../src/storage/domains/comments/actor.ts"],"sourcesContent":["/**\n * FactoryActorRef — the one author contract for everything a person, agent, or\n * integration writes into a factory (comment rows today; thread-message\n * attribution and agent-authored entries reuse it later).\n *\n * Conventions:\n * - Agent actor ids are `agent:<bindingId>` (the transition-service convention):\n * a binding id routes back to the live session via run bindings. Audit's\n * `agent:<threadId>` form diverges; both satisfy `isAgentActor`.\n * - `id` is a namespaced string: only bare WorkOS ids (no `:`) are resolvable\n * or mentionable. External senders get `<platform>:<externalUserId>` plus a\n * display snapshot captured at write time.\n */\n\nimport type { ChannelAccountLink } from '../channel-identity/base.js';\n\nexport type FactoryActorKind = 'user' | 'agent' | 'integration';\n\n/**\n * Superset of core's channel author metadata — deliberately NOT that exact\n * shape: `teamId` lives on the raw platform event (never on the author), and\n * `channel_account_links` keys on `(platform, teamId, userId)`, so ingest must\n * capture it here or the identity is unlinkable.\n */\nexport interface FactoryActorExternalIdentity {\n platform: string;\n teamId?: string;\n messageId?: string;\n userId: string;\n userName?: string;\n fullName?: string;\n mention?: string;\n isBot?: boolean | 'unknown';\n}\n\nexport interface FactoryActorRef {\n kind: FactoryActorKind;\n id: string;\n displayName?: string;\n avatarUrl?: string;\n external?: FactoryActorExternalIdentity;\n}\n\nexport function isMentionableActorId(id: string): boolean {\n return id.length > 0 && !id.includes(':');\n}\n\nexport function actorFromAuthUser(\n userId: string,\n user?: { name?: string; email?: string; avatarUrl?: string },\n): FactoryActorRef {\n const displayName = user?.name?.trim() || user?.email?.trim();\n const avatarUrl = user?.avatarUrl?.trim();\n return {\n kind: 'user',\n id: userId,\n ...(displayName ? { displayName } : {}),\n ...(avatarUrl ? { avatarUrl } : {}),\n };\n}\n\nexport function actorFromAgentBinding(bindingId: string, displayName?: string): FactoryActorRef {\n return {\n kind: 'agent',\n id: `agent:${bindingId}`,\n ...(displayName ? { displayName } : {}),\n };\n}\n\n/**\n * A linked platform sender becomes the linked tenant user; an unlinked one\n * stays a namespaced external identity with its display snapshot.\n */\nexport function actorFromChannelAuthor(\n external: FactoryActorExternalIdentity,\n link?: Pick<ChannelAccountLink, 'userId'> | null,\n): FactoryActorRef {\n const displayName = external.fullName?.trim() || external.userName?.trim();\n return {\n kind: 'user',\n id: link?.userId ?? `${external.platform}:${external.userId}`,\n ...(displayName ? { displayName } : {}),\n external,\n };\n}\n"],"mappings":";AA2CA,SAAgB,qBAAqB,IAAqB;CACxD,OAAO,GAAG,SAAS,KAAK,CAAC,GAAG,SAAS,GAAG;AAC1C;AAEA,SAAgB,kBACd,QACA,MACiB;CACjB,MAAM,cAAc,MAAM,MAAM,KAAK,KAAK,MAAM,OAAO,KAAK;CAC5D,MAAM,YAAY,MAAM,WAAW,KAAK;CACxC,OAAO;EACL,MAAM;EACN,IAAI;EACJ,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;EACrC,GAAI,YAAY,EAAE,UAAU,IAAI,CAAC;CACnC;AACF;AAEA,SAAgB,sBAAsB,WAAmB,aAAuC;CAC9F,OAAO;EACL,MAAM;EACN,IAAI,SAAS;EACb,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;CACvC;AACF;;;;;AAMA,SAAgB,uBACd,UACA,MACiB;CACjB,MAAM,cAAc,SAAS,UAAU,KAAK,KAAK,SAAS,UAAU,KAAK;CACzE,OAAO;EACL,MAAM;EACN,IAAI,MAAM,UAAU,GAAG,SAAS,SAAS,GAAG,SAAS;EACrD,GAAI,cAAc,EAAE,YAAY,IAAI,CAAC;EACrC;CACF;AACF"}
|
|
@@ -0,0 +1,245 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Work-item comments domain — one message list per work item, materialized
|
|
3
|
+
* from every source. Local creates and platform mirrors (Slack, Linear,
|
|
4
|
+
* GitHub) share one idempotency story: `external_source` json + derived
|
|
5
|
+
* `source_key` under a partial unique index, a local retry token being just
|
|
6
|
+
* another source (`local:comment:<uuid>`).
|
|
7
|
+
*
|
|
8
|
+
* Ordering is caller-settable `occurred_at`, never insert time — ingest
|
|
9
|
+
* backdates to the platform timestamp and retries arrive out of order.
|
|
10
|
+
* Deletes are soft: the tombstone holds the ordering and its kept
|
|
11
|
+
* `source_key` stops a redelivery from resurrecting the row.
|
|
12
|
+
*/
|
|
13
|
+
import { FactoryStorageDomain } from '@mastra/core/storage';
|
|
14
|
+
import type { FactoryStorageOps } from '@mastra/core/storage';
|
|
15
|
+
import type { ExternalWorkItemSource } from '../work-items/base.js';
|
|
16
|
+
import type { WorkItemActivityRow } from './activity.js';
|
|
17
|
+
import type { FactoryActorRef } from './actor.js';
|
|
18
|
+
export type { WorkItemActivityRow } from './activity.js';
|
|
19
|
+
export { WORK_ITEM_ACTIVITY_SCHEMA, WORK_ITEM_COMMENT_MENTIONS_SCHEMA, WORK_ITEM_COMMENTS_SCHEMA } from './schema.js';
|
|
20
|
+
export type WorkItemCommentKind = 'comment';
|
|
21
|
+
export interface FactoryMentionRef {
|
|
22
|
+
kind: 'user';
|
|
23
|
+
id: string;
|
|
24
|
+
}
|
|
25
|
+
export interface WorkItemCommentReplyRef {
|
|
26
|
+
commentId: string;
|
|
27
|
+
quote?: string;
|
|
28
|
+
authorId?: string;
|
|
29
|
+
authorName?: string;
|
|
30
|
+
}
|
|
31
|
+
export interface WorkItemCommentRow {
|
|
32
|
+
id: string;
|
|
33
|
+
orgId: string;
|
|
34
|
+
factoryProjectId: string;
|
|
35
|
+
workItemId: string;
|
|
36
|
+
kind: WorkItemCommentKind;
|
|
37
|
+
body: string;
|
|
38
|
+
bodyFormat: string;
|
|
39
|
+
author: FactoryActorRef;
|
|
40
|
+
replyTo: WorkItemCommentReplyRef | null;
|
|
41
|
+
mentions: FactoryMentionRef[];
|
|
42
|
+
externalSource: ExternalWorkItemSource | null;
|
|
43
|
+
sourceKey: string | null;
|
|
44
|
+
occurredAt: Date;
|
|
45
|
+
editedAt: Date | null;
|
|
46
|
+
deletedAt: Date | null;
|
|
47
|
+
deletedBy: string | null;
|
|
48
|
+
revision: number;
|
|
49
|
+
createdAt: Date;
|
|
50
|
+
updatedAt: Date;
|
|
51
|
+
}
|
|
52
|
+
export interface CreateWorkItemCommentInput {
|
|
53
|
+
orgId: string;
|
|
54
|
+
factoryProjectId: string;
|
|
55
|
+
workItemId: string;
|
|
56
|
+
author: FactoryActorRef;
|
|
57
|
+
body: string;
|
|
58
|
+
bodyFormat?: string;
|
|
59
|
+
replyTo?: WorkItemCommentReplyRef;
|
|
60
|
+
mentions?: FactoryMentionRef[];
|
|
61
|
+
externalSource?: ExternalWorkItemSource;
|
|
62
|
+
/** Local idempotent-retry token; mutually exclusive with `externalSource`. */
|
|
63
|
+
clientToken?: string;
|
|
64
|
+
occurredAt?: Date;
|
|
65
|
+
}
|
|
66
|
+
export interface EditWorkItemCommentInput {
|
|
67
|
+
orgId: string;
|
|
68
|
+
commentId: string;
|
|
69
|
+
body: string;
|
|
70
|
+
mentions?: FactoryMentionRef[];
|
|
71
|
+
/** The acting user; their own handle never becomes a mention row. */
|
|
72
|
+
editorId?: string;
|
|
73
|
+
/** When set, the edit only lands if the row is still at this revision. */
|
|
74
|
+
expectedRevision?: number;
|
|
75
|
+
now?: Date;
|
|
76
|
+
}
|
|
77
|
+
export interface EditWorkItemCommentResult {
|
|
78
|
+
comment: WorkItemCommentRow;
|
|
79
|
+
addedMentions: FactoryMentionRef[];
|
|
80
|
+
removedMentions: FactoryMentionRef[];
|
|
81
|
+
}
|
|
82
|
+
export interface ListWorkItemCommentsInput {
|
|
83
|
+
orgId: string;
|
|
84
|
+
factoryProjectId: string;
|
|
85
|
+
workItemId: string;
|
|
86
|
+
before?: string;
|
|
87
|
+
limit?: number;
|
|
88
|
+
/**
|
|
89
|
+
* Anchor the first page on this comment: it and every comment newer than it,
|
|
90
|
+
* so a deep link opens on the target instead of paging back to find it.
|
|
91
|
+
* Ignored when the comment is gone, or sits further back than one page holds.
|
|
92
|
+
*/
|
|
93
|
+
around?: string;
|
|
94
|
+
}
|
|
95
|
+
/** A feed snapshot: how many comments the item had, and when it last moved. */
|
|
96
|
+
export interface FeedActivitySnapshot {
|
|
97
|
+
commentCount: number;
|
|
98
|
+
feedActivityAt: Date;
|
|
99
|
+
}
|
|
100
|
+
/**
|
|
101
|
+
* The refresh reads its snapshot outside the write transaction, so two of them
|
|
102
|
+
* can interleave and the loser can write last. This is the one rule that keeps
|
|
103
|
+
* that from undoing a newer refresh: feed activity never moves backwards, and
|
|
104
|
+
* on the same stamp the fuller count wins.
|
|
105
|
+
*
|
|
106
|
+
* Known ceiling: a soft delete sharing a millisecond with a create leaves the
|
|
107
|
+
* count one high until the next feed mutation recounts. Closing that needs the
|
|
108
|
+
* aggregate read inside the write transaction, which the ops layer cannot do
|
|
109
|
+
* without checking out a second pool connection per open transaction.
|
|
110
|
+
*/
|
|
111
|
+
export declare function supersedesFeedActivity(next: FeedActivitySnapshot, stored: FeedActivitySnapshot): boolean;
|
|
112
|
+
export interface WorkItemCommentPage {
|
|
113
|
+
comments: WorkItemCommentRow[];
|
|
114
|
+
nextCursor?: string;
|
|
115
|
+
}
|
|
116
|
+
export interface WorkItemMentionRow {
|
|
117
|
+
id: string;
|
|
118
|
+
commentId: string;
|
|
119
|
+
mentionedKind: 'user';
|
|
120
|
+
mentionedId: string;
|
|
121
|
+
authorId: string;
|
|
122
|
+
orgId: string;
|
|
123
|
+
factoryProjectId: string;
|
|
124
|
+
workItemId: string;
|
|
125
|
+
occurredAt: Date;
|
|
126
|
+
}
|
|
127
|
+
export declare const MAX_COMMENT_BODY_LENGTH = 16000;
|
|
128
|
+
export declare const MAX_COMMENT_QUOTE_LENGTH = 500;
|
|
129
|
+
export declare const MAX_COMMENT_MENTIONS = 20;
|
|
130
|
+
/** The one body policy: HTTP parsing and the service both reject on it. */
|
|
131
|
+
export declare function commentBodyError(body: string): string | undefined;
|
|
132
|
+
export declare function clampCommentLimit(limit: number | undefined): number;
|
|
133
|
+
export declare function encodeCommentCursor(row: WorkItemCommentRow): string;
|
|
134
|
+
export declare function decodeCommentCursor(cursor: string): {
|
|
135
|
+
occurredAt: Date;
|
|
136
|
+
id: string;
|
|
137
|
+
} | undefined;
|
|
138
|
+
export declare function commentSourceKey(input: {
|
|
139
|
+
externalSource?: ExternalWorkItemSource;
|
|
140
|
+
clientToken?: string;
|
|
141
|
+
}): string | null;
|
|
142
|
+
/** A `clientToken` replay that resolved to a different work item or author. */
|
|
143
|
+
export declare class CommentTokenConflictError extends Error {
|
|
144
|
+
constructor();
|
|
145
|
+
}
|
|
146
|
+
export declare class WorkItemCommentsStorage extends FactoryStorageDomain {
|
|
147
|
+
#private;
|
|
148
|
+
constructor();
|
|
149
|
+
init(): Promise<void>;
|
|
150
|
+
/** Comment counts live on the card, so these writes change the board too. */
|
|
151
|
+
protected get ops(): FactoryStorageOps;
|
|
152
|
+
dangerouslyClearAll(): Promise<void>;
|
|
153
|
+
create(input: CreateWorkItemCommentInput): Promise<WorkItemCommentRow>;
|
|
154
|
+
listActivityForUser(args: {
|
|
155
|
+
orgId: string;
|
|
156
|
+
factoryProjectId: string;
|
|
157
|
+
userId: string;
|
|
158
|
+
before?: {
|
|
159
|
+
occurredAt: Date;
|
|
160
|
+
id: string;
|
|
161
|
+
};
|
|
162
|
+
limit: number;
|
|
163
|
+
}): Promise<WorkItemActivityRow[]>;
|
|
164
|
+
/**
|
|
165
|
+
* Idempotent counter refresh on the parent work item: both columns are read
|
|
166
|
+
* back off the comments (never incremented or stamped with the wall clock —
|
|
167
|
+
* replays and races double an increment, and a replayed create would move a
|
|
168
|
+
* work item in the feed without adding a comment; a read-back can't drift).
|
|
169
|
+
* Read BEFORE `updateAtomic`: its mutator runs inside an open transaction
|
|
170
|
+
* holding a pool connection, and a query in there checks out a second one —
|
|
171
|
+
* concurrent posts would exhaust the pool. Reading outside means two
|
|
172
|
+
* refreshes can interleave, so the write goes through
|
|
173
|
+
* {@link supersedesFeedActivity} rather than landing whatever it read.
|
|
174
|
+
* Touches ONLY the counter columns: `revision`/`updated_at` are the
|
|
175
|
+
* stage-transition concurrency token.
|
|
176
|
+
*/
|
|
177
|
+
refreshWorkItemFeedActivity({ orgId, factoryProjectId, workItemId, now, }: {
|
|
178
|
+
orgId: string;
|
|
179
|
+
factoryProjectId: string;
|
|
180
|
+
workItemId: string;
|
|
181
|
+
now?: Date;
|
|
182
|
+
}): Promise<void>;
|
|
183
|
+
get({ orgId, commentId }: {
|
|
184
|
+
orgId: string;
|
|
185
|
+
commentId: string;
|
|
186
|
+
}): Promise<WorkItemCommentRow | null>;
|
|
187
|
+
listByIds({ orgId, ids }: {
|
|
188
|
+
orgId: string;
|
|
189
|
+
ids: string[];
|
|
190
|
+
}): Promise<WorkItemCommentRow[]>;
|
|
191
|
+
list(input: ListWorkItemCommentsInput): Promise<WorkItemCommentPage>;
|
|
192
|
+
/**
|
|
193
|
+
* Newest non-deleted comments for run-context injection, newest-first (the
|
|
194
|
+
* caller reverses for display order).
|
|
195
|
+
*/
|
|
196
|
+
listRecent({ orgId, factoryProjectId, workItemId, limit, }: {
|
|
197
|
+
orgId: string;
|
|
198
|
+
factoryProjectId: string;
|
|
199
|
+
workItemId: string;
|
|
200
|
+
limit: number;
|
|
201
|
+
}): Promise<WorkItemCommentRow[]>;
|
|
202
|
+
edit(input: EditWorkItemCommentInput): Promise<EditWorkItemCommentResult | 'conflict' | null>;
|
|
203
|
+
softDelete({ orgId, commentId, deletedBy, now, }: {
|
|
204
|
+
orgId: string;
|
|
205
|
+
commentId: string;
|
|
206
|
+
deletedBy: string;
|
|
207
|
+
now?: Date;
|
|
208
|
+
}): Promise<WorkItemCommentRow | null>;
|
|
209
|
+
/**
|
|
210
|
+
* Provenance write-back after an outbound publish. First platform wins, and
|
|
211
|
+
* an existing `source_key` is kept: replacing a `local:comment:<token>` one
|
|
212
|
+
* would let a client retry duplicate the row. So a web-born comment is never
|
|
213
|
+
* key-deduped against its own platform echo — the host's bot-sender check is
|
|
214
|
+
* the only echo layer for those rows (COR-1174).
|
|
215
|
+
*/
|
|
216
|
+
attachExternalSource({ orgId, commentId, source, }: {
|
|
217
|
+
orgId: string;
|
|
218
|
+
commentId: string;
|
|
219
|
+
source: ExternalWorkItemSource;
|
|
220
|
+
}): Promise<WorkItemCommentRow | null>;
|
|
221
|
+
listMentionsForComment(commentId: string): Promise<WorkItemMentionRow[]>;
|
|
222
|
+
/** Keyset inbox read for the mention attention provider, newest-first. */
|
|
223
|
+
listMentionsForUser({ orgId, factoryProjectId, userId, before, limit, }: {
|
|
224
|
+
orgId: string;
|
|
225
|
+
factoryProjectId: string;
|
|
226
|
+
userId: string;
|
|
227
|
+
before?: {
|
|
228
|
+
occurredAt: Date;
|
|
229
|
+
id: string;
|
|
230
|
+
};
|
|
231
|
+
limit: number;
|
|
232
|
+
}): Promise<WorkItemMentionRow[]>;
|
|
233
|
+
countForWorkItem({ orgId, factoryProjectId, workItemId, }: {
|
|
234
|
+
orgId: string;
|
|
235
|
+
factoryProjectId: string;
|
|
236
|
+
workItemId: string;
|
|
237
|
+
}): Promise<number>;
|
|
238
|
+
/** Recent distinct comment authors of a project, for the roster fallback. */
|
|
239
|
+
listRecentAuthors({ orgId, factoryProjectId, limit, }: {
|
|
240
|
+
orgId: string;
|
|
241
|
+
factoryProjectId: string;
|
|
242
|
+
limit?: number;
|
|
243
|
+
}): Promise<FactoryActorRef[]>;
|
|
244
|
+
}
|
|
245
|
+
//# sourceMappingURL=base.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../src/storage/domains/comments/base.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,oBAAoB,EAAwB,MAAM,sBAAsB,CAAC;AAClF,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAG9D,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAGpE,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,KAAK,EAAgC,eAAe,EAAE,MAAM,YAAY,CAAC;AAGhF,YAAY,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACzD,OAAO,EAAE,yBAAyB,EAAE,iCAAiC,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAEtH,MAAM,MAAM,mBAAmB,GAAG,SAAS,CAAC;AAE5C,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,WAAW,uBAAuB;IACtC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,gBAAgB,EAAE,MAAM,CAAC;IACzB,UAAU,EAAE,MAAM,CAAC;IACnB,IAAI,EAAE,mBAAmB,CAAC;IAC1B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,MAAM,EAA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