@mysten-incubation/devstack 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -4
- package/dashboard-ui/assets/grpc-a4usE3Nk.js +3 -0
- package/dashboard-ui/assets/index-B82Bh84P.css +1 -0
- package/dashboard-ui/assets/index-CRYJ4pru.js +1277 -0
- package/dashboard-ui/index.html +2 -2
- package/dist/api/define-capabilities.d.mts +1 -20
- package/dist/api/define-capabilities.mjs +15 -22
- package/dist/api/define-capabilities.mjs.map +1 -1
- package/dist/api/define-devstack-with.d.mts +7 -1
- package/dist/api/define-devstack-with.mjs.map +1 -1
- package/dist/api/define-devstack.mjs.map +1 -1
- package/dist/api/define-plugin.d.mts +2 -1
- package/dist/api/inference-network.d.mts +31 -17
- package/dist/api/inference-network.mjs +40 -43
- package/dist/api/inference-network.mjs.map +1 -1
- package/dist/api/load-config.mjs +88 -0
- package/dist/api/load-config.mjs.map +1 -0
- package/dist/api/mode-narrowed-factory.d.mts +1 -1
- package/dist/api/mode-narrowed-factory.mjs.map +1 -1
- package/dist/api/run-stack-internal.mjs +202 -0
- package/dist/api/run-stack-internal.mjs.map +1 -0
- package/dist/api/run-stack.d.mts +82 -31
- package/dist/api/run-stack.mjs +22 -141
- package/dist/api/run-stack.mjs.map +1 -1
- package/dist/build-integrations/dapp-kit/index.d.mts +61 -0
- package/dist/build-integrations/dapp-kit/index.mjs +58 -0
- package/dist/build-integrations/dapp-kit/index.mjs.map +1 -0
- package/dist/build-integrations/playwright/config.d.mts +1 -30
- package/dist/build-integrations/playwright/config.mjs +1 -27
- package/dist/build-integrations/playwright/config.mjs.map +1 -1
- package/dist/build-integrations/playwright/errors.d.mts +4 -7
- package/dist/build-integrations/playwright/errors.mjs.map +1 -1
- package/dist/build-integrations/playwright/global-setup.d.mts +42 -71
- package/dist/build-integrations/playwright/global-setup.mjs +142 -218
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
- package/dist/build-integrations/playwright/index.d.mts +2 -2
- package/dist/build-integrations/playwright/index.mjs +2 -2
- package/dist/build-integrations/playwright/stack-context.d.mts +3 -1
- package/dist/build-integrations/playwright/stack-context.mjs +4 -2
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
- package/dist/build-integrations/playwright/wallet-context.mjs +44 -19
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
- package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -1
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -1
- package/dist/build-integrations/runtime/discover.d.mts +6 -4
- package/dist/build-integrations/runtime/discover.mjs +15 -4
- package/dist/build-integrations/runtime/discover.mjs.map +1 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
- package/dist/build-integrations/runtime/errors.mjs.map +1 -1
- package/dist/build-integrations/runtime/read-stack-context.mjs +3 -3
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +23 -7
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs +25 -12
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -1
- package/dist/build-integrations/runtime/stack-context.d.mts +2 -2
- package/dist/build-integrations/vite/index.d.mts +84 -19
- package/dist/build-integrations/vite/index.mjs +203 -28
- package/dist/build-integrations/vite/index.mjs.map +1 -1
- package/dist/build-integrations/vitest/config.d.mts +20 -2
- package/dist/build-integrations/vitest/config.mjs +16 -4
- package/dist/build-integrations/vitest/config.mjs.map +1 -1
- package/dist/build-integrations/vitest/env.d.mts +18 -10
- package/dist/build-integrations/vitest/env.mjs +11 -10
- package/dist/build-integrations/vitest/env.mjs.map +1 -1
- package/dist/build-integrations/vitest/errors.d.mts +7 -11
- package/dist/build-integrations/vitest/errors.mjs +3 -4
- package/dist/build-integrations/vitest/errors.mjs.map +1 -1
- package/dist/build-integrations/vitest/global-setup.d.mts +35 -0
- package/dist/build-integrations/vitest/global-setup.mjs +156 -0
- package/dist/build-integrations/vitest/global-setup.mjs.map +1 -0
- package/dist/build-integrations/vitest/index.d.mts +3 -2
- package/dist/build-integrations/vitest/index.mjs +3 -2
- package/dist/build-integrations/vitest/setup.mjs +2 -2
- package/dist/build-integrations/vitest/setup.mjs.map +1 -1
- package/dist/build-integrations/vitest/stack-context.d.mts +5 -3
- package/dist/build-integrations/vitest/stack-context.mjs +3 -2
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
- package/dist/cli/bail.mjs.map +1 -1
- package/dist/cli/doctor-probes.mjs +1 -3
- package/dist/cli/doctor-probes.mjs.map +1 -1
- package/dist/cli/main.d.mts +23 -1
- package/dist/cli/main.mjs +63 -8
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/prune-direct.mjs.map +1 -1
- package/dist/cli/snapshot-reader.mjs.map +1 -1
- package/dist/cli/up-lifecycle.mjs.map +1 -1
- package/dist/cli/wirings/apply.mjs +28 -21
- package/dist/cli/wirings/apply.mjs.map +1 -1
- package/dist/cli/wirings/codegen.mjs +108 -0
- package/dist/cli/wirings/codegen.mjs.map +1 -0
- package/dist/cli/wirings/config-loader.mjs +12 -62
- package/dist/cli/wirings/config-loader.mjs.map +1 -1
- package/dist/cli/wirings/dump-ids.mjs +86 -0
- package/dist/cli/wirings/dump-ids.mjs.map +1 -0
- package/dist/cli/wirings/engine-command.mjs +1 -1
- package/dist/cli/wirings/engine-command.mjs.map +1 -1
- package/dist/cli/wirings/identity.mjs +2 -2
- package/dist/cli/wirings/identity.mjs.map +1 -1
- package/dist/cli/wirings/provide-file-system.mjs.map +1 -1
- package/dist/cli/wirings/read-devstack-version.mjs +17 -0
- package/dist/cli/wirings/read-devstack-version.mjs.map +1 -0
- package/dist/cli/wirings/snapshot.mjs +27 -34
- package/dist/cli/wirings/snapshot.mjs.map +1 -1
- package/dist/cli/wirings/up-ipc.mjs +147 -0
- package/dist/cli/wirings/up-ipc.mjs.map +1 -0
- package/dist/cli/wirings/up.mjs +218 -198
- package/dist/cli/wirings/up.mjs.map +1 -1
- package/dist/cli/wirings/wipe.mjs +1 -1
- package/dist/cli/wirings/wipe.mjs.map +1 -1
- package/dist/contracts/chain-probe.d.mts +1 -1
- package/dist/contracts/chain-probe.mjs +1 -1
- package/dist/contracts/chain-probe.mjs.map +1 -1
- package/dist/contracts/codegenable.d.mts +60 -6
- package/dist/contracts/codegenable.mjs +28 -0
- package/dist/contracts/codegenable.mjs.map +1 -0
- package/dist/contracts/config-bindings.mjs +162 -0
- package/dist/contracts/config-bindings.mjs.map +1 -0
- package/dist/contracts/container-runtime.d.mts +23 -17
- package/dist/contracts/plugin-expander.mjs.map +1 -1
- package/dist/contracts/snapshotable.d.mts +5 -7
- package/dist/contracts/wallet-protocol.d.mts +2 -5
- package/dist/contracts/wallet-protocol.mjs +2 -5
- package/dist/contracts/wallet-protocol.mjs.map +1 -1
- package/dist/index.d.mts +21 -26
- package/dist/index.mjs +8 -9
- package/dist/orchestrators/boot.d.mts +28 -0
- package/dist/orchestrators/boot.mjs +440 -0
- package/dist/orchestrators/boot.mjs.map +1 -0
- package/dist/orchestrators/codegen/bindings.d.mts +13 -1
- package/dist/orchestrators/codegen/bindings.mjs +23 -9
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
- package/dist/orchestrators/codegen/config-runtime.mjs +208 -0
- package/dist/orchestrators/codegen/config-runtime.mjs.map +1 -0
- package/dist/orchestrators/codegen/emit.mjs +1 -1
- package/dist/orchestrators/codegen/emit.mjs.map +1 -1
- package/dist/orchestrators/codegen/errors.mjs +21 -1
- package/dist/orchestrators/codegen/errors.mjs.map +1 -1
- package/dist/orchestrators/codegen/format.mjs +2 -0
- package/dist/orchestrators/codegen/format.mjs.map +1 -1
- package/dist/orchestrators/codegen/gitignore.mjs +30 -11
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
- package/dist/orchestrators/codegen/id-config.mjs +107 -0
- package/dist/orchestrators/codegen/id-config.mjs.map +1 -0
- package/dist/orchestrators/codegen/output-location.mjs +23 -31
- package/dist/orchestrators/codegen/output-location.mjs.map +1 -1
- package/dist/orchestrators/codegen/paths.mjs +8 -1
- package/dist/orchestrators/codegen/paths.mjs.map +1 -1
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
- package/dist/orchestrators/codegen/service.mjs +286 -58
- package/dist/orchestrators/codegen/service.mjs.map +1 -1
- package/dist/orchestrators/layers.mjs +31 -0
- package/dist/orchestrators/layers.mjs.map +1 -0
- package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -1
- package/dist/orchestrators/lifecycle-prune/index.mjs +8 -10
- package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -1
- package/dist/orchestrators/network-options.d.mts +52 -0
- package/dist/orchestrators/network-options.mjs +43 -0
- package/dist/orchestrators/network-options.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs.map +1 -1
- package/dist/orchestrators/router/cors.mjs.map +1 -1
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
- package/dist/orchestrators/router/errors.mjs.map +1 -1
- package/dist/orchestrators/router/file-provider.mjs.map +1 -1
- package/dist/orchestrators/router/hostname.mjs.map +1 -1
- package/dist/orchestrators/router/profile.mjs +1 -1
- package/dist/orchestrators/router/profile.mjs.map +1 -1
- package/dist/orchestrators/router/service.d.mts +2 -2
- package/dist/orchestrators/router/service.mjs +12 -27
- package/dist/orchestrators/router/service.mjs.map +1 -1
- package/dist/orchestrators/router/traefik-container.mjs +1 -1
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
- package/dist/orchestrators/snapshot/capture.mjs +171 -195
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
- package/dist/orchestrators/snapshot/descriptor.d.mts +1 -1
- package/dist/orchestrators/snapshot/descriptor.mjs +53 -11
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
- package/dist/orchestrators/snapshot/identity-guard.mjs +3 -5
- package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -1
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs +32 -101
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -1
- package/dist/orchestrators/snapshot/index.mjs +1 -4
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
- package/dist/orchestrators/snapshot/interrupted-restore.mjs +116 -0
- package/dist/orchestrators/snapshot/interrupted-restore.mjs.map +1 -0
- package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -1
- package/dist/orchestrators/snapshot/prune.mjs +40 -31
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
- package/dist/orchestrators/snapshot/restore.mjs +221 -196
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
- package/dist/orchestrators/snapshot/service.mjs +72 -62
- package/dist/orchestrators/snapshot/service.mjs.map +1 -1
- package/dist/orchestrators/snapshot/wipe.mjs +67 -56
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
- package/dist/plugins/account/codegen.mjs +3 -0
- package/dist/plugins/account/codegen.mjs.map +1 -1
- package/dist/plugins/account/errors.d.mts +2 -2
- package/dist/plugins/account/errors.mjs +1 -4
- package/dist/plugins/account/errors.mjs.map +1 -1
- package/dist/plugins/account/funding.mjs +3 -27
- package/dist/plugins/account/funding.mjs.map +1 -1
- package/dist/plugins/account/index.d.mts +3 -8
- package/dist/plugins/account/index.mjs +71 -35
- package/dist/plugins/account/index.mjs.map +1 -1
- package/dist/plugins/account/keypair.d.mts +8 -7
- package/dist/plugins/account/keypair.mjs +5 -18
- package/dist/plugins/account/keypair.mjs.map +1 -1
- package/dist/plugins/account/lease.mjs.map +1 -1
- package/dist/plugins/account/registry.d.mts +1 -46
- package/dist/plugins/account/registry.mjs.map +1 -1
- package/dist/plugins/account/service.d.mts +43 -34
- package/dist/plugins/account/service.mjs +9 -54
- package/dist/plugins/account/service.mjs.map +1 -1
- package/dist/plugins/account/snapshot.mjs.map +1 -1
- package/dist/plugins/account/variants/ephemeral.mjs.map +1 -1
- package/dist/plugins/account/variants/impersonate.mjs.map +1 -1
- package/dist/plugins/account/variants/signer.mjs.map +1 -1
- package/dist/plugins/action/discriminator.mjs.map +1 -1
- package/dist/plugins/action/errors.mjs +1 -4
- package/dist/plugins/action/errors.mjs.map +1 -1
- package/dist/plugins/action/execute.mjs +3 -4
- package/dist/plugins/action/execute.mjs.map +1 -1
- package/dist/plugins/action/index.d.mts +2 -2
- package/dist/plugins/action/index.mjs +7 -11
- package/dist/plugins/action/index.mjs.map +1 -1
- package/dist/plugins/action/service.d.mts +5 -7
- package/dist/plugins/action/service.mjs +2 -16
- package/dist/plugins/action/service.mjs.map +1 -1
- package/dist/plugins/coin/address-resolution.mjs.map +1 -1
- package/dist/plugins/coin/codegen.mjs +97 -16
- package/dist/plugins/coin/codegen.mjs.map +1 -1
- package/dist/plugins/coin/discovery.mjs.map +1 -1
- package/dist/plugins/coin/errors.mjs +1 -4
- package/dist/plugins/coin/errors.mjs.map +1 -1
- package/dist/plugins/coin/index.d.mts +4 -34
- package/dist/plugins/coin/index.mjs +47 -28
- package/dist/plugins/coin/index.mjs.map +1 -1
- package/dist/plugins/coin/metadata.d.mts +1 -0
- package/dist/plugins/coin/metadata.mjs +8 -9
- package/dist/plugins/coin/metadata.mjs.map +1 -1
- package/dist/plugins/coin/mint.mjs +7 -21
- package/dist/plugins/coin/mint.mjs.map +1 -1
- package/dist/plugins/coin/registry.mjs +33 -20
- package/dist/plugins/coin/registry.mjs.map +1 -1
- package/dist/plugins/coin/service.d.mts +1 -1
- package/dist/plugins/coin/service.mjs +1 -8
- package/dist/plugins/coin/service.mjs.map +1 -1
- package/dist/plugins/coin/snapshot.mjs.map +1 -1
- package/dist/plugins/coin/type-strings.mjs.map +1 -1
- package/dist/plugins/dashboard/domain.mjs +106 -167
- package/dist/plugins/dashboard/domain.mjs.map +1 -1
- package/dist/plugins/dashboard/index.mjs +13 -13
- package/dist/plugins/dashboard/index.mjs.map +1 -1
- package/dist/plugins/dashboard/origin-policy.mjs +3 -3
- package/dist/plugins/dashboard/origin-policy.mjs.map +1 -1
- package/dist/plugins/dashboard/routable.mjs.map +1 -1
- package/dist/plugins/dashboard/schema/builder.mjs.map +1 -1
- package/dist/plugins/dashboard/schema/enums.mjs.map +1 -1
- package/dist/plugins/dashboard/schema/root.mjs +23 -44
- package/dist/plugins/dashboard/schema/root.mjs.map +1 -1
- package/dist/plugins/dashboard/schema/types.mjs +37 -91
- package/dist/plugins/dashboard/schema/types.mjs.map +1 -1
- package/dist/plugins/dashboard/schema.mjs.map +1 -1
- package/dist/plugins/dashboard/server.mjs.map +1 -1
- package/dist/plugins/deepbook/codegen.d.mts +12 -11
- package/dist/plugins/deepbook/codegen.mjs +108 -11
- package/dist/plugins/deepbook/codegen.mjs.map +1 -1
- package/dist/plugins/deepbook/deploy.mjs +7 -14
- package/dist/plugins/deepbook/deploy.mjs.map +1 -1
- package/dist/plugins/deepbook/errors.mjs +4 -2
- package/dist/plugins/deepbook/errors.mjs.map +1 -1
- package/dist/plugins/deepbook/faucet-strategy.mjs +4 -10
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/deepbook/hash.mjs.map +1 -1
- package/dist/plugins/deepbook/index.d.mts +38 -34
- package/dist/plugins/deepbook/index.mjs +133 -64
- package/dist/plugins/deepbook/index.mjs.map +1 -1
- package/dist/plugins/deepbook/plugin-key.mjs.map +1 -1
- package/dist/plugins/deepbook/pyth/index.mjs +4 -8
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
- package/dist/plugins/deepbook/snapshot.mjs +0 -1
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
- package/dist/plugins/deepbook/type-strings.mjs.map +1 -1
- package/dist/plugins/deepbook/types.d.mts +2 -1
- package/dist/plugins/deepbook/types.mjs.map +1 -1
- package/dist/plugins/faucet/dispatcher.d.mts +3 -3
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
- package/dist/plugins/faucet/errors.mjs.map +1 -1
- package/dist/plugins/faucet/http.mjs +2 -10
- package/dist/plugins/faucet/http.mjs.map +1 -1
- package/dist/plugins/faucet/index.mjs +0 -1
- package/dist/plugins/faucet/index.mjs.map +1 -1
- package/dist/plugins/host-service/errors.d.mts +1 -3
- package/dist/plugins/host-service/errors.mjs +1 -2
- package/dist/plugins/host-service/errors.mjs.map +1 -1
- package/dist/plugins/host-service/index.d.mts +1 -2
- package/dist/plugins/host-service/index.mjs +11 -11
- package/dist/plugins/host-service/index.mjs.map +1 -1
- package/dist/plugins/host-service/routable.mjs.map +1 -1
- package/dist/plugins/host-service/service.mjs +13 -13
- package/dist/plugins/host-service/service.mjs.map +1 -1
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -1
- package/dist/plugins/internal/codegen-helpers.mjs +2 -0
- package/dist/plugins/internal/codegen-helpers.mjs.map +1 -1
- package/dist/plugins/internal/funding-failure-error.mjs.map +1 -1
- package/dist/plugins/{postgres → internal/postgres-sidecar}/connection.mjs +1 -1
- package/dist/plugins/internal/postgres-sidecar/connection.mjs.map +1 -0
- package/dist/plugins/{postgres → internal/postgres-sidecar}/db-ensure.mjs +30 -16
- package/dist/plugins/internal/postgres-sidecar/db-ensure.mjs.map +1 -0
- package/dist/plugins/internal/postgres-sidecar/errors.mjs +21 -0
- package/dist/plugins/internal/postgres-sidecar/errors.mjs.map +1 -0
- package/dist/{substrate/runtime/scoped-multimap → plugins/internal/postgres-sidecar}/index.mjs +1 -0
- package/dist/plugins/internal/postgres-sidecar/service.mjs +121 -0
- package/dist/plugins/internal/postgres-sidecar/service.mjs.map +1 -0
- package/dist/plugins/package/build.mjs +2 -2
- package/dist/plugins/package/build.mjs.map +1 -1
- package/dist/plugins/package/codegen.d.mts +7 -14
- package/dist/plugins/package/codegen.mjs +187 -59
- package/dist/plugins/package/codegen.mjs.map +1 -1
- package/dist/plugins/package/dep-resolution.mjs +51 -3
- package/dist/plugins/package/dep-resolution.mjs.map +1 -1
- package/dist/plugins/package/errors.mjs +1 -4
- package/dist/plugins/package/errors.mjs.map +1 -1
- package/dist/plugins/package/git-source.d.mts +18 -0
- package/dist/plugins/package/git-source.mjs +119 -0
- package/dist/plugins/package/git-source.mjs.map +1 -0
- package/dist/plugins/package/index.d.mts +28 -19
- package/dist/plugins/package/index.mjs +107 -32
- package/dist/plugins/package/index.mjs.map +1 -1
- package/dist/plugins/package/mode-known.mjs +2 -2
- package/dist/plugins/package/mode-known.mjs.map +1 -1
- package/dist/plugins/package/mode-local.mjs +18 -35
- package/dist/plugins/package/mode-local.mjs.map +1 -1
- package/dist/plugins/package/publish-executor.mjs +13 -8
- package/dist/plugins/package/publish-executor.mjs.map +1 -1
- package/dist/plugins/package/publish-output.d.mts +1 -11
- package/dist/plugins/package/publish-output.mjs +1 -9
- package/dist/plugins/package/publish-output.mjs.map +1 -1
- package/dist/plugins/package/registry.d.mts +1 -1
- package/dist/plugins/package/registry.mjs +26 -14
- package/dist/plugins/package/registry.mjs.map +1 -1
- package/dist/plugins/package/service.mjs.map +1 -1
- package/dist/plugins/package/snapshot.mjs.map +1 -1
- package/dist/plugins/router-entrypoints.mjs +1 -3
- package/dist/plugins/router-entrypoints.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +1 -2
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +1 -6
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
- package/dist/plugins/seal/codegen.d.mts +1 -5
- package/dist/plugins/seal/codegen.mjs +83 -12
- package/dist/plugins/seal/codegen.mjs.map +1 -1
- package/dist/plugins/seal/config-render.mjs +2 -6
- package/dist/plugins/seal/config-render.mjs.map +1 -1
- package/dist/plugins/seal/deploy.mjs +18 -29
- package/dist/plugins/seal/deploy.mjs.map +1 -1
- package/dist/plugins/seal/errors.d.mts +4 -5
- package/dist/plugins/seal/errors.mjs +1 -8
- package/dist/plugins/seal/errors.mjs.map +1 -1
- package/dist/plugins/seal/index.d.mts +7 -28
- package/dist/plugins/seal/index.mjs +69 -47
- package/dist/plugins/seal/index.mjs.map +1 -1
- package/dist/plugins/seal/key-manager.mjs.map +1 -1
- package/dist/plugins/seal/key-server.mjs +1 -6
- package/dist/plugins/seal/key-server.mjs.map +1 -1
- package/dist/plugins/seal/keygen.mjs +2 -3
- package/dist/plugins/seal/keygen.mjs.map +1 -1
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
- package/dist/plugins/seal/mode/live.mjs +1 -1
- package/dist/plugins/seal/mode/live.mjs.map +1 -1
- package/dist/plugins/seal/mode/local-keygen.mjs +4 -10
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
- package/dist/plugins/seal/plugin-key.mjs.map +1 -1
- package/dist/plugins/seal/registry-publish.mjs.map +1 -1
- package/dist/plugins/seal/routable.mjs.map +1 -1
- package/dist/plugins/seal/service.mjs.map +1 -1
- package/dist/plugins/seal/snapshot.mjs +1 -2
- package/dist/plugins/seal/snapshot.mjs.map +1 -1
- package/dist/plugins/sui/auto-tick.mjs +5 -5
- package/dist/plugins/sui/auto-tick.mjs.map +1 -1
- package/dist/plugins/sui/chain-build-container.mjs +2 -2
- package/dist/plugins/sui/chain-build-container.mjs.map +1 -1
- package/dist/plugins/sui/chain-probe.mjs +4 -4
- package/dist/plugins/sui/chain-probe.mjs.map +1 -1
- package/dist/plugins/sui/codegen.d.mts +9 -7
- package/dist/plugins/sui/codegen.mjs +49 -46
- package/dist/plugins/sui/codegen.mjs.map +1 -1
- package/dist/plugins/sui/errors.d.mts +1 -1
- package/dist/plugins/sui/errors.mjs +1 -9
- package/dist/plugins/sui/errors.mjs.map +1 -1
- package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.d.mts +1 -1
- package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.mjs +3 -7
- package/dist/plugins/sui/exec/index.mjs.map +1 -0
- package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.mjs +1 -1
- package/dist/plugins/sui/exec/sign-and-dispatch.mjs.map +1 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs +2 -6
- package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -1
- package/dist/plugins/sui/fork-orchestration.mjs +13 -23
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
- package/dist/plugins/sui/index.d.mts +34 -83
- package/dist/plugins/sui/index.mjs +200 -68
- package/dist/plugins/sui/index.mjs.map +1 -1
- package/dist/{substrate/runtime/sui-ledger → plugins/sui/ledger}/object-ref.mjs +1 -1
- package/dist/plugins/sui/ledger/object-ref.mjs.map +1 -0
- package/dist/plugins/sui/local-faucet-strategy.mjs +1 -5
- package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -1
- package/dist/plugins/sui/log-attrs.mjs +11 -0
- package/dist/plugins/sui/log-attrs.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +4 -12
- package/dist/plugins/sui/mode/external.mjs.map +1 -1
- package/dist/plugins/sui/mode/fork.mjs +19 -16
- package/dist/plugins/sui/mode/fork.mjs.map +1 -1
- package/dist/plugins/sui/mode/live.mjs +4 -17
- package/dist/plugins/sui/mode/live.mjs.map +1 -1
- package/dist/plugins/sui/mode/local.d.mts +1 -0
- package/dist/plugins/sui/mode/local.mjs +203 -61
- package/dist/plugins/sui/mode/local.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared-boot.mjs +18 -23
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared.d.mts +6 -7
- package/dist/plugins/sui/mode/shared.mjs.map +1 -1
- package/dist/plugins/sui/mode/spec.d.mts +23 -6
- package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.mjs +28 -30
- package/dist/plugins/sui/move/index.mjs.map +1 -0
- package/dist/plugins/sui/move-summary-runner.mjs +8 -4
- package/dist/plugins/sui/move-summary-runner.mjs.map +1 -1
- package/dist/{substrate/network.d.mts → plugins/sui/network-config.d.mts} +11 -10
- package/dist/plugins/sui/network-resolver.d.mts +6 -6
- package/dist/plugins/sui/routable.mjs.map +1 -1
- package/dist/plugins/sui/service.mjs +10 -6
- package/dist/plugins/sui/service.mjs.map +1 -1
- package/dist/plugins/sui/snapshot.mjs +10 -5
- package/dist/plugins/sui/snapshot.mjs.map +1 -1
- package/dist/plugins/wallet/codegen.d.mts +8 -6
- package/dist/plugins/wallet/codegen.mjs +4 -10
- package/dist/plugins/wallet/codegen.mjs.map +1 -1
- package/dist/plugins/wallet/errors.mjs +1 -4
- package/dist/plugins/wallet/errors.mjs.map +1 -1
- package/dist/plugins/wallet/index.d.mts +3 -6
- package/dist/plugins/wallet/index.mjs +16 -21
- package/dist/plugins/wallet/index.mjs.map +1 -1
- package/dist/plugins/wallet/origin-policy.mjs +3 -3
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
- package/dist/plugins/wallet/pairing.mjs +6 -24
- package/dist/plugins/wallet/pairing.mjs.map +1 -1
- package/dist/plugins/wallet/protocol.mjs.map +1 -1
- package/dist/plugins/wallet/routable.mjs.map +1 -1
- package/dist/plugins/wallet/server.mjs +17 -24
- package/dist/plugins/wallet/server.mjs.map +1 -1
- package/dist/plugins/wallet/service.d.mts +2 -2
- package/dist/plugins/wallet/service.mjs +4 -15
- package/dist/plugins/wallet/service.mjs.map +1 -1
- package/dist/plugins/wallet/snapshot.mjs.map +1 -1
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +1 -5
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/walrus/codegen.d.mts +2 -13
- package/dist/plugins/walrus/codegen.mjs +93 -28
- package/dist/plugins/walrus/codegen.mjs.map +1 -1
- package/dist/plugins/walrus/deploy-paths.mjs +2 -3
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
- package/dist/plugins/walrus/deploy.mjs +26 -19
- package/dist/plugins/walrus/deploy.mjs.map +1 -1
- package/dist/plugins/walrus/errors.mjs +1 -8
- package/dist/plugins/walrus/errors.mjs.map +1 -1
- package/dist/plugins/walrus/faucet-strategy.mjs +15 -1
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/walrus/index.d.mts +13 -44
- package/dist/plugins/walrus/index.mjs +119 -122
- package/dist/plugins/walrus/index.mjs.map +1 -1
- package/dist/plugins/walrus/mode/known-deploy.mjs +6 -6
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
- package/dist/plugins/walrus/mode/local-cluster.d.mts +2 -2
- package/dist/plugins/walrus/mode/local-cluster.mjs +2 -10
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
- package/dist/plugins/walrus/plugin-key.mjs.map +1 -1
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
- package/dist/plugins/walrus/routable.mjs.map +1 -1
- package/dist/plugins/walrus/service.mjs.map +1 -1
- package/dist/plugins/walrus/snapshot.mjs +3 -3
- package/dist/plugins/walrus/snapshot.mjs.map +1 -1
- package/dist/plugins/walrus/storage-nodes.mjs +53 -14
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
- package/dist/plugins/walrus/wal-swap.mjs +4 -8
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
- package/dist/primitives/artifact-publisher.mjs.map +1 -1
- package/dist/primitives/cache.d.mts +1 -1
- package/dist/runtime/docker/client.mjs +47 -3
- package/dist/runtime/docker/client.mjs.map +1 -1
- package/dist/runtime/docker/container.mjs +37 -57
- package/dist/runtime/docker/container.mjs.map +1 -1
- package/dist/runtime/docker/errors.mjs.map +1 -1
- package/dist/runtime/docker/exec.mjs +2 -2
- package/dist/runtime/docker/exec.mjs.map +1 -1
- package/dist/runtime/docker/image.mjs +10 -11
- package/dist/runtime/docker/image.mjs.map +1 -1
- package/dist/runtime/docker/index.mjs +0 -1
- package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -1
- package/dist/runtime/docker/inventory.mjs +9 -9
- package/dist/runtime/docker/inventory.mjs.map +1 -1
- package/dist/runtime/docker/labels.mjs +12 -1
- package/dist/runtime/docker/labels.mjs.map +1 -1
- package/dist/runtime/docker/network.mjs +6 -6
- package/dist/runtime/docker/network.mjs.map +1 -1
- package/dist/runtime/docker/render-run-args.mjs.map +1 -1
- package/dist/runtime/docker/service.mjs +31 -45
- package/dist/runtime/docker/service.mjs.map +1 -1
- package/dist/runtime/docker/sweep.mjs +14 -64
- package/dist/runtime/docker/sweep.mjs.map +1 -1
- package/dist/runtime/docker/volume.mjs +1 -1
- package/dist/runtime/docker/volume.mjs.map +1 -1
- package/dist/runtime/docker/wrap.mjs +14 -2
- package/dist/runtime/docker/wrap.mjs.map +1 -1
- package/dist/substrate/brand.d.mts +2 -5
- package/dist/substrate/brand.mjs +3 -2
- package/dist/substrate/brand.mjs.map +1 -1
- package/dist/substrate/cross-process.mjs +2 -16
- package/dist/substrate/cross-process.mjs.map +1 -1
- package/dist/substrate/event-time.mjs +0 -2
- package/dist/substrate/event-time.mjs.map +1 -1
- package/dist/substrate/events.d.mts +46 -16
- package/dist/substrate/identity.d.mts +11 -5
- package/dist/substrate/manifest.d.mts +33 -26
- package/dist/substrate/manifest.mjs +8 -3
- package/dist/substrate/manifest.mjs.map +1 -1
- package/dist/substrate/options.d.mts +33 -4
- package/dist/substrate/plugin-ctx.d.mts +70 -0
- package/dist/substrate/plugin-ctx.mjs +66 -0
- package/dist/substrate/plugin-ctx.mjs.map +1 -0
- package/dist/substrate/plugin.d.mts +46 -38
- package/dist/substrate/plugin.mjs +13 -9
- package/dist/substrate/plugin.mjs.map +1 -1
- package/dist/substrate/projection.d.mts +1 -1
- package/dist/substrate/runtime/atomic-write.mjs +3 -4
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
- package/dist/substrate/runtime/cache/service.mjs +50 -20
- package/dist/substrate/runtime/cache/service.mjs.map +1 -1
- package/dist/substrate/runtime/config-validation.mjs.map +1 -1
- package/dist/substrate/runtime/control-plane/domain.mjs +34 -12
- package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -1
- package/dist/substrate/runtime/control-plane/service.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +14 -17
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/index.mjs +0 -2
- package/dist/substrate/runtime/cross-process/live-clock.mjs +1 -1
- package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/liveness.mjs +11 -18
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +2 -2
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/roster.mjs +17 -127
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +29 -28
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
- package/dist/substrate/runtime/errors.mjs +1 -13
- package/dist/substrate/runtime/errors.mjs.map +1 -1
- package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -1
- package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -1
- package/dist/substrate/runtime/host-gateway.mjs.map +1 -1
- package/dist/substrate/runtime/host-tree-tar/index.mjs +15 -163
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
- package/dist/substrate/runtime/http-probe.d.mts +1 -3
- package/dist/substrate/runtime/http-probe.mjs.map +1 -1
- package/dist/substrate/runtime/index.mjs +1 -6
- package/dist/substrate/runtime/lease-broker/service.mjs +5 -23
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +3 -3
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/graph-input-id.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/graph-input-id.mjs +133 -0
- package/dist/substrate/runtime/lifecycle/graph-input-id.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/index.mjs +2 -2
- package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +22 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs +2 -15
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +29 -25
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -1
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +0 -1
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -1
- package/dist/substrate/runtime/managed-container.d.mts +5 -1
- package/dist/substrate/runtime/managed-container.mjs +8 -10
- package/dist/substrate/runtime/managed-container.mjs.map +1 -1
- package/dist/substrate/runtime/manifest/manifest.mjs +8 -30
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
- package/dist/substrate/runtime/mode-errors.d.mts +1 -2
- package/dist/substrate/runtime/mode-errors.mjs.map +1 -1
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +1 -11
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
- package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -1
- package/dist/substrate/runtime/observability/index.d.mts +1 -1
- package/dist/substrate/runtime/observability/index.mjs +4 -6
- package/dist/substrate/runtime/observability/log-attrs.mjs +46 -0
- package/dist/substrate/runtime/observability/log-attrs.mjs.map +1 -0
- package/dist/substrate/runtime/observability/log-store.mjs.map +1 -1
- package/dist/substrate/runtime/observability/logger.mjs +3 -3
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
- package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -1
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
- package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -1
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +2 -2
- package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -1
- package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -1
- package/dist/substrate/runtime/paths.mjs +27 -9
- package/dist/substrate/runtime/paths.mjs.map +1 -1
- package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -1
- package/dist/substrate/runtime/port-broker/service.mjs +10 -27
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/probes.d.mts +2 -3
- package/dist/substrate/runtime/probes.mjs.map +1 -1
- package/dist/substrate/runtime/process-supervisor.mjs.map +1 -1
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
- package/dist/substrate/runtime/projection/update.mjs +87 -11
- package/dist/substrate/runtime/projection/update.mjs.map +1 -1
- package/dist/substrate/runtime/random-suffix.mjs.map +1 -1
- package/dist/substrate/runtime/reconcile/fs-plan.mjs +146 -0
- package/dist/substrate/runtime/reconcile/fs-plan.mjs.map +1 -0
- package/dist/substrate/runtime/reconcile/graph.mjs +19 -0
- package/dist/substrate/runtime/reconcile/graph.mjs.map +1 -0
- package/dist/substrate/runtime/reconcile/index.mjs +5 -0
- package/dist/substrate/runtime/reconcile/label.mjs +41 -0
- package/dist/substrate/runtime/reconcile/label.mjs.map +1 -0
- package/dist/substrate/runtime/reconcile/spec.mjs +15 -0
- package/dist/substrate/runtime/reconcile/spec.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +2 -3
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
- package/dist/substrate/runtime/routed-url.mjs.map +1 -1
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
- package/dist/substrate/runtime/stage-and-swap/index.mjs +49 -12
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/service.mjs +29 -17
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
- package/dist/substrate/runtime/subnet-broker.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/acquire-node.mjs +188 -56
- package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/background-tasks.mjs +79 -65
- package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/command-loop.mjs +82 -23
- package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs +16 -0
- package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/errors.mjs +11 -2
- package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/index.mjs +2 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs +6 -6
- package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs +60 -70
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/state.d.mts +1 -1
- package/dist/substrate/runtime/supervisor/state.mjs +1 -1
- package/dist/substrate/runtime/supervisor/state.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/teardown.mjs +10 -9
- package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/wiring.mjs +6 -20
- package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -1
- package/dist/substrate/runtime/tar/reader.mjs +216 -0
- package/dist/substrate/runtime/tar/reader.mjs.map +1 -0
- package/dist/substrate/runtime/typed-env.mjs.map +1 -1
- package/dist/substrate/versioned-doc-schema.mjs.map +1 -1
- package/dist/substrate/versioned-doc-sync.mjs +5 -5
- package/dist/substrate/versioned-doc-sync.mjs.map +1 -1
- package/dist/surfaces/cli/command-tree.mjs +49 -7
- package/dist/surfaces/cli/command-tree.mjs.map +1 -1
- package/dist/surfaces/cli/commands/config.mjs +1 -1
- package/dist/surfaces/cli/commands/config.mjs.map +1 -1
- package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -1
- package/dist/surfaces/cli/commands/confirm.mjs.map +1 -1
- package/dist/surfaces/cli/commands/doctor.mjs +1 -1
- package/dist/surfaces/cli/commands/doctor.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune.mjs +1 -1
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
- package/dist/surfaces/cli/commands/snapshot.mjs +1 -1
- package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -1
- package/dist/surfaces/cli/commands/status.mjs +1 -1
- package/dist/surfaces/cli/commands/status.mjs.map +1 -1
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
- package/dist/surfaces/cli/commands/wipe.mjs +3 -4
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
- package/dist/surfaces/cli/envelope.mjs.map +1 -1
- package/dist/surfaces/cli/errors.mjs.map +1 -1
- package/dist/surfaces/cli/flags.mjs.map +1 -1
- package/dist/surfaces/cli/index.mjs +45 -14
- package/dist/surfaces/cli/index.mjs.map +1 -1
- package/dist/surfaces/cli/output.mjs.map +1 -1
- package/dist/surfaces/cli/sysexits.mjs.map +1 -1
- package/dist/surfaces/tui/app.mjs +0 -21
- package/dist/surfaces/tui/app.mjs.map +1 -1
- package/dist/surfaces/tui/dashboard.mjs +0 -48
- package/dist/surfaces/tui/dashboard.mjs.map +1 -1
- package/dist/surfaces/tui/display-derivation.mjs +80 -16
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
- package/dist/surfaces/tui/errors.mjs.map +1 -1
- package/dist/surfaces/tui/event-log.mjs +0 -9
- package/dist/surfaces/tui/event-log.mjs.map +1 -1
- package/dist/surfaces/tui/heartbeat.mjs.map +1 -1
- package/dist/surfaces/tui/index.mjs +2 -2
- package/dist/surfaces/tui/index.mjs.map +1 -1
- package/dist/surfaces/tui/input.mjs.map +1 -1
- package/dist/surfaces/tui/mode-detect.mjs.map +1 -1
- package/dist/surfaces/tui/mount-ink.mjs.map +1 -1
- package/dist/surfaces/tui/plain-renderer.mjs +26 -19
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
- package/dist/surfaces/tui/resource-table.mjs +8 -10
- package/dist/surfaces/tui/resource-table.mjs.map +1 -1
- package/images/postgres/Dockerfile +0 -1
- package/images/sui/Dockerfile +27 -54
- package/images/sui/entrypoint.sh +17 -179
- package/package.json +23 -15
- package/dashboard-ui/assets/index-Bmi1UtAg.js +0 -1356
- package/dashboard-ui/assets/index-D5EShVt4.js +0 -3
- package/dashboard-ui/assets/index-Deml9drg.css +0 -1
- package/dist/api/plugin-errors.d.mts +0 -7
- package/dist/api/plugin-errors.mjs +0 -10
- package/dist/api/plugin-errors.mjs.map +0 -1
- package/dist/cli/wirings/build-verb-layers.mjs +0 -42
- package/dist/cli/wirings/build-verb-layers.mjs.map +0 -1
- package/dist/contracts/capability-decl.d.mts +0 -40
- package/dist/orchestrators/built-in-plugin-layers.mjs +0 -54
- package/dist/orchestrators/built-in-plugin-layers.mjs.map +0 -1
- package/dist/orchestrators/run.mjs +0 -91
- package/dist/orchestrators/run.mjs.map +0 -1
- package/dist/orchestrators/runtime-composition.d.mts +0 -10
- package/dist/orchestrators/runtime-composition.mjs +0 -252
- package/dist/orchestrators/runtime-composition.mjs.map +0 -1
- package/dist/orchestrators/snapshot/capture-command.d.mts +0 -1
- package/dist/orchestrators/snapshot/capture-command.mjs +0 -25
- package/dist/orchestrators/snapshot/capture-command.mjs.map +0 -1
- package/dist/orchestrators/snapshot/pending-marker.mjs +0 -99
- package/dist/orchestrators/snapshot/pending-marker.mjs.map +0 -1
- package/dist/orchestrators/snapshot/recover-pending.mjs +0 -223
- package/dist/orchestrators/snapshot/recover-pending.mjs.map +0 -1
- package/dist/orchestrators/snapshot/state-document.d.mts +0 -1
- package/dist/orchestrators/snapshot/state-document.mjs +0 -58
- package/dist/orchestrators/snapshot/state-document.mjs.map +0 -1
- package/dist/plugins/account/spans.mjs +0 -16
- package/dist/plugins/account/spans.mjs.map +0 -1
- package/dist/plugins/account/variants/env.mjs +0 -24
- package/dist/plugins/account/variants/env.mjs.map +0 -1
- package/dist/plugins/account/variants/inline.mjs +0 -13
- package/dist/plugins/account/variants/inline.mjs.map +0 -1
- package/dist/plugins/account/variants/keystore.mjs +0 -91
- package/dist/plugins/account/variants/keystore.mjs.map +0 -1
- package/dist/plugins/action/spans.mjs +0 -11
- package/dist/plugins/action/spans.mjs.map +0 -1
- package/dist/plugins/coin/spans.mjs +0 -20
- package/dist/plugins/coin/spans.mjs.map +0 -1
- package/dist/plugins/deepbook/spans.mjs +0 -18
- package/dist/plugins/deepbook/spans.mjs.map +0 -1
- package/dist/plugins/faucet/spans.mjs +0 -12
- package/dist/plugins/faucet/spans.mjs.map +0 -1
- package/dist/plugins/package/spans.mjs +0 -14
- package/dist/plugins/package/spans.mjs.map +0 -1
- package/dist/plugins/postgres/codegen.mjs +0 -42
- package/dist/plugins/postgres/codegen.mjs.map +0 -1
- package/dist/plugins/postgres/connection.d.mts +0 -33
- package/dist/plugins/postgres/connection.mjs.map +0 -1
- package/dist/plugins/postgres/db-ensure.mjs.map +0 -1
- package/dist/plugins/postgres/errors.d.mts +0 -60
- package/dist/plugins/postgres/errors.mjs +0 -29
- package/dist/plugins/postgres/errors.mjs.map +0 -1
- package/dist/plugins/postgres/index.d.mts +0 -37
- package/dist/plugins/postgres/index.mjs +0 -68
- package/dist/plugins/postgres/index.mjs.map +0 -1
- package/dist/plugins/postgres/routable.mjs +0 -33
- package/dist/plugins/postgres/routable.mjs.map +0 -1
- package/dist/plugins/postgres/service.d.mts +0 -50
- package/dist/plugins/postgres/service.mjs +0 -179
- package/dist/plugins/postgres/service.mjs.map +0 -1
- package/dist/plugins/postgres/snapshot.mjs +0 -32
- package/dist/plugins/postgres/snapshot.mjs.map +0 -1
- package/dist/plugins/postgres/spans.mjs +0 -11
- package/dist/plugins/postgres/spans.mjs.map +0 -1
- package/dist/plugins/seal/spans.mjs +0 -18
- package/dist/plugins/seal/spans.mjs.map +0 -1
- package/dist/plugins/sui/spans.mjs +0 -17
- package/dist/plugins/sui/spans.mjs.map +0 -1
- package/dist/plugins/wallet/spans.mjs +0 -22
- package/dist/plugins/wallet/spans.mjs.map +0 -1
- package/dist/plugins/walrus/registry-publish.d.mts +0 -24
- package/dist/plugins/walrus/spans.mjs +0 -18
- package/dist/plugins/walrus/spans.mjs.map +0 -1
- package/dist/runtime/docker/logs.d.mts +0 -1
- package/dist/runtime/docker/logs.mjs +0 -34
- package/dist/runtime/docker/logs.mjs.map +0 -1
- package/dist/substrate/runtime/artifact-publisher/index.mjs +0 -86
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +0 -1
- package/dist/substrate/runtime/capability-sinks/index.d.mts +0 -1
- package/dist/substrate/runtime/capability-sinks/index.mjs +0 -3
- package/dist/substrate/runtime/capability-sinks/layer.d.mts +0 -1
- package/dist/substrate/runtime/capability-sinks/layer.mjs +0 -31
- package/dist/substrate/runtime/capability-sinks/layer.mjs.map +0 -1
- package/dist/substrate/runtime/capability-sinks/service.d.mts +0 -95
- package/dist/substrate/runtime/capability-sinks/service.mjs +0 -69
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +0 -1
- package/dist/substrate/runtime/cross-process/lock.d.mts +0 -1
- package/dist/substrate/runtime/cross-process/lock.mjs +0 -23
- package/dist/substrate/runtime/cross-process/lock.mjs.map +0 -1
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +0 -113
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +0 -1
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +0 -31
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +0 -1
- package/dist/substrate/runtime/observability/formatter-registry.d.mts +0 -1
- package/dist/substrate/runtime/observability/formatter-registry.mjs +0 -48
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +0 -1
- package/dist/substrate/runtime/observability/span-store.d.mts +0 -1
- package/dist/substrate/runtime/observability/span-store.mjs +0 -110
- package/dist/substrate/runtime/observability/span-store.mjs.map +0 -1
- package/dist/substrate/runtime/observability/spans.d.mts +0 -1
- package/dist/substrate/runtime/observability/spans.mjs +0 -87
- package/dist/substrate/runtime/observability/spans.mjs.map +0 -1
- package/dist/substrate/runtime/projection/index.mjs +0 -4
- package/dist/substrate/runtime/projection/persisted.mjs +0 -213
- package/dist/substrate/runtime/projection/persisted.mjs.map +0 -1
- package/dist/substrate/runtime/scoped-multimap/service.mjs +0 -52
- package/dist/substrate/runtime/scoped-multimap/service.mjs.map +0 -1
- package/dist/substrate/runtime/scoped-ref-map/index.mjs +0 -2
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +0 -83
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +0 -1
- package/dist/substrate/runtime/state-store/index.mjs +0 -3
- package/dist/substrate/runtime/state-store/schema.d.mts +0 -1
- package/dist/substrate/runtime/state-store/schema.mjs +0 -41
- package/dist/substrate/runtime/state-store/schema.mjs.map +0 -1
- package/dist/substrate/runtime/state-store/service.d.mts +0 -1
- package/dist/substrate/runtime/state-store/service.mjs +0 -145
- package/dist/substrate/runtime/state-store/service.mjs.map +0 -1
- package/dist/substrate/runtime/sui-execute/index.mjs.map +0 -1
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +0 -1
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +0 -1
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +0 -1
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +0 -151
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +0 -1
- package/dist/substrate/state-store.d.mts +0 -1
- /package/dist/orchestrators/{snapshot/pending-marker.d.mts → codegen/id-config.d.mts} +0 -0
- /package/dist/orchestrators/snapshot/{recover-pending.d.mts → interrupted-restore.d.mts} +0 -0
- /package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.d.mts +0 -0
- /package/dist/plugins/{postgres/snapshot.d.mts → sui/ledger/object-ref.d.mts} +0 -0
- /package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.d.mts +0 -0
- /package/dist/substrate/runtime/{state-store/index.d.mts → reconcile/graph.d.mts} +0 -0
- /package/dist/substrate/runtime/{cross-process/snapshot-reservation.d.mts → supervisor/contribution-dispatcher.d.mts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"codegen.mjs","names":[],"sources":["../../../src/plugins/walrus/codegen.ts"],"sourcesContent":["// Walrus plugin — Codegenable contribution
|
|
1
|
+
{"version":3,"file":"codegen.mjs","names":[],"sources":["../../../src/plugins/walrus/codegen.ts"],"sourcesContent":["// Walrus plugin — Codegenable contribution, via the UNIFIED config-binding\n// declaration.\n//\n// Walrus's contribution is the SDK-ready `packageConfig` shape that the\n// `@mysten/walrus` SDK consumes — `{systemObjectId, stakingPoolId,\n// exchangeIds}` — plus the proxy / aggregator / publisher URLs for HTTP\n// consumers. Walrus is single-instance per stack, so it exports `walrus`\n// directly (a FLAT bucket, not name-keyed like coin/seal).\n//\n// ONE declaration, TWO derivations (see `contracts/config-bindings.ts`):\n// - LIVE (boot): bakes the resolved ids / URLs into the ephemeral tree AND\n// feeds the generic id-config `values` channel.\n// - STATIC (committed tree): emits `resolveValue('walrus', '<key>')` so the\n// committed `walrus.ts` carries NO baked object id / endpoint URL.\n//\n// STRUCTURAL fields (`mode`, `network`) stay literals; the on-chain ids,\n// coin type, endpoint URLs, and the storage-node committee are RUNTIME\n// (loaded config data). The composite `packageConfig` / `nodes` values are\n// resolved as whole-value blobs (the array/optional shapes don't split into\n// the flat config-path model).\n\nimport type { CodegenableDecl } from '../../contracts/codegenable.ts';\nimport {\n\tconfigCodegenable,\n\ttype ConfigBinding,\n\ttype ConfigBindingSet,\n} from '../../contracts/config-bindings.ts';\nimport type { JsonValue } from '../../orchestrators/codegen/id-config.ts';\n\n/** Per-node descriptor. */\nexport interface WalrusNodeBinding {\n\treadonly nodeIndex: number;\n\treadonly publicHostname: string;\n\treadonly rpcUrl: string;\n}\n\n/** The typed shape the emitted file exports. */\nexport interface WalrusBindings {\n\treadonly mode: 'local' | 'known';\n\treadonly network: string;\n\treadonly walrusPackageId: string | null;\n\treadonly walPackageId: string | null;\n\treadonly walCoinType: string | null;\n\treadonly packageConfig: {\n\t\treadonly systemObjectId: string;\n\t\treadonly stakingPoolId: string;\n\t\treadonly exchangeIds?: ReadonlyArray<string>;\n\t};\n\treadonly proxyUrl: string | null;\n\treadonly aggregatorUrl: string | null;\n\treadonly publisherUrl: string | null;\n\treadonly nodes: ReadonlyArray<WalrusNodeBinding>;\n}\n\n/** Inputs to the LIVE codegen contribution — supplied at acquire-time. */\nexport interface MakeCodegenableInputs {\n\treadonly mode: 'local' | 'known';\n\treadonly network: string;\n\treadonly walrusPackageId: string | null;\n\treadonly walPackageId: string | null;\n\treadonly walCoinType: string | null;\n\treadonly systemObjectId: string;\n\treadonly stakingPoolId: string;\n\treadonly exchangeIds: ReadonlyArray<string>;\n\treadonly proxyUrl: string | null;\n\treadonly aggregatorUrl: string | null;\n\treadonly publisherUrl: string | null;\n\treadonly nodes: ReadonlyArray<WalrusNodeBinding>;\n}\n\n/** User-declared known-deployment ids / URLs, available at factory time. A\n * KNOWN deployment's values are DECLARED config (not loaded-at-runtime data),\n * so the committed `walrus.ts` bakes them as LITERALS. Absent for a `local`\n * (dev-deployed) cluster whose ids/URLs are dynamic. */\nexport interface WalrusKnownConfig {\n\treadonly walrusPackageId: string | null;\n\treadonly walPackageId: string | null;\n\treadonly walCoinType: string | null;\n\treadonly packageConfig: WalrusBindings['packageConfig'];\n\treadonly proxyUrl: string | null;\n\treadonly aggregatorUrl: string | null;\n\treadonly publisherUrl: string | null;\n\treadonly nodes: ReadonlyArray<WalrusNodeBinding>;\n}\n\n/** Static-config shape — what walrus knows BEFORE acquire. When `known` is\n * present (known mode), its declared ids/URLs are baked as literals;\n * otherwise (local mode) every id/URL resolves at app build/dev time. */\nexport interface WalrusStaticConfig {\n\treadonly mode: 'local' | 'known';\n\treadonly network: string;\n\treadonly known?: WalrusKnownConfig;\n}\n\nconst NAMESPACE = 'walrus';\n\n/** TS source-type strings for the resolved walrus fields — keeps the committed\n * `walrus.ts` typed as `WalrusBindings` declares (the generic `resolveValue`\n * channel would otherwise return `unknown`). Composite blobs inline their\n * structural literal types so no emitted type-import is needed. */\nconst PACKAGE_CONFIG_TS_TYPE =\n\t'{ readonly systemObjectId: string; readonly stakingPoolId: string; readonly exchangeIds?: ReadonlyArray<string> }';\nconst NODES_TS_TYPE =\n\t'ReadonlyArray<{ readonly nodeIndex: number; readonly publicHostname: string; readonly rpcUrl: string }>';\n\n/** The walrus config bindings, declared ONCE. `mode` / `network` are\n * structural literals; every id / coin type / URL / committee value is a\n * RESOLVED binding on the generic `resolveValue('walrus', '<key>')` channel.\n * Both the live boot decl and the static committed-tree decl derive from it. */\nconst walrusConfigBindings = (\n\tstructural: WalrusStaticConfig,\n): ConfigBindingSet<MakeCodegenableInputs> => {\n\tconst known = structural.known;\n\t// A known deployment's declared ids/URLs are config (literal); a local\n\t// cluster's are dynamically deployed (resolved at app build/dev time).\n\tconst field = (\n\t\tkey:\n\t\t\t| 'walrusPackageId'\n\t\t\t| 'walPackageId'\n\t\t\t| 'walCoinType'\n\t\t\t| 'proxyUrl'\n\t\t\t| 'aggregatorUrl'\n\t\t\t| 'publisherUrl',\n\t\tlive: (i: MakeCodegenableInputs) => JsonValue,\n\t): ConfigBinding<MakeCodegenableInputs> =>\n\t\tknown !== undefined\n\t\t\t? { variant: 'literal', configPath: [key], value: known[key] }\n\t\t\t: {\n\t\t\t\t\tvariant: 'resolved',\n\t\t\t\t\tconfigPath: [key],\n\t\t\t\t\tnamespace: NAMESPACE,\n\t\t\t\t\tkey,\n\t\t\t\t\ttsType: 'string | null',\n\t\t\t\t\tlive,\n\t\t\t\t};\n\tconst packageConfigBinding: ConfigBinding<MakeCodegenableInputs> =\n\t\tknown !== undefined\n\t\t\t? {\n\t\t\t\t\tvariant: 'literal',\n\t\t\t\t\tconfigPath: ['packageConfig'],\n\t\t\t\t\tvalue: known.packageConfig as JsonValue,\n\t\t\t\t}\n\t\t\t: {\n\t\t\t\t\tvariant: 'resolved',\n\t\t\t\t\tconfigPath: ['packageConfig'],\n\t\t\t\t\tnamespace: NAMESPACE,\n\t\t\t\t\tkey: 'packageConfig',\n\t\t\t\t\ttsType: PACKAGE_CONFIG_TS_TYPE,\n\t\t\t\t\tlive: (i) =>\n\t\t\t\t\t\t({\n\t\t\t\t\t\t\tsystemObjectId: i.systemObjectId,\n\t\t\t\t\t\t\tstakingPoolId: i.stakingPoolId,\n\t\t\t\t\t\t\t...(i.exchangeIds.length > 0 ? { exchangeIds: [...i.exchangeIds] } : {}),\n\t\t\t\t\t\t}) as JsonValue,\n\t\t\t\t};\n\tconst nodesBinding: ConfigBinding<MakeCodegenableInputs> =\n\t\tknown !== undefined\n\t\t\t? { variant: 'literal', configPath: ['nodes'], value: known.nodes as unknown as JsonValue }\n\t\t\t: {\n\t\t\t\t\tvariant: 'resolved',\n\t\t\t\t\tconfigPath: ['nodes'],\n\t\t\t\t\tnamespace: NAMESPACE,\n\t\t\t\t\tkey: 'nodes',\n\t\t\t\t\ttsType: NODES_TS_TYPE,\n\t\t\t\t\tlive: (i) => i.nodes as unknown as JsonValue,\n\t\t\t\t};\n\tconst bindings: ReadonlyArray<ConfigBinding<MakeCodegenableInputs>> = [\n\t\t{ variant: 'literal', configPath: ['mode'], value: structural.mode },\n\t\t{ variant: 'literal', configPath: ['network'], value: structural.network },\n\t\tfield('walrusPackageId', (i) => i.walrusPackageId),\n\t\tfield('walPackageId', (i) => i.walPackageId),\n\t\tfield('walCoinType', (i) => i.walCoinType),\n\t\tpackageConfigBinding,\n\t\tfield('proxyUrl', (i) => i.proxyUrl),\n\t\tfield('aggregatorUrl', (i) => i.aggregatorUrl),\n\t\tfield('publisherUrl', (i) => i.publisherUrl),\n\t\tnodesBinding,\n\t];\n\treturn {\n\t\tbucket: 'walrus.ts',\n\t\tkind: 'walrus',\n\t\temitterName: 'walrus-network',\n\t\tbindings,\n\t};\n};\n\n/** Construct the LIVE Codegenable contribution. Bakes the resolved ids /\n * URLs into the ephemeral tree + feeds the generic id-config `values`\n * channel. */\nexport const makeCodegenable = (inputs: MakeCodegenableInputs): CodegenableDecl =>\n\tconfigCodegenable(walrusConfigBindings({ mode: inputs.mode, network: inputs.network }), {\n\t\tmode: 'live',\n\t\tstate: inputs,\n\t});\n\n/** Construct the STATIC (stack-free) Codegenable contribution. Emits\n * `resolveValue('walrus', '<key>')` for the runtime fields; the committed\n * `walrus.ts` carries no baked object id / endpoint URL. */\nexport const makeWalrusStaticCodegen = (config: WalrusStaticConfig): CodegenableDecl =>\n\tconfigCodegenable(walrusConfigBindings(config), 'static');\n"],"mappings":";;AA8FA,MAAM,YAAY;;;;;AAMlB,MAAM,yBACL;AACD,MAAM,gBACL;;;;;AAMD,MAAM,wBACL,eAC6C;CAC7C,MAAM,QAAQ,WAAW;CAGzB,MAAM,SACL,KAOA,SAEA,UAAU,KAAA,IACP;EAAE,SAAS;EAAW,YAAY,CAAC,GAAG;EAAG,OAAO,MAAM;CAAK,IAC3D;EACA,SAAS;EACT,YAAY,CAAC,GAAG;EAChB,WAAW;EACX;EACA,QAAQ;EACR;CACD;CACH,MAAM,uBACL,UAAU,KAAA,IACP;EACA,SAAS;EACT,YAAY,CAAC,eAAe;EAC5B,OAAO,MAAM;CACd,IACC;EACA,SAAS;EACT,YAAY,CAAC,eAAe;EAC5B,WAAW;EACX,KAAK;EACL,QAAQ;EACR,OAAO,OACL;GACA,gBAAgB,EAAE;GAClB,eAAe,EAAE;GACjB,GAAI,EAAE,YAAY,SAAS,IAAI,EAAE,aAAa,CAAC,GAAG,EAAE,WAAW,EAAE,IAAI,CAAC;EACvE;CACF;CACH,MAAM,eACL,UAAU,KAAA,IACP;EAAE,SAAS;EAAW,YAAY,CAAC,OAAO;EAAG,OAAO,MAAM;CAA8B,IACxF;EACA,SAAS;EACT,YAAY,CAAC,OAAO;EACpB,WAAW;EACX,KAAK;EACL,QAAQ;EACR,OAAO,MAAM,EAAE;CAChB;CAaH,OAAO;EACN,QAAQ;EACR,MAAM;EACN,aAAa;EACb,UAAA;GAfA;IAAE,SAAS;IAAW,YAAY,CAAC,MAAM;IAAG,OAAO,WAAW;GAAK;GACnE;IAAE,SAAS;IAAW,YAAY,CAAC,SAAS;IAAG,OAAO,WAAW;GAAQ;GACzE,MAAM,oBAAoB,MAAM,EAAE,eAAe;GACjD,MAAM,iBAAiB,MAAM,EAAE,YAAY;GAC3C,MAAM,gBAAgB,MAAM,EAAE,WAAW;GACzC;GACA,MAAM,aAAa,MAAM,EAAE,QAAQ;GACnC,MAAM,kBAAkB,MAAM,EAAE,aAAa;GAC7C,MAAM,iBAAiB,MAAM,EAAE,YAAY;GAC3C;EAMO;CACR;AACD;;;;AAKA,MAAa,mBAAmB,WAC/B,kBAAkB,qBAAqB;CAAE,MAAM,OAAO;CAAM,SAAS,OAAO;AAAQ,CAAC,GAAG;CACvF,MAAM;CACN,OAAO;AACR,CAAC;;;;AAKF,MAAa,2BAA2B,WACvC,kBAAkB,qBAAqB,MAAM,GAAG,QAAQ"}
|
|
@@ -8,9 +8,8 @@ import { join, relative } from "node:path";
|
|
|
8
8
|
* input (e.g. a single-segment path under `/`) would silently
|
|
9
9
|
* return `/`, and the bind-mount would mount the host root into
|
|
10
10
|
* the container — a load-bearing footgun. We now require the
|
|
11
|
-
* caller to pass `stackRoot` explicitly
|
|
12
|
-
*
|
|
13
|
-
* seal / wallet plugins) and assert the deploy dir lives under it.
|
|
11
|
+
* caller to pass `stackRoot` explicitly and assert the deploy dir
|
|
12
|
+
* lives under it.
|
|
14
13
|
*
|
|
15
14
|
* The mount source is `stackRoot`; the in-container path is
|
|
16
15
|
* re-derived through `relative(stackRoot, deployOutputDirHostPath)`. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-paths.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy-paths.ts"],"sourcesContent":["import { join, relative } from 'node:path';\n\nexport interface WalrusDeployMountPaths {\n\treadonly sourceHostPath: string;\n\treadonly mountTarget: string;\n\treadonly outputDirInContainer: string;\n}\n\n/** Compute the bind-mount triple shared by the walrus deploy\n * one-shot + storage nodes.\n *\n * Previous implementation walked up exactly three levels with\n * `dirname(dirname(dirname(deployOutputDirHostPath)))`. A shorter\n * input (e.g. a single-segment path under `/`) would silently\n * return `/`, and the bind-mount would mount the host root into\n * the container — a load-bearing footgun. We now require the\n * caller to pass `stackRoot` explicitly
|
|
1
|
+
{"version":3,"file":"deploy-paths.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy-paths.ts"],"sourcesContent":["import { join, relative } from 'node:path';\n\nexport interface WalrusDeployMountPaths {\n\treadonly sourceHostPath: string;\n\treadonly mountTarget: string;\n\treadonly outputDirInContainer: string;\n}\n\n/** Compute the bind-mount triple shared by the walrus deploy\n * one-shot + storage nodes.\n *\n * Previous implementation walked up exactly three levels with\n * `dirname(dirname(dirname(deployOutputDirHostPath)))`. A shorter\n * input (e.g. a single-segment path under `/`) would silently\n * return `/`, and the bind-mount would mount the host root into\n * the container — a load-bearing footgun. We now require the\n * caller to pass `stackRoot` explicitly and assert the deploy dir\n * lives under it.\n *\n * The mount source is `stackRoot`; the in-container path is\n * re-derived through `relative(stackRoot, deployOutputDirHostPath)`. */\nexport const walrusDeployMountPaths = (input: {\n\treadonly stackRoot: string;\n\treadonly deployOutputDirHostPath: string;\n\treadonly mountTarget: string;\n}): WalrusDeployMountPaths => {\n\tconst { stackRoot, deployOutputDirHostPath, mountTarget } = input;\n\tconst rel = relative(stackRoot, deployOutputDirHostPath);\n\tif (rel.length === 0 || rel.startsWith('..')) {\n\t\tthrow new Error(\n\t\t\t`walrusDeployMountPaths: deployOutputDirHostPath (${deployOutputDirHostPath}) ` +\n\t\t\t\t`must be a descendant of stackRoot (${stackRoot}). ` +\n\t\t\t\t`Cross-check the StackPathsService thread + the deploy directory layout.`,\n\t\t);\n\t}\n\tconst outputDirInContainer = join(mountTarget, rel);\n\treturn { sourceHostPath: stackRoot, mountTarget, outputDirInContainer };\n};\n"],"mappings":";;;;;;;;;;;;;;;AAqBA,MAAa,0BAA0B,UAIT;CAC7B,MAAM,EAAE,WAAW,yBAAyB,gBAAgB;CAC5D,MAAM,MAAM,SAAS,WAAW,uBAAuB;CACvD,IAAI,IAAI,WAAW,KAAK,IAAI,WAAW,IAAI,GAC1C,MAAM,IAAI,MACT,oDAAoD,wBAAwB,uCACrC,UAAU,2EAElD;CAGD,OAAO;EAAE,gBAAgB;EAAW;EAAa,sBADpB,KAAK,aAAa,GACqB;CAAE;AACvE"}
|
|
@@ -6,7 +6,6 @@ import { DEPLOY_BIND_SOURCE_RETRY_PROFILE, makeSpacedRetrySchedule } from "../..
|
|
|
6
6
|
import { HOST_GATEWAY_EXTRA_HOSTS } from "../../substrate/runtime/host-gateway.mjs";
|
|
7
7
|
import { walrusDeployMountPaths } from "./deploy-paths.mjs";
|
|
8
8
|
import { walrusPluginError } from "./errors.mjs";
|
|
9
|
-
import { WalrusSpans } from "./spans.mjs";
|
|
10
9
|
import { formatUnknownError } from "../../substrate/runtime/format-unknown-error.mjs";
|
|
11
10
|
import { artifactPublishError } from "../../primitives/artifact-publisher.mjs";
|
|
12
11
|
import { hostBindMountOwner } from "../../substrate/runtime/host-bind-mount-owner.mjs";
|
|
@@ -18,12 +17,26 @@ Schema.Struct({
|
|
|
18
17
|
stakingObjectId: Schema.String
|
|
19
18
|
});
|
|
20
19
|
const SuiObjectExistsShape = Schema.Struct({ objectId: Schema.String });
|
|
21
|
-
/**
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
20
|
+
/** Short readiness tolerance for a transient not-found on the cached
|
|
21
|
+
* deploy objects (sui/system/staking).
|
|
22
|
+
*
|
|
23
|
+
* The big post-restore catch-up window — `sui start` re-executes its
|
|
24
|
+
* committed checkpoint store from seq=0, and `getObject(systemObject)`
|
|
25
|
+
* reads not-found until the replay reaches the object's checkpoint — is
|
|
26
|
+
* now absorbed by the sui plugin's caught-up-to-head ready-gate
|
|
27
|
+
* (`waitForCheckpointCatchUp` in plugins/sui/mode/local.ts): the
|
|
28
|
+
* validator does not report ready until its head has stabilized to live
|
|
29
|
+
* cadence, so by the time this verify runs the committed deploy objects
|
|
30
|
+
* are already served. This budget only needs to cover the small RPC
|
|
31
|
+
* index-visibility lag, NOT the whole replay.
|
|
32
|
+
*
|
|
33
|
+
* If it gives up too soon it reads the objects as not-found and triggers
|
|
34
|
+
* a SPURIOUS redeploy, which mints FRESH walrus ids and orphans every
|
|
35
|
+
* pre-snapshot blob (the snapshot-survival-matrix walrus-S2 failure:
|
|
36
|
+
* "Too many failures while writing blob to nodes"). A genuinely-wiped
|
|
37
|
+
* chain still redeploys once the budget lapses.
|
|
38
|
+
*
|
|
39
|
+
* Budget: 5 probes × 3s = 15s. */
|
|
27
40
|
const WALRUS_DEPLOY_VERIFY_READINESS_RETRIES = 5;
|
|
28
41
|
const WALRUS_DEPLOY_VERIFY_READINESS_DELAY = "3 seconds";
|
|
29
42
|
const requiredDeployOutputFiles = (inputs) => [join(inputs.outputDirHostPath, "deploy"), ...Array.from({ length: inputs.committeeSize }, (_, nodeIndex) => [
|
|
@@ -57,8 +70,8 @@ const deployExitDetail = (result, inputs) => {
|
|
|
57
70
|
const isBindSourceMissing = (result) => result.exitCode === 125 && /bind source path does not exist/i.test(result.stderr) && /invalid mount config/i.test(result.stderr);
|
|
58
71
|
/** Parse the walrus deploy output into a `CachedDeployState`.
|
|
59
72
|
*
|
|
60
|
-
* Expected output format (best-effort match against the
|
|
61
|
-
* deploy stdout —
|
|
73
|
+
* Expected output format (best-effort match against the walrus
|
|
74
|
+
* binary's deploy stdout — its exact format may drift between
|
|
62
75
|
* versions):
|
|
63
76
|
*
|
|
64
77
|
* walrus_package_id: 0x<hex>
|
|
@@ -163,11 +176,8 @@ const runDeployOneShot = (runtime, inputs) => Effect.gen(function* () {
|
|
|
163
176
|
stderr: result.stderr
|
|
164
177
|
}));
|
|
165
178
|
return parsed;
|
|
166
|
-
}).pipe(Effect.
|
|
167
|
-
|
|
168
|
-
[WalrusSpans.shards]: inputs.shards
|
|
169
|
-
} }), Effect.timeoutOrElse({
|
|
170
|
-
duration: Duration.millis(DEPLOY_TIMEOUT_MS + 5e3),
|
|
179
|
+
}).pipe(Effect.timeoutOrElse({
|
|
180
|
+
duration: Duration.millis(305e3),
|
|
171
181
|
orElse: () => Effect.fail(walrusPluginError("deploy", `walrus deploy: outer timeout ${DEPLOY_TIMEOUT_MS}ms exceeded`))
|
|
172
182
|
}));
|
|
173
183
|
/** Compose the ArtifactSpec for a walrus deploy and dispatch
|
|
@@ -207,15 +217,12 @@ const deployWalrusContracts = (publisher, probe, runtime, inputs) => Effect.gen(
|
|
|
207
217
|
};
|
|
208
218
|
}).pipe(Effect.catchTag("ChainProbeError", (err) => {
|
|
209
219
|
if (err.reason === "decode-failed" || err.reason === "no-probe-registered") return Effect.succeed(null);
|
|
210
|
-
return Effect.logWarning(`walrus.deploy verify probe surfaced an authoritative error (reason=${err.reason}, chain=${err.
|
|
220
|
+
return Effect.logWarning(`walrus.deploy verify probe surfaced an authoritative error (reason=${err.reason}, chain=${err.chainId}, detail=${err.detail}); re-deploying.`).pipe(Effect.as(null));
|
|
211
221
|
})),
|
|
212
222
|
produce: runDeployOneShot(runtime, inputs).pipe(Effect.mapError((err) => artifactPublishError("produce-failed", `walrus.deploy ${err.phase}: ${err.message}`))),
|
|
213
223
|
register: () => Effect.void
|
|
214
224
|
}) };
|
|
215
|
-
})
|
|
216
|
-
[WalrusSpans.name]: inputs.walrusName,
|
|
217
|
-
[WalrusSpans.chain]: inputs.chainId
|
|
218
|
-
} }));
|
|
225
|
+
});
|
|
219
226
|
//#endregion
|
|
220
227
|
export { deployWalrusContracts };
|
|
221
228
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy.ts"],"sourcesContent":["// Walrus deploy one-shot — Move publish via ArtifactPublisher.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 2\"):\n// the `walrus-deploy` one-shot:\n// - publishes the Walrus Move package on the local sui chain,\n// - mints a WAL exchange,\n// - emits per-node config files (`dryrun-node-<i>.yaml`,\n// `dryrun-node-<i>.keystore`) under `runtime/walrus/<name>/deploy/`.\n//\n// We route this through the substrate's `ArtifactPublisher`\n// primitive (architecture §10 — \"callable from any plugin; no\n// plugin-side contract to implement\"). The publisher owns:\n// - cache key derivation (folds `chainId`),\n// - verify probe (lenient — re-derives on transient RPC failure),\n// - produce-on-miss (runs `walrus-deploy`),\n// - register-on-every-cycle (so downstream consumers always see\n// the resolved state).\n//\n// Distilled-doc invariants honored here:\n// - 5: cache key folds `chainId`.\n// - 6: verify checks BOTH the on-disk `deploy` file AND on-chain\n// object existence (system + staking). Either failure\n// invalidates and re-deploys.\n// - 7: `runtime/walrus/<name>/deploy/` rides the snapshot tar\n// (declared via `Snapshotable.subtrees` in `snapshot.ts`).\n// - 10: deploy summary must contain `package_id` + `system_object`\n// + `staking_object`. We surface parse failure as\n// `WalrusPluginError{phase: 'deploy'}` (the publisher's\n// `produce-failed` reason).\n\nimport { Duration, Effect, Schema, type Scope } from 'effect';\nimport { access, mkdir } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport type { ContainerRuntime, ImageRef } from '../../contracts/container-runtime.ts';\nimport {\n\tartifactPublishError,\n\ttype ArtifactPublishError,\n\ttype ArtifactPublisher,\n} from '../../primitives/artifact-publisher.ts';\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type { ChainId, ContentHash } from '../../substrate/brand.ts';\nimport { atomicWriteFileSync } from '../../substrate/runtime/atomic-write.ts';\nimport { hostBindMountOwner } from '../../substrate/runtime/host-bind-mount-owner.ts';\nimport { HOST_GATEWAY_EXTRA_HOSTS } from '../../substrate/runtime/host-gateway.ts';\nimport { probeManyLenient } from '../../substrate/runtime/probes.ts';\nimport {\n\tDEPLOY_BIND_SOURCE_RETRY_PROFILE,\n\tmakeSpacedRetrySchedule,\n} from '../../substrate/runtime/retry-policy.ts';\nimport { formatUnknownError } from '../../substrate/runtime/format-unknown-error.ts';\nimport { labelledExcerpt } from '../../substrate/runtime/observability/index.ts';\nimport type { SuiProbeKey } from '../sui/index.ts';\nimport { walrusDeployMountPaths } from './deploy-paths.ts';\nimport { walrusPluginError, type WalrusPluginError } from './errors.ts';\nimport { WalrusSpans } from './spans.ts';\n\n/** Cache-stored payload — what verify re-confirms on every cycle.\n * Mirrors the v3 `CachedDeployState` shape (06-walrus.md §\"State-\n * store entries\"). */\nexport interface CachedDeployState {\n\treadonly walrusPackageId: string;\n\treadonly systemObject: string;\n\treadonly stakingObject: string;\n\treadonly upgradeManagerObject?: string;\n\treadonly treasuryObject?: string;\n\treadonly exchangeObject?: string;\n}\n\n/** Verify-schema: the publisher decodes the cached id's on-chain\n * object through this. Minimal — the substrate's `ChainProbe`\n * decodes against this; any decode failure surfaces structured.\n * Distilled-doc invariant 8: the probe MUST consume a stable\n * identifier (the object id), NOT a derived hash. */\nexport const WalrusDeployVerifyShape = Schema.Struct({\n\tsystemObjectId: Schema.String,\n\tstakingObjectId: Schema.String,\n});\nexport type WalrusDeployVerified = Schema.Schema.Type<typeof WalrusDeployVerifyShape>;\n\nconst SuiObjectExistsShape = Schema.Struct({\n\tobjectId: Schema.String,\n});\n\n/** A freshly RESTORED validator can take a few seconds to start serving the\n * committed deploy objects (sui/system/staking); retry the deploy-verify\n * probes across this window so a readiness race doesn't read them as\n * not-found and trigger a spurious redeploy — which would churn the walrus\n * deploy ids and orphan every pre-snapshot blob. A warm restart finds them on\n * the first probe; a genuinely-wiped chain still redeploys once retries lapse. */\nconst WALRUS_DEPLOY_VERIFY_READINESS_RETRIES = 5;\nconst WALRUS_DEPLOY_VERIFY_READINESS_DELAY = '3 seconds';\n\nconst requiredDeployOutputFiles = (inputs: DeployInputs): ReadonlyArray<string> => [\n\tjoin(inputs.outputDirHostPath, 'deploy'),\n\t...Array.from({ length: inputs.committeeSize }, (_, nodeIndex) => [\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}-sui.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.keystore`),\n\t]).flat(),\n];\n\nconst deployOutputFilesComplete = (\n\tinputs: DeployInputs,\n): Effect.Effect<boolean, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait Promise.all(requiredDeployOutputFiles(inputs).map((file) => access(file)));\n\t\t\treturn true;\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy cache is missing local output files under ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t}).pipe(Effect.catch(() => Effect.succeed(false)));\n\n/** Inputs to one deploy round. */\nexport interface DeployInputs {\n\treadonly walrusName: string;\n\treadonly chainId: ChainId;\n\treadonly contentHash: ContentHash;\n\t/** Pre-derived host output dir — substrate's `servicePath('walrus',\n\t * name, 'deploy')` equivalent. Persists across teardown\n\t * (distilled-doc §\"What survives teardown\"). */\n\treadonly outputDirHostPath: string;\n\t/** On-disk per-stack root from `StackPathsService.stackRoot`. The\n\t * bind-mount source is `stackRoot`; `outputDirHostPath` MUST be a\n\t * descendant. Threaded explicitly to remove the previous\n\t * `dirname(dirname(dirname(...)))` walk-up footgun in\n\t * `walrusDeployMountPaths`. */\n\treadonly stackRoot: string;\n\treadonly suiRpcUrlInNetwork: string;\n\treadonly walrusFaucetUrlInNetwork: string;\n\treadonly committeeSize: number;\n\treadonly shards: number;\n\treadonly epochDuration: string;\n\treadonly publicHostsCsv: string;\n\treadonly listeningIpsCsv: string;\n\t/** Wrapper image — the cargo-built walrus image (bootstrap asset).\n\t * The deploy one-shot is `docker run --rm <image> deploy …`. */\n\treadonly walrusImage: ImageRef;\n\t/** Docker network the deploy one-shot attaches to, so its in-network\n\t * Sui RPC + faucet hostnames resolve. */\n\treadonly suiNetworkName: string;\n\t/** Centralized Sui funding readiness gate. Local Sui exposes this so\n\t * callers don't race the faucet's socket-ready / funds-ready gap. */\n\treadonly waitForFundsReady?: Effect.Effect<void, unknown>;\n}\n\n/** Default deploy one-shot timeout. Walrus genesis publish runs the\n * Move publish + WAL exchange creation + per-node config emission;\n * observed wall-clock is 30-60s. 5-minute ceiling absorbs cold-cache\n * + slow CI runners. */\nconst DEPLOY_TIMEOUT_MS = 5 * 60_000;\n\nconst ensureDeployOutputDir = (inputs: DeployInputs): Effect.Effect<void, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait mkdir(inputs.outputDirHostPath, { recursive: true });\n\t\t\t// Route the bind-source marker through the canonical atomic\n\t\t\t// primitive (STYLE_GUIDE §17) — tempfile + fsync + rename so a\n\t\t\t// crashed writer can't leave the bind-mount probe reading a\n\t\t\t// half-written marker. 0o644 so the in-container deploy user can\n\t\t\t// stat it. Sync variant: the marker is a tiny one-liner and it\n\t\t\t// keeps the durability boundary the raw `writeFile` lacked.\n\t\t\tatomicWriteFileSync(\n\t\t\t\tjoin(inputs.outputDirHostPath, '.devstack-bind-source'),\n\t\t\t\t'devstack walrus bind source\\n',\n\t\t\t\t{ mode: 0o644 },\n\t\t\t);\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy failed to prepare output directory ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t});\n\nconst deployExitDetail = (\n\tresult: { readonly exitCode: number; readonly stdout: string; readonly stderr: string },\n\tinputs: DeployInputs,\n): string => {\n\tconst missingCommandHint =\n\t\tresult.exitCode === 127\n\t\t\t? ' exit 127 usually means the deploy image is missing walrus-deploy or an entrypoint command.'\n\t\t\t: '';\n\treturn (\n\t\t`walrus deploy exited with code ${result.exitCode}.` +\n\t\tmissingCommandHint +\n\t\t` outputDir=${inputs.outputDirHostPath} committee=${inputs.committeeSize} shards=${inputs.shards}` +\n\t\tlabelledExcerpt('stdout', result.stdout) +\n\t\tlabelledExcerpt('stderr', result.stderr)\n\t);\n};\n\nconst isBindSourceMissing = (result: {\n\treadonly exitCode: number;\n\treadonly stderr: string;\n}): boolean =>\n\tresult.exitCode === 125 &&\n\t/bind source path does not exist/i.test(result.stderr) &&\n\t/invalid mount config/i.test(result.stderr);\n\n/** Parse the walrus deploy output into a `CachedDeployState`.\n *\n * Expected output format (best-effort match against the v3 reference's\n * deploy stdout — the walrus binary's exact format may drift between\n * versions):\n *\n * walrus_package_id: 0x<hex>\n * system_object: 0x<hex>\n * staking_object: 0x<hex>\n * upgrade_manager_object: 0x<hex> (optional)\n * treasury_object: 0x<hex> (optional)\n * exchange_object: 0x<hex> (optional)\n *\n * Returns the parsed state OR a typed `WalrusPluginError('deploy')`\n * surfaced with stdout/stderr capture for debugging. */\nexport const parseDeployOutput = (stdout: string): CachedDeployState | null => {\n\t// Match `key: value` (or `key = value`) lines; treat `None` as\n\t// \"absent\" per the upstream walrus-deploy output convention.\n\t//\n\t// Value pattern: `0x<hex>` strictly. The previous `\\S+` regex\n\t// happily matched values like `None,` (with a trailing comma) or\n\t// `[unset]` and passed them through as fake object ids; downstream\n\t// `ChainProbe.get(...)` would then issue a `getObject` against\n\t// garbage, surfacing a confusing \"object not found\" instead of a\n\t// parse failure. Enforcing the hex shape here makes the parse-\n\t// failure surface (`walrusPluginError('deploy', 'parser could not\n\t// find ...')`) catch the bad value at its real source.\n\tconst pick = (k: string): string | undefined => {\n\t\tconst re = new RegExp(`(?:^|\\\\n)\\\\s*${k}\\\\s*[:=]\\\\s*(\\\\S+)`);\n\t\tconst m = re.exec(stdout);\n\t\tconst v = m?.[1];\n\t\tif (v === undefined || v === 'None') return undefined;\n\t\tif (!/^0x[0-9a-fA-F]+$/u.test(v)) return undefined;\n\t\treturn v;\n\t};\n\tconst walrusPackageId = pick('walrus_package_id') ?? pick('package_id');\n\tconst systemObject = pick('system_object') ?? pick('system_object_id');\n\tconst stakingObject =\n\t\tpick('staking_object') ?? pick('staking_pool_id') ?? pick('staking_object_id');\n\tif (!walrusPackageId || !systemObject || !stakingObject) return null;\n\treturn {\n\t\twalrusPackageId,\n\t\tsystemObject,\n\t\tstakingObject,\n\t\tupgradeManagerObject: pick('upgrade_manager_object'),\n\t\ttreasuryObject: pick('treasury_object'),\n\t\texchangeObject: pick('exchange_object'),\n\t};\n};\n\n/** Run the walrus-deploy one-shot and parse the output.\n *\n * Implementation:\n * 1. `runtime.runOneShot({ image, argv: ['deploy', ...] })` —\n * fresh `docker run --rm` container. Mount the host output dir\n * at `/opt/walrus/outputs` so the per-node config files persist.\n * 2. Parse stdout for the deploy summary.\n * 3. Surface non-zero exits + parse failures as\n * `WalrusPluginError('deploy')` with stdout/stderr capture. */\nexport const runDeployOneShot = (\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<CachedDeployState, WalrusPluginError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tif (inputs.waitForFundsReady !== undefined) {\n\t\t\tyield* inputs.waitForFundsReady.pipe(\n\t\t\t\tEffect.mapError((cause) =>\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy funding gate failed before walrus-deploy: ${formatUnknownError(cause)}`,\n\t\t\t\t\t\t{ cause },\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tyield* ensureDeployOutputDir(inputs);\n\n\t\tconst outputOwner = hostBindMountOwner();\n\t\tconst outputMount = walrusDeployMountPaths({\n\t\t\tstackRoot: inputs.stackRoot,\n\t\t\tdeployOutputDirHostPath: inputs.outputDirHostPath,\n\t\t\tmountTarget: '/opt/walrus/runtime',\n\t\t});\n\t\tconst argv: ReadonlyArray<string> = [\n\t\t\t'deploy',\n\t\t\t'--output-dir',\n\t\t\toutputMount.outputDirInContainer,\n\t\t\t'--committee-size',\n\t\t\tString(inputs.committeeSize),\n\t\t\t'--shards',\n\t\t\tString(inputs.shards),\n\t\t\t'--epoch-duration',\n\t\t\tinputs.epochDuration,\n\t\t\t'--sui-rpc-url',\n\t\t\tinputs.suiRpcUrlInNetwork,\n\t\t\t'--faucet-url',\n\t\t\tinputs.walrusFaucetUrlInNetwork,\n\t\t\t'--public-hosts',\n\t\t\tinputs.publicHostsCsv,\n\t\t\t'--listening-ips',\n\t\t\tinputs.listeningIpsCsv,\n\t\t];\n\n\t\tconst runAttempt = () =>\n\t\t\truntime\n\t\t\t\t.runOneShot({\n\t\t\t\t\timage: inputs.walrusImage,\n\t\t\t\t\targv,\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsource: outputMount.sourceHostPath,\n\t\t\t\t\t\t\ttarget: outputMount.mountTarget,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t...(outputOwner === undefined ? {} : { env: { DEVSTACK_HOST_UID_GID: outputOwner } }),\n\t\t\t\t\tnetwork: inputs.suiNetworkName,\n\t\t\t\t\t// Same `host-gateway` rationale as storage-nodes.ts —\n\t\t\t\t\t// deploy one-shot dials sui's host-bound RPC + faucet via\n\t\t\t\t\t// `host.docker.internal`. See substrate/runtime/host-gateway.ts\n\t\t\t\t\t// for the platform rationale.\n\t\t\t\t\textraHosts: HOST_GATEWAY_EXTRA_HOSTS,\n\t\t\t\t\ttimeoutMillis: DEPLOY_TIMEOUT_MS,\n\t\t\t\t})\n\t\t\t\t.pipe(\n\t\t\t\t\tEffect.catch((cause) =>\n\t\t\t\t\t\tEffect.fail(\n\t\t\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t\t\t`walrus deploy one-shot failed: ${cause.reason}: ${cause.detail}`,\n\t\t\t\t\t\t\t\t{ cause },\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\tconst attempt = Effect.gen(function* () {\n\t\t\tconst result = yield* runAttempt();\n\t\t\tif (isBindSourceMissing(result)) {\n\t\t\t\tyield* ensureDeployOutputDir(inputs);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\t\tconst result = yield* attempt.pipe(\n\t\t\tEffect.repeat({\n\t\t\t\tschedule: makeSpacedRetrySchedule(\n\t\t\t\t\tDEPLOY_BIND_SOURCE_RETRY_PROFILE.delayMs,\n\t\t\t\t\tDEPLOY_BIND_SOURCE_RETRY_PROFILE.attempts,\n\t\t\t\t),\n\t\t\t\tuntil: (r) => !isBindSourceMissing(r),\n\t\t\t}),\n\t\t);\n\n\t\t// `Effect.repeat` with a bounded `schedule` + `until` exits SUCCESS\n\t\t// in two cases: (a) `until(r)` returned true (bind source is now\n\t\t// visible — the happy path) OR (b) the schedule recurrence cap was\n\t\t// reached while `until(r)` still returned false (the bind source\n\t\t// remained missing through every retry). The follow-up\n\t\t// `result.exitCode !== 0` check below would already surface case\n\t\t// (b) as a deploy-failure exit, but the failure message would be\n\t\t// the bind-source stderr — not the more diagnostic \"we exhausted\n\t\t// the bind-source retry budget\" message. Surface that explicitly\n\t\t// here so operators see the retry budget in the failure shape.\n\t\tif (isBindSourceMissing(result)) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'deploy',\n\t\t\t\t\t`walrus deploy: bind-source visibility race did not resolve after ` +\n\t\t\t\t\t\t`${DEPLOY_BIND_SOURCE_RETRY_PROFILE.attempts} retries ` +\n\t\t\t\t\t\t`(${DEPLOY_BIND_SOURCE_RETRY_PROFILE.delayMs}ms spacing). ` +\n\t\t\t\t\t\t`outputDir=${inputs.outputDirHostPath} — Docker Desktop's bind-source ` +\n\t\t\t\t\t\t`propagation lagged past the retry budget. ` +\n\t\t\t\t\t\tdeployExitDetail(result, inputs),\n\t\t\t\t\t{\n\t\t\t\t\t\texitCode: result.exitCode,\n\t\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif (result.exitCode !== 0) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError('deploy', deployExitDetail(result, inputs), {\n\t\t\t\t\texitCode: result.exitCode,\n\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tconst parsed = parseDeployOutput(result.stdout);\n\t\tif (!parsed) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'deploy',\n\t\t\t\t\t`walrus deploy: parser could not find walrus_package_id / system_object / staking_object ` +\n\t\t\t\t\t\t`in deploy output. Confirm the walrus binary's output format and adjust ` +\n\t\t\t\t\t\t`\\`parseDeployOutput\\` regexes in deploy.ts. ` +\n\t\t\t\t\t\t`SEAM: see deploy.ts header for the expected format.`,\n\t\t\t\t\t{ stdout: result.stdout, stderr: result.stderr },\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn parsed;\n\t}).pipe(\n\t\tEffect.withSpan('devstack.plugin.walrus.deploy.oneShot', {\n\t\t\tattributes: {\n\t\t\t\t[WalrusSpans.committeeSize]: inputs.committeeSize,\n\t\t\t\t[WalrusSpans.shards]: inputs.shards,\n\t\t\t},\n\t\t}),\n\t\tEffect.timeoutOrElse({\n\t\t\tduration: Duration.millis(DEPLOY_TIMEOUT_MS + 5_000),\n\t\t\torElse: () =>\n\t\t\t\tEffect.fail(\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy: outer timeout ${DEPLOY_TIMEOUT_MS}ms exceeded`,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t}),\n\t);\n\n/** Outputs of one deploy round — surfaced to the plugin's\n * resolved value. */\nexport interface DeployOutputs {\n\treadonly state: CachedDeployState;\n}\n\n/** Compose the ArtifactSpec for a walrus deploy and dispatch\n * through the substrate primitive. The publisher handles the full\n * cache/verify/produce/register loop.\n *\n * Produce: real wiring — `runDeployOneShot` runs\n * `docker run --rm walrusImage deploy …` and parses the deploy stdout.\n *\n * The substrate's `ArtifactPublisher.publish` returns the full\n * `CachedDeployState` on EVERY path (decoded cached payload on hit,\n * fresh produce on miss) — no projection dance required. */\nexport const deployWalrusContracts = (\n\tpublisher: ArtifactPublisher,\n\tprobe: ChainProbe<SuiProbeKey>,\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<DeployOutputs, WalrusPluginError | ArtifactPublishError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst state = yield* publisher.publish<CachedDeployState, WalrusDeployVerified>({\n\t\t\tnamespace: 'walrus-deploy',\n\t\t\tchain: inputs.chainId,\n\t\t\tcontentHash: inputs.contentHash,\n\t\t\t// Verify: lenient probes of the cached system + staking\n\t\t\t// objects. The Sui chain probe decodes raw `getObject`\n\t\t\t// responses, so the probe schema matches that envelope and\n\t\t\t// this closure returns the compact verified shape.\n\t\t\tverify: (cached) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tif (!(yield* deployOutputFilesComplete(inputs))) return null;\n\n\t\t\t\t\t// Both cached on-chain objects are independent lenient\n\t\t\t\t\t// probes — fan them out via `probeManyLenient` so the\n\t\t\t\t\t// substrate owns the iteration shape. Any null means\n\t\t\t\t\t// \"re-deploy\"; both non-null gives us the composite\n\t\t\t\t\t// verified payload. Retry across the post-restore\n\t\t\t\t\t// validator-readiness window (see the retry constants above)\n\t\t\t\t\t// so a transient not-found doesn't force a spurious redeploy.\n\t\t\t\t\tconst probeBoth = probeManyLenient([\n\t\t\t\t\t\tprobe.get(\n\t\t\t\t\t\t\t{ kind: 'object', objectId: cached.systemObject },\n\t\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t\t'lenient',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tprobe.get(\n\t\t\t\t\t\t\t{ kind: 'object', objectId: cached.stakingObject },\n\t\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t\t'lenient',\n\t\t\t\t\t\t),\n\t\t\t\t\t]);\n\t\t\t\t\tlet [system, staking] = yield* probeBoth;\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet attempt = 0;\n\t\t\t\t\t\t(system == null || staking == null) && attempt < WALRUS_DEPLOY_VERIFY_READINESS_RETRIES;\n\t\t\t\t\t\tattempt++\n\t\t\t\t\t) {\n\t\t\t\t\t\tyield* Effect.sleep(WALRUS_DEPLOY_VERIFY_READINESS_DELAY);\n\t\t\t\t\t\t[system, staking] = yield* probeBoth;\n\t\t\t\t\t}\n\t\t\t\t\tif (system === undefined || system === null) return null;\n\t\t\t\t\tif (staking === undefined || staking === null) return null;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsystemObjectId: system.objectId,\n\t\t\t\t\t\tstakingObjectId: staking.objectId,\n\t\t\t\t\t} satisfies WalrusDeployVerified;\n\t\t\t\t}).pipe(\n\t\t\t\t\t// `verify` must satisfy `Effect<… | null, never>` per\n\t\t\t\t\t// the publisher contract. Narrow the cache-miss\n\t\t\t\t\t// collapse to genuine cache-corruption signals\n\t\t\t\t\t// (`decode-failed`) and missing-registration\n\t\t\t\t\t// (`no-probe-registered`). The lenient probe already\n\t\t\t\t\t// maps `not-found`/`transient` to `null`, so the\n\t\t\t\t\t// remaining ChainProbeError values that reach here\n\t\t\t\t\t// are authoritative — `decode-failed` is stale shape\n\t\t\t\t\t// (re-produce) and `no-probe-registered` means the\n\t\t\t\t\t// plugin booted before the chain probe was\n\t\t\t\t\t// contributed (treat as miss). Anything else is a\n\t\t\t\t\t// real RPC failure we want visible in the logs\n\t\t\t\t\t// rather than silently collapsed to \"re-deploy\".\n\t\t\t\t\tEffect.catchTag('ChainProbeError', (err) => {\n\t\t\t\t\t\tif (err.reason === 'decode-failed' || err.reason === 'no-probe-registered') {\n\t\t\t\t\t\t\treturn Effect.succeed(null as WalrusDeployVerified | null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Effect.logWarning(\n\t\t\t\t\t\t\t`walrus.deploy verify probe surfaced an authoritative error (` +\n\t\t\t\t\t\t\t\t`reason=${err.reason}, chain=${err.chain}, detail=${err.detail}); ` +\n\t\t\t\t\t\t\t\t`re-deploying.`,\n\t\t\t\t\t\t).pipe(Effect.as(null as WalrusDeployVerified | null));\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t// Produce: real walrus-deploy one-shot.\n\t\t\tproduce: runDeployOneShot(runtime, inputs).pipe(\n\t\t\t\tEffect.mapError(\n\t\t\t\t\t(err): ArtifactPublishError =>\n\t\t\t\t\t\tartifactPublishError('produce-failed', `walrus.deploy ${err.phase}: ${err.message}`),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Register: fires on EVERY cycle. The plugin's outer body\n\t\t\t// performs the walrus-state / endpoint / package registry\n\t\t\t// publishes after both deploy + storage-nodes are up; this\n\t\t\t// closure is the publisher-side null-op so the substrate\n\t\t\t// satisfies its Invariant-6 contract.\n\t\t\tregister: () => Effect.void,\n\t\t});\n\n\t\treturn { state };\n\t}).pipe(\n\t\tEffect.withSpan('devstack.plugin.walrus.deploy', {\n\t\t\tattributes: { [WalrusSpans.name]: inputs.walrusName, [WalrusSpans.chain]: inputs.chainId },\n\t\t}),\n\t);\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"deploy.mjs","names":[],"sources":["../../../src/plugins/walrus/deploy.ts"],"sourcesContent":["// Walrus deploy one-shot — Move publish via ArtifactPublisher.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 2\"):\n// the `walrus-deploy` one-shot:\n// - publishes the Walrus Move package on the local sui chain,\n// - mints a WAL exchange,\n// - emits per-node config files (`dryrun-node-<i>.yaml`,\n// `dryrun-node-<i>.keystore`) under `runtime/walrus/<name>/deploy/`.\n//\n// We route this through the substrate's `ArtifactPublisher`\n// primitive (architecture §10 — \"callable from any plugin; no\n// plugin-side contract to implement\"). The publisher owns:\n// - cache key derivation (folds `chainId`),\n// - verify probe (lenient — re-derives on transient RPC failure),\n// - produce-on-miss (runs `walrus-deploy`),\n// - register-on-every-cycle (so downstream consumers always see\n// the resolved state).\n//\n// Distilled-doc invariants honored here:\n// - 5: cache key folds `chainId`.\n// - 6: verify checks BOTH the on-disk `deploy` file AND on-chain\n// object existence (system + staking). Either failure\n// invalidates and re-deploys.\n// - 7: `runtime/walrus/<name>/deploy/` rides the snapshot tar\n// (declared via `Snapshotable.subtrees` in `snapshot.ts`).\n// - 10: deploy summary must contain `package_id` + `system_object`\n// + `staking_object`. We surface parse failure as\n// `WalrusPluginError{phase: 'deploy'}` (the publisher's\n// `produce-failed` reason).\n\nimport { Duration, Effect, Schema, type Scope } from 'effect';\nimport { access, mkdir } from 'node:fs/promises';\nimport { join } from 'node:path';\n\nimport type { ContainerRuntime, ImageRef } from '../../contracts/container-runtime.ts';\nimport {\n\tartifactPublishError,\n\ttype ArtifactPublishError,\n\ttype ArtifactPublisher,\n} from '../../primitives/artifact-publisher.ts';\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type { ContentHash } from '../../substrate/brand.ts';\nimport { atomicWriteFileSync } from '../../substrate/runtime/atomic-write.ts';\nimport { hostBindMountOwner } from '../../substrate/runtime/host-bind-mount-owner.ts';\nimport { HOST_GATEWAY_EXTRA_HOSTS } from '../../substrate/runtime/host-gateway.ts';\nimport { probeManyLenient } from '../../substrate/runtime/probes.ts';\nimport {\n\tDEPLOY_BIND_SOURCE_RETRY_PROFILE,\n\tmakeSpacedRetrySchedule,\n} from '../../substrate/runtime/retry-policy.ts';\nimport { formatUnknownError } from '../../substrate/runtime/format-unknown-error.ts';\nimport { labelledExcerpt } from '../../substrate/runtime/observability/index.ts';\nimport type { SuiProbeKey } from '../sui/index.ts';\nimport { walrusDeployMountPaths } from './deploy-paths.ts';\nimport { walrusPluginError, type WalrusPluginError } from './errors.ts';\n\n/** Cache-stored payload — what verify re-confirms on every cycle\n * (06-walrus.md §\"State-store entries\"). */\nexport interface CachedDeployState {\n\treadonly walrusPackageId: string;\n\treadonly systemObject: string;\n\treadonly stakingObject: string;\n\treadonly upgradeManagerObject?: string;\n\treadonly treasuryObject?: string;\n\treadonly exchangeObject?: string;\n}\n\n/** Verify-schema: the publisher decodes the cached id's on-chain\n * object through this. Minimal — the substrate's `ChainProbe`\n * decodes against this; any decode failure surfaces structured.\n * Distilled-doc invariant 8: the probe MUST consume a stable\n * identifier (the object id), NOT a derived hash. */\nexport const WalrusDeployVerifyShape = Schema.Struct({\n\tsystemObjectId: Schema.String,\n\tstakingObjectId: Schema.String,\n});\nexport type WalrusDeployVerified = Schema.Schema.Type<typeof WalrusDeployVerifyShape>;\n\nconst SuiObjectExistsShape = Schema.Struct({\n\tobjectId: Schema.String,\n});\n\n/** Short readiness tolerance for a transient not-found on the cached\n * deploy objects (sui/system/staking).\n *\n * The big post-restore catch-up window — `sui start` re-executes its\n * committed checkpoint store from seq=0, and `getObject(systemObject)`\n * reads not-found until the replay reaches the object's checkpoint — is\n * now absorbed by the sui plugin's caught-up-to-head ready-gate\n * (`waitForCheckpointCatchUp` in plugins/sui/mode/local.ts): the\n * validator does not report ready until its head has stabilized to live\n * cadence, so by the time this verify runs the committed deploy objects\n * are already served. This budget only needs to cover the small RPC\n * index-visibility lag, NOT the whole replay.\n *\n * If it gives up too soon it reads the objects as not-found and triggers\n * a SPURIOUS redeploy, which mints FRESH walrus ids and orphans every\n * pre-snapshot blob (the snapshot-survival-matrix walrus-S2 failure:\n * \"Too many failures while writing blob to nodes\"). A genuinely-wiped\n * chain still redeploys once the budget lapses.\n *\n * Budget: 5 probes × 3s = 15s. */\nconst WALRUS_DEPLOY_VERIFY_READINESS_RETRIES = 5;\nconst WALRUS_DEPLOY_VERIFY_READINESS_DELAY = '3 seconds';\n\nconst requiredDeployOutputFiles = (inputs: DeployInputs): ReadonlyArray<string> => [\n\tjoin(inputs.outputDirHostPath, 'deploy'),\n\t...Array.from({ length: inputs.committeeSize }, (_, nodeIndex) => [\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}-sui.yaml`),\n\t\tjoin(inputs.outputDirHostPath, `dryrun-node-${nodeIndex}.keystore`),\n\t]).flat(),\n];\n\nconst deployOutputFilesComplete = (\n\tinputs: DeployInputs,\n): Effect.Effect<boolean, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait Promise.all(requiredDeployOutputFiles(inputs).map((file) => access(file)));\n\t\t\treturn true;\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy cache is missing local output files under ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t}).pipe(Effect.catch(() => Effect.succeed(false)));\n\n/** Inputs to one deploy round. */\nexport interface DeployInputs {\n\treadonly walrusName: string;\n\treadonly chainId: string;\n\treadonly contentHash: ContentHash;\n\t/** Pre-derived host output dir — substrate's `servicePath('walrus',\n\t * name, 'deploy')` equivalent. Persists across teardown\n\t * (distilled-doc §\"What survives teardown\"). */\n\treadonly outputDirHostPath: string;\n\t/** On-disk per-stack root from `StackPathsService.stackRoot`. The\n\t * bind-mount source is `stackRoot`; `outputDirHostPath` MUST be a\n\t * descendant. Threaded explicitly to remove the previous\n\t * `dirname(dirname(dirname(...)))` walk-up footgun in\n\t * `walrusDeployMountPaths`. */\n\treadonly stackRoot: string;\n\treadonly suiRpcUrlInNetwork: string;\n\treadonly walrusFaucetUrlInNetwork: string;\n\treadonly committeeSize: number;\n\treadonly shards: number;\n\treadonly epochDuration: string;\n\treadonly publicHostsCsv: string;\n\treadonly listeningIpsCsv: string;\n\t/** Wrapper image — the cargo-built walrus image (bootstrap asset).\n\t * The deploy one-shot is `docker run --rm <image> deploy …`. */\n\treadonly walrusImage: ImageRef;\n\t/** Docker network the deploy one-shot attaches to, so its in-network\n\t * Sui RPC + faucet hostnames resolve. */\n\treadonly suiNetworkName: string;\n\t/** Centralized Sui funding readiness gate. Local Sui exposes this so\n\t * callers don't race the faucet's socket-ready / funds-ready gap. */\n\treadonly waitForFundsReady?: Effect.Effect<void, unknown>;\n}\n\n/** Default deploy one-shot timeout. Walrus genesis publish runs the\n * Move publish + WAL exchange creation + per-node config emission;\n * observed wall-clock is 30-60s. 5-minute ceiling absorbs cold-cache\n * + slow CI runners. */\nconst DEPLOY_TIMEOUT_MS = 5 * 60_000;\n\nconst ensureDeployOutputDir = (inputs: DeployInputs): Effect.Effect<void, WalrusPluginError> =>\n\tEffect.tryPromise({\n\t\ttry: async () => {\n\t\t\tawait mkdir(inputs.outputDirHostPath, { recursive: true });\n\t\t\t// Route the bind-source marker through the canonical atomic\n\t\t\t// primitive (STYLE_GUIDE §17) — tempfile + fsync + rename so a\n\t\t\t// crashed writer can't leave the bind-mount probe reading a\n\t\t\t// half-written marker. 0o644 so the in-container deploy user can\n\t\t\t// stat it. Sync variant: the marker is a tiny one-liner and it\n\t\t\t// keeps the durability boundary the raw `writeFile` lacked.\n\t\t\tatomicWriteFileSync(\n\t\t\t\tjoin(inputs.outputDirHostPath, '.devstack-bind-source'),\n\t\t\t\t'devstack walrus bind source\\n',\n\t\t\t\t{ mode: 0o644 },\n\t\t\t);\n\t\t},\n\t\tcatch: (cause) =>\n\t\t\twalrusPluginError(\n\t\t\t\t'deploy',\n\t\t\t\t`walrus deploy failed to prepare output directory ${inputs.outputDirHostPath}`,\n\t\t\t\t{ cause },\n\t\t\t),\n\t});\n\nconst deployExitDetail = (\n\tresult: { readonly exitCode: number; readonly stdout: string; readonly stderr: string },\n\tinputs: DeployInputs,\n): string => {\n\tconst missingCommandHint =\n\t\tresult.exitCode === 127\n\t\t\t? ' exit 127 usually means the deploy image is missing walrus-deploy or an entrypoint command.'\n\t\t\t: '';\n\treturn (\n\t\t`walrus deploy exited with code ${result.exitCode}.` +\n\t\tmissingCommandHint +\n\t\t` outputDir=${inputs.outputDirHostPath} committee=${inputs.committeeSize} shards=${inputs.shards}` +\n\t\tlabelledExcerpt('stdout', result.stdout) +\n\t\tlabelledExcerpt('stderr', result.stderr)\n\t);\n};\n\nconst isBindSourceMissing = (result: {\n\treadonly exitCode: number;\n\treadonly stderr: string;\n}): boolean =>\n\tresult.exitCode === 125 &&\n\t/bind source path does not exist/i.test(result.stderr) &&\n\t/invalid mount config/i.test(result.stderr);\n\n/** Parse the walrus deploy output into a `CachedDeployState`.\n *\n * Expected output format (best-effort match against the walrus\n * binary's deploy stdout — its exact format may drift between\n * versions):\n *\n * walrus_package_id: 0x<hex>\n * system_object: 0x<hex>\n * staking_object: 0x<hex>\n * upgrade_manager_object: 0x<hex> (optional)\n * treasury_object: 0x<hex> (optional)\n * exchange_object: 0x<hex> (optional)\n *\n * Returns the parsed state OR a typed `WalrusPluginError('deploy')`\n * surfaced with stdout/stderr capture for debugging. */\nexport const parseDeployOutput = (stdout: string): CachedDeployState | null => {\n\t// Match `key: value` (or `key = value`) lines; treat `None` as\n\t// \"absent\" per the upstream walrus-deploy output convention.\n\t//\n\t// Value pattern: `0x<hex>` strictly. The previous `\\S+` regex\n\t// happily matched values like `None,` (with a trailing comma) or\n\t// `[unset]` and passed them through as fake object ids; downstream\n\t// `ChainProbe.get(...)` would then issue a `getObject` against\n\t// garbage, surfacing a confusing \"object not found\" instead of a\n\t// parse failure. Enforcing the hex shape here makes the parse-\n\t// failure surface (`walrusPluginError('deploy', 'parser could not\n\t// find ...')`) catch the bad value at its real source.\n\tconst pick = (k: string): string | undefined => {\n\t\tconst re = new RegExp(`(?:^|\\\\n)\\\\s*${k}\\\\s*[:=]\\\\s*(\\\\S+)`);\n\t\tconst m = re.exec(stdout);\n\t\tconst v = m?.[1];\n\t\tif (v === undefined || v === 'None') return undefined;\n\t\tif (!/^0x[0-9a-fA-F]+$/u.test(v)) return undefined;\n\t\treturn v;\n\t};\n\tconst walrusPackageId = pick('walrus_package_id') ?? pick('package_id');\n\tconst systemObject = pick('system_object') ?? pick('system_object_id');\n\tconst stakingObject =\n\t\tpick('staking_object') ?? pick('staking_pool_id') ?? pick('staking_object_id');\n\tif (!walrusPackageId || !systemObject || !stakingObject) return null;\n\treturn {\n\t\twalrusPackageId,\n\t\tsystemObject,\n\t\tstakingObject,\n\t\tupgradeManagerObject: pick('upgrade_manager_object'),\n\t\ttreasuryObject: pick('treasury_object'),\n\t\texchangeObject: pick('exchange_object'),\n\t};\n};\n\n/** Run the walrus-deploy one-shot and parse the output.\n *\n * Implementation:\n * 1. `runtime.runOneShot({ image, argv: ['deploy', ...] })` —\n * fresh `docker run --rm` container. Mount the host output dir\n * at `/opt/walrus/outputs` so the per-node config files persist.\n * 2. Parse stdout for the deploy summary.\n * 3. Surface non-zero exits + parse failures as\n * `WalrusPluginError('deploy')` with stdout/stderr capture. */\nexport const runDeployOneShot = (\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<CachedDeployState, WalrusPluginError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tif (inputs.waitForFundsReady !== undefined) {\n\t\t\tyield* inputs.waitForFundsReady.pipe(\n\t\t\t\tEffect.mapError((cause) =>\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy funding gate failed before walrus-deploy: ${formatUnknownError(cause)}`,\n\t\t\t\t\t\t{ cause },\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\tyield* ensureDeployOutputDir(inputs);\n\n\t\tconst outputOwner = hostBindMountOwner();\n\t\tconst outputMount = walrusDeployMountPaths({\n\t\t\tstackRoot: inputs.stackRoot,\n\t\t\tdeployOutputDirHostPath: inputs.outputDirHostPath,\n\t\t\tmountTarget: '/opt/walrus/runtime',\n\t\t});\n\t\tconst argv: ReadonlyArray<string> = [\n\t\t\t'deploy',\n\t\t\t'--output-dir',\n\t\t\toutputMount.outputDirInContainer,\n\t\t\t'--committee-size',\n\t\t\tString(inputs.committeeSize),\n\t\t\t'--shards',\n\t\t\tString(inputs.shards),\n\t\t\t'--epoch-duration',\n\t\t\tinputs.epochDuration,\n\t\t\t'--sui-rpc-url',\n\t\t\tinputs.suiRpcUrlInNetwork,\n\t\t\t'--faucet-url',\n\t\t\tinputs.walrusFaucetUrlInNetwork,\n\t\t\t'--public-hosts',\n\t\t\tinputs.publicHostsCsv,\n\t\t\t'--listening-ips',\n\t\t\tinputs.listeningIpsCsv,\n\t\t];\n\n\t\tconst runAttempt = () =>\n\t\t\truntime\n\t\t\t\t.runOneShot({\n\t\t\t\t\timage: inputs.walrusImage,\n\t\t\t\t\targv,\n\t\t\t\t\tmounts: [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tsource: outputMount.sourceHostPath,\n\t\t\t\t\t\t\ttarget: outputMount.mountTarget,\n\t\t\t\t\t\t},\n\t\t\t\t\t],\n\t\t\t\t\t...(outputOwner === undefined ? {} : { env: { DEVSTACK_HOST_UID_GID: outputOwner } }),\n\t\t\t\t\tnetwork: inputs.suiNetworkName,\n\t\t\t\t\t// Same `host-gateway` rationale as storage-nodes.ts —\n\t\t\t\t\t// deploy one-shot dials sui's host-bound RPC + faucet via\n\t\t\t\t\t// `host.docker.internal`. See substrate/runtime/host-gateway.ts\n\t\t\t\t\t// for the platform rationale.\n\t\t\t\t\textraHosts: HOST_GATEWAY_EXTRA_HOSTS,\n\t\t\t\t\ttimeoutMillis: DEPLOY_TIMEOUT_MS,\n\t\t\t\t})\n\t\t\t\t.pipe(\n\t\t\t\t\tEffect.catch((cause) =>\n\t\t\t\t\t\tEffect.fail(\n\t\t\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t\t\t`walrus deploy one-shot failed: ${cause.reason}: ${cause.detail}`,\n\t\t\t\t\t\t\t\t{ cause },\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t);\n\n\t\tconst attempt = Effect.gen(function* () {\n\t\t\tconst result = yield* runAttempt();\n\t\t\tif (isBindSourceMissing(result)) {\n\t\t\t\tyield* ensureDeployOutputDir(inputs);\n\t\t\t}\n\t\t\treturn result;\n\t\t});\n\t\tconst result = yield* attempt.pipe(\n\t\t\tEffect.repeat({\n\t\t\t\tschedule: makeSpacedRetrySchedule(\n\t\t\t\t\tDEPLOY_BIND_SOURCE_RETRY_PROFILE.delayMs,\n\t\t\t\t\tDEPLOY_BIND_SOURCE_RETRY_PROFILE.attempts,\n\t\t\t\t),\n\t\t\t\tuntil: (r) => !isBindSourceMissing(r),\n\t\t\t}),\n\t\t);\n\n\t\t// `Effect.repeat` with a bounded `schedule` + `until` exits SUCCESS\n\t\t// in two cases: (a) `until(r)` returned true (bind source is now\n\t\t// visible — the happy path) OR (b) the schedule recurrence cap was\n\t\t// reached while `until(r)` still returned false (the bind source\n\t\t// remained missing through every retry). The follow-up\n\t\t// `result.exitCode !== 0` check below would already surface case\n\t\t// (b) as a deploy-failure exit, but the failure message would be\n\t\t// the bind-source stderr — not the more diagnostic \"we exhausted\n\t\t// the bind-source retry budget\" message. Surface that explicitly\n\t\t// here so operators see the retry budget in the failure shape.\n\t\tif (isBindSourceMissing(result)) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'deploy',\n\t\t\t\t\t`walrus deploy: bind-source visibility race did not resolve after ` +\n\t\t\t\t\t\t`${DEPLOY_BIND_SOURCE_RETRY_PROFILE.attempts} retries ` +\n\t\t\t\t\t\t`(${DEPLOY_BIND_SOURCE_RETRY_PROFILE.delayMs}ms spacing). ` +\n\t\t\t\t\t\t`outputDir=${inputs.outputDirHostPath} — Docker Desktop's bind-source ` +\n\t\t\t\t\t\t`propagation lagged past the retry budget. ` +\n\t\t\t\t\t\tdeployExitDetail(result, inputs),\n\t\t\t\t\t{\n\t\t\t\t\t\texitCode: result.exitCode,\n\t\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t\t},\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tif (result.exitCode !== 0) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError('deploy', deployExitDetail(result, inputs), {\n\t\t\t\t\texitCode: result.exitCode,\n\t\t\t\t\tstdout: result.stdout,\n\t\t\t\t\tstderr: result.stderr,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\tconst parsed = parseDeployOutput(result.stdout);\n\t\tif (!parsed) {\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'deploy',\n\t\t\t\t\t`walrus deploy: parser could not find walrus_package_id / system_object / staking_object ` +\n\t\t\t\t\t\t`in deploy output. Confirm the walrus binary's output format and adjust ` +\n\t\t\t\t\t\t`\\`parseDeployOutput\\` regexes in deploy.ts. ` +\n\t\t\t\t\t\t`SEAM: see deploy.ts header for the expected format.`,\n\t\t\t\t\t{ stdout: result.stdout, stderr: result.stderr },\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn parsed;\n\t}).pipe(\n\t\tEffect.timeoutOrElse({\n\t\t\tduration: Duration.millis(DEPLOY_TIMEOUT_MS + 5_000),\n\t\t\torElse: () =>\n\t\t\t\tEffect.fail(\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'deploy',\n\t\t\t\t\t\t`walrus deploy: outer timeout ${DEPLOY_TIMEOUT_MS}ms exceeded`,\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t}),\n\t);\n\n/** Outputs of one deploy round — surfaced to the plugin's\n * resolved value. */\nexport interface DeployOutputs {\n\treadonly state: CachedDeployState;\n}\n\n/** Compose the ArtifactSpec for a walrus deploy and dispatch\n * through the substrate primitive. The publisher handles the full\n * cache/verify/produce/register loop.\n *\n * Produce: real wiring — `runDeployOneShot` runs\n * `docker run --rm walrusImage deploy …` and parses the deploy stdout.\n *\n * The substrate's `ArtifactPublisher.publish` returns the full\n * `CachedDeployState` on EVERY path (decoded cached payload on hit,\n * fresh produce on miss) — no projection dance required. */\nexport const deployWalrusContracts = (\n\tpublisher: ArtifactPublisher,\n\tprobe: ChainProbe<SuiProbeKey>,\n\truntime: ContainerRuntime,\n\tinputs: DeployInputs,\n): Effect.Effect<DeployOutputs, WalrusPluginError | ArtifactPublishError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst state = yield* publisher.publish<CachedDeployState, WalrusDeployVerified>({\n\t\t\tnamespace: 'walrus-deploy',\n\t\t\tchain: inputs.chainId,\n\t\t\tcontentHash: inputs.contentHash,\n\t\t\t// Verify: lenient probes of the cached system + staking\n\t\t\t// objects. The Sui chain probe decodes raw `getObject`\n\t\t\t// responses, so the probe schema matches that envelope and\n\t\t\t// this closure returns the compact verified shape.\n\t\t\tverify: (cached) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tif (!(yield* deployOutputFilesComplete(inputs))) return null;\n\n\t\t\t\t\t// Both cached on-chain objects are independent lenient\n\t\t\t\t\t// probes — fan them out via `probeManyLenient` so the\n\t\t\t\t\t// substrate owns the iteration shape. Any null means\n\t\t\t\t\t// \"re-deploy\"; both non-null gives us the composite\n\t\t\t\t\t// verified payload. The short retry (see the constants\n\t\t\t\t\t// above) only covers RPC index-visibility lag — the\n\t\t\t\t\t// validator's post-restore catch-up is already gated by\n\t\t\t\t\t// the sui plugin's caught-up-to-head ready-gate — so a\n\t\t\t\t\t// transient not-found doesn't force a spurious redeploy.\n\t\t\t\t\tconst probeBoth = probeManyLenient([\n\t\t\t\t\t\tprobe.get(\n\t\t\t\t\t\t\t{ kind: 'object', objectId: cached.systemObject },\n\t\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t\t'lenient',\n\t\t\t\t\t\t),\n\t\t\t\t\t\tprobe.get(\n\t\t\t\t\t\t\t{ kind: 'object', objectId: cached.stakingObject },\n\t\t\t\t\t\t\tSuiObjectExistsShape,\n\t\t\t\t\t\t\t'lenient',\n\t\t\t\t\t\t),\n\t\t\t\t\t]);\n\t\t\t\t\tlet [system, staking] = yield* probeBoth;\n\t\t\t\t\tfor (\n\t\t\t\t\t\tlet attempt = 0;\n\t\t\t\t\t\t(system == null || staking == null) && attempt < WALRUS_DEPLOY_VERIFY_READINESS_RETRIES;\n\t\t\t\t\t\tattempt++\n\t\t\t\t\t) {\n\t\t\t\t\t\tyield* Effect.sleep(WALRUS_DEPLOY_VERIFY_READINESS_DELAY);\n\t\t\t\t\t\t[system, staking] = yield* probeBoth;\n\t\t\t\t\t}\n\t\t\t\t\tif (system === undefined || system === null) return null;\n\t\t\t\t\tif (staking === undefined || staking === null) return null;\n\n\t\t\t\t\treturn {\n\t\t\t\t\t\tsystemObjectId: system.objectId,\n\t\t\t\t\t\tstakingObjectId: staking.objectId,\n\t\t\t\t\t} satisfies WalrusDeployVerified;\n\t\t\t\t}).pipe(\n\t\t\t\t\t// `verify` must satisfy `Effect<… | null, never>` per\n\t\t\t\t\t// the publisher contract. Narrow the cache-miss\n\t\t\t\t\t// collapse to genuine cache-corruption signals\n\t\t\t\t\t// (`decode-failed`) and missing-registration\n\t\t\t\t\t// (`no-probe-registered`). The lenient probe already\n\t\t\t\t\t// maps `not-found`/`transient` to `null`, so the\n\t\t\t\t\t// remaining ChainProbeError values that reach here\n\t\t\t\t\t// are authoritative — `decode-failed` is stale shape\n\t\t\t\t\t// (re-produce) and `no-probe-registered` means the\n\t\t\t\t\t// plugin booted before the chain probe was\n\t\t\t\t\t// contributed (treat as miss). Anything else is a\n\t\t\t\t\t// real RPC failure we want visible in the logs\n\t\t\t\t\t// rather than silently collapsed to \"re-deploy\".\n\t\t\t\t\tEffect.catchTag('ChainProbeError', (err) => {\n\t\t\t\t\t\tif (err.reason === 'decode-failed' || err.reason === 'no-probe-registered') {\n\t\t\t\t\t\t\treturn Effect.succeed(null as WalrusDeployVerified | null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn Effect.logWarning(\n\t\t\t\t\t\t\t`walrus.deploy verify probe surfaced an authoritative error (` +\n\t\t\t\t\t\t\t\t`reason=${err.reason}, chain=${err.chainId}, detail=${err.detail}); ` +\n\t\t\t\t\t\t\t\t`re-deploying.`,\n\t\t\t\t\t\t).pipe(Effect.as(null as WalrusDeployVerified | null));\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t// Produce: real walrus-deploy one-shot.\n\t\t\tproduce: runDeployOneShot(runtime, inputs).pipe(\n\t\t\t\tEffect.mapError(\n\t\t\t\t\t(err): ArtifactPublishError =>\n\t\t\t\t\t\tartifactPublishError('produce-failed', `walrus.deploy ${err.phase}: ${err.message}`),\n\t\t\t\t),\n\t\t\t),\n\t\t\t// Register: fires on EVERY cycle. The plugin's outer body\n\t\t\t// performs the walrus-state / endpoint / package registry\n\t\t\t// publishes after both deploy + storage-nodes are up; this\n\t\t\t// closure is the publisher-side null-op so the substrate\n\t\t\t// satisfies its Invariant-6 contract.\n\t\t\tregister: () => Effect.void,\n\t\t});\n\n\t\treturn { state };\n\t});\n"],"mappings":"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"}
|
|
@@ -14,14 +14,7 @@ const walrusConfigError = (field, message, hint, cause) => makeWalrusConfigError
|
|
|
14
14
|
hint,
|
|
15
15
|
cause
|
|
16
16
|
});
|
|
17
|
-
/** Error tags this plugin contributes — surfaced to the cause
|
|
18
|
-
* walker via `PluginErrorContribution`. */
|
|
19
|
-
const WALRUS_ERROR_TAGS = [
|
|
20
|
-
"WalrusPluginError",
|
|
21
|
-
"ForkIncompatibleError",
|
|
22
|
-
"WalrusConfigError"
|
|
23
|
-
];
|
|
24
17
|
//#endregion
|
|
25
|
-
export {
|
|
18
|
+
export { walrusConfigError, walrusPluginError };
|
|
26
19
|
|
|
27
20
|
//# sourceMappingURL=errors.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/plugins/walrus/errors.ts"],"sourcesContent":["// Walrus plugin — typed errors.\n//\n// Errors raised and consumed inside the Walrus plugin live here.\n// Cross-service errors that Walrus *consumes* but the substrate\n// raises (e.g. `ArtifactPublishError`) come from the substrate's\n// primitive — we don't redeclare those.\n//\n// `ForkIncompatibleError` is a cross-cutting mode-refusal shape\n// owned by `substrate/runtime/mode-errors.ts`; walrus contributes\n// the `walrusLocalCluster` variant via the factory below.\n//\n// Effect v4: plain interfaces with `_tag` discriminator (per\n// surrounding subsystem style). `Effect.catchTag` matches on `_tag`.\n\nimport { ForkIncompatibleError } from '../../substrate/runtime/mode-errors.ts';\nimport { defineConfigError, type ConfigIssue } from '../../substrate/runtime/config-validation.ts';\n\nexport { ForkIncompatibleError };\n\n/** Phases for `WalrusError`. Closed sum — keeps the cause-walker's\n * display table small. Matches the closed `WalrusPhases` from the\n * distilled doc §\"Cross-component references\" except `'network'`\n * is dropped (the substrate's `ContainerRuntime` owns docker network\n * creation now, so its errors surface as `ContainerRuntimeError`\n * upstream — we narrate the *phase* as `'cluster-network'` but the\n * fault tags through the substrate). */\nexport type WalrusPhase =\n\t| 'image-build'\n\t| 'cluster-network'\n\t| 'deploy'\n\t| 'exchange'\n\t| 'storage-node'\n\t| 'proxy'\n\t| 'fund-wal'\n\t| 'register-known';\n\n/** Generic Walrus plugin error. Raised by the plugin's acquire\n * body, WAL funding strategy, and the per-mode builders. */\nexport interface WalrusPluginError {\n\treadonly _tag: 'WalrusPluginError';\n\treadonly phase: WalrusPhase;\n\treadonly message: string;\n\treadonly cause?: unknown;\n\t/** Optional sub-process capture envelope — populated for deploy\n\t * one-shot + per-node container failures. */\n\treadonly stderr?: string;\n\treadonly stdout?: string;\n\treadonly exitCode?: number;\n}\n\nexport const walrusPluginError = (\n\tphase: WalrusPhase,\n\tmessage: string,\n\tparts: Omit<WalrusPluginError, '_tag' | 'phase' | 'message'> = {},\n): WalrusPluginError => ({ _tag: 'WalrusPluginError', phase, message, ...parts });\n\n/** Configuration error — synchronous factory-time guards\n * (`nodeCount >= 1`, `shards >= nodeCount`, missing required\n * fields on `.known(...)`). Surfaces as a thrown `Error` shaped\n * like this in the factory, mirroring the distilled-doc behavior\n * of synchronous configuration faults. */\nexport interface WalrusConfigError extends ConfigIssue {\n\treadonly _tag: 'WalrusConfigError';\n}\n\nconst makeWalrusConfigError = defineConfigError('WalrusConfigError');\n\nexport const walrusConfigError = (\n\tfield: string,\n\tmessage: string,\n\thint?: string,\n\tcause?: unknown,\n): WalrusConfigError => makeWalrusConfigError({ field, message, hint, cause });\n\n/** Union of every error a Walrus-plugin caller may encounter. */\nexport type WalrusError = WalrusPluginError | ForkIncompatibleError | WalrusConfigError;\n\n/**
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/plugins/walrus/errors.ts"],"sourcesContent":["// Walrus plugin — typed errors.\n//\n// Errors raised and consumed inside the Walrus plugin live here.\n// Cross-service errors that Walrus *consumes* but the substrate\n// raises (e.g. `ArtifactPublishError`) come from the substrate's\n// primitive — we don't redeclare those.\n//\n// `ForkIncompatibleError` is a cross-cutting mode-refusal shape\n// owned by `substrate/runtime/mode-errors.ts`; walrus contributes\n// the `walrusLocalCluster` variant via the factory below.\n//\n// Effect v4: plain interfaces with `_tag` discriminator (per\n// surrounding subsystem style). `Effect.catchTag` matches on `_tag`.\n\nimport { ForkIncompatibleError } from '../../substrate/runtime/mode-errors.ts';\nimport { defineConfigError, type ConfigIssue } from '../../substrate/runtime/config-validation.ts';\n\nexport { ForkIncompatibleError };\n\n/** Phases for `WalrusError`. Closed sum — keeps the cause-walker's\n * display table small. Matches the closed `WalrusPhases` from the\n * distilled doc §\"Cross-component references\" except `'network'`\n * is dropped (the substrate's `ContainerRuntime` owns docker network\n * creation now, so its errors surface as `ContainerRuntimeError`\n * upstream — we narrate the *phase* as `'cluster-network'` but the\n * fault tags through the substrate). */\nexport type WalrusPhase =\n\t| 'image-build'\n\t| 'cluster-network'\n\t| 'deploy'\n\t| 'exchange'\n\t| 'storage-node'\n\t| 'proxy'\n\t| 'fund-wal'\n\t| 'register-known';\n\n/** Generic Walrus plugin error. Raised by the plugin's acquire\n * body, WAL funding strategy, and the per-mode builders. */\nexport interface WalrusPluginError {\n\treadonly _tag: 'WalrusPluginError';\n\treadonly phase: WalrusPhase;\n\treadonly message: string;\n\treadonly cause?: unknown;\n\t/** Optional sub-process capture envelope — populated for deploy\n\t * one-shot + per-node container failures. */\n\treadonly stderr?: string;\n\treadonly stdout?: string;\n\treadonly exitCode?: number;\n}\n\nexport const walrusPluginError = (\n\tphase: WalrusPhase,\n\tmessage: string,\n\tparts: Omit<WalrusPluginError, '_tag' | 'phase' | 'message'> = {},\n): WalrusPluginError => ({ _tag: 'WalrusPluginError', phase, message, ...parts });\n\n/** Configuration error — synchronous factory-time guards\n * (`nodeCount >= 1`, `shards >= nodeCount`, missing required\n * fields on `.known(...)`). Surfaces as a thrown `Error` shaped\n * like this in the factory, mirroring the distilled-doc behavior\n * of synchronous configuration faults. */\nexport interface WalrusConfigError extends ConfigIssue {\n\treadonly _tag: 'WalrusConfigError';\n}\n\nconst makeWalrusConfigError = defineConfigError('WalrusConfigError');\n\nexport const walrusConfigError = (\n\tfield: string,\n\tmessage: string,\n\thint?: string,\n\tcause?: unknown,\n): WalrusConfigError => makeWalrusConfigError({ field, message, hint, cause });\n\n/** Union of every error a Walrus-plugin caller may encounter. */\nexport type WalrusError = WalrusPluginError | ForkIncompatibleError | WalrusConfigError;\n\n/** The catchable error tags this plugin exposes. Pinned against the\n * user-facing error catalog by the error-catalog-parity test. */\nexport const WALRUS_ERROR_TAGS: ReadonlyArray<WalrusError['_tag']> = [\n\t'WalrusPluginError',\n\t'ForkIncompatibleError',\n\t'WalrusConfigError',\n] as const;\n"],"mappings":";;;AAkDA,MAAa,qBACZ,OACA,SACA,QAA+D,CAAC,OACxC;CAAE,MAAM;CAAqB;CAAO;CAAS,GAAG;AAAM;AAW/E,MAAM,wBAAwB,kBAAkB,mBAAmB;AAEnE,MAAa,qBACZ,OACA,SACA,MACA,UACuB,sBAAsB;CAAE;CAAO;CAAS;CAAM;AAAM,CAAC"}
|
|
@@ -41,6 +41,20 @@ const resolveWalCoinType = (args) => Effect.gen(function* () {
|
|
|
41
41
|
});
|
|
42
42
|
/** Capability key for the WAL faucet strategy. */
|
|
43
43
|
const walFaucetStrategyKey = (fullCoinType) => `coinType:${fullCoinType}`;
|
|
44
|
+
/** The WAL faucet strategy-contributor decl, keyed by the resolved WAL
|
|
45
|
+
* full coin type. Emitted inline from the local-mode walrus `start` (only
|
|
46
|
+
* when both a faucet strategy and a coin type resolved). Kept here next to
|
|
47
|
+
* the strategy + key so the contribution shape lives with its content.
|
|
48
|
+
*
|
|
49
|
+
* `fullCoinType` is a plain `string` because the resolved value's
|
|
50
|
+
* `walCoinType` carries that width — `walFaucetStrategyKey` is generic and
|
|
51
|
+
* stamps it into the `coinType:` key verbatim. */
|
|
52
|
+
const makeWalFaucetContribution = (strategy, fullCoinType) => ({
|
|
53
|
+
kind: "strategy-contributor",
|
|
54
|
+
capabilityKey: walFaucetStrategyKey(fullCoinType),
|
|
55
|
+
strategy,
|
|
56
|
+
autoMounted: true
|
|
57
|
+
});
|
|
44
58
|
/** Build the strategy value.
|
|
45
59
|
*
|
|
46
60
|
* The request amount is the SUI MIST amount to spend on the local
|
|
@@ -62,6 +76,6 @@ const makeWalFaucetStrategy = (opts) => ({
|
|
|
62
76
|
}
|
|
63
77
|
});
|
|
64
78
|
//#endregion
|
|
65
|
-
export { makeWalFaucetStrategy, resolveWalCoinType, walCoinType, walFaucetStrategyKey, walPackageIdFromCoinType };
|
|
79
|
+
export { makeWalFaucetContribution, makeWalFaucetStrategy, resolveWalCoinType, walCoinType, walFaucetStrategyKey, walPackageIdFromCoinType };
|
|
66
80
|
|
|
67
81
|
//# sourceMappingURL=faucet-strategy.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"faucet-strategy.mjs","names":[],"sources":["../../../src/plugins/walrus/faucet-strategy.ts"],"sourcesContent":["// Walrus WAL faucet strategy.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 7a\"):\n// when the local cluster has a non-empty `exchange`, walrus registers\n// a WAL exchange strategy on the global strategy registry so any\n// `account('alice', { funding: [{ coin: wal, amount }] })` request\n// gets satisfied via SUI → WAL swap on chain.\n//\n// Architecture (StrategyContributor §7): the faucet registry is\n// `capabilityKey: 'coinType:<fullCoinType>'` (distilled-doc\n// convention shared with the faucet plugin's domain:discriminator\n// pattern). The dispatch site doesn't import this strategy — it\n// looks it up by key.\n//\nimport { Effect, Schema } from 'effect';\n\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type {
|
|
1
|
+
{"version":3,"file":"faucet-strategy.mjs","names":[],"sources":["../../../src/plugins/walrus/faucet-strategy.ts"],"sourcesContent":["// Walrus WAL faucet strategy.\n//\n// Distilled-doc reference (06-walrus.md §\"Lifecycle phase 7a\"):\n// when the local cluster has a non-empty `exchange`, walrus registers\n// a WAL exchange strategy on the global strategy registry so any\n// `account('alice', { funding: [{ coin: wal, amount }] })` request\n// gets satisfied via SUI → WAL swap on chain.\n//\n// Architecture (StrategyContributor §7): the faucet registry is\n// `capabilityKey: 'coinType:<fullCoinType>'` (distilled-doc\n// convention shared with the faucet plugin's domain:discriminator\n// pattern). The dispatch site doesn't import this strategy — it\n// looks it up by key.\n//\nimport { Effect, Schema } from 'effect';\n\nimport type { ChainProbe } from '../../contracts/chain-probe.ts';\nimport type { StrategyContributorDecl } from '../../contracts/strategy-contributor.ts';\nimport type { AccountFundingStrategy } from '../account/index.ts';\nimport { walrusPluginError, type WalrusPluginError } from './errors.ts';\nimport type { WalExchangeProbeKey } from './wal-swap.ts';\nimport { swapAccountSuiForWal, type WalExchangeHandle, type WalSwapSdk } from './wal-swap.ts';\n\n/** Full local WAL coin type derived from the deployed Walrus package. */\nexport const walCoinType = <PackageId extends string>(\n\tpackageId: PackageId,\n): `${PackageId}::wal::WAL` => `${packageId}::wal::WAL` as const;\n\n/** Resolve the package id that defines `wal::WAL`.\n *\n * The Walrus deploy summary's `package_id` can be the latest upgraded\n * Walrus package, while Sui coin types use the original package id\n * that defines `wal::WAL`. The protected treasury object is the\n * reliable on-chain anchor for that original id. */\nexport const parseWalCoinTypeFromTreasuryType = (\n\ttreasuryType: string,\n): `${string}::wal::WAL` | null => {\n\tconst protectedTreasury = /^(0x[0-9a-fA-F]+)::wal::ProtectedTreasury$/.exec(treasuryType);\n\tif (protectedTreasury?.[1] !== undefined) {\n\t\treturn walCoinType(protectedTreasury[1]);\n\t}\n\n\tconst treasuryCap = /^0x(?:0+)?2::coin::TreasuryCap<((0x[0-9a-fA-F]+)::wal::WAL)>$/.exec(\n\t\ttreasuryType,\n\t);\n\tif (treasuryCap?.[1] !== undefined) {\n\t\treturn treasuryCap[1] as `${string}::wal::WAL`;\n\t}\n\n\treturn null;\n};\n\nexport const walPackageIdFromCoinType = (fullCoinType: `${string}::wal::WAL`): string =>\n\tfullCoinType.split('::')[0]!;\n\nconst WalTreasuryObjectShape = Schema.Struct({\n\tobjectId: Schema.String,\n\ttype: Schema.String,\n});\n\nexport const resolveWalCoinType = (args: {\n\treadonly probe: ChainProbe<WalExchangeProbeKey>;\n\treadonly treasuryObjectId: string | undefined;\n\treadonly deployPackageId: string;\n\treadonly requireTreasuryObject: boolean;\n}): Effect.Effect<`${string}::wal::WAL`, WalrusPluginError> =>\n\tEffect.gen(function* () {\n\t\tif (args.treasuryObjectId === undefined) {\n\t\t\tif (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'exchange',\n\t\t\t\t\t'walrus.exchange: WAL exchange funding requires treasury_object in walrus deploy output so the original WAL coin type can be resolved.',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tconst found = yield* args.probe\n\t\t\t.get({ kind: 'object', objectId: args.treasuryObjectId }, WalTreasuryObjectShape, 'lenient')\n\t\t\t.pipe(\n\t\t\t\tEffect.mapError((cause) =>\n\t\t\t\t\twalrusPluginError(\n\t\t\t\t\t\t'exchange',\n\t\t\t\t\t\t`walrus.exchange: failed to resolve WAL treasury object ${args.treasuryObjectId}: ${cause.reason}: ${cause.detail}`,\n\t\t\t\t\t\t{ cause },\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\tif (found === null) {\n\t\t\tif (!args.requireTreasuryObject) return walCoinType(args.deployPackageId);\n\t\t\treturn yield* Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'exchange',\n\t\t\t\t\t`walrus.exchange: WAL treasury object ${args.treasuryObjectId} was not found; cannot derive the WAL coin type for account funding.`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\n\t\tconst parsed = parseWalCoinTypeFromTreasuryType(found.type);\n\t\tif (parsed !== null) return parsed;\n\n\t\treturn yield* Effect.fail(\n\t\t\twalrusPluginError(\n\t\t\t\t'exchange',\n\t\t\t\t`walrus.exchange: unexpected WAL treasury object type \"${found.type}\" — expected \"<pkg>::wal::ProtectedTreasury\" or \"0x2::coin::TreasuryCap<<pkg>::wal::WAL>\".`,\n\t\t\t),\n\t\t);\n\t});\n\n/** Capability key for the WAL faucet strategy. */\nexport const walFaucetStrategyKey = <FullCoinType extends string>(\n\tfullCoinType: FullCoinType,\n): `coinType:${FullCoinType}` => `coinType:${fullCoinType}` as const;\n\n/** The WAL faucet strategy-contributor decl, keyed by the resolved WAL\n * full coin type. Emitted inline from the local-mode walrus `start` (only\n * when both a faucet strategy and a coin type resolved). Kept here next to\n * the strategy + key so the contribution shape lives with its content.\n *\n * `fullCoinType` is a plain `string` because the resolved value's\n * `walCoinType` carries that width — `walFaucetStrategyKey` is generic and\n * stamps it into the `coinType:` key verbatim. */\nexport const makeWalFaucetContribution = (\n\tstrategy: WalFaucetStrategy,\n\tfullCoinType: string,\n): StrategyContributorDecl<`coinType:${string}`, WalFaucetStrategy> => ({\n\tkind: 'strategy-contributor',\n\tcapabilityKey: walFaucetStrategyKey(fullCoinType),\n\tstrategy,\n\tautoMounted: true,\n});\n\n/** Faucet strategy value — closed over the WAL exchange's object id.\n * The requesting account signs the swap through the shared account\n * funding pipeline. */\nexport type WalFaucetStrategy = AccountFundingStrategy<WalrusPluginError>;\n\n/** Inputs the local-cluster mode passes when constructing this. */\nexport interface WalFaucetStrategyOptions {\n\treadonly exchange: WalExchangeHandle;\n\treadonly sdk: WalSwapSdk;\n}\n\n/** Build the strategy value.\n *\n * The request amount is the SUI MIST amount to spend on the local\n * exchange for WAL. Account funding skips zero amounts before the\n * strategy is invoked; the guard here keeps direct calls no-op. */\nexport const makeWalFaucetStrategy = (opts: WalFaucetStrategyOptions): WalFaucetStrategy => ({\n\tusesAccountSigner: true,\n\t// The swap buys WAL with the recipient account's own SUI, so the recipient\n\t// must be a resolved account with a signer — funding an arbitrary 0x address\n\t// is rejected by the dispatcher/dashboard on this flag.\n\trequiresRecipientAccount: true,\n\trequest: (req) => {\n\t\tif (req.amount <= 0n) return Effect.void;\n\t\tif (req.account === undefined) {\n\t\t\treturn Effect.fail(\n\t\t\t\twalrusPluginError(\n\t\t\t\t\t'fund-wal',\n\t\t\t\t\t'walrus WAL funding spends the recipient account’s own SUI, so it requires a resolved account signer.',\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn swapAccountSuiForWal({\n\t\t\taccount: req.account,\n\t\t\tsdk: opts.sdk,\n\t\t\texchange: opts.exchange,\n\t\t\trecipientAddress: req.address,\n\t\t\tpaymentMist: req.amount,\n\t\t}).pipe(Effect.asVoid);\n\t},\n});\n"],"mappings":";;;;;AAwBA,MAAa,eACZ,cAC8B,GAAG,UAAU;;;;;;;AAQ5C,MAAa,oCACZ,iBACkC;CAClC,MAAM,oBAAoB,6CAA6C,KAAK,YAAY;CACxF,IAAI,oBAAoB,OAAO,KAAA,GAC9B,OAAO,YAAY,kBAAkB,EAAE;CAGxC,MAAM,cAAc,gEAAgE,KACnF,YACD;CACA,IAAI,cAAc,OAAO,KAAA,GACxB,OAAO,YAAY;CAGpB,OAAO;AACR;AAEA,MAAa,4BAA4B,iBACxC,aAAa,MAAM,IAAI,CAAC,CAAC;AAE1B,MAAM,yBAAyB,OAAO,OAAO;CAC5C,UAAU,OAAO;CACjB,MAAM,OAAO;AACd,CAAC;AAED,MAAa,sBAAsB,SAMlC,OAAO,IAAI,aAAa;CACvB,IAAI,KAAK,qBAAqB,KAAA,GAAW;EACxC,IAAI,CAAC,KAAK,uBAAuB,OAAO,YAAY,KAAK,eAAe;EACxE,OAAO,OAAO,OAAO,KACpB,kBACC,YACA,uIACD,CACD;CACD;CAEA,MAAM,QAAQ,OAAO,KAAK,MACxB,IAAI;EAAE,MAAM;EAAU,UAAU,KAAK;CAAiB,GAAG,wBAAwB,SAAS,CAAC,CAC3F,KACA,OAAO,UAAU,UAChB,kBACC,YACA,0DAA0D,KAAK,iBAAiB,IAAI,MAAM,OAAO,IAAI,MAAM,UAC3G,EAAE,MAAM,CACT,CACD,CACD;CAED,IAAI,UAAU,MAAM;EACnB,IAAI,CAAC,KAAK,uBAAuB,OAAO,YAAY,KAAK,eAAe;EACxE,OAAO,OAAO,OAAO,KACpB,kBACC,YACA,wCAAwC,KAAK,iBAAiB,qEAC/D,CACD;CACD;CAEA,MAAM,SAAS,iCAAiC,MAAM,IAAI;CAC1D,IAAI,WAAW,MAAM,OAAO;CAE5B,OAAO,OAAO,OAAO,KACpB,kBACC,YACA,yDAAyD,MAAM,KAAK,2FACrE,CACD;AACD,CAAC;;AAGF,MAAa,wBACZ,iBACgC,YAAY;;;;;;;;;AAU7C,MAAa,6BACZ,UACA,kBACuE;CACvE,MAAM;CACN,eAAe,qBAAqB,YAAY;CAChD;CACA,aAAa;AACd;;;;;;AAkBA,MAAa,yBAAyB,UAAuD;CAC5F,mBAAmB;CAInB,0BAA0B;CAC1B,UAAU,QAAQ;EACjB,IAAI,IAAI,UAAU,IAAI,OAAO,OAAO;EACpC,IAAI,IAAI,YAAY,KAAA,GACnB,OAAO,OAAO,KACb,kBACC,YACA,sGACD,CACD;EAED,OAAO,qBAAqB;GAC3B,SAAS,IAAI;GACb,KAAK,KAAK;GACV,UAAU,KAAK;GACf,kBAAkB,IAAI;GACtB,aAAa,IAAI;EAClB,CAAC,CAAC,CAAC,KAAK,OAAO,MAAM;CACtB;AACD"}
|
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import { CodegenableDecl } from "../../contracts/codegenable.mjs";
|
|
2
|
-
import { ProjectionDecl } from "../../contracts/projection.mjs";
|
|
3
|
-
import { RoutableDecl } from "../../contracts/routable.mjs";
|
|
4
|
-
import { SnapshotableDecl } from "../../contracts/snapshotable.mjs";
|
|
5
|
-
import { StrategyContributorDecl } from "../../contracts/strategy-contributor.mjs";
|
|
6
1
|
import { Plugin, ResourceRef } from "../../substrate/plugin.mjs";
|
|
7
2
|
import { ModeNamespace } from "../../api/mode-narrowed-factory.mjs";
|
|
8
|
-
import { SuiClient } from "../sui/mode/shared.mjs";
|
|
9
3
|
import { SuiOptions } from "../sui/mode/spec.mjs";
|
|
4
|
+
import { SuiClient } from "../sui/mode/shared.mjs";
|
|
10
5
|
import { AccountFundingCoinValue } from "../account/funding.mjs";
|
|
11
6
|
import { WalrusConfigError, WalrusError, WalrusPhase, WalrusPluginError } from "./errors.mjs";
|
|
12
7
|
import { WalFaucetStrategy } from "./faucet-strategy.mjs";
|
|
13
8
|
import { WalrusStorageNode } from "./storage-nodes.mjs";
|
|
14
9
|
import { WalrusLocalClusterOptions } from "./mode/local-cluster.mjs";
|
|
15
10
|
import { WalrusKnownDeploymentOptions, WalrusKnownNetwork } from "./mode/known-deploy.mjs";
|
|
16
|
-
import { WalrusKnownStateEntry, WalrusLocalStateEntry, WalrusStateEntry } from "./registry-publish.mjs";
|
|
17
11
|
import { WalrusBindings, WalrusNodeBinding } from "./codegen.mjs";
|
|
18
12
|
//#region src/plugins/walrus/index.d.ts
|
|
19
13
|
/** The Walrus resolved value carried by the resource. */
|
|
20
14
|
interface WalrusResolved {
|
|
21
15
|
readonly mode: 'local' | 'known';
|
|
22
|
-
|
|
16
|
+
/** Network name the walrus deployment targets (`localnet`/`testnet`/…). */
|
|
17
|
+
readonly network: string;
|
|
23
18
|
readonly walrusPackageId: string | null;
|
|
24
19
|
readonly walPackageId: string | null;
|
|
25
20
|
/** SDK-ready `packageConfig` — structurally compatible with
|
|
@@ -49,37 +44,18 @@ interface WalCoinValue extends AccountFundingCoinValue {
|
|
|
49
44
|
*
|
|
50
45
|
* The funding strategy itself is contributed by the Walrus service
|
|
51
46
|
* once its local exchange exists. */
|
|
52
|
-
declare const walCoin: (walrusMember: ResourceRef<"walrus", WalrusResolved>) => Plugin<"coin:wal", WalCoinValue, readonly [ResourceRef<"walrus", WalrusResolved>]
|
|
53
|
-
readonly kind: "snapshotable";
|
|
54
|
-
} & Omit<SnapshotableDecl, "kind">> | Readonly<{
|
|
55
|
-
readonly kind: "routable";
|
|
56
|
-
} & Omit<RoutableDecl, "kind">> | Readonly<{
|
|
57
|
-
readonly kind: "codegenable";
|
|
58
|
-
} & Omit<CodegenableDecl<string>, "kind">> | Readonly<{
|
|
59
|
-
readonly kind: "projection";
|
|
60
|
-
} & Omit<ProjectionDecl, "kind">> | Readonly<{
|
|
61
|
-
readonly kind: "strategy-contributor";
|
|
62
|
-
} & Omit<StrategyContributorDecl<string, unknown>, "kind">>) | Readonly<{
|
|
63
|
-
readonly kind: string;
|
|
64
|
-
} & object>)[]>;
|
|
47
|
+
declare const walCoin: (walrusMember: ResourceRef<"walrus", WalrusResolved>) => Plugin<"coin:wal", WalCoinValue, readonly [ResourceRef<"walrus", WalrusResolved>]>;
|
|
65
48
|
/** Local-cluster shorthand. Known deployments are selected through
|
|
66
49
|
* `walrusFor(network).known(...)` so network choice stays explicit. */
|
|
67
50
|
declare const walrus: (opts?: {
|
|
68
51
|
readonly local?: WalrusLocalClusterOptions;
|
|
69
52
|
}) => Plugin<"walrus", WalrusResolved, readonly [ResourceRef<"sui", SuiClient & {
|
|
70
53
|
readonly mode: SuiOptions["mode"];
|
|
71
|
-
}>]
|
|
72
|
-
readonly noteName: string;
|
|
73
|
-
}>, ...(RoutableDecl | {
|
|
74
|
-
kind: "strategy-contributor";
|
|
75
|
-
capabilityKey: `coinType:${string}`;
|
|
76
|
-
strategy: WalFaucetStrategy;
|
|
77
|
-
autoMounted: true;
|
|
78
|
-
})[]]>;
|
|
54
|
+
}>]>;
|
|
79
55
|
/** Mode-narrowed factory namespace.
|
|
80
56
|
*
|
|
81
57
|
* Usage:
|
|
82
|
-
* const network = { mode: 'local',
|
|
58
|
+
* const network = { mode: 'local', network: 'localnet' } as const;
|
|
83
59
|
* walrusFor(network).local({...}) // OK
|
|
84
60
|
* walrusFor(network).known({...}) // type error: 'known' not in 'local' branch
|
|
85
61
|
*
|
|
@@ -90,17 +66,10 @@ declare const walrusFor: ModeNamespace<{
|
|
|
90
66
|
local: {
|
|
91
67
|
local: (opts?: WalrusLocalClusterOptions) => Plugin<"walrus", WalrusResolved, readonly [ResourceRef<"sui", SuiClient & {
|
|
92
68
|
readonly mode: SuiOptions["mode"];
|
|
93
|
-
}>]
|
|
94
|
-
readonly noteName: string;
|
|
95
|
-
}>, ...(RoutableDecl | {
|
|
96
|
-
kind: "strategy-contributor";
|
|
97
|
-
capabilityKey: `coinType:${string}`;
|
|
98
|
-
strategy: WalFaucetStrategy;
|
|
99
|
-
autoMounted: true;
|
|
100
|
-
})[]]>;
|
|
69
|
+
}>]>;
|
|
101
70
|
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
102
71
|
mode: "known";
|
|
103
|
-
|
|
72
|
+
network: string;
|
|
104
73
|
walrusPackageId: null;
|
|
105
74
|
walPackageId: null;
|
|
106
75
|
packageConfig: {
|
|
@@ -116,12 +85,12 @@ declare const walrusFor: ModeNamespace<{
|
|
|
116
85
|
walCoinType: null;
|
|
117
86
|
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
118
87
|
readonly mode: SuiOptions["mode"];
|
|
119
|
-
}>]
|
|
88
|
+
}>]>;
|
|
120
89
|
};
|
|
121
90
|
live: {
|
|
122
91
|
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
123
92
|
mode: "known";
|
|
124
|
-
|
|
93
|
+
network: string;
|
|
125
94
|
walrusPackageId: null;
|
|
126
95
|
walPackageId: null;
|
|
127
96
|
packageConfig: {
|
|
@@ -137,12 +106,12 @@ declare const walrusFor: ModeNamespace<{
|
|
|
137
106
|
walCoinType: null;
|
|
138
107
|
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
139
108
|
readonly mode: SuiOptions["mode"];
|
|
140
|
-
}>]
|
|
109
|
+
}>]>;
|
|
141
110
|
};
|
|
142
111
|
fork: {
|
|
143
112
|
known: (opts: WalrusKnownDeploymentOptions) => Plugin<"walrus", {
|
|
144
113
|
mode: "known";
|
|
145
|
-
|
|
114
|
+
network: string;
|
|
146
115
|
walrusPackageId: null;
|
|
147
116
|
walPackageId: null;
|
|
148
117
|
packageConfig: {
|
|
@@ -158,7 +127,7 @@ declare const walrusFor: ModeNamespace<{
|
|
|
158
127
|
walCoinType: null;
|
|
159
128
|
}, readonly [ResourceRef<"sui", SuiClient & {
|
|
160
129
|
readonly mode: SuiOptions["mode"];
|
|
161
|
-
}>]
|
|
130
|
+
}>]>;
|
|
162
131
|
};
|
|
163
132
|
}>;
|
|
164
133
|
//#endregion
|