@empire-builder-kit/nx 1.0.0-rc.2 → 1.0.0-rc.21
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/executors.json +10 -0
- package/package.json +4 -4
- package/src/cli/output.js +1 -1
- package/src/developer-agent/model.js +4 -4
- package/src/developer-agent/model.js.map +1 -1
- package/src/developer-agent/operation-registry.js +67 -10
- package/src/developer-agent/operation-registry.js.map +1 -1
- package/src/developer-agent/planning.js +7 -9
- package/src/developer-agent/planning.js.map +1 -1
- package/src/developer-agent/workspace-inspection.js +12 -0
- package/src/developer-agent/workspace-inspection.js.map +1 -1
- package/src/executors/blueprint-trust/blueprint-trust.js +6 -0
- package/src/executors/blueprint-trust/blueprint-trust.js.map +1 -1
- package/src/executors/deployment-plan/deployment-plan.js +5 -0
- package/src/executors/deployment-plan/deployment-plan.js.map +1 -1
- package/src/executors/foundation-preflight/foundation-preflight.d.ts +2 -0
- package/src/executors/foundation-preflight/foundation-preflight.js +6 -2
- package/src/executors/foundation-preflight/foundation-preflight.js.map +1 -1
- package/src/executors/foundation-preflight/schema.json +10 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.d.ts +2 -0
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js +2 -1
- package/src/executors/foundation-profile-preflight/foundation-profile-preflight.js.map +1 -1
- package/src/executors/foundation-profile-preflight/schema.json +19 -3
- package/src/executors/github-bootstrap/github-bootstrap.js +1 -0
- package/src/executors/github-bootstrap/github-bootstrap.js.map +1 -1
- package/src/executors/infrastructure-plan/infrastructure-plan.d.ts +229 -5
- package/src/executors/infrastructure-plan/infrastructure-plan.js +2298 -175
- package/src/executors/infrastructure-plan/infrastructure-plan.js.map +1 -1
- package/src/executors/infrastructure-plan/schema.json +16 -0
- package/src/executors/local-deploy/fixtures/local-deploy-state-machine.mjs +53 -0
- package/src/executors/local-deploy/local-approval.d.ts +23 -0
- package/src/executors/local-deploy/local-approval.js +43 -0
- package/src/executors/local-deploy/local-approval.js.map +1 -0
- package/src/executors/local-deploy/local-deploy.d.ts +69 -0
- package/src/executors/local-deploy/local-deploy.js +911 -0
- package/src/executors/local-deploy/local-deploy.js.map +1 -0
- package/src/executors/local-deploy/schema.json +42 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.d.ts +3 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js +94 -0
- package/src/executors/router-waf-rehearsal/router-waf-rehearsal.js.map +1 -0
- package/src/executors/router-waf-rehearsal/schema.json +9 -0
- package/src/executors/secret-metadata/schema.json +5 -0
- package/src/executors/secret-metadata/secret-metadata.d.ts +12 -1
- package/src/executors/secret-metadata/secret-metadata.js +68 -16
- package/src/executors/secret-metadata/secret-metadata.js.map +1 -1
- 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/logging-preflight.js.map +1 -1
- package/src/executors/sst-lifecycle/run-sst-command.d.ts +8 -1
- package/src/executors/sst-lifecycle/run-sst-command.js +144 -12
- package/src/executors/sst-lifecycle/run-sst-command.js.map +1 -1
- package/src/executors/sst-lifecycle/schema.json +13 -1
- package/src/executors/sst-lifecycle/sst-environment-source.d.ts +25 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js +213 -0
- package/src/executors/sst-lifecycle/sst-environment-source.js.map +1 -0
- package/src/foundation/index.d.ts +2 -0
- package/src/foundation/index.js +2 -0
- package/src/foundation/index.js.map +1 -1
- package/src/foundation/logging-preflight.js +1 -1
- package/src/foundation/logging-preflight.js.map +1 -1
- package/src/foundation/logging.d.ts +3 -1
- package/src/foundation/logging.js +1 -1
- package/src/foundation/logging.js.map +1 -1
- package/src/foundation/partial-state.d.ts +10 -0
- package/src/foundation/partial-state.js +21 -0
- package/src/foundation/partial-state.js.map +1 -0
- package/src/foundation/router-waf.d.ts +98 -0
- package/src/foundation/router-waf.js +401 -0
- package/src/foundation/router-waf.js.map +1 -0
- package/src/generators/function/function.js +2 -1
- package/src/generators/function/function.js.map +1 -1
- package/src/generators/post-generation-install.d.ts +1 -0
- package/src/generators/post-generation-install.js +134 -67
- package/src/generators/post-generation-install.js.map +1 -1
- package/src/generators/preset/generator.js +23 -3
- package/src/generators/preset/generator.js.map +1 -1
- package/src/generators/preset/schema.d.ts +7 -0
- package/src/generators/preset/schema.json +47 -0
- package/src/generators/preset/tool-versions.d.ts +5 -5
- package/src/generators/preset/tool-versions.js +4 -4
- 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-acceptance.js.map +1 -0
- package/src/generators/preset/workspace-files-developer-agent.d.ts +2 -0
- package/src/generators/preset/workspace-files-developer-agent.js +25 -11
- package/src/generators/preset/workspace-files-developer-agent.js.map +1 -1
- package/src/generators/preset/workspace-files-foundation-workload-roles.js +5 -2
- package/src/generators/preset/workspace-files-foundation-workload-roles.js.map +1 -1
- package/src/generators/preset/workspace-files-performance-load.js +2 -1
- package/src/generators/preset/workspace-files-performance-load.js.map +1 -1
- package/src/generators/preset/workspace-files-workload-role-baseline.js +254 -42
- package/src/generators/preset/workspace-files-workload-role-baseline.js.map +1 -1
- package/src/generators/preset/workspace-files.d.ts +8 -4
- package/src/generators/preset/workspace-files.js +1039 -68
- package/src/generators/preset/workspace-files.js.map +1 -1
- package/src/generators/repository-policy/repository-policy.js +65 -3
- package/src/generators/repository-policy/repository-policy.js.map +1 -1
- package/src/generators/repository-policy/schema.d.ts +6 -0
- package/src/generators/repository-policy/schema.json +46 -0
- package/src/generators/slice/built-in-plan-api-files.js +2 -1
- package/src/generators/slice/built-in-plan-api-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js +19 -1
- package/src/generators/slice/built-in-plan-authorization-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-files.js +16 -5
- package/src/generators/slice/built-in-plan-data-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-data-retention-job-files.js +10 -6
- package/src/generators/slice/built-in-plan-data-retention-job-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js +25 -10
- package/src/generators/slice/built-in-plan-database-lifecycle-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-foundation-files.js +2 -3
- package/src/generators/slice/built-in-plan-foundation-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-files.js +364 -29
- package/src/generators/slice/built-in-plan-infrastructure-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js +67 -11
- package/src/generators/slice/built-in-plan-infrastructure-safety-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-metadata-files.js +1 -0
- package/src/generators/slice/built-in-plan-metadata-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-operations-files.js +442 -5
- package/src/generators/slice/built-in-plan-operations-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-performance-files.d.ts +2 -1
- package/src/generators/slice/built-in-plan-performance-files.js +41 -47
- package/src/generators/slice/built-in-plan-performance-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-project-files.js +14 -1
- package/src/generators/slice/built-in-plan-project-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-release-files.js +235 -56
- package/src/generators/slice/built-in-plan-release-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-testing-files.js +92 -5
- package/src/generators/slice/built-in-plan-testing-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-web-files.js +13 -0
- package/src/generators/slice/built-in-plan-web-files.js.map +1 -1
- package/src/generators/slice/built-in-plan-workload-role-files.js +5 -2
- package/src/generators/slice/built-in-plan-workload-role-files.js.map +1 -1
- package/src/generators/slice/built-in-plan.d.ts +2 -1
- package/src/generators/slice/built-in-plan.js +8 -5
- package/src/generators/slice/built-in-plan.js.map +1 -1
- package/src/generators/slice/slice.js +11 -3
- package/src/generators/slice/slice.js.map +1 -1
- package/src/generators/upgrade/upgrade.js +35 -0
- package/src/generators/upgrade/upgrade.js.map +1 -1
- package/src/generators/workload/frozen-container.d.ts +3 -2
- package/src/generators/workload/frozen-container.js +6 -4
- package/src/generators/workload/frozen-container.js.map +1 -1
- package/src/generators/workload/workload.js +2 -2
- package/src/generators/workload/workload.js.map +1 -1
- package/src/git-policy/github-bootstrap.d.ts +3 -1
- package/src/git-policy/github-bootstrap.js +22 -5
- package/src/git-policy/github-bootstrap.js.map +1 -1
- package/src/git-policy/routing.d.ts +2 -0
- package/src/git-policy/routing.js +12 -1
- package/src/git-policy/routing.js.map +1 -1
- package/src/infrastructure-change/local-capability.d.ts +73 -0
- package/src/infrastructure-change/local-capability.js +114 -0
- package/src/infrastructure-change/local-capability.js.map +1 -0
- package/src/infrastructure-change/model.d.ts +25 -4
- package/src/infrastructure-change/model.js +1 -0
- package/src/infrastructure-change/model.js.map +1 -1
- package/src/infrastructure-change/normalize.d.ts +4 -0
- package/src/infrastructure-change/normalize.js +47 -7
- package/src/infrastructure-change/normalize.js.map +1 -1
- package/src/infrastructure-change/plan.d.ts +30 -3
- package/src/infrastructure-change/plan.js +323 -13
- package/src/infrastructure-change/plan.js.map +1 -1
- package/src/infrastructure-change/risk.d.ts +3 -1
- package/src/infrastructure-change/risk.js +96 -16
- package/src/infrastructure-change/risk.js.map +1 -1
- package/src/local-dev/environment-inspector.d.ts +1 -0
- package/src/local-dev/environment-inspector.js +21 -9
- package/src/local-dev/environment-inspector.js.map +1 -1
- package/src/local-dev/private-state.d.ts +2 -0
- package/src/local-dev/private-state.js +3 -1
- package/src/local-dev/private-state.js.map +1 -1
- package/src/performance/cost-controls.d.ts +5 -3
- package/src/performance/cost-controls.js +30 -24
- package/src/performance/cost-controls.js.map +1 -1
- package/src/performance/model.d.ts +1 -1
- package/src/performance/model.js +0 -2
- package/src/performance/model.js.map +1 -1
- package/src/performance/test-fixtures.js +0 -2
- package/src/performance/test-fixtures.js.map +1 -1
- package/src/release/source-authority.d.ts +1 -0
- package/src/release/source-authority.js +136 -9
- package/src/release/source-authority.js.map +1 -1
- package/src/repository-policy/deployment-plan.d.ts +4 -1
- package/src/repository-policy/deployment-plan.js +8 -0
- package/src/repository-policy/deployment-plan.js.map +1 -1
- package/src/repository-policy/foundation-profile.js +1 -2
- package/src/repository-policy/foundation-profile.js.map +1 -1
- package/src/repository-policy/policy.d.ts +25 -1
- package/src/repository-policy/policy.js +145 -4
- package/src/repository-policy/policy.js.map +1 -1
- package/src/schemas/performance-policy-v1.json +0 -2
- package/src/schemas/repository-policy-v1.json +41 -0
- package/src/secrets/operator.js +22 -4
- package/src/secrets/operator.js.map +1 -1
- package/src/secrets/verification.js +9 -1
- package/src/secrets/verification.js.map +1 -1
- package/src/sst-environment-source-format.d.ts +3 -0
- package/src/sst-environment-source-format.js +179 -0
- package/src/sst-environment-source-format.js.map +1 -0
- package/src/supply-chain/blueprint-trust-git.js +72 -21
- package/src/supply-chain/blueprint-trust-git.js.map +1 -1
- package/src/supply-chain/blueprint-verification-authority.js +55 -3
- package/src/supply-chain/blueprint-verification-authority.js.map +1 -1
- package/src/supply-chain/blueprint-verification-execution.js +17 -2
- package/src/supply-chain/blueprint-verification-execution.js.map +1 -1
- package/src/supply-chain/build-output.d.ts +7 -1
- package/src/supply-chain/build-output.js +160 -20
- package/src/supply-chain/build-output.js.map +1 -1
- package/src/supply-chain/generated-command.js +131 -43
- package/src/supply-chain/generated-command.js.map +1 -1
- package/src/supply-chain/generated-container-release-command.js +187 -38
- package/src/supply-chain/generated-container-release-command.js.map +1 -1
- package/src/supply-chain/generated-ecr-collector-command.js +12 -2
- package/src/supply-chain/generated-ecr-collector-command.js.map +1 -1
- package/src/supply-chain/generated-scanner-command.js +114 -54
- package/src/supply-chain/generated-scanner-command.js.map +1 -1
- package/src/supply-chain/inventory.d.ts +17 -0
- package/src/supply-chain/inventory.js +114 -3
- package/src/supply-chain/inventory.js.map +1 -1
- package/src/supply-chain/pnpm-toolchain-authority.d.ts +4 -3
- package/src/supply-chain/pnpm-toolchain-authority.js +20 -34
- package/src/supply-chain/pnpm-toolchain-authority.js.map +1 -1
- package/src/supply-chain/policy.js +4 -1
- package/src/supply-chain/policy.js.map +1 -1
- package/src/supply-chain/sbom.d.ts +1 -1
- package/src/supply-chain/sbom.js +30 -5
- package/src/supply-chain/sbom.js.map +1 -1
- package/src/supply-chain/scanner.js +10 -1
- package/src/supply-chain/scanner.js.map +1 -1
- package/src/workload-roles/account-baseline.d.ts +11 -0
- package/src/workload-roles/account-baseline.js +253 -16
- package/src/workload-roles/account-baseline.js.map +1 -1
- package/src/workload-roles/authority.d.ts +3 -1
- package/src/workload-roles/authority.js +48 -2
- package/src/workload-roles/authority.js.map +1 -1
- package/src/workload-roles/aws-s3-state.js +27 -0
- package/src/workload-roles/aws-s3-state.js.map +1 -1
- package/src/workload-roles/boundary.d.ts +2 -1
- package/src/workload-roles/boundary.js +9 -2
- package/src/workload-roles/boundary.js.map +1 -1
- package/src/workload-roles/handler.js +52 -24
- package/src/workload-roles/handler.js.map +1 -1
- package/src/workload-roles/injection.js +1 -1
- package/src/workload-roles/injection.js.map +1 -1
- package/src/workload-roles/provisioner.js +12 -4
- package/src/workload-roles/provisioner.js.map +1 -1
- package/src/workload-roles/registration.d.ts +1 -0
- package/src/workload-roles/registration.js +5 -0
- package/src/workload-roles/registration.js.map +1 -1
- package/src/workload-roles/stage-boundary.js +1 -1
- package/src/workload-roles/stage-boundary.js.map +1 -1
- package/src/workload-roles/standard-slice.js +1 -0
- package/src/workload-roles/standard-slice.js.map +1 -1
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.LOCAL_MUTATION_CAPABILITY_LIFETIME_MS = void 0;
|
|
4
|
+
exports.localMutationAuthorityEnvelope = localMutationAuthorityEnvelope;
|
|
5
|
+
exports.createLocalMutationCapability = createLocalMutationCapability;
|
|
6
|
+
exports.computeLocalMutationAuthorityDigest = computeLocalMutationAuthorityDigest;
|
|
7
|
+
exports.validateLocalMutationCapability = validateLocalMutationCapability;
|
|
8
|
+
const canonical_json_1 = require("@empire-builder-kit/runtime/canonical-json");
|
|
9
|
+
const SHA = /^[a-f0-9]{40}$/;
|
|
10
|
+
const SHA256 = /^[a-f0-9]{64}$/;
|
|
11
|
+
const ROLE = /^arn:(aws|aws-us-gov|aws-cn):iam::\d{12}:role\/[A-Za-z0-9+=,.@_/-]{1,512}$/;
|
|
12
|
+
const ACTOR = /^arn:(aws|aws-us-gov|aws-cn):sts::\d{12}:assumed-role\/[A-Za-z0-9+=,.@_-]{1,128}\/[A-Za-z0-9+=,.@_-]{1,128}$/;
|
|
13
|
+
exports.LOCAL_MUTATION_CAPABILITY_LIFETIME_MS = 10 * 60_000;
|
|
14
|
+
function sha256(value) {
|
|
15
|
+
return (0, canonical_json_1.canonicalJsonSha256)(value, { omitUndefinedObjectValues: true });
|
|
16
|
+
}
|
|
17
|
+
function localMutationAuthorityEnvelope(input) {
|
|
18
|
+
const { plan } = input;
|
|
19
|
+
const planAuthorityPolicyDigest = plan.versions['plan-authority-policy'];
|
|
20
|
+
if ((plan.action !== 'deploy' && plan.action !== 'refresh') ||
|
|
21
|
+
plan.projects.length !== 1 ||
|
|
22
|
+
plan.projects[0] !== input.project ||
|
|
23
|
+
!input.project ||
|
|
24
|
+
!ACTOR.test(input.actorArn) ||
|
|
25
|
+
!SHA.test(plan.sourceCommit) ||
|
|
26
|
+
!SHA.test(input.deploymentSourceCommit) ||
|
|
27
|
+
!SHA.test(input.deploymentSourceTree) ||
|
|
28
|
+
!SHA.test(input.releaseSourceTree) ||
|
|
29
|
+
!ROLE.test(input.expectedRoleArn) ||
|
|
30
|
+
!SHA256.test(plan.materialDigest) ||
|
|
31
|
+
!SHA256.test(plan.configurationMetadataDigest) ||
|
|
32
|
+
!SHA256.test(plan.policyProfileDigest) ||
|
|
33
|
+
!SHA256.test(plan.state.digest) ||
|
|
34
|
+
plan.state.locked !== false ||
|
|
35
|
+
!planAuthorityPolicyDigest ||
|
|
36
|
+
!SHA256.test(planAuthorityPolicyDigest)) {
|
|
37
|
+
throw new Error('Local mutation authority requires one exact source, project, policy, artifact, role, and state envelope.');
|
|
38
|
+
}
|
|
39
|
+
if (plan.target.stage !== 'development' &&
|
|
40
|
+
plan.target.stage !== 'staging' &&
|
|
41
|
+
plan.target.stage !== 'production') {
|
|
42
|
+
throw new Error('Local mutation authority requires one canonical stage.');
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
accountFingerprint: plan.target.accountFingerprint,
|
|
46
|
+
action: plan.action,
|
|
47
|
+
actorArnDigest: sha256(input.actorArn),
|
|
48
|
+
configurationMetadataDigest: plan.configurationMetadataDigest,
|
|
49
|
+
deploymentSourceCommit: input.deploymentSourceCommit,
|
|
50
|
+
deploymentSourceTree: input.deploymentSourceTree,
|
|
51
|
+
deploymentProfile: input.deploymentProfile,
|
|
52
|
+
expectedRoleArnDigest: sha256(input.expectedRoleArn),
|
|
53
|
+
frameworkVersion: plan.frameworkVersion,
|
|
54
|
+
planAuthorityPolicyDigest,
|
|
55
|
+
planMaterialDigest: plan.materialDigest,
|
|
56
|
+
policyProfileDigest: plan.policyProfileDigest,
|
|
57
|
+
project: input.project,
|
|
58
|
+
region: plan.target.region,
|
|
59
|
+
releaseSourceCommit: plan.sourceCommit,
|
|
60
|
+
releaseSourceTree: input.releaseSourceTree,
|
|
61
|
+
stage: plan.target.stage,
|
|
62
|
+
state: {
|
|
63
|
+
backend: plan.state.backend,
|
|
64
|
+
digest: plan.state.digest,
|
|
65
|
+
locked: false,
|
|
66
|
+
stack: plan.state.stack,
|
|
67
|
+
version: plan.state.version,
|
|
68
|
+
},
|
|
69
|
+
versions: { ...plan.versions },
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
function createLocalMutationCapability(input) {
|
|
73
|
+
if (!input.nonce || input.nonce.length < 32) {
|
|
74
|
+
throw new Error('Local mutation capability nonce is absent or too short.');
|
|
75
|
+
}
|
|
76
|
+
const authority = localMutationAuthorityEnvelope(input);
|
|
77
|
+
const issuedAt = input.issuedAt.toISOString();
|
|
78
|
+
const expiresAt = new Date(input.issuedAt.getTime() + exports.LOCAL_MUTATION_CAPABILITY_LIFETIME_MS).toISOString();
|
|
79
|
+
return {
|
|
80
|
+
authority,
|
|
81
|
+
authorityDigest: sha256(authority),
|
|
82
|
+
authorizationDigest: sha256(input.authorizationContents),
|
|
83
|
+
expiresAt,
|
|
84
|
+
issuedAt,
|
|
85
|
+
kind: 'ebk-local-mutation-capability',
|
|
86
|
+
nonceDigest: sha256(input.nonce),
|
|
87
|
+
planEvidenceDigest: sha256(input.planContents),
|
|
88
|
+
schemaVersion: 1,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
function computeLocalMutationAuthorityDigest(authority) {
|
|
92
|
+
return sha256(authority);
|
|
93
|
+
}
|
|
94
|
+
function validateLocalMutationCapability(input) {
|
|
95
|
+
const issuedAt = Date.parse(input.capability.issuedAt);
|
|
96
|
+
const expiresAt = Date.parse(input.capability.expiresAt);
|
|
97
|
+
const now = input.now.getTime();
|
|
98
|
+
if (input.capability.kind !== 'ebk-local-mutation-capability' ||
|
|
99
|
+
input.capability.schemaVersion !== 1 ||
|
|
100
|
+
!Number.isFinite(issuedAt) ||
|
|
101
|
+
!Number.isFinite(expiresAt) ||
|
|
102
|
+
issuedAt > now ||
|
|
103
|
+
expiresAt <= now ||
|
|
104
|
+
expiresAt - issuedAt !== exports.LOCAL_MUTATION_CAPABILITY_LIFETIME_MS ||
|
|
105
|
+
input.capability.nonceDigest !== sha256(input.nonce) ||
|
|
106
|
+
input.capability.planEvidenceDigest !== sha256(input.planContents) ||
|
|
107
|
+
input.capability.authorizationDigest !==
|
|
108
|
+
sha256(input.authorizationContents) ||
|
|
109
|
+
input.capability.authorityDigest !== sha256(input.capability.authority) ||
|
|
110
|
+
input.capability.authorityDigest !== sha256(input.expectedAuthority)) {
|
|
111
|
+
throw new Error('Local mutation capability is malformed, expired, replayed, or no longer bound to retained evidence.');
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=local-capability.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-capability.js","sourceRoot":"","sources":["../../../../../packages/nx/src/infrastructure-change/local-capability.ts"],"names":[],"mappings":";;;AA2DA,wEAqEC;AAED,sEAiCC;AAED,kFAIC;AAED,0EA8BC;AAzMD,+EAAiF;AAOjF,MAAM,GAAG,GAAG,gBAAgB,CAAC;AAC7B,MAAM,MAAM,GAAG,gBAAgB,CAAC;AAChC,MAAM,IAAI,GACR,4EAA4E,CAAC;AAC/E,MAAM,KAAK,GACT,8GAA8G,CAAC;AACpG,QAAA,qCAAqC,GAAG,EAAE,GAAG,MAAM,CAAC;AA0CjE,SAAS,MAAM,CAAC,KAAc;IAC5B,OAAO,IAAA,oCAAmB,EAAC,KAAK,EAAE,EAAE,yBAAyB,EAAE,IAAI,EAAE,CAAC,CAAC;AACzE,CAAC;AAED,SAAgB,8BAA8B,CAAC,KAS9C;IACC,MAAM,EAAE,IAAI,EAAE,GAAG,KAAK,CAAC;IACvB,MAAM,yBAAyB,GAAG,IAAI,CAAC,QAAQ,CAAC,uBAAuB,CAAC,CAAC;IACzE,IACE,CAAC,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC;QACvD,IAAI,CAAC,QAAQ,CAAC,MAAM,KAAK,CAAC;QAC1B,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK,CAAC,OAAO;QAClC,CAAC,KAAK,CAAC,OAAO;QACd,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC;QAC3B,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,CAAC;QAC5B,CAAC,GAAG,CAAC,IAAI,CAAC,KAAK,CAAC,sBAAsB,CAAC;QACvC,CAAC,GAAG,CAAC,IAAI,CAAC,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,CAAC,KAAK,CAAC,iBAAiB,CAAC,EACpE,CAAC;QACD,MAAM,IAAI,KAAK,CACb,qGAAqG,CACtG,CAAC;IACJ,CAAC;AACH,CAAC"}
|
|
@@ -2,7 +2,7 @@ export declare const INFRASTRUCTURE_CHANGE_SCHEMA_VERSION: 1;
|
|
|
2
2
|
export declare const INFRASTRUCTURE_PLAN_KIND: "ebk-infrastructure-plan";
|
|
3
3
|
export declare const SST_DIFF_TOOL_NAME: "sst";
|
|
4
4
|
export declare const SST_DIFF_TOOL_VERSION: "4.17.1";
|
|
5
|
-
export declare const INFRASTRUCTURE_OPERATIONS: readonly ["create", "update", "replace", "delete", "import", "read", "unknown"];
|
|
5
|
+
export declare const INFRASTRUCTURE_OPERATIONS: readonly ["create", "update", "replace", "delete", "discard", "import", "read", "unknown"];
|
|
6
6
|
export type InfrastructureOperation = (typeof INFRASTRUCTURE_OPERATIONS)[number];
|
|
7
7
|
export declare const INFRASTRUCTURE_RISK_CLASSES: readonly ["no-change", "additive-low-risk", "in-place-reviewed", "stateless-replacement", "stateful-or-destructive", "security-expansion", "protection-reduction", "material-cost-or-quota", "unknown"];
|
|
8
8
|
export type InfrastructureRiskClass = (typeof INFRASTRUCTURE_RISK_CLASSES)[number];
|
|
@@ -76,11 +76,23 @@ export interface IamAccessAnalyzerValidationV1 {
|
|
|
76
76
|
status: 'complete' | 'failed' | 'unsupported';
|
|
77
77
|
}
|
|
78
78
|
export interface InfrastructureRiskPolicyV1 {
|
|
79
|
+
/**
|
|
80
|
+
* Exact provider imports whose ownership transition is already bound to a
|
|
81
|
+
* committed authority, deterministic private identifier, retain behavior,
|
|
82
|
+
* and recovery runbook. Every other import remains blocked.
|
|
83
|
+
*/
|
|
84
|
+
adoptedImports: readonly AdoptedInfrastructureImportV1[];
|
|
79
85
|
/**
|
|
80
86
|
* Exact provider types whose create operation has been reviewed as a
|
|
81
87
|
* private, stateless, low-cost addition.
|
|
82
88
|
*/
|
|
83
89
|
additiveLowRiskTypes: readonly string[];
|
|
90
|
+
/**
|
|
91
|
+
* Exact provider types whose create operation is expected but still
|
|
92
|
+
* requires a digest-bound deployment review. Undeclared additions remain
|
|
93
|
+
* unknown and fail closed.
|
|
94
|
+
*/
|
|
95
|
+
additiveReviewedTypes: readonly string[];
|
|
84
96
|
/**
|
|
85
97
|
* Exact provider types that can materially change cost or consume quotas.
|
|
86
98
|
*/
|
|
@@ -91,6 +103,14 @@ export interface InfrastructureRiskPolicyV1 {
|
|
|
91
103
|
*/
|
|
92
104
|
statefulTypes: readonly string[];
|
|
93
105
|
}
|
|
106
|
+
export interface AdoptedInfrastructureImportV1 {
|
|
107
|
+
authority: 'workload-role-account-baseline';
|
|
108
|
+
logicalId: string;
|
|
109
|
+
privateIdentifierTemplate: string;
|
|
110
|
+
recoveryRunbookRef: string;
|
|
111
|
+
removalBehavior: 'retain';
|
|
112
|
+
resourceType: string;
|
|
113
|
+
}
|
|
94
114
|
export type InfrastructureDriftStatus = 'not-checked' | 'no-drift' | 'drift-detected' | 'partial-coverage' | 'unsupported' | 'failed';
|
|
95
115
|
export type InfrastructureMutationAction = 'deploy' | 'refresh' | 'remove';
|
|
96
116
|
export interface InfrastructurePlanTargetV1 {
|
|
@@ -145,11 +165,11 @@ export interface InfrastructureApprovalRecordV1 {
|
|
|
145
165
|
evidenceRefs: Readonly<Record<string, string>>;
|
|
146
166
|
expiresAt: string;
|
|
147
167
|
materialDigest: string;
|
|
148
|
-
mode: 'standing-policy' | 'human-record' | 'environment-reviewer';
|
|
168
|
+
mode: 'standing-policy' | 'human-record' | 'environment-reviewer' | 'operator-acknowledgement';
|
|
149
169
|
recordPath?: string;
|
|
150
170
|
stage: string;
|
|
151
171
|
}
|
|
152
|
-
export type InfrastructurePlanValidationCode = 'approval-invalid' | 'approval-missing' | 'diff-incomplete' | 'drift-unresolved' | 'material-plan-changed' | 'plan-expired' | 'plan-schema-invalid' | 'plan-tool-version-invalid' | 'source-change-invalid' | 'state-lock-unverified' | 'state-locked' | 'unknown-risk';
|
|
172
|
+
export type InfrastructurePlanValidationCode = 'approval-invalid' | 'approval-missing' | 'authority-envelope-changed' | 'approval-required-change' | 'diff-incomplete' | 'drift-unresolved' | 'material-plan-changed' | 'plan-expired' | 'plan-schema-invalid' | 'plan-tool-version-invalid' | 'source-change-invalid' | 'state-lock-unverified' | 'state-locked' | 'unknown-risk';
|
|
153
173
|
export interface InfrastructurePlanValidationFindingV1 {
|
|
154
174
|
code: InfrastructurePlanValidationCode;
|
|
155
175
|
detail: string;
|
|
@@ -164,6 +184,7 @@ export interface InfrastructureAuthorizationEvidenceV1 {
|
|
|
164
184
|
approval?: InfrastructureApprovalRecordV1;
|
|
165
185
|
governanceEvidenceDigests?: Readonly<Record<string, string>>;
|
|
166
186
|
kind: 'ebk-infrastructure-authorization';
|
|
187
|
+
localGovernance?: unknown;
|
|
167
188
|
plannedMaterialDigest: string;
|
|
168
189
|
recomputedMaterialDigest: string;
|
|
169
190
|
schemaVersion: typeof INFRASTRUCTURE_CHANGE_SCHEMA_VERSION;
|
|
@@ -245,7 +266,7 @@ export interface PostPlanExplanationV1 {
|
|
|
245
266
|
resourceId: string;
|
|
246
267
|
ownershipRuleRef: string;
|
|
247
268
|
}
|
|
248
|
-
export type InfrastructureOperationOutcome = 'apply-complete-unverified' | 'apply-failed-no-change' | 'apply-partial' | 'cleanup-incomplete' | 'converged' | 'recovery-required';
|
|
269
|
+
export type InfrastructureOperationOutcome = 'apply-complete-unverified' | 'refresh-complete-replan-required' | 'apply-failed-no-change' | 'apply-partial' | 'cleanup-incomplete' | 'converged' | 'recovery-required';
|
|
249
270
|
export interface InfrastructureConvergenceV1 {
|
|
250
271
|
converged: boolean;
|
|
251
272
|
findings: readonly string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../packages/nx/src/infrastructure-change/model.ts"],"names":[],"mappings":";;;AAAa,QAAA,oCAAoC,GAAG,CAAU,CAAC;AAClD,QAAA,wBAAwB,GAAG,yBAAkC,CAAC;AAC9D,QAAA,kBAAkB,GAAG,KAAc,CAAC;AACpC,QAAA,qBAAqB,GAAG,QAAiB,CAAC;AAE1C,QAAA,yBAAyB,GAAG;IACvC,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,QAAQ;IACR,MAAM;IACN,SAAS;CACD,CAAC;AAKE,QAAA,2BAA2B,GAAG;IACzC,WAAW;IACX,mBAAmB;IACnB,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,oBAAoB;IACpB,sBAAsB;IACtB,wBAAwB;IACxB,SAAS;CACD,CAAC"}
|
|
1
|
+
{"version":3,"file":"model.js","sourceRoot":"","sources":["../../../../../packages/nx/src/infrastructure-change/model.ts"],"names":[],"mappings":";;;AAAa,QAAA,oCAAoC,GAAG,CAAU,CAAC;AAClD,QAAA,wBAAwB,GAAG,yBAAkC,CAAC;AAC9D,QAAA,kBAAkB,GAAG,KAAc,CAAC;AACpC,QAAA,qBAAqB,GAAG,QAAiB,CAAC;AAE1C,QAAA,yBAAyB,GAAG;IACvC,QAAQ;IACR,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,SAAS;IACT,QAAQ;IACR,MAAM;IACN,SAAS;CACD,CAAC;AAKE,QAAA,2BAA2B,GAAG;IACzC,WAAW;IACX,mBAAmB;IACnB,mBAAmB;IACnB,uBAAuB;IACvB,yBAAyB;IACzB,oBAAoB;IACpB,sBAAsB;IACtB,wBAAwB;IACxB,SAAS;CACD,CAAC"}
|
|
@@ -6,7 +6,11 @@ import { type NormalizedSstDiffV1 } from './model.js';
|
|
|
6
6
|
* intentionally discarded so values cannot enter an EBK report.
|
|
7
7
|
*/
|
|
8
8
|
export declare function normalizeSstDiffV4_17_1(input: {
|
|
9
|
+
errorCode?: string | null;
|
|
9
10
|
exitCode: number;
|
|
11
|
+
signal?: string | null;
|
|
12
|
+
spawnError?: boolean;
|
|
13
|
+
stderr?: string;
|
|
10
14
|
stdout: string | unknown;
|
|
11
15
|
toolVersion: string;
|
|
12
16
|
}): NormalizedSstDiffV1;
|
|
@@ -32,6 +32,7 @@ const PROPERTY_DIFF_KINDS = new Set([
|
|
|
32
32
|
const REPLACEMENT_OPERATIONS = new Set([
|
|
33
33
|
'create-replacement',
|
|
34
34
|
'delete-replaced',
|
|
35
|
+
'discard-replaced',
|
|
35
36
|
'import-replacement',
|
|
36
37
|
'read-replacement',
|
|
37
38
|
'replace',
|
|
@@ -75,9 +76,12 @@ function normalizeOperation(providerOperation) {
|
|
|
75
76
|
return 'update';
|
|
76
77
|
case 'delete':
|
|
77
78
|
return 'delete';
|
|
79
|
+
case 'discard':
|
|
80
|
+
return 'discard';
|
|
78
81
|
case 'replace':
|
|
79
82
|
case 'create-replacement':
|
|
80
83
|
case 'delete-replaced':
|
|
84
|
+
case 'discard-replaced':
|
|
81
85
|
case 'read-replacement':
|
|
82
86
|
case 'import-replacement':
|
|
83
87
|
return 'replace';
|
|
@@ -89,6 +93,34 @@ function normalizeOperation(providerOperation) {
|
|
|
89
93
|
return 'unknown';
|
|
90
94
|
}
|
|
91
95
|
}
|
|
96
|
+
function compareNormalizedResources(left, right) {
|
|
97
|
+
return ((0, deterministic_order_js_1.compareUtf16)(left.logicalId, right.logicalId) ||
|
|
98
|
+
(0, deterministic_order_js_1.compareUtf16)(left.resourceType, right.resourceType) ||
|
|
99
|
+
(0, deterministic_order_js_1.compareUtf16)(left.operation, right.operation) ||
|
|
100
|
+
(0, deterministic_order_js_1.compareUtf16)(left.providerOperation, right.providerOperation) ||
|
|
101
|
+
Number(left.replacement) - Number(right.replacement) ||
|
|
102
|
+
(0, deterministic_order_js_1.compareUtf16)(left.replacementStrategy, right.replacementStrategy) ||
|
|
103
|
+
(0, deterministic_order_js_1.compareUtf16)(JSON.stringify(left.changedProperties), JSON.stringify(right.changedProperties)) ||
|
|
104
|
+
left.sourceIndex - right.sourceIndex);
|
|
105
|
+
}
|
|
106
|
+
function externalResourceLogicalId(entry, providerOperation, resourceType) {
|
|
107
|
+
const state = providerOperation === 'discard' || providerOperation === 'discard-replaced'
|
|
108
|
+
? entry['old']
|
|
109
|
+
: providerOperation === 'read' || providerOperation === 'read-replacement'
|
|
110
|
+
? entry['new']
|
|
111
|
+
: undefined;
|
|
112
|
+
if (!isRecord(state))
|
|
113
|
+
return undefined;
|
|
114
|
+
const id = state['id'];
|
|
115
|
+
if (typeof id !== 'string' || id.length === 0)
|
|
116
|
+
return undefined;
|
|
117
|
+
return `external-${(0, node_crypto_1.createHash)('sha256')
|
|
118
|
+
.update(resourceType)
|
|
119
|
+
.update('\0')
|
|
120
|
+
.update(id)
|
|
121
|
+
.digest('hex')
|
|
122
|
+
.slice(0, 24)}`;
|
|
123
|
+
}
|
|
92
124
|
function normalizeProperty(path, raw) {
|
|
93
125
|
if (!isRecord(raw)) {
|
|
94
126
|
return undefined;
|
|
@@ -138,9 +170,6 @@ function normalizeSstDiffV4_17_1(input) {
|
|
|
138
170
|
raw = [];
|
|
139
171
|
}
|
|
140
172
|
const entries = Array.isArray(raw) ? raw : [];
|
|
141
|
-
if (!Number.isSafeInteger(input.exitCode) || input.exitCode !== 0) {
|
|
142
|
-
failures.push(failure('diff-command-failed', 'SST diff did not complete with exit code zero'));
|
|
143
|
-
}
|
|
144
173
|
const resources = [];
|
|
145
174
|
for (const [sourceIndex, entry] of entries.entries()) {
|
|
146
175
|
if (!isRecord(entry)) {
|
|
@@ -188,15 +217,25 @@ function normalizeSstDiffV4_17_1(input) {
|
|
|
188
217
|
}
|
|
189
218
|
}
|
|
190
219
|
const keys = entry['keys'];
|
|
220
|
+
if (keys !== undefined &&
|
|
221
|
+
keys !== null &&
|
|
222
|
+
(!Array.isArray(keys) || !keys.every((key) => typeof key === 'string'))) {
|
|
223
|
+
failures.push(failure('diff-shape-invalid', 'replacement keys must be an array of strings when present', sourceIndex));
|
|
224
|
+
}
|
|
191
225
|
const hasReplacementKeys = Array.isArray(keys) &&
|
|
192
226
|
keys.length > 0 &&
|
|
193
227
|
keys.every((key) => typeof key === 'string');
|
|
194
228
|
const replacement = REPLACEMENT_OPERATIONS.has(providerOperation) ||
|
|
195
229
|
hasReplacementKeys ||
|
|
196
230
|
changedProperties.some((property) => property.kind.endsWith('-replace'));
|
|
231
|
+
const externalLogicalId = externalResourceLogicalId(entry, providerOperation, resourceType);
|
|
232
|
+
if (['discard', 'discard-replaced', 'read', 'read-replacement'].includes(providerOperation) &&
|
|
233
|
+
externalLogicalId === undefined) {
|
|
234
|
+
failures.push(failure('diff-shape-invalid', 'external resource operations require one exact physical identifier', sourceIndex));
|
|
235
|
+
}
|
|
197
236
|
resources.push({
|
|
198
237
|
changedProperties,
|
|
199
|
-
logicalId: logicalResourceId(urn),
|
|
238
|
+
logicalId: externalLogicalId ?? logicalResourceId(urn),
|
|
200
239
|
operation: normalizeOperation(providerOperation),
|
|
201
240
|
providerOperation,
|
|
202
241
|
replacement,
|
|
@@ -225,14 +264,15 @@ function normalizeSstDiffV4_17_1(input) {
|
|
|
225
264
|
: 'delete-before-create';
|
|
226
265
|
}
|
|
227
266
|
}
|
|
267
|
+
if (!Number.isSafeInteger(input.exitCode) || input.exitCode !== 0) {
|
|
268
|
+
failures.push(failure('diff-command-failed', 'SST diff did not produce an authorized complete command outcome'));
|
|
269
|
+
}
|
|
228
270
|
return {
|
|
229
271
|
complete: failures.length === 0,
|
|
230
272
|
diagnosticCoverage: 'exit-status-only',
|
|
231
273
|
failures,
|
|
232
274
|
kind: 'ebk-sst-diff',
|
|
233
|
-
resources: resources.sort(
|
|
234
|
-
(0, deterministic_order_js_1.compareUtf16)(left.resourceType, right.resourceType) ||
|
|
235
|
-
left.sourceIndex - right.sourceIndex),
|
|
275
|
+
resources: resources.sort(compareNormalizedResources),
|
|
236
276
|
schemaVersion: model_js_1.INFRASTRUCTURE_CHANGE_SCHEMA_VERSION,
|
|
237
277
|
sourceBoundary: 'desired-source-vs-recorded-state',
|
|
238
278
|
stateIdentityCoverage: 'not-emitted-by-diff-json',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../../../../packages/nx/src/infrastructure-change/normalize.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"normalize.js","sourceRoot":"","sources":["../../../../../packages/nx/src/infrastructure-change/normalize.ts"],"names":[],"mappings":";;AAkMA,0DAqOC;AAvaD,sEAAyD;AACzD,6CAAyC;AACzC,yCASoB;AAEpB,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,QAAQ;IACR,oBAAoB;IACpB,QAAQ;IACR,iBAAiB;IACjB,SAAS;IACT,kBAAkB;IAClB,QAAQ;IACR,oBAAoB;IACpB,MAAM;IACN,kBAAkB;IAClB,SAAS;IACT,wBAAwB;IACxB,SAAS;IACT,MAAM;IACN,QAAQ;CACT,CAAC,CAAC;AAEH,MAAM,mBAAmB,GAAG,IAAI,GAAG,CAAC;IAClC,KAAK;IACL,aAAa;IACb,QAAQ;IACR,gBAAgB;IAChB,QAAQ;IACR,gBAAgB;CACjB,CAAC,CAAC;AAEH,MAAM,sBAAsB,GAAG,IAAI,GAAG,CAAC;IACrC,oBAAoB;IACpB,iBAAiB;IACjB,kBAAkB;IAClB,oBAAoB;IACpB,kBAAkB;IAClB,SAAS;CACV,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,IAAI,GAAG,CAAC;IACpC,eAAe;IACf,YAAY;IACZ,UAAU;IACV,QAAQ;IACR,SAAS;IACT,OAAO;IACP,KAAK;IACL,KAAK;CACN,CAAC,CAAC;AAEH,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC;AAED,SAAS,iBAAiB,CAAC,GAAW;IACpC,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;IACjC,MAAM,WAAW,GAAG,QAAQ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MAAM,QAAQ,GACZ,oBAAoB,CAAC,GAAG,CACtB,GAAG,QAAQ,CAAC,SAAS,SAAS,QAAQ,CAAC,YAAY,EAAE,CACtD,IAAI,EAAE,CAAC;QACV,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC;QAC3D,MAAM,WAAW,GAAG,QAAQ,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACxD,IAAI,WAAW,IAAI,CAAC,IAAI,WAAW,IAAI,CAAC,EAAE,CAAC;YACzC,QAAQ,CAAC,mBAAmB;gBAC1B,WAAW,GAAG,WAAW;oBACvB,CAAC,CAAC,sBAAsB;oBACxB,CAAC,CAAC,sBAAsB,CAAC;QAC/B,CAAC;IACH,CAAC;IAED,IAAI,CAAC,MAAM,CAAC,aAAa,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,KAAK,CAAC,QAAQ,KAAK,CAAC,EAAE,CAAC;QAClE,QAAQ,CAAC,IAAI,CACX,OAAO,CACL,qBAAqB,EACrB,iEAAiE,CAClE,CACF,CAAC;IACJ,CAAC;IAED,OAAO;QACL,QAAQ,EAAE,QAAQ,CAAC,MAAM,KAAK,CAAC;QAC/B,kBAAkB,EAAE,kBAAkB;QACtC,QAAQ;QACR,IAAI,EAAE,cAAc;QACpB,SAAS,EAAE,SAAS,CAAC,IAAI,CAAC,0BAA0B,CAAC;QACrD,aAAa,EAAE,+CAAoC;QACnD,cAAc,EAAE,kCAAkC;QAClD,qBAAqB,EAAE,0BAA0B;QACjD,IAAI,EAAE;YACJ,IAAI,EAAE,6BAAkB;YACxB,OAAO,EAAE,gCAAqB;SAC/B;KACF,CAAC;AACJ,CAAC"}
|
|
@@ -20,9 +20,21 @@ export interface CreateInfrastructurePlanInputV1 {
|
|
|
20
20
|
versions: Readonly<Record<string, string>>;
|
|
21
21
|
}
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
23
|
+
* Returns the value-free resource projection used by plan and drift digests.
|
|
24
|
+
* SST's BucketFiles dynamic provider reports rebuilt file arrays by ephemeral
|
|
25
|
+
* list index. The committed source and release-candidate authorities bind the
|
|
26
|
+
* bytes; the plan binds the mutation kind without turning array scheduling
|
|
27
|
+
* into a new approval identity. Every unrecognized path remains exact.
|
|
28
|
+
*
|
|
29
|
+
* @internal
|
|
30
|
+
*/
|
|
31
|
+
export declare function materialNormalizedSstDiffResources(diff: NormalizedSstDiffV1): readonly unknown[];
|
|
32
|
+
/**
|
|
33
|
+
* Hashes the material plan contract. Diagnostic source positions, observation
|
|
34
|
+
* timestamps, generatedAt, expiresAt, repository, sourceCommit, and
|
|
35
|
+
* approval-record contents are intentionally excluded. Freshness, repository,
|
|
36
|
+
* source, and approval authority are validated independently immediately
|
|
37
|
+
* before apply.
|
|
26
38
|
*/
|
|
27
39
|
export declare function computeMaterialPlanDigest(plan: Omit<InfrastructurePlanV1, 'materialDigest'> | InfrastructurePlanV1): string;
|
|
28
40
|
export declare function createInfrastructurePlan(input: CreateInfrastructurePlanInputV1): InfrastructurePlanV1;
|
|
@@ -38,3 +50,18 @@ export declare function validateInfrastructurePlanForApply(input: {
|
|
|
38
50
|
recomputed: InfrastructurePlanV1;
|
|
39
51
|
sourceChangesSincePlan: readonly string[];
|
|
40
52
|
}): InfrastructurePlanValidationV1;
|
|
53
|
+
/**
|
|
54
|
+
* Validates a fresh protected-workflow plan against source-bound deployment
|
|
55
|
+
* authority. The retained provider preview remains review evidence, but
|
|
56
|
+
* provider observations are not treated as a replayable transaction. Every
|
|
57
|
+
* approval-required resource and operation in the fresh plan must have been
|
|
58
|
+
* present in the reviewed plan.
|
|
59
|
+
*/
|
|
60
|
+
export declare function validateInfrastructurePlanForProtectedApply(input: {
|
|
61
|
+
approval?: InfrastructureApprovalRecordV1;
|
|
62
|
+
environmentReviewerApproved?: boolean;
|
|
63
|
+
now: string;
|
|
64
|
+
planned: InfrastructurePlanV1;
|
|
65
|
+
recomputed: InfrastructurePlanV1;
|
|
66
|
+
sourceChangesSincePlan: readonly string[];
|
|
67
|
+
}): InfrastructurePlanValidationV1;
|