gate-evm-tools 1.0.28 → 1.0.31
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 +16 -1
- package/bin/cli.js +3 -0
- package/bin/delivery.cjs +51 -0
- package/bin/manifest-bootstrap.js +4 -15
- package/bin/workflow.cjs +1 -1
- package/dist/commands/plan/file-store.d.ts.map +1 -0
- package/dist/commands/plan/generate-deployment.d.ts +48 -0
- package/dist/commands/plan/generate-deployment.d.ts.map +1 -0
- package/dist/commands/plan/generate-deployment.js +211 -0
- package/dist/commands/plan/generate-deployment.js.map +1 -0
- package/dist/commands/plan/helpers.d.ts.map +1 -0
- package/dist/commands/plan/index.d.ts +3 -0
- package/dist/commands/plan/index.d.ts.map +1 -0
- package/dist/commands/plan/index.js +88 -0
- package/dist/commands/plan/index.js.map +1 -0
- package/dist/commands/sync.js +1 -1
- package/dist/commands/sync.js.map +1 -1
- package/dist/core/BytecodeChecker.d.ts.map +1 -1
- package/dist/core/BytecodeChecker.js +27 -8
- package/dist/core/BytecodeChecker.js.map +1 -1
- package/dist/core/preparation/artifacts.d.ts +2 -0
- package/dist/core/preparation/artifacts.d.ts.map +1 -1
- package/dist/core/preparation/artifacts.js +9 -3
- package/dist/core/preparation/artifacts.js.map +1 -1
- package/dist/core/preparation/evm.d.ts +38 -2
- package/dist/core/preparation/evm.d.ts.map +1 -1
- package/dist/core/preparation/evm.js +104 -32
- package/dist/core/preparation/evm.js.map +1 -1
- package/dist/core/preparation/evmManifestSync.d.ts +63 -0
- package/dist/core/preparation/evmManifestSync.d.ts.map +1 -0
- package/dist/core/preparation/evmManifestSync.js +146 -0
- package/dist/core/preparation/evmManifestSync.js.map +1 -0
- package/dist/core/preparation/index.d.ts +40 -2
- package/dist/core/preparation/index.d.ts.map +1 -1
- package/dist/core/preparation/index.js +3 -3
- package/dist/core/preparation/index.js.map +1 -1
- package/dist/core/preparation/manifest.d.ts +15 -3
- package/dist/core/preparation/manifest.d.ts.map +1 -1
- package/dist/core/preparation/manifest.js +21 -26
- package/dist/core/preparation/manifest.js.map +1 -1
- package/dist/core/preparation/normalize.d.ts.map +1 -1
- package/dist/core/preparation/normalize.js +14 -9
- package/dist/core/preparation/normalize.js.map +1 -1
- package/dist/core/preparation/types.d.ts +7 -2
- package/dist/core/preparation/types.d.ts.map +1 -1
- package/dist/custody/hardhat-runtime.d.ts.map +1 -1
- package/dist/custody/hardhat-runtime.js +2 -0
- package/dist/custody/hardhat-runtime.js.map +1 -1
- package/dist/custody/hardhat.d.ts +1 -0
- package/dist/custody/hardhat.d.ts.map +1 -1
- package/dist/custody/hardhat.js +1 -0
- package/dist/custody/hardhat.js.map +1 -1
- package/dist/custody/index.d.ts +1 -0
- package/dist/custody/index.d.ts.map +1 -1
- package/dist/custody/index.js +1 -0
- package/dist/custody/index.js.map +1 -1
- package/dist/custody/provider-wait.d.ts +13 -0
- package/dist/custody/provider-wait.d.ts.map +1 -0
- package/dist/custody/provider-wait.js +78 -0
- package/dist/custody/provider-wait.js.map +1 -0
- package/dist/delivery/policy.d.ts +6 -0
- package/dist/delivery/policy.d.ts.map +1 -0
- package/dist/delivery/policy.js +24 -0
- package/dist/delivery/policy.js.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -1
- package/dist/sync/index.d.ts +15 -0
- package/dist/sync/index.d.ts.map +1 -1
- package/dist/sync/index.js +8 -0
- package/dist/sync/index.js.map +1 -1
- package/dist/workflow/index.d.ts +6 -1
- package/dist/workflow/index.d.ts.map +1 -1
- package/dist/workflow/index.js +4 -0
- package/dist/workflow/index.js.map +1 -1
- package/dist-cjs/core/BytecodeChecker.js +526 -0
- package/dist-cjs/core/BytecodeChecker.js.map +1 -0
- package/dist-cjs/core/legacyProxyArtifact.js +42 -0
- package/dist-cjs/core/legacyProxyArtifact.js.map +1 -0
- package/dist-cjs/core/preparation/artifacts.js +11 -4
- package/dist-cjs/core/preparation/artifacts.js.map +1 -1
- package/dist-cjs/core/preparation/evm.js +105 -32
- package/dist-cjs/core/preparation/evm.js.map +1 -1
- package/dist-cjs/core/preparation/evmManifestSync.js +155 -0
- package/dist-cjs/core/preparation/evmManifestSync.js.map +1 -0
- package/dist-cjs/core/preparation/index.js +3 -3
- package/dist-cjs/core/preparation/index.js.map +1 -1
- package/dist-cjs/core/preparation/manifest.js +23 -28
- package/dist-cjs/core/preparation/manifest.js.map +1 -1
- package/dist-cjs/core/preparation/normalize.js +14 -9
- package/dist-cjs/core/preparation/normalize.js.map +1 -1
- package/dist-cjs/custody/hardhat-runtime.js +2 -0
- package/dist-cjs/custody/hardhat-runtime.js.map +1 -1
- package/dist-cjs/custody/hardhat.js +3 -1
- package/dist-cjs/custody/hardhat.js.map +1 -1
- package/dist-cjs/custody/index.js +3 -1
- package/dist-cjs/custody/index.js.map +1 -1
- package/dist-cjs/custody/provider-wait.js +81 -0
- package/dist-cjs/custody/provider-wait.js.map +1 -0
- package/dist-cjs/delivery/policy.js +29 -0
- package/dist-cjs/delivery/policy.js.map +1 -0
- package/dist-cjs/sync/index.js +8 -0
- package/dist-cjs/sync/index.js.map +1 -1
- package/dist-cjs/workflow/index.js +12 -1
- package/dist-cjs/workflow/index.js.map +1 -1
- package/dist-runtime/config/openzeppelin.d.ts +2 -1
- package/dist-runtime/config/openzeppelin.js +2 -19
- package/dist-runtime/config/openzeppelin.js.map +1 -1
- package/dist-runtime/delivery/abi.d.ts +14 -0
- package/dist-runtime/delivery/abi.js +161 -0
- package/dist-runtime/delivery/abi.js.map +1 -0
- package/dist-runtime/delivery/aggregate-bootstrap.d.ts +12 -0
- package/dist-runtime/delivery/aggregate-bootstrap.js +40 -0
- package/dist-runtime/delivery/aggregate-bootstrap.js.map +1 -0
- package/dist-runtime/delivery/aggregate-channel.d.ts +28 -0
- package/dist-runtime/delivery/aggregate-channel.js +155 -0
- package/dist-runtime/delivery/aggregate-channel.js.map +1 -0
- package/dist-runtime/delivery/aggregate-inputs.d.ts +168 -0
- package/dist-runtime/delivery/aggregate-inputs.js +57 -0
- package/dist-runtime/delivery/aggregate-inputs.js.map +1 -0
- package/dist-runtime/delivery/aggregate-source.d.ts +25 -0
- package/dist-runtime/delivery/aggregate-source.js +79 -0
- package/dist-runtime/delivery/aggregate-source.js.map +1 -0
- package/dist-runtime/delivery/aggregate-worker.d.ts +1 -0
- package/dist-runtime/delivery/aggregate-worker.js +191 -0
- package/dist-runtime/delivery/aggregate-worker.js.map +1 -0
- package/dist-runtime/delivery/aggregate.d.ts +51 -0
- package/dist-runtime/delivery/aggregate.js +190 -0
- package/dist-runtime/delivery/aggregate.js.map +1 -0
- package/dist-runtime/delivery/bindings.d.ts +21 -0
- package/dist-runtime/delivery/bindings.js +53 -0
- package/dist-runtime/delivery/bindings.js.map +1 -0
- package/dist-runtime/delivery/check-code.d.ts +19 -0
- package/dist-runtime/delivery/check-code.js +63 -0
- package/dist-runtime/delivery/check-code.js.map +1 -0
- package/dist-runtime/delivery/closure-format.d.ts +77 -0
- package/dist-runtime/delivery/closure-format.js +225 -0
- package/dist-runtime/delivery/closure-format.js.map +1 -0
- package/dist-runtime/delivery/codec-pin.d.ts +2 -0
- package/dist-runtime/delivery/codec-pin.js +7 -0
- package/dist-runtime/delivery/codec-pin.js.map +1 -0
- package/dist-runtime/delivery/codec.d.ts +19 -0
- package/dist-runtime/delivery/codec.js +73 -0
- package/dist-runtime/delivery/codec.js.map +1 -0
- package/dist-runtime/delivery/compiler-dependency-pins.d.ts +7 -0
- package/dist-runtime/delivery/compiler-dependency-pins.js +1689 -0
- package/dist-runtime/delivery/compiler-dependency-pins.js.map +1 -0
- package/dist-runtime/delivery/compiler-files.d.ts +40 -0
- package/dist-runtime/delivery/compiler-files.js +220 -0
- package/dist-runtime/delivery/compiler-files.js.map +1 -0
- package/dist-runtime/delivery/compiler-io.d.ts +2 -0
- package/dist-runtime/delivery/compiler-io.js +13 -0
- package/dist-runtime/delivery/compiler-io.js.map +1 -0
- package/dist-runtime/delivery/compiler-pins.d.ts +10 -0
- package/dist-runtime/delivery/compiler-pins.js +147 -0
- package/dist-runtime/delivery/compiler-pins.js.map +1 -0
- package/dist-runtime/delivery/compiler.d.ts +188 -0
- package/dist-runtime/delivery/compiler.js +850 -0
- package/dist-runtime/delivery/compiler.js.map +1 -0
- package/dist-runtime/delivery/config.d.ts +48 -0
- package/dist-runtime/delivery/config.js +99 -0
- package/dist-runtime/delivery/config.js.map +1 -0
- package/dist-runtime/delivery/configuration-definition.d.ts +22 -0
- package/dist-runtime/delivery/configuration-definition.js +316 -0
- package/dist-runtime/delivery/configuration-definition.js.map +1 -0
- package/dist-runtime/delivery/configuration-hre.d.ts +17 -0
- package/dist-runtime/delivery/configuration-hre.js +198 -0
- package/dist-runtime/delivery/configuration-hre.js.map +1 -0
- package/dist-runtime/delivery/configuration-runtime.d.ts +36 -0
- package/dist-runtime/delivery/configuration-runtime.js +248 -0
- package/dist-runtime/delivery/configuration-runtime.js.map +1 -0
- package/dist-runtime/delivery/configuration.d.ts +35 -0
- package/dist-runtime/delivery/configuration.js +83 -0
- package/dist-runtime/delivery/configuration.js.map +1 -0
- package/dist-runtime/delivery/create2.d.ts +3 -0
- package/dist-runtime/delivery/create2.js +48 -0
- package/dist-runtime/delivery/create2.js.map +1 -0
- package/dist-runtime/delivery/custom-closure.d.ts +27 -0
- package/dist-runtime/delivery/custom-closure.js +818 -0
- package/dist-runtime/delivery/custom-closure.js.map +1 -0
- package/dist-runtime/delivery/custom-format.d.ts +35 -0
- package/dist-runtime/delivery/custom-format.js +383 -0
- package/dist-runtime/delivery/custom-format.js.map +1 -0
- package/dist-runtime/delivery/custom.d.ts +32 -0
- package/dist-runtime/delivery/custom.js +158 -0
- package/dist-runtime/delivery/custom.js.map +1 -0
- package/dist-runtime/delivery/data.d.ts +7 -0
- package/dist-runtime/delivery/data.js +86 -0
- package/dist-runtime/delivery/data.js.map +1 -0
- package/dist-runtime/delivery/development.d.ts +91 -0
- package/dist-runtime/delivery/development.js +395 -0
- package/dist-runtime/delivery/development.js.map +1 -0
- package/dist-runtime/delivery/engine.d.ts +9 -0
- package/dist-runtime/delivery/engine.js +23 -0
- package/dist-runtime/delivery/engine.js.map +1 -0
- package/dist-runtime/delivery/eoa-observation.d.ts +43 -0
- package/dist-runtime/delivery/eoa-observation.js +145 -0
- package/dist-runtime/delivery/eoa-observation.js.map +1 -0
- package/dist-runtime/delivery/eoa-signed.d.ts +2 -0
- package/dist-runtime/delivery/eoa-signed.js +74 -0
- package/dist-runtime/delivery/eoa-signed.js.map +1 -0
- package/dist-runtime/delivery/eoa.d.ts +81 -0
- package/dist-runtime/delivery/eoa.js +274 -0
- package/dist-runtime/delivery/eoa.js.map +1 -0
- package/dist-runtime/delivery/execution-db.d.ts +20 -0
- package/dist-runtime/delivery/execution-db.js +153 -0
- package/dist-runtime/delivery/execution-db.js.map +1 -0
- package/dist-runtime/delivery/execution-files.d.ts +9 -0
- package/dist-runtime/delivery/execution-files.js +138 -0
- package/dist-runtime/delivery/execution-files.js.map +1 -0
- package/dist-runtime/delivery/execution-model.d.ts +56 -0
- package/dist-runtime/delivery/execution-model.js +66 -0
- package/dist-runtime/delivery/execution-model.js.map +1 -0
- package/dist-runtime/delivery/execution-store.d.ts +48 -0
- package/dist-runtime/delivery/execution-store.js +361 -0
- package/dist-runtime/delivery/execution-store.js.map +1 -0
- package/dist-runtime/delivery/existing-code.d.ts +37 -0
- package/dist-runtime/delivery/existing-code.js +75 -0
- package/dist-runtime/delivery/existing-code.js.map +1 -0
- package/dist-runtime/delivery/export.d.ts +51 -0
- package/dist-runtime/delivery/export.js +69 -0
- package/dist-runtime/delivery/export.js.map +1 -0
- package/dist-runtime/delivery/forkAudit.d.ts +119 -0
- package/dist-runtime/delivery/forkAudit.js +473 -0
- package/dist-runtime/delivery/forkAudit.js.map +1 -0
- package/dist-runtime/delivery/hardhat.d.ts +3 -0
- package/dist-runtime/delivery/hardhat.js +45 -0
- package/dist-runtime/delivery/hardhat.js.map +1 -0
- package/dist-runtime/delivery/history-registration.d.ts +2 -0
- package/dist-runtime/delivery/history-registration.js +17 -0
- package/dist-runtime/delivery/history-registration.js.map +1 -0
- package/dist-runtime/delivery/identities.d.ts +22 -0
- package/dist-runtime/delivery/identities.js +97 -0
- package/dist-runtime/delivery/identities.js.map +1 -0
- package/dist-runtime/delivery/input-files.d.ts +5 -0
- package/dist-runtime/delivery/input-files.js +70 -0
- package/dist-runtime/delivery/input-files.js.map +1 -0
- package/dist-runtime/delivery/inputs.d.ts +62 -0
- package/dist-runtime/delivery/inputs.js +187 -0
- package/dist-runtime/delivery/inputs.js.map +1 -0
- package/dist-runtime/delivery/journal.d.ts +35 -0
- package/dist-runtime/delivery/journal.js +270 -0
- package/dist-runtime/delivery/journal.js.map +1 -0
- package/dist-runtime/delivery/manifest.d.ts +14 -0
- package/dist-runtime/delivery/manifest.js +68 -0
- package/dist-runtime/delivery/manifest.js.map +1 -0
- package/dist-runtime/delivery/materialization.d.ts +20 -0
- package/dist-runtime/delivery/materialization.js +138 -0
- package/dist-runtime/delivery/materialization.js.map +1 -0
- package/dist-runtime/delivery/observations.d.ts +31 -0
- package/dist-runtime/delivery/observations.js +38 -0
- package/dist-runtime/delivery/observations.js.map +1 -0
- package/dist-runtime/delivery/parameters.d.ts +53 -0
- package/dist-runtime/delivery/parameters.js +257 -0
- package/dist-runtime/delivery/parameters.js.map +1 -0
- package/dist-runtime/delivery/pending.d.ts +70 -0
- package/dist-runtime/delivery/pending.js +99 -0
- package/dist-runtime/delivery/pending.js.map +1 -0
- package/dist-runtime/delivery/plan.d.ts +50 -0
- package/dist-runtime/delivery/plan.js +209 -0
- package/dist-runtime/delivery/plan.js.map +1 -0
- package/dist-runtime/delivery/planning.d.ts +81 -0
- package/dist-runtime/delivery/planning.js +302 -0
- package/dist-runtime/delivery/planning.js.map +1 -0
- package/dist-runtime/delivery/policy.d.ts +4 -0
- package/dist-runtime/delivery/policy.js +9 -0
- package/dist-runtime/delivery/policy.js.map +1 -0
- package/dist-runtime/delivery/preparation.d.ts +6 -0
- package/dist-runtime/delivery/preparation.js +158 -0
- package/dist-runtime/delivery/preparation.js.map +1 -0
- package/dist-runtime/delivery/production-environment.d.ts +2 -0
- package/dist-runtime/delivery/production-environment.js +12 -0
- package/dist-runtime/delivery/production-environment.js.map +1 -0
- package/dist-runtime/delivery/production-finalization.d.ts +86 -0
- package/dist-runtime/delivery/production-finalization.js +278 -0
- package/dist-runtime/delivery/production-finalization.js.map +1 -0
- package/dist-runtime/delivery/production.d.ts +461 -0
- package/dist-runtime/delivery/production.js +396 -0
- package/dist-runtime/delivery/production.js.map +1 -0
- package/dist-runtime/delivery/project-files.d.ts +8 -0
- package/dist-runtime/delivery/project-files.js +82 -0
- package/dist-runtime/delivery/project-files.js.map +1 -0
- package/dist-runtime/delivery/project.d.ts +15 -0
- package/dist-runtime/delivery/project.js +157 -0
- package/dist-runtime/delivery/project.js.map +1 -0
- package/dist-runtime/delivery/protocol.d.ts +49 -0
- package/dist-runtime/delivery/protocol.js +112 -0
- package/dist-runtime/delivery/protocol.js.map +1 -0
- package/dist-runtime/delivery/references.d.ts +19 -0
- package/dist-runtime/delivery/references.js +84 -0
- package/dist-runtime/delivery/references.js.map +1 -0
- package/dist-runtime/delivery/release-graph.d.ts +93 -0
- package/dist-runtime/delivery/release-graph.js +106 -0
- package/dist-runtime/delivery/release-graph.js.map +1 -0
- package/dist-runtime/delivery/release-history-capture.d.ts +7 -0
- package/dist-runtime/delivery/release-history-capture.js +76 -0
- package/dist-runtime/delivery/release-history-capture.js.map +1 -0
- package/dist-runtime/delivery/release-history.d.ts +43 -0
- package/dist-runtime/delivery/release-history.js +246 -0
- package/dist-runtime/delivery/release-history.js.map +1 -0
- package/dist-runtime/delivery/release.d.ts +172 -0
- package/dist-runtime/delivery/release.js +209 -0
- package/dist-runtime/delivery/release.js.map +1 -0
- package/dist-runtime/delivery/safe-manifest.d.ts +9 -0
- package/dist-runtime/delivery/safe-manifest.js +13 -0
- package/dist-runtime/delivery/safe-manifest.js.map +1 -0
- package/dist-runtime/delivery/safe-observation.d.ts +30 -0
- package/dist-runtime/delivery/safe-observation.js +487 -0
- package/dist-runtime/delivery/safe-observation.js.map +1 -0
- package/dist-runtime/delivery/safe-prepare.d.ts +13 -0
- package/dist-runtime/delivery/safe-prepare.js +81 -0
- package/dist-runtime/delivery/safe-prepare.js.map +1 -0
- package/dist-runtime/delivery/safe.d.ts +91 -0
- package/dist-runtime/delivery/safe.js +243 -0
- package/dist-runtime/delivery/safe.js.map +1 -0
- package/dist-runtime/delivery/same-fork-baseline.d.ts +8 -0
- package/dist-runtime/delivery/same-fork-baseline.js +20 -0
- package/dist-runtime/delivery/same-fork-baseline.js.map +1 -0
- package/dist-runtime/delivery/setup.d.ts +31 -0
- package/dist-runtime/delivery/setup.js +215 -0
- package/dist-runtime/delivery/setup.js.map +1 -0
- package/dist-runtime/delivery/source.d.ts +41 -0
- package/dist-runtime/delivery/source.js +137 -0
- package/dist-runtime/delivery/source.js.map +1 -0
- package/dist-runtime/delivery/target-fields.d.ts +2 -0
- package/dist-runtime/delivery/target-fields.js +11 -0
- package/dist-runtime/delivery/target-fields.js.map +1 -0
- package/dist-runtime/delivery/validation.d.ts +9 -0
- package/dist-runtime/delivery/validation.js +150 -0
- package/dist-runtime/delivery/validation.js.map +1 -0
- package/dist-runtime/delivery/verification.d.ts +16 -0
- package/dist-runtime/delivery/verification.js +65 -0
- package/dist-runtime/delivery/verification.js.map +1 -0
- package/dist-runtime/migrate.js +1 -0
- package/dist-runtime/migrate.js.map +1 -1
- package/dist-runtime/miner/binary.d.ts +2 -0
- package/dist-runtime/miner/binary.js +54 -0
- package/dist-runtime/miner/binary.js.map +1 -0
- package/dist-runtime/miner/cli.d.ts +1 -0
- package/dist-runtime/miner/cli.js +131 -0
- package/dist-runtime/miner/cli.js.map +1 -0
- package/dist-runtime/miner/index.d.ts +5 -0
- package/dist-runtime/miner/index.js +13 -0
- package/dist-runtime/miner/index.js.map +1 -0
- package/dist-runtime/miner/request.d.ts +7 -0
- package/dist-runtime/miner/request.js +73 -0
- package/dist-runtime/miner/request.js.map +1 -0
- package/dist-runtime/miner/runner.d.ts +2 -0
- package/dist-runtime/miner/runner.js +131 -0
- package/dist-runtime/miner/runner.js.map +1 -0
- package/dist-runtime/miner/types.d.ts +89 -0
- package/dist-runtime/miner/types.js +3 -0
- package/dist-runtime/miner/types.js.map +1 -0
- package/dist-runtime/miner/verify.d.ts +2 -0
- package/dist-runtime/miner/verify.js +75 -0
- package/dist-runtime/miner/verify.js.map +1 -0
- package/dist-runtime/runtime-identity.json +2 -2
- package/dist-runtime/vendor/plan-codec/index.cjs +820 -0
- package/dist-runtime/vendor/plan-codec/index.d.cts +32 -0
- package/dist-runtime/vendor/plan-codec/provenance.json +24 -0
- package/dist-runtime/workflow/engine.d.ts +14 -0
- package/dist-runtime/workflow/engine.js +160 -0
- package/dist-runtime/workflow/engine.js.map +1 -0
- package/dist-runtime/workflow/lib/authority.d.ts +6 -3
- package/dist-runtime/workflow/lib/authority.js.map +1 -1
- package/dist-runtime/workflow/lib/calls.d.ts +1 -1
- package/dist-runtime/workflow/lib/calls.js +43 -34
- package/dist-runtime/workflow/lib/calls.js.map +1 -1
- package/dist-runtime/workflow/lib/canonicalData.d.ts +8 -0
- package/dist-runtime/workflow/lib/canonicalData.js +68 -0
- package/dist-runtime/workflow/lib/canonicalData.js.map +1 -0
- package/dist-runtime/workflow/lib/config.d.ts +3 -1
- package/dist-runtime/workflow/lib/config.js.map +1 -1
- package/dist-runtime/workflow/lib/context.d.ts +76 -0
- package/dist-runtime/workflow/lib/context.js +3 -0
- package/dist-runtime/workflow/lib/context.js.map +1 -0
- package/dist-runtime/workflow/lib/create2.d.ts +1 -1
- package/dist-runtime/workflow/lib/create2.js +9 -12
- package/dist-runtime/workflow/lib/create2.js.map +1 -1
- package/dist-runtime/workflow/lib/deployments.d.ts +5 -5
- package/dist-runtime/workflow/lib/deployments.js +5 -13
- package/dist-runtime/workflow/lib/deployments.js.map +1 -1
- package/dist-runtime/workflow/lib/evidencePorts.d.ts +55 -0
- package/dist-runtime/workflow/lib/evidencePorts.js +3 -0
- package/dist-runtime/workflow/lib/evidencePorts.js.map +1 -0
- package/dist-runtime/workflow/lib/executionPlan.d.ts +4 -42
- package/dist-runtime/workflow/lib/executionPlan.js +15 -210
- package/dist-runtime/workflow/lib/executionPlan.js.map +1 -1
- package/dist-runtime/workflow/lib/gateTool.d.ts +6 -2
- package/dist-runtime/workflow/lib/gateTool.js +20 -10
- package/dist-runtime/workflow/lib/gateTool.js.map +1 -1
- package/dist-runtime/workflow/lib/gateToolSync.d.ts +1 -1
- package/dist-runtime/workflow/lib/gateToolSync.js +3 -2
- package/dist-runtime/workflow/lib/gateToolSync.js.map +1 -1
- package/dist-runtime/workflow/lib/operationNames.d.ts +3 -0
- package/dist-runtime/workflow/lib/operationNames.js +34 -0
- package/dist-runtime/workflow/lib/operationNames.js.map +1 -0
- package/dist-runtime/workflow/lib/parameters.d.ts +1 -1
- package/dist-runtime/workflow/lib/parameters.js +6 -22
- package/dist-runtime/workflow/lib/parameters.js.map +1 -1
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js +18 -52
- package/dist-runtime/workflow/lib/pendingDeploymentReuse.js.map +1 -1
- package/dist-runtime/workflow/lib/pendingUupsBinding.d.ts +42 -0
- package/dist-runtime/workflow/lib/pendingUupsBinding.js +39 -0
- package/dist-runtime/workflow/lib/pendingUupsBinding.js.map +1 -0
- package/dist-runtime/workflow/lib/plan.d.ts +55 -0
- package/dist-runtime/workflow/lib/plan.js +324 -0
- package/dist-runtime/workflow/lib/plan.js.map +1 -0
- package/dist-runtime/workflow/lib/planCli.d.ts +14 -0
- package/dist-runtime/workflow/lib/planCli.js +279 -0
- package/dist-runtime/workflow/lib/planCli.js.map +1 -0
- package/dist-runtime/workflow/lib/preparationEvidence.d.ts +4 -0
- package/dist-runtime/workflow/lib/preparationEvidence.js +19 -0
- package/dist-runtime/workflow/lib/preparationEvidence.js.map +1 -0
- package/dist-runtime/workflow/lib/proxy.d.ts +3 -2
- package/dist-runtime/workflow/lib/proxy.js +3 -4
- package/dist-runtime/workflow/lib/proxy.js.map +1 -1
- package/dist-runtime/workflow/lib/runtime.d.ts +6 -0
- package/dist-runtime/workflow/lib/runtime.js +48 -0
- package/dist-runtime/workflow/lib/runtime.js.map +1 -0
- package/dist-runtime/workflow/lib/signer.d.ts +3 -2
- package/dist-runtime/workflow/lib/signer.js +18 -18
- package/dist-runtime/workflow/lib/signer.js.map +1 -1
- package/dist-runtime/workflow/lib/simulation.d.ts +13 -6
- package/dist-runtime/workflow/lib/simulation.js +39 -31
- package/dist-runtime/workflow/lib/simulation.js.map +1 -1
- package/dist-runtime/workflow/lib/state.js +3 -3
- package/dist-runtime/workflow/lib/state.js.map +1 -1
- package/dist-runtime/workflow/lib/staticValidation.d.ts +28 -0
- package/dist-runtime/workflow/lib/staticValidation.js +54 -10
- package/dist-runtime/workflow/lib/staticValidation.js.map +1 -1
- package/dist-runtime/workflow/lib/transactionPlanner.d.ts +62 -0
- package/dist-runtime/workflow/lib/transactionPlanner.js +258 -0
- package/dist-runtime/workflow/lib/transactionPlanner.js.map +1 -0
- package/dist-runtime/workflow/lib/typedValue.d.ts +3 -0
- package/dist-runtime/workflow/lib/typedValue.js +76 -0
- package/dist-runtime/workflow/lib/typedValue.js.map +1 -0
- package/dist-runtime/workflow/lib/validation.d.ts +23 -0
- package/dist-runtime/workflow/lib/validation.js +15 -0
- package/dist-runtime/workflow/lib/validation.js.map +1 -0
- package/dist-runtime/workflow/planAdd.d.ts +1 -0
- package/dist-runtime/workflow/planAdd.js +11 -0
- package/dist-runtime/workflow/planAdd.js.map +1 -0
- package/dist-runtime/workflow/planRead.d.ts +1 -0
- package/dist-runtime/workflow/planRead.js +11 -0
- package/dist-runtime/workflow/planRead.js.map +1 -0
- package/dist-runtime/workflow/planStatus.d.ts +1 -0
- package/dist-runtime/workflow/planStatus.js +11 -0
- package/dist-runtime/workflow/planStatus.js.map +1 -0
- package/dist-runtime/workflow/planWrite.d.ts +1 -0
- package/dist-runtime/workflow/planWrite.js +11 -0
- package/dist-runtime/workflow/planWrite.js.map +1 -0
- package/dist-runtime/workflow/run.d.ts +1 -40
- package/dist-runtime/workflow/run.js +68 -136
- package/dist-runtime/workflow/run.js.map +1 -1
- package/dist-runtime/workflow/staticValidate.js +8 -3
- package/dist-runtime/workflow/staticValidate.js.map +1 -1
- package/dist-runtime/workflow/steps/call.d.ts +1 -1
- package/dist-runtime/workflow/steps/check.d.ts +1 -1
- package/dist-runtime/workflow/steps/custom.d.ts +1 -1
- package/dist-runtime/workflow/steps/deploy.d.ts +1 -1
- package/dist-runtime/workflow/steps/deploy.js +57 -55
- package/dist-runtime/workflow/steps/deploy.js.map +1 -1
- package/dist-runtime/workflow/steps/upgrade.d.ts +1 -1
- package/dist-runtime/workflow/steps/upgrade.js +62 -41
- package/dist-runtime/workflow/steps/upgrade.js.map +1 -1
- package/dist-runtime/workflow/steps/view.d.ts +1 -1
- package/docs/compiler-qualification.md +32 -0
- package/docs/configuration-runtime-observation.md +29 -0
- package/docs/create2-miner.md +100 -0
- package/docs/delivery-aggregate.md +27 -0
- package/docs/delivery-custom-input-closure.md +51 -0
- package/docs/delivery-development.md +32 -0
- package/docs/delivery-eoa.md +46 -0
- package/docs/delivery-evm-manifest.md +20 -0
- package/docs/delivery-execution-store.md +33 -0
- package/docs/delivery-inputs.md +46 -0
- package/docs/delivery-parameters.md +65 -0
- package/docs/delivery-planning.md +140 -0
- package/docs/delivery-release.md +65 -0
- package/docs/delivery-safe.md +72 -0
- package/docs/delivery-setup.md +146 -0
- package/docs/delivery-source.md +67 -0
- package/docs/superpowers/plans/2026-09-24-scheme-aware-static-validation.md +193 -0
- package/docs/superpowers/plans/2026-10-28-create2-miner.md +82 -0
- package/package.json +133 -9
- package/resources/create2/LICENSE +21 -0
- package/resources/create2/README.md +9 -0
- package/resources/create2/darwin-arm64/smartflow_miner +0 -0
- package/resources/create2/darwin-x64/smartflow_miner +0 -0
- package/resources/create2/manifest.json +27 -0
- package/runtime/config/openzeppelin.ts +3 -21
- package/runtime/delivery/abi.ts +225 -0
- package/runtime/delivery/aggregate-bootstrap.ts +29 -0
- package/runtime/delivery/aggregate-channel.ts +85 -0
- package/runtime/delivery/aggregate-inputs.ts +39 -0
- package/runtime/delivery/aggregate-source.ts +53 -0
- package/runtime/delivery/aggregate-worker.ts +133 -0
- package/runtime/delivery/aggregate.ts +139 -0
- package/runtime/delivery/bindings.ts +37 -0
- package/runtime/delivery/check-code.ts +38 -0
- package/runtime/delivery/closure-format.ts +350 -0
- package/runtime/delivery/codec-pin.ts +3 -0
- package/runtime/delivery/codec.ts +50 -0
- package/runtime/delivery/compiler-dependency-pins.ts +1685 -0
- package/runtime/delivery/compiler-files.ts +179 -0
- package/runtime/delivery/compiler-io.ts +10 -0
- package/runtime/delivery/compiler-pins.ts +143 -0
- package/runtime/delivery/compiler.ts +700 -0
- package/runtime/delivery/config.ts +93 -0
- package/runtime/delivery/configuration-definition.ts +133 -0
- package/runtime/delivery/configuration-hre.ts +130 -0
- package/runtime/delivery/configuration-runtime.ts +163 -0
- package/runtime/delivery/configuration.ts +64 -0
- package/runtime/delivery/create2.ts +57 -0
- package/runtime/delivery/custom-closure.ts +993 -0
- package/runtime/delivery/custom-format.ts +464 -0
- package/runtime/delivery/custom.ts +219 -0
- package/runtime/delivery/data.ts +94 -0
- package/runtime/delivery/development.ts +262 -0
- package/runtime/delivery/engine.ts +29 -0
- package/runtime/delivery/eoa-observation.ts +106 -0
- package/runtime/delivery/eoa-signed.ts +55 -0
- package/runtime/delivery/eoa.ts +288 -0
- package/runtime/delivery/execution-db.ts +131 -0
- package/runtime/delivery/execution-files.ts +135 -0
- package/runtime/delivery/execution-model.ts +102 -0
- package/runtime/delivery/execution-store.ts +411 -0
- package/runtime/delivery/existing-code.ts +44 -0
- package/runtime/delivery/export.ts +99 -0
- package/runtime/delivery/forkAudit.ts +620 -0
- package/runtime/delivery/hardhat.ts +38 -0
- package/runtime/delivery/history-registration.ts +10 -0
- package/runtime/delivery/identities.ts +132 -0
- package/runtime/delivery/input-files.ts +46 -0
- package/runtime/delivery/inputs.ts +197 -0
- package/runtime/delivery/journal.ts +201 -0
- package/runtime/delivery/manifest.ts +54 -0
- package/runtime/delivery/materialization.ts +53 -0
- package/runtime/delivery/observations.ts +60 -0
- package/runtime/delivery/parameters.ts +349 -0
- package/runtime/delivery/pending.ts +98 -0
- package/runtime/delivery/plan.ts +337 -0
- package/runtime/delivery/planning.ts +397 -0
- package/runtime/delivery/policy.ts +9 -0
- package/runtime/delivery/preparation.ts +224 -0
- package/runtime/delivery/production-environment.ts +6 -0
- package/runtime/delivery/production-finalization.ts +172 -0
- package/runtime/delivery/production.ts +375 -0
- package/runtime/delivery/project-files.ts +58 -0
- package/runtime/delivery/project.ts +117 -0
- package/runtime/delivery/protocol.ts +94 -0
- package/runtime/delivery/references.ts +106 -0
- package/runtime/delivery/release-graph.ts +49 -0
- package/runtime/delivery/release-history-capture.ts +32 -0
- package/runtime/delivery/release-history.ts +120 -0
- package/runtime/delivery/release.ts +128 -0
- package/runtime/delivery/safe-manifest.ts +11 -0
- package/runtime/delivery/safe-observation.ts +626 -0
- package/runtime/delivery/safe-prepare.ts +101 -0
- package/runtime/delivery/safe.ts +344 -0
- package/runtime/delivery/same-fork-baseline.ts +16 -0
- package/runtime/delivery/setup.ts +172 -0
- package/runtime/delivery/source.ts +130 -0
- package/runtime/delivery/target-fields.ts +7 -0
- package/runtime/delivery/validation.ts +247 -0
- package/runtime/delivery/verification.ts +47 -0
- package/runtime/migrate.ts +1 -0
- package/runtime/miner/binary.ts +41 -0
- package/runtime/miner/cli.ts +87 -0
- package/runtime/miner/index.ts +5 -0
- package/runtime/miner/request.ts +54 -0
- package/runtime/miner/runner.ts +90 -0
- package/runtime/miner/types.ts +71 -0
- package/runtime/miner/verify.ts +61 -0
- package/runtime/vendor/plan-codec/index.cjs +820 -0
- package/runtime/vendor/plan-codec/index.d.cts +32 -0
- package/runtime/vendor/plan-codec/provenance.json +24 -0
- package/runtime/workflow/engine.ts +174 -0
- package/runtime/workflow/lib/authority.ts +3 -3
- package/runtime/workflow/lib/calls.ts +46 -37
- package/runtime/workflow/lib/canonicalData.ts +45 -0
- package/runtime/workflow/lib/config.ts +1 -1
- package/runtime/workflow/lib/context.ts +76 -0
- package/runtime/workflow/lib/create2.ts +10 -12
- package/runtime/workflow/lib/deployments.ts +6 -14
- package/runtime/workflow/lib/evidencePorts.ts +20 -0
- package/runtime/workflow/lib/executionPlan.ts +17 -268
- package/runtime/workflow/lib/gateTool.ts +20 -8
- package/runtime/workflow/lib/gateToolSync.ts +3 -3
- package/runtime/workflow/lib/operationNames.ts +32 -0
- package/runtime/workflow/lib/parameters.ts +4 -21
- package/runtime/workflow/lib/pendingDeploymentReuse.ts +4 -56
- package/runtime/workflow/lib/pendingUupsBinding.ts +43 -0
- package/runtime/workflow/lib/plan.ts +334 -0
- package/runtime/workflow/lib/planCli.ts +279 -0
- package/runtime/workflow/lib/preparationEvidence.ts +14 -0
- package/runtime/workflow/lib/proxy.ts +5 -3
- package/runtime/workflow/lib/runtime.ts +46 -0
- package/runtime/workflow/lib/signer.ts +8 -5
- package/runtime/workflow/lib/simulation.ts +41 -17
- package/runtime/workflow/lib/state.ts +3 -3
- package/runtime/workflow/lib/staticValidation.ts +92 -11
- package/runtime/workflow/lib/transactionPlanner.ts +314 -0
- package/runtime/workflow/lib/typedValue.ts +46 -0
- package/runtime/workflow/lib/validation.ts +50 -0
- package/runtime/workflow/planAdd.ts +8 -0
- package/runtime/workflow/planRead.ts +8 -0
- package/runtime/workflow/planStatus.ts +8 -0
- package/runtime/workflow/planWrite.ts +8 -0
- package/runtime/workflow/run.ts +41 -174
- package/runtime/workflow/staticValidate.ts +8 -3
- package/runtime/workflow/steps/call.ts +1 -1
- package/runtime/workflow/steps/check.ts +1 -1
- package/runtime/workflow/steps/custom.ts +1 -1
- package/runtime/workflow/steps/deploy.ts +57 -58
- package/runtime/workflow/steps/upgrade.ts +69 -46
- package/runtime/workflow/steps/view.ts +1 -1
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# Custom planning input closure (policy `gate-custom-cjs@1`)
|
|
2
|
+
|
|
3
|
+
This layer captures the actual selected custom modules, their supported static runtime graph, configuration reads, business file reads, and installed npm packages. `CustomEvidence.closure` records each evaluation's contribution; `DeliveryPlan.customInputClosure` binds the session's union into `planHash`. Native-only plans carry `null` and never initialize this loader. Ordered `resolve` observations, including changing workflow state, remain separate from immutable file inputs.
|
|
4
|
+
|
|
5
|
+
This is supported-code validation and controlled evaluation. It is not sound analysis of arbitrary JavaScript, a hostile-code sandbox, a same-UID filesystem boundary, a complete toolchain/artifact/public-configuration freeze, or `release_ready`. Compiler/artifact/OZ-layout/public-configuration and aggregate freeze belong to Task 5c.1c; durable execution and lifecycle/release qualification remain later tasks.
|
|
6
|
+
|
|
7
|
+
## Sources and evaluation
|
|
8
|
+
|
|
9
|
+
The actual selected step's `script` is a project-relative root. The TypeScript 5.9.3 AST follows imports, side-effect imports, re-exports, literal `import = require`, and direct literal `require`, including statically visible calls in branches that never execute. Explicit type-only edges are excluded. Caller-declared files are permissions for business ports, not graph-completeness declarations.
|
|
10
|
+
|
|
11
|
+
Project `.ts`, `.cts`, `.js`, `.cjs`, and imported `.json` are supported. Extensionless relative imports must have exactly one regular target among the literal name, the supported extensions, and `index` with those extensions. Explicit extensions select exactly that file. Missing or ambiguous candidates fail; there is no `.js` to `.ts` substitution, directory `package.json` main adapter, or TypeScript type-resolution authority. Module source format follows captured nearest `package.json` metadata; native `.mjs`, `.d.ts` runtime targets, `.js`/`.ts` under `type: module`, and TypeScript runtime files inside packages are unsupported.
|
|
12
|
+
|
|
13
|
+
Captured bytes are transpiled with fixed CommonJS, isolated-module, JSON interop, no helper-package injection, LF and no source-map options. The exact effective options, TypeScript version and emitted-JavaScript hashes are evidence. Source/data bytes and emitted JavaScript remain in the collector's private memory for controlled evaluation. Host `require` is never used to evaluate project or dependency code. Each session owns a VM context, frozen importer-to-target edges and a private CJS module cache. Cycles publish partial exports before evaluating the dependency, matching CJS semantics. Failed initializers are removed from the module cache while successfully loaded dependencies remain cached; an importer that catches the error can retry initialization from the same captured bytes. A graph-collection failure or an initializer error escaping the root loader makes the session terminal and cannot be sealed as a successful closure.
|
|
14
|
+
|
|
15
|
+
The supported subset rejects nonliteral/aliased loaders, runtime `import()`, `require.resolve/cache/extensions`, `module` access other than `module.exports`, `createRequire`, generated code, reflective constructor/prototype access, nonliteral computed property access, and ambient APIs. Thus ordinary deterministic helpers using direct fields, destructuring, literal indexing and array methods work; arbitrary dynamic indexing requires a future reviewed adapter. Filesystem, subprocess, network, environment, argv/cwd, clocks, randomness, native addons and HRE/signer/RPC access are unavailable. Broad `ethers` or Hardhat imports can fail because their reachable code uses those capabilities. No ambient capability is granted to make such imports pass.
|
|
16
|
+
|
|
17
|
+
Only this collector's known VM Object/Array prototypes and ordinary host own-data prototypes are normalized. Normalization checks descriptors, symbols, dense arrays and cycles; it never uses getter execution, `toJSON`, or JSON stringify coercion to accept a foreign object. Returned business data and planning results are immutable.
|
|
18
|
+
|
|
19
|
+
## Business data and configuration
|
|
20
|
+
|
|
21
|
+
`readJson` and `readBytes` require declared file names confined to the task/business root, itself inside the project. Their exact project paths and byte digests bind into both observations and closure files. No directory or glob port exists. Imports and ports both reject traversal/escape, symlink components, hardlinks and nonregular leaves. The project-files boundary checks the lexical path before following it; a business-root symlink cannot disappear through `realpath` normalization.
|
|
22
|
+
|
|
23
|
+
Session construction, target rebinding and owned-session checks validate the business directory before normalization, even when no file port is used. Lexical `.`/`..` components, outside roots and existing symlink/non-directory components reject. The supplied project-root spelling and its canonical realpath are accepted aliases (including macOS temporary-directory aliases); an unused task directory may be absent.
|
|
24
|
+
|
|
25
|
+
The shared path policy denies credentials (`.env*`, `.npmrc`, keys, wallets, certificates), generated reports/status/results/releases/handoffs/manifests, deployment state and private deployment configuration, `.gate-template.json`, raw lockfiles, and project generated/cache directories. Package code may live in its own `dist` tree, but importing sensitive files is still forbidden. Public configuration/provenance will use a separate projection, not raw business reads.
|
|
26
|
+
|
|
27
|
+
The root `tsconfig.json` is read with TypeScript JSONC parsing and compiler-option conversion through confined captured reads. Local `extends` and explicit package JSON subpaths (for example `@tsconfig/node16/tsconfig.json`) join the closure; package extends require the same lock/payload identity as runtime packages. Single-string extends is supported; external extends, extends arrays, package-directory config discovery, aliases/baseUrl/rootDirs/moduleSuffixes, custom conditions, transformers/plugins/decorators/JSX and ts-node compiler/transpiler hooks are unsupported. Runtime target, `esModuleInterop` and class-field semantics are honored; other accepted type-check/build settings cannot override the fixed transpile-only loader options. An absent config has explicit deterministic ES2022/CommonJS defaults and its absence is rechecked. Nearest package metadata and absence of closer metadata are also rechecked.
|
|
28
|
+
|
|
29
|
+
Every config file inside a package is attributed by its physical project-relative location, including `./node_modules/pkg/tsconfig.json`, package-local relative parents and relative paths into another package. Spelling a package config as a relative path does not omit its lock or complete installed payload identity.
|
|
30
|
+
|
|
31
|
+
## npm package identity
|
|
32
|
+
|
|
33
|
+
Every bare specifier resolves from its actual importer using the running Node version's default CJS resolver, in a fresh Node child with an empty environment and `--preserve-symlinks`. Node's exports/conditions are authoritative. Evidence records the exact Node version and resolver policy/flag, including the version's default conditions such as `module-sync` and `node-addons`; it does not pretend that only `require`/`node`/`default` exist. Fresh children avoid stale host path/package-json caches at sealing.
|
|
34
|
+
|
|
35
|
+
Package-internal relative edges also use Node CJS extension/index/main resolution; the project-only ambiguity policy does not replace Node package semantics. The selected runtime file must be inside a regular local npm package. Nested duplicate and hoisted/peer dependencies have their own physical project-relative `lockLocation`; ancestor/global packages, NODE_PATH, custom conditions, absolute/file/http specifiers, `#imports`, workspace/directory links, PnP, and native/ESM-only loaders are unsupported. Local npm lock v2/v3 entries must match installed package name/version, have a supported integrity value and registry or `file:...tgz` source, and not be linked/extraneous.
|
|
36
|
+
|
|
37
|
+
Each used package binds package metadata digest, `type/main/exports/imports`, lock location, name/version/integrity, safe source identity, and the complete current unpacked payload: sorted portable regular-file paths and byte hashes. Nested `node_modules` are independent identities, never merged into the parent payload. There is no blanket omission of dotfiles, documentation, tests or unused payload files. Symlinks, hardlinked/nonregular payload files and native addons fail.
|
|
38
|
+
|
|
39
|
+
Tarball SRI identifies the locked tarball; it does **not** prove installed bytes. The installed payload digest is an independent identity. Local tarball source evidence uses its SRI-derived content identity, never its host path. Registry source URLs are represented only by opaque hashes. No resolved URL, credential-bearing lock metadata, `.npmrc`, full lockfile, or absolute path is exported.
|
|
40
|
+
|
|
41
|
+
The only host preload adapter is exactly `-r ts-node/register` (or `--require`), locally installed ts-node 10.9.2 and Hardhat 2.26.3 with matching local lock versions, the actual loaded local register entry and its byte digest, and captured package metadata identities. Companion preloads, loader/condition switches, NODE_OPTIONS/NODE_PATH and TS_NODE selectors fail. The adapter's host HRE bootstrap is trusted; custom code still uses the private loader. Full adapter/toolchain payload identity belongs to 5c.1c.
|
|
42
|
+
|
|
43
|
+
## Sealing and replay
|
|
44
|
+
|
|
45
|
+
`CustomPlanningSession.sealClosure()` rehashes all captured inputs, re-resolves every edge, checks previously absent config/metadata paths, and re-enumerates every package payload. Newly closer dependencies, newly ambiguous relative candidates and added/removed unused package files therefore invalidate the session even when previously selected file bytes stayed unchanged. These are ordinary before/after drift checks, not an atomic filesystem snapshot against a hostile writer.
|
|
46
|
+
|
|
47
|
+
A session accumulates roots from actual evaluations. `forTarget()` creates target-specific ports sharing that same private immutable-input collector; later roots and data cannot be excluded by passing a caller list. The collection checks the complete union after identity revalidation and again after the asynchronous fork audit. Replay recollects/evaluates current files and compares the canonical plan; changed unexecuted helpers change the plan identity. Evidence is portable across checkout roots, uses sorted canonical framed JSON, and excludes absolute paths and mtimes. There is no detached/offline source-execution replay API in this unit.
|
|
48
|
+
|
|
49
|
+
Injected sessions must be collector-owned and bound to the collection's project/business root. The launcher calls private captured operations, so replacing a genuine object's public `evaluate` or `sealClosure` methods cannot forge evidence. A self-consistent fake session or fake evidence cannot qualify collection. Pure parsers validate persisted structure/hash relationships; they do not attest to filesystem collection by themselves.
|
|
50
|
+
|
|
51
|
+
Closure parsing requires actual string fields and one edge per `(importer, specifier, kind)` key; identical and conflicting duplicates both reject. Roots and runtime importers must be modules, and runtime targets must be modules or imported JSON. Config edges and the compiler config reference must identify config JSON; a config also imported at runtime retains the `json` file kind and remains a valid config endpoint.
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# Tool-side development delivery
|
|
2
|
+
|
|
3
|
+
`gate-evm-tools/delivery-development` exports `createDevelopmentDelivery`. It connects an actual development `collectDeliveryAggregate` result to the existing EOA execution store, read-only business verification, recoverable project materialization, and actual CheckCode. This is the tool-side development entry; GateFlow host authorization, production orchestration, Safe execution, and release publication are separate work.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
const aggregate = await collectDeliveryAggregate(source); // selection: 'development'
|
|
7
|
+
// Persist source + aggregate before sending. Resume with those original bytes.
|
|
8
|
+
const delivery = await createDevelopmentDelivery({
|
|
9
|
+
root: projectRoot, source, aggregate, target: 'localDev', hre,
|
|
10
|
+
execution: { context, store, signer, approval },
|
|
11
|
+
});
|
|
12
|
+
const result = await delivery.continue({ unsigned });
|
|
13
|
+
// Each call may sign/send one original operator transaction. Host supplies the
|
|
14
|
+
// complete type 0/1/2 envelope (nonce, gas and all fee fields); no defaults.
|
|
15
|
+
const progress = await delivery.continue();
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Use the actual project HRE loaded for the named target. Its provider is used for both execution and verification; fork HREs and fabricated HRE replacements are refused. The context is the existing EOA execution context, with immutable plan/execution/operator/chain/target identity and explicit host policy/finality. The host-injected approval capability remains mandatory for signing. Configured target confirmations are a minimum. The lifecycle does not reevaluate business modules or parameter producers to send transactions.
|
|
19
|
+
|
|
20
|
+
The method first reconciles the original durable transaction prefix. Unfinished external execution returns `waiting-external-execution`; callers can supply an explicit `hashReferences` map. Contract executors remain unsupported by the EOA observer. Missing receipts/finality remain pending. Reverted/blocked execution cannot produce acceptance.
|
|
21
|
+
|
|
22
|
+
After finality, all frozen manifest/native or emitted custom `check` calls run through the shared verify engine using `staticCall`. An empty assertion collection is not business acceptance. Assertion IDs, order, methods, ABI, addresses, typed arguments, definitions and expected values are checked against the sealed collection. Current eligible source, input files, installed runtime, effective HRE, artifacts and provider chain are rechecked.
|
|
23
|
+
|
|
24
|
+
Successful assertions permit materialization of `contractInfo.json`, `deploymentInfo.json`, an explicit per-execution `deployment.json`, and the official selected-target OpenZeppelin manifest for UUPS. The native adapter checks actual deployed bytecode, ERC-1967 implementation, official validation data and layout. Registry merges preserve unrelated entries and reject same-instance/base conflicts.
|
|
25
|
+
|
|
26
|
+
`.gate-delivery/materialization/<executionId>.json` contains the exact old/new bytes and hashes for the multi-file intent. A SQLite transaction holds the process mutex; files and intent are atomically renamed and fsynced. The `prepared` journal is durable before the first project-file replacement. Recovery accepts only recognized old/new bytes, finishes remaining file writes, and marks `committed`. A process crash releases the mutex automatically. Conflicting edits or invalid journals fail closed. Do not delete these journals to retry a deployment.
|
|
27
|
+
|
|
28
|
+
CheckCode runs `npm run compile -- --network <target>` and the installed local `gate-tool check --scheme evm --network <target> --config <effective> --output <raw>`. Each new attempt gets a unique private directory. Actual artifacts are checked before and after both compilations. The current raw report must have exactly the expected selected-network keys, matching scheme/contract/address, `matches: true` and `error: null`. UUPS requires both the business implementation entry and `<Alias>_Proxy`.
|
|
29
|
+
|
|
30
|
+
An `accepted` result includes finalized transaction observations, complete business assertions, materialization identity, official manifest evidence, and CheckCode raw/registry/metadata/effective/artifact hashes. It is persisted at `.gate-delivery/development/<executionId>.acceptance.json`. Repeated `continue()` revalidates saved evidence and original finality without signing, sending, or rerunning completed CheckCode. Raw tampering is an error, not a new successful check.
|
|
31
|
+
|
|
32
|
+
The targeted crash test covers process death after a file rename. It is not an experimental power-loss guarantee. Filesystem durability depends on the platform honoring `fsync` and atomic rename semantics. The entry is for the installed new-core project/runtime; it performs no unrelated legacy migration.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Delivery EOA execution kernel
|
|
2
|
+
|
|
3
|
+
`gate-evm-tools/delivery-eoa` consumes the existing immutable `DeliveryPlan` and shared private `ExecutionStore`. It requires the delivery toolchain's ethers 6 and Node `^22.13.0 || ^24.0.0`. It is an injected execution kernel for a trusted host, not the production host, Safe support, development acceptance, or release readiness. `delivery-export` remains independent and does not import this entry.
|
|
4
|
+
|
|
5
|
+
The host supplies the RPC transport, immutable execution context (plan, release, operator, target, chain and policy identities, explicit finality policy), a **sign-only** signer, and an approval capability. These implementations must come from controlled host code. Agent-generated code and user JSON such as `authorized: true` must never be accepted as implementations or permission. The old combined custody sign/send API is unsuitable here.
|
|
6
|
+
|
|
7
|
+
```ts
|
|
8
|
+
const execution = createDeliveryEoaExecution({
|
|
9
|
+
plan,
|
|
10
|
+
context: {
|
|
11
|
+
executionId: plan.executionId, planHash: plan.planHash,
|
|
12
|
+
chainId: plan.chainId, target: plan.target, operator: plan.operator,
|
|
13
|
+
releaseHash: hostReleaseHash, policyHash: hostPolicyHash,
|
|
14
|
+
finality: { kind: 'confirmations', depth: '12' },
|
|
15
|
+
// Or { kind: 'rpc_finalized' }; unsupported RPC never falls back.
|
|
16
|
+
},
|
|
17
|
+
store, // openExecutionStore({ trustedRoot: hostSharedPrivateRoot })
|
|
18
|
+
provider: { request: (method, params) => hostRpc.send(method, [...params]) },
|
|
19
|
+
signer: hostSignOnlySigner,
|
|
20
|
+
approval: hostApprovalCapability,
|
|
21
|
+
});
|
|
22
|
+
await execution.execute(completeUnsignedEnvelope);
|
|
23
|
+
await execution.reconcile({ [externalTransactionId]: [explicitTransactionHash] });
|
|
24
|
+
const artifact = await execution.export();
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
`execute` handles one active contiguous operator transaction. Supply every `UnsignedEnvelope` field, including decimal-string nonce, gas, fees, exact value/data, explicit transaction type and access list; inapplicable fees are explicitly `null`. Types 0, 1 and 2 and EOA `operation: 0` are supported. Chain, signer and full envelope are verified against the plan. The signer must match the approved operator, and the executor must have empty code. No business script reruns, route changes, implicit export, or gas/nonce defaults occur.
|
|
28
|
+
|
|
29
|
+
The store freezes and reserves the envelope before the approval capability receives its complete immutable snapshot: context, exact plan transaction, frozen envelope and deterministic signing request ID. This snapshot is reproducible from the immutable context (bound by the durable context hash), durable plan and frozen envelope. The request ID commits to all those fields and cannot change after intent. `withApproval(snapshot, controlledWork)` must validate the whole snapshot and **await** `controlledWork()` while its authority remains active. Throw to deny. The kernel fences continuation if the approval scope ends during awaited signing. The store's lifetime claim remains held through all controlled work.
|
|
30
|
+
|
|
31
|
+
`sign(requestId, unsigned)` must only sign and durably retain its result under that ID. It must never broadcast. The kernel records signing intent first, decodes the actual signed RLP, recovers the signer, compares every frozen field using exact quantities, and durably commits the original bytes/hash before recording submission intent and calling `eth_sendRawTransaction`. A wrong returned hash is an error and never changes the original identity.
|
|
32
|
+
|
|
33
|
+
Recovery is deliberately finite:
|
|
34
|
+
|
|
35
|
+
- `signing`: only `signer.recover(requestId)` may retrieve the original result. This is a read-only lookup, never fresh signing. Missing recovery returns `signing-result-unavailable`.
|
|
36
|
+
- `signed`: after renewed exact approval/validation, submit the durable original bytes once.
|
|
37
|
+
- `submission-uncertain` or `included-unfinalized`: query only the original hash; missing transaction/receipt remains pending. Never resign or resend, even if submission intent was recorded just before a process died without sending.
|
|
38
|
+
- External work: provide explicit hash sets by transaction ID to `reconcile`. It never scans blocks. More than one matching included hash is ambiguous and requires a single reference.
|
|
39
|
+
|
|
40
|
+
`observeEoaTransaction` is a read-only producer for controlled hosts. It verifies RPC chain, full transaction/receipt identity, exact value/data, canonical block height/hash/index inclusion, executor code at that block, and the configured finality. Operator records additionally match the complete frozen envelope and original signature. Missing transactions, receipts or canonical blocks never prove success. Reverts never advance the prefix. Unknown permissions, unavailable signers, unsupported executors/operations, RPC failures and verification mismatches produce explicit errors; they do not authorize another route.
|
|
41
|
+
|
|
42
|
+
Only finalized success advances the contiguous prefix. A transaction hash cannot complete two entries, even if their calls are identical. Unfinalized observations can be reread after reorg/reblock. Every later execution, advancement and trusted-progress export rechecks already-finalized observations; loss of canonical finalized evidence permanently blocks this execution in the store. A transport exception stops the current call without inventing a finality loss. There is no automatic unblock, resubmission, block scanner, persistent scan checkpoint, or Safe adapter.
|
|
43
|
+
|
|
44
|
+
The store's business schema advances from version 1 to version 2 by adding only nullable `executions.blocked_reason`. The verified version 1 schema, existing records, original byte identities and nonce reservations are retained inside the same transactional migration. The authority database/protocol is unchanged. `blockExecution` is a structural store operation for trusted verifiers, not independent chain proof.
|
|
45
|
+
|
|
46
|
+
The focused test `test/delivery-eoa.test.mjs` covers actual ethers signatures, precision, controlled approval/send ordering, hash verification, finality loss and the three new signing/submission process crash boundaries. `test/integration/delivery-eoa.test.mjs` runs one disposable local EOA operator → external-hash → operator scenario with transfers and no contract compilation. These checks do not imply real-chain acceptance or production-host authorization.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# EVM explicit target manifest seam
|
|
2
|
+
|
|
3
|
+
`syncWithHre(options, hre, root)` routes EVM requests with `target` to the explicit project registry. The root must match the HRE project, the network and target must match the active HRE network, and the configured chain ID must match the provider. `config.yaml` selects `.openzeppelin.dev` or the configured production directory. A provider's Hardhat/Anvil metadata does not redirect this path to an OS temporary manifest. No-target EVM sync retains its legacy implementation.
|
|
4
|
+
|
|
5
|
+
Sync compiles and validates the candidate with official OpenZeppelin `getDeployData` and `assertUpgradeSafe`, reads the real ERC-1967 implementation, checks proxy/implementation code, and matches the artifact runtime using compiler immutable references. Reads use the active HRE provider. The implementation key is `version.linkedWithoutMetadata`, including encoded constructor arguments. Layout evidence is the full canonical SHA-256, including namespaces and nested metadata.
|
|
6
|
+
|
|
7
|
+
The existing manifest transaction confines paths, rejects simultaneous canonical/fallback files, and restores original filenames and bytes after ordinary failures. Sync preserves unrelated implementations, admin and proxy kinds; a conflicting proxy kind or same-version layout is refused. A second implementation address for the same version is added to `allAddresses`, preserving the original primary address and deployment hash. A supplied transaction hash fills a missing deployment hash only when its successful receipt proves creation of that implementation. Upgrade receipts are never used for that field. `skipTxHash` skips receipt lookup; immutable workflow evidence binds the actual upgrade receipt separately.
|
|
8
|
+
|
|
9
|
+
Canonical EVM UUPS preparation reads the registered UUPS proxy and current implementation layout from the explicit target registry before calling `assertStorageUpgradeSafe`. It uses official implementation validation and the full namespace-aware layout. It refuses missing baselines. The low-level adapter's documented validation/evidence dependency is a test seam; `prepareWorkflow` always uses the official default and has no request field to bypass storage checks.
|
|
10
|
+
|
|
11
|
+
Run the packed integration fixture from EvmGateTools:
|
|
12
|
+
|
|
13
|
+
```sh
|
|
14
|
+
npm run build
|
|
15
|
+
node --test test/integration/evm-target-manifest.test.mjs
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
The fixture generates a core project through the sibling generator, installs actual packed dependencies offline, and starts an ordinary loopback Hardhat node. It deploys V1/proxy directly for this seam test, syncs dev and prod in separate processes on chain 31337, checks official version/layout/namespace evidence, repeats sync with a same-version deployment, and prepares compatible V2. Ordinary and namespaced incompatible storage and unsafe implementation validation are rejected. Preparation preserves manifests, file inventory and block height; the OpenZeppelin temporary manifest remains untouched. Focused unit tests cover rollback, fallback migration, conflicts, path refusal and receipt semantics.
|
|
19
|
+
|
|
20
|
+
This acceptance does not establish the full CREATE2/multicall lifecycle, execution engine, journal-provided baselines, release readiness, or crash-durable registry promotion. Those are separate delivery tasks.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# Delivery export and durable execution records
|
|
2
|
+
|
|
3
|
+
`gate-evm-tools/delivery-export` exports the existing immutable `DeliveryPlan` without running business code, preparation, execution, HRE, a signer or a provider. `renderDeliveryExport(plan)` is synchronous and has no filesystem or chain effects. JSON and Markdown contain the same complete canonical model, including all transactions, references and total-order dependencies, plus a separate current contiguous route/executor segment. Success means artifact delivery, not deployment or release readiness.
|
|
4
|
+
|
|
5
|
+
Completed progress requires `validateDeliveryProgress({plan, completed, finalized})`, where `completed` contains observation references and `finalized.readFinalized` is a trusted host-owned canonical/finality query. Its live opaque result can be passed to `renderDeliveryExport`. Serialization or copying loses provenance. `exportDelivery` is a convenience wrapper that resolves provenance before rendering. Structural plan/receipt parsing grants no host authorization. No release binding is invented here.
|
|
6
|
+
|
|
7
|
+
`gate-evm-tools/delivery-execution-store` lazily loads `node:sqlite` when `openExecutionStore` is called and requires Node `^22.13.0 || ^24.0.0`. Global package engines are unchanged. The trusted host and CLI must select the **same private local store root across projects and environments**. No project-local default or network filesystem support is provided. The root must be a canonical absolute path without symlink components, owned by the user with mode 0700. A missing final directory can be created only beneath a private parent. Fixed 0600 database files cannot be replaced, linked or aliased.
|
|
8
|
+
|
|
9
|
+
The store keeps a private `authority.sqlite` BEGIN IMMEDIATE lock across the complete awaited claim callback. One session runs globally, including across different nonces. A timeout reports busy; it never grants takeover. Short business commits use a distinct `execution.sqlite`, DELETE journaling, synchronous EXTRA, macOS fullfsync and strict directory synchronization. A UUID and initializing/ready bootstrap marker distinguish interrupted initialization from a missing/truncated established database. SQLite owns hot-journal recovery; this implementation never deletes journals or replaces the authority inode.
|
|
10
|
+
|
|
11
|
+
Typical host flow:
|
|
12
|
+
|
|
13
|
+
```ts
|
|
14
|
+
const store = await openExecutionStore({ trustedRoot: hostSharedStoreRoot });
|
|
15
|
+
const previous = await store.readExecution(plan.executionId);
|
|
16
|
+
await store.withExecutionClaim({
|
|
17
|
+
plan, contextHash: immutableHostContextHash,
|
|
18
|
+
expectedRevision: previous?.revision ?? null,
|
|
19
|
+
}, async (claim, snapshot) => {
|
|
20
|
+
snapshot = store.freezeAndReserve(claim, snapshot.revision, transactionId, unsigned);
|
|
21
|
+
// Later signing/broadcast adapters must be awaited inside this scope.
|
|
22
|
+
});
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
`contextHash` identifies immutable execution context, independently of transaction approval. Each transaction freezes its own full unsigned envelope and digest without resealing the business plan. The same execution can wait for external finalized progress and freeze a later transaction. Reservations are permanent and unique by exact canonical chain/signer/nonce across all aliases, environments and executions in this store. Chain, nonce, value, gas, fees, heights, revisions and epochs use decimal strings/BigInt; bounded transaction indexes and types remain numbers.
|
|
26
|
+
|
|
27
|
+
Every mutation requires the original live claim, current revision/epoch and active transaction. Callback settlement/failure revokes the claim and closes its original connections. `markSigning` persists intent once; reopened signing uncertainty is **not permission to sign again**. `commitSigned` stores exactly one canonical byte record. It does not decode the signature, recover the signer or certify that the bytes match the unsigned envelope. `recordSubmissionIntent` persists uncertainty; it does not send or authorize resend. Signing, cryptographic checks, broadcasting and EOA/Safe reconciliation belong to subsequent units.
|
|
28
|
+
|
|
29
|
+
`recordObservation` accepts an observation reference and a trusted host-owned `readObservation` port, not caller JSON. The port must establish transaction identity, canonical inclusion, execution outcome and configured finality. Only finalized success advances the contiguous prefix; inclusion and revert never permit skipping. Port implementations and signing approvals must not be supplied by agent-generated code. Store snapshots are data, not proof of chain finality or send capabilities.
|
|
30
|
+
|
|
31
|
+
A SQL commit/directory-sync error may leave the original record committed. The live claim is fenced and no durable result is returned; recovery reacquires the lock and rereads original identities, nonce reservations and signed bytes. Do not infer an absent receipt or an uncertain response permits another signature. Tests cover actual process crashes, kernel locking and response loss; they are not power-loss experiments. Durability relies on the documented local-filesystem locking/sync contract.
|
|
32
|
+
|
|
33
|
+
EOA signing and trusted hash reconciliation are provided separately by [`delivery-eoa`](delivery-eoa.md). Business schema version 2 adds a durable execution-level finality block while retaining version 1 records and reservations; the authority protocol is unchanged. `blockedReason` prevents further mutations after a trusted verifier detects lost finalized progress.
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Owned delivery business inputs
|
|
2
|
+
|
|
3
|
+
`gate-evm-tools/delivery-inputs` reads an actual core-project handoff and its business files. It provides an immutable business-input snapshot and owned parameter receipts. It does **not** qualify an aggregate plan, grant an execution action, or create a release. Full effective config/HRE correspondence, runtime package identity and the multi-target staging owner are separate gates.
|
|
4
|
+
|
|
5
|
+
```ts
|
|
6
|
+
import { openDeliveryInputs, consumeDeliveryInputParameters } from 'gate-evm-tools/delivery-inputs';
|
|
7
|
+
|
|
8
|
+
const inputs = openDeliveryInputs({
|
|
9
|
+
workspaceRoot: '/workspace',
|
|
10
|
+
projectRoot: 'contracts/vault',
|
|
11
|
+
request, // The strict delivery request identifying the actual handoff invocation.
|
|
12
|
+
selection: 'development',
|
|
13
|
+
});
|
|
14
|
+
const parameters = inputs.values('localDev'); // Immutable planning inputs.
|
|
15
|
+
const receipt = inputs.parameters('localDev');
|
|
16
|
+
const evidence = inputs.seal(); // Terminal rereads only; no producer invocation.
|
|
17
|
+
const sameParameters = consumeDeliveryInputParameters(receipt);
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
The handoff invocation supplies `deploymentId`, `developmentNetwork` and `releaseTargetNetworks`. The reader derives `scripts/tasks/<deploymentId>/`, the ordered manifest steps, upstream canonical definitions and the selected target set. It accepts no caller steps, hashes, source roots, target objects, parameter overrides or pre-parsed documents. Canonical definitions exclude progress and unrelated tasks. Final rereading checks the current invocation's eligibility and the same business definitions. Dependencies may refer to another deployment package in the same project.
|
|
21
|
+
|
|
22
|
+
`selection: 'development'` requires complete values and provenance for the development target only. `release` requires every declared production target; `all` requires development and every production target. Selection controls data coverage. It does not authorize any additional invocation, environment or target action.
|
|
23
|
+
|
|
24
|
+
The new file contract is:
|
|
25
|
+
|
|
26
|
+
| File below the task directory | Shape |
|
|
27
|
+
| --- | --- |
|
|
28
|
+
| `task.yaml` | `{version: 1, id, developmentNetwork, releaseTargetNetworks}`; must match the actual handoff deployment scope |
|
|
29
|
+
| `manifest.yaml` | `{id, description?, steps}`; steps retain their source order |
|
|
30
|
+
| `parameters.schema.json` | Strict draft-07 schema with the existing leaf policies |
|
|
31
|
+
| `parameters.yaml` | `{params: {<target>: <complete values>}}` |
|
|
32
|
+
| `parameters.provenance.json` | `{version: 1, producers, targets}` |
|
|
33
|
+
|
|
34
|
+
Each producer definition is `{version, module}`. Its module is a confined project-relative path below this task, for example `scripts/tasks/vault/producers/salt.ts`. Each target provenance entry is `{manual, computed}`, using the existing path maps and exact observation shapes. Copy policies read from the same actual `parameters.yaml` document; there is no implicit global merge or `run.targets` override. A manual observation's `source` is only a source label, never proof of human approval.
|
|
35
|
+
|
|
36
|
+
Before any producer runs, every source step passes the existing strict native parser or the pure custom-step structural parser. Runtime ABI/reference validation still belongs to the engine. Documents reject duplicate members, aliases, anchors, merge keys, non-string mapping keys, unsafe numeric values and non-JSON data. Files must be confined regular single-link files; symlinks and traversal are rejected. This tightens the new delivery input boundary; the previous YAML parser already rejected duplicate mapping keys.
|
|
37
|
+
|
|
38
|
+
Producers export only synchronous `produce(inputs)`. Inputs are frozen strict JSON. The existing `CustomModuleClosure` owns loading, static dependencies, package resolution and returned-data normalization. There are no provider, state, environment or file-read ports. The actual output must match both the delivered computed observation and the parameter value. Each selected target resolves its envelope once with an isolated producer session. Evidence binds the actual input files, schema, target, producer ID/version/module, complete module closure, inputs/output and resolved envelope identity.
|
|
39
|
+
|
|
40
|
+
`inputs.values()` and `inputs.parameters()` are available while the owner is open. A receipt becomes consumable only after `seal()` succeeds. Sealing rereads input files, handoff eligibility and producer closures without rerunning producers. A failed seal permanently revokes every receipt. Sealing twice and reading through a terminal handle are rejected. `close()` explicitly revokes receipts, including after a successful seal. A copied or self-consistent JSON receipt has no authority. These receipts are process-local; durable production transport is not implemented by this API.
|
|
41
|
+
|
|
42
|
+
`snapshot.targets` contains only validated, frozen version-1 public targets: `id`, `network`, declared `chainId`, `environment`, `finality`, `openzeppelin`, and optional `admin`, `create2`, `uups`, `multicall`. CREATE2 supports `scheme`, `factory`, optional `leadingZeroBytes` and optional `caller`. Zero confirmations and zero leading bytes are retained; omitted fields remain absent. Invalid nulls and arbitrary extras are rejected. Business extensions belong in schema-checked parameters. `admin` and `create2.caller` are business addresses, not executor claims. Both native `$target` references and custom target declarations use the same scalar field boundary.
|
|
43
|
+
|
|
44
|
+
Admin retains the shared engine's semantics: absence, a string that trims to empty, and a case-insensitive `deployer` select the execution signer; valid address strings (including zero) select that address. The public definition retains its original spelling/whitespace and absence so these inputs remain distinct. Invalid types, nulls and invalid checksums are rejected before engine use. Facility address rules remain separate.
|
|
45
|
+
|
|
46
|
+
The public chain ID comes from the current project-owned Hardhat network declaration, with no network catalog. Config and business file evidence contains confined paths and digests, not RPC/account/header capabilities. This input module does not yet attest post-extender effective Hardhat settings. `businessInputHash` is deliberately named separately from the future aggregate `inputsHash`.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Delivery parameter and native-operation validation
|
|
2
|
+
|
|
3
|
+
This is the delivery-only development/consumption boundary. It does not replace legacy `resolveExecutionParameters(...overrides)`, qualify a release, or supply production parameters. Delivery requires the pinned ethers 6.15.0 runtime; this API makes no ethers 5 compatibility claim.
|
|
4
|
+
|
|
5
|
+
## Development and consumption
|
|
6
|
+
|
|
7
|
+
`gate-evm-tools/delivery-parameters` exports `resolveDeliveryParameters` and `consumeDeliveryParameters`. Development supplies the complete target `values`, including manual values and computed outputs. Resolution validates rather than filling defaults, choosing a wallet identity, or silently copying missing target values. The returned version-1 envelope and every nested value are immutable.
|
|
8
|
+
|
|
9
|
+
The production consumer takes only the existing envelope and its independently supplied trusted `identity`. It revalidates schema, observations, provenance and the envelope hash, returns frozen values, and never invokes a producer. There are no overrides or fill-in arguments. The expected identity must come from the caller's trusted development evidence; hashing an arbitrary incoming envelope and trusting that same hash does not authenticate it.
|
|
10
|
+
|
|
11
|
+
```ts
|
|
12
|
+
const resolved = resolveDeliveryParameters({
|
|
13
|
+
target: 'prod',
|
|
14
|
+
schema: {
|
|
15
|
+
$schema: 'http://json-schema.org/draft-07/schema#',
|
|
16
|
+
type: 'object', additionalProperties: false, required: ['enabled'],
|
|
17
|
+
properties: { enabled: { type: 'boolean', 'x-policy': { kind: 'manual' } } },
|
|
18
|
+
},
|
|
19
|
+
values: { enabled: false },
|
|
20
|
+
manual: { '/enabled': { source: 'review-42', value: false } },
|
|
21
|
+
});
|
|
22
|
+
const values = consumeDeliveryParameters(resolved, trustedDevelopmentIdentity);
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Source/manual/computed observations and schema are included in the identity. These are business inputs, not a place for RPC URLs, account material, or secrets. Source files/modules/packages and the compiler, storage-layout and runtime aggregate identities are closed in later work. The producer registry and expected-identity input are versioned trusted seams, not independent production authority.
|
|
26
|
+
|
|
27
|
+
## Schema and JSON policy
|
|
28
|
+
|
|
29
|
+
Ajv 8.17.1 is a direct exact runtime dependency, with strict mode and all errors enabled. Coercion, defaults and removal of unknown properties are disabled. The only accepted dialect is the exact explicit URI `http://json-schema.org/draft-07/schema#`.
|
|
30
|
+
|
|
31
|
+
Supported schema keywords are `$schema` (root only), `title`, `description`, `type`, `properties`, `required`, `additionalProperties`, `items`, `minItems`, `maxItems`, `uniqueItems`, `minProperties`, `maxProperties`, `enum`, `const`, `minimum`, `maximum`, `exclusiveMinimum`, `exclusiveMaximum`, `multipleOf`, `minLength`, `maxLength`, `pattern`, and `x-policy`. Each node requires one explicit type. Objects require a properties map and `additionalProperties:false`; arrays require a single item schema. Formats, defaults, `$ref`, composition/conditional schemas, tuple-schema item lists, pattern properties, and every other dialect/keyword are rejected. No hand-validator fallback exists.
|
|
32
|
+
|
|
33
|
+
All JSON numbers, including schema numeric constraints, are safe integers. Fractional numbers, NaN, infinities, unsafe integers, bigint, undefined, cycles, sparse arrays, extra array properties, symbols, non-enumerable fields, getters and unsupported prototypes are rejected without invoking getters or `toJSON`. Use canonical decimal strings for large ABI integers. Plain objects and null-prototype objects are accepted; arrays require the ordinary array prototype.
|
|
34
|
+
|
|
35
|
+
The general own-data copier preserves own `__proto__`, `constructor`, and `prototype` keys deterministically using property definitions. Parameter schema property names explicitly reject these three names because Ajv's generated treatment of `__proto__` is unsuitable for this policy. They are never silently ignored or used to mutate prototypes.
|
|
36
|
+
|
|
37
|
+
## Per-leaf provenance
|
|
38
|
+
|
|
39
|
+
`x-policy` has one exact shape:
|
|
40
|
+
|
|
41
|
+
- `{kind:'copy', target:'dev', path:'/source/path'}`
|
|
42
|
+
- `{kind:'manual'}`
|
|
43
|
+
- `{kind:'computed', producer:'salt', version:'1'}`
|
|
44
|
+
|
|
45
|
+
Policies inherit down objects and array items until a child overrides them. A copy policy's JSON pointer anchors at the node declaring it; descendant paths append relative segments, including concrete array indexes. Children explicitly marked manual/computed must provide their own observations even when their parent is copied. Empty containers count as leaves. Ambiguous schema composition is unsupported.
|
|
46
|
+
|
|
47
|
+
Every actual leaf binds target, JSON pointer, policy and value hash. Copy observations additionally bind source target, source pointer, source leaf content and entire source-target identity, and compare the actual source value. Manual observations are keyed by target JSON pointer and have `{source, value}`; the source identifier must be nonempty and the value must match. Computed observations have `{producer, version, inputs, output}` and bind input/output identities. Development invokes the trusted registry's matching versioned producer over frozen inputs and compares its actual output. Unused manual/computed observations fail. Production verifies existing observations and identities without recomputation.
|
|
48
|
+
|
|
49
|
+
## Business references and ABI validation
|
|
50
|
+
|
|
51
|
+
Business references use `$param.path`, `$target.path`, `$state.path`, or an exact `{$ref:'param.path'}` / `target.path` / `state.path` object. Dot-separated segments contain only ASCII letters, digits, `_`, or `-`; numeric segments index arrays. Unknown namespaces, extra `$ref` fields, missing/undefined values, accessors and reference cycles fail. Referenced values are resolved recursively. Each resolution reads at most one state snapshot, safely traverses own enumerable data descriptors, and strictly validates the selected subtree. Unrelated optional runtime metadata may be undefined; a referenced undefined, accessor, non-plain or cyclic value still fails. Observation identities hash the selected source subtree and its resolved value. Schema `$ref` has no relationship to this syntax and is unsupported.
|
|
52
|
+
|
|
53
|
+
Public target references are scalar leaves only: `id`, `environment`, `chainId`, `admin`, `create2.scheme`, `create2.factory`, `uups.placeholderImplementation`, and `multicall.controlledMulticall`. The resolver never traverses or hashes the other target fields. Each resolved reference records its namespace/path and actual source/resolved content identities. `runDeliverySteps` returns immutable reference observations; `collectDeliveryPlan` exposes them by source step in `runtimeEvidence.references`. They remain internal evidence, not a release seal.
|
|
54
|
+
|
|
55
|
+
One ethers-parsed recursive ABI validator handles constructor/init/upgrade/call/view/check arguments and check expectations. Booleans must be booleans; integers accept safe integer numbers or canonical decimal strings and use exact BigInt ranges. Addresses must be valid EVM addresses; bytes are even hex with exact fixed sizes. Arrays enforce fixed lengths. Tuples accept positional arrays or exact named own-data objects with unique nonempty ABI names. Missing/extra arguments and fields fail. Runtime bigint and ethers Result values cross an explicit normalization function; arbitrary objects are never converted with `String`/`toString`.
|
|
56
|
+
|
|
57
|
+
## Execution and preparation guarantees
|
|
58
|
+
|
|
59
|
+
Delivery always installs its own validation adapter, replacing any caller-provided no-op shared port. Collection preflights the complete known native source list before sending. Each custom module's complete emitted list is independently preflighted before its first operation. Future custom modules are not executed speculatively. Static preflight resolves immutable params/target references and defers state-reference values without reading state. Methods, the outer argument count, known sibling values and known array/tuple shapes are still checked. An individual argument or nested tuple/array may come from future state; the entire outer argument list must have known shape. Final resolved arguments, check expectations and values validate again before encoding/invoking/sending.
|
|
60
|
+
|
|
61
|
+
Artifact ABI comes from the explicit runtime artifact reader, never an address resolver. The optional neutral core hook checks a detached actual artifact after compilation, before constructor or initializer encoding. Fresh, expected-replay and disk preparation paths all rederive semantics before evidence is journaled or transactions are planned/sent. Reuse never reruns fresh preparation, compilation, or deployment-status selection.
|
|
62
|
+
|
|
63
|
+
Supplied CREATE2 fields validate independently of constructor availability, including effective redeploy-policy fields. Factory, salt, expected address and leading-zero types/ranges cannot hide behind a deferred constructor. Resolved fields validate again before shared extraction; invalid supplied values never become absent or fall back to defaults. Forward values accept nonnegative safe integers or canonical decimal strings within uint256; safe integer numbers normalize explicitly to decimal strings, including zero. Only prediction-dependent comparisons wait for the constructor/factory/salt to resolve. Upgrade preflight requires both target factory and controlled multicall fields; deferred references remain allowed and their resolved addresses validate again before preparation.
|
|
64
|
+
|
|
65
|
+
CREATE2 derives constructor input and init-code hash from actual artifact ABI/bytecode, actual factory and salt. Every role's address, salt, constructor input and init-code hash is compared; false expected addresses or leading-zero policies fail. UUPS implementation uses `implementationSalt`; the actual ERC1967Proxy artifact uses `[placeholderImplementation,'0x']` and `proxySalt`. Full factory calldata/value and upgrade proxy/implementation/initializer data are compared, including reused/zero-transaction plans. Original `required`/`reused` status decisions remain part of existing preparation/replay evidence; this check establishes current artifact/request/calldata consistency, not independent chain-state or release authority. Legacy shared execution without the optional port retains its loading isolation and behavior.
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
# Internal delivery planning
|
|
2
|
+
|
|
3
|
+
`runtime/delivery/planning.ts` collects canonical plans from the shared simulation
|
|
4
|
+
steps. It is an internal API: the launcher owns the local fork, signer,
|
|
5
|
+
read-only source connection and validated source/input/runtime identities.
|
|
6
|
+
Collection rechecks those identities and the pinned source/local block before
|
|
7
|
+
and after all steps. It does not expose execution or grant release readiness.
|
|
8
|
+
|
|
9
|
+
`plan.ts` is a pure parser with no engine, provider or signer imports. Its header
|
|
10
|
+
uses the source deployment's `deploymentId`, explicit `dev`/`prod`, target,
|
|
11
|
+
chain ID, original execution ID, operator, source definition and input hashes,
|
|
12
|
+
and `{ version, digest }` runtime identity. Transaction order is a total order,
|
|
13
|
+
including external transactions. Canonical content hashes exclude timestamps,
|
|
14
|
+
receipts, progress and the downstream production graph. The supplied identity
|
|
15
|
+
ports are trusted inputs; this parser does not verify every project file.
|
|
16
|
+
|
|
17
|
+
The protocol-neutral transaction planner owns normalization, transaction IDs,
|
|
18
|
+
routes, exact expected comparisons, contiguous replay and segment boundaries.
|
|
19
|
+
The legacy release planner delegates to that kernel and retains its old header,
|
|
20
|
+
file and segmented completion APIs. Delivery seals only a complete expected list.
|
|
21
|
+
A changed operator is a different plan identity; replay never silently reclassifies
|
|
22
|
+
routes. Derived values use the original derivation seed and the shared salt
|
|
23
|
+
algorithm, independent of the wallet. Missing, additional or changed replay values
|
|
24
|
+
fail collection.
|
|
25
|
+
|
|
26
|
+
The preparation journal receives actual `DeploymentChange` objects from shared
|
|
27
|
+
CREATE2, placeholder/first-upgrade and upgrade algorithms. It stores canonical
|
|
28
|
+
GateTool requests and plans with relative evidence references, hashes, artifact
|
|
29
|
+
identity, derived keys, and exact mappings from GateTool purposes to outer
|
|
30
|
+
transactions. One multicall can cover several purposes. Replay uses the original
|
|
31
|
+
complete preparation; currently deployed code does not shorten its transaction
|
|
32
|
+
list. A registered address reuse that would bypass preparation is explicitly
|
|
33
|
+
unsupported for collection. Simulation never stages candidates or synchronizes
|
|
34
|
+
manifests. Check observations preserve the definition, ABI, resolved address,
|
|
35
|
+
method, arguments, typed actual/expected values, and stable step/call assertion ID
|
|
36
|
+
separately from reporter events. Empty checks are not business acceptance.
|
|
37
|
+
|
|
38
|
+
Pending UUPS reuse is an explicit evidence port. The common preparation and
|
|
39
|
+
current-code/ERC1967 predicates are also used by the legacy file adapter, which
|
|
40
|
+
lives behind `run.ts`. Delivery evidence binds the original execution, target,
|
|
41
|
+
inputs/artifact/plan hashes, selected steps, infrastructure and derived values.
|
|
42
|
+
Every transaction must have a matching finalized observation from a trusted query
|
|
43
|
+
capability. This unit consumes that capability; it does not implement durable
|
|
44
|
+
receipt production or establish finality from arbitrary JSON flags.
|
|
45
|
+
Each collection retains its validated reuse bindings in immutable
|
|
46
|
+
`runtimeEvidence.pendingUupsReuse`, outside canonical preparation and plan hashes.
|
|
47
|
+
`runtimeEvidence` is a required output; its reuse list is empty when no reuse was
|
|
48
|
+
validated. The replay `expected` type requires only `plan`, `preparations` and
|
|
49
|
+
`verification`, so callers need not supply runtime evidence.
|
|
50
|
+
Replay validates the current evidence again while comparing the complete original
|
|
51
|
+
preparation, transaction mappings and derived bindings exactly. A previous
|
|
52
|
+
collection's `runtimeEvidence` is neither compared nor carried forward.
|
|
53
|
+
|
|
54
|
+
A same-fork deployment followed by an upgrade is refused until a complete,
|
|
55
|
+
validated immutable OpenZeppelin layout baseline is available. Ordinary build
|
|
56
|
+
info and the preparation plan's layout hashes do not establish that baseline,
|
|
57
|
+
particularly for namespaced storage. Registered baseline upgrades continue
|
|
58
|
+
through the existing official OpenZeppelin validator.
|
|
59
|
+
|
|
60
|
+
Custom planning uses a separate named `planOperations(ports, input)` export and
|
|
61
|
+
returns `{ version: 1, operations: [...] }`. Legacy `default`, `main`, and `run`
|
|
62
|
+
exports remain exclusive to the legacy full-context runner. The complete emitted
|
|
63
|
+
list is validated before its first operation dispatches: all five native kinds,
|
|
64
|
+
canonical data, unique operation IDs/deploy aliases, literal address/salt/value
|
|
65
|
+
constraints, method syntax, and known field shapes. Parameter and state references
|
|
66
|
+
remain available for dependent operations. In upgrade proxy selectors, the `0x`
|
|
67
|
+
prefix is reserved for valid nonzero addresses, including the string, `name` and
|
|
68
|
+
`contract` forms; ordinary registry aliases and `instance:Contract` keys remain
|
|
69
|
+
supported. Artifact-dependent ABI compatibility and full reference closure remain
|
|
70
|
+
later validation gates. UUPS descriptors name
|
|
71
|
+
the business implementation in both `contract` and `firstUpgrade.contract`, or
|
|
72
|
+
name the canonical `ERC1967Proxy` in `contract` and the business implementation in
|
|
73
|
+
`firstUpgrade.contract`. No old-project placeholder path is required.
|
|
74
|
+
|
|
75
|
+
The default version-1 `CustomPlanningInputSession` evaluates captured source bytes
|
|
76
|
+
with the bounded `gate-custom-cjs@1` loader. It automatically follows supported
|
|
77
|
+
static module/package inputs, including dead branches, and captures exact business
|
|
78
|
+
read bytes and configuration inputs. `customInputClosure` binds the full session
|
|
79
|
+
union into the plan. Ordered parameter/state/public-target observations and emitted
|
|
80
|
+
operation order remain separate from immutable files. See [the loader policy](delivery-custom-input-closure.md)
|
|
81
|
+
for supported syntax, npm lock/payload identity, configuration, host-adapter limits,
|
|
82
|
+
sealing, and the collector-owned session seam.
|
|
83
|
+
|
|
84
|
+
A custom step declares `reads: { files, params, state, target }` and may supply
|
|
85
|
+
canonical `input`. Read declarations grant permissions; they are not a completeness
|
|
86
|
+
proof. File paths remain inside the task/business root and pass the same sensitive,
|
|
87
|
+
generated-state and project-file checks as imports. Public target resolution allows
|
|
88
|
+
only `id`, `environment`, `chainId`, `admin`, `create2.scheme`, `create2.factory`,
|
|
89
|
+
`uups.placeholderImplementation`, and `multicall.controlledMulticall`. This whitelist
|
|
90
|
+
also applies to emitted descriptor references. Ports expose no HRE, signer, mutation,
|
|
91
|
+
RPC or chain-read capability. This module/data/package contribution does not establish
|
|
92
|
+
aggregate compiler/artifact/OZ/public-config freeze or release readiness.
|
|
93
|
+
|
|
94
|
+
Delivery alone derives bounded engine IDs from framed source-step/custom-operation
|
|
95
|
+
identity. `operationBindings` reverses those IDs, and `transactionBindings` binds
|
|
96
|
+
each ordered outer transaction to its operation, native role or call ordinal.
|
|
97
|
+
Full ABI signatures remain in descriptors/calldata/checks. Grouped calls retain
|
|
98
|
+
one authority decision. Legacy locked-plan IDs are unchanged. Preparation mappings
|
|
99
|
+
and derived keys consistently use the generated engine IDs; launcher pending-reuse
|
|
100
|
+
selection therefore uses the plan's mapped IDs.
|
|
101
|
+
|
|
102
|
+
`runtimeEvidence.forkAudit` captures the local Hardhat instance and chain identity,
|
|
103
|
+
pinned source snapshot, post-setup baseline block/hash, complete ordered local
|
|
104
|
+
blocks/transactions/receipts through the settled end, and trusted send observations.
|
|
105
|
+
The audit is installed before custom module evaluation and is restored in `finally`.
|
|
106
|
+
It rejects missing, extra, pending, duplicate or mismatched sends and receipts,
|
|
107
|
+
changed ancestry/provider identity, and reset/revert/code/storage/nonce mutations
|
|
108
|
+
at the supported provider's public `request`/`send` boundary. Automine is required
|
|
109
|
+
so shared sends cannot wait indefinitely on manually mined receipts. Only the
|
|
110
|
+
launcher's impersonation callback receives a scoped allowance for the requested
|
|
111
|
+
account's impersonation and funding; the asynchronous allowance cannot authorize
|
|
112
|
+
unrelated concurrent or detached calls. These setup calls do not mine transactions.
|
|
113
|
+
Multicall inner operations are counted through their single actual outer envelope.
|
|
114
|
+
|
|
115
|
+
`verifyCapturedForkAudit` is pure: it consumes captured local evidence and expected
|
|
116
|
+
plan/source/chain identities without evaluating project scripts or claiming that
|
|
117
|
+
fork deployments exist on the source chain. Its caller supplies any independently
|
|
118
|
+
validated completed prefix (default empty); evidence cannot exempt its own prefix.
|
|
119
|
+
This run audits only the remaining suffix. Runtime observations are kept outside
|
|
120
|
+
canonical replay plan/preparation identity. This is an audit of the supported
|
|
121
|
+
provider/API boundary, not an isolation boundary against hostile code running as
|
|
122
|
+
the same OS user, retained internal RPC capabilities or arbitrary module imports.
|
|
123
|
+
|
|
124
|
+
The packed acceptance fixture runs the exact Hardhat 2.26.3, ethers 6.15.0,
|
|
125
|
+
OpenZeppelin upgrades 3.9.1 and upgrades-core 1.44.2 stack. It verifies actual
|
|
126
|
+
CREATE2 and atomic firstUpgrade transactions, business writes and multicall,
|
|
127
|
+
code/ERC1967/owner/value checks, a separate fork V2 upgrade against an actually
|
|
128
|
+
synced proxy, and extra/pending transaction refusal while source state, registry
|
|
129
|
+
and manifests remain unchanged. After qualification, a distinct disposable
|
|
130
|
+
`localhost` execution verifies two shared V2 upgrade transactions, official layout
|
|
131
|
+
validation and real development manifest synchronization. It preserves the
|
|
132
|
+
source/fork identity guard instead of syncing a fork under the source target's
|
|
133
|
+
name. This validates shared execution/sync capabilities; it does not implement the
|
|
134
|
+
complete durable development lifecycle.
|
|
135
|
+
|
|
136
|
+
Remaining gates belong to later units: full qualification/release readiness,
|
|
137
|
+
complete frozen business inputs and recursive ABI validation (5c.1),
|
|
138
|
+
registry/evidence acceptance (5c.2), and durable finalized observation
|
|
139
|
+
production/query (6a). The collection returned here is an immutable internal
|
|
140
|
+
plan, not `release_ready` or execution authority.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Developer production delivery
|
|
2
|
+
|
|
3
|
+
`gate-evm-tools/delivery-release` completes the developer side of the new EVM core delivery flow. Run it from the actual project root using the installed, locked package. It generates qualification through `collectDeliveryAggregate`; callers cannot submit an aggregate or choose upstream roots. Every production target in `scripts/tasks/<deploymentId>/task.yaml` must have one current `deploy-test` task in the same canonical handoff.
|
|
4
|
+
|
|
5
|
+
## Preserve accepted development before editing production inputs
|
|
6
|
+
|
|
7
|
+
After `createDevelopmentDelivery(...).continue()` returns `accepted`, preserve its original `source` and `aggregate` with the public capture method **before changing the package, configuration, or production containers**:
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
const release = require('gate-evm-tools/delivery-release');
|
|
11
|
+
const development = release.captureDevelopmentReleaseHistory({
|
|
12
|
+
root: process.cwd(), source: developmentSource, aggregate: developmentAggregate,
|
|
13
|
+
});
|
|
14
|
+
// Persist `development` as JSON; it contains confined project-relative file references.
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Capture reads the actual installed package and refuses any payload that differs from the accepted aggregate. It saves the original aggregate, source, changing input containers, full package payload, and a compressed snapshot archive. Its READY file is written last. The archive is a tool-produced installed-payload snapshot, not an npm distribution tarball: the observed npm lock integrity remains separate metadata. The consumer compares the complete snapshot contents with the original package payload, payload digest, and executable runtime identity. No old runtime executes, and no historical digest is rewritten to name a newer runtime.
|
|
18
|
+
|
|
19
|
+
Only production-only container additions/completions are compatible with the existing development acceptance. Development parameters and provenance, public target configuration, existing Hardhat network definitions, compiler/plugins, source, artifacts, scripts and custom dependencies remain bound. A custom dependency on an entire changed container is rejected. Historical task definitions retain all fields except the explicit production-target-list extension. Changed development semantics require a new development acceptance.
|
|
20
|
+
|
|
21
|
+
## Complete prerequisites and production inputs
|
|
22
|
+
|
|
23
|
+
Finish all selected production parameter leaves and provenance through the existing strict parameter resolver. Record concrete public executors, operation order, permissions, checks, adaptations, and recovery instructions in the canonical manifest and parameters. `docs/prod-execution-plan.md` explains these canonical inputs, references `manifest.yaml` and `parameters.yaml`, and includes a `recovery` section. It is not another executable business plan.
|
|
24
|
+
|
|
25
|
+
Development and enabled audit dependencies must appear in each qualification's upstream closure. Each current prerequisite must be completed/successful with `adoptedRev === rev`. `deploy` references its actual acceptance file; `check-code` references the actual raw CheckCode file. Other prerequisite skills first produce their actual reports and complete the task with `result.codeRef` and `result.evidence` file refs, then invoke:
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
release.recordDeliveryPrerequisite({
|
|
29
|
+
workspaceRoot, projectRoot: '.', handoff: 'handoff.md',
|
|
30
|
+
taskId, deploymentId, planKey: 'security-audit',
|
|
31
|
+
});
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The tool binds the current canonical task/revision/definition, code reference, and every declared report's actual bytes. Audit tasks require `audit-reports/security-audit-report.md`. This receipt establishes provenance and eligibility, not semantic audit quality. Disabled audit lanes do not acquire new requirements. Missing, revised, cancelled, disabled or unsuccessful mandatory prerequisites block readiness.
|
|
35
|
+
|
|
36
|
+
## Two-phase release
|
|
37
|
+
|
|
38
|
+
```js
|
|
39
|
+
const scope = {workspaceRoot, projectRoot: '.', handoff: 'handoff.md', taskId, deploymentId};
|
|
40
|
+
const prepared = await release.prepareDeliveryRelease({
|
|
41
|
+
...scope, releaseId: 'vault-2026-10', development,
|
|
42
|
+
targets: [
|
|
43
|
+
{executionId: 'qual-mainnet', request: {
|
|
44
|
+
version: 1, environment: 'prod', purpose: 'prod-qualification', mode: 'simulate',
|
|
45
|
+
network: 'mainnet', operator: publicExecutor,
|
|
46
|
+
sourceRef: {path: 'handoff.md', taskId, planKey: 'qual-mainnet', rev: 1},
|
|
47
|
+
fork: {blockNumber, blockHash, readOnly: true},
|
|
48
|
+
}},
|
|
49
|
+
// Every task.yaml release target, in canonical order.
|
|
50
|
+
],
|
|
51
|
+
});
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
The returned `releaseRef` is preliminary: there is no release-ready marker. The actual owner qualifies every target on an isolated read-only fork, retains preparations, full typed assertions and fork audit, then freezes the current business inputs and prerequisite evidence. Nonces, fees and administrator approval belong to the later execution snapshot.
|
|
55
|
+
|
|
56
|
+
The developer mainAgent now uses the canonical Plan commands to create **all** `release-prepare → release-execute → release-verify` tasks for **each** selected target in the same handoff. Each has exact `environment: prod`, target, current revision, scope, and `prepared.releaseRef`. `release-prepare` depends on its target's qualification task; the next two stages depend on the preceding stage. Allowed actions are respectively `['simulate']`, `['execute','export-calldata','reconcile']`, and `['verify']`. Qualification tasks have `['simulate','verify']` and no releaseRef. The deployment agent implements and qualifies; mainAgent plans and dispatches. Admin later selects these existing tasks.
|
|
57
|
+
|
|
58
|
+
```js
|
|
59
|
+
const ready = await release.finalizeDeliveryRelease({...scope, releaseId: 'vault-2026-10'});
|
|
60
|
+
const inspected = release.inspectDeliveryRelease({...scope, releaseRef: prepared.releaseRef});
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
`sourceDefinitionHash`, `inputsHash`, and `prodTaskGraphHash` are separate. Inputs exclude release definitions, refs, progress and published files. The final bundle binds all three plus its own hash. Classification examines the complete task universe before selecting the desired ref, so wrong-bound, duplicate, split or missing stages cannot hide behind ref filtering. Independently complete other releases remain separate.
|
|
64
|
+
|
|
65
|
+
Finalization rereads current source/input/evidence files and task eligibility after asynchronous work, writes the immutable bundle, verifies everything again, then fsyncs the authoritative `release.json` marker last. An interrupted attempt has no ready marker and can retry finalization from its existing candidate. Inspection performs no writes or business recomputation: absent marker returns `{status:'pending'}`; malformed, incomplete or changed ready content throws. A successful result is `{status:'release_ready', release, bundleHash}`. This denotes developer qualification only; R2 provides no production broadcast or host approval capability.
|