@mannyc1/ts-release 0.0.6 → 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 -87
- package/CHANGELOG.md +115 -0
- package/LICENSE +21 -0
- package/README.md +272 -540
- package/SPEC.md +206 -305
- 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 +61 -154
- 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 -59
- package/templates/bun-cli-github/README.md +12 -0
- package/templates/bun-cli-github/release.config.json +51 -0
- 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/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 -36
- package/dist/domain/artifact.d.ts.map +0 -1
- package/dist/domain/artifact.js +0 -29
- package/dist/domain/artifact.js.map +0 -1
- package/dist/domain/evidence.d.ts +0 -108
- package/dist/domain/evidence.d.ts.map +0 -1
- package/dist/domain/evidence.js +0 -96
- package/dist/domain/evidence.js.map +0 -1
- package/dist/domain/operation.d.ts +0 -153
- package/dist/domain/operation.d.ts.map +0 -1
- package/dist/domain/operation.js +0 -320
- package/dist/domain/operation.js.map +0 -1
- package/dist/domain/release.d.ts +0 -141
- package/dist/domain/release.d.ts.map +0 -1
- package/dist/domain/release.js +0 -127
- package/dist/domain/release.js.map +0 -1
- package/dist/domain/remote-state.d.ts +0 -85
- package/dist/domain/remote-state.d.ts.map +0 -1
- package/dist/domain/remote-state.js +0 -77
- package/dist/domain/remote-state.js.map +0 -1
- package/dist/domain/status.d.ts +0 -43
- package/dist/domain/status.d.ts.map +0 -1
- package/dist/domain/status.js +0 -51
- package/dist/domain/status.js.map +0 -1
- package/dist/domain/target.d.ts +0 -135
- package/dist/domain/target.d.ts.map +0 -1
- package/dist/domain/target.js +0 -137
- 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/workflow-phases.d.ts +0 -3
- package/dist/internal/workflow-phases.d.ts.map +0 -1
- package/dist/internal/workflow-phases.js +0 -2
- package/dist/internal/workflow-phases.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 -84
- 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 -81
- package/dist/planner/errors.d.ts.map +0 -1
- package/dist/planner/errors.js +0 -70
- package/dist/planner/errors.js.map +0 -1
- package/dist/planner/evidence-recorder.d.ts +0 -26
- package/dist/planner/evidence-recorder.d.ts.map +0 -1
- package/dist/planner/evidence-recorder.js +0 -330
- 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 -159
- package/dist/planner/executor.js.map +0 -1
- package/dist/planner/normalize-release.d.ts +0 -16
- package/dist/planner/normalize-release.d.ts.map +0 -1
- package/dist/planner/normalize-release.js +0 -218
- 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 -261
- package/dist/planner/reconcile.js.map +0 -1
- package/dist/planner/release-eligibility.d.ts +0 -39
- package/dist/planner/release-eligibility.d.ts.map +0 -1
- package/dist/planner/release-eligibility.js +0 -578
- package/dist/planner/release-eligibility.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 -238
- package/dist/planner/render-plan.js.map +0 -1
- package/dist/planner/status.d.ts +0 -40
- package/dist/planner/status.d.ts.map +0 -1
- package/dist/planner/status.js +0 -313
- package/dist/planner/status.js.map +0 -1
- package/dist/targets/adapter-helpers.d.ts +0 -64
- package/dist/targets/adapter-helpers.d.ts.map +0 -1
- package/dist/targets/adapter-helpers.js +0 -124
- 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 -125
- 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 -97
- 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 -118
- 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 -103
- 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 -78
- 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 -252
- package/dist/workflows/config.d.ts.map +0 -1
- package/dist/workflows/config.js +0 -465
- 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 -527
- package/dist/workflows/diagnostics.js.map +0 -1
- package/dist/workflows/evidence.d.ts +0 -26
- package/dist/workflows/evidence.d.ts.map +0 -1
- package/dist/workflows/evidence.js +0 -44
- package/dist/workflows/evidence.js.map +0 -1
- package/dist/workflows/index.d.ts +0 -7
- package/dist/workflows/index.d.ts.map +0 -1
- package/dist/workflows/index.js +0 -6
- 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 -441
- 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,212 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import type { PreparedBundle } from "../release/prepared-store.js";
|
|
3
|
+
import { type ReleaseSubject } from "./coordinator.js";
|
|
4
|
+
import { AuthorizedMutationHttp, HttpAuthorizer } from "./http.js";
|
|
5
|
+
import { CertifiedPublisherSpawn, NpmUserConfigResource } from "./publisher.js";
|
|
6
|
+
import { type CustomProviderAdapter } from "../extensions/provider-adapter.js";
|
|
7
|
+
export { installedPublicationProfiles } from "./profiles.js";
|
|
8
|
+
/**
|
|
9
|
+
* Construct provider subjects only after the caller has loaded and verified
|
|
10
|
+
* the complete prepared bundle. The host authorizer is captured as an opaque
|
|
11
|
+
* sink; transports and credential values never enter the subject contract.
|
|
12
|
+
*/
|
|
13
|
+
export declare const subjectsForPreparedRelease: (bundle: PreparedBundle, adapters?: readonly CustomProviderAdapter[] | undefined) => Effect.Effect<readonly ReleaseSubject[], never, AuthorizedMutationHttp | HttpAuthorizer | NpmUserConfigResource | CertifiedPublisherSpawn>;
|
|
14
|
+
/** Remote, read-only observation through the same provider subjects as publish. */
|
|
15
|
+
export declare const observePreparedRelease: (bundle: PreparedBundle, adapters?: readonly CustomProviderAdapter[] | undefined) => Effect.Effect<{
|
|
16
|
+
readonly subjects: readonly [import("./report.js").ObservedSubject, ...import("./report.js").ObservedSubject[]];
|
|
17
|
+
readonly status: "equivalent" | "different" | "inconclusive";
|
|
18
|
+
}, import("./coordinator.js").ReleaseCoordinatorConstructionError, import("./authority.js").CredentialProvider | AuthorizedMutationHttp | HttpAuthorizer | NpmUserConfigResource | CertifiedPublisherSpawn>;
|
|
19
|
+
/** Dependency-ordered conservative publication through the shared coordinator. */
|
|
20
|
+
export declare const publishPreparedRelease: (bundle: PreparedBundle, adapters?: readonly CustomProviderAdapter[] | undefined) => Effect.Effect<{
|
|
21
|
+
readonly subjects: readonly [{
|
|
22
|
+
readonly _tag: "NotReached";
|
|
23
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
24
|
+
readonly reason: import("./report.js").DependencyBlocked | import("./report.js").RunAborted;
|
|
25
|
+
} | {
|
|
26
|
+
readonly _tag: "AlreadyEquivalent";
|
|
27
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
28
|
+
readonly observationAuthorities: readonly {
|
|
29
|
+
readonly _tag: "AuthorityAcquired";
|
|
30
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
31
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
32
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
33
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
34
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
35
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
36
|
+
}[];
|
|
37
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
38
|
+
} | {
|
|
39
|
+
readonly _tag: "ConvergedAfterMutation";
|
|
40
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
41
|
+
readonly observationAuthorities: readonly {
|
|
42
|
+
readonly _tag: "AuthorityAcquired";
|
|
43
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
44
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
45
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
46
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
47
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
48
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
49
|
+
}[];
|
|
50
|
+
readonly preObservations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
51
|
+
readonly decision: import("./report.js").NeedsMutation | import("./report.js").ProviderAuthorizedCreate;
|
|
52
|
+
readonly authority: {
|
|
53
|
+
readonly _tag: "AuthorityAcquired";
|
|
54
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
55
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
56
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
57
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
58
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
59
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
60
|
+
};
|
|
61
|
+
readonly attempt: import("./report.js").RejectedByProvider | import("./report.js").Applied | import("./report.js").OutcomeUnknown;
|
|
62
|
+
readonly postObservations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
63
|
+
} | {
|
|
64
|
+
readonly _tag: "BlockedSubject";
|
|
65
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
66
|
+
readonly observationAuthorities: readonly {
|
|
67
|
+
readonly _tag: "AuthorityAcquired";
|
|
68
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
69
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
70
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
71
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
72
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
73
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
74
|
+
}[];
|
|
75
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
76
|
+
readonly cause: import("./report.js").Conflict | import("./report.js").ProviderBlocked | import("./report.js").RejectedBeforeDispatch | {
|
|
77
|
+
readonly _tag: "AuthorityAcquiredButMutationNotDispatched";
|
|
78
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
79
|
+
readonly authority: {
|
|
80
|
+
readonly _tag: "AuthorityAcquired";
|
|
81
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
82
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
83
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
84
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
85
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
86
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
87
|
+
};
|
|
88
|
+
readonly attempt: import("./report.js").RejectedBeforeDispatch;
|
|
89
|
+
} | import("./report.js").ConclusiveProviderRejection;
|
|
90
|
+
} | {
|
|
91
|
+
readonly _tag: "UncertainSubject";
|
|
92
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
93
|
+
readonly observationAuthorities: readonly {
|
|
94
|
+
readonly _tag: "AuthorityAcquired";
|
|
95
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
96
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
97
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
98
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
99
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
100
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
101
|
+
}[];
|
|
102
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
103
|
+
readonly authority: {
|
|
104
|
+
readonly _tag: "AuthorityAcquired";
|
|
105
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
106
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
107
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
108
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
109
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
110
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
111
|
+
};
|
|
112
|
+
readonly attempt: import("./report.js").Started | import("./report.js").RejectedByProvider | import("./report.js").Applied | import("./report.js").OutcomeUnknown;
|
|
113
|
+
readonly trace: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
114
|
+
readonly decision?: import("./report.js").NeedsMutation | import("./report.js").ProviderAuthorizedCreate | import("./report.js").ProviderAlreadyEquivalent | import("./report.js").Conflict | import("./report.js").ProviderBlocked;
|
|
115
|
+
}, ...({
|
|
116
|
+
readonly _tag: "NotReached";
|
|
117
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
118
|
+
readonly reason: import("./report.js").DependencyBlocked | import("./report.js").RunAborted;
|
|
119
|
+
} | {
|
|
120
|
+
readonly _tag: "AlreadyEquivalent";
|
|
121
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
122
|
+
readonly observationAuthorities: readonly {
|
|
123
|
+
readonly _tag: "AuthorityAcquired";
|
|
124
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
125
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
126
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
127
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
128
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
129
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
130
|
+
}[];
|
|
131
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
132
|
+
} | {
|
|
133
|
+
readonly _tag: "ConvergedAfterMutation";
|
|
134
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
135
|
+
readonly observationAuthorities: readonly {
|
|
136
|
+
readonly _tag: "AuthorityAcquired";
|
|
137
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
138
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
139
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
140
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
141
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
142
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
143
|
+
}[];
|
|
144
|
+
readonly preObservations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
145
|
+
readonly decision: import("./report.js").NeedsMutation | import("./report.js").ProviderAuthorizedCreate;
|
|
146
|
+
readonly authority: {
|
|
147
|
+
readonly _tag: "AuthorityAcquired";
|
|
148
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
149
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
150
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
151
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
152
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
153
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
154
|
+
};
|
|
155
|
+
readonly attempt: import("./report.js").RejectedByProvider | import("./report.js").Applied | import("./report.js").OutcomeUnknown;
|
|
156
|
+
readonly postObservations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
157
|
+
} | {
|
|
158
|
+
readonly _tag: "BlockedSubject";
|
|
159
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
160
|
+
readonly observationAuthorities: readonly {
|
|
161
|
+
readonly _tag: "AuthorityAcquired";
|
|
162
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
163
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
164
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
165
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
166
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
167
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
168
|
+
}[];
|
|
169
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
170
|
+
readonly cause: import("./report.js").Conflict | import("./report.js").ProviderBlocked | import("./report.js").RejectedBeforeDispatch | {
|
|
171
|
+
readonly _tag: "AuthorityAcquiredButMutationNotDispatched";
|
|
172
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
173
|
+
readonly authority: {
|
|
174
|
+
readonly _tag: "AuthorityAcquired";
|
|
175
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
176
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
177
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
178
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
179
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
180
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
181
|
+
};
|
|
182
|
+
readonly attempt: import("./report.js").RejectedBeforeDispatch;
|
|
183
|
+
} | import("./report.js").ConclusiveProviderRejection;
|
|
184
|
+
} | {
|
|
185
|
+
readonly _tag: "UncertainSubject";
|
|
186
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
187
|
+
readonly observationAuthorities: readonly {
|
|
188
|
+
readonly _tag: "AuthorityAcquired";
|
|
189
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
190
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
191
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
192
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
193
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
194
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
195
|
+
}[];
|
|
196
|
+
readonly observations: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
197
|
+
readonly authority: {
|
|
198
|
+
readonly _tag: "AuthorityAcquired";
|
|
199
|
+
readonly subject: string & import("effect/Brand").Brand<"SubjectId">;
|
|
200
|
+
readonly provider: string & import("effect/Brand").Brand<"ProviderId">;
|
|
201
|
+
readonly audience: string & import("effect/Brand").Brand<"CanonicalAudience">;
|
|
202
|
+
readonly requestedPurpose: "observe" | "publish" | "correct";
|
|
203
|
+
readonly grantKind: "AnonymousAccess" | "ScopedSecret" | "WorkloadIdentity";
|
|
204
|
+
readonly purposes: readonly ["observe" | "publish" | "correct", ...("observe" | "publish" | "correct")[]];
|
|
205
|
+
};
|
|
206
|
+
readonly attempt: import("./report.js").Started | import("./report.js").RejectedByProvider | import("./report.js").Applied | import("./report.js").OutcomeUnknown;
|
|
207
|
+
readonly trace: readonly [import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation, ...(import("./report.js").PresentEquivalent | import("./report.js").PresentDifferent | import("./report.js").AuthoritativelyAbsent | import("./report.js").VisibilityPending | import("./report.js").InconclusiveObservation)[]];
|
|
208
|
+
readonly decision?: import("./report.js").NeedsMutation | import("./report.js").ProviderAuthorizedCreate | import("./report.js").ProviderAlreadyEquivalent | import("./report.js").Conflict | import("./report.js").ProviderBlocked;
|
|
209
|
+
})[]];
|
|
210
|
+
readonly status: "complete" | "blocked" | "uncertain";
|
|
211
|
+
}, import("./coordinator.js").ReleaseCoordinatorConstructionError, import("./authority.js").CredentialProvider | AuthorizedMutationHttp | HttpAuthorizer | NpmUserConfigResource | CertifiedPublisherSpawn>;
|
|
212
|
+
//# sourceMappingURL=adapter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.d.ts","sourceRoot":"","sources":["../../src/publication/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AAUvC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAElE,OAAO,EAGL,KAAK,cAAc,EACpB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAA;AASvB,OAAO,EAA0B,KAAK,qBAAqB,EAAE,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAkB5D;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,iOA2DrC,CAAA;AAEF,mFAAmF;AACnF,eAAO,MAAM,sBAAsB;;;2MAMjC,CAAA;AAEF,kFAAkF;AAClF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2MAMjC,CAAA"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import * as Option from "effect/Option";
|
|
3
|
+
import { SubjectId } from "../model/authority.js";
|
|
4
|
+
import { githubPublicationCapability, catalogPublicationCapability, npmPublicationCapability, pyPiPublicationCapability } from "../capabilities/registry.js";
|
|
5
|
+
import { encodePreparedRelease } from "../release/prepared.js";
|
|
6
|
+
import { sha256 } from "../drivers/utils.js";
|
|
7
|
+
import { observeReleaseSubjects, publishReleaseSubjects } from "./coordinator.js";
|
|
8
|
+
import { AuthorizedMutationHttp, HttpAuthorizer } from "./http.js";
|
|
9
|
+
import { CertifiedPublisherSpawn, NpmUserConfigResource } from "./publisher.js";
|
|
10
|
+
import { validateRecoveryProfileSubjects } from "./recovery.js";
|
|
11
|
+
import { PublicationClaimStore, unavailablePublicationClaimStore } from "./claim.js";
|
|
12
|
+
import { customProviderSubjects } from "../extensions/provider-adapter.js";
|
|
13
|
+
export { installedPublicationProfiles } from "./profiles.js";
|
|
14
|
+
const registerSubjects = (registration, subjects) => {
|
|
15
|
+
validateRecoveryProfileSubjects(registration.id, registration.recovery, subjects.map((subject) => subject.recovery));
|
|
16
|
+
return subjects;
|
|
17
|
+
};
|
|
18
|
+
const preparedSubject = (bundle) => SubjectId.make(`prepared:sha256-${sha256(encodePreparedRelease(bundle.manifest))}`);
|
|
19
|
+
/**
|
|
20
|
+
* Construct provider subjects only after the caller has loaded and verified
|
|
21
|
+
* the complete prepared bundle. The host authorizer is captured as an opaque
|
|
22
|
+
* sink; transports and credential values never enter the subject contract.
|
|
23
|
+
*/
|
|
24
|
+
export const subjectsForPreparedRelease = Effect.fn("subjectsForPreparedRelease")(function* (bundle, adapters = []) {
|
|
25
|
+
const http = yield* HttpAuthorizer;
|
|
26
|
+
const mutationHttp = yield* AuthorizedMutationHttp;
|
|
27
|
+
const userConfigs = yield* NpmUserConfigResource;
|
|
28
|
+
const publisher = yield* CertifiedPublisherSpawn;
|
|
29
|
+
const claimOption = yield* Effect.serviceOption(PublicationClaimStore);
|
|
30
|
+
const claims = Option.getOrElse(claimOption, () => unavailablePublicationClaimStore);
|
|
31
|
+
const subjects = [];
|
|
32
|
+
const priorPublicationSubjects = [];
|
|
33
|
+
const services = { http, mutationHttp, userConfigs, publisher, claims };
|
|
34
|
+
for (const publication of bundle.manifest.publications) {
|
|
35
|
+
const moduleSubjects = publication._tag === "PreparedNpmPublication"
|
|
36
|
+
? npmPublicationCapability.subjects(bundle, publication, services)
|
|
37
|
+
: publication._tag === "PreparedPyPiPublication"
|
|
38
|
+
? pyPiPublicationCapability.subjects(bundle, publication, services)
|
|
39
|
+
: publication._tag === "PreparedGitHubPublication"
|
|
40
|
+
? githubPublicationCapability.subjects(bundle, publication, services)
|
|
41
|
+
: catalogPublicationCapability.subjects(bundle, publication, services);
|
|
42
|
+
const registered = registerSubjects(publication._tag === "PreparedNpmPublication"
|
|
43
|
+
? npmPublicationCapability.profile
|
|
44
|
+
: publication._tag === "PreparedPyPiPublication"
|
|
45
|
+
? pyPiPublicationCapability.profile
|
|
46
|
+
: publication._tag === "PreparedGitHubPublication"
|
|
47
|
+
? githubPublicationCapability.profile
|
|
48
|
+
: catalogPublicationCapability.profile, moduleSubjects);
|
|
49
|
+
const ordered = registered.map((subject) => priorPublicationSubjects.length === 0
|
|
50
|
+
? subject
|
|
51
|
+
: {
|
|
52
|
+
...subject,
|
|
53
|
+
prerequisites: [...new Set([
|
|
54
|
+
...(subject.prerequisites ?? []),
|
|
55
|
+
...priorPublicationSubjects
|
|
56
|
+
])]
|
|
57
|
+
});
|
|
58
|
+
subjects.push(...ordered);
|
|
59
|
+
priorPublicationSubjects.push(...registered.map((subject) => subject.id));
|
|
60
|
+
}
|
|
61
|
+
const custom = customProviderSubjects(bundle, adapters, services, new Set([preparedSubject(bundle).toString(), ...priorPublicationSubjects.map((id) => id.toString())])).map((subject) => priorPublicationSubjects.length === 0
|
|
62
|
+
? subject
|
|
63
|
+
: {
|
|
64
|
+
...subject,
|
|
65
|
+
prerequisites: [...new Set([
|
|
66
|
+
...(subject.prerequisites ?? []),
|
|
67
|
+
...priorPublicationSubjects
|
|
68
|
+
])]
|
|
69
|
+
});
|
|
70
|
+
subjects.push(...custom);
|
|
71
|
+
return subjects;
|
|
72
|
+
});
|
|
73
|
+
/** Remote, read-only observation through the same provider subjects as publish. */
|
|
74
|
+
export const observePreparedRelease = Effect.fn("observePreparedRelease")(function* (bundle, adapters = []) {
|
|
75
|
+
const subjects = yield* subjectsForPreparedRelease(bundle, adapters);
|
|
76
|
+
return yield* observeReleaseSubjects({ prepared: preparedSubject(bundle), subjects });
|
|
77
|
+
});
|
|
78
|
+
/** Dependency-ordered conservative publication through the shared coordinator. */
|
|
79
|
+
export const publishPreparedRelease = Effect.fn("publishPreparedRelease")(function* (bundle, adapters = []) {
|
|
80
|
+
const subjects = yield* subjectsForPreparedRelease(bundle, adapters);
|
|
81
|
+
return yield* publishReleaseSubjects({ prepared: preparedSubject(bundle), subjects });
|
|
82
|
+
});
|
|
83
|
+
//# sourceMappingURL=adapter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"adapter.js","sourceRoot":"","sources":["../../src/publication/adapter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjD,OAAO,EACL,2BAA2B,EAC3B,4BAA4B,EAC5B,wBAAwB,EACxB,yBAAyB,EAC1B,MAAM,6BAA6B,CAAA;AACpC,OAAO,EAAE,qBAAqB,EAAE,MAAM,wBAAwB,CAAA;AAE9D,OAAO,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAA;AAC5C,OAAO,EACL,sBAAsB,EACtB,sBAAsB,EAEvB,MAAM,kBAAkB,CAAA;AACzB,OAAO,EAAE,sBAAsB,EAAE,cAAc,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EACL,uBAAuB,EACvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,EACL,+BAA+B,EAEhC,MAAM,eAAe,CAAA;AACtB,OAAO,EACL,qBAAqB,EACrB,gCAAgC,EACjC,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,sBAAsB,EAA8B,MAAM,mCAAmC,CAAA;AACtG,OAAO,EAAE,4BAA4B,EAAE,MAAM,eAAe,CAAA;AAE5D,MAAM,gBAAgB,GAAG,CACvB,YAA4C,EAC5C,QAAuC,EACR,EAAE;IACjC,+BAA+B,CAC7B,YAAY,CAAC,EAAE,EACf,YAAY,CAAC,QAAQ,EACrB,QAAQ,CAAC,GAAG,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAA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IACpE,OAAO,KAAK,CAAC,CAAC,sBAAsB,CAAC,EAAE,QAAQ,EAAE,eAAe,CAAC,MAAM,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAA;AACvF,CAAC,CAAC,CAAA"}
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
import * as Context from "effect/Context";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import * as Schema from "effect/Schema";
|
|
4
|
+
import type { CanonicalAudience, CredentialPurpose, CredentialRef, CredentialRequest, EnvironmentName, ProviderId, SubjectId, ResolvedTrustedPublishingAuthStrategy } from "../model/authority.js";
|
|
5
|
+
import type { MutationDecision } from "./report.js";
|
|
6
|
+
declare const CredentialGrantTypeId: unique symbol;
|
|
7
|
+
interface CredentialGrantBase<Tag extends string> {
|
|
8
|
+
readonly [CredentialGrantTypeId]: Tag;
|
|
9
|
+
readonly _tag: Tag;
|
|
10
|
+
readonly subject: SubjectId;
|
|
11
|
+
readonly provider: ProviderId;
|
|
12
|
+
readonly audience: CanonicalAudience;
|
|
13
|
+
readonly purposes: ReadonlySet<CredentialPurpose>;
|
|
14
|
+
}
|
|
15
|
+
/** Observe-only capability. It carries no credential or credential accessor. */
|
|
16
|
+
export interface AnonymousAccess extends CredentialGrantBase<"AnonymousAccess"> {
|
|
17
|
+
}
|
|
18
|
+
/** Capability backed by a host-owned credential reference, never its value. */
|
|
19
|
+
export interface ScopedSecret extends CredentialGrantBase<"ScopedSecret"> {
|
|
20
|
+
readonly ref: CredentialRef;
|
|
21
|
+
}
|
|
22
|
+
/** Certified workload identity names; token material remains host-owned. */
|
|
23
|
+
export interface WorkloadIdentity extends CredentialGrantBase<"WorkloadIdentity"> {
|
|
24
|
+
readonly names: ReadonlySet<EnvironmentName>;
|
|
25
|
+
/** Exact non-secret prepared strategy rechecked by the certified sink. */
|
|
26
|
+
readonly strategy: ResolvedTrustedPublishingAuthStrategy;
|
|
27
|
+
}
|
|
28
|
+
export type CredentialGrant = AnonymousAccess | ScopedSecret | WorkloadIdentity;
|
|
29
|
+
export type MutationCredentialGrant = ScopedSecret | WorkloadIdentity;
|
|
30
|
+
export type NonEmptyPurposes = readonly [CredentialPurpose, ...Array<CredentialPurpose>];
|
|
31
|
+
export type NonEmptyEnvironmentNames = readonly [EnvironmentName, ...Array<EnvironmentName>];
|
|
32
|
+
/**
|
|
33
|
+
* Metadata returned by a host acquirer. Secret values never cross this seam.
|
|
34
|
+
* `makeCredentialProvider` validates it against the exact prepared request
|
|
35
|
+
* before privately minting an opaque grant.
|
|
36
|
+
*/
|
|
37
|
+
export type CredentialGrantDescriptor = {
|
|
38
|
+
readonly _tag: "AnonymousAccess";
|
|
39
|
+
readonly purposes: readonly ["observe"];
|
|
40
|
+
} | {
|
|
41
|
+
readonly _tag: "ScopedSecret";
|
|
42
|
+
readonly purposes: NonEmptyPurposes;
|
|
43
|
+
readonly ref: CredentialRef;
|
|
44
|
+
} | {
|
|
45
|
+
readonly _tag: "WorkloadIdentity";
|
|
46
|
+
readonly purposes: NonEmptyPurposes;
|
|
47
|
+
readonly names: NonEmptyEnvironmentNames;
|
|
48
|
+
};
|
|
49
|
+
declare const CredentialUnavailable_base: Schema.Class<CredentialUnavailable, Schema.TaggedStruct<"CredentialUnavailable", {
|
|
50
|
+
readonly subject: Schema.String;
|
|
51
|
+
readonly provider: Schema.String;
|
|
52
|
+
readonly purpose: Schema.String;
|
|
53
|
+
readonly reason: Schema.String;
|
|
54
|
+
}>, import("effect/Cause").YieldableError>;
|
|
55
|
+
export declare class CredentialUnavailable extends CredentialUnavailable_base {
|
|
56
|
+
}
|
|
57
|
+
declare const CredentialAudienceMismatch_base: Schema.Class<CredentialAudienceMismatch, Schema.TaggedStruct<"CredentialAudienceMismatch", {
|
|
58
|
+
readonly subject: Schema.String;
|
|
59
|
+
readonly expected: Schema.String;
|
|
60
|
+
readonly observed: Schema.String;
|
|
61
|
+
}>, import("effect/Cause").YieldableError>;
|
|
62
|
+
export declare class CredentialAudienceMismatch extends CredentialAudienceMismatch_base {
|
|
63
|
+
}
|
|
64
|
+
declare const CredentialPurposeMismatch_base: Schema.Class<CredentialPurposeMismatch, Schema.TaggedStruct<"CredentialPurposeMismatch", {
|
|
65
|
+
readonly subject: Schema.String;
|
|
66
|
+
readonly required: Schema.String;
|
|
67
|
+
readonly granted: Schema.$Array<Schema.String>;
|
|
68
|
+
}>, import("effect/Cause").YieldableError>;
|
|
69
|
+
export declare class CredentialPurposeMismatch extends CredentialPurposeMismatch_base {
|
|
70
|
+
}
|
|
71
|
+
declare const CredentialStrategyUnsupported_base: Schema.Class<CredentialStrategyUnsupported, Schema.TaggedStruct<"CredentialStrategyUnsupported", {
|
|
72
|
+
readonly subject: Schema.String;
|
|
73
|
+
readonly provider: Schema.String;
|
|
74
|
+
readonly strategy: Schema.String;
|
|
75
|
+
readonly reason: Schema.String;
|
|
76
|
+
}>, import("effect/Cause").YieldableError>;
|
|
77
|
+
export declare class CredentialStrategyUnsupported extends CredentialStrategyUnsupported_base {
|
|
78
|
+
}
|
|
79
|
+
declare const CredentialSubjectMismatch_base: Schema.Class<CredentialSubjectMismatch, Schema.TaggedStruct<"CredentialSubjectMismatch", {
|
|
80
|
+
readonly expected: Schema.String;
|
|
81
|
+
readonly observed: Schema.String;
|
|
82
|
+
}>, import("effect/Cause").YieldableError>;
|
|
83
|
+
export declare class CredentialSubjectMismatch extends CredentialSubjectMismatch_base {
|
|
84
|
+
}
|
|
85
|
+
declare const PublisherDispatchError_base: Schema.Class<PublisherDispatchError, Schema.TaggedStruct<"PublisherDispatchError", {
|
|
86
|
+
readonly subject: Schema.String;
|
|
87
|
+
readonly reason: Schema.String;
|
|
88
|
+
}>, import("effect/Cause").YieldableError>;
|
|
89
|
+
export declare class PublisherDispatchError extends PublisherDispatchError_base {
|
|
90
|
+
}
|
|
91
|
+
export type CredentialAuthorityError = CredentialUnavailable | CredentialAudienceMismatch | CredentialPurposeMismatch | CredentialStrategyUnsupported | CredentialSubjectMismatch;
|
|
92
|
+
export interface CredentialGrantAcquirer {
|
|
93
|
+
readonly acquire: (request: CredentialRequest) => Effect.Effect<CredentialGrantDescriptor, CredentialUnavailable | CredentialStrategyUnsupported>;
|
|
94
|
+
}
|
|
95
|
+
export interface CredentialProviderShape {
|
|
96
|
+
readonly acquireForObservation: (request: CredentialRequest) => Effect.Effect<CredentialGrant, CredentialAuthorityError>;
|
|
97
|
+
readonly acquireForMutation: (request: CredentialRequest, decision: MutationDecision) => Effect.Effect<MutationCredentialGrant, CredentialAuthorityError>;
|
|
98
|
+
}
|
|
99
|
+
declare const CredentialProvider_base: Context.ServiceClass<CredentialProvider, "ts-release/CredentialProvider", CredentialProviderShape>;
|
|
100
|
+
export declare class CredentialProvider extends CredentialProvider_base {
|
|
101
|
+
}
|
|
102
|
+
/** Builds a host-friendly provider without exposing a grant constructor. */
|
|
103
|
+
export declare const makeCredentialProvider: (host: CredentialGrantAcquirer) => CredentialProviderShape;
|
|
104
|
+
export type PublisherOperation = {
|
|
105
|
+
readonly _tag: "PublishOperation";
|
|
106
|
+
readonly subject: SubjectId;
|
|
107
|
+
readonly provider: ProviderId;
|
|
108
|
+
readonly audience: CanonicalAudience;
|
|
109
|
+
readonly purpose: "publish";
|
|
110
|
+
readonly decision: MutationDecision;
|
|
111
|
+
} | {
|
|
112
|
+
readonly _tag: "CorrectionOperation";
|
|
113
|
+
readonly subject: SubjectId;
|
|
114
|
+
readonly provider: ProviderId;
|
|
115
|
+
readonly audience: CanonicalAudience;
|
|
116
|
+
readonly purpose: "correct";
|
|
117
|
+
readonly decision: MutationDecision;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* The publisher is a host-owned elimination boundary. Provider adapters pass
|
|
121
|
+
* only typed operation data and a capability; no generic command accepts one.
|
|
122
|
+
*/
|
|
123
|
+
export interface PublisherSinkShape {
|
|
124
|
+
readonly dispatch: (operation: PublisherOperation, grant: MutationCredentialGrant) => Effect.Effect<void, CredentialAuthorityError | PublisherDispatchError>;
|
|
125
|
+
}
|
|
126
|
+
declare const PublisherSink_base: Context.ServiceClass<PublisherSink, "ts-release/PublisherSink", PublisherSinkShape>;
|
|
127
|
+
export declare class PublisherSink extends PublisherSink_base {
|
|
128
|
+
}
|
|
129
|
+
/** Shared sink-side recheck. It trusts private issuance metadata, not fields. */
|
|
130
|
+
export declare const validateGrantForOperation: (operation: PublisherOperation, grant: MutationCredentialGrant) => Effect.Effect<undefined, CredentialUnavailable | CredentialAudienceMismatch | CredentialPurposeMismatch | CredentialSubjectMismatch, never>;
|
|
131
|
+
export interface PublisherDispatcher {
|
|
132
|
+
readonly dispatch: (operation: PublisherOperation, grant: MutationCredentialGrant) => Effect.Effect<void, PublisherDispatchError>;
|
|
133
|
+
}
|
|
134
|
+
/** Wraps a host dispatcher so every mutation rechecks opaque authority first. */
|
|
135
|
+
export declare const makePublisherSink: (host: PublisherDispatcher) => PublisherSinkShape;
|
|
136
|
+
export {};
|
|
137
|
+
//# sourceMappingURL=authority.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authority.d.ts","sourceRoot":"","sources":["../../src/publication/authority.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,gBAAgB,CAAA;AACzC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,MAAM,MAAM,eAAe,CAAA;AACvC,OAAO,KAAK,EACV,iBAAiB,EACjB,iBAAiB,EACjB,aAAa,EACb,iBAAiB,EACjB,eAAe,EACf,UAAU,EACV,SAAS,EACT,qCAAqC,EACtC,MAAM,uBAAuB,CAAA;AAC9B,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAEnD,QAAA,MAAM,qBAAqB,EAAE,OAAO,MAA6C,CAAA;AAEjF,UAAU,mBAAmB,CAAC,GAAG,SAAS,MAAM;IAC9C,QAAQ,CAAC,CAAC,qBAAqB,CAAC,EAAE,GAAG,CAAA;IACrC,QAAQ,CAAC,IAAI,EAAE,GAAG,CAA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