@vercel/factory 0.0.14 → 0.0.16
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/CHANGELOG.md +356 -0
- package/README.md +96 -2
- package/dist/agent-routes.d.mts +113 -0
- package/dist/agent-routes.mjs +91 -0
- package/dist/agent-routes.mjs.map +1 -0
- package/dist/api-contracts.d.mts +1768 -0
- package/dist/api-contracts.mjs +119 -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 +111 -216
- package/dist/api.mjs +1063 -99
- package/dist/api.mjs.map +1 -1
- 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 +698 -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 +84 -12
- package/dist/blob/index.mjs +179 -45
- package/dist/blob/index.mjs.map +1 -1
- package/dist/budget.d.mts +115 -0
- package/dist/budget.mjs +147 -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 +7 -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 +37 -0
- package/dist/change-verification/dispatch.mjs +83 -0
- package/dist/change-verification/dispatch.mjs.map +1 -0
- package/dist/change-verification/eve-tool.d.mts +61 -0
- package/dist/change-verification/eve-tool.mjs +89 -0
- package/dist/change-verification/eve-tool.mjs.map +1 -0
- package/dist/change-verification/result.mjs +130 -0
- package/dist/change-verification/result.mjs.map +1 -0
- package/dist/changes/eve-record-change.d.mts +56 -0
- package/dist/changes/eve-record-change.mjs +131 -0
- package/dist/changes/eve-record-change.mjs.map +1 -0
- package/dist/changes/presentation.d.mts +14 -0
- package/dist/changes.d.mts +24 -0
- package/dist/changes.mjs +29 -0
- package/dist/changes.mjs.map +1 -0
- package/dist/client-events.d.mts +25 -0
- package/dist/client-events.mjs +45 -0
- package/dist/client-events.mjs.map +1 -0
- package/dist/client-stream.d.mts +28 -0
- package/dist/client-stream.mjs +210 -0
- package/dist/client-stream.mjs.map +1 -0
- package/dist/client-transcript.d.mts +41 -0
- package/dist/client-transcript.mjs +233 -0
- package/dist/client-transcript.mjs.map +1 -0
- package/dist/client.d.mts +343 -0
- package/dist/client.mjs +366 -0
- package/dist/client.mjs.map +1 -0
- package/dist/code-review/contracts.d.mts +27 -0
- package/dist/code-review/eve-post-review.d.mts +70 -0
- package/dist/code-review/eve-post-review.mjs +195 -0
- package/dist/code-review/eve-post-review.mjs.map +1 -0
- package/dist/code-review/eve-review-comments.d.mts +75 -0
- package/dist/code-review/eve-review-comments.mjs +193 -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 +46 -0
- package/dist/code-review/github-reporter.mjs +262 -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 +7 -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 -3
- package/dist/connectors/index.mjs +3 -52
- 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 -52
- package/dist/connectors/slack.mjs +13 -85
- package/dist/connectors/slack.mjs.map +1 -1
- package/dist/deepsec/eve-tool.d.mts +110 -0
- package/dist/deepsec/eve-tool.mjs +166 -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 +152 -0
- package/dist/dispatch.mjs +199 -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 +209 -1277
- package/dist/eve/index.mjs +312 -1073
- package/dist/eve/index.mjs.map +1 -1
- package/dist/eve/invoke.d.mts +144 -0
- package/dist/eve/invoke.mjs +254 -0
- package/dist/eve/invoke.mjs.map +1 -0
- package/dist/eve/session-client.d.mts +186 -0
- package/dist/eve/session-client.mjs +245 -0
- package/dist/eve/session-client.mjs.map +1 -0
- package/dist/eve/task-execution.d.mts +380 -0
- package/dist/eve/task-execution.mjs +73 -0
- package/dist/eve/task-execution.mjs.map +1 -0
- package/dist/eve/task-session.d.mts +129 -0
- package/dist/eve/task-session.mjs +245 -0
- package/dist/eve/task-session.mjs.map +1 -0
- package/dist/eve/transcript.d.mts +37 -0
- package/dist/eve/transcript.mjs +69 -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 +183 -0
- package/dist/execution.mjs +223 -0
- package/dist/execution.mjs.map +1 -0
- package/dist/finding-remediation/admission.d.mts +53 -0
- package/dist/finding-remediation/admission.mjs +90 -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 +7 -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 +199 -0
- package/dist/github-publication.mjs +442 -0
- package/dist/github-publication.mjs.map +1 -0
- package/dist/github-transfer.d.mts +81 -0
- package/dist/github-transfer.mjs +273 -0
- package/dist/github-transfer.mjs.map +1 -0
- package/dist/github.d.mts +446 -2
- package/dist/github.mjs +357 -56
- 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/inbox-activity.d.mts +53 -0
- package/dist/inbox-activity.mjs +41 -0
- package/dist/inbox-activity.mjs.map +1 -0
- package/dist/index.d.mts +16 -484
- package/dist/index.mjs +15 -522
- package/dist/intake-contracts.d.mts +55 -0
- package/dist/intake-contracts.mjs +33 -0
- package/dist/intake-contracts.mjs.map +1 -0
- package/dist/integrations/deepsec.d.mts +5 -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 +5 -0
- package/dist/integrations/slack.mjs +5 -0
- package/dist/integrations/vercel.d.mts +5 -0
- package/dist/integrations/vercel.mjs +4 -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 +47 -0
- package/dist/merge-resolution/eve-tools.mjs +122 -0
- package/dist/merge-resolution/eve-tools.mjs.map +1 -0
- package/dist/model-settings.d.mts +41 -0
- package/dist/model-settings.mjs +35 -0
- package/dist/model-settings.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 +279 -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 +48 -1
- package/dist/postgres/index.mjs +45 -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 +56 -0
- package/dist/presets/software-development/dispatch.mjs +67 -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 +24 -0
- package/dist/presets/software-development/task-communication.mjs +157 -0
- package/dist/presets/software-development/task-communication.mjs.map +1 -0
- package/dist/presets/software-development.d.mts +10 -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 +67 -0
- package/dist/pull-requests/github-publisher.mjs +405 -0
- package/dist/pull-requests/github-publisher.mjs.map +1 -0
- package/dist/pull-requests.d.mts +6 -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 +10 -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 +40 -0
- package/dist/schema/agent-route.mjs +33 -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-BLIkCVue.mjs → schema/common.mjs} +7 -16
- package/dist/schema/common.mjs.map +1 -0
- package/dist/schema/communication.d.mts +52 -0
- package/dist/{communication-Kd9nU5RP.mjs → schema/communication.mjs} +8 -3
- 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 +122 -0
- package/dist/schema/factory-config.mjs +90 -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 +30 -0
- package/dist/schema/repository.mjs +29 -0
- package/dist/schema/repository.mjs.map +1 -0
- package/dist/schema/session.d.mts +136 -0
- package/dist/schema/session.mjs +54 -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/slack-pr-notifications.d.mts +12 -0
- package/dist/schema/slack-pr-notifications.mjs +11 -0
- package/dist/schema/slack-pr-notifications.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 +3173 -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 +273 -0
- package/dist/schema/task.mjs +200 -0
- package/dist/schema/task.mjs.map +1 -0
- package/dist/schema/transcript.d.mts +176 -0
- package/dist/schema/transcript.mjs +87 -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 +150 -0
- package/dist/schema/work.mjs +102 -0
- package/dist/schema/work.mjs.map +1 -0
- package/dist/session-previews.d.mts +76 -0
- package/dist/session-previews.mjs +55 -0
- package/dist/session-previews.mjs.map +1 -0
- package/dist/session-review.d.mts +120 -0
- package/dist/session-review.mjs +79 -0
- package/dist/session-review.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 +20 -0
- package/dist/signals.mjs +19 -0
- package/dist/signals.mjs.map +1 -0
- package/dist/stall.d.mts +41 -0
- package/dist/stall.mjs +83 -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 +683 -0
- package/dist/store/engine.mjs +2309 -0
- package/dist/store/engine.mjs.map +1 -0
- package/dist/store/memory.d.mts +24 -0
- package/dist/store/memory.mjs +69 -0
- package/dist/store/memory.mjs.map +1 -0
- package/dist/store/slack-pr-notifications.d.mts +44 -0
- package/dist/store/slack-pr-notifications.mjs +121 -0
- package/dist/store/slack-pr-notifications.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 +180 -0
- package/dist/store/task-work.mjs +137 -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 +79 -0
- package/dist/sweep.mjs +171 -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 +267 -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 +53 -0
- package/dist/vercel-git.mjs +344 -0
- package/dist/vercel-git.mjs.map +1 -0
- package/dist/vercel-github-api.d.mts +103 -0
- package/dist/vercel-github-api.mjs +363 -0
- package/dist/vercel-github-api.mjs.map +1 -0
- package/dist/vercel.d.mts +34 -2
- package/dist/vercel.mjs +49 -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 +4 -0
- package/dist/work-triage.mjs +3 -0
- package/dist/workflows.d.mts +146 -0
- package/dist/workflows.mjs +139 -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-files-git.d.mts +15 -0
- package/dist/workspace-files-git.mjs +61 -0
- package/dist/workspace-files-git.mjs.map +1 -0
- package/dist/workspace-files.d.mts +107 -0
- package/dist/workspace-files.mjs +74 -0
- package/dist/workspace-files.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/docs/getting-started.md +104 -0
- package/docs/index.md +100 -0
- package/docs/recipes/cancellation.md +215 -0
- package/docs/recipes/custom-workflow.md +153 -0
- package/docs/recipes/dependent-tasks.md +207 -0
- package/docs/recipes/eve-agent.md +277 -0
- package/docs/recipes/human-input.md +204 -0
- package/docs/recipes/persistence-recovery.md +268 -0
- package/docs/recipes/retry-recovery.md +241 -0
- package/docs/recipes/task-messaging.md +215 -0
- package/docs/recipes/typed-eve-result.md +161 -0
- package/docs/runtime-integration.md +137 -0
- package/package.json +142 -46
- package/dist/approval-JX2Px9IC.mjs +0 -132
- package/dist/approval-JX2Px9IC.mjs.map +0 -1
- package/dist/budget-DzSiIA4t.mjs +0 -42
- package/dist/budget-DzSiIA4t.mjs.map +0 -1
- package/dist/change-D2U6v7Ek.mjs +0 -554
- package/dist/change-D2U6v7Ek.mjs.map +0 -1
- package/dist/communication-Kd9nU5RP.mjs.map +0 -1
- package/dist/coordination-Cq08hb1l.mjs +0 -76
- package/dist/coordination-Cq08hb1l.mjs.map +0 -1
- package/dist/dispatch-BaZS3PT8.d.mts +0 -76
- package/dist/driver-BC0Mt5KG.d.mts +0 -34
- package/dist/driver-Bbd25rNM.mjs +0 -23
- package/dist/driver-Bbd25rNM.mjs.map +0 -1
- package/dist/engine-DFHU2Pe-.d.mts +0 -781
- package/dist/engine-WaUM2cGA.mjs +0 -1068
- package/dist/engine-WaUM2cGA.mjs.map +0 -1
- package/dist/factory-config-BoRXOw43.mjs +0 -50
- package/dist/factory-config-BoRXOw43.mjs.map +0 -1
- package/dist/factory-config-D2yU3G0c.d.mts +0 -58
- package/dist/github-C5HNBN6p.d.mts +0 -279
- package/dist/id-BLIkCVue.mjs.map +0 -1
- package/dist/index-Bw6hggoH.d.mts +0 -40
- package/dist/index.mjs.map +0 -1
- package/dist/task-CcOyOJ3k.mjs +0 -154
- package/dist/task-CcOyOJ3k.mjs.map +0 -1
package/dist/github.d.mts
CHANGED
|
@@ -1,2 +1,446 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { RepositorySlug } from "./schema/repository.mjs";
|
|
2
|
+
import { OpenPullRequest } from "./pull-requests/contracts.mjs";
|
|
3
|
+
import { NormalizedSignal, WebhookEvent } from "./connectors/index.mjs";
|
|
4
|
+
import { GitHubAppFactoryInput, GitHubAppInstallationToken, GitHubAppLike, GitHubAppPermissions, MintGitHubAppInstallationTokenInput, mintGitHubAppInstallationToken } from "./github-app.mjs";
|
|
5
|
+
import { FetchGitHubBundleInput, FetchGitHubRefsInput, GitHubGitTransport, GitHubRefMapping, GitHubRepositoryBundle, GitTransferSandbox, PushGitHubBundleInput, PushGitHubHeadInput, ReadGitTransferFileInput, WithSandboxGitBundleInput, WriteGitTransferFileInput } from "./github-transfer.mjs";
|
|
6
|
+
import { CheckoutGitHubRepositoryInput, CommittedGitChange, CreateGitHubBranchInput, CreateGitHubCommitInput, CreateGitHubPublicationPullRequestInput, CreateGitHubTreeInput, CreatedGitHubPublicationPullRequest, GitHubCheckoutConflictError, GitHubCommit, GitHubPublicationApiError, GitHubPublicationClient, GitHubPublicationClientOptions, GitHubPublicationLimits, GitHubPublicationPullRequest, GitHubTreeDeletion, GitHubTreeEntry, GitHubTreeUpsert, ListGitHubPublicationPullRequestsInput, MarkGitHubPullRequestReadyInput, ReadCommittedGitChangeInput, ReadGitHubBranchHeadInput, ReadGitHubCommitInput, ReadGitHubPullRequestInput, RunSandboxGitInput, SandboxGit, SandboxGitCommandInput, SandboxGitCommandResult, UpdateGitHubBranchInput, checkoutGitHubRepository, createGitHubPublicationClient, factorySessionBranch, factoryTaskBranch, isSafeGitRef, readCommittedGitChange, runSandboxGit } from "./github-publication.mjs";
|
|
7
|
+
//#region src/github.d.ts
|
|
8
|
+
/** Custom mention names accepted by Factory's GitHub comment normalizers. */
|
|
9
|
+
interface FactoryMentionOptions {
|
|
10
|
+
mentions?: readonly string[];
|
|
11
|
+
}
|
|
12
|
+
/** Provider event and optional mentions accepted by Factory comment normalizers. */
|
|
13
|
+
interface NormalizeFactoryCommentInput extends FactoryMentionOptions {
|
|
14
|
+
event: string;
|
|
15
|
+
payload: unknown;
|
|
16
|
+
}
|
|
17
|
+
/** Select addressed comments and optionally reply candidates whose ownership the caller must verify. */
|
|
18
|
+
interface NormalizeFactoryReviewCommentInput extends NormalizeFactoryCommentInput {
|
|
19
|
+
includeReplies?: boolean;
|
|
20
|
+
}
|
|
21
|
+
/** Configured repositories and provider observations used to select one trusted repository. */
|
|
22
|
+
interface ConfiguredEventRepositoryInput {
|
|
23
|
+
configuredSlugs: readonly RepositorySlug[];
|
|
24
|
+
eventSlugs: readonly (RepositorySlug | null)[];
|
|
25
|
+
}
|
|
26
|
+
/** Routing metadata extracted from an addressed inline comment or an opt-in reply candidate. */
|
|
27
|
+
interface FactoryReviewComment {
|
|
28
|
+
repositorySlug: RepositorySlug;
|
|
29
|
+
pullRequestNumber: number;
|
|
30
|
+
pullRequestUrl: string;
|
|
31
|
+
pullRequestAuthor: string;
|
|
32
|
+
commentId: number;
|
|
33
|
+
commentUrl: string;
|
|
34
|
+
}
|
|
35
|
+
/** Human answer extracted from a mentioned GitHub issue comment. */
|
|
36
|
+
interface FactoryQuestionReply {
|
|
37
|
+
repositorySlug: RepositorySlug;
|
|
38
|
+
replyAddress: string;
|
|
39
|
+
author: string;
|
|
40
|
+
answer: string;
|
|
41
|
+
commentId: number;
|
|
42
|
+
issueNumber: number;
|
|
43
|
+
commentUrl: string;
|
|
44
|
+
}
|
|
45
|
+
/** Select the one configured repository consistently identified by a provider delivery. */
|
|
46
|
+
declare function configuredEventRepositorySlug(input: ConfiguredEventRepositoryInput): RepositorySlug | null;
|
|
47
|
+
/** Normalize addressed inline comments or opt-in reply candidates; callers must authenticate them. */
|
|
48
|
+
declare function normalizeFactoryReviewComment(input: NormalizeFactoryReviewCommentInput): FactoryReviewComment | null;
|
|
49
|
+
/**
|
|
50
|
+
* Strip the Factory mention from an issue comment body, returning null when the
|
|
51
|
+
* comment does not address Factory. Exported so a caller reconciling a delivery
|
|
52
|
+
* against GitHub's own copy of the comment applies the same rule the normalizer
|
|
53
|
+
* applied to the payload.
|
|
54
|
+
*/
|
|
55
|
+
declare function stripFactoryQuestionMention(body: string, options?: FactoryMentionOptions): string | null;
|
|
56
|
+
/** Normalize a mentioned issue comment that can answer a persisted Factory QuestionTask. */
|
|
57
|
+
declare function normalizeFactoryQuestionReply(input: NormalizeFactoryCommentInput): FactoryQuestionReply | null;
|
|
58
|
+
/** Credentials and transport for a repository-scoped GitHub REST request. */
|
|
59
|
+
interface GitHubRepositoryRequest {
|
|
60
|
+
repository: RepositorySlug;
|
|
61
|
+
token: string;
|
|
62
|
+
fetch?: typeof globalThis.fetch;
|
|
63
|
+
}
|
|
64
|
+
/** Repository-scoped identity of one pull request accepted by GitHub operations. */
|
|
65
|
+
interface GitHubPullRequestTarget extends GitHubRepositoryRequest {
|
|
66
|
+
pullRequestNumber: number;
|
|
67
|
+
}
|
|
68
|
+
/** Provider-owned number and URL that identify one GitHub pull request. */
|
|
69
|
+
interface GitHubPullRequestReference {
|
|
70
|
+
pullRequestNumber: number;
|
|
71
|
+
pullRequestUrl: string;
|
|
72
|
+
}
|
|
73
|
+
/** Repository request that identifies the GitHub actor whose access must be checked. */
|
|
74
|
+
interface GitHubRepositoryAuthorRequest extends GitHubRepositoryRequest {
|
|
75
|
+
author: string;
|
|
76
|
+
}
|
|
77
|
+
/** Repository-scoped fields required to open a pull request from an existing branch. */
|
|
78
|
+
interface CreatePullRequestInput extends GitHubRepositoryRequest {
|
|
79
|
+
title: string;
|
|
80
|
+
head: string;
|
|
81
|
+
base: string;
|
|
82
|
+
body?: string;
|
|
83
|
+
draft?: boolean;
|
|
84
|
+
}
|
|
85
|
+
/** Provider identity returned after GitHub creates a pull request. */
|
|
86
|
+
type CreatedGitHubPullRequest = GitHubPullRequestReference;
|
|
87
|
+
/** Trust threshold applied before Factory consumes an inline review comment. */
|
|
88
|
+
type ReviewCommentAuthorPolicy = "write" | "any";
|
|
89
|
+
interface ReviewCommentTrustInput {
|
|
90
|
+
/** Defaults to `write`. Use `any` only when untrusted review text is handled as data. */
|
|
91
|
+
authorPolicy?: ReviewCommentAuthorPolicy;
|
|
92
|
+
}
|
|
93
|
+
/** Pull request, comment identity, and author policy used to read an inline review comment. */
|
|
94
|
+
interface ReadReviewCommentInput extends GitHubPullRequestTarget, ReviewCommentTrustInput {
|
|
95
|
+
commentId: number;
|
|
96
|
+
}
|
|
97
|
+
/** Normalized inline review comment, with a null author when GitHub no longer exposes it. */
|
|
98
|
+
interface GitHubReviewComment {
|
|
99
|
+
id: number;
|
|
100
|
+
pullRequestNumber: number;
|
|
101
|
+
body: string;
|
|
102
|
+
url: string;
|
|
103
|
+
author: string | null;
|
|
104
|
+
/** GitHub account type when available, used to distinguish human requests from bot activity. */
|
|
105
|
+
authorType: string | null;
|
|
106
|
+
inReplyToId: number | null;
|
|
107
|
+
reviewId: number | null;
|
|
108
|
+
}
|
|
109
|
+
/** Trusted inline comment and reply content used to post a threaded answer. */
|
|
110
|
+
interface AnswerReviewCommentInput extends GitHubPullRequestTarget, ReviewCommentTrustInput {
|
|
111
|
+
commentId: number;
|
|
112
|
+
body: string;
|
|
113
|
+
}
|
|
114
|
+
/** Current branch, commit, and source repository of a pull request head. */
|
|
115
|
+
interface GitHubPullRequestHead {
|
|
116
|
+
branch: string;
|
|
117
|
+
sha: string;
|
|
118
|
+
repository: RepositorySlug;
|
|
119
|
+
}
|
|
120
|
+
/** Provider-owned identity, author, and lifecycle state of a pull request. */
|
|
121
|
+
interface GitHubPullRequest extends GitHubPullRequestReference {
|
|
122
|
+
author: string;
|
|
123
|
+
/** GitHub account type of the author, e.g. "User" or "Bot", when reported. */
|
|
124
|
+
authorType?: string;
|
|
125
|
+
state: "open" | "closed";
|
|
126
|
+
}
|
|
127
|
+
/** GitHub review action submitted with a pull-request review. */
|
|
128
|
+
type PullRequestReviewEvent = "APPROVE" | "REQUEST_CHANGES" | "COMMENT";
|
|
129
|
+
/** One inline finding attached to a submitted pull-request review. */
|
|
130
|
+
interface PullRequestReviewComment {
|
|
131
|
+
path: string;
|
|
132
|
+
startLine?: number;
|
|
133
|
+
line: number;
|
|
134
|
+
body: string;
|
|
135
|
+
}
|
|
136
|
+
/** Commit-fenced summary and inline findings submitted as one review. */
|
|
137
|
+
interface SubmitPullRequestReviewInput extends GitHubPullRequestTarget {
|
|
138
|
+
commitId: string;
|
|
139
|
+
event: PullRequestReviewEvent;
|
|
140
|
+
body: string;
|
|
141
|
+
comments?: readonly PullRequestReviewComment[];
|
|
142
|
+
}
|
|
143
|
+
/** Provider identity and state returned for a submitted pull-request review. */
|
|
144
|
+
interface SubmittedPullRequestReview {
|
|
145
|
+
id: number;
|
|
146
|
+
url: string;
|
|
147
|
+
state: string;
|
|
148
|
+
}
|
|
149
|
+
/** Issue-style PR comment, with null author metadata when GitHub no longer exposes it. */
|
|
150
|
+
interface GitHubIssueComment {
|
|
151
|
+
id: number;
|
|
152
|
+
body: string;
|
|
153
|
+
url: string;
|
|
154
|
+
author: string | null;
|
|
155
|
+
authorType: "Bot" | "User" | "Organization" | null;
|
|
156
|
+
}
|
|
157
|
+
/** Inline discussion entry with its review and source location, including replies. */
|
|
158
|
+
interface GitHubPullRequestDiscussionComment extends GitHubReviewComment {
|
|
159
|
+
path: string;
|
|
160
|
+
line: number | null;
|
|
161
|
+
}
|
|
162
|
+
/** Existing PR verdict, retaining null author or commit metadata when unavailable on GitHub. */
|
|
163
|
+
interface GitHubPullRequestDiscussionReview extends SubmittedPullRequestReview {
|
|
164
|
+
author: string | null;
|
|
165
|
+
body: string;
|
|
166
|
+
commitId: string | null;
|
|
167
|
+
}
|
|
168
|
+
/** One bounded page of untrusted PR conversation, inline comments, and prior verdicts. */
|
|
169
|
+
interface GitHubPullRequestDiscussionPage {
|
|
170
|
+
comments: readonly GitHubIssueComment[];
|
|
171
|
+
reviewComments: readonly GitHubPullRequestDiscussionComment[];
|
|
172
|
+
reviews: readonly GitHubPullRequestDiscussionReview[];
|
|
173
|
+
nextPage: number | null;
|
|
174
|
+
}
|
|
175
|
+
/** Pull request and one-based discussion page to read; each collection returns up to 50 entries. */
|
|
176
|
+
interface ListPullRequestDiscussionInput extends GitHubPullRequestTarget {
|
|
177
|
+
page?: number;
|
|
178
|
+
}
|
|
179
|
+
/** Repository and pull request whose issue-style comments should be listed. */
|
|
180
|
+
type ListPullRequestCommentsInput = GitHubPullRequestTarget;
|
|
181
|
+
/** Pull-request conversation and body for a new issue-style comment. */
|
|
182
|
+
interface CreatePullRequestCommentInput extends ListPullRequestCommentsInput {
|
|
183
|
+
body: string;
|
|
184
|
+
}
|
|
185
|
+
/** Existing issue-style comment and replacement body to persist. */
|
|
186
|
+
interface UpdatePullRequestCommentInput extends GitHubRepositoryRequest {
|
|
187
|
+
commentId: number;
|
|
188
|
+
body: string;
|
|
189
|
+
}
|
|
190
|
+
/** Pull request and label targeted by a metadata-only label operation. */
|
|
191
|
+
interface PullRequestLabelInput extends GitHubPullRequestTarget {
|
|
192
|
+
label: string;
|
|
193
|
+
}
|
|
194
|
+
/** Repository label to create when absent, retaining any existing color and description. */
|
|
195
|
+
interface EnsureGitHubLabelInput extends GitHubRepositoryRequest {
|
|
196
|
+
name: string;
|
|
197
|
+
color: string;
|
|
198
|
+
description: string;
|
|
199
|
+
}
|
|
200
|
+
/** Open Factory-authored pull request GitHub currently reports as conflicted. */
|
|
201
|
+
interface ConflictedGitHubPullRequest extends GitHubPullRequestReference {
|
|
202
|
+
headBranch: string;
|
|
203
|
+
headSha: string;
|
|
204
|
+
baseBranch: string;
|
|
205
|
+
baseSha: string;
|
|
206
|
+
}
|
|
207
|
+
/** Repository scope used to discover conflicted Factory-authored pull requests. */
|
|
208
|
+
type ListConflictedPullRequestsInput = GitHubRepositoryRequest;
|
|
209
|
+
/** Repository scope used to enumerate open pull requests. */
|
|
210
|
+
type ListOpenPullRequestsInput = GitHubRepositoryRequest;
|
|
211
|
+
/** Nonterminal lifecycle states Factory may write to a GitHub check run. */
|
|
212
|
+
type CheckRunProgressStatus = "queued" | "in_progress";
|
|
213
|
+
/** Lifecycle states GitHub may report when observing a check run. */
|
|
214
|
+
type ObservedCheckRunStatus = CheckRunProgressStatus | "completed" | "waiting" | "requested" | "pending";
|
|
215
|
+
/** Terminal result GitHub records for a completed check run. */
|
|
216
|
+
type CheckRunConclusion = "action_required" | "cancelled" | "failure" | "neutral" | "skipped" | "success" | "timed_out";
|
|
217
|
+
/** Severity GitHub displays for a check-run annotation. */
|
|
218
|
+
type CheckRunAnnotationLevel = "notice" | "warning" | "failure";
|
|
219
|
+
/** One source location and message rendered in a check run. */
|
|
220
|
+
interface CheckRunAnnotation {
|
|
221
|
+
path: string;
|
|
222
|
+
startLine: number;
|
|
223
|
+
endLine?: number;
|
|
224
|
+
startColumn?: number;
|
|
225
|
+
endColumn?: number;
|
|
226
|
+
annotationLevel: CheckRunAnnotationLevel;
|
|
227
|
+
message: string;
|
|
228
|
+
title?: string;
|
|
229
|
+
rawDetails?: string;
|
|
230
|
+
}
|
|
231
|
+
/** Human-readable summary and optional annotations attached to a check run. */
|
|
232
|
+
interface CheckRunOutput {
|
|
233
|
+
title: string;
|
|
234
|
+
summary: string;
|
|
235
|
+
text?: string;
|
|
236
|
+
annotations?: readonly CheckRunAnnotation[];
|
|
237
|
+
}
|
|
238
|
+
interface CheckRunPresentationFields {
|
|
239
|
+
detailsUrl?: string;
|
|
240
|
+
externalId?: string;
|
|
241
|
+
startedAt?: string;
|
|
242
|
+
output?: CheckRunOutput;
|
|
243
|
+
}
|
|
244
|
+
/** Writable fields for a queued, running, or presentation-only check-run update. */
|
|
245
|
+
interface IncompleteCheckRunFields extends CheckRunPresentationFields {
|
|
246
|
+
status?: CheckRunProgressStatus;
|
|
247
|
+
conclusion?: never;
|
|
248
|
+
completedAt?: never;
|
|
249
|
+
}
|
|
250
|
+
/** Writable fields for a terminal check run, which always requires its conclusion. */
|
|
251
|
+
interface CompletedCheckRunFields extends CheckRunPresentationFields {
|
|
252
|
+
status: "completed";
|
|
253
|
+
conclusion: CheckRunConclusion;
|
|
254
|
+
completedAt?: string;
|
|
255
|
+
}
|
|
256
|
+
/** Lifecycle-correlated fields accepted when creating or updating a check run. */
|
|
257
|
+
type CheckRunFields = IncompleteCheckRunFields | CompletedCheckRunFields;
|
|
258
|
+
/** Commit identity and presentation fields for a new check run. */
|
|
259
|
+
type CreateCheckRunInput = GitHubRepositoryRequest & CheckRunFields & {
|
|
260
|
+
name: string;
|
|
261
|
+
headSha: string;
|
|
262
|
+
};
|
|
263
|
+
/** Check-run identity and fields to update on GitHub. */
|
|
264
|
+
type UpdateCheckRunInput = GitHubRepositoryRequest & CheckRunFields & {
|
|
265
|
+
checkRunId: number;
|
|
266
|
+
name?: string;
|
|
267
|
+
};
|
|
268
|
+
/** Git reference and optional name filter used to discover existing check runs. */
|
|
269
|
+
interface ListCheckRunsForRefInput extends GitHubRepositoryRequest {
|
|
270
|
+
ref: string;
|
|
271
|
+
checkName?: string;
|
|
272
|
+
}
|
|
273
|
+
/** Normalized identity, lifecycle, and links for a GitHub check run. */
|
|
274
|
+
interface GitHubCheckRun {
|
|
275
|
+
id: number;
|
|
276
|
+
name: string;
|
|
277
|
+
headSha: string;
|
|
278
|
+
status: ObservedCheckRunStatus;
|
|
279
|
+
conclusion: CheckRunConclusion | "stale" | "startup_failure" | null;
|
|
280
|
+
url: string | null;
|
|
281
|
+
detailsUrl: string | null;
|
|
282
|
+
externalId: string | null;
|
|
283
|
+
startedAt: string | null;
|
|
284
|
+
completedAt: string | null;
|
|
285
|
+
}
|
|
286
|
+
/** Refusal raised when an inline review-comment author lacks repository write access. */
|
|
287
|
+
declare class GitHubReviewCommentAuthorError extends Error {
|
|
288
|
+
readonly author: string | null;
|
|
289
|
+
constructor(author: string | null);
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* The pull request advanced past the commit a review or fix was prepared
|
|
293
|
+
* against. Callers that reviewed a task keyed to a specific commit (for
|
|
294
|
+
* example `record_post_review`) can use `expectedSha`/`actualSha` to resolve
|
|
295
|
+
* the task as superseded instead of leaving it running for the stall
|
|
296
|
+
* watchdog to eventually -- and misleadingly -- report as "stalled".
|
|
297
|
+
*/
|
|
298
|
+
declare class StalePullRequestHeadError extends Error {
|
|
299
|
+
readonly expectedSha: string;
|
|
300
|
+
readonly actualSha: string;
|
|
301
|
+
constructor(expectedSha: string, actualSha: string);
|
|
302
|
+
}
|
|
303
|
+
/** Whether a GitHub user may make repository-scoped Factory decisions. */
|
|
304
|
+
declare function hasGitHubRepositoryWriteAccess(input: GitHubRepositoryAuthorRequest): Promise<boolean>;
|
|
305
|
+
/** Create a pull request from an existing head branch. */
|
|
306
|
+
declare function createPullRequest(input: CreatePullRequestInput): Promise<CreatedGitHubPullRequest>;
|
|
307
|
+
/** Create a check run for one commit. Requires a GitHub App token with checks:write. */
|
|
308
|
+
declare function createCheckRun(input: CreateCheckRunInput): Promise<GitHubCheckRun>;
|
|
309
|
+
/** Update a check run previously created by the authenticated GitHub App. */
|
|
310
|
+
declare function updateCheckRun(input: UpdateCheckRunInput): Promise<GitHubCheckRun>;
|
|
311
|
+
/** List check runs reported for a commit, branch, or tag. */
|
|
312
|
+
declare function listCheckRunsForRef(input: ListCheckRunsForRefInput): Promise<readonly GitHubCheckRun[]>;
|
|
313
|
+
/** List every issue-style comment in a pull request conversation. */
|
|
314
|
+
declare function listPullRequestComments(input: ListPullRequestCommentsInput): Promise<readonly GitHubIssueComment[]>;
|
|
315
|
+
/** Read a page of all PR discussion types without treating any author's text as authorization. */
|
|
316
|
+
declare function listPullRequestDiscussion(input: ListPullRequestDiscussionInput): Promise<GitHubPullRequestDiscussionPage>;
|
|
317
|
+
/** Add one issue-style comment to a pull request conversation. */
|
|
318
|
+
declare function createPullRequestComment(input: CreatePullRequestCommentInput): Promise<GitHubIssueComment>;
|
|
319
|
+
/** Edit one issue-style pull request comment. */
|
|
320
|
+
declare function updatePullRequestComment(input: UpdatePullRequestCommentInput): Promise<GitHubIssueComment>;
|
|
321
|
+
/** One issue comment as GitHub reports it, with the issue it belongs to. */
|
|
322
|
+
interface GitHubIssueCommentRecord extends GitHubIssueComment {
|
|
323
|
+
issueNumber: number;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Read one issue comment from GitHub. A delivery authenticated as a workload
|
|
327
|
+
* rather than by body signature can name any author and any text, so the
|
|
328
|
+
* comment it refers to has to be read back before either is believed.
|
|
329
|
+
*/
|
|
330
|
+
declare function readIssueComment(input: GitHubRepositoryRequest & {
|
|
331
|
+
commentId: number;
|
|
332
|
+
}): Promise<GitHubIssueCommentRecord>;
|
|
333
|
+
/** Read one inline review comment after applying the author policy, which requires write access by default. */
|
|
334
|
+
declare function readReviewComment(input: ReadReviewCommentInput): Promise<GitHubReviewComment>;
|
|
335
|
+
/** Reply to an inline review comment after applying the author policy, which requires write access by default. */
|
|
336
|
+
declare function answerReviewComment(input: AnswerReviewCommentInput): Promise<GitHubReviewComment>;
|
|
337
|
+
/** Submit a summary and optional inline comments against a reviewed pull request commit. */
|
|
338
|
+
declare function submitPullRequestReview(input: SubmitPullRequestReviewInput): Promise<SubmittedPullRequestReview>;
|
|
339
|
+
/** Read the current head branch and commit of a pull request. */
|
|
340
|
+
declare function readPullRequestHead(input: GitHubPullRequestTarget): Promise<GitHubPullRequestHead>;
|
|
341
|
+
/** Read the provider-owned identity and lifecycle of one pull request. */
|
|
342
|
+
declare function readPullRequest(input: GitHubPullRequestTarget): Promise<GitHubPullRequest>;
|
|
343
|
+
/** Close an open pull request without merging it. */
|
|
344
|
+
declare function closePullRequest(input: GitHubPullRequestTarget): Promise<GitHubPullRequest>;
|
|
345
|
+
/** List open, same-repository pull requests by one author that GitHub reports as conflicting. */
|
|
346
|
+
declare function listConflictedPullRequests(input: ListConflictedPullRequestsInput): Promise<readonly ConflictedGitHubPullRequest[]>;
|
|
347
|
+
/** List open pull requests in a repository, newest first, to check for existing work before triage. */
|
|
348
|
+
declare function listOpenPullRequests(input: ListOpenPullRequestsInput): Promise<readonly OpenPullRequest[]>;
|
|
349
|
+
/** Ensure a repository label exists, including when another publisher creates it concurrently. */
|
|
350
|
+
declare function ensureGitHubLabel(input: EnsureGitHubLabelInput): Promise<void>;
|
|
351
|
+
/** Add one label to a pull request. */
|
|
352
|
+
declare function addLabel(input: PullRequestLabelInput): Promise<readonly string[]>;
|
|
353
|
+
/** Remove one label from a pull request. */
|
|
354
|
+
declare function removeLabel(input: PullRequestLabelInput): Promise<readonly string[]>;
|
|
355
|
+
/** Raw payload, shared secret, and provider signature used for webhook verification. */
|
|
356
|
+
interface VerifyGitHubSignatureInput {
|
|
357
|
+
secret: string;
|
|
358
|
+
payload: string;
|
|
359
|
+
signature: string | null;
|
|
360
|
+
}
|
|
361
|
+
/**
|
|
362
|
+
* Verify a GitHub webhook HMAC signature (the x-hub-signature-256 header)
|
|
363
|
+
* against the raw request body. Returns false for missing or malformed
|
|
364
|
+
* signatures instead of throwing.
|
|
365
|
+
*/
|
|
366
|
+
declare function verifyGitHubSignature(options: VerifyGitHubSignatureInput): boolean;
|
|
367
|
+
/** Normalized observation that a repository's configured default branch advanced. */
|
|
368
|
+
interface GitHubDefaultBranchPush {
|
|
369
|
+
source: "github_default_branch_push";
|
|
370
|
+
deliveryId: string;
|
|
371
|
+
repositorySlug: RepositorySlug;
|
|
372
|
+
defaultBranch: string;
|
|
373
|
+
}
|
|
374
|
+
/** Normalize a push to a repository's default branch for deterministic reconciliation. */
|
|
375
|
+
declare function normalizeGitHubDefaultBranchPush(options: WebhookEvent): GitHubDefaultBranchPush | null;
|
|
376
|
+
/** Reviewable pull-request webhook normalized for Factory intake. */
|
|
377
|
+
interface GitHubPullRequestSignal extends NormalizedSignal<"github_pr"> {
|
|
378
|
+
repositorySlug: RepositorySlug;
|
|
379
|
+
pullRequest: {
|
|
380
|
+
pullRequestNumber: number;
|
|
381
|
+
pullRequestUrl: string;
|
|
382
|
+
author: string;
|
|
383
|
+
draft: boolean;
|
|
384
|
+
headSha: string;
|
|
385
|
+
headBranch: string;
|
|
386
|
+
headRepositorySlug: RepositorySlug;
|
|
387
|
+
baseSha: string;
|
|
388
|
+
baseBranch: string;
|
|
389
|
+
sender: string;
|
|
390
|
+
};
|
|
391
|
+
}
|
|
392
|
+
/** Normalize a newly reviewable or updated pull request into a factory signal. */
|
|
393
|
+
declare function normalizeGitHubPullRequest(options: WebhookEvent): GitHubPullRequestSignal | null;
|
|
394
|
+
/** Opened GitHub issue normalized for Factory intake. */
|
|
395
|
+
interface GitHubIssueSignal extends NormalizedSignal<"github_issue"> {
|
|
396
|
+
repositorySlug: RepositorySlug;
|
|
397
|
+
issue: {
|
|
398
|
+
number: number;
|
|
399
|
+
title: string;
|
|
400
|
+
body: string | null;
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
/** Unsuccessful GitHub Actions run normalized for Factory intake. */
|
|
404
|
+
interface GitHubCiFailureSignal extends NormalizedSignal<"github_ci_failure"> {
|
|
405
|
+
repositoryDefaultBranch: string;
|
|
406
|
+
repositorySlug: RepositorySlug;
|
|
407
|
+
workflowRun: {
|
|
408
|
+
id: number;
|
|
409
|
+
name: string;
|
|
410
|
+
trigger: string;
|
|
411
|
+
branch: string | null;
|
|
412
|
+
headRepositorySlug: RepositorySlug | null;
|
|
413
|
+
headSha: string;
|
|
414
|
+
url: string;
|
|
415
|
+
conclusion: string;
|
|
416
|
+
attempt: number;
|
|
417
|
+
};
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* Normalize a GitHub issues webhook into the factory's signal shape. Returns
|
|
421
|
+
* null for payloads that are not an opened issue. The caller supplies the
|
|
422
|
+
* repository id; the payload stays untrusted data.
|
|
423
|
+
*/
|
|
424
|
+
declare function normalizeGitHubIssueOpened(options: WebhookEvent): GitHubIssueSignal | null;
|
|
425
|
+
/** Normalized provider observation that a pull request was merged or closed. */
|
|
426
|
+
interface GitHubPullRequestClosed extends GitHubPullRequestReference {
|
|
427
|
+
source: "github_pull_request_closed";
|
|
428
|
+
deliveryId: string;
|
|
429
|
+
repositorySlug: RepositorySlug;
|
|
430
|
+
merged: boolean;
|
|
431
|
+
/** The merge commit on the base branch; null when closed without merging. */
|
|
432
|
+
mergeCommitSha: string | null;
|
|
433
|
+
/** The GitHub login that merged the pull request, or closed it without merging. */
|
|
434
|
+
decidedBy: string;
|
|
435
|
+
}
|
|
436
|
+
/**
|
|
437
|
+
* Normalize a closed pull_request webhook so the factory can observe what
|
|
438
|
+
* happened to its change: merged records merged_by (the sender when GitHub
|
|
439
|
+
* omits it), a close without merge records the sender.
|
|
440
|
+
*/
|
|
441
|
+
declare function normalizeGitHubPullRequestClosed(options: WebhookEvent): GitHubPullRequestClosed | null;
|
|
442
|
+
/** Normalize a completed, unsuccessful GitHub Actions run into a CI failure signal. */
|
|
443
|
+
declare function normalizeGitHubWorkflowRunFailure(options: WebhookEvent): GitHubCiFailureSignal | null;
|
|
444
|
+
//#endregion
|
|
445
|
+
export { AnswerReviewCommentInput, CheckRunAnnotation, CheckRunAnnotationLevel, CheckRunConclusion, CheckRunFields, CheckRunOutput, CheckRunProgressStatus, type CheckoutGitHubRepositoryInput, type CommittedGitChange, CompletedCheckRunFields, ConfiguredEventRepositoryInput, ConflictedGitHubPullRequest, CreateCheckRunInput, type CreateGitHubBranchInput, type CreateGitHubCommitInput, type CreateGitHubPublicationPullRequestInput, type CreateGitHubTreeInput, CreatePullRequestCommentInput, CreatePullRequestInput, type CreatedGitHubPublicationPullRequest, CreatedGitHubPullRequest, EnsureGitHubLabelInput, FactoryMentionOptions, FactoryQuestionReply, FactoryReviewComment, type FetchGitHubBundleInput, type FetchGitHubRefsInput, type GitHubAppFactoryInput, type GitHubAppInstallationToken, type GitHubAppLike, type GitHubAppPermissions, GitHubCheckRun, GitHubCheckoutConflictError, GitHubCiFailureSignal, type GitHubCommit, GitHubDefaultBranchPush, type GitHubGitTransport, GitHubIssueComment, GitHubIssueCommentRecord, GitHubIssueSignal, GitHubPublicationApiError, type GitHubPublicationClient, type GitHubPublicationClientOptions, type GitHubPublicationLimits, type GitHubPublicationPullRequest, GitHubPullRequest, GitHubPullRequestClosed, GitHubPullRequestDiscussionComment, GitHubPullRequestDiscussionPage, GitHubPullRequestDiscussionReview, GitHubPullRequestHead, GitHubPullRequestReference, GitHubPullRequestSignal, GitHubPullRequestTarget, type GitHubRefMapping, GitHubRepositoryAuthorRequest, type GitHubRepositoryBundle, GitHubRepositoryRequest, GitHubReviewComment, GitHubReviewCommentAuthorError, type GitHubTreeDeletion, type GitHubTreeEntry, type GitHubTreeUpsert, type GitTransferSandbox, IncompleteCheckRunFields, ListCheckRunsForRefInput, ListConflictedPullRequestsInput, type ListGitHubPublicationPullRequestsInput, ListOpenPullRequestsInput, ListPullRequestCommentsInput, ListPullRequestDiscussionInput, type MarkGitHubPullRequestReadyInput, type MintGitHubAppInstallationTokenInput, NormalizeFactoryCommentInput, NormalizeFactoryReviewCommentInput, ObservedCheckRunStatus, PullRequestLabelInput, PullRequestReviewComment, PullRequestReviewEvent, type PushGitHubBundleInput, type PushGitHubHeadInput, type ReadCommittedGitChangeInput, type ReadGitHubBranchHeadInput, type ReadGitHubCommitInput, type ReadGitHubPullRequestInput, type ReadGitTransferFileInput, ReadReviewCommentInput, ReviewCommentAuthorPolicy, type RunSandboxGitInput, type SandboxGit, type SandboxGitCommandInput, type SandboxGitCommandResult, StalePullRequestHeadError, SubmitPullRequestReviewInput, SubmittedPullRequestReview, UpdateCheckRunInput, type UpdateGitHubBranchInput, UpdatePullRequestCommentInput, VerifyGitHubSignatureInput, type WithSandboxGitBundleInput, type WriteGitTransferFileInput, addLabel, answerReviewComment, checkoutGitHubRepository, closePullRequest, configuredEventRepositorySlug, createCheckRun, createGitHubPublicationClient, createPullRequest, createPullRequestComment, ensureGitHubLabel, factorySessionBranch, factoryTaskBranch, hasGitHubRepositoryWriteAccess, isSafeGitRef, listCheckRunsForRef, listConflictedPullRequests, listOpenPullRequests, listPullRequestComments, listPullRequestDiscussion, mintGitHubAppInstallationToken, normalizeFactoryQuestionReply, normalizeFactoryReviewComment, normalizeGitHubDefaultBranchPush, normalizeGitHubIssueOpened, normalizeGitHubPullRequest, normalizeGitHubPullRequestClosed, normalizeGitHubWorkflowRunFailure, readCommittedGitChange, readIssueComment, readPullRequest, readPullRequestHead, readReviewComment, removeLabel, runSandboxGit, stripFactoryQuestionMention, submitPullRequestReview, updateCheckRun, updatePullRequestComment, verifyGitHubSignature };
|
|
446
|
+
//# sourceMappingURL=github.d.mts.map
|