@mysten-incubation/devstack 0.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +189 -0
- package/README.md +94 -0
- package/dist/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/api/define-capabilities.d.mts +25 -0
- package/dist/api/define-capabilities.mjs +19 -0
- package/dist/api/define-capabilities.mjs.map +1 -0
- package/dist/api/define-devstack-with.d.mts +41 -0
- package/dist/api/define-devstack-with.mjs +24 -0
- package/dist/api/define-devstack-with.mjs.map +1 -0
- package/dist/api/define-devstack.d.mts +62 -0
- package/dist/api/define-devstack.mjs +108 -0
- package/dist/api/define-devstack.mjs.map +1 -0
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/inference-network.mjs +122 -0
- package/dist/api/inference-network.mjs.map +1 -0
- package/dist/api/mode-narrowed-factory.d.mts +26 -0
- package/dist/api/mode-narrowed-factory.mjs +8 -0
- package/dist/api/mode-narrowed-factory.mjs.map +1 -0
- package/dist/api/plugin-errors.mjs +10 -0
- package/dist/api/plugin-errors.mjs.map +1 -0
- package/dist/api/run-stack.d.mts +82 -0
- package/dist/api/run-stack.mjs +127 -0
- package/dist/api/run-stack.mjs.map +1 -0
- package/dist/build-integrations/playwright/config.d.mts +92 -0
- package/dist/build-integrations/playwright/config.mjs +71 -0
- package/dist/build-integrations/playwright/config.mjs.map +1 -0
- package/dist/build-integrations/playwright/errors.d.mts +82 -0
- package/dist/build-integrations/playwright/errors.mjs +43 -0
- package/dist/build-integrations/playwright/errors.mjs.map +1 -0
- package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
- package/dist/build-integrations/playwright/global-setup.mjs +44 -0
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
- package/dist/build-integrations/playwright/index.d.mts +6 -0
- package/dist/build-integrations/playwright/index.mjs +6 -0
- package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
- package/dist/build-integrations/playwright/stack-context.mjs +277 -0
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
- package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
- package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
- package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +78 -0
- package/dist/build-integrations/runtime/discover.mjs +124 -0
- package/dist/build-integrations/runtime/discover.mjs.map +1 -0
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
- package/dist/build-integrations/runtime/errors.d.mts +64 -0
- package/dist/build-integrations/runtime/errors.mjs +51 -0
- package/dist/build-integrations/runtime/errors.mjs.map +1 -0
- package/dist/build-integrations/runtime/index.d.mts +7 -0
- package/dist/build-integrations/runtime/index.mjs +6 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
- package/dist/build-integrations/vitest/config.d.mts +62 -0
- package/dist/build-integrations/vitest/config.mjs +80 -0
- package/dist/build-integrations/vitest/config.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +48 -0
- package/dist/build-integrations/vitest/env.mjs +50 -0
- package/dist/build-integrations/vitest/env.mjs.map +1 -0
- package/dist/build-integrations/vitest/errors.d.mts +44 -0
- package/dist/build-integrations/vitest/errors.mjs +18 -0
- package/dist/build-integrations/vitest/errors.mjs.map +1 -0
- package/dist/build-integrations/vitest/index.d.mts +6 -0
- package/dist/build-integrations/vitest/index.mjs +6 -0
- package/dist/build-integrations/vitest/setup.d.mts +53 -0
- package/dist/build-integrations/vitest/setup.mjs +56 -0
- package/dist/build-integrations/vitest/setup.mjs.map +1 -0
- package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
- package/dist/build-integrations/vitest/stack-context.mjs +67 -0
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
- package/dist/cli/main.d.mts +5 -0
- package/dist/cli/main.mjs +586 -0
- package/dist/cli/main.mjs.map +1 -0
- package/dist/cli/prune-direct.mjs +216 -0
- package/dist/cli/prune-direct.mjs.map +1 -0
- package/dist/cli/snapshot-reader.mjs +73 -0
- package/dist/cli/snapshot-reader.mjs.map +1 -0
- package/dist/cli/up-lifecycle.mjs +28 -0
- package/dist/cli/up-lifecycle.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +42 -0
- package/dist/contracts/chain-probe.d.mts +26 -0
- package/dist/contracts/chain-probe.mjs +8 -0
- package/dist/contracts/chain-probe.mjs.map +1 -0
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +245 -0
- package/dist/contracts/liveness-classifier.d.mts +19 -0
- package/dist/contracts/network-resolver.d.mts +15 -0
- package/dist/contracts/network-resolver.mjs +7 -0
- package/dist/contracts/network-resolver.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +15 -0
- package/dist/contracts/routable.d.mts +53 -0
- package/dist/contracts/snapshotable.d.mts +39 -0
- package/dist/contracts/strategy-contributor.d.mts +26 -0
- package/dist/index.d.mts +89 -0
- package/dist/index.mjs +37 -0
- package/dist/orchestrators/codegen/bindings.d.mts +2 -0
- package/dist/orchestrators/codegen/bindings.mjs +340 -0
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
- package/dist/orchestrators/codegen/emit.mjs +56 -0
- package/dist/orchestrators/codegen/emit.mjs.map +1 -0
- package/dist/orchestrators/codegen/errors.d.mts +1 -0
- package/dist/orchestrators/codegen/errors.mjs +66 -0
- package/dist/orchestrators/codegen/errors.mjs.map +1 -0
- package/dist/orchestrators/codegen/extras.mjs +16 -0
- package/dist/orchestrators/codegen/extras.mjs.map +1 -0
- package/dist/orchestrators/codegen/format.mjs +109 -0
- package/dist/orchestrators/codegen/format.mjs.map +1 -0
- package/dist/orchestrators/codegen/gitignore.mjs +67 -0
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -0
- package/dist/orchestrators/codegen/paths.mjs +33 -0
- package/dist/orchestrators/codegen/paths.mjs.map +1 -0
- package/dist/orchestrators/codegen/permissions.mjs +6 -0
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
- package/dist/orchestrators/codegen/service.d.mts +1 -0
- package/dist/orchestrators/codegen/service.mjs +276 -0
- package/dist/orchestrators/codegen/service.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +58 -0
- package/dist/orchestrators/router/cleanup.mjs.map +1 -0
- package/dist/orchestrators/router/cors.mjs +31 -0
- package/dist/orchestrators/router/cors.mjs.map +1 -0
- package/dist/orchestrators/router/entrypoints.d.mts +1 -0
- package/dist/orchestrators/router/entrypoints.mjs +80 -0
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
- package/dist/orchestrators/router/errors.d.mts +1 -0
- package/dist/orchestrators/router/errors.mjs +103 -0
- package/dist/orchestrators/router/errors.mjs.map +1 -0
- package/dist/orchestrators/router/file-provider.d.mts +1 -0
- package/dist/orchestrators/router/file-provider.mjs +320 -0
- package/dist/orchestrators/router/file-provider.mjs.map +1 -0
- package/dist/orchestrators/router/hostname.d.mts +1 -0
- package/dist/orchestrators/router/hostname.mjs +107 -0
- package/dist/orchestrators/router/hostname.mjs.map +1 -0
- package/dist/orchestrators/router/index.d.mts +1 -0
- package/dist/orchestrators/router/profile.d.mts +1 -0
- package/dist/orchestrators/router/profile.mjs +109 -0
- package/dist/orchestrators/router/profile.mjs.map +1 -0
- package/dist/orchestrators/router/service.d.mts +3 -0
- package/dist/orchestrators/router/service.mjs +421 -0
- package/dist/orchestrators/router/service.mjs.map +1 -0
- package/dist/orchestrators/router/traefik-container.d.mts +1 -0
- package/dist/orchestrators/router/traefik-container.mjs +229 -0
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +10 -0
- package/dist/orchestrators/runtime-composition.mjs +168 -0
- package/dist/orchestrators/runtime-composition.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +350 -0
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
- package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
- package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
- package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
- package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
- package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
- package/dist/orchestrators/snapshot/index.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
- package/dist/orchestrators/snapshot/integrity.mjs +74 -0
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.d.mts +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +110 -0
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.d.mts +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +404 -0
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
- package/dist/orchestrators/snapshot/service.d.mts +1 -0
- package/dist/orchestrators/snapshot/service.mjs +296 -0
- package/dist/orchestrators/snapshot/service.mjs.map +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +18 -0
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
- package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
- package/dist/orchestrators/snapshot/wipe.mjs +59 -0
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
- package/dist/plugins/account/codegen.d.mts +12 -0
- package/dist/plugins/account/codegen.mjs +22 -0
- package/dist/plugins/account/codegen.mjs.map +1 -0
- package/dist/plugins/account/errors.d.mts +44 -0
- package/dist/plugins/account/errors.mjs +16 -0
- package/dist/plugins/account/errors.mjs.map +1 -0
- package/dist/plugins/account/funding.d.mts +94 -0
- package/dist/plugins/account/funding.mjs +199 -0
- package/dist/plugins/account/funding.mjs.map +1 -0
- package/dist/plugins/account/index.d.mts +54 -0
- package/dist/plugins/account/index.mjs +151 -0
- package/dist/plugins/account/index.mjs.map +1 -0
- package/dist/plugins/account/keypair.d.mts +32 -0
- package/dist/plugins/account/keypair.mjs +99 -0
- package/dist/plugins/account/keypair.mjs.map +1 -0
- package/dist/plugins/account/lease.mjs +21 -0
- package/dist/plugins/account/lease.mjs.map +1 -0
- package/dist/plugins/account/registry.d.mts +33 -0
- package/dist/plugins/account/registry.mjs +36 -0
- package/dist/plugins/account/registry.mjs.map +1 -0
- package/dist/plugins/account/service.d.mts +104 -0
- package/dist/plugins/account/service.mjs +405 -0
- package/dist/plugins/account/service.mjs.map +1 -0
- package/dist/plugins/account/snapshot.mjs +33 -0
- package/dist/plugins/account/snapshot.mjs.map +1 -0
- package/dist/plugins/account/variants/env.mjs +24 -0
- package/dist/plugins/account/variants/env.mjs.map +1 -0
- package/dist/plugins/account/variants/ephemeral.mjs +72 -0
- package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
- package/dist/plugins/account/variants/impersonate.d.mts +16 -0
- package/dist/plugins/account/variants/impersonate.mjs +48 -0
- package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
- package/dist/plugins/account/variants/inline.mjs +13 -0
- package/dist/plugins/account/variants/inline.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +93 -0
- package/dist/plugins/account/variants/keystore.mjs.map +1 -0
- package/dist/plugins/account/variants/signer.mjs +31 -0
- package/dist/plugins/account/variants/signer.mjs.map +1 -0
- package/dist/plugins/action/build-context.d.mts +41 -0
- package/dist/plugins/action/discriminator.d.mts +20 -0
- package/dist/plugins/action/discriminator.mjs +13 -0
- package/dist/plugins/action/discriminator.mjs.map +1 -0
- package/dist/plugins/action/errors.d.mts +31 -0
- package/dist/plugins/action/errors.mjs +13 -0
- package/dist/plugins/action/errors.mjs.map +1 -0
- package/dist/plugins/action/execute.d.mts +2 -0
- package/dist/plugins/action/execute.mjs +145 -0
- package/dist/plugins/action/execute.mjs.map +1 -0
- package/dist/plugins/action/index.d.mts +56 -0
- package/dist/plugins/action/index.mjs +82 -0
- package/dist/plugins/action/index.mjs.map +1 -0
- package/dist/plugins/action/service.d.mts +26 -0
- package/dist/plugins/action/service.mjs +84 -0
- package/dist/plugins/action/service.mjs.map +1 -0
- package/dist/plugins/coin/address-resolution.d.mts +34 -0
- package/dist/plugins/coin/address-resolution.mjs +80 -0
- package/dist/plugins/coin/address-resolution.mjs.map +1 -0
- package/dist/plugins/coin/codegen.d.mts +16 -0
- package/dist/plugins/coin/codegen.mjs +21 -0
- package/dist/plugins/coin/codegen.mjs.map +1 -0
- package/dist/plugins/coin/discovery.d.mts +26 -0
- package/dist/plugins/coin/discovery.mjs +112 -0
- package/dist/plugins/coin/discovery.mjs.map +1 -0
- package/dist/plugins/coin/errors.d.mts +48 -0
- package/dist/plugins/coin/errors.mjs +13 -0
- package/dist/plugins/coin/errors.mjs.map +1 -0
- package/dist/plugins/coin/index.d.mts +95 -0
- package/dist/plugins/coin/index.mjs +172 -0
- package/dist/plugins/coin/index.mjs.map +1 -0
- package/dist/plugins/coin/metadata.d.mts +15 -0
- package/dist/plugins/coin/metadata.mjs +99 -0
- package/dist/plugins/coin/metadata.mjs.map +1 -0
- package/dist/plugins/coin/mint.d.mts +34 -0
- package/dist/plugins/coin/mint.mjs +164 -0
- package/dist/plugins/coin/mint.mjs.map +1 -0
- package/dist/plugins/coin/registry.d.mts +1 -0
- package/dist/plugins/coin/registry.mjs +37 -0
- package/dist/plugins/coin/registry.mjs.map +1 -0
- package/dist/plugins/coin/service.d.mts +47 -0
- package/dist/plugins/coin/service.mjs +51 -0
- package/dist/plugins/coin/service.mjs.map +1 -0
- package/dist/plugins/coin/snapshot.mjs +19 -0
- package/dist/plugins/coin/snapshot.mjs.map +1 -0
- package/dist/plugins/coin/type-strings.mjs +49 -0
- package/dist/plugins/coin/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/codegen.d.mts +39 -0
- package/dist/plugins/deepbook/codegen.mjs +15 -0
- package/dist/plugins/deepbook/codegen.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +437 -0
- package/dist/plugins/deepbook/deploy.mjs.map +1 -0
- package/dist/plugins/deepbook/errors.d.mts +29 -0
- package/dist/plugins/deepbook/errors.mjs +26 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -0
- package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +171 -0
- package/dist/plugins/deepbook/index.mjs +359 -0
- package/dist/plugins/deepbook/index.mjs.map +1 -0
- package/dist/plugins/deepbook/plugin-key.mjs +7 -0
- package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
- package/dist/plugins/deepbook/pyth/index.mjs +226 -0
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
- package/dist/plugins/deepbook/routable.mjs +21 -0
- package/dist/plugins/deepbook/routable.mjs.map +1 -0
- package/dist/plugins/deepbook/snapshot.mjs +49 -0
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +125 -0
- package/dist/plugins/deepbook/types.mjs +12 -0
- package/dist/plugins/deepbook/types.mjs.map +1 -0
- package/dist/plugins/faucet/dispatcher.d.mts +9 -0
- package/dist/plugins/faucet/dispatcher.mjs +13 -0
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
- package/dist/plugins/faucet/errors.d.mts +86 -0
- package/dist/plugins/faucet/errors.mjs +19 -0
- package/dist/plugins/faucet/errors.mjs.map +1 -0
- package/dist/plugins/faucet/http.mjs +127 -0
- package/dist/plugins/faucet/http.mjs.map +1 -0
- package/dist/plugins/faucet/index.d.mts +43 -0
- package/dist/plugins/faucet/index.mjs +42 -0
- package/dist/plugins/faucet/index.mjs.map +1 -0
- package/dist/plugins/faucet/service.d.mts +20 -0
- package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +27 -0
- package/dist/plugins/host-service/errors.mjs +14 -0
- package/dist/plugins/host-service/errors.mjs.map +1 -0
- package/dist/plugins/host-service/index.d.mts +10 -0
- package/dist/plugins/host-service/index.mjs +48 -0
- package/dist/plugins/host-service/index.mjs.map +1 -0
- package/dist/plugins/host-service/routable.mjs +24 -0
- package/dist/plugins/host-service/routable.mjs.map +1 -0
- package/dist/plugins/host-service/service.d.mts +49 -0
- package/dist/plugins/host-service/service.mjs +375 -0
- package/dist/plugins/host-service/service.mjs.map +1 -0
- package/dist/plugins/package/build.d.mts +1 -0
- package/dist/plugins/package/build.mjs +24 -0
- package/dist/plugins/package/build.mjs.map +1 -0
- package/dist/plugins/package/codegen.d.mts +19 -0
- package/dist/plugins/package/codegen.mjs +41 -0
- package/dist/plugins/package/codegen.mjs.map +1 -0
- package/dist/plugins/package/dep-resolution.mjs +10 -0
- package/dist/plugins/package/dep-resolution.mjs.map +1 -0
- package/dist/plugins/package/errors.d.mts +34 -0
- package/dist/plugins/package/errors.mjs +13 -0
- package/dist/plugins/package/errors.mjs.map +1 -0
- package/dist/plugins/package/index.d.mts +109 -0
- package/dist/plugins/package/index.mjs +207 -0
- package/dist/plugins/package/index.mjs.map +1 -0
- package/dist/plugins/package/mode-known.mjs +41 -0
- package/dist/plugins/package/mode-known.mjs.map +1 -0
- package/dist/plugins/package/mode-local.d.mts +1 -0
- package/dist/plugins/package/mode-local.mjs +183 -0
- package/dist/plugins/package/mode-local.mjs.map +1 -0
- package/dist/plugins/package/publish-executor.mjs +202 -0
- package/dist/plugins/package/publish-executor.mjs.map +1 -0
- package/dist/plugins/package/publish-output.d.mts +28 -0
- package/dist/plugins/package/publish-output.mjs +45 -0
- package/dist/plugins/package/publish-output.mjs.map +1 -0
- package/dist/plugins/package/registry.d.mts +25 -0
- package/dist/plugins/package/registry.mjs +30 -0
- package/dist/plugins/package/registry.mjs.map +1 -0
- package/dist/plugins/package/service.mjs +20 -0
- package/dist/plugins/package/service.mjs.map +1 -0
- package/dist/plugins/package/snapshot.mjs +25 -0
- package/dist/plugins/package/snapshot.mjs.map +1 -0
- package/dist/plugins/postgres/codegen.mjs +42 -0
- package/dist/plugins/postgres/codegen.mjs.map +1 -0
- package/dist/plugins/postgres/connection.d.mts +33 -0
- package/dist/plugins/postgres/connection.mjs +19 -0
- package/dist/plugins/postgres/connection.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +100 -0
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
- package/dist/plugins/postgres/errors.d.mts +55 -0
- package/dist/plugins/postgres/errors.mjs +29 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -0
- package/dist/plugins/postgres/index.d.mts +37 -0
- package/dist/plugins/postgres/index.mjs +75 -0
- package/dist/plugins/postgres/index.mjs.map +1 -0
- package/dist/plugins/postgres/routable.mjs +33 -0
- package/dist/plugins/postgres/routable.mjs.map +1 -0
- package/dist/plugins/postgres/service.d.mts +50 -0
- package/dist/plugins/postgres/service.mjs +145 -0
- package/dist/plugins/postgres/service.mjs.map +1 -0
- package/dist/plugins/postgres/snapshot.d.mts +1 -0
- package/dist/plugins/postgres/snapshot.mjs +32 -0
- package/dist/plugins/postgres/snapshot.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +21 -0
- package/dist/plugins/router-entrypoints.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
- package/dist/plugins/seal/codegen.d.mts +19 -0
- package/dist/plugins/seal/codegen.mjs +16 -0
- package/dist/plugins/seal/codegen.mjs.map +1 -0
- package/dist/plugins/seal/config-render.mjs +82 -0
- package/dist/plugins/seal/config-render.mjs.map +1 -0
- package/dist/plugins/seal/deploy.mjs +198 -0
- package/dist/plugins/seal/deploy.mjs.map +1 -0
- package/dist/plugins/seal/errors.d.mts +52 -0
- package/dist/plugins/seal/errors.mjs +19 -0
- package/dist/plugins/seal/errors.mjs.map +1 -0
- package/dist/plugins/seal/index.d.mts +161 -0
- package/dist/plugins/seal/index.mjs +235 -0
- package/dist/plugins/seal/index.mjs.map +1 -0
- package/dist/plugins/seal/key-manager.d.mts +22 -0
- package/dist/plugins/seal/key-manager.mjs +22 -0
- package/dist/plugins/seal/key-manager.mjs.map +1 -0
- package/dist/plugins/seal/key-server.mjs +175 -0
- package/dist/plugins/seal/key-server.mjs.map +1 -0
- package/dist/plugins/seal/keygen.mjs +96 -0
- package/dist/plugins/seal/keygen.mjs.map +1 -0
- package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
- package/dist/plugins/seal/mode/fork-known.mjs +23 -0
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
- package/dist/plugins/seal/mode/live.d.mts +18 -0
- package/dist/plugins/seal/mode/live.mjs +64 -0
- package/dist/plugins/seal/mode/live.mjs.map +1 -0
- package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
- package/dist/plugins/seal/plugin-key.mjs +7 -0
- package/dist/plugins/seal/plugin-key.mjs.map +1 -0
- package/dist/plugins/seal/registry-publish.d.mts +43 -0
- package/dist/plugins/seal/registry-publish.mjs +9 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -0
- package/dist/plugins/seal/routable.mjs +57 -0
- package/dist/plugins/seal/routable.mjs.map +1 -0
- package/dist/plugins/seal/service.mjs +17 -0
- package/dist/plugins/seal/service.mjs.map +1 -0
- package/dist/plugins/seal/snapshot.mjs +51 -0
- package/dist/plugins/seal/snapshot.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +45 -0
- package/dist/plugins/sui/auto-tick.mjs.map +1 -0
- package/dist/plugins/sui/chain-build-container.d.mts +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +85 -0
- package/dist/plugins/sui/chain-probe.mjs +104 -0
- package/dist/plugins/sui/chain-probe.mjs.map +1 -0
- package/dist/plugins/sui/codegen.d.mts +14 -0
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -0
- package/dist/plugins/sui/errors.d.mts +74 -0
- package/dist/plugins/sui/errors.mjs +28 -0
- package/dist/plugins/sui/errors.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +24 -0
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
- package/dist/plugins/sui/fork-transaction.mjs +96 -0
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
- package/dist/plugins/sui/index.d.mts +318 -0
- package/dist/plugins/sui/index.mjs +182 -0
- package/dist/plugins/sui/index.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +60 -0
- package/dist/plugins/sui/mode/external.mjs.map +1 -0
- package/dist/plugins/sui/mode/fork.mjs +283 -0
- package/dist/plugins/sui/mode/fork.mjs.map +1 -0
- package/dist/plugins/sui/mode/live.mjs +103 -0
- package/dist/plugins/sui/mode/live.mjs.map +1 -0
- package/dist/plugins/sui/mode/local.mjs +293 -0
- package/dist/plugins/sui/mode/local.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
- package/dist/plugins/sui/mode/shared.d.mts +103 -0
- package/dist/plugins/sui/mode/shared.mjs +12 -0
- package/dist/plugins/sui/mode/shared.mjs.map +1 -0
- package/dist/plugins/sui/mode/spec.d.mts +94 -0
- package/dist/plugins/sui/network-resolver.d.mts +23 -0
- package/dist/plugins/sui/routable.mjs +88 -0
- package/dist/plugins/sui/routable.mjs.map +1 -0
- package/dist/plugins/sui/seed-objects.d.mts +18 -0
- package/dist/plugins/sui/seed-objects.mjs +25 -0
- package/dist/plugins/sui/seed-objects.mjs.map +1 -0
- package/dist/plugins/sui/service.mjs +38 -0
- package/dist/plugins/sui/service.mjs.map +1 -0
- package/dist/plugins/sui/snapshot.mjs +53 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +33 -0
- package/dist/plugins/wallet/codegen.mjs +34 -0
- package/dist/plugins/wallet/codegen.mjs.map +1 -0
- package/dist/plugins/wallet/errors.d.mts +66 -0
- package/dist/plugins/wallet/errors.mjs +16 -0
- package/dist/plugins/wallet/errors.mjs.map +1 -0
- package/dist/plugins/wallet/index.d.mts +63 -0
- package/dist/plugins/wallet/index.mjs +126 -0
- package/dist/plugins/wallet/index.mjs.map +1 -0
- package/dist/plugins/wallet/origin-policy.d.mts +1 -0
- package/dist/plugins/wallet/origin-policy.mjs +65 -0
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
- package/dist/plugins/wallet/pairing.d.mts +11 -0
- package/dist/plugins/wallet/pairing.mjs +125 -0
- package/dist/plugins/wallet/pairing.mjs.map +1 -0
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +96 -0
- package/dist/plugins/wallet/protocol.mjs.map +1 -0
- package/dist/plugins/wallet/routable.mjs +32 -0
- package/dist/plugins/wallet/routable.mjs.map +1 -0
- package/dist/plugins/wallet/server.d.mts +12 -0
- package/dist/plugins/wallet/server.mjs +317 -0
- package/dist/plugins/wallet/server.mjs.map +1 -0
- package/dist/plugins/wallet/service.d.mts +68 -0
- package/dist/plugins/wallet/service.mjs +97 -0
- package/dist/plugins/wallet/service.mjs.map +1 -0
- package/dist/plugins/wallet/snapshot.d.mts +1 -0
- package/dist/plugins/wallet/snapshot.mjs +14 -0
- package/dist/plugins/wallet/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
- package/dist/plugins/walrus/codegen.d.mts +38 -0
- package/dist/plugins/walrus/codegen.mjs +34 -0
- package/dist/plugins/walrus/codegen.mjs.map +1 -0
- package/dist/plugins/walrus/deploy-paths.mjs +14 -0
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
- package/dist/plugins/walrus/deploy.d.mts +1 -0
- package/dist/plugins/walrus/deploy.mjs +224 -0
- package/dist/plugins/walrus/deploy.mjs.map +1 -0
- package/dist/plugins/walrus/errors.d.mts +38 -0
- package/dist/plugins/walrus/errors.mjs +26 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -0
- package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
- package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
- package/dist/plugins/walrus/index.d.mts +177 -0
- package/dist/plugins/walrus/index.mjs +284 -0
- package/dist/plugins/walrus/index.mjs.map +1 -0
- package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
- package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
- package/dist/plugins/walrus/plugin-key.mjs +7 -0
- package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
- package/dist/plugins/walrus/registry-publish.d.mts +24 -0
- package/dist/plugins/walrus/registry-publish.mjs +7 -0
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
- package/dist/plugins/walrus/routable.mjs +99 -0
- package/dist/plugins/walrus/routable.mjs.map +1 -0
- package/dist/plugins/walrus/service.mjs +20 -0
- package/dist/plugins/walrus/service.mjs.map +1 -0
- package/dist/plugins/walrus/snapshot.mjs +53 -0
- package/dist/plugins/walrus/snapshot.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
- package/dist/plugins/walrus/storage-nodes.mjs +154 -0
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
- package/dist/plugins/walrus/wal-swap.d.mts +2 -0
- package/dist/plugins/walrus/wal-swap.mjs +58 -0
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
- package/dist/primitives/artifact-publisher.d.mts +12 -0
- package/dist/primitives/cache.d.mts +1 -0
- package/dist/runtime/built-in-plugin-layers.mjs +49 -0
- package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
- package/dist/runtime/docker/client.d.mts +2 -0
- package/dist/runtime/docker/client.mjs +54 -0
- package/dist/runtime/docker/client.mjs.map +1 -0
- package/dist/runtime/docker/container.d.mts +1 -0
- package/dist/runtime/docker/container.mjs +562 -0
- package/dist/runtime/docker/container.mjs.map +1 -0
- package/dist/runtime/docker/errors.d.mts +1 -0
- package/dist/runtime/docker/errors.mjs +187 -0
- package/dist/runtime/docker/errors.mjs.map +1 -0
- package/dist/runtime/docker/exec.d.mts +1 -0
- package/dist/runtime/docker/exec.mjs +63 -0
- package/dist/runtime/docker/exec.mjs.map +1 -0
- package/dist/runtime/docker/image.d.mts +1 -0
- package/dist/runtime/docker/image.mjs +278 -0
- package/dist/runtime/docker/image.mjs.map +1 -0
- package/dist/runtime/docker/index.d.mts +1 -0
- package/dist/runtime/docker/inventory.d.mts +1 -0
- package/dist/runtime/docker/inventory.mjs +167 -0
- package/dist/runtime/docker/inventory.mjs.map +1 -0
- package/dist/runtime/docker/labels.d.mts +1 -0
- package/dist/runtime/docker/labels.mjs +97 -0
- package/dist/runtime/docker/labels.mjs.map +1 -0
- package/dist/runtime/docker/logs.d.mts +1 -0
- package/dist/runtime/docker/logs.mjs +34 -0
- package/dist/runtime/docker/logs.mjs.map +1 -0
- package/dist/runtime/docker/network.d.mts +1 -0
- package/dist/runtime/docker/network.mjs +168 -0
- package/dist/runtime/docker/network.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +9 -0
- package/dist/runtime/docker/service.mjs +266 -0
- package/dist/runtime/docker/service.mjs.map +1 -0
- package/dist/runtime/docker/sweep.d.mts +1 -0
- package/dist/runtime/docker/sweep.mjs +220 -0
- package/dist/runtime/docker/sweep.mjs.map +1 -0
- package/dist/runtime/docker/volume.d.mts +1 -0
- package/dist/runtime/docker/volume.mjs +24 -0
- package/dist/runtime/docker/volume.mjs.map +1 -0
- package/dist/runtime/docker/wrap.d.mts +1 -0
- package/dist/runtime/docker/wrap.mjs +131 -0
- package/dist/runtime/docker/wrap.mjs.map +1 -0
- package/dist/substrate/brand.d.mts +24 -0
- package/dist/substrate/brand.mjs +14 -0
- package/dist/substrate/brand.mjs.map +1 -0
- package/dist/substrate/cross-process.d.mts +1 -0
- package/dist/substrate/cross-process.mjs +28 -0
- package/dist/substrate/cross-process.mjs.map +1 -0
- package/dist/substrate/events.d.mts +117 -0
- package/dist/substrate/identity.d.mts +13 -0
- package/dist/substrate/lifecycle.d.mts +12 -0
- package/dist/substrate/manifest.d.mts +39 -0
- package/dist/substrate/manifest.mjs +33 -0
- package/dist/substrate/manifest.mjs.map +1 -0
- package/dist/substrate/network.d.mts +34 -0
- package/dist/substrate/options.d.mts +23 -0
- package/dist/substrate/plugin.d.mts +101 -0
- package/dist/substrate/plugin.mjs +61 -0
- package/dist/substrate/plugin.mjs.map +1 -0
- package/dist/substrate/projection.d.mts +100 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
- package/dist/substrate/runtime/atomic-write.mjs +106 -0
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
- package/dist/substrate/runtime/cache/index.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.d.mts +1 -0
- package/dist/substrate/runtime/cache/schema.mjs +22 -0
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
- package/dist/substrate/runtime/cache/service.d.mts +1 -0
- package/dist/substrate/runtime/cache/service.mjs +89 -0
- package/dist/substrate/runtime/cache/service.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
- package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
- package/dist/substrate/runtime/config-validation.d.mts +38 -0
- package/dist/substrate/runtime/config-validation.mjs +137 -0
- package/dist/substrate/runtime/config-validation.mjs.map +1 -0
- package/dist/substrate/runtime/context-helpers.mjs +32 -0
- package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
- package/dist/substrate/runtime/current-plugin.mjs +15 -0
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
- package/dist/substrate/runtime/errors.d.mts +1 -0
- package/dist/substrate/runtime/errors.mjs +76 -0
- package/dist/substrate/runtime/errors.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
- package/dist/substrate/runtime/http-probe.d.mts +35 -0
- package/dist/substrate/runtime/http-probe.mjs +65 -0
- package/dist/substrate/runtime/http-probe.mjs.map +1 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
- package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
- package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
- package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
- package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
- package/dist/substrate/runtime/managed-container.d.mts +30 -0
- package/dist/substrate/runtime/managed-container.mjs +32 -0
- package/dist/substrate/runtime/managed-container.mjs.map +1 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
- package/dist/substrate/runtime/mode-errors.d.mts +36 -0
- package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +3 -0
- package/dist/substrate/runtime/observability/logger.d.mts +58 -0
- package/dist/substrate/runtime/observability/logger.mjs +89 -0
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
- package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
- package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
- package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
- package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
- package/dist/substrate/runtime/observability/redaction.mjs +45 -0
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.d.mts +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +87 -0
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
- package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
- package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +17 -0
- package/dist/substrate/runtime/paths.mjs +61 -0
- package/dist/substrate/runtime/paths.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
- package/dist/substrate/runtime/port-broker/service.mjs +319 -0
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/probes.d.mts +51 -0
- package/dist/substrate/runtime/probes.mjs +84 -0
- package/dist/substrate/runtime/probes.mjs.map +1 -0
- package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
- package/dist/substrate/runtime/process-supervisor.mjs +73 -0
- package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
- package/dist/substrate/runtime/projection/persisted.mjs +195 -0
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
- package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
- package/dist/substrate/runtime/projection/update.mjs +200 -0
- package/dist/substrate/runtime/projection/update.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +18 -0
- package/dist/substrate/runtime/retry-policy.mjs +16 -0
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
- package/dist/substrate/runtime/run.mjs +86 -0
- package/dist/substrate/runtime/run.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
- package/dist/substrate/runtime/runtime-decode.mjs +53 -0
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +36 -0
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
- package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor.mjs +831 -0
- package/dist/substrate/runtime/supervisor.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs +276 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -0
- package/dist/surfaces/cli/commands/config.mjs +31 -0
- package/dist/surfaces/cli/commands/config.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
- package/dist/surfaces/cli/commands/confirm.mjs +26 -0
- package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
- package/dist/surfaces/cli/commands/doctor.mjs +38 -0
- package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune.mjs +178 -0
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
- package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
- package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
- package/dist/surfaces/cli/commands/status.mjs +95 -0
- package/dist/surfaces/cli/commands/status.mjs.map +1 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
- package/dist/surfaces/cli/commands/wipe.mjs +28 -0
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
- package/dist/surfaces/cli/envelope.mjs +43 -0
- package/dist/surfaces/cli/envelope.mjs.map +1 -0
- package/dist/surfaces/cli/errors.mjs +110 -0
- package/dist/surfaces/cli/errors.mjs.map +1 -0
- package/dist/surfaces/cli/flags.mjs +56 -0
- package/dist/surfaces/cli/flags.mjs.map +1 -0
- package/dist/surfaces/cli/index.mjs +418 -0
- package/dist/surfaces/cli/index.mjs.map +1 -0
- package/dist/surfaces/cli/output.mjs +115 -0
- package/dist/surfaces/cli/output.mjs.map +1 -0
- package/dist/surfaces/cli/sysexits.mjs +139 -0
- package/dist/surfaces/cli/sysexits.mjs.map +1 -0
- package/dist/surfaces/tui/app.mjs +104 -0
- package/dist/surfaces/tui/app.mjs.map +1 -0
- package/dist/surfaces/tui/dashboard.mjs +261 -0
- package/dist/surfaces/tui/dashboard.mjs.map +1 -0
- package/dist/surfaces/tui/display-derivation.mjs +395 -0
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
- package/dist/surfaces/tui/errors.mjs +11 -0
- package/dist/surfaces/tui/errors.mjs.map +1 -0
- package/dist/surfaces/tui/event-log.mjs +155 -0
- package/dist/surfaces/tui/event-log.mjs.map +1 -0
- package/dist/surfaces/tui/heartbeat.mjs +33 -0
- package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
- package/dist/surfaces/tui/index.mjs +50 -0
- package/dist/surfaces/tui/index.mjs.map +1 -0
- package/dist/surfaces/tui/input.mjs +104 -0
- package/dist/surfaces/tui/input.mjs.map +1 -0
- package/dist/surfaces/tui/mode-detect.mjs +32 -0
- package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
- package/dist/surfaces/tui/mount-ink.mjs +31 -0
- package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
- package/dist/surfaces/tui/plain-renderer.mjs +170 -0
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
- package/dist/surfaces/tui/resource-table.mjs +507 -0
- package/dist/surfaces/tui/resource-table.mjs.map +1 -0
- package/images/_shared/signal-forward.sh +77 -0
- package/images/postgres/Dockerfile +32 -0
- package/images/seal/Dockerfile +68 -0
- package/images/seal/entrypoint.sh +65 -0
- package/images/sui/Dockerfile +73 -0
- package/images/sui/entrypoint.sh +244 -0
- package/images/sui-fork/Dockerfile +53 -0
- package/images/sui-fork/entrypoint.sh +51 -0
- package/images/walrus/Dockerfile +122 -0
- package/images/walrus/deploy-walrus.sh +305 -0
- package/images/walrus/run-walrus.sh +53 -0
- package/package.json +94 -0
|
@@ -0,0 +1,395 @@
|
|
|
1
|
+
//#region src/surfaces/tui/display-derivation.ts
|
|
2
|
+
const ROW_SECTION_CLASSIFIERS = [
|
|
3
|
+
{
|
|
4
|
+
prefixes: ["package:", "package/"],
|
|
5
|
+
section: "package"
|
|
6
|
+
},
|
|
7
|
+
{
|
|
8
|
+
prefixes: ["account/"],
|
|
9
|
+
section: "account"
|
|
10
|
+
},
|
|
11
|
+
{
|
|
12
|
+
prefixes: ["action:", "action/"],
|
|
13
|
+
section: "action"
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
prefixes: ["coin:"],
|
|
17
|
+
section: "action"
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
prefixes: ["app:", "app/"],
|
|
21
|
+
section: "app",
|
|
22
|
+
endpointSection: "service"
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
prefixes: ["host-service/"],
|
|
26
|
+
section: "service"
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
prefixes: ["sui"],
|
|
30
|
+
section: "service"
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
prefixes: ["wallet"],
|
|
34
|
+
section: "service"
|
|
35
|
+
},
|
|
36
|
+
{
|
|
37
|
+
prefixes: ["walrus:", "walrus/"],
|
|
38
|
+
section: "service"
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
prefixes: ["seal:", "seal/"],
|
|
42
|
+
section: "service"
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
prefixes: ["deepbook:", "deepbook/"],
|
|
46
|
+
section: "service"
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
prefixes: ["postgres"],
|
|
50
|
+
section: "service"
|
|
51
|
+
},
|
|
52
|
+
{
|
|
53
|
+
prefixes: ["faucet"],
|
|
54
|
+
section: "service"
|
|
55
|
+
}
|
|
56
|
+
];
|
|
57
|
+
/** Pure: status → ANSI glyph. */
|
|
58
|
+
const statusGlyph = (status) => {
|
|
59
|
+
switch (status) {
|
|
60
|
+
case "pending": return "○";
|
|
61
|
+
case "acquiring": return "◐";
|
|
62
|
+
case "ready": return "●";
|
|
63
|
+
case "failed": return "✖";
|
|
64
|
+
case "stopping": return "◑";
|
|
65
|
+
case "stopped": return "◌";
|
|
66
|
+
case "done": return "✓";
|
|
67
|
+
default: return "?";
|
|
68
|
+
}
|
|
69
|
+
};
|
|
70
|
+
/** Pure: status → color token. */
|
|
71
|
+
const statusColor = (status) => {
|
|
72
|
+
switch (status) {
|
|
73
|
+
case "pending": return "white";
|
|
74
|
+
case "acquiring": return "yellow";
|
|
75
|
+
case "ready": return "green";
|
|
76
|
+
case "failed": return "red";
|
|
77
|
+
case "stopping": return "yellow";
|
|
78
|
+
case "stopped": return "white";
|
|
79
|
+
case "done": return "green";
|
|
80
|
+
default: return "white";
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
/** Pure: status → short operator-facing label. */
|
|
84
|
+
const statusLabel = (status) => {
|
|
85
|
+
switch (status) {
|
|
86
|
+
case "pending": return "pending";
|
|
87
|
+
case "acquiring": return "starting";
|
|
88
|
+
case "ready": return "ready";
|
|
89
|
+
case "failed": return "failed";
|
|
90
|
+
case "stopping": return "stopping";
|
|
91
|
+
case "stopped": return "stopped";
|
|
92
|
+
case "done": return "done";
|
|
93
|
+
default: return "unknown";
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
/** Pure: role -> ANSI glyph. */
|
|
97
|
+
const roleGlyph = (role) => {
|
|
98
|
+
switch (role) {
|
|
99
|
+
case "service": return "⚙";
|
|
100
|
+
case "task": return "⚡";
|
|
101
|
+
default: return "?";
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
/** Pure: role -> short label. */
|
|
105
|
+
const roleLabel = (role) => {
|
|
106
|
+
switch (role) {
|
|
107
|
+
case "service": return "service";
|
|
108
|
+
case "task": return "task";
|
|
109
|
+
default: return "unknown";
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
/** Pure: role -> label color token. */
|
|
113
|
+
const roleLabelColor = (role) => {
|
|
114
|
+
switch (role) {
|
|
115
|
+
case "service": return "cyan";
|
|
116
|
+
case "task": return "magenta";
|
|
117
|
+
default: return "white";
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
/**
|
|
121
|
+
* Compute a human-friendly row label from the opaque branded plugin
|
|
122
|
+
* key. The substrate keeps `key` an opaque digest; the renderer is
|
|
123
|
+
* the layer that interprets it. We strip a few conventional prefixes
|
|
124
|
+
* (`devstack:`, `app:`) plus instance counters so common cases read
|
|
125
|
+
* cleanly.
|
|
126
|
+
*
|
|
127
|
+
* The function consumes `key` only — never `row.title`, which doesn't
|
|
128
|
+
* exist in the projection.
|
|
129
|
+
*/
|
|
130
|
+
const labelForRow = (key) => {
|
|
131
|
+
const normalized = normalizeKey(key);
|
|
132
|
+
const parts = normalized.split(/[/:]/).filter((part) => part.length > 0);
|
|
133
|
+
if (parts.length >= 2 && isSectionish(parts[0])) return humanizeToken(parts[parts.length - 1]);
|
|
134
|
+
return humanizeToken(parts[parts.length - 1] ?? normalized);
|
|
135
|
+
};
|
|
136
|
+
const ownerForRow = (key) => {
|
|
137
|
+
const first = normalizeKey(key).split(/[/:._#-]/).find((part) => part.length > 0);
|
|
138
|
+
return first === void 0 ? "plugin" : humanizeToken(first);
|
|
139
|
+
};
|
|
140
|
+
const sectionForRow = (row, endpoints = []) => {
|
|
141
|
+
const normalized = normalizeClassificationKey(row.key).toLowerCase();
|
|
142
|
+
const ownsEndpoint = endpointsForRow(row, endpoints).length > 0 || row.endpoints.length > 0;
|
|
143
|
+
const classifier = rowSectionClassifierFor(normalized);
|
|
144
|
+
if (classifier !== void 0) {
|
|
145
|
+
if (ownsEndpoint && classifier.endpointSection !== void 0) return classifier.endpointSection;
|
|
146
|
+
return classifier.section;
|
|
147
|
+
}
|
|
148
|
+
if (row.role === "service" || ownsEndpoint) return "service";
|
|
149
|
+
if (row.role === "task") return "action";
|
|
150
|
+
return "other";
|
|
151
|
+
};
|
|
152
|
+
const sectionLabel = (section) => {
|
|
153
|
+
switch (section) {
|
|
154
|
+
case "service": return "Services";
|
|
155
|
+
case "package": return "Packages";
|
|
156
|
+
case "account": return "Accounts";
|
|
157
|
+
case "action": return "Actions";
|
|
158
|
+
case "app": return "App";
|
|
159
|
+
case "other": return "Other";
|
|
160
|
+
default: return "Other";
|
|
161
|
+
}
|
|
162
|
+
};
|
|
163
|
+
const endpointsForRow = (row, endpoints) => endpoints.filter((endpoint) => row.endpoints.includes(endpoint.endpointKey) || endpoint.endpointKey.startsWith(row.key));
|
|
164
|
+
const OPERATIONAL_ENDPOINT_FIELDS = new Set([
|
|
165
|
+
"url",
|
|
166
|
+
"rpcUrl",
|
|
167
|
+
"faucetUrl",
|
|
168
|
+
"graphqlUrl"
|
|
169
|
+
]);
|
|
170
|
+
const visibleEndpointsForRow = (row, endpoints) => {
|
|
171
|
+
const rowEndpoints = endpointsForRow(row, endpoints);
|
|
172
|
+
const routed = rowEndpoints.filter((endpoint) => !isOperationalEndpoint(row.key, endpoint));
|
|
173
|
+
return routed.length > 0 ? routed : rowEndpoints;
|
|
174
|
+
};
|
|
175
|
+
const headlineForRow = (row, endpoints = []) => {
|
|
176
|
+
const rowEndpoints = visibleEndpointsForRow(row, endpoints);
|
|
177
|
+
if (rowEndpoints.length > 0) return endpointLine(rowEndpoints[0]);
|
|
178
|
+
if (row.lastError !== null && row.status === "failed") return errorSummaryFor(row.lastError);
|
|
179
|
+
return narrationFor(row.phase, row.status);
|
|
180
|
+
};
|
|
181
|
+
const secondaryForRow = (row, endpoints = []) => {
|
|
182
|
+
const out = [];
|
|
183
|
+
const rowEndpoints = endpointsForRow(row, endpoints);
|
|
184
|
+
for (const endpoint of rowEndpoints.slice(1)) out.push(endpointLine(endpoint));
|
|
185
|
+
if (row.logTail.truncated) out.push("log tail truncated");
|
|
186
|
+
return out;
|
|
187
|
+
};
|
|
188
|
+
const groupRows = (rows, endpoints = []) => {
|
|
189
|
+
const buckets = /* @__PURE__ */ new Map();
|
|
190
|
+
for (const row of rows) {
|
|
191
|
+
const cells = deriveDisplayCells(row, endpoints);
|
|
192
|
+
const list = buckets.get(cells.section) ?? [];
|
|
193
|
+
list.push({
|
|
194
|
+
row,
|
|
195
|
+
cells
|
|
196
|
+
});
|
|
197
|
+
buckets.set(cells.section, list);
|
|
198
|
+
}
|
|
199
|
+
return [
|
|
200
|
+
"service",
|
|
201
|
+
"package",
|
|
202
|
+
"account",
|
|
203
|
+
"action",
|
|
204
|
+
"app",
|
|
205
|
+
"other"
|
|
206
|
+
].filter((section) => buckets.has(section)).map((section) => ({
|
|
207
|
+
key: section,
|
|
208
|
+
label: sectionLabel(section),
|
|
209
|
+
rows: buckets.get(section) ?? []
|
|
210
|
+
}));
|
|
211
|
+
};
|
|
212
|
+
const deriveDashboardSummary = (state) => {
|
|
213
|
+
const readyRows = state.rows.filter((row) => row.status === "ready" || row.status === "done").length;
|
|
214
|
+
const activeRows = state.rows.filter((row) => row.status === "acquiring" || row.status === "stopping").length;
|
|
215
|
+
const failedRows = state.rows.filter((row) => row.status === "failed").length;
|
|
216
|
+
const waitingRows = state.rows.filter((row) => row.status === "pending" || row.status === "stopped").length;
|
|
217
|
+
const health = state.rows.length === 0 ? "empty" : failedRows > 0 ? "blocked" : activeRows > 0 || waitingRows > 0 ? "active" : "ready";
|
|
218
|
+
return {
|
|
219
|
+
totalRows: state.rows.length,
|
|
220
|
+
readyRows,
|
|
221
|
+
activeRows,
|
|
222
|
+
failedRows,
|
|
223
|
+
waitingRows,
|
|
224
|
+
endpointCount: visibleEndpointCount(state.rows, state.endpoints),
|
|
225
|
+
accountCount: state.accounts.length,
|
|
226
|
+
packageCount: state.packages.length,
|
|
227
|
+
errorCount: state.errors.length,
|
|
228
|
+
health
|
|
229
|
+
};
|
|
230
|
+
};
|
|
231
|
+
const visibleEndpointCount = (rows, endpoints) => {
|
|
232
|
+
const rowOwned = /* @__PURE__ */ new Set();
|
|
233
|
+
const visible = /* @__PURE__ */ new Set();
|
|
234
|
+
for (const row of rows) {
|
|
235
|
+
for (const endpoint of endpointsForRow(row, endpoints)) rowOwned.add(endpoint.endpointKey);
|
|
236
|
+
for (const endpoint of visibleEndpointsForRow(row, endpoints)) visible.add(endpoint.endpointKey);
|
|
237
|
+
}
|
|
238
|
+
for (const endpoint of endpoints) if (!rowOwned.has(endpoint.endpointKey)) visible.add(endpoint.endpointKey);
|
|
239
|
+
return visible.size;
|
|
240
|
+
};
|
|
241
|
+
const dashboardSummaryLine = (summary) => [
|
|
242
|
+
`${summary.readyRows}/${summary.totalRows} ready`,
|
|
243
|
+
summary.activeRows > 0 ? `${summary.activeRows} active` : null,
|
|
244
|
+
summary.waitingRows > 0 ? `${summary.waitingRows} waiting` : null,
|
|
245
|
+
summary.failedRows > 0 ? `${summary.failedRows} failed` : null,
|
|
246
|
+
`${summary.endpointCount} urls`,
|
|
247
|
+
`${summary.accountCount} accounts`,
|
|
248
|
+
summary.packageCount > 0 ? `${summary.packageCount} packages` : null,
|
|
249
|
+
summary.errorCount === 0 ? "no errors" : `${summary.errorCount} errors`
|
|
250
|
+
].filter((part) => part !== null).join(" ");
|
|
251
|
+
/**
|
|
252
|
+
* Pure: phase narration string → renderable verb form. Phase is
|
|
253
|
+
* free-form upstream (Tension 14). The renderer's job is to make it
|
|
254
|
+
* legible; we keep this minimal — single-line, no fancy verb tense
|
|
255
|
+
* inference. The truncation cap protects against pathological long
|
|
256
|
+
* narrations.
|
|
257
|
+
*/
|
|
258
|
+
const narrationFor = (phase, status) => {
|
|
259
|
+
if (phase === null || phase.trim().length === 0) return status === "acquiring" ? "starting…" : "";
|
|
260
|
+
const trimmed = phase.trim();
|
|
261
|
+
const TRUNC = 80;
|
|
262
|
+
return trimmed.length > TRUNC ? `${trimmed.slice(0, TRUNC - 1)}…` : trimmed;
|
|
263
|
+
};
|
|
264
|
+
const ERR_SUMMARY_TRUNC = 120;
|
|
265
|
+
/**
|
|
266
|
+
* Pure: `Row.lastError` → renderable in-row summary. Keep it short;
|
|
267
|
+
* detailed error context belongs in the activity/log stream.
|
|
268
|
+
*/
|
|
269
|
+
const errorSummaryFor = (error) => {
|
|
270
|
+
if (error === null) return "";
|
|
271
|
+
const head = `${error.tag}: ${error.summary}`;
|
|
272
|
+
const detail = error.chain.find((line) => line !== head && line !== error.tag);
|
|
273
|
+
const compactDetail = detail === void 0 ? void 0 : detail.replace(/^[A-Za-z0-9_[\]-]+:\s*/, "");
|
|
274
|
+
const summary = compactDetail === void 0 ? head : `${head}: ${compactDetail}`;
|
|
275
|
+
return summary.length > ERR_SUMMARY_TRUNC ? `${summary.slice(0, ERR_SUMMARY_TRUNC - 1)}…` : summary;
|
|
276
|
+
};
|
|
277
|
+
/**
|
|
278
|
+
* Pure: `Endpoint` → renderable line. Renderers prefer `displayUrl`
|
|
279
|
+
* when set (codegen-friendly variant), falling back to `url`.
|
|
280
|
+
*/
|
|
281
|
+
const endpointLine = (endpoint) => {
|
|
282
|
+
const target = endpoint.displayUrl ?? endpoint.url;
|
|
283
|
+
const backing = endpoint.displayUrl !== null && endpoint.displayUrl !== endpoint.url ? ` -> ${endpoint.url}` : "";
|
|
284
|
+
const protocol = endpoint.wireProtocol === "http" ? "" : ` [${endpoint.wireProtocol}]`;
|
|
285
|
+
return `${endpoint.name}: ${target}${backing}${protocol}`;
|
|
286
|
+
};
|
|
287
|
+
const accountLine = (account) => {
|
|
288
|
+
const address = account.address ?? "<pending>";
|
|
289
|
+
const scheme = account.scheme ?? "scheme pending";
|
|
290
|
+
const source = account.source ?? "source pending";
|
|
291
|
+
const funding = accountFundingLine(account.funding);
|
|
292
|
+
const wallet = account.walletVisible ? "wallet" : null;
|
|
293
|
+
return [
|
|
294
|
+
humanizeToken(account.name),
|
|
295
|
+
address,
|
|
296
|
+
scheme,
|
|
297
|
+
source,
|
|
298
|
+
funding,
|
|
299
|
+
wallet
|
|
300
|
+
].filter((part) => part !== null && part.length > 0).join(" ");
|
|
301
|
+
};
|
|
302
|
+
const packageLine = (pkg) => {
|
|
303
|
+
return [
|
|
304
|
+
humanizeToken(pkg.name),
|
|
305
|
+
pkg.packageId,
|
|
306
|
+
pkg.mvrPlaceholder,
|
|
307
|
+
pkg.kind
|
|
308
|
+
].filter((part) => part !== null && part.length > 0).join(" ");
|
|
309
|
+
};
|
|
310
|
+
const accountCells = (account) => ({
|
|
311
|
+
name: humanizeToken(account.name),
|
|
312
|
+
address: account.address ?? "<pending>",
|
|
313
|
+
scheme: account.scheme ?? "pending",
|
|
314
|
+
source: account.source ?? "pending",
|
|
315
|
+
funding: accountFundingLine(account.funding)
|
|
316
|
+
});
|
|
317
|
+
const accountFundingLine = (funding) => {
|
|
318
|
+
const entries = funding.entries ?? [];
|
|
319
|
+
if (entries.length > 0) {
|
|
320
|
+
const rendered = entries.map((entry) => `${entry.coin}:${entry.amount}${entry.status === "skipped" ? " skipped" : ""}`).join(", ");
|
|
321
|
+
return funding.status === "funded" ? `funded ${rendered}` : `funding ${rendered}`;
|
|
322
|
+
}
|
|
323
|
+
switch (funding.status) {
|
|
324
|
+
case "pending": return funding.requestedMist === null ? "funding pending" : `funding ${funding.requestedMist}`;
|
|
325
|
+
case "funded": return funding.balanceMist !== null ? `funded ${funding.balanceMist}` : funding.requestedMist !== null ? `funded ${funding.requestedMist}` : "funded";
|
|
326
|
+
case "skipped": return "funding skipped";
|
|
327
|
+
case "failed": return "funding failed";
|
|
328
|
+
case "unknown": return "funding unknown";
|
|
329
|
+
default:
|
|
330
|
+
funding.status;
|
|
331
|
+
return "";
|
|
332
|
+
}
|
|
333
|
+
};
|
|
334
|
+
const packageCells = (pkg) => ({
|
|
335
|
+
name: humanizeToken(pkg.name),
|
|
336
|
+
packageId: pkg.packageId,
|
|
337
|
+
mvr: pkg.mvrPlaceholder,
|
|
338
|
+
kind: pkg.kind,
|
|
339
|
+
detail: pkg.kind
|
|
340
|
+
});
|
|
341
|
+
/**
|
|
342
|
+
* Derive every visible display cell for a single row.
|
|
343
|
+
*
|
|
344
|
+
* Consumes ONLY `row.key`, `row.role`, `row.status`, `row.phase`,
|
|
345
|
+
* `row.lastError`, `row.endpoints` (rendered separately by
|
|
346
|
+
* `resource-table.tsx`), or `row.logTail` (kept in the projection
|
|
347
|
+
* for renderer variants that need tails, but not used as primary
|
|
348
|
+
* dashboard state because generic lifecycle log lines duplicate the
|
|
349
|
+
* table).
|
|
350
|
+
*/
|
|
351
|
+
const deriveDisplayCells = (row, endpoints = []) => ({
|
|
352
|
+
statusGlyph: statusGlyph(row.status),
|
|
353
|
+
statusColor: statusColor(row.status),
|
|
354
|
+
statusLabel: statusLabel(row.status),
|
|
355
|
+
roleGlyph: roleGlyph(row.role),
|
|
356
|
+
roleLabel: roleLabel(row.role),
|
|
357
|
+
label: labelForRow(row.key),
|
|
358
|
+
narration: narrationFor(row.phase, row.status),
|
|
359
|
+
errorSummary: errorSummaryFor(row.lastError),
|
|
360
|
+
labelColor: roleLabelColor(row.role),
|
|
361
|
+
section: sectionForRow(row, endpoints),
|
|
362
|
+
owner: ownerForRow(row.key),
|
|
363
|
+
headline: headlineForRow(row, endpoints),
|
|
364
|
+
secondary: secondaryForRow(row, endpoints)
|
|
365
|
+
});
|
|
366
|
+
const normalizeKey = (key) => key.replace(/^@devstack\//, "").replace(/^(devstack:|app:)/, "").replace(/#\d+$/, "").replace(/\/\d+$/, "");
|
|
367
|
+
const normalizeClassificationKey = (key) => key.replace(/^@devstack\//, "").replace(/^devstack:/, "").replace(/#\d+$/, "").replace(/\/\d+$/, "");
|
|
368
|
+
const humanizeToken = (token) => token.replace(/[-_]+/g, " ").replace(/^\w/, (head) => head.toUpperCase());
|
|
369
|
+
const containsKeyPart = (key, parts) => {
|
|
370
|
+
return key.split(/[/:._#-]/).filter((part) => part.length > 0).some((token) => parts.includes(token));
|
|
371
|
+
};
|
|
372
|
+
const isSectionish = (token) => containsKeyPart(token.toLowerCase(), [
|
|
373
|
+
"service",
|
|
374
|
+
"package",
|
|
375
|
+
"account",
|
|
376
|
+
"action",
|
|
377
|
+
"app"
|
|
378
|
+
]);
|
|
379
|
+
const rowSectionClassifierFor = (key) => ROW_SECTION_CLASSIFIERS.find((classifier) => classifier.prefixes.some((prefix) => keyMatchesClassifierPrefix(key, prefix)));
|
|
380
|
+
const keyMatchesClassifierPrefix = (key, prefix) => {
|
|
381
|
+
if (prefix.endsWith(":") || prefix.endsWith("/")) return key.startsWith(prefix);
|
|
382
|
+
if (key === prefix) return true;
|
|
383
|
+
const next = key[prefix.length];
|
|
384
|
+
return key.startsWith(prefix) && next !== void 0 && "/:._-".includes(next);
|
|
385
|
+
};
|
|
386
|
+
const isOperationalEndpoint = (rowKey, endpoint) => {
|
|
387
|
+
const prefix = `${rowKey}:`;
|
|
388
|
+
if (!endpoint.endpointKey.startsWith(prefix)) return false;
|
|
389
|
+
const field = endpoint.endpointKey.slice(prefix.length);
|
|
390
|
+
return OPERATIONAL_ENDPOINT_FIELDS.has(field);
|
|
391
|
+
};
|
|
392
|
+
//#endregion
|
|
393
|
+
export { accountCells, accountLine, dashboardSummaryLine, deriveDashboardSummary, deriveDisplayCells, endpointLine, errorSummaryFor, groupRows, labelForRow, packageCells, packageLine, roleLabel, statusLabel, visibleEndpointsForRow };
|
|
394
|
+
|
|
395
|
+
//# sourceMappingURL=display-derivation.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"display-derivation.mjs","names":[],"sources":["../../../src/surfaces/tui/display-derivation.ts"],"sourcesContent":["// Display derivation — the load-bearing transducer that makes the\n// \"no display vocab in projection\" invariant testable.\n//\n// The renderer consumes ONLY the typed projection (`Row`, `Endpoint`,\n// `StructuredError`, `LifecycleStatus`, `PluginRole`, ...) from\n// `substrate/projection.ts`. Every visible glyph, color, label, and\n// narration string is computed HERE from `row.role`, `row.status`,\n// `row.phase`, `row.lastError`, etc.\n//\n// HARD INVARIANT: this module never reads a field named `title`,\n// `primary`, or `extras` — those fields don't exist on the projection\n// (the substrate's `__ProjectionFieldsClosed` guard fails to compile\n// if they did). The TUI's test of that invariant is: every visible\n// cell rendered by `resource-table.tsx` flows through one of these pure\n// functions.\n//\n// Pure. No Effect, no IO, no clocks. Input typed projection → output\n// strings + enum-y \"color tokens\" (resolved to terminal colors by the\n// Ink layer via `Text color={…}`).\n\nimport type { LifecycleStatus, PhaseNarration, PluginRole } from '../../substrate/lifecycle.ts';\nimport type {\n\tAccountProjection,\n\tEndpoint,\n\tPackageProjection,\n\tRow,\n\tStructuredError,\n\tSubscribableState,\n} from '../../substrate/projection.ts';\n\n// -----------------------------------------------------------------------------\n// Color tokens\n// -----------------------------------------------------------------------------\n\n/**\n * Closed set of color tokens the TUI uses. Ink resolves these to ANSI\n * sequences. NO_COLOR / FORCE_COLOR / TERM=dumb are honored by Ink's\n * defaults (Tension: TUI must not override user color preferences).\n */\nexport type ColorToken = 'yellow' | 'green' | 'red' | 'magenta' | 'cyan' | 'blueBright' | 'white';\n\n// -----------------------------------------------------------------------------\n// Display cells — the public output shape of this module\n// -----------------------------------------------------------------------------\n\n/**\n * Per-row display cells the row renderer consumes. None of these\n * fields are read from the projection — they are computed from\n * `Row.role` + `Row.status` + `Row.phase` + `Row.lastError`.\n *\n * Naming note: we DELIBERATELY avoid the words `title`, `primary`,\n * `extras` in this type's field names to make the invariant grep-able.\n * `label` is computed from `key`; `narration` from `phase`;\n * `summary` from `lastError`.\n */\nexport interface DisplayCells {\n\t/** Status glyph (single char). */\n\treadonly statusGlyph: string;\n\t/** Status color token. */\n\treadonly statusColor: ColorToken;\n\t/** Status label (short verbal, e.g. \"ready\"). */\n\treadonly statusLabel: string;\n\t/** Role glyph (single char). */\n\treadonly roleGlyph: string;\n\t/** Role label (e.g. \"service\"). */\n\treadonly roleLabel: string;\n\t/** Computed row label — derived from `row.key`, not from any\n\t * projection-side `title`. */\n\treadonly label: string;\n\t/** Narration line — formatted from `row.phase`. */\n\treadonly narration: string;\n\t/** Error summary — formatted from `row.lastError`. */\n\treadonly errorSummary: string;\n\t/** Color the row's label should render in (role-derived,\n\t * optionally tinted by status). */\n\treadonly labelColor: ColorToken;\n\t/** Group bucket for dashboard sectioning. */\n\treadonly section: RowSection;\n\t/** Plugin-owner chip derived from the row key. */\n\treadonly owner: string;\n\t/** Main row value: usually the first endpoint or latest useful line. */\n\treadonly headline: string;\n\t/** Secondary details visible in the detail pane. */\n\treadonly secondary: ReadonlyArray<string>;\n}\n\nexport type RowSection = 'service' | 'package' | 'account' | 'action' | 'app' | 'other';\n\ninterface RowSectionClassifier {\n\treadonly prefixes: ReadonlyArray<string>;\n\treadonly section: RowSection;\n\treadonly endpointSection?: RowSection;\n}\n\nconst ROW_SECTION_CLASSIFIERS = [\n\t{ prefixes: ['package:', 'package/'], section: 'package' },\n\t{ prefixes: ['account/'], section: 'account' },\n\t{ prefixes: ['action:', 'action/'], section: 'action' },\n\t{ prefixes: ['coin:'], section: 'action' },\n\t{ prefixes: ['app:', 'app/'], section: 'app', endpointSection: 'service' },\n\t{ prefixes: ['host-service/'], section: 'service' },\n\t{ prefixes: ['sui'], section: 'service' },\n\t{ prefixes: ['wallet'], section: 'service' },\n\t{ prefixes: ['walrus:', 'walrus/'], section: 'service' },\n\t{ prefixes: ['seal:', 'seal/'], section: 'service' },\n\t{ prefixes: ['deepbook:', 'deepbook/'], section: 'service' },\n\t{ prefixes: ['postgres'], section: 'service' },\n\t{ prefixes: ['faucet'], section: 'service' },\n] as const satisfies ReadonlyArray<RowSectionClassifier>;\n\nexport interface DisplayRow {\n\treadonly row: Row;\n\treadonly cells: DisplayCells;\n}\n\nexport interface DisplaySection {\n\treadonly key: RowSection;\n\treadonly label: string;\n\treadonly rows: ReadonlyArray<DisplayRow>;\n}\n\nexport interface DashboardSummary {\n\treadonly totalRows: number;\n\treadonly readyRows: number;\n\treadonly activeRows: number;\n\treadonly failedRows: number;\n\treadonly waitingRows: number;\n\treadonly endpointCount: number;\n\treadonly accountCount: number;\n\treadonly packageCount: number;\n\treadonly errorCount: number;\n\treadonly health: 'ready' | 'active' | 'blocked' | 'empty';\n}\n\n// -----------------------------------------------------------------------------\n// Status → glyph / color / label\n// -----------------------------------------------------------------------------\n\n/** Pure: status → ANSI glyph. */\nexport const statusGlyph = (status: LifecycleStatus): string => {\n\tswitch (status) {\n\t\tcase 'pending':\n\t\t\treturn '○';\n\t\tcase 'acquiring':\n\t\t\treturn '◐';\n\t\tcase 'ready':\n\t\t\treturn '●';\n\t\tcase 'failed':\n\t\t\treturn '✖';\n\t\tcase 'stopping':\n\t\t\treturn '◑';\n\t\tcase 'stopped':\n\t\t\treturn '◌';\n\t\tcase 'done':\n\t\t\treturn '✓';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = status;\n\t\t\tvoid _exhaustive;\n\t\t\treturn '?';\n\t\t}\n\t}\n};\n\n/** Pure: status → color token. */\nexport const statusColor = (status: LifecycleStatus): ColorToken => {\n\tswitch (status) {\n\t\tcase 'pending':\n\t\t\treturn 'white';\n\t\tcase 'acquiring':\n\t\t\treturn 'yellow';\n\t\tcase 'ready':\n\t\t\treturn 'green';\n\t\tcase 'failed':\n\t\t\treturn 'red';\n\t\tcase 'stopping':\n\t\t\treturn 'yellow';\n\t\tcase 'stopped':\n\t\t\treturn 'white';\n\t\tcase 'done':\n\t\t\treturn 'green';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = status;\n\t\t\tvoid _exhaustive;\n\t\t\treturn 'white';\n\t\t}\n\t}\n};\n\n/** Pure: status → short operator-facing label. */\nexport const statusLabel = (status: LifecycleStatus): string => {\n\tswitch (status) {\n\t\tcase 'pending':\n\t\t\treturn 'pending';\n\t\tcase 'acquiring':\n\t\t\treturn 'starting';\n\t\tcase 'ready':\n\t\t\treturn 'ready';\n\t\tcase 'failed':\n\t\t\treturn 'failed';\n\t\tcase 'stopping':\n\t\t\treturn 'stopping';\n\t\tcase 'stopped':\n\t\t\treturn 'stopped';\n\t\tcase 'done':\n\t\t\treturn 'done';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = status;\n\t\t\tvoid _exhaustive;\n\t\t\treturn 'unknown';\n\t\t}\n\t}\n};\n\n// -----------------------------------------------------------------------------\n// Role -> glyph / label / color\n// -----------------------------------------------------------------------------\n\n/** Pure: role -> ANSI glyph. */\nexport const roleGlyph = (role: PluginRole): string => {\n\tswitch (role) {\n\t\tcase 'service':\n\t\t\treturn '⚙';\n\t\tcase 'task':\n\t\t\treturn '⚡';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = role;\n\t\t\tvoid _exhaustive;\n\t\t\treturn '?';\n\t\t}\n\t}\n};\n\n/** Pure: role -> short label. */\nexport const roleLabel = (role: PluginRole): string => {\n\tswitch (role) {\n\t\tcase 'service':\n\t\t\treturn 'service';\n\t\tcase 'task':\n\t\t\treturn 'task';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = role;\n\t\t\tvoid _exhaustive;\n\t\t\treturn 'unknown';\n\t\t}\n\t}\n};\n\n/** Pure: role -> label color token. */\nexport const roleLabelColor = (role: PluginRole): ColorToken => {\n\tswitch (role) {\n\t\tcase 'service':\n\t\t\treturn 'cyan';\n\t\tcase 'task':\n\t\t\treturn 'magenta';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = role;\n\t\t\tvoid _exhaustive;\n\t\t\treturn 'white';\n\t\t}\n\t}\n};\n\n// -----------------------------------------------------------------------------\n// Row label — derived from `key`, not from any pre-baked title\n// -----------------------------------------------------------------------------\n\n/**\n * Compute a human-friendly row label from the opaque branded plugin\n * key. The substrate keeps `key` an opaque digest; the renderer is\n * the layer that interprets it. We strip a few conventional prefixes\n * (`devstack:`, `app:`) plus instance counters so common cases read\n * cleanly.\n *\n * The function consumes `key` only — never `row.title`, which doesn't\n * exist in the projection.\n */\nexport const labelForRow = (key: string): string => {\n\tconst normalized = normalizeKey(key);\n\tconst parts = normalized.split(/[/:]/).filter((part) => part.length > 0);\n\tif (parts.length >= 2 && isSectionish(parts[0]!)) return humanizeToken(parts[parts.length - 1]!);\n\treturn humanizeToken(parts[parts.length - 1] ?? normalized);\n};\n\nexport const ownerForRow = (key: string): string => {\n\tconst normalized = normalizeKey(key);\n\tconst first = normalized.split(/[/:._#-]/).find((part) => part.length > 0);\n\treturn first === undefined ? 'plugin' : humanizeToken(first);\n};\n\nexport const sectionForRow = (\n\trow: Pick<Row, 'key' | 'role' | 'endpoints'>,\n\tendpoints: ReadonlyArray<Endpoint> = [],\n): RowSection => {\n\tconst normalized = normalizeClassificationKey(row.key).toLowerCase();\n\tconst ownsEndpoint = endpointsForRow(row, endpoints).length > 0 || row.endpoints.length > 0;\n\tconst classifier = rowSectionClassifierFor(normalized);\n\tif (classifier !== undefined) {\n\t\tif (ownsEndpoint && classifier.endpointSection !== undefined) return classifier.endpointSection;\n\t\treturn classifier.section;\n\t}\n\tif (row.role === 'service' || ownsEndpoint) return 'service';\n\tif (row.role === 'task') return 'action';\n\treturn 'other';\n};\n\nexport const sectionLabel = (section: RowSection): string => {\n\tswitch (section) {\n\t\tcase 'service':\n\t\t\treturn 'Services';\n\t\tcase 'package':\n\t\t\treturn 'Packages';\n\t\tcase 'account':\n\t\t\treturn 'Accounts';\n\t\tcase 'action':\n\t\t\treturn 'Actions';\n\t\tcase 'app':\n\t\t\treturn 'App';\n\t\tcase 'other':\n\t\t\treturn 'Other';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = section;\n\t\t\tvoid _exhaustive;\n\t\t\treturn 'Other';\n\t\t}\n\t}\n};\n\nexport const endpointsForRow = (\n\trow: Pick<Row, 'key' | 'endpoints'>,\n\tendpoints: ReadonlyArray<Endpoint>,\n): ReadonlyArray<Endpoint> =>\n\tendpoints.filter(\n\t\t(endpoint) =>\n\t\t\trow.endpoints.includes(endpoint.endpointKey) || endpoint.endpointKey.startsWith(row.key),\n\t);\n\nconst OPERATIONAL_ENDPOINT_FIELDS = new Set(['url', 'rpcUrl', 'faucetUrl', 'graphqlUrl']);\n\nexport const visibleEndpointsForRow = (\n\trow: Pick<Row, 'key' | 'endpoints'>,\n\tendpoints: ReadonlyArray<Endpoint>,\n): ReadonlyArray<Endpoint> => {\n\tconst rowEndpoints = endpointsForRow(row, endpoints);\n\tconst routed = rowEndpoints.filter((endpoint) => !isOperationalEndpoint(row.key, endpoint));\n\treturn routed.length > 0 ? routed : rowEndpoints;\n};\n\nexport const headlineForRow = (row: Row, endpoints: ReadonlyArray<Endpoint> = []): string => {\n\tconst rowEndpoints = visibleEndpointsForRow(row, endpoints);\n\tif (rowEndpoints.length > 0) return endpointLine(rowEndpoints[0]!);\n\tif (row.lastError !== null && row.status === 'failed') return errorSummaryFor(row.lastError);\n\treturn narrationFor(row.phase, row.status);\n};\n\nexport const secondaryForRow = (\n\trow: Row,\n\tendpoints: ReadonlyArray<Endpoint> = [],\n): ReadonlyArray<string> => {\n\tconst out: Array<string> = [];\n\tconst rowEndpoints = endpointsForRow(row, endpoints);\n\tfor (const endpoint of rowEndpoints.slice(1)) out.push(endpointLine(endpoint));\n\tif (row.logTail.truncated) out.push('log tail truncated');\n\treturn out;\n};\n\nexport const groupRows = (\n\trows: ReadonlyArray<Row>,\n\tendpoints: ReadonlyArray<Endpoint> = [],\n): ReadonlyArray<DisplaySection> => {\n\tconst buckets = new Map<RowSection, Array<DisplayRow>>();\n\tfor (const row of rows) {\n\t\tconst cells = deriveDisplayCells(row, endpoints);\n\t\tconst list = buckets.get(cells.section) ?? [];\n\t\tlist.push({ row, cells });\n\t\tbuckets.set(cells.section, list);\n\t}\n\tconst order: ReadonlyArray<RowSection> = [\n\t\t'service',\n\t\t'package',\n\t\t'account',\n\t\t'action',\n\t\t'app',\n\t\t'other',\n\t];\n\treturn order\n\t\t.filter((section) => buckets.has(section))\n\t\t.map((section) => ({\n\t\t\tkey: section,\n\t\t\tlabel: sectionLabel(section),\n\t\t\trows: buckets.get(section) ?? [],\n\t\t}));\n};\n\nexport const deriveDashboardSummary = (\n\tstate: Pick<SubscribableState, 'rows' | 'endpoints' | 'accounts' | 'packages' | 'errors'>,\n): DashboardSummary => {\n\tconst readyRows = state.rows.filter(\n\t\t(row) => row.status === 'ready' || row.status === 'done',\n\t).length;\n\tconst activeRows = state.rows.filter(\n\t\t(row) => row.status === 'acquiring' || row.status === 'stopping',\n\t).length;\n\tconst failedRows = state.rows.filter((row) => row.status === 'failed').length;\n\tconst waitingRows = state.rows.filter(\n\t\t(row) => row.status === 'pending' || row.status === 'stopped',\n\t).length;\n\tconst health =\n\t\tstate.rows.length === 0\n\t\t\t? 'empty'\n\t\t\t: failedRows > 0\n\t\t\t\t? 'blocked'\n\t\t\t\t: activeRows > 0 || waitingRows > 0\n\t\t\t\t\t? 'active'\n\t\t\t\t\t: 'ready';\n\treturn {\n\t\ttotalRows: state.rows.length,\n\t\treadyRows,\n\t\tactiveRows,\n\t\tfailedRows,\n\t\twaitingRows,\n\t\tendpointCount: visibleEndpointCount(state.rows, state.endpoints),\n\t\taccountCount: state.accounts.length,\n\t\tpackageCount: state.packages.length,\n\t\terrorCount: state.errors.length,\n\t\thealth,\n\t};\n};\n\nconst visibleEndpointCount = (\n\trows: ReadonlyArray<Row>,\n\tendpoints: ReadonlyArray<Endpoint>,\n): number => {\n\tconst rowOwned = new Set<Endpoint['endpointKey']>();\n\tconst visible = new Set<Endpoint['endpointKey']>();\n\tfor (const row of rows) {\n\t\tfor (const endpoint of endpointsForRow(row, endpoints)) {\n\t\t\trowOwned.add(endpoint.endpointKey);\n\t\t}\n\t\tfor (const endpoint of visibleEndpointsForRow(row, endpoints)) {\n\t\t\tvisible.add(endpoint.endpointKey);\n\t\t}\n\t}\n\tfor (const endpoint of endpoints) {\n\t\tif (!rowOwned.has(endpoint.endpointKey)) visible.add(endpoint.endpointKey);\n\t}\n\treturn visible.size;\n};\n\nexport const dashboardSummaryLine = (summary: DashboardSummary): string =>\n\t[\n\t\t`${summary.readyRows}/${summary.totalRows} ready`,\n\t\tsummary.activeRows > 0 ? `${summary.activeRows} active` : null,\n\t\tsummary.waitingRows > 0 ? `${summary.waitingRows} waiting` : null,\n\t\tsummary.failedRows > 0 ? `${summary.failedRows} failed` : null,\n\t\t`${summary.endpointCount} urls`,\n\t\t`${summary.accountCount} accounts`,\n\t\tsummary.packageCount > 0 ? `${summary.packageCount} packages` : null,\n\t\tsummary.errorCount === 0 ? 'no errors' : `${summary.errorCount} errors`,\n\t]\n\t\t.filter((part): part is string => part !== null)\n\t\t.join(' ');\n\n// -----------------------------------------------------------------------------\n// Phase narration formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Pure: phase narration string → renderable verb form. Phase is\n * free-form upstream (Tension 14). The renderer's job is to make it\n * legible; we keep this minimal — single-line, no fancy verb tense\n * inference. The truncation cap protects against pathological long\n * narrations.\n */\nexport const narrationFor = (phase: PhaseNarration | null, status: LifecycleStatus): string => {\n\tif (phase === null || phase.trim().length === 0) {\n\t\t// No phase set; surface a status-derived default for `acquiring`,\n\t\t// stay silent otherwise (Tension: don't manufacture text the\n\t\t// engine didn't ask for).\n\t\treturn status === 'acquiring' ? 'starting…' : '';\n\t}\n\tconst trimmed = phase.trim();\n\tconst TRUNC = 80;\n\treturn trimmed.length > TRUNC ? `${trimmed.slice(0, TRUNC - 1)}…` : trimmed;\n};\n\n// -----------------------------------------------------------------------------\n// Error summary formatting\n// -----------------------------------------------------------------------------\n\nconst ERR_SUMMARY_TRUNC = 120;\n\n/**\n * Pure: `Row.lastError` → renderable in-row summary. Keep it short;\n * detailed error context belongs in the activity/log stream.\n */\nexport const errorSummaryFor = (error: StructuredError | null): string => {\n\tif (error === null) return '';\n\tconst head = `${error.tag}: ${error.summary}`;\n\tconst detail = error.chain.find((line) => line !== head && line !== error.tag);\n\tconst compactDetail =\n\t\tdetail === undefined ? undefined : detail.replace(/^[A-Za-z0-9_[\\]-]+:\\s*/, '');\n\tconst summary = compactDetail === undefined ? head : `${head}: ${compactDetail}`;\n\treturn summary.length > ERR_SUMMARY_TRUNC\n\t\t? `${summary.slice(0, ERR_SUMMARY_TRUNC - 1)}…`\n\t\t: summary;\n};\n\n// -----------------------------------------------------------------------------\n// Endpoint formatting\n// -----------------------------------------------------------------------------\n\n/**\n * Pure: `Endpoint` → renderable line. Renderers prefer `displayUrl`\n * when set (codegen-friendly variant), falling back to `url`.\n */\nexport const endpointLine = (endpoint: Endpoint): string => {\n\tconst target = endpoint.displayUrl ?? endpoint.url;\n\tconst backing =\n\t\tendpoint.displayUrl !== null && endpoint.displayUrl !== endpoint.url\n\t\t\t? ` -> ${endpoint.url}`\n\t\t\t: '';\n\tconst protocol = endpoint.wireProtocol === 'http' ? '' : ` [${endpoint.wireProtocol}]`;\n\treturn `${endpoint.name}: ${target}${backing}${protocol}`;\n};\n\nexport const endpointsSummaryForRow = (\n\trow: Pick<Row, 'key' | 'endpoints'>,\n\tendpoints: ReadonlyArray<Endpoint>,\n): string => {\n\tconst rowEndpoints = visibleEndpointsForRow(row, endpoints);\n\tif (rowEndpoints.length === 0) return '';\n\treturn rowEndpoints.map(endpointLine).join(' | ');\n};\n\nexport const accountLine = (account: AccountProjection): string => {\n\tconst address = account.address ?? '<pending>';\n\tconst scheme = account.scheme ?? 'scheme pending';\n\tconst source = account.source ?? 'source pending';\n\tconst funding = accountFundingLine(account.funding);\n\tconst wallet = account.walletVisible ? 'wallet' : null;\n\treturn [humanizeToken(account.name), address, scheme, source, funding, wallet]\n\t\t.filter((part): part is string => part !== null && part.length > 0)\n\t\t.join(' ');\n};\n\nexport const packageLine = (pkg: PackageProjection): string => {\n\treturn [humanizeToken(pkg.name), pkg.packageId, pkg.mvrPlaceholder, pkg.kind]\n\t\t.filter((part): part is string => part !== null && part.length > 0)\n\t\t.join(' ');\n};\n\nexport interface AccountCells {\n\treadonly name: string;\n\treadonly address: string;\n\treadonly scheme: string;\n\treadonly source: string;\n\treadonly funding: string;\n}\n\nexport interface PackageCells {\n\treadonly name: string;\n\treadonly packageId: string;\n\treadonly mvr: string;\n\treadonly kind: string;\n\treadonly detail: string;\n}\n\nexport const accountCells = (account: AccountProjection): AccountCells => ({\n\tname: humanizeToken(account.name),\n\taddress: account.address ?? '<pending>',\n\tscheme: account.scheme ?? 'pending',\n\tsource: account.source ?? 'pending',\n\tfunding: accountFundingLine(account.funding),\n});\n\nconst accountFundingLine = (funding: AccountProjection['funding']): string => {\n\tconst entries = funding.entries ?? [];\n\tif (entries.length > 0) {\n\t\tconst rendered = entries\n\t\t\t.map(\n\t\t\t\t(entry) => `${entry.coin}:${entry.amount}${entry.status === 'skipped' ? ' skipped' : ''}`,\n\t\t\t)\n\t\t\t.join(', ');\n\t\treturn funding.status === 'funded' ? `funded ${rendered}` : `funding ${rendered}`;\n\t}\n\tswitch (funding.status) {\n\t\tcase 'pending':\n\t\t\treturn funding.requestedMist === null\n\t\t\t\t? 'funding pending'\n\t\t\t\t: `funding ${funding.requestedMist}`;\n\t\tcase 'funded':\n\t\t\treturn funding.balanceMist !== null\n\t\t\t\t? `funded ${funding.balanceMist}`\n\t\t\t\t: funding.requestedMist !== null\n\t\t\t\t\t? `funded ${funding.requestedMist}`\n\t\t\t\t\t: 'funded';\n\t\tcase 'skipped':\n\t\t\treturn 'funding skipped';\n\t\tcase 'failed':\n\t\t\treturn 'funding failed';\n\t\tcase 'unknown':\n\t\t\treturn 'funding unknown';\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = funding.status;\n\t\t\tvoid _exhaustive;\n\t\t\treturn '';\n\t\t}\n\t}\n};\n\nexport const packageCells = (pkg: PackageProjection): PackageCells => ({\n\tname: humanizeToken(pkg.name),\n\tpackageId: pkg.packageId,\n\tmvr: pkg.mvrPlaceholder,\n\tkind: pkg.kind,\n\tdetail: pkg.kind,\n});\n\n// -----------------------------------------------------------------------------\n// Top-level entry point\n// -----------------------------------------------------------------------------\n\n/**\n * Derive every visible display cell for a single row.\n *\n * Consumes ONLY `row.key`, `row.role`, `row.status`, `row.phase`,\n * `row.lastError`, `row.endpoints` (rendered separately by\n * `resource-table.tsx`), or `row.logTail` (kept in the projection\n * for renderer variants that need tails, but not used as primary\n * dashboard state because generic lifecycle log lines duplicate the\n * table).\n */\nexport const deriveDisplayCells = (\n\trow: Row,\n\tendpoints: ReadonlyArray<Endpoint> = [],\n): DisplayCells => ({\n\tstatusGlyph: statusGlyph(row.status),\n\tstatusColor: statusColor(row.status),\n\tstatusLabel: statusLabel(row.status),\n\troleGlyph: roleGlyph(row.role),\n\troleLabel: roleLabel(row.role),\n\tlabel: labelForRow(row.key),\n\tnarration: narrationFor(row.phase, row.status),\n\terrorSummary: errorSummaryFor(row.lastError),\n\tlabelColor: roleLabelColor(row.role),\n\tsection: sectionForRow(row, endpoints),\n\towner: ownerForRow(row.key),\n\theadline: headlineForRow(row, endpoints),\n\tsecondary: secondaryForRow(row, endpoints),\n});\n\nconst normalizeKey = (key: string): string =>\n\tkey\n\t\t.replace(/^@devstack\\//, '')\n\t\t.replace(/^(devstack:|app:)/, '')\n\t\t.replace(/#\\d+$/, '')\n\t\t.replace(/\\/\\d+$/, '');\n\nconst normalizeClassificationKey = (key: string): string =>\n\tkey\n\t\t.replace(/^@devstack\\//, '')\n\t\t.replace(/^devstack:/, '')\n\t\t.replace(/#\\d+$/, '')\n\t\t.replace(/\\/\\d+$/, '');\n\nconst humanizeToken = (token: string): string =>\n\ttoken.replace(/[-_]+/g, ' ').replace(/^\\w/, (head) => head.toUpperCase());\n\nconst containsKeyPart = (key: string, parts: ReadonlyArray<string>): boolean => {\n\tconst tokens = key.split(/[/:._#-]/).filter((part) => part.length > 0);\n\treturn tokens.some((token) => parts.includes(token));\n};\n\nconst isSectionish = (token: string): boolean =>\n\tcontainsKeyPart(token.toLowerCase(), ['service', 'package', 'account', 'action', 'app']);\n\nconst rowSectionClassifierFor = (key: string): RowSectionClassifier | undefined =>\n\tROW_SECTION_CLASSIFIERS.find((classifier) =>\n\t\tclassifier.prefixes.some((prefix) => keyMatchesClassifierPrefix(key, prefix)),\n\t);\n\nconst keyMatchesClassifierPrefix = (key: string, prefix: string): boolean => {\n\tif (prefix.endsWith(':') || prefix.endsWith('/')) return key.startsWith(prefix);\n\tif (key === prefix) return true;\n\tconst next = key[prefix.length];\n\treturn key.startsWith(prefix) && next !== undefined && '/:._-'.includes(next);\n};\n\nconst isOperationalEndpoint = (rowKey: Pick<Row, 'key'>['key'], endpoint: Endpoint): boolean => {\n\tconst prefix = `${rowKey}:`;\n\tif (!endpoint.endpointKey.startsWith(prefix)) return false;\n\tconst field = endpoint.endpointKey.slice(prefix.length);\n\treturn OPERATIONAL_ENDPOINT_FIELDS.has(field);\n};\n\n// -----------------------------------------------------------------------------\n// Compile-time invariant\n// -----------------------------------------------------------------------------\n//\n// Renderer code must never see a `title`/`primary`/`extras` field on\n// `Row`. If the projection ever sprouts one, the substrate's\n// `__ProjectionFieldsClosed` guard fails first; this module-local\n// guard exists as a second layer that explicitly mentions the\n// forbidden field names so a future renderer-side regression is\n// caught at the renderer boundary, not at the substrate boundary.\n\ntype _NoForbiddenOnRow = 'title' extends keyof Row\n\t? never\n\t: 'primary' extends keyof Row\n\t\t? never\n\t\t: 'extras' extends keyof Row\n\t\t\t? never\n\t\t\t: true;\n\n/** Renderer-side compile-time guard. If this resolves to `never`,\n * the renderer is reading a forbidden display-vocabulary field from\n * the projection. */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"RendererError",
|
|
5
|
+
reason: "mount-failed",
|
|
6
|
+
detail
|
|
7
|
+
});
|
|
8
|
+
//#endregion
|
|
9
|
+
export { mountFailed };
|
|
10
|
+
|
|
11
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/surfaces/tui/errors.ts"],"sourcesContent":["// TUI surface errors.\n//\n// Architecture §11 (Renderer): the renderer surface satisfies the\n// `Renderer` contract from `contracts/renderer.ts`, which already\n// defines `RendererError`. The TUI surface adds NO new error tags of\n// its own beyond the contract's two reasons — `mount-failed` and\n// `subscription-lost`. Anything that would be a third reason is\n// either upstream (lifecycle event from the engine, projected into\n// `state.errors[]`) or a programmer-error defect (Effect.die).\n//\n// This module exists as a single import site for the TUI's error\n// constructors so the surface code never reaches across the substrate\n// boundary directly when fabricating its typed failures.\n\nimport type { RendererError } from '../../contracts/renderer.ts';\n\n/** Construct a `mount-failed` renderer error. */\nexport const mountFailed = (detail: string): RendererError => ({\n\t_tag: 'RendererError',\n\treason: 'mount-failed',\n\tdetail,\n});\n\n/** Construct a `subscription-lost` renderer error. */\nexport const subscriptionLost = (detail: string): RendererError => ({\n\t_tag: 'RendererError',\n\treason: 'subscription-lost',\n\tdetail,\n});\n\n// Re-export the shared contract type so callers in this surface only\n// need to import from one place.\nexport type { RendererError };\n"],"mappings":";;AAiBA,MAAa,eAAe,YAAmC;CAC9D,MAAM;CACN,QAAQ;CACR;CACA"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
import { errorSummaryFor, labelForRow } from "./display-derivation.mjs";
|
|
2
|
+
const eventLogLineFromEvent = (event, seq) => {
|
|
3
|
+
const at = eventAt(event);
|
|
4
|
+
const id = `${at}-${seq}-${event.tag}`;
|
|
5
|
+
switch (event.tag) {
|
|
6
|
+
case "log.appended":
|
|
7
|
+
if (event.level === "info" || isRedundantPluginLog(event.line)) return null;
|
|
8
|
+
return line({
|
|
9
|
+
id,
|
|
10
|
+
at,
|
|
11
|
+
level: event.level,
|
|
12
|
+
scope: labelForRow(event.pluginKey),
|
|
13
|
+
scopeColor: colorForPluginKey(event.pluginKey),
|
|
14
|
+
message: event.line
|
|
15
|
+
});
|
|
16
|
+
case "error.reported": return line({
|
|
17
|
+
id,
|
|
18
|
+
level: event.error.severity === "warn" ? "warn" : "error",
|
|
19
|
+
at,
|
|
20
|
+
scope: event.error.pluginKey === null ? "Stack" : labelForRow(event.error.pluginKey),
|
|
21
|
+
scopeColor: event.error.pluginKey === null ? "white" : colorForPluginKey(event.error.pluginKey),
|
|
22
|
+
message: `failed: ${errorSummaryFor(event.error)}`
|
|
23
|
+
});
|
|
24
|
+
case "build.statusChanged":
|
|
25
|
+
case "lifecycle.statusChanged":
|
|
26
|
+
case "lifecycle.phaseSet":
|
|
27
|
+
case "endpoint.registered":
|
|
28
|
+
case "account.updated":
|
|
29
|
+
case "package.updated": return null;
|
|
30
|
+
case "restart.requested": return line({
|
|
31
|
+
id,
|
|
32
|
+
level: "warn",
|
|
33
|
+
at,
|
|
34
|
+
scope: "Stack",
|
|
35
|
+
scopeColor: "white",
|
|
36
|
+
message: `restart requested for ${targetLabel(event.target)}`
|
|
37
|
+
});
|
|
38
|
+
case "restart.completed": return line({
|
|
39
|
+
id,
|
|
40
|
+
level: "info",
|
|
41
|
+
at,
|
|
42
|
+
scope: "Stack",
|
|
43
|
+
scopeColor: "white",
|
|
44
|
+
message: `restart completed for ${targetLabel(event.target)}`
|
|
45
|
+
});
|
|
46
|
+
case "shutdown.escalated": return line({
|
|
47
|
+
id,
|
|
48
|
+
level: "warn",
|
|
49
|
+
at,
|
|
50
|
+
scope: "Stack",
|
|
51
|
+
scopeColor: "white",
|
|
52
|
+
message: `shutdown hard-kill escalated by ${event.signal} (exit ${event.exitCode})`
|
|
53
|
+
});
|
|
54
|
+
case "snapshot.captureStarted": return line({
|
|
55
|
+
id,
|
|
56
|
+
level: "info",
|
|
57
|
+
at,
|
|
58
|
+
scope: "Snapshot",
|
|
59
|
+
scopeColor: "blueBright",
|
|
60
|
+
message: event.name === void 0 ? "capture started" : `capture started for ${event.name}`
|
|
61
|
+
});
|
|
62
|
+
case "snapshot.captureProgress": return null;
|
|
63
|
+
case "snapshot.captureSkipped": return line({
|
|
64
|
+
id,
|
|
65
|
+
level: "warn",
|
|
66
|
+
at,
|
|
67
|
+
scope: "Snapshot",
|
|
68
|
+
scopeColor: "blueBright",
|
|
69
|
+
message: "capture already running"
|
|
70
|
+
});
|
|
71
|
+
case "snapshot.captureFailed": return line({
|
|
72
|
+
id,
|
|
73
|
+
level: "error",
|
|
74
|
+
at,
|
|
75
|
+
scope: "Snapshot",
|
|
76
|
+
scopeColor: "blueBright",
|
|
77
|
+
message: event.name === void 0 ? `capture failed: ${event.summary}` : `capture failed for ${event.name}: ${event.summary}`
|
|
78
|
+
});
|
|
79
|
+
case "snapshot.captured": return line({
|
|
80
|
+
id,
|
|
81
|
+
level: "info",
|
|
82
|
+
at,
|
|
83
|
+
scope: "Snapshot",
|
|
84
|
+
scopeColor: "blueBright",
|
|
85
|
+
message: event.name === void 0 ? `captured ${event.snapshotId}` : `captured ${event.name} (${event.snapshotId})`
|
|
86
|
+
});
|
|
87
|
+
case "snapshot.restored": return line({
|
|
88
|
+
id,
|
|
89
|
+
level: "info",
|
|
90
|
+
at,
|
|
91
|
+
scope: "Snapshot",
|
|
92
|
+
scopeColor: "blueBright",
|
|
93
|
+
message: `restored ${event.snapshotId}`
|
|
94
|
+
});
|
|
95
|
+
case "endpoint.released":
|
|
96
|
+
case "strategy.registered":
|
|
97
|
+
case "strategy.unregistered":
|
|
98
|
+
case "manifest.flushed":
|
|
99
|
+
case "codegen.emitted": return null;
|
|
100
|
+
default: return null;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
const shutdownRequestedLine = (at, seq) => ({
|
|
104
|
+
id: `${at}-${seq}-shutdown.requested`,
|
|
105
|
+
time: time(at),
|
|
106
|
+
scope: "Stack",
|
|
107
|
+
scopeColor: "white",
|
|
108
|
+
message: "shutdown requested; waiting for graceful stop",
|
|
109
|
+
level: "warn",
|
|
110
|
+
text: `${time(at)} shutdown requested; waiting for graceful stop`
|
|
111
|
+
});
|
|
112
|
+
const appendEventLogLine = (lines, next) => {
|
|
113
|
+
if (next === null) return lines;
|
|
114
|
+
const appended = [...lines, next];
|
|
115
|
+
return appended.length > 200 ? appended.slice(-200) : appended;
|
|
116
|
+
};
|
|
117
|
+
const eventAt = (event) => {
|
|
118
|
+
if ("at" in event && typeof event.at === "number") return event.at;
|
|
119
|
+
switch (event.tag) {
|
|
120
|
+
case "endpoint.registered": return event.endpoint.registeredAt;
|
|
121
|
+
case "error.reported": return event.error.at;
|
|
122
|
+
case "build.statusChanged": return event.entry.startedAt;
|
|
123
|
+
default: return Date.now();
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
const time = (at) => new Date(at).toISOString().slice(11, 19);
|
|
127
|
+
const targetLabel = (target) => target === "stack" ? "stack" : target.pluginKey;
|
|
128
|
+
const line = (input) => {
|
|
129
|
+
const renderedTime = time(input.at);
|
|
130
|
+
return {
|
|
131
|
+
id: input.id,
|
|
132
|
+
time: renderedTime,
|
|
133
|
+
scope: input.scope,
|
|
134
|
+
scopeColor: input.scopeColor,
|
|
135
|
+
message: input.message,
|
|
136
|
+
level: input.level,
|
|
137
|
+
text: `${renderedTime} ${input.scope}: ${input.message}`
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
const isRedundantPluginLog = (message) => {
|
|
141
|
+
const normalized = message.trim().toLowerCase();
|
|
142
|
+
return normalized === "plugin acquire start" || normalized === "plugin ready" || normalized === "plugin acquire failed";
|
|
143
|
+
};
|
|
144
|
+
const colorForPluginKey = (pluginKey) => {
|
|
145
|
+
const normalized = pluginKey.toLowerCase();
|
|
146
|
+
if (normalized.includes("account")) return "magenta";
|
|
147
|
+
if (normalized.includes("package")) return "blueBright";
|
|
148
|
+
if (normalized.includes("action")) return "magenta";
|
|
149
|
+
if (normalized.includes("app") || normalized.includes("frontend")) return "white";
|
|
150
|
+
return "cyan";
|
|
151
|
+
};
|
|
152
|
+
//#endregion
|
|
153
|
+
export { appendEventLogLine, eventLogLineFromEvent, shutdownRequestedLine };
|
|
154
|
+
|
|
155
|
+
//# sourceMappingURL=event-log.mjs.map
|