@mysten-incubation/devstack 0.0.1 → 0.1.1
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 +8 -4
- 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 +41 -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,91 @@
|
|
|
1
|
+
import { definePlugin, resource } from "../../substrate/plugin.mjs";
|
|
2
|
+
import "../../api/define-plugin.mjs";
|
|
3
|
+
import { IdentityContext } from "../../substrate/runtime/paths.mjs";
|
|
4
|
+
import { ControlPlaneService } from "../../substrate/runtime/control-plane/service.mjs";
|
|
5
|
+
import { ContainerRuntimeService } from "../../runtime/docker/service.mjs";
|
|
6
|
+
import { StrategyRegistryService } from "../../substrate/runtime/strategy-registry/service.mjs";
|
|
7
|
+
import { PortBrokerService } from "../../substrate/runtime/port-broker/service.mjs";
|
|
8
|
+
import "../../substrate/runtime/port-broker/index.mjs";
|
|
9
|
+
import "../../substrate/runtime/strategy-registry/index.mjs";
|
|
10
|
+
import { renderUrl, routedHostname } from "../../substrate/runtime/routed-url.mjs";
|
|
11
|
+
import { DASHBOARD_ENTRYPOINT_PORT, makeDashboardRoutable } from "./routable.mjs";
|
|
12
|
+
import { listenScopedHttpServer } from "../../substrate/runtime/scoped-http-server.mjs";
|
|
13
|
+
import { buildDashboardDomain } from "./domain.mjs";
|
|
14
|
+
import { resolveOriginPolicy } from "./origin-policy.mjs";
|
|
15
|
+
import { makeDashboardListener } from "./server.mjs";
|
|
16
|
+
import { Effect } from "effect";
|
|
17
|
+
//#region src/plugins/dashboard/index.ts
|
|
18
|
+
const dashboardResource = resource("dashboard");
|
|
19
|
+
const DASHBOARD_DEFAULT_BIND = "0.0.0.0";
|
|
20
|
+
/** Construct the devstack dashboard plugin. */
|
|
21
|
+
function dashboard(opts = {}) {
|
|
22
|
+
return definePlugin({
|
|
23
|
+
id: dashboardResource.id,
|
|
24
|
+
role: "service",
|
|
25
|
+
section: "service",
|
|
26
|
+
start: () => Effect.gen(function* () {
|
|
27
|
+
const portBroker = yield* PortBrokerService;
|
|
28
|
+
const control = yield* ControlPlaneService;
|
|
29
|
+
const identity = yield* IdentityContext;
|
|
30
|
+
const containerRuntimeOpt = yield* Effect.serviceOption(ContainerRuntimeService);
|
|
31
|
+
const containerRuntime = containerRuntimeOpt._tag === "Some" ? containerRuntimeOpt.value : null;
|
|
32
|
+
const strategyRegistryOpt = yield* Effect.serviceOption(StrategyRegistryService);
|
|
33
|
+
const strategyRegistry = strategyRegistryOpt._tag === "Some" ? strategyRegistryOpt.value : null;
|
|
34
|
+
const pluginDomain = buildDashboardDomain({
|
|
35
|
+
control: control.domain,
|
|
36
|
+
identity,
|
|
37
|
+
containerRuntime,
|
|
38
|
+
strategyRegistry
|
|
39
|
+
});
|
|
40
|
+
const bindAddress = opts.bindAddress ?? DASHBOARD_DEFAULT_BIND;
|
|
41
|
+
const allocated = yield* portBroker.allocate({
|
|
42
|
+
owner: "dashboard",
|
|
43
|
+
windowHint: {
|
|
44
|
+
start: 39300,
|
|
45
|
+
size: 1e3
|
|
46
|
+
},
|
|
47
|
+
probeHost: bindAddress === "0.0.0.0" ? "0.0.0.0" : "127.0.0.1",
|
|
48
|
+
...opts.port === void 0 ? {} : { preferredPort: opts.port }
|
|
49
|
+
});
|
|
50
|
+
const routedDashboardOrigin = yield* routedHostname(identity, "api").pipe(Effect.map((hostname) => renderUrl({
|
|
51
|
+
protocol: "http",
|
|
52
|
+
hostname,
|
|
53
|
+
port: DASHBOARD_ENTRYPOINT_PORT
|
|
54
|
+
})), Effect.orElseSucceed(() => null));
|
|
55
|
+
const directOrigins = [`http://127.0.0.1:${allocated.port}`, `http://localhost:${allocated.port}`];
|
|
56
|
+
const originPolicy = yield* resolveOriginPolicy({
|
|
57
|
+
app: identity.app,
|
|
58
|
+
stack: identity.stack,
|
|
59
|
+
routedDashboardOrigin,
|
|
60
|
+
directOrigins,
|
|
61
|
+
extraOrigins: opts.allowedOrigins ?? []
|
|
62
|
+
});
|
|
63
|
+
return {
|
|
64
|
+
url: (yield* listenScopedHttpServer({
|
|
65
|
+
bindAddress,
|
|
66
|
+
port: allocated.port,
|
|
67
|
+
listener: makeDashboardListener({
|
|
68
|
+
originPolicy,
|
|
69
|
+
context: {
|
|
70
|
+
state: control.state,
|
|
71
|
+
publishCommand: control.publishCommand,
|
|
72
|
+
domain: control.domain,
|
|
73
|
+
pluginDomain
|
|
74
|
+
}
|
|
75
|
+
}),
|
|
76
|
+
onListenError: (cause) => /* @__PURE__ */ new Error(`dashboard HTTP server listen failed on ${bindAddress}:${allocated.port}: ${String(cause)}`)
|
|
77
|
+
})).url,
|
|
78
|
+
localPort: allocated.port
|
|
79
|
+
};
|
|
80
|
+
}),
|
|
81
|
+
capabilities: ({ value, runtime }) => [makeDashboardRoutable({
|
|
82
|
+
app: runtime.identity.app,
|
|
83
|
+
stack: runtime.identity.stack,
|
|
84
|
+
port: value.localPort
|
|
85
|
+
})]
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
//#endregion
|
|
89
|
+
export { dashboard };
|
|
90
|
+
|
|
91
|
+
//# sourceMappingURL=index.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","names":[],"sources":["../../../src/plugins/dashboard/index.ts"],"sourcesContent":["// Dashboard plugin.\n//\n// Runs an in-process GraphQL server (Pothos schema + graphql-yoga) that\n// exposes the live projection, control commands, and the projection\n// subscription. Modeled on the `wallet` plugin: allocate a loopback port\n// from the port broker, start a scoped HTTP server, and contribute a\n// Routable so the router fronts it under `dashboard.<app>.<stack>.localhost`.\n//\n// Data access is pure control plane: the projection (`state`) and command\n// publisher (`publishCommand`) come from `ControlPlaneService`, handed to\n// the server as the GraphQL context.\n\nimport { Effect } from 'effect';\nimport { type AnyPlugin, definePlugin, resource } from '../../api/define-plugin.ts';\nimport { ContainerRuntimeService } from '../../runtime/docker/service.ts';\nimport type { ContainerRuntime } from '../../contracts/container-runtime.ts';\nimport type { StrategyRegistry } from '../../contracts/strategy-contributor.ts';\nimport { StrategyRegistryService } from '../../substrate/runtime/strategy-registry/index.ts';\nimport { ControlPlaneService } from '../../substrate/runtime/control-plane/service.ts';\nimport { IdentityContext } from '../../substrate/runtime/paths.ts';\nimport { PortBrokerService } from '../../substrate/runtime/port-broker/index.ts';\nimport { renderUrl, routedHostname } from '../../substrate/runtime/routed-url.ts';\nimport { listenScopedHttpServer } from '../../substrate/runtime/scoped-http-server.ts';\nimport { buildDashboardDomain } from './domain.ts';\nimport { resolveOriginPolicy } from './origin-policy.ts';\nimport {\n\tDASHBOARD_ENTRYPOINT_PORT,\n\tDASHBOARD_ROUTE_ROLE,\n\tmakeDashboardRoutable,\n} from './routable.ts';\nimport { makeDashboardListener } from './server.ts';\n\nexport interface DashboardOptions {\n\t/** Preferred loopback port; the broker forward-scans if it's busy. */\n\treadonly port?: number;\n\t/** NIC the HTTP server binds. Defaults to `'0.0.0.0'` because the router\n\t * runs in Docker and must reach this host process through the host-gateway\n\t * address on native Linux (a `127.0.0.1`-only listener is unreachable from\n\t * the host-gateway IP). The public dashboard URL stays router-fronted and\n\t * stack-scoped. */\n\treadonly bindAddress?: string;\n\t/** Extra origins merged on top of the dashboard's own router-fronted origin\n\t * for this stack (and the direct loopback origins). Useful for headless\n\t * test runners and custom dev hosts. The dashboard does NOT auto-allowlist\n\t * a bare `*.localhost` form — that is not stack-scoped, so a sibling stack\n\t * could drive the destructive control-plane mutations cross-origin. */\n\treadonly allowedOrigins?: ReadonlyArray<string>;\n\t// Note on log retention: the queryable cross-service log store the\n\t// dashboard reads is process-scoped and owned by the SUPERVISOR (not this\n\t// plugin), so its capacity is configured there. Tune it with the\n\t// `DEVSTACK_DASHBOARD_LOG_CAPACITY` (per-service record cap, default 2000)\n\t// and `DEVSTACK_DASHBOARD_LOG_MAX_SERVICES` (distinct-ring cap, default\n\t// 256) env vars, or programmatically via `SupervisorStartupOptions.logStore`.\n\t// See substrate/runtime/observability/log-store.ts.\n}\n\nexport interface DashboardValue {\n\t/** Loopback URL of the dashboard server. */\n\treadonly url: string;\n\t/** The allocated loopback port. */\n\treadonly localPort: number;\n}\n\nconst dashboardResource = resource<'dashboard', DashboardValue>('dashboard');\n// `0.0.0.0`: the router runs in Docker, so on native Linux it reaches this\n// host process through the Docker host-gateway address instead of host\n// loopback — a `127.0.0.1`-only listener is unreachable from that IP, which\n// produced a 502 from Traefik and the `RouteReadinessProbeFailed` WARN. The\n// published dashboard URL remains stack-scoped through the router. Mirrors\n// `WALLET_DEFAULT_BIND_ADDRESS`.\nconst DASHBOARD_DEFAULT_BIND = '0.0.0.0';\n\n/** Construct the devstack dashboard plugin. */\nexport function dashboard(opts: DashboardOptions = {}): AnyPlugin {\n\treturn definePlugin({\n\t\tid: dashboardResource.id,\n\t\trole: 'service',\n\t\tsection: 'service',\n\t\tstart: () =>\n\t\t\tEffect.gen(function* () {\n\t\t\t\tconst portBroker = yield* PortBrokerService;\n\t\t\t\tconst control = yield* ControlPlaneService;\n\t\t\t\tconst identity = yield* IdentityContext;\n\t\t\t\t// The ContainerRuntime drives the Postgres `psql` exec-probe.\n\t\t\t\t// It is in the base substrate plugin context in production\n\t\t\t\t// wiring; read it optionally so bare smoke-test paths that\n\t\t\t\t// don't layer it degrade `postgresStats` to unavailable\n\t\t\t\t// rather than failing acquisition.\n\t\t\t\tconst containerRuntimeOpt = yield* Effect.serviceOption(ContainerRuntimeService);\n\t\t\t\tconst containerRuntime: ContainerRuntime | null =\n\t\t\t\t\tcontainerRuntimeOpt._tag === 'Some' ? containerRuntimeOpt.value : null;\n\n\t\t\t\t// The scope-local strategy registry — the SAME registry the\n\t\t\t\t// boot-time account funding pass dispatches through. Drives the\n\t\t\t\t// Faucet panel's `fundableCoins` + `fundAccount` (SUI via the\n\t\t\t\t// faucet strategy, WAL/DEEP via the coin-specific funding\n\t\t\t\t// strategies). Read optionally so bare smoke-test paths that don't\n\t\t\t\t// layer it degrade the fund accessors to unavailable.\n\t\t\t\tconst strategyRegistryOpt = yield* Effect.serviceOption(StrategyRegistryService);\n\t\t\t\tconst strategyRegistry: StrategyRegistry | null =\n\t\t\t\t\tstrategyRegistryOpt._tag === 'Some' ? strategyRegistryOpt.value : null;\n\n\t\t\t\t// Plugin-name-aware shaping lives HERE (the plugin layer is\n\t\t\t\t// allowed to name plugins), built off the generic, name-blind\n\t\t\t\t// control-plane `resolvedValues` seam + the container runtime.\n\t\t\t\tconst pluginDomain = buildDashboardDomain({\n\t\t\t\t\tcontrol: control.domain,\n\t\t\t\t\tidentity,\n\t\t\t\t\tcontainerRuntime,\n\t\t\t\t\tstrategyRegistry,\n\t\t\t\t});\n\n\t\t\t\tconst bindAddress = opts.bindAddress ?? DASHBOARD_DEFAULT_BIND;\n\t\t\t\tconst allocated = yield* portBroker.allocate({\n\t\t\t\t\towner: 'dashboard',\n\t\t\t\t\twindowHint: { start: 39300, size: 1000 },\n\t\t\t\t\tprobeHost: bindAddress === '0.0.0.0' ? '0.0.0.0' : '127.0.0.1',\n\t\t\t\t\t...(opts.port === undefined ? {} : { preferredPort: opts.port }),\n\t\t\t\t});\n\n\t\t\t\t// Derive the dashboard's OWN router-fronted origin for this stack.\n\t\t\t\t// The bundled SPA is served same-origin from this hostname, so the\n\t\t\t\t// browser's `Origin` on `/graphql` is exactly this value — it MUST\n\t\t\t\t// be in the allowlist. Host = `<role:api>.<app>.<stack>.localhost`\n\t\t\t\t// (per `routedHostname`), port = the router entrypoint port (9810),\n\t\t\t\t// which is the port the browser actually uses, NOT the broker\n\t\t\t\t// loopback port. Router-derivation failure → `null` (allowlist still\n\t\t\t\t// includes the direct loopback + caller origins).\n\t\t\t\tconst routedDashboardOrigin = yield* routedHostname(identity, DASHBOARD_ROUTE_ROLE).pipe(\n\t\t\t\t\tEffect.map((hostname) =>\n\t\t\t\t\t\trenderUrl({ protocol: 'http', hostname, port: DASHBOARD_ENTRYPOINT_PORT }),\n\t\t\t\t\t),\n\t\t\t\t\tEffect.orElseSucceed(() => null),\n\t\t\t\t);\n\n\t\t\t\t// Direct loopback origins: when the dashboard is reached on the raw\n\t\t\t\t// broker port (host-loopback fallback / direct tooling) the SPA's\n\t\t\t\t// same-origin `Origin` is the loopback form. Both 127.0.0.1 and\n\t\t\t\t// localhost name the same listener; allow both for this stack's port.\n\t\t\t\tconst directOrigins = [\n\t\t\t\t\t`http://127.0.0.1:${allocated.port}`,\n\t\t\t\t\t`http://localhost:${allocated.port}`,\n\t\t\t\t];\n\n\t\t\t\tconst originPolicy = yield* resolveOriginPolicy({\n\t\t\t\t\tapp: identity.app,\n\t\t\t\t\tstack: identity.stack,\n\t\t\t\t\troutedDashboardOrigin,\n\t\t\t\t\tdirectOrigins,\n\t\t\t\t\textraOrigins: opts.allowedOrigins ?? [],\n\t\t\t\t});\n\n\t\t\t\tconst server = yield* listenScopedHttpServer({\n\t\t\t\t\tbindAddress,\n\t\t\t\t\tport: allocated.port,\n\t\t\t\t\tlistener: makeDashboardListener({\n\t\t\t\t\t\toriginPolicy,\n\t\t\t\t\t\tcontext: {\n\t\t\t\t\t\t\tstate: control.state,\n\t\t\t\t\t\t\tpublishCommand: control.publishCommand,\n\t\t\t\t\t\t\tdomain: control.domain,\n\t\t\t\t\t\t\tpluginDomain,\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t\tonListenError: (cause) =>\n\t\t\t\t\t\tnew Error(\n\t\t\t\t\t\t\t`dashboard HTTP server listen failed on ${bindAddress}:${allocated.port}: ${String(cause)}`,\n\t\t\t\t\t\t),\n\t\t\t\t});\n\n\t\t\t\treturn { url: server.url, localPort: allocated.port } satisfies DashboardValue;\n\t\t\t}),\n\t\tcapabilities: ({ value, runtime }) => [\n\t\t\tmakeDashboardRoutable({\n\t\t\t\tapp: runtime.identity.app,\n\t\t\t\tstack: runtime.identity.stack,\n\t\t\t\tport: value.localPort,\n\t\t\t}),\n\t\t],\n\t});\n}\n"],"mappings":";;;;;;;;;;;;;;;;;AA+DA,MAAM,oBAAoB,SAAsC,YAAY;AAO5E,MAAM,yBAAyB;;AAG/B,SAAgB,UAAU,OAAyB,EAAE,EAAa;AACjE,QAAO,aAAa;EACnB,IAAI,kBAAkB;EACtB,MAAM;EACN,SAAS;EACT,aACC,OAAO,IAAI,aAAa;GACvB,MAAM,aAAa,OAAO;GAC1B,MAAM,UAAU,OAAO;GACvB,MAAM,WAAW,OAAO;GAMxB,MAAM,sBAAsB,OAAO,OAAO,cAAc,wBAAwB;GAChF,MAAM,mBACL,oBAAoB,SAAS,SAAS,oBAAoB,QAAQ;GAQnE,MAAM,sBAAsB,OAAO,OAAO,cAAc,wBAAwB;GAChF,MAAM,mBACL,oBAAoB,SAAS,SAAS,oBAAoB,QAAQ;GAKnE,MAAM,eAAe,qBAAqB;IACzC,SAAS,QAAQ;IACjB;IACA;IACA;IACA,CAAC;GAEF,MAAM,cAAc,KAAK,eAAe;GACxC,MAAM,YAAY,OAAO,WAAW,SAAS;IAC5C,OAAO;IACP,YAAY;KAAE,OAAO;KAAO,MAAM;KAAM;IACxC,WAAW,gBAAgB,YAAY,YAAY;IACnD,GAAI,KAAK,SAAS,KAAA,IAAY,EAAE,GAAG,EAAE,eAAe,KAAK,MAAM;IAC/D,CAAC;GAUF,MAAM,wBAAwB,OAAO,eAAe,UAAA,MAA+B,CAAC,KACnF,OAAO,KAAK,aACX,UAAU;IAAE,UAAU;IAAQ;IAAU,MAAM;IAA2B,CAAC,CAC1E,EACD,OAAO,oBAAoB,KAAK,CAChC;GAMD,MAAM,gBAAgB,CACrB,oBAAoB,UAAU,QAC9B,oBAAoB,UAAU,OAC9B;GAED,MAAM,eAAe,OAAO,oBAAoB;IAC/C,KAAK,SAAS;IACd,OAAO,SAAS;IAChB;IACA;IACA,cAAc,KAAK,kBAAkB,EAAE;IACvC,CAAC;AAoBF,UAAO;IAAE,MAAK,OAlBQ,uBAAuB;KAC5C;KACA,MAAM,UAAU;KAChB,UAAU,sBAAsB;MAC/B;MACA,SAAS;OACR,OAAO,QAAQ;OACf,gBAAgB,QAAQ;OACxB,QAAQ,QAAQ;OAChB;OACA;MACD,CAAC;KACF,gBAAgB,0BACf,IAAI,MACH,0CAA0C,YAAY,GAAG,UAAU,KAAK,IAAI,OAAO,MAAM,GACzF;KACF,CAAC,EAEmB;IAAK,WAAW,UAAU;IAAM;IACpD;EACH,eAAe,EAAE,OAAO,cAAc,CACrC,sBAAsB;GACrB,KAAK,QAAQ,SAAS;GACtB,OAAO,QAAQ,SAAS;GACxB,MAAM,MAAM;GACZ,CAAC,CACF;EACD,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { SpanAttr } from "../../substrate/runtime/observability/spans.mjs";
|
|
2
|
+
import { Effect } from "effect";
|
|
3
|
+
//#region src/plugins/dashboard/origin-policy.ts
|
|
4
|
+
/**
|
|
5
|
+
* Resolve the per-stack origin allowlist.
|
|
6
|
+
*
|
|
7
|
+
* - Always allowlisted: the dashboard's router-fronted origin for this
|
|
8
|
+
* stack (`routedDashboardOrigin`), when the router derivation produced
|
|
9
|
+
* one — this is the same-origin the bundled SPA loads from.
|
|
10
|
+
* - Always allowlisted: the direct loopback origins + any explicit
|
|
11
|
+
* caller-supplied `extraOrigins`.
|
|
12
|
+
*
|
|
13
|
+
* Empty-allowlist policy: allowed. The dashboard boots normally; with an
|
|
14
|
+
* empty allowlist the per-request gate refuses every cross-origin request
|
|
15
|
+
* (every Origin lands in `forbidden`). A `logWarning` surfaces the
|
|
16
|
+
* configuration for operator visibility.
|
|
17
|
+
*/
|
|
18
|
+
const resolveOriginPolicy = (inputs) => Effect.gen(function* () {
|
|
19
|
+
const allowed = /* @__PURE__ */ new Set();
|
|
20
|
+
if (inputs.routedDashboardOrigin !== null) allowed.add(inputs.routedDashboardOrigin);
|
|
21
|
+
for (const o of inputs.directOrigins) allowed.add(o);
|
|
22
|
+
for (const o of inputs.extraOrigins) allowed.add(o);
|
|
23
|
+
if (allowed.size === 0) yield* Effect.logWarning("dashboard origin allowlist is empty").pipe(Effect.annotateLogs({
|
|
24
|
+
[SpanAttr.app]: inputs.app,
|
|
25
|
+
[SpanAttr.stack]: inputs.stack
|
|
26
|
+
}));
|
|
27
|
+
return { allowed };
|
|
28
|
+
});
|
|
29
|
+
const checkOrigin = (policy, headerValue) => {
|
|
30
|
+
if (headerValue === void 0 || headerValue === null || headerValue.length === 0) return "missing";
|
|
31
|
+
return policy.allowed.has(headerValue) ? "ok" : "forbidden";
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { checkOrigin, resolveOriginPolicy };
|
|
35
|
+
|
|
36
|
+
//# sourceMappingURL=origin-policy.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"origin-policy.mjs","names":[],"sources":["../../../src/plugins/dashboard/origin-policy.ts"],"sourcesContent":["// Dashboard plugin — CORS / origin allowlist policy.\n//\n// This MIRRORS the wallet's `plugins/wallet/origin-policy.ts` pattern\n// (stack-scoped allowlist, `resolveOriginPolicy` / `checkOrigin`) rather\n// than importing it, to avoid coupling dashboard→wallet. The two policies\n// are intentionally small and self-contained; the wallet copy carries\n// bearer-specific history that does not apply here.\n//\n// The allowed set is built from real, substrate-wired sources:\n//\n// - the dashboard's OWN router-fronted origin for THIS stack\n// (`routedDashboardOrigin`) — the SPA is served same-origin from this\n// hostname, so the browser's `Origin` on `/graphql` IS this value;\n// - the direct loopback origin(s) the bundled SPA might be loaded from\n// when reached on the raw broker port (`directOrigins`);\n// - any explicit caller-supplied origins (`extraOrigins` →\n// `DashboardOptions.allowedOrigins`).\n//\n// We deliberately do NOT auto-allow a bare `*.localhost` / `localhost:<port>`\n// form: `localhost` is not stack-scoped, so a sibling stack on the same\n// port could drive the destructive control-plane mutations cross-origin.\n\nimport { Effect } from 'effect';\n\nimport { SpanAttr } from '../../substrate/runtime/observability/spans.ts';\n\n/** Result of resolving the origin allowlist at boot. Captured into the\n * server closure so per-request checks are pure string comparison. */\nexport interface OriginPolicy {\n\treadonly allowed: ReadonlySet<string>;\n}\n\n/** Per-stack inputs the policy resolver needs. Supplied by the plugin at\n * start time (identity + routed-url derivation); this module does not\n * reach into the broker or router itself. */\nexport interface OriginPolicyInputs {\n\treadonly app: string;\n\treadonly stack: string;\n\t/** The dashboard's router-fronted origin for this stack\n\t * (`http://api.<app>.<stack>.localhost:<entrypoint-port>`). `null`\n\t * only in tests that bypass the router derivation. */\n\treadonly routedDashboardOrigin: string | null;\n\t/** Direct loopback origins the SPA may be loaded from when reached on\n\t * the raw broker port (host-loopback fallback / direct tooling). */\n\treadonly directOrigins: ReadonlyArray<string>;\n\t/** Explicit caller-supplied origins (`DashboardOptions.allowedOrigins`). */\n\treadonly extraOrigins: ReadonlyArray<string>;\n}\n\n/**\n * Resolve the per-stack origin allowlist.\n *\n * - Always allowlisted: the dashboard's router-fronted origin for this\n * stack (`routedDashboardOrigin`), when the router derivation produced\n * one — this is the same-origin the bundled SPA loads from.\n * - Always allowlisted: the direct loopback origins + any explicit\n * caller-supplied `extraOrigins`.\n *\n * Empty-allowlist policy: allowed. The dashboard boots normally; with an\n * empty allowlist the per-request gate refuses every cross-origin request\n * (every Origin lands in `forbidden`). A `logWarning` surfaces the\n * configuration for operator visibility.\n */\nexport const resolveOriginPolicy = (inputs: OriginPolicyInputs): Effect.Effect<OriginPolicy> =>\n\tEffect.gen(function* () {\n\t\tconst allowed = new Set<string>();\n\n\t\tif (inputs.routedDashboardOrigin !== null) {\n\t\t\tallowed.add(inputs.routedDashboardOrigin);\n\t\t}\n\t\tfor (const o of inputs.directOrigins) {\n\t\t\tallowed.add(o);\n\t\t}\n\t\tfor (const o of inputs.extraOrigins) {\n\t\t\tallowed.add(o);\n\t\t}\n\n\t\tif (allowed.size === 0) {\n\t\t\tyield* Effect.logWarning('dashboard origin allowlist is empty').pipe(\n\t\t\t\tEffect.annotateLogs({\n\t\t\t\t\t[SpanAttr.app]: inputs.app,\n\t\t\t\t\t[SpanAttr.stack]: inputs.stack,\n\t\t\t\t}),\n\t\t\t);\n\t\t}\n\n\t\treturn { allowed } satisfies OriginPolicy;\n\t});\n\n/** Per-request origin gate. Returns `'missing'` for absent Origin,\n * `'forbidden'` for an Origin not in the allowlist, `'ok'` for accepted.\n *\n * `'missing'` is its OWN shape: a request with no Origin (server-side\n * tooling, the route-readiness probe, curl) is NOT a cross-origin browser\n * request, so CORS does not govern it — the caller emits a normal response\n * with no `Access-Control-Allow-Origin` header. */\nexport type OriginCheckResult = 'missing' | 'forbidden' | 'ok';\n\nexport const checkOrigin = (\n\tpolicy: OriginPolicy,\n\theaderValue: string | null | undefined,\n): OriginCheckResult => {\n\tif (headerValue === undefined || headerValue === null || headerValue.length === 0) {\n\t\treturn 'missing';\n\t}\n\treturn policy.allowed.has(headerValue) ? 'ok' : 'forbidden';\n};\n"],"mappings":";;;;;;;;;;;;;;;;;AA+DA,MAAa,uBAAuB,WACnC,OAAO,IAAI,aAAa;CACvB,MAAM,0BAAU,IAAI,KAAa;AAEjC,KAAI,OAAO,0BAA0B,KACpC,SAAQ,IAAI,OAAO,sBAAsB;AAE1C,MAAK,MAAM,KAAK,OAAO,cACtB,SAAQ,IAAI,EAAE;AAEf,MAAK,MAAM,KAAK,OAAO,aACtB,SAAQ,IAAI,EAAE;AAGf,KAAI,QAAQ,SAAS,EACpB,QAAO,OAAO,WAAW,sCAAsC,CAAC,KAC/D,OAAO,aAAa;GAClB,SAAS,MAAM,OAAO;GACtB,SAAS,QAAQ,OAAO;EACzB,CAAC,CACF;AAGF,QAAO,EAAE,SAAS;EACjB;AAWH,MAAa,eACZ,QACA,gBACuB;AACvB,KAAI,gBAAgB,KAAA,KAAa,gBAAgB,QAAQ,YAAY,WAAW,EAC/E,QAAO;AAER,QAAO,OAAO,QAAQ,IAAI,YAAY,GAAG,OAAO"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
//#region src/plugins/dashboard/routable.ts
|
|
2
|
+
const DASHBOARD_ENDPOINT_NAME = "dashboard";
|
|
3
|
+
const DASHBOARD_ENTRYPOINT_PORT = 9810;
|
|
4
|
+
const DASHBOARD_ENTRYPOINTS = [{
|
|
5
|
+
name: DASHBOARD_ENDPOINT_NAME,
|
|
6
|
+
port: DASHBOARD_ENTRYPOINT_PORT,
|
|
7
|
+
protocol: "http"
|
|
8
|
+
}];
|
|
9
|
+
/** Construct the Routable decl for the stack-scoped dashboard endpoint. */
|
|
10
|
+
const makeDashboardRoutable = (parts) => ({
|
|
11
|
+
kind: "routable",
|
|
12
|
+
endpointName: DASHBOARD_ENDPOINT_NAME,
|
|
13
|
+
dispatchId: {
|
|
14
|
+
serviceKey: `dashboard.${parts.app}.${parts.stack}`,
|
|
15
|
+
role: "api"
|
|
16
|
+
},
|
|
17
|
+
upstream: {
|
|
18
|
+
type: "host-loopback",
|
|
19
|
+
port: parts.port
|
|
20
|
+
},
|
|
21
|
+
cors: false,
|
|
22
|
+
wireProtocol: "http"
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { DASHBOARD_ENTRYPOINTS, DASHBOARD_ENTRYPOINT_PORT, makeDashboardRoutable };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=routable.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"routable.mjs","names":[],"sources":["../../../src/plugins/dashboard/routable.ts"],"sourcesContent":["// Dashboard plugin — Routable contribution.\n//\n// The dashboard's HTTP/GraphQL server is a host process (not a docker\n// container) listening on a loopback port the substrate's port broker\n// hands us. The router (Traefik) fronts the loopback port under a\n// stack-scoped hostname like `dashboard.<app>.localhost:<router-port>`.\n//\n// Mirrors `plugins/wallet/routable.ts`. The entrypoint declared here must\n// be aggregated into `plugins/router-entrypoints.ts` so Traefik opens the\n// listener port.\n\nimport type { EntrypointDecl, RoutableDecl } from '../../contracts/routable.ts';\n\nexport const DASHBOARD_ENDPOINT_NAME = 'dashboard';\nexport const DASHBOARD_ROUTE_ROLE = 'api' as const;\nexport const DASHBOARD_ENTRYPOINT_PORT = 9810;\n\nexport const DASHBOARD_ENTRYPOINTS: ReadonlyArray<EntrypointDecl> = [\n\t{ name: DASHBOARD_ENDPOINT_NAME, port: DASHBOARD_ENTRYPOINT_PORT, protocol: 'http' },\n];\n\n/** Construct the Routable decl for the stack-scoped dashboard endpoint. */\nexport const makeDashboardRoutable = (parts: {\n\treadonly app: string;\n\treadonly stack: string;\n\treadonly port: number;\n}): RoutableDecl => ({\n\tkind: 'routable',\n\tendpointName: DASHBOARD_ENDPOINT_NAME,\n\tdispatchId: {\n\t\tserviceKey: `dashboard.${parts.app}.${parts.stack}`,\n\t\trole: DASHBOARD_ROUTE_ROLE,\n\t},\n\tupstream: { type: 'host-loopback', port: parts.port },\n\t// CORS is owned by the dashboard server itself (`server.ts` `corsOptionsFor`\n\t// + `origin-policy.ts`): a STACK-SCOPED origin allowlist (this dashboard's\n\t// own router-fronted origin + direct loopback origins + caller-supplied\n\t// `allowedOrigins`) that guards the destructive control-plane mutations and\n\t// closes the cross-stack `*.localhost` hole. We deliberately do NOT attach\n\t// the shared `devstack-cors` Traefik middleware here — that middleware is\n\t// permissive (`*` allow-origin, allow-credentials) and, when the dashboard\n\t// is reached via the router hostname, would overwrite the server's allowlist\n\t// headers and re-open the cross-origin hole. `false` keeps the in-process\n\t// policy authoritative on both the direct loopback port and the router-\n\t// fronted hostname.\n\t//\n\t// The upstream host process binds `0.0.0.0` (see `DASHBOARD_DEFAULT_BIND` in\n\t// `index.ts`) so the Docker-hosted router reaches it via the host-gateway IP\n\t// on native Linux — a `127.0.0.1`-only listener would 502 and trip the route\n\t// readiness probe.\n\tcors: false,\n\twireProtocol: 'http',\n});\n"],"mappings":";AAaA,MAAa,0BAA0B;AAEvC,MAAa,4BAA4B;AAEzC,MAAa,wBAAuD,CACnE;CAAE,MAAM;CAAyB,MAAM;CAA2B,UAAU;CAAQ,CACpF;;AAGD,MAAa,yBAAyB,WAIjB;CACpB,MAAM;CACN,cAAc;CACd,YAAY;EACX,YAAY,aAAa,MAAM,IAAI,GAAG,MAAM;EAC5C,MAAA;EACA;CACD,UAAU;EAAE,MAAM;EAAiB,MAAM,MAAM;EAAM;CAiBrD,MAAM;CACN,cAAc;CACd"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import SchemaBuilder from "@pothos/core";
|
|
2
|
+
import RelayPlugin from "@pothos/plugin-relay";
|
|
3
|
+
import SimpleObjectsPlugin from "@pothos/plugin-simple-objects";
|
|
4
|
+
import WithInputPlugin from "@pothos/plugin-with-input";
|
|
5
|
+
//#region src/plugins/dashboard/schema/builder.ts
|
|
6
|
+
/** The single module-level builder. Object types, enums, and root types are
|
|
7
|
+
* defined against this instance across the sibling `schema/*` modules; the
|
|
8
|
+
* built schema is `dashboardSchema` (see `../schema.ts`). */
|
|
9
|
+
const builder = new SchemaBuilder({
|
|
10
|
+
plugins: [
|
|
11
|
+
SimpleObjectsPlugin,
|
|
12
|
+
RelayPlugin,
|
|
13
|
+
WithInputPlugin
|
|
14
|
+
],
|
|
15
|
+
relay: {},
|
|
16
|
+
defaultFieldNullability: false
|
|
17
|
+
});
|
|
18
|
+
//#endregion
|
|
19
|
+
export { builder };
|
|
20
|
+
|
|
21
|
+
//# sourceMappingURL=builder.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"builder.mjs","names":[],"sources":["../../../../src/plugins/dashboard/schema/builder.ts"],"sourcesContent":["// Dashboard Pothos `SchemaBuilder` — the single module-level instance.\n//\n// One typed schema covers the control plane: the live projection (`state`),\n// relay node/connection access over the snapshot arrays, control mutations,\n// and the projection subscription. The builder is parameterized with the\n// relay, simple-objects, and with-input plugins (Pothos v4 defaults).\n//\n// Dependencies (the `state` ref + a `publishCommand`) are supplied per\n// request through the GraphQL context (`DashboardContext`), so the schema is\n// a single module-level value with no per-instance closure state. Resolvers\n// read deps from the 3rd resolver argument.\n\nimport SchemaBuilder from '@pothos/core';\nimport RelayPlugin from '@pothos/plugin-relay';\nimport SimpleObjectsPlugin from '@pothos/plugin-simple-objects';\nimport WithInputPlugin from '@pothos/plugin-with-input';\nimport type { Effect, SubscriptionRef } from 'effect';\nimport type { EngineCommand } from '../../../substrate/events.ts';\nimport type { SubscribableState } from '../../../substrate/projection.ts';\nimport type { ControlPlaneDomain } from '../../../substrate/runtime/control-plane/service.ts';\nimport type { DashboardDomain } from '../domain.ts';\n\n/** Per-request GraphQL context for the dashboard control plane. Resolvers\n * read the live projection ref, the command publisher, and the\n * plugin-domain accessor surfaces from here (3rd resolver arg), so the\n * schema carries no closed-over state. */\nexport interface DashboardContext {\n\treadonly state: SubscriptionRef.SubscriptionRef<SubscribableState>;\n\treadonly publishCommand: (command: EngineCommand) => Effect.Effect<void>;\n\t/** Generic, name-blind control-plane accessors: snapshot catalog +\n\t * restore/delete, the observability rings, and the resolved-values\n\t * seam. (Plugin-name-aware shaping lives in `pluginDomain`.) */\n\treadonly domain: ControlPlaneDomain;\n\t/** Plugin-name-aware accessors the dashboard plugin shapes from the\n\t * generic control-plane `resolvedValues`: fork-vs-local mode,\n\t * deepbook/seal/coin capability ids, postgres wire-protocol stats,\n\t * and the coin mint action. */\n\treadonly pluginDomain: DashboardDomain;\n}\n\ninterface SchemaTypes {\n\tContext: DashboardContext;\n\t// Output fields are non-nullable unless a resolver opts in with\n\t// `nullable: true` — the projection always resolves a concrete value.\n\tDefaultFieldNullability: false;\n}\n\n/** The single module-level builder. Object types, enums, and root types are\n * defined against this instance across the sibling `schema/*` modules; the\n * built schema is `dashboardSchema` (see `../schema.ts`). */\nexport const builder = new SchemaBuilder<SchemaTypes>({\n\tplugins: [SimpleObjectsPlugin, RelayPlugin, WithInputPlugin],\n\trelay: {},\n\tdefaultFieldNullability: false,\n});\n"],"mappings":";;;;;;;;AAkDA,MAAa,UAAU,IAAI,cAA2B;CACrD,SAAS;EAAC;EAAqB;EAAa;EAAgB;CAC5D,OAAO,EAAE;CACT,yBAAyB;CACzB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { builder } from "./builder.mjs";
|
|
2
|
+
//#region src/plugins/dashboard/schema/enums.ts
|
|
3
|
+
const LifecycleStatus = builder.enumType("LifecycleStatus", { values: [
|
|
4
|
+
"pending",
|
|
5
|
+
"acquiring",
|
|
6
|
+
"ready",
|
|
7
|
+
"failed",
|
|
8
|
+
"stopping",
|
|
9
|
+
"stopped",
|
|
10
|
+
"done"
|
|
11
|
+
] });
|
|
12
|
+
const PluginRole = builder.enumType("PluginRole", { values: ["service", "task"] });
|
|
13
|
+
const RowSection = builder.enumType("RowSection", { values: [
|
|
14
|
+
"service",
|
|
15
|
+
"package",
|
|
16
|
+
"account",
|
|
17
|
+
"action",
|
|
18
|
+
"app",
|
|
19
|
+
"other"
|
|
20
|
+
] });
|
|
21
|
+
const WireProtocol = builder.enumType("WireProtocol", { values: [
|
|
22
|
+
"http",
|
|
23
|
+
"h2c",
|
|
24
|
+
"tcp"
|
|
25
|
+
] });
|
|
26
|
+
const LogLevel = builder.enumType("LogLevel", { values: [
|
|
27
|
+
"info",
|
|
28
|
+
"warn",
|
|
29
|
+
"error"
|
|
30
|
+
] });
|
|
31
|
+
const ErrorSeverity = builder.enumType("ErrorSeverity", { values: [
|
|
32
|
+
"warn",
|
|
33
|
+
"error",
|
|
34
|
+
"fatal"
|
|
35
|
+
] });
|
|
36
|
+
const AccountScheme = builder.enumType("AccountScheme", { values: [
|
|
37
|
+
"ed25519",
|
|
38
|
+
"secp256k1",
|
|
39
|
+
"secp256r1"
|
|
40
|
+
] });
|
|
41
|
+
const AccountSource = builder.enumType("AccountSource", { values: ["real", "impersonate"] });
|
|
42
|
+
const FundingStatus = builder.enumType("FundingStatus", { values: [
|
|
43
|
+
"pending",
|
|
44
|
+
"funded",
|
|
45
|
+
"skipped",
|
|
46
|
+
"failed",
|
|
47
|
+
"unknown"
|
|
48
|
+
] });
|
|
49
|
+
const PackageKind = builder.enumType("PackageKind", { values: ["local", "known"] });
|
|
50
|
+
const Health = builder.enumType("Health", { values: [
|
|
51
|
+
"ready",
|
|
52
|
+
"active",
|
|
53
|
+
"blocked",
|
|
54
|
+
"empty"
|
|
55
|
+
] });
|
|
56
|
+
/** Fork-vs-local stack mode (advance-clock gating). Derived from the sui
|
|
57
|
+
* plugin's resolved mode; `local-rpc` collapses to `local`. */
|
|
58
|
+
const StackMode = builder.enumType("StackMode", { values: [
|
|
59
|
+
"fork",
|
|
60
|
+
"local",
|
|
61
|
+
"live"
|
|
62
|
+
] });
|
|
63
|
+
/** DeepBook deployment mode. */
|
|
64
|
+
const DeepbookMode = builder.enumType("DeepbookMode", { values: [
|
|
65
|
+
"local",
|
|
66
|
+
"override",
|
|
67
|
+
"known"
|
|
68
|
+
] });
|
|
69
|
+
//#endregion
|
|
70
|
+
export { AccountScheme, AccountSource, DeepbookMode, ErrorSeverity, FundingStatus, Health, LifecycleStatus, LogLevel, PackageKind, PluginRole, RowSection, StackMode, WireProtocol };
|
|
71
|
+
|
|
72
|
+
//# sourceMappingURL=enums.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"enums.mjs","names":[],"sources":["../../../../src/plugins/dashboard/schema/enums.ts"],"sourcesContent":["// Pothos enums mirroring the closed unions in projection.ts / lifecycle.ts.\n//\n// Each `values` array is the EXACT string union from the source type — if\n// a substrate union gains a member, the corresponding `satisfies` below\n// stops compiling until this list is updated. That keeps the GraphQL\n// vocabulary in lockstep with the projection vocabulary.\n\nimport { builder } from './builder.ts';\nimport type {\n\tLifecycleStatus as LifecycleStatusUnion,\n\tPluginRole as PluginRoleUnion,\n} from '../../../substrate/lifecycle.ts';\nimport type {\n\tAccountProjection,\n\tEndpoint,\n\tLogTail,\n\tPackageProjection,\n\tRowSection as RowSectionUnion,\n\tStructuredError,\n} from '../../../substrate/projection.ts';\n\n// NOTE: CyclePhase ('shutting-down') and FundingEntryStatus ('already-satisfied')\n// are intentionally NOT GraphQL enums — their values contain hyphens, which are\n// illegal in GraphQL enum value names. Those fields are exposed as String (the\n// raw union string is the wire contract). See schema/types.ts.\ntype WireProtocol = Endpoint['wireProtocol'];\ntype LogLevel = LogTail['level'];\ntype ErrorSeverity = StructuredError['severity'];\ntype AccountScheme = NonNullable<AccountProjection['scheme']>;\ntype AccountSource = NonNullable<AccountProjection['source']>;\ntype FundingStatus = AccountProjection['funding']['status'];\ntype PackageKind = PackageProjection['kind'];\n\n/** Derived health classification for a single service row + the stack. */\nexport type Health = 'ready' | 'active' | 'blocked' | 'empty';\n\nexport const LifecycleStatus = builder.enumType('LifecycleStatus', {\n\tvalues: [\n\t\t'pending',\n\t\t'acquiring',\n\t\t'ready',\n\t\t'failed',\n\t\t'stopping',\n\t\t'stopped',\n\t\t'done',\n\t] satisfies LifecycleStatusUnion[],\n});\n\nexport const PluginRole = builder.enumType('PluginRole', {\n\tvalues: ['service', 'task'] satisfies PluginRoleUnion[],\n});\n\nexport const RowSection = builder.enumType('RowSection', {\n\tvalues: ['service', 'package', 'account', 'action', 'app', 'other'] satisfies RowSectionUnion[],\n});\n\nexport const WireProtocol = builder.enumType('WireProtocol', {\n\tvalues: ['http', 'h2c', 'tcp'] satisfies WireProtocol[],\n});\n\nexport const LogLevel = builder.enumType('LogLevel', {\n\tvalues: ['info', 'warn', 'error'] satisfies LogLevel[],\n});\n\nexport const ErrorSeverity = builder.enumType('ErrorSeverity', {\n\tvalues: ['warn', 'error', 'fatal'] satisfies ErrorSeverity[],\n});\n\nexport const AccountScheme = builder.enumType('AccountScheme', {\n\tvalues: ['ed25519', 'secp256k1', 'secp256r1'] satisfies AccountScheme[],\n});\n\nexport const AccountSource = builder.enumType('AccountSource', {\n\tvalues: ['real', 'impersonate'] satisfies AccountSource[],\n});\n\nexport const FundingStatus = builder.enumType('FundingStatus', {\n\tvalues: ['pending', 'funded', 'skipped', 'failed', 'unknown'] satisfies FundingStatus[],\n});\n\nexport const PackageKind = builder.enumType('PackageKind', {\n\tvalues: ['local', 'known'] satisfies PackageKind[],\n});\n\nexport const Health = builder.enumType('Health', {\n\tvalues: ['ready', 'active', 'blocked', 'empty'] satisfies Health[],\n});\n\n// --- Plugin-domain enums (control-plane `domain` surface) ------------------\n//\n// These mirror the closed unions on the control-plane domain shapes. They\n// carry no hyphenated members EXCEPT seal's `fork-known` / `local-keygen`,\n// which would be illegal GraphQL enum names — so SealMode is exposed as a\n// raw String field (see schema/types.ts), NOT an enum.\n\n/** Fork-vs-local stack mode (advance-clock gating). Derived from the sui\n * plugin's resolved mode; `local-rpc` collapses to `local`. */\nexport const StackMode = builder.enumType('StackMode', {\n\tvalues: ['fork', 'local', 'live'] as const,\n});\n\n/** DeepBook deployment mode. */\nexport const DeepbookMode = builder.enumType('DeepbookMode', {\n\tvalues: ['local', 'override', 'known'] as const,\n});\n\n// NOTE: CoinSource ('on-chain') and SealMode ('local-keygen' / 'fork-known')\n// are intentionally NOT GraphQL enums — their values contain hyphens, which\n// are illegal in GraphQL enum value names. Those fields are exposed as String\n// (the raw union string is the wire contract). See schema/types.ts.\n"],"mappings":";;AAoCA,MAAa,kBAAkB,QAAQ,SAAS,mBAAmB,EAClE,QAAQ;CACP;CACA;CACA;CACA;CACA;CACA;CACA;CACA,EACD,CAAC;AAEF,MAAa,aAAa,QAAQ,SAAS,cAAc,EACxD,QAAQ,CAAC,WAAW,OAAO,EAC3B,CAAC;AAEF,MAAa,aAAa,QAAQ,SAAS,cAAc,EACxD,QAAQ;CAAC;CAAW;CAAW;CAAW;CAAU;CAAO;CAAQ,EACnE,CAAC;AAEF,MAAa,eAAe,QAAQ,SAAS,gBAAgB,EAC5D,QAAQ;CAAC;CAAQ;CAAO;CAAM,EAC9B,CAAC;AAEF,MAAa,WAAW,QAAQ,SAAS,YAAY,EACpD,QAAQ;CAAC;CAAQ;CAAQ;CAAQ,EACjC,CAAC;AAEF,MAAa,gBAAgB,QAAQ,SAAS,iBAAiB,EAC9D,QAAQ;CAAC;CAAQ;CAAS;CAAQ,EAClC,CAAC;AAEF,MAAa,gBAAgB,QAAQ,SAAS,iBAAiB,EAC9D,QAAQ;CAAC;CAAW;CAAa;CAAY,EAC7C,CAAC;AAEF,MAAa,gBAAgB,QAAQ,SAAS,iBAAiB,EAC9D,QAAQ,CAAC,QAAQ,cAAc,EAC/B,CAAC;AAEF,MAAa,gBAAgB,QAAQ,SAAS,iBAAiB,EAC9D,QAAQ;CAAC;CAAW;CAAU;CAAW;CAAU;CAAU,EAC7D,CAAC;AAEF,MAAa,cAAc,QAAQ,SAAS,eAAe,EAC1D,QAAQ,CAAC,SAAS,QAAQ,EAC1B,CAAC;AAEF,MAAa,SAAS,QAAQ,SAAS,UAAU,EAChD,QAAQ;CAAC;CAAS;CAAU;CAAW;CAAQ,EAC/C,CAAC;;;AAWF,MAAa,YAAY,QAAQ,SAAS,aAAa,EACtD,QAAQ;CAAC;CAAQ;CAAS;CAAO,EACjC,CAAC;;AAGF,MAAa,eAAe,QAAQ,SAAS,gBAAgB,EAC5D,QAAQ;CAAC;CAAS;CAAY;CAAQ,EACtC,CAAC"}
|