@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
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/agent-route.d.ts
|
|
3
|
+
/** Validates an exact agent-route identity used for lookup and persisted recovery. */
|
|
4
|
+
declare const agentRouteBindingSchema: z.core.$ZodBranded<z.ZodObject<{
|
|
5
|
+
id: z.ZodString;
|
|
6
|
+
version: z.ZodNumber;
|
|
7
|
+
}, z.core.$strict>, "AgentRouteBinding", "out">;
|
|
8
|
+
/** Exact identifier and version selecting one registered agent route. */
|
|
9
|
+
type AgentRouteBinding<Id extends string = string, Version extends number = number> = z.infer<typeof agentRouteBindingSchema> & {
|
|
10
|
+
readonly id: Id;
|
|
11
|
+
readonly version: Version;
|
|
12
|
+
};
|
|
13
|
+
/** Plain identifier and version accepted when constructing an agent-route binding. */
|
|
14
|
+
interface AgentRouteBindingInput<Id extends string = string, Version extends number = number> {
|
|
15
|
+
readonly id: Id;
|
|
16
|
+
readonly version: Version;
|
|
17
|
+
}
|
|
18
|
+
/** Validates and brands an exact agent-route binding while preserving literal identity. */
|
|
19
|
+
declare function parseAgentRouteBinding<const Input extends AgentRouteBindingInput>(input: Input): AgentRouteBinding<Input["id"], Input["version"]>;
|
|
20
|
+
//#endregion
|
|
21
|
+
export { AgentRouteBinding, AgentRouteBindingInput, agentRouteBindingSchema, parseAgentRouteBinding };
|
|
22
|
+
//# sourceMappingURL=agent-route.d.mts.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/agent-route.ts
|
|
3
|
+
/** Validates an exact agent-route identity used for lookup and persisted recovery. */
|
|
4
|
+
const agentRouteBindingSchema = z.strictObject({
|
|
5
|
+
id: z.string().regex(/^[a-z][a-z0-9-]{0,63}$/u).describe("Stable route identifier selected by a workflow."),
|
|
6
|
+
version: z.number().int().positive().describe("Exact positive version of the selected route.")
|
|
7
|
+
}).describe("Exact agent-route identity; lookup never defaults or selects a latest version.").brand();
|
|
8
|
+
/** Validates and brands an exact agent-route binding while preserving literal identity. */
|
|
9
|
+
function parseAgentRouteBinding(input) {
|
|
10
|
+
return agentRouteBindingSchema.parse(input);
|
|
11
|
+
}
|
|
12
|
+
//#endregion
|
|
13
|
+
export { agentRouteBindingSchema, parseAgentRouteBinding };
|
|
14
|
+
|
|
15
|
+
//# sourceMappingURL=agent-route.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agent-route.mjs","names":[],"sources":["../../src/schema/agent-route.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/** Validates an exact agent-route identity used for lookup and persisted recovery. */\nexport const agentRouteBindingSchema = z\n .strictObject({\n id: z\n .string()\n .regex(/^[a-z][a-z0-9-]{0,63}$/u)\n .describe(\"Stable route identifier selected by a workflow.\"),\n version: z.number().int().positive().describe(\"Exact positive version of the selected route.\"),\n })\n .describe(\"Exact agent-route identity; lookup never defaults or selects a latest version.\")\n .brand<\"AgentRouteBinding\">();\n\n/** Exact identifier and version selecting one registered agent route. */\nexport type AgentRouteBinding<\n Id extends string = string,\n Version extends number = number,\n> = z.infer<typeof agentRouteBindingSchema> & {\n readonly id: Id;\n readonly version: Version;\n};\n\n/** Plain identifier and version accepted when constructing an agent-route binding. */\nexport interface AgentRouteBindingInput<\n Id extends string = string,\n Version extends number = number,\n> {\n readonly id: Id;\n readonly version: Version;\n}\n\n/** Validates and brands an exact agent-route binding while preserving literal identity. */\nexport function parseAgentRouteBinding<const Input extends AgentRouteBindingInput>(\n input: Input,\n): AgentRouteBinding<Input[\"id\"], Input[\"version\"]> {\n return agentRouteBindingSchema.parse(input) as AgentRouteBinding<Input[\"id\"], Input[\"version\"]>;\n}\n"],"mappings":";;;AAGA,MAAa,0BAA0B,EACpC,aAAa;CACZ,IAAI,EACD,OAAO,CAAC,CACR,MAAM,yBAAyB,CAAC,CAChC,SAAS,iDAAiD;CAC7D,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,+CAA+C;AAC/F,CAAC,CAAC,CACD,SAAS,gFAAgF,CAAC,CAC1F,MAA2B;;AAqB9B,SAAgB,uBACd,OACkD;CAClD,OAAO,wBAAwB,MAAM,KAAK;AAC5C"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/answer.d.ts
|
|
3
|
+
/** Validates an immutable authenticated answer to a workflow QuestionTask. */
|
|
4
|
+
declare const answerEventSchema: z.ZodObject<{
|
|
5
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
6
|
+
id: z.ZodType<`ans_${string}`, string, z.core.$ZodTypeInternals<`ans_${string}`, string>>;
|
|
7
|
+
questionTaskId: z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>;
|
|
8
|
+
parentTaskId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
9
|
+
repositoryIds: z.ZodReadonly<z.ZodTuple<[z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>], z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>>>;
|
|
10
|
+
replyTo: z.ZodObject<{
|
|
11
|
+
channel: z.ZodString;
|
|
12
|
+
address: z.ZodString;
|
|
13
|
+
}, z.core.$strict>;
|
|
14
|
+
question: z.ZodString;
|
|
15
|
+
answer: z.ZodString;
|
|
16
|
+
answeredBy: z.ZodString;
|
|
17
|
+
recordedAt: z.ZodISODateTime;
|
|
18
|
+
}, z.core.$strict>;
|
|
19
|
+
/** Immutable authenticated answer projected onto a question and its parent Task. */
|
|
20
|
+
type AnswerEvent = z.infer<typeof answerEventSchema>;
|
|
21
|
+
//#endregion
|
|
22
|
+
export { AnswerEvent, answerEventSchema };
|
|
23
|
+
//# sourceMappingURL=answer.d.mts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { answerIdSchema, repositoryIdsSchema, taskIdSchema } from "./id.mjs";
|
|
2
|
+
import { isoDateTimeSchema, replyToSchema, schemaVersionSchema } from "./common.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/schema/answer.ts
|
|
5
|
+
/** Validates an immutable authenticated answer to a workflow QuestionTask. */
|
|
6
|
+
const answerEventSchema = z.strictObject({
|
|
7
|
+
schemaVersion: schemaVersionSchema,
|
|
8
|
+
id: answerIdSchema,
|
|
9
|
+
questionTaskId: taskIdSchema,
|
|
10
|
+
parentTaskId: taskIdSchema.optional(),
|
|
11
|
+
repositoryIds: repositoryIdsSchema,
|
|
12
|
+
replyTo: replyToSchema,
|
|
13
|
+
question: z.string().min(1),
|
|
14
|
+
answer: z.string().min(1).max(4e3),
|
|
15
|
+
answeredBy: z.string().min(1),
|
|
16
|
+
recordedAt: isoDateTimeSchema
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { answerEventSchema };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=answer.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"answer.mjs","names":[],"sources":["../../src/schema/answer.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { isoDateTimeSchema, replyToSchema, schemaVersionSchema } from \"./common\";\nimport { answerIdSchema, repositoryIdsSchema, taskIdSchema } from \"./id\";\n\n/** Validates an immutable authenticated answer to a workflow QuestionTask. */\nexport const answerEventSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: answerIdSchema,\n questionTaskId: taskIdSchema,\n parentTaskId: taskIdSchema.optional(),\n repositoryIds: repositoryIdsSchema,\n replyTo: replyToSchema,\n question: z.string().min(1),\n answer: z.string().min(1).max(4000),\n answeredBy: z.string().min(1),\n recordedAt: isoDateTimeSchema,\n});\n\n/** Immutable authenticated answer projected onto a question and its parent Task. */\nexport type AnswerEvent = z.infer<typeof answerEventSchema>;\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,EAAE,aAAa;CAC9C,eAAe;CACf,IAAI;CACJ,gBAAgB;CAChB,cAAc,aAAa,SAAS;CACpC,eAAe;CACf,SAAS;CACT,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC1B,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,GAAI;CAClC,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CAC5B,YAAY;AACd,CAAC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/budget.d.ts
|
|
3
|
+
/** UTC calendar month key in `YYYY-MM` form. */
|
|
4
|
+
type BudgetMonth = `${number}-${"01" | "02" | "03" | "04" | "05" | "06" | "07" | "08" | "09" | "10" | "11" | "12"}`;
|
|
5
|
+
/** Validates the UTC calendar month key used for a Factory budget. */
|
|
6
|
+
declare const budgetMonthSchema: z.ZodType<BudgetMonth, string>;
|
|
7
|
+
/** Validates Factory-wide, investigative, per-Task, and optional repository spending limits. */
|
|
8
|
+
declare const budgetLimitsSchema: z.ZodReadonly<z.ZodObject<{
|
|
9
|
+
totalUsd: z.ZodNumber;
|
|
10
|
+
investigationUsd: z.ZodNumber;
|
|
11
|
+
perTaskReservationUsd: z.ZodNumber;
|
|
12
|
+
warningPercent: z.ZodNumber;
|
|
13
|
+
perRepositoryUsd: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>, z.ZodNumber>>>;
|
|
14
|
+
}, z.core.$strict>>;
|
|
15
|
+
/** Validates one persisted monthly Factory budget and its emitted-notice state. */
|
|
16
|
+
declare const budgetSchema: z.ZodReadonly<z.ZodObject<{
|
|
17
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
18
|
+
factoryId: z.ZodType<`fac_${string}`, string, z.core.$ZodTypeInternals<`fac_${string}`, string>>;
|
|
19
|
+
month: z.ZodType<`${number}-01` | `${number}-02` | `${number}-03` | `${number}-04` | `${number}-05` | `${number}-06` | `${number}-07` | `${number}-08` | `${number}-09` | `${number}-10` | `${number}-11` | `${number}-12`, string, z.core.$ZodTypeInternals<`${number}-01` | `${number}-02` | `${number}-03` | `${number}-04` | `${number}-05` | `${number}-06` | `${number}-07` | `${number}-08` | `${number}-09` | `${number}-10` | `${number}-11` | `${number}-12`, string>>;
|
|
20
|
+
limits: z.ZodReadonly<z.ZodObject<{
|
|
21
|
+
totalUsd: z.ZodNumber;
|
|
22
|
+
investigationUsd: z.ZodNumber;
|
|
23
|
+
perTaskReservationUsd: z.ZodNumber;
|
|
24
|
+
warningPercent: z.ZodNumber;
|
|
25
|
+
perRepositoryUsd: z.ZodOptional<z.ZodReadonly<z.ZodRecord<z.ZodType<`${string}/${string}`, string, z.core.$ZodTypeInternals<`${string}/${string}`, string>>, z.ZodNumber>>>;
|
|
26
|
+
}, z.core.$strict>>;
|
|
27
|
+
notices: z.ZodReadonly<z.ZodObject<{
|
|
28
|
+
warningAt: z.ZodOptional<z.ZodISODateTime>;
|
|
29
|
+
exhaustedAt: z.ZodOptional<z.ZodISODateTime>;
|
|
30
|
+
}, z.core.$strict>>;
|
|
31
|
+
}, z.core.$strict>>;
|
|
32
|
+
/** Spending limits and warning threshold enforced for a monthly Factory budget. */
|
|
33
|
+
type BudgetLimits = z.infer<typeof budgetLimitsSchema>;
|
|
34
|
+
/** Persisted monthly Factory budget configuration and notice state. */
|
|
35
|
+
type Budget = z.infer<typeof budgetSchema>;
|
|
36
|
+
//#endregion
|
|
37
|
+
export { Budget, BudgetLimits, BudgetMonth, budgetLimitsSchema, budgetMonthSchema, budgetSchema };
|
|
38
|
+
//# sourceMappingURL=budget.d.mts.map
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { factoryIdSchema } from "./id.mjs";
|
|
2
|
+
import { isoDateTimeSchema, schemaVersionSchema, usdSchema } from "./common.mjs";
|
|
3
|
+
import { repositorySlugSchema } from "./repository.mjs";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
//#region src/schema/budget.ts
|
|
6
|
+
/** Validates the UTC calendar month key used for a Factory budget. */
|
|
7
|
+
const budgetMonthSchema = z.string().regex(/^\d{4}-(0[1-9]|1[0-2])$/u, "Expected a UTC calendar month in YYYY-MM form");
|
|
8
|
+
/** Validates Factory-wide, investigative, per-Task, and optional repository spending limits. */
|
|
9
|
+
const budgetLimitsSchema = z.strictObject({
|
|
10
|
+
totalUsd: usdSchema,
|
|
11
|
+
investigationUsd: usdSchema,
|
|
12
|
+
perTaskReservationUsd: usdSchema,
|
|
13
|
+
warningPercent: z.number().int().min(1).max(100),
|
|
14
|
+
perRepositoryUsd: z.record(repositorySlugSchema, usdSchema).readonly().optional()
|
|
15
|
+
}).readonly();
|
|
16
|
+
/** Validates one persisted monthly Factory budget and its emitted-notice state. */
|
|
17
|
+
const budgetSchema = z.strictObject({
|
|
18
|
+
schemaVersion: schemaVersionSchema,
|
|
19
|
+
factoryId: factoryIdSchema,
|
|
20
|
+
month: budgetMonthSchema,
|
|
21
|
+
limits: budgetLimitsSchema,
|
|
22
|
+
notices: z.strictObject({
|
|
23
|
+
warningAt: isoDateTimeSchema.optional(),
|
|
24
|
+
exhaustedAt: isoDateTimeSchema.optional()
|
|
25
|
+
}).readonly()
|
|
26
|
+
}).readonly();
|
|
27
|
+
//#endregion
|
|
28
|
+
export { budgetLimitsSchema, budgetMonthSchema, budgetSchema };
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=budget.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"budget.mjs","names":[],"sources":["../../src/schema/budget.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { isoDateTimeSchema, schemaVersionSchema, usdSchema } from \"./common\";\nimport { factoryIdSchema } from \"./id\";\nimport { repositorySlugSchema } from \"./repository\";\n\n/** UTC calendar month key in `YYYY-MM` form. */\nexport type BudgetMonth = `${number}-${\n | \"01\"\n | \"02\"\n | \"03\"\n | \"04\"\n | \"05\"\n | \"06\"\n | \"07\"\n | \"08\"\n | \"09\"\n | \"10\"\n | \"11\"\n | \"12\"}`;\n\n/** Validates the UTC calendar month key used for a Factory budget. */\nexport const budgetMonthSchema = z\n .string()\n .regex(/^\\d{4}-(0[1-9]|1[0-2])$/u, \"Expected a UTC calendar month in YYYY-MM form\") as z.ZodType<\n BudgetMonth,\n string\n>;\n\n/** Validates Factory-wide, investigative, per-Task, and optional repository spending limits. */\nexport const budgetLimitsSchema = z\n .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).readonly().optional(),\n })\n .readonly();\n\n/** Validates one persisted monthly Factory budget and its emitted-notice state. */\nexport const budgetSchema = z\n .strictObject({\n schemaVersion: schemaVersionSchema,\n factoryId: factoryIdSchema,\n month: budgetMonthSchema,\n limits: budgetLimitsSchema,\n notices: z\n .strictObject({\n warningAt: isoDateTimeSchema.optional(),\n exhaustedAt: isoDateTimeSchema.optional(),\n })\n .readonly(),\n })\n .readonly();\n\n/** Spending limits and warning threshold enforced for a monthly Factory budget. */\nexport type BudgetLimits = z.infer<typeof budgetLimitsSchema>;\n/** Persisted monthly Factory budget configuration and notice state. */\nexport type Budget = z.infer<typeof budgetSchema>;\n"],"mappings":";;;;;;AAqBA,MAAa,oBAAoB,EAC9B,OAAO,CAAC,CACR,MAAM,4BAA4B,+CAA+C;;AAMpF,MAAa,qBAAqB,EAC/B,aAAa;CACZ,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,CAAC,CAAC,SAAS;AAClF,CAAC,CAAC,CACD,SAAS;;AAGZ,MAAa,eAAe,EACzB,aAAa;CACZ,eAAe;CACf,WAAW;CACX,OAAO;CACP,QAAQ;CACR,SAAS,EACN,aAAa;EACZ,WAAW,kBAAkB,SAAS;EACtC,aAAa,kBAAkB,SAAS;CAC1C,CAAC,CAAC,CACD,SAAS;AACd,CAAC,CAAC,CACD,SAAS"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { isoDateTimeSchema, replyToSchema, schemaVersionSchema } from "./common.mjs";
|
|
2
|
+
import { externalSessionSchema, storedSessionSchema } from "./stored-session.mjs";
|
|
3
|
+
import { changeSchema } from "./change.mjs";
|
|
4
|
+
import { storedTaskSchema } from "./stored-task.mjs";
|
|
5
|
+
import { z } from "zod";
|
|
6
|
+
//#region src/schema/catalog.ts
|
|
7
|
+
const shardSchema = z.string().regex(/^[0-9a-f]$/u);
|
|
8
|
+
const sourceVersionSchema = z.number().int().positive();
|
|
9
|
+
const repairSchema = z.strictObject({
|
|
10
|
+
id: z.string().min(1),
|
|
11
|
+
sourceVersion: sourceVersionSchema
|
|
12
|
+
});
|
|
13
|
+
/** Validates one fixed shard of the recoverable Task discovery index. */
|
|
14
|
+
const taskCatalogSchema = z.strictObject({
|
|
15
|
+
schemaVersion: schemaVersionSchema,
|
|
16
|
+
id: z.templateLiteral(["tasks-", shardSchema]),
|
|
17
|
+
entries: z.array(z.strictObject({
|
|
18
|
+
sourceVersion: sourceVersionSchema,
|
|
19
|
+
value: storedTaskSchema
|
|
20
|
+
})),
|
|
21
|
+
repairs: z.array(repairSchema).default([]),
|
|
22
|
+
updatedAt: isoDateTimeSchema
|
|
23
|
+
});
|
|
24
|
+
/** Validates one fixed shard of the recoverable Change discovery index. */
|
|
25
|
+
const changeCatalogSchema = z.strictObject({
|
|
26
|
+
schemaVersion: schemaVersionSchema,
|
|
27
|
+
id: z.templateLiteral(["changes-", shardSchema]),
|
|
28
|
+
entries: z.array(z.strictObject({
|
|
29
|
+
sourceVersion: sourceVersionSchema,
|
|
30
|
+
value: changeSchema
|
|
31
|
+
})),
|
|
32
|
+
repairs: z.array(repairSchema).default([]),
|
|
33
|
+
updatedAt: isoDateTimeSchema
|
|
34
|
+
});
|
|
35
|
+
/** Validates one fixed shard of the recoverable operator-session discovery index. */
|
|
36
|
+
const sessionCatalogSchema = z.strictObject({
|
|
37
|
+
schemaVersion: schemaVersionSchema,
|
|
38
|
+
id: z.templateLiteral(["sessions-", shardSchema]),
|
|
39
|
+
entries: z.array(z.strictObject({
|
|
40
|
+
sourceVersion: sourceVersionSchema,
|
|
41
|
+
value: storedSessionSchema
|
|
42
|
+
})),
|
|
43
|
+
repairs: z.array(repairSchema).default([]),
|
|
44
|
+
updatedAt: isoDateTimeSchema
|
|
45
|
+
});
|
|
46
|
+
/** Validates one fixed shard of the external-conversation discovery index. */
|
|
47
|
+
const externalSessionCatalogSchema = z.strictObject({
|
|
48
|
+
schemaVersion: schemaVersionSchema,
|
|
49
|
+
id: z.templateLiteral(["external-sessions-", shardSchema]),
|
|
50
|
+
entries: z.array(z.strictObject({
|
|
51
|
+
sourceVersion: sourceVersionSchema,
|
|
52
|
+
value: externalSessionSchema
|
|
53
|
+
})),
|
|
54
|
+
repairs: z.array(repairSchema).default([]),
|
|
55
|
+
updatedAt: isoDateTimeSchema
|
|
56
|
+
});
|
|
57
|
+
/** Validates the directly addressed Task index for one reply destination. */
|
|
58
|
+
const taskRouteSchema = z.strictObject({
|
|
59
|
+
schemaVersion: schemaVersionSchema,
|
|
60
|
+
id: z.string().regex(/^task-route_[a-z0-9]{6,64}$/u),
|
|
61
|
+
replyTo: replyToSchema,
|
|
62
|
+
entries: z.array(z.strictObject({
|
|
63
|
+
sourceVersion: sourceVersionSchema,
|
|
64
|
+
value: storedTaskSchema
|
|
65
|
+
})),
|
|
66
|
+
repairs: z.array(repairSchema).default([]),
|
|
67
|
+
updatedAt: isoDateTimeSchema
|
|
68
|
+
});
|
|
69
|
+
//#endregion
|
|
70
|
+
export { changeCatalogSchema, externalSessionCatalogSchema, sessionCatalogSchema, taskCatalogSchema, taskRouteSchema };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=catalog.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.mjs","names":[],"sources":["../../src/schema/catalog.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { isoDateTimeSchema, replyToSchema, schemaVersionSchema } from \"./common\";\nimport { changeSchema } from \"./change\";\nimport { externalSessionSchema, storedSessionSchema } from \"./stored-session\";\nimport { storedTaskSchema } from \"./stored-task\";\n\nconst shardSchema = z.string().regex(/^[0-9a-f]$/u);\nconst sourceVersionSchema = z.number().int().positive();\nconst repairSchema = z.strictObject({\n id: z.string().min(1),\n sourceVersion: sourceVersionSchema,\n});\n\n/** Validates one fixed shard of the recoverable Task discovery index. */\nexport const taskCatalogSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: z.templateLiteral([\"tasks-\", shardSchema]),\n entries: z.array(z.strictObject({ sourceVersion: sourceVersionSchema, value: storedTaskSchema })),\n repairs: z.array(repairSchema).default([]),\n updatedAt: isoDateTimeSchema,\n});\n\n/** Validates one fixed shard of the recoverable Change discovery index. */\nexport const changeCatalogSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: z.templateLiteral([\"changes-\", shardSchema]),\n entries: z.array(z.strictObject({ sourceVersion: sourceVersionSchema, value: changeSchema })),\n repairs: z.array(repairSchema).default([]),\n updatedAt: isoDateTimeSchema,\n});\n\n/** Validates one fixed shard of the recoverable operator-session discovery index. */\nexport const sessionCatalogSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: z.templateLiteral([\"sessions-\", shardSchema]),\n entries: z.array(\n z.strictObject({ sourceVersion: sourceVersionSchema, value: storedSessionSchema }),\n ),\n repairs: z.array(repairSchema).default([]),\n updatedAt: isoDateTimeSchema,\n});\n\n/** Validates one fixed shard of the external-conversation discovery index. */\nexport const externalSessionCatalogSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: z.templateLiteral([\"external-sessions-\", shardSchema]),\n entries: z.array(\n z.strictObject({ sourceVersion: sourceVersionSchema, value: externalSessionSchema }),\n ),\n repairs: z.array(repairSchema).default([]),\n updatedAt: isoDateTimeSchema,\n});\n\n/** Validates the directly addressed Task index for one reply destination. */\nexport const taskRouteSchema = z.strictObject({\n schemaVersion: schemaVersionSchema,\n id: z.string().regex(/^task-route_[a-z0-9]{6,64}$/u),\n replyTo: replyToSchema,\n entries: z.array(z.strictObject({ sourceVersion: sourceVersionSchema, value: storedTaskSchema })),\n repairs: z.array(repairSchema).default([]),\n updatedAt: isoDateTimeSchema,\n});\n"],"mappings":";;;;;;AAMA,MAAM,cAAc,EAAE,OAAO,CAAC,CAAC,MAAM,aAAa;AAClD,MAAM,sBAAsB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS;AACtD,MAAM,eAAe,EAAE,aAAa;CAClC,IAAI,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACpB,eAAe;AACjB,CAAC;;AAGD,MAAa,oBAAoB,EAAE,aAAa;CAC9C,eAAe;CACf,IAAI,EAAE,gBAAgB,CAAC,UAAU,WAAW,CAAC;CAC7C,SAAS,EAAE,MAAM,EAAE,aAAa;EAAE,eAAe;EAAqB,OAAO;CAAiB,CAAC,CAAC;CAChG,SAAS,EAAE,MAAM,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;CACzC,WAAW;AACb,CAAC;;AAGD,MAAa,sBAAsB,EAAE,aAAa;CAChD,eAAe;CACf,IAAI,EAAE,gBAAgB,CAAC,YAAY,WAAW,CAAC;CAC/C,SAAS,EAAE,MAAM,EAAE,aAAa;EAAE,eAAe;EAAqB,OAAO;CAAa,CAAC,CAAC;CAC5F,SAAS,EAAE,MAAM,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;CACzC,WAAW;AACb,CAAC;;AAGD,MAAa,uBAAuB,EAAE,aAAa;CACjD,eAAe;CACf,IAAI,EAAE,gBAAgB,CAAC,aAAa,WAAW,CAAC;CAChD,SAAS,EAAE,MACT,EAAE,aAAa;EAAE,eAAe;EAAqB,OAAO;CAAoB,CAAC,CACnF;CACA,SAAS,EAAE,MAAM,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;CACzC,WAAW;AACb,CAAC;;AAGD,MAAa,+BAA+B,EAAE,aAAa;CACzD,eAAe;CACf,IAAI,EAAE,gBAAgB,CAAC,sBAAsB,WAAW,CAAC;CACzD,SAAS,EAAE,MACT,EAAE,aAAa;EAAE,eAAe;EAAqB,OAAO;CAAsB,CAAC,CACrF;CACA,SAAS,EAAE,MAAM,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;CACzC,WAAW;AACb,CAAC;;AAGD,MAAa,kBAAkB,EAAE,aAAa;CAC5C,eAAe;CACf,IAAI,EAAE,OAAO,CAAC,CAAC,MAAM,8BAA8B;CACnD,SAAS;CACT,SAAS,EAAE,MAAM,EAAE,aAAa;EAAE,eAAe;EAAqB,OAAO;CAAiB,CAAC,CAAC;CAChG,SAAS,EAAE,MAAM,YAAY,CAAC,CAAC,QAAQ,CAAC,CAAC;CACzC,WAAW;AACb,CAAC"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/change.d.ts
|
|
3
|
+
/** Validates the shared ordinal scale used for risk and confidence. */
|
|
4
|
+
declare const changeLevelSchema: z.ZodEnum<{
|
|
5
|
+
low: "low";
|
|
6
|
+
medium: "medium";
|
|
7
|
+
high: "high";
|
|
8
|
+
}>;
|
|
9
|
+
/** Validates the durable lifecycle state of a pull-request Change. */
|
|
10
|
+
declare const changeStateSchema: z.ZodEnum<{
|
|
11
|
+
verifying: "verifying";
|
|
12
|
+
ready: "ready";
|
|
13
|
+
merged: "merged";
|
|
14
|
+
deployed: "deployed";
|
|
15
|
+
rolled_out: "rolled_out";
|
|
16
|
+
rolled_back: "rolled_back";
|
|
17
|
+
closed: "closed";
|
|
18
|
+
}>;
|
|
19
|
+
/** Validates the verification evidence used to assess a Change. */
|
|
20
|
+
declare const changeEvidenceSchema: z.ZodObject<{
|
|
21
|
+
reproVerified: z.ZodBoolean;
|
|
22
|
+
testsAdded: z.ZodNumber;
|
|
23
|
+
checksGreen: z.ZodBoolean;
|
|
24
|
+
attackPassed: z.ZodBoolean;
|
|
25
|
+
scopeMatches: z.ZodBoolean;
|
|
26
|
+
previewUrl: z.ZodOptional<z.ZodURL>;
|
|
27
|
+
}, z.core.$strict>;
|
|
28
|
+
/** Validates a persisted human-visible pull-request Change and its trust evidence. */
|
|
29
|
+
declare const changeSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
30
|
+
state: z.ZodEnum<{
|
|
31
|
+
verifying: "verifying";
|
|
32
|
+
ready: "ready";
|
|
33
|
+
closed: "closed";
|
|
34
|
+
}>;
|
|
35
|
+
decidedBy: z.ZodOptional<z.ZodString>;
|
|
36
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
37
|
+
id: z.ZodType<`chg_${string}`, string, z.core.$ZodTypeInternals<`chg_${string}`, string>>;
|
|
38
|
+
repositoryId: z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>;
|
|
39
|
+
taskId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
40
|
+
groupId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
41
|
+
prNumber: z.ZodNumber;
|
|
42
|
+
prUrl: z.ZodURL;
|
|
43
|
+
author: z.ZodString;
|
|
44
|
+
risk: z.ZodEnum<{
|
|
45
|
+
low: "low";
|
|
46
|
+
medium: "medium";
|
|
47
|
+
high: "high";
|
|
48
|
+
}>;
|
|
49
|
+
confidence: z.ZodEnum<{
|
|
50
|
+
low: "low";
|
|
51
|
+
medium: "medium";
|
|
52
|
+
high: "high";
|
|
53
|
+
}>;
|
|
54
|
+
evidence: z.ZodObject<{
|
|
55
|
+
reproVerified: z.ZodBoolean;
|
|
56
|
+
testsAdded: z.ZodNumber;
|
|
57
|
+
checksGreen: z.ZodBoolean;
|
|
58
|
+
attackPassed: z.ZodBoolean;
|
|
59
|
+
scopeMatches: z.ZodBoolean;
|
|
60
|
+
previewUrl: z.ZodOptional<z.ZodURL>;
|
|
61
|
+
}, z.core.$strict>;
|
|
62
|
+
mergeSha: z.ZodOptional<z.ZodString>;
|
|
63
|
+
createdAt: z.ZodISODateTime;
|
|
64
|
+
updatedAt: z.ZodISODateTime;
|
|
65
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
66
|
+
state: z.ZodEnum<{
|
|
67
|
+
merged: "merged";
|
|
68
|
+
deployed: "deployed";
|
|
69
|
+
rolled_out: "rolled_out";
|
|
70
|
+
rolled_back: "rolled_back";
|
|
71
|
+
}>;
|
|
72
|
+
decidedBy: z.ZodString;
|
|
73
|
+
schemaVersion: z.ZodLiteral<1>;
|
|
74
|
+
id: z.ZodType<`chg_${string}`, string, z.core.$ZodTypeInternals<`chg_${string}`, string>>;
|
|
75
|
+
repositoryId: z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>;
|
|
76
|
+
taskId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
77
|
+
groupId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
78
|
+
prNumber: z.ZodNumber;
|
|
79
|
+
prUrl: z.ZodURL;
|
|
80
|
+
author: z.ZodString;
|
|
81
|
+
risk: z.ZodEnum<{
|
|
82
|
+
low: "low";
|
|
83
|
+
medium: "medium";
|
|
84
|
+
high: "high";
|
|
85
|
+
}>;
|
|
86
|
+
confidence: z.ZodEnum<{
|
|
87
|
+
low: "low";
|
|
88
|
+
medium: "medium";
|
|
89
|
+
high: "high";
|
|
90
|
+
}>;
|
|
91
|
+
evidence: z.ZodObject<{
|
|
92
|
+
reproVerified: z.ZodBoolean;
|
|
93
|
+
testsAdded: z.ZodNumber;
|
|
94
|
+
checksGreen: z.ZodBoolean;
|
|
95
|
+
attackPassed: z.ZodBoolean;
|
|
96
|
+
scopeMatches: z.ZodBoolean;
|
|
97
|
+
previewUrl: z.ZodOptional<z.ZodURL>;
|
|
98
|
+
}, z.core.$strict>;
|
|
99
|
+
mergeSha: z.ZodOptional<z.ZodString>;
|
|
100
|
+
createdAt: z.ZodISODateTime;
|
|
101
|
+
updatedAt: z.ZodISODateTime;
|
|
102
|
+
}, z.core.$strict>], "state">;
|
|
103
|
+
/** Shared low-to-high ordinal value used for risk and confidence. */
|
|
104
|
+
type ChangeLevel = z.infer<typeof changeLevelSchema>;
|
|
105
|
+
/** Durable lifecycle state of a human-visible pull-request Change. */
|
|
106
|
+
type ChangeState = z.infer<typeof changeStateSchema>;
|
|
107
|
+
/** Verification facts supporting the risk and confidence assigned to a Change. */
|
|
108
|
+
type ChangeEvidence = z.infer<typeof changeEvidenceSchema>;
|
|
109
|
+
/** Persisted pull-request Change tracked independently from the Tasks that produced it. */
|
|
110
|
+
type Change = z.infer<typeof changeSchema>;
|
|
111
|
+
/** Change read model narrowed to one exact lifecycle state. */
|
|
112
|
+
type ChangeInState<State extends ChangeState> = Change & {
|
|
113
|
+
readonly state: State;
|
|
114
|
+
};
|
|
115
|
+
//#endregion
|
|
116
|
+
export { Change, ChangeEvidence, ChangeInState, ChangeLevel, ChangeState, changeEvidenceSchema, changeLevelSchema, changeSchema, changeStateSchema };
|
|
117
|
+
//# sourceMappingURL=change.d.mts.map
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
import { changeIdSchema, repositoryIdSchema, taskIdSchema } from "./id.mjs";
|
|
2
|
+
import { isoDateTimeSchema, schemaVersionSchema } from "./common.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/schema/change.ts
|
|
5
|
+
/** Validates the shared ordinal scale used for risk and confidence. */
|
|
6
|
+
const changeLevelSchema = z.enum([
|
|
7
|
+
"low",
|
|
8
|
+
"medium",
|
|
9
|
+
"high"
|
|
10
|
+
]);
|
|
11
|
+
/** Validates the durable lifecycle state of a pull-request Change. */
|
|
12
|
+
const changeStateSchema = z.enum([
|
|
13
|
+
"verifying",
|
|
14
|
+
"ready",
|
|
15
|
+
"merged",
|
|
16
|
+
"deployed",
|
|
17
|
+
"rolled_out",
|
|
18
|
+
"rolled_back",
|
|
19
|
+
"closed"
|
|
20
|
+
]);
|
|
21
|
+
/** Validates the verification evidence used to assess a Change. */
|
|
22
|
+
const changeEvidenceSchema = z.strictObject({
|
|
23
|
+
reproVerified: z.boolean(),
|
|
24
|
+
testsAdded: z.number().int().min(0),
|
|
25
|
+
checksGreen: z.boolean(),
|
|
26
|
+
attackPassed: z.boolean(),
|
|
27
|
+
scopeMatches: z.boolean(),
|
|
28
|
+
previewUrl: z.url().optional()
|
|
29
|
+
});
|
|
30
|
+
const changeFields = {
|
|
31
|
+
schemaVersion: schemaVersionSchema,
|
|
32
|
+
id: changeIdSchema,
|
|
33
|
+
repositoryId: repositoryIdSchema,
|
|
34
|
+
taskId: taskIdSchema.optional(),
|
|
35
|
+
groupId: taskIdSchema.optional(),
|
|
36
|
+
prNumber: z.number().int().min(1),
|
|
37
|
+
prUrl: z.url(),
|
|
38
|
+
author: z.string().min(1),
|
|
39
|
+
risk: changeLevelSchema,
|
|
40
|
+
confidence: changeLevelSchema,
|
|
41
|
+
evidence: changeEvidenceSchema,
|
|
42
|
+
mergeSha: z.string().regex(/^[0-9a-f]{40}$/).optional().describe("Merge commit sha recorded when the pull request merges, matched against production deployments."),
|
|
43
|
+
createdAt: isoDateTimeSchema,
|
|
44
|
+
updatedAt: isoDateTimeSchema
|
|
45
|
+
};
|
|
46
|
+
/** Validates a persisted human-visible pull-request Change and its trust evidence. */
|
|
47
|
+
const changeSchema = z.discriminatedUnion("state", [z.strictObject({
|
|
48
|
+
...changeFields,
|
|
49
|
+
state: z.enum([
|
|
50
|
+
"verifying",
|
|
51
|
+
"ready",
|
|
52
|
+
"closed"
|
|
53
|
+
]),
|
|
54
|
+
decidedBy: z.string().min(1).optional()
|
|
55
|
+
}), z.strictObject({
|
|
56
|
+
...changeFields,
|
|
57
|
+
state: z.enum([
|
|
58
|
+
"merged",
|
|
59
|
+
"deployed",
|
|
60
|
+
"rolled_out",
|
|
61
|
+
"rolled_back"
|
|
62
|
+
]),
|
|
63
|
+
decidedBy: z.string().min(1)
|
|
64
|
+
})]);
|
|
65
|
+
//#endregion
|
|
66
|
+
export { changeEvidenceSchema, changeLevelSchema, changeSchema, changeStateSchema };
|
|
67
|
+
|
|
68
|
+
//# sourceMappingURL=change.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change.mjs","names":[],"sources":["../../src/schema/change.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { isoDateTimeSchema, schemaVersionSchema } from \"./common\";\nimport { changeIdSchema, repositoryIdSchema, taskIdSchema } from \"./id\";\n\n/** Validates the shared ordinal scale used for risk and confidence. */\nexport const changeLevelSchema = z.enum([\"low\", \"medium\", \"high\"]);\n\n/** Validates the durable lifecycle state of a pull-request Change. */\nexport const changeStateSchema = z.enum([\n \"verifying\",\n \"ready\",\n \"merged\",\n \"deployed\",\n \"rolled_out\",\n \"rolled_back\",\n \"closed\",\n]);\n\n/** Validates the verification evidence used to assess a Change. */\nexport const changeEvidenceSchema = z.strictObject({\n reproVerified: z.boolean(),\n testsAdded: z.number().int().min(0),\n checksGreen: z.boolean(),\n attackPassed: z.boolean(),\n scopeMatches: z.boolean(),\n previewUrl: z.url().optional(),\n});\n\nconst changeFields = {\n schemaVersion: schemaVersionSchema,\n id: changeIdSchema,\n repositoryId: repositoryIdSchema,\n taskId: taskIdSchema.optional(),\n groupId: taskIdSchema.optional(),\n prNumber: z.number().int().min(1),\n prUrl: z.url(),\n author: z.string().min(1),\n risk: changeLevelSchema,\n confidence: changeLevelSchema,\n evidence: changeEvidenceSchema,\n mergeSha: z\n .string()\n .regex(/^[0-9a-f]{40}$/)\n .optional()\n .describe(\n \"Merge commit sha recorded when the pull request merges, matched against production deployments.\",\n ),\n createdAt: isoDateTimeSchema,\n updatedAt: isoDateTimeSchema,\n} as const;\n\n/** Validates a persisted human-visible pull-request Change and its trust evidence. */\nexport const changeSchema = z.discriminatedUnion(\"state\", [\n z.strictObject({\n ...changeFields,\n state: z.enum([\"verifying\", \"ready\", \"closed\"]),\n decidedBy: z.string().min(1).optional(),\n }),\n z.strictObject({\n ...changeFields,\n state: z.enum([\"merged\", \"deployed\", \"rolled_out\", \"rolled_back\"]),\n decidedBy: z.string().min(1),\n }),\n]);\n\n/** Shared low-to-high ordinal value used for risk and confidence. */\nexport type ChangeLevel = z.infer<typeof changeLevelSchema>;\n/** Durable lifecycle state of a human-visible pull-request Change. */\nexport type ChangeState = z.infer<typeof changeStateSchema>;\n/** Verification facts supporting the risk and confidence assigned to a Change. */\nexport type ChangeEvidence = z.infer<typeof changeEvidenceSchema>;\n/** Persisted pull-request Change tracked independently from the Tasks that produced it. */\nexport type Change = z.infer<typeof changeSchema>;\n/** Change read model narrowed to one exact lifecycle state. */\nexport type ChangeInState<State extends ChangeState> = Change & { readonly state: State };\n"],"mappings":";;;;;AAKA,MAAa,oBAAoB,EAAE,KAAK;CAAC;CAAO;CAAU;AAAM,CAAC;;AAGjE,MAAa,oBAAoB,EAAE,KAAK;CACtC;CACA;CACA;CACA;CACA;CACA;CACA;AACF,CAAC;;AAGD,MAAa,uBAAuB,EAAE,aAAa;CACjD,eAAe,EAAE,QAAQ;CACzB,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAClC,aAAa,EAAE,QAAQ;CACvB,cAAc,EAAE,QAAQ;CACxB,cAAc,EAAE,QAAQ;CACxB,YAAY,EAAE,IAAI,CAAC,CAAC,SAAS;AAC/B,CAAC;AAED,MAAM,eAAe;CACnB,eAAe;CACf,IAAI;CACJ,cAAc;CACd,QAAQ,aAAa,SAAS;CAC9B,SAAS,aAAa,SAAS;CAC/B,UAAU,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,IAAI,CAAC;CAChC,OAAO,EAAE,IAAI;CACb,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;CACxB,MAAM;CACN,YAAY;CACZ,UAAU;CACV,UAAU,EACP,OAAO,CAAC,CACR,MAAM,gBAAgB,CAAC,CACvB,SAAS,CAAC,CACV,SACC,iGACF;CACF,WAAW;CACX,WAAW;AACb;;AAGA,MAAa,eAAe,EAAE,mBAAmB,SAAS,CACxD,EAAE,aAAa;CACb,GAAG;CACH,OAAO,EAAE,KAAK;EAAC;EAAa;EAAS;CAAQ,CAAC;CAC9C,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;AACxC,CAAC,GACD,EAAE,aAAa;CACb,GAAG;CACH,OAAO,EAAE,KAAK;EAAC;EAAU;EAAY;EAAc;CAAa,CAAC;CACjE,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC;AAC7B,CAAC,CACH,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/common.d.ts
|
|
3
|
+
/** Clock returning a validated UTC ISO-8601 timestamp string. */
|
|
4
|
+
type IsoDateTimeClock = () => string;
|
|
5
|
+
/** Clock returning a Date for calendar and elapsed-time policy decisions. */
|
|
6
|
+
type DateClock = () => Date;
|
|
7
|
+
/** Monotonic-style clock returning elapsed milliseconds as a number. */
|
|
8
|
+
type MillisecondClock = () => number;
|
|
9
|
+
/** Value supplied synchronously or through a Promise. */
|
|
10
|
+
type MaybePromise<Value> = Value | Promise<Value>;
|
|
11
|
+
/** Version written into every persisted Factory entity snapshot. */
|
|
12
|
+
declare const SCHEMA_VERSION = 1;
|
|
13
|
+
/** Validates the schema version supported by this package release. */
|
|
14
|
+
declare const schemaVersionSchema: z.ZodLiteral<1>;
|
|
15
|
+
/** Validates UTC timestamps serialized in ISO 8601 form. */
|
|
16
|
+
declare const isoDateTimeSchema: z.ZodISODateTime;
|
|
17
|
+
/** Validates a finite, nonnegative monetary amount denominated in US dollars. */
|
|
18
|
+
declare const usdSchema: z.ZodNumber;
|
|
19
|
+
/**
|
|
20
|
+
* Open vocabulary value. Standard values ship as exported constants; custom
|
|
21
|
+
* values matching the pattern are equally valid.
|
|
22
|
+
*/
|
|
23
|
+
declare const vocabularySchema: z.ZodString;
|
|
24
|
+
/** Validates a connector-neutral destination for workflow replies. */
|
|
25
|
+
declare const replyToSchema: z.ZodObject<{
|
|
26
|
+
channel: z.ZodString;
|
|
27
|
+
address: z.ZodString;
|
|
28
|
+
}, z.core.$strict>;
|
|
29
|
+
/** Connector-neutral destination that preserves where a workflow should reply. */
|
|
30
|
+
type ReplyTo = z.infer<typeof replyToSchema>;
|
|
31
|
+
//#endregion
|
|
32
|
+
export { DateClock, IsoDateTimeClock, MaybePromise, MillisecondClock, ReplyTo, SCHEMA_VERSION, isoDateTimeSchema, replyToSchema, schemaVersionSchema, usdSchema, vocabularySchema };
|
|
33
|
+
//# sourceMappingURL=common.d.mts.map
|
|
@@ -1,31 +1,24 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
//#region src/schema/common.ts
|
|
3
|
+
/** Version written into every persisted Factory entity snapshot. */
|
|
3
4
|
const SCHEMA_VERSION = 1;
|
|
5
|
+
/** Validates the schema version supported by this package release. */
|
|
4
6
|
const schemaVersionSchema = z.literal(1).describe("Version of the entity schema this row was written with.");
|
|
7
|
+
/** Validates UTC timestamps serialized in ISO 8601 form. */
|
|
5
8
|
const isoDateTimeSchema = z.iso.datetime().describe("UTC timestamp in ISO 8601 format, e.g. 2026-08-26T12:00:00Z.");
|
|
9
|
+
/** Validates a finite, nonnegative monetary amount denominated in US dollars. */
|
|
6
10
|
const usdSchema = z.number().finite().nonnegative().describe("Amount in US dollars.");
|
|
7
11
|
/**
|
|
8
12
|
* Open vocabulary value. Standard values ship as exported constants; custom
|
|
9
13
|
* values matching the pattern are equally valid.
|
|
10
14
|
*/
|
|
11
15
|
const vocabularySchema = z.string().regex(/^[a-z][a-z0-9_]{0,63}$/, "must be lowercase snake_case starting with a letter").describe("Lowercase snake_case name, e.g. github_issue or sentry_alert.");
|
|
16
|
+
/** Validates a connector-neutral destination for workflow replies. */
|
|
12
17
|
const replyToSchema = z.strictObject({
|
|
13
18
|
channel: z.string().min(1).describe("Connector that should carry replies, e.g. github or slack."),
|
|
14
19
|
address: z.string().min(1).describe("Connector-specific reply address, e.g. acme/web#41 or a Slack thread id.")
|
|
15
20
|
});
|
|
16
21
|
//#endregion
|
|
17
|
-
|
|
18
|
-
function idSchema(prefix) {
|
|
19
|
-
return z.string().regex(new RegExp(`^${prefix}_[a-z0-9]{6,64}$`));
|
|
20
|
-
}
|
|
21
|
-
const factoryIdSchema = idSchema("fac");
|
|
22
|
-
const repositoryIdSchema = idSchema("repo");
|
|
23
|
-
const signalIdSchema = idSchema("sig");
|
|
24
|
-
const taskIdSchema = idSchema("task");
|
|
25
|
-
const changeIdSchema = idSchema("chg");
|
|
26
|
-
const receiptIdSchema = idSchema("rcpt");
|
|
27
|
-
const repositoryIdsSchema = z.array(repositoryIdSchema).min(1);
|
|
28
|
-
//#endregion
|
|
29
|
-
export { repositoryIdsSchema as a, SCHEMA_VERSION as c, schemaVersionSchema as d, usdSchema as f, repositoryIdSchema as i, isoDateTimeSchema as l, factoryIdSchema as n, signalIdSchema as o, vocabularySchema as p, receiptIdSchema as r, taskIdSchema as s, changeIdSchema as t, replyToSchema as u };
|
|
22
|
+
export { SCHEMA_VERSION, isoDateTimeSchema, replyToSchema, schemaVersionSchema, usdSchema, vocabularySchema };
|
|
30
23
|
|
|
31
|
-
//# sourceMappingURL=
|
|
24
|
+
//# sourceMappingURL=common.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"common.mjs","names":[],"sources":["../../src/schema/common.ts"],"sourcesContent":["import { z } from \"zod\";\n\n/** Clock returning a validated UTC ISO-8601 timestamp string. */\nexport type IsoDateTimeClock = () => string;\n/** Clock returning a Date for calendar and elapsed-time policy decisions. */\nexport type DateClock = () => Date;\n/** Monotonic-style clock returning elapsed milliseconds as a number. */\nexport type MillisecondClock = () => number;\n/** Value supplied synchronously or through a Promise. */\nexport type MaybePromise<Value> = Value | Promise<Value>;\n\n/** Version written into every persisted Factory entity snapshot. */\nexport const SCHEMA_VERSION = 1;\n\n/** Validates the schema version supported by this package release. */\nexport const schemaVersionSchema = z\n .literal(SCHEMA_VERSION)\n .describe(\"Version of the entity schema this row was written with.\");\n\n/** Validates UTC timestamps serialized in ISO 8601 form. */\nexport const isoDateTimeSchema = z.iso\n .datetime()\n .describe(\"UTC timestamp in ISO 8601 format, e.g. 2026-08-26T12:00:00Z.\");\n\n/** Validates a finite, nonnegative monetary amount denominated in US dollars. */\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\n/** Validates a connector-neutral destination for workflow replies. */\nexport const replyToSchema = z.strictObject({\n channel: z.string().min(1).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\n/** Connector-neutral destination that preserves where a workflow should reply. */\nexport type ReplyTo = z.infer<typeof replyToSchema>;\n"],"mappings":";;;AAYA,MAAa,iBAAiB;;AAG9B,MAAa,sBAAsB,EAChC,QAAA,CAAsB,CAAC,CACvB,SAAS,yDAAyD;;AAGrE,MAAa,oBAAoB,EAAE,IAChC,SAAS,CAAC,CACV,SAAS,8DAA8D;;AAG1E,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;;AAG3E,MAAa,gBAAgB,EAAE,aAAa;CAC1C,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,4DAA4D;CAChG,SAAS,EACN,OAAO,CAAC,CACR,IAAI,CAAC,CAAC,CACN,SAAS,0EAA0E;AACxF,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
//#region src/schema/communication.d.ts
|
|
3
|
+
/** Standard connector-neutral outcomes understood by communication presenters. */
|
|
4
|
+
declare const communicationOutcomes: readonly ["accepted", "started", "succeeded", "failed", "cancelled", "needs_human", "question", "digest", "rolled_back", "budget_warning", "budget_exhausted", "message"];
|
|
5
|
+
/** Validates the bounded outcome vocabulary of an outbound communication event. */
|
|
6
|
+
declare const communicationOutcomeSchema: z.ZodEnum<{
|
|
7
|
+
message: "message";
|
|
8
|
+
succeeded: "succeeded";
|
|
9
|
+
failed: "failed";
|
|
10
|
+
needs_human: "needs_human";
|
|
11
|
+
cancelled: "cancelled";
|
|
12
|
+
accepted: "accepted";
|
|
13
|
+
question: "question";
|
|
14
|
+
rolled_back: "rolled_back";
|
|
15
|
+
started: "started";
|
|
16
|
+
digest: "digest";
|
|
17
|
+
budget_warning: "budget_warning";
|
|
18
|
+
budget_exhausted: "budget_exhausted";
|
|
19
|
+
}>;
|
|
20
|
+
/** Validates a connector-neutral event queued for delivery to its original destination. */
|
|
21
|
+
declare const communicationEventSchema: z.ZodObject<{
|
|
22
|
+
eventId: z.ZodString;
|
|
23
|
+
repositoryIds: z.ZodReadonly<z.ZodTuple<[z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>], z.ZodType<`repo_${string}`, string, z.core.$ZodTypeInternals<`repo_${string}`, string>>>>;
|
|
24
|
+
taskId: z.ZodOptional<z.ZodType<`task_${string}`, string, z.core.$ZodTypeInternals<`task_${string}`, string>>>;
|
|
25
|
+
changeId: z.ZodOptional<z.ZodType<`chg_${string}`, string, z.core.$ZodTypeInternals<`chg_${string}`, string>>>;
|
|
26
|
+
replyTo: z.ZodObject<{
|
|
27
|
+
channel: z.ZodString;
|
|
28
|
+
address: z.ZodString;
|
|
29
|
+
}, z.core.$strict>;
|
|
30
|
+
outcome: z.ZodEnum<{
|
|
31
|
+
message: "message";
|
|
32
|
+
succeeded: "succeeded";
|
|
33
|
+
failed: "failed";
|
|
34
|
+
needs_human: "needs_human";
|
|
35
|
+
cancelled: "cancelled";
|
|
36
|
+
accepted: "accepted";
|
|
37
|
+
question: "question";
|
|
38
|
+
rolled_back: "rolled_back";
|
|
39
|
+
started: "started";
|
|
40
|
+
digest: "digest";
|
|
41
|
+
budget_warning: "budget_warning";
|
|
42
|
+
budget_exhausted: "budget_exhausted";
|
|
43
|
+
}>;
|
|
44
|
+
data: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
45
|
+
}, z.core.$strict>;
|
|
46
|
+
/** Outcome category used by connector renderers to present a workflow event. */
|
|
47
|
+
type CommunicationOutcome = z.infer<typeof communicationOutcomeSchema>;
|
|
48
|
+
/** Connector-neutral outbound workflow event with a stable delivery identity. */
|
|
49
|
+
type CommunicationEvent = z.infer<typeof communicationEventSchema>;
|
|
50
|
+
//#endregion
|
|
51
|
+
export { CommunicationEvent, CommunicationOutcome, communicationEventSchema, communicationOutcomeSchema, communicationOutcomes };
|
|
52
|
+
//# sourceMappingURL=communication.d.mts.map
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { changeIdSchema, repositoryIdsSchema, taskIdSchema } from "./id.mjs";
|
|
2
|
+
import { replyToSchema } from "./common.mjs";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
//#region src/schema/communication.ts
|
|
5
|
+
/** Standard connector-neutral outcomes understood by communication presenters. */
|
|
6
|
+
const communicationOutcomes = [
|
|
7
|
+
"accepted",
|
|
8
|
+
"started",
|
|
9
|
+
"succeeded",
|
|
10
|
+
"failed",
|
|
11
|
+
"cancelled",
|
|
12
|
+
"needs_human",
|
|
13
|
+
"question",
|
|
14
|
+
"digest",
|
|
15
|
+
"rolled_back",
|
|
16
|
+
"budget_warning",
|
|
17
|
+
"budget_exhausted",
|
|
18
|
+
"message"
|
|
19
|
+
];
|
|
20
|
+
/** Validates the bounded outcome vocabulary of an outbound communication event. */
|
|
21
|
+
const communicationOutcomeSchema = z.enum(communicationOutcomes).describe("Lifecycle outcome a connector should render and deliver.");
|
|
22
|
+
/** Validates a connector-neutral event queued for delivery to its original destination. */
|
|
23
|
+
const communicationEventSchema = z.strictObject({
|
|
24
|
+
eventId: z.string().min(1).describe("Stable idempotency key for this delivery."),
|
|
25
|
+
repositoryIds: repositoryIdsSchema,
|
|
26
|
+
taskId: taskIdSchema.optional(),
|
|
27
|
+
changeId: changeIdSchema.optional(),
|
|
28
|
+
replyTo: replyToSchema,
|
|
29
|
+
outcome: communicationOutcomeSchema,
|
|
30
|
+
data: z.record(z.string(), z.unknown()).describe("Outcome-specific connector payload.")
|
|
31
|
+
});
|
|
32
|
+
//#endregion
|
|
33
|
+
export { communicationEventSchema, communicationOutcomeSchema, communicationOutcomes };
|
|
34
|
+
|
|
35
|
+
//# sourceMappingURL=communication.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"communication.mjs","names":[],"sources":["../../src/schema/communication.ts"],"sourcesContent":["import { z } from \"zod\";\nimport { replyToSchema } from \"./common\";\nimport { changeIdSchema, repositoryIdsSchema, taskIdSchema } from \"./id\";\n\n/** Standard connector-neutral outcomes understood by communication presenters. */\nexport const communicationOutcomes = [\n \"accepted\",\n \"started\",\n \"succeeded\",\n \"failed\",\n \"cancelled\",\n \"needs_human\",\n \"question\",\n \"digest\",\n \"rolled_back\",\n \"budget_warning\",\n \"budget_exhausted\",\n \"message\",\n] as const;\n\n/** Validates the bounded outcome vocabulary of an outbound communication event. */\nexport const communicationOutcomeSchema = z\n .enum(communicationOutcomes)\n .describe(\"Lifecycle outcome a connector should render and deliver.\");\n\n/** Validates a connector-neutral event queued for delivery to its original destination. */\nexport const communicationEventSchema = z.strictObject({\n eventId: z.string().min(1).describe(\"Stable idempotency key for this delivery.\"),\n repositoryIds: repositoryIdsSchema,\n taskId: taskIdSchema.optional(),\n changeId: changeIdSchema.optional(),\n replyTo: replyToSchema,\n outcome: communicationOutcomeSchema,\n data: z.record(z.string(), z.unknown()).describe(\"Outcome-specific connector payload.\"),\n});\n\n/** Outcome category used by connector renderers to present a workflow event. */\nexport type CommunicationOutcome = z.infer<typeof communicationOutcomeSchema>;\n/** Connector-neutral outbound workflow event with a stable delivery identity. */\nexport type CommunicationEvent = z.infer<typeof communicationEventSchema>;\n"],"mappings":";;;;;AAKA,MAAa,wBAAwB;CACnC;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;AAGA,MAAa,6BAA6B,EACvC,KAAK,qBAAqB,CAAC,CAC3B,SAAS,0DAA0D;;AAGtE,MAAa,2BAA2B,EAAE,aAAa;CACrD,SAAS,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,2CAA2C;CAC/E,eAAe;CACf,QAAQ,aAAa,SAAS;CAC9B,UAAU,eAAe,SAAS;CAClC,SAAS;CACT,SAAS;CACT,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,qCAAqC;AACxF,CAAC"}
|