@empire-builder-kit/nx 1.0.0-beta.9 → 1.0.0-rc.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/NOTICE +6 -0
- package/README.md +113 -3
- package/executors.json +30 -0
- package/package.json +84 -6
- package/src/api-contract/baseline-update.d.ts +82 -0
- package/src/api-contract/baseline-update.js +225 -0
- package/src/api-contract/baseline-update.js.map +1 -0
- package/src/api-contract/compatibility.d.ts +30 -0
- package/src/api-contract/compatibility.js +643 -0
- package/src/api-contract/compatibility.js.map +1 -0
- package/src/api-contract/contract-graph.d.ts +35 -0
- package/src/api-contract/contract-graph.js +141 -0
- package/src/api-contract/contract-graph.js.map +1 -0
- package/src/api-contract/evidence.d.ts +23 -0
- package/src/api-contract/evidence.js +87 -0
- package/src/api-contract/evidence.js.map +1 -0
- package/src/api-contract/index.d.ts +6 -0
- package/src/api-contract/index.js +10 -0
- package/src/api-contract/index.js.map +1 -0
- package/src/api-contract/model.d.ts +144 -0
- package/src/api-contract/model.fixtures.d.ts +2 -0
- package/src/api-contract/model.fixtures.js +81 -0
- package/src/api-contract/model.fixtures.js.map +1 -0
- package/src/api-contract/model.js +993 -0
- package/src/api-contract/model.js.map +1 -0
- package/src/api-contract/rollout.d.ts +32 -0
- package/src/api-contract/rollout.js +88 -0
- package/src/api-contract/rollout.js.map +1 -0
- package/src/authorization/compatibility.d.ts +62 -0
- package/src/authorization/compatibility.js +175 -0
- package/src/authorization/compatibility.js.map +1 -0
- package/src/authorization/index.d.ts +1 -0
- package/src/authorization/index.js +5 -0
- package/src/authorization/index.js.map +1 -0
- package/src/blueprints/execution.d.ts +25 -1
- package/src/blueprints/execution.js +246 -83
- package/src/blueprints/execution.js.map +1 -1
- package/src/blueprints/external-sandbox.d.ts +53 -0
- package/src/blueprints/external-sandbox.js +1182 -0
- package/src/blueprints/external-sandbox.js.map +1 -0
- package/src/blueprints/manifest.d.ts +42 -2
- package/src/blueprints/manifest.js +82 -27
- package/src/blueprints/manifest.js.map +1 -1
- package/src/blueprints/resolver.d.ts +14 -5
- package/src/blueprints/resolver.js +228 -68
- package/src/blueprints/resolver.js.map +1 -1
- package/src/cli/agent-command.d.ts +30 -0
- package/src/cli/agent-command.js +204 -0
- package/src/cli/agent-command.js.map +1 -0
- package/src/cli/agent-runtime.d.ts +25 -0
- package/src/cli/agent-runtime.js +488 -0
- package/src/cli/agent-runtime.js.map +1 -0
- package/src/cli/blueprint-authority.d.ts +9 -0
- package/src/cli/blueprint-authority.js +43 -0
- package/src/cli/blueprint-authority.js.map +1 -0
- package/src/cli/blueprint-command.d.ts +24 -0
- package/src/cli/blueprint-command.js +63 -0
- package/src/cli/blueprint-command.js.map +1 -0
- package/src/cli/bootstrap.d.ts +31 -0
- package/src/cli/bootstrap.js +165 -0
- package/src/cli/bootstrap.js.map +1 -0
- package/src/cli/dev-command.d.ts +92 -0
- package/src/cli/dev-command.js +561 -0
- package/src/cli/dev-command.js.map +1 -0
- package/src/cli/main.d.ts +131 -0
- package/src/cli/main.js +1199 -0
- package/src/cli/main.js.map +1 -0
- package/src/cli/output.d.ts +19 -0
- package/src/cli/output.js +51 -0
- package/src/cli/output.js.map +1 -0
- package/src/cli/personal-secret-runtime.d.ts +81 -0
- package/src/cli/personal-secret-runtime.js +567 -0
- package/src/cli/personal-secret-runtime.js.map +1 -0
- package/src/cli/secret-terminal.d.ts +12 -0
- package/src/cli/secret-terminal.js +128 -0
- package/src/cli/secret-terminal.js.map +1 -0
- package/src/container-images.d.ts +1 -0
- package/src/container-images.js +5 -0
- package/src/container-images.js.map +1 -0
- package/src/data-lifecycle/index.d.ts +3 -0
- package/src/data-lifecycle/index.js +7 -0
- package/src/data-lifecycle/index.js.map +1 -0
- package/src/data-lifecycle/model.d.ts +172 -0
- package/src/data-lifecycle/model.fixtures.d.ts +2 -0
- package/src/data-lifecycle/model.fixtures.js +244 -0
- package/src/data-lifecycle/model.fixtures.js.map +1 -0
- package/src/data-lifecycle/model.js +95 -0
- package/src/data-lifecycle/model.js.map +1 -0
- package/src/data-lifecycle/sensitive-artifacts.d.ts +28 -0
- package/src/data-lifecycle/sensitive-artifacts.js +146 -0
- package/src/data-lifecycle/sensitive-artifacts.js.map +1 -0
- package/src/data-lifecycle/validation.d.ts +32 -0
- package/src/data-lifecycle/validation.js +837 -0
- package/src/data-lifecycle/validation.js.map +1 -0
- package/src/database-retirement/contract.d.ts +68 -0
- package/src/database-retirement/contract.js +166 -0
- package/src/database-retirement/contract.js.map +1 -0
- package/src/database-retirement/index.d.ts +1 -0
- package/src/database-retirement/index.js +5 -0
- package/src/database-retirement/index.js.map +1 -0
- package/src/deterministic-order.d.ts +2 -0
- package/src/deterministic-order.js +7 -0
- package/src/deterministic-order.js.map +1 -0
- package/src/developer-agent/context.d.ts +27 -0
- package/src/developer-agent/context.js +497 -0
- package/src/developer-agent/context.js.map +1 -0
- package/src/developer-agent/generator-planning.d.ts +34 -0
- package/src/developer-agent/generator-planning.js +645 -0
- package/src/developer-agent/generator-planning.js.map +1 -0
- package/src/developer-agent/generator-preview.d.ts +8 -0
- package/src/developer-agent/generator-preview.js +650 -0
- package/src/developer-agent/generator-preview.js.map +1 -0
- package/src/developer-agent/git-inspection.d.ts +108 -0
- package/src/developer-agent/git-inspection.js +815 -0
- package/src/developer-agent/git-inspection.js.map +1 -0
- package/src/developer-agent/handoff.d.ts +43 -0
- package/src/developer-agent/handoff.js +698 -0
- package/src/developer-agent/handoff.js.map +1 -0
- package/src/developer-agent/index.d.ts +10 -0
- package/src/developer-agent/index.js +14 -0
- package/src/developer-agent/index.js.map +1 -0
- package/src/developer-agent/model.d.ts +481 -0
- package/src/developer-agent/model.js +143 -0
- package/src/developer-agent/model.js.map +1 -0
- package/src/developer-agent/operation-registry.d.ts +45 -0
- package/src/developer-agent/operation-registry.js +1255 -0
- package/src/developer-agent/operation-registry.js.map +1 -0
- package/src/developer-agent/ordering.d.ts +9 -0
- package/src/developer-agent/ordering.js +15 -0
- package/src/developer-agent/ordering.js.map +1 -0
- package/src/developer-agent/planning.d.ts +18 -0
- package/src/developer-agent/planning.js +447 -0
- package/src/developer-agent/planning.js.map +1 -0
- package/src/developer-agent/preview-changes.d.ts +26 -0
- package/src/developer-agent/preview-changes.js +203 -0
- package/src/developer-agent/preview-changes.js.map +1 -0
- package/src/developer-agent/preview-source.d.ts +2 -0
- package/src/developer-agent/preview-source.js +16 -0
- package/src/developer-agent/preview-source.js.map +1 -0
- package/src/developer-agent/validation.d.ts +18 -0
- package/src/developer-agent/validation.js +2617 -0
- package/src/developer-agent/validation.js.map +1 -0
- package/src/developer-agent/workspace-inspection.d.ts +20 -0
- package/src/developer-agent/workspace-inspection.js +1134 -0
- package/src/developer-agent/workspace-inspection.js.map +1 -0
- package/src/developer-agent/workspace-path.d.ts +6 -0
- package/src/developer-agent/workspace-path.js +22 -0
- package/src/developer-agent/workspace-path.js.map +1 -0
- package/src/executors/blueprint-trust/blueprint-trust.d.ts +29 -0
- package/src/executors/blueprint-trust/blueprint-trust.js +115 -0
- package/src/executors/blueprint-trust/blueprint-trust.js.map +1 -0
- package/src/executors/blueprint-trust/schema.json +27 -0
- package/src/executors/blueprint-verification/blueprint-verification.d.ts +13 -0
- package/src/executors/blueprint-verification/blueprint-verification.js +110 -0
- package/src/executors/blueprint-verification/blueprint-verification.js.map +1 -0
- package/src/executors/blueprint-verification/schema.json +44 -0
- package/src/executors/deployment-plan/deployment-plan.js +1 -0
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/dev-doctor/dev-doctor.d.ts +19 -5
- package/src/executors/dev-doctor/dev-doctor.js +186 -32
- package/src/executors/dev-doctor/dev-doctor.js.map +1 -1
- package/src/executors/dev-doctor/schema.json +1 -6
- package/src/executors/dev-setup/dev-setup.d.ts +7 -1
- package/src/executors/dev-setup/dev-setup.js +14 -3
- package/src/executors/dev-setup/dev-setup.js.map +1 -1
- package/src/executors/developer-context/developer-context.d.ts +38 -0
- package/src/executors/developer-context/developer-context.js +78 -0
- package/src/executors/developer-context/developer-context.js.map +1 -0
- package/src/executors/developer-context/schema.json +87 -0
- package/src/executors/fleet/fleet.d.ts +12 -43
- package/src/executors/fleet/fleet.js +120 -500
- package/src/executors/fleet/fleet.js.map +1 -1
- package/src/executors/fleet/schema.json +64 -14
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/github-bootstrap/schema.json +5 -0
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +144 -0
- package/src/executors/infrastructure-plan/infrastructure-plan.js +3320 -0
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -0
- package/src/executors/infrastructure-plan/schema.json +78 -0
- package/src/executors/secret-guardrails/schema.json +6 -0
- package/src/executors/secret-guardrails/secret-guardrails.d.ts +3 -0
- package/src/executors/secret-guardrails/secret-guardrails.js +44 -0
- package/src/executors/secret-guardrails/secret-guardrails.js.map +1 -0
- package/src/executors/secret-metadata/schema.json +31 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +32 -0
- package/src/executors/secret-metadata/secret-metadata.js +131 -0
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -0
- package/src/executors/sst-lifecycle/logging-preflight.d.ts +17 -0
- package/src/executors/sst-lifecycle/logging-preflight.js +196 -0
- package/src/executors/sst-lifecycle/logging-preflight.js.map +1 -0
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +23 -3
- package/src/executors/sst-lifecycle/run-sst-command.js +113 -10
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/executors/sst-lifecycle/schema.json +9 -5
- package/src/executors/sst-lifecycle/secret-preflight.d.ts +25 -0
- package/src/executors/sst-lifecycle/secret-preflight.js +119 -0
- package/src/executors/sst-lifecycle/secret-preflight.js.map +1 -0
- package/src/foundation/discovery.d.ts +17 -1
- package/src/foundation/discovery.js +16 -1
- package/src/foundation/discovery.js.map +1 -1
- package/src/foundation/index.d.ts +3 -0
- package/src/foundation/index.js +3 -0
- package/src/foundation/index.js.map +1 -1
- package/src/foundation/local-database-contract.d.ts +1 -0
- package/src/foundation/local-database-contract.js +3 -0
- package/src/foundation/local-database-contract.js.map +1 -1
- package/src/foundation/logging-preflight.d.ts +30 -0
- package/src/foundation/logging-preflight.js +138 -0
- package/src/foundation/logging-preflight.js.map +1 -0
- package/src/foundation/logging.d.ts +70 -0
- package/src/foundation/logging.js +133 -0
- package/src/foundation/logging.js.map +1 -0
- package/src/foundation/preflight.d.ts +9 -0
- package/src/foundation/preflight.js +58 -2
- package/src/foundation/preflight.js.map +1 -1
- package/src/foundation/provision-database-bindings.d.ts +9 -1
- package/src/foundation/provision-database-bindings.js +25 -5
- package/src/foundation/provision-database-bindings.js.map +1 -1
- package/src/foundation/provision-logical-database.d.ts +10 -2
- package/src/foundation/provision-logical-database.js +68 -113
- package/src/foundation/provision-logical-database.js.map +1 -1
- package/src/foundation/router-origin-proof.d.ts +2 -0
- package/src/foundation/router-origin-proof.js +25 -0
- package/src/foundation/router-origin-proof.js.map +1 -0
- package/src/foundation/stages.d.ts +1 -0
- package/src/foundation/stages.js +9 -1
- package/src/foundation/stages.js.map +1 -1
- package/src/frontend-security/index.d.ts +1 -0
- package/src/frontend-security/index.js +5 -0
- package/src/frontend-security/index.js.map +1 -0
- package/src/frontend-security/security-headers.d.ts +50 -0
- package/src/frontend-security/security-headers.js +418 -0
- package/src/frontend-security/security-headers.js.map +1 -0
- package/src/generators/feature-registry.d.ts +13 -0
- package/src/generators/feature-registry.js +73 -0
- package/src/generators/feature-registry.js.map +1 -0
- package/src/generators/function/function.d.ts +1 -1
- package/src/generators/function/function.js +51 -6
- package/src/generators/function/function.js.map +1 -1
- package/src/generators/function/schema.d.ts +1 -0
- package/src/generators/function/schema.json +6 -1
- package/src/generators/logging-registry.d.ts +13 -0
- package/src/generators/logging-registry.js +62 -0
- package/src/generators/logging-registry.js.map +1 -0
- package/src/generators/post-generation-install.d.ts +67 -0
- package/src/generators/post-generation-install.js +3308 -0
- package/src/generators/post-generation-install.js.map +1 -0
- package/src/generators/preset/generator.js +3 -0
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/tool-versions.d.ts +18 -0
- package/src/generators/preset/tool-versions.js +22 -0
- package/src/generators/preset/tool-versions.js.map +1 -0
- package/src/generators/preset/workspace-files-developer-agent.d.ts +14 -0
- package/src/generators/preset/workspace-files-developer-agent.js +511 -0
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -0
- package/src/generators/preset/workspace-files-foundation-workload-roles.d.ts +6 -0
- package/src/generators/preset/workspace-files-foundation-workload-roles.js +406 -0
- package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +1 -0
- package/src/generators/preset/workspace-files-performance-cost.d.ts +66 -0
- package/src/generators/preset/workspace-files-performance-cost.js +866 -0
- package/src/generators/preset/workspace-files-performance-cost.js.map +1 -0
- package/src/generators/preset/workspace-files-performance-load.d.ts +73 -0
- package/src/generators/preset/workspace-files-performance-load.js +801 -0
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -0
- package/src/generators/preset/workspace-files-workload-role-baseline.d.ts +9 -0
- package/src/generators/preset/workspace-files-workload-role-baseline.js +1102 -0
- package/src/generators/preset/workspace-files-workload-role-baseline.js.map +1 -0
- package/src/generators/preset/workspace-files.d.ts +14 -1
- package/src/generators/preset/workspace-files.js +8189 -245
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +3 -47
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/slice/built-in-plan-api-contract-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-api-contract-files.js +2656 -0
- package/src/generators/slice/built-in-plan-api-contract-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-api-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-api-files.js +1186 -0
- package/src/generators/slice/built-in-plan-api-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-async-work-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-async-work-files.js +7903 -0
- package/src/generators/slice/built-in-plan-async-work-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-authorization-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-authorization-files.js +2314 -0
- package/src/generators/slice/built-in-plan-authorization-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +559 -0
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-deletion-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-deletion-files.js +1101 -0
- package/src/generators/slice/built-in-plan-data-deletion-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +249 -0
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-files.js +1530 -0
- package/src/generators/slice/built-in-plan-data-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js +750 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +828 -0
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-retention-job-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +2604 -0
- package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +144 -0
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-data-rights-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-data-rights-files.js +4628 -0
- package/src/generators/slice/built-in-plan-data-rights-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-database-lifecycle-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +1901 -0
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +485 -0
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-foundation-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-foundation-files.js +184 -0
- package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-frontend-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-frontend-files.js +2233 -0
- package/src/generators/slice/built-in-plan-frontend-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-infrastructure-files.js +3038 -0
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +312 -0
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-metadata-files.d.ts +3 -0
- package/src/generators/slice/built-in-plan-metadata-files.js +219 -0
- package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-operations-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-operations-files.js +630 -0
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-performance-files.d.ts +3 -0
- package/src/generators/slice/built-in-plan-performance-files.js +3293 -0
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-project-files.d.ts +3 -0
- package/src/generators/slice/built-in-plan-project-files.js +979 -0
- package/src/generators/slice/built-in-plan-project-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-release-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-release-files.js +6387 -0
- package/src/generators/slice/built-in-plan-release-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-reliability-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-reliability-files.js +4499 -0
- package/src/generators/slice/built-in-plan-reliability-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +1004 -0
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-shared.d.ts +53 -0
- package/src/generators/slice/built-in-plan-shared.js +113 -0
- package/src/generators/slice/built-in-plan-shared.js.map +1 -0
- package/src/generators/slice/built-in-plan-testing-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-testing-files.js +2356 -0
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-verification-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-verification-files.js +358 -0
- package/src/generators/slice/built-in-plan-verification-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-web-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-web-files.js +430 -0
- package/src/generators/slice/built-in-plan-web-files.js.map +1 -0
- package/src/generators/slice/built-in-plan-workload-role-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-workload-role-files.js +2356 -0
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -0
- package/src/generators/slice/built-in-plan.d.ts +8 -0
- package/src/generators/slice/built-in-plan.js +264 -0
- package/src/generators/slice/built-in-plan.js.map +1 -0
- package/src/generators/slice/schema.json +1 -1
- package/src/generators/slice/slice.d.ts +1 -22
- package/src/generators/slice/slice.js +185 -1510
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/schema.d.ts +2 -0
- package/src/generators/upgrade/schema.json +11 -1
- package/src/generators/upgrade/upgrade.d.ts +51 -1
- package/src/generators/upgrade/upgrade.js +820 -82
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/frozen-container.d.ts +8 -0
- package/src/generators/workload/frozen-container.js +36 -0
- package/src/generators/workload/frozen-container.js.map +1 -0
- package/src/generators/workload/performance-registration.d.ts +32 -0
- package/src/generators/workload/performance-registration.js +226 -0
- package/src/generators/workload/performance-registration.js.map +1 -0
- package/src/generators/workload/reliability-registration.d.ts +16 -0
- package/src/generators/workload/reliability-registration.js +150 -0
- package/src/generators/workload/reliability-registration.js.map +1 -0
- package/src/generators/workload/schema.d.ts +1 -0
- package/src/generators/workload/schema.json +6 -1
- package/src/generators/workload/service-performance-files.d.ts +4 -0
- package/src/generators/workload/service-performance-files.js +1846 -0
- package/src/generators/workload/service-performance-files.js.map +1 -0
- package/src/generators/workload/workload.d.ts +3 -2
- package/src/generators/workload/workload.js +1083 -18
- package/src/generators/workload/workload.js.map +1 -1
- package/src/git-policy/action-pins.d.ts +10 -0
- package/src/git-policy/action-pins.js +10 -0
- package/src/git-policy/action-pins.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +14 -1
- package/src/git-policy/github-bootstrap.js +274 -46
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/index.d.ts +2 -0
- package/src/index.js +2 -0
- package/src/index.js.map +1 -1
- package/src/infrastructure-change/convergence.d.ts +13 -0
- package/src/infrastructure-change/convergence.js +85 -0
- package/src/infrastructure-change/convergence.js.map +1 -0
- package/src/infrastructure-change/drift.d.ts +13 -0
- package/src/infrastructure-change/drift.js +112 -0
- package/src/infrastructure-change/drift.js.map +1 -0
- package/src/infrastructure-change/index.d.ts +7 -0
- package/src/infrastructure-change/index.js +11 -0
- package/src/infrastructure-change/index.js.map +1 -0
- package/src/infrastructure-change/model.d.ts +253 -0
- package/src/infrastructure-change/model.js +28 -0
- package/src/infrastructure-change/model.js.map +1 -0
- package/src/infrastructure-change/normalize.d.ts +12 -0
- package/src/infrastructure-change/normalize.js +245 -0
- package/src/infrastructure-change/normalize.js.map +1 -0
- package/src/infrastructure-change/plan.d.ts +40 -0
- package/src/infrastructure-change/plan.js +361 -0
- package/src/infrastructure-change/plan.js.map +1 -0
- package/src/infrastructure-change/risk.d.ts +7 -0
- package/src/infrastructure-change/risk.js +269 -0
- package/src/infrastructure-change/risk.js.map +1 -0
- package/src/infrastructure-change/summary.d.ts +20 -0
- package/src/infrastructure-change/summary.js +130 -0
- package/src/infrastructure-change/summary.js.map +1 -0
- package/src/local-dev/context-discovery.d.ts +2 -0
- package/src/local-dev/context-discovery.js +59 -0
- package/src/local-dev/context-discovery.js.map +1 -0
- package/src/local-dev/contract-validation.d.ts +15 -0
- package/src/local-dev/contract-validation.js +84 -0
- package/src/local-dev/contract-validation.js.map +1 -0
- package/src/local-dev/contracts.d.ts +10 -1
- package/src/local-dev/contracts.js +57 -5
- package/src/local-dev/contracts.js.map +1 -1
- package/src/local-dev/control-contract.d.ts +67 -0
- package/src/local-dev/control-contract.js +180 -0
- package/src/local-dev/control-contract.js.map +1 -0
- package/src/local-dev/dev-command-core.d.ts +60 -0
- package/src/local-dev/dev-command-core.js +89 -0
- package/src/local-dev/dev-command-core.js.map +1 -0
- package/src/local-dev/effects.d.ts +16 -0
- package/src/local-dev/effects.js +63 -0
- package/src/local-dev/effects.js.map +1 -0
- package/src/local-dev/environment-inspector.d.ts +125 -0
- package/src/local-dev/environment-inspector.js +687 -0
- package/src/local-dev/environment-inspector.js.map +1 -0
- package/src/local-dev/environment-state.d.ts +113 -0
- package/src/local-dev/environment-state.js +463 -0
- package/src/local-dev/environment-state.js.map +1 -0
- package/src/local-dev/errors.d.ts +6 -0
- package/src/local-dev/errors.js +41 -0
- package/src/local-dev/errors.js.map +1 -0
- package/src/local-dev/fleet-client.d.ts +33 -0
- package/src/local-dev/fleet-client.js +156 -0
- package/src/local-dev/fleet-client.js.map +1 -0
- package/src/local-dev/fleet-configuration.d.ts +13 -0
- package/src/local-dev/fleet-configuration.js +71 -0
- package/src/local-dev/fleet-configuration.js.map +1 -0
- package/src/local-dev/fleet-inventory.d.ts +56 -0
- package/src/local-dev/fleet-inventory.js +469 -0
- package/src/local-dev/fleet-inventory.js.map +1 -0
- package/src/local-dev/fleet-ipc.d.ts +28 -0
- package/src/local-dev/fleet-ipc.js +267 -0
- package/src/local-dev/fleet-ipc.js.map +1 -0
- package/src/local-dev/fleet-launcher.d.ts +53 -0
- package/src/local-dev/fleet-launcher.js +379 -0
- package/src/local-dev/fleet-launcher.js.map +1 -0
- package/src/local-dev/fleet-lock.d.ts +41 -0
- package/src/local-dev/fleet-lock.js +135 -0
- package/src/local-dev/fleet-lock.js.map +1 -0
- package/src/local-dev/fleet-logs.d.ts +66 -0
- package/src/local-dev/fleet-logs.js +542 -0
- package/src/local-dev/fleet-logs.js.map +1 -0
- package/src/local-dev/fleet-process.d.ts +50 -0
- package/src/local-dev/fleet-process.js +289 -0
- package/src/local-dev/fleet-process.js.map +1 -0
- package/src/local-dev/fleet-runtime.d.ts +22 -0
- package/src/local-dev/fleet-runtime.js +368 -0
- package/src/local-dev/fleet-runtime.js.map +1 -0
- package/src/local-dev/fleet-session.d.ts +70 -0
- package/src/local-dev/fleet-session.js +301 -0
- package/src/local-dev/fleet-session.js.map +1 -0
- package/src/local-dev/fleet-slice-runner-daemon.d.ts +1 -0
- package/src/local-dev/fleet-slice-runner-daemon.js +21 -0
- package/src/local-dev/fleet-slice-runner-daemon.js.map +1 -0
- package/src/local-dev/fleet-startup.d.ts +22 -0
- package/src/local-dev/fleet-startup.js +114 -0
- package/src/local-dev/fleet-startup.js.map +1 -0
- package/src/local-dev/fleet-state.d.ts +62 -0
- package/src/local-dev/fleet-state.js +297 -0
- package/src/local-dev/fleet-state.js.map +1 -0
- package/src/local-dev/fleet-supervisor-daemon.d.ts +1 -0
- package/src/local-dev/fleet-supervisor-daemon.js +41 -0
- package/src/local-dev/fleet-supervisor-daemon.js.map +1 -0
- package/src/local-dev/fleet-supervisor.d.ts +52 -0
- package/src/local-dev/fleet-supervisor.js +384 -0
- package/src/local-dev/fleet-supervisor.js.map +1 -0
- package/src/local-dev/gateway.js +1 -1
- package/src/local-dev/gateway.js.map +1 -1
- package/src/local-dev/identity.js +4 -6
- package/src/local-dev/identity.js.map +1 -1
- package/src/local-dev/index.d.ts +1 -0
- package/src/local-dev/index.js +1 -0
- package/src/local-dev/index.js.map +1 -1
- package/src/local-dev/local-context.d.ts +62 -0
- package/src/local-dev/local-context.js +299 -0
- package/src/local-dev/local-context.js.map +1 -0
- package/src/local-dev/nx-workspace.d.ts +45 -0
- package/src/local-dev/nx-workspace.js +228 -0
- package/src/local-dev/nx-workspace.js.map +1 -0
- package/src/local-dev/personal-secret-ledger.d.ts +75 -0
- package/src/local-dev/personal-secret-ledger.js +391 -0
- package/src/local-dev/personal-secret-ledger.js.map +1 -0
- package/src/local-dev/personal-stage.d.ts +18 -0
- package/src/local-dev/personal-stage.js +129 -0
- package/src/local-dev/personal-stage.js.map +1 -0
- package/src/local-dev/private-state.d.ts +17 -0
- package/src/local-dev/private-state.js +254 -0
- package/src/local-dev/private-state.js.map +1 -0
- package/src/local-dev/process-identity.d.ts +9 -0
- package/src/local-dev/process-identity.js +79 -0
- package/src/local-dev/process-identity.js.map +1 -0
- package/src/local-dev/runtime-paths.d.ts +17 -0
- package/src/local-dev/runtime-paths.js +33 -0
- package/src/local-dev/runtime-paths.js.map +1 -0
- package/src/local-dev/secret-slice-claim.d.ts +17 -0
- package/src/local-dev/secret-slice-claim.js +75 -0
- package/src/local-dev/secret-slice-claim.js.map +1 -0
- package/src/local-dev/slice-claim.d.ts +36 -0
- package/src/local-dev/slice-claim.js +199 -0
- package/src/local-dev/slice-claim.js.map +1 -0
- package/src/local-dev/slice-runner.d.ts +121 -0
- package/src/local-dev/slice-runner.js +715 -0
- package/src/local-dev/slice-runner.js.map +1 -0
- package/src/local-dev/tls.js +51 -17
- package/src/local-dev/tls.js.map +1 -1
- package/src/ownership/composition.d.ts +5 -2
- package/src/ownership/composition.js +26 -3
- package/src/ownership/composition.js.map +1 -1
- package/src/ownership/hash.d.ts +1 -1
- package/src/ownership/hash.js +3 -1
- package/src/ownership/hash.js.map +1 -1
- package/src/ownership/record.d.ts +32 -1
- package/src/ownership/record.js +139 -2
- package/src/ownership/record.js.map +1 -1
- package/src/performance/cost-collection.d.ts +225 -0
- package/src/performance/cost-collection.js +825 -0
- package/src/performance/cost-collection.js.map +1 -0
- package/src/performance/cost-controls.d.ts +131 -0
- package/src/performance/cost-controls.js +336 -0
- package/src/performance/cost-controls.js.map +1 -0
- package/src/performance/evidence.d.ts +140 -0
- package/src/performance/evidence.js +599 -0
- package/src/performance/evidence.js.map +1 -0
- package/src/performance/index.d.ts +10 -0
- package/src/performance/index.js +14 -0
- package/src/performance/index.js.map +1 -0
- package/src/performance/load-safety.d.ts +84 -0
- package/src/performance/load-safety.js +346 -0
- package/src/performance/load-safety.js.map +1 -0
- package/src/performance/model.d.ts +129 -0
- package/src/performance/model.js +452 -0
- package/src/performance/model.js.map +1 -0
- package/src/performance/pr-artifact-budget.d.ts +42 -0
- package/src/performance/pr-artifact-budget.js +151 -0
- package/src/performance/pr-artifact-budget.js.map +1 -0
- package/src/performance/runner.d.ts +75 -0
- package/src/performance/runner.js +227 -0
- package/src/performance/runner.js.map +1 -0
- package/src/performance/scenario-endpoint.d.ts +1 -0
- package/src/performance/scenario-endpoint.js +5 -0
- package/src/performance/scenario-endpoint.js.map +1 -0
- package/src/performance/scenario.d.ts +193 -0
- package/src/performance/scenario.js +736 -0
- package/src/performance/scenario.js.map +1 -0
- package/src/performance/test-fixtures.d.ts +7 -0
- package/src/performance/test-fixtures.js +169 -0
- package/src/performance/test-fixtures.js.map +1 -0
- package/src/performance/unit-cost.d.ts +105 -0
- package/src/performance/unit-cost.js +364 -0
- package/src/performance/unit-cost.js.map +1 -0
- package/src/release/index.d.ts +4 -0
- package/src/release/index.js +8 -0
- package/src/release/index.js.map +1 -0
- package/src/release/lifecycle.d.ts +132 -0
- package/src/release/lifecycle.js +411 -0
- package/src/release/lifecycle.js.map +1 -0
- package/src/release/manifest.d.ts +148 -0
- package/src/release/manifest.js +503 -0
- package/src/release/manifest.js.map +1 -0
- package/src/release/rollout.d.ts +170 -0
- package/src/release/rollout.js +578 -0
- package/src/release/rollout.js.map +1 -0
- package/src/release/source-authority.d.ts +19 -0
- package/src/release/source-authority.js +195 -0
- package/src/release/source-authority.js.map +1 -0
- package/src/repository-policy/deployment-plan.d.ts +2 -1
- package/src/repository-policy/deployment-plan.js +2 -0
- package/src/repository-policy/deployment-plan.js.map +1 -1
- package/src/repository-policy/policy.d.ts +1 -1
- package/src/repository-policy/policy.js +29 -25
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/aggregate-count-evidence-v1.json +135 -0
- package/src/schemas/api-contract-baseline-v1.json +674 -0
- package/src/schemas/api-contract-compatibility-report-v1.json +126 -0
- package/src/schemas/aws-billing-actual-evidence-v1.json +407 -0
- package/src/schemas/blueprint-v1.json +18 -1
- package/src/schemas/data-lifecycle-policy-v1.json +517 -0
- package/src/schemas/generated-ownership-v2.json +22 -0
- package/src/schemas/performance-policy-v1.json +335 -0
- package/src/schemas/repository-policy-v1.json +1 -0
- package/src/schemas/testing-evidence-quarantine-v1.json +168 -0
- package/src/schemas/testing-evidence-result-v1.json +319 -0
- package/src/secrets/adapters.d.ts +49 -0
- package/src/secrets/adapters.js +184 -0
- package/src/secrets/adapters.js.map +1 -0
- package/src/secrets/aws-control-plane.d.ts +20 -0
- package/src/secrets/aws-control-plane.js +255 -0
- package/src/secrets/aws-control-plane.js.map +1 -0
- package/src/secrets/declaration-verification.d.ts +11 -0
- package/src/secrets/declaration-verification.js +68 -0
- package/src/secrets/declaration-verification.js.map +1 -0
- package/src/secrets/guardrails.d.ts +26 -0
- package/src/secrets/guardrails.js +328 -0
- package/src/secrets/guardrails.js.map +1 -0
- package/src/secrets/index.d.ts +12 -0
- package/src/secrets/index.js +16 -0
- package/src/secrets/index.js.map +1 -0
- package/src/secrets/metadata.d.ts +48 -0
- package/src/secrets/metadata.js +171 -0
- package/src/secrets/metadata.js.map +1 -0
- package/src/secrets/model.d.ts +49 -0
- package/src/secrets/model.js +125 -0
- package/src/secrets/model.js.map +1 -0
- package/src/secrets/operator.d.ts +101 -0
- package/src/secrets/operator.js +229 -0
- package/src/secrets/operator.js.map +1 -0
- package/src/secrets/permissions.d.ts +34 -0
- package/src/secrets/permissions.js +86 -0
- package/src/secrets/permissions.js.map +1 -0
- package/src/secrets/personal-command.d.ts +83 -0
- package/src/secrets/personal-command.js +197 -0
- package/src/secrets/personal-command.js.map +1 -0
- package/src/secrets/personal-ledger.d.ts +21 -0
- package/src/secrets/personal-ledger.js +135 -0
- package/src/secrets/personal-ledger.js.map +1 -0
- package/src/secrets/registry.d.ts +9 -0
- package/src/secrets/registry.js +86 -0
- package/src/secrets/registry.js.map +1 -0
- package/src/secrets/verification.d.ts +18 -0
- package/src/secrets/verification.js +139 -0
- package/src/secrets/verification.js.map +1 -0
- package/src/secrets/workload-access.d.ts +46 -0
- package/src/secrets/workload-access.js +163 -0
- package/src/secrets/workload-access.js.map +1 -0
- package/src/supply-chain/action-pins.d.ts +26 -0
- package/src/supply-chain/action-pins.js +208 -0
- package/src/supply-chain/action-pins.js.map +1 -0
- package/src/supply-chain/blueprint-trust-git.d.ts +130 -0
- package/src/supply-chain/blueprint-trust-git.js +1581 -0
- package/src/supply-chain/blueprint-trust-git.js.map +1 -0
- package/src/supply-chain/blueprint-trust-process.d.ts +4 -0
- package/src/supply-chain/blueprint-trust-process.js +88 -0
- package/src/supply-chain/blueprint-trust-process.js.map +1 -0
- package/src/supply-chain/blueprint-trust.d.ts +354 -0
- package/src/supply-chain/blueprint-trust.js +1558 -0
- package/src/supply-chain/blueprint-trust.js.map +1 -0
- package/src/supply-chain/blueprint-verification-authority.d.ts +62 -0
- package/src/supply-chain/blueprint-verification-authority.js +588 -0
- package/src/supply-chain/blueprint-verification-authority.js.map +1 -0
- package/src/supply-chain/blueprint-verification-execution.d.ts +68 -0
- package/src/supply-chain/blueprint-verification-execution.js +624 -0
- package/src/supply-chain/blueprint-verification-execution.js.map +1 -0
- package/src/supply-chain/build-output.d.ts +35 -0
- package/src/supply-chain/build-output.js +398 -0
- package/src/supply-chain/build-output.js.map +1 -0
- package/src/supply-chain/common.d.ts +21 -0
- package/src/supply-chain/common.js +107 -0
- package/src/supply-chain/common.js.map +1 -0
- package/src/supply-chain/container-artifact-contract.d.ts +23 -0
- package/src/supply-chain/container-artifact-contract.js +208 -0
- package/src/supply-chain/container-artifact-contract.js.map +1 -0
- package/src/supply-chain/container-release.d.ts +119 -0
- package/src/supply-chain/container-release.js +496 -0
- package/src/supply-chain/container-release.js.map +1 -0
- package/src/supply-chain/ecr-applicability.d.ts +19 -0
- package/src/supply-chain/ecr-applicability.js +103 -0
- package/src/supply-chain/ecr-applicability.js.map +1 -0
- package/src/supply-chain/ecr-scanning.d.ts +83 -0
- package/src/supply-chain/ecr-scanning.js +321 -0
- package/src/supply-chain/ecr-scanning.js.map +1 -0
- package/src/supply-chain/ecs-deployed-image.d.ts +85 -0
- package/src/supply-chain/ecs-deployed-image.js +300 -0
- package/src/supply-chain/ecs-deployed-image.js.map +1 -0
- package/src/supply-chain/errors.d.ts +6 -0
- package/src/supply-chain/errors.js +15 -0
- package/src/supply-chain/errors.js.map +1 -0
- package/src/supply-chain/generated-blueprint-trust-command.d.ts +4 -0
- package/src/supply-chain/generated-blueprint-trust-command.js +1362 -0
- package/src/supply-chain/generated-blueprint-trust-command.js.map +1 -0
- package/src/supply-chain/generated-command.d.ts +1 -0
- package/src/supply-chain/generated-command.js +687 -0
- package/src/supply-chain/generated-command.js.map +1 -0
- package/src/supply-chain/generated-container-release-command.d.ts +16 -0
- package/src/supply-chain/generated-container-release-command.js +2087 -0
- package/src/supply-chain/generated-container-release-command.js.map +1 -0
- package/src/supply-chain/generated-ecr-collector-command.d.ts +21 -0
- package/src/supply-chain/generated-ecr-collector-command.js +1338 -0
- package/src/supply-chain/generated-ecr-collector-command.js.map +1 -0
- package/src/supply-chain/generated-files.d.ts +13 -0
- package/src/supply-chain/generated-files.js +401 -0
- package/src/supply-chain/generated-files.js.map +1 -0
- package/src/supply-chain/generated-scanner-command.d.ts +1 -0
- package/src/supply-chain/generated-scanner-command.js +718 -0
- package/src/supply-chain/generated-scanner-command.js.map +1 -0
- package/src/supply-chain/index.d.ts +28 -0
- package/src/supply-chain/index.js +35 -0
- package/src/supply-chain/index.js.map +1 -0
- package/src/supply-chain/inventory.d.ts +79 -0
- package/src/supply-chain/inventory.js +717 -0
- package/src/supply-chain/inventory.js.map +1 -0
- package/src/supply-chain/license-expression.d.ts +7 -0
- package/src/supply-chain/license-expression.js +128 -0
- package/src/supply-chain/license-expression.js.map +1 -0
- package/src/supply-chain/pnpm-toolchain-authority.d.ts +31 -0
- package/src/supply-chain/pnpm-toolchain-authority.js +316 -0
- package/src/supply-chain/pnpm-toolchain-authority.js.map +1 -0
- package/src/supply-chain/policy.d.ts +105 -0
- package/src/supply-chain/policy.js +301 -0
- package/src/supply-chain/policy.js.map +1 -0
- package/src/supply-chain/publication.d.ts +48 -0
- package/src/supply-chain/publication.js +85 -0
- package/src/supply-chain/publication.js.map +1 -0
- package/src/supply-chain/sbom.d.ts +228 -0
- package/src/supply-chain/sbom.js +826 -0
- package/src/supply-chain/sbom.js.map +1 -0
- package/src/supply-chain/scanner.d.ts +77 -0
- package/src/supply-chain/scanner.js +502 -0
- package/src/supply-chain/scanner.js.map +1 -0
- package/src/supply-chain/vendored-source.d.ts +95 -0
- package/src/supply-chain/vendored-source.js +315 -0
- package/src/supply-chain/vendored-source.js.map +1 -0
- package/src/testing-evidence/fixture-scope.d.ts +52 -0
- package/src/testing-evidence/fixture-scope.js +140 -0
- package/src/testing-evidence/fixture-scope.js.map +1 -0
- package/src/testing-evidence/index.d.ts +5 -0
- package/src/testing-evidence/index.js +9 -0
- package/src/testing-evidence/index.js.map +1 -0
- package/src/testing-evidence/quarantine.d.ts +48 -0
- package/src/testing-evidence/quarantine.js +253 -0
- package/src/testing-evidence/quarantine.js.map +1 -0
- package/src/testing-evidence/result.d.ts +108 -0
- package/src/testing-evidence/result.js +571 -0
- package/src/testing-evidence/result.js.map +1 -0
- package/src/testing-evidence/runner-adapter.d.ts +51 -0
- package/src/testing-evidence/runner-adapter.js +288 -0
- package/src/testing-evidence/runner-adapter.js.map +1 -0
- package/src/testing-evidence/sensitive-artifacts.d.ts +13 -0
- package/src/testing-evidence/sensitive-artifacts.js +93 -0
- package/src/testing-evidence/sensitive-artifacts.js.map +1 -0
- package/src/work-markers/work-markers.js +4 -3
- package/src/work-markers/work-markers.js.map +1 -1
- package/src/workload-roles/account-baseline.d.ts +132 -0
- package/src/workload-roles/account-baseline.js +743 -0
- package/src/workload-roles/account-baseline.js.map +1 -0
- package/src/workload-roles/authority.d.ts +38 -0
- package/src/workload-roles/authority.js +156 -0
- package/src/workload-roles/authority.js.map +1 -0
- package/src/workload-roles/aws-adapter.d.ts +99 -0
- package/src/workload-roles/aws-adapter.js +416 -0
- package/src/workload-roles/aws-adapter.js.map +1 -0
- package/src/workload-roles/aws-internal-handler.d.ts +27 -0
- package/src/workload-roles/aws-internal-handler.js +58 -0
- package/src/workload-roles/aws-internal-handler.js.map +1 -0
- package/src/workload-roles/aws-s3-state.d.ts +52 -0
- package/src/workload-roles/aws-s3-state.js +164 -0
- package/src/workload-roles/aws-s3-state.js.map +1 -0
- package/src/workload-roles/aws-sdk-control-plane.d.ts +12 -0
- package/src/workload-roles/aws-sdk-control-plane.js +291 -0
- package/src/workload-roles/aws-sdk-control-plane.js.map +1 -0
- package/src/workload-roles/boundary.d.ts +33 -0
- package/src/workload-roles/boundary.js +130 -0
- package/src/workload-roles/boundary.js.map +1 -0
- package/src/workload-roles/convergence.d.ts +66 -0
- package/src/workload-roles/convergence.js +186 -0
- package/src/workload-roles/convergence.js.map +1 -0
- package/src/workload-roles/effective-policy.d.ts +51 -0
- package/src/workload-roles/effective-policy.js +183 -0
- package/src/workload-roles/effective-policy.js.map +1 -0
- package/src/workload-roles/handler.d.ts +43 -0
- package/src/workload-roles/handler.js +130 -0
- package/src/workload-roles/handler.js.map +1 -0
- package/src/workload-roles/history.d.ts +47 -0
- package/src/workload-roles/history.js +324 -0
- package/src/workload-roles/history.js.map +1 -0
- package/src/workload-roles/index.d.ts +17 -0
- package/src/workload-roles/index.js +21 -0
- package/src/workload-roles/index.js.map +1 -0
- package/src/workload-roles/injection.d.ts +119 -0
- package/src/workload-roles/injection.js +495 -0
- package/src/workload-roles/injection.js.map +1 -0
- package/src/workload-roles/manifest.d.ts +54 -0
- package/src/workload-roles/manifest.js +343 -0
- package/src/workload-roles/manifest.js.map +1 -0
- package/src/workload-roles/provisioner.d.ts +70 -0
- package/src/workload-roles/provisioner.js +231 -0
- package/src/workload-roles/provisioner.js.map +1 -0
- package/src/workload-roles/registration.d.ts +101 -0
- package/src/workload-roles/registration.js +457 -0
- package/src/workload-roles/registration.js.map +1 -0
- package/src/workload-roles/stage-boundary.d.ts +31 -0
- package/src/workload-roles/stage-boundary.js +208 -0
- package/src/workload-roles/stage-boundary.js.map +1 -0
- package/src/workload-roles/standard-slice.d.ts +54 -0
- package/src/workload-roles/standard-slice.js +252 -0
- package/src/workload-roles/standard-slice.js.map +1 -0
- package/migrations/standard-pre-v1-to-v1.md +0 -11
- package/src/foundation/aurora-logical-database.d.ts +0 -76
- package/src/foundation/aurora-logical-database.js +0 -419
- package/src/foundation/aurora-logical-database.js.map +0 -1
|
@@ -0,0 +1,1362 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.BLUEPRINT_VERIFICATION_VITEST_CONFIG_SOURCE = void 0;
|
|
4
|
+
exports.renderBlueprintVerificationVitestConfig = renderBlueprintVerificationVitestConfig;
|
|
5
|
+
exports.renderBlueprintTrustCheckCommand = renderBlueprintTrustCheckCommand;
|
|
6
|
+
const blueprint_verification_authority_js_1 = require("./blueprint-verification-authority.js");
|
|
7
|
+
Object.defineProperty(exports, "BLUEPRINT_VERIFICATION_VITEST_CONFIG_SOURCE", { enumerable: true, get: function () { return blueprint_verification_authority_js_1.BLUEPRINT_VERIFICATION_VITEST_CONFIG_SOURCE; } });
|
|
8
|
+
function renderBlueprintVerificationVitestConfig() {
|
|
9
|
+
return blueprint_verification_authority_js_1.BLUEPRINT_VERIFICATION_VITEST_CONFIG_SOURCE;
|
|
10
|
+
}
|
|
11
|
+
function renderBlueprintTrustCheckCommand() {
|
|
12
|
+
return String.raw `import {
|
|
13
|
+
authorizeBlueprintOwnershipInventory,
|
|
14
|
+
authorizeBlueprintTrust,
|
|
15
|
+
assertBlueprintVerificationNxAuthority,
|
|
16
|
+
assertNoMutableBlueprintVerificationConfiguration,
|
|
17
|
+
assertProtectedGitWorkingTreeAuthority,
|
|
18
|
+
blueprintContainerRegistry,
|
|
19
|
+
blueprintGeneratedContentApprovalDigest,
|
|
20
|
+
blueprintVerificationExecutionReceiptDigest,
|
|
21
|
+
blueprintVerificationExecutionReceiptPath,
|
|
22
|
+
blueprintVerificationTargetDependencies,
|
|
23
|
+
blueprintVerificationTargetClosure,
|
|
24
|
+
createBlueprintVerificationExecutionReceipt,
|
|
25
|
+
assertPnpmReviewConfiguration,
|
|
26
|
+
inspectBlueprintTrustGitAuthority,
|
|
27
|
+
inspectProtectedGitFileAuthority,
|
|
28
|
+
planBlueprintVerificationExecution,
|
|
29
|
+
resolveBlueprintPackageIntegrity,
|
|
30
|
+
runBlueprintVerificationExecution,
|
|
31
|
+
scanContainerImageAuthorities,
|
|
32
|
+
supplyChainDigest,
|
|
33
|
+
} from '@empire-builder-kit/nx/supply-chain';
|
|
34
|
+
import { compareUtf16 } from '@empire-builder-kit/runtime/deterministic-order';
|
|
35
|
+
import {
|
|
36
|
+
BUILTIN_BLUEPRINT_NAME,
|
|
37
|
+
} from '@empire-builder-kit/nx/blueprints';
|
|
38
|
+
import {
|
|
39
|
+
hashGeneratedContent,
|
|
40
|
+
hashOwnedContent,
|
|
41
|
+
validateFoundationOwnershipRecord,
|
|
42
|
+
} from '@empire-builder-kit/nx/ownership';
|
|
43
|
+
import { createHash, randomBytes } from 'node:crypto';
|
|
44
|
+
import {
|
|
45
|
+
closeSync,
|
|
46
|
+
existsSync,
|
|
47
|
+
fstatSync,
|
|
48
|
+
fsyncSync,
|
|
49
|
+
lstatSync,
|
|
50
|
+
linkSync,
|
|
51
|
+
mkdirSync,
|
|
52
|
+
openSync,
|
|
53
|
+
readFileSync,
|
|
54
|
+
readdirSync,
|
|
55
|
+
realpathSync,
|
|
56
|
+
renameSync,
|
|
57
|
+
rmSync,
|
|
58
|
+
unlinkSync,
|
|
59
|
+
writeFileSync,
|
|
60
|
+
} from 'node:fs';
|
|
61
|
+
import { createRequire } from 'node:module';
|
|
62
|
+
import {
|
|
63
|
+
basename,
|
|
64
|
+
dirname,
|
|
65
|
+
isAbsolute,
|
|
66
|
+
join,
|
|
67
|
+
relative,
|
|
68
|
+
resolve,
|
|
69
|
+
sep,
|
|
70
|
+
} from 'node:path';
|
|
71
|
+
|
|
72
|
+
const MAX_INPUT_BYTES = 5 * 1024 * 1024;
|
|
73
|
+
const MAX_LOCK_BYTES = 25 * 1024 * 1024;
|
|
74
|
+
const MAX_OUTPUT_BYTES = 256 * 1024;
|
|
75
|
+
const MAX_SLICE_COUNT = 1_000;
|
|
76
|
+
const workspaceRoot = realpathSync(process.cwd());
|
|
77
|
+
const options = {
|
|
78
|
+
now: undefined,
|
|
79
|
+
operation: 'adopt',
|
|
80
|
+
output: undefined,
|
|
81
|
+
protectedBranch: undefined,
|
|
82
|
+
protectedRef: undefined,
|
|
83
|
+
reviewVerification: false,
|
|
84
|
+
};
|
|
85
|
+
let operationProvided = false;
|
|
86
|
+
|
|
87
|
+
process.on('uncaughtException', failure);
|
|
88
|
+
process.on('unhandledRejection', failure);
|
|
89
|
+
|
|
90
|
+
for (const argument of process.argv.slice(2)) {
|
|
91
|
+
if (argument.startsWith('--operation=')) {
|
|
92
|
+
if (operationProvided) {
|
|
93
|
+
throw new Error('Blueprint trust operation was provided more than once.');
|
|
94
|
+
}
|
|
95
|
+
operationProvided = true;
|
|
96
|
+
options.operation = argument.slice('--operation='.length);
|
|
97
|
+
} else if (argument.startsWith('--output=')) {
|
|
98
|
+
if (options.output !== undefined) {
|
|
99
|
+
throw new Error('Blueprint trust output was provided more than once.');
|
|
100
|
+
}
|
|
101
|
+
options.output = argument.slice('--output='.length);
|
|
102
|
+
} else if (argument.startsWith('--now=')) {
|
|
103
|
+
if (options.now !== undefined) {
|
|
104
|
+
throw new Error('Blueprint trust time was provided more than once.');
|
|
105
|
+
}
|
|
106
|
+
options.now = argument.slice('--now='.length);
|
|
107
|
+
} else if (argument.startsWith('--protected-ref=')) {
|
|
108
|
+
if (options.protectedRef !== undefined) {
|
|
109
|
+
throw new Error(
|
|
110
|
+
'Blueprint trust protected ref was provided more than once.',
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
options.protectedRef = argument.slice('--protected-ref='.length);
|
|
114
|
+
} else if (argument.startsWith('--protected-branch=')) {
|
|
115
|
+
if (options.protectedBranch !== undefined) {
|
|
116
|
+
throw new Error(
|
|
117
|
+
'Blueprint trust protected branch was provided more than once.',
|
|
118
|
+
);
|
|
119
|
+
}
|
|
120
|
+
options.protectedBranch = argument.slice('--protected-branch='.length);
|
|
121
|
+
} else if (argument === '--review-verification') {
|
|
122
|
+
if (options.reviewVerification) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
'Blueprint verification review was requested more than once.',
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
options.reviewVerification = true;
|
|
128
|
+
} else {
|
|
129
|
+
throw new Error('Unsupported Blueprint trust argument: ' + argument);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
if (!['adopt', 'deploy'].includes(options.operation)) {
|
|
133
|
+
throw new Error('Blueprint trust operation must equal adopt or deploy.');
|
|
134
|
+
}
|
|
135
|
+
if (options.protectedRef === undefined || options.protectedRef.length === 0) {
|
|
136
|
+
throw new Error(
|
|
137
|
+
'Blueprint trust requires one explicit --protected-ref=<commit-or-origin-ref>.',
|
|
138
|
+
);
|
|
139
|
+
}
|
|
140
|
+
if (!['develop', 'main'].includes(options.protectedBranch)) {
|
|
141
|
+
throw new Error(
|
|
142
|
+
'Blueprint trust requires one exact --protected-branch=develop|main route.',
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
if (options.reviewVerification && process.argv[1] !== '-') {
|
|
146
|
+
throw new Error(
|
|
147
|
+
'Blueprint verification review is available only through the EBK CLI authority entry.',
|
|
148
|
+
);
|
|
149
|
+
}
|
|
150
|
+
if (options.reviewVerification && options.now !== undefined) {
|
|
151
|
+
throw new Error(
|
|
152
|
+
'Blueprint verification review does not accept caller-controlled time.',
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
if (
|
|
156
|
+
options.reviewVerification &&
|
|
157
|
+
process.env.EBK_BLUEPRINT_AUTHORITY_ENTRY !== 'ebk-cli-v1'
|
|
158
|
+
) {
|
|
159
|
+
throw new Error(
|
|
160
|
+
'Blueprint verification review requires the controlled EBK CLI authority entry.',
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
function insideWorkspace(path) {
|
|
165
|
+
if (
|
|
166
|
+
typeof path !== 'string' ||
|
|
167
|
+
path.length === 0 ||
|
|
168
|
+
path.length > 512 ||
|
|
169
|
+
path !== path.trim() ||
|
|
170
|
+
isAbsolute(path) ||
|
|
171
|
+
path.split(/[\\/]/).includes('..') ||
|
|
172
|
+
/[\u0000-\u001f\u007f-\u009f]/.test(path)
|
|
173
|
+
) {
|
|
174
|
+
throw new Error('Blueprint trust path is not a safe repository-relative path.');
|
|
175
|
+
}
|
|
176
|
+
const candidate = resolve(workspaceRoot, path);
|
|
177
|
+
const child = relative(workspaceRoot, candidate);
|
|
178
|
+
if (child === '..' || child.startsWith('..' + sep)) {
|
|
179
|
+
throw new Error('Blueprint trust path escapes the workspace: ' + path);
|
|
180
|
+
}
|
|
181
|
+
return candidate;
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function assertNoSymlink(candidate, label, allowMissing = false) {
|
|
185
|
+
const child = relative(workspaceRoot, candidate);
|
|
186
|
+
if (child === '..' || child.startsWith('..' + sep)) {
|
|
187
|
+
throw new Error(label + ' resolves outside the workspace.');
|
|
188
|
+
}
|
|
189
|
+
let current = workspaceRoot;
|
|
190
|
+
for (const part of child.split(sep).filter(Boolean)) {
|
|
191
|
+
current = join(current, part);
|
|
192
|
+
if (!existsSync(current)) {
|
|
193
|
+
if (allowMissing) return;
|
|
194
|
+
throw new Error(label + ' is missing.');
|
|
195
|
+
}
|
|
196
|
+
if (lstatSync(current).isSymbolicLink()) {
|
|
197
|
+
throw new Error(label + ' crosses a symbolic link.');
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function readBoundedBytes(path, maximum, label) {
|
|
203
|
+
const candidate = insideWorkspace(path);
|
|
204
|
+
assertNoSymlink(candidate, label);
|
|
205
|
+
const metadata = lstatSync(candidate);
|
|
206
|
+
if (!metadata.isFile() || metadata.size > maximum) {
|
|
207
|
+
throw new Error(label + ' must be a regular bounded file.');
|
|
208
|
+
}
|
|
209
|
+
const real = realpathSync(candidate);
|
|
210
|
+
const child = relative(workspaceRoot, real);
|
|
211
|
+
if (child === '..' || child.startsWith('..' + sep)) {
|
|
212
|
+
throw new Error(label + ' resolves outside the workspace.');
|
|
213
|
+
}
|
|
214
|
+
return readFileSync(real);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
function readBounded(path, maximum, label) {
|
|
218
|
+
return readBoundedBytes(path, maximum, label).toString('utf8');
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
function readJson(path, maximum = MAX_INPUT_BYTES) {
|
|
222
|
+
try {
|
|
223
|
+
return JSON.parse(readBounded(path, maximum, path));
|
|
224
|
+
} catch (error) {
|
|
225
|
+
throw new Error(
|
|
226
|
+
path +
|
|
227
|
+
' is not valid bounded JSON: ' +
|
|
228
|
+
(error instanceof Error ? error.message : String(error)),
|
|
229
|
+
);
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
function readOptional(path, maximum, json = false) {
|
|
234
|
+
const candidate = insideWorkspace(path);
|
|
235
|
+
if (!existsSync(candidate)) return undefined;
|
|
236
|
+
const value = readBounded(path, maximum, path);
|
|
237
|
+
if (!json) return value;
|
|
238
|
+
try {
|
|
239
|
+
return JSON.parse(value);
|
|
240
|
+
} catch {
|
|
241
|
+
throw new Error(path + ' is not valid bounded JSON.');
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
function ownershipInventory() {
|
|
246
|
+
const packagesRoot = insideWorkspace('packages');
|
|
247
|
+
assertNoSymlink(packagesRoot, 'packages');
|
|
248
|
+
if (!lstatSync(packagesRoot).isDirectory()) {
|
|
249
|
+
throw new Error('packages must be a regular directory.');
|
|
250
|
+
}
|
|
251
|
+
const entries = readdirSync(packagesRoot, { withFileTypes: true });
|
|
252
|
+
if (entries.length > MAX_SLICE_COUNT + 100) {
|
|
253
|
+
throw new Error('Package inventory exceeds its bounded project count.');
|
|
254
|
+
}
|
|
255
|
+
const ownership = [];
|
|
256
|
+
for (const entry of entries.sort((left, right) =>
|
|
257
|
+
compareUtf16(left.name, right.name),
|
|
258
|
+
)) {
|
|
259
|
+
if (entry.isSymbolicLink()) {
|
|
260
|
+
throw new Error('Package directory crosses a symbolic link: ' + entry.name);
|
|
261
|
+
}
|
|
262
|
+
if (!entry.isDirectory()) continue;
|
|
263
|
+
const projectRoot = join(packagesRoot, entry.name);
|
|
264
|
+
assertNoSymlink(projectRoot, 'packages/' + entry.name);
|
|
265
|
+
const realProject = realpathSync(projectRoot);
|
|
266
|
+
const projectChild = relative(workspaceRoot, realProject);
|
|
267
|
+
if (projectChild === '..' || projectChild.startsWith('..' + sep)) {
|
|
268
|
+
throw new Error('Package directory resolves outside the workspace.');
|
|
269
|
+
}
|
|
270
|
+
const ownershipPath =
|
|
271
|
+
'packages/' + entry.name + '/.ebk/ownership.json';
|
|
272
|
+
if (!existsSync(insideWorkspace(ownershipPath))) {
|
|
273
|
+
throw new Error(
|
|
274
|
+
'Top-level package is missing generated ownership: ' + ownershipPath,
|
|
275
|
+
);
|
|
276
|
+
}
|
|
277
|
+
const value = readJson(ownershipPath, 2 * 1024 * 1024);
|
|
278
|
+
if (ownershipPath === 'packages/foundation/.ebk/ownership.json') {
|
|
279
|
+
const foundation = validateFoundationOwnershipRecord(value);
|
|
280
|
+
if (!foundation.valid) {
|
|
281
|
+
throw new Error(
|
|
282
|
+
ownershipPath +
|
|
283
|
+
' is not valid Foundation ownership: ' +
|
|
284
|
+
foundation.issues
|
|
285
|
+
.slice(0, 10)
|
|
286
|
+
.map(({ path, message }) => path + ': ' + message)
|
|
287
|
+
.join('; '),
|
|
288
|
+
);
|
|
289
|
+
}
|
|
290
|
+
continue;
|
|
291
|
+
}
|
|
292
|
+
ownership.push({ path: ownershipPath, value });
|
|
293
|
+
if (ownership.length > MAX_SLICE_COUNT) {
|
|
294
|
+
throw new Error('Generated Slice ownership exceeds 1,000 records.');
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
return ownership;
|
|
298
|
+
}
|
|
299
|
+
|
|
300
|
+
function generatedContentInventory(ownership) {
|
|
301
|
+
const generated = [];
|
|
302
|
+
for (const candidate of ownership) {
|
|
303
|
+
const value = candidate.value;
|
|
304
|
+
if (value.blueprint?.name === BUILTIN_BLUEPRINT_NAME) continue;
|
|
305
|
+
const slice = value.slice;
|
|
306
|
+
if (
|
|
307
|
+
typeof slice !== 'string' ||
|
|
308
|
+
!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(slice) ||
|
|
309
|
+
!Array.isArray(value.verification) ||
|
|
310
|
+
value.verification.length !== 1 ||
|
|
311
|
+
value.verification.some(
|
|
312
|
+
(target) =>
|
|
313
|
+
typeof target !== 'string' ||
|
|
314
|
+
!/^[a-z][a-z0-9]*(?:-[a-z0-9]+)*$/.test(target),
|
|
315
|
+
) ||
|
|
316
|
+
!Array.isArray(value.paths)
|
|
317
|
+
) {
|
|
318
|
+
throw new Error(
|
|
319
|
+
candidate.path +
|
|
320
|
+
' must declare local verification target names and owned paths.',
|
|
321
|
+
);
|
|
322
|
+
}
|
|
323
|
+
const projectPath = 'packages/' + slice + '/project.json';
|
|
324
|
+
const projectOwnership = value.paths.find(
|
|
325
|
+
(entry) =>
|
|
326
|
+
entry?.path === 'project.json' &&
|
|
327
|
+
entry?.origin === 'blueprint' &&
|
|
328
|
+
entry?.mode === 'managed',
|
|
329
|
+
);
|
|
330
|
+
if (!projectOwnership) {
|
|
331
|
+
throw new Error(projectPath + ' must be whole-file Blueprint managed.');
|
|
332
|
+
}
|
|
333
|
+
const project = readJson(projectPath);
|
|
334
|
+
if (
|
|
335
|
+
!project ||
|
|
336
|
+
typeof project !== 'object' ||
|
|
337
|
+
Array.isArray(project) ||
|
|
338
|
+
project.name !== slice ||
|
|
339
|
+
!project.targets ||
|
|
340
|
+
typeof project.targets !== 'object' ||
|
|
341
|
+
Array.isArray(project.targets)
|
|
342
|
+
) {
|
|
343
|
+
throw new Error(projectPath + ' must define the exact Slice project.');
|
|
344
|
+
}
|
|
345
|
+
const verificationTargets = blueprintVerificationTargetClosure({
|
|
346
|
+
projectRoot: 'packages/' + slice,
|
|
347
|
+
roots: value.verification,
|
|
348
|
+
targets: project.targets,
|
|
349
|
+
});
|
|
350
|
+
const blueprintFiles = value.paths
|
|
351
|
+
.filter((owned) => owned?.origin === 'blueprint')
|
|
352
|
+
.map((owned) => {
|
|
353
|
+
if (
|
|
354
|
+
typeof owned.path !== 'string' ||
|
|
355
|
+
typeof owned.sha256 !== 'string' ||
|
|
356
|
+
!['managed', 'seeded'].includes(owned.mode)
|
|
357
|
+
) {
|
|
358
|
+
throw new Error(
|
|
359
|
+
candidate.path + ' contains an invalid Blueprint-origin path.',
|
|
360
|
+
);
|
|
361
|
+
}
|
|
362
|
+
const blueprintPath = 'packages/' + slice + '/' + owned.path;
|
|
363
|
+
const bytes = readBoundedBytes(
|
|
364
|
+
blueprintPath,
|
|
365
|
+
MAX_INPUT_BYTES,
|
|
366
|
+
blueprintPath,
|
|
367
|
+
);
|
|
368
|
+
const contents = bytes.toString('utf8');
|
|
369
|
+
if (
|
|
370
|
+
owned.mode === 'managed' &&
|
|
371
|
+
hashOwnedContent(contents, owned) !== owned.sha256
|
|
372
|
+
) {
|
|
373
|
+
throw new Error(
|
|
374
|
+
blueprintPath + ' differs from its Blueprint ownership digest.',
|
|
375
|
+
);
|
|
376
|
+
}
|
|
377
|
+
return {
|
|
378
|
+
digest: hashGeneratedContent(bytes),
|
|
379
|
+
mode: owned.mode,
|
|
380
|
+
path: owned.path,
|
|
381
|
+
};
|
|
382
|
+
})
|
|
383
|
+
.sort((left, right) => compareUtf16(left.path, right.path));
|
|
384
|
+
if (blueprintFiles.length === 0) {
|
|
385
|
+
throw new Error(
|
|
386
|
+
candidate.path + ' must bind at least one Blueprint-origin file.',
|
|
387
|
+
);
|
|
388
|
+
}
|
|
389
|
+
const registries = new Set();
|
|
390
|
+
for (const owned of value.paths) {
|
|
391
|
+
if (
|
|
392
|
+
owned?.origin !== 'blueprint' ||
|
|
393
|
+
typeof owned.path !== 'string' ||
|
|
394
|
+
(!/(?:^|\/)Dockerfile$/i.test(owned.path) &&
|
|
395
|
+
!/\.Dockerfile$/i.test(owned.path))
|
|
396
|
+
) {
|
|
397
|
+
continue;
|
|
398
|
+
}
|
|
399
|
+
const dockerfilePath = 'packages/' + slice + '/' + owned.path;
|
|
400
|
+
const authorities = scanContainerImageAuthorities(
|
|
401
|
+
dockerfilePath,
|
|
402
|
+
readBounded(dockerfilePath, MAX_INPUT_BYTES, dockerfilePath),
|
|
403
|
+
);
|
|
404
|
+
for (const { reference } of authorities) {
|
|
405
|
+
registries.add(blueprintContainerRegistry(reference));
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
generated.push({
|
|
409
|
+
blueprintFiles,
|
|
410
|
+
containerRegistries: [...registries].sort(),
|
|
411
|
+
projectPath,
|
|
412
|
+
slice,
|
|
413
|
+
verificationRoots: [...value.verification].sort(),
|
|
414
|
+
verificationTargets,
|
|
415
|
+
});
|
|
416
|
+
}
|
|
417
|
+
return generated.sort((left, right) =>
|
|
418
|
+
compareUtf16(left.slice, right.slice),
|
|
419
|
+
);
|
|
420
|
+
}
|
|
421
|
+
|
|
422
|
+
function assertProtectedReviewExecutionConfiguration(input) {
|
|
423
|
+
const sources = {};
|
|
424
|
+
for (const [path, label] of [
|
|
425
|
+
['package.json', 'package.json'],
|
|
426
|
+
['pnpm-workspace.yaml', 'pnpm-workspace.yaml'],
|
|
427
|
+
['nx.json', 'nx.json'],
|
|
428
|
+
]) {
|
|
429
|
+
const current = readBoundedBytes(path, MAX_INPUT_BYTES, label);
|
|
430
|
+
inspectProtectedGitFileAuthority({
|
|
431
|
+
current,
|
|
432
|
+
headCommit: input.headCommit,
|
|
433
|
+
path,
|
|
434
|
+
protectedCommit: input.protectedCommit,
|
|
435
|
+
workspaceRoot,
|
|
436
|
+
});
|
|
437
|
+
sources[path] = current.toString('utf8');
|
|
438
|
+
}
|
|
439
|
+
let manifest;
|
|
440
|
+
try {
|
|
441
|
+
manifest = JSON.parse(sources['package.json']);
|
|
442
|
+
} catch {
|
|
443
|
+
throw new Error(
|
|
444
|
+
'Blueprint verification requires valid protected package.json and nx.json configuration.',
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
if (
|
|
448
|
+
!manifest ||
|
|
449
|
+
typeof manifest !== 'object' ||
|
|
450
|
+
Array.isArray(manifest) ||
|
|
451
|
+
manifest.packageManager !== input.packageManager
|
|
452
|
+
) {
|
|
453
|
+
throw new Error(
|
|
454
|
+
'Blueprint verification execution configuration differs from its protected authority.',
|
|
455
|
+
);
|
|
456
|
+
}
|
|
457
|
+
assertPnpmReviewConfiguration(
|
|
458
|
+
sources['package.json'],
|
|
459
|
+
sources['pnpm-workspace.yaml'],
|
|
460
|
+
);
|
|
461
|
+
assertBlueprintVerificationNxAuthority(sources['nx.json']);
|
|
462
|
+
for (const path of assertNoMutableBlueprintVerificationConfiguration(
|
|
463
|
+
workspaceRoot,
|
|
464
|
+
)) {
|
|
465
|
+
inspectProtectedGitFileAuthority({
|
|
466
|
+
current: readBoundedBytes(path, MAX_INPUT_BYTES, path),
|
|
467
|
+
headCommit: input.headCommit,
|
|
468
|
+
path,
|
|
469
|
+
protectedCommit: input.protectedCommit,
|
|
470
|
+
workspaceRoot,
|
|
471
|
+
});
|
|
472
|
+
}
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
function assertReviewedGeneratedContent(input) {
|
|
476
|
+
const observed = generatedContentInventory(input.ownership);
|
|
477
|
+
if (
|
|
478
|
+
supplyChainDigest(observed) !==
|
|
479
|
+
supplyChainDigest(input.approvedGeneratedContent)
|
|
480
|
+
) {
|
|
481
|
+
throw new Error(
|
|
482
|
+
'Blueprint verification generated content differs from the exact protected approval.',
|
|
483
|
+
);
|
|
484
|
+
}
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
function reviewedTargetPlan(
|
|
488
|
+
content,
|
|
489
|
+
name,
|
|
490
|
+
target,
|
|
491
|
+
) {
|
|
492
|
+
const options = target.options;
|
|
493
|
+
const plan = planBlueprintVerificationExecution(options);
|
|
494
|
+
if (!plan) {
|
|
495
|
+
throw new Error(
|
|
496
|
+
'Blueprint verification target ' + content.slice + ':' + name +
|
|
497
|
+
' has no closed direct execution plan.',
|
|
498
|
+
);
|
|
499
|
+
}
|
|
500
|
+
const approvedPaths = new Set(content.blueprintFiles.map(({ path }) => path));
|
|
501
|
+
if (plan.kind === 'node') {
|
|
502
|
+
if (!approvedPaths.has(plan.script)) {
|
|
503
|
+
throw new Error(
|
|
504
|
+
'Blueprint verification Node entry must be an approved Blueprint file in its exact Slice.',
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
return plan;
|
|
508
|
+
}
|
|
509
|
+
if (plan.kind === 'typescript') {
|
|
510
|
+
if (!approvedPaths.has('tsconfig.json')) {
|
|
511
|
+
throw new Error(
|
|
512
|
+
'Blueprint verification TypeScript entry requires one approved Slice tsconfig.json.',
|
|
513
|
+
);
|
|
514
|
+
}
|
|
515
|
+
return plan;
|
|
516
|
+
}
|
|
517
|
+
if (!approvedPaths.has(plan.spec)) {
|
|
518
|
+
throw new Error(
|
|
519
|
+
'Blueprint verification Vitest entry must be one exact approved Slice spec.',
|
|
520
|
+
);
|
|
521
|
+
}
|
|
522
|
+
return plan;
|
|
523
|
+
}
|
|
524
|
+
|
|
525
|
+
function runReviewedVerificationRoots(content, reviewAuthority) {
|
|
526
|
+
const project = readJson(content.projectPath);
|
|
527
|
+
if (
|
|
528
|
+
!project ||
|
|
529
|
+
typeof project !== 'object' ||
|
|
530
|
+
Array.isArray(project) ||
|
|
531
|
+
project.name !== content.slice ||
|
|
532
|
+
!project.targets ||
|
|
533
|
+
typeof project.targets !== 'object' ||
|
|
534
|
+
Array.isArray(project.targets) ||
|
|
535
|
+
supplyChainDigest(
|
|
536
|
+
blueprintVerificationTargetClosure({
|
|
537
|
+
projectRoot: 'packages/' + content.slice,
|
|
538
|
+
roots: content.verificationRoots,
|
|
539
|
+
targets: project.targets,
|
|
540
|
+
}),
|
|
541
|
+
) !== supplyChainDigest(content.verificationTargets)
|
|
542
|
+
) {
|
|
543
|
+
throw new Error(
|
|
544
|
+
'Blueprint verification review requires the exact approved target closure.',
|
|
545
|
+
);
|
|
546
|
+
}
|
|
547
|
+
assertProtectedReviewExecutionConfiguration(reviewAuthority);
|
|
548
|
+
assertReviewedGeneratedContent(reviewAuthority);
|
|
549
|
+
assertProtectedGitWorkingTreeAuthority({
|
|
550
|
+
headCommit: reviewAuthority.headCommit,
|
|
551
|
+
protectedCommit: reviewAuthority.protectedCommit,
|
|
552
|
+
protectedRef: reviewAuthority.protectedRef,
|
|
553
|
+
workspaceRoot,
|
|
554
|
+
});
|
|
555
|
+
const executed = new Set();
|
|
556
|
+
const active = new Set();
|
|
557
|
+
const executionAuthorities = [];
|
|
558
|
+
let nodeVersion;
|
|
559
|
+
const executeTarget = (name) => {
|
|
560
|
+
if (executed.has(name)) return;
|
|
561
|
+
if (active.has(name)) {
|
|
562
|
+
throw new Error(
|
|
563
|
+
'Blueprint verification target dependency cycle reached direct execution.',
|
|
564
|
+
);
|
|
565
|
+
}
|
|
566
|
+
const target = project.targets[name];
|
|
567
|
+
const dependencies = blueprintVerificationTargetDependencies(
|
|
568
|
+
name,
|
|
569
|
+
target,
|
|
570
|
+
'packages/' + content.slice,
|
|
571
|
+
);
|
|
572
|
+
active.add(name);
|
|
573
|
+
for (const dependency of dependencies) executeTarget(dependency);
|
|
574
|
+
active.delete(name);
|
|
575
|
+
const reviewedPlan = reviewedTargetPlan(content, name, target);
|
|
576
|
+
const targetIdentity = content.slice + ':' + name;
|
|
577
|
+
const { invocation, result: execution } = runBlueprintVerificationExecution({
|
|
578
|
+
assertAuthority() {
|
|
579
|
+
assertReviewedGeneratedContent(reviewAuthority);
|
|
580
|
+
assertProtectedReviewExecutionConfiguration(reviewAuthority);
|
|
581
|
+
assertProtectedGitWorkingTreeAuthority({
|
|
582
|
+
headCommit: reviewAuthority.headCommit,
|
|
583
|
+
protectedCommit: reviewAuthority.protectedCommit,
|
|
584
|
+
protectedRef: reviewAuthority.protectedRef,
|
|
585
|
+
workspaceRoot,
|
|
586
|
+
});
|
|
587
|
+
},
|
|
588
|
+
options: target.options,
|
|
589
|
+
projectName: content.slice,
|
|
590
|
+
projectRoot: 'packages/' + content.slice,
|
|
591
|
+
workspaceRoot,
|
|
592
|
+
});
|
|
593
|
+
if (execution.error || execution.status !== 0) {
|
|
594
|
+
const detail = String(
|
|
595
|
+
execution.error?.message || execution.stderr || execution.stdout || '',
|
|
596
|
+
)
|
|
597
|
+
.replace(/[\u0000-\u001f\u007f-\u009f]/g, ' ')
|
|
598
|
+
.slice(0, 2_000);
|
|
599
|
+
throw new Error(
|
|
600
|
+
'Blueprint verification target ' +
|
|
601
|
+
targetIdentity +
|
|
602
|
+
' failed under the exact direct reviewer: ' +
|
|
603
|
+
detail,
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
if (
|
|
607
|
+
invocation.plan.kind !== reviewedPlan.kind ||
|
|
608
|
+
(nodeVersion !== undefined &&
|
|
609
|
+
nodeVersion !== invocation.nodeVersion)
|
|
610
|
+
) {
|
|
611
|
+
throw new Error(
|
|
612
|
+
'Blueprint verification execution authority changed across its reviewed closure.',
|
|
613
|
+
);
|
|
614
|
+
}
|
|
615
|
+
nodeVersion = invocation.nodeVersion;
|
|
616
|
+
if (invocation.plan.kind === 'node') {
|
|
617
|
+
if (invocation.toolAuthority !== undefined) {
|
|
618
|
+
throw new Error(
|
|
619
|
+
'Blueprint verification Node target acquired package execution authority.',
|
|
620
|
+
);
|
|
621
|
+
}
|
|
622
|
+
executionAuthorities.push({ kind: 'node', target: targetIdentity });
|
|
623
|
+
} else {
|
|
624
|
+
if (
|
|
625
|
+
!invocation.toolAuthority ||
|
|
626
|
+
invocation.toolAuthority.name !== invocation.plan.kind
|
|
627
|
+
) {
|
|
628
|
+
throw new Error(
|
|
629
|
+
'Blueprint verification package target lacks exact portable execution authority.',
|
|
630
|
+
);
|
|
631
|
+
}
|
|
632
|
+
executionAuthorities.push({
|
|
633
|
+
...invocation.toolAuthority,
|
|
634
|
+
kind: invocation.plan.kind,
|
|
635
|
+
target: targetIdentity,
|
|
636
|
+
});
|
|
637
|
+
}
|
|
638
|
+
executed.add(name);
|
|
639
|
+
};
|
|
640
|
+
for (const root of content.verificationRoots) executeTarget(root);
|
|
641
|
+
if (
|
|
642
|
+
typeof nodeVersion !== 'string' ||
|
|
643
|
+
executionAuthorities.length !== content.verificationTargets.length
|
|
644
|
+
) {
|
|
645
|
+
throw new Error(
|
|
646
|
+
'Blueprint verification did not execute the complete reviewed target closure.',
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
return {
|
|
650
|
+
executedRoots: content.verificationRoots.map((root) => ({
|
|
651
|
+
outcome: 'passed',
|
|
652
|
+
target: content.slice + ':' + root,
|
|
653
|
+
})),
|
|
654
|
+
executionAuthorities: executionAuthorities.sort((left, right) =>
|
|
655
|
+
compareUtf16(left.target, right.target),
|
|
656
|
+
),
|
|
657
|
+
nodeVersion,
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
|
|
661
|
+
function writeAtomicWorkspaceFile(path, output, label) {
|
|
662
|
+
const target = insideWorkspace(path);
|
|
663
|
+
assertNoSymlink(target, path, true);
|
|
664
|
+
const parent = dirname(target);
|
|
665
|
+
mkdirSync(parent, { recursive: true, mode: 0o700 });
|
|
666
|
+
assertNoSymlink(parent, dirname(path));
|
|
667
|
+
if (existsSync(target)) {
|
|
668
|
+
const existing = lstatSync(target);
|
|
669
|
+
if (
|
|
670
|
+
existing.isSymbolicLink() ||
|
|
671
|
+
!existing.isFile() ||
|
|
672
|
+
existing.nlink !== 1 ||
|
|
673
|
+
realpathSync(target) !== target
|
|
674
|
+
) {
|
|
675
|
+
throw new Error(label + ' target is not one canonical regular file.');
|
|
676
|
+
}
|
|
677
|
+
}
|
|
678
|
+
const temporary = join(
|
|
679
|
+
parent,
|
|
680
|
+
'.' +
|
|
681
|
+
basename(target) +
|
|
682
|
+
'.ebk-' +
|
|
683
|
+
process.pid +
|
|
684
|
+
'-' +
|
|
685
|
+
randomBytes(12).toString('hex'),
|
|
686
|
+
);
|
|
687
|
+
let descriptor;
|
|
688
|
+
try {
|
|
689
|
+
descriptor = openSync(temporary, 'wx', 0o600);
|
|
690
|
+
writeFileSync(descriptor, output, 'utf8');
|
|
691
|
+
fsyncSync(descriptor);
|
|
692
|
+
closeSync(descriptor);
|
|
693
|
+
descriptor = undefined;
|
|
694
|
+
const staged = lstatSync(temporary);
|
|
695
|
+
if (
|
|
696
|
+
staged.isSymbolicLink() ||
|
|
697
|
+
!staged.isFile() ||
|
|
698
|
+
staged.nlink !== 1 ||
|
|
699
|
+
realpathSync(temporary) !== temporary ||
|
|
700
|
+
readFileSync(temporary, 'utf8') !== output ||
|
|
701
|
+
(process.platform !== 'win32' && (staged.mode & 0o777) !== 0o600)
|
|
702
|
+
) {
|
|
703
|
+
throw new Error(label + ' temporary file changed before retention.');
|
|
704
|
+
}
|
|
705
|
+
renameSync(temporary, target);
|
|
706
|
+
const retained = lstatSync(target);
|
|
707
|
+
if (
|
|
708
|
+
retained.isSymbolicLink() ||
|
|
709
|
+
!retained.isFile() ||
|
|
710
|
+
retained.nlink !== 1 ||
|
|
711
|
+
realpathSync(target) !== target ||
|
|
712
|
+
readFileSync(target, 'utf8') !== output ||
|
|
713
|
+
(process.platform !== 'win32' && (retained.mode & 0o777) !== 0o600)
|
|
714
|
+
) {
|
|
715
|
+
throw new Error(label + ' was not retained as one exact private file.');
|
|
716
|
+
}
|
|
717
|
+
} finally {
|
|
718
|
+
if (descriptor !== undefined) closeSync(descriptor);
|
|
719
|
+
rmSync(temporary, { force: true });
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
function receiptRetentionError(
|
|
724
|
+
message,
|
|
725
|
+
classification = 'blueprint-trust-check-failed',
|
|
726
|
+
) {
|
|
727
|
+
const error = new Error(message);
|
|
728
|
+
error.classification = classification;
|
|
729
|
+
error.preserveEvidence = true;
|
|
730
|
+
return error;
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function receiptAlreadyExists(path) {
|
|
734
|
+
return receiptRetentionError(
|
|
735
|
+
'Blueprint verification receipt already exists at ' +
|
|
736
|
+
path +
|
|
737
|
+
'. Delete the stale receipt in a dedicated protected commit, then rerun the installed EBK verification review from that exact protected successor.',
|
|
738
|
+
'blueprint-verification-receipt-not-absent',
|
|
739
|
+
);
|
|
740
|
+
}
|
|
741
|
+
|
|
742
|
+
function preflightRetainedReceiptPaths(paths) {
|
|
743
|
+
if (
|
|
744
|
+
!Array.isArray(paths) ||
|
|
745
|
+
paths.length > MAX_SLICE_COUNT ||
|
|
746
|
+
new Set(paths).size !== paths.length ||
|
|
747
|
+
paths.some((path, index) =>
|
|
748
|
+
index === 0 ? false : compareUtf16(paths[index - 1], path) >= 0,
|
|
749
|
+
)
|
|
750
|
+
) {
|
|
751
|
+
throw receiptRetentionError(
|
|
752
|
+
'Blueprint verification receipt paths are not one bounded canonical order.',
|
|
753
|
+
);
|
|
754
|
+
}
|
|
755
|
+
for (const path of paths) {
|
|
756
|
+
const target = insideWorkspace(path);
|
|
757
|
+
assertNoSymlink(target, path, true);
|
|
758
|
+
if (!existsSync(target)) continue;
|
|
759
|
+
const existing = lstatSync(target);
|
|
760
|
+
if (
|
|
761
|
+
existing.isSymbolicLink() ||
|
|
762
|
+
!existing.isFile() ||
|
|
763
|
+
existing.nlink !== 1 ||
|
|
764
|
+
realpathSync(target) !== target
|
|
765
|
+
) {
|
|
766
|
+
throw receiptRetentionError(
|
|
767
|
+
'Blueprint verification receipt target is not one absent canonical path: ' +
|
|
768
|
+
path +
|
|
769
|
+
'.',
|
|
770
|
+
'blueprint-verification-receipt-not-absent',
|
|
771
|
+
);
|
|
772
|
+
}
|
|
773
|
+
throw receiptAlreadyExists(path);
|
|
774
|
+
}
|
|
775
|
+
}
|
|
776
|
+
|
|
777
|
+
function writeRetainedReceipts(receipts) {
|
|
778
|
+
const prepared = receipts.map(({ reference, receipt }) => {
|
|
779
|
+
const output = JSON.stringify(receipt, null, 2) + '\n';
|
|
780
|
+
if (Buffer.byteLength(output, 'utf8') > MAX_OUTPUT_BYTES) {
|
|
781
|
+
throw receiptRetentionError(
|
|
782
|
+
'Blueprint verification receipt exceeds 256 KiB.',
|
|
783
|
+
);
|
|
784
|
+
}
|
|
785
|
+
return { output, reference };
|
|
786
|
+
});
|
|
787
|
+
preflightRetainedReceiptPaths(
|
|
788
|
+
prepared.map(({ reference }) => reference),
|
|
789
|
+
);
|
|
790
|
+
const temporaryOwnership = [];
|
|
791
|
+
const staged = [];
|
|
792
|
+
const linked = [];
|
|
793
|
+
try {
|
|
794
|
+
for (const { output, reference } of prepared) {
|
|
795
|
+
const target = insideWorkspace(reference);
|
|
796
|
+
const parent = dirname(target);
|
|
797
|
+
mkdirSync(parent, { recursive: true, mode: 0o700 });
|
|
798
|
+
assertNoSymlink(parent, dirname(reference));
|
|
799
|
+
const temporary = join(
|
|
800
|
+
parent,
|
|
801
|
+
'.' +
|
|
802
|
+
basename(target) +
|
|
803
|
+
'.ebk-' +
|
|
804
|
+
process.pid +
|
|
805
|
+
'-' +
|
|
806
|
+
randomBytes(12).toString('hex'),
|
|
807
|
+
);
|
|
808
|
+
let descriptor;
|
|
809
|
+
try {
|
|
810
|
+
descriptor = openSync(temporary, 'wx', 0o600);
|
|
811
|
+
const opened = fstatSync(descriptor);
|
|
812
|
+
temporaryOwnership.push({
|
|
813
|
+
dev: opened.dev,
|
|
814
|
+
ino: opened.ino,
|
|
815
|
+
temporary,
|
|
816
|
+
});
|
|
817
|
+
writeFileSync(descriptor, output, 'utf8');
|
|
818
|
+
fsyncSync(descriptor);
|
|
819
|
+
closeSync(descriptor);
|
|
820
|
+
descriptor = undefined;
|
|
821
|
+
const metadata = lstatSync(temporary);
|
|
822
|
+
if (
|
|
823
|
+
metadata.isSymbolicLink() ||
|
|
824
|
+
!metadata.isFile() ||
|
|
825
|
+
metadata.nlink !== 1 ||
|
|
826
|
+
metadata.dev !== opened.dev ||
|
|
827
|
+
metadata.ino !== opened.ino ||
|
|
828
|
+
realpathSync(temporary) !== temporary ||
|
|
829
|
+
readFileSync(temporary, 'utf8') !== output ||
|
|
830
|
+
(process.platform !== 'win32' &&
|
|
831
|
+
(metadata.mode & 0o777) !== 0o600)
|
|
832
|
+
) {
|
|
833
|
+
throw receiptRetentionError(
|
|
834
|
+
'Blueprint verification receipt temporary file changed before retention.',
|
|
835
|
+
);
|
|
836
|
+
}
|
|
837
|
+
staged.push({
|
|
838
|
+
dev: opened.dev,
|
|
839
|
+
ino: opened.ino,
|
|
840
|
+
output,
|
|
841
|
+
reference,
|
|
842
|
+
target,
|
|
843
|
+
temporary,
|
|
844
|
+
});
|
|
845
|
+
} finally {
|
|
846
|
+
if (descriptor !== undefined) closeSync(descriptor);
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
for (const entry of staged) {
|
|
850
|
+
try {
|
|
851
|
+
linkSync(entry.temporary, entry.target);
|
|
852
|
+
} catch (error) {
|
|
853
|
+
if (error && typeof error === 'object' && error.code === 'EEXIST') {
|
|
854
|
+
throw receiptAlreadyExists(entry.reference);
|
|
855
|
+
}
|
|
856
|
+
throw error;
|
|
857
|
+
}
|
|
858
|
+
linked.push(entry);
|
|
859
|
+
}
|
|
860
|
+
for (const entry of staged) {
|
|
861
|
+
const retained = lstatSync(entry.target);
|
|
862
|
+
const temporary = lstatSync(entry.temporary);
|
|
863
|
+
if (
|
|
864
|
+
retained.isSymbolicLink() ||
|
|
865
|
+
!retained.isFile() ||
|
|
866
|
+
retained.nlink !== 2 ||
|
|
867
|
+
retained.dev !== entry.dev ||
|
|
868
|
+
retained.ino !== entry.ino ||
|
|
869
|
+
temporary.dev !== entry.dev ||
|
|
870
|
+
temporary.ino !== entry.ino ||
|
|
871
|
+
readFileSync(entry.target, 'utf8') !== entry.output
|
|
872
|
+
) {
|
|
873
|
+
throw receiptRetentionError(
|
|
874
|
+
'Blueprint verification receipt link changed before retention.',
|
|
875
|
+
);
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
for (const entry of staged) {
|
|
879
|
+
unlinkSync(entry.temporary);
|
|
880
|
+
const retained = lstatSync(entry.target);
|
|
881
|
+
if (
|
|
882
|
+
retained.isSymbolicLink() ||
|
|
883
|
+
!retained.isFile() ||
|
|
884
|
+
retained.nlink !== 1 ||
|
|
885
|
+
realpathSync(entry.target) !== entry.target ||
|
|
886
|
+
readFileSync(entry.target, 'utf8') !== entry.output ||
|
|
887
|
+
(process.platform !== 'win32' &&
|
|
888
|
+
(retained.mode & 0o777) !== 0o600)
|
|
889
|
+
) {
|
|
890
|
+
throw receiptRetentionError(
|
|
891
|
+
'Blueprint verification receipt was not retained as one exact private file.',
|
|
892
|
+
);
|
|
893
|
+
}
|
|
894
|
+
}
|
|
895
|
+
} catch (error) {
|
|
896
|
+
for (const entry of [...linked].reverse()) {
|
|
897
|
+
if (!existsSync(entry.target)) continue;
|
|
898
|
+
const target = lstatSync(entry.target);
|
|
899
|
+
if (
|
|
900
|
+
target.isFile() &&
|
|
901
|
+
!target.isSymbolicLink() &&
|
|
902
|
+
target.dev === entry.dev &&
|
|
903
|
+
target.ino === entry.ino
|
|
904
|
+
) {
|
|
905
|
+
unlinkSync(entry.target);
|
|
906
|
+
}
|
|
907
|
+
}
|
|
908
|
+
throw error;
|
|
909
|
+
} finally {
|
|
910
|
+
for (const entry of temporaryOwnership) {
|
|
911
|
+
if (!existsSync(entry.temporary)) continue;
|
|
912
|
+
const temporary = lstatSync(entry.temporary);
|
|
913
|
+
if (
|
|
914
|
+
temporary.isFile() &&
|
|
915
|
+
!temporary.isSymbolicLink() &&
|
|
916
|
+
temporary.dev === entry.dev &&
|
|
917
|
+
temporary.ino === entry.ino
|
|
918
|
+
) {
|
|
919
|
+
unlinkSync(entry.temporary);
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
}
|
|
923
|
+
}
|
|
924
|
+
|
|
925
|
+
function writeEvidence(path, value) {
|
|
926
|
+
const output = JSON.stringify(value, null, 2) + '\n';
|
|
927
|
+
if (Buffer.byteLength(output, 'utf8') > MAX_OUTPUT_BYTES) {
|
|
928
|
+
throw new Error('Blueprint trust evidence exceeds 256 KiB.');
|
|
929
|
+
}
|
|
930
|
+
if (path) {
|
|
931
|
+
writeAtomicWorkspaceFile(path, output, 'Blueprint trust evidence');
|
|
932
|
+
}
|
|
933
|
+
process.stdout.write(output);
|
|
934
|
+
}
|
|
935
|
+
|
|
936
|
+
function failure(error) {
|
|
937
|
+
const value = {
|
|
938
|
+
error: {
|
|
939
|
+
classification:
|
|
940
|
+
error &&
|
|
941
|
+
typeof error === 'object' &&
|
|
942
|
+
typeof error.classification === 'string'
|
|
943
|
+
? error.classification
|
|
944
|
+
: 'blueprint-trust-check-failed',
|
|
945
|
+
message: (error instanceof Error ? error.message : String(error))
|
|
946
|
+
.replace(/[\u0000-\u001f\u007f-\u009f]/g, ' ')
|
|
947
|
+
.slice(0, 2_000),
|
|
948
|
+
...(error &&
|
|
949
|
+
typeof error === 'object' &&
|
|
950
|
+
typeof error.path === 'string'
|
|
951
|
+
? { path: error.path.slice(0, 512) }
|
|
952
|
+
: {}),
|
|
953
|
+
},
|
|
954
|
+
generatedAt: new Date().toISOString(),
|
|
955
|
+
kind: 'ebk-blueprint-trust-check',
|
|
956
|
+
operation: options.operation,
|
|
957
|
+
outcome: 'failed',
|
|
958
|
+
schemaVersion: 1,
|
|
959
|
+
};
|
|
960
|
+
try {
|
|
961
|
+
if (error?.preserveEvidence === true) {
|
|
962
|
+
process.stdout.write(JSON.stringify(value, null, 2) + '\n');
|
|
963
|
+
} else {
|
|
964
|
+
writeEvidence(options.output, value);
|
|
965
|
+
}
|
|
966
|
+
} catch {
|
|
967
|
+
process.stdout.write(JSON.stringify(value, null, 2) + '\n');
|
|
968
|
+
}
|
|
969
|
+
process.exitCode = 1;
|
|
970
|
+
}
|
|
971
|
+
|
|
972
|
+
try {
|
|
973
|
+
const require = createRequire(import.meta.url);
|
|
974
|
+
const nxPackage = require('@empire-builder-kit/nx/package.json');
|
|
975
|
+
if (
|
|
976
|
+
!nxPackage ||
|
|
977
|
+
typeof nxPackage !== 'object' ||
|
|
978
|
+
typeof nxPackage.version !== 'string'
|
|
979
|
+
) {
|
|
980
|
+
throw new Error('Installed @empire-builder-kit/nx version is unavailable.');
|
|
981
|
+
}
|
|
982
|
+
const ownership = ownershipInventory();
|
|
983
|
+
const generatedContent = generatedContentInventory(ownership);
|
|
984
|
+
const reviewReceiptReferences = options.reviewVerification
|
|
985
|
+
? generatedContent
|
|
986
|
+
.map(({ slice }) => blueprintVerificationExecutionReceiptPath(slice))
|
|
987
|
+
.sort(compareUtf16)
|
|
988
|
+
: [];
|
|
989
|
+
if (options.reviewVerification) {
|
|
990
|
+
preflightRetainedReceiptPaths(reviewReceiptReferences);
|
|
991
|
+
}
|
|
992
|
+
const manifestBytes = readBoundedBytes(
|
|
993
|
+
'package.json',
|
|
994
|
+
MAX_INPUT_BYTES,
|
|
995
|
+
'package.json',
|
|
996
|
+
);
|
|
997
|
+
let manifest;
|
|
998
|
+
try {
|
|
999
|
+
manifest = JSON.parse(manifestBytes.toString('utf8'));
|
|
1000
|
+
} catch {
|
|
1001
|
+
throw new Error('package.json is not valid bounded JSON.');
|
|
1002
|
+
}
|
|
1003
|
+
const currentPolicy = readOptional(
|
|
1004
|
+
'supply-chain/blueprint-trust-policy.json',
|
|
1005
|
+
MAX_INPUT_BYTES,
|
|
1006
|
+
true,
|
|
1007
|
+
);
|
|
1008
|
+
const currentSnapshot = readOptional(
|
|
1009
|
+
'supply-chain/blueprint-trust-snapshot.json',
|
|
1010
|
+
MAX_INPUT_BYTES,
|
|
1011
|
+
true,
|
|
1012
|
+
);
|
|
1013
|
+
if (currentPolicy === undefined || currentSnapshot === undefined) {
|
|
1014
|
+
throw new Error(
|
|
1015
|
+
'Blueprint trust policy and snapshot must both exist before authorization.',
|
|
1016
|
+
);
|
|
1017
|
+
}
|
|
1018
|
+
const authority = inspectBlueprintTrustGitAuthority({
|
|
1019
|
+
builtIn: {
|
|
1020
|
+
name: BUILTIN_BLUEPRINT_NAME,
|
|
1021
|
+
version: nxPackage.version,
|
|
1022
|
+
},
|
|
1023
|
+
current: {
|
|
1024
|
+
policy: currentPolicy,
|
|
1025
|
+
snapshot: currentSnapshot,
|
|
1026
|
+
},
|
|
1027
|
+
ownership,
|
|
1028
|
+
protectedBranch: options.protectedBranch,
|
|
1029
|
+
protectedRef: options.protectedRef,
|
|
1030
|
+
workspaceRoot,
|
|
1031
|
+
});
|
|
1032
|
+
const lockfile = readOptional('pnpm-lock.yaml', MAX_LOCK_BYTES);
|
|
1033
|
+
const nodeVersionSource = readOptional('.node-version', 128);
|
|
1034
|
+
const now = options.now ?? new Date().toISOString();
|
|
1035
|
+
if (options.reviewVerification) {
|
|
1036
|
+
if (options.operation !== 'adopt') {
|
|
1037
|
+
throw new Error(
|
|
1038
|
+
'Blueprint verification review is available only for adoption.',
|
|
1039
|
+
);
|
|
1040
|
+
}
|
|
1041
|
+
if (
|
|
1042
|
+
!manifest ||
|
|
1043
|
+
typeof manifest !== 'object' ||
|
|
1044
|
+
Array.isArray(manifest) ||
|
|
1045
|
+
typeof manifest.name !== 'string' ||
|
|
1046
|
+
typeof manifest.packageManager !== 'string' ||
|
|
1047
|
+
!manifest.engines ||
|
|
1048
|
+
typeof manifest.engines !== 'object' ||
|
|
1049
|
+
Array.isArray(manifest.engines) ||
|
|
1050
|
+
typeof manifest.engines.node !== 'string' ||
|
|
1051
|
+
typeof nodeVersionSource !== 'string' ||
|
|
1052
|
+
!/^\d+\.\d+\.\d+\n$/.test(nodeVersionSource) ||
|
|
1053
|
+
!manifest.devDependencies ||
|
|
1054
|
+
typeof manifest.devDependencies !== 'object' ||
|
|
1055
|
+
Array.isArray(manifest.devDependencies) ||
|
|
1056
|
+
typeof lockfile !== 'string'
|
|
1057
|
+
) {
|
|
1058
|
+
throw new Error(
|
|
1059
|
+
'Blueprint verification review requires one named workspace, exact development dependencies, and pnpm lockfile.',
|
|
1060
|
+
);
|
|
1061
|
+
}
|
|
1062
|
+
if (authority.headCommit !== authority.protectedCommit) {
|
|
1063
|
+
throw new Error(
|
|
1064
|
+
'Blueprint verification roots execute only from the exact protected static-approval commit.',
|
|
1065
|
+
);
|
|
1066
|
+
}
|
|
1067
|
+
inspectProtectedGitFileAuthority({
|
|
1068
|
+
current: manifestBytes,
|
|
1069
|
+
headCommit: authority.headCommit,
|
|
1070
|
+
path: 'package.json',
|
|
1071
|
+
protectedCommit: authority.protectedCommit,
|
|
1072
|
+
workspaceRoot,
|
|
1073
|
+
});
|
|
1074
|
+
const blueprintBySlice = new Map();
|
|
1075
|
+
const reviewBySlice = new Map();
|
|
1076
|
+
for (const content of generatedContent) {
|
|
1077
|
+
const owned = ownership.find(
|
|
1078
|
+
(candidate) => candidate.value?.slice === content.slice,
|
|
1079
|
+
);
|
|
1080
|
+
const blueprint = owned?.value?.blueprint;
|
|
1081
|
+
if (
|
|
1082
|
+
!blueprint ||
|
|
1083
|
+
typeof blueprint.name !== 'string' ||
|
|
1084
|
+
typeof blueprint.version !== 'string' ||
|
|
1085
|
+
manifest.devDependencies[blueprint.name] !== blueprint.version
|
|
1086
|
+
) {
|
|
1087
|
+
throw new Error(
|
|
1088
|
+
'Blueprint verification review requires an exact external Blueprint dependency for ' +
|
|
1089
|
+
content.slice +
|
|
1090
|
+
'.',
|
|
1091
|
+
);
|
|
1092
|
+
}
|
|
1093
|
+
const integrity = resolveBlueprintPackageIntegrity(
|
|
1094
|
+
lockfile,
|
|
1095
|
+
blueprint.name,
|
|
1096
|
+
blueprint.version,
|
|
1097
|
+
);
|
|
1098
|
+
const decision = authorizeBlueprintTrust({
|
|
1099
|
+
frameworkVersion: nxPackage.version,
|
|
1100
|
+
integrity,
|
|
1101
|
+
name: blueprint.name,
|
|
1102
|
+
now,
|
|
1103
|
+
operation: 'adopt',
|
|
1104
|
+
policy: authority.authorization.policy,
|
|
1105
|
+
snapshot: authority.authorization.snapshot,
|
|
1106
|
+
version: blueprint.version,
|
|
1107
|
+
});
|
|
1108
|
+
if (decision.decision !== 'allow') {
|
|
1109
|
+
throw new Error(
|
|
1110
|
+
'External Blueprint lifecycle denies verification review for ' +
|
|
1111
|
+
blueprint.name +
|
|
1112
|
+
'@' +
|
|
1113
|
+
blueprint.version +
|
|
1114
|
+
'.',
|
|
1115
|
+
);
|
|
1116
|
+
}
|
|
1117
|
+
const exactBlueprint = {
|
|
1118
|
+
integrity,
|
|
1119
|
+
name: blueprint.name,
|
|
1120
|
+
version: blueprint.version,
|
|
1121
|
+
};
|
|
1122
|
+
const approvalDigest = blueprintGeneratedContentApprovalDigest(
|
|
1123
|
+
exactBlueprint,
|
|
1124
|
+
content,
|
|
1125
|
+
);
|
|
1126
|
+
const review = authority.authorization.policy.generatedReviews.find(
|
|
1127
|
+
(candidate) =>
|
|
1128
|
+
candidate.blueprint.name === exactBlueprint.name &&
|
|
1129
|
+
candidate.blueprint.version === exactBlueprint.version &&
|
|
1130
|
+
candidate.blueprint.integrity === exactBlueprint.integrity &&
|
|
1131
|
+
candidate.slice === content.slice &&
|
|
1132
|
+
candidate.projectPath === content.projectPath &&
|
|
1133
|
+
supplyChainDigest(candidate.verificationTargets) ===
|
|
1134
|
+
supplyChainDigest(content.verificationTargets) &&
|
|
1135
|
+
supplyChainDigest(candidate.blueprintFiles) ===
|
|
1136
|
+
supplyChainDigest(content.blueprintFiles) &&
|
|
1137
|
+
supplyChainDigest(candidate.verificationRoots) ===
|
|
1138
|
+
supplyChainDigest(content.verificationRoots) &&
|
|
1139
|
+
supplyChainDigest(candidate.allowedContainerRegistries) ===
|
|
1140
|
+
supplyChainDigest(content.containerRegistries) &&
|
|
1141
|
+
candidate.evidenceDigest === approvalDigest,
|
|
1142
|
+
);
|
|
1143
|
+
if (!review) {
|
|
1144
|
+
throw new Error(
|
|
1145
|
+
'Blueprint verification roots cannot execute before protected Git admits the exact generated-content approval for ' +
|
|
1146
|
+
content.slice +
|
|
1147
|
+
' (expected evidence digest ' +
|
|
1148
|
+
approvalDigest +
|
|
1149
|
+
').',
|
|
1150
|
+
);
|
|
1151
|
+
}
|
|
1152
|
+
if (Date.parse(now) < Date.parse(review.reviewedAt)) {
|
|
1153
|
+
throw new Error(
|
|
1154
|
+
'Blueprint verification roots cannot execute before the exact protected generated-content approval timestamp for ' +
|
|
1155
|
+
content.slice +
|
|
1156
|
+
'.',
|
|
1157
|
+
);
|
|
1158
|
+
}
|
|
1159
|
+
blueprintBySlice.set(content.slice, exactBlueprint);
|
|
1160
|
+
reviewBySlice.set(content.slice, review);
|
|
1161
|
+
}
|
|
1162
|
+
preflightRetainedReceiptPaths(reviewReceiptReferences);
|
|
1163
|
+
const executionsBySlice = new Map();
|
|
1164
|
+
for (const content of generatedContent) {
|
|
1165
|
+
executionsBySlice.set(
|
|
1166
|
+
content.slice,
|
|
1167
|
+
runReviewedVerificationRoots(content, {
|
|
1168
|
+
approvedGeneratedContent: generatedContent,
|
|
1169
|
+
headCommit: authority.headCommit,
|
|
1170
|
+
lockfile,
|
|
1171
|
+
manifest,
|
|
1172
|
+
ownership,
|
|
1173
|
+
packageManager: manifest.packageManager,
|
|
1174
|
+
protectedCommit: authority.protectedCommit,
|
|
1175
|
+
protectedRef: options.protectedRef,
|
|
1176
|
+
}),
|
|
1177
|
+
);
|
|
1178
|
+
}
|
|
1179
|
+
assertProtectedGitWorkingTreeAuthority({
|
|
1180
|
+
headCommit: authority.headCommit,
|
|
1181
|
+
protectedCommit: authority.protectedCommit,
|
|
1182
|
+
protectedRef: options.protectedRef,
|
|
1183
|
+
workspaceRoot,
|
|
1184
|
+
});
|
|
1185
|
+
const completedAt = options.now ?? new Date().toISOString();
|
|
1186
|
+
if (
|
|
1187
|
+
!Number.isFinite(Date.parse(now)) ||
|
|
1188
|
+
!Number.isFinite(Date.parse(completedAt)) ||
|
|
1189
|
+
Date.parse(completedAt) < Date.parse(now)
|
|
1190
|
+
) {
|
|
1191
|
+
throw new Error(
|
|
1192
|
+
'Blueprint verification completion time must not precede authorization.',
|
|
1193
|
+
);
|
|
1194
|
+
}
|
|
1195
|
+
for (const blueprint of blueprintBySlice.values()) {
|
|
1196
|
+
const completionDecision = authorizeBlueprintTrust({
|
|
1197
|
+
frameworkVersion: nxPackage.version,
|
|
1198
|
+
integrity: blueprint.integrity,
|
|
1199
|
+
name: blueprint.name,
|
|
1200
|
+
now: completedAt,
|
|
1201
|
+
operation: 'adopt',
|
|
1202
|
+
policy: authority.authorization.policy,
|
|
1203
|
+
snapshot: authority.authorization.snapshot,
|
|
1204
|
+
version: blueprint.version,
|
|
1205
|
+
});
|
|
1206
|
+
if (completionDecision.decision !== 'allow') {
|
|
1207
|
+
throw new Error(
|
|
1208
|
+
'External Blueprint lifecycle expired or changed before verification completed for ' +
|
|
1209
|
+
blueprint.name +
|
|
1210
|
+
'@' +
|
|
1211
|
+
blueprint.version +
|
|
1212
|
+
'.',
|
|
1213
|
+
);
|
|
1214
|
+
}
|
|
1215
|
+
}
|
|
1216
|
+
const refreshedContent = generatedContentInventory(ownership);
|
|
1217
|
+
if (
|
|
1218
|
+
supplyChainDigest(refreshedContent) !== supplyChainDigest(generatedContent)
|
|
1219
|
+
) {
|
|
1220
|
+
throw new Error(
|
|
1221
|
+
'Blueprint verification roots changed their reviewed generated-content inventory.',
|
|
1222
|
+
);
|
|
1223
|
+
}
|
|
1224
|
+
const receipts = [];
|
|
1225
|
+
for (const content of refreshedContent) {
|
|
1226
|
+
const blueprint = blueprintBySlice.get(content.slice);
|
|
1227
|
+
const review = reviewBySlice.get(content.slice);
|
|
1228
|
+
if (!blueprint || !review) {
|
|
1229
|
+
throw new Error(
|
|
1230
|
+
'Blueprint verification review lost its exact approved authority.',
|
|
1231
|
+
);
|
|
1232
|
+
}
|
|
1233
|
+
const execution = executionsBySlice.get(content.slice);
|
|
1234
|
+
if (!execution) {
|
|
1235
|
+
throw new Error(
|
|
1236
|
+
'Blueprint verification review lost its exact execution authority.',
|
|
1237
|
+
);
|
|
1238
|
+
}
|
|
1239
|
+
const receipt = createBlueprintVerificationExecutionReceipt(
|
|
1240
|
+
{
|
|
1241
|
+
approvalDigest: review.evidenceDigest,
|
|
1242
|
+
blueprint,
|
|
1243
|
+
blueprintFiles: content.blueprintFiles,
|
|
1244
|
+
containerRegistries: content.containerRegistries,
|
|
1245
|
+
executedRoots: execution.executedRoots,
|
|
1246
|
+
executionAuthorities: execution.executionAuthorities,
|
|
1247
|
+
executionCommit: authority.headCommit,
|
|
1248
|
+
generatedAt: completedAt,
|
|
1249
|
+
kind: 'ebk-blueprint-verification-execution',
|
|
1250
|
+
lockfileSha256: createHash('sha256')
|
|
1251
|
+
.update(lockfile, 'utf8')
|
|
1252
|
+
.digest('hex'),
|
|
1253
|
+
nodeEngine: manifest.engines.node,
|
|
1254
|
+
nodeVersion: execution.nodeVersion,
|
|
1255
|
+
nodeVersionDeclaration: nodeVersionSource.slice(0, -1),
|
|
1256
|
+
projectPath: content.projectPath,
|
|
1257
|
+
repositoryRootCommit: authority.repositoryRootCommit,
|
|
1258
|
+
schemaVersion: 1,
|
|
1259
|
+
slice: content.slice,
|
|
1260
|
+
verificationRoots: content.verificationRoots,
|
|
1261
|
+
verificationTargets: content.verificationTargets,
|
|
1262
|
+
workspace: manifest.name,
|
|
1263
|
+
},
|
|
1264
|
+
{
|
|
1265
|
+
approvalDigest: review.evidenceDigest,
|
|
1266
|
+
blueprint,
|
|
1267
|
+
content,
|
|
1268
|
+
executionCommit: authority.headCommit,
|
|
1269
|
+
repositoryRootCommit: authority.repositoryRootCommit,
|
|
1270
|
+
reviewedAt: review.reviewedAt,
|
|
1271
|
+
workspace: manifest.name,
|
|
1272
|
+
},
|
|
1273
|
+
);
|
|
1274
|
+
const reference = blueprintVerificationExecutionReceiptPath(
|
|
1275
|
+
content.slice,
|
|
1276
|
+
);
|
|
1277
|
+
receipts.push({
|
|
1278
|
+
receiptDigest: blueprintVerificationExecutionReceiptDigest(receipt),
|
|
1279
|
+
reference,
|
|
1280
|
+
receipt,
|
|
1281
|
+
slice: content.slice,
|
|
1282
|
+
});
|
|
1283
|
+
}
|
|
1284
|
+
receipts.sort((left, right) => compareUtf16(left.reference, right.reference));
|
|
1285
|
+
if (
|
|
1286
|
+
supplyChainDigest(receipts.map(({ reference }) => reference)) !==
|
|
1287
|
+
supplyChainDigest(reviewReceiptReferences)
|
|
1288
|
+
) {
|
|
1289
|
+
throw receiptRetentionError(
|
|
1290
|
+
'Blueprint verification receipt paths changed after reviewed execution.',
|
|
1291
|
+
);
|
|
1292
|
+
}
|
|
1293
|
+
writeRetainedReceipts(receipts);
|
|
1294
|
+
writeEvidence(options.output, {
|
|
1295
|
+
generatedAt: completedAt,
|
|
1296
|
+
kind: 'ebk-blueprint-verification-review',
|
|
1297
|
+
operation: 'adopt',
|
|
1298
|
+
outcome: 'passed',
|
|
1299
|
+
receipts: receipts.map(({ receiptDigest, reference, slice }) => ({
|
|
1300
|
+
reference,
|
|
1301
|
+
receiptDigest,
|
|
1302
|
+
slice,
|
|
1303
|
+
})),
|
|
1304
|
+
schemaVersion: 1,
|
|
1305
|
+
trustAuthority: {
|
|
1306
|
+
candidateHistory: authority.candidateHistory,
|
|
1307
|
+
headCommit: authority.headCommit,
|
|
1308
|
+
protectedCommit: authority.protectedCommit,
|
|
1309
|
+
protectedHistory: authority.protectedHistory,
|
|
1310
|
+
repositoryRootCommit: authority.repositoryRootCommit,
|
|
1311
|
+
},
|
|
1312
|
+
});
|
|
1313
|
+
} else {
|
|
1314
|
+
const verificationReceipts = authority.protectedVerificationReceipts;
|
|
1315
|
+
const report = authorizeBlueprintOwnershipInventory({
|
|
1316
|
+
builtIn: {
|
|
1317
|
+
name: BUILTIN_BLUEPRINT_NAME,
|
|
1318
|
+
provenance: authority.builtInProvenance,
|
|
1319
|
+
version: nxPackage.version,
|
|
1320
|
+
},
|
|
1321
|
+
generatedContent,
|
|
1322
|
+
lockfile,
|
|
1323
|
+
manifest,
|
|
1324
|
+
nodeVersionSource,
|
|
1325
|
+
now,
|
|
1326
|
+
operation: options.operation,
|
|
1327
|
+
ownership,
|
|
1328
|
+
policy: authority.authorization.policy,
|
|
1329
|
+
repositoryRootCommit: authority.repositoryRootCommit,
|
|
1330
|
+
snapshot: authority.authorization.snapshot,
|
|
1331
|
+
verificationReceipts,
|
|
1332
|
+
});
|
|
1333
|
+
writeEvidence(options.output, {
|
|
1334
|
+
...report,
|
|
1335
|
+
outcome: 'passed',
|
|
1336
|
+
trustAuthority: {
|
|
1337
|
+
candidateHistory: authority.candidateHistory,
|
|
1338
|
+
headCommit: authority.headCommit,
|
|
1339
|
+
protectedCommit: authority.protectedCommit,
|
|
1340
|
+
protectedHistory: authority.protectedHistory,
|
|
1341
|
+
protectedVerificationReceipts:
|
|
1342
|
+
authority.protectedVerificationReceipts.map(
|
|
1343
|
+
({ protectedCommit, reference, receipt }) => ({
|
|
1344
|
+
protectedCommit,
|
|
1345
|
+
receiptDigest:
|
|
1346
|
+
blueprintVerificationExecutionReceiptDigest(receipt),
|
|
1347
|
+
reference,
|
|
1348
|
+
}),
|
|
1349
|
+
),
|
|
1350
|
+
repositoryRootCommit: authority.repositoryRootCommit,
|
|
1351
|
+
...(authority.workingTreeTransition
|
|
1352
|
+
? { workingTreeTransition: authority.workingTreeTransition }
|
|
1353
|
+
: {}),
|
|
1354
|
+
},
|
|
1355
|
+
});
|
|
1356
|
+
}
|
|
1357
|
+
} catch (error) {
|
|
1358
|
+
failure(error);
|
|
1359
|
+
}
|
|
1360
|
+
`;
|
|
1361
|
+
}
|
|
1362
|
+
//# sourceMappingURL=generated-blueprint-trust-command.js.map
|