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

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-CR5lvv_A.mjs +231 -0
  121. package/dist/clis/build-config-CR5lvv_A.mjs.map +1 -0
  122. package/dist/clis/build-config.d.mts +44 -10614
  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 +100 -0
  126. package/dist/clis/build-pieces.d.mts.map +1 -0
  127. package/dist/clis/build-pieces.mjs +371 -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 -10
  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 +1385 -1224
  138. package/dist/clis/index.d.mts.map +1 -1
  139. package/dist/clis/index.mjs +259 -74
  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-Cc_rB0Yx.d.mts +541 -0
  152. package/dist/clis/types-Cc_rB0Yx.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-CXhzL512.js} +33 -8
  157. package/dist/config-loader-CXhzL512.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 +198 -57
  162. package/dist/connect/index.d.ts.map +1 -1
  163. package/dist/connect/index.js +313 -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-C2K-m7pp.d.ts +9 -0
  169. package/dist/constants-C2K-m7pp.d.ts.map +1 -0
  170. package/dist/constants.d.ts +3 -2
  171. package/dist/constants.js +10 -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 +295 -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-BhqNGLu9.d.ts +36 -0
  193. package/dist/index-BhqNGLu9.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-CpnWmiFY.d.ts → types-BRJfX8ck.d.ts} +2003 -821
  216. package/dist/types-BRJfX8ck.d.ts.map +1 -0
  217. package/dist/{types-YqLqb0Zb.d.ts → types-BTfv_ZzS.d.ts} +39 -43
  218. package/dist/types-BTfv_ZzS.d.ts.map +1 -0
  219. package/dist/{types-C1in4fl3.d.ts → types-Bsp8VL2y.d.ts} +2 -2
  220. package/dist/types-Bsp8VL2y.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",
@@ -177,6 +186,14 @@ const packageJsonExports = {
177
186
  browser: "./dist/browser/processors/index.js",
178
187
  node: "./dist/node/processors/index.mjs"
179
188
  },
189
+ "./pieces": {
190
+ types: "./dist/types/pieces/index.d.ts",
191
+ node: "./dist/node/pieces/index.mjs"
192
+ },
193
+ "./pieces/*": {
194
+ types: "./dist/types/pieces/*/index.d.ts",
195
+ node: "./dist/node/pieces/*/index.mjs"
196
+ },
180
197
  "./manifest": "./dist/powerhouse.manifest.json",
181
198
  "./style.css": "./dist/style.css"
182
199
  };
@@ -242,15 +259,15 @@ const externalDevDependencies = {
242
259
  "@types/react": "^19.2.3",
243
260
  "@types/react-dom": "^19.2.3",
244
261
  "@vitejs/plugin-react": "^6.0.1",
245
- "@vitest/coverage-v8": "4.1.1",
246
- oxfmt: "0.55.0",
262
+ "@vitest/coverage-v8": "5.0.3",
263
+ oxfmt: "0.68.0",
247
264
  oxlint: "1.70.0",
248
265
  "oxlint-tsgolint": "0.23.0",
249
266
  tailwindcss: "^4.1.16",
250
- typescript: "^5.9.3",
267
+ typescript: "~7.0.2",
251
268
  vite: "^8.0.10",
252
269
  "vite-tsconfig-paths": "6.1.1",
253
- vitest: "4.1.1"
270
+ vitest: "5.0.3"
254
271
  };
255
272
  const defaultManifest = {
256
273
  name: "",
@@ -309,6 +326,20 @@ const buildArgs = {
309
326
  defaultValue: () => "dist",
310
327
  defaultValueIsSerializable: true
311
328
  }),
329
+ noSharedDeps: flag({
330
+ type: boolean,
331
+ long: "no-shared-deps",
332
+ description: "Bundle the shared dependency set instead of externalizing it (default: externalize)",
333
+ defaultValue: () => false,
334
+ defaultValueIsSerializable: true
335
+ }),
336
+ ignoreTypeErrors: flag({
337
+ type: boolean,
338
+ long: "ignore-type-errors",
339
+ description: "Unsafe: build even when tsc reports type errors, without asking. The package can load and still fail at runtime",
340
+ defaultValue: () => false,
341
+ defaultValueIsSerializable: true
342
+ }),
312
343
  ...debugArgs
313
344
  };
314
345
  const packageManagerArgs = {
@@ -414,7 +445,7 @@ const vetraSwitchboardArgs = {
414
445
  const defaultDrivesUrl = option({
415
446
  type: optional(string),
416
447
  long: "default-drives-url",
417
- description: "The default drives url to use in connect",
448
+ description: "Comma-separated drive URLs to use as Connect's default drives.",
418
449
  defaultValue: () => ""
419
450
  });
420
451
  const logLevel = option({
@@ -551,7 +582,7 @@ const connectRuntimeOverrideArgs = {
551
582
  json: option({
552
583
  type: optional(string),
553
584
  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."
585
+ 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
586
  }),
556
587
  renownUrl: option({
557
588
  type: optional(string),
@@ -580,6 +611,11 @@ const connectRuntimeOverrideArgs = {
580
611
  long: "external-packages",
581
612
  description: "Override connect.packages.externalEnabled."
582
613
  }),
614
+ workflows: option({
615
+ type: optional(cliBoolean),
616
+ long: "workflows",
617
+ description: "Override connect.app.workflowsEnabled (load the @powerhousedao/workflow package: workflow + connection documents, their editors and Workflow Studio)."
618
+ }),
583
619
  remoteDrivesEnabled: option({
584
620
  type: optional(cliBoolean),
585
621
  long: "remote-drives-enabled",
@@ -801,6 +837,44 @@ const generateArgs = {
801
837
  long: "subgraph",
802
838
  description: "Subgraph name."
803
839
  }),
840
+ pieceName: option({
841
+ type: optional(string),
842
+ long: "piece",
843
+ description: "Piece name."
844
+ }),
845
+ pieceId: option({
846
+ type: optional(string),
847
+ long: "piece-id",
848
+ description: "Piece id, the pieceName a workflow step holds, e.g. @acme/piece-crm. Defaults to one derived from the package name."
849
+ }),
850
+ pieceAuth: option({
851
+ type: oneOf([
852
+ "none",
853
+ "secret",
854
+ "custom"
855
+ ]),
856
+ long: "piece-auth",
857
+ description: "The kind of connection the generated piece asks for. Default is custom.",
858
+ defaultValue: () => "custom",
859
+ defaultValueIsSerializable: true
860
+ }),
861
+ pieceActionName: option({
862
+ type: optional(string),
863
+ long: "piece-action",
864
+ description: "Name of an action to generate inside a piece."
865
+ }),
866
+ pieceTriggerName: option({
867
+ type: optional(string),
868
+ long: "piece-trigger",
869
+ description: "Name of a trigger to generate inside a piece."
870
+ }),
871
+ pieceTriggerStrategy: option({
872
+ type: oneOf(["polling", "webhook"]),
873
+ long: "piece-trigger-strategy",
874
+ description: "How a generated trigger fires. Default is polling.",
875
+ defaultValue: () => "polling",
876
+ defaultValueIsSerializable: true
877
+ }),
804
878
  importScriptName: option({
805
879
  type: optional(string),
806
880
  long: "import-script",
@@ -1436,7 +1510,9 @@ const unpublishArgs = {
1436
1510
  //#endregion
1437
1511
  //#region ../../node_modules/.pnpm/picocolors@1.1.1/node_modules/picocolors/picocolors.js
1438
1512
  var require_picocolors = /* @__PURE__ */ __commonJSMin(((exports, module) => {
1439
- let p = process || {}, argv = p.argv || [], env = p.env || {};
1513
+ let p = process || {};
1514
+ let argv = p.argv || [];
1515
+ let env = p.env || {};
1440
1516
  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
1517
  let formatter = (open, close, replace = open) => (input) => {
1442
1518
  let string = "" + input, index = string.indexOf(close, open.length);
@@ -2698,7 +2774,7 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
2698
2774
  function getDefs(enabled) {
2699
2775
  return enabled ? defsOn : defsOff;
2700
2776
  }
2701
- const sometimesKeywords = new Set([
2777
+ const sometimesKeywords = /* @__PURE__ */ new Set([
2702
2778
  "as",
2703
2779
  "async",
2704
2780
  "from",
@@ -2765,9 +2841,10 @@ var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
2765
2841
  else if (i === lineDiff) markerLines[lineNumber] = [0, endColumn];
2766
2842
  else markerLines[lineNumber] = [0, source[lineNumber - i].length];
2767
2843
  }
2768
- else if (startColumn === endColumn) if (startColumn) markerLines[startLine] = [startColumn, 0];
2769
- else markerLines[startLine] = true;
2770
- else markerLines[startLine] = [startColumn, endColumn - startColumn];
2844
+ else if (startColumn === endColumn) {
2845
+ if (startColumn) markerLines[startLine] = [startColumn, 0];
2846
+ else markerLines[startLine] = true;
2847
+ } else markerLines[startLine] = [startColumn, endColumn - startColumn];
2771
2848
  return {
2772
2849
  start,
2773
2850
  end,
@@ -4231,9 +4308,14 @@ var require_validate_npm_package_license = /* @__PURE__ */ __commonJSMin(((expor
4231
4308
  var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4232
4309
  Object.defineProperty(exports, "__esModule", { value: !0 });
4233
4310
  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) => {
4311
+ var G = typeof performance == "object" && performance && typeof performance.now == "function" ? performance : Date;
4312
+ var U = /* @__PURE__ */ new Set();
4313
+ var R = typeof process == "object" && process ? process : {};
4314
+ var I = (c, t, e, i) => {
4235
4315
  typeof R.emitWarning == "function" ? R.emitWarning(c, t, e, i) : console.error(`[${e}] ${t}: ${c}`);
4236
- }, C = globalThis.AbortController, L = globalThis.AbortSignal;
4316
+ };
4317
+ var C = globalThis.AbortController;
4318
+ var L = globalThis.AbortSignal;
4237
4319
  if (typeof C > "u") {
4238
4320
  L = class {
4239
4321
  onabort;
@@ -4260,11 +4342,15 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4260
4342
  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
4343
  };
4262
4344
  }
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 {
4345
+ var x = (c) => !U.has(c);
4346
+ var y = (c) => c && c === Math.floor(c) && c > 0 && isFinite(c);
4347
+ 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;
4348
+ var z = class extends Array {
4264
4349
  constructor(t) {
4265
4350
  super(t), this.fill(0);
4266
4351
  }
4267
- }, W = class c {
4352
+ };
4353
+ var W = class c {
4268
4354
  heap;
4269
4355
  length;
4270
4356
  static #o = !1;
@@ -4413,7 +4499,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4413
4499
  }
4414
4500
  }
4415
4501
  getRemainingTTL(t) {
4416
- return this.#s.has(t) ? Infinity : 0;
4502
+ return this.#s.has(t) ? 1 / 0 : 0;
4417
4503
  }
4418
4504
  #j() {
4419
4505
  let t = new z(this.#o), e = new z(this.#o);
@@ -4453,7 +4539,7 @@ var require_index_min = /* @__PURE__ */ __commonJSMin(((exports) => {
4453
4539
  let r = this.#s.get(h);
4454
4540
  if (r === void 0) return 0;
4455
4541
  let a = t[r], w = e[r];
4456
- if (!a || !w) return Infinity;
4542
+ if (!a || !w) return 1 / 0;
4457
4543
  return a - ((n || o()) - w);
4458
4544
  }, this.#p = (h) => {
4459
4545
  let r = e[h], a = t[h];
@@ -5020,8 +5106,10 @@ var require_parse_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5020
5106
  if (Object.prototype.hasOwnProperty.call(protocols, proto)) return arg;
5021
5107
  if (arg.substr(firstColon, 3) === "://") return arg;
5022
5108
  const firstAt = arg.indexOf("@");
5023
- if (firstAt > -1) if (firstAt > firstColon) return `git+ssh://${arg}`;
5024
- else return arg;
5109
+ if (firstAt > -1) {
5110
+ if (firstAt > firstColon) return `git+ssh://${arg}`;
5111
+ else return arg;
5112
+ }
5025
5113
  return `${arg.slice(0, firstColon + 1)}//${arg.slice(firstColon + 1)}`;
5026
5114
  };
5027
5115
  const correctUrl = (giturl) => {
@@ -5058,7 +5146,8 @@ var require_from_url = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5058
5146
  };
5059
5147
  module.exports = (giturl, opts, { gitHosts, protocols }) => {
5060
5148
  if (!giturl) return;
5061
- const parsed = parseUrl(isGitHubShorthand(giturl) ? `github:${giturl}` : giturl, protocols);
5149
+ const correctedUrl = isGitHubShorthand(giturl) ? `github:${giturl}` : giturl;
5150
+ const parsed = parseUrl(correctedUrl, protocols);
5062
5151
  if (!parsed) return;
5063
5152
  const gitHostShortcut = gitHosts.byShortcut[parsed.protocol];
5064
5153
  const gitHostDomain = gitHosts.byDomain[parsed.hostname.startsWith("www.") ? parsed.hostname.slice(4) : parsed.hostname];
@@ -5521,17 +5610,22 @@ var require_fixer = /* @__PURE__ */ __commonJSMin(((exports, module) => {
5521
5610
  var hosted = hostedGitInfo.fromUrl(data.repository.url);
5522
5611
  if (hosted && hosted.bugs()) data.bugs = { url: hosted.bugs() };
5523
5612
  } 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 {
5613
+ if (typeof data.bugs === "string") {
5614
+ if (isEmail(data.bugs)) data.bugs = { email: data.bugs };
5615
+ else if (URL$1.canParse(data.bugs)) data.bugs = { url: data.bugs };
5616
+ else this.warn("nonEmailUrlBugsString");
5617
+ } else {
5528
5618
  bugsTypos(data.bugs, this.warn);
5529
5619
  var oldBugs = data.bugs;
5530
5620
  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");
5621
+ if (oldBugs.url) {
5622
+ if (URL$1.canParse(oldBugs.url)) data.bugs.url = oldBugs.url;
5623
+ else this.warn("nonUrlBugsUrlField");
5624
+ }
5625
+ if (oldBugs.email) {
5626
+ if (typeof oldBugs.email === "string" && isEmail(oldBugs.email)) data.bugs.email = oldBugs.email;
5627
+ else this.warn("nonEmailBugsEmailField");
5628
+ }
5535
5629
  }
5536
5630
  if (!data.bugs.email && !data.bugs.url) {
5537
5631
  delete data.bugs;
@@ -5763,7 +5857,8 @@ const _readPackage = (file, normalize) => {
5763
5857
  return json;
5764
5858
  };
5765
5859
  async function readPackage({ cwd, normalize = true } = {}) {
5766
- return _readPackage(await fsPromises.readFile(getPackagePath(cwd), "utf8"), normalize);
5860
+ const packageFile = await fsPromises.readFile(getPackagePath(cwd), "utf8");
5861
+ return _readPackage(packageFile, normalize);
5767
5862
  }
5768
5863
  //#endregion
5769
5864
  //#region clis/file-system/spawn-async.ts
@@ -5796,10 +5891,14 @@ function spawnAsync(command, args, options = {}) {
5796
5891
  //#endregion
5797
5892
  //#region clis/file-system/dependencies.ts
5798
5893
  async function fetchNpmVersionFromRegistryForTag(packageName, tag) {
5799
- const cleanedVersion = clean(await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`));
5894
+ const version = await fetchPackageVersionFromNpmRegistry(`${packageName}@${tag}`);
5895
+ const cleanedVersion = clean(version);
5800
5896
  if (!cleanedVersion) throw new Error(`Failed to fetch version for package "${packageName}" at tag "${tag}".`);
5801
5897
  return cleanedVersion;
5802
5898
  }
5899
+ function lowestVersion(versions) {
5900
+ return [...versions].sort(compare)[0];
5901
+ }
5803
5902
  async function fetchPackageVersionFromNpmRegistry(packageSpecifier, registryUrl) {
5804
5903
  const failedFetchErrorMessage = `Failed to fetch version from npm registry for ${packageSpecifier}.`;
5805
5904
  try {
@@ -6046,7 +6145,7 @@ PH CLI package manager: ${packageManager}
6046
6145
  //#endregion
6047
6146
  //#region clis/file-system/write-file-ensuring-dir.ts
6048
6147
  async function writeFileEnsuringDir(filePath, contents) {
6049
- await mkdir(dirname(filePath), { recursive: true });
6148
+ await mkdir(dirname(resolve(filePath)), { recursive: true });
6050
6149
  await writeFile(filePath, contents, { encoding: "utf-8" });
6051
6150
  }
6052
6151
  //#endregion
@@ -6274,12 +6373,22 @@ const PACKAGES_DEPENDENCIES = [
6274
6373
  "@powerhousedao/design-system",
6275
6374
  "document-drive",
6276
6375
  "document-model",
6376
+ "@powerhousedao/opentelemetry-instrumentation-reactor",
6377
+ "@powerhousedao/pieces-framework",
6277
6378
  "@powerhousedao/reactor",
6278
6379
  "@powerhousedao/reactor-api",
6380
+ "@powerhousedao/reactor-attachments",
6279
6381
  "@powerhousedao/reactor-browser",
6382
+ "@powerhousedao/reactor-drive",
6383
+ "@powerhousedao/reactor-group",
6384
+ "@powerhousedao/reactor-hypercore",
6280
6385
  "@powerhousedao/reactor-mcp",
6386
+ "@powerhousedao/reactor-privacy",
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,7 @@ 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.",
6698
6860
  default: false
6699
6861
  }
6700
6862
  }
@@ -6703,33 +6865,47 @@ const phConnectRuntimeConfigSchema = {
6703
6865
  type: "object",
6704
6866
  additionalProperties: false,
6705
6867
  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
6868
+ properties: {
6869
+ featureFlags: {
6870
+ type: "object",
6871
+ additionalProperties: false,
6872
+ 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.",
6873
+ properties: {
6874
+ documentDecisions: {
6875
+ type: "boolean",
6876
+ description: "Decide writes from the document stream rather than the document meta cache, so a backdated deletion denies the operations that sort after it.",
6877
+ default: false
6878
+ },
6879
+ authEnforcement: {
6880
+ type: "boolean",
6881
+ description: "Enforce the auth scope's policy at admission, replay, and read. Requires documentDecisions.",
6882
+ default: false
6883
+ },
6884
+ authGroups: {
6885
+ type: "boolean",
6886
+ description: "Let `{ group }` principals match against the rosters of the group documents a policy names. Requires authEnforcement.",
6887
+ default: false
6888
+ },
6889
+ authConditions: {
6890
+ type: "boolean",
6891
+ description: "Evaluate `where` and `match` conditions on grants. Requires authGroups. Do not enable on a fleet `preflight:auth` reports as crossing a reducer version.",
6892
+ default: false
6893
+ }
6730
6894
  }
6895
+ },
6896
+ createSignaturePolicy: {
6897
+ type: "string",
6898
+ enum: ["legacy", "v2-required"],
6899
+ 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.",
6900
+ default: "v2-required"
6901
+ },
6902
+ unsupportedStoredDocuments: {
6903
+ type: "string",
6904
+ enum: ["refuse", "read-only"],
6905
+ 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.",
6906
+ default: "refuse"
6731
6907
  }
6732
- } }
6908
+ }
6733
6909
  },
6734
6910
  pwa: {
6735
6911
  type: "object",
@@ -7103,6 +7279,15 @@ const sourceConfigSchema = {
7103
7279
  }
7104
7280
  }
7105
7281
  },
7282
+ workflows: {
7283
+ type: "object",
7284
+ additionalProperties: false,
7285
+ description: "Powerhouse workflows on this reactor.",
7286
+ properties: { enabled: {
7287
+ type: "boolean",
7288
+ 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."
7289
+ } }
7290
+ },
7106
7291
  packageRegistryUrl: {
7107
7292
  type: "string",
7108
7293
  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 +7329,6 @@ function assertNodeVersion(nodeVersion = process.versions.node) {
7144
7329
  if (lt(nodeVersion, "24.0.0")) throw new NodeVersionError(nodeVersion, MINIMUM_NODE_VERSION);
7145
7330
  }
7146
7331
  //#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 };
7332
+ 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
7333
 
7149
7334
  //# sourceMappingURL=index.mjs.map