@mysten-incubation/devstack 0.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (833) hide show
  1. package/LICENSE +189 -0
  2. package/README.md +94 -0
  3. package/dist/_virtual/_rolldown/runtime.mjs +13 -0
  4. package/dist/api/define-capabilities.d.mts +25 -0
  5. package/dist/api/define-capabilities.mjs +19 -0
  6. package/dist/api/define-capabilities.mjs.map +1 -0
  7. package/dist/api/define-devstack-with.d.mts +41 -0
  8. package/dist/api/define-devstack-with.mjs +24 -0
  9. package/dist/api/define-devstack-with.mjs.map +1 -0
  10. package/dist/api/define-devstack.d.mts +62 -0
  11. package/dist/api/define-devstack.mjs +108 -0
  12. package/dist/api/define-devstack.mjs.map +1 -0
  13. package/dist/api/define-plugin.d.mts +1 -0
  14. package/dist/api/inference-network.mjs +122 -0
  15. package/dist/api/inference-network.mjs.map +1 -0
  16. package/dist/api/mode-narrowed-factory.d.mts +26 -0
  17. package/dist/api/mode-narrowed-factory.mjs +8 -0
  18. package/dist/api/mode-narrowed-factory.mjs.map +1 -0
  19. package/dist/api/plugin-errors.mjs +10 -0
  20. package/dist/api/plugin-errors.mjs.map +1 -0
  21. package/dist/api/run-stack.d.mts +82 -0
  22. package/dist/api/run-stack.mjs +127 -0
  23. package/dist/api/run-stack.mjs.map +1 -0
  24. package/dist/build-integrations/playwright/config.d.mts +92 -0
  25. package/dist/build-integrations/playwright/config.mjs +71 -0
  26. package/dist/build-integrations/playwright/config.mjs.map +1 -0
  27. package/dist/build-integrations/playwright/errors.d.mts +82 -0
  28. package/dist/build-integrations/playwright/errors.mjs +43 -0
  29. package/dist/build-integrations/playwright/errors.mjs.map +1 -0
  30. package/dist/build-integrations/playwright/global-setup.d.mts +64 -0
  31. package/dist/build-integrations/playwright/global-setup.mjs +44 -0
  32. package/dist/build-integrations/playwright/global-setup.mjs.map +1 -0
  33. package/dist/build-integrations/playwright/index.d.mts +6 -0
  34. package/dist/build-integrations/playwright/index.mjs +6 -0
  35. package/dist/build-integrations/playwright/stack-context.d.mts +95 -0
  36. package/dist/build-integrations/playwright/stack-context.mjs +277 -0
  37. package/dist/build-integrations/playwright/stack-context.mjs.map +1 -0
  38. package/dist/build-integrations/playwright/wallet-context.d.mts +87 -0
  39. package/dist/build-integrations/playwright/wallet-context.mjs +148 -0
  40. package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -0
  41. package/dist/build-integrations/runtime/cold-start-url.d.mts +67 -0
  42. package/dist/build-integrations/runtime/cold-start-url.mjs +56 -0
  43. package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -0
  44. package/dist/build-integrations/runtime/dapp-kit-slot.mjs +10 -0
  45. package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -0
  46. package/dist/build-integrations/runtime/discover.d.mts +78 -0
  47. package/dist/build-integrations/runtime/discover.mjs +124 -0
  48. package/dist/build-integrations/runtime/discover.mjs.map +1 -0
  49. package/dist/build-integrations/runtime/endpoint-registry.d.mts +26 -0
  50. package/dist/build-integrations/runtime/endpoint-registry.mjs +41 -0
  51. package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -0
  52. package/dist/build-integrations/runtime/errors.d.mts +64 -0
  53. package/dist/build-integrations/runtime/errors.mjs +51 -0
  54. package/dist/build-integrations/runtime/errors.mjs.map +1 -0
  55. package/dist/build-integrations/runtime/index.d.mts +7 -0
  56. package/dist/build-integrations/runtime/index.mjs +6 -0
  57. package/dist/build-integrations/runtime/read-stack-context.d.mts +38 -0
  58. package/dist/build-integrations/runtime/read-stack-context.mjs +130 -0
  59. package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -0
  60. package/dist/build-integrations/runtime/stack-context.d.mts +53 -0
  61. package/dist/build-integrations/vitest/config.d.mts +62 -0
  62. package/dist/build-integrations/vitest/config.mjs +80 -0
  63. package/dist/build-integrations/vitest/config.mjs.map +1 -0
  64. package/dist/build-integrations/vitest/env.d.mts +48 -0
  65. package/dist/build-integrations/vitest/env.mjs +50 -0
  66. package/dist/build-integrations/vitest/env.mjs.map +1 -0
  67. package/dist/build-integrations/vitest/errors.d.mts +44 -0
  68. package/dist/build-integrations/vitest/errors.mjs +18 -0
  69. package/dist/build-integrations/vitest/errors.mjs.map +1 -0
  70. package/dist/build-integrations/vitest/index.d.mts +6 -0
  71. package/dist/build-integrations/vitest/index.mjs +6 -0
  72. package/dist/build-integrations/vitest/setup.d.mts +53 -0
  73. package/dist/build-integrations/vitest/setup.mjs +56 -0
  74. package/dist/build-integrations/vitest/setup.mjs.map +1 -0
  75. package/dist/build-integrations/vitest/stack-context.d.mts +58 -0
  76. package/dist/build-integrations/vitest/stack-context.mjs +67 -0
  77. package/dist/build-integrations/vitest/stack-context.mjs.map +1 -0
  78. package/dist/cli/main.d.mts +5 -0
  79. package/dist/cli/main.mjs +586 -0
  80. package/dist/cli/main.mjs.map +1 -0
  81. package/dist/cli/prune-direct.mjs +216 -0
  82. package/dist/cli/prune-direct.mjs.map +1 -0
  83. package/dist/cli/snapshot-reader.mjs +73 -0
  84. package/dist/cli/snapshot-reader.mjs.map +1 -0
  85. package/dist/cli/up-lifecycle.mjs +28 -0
  86. package/dist/cli/up-lifecycle.mjs.map +1 -0
  87. package/dist/contracts/capability-decl.d.mts +42 -0
  88. package/dist/contracts/chain-probe.d.mts +26 -0
  89. package/dist/contracts/chain-probe.mjs +8 -0
  90. package/dist/contracts/chain-probe.mjs.map +1 -0
  91. package/dist/contracts/codegenable.d.mts +43 -0
  92. package/dist/contracts/container-runtime.d.mts +245 -0
  93. package/dist/contracts/liveness-classifier.d.mts +19 -0
  94. package/dist/contracts/network-resolver.d.mts +15 -0
  95. package/dist/contracts/network-resolver.mjs +7 -0
  96. package/dist/contracts/network-resolver.mjs.map +1 -0
  97. package/dist/contracts/projection.d.mts +15 -0
  98. package/dist/contracts/routable.d.mts +53 -0
  99. package/dist/contracts/snapshotable.d.mts +39 -0
  100. package/dist/contracts/strategy-contributor.d.mts +26 -0
  101. package/dist/index.d.mts +89 -0
  102. package/dist/index.mjs +37 -0
  103. package/dist/orchestrators/codegen/bindings.d.mts +2 -0
  104. package/dist/orchestrators/codegen/bindings.mjs +340 -0
  105. package/dist/orchestrators/codegen/bindings.mjs.map +1 -0
  106. package/dist/orchestrators/codegen/emit.mjs +56 -0
  107. package/dist/orchestrators/codegen/emit.mjs.map +1 -0
  108. package/dist/orchestrators/codegen/errors.d.mts +1 -0
  109. package/dist/orchestrators/codegen/errors.mjs +66 -0
  110. package/dist/orchestrators/codegen/errors.mjs.map +1 -0
  111. package/dist/orchestrators/codegen/extras.mjs +16 -0
  112. package/dist/orchestrators/codegen/extras.mjs.map +1 -0
  113. package/dist/orchestrators/codegen/format.mjs +109 -0
  114. package/dist/orchestrators/codegen/format.mjs.map +1 -0
  115. package/dist/orchestrators/codegen/gitignore.mjs +67 -0
  116. package/dist/orchestrators/codegen/gitignore.mjs.map +1 -0
  117. package/dist/orchestrators/codegen/paths.d.mts +1 -0
  118. package/dist/orchestrators/codegen/paths.mjs +33 -0
  119. package/dist/orchestrators/codegen/paths.mjs.map +1 -0
  120. package/dist/orchestrators/codegen/permissions.mjs +6 -0
  121. package/dist/orchestrators/codegen/permissions.mjs.map +1 -0
  122. package/dist/orchestrators/codegen/service.d.mts +1 -0
  123. package/dist/orchestrators/codegen/service.mjs +276 -0
  124. package/dist/orchestrators/codegen/service.mjs.map +1 -0
  125. package/dist/orchestrators/router/cleanup.mjs +58 -0
  126. package/dist/orchestrators/router/cleanup.mjs.map +1 -0
  127. package/dist/orchestrators/router/cors.mjs +31 -0
  128. package/dist/orchestrators/router/cors.mjs.map +1 -0
  129. package/dist/orchestrators/router/entrypoints.d.mts +1 -0
  130. package/dist/orchestrators/router/entrypoints.mjs +80 -0
  131. package/dist/orchestrators/router/entrypoints.mjs.map +1 -0
  132. package/dist/orchestrators/router/errors.d.mts +1 -0
  133. package/dist/orchestrators/router/errors.mjs +103 -0
  134. package/dist/orchestrators/router/errors.mjs.map +1 -0
  135. package/dist/orchestrators/router/file-provider.d.mts +1 -0
  136. package/dist/orchestrators/router/file-provider.mjs +320 -0
  137. package/dist/orchestrators/router/file-provider.mjs.map +1 -0
  138. package/dist/orchestrators/router/hostname.d.mts +1 -0
  139. package/dist/orchestrators/router/hostname.mjs +107 -0
  140. package/dist/orchestrators/router/hostname.mjs.map +1 -0
  141. package/dist/orchestrators/router/index.d.mts +1 -0
  142. package/dist/orchestrators/router/profile.d.mts +1 -0
  143. package/dist/orchestrators/router/profile.mjs +109 -0
  144. package/dist/orchestrators/router/profile.mjs.map +1 -0
  145. package/dist/orchestrators/router/service.d.mts +3 -0
  146. package/dist/orchestrators/router/service.mjs +421 -0
  147. package/dist/orchestrators/router/service.mjs.map +1 -0
  148. package/dist/orchestrators/router/traefik-container.d.mts +1 -0
  149. package/dist/orchestrators/router/traefik-container.mjs +229 -0
  150. package/dist/orchestrators/router/traefik-container.mjs.map +1 -0
  151. package/dist/orchestrators/runtime-composition.d.mts +10 -0
  152. package/dist/orchestrators/runtime-composition.mjs +168 -0
  153. package/dist/orchestrators/runtime-composition.mjs.map +1 -0
  154. package/dist/orchestrators/snapshot/capture.d.mts +1 -0
  155. package/dist/orchestrators/snapshot/capture.mjs +350 -0
  156. package/dist/orchestrators/snapshot/capture.mjs.map +1 -0
  157. package/dist/orchestrators/snapshot/descriptor.d.mts +1 -0
  158. package/dist/orchestrators/snapshot/descriptor.mjs +109 -0
  159. package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -0
  160. package/dist/orchestrators/snapshot/identity-guard.d.mts +1 -0
  161. package/dist/orchestrators/snapshot/identity-guard.mjs +132 -0
  162. package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -0
  163. package/dist/orchestrators/snapshot/image-bundle-tags.mjs +207 -0
  164. package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -0
  165. package/dist/orchestrators/snapshot/index.d.mts +1 -0
  166. package/dist/orchestrators/snapshot/integrity.d.mts +1 -0
  167. package/dist/orchestrators/snapshot/integrity.mjs +74 -0
  168. package/dist/orchestrators/snapshot/integrity.mjs.map +1 -0
  169. package/dist/orchestrators/snapshot/prune.d.mts +1 -0
  170. package/dist/orchestrators/snapshot/prune.mjs +110 -0
  171. package/dist/orchestrators/snapshot/prune.mjs.map +1 -0
  172. package/dist/orchestrators/snapshot/restore.d.mts +1 -0
  173. package/dist/orchestrators/snapshot/restore.mjs +404 -0
  174. package/dist/orchestrators/snapshot/restore.mjs.map +1 -0
  175. package/dist/orchestrators/snapshot/service.d.mts +1 -0
  176. package/dist/orchestrators/snapshot/service.mjs +296 -0
  177. package/dist/orchestrators/snapshot/service.mjs.map +1 -0
  178. package/dist/orchestrators/snapshot/state-document.mjs +18 -0
  179. package/dist/orchestrators/snapshot/state-document.mjs.map +1 -0
  180. package/dist/orchestrators/snapshot/wipe.d.mts +1 -0
  181. package/dist/orchestrators/snapshot/wipe.mjs +59 -0
  182. package/dist/orchestrators/snapshot/wipe.mjs.map +1 -0
  183. package/dist/plugins/account/codegen.d.mts +12 -0
  184. package/dist/plugins/account/codegen.mjs +22 -0
  185. package/dist/plugins/account/codegen.mjs.map +1 -0
  186. package/dist/plugins/account/errors.d.mts +44 -0
  187. package/dist/plugins/account/errors.mjs +16 -0
  188. package/dist/plugins/account/errors.mjs.map +1 -0
  189. package/dist/plugins/account/funding.d.mts +94 -0
  190. package/dist/plugins/account/funding.mjs +199 -0
  191. package/dist/plugins/account/funding.mjs.map +1 -0
  192. package/dist/plugins/account/index.d.mts +54 -0
  193. package/dist/plugins/account/index.mjs +151 -0
  194. package/dist/plugins/account/index.mjs.map +1 -0
  195. package/dist/plugins/account/keypair.d.mts +32 -0
  196. package/dist/plugins/account/keypair.mjs +99 -0
  197. package/dist/plugins/account/keypair.mjs.map +1 -0
  198. package/dist/plugins/account/lease.mjs +21 -0
  199. package/dist/plugins/account/lease.mjs.map +1 -0
  200. package/dist/plugins/account/registry.d.mts +33 -0
  201. package/dist/plugins/account/registry.mjs +36 -0
  202. package/dist/plugins/account/registry.mjs.map +1 -0
  203. package/dist/plugins/account/service.d.mts +104 -0
  204. package/dist/plugins/account/service.mjs +405 -0
  205. package/dist/plugins/account/service.mjs.map +1 -0
  206. package/dist/plugins/account/snapshot.mjs +33 -0
  207. package/dist/plugins/account/snapshot.mjs.map +1 -0
  208. package/dist/plugins/account/variants/env.mjs +24 -0
  209. package/dist/plugins/account/variants/env.mjs.map +1 -0
  210. package/dist/plugins/account/variants/ephemeral.mjs +72 -0
  211. package/dist/plugins/account/variants/ephemeral.mjs.map +1 -0
  212. package/dist/plugins/account/variants/impersonate.d.mts +16 -0
  213. package/dist/plugins/account/variants/impersonate.mjs +48 -0
  214. package/dist/plugins/account/variants/impersonate.mjs.map +1 -0
  215. package/dist/plugins/account/variants/inline.mjs +13 -0
  216. package/dist/plugins/account/variants/inline.mjs.map +1 -0
  217. package/dist/plugins/account/variants/keystore.mjs +93 -0
  218. package/dist/plugins/account/variants/keystore.mjs.map +1 -0
  219. package/dist/plugins/account/variants/signer.mjs +31 -0
  220. package/dist/plugins/account/variants/signer.mjs.map +1 -0
  221. package/dist/plugins/action/build-context.d.mts +41 -0
  222. package/dist/plugins/action/discriminator.d.mts +20 -0
  223. package/dist/plugins/action/discriminator.mjs +13 -0
  224. package/dist/plugins/action/discriminator.mjs.map +1 -0
  225. package/dist/plugins/action/errors.d.mts +31 -0
  226. package/dist/plugins/action/errors.mjs +13 -0
  227. package/dist/plugins/action/errors.mjs.map +1 -0
  228. package/dist/plugins/action/execute.d.mts +2 -0
  229. package/dist/plugins/action/execute.mjs +145 -0
  230. package/dist/plugins/action/execute.mjs.map +1 -0
  231. package/dist/plugins/action/index.d.mts +56 -0
  232. package/dist/plugins/action/index.mjs +82 -0
  233. package/dist/plugins/action/index.mjs.map +1 -0
  234. package/dist/plugins/action/service.d.mts +26 -0
  235. package/dist/plugins/action/service.mjs +84 -0
  236. package/dist/plugins/action/service.mjs.map +1 -0
  237. package/dist/plugins/coin/address-resolution.d.mts +34 -0
  238. package/dist/plugins/coin/address-resolution.mjs +80 -0
  239. package/dist/plugins/coin/address-resolution.mjs.map +1 -0
  240. package/dist/plugins/coin/codegen.d.mts +16 -0
  241. package/dist/plugins/coin/codegen.mjs +21 -0
  242. package/dist/plugins/coin/codegen.mjs.map +1 -0
  243. package/dist/plugins/coin/discovery.d.mts +26 -0
  244. package/dist/plugins/coin/discovery.mjs +112 -0
  245. package/dist/plugins/coin/discovery.mjs.map +1 -0
  246. package/dist/plugins/coin/errors.d.mts +48 -0
  247. package/dist/plugins/coin/errors.mjs +13 -0
  248. package/dist/plugins/coin/errors.mjs.map +1 -0
  249. package/dist/plugins/coin/index.d.mts +95 -0
  250. package/dist/plugins/coin/index.mjs +172 -0
  251. package/dist/plugins/coin/index.mjs.map +1 -0
  252. package/dist/plugins/coin/metadata.d.mts +15 -0
  253. package/dist/plugins/coin/metadata.mjs +99 -0
  254. package/dist/plugins/coin/metadata.mjs.map +1 -0
  255. package/dist/plugins/coin/mint.d.mts +34 -0
  256. package/dist/plugins/coin/mint.mjs +164 -0
  257. package/dist/plugins/coin/mint.mjs.map +1 -0
  258. package/dist/plugins/coin/registry.d.mts +1 -0
  259. package/dist/plugins/coin/registry.mjs +37 -0
  260. package/dist/plugins/coin/registry.mjs.map +1 -0
  261. package/dist/plugins/coin/service.d.mts +47 -0
  262. package/dist/plugins/coin/service.mjs +51 -0
  263. package/dist/plugins/coin/service.mjs.map +1 -0
  264. package/dist/plugins/coin/snapshot.mjs +19 -0
  265. package/dist/plugins/coin/snapshot.mjs.map +1 -0
  266. package/dist/plugins/coin/type-strings.mjs +49 -0
  267. package/dist/plugins/coin/type-strings.mjs.map +1 -0
  268. package/dist/plugins/deepbook/codegen.d.mts +39 -0
  269. package/dist/plugins/deepbook/codegen.mjs +15 -0
  270. package/dist/plugins/deepbook/codegen.mjs.map +1 -0
  271. package/dist/plugins/deepbook/deploy.mjs +437 -0
  272. package/dist/plugins/deepbook/deploy.mjs.map +1 -0
  273. package/dist/plugins/deepbook/errors.d.mts +29 -0
  274. package/dist/plugins/deepbook/errors.mjs +26 -0
  275. package/dist/plugins/deepbook/errors.mjs.map +1 -0
  276. package/dist/plugins/deepbook/faucet-strategy.d.mts +8 -0
  277. package/dist/plugins/deepbook/faucet-strategy.mjs +81 -0
  278. package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -0
  279. package/dist/plugins/deepbook/index.d.mts +171 -0
  280. package/dist/plugins/deepbook/index.mjs +359 -0
  281. package/dist/plugins/deepbook/index.mjs.map +1 -0
  282. package/dist/plugins/deepbook/plugin-key.mjs +7 -0
  283. package/dist/plugins/deepbook/plugin-key.mjs.map +1 -0
  284. package/dist/plugins/deepbook/pyth/index.mjs +226 -0
  285. package/dist/plugins/deepbook/pyth/index.mjs.map +1 -0
  286. package/dist/plugins/deepbook/routable.mjs +21 -0
  287. package/dist/plugins/deepbook/routable.mjs.map +1 -0
  288. package/dist/plugins/deepbook/snapshot.mjs +49 -0
  289. package/dist/plugins/deepbook/snapshot.mjs.map +1 -0
  290. package/dist/plugins/deepbook/types.d.mts +125 -0
  291. package/dist/plugins/deepbook/types.mjs +12 -0
  292. package/dist/plugins/deepbook/types.mjs.map +1 -0
  293. package/dist/plugins/faucet/dispatcher.d.mts +9 -0
  294. package/dist/plugins/faucet/dispatcher.mjs +13 -0
  295. package/dist/plugins/faucet/dispatcher.mjs.map +1 -0
  296. package/dist/plugins/faucet/errors.d.mts +86 -0
  297. package/dist/plugins/faucet/errors.mjs +19 -0
  298. package/dist/plugins/faucet/errors.mjs.map +1 -0
  299. package/dist/plugins/faucet/http.mjs +127 -0
  300. package/dist/plugins/faucet/http.mjs.map +1 -0
  301. package/dist/plugins/faucet/index.d.mts +43 -0
  302. package/dist/plugins/faucet/index.mjs +42 -0
  303. package/dist/plugins/faucet/index.mjs.map +1 -0
  304. package/dist/plugins/faucet/service.d.mts +20 -0
  305. package/dist/plugins/faucet/strategies/sui-local.d.mts +23 -0
  306. package/dist/plugins/faucet/strategies/sui-local.mjs +29 -0
  307. package/dist/plugins/faucet/strategies/sui-local.mjs.map +1 -0
  308. package/dist/plugins/host-service/errors.d.mts +27 -0
  309. package/dist/plugins/host-service/errors.mjs +14 -0
  310. package/dist/plugins/host-service/errors.mjs.map +1 -0
  311. package/dist/plugins/host-service/index.d.mts +10 -0
  312. package/dist/plugins/host-service/index.mjs +48 -0
  313. package/dist/plugins/host-service/index.mjs.map +1 -0
  314. package/dist/plugins/host-service/routable.mjs +24 -0
  315. package/dist/plugins/host-service/routable.mjs.map +1 -0
  316. package/dist/plugins/host-service/service.d.mts +49 -0
  317. package/dist/plugins/host-service/service.mjs +375 -0
  318. package/dist/plugins/host-service/service.mjs.map +1 -0
  319. package/dist/plugins/package/build.d.mts +1 -0
  320. package/dist/plugins/package/build.mjs +24 -0
  321. package/dist/plugins/package/build.mjs.map +1 -0
  322. package/dist/plugins/package/codegen.d.mts +19 -0
  323. package/dist/plugins/package/codegen.mjs +41 -0
  324. package/dist/plugins/package/codegen.mjs.map +1 -0
  325. package/dist/plugins/package/dep-resolution.mjs +10 -0
  326. package/dist/plugins/package/dep-resolution.mjs.map +1 -0
  327. package/dist/plugins/package/errors.d.mts +34 -0
  328. package/dist/plugins/package/errors.mjs +13 -0
  329. package/dist/plugins/package/errors.mjs.map +1 -0
  330. package/dist/plugins/package/index.d.mts +109 -0
  331. package/dist/plugins/package/index.mjs +207 -0
  332. package/dist/plugins/package/index.mjs.map +1 -0
  333. package/dist/plugins/package/mode-known.mjs +41 -0
  334. package/dist/plugins/package/mode-known.mjs.map +1 -0
  335. package/dist/plugins/package/mode-local.d.mts +1 -0
  336. package/dist/plugins/package/mode-local.mjs +183 -0
  337. package/dist/plugins/package/mode-local.mjs.map +1 -0
  338. package/dist/plugins/package/publish-executor.mjs +202 -0
  339. package/dist/plugins/package/publish-executor.mjs.map +1 -0
  340. package/dist/plugins/package/publish-output.d.mts +28 -0
  341. package/dist/plugins/package/publish-output.mjs +45 -0
  342. package/dist/plugins/package/publish-output.mjs.map +1 -0
  343. package/dist/plugins/package/registry.d.mts +25 -0
  344. package/dist/plugins/package/registry.mjs +30 -0
  345. package/dist/plugins/package/registry.mjs.map +1 -0
  346. package/dist/plugins/package/service.mjs +20 -0
  347. package/dist/plugins/package/service.mjs.map +1 -0
  348. package/dist/plugins/package/snapshot.mjs +25 -0
  349. package/dist/plugins/package/snapshot.mjs.map +1 -0
  350. package/dist/plugins/postgres/codegen.mjs +42 -0
  351. package/dist/plugins/postgres/codegen.mjs.map +1 -0
  352. package/dist/plugins/postgres/connection.d.mts +33 -0
  353. package/dist/plugins/postgres/connection.mjs +19 -0
  354. package/dist/plugins/postgres/connection.mjs.map +1 -0
  355. package/dist/plugins/postgres/db-ensure.mjs +100 -0
  356. package/dist/plugins/postgres/db-ensure.mjs.map +1 -0
  357. package/dist/plugins/postgres/errors.d.mts +55 -0
  358. package/dist/plugins/postgres/errors.mjs +29 -0
  359. package/dist/plugins/postgres/errors.mjs.map +1 -0
  360. package/dist/plugins/postgres/index.d.mts +37 -0
  361. package/dist/plugins/postgres/index.mjs +75 -0
  362. package/dist/plugins/postgres/index.mjs.map +1 -0
  363. package/dist/plugins/postgres/routable.mjs +33 -0
  364. package/dist/plugins/postgres/routable.mjs.map +1 -0
  365. package/dist/plugins/postgres/service.d.mts +50 -0
  366. package/dist/plugins/postgres/service.mjs +145 -0
  367. package/dist/plugins/postgres/service.mjs.map +1 -0
  368. package/dist/plugins/postgres/snapshot.d.mts +1 -0
  369. package/dist/plugins/postgres/snapshot.mjs +32 -0
  370. package/dist/plugins/postgres/snapshot.mjs.map +1 -0
  371. package/dist/plugins/router-entrypoints.mjs +21 -0
  372. package/dist/plugins/router-entrypoints.mjs.map +1 -0
  373. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +59 -0
  374. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -0
  375. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +132 -0
  376. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -0
  377. package/dist/plugins/seal/codegen.d.mts +19 -0
  378. package/dist/plugins/seal/codegen.mjs +16 -0
  379. package/dist/plugins/seal/codegen.mjs.map +1 -0
  380. package/dist/plugins/seal/config-render.mjs +82 -0
  381. package/dist/plugins/seal/config-render.mjs.map +1 -0
  382. package/dist/plugins/seal/deploy.mjs +198 -0
  383. package/dist/plugins/seal/deploy.mjs.map +1 -0
  384. package/dist/plugins/seal/errors.d.mts +52 -0
  385. package/dist/plugins/seal/errors.mjs +19 -0
  386. package/dist/plugins/seal/errors.mjs.map +1 -0
  387. package/dist/plugins/seal/index.d.mts +161 -0
  388. package/dist/plugins/seal/index.mjs +235 -0
  389. package/dist/plugins/seal/index.mjs.map +1 -0
  390. package/dist/plugins/seal/key-manager.d.mts +22 -0
  391. package/dist/plugins/seal/key-manager.mjs +22 -0
  392. package/dist/plugins/seal/key-manager.mjs.map +1 -0
  393. package/dist/plugins/seal/key-server.mjs +175 -0
  394. package/dist/plugins/seal/key-server.mjs.map +1 -0
  395. package/dist/plugins/seal/keygen.mjs +96 -0
  396. package/dist/plugins/seal/keygen.mjs.map +1 -0
  397. package/dist/plugins/seal/mode/fork-known.d.mts +8 -0
  398. package/dist/plugins/seal/mode/fork-known.mjs +23 -0
  399. package/dist/plugins/seal/mode/fork-known.mjs.map +1 -0
  400. package/dist/plugins/seal/mode/live.d.mts +18 -0
  401. package/dist/plugins/seal/mode/live.mjs +64 -0
  402. package/dist/plugins/seal/mode/live.mjs.map +1 -0
  403. package/dist/plugins/seal/mode/local-keygen.mjs +180 -0
  404. package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -0
  405. package/dist/plugins/seal/plugin-key.mjs +7 -0
  406. package/dist/plugins/seal/plugin-key.mjs.map +1 -0
  407. package/dist/plugins/seal/registry-publish.d.mts +43 -0
  408. package/dist/plugins/seal/registry-publish.mjs +9 -0
  409. package/dist/plugins/seal/registry-publish.mjs.map +1 -0
  410. package/dist/plugins/seal/routable.mjs +57 -0
  411. package/dist/plugins/seal/routable.mjs.map +1 -0
  412. package/dist/plugins/seal/service.mjs +17 -0
  413. package/dist/plugins/seal/service.mjs.map +1 -0
  414. package/dist/plugins/seal/snapshot.mjs +51 -0
  415. package/dist/plugins/seal/snapshot.mjs.map +1 -0
  416. package/dist/plugins/sui/auto-tick.mjs +45 -0
  417. package/dist/plugins/sui/auto-tick.mjs.map +1 -0
  418. package/dist/plugins/sui/chain-build-container.d.mts +1 -0
  419. package/dist/plugins/sui/chain-probe.d.mts +85 -0
  420. package/dist/plugins/sui/chain-probe.mjs +104 -0
  421. package/dist/plugins/sui/chain-probe.mjs.map +1 -0
  422. package/dist/plugins/sui/codegen.d.mts +14 -0
  423. package/dist/plugins/sui/codegen.mjs +26 -0
  424. package/dist/plugins/sui/codegen.mjs.map +1 -0
  425. package/dist/plugins/sui/errors.d.mts +74 -0
  426. package/dist/plugins/sui/errors.mjs +28 -0
  427. package/dist/plugins/sui/errors.mjs.map +1 -0
  428. package/dist/plugins/sui/fork-orchestration.mjs +24 -0
  429. package/dist/plugins/sui/fork-orchestration.mjs.map +1 -0
  430. package/dist/plugins/sui/fork-transaction.mjs +96 -0
  431. package/dist/plugins/sui/fork-transaction.mjs.map +1 -0
  432. package/dist/plugins/sui/index.d.mts +318 -0
  433. package/dist/plugins/sui/index.mjs +182 -0
  434. package/dist/plugins/sui/index.mjs.map +1 -0
  435. package/dist/plugins/sui/mode/external.mjs +60 -0
  436. package/dist/plugins/sui/mode/external.mjs.map +1 -0
  437. package/dist/plugins/sui/mode/fork.mjs +283 -0
  438. package/dist/plugins/sui/mode/fork.mjs.map +1 -0
  439. package/dist/plugins/sui/mode/live.mjs +103 -0
  440. package/dist/plugins/sui/mode/live.mjs.map +1 -0
  441. package/dist/plugins/sui/mode/local.mjs +293 -0
  442. package/dist/plugins/sui/mode/local.mjs.map +1 -0
  443. package/dist/plugins/sui/mode/shared-boot.mjs +254 -0
  444. package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -0
  445. package/dist/plugins/sui/mode/shared.d.mts +103 -0
  446. package/dist/plugins/sui/mode/shared.mjs +12 -0
  447. package/dist/plugins/sui/mode/shared.mjs.map +1 -0
  448. package/dist/plugins/sui/mode/spec.d.mts +94 -0
  449. package/dist/plugins/sui/network-resolver.d.mts +23 -0
  450. package/dist/plugins/sui/routable.mjs +88 -0
  451. package/dist/plugins/sui/routable.mjs.map +1 -0
  452. package/dist/plugins/sui/seed-objects.d.mts +18 -0
  453. package/dist/plugins/sui/seed-objects.mjs +25 -0
  454. package/dist/plugins/sui/seed-objects.mjs.map +1 -0
  455. package/dist/plugins/sui/service.mjs +38 -0
  456. package/dist/plugins/sui/service.mjs.map +1 -0
  457. package/dist/plugins/sui/snapshot.mjs +53 -0
  458. package/dist/plugins/sui/snapshot.mjs.map +1 -0
  459. package/dist/plugins/wallet/codegen.d.mts +33 -0
  460. package/dist/plugins/wallet/codegen.mjs +34 -0
  461. package/dist/plugins/wallet/codegen.mjs.map +1 -0
  462. package/dist/plugins/wallet/errors.d.mts +66 -0
  463. package/dist/plugins/wallet/errors.mjs +16 -0
  464. package/dist/plugins/wallet/errors.mjs.map +1 -0
  465. package/dist/plugins/wallet/index.d.mts +63 -0
  466. package/dist/plugins/wallet/index.mjs +126 -0
  467. package/dist/plugins/wallet/index.mjs.map +1 -0
  468. package/dist/plugins/wallet/origin-policy.d.mts +1 -0
  469. package/dist/plugins/wallet/origin-policy.mjs +65 -0
  470. package/dist/plugins/wallet/origin-policy.mjs.map +1 -0
  471. package/dist/plugins/wallet/pairing.d.mts +11 -0
  472. package/dist/plugins/wallet/pairing.mjs +125 -0
  473. package/dist/plugins/wallet/pairing.mjs.map +1 -0
  474. package/dist/plugins/wallet/protocol.d.mts +1 -0
  475. package/dist/plugins/wallet/protocol.mjs +96 -0
  476. package/dist/plugins/wallet/protocol.mjs.map +1 -0
  477. package/dist/plugins/wallet/routable.mjs +32 -0
  478. package/dist/plugins/wallet/routable.mjs.map +1 -0
  479. package/dist/plugins/wallet/server.d.mts +12 -0
  480. package/dist/plugins/wallet/server.mjs +317 -0
  481. package/dist/plugins/wallet/server.mjs.map +1 -0
  482. package/dist/plugins/wallet/service.d.mts +68 -0
  483. package/dist/plugins/wallet/service.mjs +97 -0
  484. package/dist/plugins/wallet/service.mjs.map +1 -0
  485. package/dist/plugins/wallet/snapshot.d.mts +1 -0
  486. package/dist/plugins/wallet/snapshot.mjs +14 -0
  487. package/dist/plugins/wallet/snapshot.mjs.map +1 -0
  488. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +42 -0
  489. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -0
  490. package/dist/plugins/walrus/codegen.d.mts +38 -0
  491. package/dist/plugins/walrus/codegen.mjs +34 -0
  492. package/dist/plugins/walrus/codegen.mjs.map +1 -0
  493. package/dist/plugins/walrus/deploy-paths.mjs +14 -0
  494. package/dist/plugins/walrus/deploy-paths.mjs.map +1 -0
  495. package/dist/plugins/walrus/deploy.d.mts +1 -0
  496. package/dist/plugins/walrus/deploy.mjs +224 -0
  497. package/dist/plugins/walrus/deploy.mjs.map +1 -0
  498. package/dist/plugins/walrus/errors.d.mts +38 -0
  499. package/dist/plugins/walrus/errors.mjs +26 -0
  500. package/dist/plugins/walrus/errors.mjs.map +1 -0
  501. package/dist/plugins/walrus/faucet-strategy.d.mts +12 -0
  502. package/dist/plugins/walrus/faucet-strategy.mjs +62 -0
  503. package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -0
  504. package/dist/plugins/walrus/index.d.mts +177 -0
  505. package/dist/plugins/walrus/index.mjs +284 -0
  506. package/dist/plugins/walrus/index.mjs.map +1 -0
  507. package/dist/plugins/walrus/mode/known-deploy.d.mts +25 -0
  508. package/dist/plugins/walrus/mode/known-deploy.mjs +71 -0
  509. package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -0
  510. package/dist/plugins/walrus/mode/local-cluster.d.mts +34 -0
  511. package/dist/plugins/walrus/mode/local-cluster.mjs +153 -0
  512. package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -0
  513. package/dist/plugins/walrus/plugin-key.mjs +7 -0
  514. package/dist/plugins/walrus/plugin-key.mjs.map +1 -0
  515. package/dist/plugins/walrus/registry-publish.d.mts +24 -0
  516. package/dist/plugins/walrus/registry-publish.mjs +7 -0
  517. package/dist/plugins/walrus/registry-publish.mjs.map +1 -0
  518. package/dist/plugins/walrus/routable.mjs +99 -0
  519. package/dist/plugins/walrus/routable.mjs.map +1 -0
  520. package/dist/plugins/walrus/service.mjs +20 -0
  521. package/dist/plugins/walrus/service.mjs.map +1 -0
  522. package/dist/plugins/walrus/snapshot.mjs +53 -0
  523. package/dist/plugins/walrus/snapshot.mjs.map +1 -0
  524. package/dist/plugins/walrus/storage-nodes.d.mts +15 -0
  525. package/dist/plugins/walrus/storage-nodes.mjs +154 -0
  526. package/dist/plugins/walrus/storage-nodes.mjs.map +1 -0
  527. package/dist/plugins/walrus/wal-swap.d.mts +2 -0
  528. package/dist/plugins/walrus/wal-swap.mjs +58 -0
  529. package/dist/plugins/walrus/wal-swap.mjs.map +1 -0
  530. package/dist/primitives/artifact-publisher.d.mts +12 -0
  531. package/dist/primitives/cache.d.mts +1 -0
  532. package/dist/runtime/built-in-plugin-layers.mjs +49 -0
  533. package/dist/runtime/built-in-plugin-layers.mjs.map +1 -0
  534. package/dist/runtime/docker/client.d.mts +2 -0
  535. package/dist/runtime/docker/client.mjs +54 -0
  536. package/dist/runtime/docker/client.mjs.map +1 -0
  537. package/dist/runtime/docker/container.d.mts +1 -0
  538. package/dist/runtime/docker/container.mjs +562 -0
  539. package/dist/runtime/docker/container.mjs.map +1 -0
  540. package/dist/runtime/docker/errors.d.mts +1 -0
  541. package/dist/runtime/docker/errors.mjs +187 -0
  542. package/dist/runtime/docker/errors.mjs.map +1 -0
  543. package/dist/runtime/docker/exec.d.mts +1 -0
  544. package/dist/runtime/docker/exec.mjs +63 -0
  545. package/dist/runtime/docker/exec.mjs.map +1 -0
  546. package/dist/runtime/docker/image.d.mts +1 -0
  547. package/dist/runtime/docker/image.mjs +278 -0
  548. package/dist/runtime/docker/image.mjs.map +1 -0
  549. package/dist/runtime/docker/index.d.mts +1 -0
  550. package/dist/runtime/docker/inventory.d.mts +1 -0
  551. package/dist/runtime/docker/inventory.mjs +167 -0
  552. package/dist/runtime/docker/inventory.mjs.map +1 -0
  553. package/dist/runtime/docker/labels.d.mts +1 -0
  554. package/dist/runtime/docker/labels.mjs +97 -0
  555. package/dist/runtime/docker/labels.mjs.map +1 -0
  556. package/dist/runtime/docker/logs.d.mts +1 -0
  557. package/dist/runtime/docker/logs.mjs +34 -0
  558. package/dist/runtime/docker/logs.mjs.map +1 -0
  559. package/dist/runtime/docker/network.d.mts +1 -0
  560. package/dist/runtime/docker/network.mjs +168 -0
  561. package/dist/runtime/docker/network.mjs.map +1 -0
  562. package/dist/runtime/docker/service.d.mts +9 -0
  563. package/dist/runtime/docker/service.mjs +266 -0
  564. package/dist/runtime/docker/service.mjs.map +1 -0
  565. package/dist/runtime/docker/sweep.d.mts +1 -0
  566. package/dist/runtime/docker/sweep.mjs +220 -0
  567. package/dist/runtime/docker/sweep.mjs.map +1 -0
  568. package/dist/runtime/docker/volume.d.mts +1 -0
  569. package/dist/runtime/docker/volume.mjs +24 -0
  570. package/dist/runtime/docker/volume.mjs.map +1 -0
  571. package/dist/runtime/docker/wrap.d.mts +1 -0
  572. package/dist/runtime/docker/wrap.mjs +131 -0
  573. package/dist/runtime/docker/wrap.mjs.map +1 -0
  574. package/dist/substrate/brand.d.mts +24 -0
  575. package/dist/substrate/brand.mjs +14 -0
  576. package/dist/substrate/brand.mjs.map +1 -0
  577. package/dist/substrate/cross-process.d.mts +1 -0
  578. package/dist/substrate/cross-process.mjs +28 -0
  579. package/dist/substrate/cross-process.mjs.map +1 -0
  580. package/dist/substrate/events.d.mts +117 -0
  581. package/dist/substrate/identity.d.mts +13 -0
  582. package/dist/substrate/lifecycle.d.mts +12 -0
  583. package/dist/substrate/manifest.d.mts +39 -0
  584. package/dist/substrate/manifest.mjs +33 -0
  585. package/dist/substrate/manifest.mjs.map +1 -0
  586. package/dist/substrate/network.d.mts +34 -0
  587. package/dist/substrate/options.d.mts +23 -0
  588. package/dist/substrate/plugin.d.mts +101 -0
  589. package/dist/substrate/plugin.mjs +61 -0
  590. package/dist/substrate/plugin.mjs.map +1 -0
  591. package/dist/substrate/projection.d.mts +100 -0
  592. package/dist/substrate/runtime/artifact-publisher/index.mjs +76 -0
  593. package/dist/substrate/runtime/artifact-publisher/index.mjs.map +1 -0
  594. package/dist/substrate/runtime/atomic-write.mjs +106 -0
  595. package/dist/substrate/runtime/atomic-write.mjs.map +1 -0
  596. package/dist/substrate/runtime/cache/index.d.mts +1 -0
  597. package/dist/substrate/runtime/cache/schema.d.mts +1 -0
  598. package/dist/substrate/runtime/cache/schema.mjs +22 -0
  599. package/dist/substrate/runtime/cache/schema.mjs.map +1 -0
  600. package/dist/substrate/runtime/cache/service.d.mts +1 -0
  601. package/dist/substrate/runtime/cache/service.mjs +89 -0
  602. package/dist/substrate/runtime/cache/service.mjs.map +1 -0
  603. package/dist/substrate/runtime/capability-sinks/index.d.mts +1 -0
  604. package/dist/substrate/runtime/capability-sinks/layer.d.mts +1 -0
  605. package/dist/substrate/runtime/capability-sinks/layer.mjs +31 -0
  606. package/dist/substrate/runtime/capability-sinks/layer.mjs.map +1 -0
  607. package/dist/substrate/runtime/capability-sinks/service.d.mts +36 -0
  608. package/dist/substrate/runtime/capability-sinks/service.mjs +74 -0
  609. package/dist/substrate/runtime/capability-sinks/service.mjs.map +1 -0
  610. package/dist/substrate/runtime/config-validation.d.mts +38 -0
  611. package/dist/substrate/runtime/config-validation.mjs +137 -0
  612. package/dist/substrate/runtime/config-validation.mjs.map +1 -0
  613. package/dist/substrate/runtime/context-helpers.mjs +32 -0
  614. package/dist/substrate/runtime/context-helpers.mjs.map +1 -0
  615. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +128 -0
  616. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -0
  617. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs +136 -0
  618. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -0
  619. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs +49 -0
  620. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -0
  621. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs +9 -0
  622. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -0
  623. package/dist/substrate/runtime/cross-process/liveness.mjs +119 -0
  624. package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -0
  625. package/dist/substrate/runtime/cross-process/roster.mjs +275 -0
  626. package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -0
  627. package/dist/substrate/runtime/cross-process/snapshot-reservation.d.mts +1 -0
  628. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +117 -0
  629. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +1 -0
  630. package/dist/substrate/runtime/cross-process/stack-lock.d.mts +1 -0
  631. package/dist/substrate/runtime/cross-process/stack-lock.mjs +142 -0
  632. package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -0
  633. package/dist/substrate/runtime/current-plugin.mjs +15 -0
  634. package/dist/substrate/runtime/current-plugin.mjs.map +1 -0
  635. package/dist/substrate/runtime/errors.d.mts +1 -0
  636. package/dist/substrate/runtime/errors.mjs +76 -0
  637. package/dist/substrate/runtime/errors.mjs.map +1 -0
  638. package/dist/substrate/runtime/host-tree-tar/index.mjs +364 -0
  639. package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -0
  640. package/dist/substrate/runtime/http-probe.d.mts +35 -0
  641. package/dist/substrate/runtime/http-probe.mjs +65 -0
  642. package/dist/substrate/runtime/http-probe.mjs.map +1 -0
  643. package/dist/substrate/runtime/lease-broker/index.d.mts +1 -0
  644. package/dist/substrate/runtime/lease-broker/service.d.mts +64 -0
  645. package/dist/substrate/runtime/lease-broker/service.mjs +155 -0
  646. package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -0
  647. package/dist/substrate/runtime/lifecycle/dep-graph.d.mts +1 -0
  648. package/dist/substrate/runtime/lifecycle/dep-graph.mjs +138 -0
  649. package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -0
  650. package/dist/substrate/runtime/lifecycle/index.d.mts +1 -0
  651. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +31 -0
  652. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +1 -0
  653. package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -0
  654. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +133 -0
  655. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -0
  656. package/dist/substrate/runtime/lifecycle/ready-gate.d.mts +1 -0
  657. package/dist/substrate/runtime/lifecycle/ready-gate.mjs +34 -0
  658. package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -0
  659. package/dist/substrate/runtime/lifecycle/selective-restart.d.mts +1 -0
  660. package/dist/substrate/runtime/lifecycle/selective-restart.mjs +43 -0
  661. package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -0
  662. package/dist/substrate/runtime/lifecycle/signals.d.mts +1 -0
  663. package/dist/substrate/runtime/lifecycle/signals.mjs +64 -0
  664. package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -0
  665. package/dist/substrate/runtime/lifecycle/state-machine.d.mts +1 -0
  666. package/dist/substrate/runtime/lifecycle/state-machine.mjs +38 -0
  667. package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -0
  668. package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -0
  669. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +27 -0
  670. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -0
  671. package/dist/substrate/runtime/managed-container.d.mts +30 -0
  672. package/dist/substrate/runtime/managed-container.mjs +32 -0
  673. package/dist/substrate/runtime/managed-container.mjs.map +1 -0
  674. package/dist/substrate/runtime/manifest/manifest.mjs +73 -0
  675. package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -0
  676. package/dist/substrate/runtime/mode-errors.d.mts +36 -0
  677. package/dist/substrate/runtime/observability/cascade-formatter.d.mts +1 -0
  678. package/dist/substrate/runtime/observability/cascade-formatter.mjs +135 -0
  679. package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -0
  680. package/dist/substrate/runtime/observability/formatter-registry.d.mts +1 -0
  681. package/dist/substrate/runtime/observability/formatter-registry.mjs +65 -0
  682. package/dist/substrate/runtime/observability/formatter-registry.mjs.map +1 -0
  683. package/dist/substrate/runtime/observability/index.d.mts +3 -0
  684. package/dist/substrate/runtime/observability/logger.d.mts +58 -0
  685. package/dist/substrate/runtime/observability/logger.mjs +89 -0
  686. package/dist/substrate/runtime/observability/logger.mjs.map +1 -0
  687. package/dist/substrate/runtime/observability/pretty-error.d.mts +1 -0
  688. package/dist/substrate/runtime/observability/pretty-error.mjs +119 -0
  689. package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -0
  690. package/dist/substrate/runtime/observability/process-lines.d.mts +31 -0
  691. package/dist/substrate/runtime/observability/process-lines.mjs +40 -0
  692. package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -0
  693. package/dist/substrate/runtime/observability/redaction.d.mts +28 -0
  694. package/dist/substrate/runtime/observability/redaction.mjs +45 -0
  695. package/dist/substrate/runtime/observability/redaction.mjs.map +1 -0
  696. package/dist/substrate/runtime/observability/spans.d.mts +1 -0
  697. package/dist/substrate/runtime/observability/spans.mjs +87 -0
  698. package/dist/substrate/runtime/observability/spans.mjs.map +1 -0
  699. package/dist/substrate/runtime/observability/subprocess-capture.d.mts +2 -0
  700. package/dist/substrate/runtime/observability/subprocess-capture.mjs +82 -0
  701. package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -0
  702. package/dist/substrate/runtime/paths.d.mts +17 -0
  703. package/dist/substrate/runtime/paths.mjs +61 -0
  704. package/dist/substrate/runtime/paths.mjs.map +1 -0
  705. package/dist/substrate/runtime/port-broker/index.d.mts +1 -0
  706. package/dist/substrate/runtime/port-broker/service.d.mts +1 -0
  707. package/dist/substrate/runtime/port-broker/service.mjs +319 -0
  708. package/dist/substrate/runtime/port-broker/service.mjs.map +1 -0
  709. package/dist/substrate/runtime/post-acquire-tasks.d.mts +1 -0
  710. package/dist/substrate/runtime/post-acquire-tasks.mjs +34 -0
  711. package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -0
  712. package/dist/substrate/runtime/probes.d.mts +51 -0
  713. package/dist/substrate/runtime/probes.mjs +84 -0
  714. package/dist/substrate/runtime/probes.mjs.map +1 -0
  715. package/dist/substrate/runtime/process-supervisor.d.mts +57 -0
  716. package/dist/substrate/runtime/process-supervisor.mjs +73 -0
  717. package/dist/substrate/runtime/process-supervisor.mjs.map +1 -0
  718. package/dist/substrate/runtime/projection/operational-endpoints.mjs +44 -0
  719. package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -0
  720. package/dist/substrate/runtime/projection/persisted.mjs +195 -0
  721. package/dist/substrate/runtime/projection/persisted.mjs.map +1 -0
  722. package/dist/substrate/runtime/projection/state-ref.mjs +48 -0
  723. package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -0
  724. package/dist/substrate/runtime/projection/update.mjs +200 -0
  725. package/dist/substrate/runtime/projection/update.mjs.map +1 -0
  726. package/dist/substrate/runtime/retry-policy.d.mts +18 -0
  727. package/dist/substrate/runtime/retry-policy.mjs +16 -0
  728. package/dist/substrate/runtime/retry-policy.mjs.map +1 -0
  729. package/dist/substrate/runtime/run.mjs +86 -0
  730. package/dist/substrate/runtime/run.mjs.map +1 -0
  731. package/dist/substrate/runtime/runtime-decode.d.mts +32 -0
  732. package/dist/substrate/runtime/runtime-decode.mjs +53 -0
  733. package/dist/substrate/runtime/runtime-decode.mjs.map +1 -0
  734. package/dist/substrate/runtime/scoped-http-server.mjs +36 -0
  735. package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -0
  736. package/dist/substrate/runtime/scoped-ref-map/service.mjs +83 -0
  737. package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +1 -0
  738. package/dist/substrate/runtime/stage-and-swap/index.d.mts +1 -0
  739. package/dist/substrate/runtime/stage-and-swap/index.mjs +131 -0
  740. package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -0
  741. package/dist/substrate/runtime/state-store/schema.mjs +36 -0
  742. package/dist/substrate/runtime/state-store/schema.mjs.map +1 -0
  743. package/dist/substrate/runtime/strategy-registry/chain-probe-for.d.mts +1 -0
  744. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs +22 -0
  745. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -0
  746. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.d.mts +1 -0
  747. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs +30 -0
  748. package/dist/substrate/runtime/strategy-registry/faucet-capability-for.mjs.map +1 -0
  749. package/dist/substrate/runtime/strategy-registry/index.d.mts +1 -0
  750. package/dist/substrate/runtime/strategy-registry/service.d.mts +1 -0
  751. package/dist/substrate/runtime/strategy-registry/service.mjs +67 -0
  752. package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -0
  753. package/dist/substrate/runtime/sui-execute/index.d.mts +11 -0
  754. package/dist/substrate/runtime/sui-execute/index.mjs +144 -0
  755. package/dist/substrate/runtime/sui-execute/index.mjs.map +1 -0
  756. package/dist/substrate/runtime/sui-move-build/index.d.mts +1 -0
  757. package/dist/substrate/runtime/sui-move-build/index.mjs +283 -0
  758. package/dist/substrate/runtime/sui-move-build/index.mjs.map +1 -0
  759. package/dist/substrate/runtime/supervisor.d.mts +1 -0
  760. package/dist/substrate/runtime/supervisor.mjs +831 -0
  761. package/dist/substrate/runtime/supervisor.mjs.map +1 -0
  762. package/dist/surfaces/cli/command-tree.mjs +276 -0
  763. package/dist/surfaces/cli/command-tree.mjs.map +1 -0
  764. package/dist/surfaces/cli/commands/config.mjs +31 -0
  765. package/dist/surfaces/cli/commands/config.mjs.map +1 -0
  766. package/dist/surfaces/cli/commands/confirm-node.mjs +26 -0
  767. package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -0
  768. package/dist/surfaces/cli/commands/confirm.mjs +26 -0
  769. package/dist/surfaces/cli/commands/confirm.mjs.map +1 -0
  770. package/dist/surfaces/cli/commands/doctor-probes.mjs +452 -0
  771. package/dist/surfaces/cli/commands/doctor-probes.mjs.map +1 -0
  772. package/dist/surfaces/cli/commands/doctor.mjs +38 -0
  773. package/dist/surfaces/cli/commands/doctor.mjs.map +1 -0
  774. package/dist/surfaces/cli/commands/prune-picker.mjs +347 -0
  775. package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -0
  776. package/dist/surfaces/cli/commands/prune.mjs +178 -0
  777. package/dist/surfaces/cli/commands/prune.mjs.map +1 -0
  778. package/dist/surfaces/cli/commands/snapshot.mjs +141 -0
  779. package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -0
  780. package/dist/surfaces/cli/commands/status.mjs +95 -0
  781. package/dist/surfaces/cli/commands/status.mjs.map +1 -0
  782. package/dist/surfaces/cli/commands/supervisor-presence.mjs +33 -0
  783. package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -0
  784. package/dist/surfaces/cli/commands/wipe.mjs +28 -0
  785. package/dist/surfaces/cli/commands/wipe.mjs.map +1 -0
  786. package/dist/surfaces/cli/envelope.mjs +43 -0
  787. package/dist/surfaces/cli/envelope.mjs.map +1 -0
  788. package/dist/surfaces/cli/errors.mjs +110 -0
  789. package/dist/surfaces/cli/errors.mjs.map +1 -0
  790. package/dist/surfaces/cli/flags.mjs +56 -0
  791. package/dist/surfaces/cli/flags.mjs.map +1 -0
  792. package/dist/surfaces/cli/index.mjs +418 -0
  793. package/dist/surfaces/cli/index.mjs.map +1 -0
  794. package/dist/surfaces/cli/output.mjs +115 -0
  795. package/dist/surfaces/cli/output.mjs.map +1 -0
  796. package/dist/surfaces/cli/sysexits.mjs +139 -0
  797. package/dist/surfaces/cli/sysexits.mjs.map +1 -0
  798. package/dist/surfaces/tui/app.mjs +104 -0
  799. package/dist/surfaces/tui/app.mjs.map +1 -0
  800. package/dist/surfaces/tui/dashboard.mjs +261 -0
  801. package/dist/surfaces/tui/dashboard.mjs.map +1 -0
  802. package/dist/surfaces/tui/display-derivation.mjs +395 -0
  803. package/dist/surfaces/tui/display-derivation.mjs.map +1 -0
  804. package/dist/surfaces/tui/errors.mjs +11 -0
  805. package/dist/surfaces/tui/errors.mjs.map +1 -0
  806. package/dist/surfaces/tui/event-log.mjs +155 -0
  807. package/dist/surfaces/tui/event-log.mjs.map +1 -0
  808. package/dist/surfaces/tui/heartbeat.mjs +33 -0
  809. package/dist/surfaces/tui/heartbeat.mjs.map +1 -0
  810. package/dist/surfaces/tui/index.mjs +50 -0
  811. package/dist/surfaces/tui/index.mjs.map +1 -0
  812. package/dist/surfaces/tui/input.mjs +104 -0
  813. package/dist/surfaces/tui/input.mjs.map +1 -0
  814. package/dist/surfaces/tui/mode-detect.mjs +32 -0
  815. package/dist/surfaces/tui/mode-detect.mjs.map +1 -0
  816. package/dist/surfaces/tui/mount-ink.mjs +31 -0
  817. package/dist/surfaces/tui/mount-ink.mjs.map +1 -0
  818. package/dist/surfaces/tui/plain-renderer.mjs +170 -0
  819. package/dist/surfaces/tui/plain-renderer.mjs.map +1 -0
  820. package/dist/surfaces/tui/resource-table.mjs +507 -0
  821. package/dist/surfaces/tui/resource-table.mjs.map +1 -0
  822. package/images/_shared/signal-forward.sh +77 -0
  823. package/images/postgres/Dockerfile +32 -0
  824. package/images/seal/Dockerfile +68 -0
  825. package/images/seal/entrypoint.sh +65 -0
  826. package/images/sui/Dockerfile +73 -0
  827. package/images/sui/entrypoint.sh +244 -0
  828. package/images/sui-fork/Dockerfile +53 -0
  829. package/images/sui-fork/entrypoint.sh +51 -0
  830. package/images/walrus/Dockerfile +122 -0
  831. package/images/walrus/deploy-walrus.sh +305 -0
  832. package/images/walrus/run-walrus.sh +53 -0
  833. package/package.json +94 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"routable.mjs","names":[],"sources":["../../../src/plugins/seal/routable.ts"],"sourcesContent":["// Seal plugin — Routable contribution.\n//\n// Distilled-doc invariant #5: the seal port (2024) is INTENTIONALLY\n// shared across stacks. Traefik dispatches by Host: header from the\n// well-known `seal-key-server` entrypoint. No host-port publish —\n// two stacks of the same app coexist on the same well-known port.\n//\n// The substrate's router (architecture §4) mints the hostname from\n// `(app, stack, dispatch-id)`. We provide:\n//\n// - `endpointName` — the well-known string `'seal-key-server'`.\n// - `dispatchId` — `{serviceKey: 'seal:<name>', role: 'key-server'}`.\n// The service key folds the seal instance\n// name so multi-instance stacks (distilled-doc\n// Open Question #7) don't collide.\n// - `upstream` — container kind; the substrate resolves the\n// container name from the lifecycle row.\n// - `cors: true` — the @mysten/seal SDK's fetch calls require\n// CORS allowance (distilled doc: localnet\n// SDK browser flow).\n//\n// Distilled-doc invariant #1: the URL the router publishes for this\n// routable decl MUST equal the URL we register on chain. The\n// plugin's acquire body reads the router's published URL ONCE\n// and threads the same value into the Move register call.\n\nimport type { DispatchId, EntrypointDecl, RoutableDecl } from '../../contracts/routable.ts';\n\n/** Well-known endpoint name for the seal key-server. Conventional\n * router entrypoint `'seal-key-server'` on port 2024. */\nexport const SEAL_KEY_SERVER_ENDPOINT_NAME = 'seal-key-server' as const;\nexport const SEAL_KEY_SERVER_ROUTE_ROLE = 'key-server' as const;\nexport const DEFAULT_KEY_SERVER_PORT = 2024 as const;\n\nexport const SEAL_ENTRYPOINTS: ReadonlyArray<EntrypointDecl> = [\n\t{ name: SEAL_KEY_SERVER_ENDPOINT_NAME, port: DEFAULT_KEY_SERVER_PORT, protocol: 'http' },\n];\n\nconst DEFAULT_STACK = 'main';\n\nconst normalizeRouteSegment = (raw: string): string => raw.toLowerCase().replace(/\\./g, '-');\n\n/** Build the DispatchId for a seal instance. The service key\n * encodes the instance name so multi-instance seal in the same\n * stack mints distinct dispatch files.\n *\n * Note: distilled-doc Open Question #7 — multi-instance seal is\n * structurally supported but untested. The two routable decls\n * would both claim the `'seal-key-server'` entrypoint and the\n * same `key-server.<stack>.<app>.localhost` hostname. Until v2\n * plans canonicalize multi-instance routing, treat one-seal-per-stack\n * as the safe default. */\nexport const buildSealDispatchId = (name: string): DispatchId => ({\n\tserviceKey: `seal:${name}`,\n\trole: SEAL_KEY_SERVER_ROUTE_ROLE,\n});\n\nexport const buildSealKeyServerPublicRoute = (inputs: {\n\treadonly app: string;\n\treadonly stack: string;\n\treadonly port: number;\n}): { readonly hostname: string; readonly url: string } => {\n\tconst role = normalizeRouteSegment(SEAL_KEY_SERVER_ROUTE_ROLE);\n\tconst app = normalizeRouteSegment(inputs.app);\n\tconst stack = normalizeRouteSegment(inputs.stack);\n\tconst hostname =\n\t\tstack === DEFAULT_STACK ? `${role}.${app}.localhost` : `${role}.${stack}.${app}.localhost`;\n\treturn {\n\t\thostname,\n\t\turl: `http://${hostname}:${inputs.port}`,\n\t};\n};\n\n/** Build the Routable contribution. The substrate's router\n * orchestrator consumes this; the actual hostname / URL minting\n * happens there (architecture: routes-by-key, no hardcoded\n * service hostnames in router code). */\nexport const makeSealRoutable = (inputs: {\n\treadonly name: string;\n\treadonly containerName: string;\n}): RoutableDecl => ({\n\tkind: 'routable',\n\tendpointName: SEAL_KEY_SERVER_ENDPOINT_NAME,\n\tdispatchId: buildSealDispatchId(inputs.name),\n\tupstream: {\n\t\ttype: 'container',\n\t\tcontainerName: inputs.containerName,\n\t\tcontainerPort: DEFAULT_KEY_SERVER_PORT,\n\t},\n\tcors: true,\n\twireProtocol: 'http',\n});\n\n/** Known-deployment modes do NOT route through the local router —\n * the URL points at a remote endpoint (Mysten's testnet key\n * server). We expose a sentinel routable that the orchestrator\n * skips (substrate-blind: the orchestrator filters by upstream\n * type, not by service name). For now, known modes return `null`\n * from this builder. */\nexport const KNOWN_MODE_ROUTABLE: null = null;\n"],"mappings":";;;AA8BA,MAAa,gCAAgC;AAC7C,MAAa,6BAA6B;AAC1C,MAAa,0BAA0B;AAEvC,MAAa,mBAAkD,CAC9D;CAAE,MAAM;CAA+B,MAAM;CAAyB,UAAU;CAAQ,CACxF;AAED,MAAM,gBAAgB;AAEtB,MAAM,yBAAyB,QAAwB,IAAI,aAAa,CAAC,QAAQ,OAAO,IAAI;;;;;;;;;;;AAY5F,MAAa,uBAAuB,UAA8B;CACjE,YAAY,QAAQ;CACpB,MAAM;CACN;AAED,MAAa,iCAAiC,WAIa;CAC1D,MAAM,OAAO,sBAAsB,2BAA2B;CAC9D,MAAM,MAAM,sBAAsB,OAAO,IAAI;CAC7C,MAAM,QAAQ,sBAAsB,OAAO,MAAM;CACjD,MAAM,WACL,UAAU,gBAAgB,GAAG,KAAK,GAAG,IAAI,cAAc,GAAG,KAAK,GAAG,MAAM,GAAG,IAAI;AAChF,QAAO;EACN;EACA,KAAK,UAAU,SAAS,GAAG,OAAO;EAClC;;;;;;AAOF,MAAa,oBAAoB,YAGZ;CACpB,MAAM;CACN,cAAc;CACd,YAAY,oBAAoB,OAAO,KAAK;CAC5C,UAAU;EACT,MAAM;EACN,eAAe,OAAO;EACtB,eAAe;EACf;CACD,MAAM;CACN,cAAc;CACd"}
@@ -0,0 +1,17 @@
1
+ import { acquireLive } from "./mode/live.mjs";
2
+ import { acquireForkKnown } from "./mode/fork-known.mjs";
3
+ import "effect";
4
+ //#region src/plugins/seal/service.ts
5
+ /** Dispatch on the known-mode discriminator. The publisher argument
6
+ * is unused by the known paths (no on-chain artifact produce); it's
7
+ * accepted for shape uniformity with the local-keygen entry point. */
8
+ const bootSealService = (_publisher, opts) => {
9
+ switch (opts.mode) {
10
+ case "live": return acquireLive(opts);
11
+ case "fork-known": return acquireForkKnown(opts);
12
+ }
13
+ };
14
+ //#endregion
15
+ export { bootSealService };
16
+
17
+ //# sourceMappingURL=service.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service.mjs","names":[],"sources":["../../../src/plugins/seal/service.ts"],"sourcesContent":["// Seal plugin — known-mode dispatch (live + fork-known).\n//\n// Local-keygen mode is dispatched directly from the plugin barrel\n// (`index.ts`) via `bootLocalKeygen` because it needs a\n// `LocalKeygenDeps` bundle (ContainerRuntime, paths, identity, …)\n// composed from substrate services. This file only routes the two\n// pure-value-producing modes that need no substrate plumbing.\n\nimport { Effect, type Scope } from 'effect';\n\nimport type {\n\tArtifactPublishError,\n\tArtifactPublisher,\n} from '../../primitives/artifact-publisher.ts';\nimport type { SealAnyError } from './errors.ts';\nimport { acquireForkKnown, type ForkKnownInputs } from './mode/fork-known.ts';\nimport { acquireLive, type LiveModeInputs } from './mode/live.ts';\nimport type { SealKnownResolved } from './registry-publish.ts';\n\n/** Known-mode discriminator — live + fork-known only. */\nexport type SealMode =\n\t| ({ readonly mode: 'live' } & LiveModeInputs)\n\t| ({ readonly mode: 'fork-known' } & ForkKnownInputs);\n\nexport type SealKnownBootResult = SealKnownResolved;\n\n/** Dispatch on the known-mode discriminator. The publisher argument\n * is unused by the known paths (no on-chain artifact produce); it's\n * accepted for shape uniformity with the local-keygen entry point. */\nexport const bootSealService = (\n\t_publisher: ArtifactPublisher,\n\topts: SealMode,\n): Effect.Effect<SealKnownBootResult, SealAnyError | ArtifactPublishError, Scope.Scope> => {\n\tswitch (opts.mode) {\n\t\tcase 'live':\n\t\t\treturn acquireLive(opts);\n\t\tcase 'fork-known':\n\t\t\treturn acquireForkKnown(opts);\n\t}\n};\n"],"mappings":";;;;;;;AA6BA,MAAa,mBACZ,YACA,SAC0F;AAC1F,SAAQ,KAAK,MAAb;EACC,KAAK,OACJ,QAAO,YAAY,KAAK;EACzB,KAAK,aACJ,QAAO,iBAAiB,KAAK"}
@@ -0,0 +1,51 @@
1
+ import { Effect } from "effect";
2
+ //#region src/plugins/seal/snapshot.ts
3
+ /** Build the Snapshotable contribution for the local-keygen mode.
4
+ *
5
+ * Inputs threaded by the barrel from acquire-time substrate
6
+ * identity. Distilled-doc invariant #4: `master-key.env` MUST
7
+ * survive snapshot. `missingTolerance: 'fatal'` because the file's
8
+ * absence on restore would silently re-derive a fresh keypair
9
+ * against a stale on-chain public key. */
10
+ const makeLocalKeygenSnapshotable = (inputs) => {
11
+ return {
12
+ kind: "snapshotable",
13
+ subtrees: [`seal`],
14
+ managedContainers: [{
15
+ app: inputs.app,
16
+ stack: inputs.stack,
17
+ plugin: "seal",
18
+ role: "key-server"
19
+ }],
20
+ quiesce: Effect.void,
21
+ preRestore: Effect.succeed({
22
+ kind: "seal",
23
+ name: inputs.name
24
+ }),
25
+ postRestore: Effect.void,
26
+ missingTolerance: "fatal",
27
+ secretMaterial: true
28
+ };
29
+ };
30
+ /** Build the Snapshotable contribution for the known-deployment
31
+ * modes (live / fork-known). No managed container, no on-disk
32
+ * state — we only need the orchestrator to see the plugin's
33
+ * identity for the manifest sidecar.
34
+ *
35
+ * `missingTolerance: 'fine'` because the known-deployment mode
36
+ * has no host-side state to lose. */
37
+ const makeKnownSnapshotable = (inputs) => ({
38
+ kind: "snapshotable",
39
+ subtrees: [],
40
+ missingTolerance: "fine",
41
+ preRestore: Effect.succeed({
42
+ kind: "seal",
43
+ name: inputs.name
44
+ }),
45
+ postRestore: Effect.void,
46
+ secretMaterial: false
47
+ });
48
+ //#endregion
49
+ export { makeKnownSnapshotable, makeLocalKeygenSnapshotable };
50
+
51
+ //# sourceMappingURL=snapshot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"snapshot.mjs","names":[],"sources":["../../../src/plugins/seal/snapshot.ts"],"sourcesContent":["// Seal plugin — Snapshotable contribution.\n//\n// Distilled-doc §\"What survives snapshot\":\n//\n// - `runtime/seal/master-key.env` (0o600 — SECRET MATERIAL)\n// - `runtime/seal/local-keygen-state.v1.json` (public key metadata)\n// - `runtime/seal/key-server-config.yaml`\n// - State-store entries (under runtime/state-store/, auto-captured\n// by the substrate — we don't declare a subtree for those).\n// - Managed container — labeled tuple drives the docker commit +\n// save path.\n//\n// Distilled-doc invariant: the master-key file is the LOAD-BEARING\n// piece — losing it on resume means the on-chain `KeyServer.url`'s\n// public key would mismatch a fresh keygen. The substrate's\n// `secretMaterial: true` flag drives the mode-bit round-trip (0o600\n// inside 0o700 parent preserved through the snapshot tar).\n//\n// Architecture: the orchestrator is service-name-blind — it walks\n// the Snapshotable decls, sees `runtime/seal/` as just a subtree\n// path, and treats the secret flag as an opaque mode-bit directive.\n\nimport { Effect } from 'effect';\n\nimport type { ContainerLabelTuple, SnapshotableDecl } from '../../contracts/snapshotable.ts';\n\n/** Build the Snapshotable contribution for the local-keygen mode.\n *\n * Inputs threaded by the barrel from acquire-time substrate\n * identity. Distilled-doc invariant #4: `master-key.env` MUST\n * survive snapshot. `missingTolerance: 'fatal'` because the file's\n * absence on restore would silently re-derive a fresh keypair\n * against a stale on-chain public key. */\nexport const makeLocalKeygenSnapshotable = (inputs: {\n\treadonly name: string;\n\treadonly app: string;\n\treadonly stack: string;\n}): SnapshotableDecl => {\n\tconst labelTuple: ContainerLabelTuple = {\n\t\tapp: inputs.app,\n\t\tstack: inputs.stack,\n\t\tplugin: 'seal',\n\t\trole: 'key-server',\n\t};\n\treturn {\n\t\tkind: 'snapshotable',\n\t\t// Subtree under runtime/. The substrate roots this under the\n\t\t// per-stack runtime-dir; `seal` is plugin-blind from the\n\t\t// orchestrator's POV (just a path segment).\n\t\tsubtrees: [`seal`],\n\t\tmanagedContainers: [labelTuple],\n\t\t// The key-server's Docker stop grace is owned by key-server.ts.\n\t\tquiesce: Effect.void,\n\t\tpreRestore: Effect.succeed({\n\t\t\tkind: 'seal' as const,\n\t\t\tname: inputs.name,\n\t\t}),\n\t\tpostRestore: Effect.void,\n\t\tmissingTolerance: 'fatal',\n\t\t// Distilled-doc §Hard requirements #2 + #4: master-key.env is\n\t\t// secret material (0o600). The substrate's tar handler\n\t\t// preserves the mode bits on round-trip.\n\t\tsecretMaterial: true,\n\t};\n};\n\n/** Build the Snapshotable contribution for the known-deployment\n * modes (live / fork-known). No managed container, no on-disk\n * state — we only need the orchestrator to see the plugin's\n * identity for the manifest sidecar.\n *\n * `missingTolerance: 'fine'` because the known-deployment mode\n * has no host-side state to lose. */\nexport const makeKnownSnapshotable = (inputs: { readonly name: string }): SnapshotableDecl => ({\n\tkind: 'snapshotable',\n\tsubtrees: [],\n\tmissingTolerance: 'fine',\n\tpreRestore: Effect.succeed({ kind: 'seal' as const, name: inputs.name }),\n\tpostRestore: Effect.void,\n\tsecretMaterial: false,\n});\n"],"mappings":";;;;;;;;;AAiCA,MAAa,+BAA+B,WAIpB;AAOvB,QAAO;EACN,MAAM;EAIN,UAAU,CAAC,OAAO;EAClB,mBAAmB,CAAC;GAXpB,KAAK,OAAO;GACZ,OAAO,OAAO;GACd,QAAQ;GACR,MAAM;GAQwB,CAAC;EAE/B,SAAS,OAAO;EAChB,YAAY,OAAO,QAAQ;GAC1B,MAAM;GACN,MAAM,OAAO;GACb,CAAC;EACF,aAAa,OAAO;EACpB,kBAAkB;EAIlB,gBAAgB;EAChB;;;;;;;;;AAUF,MAAa,yBAAyB,YAAyD;CAC9F,MAAM;CACN,UAAU,EAAE;CACZ,kBAAkB;CAClB,YAAY,OAAO,QAAQ;EAAE,MAAM;EAAiB,MAAM,OAAO;EAAM,CAAC;CACxE,aAAa,OAAO;CACpB,gBAAgB;CAChB"}
@@ -0,0 +1,45 @@
1
+ import { SpanAttr } from "../../substrate/runtime/observability/spans.mjs";
2
+ import { expectPositiveFiniteNumber } from "../../substrate/runtime/config-validation.mjs";
3
+ import { suiConfigError } from "./errors.mjs";
4
+ import { Effect, Schedule } from "effect";
5
+ //#region src/plugins/sui/auto-tick.ts
6
+ /** Default cadence when caller passes `autoTick: true`. */
7
+ const DEFAULT_AUTO_TICK_INTERVAL_MS = 1e3;
8
+ /** Resolve the public option to a numeric interval. Returns
9
+ * `undefined` when auto-tick is OFF. Throws on a misconfigured
10
+ * option (0 / negative / non-finite) — the substrate's
11
+ * acquire-time validation catches this before any I/O. */
12
+ const resolveAutoTickIntervalMs = (option) => {
13
+ if (option === void 0 || option === false) return void 0;
14
+ if (option === true) return DEFAULT_AUTO_TICK_INTERVAL_MS;
15
+ return expectPositiveFiniteNumber(option.intervalMs, {
16
+ field: "autoTick.intervalMs",
17
+ message: `sui: autoTick.intervalMs must be a positive finite number (got ${String(option.intervalMs)})`,
18
+ mkError: suiConfigError
19
+ });
20
+ };
21
+ /**
22
+ * Fork a scope-bound fiber that calls `advanceClock(intervalMs)` on
23
+ * a `Schedule.spaced(intervalMs)` cadence. The fiber dies on the
24
+ * surrounding scope's close (wipe / restart / Ctrl-C).
25
+ *
26
+ * Returns the fiber handle. Today's code discards the handle — the
27
+ * distilled doc flags a designed-for-but-not-landed re-config path
28
+ * (`engine/sui-fork/control.ts` opportunity). We keep the handle
29
+ * returned so a future cadence-change surface has a join point.
30
+ */
31
+ const runAutoTickClock = (advancer, intervalMs) => Effect.gen(function* () {
32
+ return yield* advancer.advanceClock(intervalMs).pipe(Effect.catch((err) => Effect.logWarning("sui auto-tick advance failed; next tick will retry").pipe(Effect.annotateLogs({
33
+ [SpanAttr.suiAutoTickIntervalMs]: intervalMs,
34
+ [SpanAttr.phase]: err.phase,
35
+ [SpanAttr.errorMessage]: err.message
36
+ })))).pipe(Effect.repeat(Schedule.spaced(`${intervalMs} millis`)), Effect.forkScoped);
37
+ });
38
+ /** Build a no-op advancer for local mode. Localnet's validator
39
+ * drives consensus on its own; the auto-tick fiber surface exists
40
+ * for symmetry but doesn't have anything to advance. */
41
+ const noopClockAdvancer = { advanceClock: () => Effect.void };
42
+ //#endregion
43
+ export { noopClockAdvancer, resolveAutoTickIntervalMs, runAutoTickClock };
44
+
45
+ //# sourceMappingURL=auto-tick.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auto-tick.mjs","names":[],"sources":["../../../src/plugins/sui/auto-tick.ts"],"sourcesContent":["// Auto-tick clock — local-mode-only.\n//\n// Architecture invariant: \"Auto-tick is local-mode-only\" — the\n// public option is exposed only on fork (where it advances the\n// fork binary's clock + checkpoint) AND local (where it nudges\n// localnet's consensus to commit pending txs in tests that don't\n// produce traffic).\n//\n// The fiber is `forkScoped` against the plugin's acquire scope:\n// teardown happens automatically on wipe/restart/Ctrl-C. Failure\n// policy is **log-warn-and-continue** — a single advance-clock\n// RPC failure must not break the supervisor.\n\nimport { Effect, Schedule, type Fiber, type Scope } from 'effect';\n\nimport { expectPositiveFiniteNumber } from '../../substrate/runtime/config-validation.ts';\nimport { SpanAttr } from '../../substrate/runtime/observability/spans.ts';\nimport { suiConfigError } from './errors.ts';\nimport type { SuiPluginError } from './errors.ts';\n\n/** Public knob shape mirroring the user-facing API. */\nexport type AutoTickOption = boolean | { readonly intervalMs: number };\n\n/** Default cadence when caller passes `autoTick: true`. */\nexport const DEFAULT_AUTO_TICK_INTERVAL_MS = 1000;\n\n/** Resolve the public option to a numeric interval. Returns\n * `undefined` when auto-tick is OFF. Throws on a misconfigured\n * option (0 / negative / non-finite) — the substrate's\n * acquire-time validation catches this before any I/O. */\nexport const resolveAutoTickIntervalMs = (option?: AutoTickOption): number | undefined => {\n\tif (option === undefined || option === false) return undefined;\n\tif (option === true) return DEFAULT_AUTO_TICK_INTERVAL_MS;\n\treturn expectPositiveFiniteNumber(option.intervalMs, {\n\t\tfield: 'autoTick.intervalMs',\n\t\tmessage: `sui: autoTick.intervalMs must be a positive finite number (got ${String(\n\t\t\toption.intervalMs,\n\t\t)})`,\n\t\tmkError: suiConfigError,\n\t});\n};\n\n/** Plugin-internal shim — the minimal admin surface the auto-tick\n * fiber needs. Local-mode wires this to a no-op (localnet's\n * validator advances its own clock); fork-mode wires it to the\n * `ForkingService.advanceClock` gRPC method. Stub: the concrete\n * gRPC binding lands when the Mysten Sui SDK is introduced. */\nexport interface ClockAdvancer {\n\treadonly advanceClock: (intervalMs: number) => Effect.Effect<void, SuiPluginError>;\n}\n\n/**\n * Fork a scope-bound fiber that calls `advanceClock(intervalMs)` on\n * a `Schedule.spaced(intervalMs)` cadence. The fiber dies on the\n * surrounding scope's close (wipe / restart / Ctrl-C).\n *\n * Returns the fiber handle. Today's code discards the handle — the\n * distilled doc flags a designed-for-but-not-landed re-config path\n * (`engine/sui-fork/control.ts` opportunity). We keep the handle\n * returned so a future cadence-change surface has a join point.\n */\nexport const runAutoTickClock = (\n\tadvancer: ClockAdvancer,\n\tintervalMs: number,\n): Effect.Effect<Fiber.Fiber<void>, never, Scope.Scope> =>\n\tEffect.gen(function* () {\n\t\tconst tick = advancer.advanceClock(intervalMs).pipe(\n\t\t\tEffect.catch((err) =>\n\t\t\t\tEffect.logWarning('sui auto-tick advance failed; next tick will retry').pipe(\n\t\t\t\t\tEffect.annotateLogs({\n\t\t\t\t\t\t[SpanAttr.suiAutoTickIntervalMs]: intervalMs,\n\t\t\t\t\t\t[SpanAttr.phase]: err.phase,\n\t\t\t\t\t\t[SpanAttr.errorMessage]: err.message,\n\t\t\t\t\t}),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\tconst fiber = yield* tick.pipe(\n\t\t\tEffect.repeat(Schedule.spaced(`${intervalMs} millis`)),\n\t\t\tEffect.forkScoped,\n\t\t);\n\t\treturn fiber as Fiber.Fiber<void>;\n\t});\n\n/** Build a no-op advancer for local mode. Localnet's validator\n * drives consensus on its own; the auto-tick fiber surface exists\n * for symmetry but doesn't have anything to advance. */\nexport const noopClockAdvancer: ClockAdvancer = {\n\tadvanceClock: () => Effect.void as Effect.Effect<void, SuiPluginError>,\n};\n"],"mappings":";;;;;;AAwBA,MAAa,gCAAgC;;;;;AAM7C,MAAa,6BAA6B,WAAgD;AACzF,KAAI,WAAW,KAAA,KAAa,WAAW,MAAO,QAAO,KAAA;AACrD,KAAI,WAAW,KAAM,QAAO;AAC5B,QAAO,2BAA2B,OAAO,YAAY;EACpD,OAAO;EACP,SAAS,kEAAkE,OAC1E,OAAO,WACP,CAAC;EACF,SAAS;EACT,CAAC;;;;;;;;;;;;AAsBH,MAAa,oBACZ,UACA,eAEA,OAAO,IAAI,aAAa;AAgBvB,QAAO,OAfM,SAAS,aAAa,WAAW,CAAC,KAC9C,OAAO,OAAO,QACb,OAAO,WAAW,qDAAqD,CAAC,KACvE,OAAO,aAAa;GAClB,SAAS,wBAAwB;GACjC,SAAS,QAAQ,IAAI;GACrB,SAAS,eAAe,IAAI;EAC7B,CAAC,CACF,CACD,CAEuB,CAAC,KACzB,OAAO,OAAO,SAAS,OAAO,GAAG,WAAW,SAAS,CAAC,EACtD,OAAO,WACP;EAEA;;;;AAKH,MAAa,oBAAmC,EAC/C,oBAAoB,OAAO,MAC3B"}
@@ -0,0 +1 @@
1
+ import { Effect, Scope } from "effect";
@@ -0,0 +1,85 @@
1
+ import { Schema } from "effect";
2
+
3
+ //#region src/plugins/sui/chain-probe.d.ts
4
+ /**
5
+ * Sui's chain-key shape — discriminated so the probe can dispatch
6
+ * between object reads, tx reads, and the (forthcoming) batch
7
+ * variant on one method.
8
+ */
9
+ type SuiProbeKey = {
10
+ readonly kind: 'object';
11
+ readonly objectId: string;
12
+ } | {
13
+ readonly kind: 'transaction';
14
+ readonly digest: string;
15
+ };
16
+ /** Plugin-internal SDK shim — the type the plugin's acquire body
17
+ * hands to the probe factory + the account's sign/execute closure.
18
+ * Kept narrow so we don't pull `@mysten/sui` types into the substrate.
19
+ *
20
+ * Exposes the four surfaces consumers actually use:
21
+ *
22
+ * - `getObject` / `getTransaction` — the lenient chain probe.
23
+ * - `executeTransaction` — the account plugin's submit path
24
+ * (txBytes + caller-signed signatures).
25
+ * - `waitForTransaction` — post-submit finality wait.
26
+ *
27
+ * Plus an OPAQUE `client` field — the underlying `SuiGrpcClient`
28
+ * reference. The package plugin's publish-tx builder hands this to
29
+ * `Transaction.build({ client })` (the SDK resolves gas + object
30
+ * versions through it). We type as `unknown` so the substrate stays
31
+ * free of a direct `@mysten/sui/client` type import; the consumer
32
+ * casts at the boundary (mirrors the same opacity decision in the
33
+ * Coin plugin's `MintSdkShim.client`). */
34
+ interface SuiSdkShim {
35
+ readonly core: {
36
+ readonly getObject: (args: {
37
+ readonly objectId: string;
38
+ readonly include?: {
39
+ readonly content?: boolean;
40
+ readonly json?: boolean;
41
+ };
42
+ }) => Promise<unknown>;
43
+ readonly getTransaction: (args: {
44
+ readonly digest: string;
45
+ }) => Promise<unknown>;
46
+ readonly getBalance: (args: {
47
+ readonly owner: string;
48
+ readonly coinType?: string;
49
+ }) => Promise<unknown>;
50
+ readonly listCoins: (args: {
51
+ readonly owner: string;
52
+ readonly coinType?: string;
53
+ readonly limit?: number;
54
+ readonly cursor?: string | null;
55
+ }) => Promise<{
56
+ readonly objects: ReadonlyArray<{
57
+ readonly objectId: string;
58
+ readonly version: string;
59
+ readonly digest: string;
60
+ readonly balance: string;
61
+ }>;
62
+ readonly hasNextPage: boolean;
63
+ readonly cursor: string | null;
64
+ }>;
65
+ readonly executeTransaction: (args: {
66
+ readonly transaction: Uint8Array;
67
+ readonly signatures: ReadonlyArray<string>;
68
+ readonly include?: {
69
+ readonly effects?: boolean;
70
+ readonly objectTypes?: boolean;
71
+ };
72
+ }) => Promise<unknown>;
73
+ readonly waitForTransaction: (args: {
74
+ readonly digest: string;
75
+ readonly timeout?: number;
76
+ }) => Promise<unknown>;
77
+ };
78
+ /** Opaque client reference for `Transaction.build({ client })`.
79
+ * The Sui barrel wires the resolved `SuiGrpcClient` through; the
80
+ * shim layer doesn't type-narrow it (mirrors `MintSdkShim.client`). */
81
+ readonly client: unknown;
82
+ }
83
+ //#endregion
84
+ export { SuiProbeKey, SuiSdkShim };
85
+ //# sourceMappingURL=chain-probe.d.mts.map
@@ -0,0 +1,104 @@
1
+ import { decodeUnknown } from "../../substrate/runtime/runtime-decode.mjs";
2
+ import { Effect, Schema } from "effect";
3
+ //#region src/plugins/sui/chain-probe.ts
4
+ /** Validated subset of `client.core.getObject(...).object`. We
5
+ * narrow to the fields verify probes actually consult — the SDK
6
+ * exposes more (digest, content, json, display) but those are
7
+ * out of scope here. */
8
+ const ObjectOwnerSchema = Schema.Union([
9
+ Schema.Struct({
10
+ $kind: Schema.Literal("AddressOwner"),
11
+ AddressOwner: Schema.String
12
+ }),
13
+ Schema.Struct({
14
+ $kind: Schema.Literal("Shared"),
15
+ Shared: Schema.Struct({ initialSharedVersion: Schema.String })
16
+ }),
17
+ Schema.Struct({
18
+ $kind: Schema.Literal("Immutable"),
19
+ Immutable: Schema.Literal(true)
20
+ }),
21
+ Schema.Struct({
22
+ $kind: Schema.Literal("ConsensusAddressOwner"),
23
+ ConsensusAddressOwner: Schema.Unknown
24
+ }),
25
+ Schema.Struct({
26
+ $kind: Schema.Literal("Parent"),
27
+ Parent: Schema.Unknown
28
+ }),
29
+ Schema.Struct({
30
+ $kind: Schema.Literal("Unknown"),
31
+ Unknown: Schema.Unknown
32
+ })
33
+ ]);
34
+ /** Validated SDK response shape: `{ object: { objectId, type, ... } }`.
35
+ * Substrate-redesign note: today's code validates `version` as a
36
+ * string but it's semantically a bigint — branded type recommendation
37
+ * carried in the Opportunities section. */
38
+ const SuiObjectShapeSchema = Schema.Struct({
39
+ objectId: Schema.String,
40
+ type: Schema.String,
41
+ version: Schema.String,
42
+ owner: ObjectOwnerSchema
43
+ });
44
+ Schema.Struct({ object: SuiObjectShapeSchema });
45
+ /** Construct the chain-probe instance for a resolved Sui client +
46
+ * chain id. The result implements the contract's `ChainProbe<Key>`
47
+ * shape; the Sui plugin emits this via a StrategyContributorDecl
48
+ * keyed by `chain-probe:<chainId>`. */
49
+ const makeSuiChainProbe = (sdk, chain) => ({ get: (key, schema, mode) => Effect.gen(function* () {
50
+ const raw = yield* Effect.tryPromise({
51
+ try: () => key.kind === "object" ? sdk.core.getObject({ objectId: key.objectId }) : sdk.core.getTransaction({ digest: key.digest }),
52
+ catch: (cause) => ({
53
+ _tag: "ChainProbeError",
54
+ reason: isNotFound(cause) ? "not-found" : "transient",
55
+ chain,
56
+ detail: stringifyCause(cause)
57
+ })
58
+ }).pipe(Effect.catch((err) => mode === "lenient" && (err.reason === "not-found" || err.reason === "transient") ? Effect.succeed(null) : Effect.fail(err)));
59
+ if (raw === null) return null;
60
+ const payload = projectProbePayload(key, raw);
61
+ if (payload === null) return null;
62
+ return yield* decodeUnknown(schema, payload, {
63
+ source: `chain probe ${chain}`,
64
+ mkError: (issue) => ({
65
+ _tag: "ChainProbeError",
66
+ reason: "decode-failed",
67
+ chain,
68
+ detail: stringifyCause(issue.cause ?? issue)
69
+ })
70
+ });
71
+ }) });
72
+ const projectProbePayload = (key, raw) => {
73
+ if (key.kind === "transaction") return projectTransactionPayload(raw);
74
+ if (typeof raw !== "object" || raw === null || !("object" in raw)) return raw;
75
+ return raw.object ?? null;
76
+ };
77
+ const projectTransactionPayload = (raw) => {
78
+ if (typeof raw !== "object" || raw === null) return raw;
79
+ const envelope = raw;
80
+ if (envelope.$kind === "Transaction") return envelope.Transaction ?? null;
81
+ if (envelope.$kind === "FailedTransaction") return envelope.FailedTransaction ?? null;
82
+ return raw;
83
+ };
84
+ /** Heuristic: SDK errors carrying "not found" / "Not exist" in
85
+ * the message are treated as not-found; everything else is
86
+ * transient. The substrate's lenient-retry profile re-runs the
87
+ * probe on a transient bucket; not-found is terminal. */
88
+ const isNotFound = (cause) => {
89
+ const msg = cause?.message?.toLowerCase() ?? "";
90
+ return msg.includes("not found") || msg.includes("does not exist") || msg.includes("no such object") || msg.includes("not exist");
91
+ };
92
+ const stringifyCause = (cause) => {
93
+ if (cause instanceof Error) return cause.message;
94
+ if (typeof cause === "string") return cause;
95
+ try {
96
+ return JSON.stringify(cause);
97
+ } catch {
98
+ return String(cause);
99
+ }
100
+ };
101
+ //#endregion
102
+ export { makeSuiChainProbe };
103
+
104
+ //# sourceMappingURL=chain-probe.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chain-probe.mjs","names":[],"sources":["../../../src/plugins/sui/chain-probe.ts"],"sourcesContent":["// Sui plugin — ChainProbe capability implementation.\n//\n// Architecture §9: ChainProbe is a contract, NOT a primitive. Sui\n// provides the only in-tree implementation; the substrate dispatches\n// to it via the StrategyContributor registry under\n// `chain-probe:<chainId>`.\n//\n// Lenient mode: returns null for both \"not found\" AND transient RPC\n// failure — verify pipelines re-derive on the next cycle rather than\n// fail boot. Strict mode: distinguishes via tagged error.\n//\n// Why lenient is the default in this plugin's wiring: artifact publisher verify is\n// the dominant consumer; artifact publisher's lenient-retry profile (15 attempts,\n// 90s budget) is calibrated against lenient semantics. A strict\n// surface exists for explicit \"I want to know if the chain is\n// reachable\" callers (the doctor command, debugging).\n\nimport { Effect, Schema } from 'effect';\n\nimport type {\n\tChainProbe,\n\tChainProbeError,\n\tChainProbeMode,\n\tChainProbeSchema,\n} from '../../contracts/chain-probe.ts';\nimport { decodeUnknown } from '../../substrate/runtime/runtime-decode.ts';\n\n/**\n * Sui's chain-key shape — discriminated so the probe can dispatch\n * between object reads, tx reads, and the (forthcoming) batch\n * variant on one method.\n */\nexport type SuiProbeKey =\n\t| { readonly kind: 'object'; readonly objectId: string }\n\t| { readonly kind: 'transaction'; readonly digest: string };\n\n/** Validated subset of `client.core.getObject(...).object`. We\n * narrow to the fields verify probes actually consult — the SDK\n * exposes more (digest, content, json, display) but those are\n * out of scope here. */\nconst ObjectOwnerSchema = Schema.Union([\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('AddressOwner'),\n\t\tAddressOwner: Schema.String,\n\t}),\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('Shared'),\n\t\tShared: Schema.Struct({ initialSharedVersion: Schema.String }),\n\t}),\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('Immutable'),\n\t\tImmutable: Schema.Literal(true),\n\t}),\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('ConsensusAddressOwner'),\n\t\tConsensusAddressOwner: Schema.Unknown,\n\t}),\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('Parent'),\n\t\tParent: Schema.Unknown,\n\t}),\n\tSchema.Struct({\n\t\t$kind: Schema.Literal('Unknown'),\n\t\tUnknown: Schema.Unknown,\n\t}),\n]);\n\n/** Validated SDK response shape: `{ object: { objectId, type, ... } }`.\n * Substrate-redesign note: today's code validates `version` as a\n * string but it's semantically a bigint — branded type recommendation\n * carried in the Opportunities section. */\nexport const SuiObjectShapeSchema = Schema.Struct({\n\tobjectId: Schema.String,\n\ttype: Schema.String,\n\tversion: Schema.String,\n\towner: ObjectOwnerSchema,\n});\n\nexport const SuiGetObjectResponseSchema = Schema.Struct({\n\tobject: SuiObjectShapeSchema,\n});\n\n/** Plugin-internal SDK shim — the type the plugin's acquire body\n * hands to the probe factory + the account's sign/execute closure.\n * Kept narrow so we don't pull `@mysten/sui` types into the substrate.\n *\n * Exposes the four surfaces consumers actually use:\n *\n * - `getObject` / `getTransaction` — the lenient chain probe.\n * - `executeTransaction` — the account plugin's submit path\n * (txBytes + caller-signed signatures).\n * - `waitForTransaction` — post-submit finality wait.\n *\n * Plus an OPAQUE `client` field — the underlying `SuiGrpcClient`\n * reference. The package plugin's publish-tx builder hands this to\n * `Transaction.build({ client })` (the SDK resolves gas + object\n * versions through it). We type as `unknown` so the substrate stays\n * free of a direct `@mysten/sui/client` type import; the consumer\n * casts at the boundary (mirrors the same opacity decision in the\n * Coin plugin's `MintSdkShim.client`). */\nexport interface SuiSdkShim {\n\treadonly core: {\n\t\treadonly getObject: (args: {\n\t\t\treadonly objectId: string;\n\t\t\treadonly include?: {\n\t\t\t\treadonly content?: boolean;\n\t\t\t\treadonly json?: boolean;\n\t\t\t};\n\t\t}) => Promise<unknown>;\n\t\treadonly getTransaction: (args: { readonly digest: string }) => Promise<unknown>;\n\t\treadonly getBalance: (args: {\n\t\t\treadonly owner: string;\n\t\t\treadonly coinType?: string;\n\t\t}) => Promise<unknown>;\n\t\treadonly listCoins: (args: {\n\t\t\treadonly owner: string;\n\t\t\treadonly coinType?: string;\n\t\t\treadonly limit?: number;\n\t\t\treadonly cursor?: string | null;\n\t\t}) => Promise<{\n\t\t\treadonly objects: ReadonlyArray<{\n\t\t\t\treadonly objectId: string;\n\t\t\t\treadonly version: string;\n\t\t\t\treadonly digest: string;\n\t\t\t\treadonly balance: string;\n\t\t\t}>;\n\t\t\treadonly hasNextPage: boolean;\n\t\t\treadonly cursor: string | null;\n\t\t}>;\n\t\treadonly executeTransaction: (args: {\n\t\t\treadonly transaction: Uint8Array;\n\t\t\treadonly signatures: ReadonlyArray<string>;\n\t\t\treadonly include?: {\n\t\t\t\treadonly effects?: boolean;\n\t\t\t\treadonly objectTypes?: boolean;\n\t\t\t};\n\t\t}) => Promise<unknown>;\n\t\treadonly waitForTransaction: (args: {\n\t\t\treadonly digest: string;\n\t\t\treadonly timeout?: number;\n\t\t}) => Promise<unknown>;\n\t};\n\t/** Opaque client reference for `Transaction.build({ client })`.\n\t * The Sui barrel wires the resolved `SuiGrpcClient` through; the\n\t * shim layer doesn't type-narrow it (mirrors `MintSdkShim.client`). */\n\treadonly client: unknown;\n}\n\n/** Construct the chain-probe instance for a resolved Sui client +\n * chain id. The result implements the contract's `ChainProbe<Key>`\n * shape; the Sui plugin emits this via a StrategyContributorDecl\n * keyed by `chain-probe:<chainId>`. */\nexport const makeSuiChainProbe = (sdk: SuiSdkShim, chain: string): ChainProbe<SuiProbeKey> => ({\n\tget: <Shape>(\n\t\tkey: SuiProbeKey,\n\t\tschema: ChainProbeSchema<Shape>,\n\t\tmode: ChainProbeMode,\n\t): Effect.Effect<Shape | null, ChainProbeError> =>\n\t\tEffect.gen(function* () {\n\t\t\tconst raw: unknown = yield* Effect.tryPromise({\n\t\t\t\ttry: () =>\n\t\t\t\t\tkey.kind === 'object'\n\t\t\t\t\t\t? sdk.core.getObject({ objectId: key.objectId })\n\t\t\t\t\t\t: sdk.core.getTransaction({ digest: key.digest }),\n\t\t\t\tcatch: (cause): ChainProbeError => ({\n\t\t\t\t\t_tag: 'ChainProbeError',\n\t\t\t\t\treason: isNotFound(cause) ? 'not-found' : 'transient',\n\t\t\t\t\tchain,\n\t\t\t\t\tdetail: stringifyCause(cause),\n\t\t\t\t}),\n\t\t\t}).pipe(\n\t\t\t\t// Lenient mode coerces both not-found and transient into a\n\t\t\t\t// null result. Strict mode lets the error propagate.\n\t\t\t\tEffect.catch(\n\t\t\t\t\t(err): Effect.Effect<unknown, ChainProbeError> =>\n\t\t\t\t\t\tmode === 'lenient' && (err.reason === 'not-found' || err.reason === 'transient')\n\t\t\t\t\t\t\t? Effect.succeed(null)\n\t\t\t\t\t\t\t: Effect.fail(err),\n\t\t\t\t),\n\t\t\t);\n\t\t\tif (raw === null) return null;\n\t\t\tconst payload = projectProbePayload(key, raw);\n\t\t\tif (payload === null) return null;\n\n\t\t\t// Decode against the caller-supplied Schema. A decode failure\n\t\t\t// is structured (NOT silent undefined) — this is the\n\t\t\t// load-bearing learning from deepbook.\n\t\t\tconst decoded = yield* decodeUnknown(schema, payload, {\n\t\t\t\tsource: `chain probe ${chain}`,\n\t\t\t\tmkError: (issue): ChainProbeError => ({\n\t\t\t\t\t_tag: 'ChainProbeError',\n\t\t\t\t\treason: 'decode-failed',\n\t\t\t\t\tchain,\n\t\t\t\t\tdetail: stringifyCause(issue.cause ?? issue),\n\t\t\t\t}),\n\t\t\t});\n\t\t\treturn decoded;\n\t\t}),\n});\n\nconst projectProbePayload = (key: SuiProbeKey, raw: unknown): unknown | null => {\n\tif (key.kind === 'transaction') return projectTransactionPayload(raw);\n\tif (typeof raw !== 'object' || raw === null || !('object' in raw)) return raw;\n\n\treturn (raw as { readonly object?: unknown }).object ?? null;\n};\n\nconst projectTransactionPayload = (raw: unknown): unknown | null => {\n\tif (typeof raw !== 'object' || raw === null) return raw;\n\tconst envelope = raw as {\n\t\treadonly $kind?: 'Transaction' | 'FailedTransaction';\n\t\treadonly Transaction?: unknown;\n\t\treadonly FailedTransaction?: unknown;\n\t};\n\tif (envelope.$kind === 'Transaction') return envelope.Transaction ?? null;\n\tif (envelope.$kind === 'FailedTransaction') return envelope.FailedTransaction ?? null;\n\treturn raw;\n};\n\n/** Heuristic: SDK errors carrying \"not found\" / \"Not exist\" in\n * the message are treated as not-found; everything else is\n * transient. The substrate's lenient-retry profile re-runs the\n * probe on a transient bucket; not-found is terminal. */\nconst isNotFound = (cause: unknown): boolean => {\n\tconst msg = (cause as { message?: string })?.message?.toLowerCase() ?? '';\n\treturn (\n\t\tmsg.includes('not found') ||\n\t\tmsg.includes('does not exist') ||\n\t\tmsg.includes('no such object') ||\n\t\tmsg.includes('not exist')\n\t);\n};\n\nconst stringifyCause = (cause: unknown): string => {\n\tif (cause instanceof Error) return cause.message;\n\tif (typeof cause === 'string') return cause;\n\ttry {\n\t\treturn JSON.stringify(cause);\n\t} catch {\n\t\treturn String(cause);\n\t}\n};\n"],"mappings":";;;;;;;AAwCA,MAAM,oBAAoB,OAAO,MAAM;CACtC,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,eAAe;EACrC,cAAc,OAAO;EACrB,CAAC;CACF,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,SAAS;EAC/B,QAAQ,OAAO,OAAO,EAAE,sBAAsB,OAAO,QAAQ,CAAC;EAC9D,CAAC;CACF,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,YAAY;EAClC,WAAW,OAAO,QAAQ,KAAK;EAC/B,CAAC;CACF,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,wBAAwB;EAC9C,uBAAuB,OAAO;EAC9B,CAAC;CACF,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,SAAS;EAC/B,QAAQ,OAAO;EACf,CAAC;CACF,OAAO,OAAO;EACb,OAAO,OAAO,QAAQ,UAAU;EAChC,SAAS,OAAO;EAChB,CAAC;CACF,CAAC;;;;;AAMF,MAAa,uBAAuB,OAAO,OAAO;CACjD,UAAU,OAAO;CACjB,MAAM,OAAO;CACb,SAAS,OAAO;CAChB,OAAO;CACP,CAAC;AAEwC,OAAO,OAAO,EACvD,QAAQ,sBACR,CAAC;;;;;AAwEF,MAAa,qBAAqB,KAAiB,WAA4C,EAC9F,MACC,KACA,QACA,SAEA,OAAO,IAAI,aAAa;CACvB,MAAM,MAAe,OAAO,OAAO,WAAW;EAC7C,WACC,IAAI,SAAS,WACV,IAAI,KAAK,UAAU,EAAE,UAAU,IAAI,UAAU,CAAC,GAC9C,IAAI,KAAK,eAAe,EAAE,QAAQ,IAAI,QAAQ,CAAC;EACnD,QAAQ,WAA4B;GACnC,MAAM;GACN,QAAQ,WAAW,MAAM,GAAG,cAAc;GAC1C;GACA,QAAQ,eAAe,MAAM;GAC7B;EACD,CAAC,CAAC,KAGF,OAAO,OACL,QACA,SAAS,cAAc,IAAI,WAAW,eAAe,IAAI,WAAW,eACjE,OAAO,QAAQ,KAAK,GACpB,OAAO,KAAK,IAAI,CACpB,CACD;AACD,KAAI,QAAQ,KAAM,QAAO;CACzB,MAAM,UAAU,oBAAoB,KAAK,IAAI;AAC7C,KAAI,YAAY,KAAM,QAAO;AAc7B,QAAO,OATgB,cAAc,QAAQ,SAAS;EACrD,QAAQ,eAAe;EACvB,UAAU,WAA4B;GACrC,MAAM;GACN,QAAQ;GACR;GACA,QAAQ,eAAe,MAAM,SAAS,MAAM;GAC5C;EACD,CAAC;EAED,EACH;AAED,MAAM,uBAAuB,KAAkB,QAAiC;AAC/E,KAAI,IAAI,SAAS,cAAe,QAAO,0BAA0B,IAAI;AACrE,KAAI,OAAO,QAAQ,YAAY,QAAQ,QAAQ,EAAE,YAAY,KAAM,QAAO;AAE1E,QAAQ,IAAsC,UAAU;;AAGzD,MAAM,6BAA6B,QAAiC;AACnE,KAAI,OAAO,QAAQ,YAAY,QAAQ,KAAM,QAAO;CACpD,MAAM,WAAW;AAKjB,KAAI,SAAS,UAAU,cAAe,QAAO,SAAS,eAAe;AACrE,KAAI,SAAS,UAAU,oBAAqB,QAAO,SAAS,qBAAqB;AACjF,QAAO;;;;;;AAOR,MAAM,cAAc,UAA4B;CAC/C,MAAM,MAAO,OAAgC,SAAS,aAAa,IAAI;AACvE,QACC,IAAI,SAAS,YAAY,IACzB,IAAI,SAAS,iBAAiB,IAC9B,IAAI,SAAS,iBAAiB,IAC9B,IAAI,SAAS,YAAY;;AAI3B,MAAM,kBAAkB,UAA2B;AAClD,KAAI,iBAAiB,MAAO,QAAO,MAAM;AACzC,KAAI,OAAO,UAAU,SAAU,QAAO;AACtC,KAAI;AACH,SAAO,KAAK,UAAU,MAAM;SACrB;AACP,SAAO,OAAO,MAAM"}
@@ -0,0 +1,14 @@
1
+ //#region src/plugins/sui/codegen.d.ts
2
+ /** The typed shape the emitted file exports. */
3
+ interface SuiNetworkBindings {
4
+ readonly chain: string;
5
+ readonly mode: 'local' | 'local-rpc' | 'live' | 'fork';
6
+ readonly rpcUrl: string;
7
+ readonly faucetUrl: string | null;
8
+ readonly graphqlUrl: string | null;
9
+ /** Fork-only — upstream identity for known-package lookups. */
10
+ readonly forkUpstream: string | null;
11
+ }
12
+ //#endregion
13
+ export { SuiNetworkBindings };
14
+ //# sourceMappingURL=codegen.d.mts.map
@@ -0,0 +1,26 @@
1
+ import { Effect } from "effect";
2
+ //#region src/plugins/sui/codegen.ts
3
+ /** Construct the Codegenable contribution. Emit is byte-deterministic
4
+ * on unchanged input (architecture: no mtime churn on no-op
5
+ * cycles). */
6
+ const makeCodegenable = (resolved) => ({
7
+ kind: "codegenable",
8
+ emitterName: "sui-network",
9
+ outputPath: "sui/network.ts",
10
+ emit: (ctx) => Effect.sync(() => {
11
+ const bindings = {
12
+ chain: resolved.chain,
13
+ mode: resolved.mode,
14
+ rpcUrl: resolved.rpc,
15
+ faucetUrl: resolved.faucet ?? null,
16
+ graphqlUrl: resolved.graphql ?? null,
17
+ forkUpstream: resolved.forkUpstream ?? null
18
+ };
19
+ ctx.exportConst("suiNetwork", bindings);
20
+ return ctx.done();
21
+ })
22
+ });
23
+ //#endregion
24
+ export { makeCodegenable };
25
+
26
+ //# sourceMappingURL=codegen.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"codegen.mjs","names":[],"sources":["../../../src/plugins/sui/codegen.ts"],"sourcesContent":["// Sui plugin — Codegenable contribution.\n//\n// Architecture §6: plugins emit typed `CodegenableDecl`s; the\n// codegen orchestrator stages files into the user's source tree\n// WITHOUT naming the plugin. Sui's contribution is network\n// metadata: the active RPC endpoint, the chain id, and (when\n// applicable) the resolved known-package ids.\n//\n// Downstream consumers — chain-aware code (e.g. SDK boots, wallet\n// pickers, frontend RPC selectors) — `import { suiNetwork } from\n// '<staging>/sui/network'`; the generated module owns that exported\n// value's type.\n\nimport { Effect } from 'effect';\n\nimport type { CodegenableDecl } from '../../contracts/codegenable.ts';\nimport type { ResolvedSuiNetwork } from './network-resolver.ts';\n\n/** The typed shape the emitted file exports. */\nexport interface SuiNetworkBindings {\n\treadonly chain: string;\n\treadonly mode: 'local' | 'local-rpc' | 'live' | 'fork';\n\treadonly rpcUrl: string;\n\treadonly faucetUrl: string | null;\n\treadonly graphqlUrl: string | null;\n\t/** Fork-only — upstream identity for known-package lookups. */\n\treadonly forkUpstream: string | null;\n}\n\n/** Construct the Codegenable contribution. Emit is byte-deterministic\n * on unchanged input (architecture: no mtime churn on no-op\n * cycles). */\nexport const makeCodegenable = (resolved: ResolvedSuiNetwork): CodegenableDecl<'sui-network'> => ({\n\tkind: 'codegenable',\n\temitterName: 'sui-network',\n\toutputPath: 'sui/network.ts',\n\temit: (ctx) =>\n\t\tEffect.sync(() => {\n\t\t\tconst bindings: SuiNetworkBindings = {\n\t\t\t\tchain: resolved.chain,\n\t\t\t\tmode: resolved.mode,\n\t\t\t\trpcUrl: resolved.rpc,\n\t\t\t\tfaucetUrl: resolved.faucet ?? null,\n\t\t\t\tgraphqlUrl: resolved.graphql ?? null,\n\t\t\t\tforkUpstream: resolved.forkUpstream ?? null,\n\t\t\t};\n\t\t\tctx.exportConst('suiNetwork', bindings);\n\t\t\treturn ctx.done();\n\t\t}),\n});\n"],"mappings":";;;;;AAgCA,MAAa,mBAAmB,cAAkE;CACjG,MAAM;CACN,aAAa;CACb,YAAY;CACZ,OAAO,QACN,OAAO,WAAW;EACjB,MAAM,WAA+B;GACpC,OAAO,SAAS;GAChB,MAAM,SAAS;GACf,QAAQ,SAAS;GACjB,WAAW,SAAS,UAAU;GAC9B,YAAY,SAAS,WAAW;GAChC,cAAc,SAAS,gBAAgB;GACvC;AACD,MAAI,YAAY,cAAc,SAAS;AACvC,SAAO,IAAI,MAAM;GAChB;CACH"}
@@ -0,0 +1,74 @@
1
+ import { ConfigIssue } from "../../substrate/runtime/config-validation.mjs";
2
+
3
+ //#region src/plugins/sui/errors.d.ts
4
+ /** Phases for `SuiError`. Closed sum — keeps the cause-walker's
5
+ * display table small. Add a phase only after editing the
6
+ * catalog in the plugin doc. */
7
+ type SuiPhase = 'image-build' | 'port-allocate' | 'container-start' | 'rpc-probe' | 'faucet-probe' | 'graphql-probe' | 'fork-status-probe' | 'chain-id-fetch' | 'wait-funds-ready' | 'fork-impersonate' | 'fork-advance-clock' | 'fork-advance-checkpoint' | 'fork-lock' | 'fork-data-dir' | 'move-build' | 'move-publish';
8
+ /** Generic Sui plugin error. Raised by the plugin's acquire body
9
+ * and its admin surface (`advanceClock`, `impersonate`, …). */
10
+ interface SuiPluginError {
11
+ readonly _tag: 'SuiPluginError';
12
+ readonly phase: SuiPhase;
13
+ readonly message: string;
14
+ readonly cause?: unknown;
15
+ }
16
+ interface SuiConfigError extends ConfigIssue {
17
+ readonly _tag: 'SuiConfigError';
18
+ }
19
+ /** Move-build / sui-cli error. Carries the sub-process capture
20
+ * envelope (exit + stderr + stdout). The plugin doc lists 11
21
+ * shell-shaped phases today; we tighten to a much smaller set
22
+ * and use `op` as a free-form column.
23
+ *
24
+ * Stub: the closed-vs-open phase decision is deferred to the
25
+ * cli-driver implementation pass. */
26
+ interface SuiCliError {
27
+ readonly _tag: 'SuiCliError';
28
+ readonly op: 'build' | 'publish' | 'summary' | 'scrub' | 'spawn';
29
+ readonly exitCode?: number;
30
+ readonly stderr?: string;
31
+ readonly stdout?: string;
32
+ readonly cause?: unknown;
33
+ }
34
+ /** Synchronous refusal raised by the fork SDK guard. The guard
35
+ * intercepts at property-access time so the wire call never
36
+ * happens — failing fast lets callers branch on this without
37
+ * awaiting a transport-level reject. */
38
+ interface ForkUnsupportedError {
39
+ readonly _tag: 'ForkUnsupportedError';
40
+ readonly surface: string;
41
+ readonly hint: string;
42
+ }
43
+ /** Raised when fork meta-config drifts between supervisor boots.
44
+ * Carries previous + current snapshots so the doctor / TUI can
45
+ * diff them. Consumed inside Sui's fork acquire — does NOT cross
46
+ * plugin boundaries (the recipe is "wipe and re-apply"). */
47
+ interface SeedManifestMismatchError {
48
+ readonly _tag: 'SeedManifestMismatchError';
49
+ readonly previous: {
50
+ readonly upstream: string;
51
+ readonly checkpoint?: string;
52
+ readonly configHash: string;
53
+ };
54
+ readonly current: {
55
+ readonly upstream: string;
56
+ readonly checkpoint?: string;
57
+ readonly configHash: string;
58
+ };
59
+ readonly hint: string;
60
+ }
61
+ /** Raised when the funds-ready gate times out against a real
62
+ * faucet. Plugin-internal — Sui contributes this strategy and
63
+ * consumes its own error. */
64
+ interface SuiFundsReadyError {
65
+ readonly _tag: 'SuiFundsReadyError';
66
+ readonly attempts: number;
67
+ readonly lastBody?: string;
68
+ readonly hint: string;
69
+ }
70
+ /** Union of every error a Sui-plugin caller may encounter. */
71
+ type SuiError = SuiPluginError | SuiCliError | SuiConfigError | ForkUnsupportedError | SeedManifestMismatchError | SuiFundsReadyError;
72
+ //#endregion
73
+ export { ForkUnsupportedError, SeedManifestMismatchError, SuiCliError, SuiConfigError, SuiError, SuiFundsReadyError, SuiPluginError };
74
+ //# sourceMappingURL=errors.d.mts.map
@@ -0,0 +1,28 @@
1
+ import { defineConfigError } from "../../substrate/runtime/config-validation.mjs";
2
+ //#region src/plugins/sui/errors.ts
3
+ const suiPluginError = (phase, message, cause) => ({
4
+ _tag: "SuiPluginError",
5
+ phase,
6
+ message,
7
+ cause
8
+ });
9
+ const suiConfigError = defineConfigError("SuiConfigError");
10
+ const forkUnsupportedError = (surface, hint) => ({
11
+ _tag: "ForkUnsupportedError",
12
+ surface,
13
+ hint
14
+ });
15
+ /** Error tags this plugin contributes — surfaced to the cause
16
+ * walker via `PluginErrorContribution`. */
17
+ const SUI_ERROR_TAGS = [
18
+ "SuiPluginError",
19
+ "SuiCliError",
20
+ "SuiConfigError",
21
+ "ForkUnsupportedError",
22
+ "SeedManifestMismatchError",
23
+ "SuiFundsReadyError"
24
+ ];
25
+ //#endregion
26
+ export { SUI_ERROR_TAGS, forkUnsupportedError, suiConfigError, suiPluginError };
27
+
28
+ //# sourceMappingURL=errors.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"errors.mjs","names":[],"sources":["../../../src/plugins/sui/errors.ts"],"sourcesContent":["// Sui plugin — typed errors.\n//\n// Distilled-doc finding: today's codebase centralises EVERY tagged\n// error in one engine file, but consumer boundaries cross service\n// lines. The architecture lets us redistribute: errors raised AND\n// consumed inside the Sui plugin live here. Cross-service errors\n// (`ForkIncompatibleError`, `SeedManifestMismatchError`) live with\n// the plugin that consumes them — Walrus/Seal/Deepbook own\n// `ForkIncompatibleError`; the seed-manifest error stays here\n// because Sui's fork acquire is the only raise site AND the only\n// consumer.\n//\n// Effect v4: errors are plain interfaces with a `_tag` discriminator\n// — we don't subclass an Effect base class; `Effect.catchTag` /\n// `catchTags` match on `_tag` literal. See architecture § Effect.\n\nimport { defineConfigError, type ConfigIssue } from '../../substrate/runtime/config-validation.ts';\n\n/** Phases for `SuiError`. Closed sum — keeps the cause-walker's\n * display table small. Add a phase only after editing the\n * catalog in the plugin doc. */\nexport type SuiPhase =\n\t| 'image-build'\n\t| 'port-allocate'\n\t| 'container-start'\n\t| 'rpc-probe'\n\t| 'faucet-probe'\n\t| 'graphql-probe'\n\t| 'fork-status-probe'\n\t| 'chain-id-fetch'\n\t| 'wait-funds-ready'\n\t| 'fork-impersonate'\n\t| 'fork-advance-clock'\n\t| 'fork-advance-checkpoint'\n\t| 'fork-lock'\n\t| 'fork-data-dir'\n\t| 'move-build'\n\t| 'move-publish';\n\n/** Generic Sui plugin error. Raised by the plugin's acquire body\n * and its admin surface (`advanceClock`, `impersonate`, …). */\nexport interface SuiPluginError {\n\treadonly _tag: 'SuiPluginError';\n\treadonly phase: SuiPhase;\n\treadonly message: string;\n\treadonly cause?: unknown;\n}\n\nexport const suiPluginError = (\n\tphase: SuiPhase,\n\tmessage: string,\n\tcause?: unknown,\n): SuiPluginError => ({ _tag: 'SuiPluginError', phase, message, cause });\n\nexport interface SuiConfigError extends ConfigIssue {\n\treadonly _tag: 'SuiConfigError';\n}\n\nexport const suiConfigError = defineConfigError('SuiConfigError');\n\n/** Move-build / sui-cli error. Carries the sub-process capture\n * envelope (exit + stderr + stdout). The plugin doc lists 11\n * shell-shaped phases today; we tighten to a much smaller set\n * and use `op` as a free-form column.\n *\n * Stub: the closed-vs-open phase decision is deferred to the\n * cli-driver implementation pass. */\nexport interface SuiCliError {\n\treadonly _tag: 'SuiCliError';\n\treadonly op: 'build' | 'publish' | 'summary' | 'scrub' | 'spawn';\n\treadonly exitCode?: number;\n\treadonly stderr?: string;\n\treadonly stdout?: string;\n\treadonly cause?: unknown;\n}\n\nexport const suiCliError = (\n\top: SuiCliError['op'],\n\tparts: Omit<SuiCliError, '_tag' | 'op'>,\n): SuiCliError => ({ _tag: 'SuiCliError', op, ...parts });\n\n/** Synchronous refusal raised by the fork SDK guard. The guard\n * intercepts at property-access time so the wire call never\n * happens — failing fast lets callers branch on this without\n * awaiting a transport-level reject. */\nexport interface ForkUnsupportedError {\n\treadonly _tag: 'ForkUnsupportedError';\n\treadonly surface: string;\n\treadonly hint: string;\n}\n\nexport const forkUnsupportedError = (surface: string, hint: string): ForkUnsupportedError => ({\n\t_tag: 'ForkUnsupportedError',\n\tsurface,\n\thint,\n});\n\n/** Raised when fork meta-config drifts between supervisor boots.\n * Carries previous + current snapshots so the doctor / TUI can\n * diff them. Consumed inside Sui's fork acquire — does NOT cross\n * plugin boundaries (the recipe is \"wipe and re-apply\"). */\nexport interface SeedManifestMismatchError {\n\treadonly _tag: 'SeedManifestMismatchError';\n\treadonly previous: {\n\t\treadonly upstream: string;\n\t\treadonly checkpoint?: string;\n\t\treadonly configHash: string;\n\t};\n\treadonly current: {\n\t\treadonly upstream: string;\n\t\treadonly checkpoint?: string;\n\t\treadonly configHash: string;\n\t};\n\treadonly hint: string;\n}\n\n/** Raised when the funds-ready gate times out against a real\n * faucet. Plugin-internal — Sui contributes this strategy and\n * consumes its own error. */\nexport interface SuiFundsReadyError {\n\treadonly _tag: 'SuiFundsReadyError';\n\treadonly attempts: number;\n\treadonly lastBody?: string;\n\treadonly hint: string;\n}\n\n/** Union of every error a Sui-plugin caller may encounter. */\nexport type SuiError =\n\t| SuiPluginError\n\t| SuiCliError\n\t| SuiConfigError\n\t| ForkUnsupportedError\n\t| SeedManifestMismatchError\n\t| SuiFundsReadyError;\n\n/** Error tags this plugin contributes — surfaced to the cause\n * walker via `PluginErrorContribution`. */\nexport const SUI_ERROR_TAGS: ReadonlyArray<SuiError['_tag']> = [\n\t'SuiPluginError',\n\t'SuiCliError',\n\t'SuiConfigError',\n\t'ForkUnsupportedError',\n\t'SeedManifestMismatchError',\n\t'SuiFundsReadyError',\n] as const;\n"],"mappings":";;AAgDA,MAAa,kBACZ,OACA,SACA,WACqB;CAAE,MAAM;CAAkB;CAAO;CAAS;CAAO;AAMvE,MAAa,iBAAiB,kBAAkB,iBAAiB;AAiCjE,MAAa,wBAAwB,SAAiB,UAAwC;CAC7F,MAAM;CACN;CACA;CACA;;;AA0CD,MAAa,iBAAkD;CAC9D;CACA;CACA;CACA;CACA;CACA;CACA"}
@@ -0,0 +1,24 @@
1
+ import { forkUnsupportedError } from "./errors.mjs";
2
+ //#region src/plugins/sui/fork-orchestration.ts
3
+ /** Surfaces that the sui-fork binary explicitly panics on. New
4
+ * upstream additions fail OPEN by default — architecture
5
+ * invariant. */
6
+ const FORK_UNSUPPORTED_SURFACES = [
7
+ "getBalance",
8
+ "listBalances",
9
+ "getCoinInfo"
10
+ ];
11
+ const wrapWithForkGuard = (sdk) => {
12
+ const guardedCore = new Proxy(sdk.core, { get(target, prop, receiver) {
13
+ if (typeof prop === "string" && FORK_UNSUPPORTED_SURFACES.includes(prop)) throw forkUnsupportedError(`client.core.${prop}`, "fork mode does not implement this SDK surface — use the impersonation helper or read state via ChainProbe.");
14
+ return Reflect.get(target, prop, receiver);
15
+ } });
16
+ return {
17
+ ...sdk,
18
+ core: guardedCore
19
+ };
20
+ };
21
+ //#endregion
22
+ export { FORK_UNSUPPORTED_SURFACES, wrapWithForkGuard };
23
+
24
+ //# sourceMappingURL=fork-orchestration.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fork-orchestration.mjs","names":[],"sources":["../../../src/plugins/sui/fork-orchestration.ts"],"sourcesContent":["// Fork-mode orchestration helpers.\n//\n// Owns the runtime SDK guard for surfaces the sui-fork binary panics\n// on. The data-dir lock + seed-manifest meta gate live in the\n// fork-mode builder once that wiring lands; they belong to the same\n// file once they have real implementations to anchor on.\n\nimport { forkUnsupportedError, type ForkUnsupportedError } from './errors.ts';\n\n/** Lock-holder identity persisted alongside the data-dir lock file.\n * Two fork acquires against the same data dir surface this; one\n * wins, the other gets an actionable error. */\nexport interface ForkLockHolder {\n\treadonly pid: number;\n\treadonly host: string;\n\treadonly instanceId: string;\n\treadonly startedAt: number;\n}\n\n/** On-disk seed-manifest snapshot. */\nexport interface ForkMeta {\n\treadonly version: number;\n\treadonly createdAt: number;\n\treadonly upstream: string;\n\treadonly checkpoint?: string;\n\t/** Lowercased + sorted (architecture invariant: configHash MUST\n\t * be stable across orderings). */\n\treadonly seedAddresses: ReadonlyArray<string>;\n\t/** Lowercased + sorted, same invariant. */\n\treadonly seedObjects: ReadonlyArray<string>;\n\t/** Digest of the above four fields. `autoTickMs` is NOT folded\n\t * in (architecture invariant). */\n\treadonly configHash: string;\n\treadonly runtime?: { readonly autoTickMs?: number };\n}\n\n/** Surfaces that the sui-fork binary explicitly panics on. New\n * upstream additions fail OPEN by default — architecture\n * invariant. */\nexport const FORK_UNSUPPORTED_SURFACES: ReadonlyArray<string> = [\n\t// `client.core.*` methods that hit `simulate_transaction` /\n\t// balance-derivation paths the fork binary doesn't implement.\n\t'getBalance',\n\t'listBalances',\n\t'getCoinInfo',\n] as const;\n\n/** Wrap a Sui SDK shim with the fork guard. Property access for a\n * blocklisted surface SYNCHRONOUSLY throws — the wire call never\n * happens, so the fork binary stays up. */\nexport type ForkGuardedSdk<Sdk extends { readonly core: object }> = Omit<Sdk, 'core'> & {\n\treadonly core: Sdk['core'];\n};\n\nexport const wrapWithForkGuard = <Sdk extends { readonly core: object }>(\n\tsdk: Sdk,\n): ForkGuardedSdk<Sdk> => {\n\tconst guardedCore = new Proxy(sdk.core as Record<string, unknown>, {\n\t\tget(target, prop, receiver) {\n\t\t\tif (typeof prop === 'string' && FORK_UNSUPPORTED_SURFACES.includes(prop)) {\n\t\t\t\tconst err: ForkUnsupportedError = forkUnsupportedError(\n\t\t\t\t\t`client.core.${prop}`,\n\t\t\t\t\t'fork mode does not implement this SDK surface — use the impersonation helper ' +\n\t\t\t\t\t\t'or read state via ChainProbe.',\n\t\t\t\t);\n\t\t\t\tthrow err;\n\t\t\t}\n\t\t\treturn Reflect.get(target, prop, receiver);\n\t\t},\n\t}) as Sdk['core'];\n\t// Preserve all SDK fields (e.g. SuiSdkShim's opaque `client` for\n\t// Transaction.build) — only the `core` proxy intercepts; siblings\n\t// like `client` flow through unchanged.\n\treturn { ...sdk, core: guardedCore };\n};\n"],"mappings":";;;;;AAuCA,MAAa,4BAAmD;CAG/D;CACA;CACA;CACA;AASD,MAAa,qBACZ,QACyB;CACzB,MAAM,cAAc,IAAI,MAAM,IAAI,MAAiC,EAClE,IAAI,QAAQ,MAAM,UAAU;AAC3B,MAAI,OAAO,SAAS,YAAY,0BAA0B,SAAS,KAAK,CAMvE,OALkC,qBACjC,eAAe,QACf,6GAGQ;AAEV,SAAO,QAAQ,IAAI,QAAQ,MAAM,SAAS;IAE3C,CAAC;AAIF,QAAO;EAAE,GAAG;EAAK,MAAM;EAAa"}