@powerhousedao/shared 6.2.3-dev.5 → 6.2.3-dev.51

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 (282) hide show
  1. package/dist/analytics/index.d.ts +4 -4
  2. package/dist/analytics/index.d.ts.map +1 -1
  3. package/dist/analytics/index.js +25 -24
  4. package/dist/analytics/index.js.map +1 -1
  5. package/dist/clis/args/{access-token-To5LaIfL.mjs → access-token-3Hqv_U8I.mjs} +2 -2
  6. package/dist/clis/args/{access-token-To5LaIfL.mjs.map → access-token-3Hqv_U8I.mjs.map} +1 -1
  7. package/dist/clis/args/access-token-C5sKsH2O.d.mts +16 -0
  8. package/dist/clis/args/access-token-C5sKsH2O.d.mts.map +1 -0
  9. package/dist/clis/args/access-token.d.mts +3 -2
  10. package/dist/clis/args/access-token.mjs +1 -1
  11. package/dist/clis/args/{common-CcYbXrBx.mjs → common-BXabdhiO.mjs} +30 -7
  12. package/dist/clis/args/common-BXabdhiO.mjs.map +1 -0
  13. package/dist/clis/args/common-Bnm859xU.d.mts +186 -0
  14. package/dist/clis/args/common-Bnm859xU.d.mts.map +1 -0
  15. package/dist/clis/args/common.d.mts +3 -2
  16. package/dist/clis/args/common.mjs +1 -1
  17. package/dist/clis/args/{connect-BVVvCmL9.mjs → connect-BG3HkYBk.mjs} +8 -3
  18. package/dist/clis/args/connect-BG3HkYBk.mjs.map +1 -0
  19. package/dist/clis/args/connect-DjeiqXus.d.mts +450 -0
  20. package/dist/clis/args/connect-DjeiqXus.d.mts.map +1 -0
  21. package/dist/clis/args/connect.d.mts +3 -2
  22. package/dist/clis/args/connect.mjs +1 -1
  23. package/dist/clis/args/dist-CorQTQL-.mjs +1533 -0
  24. package/dist/clis/args/dist-CorQTQL-.mjs.map +1 -0
  25. package/dist/clis/args/{generate-CA916Fvj.mjs → generate-BOItUNvP.mjs} +40 -2
  26. package/dist/clis/args/generate-BOItUNvP.mjs.map +1 -0
  27. package/dist/clis/args/generate-BPBBLeUD.d.mts +103 -0
  28. package/dist/clis/args/generate-BPBBLeUD.d.mts.map +1 -0
  29. package/dist/clis/args/generate.d.mts +3 -2
  30. package/dist/clis/args/generate.mjs +1 -1
  31. package/dist/clis/args/{help-Bqbgbalu.mjs → help-DS1NlcJQ.mjs} +15 -15
  32. package/dist/clis/args/{help-Bqbgbalu.mjs.map → help-DS1NlcJQ.mjs.map} +1 -1
  33. package/dist/clis/args/help-DVPTARGn.d.mts +190 -0
  34. package/dist/clis/args/help-DVPTARGn.d.mts.map +1 -0
  35. package/dist/clis/args/help.d.mts +3 -2
  36. package/dist/clis/args/help.mjs +1 -1
  37. package/dist/clis/args/index.d.mts +20 -19
  38. package/dist/clis/args/index.mjs +18 -18
  39. package/dist/clis/args/init-CFeTq4Cq.d.mts +52 -0
  40. package/dist/clis/args/init-CFeTq4Cq.d.mts.map +1 -0
  41. package/dist/clis/args/{init-rz9Ei7nq.mjs → init-Dvb42Y87.mjs} +2 -2
  42. package/dist/clis/args/{init-rz9Ei7nq.mjs.map → init-Dvb42Y87.mjs.map} +1 -1
  43. package/dist/clis/args/init.d.mts +3 -2
  44. package/dist/clis/args/init.mjs +1 -1
  45. package/dist/clis/args/inspect-BjRmtB86.d.mts +13 -0
  46. package/dist/clis/args/inspect-BjRmtB86.d.mts.map +1 -0
  47. package/dist/clis/args/{inspect-tckH8mSw.mjs → inspect-UNQgtuR0.mjs} +2 -2
  48. package/dist/clis/args/{inspect-tckH8mSw.mjs.map → inspect-UNQgtuR0.mjs.map} +1 -1
  49. package/dist/clis/args/inspect.d.mts +3 -2
  50. package/dist/clis/args/inspect.mjs +1 -1
  51. package/dist/clis/args/install-B0tMyUMw.d.mts +37 -0
  52. package/dist/clis/args/install-B0tMyUMw.d.mts.map +1 -0
  53. package/dist/clis/args/{install-Sz2DlCHh.mjs → install-F-27kF6m.mjs} +2 -2
  54. package/dist/clis/args/{install-Sz2DlCHh.mjs.map → install-F-27kF6m.mjs.map} +1 -1
  55. package/dist/clis/args/install.d.mts +3 -2
  56. package/dist/clis/args/install.mjs +1 -1
  57. package/dist/clis/args/{list-DM2d6f1m.mjs → list-Bkfn8Yuo.mjs} +2 -2
  58. package/dist/clis/args/{list-DM2d6f1m.mjs.map → list-Bkfn8Yuo.mjs.map} +1 -1
  59. package/dist/clis/args/list-DrbxA7JJ.d.mts +10 -0
  60. package/dist/clis/args/list-DrbxA7JJ.d.mts.map +1 -0
  61. package/dist/clis/args/list.d.mts +3 -2
  62. package/dist/clis/args/list.mjs +1 -1
  63. package/dist/clis/args/{login-DiKT5Jfu.mjs → login-CIFkQExi.mjs} +2 -2
  64. package/dist/clis/args/{login-DiKT5Jfu.mjs.map → login-CIFkQExi.mjs.map} +1 -1
  65. package/dist/clis/args/login-CXRJXg71.d.mts +25 -0
  66. package/dist/clis/args/login-CXRJXg71.d.mts.map +1 -0
  67. package/dist/clis/args/login.d.mts +3 -2
  68. package/dist/clis/args/login.mjs +1 -1
  69. package/dist/clis/args/migrate-DkCQRL2D.d.mts +19 -0
  70. package/dist/clis/args/migrate-DkCQRL2D.d.mts.map +1 -0
  71. package/dist/clis/args/{migrate-CG_gWc4k.mjs → migrate-DwJGhc2d.mjs} +2 -2
  72. package/dist/clis/args/{migrate-CG_gWc4k.mjs.map → migrate-DwJGhc2d.mjs.map} +1 -1
  73. package/dist/clis/args/migrate.d.mts +3 -2
  74. package/dist/clis/args/migrate.mjs +1 -1
  75. package/dist/clis/args/publish-CeW4bOrl.d.mts +16 -0
  76. package/dist/clis/args/publish-CeW4bOrl.d.mts.map +1 -0
  77. package/dist/clis/args/{publish-DDZYsUfV.mjs → publish-DHqlGWmL.mjs} +2 -2
  78. package/dist/clis/args/{publish-DDZYsUfV.mjs.map → publish-DHqlGWmL.mjs.map} +1 -1
  79. package/dist/clis/args/publish.d.mts +3 -2
  80. package/dist/clis/args/publish.mjs +1 -1
  81. package/dist/clis/args/{registry-C_OVFQmI.mjs → registry-DIwES3l2.mjs} +2 -2
  82. package/dist/clis/args/{registry-C_OVFQmI.mjs.map → registry-DIwES3l2.mjs.map} +1 -1
  83. package/dist/clis/args/registry-DNH8xuaE.d.mts +17 -0
  84. package/dist/clis/args/registry-DNH8xuaE.d.mts.map +1 -0
  85. package/dist/clis/args/registry.d.mts +3 -2
  86. package/dist/clis/args/registry.mjs +1 -1
  87. package/dist/clis/args/service-CHjY5epu.d.mts +27 -0
  88. package/dist/clis/args/service-CHjY5epu.d.mts.map +1 -0
  89. package/dist/clis/args/{service-CHOOr0Gg.mjs → service-Cpjlyeu5.mjs} +2 -2
  90. package/dist/clis/args/{service-CHOOr0Gg.mjs.map → service-Cpjlyeu5.mjs.map} +1 -1
  91. package/dist/clis/args/service.d.mts +3 -2
  92. package/dist/clis/args/service.mjs +1 -1
  93. package/dist/clis/args/{switchboard-Dsp7nosi.mjs → switchboard-CCaAtU56.mjs} +2 -2
  94. package/dist/clis/args/{switchboard-Dsp7nosi.mjs.map → switchboard-CCaAtU56.mjs.map} +1 -1
  95. package/dist/clis/args/switchboard-RrNb1fUH.d.mts +70 -0
  96. package/dist/clis/args/switchboard-RrNb1fUH.d.mts.map +1 -0
  97. package/dist/clis/args/switchboard.d.mts +3 -2
  98. package/dist/clis/args/switchboard.mjs +1 -1
  99. package/dist/clis/args/{uninstall-CTwTX0u_.mjs → uninstall-3U0B8g5c.mjs} +2 -2
  100. package/dist/clis/args/{uninstall-CTwTX0u_.mjs.map → uninstall-3U0B8g5c.mjs.map} +1 -1
  101. package/dist/clis/args/uninstall-CDx7lwxn.d.mts +28 -0
  102. package/dist/clis/args/uninstall-CDx7lwxn.d.mts.map +1 -0
  103. package/dist/clis/args/uninstall.d.mts +3 -2
  104. package/dist/clis/args/uninstall.mjs +1 -1
  105. package/dist/clis/args/unpublish-CEDsk6uv.d.mts +22 -0
  106. package/dist/clis/args/unpublish-CEDsk6uv.d.mts.map +1 -0
  107. package/dist/clis/args/{unpublish-BPMkGEg5.mjs → unpublish-s9zUh6Gw.mjs} +2 -2
  108. package/dist/clis/args/{unpublish-BPMkGEg5.mjs.map → unpublish-s9zUh6Gw.mjs.map} +1 -1
  109. package/dist/clis/args/unpublish.d.mts +3 -2
  110. package/dist/clis/args/unpublish.mjs +1 -1
  111. package/dist/clis/args/{vetra-b4KUu1Ax.mjs → vetra-BUNlAAPp.mjs} +2 -2
  112. package/dist/clis/args/{vetra-b4KUu1Ax.mjs.map → vetra-BUNlAAPp.mjs.map} +1 -1
  113. package/dist/clis/args/vetra-DkDaWFPi.d.mts +111 -0
  114. package/dist/clis/args/vetra-DkDaWFPi.d.mts.map +1 -0
  115. package/dist/clis/args/vetra-ports.test.d.mts +2 -1
  116. package/dist/clis/args/vetra-ports.test.mjs +7366 -5728
  117. package/dist/clis/args/vetra-ports.test.mjs.map +1 -1
  118. package/dist/clis/args/vetra.d.mts +3 -2
  119. package/dist/clis/args/vetra.mjs +1 -1
  120. package/dist/clis/build-config-HbYUSZS1.mjs +252 -0
  121. package/dist/clis/build-config-HbYUSZS1.mjs.map +1 -0
  122. package/dist/clis/build-config.d.mts +52 -10616
  123. package/dist/clis/build-config.d.mts.map +1 -1
  124. package/dist/clis/build-config.mjs +2 -88
  125. package/dist/clis/build-pieces.d.mts +160 -0
  126. package/dist/clis/build-pieces.d.mts.map +1 -0
  127. package/dist/clis/build-pieces.mjs +549 -0
  128. package/dist/clis/build-pieces.mjs.map +1 -0
  129. package/dist/clis/command-names.d.mts +2 -2
  130. package/dist/clis/command-names.d.mts.map +1 -1
  131. package/dist/clis/command-names.mjs.map +1 -1
  132. package/dist/clis/constants.d.mts +3 -462
  133. package/dist/clis/constants.mjs +27 -11
  134. package/dist/clis/constants.mjs.map +1 -1
  135. package/dist/clis/index-6CZwrmQi.d.mts +11154 -0
  136. package/dist/clis/index-6CZwrmQi.d.mts.map +1 -0
  137. package/dist/clis/index.d.mts +1393 -1225
  138. package/dist/clis/index.d.mts.map +1 -1
  139. package/dist/clis/index.mjs +265 -75
  140. package/dist/clis/index.mjs.map +1 -1
  141. package/dist/clis/project-env.d.mts +4 -4
  142. package/dist/clis/project-env.d.mts.map +1 -1
  143. package/dist/clis/project-env.mjs.map +1 -1
  144. package/dist/clis/project-ports.d.mts +5 -5
  145. package/dist/clis/project-ports.d.mts.map +1 -1
  146. package/dist/clis/project-ports.mjs +1 -1
  147. package/dist/clis/project-ports.mjs.map +1 -1
  148. package/dist/clis/services/telemetry.d.mts +7 -7
  149. package/dist/clis/services/telemetry.d.mts.map +1 -1
  150. package/dist/clis/services/telemetry.mjs.map +1 -1
  151. package/dist/clis/types-DB_YPc3t.d.mts +543 -0
  152. package/dist/clis/types-DB_YPc3t.d.mts.map +1 -0
  153. package/dist/clis/utils.d.mts +4 -4
  154. package/dist/clis/utils.d.mts.map +1 -1
  155. package/dist/clis/utils.mjs.map +1 -1
  156. package/dist/{config-loader-B845Hidf.js → config-loader-DpeoExZO.js} +35 -9
  157. package/dist/config-loader-DpeoExZO.js.map +1 -0
  158. package/dist/connect/config-loader.d.ts +15 -8
  159. package/dist/connect/config-loader.d.ts.map +1 -1
  160. package/dist/connect/config-loader.js +2 -2
  161. package/dist/connect/index.d.ts +203 -57
  162. package/dist/connect/index.d.ts.map +1 -1
  163. package/dist/connect/index.js +318 -31
  164. package/dist/connect/index.js.map +1 -1
  165. package/dist/connect/json-adapter.d.ts +3 -4
  166. package/dist/connect/json-adapter.d.ts.map +1 -1
  167. package/dist/connect/json-adapter.js.map +1 -1
  168. package/dist/constants-C6ket9Bn.d.ts +9 -0
  169. package/dist/constants-C6ket9Bn.d.ts.map +1 -0
  170. package/dist/constants.d.ts +3 -2
  171. package/dist/constants.js +11 -5
  172. package/dist/constants.js.map +1 -1
  173. package/dist/document-drive/index.d.ts +131 -105
  174. package/dist/document-drive/index.d.ts.map +1 -1
  175. package/dist/document-drive/index.js +116 -54
  176. package/dist/document-drive/index.js.map +1 -1
  177. package/dist/document-model/errors.d.ts +3 -0
  178. package/dist/document-model/errors.js +152 -0
  179. package/dist/document-model/errors.js.map +1 -0
  180. package/dist/document-model/index.d.ts +5 -4
  181. package/dist/document-model/index.js +296 -390
  182. package/dist/document-model/index.js.map +1 -1
  183. package/dist/document-model/mock.d.ts +2 -3
  184. package/dist/document-model/mock.d.ts.map +1 -1
  185. package/dist/document-model/mock.js +2 -1
  186. package/dist/document-model/mock.js.map +1 -1
  187. package/dist/document-model/utils.d.ts +3 -2
  188. package/dist/document-model/utils.js +1 -1
  189. package/dist/document-model/version.d.ts +3 -0
  190. package/dist/document-model/version.js +8 -0
  191. package/dist/document-model/version.js.map +1 -0
  192. package/dist/index-C3fD6cad.d.ts +36 -0
  193. package/dist/index-C3fD6cad.d.ts.map +1 -0
  194. package/dist/index.d.ts +7 -6
  195. package/dist/index.js.map +1 -1
  196. package/dist/processors/index.d.ts +3 -2
  197. package/dist/processors/index.js +63 -4
  198. package/dist/processors/index.js.map +1 -1
  199. package/dist/purge-v06m_oGz.js +381 -0
  200. package/dist/purge-v06m_oGz.js.map +1 -0
  201. package/dist/registry/index.d.ts +15 -15
  202. package/dist/registry/index.d.ts.map +1 -1
  203. package/dist/registry/index.js +24 -6
  204. package/dist/registry/index.js.map +1 -1
  205. package/dist/registry/manifest-slim.d.ts +4 -3
  206. package/dist/registry/manifest-slim.d.ts.map +1 -1
  207. package/dist/registry/manifest-slim.js +21 -0
  208. package/dist/registry/manifest-slim.js.map +1 -1
  209. package/dist/registry/updates.d.ts +3 -3
  210. package/dist/registry/updates.d.ts.map +1 -1
  211. package/dist/registry/updates.js.map +1 -1
  212. package/dist/registry/urls.d.ts +2 -2
  213. package/dist/registry/urls.d.ts.map +1 -1
  214. package/dist/registry/urls.js.map +1 -1
  215. package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
  216. package/dist/types-Bsp8VL2y.d.ts.map +1 -0
  217. package/dist/{types-YqLqb0Zb.d.ts → types-CywupGpk.d.ts} +39 -43
  218. package/dist/types-CywupGpk.d.ts.map +1 -0
  219. package/dist/{types-CpnWmiFY.d.ts → types-DDH6v2BE.d.ts} +2010 -821
  220. package/dist/types-DDH6v2BE.d.ts.map +1 -0
  221. package/dist/{utils-DP122OSS.d.ts → utils-BrKxCmKx.d.ts} +2 -2
  222. package/dist/utils-BrKxCmKx.d.ts.map +1 -0
  223. package/dist/{utils-aaTmfxFW.js → utils-CSF716ux.js} +10 -3
  224. package/dist/utils-CSF716ux.js.map +1 -0
  225. package/dist/version-BxLITo9P.d.ts +6 -0
  226. package/dist/version-BxLITo9P.d.ts.map +1 -0
  227. package/package.json +11 -6
  228. package/dist/clis/args/access-token--9H57y8J.d.mts +0 -18
  229. package/dist/clis/args/access-token--9H57y8J.d.mts.map +0 -1
  230. package/dist/clis/args/common-CcYbXrBx.mjs.map +0 -1
  231. package/dist/clis/args/common-Y8yh4ax1.d.mts +0 -183
  232. package/dist/clis/args/common-Y8yh4ax1.d.mts.map +0 -1
  233. package/dist/clis/args/connect-BUwHSfdh.d.mts +0 -443
  234. package/dist/clis/args/connect-BUwHSfdh.d.mts.map +0 -1
  235. package/dist/clis/args/connect-BVVvCmL9.mjs.map +0 -1
  236. package/dist/clis/args/generate-CA916Fvj.mjs.map +0 -1
  237. package/dist/clis/args/generate-DnV-bfXt.d.mts +0 -87
  238. package/dist/clis/args/generate-DnV-bfXt.d.mts.map +0 -1
  239. package/dist/clis/args/help-CjAsudUn.d.mts +0 -193
  240. package/dist/clis/args/help-CjAsudUn.d.mts.map +0 -1
  241. package/dist/clis/args/init-CUXyfquF.d.mts +0 -55
  242. package/dist/clis/args/init-CUXyfquF.d.mts.map +0 -1
  243. package/dist/clis/args/inspect-DtZeoA5c.d.mts +0 -15
  244. package/dist/clis/args/inspect-DtZeoA5c.d.mts.map +0 -1
  245. package/dist/clis/args/install-CkP8zcHb.d.mts +0 -40
  246. package/dist/clis/args/install-CkP8zcHb.d.mts.map +0 -1
  247. package/dist/clis/args/list-BGf8s_gj.d.mts +0 -12
  248. package/dist/clis/args/list-BGf8s_gj.d.mts.map +0 -1
  249. package/dist/clis/args/login-DNsHwvqk.d.mts +0 -27
  250. package/dist/clis/args/login-DNsHwvqk.d.mts.map +0 -1
  251. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs +0 -1013
  252. package/dist/clis/args/magic-string.es-h_0HDQBQ.mjs.map +0 -1
  253. package/dist/clis/args/migrate-sixkWhxm.d.mts +0 -21
  254. package/dist/clis/args/migrate-sixkWhxm.d.mts.map +0 -1
  255. package/dist/clis/args/publish-Dqe5DUst.d.mts +0 -18
  256. package/dist/clis/args/publish-Dqe5DUst.d.mts.map +0 -1
  257. package/dist/clis/args/registry-C_RfTsKB.d.mts +0 -19
  258. package/dist/clis/args/registry-C_RfTsKB.d.mts.map +0 -1
  259. package/dist/clis/args/service-DhIkf8-O.d.mts +0 -22
  260. package/dist/clis/args/service-DhIkf8-O.d.mts.map +0 -1
  261. package/dist/clis/args/switchboard-BlPaq2at.d.mts +0 -72
  262. package/dist/clis/args/switchboard-BlPaq2at.d.mts.map +0 -1
  263. package/dist/clis/args/uninstall-BpA3YYbw.d.mts +0 -31
  264. package/dist/clis/args/uninstall-BpA3YYbw.d.mts.map +0 -1
  265. package/dist/clis/args/unpublish-CvwaIimG.d.mts +0 -24
  266. package/dist/clis/args/unpublish-CvwaIimG.d.mts.map +0 -1
  267. package/dist/clis/args/vetra-DUhIB7Zk.d.mts +0 -113
  268. package/dist/clis/args/vetra-DUhIB7Zk.d.mts.map +0 -1
  269. package/dist/clis/build-config.mjs.map +0 -1
  270. package/dist/clis/constants.d.mts.map +0 -1
  271. package/dist/config-loader-B845Hidf.js.map +0 -1
  272. package/dist/constants-BP_gjn8g.d.ts +0 -8
  273. package/dist/constants-BP_gjn8g.d.ts.map +0 -1
  274. package/dist/index-C_iVZe7f.d.ts +0 -7
  275. package/dist/index-C_iVZe7f.d.ts.map +0 -1
  276. package/dist/index-DyYIJtVy.d.ts +0 -836
  277. package/dist/index-DyYIJtVy.d.ts.map +0 -1
  278. package/dist/types-C1in4fl3.d.ts.map +0 -1
  279. package/dist/types-CpnWmiFY.d.ts.map +0 -1
  280. package/dist/types-YqLqb0Zb.d.ts.map +0 -1
  281. package/dist/utils-DP122OSS.d.ts.map +0 -1
  282. package/dist/utils-aaTmfxFW.js.map +0 -1
@@ -3,20 +3,20 @@ import { array, boolean, command, flag, multioption, number, oneOf, option, opti
3
3
  import { AGENTS as AGENTS$1 } from "package-manager-detector/constants";
4
4
  import { homedir } from "node:os";
5
5
  import path, { join } from "node:path";
6
- import { existsSync, mkdirSync, readFileSync, statSync, writeFileSync } from "node:fs";
6
+ import { existsSync, mkdirSync, readFileSync, readdirSync, statSync, writeFileSync } from "node:fs";
7
7
  import dotenv from "dotenv";
8
8
  import chalk from "chalk";
9
9
  import fsPromises, { mkdir, stat, writeFile } from "node:fs/promises";
10
10
  import { fileURLToPath } from "node:url";
11
11
  import { promisify } from "node:util";
12
12
  import { execFile } from "node:child_process";
13
- import { clean, valid } from "semver";
13
+ import { clean, compare, valid } from "semver";
14
14
  import spawn from "cross-spawn";
15
15
  import { isTruthy } from "remeda";
16
16
  import npa from "npm-package-arg";
17
17
  import { packageDirectory } from "package-directory";
18
18
  import { execSync } from "child_process";
19
- import { dirname } from "path";
19
+ import { dirname, resolve } from "path";
20
20
  import { writePackage } from "write-package";
21
21
  import lt from "semver/functions/lt.js";
22
22
  //#region \0rolldown/runtime.js
@@ -26,7 +26,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
26
26
  var __getOwnPropNames = Object.getOwnPropertyNames;
27
27
  var __getProtoOf = Object.getPrototypeOf;
28
28
  var __hasOwnProp = Object.prototype.hasOwnProperty;
29
- var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
29
+ var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
30
30
  var __copyProps = (to, from, except, desc) => {
31
31
  if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
32
32
  key = keys[i];
@@ -37,11 +37,11 @@ var __copyProps = (to, from, except, desc) => {
37
37
  }
38
38
  return to;
39
39
  };
40
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
40
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule || !__hasOwnProp.call(mod, "default") ? __defProp(target, "default", {
41
41
  value: mod,
42
42
  enumerable: true
43
43
  }) : target, mod));
44
- var __require = /* @__PURE__ */ createRequire(import.meta.url);
44
+ var __require = /* #__PURE__ */ (() => createRequire(import.meta.url))();
45
45
  //#endregion
46
46
  //#region clis/constants.ts
47
47
  const SERVICE_ACTIONS = [
@@ -51,7 +51,7 @@ const SERVICE_ACTIONS = [
51
51
  "setup",
52
52
  "restart"
53
53
  ];
54
- const SECONDS_IN_DAY = 1440 * 60;
54
+ const SECONDS_IN_DAY = 86400;
55
55
  const DEFAULT_EXPIRY_DAYS = 7;
56
56
  const DEFAULT_EXPIRY_SECONDS = 7 * SECONDS_IN_DAY;
57
57
  const DRIVES_PRESERVE_STRATEGIES = ["preserve-all", "preserve-by-url-and-detach"];
@@ -87,6 +87,7 @@ const REACTOR_API_PACKAGE = "@powerhousedao/reactor-api";
87
87
  const ANALYTICS_ENGINE_CORE_PACKAGE = "@powerhousedao/analytics-engine-core";
88
88
  const GRAPHQL_PACKAGE = "graphql";
89
89
  const GRAPHQL_TAG_PACKAGE = "graphql-tag";
90
+ const PIECES_FRAMEWORK_PACKAGE = "@powerhousedao/pieces-framework";
90
91
  const PEER_EXTERNAL_DEPENDENCIES = {
91
92
  [GRAPHQL_PACKAGE]: {
92
93
  peer: "^16",
@@ -109,10 +110,18 @@ const PEER_EXTERNAL_DEPENDENCIES = {
109
110
  dev: "4.3.6"
110
111
  }
111
112
  };
112
- const FEATURE_DEPENDENCIES = { analyticsProcessor: {
113
- peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],
114
- peerExternal: {}
115
- } };
113
+ const FEATURE_DEPENDENCIES = {
114
+ analyticsProcessor: {
115
+ peerVersioned: [ANALYTICS_ENGINE_CORE_PACKAGE],
116
+ peerExternal: {},
117
+ devVersioned: []
118
+ },
119
+ piece: {
120
+ peerVersioned: [],
121
+ peerExternal: {},
122
+ devVersioned: [PIECES_FRAMEWORK_PACKAGE]
123
+ }
124
+ };
116
125
  const VERSIONED_DEPENDENCIES = [...VERSIONED_PEER_DEPENDENCIES, ...FEATURE_DEPENDENCIES.analyticsProcessor.peerVersioned];
117
126
  const BOILERPLATE_ALLOWED_BUILDS = [
118
127
  "@apollo/protobufjs",
@@ -169,7 +178,6 @@ const packageJsonExports = {
169
178
  },
170
179
  "./subgraphs": {
171
180
  types: "./dist/types/subgraphs/index.d.ts",
172
- browser: "./dist/browser/subgraphs/index.js",
173
181
  node: "./dist/node/subgraphs/index.mjs"
174
182
  },
175
183
  "./processors": {
@@ -177,6 +185,14 @@ const packageJsonExports = {
177
185
  browser: "./dist/browser/processors/index.js",
178
186
  node: "./dist/node/processors/index.mjs"
179
187
  },
188
+ "./pieces": {
189
+ types: "./dist/types/pieces/index.d.ts",
190
+ node: "./dist/node/pieces/index.mjs"
191
+ },
192
+ "./pieces/*": {
193
+ types: "./dist/types/pieces/*/index.d.ts",
194
+ node: "./dist/node/pieces/*/index.mjs"
195
+ },
180
196
  "./manifest": "./dist/powerhouse.manifest.json",
181
197
  "./style.css": "./dist/style.css"
182
198
  };
@@ -242,15 +258,15 @@ const externalDevDependencies = {
242
258
  "@types/react": "^19.2.3",
243
259
  "@types/react-dom": "^19.2.3",
244
260
  "@vitejs/plugin-react": "^6.0.1",
245
- "@vitest/coverage-v8": "4.1.1",
246
- oxfmt: "0.55.0",
261
+ "@vitest/coverage-v8": "5.0.3",
262
+ oxfmt: "0.68.0",
247
263
  oxlint: "1.70.0",
248
264
  "oxlint-tsgolint": "0.23.0",
249
265
  tailwindcss: "^4.1.16",
250
- typescript: "^5.9.3",
266
+ typescript: "~7.0.2",
251
267
  vite: "^8.0.10",
252
268
  "vite-tsconfig-paths": "6.1.1",
253
- vitest: "4.1.1"
269
+ vitest: "5.0.3"
254
270
  };
255
271
  const defaultManifest = {
256
272
  name: "",
@@ -309,6 +325,20 @@ const buildArgs = {
309
325
  defaultValue: () => "dist",
310
326
  defaultValueIsSerializable: true
311
327
  }),
328
+ noSharedDeps: flag({
329
+ type: boolean,
330
+ long: "no-shared-deps",
331
+ description: "Bundle the shared dependency set instead of externalizing it (default: externalize)",
332
+ defaultValue: () => false,
333
+ defaultValueIsSerializable: true
334
+ }),
335
+ ignoreTypeErrors: flag({
336
+ type: boolean,
337
+ long: "ignore-type-errors",
338
+ description: "Unsafe: build even when tsc reports type errors, without asking. The package can load and still fail at runtime",
339
+ defaultValue: () => false,
340
+ defaultValueIsSerializable: true
341
+ }),
312
342
  ...debugArgs
313
343
  };
314
344
  const packageManagerArgs = {
@@ -414,7 +444,7 @@ const vetraSwitchboardArgs = {
414
444
  const defaultDrivesUrl = option({
415
445
  type: optional(string),
416
446
  long: "default-drives-url",
417
- description: "The default drives url to use in connect",
447
+ description: "Comma-separated drive URLs to use as Connect's default drives.",
418
448
  defaultValue: () => ""
419
449
  });
420
450
  const logLevel = option({
@@ -551,7 +581,7 @@ const connectRuntimeOverrideArgs = {
551
581
  json: option({
552
582
  type: optional(string),
553
583
  long: "json",
554
- description: "Inline JSON override for the runtime connect.* block, e.g. '{\"renown\":{\"url\":\"...\"}}'. Validated against the runtime schema; deep-merged on top of env seeds and source powerhouse.config.json. Individual --flag values beat --json on collision."
584
+ description: "Inline JSON override for the runtime connect.* block, without the \"connect\" wrapper, e.g. '{\"app\":{\"workflowsEnabled\":true},\"renown\":{\"url\":\"...\"}}'. A top-level packageRegistryUrl is also accepted. Validated against the runtime schema (unknown keys fail); deep-merged on top of source powerhouse.config.json. Individual --flag values beat --json on collision."
555
585
  }),
556
586
  renownUrl: option({
557
587
  type: optional(string),
@@ -580,6 +610,11 @@ const connectRuntimeOverrideArgs = {
580
610
  long: "external-packages",
581
611
  description: "Override connect.packages.externalEnabled."
582
612
  }),
613
+ workflows: option({
614
+ type: optional(cliBoolean),
615
+ long: "workflows",
616
+ description: "Override connect.app.workflowsEnabled (load the @powerhousedao/workflow package: workflow + connection documents, their editors and Workflow Studio)."
617
+ }),
583
618
  remoteDrivesEnabled: option({
584
619
  type: optional(cliBoolean),
585
620
  long: "remote-drives-enabled",
@@ -801,6 +836,44 @@ const generateArgs = {
801
836
  long: "subgraph",
802
837
  description: "Subgraph name."
803
838
  }),
839
+ pieceName: option({
840
+ type: optional(string),
841
+ long: "piece",
842
+ description: "Piece name."
843
+ }),
844
+ pieceId: option({
845
+ type: optional(string),
846
+ long: "piece-id",
847
+ description: "Piece id, the pieceName a workflow step holds, e.g. @acme/piece-crm. Defaults to one derived from the package name."
848
+ }),
849
+ pieceAuth: option({
850
+ type: oneOf([
851
+ "none",
852
+ "secret",
853
+ "custom"
854
+ ]),
855
+ long: "piece-auth",
856
+ description: "The kind of connection the generated piece asks for. Default is custom.",
857
+ defaultValue: () => "custom",
858
+ defaultValueIsSerializable: true
859
+ }),
860
+ pieceActionName: option({
861
+ type: optional(string),
862
+ long: "piece-action",
863
+ description: "Name of an action to generate inside a piece."
864
+ }),
865
+ pieceTriggerName: option({
866
+ type: optional(string),
867
+ long: "piece-trigger",
868
+ description: "Name of a trigger to generate inside a piece."
869
+ }),
870
+ pieceTriggerStrategy: option({
871
+ type: oneOf(["polling", "webhook"]),
872
+ long: "piece-trigger-strategy",
873
+ description: "How a generated trigger fires. Default is polling.",
874
+ defaultValue: () => "polling",
875
+ defaultValueIsSerializable: true
876
+ }),
804
877
  importScriptName: option({
805
878
  type: optional(string),
806
879
  long: "import-script",
@@ -1436,7 +1509,9 @@ const unpublishArgs = {
1436
1509
  //#endregion
1437
1510
  //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
1438
1511
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1439
- let p = process || {}, argv = p.argv || [], env = p.env || {};
1512
+ let p = process || {};
1513
+ let argv = p.argv || [];
1514
+ let env = p.env || {};
1440
1515
  let isColorSupported = !(!!env.NO_COLOR || argv.includes("--no-color")) && (!!env.FORCE_COLOR || argv.includes("--color") || p.platform === "win32" || (p.stdout || {}).isTTY && env.TERM !== "dumb" || !!env.CI);
1441
1516
  let formatter = (open, close, replace = open) => (input) => {
1442
1517
  let string = "" + input, index = string.indexOf(close, open.length);
@@ -2698,7 +2773,7 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
2698
2773
  function getDefs(enabled) {
2699
2774
  return enabled ? defsOn : defsOff;
2700
2775
  }
2701
- const sometimesKeywords = new Set([
2776
+ const sometimesKeywords = /* @__PURE__ */ new Set([
2702
2777
  "as",
2703
2778
  "async",
2704
2779
  "from",
@@ -2765,9 +2840,10 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
2765
2840
  else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
2766
2841
  else markerLines[lineNumber] = [0, source[lineNumber - i].length];
2767
2842
  }
2768
- else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0];
2769
- else markerLines[startLine] = true;
2770
- else markerLines[startLine] = [startColumn, endColumn - startColumn];
2843
+ else if (startColumn === endColumn) {
2844
+ if (startColumn) markerLines[startLine] = [startColumn, 0];
2845
+ else markerLines[startLine] = true;
2846
+ } else markerLines[startLine] = [startColumn, endColumn - startColumn];
2771
2847
  return {
2772
2848
  start,
2773
2849
  end,
@@ -4231,9 +4307,14 @@ var require_validate_npm_package_license = /* @__PURE__ */ __commonJSMin(((expor
4231
4307
  var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4232
4308
  Object.defineProperty(exports, "__esModule", { value: !0 });
4233
4309
  exports.LRUCache = void 0;
4234
- var G = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date, U = /* @__PURE__ */ new Set(), R = typeof process == "object" && process ? process : {}, I = (c, t, e, i) => {
4310
+ var G = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
4311
+ var U = /* @__PURE__ */ new Set();
4312
+ var R = typeof process == "object" && process ? process : {};
4313
+ var I = (c, t, e, i) => {
4235
4314
  typeof R.emitWarning == "function" ? R.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
4236
- }, C = globalThis.AbortController, L = globalThis.AbortSignal;
4315
+ };
4316
+ var C = globalThis.AbortController;
4317
+ var L = globalThis.AbortSignal;
4237
4318
  if (typeof C > "u") {
4238
4319
  L = class {
4239
4320
  onabort;
@@ -4260,11 +4341,15 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4260
4341
  c && (c = !1, I("AbortController is not defined. If using lru-cache in node 14, load an AbortController polyfill from the `node-abort-controller` package. A minimal polyfill is provided for use by LRUCache.fetch(), but it should not be relied upon in other contexts (eg, passing it to other APIs that use AbortController/AbortSignal might have undesirable effects). You may disable this with LRU_CACHE_IGNORE_AC_WARNING=1 in the env.", "NO_ABORT_CONTROLLER", "ENOTSUP", t));
4261
4342
  };
4262
4343
  }
4263
- var x = (c) => !U.has(c), y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c), M = (c) => y(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? z : null : null, z = class extends Array {
4344
+ var x = (c) => !U.has(c);
4345
+ var y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c);
4346
+ var M = (c) => y(c) ? c <= Math.pow(2, 8) ? Uint8Array : c <= Math.pow(2, 16) ? Uint16Array : c <= Math.pow(2, 32) ? Uint32Array : c <= Number.MAX_SAFE_INTEGER ? z : null : null;
4347
+ var z = class extends Array {
4264
4348
  constructor(t) {
4265
4349
  super(t), this.fill(0);
4266
4350
  }
4267
- }, W = class c {
4351
+ };
4352
+ var W = class c {
4268
4353
  heap;
4269
4354
  length;
4270
4355
  static #o = !1;
@@ -4413,7 +4498,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4413
4498
  }
4414
4499
  }
4415
4500
  getRemainingTTL(t) {
4416
- return this.#s.has(t) ? Infinity : 0;
4501
+ return this.#s.has(t) ? 1 / 0 : 0;
4417
4502
  }
4418
4503
  #j() {
4419
4504
  let t = new z(this.#o), e = new z(this.#o);
@@ -4453,7 +4538,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4453
4538
  let r = this.#s.get(h);
4454
4539
  if (r === void 0) return 0;
4455
4540
  let a = t[r], w = e[r];
4456
- if (!a || !w) return Infinity;
4541
+ if (!a || !w) return 1 / 0;
4457
4542
  return a - ((n || o()) - w);
4458
4543
  }, this.#p = (h) => {
4459
4544
  let r = e[h], a = t[h];
@@ -5020,8 +5105,10 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5020
5105
  if (Object.prototype.hasOwnProperty.call(protocols, proto)) return arg;
5021
5106
  if (arg.substr(firstColon, 3) === "://") return arg;
5022
5107
  const firstAt = arg.indexOf("@");
5023
- if (firstAt > -1) if (firstAt > firstColon) return `git+ssh://${arg}`;
5024
- else return arg;
5108
+ if (firstAt > -1) {
5109
+ if (firstAt > firstColon) return `git+ssh://${arg}`;
5110
+ else return arg;
5111
+ }
5025
5112
  return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}`;
5026
5113
  };
5027
5114
  const correctUrl = (giturl) => {
@@ -5058,7 +5145,8 @@ var require_from_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5058
5145
  };
5059
5146
  module.exports = (giturl, opts, { gitHosts, protocols }) => {
5060
5147
  if (!giturl) return;
5061
- const parsed = parseUrl(isGitHubShorthand(giturl) ? `github:${giturl}` : giturl, protocols);
5148
+ const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl;
5149
+ const parsed = parseUrl(correctedUrl, protocols);
5062
5150
  if (!parsed) return;
5063
5151
  const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
5064
5152
  const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname];
@@ -5521,17 +5609,22 @@ var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5521
5609
  var hosted = hostedGitInfo.fromUrl(data.repository.url);
5522
5610
  if (hosted && hosted.bugs()) data.bugs = { url: hosted.bugs() };
5523
5611
  } else if (data.bugs) {
5524
- if (typeof data.bugs === "string") if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
5525
- else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
5526
- else this.warn("nonEmailUrlBugsString");
5527
- else {
5612
+ if (typeof data.bugs === "string") {
5613
+ if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
5614
+ else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
5615
+ else this.warn("nonEmailUrlBugsString");
5616
+ } else {
5528
5617
  bugsTypos(data.bugs, this.warn);
5529
5618
  var oldBugs = data.bugs;
5530
5619
  data.bugs = {};
5531
- if (oldBugs.url) if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
5532
- else this.warn("nonUrlBugsUrlField");
5533
- if (oldBugs.email) if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
5534
- else this.warn("nonEmailBugsEmailField");
5620
+ if (oldBugs.url) {
5621
+ if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
5622
+ else this.warn("nonUrlBugsUrlField");
5623
+ }
5624
+ if (oldBugs.email) {
5625
+ if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
5626
+ else this.warn("nonEmailBugsEmailField");
5627
+ }
5535
5628
  }
5536
5629
  if (!data.bugs.email && !data.bugs.url) {
5537
5630
  delete data.bugs;
@@ -5763,7 +5856,8 @@ const _readPackage = (file, normalize) => {
5763
5856
  return json;
5764
5857
  };
5765
5858
  async function readPackage({ cwd, normalize = true } = {}) {
5766
- return _readPackage(await fsPromises.readFile(getPackagePath(cwd), "utf8"), normalize);
5859
+ const packageFile = await fsPromises.readFile(getPackagePath(cwd), "utf8");
5860
+ return _readPackage(packageFile, normalize);
5767
5861
  }
5768
5862
  //#endregion
5769
5863
  //#region clis/file-system/spawn-async.ts
@@ -5796,10 +5890,14 @@ function spawnAsync(command, args, options = {}) {
5796
5890
  //#endregion
5797
5891
  //#region clis/file-system/dependencies.ts
5798
5892
  async function fetchNpmVersionFromRegistryForTag(packageName, tag) {
5799
- const cleanedVersion = clean(await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`));
5893
+ const version = await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`);
5894
+ const cleanedVersion = clean(version);
5800
5895
  if (!cleanedVersion) throw new Error(`Failed to fetch version for package "${packageName}" at tag "${tag}".`);
5801
5896
  return cleanedVersion;
5802
5897
  }
5898
+ function lowestVersion(versions) {
5899
+ return [...versions].sort(compare)[0];
5900
+ }
5803
5901
  async function fetchPackageVersionFromNpmRegistry(packageSpecifier, registryUrl) {
5804
5902
  const failedFetchErrorMessage = `Failed to fetch version from npm registry for ${packageSpecifier}.`;
5805
5903
  try {
@@ -6046,7 +6144,7 @@ PH CLI package manager: ${packageManager}
6046
6144
  //#endregion
6047
6145
  //#region clis/file-system/write-file-ensuring-dir.ts
6048
6146
  async function writeFileEnsuringDir(filePath, contents) {
6049
- await mkdir(dirname(filePath), { recursive: true });
6147
+ await mkdir(dirname(resolve(filePath)), { recursive: true });
6050
6148
  await writeFile(filePath, contents, { encoding: "utf-8" });
6051
6149
  }
6052
6150
  //#endregion
@@ -6274,12 +6372,23 @@ const PACKAGES_DEPENDENCIES = [
6274
6372
  "@powerhousedao/design-system",
6275
6373
  "document-drive",
6276
6374
  "document-model",
6375
+ "@powerhousedao/opentelemetry-instrumentation-reactor",
6376
+ "@powerhousedao/pieces-framework",
6277
6377
  "@powerhousedao/reactor",
6278
6378
  "@powerhousedao/reactor-api",
6379
+ "@powerhousedao/reactor-attachments",
6279
6380
  "@powerhousedao/reactor-browser",
6381
+ "@powerhousedao/reactor-drive",
6382
+ "@powerhousedao/reactor-group",
6383
+ "@powerhousedao/reactor-hypercore",
6280
6384
  "@powerhousedao/reactor-mcp",
6385
+ "@powerhousedao/reactor-privacy",
6386
+ "@powerhousedao/reactor-router",
6387
+ "@powerhousedao/reactor-workflow",
6388
+ "@powerhousedao/registry",
6281
6389
  "@powerhousedao/switchboard-gui",
6282
6390
  "@powerhousedao/vetra",
6391
+ "@powerhousedao/workflow",
6283
6392
  "@powerhousedao/analytics-engine-core",
6284
6393
  "@powerhousedao/analytics-engine-knex",
6285
6394
  "@powerhousedao/analytics-engine-pg",
@@ -6287,11 +6396,6 @@ const PACKAGES_DEPENDENCIES = [
6287
6396
  "@powerhousedao/analytics-engine-graphql",
6288
6397
  "@powerhousedao/shared",
6289
6398
  "@powerhousedao/powerhouse-vetra-packages",
6290
- "@powerhousedao/analytics-engine-core",
6291
- "@powerhousedao/analytics-engine-graphql",
6292
- "@powerhousedao/analytics-engine-knex",
6293
- "@powerhousedao/analytics-engine-pg",
6294
- "@powerhousedao/analytics-engine-browser",
6295
6399
  "@renown/sdk"
6296
6400
  ];
6297
6401
  const CLIS_DEPENDENCIES = ["ph-cmd", "@powerhousedao/ph-cli"];
@@ -6357,7 +6461,35 @@ async function runUseLocal(monorepoPath, skipInstall) {
6357
6461
  runCmd(`pnpm install`);
6358
6462
  }
6359
6463
  }
6464
+ const WORKSPACE_DIRS = [
6465
+ "packages",
6466
+ "packages/analytics-engine",
6467
+ "clis",
6468
+ "apps"
6469
+ ];
6470
+ const workspaces = /* @__PURE__ */ new Map();
6471
+ function workspacePackages(monorepoPath) {
6472
+ let dirs = workspaces.get(monorepoPath);
6473
+ if (dirs) return dirs;
6474
+ dirs = /* @__PURE__ */ new Map();
6475
+ for (const parent of WORKSPACE_DIRS) {
6476
+ const root = path.join(monorepoPath, parent);
6477
+ if (!existsSync(root)) continue;
6478
+ for (const entry of readdirSync(root, { withFileTypes: true })) {
6479
+ const manifest = path.join(root, entry.name, "package.json");
6480
+ if (!entry.isDirectory() || !existsSync(manifest)) continue;
6481
+ try {
6482
+ const { name } = JSON.parse(readFileSync(manifest, "utf8"));
6483
+ if (name) dirs.set(name, path.join(root, entry.name));
6484
+ } catch {}
6485
+ }
6486
+ }
6487
+ workspaces.set(monorepoPath, dirs);
6488
+ return dirs;
6489
+ }
6360
6490
  function buildPnpmLink(packageName, monorepoPath) {
6491
+ const dir = workspacePackages(monorepoPath).get(packageName);
6492
+ if (dir) return `link:${dir}`;
6361
6493
  const isCli = CLIS_DEPENDENCIES.includes(packageName);
6362
6494
  const isApp = APPS_DEPENDENCIES.includes(packageName);
6363
6495
  const packageDir = isCli ? "clis" : isApp ? "apps" : "packages";
@@ -6496,6 +6628,10 @@ const phConnectRuntimeConfigSchema = {
6496
6628
  type: "boolean",
6497
6629
  description: "Studio mode. Enables builder-only capabilities: Connect loads the vetra package and exposes DocumentModel (and vetra spec types) as creatable documents. Forced on by `ph vetra` / `ph connect studio`; false by default.",
6498
6630
  default: false
6631
+ },
6632
+ workflowsEnabled: {
6633
+ type: "boolean",
6634
+ description: "Powerhouse workflows in Connect. When true the tab loads the @powerhousedao/workflow package (workflow + connection documents, their editors and Workflow Studio) and the reactor worker registers its document models. Falls back to the top-level `workflows.enabled`; set it to override that for Connect. Independent of studioMode. False when neither is set."
6499
6635
  }
6500
6636
  }
6501
6637
  },
@@ -6681,6 +6817,32 @@ const phConnectRuntimeConfigSchema = {
6681
6817
  }
6682
6818
  }
6683
6819
  },
6820
+ openPanel: {
6821
+ type: "object",
6822
+ additionalProperties: false,
6823
+ description: "OpenPanel product analytics. Set `clientId` to enable; an empty `clientId` disables it. Events are only sent after the user accepts analytics cookies. Takes precedence over the build-time PH_CONNECT_OPENPANEL_* env vars.",
6824
+ properties: {
6825
+ clientId: {
6826
+ type: "string",
6827
+ description: "OpenPanel client id. Empty string disables OpenPanel entirely.",
6828
+ default: ""
6829
+ },
6830
+ apiUrl: {
6831
+ type: "string",
6832
+ description: "OpenPanel API URL for self-hosted instances (e.g. 'https://openpanel.example/api'). Omit to use OpenPanel's hosted API."
6833
+ },
6834
+ trackUiEvents: {
6835
+ type: "boolean",
6836
+ description: "Track UI events.",
6837
+ default: true
6838
+ },
6839
+ trackOperations: {
6840
+ type: "boolean",
6841
+ description: "Track document operations.",
6842
+ default: true
6843
+ }
6844
+ }
6845
+ },
6684
6846
  instance: {
6685
6847
  type: "object",
6686
6848
  additionalProperties: false,
@@ -6694,7 +6856,12 @@ const phConnectRuntimeConfigSchema = {
6694
6856
  },
6695
6857
  reactorWorker: {
6696
6858
  type: "boolean",
6697
- description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified.",
6859
+ description: "Host the reactor in a shared worker instead of on the main thread. Off by default; the main-thread reactor stays the proven path until cutover is verified. Packaged deployments load the worker from the prebuilt bundle `ph connect build` emits under __reactor_worker__/ (the dev server builds it lazily at the same path); when that bundle is absent the feature reports itself unavailable instead of starting a worker that cannot load.",
6860
+ default: false
6861
+ },
6862
+ multiReactor: {
6863
+ type: "boolean",
6864
+ description: "Opt-in multi-reactor routing. When on, Connect routes through the in-browser reactor plus remote backends instead of the single in-browser reactor. Off by default; the single-reactor path is unchanged.",
6698
6865
  default: false
6699
6866
  }
6700
6867
  }
@@ -6703,33 +6870,47 @@ const phConnectRuntimeConfigSchema = {
6703
6870
  type: "object",
6704
6871
  additionalProperties: false,
6705
6872
  description: "Settings for the reactor Connect runs in the browser, on the main thread or in the shared worker alike.",
6706
- properties: { featureFlags: {
6707
- type: "object",
6708
- additionalProperties: false,
6709
- description: "Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.",
6710
- properties: {
6711
- documentDecisions: {
6712
- type: "boolean",
6713
- description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
6714
- default: false
6715
- },
6716
- authEnforcement: {
6717
- type: "boolean",
6718
- description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
6719
- default: false
6720
- },
6721
- authGroups: {
6722
- type: "boolean",
6723
- description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
6724
- default: false
6725
- },
6726
- authConditions: {
6727
- type: "boolean",
6728
- description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
6729
- default: false
6873
+ properties: {
6874
+ featureFlags: {
6875
+ type: "object",
6876
+ additionalProperties: false,
6877
+ description: "Enforcement flags. Each implies its predecessors, and the reactor refuses to boot on a set that names a later flag without an earlier one. These are consensus settings: a Connect syncing with a fleet must carry the same flags the fleet does, or the two reach different replay outcomes for the same history and diverge.",
6878
+ properties: {
6879
+ documentDecisions: {
6880
+ type: "boolean",
6881
+ description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
6882
+ default: false
6883
+ },
6884
+ authEnforcement: {
6885
+ type: "boolean",
6886
+ description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
6887
+ default: false
6888
+ },
6889
+ authGroups: {
6890
+ type: "boolean",
6891
+ description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
6892
+ default: false
6893
+ },
6894
+ authConditions: {
6895
+ type: "boolean",
6896
+ description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
6897
+ default: false
6898
+ }
6730
6899
  }
6900
+ },
6901
+ createSignaturePolicy: {
6902
+ type: "string",
6903
+ enum: ["legacy", "v2-required"],
6904
+ description: "What new documents are created as. `v2-required` documents accept only v2 action signatures and take content-addressed ids; set `legacy` while any peer Connect syncs with predates them. Existing documents keep their policy.",
6905
+ default: "v2-required"
6906
+ },
6907
+ unsupportedStoredDocuments: {
6908
+ type: "string",
6909
+ enum: ["refuse", "read-only"],
6910
+ description: "What the reactor does when this browser's store holds documents at protocol versions this build does not run. `refuse` fails the boot and names the versions; `read-only` boots and keeps those documents read-only.",
6911
+ default: "refuse"
6731
6912
  }
6732
- } }
6913
+ }
6733
6914
  },
6734
6915
  pwa: {
6735
6916
  type: "object",
@@ -7103,6 +7284,15 @@ const sourceConfigSchema = {
7103
7284
  }
7104
7285
  }
7105
7286
  },
7287
+ workflows: {
7288
+ type: "object",
7289
+ additionalProperties: false,
7290
+ description: "Powerhouse workflows on this reactor.",
7291
+ properties: { enabled: {
7292
+ type: "boolean",
7293
+ description: "Register the workflow document models and run workflows, on the reactor and in Connect. PH_WORKFLOWS_ENABLED overrides it for the reactor, and connect.app.workflowsEnabled for Connect."
7294
+ } }
7295
+ },
7106
7296
  packageRegistryUrl: {
7107
7297
  type: "string",
7108
7298
  description: "Project-wide package registry endpoint. Used by `ph install` / `ph publish` / `ph registry-login` and Switchboard, and copied verbatim into the runtime config so the Connect SPA's Package Manager UI reads the same registry."
@@ -7144,6 +7334,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
7144
7334
  if (lt(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
7145
7335
  }
7146
7336
  //#endregion
7147
- export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7337
+ export { AGENTS, ANALYTICS_ENGINE_CORE_PACKAGE, BOILERPLATE_ALLOWED_BUILDS, BOILERPLATE_DEPENDENCY_OVERRIDES, DEFAULT_CONFIG, DEFAULT_CONNECT_OUTDIR, DEFAULT_CONNECT_PREVIEW_PORT, DEFAULT_CONNECT_STUDIO_PORT, DEFAULT_EXPIRY_DAYS, DEFAULT_EXPIRY_SECONDS, DEFAULT_REGISTRY_LOGIN_EXPIRY, DEFAULT_REGISTRY_URL, DEFAULT_RENOWN_URL, DEFAULT_SWITCHBOARD_PORT, DEFAULT_TIMEOUT, DEFAULT_VETRA_CONNECT_PORT, DEFAULT_VETRA_DRIVE_ID, DRIVES_PRESERVE_STRATEGIES, FEATURE_DEPENDENCIES, GRAPHQL_PACKAGE, GRAPHQL_TAG_PACKAGE, HOME_DIR, LEGACY_LINT_FORMAT_DEPENDENCIES, LEGACY_LINT_FORMAT_FILES, LOG_LEVELS, MINIMUM_NODE_VERSION, NodeVersionError, PEER_EXTERNAL_DEPENDENCIES, PH_BIN, PH_GLOBAL_DIR_NAME, PH_GLOBAL_PROJECT_NAME, PIECES_FRAMEWORK_PACKAGE, POWERHOUSE_CONFIG_FILE, POWERHOUSE_GLOBAL_DIR, PROJECT_PORT_BAND_SIZE, PROJECT_PORT_BAND_STUDIO, PROJECT_PORT_BAND_SWITCHBOARD, PROJECT_PORT_BAND_VETRA_CONNECT, REACTOR_API_PACKAGE, SECONDS_IN_DAY, SERVICE_ACTIONS, SOURCE_CONFIG_SCHEMA_ID, VERSIONED_DEPENDENCIES, VERSIONED_DEV_DEPENDENCIES, VERSIONED_PEER_DEPENDENCIES, accessTokenArgs, assertNodeVersion, buildArgs, buildPnpmLink, commonArgs, commonServerArgs, connectArgs, connectBasePath, connectBuildArgs, connectConfigArgs, connectPreviewArgs, connectStudioArgs, debugArgs, defaultDrivesUrl, defaultManifest, directoryExists, directoryExistsSync, disableLocalPackages, drivesPreserveStrategy, externalDependencies, externalDevDependencies, fetchNpmVersionFromRegistryForTag, fetchPackageVersionFromNpmRegistry, fileExists, fileExistsSync, force, generateArgs, getConfig, getGlobalPowerhouseProjectDirPath, getLocalPowerhouseProjectDirPath, getPackageManagerAtPowerhouseProjectDirPath, getPackageManagerCommand, getPackageNameFromPackageJson, getPackageVersionFromPackageJson, getPhCliVersionInfo, getPhCmdVersionInfo, getPowerhouseProjectInfo, getPowerhouseProjectInstallCommand, getPowerhouseProjectUninstallCommand, getTagFromVersion, getTelemetryStatus, handleMutuallyExclusiveOptions, https, httpsCertFile, httpsKeyFile, initArgs, initCliTelemetry, injectPnpmAllowBuilds, inspectArgs, installArgs, isDirectory, isFile, isPowerhouseProject, listArgs, localPackage, logLevel, logVersionUpdate, loginArgs, lowestVersion, makeDependenciesWithVersions, makeVersionedDependencies, makeVersionedDependenciesMap, migrateArgs, packageJsonExports, packageManagerArgs, packageScripts, packages, parsePackageManager, parsePackageVersion, parseTag, phCliCommandNames, phCliHelpCommands, publishArgs, registryLoginArgs, renownNamespace, renownSwitchboardUrl, resolveConnectPortDefault, resolveSwitchboardPortDefault, resolveTelemetryConsent, runCmd, runUseLocal, serviceArgs, setTelemetryConsent, sourceConfigSchema, spawnAsync, switchboardArgs, uninstallArgs, unpublishArgs, vetraArgs, vetraSwitchboardArgs, writeFileEnsuringDir };
7148
7338
 
7149
7339
  //# sourceMappingURL=index.mjs.map