@mysten-incubation/devstack 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dashboard-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dashboard-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
- package/dashboard-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dashboard-ui/assets/index-Bmi1UtAg.js +1356 -0
- package/dashboard-ui/assets/index-D5EShVt4.js +3 -0
- package/dashboard-ui/assets/index-Deml9drg.css +1 -0
- package/dashboard-ui/index.html +13 -0
- package/dist/api/define-capabilities.d.mts +14 -3
- package/dist/api/define-capabilities.mjs +18 -1
- package/dist/api/define-capabilities.mjs.map +1 -1
- package/dist/api/define-devstack.d.mts +1 -1
- package/dist/api/define-devstack.mjs +6 -26
- package/dist/api/define-devstack.mjs.map +1 -1
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/define-plugin.mjs +2 -0
- package/dist/api/inference-network.d.mts +132 -0
- package/dist/api/inference-network.mjs +105 -16
- package/dist/api/inference-network.mjs.map +1 -1
- package/dist/api/plugin-errors.d.mts +7 -0
- package/dist/api/run-stack.d.mts +20 -9
- package/dist/api/run-stack.mjs +56 -29
- package/dist/api/run-stack.mjs.map +1 -1
- package/dist/build-integrations/playwright/config.d.mts +6 -4
- package/dist/build-integrations/playwright/config.mjs +5 -3
- package/dist/build-integrations/playwright/config.mjs.map +1 -1
- package/dist/build-integrations/playwright/errors.d.mts +1 -1
- package/dist/build-integrations/playwright/global-setup.d.mts +43 -17
- package/dist/build-integrations/playwright/global-setup.mjs +250 -13
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
- package/dist/build-integrations/playwright/index.d.mts +5 -3
- package/dist/build-integrations/playwright/index.mjs +4 -2
- package/dist/build-integrations/playwright/stack-context.d.mts +0 -1
- package/dist/build-integrations/playwright/stack-context.mjs +24 -63
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
- package/dist/build-integrations/playwright/wallet-context.d.mts +7 -10
- package/dist/build-integrations/playwright/wallet-context.mjs +8 -13
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/cold-start-url.d.mts +5 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +4 -3
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
- package/dist/build-integrations/runtime/conventional-routes.d.mts +51 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs +92 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +38 -30
- package/dist/build-integrations/runtime/discover.mjs +73 -70
- package/dist/build-integrations/runtime/discover.mjs.map +1 -1
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
- package/dist/build-integrations/runtime/index.d.mts +7 -2
- package/dist/build-integrations/runtime/index.mjs +9 -2
- package/dist/build-integrations/runtime/manifest-types.d.mts +2 -0
- package/dist/build-integrations/runtime/manifest-types.mjs +3 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.d.mts +29 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs +10 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/read-stack-context.mjs +10 -4
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +48 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs +42 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/wallet-paths.mjs +2 -0
- package/dist/build-integrations/vite/index.d.mts +51 -0
- package/dist/build-integrations/vite/index.mjs +73 -0
- package/dist/build-integrations/vite/index.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +4 -3
- package/dist/build-integrations/vitest/env.mjs +6 -4
- package/dist/build-integrations/vitest/env.mjs.map +1 -1
- package/dist/build-integrations/vitest/errors.d.mts +25 -4
- package/dist/build-integrations/vitest/errors.mjs +15 -2
- package/dist/build-integrations/vitest/errors.mjs.map +1 -1
- package/dist/build-integrations/vitest/index.d.mts +2 -2
- package/dist/build-integrations/vitest/index.mjs +3 -3
- package/dist/build-integrations/vitest/setup.d.mts +4 -2
- package/dist/build-integrations/vitest/setup.mjs +2 -2
- package/dist/build-integrations/vitest/setup.mjs.map +1 -1
- package/dist/build-integrations/vitest/stack-context.d.mts +0 -1
- package/dist/build-integrations/vitest/stack-context.mjs +33 -13
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
- package/dist/cli/bail.mjs +23 -0
- package/dist/cli/bail.mjs.map +1 -0
- package/dist/{surfaces/cli/commands → cli}/doctor-probes.mjs +26 -16
- package/dist/cli/doctor-probes.mjs.map +1 -0
- package/dist/cli/main.d.mts +15 -1
- package/dist/cli/main.mjs +166 -482
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/prune-direct.mjs +31 -201
- package/dist/cli/prune-direct.mjs.map +1 -1
- package/dist/cli/snapshot-reader.mjs +14 -11
- package/dist/cli/snapshot-reader.mjs.map +1 -1
- package/dist/cli/up-lifecycle.mjs +4 -1
- package/dist/cli/up-lifecycle.mjs.map +1 -1
- package/dist/cli/wirings/apply.mjs +95 -0
- package/dist/cli/wirings/apply.mjs.map +1 -0
- package/dist/cli/wirings/build-verb-layers.mjs +42 -0
- package/dist/cli/wirings/build-verb-layers.mjs.map +1 -0
- package/dist/cli/wirings/config-loader.mjs +69 -0
- package/dist/cli/wirings/config-loader.mjs.map +1 -0
- package/dist/cli/wirings/engine-command.mjs +30 -0
- package/dist/cli/wirings/engine-command.mjs.map +1 -0
- package/dist/cli/wirings/identity.mjs +72 -0
- package/dist/cli/wirings/identity.mjs.map +1 -0
- package/dist/cli/wirings/provide-file-system.mjs +7 -0
- package/dist/cli/wirings/provide-file-system.mjs.map +1 -0
- package/dist/cli/wirings/snapshot.mjs +177 -0
- package/dist/cli/wirings/snapshot.mjs.map +1 -0
- package/dist/cli/wirings/up.mjs +287 -0
- package/dist/cli/wirings/up.mjs.map +1 -0
- package/dist/cli/wirings/wipe.mjs +40 -0
- package/dist/cli/wirings/wipe.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +0 -2
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +26 -1
- package/dist/contracts/faucet-strategy.d.mts +25 -0
- package/dist/contracts/funding-strategy.d.mts +42 -0
- package/dist/contracts/plugin-expander.mjs +60 -0
- package/dist/contracts/plugin-expander.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +5 -3
- package/dist/contracts/renderer.d.mts +23 -0
- package/dist/contracts/routable.d.mts +14 -1
- package/dist/contracts/snapshotable.d.mts +25 -3
- package/dist/contracts/wallet-protocol.d.mts +52 -0
- package/dist/contracts/wallet-protocol.mjs +52 -0
- package/dist/contracts/wallet-protocol.mjs.map +1 -0
- package/dist/index.d.mts +26 -25
- package/dist/index.mjs +20 -13
- package/dist/{runtime → orchestrators}/built-in-plugin-layers.mjs +10 -5
- package/dist/orchestrators/built-in-plugin-layers.mjs.map +1 -0
- package/dist/orchestrators/codegen/bindings.d.mts +1 -2
- package/dist/orchestrators/codegen/bindings.mjs +52 -186
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
- package/dist/orchestrators/codegen/emit.mjs +19 -1
- package/dist/orchestrators/codegen/emit.mjs.map +1 -1
- package/dist/orchestrators/codegen/errors.mjs +8 -3
- package/dist/orchestrators/codegen/errors.mjs.map +1 -1
- package/dist/orchestrators/codegen/format.mjs +47 -39
- package/dist/orchestrators/codegen/format.mjs.map +1 -1
- package/dist/orchestrators/codegen/gitignore.mjs +3 -1
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
- package/dist/orchestrators/codegen/output-location.mjs +40 -0
- package/dist/orchestrators/codegen/output-location.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -1
- package/dist/orchestrators/codegen/paths.mjs +40 -14
- package/dist/orchestrators/codegen/paths.mjs.map +1 -1
- package/dist/orchestrators/codegen/permissions.mjs +3 -1
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
- package/dist/orchestrators/codegen/service.mjs +157 -105
- package/dist/orchestrators/codegen/service.mjs.map +1 -1
- package/dist/orchestrators/lifecycle-prune/errors.mjs +31 -0
- package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs +350 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +26 -27
- package/dist/orchestrators/router/cleanup.mjs.map +1 -1
- package/dist/orchestrators/router/entrypoints.mjs +2 -2
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
- package/dist/orchestrators/router/file-provider.mjs +14 -5
- package/dist/orchestrators/router/file-provider.mjs.map +1 -1
- package/dist/orchestrators/router/hostname.mjs +19 -55
- package/dist/orchestrators/router/hostname.mjs.map +1 -1
- package/dist/orchestrators/router/index.mjs +11 -0
- package/dist/orchestrators/router/profile.mjs +2 -2
- package/dist/orchestrators/router/sentinels.mjs +26 -0
- package/dist/orchestrators/router/sentinels.mjs.map +1 -0
- package/dist/orchestrators/router/service.mjs +40 -37
- package/dist/orchestrators/router/service.mjs.map +1 -1
- package/dist/orchestrators/router/traefik-container.mjs +27 -16
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
- package/dist/{substrate/runtime → orchestrators}/run.mjs +26 -21
- package/dist/orchestrators/run.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +1 -1
- package/dist/orchestrators/runtime-composition.mjs +123 -39
- package/dist/orchestrators/runtime-composition.mjs.map +1 -1
- package/dist/orchestrators/snapshot/capture-command.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture-command.mjs +25 -0
- package/dist/orchestrators/snapshot/capture-command.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +42 -28
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
- package/dist/orchestrators/snapshot/descriptor.mjs +35 -10
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
- package/dist/orchestrators/snapshot/identity-guard.mjs +1 -1
- package/dist/orchestrators/snapshot/index.mjs +13 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -1
- package/dist/orchestrators/snapshot/integrity.mjs +73 -17
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
- package/dist/orchestrators/snapshot/pending-marker.d.mts +1 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs +99 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs.map +1 -0
- package/dist/orchestrators/snapshot/phase-error.mjs +23 -0
- package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +20 -55
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
- package/dist/orchestrators/snapshot/recover-pending.d.mts +1 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs +223 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +118 -84
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
- package/dist/orchestrators/snapshot/service.mjs +53 -56
- package/dist/orchestrators/snapshot/service.mjs.map +1 -1
- package/dist/orchestrators/snapshot/state-document.d.mts +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +47 -7
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -1
- package/dist/orchestrators/snapshot/wipe.mjs +67 -10
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
- package/dist/plugins/account/codegen.mjs +9 -8
- package/dist/plugins/account/codegen.mjs.map +1 -1
- package/dist/plugins/account/errors.d.mts +33 -6
- package/dist/plugins/account/errors.mjs.map +1 -1
- package/dist/plugins/account/funding.d.mts +29 -19
- package/dist/plugins/account/funding.mjs +84 -66
- package/dist/plugins/account/funding.mjs.map +1 -1
- package/dist/plugins/account/index.d.mts +2 -4
- package/dist/plugins/account/index.mjs +64 -31
- package/dist/plugins/account/index.mjs.map +1 -1
- package/dist/plugins/account/keypair.mjs +6 -9
- package/dist/plugins/account/keypair.mjs.map +1 -1
- package/dist/plugins/account/lease.mjs +1 -0
- package/dist/plugins/account/lease.mjs.map +1 -1
- package/dist/plugins/account/registry.d.mts +14 -1
- package/dist/plugins/account/registry.mjs +18 -18
- package/dist/plugins/account/registry.mjs.map +1 -1
- package/dist/plugins/account/service.d.mts +23 -4
- package/dist/plugins/account/service.mjs +83 -45
- package/dist/plugins/account/service.mjs.map +1 -1
- package/dist/plugins/account/snapshot.mjs +2 -5
- package/dist/plugins/account/snapshot.mjs.map +1 -1
- package/dist/plugins/account/spans.mjs +16 -0
- package/dist/plugins/account/spans.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +6 -8
- package/dist/plugins/account/variants/keystore.mjs.map +1 -1
- package/dist/plugins/action/build-context.d.mts +3 -2
- package/dist/plugins/action/errors.d.mts +16 -12
- package/dist/plugins/action/errors.mjs.map +1 -1
- package/dist/plugins/action/execute.mjs +65 -103
- package/dist/plugins/action/execute.mjs.map +1 -1
- package/dist/plugins/action/index.d.mts +0 -2
- package/dist/plugins/action/index.mjs +17 -13
- package/dist/plugins/action/index.mjs.map +1 -1
- package/dist/plugins/action/service.mjs +38 -35
- package/dist/plugins/action/service.mjs.map +1 -1
- package/dist/plugins/action/spans.mjs +11 -0
- package/dist/plugins/action/spans.mjs.map +1 -0
- package/dist/plugins/coin/codegen.mjs +9 -8
- package/dist/plugins/coin/codegen.mjs.map +1 -1
- package/dist/plugins/coin/discovery.mjs +8 -4
- package/dist/plugins/coin/discovery.mjs.map +1 -1
- package/dist/plugins/coin/index.d.mts +11 -29
- package/dist/plugins/coin/index.mjs +56 -27
- package/dist/plugins/coin/index.mjs.map +1 -1
- package/dist/plugins/coin/metadata.mjs +8 -15
- package/dist/plugins/coin/metadata.mjs.map +1 -1
- package/dist/plugins/coin/mint.d.mts +30 -11
- package/dist/plugins/coin/mint.mjs +78 -74
- package/dist/plugins/coin/mint.mjs.map +1 -1
- package/dist/plugins/coin/registry.mjs +4 -7
- package/dist/plugins/coin/registry.mjs.map +1 -1
- package/dist/plugins/coin/service.d.mts +39 -1
- package/dist/plugins/coin/service.mjs +11 -4
- package/dist/plugins/coin/service.mjs.map +1 -1
- package/dist/plugins/coin/spans.mjs +20 -0
- package/dist/plugins/coin/spans.mjs.map +1 -0
- package/dist/plugins/dashboard/domain.mjs +402 -0
- package/dist/plugins/dashboard/domain.mjs.map +1 -0
- package/dist/plugins/dashboard/index.d.mts +29 -0
- package/dist/plugins/dashboard/index.mjs +91 -0
- package/dist/plugins/dashboard/index.mjs.map +1 -0
- package/dist/plugins/dashboard/origin-policy.mjs +36 -0
- package/dist/plugins/dashboard/origin-policy.mjs.map +1 -0
- package/dist/plugins/dashboard/routable.mjs +27 -0
- package/dist/plugins/dashboard/routable.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/builder.mjs +21 -0
- package/dist/plugins/dashboard/schema/builder.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/enums.mjs +72 -0
- package/dist/plugins/dashboard/schema/enums.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/root.mjs +351 -0
- package/dist/plugins/dashboard/schema/root.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/types.mjs +508 -0
- package/dist/plugins/dashboard/schema/types.mjs.map +1 -0
- package/dist/plugins/dashboard/schema.mjs +11 -0
- package/dist/plugins/dashboard/schema.mjs.map +1 -0
- package/dist/plugins/dashboard/server.mjs +166 -0
- package/dist/plugins/dashboard/server.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +53 -115
- package/dist/plugins/deepbook/deploy.mjs.map +1 -1
- package/dist/plugins/deepbook/errors.mjs +1 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -1
- package/dist/plugins/deepbook/faucet-strategy.mjs +47 -34
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/deepbook/hash.mjs +9 -0
- package/dist/plugins/deepbook/hash.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +1 -10
- package/dist/plugins/deepbook/index.mjs +25 -22
- package/dist/plugins/deepbook/index.mjs.map +1 -1
- package/dist/plugins/deepbook/pyth/index.mjs +26 -55
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
- package/dist/plugins/deepbook/snapshot.mjs +17 -29
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
- package/dist/plugins/deepbook/spans.mjs +18 -0
- package/dist/plugins/deepbook/spans.mjs.map +1 -0
- package/dist/plugins/deepbook/type-strings.mjs +65 -0
- package/dist/plugins/deepbook/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +2 -3
- package/dist/plugins/deepbook/types.mjs.map +1 -1
- package/dist/plugins/faucet/dispatcher.d.mts +21 -2
- package/dist/plugins/faucet/dispatcher.mjs +1 -2
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
- package/dist/plugins/faucet/errors.d.mts +11 -24
- package/dist/plugins/faucet/errors.mjs.map +1 -1
- package/dist/plugins/faucet/http.mjs +33 -14
- package/dist/plugins/faucet/http.mjs.map +1 -1
- package/dist/plugins/faucet/index.d.mts +15 -5
- package/dist/plugins/faucet/index.mjs +3 -0
- package/dist/plugins/faucet/index.mjs.map +1 -1
- package/dist/plugins/faucet/spans.mjs +12 -0
- package/dist/plugins/faucet/spans.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +1 -1
- package/dist/plugins/host-service/index.mjs +34 -8
- package/dist/plugins/host-service/index.mjs.map +1 -1
- package/dist/plugins/host-service/routable.mjs +2 -1
- package/dist/plugins/host-service/routable.mjs.map +1 -1
- package/dist/plugins/host-service/service.d.mts +21 -0
- package/dist/plugins/host-service/service.mjs +136 -81
- package/dist/plugins/host-service/service.mjs.map +1 -1
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs +23 -0
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -0
- package/dist/plugins/internal/codegen-helpers.mjs +18 -0
- package/dist/plugins/internal/codegen-helpers.mjs.map +1 -0
- package/dist/plugins/internal/funding-failure-error.mjs +32 -0
- package/dist/plugins/internal/funding-failure-error.mjs.map +1 -0
- package/dist/plugins/package/build.mjs +1 -1
- package/dist/plugins/package/build.mjs.map +1 -1
- package/dist/plugins/package/codegen.mjs +26 -0
- package/dist/plugins/package/codegen.mjs.map +1 -1
- package/dist/plugins/package/errors.d.mts +16 -6
- package/dist/plugins/package/errors.mjs.map +1 -1
- package/dist/plugins/package/index.d.mts +0 -4
- package/dist/plugins/package/index.mjs +27 -21
- package/dist/plugins/package/index.mjs.map +1 -1
- package/dist/plugins/package/mode-known.mjs +26 -12
- package/dist/plugins/package/mode-known.mjs.map +1 -1
- package/dist/plugins/package/mode-local.mjs +47 -41
- package/dist/plugins/package/mode-local.mjs.map +1 -1
- package/dist/plugins/package/publish-executor.mjs +55 -114
- package/dist/plugins/package/publish-executor.mjs.map +1 -1
- package/dist/plugins/package/registry.mjs +2 -1
- package/dist/plugins/package/registry.mjs.map +1 -1
- package/dist/plugins/package/service.mjs.map +1 -1
- package/dist/plugins/package/spans.mjs +14 -0
- package/dist/plugins/package/spans.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +19 -12
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -1
- package/dist/plugins/postgres/errors.d.mts +5 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -1
- package/dist/plugins/postgres/index.mjs +10 -17
- package/dist/plugins/postgres/index.mjs.map +1 -1
- package/dist/plugins/postgres/service.mjs +58 -24
- package/dist/plugins/postgres/service.mjs.map +1 -1
- package/dist/plugins/postgres/snapshot.mjs.map +1 -1
- package/dist/plugins/postgres/spans.mjs +11 -0
- package/dist/plugins/postgres/spans.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +4 -4
- package/dist/plugins/router-entrypoints.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +15 -13
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +15 -19
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
- package/dist/plugins/seal/codegen.d.mts +2 -3
- package/dist/plugins/seal/codegen.mjs.map +1 -1
- package/dist/plugins/seal/config-render.mjs +35 -8
- package/dist/plugins/seal/config-render.mjs.map +1 -1
- package/dist/plugins/seal/deploy.mjs +31 -39
- package/dist/plugins/seal/deploy.mjs.map +1 -1
- package/dist/plugins/seal/errors.d.mts +1 -3
- package/dist/plugins/seal/errors.mjs +7 -1
- package/dist/plugins/seal/errors.mjs.map +1 -1
- package/dist/plugins/seal/index.d.mts +1 -6
- package/dist/plugins/seal/index.mjs +40 -14
- package/dist/plugins/seal/index.mjs.map +1 -1
- package/dist/plugins/seal/key-manager.d.mts +1 -9
- package/dist/plugins/seal/key-manager.mjs +2 -18
- package/dist/plugins/seal/key-manager.mjs.map +1 -1
- package/dist/plugins/seal/key-server.mjs +37 -36
- package/dist/plugins/seal/key-server.mjs.map +1 -1
- package/dist/plugins/seal/keygen.mjs +16 -17
- package/dist/plugins/seal/keygen.mjs.map +1 -1
- package/dist/plugins/seal/mode/fork-known.mjs +36 -14
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
- package/dist/plugins/seal/mode/live.d.mts +6 -4
- package/dist/plugins/seal/mode/live.mjs +14 -21
- package/dist/plugins/seal/mode/live.mjs.map +1 -1
- package/dist/plugins/seal/mode/local-keygen.mjs +57 -21
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
- package/dist/plugins/seal/registry-publish.mjs +1 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -1
- package/dist/plugins/seal/routable.mjs.map +1 -1
- package/dist/plugins/seal/service.mjs.map +1 -1
- package/dist/plugins/seal/spans.mjs +18 -0
- package/dist/plugins/seal/spans.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +17 -23
- package/dist/plugins/sui/auto-tick.mjs.map +1 -1
- package/dist/plugins/sui/chain-build-container.mjs +18 -0
- package/dist/plugins/sui/chain-build-container.mjs.map +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +5 -5
- package/dist/plugins/sui/chain-probe.mjs +28 -58
- package/dist/plugins/sui/chain-probe.mjs.map +1 -1
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -1
- package/dist/plugins/sui/errors.d.mts +2 -29
- package/dist/plugins/sui/errors.mjs +1 -3
- package/dist/plugins/sui/errors.mjs.map +1 -1
- package/dist/plugins/sui/fork-faucet-strategy.d.mts +1 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs +55 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.d.mts +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +170 -2
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
- package/dist/plugins/sui/fork-transaction.d.mts +2 -0
- package/dist/plugins/sui/fork-transaction.mjs +92 -28
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
- package/dist/plugins/sui/index.d.mts +33 -70
- package/dist/plugins/sui/index.mjs +58 -35
- package/dist/plugins/sui/index.mjs.map +1 -1
- package/dist/plugins/{faucet/strategies/sui-local.mjs → sui/local-faucet-strategy.mjs} +10 -7
- package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +7 -13
- package/dist/plugins/sui/mode/external.mjs.map +1 -1
- package/dist/plugins/sui/mode/fork.mjs +136 -59
- package/dist/plugins/sui/mode/fork.mjs.map +1 -1
- package/dist/plugins/sui/mode/live.mjs +10 -16
- package/dist/plugins/sui/mode/live.mjs.map +1 -1
- package/dist/plugins/sui/mode/local.mjs +37 -36
- package/dist/plugins/sui/mode/local.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared-boot.mjs +38 -115
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared.d.mts +1 -5
- package/dist/plugins/sui/mode/shared.mjs.map +1 -1
- package/dist/plugins/sui/mode/spec.d.mts +18 -0
- package/dist/plugins/sui/move-summary-runner.mjs +207 -0
- package/dist/plugins/sui/move-summary-runner.mjs.map +1 -0
- package/dist/plugins/sui/network-resolver.d.mts +4 -3
- package/dist/plugins/sui/service.mjs.map +1 -1
- package/dist/plugins/sui/snapshot.mjs +3 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -1
- package/dist/plugins/sui/spans.mjs +17 -0
- package/dist/plugins/sui/spans.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +0 -1
- package/dist/plugins/wallet/codegen.mjs +8 -9
- package/dist/plugins/wallet/codegen.mjs.map +1 -1
- package/dist/plugins/wallet/index.d.mts +6 -8
- package/dist/plugins/wallet/index.mjs +46 -35
- package/dist/plugins/wallet/index.mjs.map +1 -1
- package/dist/plugins/wallet/origin-policy.mjs +12 -28
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
- package/dist/plugins/wallet/pairing.mjs +6 -4
- package/dist/plugins/wallet/pairing.mjs.map +1 -1
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +5 -44
- package/dist/plugins/wallet/protocol.mjs.map +1 -1
- package/dist/plugins/wallet/routable.mjs +2 -8
- package/dist/plugins/wallet/routable.mjs.map +1 -1
- package/dist/plugins/wallet/server.mjs +36 -44
- package/dist/plugins/wallet/server.mjs.map +1 -1
- package/dist/plugins/wallet/service.d.mts +1 -5
- package/dist/plugins/wallet/service.mjs +22 -18
- package/dist/plugins/wallet/service.mjs.map +1 -1
- package/dist/plugins/wallet/spans.mjs +22 -0
- package/dist/plugins/wallet/spans.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +33 -8
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/walrus/codegen.d.mts +3 -3
- package/dist/plugins/walrus/codegen.mjs.map +1 -1
- package/dist/plugins/walrus/deploy-paths.mjs +21 -5
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
- package/dist/plugins/walrus/deploy.mjs +67 -69
- package/dist/plugins/walrus/deploy.mjs.map +1 -1
- package/dist/plugins/walrus/errors.mjs +1 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -1
- package/dist/plugins/walrus/faucet-strategy.mjs +12 -7
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/walrus/index.d.mts +2 -13
- package/dist/plugins/walrus/index.mjs +18 -23
- package/dist/plugins/walrus/index.mjs.map +1 -1
- package/dist/plugins/walrus/mode/known-deploy.mjs +7 -5
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
- package/dist/plugins/walrus/mode/local-cluster.mjs +26 -7
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
- package/dist/plugins/walrus/routable.mjs +7 -23
- package/dist/plugins/walrus/routable.mjs.map +1 -1
- package/dist/plugins/walrus/service.mjs.map +1 -1
- package/dist/plugins/walrus/spans.mjs +18 -0
- package/dist/plugins/walrus/spans.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +6 -2
- package/dist/plugins/walrus/storage-nodes.mjs +15 -8
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
- package/dist/plugins/walrus/wal-swap.mjs +58 -15
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
- package/dist/primitives/artifact-publisher.d.mts +1 -1
- package/dist/primitives/artifact-publisher.mjs +15 -0
- package/dist/primitives/artifact-publisher.mjs.map +1 -0
- package/dist/runtime/docker/client.mjs +17 -4
- package/dist/runtime/docker/client.mjs.map +1 -1
- package/dist/runtime/docker/container.mjs +219 -132
- package/dist/runtime/docker/container.mjs.map +1 -1
- package/dist/runtime/docker/errors.mjs +0 -6
- package/dist/runtime/docker/errors.mjs.map +1 -1
- package/dist/runtime/docker/exec.mjs +21 -18
- package/dist/runtime/docker/exec.mjs.map +1 -1
- package/dist/runtime/docker/image.mjs +36 -13
- package/dist/runtime/docker/image.mjs.map +1 -1
- package/dist/runtime/docker/index.mjs +14 -0
- package/dist/runtime/docker/inspect-and-decode.mjs +51 -0
- package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -0
- package/dist/runtime/docker/inventory.mjs +14 -11
- package/dist/runtime/docker/inventory.mjs.map +1 -1
- package/dist/runtime/docker/labels.mjs +38 -5
- package/dist/runtime/docker/labels.mjs.map +1 -1
- package/dist/runtime/docker/logs.d.mts +1 -1
- package/dist/runtime/docker/logs.mjs.map +1 -1
- package/dist/runtime/docker/network.mjs +83 -47
- package/dist/runtime/docker/network.mjs.map +1 -1
- package/dist/runtime/docker/render-run-args.mjs +82 -0
- package/dist/runtime/docker/render-run-args.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +1 -1
- package/dist/runtime/docker/service.mjs +12 -7
- package/dist/runtime/docker/service.mjs.map +1 -1
- package/dist/runtime/docker/sweep.mjs +118 -43
- package/dist/runtime/docker/sweep.mjs.map +1 -1
- package/dist/runtime/docker/volume.mjs +2 -0
- package/dist/runtime/docker/volume.mjs.map +1 -1
- package/dist/runtime/docker/wrap.mjs +30 -1
- package/dist/runtime/docker/wrap.mjs.map +1 -1
- package/dist/substrate/cross-process.mjs +14 -8
- package/dist/substrate/cross-process.mjs.map +1 -1
- package/dist/substrate/event-time.mjs +33 -0
- package/dist/substrate/event-time.mjs.map +1 -0
- package/dist/substrate/events.d.mts +28 -8
- package/dist/substrate/identity.d.mts +2 -1
- package/dist/substrate/manifest.d.mts +68 -5
- package/dist/substrate/manifest.mjs +34 -5
- package/dist/substrate/manifest.mjs.map +1 -1
- package/dist/substrate/network.d.mts +3 -5
- package/dist/substrate/options.d.mts +0 -2
- package/dist/substrate/plugin.d.mts +13 -0
- package/dist/substrate/plugin.mjs +4 -2
- package/dist/substrate/plugin.mjs.map +1 -1
- package/dist/substrate/projection.d.mts +35 -3
- package/dist/substrate/runtime/artifact-publisher/index.mjs +19 -9
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -1
- package/dist/substrate/runtime/atomic-write.mjs +97 -32
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
- package/dist/substrate/runtime/cache/index.mjs +3 -0
- package/dist/substrate/runtime/cache/schema.mjs +2 -2
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
- package/dist/substrate/runtime/cache/service.mjs +9 -7
- package/dist/substrate/runtime/cache/service.mjs.map +1 -1
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -1
- package/dist/substrate/runtime/capability-sinks/index.mjs +3 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +1 -1
- package/dist/substrate/runtime/capability-sinks/service.d.mts +61 -2
- package/dist/substrate/runtime/capability-sinks/service.mjs +21 -26
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -1
- package/dist/substrate/runtime/config-validation.d.mts +1 -13
- package/dist/substrate/runtime/config-validation.mjs +2 -91
- package/dist/substrate/runtime/config-validation.mjs.map +1 -1
- package/dist/substrate/runtime/container-runtime.d.mts +1 -0
- package/dist/substrate/runtime/container-runtime.mjs +2 -0
- package/dist/substrate/runtime/control-plane/domain.mjs +101 -0
- package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -0
- package/dist/substrate/runtime/control-plane/service.mjs +7 -0
- package/dist/substrate/runtime/control-plane/service.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +46 -19
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +30 -12
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/index.mjs +5 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +11 -2
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +1 -1
- package/dist/substrate/runtime/cross-process/index.mjs +11 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs +34 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +52 -10
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/lock.mjs +23 -0
- package/dist/substrate/runtime/cross-process/lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +64 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +97 -83
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/self-pid.mjs +8 -0
- package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +24 -28
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +41 -20
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
- package/dist/substrate/runtime/current-plugin.mjs +2 -2
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
- package/dist/substrate/runtime/errors.mjs +12 -6
- package/dist/substrate/runtime/errors.mjs.map +1 -1
- package/dist/substrate/runtime/format-unknown-error.mjs +30 -0
- package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs +10 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -0
- package/dist/substrate/runtime/host-gateway.mjs +20 -0
- package/dist/substrate/runtime/host-gateway.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +61 -50
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
- package/dist/substrate/runtime/http-probe.d.mts +1 -1
- package/dist/substrate/runtime/index.mjs +14 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -1
- package/dist/substrate/runtime/lease-broker/index.mjs +2 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +1 -64
- package/dist/substrate/runtime/lease-broker/service.mjs +1 -1
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +22 -3
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/index.mjs +9 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +20 -3
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs +5 -5
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +1 -1
- package/dist/substrate/runtime/managed-container.d.mts +19 -1
- package/dist/substrate/runtime/managed-container.mjs +20 -1
- package/dist/substrate/runtime/managed-container.mjs.map +1 -1
- package/dist/substrate/runtime/manifest/index.mjs +3 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +15 -11
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
- package/dist/substrate/runtime/mode-errors.mjs +20 -0
- package/dist/substrate/runtime/mode-errors.mjs.map +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +9 -13
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
- package/dist/substrate/runtime/observability/formatter-registry.mjs +19 -36
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -1
- package/dist/substrate/runtime/observability/ignore-with-log.d.mts +1 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs +17 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +1 -1
- package/dist/substrate/runtime/observability/index.mjs +13 -0
- package/dist/substrate/runtime/observability/log-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/log-store.mjs +175 -0
- package/dist/substrate/runtime/observability/log-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/logger.d.mts +2 -1
- package/dist/substrate/runtime/observability/logger.mjs +5 -9
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
- package/dist/substrate/runtime/observability/output-truncate.mjs +35 -0
- package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +9 -12
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
- package/dist/substrate/runtime/observability/redaction.d.mts +2 -13
- package/dist/substrate/runtime/observability/redaction.mjs +8 -14
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
- package/dist/substrate/runtime/observability/span-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/span-store.mjs +110 -0
- package/dist/substrate/runtime/observability/span-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +14 -14
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -1
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +1 -1
- package/dist/substrate/runtime/passthrough-or-wrap.mjs +33 -0
- package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +1 -1
- package/dist/substrate/runtime/paths.mjs +4 -3
- package/dist/substrate/runtime/paths.mjs.map +1 -1
- package/dist/substrate/runtime/phase-preserving-produce.mjs +40 -0
- package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.mjs +3 -0
- package/dist/substrate/runtime/port-broker/service.mjs +170 -126
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/probes.d.mts +7 -5
- package/dist/substrate/runtime/probes.mjs +3 -1
- package/dist/substrate/runtime/probes.mjs.map +1 -1
- package/dist/substrate/runtime/projection/index.mjs +4 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +1 -2
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
- package/dist/substrate/runtime/projection/persisted.mjs +33 -15
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -1
- package/dist/substrate/runtime/projection/state-ref.mjs +26 -2
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
- package/dist/substrate/runtime/projection/update.mjs +88 -24
- package/dist/substrate/runtime/projection/update.mjs.map +1 -1
- package/dist/substrate/runtime/random-suffix.mjs +11 -0
- package/dist/substrate/runtime/random-suffix.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +59 -1
- package/dist/substrate/runtime/retry-policy.mjs +66 -1
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
- package/dist/substrate/runtime/routed-url.d.mts +1 -0
- package/dist/substrate/runtime/routed-url.mjs +79 -0
- package/dist/substrate/runtime/routed-url.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +1 -1
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-http-server.mjs +2 -3
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-multimap/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs +52 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +2 -2
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -1
- package/dist/substrate/runtime/stage-and-swap/index.mjs +72 -4
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/index.d.mts +1 -0
- package/dist/substrate/runtime/state-store/index.mjs +3 -0
- package/dist/substrate/runtime/state-store/schema.d.mts +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +19 -14
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/service.d.mts +1 -0
- package/dist/substrate/runtime/state-store/service.mjs +145 -0
- package/dist/substrate/runtime/state-store/service.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs +33 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/index.mjs +4 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +19 -33
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
- package/dist/substrate/runtime/subnet-broker.mjs +60 -0
- package/dist/substrate/runtime/subnet-broker.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +21 -1
- package/dist/substrate/runtime/sui-execute/index.mjs +84 -20
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -1
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.d.mts +1 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs +32 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +1 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs +32 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +93 -19
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/acquire-node.mjs +181 -0
- package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs +144 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs +68 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +151 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/errors.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/errors.mjs +9 -0
- package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/index.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/index.mjs +3 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs +51 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs +250 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/state.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/state.mjs +22 -0
- package/dist/substrate/runtime/supervisor/state.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs +57 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/types.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs +133 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -0
- package/dist/substrate/runtime/typed-env.mjs +8 -0
- package/dist/substrate/runtime/typed-env.mjs.map +1 -0
- package/dist/substrate/state-store.d.mts +1 -0
- package/dist/substrate/versioned-doc-schema.mjs +17 -0
- package/dist/substrate/versioned-doc-schema.mjs.map +1 -0
- package/dist/substrate/versioned-doc-sync.mjs +94 -0
- package/dist/substrate/versioned-doc-sync.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -1
- package/dist/surfaces/cli/commands/index.mjs +9 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs +13 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +3 -2
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune.mjs +34 -17
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
- package/dist/surfaces/cli/commands/status.mjs +2 -2
- package/dist/surfaces/cli/commands/status.mjs.map +1 -1
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +5 -3
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
- package/dist/surfaces/cli/commands/wipe.mjs +38 -4
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
- package/dist/surfaces/cli/errors.mjs +1 -1
- package/dist/surfaces/cli/errors.mjs.map +1 -1
- package/dist/surfaces/cli/flags.mjs +0 -1
- package/dist/surfaces/cli/flags.mjs.map +1 -1
- package/dist/surfaces/cli/index.mjs +98 -18
- package/dist/surfaces/cli/index.mjs.map +1 -1
- package/dist/surfaces/cli/output.mjs +1 -0
- package/dist/surfaces/cli/output.mjs.map +1 -1
- package/dist/surfaces/cli/sysexits.mjs +2 -1
- package/dist/surfaces/cli/sysexits.mjs.map +1 -1
- package/dist/surfaces/tui/app.mjs +25 -3
- package/dist/surfaces/tui/app.mjs.map +1 -1
- package/dist/surfaces/tui/display-derivation.mjs +23 -74
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
- package/dist/surfaces/tui/event-log.mjs +35 -23
- package/dist/surfaces/tui/event-log.mjs.map +1 -1
- package/dist/surfaces/tui/input.mjs +5 -1
- package/dist/surfaces/tui/input.mjs.map +1 -1
- package/dist/surfaces/tui/plain-renderer.mjs +70 -34
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
- package/package.json +24 -4
- package/dist/contracts/liveness-classifier.d.mts +0 -19
- package/dist/contracts/network-resolver.d.mts +0 -15
- package/dist/contracts/network-resolver.mjs +0 -7
- package/dist/contracts/network-resolver.mjs.map +0 -1
- package/dist/orchestrators/codegen/extras.mjs +0 -16
- package/dist/orchestrators/codegen/extras.mjs.map +0 -1
- package/dist/plugins/deepbook/routable.mjs +0 -21
- package/dist/plugins/deepbook/routable.mjs.map +0 -1
- package/dist/plugins/faucet/service.d.mts +0 -20
- package/dist/plugins/faucet/strategies/sui-local.d.mts +0 -23
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +0 -1
- package/dist/plugins/sui/seed-objects.d.mts +0 -18
- package/dist/plugins/sui/seed-objects.mjs +0 -25
- package/dist/plugins/sui/seed-objects.mjs.map +0 -1
- package/dist/runtime/built-in-plugin-layers.mjs.map +0 -1
- package/dist/substrate/runtime/context-helpers.mjs +0 -32
- package/dist/substrate/runtime/context-helpers.mjs.map +0 -1
- package/dist/substrate/runtime/run.mjs.map +0 -1
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +0 -30
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +0 -1
- package/dist/substrate/runtime/supervisor.d.mts +0 -1
- package/dist/substrate/runtime/supervisor.mjs +0 -831
- package/dist/substrate/runtime/supervisor.mjs.map +0 -1
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +0 -1
- /package/dist/{substrate/runtime/strategy-registry/faucet-capability-for.d.mts → plugins/faucet/http.d.mts} +0 -0
|
@@ -2,7 +2,11 @@ import { useInput } from "ink";
|
|
|
2
2
|
import { useRef } from "react";
|
|
3
3
|
//#region src/surfaces/tui/input.tsx
|
|
4
4
|
const MAX_SNAPSHOT_NAME_LENGTH = 128;
|
|
5
|
-
const
|
|
5
|
+
const isPrintableSnapshotNameCharacter = (character) => {
|
|
6
|
+
const codePoint = character.codePointAt(0);
|
|
7
|
+
return codePoint !== void 0 && codePoint >= 32 && codePoint !== 127;
|
|
8
|
+
};
|
|
9
|
+
const printableSnapshotNameInput = (input) => Array.from(input).filter(isPrintableSnapshotNameCharacter).join("").slice(0, MAX_SNAPSHOT_NAME_LENGTH);
|
|
6
10
|
/**
|
|
7
11
|
* Renderless component — mounts `useInput` at the dashboard root.
|
|
8
12
|
* Returns `null` so it composes inside layout boxes without taking
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/surfaces/tui/input.tsx"],"sourcesContent":["// Keyboard input handler.\n//\n// HARD INVARIANT (distilled/21-tui § Learnings #3): keypress handlers\n// MUST NOT call engine methods directly. They publish typed\n// `EngineCommand` values onto a `CommandPublisher` callback the\n// surface receives at mount time. The engine consumes the channel on\n// the other end; the renderer has no awareness of supervisor\n// internals like Deferred / Queue / scope structure.\n//\n// Key map (architecture §11 + distilled/21-tui §Responsibilities):\n//\n// q | Q -> 'shutdown.requested'\n// r | R -> 'stack.restart'\n// ctrl-c -> first press 'shutdown.requested'; repeat\n// press escalates to\n// 'shutdown.hardKillRequested'. Ink handles\n// Ctrl-C in-process when `exitOnCtrlC:\n// false`, so this mirrors the process-level\n// signal handler for TTY users.\n// s | S -> open snapshot-name prompt\n//\n// Defensive: useInput is mounted at the dashboard root level, NOT in\n// per-row components, so a re-rendered row never re-registers a\n// handler.\n\nimport { useInput } from 'ink';\nimport { useRef } from 'react';\n\nimport type { EngineCommand } from '../../substrate/events.ts';\n\n/**\n * Command publisher. A pure callback the renderer invokes with a\n * typed `EngineCommand`. The surface layer wires this to whatever\n * channel the engine is consuming on (Effect Queue, EventEmitter,\n * etc.); the renderer doesn't care.\n */\nexport type CommandPublisher = (command: EngineCommand) => void;\n\nexport interface InputHandlerProps {\n\t/** Publish a typed EngineCommand. */\n\treadonly publish: CommandPublisher;\n\t/** `null` means normal keymap mode; string means snapshot-name prompt mode. */\n\treadonly snapshotPromptValue: string | null;\n\t/** Update the snapshot prompt. Pass `null` to close it. */\n\treadonly onSnapshotPromptChange: (value: string | null) => void;\n\t/** Disable input handling (e.g. shutting-down state); defaults\n\t * to false. */\n\treadonly disabled?: boolean;\n}\n\nexport interface CommandForKeyOptions {\n\treadonly shutdownAlreadyRequested?: boolean;\n\treadonly now?: () => number;\n}\n\nexport interface InputActionForKeyOptions extends CommandForKeyOptions {\n\treadonly snapshotPromptValue?: string | null;\n}\n\ninterface KeyFlags {\n\treadonly ctrl?: boolean;\n\treadonly return?: boolean;\n\treadonly escape?: boolean;\n\treadonly backspace?: boolean;\n\treadonly delete?: boolean;\n}\n\nexport type InputAction =\n\t| { readonly tag: 'publish'; readonly command: EngineCommand }\n\t| { readonly tag: 'snapshotPrompt.open' }\n\t| { readonly tag: 'snapshotPrompt.update'; readonly value: string }\n\t| { readonly tag: 'snapshotPrompt.cancel' };\n\nconst MAX_SNAPSHOT_NAME_LENGTH = 128;\n\nconst printableSnapshotNameInput = (input: string): string =>\n\
|
|
1
|
+
{"version":3,"file":"input.mjs","names":[],"sources":["../../../src/surfaces/tui/input.tsx"],"sourcesContent":["// Keyboard input handler.\n//\n// HARD INVARIANT (distilled/21-tui § Learnings #3): keypress handlers\n// MUST NOT call engine methods directly. They publish typed\n// `EngineCommand` values onto a `CommandPublisher` callback the\n// surface receives at mount time. The engine consumes the channel on\n// the other end; the renderer has no awareness of supervisor\n// internals like Deferred / Queue / scope structure.\n//\n// Key map (architecture §11 + distilled/21-tui §Responsibilities):\n//\n// q | Q -> 'shutdown.requested'\n// r | R -> 'stack.restart'\n// ctrl-c -> first press 'shutdown.requested'; repeat\n// press escalates to\n// 'shutdown.hardKillRequested'. Ink handles\n// Ctrl-C in-process when `exitOnCtrlC:\n// false`, so this mirrors the process-level\n// signal handler for TTY users.\n// s | S -> open snapshot-name prompt\n//\n// Defensive: useInput is mounted at the dashboard root level, NOT in\n// per-row components, so a re-rendered row never re-registers a\n// handler.\n\nimport { useInput } from 'ink';\nimport { useRef } from 'react';\n\nimport type { EngineCommand } from '../../substrate/events.ts';\n\n/**\n * Command publisher. A pure callback the renderer invokes with a\n * typed `EngineCommand`. The surface layer wires this to whatever\n * channel the engine is consuming on (Effect Queue, EventEmitter,\n * etc.); the renderer doesn't care.\n */\nexport type CommandPublisher = (command: EngineCommand) => void;\n\nexport interface InputHandlerProps {\n\t/** Publish a typed EngineCommand. */\n\treadonly publish: CommandPublisher;\n\t/** `null` means normal keymap mode; string means snapshot-name prompt mode. */\n\treadonly snapshotPromptValue: string | null;\n\t/** Update the snapshot prompt. Pass `null` to close it. */\n\treadonly onSnapshotPromptChange: (value: string | null) => void;\n\t/** Disable input handling (e.g. shutting-down state); defaults\n\t * to false. */\n\treadonly disabled?: boolean;\n}\n\nexport interface CommandForKeyOptions {\n\treadonly shutdownAlreadyRequested?: boolean;\n\treadonly now?: () => number;\n}\n\nexport interface InputActionForKeyOptions extends CommandForKeyOptions {\n\treadonly snapshotPromptValue?: string | null;\n}\n\ninterface KeyFlags {\n\treadonly ctrl?: boolean;\n\treadonly return?: boolean;\n\treadonly escape?: boolean;\n\treadonly backspace?: boolean;\n\treadonly delete?: boolean;\n}\n\nexport type InputAction =\n\t| { readonly tag: 'publish'; readonly command: EngineCommand }\n\t| { readonly tag: 'snapshotPrompt.open' }\n\t| { readonly tag: 'snapshotPrompt.update'; readonly value: string }\n\t| { readonly tag: 'snapshotPrompt.cancel' };\n\nconst MAX_SNAPSHOT_NAME_LENGTH = 128;\n\nconst isPrintableSnapshotNameCharacter = (character: string): boolean => {\n\tconst codePoint = character.codePointAt(0);\n\treturn codePoint !== undefined && codePoint >= 0x20 && codePoint !== 0x7f;\n};\n\nconst printableSnapshotNameInput = (input: string): string =>\n\tArray.from(input)\n\t\t.filter(isPrintableSnapshotNameCharacter)\n\t\t.join('')\n\t\t.slice(0, MAX_SNAPSHOT_NAME_LENGTH);\n\n/**\n * Renderless component — mounts `useInput` at the dashboard root.\n * Returns `null` so it composes inside layout boxes without taking\n * up space.\n */\nexport const commandForKey = (\n\tinput: string,\n\tctrl: boolean,\n\toptions: CommandForKeyOptions = {},\n): EngineCommand | null => {\n\tif (ctrl && input === 'c') {\n\t\tif (options.shutdownAlreadyRequested === true) {\n\t\t\treturn {\n\t\t\t\ttag: 'shutdown.hardKillRequested',\n\t\t\t\tsignal: 'SIGINT',\n\t\t\t\texitCode: 130,\n\t\t\t\tat: options.now?.() ?? Date.now(),\n\t\t\t};\n\t\t}\n\t\treturn { tag: 'shutdown.requested' };\n\t}\n\tswitch (input) {\n\t\tcase 'q':\n\t\tcase 'Q':\n\t\t\treturn { tag: 'shutdown.requested' };\n\t\tcase 'r':\n\t\tcase 'R':\n\t\t\treturn { tag: 'stack.restart' };\n\t\tdefault:\n\t\t\treturn null;\n\t}\n};\n\nexport const inputActionForKey = (\n\tinput: string,\n\tkey: KeyFlags,\n\toptions: InputActionForKeyOptions = {},\n): InputAction | null => {\n\tif (options.snapshotPromptValue !== null && options.snapshotPromptValue !== undefined) {\n\t\tif (key.ctrl === true && input === 'c') {\n\t\t\tconst command = commandForKey(input, true, options);\n\t\t\treturn command === null ? null : { tag: 'publish', command };\n\t\t}\n\t\tif (key.escape === true) return { tag: 'snapshotPrompt.cancel' };\n\t\tif (key.return === true) {\n\t\t\tconst name = options.snapshotPromptValue.trim();\n\t\t\treturn {\n\t\t\t\ttag: 'publish',\n\t\t\t\tcommand:\n\t\t\t\t\tname.length === 0 ? { tag: 'snapshot.capture' } : { tag: 'snapshot.capture', name },\n\t\t\t};\n\t\t}\n\t\tif (key.backspace === true || key.delete === true) {\n\t\t\treturn {\n\t\t\t\ttag: 'snapshotPrompt.update',\n\t\t\t\tvalue: options.snapshotPromptValue.slice(0, -1),\n\t\t\t};\n\t\t}\n\t\tif (key.ctrl === true) return null;\n\t\tconst printable = printableSnapshotNameInput(input);\n\t\tif (printable.length === 0) return null;\n\t\treturn {\n\t\t\ttag: 'snapshotPrompt.update',\n\t\t\tvalue: `${options.snapshotPromptValue}${printable}`.slice(0, MAX_SNAPSHOT_NAME_LENGTH),\n\t\t};\n\t}\n\n\tif (input === 's' || input === 'S') return { tag: 'snapshotPrompt.open' };\n\tconst command = commandForKey(input, key.ctrl === true, options);\n\treturn command === null ? null : { tag: 'publish', command };\n};\n\nexport const InputHandler = ({\n\tpublish,\n\tsnapshotPromptValue,\n\tonSnapshotPromptChange,\n\tdisabled = false,\n}: InputHandlerProps): null => {\n\tconst shutdownRequested = useRef(false);\n\tuseInput(\n\t\t(input, key) => {\n\t\t\tif (disabled) return;\n\t\t\tconst action = inputActionForKey(input, key, {\n\t\t\t\tsnapshotPromptValue,\n\t\t\t\tshutdownAlreadyRequested: shutdownRequested.current,\n\t\t\t});\n\t\t\tswitch (action?.tag) {\n\t\t\t\tcase 'publish': {\n\t\t\t\t\tconst { command } = action;\n\t\t\t\t\tif (\n\t\t\t\t\t\tcommand.tag === 'shutdown.requested' ||\n\t\t\t\t\t\tcommand.tag === 'shutdown.hardKillRequested'\n\t\t\t\t\t) {\n\t\t\t\t\t\tonSnapshotPromptChange(null);\n\t\t\t\t\t\tshutdownRequested.current = true;\n\t\t\t\t\t}\n\t\t\t\t\tif (command.tag === 'snapshot.capture') {\n\t\t\t\t\t\tonSnapshotPromptChange(null);\n\t\t\t\t\t}\n\t\t\t\t\tpublish(command);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase 'snapshotPrompt.open':\n\t\t\t\t\tonSnapshotPromptChange('');\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'snapshotPrompt.update':\n\t\t\t\t\tonSnapshotPromptChange(action.value);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'snapshotPrompt.cancel':\n\t\t\t\t\tonSnapshotPromptChange(null);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t},\n\t\t{ isActive: !disabled },\n\t);\n\treturn null;\n};\n"],"mappings":";;;AAyEA,MAAM,2BAA2B;AAEjC,MAAM,oCAAoC,cAA+B;CACxE,MAAM,YAAY,UAAU,YAAY,EAAE;AAC1C,QAAO,cAAc,KAAA,KAAa,aAAa,MAAQ,cAAc;;AAGtE,MAAM,8BAA8B,UACnC,MAAM,KAAK,MAAM,CACf,OAAO,iCAAiC,CACxC,KAAK,GAAG,CACR,MAAM,GAAG,yBAAyB;;;;;;AAOrC,MAAa,iBACZ,OACA,MACA,UAAgC,EAAE,KACR;AAC1B,KAAI,QAAQ,UAAU,KAAK;AAC1B,MAAI,QAAQ,6BAA6B,KACxC,QAAO;GACN,KAAK;GACL,QAAQ;GACR,UAAU;GACV,IAAI,QAAQ,OAAO,IAAI,KAAK,KAAK;GACjC;AAEF,SAAO,EAAE,KAAK,sBAAsB;;AAErC,SAAQ,OAAR;EACC,KAAK;EACL,KAAK,IACJ,QAAO,EAAE,KAAK,sBAAsB;EACrC,KAAK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BAAkB;GAC5C,CAAC;AACF,UAAQ,QAAQ,KAAhB;GACC,KAAK,WAAW;IACf,MAAM,EAAE,YAAY;AACpB,QACC,QAAQ,QAAQ,wBAChB,QAAQ,QAAQ,8BACf;AACD,4BAAuB,KAAK;AAC5B,uBAAkB,UAAU;;AAE7B,QAAI,QAAQ,QAAQ,mBACnB,wBAAuB,KAAK;AAE7B,YAAQ,QAAQ;AAChB;;GAED,KAAK;AACJ,2BAAuB,GAAG;AAC1B;GACD,KAAK;AACJ,2BAAuB,OAAO,MAAM;AACpC;GACD,KAAK;AACJ,2BAAuB,KAAK;AAC5B;GACD,QACC;;IAGH,EAAE,UAAU,CAAC,UAAU,CACvB;AACD,QAAO"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { AccountProjectionSchema, PackageProjectionSchema } from "../../substrate/runtime/projection/persisted.mjs";
|
|
2
|
+
import { eventAt } from "../../substrate/event-time.mjs";
|
|
1
3
|
import { mountFailed } from "./errors.mjs";
|
|
2
4
|
import { accountLine, endpointLine, labelForRow, packageLine, roleLabel, statusLabel } from "./display-derivation.mjs";
|
|
3
|
-
import { Effect, Stream, SubscriptionRef } from "effect";
|
|
5
|
+
import { Effect, Schema, Stream, SubscriptionRef } from "effect";
|
|
4
6
|
//#region src/surfaces/tui/plain-renderer.ts
|
|
5
7
|
/**
|
|
6
8
|
* Plain-renderer line shape (each call returns exactly one line, no
|
|
@@ -35,19 +37,11 @@ const makePlainRenderer = () => ({
|
|
|
35
37
|
flush: Effect.void.pipe(Effect.catch(() => Effect.fail(mountFailed("flush"))))
|
|
36
38
|
});
|
|
37
39
|
const isoTimestamp = (at) => new Date(at || Date.now()).toISOString();
|
|
38
|
-
const eventAt = (event) => {
|
|
39
|
-
if ("at" in event && typeof event.at === "number") return event.at;
|
|
40
|
-
switch (event.tag) {
|
|
41
|
-
case "endpoint.registered": return event.endpoint.registeredAt;
|
|
42
|
-
case "error.reported": return event.error.at;
|
|
43
|
-
case "build.statusChanged": return event.entry.startedAt;
|
|
44
|
-
default: return Date.now();
|
|
45
|
-
}
|
|
46
|
-
};
|
|
47
40
|
const levelForEvent = (event) => {
|
|
48
41
|
switch (event.tag) {
|
|
49
42
|
case "log.appended": return event.level === "error" ? "ERROR" : event.level === "warn" ? "WARN" : "INFO";
|
|
50
43
|
case "error.reported": return event.error.severity === "fatal" || event.error.severity === "error" ? "ERROR" : "WARN";
|
|
44
|
+
case "engine.orchestrator.dispatchFailed": return "WARN";
|
|
51
45
|
default: return "INFO";
|
|
52
46
|
}
|
|
53
47
|
};
|
|
@@ -73,27 +67,46 @@ const payloadFor = (event) => {
|
|
|
73
67
|
url: event.endpoint.url,
|
|
74
68
|
wire: event.endpoint.wireProtocol
|
|
75
69
|
});
|
|
76
|
-
case "
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
70
|
+
case "projection.updated":
|
|
71
|
+
if (event.kind === "account") {
|
|
72
|
+
const account = tryDecodeProjection(AccountProjectionSchema, event.payload);
|
|
73
|
+
if (account === null) return kv({
|
|
74
|
+
kind: event.kind,
|
|
75
|
+
key: event.key
|
|
76
|
+
});
|
|
77
|
+
return kv({
|
|
78
|
+
key: account.key,
|
|
79
|
+
row: account.rowKey ?? "",
|
|
80
|
+
name: account.name,
|
|
81
|
+
address: account.address ?? "",
|
|
82
|
+
scheme: account.scheme ?? "",
|
|
83
|
+
source: account.source ?? "",
|
|
84
|
+
funding: account.funding.status,
|
|
85
|
+
fundingEntries: (account.funding.entries ?? []).map((entry) => `${entry.coin}:${entry.amount}:${entry.status}`).join(","),
|
|
86
|
+
requestedMist: account.funding.requestedMist ?? "",
|
|
87
|
+
balanceMist: account.funding.balanceMist ?? ""
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
if (event.kind === "package") {
|
|
91
|
+
const pkg = tryDecodeProjection(PackageProjectionSchema, event.payload);
|
|
92
|
+
if (pkg === null) return kv({
|
|
93
|
+
kind: event.kind,
|
|
94
|
+
key: event.key
|
|
95
|
+
});
|
|
96
|
+
return kv({
|
|
97
|
+
key: pkg.key,
|
|
98
|
+
row: pkg.rowKey ?? "",
|
|
99
|
+
name: pkg.name,
|
|
100
|
+
kind: pkg.kind,
|
|
101
|
+
packageId: pkg.packageId,
|
|
102
|
+
upgradeCapId: pkg.upgradeCapId ?? "",
|
|
103
|
+
mvr: pkg.mvrPlaceholder
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
return kv({
|
|
107
|
+
kind: event.kind,
|
|
108
|
+
key: event.key
|
|
109
|
+
});
|
|
97
110
|
case "endpoint.released": return kv({ key: event.endpointKey });
|
|
98
111
|
case "strategy.registered": return kv({
|
|
99
112
|
capability: event.capabilityKey,
|
|
@@ -102,6 +115,12 @@ const payloadFor = (event) => {
|
|
|
102
115
|
case "strategy.unregistered": return kv({ capability: event.capabilityKey });
|
|
103
116
|
case "manifest.flushed": return kv({ version: event.manifestVersion });
|
|
104
117
|
case "codegen.emitted": return kv({ files: event.files.length });
|
|
118
|
+
case "engine.orchestrator.dispatchFailed": return kv({
|
|
119
|
+
key: event.pluginKey,
|
|
120
|
+
kind: event.kind,
|
|
121
|
+
causeType: event.causeType ?? "",
|
|
122
|
+
summary: event.message
|
|
123
|
+
});
|
|
105
124
|
case "error.reported": return kv({
|
|
106
125
|
key: event.error.pluginKey ?? "",
|
|
107
126
|
tag: event.error.tag,
|
|
@@ -145,8 +164,25 @@ const payloadFor = (event) => {
|
|
|
145
164
|
}
|
|
146
165
|
};
|
|
147
166
|
const kv = (record) => Object.entries(record).filter(([, v]) => v !== "" && v !== null && v !== void 0).map(([k, v]) => `${k}=${quoteIfNeeded(String(v))}`).join(" ");
|
|
148
|
-
const quoteIfNeeded = (s) => /[\s"]/.test(s) ? quote(s) : s;
|
|
167
|
+
const quoteIfNeeded = (s) => /[\s"\x00-\x1f]/.test(s) ? quote(s) : s;
|
|
149
168
|
const quote = (s) => `"${s.replace(/"/g, "\\\"")}"`;
|
|
169
|
+
/**
|
|
170
|
+
* Structural validate-then-narrow for `projection.updated` payloads
|
|
171
|
+
* before they are formatted as text. Mirrors
|
|
172
|
+
* `tryDecodeProjectionPayload` in the substrate reducer — returns
|
|
173
|
+
* `null` on schema-decode failure so the renderer drops the slice
|
|
174
|
+
* rather than printing fields off a malformed object. The substrate
|
|
175
|
+
* reducer emits the `Effect.logWarning` for the same payload (the
|
|
176
|
+
* decode is deterministic), so we stay silent here to avoid double
|
|
177
|
+
* logging.
|
|
178
|
+
*/
|
|
179
|
+
const tryDecodeProjection = (schema, payload) => {
|
|
180
|
+
try {
|
|
181
|
+
return Schema.decodeUnknownSync(schema)(payload);
|
|
182
|
+
} catch {
|
|
183
|
+
return null;
|
|
184
|
+
}
|
|
185
|
+
};
|
|
150
186
|
const emitInitialSweep = (state) => Effect.gen(function* () {
|
|
151
187
|
yield* writeStderrLine(`${isoTimestamp(state.cycle.startedAt || Date.now())} INFO stack.identity app=${state.identity.app} stack=${state.identity.stack} network=${state.identity.network} cycle=${state.cycle.id}`);
|
|
152
188
|
for (const row of state.rows) yield* writeStderrLine(`${isoTimestamp(Date.now())} INFO row.declared ${kv({
|
|
@@ -156,8 +192,8 @@ const emitInitialSweep = (state) => Effect.gen(function* () {
|
|
|
156
192
|
status: statusLabel(row.status)
|
|
157
193
|
})}`);
|
|
158
194
|
for (const endpoint of state.endpoints) yield* writeStderrLine(`${isoTimestamp(endpoint.registeredAt)} INFO endpoint.registered ${endpointLine(endpoint)}`);
|
|
159
|
-
for (const account of state.accounts) yield* writeStderrLine(`${isoTimestamp(account.updatedAt)} INFO
|
|
160
|
-
for (const pkg of state.packages) yield* writeStderrLine(`${isoTimestamp(pkg.updatedAt)} INFO
|
|
195
|
+
for (const account of state.accounts) yield* writeStderrLine(`${isoTimestamp(account.updatedAt)} INFO projection.updated[account] ${accountLine(account)}`);
|
|
196
|
+
for (const pkg of state.packages) yield* writeStderrLine(`${isoTimestamp(pkg.updatedAt)} INFO projection.updated[package] ${packageLine(pkg)}`);
|
|
161
197
|
});
|
|
162
198
|
const writeStderrLine = (line) => Effect.sync(() => {
|
|
163
199
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plain-renderer.mjs","names":[],"sources":["../../../src/surfaces/tui/plain-renderer.ts"],"sourcesContent":["// Plain (non-TTY) renderer.\n//\n// Architecture §11 + distilled/21-tui §Renderers: when stdout is not\n// a TTY (CI, pipe, log file), the live ink dashboard is replaced by\n// a structured line stream. One line per event; periodic heartbeat\n// per internally-acquiring row, surfaced to operators as \"starting\".\n//\n// Discipline:\n// - One line per EngineEvent — no batching, no aggregation, no\n// diffing. Each event maps to exactly one structured line.\n// - Writes to stderr (architecture invariant: plain renderer goes\n// to stderr so stdout stays clean for whatever consumes the\n// pipe).\n// - EPIPE swallowed (pipe-safety invariant).\n// - Pure formatting helpers exposed for tests; the Effect-shaped\n// side is the `mount` function.\n// - Heartbeat formatting is pure here; scheduling belongs to the\n// renderer mount path. The architecture says it\n// \"anchors on first sighting in the internal acquiring state; phase\n// changes do NOT reset the clock; a late tick emits exactly one\n// heartbeat (no backlog catch-up)\". The seam is exposed via\n// `formatHeartbeat`.\n\nimport { Effect, Stream, SubscriptionRef } from 'effect';\n\nimport type { Renderer } from '../../contracts/renderer.ts';\nimport type { EngineEvent } from '../../substrate/events.ts';\nimport type { SubscribableState } from '../../substrate/projection.ts';\nimport {\n\taccountLine,\n\tendpointLine,\n\tlabelForRow,\n\tnarrationFor,\n\tpackageLine,\n\troleLabel,\n\tstatusLabel,\n} from './display-derivation.ts';\nimport { mountFailed } from './errors.ts';\n\n// -----------------------------------------------------------------------------\n// Line shape — pure formatters\n// -----------------------------------------------------------------------------\n\n/**\n * Plain-renderer line shape (each call returns exactly one line, no\n * trailing newline).\n *\n * <iso-timestamp> <level> <event-tag> <key>=<value> ...\n *\n * Example:\n * 2026-05-19T20:11:32.001Z INFO lifecycle.statusChanged key=sui from=starting to=ready\n * 2026-05-19T20:11:32.500Z WARN log.appended key=walrus line=\"failed to bind port 9000\"\n * 2026-05-19T20:11:33.000Z INFO endpoint.registered name=aggregator url=http://localhost:9000\n */\nexport const formatEventLine = (event: EngineEvent): string => {\n\tconst ts = isoTimestamp(eventAt(event));\n\tconst level = levelForEvent(event);\n\tconst payload = payloadFor(event);\n\treturn `${ts} ${level} ${event.tag} ${payload}`;\n};\n\n/**\n * Heartbeat line for an in-flight internal acquiring row. Emitted by the\n * scheduler at architecture-blessed intervals; this function is the\n * pure formatter only.\n */\nexport const formatHeartbeat = (\n\tnow: number,\n\tkey: string,\n\tphase: string | null,\n\troleToken: string,\n): string => {\n\tconst ts = isoTimestamp(now);\n\tconst narration = narrationFor(phase, 'acquiring');\n\treturn `${ts} INFO heartbeat key=${key} role=${roleToken} narration=${quote(narration)}`;\n};\n\n// -----------------------------------------------------------------------------\n// Renderer implementation\n// -----------------------------------------------------------------------------\n\n/**\n * Build a plain renderer satisfying the `Renderer` contract.\n *\n * Mount subscribes to the live event stream, writes one line per\n * event to stderr. The state-ref is sampled for the initial sweep\n * (one line per declared row) so a renderer attached after boot\n * still sees a coherent baseline.\n */\nexport const makePlainRenderer = (): Renderer => ({\n\tmount: (stateRef, events) =>\n\t\tEffect.gen(function* () {\n\t\t\tconst initial = yield* SubscriptionRef.get(stateRef);\n\t\t\tyield* emitInitialSweep(initial);\n\t\t\tyield* events.pipe(Stream.runForEach((event) => writeStderrLine(formatEventLine(event))));\n\t\t}).pipe(\n\t\t\tEffect.catch((cause: unknown) =>\n\t\t\t\tEffect.fail(mountFailed(cause instanceof Error ? cause.message : String(cause))),\n\t\t\t),\n\t\t),\n\tflush: Effect.void.pipe(Effect.catch(() => Effect.fail(mountFailed('flush')))),\n});\n\n// -----------------------------------------------------------------------------\n// Internals — formatting\n// -----------------------------------------------------------------------------\n\nconst isoTimestamp = (at: number): string => new Date(at || Date.now()).toISOString();\n\nconst eventAt = (event: EngineEvent): number => {\n\tif ('at' in event && typeof event.at === 'number') return event.at;\n\tswitch (event.tag) {\n\t\tcase 'endpoint.registered':\n\t\t\treturn event.endpoint.registeredAt;\n\t\tcase 'error.reported':\n\t\t\treturn event.error.at;\n\t\tcase 'build.statusChanged':\n\t\t\treturn event.entry.startedAt;\n\t\tdefault:\n\t\t\treturn Date.now();\n\t}\n};\n\nconst levelForEvent = (event: EngineEvent): 'INFO' | 'WARN' | 'ERROR' => {\n\tswitch (event.tag) {\n\t\tcase 'log.appended':\n\t\t\treturn event.level === 'error' ? 'ERROR' : event.level === 'warn' ? 'WARN' : 'INFO';\n\t\tcase 'error.reported':\n\t\t\treturn event.error.severity === 'fatal' || event.error.severity === 'error'\n\t\t\t\t? 'ERROR'\n\t\t\t\t: 'WARN';\n\t\tdefault:\n\t\t\treturn 'INFO';\n\t}\n};\n\nconst payloadFor = (event: EngineEvent): string => {\n\tswitch (event.tag) {\n\t\tcase 'lifecycle.statusChanged':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tfrom: statusLabel(event.from),\n\t\t\t\tto: statusLabel(event.to),\n\t\t\t});\n\t\tcase 'lifecycle.phaseSet':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tphase: event.phase ?? '',\n\t\t\t});\n\t\tcase 'log.appended':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tline: event.line,\n\t\t\t});\n\t\tcase 'endpoint.registered':\n\t\t\treturn kv({\n\t\t\t\tkey: event.endpoint.endpointKey,\n\t\t\t\tname: event.endpoint.name,\n\t\t\t\tdisplayUrl: event.endpoint.displayUrl ?? event.endpoint.url,\n\t\t\t\turl: event.endpoint.url,\n\t\t\t\twire: event.endpoint.wireProtocol,\n\t\t\t});\n\t\tcase 'account.updated':\n\t\t\treturn kv({\n\t\t\t\tkey: event.account.key,\n\t\t\t\trow: event.account.rowKey ?? '',\n\t\t\t\tname: event.account.name,\n\t\t\t\taddress: event.account.address ?? '',\n\t\t\t\tscheme: event.account.scheme ?? '',\n\t\t\t\tsource: event.account.source ?? '',\n\t\t\t\tfunding: event.account.funding.status,\n\t\t\t\tfundingEntries: (event.account.funding.entries ?? [])\n\t\t\t\t\t.map((entry) => `${entry.coin}:${entry.amount}:${entry.status}`)\n\t\t\t\t\t.join(','),\n\t\t\t\trequestedMist: event.account.funding.requestedMist ?? '',\n\t\t\t\tbalanceMist: event.account.funding.balanceMist ?? '',\n\t\t\t});\n\t\tcase 'package.updated':\n\t\t\treturn kv({\n\t\t\t\tkey: event.package.key,\n\t\t\t\trow: event.package.rowKey ?? '',\n\t\t\t\tname: event.package.name,\n\t\t\t\tkind: event.package.kind,\n\t\t\t\tpackageId: event.package.packageId,\n\t\t\t\tupgradeCapId: event.package.upgradeCapId ?? '',\n\t\t\t\tmvr: event.package.mvrPlaceholder,\n\t\t\t});\n\t\tcase 'endpoint.released':\n\t\t\treturn kv({ key: event.endpointKey });\n\t\tcase 'strategy.registered':\n\t\t\treturn kv({\n\t\t\t\tcapability: event.capabilityKey,\n\t\t\t\tautoMounted: event.autoMounted,\n\t\t\t});\n\t\tcase 'strategy.unregistered':\n\t\t\treturn kv({ capability: event.capabilityKey });\n\t\tcase 'manifest.flushed':\n\t\t\treturn kv({ version: event.manifestVersion });\n\t\tcase 'codegen.emitted':\n\t\t\treturn kv({ files: event.files.length });\n\t\tcase 'error.reported':\n\t\t\treturn kv({\n\t\t\t\tkey: event.error.pluginKey ?? '',\n\t\t\t\ttag: event.error.tag,\n\t\t\t\tsummary: event.error.summary,\n\t\t\t\tcause: event.error.chain.join(' | '),\n\t\t\t\tseverity: event.error.severity,\n\t\t\t});\n\t\tcase 'build.statusChanged':\n\t\t\treturn kv({\n\t\t\t\tkey: event.entry.pluginKey ?? '',\n\t\t\t\tphase: event.entry.phase,\n\t\t\t\tprogress: event.entry.progress,\n\t\t\t});\n\t\tcase 'restart.requested':\n\t\tcase 'restart.completed':\n\t\t\treturn kv({\n\t\t\t\ttarget: event.target === 'stack' ? 'stack' : event.target.pluginKey,\n\t\t\t});\n\t\tcase 'shutdown.escalated':\n\t\t\treturn kv({\n\t\t\t\tmode: 'hard-kill',\n\t\t\t\tsignal: event.signal,\n\t\t\t\texitCode: event.exitCode,\n\t\t\t});\n\t\tcase 'snapshot.captureStarted':\n\t\t\treturn kv({ snapshotId: event.snapshotId, name: event.name });\n\t\tcase 'snapshot.captureProgress':\n\t\t\treturn kv({\n\t\t\t\tsnapshotId: event.snapshotId,\n\t\t\t\tname: event.name,\n\t\t\t\tphase: event.phase,\n\t\t\t\tdetail: event.detail,\n\t\t\t\tpaused: event.pausedContainers,\n\t\t\t\ttotal: event.totalContainers,\n\t\t\t});\n\t\tcase 'snapshot.captureSkipped':\n\t\t\treturn kv({ reason: event.reason });\n\t\tcase 'snapshot.captureFailed':\n\t\t\treturn kv({ snapshotId: event.snapshotId, name: event.name, summary: event.summary });\n\t\tcase 'snapshot.captured':\n\t\tcase 'snapshot.restored':\n\t\t\treturn kv({ snapshotId: event.snapshotId });\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = event;\n\t\t\tvoid _exhaustive;\n\t\t\treturn '';\n\t\t}\n\t}\n};\n\nconst kv = (record: Readonly<Record<string, unknown>>): string =>\n\tObject.entries(record)\n\t\t.filter(([, v]) => v !== '' && v !== null && v !== undefined)\n\t\t.map(([k, v]) => `${k}=${quoteIfNeeded(String(v))}`)\n\t\t.join(' ');\n\nconst quoteIfNeeded = (s: string): string => (/[\\s\"]/.test(s) ? quote(s) : s);\n\nconst quote = (s: string): string => `\"${s.replace(/\"/g, '\\\\\"')}\"`;\n\n// -----------------------------------------------------------------------------\n// Internals — initial sweep\n// -----------------------------------------------------------------------------\n\nconst emitInitialSweep = (state: SubscribableState): Effect.Effect<void> =>\n\tEffect.gen(function* () {\n\t\tyield* writeStderrLine(\n\t\t\t`${isoTimestamp(state.cycle.startedAt || Date.now())} INFO stack.identity app=${state.identity.app} stack=${state.identity.stack} network=${state.identity.network} cycle=${state.cycle.id}`,\n\t\t);\n\t\tfor (const row of state.rows) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(Date.now())} INFO row.declared ${kv({\n\t\t\t\t\tkey: row.key,\n\t\t\t\t\tlabel: labelForRow(row.key),\n\t\t\t\t\trole: roleLabel(row.role),\n\t\t\t\t\tstatus: statusLabel(row.status),\n\t\t\t\t})}`,\n\t\t\t);\n\t\t}\n\t\tfor (const endpoint of state.endpoints) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(endpoint.registeredAt)} INFO endpoint.registered ${endpointLine(endpoint)}`,\n\t\t\t);\n\t\t}\n\t\tfor (const account of state.accounts) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(account.updatedAt)} INFO account.updated ${accountLine(account)}`,\n\t\t\t);\n\t\t}\n\t\tfor (const pkg of state.packages) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(pkg.updatedAt)} INFO package.updated ${packageLine(pkg)}`,\n\t\t\t);\n\t\t}\n\t});\n\n// -----------------------------------------------------------------------------\n// Internals — IO (pipe-safe)\n// -----------------------------------------------------------------------------\n\nconst writeStderrLine = (line: string): Effect.Effect<void> =>\n\tEffect.sync(() => {\n\t\ttry {\n\t\t\tprocess.stderr.write(`${line}\\n`);\n\t\t} catch (err) {\n\t\t\t// EPIPE swallowed (pipe-safety invariant); other errors\n\t\t\t// likewise swallowed because \"rendering never crashes the\n\t\t\t// stack\" (distilled/21-tui § Invariants).\n\t\t\tvoid err;\n\t\t}\n\t});\n"],"mappings":";;;;;;;;;;;;;;;AAsDA,MAAa,mBAAmB,UAA+B;CAC9D,MAAM,KAAK,aAAa,QAAQ,MAAM,CAAC;CACvC,MAAM,QAAQ,cAAc,MAAM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ecture §11 + distilled/21-tui §Renderers: when stdout is not\n// a TTY (CI, pipe, log file), the live ink dashboard is replaced by\n// a structured line stream. One line per event; periodic heartbeat\n// per internally-acquiring row, surfaced to operators as \"starting\".\n//\n// Discipline:\n// - One line per EngineEvent — no batching, no aggregation, no\n// diffing. Each event maps to exactly one structured line.\n// - Writes to stderr (architecture invariant: plain renderer goes\n// to stderr so stdout stays clean for whatever consumes the\n// pipe).\n// - EPIPE swallowed (pipe-safety invariant).\n// - Pure formatting helpers exposed for tests; the Effect-shaped\n// side is the `mount` function.\n// - Heartbeat formatting is pure here; scheduling belongs to the\n// renderer mount path. The architecture says it\n// \"anchors on first sighting in the internal acquiring state; phase\n// changes do NOT reset the clock; a late tick emits exactly one\n// heartbeat (no backlog catch-up)\". The seam is exposed via\n// `formatHeartbeat`.\n\nimport { Effect, Schema, Stream, SubscriptionRef } from 'effect';\n\nimport type { Renderer } from '../../contracts/renderer.ts';\nimport type { EngineEvent } from '../../substrate/events.ts';\nimport type { SubscribableState } from '../../substrate/projection.ts';\nimport {\n\tAccountProjectionSchema,\n\tPackageProjectionSchema,\n} from '../../substrate/runtime/projection/persisted.ts';\nimport {\n\taccountLine,\n\tendpointLine,\n\tlabelForRow,\n\tnarrationFor,\n\tpackageLine,\n\troleLabel,\n\tstatusLabel,\n} from './display-derivation.ts';\nimport { mountFailed } from './errors.ts';\nimport { eventAt } from '../../substrate/event-time.ts';\n\n// -----------------------------------------------------------------------------\n// Line shape — pure formatters\n// -----------------------------------------------------------------------------\n\n/**\n * Plain-renderer line shape (each call returns exactly one line, no\n * trailing newline).\n *\n * <iso-timestamp> <level> <event-tag> <key>=<value> ...\n *\n * Example:\n * 2026-05-19T20:11:32.001Z INFO lifecycle.statusChanged key=sui from=starting to=ready\n * 2026-05-19T20:11:32.500Z WARN log.appended key=walrus line=\"failed to bind port 9000\"\n * 2026-05-19T20:11:33.000Z INFO endpoint.registered name=aggregator url=http://localhost:9000\n */\nexport const formatEventLine = (event: EngineEvent): string => {\n\tconst ts = isoTimestamp(eventAt(event));\n\tconst level = levelForEvent(event);\n\tconst payload = payloadFor(event);\n\treturn `${ts} ${level} ${event.tag} ${payload}`;\n};\n\n/**\n * Heartbeat line for an in-flight internal acquiring row. Emitted by the\n * scheduler at architecture-blessed intervals; this function is the\n * pure formatter only.\n */\nexport const formatHeartbeat = (\n\tnow: number,\n\tkey: string,\n\tphase: string | null,\n\troleToken: string,\n): string => {\n\tconst ts = isoTimestamp(now);\n\tconst narration = narrationFor(phase, 'acquiring');\n\treturn `${ts} INFO heartbeat key=${key} role=${roleToken} narration=${quote(narration)}`;\n};\n\n// -----------------------------------------------------------------------------\n// Renderer implementation\n// -----------------------------------------------------------------------------\n\n/**\n * Build a plain renderer satisfying the `Renderer` contract.\n *\n * Mount subscribes to the live event stream, writes one line per\n * event to stderr. The state-ref is sampled for the initial sweep\n * (one line per declared row) so a renderer attached after boot\n * still sees a coherent baseline.\n */\nexport const makePlainRenderer = (): Renderer => ({\n\tmount: (stateRef, events) =>\n\t\tEffect.gen(function* () {\n\t\t\tconst initial = yield* SubscriptionRef.get(stateRef);\n\t\t\tyield* emitInitialSweep(initial);\n\t\t\tyield* events.pipe(Stream.runForEach((event) => writeStderrLine(formatEventLine(event))));\n\t\t}).pipe(\n\t\t\tEffect.catch((cause: unknown) =>\n\t\t\t\tEffect.fail(mountFailed(cause instanceof Error ? cause.message : String(cause))),\n\t\t\t),\n\t\t),\n\tflush: Effect.void.pipe(Effect.catch(() => Effect.fail(mountFailed('flush')))),\n});\n\n// -----------------------------------------------------------------------------\n// Internals — formatting\n// -----------------------------------------------------------------------------\n\nconst isoTimestamp = (at: number): string => new Date(at || Date.now()).toISOString();\n\nconst levelForEvent = (event: EngineEvent): 'INFO' | 'WARN' | 'ERROR' => {\n\tswitch (event.tag) {\n\t\tcase 'log.appended':\n\t\t\treturn event.level === 'error' ? 'ERROR' : event.level === 'warn' ? 'WARN' : 'INFO';\n\t\tcase 'error.reported':\n\t\t\treturn event.error.severity === 'fatal' || event.error.severity === 'error'\n\t\t\t\t? 'ERROR'\n\t\t\t\t: 'WARN';\n\t\t// A broken orchestrator capability sink leaves the plugin `ready`\n\t\t// (non-fatal by design — see dispatch-contributions.ts), so this\n\t\t// is the operator's ONLY signal that e.g. RPC/wallet routing is\n\t\t// dead. It must not render as a routine INFO line.\n\t\tcase 'engine.orchestrator.dispatchFailed':\n\t\t\treturn 'WARN';\n\t\tdefault:\n\t\t\treturn 'INFO';\n\t}\n};\n\nconst payloadFor = (event: EngineEvent): string => {\n\tswitch (event.tag) {\n\t\tcase 'lifecycle.statusChanged':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tfrom: statusLabel(event.from),\n\t\t\t\tto: statusLabel(event.to),\n\t\t\t});\n\t\tcase 'lifecycle.phaseSet':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tphase: event.phase ?? '',\n\t\t\t});\n\t\tcase 'log.appended':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tline: event.line,\n\t\t\t});\n\t\tcase 'endpoint.registered':\n\t\t\treturn kv({\n\t\t\t\tkey: event.endpoint.endpointKey,\n\t\t\t\tname: event.endpoint.name,\n\t\t\t\tdisplayUrl: event.endpoint.displayUrl ?? event.endpoint.url,\n\t\t\t\turl: event.endpoint.url,\n\t\t\t\twire: event.endpoint.wireProtocol,\n\t\t\t});\n\t\tcase 'projection.updated':\n\t\t\tif (event.kind === 'account') {\n\t\t\t\t// STYLE_GUIDE §19 — substrate-side `decodeUnknownSync` so a\n\t\t\t\t// malformed payload skips the line rather than rendering\n\t\t\t\t// garbage (`Schema.decodeUnknownSync(...) as A` bare-cast\n\t\t\t\t// is banned). The reducer at\n\t\t\t\t// `substrate/runtime/projection/update.ts` performs the\n\t\t\t\t// same decode; we repeat it here because the renderer\n\t\t\t\t// reads the raw event stream, not the reduced state slice.\n\t\t\t\tconst account = tryDecodeProjection(AccountProjectionSchema, event.payload);\n\t\t\t\tif (account === null) return kv({ kind: event.kind, key: event.key });\n\t\t\t\treturn kv({\n\t\t\t\t\tkey: account.key,\n\t\t\t\t\trow: account.rowKey ?? '',\n\t\t\t\t\tname: account.name,\n\t\t\t\t\taddress: account.address ?? '',\n\t\t\t\t\tscheme: account.scheme ?? '',\n\t\t\t\t\tsource: account.source ?? '',\n\t\t\t\t\tfunding: account.funding.status,\n\t\t\t\t\tfundingEntries: (account.funding.entries ?? [])\n\t\t\t\t\t\t.map((entry) => `${entry.coin}:${entry.amount}:${entry.status}`)\n\t\t\t\t\t\t.join(','),\n\t\t\t\t\trequestedMist: account.funding.requestedMist ?? '',\n\t\t\t\t\tbalanceMist: account.funding.balanceMist ?? '',\n\t\t\t\t});\n\t\t\t}\n\t\t\tif (event.kind === 'package') {\n\t\t\t\tconst pkg = tryDecodeProjection(PackageProjectionSchema, event.payload);\n\t\t\t\tif (pkg === null) return kv({ kind: event.kind, key: event.key });\n\t\t\t\treturn kv({\n\t\t\t\t\tkey: pkg.key,\n\t\t\t\t\trow: pkg.rowKey ?? '',\n\t\t\t\t\tname: pkg.name,\n\t\t\t\t\tkind: pkg.kind,\n\t\t\t\t\tpackageId: pkg.packageId,\n\t\t\t\t\tupgradeCapId: pkg.upgradeCapId ?? '',\n\t\t\t\t\tmvr: pkg.mvrPlaceholder,\n\t\t\t\t});\n\t\t\t}\n\t\t\treturn kv({ kind: event.kind, key: event.key });\n\t\tcase 'endpoint.released':\n\t\t\treturn kv({ key: event.endpointKey });\n\t\tcase 'strategy.registered':\n\t\t\treturn kv({\n\t\t\t\tcapability: event.capabilityKey,\n\t\t\t\tautoMounted: event.autoMounted,\n\t\t\t});\n\t\tcase 'strategy.unregistered':\n\t\t\treturn kv({ capability: event.capabilityKey });\n\t\tcase 'manifest.flushed':\n\t\t\treturn kv({ version: event.manifestVersion });\n\t\tcase 'codegen.emitted':\n\t\t\treturn kv({ files: event.files.length });\n\t\tcase 'engine.orchestrator.dispatchFailed':\n\t\t\treturn kv({\n\t\t\t\tkey: event.pluginKey,\n\t\t\t\tkind: event.kind,\n\t\t\t\t// `causeType` (the failing sink error's `_tag`, e.g.\n\t\t\t\t// `RouterBootFailed`) is the discriminator an operator scans\n\t\t\t\t// for to tell dead RPC routing from a codegen collision. `kv`\n\t\t\t\t// drops it when undefined, so untagged causes stay clean.\n\t\t\t\tcauseType: event.causeType ?? '',\n\t\t\t\tsummary: event.message,\n\t\t\t});\n\t\tcase 'error.reported':\n\t\t\treturn kv({\n\t\t\t\tkey: event.error.pluginKey ?? '',\n\t\t\t\ttag: event.error.tag,\n\t\t\t\tsummary: event.error.summary,\n\t\t\t\tcause: event.error.chain.join(' | '),\n\t\t\t\tseverity: event.error.severity,\n\t\t\t});\n\t\tcase 'build.statusChanged':\n\t\t\treturn kv({\n\t\t\t\tkey: event.entry.pluginKey ?? '',\n\t\t\t\tphase: event.entry.phase,\n\t\t\t\tprogress: event.entry.progress,\n\t\t\t});\n\t\tcase 'restart.requested':\n\t\tcase 'restart.completed':\n\t\t\treturn kv({\n\t\t\t\ttarget: event.target === 'stack' ? 'stack' : event.target.pluginKey,\n\t\t\t});\n\t\tcase 'shutdown.escalated':\n\t\t\treturn kv({\n\t\t\t\tmode: 'hard-kill',\n\t\t\t\tsignal: event.signal,\n\t\t\t\texitCode: event.exitCode,\n\t\t\t});\n\t\tcase 'snapshot.captureStarted':\n\t\t\treturn kv({ snapshotId: event.snapshotId, name: event.name });\n\t\tcase 'snapshot.captureProgress':\n\t\t\treturn kv({\n\t\t\t\tsnapshotId: event.snapshotId,\n\t\t\t\tname: event.name,\n\t\t\t\tphase: event.phase,\n\t\t\t\tdetail: event.detail,\n\t\t\t\tpaused: event.pausedContainers,\n\t\t\t\ttotal: event.totalContainers,\n\t\t\t});\n\t\tcase 'snapshot.captureSkipped':\n\t\t\treturn kv({ reason: event.reason });\n\t\tcase 'snapshot.captureFailed':\n\t\t\treturn kv({ snapshotId: event.snapshotId, name: event.name, summary: event.summary });\n\t\tcase 'snapshot.captured':\n\t\tcase 'snapshot.restored':\n\t\t\treturn kv({ snapshotId: event.snapshotId });\n\t\tdefault: {\n\t\t\tconst _exhaustive: never = event;\n\t\t\tvoid _exhaustive;\n\t\t\treturn '';\n\t\t}\n\t}\n};\n\nconst kv = (record: Readonly<Record<string, unknown>>): string =>\n\tObject.entries(record)\n\t\t.filter(([, v]) => v !== '' && v !== null && v !== undefined)\n\t\t.map(([k, v]) => `${k}=${quoteIfNeeded(String(v))}`)\n\t\t.join(' ');\n\n// Quote anything that contains whitespace, a `\"`, or an ASCII control\n// byte (`\\x00-\\x1f`). Control bytes are the load-bearing case: a\n// projection payload field that contains a stray `\\x1b` (ESC) would\n// otherwise inject an ANSI escape sequence into the plain-renderer's\n// stdout, corrupting subsequent terminal state for callers tailing\n// `--format plain` output.\nconst quoteIfNeeded = (s: string): string => (/[\\s\"\\x00-\\x1f]/.test(s) ? quote(s) : s);\n\nconst quote = (s: string): string => `\"${s.replace(/\"/g, '\\\\\"')}\"`;\n\n/**\n * Structural validate-then-narrow for `projection.updated` payloads\n * before they are formatted as text. Mirrors\n * `tryDecodeProjectionPayload` in the substrate reducer — returns\n * `null` on schema-decode failure so the renderer drops the slice\n * rather than printing fields off a malformed object. The substrate\n * reducer emits the `Effect.logWarning` for the same payload (the\n * decode is deterministic), so we stay silent here to avoid double\n * logging.\n */\nconst tryDecodeProjection = <S extends Schema.Decoder<unknown>>(\n\tschema: S,\n\tpayload: unknown,\n): S['Type'] | null => {\n\ttry {\n\t\treturn Schema.decodeUnknownSync(schema)(payload);\n\t} catch {\n\t\treturn null;\n\t}\n};\n\n// -----------------------------------------------------------------------------\n// Internals — initial sweep\n// -----------------------------------------------------------------------------\n\nconst emitInitialSweep = (state: SubscribableState): Effect.Effect<void> =>\n\tEffect.gen(function* () {\n\t\tyield* writeStderrLine(\n\t\t\t`${isoTimestamp(state.cycle.startedAt || Date.now())} INFO stack.identity app=${state.identity.app} stack=${state.identity.stack} network=${state.identity.network} cycle=${state.cycle.id}`,\n\t\t);\n\t\tfor (const row of state.rows) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(Date.now())} INFO row.declared ${kv({\n\t\t\t\t\tkey: row.key,\n\t\t\t\t\tlabel: labelForRow(row.key),\n\t\t\t\t\trole: roleLabel(row.role),\n\t\t\t\t\tstatus: statusLabel(row.status),\n\t\t\t\t})}`,\n\t\t\t);\n\t\t}\n\t\tfor (const endpoint of state.endpoints) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(endpoint.registeredAt)} INFO endpoint.registered ${endpointLine(endpoint)}`,\n\t\t\t);\n\t\t}\n\t\tfor (const account of state.accounts) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(account.updatedAt)} INFO projection.updated[account] ${accountLine(account)}`,\n\t\t\t);\n\t\t}\n\t\tfor (const pkg of state.packages) {\n\t\t\tyield* writeStderrLine(\n\t\t\t\t`${isoTimestamp(pkg.updatedAt)} INFO projection.updated[package] ${packageLine(pkg)}`,\n\t\t\t);\n\t\t}\n\t});\n\n// -----------------------------------------------------------------------------\n// Internals — IO (pipe-safe)\n// -----------------------------------------------------------------------------\n\nconst writeStderrLine = (line: string): Effect.Effect<void> =>\n\tEffect.sync(() => {\n\t\ttry {\n\t\t\tprocess.stderr.write(`${line}\\n`);\n\t\t} catch (err) {\n\t\t\t// EPIPE swallowed (pipe-safety invariant); other errors\n\t\t\t// likewise swallowed because \"rendering never crashes the\n\t\t\t// stack\" (distilled/21-tui § Invariants).\n\t\t\tvoid err;\n\t\t}\n\t});\n"],"mappings":";;;;;;;;;;;;;;;;;AA2DA,MAAa,mBAAmB,UAA+B;CAC9D,MAAM,KAAK,aAAa,QAAQ,MAAM,CAAC;CACvC,MAAM,QAAQ,cAAc,MAAM;CAClC,MAAM,UAAU,WAAW,MAAM;AACjC,QAAO,GAAG,GAAG,GAAG,MAAM,GAAG,MAAM,IAAI,GAAG;;;;;;;;;;AA+BvC,MAAa,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AAM,GAAG,KAAK,IAAI;UACzB,KAAK;EAMb"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mysten-incubation/devstack",
|
|
3
|
-
"version": "0.0
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"description": "Next-generation Sui devstack package.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"sui",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"license": "Apache-2.0",
|
|
12
12
|
"repository": {
|
|
13
13
|
"type": "git",
|
|
14
|
-
"url": "
|
|
14
|
+
"url": "https://github.com/MystenLabs/ts-sdks-incubation",
|
|
15
15
|
"directory": "packages/devstack"
|
|
16
16
|
},
|
|
17
17
|
"homepage": "https://github.com/MystenLabs/ts-sdks-incubation/tree/main/packages/devstack#readme",
|
|
@@ -41,15 +41,25 @@
|
|
|
41
41
|
"types": "./dist/build-integrations/playwright/index.d.mts",
|
|
42
42
|
"import": "./dist/build-integrations/playwright/index.mjs"
|
|
43
43
|
},
|
|
44
|
+
"./vite": {
|
|
45
|
+
"types": "./dist/build-integrations/vite/index.d.mts",
|
|
46
|
+
"import": "./dist/build-integrations/vite/index.mjs"
|
|
47
|
+
},
|
|
48
|
+
"./playwright/global-setup": {
|
|
49
|
+
"types": "./dist/build-integrations/playwright/global-setup.d.mts",
|
|
50
|
+
"import": "./dist/build-integrations/playwright/global-setup.mjs",
|
|
51
|
+
"default": "./dist/build-integrations/playwright/global-setup.mjs"
|
|
52
|
+
},
|
|
44
53
|
"./runtime": {
|
|
45
54
|
"types": "./dist/build-integrations/runtime/index.d.mts",
|
|
46
55
|
"import": "./dist/build-integrations/runtime/index.mjs"
|
|
47
56
|
}
|
|
48
57
|
},
|
|
49
|
-
"sideEffects":
|
|
58
|
+
"sideEffects": true,
|
|
50
59
|
"files": [
|
|
51
60
|
"dist",
|
|
52
61
|
"images",
|
|
62
|
+
"dashboard-ui",
|
|
53
63
|
"!dist/samples",
|
|
54
64
|
"!dist/node_modules"
|
|
55
65
|
],
|
|
@@ -61,13 +71,22 @@
|
|
|
61
71
|
"@mysten/codegen": "^0.10.4",
|
|
62
72
|
"@mysten/deepbook-v3": "^1.3.3",
|
|
63
73
|
"@mysten/sui": "^2.17.0",
|
|
74
|
+
"@pothos/core": "^4.3.0",
|
|
75
|
+
"@pothos/plugin-relay": "^4.4.0",
|
|
76
|
+
"@pothos/plugin-simple-objects": "^4.1.0",
|
|
77
|
+
"@pothos/plugin-with-input": "^4.1.0",
|
|
64
78
|
"@stricli/core": "^1.2.7",
|
|
65
79
|
"effect": "4.0.0-beta.65",
|
|
80
|
+
"graphql": "^16.11.0",
|
|
81
|
+
"graphql-yoga": "^5.10.4",
|
|
66
82
|
"ink": "^7.0.0",
|
|
67
83
|
"react": "^19.2.5"
|
|
68
84
|
},
|
|
69
85
|
"devDependencies": {
|
|
70
86
|
"@effect/vitest": "4.0.0-beta.65",
|
|
87
|
+
"@mysten/seal": "^1.1.1",
|
|
88
|
+
"@mysten/walrus": "^1.1.7",
|
|
89
|
+
"@mysten/walrus-wasm": "^0.2.0",
|
|
71
90
|
"@types/node": "^24.12.2",
|
|
72
91
|
"@types/react": "^19.2.14",
|
|
73
92
|
"ink-testing-library": "^4.0.0",
|
|
@@ -85,7 +104,8 @@
|
|
|
85
104
|
}
|
|
86
105
|
},
|
|
87
106
|
"scripts": {
|
|
88
|
-
"build": "tsdown",
|
|
107
|
+
"build": "pnpm run build:dashboard-ui && tsdown",
|
|
108
|
+
"build:dashboard-ui": "node scripts/build-dashboard-ui.mjs",
|
|
89
109
|
"smoke:pack-consumer": "node scripts/packed-consumer-typecheck.mjs",
|
|
90
110
|
"typecheck": "tsc --noEmit",
|
|
91
111
|
"test": "vitest run",
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
|
|
3
|
-
//#region src/contracts/liveness-classifier.d.ts
|
|
4
|
-
type LivenessClassification = 'alive' | 'dormant' | 'stale' | 'abandoned';
|
|
5
|
-
/** Per-entry hints persisted in `~/.devstack/registry.json`. The L3
|
|
6
|
-
* orchestrator passes them to the plugin's classifier. */
|
|
7
|
-
interface LivenessHints {
|
|
8
|
-
readonly heartbeatAt: number | null;
|
|
9
|
-
readonly claimPid: number | null;
|
|
10
|
-
readonly claimStartTime: number | null;
|
|
11
|
-
readonly pluginHints: Readonly<Record<string, unknown>>;
|
|
12
|
-
}
|
|
13
|
-
interface LivenessClassifierDecl {
|
|
14
|
-
readonly kind: 'liveness-classifier';
|
|
15
|
-
readonly classify: (hints: LivenessHints) => Effect.Effect<LivenessClassification>;
|
|
16
|
-
}
|
|
17
|
-
//#endregion
|
|
18
|
-
export { LivenessClassification, LivenessClassifierDecl, LivenessHints };
|
|
19
|
-
//# sourceMappingURL=liveness-classifier.d.mts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
|
|
3
|
-
//#region src/contracts/network-resolver.d.ts
|
|
4
|
-
/** The funds-ready strategy shape. A trivially-succeeding default
|
|
5
|
-
* is registered when no contributor is present (e.g. live mode). */
|
|
6
|
-
interface FundsReadyStrategy {
|
|
7
|
-
readonly waitFundsReady: Effect.Effect<void, FundsReadyError>;
|
|
8
|
-
}
|
|
9
|
-
interface FundsReadyError {
|
|
10
|
-
readonly _tag: 'FundsReadyError';
|
|
11
|
-
readonly reason: string;
|
|
12
|
-
}
|
|
13
|
-
//#endregion
|
|
14
|
-
export { FundsReadyError, FundsReadyStrategy };
|
|
15
|
-
//# sourceMappingURL=network-resolver.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"network-resolver.mjs","names":[],"sources":["../../src/contracts/network-resolver.ts"],"sourcesContent":["// NetworkResolver capability contract (architecture §5).\n//\n// Provides one consistent answer to \"what network am I on?\" for\n// every plugin. The resolver is consulted once per acquire; the\n// answer is threaded as Context.\n//\n// Funds-ready is NOT engine-generic. It's a typed StrategyContributor\n// capability key (`gate:funds-ready`); plugins that need to wait on\n// funds read from the strategy registry. Architecture explicitly\n// removed the previous \"L0 exposes awaitFunds\" wording.\n\nimport type { Effect } from 'effect';\n\nimport type { NetworkConfig } from '../substrate/network.ts';\n\n/** Capability-key constant for the funds-ready gate strategy. */\nexport const FUNDS_READY_GATE_KEY = 'gate:funds-ready' as const;\n\n/** The funds-ready strategy shape. A trivially-succeeding default\n * is registered when no contributor is present (e.g. live mode). */\nexport interface FundsReadyStrategy {\n\treadonly waitFundsReady: Effect.Effect<void, FundsReadyError>;\n}\n\nexport interface FundsReadyError {\n\treadonly _tag: 'FundsReadyError';\n\treadonly reason: string;\n}\n\n/**\n * The substrate-facing resolver service. One resolution per\n * acquire; CLI > env > config > default precedence.\n */\nexport interface NetworkResolver {\n\treadonly resolve: Effect.Effect<NetworkConfig, NetworkResolutionError>;\n}\n\nexport interface NetworkResolutionError {\n\treadonly _tag: 'NetworkResolutionError';\n\treadonly reason: 'invalid-mode' | 'unknown-chain' | 'rpc-unreachable';\n\treadonly detail: string;\n}\n"],"mappings":";;AAgBA,MAAa,uBAAuB"}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
//#region src/orchestrators/codegen/extras.ts
|
|
3
|
-
const makeExtrasCodegenable = (extras) => ({
|
|
4
|
-
kind: "codegenable",
|
|
5
|
-
emitterName: "app-extras",
|
|
6
|
-
outputPath: "extras.ts",
|
|
7
|
-
sensitive: true,
|
|
8
|
-
emit: (ctx) => Effect.sync(() => {
|
|
9
|
-
ctx.exportConst("extras", extras);
|
|
10
|
-
return ctx.done();
|
|
11
|
-
})
|
|
12
|
-
});
|
|
13
|
-
//#endregion
|
|
14
|
-
export { makeExtrasCodegenable };
|
|
15
|
-
|
|
16
|
-
//# sourceMappingURL=extras.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"extras.mjs","names":[],"sources":["../../../src/orchestrators/codegen/extras.ts"],"sourcesContent":["import { Effect } from 'effect';\n\nimport type { CodegenableDecl } from '../../contracts/codegenable.ts';\nimport type { ManifestExtras } from '../../substrate/manifest.ts';\n\nexport const makeExtrasCodegenable = (extras: ManifestExtras): CodegenableDecl<'app-extras'> => ({\n\tkind: 'codegenable',\n\temitterName: 'app-extras',\n\toutputPath: 'extras.ts',\n\tsensitive: true,\n\temit: (ctx) =>\n\t\tEffect.sync(() => {\n\t\t\tctx.exportConst('extras', extras);\n\t\t\treturn ctx.done();\n\t\t}),\n});\n"],"mappings":";;AAKA,MAAa,yBAAyB,YAA2D;CAChG,MAAM;CACN,aAAa;CACb,YAAY;CACZ,WAAW;CACX,OAAO,QACN,OAAO,WAAW;AACjB,MAAI,YAAY,UAAU,OAAO;AACjC,SAAO,IAAI,MAAM;GAChB;CACH"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
const DEEPBOOK_ENTRYPOINTS = [
|
|
2
|
-
{
|
|
3
|
-
name: "deepbook-server",
|
|
4
|
-
port: 9008,
|
|
5
|
-
protocol: "http"
|
|
6
|
-
},
|
|
7
|
-
{
|
|
8
|
-
name: "deepbook-server-metrics",
|
|
9
|
-
port: 9186,
|
|
10
|
-
protocol: "http"
|
|
11
|
-
},
|
|
12
|
-
{
|
|
13
|
-
name: "deepbook-indexer-metrics",
|
|
14
|
-
port: 9184,
|
|
15
|
-
protocol: "http"
|
|
16
|
-
}
|
|
17
|
-
];
|
|
18
|
-
//#endregion
|
|
19
|
-
export { DEEPBOOK_ENTRYPOINTS };
|
|
20
|
-
|
|
21
|
-
//# sourceMappingURL=routable.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"routable.mjs","names":[],"sources":["../../../src/plugins/deepbook/routable.ts"],"sourcesContent":["// Deepbook plugin — Routable contributions.\n//\n// Two optional endpoints in local mode:\n//\n// - `deepbook-server` — Rust REST server (port 9008). HTTP, CORS.\n// - `deepbook-indexer` — Postgres-writing indexer (no HTTP), only\n// the Prometheus scrape endpoint surfaces;\n// we don't route it through Traefik today.\n//\n// Substrate's router mints hostnames from `(app, stack, dispatch-id)`\n// — no service hostnames hardcoded in router code.\n\nimport type { DispatchId, EntrypointDecl, RoutableDecl } from '../../contracts/routable.ts';\n\nexport const DEEPBOOK_SERVER_ENDPOINT_NAME = 'deepbook-server' as const;\nexport const DEEPBOOK_SERVER_METRICS_ENDPOINT_NAME = 'deepbook-server-metrics' as const;\nexport const DEEPBOOK_INDEXER_METRICS_ENDPOINT_NAME = 'deepbook-indexer-metrics' as const;\nexport const DEEPBOOK_SERVER_ENTRYPOINT_PORT = 9008;\nexport const DEEPBOOK_SERVER_METRICS_ENTRYPOINT_PORT = 9186;\nexport const DEEPBOOK_INDEXER_METRICS_ENTRYPOINT_PORT = 9184;\n\nexport const DEEPBOOK_ENTRYPOINTS: ReadonlyArray<EntrypointDecl> = [\n\t{ name: DEEPBOOK_SERVER_ENDPOINT_NAME, port: DEEPBOOK_SERVER_ENTRYPOINT_PORT, protocol: 'http' },\n\t{\n\t\tname: DEEPBOOK_SERVER_METRICS_ENDPOINT_NAME,\n\t\tport: DEEPBOOK_SERVER_METRICS_ENTRYPOINT_PORT,\n\t\tprotocol: 'http',\n\t},\n\t{\n\t\tname: DEEPBOOK_INDEXER_METRICS_ENDPOINT_NAME,\n\t\tport: DEEPBOOK_INDEXER_METRICS_ENTRYPOINT_PORT,\n\t\tprotocol: 'http',\n\t},\n];\n\nexport const buildServerDispatchId = (name: string): DispatchId => ({\n\tserviceKey: `deepbook:${name}`,\n\trole: 'server',\n});\n\nexport const makeServerRoutable = (inputs: {\n\treadonly name: string;\n\treadonly containerName: string;\n}): RoutableDecl => ({\n\tkind: 'routable',\n\tendpointName: DEEPBOOK_SERVER_ENDPOINT_NAME,\n\tdispatchId: buildServerDispatchId(inputs.name),\n\tupstream: {\n\t\ttype: 'container',\n\t\tcontainerName: inputs.containerName,\n\t\tcontainerPort: DEEPBOOK_SERVER_ENTRYPOINT_PORT,\n\t},\n\tcors: true,\n\twireProtocol: 'http',\n});\n"],"mappings":"AAqBA,MAAa,uBAAsD;CAClE;EAAE,MAAM;EAA+B,MAAM;EAAiC,UAAU;EAAQ;CAChG;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV;CACD;EACC,MAAM;EACN,MAAM;EACN,UAAU;EACV;CACD"}
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { FaucetStrategy } from "./strategies/sui-local.mjs";
|
|
2
|
-
import { Effect } from "effect";
|
|
3
|
-
|
|
4
|
-
//#region src/plugins/faucet/service.d.ts
|
|
5
|
-
/** A registered strategy contribution. The faucet plugin accepts
|
|
6
|
-
* these from the factory's options so callers can add per-chain
|
|
7
|
-
* faucets (custom fork admins, alt-network strategies) without
|
|
8
|
-
* authoring a sibling plugin. */
|
|
9
|
-
interface FaucetStrategyContribution {
|
|
10
|
-
/** Capability-key chain id (`'sui:localnet'`, `'sui:testnet'`, etc.). */
|
|
11
|
-
readonly chainId: string;
|
|
12
|
-
/** The strategy value — closes over its own dependencies. */
|
|
13
|
-
readonly strategy: FaucetStrategy;
|
|
14
|
-
/** Optional priority. Defaults to `1` so user strategies win
|
|
15
|
-
* over the built-in's `0`. */
|
|
16
|
-
readonly priority?: number;
|
|
17
|
-
}
|
|
18
|
-
//#endregion
|
|
19
|
-
export { FaucetStrategyContribution };
|
|
20
|
-
//# sourceMappingURL=service.d.mts.map
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { FaucetBodyError, FaucetExhausted, FaucetUnreachable } from "../errors.mjs";
|
|
2
|
-
import { Effect } from "effect";
|
|
3
|
-
|
|
4
|
-
//#region src/plugins/faucet/strategies/sui-local.d.ts
|
|
5
|
-
/**
|
|
6
|
-
* Faucet strategy value. The dispatch surface is uniform across
|
|
7
|
-
* strategies — the dispatcher doesn't know how a strategy delivers
|
|
8
|
-
* coins, only how to invoke it.
|
|
9
|
-
*
|
|
10
|
-
* `amount` is in MIST (1 SUI = 10^9 MIST), the chain's smallest unit.
|
|
11
|
-
* The local faucet binary itself ignores this and grants a fixed
|
|
12
|
-
* amount per request; the parameter is here for type uniformity and
|
|
13
|
-
* to land correctly-denominated values in `FaucetExhausted`.
|
|
14
|
-
*/
|
|
15
|
-
interface FaucetStrategy {
|
|
16
|
-
readonly request: (req: {
|
|
17
|
-
readonly address: string;
|
|
18
|
-
readonly amount: bigint;
|
|
19
|
-
}) => Effect.Effect<void, FaucetExhausted | FaucetUnreachable | FaucetBodyError>;
|
|
20
|
-
}
|
|
21
|
-
//#endregion
|
|
22
|
-
export { FaucetStrategy };
|
|
23
|
-
//# sourceMappingURL=sui-local.d.mts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sui-local.mjs","names":[],"sources":["../../../../src/plugins/faucet/strategies/sui-local.ts"],"sourcesContent":["// SUI local-faucet HTTP strategy.\n//\n// Wraps the in-stack `sui-faucet` HTTP server hosted by the local\n// (or external) Sui container. The faucet URL comes from Sui's\n// resolver (`ResolvedSuiNetwork.faucet`) at acquire time; the\n// strategy CLOSES OVER the URL at construction, so the dispatch\n// site never sees Sui context.\n//\n// Amount semantics: the local faucet returns a fixed-amount grant\n// per request (the binary doesn't honor a variable amount today).\n// We carry `amount` through to error payloads so exhaustion errors\n// match the strategy-native unit (MIST), but the wire request\n// itself does not include it.\n//\n// Distilled-doc opportunity #1 (`Generalize the strategy-registry\n// pattern`): this file is the canonical small example. The whole\n// strategy is 30-ish lines because everything wire-level lives in\n// the shared `http.ts` helper.\n\nimport { Effect } from 'effect';\n\nimport { leaseKey, type LeaseBroker } from '../../../substrate/runtime/lease-broker/index.ts';\nimport { requestFundsWithRetry, type RetryOptions } from '../http.ts';\nimport type { FaucetBodyError, FaucetExhausted, FaucetUnreachable } from '../errors.ts';\n\n/** Optional serialization for faucet backends that spend a shared funding coin. */\nexport interface SuiLocalFaucetSerialization {\n\t/** Stack-local broker; callers choose the resource key shape. */\n\treadonly broker: LeaseBroker;\n\t/** Opaque lease key, typically scoped by chain id. */\n\treadonly key: string;\n\t/** Diagnostic owner reported by the lease broker. */\n\treadonly owner: string;\n}\n\n/** Per-strategy options. */\nexport interface SuiLocalStrategyOptions {\n\t/** Faucet base URL — e.g. `http://localhost:9123`. The strategy\n\t * appends `/v2/gas` internally. */\n\treadonly faucetUrl: string;\n\t/** Wall-clock budget; forwarded to `requestFundsWithRetry`. */\n\treadonly timeoutMs?: number;\n\t/** Max retry attempts; forwarded to `requestFundsWithRetry`. */\n\treadonly maxAttempts?: number;\n\t/** Serialize requests when the faucet backend shares one funding coin. */\n\treadonly serialization?: SuiLocalFaucetSerialization;\n}\n\n/**\n * Faucet strategy value. The dispatch surface is uniform across\n * strategies — the dispatcher doesn't know how a strategy delivers\n * coins, only how to invoke it.\n *\n * `amount` is in MIST (1 SUI = 10^9 MIST), the chain's smallest unit.\n * The local faucet binary itself ignores this and grants a fixed\n * amount per request; the parameter is here for type uniformity and\n * to land correctly-denominated values in `FaucetExhausted`.\n */\nexport interface FaucetStrategy {\n\treadonly request: (req: {\n\t\treadonly address: string;\n\t\treadonly amount: bigint;\n\t}) => Effect.Effect<void, FaucetExhausted | FaucetUnreachable | FaucetBodyError>;\n}\n\nconst withSerialization = <E>(\n\tserialization: SuiLocalFaucetSerialization | undefined,\n\teffect: Effect.Effect<void, E>,\n): Effect.Effect<void, E> => {\n\tif (serialization === undefined) {\n\t\treturn effect;\n\t}\n\treturn Effect.scoped(\n\t\tEffect.gen(function* () {\n\t\t\tyield* serialization.broker.acquire(leaseKey(serialization.key), serialization.owner);\n\t\t\tyield* effect;\n\t\t}),\n\t).pipe(\n\t\tEffect.withSpan('faucet.suiLocal.serializedRequest', {\n\t\t\tattributes: {\n\t\t\t\t'faucet.lease.key': serialization.key,\n\t\t\t\t'faucet.lease.owner': serialization.owner,\n\t\t\t},\n\t\t}),\n\t);\n};\n\n/** Build a SUI local-faucet HTTP strategy. */\nexport const suiLocalStrategy = (opts: SuiLocalStrategyOptions): FaucetStrategy => ({\n\trequest: ({ address, amount }) => {\n\t\tconst retryOpts: RetryOptions = {\n\t\t\tfaucetUrl: opts.faucetUrl,\n\t\t\taddress,\n\t\t\tamount,\n\t\t\t...(opts.timeoutMs !== undefined ? { timeoutMs: opts.timeoutMs } : {}),\n\t\t\t...(opts.maxAttempts !== undefined ? { maxAttempts: opts.maxAttempts } : {}),\n\t\t};\n\t\treturn withSerialization(opts.serialization, requestFundsWithRetry(retryOpts));\n\t},\n});\n"],"mappings":";;;;AAiEA,MAAM,qBACL,eACA,WAC4B;AAC5B,KAAI,kBAAkB,KAAA,EACrB,QAAO;AAER,QAAO,OAAO,OACb,OAAO,IAAI,aAAa;AACvB,SAAO,cAAc,OAAO,QAAQ,SAAS,cAAc,IAAI,EAAE,cAAc,MAAM;AACrF,SAAO;GACN,CACF,CAAC,KACD,OAAO,SAAS,qCAAqC,EACpD,YAAY;EACX,oBAAoB,cAAc;EAClC,sBAAsB,cAAc;EACpC,EACD,CAAC,CACF;;;AAIF,MAAa,oBAAoB,UAAmD,EACnF,UAAU,EAAE,SAAS,aAAa;CACjC,MAAM,YAA0B;EAC/B,WAAW,KAAK;EAChB;EACA;EACA,GAAI,KAAK,cAAc,KAAA,IAAY,EAAE,WAAW,KAAK,WAAW,GAAG,EAAE;EACrE,GAAI,KAAK,gBAAgB,KAAA,IAAY,EAAE,aAAa,KAAK,aAAa,GAAG,EAAE;EAC3E;AACD,QAAO,kBAAkB,KAAK,eAAe,sBAAsB,UAAU,CAAC;GAE/E"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
|
|
3
|
-
//#region src/plugins/sui/seed-objects.d.ts
|
|
4
|
-
/** Plugin-instance-scoped accumulator. Constructed inside the
|
|
5
|
-
* Sui plugin's `acquire` body; the lifetime is the plugin's scope. */
|
|
6
|
-
interface SeedObjectsAccumulator {
|
|
7
|
-
/** Merge a set of seed object ids. KnownPackage declarations
|
|
8
|
-
* call this during their own acquire — Sui's fork builder
|
|
9
|
-
* reads the accumulated set AFTER scheduler ordering puts
|
|
10
|
-
* KnownPackage upstream of the fork container. */
|
|
11
|
-
readonly contribute: (objects: ReadonlyArray<string>) => Effect.Effect<void>;
|
|
12
|
-
/** Snapshot the accumulated set. Called by fork's acquire when
|
|
13
|
-
* composing the `--object` seed flags. */
|
|
14
|
-
readonly snapshot: Effect.Effect<ReadonlyArray<string>>;
|
|
15
|
-
}
|
|
16
|
-
//#endregion
|
|
17
|
-
export { SeedObjectsAccumulator };
|
|
18
|
-
//# sourceMappingURL=seed-objects.d.mts.map
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
import { Effect, Ref } from "effect";
|
|
2
|
-
//#region src/plugins/sui/seed-objects.ts
|
|
3
|
-
/** Capability key the StrategyContributor registry dispatches on.
|
|
4
|
-
* KnownPackage declarations look this up; Sui's fork mode
|
|
5
|
-
* contributes it from inside acquire. */
|
|
6
|
-
const SEED_OBJECTS_CAPABILITY_KEY = "sui:seed-objects";
|
|
7
|
-
/** Construct a fresh accumulator. Each Sui plugin instance gets
|
|
8
|
-
* one — the substrate's scope-boundary handles isolation across
|
|
9
|
-
* parallel stacks. */
|
|
10
|
-
const makeSeedObjectsAccumulator = () => Effect.gen(function* () {
|
|
11
|
-
const ref = yield* Ref.make([]);
|
|
12
|
-
const contribute = (objects) => Ref.update(ref, (prev) => {
|
|
13
|
-
const set = new Set(prev);
|
|
14
|
-
for (const o of objects) set.add(o.toLowerCase());
|
|
15
|
-
return Array.from(set).sort();
|
|
16
|
-
});
|
|
17
|
-
return {
|
|
18
|
-
contribute,
|
|
19
|
-
snapshot: Ref.get(ref)
|
|
20
|
-
};
|
|
21
|
-
});
|
|
22
|
-
//#endregion
|
|
23
|
-
export { SEED_OBJECTS_CAPABILITY_KEY, makeSeedObjectsAccumulator };
|
|
24
|
-
|
|
25
|
-
//# sourceMappingURL=seed-objects.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"seed-objects.mjs","names":[],"sources":["../../../src/plugins/sui/seed-objects.ts"],"sourcesContent":["// Fork-mode seed-objects accumulator.\n//\n// Distilled-doc finding (5-sui § Opportunities): today's code uses\n// a module-scope `Set<string>` with an explicit\n// `clearKnownPackageSeedObjects()` contract between composes. That\n// is a foot-gun — tests that compose more than once must remember\n// to clear; the responsibility sits with the user, not the\n// framework.\n//\n// Fix: confine the accumulator to plugin-instance state. Each\n// `sui()` factory call constructs a fresh `SeedObjectsAccumulator`\n// inside its acquire body's scope; KnownPackage declarations\n// elsewhere in the stack discover it via the StrategyContributor\n// registry (`sui:seed-objects`).\n//\n// The substrate-redesign substrate-violations document already\n// flags module-scope mutable state as forbidden; this file is the\n// implementation of the cure.\n\nimport { Effect, Ref } from 'effect';\n\n/** Plugin-instance-scoped accumulator. Constructed inside the\n * Sui plugin's `acquire` body; the lifetime is the plugin's scope. */\nexport interface SeedObjectsAccumulator {\n\t/** Merge a set of seed object ids. KnownPackage declarations\n\t * call this during their own acquire — Sui's fork builder\n\t * reads the accumulated set AFTER scheduler ordering puts\n\t * KnownPackage upstream of the fork container. */\n\treadonly contribute: (objects: ReadonlyArray<string>) => Effect.Effect<void>;\n\t/** Snapshot the accumulated set. Called by fork's acquire when\n\t * composing the `--object` seed flags. */\n\treadonly snapshot: Effect.Effect<ReadonlyArray<string>>;\n}\n\n/** Capability key the StrategyContributor registry dispatches on.\n * KnownPackage declarations look this up; Sui's fork mode\n * contributes it from inside acquire. */\nexport const SEED_OBJECTS_CAPABILITY_KEY = 'sui:seed-objects' as const;\n\n/** Construct a fresh accumulator. Each Sui plugin instance gets\n * one — the substrate's scope-boundary handles isolation across\n * parallel stacks. */\nexport const makeSeedObjectsAccumulator = (): Effect.Effect<SeedObjectsAccumulator> =>\n\tEffect.gen(function* () {\n\t\tconst ref = yield* Ref.make<ReadonlyArray<string>>([]);\n\n\t\tconst contribute = (objects: ReadonlyArray<string>): Effect.Effect<void> =>\n\t\t\tRef.update(ref, (prev) => {\n\t\t\t\t// Stable union — sorted + lowercased so the configHash\n\t\t\t\t// is invariant under contribution order (architecture\n\t\t\t\t// § sui § Invariants).\n\t\t\t\tconst set = new Set(prev);\n\t\t\t\tfor (const o of objects) set.add(o.toLowerCase());\n\t\t\t\treturn Array.from(set).sort();\n\t\t\t});\n\n\t\tconst snapshot = Ref.get(ref);\n\n\t\treturn { contribute, snapshot };\n\t});\n"],"mappings":";;;;;AAqCA,MAAa,8BAA8B;;;;AAK3C,MAAa,mCACZ,OAAO,IAAI,aAAa;CACvB,MAAM,MAAM,OAAO,IAAI,KAA4B,EAAE,CAAC;CAEtD,MAAM,cAAc,YACnB,IAAI,OAAO,MAAM,SAAS;EAIzB,MAAM,MAAM,IAAI,IAAI,KAAK;AACzB,OAAK,MAAM,KAAK,QAAS,KAAI,IAAI,EAAE,aAAa,CAAC;AACjD,SAAO,MAAM,KAAK,IAAI,CAAC,MAAM;GAC5B;AAIH,QAAO;EAAE;EAAY,UAFJ,IAAI,IAAI,IAEI;EAAE;EAC9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-plugin-layers.mjs","names":[],"sources":["../../src/runtime/built-in-plugin-layers.ts"],"sourcesContent":["// Built-in plugin runtime composition.\n//\n// L0 substrate builds only name-blind services. This module is the higher-level\n// composition point for built-in plugin services and built-in capability sinks.\n\nimport { Context, Effect, Layer } from 'effect';\n\nimport { discoverCoinsFromPublish } from '../plugins/coin/discovery.ts';\nimport {\n\tCoinRegistryService,\n\tcoinRegistryLayer,\n\ttype CoinRecord,\n} from '../plugins/coin/registry.ts';\nimport {\n\tLOCAL_PACKAGE_PUBLISHED_KIND,\n\ttype LocalPackagePublishedDecl,\n} from '../plugins/package/publish-output.ts';\nimport { PackageRegistryService, layerPackageRegistry } from '../plugins/package/registry.ts';\nimport {\n\tCapabilitySinksService,\n\tlayerCapabilitySinksDefault,\n\ttype CapabilitySink,\n\ttype OrchestratorSinks,\n} from '../substrate/runtime/capability-sinks/index.ts';\n\nexport const layerBuiltInPluginServices: Layer.Layer<CoinRegistryService | PackageRegistryService> =\n\tLayer.mergeAll(coinRegistryLayer, layerPackageRegistry);\n\nconst publishResultSink = (\n\tcoinRegistry: typeof CoinRegistryService.Service,\n): CapabilitySink<typeof LOCAL_PACKAGE_PUBLISHED_KIND, LocalPackagePublishedDecl> => ({\n\tkind: LOCAL_PACKAGE_PUBLISHED_KIND,\n\taccept: (decl) =>\n\t\tEffect.gen(function* () {\n\t\t\tfor (const discovered of discoverCoinsFromPublish(decl.output)) {\n\t\t\t\tconst record: CoinRecord = {\n\t\t\t\t\tkey: (discovered.symbol ?? discovered.witness).toLowerCase(),\n\t\t\t\t\ttype: discovered.fullCoinType,\n\t\t\t\t\twitness: discovered.witness,\n\t\t\t\t\tmoduleName: discovered.moduleName,\n\t\t\t\t\tdecimals: discovered.decimals ?? 0,\n\t\t\t\t\t...(discovered.symbol === undefined ? {} : { symbol: discovered.symbol }),\n\t\t\t\t\t...(discovered.displayName === undefined ? {} : { displayName: discovered.displayName }),\n\t\t\t\t\t...(discovered.iconUrl === undefined ? {} : { iconUrl: discovered.iconUrl }),\n\t\t\t\t\t...(!discovered.publisherOwnsCap || discovered.treasuryCapId === undefined\n\t\t\t\t\t\t? {}\n\t\t\t\t\t\t: { treasuryCapId: discovered.treasuryCapId }),\n\t\t\t\t\t...(discovered.metadataId === undefined ? {} : { metadataId: discovered.metadataId }),\n\t\t\t\t\tpackageId: decl.packageId,\n\t\t\t\t\tpublishingPackageName: decl.packageName,\n\t\t\t\t};\n\t\t\t\tyield* coinRegistry.register(record);\n\t\t\t}\n\t\t}),\n});\n\nexport const layerBuiltInCapabilitySinks = (\n\torchestrator: OrchestratorSinks,\n): Layer.Layer<CapabilitySinksService, never, CoinRegistryService | PackageRegistryService> => {\n\tconst registerBuiltInPluginSinks = Layer.effectDiscard(\n\t\tEffect.gen(function* () {\n\t\t\tconst sinks = yield* CapabilitySinksService;\n\t\t\tconst coinRegistry = yield* CoinRegistryService;\n\t\t\tyield* sinks.registerSink(publishResultSink(coinRegistry));\n\t\t}),\n\t);\n\treturn registerBuiltInPluginSinks.pipe(\n\t\tLayer.provideMerge(layerCapabilitySinksDefault(orchestrator)),\n\t);\n};\n\nexport const layerBuiltInPluginRuntime = (\n\torchestrator: OrchestratorSinks,\n): Layer.Layer<CoinRegistryService | PackageRegistryService | CapabilitySinksService> =>\n\tlayerBuiltInCapabilitySinks(orchestrator).pipe(Layer.provideMerge(layerBuiltInPluginServices));\n\nexport const extendBuiltInPluginContext = (\n\tctx: Context.Context<never>,\n): Effect.Effect<\n\tContext.Context<never>,\n\tnever,\n\tCoinRegistryService | PackageRegistryService | CapabilitySinksService\n> =>\n\tEffect.gen(function* () {\n\t\tconst coinRegistry = yield* CoinRegistryService;\n\t\tconst packageRegistry = yield* PackageRegistryService;\n\t\tconst capabilitySinks = yield* CapabilitySinksService;\n\t\treturn ctx.pipe(\n\t\t\tContext.add(CoinRegistryService, coinRegistry),\n\t\t\tContext.add(PackageRegistryService, packageRegistry),\n\t\t\tContext.add(CapabilitySinksService, capabilitySinks),\n\t\t) as Context.Context<never>;\n\t});\n"],"mappings":";;;;;;;;AAyBA,MAAa,6BACZ,MAAM,SAAS,mBAAmB,qBAAqB;AAExD,MAAM,qBACL,kBACqF;CACrF,MAAM;CACN,SAAS,SACR,OAAO,IAAI,aAAa;AACvB,OAAK,MAAM,cAAc,yBAAyB,KAAK,OAAO,EAAE;GAC/D,MAAM,SAAqB;IAC1B,MAAM,WAAW,UAAU,WAAW,SAAS,aAAa;IAC5D,MAAM,WAAW;IACjB,SAAS,WAAW;IACpB,YAAY,WAAW;IACvB,UAAU,WAAW,YAAY;IACjC,GAAI,WAAW,WAAW,KAAA,IAAY,EAAE,GAAG,EAAE,QAAQ,WAAW,QAAQ;IACxE,GAAI,WAAW,gBAAgB,KAAA,IAAY,EAAE,GAAG,EAAE,aAAa,WAAW,aAAa;IACvF,GAAI,WAAW,YAAY,KAAA,IAAY,EAAE,GAAG,EAAE,SAAS,WAAW,SAAS;IAC3E,GAAI,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