@vercel/factory 0.0.13 → 0.0.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +307 -1
- package/dist/agent-routes.d.mts +69 -0
- package/dist/agent-routes.mjs +64 -0
- package/dist/agent-routes.mjs.map +1 -0
- package/dist/api-contracts.d.mts +1749 -0
- package/dist/api-contracts.mjs +118 -0
- package/dist/api-contracts.mjs.map +1 -0
- package/dist/api-images.d.mts +30 -0
- package/dist/api-images.mjs +28 -0
- package/dist/api-images.mjs.map +1 -0
- package/dist/api-task-graph.mjs +57 -0
- package/dist/api-task-graph.mjs.map +1 -0
- package/dist/api.d.mts +77 -0
- package/dist/api.mjs +1087 -0
- package/dist/api.mjs.map +1 -0
- package/dist/approval-access.d.mts +39 -0
- package/dist/approval-access.mjs +62 -0
- package/dist/approval-access.mjs.map +1 -0
- package/dist/approval-contracts.d.mts +692 -0
- package/dist/approval-contracts.mjs +27 -0
- package/dist/approval-contracts.mjs.map +1 -0
- package/dist/approval.d.mts +49 -0
- package/dist/approval.mjs +39 -0
- package/dist/approval.mjs.map +1 -0
- package/dist/blob/artifacts.d.mts +37 -0
- package/dist/blob/artifacts.mjs +45 -0
- package/dist/blob/artifacts.mjs.map +1 -0
- package/dist/blob/index.d.mts +44 -8
- package/dist/blob/index.mjs +159 -35
- package/dist/blob/index.mjs.map +1 -1
- package/dist/budget.d.mts +108 -0
- package/dist/budget.mjs +141 -0
- package/dist/budget.mjs.map +1 -0
- package/dist/budgets.d.mts +4 -0
- package/dist/budgets.mjs +4 -0
- package/dist/build-factory.d.mts +6 -4
- package/dist/build-factory.mjs +2 -1
- package/dist/build-factory.mjs.map +1 -1
- package/dist/change-verification/brief.d.mts +9 -0
- package/dist/change-verification/brief.mjs +13 -0
- package/dist/change-verification/brief.mjs.map +1 -0
- package/dist/change-verification/dispatch.d.mts +24 -0
- package/dist/change-verification/dispatch.mjs +45 -0
- package/dist/change-verification/dispatch.mjs.map +1 -0
- package/dist/change-verification/eve-tool.d.mts +60 -0
- package/dist/change-verification/eve-tool.mjs +101 -0
- package/dist/change-verification/eve-tool.mjs.map +1 -0
- package/dist/changes/eve-record-change.d.mts +56 -0
- package/dist/changes/eve-record-change.mjs +97 -0
- package/dist/changes/eve-record-change.mjs.map +1 -0
- package/dist/changes/presentation.d.mts +14 -0
- package/dist/changes.d.mts +23 -0
- package/dist/changes.mjs +29 -0
- package/dist/changes.mjs.map +1 -0
- package/dist/client-events.d.mts +18 -0
- package/dist/client-events.mjs +41 -0
- package/dist/client-events.mjs.map +1 -0
- package/dist/client-stream.d.mts +28 -0
- package/dist/client-stream.mjs +204 -0
- package/dist/client-stream.mjs.map +1 -0
- package/dist/client-transcript.d.mts +41 -0
- package/dist/client-transcript.mjs +229 -0
- package/dist/client-transcript.mjs.map +1 -0
- package/dist/client.d.mts +234 -0
- package/dist/client.mjs +258 -0
- package/dist/client.mjs.map +1 -0
- package/dist/code-review/contracts.d.mts +26 -0
- package/dist/code-review/eve-post-review.d.mts +70 -0
- package/dist/code-review/eve-post-review.mjs +183 -0
- package/dist/code-review/eve-post-review.mjs.map +1 -0
- package/dist/code-review/eve-review-comments.d.mts +64 -0
- package/dist/code-review/eve-review-comments.mjs +159 -0
- package/dist/code-review/eve-review-comments.mjs.map +1 -0
- package/dist/code-review/github-contracts.d.mts +10 -0
- package/dist/code-review/github-reporter.d.mts +44 -0
- package/dist/code-review/github-reporter.mjs +260 -0
- package/dist/code-review/github-reporter.mjs.map +1 -0
- package/dist/code-review/preparation.d.mts +34 -0
- package/dist/code-review/preparation.mjs +23 -0
- package/dist/code-review/preparation.mjs.map +1 -0
- package/dist/code-review/stall.d.mts +17 -0
- package/dist/code-review/stall.mjs +30 -0
- package/dist/code-review/stall.mjs.map +1 -0
- package/dist/code-review.d.mts +6 -0
- package/dist/code-review.mjs +5 -0
- package/dist/communication.d.mts +9 -0
- package/dist/communication.mjs +9 -0
- package/dist/connectors/github.d.mts +26 -0
- package/dist/connectors/github.mjs +55 -0
- package/dist/connectors/github.mjs.map +1 -0
- package/dist/connectors/index.d.mts +35 -2
- package/dist/connectors/index.mjs +4 -26
- package/dist/connectors/index.mjs.map +1 -1
- package/dist/connectors/outbox.d.mts +34 -0
- package/dist/connectors/outbox.mjs +50 -0
- package/dist/connectors/outbox.mjs.map +1 -0
- package/dist/connectors/slack-approval-blocks.mjs +136 -0
- package/dist/connectors/slack-approval-blocks.mjs.map +1 -0
- package/dist/connectors/slack-approvals.d.mts +29 -0
- package/dist/connectors/slack-approvals.mjs +346 -0
- package/dist/connectors/slack-approvals.mjs.map +1 -0
- package/dist/connectors/slack.d.mts +35 -41
- package/dist/connectors/slack.mjs +13 -69
- package/dist/connectors/slack.mjs.map +1 -1
- package/dist/deepsec/eve-tool.d.mts +110 -0
- package/dist/deepsec/eve-tool.mjs +164 -0
- package/dist/deepsec/eve-tool.mjs.map +1 -0
- package/dist/deepsec/finding.d.mts +84 -0
- package/dist/deepsec/finding.mjs +56 -0
- package/dist/deepsec/finding.mjs.map +1 -0
- package/dist/deepsec.d.mts +3 -0
- package/dist/delivery-metrics/metrics.d.mts +93 -0
- package/dist/delivery-metrics/metrics.mjs +200 -0
- package/dist/delivery-metrics/metrics.mjs.map +1 -0
- package/dist/delivery-metrics.d.mts +2 -0
- package/dist/delivery-metrics.mjs +2 -0
- package/dist/dispatch.d.mts +81 -0
- package/dist/dispatch.mjs +140 -0
- package/dist/dispatch.mjs.map +1 -0
- package/dist/errors.d.mts +15 -0
- package/dist/errors.mjs +38 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/eve/index.d.mts +143 -1561
- package/dist/eve/index.mjs +244 -1063
- package/dist/eve/index.mjs.map +1 -1
- package/dist/eve/invoke.d.mts +144 -0
- package/dist/eve/invoke.mjs +241 -0
- package/dist/eve/invoke.mjs.map +1 -0
- package/dist/eve/session-client.d.mts +68 -0
- package/dist/eve/session-client.mjs +131 -0
- package/dist/eve/session-client.mjs.map +1 -0
- package/dist/eve/task-execution.mjs +18 -0
- package/dist/eve/task-execution.mjs.map +1 -0
- package/dist/eve/task-session.d.mts +87 -0
- package/dist/eve/task-session.mjs +203 -0
- package/dist/eve/task-session.mjs.map +1 -0
- package/dist/eve/transcript.d.mts +37 -0
- package/dist/eve/transcript.mjs +65 -0
- package/dist/eve/transcript.mjs.map +1 -0
- package/dist/execution-public.d.mts +8 -0
- package/dist/execution-public.mjs +7 -0
- package/dist/execution.d.mts +75 -0
- package/dist/execution.mjs +153 -0
- package/dist/execution.mjs.map +1 -0
- package/dist/finding-remediation/admission.d.mts +51 -0
- package/dist/finding-remediation/admission.mjs +87 -0
- package/dist/finding-remediation/admission.mjs.map +1 -0
- package/dist/finding-remediation/brief.d.mts +14 -0
- package/dist/finding-remediation/brief.mjs +25 -0
- package/dist/finding-remediation/brief.mjs.map +1 -0
- package/dist/finding-remediation/eve-tool.d.mts +29 -0
- package/dist/finding-remediation/eve-tool.mjs +34 -0
- package/dist/finding-remediation/eve-tool.mjs.map +1 -0
- package/dist/findings/fingerprint.d.mts +14 -0
- package/dist/findings/fingerprint.mjs +28 -0
- package/dist/findings/fingerprint.mjs.map +1 -0
- package/dist/findings.d.mts +6 -0
- package/dist/findings.mjs +6 -0
- package/dist/github-app.d.mts +54 -0
- package/dist/github-app.mjs +121 -0
- package/dist/github-app.mjs.map +1 -0
- package/dist/github-publication.d.mts +198 -0
- package/dist/github-publication.mjs +429 -0
- package/dist/github-publication.mjs.map +1 -0
- package/dist/github-transfer.d.mts +72 -0
- package/dist/github-transfer.mjs +125 -0
- package/dist/github-transfer.mjs.map +1 -0
- package/dist/github.d.mts +406 -2
- package/dist/github.mjs +250 -37
- package/dist/github.mjs.map +1 -1
- package/dist/image-input.d.mts +51 -0
- package/dist/image-input.mjs +63 -0
- package/dist/image-input.mjs.map +1 -0
- package/dist/index.d.mts +14 -314
- package/dist/index.mjs +14 -1124
- package/dist/intake-contracts.d.mts +56 -0
- package/dist/intake-contracts.mjs +33 -0
- package/dist/intake-contracts.mjs.map +1 -0
- package/dist/integrations/deepsec.d.mts +4 -0
- package/dist/integrations/deepsec.mjs +3 -0
- package/dist/integrations/github.d.mts +11 -0
- package/dist/integrations/github.mjs +9 -0
- package/dist/integrations/slack.d.mts +3 -0
- package/dist/integrations/slack.mjs +3 -0
- package/dist/integrations/vercel.d.mts +3 -0
- package/dist/integrations/vercel.mjs +3 -0
- package/dist/merge-resolution/contracts.d.mts +17 -0
- package/dist/merge-resolution/contracts.mjs +19 -0
- package/dist/merge-resolution/contracts.mjs.map +1 -0
- package/dist/merge-resolution/eve-tools.d.mts +46 -0
- package/dist/merge-resolution/eve-tools.mjs +117 -0
- package/dist/merge-resolution/eve-tools.mjs.map +1 -0
- package/dist/multi-repository-changes/coordination.d.mts +49 -0
- package/dist/multi-repository-changes/coordination.mjs +115 -0
- package/dist/multi-repository-changes/coordination.mjs.map +1 -0
- package/dist/planning/cancellation.mjs +82 -0
- package/dist/planning/cancellation.mjs.map +1 -0
- package/dist/planning/configuration.d.mts +23 -0
- package/dist/planning/configuration.mjs +56 -0
- package/dist/planning/configuration.mjs.map +1 -0
- package/dist/planning/contracts.d.mts +136 -0
- package/dist/planning/contracts.mjs +42 -0
- package/dist/planning/contracts.mjs.map +1 -0
- package/dist/planning/dependencies.mjs +44 -0
- package/dist/planning/dependencies.mjs.map +1 -0
- package/dist/planning/effects.mjs +122 -0
- package/dist/planning/effects.mjs.map +1 -0
- package/dist/planning/reconcile.mjs +273 -0
- package/dist/planning/reconcile.mjs.map +1 -0
- package/dist/planning/runtime.d.mts +27 -0
- package/dist/planning/runtime.mjs +25 -0
- package/dist/planning/runtime.mjs.map +1 -0
- package/dist/planning/state.mjs +92 -0
- package/dist/planning/state.mjs.map +1 -0
- package/dist/planning/turns.mjs +262 -0
- package/dist/planning/turns.mjs.map +1 -0
- package/dist/planning/validation.mjs +106 -0
- package/dist/planning/validation.mjs.map +1 -0
- package/dist/postgres/index.d.mts +7 -1
- package/dist/postgres/index.mjs +7 -3
- package/dist/postgres/index.mjs.map +1 -1
- package/dist/presets/software-development/approval.d.mts +14 -0
- package/dist/presets/software-development/approval.mjs +21 -0
- package/dist/presets/software-development/approval.mjs.map +1 -0
- package/dist/presets/software-development/deepsec-brief.d.mts +8 -0
- package/dist/presets/software-development/deepsec-brief.mjs +14 -0
- package/dist/presets/software-development/deepsec-brief.mjs.map +1 -0
- package/dist/presets/software-development/dispatch.d.mts +53 -0
- package/dist/presets/software-development/dispatch.mjs +66 -0
- package/dist/presets/software-development/dispatch.mjs.map +1 -0
- package/dist/presets/software-development/eve-delegation-policy.d.mts +7 -0
- package/dist/presets/software-development/eve-delegation-policy.mjs +34 -0
- package/dist/presets/software-development/eve-delegation-policy.mjs.map +1 -0
- package/dist/presets/software-development/eve.d.mts +18 -0
- package/dist/presets/software-development/eve.mjs +19 -0
- package/dist/presets/software-development/eve.mjs.map +1 -0
- package/dist/presets/software-development/finish-task-policy.d.mts +7 -0
- package/dist/presets/software-development/finish-task-policy.mjs +9 -0
- package/dist/presets/software-development/finish-task-policy.mjs.map +1 -0
- package/dist/presets/software-development/recovery.d.mts +32 -0
- package/dist/presets/software-development/recovery.mjs +120 -0
- package/dist/presets/software-development/recovery.mjs.map +1 -0
- package/dist/presets/software-development/task-communication.d.mts +23 -0
- package/dist/presets/software-development/task-communication.mjs +120 -0
- package/dist/presets/software-development/task-communication.mjs.map +1 -0
- package/dist/presets/software-development.d.mts +9 -0
- package/dist/presets/software-development.mjs +9 -0
- package/dist/pull-requests/contracts.d.mts +72 -0
- package/dist/pull-requests/eve-fetch.d.mts +57 -0
- package/dist/pull-requests/eve-fetch.mjs +151 -0
- package/dist/pull-requests/eve-fetch.mjs.map +1 -0
- package/dist/pull-requests/github-label-manager.d.mts +27 -0
- package/dist/pull-requests/github-label-manager.mjs +40 -0
- package/dist/pull-requests/github-label-manager.mjs.map +1 -0
- package/dist/pull-requests/github-publisher.d.mts +53 -0
- package/dist/pull-requests/github-publisher.mjs +345 -0
- package/dist/pull-requests/github-publisher.mjs.map +1 -0
- package/dist/pull-requests.d.mts +5 -0
- package/dist/pull-requests.mjs +4 -0
- package/dist/receipts.d.mts +4 -0
- package/dist/receipts.mjs +3 -0
- package/dist/repositories.d.mts +18 -0
- package/dist/repositories.mjs +33 -0
- package/dist/repositories.mjs.map +1 -0
- package/dist/sandbox/command.d.mts +18 -0
- package/dist/sandbox/execution-abort.d.mts +16 -0
- package/dist/sandbox/execution-abort.mjs +49 -0
- package/dist/sandbox/execution-abort.mjs.map +1 -0
- package/dist/sandbox/execution-environment.d.mts +25 -0
- package/dist/sandbox/execution-run-ledger.d.mts +115 -0
- package/dist/sandbox/execution-run-ledger.mjs +209 -0
- package/dist/sandbox/execution-run-ledger.mjs.map +1 -0
- package/dist/sandbox/execution.d.mts +54 -0
- package/dist/sandbox/execution.mjs +228 -0
- package/dist/sandbox/execution.mjs.map +1 -0
- package/dist/sandbox/harness-runner.d.mts +79 -0
- package/dist/sandbox/harness-runner.mjs +162 -0
- package/dist/sandbox/harness-runner.mjs.map +1 -0
- package/dist/sandbox/index.d.mts +9 -0
- package/dist/sandbox/index.mjs +7 -0
- package/dist/sandbox/task-environment.d.mts +50 -0
- package/dist/sandbox/task-environment.mjs +140 -0
- package/dist/sandbox/task-environment.mjs.map +1 -0
- package/dist/sandbox/workspace.d.mts +29 -0
- package/dist/sandbox/workspace.mjs +28 -0
- package/dist/sandbox/workspace.mjs.map +1 -0
- package/dist/schema/agent-route.d.mts +22 -0
- package/dist/schema/agent-route.mjs +15 -0
- package/dist/schema/agent-route.mjs.map +1 -0
- package/dist/schema/answer.d.mts +23 -0
- package/dist/schema/answer.mjs +21 -0
- package/dist/schema/answer.mjs.map +1 -0
- package/dist/schema/budget.d.mts +38 -0
- package/dist/schema/budget.mjs +30 -0
- package/dist/schema/budget.mjs.map +1 -0
- package/dist/schema/catalog.mjs +72 -0
- package/dist/schema/catalog.mjs.map +1 -0
- package/dist/schema/change.d.mts +117 -0
- package/dist/schema/change.mjs +68 -0
- package/dist/schema/change.mjs.map +1 -0
- package/dist/schema/common.d.mts +33 -0
- package/dist/{id-DwCihQr4.mjs → schema/common.mjs} +7 -14
- package/dist/schema/common.mjs.map +1 -0
- package/dist/schema/communication.d.mts +52 -0
- package/dist/schema/communication.mjs +35 -0
- package/dist/schema/communication.mjs.map +1 -0
- package/dist/schema/execution.d.mts +101 -0
- package/dist/schema/execution.mjs +86 -0
- package/dist/schema/execution.mjs.map +1 -0
- package/dist/schema/factory-config.d.mts +95 -0
- package/dist/schema/factory-config.mjs +60 -0
- package/dist/schema/factory-config.mjs.map +1 -0
- package/dist/schema/finding.d.mts +125 -0
- package/dist/schema/finding.mjs +67 -0
- package/dist/schema/finding.mjs.map +1 -0
- package/dist/schema/id.d.mts +43 -0
- package/dist/schema/id.mjs +32 -0
- package/dist/schema/id.mjs.map +1 -0
- package/dist/schema/outbox.d.mts +240 -0
- package/dist/schema/outbox.mjs +53 -0
- package/dist/schema/outbox.mjs.map +1 -0
- package/dist/schema/question-route.mjs +16 -0
- package/dist/schema/question-route.mjs.map +1 -0
- package/dist/schema/receipt.d.mts +81 -0
- package/dist/schema/receipt.mjs +94 -0
- package/dist/schema/receipt.mjs.map +1 -0
- package/dist/schema/repository.d.mts +26 -0
- package/dist/schema/repository.mjs +25 -0
- package/dist/schema/repository.mjs.map +1 -0
- package/dist/schema/session.d.mts +135 -0
- package/dist/schema/session.mjs +53 -0
- package/dist/schema/session.mjs.map +1 -0
- package/dist/schema/signal.d.mts +105 -0
- package/dist/schema/signal.mjs +81 -0
- package/dist/schema/signal.mjs.map +1 -0
- package/dist/schema/stored-session.mjs +10 -0
- package/dist/schema/stored-session.mjs.map +1 -0
- package/dist/schema/stored-task.mjs +20 -0
- package/dist/schema/stored-task.mjs.map +1 -0
- package/dist/schema/task-effect.d.mts +39 -0
- package/dist/schema/task-effect.mjs +29 -0
- package/dist/schema/task-effect.mjs.map +1 -0
- package/dist/schema/task-graph.d.mts +3134 -0
- package/dist/schema/task-graph.mjs +97 -0
- package/dist/schema/task-graph.mjs.map +1 -0
- package/dist/schema/task-message.d.mts +254 -0
- package/dist/schema/task-message.mjs +189 -0
- package/dist/schema/task-message.mjs.map +1 -0
- package/dist/schema/task.d.mts +272 -0
- package/dist/schema/task.mjs +199 -0
- package/dist/schema/task.mjs.map +1 -0
- package/dist/schema/transcript.d.mts +170 -0
- package/dist/schema/transcript.mjs +86 -0
- package/dist/schema/transcript.mjs.map +1 -0
- package/dist/schema/transitions.d.mts +50 -0
- package/dist/schema/transitions.mjs +303 -0
- package/dist/schema/transitions.mjs.map +1 -0
- package/dist/schema/work.d.mts +101 -0
- package/dist/schema/work.mjs +102 -0
- package/dist/schema/work.mjs.map +1 -0
- package/dist/signal-triage.d.mts +20 -0
- package/dist/signal-triage.mjs +85 -0
- package/dist/signal-triage.mjs.map +1 -0
- package/dist/signals.d.mts +19 -0
- package/dist/signals.mjs +19 -0
- package/dist/signals.mjs.map +1 -0
- package/dist/stall.d.mts +38 -0
- package/dist/stall.mjs +79 -0
- package/dist/stall.mjs.map +1 -0
- package/dist/storage.d.mts +4 -0
- package/dist/storage.mjs +4 -0
- package/dist/store/driver.d.mts +65 -0
- package/dist/store/driver.mjs +42 -0
- package/dist/store/driver.mjs.map +1 -0
- package/dist/store/engine.d.mts +485 -0
- package/dist/store/engine.mjs +2175 -0
- package/dist/store/engine.mjs.map +1 -0
- package/dist/store/memory.d.mts +7 -0
- package/dist/store/memory.mjs +52 -0
- package/dist/store/memory.mjs.map +1 -0
- package/dist/store/task-effects.d.mts +38 -0
- package/dist/store/task-effects.mjs +118 -0
- package/dist/store/task-effects.mjs.map +1 -0
- package/dist/store/task-graphs.d.mts +60 -0
- package/dist/store/task-graphs.mjs +212 -0
- package/dist/store/task-graphs.mjs.map +1 -0
- package/dist/store/task-messages.d.mts +136 -0
- package/dist/store/task-messages.mjs +475 -0
- package/dist/store/task-messages.mjs.map +1 -0
- package/dist/store/task-work.d.mts +65 -0
- package/dist/store/task-work.mjs +134 -0
- package/dist/store/task-work.mjs.map +1 -0
- package/dist/store/work-notifications.d.mts +19 -0
- package/dist/store/work-notifications.mjs +48 -0
- package/dist/store/work-notifications.mjs.map +1 -0
- package/dist/sweep.d.mts +57 -0
- package/dist/sweep.mjs +143 -0
- package/dist/sweep.mjs.map +1 -0
- package/dist/task-communication.d.mts +35 -0
- package/dist/task-communication.mjs +47 -0
- package/dist/task-communication.mjs.map +1 -0
- package/dist/task-graph-view.d.mts +264 -0
- package/dist/task-graph-view.mjs +17 -0
- package/dist/task-graph-view.mjs.map +1 -0
- package/dist/task-message-processing.d.mts +60 -0
- package/dist/task-message-processing.mjs +200 -0
- package/dist/task-message-processing.mjs.map +1 -0
- package/dist/task-protocols.d.mts +80 -0
- package/dist/task-protocols.mjs +47 -0
- package/dist/task-protocols.mjs.map +1 -0
- package/dist/tasks.d.mts +17 -0
- package/dist/tasks.mjs +17 -0
- package/dist/vercel-git.d.mts +21 -0
- package/dist/vercel-git.mjs +112 -0
- package/dist/vercel-git.mjs.map +1 -0
- package/dist/vercel.d.mts +33 -2
- package/dist/vercel.mjs +48 -3
- package/dist/vercel.mjs.map +1 -1
- package/dist/work-triage/eve-tool.d.mts +29 -0
- package/dist/work-triage/eve-tool.mjs +32 -0
- package/dist/work-triage/eve-tool.mjs.map +1 -0
- package/dist/work-triage/find-existing-work.d.mts +32 -0
- package/dist/work-triage/find-existing-work.mjs +31 -0
- package/dist/work-triage/find-existing-work.mjs.map +1 -0
- package/dist/work-triage/github.d.mts +15 -0
- package/dist/work-triage/github.mjs +14 -0
- package/dist/work-triage/github.mjs.map +1 -0
- package/dist/work-triage.d.mts +3 -0
- package/dist/work-triage.mjs +3 -0
- package/dist/workflows.d.mts +48 -0
- package/dist/workflows.mjs +86 -0
- package/dist/workflows.mjs.map +1 -0
- package/dist/workspace-diff-assembly.d.mts +33 -0
- package/dist/workspace-diff-assembly.mjs +95 -0
- package/dist/workspace-diff-assembly.mjs.map +1 -0
- package/dist/workspace-diff.d.mts +90 -0
- package/dist/workspace-diff.mjs +61 -0
- package/dist/workspace-diff.mjs.map +1 -0
- package/dist/workspace-snapshot.d.mts +26 -0
- package/dist/workspace-snapshot.mjs +80 -0
- package/dist/workspace-snapshot.mjs.map +1 -0
- package/package.json +129 -40
- package/dist/approval-CwhTP1XB.mjs +0 -269
- package/dist/approval-CwhTP1XB.mjs.map +0 -1
- package/dist/change-CzEAoFVE.mjs +0 -620
- package/dist/change-CzEAoFVE.mjs.map +0 -1
- package/dist/dispatch-B77cuPxh.d.mts +0 -713
- package/dist/driver-BJutB0PE.d.mts +0 -34
- package/dist/driver-Bbd25rNM.mjs +0 -23
- package/dist/driver-Bbd25rNM.mjs.map +0 -1
- package/dist/factory-config-BJcjsPKl.mjs +0 -86
- package/dist/factory-config-BJcjsPKl.mjs.map +0 -1
- package/dist/factory-config-D2yU3G0c.d.mts +0 -58
- package/dist/github-DXsxboUL.d.mts +0 -271
- package/dist/id-DwCihQr4.mjs.map +0 -1
- package/dist/index-Cy4jfXh5.d.mts +0 -67
- package/dist/index.mjs.map +0 -1
- package/dist/signal-CHVEmzvI.d.mts +0 -59
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
//#region src/store/driver.d.ts
|
|
2
|
-
type CollectionName = "repositories" | "signals" | "tasks" | "changes" | "receipts" | "budgets";
|
|
3
|
-
interface StoredRecord {
|
|
4
|
-
readonly value: unknown;
|
|
5
|
-
readonly version: number;
|
|
6
|
-
}
|
|
7
|
-
interface StoredEntry {
|
|
8
|
-
readonly id: string;
|
|
9
|
-
readonly record: StoredRecord;
|
|
10
|
-
}
|
|
11
|
-
declare class RecordExistsError extends Error {
|
|
12
|
-
constructor(collection: CollectionName, id: string);
|
|
13
|
-
}
|
|
14
|
-
declare class RecordNotFoundError extends Error {
|
|
15
|
-
constructor(collection: CollectionName, id: string);
|
|
16
|
-
}
|
|
17
|
-
declare class VersionConflictError extends Error {
|
|
18
|
-
constructor(collection: CollectionName, id: string, expectedVersion: number);
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Raw persistence contract. Drivers store opaque values and enforce nothing
|
|
22
|
-
* about their content; every invariant lives in the engine above. `update`
|
|
23
|
-
* must be an atomic compare-and-swap on `expectedVersion`.
|
|
24
|
-
*/
|
|
25
|
-
interface StoreDriver {
|
|
26
|
-
readonly name: string;
|
|
27
|
-
get(collection: CollectionName, id: string): Promise<StoredRecord | null>;
|
|
28
|
-
insert(collection: CollectionName, id: string, value: unknown): Promise<void>;
|
|
29
|
-
update(collection: CollectionName, id: string, value: unknown, expectedVersion: number): Promise<void>;
|
|
30
|
-
list(collection: CollectionName): Promise<readonly StoredEntry[]>;
|
|
31
|
-
}
|
|
32
|
-
//#endregion
|
|
33
|
-
export { StoredEntry as a, StoreDriver as i, RecordExistsError as n, StoredRecord as o, RecordNotFoundError as r, VersionConflictError as s, CollectionName as t };
|
|
34
|
-
//# sourceMappingURL=driver-BJutB0PE.d.mts.map
|
package/dist/driver-Bbd25rNM.mjs
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
//#region src/store/driver.ts
|
|
2
|
-
var RecordExistsError = class extends Error {
|
|
3
|
-
constructor(collection, id) {
|
|
4
|
-
super(`record "${id}" already exists in "${collection}"`);
|
|
5
|
-
this.name = "RecordExistsError";
|
|
6
|
-
}
|
|
7
|
-
};
|
|
8
|
-
var RecordNotFoundError = class extends Error {
|
|
9
|
-
constructor(collection, id) {
|
|
10
|
-
super(`record "${id}" not found in "${collection}"`);
|
|
11
|
-
this.name = "RecordNotFoundError";
|
|
12
|
-
}
|
|
13
|
-
};
|
|
14
|
-
var VersionConflictError = class extends Error {
|
|
15
|
-
constructor(collection, id, expectedVersion) {
|
|
16
|
-
super(`record "${id}" in "${collection}" changed since version ${expectedVersion} was read`);
|
|
17
|
-
this.name = "VersionConflictError";
|
|
18
|
-
}
|
|
19
|
-
};
|
|
20
|
-
//#endregion
|
|
21
|
-
export { RecordNotFoundError as n, VersionConflictError as r, RecordExistsError as t };
|
|
22
|
-
|
|
23
|
-
//# sourceMappingURL=driver-Bbd25rNM.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"driver-Bbd25rNM.mjs","names":[],"sources":["../src/store/driver.ts"],"sourcesContent":["export type CollectionName =\n | \"repositories\"\n | \"signals\"\n | \"tasks\"\n | \"changes\"\n | \"receipts\"\n | \"budgets\";\n\nexport interface StoredRecord {\n readonly value: unknown;\n readonly version: number;\n}\n\nexport interface StoredEntry {\n readonly id: string;\n readonly record: StoredRecord;\n}\n\nexport class RecordExistsError extends Error {\n constructor(collection: CollectionName, id: string) {\n super(`record \"${id}\" already exists in \"${collection}\"`);\n this.name = \"RecordExistsError\";\n }\n}\n\nexport class RecordNotFoundError extends Error {\n constructor(collection: CollectionName, id: string) {\n super(`record \"${id}\" not found in \"${collection}\"`);\n this.name = \"RecordNotFoundError\";\n }\n}\n\nexport class VersionConflictError extends Error {\n constructor(collection: CollectionName, id: string, expectedVersion: number) {\n super(\n `record \"${id}\" in \"${collection}\" changed since version ${expectedVersion} was read`,\n );\n this.name = \"VersionConflictError\";\n }\n}\n\n/**\n * Raw persistence contract. Drivers store opaque values and enforce nothing\n * about their content; every invariant lives in the engine above. `update`\n * must be an atomic compare-and-swap on `expectedVersion`.\n */\nexport interface StoreDriver {\n readonly name: string;\n get(collection: CollectionName, id: string): Promise<StoredRecord | null>;\n insert(collection: CollectionName, id: string, value: unknown): Promise<void>;\n update(\n collection: CollectionName,\n id: string,\n value: unknown,\n expectedVersion: number,\n ): Promise<void>;\n list(collection: CollectionName): Promise<readonly StoredEntry[]>;\n}\n"],"mappings":";AAkBA,IAAa,oBAAb,cAAuC,MAAM;CAC3C,YAAY,YAA4B,IAAY;EAClD,MAAM,WAAW,GAAG,uBAAuB,WAAW,EAAE;EACxD,KAAK,OAAO;CACd;AACF;AAEA,IAAa,sBAAb,cAAyC,MAAM;CAC7C,YAAY,YAA4B,IAAY;EAClD,MAAM,WAAW,GAAG,kBAAkB,WAAW,EAAE;EACnD,KAAK,OAAO;CACd;AACF;AAEA,IAAa,uBAAb,cAA0C,MAAM;CAC9C,YAAY,YAA4B,IAAY,iBAAyB;EAC3E,MACE,WAAW,GAAG,QAAQ,WAAW,0BAA0B,gBAAgB,UAC7E;EACA,KAAK,OAAO;CACd;AACF"}
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { d as schemaVersionSchema, f as usdSchema, i as repositoryIdSchema, l as isoDateTimeSchema, n as factoryIdSchema } from "./id-DwCihQr4.mjs";
|
|
2
|
-
import { r as defaultApprovalPolicy, t as approvalPolicySchema, v as taskKindSchema } from "./approval-CwhTP1XB.mjs";
|
|
3
|
-
import { z } from "zod";
|
|
4
|
-
//#region src/schema/repository.ts
|
|
5
|
-
const repositorySlugSchema = z.string().regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\/[a-z0-9._-]+$/).describe("owner/name, lowercase, e.g. acme/web.");
|
|
6
|
-
const repositorySchema = z.strictObject({
|
|
7
|
-
schemaVersion: schemaVersionSchema,
|
|
8
|
-
id: repositoryIdSchema,
|
|
9
|
-
slug: repositorySlugSchema,
|
|
10
|
-
defaultBranch: z.string().min(1).describe("Branch changes land on, usually main."),
|
|
11
|
-
enabled: z.boolean().describe("Whether the factory may work on this repository."),
|
|
12
|
-
dependsOn: z.array(repositorySlugSchema).describe("Slugs of repositories this one consumes, for multi-repo work ordering."),
|
|
13
|
-
devbox: z.strictObject({
|
|
14
|
-
projectId: z.string().min(1),
|
|
15
|
-
teamId: z.string().min(1),
|
|
16
|
-
snapshot: z.string().min(1).optional().describe("Prebuilt snapshot to boot from.")
|
|
17
|
-
}).optional().describe("Devbox execution config. Absent when this repository never uses devboxes."),
|
|
18
|
-
connectedAt: isoDateTimeSchema
|
|
19
|
-
});
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/schema/budget.ts
|
|
22
|
-
const budgetMonthSchema = z.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/);
|
|
23
|
-
const budgetLimitsSchema = z.strictObject({
|
|
24
|
-
totalUsd: usdSchema,
|
|
25
|
-
investigationUsd: usdSchema,
|
|
26
|
-
perTaskReservationUsd: usdSchema,
|
|
27
|
-
warningPercent: z.number().int().min(1).max(100),
|
|
28
|
-
perRepositoryUsd: z.record(repositorySlugSchema, usdSchema).optional()
|
|
29
|
-
});
|
|
30
|
-
const budgetSchema = z.strictObject({
|
|
31
|
-
schemaVersion: schemaVersionSchema,
|
|
32
|
-
factoryId: factoryIdSchema,
|
|
33
|
-
month: budgetMonthSchema,
|
|
34
|
-
limits: budgetLimitsSchema,
|
|
35
|
-
notices: z.strictObject({
|
|
36
|
-
warningAt: isoDateTimeSchema.optional(),
|
|
37
|
-
exhaustedAt: isoDateTimeSchema.optional()
|
|
38
|
-
})
|
|
39
|
-
});
|
|
40
|
-
//#endregion
|
|
41
|
-
//#region src/schema/factory-config.ts
|
|
42
|
-
const factoryConfigRepositorySchema = z.strictObject({
|
|
43
|
-
slug: repositorySlugSchema.describe("Repository this factory may work on."),
|
|
44
|
-
dependsOn: z.array(repositorySlugSchema).default([]).describe("Repositories that must land changes before this repository.")
|
|
45
|
-
});
|
|
46
|
-
const githubConnectorSchema = z.strictObject({
|
|
47
|
-
owner: z.string().regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/).describe("GitHub user or organization that owns this connector installation."),
|
|
48
|
-
connector: z.string().regex(/^github\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/).describe("Vercel Connect UID installed for this GitHub owner.")
|
|
49
|
-
});
|
|
50
|
-
const slackConnectorSchema = z.strictObject({ connector: z.string().regex(/^slack\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/).describe("Vercel Connect UID installed for this Slack app.") });
|
|
51
|
-
const executionPolicySchema = z.strictObject({
|
|
52
|
-
maxAttempts: z.number().int().min(1).describe("Attempts a task may consume before a stall fails it for good."),
|
|
53
|
-
stallMinutes: z.number().int().min(1).describe("Minutes without progress before a running task is marked stalled."),
|
|
54
|
-
stallMinutesByKind: z.record(taskKindSchema, z.number().int().min(1)).default({}).describe("Per-kind stall windows for long single-step work, e.g. security_scan: 300.")
|
|
55
|
-
});
|
|
56
|
-
const defaultExecutionPolicy = {
|
|
57
|
-
maxAttempts: 3,
|
|
58
|
-
stallMinutes: 45,
|
|
59
|
-
stallMinutesByKind: {}
|
|
60
|
-
};
|
|
61
|
-
const factoryConfigSchema = z.strictObject({
|
|
62
|
-
connectors: z.strictObject({
|
|
63
|
-
github: z.array(githubConnectorSchema).refine((connectors) => new Set(connectors.map(({ owner }) => owner)).size === connectors.length, "GitHub connector owners must be unique."),
|
|
64
|
-
slack: z.array(slackConnectorSchema).max(1, "A factory may configure one Slack connector.").default([])
|
|
65
|
-
}).default({
|
|
66
|
-
github: [],
|
|
67
|
-
slack: []
|
|
68
|
-
}).describe("Provider connections available to this factory."),
|
|
69
|
-
repositories: z.array(factoryConfigRepositorySchema).min(1).describe("Repositories this factory is allowed to inspect and change."),
|
|
70
|
-
operators: z.array(z.string().min(1)).min(1).describe("Provider-qualified identities allowed to operate this factory."),
|
|
71
|
-
approval: approvalPolicySchema.default(defaultApprovalPolicy).describe("Which tasks wait for a human before they run. First match wins."),
|
|
72
|
-
budget: budgetLimitsSchema.default({
|
|
73
|
-
totalUsd: 500,
|
|
74
|
-
investigationUsd: 100,
|
|
75
|
-
perTaskReservationUsd: 5,
|
|
76
|
-
warningPercent: 80
|
|
77
|
-
}).describe("Monthly spend limits. One non-disableable budget per factory per month."),
|
|
78
|
-
execution: executionPolicySchema.default(defaultExecutionPolicy).describe("Stall detection and retry limits for running tasks.")
|
|
79
|
-
});
|
|
80
|
-
function defineFactory(config) {
|
|
81
|
-
return factoryConfigSchema.parse(config);
|
|
82
|
-
}
|
|
83
|
-
//#endregion
|
|
84
|
-
export { factoryConfigSchema as a, budgetSchema as c, factoryConfigRepositorySchema as i, repositorySchema as l, defineFactory as n, budgetLimitsSchema as o, executionPolicySchema as r, budgetMonthSchema as s, defaultExecutionPolicy as t, repositorySlugSchema as u };
|
|
85
|
-
|
|
86
|
-
//# sourceMappingURL=factory-config-BJcjsPKl.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"factory-config-BJcjsPKl.mjs","names":[],"sources":["../src/schema/repository.ts","../src/schema/budget.ts","../src/schema/factory-config.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { isoDateTimeSchema, schemaVersionSchema } from \"./common\";\nimport { repositoryIdSchema } from \"./id\";\n\nexport const repositorySlugSchema = z\n .string()\n .regex(/^[a-z0-9]([a-z0-9-]*[a-z0-9])?\\/[a-z0-9._-]+$/)\n .describe(\"owner/name, lowercase, e.g. acme/web.\");\n\nexport const repositorySchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: repositoryIdSchema,\n slug: repositorySlugSchema,\n defaultBranch: z.string().min(1).describe(\"Branch changes land on, usually main.\"),\n enabled: z.boolean().describe(\"Whether the factory may work on this repository.\"),\n dependsOn: z\n .array(repositorySlugSchema)\n .describe(\"Slugs of repositories this one consumes, for multi-repo work ordering.\"),\n devbox: z\n .strictObject({\n projectId: z.string().min(1),\n teamId: z.string().min(1),\n snapshot: z.string().min(1).optional().describe(\"Prebuilt snapshot to boot from.\"),\n })\n .optional()\n .describe(\"Devbox execution config. Absent when this repository never uses devboxes.\"),\n connectedAt: isoDateTimeSchema,\n});\n\nexport type RepositorySlug = z.infer<typeof repositorySlugSchema>;\nexport type Repository = z.infer<typeof repositorySchema>;\n","import { z } from \"zod\";\nimport { isoDateTimeSchema, schemaVersionSchema, usdSchema } from \"./common\";\nimport { factoryIdSchema } from \"./id\";\nimport { repositorySlugSchema } from \"./repository\";\n\nexport const budgetMonthSchema = z.string().regex(/^\\d{4}-(0[1-9]|1[0-2])$/);\n\nexport const budgetLimitsSchema = z.strictObject({\n totalUsd: usdSchema,\n investigationUsd: usdSchema,\n perTaskReservationUsd: usdSchema,\n warningPercent: z.number().int().min(1).max(100),\n perRepositoryUsd: z.record(repositorySlugSchema, usdSchema).optional(),\n});\n\nexport const budgetSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n factoryId: factoryIdSchema,\n month: budgetMonthSchema,\n limits: budgetLimitsSchema,\n notices: z.strictObject({\n warningAt: isoDateTimeSchema.optional(),\n exhaustedAt: isoDateTimeSchema.optional(),\n }),\n});\n\nexport type BudgetLimits = z.infer<typeof budgetLimitsSchema>;\nexport type Budget = z.infer<typeof budgetSchema>;\n","import { z } from \"zod\";\nimport { approvalPolicySchema, defaultApprovalPolicy } from \"../approval\";\nimport { budgetLimitsSchema } from \"./budget\";\nimport { repositorySlugSchema } from \"./repository\";\nimport { taskKindSchema } from \"./task\";\n\nexport const factoryConfigRepositorySchema = z.strictObject({\n slug: repositorySlugSchema.describe(\"Repository this factory may work on.\"),\n dependsOn: z\n .array(repositorySlugSchema)\n .default([])\n .describe(\"Repositories that must land changes before this repository.\"),\n});\n\nconst githubConnectorSchema = z.strictObject({\n owner: z\n .string()\n .regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)\n .describe(\"GitHub user or organization that owns this connector installation.\"),\n connector: z\n .string()\n .regex(/^github\\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)\n .describe(\"Vercel Connect UID installed for this GitHub owner.\"),\n});\n\nconst slackConnectorSchema = z.strictObject({\n connector: z\n .string()\n .regex(/^slack\\/[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/)\n .describe(\"Vercel Connect UID installed for this Slack app.\"),\n});\n\nexport const executionPolicySchema = z.strictObject({\n maxAttempts: z\n .number()\n .int()\n .min(1)\n .describe(\"Attempts a task may consume before a stall fails it for good.\"),\n stallMinutes: z\n .number()\n .int()\n .min(1)\n .describe(\"Minutes without progress before a running task is marked stalled.\"),\n stallMinutesByKind: z\n .record(taskKindSchema, z.number().int().min(1))\n .default({})\n .describe(\"Per-kind stall windows for long single-step work, e.g. security_scan: 300.\"),\n});\n\nexport type ExecutionPolicy = z.infer<typeof executionPolicySchema>;\n\nexport const defaultExecutionPolicy: ExecutionPolicy = {\n maxAttempts: 3,\n stallMinutes: 45,\n stallMinutesByKind: {},\n};\n\nexport const factoryConfigSchema = z.strictObject({\n connectors: z\n .strictObject({\n github: z\n .array(githubConnectorSchema)\n .refine(\n (connectors) => new Set(connectors.map(({ owner }) => owner)).size === connectors.length,\n \"GitHub connector owners must be unique.\",\n ),\n slack: z\n .array(slackConnectorSchema)\n .max(1, \"A factory may configure one Slack connector.\")\n .default([]),\n })\n .default({ github: [], slack: [] })\n .describe(\"Provider connections available to this factory.\"),\n repositories: z\n .array(factoryConfigRepositorySchema)\n .min(1)\n .describe(\"Repositories this factory is allowed to inspect and change.\"),\n operators: z\n .array(z.string().min(1))\n .min(1)\n .describe(\"Provider-qualified identities allowed to operate this factory.\"),\n approval: approvalPolicySchema\n .default(defaultApprovalPolicy)\n .describe(\"Which tasks wait for a human before they run. First match wins.\"),\n budget: budgetLimitsSchema\n .default({\n totalUsd: 500,\n investigationUsd: 100,\n perTaskReservationUsd: 5,\n warningPercent: 80,\n })\n .describe(\"Monthly spend limits. One non-disableable budget per factory per month.\"),\n execution: executionPolicySchema\n .default(defaultExecutionPolicy)\n .describe(\"Stall detection and retry limits for running tasks.\"),\n});\n\nexport type FactoryConfig = z.infer<typeof factoryConfigSchema>;\nexport type FactoryConfigInput = z.input<typeof factoryConfigSchema>;\n\nexport function defineFactory(config: FactoryConfigInput): FactoryConfig {\n return factoryConfigSchema.parse(config);\n}\n"],"mappings":";;;;AAIA,MAAa,uBAAuB,EACjC,OAAO,CAAC,CACR,MAAM,+CAA+C,CAAC,CACtD,SAAS,uCAAuC;AAEnD,MAAa,mBAAmB,EAAE,aAAa;CAC7C,eAAe;CACf,IAAI;CACJ,MAAM;CACN,eAAe,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,uCAAuC;CACjF,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,kDAAkD;CAChF,WAAW,EACR,MAAM,oBAAoB,CAAC,CAC3B,SAAS,wEAAwE;CACpF,QAAQ,EACL,aAAa;EACZ,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EAC3B,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;EACxB,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,iCAAiC;CACnF,CAAC,CAAC,CACD,SAAS,CAAC,CACV,SAAS,2EAA2E;CACvF,aAAa;AACf,CAAC;;;ACtBD,MAAa,oBAAoB,EAAE,OAAO,CAAC,CAAC,MAAM,yBAAyB;AAE3E,MAAa,qBAAqB,EAAE,aAAa;CAC/C,UAAU;CACV,kBAAkB;CAClB,uBAAuB;CACvB,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAG;CAC/C,kBAAkB,EAAE,OAAO,sBAAsB,SAAS,CAAC,CAAC,SAAS;AACvE,CAAC;AAED,MAAa,eAAe,EAAE,aAAa;CACzC,eAAe;CACf,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS,EAAE,aAAa;EACtB,WAAW,kBAAkB,SAAS;EACtC,aAAa,kBAAkB,SAAS;CAC1C,CAAC;AACH,CAAC;;;AClBD,MAAa,gCAAgC,EAAE,aAAa;CAC1D,MAAM,qBAAqB,SAAS,sCAAsC;CAC1E,WAAW,EACR,MAAM,oBAAoB,CAAC,CAC3B,QAAQ,CAAC,CAAC,CAAC,CACX,SAAS,6DAA6D;AAC3E,CAAC;AAED,MAAM,wBAAwB,EAAE,aAAa;CAC3C,OAAO,EACJ,OAAO,CAAC,CACR,MAAM,mCAAmC,CAAC,CAC1C,SAAS,oEAAoE;CAChF,WAAW,EACR,OAAO,CAAC,CACR,MAAM,2CAA2C,CAAC,CAClD,SAAS,qDAAqD;AACnE,CAAC;AAED,MAAM,uBAAuB,EAAE,aAAa,EAC1C,WAAW,EACR,OAAO,CAAC,CACR,MAAM,0CAA0C,CAAC,CACjD,SAAS,kDAAkD,EAChE,CAAC;AAED,MAAa,wBAAwB,EAAE,aAAa;CAClD,aAAa,EACV,OAAO,CAAC,CACR,IAAI,CAAC,CACL,IAAI,CAAC,CAAC,CACN,SAAS,+DAA+D;CAC3E,cAAc,EACX,OAAO,CAAC,CACR,IAAI,CAAC,CACL,IAAI,CAAC,CAAC,CACN,SAAS,mEAAmE;CAC/E,oBAAoB,EACjB,OAAO,gBAAgB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAC/C,QAAQ,CAAC,CAAC,CAAC,CACX,SAAS,4EAA4E;AAC1F,CAAC;AAID,MAAa,yBAA0C;CACrD,aAAa;CACb,cAAc;CACd,oBAAoB,CAAC;AACvB;AAEA,MAAa,sBAAsB,EAAE,aAAa;CAChD,YAAY,EACT,aAAa;EACZ,QAAQ,EACL,MAAM,qBAAqB,CAAC,CAC5B,QACE,eAAe,IAAI,IAAI,WAAW,KAAK,EAAE,YAAY,KAAK,CAAC,CAAC,CAAC,SAAS,WAAW,QAClF,yCACF;EACF,OAAO,EACJ,MAAM,oBAAoB,CAAC,CAC3B,IAAI,GAAG,8CAA8C,CAAC,CACtD,QAAQ,CAAC,CAAC;CACf,CAAC,CAAC,CACD,QAAQ;EAAE,QAAQ,CAAC;EAAG,OAAO,CAAC;CAAE,CAAC,CAAC,CAClC,SAAS,iDAAiD;CAC7D,cAAc,EACX,MAAM,6BAA6B,CAAC,CACpC,IAAI,CAAC,CAAC,CACN,SAAS,6DAA6D;CACzE,WAAW,EACR,MAAM,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CACxB,IAAI,CAAC,CAAC,CACN,SAAS,gEAAgE;CAC5E,UAAU,qBACP,QAAQ,qBAAqB,CAAC,CAC9B,SAAS,iEAAiE;CAC7E,QAAQ,mBACL,QAAQ;EACP,UAAU;EACV,kBAAkB;EAClB,uBAAuB;EACvB,gBAAgB;CAClB,CAAC,CAAC,CACD,SAAS,yEAAyE;CACrF,WAAW,sBACR,QAAQ,sBAAsB,CAAC,CAC/B,SAAS,qDAAqD;AACnE,CAAC;AAKD,SAAgB,cAAc,QAA2C;CACvE,OAAO,oBAAoB,MAAM,MAAM;AACzC"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
//#region src/schema/factory-config.d.ts
|
|
3
|
-
declare const factoryConfigRepositorySchema: z.ZodObject<{
|
|
4
|
-
slug: z.ZodString;
|
|
5
|
-
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
6
|
-
}, z.core.$strict>;
|
|
7
|
-
declare const executionPolicySchema: z.ZodObject<{
|
|
8
|
-
maxAttempts: z.ZodNumber;
|
|
9
|
-
stallMinutes: z.ZodNumber;
|
|
10
|
-
stallMinutesByKind: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
11
|
-
}, z.core.$strict>;
|
|
12
|
-
type ExecutionPolicy = z.infer<typeof executionPolicySchema>;
|
|
13
|
-
declare const defaultExecutionPolicy: ExecutionPolicy;
|
|
14
|
-
declare const factoryConfigSchema: z.ZodObject<{
|
|
15
|
-
connectors: z.ZodDefault<z.ZodObject<{
|
|
16
|
-
github: z.ZodArray<z.ZodObject<{
|
|
17
|
-
owner: z.ZodString;
|
|
18
|
-
connector: z.ZodString;
|
|
19
|
-
}, z.core.$strict>>;
|
|
20
|
-
slack: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
21
|
-
connector: z.ZodString;
|
|
22
|
-
}, z.core.$strict>>>;
|
|
23
|
-
}, z.core.$strict>>;
|
|
24
|
-
repositories: z.ZodArray<z.ZodObject<{
|
|
25
|
-
slug: z.ZodString;
|
|
26
|
-
dependsOn: z.ZodDefault<z.ZodArray<z.ZodString>>;
|
|
27
|
-
}, z.core.$strict>>;
|
|
28
|
-
operators: z.ZodArray<z.ZodString>;
|
|
29
|
-
approval: z.ZodDefault<z.ZodArray<z.ZodObject<{
|
|
30
|
-
source: z.ZodOptional<z.ZodString>;
|
|
31
|
-
kind: z.ZodOptional<z.ZodString>;
|
|
32
|
-
priority: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
33
|
-
P0: "P0";
|
|
34
|
-
P1: "P1";
|
|
35
|
-
P2: "P2";
|
|
36
|
-
P3: "P3";
|
|
37
|
-
}>>>;
|
|
38
|
-
require: z.ZodBoolean;
|
|
39
|
-
}, z.core.$strict>>>;
|
|
40
|
-
budget: z.ZodDefault<z.ZodObject<{
|
|
41
|
-
totalUsd: z.ZodNumber;
|
|
42
|
-
investigationUsd: z.ZodNumber;
|
|
43
|
-
perTaskReservationUsd: z.ZodNumber;
|
|
44
|
-
warningPercent: z.ZodNumber;
|
|
45
|
-
perRepositoryUsd: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
46
|
-
}, z.core.$strict>>;
|
|
47
|
-
execution: z.ZodDefault<z.ZodObject<{
|
|
48
|
-
maxAttempts: z.ZodNumber;
|
|
49
|
-
stallMinutes: z.ZodNumber;
|
|
50
|
-
stallMinutesByKind: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodNumber>>;
|
|
51
|
-
}, z.core.$strict>>;
|
|
52
|
-
}, z.core.$strict>;
|
|
53
|
-
type FactoryConfig = z.infer<typeof factoryConfigSchema>;
|
|
54
|
-
type FactoryConfigInput = z.input<typeof factoryConfigSchema>;
|
|
55
|
-
declare function defineFactory(config: FactoryConfigInput): FactoryConfig;
|
|
56
|
-
//#endregion
|
|
57
|
-
export { defineFactory as a, factoryConfigSchema as c, defaultExecutionPolicy as i, FactoryConfig as n, executionPolicySchema as o, FactoryConfigInput as r, factoryConfigRepositorySchema as s, ExecutionPolicy as t };
|
|
58
|
-
//# sourceMappingURL=factory-config-D2yU3G0c.d.mts.map
|
|
@@ -1,271 +0,0 @@
|
|
|
1
|
-
import { a as NormalizedSignal, s as WebhookEvent } from "./index-Cy4jfXh5.mjs";
|
|
2
|
-
//#region src/github.d.ts
|
|
3
|
-
interface GitHubRepositoryRequest {
|
|
4
|
-
repository: string;
|
|
5
|
-
token: string;
|
|
6
|
-
fetch?: typeof globalThis.fetch;
|
|
7
|
-
}
|
|
8
|
-
interface CreatePullRequestInput extends GitHubRepositoryRequest {
|
|
9
|
-
title: string;
|
|
10
|
-
head: string;
|
|
11
|
-
base: string;
|
|
12
|
-
body?: string;
|
|
13
|
-
draft?: boolean;
|
|
14
|
-
}
|
|
15
|
-
interface CreatedPullRequest {
|
|
16
|
-
prNumber: number;
|
|
17
|
-
prUrl: string;
|
|
18
|
-
}
|
|
19
|
-
type ReviewCommentAuthorPolicy = "write" | "any";
|
|
20
|
-
interface ReviewCommentTrustInput {
|
|
21
|
-
/** Defaults to `write`. Use `any` only when untrusted review text is handled as data. */
|
|
22
|
-
authorPolicy?: ReviewCommentAuthorPolicy;
|
|
23
|
-
}
|
|
24
|
-
interface ReadReviewCommentInput extends GitHubRepositoryRequest, ReviewCommentTrustInput {
|
|
25
|
-
commentId: number;
|
|
26
|
-
}
|
|
27
|
-
interface GitHubReviewComment {
|
|
28
|
-
id: number;
|
|
29
|
-
body: string;
|
|
30
|
-
url: string;
|
|
31
|
-
author: string;
|
|
32
|
-
inReplyToId: number | null;
|
|
33
|
-
}
|
|
34
|
-
interface AnswerReviewCommentInput extends GitHubRepositoryRequest, ReviewCommentTrustInput {
|
|
35
|
-
pullRequestNumber: number;
|
|
36
|
-
commentId: number;
|
|
37
|
-
body: string;
|
|
38
|
-
}
|
|
39
|
-
interface ReadPullRequestHeadInput extends GitHubRepositoryRequest {
|
|
40
|
-
pullRequestNumber: number;
|
|
41
|
-
}
|
|
42
|
-
interface GitHubPullRequestHead {
|
|
43
|
-
branch: string;
|
|
44
|
-
sha: string;
|
|
45
|
-
repository: string;
|
|
46
|
-
}
|
|
47
|
-
type PullRequestReviewEvent = "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
|
|
48
|
-
interface PullRequestReviewComment {
|
|
49
|
-
path: string;
|
|
50
|
-
line: number;
|
|
51
|
-
body: string;
|
|
52
|
-
}
|
|
53
|
-
interface SubmitPullRequestReviewInput extends GitHubRepositoryRequest {
|
|
54
|
-
pullRequestNumber: number;
|
|
55
|
-
commitId: string;
|
|
56
|
-
event: PullRequestReviewEvent;
|
|
57
|
-
body: string;
|
|
58
|
-
comments?: readonly PullRequestReviewComment[];
|
|
59
|
-
}
|
|
60
|
-
interface SubmittedPullRequestReview {
|
|
61
|
-
id: number;
|
|
62
|
-
url: string;
|
|
63
|
-
state: string;
|
|
64
|
-
}
|
|
65
|
-
interface GitHubIssueComment {
|
|
66
|
-
id: number;
|
|
67
|
-
body: string;
|
|
68
|
-
url: string;
|
|
69
|
-
author: string;
|
|
70
|
-
authorType: "Bot" | "User" | "Organization";
|
|
71
|
-
}
|
|
72
|
-
interface ListPullRequestCommentsInput extends GitHubRepositoryRequest {
|
|
73
|
-
pullRequestNumber: number;
|
|
74
|
-
}
|
|
75
|
-
interface CreatePullRequestCommentInput extends ListPullRequestCommentsInput {
|
|
76
|
-
body: string;
|
|
77
|
-
}
|
|
78
|
-
interface UpdatePullRequestCommentInput extends GitHubRepositoryRequest {
|
|
79
|
-
commentId: number;
|
|
80
|
-
body: string;
|
|
81
|
-
}
|
|
82
|
-
interface PullRequestLabelInput extends GitHubRepositoryRequest {
|
|
83
|
-
pullRequestNumber: number;
|
|
84
|
-
label: string;
|
|
85
|
-
}
|
|
86
|
-
interface ConflictedPullRequest {
|
|
87
|
-
prNumber: number;
|
|
88
|
-
prUrl: string;
|
|
89
|
-
headBranch: string;
|
|
90
|
-
headSha: string;
|
|
91
|
-
baseBranch: string;
|
|
92
|
-
baseSha: string;
|
|
93
|
-
}
|
|
94
|
-
type ListConflictedPullRequestsInput = GitHubRepositoryRequest;
|
|
95
|
-
type CheckRunStatus = "queued" | "in_progress" | "completed";
|
|
96
|
-
type GitHubCheckRunStatus = CheckRunStatus | "waiting" | "requested" | "pending";
|
|
97
|
-
type CheckRunConclusion = "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "success" | "timed_out";
|
|
98
|
-
type CheckRunAnnotationLevel = "notice" | "warning" | "failure";
|
|
99
|
-
interface CheckRunAnnotation {
|
|
100
|
-
path: string;
|
|
101
|
-
startLine: number;
|
|
102
|
-
endLine?: number;
|
|
103
|
-
startColumn?: number;
|
|
104
|
-
endColumn?: number;
|
|
105
|
-
annotationLevel: CheckRunAnnotationLevel;
|
|
106
|
-
message: string;
|
|
107
|
-
title?: string;
|
|
108
|
-
rawDetails?: string;
|
|
109
|
-
}
|
|
110
|
-
interface CheckRunOutput {
|
|
111
|
-
title: string;
|
|
112
|
-
summary: string;
|
|
113
|
-
text?: string;
|
|
114
|
-
annotations?: readonly CheckRunAnnotation[];
|
|
115
|
-
}
|
|
116
|
-
interface CheckRunFields {
|
|
117
|
-
status?: CheckRunStatus;
|
|
118
|
-
conclusion?: CheckRunConclusion;
|
|
119
|
-
detailsUrl?: string;
|
|
120
|
-
externalId?: string;
|
|
121
|
-
startedAt?: string;
|
|
122
|
-
completedAt?: string;
|
|
123
|
-
output?: CheckRunOutput;
|
|
124
|
-
}
|
|
125
|
-
interface CreateCheckRunInput extends GitHubRepositoryRequest, CheckRunFields {
|
|
126
|
-
name: string;
|
|
127
|
-
headSha: string;
|
|
128
|
-
}
|
|
129
|
-
interface UpdateCheckRunInput extends GitHubRepositoryRequest, CheckRunFields {
|
|
130
|
-
checkRunId: number;
|
|
131
|
-
name?: string;
|
|
132
|
-
}
|
|
133
|
-
interface ListCheckRunsForRefInput extends GitHubRepositoryRequest {
|
|
134
|
-
ref: string;
|
|
135
|
-
checkName?: string;
|
|
136
|
-
}
|
|
137
|
-
interface GitHubCheckRun {
|
|
138
|
-
id: number;
|
|
139
|
-
name: string;
|
|
140
|
-
headSha: string;
|
|
141
|
-
status: GitHubCheckRunStatus;
|
|
142
|
-
conclusion: CheckRunConclusion | "stale" | "startup_failure" | null;
|
|
143
|
-
url: string | null;
|
|
144
|
-
detailsUrl: string | null;
|
|
145
|
-
externalId: string | null;
|
|
146
|
-
startedAt: string | null;
|
|
147
|
-
completedAt: string | null;
|
|
148
|
-
}
|
|
149
|
-
declare class GitHubReviewCommentAuthorError extends Error {
|
|
150
|
-
readonly author: string;
|
|
151
|
-
constructor(author: string);
|
|
152
|
-
}
|
|
153
|
-
/** Create a pull request from an existing head branch. */
|
|
154
|
-
declare function createPullRequest(input: CreatePullRequestInput): Promise<CreatedPullRequest>;
|
|
155
|
-
/** Create a check run for one commit. Requires a GitHub App token with checks:write. */
|
|
156
|
-
declare function createCheckRun(input: CreateCheckRunInput): Promise<GitHubCheckRun>;
|
|
157
|
-
/** Update a check run previously created by the authenticated GitHub App. */
|
|
158
|
-
declare function updateCheckRun(input: UpdateCheckRunInput): Promise<GitHubCheckRun>;
|
|
159
|
-
/** List check runs reported for a commit, branch, or tag. */
|
|
160
|
-
declare function listCheckRunsForRef(input: ListCheckRunsForRefInput): Promise<GitHubCheckRun[]>;
|
|
161
|
-
/** List every issue-style comment in a pull request conversation. */
|
|
162
|
-
declare function listPullRequestComments(input: ListPullRequestCommentsInput): Promise<GitHubIssueComment[]>;
|
|
163
|
-
/** Add one issue-style comment to a pull request conversation. */
|
|
164
|
-
declare function createPullRequestComment(input: CreatePullRequestCommentInput): Promise<GitHubIssueComment>;
|
|
165
|
-
/** Edit one issue-style pull request comment. */
|
|
166
|
-
declare function updatePullRequestComment(input: UpdatePullRequestCommentInput): Promise<GitHubIssueComment>;
|
|
167
|
-
/** Read one inline review comment after applying the author policy, which requires write access by default. */
|
|
168
|
-
declare function readReviewComment(input: ReadReviewCommentInput): Promise<GitHubReviewComment>;
|
|
169
|
-
/** Reply to an inline review comment after applying the author policy, which requires write access by default. */
|
|
170
|
-
declare function answerReviewComment(input: AnswerReviewCommentInput): Promise<GitHubReviewComment>;
|
|
171
|
-
/** Submit a summary and optional inline comments against a reviewed pull request commit. */
|
|
172
|
-
declare function submitPullRequestReview(input: SubmitPullRequestReviewInput): Promise<SubmittedPullRequestReview>;
|
|
173
|
-
/** Read the current head branch and commit of a pull request. */
|
|
174
|
-
declare function readPullRequestHead(input: ReadPullRequestHeadInput): Promise<GitHubPullRequestHead>;
|
|
175
|
-
/** List open, same-repository pull requests by one author that GitHub reports as conflicting. */
|
|
176
|
-
declare function listConflictedPullRequests(input: ListConflictedPullRequestsInput): Promise<ConflictedPullRequest[]>;
|
|
177
|
-
/** Add one label to a pull request. */
|
|
178
|
-
declare function addLabel(input: PullRequestLabelInput): Promise<string[]>;
|
|
179
|
-
/** Remove one label from a pull request. */
|
|
180
|
-
declare function removeLabel(input: PullRequestLabelInput): Promise<string[]>;
|
|
181
|
-
/**
|
|
182
|
-
* Verify a GitHub webhook HMAC signature (the x-hub-signature-256 header)
|
|
183
|
-
* against the raw request body. Returns false for missing or malformed
|
|
184
|
-
* signatures instead of throwing.
|
|
185
|
-
*/
|
|
186
|
-
declare function verifyGitHubSignature(options: {
|
|
187
|
-
secret: string;
|
|
188
|
-
payload: string;
|
|
189
|
-
signature: string | null;
|
|
190
|
-
}): boolean;
|
|
191
|
-
interface GitHubDefaultBranchPush {
|
|
192
|
-
source: "github_default_branch_push";
|
|
193
|
-
deliveryId: string;
|
|
194
|
-
repositorySlug: string;
|
|
195
|
-
defaultBranch: string;
|
|
196
|
-
}
|
|
197
|
-
/** Normalize a push to a repository's default branch for deterministic reconciliation. */
|
|
198
|
-
declare function normalizeGitHubDefaultBranchPush(options: {
|
|
199
|
-
deliveryId: string;
|
|
200
|
-
event: string;
|
|
201
|
-
payload: unknown;
|
|
202
|
-
}): GitHubDefaultBranchPush | null;
|
|
203
|
-
interface GitHubPullRequestSignal extends NormalizedSignal<"github_pr"> {
|
|
204
|
-
repositorySlug: string;
|
|
205
|
-
pullRequest: {
|
|
206
|
-
number: number;
|
|
207
|
-
url: string;
|
|
208
|
-
author: string;
|
|
209
|
-
draft: boolean;
|
|
210
|
-
headSha: string;
|
|
211
|
-
headBranch: string;
|
|
212
|
-
headRepositorySlug: string;
|
|
213
|
-
baseSha: string;
|
|
214
|
-
baseBranch: string;
|
|
215
|
-
sender: string;
|
|
216
|
-
};
|
|
217
|
-
}
|
|
218
|
-
/** Normalize a newly reviewable or updated pull request into a factory signal. */
|
|
219
|
-
declare function normalizeGitHubPullRequest(options: WebhookEvent): GitHubPullRequestSignal | null;
|
|
220
|
-
interface GitHubIssueSignal extends NormalizedSignal<"github_issue"> {
|
|
221
|
-
repositorySlug: string;
|
|
222
|
-
issue: {
|
|
223
|
-
number: number;
|
|
224
|
-
title: string;
|
|
225
|
-
body: string | null;
|
|
226
|
-
};
|
|
227
|
-
}
|
|
228
|
-
interface GitHubCIFailureSignal extends NormalizedSignal<"github_ci_failure"> {
|
|
229
|
-
repositoryDefaultBranch: string;
|
|
230
|
-
repositorySlug: string;
|
|
231
|
-
workflowRun: {
|
|
232
|
-
id: number;
|
|
233
|
-
name: string;
|
|
234
|
-
trigger: string;
|
|
235
|
-
branch: string | null;
|
|
236
|
-
headRepositorySlug: string | null;
|
|
237
|
-
headSha: string;
|
|
238
|
-
url: string;
|
|
239
|
-
conclusion: string;
|
|
240
|
-
attempt: number;
|
|
241
|
-
};
|
|
242
|
-
}
|
|
243
|
-
/**
|
|
244
|
-
* Normalize a GitHub issues webhook into the factory's signal shape. Returns
|
|
245
|
-
* null for payloads that are not an opened issue. The caller supplies the
|
|
246
|
-
* repository id; the payload stays untrusted data.
|
|
247
|
-
*/
|
|
248
|
-
declare function normalizeGitHubIssueOpened(options: WebhookEvent): GitHubIssueSignal | null;
|
|
249
|
-
interface GitHubPullRequestClosed {
|
|
250
|
-
source: "github_pull_request_closed";
|
|
251
|
-
deliveryId: string;
|
|
252
|
-
repositorySlug: string;
|
|
253
|
-
prNumber: number;
|
|
254
|
-
prUrl: string;
|
|
255
|
-
merged: boolean;
|
|
256
|
-
/** The merge commit on the base branch; null when closed without merging. */
|
|
257
|
-
mergeCommitSha: string | null;
|
|
258
|
-
/** The GitHub login that merged the pull request, or closed it without merging. */
|
|
259
|
-
decidedBy: string;
|
|
260
|
-
}
|
|
261
|
-
/**
|
|
262
|
-
* Normalize a closed pull_request webhook so the factory can observe what
|
|
263
|
-
* happened to its change: merged records merged_by (the sender when GitHub
|
|
264
|
-
* omits it), a close without merge records the sender.
|
|
265
|
-
*/
|
|
266
|
-
declare function normalizeGitHubPullRequestClosed(options: WebhookEvent): GitHubPullRequestClosed | null;
|
|
267
|
-
/** Normalize a completed, unsuccessful GitHub Actions run into a CI failure signal. */
|
|
268
|
-
declare function normalizeGitHubWorkflowRunFailure(options: WebhookEvent): GitHubCIFailureSignal | null;
|
|
269
|
-
//#endregion
|
|
270
|
-
export { submitPullRequestReview as $, ReadPullRequestHeadInput as A, createPullRequest as B, GitHubReviewCommentAuthorError as C, PullRequestLabelInput as D, ListPullRequestCommentsInput as E, UpdateCheckRunInput as F, normalizeGitHubDefaultBranchPush as G, listCheckRunsForRef as H, UpdatePullRequestCommentInput as I, normalizeGitHubPullRequestClosed as J, normalizeGitHubIssueOpened as K, addLabel as L, ReviewCommentAuthorPolicy as M, SubmitPullRequestReviewInput as N, PullRequestReviewComment as O, SubmittedPullRequestReview as P, removeLabel as Q, answerReviewComment as R, GitHubReviewComment as S, ListConflictedPullRequestsInput as T, listConflictedPullRequests as U, createPullRequestComment as V, listPullRequestComments as W, readPullRequestHead as X, normalizeGitHubWorkflowRunFailure as Y, readReviewComment as Z, GitHubIssueSignal as _, CheckRunOutput as a, GitHubPullRequestSignal as b, CreateCheckRunInput as c, CreatedPullRequest as d, updateCheckRun as et, GitHubCIFailureSignal as f, GitHubIssueComment as g, GitHubDefaultBranchPush as h, CheckRunConclusion as i, ReadReviewCommentInput as j, PullRequestReviewEvent as k, CreatePullRequestCommentInput as l, GitHubCheckRunStatus as m, CheckRunAnnotation as n, verifyGitHubSignature as nt, CheckRunStatus as o, GitHubCheckRun as p, normalizeGitHubPullRequest as q, CheckRunAnnotationLevel as r, ConflictedPullRequest as s, AnswerReviewCommentInput as t, updatePullRequestComment as tt, CreatePullRequestInput as u, GitHubPullRequestClosed as v, ListCheckRunsForRefInput as w, GitHubRepositoryRequest as x, GitHubPullRequestHead as y, createCheckRun as z };
|
|
271
|
-
//# sourceMappingURL=github-DXsxboUL.d.mts.map
|
package/dist/id-DwCihQr4.mjs.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"id-DwCihQr4.mjs","names":[],"sources":["../src/schema/common.ts","../src/schema/id.ts"],"sourcesContent":["import { z } from \"zod\";\n\nexport const SCHEMA_VERSION = 1;\n\nexport const schemaVersionSchema = z\n .literal(SCHEMA_VERSION)\n .describe(\"Version of the entity schema this row was written with.\");\n\nexport const isoDateTimeSchema = z.iso\n .datetime()\n .describe(\"UTC timestamp in ISO 8601 format, e.g. 2026-08-26T12:00:00Z.\");\n\nexport const usdSchema = z.number().finite().nonnegative().describe(\"Amount in US dollars.\");\n\n/**\n * Open vocabulary value. Standard values ship as exported constants; custom\n * values matching the pattern are equally valid.\n */\nexport const vocabularySchema = z\n .string()\n .regex(/^[a-z][a-z0-9_]{0,63}$/, \"must be lowercase snake_case starting with a letter\")\n .describe(\"Lowercase snake_case name, e.g. github_issue or sentry_alert.\");\n\nexport const replyToSchema = z.strictObject({\n channel: z\n .string()\n .min(1)\n .describe(\"Connector that should carry replies, e.g. github or slack.\"),\n address: z\n .string()\n .min(1)\n .describe(\"Connector-specific reply address, e.g. acme/web#41 or a Slack thread id.\"),\n});\n\nexport type ReplyTo = z.infer<typeof replyToSchema>;\n","import { z } from \"zod\";\n\nfunction idSchema(prefix: string) {\n return z.string().regex(new RegExp(`^${prefix}_[a-z0-9]{6,64}$`));\n}\n\nexport const factoryIdSchema = idSchema(\"fac\");\nexport const repositoryIdSchema = idSchema(\"repo\");\nexport const signalIdSchema = idSchema(\"sig\");\nexport const taskIdSchema = idSchema(\"task\");\nexport const changeIdSchema = idSchema(\"chg\");\nexport const receiptIdSchema = idSchema(\"rcpt\");\n\nexport const repositoryIdsSchema = z.array(repositoryIdSchema).min(1);\n\nexport type FactoryId = z.infer<typeof factoryIdSchema>;\nexport type RepositoryId = z.infer<typeof repositoryIdSchema>;\nexport type SignalId = z.infer<typeof signalIdSchema>;\nexport type TaskId = z.infer<typeof taskIdSchema>;\nexport type ChangeId = z.infer<typeof changeIdSchema>;\nexport type ReceiptId = z.infer<typeof receiptIdSchema>;\n"],"mappings":";;AAEA,MAAa,iBAAiB;AAE9B,MAAa,sBAAsB,EAChC,QAAA,CAAsB,CAAC,CACvB,SAAS,yDAAyD;AAErE,MAAa,oBAAoB,EAAE,IAChC,SAAS,CAAC,CACV,SAAS,8DAA8D;AAE1E,MAAa,YAAY,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,uBAAuB;;;;;AAM3F,MAAa,mBAAmB,EAC7B,OAAO,CAAC,CACR,MAAM,0BAA0B,qDAAqD,CAAC,CACtF,SAAS,+DAA+D;AAE3E,MAAa,gBAAgB,EAAE,aAAa;CAC1C,SAAS,EACN,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,4DAA4D;CACxE,SAAS,EACN,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,0EAA0E;AACxF,CAAC;;;AC9BD,SAAS,SAAS,QAAgB;CAChC,OAAO,EAAE,OAAO,CAAC,CAAC,MAAM,IAAI,OAAO,IAAI,OAAO,iBAAiB,CAAC;AAClE;AAEA,MAAa,kBAAkB,SAAS,KAAK;AAC7C,MAAa,qBAAqB,SAAS,MAAM;AACjD,MAAa,iBAAiB,SAAS,KAAK;AAC5C,MAAa,eAAe,SAAS,MAAM;AAC3C,MAAa,iBAAiB,SAAS,KAAK;AAC5C,MAAa,kBAAkB,SAAS,MAAM;AAE9C,MAAa,sBAAsB,EAAE,MAAM,kBAAkB,CAAC,CAAC,IAAI,CAAC"}
|
|
@@ -1,67 +0,0 @@
|
|
|
1
|
-
import { c as ReplyTo, r as SignalSource } from "./signal-CHVEmzvI.mjs";
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
//#region src/connectors/index.d.ts
|
|
4
|
-
interface WebhookEvent {
|
|
5
|
-
deliveryId: string;
|
|
6
|
-
event: string;
|
|
7
|
-
payload: unknown;
|
|
8
|
-
}
|
|
9
|
-
interface NormalizedSignal<TSource extends SignalSource = SignalSource> {
|
|
10
|
-
source: TSource;
|
|
11
|
-
deliveryId: string;
|
|
12
|
-
replyTo: ReplyTo;
|
|
13
|
-
payload: unknown;
|
|
14
|
-
}
|
|
15
|
-
type SignalNormalizer<TSignal extends NormalizedSignal = NormalizedSignal> = (event: WebhookEvent) => TSignal | null;
|
|
16
|
-
declare const communicationOutcomes: readonly ["accepted", "started", "succeeded", "failed", "needs_human", "question", "digest", "rolled_back", "budget_warning", "budget_exhausted", "message"];
|
|
17
|
-
declare const communicationOutcomeSchema: z.ZodEnum<{
|
|
18
|
-
message: "message";
|
|
19
|
-
succeeded: "succeeded";
|
|
20
|
-
failed: "failed";
|
|
21
|
-
needs_human: "needs_human";
|
|
22
|
-
question: "question";
|
|
23
|
-
accepted: "accepted";
|
|
24
|
-
rolled_back: "rolled_back";
|
|
25
|
-
started: "started";
|
|
26
|
-
digest: "digest";
|
|
27
|
-
budget_warning: "budget_warning";
|
|
28
|
-
budget_exhausted: "budget_exhausted";
|
|
29
|
-
}>;
|
|
30
|
-
declare const communicationEventSchema: z.ZodObject<{
|
|
31
|
-
eventId: z.ZodString;
|
|
32
|
-
repositoryIds: z.ZodArray<z.ZodString>;
|
|
33
|
-
taskId: z.ZodOptional<z.ZodString>;
|
|
34
|
-
changeId: z.ZodOptional<z.ZodString>;
|
|
35
|
-
replyTo: z.ZodObject<{
|
|
36
|
-
channel: z.ZodString;
|
|
37
|
-
address: z.ZodString;
|
|
38
|
-
}, z.core.$strict>;
|
|
39
|
-
outcome: z.ZodEnum<{
|
|
40
|
-
message: "message";
|
|
41
|
-
succeeded: "succeeded";
|
|
42
|
-
failed: "failed";
|
|
43
|
-
needs_human: "needs_human";
|
|
44
|
-
question: "question";
|
|
45
|
-
accepted: "accepted";
|
|
46
|
-
rolled_back: "rolled_back";
|
|
47
|
-
started: "started";
|
|
48
|
-
digest: "digest";
|
|
49
|
-
budget_warning: "budget_warning";
|
|
50
|
-
budget_exhausted: "budget_exhausted";
|
|
51
|
-
}>;
|
|
52
|
-
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
53
|
-
}, z.core.$strict>;
|
|
54
|
-
type CommunicationOutcome = z.infer<typeof communicationOutcomeSchema>;
|
|
55
|
-
type CommunicationEvent = z.infer<typeof communicationEventSchema>;
|
|
56
|
-
interface CommunicationAdapter {
|
|
57
|
-
readonly channel: string;
|
|
58
|
-
deliver(event: CommunicationEvent): Promise<void>;
|
|
59
|
-
}
|
|
60
|
-
interface CommunicationRouter {
|
|
61
|
-
readonly channels: readonly string[];
|
|
62
|
-
deliver(event: CommunicationEvent): Promise<void>;
|
|
63
|
-
}
|
|
64
|
-
declare function createCommunicationRouter(adapters: readonly CommunicationAdapter[]): CommunicationRouter;
|
|
65
|
-
//#endregion
|
|
66
|
-
export { NormalizedSignal as a, communicationEventSchema as c, createCommunicationRouter as d, CommunicationRouter as i, communicationOutcomeSchema as l, CommunicationEvent as n, SignalNormalizer as o, CommunicationOutcome as r, WebhookEvent as s, CommunicationAdapter as t, communicationOutcomes as u };
|
|
67
|
-
//# sourceMappingURL=index-Cy4jfXh5.d.mts.map
|