@mysten-incubation/devstack 0.1.0 → 0.2.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 (858) hide show
  1. package/README.md +7 -4
  2. package/dashboard-ui/assets/grpc-a4usE3Nk.js +3 -0
  3. package/dashboard-ui/assets/index-B82Bh84P.css +1 -0
  4. package/dashboard-ui/assets/index-CRYJ4pru.js +1277 -0
  5. package/dashboard-ui/index.html +2 -2
  6. package/dist/api/define-capabilities.d.mts +1 -20
  7. package/dist/api/define-capabilities.mjs +15 -22
  8. package/dist/api/define-capabilities.mjs.map +1 -1
  9. package/dist/api/define-devstack-with.d.mts +7 -1
  10. package/dist/api/define-devstack-with.mjs.map +1 -1
  11. package/dist/api/define-devstack.mjs.map +1 -1
  12. package/dist/api/define-plugin.d.mts +2 -1
  13. package/dist/api/inference-network.d.mts +31 -17
  14. package/dist/api/inference-network.mjs +40 -43
  15. package/dist/api/inference-network.mjs.map +1 -1
  16. package/dist/api/load-config.mjs +88 -0
  17. package/dist/api/load-config.mjs.map +1 -0
  18. package/dist/api/mode-narrowed-factory.d.mts +1 -1
  19. package/dist/api/mode-narrowed-factory.mjs.map +1 -1
  20. package/dist/api/run-stack-internal.mjs +202 -0
  21. package/dist/api/run-stack-internal.mjs.map +1 -0
  22. package/dist/api/run-stack.d.mts +82 -31
  23. package/dist/api/run-stack.mjs +22 -141
  24. package/dist/api/run-stack.mjs.map +1 -1
  25. package/dist/build-integrations/dapp-kit/index.d.mts +61 -0
  26. package/dist/build-integrations/dapp-kit/index.mjs +58 -0
  27. package/dist/build-integrations/dapp-kit/index.mjs.map +1 -0
  28. package/dist/build-integrations/playwright/config.d.mts +1 -30
  29. package/dist/build-integrations/playwright/config.mjs +1 -27
  30. package/dist/build-integrations/playwright/config.mjs.map +1 -1
  31. package/dist/build-integrations/playwright/errors.d.mts +4 -7
  32. package/dist/build-integrations/playwright/errors.mjs.map +1 -1
  33. package/dist/build-integrations/playwright/global-setup.d.mts +42 -71
  34. package/dist/build-integrations/playwright/global-setup.mjs +142 -218
  35. package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
  36. package/dist/build-integrations/playwright/index.d.mts +2 -2
  37. package/dist/build-integrations/playwright/index.mjs +2 -2
  38. package/dist/build-integrations/playwright/stack-context.d.mts +3 -1
  39. package/dist/build-integrations/playwright/stack-context.mjs +4 -2
  40. package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
  41. package/dist/build-integrations/playwright/wallet-context.mjs +44 -19
  42. package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
  43. package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
  44. package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -1
  45. package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -1
  46. package/dist/build-integrations/runtime/discover.d.mts +6 -4
  47. package/dist/build-integrations/runtime/discover.mjs +15 -4
  48. package/dist/build-integrations/runtime/discover.mjs.map +1 -1
  49. package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
  50. package/dist/build-integrations/runtime/errors.mjs.map +1 -1
  51. package/dist/build-integrations/runtime/read-stack-context.mjs +3 -3
  52. package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
  53. package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +23 -7
  54. package/dist/build-integrations/runtime/resolve-discovery-env.mjs +25 -12
  55. package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -1
  56. package/dist/build-integrations/runtime/stack-context.d.mts +2 -2
  57. package/dist/build-integrations/vite/index.d.mts +84 -19
  58. package/dist/build-integrations/vite/index.mjs +203 -28
  59. package/dist/build-integrations/vite/index.mjs.map +1 -1
  60. package/dist/build-integrations/vitest/config.d.mts +20 -2
  61. package/dist/build-integrations/vitest/config.mjs +16 -4
  62. package/dist/build-integrations/vitest/config.mjs.map +1 -1
  63. package/dist/build-integrations/vitest/env.d.mts +18 -10
  64. package/dist/build-integrations/vitest/env.mjs +11 -10
  65. package/dist/build-integrations/vitest/env.mjs.map +1 -1
  66. package/dist/build-integrations/vitest/errors.d.mts +7 -11
  67. package/dist/build-integrations/vitest/errors.mjs +3 -4
  68. package/dist/build-integrations/vitest/errors.mjs.map +1 -1
  69. package/dist/build-integrations/vitest/global-setup.d.mts +35 -0
  70. package/dist/build-integrations/vitest/global-setup.mjs +156 -0
  71. package/dist/build-integrations/vitest/global-setup.mjs.map +1 -0
  72. package/dist/build-integrations/vitest/index.d.mts +3 -2
  73. package/dist/build-integrations/vitest/index.mjs +3 -2
  74. package/dist/build-integrations/vitest/setup.mjs +2 -2
  75. package/dist/build-integrations/vitest/setup.mjs.map +1 -1
  76. package/dist/build-integrations/vitest/stack-context.d.mts +5 -3
  77. package/dist/build-integrations/vitest/stack-context.mjs +3 -2
  78. package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
  79. package/dist/cli/bail.mjs.map +1 -1
  80. package/dist/cli/doctor-probes.mjs +1 -3
  81. package/dist/cli/doctor-probes.mjs.map +1 -1
  82. package/dist/cli/main.d.mts +23 -1
  83. package/dist/cli/main.mjs +63 -8
  84. package/dist/cli/main.mjs.map +1 -1
  85. package/dist/cli/prune-direct.mjs.map +1 -1
  86. package/dist/cli/snapshot-reader.mjs.map +1 -1
  87. package/dist/cli/up-lifecycle.mjs.map +1 -1
  88. package/dist/cli/wirings/apply.mjs +28 -21
  89. package/dist/cli/wirings/apply.mjs.map +1 -1
  90. package/dist/cli/wirings/codegen.mjs +108 -0
  91. package/dist/cli/wirings/codegen.mjs.map +1 -0
  92. package/dist/cli/wirings/config-loader.mjs +12 -62
  93. package/dist/cli/wirings/config-loader.mjs.map +1 -1
  94. package/dist/cli/wirings/dump-ids.mjs +86 -0
  95. package/dist/cli/wirings/dump-ids.mjs.map +1 -0
  96. package/dist/cli/wirings/engine-command.mjs +1 -1
  97. package/dist/cli/wirings/engine-command.mjs.map +1 -1
  98. package/dist/cli/wirings/identity.mjs +2 -2
  99. package/dist/cli/wirings/identity.mjs.map +1 -1
  100. package/dist/cli/wirings/provide-file-system.mjs.map +1 -1
  101. package/dist/cli/wirings/read-devstack-version.mjs +17 -0
  102. package/dist/cli/wirings/read-devstack-version.mjs.map +1 -0
  103. package/dist/cli/wirings/snapshot.mjs +27 -34
  104. package/dist/cli/wirings/snapshot.mjs.map +1 -1
  105. package/dist/cli/wirings/up-ipc.mjs +147 -0
  106. package/dist/cli/wirings/up-ipc.mjs.map +1 -0
  107. package/dist/cli/wirings/up.mjs +218 -198
  108. package/dist/cli/wirings/up.mjs.map +1 -1
  109. package/dist/cli/wirings/wipe.mjs +1 -1
  110. package/dist/cli/wirings/wipe.mjs.map +1 -1
  111. package/dist/contracts/chain-probe.d.mts +1 -1
  112. package/dist/contracts/chain-probe.mjs +1 -1
  113. package/dist/contracts/chain-probe.mjs.map +1 -1
  114. package/dist/contracts/codegenable.d.mts +60 -6
  115. package/dist/contracts/codegenable.mjs +28 -0
  116. package/dist/contracts/codegenable.mjs.map +1 -0
  117. package/dist/contracts/config-bindings.mjs +162 -0
  118. package/dist/contracts/config-bindings.mjs.map +1 -0
  119. package/dist/contracts/container-runtime.d.mts +23 -17
  120. package/dist/contracts/plugin-expander.mjs.map +1 -1
  121. package/dist/contracts/snapshotable.d.mts +5 -7
  122. package/dist/contracts/wallet-protocol.d.mts +2 -5
  123. package/dist/contracts/wallet-protocol.mjs +2 -5
  124. package/dist/contracts/wallet-protocol.mjs.map +1 -1
  125. package/dist/index.d.mts +21 -26
  126. package/dist/index.mjs +8 -9
  127. package/dist/orchestrators/boot.d.mts +28 -0
  128. package/dist/orchestrators/boot.mjs +440 -0
  129. package/dist/orchestrators/boot.mjs.map +1 -0
  130. package/dist/orchestrators/codegen/bindings.d.mts +13 -1
  131. package/dist/orchestrators/codegen/bindings.mjs +23 -9
  132. package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
  133. package/dist/orchestrators/codegen/config-runtime.mjs +208 -0
  134. package/dist/orchestrators/codegen/config-runtime.mjs.map +1 -0
  135. package/dist/orchestrators/codegen/emit.mjs +1 -1
  136. package/dist/orchestrators/codegen/emit.mjs.map +1 -1
  137. package/dist/orchestrators/codegen/errors.mjs +21 -1
  138. package/dist/orchestrators/codegen/errors.mjs.map +1 -1
  139. package/dist/orchestrators/codegen/format.mjs +2 -0
  140. package/dist/orchestrators/codegen/format.mjs.map +1 -1
  141. package/dist/orchestrators/codegen/gitignore.mjs +30 -11
  142. package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
  143. package/dist/orchestrators/codegen/id-config.mjs +107 -0
  144. package/dist/orchestrators/codegen/id-config.mjs.map +1 -0
  145. package/dist/orchestrators/codegen/output-location.mjs +23 -31
  146. package/dist/orchestrators/codegen/output-location.mjs.map +1 -1
  147. package/dist/orchestrators/codegen/paths.mjs +8 -1
  148. package/dist/orchestrators/codegen/paths.mjs.map +1 -1
  149. package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
  150. package/dist/orchestrators/codegen/service.mjs +286 -58
  151. package/dist/orchestrators/codegen/service.mjs.map +1 -1
  152. package/dist/orchestrators/layers.mjs +31 -0
  153. package/dist/orchestrators/layers.mjs.map +1 -0
  154. package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -1
  155. package/dist/orchestrators/lifecycle-prune/index.mjs +8 -10
  156. package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -1
  157. package/dist/orchestrators/network-options.d.mts +52 -0
  158. package/dist/orchestrators/network-options.mjs +43 -0
  159. package/dist/orchestrators/network-options.mjs.map +1 -0
  160. package/dist/orchestrators/router/cleanup.mjs.map +1 -1
  161. package/dist/orchestrators/router/cors.mjs.map +1 -1
  162. package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
  163. package/dist/orchestrators/router/errors.mjs.map +1 -1
  164. package/dist/orchestrators/router/file-provider.mjs.map +1 -1
  165. package/dist/orchestrators/router/hostname.mjs.map +1 -1
  166. package/dist/orchestrators/router/profile.mjs +1 -1
  167. package/dist/orchestrators/router/profile.mjs.map +1 -1
  168. package/dist/orchestrators/router/service.d.mts +2 -2
  169. package/dist/orchestrators/router/service.mjs +12 -27
  170. package/dist/orchestrators/router/service.mjs.map +1 -1
  171. package/dist/orchestrators/router/traefik-container.mjs +1 -1
  172. package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
  173. package/dist/orchestrators/snapshot/capture.mjs +171 -195
  174. package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
  175. package/dist/orchestrators/snapshot/descriptor.d.mts +1 -1
  176. package/dist/orchestrators/snapshot/descriptor.mjs +53 -11
  177. package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
  178. package/dist/orchestrators/snapshot/identity-guard.mjs +3 -5
  179. package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -1
  180. package/dist/orchestrators/snapshot/image-bundle-tags.mjs +32 -101
  181. package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -1
  182. package/dist/orchestrators/snapshot/index.mjs +1 -4
  183. package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
  184. package/dist/orchestrators/snapshot/interrupted-restore.mjs +116 -0
  185. package/dist/orchestrators/snapshot/interrupted-restore.mjs.map +1 -0
  186. package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -1
  187. package/dist/orchestrators/snapshot/prune.mjs +40 -31
  188. package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
  189. package/dist/orchestrators/snapshot/restore.mjs +221 -196
  190. package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
  191. package/dist/orchestrators/snapshot/service.mjs +72 -62
  192. package/dist/orchestrators/snapshot/service.mjs.map +1 -1
  193. package/dist/orchestrators/snapshot/wipe.mjs +67 -56
  194. package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
  195. package/dist/plugins/account/codegen.mjs +3 -0
  196. package/dist/plugins/account/codegen.mjs.map +1 -1
  197. package/dist/plugins/account/errors.d.mts +2 -2
  198. package/dist/plugins/account/errors.mjs +1 -4
  199. package/dist/plugins/account/errors.mjs.map +1 -1
  200. package/dist/plugins/account/funding.mjs +3 -27
  201. package/dist/plugins/account/funding.mjs.map +1 -1
  202. package/dist/plugins/account/index.d.mts +3 -8
  203. package/dist/plugins/account/index.mjs +71 -35
  204. package/dist/plugins/account/index.mjs.map +1 -1
  205. package/dist/plugins/account/keypair.d.mts +8 -7
  206. package/dist/plugins/account/keypair.mjs +5 -18
  207. package/dist/plugins/account/keypair.mjs.map +1 -1
  208. package/dist/plugins/account/lease.mjs.map +1 -1
  209. package/dist/plugins/account/registry.d.mts +1 -46
  210. package/dist/plugins/account/registry.mjs.map +1 -1
  211. package/dist/plugins/account/service.d.mts +43 -34
  212. package/dist/plugins/account/service.mjs +9 -54
  213. package/dist/plugins/account/service.mjs.map +1 -1
  214. package/dist/plugins/account/snapshot.mjs.map +1 -1
  215. package/dist/plugins/account/variants/ephemeral.mjs.map +1 -1
  216. package/dist/plugins/account/variants/impersonate.mjs.map +1 -1
  217. package/dist/plugins/account/variants/signer.mjs.map +1 -1
  218. package/dist/plugins/action/discriminator.mjs.map +1 -1
  219. package/dist/plugins/action/errors.mjs +1 -4
  220. package/dist/plugins/action/errors.mjs.map +1 -1
  221. package/dist/plugins/action/execute.mjs +3 -4
  222. package/dist/plugins/action/execute.mjs.map +1 -1
  223. package/dist/plugins/action/index.d.mts +2 -2
  224. package/dist/plugins/action/index.mjs +7 -11
  225. package/dist/plugins/action/index.mjs.map +1 -1
  226. package/dist/plugins/action/service.d.mts +5 -7
  227. package/dist/plugins/action/service.mjs +2 -16
  228. package/dist/plugins/action/service.mjs.map +1 -1
  229. package/dist/plugins/coin/address-resolution.mjs.map +1 -1
  230. package/dist/plugins/coin/codegen.mjs +97 -16
  231. package/dist/plugins/coin/codegen.mjs.map +1 -1
  232. package/dist/plugins/coin/discovery.mjs.map +1 -1
  233. package/dist/plugins/coin/errors.mjs +1 -4
  234. package/dist/plugins/coin/errors.mjs.map +1 -1
  235. package/dist/plugins/coin/index.d.mts +4 -34
  236. package/dist/plugins/coin/index.mjs +47 -28
  237. package/dist/plugins/coin/index.mjs.map +1 -1
  238. package/dist/plugins/coin/metadata.d.mts +1 -0
  239. package/dist/plugins/coin/metadata.mjs +8 -9
  240. package/dist/plugins/coin/metadata.mjs.map +1 -1
  241. package/dist/plugins/coin/mint.mjs +7 -21
  242. package/dist/plugins/coin/mint.mjs.map +1 -1
  243. package/dist/plugins/coin/registry.mjs +33 -20
  244. package/dist/plugins/coin/registry.mjs.map +1 -1
  245. package/dist/plugins/coin/service.d.mts +1 -1
  246. package/dist/plugins/coin/service.mjs +1 -8
  247. package/dist/plugins/coin/service.mjs.map +1 -1
  248. package/dist/plugins/coin/snapshot.mjs.map +1 -1
  249. package/dist/plugins/coin/type-strings.mjs.map +1 -1
  250. package/dist/plugins/dashboard/domain.mjs +106 -167
  251. package/dist/plugins/dashboard/domain.mjs.map +1 -1
  252. package/dist/plugins/dashboard/index.mjs +13 -13
  253. package/dist/plugins/dashboard/index.mjs.map +1 -1
  254. package/dist/plugins/dashboard/origin-policy.mjs +3 -3
  255. package/dist/plugins/dashboard/origin-policy.mjs.map +1 -1
  256. package/dist/plugins/dashboard/routable.mjs.map +1 -1
  257. package/dist/plugins/dashboard/schema/builder.mjs.map +1 -1
  258. package/dist/plugins/dashboard/schema/enums.mjs.map +1 -1
  259. package/dist/plugins/dashboard/schema/root.mjs +23 -44
  260. package/dist/plugins/dashboard/schema/root.mjs.map +1 -1
  261. package/dist/plugins/dashboard/schema/types.mjs +37 -91
  262. package/dist/plugins/dashboard/schema/types.mjs.map +1 -1
  263. package/dist/plugins/dashboard/schema.mjs.map +1 -1
  264. package/dist/plugins/dashboard/server.mjs.map +1 -1
  265. package/dist/plugins/deepbook/codegen.d.mts +12 -11
  266. package/dist/plugins/deepbook/codegen.mjs +108 -11
  267. package/dist/plugins/deepbook/codegen.mjs.map +1 -1
  268. package/dist/plugins/deepbook/deploy.mjs +7 -14
  269. package/dist/plugins/deepbook/deploy.mjs.map +1 -1
  270. package/dist/plugins/deepbook/errors.mjs +4 -2
  271. package/dist/plugins/deepbook/errors.mjs.map +1 -1
  272. package/dist/plugins/deepbook/faucet-strategy.mjs +4 -10
  273. package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
  274. package/dist/plugins/deepbook/hash.mjs.map +1 -1
  275. package/dist/plugins/deepbook/index.d.mts +38 -34
  276. package/dist/plugins/deepbook/index.mjs +133 -64
  277. package/dist/plugins/deepbook/index.mjs.map +1 -1
  278. package/dist/plugins/deepbook/plugin-key.mjs.map +1 -1
  279. package/dist/plugins/deepbook/pyth/index.mjs +4 -8
  280. package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
  281. package/dist/plugins/deepbook/snapshot.mjs +0 -1
  282. package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
  283. package/dist/plugins/deepbook/type-strings.mjs.map +1 -1
  284. package/dist/plugins/deepbook/types.d.mts +2 -1
  285. package/dist/plugins/deepbook/types.mjs.map +1 -1
  286. package/dist/plugins/faucet/dispatcher.d.mts +3 -3
  287. package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
  288. package/dist/plugins/faucet/errors.mjs.map +1 -1
  289. package/dist/plugins/faucet/http.mjs +2 -10
  290. package/dist/plugins/faucet/http.mjs.map +1 -1
  291. package/dist/plugins/faucet/index.mjs +0 -1
  292. package/dist/plugins/faucet/index.mjs.map +1 -1
  293. package/dist/plugins/host-service/errors.d.mts +1 -3
  294. package/dist/plugins/host-service/errors.mjs +1 -2
  295. package/dist/plugins/host-service/errors.mjs.map +1 -1
  296. package/dist/plugins/host-service/index.d.mts +1 -2
  297. package/dist/plugins/host-service/index.mjs +11 -11
  298. package/dist/plugins/host-service/index.mjs.map +1 -1
  299. package/dist/plugins/host-service/routable.mjs.map +1 -1
  300. package/dist/plugins/host-service/service.mjs +13 -13
  301. package/dist/plugins/host-service/service.mjs.map +1 -1
  302. package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -1
  303. package/dist/plugins/internal/codegen-helpers.mjs +2 -0
  304. package/dist/plugins/internal/codegen-helpers.mjs.map +1 -1
  305. package/dist/plugins/internal/funding-failure-error.mjs.map +1 -1
  306. package/dist/plugins/{postgres → internal/postgres-sidecar}/connection.mjs +1 -1
  307. package/dist/plugins/internal/postgres-sidecar/connection.mjs.map +1 -0
  308. package/dist/plugins/{postgres → internal/postgres-sidecar}/db-ensure.mjs +30 -16
  309. package/dist/plugins/internal/postgres-sidecar/db-ensure.mjs.map +1 -0
  310. package/dist/plugins/internal/postgres-sidecar/errors.mjs +21 -0
  311. package/dist/plugins/internal/postgres-sidecar/errors.mjs.map +1 -0
  312. package/dist/{substrate/runtime/scoped-multimap → plugins/internal/postgres-sidecar}/index.mjs +1 -0
  313. package/dist/plugins/internal/postgres-sidecar/service.mjs +121 -0
  314. package/dist/plugins/internal/postgres-sidecar/service.mjs.map +1 -0
  315. package/dist/plugins/package/build.mjs +2 -2
  316. package/dist/plugins/package/build.mjs.map +1 -1
  317. package/dist/plugins/package/codegen.d.mts +7 -14
  318. package/dist/plugins/package/codegen.mjs +187 -59
  319. package/dist/plugins/package/codegen.mjs.map +1 -1
  320. package/dist/plugins/package/dep-resolution.mjs +51 -3
  321. package/dist/plugins/package/dep-resolution.mjs.map +1 -1
  322. package/dist/plugins/package/errors.mjs +1 -4
  323. package/dist/plugins/package/errors.mjs.map +1 -1
  324. package/dist/plugins/package/git-source.d.mts +18 -0
  325. package/dist/plugins/package/git-source.mjs +119 -0
  326. package/dist/plugins/package/git-source.mjs.map +1 -0
  327. package/dist/plugins/package/index.d.mts +28 -19
  328. package/dist/plugins/package/index.mjs +107 -32
  329. package/dist/plugins/package/index.mjs.map +1 -1
  330. package/dist/plugins/package/mode-known.mjs +2 -2
  331. package/dist/plugins/package/mode-known.mjs.map +1 -1
  332. package/dist/plugins/package/mode-local.mjs +18 -35
  333. package/dist/plugins/package/mode-local.mjs.map +1 -1
  334. package/dist/plugins/package/publish-executor.mjs +13 -8
  335. package/dist/plugins/package/publish-executor.mjs.map +1 -1
  336. package/dist/plugins/package/publish-output.d.mts +1 -11
  337. package/dist/plugins/package/publish-output.mjs +1 -9
  338. package/dist/plugins/package/publish-output.mjs.map +1 -1
  339. package/dist/plugins/package/registry.d.mts +1 -1
  340. package/dist/plugins/package/registry.mjs +26 -14
  341. package/dist/plugins/package/registry.mjs.map +1 -1
  342. package/dist/plugins/package/service.mjs.map +1 -1
  343. package/dist/plugins/package/snapshot.mjs.map +1 -1
  344. package/dist/plugins/router-entrypoints.mjs +1 -3
  345. package/dist/plugins/router-entrypoints.mjs.map +1 -1
  346. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +1 -2
  347. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
  348. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +1 -6
  349. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
  350. package/dist/plugins/seal/codegen.d.mts +1 -5
  351. package/dist/plugins/seal/codegen.mjs +83 -12
  352. package/dist/plugins/seal/codegen.mjs.map +1 -1
  353. package/dist/plugins/seal/config-render.mjs +2 -6
  354. package/dist/plugins/seal/config-render.mjs.map +1 -1
  355. package/dist/plugins/seal/deploy.mjs +18 -29
  356. package/dist/plugins/seal/deploy.mjs.map +1 -1
  357. package/dist/plugins/seal/errors.d.mts +4 -5
  358. package/dist/plugins/seal/errors.mjs +1 -8
  359. package/dist/plugins/seal/errors.mjs.map +1 -1
  360. package/dist/plugins/seal/index.d.mts +7 -28
  361. package/dist/plugins/seal/index.mjs +69 -47
  362. package/dist/plugins/seal/index.mjs.map +1 -1
  363. package/dist/plugins/seal/key-manager.mjs.map +1 -1
  364. package/dist/plugins/seal/key-server.mjs +1 -6
  365. package/dist/plugins/seal/key-server.mjs.map +1 -1
  366. package/dist/plugins/seal/keygen.mjs +2 -3
  367. package/dist/plugins/seal/keygen.mjs.map +1 -1
  368. package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
  369. package/dist/plugins/seal/mode/live.mjs +1 -1
  370. package/dist/plugins/seal/mode/live.mjs.map +1 -1
  371. package/dist/plugins/seal/mode/local-keygen.mjs +4 -10
  372. package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
  373. package/dist/plugins/seal/plugin-key.mjs.map +1 -1
  374. package/dist/plugins/seal/registry-publish.mjs.map +1 -1
  375. package/dist/plugins/seal/routable.mjs.map +1 -1
  376. package/dist/plugins/seal/service.mjs.map +1 -1
  377. package/dist/plugins/seal/snapshot.mjs +1 -2
  378. package/dist/plugins/seal/snapshot.mjs.map +1 -1
  379. package/dist/plugins/sui/auto-tick.mjs +5 -5
  380. package/dist/plugins/sui/auto-tick.mjs.map +1 -1
  381. package/dist/plugins/sui/chain-build-container.mjs +2 -2
  382. package/dist/plugins/sui/chain-build-container.mjs.map +1 -1
  383. package/dist/plugins/sui/chain-probe.mjs +4 -4
  384. package/dist/plugins/sui/chain-probe.mjs.map +1 -1
  385. package/dist/plugins/sui/codegen.d.mts +9 -7
  386. package/dist/plugins/sui/codegen.mjs +49 -46
  387. package/dist/plugins/sui/codegen.mjs.map +1 -1
  388. package/dist/plugins/sui/errors.d.mts +1 -1
  389. package/dist/plugins/sui/errors.mjs +1 -9
  390. package/dist/plugins/sui/errors.mjs.map +1 -1
  391. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.d.mts +1 -1
  392. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.mjs +3 -7
  393. package/dist/plugins/sui/exec/index.mjs.map +1 -0
  394. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.mjs +1 -1
  395. package/dist/plugins/sui/exec/sign-and-dispatch.mjs.map +1 -0
  396. package/dist/plugins/sui/fork-faucet-strategy.mjs +2 -6
  397. package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -1
  398. package/dist/plugins/sui/fork-orchestration.mjs +13 -23
  399. package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
  400. package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
  401. package/dist/plugins/sui/index.d.mts +34 -83
  402. package/dist/plugins/sui/index.mjs +200 -68
  403. package/dist/plugins/sui/index.mjs.map +1 -1
  404. package/dist/{substrate/runtime/sui-ledger → plugins/sui/ledger}/object-ref.mjs +1 -1
  405. package/dist/plugins/sui/ledger/object-ref.mjs.map +1 -0
  406. package/dist/plugins/sui/local-faucet-strategy.mjs +1 -5
  407. package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -1
  408. package/dist/plugins/sui/log-attrs.mjs +11 -0
  409. package/dist/plugins/sui/log-attrs.mjs.map +1 -0
  410. package/dist/plugins/sui/mode/external.mjs +4 -12
  411. package/dist/plugins/sui/mode/external.mjs.map +1 -1
  412. package/dist/plugins/sui/mode/fork.mjs +19 -16
  413. package/dist/plugins/sui/mode/fork.mjs.map +1 -1
  414. package/dist/plugins/sui/mode/live.mjs +4 -17
  415. package/dist/plugins/sui/mode/live.mjs.map +1 -1
  416. package/dist/plugins/sui/mode/local.d.mts +1 -0
  417. package/dist/plugins/sui/mode/local.mjs +203 -61
  418. package/dist/plugins/sui/mode/local.mjs.map +1 -1
  419. package/dist/plugins/sui/mode/shared-boot.mjs +18 -23
  420. package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
  421. package/dist/plugins/sui/mode/shared.d.mts +6 -7
  422. package/dist/plugins/sui/mode/shared.mjs.map +1 -1
  423. package/dist/plugins/sui/mode/spec.d.mts +23 -6
  424. package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.mjs +28 -30
  425. package/dist/plugins/sui/move/index.mjs.map +1 -0
  426. package/dist/plugins/sui/move-summary-runner.mjs +8 -4
  427. package/dist/plugins/sui/move-summary-runner.mjs.map +1 -1
  428. package/dist/{substrate/network.d.mts → plugins/sui/network-config.d.mts} +11 -10
  429. package/dist/plugins/sui/network-resolver.d.mts +6 -6
  430. package/dist/plugins/sui/routable.mjs.map +1 -1
  431. package/dist/plugins/sui/service.mjs +10 -6
  432. package/dist/plugins/sui/service.mjs.map +1 -1
  433. package/dist/plugins/sui/snapshot.mjs +10 -5
  434. package/dist/plugins/sui/snapshot.mjs.map +1 -1
  435. package/dist/plugins/wallet/codegen.d.mts +8 -6
  436. package/dist/plugins/wallet/codegen.mjs +4 -10
  437. package/dist/plugins/wallet/codegen.mjs.map +1 -1
  438. package/dist/plugins/wallet/errors.mjs +1 -4
  439. package/dist/plugins/wallet/errors.mjs.map +1 -1
  440. package/dist/plugins/wallet/index.d.mts +3 -6
  441. package/dist/plugins/wallet/index.mjs +16 -21
  442. package/dist/plugins/wallet/index.mjs.map +1 -1
  443. package/dist/plugins/wallet/origin-policy.mjs +3 -3
  444. package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
  445. package/dist/plugins/wallet/pairing.mjs +6 -24
  446. package/dist/plugins/wallet/pairing.mjs.map +1 -1
  447. package/dist/plugins/wallet/protocol.mjs.map +1 -1
  448. package/dist/plugins/wallet/routable.mjs.map +1 -1
  449. package/dist/plugins/wallet/server.mjs +17 -24
  450. package/dist/plugins/wallet/server.mjs.map +1 -1
  451. package/dist/plugins/wallet/service.d.mts +2 -2
  452. package/dist/plugins/wallet/service.mjs +4 -15
  453. package/dist/plugins/wallet/service.mjs.map +1 -1
  454. package/dist/plugins/wallet/snapshot.mjs.map +1 -1
  455. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +1 -5
  456. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
  457. package/dist/plugins/walrus/codegen.d.mts +2 -13
  458. package/dist/plugins/walrus/codegen.mjs +93 -28
  459. package/dist/plugins/walrus/codegen.mjs.map +1 -1
  460. package/dist/plugins/walrus/deploy-paths.mjs +2 -3
  461. package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
  462. package/dist/plugins/walrus/deploy.mjs +26 -19
  463. package/dist/plugins/walrus/deploy.mjs.map +1 -1
  464. package/dist/plugins/walrus/errors.mjs +1 -8
  465. package/dist/plugins/walrus/errors.mjs.map +1 -1
  466. package/dist/plugins/walrus/faucet-strategy.mjs +15 -1
  467. package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
  468. package/dist/plugins/walrus/index.d.mts +13 -44
  469. package/dist/plugins/walrus/index.mjs +119 -122
  470. package/dist/plugins/walrus/index.mjs.map +1 -1
  471. package/dist/plugins/walrus/mode/known-deploy.mjs +6 -6
  472. package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
  473. package/dist/plugins/walrus/mode/local-cluster.d.mts +2 -2
  474. package/dist/plugins/walrus/mode/local-cluster.mjs +2 -10
  475. package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
  476. package/dist/plugins/walrus/plugin-key.mjs.map +1 -1
  477. package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
  478. package/dist/plugins/walrus/routable.mjs.map +1 -1
  479. package/dist/plugins/walrus/service.mjs.map +1 -1
  480. package/dist/plugins/walrus/snapshot.mjs +3 -3
  481. package/dist/plugins/walrus/snapshot.mjs.map +1 -1
  482. package/dist/plugins/walrus/storage-nodes.mjs +53 -14
  483. package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
  484. package/dist/plugins/walrus/wal-swap.mjs +4 -8
  485. package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
  486. package/dist/primitives/artifact-publisher.mjs.map +1 -1
  487. package/dist/primitives/cache.d.mts +1 -1
  488. package/dist/runtime/docker/client.mjs +47 -3
  489. package/dist/runtime/docker/client.mjs.map +1 -1
  490. package/dist/runtime/docker/container.mjs +37 -57
  491. package/dist/runtime/docker/container.mjs.map +1 -1
  492. package/dist/runtime/docker/errors.mjs.map +1 -1
  493. package/dist/runtime/docker/exec.mjs +2 -2
  494. package/dist/runtime/docker/exec.mjs.map +1 -1
  495. package/dist/runtime/docker/image.mjs +10 -11
  496. package/dist/runtime/docker/image.mjs.map +1 -1
  497. package/dist/runtime/docker/index.mjs +0 -1
  498. package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -1
  499. package/dist/runtime/docker/inventory.mjs +9 -9
  500. package/dist/runtime/docker/inventory.mjs.map +1 -1
  501. package/dist/runtime/docker/labels.mjs +12 -1
  502. package/dist/runtime/docker/labels.mjs.map +1 -1
  503. package/dist/runtime/docker/network.mjs +6 -6
  504. package/dist/runtime/docker/network.mjs.map +1 -1
  505. package/dist/runtime/docker/render-run-args.mjs.map +1 -1
  506. package/dist/runtime/docker/service.mjs +31 -45
  507. package/dist/runtime/docker/service.mjs.map +1 -1
  508. package/dist/runtime/docker/sweep.mjs +14 -64
  509. package/dist/runtime/docker/sweep.mjs.map +1 -1
  510. package/dist/runtime/docker/volume.mjs +1 -1
  511. package/dist/runtime/docker/volume.mjs.map +1 -1
  512. package/dist/runtime/docker/wrap.mjs +14 -2
  513. package/dist/runtime/docker/wrap.mjs.map +1 -1
  514. package/dist/substrate/brand.d.mts +2 -5
  515. package/dist/substrate/brand.mjs +3 -2
  516. package/dist/substrate/brand.mjs.map +1 -1
  517. package/dist/substrate/cross-process.mjs +2 -16
  518. package/dist/substrate/cross-process.mjs.map +1 -1
  519. package/dist/substrate/event-time.mjs +0 -2
  520. package/dist/substrate/event-time.mjs.map +1 -1
  521. package/dist/substrate/events.d.mts +46 -16
  522. package/dist/substrate/identity.d.mts +11 -5
  523. package/dist/substrate/manifest.d.mts +33 -26
  524. package/dist/substrate/manifest.mjs +8 -3
  525. package/dist/substrate/manifest.mjs.map +1 -1
  526. package/dist/substrate/options.d.mts +33 -4
  527. package/dist/substrate/plugin-ctx.d.mts +70 -0
  528. package/dist/substrate/plugin-ctx.mjs +66 -0
  529. package/dist/substrate/plugin-ctx.mjs.map +1 -0
  530. package/dist/substrate/plugin.d.mts +46 -38
  531. package/dist/substrate/plugin.mjs +13 -9
  532. package/dist/substrate/plugin.mjs.map +1 -1
  533. package/dist/substrate/projection.d.mts +1 -1
  534. package/dist/substrate/runtime/atomic-write.mjs +3 -4
  535. package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
  536. package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
  537. package/dist/substrate/runtime/cache/service.mjs +50 -20
  538. package/dist/substrate/runtime/cache/service.mjs.map +1 -1
  539. package/dist/substrate/runtime/config-validation.mjs.map +1 -1
  540. package/dist/substrate/runtime/control-plane/domain.mjs +34 -12
  541. package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -1
  542. package/dist/substrate/runtime/control-plane/service.mjs.map +1 -1
  543. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +14 -17
  544. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
  545. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
  546. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
  547. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -1
  548. package/dist/substrate/runtime/cross-process/index.mjs +0 -2
  549. package/dist/substrate/runtime/cross-process/live-clock.mjs +1 -1
  550. package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -1
  551. package/dist/substrate/runtime/cross-process/liveness.mjs +11 -18
  552. package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
  553. package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +2 -2
  554. package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -1
  555. package/dist/substrate/runtime/cross-process/roster.mjs +17 -127
  556. package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
  557. package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -1
  558. package/dist/substrate/runtime/cross-process/stack-lock.mjs +29 -28
  559. package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
  560. package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
  561. package/dist/substrate/runtime/errors.mjs +1 -13
  562. package/dist/substrate/runtime/errors.mjs.map +1 -1
  563. package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -1
  564. package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -1
  565. package/dist/substrate/runtime/host-gateway.mjs.map +1 -1
  566. package/dist/substrate/runtime/host-tree-tar/index.mjs +15 -163
  567. package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
  568. package/dist/substrate/runtime/http-probe.d.mts +1 -3
  569. package/dist/substrate/runtime/http-probe.mjs.map +1 -1
  570. package/dist/substrate/runtime/index.mjs +1 -6
  571. package/dist/substrate/runtime/lease-broker/service.mjs +5 -23
  572. package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
  573. package/dist/substrate/runtime/lifecycle/dep-graph.mjs +3 -3
  574. package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
  575. package/dist/substrate/runtime/lifecycle/graph-input-id.d.mts +1 -0
  576. package/dist/substrate/runtime/lifecycle/graph-input-id.mjs +133 -0
  577. package/dist/substrate/runtime/lifecycle/graph-input-id.mjs.map +1 -0
  578. package/dist/substrate/runtime/lifecycle/index.mjs +2 -2
  579. package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -1
  580. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +22 -1
  581. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
  582. package/dist/substrate/runtime/lifecycle/ready-gate.mjs +2 -15
  583. package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -1
  584. package/dist/substrate/runtime/lifecycle/selective-restart.mjs +29 -25
  585. package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -1
  586. package/dist/substrate/runtime/lifecycle/signals.mjs +1 -1
  587. package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
  588. package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -1
  589. package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -1
  590. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +0 -1
  591. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -1
  592. package/dist/substrate/runtime/managed-container.d.mts +5 -1
  593. package/dist/substrate/runtime/managed-container.mjs +8 -10
  594. package/dist/substrate/runtime/managed-container.mjs.map +1 -1
  595. package/dist/substrate/runtime/manifest/manifest.mjs +8 -30
  596. package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
  597. package/dist/substrate/runtime/mode-errors.d.mts +1 -2
  598. package/dist/substrate/runtime/mode-errors.mjs.map +1 -1
  599. package/dist/substrate/runtime/observability/cascade-formatter.mjs +1 -11
  600. package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
  601. package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -1
  602. package/dist/substrate/runtime/observability/index.d.mts +1 -1
  603. package/dist/substrate/runtime/observability/index.mjs +4 -6
  604. package/dist/substrate/runtime/observability/log-attrs.mjs +46 -0
  605. package/dist/substrate/runtime/observability/log-attrs.mjs.map +1 -0
  606. package/dist/substrate/runtime/observability/log-store.mjs.map +1 -1
  607. package/dist/substrate/runtime/observability/logger.mjs +3 -3
  608. package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
  609. package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -1
  610. package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
  611. package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -1
  612. package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
  613. package/dist/substrate/runtime/observability/subprocess-capture.mjs +2 -2
  614. package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -1
  615. package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -1
  616. package/dist/substrate/runtime/paths.mjs +27 -9
  617. package/dist/substrate/runtime/paths.mjs.map +1 -1
  618. package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -1
  619. package/dist/substrate/runtime/port-broker/service.mjs +10 -27
  620. package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
  621. package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
  622. package/dist/substrate/runtime/probes.d.mts +2 -3
  623. package/dist/substrate/runtime/probes.mjs.map +1 -1
  624. package/dist/substrate/runtime/process-supervisor.mjs.map +1 -1
  625. package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
  626. package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
  627. package/dist/substrate/runtime/projection/update.mjs +87 -11
  628. package/dist/substrate/runtime/projection/update.mjs.map +1 -1
  629. package/dist/substrate/runtime/random-suffix.mjs.map +1 -1
  630. package/dist/substrate/runtime/reconcile/fs-plan.mjs +146 -0
  631. package/dist/substrate/runtime/reconcile/fs-plan.mjs.map +1 -0
  632. package/dist/substrate/runtime/reconcile/graph.mjs +19 -0
  633. package/dist/substrate/runtime/reconcile/graph.mjs.map +1 -0
  634. package/dist/substrate/runtime/reconcile/index.mjs +5 -0
  635. package/dist/substrate/runtime/reconcile/label.mjs +41 -0
  636. package/dist/substrate/runtime/reconcile/label.mjs.map +1 -0
  637. package/dist/substrate/runtime/reconcile/spec.mjs +15 -0
  638. package/dist/substrate/runtime/reconcile/spec.mjs.map +1 -0
  639. package/dist/substrate/runtime/retry-policy.d.mts +2 -3
  640. package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
  641. package/dist/substrate/runtime/routed-url.mjs.map +1 -1
  642. package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
  643. package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
  644. package/dist/substrate/runtime/stage-and-swap/index.mjs +49 -12
  645. package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
  646. package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -1
  647. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
  648. package/dist/substrate/runtime/strategy-registry/service.mjs +29 -17
  649. package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
  650. package/dist/substrate/runtime/subnet-broker.mjs.map +1 -1
  651. package/dist/substrate/runtime/supervisor/acquire-node.mjs +188 -56
  652. package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -1
  653. package/dist/substrate/runtime/supervisor/background-tasks.mjs +79 -65
  654. package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -1
  655. package/dist/substrate/runtime/supervisor/command-loop.mjs +82 -23
  656. package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -1
  657. package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs +16 -0
  658. package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs.map +1 -0
  659. package/dist/substrate/runtime/supervisor/errors.mjs +11 -2
  660. package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -1
  661. package/dist/substrate/runtime/supervisor/index.mjs +2 -0
  662. package/dist/substrate/runtime/supervisor/shutdown.mjs +6 -6
  663. package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -1
  664. package/dist/substrate/runtime/supervisor/start-supervisor.mjs +60 -70
  665. package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -1
  666. package/dist/substrate/runtime/supervisor/state.d.mts +1 -1
  667. package/dist/substrate/runtime/supervisor/state.mjs +1 -1
  668. package/dist/substrate/runtime/supervisor/state.mjs.map +1 -1
  669. package/dist/substrate/runtime/supervisor/teardown.mjs +10 -9
  670. package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -1
  671. package/dist/substrate/runtime/supervisor/wiring.mjs +6 -20
  672. package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -1
  673. package/dist/substrate/runtime/tar/reader.mjs +216 -0
  674. package/dist/substrate/runtime/tar/reader.mjs.map +1 -0
  675. package/dist/substrate/runtime/typed-env.mjs.map +1 -1
  676. package/dist/substrate/versioned-doc-schema.mjs.map +1 -1
  677. package/dist/substrate/versioned-doc-sync.mjs +5 -5
  678. package/dist/substrate/versioned-doc-sync.mjs.map +1 -1
  679. package/dist/surfaces/cli/command-tree.mjs +49 -7
  680. package/dist/surfaces/cli/command-tree.mjs.map +1 -1
  681. package/dist/surfaces/cli/commands/config.mjs +1 -1
  682. package/dist/surfaces/cli/commands/config.mjs.map +1 -1
  683. package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -1
  684. package/dist/surfaces/cli/commands/confirm.mjs.map +1 -1
  685. package/dist/surfaces/cli/commands/doctor.mjs +1 -1
  686. package/dist/surfaces/cli/commands/doctor.mjs.map +1 -1
  687. package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -1
  688. package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
  689. package/dist/surfaces/cli/commands/prune.mjs +1 -1
  690. package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
  691. package/dist/surfaces/cli/commands/snapshot.mjs +1 -1
  692. package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -1
  693. package/dist/surfaces/cli/commands/status.mjs +1 -1
  694. package/dist/surfaces/cli/commands/status.mjs.map +1 -1
  695. package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
  696. package/dist/surfaces/cli/commands/wipe.mjs +3 -4
  697. package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
  698. package/dist/surfaces/cli/envelope.mjs.map +1 -1
  699. package/dist/surfaces/cli/errors.mjs.map +1 -1
  700. package/dist/surfaces/cli/flags.mjs.map +1 -1
  701. package/dist/surfaces/cli/index.mjs +45 -14
  702. package/dist/surfaces/cli/index.mjs.map +1 -1
  703. package/dist/surfaces/cli/output.mjs.map +1 -1
  704. package/dist/surfaces/cli/sysexits.mjs.map +1 -1
  705. package/dist/surfaces/tui/app.mjs +0 -21
  706. package/dist/surfaces/tui/app.mjs.map +1 -1
  707. package/dist/surfaces/tui/dashboard.mjs +0 -48
  708. package/dist/surfaces/tui/dashboard.mjs.map +1 -1
  709. package/dist/surfaces/tui/display-derivation.mjs +80 -16
  710. package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
  711. package/dist/surfaces/tui/errors.mjs.map +1 -1
  712. package/dist/surfaces/tui/event-log.mjs +0 -9
  713. package/dist/surfaces/tui/event-log.mjs.map +1 -1
  714. package/dist/surfaces/tui/heartbeat.mjs.map +1 -1
  715. package/dist/surfaces/tui/index.mjs +2 -2
  716. package/dist/surfaces/tui/index.mjs.map +1 -1
  717. package/dist/surfaces/tui/input.mjs.map +1 -1
  718. package/dist/surfaces/tui/mode-detect.mjs.map +1 -1
  719. package/dist/surfaces/tui/mount-ink.mjs.map +1 -1
  720. package/dist/surfaces/tui/plain-renderer.mjs +26 -19
  721. package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
  722. package/dist/surfaces/tui/resource-table.mjs +8 -10
  723. package/dist/surfaces/tui/resource-table.mjs.map +1 -1
  724. package/images/postgres/Dockerfile +0 -1
  725. package/images/sui/Dockerfile +27 -54
  726. package/images/sui/entrypoint.sh +17 -179
  727. package/package.json +23 -15
  728. package/dashboard-ui/assets/index-Bmi1UtAg.js +0 -1356
  729. package/dashboard-ui/assets/index-D5EShVt4.js +0 -3
  730. package/dashboard-ui/assets/index-Deml9drg.css +0 -1
  731. package/dist/api/plugin-errors.d.mts +0 -7
  732. package/dist/api/plugin-errors.mjs +0 -10
  733. package/dist/api/plugin-errors.mjs.map +0 -1
  734. package/dist/cli/wirings/build-verb-layers.mjs +0 -42
  735. package/dist/cli/wirings/build-verb-layers.mjs.map +0 -1
  736. package/dist/contracts/capability-decl.d.mts +0 -40
  737. package/dist/orchestrators/built-in-plugin-layers.mjs +0 -54
  738. package/dist/orchestrators/built-in-plugin-layers.mjs.map +0 -1
  739. package/dist/orchestrators/run.mjs +0 -91
  740. package/dist/orchestrators/run.mjs.map +0 -1
  741. package/dist/orchestrators/runtime-composition.d.mts +0 -10
  742. package/dist/orchestrators/runtime-composition.mjs +0 -252
  743. package/dist/orchestrators/runtime-composition.mjs.map +0 -1
  744. package/dist/orchestrators/snapshot/capture-command.d.mts +0 -1
  745. package/dist/orchestrators/snapshot/capture-command.mjs +0 -25
  746. package/dist/orchestrators/snapshot/capture-command.mjs.map +0 -1
  747. package/dist/orchestrators/snapshot/pending-marker.mjs +0 -99
  748. package/dist/orchestrators/snapshot/pending-marker.mjs.map +0 -1
  749. package/dist/orchestrators/snapshot/recover-pending.mjs +0 -223
  750. package/dist/orchestrators/snapshot/recover-pending.mjs.map +0 -1
  751. package/dist/orchestrators/snapshot/state-document.d.mts +0 -1
  752. package/dist/orchestrators/snapshot/state-document.mjs +0 -58
  753. package/dist/orchestrators/snapshot/state-document.mjs.map +0 -1
  754. package/dist/plugins/account/spans.mjs +0 -16
  755. package/dist/plugins/account/spans.mjs.map +0 -1
  756. package/dist/plugins/account/variants/env.mjs +0 -24
  757. package/dist/plugins/account/variants/env.mjs.map +0 -1
  758. package/dist/plugins/account/variants/inline.mjs +0 -13
  759. package/dist/plugins/account/variants/inline.mjs.map +0 -1
  760. package/dist/plugins/account/variants/keystore.mjs +0 -91
  761. package/dist/plugins/account/variants/keystore.mjs.map +0 -1
  762. package/dist/plugins/action/spans.mjs +0 -11
  763. package/dist/plugins/action/spans.mjs.map +0 -1
  764. package/dist/plugins/coin/spans.mjs +0 -20
  765. package/dist/plugins/coin/spans.mjs.map +0 -1
  766. package/dist/plugins/deepbook/spans.mjs +0 -18
  767. package/dist/plugins/deepbook/spans.mjs.map +0 -1
  768. package/dist/plugins/faucet/spans.mjs +0 -12
  769. package/dist/plugins/faucet/spans.mjs.map +0 -1
  770. package/dist/plugins/package/spans.mjs +0 -14
  771. package/dist/plugins/package/spans.mjs.map +0 -1
  772. package/dist/plugins/postgres/codegen.mjs +0 -42
  773. package/dist/plugins/postgres/codegen.mjs.map +0 -1
  774. package/dist/plugins/postgres/connection.d.mts +0 -33
  775. package/dist/plugins/postgres/connection.mjs.map +0 -1
  776. package/dist/plugins/postgres/db-ensure.mjs.map +0 -1
  777. package/dist/plugins/postgres/errors.d.mts +0 -60
  778. package/dist/plugins/postgres/errors.mjs +0 -29
  779. package/dist/plugins/postgres/errors.mjs.map +0 -1
  780. package/dist/plugins/postgres/index.d.mts +0 -37
  781. package/dist/plugins/postgres/index.mjs +0 -68
  782. package/dist/plugins/postgres/index.mjs.map +0 -1
  783. package/dist/plugins/postgres/routable.mjs +0 -33
  784. package/dist/plugins/postgres/routable.mjs.map +0 -1
  785. package/dist/plugins/postgres/service.d.mts +0 -50
  786. package/dist/plugins/postgres/service.mjs +0 -179
  787. package/dist/plugins/postgres/service.mjs.map +0 -1
  788. package/dist/plugins/postgres/snapshot.mjs +0 -32
  789. package/dist/plugins/postgres/snapshot.mjs.map +0 -1
  790. package/dist/plugins/postgres/spans.mjs +0 -11
  791. package/dist/plugins/postgres/spans.mjs.map +0 -1
  792. package/dist/plugins/seal/spans.mjs +0 -18
  793. package/dist/plugins/seal/spans.mjs.map +0 -1
  794. package/dist/plugins/sui/spans.mjs +0 -17
  795. package/dist/plugins/sui/spans.mjs.map +0 -1
  796. package/dist/plugins/wallet/spans.mjs +0 -22
  797. package/dist/plugins/wallet/spans.mjs.map +0 -1
  798. package/dist/plugins/walrus/registry-publish.d.mts +0 -24
  799. package/dist/plugins/walrus/spans.mjs +0 -18
  800. package/dist/plugins/walrus/spans.mjs.map +0 -1
  801. package/dist/runtime/docker/logs.d.mts +0 -1
  802. package/dist/runtime/docker/logs.mjs +0 -34
  803. package/dist/runtime/docker/logs.mjs.map +0 -1
  804. package/dist/substrate/runtime/artifact-publisher/index.mjs +0 -86
  805. package/dist/substrate/runtime/artifact-publisher/index.mjs.map +0 -1
  806. package/dist/substrate/runtime/capability-sinks/index.d.mts +0 -1
  807. package/dist/substrate/runtime/capability-sinks/index.mjs +0 -3
  808. package/dist/substrate/runtime/capability-sinks/layer.d.mts +0 -1
  809. package/dist/substrate/runtime/capability-sinks/layer.mjs +0 -31
  810. package/dist/substrate/runtime/capability-sinks/layer.mjs.map +0 -1
  811. package/dist/substrate/runtime/capability-sinks/service.d.mts +0 -95
  812. package/dist/substrate/runtime/capability-sinks/service.mjs +0 -69
  813. package/dist/substrate/runtime/capability-sinks/service.mjs.map +0 -1
  814. package/dist/substrate/runtime/cross-process/lock.d.mts +0 -1
  815. package/dist/substrate/runtime/cross-process/lock.mjs +0 -23
  816. package/dist/substrate/runtime/cross-process/lock.mjs.map +0 -1
  817. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +0 -113
  818. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +0 -1
  819. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +0 -31
  820. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +0 -1
  821. package/dist/substrate/runtime/observability/formatter-registry.d.mts +0 -1
  822. package/dist/substrate/runtime/observability/formatter-registry.mjs +0 -48
  823. package/dist/substrate/runtime/observability/formatter-registry.mjs.map +0 -1
  824. package/dist/substrate/runtime/observability/span-store.d.mts +0 -1
  825. package/dist/substrate/runtime/observability/span-store.mjs +0 -110
  826. package/dist/substrate/runtime/observability/span-store.mjs.map +0 -1
  827. package/dist/substrate/runtime/observability/spans.d.mts +0 -1
  828. package/dist/substrate/runtime/observability/spans.mjs +0 -87
  829. package/dist/substrate/runtime/observability/spans.mjs.map +0 -1
  830. package/dist/substrate/runtime/projection/index.mjs +0 -4
  831. package/dist/substrate/runtime/projection/persisted.mjs +0 -213
  832. package/dist/substrate/runtime/projection/persisted.mjs.map +0 -1
  833. package/dist/substrate/runtime/scoped-multimap/service.mjs +0 -52
  834. package/dist/substrate/runtime/scoped-multimap/service.mjs.map +0 -1
  835. package/dist/substrate/runtime/scoped-ref-map/index.mjs +0 -2
  836. package/dist/substrate/runtime/scoped-ref-map/service.mjs +0 -83
  837. package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +0 -1
  838. package/dist/substrate/runtime/state-store/index.mjs +0 -3
  839. package/dist/substrate/runtime/state-store/schema.d.mts +0 -1
  840. package/dist/substrate/runtime/state-store/schema.mjs +0 -41
  841. package/dist/substrate/runtime/state-store/schema.mjs.map +0 -1
  842. package/dist/substrate/runtime/state-store/service.d.mts +0 -1
  843. package/dist/substrate/runtime/state-store/service.mjs +0 -145
  844. package/dist/substrate/runtime/state-store/service.mjs.map +0 -1
  845. package/dist/substrate/runtime/sui-execute/index.mjs.map +0 -1
  846. package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +0 -1
  847. package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +0 -1
  848. package/dist/substrate/runtime/sui-move-build/index.mjs.map +0 -1
  849. package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +0 -151
  850. package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +0 -1
  851. package/dist/substrate/state-store.d.mts +0 -1
  852. /package/dist/orchestrators/{snapshot/pending-marker.d.mts → codegen/id-config.d.mts} +0 -0
  853. /package/dist/orchestrators/snapshot/{recover-pending.d.mts → interrupted-restore.d.mts} +0 -0
  854. /package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.d.mts +0 -0
  855. /package/dist/plugins/{postgres/snapshot.d.mts → sui/ledger/object-ref.d.mts} +0 -0
  856. /package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.d.mts +0 -0
  857. /package/dist/substrate/runtime/{state-store/index.d.mts → reconcile/graph.d.mts} +0 -0
  858. /package/dist/substrate/runtime/{cross-process/snapshot-reservation.d.mts → supervisor/contribution-dispatcher.d.mts} +0 -0
@@ -0,0 +1,440 @@
1
+ import { endpointKey } from "../substrate/brand.mjs";
2
+ import { readResolvedSync } from "../substrate/runtime/lifecycle/plugin-registry.mjs";
3
+ import "../substrate/runtime/lifecycle/index.mjs";
4
+ import { allReadyOrTerminal } from "../substrate/runtime/supervisor/state.mjs";
5
+ import { Logger as Logger$1, layerLogger } from "../substrate/runtime/observability/logger.mjs";
6
+ import "../substrate/runtime/observability/index.mjs";
7
+ import { IdentityContext, RuntimeRoot, StackPathsService, layerIdentity, layerRuntimeRoot, layerStackPaths } from "../substrate/runtime/paths.mjs";
8
+ import { CacheService, layerCache } from "../substrate/runtime/cache/service.mjs";
9
+ import "../substrate/runtime/cache/index.mjs";
10
+ import { DockerSpawner, layerDockerHostDefault } from "../runtime/docker/client.mjs";
11
+ import { ContainerRuntimeService, layerContainerRuntimeDocker, layerDockerCycleInitial } from "../runtime/docker/service.mjs";
12
+ import "../runtime/docker/index.mjs";
13
+ import { SnapshotOrchestratorService, layerSnapshotOrchestrator } from "./snapshot/service.mjs";
14
+ import "./snapshot/index.mjs";
15
+ import { StrategyRegistryService, layerStrategyRegistry } from "../substrate/runtime/strategy-registry/service.mjs";
16
+ import { operationalEndpointEventsFromResolvedValue } from "../substrate/runtime/projection/operational-endpoints.mjs";
17
+ import { PostAcquireTasksService, layerPostAcquireTasks } from "../substrate/runtime/post-acquire-tasks.mjs";
18
+ import { startSupervisor } from "../substrate/runtime/supervisor/start-supervisor.mjs";
19
+ import "../substrate/runtime/supervisor/index.mjs";
20
+ import { LeaseBrokerService, layerLeaseBroker } from "../substrate/runtime/lease-broker/service.mjs";
21
+ import "../substrate/runtime/lease-broker/index.mjs";
22
+ import { PortBrokerService, layerPortBroker } from "../substrate/runtime/port-broker/service.mjs";
23
+ import "../substrate/runtime/port-broker/index.mjs";
24
+ import "../substrate/runtime/strategy-registry/index.mjs";
25
+ import { CodegenWriteFailed } from "./codegen/errors.mjs";
26
+ import { MoveCodegenService, MoveSummaryRunnerService, layerMystenMoveCodegen } from "./codegen/bindings.mjs";
27
+ import { layerSuiMoveSummaryRunnerDocker } from "../plugins/sui/move-summary-runner.mjs";
28
+ import { CodegenPathsService, layerCodegenPaths, layerCodegenRoot } from "./codegen/paths.mjs";
29
+ import { resolveCodegenOutput } from "./codegen/output-location.mjs";
30
+ import { ID_CONFIG_FILENAME, writeIdConfig } from "./codegen/id-config.mjs";
31
+ import { CodegenOrchestratorService, layerCodegenOrchestrator } from "./codegen/service.mjs";
32
+ import { DEFAULT_TRAEFIK_IMAGE, layerTraefikContainerOpsDocker } from "./router/traefik-container.mjs";
33
+ import { makeDefaultRouterProfile } from "./router/profile.mjs";
34
+ import { layerEntrypointRegistry } from "./router/entrypoints.mjs";
35
+ import { RouterService, layerDockerUpstreamResolver, layerRouterConfigLiteral, layerRouterService } from "./router/service.mjs";
36
+ import "./router/index.mjs";
37
+ import { BUILT_IN_ENTRYPOINTS } from "../plugins/router-entrypoints.mjs";
38
+ import { ManifestExtrasLookupError, resolveManifestExtras } from "../substrate/manifest.mjs";
39
+ import { buildEnvelope, writeManifest } from "../substrate/runtime/manifest/manifest.mjs";
40
+ import "../substrate/runtime/manifest/index.mjs";
41
+ import { resolveNetworkOptions } from "./network-options.mjs";
42
+ import { CoinRegistryService, layerCoinRegistry } from "../plugins/coin/registry.mjs";
43
+ import { PackageRegistryService, layerPackageRegistry } from "../plugins/package/registry.mjs";
44
+ import { Context, Effect, FileSystem, Layer, Ref } from "effect";
45
+ import { isAbsolute, join, resolve } from "node:path";
46
+ import * as NodeFileSystem from "@effect/platform-node/NodeFileSystem";
47
+ import * as NodePath from "@effect/platform-node/NodePath";
48
+ import * as NodeChildProcessSpawner from "@effect/platform-node/NodeChildProcessSpawner";
49
+ import { ChildProcessSpawner } from "effect/unstable/process/ChildProcessSpawner";
50
+ //#region src/orchestrators/boot.ts
51
+ /** Substrate Layer stack for a single supervised run. Composes every L0
52
+ * service the supervisor yields from its R-channel, plus the L1 Docker
53
+ * `ContainerRuntime`. Built-in plugin services are layered outside
54
+ * substrate and added through `extendContext`. */
55
+ const buildSubstrateLayers = (identity, runtimeRoot) => {
56
+ const layerDockerSpawnerFromNode = Layer.effect(DockerSpawner, Effect.gen(function* () {
57
+ return yield* ChildProcessSpawner;
58
+ }));
59
+ const platformBase = Layer.mergeAll(layerIdentity(identity), layerRuntimeRoot(runtimeRoot), NodePath.layer, NodeFileSystem.layer, layerDockerHostDefault, layerDockerCycleInitial, layerStrategyRegistry);
60
+ const childProcessSpawnerWired = NodeChildProcessSpawner.layer.pipe(Layer.provideMerge(platformBase));
61
+ const withStackPaths = layerStackPaths.pipe(Layer.provideMerge(childProcessSpawnerWired));
62
+ const withCache = layerCache.pipe(Layer.provideMerge(withStackPaths));
63
+ const withPortBroker = layerPortBroker.pipe(Layer.provideMerge(withCache));
64
+ const withLeaseBroker = layerLeaseBroker.pipe(Layer.provideMerge(withPortBroker));
65
+ const withSpawnerAdapter = layerDockerSpawnerFromNode.pipe(Layer.provideMerge(withLeaseBroker));
66
+ const withContainerRuntime = layerContainerRuntimeDocker.pipe(Layer.provideMerge(withSpawnerAdapter));
67
+ const withPostAcquireTasks = layerPostAcquireTasks.pipe(Layer.provideMerge(withContainerRuntime));
68
+ return layerLogger.pipe(Layer.provideMerge(withPostAcquireTasks));
69
+ };
70
+ /** Build the opaque `Context.Context<never>` the supervisor hands to
71
+ * every plugin's `acquire` body. Yields every substrate service the
72
+ * Docker-backed substrate layer stack provides; downstream callers
73
+ * may extend the context (e.g. layering the built-in plugin registries
74
+ * via `extendBuiltInPluginContext`) before passing it to `supervise()`. */
75
+ const buildPluginContext = () => Effect.gen(function* () {
76
+ const identityCtx = yield* IdentityContext;
77
+ const runtimeRootResolved = yield* RuntimeRoot;
78
+ const stackPaths = yield* StackPathsService;
79
+ const cache = yield* CacheService;
80
+ const registry = yield* StrategyRegistryService;
81
+ const containerRuntime = yield* ContainerRuntimeService;
82
+ const portBroker = yield* PortBrokerService;
83
+ const leaseBroker = yield* LeaseBrokerService;
84
+ const postAcquireTasks = yield* PostAcquireTasksService;
85
+ const logger = yield* Logger$1;
86
+ return Context.empty().pipe(Context.add(IdentityContext, identityCtx), Context.add(RuntimeRoot, runtimeRootResolved), Context.add(StackPathsService, stackPaths), Context.add(CacheService, cache), Context.add(StrategyRegistryService, registry), Context.add(ContainerRuntimeService, containerRuntime), Context.add(PortBrokerService, portBroker), Context.add(LeaseBrokerService, leaseBroker), Context.add(PostAcquireTasksService, postAcquireTasks), Context.add(Logger$1, logger));
87
+ });
88
+ /** Effect that boots the supervisor for `stack` and blocks on the
89
+ * supervisor's shutdown latch. Returns the final `SubscribableState`
90
+ * snapshot so callers (CLI, library handle) can inspect post-shutdown
91
+ * state. */
92
+ const superviseStackEffect = (stack, identity, state, opts = {}) => Effect.gen(function* () {
93
+ return yield* Effect.scoped(Effect.gen(function* () {
94
+ const baseContext = yield* buildPluginContext();
95
+ const startup = yield* startSupervisor(stack, identity, state, opts.extendContext === void 0 ? baseContext : yield* opts.extendContext(baseContext), opts.contributionDispatcher, opts.commandHandler, opts.postAcquireHook, {
96
+ commandLoop: opts.lifetime !== "one-shot",
97
+ ...opts.devstackVersion === void 0 ? {} : { devstackVersion: opts.devstackVersion }
98
+ });
99
+ const { handle } = startup;
100
+ if (opts.beforeInitialAcquire !== void 0) yield* opts.beforeInitialAcquire(handle);
101
+ if (opts.lifetime === "one-shot") {
102
+ yield* startup.runInitialAcquire;
103
+ yield* allReadyOrTerminal(startup.handle.graph, startup.handle.registry);
104
+ if (opts.withinScope !== void 0) yield* opts.withinScope(handle);
105
+ return;
106
+ }
107
+ if ((yield* Effect.raceFirst(startup.runInitialAcquire.pipe(Effect.as("booted")), handle.awaitShutdown.pipe(Effect.as("shutdown")))) === "shutdown") return;
108
+ if (opts.withinScope !== void 0) yield* opts.withinScope(handle);
109
+ yield* handle.awaitShutdown;
110
+ }));
111
+ });
112
+ /**
113
+ * The ONE boot seam that maps a stack's codegen config to the production
114
+ * codegen orchestrator options for a LIVE (`'ran'`) projection. Both
115
+ * composition entry points (`api/run-stack.ts` and `orchestrators/layers.ts`)
116
+ * call this so the live output-dir decision (via `resolveCodegenOutput`)
117
+ * is wired exactly once: EVERY live run — including what used to be the
118
+ * "primary" stack — emits into `<appRoot>/.devstack/stacks/<stack>/generated`,
119
+ * so the id-bearing live tree never lands in the committed source tree and
120
+ * two stacks never clobber. The committed `src/generated` tree is owned
121
+ * solely by the stack-free `codegen` verb. The resolved literal
122
+ * `outputDir`/`stackSubdir`/`extrasDir` flow into
123
+ * `layerProductionOrchestrators({ codegen })` unchanged — `paths.ts` keeps
124
+ * consuming literals (minimal blast radius).
125
+ *
126
+ * The per-stack inputs: the app root, the resolved effective stack
127
+ * (already through the explicit-`--stack` > `config.stackName` > inferred
128
+ * ladder), and the app's optional explicit `codegen` pins.
129
+ */
130
+ const resolveProductionCodegenOptions = (input) => {
131
+ const resolved = resolveCodegenOutput({
132
+ appRoot: input.appRoot,
133
+ effectiveStack: input.effectiveStack
134
+ });
135
+ return {
136
+ appRoot: input.appRoot,
137
+ extrasDir: resolved.extrasDir,
138
+ ...input.codegen?.includePhantomTypeParameters === void 0 ? {} : { includePhantomTypeParameters: input.codegen.includePhantomTypeParameters }
139
+ };
140
+ };
141
+ var ManifestEndpointRegistryService = class extends Context.Service()("@devstack/orchestrators/ManifestEndpointRegistry") {};
142
+ const layerManifestEndpointRegistry = Layer.effect(ManifestEndpointRegistryService, Effect.gen(function* () {
143
+ const entriesRef = yield* Ref.make([]);
144
+ const seqRef = yield* Ref.make(0);
145
+ const register = (entry) => Effect.gen(function* () {
146
+ const seq = yield* Ref.updateAndGet(seqRef, (n) => n + 1);
147
+ yield* Ref.update(entriesRef, (entries) => [...entries, {
148
+ ...entry,
149
+ seq
150
+ }]);
151
+ yield* Effect.addFinalizer(() => Ref.update(entriesRef, (entries) => entries.filter((candidate) => candidate.seq !== seq)));
152
+ });
153
+ return ManifestEndpointRegistryService.of({
154
+ register,
155
+ entries: Ref.get(entriesRef).pipe(Effect.map((entries) => entries.map((entryWithSeq) => {
156
+ const { seq, ...entry } = entryWithSeq;
157
+ return entry;
158
+ })))
159
+ });
160
+ }));
161
+ const productionRouterProfile = (options = {}) => makeDefaultRouterProfile(options);
162
+ /** `outputDir` for the `CodegenRoot` of a `layerProductionOrchestrators`
163
+ * composition. The production codegen path NEVER emits the committed
164
+ * `src/generated` tree (boot writes only `generated-extras` via
165
+ * `emitExtras`), so this directory is never written — it only has to wire
166
+ * a valid, non-crashing `CodegenRoot`. It resolves to `<appRoot>/src/generated`
167
+ * by convention. The committed tree is owned solely by the stack-free
168
+ * `codegen` verb (wired separately, where it pins its own output path). */
169
+ const productionCodegenOutputDir = (appRoot) => resolve(appRoot, "src/generated");
170
+ /** Fallback `generated-extras` dir for the cold-start / no-config
171
+ * composition path (`buildDirectSnapshotLayers`). Callers that know
172
+ * their stack (`run-stack`, the verb wirings) pass the resolved
173
+ * per-stack value; this default only feeds direct-snapshot verbs that
174
+ * never run codegen. */
175
+ const productionCodegenExtrasDir = (appRoot, extrasDir) => {
176
+ const target = extrasDir ?? ".devstack/generated-extras";
177
+ return isAbsolute(target) ? target : resolve(appRoot, target);
178
+ };
179
+ const layerProductionOrchestrators = (router = {}) => {
180
+ const profile = productionRouterProfile();
181
+ return Layer.mergeAll(layerSnapshotOrchestrator, layerManifestEndpointRegistry, layerRouterService.pipe(Layer.provideMerge(Layer.mergeAll(layerEntrypointRegistry(BUILT_IN_ENTRYPOINTS), layerTraefikContainerOpsDocker, layerDockerUpstreamResolver(profile), layerRouterConfigLiteral({
182
+ disabled: router.disabled ?? false,
183
+ profile,
184
+ image: DEFAULT_TRAEFIK_IMAGE,
185
+ routeReadinessProbe: { enabled: router.disabled !== true }
186
+ })))), layerCodegenOrchestrator, layerCodegenPaths.pipe(Layer.provideMerge(layerCodegenRoot({
187
+ outputDir: productionCodegenOutputDir(router.codegen?.appRoot ?? process.cwd()),
188
+ stackSubdir: null,
189
+ extrasDir: productionCodegenExtrasDir(router.codegen?.appRoot ?? process.cwd(), router.codegen?.extrasDir)
190
+ }))), layerSuiMoveSummaryRunnerDocker, layerMystenMoveCodegen({ includePhantomTypeParameters: router.codegen?.includePhantomTypeParameters }));
191
+ };
192
+ /** The single adapter for routable endpoints: ONE `ResolvedRoute` (the
193
+ * router's post-mint source of truth) → ALL THREE sink-feeds at once —
194
+ * the router's own `route`, the manifest `EndpointEntry`, and the
195
+ * projection `endpoint.registered` event — derived from one shared
196
+ * field-set so the three sinks can never diverge. The `routable`
197
+ * dispatch body feeds each sink from the object this returns; there is
198
+ * no second, third derivation off the route anywhere.
199
+ *
200
+ * It owns the url-derivation: `tcp` routes carry `tcp://127.0.0.1:port`,
201
+ * everything else `http://hostname:port`. Consumers (codegen, manifest)
202
+ * translate `tcp://` to their protocol-specific scheme (`postgres://`,
203
+ * `redis://`, …).
204
+ *
205
+ * `ResolvedRoute` only carries `entrypointName`, so the endpoint name is
206
+ * recovered from the original `decl.endpointName`; `pluginKey` is supplied
207
+ * by the dispatcher (it is not in `ResolvedRoute`). Router-only fields
208
+ * (`dispatchFileId`/`cors`/`upstreamUrl`) are kept ON `route` for the
209
+ * router sink but discarded from the manifest/projection field-set — those
210
+ * schemas do not consume them. */
211
+ const endpointSinksFromRoute = (decl, route, pluginKey, registeredAt = Date.now()) => {
212
+ const url = route.wireProtocol === "tcp" ? `tcp://127.0.0.1:${route.entrypointPort}` : `http://${route.hostname}:${route.entrypointPort}`;
213
+ const common = {
214
+ name: decl.endpointName,
215
+ url,
216
+ displayUrl: null,
217
+ wireProtocol: route.wireProtocol
218
+ };
219
+ const endpointKeyString = `${pluginKey}:${decl.endpointName}`;
220
+ const event = {
221
+ tag: "endpoint.registered",
222
+ endpoint: {
223
+ ...common,
224
+ endpointKey: endpointKey(endpointKeyString),
225
+ pluginKey,
226
+ registeredAt
227
+ }
228
+ };
229
+ return {
230
+ route,
231
+ manifestEntry: {
232
+ ...common,
233
+ endpointKey: endpointKeyString,
234
+ pluginKey: String(pluginKey)
235
+ },
236
+ event
237
+ };
238
+ };
239
+ const manifestEndpointEntryFromOperationalEndpoint = (endpoint) => ({
240
+ endpointKey: String(endpoint.endpointKey),
241
+ name: endpoint.name,
242
+ url: endpoint.url,
243
+ displayUrl: endpoint.displayUrl,
244
+ wireProtocol: endpoint.wireProtocol,
245
+ pluginKey: String(endpoint.pluginKey)
246
+ });
247
+ /** Project a projection decl's `rowKey` (when absent) onto the
248
+ * contributing plugin so projection consumers can attribute the row.
249
+ * The payload stays opaque from the substrate's POV. */
250
+ const projectionDispatch = (decl, ctx) => {
251
+ const payload = decl.event.payload;
252
+ const payloadWithRowKey = payload !== null && typeof payload === "object" && "rowKey" in payload && payload.rowKey === null ? {
253
+ ...payload,
254
+ rowKey: ctx.pluginKey
255
+ } : payload;
256
+ return ctx.publish({
257
+ ...decl.event,
258
+ payload: payloadWithRowKey
259
+ });
260
+ };
261
+ /** Register a strategy contribution on the scope-local registry, publish
262
+ * `strategy.registered`, and arm a finalizer publishing
263
+ * `strategy.unregistered`. */
264
+ const strategyContributorDispatch = (decl, ctx) => Effect.gen(function* () {
265
+ yield* ctx.strategyRegistry.register(decl.capabilityKey, decl.strategy, {
266
+ autoMounted: decl.autoMounted,
267
+ ...decl.priority === void 0 ? {} : { priority: decl.priority }
268
+ });
269
+ yield* ctx.publish({
270
+ tag: "strategy.registered",
271
+ capabilityKey: decl.capabilityKey,
272
+ autoMounted: decl.autoMounted,
273
+ at: Date.now()
274
+ });
275
+ yield* Effect.addFinalizer(() => ctx.publish({
276
+ tag: "strategy.unregistered",
277
+ capabilityKey: decl.capabilityKey,
278
+ at: Date.now()
279
+ }));
280
+ });
281
+ /**
282
+ * Build the production `ContributionDispatcher` — the closed seam the
283
+ * supervisor replays each plugin's buffered contributions through after
284
+ * a successful `start`. Each method's body reads its backing orchestrator
285
+ * service (Snapshot/Router/Codegen/ManifestEndpoint) ONCE here and closes
286
+ * over it; the substrate supervisor holds the resulting record opaquely
287
+ * (it never imports an orchestrator service).
288
+ */
289
+ const buildProductionContributionDispatcher = () => Effect.gen(function* () {
290
+ const snapshot = yield* SnapshotOrchestratorService;
291
+ const router = yield* RouterService;
292
+ const codegen = yield* CodegenOrchestratorService;
293
+ const manifestEndpoints = yield* ManifestEndpointRegistryService;
294
+ return {
295
+ snapshotable: (decl, ctx) => snapshot.registerParticipant(ctx.pluginKey, decl),
296
+ routable: (decl, ctx) => router.boot().pipe(Effect.andThen(router.contributeRoute(decl)), Effect.flatMap((route) => {
297
+ const sinks = endpointSinksFromRoute(decl, route, ctx.pluginKey);
298
+ return manifestEndpoints.register(sinks.manifestEntry).pipe(Effect.andThen(ctx.publish(sinks.event)));
299
+ })),
300
+ codegenable: (decl, ctx) => codegen.registerContribution(ctx.pluginKey, decl),
301
+ projection: (decl, ctx) => projectionDispatch(decl, ctx),
302
+ strategyContributor: (decl, ctx) => strategyContributorDispatch(decl, ctx)
303
+ };
304
+ });
305
+ const makeManifestExtrasContext = (ctx) => {
306
+ const resourceIdToKey = /* @__PURE__ */ new Map();
307
+ for (const [key, node] of ctx.graph.nodes) resourceIdToKey.set(node.member.id, key);
308
+ const lookup = (resourceId) => {
309
+ const key = resourceIdToKey.get(resourceId);
310
+ if (key === void 0) throw new ManifestExtrasLookupError({
311
+ kind: "unknown-resource",
312
+ resourceId
313
+ });
314
+ const resolved = readResolvedSync(ctx.registry, key);
315
+ if (resolved === void 0) throw new ManifestExtrasLookupError({
316
+ kind: "unresolved-resource",
317
+ resourceId
318
+ });
319
+ return resolved;
320
+ };
321
+ return { value: (resource) => lookup(resource.id) };
322
+ };
323
+ const operationalManifestEndpointEntries = (ctx, routableEntries) => {
324
+ const routablePluginKeys = new Set(routableEntries.map((entry) => entry.pluginKey));
325
+ const registeredAt = Date.now();
326
+ const entries = [];
327
+ for (const [key] of ctx.graph.nodes) {
328
+ if (routablePluginKeys.has(String(key))) continue;
329
+ const resolved = readResolvedSync(ctx.registry, key);
330
+ if (resolved === void 0) continue;
331
+ for (const event of operationalEndpointEventsFromResolvedValue(key, resolved, registeredAt)) entries.push(manifestEndpointEntryFromOperationalEndpoint(event.endpoint));
332
+ }
333
+ return entries;
334
+ };
335
+ const buildProductionPostAcquireHook = (options = {}) => Effect.gen(function* () {
336
+ const codegen = yield* CodegenOrchestratorService;
337
+ const paths = yield* CodegenPathsService;
338
+ const fs = yield* FileSystem.FileSystem;
339
+ const stackPaths = yield* StackPathsService;
340
+ const postAcquireTasks = yield* PostAcquireTasksService;
341
+ const manifestEndpoints = yield* ManifestEndpointRegistryService;
342
+ const moveRunner = yield* MoveSummaryRunnerService;
343
+ const moveCodegen = yield* MoveCodegenService;
344
+ return (ctx) => Effect.gen(function* () {
345
+ const extras = yield* resolveManifestExtras(options.extras, makeManifestExtrasContext(ctx));
346
+ const routableEndpoints = yield* manifestEndpoints.entries;
347
+ const endpoints = [...routableEndpoints, ...operationalManifestEndpointEntries(ctx, routableEndpoints)];
348
+ const idConfig = yield* codegen.assembleIdConfig(String(ctx.identity.network)).pipe(Effect.mapError((cause) => new CodegenWriteFailed({
349
+ outputPath: ID_CONFIG_FILENAME,
350
+ stage: "write",
351
+ cause
352
+ })));
353
+ const idsFile = join(stackPaths.stackRoot, ID_CONFIG_FILENAME);
354
+ yield* writeIdConfig(idsFile, idConfig).pipe(Effect.provideService(FileSystem.FileSystem, fs));
355
+ yield* writeManifest(yield* buildEnvelope({
356
+ identity: {
357
+ app: ctx.identity.app,
358
+ stack: ctx.identity.stack,
359
+ network: ctx.identity.network
360
+ },
361
+ endpoints,
362
+ extras,
363
+ codegen: {
364
+ extrasDir: paths.extrasDir,
365
+ idsFile
366
+ }
367
+ }), join(stackPaths.stackRoot, "manifest.json")).pipe(Effect.provideService(FileSystem.FileSystem, fs));
368
+ const netOpts = resolveNetworkOptions(ctx.identity.network, options.networkOptions);
369
+ const extrasFiles = [];
370
+ if (netOpts.devWallet) {
371
+ const extras = yield* codegen.emitExtras().pipe(Effect.provideService(FileSystem.FileSystem, fs), Effect.provideService(CodegenPathsService, paths), Effect.provideService(MoveSummaryRunnerService, moveRunner), Effect.provideService(MoveCodegenService, moveCodegen));
372
+ extrasFiles.push(...extras.filesWritten, ...extras.filesChmod);
373
+ }
374
+ yield* postAcquireTasks.runAll;
375
+ return [{
376
+ tag: "manifest.flushed",
377
+ manifestVersion: 1,
378
+ at: Date.now()
379
+ }, {
380
+ tag: "codegen.emitted",
381
+ files: [idsFile, ...extrasFiles],
382
+ at: Date.now()
383
+ }];
384
+ });
385
+ });
386
+ /** Built-in plugin runtime: the per-stack coin + package registries.
387
+ * Coin auto-discovery from a fresh package publish now runs DIRECTLY in
388
+ * the package plugin's `start` (folding the publish output into the
389
+ * CoinRegistry), so the registries are the whole surface. */
390
+ const layerBuiltInPluginRuntime = Layer.mergeAll(layerCoinRegistry, layerPackageRegistry);
391
+ const extendBuiltInPluginContext = (ctx) => Effect.gen(function* () {
392
+ const coinRegistry = yield* CoinRegistryService;
393
+ const packageRegistry = yield* PackageRegistryService;
394
+ const snapshotOrchestrator = yield* SnapshotOrchestratorService;
395
+ const fileSystem = yield* FileSystem.FileSystem;
396
+ return ctx.pipe(Context.add(CoinRegistryService, coinRegistry), Context.add(PackageRegistryService, packageRegistry), Context.add(SnapshotOrchestratorService, snapshotOrchestrator), Context.add(FileSystem.FileSystem, fileSystem));
397
+ });
398
+ /**
399
+ * THE single site that assembles the production supervised body. It builds
400
+ * the contribution dispatcher + post-acquire hook + built-in plugin-context
401
+ * extension ONCE and hands them to {@link superviseStackEffect}, then
402
+ * provides {@link layerBuiltInPluginRuntime}. Before this helper, the same
403
+ * three-piece assembly was hand-rolled in three call sites
404
+ * (`api/run-stack-internal.ts`, `cli/wirings/apply.ts`,
405
+ * `cli/wirings/snapshot.ts`); now they all route through here and only
406
+ * supply what genuinely differs ({@link ProductionBootOptions}).
407
+ *
408
+ * Each caller keeps its OWN lifetime-specific wrapping: the programmatic
409
+ * seam wraps the returned effect in a `forkDetach` handle (long-running);
410
+ * the CLI verbs run it to completion with their existing teardown + result
411
+ * semantics (one-shot). This helper does NOT collapse those — it only
412
+ * dedups the assembly the `superviseStackEffect` call sites shared.
413
+ *
414
+ * The return type is inferred (like `superviseStackEffect`): its R-channel
415
+ * is the union of every substrate/orchestrator service the dispatcher /
416
+ * hook / extension read, MINUS the built-in registries `layerBuiltInPluginRuntime`
417
+ * supplies, PLUS the caller hook `HookR` / extend `ExtendR` channels.
418
+ */
419
+ const superviseStackWithProductionBoot = (stack, identity, state, opts = {}) => Effect.gen(function* () {
420
+ yield* superviseStackEffect(stack, identity, state, {
421
+ contributionDispatcher: yield* buildProductionContributionDispatcher(),
422
+ postAcquireHook: yield* buildProductionPostAcquireHook({
423
+ ...opts.extras === void 0 ? {} : { extras: opts.extras },
424
+ ...opts.networkOptions === void 0 ? {} : { networkOptions: opts.networkOptions }
425
+ }),
426
+ ...opts.lifetime === void 0 ? {} : { lifetime: opts.lifetime },
427
+ ...opts.devstackVersion === void 0 ? {} : { devstackVersion: opts.devstackVersion },
428
+ ...opts.commandHandler === void 0 ? {} : { commandHandler: opts.commandHandler },
429
+ ...opts.beforeInitialAcquire === void 0 ? {} : { beforeInitialAcquire: opts.beforeInitialAcquire },
430
+ ...opts.withinScope === void 0 ? {} : { withinScope: opts.withinScope },
431
+ extendContext: (ctx) => Effect.gen(function* () {
432
+ const builtInContext = yield* extendBuiltInPluginContext(ctx);
433
+ return opts.extendContextAfterBuiltIn === void 0 ? builtInContext : yield* opts.extendContextAfterBuiltIn(builtInContext);
434
+ })
435
+ }).pipe(Effect.provide(layerBuiltInPluginRuntime));
436
+ });
437
+ //#endregion
438
+ export { buildSubstrateLayers, layerProductionOrchestrators, resolveProductionCodegenOptions, superviseStackWithProductionBoot };
439
+
440
+ //# sourceMappingURL=boot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"boot.mjs","names":["Logger"],"sources":["../../src/orchestrators/boot.ts"],"sourcesContent":["// Single L3 boot seam.\n//\n// Consumed by both the CLI verb wirings (`cli/wirings/*`) and the\n// library-facing programmatic surface (`api/run-stack.ts`), plus the e2e\n// boot harness.\n//\n// Composes the substrate Layer stack (L0) + the Docker `ContainerRuntime`\n// adapter (L1), yields the substrate services into a `Context.Context<never>`\n// pluginContext, builds the projection ref, and runs `supervise()` inside a\n// scope. The production orchestrator assembly (Snapshot/Router/Codegen/\n// ManifestEndpoint) and the contribution-delivery dispatcher live here too —\n// the supervisor holds the dispatcher record opaquely (it never imports an\n// orchestrator service).\n//\n// Architecture: this is L3 (orchestrator-level). Layer composition that\n// assembles L0+L1 stacks belongs at L3/L4 — it can't live in `substrate/`\n// because it imports a concrete L1 adapter (Docker) by definition; and it\n// depends on L2 plugin internals (coin/package registries), so it can't live\n// at L1 runtime either. See ARCHITECTURE.md § \"Layer composition belongs at\n// L3/L4, not L0\" and § \"L1-never-imports-from-L2\".\n\nimport { Context, Effect, FileSystem, Layer, Ref, Scope, SubscriptionRef } from 'effect';\nimport { isAbsolute, join, resolve } from 'node:path';\nimport * as NodeFileSystem from '@effect/platform-node/NodeFileSystem';\nimport * as NodePath from '@effect/platform-node/NodePath';\nimport * as NodeChildProcessSpawner from '@effect/platform-node/NodeChildProcessSpawner';\nimport { ChildProcessSpawner } from 'effect/unstable/process/ChildProcessSpawner';\n\nimport type { Identity } from '../substrate/identity.ts';\nimport { CacheService, layerCache } from '../substrate/runtime/cache/index.ts';\nimport { LeaseBrokerService, layerLeaseBroker } from '../substrate/runtime/lease-broker/index.ts';\nimport {\n\tIdentityContext,\n\tRuntimeRoot,\n\tStackPathsService,\n\tlayerIdentity,\n\tlayerRuntimeRoot,\n\tlayerStackPaths,\n} from '../substrate/runtime/paths.ts';\nimport { PortBrokerService, layerPortBroker } from '../substrate/runtime/port-broker/index.ts';\nimport {\n\tStrategyRegistryService,\n\tlayerStrategyRegistry,\n} from '../substrate/runtime/strategy-registry/index.ts';\nimport {\n\tContainerRuntimeService,\n\tDockerSpawner,\n\tlayerContainerRuntimeDocker,\n\tlayerDockerCycleInitial,\n\tlayerDockerHostDefault,\n} from '../runtime/docker/index.ts';\nimport { readResolvedSync } from '../substrate/runtime/lifecycle/index.ts';\nimport { operationalEndpointEventsFromResolvedValue } from '../substrate/runtime/projection/operational-endpoints.ts';\nimport { Logger, layerLogger } from '../substrate/runtime/observability/index.ts';\nimport {\n\tPostAcquireTasksService,\n\tlayerPostAcquireTasks,\n} from '../substrate/runtime/post-acquire-tasks.ts';\nimport {\n\tallReadyOrTerminal,\n\tstartSupervisor,\n\ttype ContributionDispatcher,\n\ttype SupervisedStack,\n\ttype SupervisorCommandHandler,\n\ttype SupervisorHandle,\n\ttype SupervisorPostAcquireHook,\n} from '../substrate/runtime/supervisor/index.ts';\nimport type { ContributionDispatchContext } from '../substrate/runtime/supervisor/contribution-dispatcher.ts';\nimport type { SupervisorPostAcquireContext } from '../substrate/runtime/supervisor/index.ts';\n\nimport {\n\tlayerMystenMoveCodegen,\n\tMoveCodegenService,\n\tMoveSummaryRunnerService,\n} from './codegen/bindings.ts';\nimport { layerSuiMoveSummaryRunnerDocker } from '../plugins/sui/move-summary-runner.ts';\nimport { CodegenPathsService, layerCodegenPaths, layerCodegenRoot } from './codegen/paths.ts';\nimport { resolveCodegenOutput } from './codegen/output-location.ts';\nimport {\n\tCodegenOrchestratorService,\n\tlayerCodegenOrchestrator,\n\ttype Codegenable,\n} from './codegen/service.ts';\nimport { CodegenWriteFailed } from './codegen/errors.ts';\nimport { ID_CONFIG_FILENAME, writeIdConfig } from './codegen/id-config.ts';\nimport {\n\tDEFAULT_TRAEFIK_IMAGE,\n\tlayerDockerUpstreamResolver,\n\tlayerEntrypointRegistry,\n\tlayerRouterConfigLiteral,\n\tlayerRouterService,\n\tlayerTraefikContainerOpsDocker,\n\tRouterService,\n\ttype ResolvedRoute,\n} from './router/index.ts';\nimport { BUILT_IN_ENTRYPOINTS } from '../plugins/router-entrypoints.ts';\nimport {\n\tmakeDefaultRouterProfile,\n\ttype DefaultRouterProfileOptions,\n\ttype RouterProfile,\n} from './router/profile.ts';\nimport { layerSnapshotOrchestrator, SnapshotOrchestratorService } from './snapshot/index.ts';\nimport type { ProjectionDecl } from '../contracts/projection.ts';\nimport type { RoutableDecl } from '../contracts/routable.ts';\nimport type { SnapshotableDecl } from '../contracts/snapshotable.ts';\nimport type { StrategyContributorDecl } from '../contracts/strategy-contributor.ts';\nimport { endpointKey, type PluginKey } from '../substrate/brand.ts';\nimport type { EngineEvent } from '../substrate/events.ts';\nimport {\n\tbuildEnvelope,\n\tCURRENT_MANIFEST_VERSION,\n\twriteManifest,\n} from '../substrate/runtime/manifest/index.ts';\nimport {\n\tManifestExtrasLookupError,\n\tresolveManifestExtras,\n\ttype EndpointEntry,\n\ttype ManifestExtrasInput,\n} from '../substrate/manifest.ts';\nimport { resolveNetworkOptions } from './network-options.ts';\nimport { CoinRegistryService, layerCoinRegistry } from '../plugins/coin/registry.ts';\nimport { PackageRegistryService, layerPackageRegistry } from '../plugins/package/registry.ts';\n\n// ───────────────────────────────────────────────────────────────────────────\n// Substrate lifecycle\n// ───────────────────────────────────────────────────────────────────────────\n\n/** Substrate Layer stack for a single supervised run. Composes every L0\n * service the supervisor yields from its R-channel, plus the L1 Docker\n * `ContainerRuntime`. Built-in plugin services are layered outside\n * substrate and added through `extendContext`. */\nexport const buildSubstrateLayers = (identity: Identity, runtimeRoot: string) => {\n\t// DockerSpawner adapts platform-node's ChildProcessSpawner tag onto\n\t// the docker subsystem's local DockerSpawner tag (same shape; the\n\t// indirection only lets tests inject a stub).\n\tconst layerDockerSpawnerFromNode: Layer.Layer<DockerSpawner, never, ChildProcessSpawner> =\n\t\tLayer.effect(\n\t\t\tDockerSpawner,\n\t\t\tEffect.gen(function* () {\n\t\t\t\treturn yield* ChildProcessSpawner;\n\t\t\t}),\n\t\t);\n\n\tconst platformBase = Layer.mergeAll(\n\t\tlayerIdentity(identity),\n\t\tlayerRuntimeRoot(runtimeRoot),\n\t\tNodePath.layer,\n\t\tNodeFileSystem.layer,\n\t\tlayerDockerHostDefault,\n\t\tlayerDockerCycleInitial,\n\t\tlayerStrategyRegistry,\n\t);\n\n\tconst childProcessSpawnerWired = NodeChildProcessSpawner.layer.pipe(\n\t\tLayer.provideMerge(platformBase),\n\t);\n\tconst withStackPaths = layerStackPaths.pipe(Layer.provideMerge(childProcessSpawnerWired));\n\tconst withCache = layerCache.pipe(Layer.provideMerge(withStackPaths));\n\tconst withPortBroker = layerPortBroker.pipe(Layer.provideMerge(withCache));\n\tconst withLeaseBroker = layerLeaseBroker.pipe(Layer.provideMerge(withPortBroker));\n\tconst withSpawnerAdapter = layerDockerSpawnerFromNode.pipe(Layer.provideMerge(withLeaseBroker));\n\tconst withContainerRuntime = layerContainerRuntimeDocker.pipe(\n\t\tLayer.provideMerge(withSpawnerAdapter),\n\t);\n\tconst withPostAcquireTasks = layerPostAcquireTasks.pipe(Layer.provideMerge(withContainerRuntime));\n\treturn layerLogger.pipe(Layer.provideMerge(withPostAcquireTasks));\n};\n\n/** Build the opaque `Context.Context<never>` the supervisor hands to\n * every plugin's `acquire` body. Yields every substrate service the\n * Docker-backed substrate layer stack provides; downstream callers\n * may extend the context (e.g. layering the built-in plugin registries\n * via `extendBuiltInPluginContext`) before passing it to `supervise()`. */\nconst buildPluginContext = (): Effect.Effect<\n\tContext.Context<never>,\n\tnever,\n\t| IdentityContext\n\t| RuntimeRoot\n\t| StackPathsService\n\t| CacheService\n\t| StrategyRegistryService\n\t| ContainerRuntimeService\n\t| PortBrokerService\n\t| LeaseBrokerService\n\t| PostAcquireTasksService\n\t| Logger\n> =>\n\tEffect.gen(function* () {\n\t\tconst identityCtx = yield* IdentityContext;\n\t\tconst runtimeRootResolved = yield* RuntimeRoot;\n\t\tconst stackPaths = yield* StackPathsService;\n\t\tconst cache = yield* CacheService;\n\t\tconst registry = yield* StrategyRegistryService;\n\t\tconst containerRuntime = yield* ContainerRuntimeService;\n\t\tconst portBroker = yield* PortBrokerService;\n\t\tconst leaseBroker = yield* LeaseBrokerService;\n\t\tconst postAcquireTasks = yield* PostAcquireTasksService;\n\t\tconst logger = yield* Logger;\n\n\t\treturn Context.empty().pipe(\n\t\t\tContext.add(IdentityContext, identityCtx),\n\t\t\tContext.add(RuntimeRoot, runtimeRootResolved),\n\t\t\tContext.add(StackPathsService, stackPaths),\n\t\t\tContext.add(CacheService, cache),\n\t\t\tContext.add(StrategyRegistryService, registry),\n\t\t\tContext.add(ContainerRuntimeService, containerRuntime),\n\t\t\tContext.add(PortBrokerService, portBroker),\n\t\t\tContext.add(LeaseBrokerService, leaseBroker),\n\t\t\tContext.add(PostAcquireTasksService, postAcquireTasks),\n\t\t\tContext.add(Logger, logger),\n\t\t) as Context.Context<never>;\n\t});\n\n/** Options accepted by the supervised-run entrypoint. `lifetime`\n * selects long-running supervision versus a one-shot acquire/codegen\n * cycle. The `beforeInitialAcquire` hook runs inside the supervised\n * scope before the first acquire starts; live renderers use it to\n * subscribe to startup projection changes. The `withinScope` hook\n * runs after the first acquire completes.\n *\n * Generic `R` widens the hook R-channel so callers can yield\n * substrate services (e.g. `StackPathsService`) that are in scope at\n * the supervisor-boot site. */\nexport interface SuperviseStackOptions<R = Scope.Scope, ExtendR = never, HookE = never> {\n\treadonly lifetime?: 'long-running' | 'one-shot';\n\treadonly devstackVersion?: string;\n\treadonly beforeInitialAcquire?: (handle: SupervisorHandle) => Effect.Effect<void, HookE, R>;\n\treadonly withinScope?: (handle: SupervisorHandle) => Effect.Effect<void, HookE, R>;\n\treadonly commandHandler?: SupervisorCommandHandler;\n\treadonly contributionDispatcher?: ContributionDispatcher;\n\treadonly postAcquireHook?: SupervisorPostAcquireHook;\n\t/** Caller-supplied extension layered into `pluginContext` after the\n\t * default substrate context is built. Used by plugin-author Layer\n\t * composition (ARCHITECTURE.md § Plugin-author extension) and by\n\t * the CLI when it wants to inject the built-in plugin registries or\n\t * a custom Logger override. */\n\treadonly extendContext?: (\n\t\tctx: Context.Context<never>,\n\t) => Effect.Effect<Context.Context<never>, never, ExtendR>;\n}\n\n/** Effect that boots the supervisor for `stack` and blocks on the\n * supervisor's shutdown latch. Returns the final `SubscribableState`\n * snapshot so callers (CLI, library handle) can inspect post-shutdown\n * state. */\nexport const superviseStackEffect = <R = Scope.Scope, ExtendR = never, HookE = never>(\n\tstack: SupervisedStack,\n\tidentity: Identity,\n\tstate: SubscriptionRef.SubscriptionRef<import('../substrate/projection.ts').SubscribableState>,\n\topts: SuperviseStackOptions<R, ExtendR, HookE> = {},\n) =>\n\tEffect.gen(function* () {\n\t\treturn yield* Effect.scoped(\n\t\t\tEffect.gen(function* () {\n\t\t\t\tconst baseContext = yield* buildPluginContext();\n\t\t\t\tconst pluginContext =\n\t\t\t\t\topts.extendContext === undefined ? baseContext : yield* opts.extendContext(baseContext);\n\n\t\t\t\tconst startup = yield* startSupervisor(\n\t\t\t\t\tstack,\n\t\t\t\t\tidentity,\n\t\t\t\t\tstate,\n\t\t\t\t\tpluginContext,\n\t\t\t\t\topts.contributionDispatcher,\n\t\t\t\t\topts.commandHandler,\n\t\t\t\t\topts.postAcquireHook,\n\t\t\t\t\t{\n\t\t\t\t\t\tcommandLoop: opts.lifetime !== 'one-shot',\n\t\t\t\t\t\t...(opts.devstackVersion === undefined\n\t\t\t\t\t\t\t? {}\n\t\t\t\t\t\t\t: { devstackVersion: opts.devstackVersion }),\n\t\t\t\t\t},\n\t\t\t\t);\n\t\t\t\tconst { handle } = startup;\n\t\t\t\tif (opts.beforeInitialAcquire !== undefined) {\n\t\t\t\t\tyield* opts.beforeInitialAcquire(handle);\n\t\t\t\t}\n\t\t\t\tif (opts.lifetime === 'one-shot') {\n\t\t\t\t\t// `runInitialAcquire` runs `acquireFullGraph` to completion (every\n\t\t\t\t\t// node reaches a terminal status) before it returns. Gate the\n\t\t\t\t\t// one-shot `withinScope` on the SUPERVISOR-OWNED readiness signal\n\t\t\t\t\t// — `allReadyOrTerminal` (`ready || done`) — NOT a per-node\n\t\t\t\t\t// `awaitReady` watcher. A run-to-completion `task` node lands in\n\t\t\t\t\t// `done`; the registry contract admits a `done`-status node whose\n\t\t\t\t\t// `readyGate` is unresolved (only `markReady`/`markFailed` resolve\n\t\t\t\t\t// it), so a per-node gate HANGS on it. This is the SAME\n\t\t\t\t\t// `done`-tolerant gate S1 gave the long-running path; reading\n\t\t\t\t\t// statuses never suspends, so it is hang-free.\n\t\t\t\t\tyield* startup.runInitialAcquire;\n\t\t\t\t\tyield* allReadyOrTerminal(startup.handle.graph, startup.handle.registry);\n\t\t\t\t\tif (opts.withinScope !== undefined) {\n\t\t\t\t\t\tyield* opts.withinScope(handle);\n\t\t\t\t\t}\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tconst outcome = yield* Effect.raceFirst(\n\t\t\t\t\tstartup.runInitialAcquire.pipe(Effect.as('booted' as const)),\n\t\t\t\t\thandle.awaitShutdown.pipe(Effect.as('shutdown' as const)),\n\t\t\t\t);\n\t\t\t\tif (outcome === 'shutdown') {\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif (opts.withinScope !== undefined) {\n\t\t\t\t\tyield* opts.withinScope(handle);\n\t\t\t\t}\n\t\t\t\tyield* handle.awaitShutdown;\n\t\t\t}),\n\t\t);\n\t});\n\n// ───────────────────────────────────────────────────────────────────────────\n// Production orchestrator assembly\n// ───────────────────────────────────────────────────────────────────────────\n\nexport interface ProductionCodegenOptions {\n\treadonly appRoot?: string;\n\t/** Resolved absolute path to the dev-only + secret `generated-extras`\n\t * tree for this stack, threaded into `CodegenRoot.extrasDir` and\n\t * recorded in the manifest as `codegen.extrasDir` for the\n\t * `@devstack-dev` Vite alias. This is the ONLY tree boot's codegen\n\t * writes (`emitExtras`); boot never emits the committed `src/generated`\n\t * tree, so it pins no live `outputDir` — the `CodegenRoot.outputDir`\n\t * the production path carries is an unwritten default. The committed\n\t * tree is owned solely by the stack-free `codegen` verb (wired\n\t * separately, where it resolves its own output path). */\n\treadonly extrasDir?: string;\n\t/** Forwarded verbatim to `@mysten/codegen`'s\n\t * `generateFromPackageSummary` via `layerMystenMoveCodegen` — see\n\t * `DevstackOptions['codegen']` for the full contract. Default `false`\n\t * (`@mysten/codegen`'s own default): phantom-only structs render as\n\t * consts with the phantom placeholder baked into `.name`; `true`\n\t * renders them as factories whose required type arguments compose a\n\t * fully-qualified type tag. */\n\treadonly includePhantomTypeParameters?: boolean;\n}\n\n/**\n * The ONE boot seam that maps a stack's codegen config to the production\n * codegen orchestrator options for a LIVE (`'ran'`) projection. Both\n * composition entry points (`api/run-stack.ts` and `orchestrators/layers.ts`)\n * call this so the live output-dir decision (via `resolveCodegenOutput`)\n * is wired exactly once: EVERY live run — including what used to be the\n * \"primary\" stack — emits into `<appRoot>/.devstack/stacks/<stack>/generated`,\n * so the id-bearing live tree never lands in the committed source tree and\n * two stacks never clobber. The committed `src/generated` tree is owned\n * solely by the stack-free `codegen` verb. The resolved literal\n * `outputDir`/`stackSubdir`/`extrasDir` flow into\n * `layerProductionOrchestrators({ codegen })` unchanged — `paths.ts` keeps\n * consuming literals (minimal blast radius).\n *\n * The per-stack inputs: the app root, the resolved effective stack\n * (already through the explicit-`--stack` > `config.stackName` > inferred\n * ladder), and the app's optional explicit `codegen` pins.\n */\nexport const resolveProductionCodegenOptions = (input: {\n\treadonly appRoot: string;\n\treadonly effectiveStack: string;\n\treadonly codegen?:\n\t\t| {\n\t\t\t\treadonly includePhantomTypeParameters?: boolean;\n\t\t }\n\t\t| undefined;\n}): ProductionCodegenOptions => {\n\t// Every live run resolves its dev tree to\n\t// `<appRoot>/.devstack/stacks/<stack>/generated-extras` (the default\n\t// rule). Nothing is ever emitted into the live `generated` tree at boot\n\t// (boot writes only the per-stack `generated-extras` overlay +\n\t// `devstack-ids.json`), so there is no live `outputDir` to resolve — the\n\t// committed `src/generated` tree is owned solely by the stack-free\n\t// `codegen` verb (wired separately).\n\tconst resolved = resolveCodegenOutput({\n\t\tappRoot: input.appRoot,\n\t\teffectiveStack: input.effectiveStack,\n\t});\n\treturn {\n\t\tappRoot: input.appRoot,\n\t\textrasDir: resolved.extrasDir,\n\t\t// Pass-through verbatim — no resolution step; \"unset\" stays unset so\n\t\t// `@mysten/codegen`'s own default (false) applies at the call site.\n\t\t...(input.codegen?.includePhantomTypeParameters === undefined\n\t\t\t? {}\n\t\t\t: { includePhantomTypeParameters: input.codegen.includePhantomTypeParameters }),\n\t};\n};\n\nexport interface ProductionRouterOptions {\n\treadonly codegen?: ProductionCodegenOptions;\n\treadonly disabled?: boolean;\n}\n\nexport class ManifestEndpointRegistryService extends Context.Service<\n\tManifestEndpointRegistryService,\n\t{\n\t\treadonly register: (entry: EndpointEntry) => Effect.Effect<void, never, Scope.Scope>;\n\t\treadonly entries: Effect.Effect<ReadonlyArray<EndpointEntry>>;\n\t}\n>()('@devstack/orchestrators/ManifestEndpointRegistry') {}\n\nexport const layerManifestEndpointRegistry: Layer.Layer<ManifestEndpointRegistryService> =\n\tLayer.effect(\n\t\tManifestEndpointRegistryService,\n\t\tEffect.gen(function* () {\n\t\t\tconst entriesRef = yield* Ref.make<ReadonlyArray<EndpointEntry & { readonly seq: number }>>(\n\t\t\t\t[],\n\t\t\t);\n\t\t\tconst seqRef = yield* Ref.make(0);\n\n\t\t\tconst register = (entry: EndpointEntry): Effect.Effect<void, never, Scope.Scope> =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tconst seq = yield* Ref.updateAndGet(seqRef, (n) => n + 1);\n\t\t\t\t\tyield* Ref.update(entriesRef, (entries) => [...entries, { ...entry, seq }]);\n\t\t\t\t\tyield* Effect.addFinalizer(() =>\n\t\t\t\t\t\tRef.update(entriesRef, (entries) =>\n\t\t\t\t\t\t\tentries.filter((candidate) => candidate.seq !== seq),\n\t\t\t\t\t\t),\n\t\t\t\t\t);\n\t\t\t\t});\n\n\t\t\treturn ManifestEndpointRegistryService.of({\n\t\t\t\tregister,\n\t\t\t\tentries: Ref.get(entriesRef).pipe(\n\t\t\t\t\tEffect.map((entries) =>\n\t\t\t\t\t\tentries.map((entryWithSeq) => {\n\t\t\t\t\t\t\tconst { seq, ...entry } = entryWithSeq;\n\t\t\t\t\t\t\tvoid seq;\n\t\t\t\t\t\t\treturn entry;\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t});\n\t\t}),\n\t);\n\nexport const productionRouterProfile = (options: DefaultRouterProfileOptions = {}): RouterProfile =>\n\tmakeDefaultRouterProfile(options);\n\n/** `outputDir` for the `CodegenRoot` of a `layerProductionOrchestrators`\n * composition. The production codegen path NEVER emits the committed\n * `src/generated` tree (boot writes only `generated-extras` via\n * `emitExtras`), so this directory is never written — it only has to wire\n * a valid, non-crashing `CodegenRoot`. It resolves to `<appRoot>/src/generated`\n * by convention. The committed tree is owned solely by the stack-free\n * `codegen` verb (wired separately, where it pins its own output path). */\nconst productionCodegenOutputDir = (appRoot: string): string => resolve(appRoot, 'src/generated');\n\n/** Fallback `generated-extras` dir for the cold-start / no-config\n * composition path (`buildDirectSnapshotLayers`). Callers that know\n * their stack (`run-stack`, the verb wirings) pass the resolved\n * per-stack value; this default only feeds direct-snapshot verbs that\n * never run codegen. */\nconst productionCodegenExtrasDir = (appRoot: string, extrasDir: string | undefined): string => {\n\tconst target = extrasDir ?? '.devstack/generated-extras';\n\treturn isAbsolute(target) ? target : resolve(appRoot, target);\n};\n\nexport const layerProductionOrchestrators = (router: ProductionRouterOptions = {}) => {\n\tconst profile = productionRouterProfile();\n\treturn Layer.mergeAll(\n\t\tlayerSnapshotOrchestrator,\n\t\tlayerManifestEndpointRegistry,\n\t\tlayerRouterService.pipe(\n\t\t\tLayer.provideMerge(\n\t\t\t\tLayer.mergeAll(\n\t\t\t\t\tlayerEntrypointRegistry(BUILT_IN_ENTRYPOINTS),\n\t\t\t\t\tlayerTraefikContainerOpsDocker,\n\t\t\t\t\tlayerDockerUpstreamResolver(profile),\n\t\t\t\t\tlayerRouterConfigLiteral({\n\t\t\t\t\t\tdisabled: router.disabled ?? false,\n\t\t\t\t\t\tprofile,\n\t\t\t\t\t\timage: DEFAULT_TRAEFIK_IMAGE,\n\t\t\t\t\t\trouteReadinessProbe: {\n\t\t\t\t\t\t\tenabled: router.disabled !== true,\n\t\t\t\t\t\t},\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t),\n\t\tlayerCodegenOrchestrator,\n\t\tlayerCodegenPaths.pipe(\n\t\t\tLayer.provideMerge(\n\t\t\t\tlayerCodegenRoot({\n\t\t\t\t\toutputDir: productionCodegenOutputDir(router.codegen?.appRoot ?? process.cwd()),\n\t\t\t\t\tstackSubdir: null,\n\t\t\t\t\textrasDir: productionCodegenExtrasDir(\n\t\t\t\t\t\trouter.codegen?.appRoot ?? process.cwd(),\n\t\t\t\t\t\trouter.codegen?.extrasDir,\n\t\t\t\t\t),\n\t\t\t\t}),\n\t\t\t),\n\t\t),\n\t\tlayerSuiMoveSummaryRunnerDocker,\n\t\tlayerMystenMoveCodegen({\n\t\t\tincludePhantomTypeParameters: router.codegen?.includePhantomTypeParameters,\n\t\t}),\n\t);\n};\n\n/** The single adapter for routable endpoints: ONE `ResolvedRoute` (the\n * router's post-mint source of truth) → ALL THREE sink-feeds at once —\n * the router's own `route`, the manifest `EndpointEntry`, and the\n * projection `endpoint.registered` event — derived from one shared\n * field-set so the three sinks can never diverge. The `routable`\n * dispatch body feeds each sink from the object this returns; there is\n * no second, third derivation off the route anywhere.\n *\n * It owns the url-derivation: `tcp` routes carry `tcp://127.0.0.1:port`,\n * everything else `http://hostname:port`. Consumers (codegen, manifest)\n * translate `tcp://` to their protocol-specific scheme (`postgres://`,\n * `redis://`, …).\n *\n * `ResolvedRoute` only carries `entrypointName`, so the endpoint name is\n * recovered from the original `decl.endpointName`; `pluginKey` is supplied\n * by the dispatcher (it is not in `ResolvedRoute`). Router-only fields\n * (`dispatchFileId`/`cors`/`upstreamUrl`) are kept ON `route` for the\n * router sink but discarded from the manifest/projection field-set — those\n * schemas do not consume them. */\nexport const endpointSinksFromRoute = (\n\tdecl: RoutableDecl,\n\troute: ResolvedRoute,\n\tpluginKey: PluginKey,\n\tregisteredAt = Date.now(),\n) => {\n\tconst url =\n\t\troute.wireProtocol === 'tcp'\n\t\t\t? `tcp://127.0.0.1:${route.entrypointPort}`\n\t\t\t: `http://${route.hostname}:${route.entrypointPort}`;\n\tconst common = {\n\t\tname: decl.endpointName,\n\t\turl,\n\t\tdisplayUrl: null,\n\t\twireProtocol: route.wireProtocol,\n\t} as const;\n\tconst endpointKeyString = `${pluginKey}:${decl.endpointName}`;\n\tconst event: Extract<EngineEvent, { readonly tag: 'endpoint.registered' }> = {\n\t\ttag: 'endpoint.registered',\n\t\tendpoint: {\n\t\t\t...common,\n\t\t\tendpointKey: endpointKey(endpointKeyString),\n\t\t\tpluginKey,\n\t\t\tregisteredAt,\n\t\t},\n\t};\n\treturn {\n\t\troute,\n\t\tmanifestEntry: {\n\t\t\t...common,\n\t\t\tendpointKey: endpointKeyString,\n\t\t\tpluginKey: String(pluginKey),\n\t\t},\n\t\tevent,\n\t};\n};\n\nconst manifestEndpointEntryFromOperationalEndpoint = (\n\tendpoint: Extract<EngineEvent, { readonly tag: 'endpoint.registered' }>['endpoint'],\n): EndpointEntry => ({\n\tendpointKey: String(endpoint.endpointKey),\n\tname: endpoint.name,\n\turl: endpoint.url,\n\tdisplayUrl: endpoint.displayUrl,\n\twireProtocol: endpoint.wireProtocol,\n\tpluginKey: String(endpoint.pluginKey),\n});\n\n/** Project a projection decl's `rowKey` (when absent) onto the\n * contributing plugin so projection consumers can attribute the row.\n * The payload stays opaque from the substrate's POV. */\nconst projectionDispatch = (\n\tdecl: ProjectionDecl,\n\tctx: ContributionDispatchContext,\n): Effect.Effect<void, never, never> => {\n\tconst payload = decl.event.payload;\n\tconst payloadWithRowKey =\n\t\tpayload !== null &&\n\t\ttypeof payload === 'object' &&\n\t\t'rowKey' in payload &&\n\t\t(payload as { rowKey: unknown }).rowKey === null\n\t\t\t? { ...payload, rowKey: ctx.pluginKey }\n\t\t\t: payload;\n\treturn ctx.publish({\n\t\t...decl.event,\n\t\tpayload: payloadWithRowKey,\n\t});\n};\n\n/** Register a strategy contribution on the scope-local registry, publish\n * `strategy.registered`, and arm a finalizer publishing\n * `strategy.unregistered`. */\nconst strategyContributorDispatch = (\n\tdecl: StrategyContributorDecl<string, unknown>,\n\tctx: ContributionDispatchContext,\n): Effect.Effect<void, never, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tyield* ctx.strategyRegistry.register(decl.capabilityKey, decl.strategy, {\n\t\t\tautoMounted: decl.autoMounted,\n\t\t\t...(decl.priority === undefined ? {} : { priority: decl.priority }),\n\t\t});\n\t\tyield* ctx.publish({\n\t\t\ttag: 'strategy.registered',\n\t\t\tcapabilityKey: decl.capabilityKey,\n\t\t\tautoMounted: decl.autoMounted,\n\t\t\tat: Date.now(),\n\t\t});\n\t\tyield* Effect.addFinalizer(() =>\n\t\t\tctx.publish({\n\t\t\t\ttag: 'strategy.unregistered',\n\t\t\t\tcapabilityKey: decl.capabilityKey,\n\t\t\t\tat: Date.now(),\n\t\t\t}),\n\t\t);\n\t});\n\n/**\n * Build the production `ContributionDispatcher` — the closed seam the\n * supervisor replays each plugin's buffered contributions through after\n * a successful `start`. Each method's body reads its backing orchestrator\n * service (Snapshot/Router/Codegen/ManifestEndpoint) ONCE here and closes\n * over it; the substrate supervisor holds the resulting record opaquely\n * (it never imports an orchestrator service).\n */\nexport const buildProductionContributionDispatcher = (): Effect.Effect<\n\tContributionDispatcher,\n\tnever,\n\t| SnapshotOrchestratorService\n\t| RouterService\n\t| CodegenOrchestratorService\n\t| ManifestEndpointRegistryService\n> =>\n\tEffect.gen(function* () {\n\t\tconst snapshot = yield* SnapshotOrchestratorService;\n\t\tconst router = yield* RouterService;\n\t\tconst codegen = yield* CodegenOrchestratorService;\n\t\tconst manifestEndpoints = yield* ManifestEndpointRegistryService;\n\t\treturn {\n\t\t\tsnapshotable: (decl: SnapshotableDecl, ctx) =>\n\t\t\t\tsnapshot.registerParticipant(ctx.pluginKey, decl),\n\t\t\troutable: (decl: RoutableDecl, ctx) =>\n\t\t\t\trouter.boot().pipe(\n\t\t\t\t\t// Router sink: `contributeRoute` writes the dispatch file +\n\t\t\t\t\t// publishes the route onto `applied`, returning the post-mint\n\t\t\t\t\t// `ResolvedRoute` — the ONE source of truth.\n\t\t\t\t\tEffect.andThen(router.contributeRoute(decl)),\n\t\t\t\t\tEffect.flatMap((route) => {\n\t\t\t\t\t\t// One adapter off that ResolvedRoute yields BOTH remaining\n\t\t\t\t\t\t// sink-feeds; feed manifest then projection. No second\n\t\t\t\t\t\t// derivation off the route lives anywhere.\n\t\t\t\t\t\tconst sinks = endpointSinksFromRoute(decl, route, ctx.pluginKey);\n\t\t\t\t\t\treturn manifestEndpoints\n\t\t\t\t\t\t\t.register(sinks.manifestEntry)\n\t\t\t\t\t\t\t.pipe(Effect.andThen(ctx.publish(sinks.event)));\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\tcodegenable: (decl: Codegenable, ctx) => codegen.registerContribution(ctx.pluginKey, decl),\n\t\t\tprojection: (decl: ProjectionDecl, ctx) => projectionDispatch(decl, ctx),\n\t\t\tstrategyContributor: (decl: StrategyContributorDecl<string, unknown>, ctx) =>\n\t\t\t\tstrategyContributorDispatch(decl, ctx),\n\t\t} satisfies ContributionDispatcher;\n\t});\n\nconst makeManifestExtrasContext = (ctx: SupervisorPostAcquireContext) => {\n\tconst resourceIdToKey = new Map<string, PluginKey>();\n\tfor (const [key, node] of ctx.graph.nodes) {\n\t\tresourceIdToKey.set(node.member.id, key);\n\t}\n\t// `lookup` throws `ManifestExtrasLookupError` synchronously from\n\t// inside the user-supplied `extras` factory.\n\t// `resolveManifestExtras` invokes that factory under `Effect.try`\n\t// with a typed `catch` mapper, so the throw promotes to the typed\n\t// failure channel — callers `catchTag('ManifestExtrasLookupError',\n\t// ...)` rather than reading the die-cause. Non-tagged throws stay\n\t// defects, preserving the previous semantics for genuine\n\t// programmer errors inside the factory body.\n\tconst lookup = (resourceId: string): unknown => {\n\t\tconst key = resourceIdToKey.get(resourceId);\n\t\tif (key === undefined) {\n\t\t\tthrow new ManifestExtrasLookupError({\n\t\t\t\tkind: 'unknown-resource',\n\t\t\t\tresourceId,\n\t\t\t});\n\t\t}\n\t\tconst resolved = readResolvedSync(ctx.registry, key);\n\t\tif (resolved === undefined) {\n\t\t\tthrow new ManifestExtrasLookupError({\n\t\t\t\tkind: 'unresolved-resource',\n\t\t\t\tresourceId,\n\t\t\t});\n\t\t}\n\t\treturn resolved;\n\t};\n\treturn {\n\t\tvalue: (resource: { readonly id: string }) => lookup(resource.id),\n\t};\n};\n\nconst operationalManifestEndpointEntries = (\n\tctx: SupervisorPostAcquireContext,\n\troutableEntries: ReadonlyArray<EndpointEntry>,\n): ReadonlyArray<EndpointEntry> => {\n\tconst routablePluginKeys = new Set(routableEntries.map((entry) => entry.pluginKey));\n\tconst registeredAt = Date.now();\n\tconst entries: EndpointEntry[] = [];\n\tfor (const [key] of ctx.graph.nodes) {\n\t\tif (routablePluginKeys.has(String(key))) continue;\n\t\tconst resolved = readResolvedSync(ctx.registry, key);\n\t\tif (resolved === undefined) continue;\n\t\tfor (const event of operationalEndpointEventsFromResolvedValue(key, resolved, registeredAt)) {\n\t\t\tentries.push(manifestEndpointEntryFromOperationalEndpoint(event.endpoint));\n\t\t}\n\t}\n\treturn entries;\n};\n\nexport const buildProductionPostAcquireHook = (\n\toptions: {\n\t\treadonly extras?: ManifestExtrasInput;\n\t\treadonly networkOptions?: Readonly<Record<string, unknown>>;\n\t} = {},\n): Effect.Effect<\n\tSupervisorPostAcquireHook,\n\tnever,\n\t| CodegenOrchestratorService\n\t| CodegenPathsService\n\t| FileSystem.FileSystem\n\t| StackPathsService\n\t| PostAcquireTasksService\n\t| ManifestEndpointRegistryService\n\t| MoveSummaryRunnerService\n\t| MoveCodegenService\n> =>\n\tEffect.gen(function* () {\n\t\tconst codegen = yield* CodegenOrchestratorService;\n\t\tconst paths = yield* CodegenPathsService;\n\t\tconst fs = yield* FileSystem.FileSystem;\n\t\tconst stackPaths = yield* StackPathsService;\n\t\tconst postAcquireTasks = yield* PostAcquireTasksService;\n\t\tconst manifestEndpoints = yield* ManifestEndpointRegistryService;\n\t\t// Yielded here (outside the per-ctx hook) so the conditional\n\t\t// `generated-extras` flush below can provide them to `emitExtras`.\n\t\tconst moveRunner = yield* MoveSummaryRunnerService;\n\t\tconst moveCodegen = yield* MoveCodegenService;\n\t\treturn (ctx) =>\n\t\t\tEffect.gen(function* () {\n\t\t\t\tconst extras = yield* resolveManifestExtras(options.extras, makeManifestExtrasContext(ctx));\n\t\t\t\tconst routableEndpoints = yield* manifestEndpoints.entries;\n\t\t\t\tconst endpoints = [\n\t\t\t\t\t...routableEndpoints,\n\t\t\t\t\t...operationalManifestEndpointEntries(ctx, routableEndpoints),\n\t\t\t\t];\n\t\t\t\t// Boot no longer runs codegen. Its only job is to PRODUCE the\n\t\t\t\t// id-config (loadable on-chain ids), which the Vite plugin injects\n\t\t\t\t// via `__DEVSTACK_IDS__` in dev. The committed `src/generated` tree\n\t\t\t\t// is written ONLY by the stack-free `devstack codegen` verb.\n\t\t\t\t// Assemble the id-config from the SAME live-resolved contributions\n\t\t\t\t// that fed `config.ts` and write it to the gitignored\n\t\t\t\t// `.devstack/stacks/<stack>/`.\n\t\t\t\tconst idConfig = yield* codegen.assembleIdConfig(String(ctx.identity.network)).pipe(\n\t\t\t\t\tEffect.mapError(\n\t\t\t\t\t\t(cause) =>\n\t\t\t\t\t\t\tnew CodegenWriteFailed({\n\t\t\t\t\t\t\t\toutputPath: ID_CONFIG_FILENAME,\n\t\t\t\t\t\t\t\tstage: 'write',\n\t\t\t\t\t\t\t\tcause,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t);\n\t\t\t\tconst idsFile = join(stackPaths.stackRoot, ID_CONFIG_FILENAME);\n\t\t\t\tyield* writeIdConfig(idsFile, idConfig).pipe(\n\t\t\t\t\tEffect.provideService(FileSystem.FileSystem, fs),\n\t\t\t\t);\n\t\t\t\tconst envelope = yield* buildEnvelope({\n\t\t\t\t\tidentity: {\n\t\t\t\t\t\tapp: ctx.identity.app,\n\t\t\t\t\t\tstack: ctx.identity.stack,\n\t\t\t\t\t\tnetwork: ctx.identity.network,\n\t\t\t\t\t},\n\t\t\t\t\tendpoints,\n\t\t\t\t\textras,\n\t\t\t\t\t// Record the dev-only `generated-extras` tree the\n\t\t\t\t\t// `@devstack-dev` Vite alias resolves and the live `idsFile`\n\t\t\t\t\t// the plugin injects as `__DEVSTACK_IDS__` — one decision, one\n\t\t\t\t\t// source of truth. Bindings are NOT recorded: `@generated`\n\t\t\t\t\t// always resolves to the committed `src/generated` tree written\n\t\t\t\t\t// by the stack-free `codegen` verb.\n\t\t\t\t\tcodegen: { extrasDir: paths.extrasDir, idsFile },\n\t\t\t\t});\n\t\t\t\tconst manifestPath = join(stackPaths.stackRoot, 'manifest.json');\n\t\t\t\tyield* writeManifest(envelope, manifestPath).pipe(\n\t\t\t\t\tEffect.provideService(FileSystem.FileSystem, fs),\n\t\t\t\t);\n\t\t\t\t// Conditionally flush the dev-only `generated-extras` tree\n\t\t\t\t// (dev wallet + accounts) — the ONE acquire-resolved surface the\n\t\t\t\t// stack-free `codegen` verb can't produce. Gated on the resolved\n\t\t\t\t// network's `devWallet` flag (per-network options, ON for every\n\t\t\t\t// network except live `mainnet`). When off, nothing is written\n\t\t\t\t// and the Vite plugin's `@devstack-dev` `load` hook no-ops.\n\t\t\t\tconst netOpts = resolveNetworkOptions(ctx.identity.network, options.networkOptions);\n\t\t\t\tconst extrasFiles: string[] = [];\n\t\t\t\tif (netOpts.devWallet) {\n\t\t\t\t\tconst extras = yield* codegen\n\t\t\t\t\t\t.emitExtras()\n\t\t\t\t\t\t.pipe(\n\t\t\t\t\t\t\tEffect.provideService(FileSystem.FileSystem, fs),\n\t\t\t\t\t\t\tEffect.provideService(CodegenPathsService, paths),\n\t\t\t\t\t\t\tEffect.provideService(MoveSummaryRunnerService, moveRunner),\n\t\t\t\t\t\t\tEffect.provideService(MoveCodegenService, moveCodegen),\n\t\t\t\t\t\t);\n\t\t\t\t\textrasFiles.push(...extras.filesWritten, ...extras.filesChmod);\n\t\t\t\t}\n\t\t\t\tyield* postAcquireTasks.runAll;\n\t\t\t\treturn [\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: 'manifest.flushed' as const,\n\t\t\t\t\t\tmanifestVersion: CURRENT_MANIFEST_VERSION,\n\t\t\t\t\t\tat: Date.now(),\n\t\t\t\t\t},\n\t\t\t\t\t{\n\t\t\t\t\t\ttag: 'codegen.emitted' as const,\n\t\t\t\t\t\tfiles: [idsFile, ...extrasFiles],\n\t\t\t\t\t\tat: Date.now(),\n\t\t\t\t\t},\n\t\t\t\t];\n\t\t\t});\n\t});\n\n// ───────────────────────────────────────────────────────────────────────────\n// Built-in plugin runtime composition\n//\n// Depends on L2 plugin internals (coin/package registries), so it can't live\n// at L1 runtime — hence its home in this L3 boot module.\n// ───────────────────────────────────────────────────────────────────────────\n\n/** Built-in plugin runtime: the per-stack coin + package registries.\n * Coin auto-discovery from a fresh package publish now runs DIRECTLY in\n * the package plugin's `start` (folding the publish output into the\n * CoinRegistry), so the registries are the whole surface. */\nexport const layerBuiltInPluginRuntime: Layer.Layer<CoinRegistryService | PackageRegistryService> =\n\tLayer.mergeAll(layerCoinRegistry, layerPackageRegistry);\n\nexport const extendBuiltInPluginContext = (\n\tctx: Context.Context<never>,\n): Effect.Effect<\n\tContext.Context<never>,\n\tnever,\n\tCoinRegistryService | PackageRegistryService | SnapshotOrchestratorService | FileSystem.FileSystem\n> =>\n\tEffect.gen(function* () {\n\t\tconst coinRegistry = yield* CoinRegistryService;\n\t\tconst packageRegistry = yield* PackageRegistryService;\n\t\t// Thread the snapshot orchestrator + filesystem into the plugin\n\t\t// runtime context so the supervisor can populate the control-plane\n\t\t// `domain` surface (snapshot list/restore/delete, which never\n\t\t// round-trip through the void `publishCommand`). The\n\t\t// `ContainerRuntimeService` the domain also needs is already in the\n\t\t// base substrate plugin context.\n\t\tconst snapshotOrchestrator = yield* SnapshotOrchestratorService;\n\t\tconst fileSystem = yield* FileSystem.FileSystem;\n\t\treturn ctx.pipe(\n\t\t\tContext.add(CoinRegistryService, coinRegistry),\n\t\t\tContext.add(PackageRegistryService, packageRegistry),\n\t\t\tContext.add(SnapshotOrchestratorService, snapshotOrchestrator),\n\t\t\tContext.add(FileSystem.FileSystem, fileSystem),\n\t\t) as Context.Context<never>;\n\t});\n\n// ───────────────────────────────────────────────────────────────────────────\n// Production supervised-boot assembly — THE single dedup site\n// ───────────────────────────────────────────────────────────────────────────\n\n/** The per-caller inputs to {@link superviseStackWithProductionBoot} — the\n * fields that GENUINELY differ between the long-running programmatic seam\n * (`api/run-stack-internal.ts`) and the one-shot CLI verbs (`apply` /\n * `snapshot`). Everything else — the contribution dispatcher, the\n * post-acquire hook, and the built-in plugin-context extension — is\n * assembled identically by the helper, so it lives in ONE place. */\nexport interface ProductionBootOptions<HookR = Scope.Scope, HookE = never, ExtendR = never> {\n\t/** `'one-shot'` runs the acquire/codegen cycle then returns; the default\n\t * `'long-running'` supervises until shutdown. */\n\treadonly lifetime?: 'long-running' | 'one-shot';\n\treadonly devstackVersion?: string;\n\t/** Threaded into `buildProductionPostAcquireHook` — the stack's manifest\n\t * `extras`. All three callers pass `stack.options.extras`. */\n\treadonly extras?: ManifestExtrasInput;\n\t/** Threaded into `buildProductionPostAcquireHook` — the stack's\n\t * per-network options. The hook resolves the active network's slice to\n\t * decide whether to flush the dev-only `generated-extras` tree. All\n\t * three callers pass `stack.options.networkOptions`. */\n\treadonly networkOptions?: Readonly<Record<string, unknown>>;\n\t/** The resolved supervisor command handler (run-stack's snapshot bridge).\n\t * One-shot verbs run no command loop, so they pass nothing. */\n\treadonly commandHandler?: SupervisorCommandHandler;\n\treadonly beforeInitialAcquire?: (handle: SupervisorHandle) => Effect.Effect<void, HookE, HookR>;\n\treadonly withinScope?: (handle: SupervisorHandle) => Effect.Effect<void, HookE, HookR>;\n\t/** Caller plugin-context extension layered AFTER the built-in\n\t * (`extendBuiltInPluginContext`). Only the programmatic seam uses it (to\n\t * honor the public `runStack({ extendContext })`); the CLI verbs omit it\n\t * and get the built-in extension alone. */\n\treadonly extendContextAfterBuiltIn?: (\n\t\tctx: Context.Context<never>,\n\t) => Effect.Effect<Context.Context<never>, never, ExtendR>;\n}\n\n/**\n * THE single site that assembles the production supervised body. It builds\n * the contribution dispatcher + post-acquire hook + built-in plugin-context\n * extension ONCE and hands them to {@link superviseStackEffect}, then\n * provides {@link layerBuiltInPluginRuntime}. Before this helper, the same\n * three-piece assembly was hand-rolled in three call sites\n * (`api/run-stack-internal.ts`, `cli/wirings/apply.ts`,\n * `cli/wirings/snapshot.ts`); now they all route through here and only\n * supply what genuinely differs ({@link ProductionBootOptions}).\n *\n * Each caller keeps its OWN lifetime-specific wrapping: the programmatic\n * seam wraps the returned effect in a `forkDetach` handle (long-running);\n * the CLI verbs run it to completion with their existing teardown + result\n * semantics (one-shot). This helper does NOT collapse those — it only\n * dedups the assembly the `superviseStackEffect` call sites shared.\n *\n * The return type is inferred (like `superviseStackEffect`): its R-channel\n * is the union of every substrate/orchestrator service the dispatcher /\n * hook / extension read, MINUS the built-in registries `layerBuiltInPluginRuntime`\n * supplies, PLUS the caller hook `HookR` / extend `ExtendR` channels.\n */\nexport const superviseStackWithProductionBoot = <\n\tHookR = Scope.Scope,\n\tHookE = never,\n\tExtendR = never,\n>(\n\tstack: SupervisedStack,\n\tidentity: Identity,\n\tstate: SubscriptionRef.SubscriptionRef<import('../substrate/projection.ts').SubscribableState>,\n\topts: ProductionBootOptions<HookR, HookE, ExtendR> = {},\n) =>\n\tEffect.gen(function* () {\n\t\tconst contributionDispatcher = yield* buildProductionContributionDispatcher();\n\t\tconst postAcquireHook = yield* buildProductionPostAcquireHook({\n\t\t\t...(opts.extras === undefined ? {} : { extras: opts.extras }),\n\t\t\t...(opts.networkOptions === undefined ? {} : { networkOptions: opts.networkOptions }),\n\t\t});\n\t\tyield* superviseStackEffect(stack, identity, state, {\n\t\t\tcontributionDispatcher,\n\t\t\tpostAcquireHook,\n\t\t\t...(opts.lifetime === undefined ? {} : { lifetime: opts.lifetime }),\n\t\t\t...(opts.devstackVersion === undefined ? {} : { devstackVersion: opts.devstackVersion }),\n\t\t\t...(opts.commandHandler === undefined ? {} : { commandHandler: opts.commandHandler }),\n\t\t\t...(opts.beforeInitialAcquire === undefined\n\t\t\t\t? {}\n\t\t\t\t: { beforeInitialAcquire: opts.beforeInitialAcquire }),\n\t\t\t...(opts.withinScope === undefined ? {} : { withinScope: opts.withinScope }),\n\t\t\t// Built-in plugin-context extension ALWAYS runs; a caller extension\n\t\t\t// (the programmatic seam's `opts.extendContext`) chains AFTER it.\n\t\t\textendContext: (ctx) =>\n\t\t\t\tEffect.gen(function* () {\n\t\t\t\t\tconst builtInContext = yield* extendBuiltInPluginContext(ctx);\n\t\t\t\t\treturn opts.extendContextAfterBuiltIn === undefined\n\t\t\t\t\t\t? builtInContext\n\t\t\t\t\t\t: yield* opts.extendContextAfterBuiltIn(builtInContext);\n\t\t\t\t}),\n\t\t}).pipe(Effect.provide(layerBuiltInPluginRuntime));\n\t});\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAmIA,MAAa,wBAAwB,UAAoB,gBAAwB;CAIhF,MAAM,6BACL,MAAM,OACL,eACA,OAAO,IAAI,aAAa;EACvB,OAAO,OAAO;CACf,CAAC,CACF;CAED,MAAM,eAAe,MAAM,SAC1B,cAAc,QAAQ,GACtB,iBAAiB,WAAW,GAC5B,SAAS,OACT,eAAe,OACf,wBACA,yBACA,qBACD;CAEA,MAAM,2BAA2B,wBAAwB,MAAM,KAC9D,MAAM,aAAa,YAAY,CAChC;CACA,MAAM,iBAAiB,gBAAgB,KAAK,MAAM,aAAa,wBAAwB,CAAC;CACxF,MAAM,YAAY,WAAW,KAAK,MAAM,aAAa,cAAc,CAAC;CACpE,MAAM,iBAAiB,gBAAgB,KAAK,MAAM,aAAa,SAAS,CAAC;CACzE,MAAM,kBAAkB,iBAAiB,KAAK,MAAM,aAAa,cAAc,CAAC;CAChF,MAAM,qBAAqB,2BAA2B,KAAK,MAAM,aAAa,eAAe,CAAC;CAC9F,MAAM,uBAAuB,4BAA4B,KACxD,MAAM,aAAa,kBAAkB,CACtC;CACA,MAAM,uBAAuB,sBAAsB,KAAK,MAAM,aAAa,oBAAoB,CAAC;CAChG,OAAO,YAAY,KAAK,MAAM,aAAa,oBAAoB,CAAC;AACjE;;;;;;AAOA,MAAM,2BAcL,OAAO,IAAI,aAAa;CACvB,MAAM,cAAc,OAAO;CAC3B,MAAM,sBAAsB,OAAO;CACnC,MAAM,aAAa,OAAO;CAC1B,MAAM,QAAQ,OAAO;CACrB,MAAM,WAAW,OAAO;CACxB,MAAM,mBAAmB,OAAO;CAChC,MAAM,aAAa,OAAO;CAC1B,MAAM,cAAc,OAA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UAAU,KAAK,SAAS;EACjE,GAAI,KAAK,oBAAoB,KAAA,IAAY,CAAC,IAAI,EAAE,iBAAiB,KAAK,gBAAgB;EACtF,GAAI,KAAK,mBAAmB,KAAA,IAAY,CAAC,IAAI,EAAE,gBAAgB,KAAK,eAAe;EACnF,GAAI,KAAK,yBAAyB,KAAA,IAC/B,CAAC,IACD,EAAE,sBAAsB,KAAK,qBAAqB;EACrD,GAAI,KAAK,gBAAgB,KAAA,IAAY,CAAC,IAAI,EAAE,aAAa,KAAK,YAAY;EAG1E,gBAAgB,QACf,OAAO,IAAI,aAAa;GACvB,MAAM,iBAAiB,OAAO,2BAA2B,GAAG;GAC5D,OAAO,KAAK,8BAA8B,KAAA,IACvC,iBACA,OAAO,KAAK,0BAA0B,cAAc;EACxD,CAAC;CACH,CAAC,CAAC,CAAC,KAAK,OAAO,QAAQ,yBAAyB,CAAC;AAClD,CAAC"}
@@ -1 +1,13 @@
1
- import { Context, Effect, FileSystem, Layer } from "effect";
1
+ import { Context, Effect, FileSystem, Layer } from "effect";
2
+
3
+ //#region src/orchestrators/codegen/bindings.d.ts
4
+ interface PackageBindings {
5
+ readonly name: string;
6
+ readonly packageId: string;
7
+ readonly mvrPlaceholder: string;
8
+ readonly sourcePath: string | null;
9
+ readonly excluded: boolean;
10
+ }
11
+ //#endregion
12
+ export { PackageBindings };
13
+ //# sourceMappingURL=bindings.d.mts.map