@mysten-incubation/devstack 0.0.1 → 0.1.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 -3
- package/dashboard-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dashboard-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
- package/dashboard-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dashboard-ui/assets/index-Bmi1UtAg.js +1356 -0
- package/dashboard-ui/assets/index-D5EShVt4.js +3 -0
- package/dashboard-ui/assets/index-Deml9drg.css +1 -0
- package/dashboard-ui/index.html +13 -0
- package/dist/api/define-capabilities.d.mts +14 -3
- package/dist/api/define-capabilities.mjs +18 -1
- package/dist/api/define-capabilities.mjs.map +1 -1
- package/dist/api/define-devstack.d.mts +1 -1
- package/dist/api/define-devstack.mjs +6 -26
- package/dist/api/define-devstack.mjs.map +1 -1
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/define-plugin.mjs +2 -0
- package/dist/api/inference-network.d.mts +132 -0
- package/dist/api/inference-network.mjs +105 -16
- package/dist/api/inference-network.mjs.map +1 -1
- package/dist/api/plugin-errors.d.mts +7 -0
- package/dist/api/run-stack.d.mts +20 -9
- package/dist/api/run-stack.mjs +56 -29
- package/dist/api/run-stack.mjs.map +1 -1
- package/dist/build-integrations/playwright/config.d.mts +6 -4
- package/dist/build-integrations/playwright/config.mjs +5 -3
- package/dist/build-integrations/playwright/config.mjs.map +1 -1
- package/dist/build-integrations/playwright/errors.d.mts +1 -1
- package/dist/build-integrations/playwright/global-setup.d.mts +43 -17
- package/dist/build-integrations/playwright/global-setup.mjs +250 -13
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
- package/dist/build-integrations/playwright/index.d.mts +5 -3
- package/dist/build-integrations/playwright/index.mjs +4 -2
- package/dist/build-integrations/playwright/stack-context.d.mts +0 -1
- package/dist/build-integrations/playwright/stack-context.mjs +24 -63
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
- package/dist/build-integrations/playwright/wallet-context.d.mts +7 -10
- package/dist/build-integrations/playwright/wallet-context.mjs +8 -13
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/cold-start-url.d.mts +5 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +4 -3
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
- package/dist/build-integrations/runtime/conventional-routes.d.mts +51 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs +92 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +38 -30
- package/dist/build-integrations/runtime/discover.mjs +73 -70
- package/dist/build-integrations/runtime/discover.mjs.map +1 -1
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
- package/dist/build-integrations/runtime/index.d.mts +7 -2
- package/dist/build-integrations/runtime/index.mjs +9 -2
- package/dist/build-integrations/runtime/manifest-types.d.mts +2 -0
- package/dist/build-integrations/runtime/manifest-types.mjs +3 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.d.mts +29 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs +10 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/read-stack-context.mjs +10 -4
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +48 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs +42 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/wallet-paths.mjs +2 -0
- package/dist/build-integrations/vite/index.d.mts +51 -0
- package/dist/build-integrations/vite/index.mjs +73 -0
- package/dist/build-integrations/vite/index.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +4 -3
- package/dist/build-integrations/vitest/env.mjs +6 -4
- package/dist/build-integrations/vitest/env.mjs.map +1 -1
- package/dist/build-integrations/vitest/errors.d.mts +25 -4
- package/dist/build-integrations/vitest/errors.mjs +15 -2
- package/dist/build-integrations/vitest/errors.mjs.map +1 -1
- package/dist/build-integrations/vitest/index.d.mts +2 -2
- package/dist/build-integrations/vitest/index.mjs +3 -3
- package/dist/build-integrations/vitest/setup.d.mts +4 -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 +0 -1
- package/dist/build-integrations/vitest/stack-context.mjs +33 -13
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
- package/dist/cli/bail.mjs +23 -0
- package/dist/cli/bail.mjs.map +1 -0
- package/dist/{surfaces/cli/commands → cli}/doctor-probes.mjs +26 -16
- package/dist/cli/doctor-probes.mjs.map +1 -0
- package/dist/cli/main.d.mts +15 -1
- package/dist/cli/main.mjs +166 -482
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/prune-direct.mjs +31 -201
- package/dist/cli/prune-direct.mjs.map +1 -1
- package/dist/cli/snapshot-reader.mjs +14 -11
- package/dist/cli/snapshot-reader.mjs.map +1 -1
- package/dist/cli/up-lifecycle.mjs +4 -1
- package/dist/cli/up-lifecycle.mjs.map +1 -1
- package/dist/cli/wirings/apply.mjs +95 -0
- package/dist/cli/wirings/apply.mjs.map +1 -0
- package/dist/cli/wirings/build-verb-layers.mjs +42 -0
- package/dist/cli/wirings/build-verb-layers.mjs.map +1 -0
- package/dist/cli/wirings/config-loader.mjs +69 -0
- package/dist/cli/wirings/config-loader.mjs.map +1 -0
- package/dist/cli/wirings/engine-command.mjs +30 -0
- package/dist/cli/wirings/engine-command.mjs.map +1 -0
- package/dist/cli/wirings/identity.mjs +72 -0
- package/dist/cli/wirings/identity.mjs.map +1 -0
- package/dist/cli/wirings/provide-file-system.mjs +7 -0
- package/dist/cli/wirings/provide-file-system.mjs.map +1 -0
- package/dist/cli/wirings/snapshot.mjs +177 -0
- package/dist/cli/wirings/snapshot.mjs.map +1 -0
- package/dist/cli/wirings/up.mjs +287 -0
- package/dist/cli/wirings/up.mjs.map +1 -0
- package/dist/cli/wirings/wipe.mjs +40 -0
- package/dist/cli/wirings/wipe.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +0 -2
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +26 -1
- package/dist/contracts/faucet-strategy.d.mts +25 -0
- package/dist/contracts/funding-strategy.d.mts +42 -0
- package/dist/contracts/plugin-expander.mjs +60 -0
- package/dist/contracts/plugin-expander.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +5 -3
- package/dist/contracts/renderer.d.mts +23 -0
- package/dist/contracts/routable.d.mts +14 -1
- package/dist/contracts/snapshotable.d.mts +25 -3
- package/dist/contracts/wallet-protocol.d.mts +52 -0
- package/dist/contracts/wallet-protocol.mjs +52 -0
- package/dist/contracts/wallet-protocol.mjs.map +1 -0
- package/dist/index.d.mts +26 -25
- package/dist/index.mjs +20 -13
- package/dist/{runtime → orchestrators}/built-in-plugin-layers.mjs +10 -5
- package/dist/orchestrators/built-in-plugin-layers.mjs.map +1 -0
- package/dist/orchestrators/codegen/bindings.d.mts +1 -2
- package/dist/orchestrators/codegen/bindings.mjs +52 -186
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
- package/dist/orchestrators/codegen/emit.mjs +19 -1
- package/dist/orchestrators/codegen/emit.mjs.map +1 -1
- package/dist/orchestrators/codegen/errors.mjs +8 -3
- package/dist/orchestrators/codegen/errors.mjs.map +1 -1
- package/dist/orchestrators/codegen/format.mjs +47 -39
- package/dist/orchestrators/codegen/format.mjs.map +1 -1
- package/dist/orchestrators/codegen/gitignore.mjs +3 -1
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
- package/dist/orchestrators/codegen/output-location.mjs +40 -0
- package/dist/orchestrators/codegen/output-location.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -1
- package/dist/orchestrators/codegen/paths.mjs +40 -14
- package/dist/orchestrators/codegen/paths.mjs.map +1 -1
- package/dist/orchestrators/codegen/permissions.mjs +3 -1
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
- package/dist/orchestrators/codegen/service.mjs +157 -105
- package/dist/orchestrators/codegen/service.mjs.map +1 -1
- package/dist/orchestrators/lifecycle-prune/errors.mjs +31 -0
- package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs +350 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +26 -27
- package/dist/orchestrators/router/cleanup.mjs.map +1 -1
- package/dist/orchestrators/router/entrypoints.mjs +2 -2
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
- package/dist/orchestrators/router/file-provider.mjs +14 -5
- package/dist/orchestrators/router/file-provider.mjs.map +1 -1
- package/dist/orchestrators/router/hostname.mjs +19 -55
- package/dist/orchestrators/router/hostname.mjs.map +1 -1
- package/dist/orchestrators/router/index.mjs +11 -0
- package/dist/orchestrators/router/profile.mjs +2 -2
- package/dist/orchestrators/router/sentinels.mjs +26 -0
- package/dist/orchestrators/router/sentinels.mjs.map +1 -0
- package/dist/orchestrators/router/service.mjs +40 -37
- package/dist/orchestrators/router/service.mjs.map +1 -1
- package/dist/orchestrators/router/traefik-container.mjs +27 -16
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
- package/dist/{substrate/runtime → orchestrators}/run.mjs +26 -21
- package/dist/orchestrators/run.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +1 -1
- package/dist/orchestrators/runtime-composition.mjs +123 -39
- package/dist/orchestrators/runtime-composition.mjs.map +1 -1
- package/dist/orchestrators/snapshot/capture-command.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture-command.mjs +25 -0
- package/dist/orchestrators/snapshot/capture-command.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +42 -28
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
- package/dist/orchestrators/snapshot/descriptor.mjs +35 -10
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
- package/dist/orchestrators/snapshot/identity-guard.mjs +1 -1
- package/dist/orchestrators/snapshot/index.mjs +13 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -1
- package/dist/orchestrators/snapshot/integrity.mjs +73 -17
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
- package/dist/orchestrators/snapshot/pending-marker.d.mts +1 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs +99 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs.map +1 -0
- package/dist/orchestrators/snapshot/phase-error.mjs +23 -0
- package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +20 -55
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
- package/dist/orchestrators/snapshot/recover-pending.d.mts +1 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs +223 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +118 -84
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
- package/dist/orchestrators/snapshot/service.mjs +53 -56
- package/dist/orchestrators/snapshot/service.mjs.map +1 -1
- package/dist/orchestrators/snapshot/state-document.d.mts +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +47 -7
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -1
- package/dist/orchestrators/snapshot/wipe.mjs +67 -10
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
- package/dist/plugins/account/codegen.mjs +9 -8
- package/dist/plugins/account/codegen.mjs.map +1 -1
- package/dist/plugins/account/errors.d.mts +33 -6
- package/dist/plugins/account/errors.mjs.map +1 -1
- package/dist/plugins/account/funding.d.mts +29 -19
- package/dist/plugins/account/funding.mjs +84 -66
- package/dist/plugins/account/funding.mjs.map +1 -1
- package/dist/plugins/account/index.d.mts +2 -4
- package/dist/plugins/account/index.mjs +64 -31
- package/dist/plugins/account/index.mjs.map +1 -1
- package/dist/plugins/account/keypair.mjs +6 -9
- package/dist/plugins/account/keypair.mjs.map +1 -1
- package/dist/plugins/account/lease.mjs +1 -0
- package/dist/plugins/account/lease.mjs.map +1 -1
- package/dist/plugins/account/registry.d.mts +14 -1
- package/dist/plugins/account/registry.mjs +18 -18
- package/dist/plugins/account/registry.mjs.map +1 -1
- package/dist/plugins/account/service.d.mts +23 -4
- package/dist/plugins/account/service.mjs +83 -45
- package/dist/plugins/account/service.mjs.map +1 -1
- package/dist/plugins/account/snapshot.mjs +2 -5
- package/dist/plugins/account/snapshot.mjs.map +1 -1
- package/dist/plugins/account/spans.mjs +16 -0
- package/dist/plugins/account/spans.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +6 -8
- package/dist/plugins/account/variants/keystore.mjs.map +1 -1
- package/dist/plugins/action/build-context.d.mts +3 -2
- package/dist/plugins/action/errors.d.mts +16 -12
- package/dist/plugins/action/errors.mjs.map +1 -1
- package/dist/plugins/action/execute.mjs +65 -103
- package/dist/plugins/action/execute.mjs.map +1 -1
- package/dist/plugins/action/index.d.mts +0 -2
- package/dist/plugins/action/index.mjs +17 -13
- package/dist/plugins/action/index.mjs.map +1 -1
- package/dist/plugins/action/service.mjs +38 -35
- package/dist/plugins/action/service.mjs.map +1 -1
- package/dist/plugins/action/spans.mjs +11 -0
- package/dist/plugins/action/spans.mjs.map +1 -0
- package/dist/plugins/coin/codegen.mjs +9 -8
- package/dist/plugins/coin/codegen.mjs.map +1 -1
- package/dist/plugins/coin/discovery.mjs +8 -4
- package/dist/plugins/coin/discovery.mjs.map +1 -1
- package/dist/plugins/coin/index.d.mts +11 -29
- package/dist/plugins/coin/index.mjs +56 -27
- package/dist/plugins/coin/index.mjs.map +1 -1
- package/dist/plugins/coin/metadata.mjs +8 -15
- package/dist/plugins/coin/metadata.mjs.map +1 -1
- package/dist/plugins/coin/mint.d.mts +30 -11
- package/dist/plugins/coin/mint.mjs +78 -74
- package/dist/plugins/coin/mint.mjs.map +1 -1
- package/dist/plugins/coin/registry.mjs +4 -7
- package/dist/plugins/coin/registry.mjs.map +1 -1
- package/dist/plugins/coin/service.d.mts +39 -1
- package/dist/plugins/coin/service.mjs +11 -4
- package/dist/plugins/coin/service.mjs.map +1 -1
- package/dist/plugins/coin/spans.mjs +20 -0
- package/dist/plugins/coin/spans.mjs.map +1 -0
- package/dist/plugins/dashboard/domain.mjs +402 -0
- package/dist/plugins/dashboard/domain.mjs.map +1 -0
- package/dist/plugins/dashboard/index.d.mts +29 -0
- package/dist/plugins/dashboard/index.mjs +91 -0
- package/dist/plugins/dashboard/index.mjs.map +1 -0
- package/dist/plugins/dashboard/origin-policy.mjs +36 -0
- package/dist/plugins/dashboard/origin-policy.mjs.map +1 -0
- package/dist/plugins/dashboard/routable.mjs +27 -0
- package/dist/plugins/dashboard/routable.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/builder.mjs +21 -0
- package/dist/plugins/dashboard/schema/builder.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/enums.mjs +72 -0
- package/dist/plugins/dashboard/schema/enums.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/root.mjs +351 -0
- package/dist/plugins/dashboard/schema/root.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/types.mjs +508 -0
- package/dist/plugins/dashboard/schema/types.mjs.map +1 -0
- package/dist/plugins/dashboard/schema.mjs +11 -0
- package/dist/plugins/dashboard/schema.mjs.map +1 -0
- package/dist/plugins/dashboard/server.mjs +166 -0
- package/dist/plugins/dashboard/server.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +53 -115
- package/dist/plugins/deepbook/deploy.mjs.map +1 -1
- package/dist/plugins/deepbook/errors.mjs +1 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -1
- package/dist/plugins/deepbook/faucet-strategy.mjs +47 -34
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/deepbook/hash.mjs +9 -0
- package/dist/plugins/deepbook/hash.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +1 -10
- package/dist/plugins/deepbook/index.mjs +25 -22
- package/dist/plugins/deepbook/index.mjs.map +1 -1
- package/dist/plugins/deepbook/pyth/index.mjs +26 -55
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
- package/dist/plugins/deepbook/snapshot.mjs +17 -29
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
- package/dist/plugins/deepbook/spans.mjs +18 -0
- package/dist/plugins/deepbook/spans.mjs.map +1 -0
- package/dist/plugins/deepbook/type-strings.mjs +65 -0
- package/dist/plugins/deepbook/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +2 -3
- package/dist/plugins/deepbook/types.mjs.map +1 -1
- package/dist/plugins/faucet/dispatcher.d.mts +21 -2
- package/dist/plugins/faucet/dispatcher.mjs +1 -2
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
- package/dist/plugins/faucet/errors.d.mts +11 -24
- package/dist/plugins/faucet/errors.mjs.map +1 -1
- package/dist/plugins/faucet/http.mjs +33 -14
- package/dist/plugins/faucet/http.mjs.map +1 -1
- package/dist/plugins/faucet/index.d.mts +15 -5
- package/dist/plugins/faucet/index.mjs +3 -0
- package/dist/plugins/faucet/index.mjs.map +1 -1
- package/dist/plugins/faucet/spans.mjs +12 -0
- package/dist/plugins/faucet/spans.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +1 -1
- package/dist/plugins/host-service/index.mjs +34 -8
- package/dist/plugins/host-service/index.mjs.map +1 -1
- package/dist/plugins/host-service/routable.mjs +2 -1
- package/dist/plugins/host-service/routable.mjs.map +1 -1
- package/dist/plugins/host-service/service.d.mts +21 -0
- package/dist/plugins/host-service/service.mjs +136 -81
- package/dist/plugins/host-service/service.mjs.map +1 -1
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs +23 -0
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -0
- package/dist/plugins/internal/codegen-helpers.mjs +18 -0
- package/dist/plugins/internal/codegen-helpers.mjs.map +1 -0
- package/dist/plugins/internal/funding-failure-error.mjs +32 -0
- package/dist/plugins/internal/funding-failure-error.mjs.map +1 -0
- package/dist/plugins/package/build.mjs +1 -1
- package/dist/plugins/package/build.mjs.map +1 -1
- package/dist/plugins/package/codegen.mjs +26 -0
- package/dist/plugins/package/codegen.mjs.map +1 -1
- package/dist/plugins/package/errors.d.mts +16 -6
- package/dist/plugins/package/errors.mjs.map +1 -1
- package/dist/plugins/package/index.d.mts +0 -4
- package/dist/plugins/package/index.mjs +27 -21
- package/dist/plugins/package/index.mjs.map +1 -1
- package/dist/plugins/package/mode-known.mjs +26 -12
- package/dist/plugins/package/mode-known.mjs.map +1 -1
- package/dist/plugins/package/mode-local.mjs +47 -41
- package/dist/plugins/package/mode-local.mjs.map +1 -1
- package/dist/plugins/package/publish-executor.mjs +55 -114
- package/dist/plugins/package/publish-executor.mjs.map +1 -1
- package/dist/plugins/package/registry.mjs +2 -1
- package/dist/plugins/package/registry.mjs.map +1 -1
- package/dist/plugins/package/service.mjs.map +1 -1
- package/dist/plugins/package/spans.mjs +14 -0
- package/dist/plugins/package/spans.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +19 -12
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -1
- package/dist/plugins/postgres/errors.d.mts +5 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -1
- package/dist/plugins/postgres/index.mjs +10 -17
- package/dist/plugins/postgres/index.mjs.map +1 -1
- package/dist/plugins/postgres/service.mjs +58 -24
- package/dist/plugins/postgres/service.mjs.map +1 -1
- package/dist/plugins/postgres/snapshot.mjs.map +1 -1
- package/dist/plugins/postgres/spans.mjs +11 -0
- package/dist/plugins/postgres/spans.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +4 -4
- package/dist/plugins/router-entrypoints.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +15 -13
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +15 -19
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
- package/dist/plugins/seal/codegen.d.mts +2 -3
- package/dist/plugins/seal/codegen.mjs.map +1 -1
- package/dist/plugins/seal/config-render.mjs +35 -8
- package/dist/plugins/seal/config-render.mjs.map +1 -1
- package/dist/plugins/seal/deploy.mjs +31 -39
- package/dist/plugins/seal/deploy.mjs.map +1 -1
- package/dist/plugins/seal/errors.d.mts +1 -3
- package/dist/plugins/seal/errors.mjs +7 -1
- package/dist/plugins/seal/errors.mjs.map +1 -1
- package/dist/plugins/seal/index.d.mts +1 -6
- package/dist/plugins/seal/index.mjs +40 -14
- package/dist/plugins/seal/index.mjs.map +1 -1
- package/dist/plugins/seal/key-manager.d.mts +1 -9
- package/dist/plugins/seal/key-manager.mjs +2 -18
- package/dist/plugins/seal/key-manager.mjs.map +1 -1
- package/dist/plugins/seal/key-server.mjs +37 -36
- package/dist/plugins/seal/key-server.mjs.map +1 -1
- package/dist/plugins/seal/keygen.mjs +16 -17
- package/dist/plugins/seal/keygen.mjs.map +1 -1
- package/dist/plugins/seal/mode/fork-known.mjs +36 -14
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
- package/dist/plugins/seal/mode/live.d.mts +6 -4
- package/dist/plugins/seal/mode/live.mjs +14 -21
- package/dist/plugins/seal/mode/live.mjs.map +1 -1
- package/dist/plugins/seal/mode/local-keygen.mjs +57 -21
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
- package/dist/plugins/seal/registry-publish.mjs +1 -0
- 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/spans.mjs +18 -0
- package/dist/plugins/seal/spans.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +17 -23
- package/dist/plugins/sui/auto-tick.mjs.map +1 -1
- package/dist/plugins/sui/chain-build-container.mjs +18 -0
- package/dist/plugins/sui/chain-build-container.mjs.map +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +5 -5
- package/dist/plugins/sui/chain-probe.mjs +28 -58
- package/dist/plugins/sui/chain-probe.mjs.map +1 -1
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -1
- package/dist/plugins/sui/errors.d.mts +2 -29
- package/dist/plugins/sui/errors.mjs +1 -3
- package/dist/plugins/sui/errors.mjs.map +1 -1
- package/dist/plugins/sui/fork-faucet-strategy.d.mts +1 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs +55 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.d.mts +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +170 -2
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
- package/dist/plugins/sui/fork-transaction.d.mts +2 -0
- package/dist/plugins/sui/fork-transaction.mjs +92 -28
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
- package/dist/plugins/sui/index.d.mts +33 -70
- package/dist/plugins/sui/index.mjs +58 -35
- package/dist/plugins/sui/index.mjs.map +1 -1
- package/dist/plugins/{faucet/strategies/sui-local.mjs → sui/local-faucet-strategy.mjs} +10 -7
- package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +7 -13
- package/dist/plugins/sui/mode/external.mjs.map +1 -1
- package/dist/plugins/sui/mode/fork.mjs +136 -59
- package/dist/plugins/sui/mode/fork.mjs.map +1 -1
- package/dist/plugins/sui/mode/live.mjs +10 -16
- package/dist/plugins/sui/mode/live.mjs.map +1 -1
- package/dist/plugins/sui/mode/local.mjs +37 -36
- package/dist/plugins/sui/mode/local.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared-boot.mjs +38 -115
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared.d.mts +1 -5
- package/dist/plugins/sui/mode/shared.mjs.map +1 -1
- package/dist/plugins/sui/mode/spec.d.mts +18 -0
- package/dist/plugins/sui/move-summary-runner.mjs +207 -0
- package/dist/plugins/sui/move-summary-runner.mjs.map +1 -0
- package/dist/plugins/sui/network-resolver.d.mts +4 -3
- package/dist/plugins/sui/service.mjs.map +1 -1
- package/dist/plugins/sui/snapshot.mjs +3 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -1
- package/dist/plugins/sui/spans.mjs +17 -0
- package/dist/plugins/sui/spans.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +0 -1
- package/dist/plugins/wallet/codegen.mjs +8 -9
- package/dist/plugins/wallet/codegen.mjs.map +1 -1
- package/dist/plugins/wallet/index.d.mts +6 -8
- package/dist/plugins/wallet/index.mjs +46 -35
- package/dist/plugins/wallet/index.mjs.map +1 -1
- package/dist/plugins/wallet/origin-policy.mjs +12 -28
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
- package/dist/plugins/wallet/pairing.mjs +6 -4
- package/dist/plugins/wallet/pairing.mjs.map +1 -1
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +5 -44
- package/dist/plugins/wallet/protocol.mjs.map +1 -1
- package/dist/plugins/wallet/routable.mjs +2 -8
- package/dist/plugins/wallet/routable.mjs.map +1 -1
- package/dist/plugins/wallet/server.mjs +36 -44
- package/dist/plugins/wallet/server.mjs.map +1 -1
- package/dist/plugins/wallet/service.d.mts +1 -5
- package/dist/plugins/wallet/service.mjs +22 -18
- package/dist/plugins/wallet/service.mjs.map +1 -1
- package/dist/plugins/wallet/spans.mjs +22 -0
- package/dist/plugins/wallet/spans.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +33 -8
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/walrus/codegen.d.mts +3 -3
- package/dist/plugins/walrus/codegen.mjs.map +1 -1
- package/dist/plugins/walrus/deploy-paths.mjs +21 -5
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
- package/dist/plugins/walrus/deploy.mjs +67 -69
- package/dist/plugins/walrus/deploy.mjs.map +1 -1
- package/dist/plugins/walrus/errors.mjs +1 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -1
- package/dist/plugins/walrus/faucet-strategy.mjs +12 -7
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/walrus/index.d.mts +2 -13
- package/dist/plugins/walrus/index.mjs +18 -23
- package/dist/plugins/walrus/index.mjs.map +1 -1
- package/dist/plugins/walrus/mode/known-deploy.mjs +7 -5
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
- package/dist/plugins/walrus/mode/local-cluster.mjs +26 -7
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
- package/dist/plugins/walrus/routable.mjs +7 -23
- package/dist/plugins/walrus/routable.mjs.map +1 -1
- package/dist/plugins/walrus/service.mjs.map +1 -1
- package/dist/plugins/walrus/spans.mjs +18 -0
- package/dist/plugins/walrus/spans.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +6 -2
- package/dist/plugins/walrus/storage-nodes.mjs +15 -8
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
- package/dist/plugins/walrus/wal-swap.mjs +58 -15
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
- package/dist/primitives/artifact-publisher.d.mts +1 -1
- package/dist/primitives/artifact-publisher.mjs +15 -0
- package/dist/primitives/artifact-publisher.mjs.map +1 -0
- package/dist/runtime/docker/client.mjs +17 -4
- package/dist/runtime/docker/client.mjs.map +1 -1
- package/dist/runtime/docker/container.mjs +219 -132
- package/dist/runtime/docker/container.mjs.map +1 -1
- package/dist/runtime/docker/errors.mjs +0 -6
- package/dist/runtime/docker/errors.mjs.map +1 -1
- package/dist/runtime/docker/exec.mjs +21 -18
- package/dist/runtime/docker/exec.mjs.map +1 -1
- package/dist/runtime/docker/image.mjs +36 -13
- package/dist/runtime/docker/image.mjs.map +1 -1
- package/dist/runtime/docker/index.mjs +14 -0
- package/dist/runtime/docker/inspect-and-decode.mjs +51 -0
- package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -0
- package/dist/runtime/docker/inventory.mjs +14 -11
- package/dist/runtime/docker/inventory.mjs.map +1 -1
- package/dist/runtime/docker/labels.mjs +38 -5
- package/dist/runtime/docker/labels.mjs.map +1 -1
- package/dist/runtime/docker/logs.d.mts +1 -1
- package/dist/runtime/docker/logs.mjs.map +1 -1
- package/dist/runtime/docker/network.mjs +83 -47
- package/dist/runtime/docker/network.mjs.map +1 -1
- package/dist/runtime/docker/render-run-args.mjs +82 -0
- package/dist/runtime/docker/render-run-args.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +1 -1
- package/dist/runtime/docker/service.mjs +12 -7
- package/dist/runtime/docker/service.mjs.map +1 -1
- package/dist/runtime/docker/sweep.mjs +118 -43
- package/dist/runtime/docker/sweep.mjs.map +1 -1
- package/dist/runtime/docker/volume.mjs +2 -0
- package/dist/runtime/docker/volume.mjs.map +1 -1
- package/dist/runtime/docker/wrap.mjs +30 -1
- package/dist/runtime/docker/wrap.mjs.map +1 -1
- package/dist/substrate/cross-process.mjs +14 -8
- package/dist/substrate/cross-process.mjs.map +1 -1
- package/dist/substrate/event-time.mjs +33 -0
- package/dist/substrate/event-time.mjs.map +1 -0
- package/dist/substrate/events.d.mts +28 -8
- package/dist/substrate/identity.d.mts +2 -1
- package/dist/substrate/manifest.d.mts +68 -5
- package/dist/substrate/manifest.mjs +34 -5
- package/dist/substrate/manifest.mjs.map +1 -1
- package/dist/substrate/network.d.mts +3 -5
- package/dist/substrate/options.d.mts +0 -2
- package/dist/substrate/plugin.d.mts +13 -0
- package/dist/substrate/plugin.mjs +4 -2
- package/dist/substrate/plugin.mjs.map +1 -1
- package/dist/substrate/projection.d.mts +35 -3
- package/dist/substrate/runtime/artifact-publisher/index.mjs +19 -9
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -1
- package/dist/substrate/runtime/atomic-write.mjs +97 -32
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
- package/dist/substrate/runtime/cache/index.mjs +3 -0
- package/dist/substrate/runtime/cache/schema.mjs +2 -2
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
- package/dist/substrate/runtime/cache/service.mjs +9 -7
- package/dist/substrate/runtime/cache/service.mjs.map +1 -1
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -1
- package/dist/substrate/runtime/capability-sinks/index.mjs +3 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +1 -1
- package/dist/substrate/runtime/capability-sinks/service.d.mts +61 -2
- package/dist/substrate/runtime/capability-sinks/service.mjs +21 -26
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -1
- package/dist/substrate/runtime/config-validation.d.mts +1 -13
- package/dist/substrate/runtime/config-validation.mjs +2 -91
- package/dist/substrate/runtime/config-validation.mjs.map +1 -1
- package/dist/substrate/runtime/container-runtime.d.mts +1 -0
- package/dist/substrate/runtime/container-runtime.mjs +2 -0
- package/dist/substrate/runtime/control-plane/domain.mjs +101 -0
- package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -0
- package/dist/substrate/runtime/control-plane/service.mjs +7 -0
- package/dist/substrate/runtime/control-plane/service.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +46 -19
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +30 -12
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/index.mjs +5 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +11 -2
- 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 +1 -1
- package/dist/substrate/runtime/cross-process/index.mjs +11 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs +34 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +52 -10
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/lock.mjs +23 -0
- package/dist/substrate/runtime/cross-process/lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +64 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +97 -83
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/self-pid.mjs +8 -0
- package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +24 -28
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +41 -20
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
- package/dist/substrate/runtime/current-plugin.mjs +2 -2
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
- package/dist/substrate/runtime/errors.mjs +12 -6
- package/dist/substrate/runtime/errors.mjs.map +1 -1
- package/dist/substrate/runtime/format-unknown-error.mjs +30 -0
- package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs +10 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -0
- package/dist/substrate/runtime/host-gateway.mjs +20 -0
- package/dist/substrate/runtime/host-gateway.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +61 -50
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
- package/dist/substrate/runtime/http-probe.d.mts +1 -1
- package/dist/substrate/runtime/index.mjs +14 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -1
- package/dist/substrate/runtime/lease-broker/index.mjs +2 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +1 -64
- package/dist/substrate/runtime/lease-broker/service.mjs +1 -1
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +22 -3
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/index.mjs +9 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +20 -3
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs +5 -5
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +1 -1
- package/dist/substrate/runtime/managed-container.d.mts +19 -1
- package/dist/substrate/runtime/managed-container.mjs +20 -1
- package/dist/substrate/runtime/managed-container.mjs.map +1 -1
- package/dist/substrate/runtime/manifest/index.mjs +3 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +15 -11
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
- package/dist/substrate/runtime/mode-errors.mjs +20 -0
- package/dist/substrate/runtime/mode-errors.mjs.map +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +9 -13
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
- package/dist/substrate/runtime/observability/formatter-registry.mjs +19 -36
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -1
- package/dist/substrate/runtime/observability/ignore-with-log.d.mts +1 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs +17 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +1 -1
- package/dist/substrate/runtime/observability/index.mjs +13 -0
- package/dist/substrate/runtime/observability/log-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/log-store.mjs +175 -0
- package/dist/substrate/runtime/observability/log-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/logger.d.mts +2 -1
- package/dist/substrate/runtime/observability/logger.mjs +5 -9
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
- package/dist/substrate/runtime/observability/output-truncate.mjs +35 -0
- package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +9 -12
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
- package/dist/substrate/runtime/observability/redaction.d.mts +2 -13
- package/dist/substrate/runtime/observability/redaction.mjs +8 -14
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
- package/dist/substrate/runtime/observability/span-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/span-store.mjs +110 -0
- package/dist/substrate/runtime/observability/span-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +14 -14
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -1
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +1 -1
- package/dist/substrate/runtime/passthrough-or-wrap.mjs +33 -0
- package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +1 -1
- package/dist/substrate/runtime/paths.mjs +4 -3
- package/dist/substrate/runtime/paths.mjs.map +1 -1
- package/dist/substrate/runtime/phase-preserving-produce.mjs +40 -0
- package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.mjs +3 -0
- package/dist/substrate/runtime/port-broker/service.mjs +170 -126
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/probes.d.mts +7 -5
- package/dist/substrate/runtime/probes.mjs +3 -1
- package/dist/substrate/runtime/probes.mjs.map +1 -1
- package/dist/substrate/runtime/projection/index.mjs +4 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +1 -2
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
- package/dist/substrate/runtime/projection/persisted.mjs +33 -15
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -1
- package/dist/substrate/runtime/projection/state-ref.mjs +26 -2
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
- package/dist/substrate/runtime/projection/update.mjs +88 -24
- package/dist/substrate/runtime/projection/update.mjs.map +1 -1
- package/dist/substrate/runtime/random-suffix.mjs +11 -0
- package/dist/substrate/runtime/random-suffix.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +59 -1
- package/dist/substrate/runtime/retry-policy.mjs +66 -1
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
- package/dist/substrate/runtime/routed-url.d.mts +1 -0
- package/dist/substrate/runtime/routed-url.mjs +79 -0
- package/dist/substrate/runtime/routed-url.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +1 -1
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-http-server.mjs +2 -3
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-multimap/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs +52 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +2 -2
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -1
- package/dist/substrate/runtime/stage-and-swap/index.mjs +72 -4
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/index.d.mts +1 -0
- package/dist/substrate/runtime/state-store/index.mjs +3 -0
- package/dist/substrate/runtime/state-store/schema.d.mts +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +19 -14
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/service.d.mts +1 -0
- package/dist/substrate/runtime/state-store/service.mjs +145 -0
- package/dist/substrate/runtime/state-store/service.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs +33 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/index.mjs +4 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +19 -33
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
- package/dist/substrate/runtime/subnet-broker.mjs +60 -0
- package/dist/substrate/runtime/subnet-broker.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +21 -1
- package/dist/substrate/runtime/sui-execute/index.mjs +84 -20
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -1
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.d.mts +1 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs +32 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +1 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs +32 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +93 -19
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/acquire-node.mjs +181 -0
- package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs +144 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs +68 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +151 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/errors.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/errors.mjs +9 -0
- package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/index.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/index.mjs +3 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs +51 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs +250 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/state.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/state.mjs +22 -0
- package/dist/substrate/runtime/supervisor/state.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs +57 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/types.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs +133 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -0
- package/dist/substrate/runtime/typed-env.mjs +8 -0
- package/dist/substrate/runtime/typed-env.mjs.map +1 -0
- package/dist/substrate/state-store.d.mts +1 -0
- package/dist/substrate/versioned-doc-schema.mjs +17 -0
- package/dist/substrate/versioned-doc-schema.mjs.map +1 -0
- package/dist/substrate/versioned-doc-sync.mjs +94 -0
- package/dist/substrate/versioned-doc-sync.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -1
- package/dist/surfaces/cli/commands/index.mjs +9 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs +13 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +3 -2
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune.mjs +34 -17
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
- package/dist/surfaces/cli/commands/status.mjs +2 -2
- package/dist/surfaces/cli/commands/status.mjs.map +1 -1
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +5 -3
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
- package/dist/surfaces/cli/commands/wipe.mjs +38 -4
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
- package/dist/surfaces/cli/errors.mjs +1 -1
- package/dist/surfaces/cli/errors.mjs.map +1 -1
- package/dist/surfaces/cli/flags.mjs +0 -1
- package/dist/surfaces/cli/flags.mjs.map +1 -1
- package/dist/surfaces/cli/index.mjs +98 -18
- package/dist/surfaces/cli/index.mjs.map +1 -1
- package/dist/surfaces/cli/output.mjs +1 -0
- package/dist/surfaces/cli/output.mjs.map +1 -1
- package/dist/surfaces/cli/sysexits.mjs +2 -1
- package/dist/surfaces/cli/sysexits.mjs.map +1 -1
- package/dist/surfaces/tui/app.mjs +25 -3
- package/dist/surfaces/tui/app.mjs.map +1 -1
- package/dist/surfaces/tui/display-derivation.mjs +23 -74
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
- package/dist/surfaces/tui/event-log.mjs +35 -23
- package/dist/surfaces/tui/event-log.mjs.map +1 -1
- package/dist/surfaces/tui/input.mjs +5 -1
- package/dist/surfaces/tui/input.mjs.map +1 -1
- package/dist/surfaces/tui/plain-renderer.mjs +70 -34
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
- package/package.json +24 -4
- package/dist/contracts/liveness-classifier.d.mts +0 -19
- package/dist/contracts/network-resolver.d.mts +0 -15
- package/dist/contracts/network-resolver.mjs +0 -7
- package/dist/contracts/network-resolver.mjs.map +0 -1
- package/dist/orchestrators/codegen/extras.mjs +0 -16
- package/dist/orchestrators/codegen/extras.mjs.map +0 -1
- package/dist/plugins/deepbook/routable.mjs +0 -21
- package/dist/plugins/deepbook/routable.mjs.map +0 -1
- package/dist/plugins/faucet/service.d.mts +0 -20
- package/dist/plugins/faucet/strategies/sui-local.d.mts +0 -23
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +0 -1
- package/dist/plugins/sui/seed-objects.d.mts +0 -18
- package/dist/plugins/sui/seed-objects.mjs +0 -25
- package/dist/plugins/sui/seed-objects.mjs.map +0 -1
- package/dist/runtime/built-in-plugin-layers.mjs.map +0 -1
- package/dist/substrate/runtime/context-helpers.mjs +0 -32
- package/dist/substrate/runtime/context-helpers.mjs.map +0 -1
- package/dist/substrate/runtime/run.mjs.map +0 -1
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +0 -30
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +0 -1
- package/dist/substrate/runtime/supervisor.d.mts +0 -1
- package/dist/substrate/runtime/supervisor.mjs +0 -831
- package/dist/substrate/runtime/supervisor.mjs.map +0 -1
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +0 -1
- /package/dist/{substrate/runtime/strategy-registry/faucet-capability-for.d.mts → plugins/faucet/http.d.mts} +0 -0
|
@@ -1,11 +1,12 @@
|
|
|
1
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
2
|
import { addClaim, removeClaim } from "../../substrate/runtime/cross-process/roster.mjs";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
3
|
+
import { dockerRun, dockerRunOk } from "./client.mjs";
|
|
4
|
+
import { ContainerCreateFailed, ContainerNameCollisionUnrecoverable, DaemonUnreachable, ForeignDockerResource, RecreateRefused } from "./errors.mjs";
|
|
7
5
|
import { classifyExit, isDaemonUnreachableStderr, isNameCollisionStderr, isNoSuchContainerStderr, wrapCreateError, wrapGeneric } from "./wrap.mjs";
|
|
6
|
+
import { dockerInspectAndDecode } from "./inspect-and-decode.mjs";
|
|
7
|
+
import { LabelKey, expectedContainerOwnershipLabels, ownershipMismatchDetail, readLabels, renderContainerLabels } from "./labels.mjs";
|
|
8
8
|
import { connect, readIps, waitForIp } from "./network.mjs";
|
|
9
|
+
import { renderCreateArgs } from "./render-run-args.mjs";
|
|
9
10
|
import { Deferred, Effect, Ref, Schema } from "effect";
|
|
10
11
|
//#region src/runtime/docker/container.ts
|
|
11
12
|
/** Pure decision: given the inspect facts (or null = missing), the
|
|
@@ -13,11 +14,11 @@ import { Deferred, Effect, Ref, Schema } from "effect";
|
|
|
13
14
|
* do we take?
|
|
14
15
|
*
|
|
15
16
|
* Tested directly without the subprocess seam. */
|
|
16
|
-
const decideRunAction = (facts, desiredImage, policy, desiredPortBindings = [], portBindingReconciliation = "exact", desiredConfigHash, desiredImageDigest) => {
|
|
17
|
+
const decideRunAction = (facts, desiredImage, policy, desiredPortBindings = [], portBindingReconciliation = "exact", desiredConfigHash, desiredImageDigest, desiredNetworkAttachments = []) => {
|
|
17
18
|
if (facts === null) return { kind: "fresh" };
|
|
18
19
|
const imageMatches = facts.image === desiredImage || desiredImageDigest !== void 0 && (facts.image === desiredImageDigest || facts.imageDigest === desiredImageDigest);
|
|
19
20
|
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
|
+
const configMatches = desiredNetworkAttachmentsCompatible(facts.networkAttachments ?? [], desiredNetworkAttachments) && (desiredConfigHash === void 0 || facts.labels?.[LabelKey.configHash] === desiredConfigHash);
|
|
21
22
|
if (facts.lifecycle.kind === "unknown") return routeRecreate({
|
|
22
23
|
kind: "recreate",
|
|
23
24
|
id: facts.id,
|
|
@@ -89,6 +90,17 @@ const sameBindingContainerPorts = (left, right) => {
|
|
|
89
90
|
};
|
|
90
91
|
const bindingContainerKey = (binding) => binding.split("=")[0] ?? binding;
|
|
91
92
|
const normalizeHostIp = (hostIp) => hostIp === void 0 || hostIp === "" ? "0.0.0.0" : hostIp;
|
|
93
|
+
const desiredNetworkAttachmentsCompatible = (actual, desired) => {
|
|
94
|
+
const actualByName = new Map(actual.map((network) => [network.name, network]));
|
|
95
|
+
return desired.every((entry, index) => {
|
|
96
|
+
const normalized = normalizeNetworkAttachment(entry);
|
|
97
|
+
const actualNetwork = actualByName.get(normalized.name);
|
|
98
|
+
if (actualNetwork === void 0) return index !== 0;
|
|
99
|
+
if (normalized.aliases === void 0 || normalized.aliases.length === 0) return true;
|
|
100
|
+
const actualAliases = new Set(actualNetwork.aliases);
|
|
101
|
+
return normalized.aliases.every((alias) => actualAliases.has(alias));
|
|
102
|
+
});
|
|
103
|
+
};
|
|
92
104
|
const readPublishedPorts = (raw) => {
|
|
93
105
|
if (raw === null || typeof raw !== "object") return [];
|
|
94
106
|
const out = [];
|
|
@@ -137,16 +149,20 @@ const readStringArray = (raw) => {
|
|
|
137
149
|
if (!Array.isArray(raw)) return [];
|
|
138
150
|
return raw.filter((value) => typeof value === "string");
|
|
139
151
|
};
|
|
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
152
|
const readNetworks = (raw) => {
|
|
147
153
|
if (raw === null || typeof raw !== "object") return [];
|
|
148
154
|
return Object.keys(raw).sort();
|
|
149
155
|
};
|
|
156
|
+
const readNetworkAttachments = (raw) => {
|
|
157
|
+
if (raw === null || typeof raw !== "object") return [];
|
|
158
|
+
return Object.entries(raw).map(([name, value]) => {
|
|
159
|
+
const aliases = value !== null && typeof value === "object" ? value.Aliases ?? [] : [];
|
|
160
|
+
return {
|
|
161
|
+
name,
|
|
162
|
+
aliases: Array.isArray(aliases) ? aliases.filter((alias) => typeof alias === "string").sort() : []
|
|
163
|
+
};
|
|
164
|
+
}).sort((a, b) => a.name.localeCompare(b.name));
|
|
165
|
+
};
|
|
150
166
|
const readLifecycleState = (state) => {
|
|
151
167
|
if (state === void 0) return { kind: "unknown" };
|
|
152
168
|
if (state.Paused) return {
|
|
@@ -183,82 +199,62 @@ const InspectSchema = Schema.Struct({
|
|
|
183
199
|
})
|
|
184
200
|
});
|
|
185
201
|
const inspectContainer = (name) => Effect.gen(function* () {
|
|
186
|
-
const
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
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
|
-
}
|
|
202
|
+
const decoded = yield* dockerInspectAndDecode({
|
|
203
|
+
resourceKind: "container",
|
|
204
|
+
name,
|
|
205
|
+
op: "docker.container.inspect",
|
|
206
|
+
inspectCommand: dockerRunOk("container", ["inspect", name]).pipe(Effect.mapError(wrapGeneric("docker.container.inspect"))),
|
|
207
|
+
schema: InspectSchema,
|
|
208
|
+
isMissingStderr: isNoSuchContainerStderr
|
|
209
|
+
});
|
|
210
|
+
if (decoded === null) return null;
|
|
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
|
+
const networkAttachments = readNetworkAttachments(decoded.NetworkSettings.Networks);
|
|
219
|
+
return {
|
|
220
|
+
id: decoded.Id,
|
|
221
|
+
lifecycle,
|
|
222
|
+
running: lifecycle.kind === "running" || lifecycle.kind === "paused",
|
|
223
|
+
paused: lifecycle.kind === "paused",
|
|
224
|
+
exitCode: lifecycle.kind === "unknown" ? null : lifecycle.exitCode,
|
|
225
|
+
image: decoded.Config.Image,
|
|
226
|
+
...decoded.Image !== void 0 ? { imageDigest: decoded.Image } : {},
|
|
227
|
+
mounts,
|
|
228
|
+
portBindings: canonicalPortBindings(ports),
|
|
229
|
+
ports,
|
|
230
|
+
effectivePortBindings: canonicalPortBindings(effectivePorts),
|
|
231
|
+
effectivePorts,
|
|
232
|
+
command,
|
|
233
|
+
labels,
|
|
234
|
+
networks,
|
|
235
|
+
networkAttachments
|
|
236
|
+
};
|
|
238
237
|
}).pipe(Effect.withSpan("runtime.docker.container.inspect"));
|
|
238
|
+
const normalizeNetworkAttachment = (entry) => typeof entry === "string" ? { name: entry } : entry.aliases === void 0 || entry.aliases.length === 0 ? { name: entry.name } : {
|
|
239
|
+
name: entry.name,
|
|
240
|
+
aliases: entry.aliases
|
|
241
|
+
};
|
|
239
242
|
const createArgv = (spec, cycle, imageRef) => {
|
|
240
|
-
const args = [
|
|
241
|
-
"-d",
|
|
242
|
-
"--name",
|
|
243
|
-
spec.name
|
|
244
|
-
];
|
|
245
243
|
const configLabels = spec.configHash === void 0 ? void 0 : { [LabelKey.configHash]: spec.configHash };
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
if (spec.command) args.push(...spec.command);
|
|
261
|
-
return args;
|
|
244
|
+
const labels = renderContainerLabels(spec.labels, cycle, configLabels);
|
|
245
|
+
const firstNetwork = spec.networkAttach && spec.networkAttach.length > 0 ? normalizeNetworkAttachment(spec.networkAttach[0]) : void 0;
|
|
246
|
+
return renderCreateArgs({
|
|
247
|
+
name: spec.name,
|
|
248
|
+
image: imageRef,
|
|
249
|
+
labels,
|
|
250
|
+
env: spec.env,
|
|
251
|
+
ports: spec.ports,
|
|
252
|
+
mounts: spec.mounts,
|
|
253
|
+
network: firstNetwork,
|
|
254
|
+
addHosts: spec.extraHosts,
|
|
255
|
+
entrypoint: spec.entrypoint,
|
|
256
|
+
command: spec.command
|
|
257
|
+
});
|
|
262
258
|
};
|
|
263
259
|
const handleOf = (id, name, imageName, status, ips, ports, labels) => ({
|
|
264
260
|
id,
|
|
@@ -396,7 +392,10 @@ const stopWithGrace = (name, graceSeconds, signal) => Effect.gen(function* () {
|
|
|
396
392
|
if (signal !== void 0) args.push("--signal", signal);
|
|
397
393
|
args.push("--time", String(Math.max(0, Math.floor(graceSeconds))));
|
|
398
394
|
args.push(name);
|
|
399
|
-
yield* dockerRunOk("stop", args).pipe(Effect.
|
|
395
|
+
yield* dockerRunOk("stop", args).pipe(Effect.tapCause((cause) => Effect.logDebug("docker stop failed; container may already be gone", {
|
|
396
|
+
name,
|
|
397
|
+
cause
|
|
398
|
+
})), Effect.catch(() => Effect.void), Effect.asVoid);
|
|
400
399
|
});
|
|
401
400
|
/** Per-name lock acquire/release. The in-process serialization is the
|
|
402
401
|
* inspect→action window's invariant: two concurrent ensureContainer
|
|
@@ -426,15 +425,19 @@ const acquirePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
|
426
425
|
next.set(name, [...queue, waiter]);
|
|
427
426
|
return [false, next];
|
|
428
427
|
})) return;
|
|
429
|
-
yield* Deferred.await(waiter).pipe(Effect.onInterrupt(() =>
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
428
|
+
yield* Deferred.await(waiter).pipe(Effect.onInterrupt(() => Effect.gen(function* () {
|
|
429
|
+
if (yield* Ref.modify(lock, (m) => {
|
|
430
|
+
const queue = m.get(name);
|
|
431
|
+
if (queue === void 0) return [false, m];
|
|
432
|
+
const filtered = queue.filter((d) => d !== waiter);
|
|
433
|
+
if (filtered.length !== queue.length) {
|
|
434
|
+
const next = new Map(m);
|
|
435
|
+
next.set(name, filtered);
|
|
436
|
+
return [false, next];
|
|
437
|
+
}
|
|
438
|
+
return [true, m];
|
|
439
|
+
})) yield* releasePerNameLock(lock, name);
|
|
440
|
+
}).pipe(Effect.uninterruptible)));
|
|
438
441
|
});
|
|
439
442
|
const releasePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
440
443
|
const head = yield* Ref.modify(lock, (m) => {
|
|
@@ -451,6 +454,13 @@ const releasePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
|
451
454
|
});
|
|
452
455
|
if (head !== void 0) yield* Deferred.succeed(head, void 0);
|
|
453
456
|
});
|
|
457
|
+
/** Run `body` while holding the per-name lock for `name`. Wraps the
|
|
458
|
+
* `acquireUseRelease(acquire, use, release)` triple so every caller
|
|
459
|
+
* cannot accidentally forget the release on interrupt. The body is
|
|
460
|
+
* responsible for running uninterruptibly over the inspect→action
|
|
461
|
+
* window AND arming any stop-on-scope-close finalizer before this
|
|
462
|
+
* helper releases the lock. */
|
|
463
|
+
const withSerializedContainerOp = (name, lock, body) => Effect.acquireUseRelease(acquirePerNameLock(lock, name), () => body, () => releasePerNameLock(lock, name));
|
|
454
464
|
/** Idempotent ensure: apply the state machine, register a scope
|
|
455
465
|
* finalizer that stops the container + releases the cross-process
|
|
456
466
|
* claim.
|
|
@@ -458,44 +468,81 @@ const releasePerNameLock = (lock, name) => Effect.gen(function* () {
|
|
|
458
468
|
* Returns the running container handle (id + name + status + ips). */
|
|
459
469
|
const ensureContainer = (spec, deps) => Effect.gen(function* () {
|
|
460
470
|
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
471
|
const paths = yield* StackPathsService;
|
|
483
|
-
const
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
472
|
+
const mapSubstrateClaimError = (eff) => eff.pipe(Effect.catchTags({
|
|
473
|
+
RosterIoError: (cause) => Effect.fail(new DaemonUnreachable({
|
|
474
|
+
op: "cross-process.claim.roster-io",
|
|
475
|
+
detail: `roster IO failed at ${cause.path}`,
|
|
476
|
+
cause
|
|
477
|
+
})),
|
|
478
|
+
RosterCorruptError: (cause) => Effect.fail(new DaemonUnreachable({
|
|
479
|
+
op: "cross-process.claim.roster-corrupt",
|
|
480
|
+
detail: `roster ledger corrupt at ${cause.path}`,
|
|
481
|
+
cause
|
|
482
|
+
})),
|
|
483
|
+
StackLockTimeoutError: (cause) => Effect.fail(new DaemonUnreachable({
|
|
484
|
+
op: "cross-process.claim.stack-lock-timeout",
|
|
485
|
+
detail: `stack-lock acquire timed out after ${cause.waitedMillis}ms at ${cause.path}`,
|
|
486
|
+
cause
|
|
487
|
+
})),
|
|
488
|
+
StackLockIoError: (cause) => Effect.fail(new DaemonUnreachable({
|
|
489
|
+
op: "cross-process.claim.stack-lock-io",
|
|
490
|
+
detail: `stack-lock IO failed at ${cause.path}`,
|
|
491
|
+
cause
|
|
492
|
+
}))
|
|
493
|
+
}));
|
|
494
|
+
const registerStopFinalizer = (id) => Effect.addFinalizer(() => Effect.gen(function* () {
|
|
495
|
+
if ((yield* inspectContainer(spec.name).pipe(Effect.tapCause((cause) => Effect.logDebug("container inspect during scope-close failed", {
|
|
496
|
+
name: spec.name,
|
|
497
|
+
cause
|
|
498
|
+
})), Effect.catch(() => Effect.succeed(null))))?.id === id) yield* stopWithGrace(spec.name, spec.stopGraceSeconds ?? 10);
|
|
494
499
|
yield* removeClaim({
|
|
495
500
|
stackLockFile: paths.stackLockFile,
|
|
496
|
-
rosterFile: paths.rosterFile
|
|
497
|
-
|
|
501
|
+
rosterFile: paths.rosterFile,
|
|
502
|
+
containerClaimsFile: paths.containerClaimsFile
|
|
503
|
+
}, spec.name).pipe(Effect.tapCause((cause) => Effect.logDebug("removeClaim during scope-close failed", {
|
|
504
|
+
name: spec.name,
|
|
505
|
+
cause
|
|
506
|
+
})), Effect.catch(() => Effect.succeed({ lastClaimReleased: false })));
|
|
498
507
|
}).pipe(Effect.uninterruptible));
|
|
508
|
+
const { id, ips, ports } = yield* withSerializedContainerOp(spec.name, deps.perNameLock, Effect.uninterruptibleMask((restore) => Effect.gen(function* () {
|
|
509
|
+
const facts = yield* inspectContainer(spec.name);
|
|
510
|
+
if (facts !== null) yield* assertOwnedFacts(spec.name, facts, spec.labels);
|
|
511
|
+
const id = yield* ensureEffectivePublishedPorts(yield* applyAction(decideRunAction(facts, desiredImageRef, spec.recreate, canonicalPortBindings(spec.ports), spec.portBindingReconciliation ?? "exact", spec.configHash, spec.image.digest, spec.networkAttach), spec, deps), spec, deps);
|
|
512
|
+
yield* registerStopFinalizer(id);
|
|
513
|
+
const tail = yield* restore(Effect.gen(function* () {
|
|
514
|
+
yield* assertContainerHandleOwned({
|
|
515
|
+
id,
|
|
516
|
+
name: spec.name,
|
|
517
|
+
labels: spec.labels,
|
|
518
|
+
imageName: spec.image.tag ?? spec.image.digest,
|
|
519
|
+
status: "running",
|
|
520
|
+
ips: []
|
|
521
|
+
});
|
|
522
|
+
const secondaries = (spec.networkAttach ?? []).slice(1).map(normalizeNetworkAttachment);
|
|
523
|
+
for (const net of secondaries) {
|
|
524
|
+
yield* connect(spec.name, net.name, net.aliases);
|
|
525
|
+
yield* waitForIp(spec.name, net.name);
|
|
526
|
+
}
|
|
527
|
+
const ips = yield* readIps(spec.name);
|
|
528
|
+
const refreshedFacts = yield* inspectContainer(spec.name);
|
|
529
|
+
const ports = refreshedFacts?.effectivePorts ?? refreshedFacts?.ports ?? spec.ports;
|
|
530
|
+
yield* mapSubstrateClaimError(addClaim({
|
|
531
|
+
stackLockFile: paths.stackLockFile,
|
|
532
|
+
rosterFile: paths.rosterFile,
|
|
533
|
+
containerClaimsFile: paths.containerClaimsFile
|
|
534
|
+
}, spec.name));
|
|
535
|
+
return {
|
|
536
|
+
ips,
|
|
537
|
+
ports
|
|
538
|
+
};
|
|
539
|
+
}));
|
|
540
|
+
return {
|
|
541
|
+
id,
|
|
542
|
+
ips: tail.ips,
|
|
543
|
+
ports: tail.ports
|
|
544
|
+
};
|
|
545
|
+
})));
|
|
499
546
|
return handleOf(id, spec.name, spec.image.tag ?? spec.image.digest, "running", ips, ports, spec.labels);
|
|
500
547
|
}).pipe(Effect.withSpan("runtime.docker.container.ensure"));
|
|
501
548
|
/** Apply the decided action. Recovers from name-collision via
|
|
@@ -545,10 +592,50 @@ const pause = (name) => Effect.gen(function* () {
|
|
|
545
592
|
const unpause = (name) => Effect.gen(function* () {
|
|
546
593
|
yield* dockerRun("unpause", [name]).pipe(Effect.mapError(wrapGeneric("docker.unpause")));
|
|
547
594
|
}).pipe(Effect.withSpan("runtime.docker.container.unpause"));
|
|
595
|
+
/** Reserved `devstack.role` value stamped on every committed snapshot
|
|
596
|
+
* byproduct image. Plugin BUILD images carry the source plugin's real
|
|
597
|
+
* role (`db`, `validator`, …) or no role at all; committed snapshot
|
|
598
|
+
* images carry THIS sentinel instead. Snapshot prune scopes its image
|
|
599
|
+
* sweep to `{app, stack, role: SNAPSHOT_IMAGE_ROLE}` so it reaps the
|
|
600
|
+
* byproducts WITHOUT ever matching the live stack's build images.
|
|
601
|
+
*
|
|
602
|
+
* This is a label-value protocol token shared with the snapshot prune
|
|
603
|
+
* orchestrator (`orchestrators/snapshot/prune.ts`), which imports it. */
|
|
604
|
+
const SNAPSHOT_IMAGE_ROLE = "snapshot-image";
|
|
605
|
+
/** Render `{managed, app, stack, role}` ownership labels into
|
|
606
|
+
* `docker commit --change 'LABEL …'` argv. `docker commit` has no
|
|
607
|
+
* `--label` flag, so labels must ride in as `--change` Dockerfile
|
|
608
|
+
* instructions. Values are quoted so an app/stack carrying whitespace
|
|
609
|
+
* cannot split the instruction. */
|
|
610
|
+
const snapshotImageChangeArgs = (app, stack) => {
|
|
611
|
+
const labels = [[LabelKey.managed, "true"]];
|
|
612
|
+
if (app !== void 0) labels.push([LabelKey.app, app]);
|
|
613
|
+
if (stack !== void 0) labels.push([LabelKey.stack, stack]);
|
|
614
|
+
labels.push([LabelKey.role, SNAPSHOT_IMAGE_ROLE]);
|
|
615
|
+
return labels.flatMap(([key, value]) => ["--change", `LABEL "${key}"="${value}"`]);
|
|
616
|
+
};
|
|
548
617
|
/** `docker commit <name> <tag>` — writable layer → image. Used by
|
|
549
|
-
* snapshot capture.
|
|
618
|
+
* snapshot capture.
|
|
619
|
+
*
|
|
620
|
+
* The committed image is stamped with `{managed:'true', app, stack,
|
|
621
|
+
* role:SNAPSHOT_IMAGE_ROLE}` ownership labels so label-driven snapshot
|
|
622
|
+
* prune can reap leaked byproducts (a hard-killed capture that never
|
|
623
|
+
* reached its `removeImage` cleanup) while leaving the stack's build
|
|
624
|
+
* images untouched. A bare `docker commit` produces an UNlabelled image
|
|
625
|
+
* that no label-driven sweep can find — hence the explicit stamp.
|
|
626
|
+
*
|
|
627
|
+
* `app`/`stack` are recovered from the source container's own ownership
|
|
628
|
+
* labels (`docker commit` does NOT copy container labels onto the image).
|
|
629
|
+
* Capture only commits containers it owns, so those labels are present;
|
|
630
|
+
* if the inspect misses they are simply omitted and prune's app/stack-
|
|
631
|
+
* scoped filter will not match — a degenerate case capture cannot reach. */
|
|
550
632
|
const commit = (name, tag) => Effect.gen(function* () {
|
|
551
|
-
const
|
|
633
|
+
const sourceLabels = (yield* inspectContainer(name).pipe(Effect.catch(() => Effect.succeed(null))))?.labels ?? {};
|
|
634
|
+
const digest = (yield* dockerRun("commit", [
|
|
635
|
+
...snapshotImageChangeArgs(sourceLabels[LabelKey.app], sourceLabels[LabelKey.stack]),
|
|
636
|
+
name,
|
|
637
|
+
tag
|
|
638
|
+
]).pipe(Effect.mapError(wrapGeneric("docker.commit")))).stdout.trim();
|
|
552
639
|
if (digest.length === 0) return yield* Effect.fail(new ContainerCreateFailed({
|
|
553
640
|
name,
|
|
554
641
|
stderr: "commit returned empty digest",
|
|
@@ -557,6 +644,6 @@ const commit = (name, tag) => Effect.gen(function* () {
|
|
|
557
644
|
return digest;
|
|
558
645
|
}).pipe(Effect.withSpan("runtime.docker.container.commit"));
|
|
559
646
|
//#endregion
|
|
560
|
-
export { assertContainerHandleOwned, commit, ensureContainer, inspectContainer, pause, stop, unpause };
|
|
647
|
+
export { SNAPSHOT_IMAGE_ROLE, assertContainerHandleOwned, commit, decideRunAction, ensureContainer, inspectContainer, pause, stop, unpause };
|
|
561
648
|
|
|
562
649
|
//# sourceMappingURL=container.mjs.map
|