@mysten-incubation/devstack 0.0.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/LICENSE +189 -0
- package/README.md +94 -0
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/api/define-capabilities.d.mts +25 -0
- package/dist/api/define-capabilities.mjs +19 -0
- package/dist/api/define-capabilities.mjs.map +1 -0
- package/dist/api/define-devstack-with.d.mts +41 -0
- package/dist/api/define-devstack-with.mjs +24 -0
- package/dist/api/define-devstack-with.mjs.map +1 -0
- package/dist/api/define-devstack.d.mts +62 -0
- package/dist/api/define-devstack.mjs +108 -0
- package/dist/api/define-devstack.mjs.map +1 -0
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/inference-network.mjs +122 -0
- package/dist/api/inference-network.mjs.map +1 -0
- package/dist/api/mode-narrowed-factory.d.mts +26 -0
- package/dist/api/mode-narrowed-factory.mjs +8 -0
- package/dist/api/mode-narrowed-factory.mjs.map +1 -0
- package/dist/api/plugin-errors.mjs +10 -0
- package/dist/api/plugin-errors.mjs.map +1 -0
- package/dist/api/run-stack.d.mts +82 -0
- package/dist/api/run-stack.mjs +127 -0
- package/dist/api/run-stack.mjs.map +1 -0
- package/dist/build-integrations/playwright/config.d.mts +92 -0
- package/dist/build-integrations/playwright/config.mjs +71 -0
- package/dist/build-integrations/playwright/config.mjs.map +1 -0
- package/dist/build-integrations/playwright/errors.d.mts +82 -0
- package/dist/build-integrations/playwright/errors.mjs +43 -0
- package/dist/build-integrations/playwright/errors.mjs.map +1 -0
- package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
- package/dist/build-integrations/playwright/global-setup.mjs +44 -0
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
- package/dist/build-integrations/playwright/index.d.mts +6 -0
- package/dist/build-integrations/playwright/index.mjs +6 -0
- package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
- package/dist/build-integrations/playwright/stack-context.mjs +277 -0
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
- package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
- package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +78 -0
- package/dist/build-integrations/runtime/discover.mjs +124 -0
- package/dist/build-integrations/runtime/discover.mjs.map +1 -0
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
- package/dist/build-integrations/runtime/errors.d.mts +64 -0
- package/dist/build-integrations/runtime/errors.mjs +51 -0
- package/dist/build-integrations/runtime/errors.mjs.map +1 -0
- package/dist/build-integrations/runtime/index.d.mts +7 -0
- package/dist/build-integrations/runtime/index.mjs +6 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
- package/dist/build-integrations/vitest/config.d.mts +62 -0
- package/dist/build-integrations/vitest/config.mjs +80 -0
- package/dist/build-integrations/vitest/config.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +48 -0
- package/dist/build-integrations/vitest/env.mjs +50 -0
- package/dist/build-integrations/vitest/env.mjs.map +1 -0
- package/dist/build-integrations/vitest/errors.d.mts +44 -0
- package/dist/build-integrations/vitest/errors.mjs +18 -0
- package/dist/build-integrations/vitest/errors.mjs.map +1 -0
- package/dist/build-integrations/vitest/index.d.mts +6 -0
- package/dist/build-integrations/vitest/index.mjs +6 -0
- package/dist/build-integrations/vitest/setup.d.mts +53 -0
- package/dist/build-integrations/vitest/setup.mjs +56 -0
- package/dist/build-integrations/vitest/setup.mjs.map +1 -0
- package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
- package/dist/build-integrations/vitest/stack-context.mjs +67 -0
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
- package/dist/cli/main.d.mts +5 -0
- package/dist/cli/main.mjs +586 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/prune-direct.mjs +216 -0
- package/dist/cli/prune-direct.mjs.map +1 -0
- package/dist/cli/snapshot-reader.mjs +73 -0
- package/dist/cli/snapshot-reader.mjs.map +1 -0
- package/dist/cli/up-lifecycle.mjs +28 -0
- package/dist/cli/up-lifecycle.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +42 -0
- package/dist/contracts/chain-probe.d.mts +26 -0
- package/dist/contracts/chain-probe.mjs +8 -0
- package/dist/contracts/chain-probe.mjs.map +1 -0
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +245 -0
- package/dist/contracts/liveness-classifier.d.mts +19 -0
- package/dist/contracts/network-resolver.d.mts +15 -0
- package/dist/contracts/network-resolver.mjs +7 -0
- package/dist/contracts/network-resolver.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +15 -0
- package/dist/contracts/routable.d.mts +53 -0
- package/dist/contracts/snapshotable.d.mts +39 -0
- package/dist/contracts/strategy-contributor.d.mts +26 -0
- package/dist/index.d.mts +89 -0
- package/dist/index.mjs +37 -0
- package/dist/orchestrators/codegen/bindings.d.mts +2 -0
- package/dist/orchestrators/codegen/bindings.mjs +340 -0
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
- package/dist/orchestrators/codegen/emit.mjs +56 -0
- package/dist/orchestrators/codegen/emit.mjs.map +1 -0
- package/dist/orchestrators/codegen/errors.d.mts +1 -0
- package/dist/orchestrators/codegen/errors.mjs +66 -0
- package/dist/orchestrators/codegen/errors.mjs.map +1 -0
- package/dist/orchestrators/codegen/extras.mjs +16 -0
- package/dist/orchestrators/codegen/extras.mjs.map +1 -0
- package/dist/orchestrators/codegen/format.mjs +109 -0
- package/dist/orchestrators/codegen/format.mjs.map +1 -0
- package/dist/orchestrators/codegen/gitignore.mjs +67 -0
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -0
- package/dist/orchestrators/codegen/paths.mjs +33 -0
- package/dist/orchestrators/codegen/paths.mjs.map +1 -0
- package/dist/orchestrators/codegen/permissions.mjs +6 -0
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
- package/dist/orchestrators/codegen/service.d.mts +1 -0
- package/dist/orchestrators/codegen/service.mjs +276 -0
- package/dist/orchestrators/codegen/service.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +58 -0
- package/dist/orchestrators/router/cleanup.mjs.map +1 -0
- package/dist/orchestrators/router/cors.mjs +31 -0
- package/dist/orchestrators/router/cors.mjs.map +1 -0
- package/dist/orchestrators/router/entrypoints.d.mts +1 -0
- package/dist/orchestrators/router/entrypoints.mjs +80 -0
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
- package/dist/orchestrators/router/errors.d.mts +1 -0
- package/dist/orchestrators/router/errors.mjs +103 -0
- package/dist/orchestrators/router/errors.mjs.map +1 -0
- package/dist/orchestrators/router/file-provider.d.mts +1 -0
- package/dist/orchestrators/router/file-provider.mjs +320 -0
- package/dist/orchestrators/router/file-provider.mjs.map +1 -0
- package/dist/orchestrators/router/hostname.d.mts +1 -0
- package/dist/orchestrators/router/hostname.mjs +107 -0
- package/dist/orchestrators/router/hostname.mjs.map +1 -0
- package/dist/orchestrators/router/index.d.mts +1 -0
- package/dist/orchestrators/router/profile.d.mts +1 -0
- package/dist/orchestrators/router/profile.mjs +109 -0
- package/dist/orchestrators/router/profile.mjs.map +1 -0
- package/dist/orchestrators/router/service.d.mts +3 -0
- package/dist/orchestrators/router/service.mjs +421 -0
- package/dist/orchestrators/router/service.mjs.map +1 -0
- package/dist/orchestrators/router/traefik-container.d.mts +1 -0
- package/dist/orchestrators/router/traefik-container.mjs +229 -0
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +10 -0
- package/dist/orchestrators/runtime-composition.mjs +168 -0
- package/dist/orchestrators/runtime-composition.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +350 -0
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
- package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
- package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
- package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
- package/dist/orchestrators/snapshot/index.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.mjs +74 -0
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.d.mts +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +110 -0
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.d.mts +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +404 -0
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
- package/dist/orchestrators/snapshot/service.d.mts +1 -0
- package/dist/orchestrators/snapshot/service.mjs +296 -0
- package/dist/orchestrators/snapshot/service.mjs.map +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +18 -0
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
- package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
- package/dist/orchestrators/snapshot/wipe.mjs +59 -0
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
- package/dist/plugins/account/codegen.d.mts +12 -0
- package/dist/plugins/account/codegen.mjs +22 -0
- package/dist/plugins/account/codegen.mjs.map +1 -0
- package/dist/plugins/account/errors.d.mts +44 -0
- package/dist/plugins/account/errors.mjs +16 -0
- package/dist/plugins/account/errors.mjs.map +1 -0
- package/dist/plugins/account/funding.d.mts +94 -0
- package/dist/plugins/account/funding.mjs +199 -0
- package/dist/plugins/account/funding.mjs.map +1 -0
- package/dist/plugins/account/index.d.mts +54 -0
- package/dist/plugins/account/index.mjs +151 -0
- package/dist/plugins/account/index.mjs.map +1 -0
- package/dist/plugins/account/keypair.d.mts +32 -0
- package/dist/plugins/account/keypair.mjs +99 -0
- package/dist/plugins/account/keypair.mjs.map +1 -0
- package/dist/plugins/account/lease.mjs +21 -0
- package/dist/plugins/account/lease.mjs.map +1 -0
- package/dist/plugins/account/registry.d.mts +33 -0
- package/dist/plugins/account/registry.mjs +36 -0
- package/dist/plugins/account/registry.mjs.map +1 -0
- package/dist/plugins/account/service.d.mts +104 -0
- package/dist/plugins/account/service.mjs +405 -0
- package/dist/plugins/account/service.mjs.map +1 -0
- package/dist/plugins/account/snapshot.mjs +33 -0
- package/dist/plugins/account/snapshot.mjs.map +1 -0
- package/dist/plugins/account/variants/env.mjs +24 -0
- package/dist/plugins/account/variants/env.mjs.map +1 -0
- package/dist/plugins/account/variants/ephemeral.mjs +72 -0
- package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
- package/dist/plugins/account/variants/impersonate.d.mts +16 -0
- package/dist/plugins/account/variants/impersonate.mjs +48 -0
- package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
- package/dist/plugins/account/variants/inline.mjs +13 -0
- package/dist/plugins/account/variants/inline.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +93 -0
- package/dist/plugins/account/variants/keystore.mjs.map +1 -0
- package/dist/plugins/account/variants/signer.mjs +31 -0
- package/dist/plugins/account/variants/signer.mjs.map +1 -0
- package/dist/plugins/action/build-context.d.mts +41 -0
- package/dist/plugins/action/discriminator.d.mts +20 -0
- package/dist/plugins/action/discriminator.mjs +13 -0
- package/dist/plugins/action/discriminator.mjs.map +1 -0
- package/dist/plugins/action/errors.d.mts +31 -0
- package/dist/plugins/action/errors.mjs +13 -0
- package/dist/plugins/action/errors.mjs.map +1 -0
- package/dist/plugins/action/execute.d.mts +2 -0
- package/dist/plugins/action/execute.mjs +145 -0
- package/dist/plugins/action/execute.mjs.map +1 -0
- package/dist/plugins/action/index.d.mts +56 -0
- package/dist/plugins/action/index.mjs +82 -0
- package/dist/plugins/action/index.mjs.map +1 -0
- package/dist/plugins/action/service.d.mts +26 -0
- package/dist/plugins/action/service.mjs +84 -0
- package/dist/plugins/action/service.mjs.map +1 -0
- package/dist/plugins/coin/address-resolution.d.mts +34 -0
- package/dist/plugins/coin/address-resolution.mjs +80 -0
- package/dist/plugins/coin/address-resolution.mjs.map +1 -0
- package/dist/plugins/coin/codegen.d.mts +16 -0
- package/dist/plugins/coin/codegen.mjs +21 -0
- package/dist/plugins/coin/codegen.mjs.map +1 -0
- package/dist/plugins/coin/discovery.d.mts +26 -0
- package/dist/plugins/coin/discovery.mjs +112 -0
- package/dist/plugins/coin/discovery.mjs.map +1 -0
- package/dist/plugins/coin/errors.d.mts +48 -0
- package/dist/plugins/coin/errors.mjs +13 -0
- package/dist/plugins/coin/errors.mjs.map +1 -0
- package/dist/plugins/coin/index.d.mts +95 -0
- package/dist/plugins/coin/index.mjs +172 -0
- package/dist/plugins/coin/index.mjs.map +1 -0
- package/dist/plugins/coin/metadata.d.mts +15 -0
- package/dist/plugins/coin/metadata.mjs +99 -0
- package/dist/plugins/coin/metadata.mjs.map +1 -0
- package/dist/plugins/coin/mint.d.mts +34 -0
- package/dist/plugins/coin/mint.mjs +164 -0
- package/dist/plugins/coin/mint.mjs.map +1 -0
- package/dist/plugins/coin/registry.d.mts +1 -0
- package/dist/plugins/coin/registry.mjs +37 -0
- package/dist/plugins/coin/registry.mjs.map +1 -0
- package/dist/plugins/coin/service.d.mts +47 -0
- package/dist/plugins/coin/service.mjs +51 -0
- package/dist/plugins/coin/service.mjs.map +1 -0
- package/dist/plugins/coin/snapshot.mjs +19 -0
- package/dist/plugins/coin/snapshot.mjs.map +1 -0
- package/dist/plugins/coin/type-strings.mjs +49 -0
- package/dist/plugins/coin/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/codegen.d.mts +39 -0
- package/dist/plugins/deepbook/codegen.mjs +15 -0
- package/dist/plugins/deepbook/codegen.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +437 -0
- package/dist/plugins/deepbook/deploy.mjs.map +1 -0
- package/dist/plugins/deepbook/errors.d.mts +29 -0
- package/dist/plugins/deepbook/errors.mjs +26 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -0
- package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +171 -0
- package/dist/plugins/deepbook/index.mjs +359 -0
- package/dist/plugins/deepbook/index.mjs.map +1 -0
- package/dist/plugins/deepbook/plugin-key.mjs +7 -0
- package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
- package/dist/plugins/deepbook/pyth/index.mjs +226 -0
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
- package/dist/plugins/deepbook/routable.mjs +21 -0
- package/dist/plugins/deepbook/routable.mjs.map +1 -0
- package/dist/plugins/deepbook/snapshot.mjs +49 -0
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +125 -0
- package/dist/plugins/deepbook/types.mjs +12 -0
- package/dist/plugins/deepbook/types.mjs.map +1 -0
- package/dist/plugins/faucet/dispatcher.d.mts +9 -0
- package/dist/plugins/faucet/dispatcher.mjs +13 -0
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
- package/dist/plugins/faucet/errors.d.mts +86 -0
- package/dist/plugins/faucet/errors.mjs +19 -0
- package/dist/plugins/faucet/errors.mjs.map +1 -0
- package/dist/plugins/faucet/http.mjs +127 -0
- package/dist/plugins/faucet/http.mjs.map +1 -0
- package/dist/plugins/faucet/index.d.mts +43 -0
- package/dist/plugins/faucet/index.mjs +42 -0
- package/dist/plugins/faucet/index.mjs.map +1 -0
- package/dist/plugins/faucet/service.d.mts +20 -0
- package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +27 -0
- package/dist/plugins/host-service/errors.mjs +14 -0
- package/dist/plugins/host-service/errors.mjs.map +1 -0
- package/dist/plugins/host-service/index.d.mts +10 -0
- package/dist/plugins/host-service/index.mjs +48 -0
- package/dist/plugins/host-service/index.mjs.map +1 -0
- package/dist/plugins/host-service/routable.mjs +24 -0
- package/dist/plugins/host-service/routable.mjs.map +1 -0
- package/dist/plugins/host-service/service.d.mts +49 -0
- package/dist/plugins/host-service/service.mjs +375 -0
- package/dist/plugins/host-service/service.mjs.map +1 -0
- package/dist/plugins/package/build.d.mts +1 -0
- package/dist/plugins/package/build.mjs +24 -0
- package/dist/plugins/package/build.mjs.map +1 -0
- package/dist/plugins/package/codegen.d.mts +19 -0
- package/dist/plugins/package/codegen.mjs +41 -0
- package/dist/plugins/package/codegen.mjs.map +1 -0
- package/dist/plugins/package/dep-resolution.mjs +10 -0
- package/dist/plugins/package/dep-resolution.mjs.map +1 -0
- package/dist/plugins/package/errors.d.mts +34 -0
- package/dist/plugins/package/errors.mjs +13 -0
- package/dist/plugins/package/errors.mjs.map +1 -0
- package/dist/plugins/package/index.d.mts +109 -0
- package/dist/plugins/package/index.mjs +207 -0
- package/dist/plugins/package/index.mjs.map +1 -0
- package/dist/plugins/package/mode-known.mjs +41 -0
- package/dist/plugins/package/mode-known.mjs.map +1 -0
- package/dist/plugins/package/mode-local.d.mts +1 -0
- package/dist/plugins/package/mode-local.mjs +183 -0
- package/dist/plugins/package/mode-local.mjs.map +1 -0
- package/dist/plugins/package/publish-executor.mjs +202 -0
- package/dist/plugins/package/publish-executor.mjs.map +1 -0
- package/dist/plugins/package/publish-output.d.mts +28 -0
- package/dist/plugins/package/publish-output.mjs +45 -0
- package/dist/plugins/package/publish-output.mjs.map +1 -0
- package/dist/plugins/package/registry.d.mts +25 -0
- package/dist/plugins/package/registry.mjs +30 -0
- package/dist/plugins/package/registry.mjs.map +1 -0
- package/dist/plugins/package/service.mjs +20 -0
- package/dist/plugins/package/service.mjs.map +1 -0
- package/dist/plugins/package/snapshot.mjs +25 -0
- package/dist/plugins/package/snapshot.mjs.map +1 -0
- package/dist/plugins/postgres/codegen.mjs +42 -0
- package/dist/plugins/postgres/codegen.mjs.map +1 -0
- package/dist/plugins/postgres/connection.d.mts +33 -0
- package/dist/plugins/postgres/connection.mjs +19 -0
- package/dist/plugins/postgres/connection.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +100 -0
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
- package/dist/plugins/postgres/errors.d.mts +55 -0
- package/dist/plugins/postgres/errors.mjs +29 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -0
- package/dist/plugins/postgres/index.d.mts +37 -0
- package/dist/plugins/postgres/index.mjs +75 -0
- package/dist/plugins/postgres/index.mjs.map +1 -0
- package/dist/plugins/postgres/routable.mjs +33 -0
- package/dist/plugins/postgres/routable.mjs.map +1 -0
- package/dist/plugins/postgres/service.d.mts +50 -0
- package/dist/plugins/postgres/service.mjs +145 -0
- package/dist/plugins/postgres/service.mjs.map +1 -0
- package/dist/plugins/postgres/snapshot.d.mts +1 -0
- package/dist/plugins/postgres/snapshot.mjs +32 -0
- package/dist/plugins/postgres/snapshot.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +21 -0
- package/dist/plugins/router-entrypoints.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
- package/dist/plugins/seal/codegen.d.mts +19 -0
- package/dist/plugins/seal/codegen.mjs +16 -0
- package/dist/plugins/seal/codegen.mjs.map +1 -0
- package/dist/plugins/seal/config-render.mjs +82 -0
- package/dist/plugins/seal/config-render.mjs.map +1 -0
- package/dist/plugins/seal/deploy.mjs +198 -0
- package/dist/plugins/seal/deploy.mjs.map +1 -0
- package/dist/plugins/seal/errors.d.mts +52 -0
- package/dist/plugins/seal/errors.mjs +19 -0
- package/dist/plugins/seal/errors.mjs.map +1 -0
- package/dist/plugins/seal/index.d.mts +161 -0
- package/dist/plugins/seal/index.mjs +235 -0
- package/dist/plugins/seal/index.mjs.map +1 -0
- package/dist/plugins/seal/key-manager.d.mts +22 -0
- package/dist/plugins/seal/key-manager.mjs +22 -0
- package/dist/plugins/seal/key-manager.mjs.map +1 -0
- package/dist/plugins/seal/key-server.mjs +175 -0
- package/dist/plugins/seal/key-server.mjs.map +1 -0
- package/dist/plugins/seal/keygen.mjs +96 -0
- package/dist/plugins/seal/keygen.mjs.map +1 -0
- package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
- package/dist/plugins/seal/mode/fork-known.mjs +23 -0
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
- package/dist/plugins/seal/mode/live.d.mts +18 -0
- package/dist/plugins/seal/mode/live.mjs +64 -0
- package/dist/plugins/seal/mode/live.mjs.map +1 -0
- package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
- package/dist/plugins/seal/plugin-key.mjs +7 -0
- package/dist/plugins/seal/plugin-key.mjs.map +1 -0
- package/dist/plugins/seal/registry-publish.d.mts +43 -0
- package/dist/plugins/seal/registry-publish.mjs +9 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -0
- package/dist/plugins/seal/routable.mjs +57 -0
- package/dist/plugins/seal/routable.mjs.map +1 -0
- package/dist/plugins/seal/service.mjs +17 -0
- package/dist/plugins/seal/service.mjs.map +1 -0
- package/dist/plugins/seal/snapshot.mjs +51 -0
- package/dist/plugins/seal/snapshot.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +45 -0
- package/dist/plugins/sui/auto-tick.mjs.map +1 -0
- package/dist/plugins/sui/chain-build-container.d.mts +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +85 -0
- package/dist/plugins/sui/chain-probe.mjs +104 -0
- package/dist/plugins/sui/chain-probe.mjs.map +1 -0
- package/dist/plugins/sui/codegen.d.mts +14 -0
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -0
- package/dist/plugins/sui/errors.d.mts +74 -0
- package/dist/plugins/sui/errors.mjs +28 -0
- package/dist/plugins/sui/errors.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +24 -0
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
- package/dist/plugins/sui/fork-transaction.mjs +96 -0
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
- package/dist/plugins/sui/index.d.mts +318 -0
- package/dist/plugins/sui/index.mjs +182 -0
- package/dist/plugins/sui/index.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +60 -0
- package/dist/plugins/sui/mode/external.mjs.map +1 -0
- package/dist/plugins/sui/mode/fork.mjs +283 -0
- package/dist/plugins/sui/mode/fork.mjs.map +1 -0
- package/dist/plugins/sui/mode/live.mjs +103 -0
- package/dist/plugins/sui/mode/live.mjs.map +1 -0
- package/dist/plugins/sui/mode/local.mjs +293 -0
- package/dist/plugins/sui/mode/local.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared.d.mts +103 -0
- package/dist/plugins/sui/mode/shared.mjs +12 -0
- package/dist/plugins/sui/mode/shared.mjs.map +1 -0
- package/dist/plugins/sui/mode/spec.d.mts +94 -0
- package/dist/plugins/sui/network-resolver.d.mts +23 -0
- package/dist/plugins/sui/routable.mjs +88 -0
- package/dist/plugins/sui/routable.mjs.map +1 -0
- package/dist/plugins/sui/seed-objects.d.mts +18 -0
- package/dist/plugins/sui/seed-objects.mjs +25 -0
- package/dist/plugins/sui/seed-objects.mjs.map +1 -0
- package/dist/plugins/sui/service.mjs +38 -0
- package/dist/plugins/sui/service.mjs.map +1 -0
- package/dist/plugins/sui/snapshot.mjs +53 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +33 -0
- package/dist/plugins/wallet/codegen.mjs +34 -0
- package/dist/plugins/wallet/codegen.mjs.map +1 -0
- package/dist/plugins/wallet/errors.d.mts +66 -0
- package/dist/plugins/wallet/errors.mjs +16 -0
- package/dist/plugins/wallet/errors.mjs.map +1 -0
- package/dist/plugins/wallet/index.d.mts +63 -0
- package/dist/plugins/wallet/index.mjs +126 -0
- package/dist/plugins/wallet/index.mjs.map +1 -0
- package/dist/plugins/wallet/origin-policy.d.mts +1 -0
- package/dist/plugins/wallet/origin-policy.mjs +65 -0
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
- package/dist/plugins/wallet/pairing.d.mts +11 -0
- package/dist/plugins/wallet/pairing.mjs +125 -0
- package/dist/plugins/wallet/pairing.mjs.map +1 -0
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +96 -0
- package/dist/plugins/wallet/protocol.mjs.map +1 -0
- package/dist/plugins/wallet/routable.mjs +32 -0
- package/dist/plugins/wallet/routable.mjs.map +1 -0
- package/dist/plugins/wallet/server.d.mts +12 -0
- package/dist/plugins/wallet/server.mjs +317 -0
- package/dist/plugins/wallet/server.mjs.map +1 -0
- package/dist/plugins/wallet/service.d.mts +68 -0
- package/dist/plugins/wallet/service.mjs +97 -0
- package/dist/plugins/wallet/service.mjs.map +1 -0
- package/dist/plugins/wallet/snapshot.d.mts +1 -0
- package/dist/plugins/wallet/snapshot.mjs +14 -0
- package/dist/plugins/wallet/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/walrus/codegen.d.mts +38 -0
- package/dist/plugins/walrus/codegen.mjs +34 -0
- package/dist/plugins/walrus/codegen.mjs.map +1 -0
- package/dist/plugins/walrus/deploy-paths.mjs +14 -0
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
- package/dist/plugins/walrus/deploy.d.mts +1 -0
- package/dist/plugins/walrus/deploy.mjs +224 -0
- package/dist/plugins/walrus/deploy.mjs.map +1 -0
- package/dist/plugins/walrus/errors.d.mts +38 -0
- package/dist/plugins/walrus/errors.mjs +26 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -0
- package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
- package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/walrus/index.d.mts +177 -0
- package/dist/plugins/walrus/index.mjs +284 -0
- package/dist/plugins/walrus/index.mjs.map +1 -0
- package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
- package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
- package/dist/plugins/walrus/plugin-key.mjs +7 -0
- package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
- package/dist/plugins/walrus/registry-publish.d.mts +24 -0
- package/dist/plugins/walrus/registry-publish.mjs +7 -0
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
- package/dist/plugins/walrus/routable.mjs +99 -0
- package/dist/plugins/walrus/routable.mjs.map +1 -0
- package/dist/plugins/walrus/service.mjs +20 -0
- package/dist/plugins/walrus/service.mjs.map +1 -0
- package/dist/plugins/walrus/snapshot.mjs +53 -0
- package/dist/plugins/walrus/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
- package/dist/plugins/walrus/storage-nodes.mjs +154 -0
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
- package/dist/plugins/walrus/wal-swap.d.mts +2 -0
- package/dist/plugins/walrus/wal-swap.mjs +58 -0
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
- package/dist/primitives/artifact-publisher.d.mts +12 -0
- package/dist/primitives/cache.d.mts +1 -0
- package/dist/runtime/built-in-plugin-layers.mjs +49 -0
- package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
- package/dist/runtime/docker/client.d.mts +2 -0
- package/dist/runtime/docker/client.mjs +54 -0
- package/dist/runtime/docker/client.mjs.map +1 -0
- package/dist/runtime/docker/container.d.mts +1 -0
- package/dist/runtime/docker/container.mjs +562 -0
- package/dist/runtime/docker/container.mjs.map +1 -0
- package/dist/runtime/docker/errors.d.mts +1 -0
- package/dist/runtime/docker/errors.mjs +187 -0
- package/dist/runtime/docker/errors.mjs.map +1 -0
- package/dist/runtime/docker/exec.d.mts +1 -0
- package/dist/runtime/docker/exec.mjs +63 -0
- package/dist/runtime/docker/exec.mjs.map +1 -0
- package/dist/runtime/docker/image.d.mts +1 -0
- package/dist/runtime/docker/image.mjs +278 -0
- package/dist/runtime/docker/image.mjs.map +1 -0
- package/dist/runtime/docker/index.d.mts +1 -0
- package/dist/runtime/docker/inventory.d.mts +1 -0
- package/dist/runtime/docker/inventory.mjs +167 -0
- package/dist/runtime/docker/inventory.mjs.map +1 -0
- package/dist/runtime/docker/labels.d.mts +1 -0
- package/dist/runtime/docker/labels.mjs +97 -0
- package/dist/runtime/docker/labels.mjs.map +1 -0
- package/dist/runtime/docker/logs.d.mts +1 -0
- package/dist/runtime/docker/logs.mjs +34 -0
- package/dist/runtime/docker/logs.mjs.map +1 -0
- package/dist/runtime/docker/network.d.mts +1 -0
- package/dist/runtime/docker/network.mjs +168 -0
- package/dist/runtime/docker/network.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +9 -0
- package/dist/runtime/docker/service.mjs +266 -0
- package/dist/runtime/docker/service.mjs.map +1 -0
- package/dist/runtime/docker/sweep.d.mts +1 -0
- package/dist/runtime/docker/sweep.mjs +220 -0
- package/dist/runtime/docker/sweep.mjs.map +1 -0
- package/dist/runtime/docker/volume.d.mts +1 -0
- package/dist/runtime/docker/volume.mjs +24 -0
- package/dist/runtime/docker/volume.mjs.map +1 -0
- package/dist/runtime/docker/wrap.d.mts +1 -0
- package/dist/runtime/docker/wrap.mjs +131 -0
- package/dist/runtime/docker/wrap.mjs.map +1 -0
- package/dist/substrate/brand.d.mts +24 -0
- package/dist/substrate/brand.mjs +14 -0
- package/dist/substrate/brand.mjs.map +1 -0
- package/dist/substrate/cross-process.d.mts +1 -0
- package/dist/substrate/cross-process.mjs +28 -0
- package/dist/substrate/cross-process.mjs.map +1 -0
- package/dist/substrate/events.d.mts +117 -0
- package/dist/substrate/identity.d.mts +13 -0
- package/dist/substrate/lifecycle.d.mts +12 -0
- package/dist/substrate/manifest.d.mts +39 -0
- package/dist/substrate/manifest.mjs +33 -0
- package/dist/substrate/manifest.mjs.map +1 -0
- package/dist/substrate/network.d.mts +34 -0
- package/dist/substrate/options.d.mts +23 -0
- package/dist/substrate/plugin.d.mts +101 -0
- package/dist/substrate/plugin.mjs +61 -0
- package/dist/substrate/plugin.mjs.map +1 -0
- package/dist/substrate/projection.d.mts +100 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
- package/dist/substrate/runtime/atomic-write.mjs +106 -0
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
- package/dist/substrate/runtime/cache/index.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.mjs +22 -0
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
- package/dist/substrate/runtime/cache/service.d.mts +1 -0
- package/dist/substrate/runtime/cache/service.mjs +89 -0
- package/dist/substrate/runtime/cache/service.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
- package/dist/substrate/runtime/config-validation.d.mts +38 -0
- package/dist/substrate/runtime/config-validation.mjs +137 -0
- package/dist/substrate/runtime/config-validation.mjs.map +1 -0
- package/dist/substrate/runtime/context-helpers.mjs +32 -0
- package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
- package/dist/substrate/runtime/current-plugin.mjs +15 -0
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
- package/dist/substrate/runtime/errors.d.mts +1 -0
- package/dist/substrate/runtime/errors.mjs +76 -0
- package/dist/substrate/runtime/errors.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
- package/dist/substrate/runtime/http-probe.d.mts +35 -0
- package/dist/substrate/runtime/http-probe.mjs +65 -0
- package/dist/substrate/runtime/http-probe.mjs.map +1 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
- package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
- package/dist/substrate/runtime/managed-container.d.mts +30 -0
- package/dist/substrate/runtime/managed-container.mjs +32 -0
- package/dist/substrate/runtime/managed-container.mjs.map +1 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
- package/dist/substrate/runtime/mode-errors.d.mts +36 -0
- package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +3 -0
- package/dist/substrate/runtime/observability/logger.d.mts +58 -0
- package/dist/substrate/runtime/observability/logger.mjs +89 -0
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
- package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
- package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
- package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
- package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
- package/dist/substrate/runtime/observability/redaction.mjs +45 -0
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.d.mts +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +87 -0
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
- package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +17 -0
- package/dist/substrate/runtime/paths.mjs +61 -0
- package/dist/substrate/runtime/paths.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.mjs +319 -0
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/probes.d.mts +51 -0
- package/dist/substrate/runtime/probes.mjs +84 -0
- package/dist/substrate/runtime/probes.mjs.map +1 -0
- package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
- package/dist/substrate/runtime/process-supervisor.mjs +73 -0
- package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
- package/dist/substrate/runtime/projection/persisted.mjs +195 -0
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
- package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
- package/dist/substrate/runtime/projection/update.mjs +200 -0
- package/dist/substrate/runtime/projection/update.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +18 -0
- package/dist/substrate/runtime/retry-policy.mjs +16 -0
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
- package/dist/substrate/runtime/run.mjs +86 -0
- package/dist/substrate/runtime/run.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
- package/dist/substrate/runtime/runtime-decode.mjs +53 -0
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +36 -0
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
- package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor.mjs +831 -0
- package/dist/substrate/runtime/supervisor.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs +276 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -0
- package/dist/surfaces/cli/commands/config.mjs +31 -0
- package/dist/surfaces/cli/commands/config.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor.mjs +38 -0
- package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune.mjs +178 -0
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
- package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
- package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
- package/dist/surfaces/cli/commands/status.mjs +95 -0
- package/dist/surfaces/cli/commands/status.mjs.map +1 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
- package/dist/surfaces/cli/commands/wipe.mjs +28 -0
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
- package/dist/surfaces/cli/envelope.mjs +43 -0
- package/dist/surfaces/cli/envelope.mjs.map +1 -0
- package/dist/surfaces/cli/errors.mjs +110 -0
- package/dist/surfaces/cli/errors.mjs.map +1 -0
- package/dist/surfaces/cli/flags.mjs +56 -0
- package/dist/surfaces/cli/flags.mjs.map +1 -0
- package/dist/surfaces/cli/index.mjs +418 -0
- package/dist/surfaces/cli/index.mjs.map +1 -0
- package/dist/surfaces/cli/output.mjs +115 -0
- package/dist/surfaces/cli/output.mjs.map +1 -0
- package/dist/surfaces/cli/sysexits.mjs +139 -0
- package/dist/surfaces/cli/sysexits.mjs.map +1 -0
- package/dist/surfaces/tui/app.mjs +104 -0
- package/dist/surfaces/tui/app.mjs.map +1 -0
- package/dist/surfaces/tui/dashboard.mjs +261 -0
- package/dist/surfaces/tui/dashboard.mjs.map +1 -0
- package/dist/surfaces/tui/display-derivation.mjs +395 -0
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
- package/dist/surfaces/tui/errors.mjs +11 -0
- package/dist/surfaces/tui/errors.mjs.map +1 -0
- package/dist/surfaces/tui/event-log.mjs +155 -0
- package/dist/surfaces/tui/event-log.mjs.map +1 -0
- package/dist/surfaces/tui/heartbeat.mjs +33 -0
- package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
- package/dist/surfaces/tui/index.mjs +50 -0
- package/dist/surfaces/tui/index.mjs.map +1 -0
- package/dist/surfaces/tui/input.mjs +104 -0
- package/dist/surfaces/tui/input.mjs.map +1 -0
- package/dist/surfaces/tui/mode-detect.mjs +32 -0
- package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
- package/dist/surfaces/tui/mount-ink.mjs +31 -0
- package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
- package/dist/surfaces/tui/plain-renderer.mjs +170 -0
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
- package/dist/surfaces/tui/resource-table.mjs +507 -0
- package/dist/surfaces/tui/resource-table.mjs.map +1 -0
- package/images/_shared/signal-forward.sh +77 -0
- package/images/postgres/Dockerfile +32 -0
- package/images/seal/Dockerfile +68 -0
- package/images/seal/entrypoint.sh +65 -0
- package/images/sui/Dockerfile +73 -0
- package/images/sui/entrypoint.sh +244 -0
- package/images/sui-fork/Dockerfile +53 -0
- package/images/sui-fork/entrypoint.sh +51 -0
- package/images/walrus/Dockerfile +122 -0
- package/images/walrus/deploy-walrus.sh +305 -0
- package/images/walrus/run-walrus.sh +53 -0
- package/package.json +94 -0
|
@@ -0,0 +1,562 @@
|
|
|
1
|
+
import { StackPathsService } from "../../substrate/runtime/paths.mjs";
|
|
2
|
+
import { decodeJsonArrayElementSync } from "../../substrate/runtime/runtime-decode.mjs";
|
|
3
|
+
import { dockerRun, dockerRunOk } from "./client.mjs";
|
|
4
|
+
import { addClaim, removeClaim } from "../../substrate/runtime/cross-process/roster.mjs";
|
|
5
|
+
import { ContainerCreateFailed, ContainerNameCollisionUnrecoverable, DaemonUnreachable, DockerInspectDecodeFailed, DockerInspectFailed, ForeignDockerResource, RecreateRefused } from "./errors.mjs";
|
|
6
|
+
import { LabelKey, expectedContainerOwnershipLabels, ownershipMismatchDetail, renderContainerLabels } from "./labels.mjs";
|
|
7
|
+
import { classifyExit, isDaemonUnreachableStderr, isNameCollisionStderr, isNoSuchContainerStderr, wrapCreateError, wrapGeneric } from "./wrap.mjs";
|
|
8
|
+
import { connect, readIps, waitForIp } from "./network.mjs";
|
|
9
|
+
import { Deferred, Effect, Ref, Schema } from "effect";
|
|
10
|
+
//#region src/runtime/docker/container.ts
|
|
11
|
+
/** Pure decision: given the inspect facts (or null = missing), the
|
|
12
|
+
* desired image + host port bindings, and the policy, what action
|
|
13
|
+
* do we take?
|
|
14
|
+
*
|
|
15
|
+
* Tested directly without the subprocess seam. */
|
|
16
|
+
const decideRunAction = (facts, desiredImage, policy, desiredPortBindings = [], portBindingReconciliation = "exact", desiredConfigHash, desiredImageDigest) => {
|
|
17
|
+
if (facts === null) return { kind: "fresh" };
|
|
18
|
+
const imageMatches = facts.image === desiredImage || desiredImageDigest !== void 0 && (facts.image === desiredImageDigest || facts.imageDigest === desiredImageDigest);
|
|
19
|
+
const portsCompatible = sameBindings(facts.portBindings ?? [], desiredPortBindings) || portBindingReconciliation === "adopt-existing" && sameBindingContainerPorts(facts.portBindings ?? [], desiredPortBindings);
|
|
20
|
+
const configMatches = desiredConfigHash === void 0 || facts.labels?.[LabelKey.configHash] === desiredConfigHash;
|
|
21
|
+
if (facts.lifecycle.kind === "unknown") return routeRecreate({
|
|
22
|
+
kind: "recreate",
|
|
23
|
+
id: facts.id,
|
|
24
|
+
reason: "unknown-state"
|
|
25
|
+
}, policy);
|
|
26
|
+
if (facts.lifecycle.kind === "paused") return imageMatches && portsCompatible && configMatches ? {
|
|
27
|
+
kind: "unpause-adopt",
|
|
28
|
+
id: facts.id
|
|
29
|
+
} : routeRecreate({
|
|
30
|
+
kind: "recreate",
|
|
31
|
+
id: facts.id,
|
|
32
|
+
reason: imageMatches ? "config-mismatch" : "image-mismatch"
|
|
33
|
+
}, policy);
|
|
34
|
+
if (facts.lifecycle.kind === "running") return imageMatches && portsCompatible && configMatches ? {
|
|
35
|
+
kind: "adopt",
|
|
36
|
+
id: facts.id
|
|
37
|
+
} : routeRecreate({
|
|
38
|
+
kind: "recreate",
|
|
39
|
+
id: facts.id,
|
|
40
|
+
reason: imageMatches ? "config-mismatch" : "image-mismatch"
|
|
41
|
+
}, policy);
|
|
42
|
+
if (!imageMatches) return routeRecreate({
|
|
43
|
+
kind: "recreate",
|
|
44
|
+
id: facts.id,
|
|
45
|
+
reason: "image-mismatch"
|
|
46
|
+
}, policy);
|
|
47
|
+
if (!portsCompatible) return routeRecreate({
|
|
48
|
+
kind: "recreate",
|
|
49
|
+
id: facts.id,
|
|
50
|
+
reason: "config-mismatch"
|
|
51
|
+
}, policy);
|
|
52
|
+
if (!configMatches) return routeRecreate({
|
|
53
|
+
kind: "recreate",
|
|
54
|
+
id: facts.id,
|
|
55
|
+
reason: "config-mismatch"
|
|
56
|
+
}, policy);
|
|
57
|
+
if (facts.lifecycle.exitCode === 137) {
|
|
58
|
+
if (policy === "on-failure") return {
|
|
59
|
+
kind: "recreate",
|
|
60
|
+
id: facts.id,
|
|
61
|
+
reason: "unclean-shutdown"
|
|
62
|
+
};
|
|
63
|
+
if (policy === "never") return {
|
|
64
|
+
kind: "refuse",
|
|
65
|
+
reason: "unclean-shutdown"
|
|
66
|
+
};
|
|
67
|
+
return {
|
|
68
|
+
kind: "resume",
|
|
69
|
+
id: facts.id
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
return {
|
|
73
|
+
kind: "resume",
|
|
74
|
+
id: facts.id
|
|
75
|
+
};
|
|
76
|
+
};
|
|
77
|
+
/** Route a recreate-class decision through the policy. */
|
|
78
|
+
const routeRecreate = (action, policy) => {
|
|
79
|
+
if (policy === "never") return {
|
|
80
|
+
kind: "refuse",
|
|
81
|
+
reason: action.reason
|
|
82
|
+
};
|
|
83
|
+
return action;
|
|
84
|
+
};
|
|
85
|
+
const canonicalPortBindings = (ports) => [...ports ?? []].map((p) => `${p.containerPort}/tcp=${normalizeHostIp(p.hostIp)}:${p.hostPort}`).sort();
|
|
86
|
+
const sameBindings = (left, right) => left.length === right.length && left.every((value, index) => value === right[index]);
|
|
87
|
+
const sameBindingContainerPorts = (left, right) => {
|
|
88
|
+
return sameBindings(left.map(bindingContainerKey).sort(), right.map(bindingContainerKey).sort());
|
|
89
|
+
};
|
|
90
|
+
const bindingContainerKey = (binding) => binding.split("=")[0] ?? binding;
|
|
91
|
+
const normalizeHostIp = (hostIp) => hostIp === void 0 || hostIp === "" ? "0.0.0.0" : hostIp;
|
|
92
|
+
const readPublishedPorts = (raw) => {
|
|
93
|
+
if (raw === null || typeof raw !== "object") return [];
|
|
94
|
+
const out = [];
|
|
95
|
+
for (const [container, bindings] of Object.entries(raw)) {
|
|
96
|
+
const containerPort = Number(container.split("/")[0]);
|
|
97
|
+
if (!Number.isInteger(containerPort) || containerPort <= 0) continue;
|
|
98
|
+
if (!Array.isArray(bindings)) continue;
|
|
99
|
+
for (const binding of bindings) {
|
|
100
|
+
if (binding === null || typeof binding !== "object") continue;
|
|
101
|
+
const hostPort = binding.HostPort;
|
|
102
|
+
if (typeof hostPort !== "string") continue;
|
|
103
|
+
const hostPortNumber = Number(hostPort);
|
|
104
|
+
if (!Number.isInteger(hostPortNumber) || hostPortNumber <= 0) continue;
|
|
105
|
+
const hostIp = binding.HostIp;
|
|
106
|
+
out.push({
|
|
107
|
+
containerPort,
|
|
108
|
+
hostPort: hostPortNumber,
|
|
109
|
+
...typeof hostIp === "string" ? { hostIp: normalizeHostIp(hostIp) } : {}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return out.sort((a, b) => {
|
|
114
|
+
if (a.containerPort !== b.containerPort) return a.containerPort - b.containerPort;
|
|
115
|
+
const hostIp = normalizeHostIp(a.hostIp).localeCompare(normalizeHostIp(b.hostIp));
|
|
116
|
+
return hostIp !== 0 ? hostIp : a.hostPort - b.hostPort;
|
|
117
|
+
});
|
|
118
|
+
};
|
|
119
|
+
const readMounts = (raw) => {
|
|
120
|
+
if (!Array.isArray(raw)) return [];
|
|
121
|
+
const out = [];
|
|
122
|
+
for (const mount of raw) {
|
|
123
|
+
if (mount === null || typeof mount !== "object") continue;
|
|
124
|
+
const source = mount.Source;
|
|
125
|
+
const target = mount.Destination;
|
|
126
|
+
if (typeof source !== "string" || typeof target !== "string") continue;
|
|
127
|
+
const rw = mount.RW;
|
|
128
|
+
out.push({
|
|
129
|
+
source,
|
|
130
|
+
target,
|
|
131
|
+
...typeof rw === "boolean" ? { readOnly: !rw } : {}
|
|
132
|
+
});
|
|
133
|
+
}
|
|
134
|
+
return out;
|
|
135
|
+
};
|
|
136
|
+
const readStringArray = (raw) => {
|
|
137
|
+
if (!Array.isArray(raw)) return [];
|
|
138
|
+
return raw.filter((value) => typeof value === "string");
|
|
139
|
+
};
|
|
140
|
+
const readLabels = (raw) => {
|
|
141
|
+
if (raw === null || typeof raw !== "object") return {};
|
|
142
|
+
const out = {};
|
|
143
|
+
for (const [key, value] of Object.entries(raw)) if (typeof value === "string") out[key] = value;
|
|
144
|
+
return out;
|
|
145
|
+
};
|
|
146
|
+
const readNetworks = (raw) => {
|
|
147
|
+
if (raw === null || typeof raw !== "object") return [];
|
|
148
|
+
return Object.keys(raw).sort();
|
|
149
|
+
};
|
|
150
|
+
const readLifecycleState = (state) => {
|
|
151
|
+
if (state === void 0) return { kind: "unknown" };
|
|
152
|
+
if (state.Paused) return {
|
|
153
|
+
kind: "paused",
|
|
154
|
+
exitCode: state.ExitCode
|
|
155
|
+
};
|
|
156
|
+
if (state.Running) return {
|
|
157
|
+
kind: "running",
|
|
158
|
+
exitCode: state.ExitCode
|
|
159
|
+
};
|
|
160
|
+
return {
|
|
161
|
+
kind: "stopped",
|
|
162
|
+
exitCode: state.ExitCode
|
|
163
|
+
};
|
|
164
|
+
};
|
|
165
|
+
const InspectSchema = Schema.Struct({
|
|
166
|
+
Id: Schema.String,
|
|
167
|
+
Image: Schema.optional(Schema.String),
|
|
168
|
+
Mounts: Schema.optional(Schema.Unknown),
|
|
169
|
+
HostConfig: Schema.optional(Schema.Struct({ PortBindings: Schema.Unknown })),
|
|
170
|
+
State: Schema.optional(Schema.Struct({
|
|
171
|
+
Running: Schema.Boolean,
|
|
172
|
+
Paused: Schema.Boolean,
|
|
173
|
+
ExitCode: Schema.Number
|
|
174
|
+
})),
|
|
175
|
+
Config: Schema.Struct({
|
|
176
|
+
Image: Schema.String,
|
|
177
|
+
Cmd: Schema.optional(Schema.Unknown),
|
|
178
|
+
Labels: Schema.optional(Schema.Unknown)
|
|
179
|
+
}),
|
|
180
|
+
NetworkSettings: Schema.Struct({
|
|
181
|
+
Networks: Schema.Unknown,
|
|
182
|
+
Ports: Schema.optional(Schema.Unknown)
|
|
183
|
+
})
|
|
184
|
+
});
|
|
185
|
+
const inspectContainer = (name) => Effect.gen(function* () {
|
|
186
|
+
const res = yield* dockerRunOk("container", ["inspect", name]).pipe(Effect.mapError(wrapGeneric("docker.container.inspect")));
|
|
187
|
+
if (res.exitCode !== 0) {
|
|
188
|
+
if (isNoSuchContainerStderr(res.stderr)) return null;
|
|
189
|
+
if (isDaemonUnreachableStderr(res.stderr)) return yield* Effect.fail(new DaemonUnreachable({
|
|
190
|
+
op: "docker.container.inspect",
|
|
191
|
+
detail: "docker daemon unreachable"
|
|
192
|
+
}));
|
|
193
|
+
return yield* Effect.fail(new DockerInspectFailed({
|
|
194
|
+
resource: "container",
|
|
195
|
+
name,
|
|
196
|
+
stderr: res.stderr,
|
|
197
|
+
exitCode: res.exitCode
|
|
198
|
+
}));
|
|
199
|
+
}
|
|
200
|
+
try {
|
|
201
|
+
const decoded = decodeJsonArrayElementSync(InspectSchema, res.stdout, {
|
|
202
|
+
source: `docker container inspect ${name}`,
|
|
203
|
+
missingMessage: "inspect returned an empty result",
|
|
204
|
+
mkError: (issue) => new DockerInspectDecodeFailed({
|
|
205
|
+
resource: "container",
|
|
206
|
+
name,
|
|
207
|
+
detail: issue.message === "inspect returned an empty result" ? issue.message : "inspect returned malformed container JSON",
|
|
208
|
+
cause: issue.cause
|
|
209
|
+
})
|
|
210
|
+
});
|
|
211
|
+
const lifecycle = readLifecycleState(decoded.State);
|
|
212
|
+
const effectivePorts = readPublishedPorts(decoded.NetworkSettings.Ports);
|
|
213
|
+
const ports = decoded.HostConfig === void 0 ? effectivePorts : readPublishedPorts(decoded.HostConfig.PortBindings);
|
|
214
|
+
const mounts = readMounts(decoded.Mounts);
|
|
215
|
+
const command = readStringArray(decoded.Config.Cmd);
|
|
216
|
+
const labels = readLabels(decoded.Config.Labels);
|
|
217
|
+
const networks = readNetworks(decoded.NetworkSettings.Networks);
|
|
218
|
+
return {
|
|
219
|
+
id: decoded.Id,
|
|
220
|
+
lifecycle,
|
|
221
|
+
running: lifecycle.kind === "running" || lifecycle.kind === "paused",
|
|
222
|
+
paused: lifecycle.kind === "paused",
|
|
223
|
+
exitCode: lifecycle.kind === "unknown" ? null : lifecycle.exitCode,
|
|
224
|
+
image: decoded.Config.Image,
|
|
225
|
+
...decoded.Image !== void 0 ? { imageDigest: decoded.Image } : {},
|
|
226
|
+
mounts,
|
|
227
|
+
portBindings: canonicalPortBindings(ports),
|
|
228
|
+
ports,
|
|
229
|
+
effectivePortBindings: canonicalPortBindings(effectivePorts),
|
|
230
|
+
effectivePorts,
|
|
231
|
+
command,
|
|
232
|
+
labels,
|
|
233
|
+
networks
|
|
234
|
+
};
|
|
235
|
+
} catch (cause) {
|
|
236
|
+
return yield* Effect.fail(cause);
|
|
237
|
+
}
|
|
238
|
+
}).pipe(Effect.withSpan("runtime.docker.container.inspect"));
|
|
239
|
+
const createArgv = (spec, cycle, imageRef) => {
|
|
240
|
+
const args = [
|
|
241
|
+
"-d",
|
|
242
|
+
"--name",
|
|
243
|
+
spec.name
|
|
244
|
+
];
|
|
245
|
+
const configLabels = spec.configHash === void 0 ? void 0 : { [LabelKey.configHash]: spec.configHash };
|
|
246
|
+
for (const label of renderContainerLabels(spec.labels, cycle, configLabels)) args.push("--label", label);
|
|
247
|
+
if (spec.env) for (const [k, v] of Object.entries(spec.env)) args.push("--env", `${k}=${v}`);
|
|
248
|
+
if (spec.ports) for (const p of spec.ports) {
|
|
249
|
+
const hostPrefix = p.hostIp === void 0 ? "" : `${p.hostIp}:`;
|
|
250
|
+
args.push("-p", `${hostPrefix}${p.hostPort}:${p.containerPort}`);
|
|
251
|
+
}
|
|
252
|
+
if (spec.mounts) for (const m of spec.mounts) {
|
|
253
|
+
const ro = m.readonly ? ",readonly" : "";
|
|
254
|
+
args.push("--mount", `type=bind,source=${m.source},target=${m.target}${ro}`);
|
|
255
|
+
}
|
|
256
|
+
if (spec.networkAttach && spec.networkAttach.length > 0) args.push("--network", spec.networkAttach[0]);
|
|
257
|
+
if (spec.extraHosts) for (const [host, ip] of Object.entries(spec.extraHosts)) args.push("--add-host", `${host}:${ip}`);
|
|
258
|
+
if (spec.entrypoint) args.push("--entrypoint", spec.entrypoint);
|
|
259
|
+
args.push(imageRef);
|
|
260
|
+
if (spec.command) args.push(...spec.command);
|
|
261
|
+
return args;
|
|
262
|
+
};
|
|
263
|
+
const handleOf = (id, name, imageName, status, ips, ports, labels) => ({
|
|
264
|
+
id,
|
|
265
|
+
name,
|
|
266
|
+
...labels !== void 0 ? { labels } : {},
|
|
267
|
+
imageName,
|
|
268
|
+
status,
|
|
269
|
+
ips,
|
|
270
|
+
...ports !== void 0 ? { ports } : {}
|
|
271
|
+
});
|
|
272
|
+
/** Force-remove by name. Used by recreate. Idempotent on
|
|
273
|
+
* "no such container". */
|
|
274
|
+
const forceRemove = (name) => Effect.gen(function* () {
|
|
275
|
+
const res = yield* dockerRunOk("rm", ["-f", name]).pipe(Effect.mapError(wrapGeneric("docker.rm")));
|
|
276
|
+
if (res.exitCode !== 0 && !isNoSuchContainerStderr(res.stderr)) yield* Effect.annotateCurrentSpan({ "docker.rm.warning": res.stderr });
|
|
277
|
+
}).pipe(Effect.withSpan("runtime.docker.container.forceRemove"));
|
|
278
|
+
const ownershipFailure = (name, expected, actual, detail) => new ForeignDockerResource({
|
|
279
|
+
resource: "container",
|
|
280
|
+
name,
|
|
281
|
+
expected,
|
|
282
|
+
actual,
|
|
283
|
+
detail
|
|
284
|
+
});
|
|
285
|
+
const assertOwnedFacts = (name, facts, labels) => Effect.gen(function* () {
|
|
286
|
+
const expected = expectedContainerOwnershipLabels(labels);
|
|
287
|
+
const actual = facts.labels ?? {};
|
|
288
|
+
const mismatch = ownershipMismatchDetail(expected, actual);
|
|
289
|
+
if (mismatch !== null) return yield* Effect.fail(ownershipFailure(name, expected, actual, mismatch));
|
|
290
|
+
});
|
|
291
|
+
const failUnknownCollisionLifecycle = (name, stage) => Effect.fail(new ContainerNameCollisionUnrecoverable({
|
|
292
|
+
name,
|
|
293
|
+
detail: `name collision recovery refused unknown lifecycle state ${stage}`
|
|
294
|
+
}));
|
|
295
|
+
const assertContainerHandleOwned = (handle) => Effect.gen(function* () {
|
|
296
|
+
if (handle.labels === void 0) return yield* Effect.fail(ownershipFailure(handle.name, {}, {}, "container handle has no ownership labels"));
|
|
297
|
+
const facts = yield* inspectContainer(handle.name);
|
|
298
|
+
const expected = expectedContainerOwnershipLabels(handle.labels);
|
|
299
|
+
if (facts === null) return yield* Effect.fail(ownershipFailure(handle.name, expected, {}, "container is missing"));
|
|
300
|
+
if (facts.id !== handle.id) return yield* Effect.fail(ownershipFailure(handle.name, expected, facts.labels ?? {}, `id changed to ${facts.id}`));
|
|
301
|
+
yield* assertOwnedFacts(handle.name, facts, handle.labels);
|
|
302
|
+
}).pipe(Effect.withSpan("runtime.docker.container.assertOwned"));
|
|
303
|
+
const forceRemoveOwned = (name, id, labels) => Effect.gen(function* () {
|
|
304
|
+
const current = yield* inspectContainer(name);
|
|
305
|
+
if (current === null) return;
|
|
306
|
+
if (current.id !== id) {
|
|
307
|
+
const expected = expectedContainerOwnershipLabels(labels);
|
|
308
|
+
return yield* Effect.fail(ownershipFailure(name, expected, current.labels ?? {}, `id changed to ${current.id}`));
|
|
309
|
+
}
|
|
310
|
+
yield* assertOwnedFacts(name, current, labels);
|
|
311
|
+
yield* forceRemove(name);
|
|
312
|
+
});
|
|
313
|
+
/** Single-shot start-and-adopt fallback after `docker create` exit-125
|
|
314
|
+
* with name-collision. Architecture §1 / G10 — one attempt; second
|
|
315
|
+
* collision is a typed failure. */
|
|
316
|
+
const startAndAdopt = (name, labels) => Effect.gen(function* () {
|
|
317
|
+
const beforeStart = yield* inspectContainer(name);
|
|
318
|
+
if (beforeStart === null) return yield* Effect.fail(new ContainerNameCollisionUnrecoverable({
|
|
319
|
+
name,
|
|
320
|
+
detail: "name collision but inspect found no container"
|
|
321
|
+
}));
|
|
322
|
+
yield* assertOwnedFacts(name, beforeStart, labels);
|
|
323
|
+
if (beforeStart.lifecycle.kind === "unknown") return yield* failUnknownCollisionLifecycle(name, "before-start");
|
|
324
|
+
const cls = classifyExit(yield* dockerRunOk("start", [name]).pipe(Effect.mapError(wrapGeneric("docker.start"))));
|
|
325
|
+
if (cls.ok) {
|
|
326
|
+
const facts = yield* inspectContainer(name);
|
|
327
|
+
if (facts === null) return yield* Effect.fail(new ContainerNameCollisionUnrecoverable({
|
|
328
|
+
name,
|
|
329
|
+
detail: "peer collision + start succeeded + inspect missed"
|
|
330
|
+
}));
|
|
331
|
+
yield* assertOwnedFacts(name, facts, labels);
|
|
332
|
+
if (facts.lifecycle.kind === "unknown") return yield* failUnknownCollisionLifecycle(name, "after-start");
|
|
333
|
+
return facts.id;
|
|
334
|
+
}
|
|
335
|
+
if (isNoSuchContainerStderr(cls.stderr)) return yield* Effect.fail(new ContainerNameCollisionUnrecoverable({
|
|
336
|
+
name,
|
|
337
|
+
detail: "TOCTOU: start after collision found no container"
|
|
338
|
+
}));
|
|
339
|
+
return yield* Effect.fail(new ContainerNameCollisionUnrecoverable({
|
|
340
|
+
name,
|
|
341
|
+
detail: `start-and-adopt failed: ${cls.stderr}`
|
|
342
|
+
}));
|
|
343
|
+
});
|
|
344
|
+
const freshCreate = (spec, cycle) => Effect.gen(function* () {
|
|
345
|
+
return (yield* dockerRun("run", createArgv(spec, cycle, spec.image.tag ?? spec.image.digest)).pipe(Effect.mapError(wrapCreateError(spec.name)))).stdout.trim();
|
|
346
|
+
});
|
|
347
|
+
const resumeStart = (name) => Effect.gen(function* () {
|
|
348
|
+
const res = yield* dockerRunOk("start", [name]).pipe(Effect.mapError(wrapGeneric("docker.start")));
|
|
349
|
+
if (res.exitCode === 0) return { ok: true };
|
|
350
|
+
if (isDaemonUnreachableStderr(res.stderr)) return yield* Effect.fail(new DaemonUnreachable({
|
|
351
|
+
op: "docker.start",
|
|
352
|
+
detail: "docker daemon unreachable"
|
|
353
|
+
}));
|
|
354
|
+
return {
|
|
355
|
+
ok: false,
|
|
356
|
+
stderr: res.stderr
|
|
357
|
+
};
|
|
358
|
+
});
|
|
359
|
+
const recreateAfterResumeFailure = (id, spec, deps) => Effect.gen(function* () {
|
|
360
|
+
const routed = routeRecreate({
|
|
361
|
+
kind: "recreate",
|
|
362
|
+
id,
|
|
363
|
+
reason: "resume-failed"
|
|
364
|
+
}, spec.recreate);
|
|
365
|
+
if (routed.kind === "refuse") return yield* Effect.fail(new RecreateRefused({
|
|
366
|
+
name: spec.name,
|
|
367
|
+
reason: routed.reason
|
|
368
|
+
}));
|
|
369
|
+
yield* forceRemoveOwned(spec.name, id, spec.labels);
|
|
370
|
+
return yield* createWithCollisionRecovery(spec, deps);
|
|
371
|
+
});
|
|
372
|
+
const effectivePortsCompatible = (facts, spec) => {
|
|
373
|
+
const desired = canonicalPortBindings(spec.ports);
|
|
374
|
+
if (desired.length === 0) return true;
|
|
375
|
+
const actual = facts.effectivePortBindings ?? [];
|
|
376
|
+
if (sameBindings(actual, desired)) return true;
|
|
377
|
+
return (spec.portBindingReconciliation ?? "exact") === "adopt-existing" && sameBindingContainerPorts(actual, desired);
|
|
378
|
+
};
|
|
379
|
+
const ensureEffectivePublishedPorts = (id, spec, deps) => Effect.gen(function* () {
|
|
380
|
+
if ((spec.ports ?? []).length === 0) return id;
|
|
381
|
+
const facts = yield* inspectContainer(spec.name);
|
|
382
|
+
if (facts === null || facts.id !== id || facts.lifecycle.kind !== "running") return id;
|
|
383
|
+
yield* assertOwnedFacts(spec.name, facts, spec.labels);
|
|
384
|
+
if (effectivePortsCompatible(facts, spec)) return id;
|
|
385
|
+
const repairedId = yield* recreateAfterResumeFailure(id, spec, deps);
|
|
386
|
+
const repairedFacts = yield* inspectContainer(spec.name);
|
|
387
|
+
if (repairedFacts !== null && repairedFacts.id === repairedId && repairedFacts.lifecycle.kind === "running" && effectivePortsCompatible(repairedFacts, spec)) return repairedId;
|
|
388
|
+
return yield* Effect.fail(new ContainerCreateFailed({
|
|
389
|
+
name: spec.name,
|
|
390
|
+
stderr: `container is running but Docker did not publish requested ports: desired=${JSON.stringify(canonicalPortBindings(spec.ports))} actual=${JSON.stringify(repairedFacts?.effectivePortBindings ?? [])}`,
|
|
391
|
+
exitCode: 0
|
|
392
|
+
}));
|
|
393
|
+
});
|
|
394
|
+
const stopWithGrace = (name, graceSeconds, signal) => Effect.gen(function* () {
|
|
395
|
+
const args = [];
|
|
396
|
+
if (signal !== void 0) args.push("--signal", signal);
|
|
397
|
+
args.push("--time", String(Math.max(0, Math.floor(graceSeconds))));
|
|
398
|
+
args.push(name);
|
|
399
|
+
yield* dockerRunOk("stop", args).pipe(Effect.catch(() => Effect.void), Effect.asVoid);
|
|
400
|
+
});
|
|
401
|
+
/** Per-name lock acquire/release. The in-process serialization is the
|
|
402
|
+
* inspect→action window's invariant: two concurrent ensureContainer
|
|
403
|
+
* calls for the same name must not race between the read (inspect)
|
|
404
|
+
* and the write (create / start / recreate). Cross-process safety is
|
|
405
|
+
* separately the docker daemon's `--name` atomicity.
|
|
406
|
+
*
|
|
407
|
+
* Implementation: a `Ref<Map<name, Deferred[]>>`. Acquire atomically
|
|
408
|
+
* claims the slot (free → enter with empty queue) or enqueues a fresh
|
|
409
|
+
* Deferred at the tail and awaits it. Release pops the head of the
|
|
410
|
+
* queue and completes that waiter — transferring ownership without a
|
|
411
|
+
* free intermediate window. Empty-queue release deletes the entry.
|
|
412
|
+
* No wall-clock polling: contention parks fibers on Deferred.await
|
|
413
|
+
* rather than spinning, so tests can use `it.effect` (TestClock) and
|
|
414
|
+
* contended-acquire ordering is FIFO by construction.
|
|
415
|
+
*
|
|
416
|
+
* Exported for direct testing. */
|
|
417
|
+
const acquirePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
418
|
+
const waiter = yield* Deferred.make();
|
|
419
|
+
if (yield* Ref.modify(lock, (m) => {
|
|
420
|
+
const queue = m.get(name);
|
|
421
|
+
const next = new Map(m);
|
|
422
|
+
if (queue === void 0) {
|
|
423
|
+
next.set(name, []);
|
|
424
|
+
return [true, next];
|
|
425
|
+
}
|
|
426
|
+
next.set(name, [...queue, waiter]);
|
|
427
|
+
return [false, next];
|
|
428
|
+
})) return;
|
|
429
|
+
yield* Deferred.await(waiter).pipe(Effect.onInterrupt(() => Ref.update(lock, (m) => {
|
|
430
|
+
const queue = m.get(name);
|
|
431
|
+
if (queue === void 0) return m;
|
|
432
|
+
const filtered = queue.filter((d) => d !== waiter);
|
|
433
|
+
if (filtered.length === queue.length) return m;
|
|
434
|
+
const next = new Map(m);
|
|
435
|
+
next.set(name, filtered);
|
|
436
|
+
return next;
|
|
437
|
+
})));
|
|
438
|
+
});
|
|
439
|
+
const releasePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
440
|
+
const head = yield* Ref.modify(lock, (m) => {
|
|
441
|
+
const queue = m.get(name);
|
|
442
|
+
if (queue === void 0) return [void 0, m];
|
|
443
|
+
const next = new Map(m);
|
|
444
|
+
if (queue.length === 0) {
|
|
445
|
+
next.delete(name);
|
|
446
|
+
return [void 0, next];
|
|
447
|
+
}
|
|
448
|
+
const [first, ...rest] = queue;
|
|
449
|
+
next.set(name, rest);
|
|
450
|
+
return [first, next];
|
|
451
|
+
});
|
|
452
|
+
if (head !== void 0) yield* Deferred.succeed(head, void 0);
|
|
453
|
+
});
|
|
454
|
+
/** Idempotent ensure: apply the state machine, register a scope
|
|
455
|
+
* finalizer that stops the container + releases the cross-process
|
|
456
|
+
* claim.
|
|
457
|
+
*
|
|
458
|
+
* Returns the running container handle (id + name + status + ips). */
|
|
459
|
+
const ensureContainer = (spec, deps) => Effect.gen(function* () {
|
|
460
|
+
const desiredImageRef = spec.image.tag ?? spec.image.digest;
|
|
461
|
+
const id = yield* Effect.acquireUseRelease(acquirePerNameLock(deps.perNameLock, spec.name), () => Effect.gen(function* () {
|
|
462
|
+
const facts = yield* inspectContainer(spec.name);
|
|
463
|
+
if (facts !== null) yield* assertOwnedFacts(spec.name, facts, spec.labels);
|
|
464
|
+
return yield* ensureEffectivePublishedPorts(yield* applyAction(decideRunAction(facts, desiredImageRef, spec.recreate, canonicalPortBindings(spec.ports), spec.portBindingReconciliation ?? "exact", spec.configHash, spec.image.digest), spec, deps), spec, deps);
|
|
465
|
+
}), () => releasePerNameLock(deps.perNameLock, spec.name));
|
|
466
|
+
yield* assertContainerHandleOwned({
|
|
467
|
+
id,
|
|
468
|
+
name: spec.name,
|
|
469
|
+
labels: spec.labels,
|
|
470
|
+
imageName: spec.image.tag ?? spec.image.digest,
|
|
471
|
+
status: "running",
|
|
472
|
+
ips: []
|
|
473
|
+
});
|
|
474
|
+
const secondaries = (spec.networkAttach ?? []).slice(1);
|
|
475
|
+
for (const net of secondaries) {
|
|
476
|
+
yield* connect(spec.name, net);
|
|
477
|
+
yield* waitForIp(spec.name, net);
|
|
478
|
+
}
|
|
479
|
+
const ips = yield* readIps(spec.name);
|
|
480
|
+
const refreshedFacts = yield* inspectContainer(spec.name);
|
|
481
|
+
const ports = refreshedFacts?.effectivePorts ?? refreshedFacts?.ports ?? spec.ports;
|
|
482
|
+
const paths = yield* StackPathsService;
|
|
483
|
+
const mapSubstrateError = (cause) => new DaemonUnreachable({
|
|
484
|
+
op: "cross-process.claim",
|
|
485
|
+
detail: `cross-process claim mutation failed: ${String(cause)}`,
|
|
486
|
+
cause
|
|
487
|
+
});
|
|
488
|
+
yield* addClaim({
|
|
489
|
+
stackLockFile: paths.stackLockFile,
|
|
490
|
+
rosterFile: paths.rosterFile
|
|
491
|
+
}, spec.name).pipe(Effect.mapError(mapSubstrateError));
|
|
492
|
+
yield* Effect.addFinalizer(() => Effect.gen(function* () {
|
|
493
|
+
if ((yield* inspectContainer(spec.name).pipe(Effect.catch(() => Effect.succeed(null))))?.id === id) yield* stopWithGrace(spec.name, spec.stopGraceSeconds ?? 10);
|
|
494
|
+
yield* removeClaim({
|
|
495
|
+
stackLockFile: paths.stackLockFile,
|
|
496
|
+
rosterFile: paths.rosterFile
|
|
497
|
+
}, spec.name).pipe(Effect.catch(() => Effect.succeed({ lastClaimReleased: false })));
|
|
498
|
+
}).pipe(Effect.uninterruptible));
|
|
499
|
+
return handleOf(id, spec.name, spec.image.tag ?? spec.image.digest, "running", ips, ports, spec.labels);
|
|
500
|
+
}).pipe(Effect.withSpan("runtime.docker.container.ensure"));
|
|
501
|
+
/** Apply the decided action. Recovers from name-collision via
|
|
502
|
+
* one-shot start-and-adopt; second collision surfaces typed. */
|
|
503
|
+
const applyAction = (action, spec, deps) => Effect.gen(function* () {
|
|
504
|
+
switch (action.kind) {
|
|
505
|
+
case "adopt": return action.id;
|
|
506
|
+
case "unpause-adopt":
|
|
507
|
+
yield* assertContainerHandleOwned({
|
|
508
|
+
id: action.id,
|
|
509
|
+
name: spec.name,
|
|
510
|
+
labels: spec.labels,
|
|
511
|
+
imageName: spec.image.tag ?? spec.image.digest,
|
|
512
|
+
status: "paused",
|
|
513
|
+
ips: []
|
|
514
|
+
});
|
|
515
|
+
yield* unpause(spec.name);
|
|
516
|
+
return action.id;
|
|
517
|
+
case "resume":
|
|
518
|
+
yield* assertContainerHandleOwned({
|
|
519
|
+
id: action.id,
|
|
520
|
+
name: spec.name,
|
|
521
|
+
labels: spec.labels,
|
|
522
|
+
imageName: spec.image.tag ?? spec.image.digest,
|
|
523
|
+
status: "exited",
|
|
524
|
+
ips: []
|
|
525
|
+
});
|
|
526
|
+
if (!(yield* resumeStart(spec.name)).ok) return yield* recreateAfterResumeFailure(action.id, spec, deps);
|
|
527
|
+
return action.id;
|
|
528
|
+
case "recreate":
|
|
529
|
+
yield* forceRemoveOwned(spec.name, action.id, spec.labels);
|
|
530
|
+
return yield* createWithCollisionRecovery(spec, deps);
|
|
531
|
+
case "fresh": return yield* createWithCollisionRecovery(spec, deps);
|
|
532
|
+
case "refuse": return yield* Effect.fail(new RecreateRefused({
|
|
533
|
+
name: spec.name,
|
|
534
|
+
reason: action.reason
|
|
535
|
+
}));
|
|
536
|
+
}
|
|
537
|
+
});
|
|
538
|
+
/** `docker run -d` with single-shot start-and-adopt fallback on
|
|
539
|
+
* name-collision. */
|
|
540
|
+
const createWithCollisionRecovery = (spec, deps) => freshCreate(spec, deps.cycle).pipe(Effect.catchTag("ContainerNameCollisionUnrecoverable", () => startAndAdopt(spec.name, spec.labels)), Effect.catchTag("ContainerCreateFailed", (err) => isNameCollisionStderr(err.stderr) ? startAndAdopt(spec.name, spec.labels) : Effect.fail(err)));
|
|
541
|
+
const stop = (name, graceSeconds, signal) => stopWithGrace(name, graceSeconds, signal).pipe(Effect.asVoid);
|
|
542
|
+
const pause = (name) => Effect.gen(function* () {
|
|
543
|
+
yield* dockerRun("pause", [name]).pipe(Effect.mapError(wrapGeneric("docker.pause")));
|
|
544
|
+
}).pipe(Effect.withSpan("runtime.docker.container.pause"));
|
|
545
|
+
const unpause = (name) => Effect.gen(function* () {
|
|
546
|
+
yield* dockerRun("unpause", [name]).pipe(Effect.mapError(wrapGeneric("docker.unpause")));
|
|
547
|
+
}).pipe(Effect.withSpan("runtime.docker.container.unpause"));
|
|
548
|
+
/** `docker commit <name> <tag>` — writable layer → image. Used by
|
|
549
|
+
* snapshot capture. */
|
|
550
|
+
const commit = (name, tag) => Effect.gen(function* () {
|
|
551
|
+
const digest = (yield* dockerRun("commit", [name, tag]).pipe(Effect.mapError(wrapGeneric("docker.commit")))).stdout.trim();
|
|
552
|
+
if (digest.length === 0) return yield* Effect.fail(new ContainerCreateFailed({
|
|
553
|
+
name,
|
|
554
|
+
stderr: "commit returned empty digest",
|
|
555
|
+
exitCode: 0
|
|
556
|
+
}));
|
|
557
|
+
return digest;
|
|
558
|
+
}).pipe(Effect.withSpan("runtime.docker.container.commit"));
|
|
559
|
+
//#endregion
|
|
560
|
+
export { assertContainerHandleOwned, commit, ensureContainer, inspectContainer, pause, stop, unpause };
|
|
561
|
+
|
|
562
|
+
//# sourceMappingURL=container.mjs.map
|