@mannyc1/ts-release 0.0.7 → 0.2.2
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/ARCHITECTURE.md +124 -92
- package/CHANGELOG.md +115 -0
- package/LICENSE +21 -0
- package/README.md +278 -324
- package/SPEC.md +206 -310
- package/apps/release-ts/README.md +32 -0
- package/apps/release-ts/src/cli/command.ts +164 -0
- package/apps/release-ts/src/cli/commands.ts +351 -0
- package/apps/release-ts/src/cli/main.ts +43 -0
- package/apps/release-ts/src/cli/node-main.ts +49 -0
- package/apps/ts-release-agents/LICENSE +21 -0
- package/apps/ts-release-agents/README.md +21 -0
- package/apps/ts-release-agents/evals/cases.json +11 -0
- package/apps/ts-release-agents/manifests/claude.json +5 -0
- package/apps/ts-release-agents/manifests/codex.json +5 -0
- package/apps/ts-release-agents/package.json +11 -0
- package/apps/ts-release-agents/skills/release/SKILL.md +48 -0
- package/apps/ts-release-agents/skills/release/references/configuration.md +18 -0
- package/apps/ts-release-agents/skills/release/references/recovery.md +10 -0
- package/apps/ts-release-agents/skills/release/references/staged-workflow.md +12 -0
- package/apps/ts-release-agents/skills/release/references/target-selection.md +13 -0
- package/apps/ts-release-agents/skills/release/references/verification.md +14 -0
- package/apps/ts-release-agents/src/build.ts +105 -0
- package/apps/ts-release-agents/src/check.ts +117 -0
- package/apps/ts-release-agents/src/install.ts +121 -0
- package/apps/ts-release-agents/test/contract.test.ts +56 -0
- package/apps/ts-release-agents/tsconfig.json +5 -0
- package/dist/api/api.d.ts +15 -0
- package/dist/api/api.d.ts.map +1 -0
- package/dist/api/api.js +244 -0
- package/dist/api/api.js.map +1 -0
- package/dist/api/errors.d.ts +39 -0
- package/dist/api/errors.d.ts.map +1 -0
- package/dist/api/errors.js +32 -0
- package/dist/api/errors.js.map +1 -0
- package/dist/api/input.d.ts +10 -0
- package/dist/api/input.d.ts.map +1 -0
- package/dist/api/input.js +73 -0
- package/dist/api/input.js.map +1 -0
- package/dist/api/runtime.d.ts +18 -0
- package/dist/api/runtime.d.ts.map +1 -0
- package/dist/api/runtime.js +7 -0
- package/dist/api/runtime.js.map +1 -0
- package/dist/api/types.d.ts +76 -0
- package/dist/api/types.d.ts.map +1 -0
- package/dist/api/types.js +17 -0
- package/dist/api/types.js.map +1 -0
- package/dist/bin/ts-release.js +39239 -0
- package/dist/capabilities/bun-targets.d.ts +3 -0
- package/dist/capabilities/bun-targets.d.ts.map +1 -0
- package/dist/capabilities/bun-targets.js +3 -0
- package/dist/capabilities/bun-targets.js.map +1 -0
- package/dist/capabilities/field-ownership.d.ts +17 -0
- package/dist/capabilities/field-ownership.d.ts.map +1 -0
- package/dist/capabilities/field-ownership.js +40 -0
- package/dist/capabilities/field-ownership.js.map +1 -0
- package/dist/capabilities/module.d.ts +91 -0
- package/dist/capabilities/module.d.ts.map +1 -0
- package/dist/capabilities/module.js +2 -0
- package/dist/capabilities/module.js.map +1 -0
- package/dist/capabilities/registry.d.ts +829 -0
- package/dist/capabilities/registry.d.ts.map +1 -0
- package/dist/capabilities/registry.js +291 -0
- package/dist/capabilities/registry.js.map +1 -0
- package/dist/config/config.d.ts +6 -0
- package/dist/config/config.d.ts.map +1 -0
- package/dist/config/config.js +42 -0
- package/dist/config/config.js.map +1 -0
- package/dist/correction/coordinator.d.ts +248 -0
- package/dist/correction/coordinator.d.ts.map +1 -0
- package/dist/correction/coordinator.js +274 -0
- package/dist/correction/coordinator.js.map +1 -0
- package/dist/correction/index.d.ts +3 -0
- package/dist/correction/index.d.ts.map +1 -0
- package/dist/correction/index.js +3 -0
- package/dist/correction/index.js.map +1 -0
- package/dist/correction/intent.d.ts +111 -0
- package/dist/correction/intent.d.ts.map +1 -0
- package/dist/correction/intent.js +146 -0
- package/dist/correction/intent.js.map +1 -0
- package/dist/drivers/archive.d.ts +8 -0
- package/dist/drivers/archive.d.ts.map +1 -0
- package/dist/drivers/archive.js +101 -0
- package/dist/drivers/archive.js.map +1 -0
- package/dist/drivers/contain.d.ts +6 -0
- package/dist/drivers/contain.d.ts.map +1 -0
- package/dist/drivers/contain.js +17 -0
- package/dist/drivers/contain.js.map +1 -0
- package/dist/drivers/environment.d.ts +4 -0
- package/dist/drivers/environment.d.ts.map +1 -0
- package/dist/drivers/environment.js +18 -0
- package/dist/drivers/environment.js.map +1 -0
- package/dist/drivers/errors.d.ts +9 -0
- package/dist/drivers/errors.d.ts.map +1 -0
- package/dist/drivers/errors.js +6 -0
- package/dist/drivers/errors.js.map +1 -0
- package/dist/drivers/glob.d.ts +2 -0
- package/dist/drivers/glob.d.ts.map +1 -0
- package/dist/drivers/glob.js +162 -0
- package/dist/drivers/glob.js.map +1 -0
- package/dist/drivers/process.d.ts +48 -0
- package/dist/drivers/process.d.ts.map +1 -0
- package/dist/drivers/process.js +257 -0
- package/dist/drivers/process.js.map +1 -0
- package/dist/drivers/redact.d.ts +4 -0
- package/dist/drivers/redact.d.ts.map +1 -0
- package/dist/drivers/redact.js +24 -0
- package/dist/drivers/redact.js.map +1 -0
- package/dist/drivers/seccomp-helper-source.d.ts +7 -0
- package/dist/drivers/seccomp-helper-source.d.ts.map +1 -0
- package/dist/drivers/seccomp-helper-source.js +121 -0
- package/dist/drivers/seccomp-helper-source.js.map +1 -0
- package/dist/drivers/utils.d.ts +4 -0
- package/dist/drivers/utils.d.ts.map +1 -0
- package/dist/drivers/utils.js +5 -0
- package/dist/drivers/utils.js.map +1 -0
- package/dist/drivers/workspace.d.ts +6 -0
- package/dist/drivers/workspace.d.ts.map +1 -0
- package/dist/drivers/workspace.js +49 -0
- package/dist/drivers/workspace.js.map +1 -0
- package/dist/extensions/provider-adapter.d.ts +48 -0
- package/dist/extensions/provider-adapter.d.ts.map +1 -0
- package/dist/extensions/provider-adapter.js +64 -0
- package/dist/extensions/provider-adapter.js.map +1 -0
- package/dist/host.d.ts +33 -0
- package/dist/host.d.ts.map +1 -0
- package/dist/host.js +20 -0
- package/dist/host.js.map +1 -0
- package/dist/index.d.ts +19 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -1
- package/dist/index.js.map +1 -1
- package/dist/model/artifact-collection.d.ts +84 -0
- package/dist/model/artifact-collection.d.ts.map +1 -0
- package/dist/model/artifact-collection.js +185 -0
- package/dist/model/artifact-collection.js.map +1 -0
- package/dist/model/authority.d.ts +89 -0
- package/dist/model/authority.d.ts.map +1 -0
- package/dist/model/authority.js +80 -0
- package/dist/model/authority.js.map +1 -0
- package/dist/model/bun-targets.d.ts +34 -0
- package/dist/model/bun-targets.d.ts.map +1 -0
- package/dist/model/bun-targets.js +17 -0
- package/dist/model/bun-targets.js.map +1 -0
- package/dist/model/canonical.d.ts +8 -0
- package/dist/model/canonical.d.ts.map +1 -0
- package/dist/model/canonical.js +205 -0
- package/dist/model/canonical.js.map +1 -0
- package/dist/model/catalog.d.ts +76 -0
- package/dist/model/catalog.d.ts.map +1 -0
- package/dist/model/catalog.js +174 -0
- package/dist/model/catalog.js.map +1 -0
- package/dist/model/digest.d.ts +53 -0
- package/dist/model/digest.d.ts.map +1 -0
- package/dist/model/digest.js +127 -0
- package/dist/model/digest.js.map +1 -0
- package/dist/model/errors.d.ts +14 -0
- package/dist/model/errors.d.ts.map +1 -0
- package/dist/model/errors.js +8 -0
- package/dist/model/errors.js.map +1 -0
- package/dist/model/primitives.d.ts +19 -0
- package/dist/model/primitives.d.ts.map +1 -0
- package/dist/model/primitives.js +18 -0
- package/dist/model/primitives.js.map +1 -0
- package/dist/model/pypi.d.ts +12 -0
- package/dist/model/pypi.d.ts.map +1 -0
- package/dist/model/pypi.js +20 -0
- package/dist/model/pypi.js.map +1 -0
- package/dist/model/python-distribution.d.ts +33 -0
- package/dist/model/python-distribution.d.ts.map +1 -0
- package/dist/model/python-distribution.js +367 -0
- package/dist/model/python-distribution.js.map +1 -0
- package/dist/model/secret-patterns.d.ts +2 -0
- package/dist/model/secret-patterns.d.ts.map +1 -0
- package/dist/model/secret-patterns.js +12 -0
- package/dist/model/secret-patterns.js.map +1 -0
- package/dist/platform/bun.d.ts +7 -0
- package/dist/platform/bun.d.ts.map +1 -0
- package/dist/platform/bun.js +15 -0
- package/dist/platform/bun.js.map +1 -0
- package/dist/platform/credentials.d.ts +32 -0
- package/dist/platform/credentials.d.ts.map +1 -0
- package/dist/platform/credentials.js +772 -0
- package/dist/platform/credentials.js.map +1 -0
- package/dist/platform/host-support.d.ts +2 -0
- package/dist/platform/host-support.d.ts.map +1 -0
- package/dist/platform/host-support.js +4 -0
- package/dist/platform/host-support.js.map +1 -0
- package/dist/platform/node.d.ts +7 -0
- package/dist/platform/node.d.ts.map +1 -0
- package/dist/platform/node.js +15 -0
- package/dist/platform/node.js.map +1 -0
- package/dist/platform/release-runtime.d.ts +11 -0
- package/dist/platform/release-runtime.d.ts.map +1 -0
- package/dist/platform/release-runtime.js +34 -0
- package/dist/platform/release-runtime.js.map +1 -0
- package/dist/platform/services.d.ts +15 -0
- package/dist/platform/services.d.ts.map +1 -0
- package/dist/platform/services.js +30 -0
- package/dist/platform/services.js.map +1 -0
- package/dist/platform/source-observer.d.ts +5 -0
- package/dist/platform/source-observer.d.ts.map +1 -0
- package/dist/platform/source-observer.js +159 -0
- package/dist/platform/source-observer.js.map +1 -0
- package/dist/provider-sdk.d.ts +14 -0
- package/dist/provider-sdk.d.ts.map +1 -0
- package/dist/provider-sdk.js +10 -0
- package/dist/provider-sdk.js.map +1 -0
- package/dist/publication/adapter.d.ts +212 -0
- package/dist/publication/adapter.d.ts.map +1 -0
- package/dist/publication/adapter.js +83 -0
- package/dist/publication/adapter.js.map +1 -0
- package/dist/publication/authority.d.ts +137 -0
- package/dist/publication/authority.d.ts.map +1 -0
- package/dist/publication/authority.js +233 -0
- package/dist/publication/authority.js.map +1 -0
- package/dist/publication/catalog-git.d.ts +37 -0
- package/dist/publication/catalog-git.d.ts.map +1 -0
- package/dist/publication/catalog-git.js +451 -0
- package/dist/publication/catalog-git.js.map +1 -0
- package/dist/publication/claim.d.ts +39 -0
- package/dist/publication/claim.d.ts.map +1 -0
- package/dist/publication/claim.js +31 -0
- package/dist/publication/claim.js.map +1 -0
- package/dist/publication/coordinator.d.ts +246 -0
- package/dist/publication/coordinator.d.ts.map +1 -0
- package/dist/publication/coordinator.js +370 -0
- package/dist/publication/coordinator.js.map +1 -0
- package/dist/publication/github.d.ts +36 -0
- package/dist/publication/github.d.ts.map +1 -0
- package/dist/publication/github.js +644 -0
- package/dist/publication/github.js.map +1 -0
- package/dist/publication/http.d.ts +69 -0
- package/dist/publication/http.d.ts.map +1 -0
- package/dist/publication/http.js +29 -0
- package/dist/publication/http.js.map +1 -0
- package/dist/publication/index.d.ts +5 -0
- package/dist/publication/index.d.ts.map +1 -0
- package/dist/publication/index.js +5 -0
- package/dist/publication/index.js.map +1 -0
- package/dist/publication/npm.d.ts +40 -0
- package/dist/publication/npm.d.ts.map +1 -0
- package/dist/publication/npm.js +359 -0
- package/dist/publication/npm.js.map +1 -0
- package/dist/publication/profiles.d.ts +136 -0
- package/dist/publication/profiles.d.ts.map +1 -0
- package/dist/publication/profiles.js +90 -0
- package/dist/publication/profiles.js.map +1 -0
- package/dist/publication/publisher.d.ts +82 -0
- package/dist/publication/publisher.d.ts.map +1 -0
- package/dist/publication/publisher.js +53 -0
- package/dist/publication/publisher.js.map +1 -0
- package/dist/publication/pypi.d.ts +45 -0
- package/dist/publication/pypi.d.ts.map +1 -0
- package/dist/publication/pypi.js +369 -0
- package/dist/publication/pypi.js.map +1 -0
- package/dist/publication/recovery.d.ts +663 -0
- package/dist/publication/recovery.d.ts.map +1 -0
- package/dist/publication/recovery.js +252 -0
- package/dist/publication/recovery.js.map +1 -0
- package/dist/publication/report.d.ts +1061 -0
- package/dist/publication/report.d.ts.map +1 -0
- package/dist/publication/report.js +441 -0
- package/dist/publication/report.js.map +1 -0
- package/dist/recipes/config.d.ts +296 -0
- package/dist/recipes/config.d.ts.map +1 -0
- package/dist/recipes/config.js +325 -0
- package/dist/recipes/config.js.map +1 -0
- package/dist/release/capabilities.d.ts +12 -0
- package/dist/release/capabilities.d.ts.map +1 -0
- package/dist/release/capabilities.js +395 -0
- package/dist/release/capabilities.js.map +1 -0
- package/dist/release/compiler.d.ts +5 -0
- package/dist/release/compiler.d.ts.map +1 -0
- package/dist/release/compiler.js +19 -0
- package/dist/release/compiler.js.map +1 -0
- package/dist/release/config.d.ts +5 -0
- package/dist/release/config.d.ts.map +1 -0
- package/dist/release/config.js +10 -0
- package/dist/release/config.js.map +1 -0
- package/dist/release/context.d.ts +96 -0
- package/dist/release/context.d.ts.map +1 -0
- package/dist/release/context.js +168 -0
- package/dist/release/context.js.map +1 -0
- package/dist/release/graph.d.ts +271 -0
- package/dist/release/graph.d.ts.map +1 -0
- package/dist/release/graph.js +766 -0
- package/dist/release/graph.js.map +1 -0
- package/dist/release/inspect.d.ts +88 -0
- package/dist/release/inspect.d.ts.map +1 -0
- package/dist/release/inspect.js +75 -0
- package/dist/release/inspect.js.map +1 -0
- package/dist/release/prepare.d.ts +24 -0
- package/dist/release/prepare.d.ts.map +1 -0
- package/dist/release/prepare.js +1116 -0
- package/dist/release/prepare.js.map +1 -0
- package/dist/release/prepared-ref.d.ts +60 -0
- package/dist/release/prepared-ref.d.ts.map +1 -0
- package/dist/release/prepared-ref.js +131 -0
- package/dist/release/prepared-ref.js.map +1 -0
- package/dist/release/prepared-store.d.ts +90 -0
- package/dist/release/prepared-store.d.ts.map +1 -0
- package/dist/release/prepared-store.js +337 -0
- package/dist/release/prepared-store.js.map +1 -0
- package/dist/release/prepared.d.ts +172 -0
- package/dist/release/prepared.d.ts.map +1 -0
- package/dist/release/prepared.js +268 -0
- package/dist/release/prepared.js.map +1 -0
- package/dist/release/staging.d.ts +31 -0
- package/dist/release/staging.d.ts.map +1 -0
- package/dist/release/staging.js +218 -0
- package/dist/release/staging.js.map +1 -0
- package/dist/resolve/authored.d.ts +53 -0
- package/dist/resolve/authored.d.ts.map +1 -0
- package/dist/resolve/authored.js +55 -0
- package/dist/resolve/authored.js.map +1 -0
- package/dist/resolve/encode.d.ts +3 -0
- package/dist/resolve/encode.d.ts.map +1 -0
- package/dist/resolve/encode.js +21 -0
- package/dist/resolve/encode.js.map +1 -0
- package/dist/resolve/errors.d.ts +7 -0
- package/dist/resolve/errors.d.ts.map +1 -0
- package/dist/resolve/errors.js +17 -0
- package/dist/resolve/errors.js.map +1 -0
- package/dist/resolve/facts.d.ts +12 -0
- package/dist/resolve/facts.d.ts.map +1 -0
- package/dist/resolve/facts.js +18 -0
- package/dist/resolve/facts.js.map +1 -0
- package/dist/resolve/resolve.d.ts +10 -0
- package/dist/resolve/resolve.d.ts.map +1 -0
- package/dist/resolve/resolve.js +242 -0
- package/dist/resolve/resolve.js.map +1 -0
- package/dist/store.d.ts +11 -0
- package/dist/store.d.ts.map +1 -0
- package/dist/store.js +9 -0
- package/dist/store.js.map +1 -0
- package/examples/README.md +20 -30
- package/examples/github-release/release.config.json +11 -18
- package/examples/homebrew-tap/README.md +11 -0
- package/examples/homebrew-tap/release.config.json +40 -28
- package/examples/multi-target/release.config.json +28 -53
- package/examples/npm-first-publish/release.config.json +23 -25
- package/examples/npm-only/release.config.json +22 -30
- package/examples/portable-cli/README.md +17 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-arm64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-darwin-x64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-arm64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-linux-x64 +1 -0
- package/examples/portable-cli/artifacts/portable-example-0.1.0-windows-x64.exe +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_10_15_x86_64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-macosx_11_0_arm64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_aarch64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-manylinux2014_x86_64.whl +1 -0
- package/examples/portable-cli/artifacts/portable_example-0.1.0-py3-none-win_amd64.whl +1 -0
- package/examples/portable-cli/package.json +9 -0
- package/examples/portable-cli/release.config.json +53 -0
- package/examples/portable-cli/src/cli.ts +3 -0
- package/examples/pypi-registry/README.md +8 -0
- package/examples/scoop-bucket/README.md +10 -0
- package/examples/scoop-bucket/release.config.json +40 -30
- package/package.json +60 -156
- package/src/api/api.ts +365 -0
- package/src/api/errors.ts +36 -0
- package/src/api/input.ts +92 -0
- package/src/api/runtime.ts +14 -0
- package/src/api/types.ts +103 -0
- package/src/capabilities/bun-targets.ts +2 -0
- package/src/capabilities/field-ownership.ts +60 -0
- package/src/capabilities/module.ts +158 -0
- package/src/capabilities/registry.ts +333 -0
- package/src/config/config.ts +48 -0
- package/src/correction/coordinator.ts +336 -0
- package/src/correction/index.ts +2 -0
- package/src/correction/intent.ts +172 -0
- package/src/drivers/archive.ts +102 -0
- package/src/drivers/contain.ts +20 -0
- package/src/drivers/environment.ts +28 -0
- package/src/drivers/errors.ts +6 -0
- package/src/drivers/glob.ts +137 -0
- package/src/drivers/process.ts +340 -0
- package/src/drivers/redact.ts +31 -0
- package/src/drivers/seccomp-helper-source.ts +121 -0
- package/src/drivers/utils.ts +10 -0
- package/src/drivers/workspace.ts +40 -0
- package/src/extensions/provider-adapter.ts +99 -0
- package/src/host.ts +140 -0
- package/src/index.ts +64 -0
- package/src/model/artifact-collection.ts +237 -0
- package/src/model/authority.ts +116 -0
- package/src/model/bun-targets.ts +34 -0
- package/src/model/canonical.ts +205 -0
- package/src/model/catalog.ts +220 -0
- package/src/model/digest.ts +172 -0
- package/src/model/errors.ts +6 -0
- package/src/model/primitives.ts +37 -0
- package/src/model/pypi.ts +30 -0
- package/src/model/python-distribution.ts +360 -0
- package/src/model/secret-patterns.ts +11 -0
- package/src/platform/bun.ts +38 -0
- package/src/platform/credentials.ts +1083 -0
- package/src/platform/host-support.ts +4 -0
- package/src/platform/node.ts +38 -0
- package/src/platform/release-runtime.ts +47 -0
- package/src/platform/services.ts +57 -0
- package/src/platform/source-observer.ts +193 -0
- package/src/provider-sdk.ts +48 -0
- package/src/publication/adapter.ts +132 -0
- package/src/publication/authority.ts +397 -0
- package/src/publication/catalog-git.ts +603 -0
- package/src/publication/claim.ts +51 -0
- package/src/publication/coordinator.ts +578 -0
- package/src/publication/github.ts +954 -0
- package/src/publication/http.ts +101 -0
- package/src/publication/index.ts +4 -0
- package/src/publication/npm.ts +525 -0
- package/src/publication/profiles.ts +94 -0
- package/src/publication/publisher.ts +130 -0
- package/src/publication/pypi.ts +463 -0
- package/src/publication/recovery.ts +349 -0
- package/src/publication/report.ts +628 -0
- package/src/recipes/config.ts +395 -0
- package/src/release/capabilities.ts +459 -0
- package/src/release/compiler.ts +28 -0
- package/src/release/config.ts +12 -0
- package/src/release/context.ts +223 -0
- package/src/release/graph.ts +866 -0
- package/src/release/inspect.ts +83 -0
- package/src/release/prepare.ts +1331 -0
- package/src/release/prepared-ref.ts +193 -0
- package/src/release/prepared-store.ts +377 -0
- package/src/release/prepared.ts +299 -0
- package/src/release/staging.ts +257 -0
- package/src/resolve/authored.ts +64 -0
- package/src/resolve/encode.ts +22 -0
- package/src/resolve/errors.ts +15 -0
- package/src/resolve/facts.ts +18 -0
- package/src/resolve/resolve.ts +328 -0
- package/src/store.ts +28 -0
- package/templates/README.md +55 -72
- package/templates/bun-cli-github/README.md +7 -9
- package/templates/bun-cli-github/release.config.json +35 -73
- package/templates/github-actions/release.yml +57 -0
- package/templates/github-actions/reviewed-release.yml +80 -0
- package/templates/multi-target-homebrew/README.md +10 -0
- package/templates/multi-target-homebrew/release.config.json +43 -60
- package/templates/multi-target-scoop/README.md +10 -0
- package/templates/multi-target-scoop/release.config.json +43 -62
- package/templates/npm-github/release.config.json +25 -38
- package/templates/npm-github/reviewed-release.config.json +37 -0
- package/templates/npm-only/README.md +10 -0
- package/templates/npm-only/release.config.json +15 -30
- package/templates/portable-cli/README.md +13 -0
- package/templates/portable-cli/release.config.json +53 -0
- package/dist/artifacts/adapter.d.ts +0 -39
- package/dist/artifacts/adapter.d.ts.map +0 -1
- package/dist/artifacts/adapter.js +0 -23
- package/dist/artifacts/adapter.js.map +0 -1
- package/dist/artifacts/registry.d.ts +0 -21
- package/dist/artifacts/registry.d.ts.map +0 -1
- package/dist/artifacts/registry.js +0 -21
- package/dist/artifacts/registry.js.map +0 -1
- package/dist/config/errors.d.ts +0 -24
- package/dist/config/errors.d.ts.map +0 -1
- package/dist/config/errors.js +0 -19
- package/dist/config/errors.js.map +0 -1
- package/dist/config/load.d.ts +0 -9
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js +0 -29
- package/dist/config/load.js.map +0 -1
- package/dist/config/schema.d.ts +0 -12
- package/dist/config/schema.d.ts.map +0 -1
- package/dist/config/schema.js +0 -19
- package/dist/config/schema.js.map +0 -1
- package/dist/domain/artifact.d.ts +0 -118
- package/dist/domain/artifact.d.ts.map +0 -1
- package/dist/domain/artifact.js +0 -197
- package/dist/domain/artifact.js.map +0 -1
- package/dist/domain/evidence.d.ts +0 -59
- package/dist/domain/evidence.d.ts.map +0 -1
- package/dist/domain/evidence.js +0 -51
- package/dist/domain/evidence.js.map +0 -1
- package/dist/domain/operation.d.ts +0 -143
- package/dist/domain/operation.d.ts.map +0 -1
- package/dist/domain/operation.js +0 -198
- package/dist/domain/operation.js.map +0 -1
- package/dist/domain/release.d.ts +0 -93
- package/dist/domain/release.d.ts.map +0 -1
- package/dist/domain/release.js +0 -82
- package/dist/domain/release.js.map +0 -1
- package/dist/domain/remote-state.d.ts +0 -58
- package/dist/domain/remote-state.d.ts.map +0 -1
- package/dist/domain/remote-state.js +0 -55
- package/dist/domain/remote-state.js.map +0 -1
- package/dist/domain/target.d.ts +0 -148
- package/dist/domain/target.d.ts.map +0 -1
- package/dist/domain/target.js +0 -151
- package/dist/domain/target.js.map +0 -1
- package/dist/host/host.d.ts +0 -32
- package/dist/host/host.d.ts.map +0 -1
- package/dist/host/host.js +0 -24
- package/dist/host/host.js.map +0 -1
- package/dist/host/http-live.d.ts +0 -6
- package/dist/host/http-live.d.ts.map +0 -1
- package/dist/host/http-live.js +0 -86
- package/dist/host/http-live.js.map +0 -1
- package/dist/host/http.d.ts +0 -43
- package/dist/host/http.d.ts.map +0 -1
- package/dist/host/http.js +0 -59
- package/dist/host/http.js.map +0 -1
- package/dist/host/platform.d.ts +0 -10
- package/dist/host/platform.d.ts.map +0 -1
- package/dist/host/platform.js +0 -114
- package/dist/host/platform.js.map +0 -1
- package/dist/host/test.d.ts +0 -23
- package/dist/host/test.d.ts.map +0 -1
- package/dist/host/test.js +0 -222
- package/dist/host/test.js.map +0 -1
- package/dist/internal/workspace-path.d.ts +0 -15
- package/dist/internal/workspace-path.d.ts.map +0 -1
- package/dist/internal/workspace-path.js +0 -36
- package/dist/internal/workspace-path.js.map +0 -1
- package/dist/planner/artifact-inventory.d.ts +0 -9
- package/dist/planner/artifact-inventory.d.ts.map +0 -1
- package/dist/planner/artifact-inventory.js +0 -86
- package/dist/planner/artifact-inventory.js.map +0 -1
- package/dist/planner/create-release-plan.d.ts +0 -5
- package/dist/planner/create-release-plan.d.ts.map +0 -1
- package/dist/planner/create-release-plan.js +0 -25
- package/dist/planner/create-release-plan.js.map +0 -1
- package/dist/planner/errors.d.ts +0 -67
- package/dist/planner/errors.d.ts.map +0 -1
- package/dist/planner/errors.js +0 -58
- package/dist/planner/errors.js.map +0 -1
- package/dist/planner/evidence-recorder.d.ts +0 -28
- package/dist/planner/evidence-recorder.d.ts.map +0 -1
- package/dist/planner/evidence-recorder.js +0 -362
- package/dist/planner/evidence-recorder.js.map +0 -1
- package/dist/planner/executor.d.ts +0 -58
- package/dist/planner/executor.d.ts.map +0 -1
- package/dist/planner/executor.js +0 -147
- package/dist/planner/executor.js.map +0 -1
- package/dist/planner/normalize-release.d.ts +0 -19
- package/dist/planner/normalize-release.d.ts.map +0 -1
- package/dist/planner/normalize-release.js +0 -342
- package/dist/planner/normalize-release.js.map +0 -1
- package/dist/planner/reconcile.d.ts +0 -17
- package/dist/planner/reconcile.d.ts.map +0 -1
- package/dist/planner/reconcile.js +0 -259
- package/dist/planner/reconcile.js.map +0 -1
- package/dist/planner/render-plan.d.ts +0 -15
- package/dist/planner/render-plan.d.ts.map +0 -1
- package/dist/planner/render-plan.js +0 -231
- package/dist/planner/render-plan.js.map +0 -1
- package/dist/targets/adapter-helpers.d.ts +0 -79
- package/dist/targets/adapter-helpers.d.ts.map +0 -1
- package/dist/targets/adapter-helpers.js +0 -194
- package/dist/targets/adapter-helpers.js.map +0 -1
- package/dist/targets/adapter.d.ts +0 -17
- package/dist/targets/adapter.d.ts.map +0 -1
- package/dist/targets/adapter.js +0 -2
- package/dist/targets/adapter.js.map +0 -1
- package/dist/targets/github-release.d.ts +0 -25
- package/dist/targets/github-release.d.ts.map +0 -1
- package/dist/targets/github-release.js +0 -82
- package/dist/targets/github-release.js.map +0 -1
- package/dist/targets/github.d.ts +0 -11
- package/dist/targets/github.d.ts.map +0 -1
- package/dist/targets/github.js +0 -117
- package/dist/targets/github.js.map +0 -1
- package/dist/targets/homebrew.d.ts +0 -11
- package/dist/targets/homebrew.d.ts.map +0 -1
- package/dist/targets/homebrew.js +0 -210
- package/dist/targets/homebrew.js.map +0 -1
- package/dist/targets/live.d.ts +0 -5
- package/dist/targets/live.d.ts.map +0 -1
- package/dist/targets/live.js +0 -50
- package/dist/targets/live.js.map +0 -1
- package/dist/targets/npm.d.ts +0 -10
- package/dist/targets/npm.d.ts.map +0 -1
- package/dist/targets/npm.js +0 -112
- package/dist/targets/npm.js.map +0 -1
- package/dist/targets/pypi.d.ts +0 -11
- package/dist/targets/pypi.d.ts.map +0 -1
- package/dist/targets/pypi.js +0 -141
- package/dist/targets/pypi.js.map +0 -1
- package/dist/targets/registry.d.ts +0 -25
- package/dist/targets/registry.d.ts.map +0 -1
- package/dist/targets/registry.js +0 -34
- package/dist/targets/registry.js.map +0 -1
- package/dist/targets/scoop.d.ts +0 -11
- package/dist/targets/scoop.d.ts.map +0 -1
- package/dist/targets/scoop.js +0 -88
- package/dist/targets/scoop.js.map +0 -1
- package/dist/types/effect-internal.d.ts +0 -5
- package/dist/types/effect-internal.d.ts.map +0 -1
- package/dist/types/effect-internal.js +0 -2
- package/dist/types/effect-internal.js.map +0 -1
- package/dist/workflows/config.d.ts +0 -202
- package/dist/workflows/config.d.ts.map +0 -1
- package/dist/workflows/config.js +0 -420
- package/dist/workflows/config.js.map +0 -1
- package/dist/workflows/diagnostics.d.ts +0 -62
- package/dist/workflows/diagnostics.d.ts.map +0 -1
- package/dist/workflows/diagnostics.js +0 -530
- package/dist/workflows/diagnostics.js.map +0 -1
- package/dist/workflows/distribution.d.ts +0 -25
- package/dist/workflows/distribution.d.ts.map +0 -1
- package/dist/workflows/distribution.js +0 -24
- package/dist/workflows/distribution.js.map +0 -1
- package/dist/workflows/evidence.d.ts +0 -17
- package/dist/workflows/evidence.d.ts.map +0 -1
- package/dist/workflows/evidence.js +0 -32
- package/dist/workflows/evidence.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -8
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js +0 -7
- package/dist/workflows/index.js.map +0 -1
- package/dist/workflows/init.d.ts +0 -84
- package/dist/workflows/init.d.ts.map +0 -1
- package/dist/workflows/init.js +0 -487
- package/dist/workflows/init.js.map +0 -1
- package/dist/workflows/live.d.ts +0 -9
- package/dist/workflows/live.d.ts.map +0 -1
- package/dist/workflows/live.js +0 -7
- package/dist/workflows/live.js.map +0 -1
- package/dist/workflows/options.d.ts +0 -30
- package/dist/workflows/options.d.ts.map +0 -1
- package/dist/workflows/options.js +0 -16
- package/dist/workflows/options.js.map +0 -1
- package/examples/non-strict-skips/artifacts/release-example-skips-0.1.0.tgz +0 -1
- package/examples/non-strict-skips/release.config.json +0 -31
- package/examples/pypi-registry/release.config.json +0 -31
- package/templates/github-actions/plan-and-approved-execute.yml +0 -58
- package/templates/github-actions/plan-only.yml +0 -33
- package/templates/github-actions/trusted-publishing.yml +0 -61
|
@@ -0,0 +1,248 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import type { CredentialProviderShape } from "../publication/authority.js";
|
|
4
|
+
import type { AuthorizedMutationHttpShape, HttpAuthorizerShape } from "../publication/http.js";
|
|
5
|
+
import type { ReleaseReport } from "../publication/report.js";
|
|
6
|
+
import type { PreparedBundle } from "../release/prepared-store.js";
|
|
7
|
+
import { type AuthoredCorrection, type CorrectionIntent } from "./intent.js";
|
|
8
|
+
declare const CorrectionValidationError_base: Schema.Class<CorrectionValidationError, Schema.TaggedStruct<"CorrectionValidationError", {
|
|
9
|
+
readonly reason: Schema.String;
|
|
10
|
+
}>, import("effect/Cause").YieldableError>;
|
|
11
|
+
export declare class CorrectionValidationError extends CorrectionValidationError_base {
|
|
12
|
+
}
|
|
13
|
+
declare const CorrectionUnsupported_base: Schema.Class<CorrectionUnsupported, Schema.TaggedStruct<"CorrectionUnsupported", {
|
|
14
|
+
readonly provider: Schema.Literals<readonly ["npm", "github", "catalog-git"]>;
|
|
15
|
+
readonly reason: Schema.String;
|
|
16
|
+
readonly evidence: Schema.NonEmptyString;
|
|
17
|
+
readonly proposal: Schema.optionalKey<Schema.String>;
|
|
18
|
+
}>, {}>;
|
|
19
|
+
export declare class CorrectionUnsupported extends CorrectionUnsupported_base {
|
|
20
|
+
}
|
|
21
|
+
export interface CorrectionExecuted {
|
|
22
|
+
readonly _tag: "CorrectionExecuted";
|
|
23
|
+
readonly provider: "catalog-git";
|
|
24
|
+
readonly report: ReleaseReport;
|
|
25
|
+
readonly reason: string;
|
|
26
|
+
readonly evidence: string;
|
|
27
|
+
readonly proposal: string;
|
|
28
|
+
}
|
|
29
|
+
export type CorrectionOutcome = typeof CorrectionUnsupported.Type | CorrectionExecuted;
|
|
30
|
+
/** Resolve human intent only after the exact prepared bundle has been loaded. */
|
|
31
|
+
export declare const bindAuthoredCorrection: (bundle: PreparedBundle, authored: AuthoredCorrection) => CorrectionIntent;
|
|
32
|
+
export declare const verifyCorrectionIntent: (bundle: PreparedBundle, intent: CorrectionIntent) => void;
|
|
33
|
+
/**
|
|
34
|
+
* The only correction entry point. Provider adapters are built at the host
|
|
35
|
+
* boundary. Neither admitted provider currently exposes a conditional write
|
|
36
|
+
* that protects the exact observed generation, so a validated intent becomes
|
|
37
|
+
* an external proposal and never a read-then-unconditional mutation.
|
|
38
|
+
*/
|
|
39
|
+
export declare const correctPreparedRelease: (input: {
|
|
40
|
+
readonly bundle: PreparedBundle;
|
|
41
|
+
readonly intent: CorrectionIntent;
|
|
42
|
+
readonly services?: {
|
|
43
|
+
readonly credentials: CredentialProviderShape;
|
|
44
|
+
readonly http: HttpAuthorizerShape;
|
|
45
|
+
readonly mutationHttp: AuthorizedMutationHttpShape;
|
|
46
|
+
};
|
|
47
|
+
}) => Effect.Effect<CorrectionUnsupported | {
|
|
48
|
+
readonly _tag: "CorrectionExecuted";
|
|
49
|
+
readonly provider: "catalog-git";
|
|
50
|
+
readonly report: {
|
|
51
|
+
readonly subjects: readonly [{
|
|
52
|
+
readonly _tag: "NotReached";
|
|
53
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
54
|
+
readonly reason: import("../publication/report.js").DependencyBlocked | import("../publication/report.js").RunAborted;
|
|
55
|
+
} | {
|
|
56
|
+
readonly _tag: "AlreadyEquivalent";
|
|
57
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
58
|
+
readonly observationAuthorities: readonly {
|
|
59
|
+
readonly _tag: "AuthorityAcquired";
|
|
60
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
61
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
62
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
63
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
64
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
65
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
66
|
+
}[];
|
|
67
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
68
|
+
} | {
|
|
69
|
+
readonly _tag: "ConvergedAfterMutation";
|
|
70
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
71
|
+
readonly observationAuthorities: readonly {
|
|
72
|
+
readonly _tag: "AuthorityAcquired";
|
|
73
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
74
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
75
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
76
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
77
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
78
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
79
|
+
}[];
|
|
80
|
+
readonly preObservations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
81
|
+
readonly decision: import("../publication/report.js").NeedsMutation | import("../publication/report.js").ProviderAuthorizedCreate;
|
|
82
|
+
readonly authority: {
|
|
83
|
+
readonly _tag: "AuthorityAcquired";
|
|
84
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
85
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
86
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
87
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
88
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
89
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
90
|
+
};
|
|
91
|
+
readonly attempt: import("../publication/report.js").RejectedByProvider | import("../publication/report.js").Applied | import("../publication/report.js").OutcomeUnknown;
|
|
92
|
+
readonly postObservations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
93
|
+
} | {
|
|
94
|
+
readonly _tag: "BlockedSubject";
|
|
95
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
96
|
+
readonly observationAuthorities: readonly {
|
|
97
|
+
readonly _tag: "AuthorityAcquired";
|
|
98
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
99
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
100
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
101
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
102
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
103
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
104
|
+
}[];
|
|
105
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
106
|
+
readonly cause: import("../publication/report.js").Conflict | import("../publication/report.js").ProviderBlocked | import("../publication/report.js").RejectedBeforeDispatch | {
|
|
107
|
+
readonly _tag: "AuthorityAcquiredButMutationNotDispatched";
|
|
108
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
109
|
+
readonly authority: {
|
|
110
|
+
readonly _tag: "AuthorityAcquired";
|
|
111
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
112
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
113
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
114
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
115
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
116
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
117
|
+
};
|
|
118
|
+
readonly attempt: import("../publication/report.js").RejectedBeforeDispatch;
|
|
119
|
+
} | import("../publication/report.js").ConclusiveProviderRejection;
|
|
120
|
+
} | {
|
|
121
|
+
readonly _tag: "UncertainSubject";
|
|
122
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
123
|
+
readonly observationAuthorities: readonly {
|
|
124
|
+
readonly _tag: "AuthorityAcquired";
|
|
125
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
126
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
127
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
128
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
129
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
130
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
131
|
+
}[];
|
|
132
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
133
|
+
readonly authority: {
|
|
134
|
+
readonly _tag: "AuthorityAcquired";
|
|
135
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
136
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
137
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
138
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
139
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
140
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
141
|
+
};
|
|
142
|
+
readonly attempt: import("../publication/report.js").Started | import("../publication/report.js").RejectedByProvider | import("../publication/report.js").Applied | import("../publication/report.js").OutcomeUnknown;
|
|
143
|
+
readonly trace: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
144
|
+
readonly decision?: import("../publication/report.js").NeedsMutation | import("../publication/report.js").ProviderAuthorizedCreate | import("../publication/report.js").ProviderAlreadyEquivalent | import("../publication/report.js").Conflict | import("../publication/report.js").ProviderBlocked;
|
|
145
|
+
}, ...({
|
|
146
|
+
readonly _tag: "NotReached";
|
|
147
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
148
|
+
readonly reason: import("../publication/report.js").DependencyBlocked | import("../publication/report.js").RunAborted;
|
|
149
|
+
} | {
|
|
150
|
+
readonly _tag: "AlreadyEquivalent";
|
|
151
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
152
|
+
readonly observationAuthorities: readonly {
|
|
153
|
+
readonly _tag: "AuthorityAcquired";
|
|
154
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
155
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
156
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
157
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
158
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
159
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
160
|
+
}[];
|
|
161
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
162
|
+
} | {
|
|
163
|
+
readonly _tag: "ConvergedAfterMutation";
|
|
164
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
165
|
+
readonly observationAuthorities: readonly {
|
|
166
|
+
readonly _tag: "AuthorityAcquired";
|
|
167
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
168
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
169
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
170
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
171
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
172
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
173
|
+
}[];
|
|
174
|
+
readonly preObservations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
175
|
+
readonly decision: import("../publication/report.js").NeedsMutation | import("../publication/report.js").ProviderAuthorizedCreate;
|
|
176
|
+
readonly authority: {
|
|
177
|
+
readonly _tag: "AuthorityAcquired";
|
|
178
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
179
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
180
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
181
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
182
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
183
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
184
|
+
};
|
|
185
|
+
readonly attempt: import("../publication/report.js").RejectedByProvider | import("../publication/report.js").Applied | import("../publication/report.js").OutcomeUnknown;
|
|
186
|
+
readonly postObservations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
187
|
+
} | {
|
|
188
|
+
readonly _tag: "BlockedSubject";
|
|
189
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
190
|
+
readonly observationAuthorities: readonly {
|
|
191
|
+
readonly _tag: "AuthorityAcquired";
|
|
192
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
193
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
194
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
195
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
196
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
197
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
198
|
+
}[];
|
|
199
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
200
|
+
readonly cause: import("../publication/report.js").Conflict | import("../publication/report.js").ProviderBlocked | import("../publication/report.js").RejectedBeforeDispatch | {
|
|
201
|
+
readonly _tag: "AuthorityAcquiredButMutationNotDispatched";
|
|
202
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
203
|
+
readonly authority: {
|
|
204
|
+
readonly _tag: "AuthorityAcquired";
|
|
205
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
206
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
207
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
208
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
209
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
210
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
211
|
+
};
|
|
212
|
+
readonly attempt: import("../publication/report.js").RejectedBeforeDispatch;
|
|
213
|
+
} | import("../publication/report.js").ConclusiveProviderRejection;
|
|
214
|
+
} | {
|
|
215
|
+
readonly _tag: "UncertainSubject";
|
|
216
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
217
|
+
readonly observationAuthorities: readonly {
|
|
218
|
+
readonly _tag: "AuthorityAcquired";
|
|
219
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
220
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
221
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
222
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
223
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
224
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
225
|
+
}[];
|
|
226
|
+
readonly observations: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
227
|
+
readonly authority: {
|
|
228
|
+
readonly _tag: "AuthorityAcquired";
|
|
229
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
230
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
231
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
232
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
233
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
234
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
235
|
+
};
|
|
236
|
+
readonly attempt: import("../publication/report.js").Started | import("../publication/report.js").RejectedByProvider | import("../publication/report.js").Applied | import("../publication/report.js").OutcomeUnknown;
|
|
237
|
+
readonly trace: readonly [import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation, ...(import("../publication/report.js").PresentEquivalent | import("../publication/report.js").PresentDifferent | import("../publication/report.js").AuthoritativelyAbsent | import("../publication/report.js").VisibilityPending | import("../publication/report.js").InconclusiveObservation)[]];
|
|
238
|
+
readonly decision?: import("../publication/report.js").NeedsMutation | import("../publication/report.js").ProviderAuthorizedCreate | import("../publication/report.js").ProviderAlreadyEquivalent | import("../publication/report.js").Conflict | import("../publication/report.js").ProviderBlocked;
|
|
239
|
+
})[]];
|
|
240
|
+
readonly status: "complete" | "blocked" | "uncertain";
|
|
241
|
+
};
|
|
242
|
+
readonly reason: "Catalog correction ran through the exact conditional Git-data subject.";
|
|
243
|
+
readonly evidence: "docs/release-program/remediation/231-catalog-delivery.md";
|
|
244
|
+
readonly proposal: "";
|
|
245
|
+
}, import("../publication/coordinator.js").ReleaseCoordinatorConstructionError | CorrectionValidationError, never>;
|
|
246
|
+
export declare const correctionEvidenceProjection: (intent: CorrectionIntent) => string;
|
|
247
|
+
export {};
|
|
248
|
+
//# sourceMappingURL=coordinator.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":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,CAAC,WAAW,EAAE,uBAAuB,CAAA;QAC7C,QAAQ,CAAC,IAAI,EAAE,mBAAmB,CAAA;QAClC,QAAQ,CAAC,YAAY,EAAE,2BAA2B,CAAA;KACnD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kHAoED,CAAA;AAEF,eAAO,MAAM,4BAA4B,GAAI,QAAQ,gBAAgB,KAAG,MAOvE,CAAA"}
|
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Schema from "effect/Schema";
|
|
3
|
+
import { encodeCanonicalJson } from "../model/canonical.js";
|
|
4
|
+
import { digestEquals, parseSha256Hex, sha256Digest, sha512Digest } from "../model/digest.js";
|
|
5
|
+
import { CatalogManagedState, PreparedCatalogDownload, compareCatalogVersions, decodeCatalogManagedState, encodeCatalogManagedState, renderCatalog } from "../model/catalog.js";
|
|
6
|
+
import { SubjectId } from "../model/authority.js";
|
|
7
|
+
import { CredentialProvider } from "../publication/authority.js";
|
|
8
|
+
import { publishReleaseSubjects } from "../publication/coordinator.js";
|
|
9
|
+
import { makeCatalogSubject } from "../publication/catalog-git.js";
|
|
10
|
+
import { PreparedPublication, encodePreparedRelease } from "../release/prepared.js";
|
|
11
|
+
import { CorrectionIntentV2, encodeCorrectionIntent, makeCorrectionIntent } from "./intent.js";
|
|
12
|
+
export class CorrectionValidationError extends Schema.TaggedErrorClass()("CorrectionValidationError", {
|
|
13
|
+
reason: Schema.String
|
|
14
|
+
}) {
|
|
15
|
+
}
|
|
16
|
+
export class CorrectionUnsupported extends Schema.TaggedClass()("CorrectionUnsupported", {
|
|
17
|
+
provider: Schema.Literals(["npm", "github", "catalog-git"]), reason: Schema.String, evidence: Schema.NonEmptyString,
|
|
18
|
+
proposal: Schema.optionalKey(Schema.String)
|
|
19
|
+
}) {
|
|
20
|
+
}
|
|
21
|
+
const preparedDigest = (bundle) => sha256Digest(encodePreparedRelease(bundle.manifest));
|
|
22
|
+
const publicationBaselineDigest = (publication) => sha256Digest(new TextEncoder().encode(encodeCanonicalJson(Schema.encodeSync(PreparedPublication)(publication))));
|
|
23
|
+
const findPublication = (bundle, id) => bundle.manifest.publications.find((publication) => publication.id.toString() === id);
|
|
24
|
+
const choosePublication = (bundle, tag, publicationId) => {
|
|
25
|
+
const candidates = bundle.manifest.publications.filter((publication) => publication._tag === tag && (publicationId === undefined || publication.id.toString() === publicationId.toString()));
|
|
26
|
+
if (candidates.length !== 1) {
|
|
27
|
+
throw new Error(publicationId === undefined
|
|
28
|
+
? `Authored correction requires exactly one ${tag === "PreparedNpmPublication" ? "npm" : tag === "PreparedGitHubPublication" ? "GitHub" : "catalog Git"} publication; specify publicationId when more than one exists.`
|
|
29
|
+
: `Authored correction publicationId ${publicationId} does not identify exactly one prepared ${tag === "PreparedNpmPublication" ? "npm" : tag === "PreparedGitHubPublication" ? "GitHub" : "catalog Git"} publication.`);
|
|
30
|
+
}
|
|
31
|
+
return candidates[0];
|
|
32
|
+
};
|
|
33
|
+
/** Resolve human intent only after the exact prepared bundle has been loaded. */
|
|
34
|
+
export const bindAuthoredCorrection = (bundle, authored) => {
|
|
35
|
+
const digest = preparedDigest(bundle);
|
|
36
|
+
if (authored.provider === "npm") {
|
|
37
|
+
const publication = choosePublication(bundle, "PreparedNpmPublication", authored.publicationId);
|
|
38
|
+
const artifact = bundle.manifest.artifacts.find((candidate) => candidate.id === publication.artifactId);
|
|
39
|
+
const bytes = artifact === undefined ? undefined : bundle.blobs.get(artifact.id.toString());
|
|
40
|
+
if (bytes === undefined)
|
|
41
|
+
throw new Error("Prepared npm correction subject has no verified tarball bytes.");
|
|
42
|
+
return makeCorrectionIntent({
|
|
43
|
+
schemaVersion: "correction-intent/v2",
|
|
44
|
+
preparedDigest: digest,
|
|
45
|
+
correction: {
|
|
46
|
+
_tag: "NpmDeprecationCorrection",
|
|
47
|
+
provider: "npm",
|
|
48
|
+
publicationId: publication.id,
|
|
49
|
+
registryUrl: publication.registryUrl,
|
|
50
|
+
packageName: publication.packageName,
|
|
51
|
+
version: publication.version,
|
|
52
|
+
baselineDigest: publicationBaselineDigest(publication),
|
|
53
|
+
tarballIntegrity: sha512Digest(bytes),
|
|
54
|
+
message: authored.message,
|
|
55
|
+
...(authored.replacement === undefined ? {} : { replacement: authored.replacement })
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (authored.provider === "catalog-git") {
|
|
60
|
+
const publication = choosePublication(bundle, "PreparedCatalogPublication", authored.publicationId);
|
|
61
|
+
if (compareCatalogVersions(publication.version.toString(), authored.replacementVersion.toString()) >= 0) {
|
|
62
|
+
throw new Error("Catalog correction replacementVersion must be SemVer-greater than the prepared generation.");
|
|
63
|
+
}
|
|
64
|
+
const expectedArchitectures = publication.renderer.downloads.map((download) => download.architecture).sort();
|
|
65
|
+
const observedArchitectures = authored.downloads.map((download) => download.architecture).sort();
|
|
66
|
+
if (new Set(observedArchitectures).size !== observedArchitectures.length ||
|
|
67
|
+
expectedArchitectures.join("\n") !== observedArchitectures.join("\n")) {
|
|
68
|
+
throw new Error("Catalog correction downloads must replace the exact prepared architecture set.");
|
|
69
|
+
}
|
|
70
|
+
const downloads = authored.downloads.map((download) => {
|
|
71
|
+
const expectedUrl = `https://github.com/${publication.sourceRepository}/releases/download/${encodeURIComponent(authored.replacementTag)}/${encodeURIComponent(download.filename)}`;
|
|
72
|
+
if (download.url !== expectedUrl) {
|
|
73
|
+
throw new Error("Catalog correction download URL must be the exact replacement GitHub release asset coordinate.");
|
|
74
|
+
}
|
|
75
|
+
return PreparedCatalogDownload.make({
|
|
76
|
+
architecture: download.architecture,
|
|
77
|
+
url: download.url,
|
|
78
|
+
filename: download.filename,
|
|
79
|
+
sha256: parseSha256Hex(download.sha256)
|
|
80
|
+
});
|
|
81
|
+
});
|
|
82
|
+
const target = bundle.blobs.get(publication.targetArtifactId.toString());
|
|
83
|
+
const state = bundle.blobs.get(publication.stateArtifactId.toString());
|
|
84
|
+
if (target === undefined || state === undefined ||
|
|
85
|
+
!digestEquals(sha256Digest(target), publication.targetDigest) ||
|
|
86
|
+
!digestEquals(sha256Digest(state), publication.stateDigest)) {
|
|
87
|
+
throw new Error("Prepared catalog correction subject has no exact target/state baseline bytes.");
|
|
88
|
+
}
|
|
89
|
+
const managed = decodeCatalogManagedState(state);
|
|
90
|
+
if (managed === undefined || managed.status !== "active" || managed.generation !== publication.version ||
|
|
91
|
+
!digestEquals(managed.targetDigest, publication.targetDigest)) {
|
|
92
|
+
throw new Error("Prepared catalog correction baseline is not one canonical active managed pair.");
|
|
93
|
+
}
|
|
94
|
+
return makeCorrectionIntent({
|
|
95
|
+
schemaVersion: "correction-intent/v2",
|
|
96
|
+
preparedDigest: digest,
|
|
97
|
+
correction: {
|
|
98
|
+
_tag: "CatalogForwardCorrection",
|
|
99
|
+
provider: "catalog-git",
|
|
100
|
+
publicationId: publication.id,
|
|
101
|
+
baselineDigest: publicationBaselineDigest(publication),
|
|
102
|
+
baselineTargetDigest: publication.targetDigest,
|
|
103
|
+
baselineStateDigest: publication.stateDigest,
|
|
104
|
+
replacementVersion: authored.replacementVersion,
|
|
105
|
+
replacementTag: authored.replacementTag,
|
|
106
|
+
downloads,
|
|
107
|
+
reason: authored.reason
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
const publication = choosePublication(bundle, "PreparedGitHubPublication", authored.publicationId);
|
|
112
|
+
return makeCorrectionIntent({
|
|
113
|
+
schemaVersion: "correction-intent/v2",
|
|
114
|
+
preparedDigest: digest,
|
|
115
|
+
correction: {
|
|
116
|
+
_tag: "GithubReleaseCorrection",
|
|
117
|
+
provider: "github",
|
|
118
|
+
publicationId: publication.id,
|
|
119
|
+
repository: publication.repository,
|
|
120
|
+
tag: publication.tag,
|
|
121
|
+
baselineDigest: publicationBaselineDigest(publication),
|
|
122
|
+
marker: authored.message,
|
|
123
|
+
...(authored.replacement === undefined ? {} : { replacement: authored.replacement })
|
|
124
|
+
}
|
|
125
|
+
});
|
|
126
|
+
};
|
|
127
|
+
const verifyNpm = (bundle, correction) => {
|
|
128
|
+
const publication = findPublication(bundle, correction.publicationId.toString());
|
|
129
|
+
if (publication?._tag !== "PreparedNpmPublication" || publication.registryUrl !== correction.registryUrl ||
|
|
130
|
+
publication.packageName !== correction.packageName || publication.version !== correction.version) {
|
|
131
|
+
throw new Error("npm correction subject is not the exact npm publication in the prepared manifest.");
|
|
132
|
+
}
|
|
133
|
+
if (!digestEquals(publicationBaselineDigest(publication), correction.baselineDigest)) {
|
|
134
|
+
throw new Error("npm correction baseline digest is not the exact prepared publication digest.");
|
|
135
|
+
}
|
|
136
|
+
const artifact = bundle.manifest.artifacts.find((candidate) => candidate.id === publication.artifactId);
|
|
137
|
+
const bytes = artifact === undefined ? undefined : bundle.blobs.get(artifact.id.toString());
|
|
138
|
+
if (bytes === undefined)
|
|
139
|
+
throw new Error("npm correction subject has no verified prepared tarball.");
|
|
140
|
+
const integrity = sha512Digest(bytes);
|
|
141
|
+
if (!digestEquals(integrity, correction.tarballIntegrity)) {
|
|
142
|
+
throw new Error("npm correction tarball integrity is not the prepared artifact integrity.");
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
const verifyGithub = (bundle, correction) => {
|
|
146
|
+
const publication = findPublication(bundle, correction.publicationId.toString());
|
|
147
|
+
if (publication?._tag !== "PreparedGitHubPublication" || publication.repository !== correction.repository || publication.tag !== correction.tag) {
|
|
148
|
+
throw new Error("GitHub correction subject is not the exact GitHub publication in the prepared manifest.");
|
|
149
|
+
}
|
|
150
|
+
if (!digestEquals(publicationBaselineDigest(publication), correction.baselineDigest)) {
|
|
151
|
+
throw new Error("GitHub correction baseline digest is not the exact prepared publication digest.");
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const verifyCatalog = (bundle, correction) => {
|
|
155
|
+
const publication = findPublication(bundle, correction.publicationId.toString());
|
|
156
|
+
if (publication?._tag !== "PreparedCatalogPublication") {
|
|
157
|
+
throw new Error("Catalog correction subject is not the exact catalog publication in the prepared manifest.");
|
|
158
|
+
}
|
|
159
|
+
if (!digestEquals(publicationBaselineDigest(publication), correction.baselineDigest) ||
|
|
160
|
+
!digestEquals(publication.targetDigest, correction.baselineTargetDigest) ||
|
|
161
|
+
!digestEquals(publication.stateDigest, correction.baselineStateDigest)) {
|
|
162
|
+
throw new Error("Catalog correction baseline digest is not the exact prepared target/state publication.");
|
|
163
|
+
}
|
|
164
|
+
if (compareCatalogVersions(publication.version.toString(), correction.replacementVersion.toString()) >= 0) {
|
|
165
|
+
throw new Error("Catalog correction is not a SemVer-forward replacement.");
|
|
166
|
+
}
|
|
167
|
+
const expectedArchitectures = publication.renderer.downloads.map((download) => download.architecture).sort().join("\n");
|
|
168
|
+
const replacementArchitectures = correction.downloads.map((download) => download.architecture).sort().join("\n");
|
|
169
|
+
if (expectedArchitectures !== replacementArchitectures) {
|
|
170
|
+
throw new Error("Catalog correction replacement architecture set differs from the prepared renderer.");
|
|
171
|
+
}
|
|
172
|
+
for (const download of correction.downloads) {
|
|
173
|
+
const expected = `https://github.com/${publication.sourceRepository}/releases/download/${encodeURIComponent(correction.replacementTag)}/${encodeURIComponent(download.filename)}`;
|
|
174
|
+
if (download.url !== expected)
|
|
175
|
+
throw new Error("Catalog correction carries a foreign replacement download coordinate.");
|
|
176
|
+
}
|
|
177
|
+
};
|
|
178
|
+
export const verifyCorrectionIntent = (bundle, intent) => {
|
|
179
|
+
encodeCorrectionIntent(intent);
|
|
180
|
+
if (!digestEquals(preparedDigest(bundle), intent.preparedDigest)) {
|
|
181
|
+
throw new Error("Correction intent is bound to a different prepared release.");
|
|
182
|
+
}
|
|
183
|
+
switch (intent.correction._tag) {
|
|
184
|
+
case "NpmDeprecationCorrection": return verifyNpm(bundle, intent.correction);
|
|
185
|
+
case "GithubReleaseCorrection": return verifyGithub(bundle, intent.correction);
|
|
186
|
+
case "CatalogForwardCorrection": return verifyCatalog(bundle, intent.correction);
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const providerOf = (intent) => intent.correction.provider;
|
|
190
|
+
/**
|
|
191
|
+
* The only correction entry point. Provider adapters are built at the host
|
|
192
|
+
* boundary. Neither admitted provider currently exposes a conditional write
|
|
193
|
+
* that protects the exact observed generation, so a validated intent becomes
|
|
194
|
+
* an external proposal and never a read-then-unconditional mutation.
|
|
195
|
+
*/
|
|
196
|
+
export const correctPreparedRelease = Effect.fn("correctPreparedRelease")(function* (input) {
|
|
197
|
+
try {
|
|
198
|
+
verifyCorrectionIntent(input.bundle, input.intent);
|
|
199
|
+
}
|
|
200
|
+
catch (cause) {
|
|
201
|
+
return yield* Effect.fail(new CorrectionValidationError({ reason: cause instanceof Error ? cause.message : String(cause) }));
|
|
202
|
+
}
|
|
203
|
+
const provider = providerOf(input.intent);
|
|
204
|
+
if (input.intent.correction._tag === "CatalogForwardCorrection") {
|
|
205
|
+
if (input.services === undefined)
|
|
206
|
+
return CorrectionUnsupported.make({
|
|
207
|
+
provider,
|
|
208
|
+
reason: "Catalog correction requires the host-owned credential and GitHub HTTP authority boundary.",
|
|
209
|
+
evidence: "docs/release-program/remediation/231-catalog-delivery.md",
|
|
210
|
+
proposal: new TextDecoder().decode(encodeCorrectionIntent(input.intent))
|
|
211
|
+
});
|
|
212
|
+
const correction = input.intent.correction;
|
|
213
|
+
const publication = findPublication(input.bundle, correction.publicationId.toString());
|
|
214
|
+
if (publication?._tag !== "PreparedCatalogPublication") {
|
|
215
|
+
return yield* new CorrectionValidationError({ reason: "Verified catalog correction publication disappeared." });
|
|
216
|
+
}
|
|
217
|
+
const baselineTarget = input.bundle.blobs.get(publication.targetArtifactId.toString());
|
|
218
|
+
const baselineState = input.bundle.blobs.get(publication.stateArtifactId.toString());
|
|
219
|
+
if (baselineTarget === undefined || baselineState === undefined) {
|
|
220
|
+
return yield* new CorrectionValidationError({ reason: "Verified catalog correction baseline bytes disappeared." });
|
|
221
|
+
}
|
|
222
|
+
const target = renderCatalog(correction.replacementVersion, publication.renderer.renderer, correction.downloads);
|
|
223
|
+
const state = encodeCatalogManagedState(CatalogManagedState.make({
|
|
224
|
+
schemaVersion: "ts-release/catalog-state/v2",
|
|
225
|
+
catalogId: publication.catalogId,
|
|
226
|
+
renderer: publication.renderer.renderer._tag,
|
|
227
|
+
generation: correction.replacementVersion,
|
|
228
|
+
status: "corrected",
|
|
229
|
+
targetDigest: sha256Digest(target),
|
|
230
|
+
sourceRepository: publication.sourceRepository,
|
|
231
|
+
sourceTag: correction.replacementTag,
|
|
232
|
+
correctionId: input.intent.correctionId,
|
|
233
|
+
reason: correction.reason,
|
|
234
|
+
replacementVersion: correction.replacementVersion
|
|
235
|
+
}));
|
|
236
|
+
const subject = makeCatalogSubject(publication, input.services.http, input.services.mutationHttp, {
|
|
237
|
+
id: SubjectId.make(`${publication.authority.subject}#correction-${input.intent.correctionId.hex}`),
|
|
238
|
+
purpose: "correct",
|
|
239
|
+
target,
|
|
240
|
+
state,
|
|
241
|
+
baselineTarget,
|
|
242
|
+
baselineState
|
|
243
|
+
});
|
|
244
|
+
const report = yield* publishReleaseSubjects({
|
|
245
|
+
prepared: SubjectId.make(`correction:sha256-${input.intent.correctionId.hex}`),
|
|
246
|
+
subjects: [subject]
|
|
247
|
+
}).pipe(Effect.provideService(CredentialProvider, input.services.credentials));
|
|
248
|
+
return {
|
|
249
|
+
_tag: "CorrectionExecuted",
|
|
250
|
+
provider: "catalog-git",
|
|
251
|
+
report,
|
|
252
|
+
reason: "Catalog correction ran through the exact conditional Git-data subject.",
|
|
253
|
+
evidence: "docs/release-program/remediation/231-catalog-delivery.md",
|
|
254
|
+
proposal: ""
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
return CorrectionUnsupported.make({
|
|
258
|
+
provider,
|
|
259
|
+
reason: provider === "npm"
|
|
260
|
+
? "npm exposes no proved conditional deprecation write for the observed package generation; use the exact external proposal instead."
|
|
261
|
+
: "GitHub exposes no proved conditional release-metadata write for the observed release generation.",
|
|
262
|
+
evidence: "docs/release-program/remediation/229-provider-recovery.md",
|
|
263
|
+
proposal: new TextDecoder().decode(encodeCorrectionIntent(input.intent))
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
export const correctionEvidenceProjection = (intent) => {
|
|
267
|
+
const encoded = Schema.encodeSync(CorrectionIntentV2)(intent);
|
|
268
|
+
return encodeCanonicalJson({
|
|
269
|
+
correctionId: encoded.correctionId,
|
|
270
|
+
preparedDigest: encoded.preparedDigest,
|
|
271
|
+
provider: providerOf(intent)
|
|
272
|
+
});
|
|
273
|
+
};
|
|
274
|
+
//# sourceMappingURL=coordinator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"coordinator.js","sourceRoot":"","sources":["../../src/correction/coordinator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAA;AAC3D,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AAC7F,OAAO,EACL,mBAAmB,EACnB,uBAAuB,EACvB,sBAAsB,EACtB,yBAAyB,EACzB,yBAAyB,EACzB,aAAa,EACd,MAAM,qBAAqB,CAAA;AAC5B,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AAEjD,OAAO,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAChE,OAAO,EAAE,sBAAsB,EAAE,MAAM,+BAA+B,CAAA;AAEtE,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAA;AA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],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/correction/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,kBAAkB,CAAA"}
|