@mysten-incubation/devstack 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (858) hide show
  1. package/README.md +7 -4
  2. package/dashboard-ui/assets/grpc-a4usE3Nk.js +3 -0
  3. package/dashboard-ui/assets/index-B82Bh84P.css +1 -0
  4. package/dashboard-ui/assets/index-CRYJ4pru.js +1277 -0
  5. package/dashboard-ui/index.html +2 -2
  6. package/dist/api/define-capabilities.d.mts +1 -20
  7. package/dist/api/define-capabilities.mjs +15 -22
  8. package/dist/api/define-capabilities.mjs.map +1 -1
  9. package/dist/api/define-devstack-with.d.mts +7 -1
  10. package/dist/api/define-devstack-with.mjs.map +1 -1
  11. package/dist/api/define-devstack.mjs.map +1 -1
  12. package/dist/api/define-plugin.d.mts +2 -1
  13. package/dist/api/inference-network.d.mts +31 -17
  14. package/dist/api/inference-network.mjs +40 -43
  15. package/dist/api/inference-network.mjs.map +1 -1
  16. package/dist/api/load-config.mjs +88 -0
  17. package/dist/api/load-config.mjs.map +1 -0
  18. package/dist/api/mode-narrowed-factory.d.mts +1 -1
  19. package/dist/api/mode-narrowed-factory.mjs.map +1 -1
  20. package/dist/api/run-stack-internal.mjs +202 -0
  21. package/dist/api/run-stack-internal.mjs.map +1 -0
  22. package/dist/api/run-stack.d.mts +82 -31
  23. package/dist/api/run-stack.mjs +22 -141
  24. package/dist/api/run-stack.mjs.map +1 -1
  25. package/dist/build-integrations/dapp-kit/index.d.mts +61 -0
  26. package/dist/build-integrations/dapp-kit/index.mjs +58 -0
  27. package/dist/build-integrations/dapp-kit/index.mjs.map +1 -0
  28. package/dist/build-integrations/playwright/config.d.mts +1 -30
  29. package/dist/build-integrations/playwright/config.mjs +1 -27
  30. package/dist/build-integrations/playwright/config.mjs.map +1 -1
  31. package/dist/build-integrations/playwright/errors.d.mts +4 -7
  32. package/dist/build-integrations/playwright/errors.mjs.map +1 -1
  33. package/dist/build-integrations/playwright/global-setup.d.mts +42 -71
  34. package/dist/build-integrations/playwright/global-setup.mjs +142 -218
  35. package/dist/build-integrations/playwright/global-setup.mjs.map +1 -1
  36. package/dist/build-integrations/playwright/index.d.mts +2 -2
  37. package/dist/build-integrations/playwright/index.mjs +2 -2
  38. package/dist/build-integrations/playwright/stack-context.d.mts +3 -1
  39. package/dist/build-integrations/playwright/stack-context.mjs +4 -2
  40. package/dist/build-integrations/playwright/stack-context.mjs.map +1 -1
  41. package/dist/build-integrations/playwright/wallet-context.mjs +44 -19
  42. package/dist/build-integrations/playwright/wallet-context.mjs.map +1 -1
  43. package/dist/build-integrations/runtime/cold-start-url.mjs.map +1 -1
  44. package/dist/build-integrations/runtime/conventional-routes.mjs.map +1 -1
  45. package/dist/build-integrations/runtime/dapp-kit-slot.mjs.map +1 -1
  46. package/dist/build-integrations/runtime/discover.d.mts +6 -4
  47. package/dist/build-integrations/runtime/discover.mjs +15 -4
  48. package/dist/build-integrations/runtime/discover.mjs.map +1 -1
  49. package/dist/build-integrations/runtime/endpoint-registry.mjs.map +1 -1
  50. package/dist/build-integrations/runtime/errors.mjs.map +1 -1
  51. package/dist/build-integrations/runtime/read-stack-context.mjs +3 -3
  52. package/dist/build-integrations/runtime/read-stack-context.mjs.map +1 -1
  53. package/dist/build-integrations/runtime/resolve-discovery-env.d.mts +23 -7
  54. package/dist/build-integrations/runtime/resolve-discovery-env.mjs +25 -12
  55. package/dist/build-integrations/runtime/resolve-discovery-env.mjs.map +1 -1
  56. package/dist/build-integrations/runtime/stack-context.d.mts +2 -2
  57. package/dist/build-integrations/vite/index.d.mts +84 -19
  58. package/dist/build-integrations/vite/index.mjs +203 -28
  59. package/dist/build-integrations/vite/index.mjs.map +1 -1
  60. package/dist/build-integrations/vitest/config.d.mts +20 -2
  61. package/dist/build-integrations/vitest/config.mjs +16 -4
  62. package/dist/build-integrations/vitest/config.mjs.map +1 -1
  63. package/dist/build-integrations/vitest/env.d.mts +18 -10
  64. package/dist/build-integrations/vitest/env.mjs +11 -10
  65. package/dist/build-integrations/vitest/env.mjs.map +1 -1
  66. package/dist/build-integrations/vitest/errors.d.mts +7 -11
  67. package/dist/build-integrations/vitest/errors.mjs +3 -4
  68. package/dist/build-integrations/vitest/errors.mjs.map +1 -1
  69. package/dist/build-integrations/vitest/global-setup.d.mts +35 -0
  70. package/dist/build-integrations/vitest/global-setup.mjs +156 -0
  71. package/dist/build-integrations/vitest/global-setup.mjs.map +1 -0
  72. package/dist/build-integrations/vitest/index.d.mts +3 -2
  73. package/dist/build-integrations/vitest/index.mjs +3 -2
  74. package/dist/build-integrations/vitest/setup.mjs +2 -2
  75. package/dist/build-integrations/vitest/setup.mjs.map +1 -1
  76. package/dist/build-integrations/vitest/stack-context.d.mts +5 -3
  77. package/dist/build-integrations/vitest/stack-context.mjs +3 -2
  78. package/dist/build-integrations/vitest/stack-context.mjs.map +1 -1
  79. package/dist/cli/bail.mjs.map +1 -1
  80. package/dist/cli/doctor-probes.mjs +1 -3
  81. package/dist/cli/doctor-probes.mjs.map +1 -1
  82. package/dist/cli/main.d.mts +23 -1
  83. package/dist/cli/main.mjs +63 -8
  84. package/dist/cli/main.mjs.map +1 -1
  85. package/dist/cli/prune-direct.mjs.map +1 -1
  86. package/dist/cli/snapshot-reader.mjs.map +1 -1
  87. package/dist/cli/up-lifecycle.mjs.map +1 -1
  88. package/dist/cli/wirings/apply.mjs +28 -21
  89. package/dist/cli/wirings/apply.mjs.map +1 -1
  90. package/dist/cli/wirings/codegen.mjs +108 -0
  91. package/dist/cli/wirings/codegen.mjs.map +1 -0
  92. package/dist/cli/wirings/config-loader.mjs +12 -62
  93. package/dist/cli/wirings/config-loader.mjs.map +1 -1
  94. package/dist/cli/wirings/dump-ids.mjs +86 -0
  95. package/dist/cli/wirings/dump-ids.mjs.map +1 -0
  96. package/dist/cli/wirings/engine-command.mjs +1 -1
  97. package/dist/cli/wirings/engine-command.mjs.map +1 -1
  98. package/dist/cli/wirings/identity.mjs +2 -2
  99. package/dist/cli/wirings/identity.mjs.map +1 -1
  100. package/dist/cli/wirings/provide-file-system.mjs.map +1 -1
  101. package/dist/cli/wirings/read-devstack-version.mjs +17 -0
  102. package/dist/cli/wirings/read-devstack-version.mjs.map +1 -0
  103. package/dist/cli/wirings/snapshot.mjs +27 -34
  104. package/dist/cli/wirings/snapshot.mjs.map +1 -1
  105. package/dist/cli/wirings/up-ipc.mjs +147 -0
  106. package/dist/cli/wirings/up-ipc.mjs.map +1 -0
  107. package/dist/cli/wirings/up.mjs +218 -198
  108. package/dist/cli/wirings/up.mjs.map +1 -1
  109. package/dist/cli/wirings/wipe.mjs +1 -1
  110. package/dist/cli/wirings/wipe.mjs.map +1 -1
  111. package/dist/contracts/chain-probe.d.mts +1 -1
  112. package/dist/contracts/chain-probe.mjs +1 -1
  113. package/dist/contracts/chain-probe.mjs.map +1 -1
  114. package/dist/contracts/codegenable.d.mts +60 -6
  115. package/dist/contracts/codegenable.mjs +28 -0
  116. package/dist/contracts/codegenable.mjs.map +1 -0
  117. package/dist/contracts/config-bindings.mjs +162 -0
  118. package/dist/contracts/config-bindings.mjs.map +1 -0
  119. package/dist/contracts/container-runtime.d.mts +23 -17
  120. package/dist/contracts/plugin-expander.mjs.map +1 -1
  121. package/dist/contracts/snapshotable.d.mts +5 -7
  122. package/dist/contracts/wallet-protocol.d.mts +2 -5
  123. package/dist/contracts/wallet-protocol.mjs +2 -5
  124. package/dist/contracts/wallet-protocol.mjs.map +1 -1
  125. package/dist/index.d.mts +21 -26
  126. package/dist/index.mjs +8 -9
  127. package/dist/orchestrators/boot.d.mts +28 -0
  128. package/dist/orchestrators/boot.mjs +440 -0
  129. package/dist/orchestrators/boot.mjs.map +1 -0
  130. package/dist/orchestrators/codegen/bindings.d.mts +13 -1
  131. package/dist/orchestrators/codegen/bindings.mjs +23 -9
  132. package/dist/orchestrators/codegen/bindings.mjs.map +1 -1
  133. package/dist/orchestrators/codegen/config-runtime.mjs +208 -0
  134. package/dist/orchestrators/codegen/config-runtime.mjs.map +1 -0
  135. package/dist/orchestrators/codegen/emit.mjs +1 -1
  136. package/dist/orchestrators/codegen/emit.mjs.map +1 -1
  137. package/dist/orchestrators/codegen/errors.mjs +21 -1
  138. package/dist/orchestrators/codegen/errors.mjs.map +1 -1
  139. package/dist/orchestrators/codegen/format.mjs +2 -0
  140. package/dist/orchestrators/codegen/format.mjs.map +1 -1
  141. package/dist/orchestrators/codegen/gitignore.mjs +30 -11
  142. package/dist/orchestrators/codegen/gitignore.mjs.map +1 -1
  143. package/dist/orchestrators/codegen/id-config.mjs +107 -0
  144. package/dist/orchestrators/codegen/id-config.mjs.map +1 -0
  145. package/dist/orchestrators/codegen/output-location.mjs +23 -31
  146. package/dist/orchestrators/codegen/output-location.mjs.map +1 -1
  147. package/dist/orchestrators/codegen/paths.mjs +8 -1
  148. package/dist/orchestrators/codegen/paths.mjs.map +1 -1
  149. package/dist/orchestrators/codegen/permissions.mjs.map +1 -1
  150. package/dist/orchestrators/codegen/service.mjs +286 -58
  151. package/dist/orchestrators/codegen/service.mjs.map +1 -1
  152. package/dist/orchestrators/layers.mjs +31 -0
  153. package/dist/orchestrators/layers.mjs.map +1 -0
  154. package/dist/orchestrators/lifecycle-prune/errors.mjs.map +1 -1
  155. package/dist/orchestrators/lifecycle-prune/index.mjs +8 -10
  156. package/dist/orchestrators/lifecycle-prune/index.mjs.map +1 -1
  157. package/dist/orchestrators/network-options.d.mts +52 -0
  158. package/dist/orchestrators/network-options.mjs +43 -0
  159. package/dist/orchestrators/network-options.mjs.map +1 -0
  160. package/dist/orchestrators/router/cleanup.mjs.map +1 -1
  161. package/dist/orchestrators/router/cors.mjs.map +1 -1
  162. package/dist/orchestrators/router/entrypoints.mjs.map +1 -1
  163. package/dist/orchestrators/router/errors.mjs.map +1 -1
  164. package/dist/orchestrators/router/file-provider.mjs.map +1 -1
  165. package/dist/orchestrators/router/hostname.mjs.map +1 -1
  166. package/dist/orchestrators/router/profile.mjs +1 -1
  167. package/dist/orchestrators/router/profile.mjs.map +1 -1
  168. package/dist/orchestrators/router/service.d.mts +2 -2
  169. package/dist/orchestrators/router/service.mjs +12 -27
  170. package/dist/orchestrators/router/service.mjs.map +1 -1
  171. package/dist/orchestrators/router/traefik-container.mjs +1 -1
  172. package/dist/orchestrators/router/traefik-container.mjs.map +1 -1
  173. package/dist/orchestrators/snapshot/capture.mjs +171 -195
  174. package/dist/orchestrators/snapshot/capture.mjs.map +1 -1
  175. package/dist/orchestrators/snapshot/descriptor.d.mts +1 -1
  176. package/dist/orchestrators/snapshot/descriptor.mjs +53 -11
  177. package/dist/orchestrators/snapshot/descriptor.mjs.map +1 -1
  178. package/dist/orchestrators/snapshot/identity-guard.mjs +3 -5
  179. package/dist/orchestrators/snapshot/identity-guard.mjs.map +1 -1
  180. package/dist/orchestrators/snapshot/image-bundle-tags.mjs +32 -101
  181. package/dist/orchestrators/snapshot/image-bundle-tags.mjs.map +1 -1
  182. package/dist/orchestrators/snapshot/index.mjs +1 -4
  183. package/dist/orchestrators/snapshot/integrity.mjs.map +1 -1
  184. package/dist/orchestrators/snapshot/interrupted-restore.mjs +116 -0
  185. package/dist/orchestrators/snapshot/interrupted-restore.mjs.map +1 -0
  186. package/dist/orchestrators/snapshot/phase-error.mjs.map +1 -1
  187. package/dist/orchestrators/snapshot/prune.mjs +40 -31
  188. package/dist/orchestrators/snapshot/prune.mjs.map +1 -1
  189. package/dist/orchestrators/snapshot/restore.mjs +221 -196
  190. package/dist/orchestrators/snapshot/restore.mjs.map +1 -1
  191. package/dist/orchestrators/snapshot/service.mjs +72 -62
  192. package/dist/orchestrators/snapshot/service.mjs.map +1 -1
  193. package/dist/orchestrators/snapshot/wipe.mjs +67 -56
  194. package/dist/orchestrators/snapshot/wipe.mjs.map +1 -1
  195. package/dist/plugins/account/codegen.mjs +3 -0
  196. package/dist/plugins/account/codegen.mjs.map +1 -1
  197. package/dist/plugins/account/errors.d.mts +2 -2
  198. package/dist/plugins/account/errors.mjs +1 -4
  199. package/dist/plugins/account/errors.mjs.map +1 -1
  200. package/dist/plugins/account/funding.mjs +3 -27
  201. package/dist/plugins/account/funding.mjs.map +1 -1
  202. package/dist/plugins/account/index.d.mts +3 -8
  203. package/dist/plugins/account/index.mjs +71 -35
  204. package/dist/plugins/account/index.mjs.map +1 -1
  205. package/dist/plugins/account/keypair.d.mts +8 -7
  206. package/dist/plugins/account/keypair.mjs +5 -18
  207. package/dist/plugins/account/keypair.mjs.map +1 -1
  208. package/dist/plugins/account/lease.mjs.map +1 -1
  209. package/dist/plugins/account/registry.d.mts +1 -46
  210. package/dist/plugins/account/registry.mjs.map +1 -1
  211. package/dist/plugins/account/service.d.mts +43 -34
  212. package/dist/plugins/account/service.mjs +9 -54
  213. package/dist/plugins/account/service.mjs.map +1 -1
  214. package/dist/plugins/account/snapshot.mjs.map +1 -1
  215. package/dist/plugins/account/variants/ephemeral.mjs.map +1 -1
  216. package/dist/plugins/account/variants/impersonate.mjs.map +1 -1
  217. package/dist/plugins/account/variants/signer.mjs.map +1 -1
  218. package/dist/plugins/action/discriminator.mjs.map +1 -1
  219. package/dist/plugins/action/errors.mjs +1 -4
  220. package/dist/plugins/action/errors.mjs.map +1 -1
  221. package/dist/plugins/action/execute.mjs +3 -4
  222. package/dist/plugins/action/execute.mjs.map +1 -1
  223. package/dist/plugins/action/index.d.mts +2 -2
  224. package/dist/plugins/action/index.mjs +7 -11
  225. package/dist/plugins/action/index.mjs.map +1 -1
  226. package/dist/plugins/action/service.d.mts +5 -7
  227. package/dist/plugins/action/service.mjs +2 -16
  228. package/dist/plugins/action/service.mjs.map +1 -1
  229. package/dist/plugins/coin/address-resolution.mjs.map +1 -1
  230. package/dist/plugins/coin/codegen.mjs +97 -16
  231. package/dist/plugins/coin/codegen.mjs.map +1 -1
  232. package/dist/plugins/coin/discovery.mjs.map +1 -1
  233. package/dist/plugins/coin/errors.mjs +1 -4
  234. package/dist/plugins/coin/errors.mjs.map +1 -1
  235. package/dist/plugins/coin/index.d.mts +4 -34
  236. package/dist/plugins/coin/index.mjs +47 -28
  237. package/dist/plugins/coin/index.mjs.map +1 -1
  238. package/dist/plugins/coin/metadata.d.mts +1 -0
  239. package/dist/plugins/coin/metadata.mjs +8 -9
  240. package/dist/plugins/coin/metadata.mjs.map +1 -1
  241. package/dist/plugins/coin/mint.mjs +7 -21
  242. package/dist/plugins/coin/mint.mjs.map +1 -1
  243. package/dist/plugins/coin/registry.mjs +33 -20
  244. package/dist/plugins/coin/registry.mjs.map +1 -1
  245. package/dist/plugins/coin/service.d.mts +1 -1
  246. package/dist/plugins/coin/service.mjs +1 -8
  247. package/dist/plugins/coin/service.mjs.map +1 -1
  248. package/dist/plugins/coin/snapshot.mjs.map +1 -1
  249. package/dist/plugins/coin/type-strings.mjs.map +1 -1
  250. package/dist/plugins/dashboard/domain.mjs +106 -167
  251. package/dist/plugins/dashboard/domain.mjs.map +1 -1
  252. package/dist/plugins/dashboard/index.mjs +13 -13
  253. package/dist/plugins/dashboard/index.mjs.map +1 -1
  254. package/dist/plugins/dashboard/origin-policy.mjs +3 -3
  255. package/dist/plugins/dashboard/origin-policy.mjs.map +1 -1
  256. package/dist/plugins/dashboard/routable.mjs.map +1 -1
  257. package/dist/plugins/dashboard/schema/builder.mjs.map +1 -1
  258. package/dist/plugins/dashboard/schema/enums.mjs.map +1 -1
  259. package/dist/plugins/dashboard/schema/root.mjs +23 -44
  260. package/dist/plugins/dashboard/schema/root.mjs.map +1 -1
  261. package/dist/plugins/dashboard/schema/types.mjs +37 -91
  262. package/dist/plugins/dashboard/schema/types.mjs.map +1 -1
  263. package/dist/plugins/dashboard/schema.mjs.map +1 -1
  264. package/dist/plugins/dashboard/server.mjs.map +1 -1
  265. package/dist/plugins/deepbook/codegen.d.mts +12 -11
  266. package/dist/plugins/deepbook/codegen.mjs +108 -11
  267. package/dist/plugins/deepbook/codegen.mjs.map +1 -1
  268. package/dist/plugins/deepbook/deploy.mjs +7 -14
  269. package/dist/plugins/deepbook/deploy.mjs.map +1 -1
  270. package/dist/plugins/deepbook/errors.mjs +4 -2
  271. package/dist/plugins/deepbook/errors.mjs.map +1 -1
  272. package/dist/plugins/deepbook/faucet-strategy.mjs +4 -10
  273. package/dist/plugins/deepbook/faucet-strategy.mjs.map +1 -1
  274. package/dist/plugins/deepbook/hash.mjs.map +1 -1
  275. package/dist/plugins/deepbook/index.d.mts +38 -34
  276. package/dist/plugins/deepbook/index.mjs +133 -64
  277. package/dist/plugins/deepbook/index.mjs.map +1 -1
  278. package/dist/plugins/deepbook/plugin-key.mjs.map +1 -1
  279. package/dist/plugins/deepbook/pyth/index.mjs +4 -8
  280. package/dist/plugins/deepbook/pyth/index.mjs.map +1 -1
  281. package/dist/plugins/deepbook/snapshot.mjs +0 -1
  282. package/dist/plugins/deepbook/snapshot.mjs.map +1 -1
  283. package/dist/plugins/deepbook/type-strings.mjs.map +1 -1
  284. package/dist/plugins/deepbook/types.d.mts +2 -1
  285. package/dist/plugins/deepbook/types.mjs.map +1 -1
  286. package/dist/plugins/faucet/dispatcher.d.mts +3 -3
  287. package/dist/plugins/faucet/dispatcher.mjs.map +1 -1
  288. package/dist/plugins/faucet/errors.mjs.map +1 -1
  289. package/dist/plugins/faucet/http.mjs +2 -10
  290. package/dist/plugins/faucet/http.mjs.map +1 -1
  291. package/dist/plugins/faucet/index.mjs +0 -1
  292. package/dist/plugins/faucet/index.mjs.map +1 -1
  293. package/dist/plugins/host-service/errors.d.mts +1 -3
  294. package/dist/plugins/host-service/errors.mjs +1 -2
  295. package/dist/plugins/host-service/errors.mjs.map +1 -1
  296. package/dist/plugins/host-service/index.d.mts +1 -2
  297. package/dist/plugins/host-service/index.mjs +11 -11
  298. package/dist/plugins/host-service/index.mjs.map +1 -1
  299. package/dist/plugins/host-service/routable.mjs.map +1 -1
  300. package/dist/plugins/host-service/service.mjs +13 -13
  301. package/dist/plugins/host-service/service.mjs.map +1 -1
  302. package/dist/plugins/internal/acquire-on-chain-artifact.mjs.map +1 -1
  303. package/dist/plugins/internal/codegen-helpers.mjs +2 -0
  304. package/dist/plugins/internal/codegen-helpers.mjs.map +1 -1
  305. package/dist/plugins/internal/funding-failure-error.mjs.map +1 -1
  306. package/dist/plugins/{postgres → internal/postgres-sidecar}/connection.mjs +1 -1
  307. package/dist/plugins/internal/postgres-sidecar/connection.mjs.map +1 -0
  308. package/dist/plugins/{postgres → internal/postgres-sidecar}/db-ensure.mjs +30 -16
  309. package/dist/plugins/internal/postgres-sidecar/db-ensure.mjs.map +1 -0
  310. package/dist/plugins/internal/postgres-sidecar/errors.mjs +21 -0
  311. package/dist/plugins/internal/postgres-sidecar/errors.mjs.map +1 -0
  312. package/dist/{substrate/runtime/scoped-multimap → plugins/internal/postgres-sidecar}/index.mjs +1 -0
  313. package/dist/plugins/internal/postgres-sidecar/service.mjs +121 -0
  314. package/dist/plugins/internal/postgres-sidecar/service.mjs.map +1 -0
  315. package/dist/plugins/package/build.mjs +2 -2
  316. package/dist/plugins/package/build.mjs.map +1 -1
  317. package/dist/plugins/package/codegen.d.mts +7 -14
  318. package/dist/plugins/package/codegen.mjs +187 -59
  319. package/dist/plugins/package/codegen.mjs.map +1 -1
  320. package/dist/plugins/package/dep-resolution.mjs +51 -3
  321. package/dist/plugins/package/dep-resolution.mjs.map +1 -1
  322. package/dist/plugins/package/errors.mjs +1 -4
  323. package/dist/plugins/package/errors.mjs.map +1 -1
  324. package/dist/plugins/package/git-source.d.mts +18 -0
  325. package/dist/plugins/package/git-source.mjs +119 -0
  326. package/dist/plugins/package/git-source.mjs.map +1 -0
  327. package/dist/plugins/package/index.d.mts +28 -19
  328. package/dist/plugins/package/index.mjs +107 -32
  329. package/dist/plugins/package/index.mjs.map +1 -1
  330. package/dist/plugins/package/mode-known.mjs +2 -2
  331. package/dist/plugins/package/mode-known.mjs.map +1 -1
  332. package/dist/plugins/package/mode-local.mjs +18 -35
  333. package/dist/plugins/package/mode-local.mjs.map +1 -1
  334. package/dist/plugins/package/publish-executor.mjs +13 -8
  335. package/dist/plugins/package/publish-executor.mjs.map +1 -1
  336. package/dist/plugins/package/publish-output.d.mts +1 -11
  337. package/dist/plugins/package/publish-output.mjs +1 -9
  338. package/dist/plugins/package/publish-output.mjs.map +1 -1
  339. package/dist/plugins/package/registry.d.mts +1 -1
  340. package/dist/plugins/package/registry.mjs +26 -14
  341. package/dist/plugins/package/registry.mjs.map +1 -1
  342. package/dist/plugins/package/service.mjs.map +1 -1
  343. package/dist/plugins/package/snapshot.mjs.map +1 -1
  344. package/dist/plugins/router-entrypoints.mjs +1 -3
  345. package/dist/plugins/router-entrypoints.mjs.map +1 -1
  346. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs +1 -2
  347. package/dist/plugins/seal/bootstrap-assets/cargo-image.mjs.map +1 -1
  348. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs +1 -6
  349. package/dist/plugins/seal/bootstrap-assets/source-fetch.mjs.map +1 -1
  350. package/dist/plugins/seal/codegen.d.mts +1 -5
  351. package/dist/plugins/seal/codegen.mjs +83 -12
  352. package/dist/plugins/seal/codegen.mjs.map +1 -1
  353. package/dist/plugins/seal/config-render.mjs +2 -6
  354. package/dist/plugins/seal/config-render.mjs.map +1 -1
  355. package/dist/plugins/seal/deploy.mjs +18 -29
  356. package/dist/plugins/seal/deploy.mjs.map +1 -1
  357. package/dist/plugins/seal/errors.d.mts +4 -5
  358. package/dist/plugins/seal/errors.mjs +1 -8
  359. package/dist/plugins/seal/errors.mjs.map +1 -1
  360. package/dist/plugins/seal/index.d.mts +7 -28
  361. package/dist/plugins/seal/index.mjs +69 -47
  362. package/dist/plugins/seal/index.mjs.map +1 -1
  363. package/dist/plugins/seal/key-manager.mjs.map +1 -1
  364. package/dist/plugins/seal/key-server.mjs +1 -6
  365. package/dist/plugins/seal/key-server.mjs.map +1 -1
  366. package/dist/plugins/seal/keygen.mjs +2 -3
  367. package/dist/plugins/seal/keygen.mjs.map +1 -1
  368. package/dist/plugins/seal/mode/fork-known.mjs.map +1 -1
  369. package/dist/plugins/seal/mode/live.mjs +1 -1
  370. package/dist/plugins/seal/mode/live.mjs.map +1 -1
  371. package/dist/plugins/seal/mode/local-keygen.mjs +4 -10
  372. package/dist/plugins/seal/mode/local-keygen.mjs.map +1 -1
  373. package/dist/plugins/seal/plugin-key.mjs.map +1 -1
  374. package/dist/plugins/seal/registry-publish.mjs.map +1 -1
  375. package/dist/plugins/seal/routable.mjs.map +1 -1
  376. package/dist/plugins/seal/service.mjs.map +1 -1
  377. package/dist/plugins/seal/snapshot.mjs +1 -2
  378. package/dist/plugins/seal/snapshot.mjs.map +1 -1
  379. package/dist/plugins/sui/auto-tick.mjs +5 -5
  380. package/dist/plugins/sui/auto-tick.mjs.map +1 -1
  381. package/dist/plugins/sui/chain-build-container.mjs +2 -2
  382. package/dist/plugins/sui/chain-build-container.mjs.map +1 -1
  383. package/dist/plugins/sui/chain-probe.mjs +4 -4
  384. package/dist/plugins/sui/chain-probe.mjs.map +1 -1
  385. package/dist/plugins/sui/codegen.d.mts +9 -7
  386. package/dist/plugins/sui/codegen.mjs +49 -46
  387. package/dist/plugins/sui/codegen.mjs.map +1 -1
  388. package/dist/plugins/sui/errors.d.mts +1 -1
  389. package/dist/plugins/sui/errors.mjs +1 -9
  390. package/dist/plugins/sui/errors.mjs.map +1 -1
  391. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.d.mts +1 -1
  392. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/index.mjs +3 -7
  393. package/dist/plugins/sui/exec/index.mjs.map +1 -0
  394. package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.mjs +1 -1
  395. package/dist/plugins/sui/exec/sign-and-dispatch.mjs.map +1 -0
  396. package/dist/plugins/sui/fork-faucet-strategy.mjs +2 -6
  397. package/dist/plugins/sui/fork-faucet-strategy.mjs.map +1 -1
  398. package/dist/plugins/sui/fork-orchestration.mjs +13 -23
  399. package/dist/plugins/sui/fork-orchestration.mjs.map +1 -1
  400. package/dist/plugins/sui/fork-transaction.mjs.map +1 -1
  401. package/dist/plugins/sui/index.d.mts +34 -83
  402. package/dist/plugins/sui/index.mjs +200 -68
  403. package/dist/plugins/sui/index.mjs.map +1 -1
  404. package/dist/{substrate/runtime/sui-ledger → plugins/sui/ledger}/object-ref.mjs +1 -1
  405. package/dist/plugins/sui/ledger/object-ref.mjs.map +1 -0
  406. package/dist/plugins/sui/local-faucet-strategy.mjs +1 -5
  407. package/dist/plugins/sui/local-faucet-strategy.mjs.map +1 -1
  408. package/dist/plugins/sui/log-attrs.mjs +11 -0
  409. package/dist/plugins/sui/log-attrs.mjs.map +1 -0
  410. package/dist/plugins/sui/mode/external.mjs +4 -12
  411. package/dist/plugins/sui/mode/external.mjs.map +1 -1
  412. package/dist/plugins/sui/mode/fork.mjs +19 -16
  413. package/dist/plugins/sui/mode/fork.mjs.map +1 -1
  414. package/dist/plugins/sui/mode/live.mjs +4 -17
  415. package/dist/plugins/sui/mode/live.mjs.map +1 -1
  416. package/dist/plugins/sui/mode/local.d.mts +1 -0
  417. package/dist/plugins/sui/mode/local.mjs +203 -61
  418. package/dist/plugins/sui/mode/local.mjs.map +1 -1
  419. package/dist/plugins/sui/mode/shared-boot.mjs +18 -23
  420. package/dist/plugins/sui/mode/shared-boot.mjs.map +1 -1
  421. package/dist/plugins/sui/mode/shared.d.mts +6 -7
  422. package/dist/plugins/sui/mode/shared.mjs.map +1 -1
  423. package/dist/plugins/sui/mode/spec.d.mts +23 -6
  424. package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.mjs +28 -30
  425. package/dist/plugins/sui/move/index.mjs.map +1 -0
  426. package/dist/plugins/sui/move-summary-runner.mjs +8 -4
  427. package/dist/plugins/sui/move-summary-runner.mjs.map +1 -1
  428. package/dist/{substrate/network.d.mts → plugins/sui/network-config.d.mts} +11 -10
  429. package/dist/plugins/sui/network-resolver.d.mts +6 -6
  430. package/dist/plugins/sui/routable.mjs.map +1 -1
  431. package/dist/plugins/sui/service.mjs +10 -6
  432. package/dist/plugins/sui/service.mjs.map +1 -1
  433. package/dist/plugins/sui/snapshot.mjs +10 -5
  434. package/dist/plugins/sui/snapshot.mjs.map +1 -1
  435. package/dist/plugins/wallet/codegen.d.mts +8 -6
  436. package/dist/plugins/wallet/codegen.mjs +4 -10
  437. package/dist/plugins/wallet/codegen.mjs.map +1 -1
  438. package/dist/plugins/wallet/errors.mjs +1 -4
  439. package/dist/plugins/wallet/errors.mjs.map +1 -1
  440. package/dist/plugins/wallet/index.d.mts +3 -6
  441. package/dist/plugins/wallet/index.mjs +16 -21
  442. package/dist/plugins/wallet/index.mjs.map +1 -1
  443. package/dist/plugins/wallet/origin-policy.mjs +3 -3
  444. package/dist/plugins/wallet/origin-policy.mjs.map +1 -1
  445. package/dist/plugins/wallet/pairing.mjs +6 -24
  446. package/dist/plugins/wallet/pairing.mjs.map +1 -1
  447. package/dist/plugins/wallet/protocol.mjs.map +1 -1
  448. package/dist/plugins/wallet/routable.mjs.map +1 -1
  449. package/dist/plugins/wallet/server.mjs +17 -24
  450. package/dist/plugins/wallet/server.mjs.map +1 -1
  451. package/dist/plugins/wallet/service.d.mts +2 -2
  452. package/dist/plugins/wallet/service.mjs +4 -15
  453. package/dist/plugins/wallet/service.mjs.map +1 -1
  454. package/dist/plugins/wallet/snapshot.mjs.map +1 -1
  455. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs +1 -5
  456. package/dist/plugins/walrus/bootstrap-assets/cargo-image.mjs.map +1 -1
  457. package/dist/plugins/walrus/codegen.d.mts +2 -13
  458. package/dist/plugins/walrus/codegen.mjs +93 -28
  459. package/dist/plugins/walrus/codegen.mjs.map +1 -1
  460. package/dist/plugins/walrus/deploy-paths.mjs +2 -3
  461. package/dist/plugins/walrus/deploy-paths.mjs.map +1 -1
  462. package/dist/plugins/walrus/deploy.mjs +26 -19
  463. package/dist/plugins/walrus/deploy.mjs.map +1 -1
  464. package/dist/plugins/walrus/errors.mjs +1 -8
  465. package/dist/plugins/walrus/errors.mjs.map +1 -1
  466. package/dist/plugins/walrus/faucet-strategy.mjs +15 -1
  467. package/dist/plugins/walrus/faucet-strategy.mjs.map +1 -1
  468. package/dist/plugins/walrus/index.d.mts +13 -44
  469. package/dist/plugins/walrus/index.mjs +119 -122
  470. package/dist/plugins/walrus/index.mjs.map +1 -1
  471. package/dist/plugins/walrus/mode/known-deploy.mjs +6 -6
  472. package/dist/plugins/walrus/mode/known-deploy.mjs.map +1 -1
  473. package/dist/plugins/walrus/mode/local-cluster.d.mts +2 -2
  474. package/dist/plugins/walrus/mode/local-cluster.mjs +2 -10
  475. package/dist/plugins/walrus/mode/local-cluster.mjs.map +1 -1
  476. package/dist/plugins/walrus/plugin-key.mjs.map +1 -1
  477. package/dist/plugins/walrus/registry-publish.mjs.map +1 -1
  478. package/dist/plugins/walrus/routable.mjs.map +1 -1
  479. package/dist/plugins/walrus/service.mjs.map +1 -1
  480. package/dist/plugins/walrus/snapshot.mjs +3 -3
  481. package/dist/plugins/walrus/snapshot.mjs.map +1 -1
  482. package/dist/plugins/walrus/storage-nodes.mjs +53 -14
  483. package/dist/plugins/walrus/storage-nodes.mjs.map +1 -1
  484. package/dist/plugins/walrus/wal-swap.mjs +4 -8
  485. package/dist/plugins/walrus/wal-swap.mjs.map +1 -1
  486. package/dist/primitives/artifact-publisher.mjs.map +1 -1
  487. package/dist/primitives/cache.d.mts +1 -1
  488. package/dist/runtime/docker/client.mjs +47 -3
  489. package/dist/runtime/docker/client.mjs.map +1 -1
  490. package/dist/runtime/docker/container.mjs +37 -57
  491. package/dist/runtime/docker/container.mjs.map +1 -1
  492. package/dist/runtime/docker/errors.mjs.map +1 -1
  493. package/dist/runtime/docker/exec.mjs +2 -2
  494. package/dist/runtime/docker/exec.mjs.map +1 -1
  495. package/dist/runtime/docker/image.mjs +10 -11
  496. package/dist/runtime/docker/image.mjs.map +1 -1
  497. package/dist/runtime/docker/index.mjs +0 -1
  498. package/dist/runtime/docker/inspect-and-decode.mjs.map +1 -1
  499. package/dist/runtime/docker/inventory.mjs +9 -9
  500. package/dist/runtime/docker/inventory.mjs.map +1 -1
  501. package/dist/runtime/docker/labels.mjs +12 -1
  502. package/dist/runtime/docker/labels.mjs.map +1 -1
  503. package/dist/runtime/docker/network.mjs +6 -6
  504. package/dist/runtime/docker/network.mjs.map +1 -1
  505. package/dist/runtime/docker/render-run-args.mjs.map +1 -1
  506. package/dist/runtime/docker/service.mjs +31 -45
  507. package/dist/runtime/docker/service.mjs.map +1 -1
  508. package/dist/runtime/docker/sweep.mjs +14 -64
  509. package/dist/runtime/docker/sweep.mjs.map +1 -1
  510. package/dist/runtime/docker/volume.mjs +1 -1
  511. package/dist/runtime/docker/volume.mjs.map +1 -1
  512. package/dist/runtime/docker/wrap.mjs +14 -2
  513. package/dist/runtime/docker/wrap.mjs.map +1 -1
  514. package/dist/substrate/brand.d.mts +2 -5
  515. package/dist/substrate/brand.mjs +3 -2
  516. package/dist/substrate/brand.mjs.map +1 -1
  517. package/dist/substrate/cross-process.mjs +2 -16
  518. package/dist/substrate/cross-process.mjs.map +1 -1
  519. package/dist/substrate/event-time.mjs +0 -2
  520. package/dist/substrate/event-time.mjs.map +1 -1
  521. package/dist/substrate/events.d.mts +46 -16
  522. package/dist/substrate/identity.d.mts +11 -5
  523. package/dist/substrate/manifest.d.mts +33 -26
  524. package/dist/substrate/manifest.mjs +8 -3
  525. package/dist/substrate/manifest.mjs.map +1 -1
  526. package/dist/substrate/options.d.mts +33 -4
  527. package/dist/substrate/plugin-ctx.d.mts +70 -0
  528. package/dist/substrate/plugin-ctx.mjs +66 -0
  529. package/dist/substrate/plugin-ctx.mjs.map +1 -0
  530. package/dist/substrate/plugin.d.mts +46 -38
  531. package/dist/substrate/plugin.mjs +13 -9
  532. package/dist/substrate/plugin.mjs.map +1 -1
  533. package/dist/substrate/projection.d.mts +1 -1
  534. package/dist/substrate/runtime/atomic-write.mjs +3 -4
  535. package/dist/substrate/runtime/atomic-write.mjs.map +1 -1
  536. package/dist/substrate/runtime/cache/schema.mjs.map +1 -1
  537. package/dist/substrate/runtime/cache/service.mjs +50 -20
  538. package/dist/substrate/runtime/cache/service.mjs.map +1 -1
  539. package/dist/substrate/runtime/config-validation.mjs.map +1 -1
  540. package/dist/substrate/runtime/control-plane/domain.mjs +34 -12
  541. package/dist/substrate/runtime/control-plane/domain.mjs.map +1 -1
  542. package/dist/substrate/runtime/control-plane/service.mjs.map +1 -1
  543. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs +14 -17
  544. package/dist/substrate/runtime/cross-process/command-channel/channel.mjs.map +1 -1
  545. package/dist/substrate/runtime/cross-process/command-channel/file-channel.mjs.map +1 -1
  546. package/dist/substrate/runtime/cross-process/command-channel/protocol.mjs.map +1 -1
  547. package/dist/substrate/runtime/cross-process/command-channel/runtime-control-lock.mjs.map +1 -1
  548. package/dist/substrate/runtime/cross-process/index.mjs +0 -2
  549. package/dist/substrate/runtime/cross-process/live-clock.mjs +1 -1
  550. package/dist/substrate/runtime/cross-process/live-clock.mjs.map +1 -1
  551. package/dist/substrate/runtime/cross-process/liveness.mjs +11 -18
  552. package/dist/substrate/runtime/cross-process/liveness.mjs.map +1 -1
  553. package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs +2 -2
  554. package/dist/substrate/runtime/cross-process/reclaim-stale-file.mjs.map +1 -1
  555. package/dist/substrate/runtime/cross-process/roster.mjs +17 -127
  556. package/dist/substrate/runtime/cross-process/roster.mjs.map +1 -1
  557. package/dist/substrate/runtime/cross-process/self-pid.mjs.map +1 -1
  558. package/dist/substrate/runtime/cross-process/stack-lock.mjs +29 -28
  559. package/dist/substrate/runtime/cross-process/stack-lock.mjs.map +1 -1
  560. package/dist/substrate/runtime/current-plugin.mjs.map +1 -1
  561. package/dist/substrate/runtime/errors.mjs +1 -13
  562. package/dist/substrate/runtime/errors.mjs.map +1 -1
  563. package/dist/substrate/runtime/format-unknown-error.mjs.map +1 -1
  564. package/dist/substrate/runtime/host-bind-mount-owner.mjs.map +1 -1
  565. package/dist/substrate/runtime/host-gateway.mjs.map +1 -1
  566. package/dist/substrate/runtime/host-tree-tar/index.mjs +15 -163
  567. package/dist/substrate/runtime/host-tree-tar/index.mjs.map +1 -1
  568. package/dist/substrate/runtime/http-probe.d.mts +1 -3
  569. package/dist/substrate/runtime/http-probe.mjs.map +1 -1
  570. package/dist/substrate/runtime/index.mjs +1 -6
  571. package/dist/substrate/runtime/lease-broker/service.mjs +5 -23
  572. package/dist/substrate/runtime/lease-broker/service.mjs.map +1 -1
  573. package/dist/substrate/runtime/lifecycle/dep-graph.mjs +3 -3
  574. package/dist/substrate/runtime/lifecycle/dep-graph.mjs.map +1 -1
  575. package/dist/substrate/runtime/lifecycle/graph-input-id.d.mts +1 -0
  576. package/dist/substrate/runtime/lifecycle/graph-input-id.mjs +133 -0
  577. package/dist/substrate/runtime/lifecycle/graph-input-id.mjs.map +1 -0
  578. package/dist/substrate/runtime/lifecycle/index.mjs +2 -2
  579. package/dist/substrate/runtime/lifecycle/plugin-registry.d.mts +1 -1
  580. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs +22 -1
  581. package/dist/substrate/runtime/lifecycle/plugin-registry.mjs.map +1 -1
  582. package/dist/substrate/runtime/lifecycle/ready-gate.mjs +2 -15
  583. package/dist/substrate/runtime/lifecycle/ready-gate.mjs.map +1 -1
  584. package/dist/substrate/runtime/lifecycle/selective-restart.mjs +29 -25
  585. package/dist/substrate/runtime/lifecycle/selective-restart.mjs.map +1 -1
  586. package/dist/substrate/runtime/lifecycle/signals.mjs +1 -1
  587. package/dist/substrate/runtime/lifecycle/signals.mjs.map +1 -1
  588. package/dist/substrate/runtime/lifecycle/state-machine.mjs.map +1 -1
  589. package/dist/substrate/runtime/lifecycle/watch-attribution.d.mts +1 -1
  590. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs +0 -1
  591. package/dist/substrate/runtime/lifecycle/watch-attribution.mjs.map +1 -1
  592. package/dist/substrate/runtime/managed-container.d.mts +5 -1
  593. package/dist/substrate/runtime/managed-container.mjs +8 -10
  594. package/dist/substrate/runtime/managed-container.mjs.map +1 -1
  595. package/dist/substrate/runtime/manifest/manifest.mjs +8 -30
  596. package/dist/substrate/runtime/manifest/manifest.mjs.map +1 -1
  597. package/dist/substrate/runtime/mode-errors.d.mts +1 -2
  598. package/dist/substrate/runtime/mode-errors.mjs.map +1 -1
  599. package/dist/substrate/runtime/observability/cascade-formatter.mjs +1 -11
  600. package/dist/substrate/runtime/observability/cascade-formatter.mjs.map +1 -1
  601. package/dist/substrate/runtime/observability/ignore-with-log.mjs.map +1 -1
  602. package/dist/substrate/runtime/observability/index.d.mts +1 -1
  603. package/dist/substrate/runtime/observability/index.mjs +4 -6
  604. package/dist/substrate/runtime/observability/log-attrs.mjs +46 -0
  605. package/dist/substrate/runtime/observability/log-attrs.mjs.map +1 -0
  606. package/dist/substrate/runtime/observability/log-store.mjs.map +1 -1
  607. package/dist/substrate/runtime/observability/logger.mjs +3 -3
  608. package/dist/substrate/runtime/observability/logger.mjs.map +1 -1
  609. package/dist/substrate/runtime/observability/output-truncate.mjs.map +1 -1
  610. package/dist/substrate/runtime/observability/pretty-error.mjs.map +1 -1
  611. package/dist/substrate/runtime/observability/process-lines.mjs.map +1 -1
  612. package/dist/substrate/runtime/observability/redaction.mjs.map +1 -1
  613. package/dist/substrate/runtime/observability/subprocess-capture.mjs +2 -2
  614. package/dist/substrate/runtime/observability/subprocess-capture.mjs.map +1 -1
  615. package/dist/substrate/runtime/passthrough-or-wrap.mjs.map +1 -1
  616. package/dist/substrate/runtime/paths.mjs +27 -9
  617. package/dist/substrate/runtime/paths.mjs.map +1 -1
  618. package/dist/substrate/runtime/phase-preserving-produce.mjs.map +1 -1
  619. package/dist/substrate/runtime/port-broker/service.mjs +10 -27
  620. package/dist/substrate/runtime/port-broker/service.mjs.map +1 -1
  621. package/dist/substrate/runtime/post-acquire-tasks.mjs.map +1 -1
  622. package/dist/substrate/runtime/probes.d.mts +2 -3
  623. package/dist/substrate/runtime/probes.mjs.map +1 -1
  624. package/dist/substrate/runtime/process-supervisor.mjs.map +1 -1
  625. package/dist/substrate/runtime/projection/operational-endpoints.mjs.map +1 -1
  626. package/dist/substrate/runtime/projection/state-ref.mjs.map +1 -1
  627. package/dist/substrate/runtime/projection/update.mjs +87 -11
  628. package/dist/substrate/runtime/projection/update.mjs.map +1 -1
  629. package/dist/substrate/runtime/random-suffix.mjs.map +1 -1
  630. package/dist/substrate/runtime/reconcile/fs-plan.mjs +146 -0
  631. package/dist/substrate/runtime/reconcile/fs-plan.mjs.map +1 -0
  632. package/dist/substrate/runtime/reconcile/graph.mjs +19 -0
  633. package/dist/substrate/runtime/reconcile/graph.mjs.map +1 -0
  634. package/dist/substrate/runtime/reconcile/index.mjs +5 -0
  635. package/dist/substrate/runtime/reconcile/label.mjs +41 -0
  636. package/dist/substrate/runtime/reconcile/label.mjs.map +1 -0
  637. package/dist/substrate/runtime/reconcile/spec.mjs +15 -0
  638. package/dist/substrate/runtime/reconcile/spec.mjs.map +1 -0
  639. package/dist/substrate/runtime/retry-policy.d.mts +2 -3
  640. package/dist/substrate/runtime/retry-policy.mjs.map +1 -1
  641. package/dist/substrate/runtime/routed-url.mjs.map +1 -1
  642. package/dist/substrate/runtime/runtime-decode.mjs.map +1 -1
  643. package/dist/substrate/runtime/scoped-http-server.mjs.map +1 -1
  644. package/dist/substrate/runtime/stage-and-swap/index.mjs +49 -12
  645. package/dist/substrate/runtime/stage-and-swap/index.mjs.map +1 -1
  646. package/dist/substrate/runtime/strategy-registry/chain-keyed-strategy-for.mjs.map +1 -1
  647. package/dist/substrate/runtime/strategy-registry/chain-probe-for.mjs.map +1 -1
  648. package/dist/substrate/runtime/strategy-registry/service.mjs +29 -17
  649. package/dist/substrate/runtime/strategy-registry/service.mjs.map +1 -1
  650. package/dist/substrate/runtime/subnet-broker.mjs.map +1 -1
  651. package/dist/substrate/runtime/supervisor/acquire-node.mjs +188 -56
  652. package/dist/substrate/runtime/supervisor/acquire-node.mjs.map +1 -1
  653. package/dist/substrate/runtime/supervisor/background-tasks.mjs +79 -65
  654. package/dist/substrate/runtime/supervisor/background-tasks.mjs.map +1 -1
  655. package/dist/substrate/runtime/supervisor/command-loop.mjs +82 -23
  656. package/dist/substrate/runtime/supervisor/command-loop.mjs.map +1 -1
  657. package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs +16 -0
  658. package/dist/substrate/runtime/supervisor/contribution-dispatcher.mjs.map +1 -0
  659. package/dist/substrate/runtime/supervisor/errors.mjs +11 -2
  660. package/dist/substrate/runtime/supervisor/errors.mjs.map +1 -1
  661. package/dist/substrate/runtime/supervisor/index.mjs +2 -0
  662. package/dist/substrate/runtime/supervisor/shutdown.mjs +6 -6
  663. package/dist/substrate/runtime/supervisor/shutdown.mjs.map +1 -1
  664. package/dist/substrate/runtime/supervisor/start-supervisor.mjs +60 -70
  665. package/dist/substrate/runtime/supervisor/start-supervisor.mjs.map +1 -1
  666. package/dist/substrate/runtime/supervisor/state.d.mts +1 -1
  667. package/dist/substrate/runtime/supervisor/state.mjs +1 -1
  668. package/dist/substrate/runtime/supervisor/state.mjs.map +1 -1
  669. package/dist/substrate/runtime/supervisor/teardown.mjs +10 -9
  670. package/dist/substrate/runtime/supervisor/teardown.mjs.map +1 -1
  671. package/dist/substrate/runtime/supervisor/wiring.mjs +6 -20
  672. package/dist/substrate/runtime/supervisor/wiring.mjs.map +1 -1
  673. package/dist/substrate/runtime/tar/reader.mjs +216 -0
  674. package/dist/substrate/runtime/tar/reader.mjs.map +1 -0
  675. package/dist/substrate/runtime/typed-env.mjs.map +1 -1
  676. package/dist/substrate/versioned-doc-schema.mjs.map +1 -1
  677. package/dist/substrate/versioned-doc-sync.mjs +5 -5
  678. package/dist/substrate/versioned-doc-sync.mjs.map +1 -1
  679. package/dist/surfaces/cli/command-tree.mjs +49 -7
  680. package/dist/surfaces/cli/command-tree.mjs.map +1 -1
  681. package/dist/surfaces/cli/commands/config.mjs +1 -1
  682. package/dist/surfaces/cli/commands/config.mjs.map +1 -1
  683. package/dist/surfaces/cli/commands/confirm-node.mjs.map +1 -1
  684. package/dist/surfaces/cli/commands/confirm.mjs.map +1 -1
  685. package/dist/surfaces/cli/commands/doctor.mjs +1 -1
  686. package/dist/surfaces/cli/commands/doctor.mjs.map +1 -1
  687. package/dist/surfaces/cli/commands/prune-picker-entry.mjs.map +1 -1
  688. package/dist/surfaces/cli/commands/prune-picker.mjs.map +1 -1
  689. package/dist/surfaces/cli/commands/prune.mjs +1 -1
  690. package/dist/surfaces/cli/commands/prune.mjs.map +1 -1
  691. package/dist/surfaces/cli/commands/snapshot.mjs +1 -1
  692. package/dist/surfaces/cli/commands/snapshot.mjs.map +1 -1
  693. package/dist/surfaces/cli/commands/status.mjs +1 -1
  694. package/dist/surfaces/cli/commands/status.mjs.map +1 -1
  695. package/dist/surfaces/cli/commands/supervisor-presence.mjs.map +1 -1
  696. package/dist/surfaces/cli/commands/wipe.mjs +3 -4
  697. package/dist/surfaces/cli/commands/wipe.mjs.map +1 -1
  698. package/dist/surfaces/cli/envelope.mjs.map +1 -1
  699. package/dist/surfaces/cli/errors.mjs.map +1 -1
  700. package/dist/surfaces/cli/flags.mjs.map +1 -1
  701. package/dist/surfaces/cli/index.mjs +45 -14
  702. package/dist/surfaces/cli/index.mjs.map +1 -1
  703. package/dist/surfaces/cli/output.mjs.map +1 -1
  704. package/dist/surfaces/cli/sysexits.mjs.map +1 -1
  705. package/dist/surfaces/tui/app.mjs +0 -21
  706. package/dist/surfaces/tui/app.mjs.map +1 -1
  707. package/dist/surfaces/tui/dashboard.mjs +0 -48
  708. package/dist/surfaces/tui/dashboard.mjs.map +1 -1
  709. package/dist/surfaces/tui/display-derivation.mjs +80 -16
  710. package/dist/surfaces/tui/display-derivation.mjs.map +1 -1
  711. package/dist/surfaces/tui/errors.mjs.map +1 -1
  712. package/dist/surfaces/tui/event-log.mjs +0 -9
  713. package/dist/surfaces/tui/event-log.mjs.map +1 -1
  714. package/dist/surfaces/tui/heartbeat.mjs.map +1 -1
  715. package/dist/surfaces/tui/index.mjs +2 -2
  716. package/dist/surfaces/tui/index.mjs.map +1 -1
  717. package/dist/surfaces/tui/input.mjs.map +1 -1
  718. package/dist/surfaces/tui/mode-detect.mjs.map +1 -1
  719. package/dist/surfaces/tui/mount-ink.mjs.map +1 -1
  720. package/dist/surfaces/tui/plain-renderer.mjs +26 -19
  721. package/dist/surfaces/tui/plain-renderer.mjs.map +1 -1
  722. package/dist/surfaces/tui/resource-table.mjs +8 -10
  723. package/dist/surfaces/tui/resource-table.mjs.map +1 -1
  724. package/images/postgres/Dockerfile +0 -1
  725. package/images/sui/Dockerfile +27 -54
  726. package/images/sui/entrypoint.sh +17 -179
  727. package/package.json +23 -15
  728. package/dashboard-ui/assets/index-Bmi1UtAg.js +0 -1356
  729. package/dashboard-ui/assets/index-D5EShVt4.js +0 -3
  730. package/dashboard-ui/assets/index-Deml9drg.css +0 -1
  731. package/dist/api/plugin-errors.d.mts +0 -7
  732. package/dist/api/plugin-errors.mjs +0 -10
  733. package/dist/api/plugin-errors.mjs.map +0 -1
  734. package/dist/cli/wirings/build-verb-layers.mjs +0 -42
  735. package/dist/cli/wirings/build-verb-layers.mjs.map +0 -1
  736. package/dist/contracts/capability-decl.d.mts +0 -40
  737. package/dist/orchestrators/built-in-plugin-layers.mjs +0 -54
  738. package/dist/orchestrators/built-in-plugin-layers.mjs.map +0 -1
  739. package/dist/orchestrators/run.mjs +0 -91
  740. package/dist/orchestrators/run.mjs.map +0 -1
  741. package/dist/orchestrators/runtime-composition.d.mts +0 -10
  742. package/dist/orchestrators/runtime-composition.mjs +0 -252
  743. package/dist/orchestrators/runtime-composition.mjs.map +0 -1
  744. package/dist/orchestrators/snapshot/capture-command.d.mts +0 -1
  745. package/dist/orchestrators/snapshot/capture-command.mjs +0 -25
  746. package/dist/orchestrators/snapshot/capture-command.mjs.map +0 -1
  747. package/dist/orchestrators/snapshot/pending-marker.mjs +0 -99
  748. package/dist/orchestrators/snapshot/pending-marker.mjs.map +0 -1
  749. package/dist/orchestrators/snapshot/recover-pending.mjs +0 -223
  750. package/dist/orchestrators/snapshot/recover-pending.mjs.map +0 -1
  751. package/dist/orchestrators/snapshot/state-document.d.mts +0 -1
  752. package/dist/orchestrators/snapshot/state-document.mjs +0 -58
  753. package/dist/orchestrators/snapshot/state-document.mjs.map +0 -1
  754. package/dist/plugins/account/spans.mjs +0 -16
  755. package/dist/plugins/account/spans.mjs.map +0 -1
  756. package/dist/plugins/account/variants/env.mjs +0 -24
  757. package/dist/plugins/account/variants/env.mjs.map +0 -1
  758. package/dist/plugins/account/variants/inline.mjs +0 -13
  759. package/dist/plugins/account/variants/inline.mjs.map +0 -1
  760. package/dist/plugins/account/variants/keystore.mjs +0 -91
  761. package/dist/plugins/account/variants/keystore.mjs.map +0 -1
  762. package/dist/plugins/action/spans.mjs +0 -11
  763. package/dist/plugins/action/spans.mjs.map +0 -1
  764. package/dist/plugins/coin/spans.mjs +0 -20
  765. package/dist/plugins/coin/spans.mjs.map +0 -1
  766. package/dist/plugins/deepbook/spans.mjs +0 -18
  767. package/dist/plugins/deepbook/spans.mjs.map +0 -1
  768. package/dist/plugins/faucet/spans.mjs +0 -12
  769. package/dist/plugins/faucet/spans.mjs.map +0 -1
  770. package/dist/plugins/package/spans.mjs +0 -14
  771. package/dist/plugins/package/spans.mjs.map +0 -1
  772. package/dist/plugins/postgres/codegen.mjs +0 -42
  773. package/dist/plugins/postgres/codegen.mjs.map +0 -1
  774. package/dist/plugins/postgres/connection.d.mts +0 -33
  775. package/dist/plugins/postgres/connection.mjs.map +0 -1
  776. package/dist/plugins/postgres/db-ensure.mjs.map +0 -1
  777. package/dist/plugins/postgres/errors.d.mts +0 -60
  778. package/dist/plugins/postgres/errors.mjs +0 -29
  779. package/dist/plugins/postgres/errors.mjs.map +0 -1
  780. package/dist/plugins/postgres/index.d.mts +0 -37
  781. package/dist/plugins/postgres/index.mjs +0 -68
  782. package/dist/plugins/postgres/index.mjs.map +0 -1
  783. package/dist/plugins/postgres/routable.mjs +0 -33
  784. package/dist/plugins/postgres/routable.mjs.map +0 -1
  785. package/dist/plugins/postgres/service.d.mts +0 -50
  786. package/dist/plugins/postgres/service.mjs +0 -179
  787. package/dist/plugins/postgres/service.mjs.map +0 -1
  788. package/dist/plugins/postgres/snapshot.mjs +0 -32
  789. package/dist/plugins/postgres/snapshot.mjs.map +0 -1
  790. package/dist/plugins/postgres/spans.mjs +0 -11
  791. package/dist/plugins/postgres/spans.mjs.map +0 -1
  792. package/dist/plugins/seal/spans.mjs +0 -18
  793. package/dist/plugins/seal/spans.mjs.map +0 -1
  794. package/dist/plugins/sui/spans.mjs +0 -17
  795. package/dist/plugins/sui/spans.mjs.map +0 -1
  796. package/dist/plugins/wallet/spans.mjs +0 -22
  797. package/dist/plugins/wallet/spans.mjs.map +0 -1
  798. package/dist/plugins/walrus/registry-publish.d.mts +0 -24
  799. package/dist/plugins/walrus/spans.mjs +0 -18
  800. package/dist/plugins/walrus/spans.mjs.map +0 -1
  801. package/dist/runtime/docker/logs.d.mts +0 -1
  802. package/dist/runtime/docker/logs.mjs +0 -34
  803. package/dist/runtime/docker/logs.mjs.map +0 -1
  804. package/dist/substrate/runtime/artifact-publisher/index.mjs +0 -86
  805. package/dist/substrate/runtime/artifact-publisher/index.mjs.map +0 -1
  806. package/dist/substrate/runtime/capability-sinks/index.d.mts +0 -1
  807. package/dist/substrate/runtime/capability-sinks/index.mjs +0 -3
  808. package/dist/substrate/runtime/capability-sinks/layer.d.mts +0 -1
  809. package/dist/substrate/runtime/capability-sinks/layer.mjs +0 -31
  810. package/dist/substrate/runtime/capability-sinks/layer.mjs.map +0 -1
  811. package/dist/substrate/runtime/capability-sinks/service.d.mts +0 -95
  812. package/dist/substrate/runtime/capability-sinks/service.mjs +0 -69
  813. package/dist/substrate/runtime/capability-sinks/service.mjs.map +0 -1
  814. package/dist/substrate/runtime/cross-process/lock.d.mts +0 -1
  815. package/dist/substrate/runtime/cross-process/lock.mjs +0 -23
  816. package/dist/substrate/runtime/cross-process/lock.mjs.map +0 -1
  817. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs +0 -113
  818. package/dist/substrate/runtime/cross-process/snapshot-reservation.mjs.map +0 -1
  819. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs +0 -31
  820. package/dist/substrate/runtime/lifecycle/lifecycle-fact.mjs.map +0 -1
  821. package/dist/substrate/runtime/observability/formatter-registry.d.mts +0 -1
  822. package/dist/substrate/runtime/observability/formatter-registry.mjs +0 -48
  823. package/dist/substrate/runtime/observability/formatter-registry.mjs.map +0 -1
  824. package/dist/substrate/runtime/observability/span-store.d.mts +0 -1
  825. package/dist/substrate/runtime/observability/span-store.mjs +0 -110
  826. package/dist/substrate/runtime/observability/span-store.mjs.map +0 -1
  827. package/dist/substrate/runtime/observability/spans.d.mts +0 -1
  828. package/dist/substrate/runtime/observability/spans.mjs +0 -87
  829. package/dist/substrate/runtime/observability/spans.mjs.map +0 -1
  830. package/dist/substrate/runtime/projection/index.mjs +0 -4
  831. package/dist/substrate/runtime/projection/persisted.mjs +0 -213
  832. package/dist/substrate/runtime/projection/persisted.mjs.map +0 -1
  833. package/dist/substrate/runtime/scoped-multimap/service.mjs +0 -52
  834. package/dist/substrate/runtime/scoped-multimap/service.mjs.map +0 -1
  835. package/dist/substrate/runtime/scoped-ref-map/index.mjs +0 -2
  836. package/dist/substrate/runtime/scoped-ref-map/service.mjs +0 -83
  837. package/dist/substrate/runtime/scoped-ref-map/service.mjs.map +0 -1
  838. package/dist/substrate/runtime/state-store/index.mjs +0 -3
  839. package/dist/substrate/runtime/state-store/schema.d.mts +0 -1
  840. package/dist/substrate/runtime/state-store/schema.mjs +0 -41
  841. package/dist/substrate/runtime/state-store/schema.mjs.map +0 -1
  842. package/dist/substrate/runtime/state-store/service.d.mts +0 -1
  843. package/dist/substrate/runtime/state-store/service.mjs +0 -145
  844. package/dist/substrate/runtime/state-store/service.mjs.map +0 -1
  845. package/dist/substrate/runtime/sui-execute/index.mjs.map +0 -1
  846. package/dist/substrate/runtime/sui-execute/sign-and-dispatch.mjs.map +0 -1
  847. package/dist/substrate/runtime/sui-ledger/object-ref.mjs.map +0 -1
  848. package/dist/substrate/runtime/sui-move-build/index.mjs.map +0 -1
  849. package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs +0 -151
  850. package/dist/substrate/runtime/supervisor/dispatch-contributions.mjs.map +0 -1
  851. package/dist/substrate/state-store.d.mts +0 -1
  852. /package/dist/orchestrators/{snapshot/pending-marker.d.mts → codegen/id-config.d.mts} +0 -0
  853. /package/dist/orchestrators/snapshot/{recover-pending.d.mts → interrupted-restore.d.mts} +0 -0
  854. /package/dist/{substrate/runtime/sui-execute → plugins/sui/exec}/sign-and-dispatch.d.mts +0 -0
  855. /package/dist/plugins/{postgres/snapshot.d.mts → sui/ledger/object-ref.d.mts} +0 -0
  856. /package/dist/{substrate/runtime/sui-move-build → plugins/sui/move}/index.d.mts +0 -0
  857. /package/dist/substrate/runtime/{state-store/index.d.mts → reconcile/graph.d.mts} +0 -0
  858. /package/dist/substrate/runtime/{cross-process/snapshot-reservation.d.mts → supervisor/contribution-dispatcher.d.mts} +0 -0
@@ -1,223 +0,0 @@
1
- import { decodeUnknown, parseJsonText } from "../../substrate/runtime/runtime-decode.mjs";
2
- import { RestorePendingDocumentSchema, pendingMarkerPath, removePendingMarker, rewritePendingMarkerContainers, writePendingMarker } from "./pending-marker.mjs";
3
- import { Effect, FileSystem, Schema } from "effect";
4
- //#region src/orchestrators/snapshot/recover-pending.ts
5
- /** Tagged failure surfaced by the recovery scanner. The `kind`
6
- * discriminator lets the supervisor decide how to react: a corrupt
7
- * marker is investigable but not fatal (the operator can repair the
8
- * Docker side manually); a Docker daemon outage is transient. */
9
- var RestorePendingRecoveryError = class extends Schema.TaggedErrorClass()("SnapshotRestorePendingRecoveryError", {
10
- kind: Schema.Literals([
11
- "marker-io",
12
- "marker-decode",
13
- "retag",
14
- "rewrite"
15
- ]),
16
- detail: Schema.String,
17
- path: Schema.optional(Schema.String),
18
- entry: Schema.optional(Schema.Struct({
19
- plugin: Schema.String,
20
- role: Schema.String,
21
- targetImageName: Schema.String,
22
- stagedImageTag: Schema.String,
23
- digest: Schema.String
24
- })),
25
- cause: Schema.optional(Schema.Defect)
26
- }) {};
27
- const readMarker = (stackRoot) => Effect.gen(function* () {
28
- const fs = yield* FileSystem.FileSystem;
29
- const path = pendingMarkerPath(stackRoot);
30
- if (!(yield* fs.exists(path).pipe(Effect.catch(() => Effect.succeed(false))))) return { kind: "absent" };
31
- const raw = yield* parseJsonText(yield* fs.readFileString(path).pipe(Effect.catch((cause) => Effect.fail(new RestorePendingRecoveryError({
32
- kind: "marker-io",
33
- path,
34
- detail: `read pending marker failed`,
35
- cause
36
- })))), {
37
- source: path,
38
- mkError: (issue) => new RestorePendingRecoveryError({
39
- kind: "marker-decode",
40
- path,
41
- detail: `pending marker is not valid JSON`,
42
- cause: issue.cause
43
- })
44
- });
45
- const peekedVersion = typeof raw === "object" && raw !== null && "version" in raw ? raw.version : void 0;
46
- if (!SUPPORTED_MARKER_VERSIONS.has(peekedVersion)) return {
47
- kind: "unsupported-version",
48
- version: peekedVersion,
49
- path
50
- };
51
- const decoded = yield* decodeUnknown(RestorePendingDocumentSchema, raw, {
52
- source: path,
53
- mkError: (issue) => new RestorePendingRecoveryError({
54
- kind: "marker-decode",
55
- path,
56
- detail: `pending marker failed schema decode`,
57
- cause: issue.cause
58
- })
59
- });
60
- switch (decoded.version) {
61
- case 2: return {
62
- kind: "present",
63
- doc: decoded
64
- };
65
- }
66
- });
67
- /** Set of versions the Union decoder above accepts. Keep in sync with
68
- * the arms of `RestorePendingDocumentSchema` in `pending-marker.ts` —
69
- * the peek uses this to distinguish "stale/future marker version" from
70
- * "blob shape mismatch within a known version". */
71
- const SUPPORTED_MARKER_VERSIONS = new Set([2]);
72
- const rewriteMarker = (stackRoot, doc, stillPending) => writePendingMarker(stackRoot, rewritePendingMarkerContainers(doc, stillPending)).pipe(Effect.catchTag("SnapshotRestorePendingMarkerIoError", (err) => Effect.fail(new RestorePendingRecoveryError({
73
- kind: "rewrite",
74
- path: err.path,
75
- detail: err.detail,
76
- cause: err.cause
77
- }))));
78
- /** Probe whether the snapshot's EXPECTED image (addressed by its
79
- * content digest) is resolvable on the host, and if so (re)point
80
- * `targetImageName` at it.
81
- *
82
- * We deliberately do NOT self-tag the target NAME here. A self-tag of
83
- * `targetImageName` onto itself succeeds for ANY image that happens to
84
- * sit at that name — including a wholly unrelated managed/base/pulled
85
- * image that merely collides with the recorded name. In the prune
86
- * scenario (source pruned out-of-band) that name-existence check would
87
- * false-positive: it drops the marker as "recovered" while the
88
- * snapshot's committed image was never promoted, booting the container
89
- * from the WRONG image with the marker silently cleared.
90
- *
91
- * Instead we address the marker's `digest` (the loaded image's
92
- * content-addressed `{{.Id}}`, written by the restore promote loop).
93
- * The contract resolves `tag ?? digest`, so `tagImage({ digest }, …)`
94
- * tags the EXPECTED image onto `targetImageName`:
95
- *
96
- * - expected image still resident by digest (a prior recovery
97
- * promoted it; the digest survives `docker system prune` while any
98
- * pinned layer keeps it accessible) → tag succeeds, the name is
99
- * (idempotently) repaired to point at exactly the snapshot image →
100
- * genuinely recovered, drop the marker entry;
101
- * - expected image genuinely gone (digest absent) → tag fails →
102
- * keep the entry pending.
103
- *
104
- * This is strictly stronger than the old name-existence probe: a
105
- * colliding unrelated image at `targetImageName` can no longer trigger
106
- * a false drop, because the probe never addresses the name as a source
107
- * — only the expected content digest can satisfy it. It also closes
108
- * the silent-wrong-image hole by leaving `targetImageName` pointing at
109
- * the right image when it does succeed.
110
- *
111
- * `true` → expected image promoted/confirmed at the target name;
112
- * `false` → expected image absent OR the probe hit a transient daemon
113
- * error. The caller treats `false` as still-pending, so a transient
114
- * probe failure errs on the safe side (keep the marker, retry next
115
- * supervise) rather than dropping it. */
116
- const targetImageResolves = (entry, runtime) => runtime.tagImage({ digest: entry.digest }, entry.targetImageName).pipe(Effect.as(true), Effect.catch(() => Effect.succeed(false)));
117
- /** Attempt to re-tag the target image from each known identity in
118
- * decreasing-likelihood-of-success order:
119
- *
120
- * 1. `stagedImageTag` — what the original promote loop was retagging
121
- * from. Survives the simplest crash (no Docker mutation between
122
- * crash and restart).
123
- * 2. `digest` — the loaded image's content-addressed identity.
124
- * Survives `docker system prune` because the digest IS the image:
125
- * any pinned layer keeps the image accessible by digest even
126
- * after every tag pointing at it has been removed.
127
- *
128
- * When BOTH source attempts fail we must NOT blindly report the entry
129
- * as still-pending: a fully missing source (both staged tag and digest
130
- * gone as *named/tagged* refs) can mean a *previous* recovery already
131
- * promoted this entry to `targetImageName` and a stale marker simply
132
- * hasn't been rewritten. Collapsing that case into "still pending"
133
- * retags forever and never makes progress. So after both attempts fail
134
- * we PROBE whether the EXPECTED image is still resolvable BY ITS
135
- * CONTENT DIGEST (see `targetImageResolves`) — not by the target name:
136
- *
137
- * - expected image resolves → (re)point `targetImageName` at it and
138
- * treat the entry as recovered (drop the marker entry);
139
- * - expected image absent → the snapshot image genuinely vanished
140
- * without a completed promote (e.g. a transient daemon error on
141
- * both tag attempts, or operator prune of source AND target), so
142
- * keep the entry pending for the next supervise.
143
- *
144
- * Probing the digest rather than the name is what makes this safe: it
145
- * stops conflating "absent source because already recovered" with
146
- * "transient daemon error", AND prevents an unrelated image that
147
- * happens to occupy `targetImageName` from masquerading as a completed
148
- * recovery (the wrong-image hole a bare name-existence check left open). */
149
- const tryRecoverEntry = (entry, runtime) => Effect.gen(function* () {
150
- if (yield* runtime.tagImage({
151
- digest: entry.digest,
152
- tag: entry.stagedImageTag
153
- }, entry.targetImageName, { removeSourceAfterTag: true }).pipe(Effect.as(true), Effect.catch(() => Effect.succeed(false)))) return true;
154
- if (yield* runtime.tagImage({ digest: entry.digest }, entry.targetImageName, { removeSourceAfterTag: true }).pipe(Effect.as(true), Effect.catch(() => Effect.succeed(false)))) return true;
155
- return yield* targetImageResolves(entry, runtime);
156
- });
157
- /** Read the restore-pending marker for this stack root and retry any
158
- * outstanding image promotions. Idempotent. The supervisor calls this
159
- * BEFORE any plugin acquire, so a half-promoted snapshot restore is
160
- * reconciled before L2 lookups observe the runtime tree.
161
- *
162
- * Returns a typed summary instead of failing on partial recovery —
163
- * the supervisor surfaces "marker remains, N entries outstanding"
164
- * via the cascade-formatter so the operator can decide whether to
165
- * re-restore or repair Docker out of band. Only marker IO/decode
166
- * failures escape as `RestorePendingRecoveryError`. */
167
- const recoverPendingRestore = (stackRoot, runtime) => Effect.gen(function* () {
168
- const result = yield* readMarker(stackRoot);
169
- if (result.kind === "absent") return {
170
- noMarker: true,
171
- snapshotId: null,
172
- inspected: 0,
173
- recovered: 0,
174
- stillPending: [],
175
- markerCleared: false
176
- };
177
- if (result.kind === "unsupported-version") {
178
- yield* Effect.logWarning(`snapshot restore-pending marker at ${result.path} has unsupported version ${String(result.version)} (expected 2); leaving on disk for operator review`);
179
- return {
180
- noMarker: true,
181
- snapshotId: null,
182
- inspected: 0,
183
- recovered: 0,
184
- stillPending: [],
185
- markerCleared: false
186
- };
187
- }
188
- const doc = result.doc;
189
- yield* Effect.annotateCurrentSpan({
190
- "devstack.snapshot.recovery.snapshotId": doc.snapshotId,
191
- "devstack.snapshot.recovery.pending": doc.containers.length
192
- });
193
- const stillPending = [];
194
- let recovered = 0;
195
- for (let i = 0; i < doc.containers.length; i += 1) {
196
- const entry = doc.containers[i];
197
- if (yield* tryRecoverEntry(entry, runtime)) recovered += 1;
198
- else stillPending.push(entry);
199
- yield* rewriteMarker(stackRoot, doc, [...stillPending, ...doc.containers.slice(i + 1)]);
200
- }
201
- let markerCleared = false;
202
- if (stillPending.length === 0) {
203
- yield* removePendingMarker(stackRoot).pipe(Effect.catchTag("SnapshotRestorePendingMarkerIoError", (err) => Effect.fail(new RestorePendingRecoveryError({
204
- kind: "marker-io",
205
- path: err.path,
206
- detail: err.detail,
207
- cause: err.cause
208
- }))));
209
- markerCleared = true;
210
- } else yield* rewriteMarker(stackRoot, doc, stillPending);
211
- return {
212
- noMarker: false,
213
- snapshotId: doc.snapshotId,
214
- inspected: doc.containers.length,
215
- recovered,
216
- stillPending,
217
- markerCleared
218
- };
219
- }).pipe(Effect.withSpan("orchestrator.snapshot.recover-pending"));
220
- //#endregion
221
- export { RestorePendingRecoveryError, recoverPendingRestore };
222
-
223
- //# sourceMappingURL=recover-pending.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"recover-pending.mjs","names":[],"sources":["../../../src/orchestrators/snapshot/recover-pending.ts"],"sourcesContent":["// Restore-pending recovery scanner.\n//\n// Recovery contract (mirrors the writer in `pending-marker.ts`):\n//\n// 1. The supervise startup hook calls `recoverPendingRestore` before\n// any plugin acquire fires, so a half-promoted set of images is\n// reconciled before any L2 lookup observes the runtime root.\n// 2. The scanner reads `${stackRoot}/snapshot.restore-pending.json`.\n// Absent marker → no recovery needed, return immediately.\n// 3. For each outstanding entry it asks the runtime to tag the\n// source onto the target name (`removeSourceAfterTag: true`).\n// The source is resolved by trying, in order: (a) the staging\n// tag, (b) the digest. The digest fallback covers the case\n// where Docker has dropped the staging tag too (e.g. operator\n// `docker system prune` between crash and restart) — the digest\n// is the image's content-addressed identity and survives prune.\n// Successful tag → entry recovered; rewrite the marker with the\n// entry removed. When BOTH source attempts fail the scanner\n// probes whether the EXPECTED image (addressed by its content\n// digest) is still resolvable — a prior recovery may have promoted\n// it and left the digest resident; if so it (re)points\n// `targetImageName` at that image and treats the entry as\n// recovered, otherwise it stays pending. The probe addresses the\n// digest, NOT the target name, so a colliding unrelated image at\n// `targetImageName` cannot false-positive a drop.\n// 4. When the outstanding list reaches zero, remove the marker.\n// 5. On a genuine per-entry failure (both sources gone AND the\n// target not yet visible — e.g. a transient daemon error): keep\n// the entry in the marker so the next supervise retries. The\n// scanner returns a typed summary so the supervisor can surface\n// the partial-recovery state without crashing the boot path.\n//\n// Idempotency: a marker with `containers: []` is treated as\n// already-recovered and removed in one call. Re-running the scanner\n// against a marker for an image that has already been tagged by an\n// out-of-band operator is also safe — `tagImage` is idempotent on the\n// happy path and the failure on a missing staged source is treated\n// as \"entry already recovered\" if the target image is now visible.\n//\n// The scanner sits next to `restore.ts` and shares the marker\n// schema/IO with it via `pending-marker.ts`. The supervisor calls in\n// via `SnapshotOrchestratorService.recoverPendingRestore`, so the L1\n// docker layer requirement is satisfied through the existing service\n// composition — no new substrate plumbing.\n\nimport { Effect, FileSystem, Schema } from 'effect';\n\nimport type { ContainerRuntime } from '../../contracts/container-runtime.ts';\nimport { decodeUnknown, parseJsonText } from '../../substrate/runtime/runtime-decode.ts';\nimport {\n\tpendingMarkerPath,\n\tremovePendingMarker,\n\tRestorePendingMarkerIoError,\n\tRestorePendingDocumentSchema,\n\trewritePendingMarkerContainers,\n\tSNAPSHOT_RESTORE_PENDING_VERSION,\n\twritePendingMarker,\n\ttype RestorePendingContainer,\n\ttype RestorePendingDocument,\n} from './pending-marker.ts';\n\n// -----------------------------------------------------------------------------\n// Errors\n// -----------------------------------------------------------------------------\n\n/** Tagged failure surfaced by the recovery scanner. The `kind`\n * discriminator lets the supervisor decide how to react: a corrupt\n * marker is investigable but not fatal (the operator can repair the\n * Docker side manually); a Docker daemon outage is transient. */\nexport class RestorePendingRecoveryError extends Schema.TaggedErrorClass<RestorePendingRecoveryError>()(\n\t'SnapshotRestorePendingRecoveryError',\n\t{\n\t\tkind: Schema.Literals(['marker-io', 'marker-decode', 'retag', 'rewrite']),\n\t\tdetail: Schema.String,\n\t\tpath: Schema.optional(Schema.String),\n\t\tentry: Schema.optional(\n\t\t\tSchema.Struct({\n\t\t\t\tplugin: Schema.String,\n\t\t\t\trole: Schema.String,\n\t\t\t\ttargetImageName: Schema.String,\n\t\t\t\tstagedImageTag: Schema.String,\n\t\t\t\tdigest: Schema.String,\n\t\t\t}),\n\t\t),\n\t\tcause: Schema.optional(Schema.Defect),\n\t},\n) {}\n\n// -----------------------------------------------------------------------------\n// Summary surface\n// -----------------------------------------------------------------------------\n\nexport interface RestorePendingRecoverySummary {\n\t/** True when no marker was present at the runtime root. */\n\treadonly noMarker: boolean;\n\t/** Snapshot id whose restore was interrupted; null when noMarker. */\n\treadonly snapshotId: string | null;\n\t/** Number of pending entries the scanner observed. */\n\treadonly inspected: number;\n\t/** Number of entries successfully retagged. */\n\treadonly recovered: number;\n\t/** Entries still pending after the scanner finished. Empty in the\n\t * happy path; populated when one or more retags failed. */\n\treadonly stillPending: ReadonlyArray<RestorePendingContainer>;\n\t/** True when the marker was removed (every entry recovered or\n\t * marker started empty). */\n\treadonly markerCleared: boolean;\n}\n\n// -----------------------------------------------------------------------------\n// Internal helpers\n// -----------------------------------------------------------------------------\n\n/** Result of reading a marker on disk. `unsupported-version` covers\n * stale pre-v2 markers whose schema can't safely be recovered (the\n * v1 shape had no `digest` per entry, and digest is the only identity\n * that survives `docker system prune`); the Union decode fails them\n * cleanly and the scanner surfaces them as \"leave on disk for\n * operator review\" rather than as a fatal decode error. */\ntype ReadMarkerResult =\n\t| { readonly kind: 'absent' }\n\t| { readonly kind: 'unsupported-version'; readonly version: unknown; readonly path: string }\n\t| { readonly kind: 'present'; readonly doc: RestorePendingDocument };\n\nconst readMarker = (\n\tstackRoot: string,\n): Effect.Effect<ReadMarkerResult, RestorePendingRecoveryError, FileSystem.FileSystem> =>\n\tEffect.gen(function* () {\n\t\tconst fs = yield* FileSystem.FileSystem;\n\t\tconst path = pendingMarkerPath(stackRoot);\n\t\tconst exists = yield* fs.exists(path).pipe(Effect.catch(() => Effect.succeed(false)));\n\t\tif (!exists) return { kind: 'absent' } as const;\n\t\tconst text = yield* fs.readFileString(path).pipe(\n\t\t\tEffect.catch(\n\t\t\t\t(cause): Effect.Effect<never, RestorePendingRecoveryError> =>\n\t\t\t\t\tEffect.fail(\n\t\t\t\t\t\tnew RestorePendingRecoveryError({\n\t\t\t\t\t\t\tkind: 'marker-io',\n\t\t\t\t\t\t\tpath,\n\t\t\t\t\t\t\tdetail: `read pending marker failed`,\n\t\t\t\t\t\t\tcause,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\tconst raw = yield* parseJsonText(text, {\n\t\t\tsource: path,\n\t\t\tmkError: (issue) =>\n\t\t\t\tnew RestorePendingRecoveryError({\n\t\t\t\t\tkind: 'marker-decode',\n\t\t\t\t\tpath,\n\t\t\t\t\tdetail: `pending marker is not valid JSON`,\n\t\t\t\t\tcause: issue.cause,\n\t\t\t\t}),\n\t\t});\n\t\t// The schema is a `Schema.Union` of every supported marker\n\t\t// version (currently just v2). We peek the discriminant before\n\t\t// the full Union decode so a stale pre-v2 (or future-v3)\n\t\t// marker is reported as `unsupported-version` rather than as a\n\t\t// schema-decode failure — the supervisor surfaces them\n\t\t// differently (operator-review vs corrupt-JSON). A blob whose\n\t\t// `version` matches a known arm but whose inner shape is\n\t\t// malformed still surfaces as `marker-decode`. Future v3\n\t\t// migration appends an arm to the Union in `pending-marker.ts`,\n\t\t// adds the literal to `SUPPORTED_MARKER_VERSIONS`, and adds a\n\t\t// matching `case` in the switch below.\n\t\tconst peekedVersion =\n\t\t\ttypeof raw === 'object' && raw !== null && 'version' in raw\n\t\t\t\t? (raw as { readonly version: unknown }).version\n\t\t\t\t: undefined;\n\t\tif (!SUPPORTED_MARKER_VERSIONS.has(peekedVersion as number)) {\n\t\t\treturn {\n\t\t\t\tkind: 'unsupported-version',\n\t\t\t\tversion: peekedVersion,\n\t\t\t\tpath,\n\t\t\t} as const;\n\t\t}\n\t\tconst decoded: RestorePendingDocument = yield* decodeUnknown(\n\t\t\tRestorePendingDocumentSchema,\n\t\t\traw,\n\t\t\t{\n\t\t\t\tsource: path,\n\t\t\t\tmkError: (issue) =>\n\t\t\t\t\tnew RestorePendingRecoveryError({\n\t\t\t\t\t\tkind: 'marker-decode',\n\t\t\t\t\t\tpath,\n\t\t\t\t\t\tdetail: `pending marker failed schema decode`,\n\t\t\t\t\t\tcause: issue.cause,\n\t\t\t\t\t}),\n\t\t\t},\n\t\t);\n\t\t// Today the Union has one arm (v2). A future v3 migration adds a\n\t\t// `case 3:` arm here AND extends `SUPPORTED_MARKER_VERSIONS`; the\n\t\t// unsupported-version branch becomes reachable once the Union\n\t\t// grows. With a single-arm Union, TypeScript narrows `decoded`\n\t\t// to `never` after `case 2`, so this single return is exhaustive.\n\t\tswitch (decoded.version) {\n\t\t\tcase 2:\n\t\t\t\treturn { kind: 'present', doc: decoded } as const;\n\t\t}\n\t});\n\n/** Set of versions the Union decoder above accepts. Keep in sync with\n * the arms of `RestorePendingDocumentSchema` in `pending-marker.ts` —\n * the peek uses this to distinguish \"stale/future marker version\" from\n * \"blob shape mismatch within a known version\". */\nconst SUPPORTED_MARKER_VERSIONS = new Set<number>([SNAPSHOT_RESTORE_PENDING_VERSION]);\n\nconst rewriteMarker = (\n\tstackRoot: string,\n\tdoc: RestorePendingDocument,\n\tstillPending: ReadonlyArray<RestorePendingContainer>,\n): Effect.Effect<void, RestorePendingRecoveryError, FileSystem.FileSystem> =>\n\twritePendingMarker(stackRoot, rewritePendingMarkerContainers(doc, stillPending)).pipe(\n\t\tEffect.catchTag('SnapshotRestorePendingMarkerIoError', (err: RestorePendingMarkerIoError) =>\n\t\t\tEffect.fail(\n\t\t\t\tnew RestorePendingRecoveryError({\n\t\t\t\t\tkind: 'rewrite',\n\t\t\t\t\tpath: err.path,\n\t\t\t\t\tdetail: err.detail,\n\t\t\t\t\tcause: err.cause,\n\t\t\t\t}),\n\t\t\t),\n\t\t),\n\t);\n\n/** Probe whether the snapshot's EXPECTED image (addressed by its\n * content digest) is resolvable on the host, and if so (re)point\n * `targetImageName` at it.\n *\n * We deliberately do NOT self-tag the target NAME here. A self-tag of\n * `targetImageName` onto itself succeeds for ANY image that happens to\n * sit at that name — including a wholly unrelated managed/base/pulled\n * image that merely collides with the recorded name. In the prune\n * scenario (source pruned out-of-band) that name-existence check would\n * false-positive: it drops the marker as \"recovered\" while the\n * snapshot's committed image was never promoted, booting the container\n * from the WRONG image with the marker silently cleared.\n *\n * Instead we address the marker's `digest` (the loaded image's\n * content-addressed `{{.Id}}`, written by the restore promote loop).\n * The contract resolves `tag ?? digest`, so `tagImage({ digest }, …)`\n * tags the EXPECTED image onto `targetImageName`:\n *\n * - expected image still resident by digest (a prior recovery\n * promoted it; the digest survives `docker system prune` while any\n * pinned layer keeps it accessible) → tag succeeds, the name is\n * (idempotently) repaired to point at exactly the snapshot image →\n * genuinely recovered, drop the marker entry;\n * - expected image genuinely gone (digest absent) → tag fails →\n * keep the entry pending.\n *\n * This is strictly stronger than the old name-existence probe: a\n * colliding unrelated image at `targetImageName` can no longer trigger\n * a false drop, because the probe never addresses the name as a source\n * — only the expected content digest can satisfy it. It also closes\n * the silent-wrong-image hole by leaving `targetImageName` pointing at\n * the right image when it does succeed.\n *\n * `true` → expected image promoted/confirmed at the target name;\n * `false` → expected image absent OR the probe hit a transient daemon\n * error. The caller treats `false` as still-pending, so a transient\n * probe failure errs on the safe side (keep the marker, retry next\n * supervise) rather than dropping it. */\nconst targetImageResolves = (\n\tentry: RestorePendingContainer,\n\truntime: ContainerRuntime,\n): Effect.Effect<boolean> =>\n\truntime\n\t\t// Address the EXPECTED image by its content digest (NOT the target\n\t\t// name). `{ digest }` with `tag` omitted forces the contract's\n\t\t// `tag ?? digest` resolution onto the digest, so only the snapshot's\n\t\t// committed image can satisfy this — a name collision cannot.\n\t\t.tagImage({ digest: entry.digest }, entry.targetImageName)\n\t\t.pipe(\n\t\t\tEffect.as(true as const),\n\t\t\tEffect.catch(() => Effect.succeed(false as const)),\n\t\t);\n\n/** Attempt to re-tag the target image from each known identity in\n * decreasing-likelihood-of-success order:\n *\n * 1. `stagedImageTag` — what the original promote loop was retagging\n * from. Survives the simplest crash (no Docker mutation between\n * crash and restart).\n * 2. `digest` — the loaded image's content-addressed identity.\n * Survives `docker system prune` because the digest IS the image:\n * any pinned layer keeps the image accessible by digest even\n * after every tag pointing at it has been removed.\n *\n * When BOTH source attempts fail we must NOT blindly report the entry\n * as still-pending: a fully missing source (both staged tag and digest\n * gone as *named/tagged* refs) can mean a *previous* recovery already\n * promoted this entry to `targetImageName` and a stale marker simply\n * hasn't been rewritten. Collapsing that case into \"still pending\"\n * retags forever and never makes progress. So after both attempts fail\n * we PROBE whether the EXPECTED image is still resolvable BY ITS\n * CONTENT DIGEST (see `targetImageResolves`) — not by the target name:\n *\n * - expected image resolves → (re)point `targetImageName` at it and\n * treat the entry as recovered (drop the marker entry);\n * - expected image absent → the snapshot image genuinely vanished\n * without a completed promote (e.g. a transient daemon error on\n * both tag attempts, or operator prune of source AND target), so\n * keep the entry pending for the next supervise.\n *\n * Probing the digest rather than the name is what makes this safe: it\n * stops conflating \"absent source because already recovered\" with\n * \"transient daemon error\", AND prevents an unrelated image that\n * happens to occupy `targetImageName` from masquerading as a completed\n * recovery (the wrong-image hole a bare name-existence check left open). */\nconst tryRecoverEntry = (\n\tentry: RestorePendingContainer,\n\truntime: ContainerRuntime,\n): Effect.Effect<boolean> =>\n\tEffect.gen(function* () {\n\t\t// The contract's docker impl resolves `tag ?? digest`, so when\n\t\t// we want to address by digest we MUST pass `tag: undefined`\n\t\t// (omitting the field) — otherwise the staged tag would still\n\t\t// win the resolution race and we'd be re-running attempt #1.\n\t\tconst stagedFirst = yield* runtime\n\t\t\t.tagImage({ digest: entry.digest, tag: entry.stagedImageTag }, entry.targetImageName, {\n\t\t\t\tremoveSourceAfterTag: true,\n\t\t\t})\n\t\t\t.pipe(\n\t\t\t\tEffect.as(true as const),\n\t\t\t\tEffect.catch(() => Effect.succeed(false as const)),\n\t\t\t);\n\t\tif (stagedFirst) return true;\n\t\tconst digestFallback = yield* runtime\n\t\t\t.tagImage({ digest: entry.digest }, entry.targetImageName, { removeSourceAfterTag: true })\n\t\t\t.pipe(\n\t\t\t\tEffect.as(true as const),\n\t\t\t\tEffect.catch(() => Effect.succeed(false as const)),\n\t\t\t);\n\t\tif (digestFallback) return true;\n\t\t// Both source identities failed. Distinguish \"already promoted by\n\t\t// a prior recovery\" (target now visible → recovered) from a\n\t\t// genuine transient/missing-both failure (target absent → keep\n\t\t// pending). See the doc comment above.\n\t\treturn yield* targetImageResolves(entry, runtime);\n\t});\n\n// -----------------------------------------------------------------------------\n// Public entry point\n// -----------------------------------------------------------------------------\n\n/** Read the restore-pending marker for this stack root and retry any\n * outstanding image promotions. Idempotent. The supervisor calls this\n * BEFORE any plugin acquire, so a half-promoted snapshot restore is\n * reconciled before L2 lookups observe the runtime tree.\n *\n * Returns a typed summary instead of failing on partial recovery —\n * the supervisor surfaces \"marker remains, N entries outstanding\"\n * via the cascade-formatter so the operator can decide whether to\n * re-restore or repair Docker out of band. Only marker IO/decode\n * failures escape as `RestorePendingRecoveryError`. */\nexport const recoverPendingRestore = (\n\tstackRoot: string,\n\truntime: ContainerRuntime,\n): Effect.Effect<\n\tRestorePendingRecoverySummary,\n\tRestorePendingRecoveryError,\n\tFileSystem.FileSystem\n> =>\n\tEffect.gen(function* () {\n\t\tconst result = yield* readMarker(stackRoot);\n\t\tif (result.kind === 'absent') {\n\t\t\treturn {\n\t\t\t\tnoMarker: true,\n\t\t\t\tsnapshotId: null,\n\t\t\t\tinspected: 0,\n\t\t\t\trecovered: 0,\n\t\t\t\tstillPending: [],\n\t\t\t\tmarkerCleared: false,\n\t\t\t} as const;\n\t\t}\n\t\tif (result.kind === 'unsupported-version') {\n\t\t\t// Pre-upgrade marker — the schema bumped to v2 to add the\n\t\t\t// `digest` field per entry, and a v1 marker without\n\t\t\t// digests can't be safely recovered (digest is the only\n\t\t\t// identity that survives `docker system prune`). Log a\n\t\t\t// warning and leave the marker alone so the operator can\n\t\t\t// inspect / manually clean up. We treat this as\n\t\t\t// \"no recovery needed\" from the supervisor's perspective.\n\t\t\tyield* Effect.logWarning(\n\t\t\t\t`snapshot restore-pending marker at ${result.path} has unsupported version ${String(\n\t\t\t\t\tresult.version,\n\t\t\t\t)} (expected ${SNAPSHOT_RESTORE_PENDING_VERSION}); leaving on disk for operator review`,\n\t\t\t);\n\t\t\treturn {\n\t\t\t\tnoMarker: true,\n\t\t\t\tsnapshotId: null,\n\t\t\t\tinspected: 0,\n\t\t\t\trecovered: 0,\n\t\t\t\tstillPending: [],\n\t\t\t\tmarkerCleared: false,\n\t\t\t} as const;\n\t\t}\n\t\tconst doc = result.doc;\n\n\t\tyield* Effect.annotateCurrentSpan({\n\t\t\t'devstack.snapshot.recovery.snapshotId': doc.snapshotId,\n\t\t\t'devstack.snapshot.recovery.pending': doc.containers.length,\n\t\t});\n\n\t\tconst stillPending: RestorePendingContainer[] = [];\n\t\tlet recovered = 0;\n\t\tfor (let i = 0; i < doc.containers.length; i += 1) {\n\t\t\tconst entry = doc.containers[i]!;\n\t\t\tconst ok = yield* tryRecoverEntry(entry, runtime);\n\t\t\tif (ok) {\n\t\t\t\trecovered += 1;\n\t\t\t} else {\n\t\t\t\tstillPending.push(entry);\n\t\t\t}\n\t\t\t// Rewrite-after-each so a crash mid-recovery doesn't lose\n\t\t\t// the work-so-far. The new marker carries the still-pending\n\t\t\t// entries plus everything we haven't tried yet. Cheap (one\n\t\t\t// write per image, rare path). Unconditional — the rewrite\n\t\t\t// is idempotent and the final-rewrite below (or\n\t\t\t// `removePendingMarker` when nothing remains) covers steady\n\t\t\t// state.\n\t\t\tconst remaining: RestorePendingContainer[] = [\n\t\t\t\t...stillPending,\n\t\t\t\t...doc.containers.slice(i + 1),\n\t\t\t];\n\t\t\tyield* rewriteMarker(stackRoot, doc, remaining);\n\t\t}\n\n\t\tlet markerCleared = false;\n\t\tif (stillPending.length === 0) {\n\t\t\tyield* removePendingMarker(stackRoot).pipe(\n\t\t\t\tEffect.catchTag('SnapshotRestorePendingMarkerIoError', (err: RestorePendingMarkerIoError) =>\n\t\t\t\t\tEffect.fail(\n\t\t\t\t\t\tnew RestorePendingRecoveryError({\n\t\t\t\t\t\t\tkind: 'marker-io',\n\t\t\t\t\t\t\tpath: err.path,\n\t\t\t\t\t\t\tdetail: err.detail,\n\t\t\t\t\t\t\tcause: err.cause,\n\t\t\t\t\t\t}),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\t\t\tmarkerCleared = true;\n\t\t} else {\n\t\t\t// Final rewrite — the per-loop rewrite covers crash-during-\n\t\t\t// recovery, this one covers the steady-state \"we finished\n\t\t\t// the loop and some entries are still pending\".\n\t\t\tyield* rewriteMarker(stackRoot, doc, stillPending);\n\t\t}\n\n\t\treturn {\n\t\t\tnoMarker: false,\n\t\t\tsnapshotId: doc.snapshotId,\n\t\t\tinspected: doc.containers.length,\n\t\t\trecovered,\n\t\t\tstillPending,\n\t\t\tmarkerCleared,\n\t\t} as const;\n\t}).pipe(Effect.withSpan('orchestrator.snapshot.recover-pending'));\n"],"mappings":";;;;;;;;AAqEA,IAAa,8BAAb,cAAiD,OAAO,kBAA+C,CACtG,uCACA;CACC,MAAM,OAAO,SAAS;EAAC;EAAa;EAAiB;EAAS;EAAU,CAAC;CACzE,QAAQ,OAAO;CACf,MAAM,OAAO,SAAS,OAAO,OAAO;CACpC,OAAO,OAAO,SACb,OAAO,OAAO;EACb,QAAQ,OAAO;EACf,MAAM,OAAO;EACb,iBAAiB,OAAO;EACxB,gBAAgB,OAAO;EACvB,QAAQ,OAAO;EACf,CAAC,CACF;CACD,OAAO,OAAO,SAAS,OAAO,OAAO;CACrC,CACD,CAAC;AAsCF,MAAM,cACL,cAEA,OAAO,IAAI,aAAa;CACvB,MAAM,KAAK,OAAO,WAAW;CAC7B,MAAM,OAAO,kBAAkB,UAAU;AAEzC,KAAI,EAAC,OADiB,GAAG,OAAO,KAAK,CAAC,KAAK,OAAO,YAAY,OAAO,QAAQ,MAAM,CAAC,CAAC,EACxE,QAAO,EAAE,MAAM,UAAU;CActC,MAAM,MAAM,OAAO,cAAc,OAbb,GAAG,eAAe,KAAK,CAAC,KAC3C,OAAO,OACL,UACA,OAAO,KACN,IAAI,4BAA4B;EAC/B,MAAM;EACN;EACA,QAAQ;EACR;EACA,CAAC,CACF,CACF,CACD,EACsC;EACtC,QAAQ;EACR,UAAU,UACT,IAAI,4BAA4B;GAC/B,MAAM;GACN;GACA,QAAQ;GACR,OAAO,MAAM;GACb,CAAC;EACH,CAAC;CAYF,MAAM,gBACL,OAAO,QAAQ,YAAY,QAAQ,QAAQ,aAAa,MACpD,IAAsC,UACvC,KAAA;AACJ,KAAI,CAAC,0BAA0B,IAAI,cAAwB,CAC1D,QAAO;EACN,MAAM;EACN,SAAS;EACT;EACA;CAEF,MAAM,UAAkC,OAAO,cAC9C,8BACA,KACA;EACC,QAAQ;EACR,UAAU,UACT,IAAI,4BAA4B;GAC/B,MAAM;GACN;GACA,QAAQ;GACR,OAAO,MAAM;GACb,CAAC;EACH,CACD;AAMD,SAAQ,QAAQ,SAAhB;EACC,KAAK,EACJ,QAAO;GAAE,MAAM;GAAW,KAAK;GAAS;;EAEzC;;;;;AAMH,MAAM,4BAA4B,IAAI,IAAY,CAAA,EAAkC,CAAC;AAErF,MAAM,iBACL,WACA,KACA,iBAEA,mBAAmB,WAAW,+BAA+B,KAAK,aAAa,CAAC,CAAC,KAChF,OAAO,SAAS,wCAAwC,QACvD,OAAO,KACN,IAAI,4BAA4B;CAC/B,MAAM;CACN,MAAM,IAAI;CACV,QAAQ,IAAI;CACZ,OAAO,IAAI;CACX,CAAC,CACF,CACD,CACD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAwCF,MAAM,uBACL,OACA,YAEA,QAKE,SAAS,EAAE,QAAQ,MAAM,QAAQ,EAAE,MAAM,gBAAgB,CACzD,KACA,OAAO,GAAG,KAAc,EACxB,OAAO,YAAY,OAAO,QAAQ,MAAe,CAAC,CAClD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCH,MAAM,mBACL,OACA,YAEA,OAAO,IAAI,aAAa;AAavB,KAAI,OARuB,QACzB,SAAS;EAAE,QAAQ,MAAM;EAAQ,KAAK,MAAM;EAAgB,EAAE,MAAM,iBAAiB,EACrF,sBAAsB,MACtB,CAAC,CACD,KACA,OAAO,GAAG,KAAc,EACxB,OAAO,YAAY,OAAO,QAAQ,MAAe,CAAC,CAClD,CACe,QAAO;AAOxB,KAAI,OAN0B,QAC5B,SAAS,EAAE,QAAQ,MAAM,QAAQ,EAAE,MAAM,iBAAiB,EAAE,sBAAsB,MAAM,CAAC,CACzF,KACA,OAAO,GAAG,KAAc,EACxB,OAAO,YAAY,OAAO,QAAQ,MAAe,CAAC,CAClD,CACkB,QAAO;AAK3B,QAAO,OAAO,oBAAoB,OAAO,QAAQ;EAChD;;;;;;;;;;;AAgBH,MAAa,yBACZ,WACA,YAMA,OAAO,IAAI,aAAa;CACvB,MAAM,SAAS,OAAO,WAAW,UAAU;AAC3C,KAAI,OAAO,SAAS,SACnB,QAAO;EACN,UAAU;EACV,YAAY;EACZ,WAAW;EACX,WAAW;EACX,cAAc,EAAE;EAChB,eAAe;EACf;AAEF,KAAI,OAAO,SAAS,uBAAuB;AAQ1C,SAAO,OAAO,WACb,sCAAsC,OAAO,KAAK,2BAA2B,OAC5E,OAAO,QACP,CAAC,oDACF;AACD,SAAO;GACN,UAAU;GACV,YAAY;GACZ,WAAW;GACX,WAAW;GACX,cAAc,EAAE;GAChB,eAAe;GACf;;CAEF,MAAM,MAAM,OAAO;AAEnB,QAAO,OAAO,oBAAoB;EACjC,yCAAyC,IAAI;EAC7C,sCAAsC,IAAI,WAAW;EACrD,CAAC;CAEF,MAAM,eAA0C,EAAE;CAClD,IAAI,YAAY;AAChB,MAAK,IAAI,IAAI,GAAG,IAAI,IAAI,WAAW,QAAQ,KAAK,GAAG;EAClD,MAAM,QAAQ,IAAI,WAAW;AAE7B,MAAI,OADc,gBAAgB,OAAO,QAAQ,CAEhD,cAAa;MAEb,cAAa,KAAK,MAAM;AAazB,SAAO,cAAc,WAAW,KAAK,CAHpC,GAAG,cACH,GAAG,IAAI,WAAW,MAAM,IAAI,EAAE,CAEe,CAAC;;CAGhD,IAAI,gBAAgB;AACpB,KAAI,aAAa,WAAW,GAAG;AAC9B,SAAO,oBAAoB,UAAU,CAAC,KACrC,OAAO,SAAS,wCAAwC,QACvD,OAAO,KACN,IAAI,4BAA4B;GAC/B,MAAM;GACN,MAAM,IAAI;GACV,QAAQ,IAAI;GACZ,OAAO,IAAI;GACX,CAAC,CACF,CACD,CACD;AACD,kBAAgB;OAKhB,QAAO,cAAc,WAAW,KAAK,aAAa;AAGnD,QAAO;EACN,UAAU;EACV,YAAY,IAAI;EAChB,WAAW,IAAI,WAAW;EAC1B;EACA;EACA;EACA;EACA,CAAC,KAAK,OAAO,SAAS,wCAAwC,CAAC"}
@@ -1 +0,0 @@
1
- import { Effect, FileSystem, Schema } from "effect";
@@ -1,58 +0,0 @@
1
- import { decodeUnknown, parseJsonText } from "../../substrate/runtime/runtime-decode.mjs";
2
- import { StateDocument } from "../../substrate/runtime/state-store/schema.mjs";
3
- import "../../substrate/runtime/state-store/index.mjs";
4
- import { Effect, FileSystem, Schema } from "effect";
5
- //#region src/orchestrators/snapshot/state-document.ts
6
- /** Tagged failure raised by snapshot state-document helpers. `kind`
7
- * discriminates the failure class so downstream phase classifiers can
8
- * branch by tag, not by message substring. */
9
- var SnapshotStateDocumentError = class extends Schema.TaggedErrorClass()("SnapshotStateDocumentError", {
10
- /**
11
- * - `'read'` — filesystem read of the state document file failed.
12
- * - `'parse'` — file contents are not valid JSON.
13
- * - `'decode'` — JSON parses but does not match `StateDocument`
14
- * schema.
15
- * - `'write'` — filesystem write of the state document file failed.
16
- */
17
- kind: Schema.Literals([
18
- "read",
19
- "parse",
20
- "decode",
21
- "write"
22
- ]),
23
- detail: Schema.String,
24
- path: Schema.String,
25
- cause: Schema.optional(Schema.Defect)
26
- }) {};
27
- const fail = (kind, detail, path, cause) => Effect.fail(new SnapshotStateDocumentError({
28
- kind,
29
- detail,
30
- path,
31
- cause
32
- }));
33
- const readSnapshotStateDocument = (path) => Effect.gen(function* () {
34
- return yield* decodeUnknown(StateDocument, yield* parseJsonText(yield* (yield* FileSystem.FileSystem).readFileString(path).pipe(Effect.catch((cause) => fail("read", `read ${path} failed`, path, cause))), {
35
- source: path,
36
- mkError: (issue) => new SnapshotStateDocumentError({
37
- kind: "parse",
38
- detail: `${path} is not valid JSON`,
39
- path,
40
- cause: issue.cause
41
- })
42
- }), {
43
- source: path,
44
- mkError: (issue) => new SnapshotStateDocumentError({
45
- kind: "decode",
46
- detail: `${path} failed StateDocument schema decode`,
47
- path,
48
- cause: issue.cause
49
- })
50
- });
51
- });
52
- const writeSnapshotStateDocument = (path, doc) => Effect.gen(function* () {
53
- yield* (yield* FileSystem.FileSystem).writeFileString(path, `${JSON.stringify(doc, null, 2)}\n`).pipe(Effect.catch((cause) => fail("write", `write ${path} failed`, path, cause)));
54
- });
55
- //#endregion
56
- export { SnapshotStateDocumentError, readSnapshotStateDocument, writeSnapshotStateDocument };
57
-
58
- //# sourceMappingURL=state-document.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"state-document.mjs","names":["StateDocumentSchema"],"sources":["../../../src/orchestrators/snapshot/state-document.ts"],"sourcesContent":["import { Effect, FileSystem, Schema } from 'effect';\n\nimport { decodeUnknown, parseJsonText } from '../../substrate/runtime/runtime-decode.ts';\nimport {\n\tStateDocument as StateDocumentSchema,\n\ttype StateDocument,\n} from '../../substrate/runtime/state-store/index.ts';\n\n/** Tagged failure raised by snapshot state-document helpers. `kind`\n * discriminates the failure class so downstream phase classifiers can\n * branch by tag, not by message substring. */\nexport class SnapshotStateDocumentError extends Schema.TaggedErrorClass<SnapshotStateDocumentError>()(\n\t'SnapshotStateDocumentError',\n\t{\n\t\t/**\n\t\t * - `'read'` — filesystem read of the state document file failed.\n\t\t * - `'parse'` — file contents are not valid JSON.\n\t\t * - `'decode'` — JSON parses but does not match `StateDocument`\n\t\t * schema.\n\t\t * - `'write'` — filesystem write of the state document file failed.\n\t\t */\n\t\tkind: Schema.Literals(['read', 'parse', 'decode', 'write']),\n\t\tdetail: Schema.String,\n\t\tpath: Schema.String,\n\t\tcause: Schema.optional(Schema.Defect),\n\t},\n) {}\n\nconst fail = (\n\tkind: SnapshotStateDocumentError['kind'],\n\tdetail: string,\n\tpath: string,\n\tcause?: unknown,\n): Effect.Effect<never, SnapshotStateDocumentError> =>\n\tEffect.fail(new SnapshotStateDocumentError({ kind, detail, path, cause }));\n\nexport const readSnapshotStateDocument = (\n\tpath: string,\n): Effect.Effect<StateDocument, SnapshotStateDocumentError, FileSystem.FileSystem> =>\n\tEffect.gen(function* () {\n\t\tconst fs = yield* FileSystem.FileSystem;\n\t\tconst text = yield* fs\n\t\t\t.readFileString(path)\n\t\t\t.pipe(Effect.catch((cause) => fail('read', `read ${path} failed`, path, cause)));\n\t\tconst raw = yield* parseJsonText(text, {\n\t\t\tsource: path,\n\t\t\tmkError: (issue) =>\n\t\t\t\tnew SnapshotStateDocumentError({\n\t\t\t\t\tkind: 'parse',\n\t\t\t\t\tdetail: `${path} is not valid JSON`,\n\t\t\t\t\tpath,\n\t\t\t\t\tcause: issue.cause,\n\t\t\t\t}),\n\t\t});\n\t\treturn yield* decodeUnknown(StateDocumentSchema, raw, {\n\t\t\tsource: path,\n\t\t\tmkError: (issue) =>\n\t\t\t\tnew SnapshotStateDocumentError({\n\t\t\t\t\tkind: 'decode',\n\t\t\t\t\tdetail: `${path} failed StateDocument schema decode`,\n\t\t\t\t\tpath,\n\t\t\t\t\tcause: issue.cause,\n\t\t\t\t}),\n\t\t});\n\t});\n\nexport const writeSnapshotStateDocument = (\n\tpath: string,\n\tdoc: StateDocument,\n): Effect.Effect<void, SnapshotStateDocumentError, FileSystem.FileSystem> =>\n\tEffect.gen(function* () {\n\t\tconst fs = yield* FileSystem.FileSystem;\n\t\tyield* fs\n\t\t\t.writeFileString(path, `${JSON.stringify(doc, null, 2)}\\n`)\n\t\t\t.pipe(Effect.catch((cause) => fail('write', `write ${path} failed`, path, cause)));\n\t});\n"],"mappings":";;;;;;;;AAWA,IAAa,6BAAb,cAAgD,OAAO,kBAA8C,CACpG,8BACA;;;;;;;;CAQC,MAAM,OAAO,SAAS;EAAC;EAAQ;EAAS;EAAU;EAAQ,CAAC;CAC3D,QAAQ,OAAO;CACf,MAAM,OAAO;CACb,OAAO,OAAO,SAAS,OAAO,OAAO;CACrC,CACD,CAAC;AAEF,MAAM,QACL,MACA,QACA,MACA,UAEA,OAAO,KAAK,IAAI,2BAA2B;CAAE;CAAM;CAAQ;CAAM;CAAO,CAAC,CAAC;AAE3E,MAAa,6BACZ,SAEA,OAAO,IAAI,aAAa;AAevB,QAAO,OAAO,cAAcA,eAAqB,OAV9B,cAAc,QAHb,OADF,WAAW,YAE3B,eAAe,KAAK,CACpB,KAAK,OAAO,OAAO,UAAU,KAAK,QAAQ,QAAQ,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC,EAC1C;EACtC,QAAQ;EACR,UAAU,UACT,IAAI,2BAA2B;GAC9B,MAAM;GACN,QAAQ,GAAG,KAAK;GAChB;GACA,OAAO,MAAM;GACb,CAAC;EACH,CAAC,EACoD;EACrD,QAAQ;EACR,UAAU,UACT,IAAI,2BAA2B;GAC9B,MAAM;GACN,QAAQ,GAAG,KAAK;GAChB;GACA,OAAO,MAAM;GACb,CAAC;EACH,CAAC;EACD;AAEH,MAAa,8BACZ,MACA,QAEA,OAAO,IAAI,aAAa;AAEvB,SAAO,OADW,WAAW,YAE3B,gBAAgB,MAAM,GAAG,KAAK,UAAU,KAAK,MAAM,EAAE,CAAC,IAAI,CAC1D,KAAK,OAAO,OAAO,UAAU,KAAK,SAAS,SAAS,KAAK,UAAU,MAAM,MAAM,CAAC,CAAC;EAClF"}
@@ -1,16 +0,0 @@
1
- //#region src/plugins/account/spans.ts
2
- const AccountSpans = {
3
- address: "account.address",
4
- fundAmountMist: "fund.amount.mist",
5
- fundCrossCuttingCount: "fund.cross-cutting.count",
6
- fundCrossCuttingEntries: "fund.cross-cutting.entries",
7
- fundingFrom: "account.funding.from",
8
- fundingTo: "account.funding.to",
9
- name: "account.name",
10
- scheme: "account.scheme",
11
- variant: "account.variant"
12
- };
13
- //#endregion
14
- export { AccountSpans };
15
-
16
- //# sourceMappingURL=spans.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spans.mjs","names":[],"sources":["../../../src/plugins/account/spans.ts"],"sourcesContent":["// Account plugin span-attribute vocabulary. Plugin-local — substrate's\n// `SpanAttr` carries only engine-dimensional + http/process generic\n// keys; plugin-domain keys live next to the plugin that owns them.\n//\n// Callsite pattern: `Effect.annotateCurrentSpan({ [AccountSpans.name]:\n// value })`. Free-form string literals are a STYLE_GUIDE §16 violation.\n\nexport const AccountSpans = {\n\taddress: 'account.address',\n\tfundAmountMist: 'fund.amount.mist',\n\tfundCrossCuttingCount: 'fund.cross-cutting.count',\n\tfundCrossCuttingEntries: 'fund.cross-cutting.entries',\n\tfundingFrom: 'account.funding.from',\n\tfundingTo: 'account.funding.to',\n\tname: 'account.name',\n\tscheme: 'account.scheme',\n\tvariant: 'account.variant',\n} as const;\n"],"mappings":";AAOA,MAAa,eAAe;CAC3B,SAAS;CACT,gBAAgB;CAChB,uBAAuB;CACvB,yBAAyB;CACzB,aAAa;CACb,WAAW;CACX,MAAM;CACN,QAAQ;CACR,SAAS;CACT"}
@@ -1,24 +0,0 @@
1
- import { accountAcquireError } from "../errors.mjs";
2
- import { decodeBech32Secret } from "../keypair.mjs";
3
- import { Effect } from "effect";
4
- //#region src/plugins/account/variants/env.ts
5
- /** Resolve the env variant.
6
- *
7
- * Stub: the actual env-read happens inside `Effect.sync` against
8
- * the resolved-once process env. The decode path then funnels into
9
- * `decodeBech32Secret`. */
10
- const resolveEnvVariant = (args) => Effect.gen(function* () {
11
- return yield* decodeBech32Secret(yield* Effect.sync(() => {
12
- return globalThis.process?.env?.[args.varName];
13
- }).pipe(Effect.flatMap((v) => v === void 0 || v === "" ? Effect.fail(accountAcquireError({
14
- phase: "read-env",
15
- accountName: args.name,
16
- variant: "env",
17
- message: `Account '${args.name}': env var '${args.varName}' is missing or empty.`,
18
- hint: `Set ${args.varName}=suiprivkey1... in the process environment.`
19
- })) : Effect.succeed(v))), args.name, "env");
20
- });
21
- //#endregion
22
- export { resolveEnvVariant };
23
-
24
- //# sourceMappingURL=env.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"env.mjs","names":[],"sources":["../../../../src/plugins/account/variants/env.ts"],"sourcesContent":["// Account variant — env (read bech32 secret from a process env var).\n//\n// Distilled-doc surface: scoped to CI / vault-injected configurations.\n// The env-var NAME is taken verbatim from the user's options — the\n// VALUE is never logged, spanned, or surfaced in error messages\n// (security invariant: only the variable name is referenced).\n\nimport { Effect } from 'effect';\n\nimport { accountAcquireError, type AccountAcquireError } from '../errors.ts';\nimport { decodeBech32Secret, type ResolvedKeypair } from '../keypair.ts';\n\nexport interface EnvVariantArgs {\n\treadonly name: string;\n\t/** The `process.env` variable name holding the bech32 secret. */\n\treadonly varName: string;\n}\n\n/** Resolve the env variant.\n *\n * Stub: the actual env-read happens inside `Effect.sync` against\n * the resolved-once process env. The decode path then funnels into\n * `decodeBech32Secret`. */\nexport const resolveEnvVariant = (\n\targs: EnvVariantArgs,\n): Effect.Effect<ResolvedKeypair, AccountAcquireError> =>\n\tEffect.gen(function* () {\n\t\t// Stub: read env, refuse empty / missing.\n\t\tconst bech32 = yield* Effect.sync((): string | undefined => {\n\t\t\tconst proc = (globalThis as { process?: { env?: Record<string, string | undefined> } })\n\t\t\t\t.process;\n\t\t\treturn proc?.env?.[args.varName];\n\t\t}).pipe(\n\t\t\tEffect.flatMap((v) =>\n\t\t\t\tv === undefined || v === ''\n\t\t\t\t\t? Effect.fail(\n\t\t\t\t\t\t\taccountAcquireError({\n\t\t\t\t\t\t\t\tphase: 'read-env',\n\t\t\t\t\t\t\t\taccountName: args.name,\n\t\t\t\t\t\t\t\tvariant: 'env',\n\t\t\t\t\t\t\t\t// Reference the variable's NAME only — never the value.\n\t\t\t\t\t\t\t\tmessage: `Account '${args.name}': env var '${args.varName}' is missing or empty.`,\n\t\t\t\t\t\t\t\thint: `Set ${args.varName}=suiprivkey1... in the process environment.`,\n\t\t\t\t\t\t\t}),\n\t\t\t\t\t\t)\n\t\t\t\t\t: Effect.succeed(v),\n\t\t\t),\n\t\t);\n\t\treturn yield* decodeBech32Secret(bech32, args.name, 'env');\n\t});\n"],"mappings":";;;;;;;;;AAuBA,MAAa,qBACZ,SAEA,OAAO,IAAI,aAAa;AAsBvB,QAAO,OAAO,mBAAmB,OApBX,OAAO,WAA+B;AAG3D,SAFc,WACZ,SACW,MAAM,KAAK;GACvB,CAAC,KACF,OAAO,SAAS,MACf,MAAM,KAAA,KAAa,MAAM,KACtB,OAAO,KACP,oBAAoB;EACnB,OAAO;EACP,aAAa,KAAK;EAClB,SAAS;EAET,SAAS,YAAY,KAAK,KAAK,cAAc,KAAK,QAAQ;EAC1D,MAAM,OAAO,KAAK,QAAQ;EAC1B,CAAC,CACF,GACA,OAAO,QAAQ,EAAE,CACpB,CACD,EACwC,KAAK,MAAM,MAAM;EACzD"}
@@ -1,13 +0,0 @@
1
- import { decodeBech32Secret, resolvedKeypairFromEd25519Bytes } from "../keypair.mjs";
2
- import "effect";
3
- //#region src/plugins/account/variants/inline.ts
4
- /** Resolve the inline variant. String input takes the bech32 decode
5
- * path; Uint8Array input takes the raw-bytes-into-Ed25519 path. */
6
- const resolveInlineVariant = (args) => {
7
- if (typeof args.privateKey === "string") return decodeBech32Secret(args.privateKey, args.name, "inline");
8
- return resolvedKeypairFromEd25519Bytes(args.privateKey, args.name, "inline");
9
- };
10
- //#endregion
11
- export { resolveInlineVariant };
12
-
13
- //# sourceMappingURL=inline.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"inline.mjs","names":[],"sources":["../../../../src/plugins/account/variants/inline.ts"],"sourcesContent":["// Account variant — inline (literal bech32 secret in config).\n//\n// Distilled-doc warning: TESTS AND DEMOS ONLY. The key is serialized\n// as part of the user's devstack config; if that file is committed,\n// the key is in their git history. The user-facing factory in\n// `index.ts` mirrors the warning in JSDoc.\n//\n// This file accepts either a `string` (bech32 form) or a `Uint8Array`\n// (raw 32-byte secret key). Both funnel through Ed25519 construction\n// so downstream paths are uniform.\n\nimport { Effect } from 'effect';\n\nimport {\n\tdecodeBech32Secret,\n\tresolvedKeypairFromEd25519Bytes,\n\ttype ResolvedKeypair,\n} from '../keypair.ts';\nimport type { AccountAcquireError } from '../errors.ts';\n\nexport interface InlineVariantArgs {\n\treadonly name: string;\n\treadonly privateKey: string | Uint8Array;\n}\n\n/** Resolve the inline variant. String input takes the bech32 decode\n * path; Uint8Array input takes the raw-bytes-into-Ed25519 path. */\nexport const resolveInlineVariant = (\n\targs: InlineVariantArgs,\n): Effect.Effect<ResolvedKeypair, AccountAcquireError> => {\n\tif (typeof args.privateKey === 'string') {\n\t\treturn decodeBech32Secret(args.privateKey, args.name, 'inline');\n\t}\n\treturn resolvedKeypairFromEd25519Bytes(args.privateKey, args.name, 'inline');\n};\n"],"mappings":";;;;;AA2BA,MAAa,wBACZ,SACyD;AACzD,KAAI,OAAO,KAAK,eAAe,SAC9B,QAAO,mBAAmB,KAAK,YAAY,KAAK,MAAM,SAAS;AAEhE,QAAO,gCAAgC,KAAK,YAAY,KAAK,MAAM,SAAS"}
@@ -1,91 +0,0 @@
1
- import { decodeJsonText } from "../../../substrate/runtime/runtime-decode.mjs";
2
- import { accountAcquireError } from "../errors.mjs";
3
- import { decodeBech32Secret } from "../keypair.mjs";
4
- import { Effect, Schema } from "effect";
5
- import { promises } from "node:fs";
6
- import { decodeSuiPrivateKey } from "@mysten/sui/cryptography";
7
- import { Ed25519Keypair } from "@mysten/sui/keypairs/ed25519";
8
- //#region src/plugins/account/variants/keystore.ts
9
- const AliasesShape = Schema.Array(Schema.Struct({
10
- alias: Schema.String,
11
- public_key_base64: Schema.optional(Schema.String)
12
- }));
13
- const KeystoreShape = Schema.Array(Schema.String);
14
- /** Resolve the keystore variant. */
15
- const resolveKeystoreVariant = (args) => Effect.gen(function* () {
16
- const rows = yield* decodeJsonText(KeystoreShape, yield* Effect.tryPromise({
17
- try: () => promises.readFile(args.path, "utf-8"),
18
- catch: (cause) => accountAcquireError({
19
- phase: "load-keystore",
20
- accountName: args.name,
21
- variant: "keystore",
22
- message: `Account '${args.name}': failed to read keystore at '${args.path}'.`,
23
- hint: "Verify the path exists and is readable. The Sui CLI default is `~/.sui/sui_config/sui.keystore`.",
24
- cause
25
- })
26
- }), {
27
- source: args.path,
28
- mkError: (issue) => accountAcquireError({
29
- phase: "load-keystore",
30
- accountName: args.name,
31
- variant: "keystore",
32
- message: issue.message === "failed to parse JSON" ? `Account '${args.name}': keystore at '${args.path}' is not valid JSON.` : `Account '${args.name}': keystore at '${args.path}' did not match the expected schema (array of bech32 strings).`
33
- })
34
- });
35
- const aliasIdx = yield* resolveAliasIndex(`${args.path.replace(/\.keystore$/, "")}.aliases`, args.aliasOrAddress, args.name).pipe(Effect.orElseSucceed(() => -1));
36
- if (aliasIdx >= 0 && aliasIdx < rows.length) {
37
- const bech32 = rows[aliasIdx];
38
- return yield* decodeBech32Secret(bech32, args.name, "keystore");
39
- }
40
- const wantAddr = normalizeAddress(args.aliasOrAddress);
41
- for (const bech32 of rows) {
42
- const addr = yield* tryDeriveAddress(bech32).pipe(Effect.orElseSucceed(() => null));
43
- if (addr !== null && normalizeAddress(addr) === wantAddr) return yield* decodeBech32Secret(bech32, args.name, "keystore");
44
- }
45
- return yield* Effect.fail(accountAcquireError({
46
- phase: "load-keystore",
47
- accountName: args.name,
48
- variant: "keystore",
49
- message: `Account '${args.name}': keystore at '${args.path}' has no entry matching alias-or-address '${args.aliasOrAddress}'.`,
50
- hint: "Check the sibling sui.aliases file for the alias spelling, or pass the on-chain address (0x-prefixed) directly."
51
- }));
52
- });
53
- const resolveAliasIndex = (aliasesPath, want, accountName) => Effect.gen(function* () {
54
- return (yield* decodeJsonText(AliasesShape, yield* Effect.tryPromise({
55
- try: () => promises.readFile(aliasesPath, "utf-8"),
56
- catch: (cause) => accountAcquireError({
57
- phase: "load-keystore",
58
- accountName,
59
- variant: "keystore",
60
- message: `aliases file '${aliasesPath}' missing or unreadable`,
61
- cause
62
- })
63
- }), {
64
- source: aliasesPath,
65
- mkError: (issue) => accountAcquireError({
66
- phase: "load-keystore",
67
- accountName,
68
- variant: "keystore",
69
- message: issue.message === "failed to parse JSON" ? `aliases file '${aliasesPath}' is not valid JSON` : `aliases file '${aliasesPath}' did not match the expected schema`
70
- })
71
- })).findIndex((row) => row.alias === want);
72
- });
73
- /** Derive the on-chain address from a bech32 secret without
74
- * surfacing a typed error — used by the by-address scan, which
75
- * swallows per-row failures and moves on. */
76
- const tryDeriveAddress = (bech32) => Effect.try({
77
- try: () => {
78
- const parsed = decodeSuiPrivateKey(bech32);
79
- if (parsed.scheme !== "ED25519") throw new Error(`scheme ${parsed.scheme} not yet derivable here`);
80
- return Ed25519Keypair.fromSecretKey(parsed.secretKey).toSuiAddress();
81
- },
82
- catch: (cause) => cause instanceof Error ? cause : new Error(String(cause))
83
- });
84
- const normalizeAddress = (addr) => {
85
- const lower = addr.toLowerCase();
86
- return lower.startsWith("0x") ? lower : `0x${lower}`;
87
- };
88
- //#endregion
89
- export { resolveKeystoreVariant };
90
-
91
- //# sourceMappingURL=keystore.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"keystore.mjs","names":["fs"],"sources":["../../../../src/plugins/account/variants/keystore.ts"],"sourcesContent":["// Account variant — keystore (read from Sui CLI keystore file).\n//\n// Distilled-doc surface: read a `suiprivkey1...` entry by alias or\n// by address from a CLI-shape keystore file. Devstack NEVER copies\n// the keystore — only reads. Persistence stays with the user's\n// CLI tooling.\n//\n// Keystore file shape (canonical sui-cli output):\n// `<path>` — a JSON array of bech32 `suiprivkey1...` strings\n// `<path>.aliases` — a sibling JSON array of `{alias, public_key_base64}`\n// entries; the array's index matches the keystore.\n//\n// Lookup precedence: alias match first (case-sensitive), then by-address\n// match (the resolver decodes each bech32 row, derives the address,\n// and compares). The address path is intentionally O(n) — keystores\n// are small and the alternative is a side-table the CLI doesn't\n// maintain.\n\nimport { Effect, Schema } from 'effect';\nimport { promises as fs } from 'node:fs';\n\nimport { decodeJsonText } from '../../../substrate/runtime/runtime-decode.ts';\nimport { accountAcquireError, type AccountAcquireError } from '../errors.ts';\nimport { decodeBech32Secret, type ResolvedKeypair } from '../keypair.ts';\nimport { decodeSuiPrivateKey } from '@mysten/sui/cryptography';\nimport { Ed25519Keypair } from '@mysten/sui/keypairs/ed25519';\n\nexport interface KeystoreVariantArgs {\n\treadonly name: string;\n\t/** Absolute path to the keystore file. Defaults at the factory\n\t * boundary to `~/.sui/sui_config/sui.keystore`. */\n\treadonly path: string;\n\t/** Alias name (from the sibling `sui.aliases` file) OR the\n\t * on-chain address — the resolver tries alias first, then a\n\t * by-address lookup. */\n\treadonly aliasOrAddress: string;\n}\n\nconst AliasesShape = Schema.Array(\n\tSchema.Struct({\n\t\talias: Schema.String,\n\t\t// Optional because some CLI versions omit it for newer rows;\n\t\t// we only need the alias for the alias-path.\n\t\tpublic_key_base64: Schema.optional(Schema.String),\n\t}),\n);\n\nconst KeystoreShape = Schema.Array(Schema.String);\n\n/** Resolve the keystore variant. */\nexport const resolveKeystoreVariant = (\n\targs: KeystoreVariantArgs,\n): Effect.Effect<ResolvedKeypair, AccountAcquireError> =>\n\tEffect.gen(function* () {\n\t\t// --- read + parse the keystore ----------------------------------\n\t\tconst raw = yield* Effect.tryPromise({\n\t\t\ttry: () => fs.readFile(args.path, 'utf-8'),\n\t\t\tcatch: (cause): AccountAcquireError =>\n\t\t\t\taccountAcquireError({\n\t\t\t\t\tphase: 'load-keystore',\n\t\t\t\t\taccountName: args.name,\n\t\t\t\t\tvariant: 'keystore',\n\t\t\t\t\tmessage: `Account '${args.name}': failed to read keystore at '${args.path}'.`,\n\t\t\t\t\thint: 'Verify the path exists and is readable. The Sui CLI default is `~/.sui/sui_config/sui.keystore`.',\n\t\t\t\t\tcause,\n\t\t\t\t}),\n\t\t});\n\t\tconst rows = yield* decodeJsonText(KeystoreShape, raw, {\n\t\t\tsource: args.path,\n\t\t\t// Secret-leak guard: the keystore file IS an array of\n\t\t\t// `suiprivkey1...` private keys, so a malformed-array\n\t\t\t// `ParseError` renders the offending secret rows into its\n\t\t\t// message/tree. We deliberately DROP the raw `cause`; the typed\n\t\t\t// `message` already distinguishes \"not valid JSON\" from a schema\n\t\t\t// mismatch, which is the only actionable diagnostic here.\n\t\t\t// (Mirrors the `decodeBech32Secret` guard in `../keypair.ts`.)\n\t\t\tmkError: (issue): AccountAcquireError =>\n\t\t\t\taccountAcquireError({\n\t\t\t\t\tphase: 'load-keystore',\n\t\t\t\t\taccountName: args.name,\n\t\t\t\t\tvariant: 'keystore',\n\t\t\t\t\tmessage:\n\t\t\t\t\t\tissue.message === 'failed to parse JSON'\n\t\t\t\t\t\t\t? `Account '${args.name}': keystore at '${args.path}' is not valid JSON.`\n\t\t\t\t\t\t\t: `Account '${args.name}': keystore at '${args.path}' did not match the expected schema (array of bech32 strings).`,\n\t\t\t\t}),\n\t\t});\n\n\t\t// --- alias path -------------------------------------------------\n\t\t// Best-effort: missing aliases file is not fatal — fall through\n\t\t// to the by-address path.\n\t\tconst aliasesPath = `${args.path.replace(/\\.keystore$/, '')}.aliases`;\n\t\tconst aliasIdx = yield* resolveAliasIndex(aliasesPath, args.aliasOrAddress, args.name).pipe(\n\t\t\tEffect.orElseSucceed(() => -1),\n\t\t);\n\t\tif (aliasIdx >= 0 && aliasIdx < rows.length) {\n\t\t\tconst bech32 = rows[aliasIdx]!;\n\t\t\treturn yield* decodeBech32Secret(bech32, args.name, 'keystore');\n\t\t}\n\n\t\t// --- by-address path -------------------------------------------\n\t\t// Normalize the lookup key to a lowercased 0x-prefixed string so\n\t\t// comparisons match regardless of caller casing.\n\t\tconst wantAddr = normalizeAddress(args.aliasOrAddress);\n\t\tfor (const bech32 of rows) {\n\t\t\tconst addr = yield* tryDeriveAddress(bech32).pipe(Effect.orElseSucceed(() => null));\n\t\t\tif (addr !== null && normalizeAddress(addr) === wantAddr) {\n\t\t\t\treturn yield* decodeBech32Secret(bech32, args.name, 'keystore');\n\t\t\t}\n\t\t}\n\n\t\treturn yield* Effect.fail(\n\t\t\taccountAcquireError({\n\t\t\t\tphase: 'load-keystore',\n\t\t\t\taccountName: args.name,\n\t\t\t\tvariant: 'keystore',\n\t\t\t\tmessage: `Account '${args.name}': keystore at '${args.path}' has no entry matching alias-or-address '${args.aliasOrAddress}'.`,\n\t\t\t\thint: 'Check the sibling sui.aliases file for the alias spelling, or pass the on-chain address (0x-prefixed) directly.',\n\t\t\t}),\n\t\t);\n\t});\n\nconst resolveAliasIndex = (\n\taliasesPath: string,\n\twant: string,\n\taccountName: string,\n): Effect.Effect<number, AccountAcquireError> =>\n\tEffect.gen(function* () {\n\t\tconst raw = yield* Effect.tryPromise({\n\t\t\ttry: () => fs.readFile(aliasesPath, 'utf-8'),\n\t\t\tcatch: (cause): AccountAcquireError =>\n\t\t\t\taccountAcquireError({\n\t\t\t\t\tphase: 'load-keystore',\n\t\t\t\t\taccountName,\n\t\t\t\t\tvariant: 'keystore',\n\t\t\t\t\tmessage: `aliases file '${aliasesPath}' missing or unreadable`,\n\t\t\t\t\tcause,\n\t\t\t\t}),\n\t\t});\n\t\tconst aliases = yield* decodeJsonText(AliasesShape, raw, {\n\t\t\tsource: aliasesPath,\n\t\t\t// Secret-leak guard: drop the raw `cause`. The aliases file holds\n\t\t\t// public keys rather than secrets, but a malformed-array\n\t\t\t// `ParseError` embeds whatever rows the file contained, and the\n\t\t\t// resolver is pointed at a sibling of the secret keystore — so we\n\t\t\t// keep the same scrub the keystore-array path uses above. The\n\t\t\t// typed `message` already names the only actionable distinction.\n\t\t\tmkError: (issue): AccountAcquireError =>\n\t\t\t\taccountAcquireError({\n\t\t\t\t\tphase: 'load-keystore',\n\t\t\t\t\taccountName,\n\t\t\t\t\tvariant: 'keystore',\n\t\t\t\t\tmessage:\n\t\t\t\t\t\tissue.message === 'failed to parse JSON'\n\t\t\t\t\t\t\t? `aliases file '${aliasesPath}' is not valid JSON`\n\t\t\t\t\t\t\t: `aliases file '${aliasesPath}' did not match the expected schema`,\n\t\t\t\t}),\n\t\t});\n\t\treturn aliases.findIndex((row) => row.alias === want);\n\t});\n\n/** Derive the on-chain address from a bech32 secret without\n * surfacing a typed error — used by the by-address scan, which\n * swallows per-row failures and moves on. */\nconst tryDeriveAddress = (bech32: string): Effect.Effect<string, Error> =>\n\tEffect.try({\n\t\ttry: () => {\n\t\t\tconst parsed = decodeSuiPrivateKey(bech32);\n\t\t\tif (parsed.scheme !== 'ED25519') {\n\t\t\t\tthrow new Error(`scheme ${parsed.scheme} not yet derivable here`);\n\t\t\t}\n\t\t\treturn Ed25519Keypair.fromSecretKey(parsed.secretKey).toSuiAddress();\n\t\t},\n\t\tcatch: (cause) => (cause instanceof Error ? cause : new Error(String(cause))),\n\t});\n\nconst normalizeAddress = (addr: string): string => {\n\tconst lower = addr.toLowerCase();\n\treturn lower.startsWith('0x') ? lower : `0x${lower}`;\n};\n"],"mappings":";;;;;;;;AAsCA,MAAM,eAAe,OAAO,MAC3B,OAAO,OAAO;CACb,OAAO,OAAO;CAGd,mBAAmB,OAAO,SAAS,OAAO,OAAO;CACjD,CAAC,CACF;AAED,MAAM,gBAAgB,OAAO,MAAM,OAAO,OAAO;;AAGjD,MAAa,0BACZ,SAEA,OAAO,IAAI,aAAa;CAcvB,MAAM,OAAO,OAAO,eAAe,eAAe,OAZ/B,OAAO,WAAW;EACpC,WAAWA,SAAG,SAAS,KAAK,MAAM,QAAQ;EAC1C,QAAQ,UACP,oBAAoB;GACnB,OAAO;GACP,aAAa,KAAK;GAClB,SAAS;GACT,SAAS,YAAY,KAAK,KAAK,iCAAiC,KAAK,KAAK;GAC1E,MAAM;GACN;GACA,CAAC;EACH,CAAC,EACqD;EACtD,QAAQ,KAAK;EAQb,UAAU,UACT,oBAAoB;GACnB,OAAO;GACP,aAAa,KAAK;GAClB,SAAS;GACT,SACC,MAAM,YAAY,yBACf,YAAY,KAAK,KAAK,kBAAkB,KAAK,KAAK,wBAClD,YAAY,KAAK,KAAK,kBAAkB,KAAK,KAAK;GACtD,CAAC;EACH,CAAC;CAMF,MAAM,WAAW,OAAO,kBAAkB,GADnB,KAAK,KAAK,QAAQ,eAAe,GAAG,CAAC,WACL,KAAK,gBAAgB,KAAK,KAAK,CAAC,KACtF,OAAO,oBAAoB,GAAG,CAC9B;AACD,KAAI,YAAY,KAAK,WAAW,KAAK,QAAQ;EAC5C,MAAM,SAAS,KAAK;AACpB,SAAO,OAAO,mBAAmB,QAAQ,KAAK,MAAM,WAAW;;CAMhE,MAAM,WAAW,iBAAiB,KAAK,eAAe;AACtD,MAAK,MAAM,UAAU,MAAM;EAC1B,MAAM,OAAO,OAAO,iBAAiB,OAAO,CAAC,KAAK,OAAO,oBAAoB,KAAK,CAAC;AACnF,MAAI,SAAS,QAAQ,iBAAiB,KAAK,KAAK,SAC/C,QAAO,OAAO,mBAAmB,QAAQ,KAAK,MAAM,WAAW;;AAIjE,QAAO,OAAO,OAAO,KACpB,oBAAoB;EACnB,OAAO;EACP,aAAa,KAAK;EAClB,SAAS;EACT,SAAS,YAAY,KAAK,KAAK,kBAAkB,KAAK,KAAK,4CAA4C,KAAK,eAAe;EAC3H,MAAM;EACN,CAAC,CACF;EACA;AAEH,MAAM,qBACL,aACA,MACA,gBAEA,OAAO,IAAI,aAAa;AA+BvB,SAAO,OAnBgB,eAAe,cAAc,OAXjC,OAAO,WAAW;EACpC,WAAWA,SAAG,SAAS,aAAa,QAAQ;EAC5C,QAAQ,UACP,oBAAoB;GACnB,OAAO;GACP;GACA,SAAS;GACT,SAAS,iBAAiB,YAAY;GACtC;GACA,CAAC;EACH,CAAC,EACuD;EACxD,QAAQ;EAOR,UAAU,UACT,oBAAoB;GACnB,OAAO;GACP;GACA,SAAS;GACT,SACC,MAAM,YAAY,yBACf,iBAAiB,YAAY,uBAC7B,iBAAiB,YAAY;GACjC,CAAC;EACH,CAAC,EACa,WAAW,QAAQ,IAAI,UAAU,KAAK;EACpD;;;;AAKH,MAAM,oBAAoB,WACzB,OAAO,IAAI;CACV,WAAW;EACV,MAAM,SAAS,oBAAoB,OAAO;AAC1C,MAAI,OAAO,WAAW,UACrB,OAAM,IAAI,MAAM,UAAU,OAAO,OAAO,yBAAyB;AAElE,SAAO,eAAe,cAAc,OAAO,UAAU,CAAC,cAAc;;CAErE,QAAQ,UAAW,iBAAiB,QAAQ,QAAQ,IAAI,MAAM,OAAO,MAAM,CAAC;CAC5E,CAAC;AAEH,MAAM,oBAAoB,SAAyB;CAClD,MAAM,QAAQ,KAAK,aAAa;AAChC,QAAO,MAAM,WAAW,KAAK,GAAG,QAAQ,KAAK"}
@@ -1,11 +0,0 @@
1
- //#region src/plugins/action/spans.ts
2
- const ActionSpans = {
3
- name: "action.name",
4
- chain: "action.chain",
5
- phase: "action.phase",
6
- digest: "action.digest"
7
- };
8
- //#endregion
9
- export { ActionSpans };
10
-
11
- //# sourceMappingURL=spans.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spans.mjs","names":[],"sources":["../../../src/plugins/action/spans.ts"],"sourcesContent":["// Action plugin span-attribute vocabulary. Plugin-local — substrate's\n// `SpanAttr` carries only engine-dimensional + http/process generic\n// keys; plugin-domain keys live next to the plugin that owns them.\n//\n// Callsite pattern: `Effect.annotateCurrentSpan({ [ActionSpans.name]:\n// inputs.actionName })`. Free-form string literals are a STYLE_GUIDE §16\n// violation.\n\nexport const ActionSpans = {\n\tname: 'action.name',\n\tchain: 'action.chain',\n\tphase: 'action.phase',\n\tdigest: 'action.digest',\n} as const;\n"],"mappings":";AAQA,MAAa,cAAc;CAC1B,MAAM;CACN,OAAO;CACP,OAAO;CACP,QAAQ;CACR"}
@@ -1,20 +0,0 @@
1
- //#region src/plugins/coin/spans.ts
2
- const CoinSpans = {
3
- type: "coin.type",
4
- form: "coin.form",
5
- fullCoinType: "coin.fullCoinType",
6
- decimals: "coin.decimals",
7
- source: "coin.source",
8
- mint: {
9
- recipient: "coin.mint.recipient",
10
- fullCoinType: "coin.mint.fullCoinType",
11
- amount: "coin.mint.amount",
12
- digest: "coin.mint.digest",
13
- mintedCoinId: "coin.mint.mintedCoinId"
14
- },
15
- metadata: { fullCoinType: "coin.metadata.fullCoinType" }
16
- };
17
- //#endregion
18
- export { CoinSpans };
19
-
20
- //# sourceMappingURL=spans.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spans.mjs","names":[],"sources":["../../../src/plugins/coin/spans.ts"],"sourcesContent":["// Coin plugin span-attribute vocabulary. Plugin-local — substrate's\n// `SpanAttr` carries only engine-dimensional + http/process generic\n// keys; plugin-domain keys live next to the plugin that owns them.\n//\n// Callsite pattern: `Effect.annotateCurrentSpan({ [CoinSpans.type]:\n// value })`. Free-form string literals are a STYLE_GUIDE §16 violation.\n\nexport const CoinSpans = {\n\ttype: 'coin.type',\n\tform: 'coin.form',\n\tfullCoinType: 'coin.fullCoinType',\n\tdecimals: 'coin.decimals',\n\tsource: 'coin.source',\n\tmint: {\n\t\trecipient: 'coin.mint.recipient',\n\t\tfullCoinType: 'coin.mint.fullCoinType',\n\t\tamount: 'coin.mint.amount',\n\t\tdigest: 'coin.mint.digest',\n\t\tmintedCoinId: 'coin.mint.mintedCoinId',\n\t},\n\tmetadata: {\n\t\tfullCoinType: 'coin.metadata.fullCoinType',\n\t},\n} as const;\n"],"mappings":";AAOA,MAAa,YAAY;CACxB,MAAM;CACN,MAAM;CACN,cAAc;CACd,UAAU;CACV,QAAQ;CACR,MAAM;EACL,WAAW;EACX,cAAc;EACd,QAAQ;EACR,QAAQ;EACR,cAAc;EACd;CACD,UAAU,EACT,cAAc,8BACd;CACD"}
@@ -1,18 +0,0 @@
1
- //#region src/plugins/deepbook/spans.ts
2
- const DeepbookSpans = {
3
- chain: "deepbook.chain",
4
- fundAmount: "fund.amount",
5
- fundCoin: "fund.coin",
6
- name: "deepbook.name",
7
- packageId: "deepbook.packageId",
8
- poolCount: "deepbook.pool.count",
9
- publisher: "deepbook.publisher",
10
- pyth: {
11
- feedCount: "pyth.feed.count",
12
- packageId: "pyth.packageId"
13
- }
14
- };
15
- //#endregion
16
- export { DeepbookSpans };
17
-
18
- //# sourceMappingURL=spans.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spans.mjs","names":[],"sources":["../../../src/plugins/deepbook/spans.ts"],"sourcesContent":["// Deepbook plugin span-attribute vocabulary. Plugin-local — substrate's\n// `SpanAttr` carries only engine-dimensional + http/process generic\n// keys; plugin-domain keys live next to the plugin that owns them.\n//\n// Callsite pattern: `Effect.annotateCurrentSpan({ [DeepbookSpans.name]:\n// value })`. Free-form string literals are a STYLE_GUIDE §16 violation.\n//\n// Pyth is a deepbook implementation detail (see `./pyth/`), so pyth\n// span keys live here under a nested `pyth` sub-object to keep\n// vocabulary discovery scoped to the owning plugin.\n\nexport const DeepbookSpans = {\n\tchain: 'deepbook.chain',\n\tfundAmount: 'fund.amount',\n\tfundCoin: 'fund.coin',\n\tname: 'deepbook.name',\n\tpackageId: 'deepbook.packageId',\n\tpoolCount: 'deepbook.pool.count',\n\tpublisher: 'deepbook.publisher',\n\tpyth: {\n\t\tfeedCount: 'pyth.feed.count',\n\t\tpackageId: 'pyth.packageId',\n\t},\n} as const;\n"],"mappings":";AAWA,MAAa,gBAAgB;CAC5B,OAAO;CACP,YAAY;CACZ,UAAU;CACV,MAAM;CACN,WAAW;CACX,WAAW;CACX,WAAW;CACX,MAAM;EACL,WAAW;EACX,WAAW;EACX;CACD"}
@@ -1,12 +0,0 @@
1
- //#region src/plugins/faucet/spans.ts
2
- const FaucetSpans = {
3
- address: "faucet.address",
4
- amount: "faucet.amount",
5
- budgetMs: "faucet.budget_ms",
6
- maxAttempts: "faucet.max_attempts",
7
- url: "faucet.url"
8
- };
9
- //#endregion
10
- export { FaucetSpans };
11
-
12
- //# sourceMappingURL=spans.mjs.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spans.mjs","names":[],"sources":["../../../src/plugins/faucet/spans.ts"],"sourcesContent":["// Faucet plugin span-attribute vocabulary. Plugin-local — substrate's\n// `SpanAttr` carries only engine-dimensional + http/process generic\n// keys; plugin-domain keys live next to the plugin that owns them.\n//\n// Callsite pattern: `Effect.annotateCurrentSpan({ [FaucetSpans.url]:\n// value })`. Free-form string literals are a STYLE_GUIDE §16 violation.\n\nexport const FaucetSpans = {\n\taddress: 'faucet.address',\n\tamount: 'faucet.amount',\n\tbudgetMs: 'faucet.budget_ms',\n\tmaxAttempts: 'faucet.max_attempts',\n\turl: 'faucet.url',\n} as const;\n"],"mappings":";AAOA,MAAa,cAAc;CAC1B,SAAS;CACT,QAAQ;CACR,UAAU;CACV,aAAa;CACb,KAAK;CACL"}