@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
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
import { StackPathsService } from "../../substrate/runtime/paths.mjs";
|
|
2
|
+
import { makeProjectionRef } from "../../substrate/runtime/projection/state-ref.mjs";
|
|
3
|
+
import { persistProjectionChanges } from "../../substrate/runtime/projection/persisted.mjs";
|
|
4
|
+
import { commandChannelPaths, makeCommandChannelSubscriber } from "../../substrate/runtime/cross-process/command-channel/channel.mjs";
|
|
5
|
+
import { claim, heartbeatFiber, release } from "../../substrate/runtime/cross-process/roster.mjs";
|
|
6
|
+
import { SnapshotOrchestratorService } from "../../orchestrators/snapshot/service.mjs";
|
|
7
|
+
import "../../substrate/runtime/index.mjs";
|
|
8
|
+
import { superviseStackEffect } from "../../orchestrators/run.mjs";
|
|
9
|
+
import { captureSnapshot } from "../../orchestrators/snapshot/capture-command.mjs";
|
|
10
|
+
import "../../orchestrators/snapshot/index.mjs";
|
|
11
|
+
import { buildProductionOrchestratorSinks, buildProductionPostAcquireHook } from "../../orchestrators/runtime-composition.mjs";
|
|
12
|
+
import { extendBuiltInPluginContext, layerBuiltInPluginRuntime } from "../../orchestrators/built-in-plugin-layers.mjs";
|
|
13
|
+
import { ExitCode } from "../../surfaces/cli/sysexits.mjs";
|
|
14
|
+
import { CliInternalError, CliSupervisorLiveError } from "../../surfaces/cli/errors.mjs";
|
|
15
|
+
import { DEFAULT_LIFECYCLE_PRUNE_RESOURCES, collectLifecyclePruneInventory, defaultLifecyclePruneSelection, runLifecyclePrune } from "../../orchestrators/lifecycle-prune/index.mjs";
|
|
16
|
+
import "../../surfaces/cli/index.mjs";
|
|
17
|
+
import { makeTuiSurface } from "../../surfaces/tui/index.mjs";
|
|
18
|
+
import { cliErrorFromConfigExit } from "../bail.mjs";
|
|
19
|
+
import { makeQueueCommandPublisher, resolveUpRendererMode } from "../up-lifecycle.mjs";
|
|
20
|
+
import { makeConfigLoader } from "./config-loader.mjs";
|
|
21
|
+
import { isEngineCommand } from "./engine-command.mjs";
|
|
22
|
+
import { findCliSupervisorLiveError, identityValueFor, resolvedIdentityForStack } from "./identity.mjs";
|
|
23
|
+
import { buildVerbLayers } from "./build-verb-layers.mjs";
|
|
24
|
+
import { provideFileSystem } from "./provide-file-system.mjs";
|
|
25
|
+
import { Cause, Effect, Exit, FileSystem, Logger, Queue, Ref, Stream } from "effect";
|
|
26
|
+
import { dirname, resolve } from "node:path";
|
|
27
|
+
//#region src/cli/wirings/up.ts
|
|
28
|
+
const rosterPathsFor = (stackRoot) => ({
|
|
29
|
+
stackLockFile: resolve(stackRoot, "stack.lock"),
|
|
30
|
+
rosterFile: resolve(stackRoot, "roster.json")
|
|
31
|
+
});
|
|
32
|
+
const makeSnapshotCommandHandler = (params) => {
|
|
33
|
+
return (cmd, handlerCtx) => {
|
|
34
|
+
switch (cmd.tag) {
|
|
35
|
+
case "snapshot.capture": return captureSnapshot({
|
|
36
|
+
snapshotId: cmd.snapshotId,
|
|
37
|
+
name: cmd.name,
|
|
38
|
+
onProgress: (progress) => handlerCtx.publish({
|
|
39
|
+
tag: "snapshot.captureProgress",
|
|
40
|
+
...cmd.snapshotId === void 0 ? {} : { snapshotId: cmd.snapshotId },
|
|
41
|
+
...cmd.name === void 0 ? {} : { name: cmd.name },
|
|
42
|
+
phase: progress.phase,
|
|
43
|
+
...progress.detail === void 0 ? {} : { detail: progress.detail },
|
|
44
|
+
...progress.pausedContainers === void 0 ? {} : { pausedContainers: progress.pausedContainers },
|
|
45
|
+
...progress.totalContainers === void 0 ? {} : { totalContainers: progress.totalContainers },
|
|
46
|
+
at: Date.now()
|
|
47
|
+
})
|
|
48
|
+
}).pipe(Effect.provideService(SnapshotOrchestratorService, params.snapshot), Effect.provideService(FileSystem.FileSystem, params.fs), Effect.map((meta) => [{
|
|
49
|
+
tag: "snapshot.captured",
|
|
50
|
+
snapshotId: meta.id,
|
|
51
|
+
...meta.label === null ? {} : { name: meta.label },
|
|
52
|
+
at: Date.now()
|
|
53
|
+
}]));
|
|
54
|
+
case "snapshot.restore": return provideFileSystem(params.fs, params.snapshot.restore({ id: cmd.snapshotId })).pipe(Effect.map((meta) => [{
|
|
55
|
+
tag: "snapshot.restored",
|
|
56
|
+
snapshotId: meta.id,
|
|
57
|
+
at: Date.now()
|
|
58
|
+
}]));
|
|
59
|
+
case "snapshot.list": return provideFileSystem(params.fs, params.snapshot.list).pipe(Effect.as([]));
|
|
60
|
+
case "snapshot.delete": return provideFileSystem(params.fs, params.snapshot.delete(cmd.snapshotId)).pipe(Effect.as([]));
|
|
61
|
+
case "wipe.requested": return provideFileSystem(params.fs, params.snapshot.wipe({})).pipe(Effect.as([]));
|
|
62
|
+
case "prune.requested": return collectLifecyclePruneInventory({ runtimeRoot: params.runtimeRoot }).pipe(Effect.flatMap((inventory) => runLifecyclePrune({ runtimeRoot: params.runtimeRoot }, {
|
|
63
|
+
groupKeys: defaultLifecyclePruneSelection(inventory, DEFAULT_LIFECYCLE_PRUNE_RESOURCES),
|
|
64
|
+
resources: DEFAULT_LIFECYCLE_PRUNE_RESOURCES,
|
|
65
|
+
dryRun: false
|
|
66
|
+
})), Effect.as([]));
|
|
67
|
+
default: return Effect.succeed([]);
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
const installLiveSupervisorRoster = (params) => Effect.gen(function* () {
|
|
72
|
+
const paths = rosterPathsFor(params.stackRoot);
|
|
73
|
+
if (!(yield* claim(paths)).soleHolder) {
|
|
74
|
+
yield* release(paths).pipe(Effect.catch(() => Effect.void));
|
|
75
|
+
return yield* Effect.fail(new CliSupervisorLiveError({
|
|
76
|
+
app: params.app,
|
|
77
|
+
stack: params.stack,
|
|
78
|
+
hint: "use `devstack apply` from another shell, or choose a different --stack name"
|
|
79
|
+
}));
|
|
80
|
+
}
|
|
81
|
+
yield* Effect.addFinalizer(() => release(paths).pipe(Effect.catch(() => Effect.void)));
|
|
82
|
+
yield* Effect.forkScoped(heartbeatFiber(paths));
|
|
83
|
+
});
|
|
84
|
+
/** Detect snapshot-capture completion events on the published stream
|
|
85
|
+
* so we can ack/fail the originating `snapshot.capture` command with
|
|
86
|
+
* a structured payload (snapshot metadata on success; failure summary
|
|
87
|
+
* on failure). Drops the legacy tail-fiber on the CLI side — the
|
|
88
|
+
* `summary` is now surfaced through `awaitCompletion`'s reply.payload. */
|
|
89
|
+
const snapshotCaptureAckFromEvent = (event) => {
|
|
90
|
+
if (typeof event !== "object" || event === null) return null;
|
|
91
|
+
const record = event;
|
|
92
|
+
if (typeof record.snapshotId !== "string") return null;
|
|
93
|
+
if (record.tag === "snapshot.captured") return {
|
|
94
|
+
snapshotId: record.snapshotId,
|
|
95
|
+
payload: {
|
|
96
|
+
kind: "captured",
|
|
97
|
+
snapshotId: record.snapshotId,
|
|
98
|
+
...record.name === void 0 ? {} : { name: record.name }
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
if (record.tag === "snapshot.captureFailed") return {
|
|
102
|
+
snapshotId: record.snapshotId,
|
|
103
|
+
payload: {
|
|
104
|
+
kind: "failed",
|
|
105
|
+
snapshotId: record.snapshotId,
|
|
106
|
+
...record.name === void 0 ? {} : { name: record.name },
|
|
107
|
+
...typeof record.summary === "string" ? { summary: record.summary } : {}
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
if (record.tag === "snapshot.captureSkipped") return {
|
|
111
|
+
snapshotId: record.snapshotId,
|
|
112
|
+
payload: {
|
|
113
|
+
kind: "skipped",
|
|
114
|
+
snapshotId: record.snapshotId,
|
|
115
|
+
...typeof record.reason === "string" ? { reason: record.reason } : {}
|
|
116
|
+
}
|
|
117
|
+
};
|
|
118
|
+
return null;
|
|
119
|
+
};
|
|
120
|
+
const installCommandChannelBridge = (params) => Effect.gen(function* () {
|
|
121
|
+
const subscriber = yield* makeCommandChannelSubscriber(commandChannelPaths(params.stackRoot), { fromOffset: "current" });
|
|
122
|
+
const pendingCaptures = yield* Ref.make(/* @__PURE__ */ new Map());
|
|
123
|
+
const consumeCommands = subscriber.commands.pipe(Stream.runForEach((record) => Effect.gen(function* () {
|
|
124
|
+
if (!isEngineCommand(record.command)) {
|
|
125
|
+
yield* subscriber.fail(record.id, "invalid command", "command payload did not match EngineCommand").pipe(Effect.catch(() => Effect.void));
|
|
126
|
+
return;
|
|
127
|
+
}
|
|
128
|
+
const cmd = record.command;
|
|
129
|
+
if (cmd.tag === "snapshot.capture") {
|
|
130
|
+
if (cmd.snapshotId === void 0) {
|
|
131
|
+
yield* params.handle.runCommand(cmd).pipe(Effect.andThen(subscriber.ack(record.id)), Effect.catchCause((cause) => subscriber.fail(record.id, "command failed", Cause.pretty(cause)).pipe(Effect.catch(() => Effect.void))));
|
|
132
|
+
return;
|
|
133
|
+
}
|
|
134
|
+
yield* Ref.update(pendingCaptures, (map) => {
|
|
135
|
+
const next = new Map(map);
|
|
136
|
+
next.set(cmd.snapshotId, {
|
|
137
|
+
commandId: record.id,
|
|
138
|
+
snapshotId: cmd.snapshotId,
|
|
139
|
+
...cmd.name === void 0 ? {} : { name: cmd.name }
|
|
140
|
+
});
|
|
141
|
+
return next;
|
|
142
|
+
});
|
|
143
|
+
yield* params.handle.runCommand(cmd).pipe(Effect.catchCause((cause) => Effect.gen(function* () {
|
|
144
|
+
yield* Ref.update(pendingCaptures, (map) => {
|
|
145
|
+
const next = new Map(map);
|
|
146
|
+
next.delete(cmd.snapshotId);
|
|
147
|
+
return next;
|
|
148
|
+
});
|
|
149
|
+
yield* subscriber.fail(record.id, "command failed", Cause.pretty(cause)).pipe(Effect.catch(() => Effect.void));
|
|
150
|
+
})));
|
|
151
|
+
return;
|
|
152
|
+
}
|
|
153
|
+
yield* params.handle.runCommand(cmd).pipe(Effect.andThen(subscriber.ack(record.id)), Effect.catchCause((cause) => subscriber.fail(record.id, "command failed", Cause.pretty(cause)).pipe(Effect.catch(() => Effect.void))));
|
|
154
|
+
}))).pipe(Effect.catchCause((cause) => {
|
|
155
|
+
if (Cause.hasInterrupts(cause)) return Effect.failCause(cause);
|
|
156
|
+
return Effect.sync(() => {
|
|
157
|
+
process.stderr.write(`command channel decode failed; resuming tail: ${Cause.pretty(cause)}\n`);
|
|
158
|
+
}).pipe(Effect.andThen(Effect.sleep("200 millis")), Effect.andThen(Effect.suspend(() => consumeCommands)));
|
|
159
|
+
}));
|
|
160
|
+
yield* Effect.forkScoped(consumeCommands);
|
|
161
|
+
const publishEvent = (event) => Effect.gen(function* () {
|
|
162
|
+
yield* subscriber.publishEvent(event).pipe(Effect.catch(() => Effect.void));
|
|
163
|
+
const ackFromEvent = snapshotCaptureAckFromEvent(event);
|
|
164
|
+
if (ackFromEvent === null) return;
|
|
165
|
+
const pending = yield* Ref.modify(pendingCaptures, (map) => {
|
|
166
|
+
const entry = map.get(ackFromEvent.snapshotId);
|
|
167
|
+
if (entry === void 0) return [null, map];
|
|
168
|
+
const next = new Map(map);
|
|
169
|
+
next.delete(ackFromEvent.snapshotId);
|
|
170
|
+
return [entry, next];
|
|
171
|
+
});
|
|
172
|
+
if (pending === null) return;
|
|
173
|
+
if (ackFromEvent.payload.kind === "captured") {
|
|
174
|
+
yield* subscriber.ack(pending.commandId, "captured", ackFromEvent.payload).pipe(Effect.catch(() => Effect.void));
|
|
175
|
+
return;
|
|
176
|
+
}
|
|
177
|
+
if (ackFromEvent.payload.kind === "failed") {
|
|
178
|
+
yield* subscriber.fail(pending.commandId, "snapshot capture failed", ackFromEvent.payload.summary, ackFromEvent.payload).pipe(Effect.catch(() => Effect.void));
|
|
179
|
+
return;
|
|
180
|
+
}
|
|
181
|
+
yield* subscriber.fail(pending.commandId, "snapshot capture skipped", ackFromEvent.payload.reason, ackFromEvent.payload).pipe(Effect.catch(() => Effect.void));
|
|
182
|
+
});
|
|
183
|
+
return { publishEvent };
|
|
184
|
+
});
|
|
185
|
+
/**
|
|
186
|
+
* Run `devstack up`. Wires the substrate Layer stack, supervisor,
|
|
187
|
+
* attached renderer, and in-process TUI command queue. The Effect runs
|
|
188
|
+
* as the outer Node fiber so SIGINT reaches scope finalizers.
|
|
189
|
+
*
|
|
190
|
+
* Returns a typed `CommandResult` / fails with a typed `CliError` so
|
|
191
|
+
* the dispatcher's `emitFailure` renders the envelope (JSON mode) or
|
|
192
|
+
* human-mode stderr line. Wirings MUST NOT write raw bytes to
|
|
193
|
+
* `process.stderr` or mutate `process.exitCode` for terminal failures —
|
|
194
|
+
* the dispatcher owns the projection.
|
|
195
|
+
*/
|
|
196
|
+
const runUpLive = (configPath, identity, options) => {
|
|
197
|
+
const loader = makeConfigLoader();
|
|
198
|
+
return Effect.gen(function* () {
|
|
199
|
+
const loadExit = yield* Effect.exit(loader.load(configPath));
|
|
200
|
+
if (Exit.isFailure(loadExit)) return yield* Effect.fail(cliErrorFromConfigExit(loadExit));
|
|
201
|
+
const loaded = loadExit.value;
|
|
202
|
+
const stack = loaded.stack;
|
|
203
|
+
const effectiveIdentity = resolvedIdentityForStack(identity, stack);
|
|
204
|
+
const identityValue = identityValueFor(effectiveIdentity);
|
|
205
|
+
const appRoot = dirname(loaded.resolvedConfigPath);
|
|
206
|
+
const rendererMode = resolveUpRendererMode({
|
|
207
|
+
cliRenderer: options.renderer,
|
|
208
|
+
stackRenderer: stack.options.renderer,
|
|
209
|
+
stdoutIsTty: options.stdoutIsTty
|
|
210
|
+
});
|
|
211
|
+
const substrateLayers = buildVerbLayers({
|
|
212
|
+
identity: identityValue,
|
|
213
|
+
stack,
|
|
214
|
+
appRoot,
|
|
215
|
+
runtimeRoot: effectiveIdentity.runtimeRoot
|
|
216
|
+
});
|
|
217
|
+
return yield* Effect.gen(function* () {
|
|
218
|
+
const state = yield* makeProjectionRef();
|
|
219
|
+
const snapshot = yield* SnapshotOrchestratorService;
|
|
220
|
+
const snapshotCommandHandler = makeSnapshotCommandHandler({
|
|
221
|
+
snapshot,
|
|
222
|
+
fs: yield* FileSystem.FileSystem,
|
|
223
|
+
runtimeRoot: effectiveIdentity.runtimeRoot
|
|
224
|
+
});
|
|
225
|
+
const orchestratorSinks = yield* buildProductionOrchestratorSinks();
|
|
226
|
+
const postAcquireHook = yield* buildProductionPostAcquireHook({ extras: stack.options.extras });
|
|
227
|
+
yield* superviseStackEffect({
|
|
228
|
+
_tag: "Stack",
|
|
229
|
+
members: stack.members,
|
|
230
|
+
options: stack.options
|
|
231
|
+
}, identityValue, state, {
|
|
232
|
+
orchestratorSinks,
|
|
233
|
+
commandHandler: snapshotCommandHandler,
|
|
234
|
+
postAcquireHook,
|
|
235
|
+
extendContext: extendBuiltInPluginContext,
|
|
236
|
+
beforeInitialAcquire: (handle) => Effect.gen(function* () {
|
|
237
|
+
const stackPaths = yield* StackPathsService;
|
|
238
|
+
const recovery = yield* snapshot.recoverPendingRestore.pipe(Effect.tapCause((cause) => Effect.sync(() => {
|
|
239
|
+
process.stderr.write(`snapshot recovery scan failed: ${Cause.pretty(cause)}\n`);
|
|
240
|
+
})), Effect.catch(() => Effect.succeed(null)));
|
|
241
|
+
if (recovery && !recovery.noMarker) {
|
|
242
|
+
const summary = `snapshot.recover-pending: inspected=${recovery.inspected} recovered=${recovery.recovered} stillPending=${recovery.stillPending.length} markerCleared=${recovery.markerCleared}`;
|
|
243
|
+
process.stderr.write(`${summary}\n`);
|
|
244
|
+
if (recovery.stillPending.length > 0) for (const entry of recovery.stillPending) process.stderr.write(` pending: ${entry.targetImageName} ← ${entry.stagedImageTag} (${entry.plugin}/${entry.role})\n`);
|
|
245
|
+
}
|
|
246
|
+
const commandChannel = yield* installCommandChannelBridge({
|
|
247
|
+
stackRoot: stackPaths.stackRoot,
|
|
248
|
+
handle
|
|
249
|
+
});
|
|
250
|
+
yield* installLiveSupervisorRoster({
|
|
251
|
+
stackRoot: stackPaths.stackRoot,
|
|
252
|
+
app: String(identityValue.app),
|
|
253
|
+
stack: String(identityValue.stack)
|
|
254
|
+
});
|
|
255
|
+
const rendererEvents = yield* Queue.unbounded();
|
|
256
|
+
const renderer = makeTuiSurface({
|
|
257
|
+
mode: rendererMode,
|
|
258
|
+
publishCommand: makeQueueCommandPublisher(handle.commands)
|
|
259
|
+
});
|
|
260
|
+
yield* Effect.addFinalizer(() => renderer.flush.pipe(Effect.catch(() => Effect.void)));
|
|
261
|
+
yield* Effect.forkScoped(renderer.mount(handle.state, Stream.fromQueue(rendererEvents)).pipe(Effect.catch((cause) => Effect.sync(() => {
|
|
262
|
+
process.stderr.write(`renderer failed: ${cause.detail ?? String(cause)}\n`);
|
|
263
|
+
}))));
|
|
264
|
+
yield* Effect.forkScoped(persistProjectionChanges(stackPaths.stackRoot, handle.state));
|
|
265
|
+
yield* Effect.forkScoped(Stream.fromQueue(handle.events).pipe(Stream.runForEach((event) => Effect.gen(function* () {
|
|
266
|
+
yield* Queue.offer(rendererEvents, event);
|
|
267
|
+
yield* commandChannel.publishEvent(event);
|
|
268
|
+
}))));
|
|
269
|
+
})
|
|
270
|
+
}).pipe(Effect.provide(layerBuiltInPluginRuntime(orchestratorSinks)));
|
|
271
|
+
}).pipe(Effect.provide(substrateLayers), Effect.provide(Logger.layer([])), Effect.matchCauseEffect({
|
|
272
|
+
onFailure: (cause) => {
|
|
273
|
+
const live = findCliSupervisorLiveError(cause);
|
|
274
|
+
if (live !== null) return Effect.fail(live);
|
|
275
|
+
return Effect.fail(new CliInternalError({
|
|
276
|
+
message: "stack failed",
|
|
277
|
+
cause: Cause.pretty(cause)
|
|
278
|
+
}));
|
|
279
|
+
},
|
|
280
|
+
onSuccess: () => Effect.succeed({ exitCode: ExitCode.OK })
|
|
281
|
+
}));
|
|
282
|
+
});
|
|
283
|
+
};
|
|
284
|
+
//#endregion
|
|
285
|
+
export { runUpLive };
|
|
286
|
+
|
|
287
|
+
//# sourceMappingURL=up.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"up.mjs","names":["resolvePath"],"sources":["../../../src/cli/wirings/up.ts"],"sourcesContent":["// `devstack up` verb wiring.\n//\n// Wires the substrate Layer stack, supervisor, attached renderer, and\n// in-process TUI command queue. The Effect runs as the outer Node fiber\n// so SIGINT reaches scope finalizers (see surfaces/cli/index.ts\n// architecture invariant).\n//\n// Logger layer: `Logger.layer([])` (silent). `up` owns the TUI, which is\n// the operator-facing output channel; routing structured `Effect.log*`\n// records to stderr would scribble on top of the live ink renderer in\n// human mode and would duplicate the structured event stream the plain\n// renderer already emits in non-TTY mode. The sibling `apply` verb (no\n// TUI) uses `Logger.consolePretty()` because its consumer is CI.\n\nimport { dirname, resolve as resolvePath } from 'node:path';\n\nimport { Cause, Effect, Exit, FileSystem, Logger, Queue, Ref, Scope, Stream } from 'effect';\n\nimport type { Identity } from '../../substrate/identity.ts';\nimport type { EngineCommand, EngineEvent } from '../../substrate/events.ts';\nimport { StackPathsService } from '../../substrate/runtime/paths.ts';\nimport {\n\tclaim,\n\tcommandChannelPaths,\n\theartbeatFiber,\n\tmakeCommandChannelSubscriber,\n\tmakeProjectionRef,\n\tpersistProjectionChanges,\n\trelease,\n\ttype SupervisedStack,\n\ttype SupervisorCommandHandler,\n\ttype SupervisorHandle,\n} from '../../substrate/runtime/index.ts';\nimport {\n\tcollectLifecyclePruneInventory,\n\tdefaultLifecyclePruneSelection,\n\tDEFAULT_LIFECYCLE_PRUNE_RESOURCES,\n\trunLifecyclePrune,\n} from '../../orchestrators/lifecycle-prune/index.ts';\nimport { superviseStackEffect } from '../../orchestrators/run.ts';\nimport {\n\tbuildProductionOrchestratorSinks,\n\tbuildProductionPostAcquireHook,\n} from '../../orchestrators/runtime-composition.ts';\nimport {\n\textendBuiltInPluginContext,\n\tlayerBuiltInPluginRuntime,\n} from '../../orchestrators/built-in-plugin-layers.ts';\nimport {\n\tcaptureSnapshot,\n\tSnapshotOrchestratorService,\n} from '../../orchestrators/snapshot/index.ts';\nimport {\n\ttype CliError,\n\tCliInternalError,\n\tCliSupervisorLiveError,\n\ttype GlobalFlags,\n} from '../../surfaces/cli/index.ts';\nimport type { CommandResult } from '../../surfaces/cli/commands/index.ts';\nimport { ExitCode } from '../../surfaces/cli/sysexits.ts';\nimport { makeTuiSurface } from '../../surfaces/tui/index.ts';\nimport type { LoadedConfig } from '../../surfaces/cli/commands/config-loader.ts';\n\nimport { cliErrorFromConfigExit } from '../bail.ts';\nimport { makeQueueCommandPublisher, resolveUpRendererMode } from '../up-lifecycle.ts';\nimport { makeConfigLoader } from './config-loader.ts';\nimport { isEngineCommand } from './engine-command.ts';\nimport {\n\tfindCliSupervisorLiveError,\n\tidentityValueFor,\n\tresolvedIdentityForStack,\n\ttype ResolvedIdentity,\n} from './identity.ts';\nimport { buildVerbLayers } from './build-verb-layers.ts';\nimport { provideFileSystem } from './provide-file-system.ts';\n\nconst rosterPathsFor = (stackRoot: string) => ({\n\tstackLockFile: resolvePath(stackRoot, 'stack.lock'),\n\trosterFile: resolvePath(stackRoot, 'roster.json'),\n});\n\n// -----------------------------------------------------------------------------\n// Supervisor command handler — snapshot/wipe/prune injected dispatch\n// -----------------------------------------------------------------------------\n\n/** Captured snapshot metadata is round-tripped through the\n * command-channel ack payload so the publisher's `awaitCompletion`\n * can surface it without tailing the engine event stream. */\ninterface SnapshotCaptureAckPayload {\n\treadonly kind: 'captured' | 'failed' | 'skipped';\n\treadonly snapshotId?: string;\n\treadonly name?: string;\n\treadonly summary?: string;\n\treadonly reason?: string;\n}\n\nconst makeSnapshotCommandHandler = (params: {\n\treadonly snapshot: import('../../orchestrators/snapshot/index.ts').SnapshotOrchestrator;\n\treadonly fs: FileSystem.FileSystem;\n\treadonly runtimeRoot: string;\n}): SupervisorCommandHandler => {\n\treturn (cmd, handlerCtx) => {\n\t\tswitch (cmd.tag) {\n\t\t\tcase 'snapshot.capture':\n\t\t\t\treturn captureSnapshot({\n\t\t\t\t\tsnapshotId: cmd.snapshotId,\n\t\t\t\t\tname: cmd.name,\n\t\t\t\t\tonProgress: (progress) =>\n\t\t\t\t\t\thandlerCtx.publish({\n\t\t\t\t\t\t\ttag: 'snapshot.captureProgress',\n\t\t\t\t\t\t\t...(cmd.snapshotId === undefined ? {} : { snapshotId: cmd.snapshotId }),\n\t\t\t\t\t\t\t...(cmd.name === undefined ? {} : { name: cmd.name }),\n\t\t\t\t\t\t\tphase: progress.phase,\n\t\t\t\t\t\t\t...(progress.detail === undefined ? {} : { detail: progress.detail }),\n\t\t\t\t\t\t\t...(progress.pausedContainers === undefined\n\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t: { pausedContainers: progress.pausedContainers }),\n\t\t\t\t\t\t\t...(progress.totalContainers === undefined\n\t\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t\t: { totalContainers: progress.totalContainers }),\n\t\t\t\t\t\t\tat: Date.now(),\n\t\t\t\t\t\t}),\n\t\t\t\t}).pipe(\n\t\t\t\t\tEffect.provideService(SnapshotOrchestratorService, params.snapshot),\n\t\t\t\t\tEffect.provideService(FileSystem.FileSystem, params.fs),\n\t\t\t\t\tEffect.map((meta) => [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'snapshot.captured',\n\t\t\t\t\t\t\tsnapshotId: meta.id,\n\t\t\t\t\t\t\t...(meta.label === null ? {} : { name: meta.label }),\n\t\t\t\t\t\t\tat: Date.now(),\n\t\t\t\t\t\t},\n\t\t\t\t\t]),\n\t\t\t\t);\n\t\t\tcase 'snapshot.restore':\n\t\t\t\treturn provideFileSystem(params.fs, params.snapshot.restore({ id: cmd.snapshotId })).pipe(\n\t\t\t\t\tEffect.map((meta) => [\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\ttag: 'snapshot.restored',\n\t\t\t\t\t\t\tsnapshotId: meta.id,\n\t\t\t\t\t\t\tat: Date.now(),\n\t\t\t\t\t\t},\n\t\t\t\t\t]),\n\t\t\t\t);\n\t\t\tcase 'snapshot.list':\n\t\t\t\treturn provideFileSystem(params.fs, params.snapshot.list).pipe(Effect.as([]));\n\t\t\tcase 'snapshot.delete':\n\t\t\t\treturn provideFileSystem(params.fs, params.snapshot.delete(cmd.snapshotId)).pipe(\n\t\t\t\t\tEffect.as([]),\n\t\t\t\t);\n\t\t\tcase 'wipe.requested':\n\t\t\t\treturn provideFileSystem(params.fs, params.snapshot.wipe({})).pipe(Effect.as([]));\n\t\t\tcase 'prune.requested':\n\t\t\t\t// Route to the same orchestrator the offline `devstack prune`\n\t\t\t\t// verb uses (`runLifecyclePrune`), NOT the snapshot-orchestrator\n\t\t\t\t// prune (which only cleans the snapshot catalog and would leave\n\t\t\t\t// stale containers/networks/volumes/images behind for an attached\n\t\t\t\t// supervisor — silent under-prune is the bug we're closing).\n\t\t\t\t// Live supervisor implies the current stack's group is live and\n\t\t\t\t// therefore excluded from the default selection — exactly the\n\t\t\t\t// invariant the live-attached `prune` needs (operator can prune\n\t\t\t\t// sibling stacks under the same Docker daemon without touching\n\t\t\t\t// the running one).\n\t\t\t\treturn collectLifecyclePruneInventory({ runtimeRoot: params.runtimeRoot }).pipe(\n\t\t\t\t\tEffect.flatMap((inventory) =>\n\t\t\t\t\t\trunLifecyclePrune(\n\t\t\t\t\t\t\t{ runtimeRoot: params.runtimeRoot },\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroupKeys: defaultLifecyclePruneSelection(\n\t\t\t\t\t\t\t\t\tinventory,\n\t\t\t\t\t\t\t\t\tDEFAULT_LIFECYCLE_PRUNE_RESOURCES,\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tresources: DEFAULT_LIFECYCLE_PRUNE_RESOURCES,\n\t\t\t\t\t\t\t\tdryRun: false,\n\t\t\t\t\t\t\t},\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tEffect.as([]),\n\t\t\t\t);\n\t\t\tdefault:\n\t\t\t\treturn Effect.succeed([]);\n\t\t}\n\t};\n};\n\nconst installLiveSupervisorRoster = (params: {\n\treadonly stackRoot: string;\n\treadonly app: string;\n\treadonly stack: string;\n}): Effect.Effect<void, unknown, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst paths = rosterPathsFor(params.stackRoot);\n\t\tconst claimed = yield* claim(paths);\n\t\tif (!claimed.soleHolder) {\n\t\t\tyield* release(paths).pipe(Effect.catch(() => Effect.void));\n\t\t\treturn yield* Effect.fail(\n\t\t\t\tnew CliSupervisorLiveError({\n\t\t\t\t\tapp: params.app,\n\t\t\t\t\tstack: params.stack,\n\t\t\t\t\thint: 'use `devstack apply` from another shell, or choose a different --stack name',\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\t\tyield* Effect.addFinalizer(() => release(paths).pipe(Effect.catch(() => Effect.void)));\n\t\tyield* Effect.forkScoped(heartbeatFiber(paths));\n\t});\n\ninterface PendingSnapshotCapture {\n\treadonly commandId: string;\n\treadonly snapshotId: string;\n\treadonly name?: string;\n}\n\n/** Detect snapshot-capture completion events on the published stream\n * so we can ack/fail the originating `snapshot.capture` command with\n * a structured payload (snapshot metadata on success; failure summary\n * on failure). Drops the legacy tail-fiber on the CLI side — the\n * `summary` is now surfaced through `awaitCompletion`'s reply.payload. */\nconst snapshotCaptureAckFromEvent = (\n\tevent: unknown,\n): { readonly snapshotId: string; readonly payload: SnapshotCaptureAckPayload } | null => {\n\tif (typeof event !== 'object' || event === null) return null;\n\tconst record = event as {\n\t\treadonly tag?: string;\n\t\treadonly snapshotId?: string;\n\t\treadonly name?: string;\n\t\treadonly summary?: string;\n\t\treadonly reason?: string;\n\t};\n\tif (typeof record.snapshotId !== 'string') return null;\n\tif (record.tag === 'snapshot.captured') {\n\t\treturn {\n\t\t\tsnapshotId: record.snapshotId,\n\t\t\tpayload: {\n\t\t\t\tkind: 'captured',\n\t\t\t\tsnapshotId: record.snapshotId,\n\t\t\t\t...(record.name === undefined ? {} : { name: record.name }),\n\t\t\t},\n\t\t};\n\t}\n\tif (record.tag === 'snapshot.captureFailed') {\n\t\treturn {\n\t\t\tsnapshotId: record.snapshotId,\n\t\t\tpayload: {\n\t\t\t\tkind: 'failed',\n\t\t\t\tsnapshotId: record.snapshotId,\n\t\t\t\t...(record.name === undefined ? {} : { name: record.name }),\n\t\t\t\t...(typeof record.summary === 'string' ? { summary: record.summary } : {}),\n\t\t\t},\n\t\t};\n\t}\n\tif (record.tag === 'snapshot.captureSkipped') {\n\t\treturn {\n\t\t\tsnapshotId: record.snapshotId,\n\t\t\tpayload: {\n\t\t\t\tkind: 'skipped',\n\t\t\t\tsnapshotId: record.snapshotId,\n\t\t\t\t...(typeof record.reason === 'string' ? { reason: record.reason } : {}),\n\t\t\t},\n\t\t};\n\t}\n\treturn null;\n};\n\nconst installCommandChannelBridge = (params: {\n\treadonly stackRoot: string;\n\treadonly handle: SupervisorHandle;\n}): Effect.Effect<\n\t{\n\t\treadonly publishEvent: (event: EngineEvent) => Effect.Effect<void>;\n\t},\n\tunknown,\n\tScope.Scope\n> =>\n\tEffect.gen(function* () {\n\t\tconst subscriber = yield* makeCommandChannelSubscriber(commandChannelPaths(params.stackRoot), {\n\t\t\tfromOffset: 'current',\n\t\t});\n\n\t\t// snapshotId → pending command record id. Populated when the\n\t\t// bridge dispatches a `snapshot.capture` command; drained when\n\t\t// the matching completion event flows through `publishEvent`.\n\t\tconst pendingCaptures = yield* Ref.make<ReadonlyMap<string, PendingSnapshotCapture>>(new Map());\n\n\t\t// Drive the command stream so a stream-LEVEL failure does not\n\t\t// permanently wedge cross-process IPC. The subscriber's `commands`\n\t\t// tail decodes with the `onDecodeError: 'fail'` default, so ONE\n\t\t// malformed/truncated NDJSON line (CLI killed mid-append, partial\n\t\t// disk write) raises `CommandChannelError` and terminates the\n\t\t// stream. If `runForEach` were the only consumer, the live\n\t\t// supervisor would then process NO further commands for the rest of\n\t\t// the `up` session (a sibling `snapshot save`/`apply`/`prune`\n\t\t// appends but is never read, and its `awaitCompletion` times out\n\t\t// with no diagnostic). Instead we log the failure and RE-SUBSCRIBE:\n\t\t// `subscriber.commands` is `tailRecords(... fromOffset: 'current')`,\n\t\t// and each subscription re-runs its builder, re-anchoring the tail\n\t\t// at the file's current EOF — so the corrupt line (and any records\n\t\t// that were buffered alongside it) are skipped and subsequent\n\t\t// commands are processed again. A short delay before resume avoids a\n\t\t// busy spin if the tail keeps failing. The publisher's reply-tail\n\t\t// already uses `onDecodeError: 'skip'` for the same NDJSON-tolerance\n\t\t// reason; this gives the command-subscriber side equivalent\n\t\t// resilience without touching the shared subscriber.\n\t\tconst consumeCommands: Effect.Effect<void, never, Scope.Scope> = subscriber.commands\n\t\t\t.pipe(\n\t\t\t\tStream.runForEach((record) =>\n\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\tif (!isEngineCommand(record.command)) {\n\t\t\t\t\t\t\tyield* subscriber\n\t\t\t\t\t\t\t\t.fail(record.id, 'invalid command', 'command payload did not match EngineCommand')\n\t\t\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void));\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tconst cmd: EngineCommand = record.command;\n\t\t\t\t\t\t// Snapshot capture is a background task in the supervisor:\n\t\t\t\t\t\t// `runCommand` returns as soon as the fork is scheduled, so\n\t\t\t\t\t\t// auto-acking here would race the actual capture. We defer\n\t\t\t\t\t\t// ack/fail until the matching `snapshot.captured` /\n\t\t\t\t\t\t// `snapshot.captureFailed` / `snapshot.captureSkipped` event\n\t\t\t\t\t\t// flows through `publishEvent` below.\n\t\t\t\t\t\tif (cmd.tag === 'snapshot.capture') {\n\t\t\t\t\t\t\tif (cmd.snapshotId === undefined) {\n\t\t\t\t\t\t\t\t// Without a snapshotId we cannot correlate the completion\n\t\t\t\t\t\t\t\t// event back to this command record. Fall through to the\n\t\t\t\t\t\t\t\t// legacy auto-ack path — the CLI side mints an id today, so\n\t\t\t\t\t\t\t\t// this branch is defensive.\n\t\t\t\t\t\t\t\tyield* params.handle.runCommand(cmd).pipe(\n\t\t\t\t\t\t\t\t\tEffect.andThen(subscriber.ack(record.id)),\n\t\t\t\t\t\t\t\t\tEffect.catchCause((cause) =>\n\t\t\t\t\t\t\t\t\t\tsubscriber\n\t\t\t\t\t\t\t\t\t\t\t.fail(\n\t\t\t\t\t\t\t\t\t\t\t\trecord.id,\n\t\t\t\t\t\t\t\t\t\t\t\t'command failed',\n\t\t\t\t\t\t\t\t\t\t\t\tCause.pretty(cause as Cause.Cause<unknown>),\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void)),\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tyield* Ref.update(pendingCaptures, (map) => {\n\t\t\t\t\t\t\t\tconst next = new Map(map);\n\t\t\t\t\t\t\t\tnext.set(cmd.snapshotId!, {\n\t\t\t\t\t\t\t\t\tcommandId: record.id,\n\t\t\t\t\t\t\t\t\tsnapshotId: cmd.snapshotId!,\n\t\t\t\t\t\t\t\t\t...(cmd.name === undefined ? {} : { name: cmd.name }),\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tyield* params.handle.runCommand(cmd).pipe(\n\t\t\t\t\t\t\t\tEffect.catchCause((cause) =>\n\t\t\t\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\t\t\t\t// Synchronous dispatch failure (e.g. command-loop refused).\n\t\t\t\t\t\t\t\t\t\t// Drain the pending entry and surface the failure now.\n\t\t\t\t\t\t\t\t\t\tyield* Ref.update(pendingCaptures, (map) => {\n\t\t\t\t\t\t\t\t\t\t\tconst next = new Map(map);\n\t\t\t\t\t\t\t\t\t\t\tnext.delete(cmd.snapshotId!);\n\t\t\t\t\t\t\t\t\t\t\treturn next;\n\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\tyield* subscriber\n\t\t\t\t\t\t\t\t\t\t\t.fail(\n\t\t\t\t\t\t\t\t\t\t\t\trecord.id,\n\t\t\t\t\t\t\t\t\t\t\t\t'command failed',\n\t\t\t\t\t\t\t\t\t\t\t\tCause.pretty(cause as Cause.Cause<unknown>),\n\t\t\t\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void));\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tyield* params.handle.runCommand(cmd).pipe(\n\t\t\t\t\t\t\tEffect.andThen(subscriber.ack(record.id)),\n\t\t\t\t\t\t\tEffect.catchCause((cause) =>\n\t\t\t\t\t\t\t\tsubscriber\n\t\t\t\t\t\t\t\t\t.fail(record.id, 'command failed', Cause.pretty(cause as Cause.Cause<unknown>))\n\t\t\t\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void)),\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t);\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t)\n\t\t\t.pipe(\n\t\t\t\tEffect.catchCause((cause): Effect.Effect<void, never, Scope.Scope> => {\n\t\t\t\t\t// Scope-close interrupts this forked fiber via an interrupt\n\t\t\t\t\t// cause. Re-raise it so the fork stops cleanly on `up`\n\t\t\t\t\t// teardown — resuming here would leak the fiber and spam\n\t\t\t\t\t// stderr forever.\n\t\t\t\t\tif (Cause.hasInterrupts(cause as Cause.Cause<unknown>)) {\n\t\t\t\t\t\treturn Effect.failCause(cause as Cause.Cause<never>);\n\t\t\t\t\t}\n\t\t\t\t\t// Otherwise a stream-level failure (e.g. a corrupt NDJSON\n\t\t\t\t\t// line tripping the subscriber's `onDecodeError: 'fail'`\n\t\t\t\t\t// default). Log it, pause briefly to avoid a busy spin, then\n\t\t\t\t\t// re-subscribe by recursing — a fresh tail re-anchors at the\n\t\t\t\t\t// file's current EOF, so the next command is processed\n\t\t\t\t\t// instead of IPC wedging for the session.\n\t\t\t\t\treturn Effect.sync(() => {\n\t\t\t\t\t\tprocess.stderr.write(\n\t\t\t\t\t\t\t`command channel decode failed; resuming tail: ${Cause.pretty(cause as Cause.Cause<unknown>)}\\n`,\n\t\t\t\t\t\t);\n\t\t\t\t\t}).pipe(\n\t\t\t\t\t\tEffect.andThen(Effect.sleep('200 millis')),\n\t\t\t\t\t\tEffect.andThen(Effect.suspend(() => consumeCommands)),\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\t);\n\n\t\tyield* Effect.forkScoped(consumeCommands);\n\n\t\tconst publishEvent = (event: EngineEvent): Effect.Effect<void> =>\n\t\t\tEffect.gen(function* () {\n\t\t\t\t// First, route the event to the events file so peer\n\t\t\t\t// subscribers see it. THEN drain any matching pending\n\t\t\t\t// capture so the ack lands after the engine event — this\n\t\t\t\t// preserves the \"captured before ack\" ordering tests rely\n\t\t\t\t// on (test/cli/main.test.ts:483-491 publishes captured then\n\t\t\t\t// acks; we mirror that ordering from the supervisor side).\n\t\t\t\tyield* subscriber.publishEvent(event).pipe(Effect.catch(() => Effect.void));\n\t\t\t\tconst ackFromEvent = snapshotCaptureAckFromEvent(event);\n\t\t\t\tif (ackFromEvent === null) return;\n\t\t\t\tconst pending = yield* Ref.modify(pendingCaptures, (map) => {\n\t\t\t\t\tconst entry = map.get(ackFromEvent.snapshotId);\n\t\t\t\t\tif (entry === undefined) return [null, map];\n\t\t\t\t\tconst next = new Map(map);\n\t\t\t\t\tnext.delete(ackFromEvent.snapshotId);\n\t\t\t\t\treturn [entry, next];\n\t\t\t\t});\n\t\t\t\tif (pending === null) return;\n\t\t\t\tif (ackFromEvent.payload.kind === 'captured') {\n\t\t\t\t\tyield* subscriber\n\t\t\t\t\t\t.ack(pending.commandId, 'captured', ackFromEvent.payload)\n\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (ackFromEvent.payload.kind === 'failed') {\n\t\t\t\t\tyield* subscriber\n\t\t\t\t\t\t.fail(\n\t\t\t\t\t\t\tpending.commandId,\n\t\t\t\t\t\t\t'snapshot capture failed',\n\t\t\t\t\t\t\tackFromEvent.payload.summary,\n\t\t\t\t\t\t\tackFromEvent.payload,\n\t\t\t\t\t\t)\n\t\t\t\t\t\t.pipe(Effect.catch(() => Effect.void));\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t// skipped\n\t\t\t\tyield* subscriber\n\t\t\t\t\t.fail(\n\t\t\t\t\t\tpending.commandId,\n\t\t\t\t\t\t'snapshot capture skipped',\n\t\t\t\t\t\tackFromEvent.payload.reason,\n\t\t\t\t\t\tackFromEvent.payload,\n\t\t\t\t\t)\n\t\t\t\t\t.pipe(Effect.catch(() => Effect.void));\n\t\t\t});\n\n\t\treturn { publishEvent };\n\t});\n\n/**\n * Run `devstack up`. Wires the substrate Layer stack, supervisor,\n * attached renderer, and in-process TUI command queue. The Effect runs\n * as the outer Node fiber so SIGINT reaches scope finalizers.\n *\n * Returns a typed `CommandResult` / fails with a typed `CliError` so\n * the dispatcher's `emitFailure` renders the envelope (JSON mode) or\n * human-mode stderr line. Wirings MUST NOT write raw bytes to\n * `process.stderr` or mutate `process.exitCode` for terminal failures —\n * the dispatcher owns the projection.\n */\nexport const runUpLive = (\n\tconfigPath: string | undefined,\n\tidentity: ResolvedIdentity,\n\toptions: {\n\t\treadonly renderer: GlobalFlags['renderer'];\n\t\treadonly stdoutIsTty: boolean;\n\t},\n): Effect.Effect<CommandResult, CliError> => {\n\tconst loader = makeConfigLoader();\n\treturn Effect.gen(function* () {\n\t\tconst loadExit = yield* Effect.exit(loader.load(configPath));\n\t\tif (Exit.isFailure(loadExit)) {\n\t\t\treturn yield* Effect.fail(cliErrorFromConfigExit(loadExit));\n\t\t}\n\t\tconst loaded = loadExit.value;\n\t\tconst stack = (loaded as LoadedConfig & { readonly stack: SupervisedStack }).stack;\n\n\t\t// Re-derive the identity against the EFFECTIVE stack (explicit\n\t\t// `--stack`/`$DEVSTACK_STACK` > `config.stackName` > inferred) so\n\t\t// the roster lock, command channel, and container/router naming all\n\t\t// target the same stack the operator selected — matching what\n\t\t// `snapshot.ts` already does. Without this, an explicit `--stack`\n\t\t// would boot the supervisor under the config's `stackName` and a\n\t\t// concurrent default-stack `up` would falsely collide on the live\n\t\t// supervisor (`error: supervisor live for <app>/<stack>`, exit 40).\n\t\tconst effectiveIdentity = resolvedIdentityForStack(identity, stack);\n\t\tconst identityValue: Identity = identityValueFor(effectiveIdentity);\n\n\t\tconst appRoot = dirname(loaded.resolvedConfigPath);\n\t\tconst rendererMode = resolveUpRendererMode({\n\t\t\tcliRenderer: options.renderer,\n\t\t\tstackRenderer: stack.options.renderer,\n\t\t\tstdoutIsTty: options.stdoutIsTty,\n\t\t});\n\t\tconst substrateLayers = buildVerbLayers({\n\t\t\tidentity: identityValue,\n\t\t\tstack,\n\t\t\tappRoot,\n\t\t\truntimeRoot: effectiveIdentity.runtimeRoot,\n\t\t});\n\n\t\tconst program = Effect.gen(function* () {\n\t\t\tconst state = yield* makeProjectionRef();\n\t\t\tconst snapshot = yield* SnapshotOrchestratorService;\n\t\t\tconst fs = yield* FileSystem.FileSystem;\n\t\t\tconst snapshotCommandHandler = makeSnapshotCommandHandler({\n\t\t\t\tsnapshot,\n\t\t\t\tfs,\n\t\t\t\truntimeRoot: effectiveIdentity.runtimeRoot,\n\t\t\t});\n\t\t\tconst orchestratorSinks = yield* buildProductionOrchestratorSinks();\n\t\t\tconst postAcquireHook = yield* buildProductionPostAcquireHook({\n\t\t\t\textras: stack.options.extras,\n\t\t\t});\n\t\t\tyield* superviseStackEffect(\n\t\t\t\t{ _tag: 'Stack', members: stack.members, options: stack.options },\n\t\t\t\tidentityValue,\n\t\t\t\tstate,\n\t\t\t\t{\n\t\t\t\t\torchestratorSinks,\n\t\t\t\t\tcommandHandler: snapshotCommandHandler,\n\t\t\t\t\tpostAcquireHook,\n\t\t\t\t\textendContext: extendBuiltInPluginContext,\n\t\t\t\t\tbeforeInitialAcquire: (handle) =>\n\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\tconst stackPaths = yield* StackPathsService;\n\t\t\t\t\t\t\t// Reconcile any half-promoted snapshot restore from a\n\t\t\t\t\t\t\t// prior supervise (process hard-killed mid `tagImage`\n\t\t\t\t\t\t\t// loop, Docker daemon outage, etc.) BEFORE any plugin\n\t\t\t\t\t\t\t// acquire fires. The scanner is idempotent and a no-op\n\t\t\t\t\t\t\t// when no marker is present; partial recovery surfaces\n\t\t\t\t\t\t\t// via the returned summary's `stillPending` list which\n\t\t\t\t\t\t\t// we log so the operator can investigate.\n\t\t\t\t\t\t\tconst recovery = yield* snapshot.recoverPendingRestore.pipe(\n\t\t\t\t\t\t\t\tEffect.tapCause((cause) =>\n\t\t\t\t\t\t\t\t\tEffect.sync(() => {\n\t\t\t\t\t\t\t\t\t\tprocess.stderr.write(\n\t\t\t\t\t\t\t\t\t\t\t`snapshot recovery scan failed: ${Cause.pretty(cause as Cause.Cause<unknown>)}\\n`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\tEffect.catch(() => Effect.succeed(null)),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tif (recovery && !recovery.noMarker) {\n\t\t\t\t\t\t\t\tconst summary = `snapshot.recover-pending: inspected=${recovery.inspected} recovered=${recovery.recovered} stillPending=${recovery.stillPending.length} markerCleared=${recovery.markerCleared}`;\n\t\t\t\t\t\t\t\tprocess.stderr.write(`${summary}\\n`);\n\t\t\t\t\t\t\t\tif (recovery.stillPending.length > 0) {\n\t\t\t\t\t\t\t\t\tfor (const entry of recovery.stillPending) {\n\t\t\t\t\t\t\t\t\t\tprocess.stderr.write(\n\t\t\t\t\t\t\t\t\t\t\t` pending: ${entry.targetImageName} ← ${entry.stagedImageTag} (${entry.plugin}/${entry.role})\\n`,\n\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tconst commandChannel = yield* installCommandChannelBridge({\n\t\t\t\t\t\t\t\tstackRoot: stackPaths.stackRoot,\n\t\t\t\t\t\t\t\thandle,\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tyield* installLiveSupervisorRoster({\n\t\t\t\t\t\t\t\tstackRoot: stackPaths.stackRoot,\n\t\t\t\t\t\t\t\tapp: String(identityValue.app),\n\t\t\t\t\t\t\t\tstack: String(identityValue.stack),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tconst rendererEvents = yield* Queue.unbounded<EngineEvent>();\n\t\t\t\t\t\t\tconst renderer = makeTuiSurface({\n\t\t\t\t\t\t\t\tmode: rendererMode,\n\t\t\t\t\t\t\t\tpublishCommand: makeQueueCommandPublisher(handle.commands),\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tyield* Effect.addFinalizer(() =>\n\t\t\t\t\t\t\t\trenderer.flush.pipe(Effect.catch(() => Effect.void)),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\t\t\trenderer.mount(handle.state, Stream.fromQueue(rendererEvents)).pipe(\n\t\t\t\t\t\t\t\t\tEffect.catch((cause) =>\n\t\t\t\t\t\t\t\t\t\tEffect.sync(() => {\n\t\t\t\t\t\t\t\t\t\t\tprocess.stderr.write(`renderer failed: ${cause.detail ?? String(cause)}\\n`);\n\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\t\t\tpersistProjectionChanges(stackPaths.stackRoot, handle.state),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\t\t\tStream.fromQueue(handle.events).pipe(\n\t\t\t\t\t\t\t\t\tStream.runForEach((event) =>\n\t\t\t\t\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\t\t\t\t\tyield* Queue.offer(rendererEvents, event);\n\t\t\t\t\t\t\t\t\t\t\tyield* commandChannel.publishEvent(event);\n\t\t\t\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t}),\n\t\t\t\t},\n\t\t\t).pipe(Effect.provide(layerBuiltInPluginRuntime(orchestratorSinks)));\n\t\t});\n\n\t\t// `Effect.matchCauseEffect` projects the inner program's\n\t\t// cause to a typed `CliError` outcome — `CliSupervisorLiveError`\n\t\t// when the roster-claim path failed, otherwise a wrapped\n\t\t// `CliInternalError` whose `cause` carries the cascade for the\n\t\t// envelope renderer's `error.chain[]`.\n\t\treturn yield* program.pipe(\n\t\t\tEffect.provide(substrateLayers),\n\t\t\tEffect.provide(Logger.layer([])),\n\t\t\tEffect.matchCauseEffect({\n\t\t\t\tonFailure: (cause): Effect.Effect<CommandResult, CliError> => {\n\t\t\t\t\tconst live = findCliSupervisorLiveError(cause as Cause.Cause<unknown>);\n\t\t\t\t\tif (live !== null) {\n\t\t\t\t\t\treturn Effect.fail(live);\n\t\t\t\t\t}\n\t\t\t\t\treturn Effect.fail(\n\t\t\t\t\t\tnew CliInternalError({\n\t\t\t\t\t\t\tmessage: 'stack failed',\n\t\t\t\t\t\t\tcause: Cause.pretty(cause as Cause.Cause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,QAAQ,OAAO,MAAM,EAAE,CAAC,CAAC,EAChC,OAAO,iBAAiB;GACvB,YAAY,UAAkD;IAC7D,MAAM,OAAO,2BAA2B,MAA8B;AACtE,QAAI,SAAS,KACZ,QAAO,OAAO,KAAK,KAAK;AAEzB,WAAO,OAAO,KACb,IAAI,iBAAiB;KACpB,SAAS;KACT,OAAO,MAAM,OAAO,MAA8B;KAClD,CAAC,CACF;;GAEF,iBACC,OAAO,QAAQ,EAAE,UAAU,SAAS,IAAI,CAAC;GAC1C,CAAC,CACF;GACA"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { SnapshotOrchestratorService } from "../../orchestrators/snapshot/service.mjs";
|
|
2
|
+
import "../../orchestrators/snapshot/index.mjs";
|
|
3
|
+
import { removeRouterDispatchFilesForStack } from "../../orchestrators/router/cleanup.mjs";
|
|
4
|
+
import { ensureNoLiveSupervisor, identityValueFor } from "./identity.mjs";
|
|
5
|
+
import { buildDirectSnapshotLayers } from "./build-verb-layers.mjs";
|
|
6
|
+
import { provideFileSystem } from "./provide-file-system.mjs";
|
|
7
|
+
import { Effect, FileSystem, Logger } from "effect";
|
|
8
|
+
//#region src/cli/wirings/wipe.ts
|
|
9
|
+
const runWipeDirect = (identity) => Effect.gen(function* () {
|
|
10
|
+
yield* ensureNoLiveSupervisor(identity, "shut down the attached `devstack up` session first");
|
|
11
|
+
return yield* Effect.gen(function* () {
|
|
12
|
+
const snapshot = yield* SnapshotOrchestratorService;
|
|
13
|
+
yield* provideFileSystem(yield* FileSystem.FileSystem, snapshot.wipe({}));
|
|
14
|
+
yield* removeRouterDispatchFilesForStack({
|
|
15
|
+
runtimeRoot: identity.runtimeRoot,
|
|
16
|
+
app: identity.app,
|
|
17
|
+
stack: identity.stack
|
|
18
|
+
});
|
|
19
|
+
}).pipe(Effect.provide(buildDirectSnapshotLayers({
|
|
20
|
+
identity: identityValueFor(identity),
|
|
21
|
+
runtimeRoot: identity.runtimeRoot
|
|
22
|
+
})), Effect.provide(Logger.layer([Logger.consolePretty()])));
|
|
23
|
+
});
|
|
24
|
+
/** Read-only enumeration of the concrete targets a real `wipe` would
|
|
25
|
+
* remove — backs `devstack wipe --dry-run`. Deliberately does NOT
|
|
26
|
+
* `ensureNoLiveSupervisor` (a preview must work whether or not a
|
|
27
|
+
* supervisor is attached; it mutates nothing) and skips the router
|
|
28
|
+
* dispatch-file removal (that is a destructive side effect of the real
|
|
29
|
+
* wipe, not part of the preview). */
|
|
30
|
+
const runWipePlanDirect = (identity) => Effect.gen(function* () {
|
|
31
|
+
const snapshot = yield* SnapshotOrchestratorService;
|
|
32
|
+
return yield* provideFileSystem(yield* FileSystem.FileSystem, snapshot.wipePlan({}));
|
|
33
|
+
}).pipe(Effect.provide(buildDirectSnapshotLayers({
|
|
34
|
+
identity: identityValueFor(identity),
|
|
35
|
+
runtimeRoot: identity.runtimeRoot
|
|
36
|
+
})), Effect.provide(Logger.layer([Logger.consolePretty()])));
|
|
37
|
+
//#endregion
|
|
38
|
+
export { runWipeDirect, runWipePlanDirect };
|
|
39
|
+
|
|
40
|
+
//# sourceMappingURL=wipe.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wipe.mjs","names":[],"sources":["../../../src/cli/wirings/wipe.ts"],"sourcesContent":["// `devstack wipe` verb wiring — direct/offline path.\n//\n// Refuses to run when a supervisor owns the stack (the operator must\n// shut down `devstack up` first). When safe, drains the snapshot\n// catalog AND removes any router-dispatch files this stack contributed\n// so the router doesn't keep referencing endpoints that no longer\n// exist on disk.\n\nimport { Effect, FileSystem, Logger } from 'effect';\n\nimport {\n\tSnapshotOrchestratorService,\n\ttype WipeTargets,\n} from '../../orchestrators/snapshot/index.ts';\nimport { removeRouterDispatchFilesForStack } from '../../orchestrators/router/cleanup.ts';\n\nimport { ensureNoLiveSupervisor, identityValueFor, type ResolvedIdentity } from './identity.ts';\nimport { buildDirectSnapshotLayers } from './build-verb-layers.ts';\nimport { provideFileSystem } from './provide-file-system.ts';\n\nexport const runWipeDirect = (identity: ResolvedIdentity): Effect.Effect<void, unknown> =>\n\tEffect.gen(function* () {\n\t\tyield* ensureNoLiveSupervisor(identity, 'shut down the attached `devstack up` session first');\n\t\tconst program = Effect.gen(function* () {\n\t\t\tconst snapshot = yield* SnapshotOrchestratorService;\n\t\t\tconst fs = yield* FileSystem.FileSystem;\n\t\t\tyield* provideFileSystem(fs, snapshot.wipe({}));\n\t\t\tyield* removeRouterDispatchFilesForStack({\n\t\t\t\truntimeRoot: identity.runtimeRoot,\n\t\t\t\tapp: identity.app,\n\t\t\t\tstack: identity.stack,\n\t\t\t});\n\t\t});\n\t\treturn yield* program.pipe(\n\t\t\tEffect.provide(\n\t\t\t\tbuildDirectSnapshotLayers({\n\t\t\t\t\tidentity: identityValueFor(identity),\n\t\t\t\t\truntimeRoot: identity.runtimeRoot,\n\t\t\t\t}),\n\t\t\t),\n\t\t\tEffect.provide(Logger.layer([Logger.consolePretty()])),\n\t\t);\n\t});\n\n/** Read-only enumeration of the concrete targets a real `wipe` would\n * remove — backs `devstack wipe --dry-run`. Deliberately does NOT\n * `ensureNoLiveSupervisor` (a preview must work whether or not a\n * supervisor is attached; it mutates nothing) and skips the router\n * dispatch-file removal (that is a destructive side effect of the real\n * wipe, not part of the preview). */\nexport const runWipePlanDirect = (\n\tidentity: ResolvedIdentity,\n): Effect.Effect<WipeTargets, unknown> =>\n\tEffect.gen(function* () {\n\t\tconst snapshot = yield* SnapshotOrchestratorService;\n\t\tconst fs = yield* FileSystem.FileSystem;\n\t\treturn yield* provideFileSystem(fs, snapshot.wipePlan({}));\n\t}).pipe(\n\t\tEffect.provide(\n\t\t\tbuildDirectSnapshotLayers({\n\t\t\t\tidentity: identityValueFor(identity),\n\t\t\t\truntimeRoot: identity.runtimeRoot,\n\t\t\t}),\n\t\t),\n\t\tEffect.provide(Logger.layer([Logger.consolePretty()])),\n\t);\n"],"mappings":";;;;;;;;AAoBA,MAAa,iBAAiB,aAC7B,OAAO,IAAI,aAAa;AACvB,QAAO,uBAAuB,UAAU,qDAAqD;AAW7F,QAAO,OAVS,OAAO,IAAI,aAAa;EACvC,MAAM,WAAW,OAAO;AAExB,SAAO,kBAAkB,OADP,WAAW,YACA,SAAS,KAAK,EAAE,CAAC,CAAC;AAC/C,SAAO,kCAAkC;GACxC,aAAa,SAAS;GACtB,KAAK,SAAS;GACd,OAAO,SAAS;GAChB,CAAC;GAEkB,CAAC,KACrB,OAAO,QACN,0BAA0B;EACzB,UAAU,iBAAiB,SAAS;EACpC,aAAa,SAAS;EACtB,CAAC,CACF,EACD,OAAO,QAAQ,OAAO,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CACtD;EACA;;;;;;;AAQH,MAAa,qBACZ,aAEA,OAAO,IAAI,aAAa;CACvB,MAAM,WAAW,OAAO;AAExB,QAAO,OAAO,kBAAkB,OADd,WAAW,YACO,SAAS,SAAS,EAAE,CAAC,CAAC;EACzD,CAAC,KACF,OAAO,QACN,0BAA0B;CACzB,UAAU,iBAAiB,SAAS;CACpC,aAAa,SAAS;CACtB,CAAC,CACF,EACD,OAAO,QAAQ,OAAO,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC,CAAC,CACtD"}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { CodegenableDecl } from "./codegenable.mjs";
|
|
2
|
-
import { LivenessClassifierDecl } from "./liveness-classifier.mjs";
|
|
3
2
|
import { ProjectionDecl } from "./projection.mjs";
|
|
4
3
|
import { RoutableDecl } from "./routable.mjs";
|
|
5
4
|
import { SnapshotableDecl } from "./snapshotable.mjs";
|
|
@@ -21,7 +20,6 @@ interface DevstackCapabilityRegistry {
|
|
|
21
20
|
readonly codegenable: Omit<CodegenableDecl<string>, 'kind'>;
|
|
22
21
|
readonly projection: Omit<ProjectionDecl, 'kind'>;
|
|
23
22
|
readonly 'strategy-contributor': Omit<StrategyContributorDecl<string, unknown>, 'kind'>;
|
|
24
|
-
readonly 'liveness-classifier': Omit<LivenessClassifierDecl, 'kind'>;
|
|
25
23
|
}
|
|
26
24
|
type CapabilityKind = keyof DevstackCapabilityRegistry & string;
|
|
27
25
|
type RegisteredCapabilityDecl<Kind extends CapabilityKind = CapabilityKind> = { readonly [K in Kind]: Readonly<{
|
|
@@ -22,6 +22,38 @@ interface CodegenEmitContext {
|
|
|
22
22
|
interface CodegenEmitDone {
|
|
23
23
|
readonly _tag: 'CodegenEmitDone';
|
|
24
24
|
}
|
|
25
|
+
/**
|
|
26
|
+
* Optional cross-decl aggregation. When present, the codegen
|
|
27
|
+
* orchestrator additionally folds this decl's exported map into a
|
|
28
|
+
* shared aggregate file alongside its own per-decl output.
|
|
29
|
+
*
|
|
30
|
+
* Architectural note: the orchestrator treats `bucket` as opaque and
|
|
31
|
+
* delegates the projection to the plugin via `project`. Aggregate
|
|
32
|
+
* special-casing (e.g. "the Sui `services.ts` row holds `{rpc,
|
|
33
|
+
* faucet, graphql}`") belongs in the plugin's contributor, NOT in
|
|
34
|
+
* the codegen orchestrator (architecture: "Orchestrator boundaries
|
|
35
|
+
* — never names a service").
|
|
36
|
+
*/
|
|
37
|
+
interface AggregateContribution {
|
|
38
|
+
/** Which aggregate file this decl contributes to (e.g.
|
|
39
|
+
* `'accounts.ts'`, `'coins.ts'`, `'packages.ts'`,
|
|
40
|
+
* `'services.ts'`). The plugin chooses; the orchestrator treats
|
|
41
|
+
* it as opaque. Distinct decls that target the same `bucket`
|
|
42
|
+
* shallow-merge into one aggregate file. */
|
|
43
|
+
readonly bucket: string;
|
|
44
|
+
/** Project this decl's `exported` map into the value to merge
|
|
45
|
+
* into the aggregate bucket. Returning `null` opts out of
|
|
46
|
+
* contributing for this cycle (e.g. when the emitter produced
|
|
47
|
+
* no usable shape). The returned record is shallow-merged onto
|
|
48
|
+
* the bucket; for typed shapes the plugin owns the merge
|
|
49
|
+
* semantics via the returned object's key set. */
|
|
50
|
+
readonly project: (exported: Readonly<Record<string, unknown>>) => Readonly<Record<string, unknown>> | null;
|
|
51
|
+
/** Optional plugin-supplied kind tag for diagnostics / span
|
|
52
|
+
* attributes (e.g. `'sui-network'`, `'account'`). The
|
|
53
|
+
* orchestrator MUST NOT branch on this value — it is annotation-
|
|
54
|
+
* only. */
|
|
55
|
+
readonly kind?: string;
|
|
56
|
+
}
|
|
25
57
|
/**
|
|
26
58
|
* Codegen contribution. `Emitter` is a literal emitter name used
|
|
27
59
|
* by the codegen orchestrator for attribution and grouping.
|
|
@@ -34,6 +66,17 @@ interface CodegenableDecl<Emitter extends string = string> {
|
|
|
34
66
|
/** Optional sensitivity flag — drives file permissions and
|
|
35
67
|
* `.gitignore` inclusion. */
|
|
36
68
|
readonly sensitive?: boolean;
|
|
69
|
+
/** When `true`, multiple decls may share this `emitterName`
|
|
70
|
+
* (the orchestrator skips the emitter-name uniqueness check for
|
|
71
|
+
* this decl). Use sparingly — only when the plugin legitimately
|
|
72
|
+
* emits one decl per item (e.g. one `Package` per published
|
|
73
|
+
* package). Output-path uniqueness is still enforced. */
|
|
74
|
+
readonly allowEmitterNameRepetition?: boolean;
|
|
75
|
+
/** Optional aggregation seam — when present, the orchestrator
|
|
76
|
+
* folds the per-decl exported map into a shared aggregate file
|
|
77
|
+
* via `aggregate.project(exported)`. Plugins own the projection
|
|
78
|
+
* shape; the orchestrator is name-blind. */
|
|
79
|
+
readonly aggregate?: AggregateContribution;
|
|
37
80
|
/** Emit operation; writes generated file declarations through the
|
|
38
81
|
* supplied context. */
|
|
39
82
|
readonly emit: (ctx: CodegenEmitContext) => Effect.Effect<CodegenEmitDone>;
|
|
@@ -34,6 +34,16 @@ interface ContainerBuildContext {
|
|
|
34
34
|
* Omitted means Docker uses the host/default platform. */
|
|
35
35
|
readonly platform?: string;
|
|
36
36
|
readonly buildArgs?: Readonly<Record<string, string>>;
|
|
37
|
+
/** Optional owner identity. When set, the runtime stamps
|
|
38
|
+
* `{managed:'true', app, stack, plugin?, role?}` as `--label` flags
|
|
39
|
+
* on `docker build`, making the resulting image visible to
|
|
40
|
+
* label-driven prune. Without it the image lands unlabelled. */
|
|
41
|
+
readonly owner?: {
|
|
42
|
+
readonly app: string;
|
|
43
|
+
readonly stack: string;
|
|
44
|
+
readonly plugin?: string;
|
|
45
|
+
readonly role?: string;
|
|
46
|
+
};
|
|
37
47
|
}
|
|
38
48
|
interface ContainerPortPublish {
|
|
39
49
|
readonly containerPort: number;
|
|
@@ -41,6 +51,14 @@ interface ContainerPortPublish {
|
|
|
41
51
|
readonly hostIp?: string;
|
|
42
52
|
}
|
|
43
53
|
type PortBindingReconciliation = 'exact' | 'adopt-existing';
|
|
54
|
+
/** Per-network DNS alias plumbing. `aliases` are passed through to
|
|
55
|
+
* Docker as `--network-alias` (first attach, baked into
|
|
56
|
+
* `docker run`) or `--alias` (subsequent attaches via
|
|
57
|
+
* `docker network connect`). */
|
|
58
|
+
interface NetworkAttachment {
|
|
59
|
+
readonly name: string;
|
|
60
|
+
readonly aliases?: ReadonlyArray<string>;
|
|
61
|
+
}
|
|
44
62
|
interface EnsureContainerSpec {
|
|
45
63
|
readonly name: string;
|
|
46
64
|
readonly image: ImageRef;
|
|
@@ -64,7 +82,14 @@ interface EnsureContainerSpec {
|
|
|
64
82
|
* container keep its current published ports; callers must read
|
|
65
83
|
* the returned `ContainerHandle.ports` before constructing URLs. */
|
|
66
84
|
readonly portBindingReconciliation?: PortBindingReconciliation;
|
|
67
|
-
|
|
85
|
+
/** Networks to attach. Each entry is either a bare network name
|
|
86
|
+
* (no extra DNS aliases) or `{ name, aliases }` to register
|
|
87
|
+
* per-network DNS aliases via `docker run --network-alias` (for the
|
|
88
|
+
* first attach) or `docker network connect --alias` (for any
|
|
89
|
+
* subsequent attach). Docker registers the container name on every
|
|
90
|
+
* attached network unconditionally; aliases here are *additional*
|
|
91
|
+
* DNS names siblings can dial under the same network. */
|
|
92
|
+
readonly networkAttach?: ReadonlyArray<string | NetworkAttachment>;
|
|
68
93
|
/** Bind mounts. The build-container path lives here: source dir →
|
|
69
94
|
* container path. `readonly: true` flips on the docker mount
|
|
70
95
|
* read-only flag. */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/contracts/faucet-strategy.d.ts
|
|
4
|
+
/** Request passed to faucet strategies. `amount` is the chain-native
|
|
5
|
+
* smallest unit (MIST for SUI). Some backends (the local sui-faucet
|
|
6
|
+
* binary) grant a fixed amount per request and IGNORE this value;
|
|
7
|
+
* the parameter is here for type uniformity and to land
|
|
8
|
+
* correctly-denominated values in tagged exhaustion errors. */
|
|
9
|
+
interface FaucetRequest {
|
|
10
|
+
readonly address: string;
|
|
11
|
+
readonly amount: bigint;
|
|
12
|
+
}
|
|
13
|
+
/** Strategy interface a contributing plugin satisfies to participate
|
|
14
|
+
* in cross-cutting faucet dispatch for a specific chain id. Generic
|
|
15
|
+
* over the strategy's own error channel (`E`).
|
|
16
|
+
*
|
|
17
|
+
* The dispatch surface is uniform across strategies — the
|
|
18
|
+
* dispatcher doesn't know how a strategy delivers coins, only how
|
|
19
|
+
* to invoke it. */
|
|
20
|
+
interface FaucetStrategy<E = unknown> {
|
|
21
|
+
readonly request: (req: FaucetRequest) => Effect.Effect<void, E>;
|
|
22
|
+
}
|
|
23
|
+
//#endregion
|
|
24
|
+
export { FaucetStrategy };
|
|
25
|
+
//# sourceMappingURL=faucet-strategy.d.mts.map
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { Effect } from "effect";
|
|
2
|
+
|
|
3
|
+
//#region src/contracts/funding-strategy.d.ts
|
|
4
|
+
/** Request passed to account funding strategies. `amount` uses the
|
|
5
|
+
* funded coin's smallest unit. The resolved account handle (`account`)
|
|
6
|
+
* is present so strategies without an admin signer can perform
|
|
7
|
+
* account-owned swaps while still sharing the central funding
|
|
8
|
+
* dispatcher. */
|
|
9
|
+
interface AccountFundingRequest<A = unknown> {
|
|
10
|
+
readonly address: string;
|
|
11
|
+
readonly amount: bigint;
|
|
12
|
+
/** Resolved handle for the funded account, when one is available. Present
|
|
13
|
+
* for the boot-time funding pass (the funded address IS a stack account) and
|
|
14
|
+
* required by account-spending strategies (`requiresRecipientAccount`), which
|
|
15
|
+
* swap the recipient's own SUI. Mint-style strategies that transfer to a
|
|
16
|
+
* passive recipient ignore it, so it is optional — a caller funding an
|
|
17
|
+
* arbitrary `0x…` recipient (e.g. the dashboard) may leave it undefined. */
|
|
18
|
+
readonly account?: A;
|
|
19
|
+
}
|
|
20
|
+
/** Strategy interface a contributing plugin satisfies to participate in
|
|
21
|
+
* cross-cutting account funding for a specific coin key. Generic over
|
|
22
|
+
* the resolved account handle (`A`) and the strategy's own error
|
|
23
|
+
* channel (`E`). */
|
|
24
|
+
interface AccountFundingStrategy<E = unknown, A = unknown> {
|
|
25
|
+
readonly request: (req: AccountFundingRequest<A>) => Effect.Effect<void, E>;
|
|
26
|
+
/** True when the strategy calls `account.withTransactionSigner`.
|
|
27
|
+
* The dispatcher must not acquire the same non-reentrant
|
|
28
|
+
* per-address lease outside the strategy. */
|
|
29
|
+
readonly usesAccountSigner?: boolean;
|
|
30
|
+
/** True when the strategy spends the *recipient's own* funds (an
|
|
31
|
+
* account-owned swap — WAL/DEEP buy the coin with the recipient's SUI), so
|
|
32
|
+
* the recipient MUST be a resolved account with a signer (`req.account`).
|
|
33
|
+
* Distinct from `usesAccountSigner`: a mint-style strategy signs with the
|
|
34
|
+
* publisher's account (so `usesAccountSigner` is true) yet transfers to a
|
|
35
|
+
* *passive* recipient that need not be a stack account, leaving this false.
|
|
36
|
+
* Callers (e.g. the dashboard fund action) gate the "recipient must be an
|
|
37
|
+
* account" check on this flag, not on `usesAccountSigner`. */
|
|
38
|
+
readonly requiresRecipientAccount?: boolean;
|
|
39
|
+
}
|
|
40
|
+
//#endregion
|
|
41
|
+
export { AccountFundingRequest, AccountFundingStrategy };
|
|
42
|
+
//# sourceMappingURL=funding-strategy.d.mts.map
|