@mysten-incubation/devstack 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/LICENSE +189 -0
  2. package/README.md +94 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  4. package/dist/api/define-capabilities.d.mts +25 -0
  5. package/dist/api/define-capabilities.mjs +19 -0
  6. package/dist/api/define-capabilities.mjs.map +1 -0
  7. package/dist/api/define-devstack-with.d.mts +41 -0
  8. package/dist/api/define-devstack-with.mjs +24 -0
  9. package/dist/api/define-devstack-with.mjs.map +1 -0
  10. package/dist/api/define-devstack.d.mts +62 -0
  11. package/dist/api/define-devstack.mjs +108 -0
  12. package/dist/api/define-devstack.mjs.map +1 -0
  13. package/dist/api/define-plugin.d.mts +1 -0
  14. package/dist/api/inference-network.mjs +122 -0
  15. package/dist/api/inference-network.mjs.map +1 -0
  16. package/dist/api/mode-narrowed-factory.d.mts +26 -0
  17. package/dist/api/mode-narrowed-factory.mjs +8 -0
  18. package/dist/api/mode-narrowed-factory.mjs.map +1 -0
  19. package/dist/api/plugin-errors.mjs +10 -0
  20. package/dist/api/plugin-errors.mjs.map +1 -0
  21. package/dist/api/run-stack.d.mts +82 -0
  22. package/dist/api/run-stack.mjs +127 -0
  23. package/dist/api/run-stack.mjs.map +1 -0
  24. package/dist/build-integrations/playwright/config.d.mts +92 -0
  25. package/dist/build-integrations/playwright/config.mjs +71 -0
  26. package/dist/build-integrations/playwright/config.mjs.map +1 -0
  27. package/dist/build-integrations/playwright/errors.d.mts +82 -0
  28. package/dist/build-integrations/playwright/errors.mjs +43 -0
  29. package/dist/build-integrations/playwright/errors.mjs.map +1 -0
  30. package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
  31. package/dist/build-integrations/playwright/global-setup.mjs +44 -0
  32. package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
  33. package/dist/build-integrations/playwright/index.d.mts +6 -0
  34. package/dist/build-integrations/playwright/index.mjs +6 -0
  35. package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
  36. package/dist/build-integrations/playwright/stack-context.mjs +277 -0
  37. package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
  38. package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
  39. package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
  40. package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
  41. package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
  42. package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
  43. package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
  44. package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
  45. package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
  46. package/dist/build-integrations/runtime/discover.d.mts +78 -0
  47. package/dist/build-integrations/runtime/discover.mjs +124 -0
  48. package/dist/build-integrations/runtime/discover.mjs.map +1 -0
  49. package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
  50. package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
  51. package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
  52. package/dist/build-integrations/runtime/errors.d.mts +64 -0
  53. package/dist/build-integrations/runtime/errors.mjs +51 -0
  54. package/dist/build-integrations/runtime/errors.mjs.map +1 -0
  55. package/dist/build-integrations/runtime/index.d.mts +7 -0
  56. package/dist/build-integrations/runtime/index.mjs +6 -0
  57. package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
  58. package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
  59. package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
  60. package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
  61. package/dist/build-integrations/vitest/config.d.mts +62 -0
  62. package/dist/build-integrations/vitest/config.mjs +80 -0
  63. package/dist/build-integrations/vitest/config.mjs.map +1 -0
  64. package/dist/build-integrations/vitest/env.d.mts +48 -0
  65. package/dist/build-integrations/vitest/env.mjs +50 -0
  66. package/dist/build-integrations/vitest/env.mjs.map +1 -0
  67. package/dist/build-integrations/vitest/errors.d.mts +44 -0
  68. package/dist/build-integrations/vitest/errors.mjs +18 -0
  69. package/dist/build-integrations/vitest/errors.mjs.map +1 -0
  70. package/dist/build-integrations/vitest/index.d.mts +6 -0
  71. package/dist/build-integrations/vitest/index.mjs +6 -0
  72. package/dist/build-integrations/vitest/setup.d.mts +53 -0
  73. package/dist/build-integrations/vitest/setup.mjs +56 -0
  74. package/dist/build-integrations/vitest/setup.mjs.map +1 -0
  75. package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
  76. package/dist/build-integrations/vitest/stack-context.mjs +67 -0
  77. package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
  78. package/dist/cli/main.d.mts +5 -0
  79. package/dist/cli/main.mjs +586 -0
  80. package/dist/cli/main.mjs.map +1 -0
  81. package/dist/cli/prune-direct.mjs +216 -0
  82. package/dist/cli/prune-direct.mjs.map +1 -0
  83. package/dist/cli/snapshot-reader.mjs +73 -0
  84. package/dist/cli/snapshot-reader.mjs.map +1 -0
  85. package/dist/cli/up-lifecycle.mjs +28 -0
  86. package/dist/cli/up-lifecycle.mjs.map +1 -0
  87. package/dist/contracts/capability-decl.d.mts +42 -0
  88. package/dist/contracts/chain-probe.d.mts +26 -0
  89. package/dist/contracts/chain-probe.mjs +8 -0
  90. package/dist/contracts/chain-probe.mjs.map +1 -0
  91. package/dist/contracts/codegenable.d.mts +43 -0
  92. package/dist/contracts/container-runtime.d.mts +245 -0
  93. package/dist/contracts/liveness-classifier.d.mts +19 -0
  94. package/dist/contracts/network-resolver.d.mts +15 -0
  95. package/dist/contracts/network-resolver.mjs +7 -0
  96. package/dist/contracts/network-resolver.mjs.map +1 -0
  97. package/dist/contracts/projection.d.mts +15 -0
  98. package/dist/contracts/routable.d.mts +53 -0
  99. package/dist/contracts/snapshotable.d.mts +39 -0
  100. package/dist/contracts/strategy-contributor.d.mts +26 -0
  101. package/dist/index.d.mts +89 -0
  102. package/dist/index.mjs +37 -0
  103. package/dist/orchestrators/codegen/bindings.d.mts +2 -0
  104. package/dist/orchestrators/codegen/bindings.mjs +340 -0
  105. package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
  106. package/dist/orchestrators/codegen/emit.mjs +56 -0
  107. package/dist/orchestrators/codegen/emit.mjs.map +1 -0
  108. package/dist/orchestrators/codegen/errors.d.mts +1 -0
  109. package/dist/orchestrators/codegen/errors.mjs +66 -0
  110. package/dist/orchestrators/codegen/errors.mjs.map +1 -0
  111. package/dist/orchestrators/codegen/extras.mjs +16 -0
  112. package/dist/orchestrators/codegen/extras.mjs.map +1 -0
  113. package/dist/orchestrators/codegen/format.mjs +109 -0
  114. package/dist/orchestrators/codegen/format.mjs.map +1 -0
  115. package/dist/orchestrators/codegen/gitignore.mjs +67 -0
  116. package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
  117. package/dist/orchestrators/codegen/paths.d.mts +1 -0
  118. package/dist/orchestrators/codegen/paths.mjs +33 -0
  119. package/dist/orchestrators/codegen/paths.mjs.map +1 -0
  120. package/dist/orchestrators/codegen/permissions.mjs +6 -0
  121. package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
  122. package/dist/orchestrators/codegen/service.d.mts +1 -0
  123. package/dist/orchestrators/codegen/service.mjs +276 -0
  124. package/dist/orchestrators/codegen/service.mjs.map +1 -0
  125. package/dist/orchestrators/router/cleanup.mjs +58 -0
  126. package/dist/orchestrators/router/cleanup.mjs.map +1 -0
  127. package/dist/orchestrators/router/cors.mjs +31 -0
  128. package/dist/orchestrators/router/cors.mjs.map +1 -0
  129. package/dist/orchestrators/router/entrypoints.d.mts +1 -0
  130. package/dist/orchestrators/router/entrypoints.mjs +80 -0
  131. package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
  132. package/dist/orchestrators/router/errors.d.mts +1 -0
  133. package/dist/orchestrators/router/errors.mjs +103 -0
  134. package/dist/orchestrators/router/errors.mjs.map +1 -0
  135. package/dist/orchestrators/router/file-provider.d.mts +1 -0
  136. package/dist/orchestrators/router/file-provider.mjs +320 -0
  137. package/dist/orchestrators/router/file-provider.mjs.map +1 -0
  138. package/dist/orchestrators/router/hostname.d.mts +1 -0
  139. package/dist/orchestrators/router/hostname.mjs +107 -0
  140. package/dist/orchestrators/router/hostname.mjs.map +1 -0
  141. package/dist/orchestrators/router/index.d.mts +1 -0
  142. package/dist/orchestrators/router/profile.d.mts +1 -0
  143. package/dist/orchestrators/router/profile.mjs +109 -0
  144. package/dist/orchestrators/router/profile.mjs.map +1 -0
  145. package/dist/orchestrators/router/service.d.mts +3 -0
  146. package/dist/orchestrators/router/service.mjs +421 -0
  147. package/dist/orchestrators/router/service.mjs.map +1 -0
  148. package/dist/orchestrators/router/traefik-container.d.mts +1 -0
  149. package/dist/orchestrators/router/traefik-container.mjs +229 -0
  150. package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
  151. package/dist/orchestrators/runtime-composition.d.mts +10 -0
  152. package/dist/orchestrators/runtime-composition.mjs +168 -0
  153. package/dist/orchestrators/runtime-composition.mjs.map +1 -0
  154. package/dist/orchestrators/snapshot/capture.d.mts +1 -0
  155. package/dist/orchestrators/snapshot/capture.mjs +350 -0
  156. package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
  157. package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
  158. package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
  159. package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
  160. package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
  161. package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
  162. package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
  163. package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
  164. package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
  165. package/dist/orchestrators/snapshot/index.d.mts +1 -0
  166. package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
  167. package/dist/orchestrators/snapshot/integrity.mjs +74 -0
  168. package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
  169. package/dist/orchestrators/snapshot/prune.d.mts +1 -0
  170. package/dist/orchestrators/snapshot/prune.mjs +110 -0
  171. package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
  172. package/dist/orchestrators/snapshot/restore.d.mts +1 -0
  173. package/dist/orchestrators/snapshot/restore.mjs +404 -0
  174. package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
  175. package/dist/orchestrators/snapshot/service.d.mts +1 -0
  176. package/dist/orchestrators/snapshot/service.mjs +296 -0
  177. package/dist/orchestrators/snapshot/service.mjs.map +1 -0
  178. package/dist/orchestrators/snapshot/state-document.mjs +18 -0
  179. package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
  180. package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
  181. package/dist/orchestrators/snapshot/wipe.mjs +59 -0
  182. package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
  183. package/dist/plugins/account/codegen.d.mts +12 -0
  184. package/dist/plugins/account/codegen.mjs +22 -0
  185. package/dist/plugins/account/codegen.mjs.map +1 -0
  186. package/dist/plugins/account/errors.d.mts +44 -0
  187. package/dist/plugins/account/errors.mjs +16 -0
  188. package/dist/plugins/account/errors.mjs.map +1 -0
  189. package/dist/plugins/account/funding.d.mts +94 -0
  190. package/dist/plugins/account/funding.mjs +199 -0
  191. package/dist/plugins/account/funding.mjs.map +1 -0
  192. package/dist/plugins/account/index.d.mts +54 -0
  193. package/dist/plugins/account/index.mjs +151 -0
  194. package/dist/plugins/account/index.mjs.map +1 -0
  195. package/dist/plugins/account/keypair.d.mts +32 -0
  196. package/dist/plugins/account/keypair.mjs +99 -0
  197. package/dist/plugins/account/keypair.mjs.map +1 -0
  198. package/dist/plugins/account/lease.mjs +21 -0
  199. package/dist/plugins/account/lease.mjs.map +1 -0
  200. package/dist/plugins/account/registry.d.mts +33 -0
  201. package/dist/plugins/account/registry.mjs +36 -0
  202. package/dist/plugins/account/registry.mjs.map +1 -0
  203. package/dist/plugins/account/service.d.mts +104 -0
  204. package/dist/plugins/account/service.mjs +405 -0
  205. package/dist/plugins/account/service.mjs.map +1 -0
  206. package/dist/plugins/account/snapshot.mjs +33 -0
  207. package/dist/plugins/account/snapshot.mjs.map +1 -0
  208. package/dist/plugins/account/variants/env.mjs +24 -0
  209. package/dist/plugins/account/variants/env.mjs.map +1 -0
  210. package/dist/plugins/account/variants/ephemeral.mjs +72 -0
  211. package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
  212. package/dist/plugins/account/variants/impersonate.d.mts +16 -0
  213. package/dist/plugins/account/variants/impersonate.mjs +48 -0
  214. package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
  215. package/dist/plugins/account/variants/inline.mjs +13 -0
  216. package/dist/plugins/account/variants/inline.mjs.map +1 -0
  217. package/dist/plugins/account/variants/keystore.mjs +93 -0
  218. package/dist/plugins/account/variants/keystore.mjs.map +1 -0
  219. package/dist/plugins/account/variants/signer.mjs +31 -0
  220. package/dist/plugins/account/variants/signer.mjs.map +1 -0
  221. package/dist/plugins/action/build-context.d.mts +41 -0
  222. package/dist/plugins/action/discriminator.d.mts +20 -0
  223. package/dist/plugins/action/discriminator.mjs +13 -0
  224. package/dist/plugins/action/discriminator.mjs.map +1 -0
  225. package/dist/plugins/action/errors.d.mts +31 -0
  226. package/dist/plugins/action/errors.mjs +13 -0
  227. package/dist/plugins/action/errors.mjs.map +1 -0
  228. package/dist/plugins/action/execute.d.mts +2 -0
  229. package/dist/plugins/action/execute.mjs +145 -0
  230. package/dist/plugins/action/execute.mjs.map +1 -0
  231. package/dist/plugins/action/index.d.mts +56 -0
  232. package/dist/plugins/action/index.mjs +82 -0
  233. package/dist/plugins/action/index.mjs.map +1 -0
  234. package/dist/plugins/action/service.d.mts +26 -0
  235. package/dist/plugins/action/service.mjs +84 -0
  236. package/dist/plugins/action/service.mjs.map +1 -0
  237. package/dist/plugins/coin/address-resolution.d.mts +34 -0
  238. package/dist/plugins/coin/address-resolution.mjs +80 -0
  239. package/dist/plugins/coin/address-resolution.mjs.map +1 -0
  240. package/dist/plugins/coin/codegen.d.mts +16 -0
  241. package/dist/plugins/coin/codegen.mjs +21 -0
  242. package/dist/plugins/coin/codegen.mjs.map +1 -0
  243. package/dist/plugins/coin/discovery.d.mts +26 -0
  244. package/dist/plugins/coin/discovery.mjs +112 -0
  245. package/dist/plugins/coin/discovery.mjs.map +1 -0
  246. package/dist/plugins/coin/errors.d.mts +48 -0
  247. package/dist/plugins/coin/errors.mjs +13 -0
  248. package/dist/plugins/coin/errors.mjs.map +1 -0
  249. package/dist/plugins/coin/index.d.mts +95 -0
  250. package/dist/plugins/coin/index.mjs +172 -0
  251. package/dist/plugins/coin/index.mjs.map +1 -0
  252. package/dist/plugins/coin/metadata.d.mts +15 -0
  253. package/dist/plugins/coin/metadata.mjs +99 -0
  254. package/dist/plugins/coin/metadata.mjs.map +1 -0
  255. package/dist/plugins/coin/mint.d.mts +34 -0
  256. package/dist/plugins/coin/mint.mjs +164 -0
  257. package/dist/plugins/coin/mint.mjs.map +1 -0
  258. package/dist/plugins/coin/registry.d.mts +1 -0
  259. package/dist/plugins/coin/registry.mjs +37 -0
  260. package/dist/plugins/coin/registry.mjs.map +1 -0
  261. package/dist/plugins/coin/service.d.mts +47 -0
  262. package/dist/plugins/coin/service.mjs +51 -0
  263. package/dist/plugins/coin/service.mjs.map +1 -0
  264. package/dist/plugins/coin/snapshot.mjs +19 -0
  265. package/dist/plugins/coin/snapshot.mjs.map +1 -0
  266. package/dist/plugins/coin/type-strings.mjs +49 -0
  267. package/dist/plugins/coin/type-strings.mjs.map +1 -0
  268. package/dist/plugins/deepbook/codegen.d.mts +39 -0
  269. package/dist/plugins/deepbook/codegen.mjs +15 -0
  270. package/dist/plugins/deepbook/codegen.mjs.map +1 -0
  271. package/dist/plugins/deepbook/deploy.mjs +437 -0
  272. package/dist/plugins/deepbook/deploy.mjs.map +1 -0
  273. package/dist/plugins/deepbook/errors.d.mts +29 -0
  274. package/dist/plugins/deepbook/errors.mjs +26 -0
  275. package/dist/plugins/deepbook/errors.mjs.map +1 -0
  276. package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
  277. package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
  278. package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
  279. package/dist/plugins/deepbook/index.d.mts +171 -0
  280. package/dist/plugins/deepbook/index.mjs +359 -0
  281. package/dist/plugins/deepbook/index.mjs.map +1 -0
  282. package/dist/plugins/deepbook/plugin-key.mjs +7 -0
  283. package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
  284. package/dist/plugins/deepbook/pyth/index.mjs +226 -0
  285. package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
  286. package/dist/plugins/deepbook/routable.mjs +21 -0
  287. package/dist/plugins/deepbook/routable.mjs.map +1 -0
  288. package/dist/plugins/deepbook/snapshot.mjs +49 -0
  289. package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
  290. package/dist/plugins/deepbook/types.d.mts +125 -0
  291. package/dist/plugins/deepbook/types.mjs +12 -0
  292. package/dist/plugins/deepbook/types.mjs.map +1 -0
  293. package/dist/plugins/faucet/dispatcher.d.mts +9 -0
  294. package/dist/plugins/faucet/dispatcher.mjs +13 -0
  295. package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
  296. package/dist/plugins/faucet/errors.d.mts +86 -0
  297. package/dist/plugins/faucet/errors.mjs +19 -0
  298. package/dist/plugins/faucet/errors.mjs.map +1 -0
  299. package/dist/plugins/faucet/http.mjs +127 -0
  300. package/dist/plugins/faucet/http.mjs.map +1 -0
  301. package/dist/plugins/faucet/index.d.mts +43 -0
  302. package/dist/plugins/faucet/index.mjs +42 -0
  303. package/dist/plugins/faucet/index.mjs.map +1 -0
  304. package/dist/plugins/faucet/service.d.mts +20 -0
  305. package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
  306. package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
  307. package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
  308. package/dist/plugins/host-service/errors.d.mts +27 -0
  309. package/dist/plugins/host-service/errors.mjs +14 -0
  310. package/dist/plugins/host-service/errors.mjs.map +1 -0
  311. package/dist/plugins/host-service/index.d.mts +10 -0
  312. package/dist/plugins/host-service/index.mjs +48 -0
  313. package/dist/plugins/host-service/index.mjs.map +1 -0
  314. package/dist/plugins/host-service/routable.mjs +24 -0
  315. package/dist/plugins/host-service/routable.mjs.map +1 -0
  316. package/dist/plugins/host-service/service.d.mts +49 -0
  317. package/dist/plugins/host-service/service.mjs +375 -0
  318. package/dist/plugins/host-service/service.mjs.map +1 -0
  319. package/dist/plugins/package/build.d.mts +1 -0
  320. package/dist/plugins/package/build.mjs +24 -0
  321. package/dist/plugins/package/build.mjs.map +1 -0
  322. package/dist/plugins/package/codegen.d.mts +19 -0
  323. package/dist/plugins/package/codegen.mjs +41 -0
  324. package/dist/plugins/package/codegen.mjs.map +1 -0
  325. package/dist/plugins/package/dep-resolution.mjs +10 -0
  326. package/dist/plugins/package/dep-resolution.mjs.map +1 -0
  327. package/dist/plugins/package/errors.d.mts +34 -0
  328. package/dist/plugins/package/errors.mjs +13 -0
  329. package/dist/plugins/package/errors.mjs.map +1 -0
  330. package/dist/plugins/package/index.d.mts +109 -0
  331. package/dist/plugins/package/index.mjs +207 -0
  332. package/dist/plugins/package/index.mjs.map +1 -0
  333. package/dist/plugins/package/mode-known.mjs +41 -0
  334. package/dist/plugins/package/mode-known.mjs.map +1 -0
  335. package/dist/plugins/package/mode-local.d.mts +1 -0
  336. package/dist/plugins/package/mode-local.mjs +183 -0
  337. package/dist/plugins/package/mode-local.mjs.map +1 -0
  338. package/dist/plugins/package/publish-executor.mjs +202 -0
  339. package/dist/plugins/package/publish-executor.mjs.map +1 -0
  340. package/dist/plugins/package/publish-output.d.mts +28 -0
  341. package/dist/plugins/package/publish-output.mjs +45 -0
  342. package/dist/plugins/package/publish-output.mjs.map +1 -0
  343. package/dist/plugins/package/registry.d.mts +25 -0
  344. package/dist/plugins/package/registry.mjs +30 -0
  345. package/dist/plugins/package/registry.mjs.map +1 -0
  346. package/dist/plugins/package/service.mjs +20 -0
  347. package/dist/plugins/package/service.mjs.map +1 -0
  348. package/dist/plugins/package/snapshot.mjs +25 -0
  349. package/dist/plugins/package/snapshot.mjs.map +1 -0
  350. package/dist/plugins/postgres/codegen.mjs +42 -0
  351. package/dist/plugins/postgres/codegen.mjs.map +1 -0
  352. package/dist/plugins/postgres/connection.d.mts +33 -0
  353. package/dist/plugins/postgres/connection.mjs +19 -0
  354. package/dist/plugins/postgres/connection.mjs.map +1 -0
  355. package/dist/plugins/postgres/db-ensure.mjs +100 -0
  356. package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
  357. package/dist/plugins/postgres/errors.d.mts +55 -0
  358. package/dist/plugins/postgres/errors.mjs +29 -0
  359. package/dist/plugins/postgres/errors.mjs.map +1 -0
  360. package/dist/plugins/postgres/index.d.mts +37 -0
  361. package/dist/plugins/postgres/index.mjs +75 -0
  362. package/dist/plugins/postgres/index.mjs.map +1 -0
  363. package/dist/plugins/postgres/routable.mjs +33 -0
  364. package/dist/plugins/postgres/routable.mjs.map +1 -0
  365. package/dist/plugins/postgres/service.d.mts +50 -0
  366. package/dist/plugins/postgres/service.mjs +145 -0
  367. package/dist/plugins/postgres/service.mjs.map +1 -0
  368. package/dist/plugins/postgres/snapshot.d.mts +1 -0
  369. package/dist/plugins/postgres/snapshot.mjs +32 -0
  370. package/dist/plugins/postgres/snapshot.mjs.map +1 -0
  371. package/dist/plugins/router-entrypoints.mjs +21 -0
  372. package/dist/plugins/router-entrypoints.mjs.map +1 -0
  373. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
  374. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
  375. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
  376. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
  377. package/dist/plugins/seal/codegen.d.mts +19 -0
  378. package/dist/plugins/seal/codegen.mjs +16 -0
  379. package/dist/plugins/seal/codegen.mjs.map +1 -0
  380. package/dist/plugins/seal/config-render.mjs +82 -0
  381. package/dist/plugins/seal/config-render.mjs.map +1 -0
  382. package/dist/plugins/seal/deploy.mjs +198 -0
  383. package/dist/plugins/seal/deploy.mjs.map +1 -0
  384. package/dist/plugins/seal/errors.d.mts +52 -0
  385. package/dist/plugins/seal/errors.mjs +19 -0
  386. package/dist/plugins/seal/errors.mjs.map +1 -0
  387. package/dist/plugins/seal/index.d.mts +161 -0
  388. package/dist/plugins/seal/index.mjs +235 -0
  389. package/dist/plugins/seal/index.mjs.map +1 -0
  390. package/dist/plugins/seal/key-manager.d.mts +22 -0
  391. package/dist/plugins/seal/key-manager.mjs +22 -0
  392. package/dist/plugins/seal/key-manager.mjs.map +1 -0
  393. package/dist/plugins/seal/key-server.mjs +175 -0
  394. package/dist/plugins/seal/key-server.mjs.map +1 -0
  395. package/dist/plugins/seal/keygen.mjs +96 -0
  396. package/dist/plugins/seal/keygen.mjs.map +1 -0
  397. package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
  398. package/dist/plugins/seal/mode/fork-known.mjs +23 -0
  399. package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
  400. package/dist/plugins/seal/mode/live.d.mts +18 -0
  401. package/dist/plugins/seal/mode/live.mjs +64 -0
  402. package/dist/plugins/seal/mode/live.mjs.map +1 -0
  403. package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
  404. package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
  405. package/dist/plugins/seal/plugin-key.mjs +7 -0
  406. package/dist/plugins/seal/plugin-key.mjs.map +1 -0
  407. package/dist/plugins/seal/registry-publish.d.mts +43 -0
  408. package/dist/plugins/seal/registry-publish.mjs +9 -0
  409. package/dist/plugins/seal/registry-publish.mjs.map +1 -0
  410. package/dist/plugins/seal/routable.mjs +57 -0
  411. package/dist/plugins/seal/routable.mjs.map +1 -0
  412. package/dist/plugins/seal/service.mjs +17 -0
  413. package/dist/plugins/seal/service.mjs.map +1 -0
  414. package/dist/plugins/seal/snapshot.mjs +51 -0
  415. package/dist/plugins/seal/snapshot.mjs.map +1 -0
  416. package/dist/plugins/sui/auto-tick.mjs +45 -0
  417. package/dist/plugins/sui/auto-tick.mjs.map +1 -0
  418. package/dist/plugins/sui/chain-build-container.d.mts +1 -0
  419. package/dist/plugins/sui/chain-probe.d.mts +85 -0
  420. package/dist/plugins/sui/chain-probe.mjs +104 -0
  421. package/dist/plugins/sui/chain-probe.mjs.map +1 -0
  422. package/dist/plugins/sui/codegen.d.mts +14 -0
  423. package/dist/plugins/sui/codegen.mjs +26 -0
  424. package/dist/plugins/sui/codegen.mjs.map +1 -0
  425. package/dist/plugins/sui/errors.d.mts +74 -0
  426. package/dist/plugins/sui/errors.mjs +28 -0
  427. package/dist/plugins/sui/errors.mjs.map +1 -0
  428. package/dist/plugins/sui/fork-orchestration.mjs +24 -0
  429. package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
  430. package/dist/plugins/sui/fork-transaction.mjs +96 -0
  431. package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
  432. package/dist/plugins/sui/index.d.mts +318 -0
  433. package/dist/plugins/sui/index.mjs +182 -0
  434. package/dist/plugins/sui/index.mjs.map +1 -0
  435. package/dist/plugins/sui/mode/external.mjs +60 -0
  436. package/dist/plugins/sui/mode/external.mjs.map +1 -0
  437. package/dist/plugins/sui/mode/fork.mjs +283 -0
  438. package/dist/plugins/sui/mode/fork.mjs.map +1 -0
  439. package/dist/plugins/sui/mode/live.mjs +103 -0
  440. package/dist/plugins/sui/mode/live.mjs.map +1 -0
  441. package/dist/plugins/sui/mode/local.mjs +293 -0
  442. package/dist/plugins/sui/mode/local.mjs.map +1 -0
  443. package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
  444. package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
  445. package/dist/plugins/sui/mode/shared.d.mts +103 -0
  446. package/dist/plugins/sui/mode/shared.mjs +12 -0
  447. package/dist/plugins/sui/mode/shared.mjs.map +1 -0
  448. package/dist/plugins/sui/mode/spec.d.mts +94 -0
  449. package/dist/plugins/sui/network-resolver.d.mts +23 -0
  450. package/dist/plugins/sui/routable.mjs +88 -0
  451. package/dist/plugins/sui/routable.mjs.map +1 -0
  452. package/dist/plugins/sui/seed-objects.d.mts +18 -0
  453. package/dist/plugins/sui/seed-objects.mjs +25 -0
  454. package/dist/plugins/sui/seed-objects.mjs.map +1 -0
  455. package/dist/plugins/sui/service.mjs +38 -0
  456. package/dist/plugins/sui/service.mjs.map +1 -0
  457. package/dist/plugins/sui/snapshot.mjs +53 -0
  458. package/dist/plugins/sui/snapshot.mjs.map +1 -0
  459. package/dist/plugins/wallet/codegen.d.mts +33 -0
  460. package/dist/plugins/wallet/codegen.mjs +34 -0
  461. package/dist/plugins/wallet/codegen.mjs.map +1 -0
  462. package/dist/plugins/wallet/errors.d.mts +66 -0
  463. package/dist/plugins/wallet/errors.mjs +16 -0
  464. package/dist/plugins/wallet/errors.mjs.map +1 -0
  465. package/dist/plugins/wallet/index.d.mts +63 -0
  466. package/dist/plugins/wallet/index.mjs +126 -0
  467. package/dist/plugins/wallet/index.mjs.map +1 -0
  468. package/dist/plugins/wallet/origin-policy.d.mts +1 -0
  469. package/dist/plugins/wallet/origin-policy.mjs +65 -0
  470. package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
  471. package/dist/plugins/wallet/pairing.d.mts +11 -0
  472. package/dist/plugins/wallet/pairing.mjs +125 -0
  473. package/dist/plugins/wallet/pairing.mjs.map +1 -0
  474. package/dist/plugins/wallet/protocol.d.mts +1 -0
  475. package/dist/plugins/wallet/protocol.mjs +96 -0
  476. package/dist/plugins/wallet/protocol.mjs.map +1 -0
  477. package/dist/plugins/wallet/routable.mjs +32 -0
  478. package/dist/plugins/wallet/routable.mjs.map +1 -0
  479. package/dist/plugins/wallet/server.d.mts +12 -0
  480. package/dist/plugins/wallet/server.mjs +317 -0
  481. package/dist/plugins/wallet/server.mjs.map +1 -0
  482. package/dist/plugins/wallet/service.d.mts +68 -0
  483. package/dist/plugins/wallet/service.mjs +97 -0
  484. package/dist/plugins/wallet/service.mjs.map +1 -0
  485. package/dist/plugins/wallet/snapshot.d.mts +1 -0
  486. package/dist/plugins/wallet/snapshot.mjs +14 -0
  487. package/dist/plugins/wallet/snapshot.mjs.map +1 -0
  488. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
  489. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
  490. package/dist/plugins/walrus/codegen.d.mts +38 -0
  491. package/dist/plugins/walrus/codegen.mjs +34 -0
  492. package/dist/plugins/walrus/codegen.mjs.map +1 -0
  493. package/dist/plugins/walrus/deploy-paths.mjs +14 -0
  494. package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
  495. package/dist/plugins/walrus/deploy.d.mts +1 -0
  496. package/dist/plugins/walrus/deploy.mjs +224 -0
  497. package/dist/plugins/walrus/deploy.mjs.map +1 -0
  498. package/dist/plugins/walrus/errors.d.mts +38 -0
  499. package/dist/plugins/walrus/errors.mjs +26 -0
  500. package/dist/plugins/walrus/errors.mjs.map +1 -0
  501. package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
  502. package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
  503. package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
  504. package/dist/plugins/walrus/index.d.mts +177 -0
  505. package/dist/plugins/walrus/index.mjs +284 -0
  506. package/dist/plugins/walrus/index.mjs.map +1 -0
  507. package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
  508. package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
  509. package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
  510. package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
  511. package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
  512. package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
  513. package/dist/plugins/walrus/plugin-key.mjs +7 -0
  514. package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
  515. package/dist/plugins/walrus/registry-publish.d.mts +24 -0
  516. package/dist/plugins/walrus/registry-publish.mjs +7 -0
  517. package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
  518. package/dist/plugins/walrus/routable.mjs +99 -0
  519. package/dist/plugins/walrus/routable.mjs.map +1 -0
  520. package/dist/plugins/walrus/service.mjs +20 -0
  521. package/dist/plugins/walrus/service.mjs.map +1 -0
  522. package/dist/plugins/walrus/snapshot.mjs +53 -0
  523. package/dist/plugins/walrus/snapshot.mjs.map +1 -0
  524. package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
  525. package/dist/plugins/walrus/storage-nodes.mjs +154 -0
  526. package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
  527. package/dist/plugins/walrus/wal-swap.d.mts +2 -0
  528. package/dist/plugins/walrus/wal-swap.mjs +58 -0
  529. package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
  530. package/dist/primitives/artifact-publisher.d.mts +12 -0
  531. package/dist/primitives/cache.d.mts +1 -0
  532. package/dist/runtime/built-in-plugin-layers.mjs +49 -0
  533. package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
  534. package/dist/runtime/docker/client.d.mts +2 -0
  535. package/dist/runtime/docker/client.mjs +54 -0
  536. package/dist/runtime/docker/client.mjs.map +1 -0
  537. package/dist/runtime/docker/container.d.mts +1 -0
  538. package/dist/runtime/docker/container.mjs +562 -0
  539. package/dist/runtime/docker/container.mjs.map +1 -0
  540. package/dist/runtime/docker/errors.d.mts +1 -0
  541. package/dist/runtime/docker/errors.mjs +187 -0
  542. package/dist/runtime/docker/errors.mjs.map +1 -0
  543. package/dist/runtime/docker/exec.d.mts +1 -0
  544. package/dist/runtime/docker/exec.mjs +63 -0
  545. package/dist/runtime/docker/exec.mjs.map +1 -0
  546. package/dist/runtime/docker/image.d.mts +1 -0
  547. package/dist/runtime/docker/image.mjs +278 -0
  548. package/dist/runtime/docker/image.mjs.map +1 -0
  549. package/dist/runtime/docker/index.d.mts +1 -0
  550. package/dist/runtime/docker/inventory.d.mts +1 -0
  551. package/dist/runtime/docker/inventory.mjs +167 -0
  552. package/dist/runtime/docker/inventory.mjs.map +1 -0
  553. package/dist/runtime/docker/labels.d.mts +1 -0
  554. package/dist/runtime/docker/labels.mjs +97 -0
  555. package/dist/runtime/docker/labels.mjs.map +1 -0
  556. package/dist/runtime/docker/logs.d.mts +1 -0
  557. package/dist/runtime/docker/logs.mjs +34 -0
  558. package/dist/runtime/docker/logs.mjs.map +1 -0
  559. package/dist/runtime/docker/network.d.mts +1 -0
  560. package/dist/runtime/docker/network.mjs +168 -0
  561. package/dist/runtime/docker/network.mjs.map +1 -0
  562. package/dist/runtime/docker/service.d.mts +9 -0
  563. package/dist/runtime/docker/service.mjs +266 -0
  564. package/dist/runtime/docker/service.mjs.map +1 -0
  565. package/dist/runtime/docker/sweep.d.mts +1 -0
  566. package/dist/runtime/docker/sweep.mjs +220 -0
  567. package/dist/runtime/docker/sweep.mjs.map +1 -0
  568. package/dist/runtime/docker/volume.d.mts +1 -0
  569. package/dist/runtime/docker/volume.mjs +24 -0
  570. package/dist/runtime/docker/volume.mjs.map +1 -0
  571. package/dist/runtime/docker/wrap.d.mts +1 -0
  572. package/dist/runtime/docker/wrap.mjs +131 -0
  573. package/dist/runtime/docker/wrap.mjs.map +1 -0
  574. package/dist/substrate/brand.d.mts +24 -0
  575. package/dist/substrate/brand.mjs +14 -0
  576. package/dist/substrate/brand.mjs.map +1 -0
  577. package/dist/substrate/cross-process.d.mts +1 -0
  578. package/dist/substrate/cross-process.mjs +28 -0
  579. package/dist/substrate/cross-process.mjs.map +1 -0
  580. package/dist/substrate/events.d.mts +117 -0
  581. package/dist/substrate/identity.d.mts +13 -0
  582. package/dist/substrate/lifecycle.d.mts +12 -0
  583. package/dist/substrate/manifest.d.mts +39 -0
  584. package/dist/substrate/manifest.mjs +33 -0
  585. package/dist/substrate/manifest.mjs.map +1 -0
  586. package/dist/substrate/network.d.mts +34 -0
  587. package/dist/substrate/options.d.mts +23 -0
  588. package/dist/substrate/plugin.d.mts +101 -0
  589. package/dist/substrate/plugin.mjs +61 -0
  590. package/dist/substrate/plugin.mjs.map +1 -0
  591. package/dist/substrate/projection.d.mts +100 -0
  592. package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
  593. package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
  594. package/dist/substrate/runtime/atomic-write.mjs +106 -0
  595. package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
  596. package/dist/substrate/runtime/cache/index.d.mts +1 -0
  597. package/dist/substrate/runtime/cache/schema.d.mts +1 -0
  598. package/dist/substrate/runtime/cache/schema.mjs +22 -0
  599. package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
  600. package/dist/substrate/runtime/cache/service.d.mts +1 -0
  601. package/dist/substrate/runtime/cache/service.mjs +89 -0
  602. package/dist/substrate/runtime/cache/service.mjs.map +1 -0
  603. package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
  604. package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
  605. package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
  606. package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
  607. package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
  608. package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
  609. package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
  610. package/dist/substrate/runtime/config-validation.d.mts +38 -0
  611. package/dist/substrate/runtime/config-validation.mjs +137 -0
  612. package/dist/substrate/runtime/config-validation.mjs.map +1 -0
  613. package/dist/substrate/runtime/context-helpers.mjs +32 -0
  614. package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
  615. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
  616. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
  617. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
  618. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
  619. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
  620. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
  621. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
  622. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
  623. package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
  624. package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
  625. package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
  626. package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
  627. package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
  628. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
  629. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
  630. package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
  631. package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
  632. package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
  633. package/dist/substrate/runtime/current-plugin.mjs +15 -0
  634. package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
  635. package/dist/substrate/runtime/errors.d.mts +1 -0
  636. package/dist/substrate/runtime/errors.mjs +76 -0
  637. package/dist/substrate/runtime/errors.mjs.map +1 -0
  638. package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
  639. package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
  640. package/dist/substrate/runtime/http-probe.d.mts +35 -0
  641. package/dist/substrate/runtime/http-probe.mjs +65 -0
  642. package/dist/substrate/runtime/http-probe.mjs.map +1 -0
  643. package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
  644. package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
  645. package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
  646. package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
  647. package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
  648. package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
  649. package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
  650. package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
  651. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
  652. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
  653. package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
  654. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
  655. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
  656. package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
  657. package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
  658. package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
  659. package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
  660. package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
  661. package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
  662. package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
  663. package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
  664. package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
  665. package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
  666. package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
  667. package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
  668. package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
  669. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
  670. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
  671. package/dist/substrate/runtime/managed-container.d.mts +30 -0
  672. package/dist/substrate/runtime/managed-container.mjs +32 -0
  673. package/dist/substrate/runtime/managed-container.mjs.map +1 -0
  674. package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
  675. package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
  676. package/dist/substrate/runtime/mode-errors.d.mts +36 -0
  677. package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
  678. package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
  679. package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
  680. package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
  681. package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
  682. package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
  683. package/dist/substrate/runtime/observability/index.d.mts +3 -0
  684. package/dist/substrate/runtime/observability/logger.d.mts +58 -0
  685. package/dist/substrate/runtime/observability/logger.mjs +89 -0
  686. package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
  687. package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
  688. package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
  689. package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
  690. package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
  691. package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
  692. package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
  693. package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
  694. package/dist/substrate/runtime/observability/redaction.mjs +45 -0
  695. package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
  696. package/dist/substrate/runtime/observability/spans.d.mts +1 -0
  697. package/dist/substrate/runtime/observability/spans.mjs +87 -0
  698. package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
  699. package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
  700. package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
  701. package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
  702. package/dist/substrate/runtime/paths.d.mts +17 -0
  703. package/dist/substrate/runtime/paths.mjs +61 -0
  704. package/dist/substrate/runtime/paths.mjs.map +1 -0
  705. package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
  706. package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
  707. package/dist/substrate/runtime/port-broker/service.mjs +319 -0
  708. package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
  709. package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
  710. package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
  711. package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
  712. package/dist/substrate/runtime/probes.d.mts +51 -0
  713. package/dist/substrate/runtime/probes.mjs +84 -0
  714. package/dist/substrate/runtime/probes.mjs.map +1 -0
  715. package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
  716. package/dist/substrate/runtime/process-supervisor.mjs +73 -0
  717. package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
  718. package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
  719. package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
  720. package/dist/substrate/runtime/projection/persisted.mjs +195 -0
  721. package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
  722. package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
  723. package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
  724. package/dist/substrate/runtime/projection/update.mjs +200 -0
  725. package/dist/substrate/runtime/projection/update.mjs.map +1 -0
  726. package/dist/substrate/runtime/retry-policy.d.mts +18 -0
  727. package/dist/substrate/runtime/retry-policy.mjs +16 -0
  728. package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
  729. package/dist/substrate/runtime/run.mjs +86 -0
  730. package/dist/substrate/runtime/run.mjs.map +1 -0
  731. package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
  732. package/dist/substrate/runtime/runtime-decode.mjs +53 -0
  733. package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
  734. package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
  735. package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
  736. package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
  737. package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
  738. package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
  739. package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
  740. package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
  741. package/dist/substrate/runtime/state-store/schema.mjs +36 -0
  742. package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
  743. package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
  744. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
  745. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
  746. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
  747. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
  748. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
  749. package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
  750. package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
  751. package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
  752. package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
  753. package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
  754. package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
  755. package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
  756. package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
  757. package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
  758. package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
  759. package/dist/substrate/runtime/supervisor.d.mts +1 -0
  760. package/dist/substrate/runtime/supervisor.mjs +831 -0
  761. package/dist/substrate/runtime/supervisor.mjs.map +1 -0
  762. package/dist/surfaces/cli/command-tree.mjs +276 -0
  763. package/dist/surfaces/cli/command-tree.mjs.map +1 -0
  764. package/dist/surfaces/cli/commands/config.mjs +31 -0
  765. package/dist/surfaces/cli/commands/config.mjs.map +1 -0
  766. package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
  767. package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
  768. package/dist/surfaces/cli/commands/confirm.mjs +26 -0
  769. package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
  770. package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
  771. package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
  772. package/dist/surfaces/cli/commands/doctor.mjs +38 -0
  773. package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
  774. package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
  775. package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
  776. package/dist/surfaces/cli/commands/prune.mjs +178 -0
  777. package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
  778. package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
  779. package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
  780. package/dist/surfaces/cli/commands/status.mjs +95 -0
  781. package/dist/surfaces/cli/commands/status.mjs.map +1 -0
  782. package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
  783. package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
  784. package/dist/surfaces/cli/commands/wipe.mjs +28 -0
  785. package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
  786. package/dist/surfaces/cli/envelope.mjs +43 -0
  787. package/dist/surfaces/cli/envelope.mjs.map +1 -0
  788. package/dist/surfaces/cli/errors.mjs +110 -0
  789. package/dist/surfaces/cli/errors.mjs.map +1 -0
  790. package/dist/surfaces/cli/flags.mjs +56 -0
  791. package/dist/surfaces/cli/flags.mjs.map +1 -0
  792. package/dist/surfaces/cli/index.mjs +418 -0
  793. package/dist/surfaces/cli/index.mjs.map +1 -0
  794. package/dist/surfaces/cli/output.mjs +115 -0
  795. package/dist/surfaces/cli/output.mjs.map +1 -0
  796. package/dist/surfaces/cli/sysexits.mjs +139 -0
  797. package/dist/surfaces/cli/sysexits.mjs.map +1 -0
  798. package/dist/surfaces/tui/app.mjs +104 -0
  799. package/dist/surfaces/tui/app.mjs.map +1 -0
  800. package/dist/surfaces/tui/dashboard.mjs +261 -0
  801. package/dist/surfaces/tui/dashboard.mjs.map +1 -0
  802. package/dist/surfaces/tui/display-derivation.mjs +395 -0
  803. package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
  804. package/dist/surfaces/tui/errors.mjs +11 -0
  805. package/dist/surfaces/tui/errors.mjs.map +1 -0
  806. package/dist/surfaces/tui/event-log.mjs +155 -0
  807. package/dist/surfaces/tui/event-log.mjs.map +1 -0
  808. package/dist/surfaces/tui/heartbeat.mjs +33 -0
  809. package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
  810. package/dist/surfaces/tui/index.mjs +50 -0
  811. package/dist/surfaces/tui/index.mjs.map +1 -0
  812. package/dist/surfaces/tui/input.mjs +104 -0
  813. package/dist/surfaces/tui/input.mjs.map +1 -0
  814. package/dist/surfaces/tui/mode-detect.mjs +32 -0
  815. package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
  816. package/dist/surfaces/tui/mount-ink.mjs +31 -0
  817. package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
  818. package/dist/surfaces/tui/plain-renderer.mjs +170 -0
  819. package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
  820. package/dist/surfaces/tui/resource-table.mjs +507 -0
  821. package/dist/surfaces/tui/resource-table.mjs.map +1 -0
  822. package/images/_shared/signal-forward.sh +77 -0
  823. package/images/postgres/Dockerfile +32 -0
  824. package/images/seal/Dockerfile +68 -0
  825. package/images/seal/entrypoint.sh +65 -0
  826. package/images/sui/Dockerfile +73 -0
  827. package/images/sui/entrypoint.sh +244 -0
  828. package/images/sui-fork/Dockerfile +53 -0
  829. package/images/sui-fork/entrypoint.sh +51 -0
  830. package/images/walrus/Dockerfile +122 -0
  831. package/images/walrus/deploy-walrus.sh +305 -0
  832. package/images/walrus/run-walrus.sh +53 -0
  833. package/package.json +94 -0
@@ -0,0 +1,62 @@
1
+ import { TestSetupOptions } from "./setup.mjs";
2
+ import { ViteUserConfig } from "vitest/config";
3
+
4
+ //#region src/build-integrations/vitest/config.d.ts
5
+ interface DevstackVitestTestConfigOptions {
6
+ /** Extra `test` fields. Caller-provided keys win over the preset's
7
+ * defaults; the preset's include/exclude/passWithNoTests are the
8
+ * start, the caller's fields are merged shallowly. */
9
+ readonly test?: NonNullable<ViteUserConfig['test']>;
10
+ /** Wire the devstack `beforeAll` / `afterAll` setup file. `true`
11
+ * uses defaults; an options object configures the captured
12
+ * fixture (e.g. `{ requireDevstack: true }`). Default: not wired. */
13
+ readonly testSetup?: boolean | TestSetupOptions;
14
+ /** Enable vitest's typecheck pass. Default `false` — most apps
15
+ * run `tsc` outside vitest. */
16
+ readonly typecheck?: boolean;
17
+ /** Threading mode. `'single'` forces a single thread (needed when
18
+ * tests share devstack state); `'multi'` keeps vitest's default
19
+ * worker pool. Default: vitest default (`undefined`). */
20
+ readonly threads?: 'single' | 'multi';
21
+ /** Absolute path to a user-authored setup file. When set, it is
22
+ * appended to `test.setupFiles` AFTER the devstack setup file (so
23
+ * the user file sees the captured StackContext via
24
+ * `getStackContext()`). */
25
+ readonly setupFile?: string;
26
+ }
27
+ /**
28
+ * Build the devstack-owned part of Vitest's `test` block. Apps keep a
29
+ * normal `defineConfig(...)` call and compose this value into it:
30
+ *
31
+ * import { defineConfig } from 'vitest/config';
32
+ * import { devstackVitestServerConfig, devstackVitestTestConfig }
33
+ * from '@mysten-incubation/devstack/vitest';
34
+ *
35
+ * export default defineConfig({
36
+ * server: devstackVitestServerConfig(),
37
+ * test: devstackVitestTestConfig(),
38
+ * });
39
+ *
40
+ * For chain-mode integration tests against a real devstack, build a
41
+ * devstack handle and pass `handle.layer` to `@effect/vitest`'s
42
+ * `it.layer(...)` directly. This helper does not boot devstack — the
43
+ * test file owns its lifecycle.
44
+ *
45
+ * For suites that need a shared StackContext fixture (manifest read
46
+ * once per file), opt into the setup file:
47
+ *
48
+ * test: devstackVitestTestConfig({
49
+ * testSetup: { requireDevstack: true },
50
+ * })
51
+ *
52
+ * The setup file's `beforeAll` populates a captured fixture readable
53
+ * via `getStackContext()` from inside `it`/`test` bodies.
54
+ */
55
+ declare const devstackVitestTestConfig: (options?: DevstackVitestTestConfigOptions) => NonNullable<ViteUserConfig["test"]>;
56
+ /** Build the devstack-owned part of Vitest's Vite server config.
57
+ * Callers that need additional server options should merge them in
58
+ * their own `defineConfig(...)` file. */
59
+ declare const devstackVitestServerConfig: () => NonNullable<ViteUserConfig["server"]>;
60
+ //#endregion
61
+ export { DevstackVitestTestConfigOptions, devstackVitestServerConfig, devstackVitestTestConfig };
62
+ //# sourceMappingURL=config.d.mts.map
@@ -0,0 +1,80 @@
1
+ //#region src/build-integrations/vitest/config.ts
2
+ /** Path to the bundled devstack setup file. The preset injects this
3
+ * via `test.setupFiles` when `opts.testSetup` is truthy. The literal
4
+ * string is the module's import specifier so vitest resolves it like
5
+ * any other npm package; an apps-level resolver finds it via the
6
+ * package's `./vitest/setup` subpath (added to package.json
7
+ * `exports` alongside the integration). */
8
+ const DEVSTACK_SETUP_MODULE = "@mysten-incubation/devstack/vitest/setup";
9
+ /** Runtime-root prefix the watcher MUST ignore — per architecture §
10
+ * Invariants → "No-restart on harmless changes". The 500ms manifest
11
+ * tick would otherwise re-trigger reloads. */
12
+ const WATCH_IGNORED_PATTERNS = [
13
+ "**/.devstack/**",
14
+ "**/node_modules/**",
15
+ "**/dist/**"
16
+ ];
17
+ /**
18
+ * Build the devstack-owned part of Vitest's `test` block. Apps keep a
19
+ * normal `defineConfig(...)` call and compose this value into it:
20
+ *
21
+ * import { defineConfig } from 'vitest/config';
22
+ * import { devstackVitestServerConfig, devstackVitestTestConfig }
23
+ * from '@mysten-incubation/devstack/vitest';
24
+ *
25
+ * export default defineConfig({
26
+ * server: devstackVitestServerConfig(),
27
+ * test: devstackVitestTestConfig(),
28
+ * });
29
+ *
30
+ * For chain-mode integration tests against a real devstack, build a
31
+ * devstack handle and pass `handle.layer` to `@effect/vitest`'s
32
+ * `it.layer(...)` directly. This helper does not boot devstack — the
33
+ * test file owns its lifecycle.
34
+ *
35
+ * For suites that need a shared StackContext fixture (manifest read
36
+ * once per file), opt into the setup file:
37
+ *
38
+ * test: devstackVitestTestConfig({
39
+ * testSetup: { requireDevstack: true },
40
+ * })
41
+ *
42
+ * The setup file's `beforeAll` populates a captured fixture readable
43
+ * via `getStackContext()` from inside `it`/`test` bodies.
44
+ */
45
+ const devstackVitestTestConfig = (options = {}) => {
46
+ const setupFiles = [];
47
+ if (options.testSetup) setupFiles.push(DEVSTACK_SETUP_MODULE);
48
+ if (options.setupFile !== void 0) setupFiles.push(options.setupFile);
49
+ const threadOverride = options.threads === "single" ? {
50
+ pool: "threads",
51
+ fileParallelism: false
52
+ } : options.threads === "multi" ? {
53
+ pool: "threads",
54
+ fileParallelism: true
55
+ } : {};
56
+ const typecheckOverride = options.typecheck === true ? { typecheck: { enabled: true } } : {};
57
+ return {
58
+ include: ["src/**/*.{test,spec}.ts?(x)", "test/**/*.{test,spec}.ts?(x)"],
59
+ exclude: [
60
+ "e2e/**",
61
+ "node_modules",
62
+ "dist",
63
+ ".turbo",
64
+ "**/.devstack/**"
65
+ ],
66
+ passWithNoTests: true,
67
+ ...setupFiles.length > 0 ? { setupFiles } : {},
68
+ ...threadOverride,
69
+ ...typecheckOverride,
70
+ ...options.test
71
+ };
72
+ };
73
+ /** Build the devstack-owned part of Vitest's Vite server config.
74
+ * Callers that need additional server options should merge them in
75
+ * their own `defineConfig(...)` file. */
76
+ const devstackVitestServerConfig = () => ({ watch: { ignored: WATCH_IGNORED_PATTERNS } });
77
+ //#endregion
78
+ export { devstackVitestServerConfig, devstackVitestTestConfig };
79
+
80
+ //# sourceMappingURL=config.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"config.mjs","names":[],"sources":["../../../src/build-integrations/vitest/config.ts"],"sourcesContent":["// Vitest build-integration config helpers.\n//\n// Architecture (distilled/23-build-integrations.md § Per-integration\n// requirements → Vitest, § Outputs / capabilities, § Invariants):\n// - Canonical include/exclude: src globs in, e2e/dist/node_modules\n// out (`e2e/**` runs through the Playwright integration).\n// - `passWithNoTests: true` so codegen-derived stacks without unit\n// tests yet don't fail CI.\n// - `@effect/vitest` is declared as an optional peer — the preset\n// itself does not import it. Suites using `it.layer(stack.layer)`\n// bring it in directly.\n// - No-restart on harmless changes: watch ignores `<runtimeRoot>/**`\n// so the ~500ms manifest tick doesn't trigger a reload loop.\n//\n// Optional knobs:\n// - `testSetup: true | TestSetupOptions` wires the devstack\n// setup file (`./setup.ts`) automatically via `test.setupFiles`.\n// - `typecheck: true` opts INTO vitest's typecheck pass (off by\n// default — apps typically run `tsc` separately).\n// - `threads: 'single' | 'multi'` picks `pool: 'threads'` and toggles\n// `fileParallelism` (vitest 4: top-level `fileParallelism: false`\n// replaces the v3 `poolOptions.threads.singleThread`) for\n// stack-shared-state suites that can't safely parallelize.\n// - Caller-provided `test` fields win over the preset's defaults.\n//\n// No I/O happens at config-build time (per architecture § Lifecycle\n// states: vitest preset call is synchronous + side-effect free).\n\nimport type { ViteUserConfig } from 'vitest/config';\n\nimport type { TestSetupOptions } from './setup.ts';\n\n// -----------------------------------------------------------------------------\n// Public options\n// -----------------------------------------------------------------------------\n\nexport interface DevstackVitestTestConfigOptions {\n\t/** Extra `test` fields. Caller-provided keys win over the preset's\n\t * defaults; the preset's include/exclude/passWithNoTests are the\n\t * start, the caller's fields are merged shallowly. */\n\treadonly test?: NonNullable<ViteUserConfig['test']>;\n\t/** Wire the devstack `beforeAll` / `afterAll` setup file. `true`\n\t * uses defaults; an options object configures the captured\n\t * fixture (e.g. `{ requireDevstack: true }`). Default: not wired. */\n\treadonly testSetup?: boolean | TestSetupOptions;\n\t/** Enable vitest's typecheck pass. Default `false` — most apps\n\t * run `tsc` outside vitest. */\n\treadonly typecheck?: boolean;\n\t/** Threading mode. `'single'` forces a single thread (needed when\n\t * tests share devstack state); `'multi'` keeps vitest's default\n\t * worker pool. Default: vitest default (`undefined`). */\n\treadonly threads?: 'single' | 'multi';\n\t/** Absolute path to a user-authored setup file. When set, it is\n\t * appended to `test.setupFiles` AFTER the devstack setup file (so\n\t * the user file sees the captured StackContext via\n\t * `getStackContext()`). */\n\treadonly setupFile?: string;\n}\n\n// -----------------------------------------------------------------------------\n// Internals\n// -----------------------------------------------------------------------------\n\n/** Path to the bundled devstack setup file. The preset injects this\n * via `test.setupFiles` when `opts.testSetup` is truthy. The literal\n * string is the module's import specifier so vitest resolves it like\n * any other npm package; an apps-level resolver finds it via the\n * package's `./vitest/setup` subpath (added to package.json\n * `exports` alongside the integration). */\nconst DEVSTACK_SETUP_MODULE = '@mysten-incubation/devstack/vitest/setup';\n\n/** Runtime-root prefix the watcher MUST ignore — per architecture §\n * Invariants → \"No-restart on harmless changes\". The 500ms manifest\n * tick would otherwise re-trigger reloads. */\nconst WATCH_IGNORED_PATTERNS = ['**/.devstack/**', '**/node_modules/**', '**/dist/**'];\n\n// -----------------------------------------------------------------------------\n// Public surface\n// -----------------------------------------------------------------------------\n\n/**\n * Build the devstack-owned part of Vitest's `test` block. Apps keep a\n * normal `defineConfig(...)` call and compose this value into it:\n *\n * import { defineConfig } from 'vitest/config';\n * import { devstackVitestServerConfig, devstackVitestTestConfig }\n * from '@mysten-incubation/devstack/vitest';\n *\n * export default defineConfig({\n * server: devstackVitestServerConfig(),\n * test: devstackVitestTestConfig(),\n * });\n *\n * For chain-mode integration tests against a real devstack, build a\n * devstack handle and pass `handle.layer` to `@effect/vitest`'s\n * `it.layer(...)` directly. This helper does not boot devstack — the\n * test file owns its lifecycle.\n *\n * For suites that need a shared StackContext fixture (manifest read\n * once per file), opt into the setup file:\n *\n * test: devstackVitestTestConfig({\n * testSetup: { requireDevstack: true },\n * })\n *\n * The setup file's `beforeAll` populates a captured fixture readable\n * via `getStackContext()` from inside `it`/`test` bodies.\n */\nexport const devstackVitestTestConfig = (\n\toptions: DevstackVitestTestConfigOptions = {},\n): NonNullable<ViteUserConfig['test']> => {\n\tconst setupFiles: Array<string> = [];\n\tif (options.testSetup) {\n\t\tsetupFiles.push(DEVSTACK_SETUP_MODULE);\n\t}\n\tif (options.setupFile !== undefined) {\n\t\tsetupFiles.push(options.setupFile);\n\t}\n\n\t// Vitest 4 removed `poolOptions.threads.singleThread`. Top-level\n\t// `fileParallelism: false` is the replacement for single-threaded\n\t// runs (also pins `maxWorkers` to 1 per vitest's docs). Both\n\t// branches set `pool: 'threads'` explicitly so we don't depend on\n\t// vitest's default pool (which is `forks` in v4).\n\tconst threadOverride =\n\t\toptions.threads === 'single'\n\t\t\t? { pool: 'threads' as const, fileParallelism: false }\n\t\t\t: options.threads === 'multi'\n\t\t\t\t? { pool: 'threads' as const, fileParallelism: true }\n\t\t\t\t: {};\n\n\tconst typecheckOverride = options.typecheck === true ? { typecheck: { enabled: true } } : {};\n\n\treturn {\n\t\tinclude: ['src/**/*.{test,spec}.ts?(x)', 'test/**/*.{test,spec}.ts?(x)'],\n\t\texclude: ['e2e/**', 'node_modules', 'dist', '.turbo', '**/.devstack/**'],\n\t\tpassWithNoTests: true,\n\t\t...(setupFiles.length > 0 ? { setupFiles } : {}),\n\t\t...threadOverride,\n\t\t...typecheckOverride,\n\t\t// Caller overrides last. Shallow merge.\n\t\t...options.test,\n\t};\n};\n\n/** Build the devstack-owned part of Vitest's Vite server config.\n * Callers that need additional server options should merge them in\n * their own `defineConfig(...)` file. */\nexport const devstackVitestServerConfig = (): NonNullable<ViteUserConfig['server']> => ({\n\twatch: {\n\t\t// vite's chokidar watcher honors `ignored` even in test mode.\n\t\tignored: WATCH_IGNORED_PATTERNS,\n\t},\n});\n\n// -----------------------------------------------------------------------------\n// Test-visible internals (do not re-export from the integration barrel)\n// -----------------------------------------------------------------------------\n\n/** @internal — used by `test/build-integrations/vitest/config.test.ts`\n * to assert the watcher ignored set without depending on a built\n * config snapshot. */\nexport const _internal = {\n\tDEVSTACK_SETUP_MODULE,\n\tWATCH_IGNORED_PATTERNS,\n} as const;\n"],"mappings":";;;;;;;AAqEA,MAAM,wBAAwB;;;;AAK9B,MAAM,yBAAyB;CAAC;CAAmB;CAAsB;CAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCtF,MAAa,4BACZ,UAA2C,EAAE,KACJ;CACzC,MAAM,aAA4B,EAAE;AACpC,KAAI,QAAQ,UACX,YAAW,KAAK,sBAAsB;AAEvC,KAAI,QAAQ,cAAc,KAAA,EACzB,YAAW,KAAK,QAAQ,UAAU;CAQnC,MAAM,iBACL,QAAQ,YAAY,WACjB;EAAE,MAAM;EAAoB,iBAAiB;EAAO,GACpD,QAAQ,YAAY,UACnB;EAAE,MAAM;EAAoB,iBAAiB;EAAM,GACnD,EAAE;CAEP,MAAM,oBAAoB,QAAQ,cAAc,OAAO,EAAE,WAAW,EAAE,SAAS,MAAM,EAAE,GAAG,EAAE;AAE5F,QAAO;EACN,SAAS,CAAC,+BAA+B,+BAA+B;EACxE,SAAS;GAAC;GAAU;GAAgB;GAAQ;GAAU;GAAkB;EACxE,iBAAiB;EACjB,GAAI,WAAW,SAAS,IAAI,EAAE,YAAY,GAAG,EAAE;EAC/C,GAAG;EACH,GAAG;EAEH,GAAG,QAAQ;EACX;;;;;AAMF,MAAa,oCAA2E,EACvF,OAAO,EAEN,SAAS,wBACT,EACD"}
@@ -0,0 +1,48 @@
1
+ //#region src/build-integrations/vitest/env.d.ts
2
+ /** Env-var names the vitest integration consults. Centralized so
3
+ * test-setup printouts can name the var the caller forgot to set. */
4
+ declare const VITEST_ENV_VARS: {
5
+ /** Stack name; the canonical signal for "isolate this test run
6
+ * from other stacks". Tests SHOULD set this to `'test'`. */
7
+ readonly STACK: "DEVSTACK_STACK";
8
+ /** Override for the runtime root that holds
9
+ * `stacks/<stack>/manifest.json`. Defaults to `.devstack`. */
10
+ readonly RUNTIME_ROOT: "DEVSTACK_RUNTIME_ROOT";
11
+ /** Legacy alias for `RUNTIME_ROOT`. Accepted on read so the
12
+ * rewrite can coexist with example apps that still set the
13
+ * pre-rewrite name. New callers should use `RUNTIME_ROOT`. */
14
+ readonly RUNTIME_ROOT_LEGACY: "DEVSTACK_STATE_DIR";
15
+ /** Top-precedence absolute path to a specific manifest file. The
16
+ * engine sets this when it spawns child processes; rarely set
17
+ * by hand. */
18
+ readonly MANIFEST_PATH: "DEVSTACK_MANIFEST_PATH";
19
+ };
20
+ type VitestEnvVarName = (typeof VITEST_ENV_VARS)[keyof typeof VITEST_ENV_VARS];
21
+ /** Default stack name when `DEVSTACK_STACK` is unset. Mirrors the
22
+ * engine's "main" default — but tests should explicitly set
23
+ * `DEVSTACK_STACK=test` rather than rely on this. */
24
+ declare const DEFAULT_STACK_NAME = "main";
25
+ /** Default runtime root when neither `DEVSTACK_RUNTIME_ROOT` nor the
26
+ * legacy `DEVSTACK_STATE_DIR` is set. */
27
+ declare const DEFAULT_RUNTIME_ROOT = ".devstack";
28
+ /** The recommended stack name for test runs — the value the
29
+ * `test`-script env should set. Exported as a constant so example
30
+ * apps' `package.json` can wire it from one symbol if a future
31
+ * scaffolder lands. */
32
+ declare const RECOMMENDED_TEST_STACK = "test";
33
+ interface ResolvedVitestEnv {
34
+ readonly stack: string;
35
+ readonly runtimeRoot: string;
36
+ readonly manifestPathOverride: string | undefined;
37
+ /** True when the caller's env explicitly set `DEVSTACK_STACK`. The
38
+ * test-setup hook uses this to print a louder advisory when a
39
+ * user runs `pnpm test` without the recommended wiring. */
40
+ readonly stackWasExplicit: boolean;
41
+ }
42
+ /** Resolve the vitest env contract from an arbitrary env bag.
43
+ * Side-effect free — tests pass a fixture; production code passes
44
+ * `process.env`. */
45
+ declare const resolveVitestEnv: (env: Readonly<Record<string, string | undefined>>) => ResolvedVitestEnv;
46
+ //#endregion
47
+ export { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, RECOMMENDED_TEST_STACK, ResolvedVitestEnv, VITEST_ENV_VARS, VitestEnvVarName, resolveVitestEnv };
48
+ //# sourceMappingURL=env.d.mts.map
@@ -0,0 +1,50 @@
1
+ //#region src/build-integrations/vitest/env.ts
2
+ /** Env-var names the vitest integration consults. Centralized so
3
+ * test-setup printouts can name the var the caller forgot to set. */
4
+ const VITEST_ENV_VARS = {
5
+ /** Stack name; the canonical signal for "isolate this test run
6
+ * from other stacks". Tests SHOULD set this to `'test'`. */
7
+ STACK: "DEVSTACK_STACK",
8
+ /** Override for the runtime root that holds
9
+ * `stacks/<stack>/manifest.json`. Defaults to `.devstack`. */
10
+ RUNTIME_ROOT: "DEVSTACK_RUNTIME_ROOT",
11
+ /** Legacy alias for `RUNTIME_ROOT`. Accepted on read so the
12
+ * rewrite can coexist with example apps that still set the
13
+ * pre-rewrite name. New callers should use `RUNTIME_ROOT`. */
14
+ RUNTIME_ROOT_LEGACY: "DEVSTACK_STATE_DIR",
15
+ /** Top-precedence absolute path to a specific manifest file. The
16
+ * engine sets this when it spawns child processes; rarely set
17
+ * by hand. */
18
+ MANIFEST_PATH: "DEVSTACK_MANIFEST_PATH"
19
+ };
20
+ /** Default stack name when `DEVSTACK_STACK` is unset. Mirrors the
21
+ * engine's "main" default — but tests should explicitly set
22
+ * `DEVSTACK_STACK=test` rather than rely on this. */
23
+ const DEFAULT_STACK_NAME = "main";
24
+ /** Default runtime root when neither `DEVSTACK_RUNTIME_ROOT` nor the
25
+ * legacy `DEVSTACK_STATE_DIR` is set. */
26
+ const DEFAULT_RUNTIME_ROOT = ".devstack";
27
+ /** The recommended stack name for test runs — the value the
28
+ * `test`-script env should set. Exported as a constant so example
29
+ * apps' `package.json` can wire it from one symbol if a future
30
+ * scaffolder lands. */
31
+ const RECOMMENDED_TEST_STACK = "test";
32
+ /** Resolve the vitest env contract from an arbitrary env bag.
33
+ * Side-effect free — tests pass a fixture; production code passes
34
+ * `process.env`. */
35
+ const resolveVitestEnv = (env) => {
36
+ const stackRaw = env[VITEST_ENV_VARS.STACK];
37
+ const stack = stackRaw !== void 0 && stackRaw !== "" ? stackRaw : DEFAULT_STACK_NAME;
38
+ const runtimeRoot = env[VITEST_ENV_VARS.RUNTIME_ROOT] ?? env[VITEST_ENV_VARS.RUNTIME_ROOT_LEGACY] ?? ".devstack";
39
+ const manifestPathOverride = env[VITEST_ENV_VARS.MANIFEST_PATH];
40
+ return {
41
+ stack,
42
+ runtimeRoot: runtimeRoot === "" ? DEFAULT_RUNTIME_ROOT : runtimeRoot,
43
+ manifestPathOverride: manifestPathOverride !== void 0 && manifestPathOverride !== "" ? manifestPathOverride : void 0,
44
+ stackWasExplicit: stackRaw !== void 0 && stackRaw !== ""
45
+ };
46
+ };
47
+ //#endregion
48
+ export { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, RECOMMENDED_TEST_STACK, VITEST_ENV_VARS, resolveVitestEnv };
49
+
50
+ //# sourceMappingURL=env.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"env.mjs","names":[],"sources":["../../../src/build-integrations/vitest/env.ts"],"sourcesContent":["// Vitest build-integration — env-var contract.\n//\n// Architecture (distilled/23-build-integrations.md § Inputs /\n// dependencies, distilled/24-examples.md § Lifecycle / invocation\n// patterns): test runs MUST set `DEVSTACK_STACK=test` so they don't\n// contend with a parallel `pnpm dev` on the `main` stack. The\n// supervisor's port allocator + manifest discovery key off this var\n// to keep two stacks coexisting.\n//\n// `DEVSTACK_RUNTIME_ROOT` is the optional override for the on-disk\n// state root that contains `stacks/<stack>/manifest.json`. It maps to\n// the legacy `DEVSTACK_STATE_DIR` env var; both names are accepted on\n// read so the rewrite can roll out without coordinated env-var\n// renames across every example app.\n//\n// `DEVSTACK_MANIFEST_PATH` is the top-of-the-precedence-ladder escape\n// hatch the engine writes; build integrations also honor it. Listed\n// here for completeness — the typical vitest run does not set it.\n//\n// NOTE: this module is a pure declaration of names + defaults. No env\n// reads happen at module import time; readers fetch on demand so\n// tests can stub `process.env` per-case.\n\n// -----------------------------------------------------------------------------\n// Canonical env-var names\n// -----------------------------------------------------------------------------\n\n/** Env-var names the vitest integration consults. Centralized so\n * test-setup printouts can name the var the caller forgot to set. */\nexport const VITEST_ENV_VARS = {\n\t/** Stack name; the canonical signal for \"isolate this test run\n\t * from other stacks\". Tests SHOULD set this to `'test'`. */\n\tSTACK: 'DEVSTACK_STACK',\n\t/** Override for the runtime root that holds\n\t * `stacks/<stack>/manifest.json`. Defaults to `.devstack`. */\n\tRUNTIME_ROOT: 'DEVSTACK_RUNTIME_ROOT',\n\t/** Legacy alias for `RUNTIME_ROOT`. Accepted on read so the\n\t * rewrite can coexist with example apps that still set the\n\t * pre-rewrite name. New callers should use `RUNTIME_ROOT`. */\n\tRUNTIME_ROOT_LEGACY: 'DEVSTACK_STATE_DIR',\n\t/** Top-precedence absolute path to a specific manifest file. The\n\t * engine sets this when it spawns child processes; rarely set\n\t * by hand. */\n\tMANIFEST_PATH: 'DEVSTACK_MANIFEST_PATH',\n} as const;\n\nexport type VitestEnvVarName = (typeof VITEST_ENV_VARS)[keyof typeof VITEST_ENV_VARS];\n\n// -----------------------------------------------------------------------------\n// Defaults\n// -----------------------------------------------------------------------------\n\n/** Default stack name when `DEVSTACK_STACK` is unset. Mirrors the\n * engine's \"main\" default — but tests should explicitly set\n * `DEVSTACK_STACK=test` rather than rely on this. */\nexport const DEFAULT_STACK_NAME = 'main';\n\n/** Default runtime root when neither `DEVSTACK_RUNTIME_ROOT` nor the\n * legacy `DEVSTACK_STATE_DIR` is set. */\nexport const DEFAULT_RUNTIME_ROOT = '.devstack';\n\n/** The recommended stack name for test runs — the value the\n * `test`-script env should set. Exported as a constant so example\n * apps' `package.json` can wire it from one symbol if a future\n * scaffolder lands. */\nexport const RECOMMENDED_TEST_STACK = 'test';\n\n// -----------------------------------------------------------------------------\n// Pure resolvers — no module-init side effects\n// -----------------------------------------------------------------------------\n\nexport interface ResolvedVitestEnv {\n\treadonly stack: string;\n\treadonly runtimeRoot: string;\n\treadonly manifestPathOverride: string | undefined;\n\t/** True when the caller's env explicitly set `DEVSTACK_STACK`. The\n\t * test-setup hook uses this to print a louder advisory when a\n\t * user runs `pnpm test` without the recommended wiring. */\n\treadonly stackWasExplicit: boolean;\n}\n\n/** Resolve the vitest env contract from an arbitrary env bag.\n * Side-effect free — tests pass a fixture; production code passes\n * `process.env`. */\nexport const resolveVitestEnv = (\n\tenv: Readonly<Record<string, string | undefined>>,\n): ResolvedVitestEnv => {\n\tconst stackRaw = env[VITEST_ENV_VARS.STACK];\n\tconst stack = stackRaw !== undefined && stackRaw !== '' ? stackRaw : DEFAULT_STACK_NAME;\n\tconst runtimeRoot =\n\t\tenv[VITEST_ENV_VARS.RUNTIME_ROOT] ??\n\t\tenv[VITEST_ENV_VARS.RUNTIME_ROOT_LEGACY] ??\n\t\tDEFAULT_RUNTIME_ROOT;\n\tconst manifestPathOverride = env[VITEST_ENV_VARS.MANIFEST_PATH];\n\treturn {\n\t\tstack,\n\t\truntimeRoot: runtimeRoot === '' ? DEFAULT_RUNTIME_ROOT : runtimeRoot,\n\t\tmanifestPathOverride:\n\t\t\tmanifestPathOverride !== undefined && manifestPathOverride !== ''\n\t\t\t\t? manifestPathOverride\n\t\t\t\t: undefined,\n\t\tstackWasExplicit: stackRaw !== undefined && stackRaw !== '',\n\t};\n};\n"],"mappings":";;;AA6BA,MAAa,kBAAkB;;;CAG9B,OAAO;;;CAGP,cAAc;;;;CAId,qBAAqB;;;;CAIrB,eAAe;CACf;;;;AAWD,MAAa,qBAAqB;;;AAIlC,MAAa,uBAAuB;;;;;AAMpC,MAAa,yBAAyB;;;;AAmBtC,MAAa,oBACZ,QACuB;CACvB,MAAM,WAAW,IAAI,gBAAgB;CACrC,MAAM,QAAQ,aAAa,KAAA,KAAa,aAAa,KAAK,WAAW;CACrE,MAAM,cACL,IAAI,gBAAgB,iBACpB,IAAI,gBAAgB,wBAAA;CAErB,MAAM,uBAAuB,IAAI,gBAAgB;AACjD,QAAO;EACN;EACA,aAAa,gBAAgB,KAAK,uBAAuB;EACzD,sBACC,yBAAyB,KAAA,KAAa,yBAAyB,KAC5D,uBACA,KAAA;EACJ,kBAAkB,aAAa,KAAA,KAAa,aAAa;EACzD"}
@@ -0,0 +1,44 @@
1
+ import * as _$effect_Types0 from "effect/Types";
2
+ import * as _$effect_Cause0 from "effect/Cause";
3
+
4
+ //#region src/build-integrations/vitest/errors.d.ts
5
+ declare const VitestManifestNotFoundError_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 & {
6
+ readonly _tag: "VitestManifestNotFoundError";
7
+ } & Readonly<A>;
8
+ /** A test-setup hook asked for the manifest but no on-disk file was
9
+ * found by the walk-up or override path. The supervisor either hasn't
10
+ * run yet or the wrong stack/state-dir is configured. */
11
+ declare class VitestManifestNotFoundError extends VitestManifestNotFoundError_base<{
12
+ readonly message: string;
13
+ readonly searchedFrom: string;
14
+ readonly stack: string;
15
+ readonly stateDir: string;
16
+ readonly recovery: string;
17
+ }> {}
18
+ declare const VitestManifestShapeError_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 & {
19
+ readonly _tag: "VitestManifestShapeError";
20
+ } & Readonly<A>;
21
+ /** The manifest exists but doesn't decode against the L0 envelope schema
22
+ * — either malformed JSON or shape drift after a manifestVersion bump. */
23
+ declare class VitestManifestShapeError extends VitestManifestShapeError_base<{
24
+ readonly message: string;
25
+ readonly path: string;
26
+ readonly phase: 'parse' | 'shape';
27
+ readonly recovery: string;
28
+ readonly cause?: unknown;
29
+ }> {}
30
+ declare const VitestSetupPreconditionError_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 & {
31
+ readonly _tag: "VitestSetupPreconditionError";
32
+ } & Readonly<A>;
33
+ /** A test-setup precondition was violated. Currently only one case:
34
+ * the caller asked for `requireDevstack: true` but the manifest wasn't
35
+ * discoverable. Distinct from the discovery error because the caller
36
+ * opted IN to the requirement. */
37
+ declare class VitestSetupPreconditionError extends VitestSetupPreconditionError_base<{
38
+ readonly message: string;
39
+ readonly hint?: string;
40
+ }> {}
41
+ type VitestIntegrationError = VitestManifestNotFoundError | VitestManifestShapeError | VitestSetupPreconditionError;
42
+ //#endregion
43
+ export { VitestIntegrationError, VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError };
44
+ //# sourceMappingURL=errors.d.mts.map
@@ -0,0 +1,18 @@
1
+ import { Data } from "effect";
2
+ //#region src/build-integrations/vitest/errors.ts
3
+ /** A test-setup hook asked for the manifest but no on-disk file was
4
+ * found by the walk-up or override path. The supervisor either hasn't
5
+ * run yet or the wrong stack/state-dir is configured. */
6
+ var VitestManifestNotFoundError = class extends Data.TaggedError("VitestManifestNotFoundError") {};
7
+ /** The manifest exists but doesn't decode against the L0 envelope schema
8
+ * — either malformed JSON or shape drift after a manifestVersion bump. */
9
+ var VitestManifestShapeError = class extends Data.TaggedError("VitestManifestShapeError") {};
10
+ /** A test-setup precondition was violated. Currently only one case:
11
+ * the caller asked for `requireDevstack: true` but the manifest wasn't
12
+ * discoverable. Distinct from the discovery error because the caller
13
+ * opted IN to the requirement. */
14
+ var VitestSetupPreconditionError = class extends Data.TaggedError("VitestSetupPreconditionError") {};
15
+ //#endregion
16
+ export { VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError };
17
+
18
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/build-integrations/vitest/errors.ts"],"sourcesContent":["// Vitest build-integration — typed errors.\n//\n// Architecture (distilled/23-build-integrations.md § Per-integration\n// requirements → Vitest, § Edge cases): the vitest preset is a pure\n// reader of files + env vars. The two failure modes it surfaces are\n// (a) manifest discovery failed when a test-setup hook asked for it,\n// (b) manifest exists but its shape doesn't match.\n// Both errors carry a `recovery` string so the test-setup printout is\n// actionable instead of a generic schema-decode trace.\n//\n// These tags mirror the engine's `ManifestDiscoveryError` /\n// `ManifestShapeError` (substrate-side; see `runtime/` once it lands)\n// but stay local to the vitest surface so consumers can `catchTag`\n// without importing from substrate.\n\nimport { Data } from 'effect';\n\n/** A test-setup hook asked for the manifest but no on-disk file was\n * found by the walk-up or override path. The supervisor either hasn't\n * run yet or the wrong stack/state-dir is configured. */\nexport class VitestManifestNotFoundError extends Data.TaggedError('VitestManifestNotFoundError')<{\n\treadonly message: string;\n\treadonly searchedFrom: string;\n\treadonly stack: string;\n\treadonly stateDir: string;\n\treadonly recovery: string;\n}> {}\n\n/** The manifest exists but doesn't decode against the L0 envelope schema\n * — either malformed JSON or shape drift after a manifestVersion bump. */\nexport class VitestManifestShapeError extends Data.TaggedError('VitestManifestShapeError')<{\n\treadonly message: string;\n\treadonly path: string;\n\treadonly phase: 'parse' | 'shape';\n\treadonly recovery: string;\n\treadonly cause?: unknown;\n}> {}\n\n/** A test-setup precondition was violated. Currently only one case:\n * the caller asked for `requireDevstack: true` but the manifest wasn't\n * discoverable. Distinct from the discovery error because the caller\n * opted IN to the requirement. */\nexport class VitestSetupPreconditionError extends Data.TaggedError('VitestSetupPreconditionError')<{\n\treadonly message: string;\n\treadonly hint?: string;\n}> {}\n\nexport type VitestIntegrationError =\n\t| VitestManifestNotFoundError\n\t| VitestManifestShapeError\n\t| VitestSetupPreconditionError;\n"],"mappings":";;;;;AAoBA,IAAa,8BAAb,cAAiD,KAAK,YAAY,8BAA8B,CAM7F;;;AAIH,IAAa,2BAAb,cAA8C,KAAK,YAAY,2BAA2B,CAMvF;;;;;AAMH,IAAa,+BAAb,cAAkD,KAAK,YAAY,+BAA+B,CAG/F"}
@@ -0,0 +1,6 @@
1
+ import { LoadStackContextOptions, StackContext, loadStackContext } from "./stack-context.mjs";
2
+ import { TestSetupOptions, VitestLifecycleHooks, getStackContext, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup } from "./setup.mjs";
3
+ import { DevstackVitestTestConfigOptions, devstackVitestServerConfig, devstackVitestTestConfig } from "./config.mjs";
4
+ import { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, RECOMMENDED_TEST_STACK, ResolvedVitestEnv, VITEST_ENV_VARS, VitestEnvVarName, resolveVitestEnv } from "./env.mjs";
5
+ import { VitestIntegrationError, VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError } from "./errors.mjs";
6
+ export { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, type DevstackVitestTestConfigOptions, type LoadStackContextOptions, RECOMMENDED_TEST_STACK, type ResolvedVitestEnv, type StackContext, type TestSetupOptions, VITEST_ENV_VARS, type VitestEnvVarName, type VitestIntegrationError, type VitestLifecycleHooks, VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError, devstackVitestServerConfig, devstackVitestTestConfig, getStackContext, loadStackContext, resolveVitestEnv, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup };
@@ -0,0 +1,6 @@
1
+ import { devstackVitestServerConfig, devstackVitestTestConfig } from "./config.mjs";
2
+ import { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, RECOMMENDED_TEST_STACK, VITEST_ENV_VARS, resolveVitestEnv } from "./env.mjs";
3
+ import { VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError } from "./errors.mjs";
4
+ import { loadStackContext } from "./stack-context.mjs";
5
+ import { getStackContext, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup } from "./setup.mjs";
6
+ export { DEFAULT_RUNTIME_ROOT, DEFAULT_STACK_NAME, RECOMMENDED_TEST_STACK, VITEST_ENV_VARS, VitestManifestNotFoundError, VitestManifestShapeError, VitestSetupPreconditionError, devstackVitestServerConfig, devstackVitestTestConfig, getStackContext, loadStackContext, resolveVitestEnv, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup };
@@ -0,0 +1,53 @@
1
+ import { LoadStackContextOptions, StackContext } from "./stack-context.mjs";
2
+
3
+ //#region src/build-integrations/vitest/setup.d.ts
4
+ /** Return the StackContext captured by `runDevstackBeforeAll`. Returns
5
+ * `undefined` until `beforeAll` has run (or when the suite ran with
6
+ * `requireDevstack: false` and no manifest exists). */
7
+ declare const getStackContext: () => StackContext | undefined;
8
+ /** Reset the captured fixture. Called by `runDevstackAfterAll`; also
9
+ * exported so test helpers can wipe between describe-block setups. */
10
+ declare const clearStackContext: () => void;
11
+ interface TestSetupOptions extends LoadStackContextOptions {
12
+ /** When `true`, `beforeAll` throws if no manifest is on disk. Use
13
+ * for suites that depend on a live devstack and would fail
14
+ * confusingly later. Default `false` (manifest is best-effort). */
15
+ readonly requireDevstack?: boolean;
16
+ /** Suppress the stack-name advisory. Default `false`. */
17
+ readonly silent?: boolean;
18
+ /** Custom writer for the advisory line. Defaults to `console.warn`.
19
+ * Tests substitute a buffer. */
20
+ readonly writeAdvisory?: (line: string) => void;
21
+ }
22
+ /** `beforeAll` body. Exported as a plain function so callers can wire
23
+ * it into Vitest's hooks directly OR call it inline from a
24
+ * setup-file. */
25
+ declare const runDevstackBeforeAll: (options?: TestSetupOptions) => void;
26
+ /** `afterAll` body. Currently just clears the captured fixture; the
27
+ * separate symbol lets us extend later (e.g. snapshot diagnostics)
28
+ * without touching consumer setup files. */
29
+ declare const runDevstackAfterAll: () => void;
30
+ /** Vitest's `beforeAll` / `afterAll` hook signatures. Match the
31
+ * `vitest`-package shapes without importing the module (so this file
32
+ * stays consumable by orchestrators that don't ship vitest as a
33
+ * hard dep). */
34
+ interface VitestLifecycleHooks {
35
+ readonly beforeAll: (fn: () => void | Promise<void>) => void;
36
+ readonly afterAll: (fn: () => void | Promise<void>) => void;
37
+ }
38
+ /**
39
+ * Wire the devstack setup/teardown into a vitest test file's hook
40
+ * functions. Typical usage in a `test-setup.ts`:
41
+ *
42
+ * import { beforeAll, afterAll } from 'vitest';
43
+ * import { useDevstackTestSetup }
44
+ * from '@mysten-incubation/devstack/vitest';
45
+ *
46
+ * useDevstackTestSetup({ beforeAll, afterAll }, { requireDevstack: true });
47
+ *
48
+ * The preset wires this automatically when `opts.testSetup: true`.
49
+ */
50
+ declare const useDevstackTestSetup: (hooks: VitestLifecycleHooks, options?: TestSetupOptions) => void;
51
+ //#endregion
52
+ export { TestSetupOptions, VitestLifecycleHooks, clearStackContext, getStackContext, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup };
53
+ //# sourceMappingURL=setup.d.mts.map
@@ -0,0 +1,56 @@
1
+ import { RECOMMENDED_TEST_STACK, VITEST_ENV_VARS, resolveVitestEnv } from "./env.mjs";
2
+ import { VitestSetupPreconditionError } from "./errors.mjs";
3
+ import { loadStackContext } from "./stack-context.mjs";
4
+ //#region src/build-integrations/vitest/setup.ts
5
+ let captured;
6
+ /** Return the StackContext captured by `runDevstackBeforeAll`. Returns
7
+ * `undefined` until `beforeAll` has run (or when the suite ran with
8
+ * `requireDevstack: false` and no manifest exists). */
9
+ const getStackContext = () => captured;
10
+ /** Reset the captured fixture. Called by `runDevstackAfterAll`; also
11
+ * exported so test helpers can wipe between describe-block setups. */
12
+ const clearStackContext = () => {
13
+ captured = void 0;
14
+ };
15
+ /** `beforeAll` body. Exported as a plain function so callers can wire
16
+ * it into Vitest's hooks directly OR call it inline from a
17
+ * setup-file. */
18
+ const runDevstackBeforeAll = (options = {}) => {
19
+ const resolved = resolveVitestEnv(options.env ?? process.env);
20
+ if (!options.silent && !resolved.stackWasExplicit) (options.writeAdvisory ?? ((line) => console.warn(line)))(`[devstack/vitest] ${VITEST_ENV_VARS.STACK} is unset; tests will read the '${resolved.stack}' stack. Set ${VITEST_ENV_VARS.STACK}=${RECOMMENDED_TEST_STACK} in the test script to avoid contention with \`pnpm dev\`.`);
21
+ const ctx = loadStackContext({
22
+ ...options,
23
+ required: options.requireDevstack === true
24
+ });
25
+ if (options.requireDevstack === true && ctx === void 0) throw new VitestSetupPreconditionError({
26
+ message: `requireDevstack: true but loadStackContext returned undefined`,
27
+ hint: "this is a devstack bug; please file an issue"
28
+ });
29
+ captured = ctx;
30
+ };
31
+ /** `afterAll` body. Currently just clears the captured fixture; the
32
+ * separate symbol lets us extend later (e.g. snapshot diagnostics)
33
+ * without touching consumer setup files. */
34
+ const runDevstackAfterAll = () => {
35
+ clearStackContext();
36
+ };
37
+ /**
38
+ * Wire the devstack setup/teardown into a vitest test file's hook
39
+ * functions. Typical usage in a `test-setup.ts`:
40
+ *
41
+ * import { beforeAll, afterAll } from 'vitest';
42
+ * import { useDevstackTestSetup }
43
+ * from '@mysten-incubation/devstack/vitest';
44
+ *
45
+ * useDevstackTestSetup({ beforeAll, afterAll }, { requireDevstack: true });
46
+ *
47
+ * The preset wires this automatically when `opts.testSetup: true`.
48
+ */
49
+ const useDevstackTestSetup = (hooks, options = {}) => {
50
+ hooks.beforeAll(() => runDevstackBeforeAll(options));
51
+ hooks.afterAll(() => runDevstackAfterAll());
52
+ };
53
+ //#endregion
54
+ export { clearStackContext, getStackContext, runDevstackAfterAll, runDevstackBeforeAll, useDevstackTestSetup };
55
+
56
+ //# sourceMappingURL=setup.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"setup.mjs","names":[],"sources":["../../../src/build-integrations/vitest/setup.ts"],"sourcesContent":["// Vitest build-integration — test-setup hooks.\n//\n// Architecture (distilled/23-build-integrations.md § Per-integration\n// requirements → Vitest, § Lifecycle states): the preset itself does\n// NOT boot devstack; it is the test file's job (via\n// `@effect/vitest`'s `it.layer(stack.layer)`) to drive the lifecycle.\n//\n// But suites that talk to a LIVE devstack still need a small\n// before/after surface to:\n// - Print a one-line advisory when `DEVSTACK_STACK` is unset (the\n// test would otherwise run against `main`, contending with\n// `pnpm dev`).\n// - Optionally verify the manifest is on disk before the first\n// `it.effect` fires (cheap probe, friendly error).\n// - Optionally project the manifest into a shared fixture handle\n// suites can `import { stackContext } from './setup-fixture.ts'`.\n//\n// This module is OPT-IN. A suite wires it via Vitest's `setupFiles`\n// (or via the `useTestSetup` registrar below for programmatic\n// composition). The preset wires it automatically when\n// `opts.testSetup` is truthy.\n//\n// Hook firing order:\n// beforeAll (once per file)\n// 1. resolveVitestEnv → print stack/runtimeRoot advisory if needed\n// 2. if requireDevstack: loadStackContext({required: true})\n// else: loadStackContext() (may be undefined)\n// 3. publish to the captured fixture so `getStackContext()` works\n// synchronously inside `it`/`test` bodies\n// afterAll (once per file)\n// 4. clear the captured fixture (so a stale handle doesn't survive\n// between watch runs)\n//\n// No teardown of the devstack itself — that's the supervisor's job;\n// the preset is a pure reader.\n\nimport {\n\tloadStackContext,\n\ttype LoadStackContextOptions,\n\ttype StackContext,\n} from './stack-context.ts';\nimport { resolveVitestEnv, VITEST_ENV_VARS, RECOMMENDED_TEST_STACK } from './env.ts';\nimport { VitestSetupPreconditionError } from './errors.ts';\n\n// -----------------------------------------------------------------------------\n// Captured fixture — single shared handle across the test file\n// -----------------------------------------------------------------------------\n\nlet captured: StackContext | undefined;\n\n/** Return the StackContext captured by `runDevstackBeforeAll`. Returns\n * `undefined` until `beforeAll` has run (or when the suite ran with\n * `requireDevstack: false` and no manifest exists). */\nexport const getStackContext = (): StackContext | undefined => captured;\n\n/** Reset the captured fixture. Called by `runDevstackAfterAll`; also\n * exported so test helpers can wipe between describe-block setups. */\nexport const clearStackContext = (): void => {\n\tcaptured = undefined;\n};\n\n// -----------------------------------------------------------------------------\n// Options\n// -----------------------------------------------------------------------------\n\nexport interface TestSetupOptions extends LoadStackContextOptions {\n\t/** When `true`, `beforeAll` throws if no manifest is on disk. Use\n\t * for suites that depend on a live devstack and would fail\n\t * confusingly later. Default `false` (manifest is best-effort). */\n\treadonly requireDevstack?: boolean;\n\t/** Suppress the stack-name advisory. Default `false`. */\n\treadonly silent?: boolean;\n\t/** Custom writer for the advisory line. Defaults to `console.warn`.\n\t * Tests substitute a buffer. */\n\treadonly writeAdvisory?: (line: string) => void;\n}\n\n// -----------------------------------------------------------------------------\n// Hooks\n// -----------------------------------------------------------------------------\n\n/** `beforeAll` body. Exported as a plain function so callers can wire\n * it into Vitest's hooks directly OR call it inline from a\n * setup-file. */\nexport const runDevstackBeforeAll = (options: TestSetupOptions = {}): void => {\n\tconst env = options.env ?? (process.env as Readonly<Record<string, string | undefined>>);\n\tconst resolved = resolveVitestEnv(env);\n\n\tif (!options.silent && !resolved.stackWasExplicit) {\n\t\tconst write = options.writeAdvisory ?? ((line: string) => console.warn(line));\n\t\twrite(\n\t\t\t`[devstack/vitest] ${VITEST_ENV_VARS.STACK} is unset; tests will read the '${resolved.stack}' stack. ` +\n\t\t\t\t`Set ${VITEST_ENV_VARS.STACK}=${RECOMMENDED_TEST_STACK} in the test script to avoid contention with \\`pnpm dev\\`.`,\n\t\t);\n\t}\n\n\tconst ctx = loadStackContext({\n\t\t...options,\n\t\trequired: options.requireDevstack === true,\n\t});\n\n\tif (options.requireDevstack === true && ctx === undefined) {\n\t\t// `loadStackContext({required: true})` should have thrown.\n\t\t// Defensive — surfaces a clearer error if a future refactor\n\t\t// changes the required-miss semantics.\n\t\tthrow new VitestSetupPreconditionError({\n\t\t\tmessage: `requireDevstack: true but loadStackContext returned undefined`,\n\t\t\thint: 'this is a devstack bug; please file an issue',\n\t\t});\n\t}\n\n\tcaptured = ctx;\n};\n\n/** `afterAll` body. Currently just clears the captured fixture; the\n * separate symbol lets us extend later (e.g. snapshot diagnostics)\n * without touching consumer setup files. */\nexport const runDevstackAfterAll = (): void => {\n\tclearStackContext();\n};\n\n// -----------------------------------------------------------------------------\n// Vitest hook registrar\n// -----------------------------------------------------------------------------\n\n/** Vitest's `beforeAll` / `afterAll` hook signatures. Match the\n * `vitest`-package shapes without importing the module (so this file\n * stays consumable by orchestrators that don't ship vitest as a\n * hard dep). */\nexport interface VitestLifecycleHooks {\n\treadonly beforeAll: (fn: () => void | Promise<void>) => void;\n\treadonly afterAll: (fn: () => void | Promise<void>) => void;\n}\n\n/**\n * Wire the devstack setup/teardown into a vitest test file's hook\n * functions. Typical usage in a `test-setup.ts`:\n *\n * import { beforeAll, afterAll } from 'vitest';\n * import { useDevstackTestSetup }\n * from '@mysten-incubation/devstack/vitest';\n *\n * useDevstackTestSetup({ beforeAll, afterAll }, { requireDevstack: true });\n *\n * The preset wires this automatically when `opts.testSetup: true`.\n */\nexport const useDevstackTestSetup = (\n\thooks: VitestLifecycleHooks,\n\toptions: TestSetupOptions = {},\n): void => {\n\thooks.beforeAll(() => runDevstackBeforeAll(options));\n\thooks.afterAll(() => runDevstackAfterAll());\n};\n"],"mappings":";;;;AAgDA,IAAI;;;;AAKJ,MAAa,wBAAkD;;;AAI/D,MAAa,0BAAgC;AAC5C,YAAW,KAAA;;;;;AA0BZ,MAAa,wBAAwB,UAA4B,EAAE,KAAW;CAE7E,MAAM,WAAW,iBADL,QAAQ,OAAQ,QAAQ,IACE;AAEtC,KAAI,CAAC,QAAQ,UAAU,CAAC,SAAS,iBAEhC,EADc,QAAQ,mBAAmB,SAAiB,QAAQ,KAAK,KAAK,GAE3E,qBAAqB,gBAAgB,MAAM,kCAAkC,SAAS,MAAM,eACpF,gBAAgB,MAAM,GAAG,uBAAuB,4DACxD;CAGF,MAAM,MAAM,iBAAiB;EAC5B,GAAG;EACH,UAAU,QAAQ,oBAAoB;EACtC,CAAC;AAEF,KAAI,QAAQ,oBAAoB,QAAQ,QAAQ,KAAA,EAI/C,OAAM,IAAI,6BAA6B;EACtC,SAAS;EACT,MAAM;EACN,CAAC;AAGH,YAAW;;;;;AAMZ,MAAa,4BAAkC;AAC9C,oBAAmB;;;;;;;;;;;;;;AA4BpB,MAAa,wBACZ,OACA,UAA4B,EAAE,KACpB;AACV,OAAM,gBAAgB,qBAAqB,QAAQ,CAAC;AACpD,OAAM,eAAe,qBAAqB,CAAC"}
@@ -0,0 +1,58 @@
1
+ import { ManifestEnvelope } from "../../substrate/manifest.mjs";
2
+
3
+ //#region src/build-integrations/vitest/stack-context.d.ts
4
+ /** Read-only projection over the live manifest, scoped to the vitest
5
+ * surface's needs. The full envelope is reconstructed (`manifest`)
6
+ * for the test-side helpers that compare deep shapes; the convenience
7
+ * accessors cover the common case. */
8
+ interface StackContext {
9
+ /** Absolute path of the manifest file the projection came from. */
10
+ readonly manifestPath: string;
11
+ /** Reconstructed envelope — same shape downstream consumers had
12
+ * pre-consolidation. */
13
+ readonly manifest: ManifestEnvelope;
14
+ /** Identity tuple shortcut. */
15
+ readonly identity: ManifestEnvelope['identity'];
16
+ /** Flat endpoint lookup — returns the URL string or `undefined`. */
17
+ readonly endpoint: (name: string) => string | undefined;
18
+ /** Display URL variant — falls back to `url` when `displayUrl` is
19
+ * null (the routed-vs-direct distinction the router decides). */
20
+ readonly displayEndpoint: (name: string) => string | undefined;
21
+ }
22
+ interface LoadStackContextOptions {
23
+ /** Starting directory for the walk-up. Defaults to `process.cwd()`. */
24
+ readonly cwd?: string;
25
+ /** Stack name override. Defaults to `process.env.DEVSTACK_STACK`
26
+ * with a final fallback to `'main'`. */
27
+ readonly stack?: string;
28
+ /** Runtime root override (legacy `.devstack` directory). Defaults
29
+ * to `process.env.DEVSTACK_RUNTIME_ROOT` /
30
+ * `process.env.DEVSTACK_STATE_DIR` with a final fallback to
31
+ * `'.devstack'`. */
32
+ readonly runtimeRoot?: string;
33
+ /** Explicit absolute manifest path. Bypasses the walk-up but is
34
+ * still validated to exist. Lower precedence than the
35
+ * `DEVSTACK_MANIFEST_PATH` env var. */
36
+ readonly manifestPath?: string;
37
+ /** Env bag for the resolver. Defaults to `process.env`. Tests pass
38
+ * a fixture. */
39
+ readonly env?: Readonly<Record<string, string | undefined>>;
40
+ /** When `true`, throw `VitestManifestNotFoundError` on miss instead
41
+ * of returning `undefined`. */
42
+ readonly required?: boolean;
43
+ }
44
+ /**
45
+ * Read the on-disk manifest, decode against the envelope schema, and
46
+ * return a projection. Returns `undefined` on miss; pass
47
+ * `{ required: true }` to throw `VitestManifestNotFoundError`.
48
+ *
49
+ * Precedence ladder (highest → lowest):
50
+ * 1. `env.DEVSTACK_MANIFEST_PATH`
51
+ * 2. `opts.manifestPath`
52
+ * 3. walk-up from `opts.cwd` looking for
53
+ * `<runtimeRoot>/stacks/<stack>/manifest.json`
54
+ */
55
+ declare const loadStackContext: (opts?: LoadStackContextOptions) => StackContext | undefined;
56
+ //#endregion
57
+ export { LoadStackContextOptions, StackContext, loadStackContext };
58
+ //# sourceMappingURL=stack-context.d.mts.map
@@ -0,0 +1,67 @@
1
+ import { ManifestDiscoveryError, ManifestShapeError } from "../runtime/errors.mjs";
2
+ import { manifestEnvelopeFromStackContext, readStackContext } from "../runtime/read-stack-context.mjs";
3
+ import { VITEST_ENV_VARS } from "./env.mjs";
4
+ import { VitestManifestNotFoundError, VitestManifestShapeError } from "./errors.mjs";
5
+ //#region src/build-integrations/vitest/stack-context.ts
6
+ const project = (ctx) => {
7
+ const envelope = manifestEnvelopeFromStackContext(ctx);
8
+ return {
9
+ manifestPath: ctx.manifestPath,
10
+ manifest: envelope,
11
+ identity: envelope.identity,
12
+ endpoint: (name) => ctx.endpoints.byName(name)?.url,
13
+ displayEndpoint: (name) => {
14
+ const e = ctx.endpoints.byName(name);
15
+ if (e === void 0) return void 0;
16
+ return e.displayUrl ?? e.url;
17
+ }
18
+ };
19
+ };
20
+ /**
21
+ * Read the on-disk manifest, decode against the envelope schema, and
22
+ * return a projection. Returns `undefined` on miss; pass
23
+ * `{ required: true }` to throw `VitestManifestNotFoundError`.
24
+ *
25
+ * Precedence ladder (highest → lowest):
26
+ * 1. `env.DEVSTACK_MANIFEST_PATH`
27
+ * 2. `opts.manifestPath`
28
+ * 3. walk-up from `opts.cwd` looking for
29
+ * `<runtimeRoot>/stacks/<stack>/manifest.json`
30
+ */
31
+ const loadStackContext = (opts = {}) => {
32
+ const env = opts.env ?? process.env;
33
+ const stack = opts.stack ?? env[VITEST_ENV_VARS.STACK] ?? "main";
34
+ const runtimeRoot = opts.runtimeRoot ?? env[VITEST_ENV_VARS.RUNTIME_ROOT] ?? env[VITEST_ENV_VARS.RUNTIME_ROOT_LEGACY] ?? ".devstack";
35
+ try {
36
+ return project(readStackContext({
37
+ ...opts.cwd !== void 0 ? { cwd: opts.cwd } : {},
38
+ stack,
39
+ stateDir: runtimeRoot,
40
+ env,
41
+ ...opts.manifestPath !== void 0 ? { manifestPath: opts.manifestPath } : {}
42
+ }));
43
+ } catch (err) {
44
+ if (err instanceof ManifestDiscoveryError) {
45
+ if (opts.required === true) throw new VitestManifestNotFoundError({
46
+ message: `no devstack manifest found for stack '${stack}' under '${runtimeRoot}'`,
47
+ searchedFrom: opts.cwd ?? process.cwd(),
48
+ stack,
49
+ stateDir: runtimeRoot,
50
+ recovery: `run \`devstack up\` (or set DEVSTACK_MANIFEST_PATH to an existing file)`
51
+ });
52
+ return;
53
+ }
54
+ if (err instanceof ManifestShapeError) throw new VitestManifestShapeError({
55
+ phase: err.phase === "parse" ? "parse" : "shape",
56
+ path: err.path,
57
+ message: err.message,
58
+ recovery: err.phase === "parse" ? `rm ${err.path} && devstack apply # regenerate from the registries` : `rm -rf <runtimeRoot>/stacks/<stack>/manifest.json && devstack apply # regenerate`,
59
+ cause: err
60
+ });
61
+ throw err;
62
+ }
63
+ };
64
+ //#endregion
65
+ export { loadStackContext };
66
+
67
+ //# sourceMappingURL=stack-context.mjs.map