@mysten-incubation/devstack 0.0.1 → 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -3
- package/dashboard-ui/assets/geist-cyrillic-ext-wght-normal-DjL33-gN.woff2 +0 -0
- package/dashboard-ui/assets/geist-cyrillic-wght-normal-BEAKL7Jp.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-ext-wght-normal-DC-KSUi6.woff2 +0 -0
- package/dashboard-ui/assets/geist-latin-wght-normal-BgDaEnEv.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-ext-wght-normal-I4S5GZfc.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-cyrillic-wght-normal-BmXc_FBt.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-ext-wght-normal-DrnZ1wKl.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-latin-wght-normal-B_7UjwxQ.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-symbols2-wght-normal-GZpp1pK2.woff2 +0 -0
- package/dashboard-ui/assets/geist-mono-vietnamese-wght-normal-D8KDMBhC.woff2 +0 -0
- package/dashboard-ui/assets/geist-vietnamese-wght-normal-6IgcOCM7.woff2 +0 -0
- package/dashboard-ui/assets/index-Bmi1UtAg.js +1356 -0
- package/dashboard-ui/assets/index-D5EShVt4.js +3 -0
- package/dashboard-ui/assets/index-Deml9drg.css +1 -0
- package/dashboard-ui/index.html +13 -0
- package/dist/api/define-capabilities.d.mts +14 -3
- package/dist/api/define-capabilities.mjs +18 -1
- package/dist/api/define-capabilities.mjs.map +1 -1
- package/dist/api/define-devstack.d.mts +1 -1
- package/dist/api/define-devstack.mjs +6 -26
- package/dist/api/define-devstack.mjs.map +1 -1
- package/dist/api/define-plugin.d.mts +1 -0
- package/dist/api/define-plugin.mjs +2 -0
- package/dist/api/inference-network.d.mts +132 -0
- package/dist/api/inference-network.mjs +105 -16
- package/dist/api/inference-network.mjs.map +1 -1
- package/dist/api/plugin-errors.d.mts +7 -0
- package/dist/api/run-stack.d.mts +20 -9
- package/dist/api/run-stack.mjs +56 -29
- package/dist/api/run-stack.mjs.map +1 -1
- package/dist/build-integrations/playwright/config.d.mts +6 -4
- package/dist/build-integrations/playwright/config.mjs +5 -3
- package/dist/build-integrations/playwright/config.mjs.map +1 -1
- package/dist/build-integrations/playwright/errors.d.mts +1 -1
- package/dist/build-integrations/playwright/global-setup.d.mts +43 -17
- package/dist/build-integrations/playwright/global-setup.mjs +250 -13
- package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
- package/dist/build-integrations/playwright/index.d.mts +5 -3
- package/dist/build-integrations/playwright/index.mjs +4 -2
- package/dist/build-integrations/playwright/stack-context.d.mts +0 -1
- package/dist/build-integrations/playwright/stack-context.mjs +24 -63
- package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
- package/dist/build-integrations/playwright/wallet-context.d.mts +7 -10
- package/dist/build-integrations/playwright/wallet-context.mjs +8 -13
- package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/cold-start-url.d.mts +5 -0
- package/dist/build-integrations/runtime/cold-start-url.mjs +4 -3
- package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
- package/dist/build-integrations/runtime/conventional-routes.d.mts +51 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs +92 -0
- package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -0
- package/dist/build-integrations/runtime/discover.d.mts +38 -30
- package/dist/build-integrations/runtime/discover.mjs +73 -70
- package/dist/build-integrations/runtime/discover.mjs.map +1 -1
- package/dist/build-integrations/runtime/endpoint-registry.d.mts +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs +3 -1
- package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
- package/dist/build-integrations/runtime/index.d.mts +7 -2
- package/dist/build-integrations/runtime/index.mjs +9 -2
- package/dist/build-integrations/runtime/manifest-types.d.mts +2 -0
- package/dist/build-integrations/runtime/manifest-types.mjs +3 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.d.mts +29 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs +10 -0
- package/dist/build-integrations/runtime/playwright-stack-context-slot.mjs.map +1 -0
- package/dist/build-integrations/runtime/read-stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/read-stack-context.mjs +10 -4
- package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
- package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +48 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs +42 -0
- package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -0
- package/dist/build-integrations/runtime/stack-context.d.mts +1 -1
- package/dist/build-integrations/runtime/wallet-paths.mjs +2 -0
- package/dist/build-integrations/vite/index.d.mts +51 -0
- package/dist/build-integrations/vite/index.mjs +73 -0
- package/dist/build-integrations/vite/index.mjs.map +1 -0
- package/dist/build-integrations/vitest/env.d.mts +4 -3
- package/dist/build-integrations/vitest/env.mjs +6 -4
- package/dist/build-integrations/vitest/env.mjs.map +1 -1
- package/dist/build-integrations/vitest/errors.d.mts +25 -4
- package/dist/build-integrations/vitest/errors.mjs +15 -2
- package/dist/build-integrations/vitest/errors.mjs.map +1 -1
- package/dist/build-integrations/vitest/index.d.mts +2 -2
- package/dist/build-integrations/vitest/index.mjs +3 -3
- package/dist/build-integrations/vitest/setup.d.mts +4 -2
- package/dist/build-integrations/vitest/setup.mjs +2 -2
- package/dist/build-integrations/vitest/setup.mjs.map +1 -1
- package/dist/build-integrations/vitest/stack-context.d.mts +0 -1
- package/dist/build-integrations/vitest/stack-context.mjs +33 -13
- package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
- package/dist/cli/bail.mjs +23 -0
- package/dist/cli/bail.mjs.map +1 -0
- package/dist/{surfaces/cli/commands → cli}/doctor-probes.mjs +26 -16
- package/dist/cli/doctor-probes.mjs.map +1 -0
- package/dist/cli/main.d.mts +15 -1
- package/dist/cli/main.mjs +166 -482
- package/dist/cli/main.mjs.map +1 -1
- package/dist/cli/prune-direct.mjs +31 -201
- package/dist/cli/prune-direct.mjs.map +1 -1
- package/dist/cli/snapshot-reader.mjs +14 -11
- package/dist/cli/snapshot-reader.mjs.map +1 -1
- package/dist/cli/up-lifecycle.mjs +4 -1
- package/dist/cli/up-lifecycle.mjs.map +1 -1
- package/dist/cli/wirings/apply.mjs +95 -0
- package/dist/cli/wirings/apply.mjs.map +1 -0
- package/dist/cli/wirings/build-verb-layers.mjs +42 -0
- package/dist/cli/wirings/build-verb-layers.mjs.map +1 -0
- package/dist/cli/wirings/config-loader.mjs +69 -0
- package/dist/cli/wirings/config-loader.mjs.map +1 -0
- package/dist/cli/wirings/engine-command.mjs +30 -0
- package/dist/cli/wirings/engine-command.mjs.map +1 -0
- package/dist/cli/wirings/identity.mjs +72 -0
- package/dist/cli/wirings/identity.mjs.map +1 -0
- package/dist/cli/wirings/provide-file-system.mjs +7 -0
- package/dist/cli/wirings/provide-file-system.mjs.map +1 -0
- package/dist/cli/wirings/snapshot.mjs +177 -0
- package/dist/cli/wirings/snapshot.mjs.map +1 -0
- package/dist/cli/wirings/up.mjs +287 -0
- package/dist/cli/wirings/up.mjs.map +1 -0
- package/dist/cli/wirings/wipe.mjs +40 -0
- package/dist/cli/wirings/wipe.mjs.map +1 -0
- package/dist/contracts/capability-decl.d.mts +0 -2
- package/dist/contracts/codegenable.d.mts +43 -0
- package/dist/contracts/container-runtime.d.mts +26 -1
- package/dist/contracts/faucet-strategy.d.mts +25 -0
- package/dist/contracts/funding-strategy.d.mts +42 -0
- package/dist/contracts/plugin-expander.mjs +60 -0
- package/dist/contracts/plugin-expander.mjs.map +1 -0
- package/dist/contracts/projection.d.mts +5 -3
- package/dist/contracts/renderer.d.mts +23 -0
- package/dist/contracts/routable.d.mts +14 -1
- package/dist/contracts/snapshotable.d.mts +25 -3
- package/dist/contracts/wallet-protocol.d.mts +52 -0
- package/dist/contracts/wallet-protocol.mjs +52 -0
- package/dist/contracts/wallet-protocol.mjs.map +1 -0
- package/dist/index.d.mts +26 -25
- package/dist/index.mjs +20 -13
- package/dist/{runtime → orchestrators}/built-in-plugin-layers.mjs +10 -5
- package/dist/orchestrators/built-in-plugin-layers.mjs.map +1 -0
- package/dist/orchestrators/codegen/bindings.d.mts +1 -2
- package/dist/orchestrators/codegen/bindings.mjs +52 -186
- package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
- package/dist/orchestrators/codegen/emit.mjs +19 -1
- package/dist/orchestrators/codegen/emit.mjs.map +1 -1
- package/dist/orchestrators/codegen/errors.mjs +8 -3
- package/dist/orchestrators/codegen/errors.mjs.map +1 -1
- package/dist/orchestrators/codegen/format.mjs +47 -39
- package/dist/orchestrators/codegen/format.mjs.map +1 -1
- package/dist/orchestrators/codegen/gitignore.mjs +3 -1
- package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
- package/dist/orchestrators/codegen/output-location.mjs +40 -0
- package/dist/orchestrators/codegen/output-location.mjs.map +1 -0
- package/dist/orchestrators/codegen/paths.d.mts +1 -1
- package/dist/orchestrators/codegen/paths.mjs +40 -14
- package/dist/orchestrators/codegen/paths.mjs.map +1 -1
- package/dist/orchestrators/codegen/permissions.mjs +3 -1
- package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
- package/dist/orchestrators/codegen/service.mjs +157 -105
- package/dist/orchestrators/codegen/service.mjs.map +1 -1
- package/dist/orchestrators/lifecycle-prune/errors.mjs +31 -0
- package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs +350 -0
- package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -0
- package/dist/orchestrators/router/cleanup.mjs +26 -27
- package/dist/orchestrators/router/cleanup.mjs.map +1 -1
- package/dist/orchestrators/router/entrypoints.mjs +2 -2
- package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
- package/dist/orchestrators/router/file-provider.mjs +14 -5
- package/dist/orchestrators/router/file-provider.mjs.map +1 -1
- package/dist/orchestrators/router/hostname.mjs +19 -55
- package/dist/orchestrators/router/hostname.mjs.map +1 -1
- package/dist/orchestrators/router/index.mjs +11 -0
- package/dist/orchestrators/router/profile.mjs +2 -2
- package/dist/orchestrators/router/sentinels.mjs +26 -0
- package/dist/orchestrators/router/sentinels.mjs.map +1 -0
- package/dist/orchestrators/router/service.mjs +40 -37
- package/dist/orchestrators/router/service.mjs.map +1 -1
- package/dist/orchestrators/router/traefik-container.mjs +27 -16
- package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
- package/dist/{substrate/runtime → orchestrators}/run.mjs +26 -21
- package/dist/orchestrators/run.mjs.map +1 -0
- package/dist/orchestrators/runtime-composition.d.mts +1 -1
- package/dist/orchestrators/runtime-composition.mjs +123 -39
- package/dist/orchestrators/runtime-composition.mjs.map +1 -1
- package/dist/orchestrators/snapshot/capture-command.d.mts +1 -0
- package/dist/orchestrators/snapshot/capture-command.mjs +25 -0
- package/dist/orchestrators/snapshot/capture-command.mjs.map +1 -0
- package/dist/orchestrators/snapshot/capture.mjs +42 -28
- package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
- package/dist/orchestrators/snapshot/descriptor.mjs +35 -10
- package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
- package/dist/orchestrators/snapshot/identity-guard.mjs +1 -1
- package/dist/orchestrators/snapshot/index.mjs +13 -0
- package/dist/orchestrators/snapshot/integrity.d.mts +1 -1
- package/dist/orchestrators/snapshot/integrity.mjs +73 -17
- package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
- package/dist/orchestrators/snapshot/pending-marker.d.mts +1 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs +99 -0
- package/dist/orchestrators/snapshot/pending-marker.mjs.map +1 -0
- package/dist/orchestrators/snapshot/phase-error.mjs +23 -0
- package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -0
- package/dist/orchestrators/snapshot/prune.mjs +20 -55
- package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
- package/dist/orchestrators/snapshot/recover-pending.d.mts +1 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs +223 -0
- package/dist/orchestrators/snapshot/recover-pending.mjs.map +1 -0
- package/dist/orchestrators/snapshot/restore.mjs +118 -84
- package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
- package/dist/orchestrators/snapshot/service.mjs +53 -56
- package/dist/orchestrators/snapshot/service.mjs.map +1 -1
- package/dist/orchestrators/snapshot/state-document.d.mts +1 -0
- package/dist/orchestrators/snapshot/state-document.mjs +47 -7
- package/dist/orchestrators/snapshot/state-document.mjs.map +1 -1
- package/dist/orchestrators/snapshot/wipe.mjs +67 -10
- package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
- package/dist/plugins/account/codegen.mjs +9 -8
- package/dist/plugins/account/codegen.mjs.map +1 -1
- package/dist/plugins/account/errors.d.mts +33 -6
- package/dist/plugins/account/errors.mjs.map +1 -1
- package/dist/plugins/account/funding.d.mts +29 -19
- package/dist/plugins/account/funding.mjs +84 -66
- package/dist/plugins/account/funding.mjs.map +1 -1
- package/dist/plugins/account/index.d.mts +2 -4
- package/dist/plugins/account/index.mjs +64 -31
- package/dist/plugins/account/index.mjs.map +1 -1
- package/dist/plugins/account/keypair.mjs +6 -9
- package/dist/plugins/account/keypair.mjs.map +1 -1
- package/dist/plugins/account/lease.mjs +1 -0
- package/dist/plugins/account/lease.mjs.map +1 -1
- package/dist/plugins/account/registry.d.mts +14 -1
- package/dist/plugins/account/registry.mjs +18 -18
- package/dist/plugins/account/registry.mjs.map +1 -1
- package/dist/plugins/account/service.d.mts +23 -4
- package/dist/plugins/account/service.mjs +83 -45
- package/dist/plugins/account/service.mjs.map +1 -1
- package/dist/plugins/account/snapshot.mjs +2 -5
- package/dist/plugins/account/snapshot.mjs.map +1 -1
- package/dist/plugins/account/spans.mjs +16 -0
- package/dist/plugins/account/spans.mjs.map +1 -0
- package/dist/plugins/account/variants/keystore.mjs +6 -8
- package/dist/plugins/account/variants/keystore.mjs.map +1 -1
- package/dist/plugins/action/build-context.d.mts +3 -2
- package/dist/plugins/action/errors.d.mts +16 -12
- package/dist/plugins/action/errors.mjs.map +1 -1
- package/dist/plugins/action/execute.mjs +65 -103
- package/dist/plugins/action/execute.mjs.map +1 -1
- package/dist/plugins/action/index.d.mts +0 -2
- package/dist/plugins/action/index.mjs +17 -13
- package/dist/plugins/action/index.mjs.map +1 -1
- package/dist/plugins/action/service.mjs +38 -35
- package/dist/plugins/action/service.mjs.map +1 -1
- package/dist/plugins/action/spans.mjs +11 -0
- package/dist/plugins/action/spans.mjs.map +1 -0
- package/dist/plugins/coin/codegen.mjs +9 -8
- package/dist/plugins/coin/codegen.mjs.map +1 -1
- package/dist/plugins/coin/discovery.mjs +8 -4
- package/dist/plugins/coin/discovery.mjs.map +1 -1
- package/dist/plugins/coin/index.d.mts +11 -29
- package/dist/plugins/coin/index.mjs +56 -27
- package/dist/plugins/coin/index.mjs.map +1 -1
- package/dist/plugins/coin/metadata.mjs +8 -15
- package/dist/plugins/coin/metadata.mjs.map +1 -1
- package/dist/plugins/coin/mint.d.mts +30 -11
- package/dist/plugins/coin/mint.mjs +78 -74
- package/dist/plugins/coin/mint.mjs.map +1 -1
- package/dist/plugins/coin/registry.mjs +4 -7
- package/dist/plugins/coin/registry.mjs.map +1 -1
- package/dist/plugins/coin/service.d.mts +39 -1
- package/dist/plugins/coin/service.mjs +11 -4
- package/dist/plugins/coin/service.mjs.map +1 -1
- package/dist/plugins/coin/spans.mjs +20 -0
- package/dist/plugins/coin/spans.mjs.map +1 -0
- package/dist/plugins/dashboard/domain.mjs +402 -0
- package/dist/plugins/dashboard/domain.mjs.map +1 -0
- package/dist/plugins/dashboard/index.d.mts +29 -0
- package/dist/plugins/dashboard/index.mjs +91 -0
- package/dist/plugins/dashboard/index.mjs.map +1 -0
- package/dist/plugins/dashboard/origin-policy.mjs +36 -0
- package/dist/plugins/dashboard/origin-policy.mjs.map +1 -0
- package/dist/plugins/dashboard/routable.mjs +27 -0
- package/dist/plugins/dashboard/routable.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/builder.mjs +21 -0
- package/dist/plugins/dashboard/schema/builder.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/enums.mjs +72 -0
- package/dist/plugins/dashboard/schema/enums.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/root.mjs +351 -0
- package/dist/plugins/dashboard/schema/root.mjs.map +1 -0
- package/dist/plugins/dashboard/schema/types.mjs +508 -0
- package/dist/plugins/dashboard/schema/types.mjs.map +1 -0
- package/dist/plugins/dashboard/schema.mjs +11 -0
- package/dist/plugins/dashboard/schema.mjs.map +1 -0
- package/dist/plugins/dashboard/server.mjs +166 -0
- package/dist/plugins/dashboard/server.mjs.map +1 -0
- package/dist/plugins/deepbook/deploy.mjs +53 -115
- package/dist/plugins/deepbook/deploy.mjs.map +1 -1
- package/dist/plugins/deepbook/errors.mjs +1 -0
- package/dist/plugins/deepbook/errors.mjs.map +1 -1
- package/dist/plugins/deepbook/faucet-strategy.mjs +47 -34
- package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/deepbook/hash.mjs +9 -0
- package/dist/plugins/deepbook/hash.mjs.map +1 -0
- package/dist/plugins/deepbook/index.d.mts +1 -10
- package/dist/plugins/deepbook/index.mjs +25 -22
- package/dist/plugins/deepbook/index.mjs.map +1 -1
- package/dist/plugins/deepbook/pyth/index.mjs +26 -55
- package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
- package/dist/plugins/deepbook/snapshot.mjs +17 -29
- package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
- package/dist/plugins/deepbook/spans.mjs +18 -0
- package/dist/plugins/deepbook/spans.mjs.map +1 -0
- package/dist/plugins/deepbook/type-strings.mjs +65 -0
- package/dist/plugins/deepbook/type-strings.mjs.map +1 -0
- package/dist/plugins/deepbook/types.d.mts +2 -3
- package/dist/plugins/deepbook/types.mjs.map +1 -1
- package/dist/plugins/faucet/dispatcher.d.mts +21 -2
- package/dist/plugins/faucet/dispatcher.mjs +1 -2
- package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
- package/dist/plugins/faucet/errors.d.mts +11 -24
- package/dist/plugins/faucet/errors.mjs.map +1 -1
- package/dist/plugins/faucet/http.mjs +33 -14
- package/dist/plugins/faucet/http.mjs.map +1 -1
- package/dist/plugins/faucet/index.d.mts +15 -5
- package/dist/plugins/faucet/index.mjs +3 -0
- package/dist/plugins/faucet/index.mjs.map +1 -1
- package/dist/plugins/faucet/spans.mjs +12 -0
- package/dist/plugins/faucet/spans.mjs.map +1 -0
- package/dist/plugins/host-service/errors.d.mts +1 -1
- package/dist/plugins/host-service/index.mjs +34 -8
- package/dist/plugins/host-service/index.mjs.map +1 -1
- package/dist/plugins/host-service/routable.mjs +2 -1
- package/dist/plugins/host-service/routable.mjs.map +1 -1
- package/dist/plugins/host-service/service.d.mts +21 -0
- package/dist/plugins/host-service/service.mjs +136 -81
- package/dist/plugins/host-service/service.mjs.map +1 -1
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs +23 -0
- package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -0
- package/dist/plugins/internal/codegen-helpers.mjs +18 -0
- package/dist/plugins/internal/codegen-helpers.mjs.map +1 -0
- package/dist/plugins/internal/funding-failure-error.mjs +32 -0
- package/dist/plugins/internal/funding-failure-error.mjs.map +1 -0
- package/dist/plugins/package/build.mjs +1 -1
- package/dist/plugins/package/build.mjs.map +1 -1
- package/dist/plugins/package/codegen.mjs +26 -0
- package/dist/plugins/package/codegen.mjs.map +1 -1
- package/dist/plugins/package/errors.d.mts +16 -6
- package/dist/plugins/package/errors.mjs.map +1 -1
- package/dist/plugins/package/index.d.mts +0 -4
- package/dist/plugins/package/index.mjs +27 -21
- package/dist/plugins/package/index.mjs.map +1 -1
- package/dist/plugins/package/mode-known.mjs +26 -12
- package/dist/plugins/package/mode-known.mjs.map +1 -1
- package/dist/plugins/package/mode-local.mjs +47 -41
- package/dist/plugins/package/mode-local.mjs.map +1 -1
- package/dist/plugins/package/publish-executor.mjs +55 -114
- package/dist/plugins/package/publish-executor.mjs.map +1 -1
- package/dist/plugins/package/registry.mjs +2 -1
- package/dist/plugins/package/registry.mjs.map +1 -1
- package/dist/plugins/package/service.mjs.map +1 -1
- package/dist/plugins/package/spans.mjs +14 -0
- package/dist/plugins/package/spans.mjs.map +1 -0
- package/dist/plugins/postgres/db-ensure.mjs +19 -12
- package/dist/plugins/postgres/db-ensure.mjs.map +1 -1
- package/dist/plugins/postgres/errors.d.mts +5 -0
- package/dist/plugins/postgres/errors.mjs.map +1 -1
- package/dist/plugins/postgres/index.mjs +10 -17
- package/dist/plugins/postgres/index.mjs.map +1 -1
- package/dist/plugins/postgres/service.mjs +58 -24
- package/dist/plugins/postgres/service.mjs.map +1 -1
- package/dist/plugins/postgres/snapshot.mjs.map +1 -1
- package/dist/plugins/postgres/spans.mjs +11 -0
- package/dist/plugins/postgres/spans.mjs.map +1 -0
- package/dist/plugins/router-entrypoints.mjs +4 -4
- package/dist/plugins/router-entrypoints.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +15 -13
- package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +15 -19
- package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
- package/dist/plugins/seal/codegen.d.mts +2 -3
- package/dist/plugins/seal/codegen.mjs.map +1 -1
- package/dist/plugins/seal/config-render.mjs +35 -8
- package/dist/plugins/seal/config-render.mjs.map +1 -1
- package/dist/plugins/seal/deploy.mjs +31 -39
- package/dist/plugins/seal/deploy.mjs.map +1 -1
- package/dist/plugins/seal/errors.d.mts +1 -3
- package/dist/plugins/seal/errors.mjs +7 -1
- package/dist/plugins/seal/errors.mjs.map +1 -1
- package/dist/plugins/seal/index.d.mts +1 -6
- package/dist/plugins/seal/index.mjs +40 -14
- package/dist/plugins/seal/index.mjs.map +1 -1
- package/dist/plugins/seal/key-manager.d.mts +1 -9
- package/dist/plugins/seal/key-manager.mjs +2 -18
- package/dist/plugins/seal/key-manager.mjs.map +1 -1
- package/dist/plugins/seal/key-server.mjs +37 -36
- package/dist/plugins/seal/key-server.mjs.map +1 -1
- package/dist/plugins/seal/keygen.mjs +16 -17
- package/dist/plugins/seal/keygen.mjs.map +1 -1
- package/dist/plugins/seal/mode/fork-known.mjs +36 -14
- package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
- package/dist/plugins/seal/mode/live.d.mts +6 -4
- package/dist/plugins/seal/mode/live.mjs +14 -21
- package/dist/plugins/seal/mode/live.mjs.map +1 -1
- package/dist/plugins/seal/mode/local-keygen.mjs +57 -21
- package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
- package/dist/plugins/seal/registry-publish.mjs +1 -0
- package/dist/plugins/seal/registry-publish.mjs.map +1 -1
- package/dist/plugins/seal/routable.mjs.map +1 -1
- package/dist/plugins/seal/service.mjs.map +1 -1
- package/dist/plugins/seal/spans.mjs +18 -0
- package/dist/plugins/seal/spans.mjs.map +1 -0
- package/dist/plugins/sui/auto-tick.mjs +17 -23
- package/dist/plugins/sui/auto-tick.mjs.map +1 -1
- package/dist/plugins/sui/chain-build-container.mjs +18 -0
- package/dist/plugins/sui/chain-build-container.mjs.map +1 -0
- package/dist/plugins/sui/chain-probe.d.mts +5 -5
- package/dist/plugins/sui/chain-probe.mjs +28 -58
- package/dist/plugins/sui/chain-probe.mjs.map +1 -1
- package/dist/plugins/sui/codegen.mjs +26 -0
- package/dist/plugins/sui/codegen.mjs.map +1 -1
- package/dist/plugins/sui/errors.d.mts +2 -29
- package/dist/plugins/sui/errors.mjs +1 -3
- package/dist/plugins/sui/errors.mjs.map +1 -1
- package/dist/plugins/sui/fork-faucet-strategy.d.mts +1 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs +55 -0
- package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/fork-orchestration.d.mts +1 -0
- package/dist/plugins/sui/fork-orchestration.mjs +170 -2
- package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
- package/dist/plugins/sui/fork-transaction.d.mts +2 -0
- package/dist/plugins/sui/fork-transaction.mjs +92 -28
- package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
- package/dist/plugins/sui/index.d.mts +33 -70
- package/dist/plugins/sui/index.mjs +58 -35
- package/dist/plugins/sui/index.mjs.map +1 -1
- package/dist/plugins/{faucet/strategies/sui-local.mjs → sui/local-faucet-strategy.mjs} +10 -7
- package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -0
- package/dist/plugins/sui/mode/external.mjs +7 -13
- package/dist/plugins/sui/mode/external.mjs.map +1 -1
- package/dist/plugins/sui/mode/fork.mjs +136 -59
- package/dist/plugins/sui/mode/fork.mjs.map +1 -1
- package/dist/plugins/sui/mode/live.mjs +10 -16
- package/dist/plugins/sui/mode/live.mjs.map +1 -1
- package/dist/plugins/sui/mode/local.mjs +37 -36
- package/dist/plugins/sui/mode/local.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared-boot.mjs +38 -115
- package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
- package/dist/plugins/sui/mode/shared.d.mts +1 -5
- package/dist/plugins/sui/mode/shared.mjs.map +1 -1
- package/dist/plugins/sui/mode/spec.d.mts +18 -0
- package/dist/plugins/sui/move-summary-runner.mjs +207 -0
- package/dist/plugins/sui/move-summary-runner.mjs.map +1 -0
- package/dist/plugins/sui/network-resolver.d.mts +4 -3
- package/dist/plugins/sui/service.mjs.map +1 -1
- package/dist/plugins/sui/snapshot.mjs +3 -0
- package/dist/plugins/sui/snapshot.mjs.map +1 -1
- package/dist/plugins/sui/spans.mjs +17 -0
- package/dist/plugins/sui/spans.mjs.map +1 -0
- package/dist/plugins/wallet/codegen.d.mts +0 -1
- package/dist/plugins/wallet/codegen.mjs +8 -9
- package/dist/plugins/wallet/codegen.mjs.map +1 -1
- package/dist/plugins/wallet/index.d.mts +6 -8
- package/dist/plugins/wallet/index.mjs +46 -35
- package/dist/plugins/wallet/index.mjs.map +1 -1
- package/dist/plugins/wallet/origin-policy.mjs +12 -28
- package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
- package/dist/plugins/wallet/pairing.mjs +6 -4
- package/dist/plugins/wallet/pairing.mjs.map +1 -1
- package/dist/plugins/wallet/protocol.d.mts +1 -0
- package/dist/plugins/wallet/protocol.mjs +5 -44
- package/dist/plugins/wallet/protocol.mjs.map +1 -1
- package/dist/plugins/wallet/routable.mjs +2 -8
- package/dist/plugins/wallet/routable.mjs.map +1 -1
- package/dist/plugins/wallet/server.mjs +36 -44
- package/dist/plugins/wallet/server.mjs.map +1 -1
- package/dist/plugins/wallet/service.d.mts +1 -5
- package/dist/plugins/wallet/service.mjs +22 -18
- package/dist/plugins/wallet/service.mjs.map +1 -1
- package/dist/plugins/wallet/spans.mjs +22 -0
- package/dist/plugins/wallet/spans.mjs.map +1 -0
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +33 -8
- package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
- package/dist/plugins/walrus/codegen.d.mts +3 -3
- package/dist/plugins/walrus/codegen.mjs.map +1 -1
- package/dist/plugins/walrus/deploy-paths.mjs +21 -5
- package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
- package/dist/plugins/walrus/deploy.mjs +67 -69
- package/dist/plugins/walrus/deploy.mjs.map +1 -1
- package/dist/plugins/walrus/errors.mjs +1 -0
- package/dist/plugins/walrus/errors.mjs.map +1 -1
- package/dist/plugins/walrus/faucet-strategy.mjs +12 -7
- package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
- package/dist/plugins/walrus/index.d.mts +2 -13
- package/dist/plugins/walrus/index.mjs +18 -23
- package/dist/plugins/walrus/index.mjs.map +1 -1
- package/dist/plugins/walrus/mode/known-deploy.mjs +7 -5
- package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
- package/dist/plugins/walrus/mode/local-cluster.mjs +26 -7
- package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
- package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
- package/dist/plugins/walrus/routable.mjs +7 -23
- package/dist/plugins/walrus/routable.mjs.map +1 -1
- package/dist/plugins/walrus/service.mjs.map +1 -1
- package/dist/plugins/walrus/spans.mjs +18 -0
- package/dist/plugins/walrus/spans.mjs.map +1 -0
- package/dist/plugins/walrus/storage-nodes.d.mts +6 -2
- package/dist/plugins/walrus/storage-nodes.mjs +15 -8
- package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
- package/dist/plugins/walrus/wal-swap.mjs +58 -15
- package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
- package/dist/primitives/artifact-publisher.d.mts +1 -1
- package/dist/primitives/artifact-publisher.mjs +15 -0
- package/dist/primitives/artifact-publisher.mjs.map +1 -0
- package/dist/runtime/docker/client.mjs +17 -4
- package/dist/runtime/docker/client.mjs.map +1 -1
- package/dist/runtime/docker/container.mjs +219 -132
- package/dist/runtime/docker/container.mjs.map +1 -1
- package/dist/runtime/docker/errors.mjs +0 -6
- package/dist/runtime/docker/errors.mjs.map +1 -1
- package/dist/runtime/docker/exec.mjs +21 -18
- package/dist/runtime/docker/exec.mjs.map +1 -1
- package/dist/runtime/docker/image.mjs +36 -13
- package/dist/runtime/docker/image.mjs.map +1 -1
- package/dist/runtime/docker/index.mjs +14 -0
- package/dist/runtime/docker/inspect-and-decode.mjs +51 -0
- package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -0
- package/dist/runtime/docker/inventory.mjs +14 -11
- package/dist/runtime/docker/inventory.mjs.map +1 -1
- package/dist/runtime/docker/labels.mjs +38 -5
- package/dist/runtime/docker/labels.mjs.map +1 -1
- package/dist/runtime/docker/logs.d.mts +1 -1
- package/dist/runtime/docker/logs.mjs.map +1 -1
- package/dist/runtime/docker/network.mjs +83 -47
- package/dist/runtime/docker/network.mjs.map +1 -1
- package/dist/runtime/docker/render-run-args.mjs +82 -0
- package/dist/runtime/docker/render-run-args.mjs.map +1 -0
- package/dist/runtime/docker/service.d.mts +1 -1
- package/dist/runtime/docker/service.mjs +12 -7
- package/dist/runtime/docker/service.mjs.map +1 -1
- package/dist/runtime/docker/sweep.mjs +118 -43
- package/dist/runtime/docker/sweep.mjs.map +1 -1
- package/dist/runtime/docker/volume.mjs +2 -0
- package/dist/runtime/docker/volume.mjs.map +1 -1
- package/dist/runtime/docker/wrap.mjs +30 -1
- package/dist/runtime/docker/wrap.mjs.map +1 -1
- package/dist/substrate/cross-process.mjs +14 -8
- package/dist/substrate/cross-process.mjs.map +1 -1
- package/dist/substrate/event-time.mjs +33 -0
- package/dist/substrate/event-time.mjs.map +1 -0
- package/dist/substrate/events.d.mts +28 -8
- package/dist/substrate/identity.d.mts +2 -1
- package/dist/substrate/manifest.d.mts +68 -5
- package/dist/substrate/manifest.mjs +34 -5
- package/dist/substrate/manifest.mjs.map +1 -1
- package/dist/substrate/network.d.mts +3 -5
- package/dist/substrate/options.d.mts +0 -2
- package/dist/substrate/plugin.d.mts +13 -0
- package/dist/substrate/plugin.mjs +4 -2
- package/dist/substrate/plugin.mjs.map +1 -1
- package/dist/substrate/projection.d.mts +35 -3
- package/dist/substrate/runtime/artifact-publisher/index.mjs +19 -9
- package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -1
- package/dist/substrate/runtime/atomic-write.mjs +97 -32
- package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
- package/dist/substrate/runtime/cache/index.mjs +3 -0
- package/dist/substrate/runtime/cache/schema.mjs +2 -2
- package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
- package/dist/substrate/runtime/cache/service.mjs +9 -7
- package/dist/substrate/runtime/cache/service.mjs.map +1 -1
- package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -1
- package/dist/substrate/runtime/capability-sinks/index.mjs +3 -0
- package/dist/substrate/runtime/capability-sinks/layer.mjs +1 -1
- package/dist/substrate/runtime/capability-sinks/service.d.mts +61 -2
- package/dist/substrate/runtime/capability-sinks/service.mjs +21 -26
- package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -1
- package/dist/substrate/runtime/config-validation.d.mts +1 -13
- package/dist/substrate/runtime/config-validation.mjs +2 -91
- package/dist/substrate/runtime/config-validation.mjs.map +1 -1
- package/dist/substrate/runtime/container-runtime.d.mts +1 -0
- package/dist/substrate/runtime/container-runtime.mjs +2 -0
- package/dist/substrate/runtime/control-plane/domain.mjs +101 -0
- package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -0
- package/dist/substrate/runtime/control-plane/service.mjs +7 -0
- package/dist/substrate/runtime/control-plane/service.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +46 -19
- package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +30 -12
- package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/index.mjs +5 -0
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +11 -2
- package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +1 -1
- package/dist/substrate/runtime/cross-process/index.mjs +11 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs +34 -0
- package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/liveness.mjs +52 -10
- package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/lock.d.mts +1 -0
- package/dist/substrate/runtime/cross-process/lock.mjs +23 -0
- package/dist/substrate/runtime/cross-process/lock.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +64 -0
- package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/roster.mjs +97 -83
- package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/self-pid.mjs +8 -0
- package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -0
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +24 -28
- package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -1
- package/dist/substrate/runtime/cross-process/stack-lock.mjs +41 -20
- package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
- package/dist/substrate/runtime/current-plugin.mjs +2 -2
- package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
- package/dist/substrate/runtime/errors.mjs +12 -6
- package/dist/substrate/runtime/errors.mjs.map +1 -1
- package/dist/substrate/runtime/format-unknown-error.mjs +30 -0
- package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs +10 -0
- package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -0
- package/dist/substrate/runtime/host-gateway.mjs +20 -0
- package/dist/substrate/runtime/host-gateway.mjs.map +1 -0
- package/dist/substrate/runtime/host-tree-tar/index.mjs +61 -50
- package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
- package/dist/substrate/runtime/http-probe.d.mts +1 -1
- package/dist/substrate/runtime/index.mjs +14 -0
- package/dist/substrate/runtime/lease-broker/index.d.mts +1 -1
- package/dist/substrate/runtime/lease-broker/index.mjs +2 -0
- package/dist/substrate/runtime/lease-broker/service.d.mts +1 -64
- package/dist/substrate/runtime/lease-broker/service.mjs +1 -1
- package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs +22 -3
- package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/index.mjs +9 -0
- package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +20 -3
- package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/selective-restart.mjs +1 -1
- package/dist/substrate/runtime/lifecycle/signals.mjs +5 -5
- package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
- package/dist/substrate/runtime/lifecycle/state-machine.mjs +1 -1
- package/dist/substrate/runtime/managed-container.d.mts +19 -1
- package/dist/substrate/runtime/managed-container.mjs +20 -1
- package/dist/substrate/runtime/managed-container.mjs.map +1 -1
- package/dist/substrate/runtime/manifest/index.mjs +3 -0
- package/dist/substrate/runtime/manifest/manifest.mjs +15 -11
- package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
- package/dist/substrate/runtime/mode-errors.mjs +20 -0
- package/dist/substrate/runtime/mode-errors.mjs.map +1 -0
- package/dist/substrate/runtime/observability/cascade-formatter.mjs +9 -13
- package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
- package/dist/substrate/runtime/observability/formatter-registry.mjs +19 -36
- package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -1
- package/dist/substrate/runtime/observability/ignore-with-log.d.mts +1 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs +17 -0
- package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -0
- package/dist/substrate/runtime/observability/index.d.mts +1 -1
- package/dist/substrate/runtime/observability/index.mjs +13 -0
- package/dist/substrate/runtime/observability/log-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/log-store.mjs +175 -0
- package/dist/substrate/runtime/observability/log-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/logger.d.mts +2 -1
- package/dist/substrate/runtime/observability/logger.mjs +5 -9
- package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
- package/dist/substrate/runtime/observability/output-truncate.mjs +35 -0
- package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -0
- package/dist/substrate/runtime/observability/pretty-error.mjs +9 -12
- package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
- package/dist/substrate/runtime/observability/redaction.d.mts +2 -13
- package/dist/substrate/runtime/observability/redaction.mjs +8 -14
- package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
- package/dist/substrate/runtime/observability/span-store.d.mts +1 -0
- package/dist/substrate/runtime/observability/span-store.mjs +110 -0
- package/dist/substrate/runtime/observability/span-store.mjs.map +1 -0
- package/dist/substrate/runtime/observability/spans.mjs +14 -14
- package/dist/substrate/runtime/observability/spans.mjs.map +1 -1
- package/dist/substrate/runtime/observability/subprocess-capture.mjs +1 -1
- package/dist/substrate/runtime/passthrough-or-wrap.mjs +33 -0
- package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -0
- package/dist/substrate/runtime/paths.d.mts +1 -1
- package/dist/substrate/runtime/paths.mjs +4 -3
- package/dist/substrate/runtime/paths.mjs.map +1 -1
- package/dist/substrate/runtime/phase-preserving-produce.mjs +40 -0
- package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -0
- package/dist/substrate/runtime/port-broker/index.mjs +3 -0
- package/dist/substrate/runtime/port-broker/service.mjs +170 -126
- package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs +1 -1
- package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
- package/dist/substrate/runtime/probes.d.mts +7 -5
- package/dist/substrate/runtime/probes.mjs +3 -1
- package/dist/substrate/runtime/probes.mjs.map +1 -1
- package/dist/substrate/runtime/projection/index.mjs +4 -0
- package/dist/substrate/runtime/projection/operational-endpoints.mjs +1 -2
- package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
- package/dist/substrate/runtime/projection/persisted.mjs +33 -15
- package/dist/substrate/runtime/projection/persisted.mjs.map +1 -1
- package/dist/substrate/runtime/projection/state-ref.mjs +26 -2
- package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
- package/dist/substrate/runtime/projection/update.mjs +88 -24
- package/dist/substrate/runtime/projection/update.mjs.map +1 -1
- package/dist/substrate/runtime/random-suffix.mjs +11 -0
- package/dist/substrate/runtime/random-suffix.mjs.map +1 -0
- package/dist/substrate/runtime/retry-policy.d.mts +59 -1
- package/dist/substrate/runtime/retry-policy.mjs +66 -1
- package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
- package/dist/substrate/runtime/routed-url.d.mts +1 -0
- package/dist/substrate/runtime/routed-url.mjs +79 -0
- package/dist/substrate/runtime/routed-url.mjs.map +1 -0
- package/dist/substrate/runtime/runtime-decode.d.mts +1 -1
- package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-http-server.mjs +2 -3
- package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
- package/dist/substrate/runtime/scoped-multimap/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs +52 -0
- package/dist/substrate/runtime/scoped-multimap/service.mjs.map +1 -0
- package/dist/substrate/runtime/scoped-ref-map/index.mjs +2 -0
- package/dist/substrate/runtime/scoped-ref-map/service.mjs +2 -2
- package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -1
- package/dist/substrate/runtime/stage-and-swap/index.mjs +72 -4
- package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/index.d.mts +1 -0
- package/dist/substrate/runtime/state-store/index.mjs +3 -0
- package/dist/substrate/runtime/state-store/schema.d.mts +1 -0
- package/dist/substrate/runtime/state-store/schema.mjs +19 -14
- package/dist/substrate/runtime/state-store/schema.mjs.map +1 -1
- package/dist/substrate/runtime/state-store/service.d.mts +1 -0
- package/dist/substrate/runtime/state-store/service.mjs +145 -0
- package/dist/substrate/runtime/state-store/service.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.d.mts +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs +33 -0
- package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -0
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +1 -1
- package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
- package/dist/substrate/runtime/strategy-registry/index.mjs +4 -0
- package/dist/substrate/runtime/strategy-registry/service.mjs +19 -33
- package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
- package/dist/substrate/runtime/subnet-broker.mjs +60 -0
- package/dist/substrate/runtime/subnet-broker.mjs.map +1 -0
- package/dist/substrate/runtime/sui-execute/index.d.mts +21 -1
- package/dist/substrate/runtime/sui-execute/index.mjs +84 -20
- package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -1
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.d.mts +1 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs +32 -0
- package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +1 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs +32 -0
- package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +1 -0
- package/dist/substrate/runtime/sui-move-build/index.mjs +93 -19
- package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -1
- package/dist/substrate/runtime/supervisor/acquire-node.mjs +181 -0
- package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs +144 -0
- package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs +68 -0
- package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +151 -0
- package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/errors.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/errors.mjs +9 -0
- package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/index.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/index.mjs +3 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs +51 -0
- package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs +250 -0
- package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/state.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/state.mjs +22 -0
- package/dist/substrate/runtime/supervisor/state.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs +57 -0
- package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -0
- package/dist/substrate/runtime/supervisor/types.d.mts +1 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs +133 -0
- package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -0
- package/dist/substrate/runtime/typed-env.mjs +8 -0
- package/dist/substrate/runtime/typed-env.mjs.map +1 -0
- package/dist/substrate/state-store.d.mts +1 -0
- package/dist/substrate/versioned-doc-schema.mjs +17 -0
- package/dist/substrate/versioned-doc-schema.mjs.map +1 -0
- package/dist/substrate/versioned-doc-sync.mjs +94 -0
- package/dist/substrate/versioned-doc-sync.mjs.map +1 -0
- package/dist/surfaces/cli/command-tree.mjs.map +1 -1
- package/dist/surfaces/cli/commands/index.mjs +9 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs +13 -0
- package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -0
- package/dist/surfaces/cli/commands/prune-picker.mjs +3 -2
- package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
- package/dist/surfaces/cli/commands/prune.mjs +34 -17
- package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
- package/dist/surfaces/cli/commands/status.mjs +2 -2
- package/dist/surfaces/cli/commands/status.mjs.map +1 -1
- package/dist/surfaces/cli/commands/supervisor-presence.mjs +5 -3
- package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
- package/dist/surfaces/cli/commands/wipe.mjs +38 -4
- package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
- package/dist/surfaces/cli/errors.mjs +1 -1
- package/dist/surfaces/cli/errors.mjs.map +1 -1
- package/dist/surfaces/cli/flags.mjs +0 -1
- package/dist/surfaces/cli/flags.mjs.map +1 -1
- package/dist/surfaces/cli/index.mjs +98 -18
- package/dist/surfaces/cli/index.mjs.map +1 -1
- package/dist/surfaces/cli/output.mjs +1 -0
- package/dist/surfaces/cli/output.mjs.map +1 -1
- package/dist/surfaces/cli/sysexits.mjs +2 -1
- package/dist/surfaces/cli/sysexits.mjs.map +1 -1
- package/dist/surfaces/tui/app.mjs +25 -3
- package/dist/surfaces/tui/app.mjs.map +1 -1
- package/dist/surfaces/tui/display-derivation.mjs +23 -74
- package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
- package/dist/surfaces/tui/event-log.mjs +35 -23
- package/dist/surfaces/tui/event-log.mjs.map +1 -1
- package/dist/surfaces/tui/input.mjs +5 -1
- package/dist/surfaces/tui/input.mjs.map +1 -1
- package/dist/surfaces/tui/plain-renderer.mjs +70 -34
- package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
- package/package.json +24 -4
- package/dist/contracts/liveness-classifier.d.mts +0 -19
- package/dist/contracts/network-resolver.d.mts +0 -15
- package/dist/contracts/network-resolver.mjs +0 -7
- package/dist/contracts/network-resolver.mjs.map +0 -1
- package/dist/orchestrators/codegen/extras.mjs +0 -16
- package/dist/orchestrators/codegen/extras.mjs.map +0 -1
- package/dist/plugins/deepbook/routable.mjs +0 -21
- package/dist/plugins/deepbook/routable.mjs.map +0 -1
- package/dist/plugins/faucet/service.d.mts +0 -20
- package/dist/plugins/faucet/strategies/sui-local.d.mts +0 -23
- package/dist/plugins/faucet/strategies/sui-local.mjs.map +0 -1
- package/dist/plugins/sui/seed-objects.d.mts +0 -18
- package/dist/plugins/sui/seed-objects.mjs +0 -25
- package/dist/plugins/sui/seed-objects.mjs.map +0 -1
- package/dist/runtime/built-in-plugin-layers.mjs.map +0 -1
- package/dist/substrate/runtime/context-helpers.mjs +0 -32
- package/dist/substrate/runtime/context-helpers.mjs.map +0 -1
- package/dist/substrate/runtime/run.mjs.map +0 -1
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +0 -30
- package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +0 -1
- package/dist/substrate/runtime/supervisor.d.mts +0 -1
- package/dist/substrate/runtime/supervisor.mjs +0 -831
- package/dist/substrate/runtime/supervisor.mjs.map +0 -1
- package/dist/surfaces/cli/commands/doctor-probes.mjs.map +0 -1
- /package/dist/{substrate/runtime/strategy-registry/faucet-capability-for.d.mts → plugins/faucet/http.d.mts} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run-stack.mjs","names":[],"sources":["../../src/api/run-stack.ts"],"sourcesContent":["// `runStack(stack, opts?)` — top-level programmatic embedding.\n//\n// Cutover blocker #3 (api-surface-design.md § Stack handle, parity-\n// matrix.md \"Programmatic embedding\"): `defineDevstack(...)` returns a\n// static `Stack<Members>` manifest with no runnable surface. Library\n// consumers (vitest setup, custom hosts, Effect-native apps, embedded\n// fixtures) had to re-implement `cli/main.ts:runUpLive`'s substrate\n// Layer composition. `runStack` is the single seam — it consumes the\n// shared `substrate/runtime/run.ts` helper the CLI also consumes.\n//\n// Shape:\n//\n// ```ts\n// const stack = defineDevstack(...);\n// const handle = runStack(stack, { runtimeRoot: '/tmp/devstack' });\n// await Effect.runPromise(handle.start);\n// // ... interact ...\n// await Effect.runPromise(handle.stop);\n// await Effect.runPromise(handle.awaitShutdown);\n// ```\n//\n// `start` resolves when every plugin has reached `ready` (or when one\n// fails to acquire — `start` then fails with `BootError`). `stop`\n// triggers graceful shutdown; `awaitShutdown` resolves when the fiber\n// finishes its scope finalizers.\n\nimport {\n\tCause,\n\tDeferred,\n\tEffect,\n\tExit,\n\tFiber,\n\tLayer,\n\tLogger,\n\tQueue,\n\tStream,\n\tSubscriptionRef,\n} from 'effect';\n\nimport { appName, chainId, stackName } from '../substrate/brand.ts';\nimport type { Identity } from '../substrate/identity.ts';\nimport type { EngineEvent } from '../substrate/events.ts';\nimport type { SubscribableState } from '../substrate/projection.ts';\nimport { makeProjectionRef } from '../substrate/runtime/projection/index.ts';\nimport { buildSubstrateLayers, superviseStackEffect } from '../substrate/runtime/run.ts';\nimport {\n\tbuildProductionOrchestratorSinks,\n\tbuildProductionPostAcquireHook,\n\tlayerProductionOrchestrators,\n\ttype ProductionCodegenOptions,\n} from '../orchestrators/runtime-composition.ts';\nimport {\n\textendBuiltInPluginContext,\n\tlayerBuiltInPluginRuntime,\n} from '../runtime/built-in-plugin-layers.ts';\nimport { readStackEngine, type Stack } from './define-devstack.ts';\nimport type { AnyPlugin } from '../substrate/plugin.ts';\nimport { resolveAppName, resolveStackName } from './inference-network.ts';\n\n// -----------------------------------------------------------------------------\n// Public types\n// -----------------------------------------------------------------------------\n\n/** Identity overrides for `runStack`. App and stack fall back through\n * shared package metadata inference after their env overrides. */\nexport interface RunStackIdentityOptions {\n\treadonly app?: string;\n\treadonly stack?: string;\n\treadonly network?: string;\n}\n\nexport interface RunStackOptions {\n\t/** Identity overrides — falls back to env + library defaults. */\n\treadonly identity?: RunStackIdentityOptions;\n\t/** User application root. Codegen defaults to `<appRoot>/src/generated`.\n\t * Defaults to `process.cwd()`. */\n\treadonly appRoot?: string;\n\t/** Codegen output overrides for embedded tests or custom app layout. */\n\treadonly codegen?: Omit<ProductionCodegenOptions, 'appRoot'>;\n\t/** Filesystem root under which the substrate stores per-stack\n\t * artifacts (cache, snapshots, manifest, projection, etc.).\n\t * Defaults to `$DEVSTACK_STATE_DIR` then `<cwd>/.devstack`. */\n\treadonly runtimeRoot?: string;\n\t/** Extra Layer composition. Reserved for plugin-author overlays\n\t * (e.g. custom `CapabilitySinks`, Logger) per ARCHITECTURE.md\n\t * § Plugin-author extension via Layer composition. */\n\treadonly layers?: Layer.Layer<never>;\n}\n\n/** Boot error surfaced by `RunHandle.start`. Wraps the supervisor's\n * startup failure tree for cascade-formatter rendering. */\nexport interface BootError {\n\treadonly _tag: 'BootError';\n\treadonly cause: Cause.Cause<unknown>;\n}\n\n/** Programmatic handle. Symmetric with the attached CLI surface:\n * `events`, `state`, and `awaitShutdown` are the same primitives the\n * TUI consumes in-process. */\nexport interface RunHandle {\n\t/** Boot the supervisor and resolve when every plugin reaches\n\t * `ready`. Fails with `BootError` if any plugin's acquire path\n\t * fails. */\n\treadonly start: Effect.Effect<void, BootError, never>;\n\t/** Trigger graceful shutdown: enqueues `shutdown.requested` onto\n\t * the supervisor's command channel, then awaits the fiber. */\n\treadonly stop: Effect.Effect<void, never, never>;\n\t/** Resolve when the supervisor fiber exits. Always succeeds — any\n\t * errors surface via `start`. */\n\treadonly awaitShutdown: Effect.Effect<void, never, never>;\n\t/** Tail of typed engine events from the supervisor's hub. The\n\t * upstream is a `Queue.Dequeue`; consume via `Stream.run...`. */\n\treadonly events: Stream.Stream<EngineEvent, never, never>;\n\t/** The supervisor's live projection. Renderers + tests read this\n\t * directly; changes flow through `SubscriptionRef.changes`. */\n\treadonly state: SubscriptionRef.SubscriptionRef<SubscribableState>;\n}\n\n// -----------------------------------------------------------------------------\n// Identity resolution\n// -----------------------------------------------------------------------------\n\nconst resolveIdentity = (\n\tstack: Stack<ReadonlyArray<AnyPlugin>>,\n\topts: RunStackIdentityOptions | undefined,\n\tcwd: string,\n): Identity => {\n\tconst app = resolveAppName({\n\t\texplicit: opts?.app,\n\t\tcwd,\n\t});\n\tconst stackNameStr = resolveStackName({\n\t\texplicit: opts?.stack ?? stack.options.stackName,\n\t\tcwd,\n\t});\n\tconst network = opts?.network ?? process.env.DEVSTACK_NETWORK ?? 'sui:local';\n\treturn {\n\t\tapp: appName(app),\n\t\tstack: stackName(stackNameStr),\n\t\tchain: chainId(network),\n\t};\n};\n\nconst resolveRuntimeRoot = (override: string | undefined): string => {\n\tif (override !== undefined) return override;\n\tconst envRoot = process.env.DEVSTACK_STATE_DIR;\n\tif (envRoot !== undefined && envRoot.length > 0) return envRoot;\n\treturn `${process.cwd()}/.devstack`;\n};\n\nconst toBootError = (cause: Cause.Cause<unknown>): BootError => ({\n\t_tag: 'BootError',\n\tcause,\n});\n\n// -----------------------------------------------------------------------------\n// runStack\n// -----------------------------------------------------------------------------\n\n/**\n * Boot a `Stack` for programmatic embedding. Returns a `RunHandle`\n * synchronously; the supervisor fiber is forked on `start`.\n *\n * Lifecycle:\n *\n * 1. `runStack(stack, opts)` — synchronous; no fiber forked yet.\n * 2. `await Effect.runPromise(handle.start)` — forks the supervisor,\n * blocks until every plugin reaches `ready` (or fails with\n * `BootError`).\n * 3. Use `handle.events` / `handle.state` to observe.\n * 4. `await Effect.runPromise(handle.stop)` — graceful shutdown.\n * 5. `handle.awaitShutdown` resolves once finalizers complete.\n *\n * Internal architecture: the handle stores a `Deferred` for boot\n * completion. The supervised body forks a watcher fiber over the\n * registry's `awaitReady` per node; once every node is `ready` (or one\n * fails) the deferred completes. `start` awaits it.\n */\nexport const runStack = (\n\tstack: Stack<ReadonlyArray<AnyPlugin>>,\n\topts: RunStackOptions = {},\n): RunHandle => {\n\tconst engineStack = readStackEngine(stack);\n\tconst runtimeRoot = resolveRuntimeRoot(opts.runtimeRoot);\n\tconst appRoot = opts.appRoot ?? process.cwd();\n\tconst identity = resolveIdentity(stack, opts.identity, appRoot);\n\tconst codegen = opts.codegen ?? engineStack.options.codegen;\n\n\tconst supervisedStack = {\n\t\t_tag: 'Stack' as const,\n\t\tmembers: engineStack.members,\n\t\toptions: engineStack.options,\n\t};\n\n\t// State + handle slots are created at `runStack(...)` time so the\n\t// caller can subscribe to `state.changes` BEFORE `start` runs.\n\t// `SubscriptionRef.make` and `Deferred.make` are both sync-effects\n\t// (no side-effects, no async); `Effect.runSync` is safe here.\n\tconst state = Effect.runSync(makeProjectionRef());\n\tconst bootDeferred = Effect.runSync(Deferred.make<void, BootError>());\n\tconst stopRequested = Effect.runSync(Deferred.make<void>());\n\tconst eventQueueRef = Effect.runSync(Deferred.make<Queue.Dequeue<EngineEvent>>());\n\tconst fiberRef = Effect.runSync(Deferred.make<Fiber.Fiber<void, never>>());\n\n\tconst substrate = layerProductionOrchestrators({\n\t\tcodegen: {\n\t\t\tappRoot,\n\t\t\toutputDir: codegen?.outputDir,\n\t\t\tstackSubdir: codegen?.stackSubdir ?? null,\n\t\t},\n\t}).pipe(Layer.provideMerge(buildSubstrateLayers(identity, runtimeRoot)));\n\n\tconst supervised = Effect.gen(function* () {\n\t\tconst orchestratorSinks = yield* buildProductionOrchestratorSinks();\n\t\tconst postAcquireHook = yield* buildProductionPostAcquireHook({ extras: stack.options.extras });\n\t\tyield* superviseStackEffect(supervisedStack, identity, state, {\n\t\t\torchestratorSinks,\n\t\t\tpostAcquireHook,\n\t\t\textendContext: extendBuiltInPluginContext,\n\t\t\twithinScope: (handle) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tyield* Deferred.succeed(eventQueueRef, handle.events);\n\n\t\t\t\t\t// Watch every plugin for `ready`; resolve `bootDeferred` once\n\t\t\t\t\t// every node has reached ready (or one fails). The\n\t\t\t\t\t// `awaitReady` callbacks resolve from the per-plugin\n\t\t\t\t\t// ready-gates the registry holds — see supervisor §\n\t\t\t\t\t// \"ready-gate awaits its acquire effect\".\n\t\t\t\t\t// Both forks tie to the surrounding scope (the supervised\n\t\t\t\t\t// scope inside superviseStackEffect). When the supervisor\n\t\t\t\t\t// scope closes — either via graceful shutdown or interrupt\n\t\t\t\t\t// — these fibers are torn down with it.\n\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\tconst exits = yield* Effect.forEach(\n\t\t\t\t\t\t\t\thandle.graph.nodes,\n\t\t\t\t\t\t\t\t([key]) => handle.registry.awaitReady(key).pipe(Effect.exit),\n\t\t\t\t\t\t\t\t{ concurrency: 'unbounded' },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst firstFailure = exits.find(Exit.isFailure);\n\t\t\t\t\t\t\tif (firstFailure === undefined) {\n\t\t\t\t\t\t\t\tyield* Deferred.succeed(bootDeferred, undefined);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tyield* Deferred.fail(bootDeferred, toBootError(firstFailure.cause));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\n\t\t\t\t\t// Bridge `stop` requests onto the supervisor's command\n\t\t\t\t\t// channel. The supervisor's command loop treats\n\t\t\t\t\t// `shutdown.requested` as the graceful-shutdown signal.\n\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\tyield* Deferred.await(stopRequested);\n\t\t\t\t\t\t\tyield* Queue.offer(handle.commands, {\n\t\t\t\t\t\t\t\ttag: 'shutdown.requested',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t}).pipe(Effect.provide(layerBuiltInPluginRuntime(orchestratorSinks)));\n\t});\n\n\tconst loggerLayer = Logger.layer([]);\n\tconst layered =\n\t\topts.layers === undefined\n\t\t\t? supervised.pipe(Effect.provide(substrate), Effect.provide(loggerLayer))\n\t\t\t: supervised.pipe(\n\t\t\t\t\tEffect.provide(substrate),\n\t\t\t\t\tEffect.provide(loggerLayer),\n\t\t\t\t\tEffect.provide(opts.layers),\n\t\t\t\t);\n\n\t// Convert any uncaught cause into a boot failure if the deferred\n\t// hasn't completed. The cause is preserved via the fiber's exit for\n\t// `awaitShutdown` consumers that need to inspect it.\n\tconst supervisedProgram: Effect.Effect<void, never, never> = layered.pipe(\n\t\tEffect.catchCause((cause) =>\n\t\t\tDeferred.fail(bootDeferred, toBootError(cause)).pipe(\n\t\t\t\tEffect.asVoid,\n\t\t\t\tEffect.catch(() => Effect.void),\n\t\t\t),\n\t\t),\n\t);\n\n\tconst start: Effect.Effect<void, BootError, never> = Effect.gen(function* () {\n\t\tconst alreadyStarted = yield* Deferred.isDone(fiberRef);\n\t\tif (!alreadyStarted) {\n\t\t\t// `forkDetach` (v4 spelling of v3's `forkDaemon`) decouples the\n\t\t\t// supervisor fiber from the `start` fiber's scope. `forkChild`\n\t\t\t// would tie the supervisor to whatever fiber runs `start`, and\n\t\t\t// once `start` resolves (after `bootDeferred` succeeds) the\n\t\t\t// runtime would interrupt the supervisor — transitioning every\n\t\t\t// plugin `ready → stopping → stopped` before the caller can\n\t\t\t// read post-ready state or call `handle.stop`. The handle's\n\t\t\t// explicit `stop` + `awaitShutdown` paths are the only\n\t\t\t// shutdown signals; the captured `Fiber` reference is how the\n\t\t\t// daemon stays releasable.\n\t\t\tconst fiber = yield* Effect.forkDetach(supervisedProgram);\n\t\t\tyield* Deferred.succeed(fiberRef, fiber);\n\t\t}\n\t\tyield* Deferred.await(bootDeferred);\n\t});\n\n\tconst stop: Effect.Effect<void, never, never> = Effect.gen(function* () {\n\t\tyield* Deferred.succeed(stopRequested, undefined).pipe(Effect.catch(() => Effect.void));\n\t\tconst alreadyStarted = yield* Deferred.isDone(fiberRef);\n\t\tif (!alreadyStarted) {\n\t\t\treturn;\n\t\t}\n\t\tconst fiber = yield* Deferred.await(fiberRef);\n\t\t// `Fiber.await` returns an `Exit` without raising — handles both\n\t\t// success and interrupt-cause cases (the supervisor's\n\t\t// graceful-shutdown path closes the scope, which surfaces as an\n\t\t// interrupt cause if the fiber was mid-await on the latch poll).\n\t\tyield* Fiber.await(fiber);\n\t});\n\n\tconst awaitShutdown: Effect.Effect<void, never, never> = Effect.gen(function* () {\n\t\tconst alreadyStarted = yield* Deferred.isDone(fiberRef);\n\t\tif (!alreadyStarted) {\n\t\t\treturn;\n\t\t}\n\t\tconst fiber = yield* Deferred.await(fiberRef);\n\t\tyield* Fiber.await(fiber);\n\t});\n\n\tconst events: Stream.Stream<EngineEvent, never, never> = Stream.unwrap(\n\t\tEffect.gen(function* () {\n\t\t\tconst queue = yield* Deferred.await(eventQueueRef);\n\t\t\treturn Stream.fromQueue(queue);\n\t\t}),\n\t);\n\n\treturn {\n\t\tstart,\n\t\tstop,\n\t\tawaitShutdown,\n\t\tevents,\n\t\tstate,\n\t};\n};\n"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"run-stack.mjs","names":[],"sources":["../../src/api/run-stack.ts"],"sourcesContent":["// `runStack(stack, opts?)` — top-level programmatic embedding.\n//\n// `defineDevstack(...)` returns a static `Stack<Members>` manifest with\n// no runnable surface. Library consumers (vitest setup, custom hosts,\n// Effect-native apps, embedded fixtures) would otherwise have to\n// re-implement `cli/wirings/up.ts:runUpLive`'s substrate Layer composition.\n// `runStack` is the single embedder seam — it consumes the same\n// `orchestrators/runtime-composition.ts` helper the CLI consumes. See\n// ARCHITECTURE.md §\"Layer composition lives at L3, not L0\".\n//\n// Shape:\n//\n// ```ts\n// const stack = defineDevstack(...);\n// const handle = runStack(stack, { runtimeRoot: '/tmp/devstack' });\n// await Effect.runPromise(handle.start);\n// // ... interact ...\n// await Effect.runPromise(handle.stop);\n// await Effect.runPromise(handle.awaitShutdown);\n// ```\n//\n// `start` resolves when every plugin has reached `ready` (or when one\n// fails to acquire — `start` then fails with `BootError`). `stop`\n// triggers graceful shutdown; `awaitShutdown` resolves when the fiber\n// finishes its scope finalizers.\n\nimport {\n\tCause,\n\tContext,\n\tDeferred,\n\tEffect,\n\tExit,\n\tFiber,\n\tLayer,\n\tLogger,\n\tQueue,\n\tRef,\n\tScope,\n\tStream,\n\tSubscriptionRef,\n} from 'effect';\n\nimport { appName, chainId, stackName } from '../substrate/brand.ts';\nimport type { Identity } from '../substrate/identity.ts';\nimport type { EngineEvent } from '../substrate/events.ts';\nimport type { SubscribableState } from '../substrate/projection.ts';\nimport { CapabilitySinksService } from '../substrate/runtime/capability-sinks/index.ts';\nimport { makeProjectionRefSync } from '../substrate/runtime/index.ts';\nimport { buildSubstrateLayers, superviseStackEffect } from '../orchestrators/run.ts';\nimport {\n\tbuildProductionOrchestratorSinks,\n\tbuildProductionPostAcquireHook,\n\tlayerProductionOrchestrators,\n\ttype ProductionCodegenOptions,\n} from '../orchestrators/runtime-composition.ts';\nimport { resolveCodegenOutput } from '../orchestrators/codegen/output-location.ts';\nimport {\n\textendBuiltInPluginContext,\n\tlayerBuiltInPluginRuntime,\n} from '../orchestrators/built-in-plugin-layers.ts';\nimport { readStackEngine, type Stack } from './define-devstack.ts';\nimport type { AnyPlugin } from '../substrate/plugin.ts';\nimport {\n\tresolveAppName,\n\tresolveNetworkSync,\n\tresolveStackName,\n\tresolveStateDir,\n} from './inference-network.ts';\n\n// -----------------------------------------------------------------------------\n// Public types\n// -----------------------------------------------------------------------------\n\n/** Identity overrides for `runStack`. App and stack fall back through\n * shared package metadata inference after their env overrides. */\nexport interface RunStackIdentityOptions {\n\treadonly app?: string;\n\treadonly stack?: string;\n\treadonly network?: string;\n}\n\nexport interface RunStackOptions {\n\t/** Identity overrides — falls back to env + library defaults. */\n\treadonly identity?: RunStackIdentityOptions;\n\t/** User application root. Codegen defaults to `<appRoot>/src/generated`.\n\t * Defaults to `process.cwd()`. */\n\treadonly appRoot?: string;\n\t/** Codegen output overrides for embedded tests or custom app layout. */\n\treadonly codegen?: Omit<ProductionCodegenOptions, 'appRoot'>;\n\t/** Filesystem root under which the substrate stores per-stack\n\t * artifacts (cache, snapshots, manifest, projection, etc.).\n\t * Precedence: `runtimeRoot` > `stateDir` (this option or\n\t * `DevstackOptions.stateDir` on the stack) > `$DEVSTACK_STATE_DIR`\n\t * > `<cwd>/.devstack`. */\n\treadonly runtimeRoot?: string;\n\t/** Sibling of `runtimeRoot` — the `DevstackOptions.stateDir` field\n\t * threaded through `runStack` so a stack-level default can be\n\t * overridden per-embedding without forcing every call site to\n\t * flip between `runtimeRoot` and `stateDir`. Same semantics as\n\t * `runtimeRoot`; lower precedence. */\n\treadonly stateDir?: string;\n\t/** Extend the plugin execution context after built-in plugin\n\t * services are installed. Use this for custom plugin-author\n\t * services, capability sinks, or logger overrides. */\n\treadonly extendContext?: (\n\t\tctx: Context.Context<never>,\n\t) => Effect.Effect<Context.Context<never>, never, Scope.Scope | CapabilitySinksService>;\n}\n\n/** Boot error surfaced by `RunHandle.start`. Wraps the supervisor's\n * startup failure tree for cascade-formatter rendering. */\nexport interface BootError {\n\treadonly _tag: 'BootError';\n\treadonly cause: Cause.Cause<unknown>;\n}\n\n/** Programmatic handle. Symmetric with the attached CLI surface:\n * `events`, `state`, and `awaitShutdown` are the same primitives the\n * TUI consumes in-process. */\nexport interface RunHandle {\n\t/** Boot the supervisor and resolve when every plugin reaches\n\t * `ready`. Fails with `BootError` if any plugin's acquire path\n\t * fails. */\n\treadonly start: Effect.Effect<void, BootError, never>;\n\t/** Trigger graceful shutdown: enqueues `shutdown.requested` onto\n\t * the supervisor's command channel, then awaits the fiber. */\n\treadonly stop: Effect.Effect<void, never, never>;\n\t/** Resolve when the supervisor fiber exits. Succeeds on a clean\n\t * shutdown; fails with the captured `Cause` if the supervisor died\n\t * mid-run after boot completed (e.g. a plugin scope finalizer\n\t * defect). Boot-time failures still surface via `start`. */\n\treadonly awaitShutdown: Effect.Effect<void, unknown, never>;\n\t/** Tail of typed engine events from the supervisor's hub. The\n\t * upstream is a `Queue.Dequeue`; consume via `Stream.run...`. */\n\treadonly events: Stream.Stream<EngineEvent, never, never>;\n\t/** The supervisor's live projection. Renderers + tests read this\n\t * directly; changes flow through `SubscriptionRef.changes`. */\n\treadonly state: SubscriptionRef.SubscriptionRef<SubscribableState>;\n}\n\n// -----------------------------------------------------------------------------\n// Identity resolution\n// -----------------------------------------------------------------------------\n\nconst resolveIdentity = (\n\tstack: Stack<ReadonlyArray<AnyPlugin>>,\n\topts: RunStackIdentityOptions | undefined,\n\tcwd: string,\n): Identity => {\n\tconst app = resolveAppName({\n\t\texplicit: opts?.app,\n\t\tcwd,\n\t});\n\tconst stackNameStr = resolveStackName({\n\t\texplicit: opts?.stack ?? stack.options.stackName,\n\t\tcwd,\n\t});\n\t// Parse + validate up-front so a malformed value fails here rather\n\t// than downstream when a plugin probes the chain id. We keep the\n\t// raw input string (`'sui:local'`, `'sui:testnet'`, …) for the\n\t// chain-id brand so existing on-disk cache namespaces and plugin\n\t// equality checks (`chain === 'sui:testnet'`) remain stable.\n\tconst resolved = resolveNetworkSync({\n\t\texplicit: opts?.network,\n\t\tenv: process.env.DEVSTACK_NETWORK,\n\t\texplicitSource: 'runStack({ identity.network })',\n\t});\n\treturn {\n\t\tapp: appName(app),\n\t\tstack: stackName(stackNameStr),\n\t\tchain: chainId(resolved.raw),\n\t};\n};\n\nconst toBootError = (cause: Cause.Cause<unknown>): BootError => ({\n\t_tag: 'BootError',\n\tcause,\n});\n\n// -----------------------------------------------------------------------------\n// runStack\n// -----------------------------------------------------------------------------\n\n/**\n * Boot a `Stack` for programmatic embedding. Returns a `RunHandle`\n * synchronously; the supervisor fiber is forked on `start`.\n *\n * Lifecycle:\n *\n * 1. `runStack(stack, opts)` — synchronous; no fiber forked yet.\n * 2. `await Effect.runPromise(handle.start)` — forks the supervisor,\n * blocks until every plugin reaches `ready` (or fails with\n * `BootError`).\n * 3. Use `handle.events` / `handle.state` to observe.\n * 4. `await Effect.runPromise(handle.stop)` — graceful shutdown.\n * 5. `handle.awaitShutdown` resolves once finalizers complete.\n *\n * Internal architecture: the handle stores a `Deferred` for boot\n * completion. The supervised body forks a watcher fiber over the\n * registry's `awaitReady` per node; once every node is `ready` (or one\n * fails) the deferred completes. `start` awaits it.\n */\nexport const runStack = (\n\tstack: Stack<ReadonlyArray<AnyPlugin>>,\n\topts: RunStackOptions = {},\n): RunHandle => {\n\tconst engineStack = readStackEngine(stack);\n\tconst runtimeRoot = resolveStateDir({\n\t\truntimeRoot: opts.runtimeRoot,\n\t\tstateDir: opts.stateDir ?? engineStack.options.stateDir,\n\t\tenv: process.env.DEVSTACK_STATE_DIR,\n\t\tcwd: process.cwd(),\n\t});\n\tconst appRoot = opts.appRoot ?? process.cwd();\n\tconst identity = resolveIdentity(stack, opts.identity, appRoot);\n\tconst codegen = opts.codegen ?? engineStack.options.codegen;\n\n\tconst supervisedStack = {\n\t\t_tag: 'Stack' as const,\n\t\tmembers: engineStack.members,\n\t\toptions: engineStack.options,\n\t};\n\n\t// State + handle slots are created at `runStack(...)` time so the\n\t// caller can subscribe to `state.changes` BEFORE `start` runs.\n\t// `Deferred.make` is sync-effect (no side-effects, no async);\n\t// `Effect.runSync` is safe for it. The projection ref is allocated\n\t// via the explicit `makeProjectionRefSync` so the sync contract is\n\t// pinned at the substrate constructor — if `makeProjectionRef`\n\t// ever picks up an async/Layer wrapper (`withSpan`, annotation),\n\t// `makeProjectionRefSync` must remain sync-only or be replaced by\n\t// a Deferred-handoff seam at this boot-time call site.\n\tconst state = makeProjectionRefSync();\n\tconst bootDeferred = Effect.runSync(Deferred.make<void, BootError>());\n\tconst stopRequested = Effect.runSync(Deferred.make<void>());\n\tconst eventQueueRef = Effect.runSync(Deferred.make<Queue.Dequeue<EngineEvent>>());\n\tconst fiberRef = Effect.runSync(Deferred.make<Fiber.Fiber<void, never>>());\n\tconst startClaim = Effect.runSync(Ref.make(false));\n\t// Tee for mid-run defects/failures. `Deferred.fail(bootDeferred, …)`\n\t// below is a no-op once `bootDeferred` has succeeded (post-boot), so\n\t// without this sibling ref a late scope-finalizer defect would\n\t// otherwise leave the supervised fiber exiting `Success(void)` and\n\t// `awaitShutdown` resolving clean — the operator would have no\n\t// signal. `awaitShutdown` re-raises whatever this ref captured.\n\tconst midRunCauseRef = Effect.runSync(Ref.make<Cause.Cause<unknown> | null>(null));\n\n\t// Resolve the per-stack codegen output location: home run (effective\n\t// stack === config `stackName`) → `src/generated/`; a non-home\n\t// embedding → `.devstack/stacks/<stack>/generated/`. An explicit\n\t// `opts.codegen.outputDir` (or the stack's own\n\t// `codegen.outputDir`) is honored verbatim by the resolver. Both the\n\t// home stack (`engineStack.options.stackName`) and the effective\n\t// stack (the resolved `identity.stack`) are in scope here, mirroring\n\t// the CLI's `buildVerbLayers` seam.\n\tconst codegenOutput = resolveCodegenOutput({\n\t\tappRoot,\n\t\teffectiveStack: String(identity.stack),\n\t\thomeStack: engineStack.options.stackName,\n\t\texplicitOutputDir: codegen?.outputDir,\n\t\texplicitStackSubdir: codegen?.stackSubdir ?? null,\n\t});\n\tconst substrate = layerProductionOrchestrators({\n\t\tcodegen: {\n\t\t\tappRoot,\n\t\t\toutputDir: codegenOutput.outputDir,\n\t\t\tstackSubdir: codegenOutput.stackSubdir,\n\t\t},\n\t}).pipe(Layer.provideMerge(buildSubstrateLayers(identity, runtimeRoot)));\n\n\tconst supervised = Effect.gen(function* () {\n\t\tconst orchestratorSinks = yield* buildProductionOrchestratorSinks();\n\t\tconst postAcquireHook = yield* buildProductionPostAcquireHook({ extras: stack.options.extras });\n\t\tyield* superviseStackEffect(supervisedStack, identity, state, {\n\t\t\torchestratorSinks,\n\t\t\tpostAcquireHook,\n\t\t\textendContext: (ctx) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tconst builtInContext = yield* extendBuiltInPluginContext(ctx);\n\t\t\t\t\treturn opts.extendContext === undefined\n\t\t\t\t\t\t? builtInContext\n\t\t\t\t\t\t: yield* opts.extendContext(builtInContext);\n\t\t\t\t}),\n\t\t\tbeforeInitialAcquire: (handle) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tyield* Deferred.succeed(eventQueueRef, handle.events).pipe(\n\t\t\t\t\t\tEffect.catch(() => Effect.void),\n\t\t\t\t\t);\n\n\t\t\t\t\t// Bridge `stop` requests onto the supervisor's command\n\t\t\t\t\t// channel before acquire starts so a boot failure cannot\n\t\t\t\t\t// leave the public handle without an event/command bridge.\n\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\tyield* Deferred.await(stopRequested);\n\t\t\t\t\t\t\tyield* Queue.offer(handle.commands, {\n\t\t\t\t\t\t\t\ttag: 'shutdown.requested',\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t\twithinScope: (handle) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t// Watch every plugin for `ready`; resolve `bootDeferred` once\n\t\t\t\t\t// every node has reached ready (or one fails). The\n\t\t\t\t\t// `awaitReady` callbacks resolve from the per-plugin\n\t\t\t\t\t// ready-gates the registry holds — see supervisor §\n\t\t\t\t\t// \"ready-gate awaits its acquire effect\".\n\t\t\t\t\t// Both forks tie to the surrounding scope (the supervised\n\t\t\t\t\t// scope inside superviseStackEffect). When the supervisor\n\t\t\t\t\t// scope closes — either via graceful shutdown or interrupt\n\t\t\t\t\t// — these fibers are torn down with it.\n\t\t\t\t\tyield* Effect.forkScoped(\n\t\t\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\t\t\tconst exits = yield* Effect.forEach(\n\t\t\t\t\t\t\t\thandle.graph.nodes,\n\t\t\t\t\t\t\t\t([key]) => handle.registry.awaitReady(key).pipe(Effect.exit),\n\t\t\t\t\t\t\t\t{ concurrency: 'unbounded' },\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\tconst firstFailure = exits.find(Exit.isFailure);\n\t\t\t\t\t\t\tif (firstFailure === undefined) {\n\t\t\t\t\t\t\t\tyield* Deferred.succeed(bootDeferred, undefined);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tyield* Deferred.fail(bootDeferred, toBootError(firstFailure.cause));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}),\n\t\t\t\t\t);\n\t\t\t\t}),\n\t\t}).pipe(Effect.provide(layerBuiltInPluginRuntime(orchestratorSinks)));\n\t});\n\n\tconst loggerLayer = Logger.layer([]);\n\tconst layered = supervised.pipe(Effect.provide(substrate), Effect.provide(loggerLayer));\n\n\t// Convert any uncaught cause into a boot failure if the deferred\n\t// hasn't completed. If `bootDeferred` HAS already succeeded then\n\t// `Deferred.fail` is a no-op — the cause is a mid-run failure\n\t// (e.g. a plugin scope finalizer defect) and would otherwise be\n\t// silently dropped: the fiber exits `Success(void)` and\n\t// `awaitShutdown` resolves clean. Tee the cause into\n\t// `midRunCauseRef` so `awaitShutdown` can re-surface it, AND emit\n\t// `Effect.logError(Cause.pretty(cause))` so observability stays\n\t// loud regardless of whether anyone awaits. Boot failures (still in\n\t// the bootDeferred-pending window) only surface via `start`, not\n\t// here — we'd otherwise re-raise them on `awaitShutdown` after\n\t// `start` already rejected.\n\tconst supervisedProgram: Effect.Effect<void, never, never> = layered.pipe(\n\t\tEffect.catchCause((cause) =>\n\t\t\tEffect.gen(function* () {\n\t\t\t\tconst bootAlreadyCompleted = yield* Deferred.isDone(bootDeferred);\n\t\t\t\tyield* Deferred.fail(bootDeferred, toBootError(cause)).pipe(\n\t\t\t\t\tEffect.asVoid,\n\t\t\t\t\tEffect.catch(() => Effect.void),\n\t\t\t\t);\n\t\t\t\tif (bootAlreadyCompleted) {\n\t\t\t\t\tyield* Ref.set(midRunCauseRef, cause);\n\t\t\t\t}\n\t\t\t\tyield* Effect.logError(`devstack runStack: supervisor died\\n${Cause.pretty(cause)}`);\n\t\t\t}),\n\t\t),\n\t);\n\n\tconst start: Effect.Effect<void, BootError, never> = Effect.uninterruptibleMask((restore) =>\n\t\tEffect.gen(function* () {\n\t\t\tconst shouldStart = yield* Ref.modify(startClaim, (started) =>\n\t\t\t\tstarted ? [false, true] : [true, true],\n\t\t\t);\n\t\t\tif (shouldStart) {\n\t\t\t\t// `forkDetach` (v4 spelling of v3's `forkDaemon`) decouples the\n\t\t\t\t// supervisor fiber from the `start` fiber's scope. `forkChild`\n\t\t\t\t// would tie the supervisor to whatever fiber runs `start`, and\n\t\t\t\t// once `start` resolves (after `bootDeferred` succeeds) the\n\t\t\t\t// runtime would interrupt the supervisor — transitioning every\n\t\t\t\t// plugin `ready → stopping → stopped` before the caller can\n\t\t\t\t// read post-ready state or call `handle.stop`. The handle's\n\t\t\t\t// explicit `stop` + `awaitShutdown` paths are the only\n\t\t\t\t// shutdown signals; the captured `Fiber` reference is how the\n\t\t\t\t// daemon stays releasable.\n\t\t\t\tconst fiber = yield* Effect.forkDetach(supervisedProgram);\n\t\t\t\tyield* Deferred.succeed(fiberRef, fiber);\n\t\t\t}\n\t\t\tyield* restore(Deferred.await(bootDeferred));\n\t\t}),\n\t);\n\n\tconst stop: Effect.Effect<void, never, never> = Effect.gen(function* () {\n\t\tyield* Deferred.succeed(stopRequested, undefined).pipe(Effect.catch(() => Effect.void));\n\t\tconst alreadyStarted = yield* Deferred.isDone(fiberRef);\n\t\tif (!alreadyStarted) {\n\t\t\treturn;\n\t\t}\n\t\tconst fiber = yield* Deferred.await(fiberRef);\n\t\t// `Fiber.await` returns an `Exit` without raising — handles both\n\t\t// success and interrupt-cause cases (the supervisor's\n\t\t// graceful-shutdown path closes the scope, which surfaces as an\n\t\t// interrupt cause if the fiber was mid-await on the latch poll).\n\t\tyield* Fiber.await(fiber);\n\t});\n\n\tconst awaitShutdown: Effect.Effect<void, unknown, never> = Effect.gen(function* () {\n\t\tconst alreadyStarted = yield* Deferred.isDone(fiberRef);\n\t\tif (!alreadyStarted) {\n\t\t\treturn;\n\t\t}\n\t\tconst fiber = yield* Deferred.await(fiberRef);\n\t\tyield* Fiber.await(fiber);\n\t\t// Re-surface any mid-run defect/failure captured by the\n\t\t// supervised body's `catchCause` (boot failures are already\n\t\t// surfaced via `start`). Without this re-raise a plugin scope\n\t\t// finalizer defect would silently drop and operators get no\n\t\t// signal — see the comment on `midRunCauseRef` above.\n\t\tconst midRunCause = yield* Ref.get(midRunCauseRef);\n\t\tif (midRunCause !== null) {\n\t\t\treturn yield* Effect.failCause(midRunCause);\n\t\t}\n\t});\n\n\tconst events: Stream.Stream<EngineEvent, never, never> = Stream.unwrap(\n\t\tEffect.gen(function* () {\n\t\t\tconst queue = yield* Deferred.await(eventQueueRef);\n\t\t\treturn Stream.fromQueue(queue);\n\t\t}),\n\t);\n\n\treturn {\n\t\tstart,\n\t\tstop,\n\t\tawaitShutdown,\n\t\tevents,\n\t\tstate,\n\t};\n};\n"],"mappings":"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"}
|
|
@@ -2,6 +2,7 @@ import { ResolveStackContextOptions } from "./stack-context.mjs";
|
|
|
2
2
|
|
|
3
3
|
//#region src/build-integrations/playwright/config.d.ts
|
|
4
4
|
type PlaywrightReporterShape = [string] | [string, Record<string, unknown>];
|
|
5
|
+
type PlaywrightGlobalSetupShape = string | string[];
|
|
5
6
|
/** Base subset of `PlaywrightTestConfig` this surface produces. The
|
|
6
7
|
* full type lives in `@playwright/test`; we keep this structural so
|
|
7
8
|
* the helpers compile without the peer. */
|
|
@@ -12,7 +13,7 @@ interface PlaywrightBaseConfigShape {
|
|
|
12
13
|
readonly retries: number;
|
|
13
14
|
readonly workers: number;
|
|
14
15
|
readonly reporter: PlaywrightReporterShape[] | string;
|
|
15
|
-
readonly globalSetup?:
|
|
16
|
+
readonly globalSetup?: PlaywrightGlobalSetupShape;
|
|
16
17
|
readonly globalTeardown?: string;
|
|
17
18
|
}
|
|
18
19
|
type PlaywrightUseConfigShape = {
|
|
@@ -40,9 +41,10 @@ interface PlaywrightWebServerConfigShape {
|
|
|
40
41
|
interface DevstackPlaywrightBaseConfigOptions {
|
|
41
42
|
/** Test directory. Default: `'./e2e'` (architecture invariant). */
|
|
42
43
|
readonly testDir?: string;
|
|
43
|
-
/** Path to a global-setup module. Default:
|
|
44
|
-
*
|
|
45
|
-
|
|
44
|
+
/** Path to a global-setup module. Default: the devstack setup that
|
|
45
|
+
* waits for post-acquire codegen before specs load the app. Pass
|
|
46
|
+
* `null` to keep the property omitted when composing conditionally. */
|
|
47
|
+
readonly globalSetup?: PlaywrightGlobalSetupShape | null;
|
|
46
48
|
}
|
|
47
49
|
interface DevstackPlaywrightEndpointOptions extends ResolveStackContextOptions {
|
|
48
50
|
/** Endpoint name whose URL becomes `webServer.url` + `use.baseURL`.
|
|
@@ -1,10 +1,12 @@
|
|
|
1
|
+
import { BUILT_IN_ENDPOINT_ALIASES } from "../runtime/conventional-routes.mjs";
|
|
1
2
|
import { resolveEndpointUrl } from "./stack-context.mjs";
|
|
2
3
|
//#region src/build-integrations/playwright/config.ts
|
|
4
|
+
const DEFAULT_GLOBAL_SETUP = "@mysten-incubation/devstack/playwright/global-setup";
|
|
3
5
|
const DEFAULT_TEST_DIR = "./e2e";
|
|
4
6
|
const DEFAULT_COMMAND = "pnpm dev";
|
|
5
7
|
const DEFAULT_WEBSERVER_TIMEOUT_MS = 3e5;
|
|
6
8
|
const DEFAULT_GRACEFUL_SHUTDOWN_MS = 1e4;
|
|
7
|
-
const DEFAULT_ENDPOINT_NAME =
|
|
9
|
+
const DEFAULT_ENDPOINT_NAME = BUILT_IN_ENDPOINT_ALIASES.app;
|
|
8
10
|
/**
|
|
9
11
|
* Resolve the browser app URL Playwright should target. This is the
|
|
10
12
|
* only helper here that may synchronously read the manifest; callers
|
|
@@ -29,14 +31,14 @@ const devstackPlaywrightBaseConfig = (options = {}) => {
|
|
|
29
31
|
retries: ci ? 2 : 0,
|
|
30
32
|
workers: 1,
|
|
31
33
|
reporter: ci ? [["github"], ["list"]] : "list",
|
|
32
|
-
globalSetup: options.globalSetup === null ? void 0 : options.globalSetup ??
|
|
34
|
+
globalSetup: options.globalSetup === null ? void 0 : options.globalSetup ?? DEFAULT_GLOBAL_SETUP
|
|
33
35
|
};
|
|
34
36
|
};
|
|
35
37
|
const devstackPlaywrightUse = (options = {}) => ({
|
|
36
38
|
baseURL: resolveDevstackPlaywrightBaseURL(options),
|
|
37
39
|
trace: options.trace ?? "on-first-retry",
|
|
38
40
|
screenshot: options.screenshot ?? "only-on-failure",
|
|
39
|
-
...options.use
|
|
41
|
+
...options.use
|
|
40
42
|
});
|
|
41
43
|
const devstackPlaywrightProjects = (options = {}) => [{
|
|
42
44
|
name: "chromium",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.mjs","names":[],"sources":["../../../src/build-integrations/playwright/config.ts"],"sourcesContent":["// Playwright config helpers.\n//\n// Architecture (distilled/23-build-integrations.md § Playwright /\n// \"What it produces\"):\n//\n// Composable pieces for a canonical `PlaywrightTestConfig`\n// (workers 1, fullyParallel false, `testDir: './e2e'`,\n// CI-aware reporter/retries/forbidOnly, graceful-shutdown wiring\n// with a SIGTERM + 10s timeout), plus `webServer` + `baseURL`\n// low-level resolvers.\n//\n// Load-bearing invariants this module enforces:\n// - `workers: 1` and `fullyParallel: false` — single supervisor per\n// stack; parallel tests would contend on shared faucet / wallet\n// / RPC (distilled § Invariants).\n// - `webServer.gracefulShutdown` SIGTERM + 10s — without this the\n// default SIGKILL-on-shell orphans vite + supervisor descendants\n// holding ports (distilled § Learnings: \"Graceful-shutdown wiring\n// at the Playwright layer fixed a real bug\").\n// - `webServer.url` settable at config-load time even with no\n// manifest — via cold-start fallback to a conventional URL.\n// - `webServer.reuseExistingServer: !CI` — dev iteration reuses,\n// CI always boots fresh.\n//\n// This module returns `PlaywrightTestConfig`-shaped fragments. We do\n// NOT import `@playwright/test` at module init: the types are\n// structural and we accept the optional-peer cost rather than\n// importing transitively from a build-integration that must be\n// loadable without `@playwright/test` (matching the Vitest helpers'\n// optional-peer pattern).\n\nimport { type ResolveStackContextOptions, resolveEndpointUrl } from './stack-context.ts';\n\n// -----------------------------------------------------------------------------\n// PlaywrightTestConfig shape (structural; we do NOT import the type\n// directly to keep `@playwright/test` an optional peer)\n// -----------------------------------------------------------------------------\n\ntype PlaywrightReporterShape = [string] | [string, Record<string, unknown>];\n\n/** Base subset of `PlaywrightTestConfig` this surface produces. The\n * full type lives in `@playwright/test`; we keep this structural so\n * the helpers compile without the peer. */\nexport interface PlaywrightBaseConfigShape {\n\treadonly testDir: string;\n\treadonly fullyParallel: boolean;\n\treadonly forbidOnly: boolean;\n\treadonly retries: number;\n\treadonly workers: number;\n\treadonly reporter: PlaywrightReporterShape[] | string;\n\treadonly globalSetup?: string;\n\treadonly globalTeardown?: string;\n}\n\nexport type PlaywrightUseConfigShape = {\n\treadonly baseURL: string;\n\treadonly trace: 'on-first-retry' | 'off' | 'retain-on-failure';\n\treadonly screenshot: 'only-on-failure' | 'off' | 'on';\n} & Record<string, unknown>;\n\nexport interface PlaywrightProjectShape {\n\tname: string;\n\tuse: Record<string, unknown>;\n}\n\nexport interface PlaywrightWebServerConfigShape {\n\treadonly command: string;\n\treadonly url: string;\n\treadonly reuseExistingServer: boolean;\n\treadonly timeout: number;\n\treadonly stdout: 'pipe' | 'ignore';\n\treadonly stderr: 'pipe' | 'ignore';\n\treadonly gracefulShutdown: { readonly signal: 'SIGTERM'; readonly timeout: number };\n\treadonly env?: Record<string, string>;\n}\n\n// -----------------------------------------------------------------------------\n// Public option shape\n// -----------------------------------------------------------------------------\n\nexport interface DevstackPlaywrightBaseConfigOptions {\n\t/** Test directory. Default: `'./e2e'` (architecture invariant). */\n\treadonly testDir?: string;\n\n\t/** Path to a global-setup module. Default: not wired. Pass `null`\n\t * to keep the property omitted when composing conditionally. */\n\treadonly globalSetup?: string | null;\n}\n\nexport interface DevstackPlaywrightEndpointOptions extends ResolveStackContextOptions {\n\t/** Endpoint name whose URL becomes `webServer.url` + `use.baseURL`.\n\t * Default: `'dev'` (the host-service dev server endpoint). */\n\treadonly endpointName?: string;\n\n\t/** Explicit baseURL override. When set, manifest discovery is\n\t * bypassed entirely. */\n\treadonly baseURL?: string;\n}\n\nexport interface DevstackPlaywrightWebServerOptions extends DevstackPlaywrightEndpointOptions {\n\t/** Command Playwright runs to bring up the stack. Default:\n\t * `'pnpm dev'`. */\n\treadonly command?: string;\n\n\t/** Hard cap (ms) for `webServer` URL to become reachable. Default:\n\t * 300_000 (5 min) — accounts for cold supervisor boot under\n\t * Docker pulls. */\n\treadonly webServerTimeoutMs?: number;\n\n\t/** Hard cap (ms) for `webServer.gracefulShutdown`. Default: 10_000\n\t * (10 s) — load-bearing per architecture § Invariants. */\n\treadonly gracefulShutdownTimeoutMs?: number;\n\n\t/** Extra env to forward to `webServer.command`. Merged after the\n\t * preset's own env (PLAYWRIGHT=1, DEVSTACK_STACK). */\n\treadonly env?: Record<string, string>;\n}\n\nexport interface DevstackPlaywrightProjectsOptions {\n\t/** Extra Playwright projects to append to the default Chromium\n\t * project. */\n\treadonly projects?: ReadonlyArray<PlaywrightProjectShape>;\n}\n\nexport interface DevstackPlaywrightUseOptions extends DevstackPlaywrightEndpointOptions {\n\treadonly trace?: PlaywrightUseConfigShape['trace'];\n\treadonly screenshot?: PlaywrightUseConfigShape['screenshot'];\n\treadonly use?: Omit<Partial<PlaywrightUseConfigShape>, 'baseURL'>;\n}\n\n// -----------------------------------------------------------------------------\n// Defaults\n// -----------------------------------------------------------------------------\n\nconst DEFAULT_TEST_DIR = './e2e';\nconst DEFAULT_COMMAND = 'pnpm dev';\nconst DEFAULT_WEBSERVER_TIMEOUT_MS = 300_000;\nconst DEFAULT_GRACEFUL_SHUTDOWN_MS = 10_000;\nconst DEFAULT_ENDPOINT_NAME = 'dev';\n\n// -----------------------------------------------------------------------------\n// Builders\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve the browser app URL Playwright should target. This is the\n * only helper here that may synchronously read the manifest; callers\n * can pass `baseURL` to bypass discovery entirely.\n */\nexport const resolveDevstackPlaywrightBaseURL = (\n\toptions: DevstackPlaywrightEndpointOptions = {},\n): string => {\n\tconst endpointName = options.endpointName ?? DEFAULT_ENDPOINT_NAME;\n\treturn (\n\t\toptions.baseURL ??\n\t\tresolveEndpointUrl(endpointName, {\n\t\t\t...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n\t\t\t...(options.manifestPath !== undefined ? { manifestPath: options.manifestPath } : {}),\n\t\t\t...(options.stack !== undefined ? { stack: options.stack } : {}),\n\t\t\t...(options.stateDir !== undefined ? { stateDir: options.stateDir } : {}),\n\t\t\t...(options.env !== undefined ? { env: options.env } : {}),\n\t\t}).url\n\t);\n};\n\nexport const devstackPlaywrightBaseConfig = (\n\toptions: DevstackPlaywrightBaseConfigOptions = {},\n): PlaywrightBaseConfigShape => {\n\tconst ci = Boolean(process.env.CI);\n\treturn {\n\t\ttestDir: options.testDir ?? DEFAULT_TEST_DIR,\n\t\tfullyParallel: false,\n\t\tforbidOnly: ci,\n\t\tretries: ci ? 2 : 0,\n\t\tworkers: 1,\n\t\treporter: ci ? [['github'], ['list']] : 'list',\n\t\tglobalSetup: options.globalSetup === null ? undefined : (options.globalSetup ?? undefined),\n\t};\n};\n\nexport const devstackPlaywrightUse = (\n\toptions: DevstackPlaywrightUseOptions = {},\n): PlaywrightUseConfigShape => ({\n\tbaseURL: resolveDevstackPlaywrightBaseURL(options),\n\ttrace: options.trace ?? 'on-first-retry',\n\tscreenshot: options.screenshot ?? 'only-on-failure',\n\t...(options.use ?? {}),\n});\n\nexport const devstackPlaywrightProjects = (\n\toptions: DevstackPlaywrightProjectsOptions = {},\n): PlaywrightProjectShape[] => [\n\t{\n\t\tname: 'chromium',\n\t\tuse: { browserName: 'chromium' },\n\t},\n\t...(options.projects ?? []),\n];\n\nexport const devstackPlaywrightWebServer = (\n\toptions: DevstackPlaywrightWebServerOptions = {},\n): PlaywrightWebServerConfigShape => {\n\tconst env = options.env ? { ...options.env } : {};\n\tconst ci = Boolean(process.env.CI);\n\tconst baseURL = resolveDevstackPlaywrightBaseURL(options);\n\tconst presetEnv: Record<string, string> = {\n\t\tPLAYWRIGHT: '1',\n\t\t...(options.stack !== undefined ? { DEVSTACK_STACK: options.stack } : {}),\n\t\t...env,\n\t};\n\n\treturn {\n\t\tcommand: options.command ?? DEFAULT_COMMAND,\n\t\turl: baseURL,\n\t\treuseExistingServer: !ci,\n\t\ttimeout: options.webServerTimeoutMs ?? DEFAULT_WEBSERVER_TIMEOUT_MS,\n\t\tstdout: 'pipe',\n\t\tstderr: 'pipe',\n\t\tgracefulShutdown: {\n\t\t\tsignal: 'SIGTERM',\n\t\t\ttimeout: options.gracefulShutdownTimeoutMs ?? DEFAULT_GRACEFUL_SHUTDOWN_MS,\n\t\t},\n\t\tenv: presetEnv,\n\t};\n};\n"],"mappings":";;AAsIA,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,+BAA+B;AACrC,MAAM,+BAA+B;AACrC,MAAM,wBAAwB;;;;;;AAW9B,MAAa,oCACZ,UAA6C,EAAE,KACnC;CACZ,MAAM,eAAe,QAAQ,gBAAgB;AAC7C,QACC,QAAQ,WACR,mBAAmB,cAAc;EAChC,GAAI,QAAQ,QAAQ,KAAA,IAAY,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE;EACzD,GAAI,QAAQ,iBAAiB,KAAA,IAAY,EAAE,cAAc,QAAQ,cAAc,GAAG,EAAE;EACpF,GAAI,QAAQ,UAAU,KAAA,IAAY,EAAE,OAAO,QAAQ,OAAO,GAAG,EAAE;EAC/D,GAAI,QAAQ,aAAa,KAAA,IAAY,EAAE,UAAU,QAAQ,UAAU,GAAG,EAAE;EACxE,GAAI,QAAQ,QAAQ,KAAA,IAAY,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE;EACzD,CAAC,CAAC;;AAIL,MAAa,gCACZ,UAA+C,EAAE,KAClB;CAC/B,MAAM,KAAK,QAAQ,QAAQ,IAAI,GAAG;AAClC,QAAO;EACN,SAAS,QAAQ,WAAW;EAC5B,eAAe;EACf,YAAY;EACZ,SAAS,KAAK,IAAI;EAClB,SAAS;EACT,UAAU,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,GAAG;EACxC,aAAa,QAAQ,gBAAgB,OAAO,KAAA,IAAa,QAAQ,eAAe,KAAA;EAChF;;AAGF,MAAa,yBACZ,UAAwC,EAAE,MACX;CAC/B,SAAS,iCAAiC,QAAQ;CAClD,OAAO,QAAQ,SAAS;CACxB,YAAY,QAAQ,cAAc;CAClC,GAAI,QAAQ,OAAO,EAAE;CACrB;AAED,MAAa,8BACZ,UAA6C,EAAE,KACjB,CAC9B;CACC,MAAM;CACN,KAAK,EAAE,aAAa,YAAY;CAChC,EACD,GAAI,QAAQ,YAAY,EAAE,CAC1B;AAED,MAAa,+BACZ,UAA8C,EAAE,KACZ;CACpC,MAAM,MAAM,QAAQ,MAAM,EAAE,GAAG,QAAQ,KAAK,GAAG,EAAE;CACjD,MAAM,KAAK,QAAQ,QAAQ,IAAI,GAAG;CAClC,MAAM,UAAU,iCAAiC,QAAQ;CACzD,MAAM,YAAoC;EACzC,YAAY;EACZ,GAAI,QAAQ,UAAU,KAAA,IAAY,EAAE,gBAAgB,QAAQ,OAAO,GAAG,EAAE;EACxE,GAAG;EACH;AAED,QAAO;EACN,SAAS,QAAQ,WAAW;EAC5B,KAAK;EACL,qBAAqB,CAAC;EACtB,SAAS,QAAQ,sBAAsB;EACvC,QAAQ;EACR,QAAQ;EACR,kBAAkB;GACjB,QAAQ;GACR,SAAS,QAAQ,6BAA6B;GAC9C;EACD,KAAK;EACL"}
|
|
1
|
+
{"version":3,"file":"config.mjs","names":[],"sources":["../../../src/build-integrations/playwright/config.ts"],"sourcesContent":["// Playwright config helpers.\n//\n// Architecture (distilled/23-build-integrations.md § Playwright /\n// \"What it produces\"):\n//\n// Composable pieces for a canonical `PlaywrightTestConfig`\n// (workers 1, fullyParallel false, `testDir: './e2e'`,\n// CI-aware reporter/retries/forbidOnly, graceful-shutdown wiring\n// with a SIGTERM + 10s timeout), plus `webServer` + `baseURL`\n// low-level resolvers.\n//\n// Load-bearing invariants this module enforces:\n// - `workers: 1` and `fullyParallel: false` — single supervisor per\n// stack; parallel tests would contend on shared faucet / wallet\n// / RPC (distilled § Invariants).\n// - `webServer.gracefulShutdown` SIGTERM + 10s — without this the\n// default SIGKILL-on-shell orphans vite + supervisor descendants\n// holding ports (distilled § Learnings: \"Graceful-shutdown wiring\n// at the Playwright layer fixed a real bug\").\n// - `webServer.url` settable at config-load time even with no\n// manifest — via cold-start fallback to a conventional URL.\n// - `webServer.reuseExistingServer: !CI` — dev iteration reuses,\n// CI always boots fresh.\n//\n// This module returns `PlaywrightTestConfig`-shaped fragments. We do\n// NOT import `@playwright/test` at module init: the types are\n// structural and we accept the optional-peer cost rather than\n// importing transitively from a build-integration that must be\n// loadable without `@playwright/test` (matching the Vitest helpers'\n// optional-peer pattern).\n\nimport { BUILT_IN_ENDPOINT_ALIASES } from '../runtime/conventional-routes.ts';\nimport { type ResolveStackContextOptions, resolveEndpointUrl } from './stack-context.ts';\n\n// -----------------------------------------------------------------------------\n// PlaywrightTestConfig shape (structural; we do NOT import the type\n// directly to keep `@playwright/test` an optional peer)\n// -----------------------------------------------------------------------------\n\ntype PlaywrightReporterShape = [string] | [string, Record<string, unknown>];\ntype PlaywrightGlobalSetupShape = string | string[];\n\nconst DEFAULT_GLOBAL_SETUP = '@mysten-incubation/devstack/playwright/global-setup';\n\n/** Base subset of `PlaywrightTestConfig` this surface produces. The\n * full type lives in `@playwright/test`; we keep this structural so\n * the helpers compile without the peer. */\nexport interface PlaywrightBaseConfigShape {\n\treadonly testDir: string;\n\treadonly fullyParallel: boolean;\n\treadonly forbidOnly: boolean;\n\treadonly retries: number;\n\treadonly workers: number;\n\treadonly reporter: PlaywrightReporterShape[] | string;\n\treadonly globalSetup?: PlaywrightGlobalSetupShape;\n\treadonly globalTeardown?: string;\n}\n\nexport type PlaywrightUseConfigShape = {\n\treadonly baseURL: string;\n\treadonly trace: 'on-first-retry' | 'off' | 'retain-on-failure';\n\treadonly screenshot: 'only-on-failure' | 'off' | 'on';\n} & Record<string, unknown>;\n\nexport interface PlaywrightProjectShape {\n\tname: string;\n\tuse: Record<string, unknown>;\n}\n\nexport interface PlaywrightWebServerConfigShape {\n\treadonly command: string;\n\treadonly url: string;\n\treadonly reuseExistingServer: boolean;\n\treadonly timeout: number;\n\treadonly stdout: 'pipe' | 'ignore';\n\treadonly stderr: 'pipe' | 'ignore';\n\treadonly gracefulShutdown: { readonly signal: 'SIGTERM'; readonly timeout: number };\n\treadonly env?: Record<string, string>;\n}\n\n// -----------------------------------------------------------------------------\n// Public option shape\n// -----------------------------------------------------------------------------\n\nexport interface DevstackPlaywrightBaseConfigOptions {\n\t/** Test directory. Default: `'./e2e'` (architecture invariant). */\n\treadonly testDir?: string;\n\n\t/** Path to a global-setup module. Default: the devstack setup that\n\t * waits for post-acquire codegen before specs load the app. Pass\n\t * `null` to keep the property omitted when composing conditionally. */\n\treadonly globalSetup?: PlaywrightGlobalSetupShape | null;\n}\n\nexport interface DevstackPlaywrightEndpointOptions extends ResolveStackContextOptions {\n\t/** Endpoint name whose URL becomes `webServer.url` + `use.baseURL`.\n\t * Default: `'dev'` (the host-service dev server endpoint). */\n\treadonly endpointName?: string;\n\n\t/** Explicit baseURL override. When set, manifest discovery is\n\t * bypassed entirely. */\n\treadonly baseURL?: string;\n}\n\nexport interface DevstackPlaywrightWebServerOptions extends DevstackPlaywrightEndpointOptions {\n\t/** Command Playwright runs to bring up the stack. Default:\n\t * `'pnpm dev'`. */\n\treadonly command?: string;\n\n\t/** Hard cap (ms) for `webServer` URL to become reachable. Default:\n\t * 300_000 (5 min) — accounts for cold supervisor boot under\n\t * Docker pulls. */\n\treadonly webServerTimeoutMs?: number;\n\n\t/** Hard cap (ms) for `webServer.gracefulShutdown`. Default: 10_000\n\t * (10 s) — load-bearing per architecture § Invariants. */\n\treadonly gracefulShutdownTimeoutMs?: number;\n\n\t/** Extra env to forward to `webServer.command`. Merged after the\n\t * preset's own env (PLAYWRIGHT=1, DEVSTACK_STACK). */\n\treadonly env?: Record<string, string>;\n}\n\nexport interface DevstackPlaywrightProjectsOptions {\n\t/** Extra Playwright projects to append to the default Chromium\n\t * project. */\n\treadonly projects?: ReadonlyArray<PlaywrightProjectShape>;\n}\n\nexport interface DevstackPlaywrightUseOptions extends DevstackPlaywrightEndpointOptions {\n\treadonly trace?: PlaywrightUseConfigShape['trace'];\n\treadonly screenshot?: PlaywrightUseConfigShape['screenshot'];\n\treadonly use?: Omit<Partial<PlaywrightUseConfigShape>, 'baseURL'>;\n}\n\n// -----------------------------------------------------------------------------\n// Defaults\n// -----------------------------------------------------------------------------\n\nconst DEFAULT_TEST_DIR = './e2e';\nconst DEFAULT_COMMAND = 'pnpm dev';\nconst DEFAULT_WEBSERVER_TIMEOUT_MS = 300_000;\nconst DEFAULT_GRACEFUL_SHUTDOWN_MS = 10_000;\nconst DEFAULT_ENDPOINT_NAME = BUILT_IN_ENDPOINT_ALIASES.app;\n\n// -----------------------------------------------------------------------------\n// Builders\n// -----------------------------------------------------------------------------\n\n/**\n * Resolve the browser app URL Playwright should target. This is the\n * only helper here that may synchronously read the manifest; callers\n * can pass `baseURL` to bypass discovery entirely.\n */\nexport const resolveDevstackPlaywrightBaseURL = (\n\toptions: DevstackPlaywrightEndpointOptions = {},\n): string => {\n\tconst endpointName = options.endpointName ?? DEFAULT_ENDPOINT_NAME;\n\treturn (\n\t\toptions.baseURL ??\n\t\tresolveEndpointUrl(endpointName, {\n\t\t\t...(options.cwd !== undefined ? { cwd: options.cwd } : {}),\n\t\t\t...(options.manifestPath !== undefined ? { manifestPath: options.manifestPath } : {}),\n\t\t\t...(options.stack !== undefined ? { stack: options.stack } : {}),\n\t\t\t...(options.stateDir !== undefined ? { stateDir: options.stateDir } : {}),\n\t\t\t...(options.env !== undefined ? { env: options.env } : {}),\n\t\t}).url\n\t);\n};\n\nexport const devstackPlaywrightBaseConfig = (\n\toptions: DevstackPlaywrightBaseConfigOptions = {},\n): PlaywrightBaseConfigShape => {\n\tconst ci = Boolean(process.env.CI);\n\treturn {\n\t\ttestDir: options.testDir ?? DEFAULT_TEST_DIR,\n\t\tfullyParallel: false,\n\t\tforbidOnly: ci,\n\t\tretries: ci ? 2 : 0,\n\t\tworkers: 1,\n\t\treporter: ci ? [['github'], ['list']] : 'list',\n\t\tglobalSetup:\n\t\t\toptions.globalSetup === null ? undefined : (options.globalSetup ?? DEFAULT_GLOBAL_SETUP),\n\t};\n};\n\nexport const devstackPlaywrightUse = (\n\toptions: DevstackPlaywrightUseOptions = {},\n): PlaywrightUseConfigShape => ({\n\tbaseURL: resolveDevstackPlaywrightBaseURL(options),\n\ttrace: options.trace ?? 'on-first-retry',\n\tscreenshot: options.screenshot ?? 'only-on-failure',\n\t...options.use,\n});\n\nexport const devstackPlaywrightProjects = (\n\toptions: DevstackPlaywrightProjectsOptions = {},\n): PlaywrightProjectShape[] => [\n\t{\n\t\tname: 'chromium',\n\t\tuse: { browserName: 'chromium' },\n\t},\n\t...(options.projects ?? []),\n];\n\nexport const devstackPlaywrightWebServer = (\n\toptions: DevstackPlaywrightWebServerOptions = {},\n): PlaywrightWebServerConfigShape => {\n\tconst env = options.env ? { ...options.env } : {};\n\tconst ci = Boolean(process.env.CI);\n\tconst baseURL = resolveDevstackPlaywrightBaseURL(options);\n\tconst presetEnv: Record<string, string> = {\n\t\tPLAYWRIGHT: '1',\n\t\t...(options.stack !== undefined ? { DEVSTACK_STACK: options.stack } : {}),\n\t\t...env,\n\t};\n\n\treturn {\n\t\tcommand: options.command ?? DEFAULT_COMMAND,\n\t\turl: baseURL,\n\t\treuseExistingServer: !ci,\n\t\ttimeout: options.webServerTimeoutMs ?? DEFAULT_WEBSERVER_TIMEOUT_MS,\n\t\tstdout: 'pipe',\n\t\tstderr: 'pipe',\n\t\tgracefulShutdown: {\n\t\t\tsignal: 'SIGTERM',\n\t\t\ttimeout: options.gracefulShutdownTimeoutMs ?? DEFAULT_GRACEFUL_SHUTDOWN_MS,\n\t\t},\n\t\tenv: presetEnv,\n\t};\n};\n"],"mappings":";;;AA0CA,MAAM,uBAAuB;AAiG7B,MAAM,mBAAmB;AACzB,MAAM,kBAAkB;AACxB,MAAM,+BAA+B;AACrC,MAAM,+BAA+B;AACrC,MAAM,wBAAwB,0BAA0B;;;;;;AAWxD,MAAa,oCACZ,UAA6C,EAAE,KACnC;CACZ,MAAM,eAAe,QAAQ,gBAAgB;AAC7C,QACC,QAAQ,WACR,mBAAmB,cAAc;EAChC,GAAI,QAAQ,QAAQ,KAAA,IAAY,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE;EACzD,GAAI,QAAQ,iBAAiB,KAAA,IAAY,EAAE,cAAc,QAAQ,cAAc,GAAG,EAAE;EACpF,GAAI,QAAQ,UAAU,KAAA,IAAY,EAAE,OAAO,QAAQ,OAAO,GAAG,EAAE;EAC/D,GAAI,QAAQ,aAAa,KAAA,IAAY,EAAE,UAAU,QAAQ,UAAU,GAAG,EAAE;EACxE,GAAI,QAAQ,QAAQ,KAAA,IAAY,EAAE,KAAK,QAAQ,KAAK,GAAG,EAAE;EACzD,CAAC,CAAC;;AAIL,MAAa,gCACZ,UAA+C,EAAE,KAClB;CAC/B,MAAM,KAAK,QAAQ,QAAQ,IAAI,GAAG;AAClC,QAAO;EACN,SAAS,QAAQ,WAAW;EAC5B,eAAe;EACf,YAAY;EACZ,SAAS,KAAK,IAAI;EAClB,SAAS;EACT,UAAU,KAAK,CAAC,CAAC,SAAS,EAAE,CAAC,OAAO,CAAC,GAAG;EACxC,aACC,QAAQ,gBAAgB,OAAO,KAAA,IAAa,QAAQ,eAAe;EACpE;;AAGF,MAAa,yBACZ,UAAwC,EAAE,MACX;CAC/B,SAAS,iCAAiC,QAAQ;CAClD,OAAO,QAAQ,SAAS;CACxB,YAAY,QAAQ,cAAc;CAClC,GAAG,QAAQ;CACX;AAED,MAAa,8BACZ,UAA6C,EAAE,KACjB,CAC9B;CACC,MAAM;CACN,KAAK,EAAE,aAAa,YAAY;CAChC,EACD,GAAI,QAAQ,YAAY,EAAE,CAC1B;AAED,MAAa,+BACZ,UAA8C,EAAE,KACZ;CACpC,MAAM,MAAM,QAAQ,MAAM,EAAE,GAAG,QAAQ,KAAK,GAAG,EAAE;CACjD,MAAM,KAAK,QAAQ,QAAQ,IAAI,GAAG;CAClC,MAAM,UAAU,iCAAiC,QAAQ;CACzD,MAAM,YAAoC;EACzC,YAAY;EACZ,GAAI,QAAQ,UAAU,KAAA,IAAY,EAAE,gBAAgB,QAAQ,OAAO,GAAG,EAAE;EACxE,GAAG;EACH;AAED,QAAO;EACN,SAAS,QAAQ,WAAW;EAC5B,KAAK;EACL,qBAAqB,CAAC;EACtB,SAAS,QAAQ,sBAAsB;EACvC,QAAQ;EACR,QAAQ;EACR,kBAAkB;GACjB,QAAQ;GACR,SAAS,QAAQ,6BAA6B;GAC9C;EACD,KAAK;EACL"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import * as _$effect_Types0 from "effect/Types";
|
|
2
1
|
import * as _$effect_Cause0 from "effect/Cause";
|
|
2
|
+
import * as _$effect_Types0 from "effect/Types";
|
|
3
3
|
|
|
4
4
|
//#region src/build-integrations/playwright/errors.d.ts
|
|
5
5
|
declare const PlaywrightManifestDiscoveryError_base: new <A extends Record<string, any> = {}>(args: _$effect_Types0.VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P] }>) => _$effect_Cause0.YieldableError & {
|
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import { PlaywrightStackFixture as PlaywrightStackFixture$1 } from "../runtime/playwright-stack-context-slot.mjs";
|
|
1
2
|
import { ResolveStackContextOptions } from "./stack-context.mjs";
|
|
3
|
+
import * as _$effect_SchemaAST0 from "effect/SchemaAST";
|
|
2
4
|
|
|
3
5
|
//#region src/build-integrations/playwright/global-setup.d.ts
|
|
4
6
|
/** Playwright's `globalSetup` signature is `() => Promise<void | (() =>
|
|
@@ -6,25 +8,28 @@ import { ResolveStackContextOptions } from "./stack-context.mjs";
|
|
|
6
8
|
* without `@playwright/test`. */
|
|
7
9
|
type PlaywrightGlobalSetup = () => Promise<void | (() => Promise<void>)>;
|
|
8
10
|
/**
|
|
9
|
-
* The shape global-setup writes
|
|
10
|
-
*
|
|
11
|
-
*
|
|
12
|
-
* subtle cwd-mismatch class of failure when Playwright runs tests
|
|
11
|
+
* The shape global-setup writes for in-spec tests to read. Tests do
|
|
12
|
+
* NOT re-walk-up to find the manifest at every assertion — they read
|
|
13
|
+
* this prepared fixture from `globalThis`, which is faster and avoids
|
|
14
|
+
* a subtle cwd-mismatch class of failure when Playwright runs tests
|
|
13
15
|
* from a worker process.
|
|
14
16
|
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
17
|
+
* Re-export of the substrate-owned `runtime/playwright-stack-context-slot`
|
|
18
|
+
* shape so both consumer surfaces agree on one type. The matching
|
|
19
|
+
* typed `declare global` block lives next to the slot key so callers
|
|
20
|
+
* can read/write `globalThis[KEY]` without a cast.
|
|
19
21
|
*/
|
|
20
|
-
|
|
21
|
-
readonly endpoints: Readonly<Record<string, string>>;
|
|
22
|
-
readonly walletEndpoint: string | null;
|
|
23
|
-
readonly manifestPath: string;
|
|
24
|
-
readonly stack: string;
|
|
25
|
-
readonly app: string;
|
|
26
|
-
}
|
|
22
|
+
type PlaywrightStackFixture = PlaywrightStackFixture$1;
|
|
27
23
|
interface DefineGlobalSetupOptions extends ResolveStackContextOptions {
|
|
24
|
+
/**
|
|
25
|
+
* Wait for the supervisor's post-acquire codegen event before the
|
|
26
|
+
* browser loads the app. Default: `true`.
|
|
27
|
+
*/
|
|
28
|
+
readonly waitForCodegen?: boolean;
|
|
29
|
+
/** Maximum wait for the manifest + codegen-ready event. */
|
|
30
|
+
readonly readyTimeoutMs?: number;
|
|
31
|
+
/** Poll interval while waiting for the manifest + codegen-ready event. */
|
|
32
|
+
readonly readyPollIntervalMs?: number;
|
|
28
33
|
/**
|
|
29
34
|
* Verify the manifest's `endpoints` has at least one entry. The
|
|
30
35
|
* supervisor's manifest writer always emits at least the `app`
|
|
@@ -46,19 +51,40 @@ interface DefineGlobalSetupOptions extends ResolveStackContextOptions {
|
|
|
46
51
|
*/
|
|
47
52
|
readonly preloadContext?: boolean;
|
|
48
53
|
}
|
|
54
|
+
/**
|
|
55
|
+
* @internal Exported only so the through-surface test can assert the
|
|
56
|
+
* drift-detection contract directly (a renamed discriminator must
|
|
57
|
+
* THROW, not decode to `undefined`). Not part of the public API.
|
|
58
|
+
*/
|
|
59
|
+
declare const decodeWatchedRecord: (input: unknown, options?: _$effect_SchemaAST0.ParseOptions) => {
|
|
60
|
+
readonly kind: "engine";
|
|
61
|
+
readonly event: {
|
|
62
|
+
readonly tag: string;
|
|
63
|
+
readonly endpoint?: {
|
|
64
|
+
readonly name: string;
|
|
65
|
+
} | undefined;
|
|
66
|
+
};
|
|
67
|
+
} | {
|
|
68
|
+
readonly kind: "ack" | "error";
|
|
69
|
+
};
|
|
49
70
|
/**
|
|
50
71
|
* Build a Playwright `globalSetup` function. The returned function
|
|
51
72
|
* matches the signature Playwright expects (a default export of a
|
|
52
73
|
* module path; we return the function so the preset can wire it).
|
|
53
74
|
*/
|
|
54
75
|
declare const buildGlobalSetup: (options?: DefineGlobalSetupOptions) => PlaywrightGlobalSetup;
|
|
76
|
+
/** Default export shape that mirrors what Playwright's
|
|
77
|
+
* `defineConfig.globalSetup` resolves: a module whose default export
|
|
78
|
+
* is the setup function. */
|
|
79
|
+
declare const _default: PlaywrightGlobalSetup;
|
|
55
80
|
/** The slot on `globalThis` where the prewarmed stack context lives.
|
|
56
81
|
* In-spec helpers (`wallet-context.ts`) read from here when present
|
|
57
|
-
* to avoid a second disk read.
|
|
82
|
+
* to avoid a second disk read. Re-exported from the runtime slot
|
|
83
|
+
* module so consumers can import either side. */
|
|
58
84
|
declare const STACK_CONTEXT_SLOT: "__devstackPlaywrightStackContext__";
|
|
59
85
|
/** Read the slot. Returns `null` if global-setup didn't run (e.g. the
|
|
60
86
|
* user opted out by passing `globalSetup: null`). */
|
|
61
87
|
declare const readStashedFixture: () => PlaywrightStackFixture | null;
|
|
62
88
|
//#endregion
|
|
63
|
-
export { DefineGlobalSetupOptions, PlaywrightGlobalSetup, PlaywrightStackFixture, STACK_CONTEXT_SLOT, buildGlobalSetup, readStashedFixture };
|
|
89
|
+
export { DefineGlobalSetupOptions, PlaywrightGlobalSetup, PlaywrightStackFixture, STACK_CONTEXT_SLOT, buildGlobalSetup, decodeWatchedRecord, _default as default, readStashedFixture };
|
|
64
90
|
//# sourceMappingURL=global-setup.d.mts.map
|
|
@@ -1,5 +1,223 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { WALLET_ENDPOINT_KEY } from "../../contracts/wallet-protocol.mjs";
|
|
2
|
+
import { resolveDiscoveryEnv } from "../runtime/resolve-discovery-env.mjs";
|
|
3
|
+
import { discoverSingleStackManifestPath } from "../runtime/discover.mjs";
|
|
4
|
+
import "../runtime/wallet-paths.mjs";
|
|
5
|
+
import { BUILT_IN_ENDPOINT_ALIASES } from "../runtime/conventional-routes.mjs";
|
|
6
|
+
import { PLAYWRIGHT_STACK_CONTEXT_SLOT_KEY } from "../runtime/playwright-stack-context-slot.mjs";
|
|
7
|
+
import { PlaywrightManifestDiscoveryError } from "./errors.mjs";
|
|
8
|
+
import { PLAYWRIGHT_ENV, readStackContext } from "./stack-context.mjs";
|
|
9
|
+
import { Schema } from "effect";
|
|
10
|
+
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
11
|
+
import { dirname, join } from "node:path";
|
|
2
12
|
//#region src/build-integrations/playwright/global-setup.ts
|
|
13
|
+
const DEFAULT_READY_TIMEOUT_MS = 3e5;
|
|
14
|
+
const DEFAULT_READY_POLL_INTERVAL_MS = 100;
|
|
15
|
+
const sleep = (ms) => new Promise((resolveSleep) => setTimeout(resolveSleep, ms));
|
|
16
|
+
const stackOptionWasExplicit = (options) => {
|
|
17
|
+
const env = options.env ?? process.env;
|
|
18
|
+
return options.stack !== void 0 || options.manifestPath !== void 0 || env[PLAYWRIGHT_ENV.STACK] !== void 0 || env[PLAYWRIGHT_ENV.MANIFEST_PATH] !== void 0;
|
|
19
|
+
};
|
|
20
|
+
const findSingleStackManifestPath = (options) => {
|
|
21
|
+
if (stackOptionWasExplicit(options)) return null;
|
|
22
|
+
const { stateDir } = resolveDiscoveryEnv(options.env ?? process.env, { ...options.stateDir !== void 0 ? { stateDir: options.stateDir } : {} });
|
|
23
|
+
return discoverSingleStackManifestPath({
|
|
24
|
+
...options.cwd !== void 0 ? { cwd: options.cwd } : {},
|
|
25
|
+
stateDir
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
const readContextForSetup = (options) => {
|
|
29
|
+
try {
|
|
30
|
+
return readStackContext(options);
|
|
31
|
+
} catch (cause) {
|
|
32
|
+
if (!(cause instanceof PlaywrightManifestDiscoveryError)) throw cause;
|
|
33
|
+
const inferredManifestPath = findSingleStackManifestPath(options);
|
|
34
|
+
if (inferredManifestPath === null) throw cause;
|
|
35
|
+
return readStackContext({
|
|
36
|
+
...options,
|
|
37
|
+
manifestPath: inferredManifestPath
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
const createCodegenWatchState = () => ({
|
|
42
|
+
fd: null,
|
|
43
|
+
offset: 0,
|
|
44
|
+
lineIndex: 0,
|
|
45
|
+
carry: "",
|
|
46
|
+
latestAppEndpointLine: -1,
|
|
47
|
+
latestCodegenLine: -1,
|
|
48
|
+
lastFileSize: 0,
|
|
49
|
+
decodeFailures: 0
|
|
50
|
+
});
|
|
51
|
+
const READ_CHUNK_BYTES = 64 * 1024;
|
|
52
|
+
/**
|
|
53
|
+
* Pinned-shape schema for the ndjson records we tail. The supervisor
|
|
54
|
+
* emits a richer envelope (`protocol`/`seq`/`at` plus the full
|
|
55
|
+
* `EngineEvent` union payload — see
|
|
56
|
+
* `substrate/runtime/cross-process/command-channel/protocol.ts`
|
|
57
|
+
* `EventRecordSchema`), but the watch only needs the discriminators
|
|
58
|
+
* that route a record to `latestAppEndpointLine` / `latestCodegenLine`.
|
|
59
|
+
*
|
|
60
|
+
* The pin's job is to FAIL LOUDLY if one of those discriminators is
|
|
61
|
+
* renamed upstream — a silent miss leaves the matchers permanently
|
|
62
|
+
* unfired and deadlocks global-setup at the 5min `readyTimeout`. An
|
|
63
|
+
* earlier version declared every field as `optional(Unknown)`, which
|
|
64
|
+
* defeats that entirely: a `kind`→`recordKind` rename decoded to
|
|
65
|
+
* `undefined` instead of throwing, so the watch silently stalled. We
|
|
66
|
+
* therefore pin the stable discriminators as REQUIRED while keeping the
|
|
67
|
+
* genuinely-variable axis (the engine `tag` value) permissive:
|
|
68
|
+
*
|
|
69
|
+
* - The engine variant requires `kind: 'engine'` (the literal value
|
|
70
|
+
* the matchers test against, verified at `channel.ts` `publishEvent`)
|
|
71
|
+
* and a required `event.tag` STRING. Renaming `kind`, its `'engine'`
|
|
72
|
+
* value, the `event` key, or the `tag` key all fail decode — these
|
|
73
|
+
* are the deadlock-class discriminators. The `tag` VALUE stays open,
|
|
74
|
+
* so future `EngineEvent` tag additions need no change here.
|
|
75
|
+
* - `event.endpoint` is optional (most engine tags carry no endpoint),
|
|
76
|
+
* but WHERE present its `name` is REQUIRED. Renaming `name` on an
|
|
77
|
+
* `endpoint.registered` record therefore fails decode rather than
|
|
78
|
+
* silently leaving `latestAppEndpointLine` unset.
|
|
79
|
+
* - `ack` / `error` envelopes carry no `event`; a dedicated variant
|
|
80
|
+
* absorbs them so the supervisor's correlation replies don't flood
|
|
81
|
+
* `decodeFailures`. They are never routed.
|
|
82
|
+
*
|
|
83
|
+
* Deliberately NOT permissive about an unknown `kind`: a brand-new
|
|
84
|
+
* envelope kind fails decode. That is a rare, intentional protocol
|
|
85
|
+
* change (and would be made alongside updating consumers), and failing
|
|
86
|
+
* loudly here is the same drift signal the engine-value pin provides.
|
|
87
|
+
*/
|
|
88
|
+
const WatchedEngineRecordSchema = Schema.Struct({
|
|
89
|
+
kind: Schema.Literal("engine"),
|
|
90
|
+
event: Schema.Struct({
|
|
91
|
+
tag: Schema.String,
|
|
92
|
+
endpoint: Schema.optional(Schema.Struct({ name: Schema.String }))
|
|
93
|
+
})
|
|
94
|
+
});
|
|
95
|
+
const WatchedReplyRecordSchema = Schema.Struct({ kind: Schema.Literals(["ack", "error"]) });
|
|
96
|
+
const WatchedRecordSchema = Schema.Union([WatchedEngineRecordSchema, WatchedReplyRecordSchema]);
|
|
97
|
+
/**
|
|
98
|
+
* @internal Exported only so the through-surface test can assert the
|
|
99
|
+
* drift-detection contract directly (a renamed discriminator must
|
|
100
|
+
* THROW, not decode to `undefined`). Not part of the public API.
|
|
101
|
+
*/
|
|
102
|
+
const decodeWatchedRecord = Schema.decodeUnknownSync(WatchedRecordSchema);
|
|
103
|
+
const isEngineRecord = (record) => record.kind === "engine";
|
|
104
|
+
const isAppEndpointRegistration = (record) => isEngineRecord(record) && record.event.tag === "endpoint.registered" && record.event.endpoint?.name === BUILT_IN_ENDPOINT_ALIASES.app;
|
|
105
|
+
const isCodegenEmitted = (record) => isEngineRecord(record) && record.event.tag === "codegen.emitted";
|
|
106
|
+
const DEBUG_ENABLED = () => process.env.DEVSTACK_PLAYWRIGHT_DEBUG === "1";
|
|
107
|
+
const debugLog = (message) => {
|
|
108
|
+
if (!DEBUG_ENABLED()) return;
|
|
109
|
+
try {
|
|
110
|
+
process.stderr.write(`[devstack/playwright] ${message}\n`);
|
|
111
|
+
} catch {}
|
|
112
|
+
};
|
|
113
|
+
const ingestNdjsonLine = (state, line) => {
|
|
114
|
+
if (line.length === 0) return;
|
|
115
|
+
state.lineIndex += 1;
|
|
116
|
+
let parsed;
|
|
117
|
+
try {
|
|
118
|
+
parsed = JSON.parse(line);
|
|
119
|
+
} catch {
|
|
120
|
+
state.decodeFailures += 1;
|
|
121
|
+
if (state.decodeFailures <= 3 || state.decodeFailures % 50 === 0) debugLog(`events.ndjson line ${state.lineIndex} failed JSON.parse (decodeFailures=${state.decodeFailures})`);
|
|
122
|
+
return;
|
|
123
|
+
}
|
|
124
|
+
let record;
|
|
125
|
+
try {
|
|
126
|
+
record = decodeWatchedRecord(parsed);
|
|
127
|
+
} catch (cause) {
|
|
128
|
+
state.decodeFailures += 1;
|
|
129
|
+
if (state.decodeFailures <= 3 || state.decodeFailures % 50 === 0) debugLog(`events.ndjson line ${state.lineIndex} failed Schema.decode (decodeFailures=${state.decodeFailures}): ${cause instanceof Error ? cause.message : String(cause)}`);
|
|
130
|
+
return;
|
|
131
|
+
}
|
|
132
|
+
if (isAppEndpointRegistration(record)) state.latestAppEndpointLine = state.lineIndex;
|
|
133
|
+
if (isCodegenEmitted(record)) state.latestCodegenLine = state.lineIndex;
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Advance the watch state by reading any bytes appended since the
|
|
137
|
+
* previous poll. The fd is allocated lazily on the first poll (so a
|
|
138
|
+
* file that doesn't yet exist isn't a hard error) and stays open across
|
|
139
|
+
* polls until `closeCodegenWatch`. Returns `true` when the file has a
|
|
140
|
+
* codegen-fresh state ready for caller continuation.
|
|
141
|
+
*
|
|
142
|
+
* Truncation/rotation: when `statSync(...).size < state.lastFileSize`
|
|
143
|
+
* the file rotated. We close the old fd, reopen, and restart the
|
|
144
|
+
* counters so the new tail's events aren't shadowed by stale
|
|
145
|
+
* cross-poll state.
|
|
146
|
+
*/
|
|
147
|
+
const advanceCodegenWatch = (state, eventsPath) => {
|
|
148
|
+
if (state.fd === null) try {
|
|
149
|
+
state.fd = openSync(eventsPath, "r");
|
|
150
|
+
} catch {
|
|
151
|
+
return false;
|
|
152
|
+
}
|
|
153
|
+
try {
|
|
154
|
+
const size = statSync(eventsPath).size;
|
|
155
|
+
if (size < state.lastFileSize) {
|
|
156
|
+
try {
|
|
157
|
+
closeSync(state.fd);
|
|
158
|
+
} catch {}
|
|
159
|
+
state.fd = null;
|
|
160
|
+
state.offset = 0;
|
|
161
|
+
state.lineIndex = 0;
|
|
162
|
+
state.carry = "";
|
|
163
|
+
state.latestAppEndpointLine = -1;
|
|
164
|
+
state.latestCodegenLine = -1;
|
|
165
|
+
state.lastFileSize = 0;
|
|
166
|
+
try {
|
|
167
|
+
state.fd = openSync(eventsPath, "r");
|
|
168
|
+
} catch {
|
|
169
|
+
return false;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
state.lastFileSize = size;
|
|
173
|
+
const buf = Buffer.allocUnsafe(READ_CHUNK_BYTES);
|
|
174
|
+
while (state.offset < size) {
|
|
175
|
+
const bytesRead = readSync(state.fd, buf, 0, READ_CHUNK_BYTES, state.offset);
|
|
176
|
+
if (bytesRead <= 0) break;
|
|
177
|
+
state.offset += bytesRead;
|
|
178
|
+
const segments = (state.carry + buf.subarray(0, bytesRead).toString("utf8")).split(/\r?\n/);
|
|
179
|
+
state.carry = segments.pop() ?? "";
|
|
180
|
+
for (const segment of segments) ingestNdjsonLine(state, segment);
|
|
181
|
+
}
|
|
182
|
+
} catch {}
|
|
183
|
+
if (state.latestCodegenLine < 0) return false;
|
|
184
|
+
if (state.latestAppEndpointLine < 0) return true;
|
|
185
|
+
return state.latestCodegenLine > state.latestAppEndpointLine;
|
|
186
|
+
};
|
|
187
|
+
const closeCodegenWatch = (state) => {
|
|
188
|
+
if (state.fd === null) return;
|
|
189
|
+
try {
|
|
190
|
+
closeSync(state.fd);
|
|
191
|
+
} catch {}
|
|
192
|
+
state.fd = null;
|
|
193
|
+
};
|
|
194
|
+
const waitForReadyStackContext = async (options) => {
|
|
195
|
+
const timeoutMs = options.readyTimeoutMs ?? DEFAULT_READY_TIMEOUT_MS;
|
|
196
|
+
const intervalMs = options.readyPollIntervalMs ?? DEFAULT_READY_POLL_INTERVAL_MS;
|
|
197
|
+
const deadline = Date.now() + timeoutMs;
|
|
198
|
+
let lastError = null;
|
|
199
|
+
let ctx = null;
|
|
200
|
+
while (Date.now() <= deadline) try {
|
|
201
|
+
ctx = readContextForSetup(options);
|
|
202
|
+
break;
|
|
203
|
+
} catch (cause) {
|
|
204
|
+
lastError = cause;
|
|
205
|
+
await sleep(intervalMs);
|
|
206
|
+
}
|
|
207
|
+
if (ctx === null) throw new Error(`devstack manifest did not appear within ${timeoutMs}ms` + (lastError instanceof Error ? `: ${lastError.message}` : ""));
|
|
208
|
+
const eventsPath = join(dirname(ctx.manifestPath), "events.ndjson");
|
|
209
|
+
const watchState = createCodegenWatchState();
|
|
210
|
+
try {
|
|
211
|
+
while (Date.now() <= deadline) {
|
|
212
|
+
if (advanceCodegenWatch(watchState, eventsPath)) return ctx;
|
|
213
|
+
lastError = /* @__PURE__ */ new Error(`devstack has not emitted codegen yet; waiting on events next to ${ctx.manifestPath}`);
|
|
214
|
+
await sleep(intervalMs);
|
|
215
|
+
}
|
|
216
|
+
} finally {
|
|
217
|
+
closeCodegenWatch(watchState);
|
|
218
|
+
}
|
|
219
|
+
throw new Error(`devstack did not reach post-acquire codegen within ${timeoutMs}ms` + (lastError instanceof Error ? `: ${lastError.message}` : ""));
|
|
220
|
+
};
|
|
3
221
|
/**
|
|
4
222
|
* Build a Playwright `globalSetup` function. The returned function
|
|
5
223
|
* matches the signature Playwright expects (a default export of a
|
|
@@ -7,7 +225,7 @@ import { readStackContext } from "./stack-context.mjs";
|
|
|
7
225
|
*/
|
|
8
226
|
const buildGlobalSetup = (options = {}) => {
|
|
9
227
|
return async () => {
|
|
10
|
-
const ctx =
|
|
228
|
+
const ctx = options.waitForCodegen ?? true ? await waitForReadyStackContext(options) : readContextForSetup(options);
|
|
11
229
|
if (options.requireNonEmptyEndpoints === true) {
|
|
12
230
|
if (ctx.endpointNames.length === 0) throw new Error(`devstack manifest at ${ctx.manifestPath} has no endpoints. The supervisor likely failed before its eager snapshot write; check the dev server logs for plugin acquire errors.`);
|
|
13
231
|
}
|
|
@@ -18,27 +236,46 @@ const buildGlobalSetup = (options = {}) => {
|
|
|
18
236
|
if (options.preloadContext ?? true) stashStackContext(ctx);
|
|
19
237
|
};
|
|
20
238
|
};
|
|
21
|
-
|
|
239
|
+
/** Default export shape that mirrors what Playwright's
|
|
240
|
+
* `defineConfig.globalSetup` resolves: a module whose default export
|
|
241
|
+
* is the setup function. */
|
|
242
|
+
var global_setup_default = buildGlobalSetup();
|
|
22
243
|
/** The slot on `globalThis` where the prewarmed stack context lives.
|
|
23
244
|
* In-spec helpers (`wallet-context.ts`) read from here when present
|
|
24
|
-
* to avoid a second disk read.
|
|
25
|
-
|
|
245
|
+
* to avoid a second disk read. Re-exported from the runtime slot
|
|
246
|
+
* module so consumers can import either side. */
|
|
247
|
+
const STACK_CONTEXT_SLOT = PLAYWRIGHT_STACK_CONTEXT_SLOT_KEY;
|
|
248
|
+
/** Monotonic counter for fixture rotations within a single Node process.
|
|
249
|
+
* Survives across `stashStackContext` calls so a Playwright retry that
|
|
250
|
+
* re-runs global-setup stamps a fresh `generation` even though the
|
|
251
|
+
* module never reloads. */
|
|
252
|
+
let stashGeneration = 0;
|
|
26
253
|
const stashStackContext = (ctx) => {
|
|
254
|
+
const endpoints = Object.fromEntries(ctx.endpointNames.map((name) => [name, ctx.endpoint(name)]));
|
|
255
|
+
for (const [alias, canonical] of Object.entries(BUILT_IN_ENDPOINT_ALIASES)) {
|
|
256
|
+
if (alias in endpoints) continue;
|
|
257
|
+
const url = endpoints[canonical];
|
|
258
|
+
if (url !== void 0) endpoints[alias] = url;
|
|
259
|
+
}
|
|
260
|
+
stashGeneration += 1;
|
|
27
261
|
const fixture = {
|
|
28
|
-
endpoints
|
|
29
|
-
walletEndpoint: ctx.endpointMaybe(
|
|
262
|
+
endpoints,
|
|
263
|
+
walletEndpoint: ctx.endpointMaybe(WALLET_ENDPOINT_KEY),
|
|
30
264
|
manifestPath: ctx.manifestPath,
|
|
31
265
|
stack: ctx.manifest.identity.stack,
|
|
32
|
-
app: ctx.manifest.identity.app
|
|
266
|
+
app: ctx.manifest.identity.app,
|
|
267
|
+
generation: stashGeneration
|
|
33
268
|
};
|
|
34
|
-
globalThis[
|
|
269
|
+
const previous = globalThis[PLAYWRIGHT_STACK_CONTEXT_SLOT_KEY];
|
|
270
|
+
if (previous !== void 0) try {
|
|
271
|
+
process.stderr.write(`[devstack/playwright] global-setup re-ran (generation ${previous.generation} → ${fixture.generation}); downstream consumers should re-read globalThis[${PLAYWRIGHT_STACK_CONTEXT_SLOT_KEY}].\n`);
|
|
272
|
+
} catch {}
|
|
273
|
+
globalThis[PLAYWRIGHT_STACK_CONTEXT_SLOT_KEY] = fixture;
|
|
35
274
|
};
|
|
36
275
|
/** Read the slot. Returns `null` if global-setup didn't run (e.g. the
|
|
37
276
|
* user opted out by passing `globalSetup: null`). */
|
|
38
|
-
const readStashedFixture = () =>
|
|
39
|
-
return globalThis["__devstackPlaywrightStackContext__"] ?? null;
|
|
40
|
-
};
|
|
277
|
+
const readStashedFixture = () => globalThis["__devstackPlaywrightStackContext__"] ?? null;
|
|
41
278
|
//#endregion
|
|
42
|
-
export { STACK_CONTEXT_SLOT, buildGlobalSetup, readStashedFixture };
|
|
279
|
+
export { STACK_CONTEXT_SLOT, buildGlobalSetup, decodeWatchedRecord, global_setup_default as default, readStashedFixture };
|
|
43
280
|
|
|
44
281
|
//# sourceMappingURL=global-setup.mjs.map
|