@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,7 +1,5 @@
|
|
|
1
|
-
import { SpanAttr } from "../../../substrate/runtime/observability/spans.mjs";
|
|
2
1
|
import { suiPluginError } from "../errors.mjs";
|
|
3
2
|
import { formatUnknownError } from "../../../substrate/runtime/format-unknown-error.mjs";
|
|
4
|
-
import { SuiSpans } from "../spans.mjs";
|
|
5
3
|
import { assembleSuiClient, buildWaitForTransactionsReady, fetchChainId, makeResolvedNetwork, noopWaitForTransactionsReady } from "./shared-boot.mjs";
|
|
6
4
|
import { Duration, Effect } from "effect";
|
|
7
5
|
import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
@@ -51,11 +49,6 @@ const resolveEndpoints = (opts) => {
|
|
|
51
49
|
/** Build the live-mode boot Effect. */
|
|
52
50
|
const bootLiveMode = (opts) => Effect.gen(function* () {
|
|
53
51
|
const endpoints = yield* resolveEndpoints(opts);
|
|
54
|
-
yield* Effect.annotateCurrentSpan({
|
|
55
|
-
[SuiSpans.liveNetwork]: opts.network,
|
|
56
|
-
[SuiSpans.liveRpcUrl]: endpoints.rpcUrl,
|
|
57
|
-
...endpoints.faucetUrl !== void 0 ? { [SuiSpans.liveFaucetUrl]: endpoints.faucetUrl } : {}
|
|
58
|
-
});
|
|
59
52
|
const sdkClient = yield* Effect.try({
|
|
60
53
|
try: () => new SuiGrpcClient({
|
|
61
54
|
baseUrl: endpoints.rpcUrl,
|
|
@@ -63,14 +56,11 @@ const bootLiveMode = (opts) => Effect.gen(function* () {
|
|
|
63
56
|
}),
|
|
64
57
|
catch: (cause) => suiPluginError("chain-id-fetch", `sui live mode: SuiGrpcClient construction failed for rpcUrl=${endpoints.rpcUrl}: ${formatUnknownError(cause)}`, cause)
|
|
65
58
|
});
|
|
66
|
-
const
|
|
67
|
-
timeout: opts.readyTimeout ?? DEFAULT_LIVE_CHAIN_ID_TIMEOUT,
|
|
68
|
-
span: "devstack.plugin.sui.live.fetchChainId"
|
|
69
|
-
}));
|
|
59
|
+
const chainId = opts.chainId ?? (yield* fetchChainId(sdkClient, { timeout: opts.readyTimeout ?? DEFAULT_LIVE_CHAIN_ID_TIMEOUT }));
|
|
70
60
|
const waitForTransactionsReady = endpoints.faucetUrl !== void 0 ? yield* buildWaitForTransactionsReady(endpoints.faucetUrl) : noopWaitForTransactionsReady;
|
|
71
61
|
const { client } = yield* assembleSuiClient({
|
|
72
62
|
sdkClient,
|
|
73
|
-
|
|
63
|
+
chainId,
|
|
74
64
|
rpcUrl: endpoints.rpcUrl,
|
|
75
65
|
...endpoints.faucetUrl !== void 0 ? { faucetUrl: endpoints.faucetUrl } : {},
|
|
76
66
|
...endpoints.graphqlUrl !== void 0 ? { graphqlUrl: endpoints.graphqlUrl } : {},
|
|
@@ -79,7 +69,7 @@ const bootLiveMode = (opts) => Effect.gen(function* () {
|
|
|
79
69
|
return {
|
|
80
70
|
resolved: makeResolvedNetwork({
|
|
81
71
|
mode: "live",
|
|
82
|
-
|
|
72
|
+
chainId,
|
|
83
73
|
rpc: endpoints.rpcUrl,
|
|
84
74
|
source: opts.rpcUrl === void 0 && opts.faucetUrl === void 0 && opts.graphqlUrl === void 0 ? "default" : "config",
|
|
85
75
|
...endpoints.faucetUrl !== void 0 ? { faucet: endpoints.faucetUrl } : {},
|
|
@@ -87,10 +77,7 @@ const bootLiveMode = (opts) => Effect.gen(function* () {
|
|
|
87
77
|
}),
|
|
88
78
|
client
|
|
89
79
|
};
|
|
90
|
-
})
|
|
91
|
-
[SpanAttr.plugin]: "sui",
|
|
92
|
-
[SuiSpans.mode]: "live"
|
|
93
|
-
} }));
|
|
80
|
+
});
|
|
94
81
|
//#endregion
|
|
95
82
|
export { bootLiveMode };
|
|
96
83
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"live.mjs","names":[],"sources":["../../../../src/plugins/sui/mode/live.ts"],"sourcesContent":["// Sui plugin — live mode (testnet / mainnet / devnet / custom).\n//\n// Wraps a public or caller-provided Sui RPC. Testnet has a faucet;\n// mainnet has none; custom may or may not.\n//\n// What's hard:\n// - No ready probe is meaningful (the public chain is always\n// up); chain-id fetch IS the only sentinel with a bounded\n// timeout.\n// - Faucet-less networks (mainnet) need a \"no-op\" funds-ready\n// gate so downstream callers don't have to branch.\n// - The KnownPackage substrate contributions are wired here so\n// wallet-standard / MVR / known-deployment lookups find the\n// right published ids.\n//\n// Live mode contributes a `ChainProbe` and a `Codegenable` — but NO\n// managed container, NO `Routable`, and the\n// build container is forced to the host CLI path (no in-stack\n// build image). The latter is flagged in the distilled-doc Open\n// questions as a candidate to revisit.\n//\n// Boot sequence:\n//\n// 1. Resolve `rpcUrl` / `faucetUrl` / `graphqlUrl` from caller\n// overrides, then fall back to `LIVE_DEFAULTS` for known nets.\n// `custom` requires `rpcUrl` — surface a typed refusal if\n// omitted.\n// 2. Construct `SuiGrpcClient` against the resolved URL with the\n// matching `network:` discriminator (so MVR / wallet-standard\n// hints route correctly).\n// 3. Fetch chain id (the only readiness sentinel for live).\n// 4. Build `waitForTransactionsReady`:\n// - mainnet: trivially-succeeding no-op (no faucet exists).\n// - testnet/devnet/custom-with-faucet: real HTTP probe.\n// - custom-without-faucet: no-op.\n\nimport { Duration, Effect, type Scope } from 'effect';\n\nimport { SuiGrpcClient } from '@mysten/sui/grpc';\n\nimport {
|
|
1
|
+
{"version":3,"file":"live.mjs","names":[],"sources":["../../../../src/plugins/sui/mode/live.ts"],"sourcesContent":["// Sui plugin — live mode (testnet / mainnet / devnet / custom).\n//\n// Wraps a public or caller-provided Sui RPC. Testnet has a faucet;\n// mainnet has none; custom may or may not.\n//\n// What's hard:\n// - No ready probe is meaningful (the public chain is always\n// up); chain-id fetch IS the only sentinel with a bounded\n// timeout.\n// - Faucet-less networks (mainnet) need a \"no-op\" funds-ready\n// gate so downstream callers don't have to branch.\n// - The KnownPackage substrate contributions are wired here so\n// wallet-standard / MVR / known-deployment lookups find the\n// right published ids.\n//\n// Live mode contributes a `ChainProbe` and a `Codegenable` — but NO\n// managed container, NO `Routable`, and the\n// build container is forced to the host CLI path (no in-stack\n// build image). The latter is flagged in the distilled-doc Open\n// questions as a candidate to revisit.\n//\n// Boot sequence:\n//\n// 1. Resolve `rpcUrl` / `faucetUrl` / `graphqlUrl` from caller\n// overrides, then fall back to `LIVE_DEFAULTS` for known nets.\n// `custom` requires `rpcUrl` — surface a typed refusal if\n// omitted.\n// 2. Construct `SuiGrpcClient` against the resolved URL with the\n// matching `network:` discriminator (so MVR / wallet-standard\n// hints route correctly).\n// 3. Fetch chain id (the only readiness sentinel for live).\n// 4. Build `waitForTransactionsReady`:\n// - mainnet: trivially-succeeding no-op (no faucet exists).\n// - testnet/devnet/custom-with-faucet: real HTTP probe.\n// - custom-without-faucet: no-op.\n\nimport { Duration, Effect, type Scope } from 'effect';\n\nimport { SuiGrpcClient } from '@mysten/sui/grpc';\n\nimport { suiPluginError, type SuiConfigError, type SuiPluginError } from '../errors.ts';\nimport { formatUnknownError } from '../../../substrate/runtime/format-unknown-error.ts';\nimport type { ResolvedSuiNetwork } from '../network-resolver.ts';\nimport type { SuiClient } from './shared.ts';\nimport {\n\tassembleSuiClient,\n\tbuildWaitForTransactionsReady,\n\tfetchChainId,\n\tmakeResolvedNetwork,\n\tnoopWaitForTransactionsReady,\n} from './shared-boot.ts';\nimport type { SuiLiveOptions } from './spec.ts';\n\n/** Default chain-id fetch timeout for live RPCs. */\nexport const DEFAULT_LIVE_CHAIN_ID_TIMEOUT = Duration.seconds(30);\n\n/** Default RPC endpoints per known network. `custom` requires the\n * caller to supply `rpcUrl`. */\nexport const LIVE_DEFAULTS = {\n\ttestnet: {\n\t\trpcUrl: 'https://fullnode.testnet.sui.io:443',\n\t\tfaucetUrl: 'https://faucet.testnet.sui.io',\n\t\tgraphqlUrl: 'https://sui-testnet.mystenlabs.com/graphql',\n\t},\n\tmainnet: {\n\t\trpcUrl: 'https://fullnode.mainnet.sui.io:443',\n\t\tfaucetUrl: undefined as string | undefined,\n\t\tgraphqlUrl: 'https://sui-mainnet.mystenlabs.com/graphql',\n\t},\n\tdevnet: {\n\t\trpcUrl: 'https://fullnode.devnet.sui.io:443',\n\t\tfaucetUrl: 'https://faucet.devnet.sui.io',\n\t\tgraphqlUrl: undefined as string | undefined,\n\t},\n} as const;\n\n/** Resolved live-mode boot artifacts. */\nexport interface LiveModeBootResult {\n\treadonly resolved: ResolvedSuiNetwork;\n\treadonly client: SuiClient;\n}\n\ninterface ResolvedLiveEndpoints {\n\treadonly rpcUrl: string;\n\treadonly faucetUrl: string | undefined;\n\treadonly graphqlUrl: string | undefined;\n\treadonly sdkNetwork: 'mainnet' | 'testnet' | 'devnet' | 'localnet';\n}\n\n/** Resolve endpoints from caller overrides + the known-network table.\n * Order: caller-provided wins; otherwise the LIVE_DEFAULTS row for\n * the requested network. `custom` MUST carry an explicit `rpcUrl`. */\nconst resolveEndpoints = (\n\topts: SuiLiveOptions,\n): Effect.Effect<ResolvedLiveEndpoints, SuiPluginError> => {\n\tif (opts.network === 'custom') {\n\t\tif (opts.rpcUrl === undefined) {\n\t\t\treturn Effect.fail(\n\t\t\t\tsuiPluginError(\n\t\t\t\t\t'chain-id-fetch',\n\t\t\t\t\t`sui live mode: network='custom' requires opts.rpcUrl. ` +\n\t\t\t\t\t\t`Use suiFor(network).live.custom({rpcUrl: ...}) or pass network='testnet'|'mainnet'|'devnet' to use the built-in defaults.`,\n\t\t\t\t),\n\t\t\t);\n\t\t}\n\t\treturn Effect.succeed({\n\t\t\trpcUrl: opts.rpcUrl,\n\t\t\tfaucetUrl: opts.faucetUrl,\n\t\t\tgraphqlUrl: opts.graphqlUrl,\n\t\t\t// SDK accepts arbitrary strings under the `(string & {})`\n\t\t\t// branch; `localnet` is the closest semantic for a custom\n\t\t\t// caller-defined live target.\n\t\t\tsdkNetwork: 'localnet',\n\t\t});\n\t}\n\tconst defaults = LIVE_DEFAULTS[opts.network];\n\treturn Effect.succeed({\n\t\trpcUrl: opts.rpcUrl ?? defaults.rpcUrl,\n\t\tfaucetUrl: opts.faucetUrl ?? defaults.faucetUrl,\n\t\tgraphqlUrl: opts.graphqlUrl ?? defaults.graphqlUrl,\n\t\tsdkNetwork: opts.network,\n\t});\n};\n\n/** Build the live-mode boot Effect. */\nexport const bootLiveMode = (\n\topts: SuiLiveOptions,\n): Effect.Effect<LiveModeBootResult, SuiPluginError | SuiConfigError, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\t// ----- 1. Resolve endpoints ------------------------------------------\n\t\tconst endpoints = yield* resolveEndpoints(opts);\n\n\t\t// ----- 2. Construct the grpc client ----------------------------------\n\t\tconst sdkClient = yield* Effect.try({\n\t\t\ttry: () =>\n\t\t\t\tnew SuiGrpcClient({\n\t\t\t\t\tbaseUrl: endpoints.rpcUrl,\n\t\t\t\t\tnetwork: endpoints.sdkNetwork,\n\t\t\t\t}),\n\t\t\tcatch: (cause): SuiPluginError =>\n\t\t\t\tsuiPluginError(\n\t\t\t\t\t'chain-id-fetch',\n\t\t\t\t\t`sui live mode: SuiGrpcClient construction failed for rpcUrl=${endpoints.rpcUrl}: ${formatUnknownError(cause)}`,\n\t\t\t\t\tcause,\n\t\t\t\t),\n\t\t});\n\n\t\t// ----- 3. Resolve chain id -------------------------------------------\n\t\tconst chainId =\n\t\t\topts.chainId ??\n\t\t\t(yield* fetchChainId(sdkClient, {\n\t\t\t\ttimeout: opts.readyTimeout ?? DEFAULT_LIVE_CHAIN_ID_TIMEOUT,\n\t\t\t}));\n\n\t\t// ----- 4. Build waitForTransactionsReady -----------------------------\n\t\t// Mainnet: no faucet exists, gate is a no-op. testnet/devnet/\n\t\t// custom-with-faucet: real HTTP probe (rate-limited by upstream,\n\t\t// but the wire shape is identical to localnet).\n\t\tconst waitForTransactionsReady =\n\t\t\tendpoints.faucetUrl !== undefined\n\t\t\t\t? yield* buildWaitForTransactionsReady(endpoints.faucetUrl)\n\t\t\t\t: noopWaitForTransactionsReady;\n\n\t\t// ----- 5. Assemble + return ------------------------------------------\n\t\tconst { client } = yield* assembleSuiClient({\n\t\t\tsdkClient,\n\t\t\tchainId,\n\t\t\trpcUrl: endpoints.rpcUrl,\n\t\t\t...(endpoints.faucetUrl !== undefined ? { faucetUrl: endpoints.faucetUrl } : {}),\n\t\t\t...(endpoints.graphqlUrl !== undefined ? { graphqlUrl: endpoints.graphqlUrl } : {}),\n\t\t\twaitForTransactionsReady,\n\t\t});\n\t\tconst resolved = makeResolvedNetwork({\n\t\t\tmode: 'live',\n\t\t\tchainId,\n\t\t\trpc: endpoints.rpcUrl,\n\t\t\t// `source: 'default'` when we pulled from LIVE_DEFAULTS;\n\t\t\t// `'config'` when the caller passed an override. The\n\t\t\t// distinction matters for the doctor's \"where did this\n\t\t\t// value come from\" surface.\n\t\t\tsource:\n\t\t\t\topts.rpcUrl === undefined && opts.faucetUrl === undefined && opts.graphqlUrl === undefined\n\t\t\t\t\t? 'default'\n\t\t\t\t\t: 'config',\n\t\t\t...(endpoints.faucetUrl !== undefined ? { faucet: endpoints.faucetUrl } : {}),\n\t\t\t...(endpoints.graphqlUrl !== undefined ? { graphql: endpoints.graphqlUrl } : {}),\n\t\t});\n\n\t\treturn { resolved, client };\n\t});\n"],"mappings":";;;;;;;AAsDA,MAAa,gCAAgC,SAAS,QAAQ,EAAE;;;AAIhE,MAAa,gBAAgB;CAC5B,SAAS;EACR,QAAQ;EACR,WAAW;EACX,YAAY;CACb;CACA,SAAS;EACR,QAAQ;EACR,WAAW,KAAA;EACX,YAAY;CACb;CACA,QAAQ;EACP,QAAQ;EACR,WAAW;EACX,YAAY,KAAA;CACb;AACD;;;;AAkBA,MAAM,oBACL,SAC0D;CAC1D,IAAI,KAAK,YAAY,UAAU;EAC9B,IAAI,KAAK,WAAW,KAAA,GACnB,OAAO,OAAO,KACb,eACC,kBACA,iLAED,CACD;EAED,OAAO,OAAO,QAAQ;GACrB,QAAQ,KAAK;GACb,WAAW,KAAK;GAChB,YAAY,KAAK;GAIjB,YAAY;EACb,CAAC;CACF;CACA,MAAM,WAAW,cAAc,KAAK;CACpC,OAAO,OAAO,QAAQ;EACrB,QAAQ,KAAK,UAAU,SAAS;EAChC,WAAW,KAAK,aAAa,SAAS;EACtC,YAAY,KAAK,cAAc,SAAS;EACxC,YAAY,KAAK;CAClB,CAAC;AACF;;AAGA,MAAa,gBACZ,SAEA,OAAO,IAAI,aAAa;CAEvB,MAAM,YAAY,OAAO,iBAAiB,IAAI;CAG9C,MAAM,YAAY,OAAO,OAAO,IAAI;EACnC,WACC,IAAI,cAAc;GACjB,SAAS,UAAU;GACnB,SAAS,UAAU;EACpB,CAAC;EACF,QAAQ,UACP,eACC,kBACA,+DAA+D,UAAU,OAAO,IAAI,mBAAmB,KAAK,KAC5G,KACD;CACF,CAAC;CAGD,MAAM,UACL,KAAK,YACJ,OAAO,aAAa,WAAW,EAC/B,SAAS,KAAK,gBAAgB,8BAC/B,CAAC;CAMF,MAAM,2BACL,UAAU,cAAc,KAAA,IACrB,OAAO,8BAA8B,UAAU,SAAS,IACxD;CAGJ,MAAM,EAAE,WAAW,OAAO,kBAAkB;EAC3C;EACA;EACA,QAAQ,UAAU;EAClB,GAAI,UAAU,cAAc,KAAA,IAAY,EAAE,WAAW,UAAU,UAAU,IAAI,CAAC;EAC9E,GAAI,UAAU,eAAe,KAAA,IAAY,EAAE,YAAY,UAAU,WAAW,IAAI,CAAC;EACjF;CACD,CAAC;CAiBD,OAAO;EAAE,UAhBQ,oBAAoB;GACpC,MAAM;GACN;GACA,KAAK,UAAU;GAKf,QACC,KAAK,WAAW,KAAA,KAAa,KAAK,cAAc,KAAA,KAAa,KAAK,eAAe,KAAA,IAC9E,YACA;GACJ,GAAI,UAAU,cAAc,KAAA,IAAY,EAAE,QAAQ,UAAU,UAAU,IAAI,CAAC;GAC3E,GAAI,UAAU,eAAe,KAAA,IAAY,EAAE,SAAS,UAAU,WAAW,IAAI,CAAC;EAC/E,CAEgB;EAAG;CAAO;AAC3B,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import { Duration, Effect, Scope } from "effect";
|
|
@@ -1,27 +1,39 @@
|
|
|
1
|
-
import { SpanAttr } from "../../../substrate/runtime/observability/spans.mjs";
|
|
2
1
|
import { setCurrentPluginPhase } from "../../../substrate/runtime/current-plugin.mjs";
|
|
3
|
-
import {
|
|
2
|
+
import { waitForProbe } from "../../../substrate/runtime/probes.mjs";
|
|
3
|
+
import { suiCliImageBuildContext } from "../move/index.mjs";
|
|
4
4
|
import { renderUrl, routedHostname } from "../../../substrate/runtime/routed-url.mjs";
|
|
5
5
|
import { waitForHttpEndpoint } from "../../../substrate/runtime/http-probe.mjs";
|
|
6
6
|
import { SUI_FAUCET_ENDPOINT_NAME, SUI_FAUCET_ENTRYPOINT_PORT, SUI_GRAPHQL_ENDPOINT_NAME, SUI_GRAPHQL_ENTRYPOINT_PORT, SUI_RPC_ENTRYPOINT_PORT } from "../routable.mjs";
|
|
7
7
|
import { ensureManagedContainer } from "../../../substrate/runtime/managed-container.mjs";
|
|
8
8
|
import { suiPluginError } from "../errors.mjs";
|
|
9
9
|
import { formatUnknownError } from "../../../substrate/runtime/format-unknown-error.mjs";
|
|
10
|
-
import {
|
|
10
|
+
import { SuiLogAttr } from "../log-attrs.mjs";
|
|
11
11
|
import { toDockerHostGatewayUrl } from "./shared.mjs";
|
|
12
12
|
import { assembleSuiClient, buildWaitForTransactionsReady, fetchChainId, makeResolvedNetwork } from "./shared-boot.mjs";
|
|
13
13
|
import { Duration, Effect } from "effect";
|
|
14
14
|
import { SuiGrpcClient } from "@mysten/sui/grpc";
|
|
15
15
|
//#region src/plugins/sui/mode/local.ts
|
|
16
|
-
/** Default ready-probe timeout for localnet.
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
24
|
-
|
|
16
|
+
/** Default ready-probe timeout for localnet.
|
|
17
|
+
*
|
|
18
|
+
* The pinned sui-tools image carries the embedded-fullnode resume fix
|
|
19
|
+
* (sui #26884), so BOTH the validator AND the embedded fullnode resume
|
|
20
|
+
* from their persisted dbs on every `sui start` — there is no per-boot
|
|
21
|
+
* genesis re-sync. (Pre-#26884, each `sui start` minted the fullnode a
|
|
22
|
+
* fresh key + empty db and it re-synced the whole chain from seq=0 at
|
|
23
|
+
* ~50x realtime; that band no longer exists.) So both bands satisfy the
|
|
24
|
+
* catch-up gate almost immediately:
|
|
25
|
+
*
|
|
26
|
+
* - cold boot — genesis + faucet bootstrap; empty store, live cadence
|
|
27
|
+
* from the first sample.
|
|
28
|
+
* - warm restart / snapshot restore — both nodes resume from disk;
|
|
29
|
+
* the head is already at the persisted tip, so it stabilizes at
|
|
30
|
+
* once.
|
|
31
|
+
*
|
|
32
|
+
* 180s is therefore generous headroom, not a re-sync budget: the gate
|
|
33
|
+
* satisfies in a couple of polls on a healthy boot, and the timeout only
|
|
34
|
+
* bounds a genuinely wedged boot (gRPC bound but head never stabilizing
|
|
35
|
+
* → typed `grpc-probe` error). */
|
|
36
|
+
const DEFAULT_LOCAL_READY_TIMEOUT = Duration.seconds(180);
|
|
25
37
|
const CONTAINER_RPC_PORT = SUI_RPC_ENTRYPOINT_PORT;
|
|
26
38
|
const CONTAINER_FAUCET_PORT = SUI_FAUCET_ENTRYPOINT_PORT;
|
|
27
39
|
const CONTAINER_GRAPHQL_PORT = SUI_GRAPHQL_ENTRYPOINT_PORT;
|
|
@@ -33,6 +45,10 @@ const DOCKER_PUBLISH_HOST = "0.0.0.0";
|
|
|
33
45
|
* hung fetch would block the outer ready deadline with no signal
|
|
34
46
|
* about which probe wedged. */
|
|
35
47
|
const PROBE_FETCH_TIMEOUT_MS = 3e3;
|
|
48
|
+
/** Role label for sui's owned GraphQL-indexer postgres sidecar. Shared
|
|
49
|
+
* const so the container label (in `bootPostgresSidecar`'s caller) and
|
|
50
|
+
* the snapshotable capture tuple agree exactly. */
|
|
51
|
+
const SUI_INDEXER_DB_ROLE = "indexer-db";
|
|
36
52
|
/**
|
|
37
53
|
* Build the local-mode boot Effect.
|
|
38
54
|
*
|
|
@@ -43,85 +59,89 @@ const PROBE_FETCH_TIMEOUT_MS = 3e3;
|
|
|
43
59
|
*
|
|
44
60
|
* `{pull}`, `{build}`, and vendored-build image branches are wired.
|
|
45
61
|
*/
|
|
46
|
-
const bootLocalMode = (runtime, identity, portBroker, opts) => Effect.gen(function* () {
|
|
62
|
+
const bootLocalMode = (runtime, identity, portBroker, opts, indexer, prebuiltImage) => Effect.gen(function* () {
|
|
47
63
|
yield* setCurrentPluginPhase("resolving Sui local image");
|
|
48
|
-
const image = yield* resolveImage(runtime, identity, opts);
|
|
64
|
+
const image = prebuiltImage ?? (yield* resolveImage(runtime, identity, opts));
|
|
49
65
|
yield* setCurrentPluginPhase("creating Sui validator container");
|
|
50
66
|
const { handle, ports } = yield* ensureLocalValidatorContainer(runtime, portBroker, image, {
|
|
51
67
|
app: identity.app,
|
|
52
68
|
stack: identity.stack,
|
|
53
69
|
plugin: "sui",
|
|
54
70
|
role: "validator"
|
|
55
|
-
}, `devstack-${identity.app}-${identity.stack}-sui-validator`, opts);
|
|
71
|
+
}, `devstack-${identity.app}-${identity.stack}-sui-validator`, opts, indexer);
|
|
72
|
+
const graphqlEnabled = indexer !== void 0;
|
|
56
73
|
const publishedPorts = resolvePublishedPortMapping(ports, handle.ports);
|
|
57
74
|
const directRpcUrl = `http://127.0.0.1:${publishedPorts[0].hostPort}`;
|
|
58
75
|
const directFaucetUrl = `http://127.0.0.1:${publishedPorts[1].hostPort}`;
|
|
59
76
|
const directGraphqlUrl = `http://127.0.0.1:${publishedPorts[2].hostPort}`;
|
|
60
77
|
const rpcUrl = yield* routedSuiUrl(identity, "rpc", SUI_RPC_ENTRYPOINT_PORT);
|
|
61
78
|
const faucetUrl = yield* routedSuiUrl(identity, SUI_FAUCET_ENDPOINT_NAME, SUI_FAUCET_ENTRYPOINT_PORT);
|
|
62
|
-
const graphqlUrl = yield* routedSuiUrl(identity, SUI_GRAPHQL_ENDPOINT_NAME, SUI_GRAPHQL_ENTRYPOINT_PORT);
|
|
79
|
+
const graphqlUrl = graphqlEnabled ? yield* routedSuiUrl(identity, SUI_GRAPHQL_ENDPOINT_NAME, SUI_GRAPHQL_ENTRYPOINT_PORT) : void 0;
|
|
63
80
|
const readyTimeout = opts.readyTimeout ?? DEFAULT_LOCAL_READY_TIMEOUT;
|
|
64
|
-
yield* setCurrentPluginPhase("waiting for Sui RPC, faucet, and GraphQL");
|
|
65
|
-
yield* waitForReady(directRpcUrl, directFaucetUrl, directGraphqlUrl, readyTimeout).pipe(Effect.annotateLogs({ [SuiSpans.container]: handle.name }));
|
|
66
81
|
const sdkClient = new SuiGrpcClient({
|
|
67
82
|
baseUrl: directRpcUrl,
|
|
68
83
|
network: "localnet"
|
|
69
84
|
});
|
|
85
|
+
yield* setCurrentPluginPhase(graphqlEnabled ? "waiting for Sui gRPC, faucet, and GraphQL" : "waiting for Sui gRPC and faucet");
|
|
86
|
+
yield* waitForReady(sdkClient, directRpcUrl, directFaucetUrl, graphqlEnabled ? directGraphqlUrl : void 0, readyTimeout).pipe(Effect.annotateLogs({ [SuiLogAttr.container]: handle.name }));
|
|
87
|
+
yield* setCurrentPluginPhase("waiting for Sui checkpoint head to stabilize");
|
|
88
|
+
yield* waitForCheckpointCatchUp(sdkClient, directRpcUrl, readyTimeout).pipe(Effect.annotateLogs({ [SuiLogAttr.container]: handle.name }));
|
|
70
89
|
yield* setCurrentPluginPhase("fetching Sui chain id");
|
|
71
|
-
const
|
|
90
|
+
const chainId = yield* fetchChainId(sdkClient);
|
|
72
91
|
yield* setCurrentPluginPhase("preparing Sui funds-ready gate");
|
|
92
|
+
const waitForTransactionsReady = yield* buildWaitForTransactionsReady(directFaucetUrl);
|
|
73
93
|
const { client } = yield* assembleSuiClient({
|
|
74
94
|
sdkClient,
|
|
75
|
-
|
|
95
|
+
chainId,
|
|
76
96
|
rpcUrl,
|
|
77
97
|
faucetUrl,
|
|
78
98
|
fundingFaucetUrl: directFaucetUrl,
|
|
79
|
-
graphqlUrl,
|
|
80
|
-
waitForTransactionsReady
|
|
99
|
+
...graphqlUrl !== void 0 ? { graphqlUrl } : {},
|
|
100
|
+
waitForTransactionsReady,
|
|
81
101
|
buildImage: image,
|
|
82
102
|
hostGateway: {
|
|
83
103
|
rpcUrl: toDockerHostGatewayUrl(directRpcUrl),
|
|
84
104
|
faucetUrl: toDockerHostGatewayUrl(directFaucetUrl),
|
|
85
|
-
graphqlUrl: toDockerHostGatewayUrl(directGraphqlUrl)
|
|
105
|
+
graphqlUrl: graphqlEnabled ? toDockerHostGatewayUrl(directGraphqlUrl) : null
|
|
86
106
|
}
|
|
87
107
|
});
|
|
88
108
|
return {
|
|
89
109
|
resolved: makeResolvedNetwork({
|
|
90
110
|
mode: "local",
|
|
91
|
-
|
|
111
|
+
chainId,
|
|
92
112
|
rpc: rpcUrl,
|
|
93
113
|
faucet: faucetUrl,
|
|
94
|
-
graphql: graphqlUrl,
|
|
114
|
+
...graphqlUrl !== void 0 ? { graphql: graphqlUrl } : {},
|
|
95
115
|
source: "default"
|
|
96
116
|
}),
|
|
97
117
|
client
|
|
98
118
|
};
|
|
99
|
-
})
|
|
119
|
+
});
|
|
100
120
|
const resolveImage = (runtime, identity, opts) => Effect.gen(function* () {
|
|
101
121
|
if (opts.image && "pull" in opts.image) {
|
|
102
122
|
const pullRef = opts.image.pull;
|
|
103
123
|
if (runtime.pullImage === void 0) return yield* Effect.fail(suiPluginError("image-build", `sui local mode cannot pull image '${pullRef}' because the configured container runtime does not expose image pulls.`));
|
|
104
124
|
return yield* runtime.pullImage(pullRef).pipe(Effect.mapError((cause) => suiPluginError("image-build", `sui local mode failed to pull image '${pullRef}': ${cause.reason}: ${cause.detail}`, cause)));
|
|
105
125
|
}
|
|
106
|
-
const version = opts.version ?? DEFAULT_SUI_VERSION;
|
|
107
126
|
const owner = {
|
|
108
127
|
app: identity.app,
|
|
109
128
|
stack: identity.stack,
|
|
110
129
|
plugin: "sui",
|
|
111
130
|
role: "validator"
|
|
112
131
|
};
|
|
132
|
+
const vendored = suiCliImageBuildContext();
|
|
113
133
|
const buildCtx = opts.image && "build" in opts.image ? {
|
|
114
134
|
contextPath: opts.image.build.context,
|
|
115
135
|
dockerfile: opts.image.build.dockerfile ?? "Dockerfile",
|
|
116
|
-
buildArgs:
|
|
136
|
+
buildArgs: vendored.buildArgs,
|
|
117
137
|
owner
|
|
118
138
|
} : {
|
|
119
|
-
...
|
|
139
|
+
...vendored,
|
|
120
140
|
owner
|
|
121
141
|
};
|
|
122
142
|
return yield* runtime.ensureImage(buildCtx).pipe(Effect.mapError((cause) => suiPluginError("image-build", `sui image build failed: ${cause.reason}: ${cause.detail}`, cause)));
|
|
123
|
-
})
|
|
124
|
-
const ensureLocalValidatorContainer = (runtime, portBroker, image, labels, containerName, opts) => Effect.gen(function* () {
|
|
143
|
+
});
|
|
144
|
+
const ensureLocalValidatorContainer = (runtime, portBroker, image, labels, containerName, opts, indexer) => Effect.gen(function* () {
|
|
125
145
|
const reusablePorts = opts.ports === void 0 ? yield* findReusablePortMapping(runtime, labels, containerName) : void 0;
|
|
126
146
|
if (reusablePorts !== void 0) return yield* ensureLocalValidatorContainerAttempt({
|
|
127
147
|
runtime,
|
|
@@ -130,6 +150,7 @@ const ensureLocalValidatorContainer = (runtime, portBroker, image, labels, conta
|
|
|
130
150
|
labels,
|
|
131
151
|
containerName,
|
|
132
152
|
opts,
|
|
153
|
+
indexer,
|
|
133
154
|
ports: reusablePorts,
|
|
134
155
|
attempt: 0,
|
|
135
156
|
reconciliation: "adopt-existing"
|
|
@@ -141,6 +162,7 @@ const ensureLocalValidatorContainer = (runtime, portBroker, image, labels, conta
|
|
|
141
162
|
labels,
|
|
142
163
|
containerName,
|
|
143
164
|
opts,
|
|
165
|
+
indexer,
|
|
144
166
|
attempt: 0,
|
|
145
167
|
reconciliation: opts.ports ? "exact" : "adopt-existing"
|
|
146
168
|
});
|
|
@@ -161,8 +183,13 @@ const ensureLocalValidatorContainerAttempt = (params) => ensureManagedContainer(
|
|
|
161
183
|
image: params.image,
|
|
162
184
|
recreate: "on-failure",
|
|
163
185
|
stopGraceSeconds: 30,
|
|
186
|
+
stopSignal: "SIGINT",
|
|
164
187
|
ports: params.ports,
|
|
165
|
-
portBindingReconciliation: params.reconciliation
|
|
188
|
+
portBindingReconciliation: params.reconciliation,
|
|
189
|
+
...params.indexer !== void 0 ? {
|
|
190
|
+
networkAttach: [params.indexer.network],
|
|
191
|
+
env: { DEVSTACK_SUI_INDEXER_URL: params.indexer.url }
|
|
192
|
+
} : {}
|
|
166
193
|
},
|
|
167
194
|
mapError: (cause) => cause
|
|
168
195
|
}).pipe(Effect.map((handle) => ({
|
|
@@ -237,58 +264,173 @@ const allocatePort = (portBroker, owner, preferredPort, label) => {
|
|
|
237
264
|
}) : Effect.fail(cause)), Effect.mapError((cause) => suiPluginError("port-allocate", `sui local mode: failed to allocate ${label} host port (preferred ${hint ?? "auto"}): ${cause.detail}`, cause)));
|
|
238
265
|
return allocate(preferredPort);
|
|
239
266
|
};
|
|
240
|
-
/** Coordinated readiness gate.
|
|
241
|
-
*
|
|
267
|
+
/** Coordinated readiness gate. RPC + faucet must respond within the
|
|
268
|
+
* outer deadline; GraphQL is probed only when enabled (gated on the
|
|
269
|
+
* external indexer). Each probe has its own per-fetch deadline so a
|
|
242
270
|
* wedged endpoint surfaces by name. */
|
|
243
|
-
const waitForReady = (rpcUrl, faucetUrl, graphqlUrl, readyTimeout) => Effect.gen(function* () {
|
|
271
|
+
const waitForReady = (sdkClient, rpcUrl, faucetUrl, graphqlUrl, readyTimeout) => Effect.gen(function* () {
|
|
244
272
|
const readyTimeoutMs = Duration.toMillis(readyTimeout);
|
|
245
|
-
const
|
|
246
|
-
|
|
273
|
+
const grpcProbe = waitForProbe({
|
|
274
|
+
label: `${rpcUrl} (gRPC service info)`,
|
|
247
275
|
timeoutMs: readyTimeoutMs,
|
|
248
276
|
intervalMs: 1e3,
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
id: 1,
|
|
256
|
-
method: "sui_getLatestCheckpointSequenceNumber",
|
|
257
|
-
params: []
|
|
258
|
-
})
|
|
259
|
-
},
|
|
260
|
-
validate: async (response) => {
|
|
261
|
-
if (!response.ok) return false;
|
|
262
|
-
const body = await response.json();
|
|
263
|
-
return typeof body.result === "string" || typeof body.result === "number";
|
|
264
|
-
}
|
|
265
|
-
}).pipe(Effect.mapError((cause) => suiPluginError("rpc-probe", `sui local mode: RPC endpoint ${rpcUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause)), Effect.withSpan("devstack.plugin.sui.local.probe.rpc"));
|
|
277
|
+
attemptTimeoutMs: PROBE_FETCH_TIMEOUT_MS,
|
|
278
|
+
probe: () => fetchServiceInfo(sdkClient, PROBE_FETCH_TIMEOUT_MS).pipe(Effect.map((info) => info.chainId !== void 0 || info.checkpointHeight !== void 0 ? true : {
|
|
279
|
+
ready: false,
|
|
280
|
+
detail: { reason: "missing-service-info" }
|
|
281
|
+
}))
|
|
282
|
+
}).pipe(Effect.mapError((cause) => suiPluginError("grpc-probe", `sui local mode: gRPC endpoint ${rpcUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause)));
|
|
266
283
|
const faucetProbe = waitForHttpEndpoint({
|
|
267
284
|
endpoint: faucetUrl,
|
|
268
285
|
timeoutMs: readyTimeoutMs,
|
|
269
286
|
intervalMs: 1e3,
|
|
270
287
|
requestTimeoutMs: PROBE_FETCH_TIMEOUT_MS,
|
|
271
288
|
validate: (response) => response.status < 500
|
|
272
|
-
}).pipe(Effect.mapError((cause) => suiPluginError("faucet-probe", `sui local mode: faucet endpoint ${faucetUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause))
|
|
273
|
-
const graphqlProbe = waitForHttpEndpoint({
|
|
289
|
+
}).pipe(Effect.mapError((cause) => suiPluginError("faucet-probe", `sui local mode: faucet endpoint ${faucetUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause)));
|
|
290
|
+
const graphqlProbe = graphqlUrl === void 0 ? [] : [waitForHttpEndpoint({
|
|
274
291
|
endpoint: graphqlUrl,
|
|
275
292
|
timeoutMs: readyTimeoutMs,
|
|
276
293
|
intervalMs: 1e3,
|
|
277
294
|
requestTimeoutMs: PROBE_FETCH_TIMEOUT_MS,
|
|
278
295
|
validate: (response) => response.status < 500
|
|
279
|
-
}).pipe(Effect.mapError((cause) => suiPluginError("graphql-probe", `sui local mode: GraphQL endpoint ${graphqlUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause))
|
|
296
|
+
}).pipe(Effect.mapError((cause) => suiPluginError("graphql-probe", `sui local mode: GraphQL endpoint ${graphqlUrl} did not become ready within ${readyTimeoutMs}ms: ${formatUnknownError(cause)}`, cause)))];
|
|
280
297
|
yield* Effect.all([
|
|
281
|
-
|
|
298
|
+
grpcProbe,
|
|
282
299
|
faucetProbe,
|
|
283
|
-
graphqlProbe
|
|
300
|
+
...graphqlProbe
|
|
284
301
|
], { concurrency: "unbounded" }).pipe(Effect.asVoid);
|
|
285
|
-
})
|
|
302
|
+
});
|
|
303
|
+
/** Poll interval for the head-stabilization gate. With the #26884 resume
|
|
304
|
+
* fix there is no routine re-sync, but a 1s interval still samples a wide
|
|
305
|
+
* enough window to tell any transient fast burst (hundreds/poll) apart
|
|
306
|
+
* from live cadence (a handful/poll) before declaring the head stable. */
|
|
307
|
+
const CATCH_UP_POLL_INTERVAL_MS = 1e3;
|
|
308
|
+
/** Per-poll delta at or below which the head is considered to be moving
|
|
309
|
+
* at LIVE cadence rather than fast-replay cadence. Localnet's narwhal/
|
|
310
|
+
* bullshark consensus produces only a few checkpoints per second when
|
|
311
|
+
* idle; replay produces hundreds per `CATCH_UP_POLL_INTERVAL_MS`. A
|
|
312
|
+
* threshold of 25 sits well above live idle cadence and far below the
|
|
313
|
+
* replay rate, so it cannot mistake live ticking for replay. */
|
|
314
|
+
const CATCH_UP_LIVE_CADENCE_DELTA = 25;
|
|
315
|
+
/** Number of CONSECUTIVE live-cadence polls required before declaring
|
|
316
|
+
* caught-up. Two consecutive small deltas rules out the moment replay
|
|
317
|
+
* briefly stalls (e.g. a GC pause) from being read as caught-up: a
|
|
318
|
+
* paused replay shows one small delta then resumes with a large one,
|
|
319
|
+
* so it never strings two together. A genuinely caught-up validator
|
|
320
|
+
* holds small deltas indefinitely. */
|
|
321
|
+
const CATCH_UP_STABLE_POLLS_REQUIRED = 2;
|
|
322
|
+
const fetchServiceInfo = (sdkClient, timeoutMs) => Effect.tryPromise({
|
|
323
|
+
try: (signal) => sdkClient.ledgerService.getServiceInfo({}, {
|
|
324
|
+
abort: signal,
|
|
325
|
+
timeout: timeoutMs
|
|
326
|
+
}).response,
|
|
327
|
+
catch: (cause) => cause
|
|
328
|
+
});
|
|
329
|
+
/** Fetch the latest checkpoint height via the gRPC service-info surface.
|
|
330
|
+
* Returns the number, or `undefined` when the listener answered but did
|
|
331
|
+
* not include a safely numeric checkpoint height. */
|
|
332
|
+
const fetchLatestCheckpoint = (sdkClient) => fetchServiceInfo(sdkClient, PROBE_FETCH_TIMEOUT_MS).pipe(Effect.map((body) => {
|
|
333
|
+
if (body.checkpointHeight === void 0) return void 0;
|
|
334
|
+
const checkpoint = Number(body.checkpointHeight);
|
|
335
|
+
return Number.isSafeInteger(checkpoint) ? checkpoint : void 0;
|
|
336
|
+
}));
|
|
337
|
+
/** Build the stateful cadence evaluator the catch-up gate feeds samples
|
|
338
|
+
* into. Pure + injectable so the cadence logic is unit-testable without
|
|
339
|
+
* a live validator. Each `step(sample)` consumes one
|
|
340
|
+
* gRPC service-info checkpoint-height reading:
|
|
341
|
+
*
|
|
342
|
+
* - `undefined` (listener answered, result unparseable) resets the
|
|
343
|
+
* stability streak.
|
|
344
|
+
* - the FIRST numeric sample only establishes a baseline (its delta is
|
|
345
|
+
* `+Infinity`), so the gate always takes at least two samples before
|
|
346
|
+
* it can declare caught-up — cheap on cold boot, correct on restore.
|
|
347
|
+
* - a NEGATIVE delta (the head regressed — mid-re-sync / reset) resets
|
|
348
|
+
* the streak; it is NOT counted as live cadence even though it is
|
|
349
|
+
* `<= CATCH_UP_LIVE_CADENCE_DELTA`.
|
|
350
|
+
* - a delta in `[0, CATCH_UP_LIVE_CADENCE_DELTA]` counts toward the
|
|
351
|
+
* live-cadence streak; a larger delta (fast replay) resets it.
|
|
352
|
+
* - `CATCH_UP_STABLE_POLLS_REQUIRED` consecutive live-cadence deltas →
|
|
353
|
+
* caught-up. */
|
|
354
|
+
const makeCatchUpEvaluator = (opts) => {
|
|
355
|
+
const liveCadenceDelta = opts?.liveCadenceDelta ?? CATCH_UP_LIVE_CADENCE_DELTA;
|
|
356
|
+
const stablePollsRequired = opts?.stablePollsRequired ?? CATCH_UP_STABLE_POLLS_REQUIRED;
|
|
357
|
+
let previous;
|
|
358
|
+
let stablePolls = 0;
|
|
359
|
+
return {
|
|
360
|
+
step: (sample) => {
|
|
361
|
+
if (sample === void 0) {
|
|
362
|
+
stablePolls = 0;
|
|
363
|
+
return {
|
|
364
|
+
caughtUp: false,
|
|
365
|
+
detail: { reason: "unparseable-checkpoint" }
|
|
366
|
+
};
|
|
367
|
+
}
|
|
368
|
+
const delta = previous === void 0 ? Number.POSITIVE_INFINITY : sample - previous;
|
|
369
|
+
previous = sample;
|
|
370
|
+
if (delta < 0) {
|
|
371
|
+
stablePolls = 0;
|
|
372
|
+
return {
|
|
373
|
+
caughtUp: false,
|
|
374
|
+
detail: {
|
|
375
|
+
current: sample,
|
|
376
|
+
delta,
|
|
377
|
+
stablePolls,
|
|
378
|
+
regressed: true
|
|
379
|
+
}
|
|
380
|
+
};
|
|
381
|
+
}
|
|
382
|
+
if (delta <= liveCadenceDelta) stablePolls += 1;
|
|
383
|
+
else stablePolls = 0;
|
|
384
|
+
if (stablePolls >= stablePollsRequired) return { caughtUp: true };
|
|
385
|
+
return {
|
|
386
|
+
caughtUp: false,
|
|
387
|
+
detail: {
|
|
388
|
+
current: sample,
|
|
389
|
+
delta,
|
|
390
|
+
stablePolls
|
|
391
|
+
}
|
|
392
|
+
};
|
|
393
|
+
},
|
|
394
|
+
last: () => previous
|
|
395
|
+
};
|
|
396
|
+
};
|
|
397
|
+
/** Head-stabilization gate.
|
|
398
|
+
*
|
|
399
|
+
* Polls the gRPC service-info checkpoint height and treats the head as
|
|
400
|
+
* stable once the per-poll delta is at live cadence (`<= CATCH_UP_LIVE_
|
|
401
|
+
* CADENCE_DELTA`/poll) and HOLDS there for `CATCH_UP_STABLE_POLLS_
|
|
402
|
+
* REQUIRED` consecutive polls. With the #26884 resume fix both nodes
|
|
403
|
+
* resume from disk, so there is no genesis re-sync to wait out: cold and
|
|
404
|
+
* warm/restore boots alike are at live cadence from the first samples
|
|
405
|
+
* and satisfy in a couple of polls. The fast-replay reset branch in the
|
|
406
|
+
* evaluator is retained as a cheap guard for any transient burst rather
|
|
407
|
+
* than a routine restart band.
|
|
408
|
+
*
|
|
409
|
+
* A wedged boot (gRPC bound but head never stabilizing) lapses the outer
|
|
410
|
+
* deadline → typed `grpc-probe` error rather than hanging forever. */
|
|
411
|
+
const waitForCheckpointCatchUp = (sdkClient, rpcUrl, readyTimeout) => Effect.gen(function* () {
|
|
412
|
+
const readyTimeoutMs = Duration.toMillis(readyTimeout);
|
|
413
|
+
const evaluator = makeCatchUpEvaluator();
|
|
414
|
+
return yield* waitForProbe({
|
|
415
|
+
label: `${rpcUrl} (checkpoint catch-up)`,
|
|
416
|
+
timeoutMs: readyTimeoutMs,
|
|
417
|
+
intervalMs: CATCH_UP_POLL_INTERVAL_MS,
|
|
418
|
+
attemptTimeoutMs: PROBE_FETCH_TIMEOUT_MS,
|
|
419
|
+
probe: () => fetchLatestCheckpoint(sdkClient).pipe(Effect.map((current) => {
|
|
420
|
+
const verdict = evaluator.step(current);
|
|
421
|
+
return verdict.caughtUp ? true : {
|
|
422
|
+
ready: false,
|
|
423
|
+
detail: verdict.detail
|
|
424
|
+
};
|
|
425
|
+
}))
|
|
426
|
+
}).pipe(Effect.mapError((cause) => suiPluginError("grpc-probe", `sui local mode: checkpoint head did not stabilize within ${readyTimeoutMs}ms (last seq=${evaluator.last() ?? "n/a"}). With the #26884 resume fix both nodes resume from disk, so the head should reach live cadence almost immediately; a stall here points to a wedged boot, not a re-sync: ${formatUnknownError(cause)}`, cause)));
|
|
427
|
+
});
|
|
286
428
|
const routedSuiUrl = (identity, endpointName, port) => routedHostname(identity, endpointName).pipe(Effect.map((hostname) => renderUrl({
|
|
287
429
|
protocol: "http",
|
|
288
430
|
hostname,
|
|
289
431
|
port
|
|
290
432
|
})), Effect.mapError((cause) => suiPluginError("container-start", `sui local mode: failed to construct router URL for ${endpointName}: ${cause.detail}`, cause)));
|
|
291
433
|
//#endregion
|
|
292
|
-
export { bootLocalMode };
|
|
434
|
+
export { SUI_INDEXER_DB_ROLE, bootLocalMode, resolveImage };
|
|
293
435
|
|
|
294
436
|
//# sourceMappingURL=local.mjs.map
|