@kungfu-tech/buildchain 4.0.2 → 4.0.3-alpha.0
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/AGENTS.md +4 -4
- package/CONTRIBUTING.md +34 -0
- package/README.md +1 -1
- package/architecture/agent-change-map.md +154 -147
- package/architecture/{v4-architecture-constitution.md → architecture-constitution.md} +11 -11
- package/architecture/{v3-core-mechanism-inventory.md → baseline-core-mechanism-inventory.md} +1 -1
- package/architecture/{v4-bootstrap-authority.json → bootstrap-authority.json} +3 -3
- package/architecture/{v3-v4-capability-closure.md → capability-parity-closure.md} +3 -3
- package/architecture/{v3-v4-live-capability-inventory.json → capability-parity-live-capability-inventory.json} +4 -4
- package/architecture/{v4-capability-state-machine-manifest.json → capability-state-machine-manifest.json} +2 -2
- package/architecture/{v4-capability-state-machine-manifest.schema.json → capability-state-machine-manifest.schema.json} +2 -2
- package/architecture/ci-lane-change-budget.json +18 -0
- package/architecture/{v4-cross-platform-adopter-qualification.json → cross-platform-adopter-qualification.json} +3 -3
- package/architecture/{v4-delivery-authority-parity.json → delivery-authority-parity.json} +16 -16
- package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.json → delivery-warrant-shadow-bootstrap-plan.json} +3 -3
- package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.md → delivery-warrant-shadow-bootstrap-plan.md} +7 -7
- package/architecture/{v4-floating-consumer-policy.md → floating-consumer-policy.md} +1 -1
- package/architecture/implementation-naming.json +1273 -0
- package/architecture/internal-capabilities.json +171 -169
- package/architecture/maintainability-debt.json +87 -82
- package/architecture/maintainability-policy.json +15 -15
- package/architecture/{v4-next-development-parity.json → next-development-parity.json} +8 -8
- package/architecture/{v4-partial-mutation-recovery-qualification.json → partial-mutation-recovery-qualification.json} +8 -8
- package/architecture/{v4-platform-stage-checkpoints.json → platform-stage-checkpoints.json} +2 -2
- package/architecture/{v4-provider-operation-journal-contract.json → provider-operation-journal-contract.json} +9 -9
- package/architecture/{v4-publication-rehearsal-parity.json → publication-rehearsal-parity.json} +4 -4
- package/architecture/{v4-release-activation-shadow-domain.json → release-activation-shadow-domain.json} +8 -8
- package/architecture/{v4-release-topology.json → release-topology.json} +112 -56
- package/architecture/{v4-release-train-parity.json → release-train-parity.json} +2 -2
- package/architecture/{v4-runtime-ref-resume-authority.json → runtime-ref-resume-authority.json} +1 -1
- package/architecture/{v4-runtime-semantic-closure.json → runtime-semantic-closure.json} +2 -2
- package/architecture/{v4-rust-libnode-bridge-evaluation.json → rust-libnode-bridge-evaluation.json} +3 -3
- package/architecture/{v4-rust-libnode-bridge-spike.md → rust-libnode-bridge-spike.md} +6 -6
- package/architecture/{v4-rust-wasm-production-authority.json → rust-wasm-production-authority.json} +11 -11
- package/architecture/{v4-stable-publication-fence.json → stable-publication-fence.json} +6 -6
- package/architecture/{v4-stage-capsule-contract.json → stage-capsule-contract.json} +1 -1
- package/architecture/{v4-stage-capsule-qualification.json → stage-capsule-qualification.json} +6 -6
- package/architecture/{v4-stage-capsule-resume-planner.json → stage-capsule-resume-planner.json} +2 -2
- package/architecture/{v4-stage-capsule-store-contract.json → stage-capsule-store-contract.json} +4 -4
- package/architecture/{v4-tail-reseal-parity.json → tail-reseal-parity.json} +28 -28
- package/architecture/{v4-universal-workflow-bootstrap.json → universal-workflow-bootstrap.json} +9 -4
- package/architecture/{v4-universal-workflow-fault-campaign.json → universal-workflow-fault-campaign.json} +8 -8
- package/architecture/{v4-universal-workflow-train-admission.json → universal-workflow-train-admission.json} +8 -8
- package/architecture/workflow-taxonomy.json +11 -0
- package/bin/buildchain.mjs +3 -3
- package/bin/internal/adopter-delivery-cli.mjs +9 -9
- package/contracts/fixtures/v4-tail-reseal-v1/valid.json +1 -1
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.lock +1 -1
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/Cargo.toml +1 -1
- package/crates/{buildchain-v4-bridge → buildchain-host-bridge}/src/main.rs +3 -3
- package/dist/site/buildchain-contract.json +18 -18
- package/dist/site/buildchain-site.json +167 -71
- package/dist/site/capability-registry.json +5 -5
- package/dist/site/kfd-claims.json +226 -90
- package/dist/site/kfd-upstream-aggregate.json +1 -1
- package/dist/site/manual-registry.json +7 -7
- package/dist/site/node-api-registry.json +12929 -10491
- package/dist/site/page-registry.json +155 -59
- package/dist/site/public-surface-audit.json +65 -46
- package/dist/site/publication-authority-registry.json +27 -17
- package/dist/site/publication-registry.json +4 -4
- package/dist/site/release-provenance.json +18 -9
- package/dist/site/site-manifest.json +11 -11
- package/dist/site/workflow-registry.json +86 -52
- package/docs/MAP.md +4 -3
- package/docs/next-development-transition.md +24 -1
- package/docs/node-api-reference.md +435 -175
- package/docs/oci-publication.md +173 -0
- package/docs/publish-transaction.md +36 -3
- package/docs/release-flow.md +1 -1
- package/docs/reusable-build-surface.md +1 -1
- package/docs/v4-adopter-delivery.md +2 -2
- package/docs/v4-canonical-contracts.md +7 -7
- package/docs/v4-delivery-warrant-read-candidate.md +3 -3
- package/docs/v4-delivery-warrant-semantic-diff.md +3 -3
- package/docs/v4-production-release.md +8 -2
- package/docs/v4-publication-rehearsal.md +3 -3
- package/docs/v4-runtime-ref-resume-authority.md +2 -2
- package/docs/v4-rust-wasm-production-authority.md +6 -6
- package/docs/v4-stage-capsule.md +7 -7
- package/docs/v4-tail-reseal.md +1 -1
- package/docs/workflow-catalog.md +1 -0
- package/package.json +37 -26
- package/packages/compatibility/adopter-delivery.js +16 -0
- package/packages/compatibility/cross-platform-adopter-qualification.js +12 -0
- package/packages/compatibility/floating-consumer-policy.js +14 -0
- package/packages/compatibility/publication-qualification.js +11 -0
- package/packages/compatibility/publication-rehearsal.js +18 -0
- package/packages/compatibility/runtime-ref-resume-authority.js +13 -0
- package/packages/compatibility/tail-reseal-receipt.js +7 -0
- package/packages/compatibility/tail-reseal.js +11 -0
- package/packages/core/{v4-adopter-delivery-parity.js → adopter-delivery-parity.js} +12 -12
- package/packages/core/{v4-adopter-delivery.js → adopter-delivery.js} +24 -24
- package/packages/core/buildchain-contract.js +5 -5
- package/packages/core/buildchain-domain.wasm +0 -0
- package/packages/core/buildchain-publication-authority.js +1 -0
- package/packages/core/{v4-canonical-contracts.js → canonical-contracts.js} +32 -31
- package/packages/core/{v4-cross-platform-adopter-qualification.js → cross-platform-adopter-qualification.js} +19 -19
- package/packages/core/{v4-delivery-warrant-fixture-runner.js → delivery-warrant-fixture-runner.js} +36 -32
- package/packages/core/{v4-delivery-warrant-read-candidate.js → delivery-warrant-read-candidate.js} +40 -40
- package/packages/core/{v4-delivery-warrant-semantic-diff-gate.js → delivery-warrant-semantic-diff-gate.js} +58 -59
- package/packages/core/{v4-delivery-warrant-shadow-adapter.js → delivery-warrant-shadow-adapter.js} +15 -15
- package/packages/core/dev-delivery-execution-transfer.js +6 -6
- package/packages/core/dev-delivery-native-proof.js +12 -8
- package/packages/core/dev-delivery-warrant-legacy-recovery.js +1 -1
- package/packages/core/dev-delivery-warrant-native-compatibility.js +4 -4
- package/packages/core/dev-delivery-warrant-state.js +11 -11
- package/packages/core/dev-delivery-warrant.js +3 -3
- package/packages/core/domain-wasm-artifact.js +7 -0
- package/packages/core/{v4-domain-wasm.js → domain-wasm.js} +31 -31
- package/packages/core/{v4-floating-consumer-evidence.js → floating-consumer-evidence.js} +13 -13
- package/packages/core/{v4-floating-consumer-policy.js → floating-consumer-policy.js} +27 -29
- package/packages/core/{v4-floating-consumer-release-passport.js → floating-consumer-release-passport.js} +25 -25
- package/packages/core/index.js +4 -8
- package/packages/core/next-development-projection.js +24 -1
- package/packages/core/next-development-transition.js +5 -6
- package/packages/core/oci-compose-qualification.js +143 -0
- package/packages/core/oci-publication-bundle.js +281 -0
- package/packages/core/oci-publication-graph.js +206 -0
- package/packages/core/paper-runtime-channels.js +2 -2
- package/packages/core/paper.js +3 -3
- package/packages/core/partial-mutation-recovery-qualification.js +18 -0
- package/packages/core/{v4-platform-stage-checkpoints.js → platform-stage-checkpoints.js} +37 -37
- package/packages/core/{v4-product-publication.js → product-publication.js} +11 -9
- package/packages/core/{v4-protected-publication-source.js → protected-publication-source.js} +3 -3
- package/packages/core/provider-operation-journal.js +62 -0
- package/packages/core/{v4-provider-readback-idempotency.js → provider-readback-idempotency.js} +33 -33
- package/packages/core/public-export-compatibility.js +33 -0
- package/packages/core/publication-development.js +72 -0
- package/packages/core/{v4-publication-qualification.js → publication-qualification.js} +17 -17
- package/packages/core/{v4-publication-rehearsal-capsule.js → publication-rehearsal-capsule.js} +23 -23
- package/packages/core/publication-rehearsal-projection.js +2 -2
- package/packages/core/{v4-publication-rehearsal-provider-bindings.js → publication-rehearsal-provider-bindings.js} +4 -4
- package/packages/core/publication-rehearsal-runtime.js +21 -21
- package/packages/core/{v4-publication-rehearsal.js → publication-rehearsal.js} +33 -33
- package/packages/core/publication-sealed-bundle.js +78 -13
- package/packages/core/release-activation-shadow.js +32 -0
- package/packages/core/release-candidate.js +6 -6
- package/packages/core/{v4-release-invocation.js → release-invocation.js} +15 -15
- package/packages/core/release-passport.js +36 -36
- package/packages/core/release-tail-product-capabilities.js +9 -0
- package/packages/core/release-tail-provider-plane.js +10 -10
- package/packages/core/{v4-runtime-ref-resume-authority.js → runtime-ref-resume-authority.js} +36 -40
- package/packages/core/{v4-runtime-selector-persistence.js → runtime-selector-persistence.js} +7 -7
- package/packages/core/stable-publication-fence.js +28 -0
- package/packages/core/{v4-stage-capsule-local-store.js → stage-capsule-local-store.js} +56 -54
- package/packages/core/{v4-stage-capsule-qualification-campaign.js → stage-capsule-qualification-campaign.js} +37 -38
- package/packages/core/{v4-stage-capsule-qualification.js → stage-capsule-qualification.js} +28 -29
- package/packages/core/{v4-stage-capsule-resume-planner.js → stage-capsule-resume-planner.js} +29 -29
- package/packages/core/{v4-stage-capsule-store.js → stage-capsule-store.js} +59 -56
- package/packages/core/{v4-stage-capsule.js → stage-capsule.js} +45 -45
- package/packages/core/{v4-tail-reseal-contract.js → tail-reseal-contract.js} +6 -6
- package/packages/core/{v4-tail-reseal-github.js → tail-reseal-github.js} +12 -12
- package/packages/core/{v4-tail-reseal-receipt.js → tail-reseal-receipt.js} +22 -22
- package/packages/core/{v4-tail-reseal.js → tail-reseal.js} +29 -29
- package/packages/core/{v4-universal-workflow-bootstrap.js → universal-workflow-bootstrap.js} +23 -23
- package/scripts/{v4-architecture.mjs → architecture.mjs} +6 -6
- package/scripts/binary-publication-evidence.mjs +1 -1
- package/scripts/{v4-bridge-bootstrap.mjs → bridge-bootstrap.mjs} +14 -18
- package/scripts/{v4-bridge-evidence.mjs → bridge-evidence.mjs} +8 -8
- package/scripts/{build-v4-domain-wasm.mjs → build-domain-wasm.mjs} +6 -18
- package/scripts/{v3-v4-capability-catalog.mjs → capability-parity-catalog.mjs} +19 -19
- package/scripts/check-action-bundles.mjs +2 -2
- package/scripts/{check-v3-v4-capability-inventory.mjs → check-capability-parity-inventory.mjs} +42 -42
- package/scripts/check-core-mechanism-inventory.mjs +4 -1
- package/scripts/{check-v4-floating-consumer-policy-contract.mjs → check-floating-consumer-policy-contract.mjs} +8 -8
- package/scripts/check-implementation-naming.mjs +135 -0
- package/scripts/check-inventory.mjs +6 -5
- package/scripts/check-maintainability.mjs +9 -2
- package/scripts/{check-v4-public-dogfood-contract.mjs → check-public-dogfood-contract.mjs} +15 -15
- package/scripts/{check-v4-release-topology.mjs → check-release-topology.mjs} +53 -31
- package/scripts/{check-v4-runtime-semantic-closure.mjs → check-runtime-semantic-closure.mjs} +19 -16
- package/scripts/{check-v4-universal-workflow-bootstrap.mjs → check-universal-workflow-bootstrap.mjs} +14 -14
- package/scripts/{v4-consumer-policy.mjs → consumer-policy.mjs} +15 -15
- package/scripts/{copy-v4-domain-wasm.mjs → copy-domain-wasm.mjs} +3 -3
- package/scripts/{v4-cross-platform-adopter-qualification.mjs → cross-platform-adopter-qualification.mjs} +9 -9
- package/scripts/{v4-declarative-promotion-admission.mjs → declarative-promotion-admission.mjs} +4 -4
- package/scripts/dev-delivery-warrant-options.mjs +1 -1
- package/scripts/dev-delivery-warrant-store.mjs +29 -10
- package/scripts/dev-delivery-warrant.mjs +4 -4
- package/scripts/dev-pr-delivery-warrant.mjs +1 -1
- package/scripts/generate-channel-build-workflow.mjs +2 -2
- package/scripts/generate-channel-promotion-workflow.mjs +14 -31
- package/scripts/generate-release-candidate-passport.mjs +23 -23
- package/scripts/generate-site-bundle.mjs +17 -17
- package/scripts/{generate-v4-universal-workflow-facades.mjs → generate-universal-workflow-facades.mjs} +61 -21
- package/scripts/{v4-host-adapter.mjs → host-adapter.mjs} +1 -1
- package/scripts/implementation-references.mjs +25 -0
- package/scripts/init-repo.mjs +1 -1
- package/scripts/next-development-review.mjs +17 -11
- package/scripts/oci-compose-preview.mjs +261 -0
- package/scripts/{v4-platform-stage-checkpoint-rehearsal.mjs → platform-stage-checkpoint-rehearsal.mjs} +17 -17
- package/scripts/{v4-product-publication-intent.mjs → product-publication-intent.mjs} +16 -8
- package/scripts/publication-candidate-kind.mjs +93 -0
- package/scripts/publication-candidate-sealer.mjs +16 -1
- package/scripts/{v4-publication-rehearsal-fixture.mjs → publication-rehearsal-fixture.mjs} +5 -5
- package/scripts/{v4-publication-settlement.mjs → publication-settlement.mjs} +8 -8
- package/scripts/{v4-release-candidate-adapter.mjs → release-candidate-adapter.mjs} +4 -4
- package/scripts/release-candidate-resolver.mjs +15 -26
- package/scripts/release-tail.mjs +5 -5
- package/scripts/resume-from-candidate-run.mjs +35 -42
- package/scripts/site-capability-metadata.mjs +9 -0
- package/scripts/source-verification-evidence.mjs +7 -7
- package/scripts/{v4-stage-capsule-qualification.mjs → stage-capsule-qualification.mjs} +62 -62
- package/scripts/{v4-stage-capsule-resume-rehearsal.mjs → stage-capsule-resume-rehearsal.mjs} +6 -6
- package/scripts/{v4-tail-reseal-macos-rehearsal.mjs → tail-reseal-macos-rehearsal.mjs} +9 -9
- package/scripts/{v4-tail-reseal.mjs → tail-reseal.mjs} +19 -19
- package/scripts/universal-facade-maintainability.mjs +12 -3
- package/scripts/{v4-universal-workflow-backflow.mjs → universal-workflow-backflow.mjs} +10 -10
- package/scripts/{v4-universal-workflow-engine.mjs → universal-workflow-engine.mjs} +40 -38
- package/scripts/{v4-universal-workflow-self-dogfood.mjs → universal-workflow-self-dogfood.mjs} +12 -12
- package/scripts/verify-version-state-delta.mjs +4 -2
- package/scripts/{v4-warrant-shadow-plan.mjs → warrant-shadow-plan.mjs} +6 -6
- package/templates/universal-buildchain-bootstrap-recovery.yml +4 -4
- package/packages/core/buildchain-v4-domain.wasm +0 -0
- package/packages/core/v4-domain-wasm-artifact.js +0 -7
- package/packages/core/v4-partial-mutation-recovery-qualification.js +0 -18
- package/packages/core/v4-provider-operation-journal.js +0 -62
- package/packages/core/v4-release-activation-shadow.js +0 -32
- package/packages/core/v4-stable-publication-fence.js +0 -28
- /package/actions/{v4-release-candidate-promote → release-candidate-promote}/README.md +0 -0
- /package/architecture/{v4-adopter-delivery-parity.json → adopter-delivery-parity.json} +0 -0
- /package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json} +0 -0
- /package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json} +0 -0
- /package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-bootstrap-plan.schema.json → delivery-warrant-shadow-bootstrap-plan.schema.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-fixtures.json → delivery-warrant-shadow-fixtures.json} +0 -0
- /package/architecture/{v4-delivery-warrant-shadow-fixtures.schema.json → delivery-warrant-shadow-fixtures.schema.json} +0 -0
- /package/architecture/{v4-exception-ledger.json → exception-ledger.json} +0 -0
- /package/architecture/{v4-exception-ledger.schema.json → exception-ledger.schema.json} +0 -0
- /package/architecture/{v4-floating-consumer-policy.json → floating-consumer-policy.json} +0 -0
- /package/architecture/{v4-publication-facade-patches.json → publication-facade-patches.json} +0 -0
- /package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json} +0 -0
|
@@ -5,19 +5,19 @@ import { currentWorkflowPath } from "./workflow-taxonomy.mjs";
|
|
|
5
5
|
import path from "node:path";
|
|
6
6
|
import { execFileSync } from "node:child_process";
|
|
7
7
|
import {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
} from "../packages/core/
|
|
8
|
+
admitUniversalWorkflow,
|
|
9
|
+
completeUniversalWorkflow,
|
|
10
|
+
selectRecoveredProductPublicationVersion, productStateVersion,
|
|
11
|
+
validateUniversalWorkflowRequest,
|
|
12
|
+
universalWorkflowRequestRoot,
|
|
13
|
+
} from "../packages/core/universal-workflow-bootstrap.js";
|
|
14
14
|
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
} from "../packages/core/
|
|
20
|
-
import {
|
|
15
|
+
createReleaseInvocation,
|
|
16
|
+
createReleaseReceipt,
|
|
17
|
+
createDomainReleaseTransaction,
|
|
18
|
+
planReleaseRoute,
|
|
19
|
+
} from "../packages/core/release-invocation.js";
|
|
20
|
+
import { assertDeclarativePromotionInputs } from "../packages/core/publication-qualification.js";
|
|
21
21
|
import {
|
|
22
22
|
githubJson,
|
|
23
23
|
resolveReleaseCandidateArtifacts,
|
|
@@ -171,7 +171,7 @@ function executeBootstrapConformance(request, admission) {
|
|
|
171
171
|
const architecture = JSON.parse(
|
|
172
172
|
fs.readFileSync(
|
|
173
173
|
new URL(
|
|
174
|
-
"../architecture/
|
|
174
|
+
"../architecture/universal-workflow-bootstrap.json",
|
|
175
175
|
import.meta.url,
|
|
176
176
|
),
|
|
177
177
|
),
|
|
@@ -179,7 +179,7 @@ function executeBootstrapConformance(request, admission) {
|
|
|
179
179
|
const policy = JSON.parse(
|
|
180
180
|
fs.readFileSync(
|
|
181
181
|
new URL(
|
|
182
|
-
"../architecture/
|
|
182
|
+
"../architecture/universal-workflow-train-admission.json",
|
|
183
183
|
import.meta.url,
|
|
184
184
|
),
|
|
185
185
|
),
|
|
@@ -208,9 +208,9 @@ function executeBootstrapConformance(request, admission) {
|
|
|
208
208
|
runtime: exactRuntime(admission),
|
|
209
209
|
governedWorkflowCount: architecture.bootstrapGovernedWorkflows.length,
|
|
210
210
|
architectureRoot: rawFileRoot(
|
|
211
|
-
"architecture/
|
|
211
|
+
"architecture/universal-workflow-bootstrap.json",
|
|
212
212
|
),
|
|
213
|
-
engineRoot: rawFileRoot("scripts/
|
|
213
|
+
engineRoot: rawFileRoot("scripts/universal-workflow-engine.mjs"),
|
|
214
214
|
};
|
|
215
215
|
}
|
|
216
216
|
|
|
@@ -237,7 +237,7 @@ async function observeReleaseRoute({
|
|
|
237
237
|
});
|
|
238
238
|
comparisonStatus = comparison.status;
|
|
239
239
|
}
|
|
240
|
-
return
|
|
240
|
+
return planReleaseRoute({
|
|
241
241
|
requestedSha,
|
|
242
242
|
observedSha: currentSha,
|
|
243
243
|
comparisonStatus,
|
|
@@ -265,11 +265,11 @@ async function observedSourceTimestamp(repository, sourceSha) {
|
|
|
265
265
|
fail("protected publication source timestamp is unavailable");
|
|
266
266
|
return new Date(observed).toISOString();
|
|
267
267
|
}
|
|
268
|
-
async function observeProductPublicationRecovery(repository, sourceSha, candidateVersion) {
|
|
268
|
+
async function observeProductPublicationRecovery(repository, sourceSha, candidateVersion, channel) {
|
|
269
269
|
const apiUrl = process.env.GITHUB_API_URL || "https://api.github.com", token = process.env.GH_TOKEN || process.env.GITHUB_TOKEN || "", prefix = `heads/buildchain/v4-product-state/${sourceSha}-`;
|
|
270
270
|
const stateRefs = (await githubJson({ apiUrl, token, path: `/repos/${repository}/git/matching-refs/${prefix}`, allowNotFound: true })) || [];
|
|
271
|
-
const recoveryStates = await Promise.all(stateRefs.map(async (stateRef) => { const version =
|
|
272
|
-
const exactTagRef = recoveryStates.length ? undefined : await githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${encodeURIComponent(candidateVersion)}`, allowNotFound: true }); return { recoveryStates, exactTagRef };
|
|
271
|
+
const recoveryStates = await Promise.all(stateRefs.map(async (stateRef) => { const version = productStateVersion(stateRef, sourceSha); const [stateCommit, exactTagRef] = await Promise.all([githubJson({ apiUrl, token, path: `/repos/${repository}/git/commits/${stateRef.object.sha}` }), githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${version}`, allowNotFound: true })]); return { stateRef, stateCommit, exactTagRef }; }));
|
|
272
|
+
const exactTagRef = recoveryStates.length ? undefined : await githubJson({ apiUrl, token, path: `/repos/${repository}/git/ref/tags/v${encodeURIComponent(channel === "stable" ? candidateVersion.replace(/-alpha\.\d+$/u, "") : candidateVersion)}`, allowNotFound: true }); return { recoveryStates, exactTagRef };
|
|
273
273
|
}
|
|
274
274
|
async function materializeProductPublicationIntent({
|
|
275
275
|
candidate,
|
|
@@ -278,17 +278,17 @@ async function materializeProductPublicationIntent({
|
|
|
278
278
|
route,
|
|
279
279
|
}) {
|
|
280
280
|
const intentPath = path.resolve(
|
|
281
|
-
".buildchain/release-candidate/
|
|
281
|
+
".buildchain/release-candidate/product-publication-intent.json",
|
|
282
282
|
);
|
|
283
283
|
const sourceTimestamp = await observedSourceTimestamp(repository, route.requestedSha);
|
|
284
284
|
const version = String(candidate.publicationVersion || candidate.version || "").trim(), explicitResume = String(inputs["resume-transaction-id"] || "") !== "";
|
|
285
|
-
const recovery = route.decision !== "Resume" || explicitResume ? {} : await observeProductPublicationRecovery(repository, route.requestedSha, version);
|
|
286
|
-
const recoveredVersion =
|
|
285
|
+
const recovery = route.decision !== "Resume" || explicitResume ? {} : await observeProductPublicationRecovery(repository, route.requestedSha, version, route.channel);
|
|
286
|
+
const recoveredVersion = selectRecoveredProductPublicationVersion({ routeDecision: route.decision, candidateVersion: version, channel: route.channel, requestedSha: route.requestedSha, explicitResume, ...recovery });
|
|
287
287
|
execFileSync(
|
|
288
288
|
process.execPath,
|
|
289
289
|
[
|
|
290
290
|
path.resolve(
|
|
291
|
-
".buildchain/candidate/scripts/
|
|
291
|
+
".buildchain/candidate/scripts/product-publication-intent.mjs",
|
|
292
292
|
),
|
|
293
293
|
],
|
|
294
294
|
{
|
|
@@ -306,6 +306,7 @@ async function materializeProductPublicationIntent({
|
|
|
306
306
|
BUILDCHAIN_SEALED_BUNDLE_MANIFEST: candidate.paths.sealedBundleManifest,
|
|
307
307
|
BUILDCHAIN_REQUIRED_ARTIFACTS_PATH:
|
|
308
308
|
candidate.paths.publishRequiredArtifacts,
|
|
309
|
+
BUILDCHAIN_PUBLISH_ARTIFACT_KIND: inputs["publish-artifact-kind"] || "npm",
|
|
309
310
|
BUILDCHAIN_PUBLISH_PACKAGE_MAIN: inputs["publish-package-main"] || "",
|
|
310
311
|
BUILDCHAIN_PUBLISH_DIST_TAG: inputs["publish-dist-tag"] || "",
|
|
311
312
|
BUILDCHAIN_PRODUCT_PUBLICATION_INTENT_PATH: intentPath,
|
|
@@ -326,8 +327,8 @@ function verifiedReleaseDocuments() {
|
|
|
326
327
|
const storedReceipt = JSON.parse(
|
|
327
328
|
fs.readFileSync(path.join(base, "release-receipt.json")),
|
|
328
329
|
);
|
|
329
|
-
const invocationProjection =
|
|
330
|
-
const transactionProjection =
|
|
330
|
+
const invocationProjection = createReleaseInvocation(invocation);
|
|
331
|
+
const transactionProjection = createDomainReleaseTransaction({
|
|
331
332
|
invocationRoot: transaction.invocationRoot,
|
|
332
333
|
publisherRoot: transaction.publisherRoot,
|
|
333
334
|
runtimeRoot: transaction.runtimeRoot,
|
|
@@ -335,7 +336,7 @@ function verifiedReleaseDocuments() {
|
|
|
335
336
|
parentRoot: transaction.parentRoot,
|
|
336
337
|
});
|
|
337
338
|
const { receiptRoot, ...receipt } = storedReceipt;
|
|
338
|
-
const receiptProjection =
|
|
339
|
+
const receiptProjection = createReleaseReceipt(receipt);
|
|
339
340
|
if (
|
|
340
341
|
transaction.invocationRoot !== invocationProjection.roots.invocationRoot ||
|
|
341
342
|
transaction.transactionRoot !== transactionProjection.transactionRoot ||
|
|
@@ -362,7 +363,7 @@ async function executeReleasePromotion(request, admission) {
|
|
|
362
363
|
"release promotion inputs",
|
|
363
364
|
);
|
|
364
365
|
validateWorkflowInputs("release-candidate-promote", payload.inputs);
|
|
365
|
-
|
|
366
|
+
assertDeclarativePromotionInputs(payload.inputs);
|
|
366
367
|
const repository = request.consumer.repository;
|
|
367
368
|
const targetRef = String(payload.inputs["target-ref"] || "").replace(
|
|
368
369
|
/^refs\/heads\//u,
|
|
@@ -378,7 +379,7 @@ async function executeReleasePromotion(request, admission) {
|
|
|
378
379
|
["observedSha", "comparisonStatus"],
|
|
379
380
|
"dry-run observation",
|
|
380
381
|
);
|
|
381
|
-
route =
|
|
382
|
+
route = planReleaseRoute({
|
|
382
383
|
requestedSha,
|
|
383
384
|
observedSha: payload.dryRunObservation.observedSha,
|
|
384
385
|
comparisonStatus: payload.dryRunObservation.comparisonStatus,
|
|
@@ -449,6 +450,7 @@ async function executeReleasePromotion(request, admission) {
|
|
|
449
450
|
"candidate-build-summary-path": candidate.paths.buildSummary,
|
|
450
451
|
"stage-capsules-path": candidate.paths.stageCapsules,
|
|
451
452
|
"publication-qualification-path": candidate.paths.publicationQualification,
|
|
453
|
+
"publish-artifact-kind": payload.inputs["publish-artifact-kind"] || "npm",
|
|
452
454
|
"sealed-bundle-root": candidate.paths.sealedBundleRoot,
|
|
453
455
|
"sealed-bundle-manifest": candidate.paths.sealedBundleManifest,
|
|
454
456
|
"required-artifacts-path": candidate.paths.publishRequiredArtifacts,
|
|
@@ -482,7 +484,7 @@ async function executeReleasePromotion(request, admission) {
|
|
|
482
484
|
process.execPath,
|
|
483
485
|
[
|
|
484
486
|
path.resolve(
|
|
485
|
-
".buildchain/candidate/actions/
|
|
487
|
+
".buildchain/candidate/actions/release-candidate-promote/dist/index.js",
|
|
486
488
|
),
|
|
487
489
|
],
|
|
488
490
|
{ env: actionEnvironment(actionInputs, actionOutput), stdio: ["ignore", 2, 2] },
|
|
@@ -503,7 +505,7 @@ async function capabilityResult(request, admission) {
|
|
|
503
505
|
if (request.capability.id === "bootstrap-conformance")
|
|
504
506
|
return executeBootstrapConformance(request, admission);
|
|
505
507
|
if (request.capability.id === "release-invocation") {
|
|
506
|
-
const release =
|
|
508
|
+
const release = createReleaseInvocation(request.payload);
|
|
507
509
|
return {
|
|
508
510
|
releaseInvocation: release.invocation,
|
|
509
511
|
releaseRoots: release.roots,
|
|
@@ -515,7 +517,7 @@ async function capabilityResult(request, admission) {
|
|
|
515
517
|
}
|
|
516
518
|
async function executeCandidate(request, admission) {
|
|
517
519
|
const runtime = exactRuntime(admission);
|
|
518
|
-
if (
|
|
520
|
+
if (universalWorkflowRequestRoot(request) !== admission.requestRoot)
|
|
519
521
|
fail("candidate request does not match the admitted request root");
|
|
520
522
|
const engineSha = String(process.env.BUILDCHAIN_UNIVERSAL_ENGINE_SHA || "")
|
|
521
523
|
.trim()
|
|
@@ -554,12 +556,12 @@ const command = process.argv[2];
|
|
|
554
556
|
if (!command) fail("a command is required");
|
|
555
557
|
|
|
556
558
|
if (command === "inspect") {
|
|
557
|
-
const request =
|
|
559
|
+
const request = validateUniversalWorkflowRequest(
|
|
558
560
|
readJsonEnvironment("BUILDCHAIN_UNIVERSAL_REQUEST_JSON"),
|
|
559
561
|
);
|
|
560
562
|
emit({
|
|
561
563
|
schema: "kungfu-buildchain-v4-universal-workflow-inspection/v1",
|
|
562
|
-
requestRoot:
|
|
564
|
+
requestRoot: universalWorkflowRequestRoot(request),
|
|
563
565
|
mode: request.mode,
|
|
564
566
|
candidate: request.candidate,
|
|
565
567
|
consumer: request.consumer,
|
|
@@ -567,7 +569,7 @@ if (command === "inspect") {
|
|
|
567
569
|
});
|
|
568
570
|
} else if (command === "admit") {
|
|
569
571
|
emit(
|
|
570
|
-
|
|
572
|
+
admitUniversalWorkflow({
|
|
571
573
|
request: readJsonEnvironment("BUILDCHAIN_UNIVERSAL_REQUEST_JSON"),
|
|
572
574
|
policy: readJsonEnvironment("BUILDCHAIN_UNIVERSAL_ADMISSION_POLICY_JSON"),
|
|
573
575
|
observedRefSha: process.env.BUILDCHAIN_UNIVERSAL_OBSERVED_SHA,
|
|
@@ -583,7 +585,7 @@ if (command === "inspect") {
|
|
|
583
585
|
}),
|
|
584
586
|
);
|
|
585
587
|
} else if (command === "execute") {
|
|
586
|
-
const request =
|
|
588
|
+
const request = validateUniversalWorkflowRequest(
|
|
587
589
|
readJsonEnvironment("BUILDCHAIN_UNIVERSAL_REQUEST_JSON"),
|
|
588
590
|
);
|
|
589
591
|
const admission = readJsonEnvironment("BUILDCHAIN_UNIVERSAL_ADMISSION_JSON");
|
|
@@ -595,7 +597,7 @@ if (command === "inspect") {
|
|
|
595
597
|
requestRoot: admission.requestRoot,
|
|
596
598
|
runtime,
|
|
597
599
|
capabilityRoot: admission.capabilityRoot,
|
|
598
|
-
enginePath: "scripts/
|
|
600
|
+
enginePath: "scripts/universal-workflow-engine.mjs",
|
|
599
601
|
...execution,
|
|
600
602
|
};
|
|
601
603
|
emit({
|
|
@@ -607,7 +609,7 @@ if (command === "inspect") {
|
|
|
607
609
|
const result = readJsonEnvironment("BUILDCHAIN_UNIVERSAL_RESULT_JSON");
|
|
608
610
|
assertResultLineage(admission, result);
|
|
609
611
|
emit(
|
|
610
|
-
|
|
612
|
+
completeUniversalWorkflow({
|
|
611
613
|
admission,
|
|
612
614
|
status: result.status,
|
|
613
615
|
resultRoot: result.resultRoot,
|
package/scripts/{v4-universal-workflow-self-dogfood.mjs → universal-workflow-self-dogfood.mjs}
RENAMED
|
@@ -4,10 +4,10 @@ import fs from "node:fs";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { fileURLToPath } from "node:url";
|
|
6
6
|
import {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} from "../packages/core/
|
|
7
|
+
UNIVERSAL_WORKFLOW_REQUEST,
|
|
8
|
+
validateUniversalWorkflowRequest,
|
|
9
|
+
universalWorkflowAdmissionRoot,
|
|
10
|
+
} from "../packages/core/universal-workflow-bootstrap.js";
|
|
11
11
|
|
|
12
12
|
const SHA = /^[0-9a-f]{40}$/u;
|
|
13
13
|
|
|
@@ -38,7 +38,7 @@ function defaultPolicy() {
|
|
|
38
38
|
return JSON.parse(
|
|
39
39
|
fs.readFileSync(
|
|
40
40
|
new URL(
|
|
41
|
-
"../architecture/
|
|
41
|
+
"../architecture/universal-workflow-train-admission.json",
|
|
42
42
|
import.meta.url,
|
|
43
43
|
),
|
|
44
44
|
),
|
|
@@ -51,7 +51,7 @@ function exactSha(value, label) {
|
|
|
51
51
|
return normalized;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
export function
|
|
54
|
+
export function createUniversalSelfDogfoodRequest({
|
|
55
55
|
candidateSha,
|
|
56
56
|
consumerSha,
|
|
57
57
|
pullRequest,
|
|
@@ -90,14 +90,14 @@ export function createV4UniversalSelfDogfoodRequest({
|
|
|
90
90
|
},
|
|
91
91
|
},
|
|
92
92
|
};
|
|
93
|
-
return
|
|
94
|
-
schema:
|
|
93
|
+
return validateUniversalWorkflowRequest({
|
|
94
|
+
schema: UNIVERSAL_WORKFLOW_REQUEST,
|
|
95
95
|
mode: "train",
|
|
96
96
|
candidate: {
|
|
97
97
|
repository: "kungfu-systems/buildchain",
|
|
98
98
|
discoveryRef: "train/v4/v4.0/universal-reusable-workflow-bootstrap",
|
|
99
99
|
expectedSha,
|
|
100
|
-
admissionRoot:
|
|
100
|
+
admissionRoot: universalWorkflowAdmissionRoot(policy),
|
|
101
101
|
reviewPullRequest: pullRequest,
|
|
102
102
|
},
|
|
103
103
|
consumer: {
|
|
@@ -141,7 +141,7 @@ function exactResult(value, label, expectedSha, expectedChannel) {
|
|
|
141
141
|
return value;
|
|
142
142
|
}
|
|
143
143
|
|
|
144
|
-
export function
|
|
144
|
+
export function verifyUniversalSelfDogfoodPair({
|
|
145
145
|
primary,
|
|
146
146
|
recovery,
|
|
147
147
|
expectedSha,
|
|
@@ -177,7 +177,7 @@ function option(name) {
|
|
|
177
177
|
async function main() {
|
|
178
178
|
const command = process.argv[2];
|
|
179
179
|
if (command === "request") {
|
|
180
|
-
const request =
|
|
180
|
+
const request = createUniversalSelfDogfoodRequest({
|
|
181
181
|
candidateSha: option("candidate-sha"),
|
|
182
182
|
consumerSha: option("consumer-sha"),
|
|
183
183
|
pullRequest: Number(option("pull-request")),
|
|
@@ -187,7 +187,7 @@ async function main() {
|
|
|
187
187
|
return;
|
|
188
188
|
}
|
|
189
189
|
if (command === "verify-pair") {
|
|
190
|
-
const result =
|
|
190
|
+
const result = verifyUniversalSelfDogfoodPair({
|
|
191
191
|
primary: JSON.parse(process.env.BUILDCHAIN_PRIMARY_RESULT_JSON || ""),
|
|
192
192
|
recovery: JSON.parse(process.env.BUILDCHAIN_RECOVERY_RESULT_JSON || ""),
|
|
193
193
|
expectedSha: option("candidate-sha"),
|
|
@@ -4,7 +4,7 @@ import os from "node:os";
|
|
|
4
4
|
import path from "node:path";
|
|
5
5
|
import { execFileSync } from "node:child_process";
|
|
6
6
|
import { pathToFileURL } from "node:url";
|
|
7
|
-
import {
|
|
7
|
+
import { invokeDomainWasm } from "../packages/core/domain-wasm.js";
|
|
8
8
|
|
|
9
9
|
const execute = (command, args, options = {}) =>
|
|
10
10
|
execFileSync(command, args, {
|
|
@@ -16,6 +16,7 @@ const execute = (command, args, options = {}) =>
|
|
|
16
16
|
export function verifyVersionStateDelta({
|
|
17
17
|
baseSha,
|
|
18
18
|
headSha,
|
|
19
|
+
completedStableVersion,
|
|
19
20
|
cwd = process.cwd(),
|
|
20
21
|
nodeModules = path.resolve("node_modules"),
|
|
21
22
|
}) {
|
|
@@ -74,9 +75,10 @@ export function verifyVersionStateDelta({
|
|
|
74
75
|
);
|
|
75
76
|
}
|
|
76
77
|
const version = JSON.parse(bytes(headSha, "package.json")).version;
|
|
77
|
-
|
|
78
|
+
invokeDomainWasm("source-version-projection", {
|
|
78
79
|
baseVersion: JSON.parse(bytes(baseSha, "package.json")).version,
|
|
79
80
|
version,
|
|
81
|
+
...(completedStableVersion ? { completedStableVersion } : {}),
|
|
80
82
|
});
|
|
81
83
|
const metadata = JSON.parse(bytes(headSha, "dist/site/site-manifest.json"));
|
|
82
84
|
if (
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
submitDevDeliveryCandidate,
|
|
17
17
|
} from "../packages/core/dev-delivery-warrant.js";
|
|
18
18
|
|
|
19
|
-
const PLAN_PATH = "architecture/
|
|
19
|
+
const PLAN_PATH = "architecture/delivery-warrant-shadow-bootstrap-plan.json";
|
|
20
20
|
const PLAN_SCHEMA_PATH =
|
|
21
|
-
"architecture/
|
|
22
|
-
const FIXTURES_PATH = "architecture/
|
|
21
|
+
"architecture/delivery-warrant-shadow-bootstrap-plan.schema.json";
|
|
22
|
+
const FIXTURES_PATH = "architecture/delivery-warrant-shadow-fixtures.json";
|
|
23
23
|
const FIXTURES_SCHEMA_PATH =
|
|
24
|
-
"architecture/
|
|
25
|
-
const MANIFEST_PATH = "architecture/
|
|
26
|
-
const BOOTSTRAP_PATH = "architecture/
|
|
24
|
+
"architecture/delivery-warrant-shadow-fixtures.schema.json";
|
|
25
|
+
const MANIFEST_PATH = "architecture/capability-state-machine-manifest.json";
|
|
26
|
+
const BOOTSTRAP_PATH = "architecture/bootstrap-authority.json";
|
|
27
27
|
const ROOT_PATTERN = /^sha256:[0-9a-f]{64}$/u;
|
|
28
28
|
const REQUIRED_PRIMITIVES = [
|
|
29
29
|
"canonical-json",
|
|
@@ -125,13 +125,13 @@ jobs:
|
|
|
125
125
|
observedAt: $observed_at
|
|
126
126
|
}
|
|
127
127
|
' > .buildchain-review-evidence.json
|
|
128
|
-
BUILDCHAIN_UNIVERSAL_ADMISSION_POLICY_JSON="$(jq -c '.' .buildchain/candidate/architecture/
|
|
128
|
+
BUILDCHAIN_UNIVERSAL_ADMISSION_POLICY_JSON="$(jq -c '.' .buildchain/candidate/architecture/universal-workflow-train-admission.json)"
|
|
129
129
|
BUILDCHAIN_UNIVERSAL_REVIEW_EVIDENCE_JSON="$(jq -c '.' .buildchain-review-evidence.json)"
|
|
130
130
|
BUILDCHAIN_UNIVERSAL_OBSERVED_SHA="${EXPECTED_SHA}"
|
|
131
131
|
BUILDCHAIN_UNIVERSAL_OBSERVED_AT="${observed_at}"
|
|
132
132
|
export BUILDCHAIN_UNIVERSAL_ADMISSION_POLICY_JSON BUILDCHAIN_UNIVERSAL_REVIEW_EVIDENCE_JSON
|
|
133
133
|
export BUILDCHAIN_UNIVERSAL_OBSERVED_SHA BUILDCHAIN_UNIVERSAL_OBSERVED_AT
|
|
134
|
-
node .buildchain/candidate/scripts/
|
|
134
|
+
node .buildchain/candidate/scripts/universal-workflow-engine.mjs admit > .buildchain-admission.json
|
|
135
135
|
{
|
|
136
136
|
echo "runtime-sha=${EXPECTED_SHA}"
|
|
137
137
|
echo "admission-json=$(jq -c '.' .buildchain-admission.json)"
|
|
@@ -180,7 +180,7 @@ jobs:
|
|
|
180
180
|
GH_TOKEN: ${{ github.token }}
|
|
181
181
|
run: |
|
|
182
182
|
set -euo pipefail
|
|
183
|
-
node .buildchain/candidate/scripts/
|
|
183
|
+
node .buildchain/candidate/scripts/universal-workflow-engine.mjs execute > .buildchain-result.json
|
|
184
184
|
echo "result-json=$(jq -c '.' .buildchain-result.json)" >> "${GITHUB_OUTPUT}"
|
|
185
185
|
|
|
186
186
|
recovery-settle:
|
|
@@ -278,5 +278,5 @@ jobs:
|
|
|
278
278
|
GH_TOKEN: ${{ github.token }}
|
|
279
279
|
run: |
|
|
280
280
|
set -euo pipefail
|
|
281
|
-
node .buildchain/candidate/scripts/
|
|
281
|
+
node .buildchain/candidate/scripts/universal-workflow-backflow.mjs > .buildchain-backflow.json
|
|
282
282
|
echo "backflow-root=$(jq -r '.backflowRoot // empty' .buildchain-backflow.json)" >> "${GITHUB_OUTPUT}"
|
|
Binary file
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
// Generated by scripts/build-v4-domain-wasm.mjs.
|
|
2
|
-
export const V4_DOMAIN_WASM_ABI_VERSION = 1;
|
|
3
|
-
export const V4_DOMAIN_WASM_RUSTC = "rustc 1.96.0 (ac68faa20 2026-05-25)";
|
|
4
|
-
export const V4_DOMAIN_WASM_SOURCE_SHA256 =
|
|
5
|
-
"07d45b2767e22007d3d41fa32c8a2dba28d9c88c11a2b28863e82d54be3a2933";
|
|
6
|
-
export const V4_DOMAIN_WASM_SHA256 =
|
|
7
|
-
"b37c330e9366b7e9cf9dc4b7573b1e9495212dd9520e8b8ec6cdc3fd0ab7cafd";
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { V4ContractFault } from "./v4-canonical-contracts.js";
|
|
2
|
-
import { V4DomainWasmFault, invokeV4DomainWasm } from "./v4-domain-wasm.js";
|
|
3
|
-
|
|
4
|
-
export const V4_PARTIAL_MUTATION_RECOVERY_REQUEST_CONTRACT =
|
|
5
|
-
"buildchain-v4-partial-mutation-recovery-request/v1";
|
|
6
|
-
export const V4_PARTIAL_MUTATION_RECOVERY_PLAN_CONTRACT =
|
|
7
|
-
"buildchain-v4-partial-mutation-recovery-plan/v1";
|
|
8
|
-
|
|
9
|
-
export function planV4PartialMutationRecovery(request) {
|
|
10
|
-
try {
|
|
11
|
-
return invokeV4DomainWasm("partial-mutation-recovery", request);
|
|
12
|
-
} catch (error) {
|
|
13
|
-
if (error instanceof V4DomainWasmFault) {
|
|
14
|
-
throw new V4ContractFault(error.code, error.path, error.message);
|
|
15
|
-
}
|
|
16
|
-
throw error;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
import { V4ContractFault } from "./v4-canonical-contracts.js";
|
|
2
|
-
import { V4DomainWasmFault, invokeV4DomainWasm } from "./v4-domain-wasm.js";
|
|
3
|
-
|
|
4
|
-
export const V4_PROVIDER_OPERATION_IDENTITY_CONTRACT =
|
|
5
|
-
"buildchain-v4-provider-operation-identity/v1";
|
|
6
|
-
export const V4_PROVIDER_OPERATION_INTENT_CONTRACT =
|
|
7
|
-
"buildchain-v4-provider-operation-intent/v1";
|
|
8
|
-
export const V4_PROVIDER_OPERATION_ATTEMPT_CONTRACT =
|
|
9
|
-
"buildchain-v4-provider-operation-attempt/v1";
|
|
10
|
-
export const V4_PROVIDER_OPERATION_OBSERVATION_CONTRACT =
|
|
11
|
-
"buildchain-v4-provider-operation-observation/v1";
|
|
12
|
-
export const V4_PROVIDER_OPERATION_CONFIRMATION_CONTRACT =
|
|
13
|
-
"buildchain-v4-provider-operation-confirmation/v1";
|
|
14
|
-
export const V4_PROVIDER_OPERATION_RECONCILIATION_CONTRACT =
|
|
15
|
-
"buildchain-v4-provider-operation-reconciliation/v1";
|
|
16
|
-
export const V4_PROVIDER_OPERATION_JOURNAL_STATE_CONTRACT =
|
|
17
|
-
"buildchain-v4-provider-operation-journal-state/v1";
|
|
18
|
-
|
|
19
|
-
function invoke(operation, payload) {
|
|
20
|
-
try {
|
|
21
|
-
return invokeV4DomainWasm(operation, payload);
|
|
22
|
-
} catch (error) {
|
|
23
|
-
if (error instanceof V4DomainWasmFault) {
|
|
24
|
-
throw new V4ContractFault(error.code, error.path, error.message);
|
|
25
|
-
}
|
|
26
|
-
throw error;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function validateV4ProviderOperationIdentity(value) {
|
|
31
|
-
invoke("provider-operation-identity-validate", value);
|
|
32
|
-
return value;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
export function v4ProviderOperationRoot(identity) {
|
|
36
|
-
return invoke("provider-operation-identity-root", identity).root;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function v4ProviderOperationEntryRoot(entry) {
|
|
40
|
-
return invoke("provider-operation-entry-root", entry).root;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
export function validateV4ProviderOperationEntry(entry) {
|
|
44
|
-
invoke("provider-operation-entry-validate", entry);
|
|
45
|
-
return entry;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function foldV4ProviderOperationJournal(entries) {
|
|
49
|
-
return invoke("provider-operation-journal", entries).state;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
export function v4ProviderOperationJournalRoot(entries) {
|
|
53
|
-
return invoke("provider-operation-journal", entries).journalRoot;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
export function v4ProviderOperationJournalStateRoot(entries) {
|
|
57
|
-
return invoke("provider-operation-journal", entries).stateRoot;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
export function projectV4ProviderOperationFixtures(fixtures) {
|
|
61
|
-
return invoke("provider-operation-fixtures", fixtures);
|
|
62
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { V4ContractFault } from "./v4-canonical-contracts.js";
|
|
2
|
-
import { V4DomainWasmFault, invokeV4DomainWasm } from "./v4-domain-wasm.js";
|
|
3
|
-
|
|
4
|
-
export const V4_RELEASE_ACTIVATION_REQUEST_CONTRACT =
|
|
5
|
-
"buildchain-v4-release-activation-request/v1";
|
|
6
|
-
export const V4_RELEASE_ACTIVATION_PLAN_CONTRACT =
|
|
7
|
-
"buildchain-v4-release-activation-plan/v1";
|
|
8
|
-
export const V4_RELEASE_ACTIVATION_STATE_CONTRACT =
|
|
9
|
-
"buildchain-v4-release-activation-state/v1";
|
|
10
|
-
|
|
11
|
-
function project(request) {
|
|
12
|
-
try {
|
|
13
|
-
return invokeV4DomainWasm("release-activation", request);
|
|
14
|
-
} catch (error) {
|
|
15
|
-
if (error instanceof V4DomainWasmFault) {
|
|
16
|
-
throw new V4ContractFault(error.code, error.path, error.message);
|
|
17
|
-
}
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function planV4ReleaseActivation(request) {
|
|
23
|
-
return project(request).plan;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function foldV4ReleaseActivation(request) {
|
|
27
|
-
return project(request).state;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function projectV4ReleaseActivation(request) {
|
|
31
|
-
return project(request);
|
|
32
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { V4ContractFault } from "./v4-canonical-contracts.js";
|
|
2
|
-
import { V4DomainWasmFault, invokeV4DomainWasm } from "./v4-domain-wasm.js";
|
|
3
|
-
|
|
4
|
-
export const V4_STABLE_PUBLICATION_REQUEST_CONTRACT =
|
|
5
|
-
"buildchain-v4-stable-publication-request/v1";
|
|
6
|
-
export const V4_STABLE_PUBLICATION_PLAN_CONTRACT =
|
|
7
|
-
"buildchain-v4-stable-publication-plan/v1";
|
|
8
|
-
export const V4_STABLE_PUBLICATION_FENCE_CONTRACT =
|
|
9
|
-
"buildchain-v4-stable-publication-fence/v1";
|
|
10
|
-
|
|
11
|
-
function project(request) {
|
|
12
|
-
try {
|
|
13
|
-
return invokeV4DomainWasm("stable-publication", request);
|
|
14
|
-
} catch (error) {
|
|
15
|
-
if (error instanceof V4DomainWasmFault) {
|
|
16
|
-
throw new V4ContractFault(error.code, error.path, error.message);
|
|
17
|
-
}
|
|
18
|
-
throw error;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
export function planV4StablePublication(request) {
|
|
23
|
-
return project(request).plan;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export function projectV4StablePublication(request) {
|
|
27
|
-
return project(request);
|
|
28
|
-
}
|
|
File without changes
|
|
File without changes
|
/package/architecture/{v3-core-mechanism-inventory.json → baseline-core-mechanism-inventory.json}
RENAMED
|
File without changes
|
/package/architecture/{v4-canonical-contract-fixtures.json → canonical-contract-fixtures.json}
RENAMED
|
File without changes
|
/package/architecture/{v4-compatibility-facts-parity.json → compatibility-facts-parity.json}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/architecture/{v4-publication-facade-patches.json → publication-facade-patches.json}
RENAMED
|
File without changes
|
/package/architecture/{v4-release-invocation-fixtures.json → release-invocation-fixtures.json}
RENAMED
|
File without changes
|