@powerhousedao/shared 6.2.3-staging.0 → 6.3.0-dev.1

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 (326) hide show
  1. package/dist/action-id-DON1WCeY.d.ts +19 -0
  2. package/dist/action-id-DON1WCeY.d.ts.map +1 -0
  3. package/dist/clis/args/access-token.d.mts +14 -2
  4. package/dist/clis/args/access-token.d.mts.map +1 -0
  5. package/dist/clis/args/access-token.mjs +21 -1
  6. package/dist/clis/args/access-token.mjs.map +1 -0
  7. package/dist/clis/args/{common-BXabdhiO.mjs → common-DG_SF8fN.mjs} +39 -8
  8. package/dist/clis/args/common-DG_SF8fN.mjs.map +1 -0
  9. package/dist/clis/args/{common-Bnm859xU.d.mts → common-DmerPWXo.d.mts} +8 -4
  10. package/dist/clis/args/common-DmerPWXo.d.mts.map +1 -0
  11. package/dist/clis/args/common.d.mts +1 -1
  12. package/dist/clis/args/common.mjs +1 -1
  13. package/dist/clis/args/connect.d.mts +448 -2
  14. package/dist/clis/args/connect.d.mts.map +1 -0
  15. package/dist/clis/args/connect.mjs +202 -1
  16. package/dist/clis/args/connect.mjs.map +1 -0
  17. package/dist/clis/args/{generate-BOItUNvP.mjs → generate-DMKgc6et.mjs} +2 -21
  18. package/dist/clis/args/generate-DMKgc6et.mjs.map +1 -0
  19. package/dist/clis/args/generate.d.mts +92 -2
  20. package/dist/clis/args/generate.d.mts.map +1 -0
  21. package/dist/clis/args/generate.mjs +1 -1
  22. package/dist/clis/args/{help-DVPTARGn.d.mts → help-BnD14eCa.d.mts} +62 -2
  23. package/dist/clis/args/help-BnD14eCa.d.mts.map +1 -0
  24. package/dist/clis/args/{help-DS1NlcJQ.mjs → help-Cjoe-b7d.mjs} +55 -15
  25. package/dist/clis/args/help-Cjoe-b7d.mjs.map +1 -0
  26. package/dist/clis/args/help.d.mts +1 -1
  27. package/dist/clis/args/help.mjs +16 -1
  28. package/dist/clis/args/host.d.mts +23 -0
  29. package/dist/clis/args/host.d.mts.map +1 -0
  30. package/dist/clis/args/host.mjs +35 -0
  31. package/dist/clis/args/host.mjs.map +1 -0
  32. package/dist/clis/args/index.d.mts +23 -19
  33. package/dist/clis/args/index.mjs +23 -19
  34. package/dist/clis/args/init.d.mts +53 -2
  35. package/dist/clis/args/init.d.mts.map +1 -0
  36. package/dist/clis/args/init.mjs +77 -1
  37. package/dist/clis/args/init.mjs.map +1 -0
  38. package/dist/clis/args/inspect.d.mts +11 -2
  39. package/dist/clis/args/inspect.d.mts.map +1 -0
  40. package/dist/clis/args/inspect.mjs +14 -1
  41. package/dist/clis/args/inspect.mjs.map +1 -0
  42. package/dist/clis/args/install.d.mts +35 -2
  43. package/dist/clis/args/install.d.mts.map +1 -0
  44. package/dist/clis/args/install.mjs +31 -1
  45. package/dist/clis/args/install.mjs.map +1 -0
  46. package/dist/clis/args/{login-CXRJXg71.d.mts → keyframes.d.mts} +13 -13
  47. package/dist/clis/args/keyframes.d.mts.map +1 -0
  48. package/dist/clis/args/keyframes.mjs +42 -0
  49. package/dist/clis/args/keyframes.mjs.map +1 -0
  50. package/dist/clis/args/list.d.mts +8 -2
  51. package/dist/clis/args/list.d.mts.map +1 -0
  52. package/dist/clis/args/list.mjs +6 -1
  53. package/dist/clis/args/list.mjs.map +1 -0
  54. package/dist/clis/args/login.d.mts +23 -2
  55. package/dist/clis/args/login.d.mts.map +1 -0
  56. package/dist/clis/args/login.mjs +39 -1
  57. package/dist/clis/args/login.mjs.map +1 -0
  58. package/dist/clis/args/{access-token-C5sKsH2O.d.mts → mcp.d.mts} +6 -7
  59. package/dist/clis/args/mcp.d.mts.map +1 -0
  60. package/dist/clis/args/mcp.mjs +22 -0
  61. package/dist/clis/args/mcp.mjs.map +1 -0
  62. package/dist/clis/args/migrate.d.mts +26 -2
  63. package/dist/clis/args/migrate.d.mts.map +1 -0
  64. package/dist/clis/args/migrate.mjs +43 -1
  65. package/dist/clis/args/migrate.mjs.map +1 -0
  66. package/dist/clis/args/{uninstall-CDx7lwxn.d.mts → model.d.mts} +28 -17
  67. package/dist/clis/args/model.d.mts.map +1 -0
  68. package/dist/clis/args/model.mjs +51 -0
  69. package/dist/clis/args/model.mjs.map +1 -0
  70. package/dist/clis/args/publish.d.mts +18 -2
  71. package/dist/clis/args/publish.d.mts.map +1 -0
  72. package/dist/clis/args/publish.mjs +26 -1
  73. package/dist/clis/args/publish.mjs.map +1 -0
  74. package/dist/clis/args/registry.d.mts +15 -2
  75. package/dist/clis/args/registry.d.mts.map +1 -0
  76. package/dist/clis/args/registry.mjs +22 -1
  77. package/dist/clis/args/registry.mjs.map +1 -0
  78. package/dist/clis/args/{unpublish-CEDsk6uv.d.mts → run.d.mts} +11 -12
  79. package/dist/clis/args/run.d.mts.map +1 -0
  80. package/dist/clis/args/run.mjs +33 -0
  81. package/dist/clis/args/run.mjs.map +1 -0
  82. package/dist/clis/args/{service-BBx5GDTc.d.mts → service-CLCvH3kf.d.mts} +4 -4
  83. package/dist/clis/args/service-CLCvH3kf.d.mts.map +1 -0
  84. package/dist/clis/args/service.d.mts +1 -1
  85. package/dist/clis/args/service.mjs +10 -1
  86. package/dist/clis/args/service.mjs.map +1 -0
  87. package/dist/clis/args/switchboard.d.mts +68 -2
  88. package/dist/clis/args/switchboard.d.mts.map +1 -0
  89. package/dist/clis/args/switchboard.mjs +84 -1
  90. package/dist/clis/args/switchboard.mjs.map +1 -0
  91. package/dist/clis/args/uninstall.d.mts +26 -2
  92. package/dist/clis/args/uninstall.d.mts.map +1 -0
  93. package/dist/clis/args/uninstall.mjs +15 -1
  94. package/dist/clis/args/uninstall.mjs.map +1 -0
  95. package/dist/clis/args/unpublish.d.mts +20 -2
  96. package/dist/clis/args/unpublish.d.mts.map +1 -0
  97. package/dist/clis/args/unpublish.mjs +29 -1
  98. package/dist/clis/args/unpublish.mjs.map +1 -0
  99. package/dist/clis/args/{vetra-BUNlAAPp.mjs → vetra-BqjDopAP.mjs} +18 -2
  100. package/dist/clis/args/vetra-BqjDopAP.mjs.map +1 -0
  101. package/dist/clis/args/vetra.d.mts +112 -2
  102. package/dist/clis/args/vetra.d.mts.map +1 -0
  103. package/dist/clis/args/vetra.mjs +1 -1
  104. package/dist/clis/{build-config-CmdMi_wu.mjs → build-config-BM1RL4u_.mjs} +87 -8
  105. package/dist/clis/build-config-BM1RL4u_.mjs.map +1 -0
  106. package/dist/clis/build-config.d.mts +26 -1
  107. package/dist/clis/build-config.d.mts.map +1 -1
  108. package/dist/clis/build-config.mjs +2 -2
  109. package/dist/clis/build-pieces.d.mts +71 -4
  110. package/dist/clis/build-pieces.d.mts.map +1 -1
  111. package/dist/clis/build-pieces.mjs +249 -26
  112. package/dist/clis/build-pieces.mjs.map +1 -1
  113. package/dist/clis/command-names.d.mts +3 -1
  114. package/dist/clis/command-names.d.mts.map +1 -1
  115. package/dist/clis/command-names.mjs +8 -1
  116. package/dist/clis/command-names.mjs.map +1 -1
  117. package/dist/clis/constants.d.mts +2 -2
  118. package/dist/clis/constants.mjs +92 -20
  119. package/dist/clis/constants.mjs.map +1 -1
  120. package/dist/clis/definition-sources.d.mts +26 -0
  121. package/dist/clis/definition-sources.d.mts.map +1 -0
  122. package/dist/clis/definition-sources.mjs +27 -0
  123. package/dist/clis/definition-sources.mjs.map +1 -0
  124. package/dist/clis/deprecations.d.mts +73 -0
  125. package/dist/clis/deprecations.d.mts.map +1 -0
  126. package/dist/clis/deprecations.mjs +121 -0
  127. package/dist/clis/deprecations.mjs.map +1 -0
  128. package/dist/clis/{index-6CZwrmQi.d.mts → index-DnZYG-8g.d.mts} +2 -2
  129. package/dist/clis/{index-6CZwrmQi.d.mts.map → index-DnZYG-8g.d.mts.map} +1 -1
  130. package/dist/clis/index.d.mts +2584 -901
  131. package/dist/clis/index.d.mts.map +1 -1
  132. package/dist/clis/index.mjs +1540 -919
  133. package/dist/clis/index.mjs.map +1 -1
  134. package/dist/clis/package-style.d.mts +32 -0
  135. package/dist/clis/package-style.d.mts.map +1 -0
  136. package/dist/clis/package-style.mjs +102 -0
  137. package/dist/clis/package-style.mjs.map +1 -0
  138. package/dist/clis/ph-dir.d.mts +26 -0
  139. package/dist/clis/ph-dir.d.mts.map +1 -0
  140. package/dist/clis/ph-dir.mjs +37 -0
  141. package/dist/clis/ph-dir.mjs.map +1 -0
  142. package/dist/clis/project-env.d.mts +6 -0
  143. package/dist/clis/project-env.d.mts.map +1 -1
  144. package/dist/clis/project-env.mjs +16 -1
  145. package/dist/clis/project-env.mjs.map +1 -1
  146. package/dist/clis/real-paths.d.mts +14 -0
  147. package/dist/clis/real-paths.d.mts.map +1 -0
  148. package/dist/clis/real-paths.mjs +36 -0
  149. package/dist/clis/real-paths.mjs.map +1 -0
  150. package/dist/clis/retired-flags.d.mts +45 -0
  151. package/dist/clis/retired-flags.d.mts.map +1 -0
  152. package/dist/clis/retired-flags.mjs +55 -0
  153. package/dist/clis/retired-flags.mjs.map +1 -0
  154. package/dist/clis/rolldown-runtime-B4iAMlE-.mjs +35 -0
  155. package/dist/clis/types-CZU17kAm.d.mts +2510 -0
  156. package/dist/clis/types-CZU17kAm.d.mts.map +1 -0
  157. package/dist/clis/utils.d.mts.map +1 -1
  158. package/dist/clis/utils.mjs.map +1 -1
  159. package/dist/{config-loader-C6dZB_iX.js → config-loader-B7SqNz8z.js} +24 -6
  160. package/dist/config-loader-B7SqNz8z.js.map +1 -0
  161. package/dist/connect/app-shell.d.ts +48 -0
  162. package/dist/connect/app-shell.d.ts.map +1 -0
  163. package/dist/connect/app-shell.js +90 -0
  164. package/dist/connect/app-shell.js.map +1 -0
  165. package/dist/connect/config-loader.d.ts +8 -1
  166. package/dist/connect/config-loader.d.ts.map +1 -1
  167. package/dist/connect/config-loader.js +2 -2
  168. package/dist/connect/connect-config-schema.d.ts +3 -0
  169. package/dist/connect/connect-config-schema.js +486 -0
  170. package/dist/connect/connect-config-schema.js.map +1 -0
  171. package/dist/connect/image-ref.d.ts +32 -0
  172. package/dist/connect/image-ref.d.ts.map +1 -0
  173. package/dist/connect/image-ref.js +80 -0
  174. package/dist/connect/image-ref.js.map +1 -0
  175. package/dist/connect/index.d.ts +84 -635
  176. package/dist/connect/index.d.ts.map +1 -1
  177. package/dist/connect/index.js +216 -553
  178. package/dist/connect/index.js.map +1 -1
  179. package/dist/connect/origin-placeholder.d.ts +52 -0
  180. package/dist/connect/origin-placeholder.d.ts.map +1 -0
  181. package/dist/connect/origin-placeholder.js +101 -0
  182. package/dist/connect/origin-placeholder.js.map +1 -0
  183. package/dist/connect-config-schema-cBfkNo1b.d.ts +1872 -0
  184. package/dist/connect-config-schema-cBfkNo1b.d.ts.map +1 -0
  185. package/dist/constants-5UFY_rXh.d.ts +9 -0
  186. package/dist/constants-5UFY_rXh.d.ts.map +1 -0
  187. package/dist/constants.d.ts +1 -1
  188. package/dist/constants.js +22 -6
  189. package/dist/constants.js.map +1 -1
  190. package/dist/document-drive/index.d.ts +3 -4
  191. package/dist/document-drive/index.d.ts.map +1 -1
  192. package/dist/document-drive/index.js +2 -13
  193. package/dist/document-drive/index.js.map +1 -1
  194. package/dist/document-model/action-id.d.ts +3 -0
  195. package/dist/document-model/action-id.js +59 -0
  196. package/dist/document-model/action-id.js.map +1 -0
  197. package/dist/document-model/dispatch.d.ts +25 -0
  198. package/dist/document-model/dispatch.d.ts.map +1 -0
  199. package/dist/document-model/dispatch.js +0 -0
  200. package/dist/document-model/errors.d.ts +3 -0
  201. package/dist/document-model/errors.js +214 -0
  202. package/dist/document-model/errors.js.map +1 -0
  203. package/dist/document-model/index.d.ts +5 -4
  204. package/dist/document-model/index.js +7 -5521
  205. package/dist/document-model/utils.d.ts +3 -2
  206. package/dist/document-model/utils.js +3 -2
  207. package/dist/document-model/version.d.ts +3 -0
  208. package/dist/document-model/version.js +8 -0
  209. package/dist/document-model/version.js.map +1 -0
  210. package/dist/document-model-CqySIaKV.js +5805 -0
  211. package/dist/document-model-CqySIaKV.js.map +1 -0
  212. package/dist/host-tokens/index.d.ts +3 -0
  213. package/dist/host-tokens/index.js +2 -0
  214. package/dist/host-tokens-DOeyxqLi.js +322 -0
  215. package/dist/host-tokens-DOeyxqLi.js.map +1 -0
  216. package/dist/{index-5gwOhPG5.d.ts → index-CUZ8eWun.d.ts} +2 -2
  217. package/dist/{index-5gwOhPG5.d.ts.map → index-CUZ8eWun.d.ts.map} +1 -1
  218. package/dist/index-D58WVj_E.d.ts +246 -0
  219. package/dist/index-D58WVj_E.d.ts.map +1 -0
  220. package/dist/index.d.ts +5 -5
  221. package/dist/processors/index.d.ts +2 -2
  222. package/dist/processors/index.js +177 -68
  223. package/dist/processors/index.js.map +1 -1
  224. package/dist/processors/testing.d.ts +22 -0
  225. package/dist/processors/testing.d.ts.map +1 -0
  226. package/dist/processors/testing.js +77 -0
  227. package/dist/processors/testing.js.map +1 -0
  228. package/dist/purge-CbAV5DVh.js +631 -0
  229. package/dist/purge-CbAV5DVh.js.map +1 -0
  230. package/dist/registry/index.d.ts +3 -3
  231. package/dist/registry/index.js +52 -9
  232. package/dist/registry/index.js.map +1 -1
  233. package/dist/registry/manifest-slim.d.ts +2 -2
  234. package/dist/rolldown-runtime-D7D4PA-g.js +13 -0
  235. package/dist/types-CV2j3BvH.d.ts +5709 -0
  236. package/dist/types-CV2j3BvH.d.ts.map +1 -0
  237. package/dist/{types-CI3ren9F.d.ts → types-D_6ZcaJj.d.ts} +20 -12
  238. package/dist/types-D_6ZcaJj.d.ts.map +1 -0
  239. package/dist/{utils-CSF716ux.js → utils-DiV32YIj.js} +45 -2
  240. package/dist/utils-DiV32YIj.js.map +1 -0
  241. package/dist/utils-MrLmLEVr.js +78 -0
  242. package/dist/utils-MrLmLEVr.js.map +1 -0
  243. package/dist/version-BxLITo9P.d.ts +6 -0
  244. package/dist/version-BxLITo9P.d.ts.map +1 -0
  245. package/package.json +37 -3
  246. package/dist/clis/args/access-token-3Hqv_U8I.mjs +0 -22
  247. package/dist/clis/args/access-token-3Hqv_U8I.mjs.map +0 -1
  248. package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +0 -1
  249. package/dist/clis/args/common-BXabdhiO.mjs.map +0 -1
  250. package/dist/clis/args/common-Bnm859xU.d.mts.map +0 -1
  251. package/dist/clis/args/connect-BG3HkYBk.mjs +0 -203
  252. package/dist/clis/args/connect-BG3HkYBk.mjs.map +0 -1
  253. package/dist/clis/args/connect-DjeiqXus.d.mts +0 -450
  254. package/dist/clis/args/connect-DjeiqXus.d.mts.map +0 -1
  255. package/dist/clis/args/generate-BOItUNvP.mjs.map +0 -1
  256. package/dist/clis/args/generate-BPBBLeUD.d.mts +0 -103
  257. package/dist/clis/args/generate-BPBBLeUD.d.mts.map +0 -1
  258. package/dist/clis/args/help-DS1NlcJQ.mjs.map +0 -1
  259. package/dist/clis/args/help-DVPTARGn.d.mts.map +0 -1
  260. package/dist/clis/args/init-CFeTq4Cq.d.mts +0 -52
  261. package/dist/clis/args/init-CFeTq4Cq.d.mts.map +0 -1
  262. package/dist/clis/args/init-Dvb42Y87.mjs +0 -67
  263. package/dist/clis/args/init-Dvb42Y87.mjs.map +0 -1
  264. package/dist/clis/args/inspect-BjRmtB86.d.mts +0 -13
  265. package/dist/clis/args/inspect-BjRmtB86.d.mts.map +0 -1
  266. package/dist/clis/args/inspect-UNQgtuR0.mjs +0 -15
  267. package/dist/clis/args/inspect-UNQgtuR0.mjs.map +0 -1
  268. package/dist/clis/args/install-B0tMyUMw.d.mts +0 -37
  269. package/dist/clis/args/install-B0tMyUMw.d.mts.map +0 -1
  270. package/dist/clis/args/install-F-27kF6m.mjs +0 -32
  271. package/dist/clis/args/install-F-27kF6m.mjs.map +0 -1
  272. package/dist/clis/args/list-Bkfn8Yuo.mjs +0 -7
  273. package/dist/clis/args/list-Bkfn8Yuo.mjs.map +0 -1
  274. package/dist/clis/args/list-DrbxA7JJ.d.mts +0 -10
  275. package/dist/clis/args/list-DrbxA7JJ.d.mts.map +0 -1
  276. package/dist/clis/args/login-CIFkQExi.mjs +0 -40
  277. package/dist/clis/args/login-CIFkQExi.mjs.map +0 -1
  278. package/dist/clis/args/login-CXRJXg71.d.mts.map +0 -1
  279. package/dist/clis/args/magic-string.es-BWtG0AyA.mjs +0 -1019
  280. package/dist/clis/args/magic-string.es-BWtG0AyA.mjs.map +0 -1
  281. package/dist/clis/args/migrate-DkCQRL2D.d.mts +0 -19
  282. package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +0 -1
  283. package/dist/clis/args/migrate-DwJGhc2d.mjs +0 -29
  284. package/dist/clis/args/migrate-DwJGhc2d.mjs.map +0 -1
  285. package/dist/clis/args/publish-CeW4bOrl.d.mts +0 -16
  286. package/dist/clis/args/publish-CeW4bOrl.d.mts.map +0 -1
  287. package/dist/clis/args/publish-DHqlGWmL.mjs +0 -19
  288. package/dist/clis/args/publish-DHqlGWmL.mjs.map +0 -1
  289. package/dist/clis/args/registry-DIwES3l2.mjs +0 -23
  290. package/dist/clis/args/registry-DIwES3l2.mjs.map +0 -1
  291. package/dist/clis/args/registry-DNH8xuaE.d.mts +0 -17
  292. package/dist/clis/args/registry-DNH8xuaE.d.mts.map +0 -1
  293. package/dist/clis/args/service-BBx5GDTc.d.mts.map +0 -1
  294. package/dist/clis/args/service-Cpjlyeu5.mjs +0 -11
  295. package/dist/clis/args/service-Cpjlyeu5.mjs.map +0 -1
  296. package/dist/clis/args/switchboard-CCaAtU56.mjs +0 -85
  297. package/dist/clis/args/switchboard-CCaAtU56.mjs.map +0 -1
  298. package/dist/clis/args/switchboard-RrNb1fUH.d.mts +0 -70
  299. package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +0 -1
  300. package/dist/clis/args/uninstall-3U0B8g5c.mjs +0 -16
  301. package/dist/clis/args/uninstall-3U0B8g5c.mjs.map +0 -1
  302. package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +0 -1
  303. package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +0 -1
  304. package/dist/clis/args/unpublish-s9zUh6Gw.mjs +0 -30
  305. package/dist/clis/args/unpublish-s9zUh6Gw.mjs.map +0 -1
  306. package/dist/clis/args/vetra-BUNlAAPp.mjs.map +0 -1
  307. package/dist/clis/args/vetra-DkDaWFPi.d.mts +0 -111
  308. package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +0 -1
  309. package/dist/clis/args/vetra-ports.test.d.mts +0 -2
  310. package/dist/clis/args/vetra-ports.test.mjs +0 -13354
  311. package/dist/clis/args/vetra-ports.test.mjs.map +0 -1
  312. package/dist/clis/build-config-CmdMi_wu.mjs.map +0 -1
  313. package/dist/clis/types-nzer4WIr.d.mts +0 -541
  314. package/dist/clis/types-nzer4WIr.d.mts.map +0 -1
  315. package/dist/config-loader-C6dZB_iX.js.map +0 -1
  316. package/dist/constants-DO4IYxuR.d.ts +0 -9
  317. package/dist/constants-DO4IYxuR.d.ts.map +0 -1
  318. package/dist/document-model/index.js.map +0 -1
  319. package/dist/index-D6833Siv.d.ts +0 -939
  320. package/dist/index-D6833Siv.d.ts.map +0 -1
  321. package/dist/types-CI3ren9F.d.ts.map +0 -1
  322. package/dist/types-CmeoQg_J.d.ts +0 -3337
  323. package/dist/types-CmeoQg_J.d.ts.map +0 -1
  324. package/dist/utils-BrKxCmKx.d.ts +0 -18
  325. package/dist/utils-BrKxCmKx.d.ts.map +0 -1
  326. package/dist/utils-CSF716ux.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-config-CmdMi_wu.mjs","names":[],"sources":["../../connect/shared-deps.ts","../../clis/build-config.mts"],"sourcesContent":["import { satisfies, validRange } from \"semver\";\n\nexport type SharedDep = { specifier: string; package: string };\n\n/**\n * The dependency set Connect and loaded packages share via the import map.\n * `@powerhousedao/connect` is deliberately absent: it is the Connect app\n * itself (no importable exports), so there is nothing to share.\n */\nexport const SHARED_DEPS: readonly SharedDep[] = [\n { specifier: \"document-model\", package: \"document-model\" },\n {\n specifier: \"@powerhousedao/document-engineering\",\n package: \"@powerhousedao/document-engineering\",\n },\n { specifier: \"@powerhousedao/shared\", package: \"@powerhousedao/shared\" },\n {\n specifier: \"@powerhousedao/shared/registry/urls\",\n package: \"@powerhousedao/shared\",\n },\n {\n specifier: \"@powerhousedao/design-system/connect\",\n package: \"@powerhousedao/design-system\",\n },\n {\n specifier: \"@powerhousedao/reactor-browser\",\n package: \"@powerhousedao/reactor-browser\",\n },\n // Connect already vendors zod (it is in DEFAULT_VENDOR_INCLUDE, so the\n // import map publishes an entry for it) and every generated project already\n // declares it as a peerDependency -- yet it was missing from this set, so\n // each package inlined a private copy anyway. It is the single biggest\n // dependency left in a minimal package.\n { specifier: \"zod\", package: \"zod\" },\n];\n\nexport const SHARED_DEP_SPECIFIERS: readonly string[] = SHARED_DEPS.map(\n (d) => d.specifier,\n);\n\n/**\n * The `@powerhousedao/shared` subpaths the production vendor bundles. The\n * bare root is deliberately absent: its type barrel references node-only\n * modules (`clis/`), which the current vite/rolldown cannot bundle for the\n * browser — vendoring the root fails the build (a pre-existing latent\n * issue). A package that imports the bare root is simply not shared; it\n * bundles its own copy.\n */\nexport const SHARED_SUBPATHS: readonly string[] = [\n \"connect\",\n \"document-model\",\n \"processors\",\n \"document-drive\",\n \"registry\",\n \"registry/urls\",\n \"registry/manifest-slim\",\n];\n\n/**\n * The specifiers a package build may safely externalize onto the host's\n * import map — i.e. the ones the vendor actually publishes an entry for.\n *\n * `@powerhousedao/shared` is narrowed to SHARED_SUBPATHS rather than taken as\n * a prefix: the bare root is never vendored (see SHARED_SUBPATHS), and\n * neither are its other subpaths (`analytics`, `constants`, `clis`, ...).\n * Externalizing those would leave a bare specifier in the package's output\n * that nothing in the import map resolves, so the package would fail to load\n * at runtime instead of simply bundling its own copy.\n */\nexport const EXTERNALIZABLE_SHARED_SPECIFIERS: readonly string[] = [\n ...new Set([\n ...SHARED_DEP_SPECIFIERS.filter((s) => s !== \"@powerhousedao/shared\"),\n ...SHARED_SUBPATHS.map((s) => `@powerhousedao/shared/${s}`),\n ]),\n];\n\n/** Split a specifier into its package name and subpath (\"\" for a root). */\nexport function parseDepSpec(spec: string): { pkg: string; sub: string } {\n if (spec.startsWith(\"@\")) {\n const parts = spec.split(\"/\");\n return { pkg: parts.slice(0, 2).join(\"/\"), sub: parts.slice(2).join(\"/\") };\n }\n const i = spec.indexOf(\"/\");\n return i === -1\n ? { pkg: spec, sub: \"\" }\n : { pkg: spec.slice(0, i), sub: spec.slice(i + 1) };\n}\n\nfunction isSharedSpecifier(spec: string, specs: readonly string[]): boolean {\n return specs.some((s) => spec === s || spec.startsWith(s + \"/\"));\n}\n\n/**\n * Return the import/export specifiers in `source` that are a shared\n * specifier (or a subpath of one), sorted. Heuristic: only statement\n * positions are scanned (`from \"x\"`, `import \"x\"`, `import(\"x\")`;\n * `export … from \"x\"` is covered by the `from` pattern), so import-like\n * text inside comments or strings can be reported too. That errs toward\n * over-reporting, which is the safe direction for the advisory build\n * warning.\n */\nexport function findSharedImports(\n source: string,\n specs: readonly string[] = SHARED_DEP_SPECIFIERS,\n): string[] {\n const found = new Set<string>();\n const patterns = [\n /\\bfrom\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s+[\"']([^\"'\\\\]+)[\"']/g,\n /\\bimport\\s*\\(\\s*[\"']([^\"'\\\\]+)[\"']\\s*\\)/g,\n ];\n for (const re of patterns) {\n for (const m of source.matchAll(re)) {\n const spec = m[1];\n if (isSharedSpecifier(spec, specs)) found.add(spec);\n }\n }\n return [...found].sort();\n}\n\n/**\n * Rewrite a package source for blob import in a worker context (import maps\n * don't apply there): shared specifiers become their mapped URLs, and\n * relative (`./`, `../`) specifiers become absolute against `sourceUrl`\n * (a blob URL has no directory to resolve against). `#` subpath imports are\n * deliberately left alone: they resolve via the package's own\n * `package.json` \"imports\" field, which the rewrite cannot reproduce.\n * Returns the input unchanged when nothing matched.\n */\nexport function rewritePackageSource(\n source: string,\n sourceUrl: string,\n imports: Record<string, string>,\n): string {\n if (!Object.keys(imports).length) return source;\n const base = new URL(sourceUrl);\n const map = (spec: string): string | null => {\n const mapped = imports[spec];\n if (mapped) return mapped;\n if (spec.startsWith(\"./\") || spec.startsWith(\"../\")) {\n return new URL(spec, base).href;\n }\n return null;\n };\n let out = source;\n // The quote character is captured and reused: a source that quotes its\n // specifiers with ' would otherwise never match the replacement and be\n // left un-rewritten — silently, since the specifier still maps.\n for (const re of [\n /\\bfrom\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s+([\"'])([^\"'\\\\]+)\\1/g,\n /\\bimport\\s*\\(\\s*([\"'])([^\"'\\\\]+)\\1\\s*\\)/g,\n ]) {\n out = out.replace(re, (match, quote: string, spec: string) => {\n // The match contains the quoted specifier exactly once and the\n // captured group has no quotes/backslashes ([^\"'\\\\]), so a literal\n // replace is safe.\n const mapped = map(spec);\n return mapped\n ? match.replace(`${quote}${spec}${quote}`, `${quote}${mapped}${quote}`)\n : match;\n });\n }\n return out;\n}\n\nexport type SharedDepMismatch = {\n package: string;\n required: string;\n provided: string;\n};\n\nexport type PackageDeps = {\n dependencies?: Record<string, unknown>;\n peerDependencies?: Record<string, unknown>;\n};\n\n/**\n * Compare a package's declared ranges against the host's version table.\n * `hostVersions` defines the checked set (only deps present in it are\n * checked). `*`, non-semver protocols (workspace:, file:, git:, npm:, URLs)\n * and unparseable ranges never mismatch.\n */\nexport function checkSharedDeps(\n pkgJson: PackageDeps,\n hostVersions: Record<string, string>,\n): SharedDepMismatch[] {\n const out: SharedDepMismatch[] = [];\n const entries = [\n ...Object.entries(pkgJson.dependencies ?? {}),\n ...Object.entries(pkgJson.peerDependencies ?? {}),\n ];\n for (const [dep, range] of entries) {\n const provided = hostVersions[dep];\n if (provided === undefined || typeof range !== \"string\") continue;\n if (range === \"*\" || /^[a-z]+:/i.test(range)) continue;\n if (!validRange(range)) continue;\n if (!satisfies(provided, range, { includePrerelease: true })) {\n out.push({ package: dep, required: range, provided });\n }\n }\n return out;\n}\n\nexport function formatSharedDepWarnings(\n mismatches: SharedDepMismatch[],\n): string[] {\n return mismatches.map(\n (m) =>\n `${m.package}: requires ${m.required}, Connect provides ${m.provided}`,\n );\n}\n","import { esmExternalRequirePlugin } from \"rolldown/plugins\";\nimport type { InlineConfig } from \"tsdown\";\nimport {\n EXTERNALIZABLE_SHARED_SPECIFIERS,\n findSharedImports,\n} from \"../connect/shared-deps.js\";\n\nconst entry = [\n \"index.ts\",\n \"document-models/index.ts\",\n \"document-models/*/index.ts\",\n \"document-models/*/module.ts\",\n \"editors/index.ts\",\n \"editors/*/index.ts\",\n \"editors/*/module.ts\",\n \"subgraphs/index.ts\",\n \"subgraphs/*/index.ts\",\n \"processors/index.ts\",\n \"processors/*/index.ts\",\n];\n\n// ./pieces is node-only for the same reason ./reactor is browser-only: a piece\n// is loaded and run by a host process, never by the browser. Only the list of\n// pieces builds here; each piece is its own build (buildPieceBuildConfig), so\n// two pieces never share a chunk and each ships as one self-contained module.\nconst nodeEntry = [...entry, \"pieces/index.ts\"];\n\n// Where a package's pieces live, one directory per piece, as the node entry\n// glob spells it; `ph build` expands it against the project to find them.\nexport const PIECE_ENTRY_GLOB = \"pieces/*/index.ts\";\n\n// ./reactor is browser-only: the SharedWorker needs it, the node build does not.\nexport const browserEntry = [...entry, \"reactor/index.ts\"];\n\nconst alwaysBundle = [\"**\"];\n\n// React must be external so `import ... from \"react\"` stays a bare import and\n// resolves to the host's React at runtime; bundled, a chunk would carry a second\n// React. In the browser build the externals below belong to esmExternalRequirePlugin\n// alone: rolldown converts a CommonJS `require(\"react\")` into an import only for\n// externals the plugin owns, and listed in neverBundle too the top-level external\n// wins, leaving a browser bundle with a require it cannot serve. use-sync-external-store\n// under zustand, and so under @xyflow/react, is the case that found this.\nconst reactExternals = [\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n];\n\nconst nodeNeverBundle = [\n // we know that we don't want connect inside connect\n \"@powerhousedao/connect\",\n // published code would never need the cli\n \"@powerhousedao/ph-cli\",\n // the reactor-api host must provide a single class identity for\n // BaseSubgraph/BaseProcessor — inlining a copy here breaks the\n // prototype-chain check the package loader uses to detect subgraphs.\n \"@powerhousedao/reactor-api\",\n // react is resolved from esm.sh\n \"react\",\n \"react-dom\",\n \"react/jsx-runtime\",\n \"react-dom/client\",\n // build tools\n \"tailwindcss\",\n \"vitest\",\n \"tsdown\",\n \"@tailwindcss/cli\",\n \"@vitejs/plugin-react\",\n // testing tools\n \"@testing-library/jest-dom\",\n \"@testing-library/react\",\n \"@testing-library/user-event\",\n // types\n \"@types/node\",\n \"@types/react\",\n \"@types/react-dom\",\n // exclude pglite wasm/data chunks\n \"@electric-sql/pglite\",\n \"@electric-sql/pglite-tools\",\n];\n\n// The node build keeps React in neverBundle: node has createRequire, so a\n// CommonJS require of an external resolves there without the plugin.\nconst browserNeverBundle = nodeNeverBundle.filter(\n (spec) => typeof spec !== \"string\" || !reactExternals.includes(spec),\n);\n\nconst copy = [{ from: \"powerhouse.manifest.json\", to: \"dist\" }];\n\nconst config = false;\nconst clean = true;\n// types are emitted via a separate tsc command\nconst dts = false;\nconst sourcemap = true;\n\n// Shared deps are externalized from every package build: the host (Connect)\n// resolves them to one bundled copy via the import map, so a package must\n// not inline its own copy (two instances of the same dep break identity\n// checks and double the download). One regexp per specifier covers the root\n// and every subpath (rolldown `external` accepts strings and regexps, not\n// function matchers, in this toolchain).\n//\n// Only the specifiers the vendor publishes are externalized — see\n// EXTERNALIZABLE_SHARED_SPECIFIERS. Externalizing one the import map has no\n// entry for would leave an unresolvable bare specifier in the output.\nconst sharedNeverBundle = EXTERNALIZABLE_SHARED_SPECIFIERS.map(\n (s) => new RegExp(`^${s.replace(/[.*+?^${}()|[\\]\\\\]/g, \"\\\\$&\")}(/.*)?$`),\n);\n\nconst baseBrowserConfig = {\n entry: browserEntry,\n platform: \"browser\" as const,\n copy,\n config,\n clean,\n dts,\n sourcemap,\n plugins: [\n esmExternalRequirePlugin({\n external: reactExternals,\n skipDuplicateCheck: true,\n }),\n ],\n inputOptions: {\n experimental: { resolveNewUrlToAsset: true },\n },\n};\n\nexport type BrowserBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n};\n\nexport function buildBrowserBuildConfig(\n options: BrowserBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n ...baseBrowserConfig,\n deps: {\n alwaysBundle,\n neverBundle: [\n ...browserNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const browserBuildConfig = buildBrowserBuildConfig();\n\n/**\n * Shared specs a source imports but the built output no longer references as\n * bare imports — the bundler inlined them, which is exactly what the\n * external set is meant to prevent.\n */\nexport function findBundledSharedDeps(\n importedSpecs: string[],\n outputs: readonly { path: string; content: string }[],\n): string[] {\n return importedSpecs.filter(\n (spec) =>\n !outputs.some((f) => findSharedImports(f.content, [spec]).includes(spec)),\n );\n}\n\nexport type NodeBuildConfigOptions = {\n /** Externalize the shared dependency set (default: true). */\n sharedDeps?: boolean;\n};\n\n/**\n * The node build externalizes the same shared set as the browser build, for\n * the same reason the `@powerhousedao/reactor-api` entry in `nodeNeverBundle`\n * already gives: the host provides these, and a package carrying its own copy\n * is a second class identity as well as dead weight. What differs is only how\n * the import is resolved at runtime -- Connect's import map in the browser,\n * ordinary node resolution here, which works because these are declared for\n * the consumer to provide (`document-model`, `@powerhousedao/reactor-browser`\n * and `zod` are peerDependencies of every generated project).\n */\nexport function buildNodeBuildConfig(\n options: NodeBuildConfigOptions = {},\n): InlineConfig {\n const sharedDeps = options.sharedDeps ?? true;\n return {\n entry: nodeEntry,\n deps: {\n alwaysBundle,\n neverBundle: [\n ...nodeNeverBundle,\n ...(sharedDeps ? sharedNeverBundle : []),\n ],\n },\n platform: \"node\",\n config,\n clean,\n dts,\n sourcemap,\n };\n}\n\n// Kept for existing callers: the default (shared deps externalized).\nexport const nodeBuildConfig: InlineConfig = buildNodeBuildConfig();\n\nexport type PieceBuildConfigOptions = {\n /** The piece's source entry, relative to the project: `pieces/<dir>/index.ts`. */\n entry: string;\n /** Where the piece lands: `<outDir>/node/pieces/<dir>`. */\n outDir: string;\n};\n\n/**\n * One piece, bundled whole. A piece runs in a forked worker with no\n * node_modules beside it, so nothing the piece imports can be left to the\n * host: the framework, its dependencies and the shared set that every other\n * module kind externalizes are all inlined here, and only node built-ins stay\n * external. Code splitting is off for the same reason, so a dynamic import is\n * inlined too and the piece directory holds exactly one module.\n */\nexport function buildPieceBuildConfig(\n options: PieceBuildConfigOptions,\n): InlineConfig {\n return {\n entry: { index: options.entry },\n outDir: options.outDir,\n platform: \"node\",\n deps: {\n alwaysBundle,\n neverBundle: [],\n // Inlining dependencies is the point here, so tsdown's hint about it\n // would only be noise on every piece.\n onlyBundle: false,\n },\n outputOptions: { codeSplitting: false },\n config,\n clean,\n dts,\n sourcemap,\n };\n}\n"],"mappings":";;AAoCA,MAAa,wBAA2C;CA1BtD;EAAE,WAAW;EAAkB,SAAS;CAAiB;CACzD;EACE,WAAW;EACX,SAAS;CACX;CACA;EAAE,WAAW;EAAyB,SAAS;CAAwB;CACvE;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CACA;EACE,WAAW;EACX,SAAS;CACX;CAMA;EAAE,WAAW;EAAO,SAAS;CAAM;AAGmB,CAAA,CAAY,KACjE,MAAM,EAAE,SACX;;;;;;;;;AAUA,MAAa,kBAAqC;CAChD;CACA;CACA;CACA;CACA;CACA;CACA;AACF;;;;;;;;;;;;AAaA,MAAa,mCAAsD,CACjE,mBAAG,IAAI,IAAI,CACT,GAAG,sBAAsB,QAAQ,MAAM,MAAM,uBAAuB,GACpE,GAAG,gBAAgB,KAAK,MAAM,yBAAyB,GAAG,CAC5D,CAAC,CACH;AAcA,SAAS,kBAAkB,MAAc,OAAmC;CAC1E,OAAO,MAAM,MAAM,MAAM,SAAS,KAAK,KAAK,WAAW,IAAI,GAAG,CAAC;AACjE;;;;;;;;;;AAWA,SAAgB,kBACd,QACA,QAA2B,uBACjB;CACV,MAAM,wBAAQ,IAAI,IAAY;CAM9B,KAAK,MAAM,MAAM;EAJf;EACA;EACA;CAEsB,GACtB,KAAK,MAAM,KAAK,OAAO,SAAS,EAAE,GAAG;EACnC,MAAM,OAAO,EAAE;EACf,IAAI,kBAAkB,MAAM,KAAK,GAAG,MAAM,IAAI,IAAI;CACpD;CAEF,OAAO,CAAC,GAAG,KAAK,CAAC,CAAC,KAAK;AACzB;;;AC/GA,MAAM,QAAQ;CACZ;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;CACA;AACF;AAMA,MAAM,YAAY,CAAC,GAAG,OAAO,iBAAiB;AAI9C,MAAa,mBAAmB;AAGhC,MAAa,eAAe,CAAC,GAAG,OAAO,kBAAkB;AAEzD,MAAM,eAAe,CAAC,IAAI;AAS1B,MAAM,iBAAiB;CACrB;CACA;CACA;CACA;AACF;AAEA,MAAM,kBAAkB;CAEtB;CAEA;CAIA;CAEA;CACA;CACA;CACA;CAEA;CACA;CACA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;CACA;CAEA;CACA;AACF;AAIA,MAAM,qBAAqB,gBAAgB,QACxC,SAAS,OAAO,SAAS,YAAY,CAAC,eAAe,SAAS,IAAI,CACrE;AAEA,MAAM,OAAO,CAAC;CAAE,MAAM;CAA4B,IAAI;AAAO,CAAC;AAE9D,MAAM,SAAS;AACf,MAAM,QAAQ;AAEd,MAAM,MAAM;AACZ,MAAM,YAAY;AAYlB,MAAM,oBAAoB,iCAAiC,KACxD,MAAM,IAAI,OAAO,IAAI,EAAE,QAAQ,uBAAuB,MAAM,EAAE,QAAQ,CACzE;AAEA,MAAM,oBAAoB;CACxB,OAAO;CACP,UAAU;CACV;CACA;CACA;CACA;CACA;CACA,SAAS,CACP,yBAAyB;EACvB,UAAU;EACV,oBAAoB;CACtB,CAAC,CACH;CACA,cAAc,EACZ,cAAc,EAAE,sBAAsB,KAAK,EAC7C;AACF;AAOA,SAAgB,wBACd,UAAqC,CAAC,GACxB;CACd,MAAM,aAAa,QAAQ,cAAc;CACzC,OAAO;EACL,GAAG;EACH,MAAM;GACJ;GACA,aAAa,CACX,GAAG,oBACH,GAAI,aAAa,oBAAoB,CAAC,CACxC;EACF;CACF;AACF;AAGA,MAAa,qBAAqB,wBAAwB;;;;;;AAO1D,SAAgB,sBACd,eACA,SACU;CACV,OAAO,cAAc,QAClB,SACC,CAAC,QAAQ,MAAM,MAAM,kBAAkB,EAAE,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,CAC5E;AACF;;;;;;;;;;;AAiBA,SAAgB,qBACd,UAAkC,CAAC,GACrB;CACd,MAAM,aAAa,QAAQ,cAAc;CACzC,OAAO;EACL,OAAO;EACP,MAAM;GACJ;GACA,aAAa,CACX,GAAG,iBACH,GAAI,aAAa,oBAAoB,CAAC,CACxC;EACF;EACA,UAAU;EACV;EACA;EACA;EACA;CACF;AACF;AAGA,MAAa,kBAAgC,qBAAqB;;;;;;;;;AAiBlE,SAAgB,sBACd,SACc;CACd,OAAO;EACL,OAAO,EAAE,OAAO,QAAQ,MAAM;EAC9B,QAAQ,QAAQ;EAChB,UAAU;EACV,MAAM;GACJ;GACA,aAAa,CAAC;GAGd,YAAY;EACd;EACA,eAAe,EAAE,eAAe,MAAM;EACtC;EACA;EACA;EACA;CACF;AACF"}
@@ -1,541 +0,0 @@
1
- import "mutative";
2
- import "luxon";
3
- import { z } from "zod";
4
- import "cmd-ts/dist/cjs/argparser.js";
5
- import "package-manager-detector";
6
- import "kysely";
7
- //#region clis/constants.d.ts
8
- declare const SERVICE_ACTIONS: readonly ["start", "stop", "status", "setup", "restart"];
9
- declare const SECONDS_IN_DAY: number;
10
- declare const DEFAULT_EXPIRY_DAYS = 7;
11
- declare const DEFAULT_EXPIRY_SECONDS: number;
12
- declare const DRIVES_PRESERVE_STRATEGIES: readonly ["preserve-all", "preserve-by-url-and-detach"];
13
- declare const LOG_LEVELS: readonly ["debug", "info", "warn", "error", "verbose"];
14
- declare const DEFAULT_TIMEOUT: 300;
15
- declare const DEFAULT_CONNECT_STUDIO_PORT: 3000;
16
- declare const DEFAULT_VETRA_CONNECT_PORT: 3001;
17
- declare const DEFAULT_CONNECT_PREVIEW_PORT: 4173;
18
- declare const DEFAULT_CONNECT_OUTDIR: ".ph/connect-build/dist/";
19
- declare const DEFAULT_RENOWN_URL: "https://www.renown.id";
20
- declare const DEFAULT_REGISTRY_URL: "https://registry.vetra.io";
21
- declare const DEFAULT_SWITCHBOARD_PORT: 4001;
22
- declare const PROJECT_PORT_BAND_SIZE: 1000;
23
- declare const PROJECT_PORT_BAND_SWITCHBOARD: 7000;
24
- declare const PROJECT_PORT_BAND_STUDIO: 6000;
25
- declare const PROJECT_PORT_BAND_VETRA_CONNECT: 2000;
26
- declare const DEFAULT_VETRA_DRIVE_ID: "vetra";
27
- declare const MINIMUM_NODE_VERSION: "24.0.0";
28
- declare const PH_BIN: "ph-cli-legacy";
29
- declare const POWERHOUSE_CONFIG_FILE: "powerhouse.config.json";
30
- declare const PH_GLOBAL_DIR_NAME: ".ph";
31
- declare const PH_GLOBAL_PROJECT_NAME: ".ph";
32
- declare const HOME_DIR: string;
33
- declare const POWERHOUSE_GLOBAL_DIR: string;
34
- declare const VERSIONED_PEER_DEPENDENCIES: string[];
35
- declare const REACTOR_API_PACKAGE = "@powerhousedao/reactor-api";
36
- declare const ANALYTICS_ENGINE_CORE_PACKAGE = "@powerhousedao/analytics-engine-core";
37
- declare const GRAPHQL_PACKAGE = "graphql";
38
- declare const GRAPHQL_TAG_PACKAGE = "graphql-tag";
39
- declare const PIECES_FRAMEWORK_PACKAGE = "@powerhousedao/pieces-framework";
40
- declare const PEER_EXTERNAL_DEPENDENCIES: {
41
- readonly graphql: {
42
- readonly peer: "^16";
43
- readonly dev: "16.12.0";
44
- };
45
- readonly "graphql-tag": {
46
- readonly peer: "^2";
47
- readonly dev: "2.12.6";
48
- };
49
- readonly react: {
50
- readonly peer: "^19";
51
- readonly dev: "19.2.6";
52
- };
53
- readonly "react-dom": {
54
- readonly peer: "^19";
55
- readonly dev: "19.2.6";
56
- };
57
- readonly zod: {
58
- readonly peer: "^4";
59
- readonly dev: "4.3.6";
60
- };
61
- };
62
- declare const FEATURE_DEPENDENCIES: {
63
- readonly analyticsProcessor: {
64
- readonly peerVersioned: readonly ["@powerhousedao/analytics-engine-core"];
65
- readonly peerExternal: {};
66
- readonly devVersioned: readonly [];
67
- };
68
- readonly piece: {
69
- readonly peerVersioned: readonly [];
70
- readonly peerExternal: {};
71
- readonly devVersioned: readonly ["@powerhousedao/pieces-framework"];
72
- };
73
- };
74
- declare const VERSIONED_DEPENDENCIES: string[];
75
- declare const BOILERPLATE_ALLOWED_BUILDS: readonly ["@apollo/protobufjs", "@datadog/pprof", "@parcel/watcher", "@reown/appkit", "bufferutil", "esbuild", "keccak", "protobufjs", "utf-8-validate"];
76
- declare const BOILERPLATE_DEPENDENCY_OVERRIDES: {
77
- readonly "date-fns": "4.3.0";
78
- readonly vite: "8.0.14";
79
- readonly rolldown: "1.0.2";
80
- };
81
- declare const VERSIONED_DEV_DEPENDENCIES: string[];
82
- declare const packageJsonExports: {
83
- readonly ".": {
84
- readonly types: "./dist/types/index.d.ts";
85
- readonly browser: "./dist/browser/index.js";
86
- readonly node: "./dist/node/index.mjs";
87
- };
88
- readonly "./reactor": {
89
- readonly types: "./dist/types/reactor/index.d.ts";
90
- readonly browser: "./dist/browser/reactor/index.js";
91
- };
92
- readonly "./document-models": {
93
- readonly types: "./dist/types/document-models/index.d.ts";
94
- readonly browser: "./dist/browser/document-models/index.js";
95
- readonly node: "./dist/node/document-models/index.mjs";
96
- };
97
- readonly "./document-models/*": {
98
- readonly types: "./dist/types/document-models/*/index.d.ts";
99
- readonly browser: "./dist/browser/document-models/*/index.js";
100
- readonly node: "./dist/node/document-models/*/index.mjs";
101
- };
102
- readonly "./editors": {
103
- readonly types: "./dist/types/editors/index.d.ts";
104
- readonly browser: "./dist/browser/editors/index.js";
105
- readonly node: "./dist/node/editors/index.mjs";
106
- };
107
- readonly "./editors/*": {
108
- readonly types: "./dist/types/editors/*/editor.d.ts";
109
- readonly browser: "./dist/browser/editors/*/editor.js";
110
- readonly node: "./dist/node/editors/*/editor.mjs";
111
- };
112
- readonly "./subgraphs": {
113
- readonly types: "./dist/types/subgraphs/index.d.ts";
114
- readonly browser: "./dist/browser/subgraphs/index.js";
115
- readonly node: "./dist/node/subgraphs/index.mjs";
116
- };
117
- readonly "./processors": {
118
- readonly types: "./dist/types/processors/index.d.ts";
119
- readonly browser: "./dist/browser/processors/index.js";
120
- readonly node: "./dist/node/processors/index.mjs";
121
- };
122
- readonly "./pieces": {
123
- readonly types: "./dist/types/pieces/index.d.ts";
124
- readonly node: "./dist/node/pieces/index.mjs";
125
- };
126
- readonly "./pieces/*": {
127
- readonly types: "./dist/types/pieces/*/index.d.ts";
128
- readonly node: "./dist/node/pieces/*/index.mjs";
129
- };
130
- readonly "./manifest": "./dist/powerhouse.manifest.json";
131
- readonly "./style.css": "./dist/style.css";
132
- };
133
- declare const packageScripts: {
134
- readonly "test:watch": "vitest";
135
- readonly lint: "oxlint --type-aware --type-check";
136
- readonly "lint:fix": "oxlint --type-aware --type-check --fix";
137
- readonly format: "oxfmt";
138
- readonly "format:check": "oxfmt --check";
139
- readonly tsc: "tsc";
140
- readonly "tsc:watch": "tsc --watch";
141
- readonly generate: "ph-cli generate";
142
- readonly connect: "ph-cli connect";
143
- readonly build: "ph-cli build";
144
- readonly reactor: "ph-cli reactor";
145
- readonly service: "ph-cli service";
146
- readonly vetra: "ph-cli vetra";
147
- readonly "service-startup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-startup.sh";
148
- readonly "service-unstartup": "bash ./node_modules/@powerhousedao/ph-cli/dist/scripts/service-unstartup.sh";
149
- };
150
- declare const externalDependencies: {};
151
- declare const LEGACY_LINT_FORMAT_DEPENDENCIES: readonly ["@eslint/js", "eslint", "eslint-config-prettier", "eslint-plugin-prettier", "eslint-plugin-react", "eslint-plugin-react-hooks", "globals", "prettier", "typescript-eslint"];
152
- declare const LEGACY_LINT_FORMAT_FILES: readonly ["eslint.config.js", "eslint.config.mjs", "eslint.config.cjs", "eslint.config.ts", ".eslintrc", ".eslintrc.js", ".eslintrc.cjs", ".eslintrc.json", ".eslintrc.yml", ".eslintrc.yaml", ".eslintignore", ".prettierrc", ".prettierrc.js", ".prettierrc.cjs", ".prettierrc.json", ".prettierrc.yml", ".prettierrc.yaml", "prettier.config.js", "prettier.config.cjs", "prettier.config.mjs", ".prettierignore"];
153
- declare const externalDevDependencies: {
154
- readonly "@electric-sql/pglite": "0.3.15";
155
- readonly "@electric-sql/pglite-tools": "0.2.20";
156
- readonly "@powerhousedao/document-engineering": "1.40.5";
157
- readonly "@tailwindcss/cli": "^4.1.18";
158
- readonly "@tailwindcss/vite": "^4.1.18";
159
- readonly "@types/node": "^24.9.2";
160
- readonly "@types/react": "^19.2.3";
161
- readonly "@types/react-dom": "^19.2.3";
162
- readonly "@vitejs/plugin-react": "^6.0.1";
163
- readonly "@vitest/coverage-v8": "4.1.1";
164
- readonly oxfmt: "0.68.0";
165
- readonly oxlint: "1.70.0";
166
- readonly "oxlint-tsgolint": "0.23.0";
167
- readonly tailwindcss: "^4.1.16";
168
- readonly typescript: "~7.0.2";
169
- readonly vite: "^8.0.10";
170
- readonly "vite-tsconfig-paths": "6.1.1";
171
- readonly vitest: "4.1.1";
172
- };
173
- declare const defaultManifest: Manifest;
174
- declare const DEFAULT_CONFIG: PowerhouseConfig;
175
- //#endregion
176
- //#region clis/types.d.ts
177
- type DrivePreserveStrategies = typeof DRIVES_PRESERVE_STRATEGIES;
178
- type DrivePreserveStrategy = DrivePreserveStrategies[number];
179
- type LogLevels = typeof LOG_LEVELS;
180
- type LogLevel = LogLevels[number];
181
- type PHPackageProvider = "npm" | "github" | "local" | "registry";
182
- type PowerhousePackage = {
183
- packageName: string;
184
- version?: string;
185
- provider?: PHPackageProvider;
186
- url?: string;
187
- };
188
- type PHConnectBranding = {
189
- appName?: string;
190
- homeBackground?: string | null;
191
- };
192
- type PHConnectDefaultDriveRemote = {
193
- url: string;
194
- name?: string | null;
195
- icon?: string | null;
196
- };
197
- type PHConnectDefaultDriveLocal = {
198
- /** Discriminator: this entry is a local drive created on first boot. */
199
- local: true;
200
- /** Stable drive id; the drive is not re-created on later boots. */
201
- id: string;
202
- name?: string | null;
203
- icon?: string | null;
204
- /** Drive app (preferred editor) to open on the drive. */
205
- app?: string;
206
- };
207
- type PHConnectDefaultDrive = PHConnectDefaultDriveRemote | PHConnectDefaultDriveLocal;
208
- type PHConnectDriveSection = {
209
- enabled?: boolean;
210
- allowAdd?: boolean;
211
- allowDelete?: boolean;
212
- };
213
- type PHConnectDriveSections = {
214
- remote?: PHConnectDriveSection;
215
- local?: PHConnectDriveSection;
216
- };
217
- type PHConnectDrives = {
218
- allowAddDrive?: boolean;
219
- defaultDrives?: PHConnectDefaultDrive[];
220
- preserveStrategy?: DrivePreserveStrategy;
221
- sections?: PHConnectDriveSections;
222
- };
223
- type PHConnectApp = {
224
- logLevel?: "debug" | "info" | "warn" | "error";
225
- basePath?: string;
226
- offline?: boolean;
227
- studioMode?: boolean;
228
- workflowsEnabled?: boolean;
229
- };
230
- type PHConnectAi = {
231
- /** Enables the in-browser AI assistant (chat FAB + window). Off by default. */
232
- assistantEnabled?: boolean;
233
- };
234
- type PHConnectPackages = {
235
- externalEnabled?: boolean;
236
- /** Subscribe to the static-mode `/__packages` SSE channel for live reload. */
237
- liveReload?: boolean;
238
- };
239
- type PHRenownRainbowAdapterConfig = {
240
- /** WalletConnect project id; required for the rainbow adapter to function. */
241
- walletConnectProjectId?: string;
242
- /** Optional Infura project id used to build RPC transports. */
243
- infuraProjectId?: string;
244
- };
245
- type PHRenownPrivyAdapterConfig = {
246
- /** Privy application id; required for the privy adapter to function. */
247
- appId?: string;
248
- /** Optional Privy client id. */
249
- clientId?: string;
250
- /** Login methods this adapter offers; defaults per adapter when omitted. */
251
- methods?: string[];
252
- };
253
- type PHConnectRenownAdapters = {
254
- rainbow?: PHRenownRainbowAdapterConfig;
255
- privy?: PHRenownPrivyAdapterConfig;
256
- };
257
- type PHConnectRenown = {
258
- url?: string;
259
- networkId?: string;
260
- chainId?: number;
261
- /** Renown localStorage namespace; share it across Connects to share login. */
262
- namespace?: string;
263
- /** Switchboard GraphQL URL; when set, enables in-page (no-redirect) auth. */
264
- switchboardUrl?: string;
265
- /** Per-adapter wallet config; presence of a key enables that adapter. */
266
- adapters?: PHConnectRenownAdapters;
267
- };
268
- type PHConnectSentry = {
269
- /** Sentry DSN URL. `null` disables Sentry entirely. */
270
- dsn?: string | null;
271
- /** Sentry environment label. */
272
- env?: string;
273
- /** Enable Sentry performance tracing. */
274
- tracing?: boolean;
275
- };
276
- type PHConnectOpenPanel = {
277
- /** OpenPanel client id. Empty string (the default) disables OpenPanel. */
278
- clientId?: string;
279
- /** OpenPanel API URL, for self-hosted instances. */
280
- apiUrl?: string;
281
- /** Track UI events. */
282
- trackUiEvents?: boolean;
283
- /** Track document operations. */
284
- trackOperations?: boolean;
285
- };
286
- type PHConnectInstance = {
287
- namespace: string | null;
288
- reactorWorker: boolean;
289
- };
290
- /** Each flag implies its predecessors, and must match the fleet Connect syncs
291
- * with or the two compute different replay outcomes. */
292
- type PHConnectReactorFeatureFlags = {
293
- /** Decide writes from the document stream instead of the meta cache. */
294
- documentDecisions?: boolean;
295
- /** Enforce the auth scope's policy at admission, replay, and read. */
296
- authEnforcement?: boolean;
297
- /** Let `{ group }` principals match, via the group documents' rosters. */
298
- authGroups?: boolean;
299
- /** Evaluate `where` / `match` conditions on grants. */
300
- authConditions?: boolean;
301
- };
302
- type PHConnectReactor = {
303
- featureFlags?: PHConnectReactorFeatureFlags;
304
- /** What new documents are created as; `legacy` while peers predate v2-required documents. */
305
- createSignaturePolicy?: "legacy" | "v2-required";
306
- /** Stored documents at protocol versions this build does not run: refuse to boot, or keep them read-only. */
307
- unsupportedStoredDocuments?: "refuse" | "read-only";
308
- };
309
- /**
310
- * A URL-matching pattern for a service-worker runtime-caching rule, in
311
- * JSON-serialisable form. A plain string is handed to Workbox verbatim (exact
312
- * URL or same-origin path match). `{ source, flags }` is reconstructed into a
313
- * `RegExp` at build time — use it for prefix/suffix/origin matches (e.g.
314
- * `{ source: "^https://api\\.acme\\.io/" }`). Function-valued patterns aren't
315
- * expressible here; regex covers the realistic package cases.
316
- */
317
- type PHConnectPwaUrlPattern = string | {
318
- source: string;
319
- flags?: string;
320
- };
321
- type PHConnectPwaCacheStrategy = "CacheFirst" | "CacheOnly" | "NetworkFirst" | "NetworkOnly" | "StaleWhileRevalidate";
322
- /** Serialisable subset of a Workbox `RuntimeCaching` rule. */
323
- type PHConnectPwaRuntimeCaching = {
324
- urlPattern: PHConnectPwaUrlPattern;
325
- handler: PHConnectPwaCacheStrategy;
326
- method?: "GET" | "POST" | "PUT" | "DELETE" | "HEAD" | "PATCH";
327
- options?: {
328
- cacheName?: string;
329
- /** Seconds a NetworkFirst rule waits for the network before falling back
330
- * to the cache. */
331
- networkTimeoutSeconds?: number;
332
- expiration?: {
333
- maxEntries?: number;
334
- maxAgeSeconds?: number;
335
- };
336
- cacheableResponse?: {
337
- statuses?: number[];
338
- headers?: Record<string, string>;
339
- };
340
- };
341
- };
342
- type PHConnectPwaIcon = {
343
- src: string;
344
- sizes?: string;
345
- type?: string;
346
- purpose?: string;
347
- };
348
- /**
349
- * A File Handling API entry a package or project contributes: the OS-level
350
- * file types the installed Connect PWA offers to open. There is deliberately
351
- * no `action` field — consuming launched files requires runtime code that
352
- * lives in Connect itself, so every handler (built-in or contributed) opens
353
- * at Connect's app root, injected at build time.
354
- */
355
- type PHConnectPwaFileHandler = {
356
- /** MIME type → file extensions (each must start with "."). */
357
- accept: Record<string, string[]>;
358
- /** OS-level file-type icons. */
359
- icons?: PHConnectPwaIcon[];
360
- launch_type?: "single-client" | "multiple-clients";
361
- };
362
- /** Web-app-manifest fields a package or project may override. */
363
- type PHConnectPwaManifest = {
364
- name?: string;
365
- short_name?: string;
366
- description?: string;
367
- theme_color?: string;
368
- background_color?: string;
369
- display?: "fullscreen" | "standalone" | "minimal-ui" | "browser";
370
- start_url?: string;
371
- scope?: string;
372
- icons?: PHConnectPwaIcon[];
373
- /** Extra file associations, appended after Connect's built-in `.phd`/`.phdm` handler. */
374
- file_handlers?: PHConnectPwaFileHandler[];
375
- /** How the OS launches the app for handled files/links. */
376
- launch_handler?: {
377
- client_mode: "auto" | "focus-existing" | "navigate-existing" | "navigate-new";
378
- };
379
- /** App-store-style categories. NOT authored under `connect.pwa` — derived at
380
- * build/runtime from the `category` field of every contributing
381
- * `powerhouse.manifest.json` (project + packages), unioned across them. */
382
- categories?: string[];
383
- };
384
- /**
385
- * PWA / service-worker overrides contributed by a package or the project.
386
- * Layered on top of Connect's hardcoded PWA defaults at build time. Scalar
387
- * fields deep-merge (later layer wins); every array member — the manifest
388
- * arrays (`icons`, `file_handlers`, and the derived `categories`) plus the
389
- * top-level `globPatterns`, `globIgnores`, `runtimeCaching` and
390
- * `navigateFallbackDenylist` — is additive (concatenated/unioned);
391
- * `maximumFileSizeToCacheInBytes` takes the max across contributors.
392
- * Precedence: defaults < package fragments < project config.
393
- */
394
- type PHConnectPwa = {
395
- manifest?: PHConnectPwaManifest;
396
- /** Extra Workbox precache globs, unioned with the built-in patterns. */
397
- globPatterns?: string[];
398
- /** Extra Workbox precache ignore globs, unioned with the built-in list. */
399
- globIgnores?: string[];
400
- /** Raise the precache file-size ceiling; the max across contributors wins. */
401
- maximumFileSizeToCacheInBytes?: number;
402
- /** Additional runtime-caching rules, appended after the built-in rules. */
403
- runtimeCaching?: PHConnectPwaRuntimeCaching[];
404
- /** Extra SPA-fallback denylist patterns, unioned with the built-in list. */
405
- navigateFallbackDenylist?: PHConnectPwaUrlPattern[];
406
- };
407
- type PHConnectRuntimeConfig = {
408
- branding?: PHConnectBranding;
409
- app?: PHConnectApp;
410
- ai?: PHConnectAi;
411
- packages?: PHConnectPackages;
412
- drives?: PHConnectDrives;
413
- renown?: PHConnectRenown;
414
- sentry?: PHConnectSentry;
415
- openPanel?: PHConnectOpenPanel;
416
- instance?: PHConnectInstance;
417
- reactor?: PHConnectReactor;
418
- pwa?: PHConnectPwa;
419
- };
420
- /** Which Renown instance a reactor authenticates against, server-side. */
421
- type PHReactorRenown = {
422
- /** "self" reads this reactor's own renown read model; "remote" (default)
423
- * queries a Renown or Switchboard instance. */
424
- source?: "remote" | "self";
425
- /** Renown base URL; also the instance this reactor's own identity uses. */
426
- url?: string;
427
- /** Switchboard GraphQL endpoint to read credentials from directly. */
428
- switchboardUrl?: string;
429
- };
430
- type PowerhouseConfig = {
431
- logLevel: LogLevel;
432
- documentModelsDir: string;
433
- editorsDir: string;
434
- processorsDir: string;
435
- subgraphsDir: string;
436
- importScriptsDir: string;
437
- skipFormat: boolean;
438
- interactive?: boolean;
439
- watch?: boolean;
440
- reactor?: {
441
- port?: number;
442
- https?: undefined | boolean | {
443
- keyPath: string;
444
- certPath: string;
445
- };
446
- storage?: {
447
- type: "filesystem" | "memory" | "postgres" | "browser";
448
- filesystemPath?: string;
449
- postgresUrl?: string;
450
- };
451
- };
452
- auth?: {
453
- enabled?: boolean;
454
- admins: string[];
455
- renown?: PHReactorRenown;
456
- };
457
- switchboard?: {
458
- database?: {
459
- url?: string;
460
- };
461
- port?: number;
462
- };
463
- studio?: {
464
- port?: number;
465
- host?: string;
466
- https: boolean;
467
- openBrowser?: boolean;
468
- };
469
- packages?: PowerhousePackage[];
470
- vetra?: {
471
- driveId?: string;
472
- driveUrl?: string;
473
- connectPort?: number;
474
- };
475
- workflows?: {
476
- enabled?: boolean;
477
- };
478
- packageRegistryUrl?: string;
479
- connect?: PHConnectRuntimeConfig;
480
- };
481
- //#endregion
482
- //#region document-model/schemas.d.ts
483
- declare const ManifestSchema: z.ZodObject<{
484
- name: z.ZodString;
485
- description: z.ZodOptional<z.ZodString>;
486
- category: z.ZodOptional<z.ZodString>;
487
- image: z.ZodOptional<z.ZodString>;
488
- publisher: z.ZodOptional<z.ZodObject<{
489
- name: z.ZodOptional<z.ZodString>;
490
- url: z.ZodOptional<z.ZodString>;
491
- }, z.core.$strip>>;
492
- documentModels: z.ZodOptional<z.ZodArray<z.ZodObject<{
493
- id: z.ZodString;
494
- name: z.ZodString;
495
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
496
- }, z.core.$strip>>>;
497
- apps: z.ZodOptional<z.ZodArray<z.ZodObject<{
498
- id: z.ZodString;
499
- name: z.ZodString;
500
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
501
- }, z.core.$strip>>>;
502
- editors: z.ZodOptional<z.ZodArray<z.ZodObject<{
503
- id: z.ZodString;
504
- name: z.ZodString;
505
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
506
- }, z.core.$strip>>>;
507
- processors: z.ZodOptional<z.ZodArray<z.ZodObject<{
508
- id: z.ZodString;
509
- name: z.ZodString;
510
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
511
- }, z.core.$strip>>>;
512
- subgraphs: z.ZodOptional<z.ZodArray<z.ZodObject<{
513
- id: z.ZodString;
514
- name: z.ZodString;
515
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
516
- }, z.core.$strip>>>;
517
- pieces: z.ZodOptional<z.ZodArray<z.ZodObject<{
518
- id: z.ZodString;
519
- name: z.ZodString;
520
- documentTypes: z.ZodOptional<z.ZodArray<z.ZodString>>;
521
- version: z.ZodOptional<z.ZodString>;
522
- description: z.ZodOptional<z.ZodString>;
523
- bundle: z.ZodOptional<z.ZodString>;
524
- descriptor: z.ZodOptional<z.ZodString>;
525
- }, z.core.$strip>>>;
526
- config: z.ZodOptional<z.ZodArray<z.ZodObject<{
527
- name: z.ZodString;
528
- type: z.ZodUnion<readonly [z.ZodLiteral<"var">, z.ZodLiteral<"secret">]>;
529
- description: z.ZodOptional<z.ZodString>;
530
- required: z.ZodOptional<z.ZodBoolean>;
531
- default: z.ZodOptional<z.ZodString>;
532
- }, z.core.$strip>>>;
533
- pwa: z.ZodOptional<z.ZodType<PHConnectPwa, unknown, z.core.$ZodTypeInternals<PHConnectPwa, unknown>>>;
534
- }, z.core.$strip>;
535
- //#endregion
536
- //#region document-model/types.d.ts
537
- type Manifest = z.infer<typeof ManifestSchema>;
538
- //#endregion
539
- export { PIECES_FRAMEWORK_PACKAGE as A, VERSIONED_DEPENDENCIES as B, LEGACY_LINT_FORMAT_FILES as C, PH_BIN as D, PEER_EXTERNAL_DEPENDENCIES as E, PROJECT_PORT_BAND_SWITCHBOARD as F, externalDevDependencies as G, VERSIONED_PEER_DEPENDENCIES as H, PROJECT_PORT_BAND_VETRA_CONNECT as I, packageJsonExports as K, REACTOR_API_PACKAGE as L, POWERHOUSE_GLOBAL_DIR as M, PROJECT_PORT_BAND_SIZE as N, PH_GLOBAL_DIR_NAME as O, PROJECT_PORT_BAND_STUDIO as P, SECONDS_IN_DAY as R, LEGACY_LINT_FORMAT_DEPENDENCIES as S, MINIMUM_NODE_VERSION as T, defaultManifest as U, VERSIONED_DEV_DEPENDENCIES as V, externalDependencies as W, DRIVES_PRESERVE_STRATEGIES as _, DEFAULT_CONFIG as a, GRAPHQL_TAG_PACKAGE as b, DEFAULT_CONNECT_STUDIO_PORT as c, DEFAULT_REGISTRY_URL as d, DEFAULT_RENOWN_URL as f, DEFAULT_VETRA_DRIVE_ID as g, DEFAULT_VETRA_CONNECT_PORT as h, BOILERPLATE_DEPENDENCY_OVERRIDES as i, POWERHOUSE_CONFIG_FILE as j, PH_GLOBAL_PROJECT_NAME as k, DEFAULT_EXPIRY_DAYS as l, DEFAULT_TIMEOUT as m, ANALYTICS_ENGINE_CORE_PACKAGE as n, DEFAULT_CONNECT_OUTDIR as o, DEFAULT_SWITCHBOARD_PORT as p, packageScripts as q, BOILERPLATE_ALLOWED_BUILDS as r, DEFAULT_CONNECT_PREVIEW_PORT as s, Manifest as t, DEFAULT_EXPIRY_SECONDS as u, FEATURE_DEPENDENCIES as v, LOG_LEVELS as w, HOME_DIR as x, GRAPHQL_PACKAGE as y, SERVICE_ACTIONS as z };
540
- export {};
541
- //# sourceMappingURL=types-nzer4WIr.d.mts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types-nzer4WIr.d.mts","names":[],"sources":["../../clis/constants.ts","../../clis/types.ts","../../document-model/schemas.ts","../../document-model/types.ts"],"mappings":";;;;;;;cAKa;cAQA;cACA;cACA;cAEA;cAKA;cAQA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAEA;cAqBA;cACA;cACA;cACA;cAEA;cAEA;cACA;cACA;cACA;cAEA;cAEA;cAEA;cAGA;cAOA;cACA;cAEA;cACA;cACA;cAQA;;aACU;aAAa;;;aACT;aAAY;;;aAC5B;aAAa;;;aACP;aAAa;;;aACrB;aAAY;;;cAKR;;aAET;aACA;aACA;;;aAKA;aACA;aACA;;;cAWS;cAUA;cAiBA;WACC;WACN;WACI;;cAGC;cAQA;WACX;aACE;aACA;aACA;;WAEF;aACE;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAEF;aACE;aACA;aACA;;WAKF;aACE;aACA;;WAEF;aACE;aACA;;WAEF;WACA;;cAGW;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WAEA;;cAIW;cAIA;cAcA;cAwBA;WACX;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;WACA;;cAGW,iBAAiB;cAuBjB,gBAAgB;;;KCxUjB,iCAAiC;KACjC,wBAAwB;KACxB,mBAAmB;KACnB,WAAW;KAOX;KAGA;EACV;EACA;EACA,WAAW;EACX;;KAGU;EACV;EACA;;KAGU;EACV;EACA;EACA;;KAGU;;EAEV;;EAEA;EACA;EACA;;EAEA;;KAGU,wBACR,8BACA;KAEQ;EACV;EACA;EACA;;KAGU;EACV,SAAS;EACT,QAAQ;;KAGE;EACV;EACA,gBAAgB;EAChB,mBAAmB;EACnB,WAAW;;KAGD;EACV;EACA;EACA;EAGA;EAKA;;KAGU;;EAEV;;KAGU;EACV;;EAEA;;KAGU;;EAEV;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;KAGU;EACV,UAAU;EACV,QAAQ;;KAGE;EACV;EACA;EACA;;EAEA;;EAEA;;EAEA,WAAW;;KAGD;;EAEV;;EAEA;;EAEA;;KAGU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV;EACA;;;;KAKU;;EAEV;;EAEA;;EAEA;;EAEA;;KAGU;EACV,eAAe;;EAEf;;EAEA;;;;;;;;;;KAWU;EAEN;EAAgB;;KAEV;;KAQA;EACV,YAAY;EACZ,SAAS;EACT;EACA;IACE;;;IAGA;IACA;MAAe;MAAqB;;IACpC;MACE;MACA,UAAU;;;;KAKJ;EACV;EACA;EACA;EACA;;;;;;;;;KAUU;;EAEV,QAAQ;;EAER,QAAQ;EACR;;;KAIU;EACV;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,QAAQ;;EAER,gBAAgB;;EAEhB;IACE;;;;;EASF;;;;;;;;;;;;KAaU;EACV,WAAW;;EAEX;;EAEA;;EAEA;;EAEA,iBAAiB;;EAEjB,2BAA2B;;KAGjB;EACV,WAAW;EACX,MAAM;EACN,KAAK;EACL,WAAW;EACX,SAAS;EACT,SAAS;EACT,SAAS;EACT,YAAY;EACZ,WAAW;EACX,UAAU;EACV,MAAM;;;KAII;;;EAGV;;EAEA;;EAEA;;KAGU;EAEV,UAAU;EACV;EACA;EACA;EACA;EACA;EACA;EAGA;EACA;EACA;IACE;IACA;MAIM;MACA;;IAEN;MACE;MACA;MACA;;;EAGJ;IACE;IACA;IACA,SAAS;;EAEX;IACE;MACE;;IAEF;;EAEF;IACE;IACA;IACA;IACA;;EAEF,WAAW;EACX;IACE;IACA;IACA;;EAIF;IACE;;EAEF;EACA,UAAU;;;;cC6eC,gBAAc,EAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAiBzB,EAAA,KAAA;;;KCg0BU,WAAW,EAAE,aAAa"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"config-loader-C6dZB_iX.js","names":[],"sources":["../connect/runtime-config.ts","../connect/config-loader.ts"],"sourcesContent":["import type {\n PHConnectRuntimeConfig,\n PowerhouseConfig,\n PowerhousePackage,\n} from \"../clis/types.js\";\n\nexport type RuntimePowerhouseConfig = {\n schemaVersion: 2;\n packages: PowerhousePackage[];\n packageRegistryUrl?: string;\n localPackage: { name: string; version: string } | null;\n connect: PHConnectRuntimeConfig;\n};\n\n/** Defaults for every field Connect reads at runtime, merged into the\n * `connect.*` block at boot; also the dist emitter's and the scaffold's base. */\nexport const DEFAULT_CONNECT_CONFIG: PHConnectRuntimeConfig = {\n branding: {\n appName: \"Powerhouse Connect\",\n homeBackground: null,\n },\n app: {\n logLevel: \"info\",\n basePath: \"/\",\n offline: true,\n studioMode: false,\n },\n ai: {\n assistantEnabled: false,\n },\n packages: {\n externalEnabled: true,\n liveReload: false,\n },\n drives: {\n allowAddDrive: true,\n defaultDrives: [],\n sections: {\n remote: { enabled: true, allowAdd: true, allowDelete: true },\n local: { enabled: true, allowAdd: true, allowDelete: true },\n },\n },\n renown: {\n url: \"https://www.renown.id\",\n networkId: \"eip155\",\n chainId: 1,\n },\n sentry: {\n // `dsn: null` is the disabled-Sentry state — the SPA never loads the\n // Sentry SDK chunk. Override via `ph connect config --sentry-dsn ...`\n // or by including `connect.sentry.dsn` in PH_CONNECT_CONFIG_JSON.\n dsn: null,\n env: \"dev\",\n tracing: false,\n },\n openPanel: {\n // An empty `clientId` keeps OpenPanel disabled. Enable it per deploy by\n // including `connect.openPanel.clientId` in PH_CONNECT_CONFIG_JSON.\n // `apiUrl` has no default: unset means OpenPanel's hosted API.\n clientId: \"\",\n trackUiEvents: true,\n trackOperations: true,\n },\n instance: {\n namespace: null,\n reactorWorker: false,\n },\n reactor: {\n featureFlags: {\n documentDecisions: false,\n authEnforcement: false,\n authGroups: false,\n authConditions: false,\n },\n createSignaturePolicy: \"v2-required\",\n unsupportedStoredDocuments: \"refuse\",\n },\n};\n\nexport function buildRuntimeConfig(\n source: Pick<PowerhouseConfig, \"packages\" | \"connect\" | \"packageRegistryUrl\">,\n projectInfo: { name: string; version: string } | null,\n): RuntimePowerhouseConfig {\n const result: RuntimePowerhouseConfig = {\n schemaVersion: 2,\n packages: source.packages ?? [],\n localPackage: projectInfo,\n connect: source.connect ?? {},\n };\n if (\n typeof source.packageRegistryUrl === \"string\" &&\n source.packageRegistryUrl !== \"\"\n ) {\n result.packageRegistryUrl = source.packageRegistryUrl;\n }\n return result;\n}\n","// Environment-neutral config loader. Wraps a `ConfigAdapter` (the IO layer)\n// with in-process caching and deep-merge-with-defaults reads.\n//\n// No validation. The loader trusts that whatever bytes the adapter returns\n// can be merged into the default Connect config; missing or partial fields\n// fall back to DEFAULT_CONNECT_CONFIG, so the SPA always sees a complete\n// `connect.*` block.\n//\n// Top-level fields outside `connect.*` (e.g. `studio.port` in the source\n// powerhouse.config.json) pass through untouched on both read and write.\n// They're not Connect's concern, but a write-back round-trip preserves\n// them so editing tools don't accidentally drop them.\n\nimport { isPlainObject } from \"remeda\";\nimport type {\n PHConnectRuntimeConfig,\n PowerhouseConfig,\n} from \"../clis/types.js\";\nimport { DEFAULT_CONNECT_CONFIG } from \"./runtime-config.js\";\n\n/** Recursive Partial. Arrays are leaves — `write({ packages: [...] })`\n * replaces the array, it doesn't merge. */\nexport type DeepPartial<T> =\n T extends Array<infer U>\n ? Array<U>\n : T extends object\n ? { [K in keyof T]?: DeepPartial<T[K]> }\n : T;\n\n/**\n * Shape returned by `ConfigLoader.read()`. The loader is Connect-scoped:\n * it guarantees `connect` is present and fully populated from\n * DEFAULT_CONNECT_CONFIG, but lets any other top-level fields pass\n * through unchanged so source-config-only fields (studio, reactor, auth,\n * documentModelsDir, etc.) survive a read+write round-trip.\n */\nexport type ConfigShape = Record<string, unknown> & {\n connect: PHConnectRuntimeConfig;\n};\n\n/**\n * Abstract IO layer for `powerhouse.config.json`.\n *\n * Implementations decide where bytes come from and go to. The shipped\n * adapter is `JsonConfigAdapter` (reads via fetch in the browser, fs in\n * Node; writes via fs in Node, throws in the browser). Future adapters\n * (remote-JSON, GraphQL) plug in without changing the loader or any\n * consumer.\n */\nexport interface ConfigAdapter {\n /** Read raw JSON-parsed payload from the backing store. */\n read(): Promise<unknown>;\n /** Persist a fully-formed config. */\n write(next: ConfigShape): Promise<void>;\n /** Human-readable description used in errors and logs. */\n readonly source: string;\n}\n\n/**\n * Deep-merge `patch` into `base`. Object fields recurse; arrays and\n * primitives replace. `undefined` in patch leaves the base value\n * untouched (no unset). `null` in patch overwrites with null.\n *\n * Exported for unit tests; consumers use ConfigLoader.write() which\n * applies this internally.\n */\nexport function deepMerge<T>(base: T, patch: DeepPartial<T>): T {\n if (!isPlainObject(base) || !isPlainObject(patch)) {\n return patch as T;\n }\n const result: Record<string, unknown> = { ...base };\n for (const [key, patchValue] of Object.entries(patch)) {\n if (patchValue === undefined) continue;\n const baseValue = result[key];\n if (isPlainObject(baseValue) && isPlainObject(patchValue)) {\n result[key] = deepMerge(\n baseValue,\n patchValue as DeepPartial<typeof baseValue>,\n );\n } else {\n result[key] = patchValue;\n }\n }\n return result as T;\n}\n\n/**\n * The effective `connect.*` block of a source `powerhouse.config.json`:\n * defaults < project-wide settings Connect follows < `connect.*`. So\n * `connect.app.workflowsEnabled` falls back to `workflows.enabled`, and\n * wins when set.\n */\nexport function resolveSourceConnect(\n source: Pick<PowerhouseConfig, \"connect\" | \"workflows\">,\n defaults: PHConnectRuntimeConfig = DEFAULT_CONNECT_CONFIG,\n): PHConnectRuntimeConfig {\n const projectWide = deepMerge(defaults, {\n app: { workflowsEnabled: source.workflows?.enabled },\n });\n return deepMerge(projectWide, source.connect ?? {});\n}\n\n/**\n * Pluggable loader on top of a `ConfigAdapter`.\n *\n * Responsibilities:\n * - merge-with-defaults on read (so consumers never see a partial connect block)\n * - in-process caching (call `invalidate()` to force re-read)\n * - deep-merge for partial writes; writes the merged whole back through the adapter\n *\n * The cache is module-instance scoped — every `new ConfigLoader(...)` has\n * its own cache. The browser SPA constructs the loader once at boot; the\n * CLI typically constructs a fresh loader per command.\n */\nexport class ConfigLoader {\n private cache: ConfigShape | undefined;\n\n constructor(\n private readonly adapter: ConfigAdapter,\n private readonly defaults: PHConnectRuntimeConfig = DEFAULT_CONNECT_CONFIG,\n ) {}\n\n /** Returns the config with the default connect block merged in.\n * Cached after the first successful call. */\n async read(): Promise<ConfigShape> {\n if (this.cache) return this.cache;\n const raw = await this.adapter.read();\n const obj = isPlainObject(raw) ? raw : {};\n const connectRaw = isPlainObject(obj.connect) ? obj.connect : {};\n this.cache = {\n ...obj,\n connect: deepMerge(\n this.defaults,\n connectRaw as DeepPartial<PHConnectRuntimeConfig>,\n ),\n };\n return this.cache;\n }\n\n /**\n * Returns the cached config synchronously. Throws if `read()` has not\n * resolved yet — matches Connect's `getRuntimeConfig()` shape.\n */\n getCached(): ConfigShape {\n if (!this.cache) {\n throw new Error(\n `ConfigLoader (${this.adapter.source}): cache empty; call read() first.`,\n );\n }\n return this.cache;\n }\n\n /** Drop the in-memory cache. Next `read()` re-fetches from the adapter. */\n invalidate(): void {\n this.cache = undefined;\n }\n\n /**\n * Deep-merge `patch` into the current config and persist via the adapter.\n * Returns the new full config (also updates the cache). Arrays in `patch`\n * replace — they do NOT append.\n */\n async write(patch: DeepPartial<ConfigShape>): Promise<ConfigShape> {\n const current = await this.read();\n const next = deepMerge(current, patch);\n await this.adapter.write(next);\n this.cache = next;\n return next;\n }\n}\n"],"mappings":";;;;AAgBA,MAAa,yBAAiD;CAC5D,UAAU;EACR,SAAS;EACT,gBAAgB;CAClB;CACA,KAAK;EACH,UAAU;EACV,UAAU;EACV,SAAS;EACT,YAAY;CACd;CACA,IAAI,EACF,kBAAkB,MACpB;CACA,UAAU;EACR,iBAAiB;EACjB,YAAY;CACd;CACA,QAAQ;EACN,eAAe;EACf,eAAe,CAAC;EAChB,UAAU;GACR,QAAQ;IAAE,SAAS;IAAM,UAAU;IAAM,aAAa;GAAK;GAC3D,OAAO;IAAE,SAAS;IAAM,UAAU;IAAM,aAAa;GAAK;EAC5D;CACF;CACA,QAAQ;EACN,KAAK;EACL,WAAW;EACX,SAAS;CACX;CACA,QAAQ;EAIN,KAAK;EACL,KAAK;EACL,SAAS;CACX;CACA,WAAW;EAIT,UAAU;EACV,eAAe;EACf,iBAAiB;CACnB;CACA,UAAU;EACR,WAAW;EACX,eAAe;CACjB;CACA,SAAS;EACP,cAAc;GACZ,mBAAmB;GACnB,iBAAiB;GACjB,YAAY;GACZ,gBAAgB;EAClB;EACA,uBAAuB;EACvB,4BAA4B;CAC9B;AACF;AAEA,SAAgB,mBACd,QACA,aACyB;CACzB,MAAM,SAAkC;EACtC,eAAe;EACf,UAAU,OAAO,YAAY,CAAC;EAC9B,cAAc;EACd,SAAS,OAAO,WAAW,CAAC;CAC9B;CACA,IACE,OAAO,OAAO,uBAAuB,YACrC,OAAO,uBAAuB,IAE9B,OAAO,qBAAqB,OAAO;CAErC,OAAO;AACT;;;;;;;;;;;AC9BA,SAAgB,UAAa,MAAS,OAA0B;CAC9D,IAAI,CAAC,cAAc,IAAI,KAAK,CAAC,cAAc,KAAK,GAC9C,OAAO;CAET,MAAM,SAAkC,EAAE,GAAG,KAAK;CAClD,KAAK,MAAM,CAAC,KAAK,eAAe,OAAO,QAAQ,KAAK,GAAG;EACrD,IAAI,eAAe,KAAA,GAAW;EAC9B,MAAM,YAAY,OAAO;EACzB,IAAI,cAAc,SAAS,KAAK,cAAc,UAAU,GACtD,OAAO,OAAO,UACZ,WACA,UACF;OAEA,OAAO,OAAO;CAElB;CACA,OAAO;AACT;;;;;;;AAQA,SAAgB,qBACd,QACA,WAAmC,wBACX;CAIxB,OAAO,UAHa,UAAU,UAAU,EACtC,KAAK,EAAE,kBAAkB,OAAO,WAAW,QAAQ,EACrD,CAC2B,GAAG,OAAO,WAAW,CAAC,CAAC;AACpD;;;;;;;;;;;;;AAcA,IAAa,eAAb,MAA0B;CAIL;CACA;CAJnB;CAEA,YACE,SACA,WAAoD,wBACpD;EAFiB,KAAA,UAAA;EACA,KAAA,WAAA;CAChB;;;CAIH,MAAM,OAA6B;EACjC,IAAI,KAAK,OAAO,OAAO,KAAK;EAC5B,MAAM,MAAM,MAAM,KAAK,QAAQ,KAAK;EACpC,MAAM,MAAM,cAAc,GAAG,IAAI,MAAM,CAAC;EACxC,MAAM,aAAa,cAAc,IAAI,OAAO,IAAI,IAAI,UAAU,CAAC;EAC/D,KAAK,QAAQ;GACX,GAAG;GACH,SAAS,UACP,KAAK,UACL,UACF;EACF;EACA,OAAO,KAAK;CACd;;;;;CAMA,YAAyB;EACvB,IAAI,CAAC,KAAK,OACR,MAAM,IAAI,MACR,iBAAiB,KAAK,QAAQ,OAAO,mCACvC;EAEF,OAAO,KAAK;CACd;;CAGA,aAAmB;EACjB,KAAK,QAAQ,KAAA;CACf;;;;;;CAOA,MAAM,MAAM,OAAuD;EAEjE,MAAM,OAAO,UAAU,MADD,KAAK,KAAK,GACA,KAAK;EACrC,MAAM,KAAK,QAAQ,MAAM,IAAI;EAC7B,KAAK,QAAQ;EACb,OAAO;CACT;AACF"}
@@ -1,9 +0,0 @@
1
- //#region constants.d.ts
2
- declare const PACKAGES_DEPENDENCIES: readonly ["@powerhousedao/builder-tools", "@powerhousedao/codegen", "@powerhousedao/common", "@powerhousedao/config", "@powerhousedao/design-system", "document-drive", "document-model", "@powerhousedao/reactor", "@powerhousedao/reactor-api", "@powerhousedao/reactor-browser", "@powerhousedao/reactor-mcp", "@powerhousedao/switchboard-gui", "@powerhousedao/vetra", "@powerhousedao/analytics-engine-core", "@powerhousedao/analytics-engine-knex", "@powerhousedao/analytics-engine-pg", "@powerhousedao/analytics-engine-browser", "@powerhousedao/analytics-engine-graphql", "@powerhousedao/shared", "@powerhousedao/powerhouse-vetra-packages", "@powerhousedao/analytics-engine-core", "@powerhousedao/analytics-engine-graphql", "@powerhousedao/analytics-engine-knex", "@powerhousedao/analytics-engine-pg", "@powerhousedao/analytics-engine-browser", "@renown/sdk"];
3
- declare const CLIS_DEPENDENCIES: string[];
4
- declare const APPS_DEPENDENCIES: string[];
5
- declare const ALL_POWERHOUSE_DEPENDENCIES: string[];
6
- //#endregion
7
- export { PACKAGES_DEPENDENCIES as i, APPS_DEPENDENCIES as n, CLIS_DEPENDENCIES as r, ALL_POWERHOUSE_DEPENDENCIES as t };
8
- export {};
9
- //# sourceMappingURL=constants-DO4IYxuR.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants-DO4IYxuR.d.ts","names":[],"sources":["../constants.ts"],"mappings":";cAAa;cA6BA;cACA;cAKA"}