@empire-builder-kit/nx 1.0.0-rc.4 → 1.0.0-rc.41
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -10
- package/executors.json +21 -1
- package/generators.json +10 -0
- package/package.json +31 -7
- package/src/aws/child-environment.d.ts +10 -0
- package/src/aws/child-environment.js +77 -0
- package/src/aws/identity.d.ts +13 -0
- package/src/aws/identity.js +41 -0
- package/src/aws-authority/index.d.ts +2 -0
- package/src/aws-authority/index.js +6 -0
- package/src/aws-authority/lambda-policy-ordering.d.ts +38 -0
- package/src/aws-authority/lambda-policy-ordering.js +56 -0
- package/src/aws-authority/stage-authority.d.ts +248 -0
- package/src/aws-authority/stage-authority.js +3558 -0
- package/src/blueprints/external-sandbox.d.ts +1 -1
- package/src/blueprints/external-sandbox.js +21 -9
- package/src/blueprints/manifest.d.ts +1 -1
- package/src/blueprints/resolver.js +28 -15
- package/src/cli/bootstrap.d.ts +1 -1
- package/src/cli/deploy-runtime.d.ts +30 -0
- package/src/cli/deploy-runtime.js +174 -0
- package/src/cli/dev-command.d.ts +18 -4
- package/src/cli/dev-command.js +71 -0
- package/src/cli/main.d.ts +9 -1
- package/src/cli/main.js +157 -24
- package/src/cli/output.d.ts +1 -1
- package/src/cli/output.js +1 -1
- package/src/cli/personal-secret-runtime.d.ts +12 -0
- package/src/cli/personal-secret-runtime.js +18 -3
- package/src/cli/secret-terminal.js +1 -1
- package/src/container-images.d.ts +1 -1
- package/src/container-images.js +1 -1
- package/src/developer-agent/context.js +41 -9
- package/src/developer-agent/generator-planning.js +20 -6
- package/src/developer-agent/git-inspection.d.ts +6 -2
- package/src/developer-agent/git-inspection.js +78 -6
- package/src/developer-agent/model.d.ts +5 -3
- package/src/developer-agent/model.js +4 -4
- package/src/developer-agent/operation-registry.d.ts +15 -0
- package/src/developer-agent/operation-registry.js +342 -49
- package/src/developer-agent/planning.d.ts +8 -1
- package/src/developer-agent/planning.js +39 -16
- package/src/developer-agent/preview-changes.d.ts +2 -0
- package/src/developer-agent/preview-changes.js +14 -2
- package/src/developer-agent/preview-source.js +3 -0
- package/src/developer-agent/validation.js +25 -9
- package/src/developer-agent/workspace-inspection.js +60 -5
- package/src/executors/blueprint-trust/blueprint-trust.js +6 -0
- package/src/executors/deployment-plan/deployment-plan.d.ts +2 -0
- package/src/executors/deployment-plan/deployment-plan.js +57 -2
- package/src/executors/dev-doctor/dev-doctor.js +13 -6
- package/src/executors/dev-task-cleanup/dev-task-cleanup.d.ts +23 -0
- package/src/executors/dev-task-cleanup/dev-task-cleanup.js +145 -0
- package/src/executors/dev-task-cleanup/schema.json +9 -0
- package/src/executors/dev-task-cleanup/task-stack-absence.d.ts +27 -0
- package/src/executors/dev-task-cleanup/task-stack-absence.js +281 -0
- package/src/executors/dev-task-cleanup/task-stack-checkpoint.d.ts +12 -0
- package/src/executors/dev-task-cleanup/task-stack-checkpoint.js +92 -0
- package/src/executors/fleet/fleet.js +1 -1
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +1 -0
- package/src/executors/foundation-preflight/foundation-preflight.js +6 -2
- package/src/executors/foundation-preflight/schema.json +5 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +13 -2
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +95 -31
- package/src/executors/foundation-profile-preflight/production-database-safeguard.d.ts +65 -0
- package/src/executors/foundation-profile-preflight/production-database-safeguard.js +223 -0
- package/src/executors/foundation-profile-preflight/schema.json +15 -4
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.d.ts +11 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js +70 -20
- package/src/executors/foundation-remove-preflight/schema.json +6 -1
- package/src/executors/github-bootstrap/github-bootstrap.d.ts +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js +3 -0
- package/src/executors/github-bootstrap/schema.json +7 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +29 -136
- package/src/executors/infrastructure-plan/infrastructure-plan.js +230 -3282
- package/src/executors/infrastructure-plan/schema.json +12 -52
- package/src/executors/local-deploy/federated-credential-transport.d.ts +48 -0
- package/src/executors/local-deploy/federated-credential-transport.js +252 -0
- package/src/executors/local-deploy/local-approval.d.ts +18 -0
- package/src/executors/local-deploy/local-approval.js +39 -0
- package/src/executors/local-deploy/local-deploy.d.ts +112 -0
- package/src/executors/local-deploy/local-deploy.js +1404 -0
- package/src/executors/local-deploy/schema.json +70 -0
- package/src/executors/refresh/refresh.js +2 -2
- package/src/executors/remove/remove.js +2 -2
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +42 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +1229 -0
- package/src/executors/router-waf-rehearsal/schema.json +29 -0
- package/src/executors/secret-initialize/schema.json +42 -0
- package/src/executors/secret-initialize/secret-initialize.d.ts +34 -0
- package/src/executors/secret-initialize/secret-initialize.js +297 -0
- package/src/executors/secret-metadata/schema.json +5 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +16 -2
- package/src/executors/secret-metadata/secret-metadata.js +129 -30
- package/src/executors/sst-lifecycle/generated-secret-retirement.d.ts +53 -0
- package/src/executors/sst-lifecycle/generated-secret-retirement.js +192 -0
- package/src/executors/sst-lifecycle/governed-native-operation.d.ts +48 -0
- package/src/executors/sst-lifecycle/governed-native-operation.js +163 -0
- package/src/executors/sst-lifecycle/logging-preflight.d.ts +5 -0
- package/src/executors/sst-lifecycle/logging-preflight.js +23 -13
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +46 -6
- package/src/executors/sst-lifecycle/run-sst-command.js +750 -71
- package/src/executors/sst-lifecycle/schema.json +8 -1
- package/src/executors/sst-lifecycle/secret-preflight.d.ts +2 -0
- package/src/executors/sst-lifecycle/secret-preflight.js +13 -7
- package/src/executors/sst-lifecycle/sst-environment-source.d.ts +33 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js +267 -0
- package/src/executors/sst-lifecycle/task-unlock.d.ts +15 -0
- package/src/executors/sst-lifecycle/task-unlock.js +126 -0
- package/src/executors/unlock/unlock.js +2 -2
- package/src/foundation/capability-plan.d.ts +43 -0
- package/src/foundation/capability-plan.js +168 -0
- package/src/foundation/cost-estimate.d.ts +170 -0
- package/src/foundation/cost-estimate.js +683 -0
- package/src/foundation/discovery.d.ts +14 -11
- package/src/foundation/discovery.js +32 -6
- package/src/foundation/index.d.ts +4 -0
- package/src/foundation/index.js +11 -0
- package/src/foundation/local-database-contract.d.ts +20 -0
- package/src/foundation/local-database-contract.js +262 -13
- package/src/foundation/local-private-smoke-access.d.ts +20 -0
- package/src/foundation/local-private-smoke-access.js +197 -0
- package/src/foundation/logging-preflight.js +1 -1
- package/src/foundation/logging.d.ts +3 -1
- package/src/foundation/logging.js +1 -1
- package/src/foundation/partial-state.d.ts +10 -0
- package/src/foundation/partial-state.js +21 -0
- package/src/foundation/preflight.js +37 -18
- package/src/foundation/private-smoke-access.d.ts +25 -0
- package/src/foundation/private-smoke-access.js +135 -0
- package/src/foundation/private-smoke-admission.d.ts +45 -0
- package/src/foundation/private-smoke-admission.js +180 -0
- package/src/foundation/private-smoke-control-plane.d.ts +18 -0
- package/src/foundation/private-smoke-control-plane.js +184 -0
- package/src/foundation/provision-database-bindings.d.ts +5 -0
- package/src/foundation/provision-database-bindings.js +41 -8
- package/src/foundation/provision-logical-database.js +15 -8
- package/src/foundation/requirements.d.ts +3 -3
- package/src/foundation/requirements.js +24 -12
- package/src/foundation/router-waf-rate-rehearsal.d.ts +97 -0
- package/src/foundation/router-waf-rate-rehearsal.js +210 -0
- package/src/foundation/router-waf.d.ts +149 -0
- package/src/foundation/router-waf.js +809 -0
- package/src/foundation/stages.d.ts +1 -0
- package/src/foundation/stages.js +11 -0
- package/src/generators/blueprint/blueprint.d.ts +5 -0
- package/src/generators/blueprint/blueprint.js +102 -0
- package/src/generators/blueprint/files.d.ts +6 -0
- package/src/generators/blueprint/files.js +217 -0
- package/src/generators/blueprint/schema.d.ts +4 -0
- package/src/generators/blueprint/schema.json +18 -0
- package/src/generators/formatting.d.ts +8 -0
- package/src/generators/formatting.js +141 -0
- package/src/generators/function/function.js +38 -17
- package/src/generators/logging-registry.d.ts +2 -0
- package/src/generators/logging-registry.js +22 -0
- package/src/generators/post-generation-install.js +2 -2
- package/src/generators/preset/dependency-overrides.d.ts +8 -0
- package/src/generators/preset/dependency-overrides.js +55 -0
- package/src/generators/preset/generator.js +43 -3
- package/src/generators/preset/schema.d.ts +10 -0
- package/src/generators/preset/schema.json +47 -0
- package/src/generators/preset/workspace-files-adopter-skills.d.ts +7 -0
- package/src/generators/preset/workspace-files-adopter-skills.js +324 -0
- package/src/generators/preset/workspace-files-ci-acceptance.d.ts +1 -0
- package/src/generators/preset/workspace-files-ci-acceptance.js +791 -0
- package/src/generators/preset/workspace-files-ci-install.d.ts +2 -0
- package/src/generators/preset/workspace-files-ci-install.js +196 -0
- package/src/generators/preset/workspace-files-developer-agent.d.ts +2 -0
- package/src/generators/preset/workspace-files-developer-agent.js +162 -44
- package/src/generators/preset/workspace-files-ecr-inspector.d.ts +18 -0
- package/src/generators/preset/workspace-files-ecr-inspector.js +298 -0
- package/src/generators/preset/workspace-files-foundation-workload-roles.js +5 -2
- package/src/generators/preset/workspace-files-performance-cost.d.ts +2 -2
- package/src/generators/preset/workspace-files-performance-cost.js +8 -8
- package/src/generators/preset/workspace-files-performance-load.d.ts +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +39 -25
- package/src/generators/preset/workspace-files-shared-operation-claims.d.ts +10 -0
- package/src/generators/preset/workspace-files-shared-operation-claims.js +59 -0
- package/src/generators/preset/workspace-files-stage-authority.d.ts +6 -0
- package/src/generators/preset/workspace-files-stage-authority.js +529 -0
- package/src/generators/preset/workspace-files-thin-deploy.d.ts +65 -0
- package/src/generators/preset/workspace-files-thin-deploy.js +2507 -0
- package/src/generators/preset/workspace-files-thin-docs.d.ts +7 -0
- package/src/generators/preset/workspace-files-thin-docs.js +370 -0
- package/src/generators/preset/workspace-files-thin-release.d.ts +14 -0
- package/src/generators/preset/workspace-files-thin-release.js +26 -0
- package/src/generators/preset/workspace-files-workload-role-baseline.js +254 -42
- package/src/generators/preset/workspace-files.d.ts +18 -2
- package/src/generators/preset/workspace-files.js +1525 -609
- package/src/generators/repository-policy/repository-policy.js +235 -5
- package/src/generators/repository-policy/schema.d.ts +10 -0
- package/src/generators/repository-policy/schema.json +80 -4
- package/src/generators/repository-policy/tree-policy.d.ts +3 -0
- package/src/generators/repository-policy/tree-policy.js +25 -0
- package/src/generators/slice/built-in-plan-api-contract-files.js +49 -11
- package/src/generators/slice/built-in-plan-api-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-api-files.js +130 -414
- package/src/generators/slice/built-in-plan-async-work-files.js +166 -1969
- package/src/generators/slice/built-in-plan-authorization-files.js +102 -334
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +975 -233
- package/src/generators/slice/built-in-plan-authorization-storage.d.ts +3 -0
- package/src/generators/slice/built-in-plan-authorization-storage.js +119 -0
- package/src/generators/slice/built-in-plan-background-work-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-background-work-files.js +99 -0
- package/src/generators/slice/built-in-plan-data-deletion-files.js +2 -830
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js +5 -31
- package/src/generators/slice/built-in-plan-data-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +176 -1200
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js +53 -28
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js +37 -2
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +7 -2443
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js +50 -8
- package/src/generators/slice/built-in-plan-data-rights-files.js +6 -4482
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +44 -25
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js +25 -2
- package/src/generators/slice/built-in-plan-foundation-files.d.ts +2 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +39 -18
- package/src/generators/slice/built-in-plan-frontend-files.js +14 -3
- package/src/generators/slice/built-in-plan-infrastructure-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +933 -730
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +75 -14
- package/src/generators/slice/built-in-plan-key-value-cleanup.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-cleanup.js +100 -0
- package/src/generators/slice/built-in-plan-key-value-consumer.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-consumer.js +151 -0
- package/src/generators/slice/built-in-plan-key-value-deletion.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-deletion.js +377 -0
- package/src/generators/slice/built-in-plan-key-value-delivery.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-delivery.js +137 -0
- package/src/generators/slice/built-in-plan-key-value-export.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-export.js +595 -0
- package/src/generators/slice/built-in-plan-key-value-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-files.js +31 -0
- package/src/generators/slice/built-in-plan-key-value-holds.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-holds.js +189 -0
- package/src/generators/slice/built-in-plan-key-value-infrastructure.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-infrastructure.js +102 -0
- package/src/generators/slice/built-in-plan-key-value-performance.d.ts +5 -0
- package/src/generators/slice/built-in-plan-key-value-performance.js +530 -0
- package/src/generators/slice/built-in-plan-key-value-provider.d.ts +4 -0
- package/src/generators/slice/built-in-plan-key-value-provider.js +366 -0
- package/src/generators/slice/built-in-plan-key-value-records.d.ts +3 -0
- package/src/generators/slice/built-in-plan-key-value-records.js +232 -0
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-infrastructure.js +103 -0
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-job-files.js +160 -0
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-maintenance.js +329 -0
- package/src/generators/slice/built-in-plan-key-value-retention-worker.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention-worker.js +477 -0
- package/src/generators/slice/built-in-plan-key-value-retention.d.ts +2 -0
- package/src/generators/slice/built-in-plan-key-value-retention.js +184 -0
- package/src/generators/slice/built-in-plan-metadata-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +159 -29
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-native-runtime-authority-files.js +324 -0
- package/src/generators/slice/built-in-plan-operations-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-operations-files.js +585 -97
- package/src/generators/slice/built-in-plan-performance-files.d.ts +2 -1
- package/src/generators/slice/built-in-plan-performance-files.js +220 -1074
- package/src/generators/slice/built-in-plan-project-files.js +141 -135
- package/src/generators/slice/built-in-plan-release-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-release-files.js +310 -70
- package/src/generators/slice/built-in-plan-reliability-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-reliability-files.js +283 -44
- package/src/generators/slice/built-in-plan-secret-runtime-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js +87 -76
- package/src/generators/slice/built-in-plan-shared.d.ts +4 -2
- package/src/generators/slice/built-in-plan-shared.js +41 -19
- package/src/generators/slice/built-in-plan-sql-events.d.ts +2 -0
- package/src/generators/slice/built-in-plan-sql-events.js +276 -0
- package/src/generators/slice/built-in-plan-testing-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +304 -172
- package/src/generators/slice/built-in-plan-testing-persistence-event-files.d.ts +7 -0
- package/src/generators/slice/built-in-plan-testing-persistence-event-files.js +487 -0
- package/src/generators/slice/built-in-plan-testing-persistence-files.d.ts +2 -0
- package/src/generators/slice/built-in-plan-testing-persistence-files.js +180 -0
- package/src/generators/slice/built-in-plan-thin-release-files.d.ts +11 -0
- package/src/generators/slice/built-in-plan-thin-release-files.js +162 -0
- package/src/generators/slice/built-in-plan-verification-files.js +76 -2
- package/src/generators/slice/built-in-plan-web-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +223 -16
- package/src/generators/slice/built-in-plan-workload-role-files.d.ts +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +143 -279
- package/src/generators/slice/built-in-plan.d.ts +11 -1
- package/src/generators/slice/built-in-plan.js +83 -30
- package/src/generators/slice/data-policy-review-seed.d.ts +2 -0
- package/src/generators/slice/data-policy-review-seed.js +22 -0
- package/src/generators/slice/deployed-smoke-readiness.d.ts +2 -0
- package/src/generators/slice/deployed-smoke-readiness.js +214 -0
- package/src/generators/slice/local-source-identity.d.ts +2 -0
- package/src/generators/slice/local-source-identity.js +31 -0
- package/src/generators/slice/persistence-contract.d.ts +14 -0
- package/src/generators/slice/persistence-contract.js +32 -0
- package/src/generators/slice/slice.js +61 -50
- package/src/generators/sql/schema.d.ts +7 -0
- package/src/generators/sql/schema.json +38 -0
- package/src/generators/sql/sql.d.ts +6 -0
- package/src/generators/sql/sql.js +53 -0
- package/src/generators/upgrade/sql-seeded-reconciliation.d.ts +2 -0
- package/src/generators/upgrade/sql-seeded-reconciliation.js +170 -0
- package/src/generators/upgrade/upgrade.d.ts +15 -1
- package/src/generators/upgrade/upgrade.js +435 -44
- package/src/generators/workload/frozen-container.d.ts +1 -1
- package/src/generators/workload/performance-registration.d.ts +1 -0
- package/src/generators/workload/performance-registration.js +9 -11
- package/src/generators/workload/service-performance-files.d.ts +1 -0
- package/src/generators/workload/service-performance-files.js +27 -7
- package/src/generators/workload/workload.d.ts +1 -1
- package/src/generators/workload/workload.js +105 -29
- package/src/git-policy/action-pins.d.ts +5 -0
- package/src/git-policy/action-pins.js +5 -0
- package/src/git-policy/github-bootstrap.d.ts +48 -8
- package/src/git-policy/github-bootstrap.js +344 -176
- package/src/git-policy/routing.d.ts +7 -1
- package/src/git-policy/routing.js +62 -1
- package/src/index.d.ts +1 -0
- package/src/index.js +1 -0
- package/src/infrastructure-change/local-capability.d.ts +73 -0
- package/src/infrastructure-change/local-capability.js +114 -0
- package/src/infrastructure-change/model.d.ts +25 -4
- package/src/infrastructure-change/model.js +1 -0
- package/src/infrastructure-change/normalize.d.ts +4 -0
- package/src/infrastructure-change/normalize.js +47 -7
- package/src/infrastructure-change/plan.d.ts +30 -3
- package/src/infrastructure-change/plan.js +323 -13
- package/src/infrastructure-change/risk.d.ts +3 -1
- package/src/infrastructure-change/risk.js +96 -16
- package/src/local-dev/browser-verification.d.ts +37 -0
- package/src/local-dev/browser-verification.js +281 -0
- package/src/local-dev/contracts.d.ts +10 -1
- package/src/local-dev/contracts.js +114 -13
- package/src/local-dev/dev-command-core.js +24 -5
- package/src/local-dev/docker-credential-health.d.ts +14 -0
- package/src/local-dev/docker-credential-health.js +94 -0
- package/src/local-dev/environment-inspector.d.ts +7 -0
- package/src/local-dev/environment-inspector.js +42 -15
- package/src/local-dev/environment-state.js +2 -2
- package/src/local-dev/errors.d.ts +1 -1
- package/src/local-dev/errors.js +2 -0
- package/src/local-dev/fleet-client.js +2 -2
- package/src/local-dev/fleet-configuration.js +57 -25
- package/src/local-dev/fleet-inventory.js +58 -22
- package/src/local-dev/fleet-ipc.d.ts +7 -0
- package/src/local-dev/fleet-ipc.js +14 -2
- package/src/local-dev/fleet-launcher.d.ts +6 -0
- package/src/local-dev/fleet-launcher.js +16 -4
- package/src/local-dev/fleet-logs.js +50 -22
- package/src/local-dev/fleet-process.d.ts +20 -1
- package/src/local-dev/fleet-process.js +197 -41
- package/src/local-dev/fleet-runner-evidence.d.ts +5 -0
- package/src/local-dev/fleet-runner-evidence.js +56 -0
- package/src/local-dev/fleet-runtime.js +268 -229
- package/src/local-dev/fleet-session.d.ts +2 -0
- package/src/local-dev/fleet-session.js +28 -11
- package/src/local-dev/fleet-slice-runner-daemon.js +4 -0
- package/src/local-dev/fleet-state.d.ts +5 -2
- package/src/local-dev/fleet-state.js +25 -4
- package/src/local-dev/fleet-supervisor.d.ts +3 -0
- package/src/local-dev/fleet-supervisor.js +66 -11
- package/src/local-dev/fleet-web-start.d.ts +12 -0
- package/src/local-dev/fleet-web-start.js +48 -0
- package/src/local-dev/identity.js +3 -14
- package/src/local-dev/index.d.ts +1 -0
- package/src/local-dev/index.js +1 -0
- package/src/local-dev/native-completion.d.ts +9 -0
- package/src/local-dev/native-completion.js +130 -0
- package/src/local-dev/nx-workspace.d.ts +4 -2
- package/src/local-dev/nx-workspace.js +11 -6
- package/src/local-dev/personal-stage.d.ts +4 -5
- package/src/local-dev/personal-stage.js +6 -54
- package/src/local-dev/port-claims.d.ts +13 -0
- package/src/local-dev/port-claims.js +46 -0
- package/src/local-dev/ports.d.ts +14 -2
- package/src/local-dev/ports.js +78 -3
- package/src/local-dev/private-state.d.ts +11 -0
- package/src/local-dev/private-state.js +146 -40
- package/src/local-dev/process-group.d.ts +4 -0
- package/src/local-dev/process-group.js +29 -0
- package/src/local-dev/process-identity.d.ts +8 -0
- package/src/local-dev/process-identity.js +31 -1
- package/src/local-dev/proxy.js +11 -12
- package/src/local-dev/runtime-paths.js +1 -1
- package/src/local-dev/slice-claim.js +1 -1
- package/src/local-dev/slice-runner.d.ts +15 -6
- package/src/local-dev/slice-runner.js +189 -54
- package/src/local-dev/task-attachment.d.ts +17 -0
- package/src/local-dev/task-attachment.js +73 -0
- package/src/local-dev/task-authority.d.ts +10 -0
- package/src/local-dev/task-authority.js +27 -0
- package/src/local-dev/task-identity.d.ts +33 -0
- package/src/local-dev/task-identity.js +418 -0
- package/src/local-dev/task-native-writer.d.ts +18 -0
- package/src/local-dev/task-native-writer.js +329 -0
- package/src/local-dev/tls.js +8 -2
- package/src/local-dev/web-launch.d.ts +9 -0
- package/src/local-dev/web-launch.js +130 -0
- package/src/ownership/composition.d.ts +2 -1
- package/src/ownership/composition.js +1 -0
- package/src/performance/cost-collection.d.ts +1 -1
- package/src/performance/cost-collection.js +4 -2
- package/src/performance/cost-controls.d.ts +8 -4
- package/src/performance/cost-controls.js +39 -28
- package/src/performance/evidence.d.ts +1 -1
- package/src/performance/evidence.js +5 -3
- package/src/performance/load-safety.js +5 -3
- package/src/performance/model.d.ts +4 -4
- package/src/performance/model.js +4 -5
- package/src/performance/scenario.d.ts +22 -0
- package/src/performance/scenario.js +100 -92
- package/src/release/index.d.ts +0 -2
- package/src/release/index.js +0 -2
- package/src/release/source-authority.d.ts +5 -5
- package/src/release/source-authority.js +141 -124
- package/src/repository-policy/aurora-preflight.d.ts +1 -1
- package/src/repository-policy/aurora-preflight.js +4 -1
- package/src/repository-policy/capacity-migration.d.ts +3 -0
- package/src/repository-policy/capacity-migration.js +21 -0
- package/src/repository-policy/deployment-plan.d.ts +4 -1
- package/src/repository-policy/deployment-plan.js +9 -0
- package/src/repository-policy/foundation-profile.js +10 -1
- package/src/repository-policy/policy.d.ts +57 -3
- package/src/repository-policy/policy.js +497 -11
- package/src/schemas/blueprint-v1.json +5 -4
- package/src/schemas/foundation-requirement-v1.json +5 -4
- package/src/schemas/performance-policy-v1.json +3 -3
- package/src/schemas/repository-policy-v1.json +130 -6
- package/src/schemas/testing-evidence-result-v1.json +1 -1
- package/src/secrets/adapters.d.ts +7 -2
- package/src/secrets/adapters.js +34 -3
- package/src/secrets/aws-control-plane.d.ts +10 -1
- package/src/secrets/aws-control-plane.js +67 -0
- package/src/secrets/generated-aws-control-plane.d.ts +23 -0
- package/src/secrets/generated-aws-control-plane.js +259 -0
- package/src/secrets/metadata.js +38 -10
- package/src/secrets/model.d.ts +8 -1
- package/src/secrets/model.js +24 -3
- package/src/secrets/operator.d.ts +91 -3
- package/src/secrets/operator.js +463 -13
- package/src/secrets/personal-command.d.ts +18 -2
- package/src/secrets/personal-command.js +66 -12
- package/src/secrets/registry.d.ts +2 -1
- package/src/secrets/registry.js +18 -1
- package/src/secrets/verification.js +15 -2
- package/src/secrets/workload-access.js +10 -2
- package/src/sst-environment-source-format.d.ts +6 -0
- package/src/sst-environment-source-format.js +199 -0
- package/src/supply-chain/action-pins.js +61 -7
- package/src/supply-chain/blueprint-trust-git.js +85 -24
- package/src/supply-chain/blueprint-verification-authority.js +55 -3
- package/src/supply-chain/build-output-bounds.d.ts +2 -0
- package/src/supply-chain/build-output-bounds.js +12 -0
- package/src/supply-chain/build-output.d.ts +7 -1
- package/src/supply-chain/build-output.js +177 -24
- package/src/supply-chain/ecr-scanning.d.ts +5 -3
- package/src/supply-chain/ecr-scanning.js +11 -7
- package/src/supply-chain/ecs-deployed-image.d.ts +5 -3
- package/src/supply-chain/ecs-deployed-image.js +6 -4
- package/src/supply-chain/generated-blueprint-trust-command.js +18 -1
- package/src/supply-chain/generated-command.js +1 -0
- package/src/supply-chain/generated-container-release-command.js +1285 -124
- package/src/supply-chain/generated-ecr-collector-command.d.ts +0 -1
- package/src/supply-chain/generated-ecr-collector-command.js +200 -93
- package/src/supply-chain/generated-files.js +25 -14
- package/src/supply-chain/generated-scanner-command.js +2 -1
- package/src/supply-chain/index.d.ts +1 -1
- package/src/supply-chain/index.js +2 -1
- package/src/supply-chain/sbom.d.ts +1 -1
- package/src/supply-chain/sbom.js +30 -5
- package/src/supply-chain/scanner.js +3 -0
- package/src/testing-evidence/fixture-scope.d.ts +2 -1
- package/src/testing-evidence/fixture-scope.js +4 -2
- package/src/testing-evidence/result.d.ts +2 -1
- package/src/testing-evidence/result.js +18 -4
- package/src/workload-roles/account-baseline.d.ts +11 -0
- package/src/workload-roles/account-baseline.js +253 -16
- package/src/workload-roles/authority.d.ts +3 -1
- package/src/workload-roles/authority.js +48 -2
- package/src/workload-roles/aws-s3-state.js +27 -0
- package/src/workload-roles/boundary.d.ts +2 -1
- package/src/workload-roles/boundary.js +9 -2
- package/src/workload-roles/handler.js +52 -24
- package/src/workload-roles/index.d.ts +10 -17
- package/src/workload-roles/index.js +5 -18
- package/src/workload-roles/injection.js +1 -1
- package/src/workload-roles/provisioner.js +12 -4
- package/src/workload-roles/registration.d.ts +1 -0
- package/src/workload-roles/registration.js +5 -0
- package/src/workload-roles/stage-boundary.js +1 -1
- package/src/workload-roles/standard-slice.js +3 -3
- package/src/workspace-deployment/affected-lifecycle.d.ts +53 -0
- package/src/workspace-deployment/affected-lifecycle.js +84 -0
- package/src/workspace-deployment/identity.d.ts +3 -0
- package/src/workspace-deployment/identity.js +22 -0
- package/src/workspace-deployment/index.d.ts +4 -0
- package/src/workspace-deployment/index.js +8 -0
- package/src/workspace-deployment/migration-evidence.d.ts +29 -0
- package/src/workspace-deployment/migration-evidence.js +83 -0
- package/src/workspace-deployment/migration.d.ts +27 -0
- package/src/workspace-deployment/migration.js +109 -0
- package/src/workspace-deployment/ownership.d.ts +81 -0
- package/src/workspace-deployment/ownership.js +381 -0
- package/src/api-contract/baseline-update.js.map +0 -1
- package/src/api-contract/compatibility.js.map +0 -1
- package/src/api-contract/contract-graph.js.map +0 -1
- package/src/api-contract/evidence.js.map +0 -1
- package/src/api-contract/index.js.map +0 -1
- package/src/api-contract/model.fixtures.d.ts +0 -2
- package/src/api-contract/model.fixtures.js +0 -81
- package/src/api-contract/model.fixtures.js.map +0 -1
- package/src/api-contract/model.js.map +0 -1
- package/src/api-contract/rollout.js.map +0 -1
- package/src/authorization/compatibility.js.map +0 -1
- package/src/authorization/index.js.map +0 -1
- package/src/blueprints/execution.js.map +0 -1
- package/src/blueprints/external-sandbox.js.map +0 -1
- package/src/blueprints/index.js.map +0 -1
- package/src/blueprints/inputs.js.map +0 -1
- package/src/blueprints/manifest.js.map +0 -1
- package/src/blueprints/resolver.js.map +0 -1
- package/src/blueprints/transitions.js.map +0 -1
- package/src/cli/agent-command.js.map +0 -1
- package/src/cli/agent-runtime.js.map +0 -1
- package/src/cli/blueprint-authority.js.map +0 -1
- package/src/cli/blueprint-command.js.map +0 -1
- package/src/cli/bootstrap.js.map +0 -1
- package/src/cli/dev-command.js.map +0 -1
- package/src/cli/main.js.map +0 -1
- package/src/cli/output.js.map +0 -1
- package/src/cli/personal-secret-runtime.js.map +0 -1
- package/src/cli/secret-terminal.js.map +0 -1
- package/src/container-images.js.map +0 -1
- package/src/data-lifecycle/index.js.map +0 -1
- package/src/data-lifecycle/model.fixtures.d.ts +0 -2
- package/src/data-lifecycle/model.fixtures.js +0 -244
- package/src/data-lifecycle/model.fixtures.js.map +0 -1
- package/src/data-lifecycle/model.js.map +0 -1
- package/src/data-lifecycle/sensitive-artifacts.js.map +0 -1
- package/src/data-lifecycle/validation.js.map +0 -1
- package/src/database-retirement/contract.js.map +0 -1
- package/src/database-retirement/index.js.map +0 -1
- package/src/deterministic-order.js.map +0 -1
- package/src/developer-agent/context.js.map +0 -1
- package/src/developer-agent/generator-planning.js.map +0 -1
- package/src/developer-agent/generator-preview.js.map +0 -1
- package/src/developer-agent/git-inspection.js.map +0 -1
- package/src/developer-agent/handoff.js.map +0 -1
- package/src/developer-agent/index.js.map +0 -1
- package/src/developer-agent/model.js.map +0 -1
- package/src/developer-agent/operation-registry.js.map +0 -1
- package/src/developer-agent/ordering.js.map +0 -1
- package/src/developer-agent/planning.js.map +0 -1
- package/src/developer-agent/preview-changes.js.map +0 -1
- package/src/developer-agent/preview-source.js.map +0 -1
- package/src/developer-agent/validation.js.map +0 -1
- package/src/developer-agent/workspace-inspection.js.map +0 -1
- package/src/developer-agent/workspace-path.js.map +0 -1
- package/src/executors/blueprint-trust/blueprint-trust.js.map +0 -1
- package/src/executors/blueprint-verification/blueprint-verification.js.map +0 -1
- package/src/executors/deploy/deploy.js.map +0 -1
- package/src/executors/deployment-plan/deployment-plan.js.map +0 -1
- package/src/executors/dev/dev.js.map +0 -1
- package/src/executors/dev-doctor/dev-doctor.js.map +0 -1
- package/src/executors/dev-setup/dev-setup.js.map +0 -1
- package/src/executors/developer-context/developer-context.js.map +0 -1
- package/src/executors/fleet/fleet.js.map +0 -1
- package/src/executors/foundation-preflight/foundation-preflight.js.map +0 -1
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +0 -1
- package/src/executors/foundation-remove-preflight/foundation-remove-preflight.js.map +0 -1
- package/src/executors/github-bootstrap/github-bootstrap.js.map +0 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +0 -1
- package/src/executors/refresh/refresh.js.map +0 -1
- package/src/executors/remove/remove.js.map +0 -1
- package/src/executors/secret-guardrails/secret-guardrails.js.map +0 -1
- package/src/executors/secret-metadata/secret-metadata.js.map +0 -1
- package/src/executors/sst-lifecycle/logging-preflight.js.map +0 -1
- package/src/executors/sst-lifecycle/run-sst-command.js.map +0 -1
- package/src/executors/sst-lifecycle/secret-preflight.js.map +0 -1
- package/src/executors/unlock/unlock.js.map +0 -1
- package/src/executors/work-markers/work-markers.js.map +0 -1
- package/src/foundation/discovery.js.map +0 -1
- package/src/foundation/index.js.map +0 -1
- package/src/foundation/local-database-contract.js.map +0 -1
- package/src/foundation/logging-preflight.js.map +0 -1
- package/src/foundation/logging.js.map +0 -1
- package/src/foundation/preflight.js.map +0 -1
- package/src/foundation/provision-database-bindings.js.map +0 -1
- package/src/foundation/provision-logical-database.js.map +0 -1
- package/src/foundation/requirements.js.map +0 -1
- package/src/foundation/router-origin-proof.js.map +0 -1
- package/src/foundation/stages.js.map +0 -1
- package/src/frontend-security/index.js.map +0 -1
- package/src/frontend-security/security-headers.js.map +0 -1
- package/src/generators/feature-registry.js.map +0 -1
- package/src/generators/function/function.js.map +0 -1
- package/src/generators/job/job.js.map +0 -1
- package/src/generators/logging-registry.js.map +0 -1
- package/src/generators/post-generation-install.js.map +0 -1
- package/src/generators/preset/generator.js.map +0 -1
- package/src/generators/preset/tool-versions.js.map +0 -1
- package/src/generators/preset/workspace-files-developer-agent.js.map +0 -1
- package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +0 -1
- package/src/generators/preset/workspace-files-performance-cost.js.map +0 -1
- package/src/generators/preset/workspace-files-performance-load.js.map +0 -1
- package/src/generators/preset/workspace-files-workload-role-baseline.js.map +0 -1
- package/src/generators/preset/workspace-files.js.map +0 -1
- package/src/generators/repository-policy/repository-policy.js.map +0 -1
- package/src/generators/service/service.js.map +0 -1
- package/src/generators/slice/built-in-plan-api-contract-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-api-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-async-work-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-authorization-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-deletion-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-export-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-lifecycle-runtime-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-retention-launcher-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-data-rights-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-database-retirement-rehearsal-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-foundation-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-frontend-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-metadata-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-operations-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-performance-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-project-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-release-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-reliability-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-secret-runtime-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-shared.js.map +0 -1
- package/src/generators/slice/built-in-plan-testing-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-verification-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-web-files.js.map +0 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +0 -1
- package/src/generators/slice/built-in-plan.js.map +0 -1
- package/src/generators/slice/slice.js.map +0 -1
- package/src/generators/upgrade/upgrade.js.map +0 -1
- package/src/generators/workload/frozen-container.js.map +0 -1
- package/src/generators/workload/performance-registration.js.map +0 -1
- package/src/generators/workload/reliability-registration.js.map +0 -1
- package/src/generators/workload/service-performance-files.js.map +0 -1
- package/src/generators/workload/workload.js.map +0 -1
- package/src/git-policy/action-pins.js.map +0 -1
- package/src/git-policy/github-bootstrap.js.map +0 -1
- package/src/git-policy/index.js.map +0 -1
- package/src/git-policy/routing.js.map +0 -1
- package/src/index.js.map +0 -1
- package/src/infrastructure-change/convergence.js.map +0 -1
- package/src/infrastructure-change/drift.js.map +0 -1
- package/src/infrastructure-change/index.js.map +0 -1
- package/src/infrastructure-change/model.js.map +0 -1
- package/src/infrastructure-change/normalize.js.map +0 -1
- package/src/infrastructure-change/plan.js.map +0 -1
- package/src/infrastructure-change/risk.js.map +0 -1
- package/src/infrastructure-change/summary.js.map +0 -1
- package/src/local-dev/context-discovery.js.map +0 -1
- package/src/local-dev/contract-validation.js.map +0 -1
- package/src/local-dev/contracts.js.map +0 -1
- package/src/local-dev/control-contract.js.map +0 -1
- package/src/local-dev/dev-command-core.js.map +0 -1
- package/src/local-dev/effects.js.map +0 -1
- package/src/local-dev/environment-inspector.js.map +0 -1
- package/src/local-dev/environment-state.js.map +0 -1
- package/src/local-dev/errors.js.map +0 -1
- package/src/local-dev/fleet-client.js.map +0 -1
- package/src/local-dev/fleet-configuration.js.map +0 -1
- package/src/local-dev/fleet-inventory.js.map +0 -1
- package/src/local-dev/fleet-ipc.js.map +0 -1
- package/src/local-dev/fleet-launcher.js.map +0 -1
- package/src/local-dev/fleet-lock.js.map +0 -1
- package/src/local-dev/fleet-logs.js.map +0 -1
- package/src/local-dev/fleet-process.js.map +0 -1
- package/src/local-dev/fleet-runtime.js.map +0 -1
- package/src/local-dev/fleet-session.js.map +0 -1
- package/src/local-dev/fleet-slice-runner-daemon.js.map +0 -1
- package/src/local-dev/fleet-startup.js.map +0 -1
- package/src/local-dev/fleet-state.js.map +0 -1
- package/src/local-dev/fleet-supervisor-daemon.js.map +0 -1
- package/src/local-dev/fleet-supervisor.js.map +0 -1
- package/src/local-dev/gateway-daemon.js.map +0 -1
- package/src/local-dev/gateway.js.map +0 -1
- package/src/local-dev/identity.js.map +0 -1
- package/src/local-dev/index.js.map +0 -1
- package/src/local-dev/local-context.js.map +0 -1
- package/src/local-dev/nx-workspace.js.map +0 -1
- package/src/local-dev/personal-secret-ledger.js.map +0 -1
- package/src/local-dev/personal-stage.js.map +0 -1
- package/src/local-dev/portless.js.map +0 -1
- package/src/local-dev/ports.js.map +0 -1
- package/src/local-dev/private-state.js.map +0 -1
- package/src/local-dev/process-identity.js.map +0 -1
- package/src/local-dev/proxy.js.map +0 -1
- package/src/local-dev/runtime-paths.js.map +0 -1
- package/src/local-dev/secret-slice-claim.js.map +0 -1
- package/src/local-dev/slice-claim.js.map +0 -1
- package/src/local-dev/slice-runner.js.map +0 -1
- package/src/local-dev/tls.js.map +0 -1
- package/src/ownership/composition.js.map +0 -1
- package/src/ownership/foundation-record.js.map +0 -1
- package/src/ownership/hash.js.map +0 -1
- package/src/ownership/index.js.map +0 -1
- package/src/ownership/json-ownership.js.map +0 -1
- package/src/ownership/record.js.map +0 -1
- package/src/ownership/workspace-record.js.map +0 -1
- package/src/performance/cost-collection.js.map +0 -1
- package/src/performance/cost-controls.js.map +0 -1
- package/src/performance/evidence.js.map +0 -1
- package/src/performance/index.js.map +0 -1
- package/src/performance/load-safety.js.map +0 -1
- package/src/performance/model.js.map +0 -1
- package/src/performance/pr-artifact-budget.js.map +0 -1
- package/src/performance/runner.js.map +0 -1
- package/src/performance/scenario-endpoint.js.map +0 -1
- package/src/performance/scenario.js.map +0 -1
- package/src/performance/test-fixtures.d.ts +0 -7
- package/src/performance/test-fixtures.js +0 -169
- package/src/performance/test-fixtures.js.map +0 -1
- package/src/performance/unit-cost.js.map +0 -1
- package/src/release/index.js.map +0 -1
- package/src/release/lifecycle.js.map +0 -1
- package/src/release/manifest.js.map +0 -1
- package/src/release/rollout.js.map +0 -1
- package/src/release/source-authority.js.map +0 -1
- package/src/repository-policy/aurora-preflight.js.map +0 -1
- package/src/repository-policy/deployment-plan.js.map +0 -1
- package/src/repository-policy/foundation-profile.js.map +0 -1
- package/src/repository-policy/index.js.map +0 -1
- package/src/repository-policy/policy.js.map +0 -1
- package/src/secrets/adapters.js.map +0 -1
- package/src/secrets/aws-control-plane.js.map +0 -1
- package/src/secrets/declaration-verification.js.map +0 -1
- package/src/secrets/guardrails.js.map +0 -1
- package/src/secrets/index.js.map +0 -1
- package/src/secrets/metadata.js.map +0 -1
- package/src/secrets/model.js.map +0 -1
- package/src/secrets/operator.js.map +0 -1
- package/src/secrets/permissions.js.map +0 -1
- package/src/secrets/personal-command.js.map +0 -1
- package/src/secrets/personal-ledger.js.map +0 -1
- package/src/secrets/registry.js.map +0 -1
- package/src/secrets/verification.js.map +0 -1
- package/src/secrets/workload-access.js.map +0 -1
- package/src/supply-chain/action-pins.js.map +0 -1
- package/src/supply-chain/blueprint-trust-git.js.map +0 -1
- package/src/supply-chain/blueprint-trust-process.js.map +0 -1
- package/src/supply-chain/blueprint-trust.js.map +0 -1
- package/src/supply-chain/blueprint-verification-authority.js.map +0 -1
- package/src/supply-chain/blueprint-verification-execution.js.map +0 -1
- package/src/supply-chain/build-output.js.map +0 -1
- package/src/supply-chain/common.js.map +0 -1
- package/src/supply-chain/container-artifact-contract.js.map +0 -1
- package/src/supply-chain/container-release.js.map +0 -1
- package/src/supply-chain/ecr-applicability.js.map +0 -1
- package/src/supply-chain/ecr-scanning.js.map +0 -1
- package/src/supply-chain/ecs-deployed-image.js.map +0 -1
- package/src/supply-chain/errors.js.map +0 -1
- package/src/supply-chain/generated-blueprint-trust-command.js.map +0 -1
- package/src/supply-chain/generated-command.js.map +0 -1
- package/src/supply-chain/generated-container-release-command.js.map +0 -1
- package/src/supply-chain/generated-ecr-collector-command.js.map +0 -1
- package/src/supply-chain/generated-files.js.map +0 -1
- package/src/supply-chain/generated-scanner-command.js.map +0 -1
- package/src/supply-chain/index.js.map +0 -1
- package/src/supply-chain/inventory.js.map +0 -1
- package/src/supply-chain/license-expression.js.map +0 -1
- package/src/supply-chain/pnpm-toolchain-authority.js.map +0 -1
- package/src/supply-chain/policy.js.map +0 -1
- package/src/supply-chain/publication.js.map +0 -1
- package/src/supply-chain/sbom.js.map +0 -1
- package/src/supply-chain/scanner.js.map +0 -1
- package/src/supply-chain/vendored-source.js.map +0 -1
- package/src/testing-evidence/fixture-scope.js.map +0 -1
- package/src/testing-evidence/index.js.map +0 -1
- package/src/testing-evidence/quarantine.js.map +0 -1
- package/src/testing-evidence/result.js.map +0 -1
- package/src/testing-evidence/runner-adapter.js.map +0 -1
- package/src/testing-evidence/sensitive-artifacts.js.map +0 -1
- package/src/validation.js.map +0 -1
- package/src/work-markers/index.js.map +0 -1
- package/src/work-markers/work-markers.js.map +0 -1
- package/src/workload-roles/account-baseline.js.map +0 -1
- package/src/workload-roles/authority.js.map +0 -1
- package/src/workload-roles/aws-adapter.js.map +0 -1
- package/src/workload-roles/aws-internal-handler.js.map +0 -1
- package/src/workload-roles/aws-s3-state.js.map +0 -1
- package/src/workload-roles/aws-sdk-control-plane.js.map +0 -1
- package/src/workload-roles/boundary.js.map +0 -1
- package/src/workload-roles/convergence.js.map +0 -1
- package/src/workload-roles/effective-policy.js.map +0 -1
- package/src/workload-roles/handler.js.map +0 -1
- package/src/workload-roles/history.js.map +0 -1
- package/src/workload-roles/index.js.map +0 -1
- package/src/workload-roles/injection.js.map +0 -1
- package/src/workload-roles/manifest.js.map +0 -1
- package/src/workload-roles/provisioner.js.map +0 -1
- package/src/workload-roles/registration.js.map +0 -1
- package/src/workload-roles/stage-boundary.js.map +0 -1
- package/src/workload-roles/standard-slice.js.map +0 -1
|
@@ -0,0 +1,418 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WORKTREE_GIT_QUERY_TIMEOUT_MS = exports.TASK_IDENTITY_SCHEMA_VERSION = exports.TASK_ID_PATTERN = void 0;
|
|
4
|
+
exports.resolveTaskIdentityForAttachment = resolveTaskIdentityForAttachment;
|
|
5
|
+
exports.assertCurrentTaskEnvironment = assertCurrentTaskEnvironment;
|
|
6
|
+
exports.bindTaskEnvironment = bindTaskEnvironment;
|
|
7
|
+
exports.attachTaskIdentity = attachTaskIdentity;
|
|
8
|
+
exports.requireTaskId = requireTaskId;
|
|
9
|
+
exports.taskStage = taskStage;
|
|
10
|
+
exports.resolveWorktreeGitDirectory = resolveWorktreeGitDirectory;
|
|
11
|
+
exports.taskIdentityPath = taskIdentityPath;
|
|
12
|
+
exports.validateTaskIdentity = validateTaskIdentity;
|
|
13
|
+
exports.resolveTaskIdentity = resolveTaskIdentity;
|
|
14
|
+
const node_child_process_1 = require("node:child_process");
|
|
15
|
+
const node_crypto_1 = require("node:crypto");
|
|
16
|
+
const node_fs_1 = require("node:fs");
|
|
17
|
+
const node_path_1 = require("node:path");
|
|
18
|
+
const identity_js_1 = require("../workspace-deployment/identity.js");
|
|
19
|
+
const contract_validation_js_1 = require("./contract-validation.js");
|
|
20
|
+
const fleet_lock_js_1 = require("./fleet-lock.js");
|
|
21
|
+
const process_identity_js_1 = require("./process-identity.js");
|
|
22
|
+
const errors_js_1 = require("./errors.js");
|
|
23
|
+
const private_state_js_1 = require("./private-state.js");
|
|
24
|
+
exports.TASK_ID_PATTERN = /^[a-f0-9]{24}$/;
|
|
25
|
+
exports.TASK_IDENTITY_SCHEMA_VERSION = 1;
|
|
26
|
+
/** Git may reuse an admin pathname after remove/add. Birth identity survives
|
|
27
|
+
* worktree moves and pointer loss, but not destruction/recreation of the dir. */
|
|
28
|
+
function worktreeAdministrationIdentity(workspaceRoot, priorReviewEncoding = false) {
|
|
29
|
+
const path = resolveWorktreeGitDirectory(workspaceRoot);
|
|
30
|
+
const stat = (0, node_fs_1.lstatSync)(path, { bigint: true });
|
|
31
|
+
if (!stat.isDirectory() || stat.isSymbolicLink() || stat.birthtimeNs <= 0n) {
|
|
32
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'The Git administration filesystem must provide a positive directory birth time. Use a local filesystem that provides it; preserve existing task records and clean up or attach tasks on the original filesystem before moving. No task ownership was inferred.');
|
|
33
|
+
}
|
|
34
|
+
return (0, contract_validation_js_1.sha256Digest)({
|
|
35
|
+
path,
|
|
36
|
+
// Old, unshipped review records can still prove their exact original tuple.
|
|
37
|
+
// Never rewrite them or infer ownership from a mutable reflog. New records
|
|
38
|
+
// omit the mount-assigned device number; it is not directory identity.
|
|
39
|
+
...(priorReviewEncoding ? { device: String(stat.dev) } : {}),
|
|
40
|
+
inode: String(stat.ino),
|
|
41
|
+
birthtimeNs: String(stat.birthtimeNs),
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function publishTaskRecord(path, record, security) {
|
|
45
|
+
if ((0, node_fs_1.existsSync)(path))
|
|
46
|
+
return;
|
|
47
|
+
(0, private_state_js_1.publishPrivateFileExclusive)(path, `${JSON.stringify(record)}\n`, security);
|
|
48
|
+
}
|
|
49
|
+
function commonGitDirectory(workspaceRoot) {
|
|
50
|
+
const gitDirectory = resolveWorktreeGitDirectory(workspaceRoot);
|
|
51
|
+
const commonFile = (0, node_path_1.join)(gitDirectory, 'commondir');
|
|
52
|
+
// Resolve through Git rather than trusting a caller-supplied common directory.
|
|
53
|
+
if (!(0, node_fs_1.existsSync)(commonFile))
|
|
54
|
+
return gitDirectory;
|
|
55
|
+
const environment = Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('GIT_')));
|
|
56
|
+
return (0, node_fs_1.realpathSync)((0, node_child_process_1.execFileSync)('git', [
|
|
57
|
+
'--no-optional-locks',
|
|
58
|
+
'-c',
|
|
59
|
+
'core.fsmonitor=false',
|
|
60
|
+
'rev-parse',
|
|
61
|
+
'--path-format=absolute',
|
|
62
|
+
'--git-common-dir',
|
|
63
|
+
], {
|
|
64
|
+
cwd: workspaceRoot,
|
|
65
|
+
env: environment,
|
|
66
|
+
encoding: 'utf8',
|
|
67
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
68
|
+
timeout: gitQueryTimeout(),
|
|
69
|
+
windowsHide: true,
|
|
70
|
+
}).trim());
|
|
71
|
+
}
|
|
72
|
+
function registeredTaskPath(workspaceRoot, taskId) {
|
|
73
|
+
return (0, node_path_1.join)(commonGitDirectory(workspaceRoot), 'ebk', 'tasks', `${requireTaskId(taskId)}.json`);
|
|
74
|
+
}
|
|
75
|
+
/** Git keeps a linked worktree's administration directory stable across move. */
|
|
76
|
+
function registeredTaskAdministrationDirectory(workspaceRoot, registered, security) {
|
|
77
|
+
const common = commonGitDirectory(workspaceRoot);
|
|
78
|
+
const worktrees = (0, node_path_1.join)(common, 'worktrees');
|
|
79
|
+
const candidates = [common];
|
|
80
|
+
if ((0, node_fs_1.existsSync)(worktrees)) {
|
|
81
|
+
if ((0, node_fs_1.lstatSync)(worktrees).isSymbolicLink()) {
|
|
82
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Git worktree administration must not be a symbolic link.');
|
|
83
|
+
}
|
|
84
|
+
const entries = (0, node_fs_1.readdirSync)(worktrees, { withFileTypes: true });
|
|
85
|
+
if (entries.length > 1024 ||
|
|
86
|
+
entries.some((entry) => !entry.isDirectory())) {
|
|
87
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Git worktree administration inventory is ambiguous; task attachment is refused.');
|
|
88
|
+
}
|
|
89
|
+
candidates.push(...entries.map((entry) => (0, node_path_1.join)(worktrees, entry.name)));
|
|
90
|
+
}
|
|
91
|
+
const matches = candidates.filter((directory) => {
|
|
92
|
+
const pointer = (0, node_path_1.join)(directory, 'ebk', 'task-v1.json');
|
|
93
|
+
if (!(0, node_fs_1.existsSync)(pointer))
|
|
94
|
+
return false;
|
|
95
|
+
(0, private_state_js_1.assertPrivatePath)((0, node_path_1.dirname)(pointer), 'directory', security);
|
|
96
|
+
const identity = validateTaskIdentity(JSON.parse((0, private_state_js_1.readPrivateFile)(pointer, security).toString('utf8')));
|
|
97
|
+
return (identity.taskId === registered.taskId &&
|
|
98
|
+
identity.workspaceRealpath === registered.workspaceRealpath);
|
|
99
|
+
});
|
|
100
|
+
if (matches.length !== 1) {
|
|
101
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task attachment requires one exact retained Git administration pointer; restore its ownership evidence before retrying.');
|
|
102
|
+
}
|
|
103
|
+
return matches[0];
|
|
104
|
+
}
|
|
105
|
+
/** Only explicit attachment may inspect a moved pointer without changing it. */
|
|
106
|
+
function resolveTaskIdentityForAttachment(workspaceRoot, requestedTaskId, security = {}) {
|
|
107
|
+
const pointer = taskIdentityPath(workspaceRoot);
|
|
108
|
+
if (!(0, node_fs_1.existsSync)(pointer))
|
|
109
|
+
return resolveTaskIdentity(workspaceRoot, security);
|
|
110
|
+
(0, private_state_js_1.assertPrivatePath)((0, node_path_1.dirname)(pointer), 'directory', security);
|
|
111
|
+
const identity = validateTaskIdentity(JSON.parse((0, private_state_js_1.readPrivateFile)(pointer, security).toString('utf8')));
|
|
112
|
+
if (identity.workspaceRealpath === (0, node_fs_1.realpathSync)(workspaceRoot)) {
|
|
113
|
+
return resolveTaskIdentity(workspaceRoot, security);
|
|
114
|
+
}
|
|
115
|
+
const registered = readRegisteredTask(workspaceRoot, requestedTaskId, security);
|
|
116
|
+
if (identity.taskId !== requestedTaskId ||
|
|
117
|
+
identity.workspaceRealpath !== registered.workspaceRealpath ||
|
|
118
|
+
registeredTaskAdministrationDirectory(workspaceRoot, registered, security) !== resolveWorktreeGitDirectory(workspaceRoot)) {
|
|
119
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Moved task attachment requires its exact retained Git administration identity.');
|
|
120
|
+
}
|
|
121
|
+
return identity;
|
|
122
|
+
}
|
|
123
|
+
function assertNoLostTaskPointer(workspaceRoot, security) {
|
|
124
|
+
const directory = (0, node_path_1.dirname)(registeredTaskPath(workspaceRoot, '0'.repeat(24)));
|
|
125
|
+
if (!(0, node_fs_1.existsSync)(directory))
|
|
126
|
+
return;
|
|
127
|
+
(0, private_state_js_1.assertPrivatePath)(directory, 'directory', security);
|
|
128
|
+
const names = (0, node_fs_1.readdirSync)(directory);
|
|
129
|
+
const administrationIdentity = worktreeAdministrationIdentity(workspaceRoot);
|
|
130
|
+
const priorReviewIdentity = worktreeAdministrationIdentity(workspaceRoot, true);
|
|
131
|
+
const retainedBindings = [];
|
|
132
|
+
if (names.length > 4096) {
|
|
133
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task registry exceeds its bounded inventory.');
|
|
134
|
+
}
|
|
135
|
+
for (const name of names) {
|
|
136
|
+
if (!/^[a-f0-9]{24}\.json$/.test(name))
|
|
137
|
+
continue;
|
|
138
|
+
const registered = readRegisteredTask(workspaceRoot, name.slice(0, 24), security);
|
|
139
|
+
if (registered.administrationIdentity === administrationIdentity ||
|
|
140
|
+
registered.administrationIdentity === priorReviewIdentity ||
|
|
141
|
+
(!registered.administrationIdentityVersion &&
|
|
142
|
+
registered.workspaceRealpath === workspaceRoot)) {
|
|
143
|
+
// Another first resolver may have finished publishing while we inspected.
|
|
144
|
+
if ((0, node_fs_1.existsSync)(taskIdentityPath(workspaceRoot)))
|
|
145
|
+
return;
|
|
146
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'This checkout has retained task ownership but its pointer is missing. Restore the exact private task pointer before startup; a new task will not be minted.');
|
|
147
|
+
}
|
|
148
|
+
if (registered.workspaceRealpath === workspaceRoot &&
|
|
149
|
+
registered.environment) {
|
|
150
|
+
retainedBindings.push(registered.taskId);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
if (retainedBindings.length > 0) {
|
|
154
|
+
console.warn(`Retained task binding(s) for this recreated checkout: ${retainedBindings.slice(0, 16).join(', ')}${retainedBindings.length > 16 ? ` (${retainedBindings.length} total)` : ''}. These are not proof of live resources. Preserve their records and verify prior cleanup; attach before removing a source worktree. See docs/local-development.md and docs/upgrades.md#worktree-task-identity-migration.`);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function validateEnvironment(value) {
|
|
158
|
+
(0, contract_validation_js_1.assertRecord)(value, 'Task environment');
|
|
159
|
+
(0, contract_validation_js_1.assertExactProperties)(value, ['accountId', 'region', 'workspaceDeploymentId'], [], 'Task environment');
|
|
160
|
+
if (typeof value.accountId !== 'string' ||
|
|
161
|
+
!/^\d{12}$/.test(value.accountId) ||
|
|
162
|
+
typeof value.region !== 'string' ||
|
|
163
|
+
!/^[a-z]{2}(?:-gov)?-[a-z]+(?:-[a-z]+)*-\d$/.test(value.region) ||
|
|
164
|
+
typeof value.workspaceDeploymentId !== 'string' ||
|
|
165
|
+
!identity_js_1.WORKSPACE_DEPLOYMENT_ID_PATTERN.test(value.workspaceDeploymentId)) {
|
|
166
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Task environment requires a verified workspace, account, and Region.');
|
|
167
|
+
}
|
|
168
|
+
return {
|
|
169
|
+
accountId: value.accountId,
|
|
170
|
+
region: value.region,
|
|
171
|
+
workspaceDeploymentId: value.workspaceDeploymentId,
|
|
172
|
+
};
|
|
173
|
+
}
|
|
174
|
+
function readRegisteredTask(workspaceRoot, taskId, security) {
|
|
175
|
+
const path = registeredTaskPath(workspaceRoot, taskId);
|
|
176
|
+
(0, private_state_js_1.assertPrivatePath)((0, node_path_1.dirname)(path), 'directory', security);
|
|
177
|
+
(0, private_state_js_1.assertPrivatePath)((0, node_path_1.dirname)((0, node_path_1.dirname)(path)), 'directory', security);
|
|
178
|
+
const value = JSON.parse((0, private_state_js_1.readPrivateFile)(path, security).toString('utf8'));
|
|
179
|
+
(0, contract_validation_js_1.assertRecord)(value, 'Registered task');
|
|
180
|
+
(0, contract_validation_js_1.assertExactProperties)(value, ['schemaVersion', 'taskId', 'workspaceRealpath'], ['administrationIdentity', 'administrationIdentityVersion'], 'Registered task');
|
|
181
|
+
if (value.administrationIdentityVersion !== undefined &&
|
|
182
|
+
(value.administrationIdentityVersion !== 2 ||
|
|
183
|
+
typeof value.administrationIdentity !== 'string')) {
|
|
184
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Registered task administration version is malformed.');
|
|
185
|
+
}
|
|
186
|
+
if (value.administrationIdentity !== undefined &&
|
|
187
|
+
(typeof value.administrationIdentity !== 'string' ||
|
|
188
|
+
!/^[a-f0-9]{64}$/.test(value.administrationIdentity))) {
|
|
189
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Registered task administration identity is malformed.');
|
|
190
|
+
}
|
|
191
|
+
const identity = validateTaskIdentity({
|
|
192
|
+
schemaVersion: value.schemaVersion,
|
|
193
|
+
taskId: value.taskId,
|
|
194
|
+
workspaceRealpath: value.workspaceRealpath,
|
|
195
|
+
});
|
|
196
|
+
if (identity.taskId !== taskId)
|
|
197
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Registered task ID differs from its exact record.');
|
|
198
|
+
const environment = (0, node_fs_1.existsSync)(`${path}.environment`)
|
|
199
|
+
? validateEnvironment(JSON.parse((0, private_state_js_1.readPrivateFile)(`${path}.environment`, security).toString('utf8')))
|
|
200
|
+
: undefined;
|
|
201
|
+
// Enrollment of an intact older pointer uses an exclusive sidecar, never a
|
|
202
|
+
// read/modify/write of authority that could race an explicit attachment.
|
|
203
|
+
const administrationIdentity = value.administrationIdentity ??
|
|
204
|
+
((0, node_fs_1.existsSync)(`${path}.administration`)
|
|
205
|
+
? (0, private_state_js_1.readPrivateFile)(`${path}.administration`, security)
|
|
206
|
+
.toString('utf8')
|
|
207
|
+
.trim()
|
|
208
|
+
: undefined);
|
|
209
|
+
if (administrationIdentity !== undefined &&
|
|
210
|
+
(typeof administrationIdentity !== 'string' ||
|
|
211
|
+
!/^[a-f0-9]{64}$/.test(administrationIdentity))) {
|
|
212
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Registered task administration identity is malformed.');
|
|
213
|
+
}
|
|
214
|
+
return {
|
|
215
|
+
...identity,
|
|
216
|
+
...(value.administrationIdentityVersion === 2
|
|
217
|
+
? { administrationIdentityVersion: 2 }
|
|
218
|
+
: {}),
|
|
219
|
+
...(typeof administrationIdentity === 'string'
|
|
220
|
+
? { administrationIdentity }
|
|
221
|
+
: {}),
|
|
222
|
+
...(environment ? { environment } : {}),
|
|
223
|
+
};
|
|
224
|
+
}
|
|
225
|
+
function sameEnvironment(left, right) {
|
|
226
|
+
return (left.accountId === right.accountId &&
|
|
227
|
+
left.region === right.region &&
|
|
228
|
+
left.workspaceDeploymentId === right.workspaceDeploymentId);
|
|
229
|
+
}
|
|
230
|
+
/** Cleanup requires an already-bound task; it may not establish new authority. */
|
|
231
|
+
function assertCurrentTaskEnvironment(workspaceRoot, environment, security = {}) {
|
|
232
|
+
const identity = resolveTaskIdentity(workspaceRoot, security);
|
|
233
|
+
const registered = readRegisteredTask(workspaceRoot, identity.taskId, security);
|
|
234
|
+
if (!registered.environment ||
|
|
235
|
+
!sameEnvironment(registered.environment, validateEnvironment(environment))) {
|
|
236
|
+
throw new errors_js_1.LocalDevContractError('configuration-mismatch', 'Task cleanup requires its previously bound workspace, AWS account, and Region.');
|
|
237
|
+
}
|
|
238
|
+
return identity;
|
|
239
|
+
}
|
|
240
|
+
/** The caller must establish this tuple through current STS and workspace ownership checks. */
|
|
241
|
+
function bindTaskEnvironment(workspaceRoot, environment, security = {}) {
|
|
242
|
+
const identity = resolveTaskIdentity(workspaceRoot, security);
|
|
243
|
+
const verified = validateEnvironment(environment);
|
|
244
|
+
const environmentPath = `${registeredTaskPath(workspaceRoot, identity.taskId)}.environment`;
|
|
245
|
+
if (!(0, node_fs_1.existsSync)(environmentPath)) {
|
|
246
|
+
(0, private_state_js_1.publishPrivateFileExclusive)(environmentPath, `${JSON.stringify(verified)}\n`, security);
|
|
247
|
+
}
|
|
248
|
+
const registered = readRegisteredTask(workspaceRoot, identity.taskId, security);
|
|
249
|
+
if (registered.environment &&
|
|
250
|
+
!sameEnvironment(registered.environment, verified)) {
|
|
251
|
+
throw new errors_js_1.LocalDevContractError('configuration-mismatch', 'Task is bound to a different workspace, AWS account, or Region. Restore its configured context.');
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
/** Called while holding the existing task fleet lock, after proving no runner or cleanup remains. */
|
|
255
|
+
function attachTaskIdentity(workspaceRoot, taskId, environment, security = {}) {
|
|
256
|
+
const verified = validateEnvironment(environment);
|
|
257
|
+
const registered = readRegisteredTask(workspaceRoot, requireTaskId(taskId), security);
|
|
258
|
+
if (!registered.environment ||
|
|
259
|
+
!sameEnvironment(registered.environment, verified)) {
|
|
260
|
+
throw new errors_js_1.LocalDevContractError('configuration-mismatch', 'Task reattachment requires its verified workspace, AWS account, and Region; unbound tasks cannot be transferred.');
|
|
261
|
+
}
|
|
262
|
+
const administrationDirectory = registeredTaskAdministrationDirectory(workspaceRoot, registered, security);
|
|
263
|
+
const nativeDirectory = (0, node_path_1.join)(administrationDirectory, 'ebk', 'native-writers');
|
|
264
|
+
const gatePath = (0, node_path_1.join)(nativeDirectory, `${taskId}.gate.json`);
|
|
265
|
+
const gate = (0, fleet_lock_js_1.acquireFleetLock)(gatePath, {
|
|
266
|
+
fleetId: `task-${taskId}`,
|
|
267
|
+
owner: (0, process_identity_js_1.captureProcessIdentity)(),
|
|
268
|
+
sessionGeneration: (0, contract_validation_js_1.sha256Digest)({
|
|
269
|
+
root: registered.workspaceRealpath,
|
|
270
|
+
taskId,
|
|
271
|
+
}),
|
|
272
|
+
}, security);
|
|
273
|
+
if (gate.kind !== 'acquired')
|
|
274
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task reattachment requires exclusive native writer registration.');
|
|
275
|
+
try {
|
|
276
|
+
if (JSON.stringify(readRegisteredTask(workspaceRoot, taskId, security)) !==
|
|
277
|
+
JSON.stringify(registered) ||
|
|
278
|
+
registeredTaskAdministrationDirectory(workspaceRoot, registered, security) !== administrationDirectory) {
|
|
279
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task ownership changed during native writer registration.');
|
|
280
|
+
}
|
|
281
|
+
if ((0, node_fs_1.existsSync)((0, node_path_1.join)(nativeDirectory, taskId)) &&
|
|
282
|
+
(0, node_fs_1.readdirSync)((0, node_path_1.join)(nativeDirectory, taskId)).length > 0) {
|
|
283
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task reattachment cannot move retained native writer ownership; finish exact-task recovery first.');
|
|
284
|
+
}
|
|
285
|
+
const identity = {
|
|
286
|
+
schemaVersion: exports.TASK_IDENTITY_SCHEMA_VERSION,
|
|
287
|
+
taskId,
|
|
288
|
+
workspaceRealpath: (0, node_fs_1.realpathSync)(workspaceRoot),
|
|
289
|
+
};
|
|
290
|
+
// Persist the authoritative owner first. An interrupted pointer write leaves
|
|
291
|
+
// both old startup and attachment closed, rather than two accepted owners.
|
|
292
|
+
(0, private_state_js_1.atomicWritePrivateFile)(registeredTaskPath(workspaceRoot, taskId), `${JSON.stringify({ ...identity, administrationIdentity: worktreeAdministrationIdentity(workspaceRoot), administrationIdentityVersion: 2 })}\n`, security);
|
|
293
|
+
(0, private_state_js_1.atomicWritePrivateFile)(taskIdentityPath(workspaceRoot), `${JSON.stringify(identity)}\n`, security);
|
|
294
|
+
return identity;
|
|
295
|
+
}
|
|
296
|
+
finally {
|
|
297
|
+
(0, fleet_lock_js_1.releaseFleetLock)(gatePath, gate.record, security);
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
function requireTaskId(value) {
|
|
301
|
+
if (typeof value !== 'string' || !exports.TASK_ID_PATTERN.test(value)) {
|
|
302
|
+
throw new errors_js_1.LocalDevContractError('personal-identity-unavailable', 'Task identity must be an opaque 24-character lowercase hexadecimal ID.');
|
|
303
|
+
}
|
|
304
|
+
return value;
|
|
305
|
+
}
|
|
306
|
+
function taskStage(taskId) {
|
|
307
|
+
return `personal-${requireTaskId(taskId)}`;
|
|
308
|
+
}
|
|
309
|
+
/** Git query budget: hosted Windows runners answer slowly under child contention
|
|
310
|
+
* (eight simultaneous resolvers exceeded 5 s in PR #113 diagnostic 34737069666). */
|
|
311
|
+
exports.WORKTREE_GIT_QUERY_TIMEOUT_MS = Object.freeze({
|
|
312
|
+
default: 5_000,
|
|
313
|
+
win32: 30_000,
|
|
314
|
+
});
|
|
315
|
+
function gitQueryTimeout() {
|
|
316
|
+
return process.platform === 'win32'
|
|
317
|
+
? exports.WORKTREE_GIT_QUERY_TIMEOUT_MS.win32
|
|
318
|
+
: exports.WORKTREE_GIT_QUERY_TIMEOUT_MS.default;
|
|
319
|
+
}
|
|
320
|
+
function resolveWorktreeGitDirectory(workspaceRoot) {
|
|
321
|
+
// Ignore caller Git overrides: the selected checkout, not ambient Git state,
|
|
322
|
+
// owns its task pointer. --absolute-git-dir works before the first commit.
|
|
323
|
+
const environment = Object.fromEntries(Object.entries(process.env).filter(([key]) => !key.startsWith('GIT_')));
|
|
324
|
+
try {
|
|
325
|
+
return (0, node_fs_1.realpathSync)((0, node_child_process_1.execFileSync)('git', [
|
|
326
|
+
'--no-optional-locks',
|
|
327
|
+
'-c',
|
|
328
|
+
'core.fsmonitor=false',
|
|
329
|
+
'rev-parse',
|
|
330
|
+
'--absolute-git-dir',
|
|
331
|
+
], {
|
|
332
|
+
cwd: workspaceRoot,
|
|
333
|
+
encoding: 'utf8',
|
|
334
|
+
env: environment,
|
|
335
|
+
stdio: ['ignore', 'pipe', 'pipe'],
|
|
336
|
+
timeout: gitQueryTimeout(),
|
|
337
|
+
windowsHide: true,
|
|
338
|
+
}).trim());
|
|
339
|
+
}
|
|
340
|
+
catch {
|
|
341
|
+
throw new errors_js_1.LocalDevContractError('personal-identity-unavailable', 'Task development requires a Git worktree. Initialize the generated repository before running ebk dev.');
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
function taskIdentityPath(workspaceRoot) {
|
|
345
|
+
return (0, node_path_1.join)(resolveWorktreeGitDirectory(workspaceRoot), 'ebk', 'task-v1.json');
|
|
346
|
+
}
|
|
347
|
+
function validateTaskIdentity(value) {
|
|
348
|
+
(0, contract_validation_js_1.assertRecord)(value, 'Task identity');
|
|
349
|
+
(0, contract_validation_js_1.assertExactProperties)(value, ['schemaVersion', 'taskId', 'workspaceRealpath'], [], 'Task identity');
|
|
350
|
+
if (value.schemaVersion !== exports.TASK_IDENTITY_SCHEMA_VERSION ||
|
|
351
|
+
typeof value.workspaceRealpath !== 'string' ||
|
|
352
|
+
value.workspaceRealpath.length === 0) {
|
|
353
|
+
throw new errors_js_1.LocalDevContractError('invalid-state', 'Task identity is malformed.');
|
|
354
|
+
}
|
|
355
|
+
return {
|
|
356
|
+
schemaVersion: exports.TASK_IDENTITY_SCHEMA_VERSION,
|
|
357
|
+
taskId: requireTaskId(value.taskId),
|
|
358
|
+
workspaceRealpath: value.workspaceRealpath,
|
|
359
|
+
};
|
|
360
|
+
}
|
|
361
|
+
function resolveTaskIdentity(workspaceRoot, security = {}) {
|
|
362
|
+
const workspaceRealpath = (0, node_fs_1.realpathSync)(workspaceRoot);
|
|
363
|
+
const path = taskIdentityPath(workspaceRealpath);
|
|
364
|
+
// Refuse unsupported filesystems before publishing even the first pointer.
|
|
365
|
+
const administrationIdentity = worktreeAdministrationIdentity(workspaceRealpath);
|
|
366
|
+
// A dangling symlink is evidence, not an absent pointer to replace.
|
|
367
|
+
let pointerExists = false;
|
|
368
|
+
try {
|
|
369
|
+
(0, node_fs_1.lstatSync)(path);
|
|
370
|
+
pointerExists = true;
|
|
371
|
+
}
|
|
372
|
+
catch (error) {
|
|
373
|
+
if (error.code !== 'ENOENT')
|
|
374
|
+
throw error;
|
|
375
|
+
}
|
|
376
|
+
if (!pointerExists)
|
|
377
|
+
assertNoLostTaskPointer(workspaceRealpath, security);
|
|
378
|
+
publishTaskRecord(path, {
|
|
379
|
+
schemaVersion: exports.TASK_IDENTITY_SCHEMA_VERSION,
|
|
380
|
+
taskId: (0, node_crypto_1.randomBytes)(12).toString('hex'),
|
|
381
|
+
workspaceRealpath,
|
|
382
|
+
}, security);
|
|
383
|
+
(0, private_state_js_1.assertPrivatePath)((0, node_path_1.join)(resolveWorktreeGitDirectory(workspaceRealpath), 'ebk'), 'directory', security);
|
|
384
|
+
const record = validateTaskIdentity(JSON.parse((0, private_state_js_1.readPrivateFile)(path, security).toString('utf8')));
|
|
385
|
+
if (record.workspaceRealpath !== workspaceRealpath) {
|
|
386
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task belongs to a different checkout. Use explicit ebk dev attach after verifying its ownership; startup will not reassign it.');
|
|
387
|
+
}
|
|
388
|
+
publishTaskRecord(registeredTaskPath(workspaceRealpath, record.taskId), {
|
|
389
|
+
...record,
|
|
390
|
+
administrationIdentity,
|
|
391
|
+
administrationIdentityVersion: 2,
|
|
392
|
+
}, security);
|
|
393
|
+
const registered = readRegisteredTask(workspaceRealpath, record.taskId, security);
|
|
394
|
+
if (worktreeAdministrationIdentity(workspaceRealpath) !== administrationIdentity) {
|
|
395
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Git administration identity changed while resolving task ownership; no ownership was inferred.');
|
|
396
|
+
}
|
|
397
|
+
if (registered.workspaceRealpath !== workspaceRealpath) {
|
|
398
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task was explicitly attached to another worktree. This checkout no longer owns its task environment.');
|
|
399
|
+
}
|
|
400
|
+
if (!registered.administrationIdentity) {
|
|
401
|
+
// Enroll only an intact pointer already reconciled with its registry above.
|
|
402
|
+
// Missing-pointer recovery cannot use this path or invent old ownership.
|
|
403
|
+
(0, private_state_js_1.publishPrivateFileExclusive)(`${registeredTaskPath(workspaceRealpath, record.taskId)}.administration`, `${administrationIdentity}\n`, security);
|
|
404
|
+
const enrolled = readRegisteredTask(workspaceRealpath, record.taskId, security);
|
|
405
|
+
if (enrolled.workspaceRealpath !== workspaceRealpath ||
|
|
406
|
+
enrolled.administrationIdentity !== administrationIdentity) {
|
|
407
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task ownership changed during administration enrollment; no pointer was reassigned.');
|
|
408
|
+
}
|
|
409
|
+
}
|
|
410
|
+
else if (registered.administrationIdentity !== administrationIdentity &&
|
|
411
|
+
(registered.administrationIdentityVersion !== undefined ||
|
|
412
|
+
registered.administrationIdentity !==
|
|
413
|
+
worktreeAdministrationIdentity(workspaceRealpath, true))) {
|
|
414
|
+
throw new errors_js_1.LocalDevContractError('fleet-ownership-ambiguous', 'Task belongs to a different Git administration generation; its pointer cannot be adopted by a recreated worktree.');
|
|
415
|
+
}
|
|
416
|
+
return record;
|
|
417
|
+
}
|
|
418
|
+
//# sourceMappingURL=task-identity.js.map
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { ExecutorContext } from '@nx/devkit';
|
|
2
|
+
import { type FleetProcessIdentity, type ProcessIdentityProbe } from './fleet-lock.js';
|
|
3
|
+
import { type PrivateStateSecurity } from './private-state.js';
|
|
4
|
+
export interface TaskNativeWriterEffects {
|
|
5
|
+
appData?: string;
|
|
6
|
+
processProbe?: (identity: FleetProcessIdentity) => ProcessIdentityProbe;
|
|
7
|
+
security?: PrivateStateSecurity;
|
|
8
|
+
groupExists?: (pid: number) => boolean;
|
|
9
|
+
}
|
|
10
|
+
/** Read-only legacy/current runner proof; cleanup need not have succeeded to unlock. */
|
|
11
|
+
export declare function assertTaskNativeWritersAbsent(context: ExecutorContext, effects?: TaskNativeWriterEffects): void;
|
|
12
|
+
export interface TaskNativeWriterLease {
|
|
13
|
+
assertCurrent(): void;
|
|
14
|
+
recordChild(pid: number, ownsProcessGroup?: boolean): void;
|
|
15
|
+
release(): void;
|
|
16
|
+
}
|
|
17
|
+
/** One native invocation per exact worktree/task/Slice, never a global task lock. */
|
|
18
|
+
export declare function acquireTaskNativeWriterLease(context: ExecutorContext, taskId: string, unlock: boolean, effects?: TaskNativeWriterEffects): TaskNativeWriterLease;
|