@powerhousedao/workflow 6.2.3-dev.24 → 6.2.3-dev.26

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 (308) hide show
  1. package/README.md +37 -0
  2. package/dist/browser/BlockSelector-QQgOCVH3.js +1355 -0
  3. package/dist/browser/BlockSelector-QQgOCVH3.js.map +1 -0
  4. package/dist/browser/{PieceMarkdown-CZYNY1qQ.js → PieceMarkdown-C8Gv88TV.js} +139 -105
  5. package/dist/browser/PieceMarkdown-C8Gv88TV.js.map +1 -0
  6. package/dist/browser/assets/{entry-CSJBrcX5.js → entry-DhaRsTID.js} +2 -3
  7. package/dist/browser/assets/{projection-entry-D67cdPsg.js → projection-entry-qrF_MLsE.js} +7 -13
  8. package/dist/browser/{connection-DEe5aDuU.js → connection-BUum0hJI.js} +2 -2
  9. package/dist/browser/{connection-DEe5aDuU.js.map → connection-BUum0hJI.js.map} +1 -1
  10. package/dist/browser/connection-form-XKR4zQgQ.js +533 -0
  11. package/dist/browser/connection-form-XKR4zQgQ.js.map +1 -0
  12. package/dist/browser/data-tree-DKrDFeQg.js +1896 -0
  13. package/dist/browser/data-tree-DKrDFeQg.js.map +1 -0
  14. package/dist/browser/document-models/connection/index.js +2 -2
  15. package/dist/browser/document-models/index.js +3 -3
  16. package/dist/browser/document-models/workflow/index.js +2 -2
  17. package/dist/browser/{document-models-BYheX-te.js → document-models-C6ebrsd9.js} +3 -3
  18. package/dist/browser/{document-models-BYheX-te.js.map → document-models-C6ebrsd9.js.map} +1 -1
  19. package/dist/browser/editor-C_E_JTp6.js +257 -0
  20. package/dist/browser/editor-C_E_JTp6.js.map +1 -0
  21. package/dist/browser/{editor-D0sdUxJa.js → editor-YZw296bf.js} +3348 -1610
  22. package/dist/browser/editor-YZw296bf.js.map +1 -0
  23. package/dist/browser/editor-fjwq-8Yq.js +1527 -0
  24. package/dist/browser/editor-fjwq-8Yq.js.map +1 -0
  25. package/dist/browser/editors/connection-editor/module.js +1 -1
  26. package/dist/browser/editors/connection-editor/module.js.map +1 -1
  27. package/dist/browser/editors/workflow-editor/module.js +1 -1
  28. package/dist/browser/editors/workflow-editor/module.js.map +1 -1
  29. package/dist/browser/editors/workflow-studio/module.js +1 -1
  30. package/dist/browser/editors/workflow-studio/module.js.map +1 -1
  31. package/dist/browser/index.js +7 -5
  32. package/dist/browser/index.js.map +1 -1
  33. package/dist/browser/{module-CYQnNZWl.js → module-Bkms70LV.js} +3 -3
  34. package/dist/browser/{module-CYQnNZWl.js.map → module-Bkms70LV.js.map} +1 -1
  35. package/dist/{node/module-IA-Ay7ig.mjs → browser/module-jDZ4pq3W.js} +2 -2
  36. package/dist/browser/{module-12vI18HY.js.map → module-jDZ4pq3W.js.map} +1 -1
  37. package/dist/browser/piece-auth-Z4mZEOtL.js +113 -0
  38. package/dist/browser/piece-auth-Z4mZEOtL.js.map +1 -0
  39. package/dist/browser/reactor/index.js +2 -2
  40. package/dist/browser/{chunk-BoAXSpZd.js → rolldown-runtime-DC62tzP2.js} +2 -2
  41. package/dist/browser/{runtime-api-DKlnn45K.js → runtime-api-xwvg5PzA.js} +40 -123
  42. package/dist/browser/runtime-api-xwvg5PzA.js.map +1 -0
  43. package/dist/browser/style.css +26 -0
  44. package/dist/browser/trigger-text-CdNxQOHw.js +551 -0
  45. package/dist/browser/trigger-text-CdNxQOHw.js.map +1 -0
  46. package/dist/browser/upgrade-manifests-BLrv3cf2.js +8 -0
  47. package/dist/browser/{upgrade-manifests-Cnpfo6kC.js.map → upgrade-manifests-BLrv3cf2.js.map} +1 -1
  48. package/dist/browser/{workflow-CFZUezoY.js → workflow-CGtVlhr8.js} +2 -2
  49. package/dist/browser/{workflow-CFZUezoY.js.map → workflow-CGtVlhr8.js.map} +1 -1
  50. package/dist/node/BlockSelector-COZm6-ev.mjs +1355 -0
  51. package/dist/node/BlockSelector-COZm6-ev.mjs.map +1 -0
  52. package/dist/node/{PieceMarkdown-D9nI2gI2.mjs → PieceMarkdown-DIxZY5aG.mjs} +132 -100
  53. package/dist/node/PieceMarkdown-DIxZY5aG.mjs.map +1 -0
  54. package/dist/node/{connection-DGsS2Db3.mjs → connection-D544oqVW.mjs} +2 -2
  55. package/dist/node/{connection-DGsS2Db3.mjs.map → connection-D544oqVW.mjs.map} +1 -1
  56. package/dist/node/connection-form-BLduFusc.mjs +533 -0
  57. package/dist/node/connection-form-BLduFusc.mjs.map +1 -0
  58. package/dist/node/data-tree-CmiGqG7C.mjs +1903 -0
  59. package/dist/node/data-tree-CmiGqG7C.mjs.map +1 -0
  60. package/dist/node/document-models/connection/index.mjs +2 -2
  61. package/dist/node/document-models/index.mjs +3 -3
  62. package/dist/node/document-models/workflow/index.mjs +2 -2
  63. package/dist/node/{editor-sVzt1o51.mjs → editor-B2ZoeGue.mjs} +3200 -1508
  64. package/dist/node/editor-B2ZoeGue.mjs.map +1 -0
  65. package/dist/node/editor-CN4PEGrW.mjs +257 -0
  66. package/dist/node/editor-CN4PEGrW.mjs.map +1 -0
  67. package/dist/node/editor-CyNBEKoj.mjs +1527 -0
  68. package/dist/node/editor-CyNBEKoj.mjs.map +1 -0
  69. package/dist/node/editors/connection-editor/module.mjs +1 -1
  70. package/dist/node/editors/connection-editor/module.mjs.map +1 -1
  71. package/dist/node/editors/workflow-editor/module.mjs +1 -1
  72. package/dist/node/editors/workflow-editor/module.mjs.map +1 -1
  73. package/dist/node/editors/workflow-studio/module.mjs +1 -1
  74. package/dist/node/editors/workflow-studio/module.mjs.map +1 -1
  75. package/dist/node/index.mjs +8 -6
  76. package/dist/node/index.mjs.map +1 -1
  77. package/dist/{browser/module-12vI18HY.js → node/module-BMwJQh65.mjs} +2 -2
  78. package/dist/node/{module-IA-Ay7ig.mjs.map → module-BMwJQh65.mjs.map} +1 -1
  79. package/dist/node/{module-IRMgzJC1.mjs → module-DuxxhgKs.mjs} +3 -3
  80. package/dist/node/{module-IRMgzJC1.mjs.map → module-DuxxhgKs.mjs.map} +1 -1
  81. package/dist/node/piece-auth-Z4mZEOtL.mjs +113 -0
  82. package/dist/node/piece-auth-Z4mZEOtL.mjs.map +1 -0
  83. package/dist/node/pieces/index.mjs.map +1 -1
  84. package/dist/node/pieces/reactor/index.mjs +226 -488
  85. package/dist/node/pieces/reactor/index.mjs.map +1 -1
  86. package/dist/node/{chunk-BSw8zbkd.mjs → rolldown-runtime-BMI-E3GI.mjs} +11 -4
  87. package/dist/node/{runtime-api-CtvvFHut.mjs → runtime-api-xwvg5PzA.mjs} +40 -123
  88. package/dist/node/runtime-api-xwvg5PzA.mjs.map +1 -0
  89. package/dist/node/style.css +26 -0
  90. package/dist/node/trigger-text-qj_U3Qzd.mjs +551 -0
  91. package/dist/node/trigger-text-qj_U3Qzd.mjs.map +1 -0
  92. package/dist/node/upgrade-manifests-C1sl_M-H.mjs +8 -0
  93. package/dist/node/{upgrade-manifests-3VN0Bfcf.mjs.map → upgrade-manifests-C1sl_M-H.mjs.map} +1 -1
  94. package/dist/node/{workflow-fFvyypuu.mjs → workflow-C-uuQPnf.mjs} +2 -2
  95. package/dist/node/{workflow-fFvyypuu.mjs.map → workflow-C-uuQPnf.mjs.map} +1 -1
  96. package/dist/style.css +927 -252
  97. package/dist/types/document-models/connection/upgrades/versions.d.ts.map +1 -1
  98. package/dist/types/document-models/connection/v1/actions.d.ts +6 -10
  99. package/dist/types/document-models/connection/v1/actions.d.ts.map +1 -1
  100. package/dist/types/document-models/connection/v1/gen/config/creators.d.ts.map +1 -1
  101. package/dist/types/document-models/connection/v1/gen/config/error.d.ts.map +1 -1
  102. package/dist/types/document-models/connection/v1/gen/connection/creators.d.ts.map +1 -1
  103. package/dist/types/document-models/connection/v1/gen/health/creators.d.ts.map +1 -1
  104. package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts.map +1 -1
  105. package/dist/types/document-models/connection/v1/module.d.ts +6 -10
  106. package/dist/types/document-models/connection/v1/module.d.ts.map +1 -1
  107. package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts +0 -8
  108. package/dist/types/document-models/connection/v1/tests/document-model.test.d.ts.map +1 -1
  109. package/dist/types/document-models/document-models.d.ts +15 -23
  110. package/dist/types/document-models/document-models.d.ts.map +1 -1
  111. package/dist/types/document-models/workflow/upgrades/versions.d.ts.map +1 -1
  112. package/dist/types/document-models/workflow/v1/actions.d.ts +9 -13
  113. package/dist/types/document-models/workflow/v1/actions.d.ts.map +1 -1
  114. package/dist/types/document-models/workflow/v1/gen/edges/creators.d.ts.map +1 -1
  115. package/dist/types/document-models/workflow/v1/gen/edges/error.d.ts.map +1 -1
  116. package/dist/types/document-models/workflow/v1/gen/policy/creators.d.ts.map +1 -1
  117. package/dist/types/document-models/workflow/v1/gen/runtime/creators.d.ts.map +1 -1
  118. package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
  119. package/dist/types/document-models/workflow/v1/gen/steps/creators.d.ts.map +1 -1
  120. package/dist/types/document-models/workflow/v1/gen/steps/error.d.ts.map +1 -1
  121. package/dist/types/document-models/workflow/v1/gen/trigger/creators.d.ts.map +1 -1
  122. package/dist/types/document-models/workflow/v1/gen/trigger/error.d.ts.map +1 -1
  123. package/dist/types/document-models/workflow/v1/gen/variables/creators.d.ts.map +1 -1
  124. package/dist/types/document-models/workflow/v1/gen/variables/error.d.ts.map +1 -1
  125. package/dist/types/document-models/workflow/v1/gen/workflow/creators.d.ts.map +1 -1
  126. package/dist/types/document-models/workflow/v1/module.d.ts +9 -13
  127. package/dist/types/document-models/workflow/v1/module.d.ts.map +1 -1
  128. package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts +0 -8
  129. package/dist/types/document-models/workflow/v1/tests/document-model.test.d.ts.map +1 -1
  130. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts +2 -0
  131. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -1
  132. package/dist/types/editors/connection-editor/UsedBy.d.ts +6 -0
  133. package/dist/types/editors/connection-editor/UsedBy.d.ts.map +1 -0
  134. package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
  135. package/dist/types/editors/connection-editor/connection-callbacks.test.d.ts +2 -0
  136. package/dist/types/editors/connection-editor/connection-callbacks.test.d.ts.map +1 -0
  137. package/dist/types/editors/connection-editor/connection-form.d.ts +5 -1
  138. package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
  139. package/dist/types/editors/connection-editor/connection-usage.d.ts.map +1 -0
  140. package/dist/types/editors/connection-editor/connection-usage.test.d.ts.map +1 -0
  141. package/dist/types/editors/connection-editor/editor.d.ts.map +1 -1
  142. package/dist/types/editors/connection-editor/piece-auth.d.ts +2 -0
  143. package/dist/types/editors/connection-editor/piece-auth.d.ts.map +1 -1
  144. package/dist/types/editors/connection-editor/status.d.ts +3 -1
  145. package/dist/types/editors/connection-editor/status.d.ts.map +1 -1
  146. package/dist/types/editors/shared/DocumentErrorBoundary.d.ts.map +1 -1
  147. package/dist/types/editors/shared/controls.d.ts +98 -0
  148. package/dist/types/editors/shared/controls.d.ts.map +1 -0
  149. package/dist/types/editors/shared/data-tree.d.ts +5 -0
  150. package/dist/types/editors/shared/data-tree.d.ts.map +1 -0
  151. package/dist/types/editors/shared/data-viewer.d.ts +7 -0
  152. package/dist/types/editors/shared/data-viewer.d.ts.map +1 -0
  153. package/dist/types/editors/shared/editor-chrome.d.ts +7 -0
  154. package/dist/types/editors/shared/editor-chrome.d.ts.map +1 -0
  155. package/dist/types/editors/shared/icons.d.ts +36 -0
  156. package/dist/types/editors/shared/icons.d.ts.map +1 -0
  157. package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
  158. package/dist/types/editors/workflow-editor/runtime-api.d.ts +2 -0
  159. package/dist/types/editors/workflow-editor/runtime-api.d.ts.map +1 -1
  160. package/dist/types/editors/workflow-editor/ui/ActionListEditor.d.ts.map +1 -1
  161. package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts +1 -0
  162. package/dist/types/editors/workflow-editor/ui/Autocomplete.d.ts.map +1 -1
  163. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts +1 -0
  164. package/dist/types/editors/workflow-editor/ui/BlockSelector.d.ts.map +1 -1
  165. package/dist/types/editors/workflow-editor/ui/ConnectionField.d.ts.map +1 -1
  166. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts +1 -1
  167. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -1
  168. package/dist/types/editors/workflow-editor/ui/ExpressionPicker.d.ts.map +1 -1
  169. package/dist/types/editors/workflow-editor/ui/PieceMarkdown.d.ts.map +1 -1
  170. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
  171. package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts +5 -0
  172. package/dist/types/editors/workflow-editor/ui/ScheduleBuilder.d.ts.map +1 -0
  173. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +1 -0
  174. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
  175. package/dist/types/editors/workflow-editor/ui/WorkflowCanvas.d.ts.map +1 -1
  176. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts +3 -0
  177. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
  178. package/dist/types/editors/workflow-editor/ui/ap-edge.d.ts.map +1 -1
  179. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts +1 -0
  180. package/dist/types/editors/workflow-editor/ui/ap-layout.d.ts.map +1 -1
  181. package/dist/types/editors/workflow-editor/ui/ap-nodes.d.ts.map +1 -1
  182. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts +6 -0
  183. package/dist/types/editors/workflow-editor/ui/block-meta.d.ts.map +1 -1
  184. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts +1 -1
  185. package/dist/types/editors/workflow-editor/ui/connection-create.d.ts.map +1 -1
  186. package/dist/types/editors/workflow-editor/ui/forms.d.ts +14 -0
  187. package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
  188. package/dist/types/editors/workflow-editor/ui/model.test.d.ts +2 -0
  189. package/dist/types/editors/workflow-editor/ui/model.test.d.ts.map +1 -0
  190. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts +35 -0
  191. package/dist/types/editors/workflow-editor/ui/schedule-draft.d.ts.map +1 -0
  192. package/dist/types/editors/workflow-editor/ui/schedule-draft.test.d.ts +2 -0
  193. package/dist/types/editors/workflow-editor/ui/schedule-draft.test.d.ts.map +1 -0
  194. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts +9 -0
  195. package/dist/types/editors/workflow-editor/ui/trigger-text.d.ts.map +1 -0
  196. package/dist/types/editors/workflow-editor/ui/trigger-text.test.d.ts +2 -0
  197. package/dist/types/editors/workflow-editor/ui/trigger-text.test.d.ts.map +1 -0
  198. package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
  199. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts +2 -0
  200. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
  201. package/dist/types/editors/workflow-studio/components/RunsTable.test.d.ts +2 -0
  202. package/dist/types/editors/workflow-studio/components/RunsTable.test.d.ts.map +1 -0
  203. package/dist/types/editors/workflow-studio/components/RunsView.d.ts.map +1 -1
  204. package/dist/types/editors/workflow-studio/components/Sidebar.d.ts +1 -1
  205. package/dist/types/editors/workflow-studio/components/Sidebar.d.ts.map +1 -1
  206. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts +8 -0
  207. package/dist/types/editors/workflow-studio/components/WorkflowBoard.d.ts.map +1 -0
  208. package/dist/types/editors/workflow-studio/components/WorkflowHeader.d.ts.map +1 -1
  209. package/dist/types/editors/workflow-studio/components/WorkflowSteps.d.ts.map +1 -1
  210. package/dist/types/editors/workflow-studio/components/WorkflowStudio.d.ts.map +1 -1
  211. package/dist/types/editors/workflow-studio/components/chain.d.ts +18 -0
  212. package/dist/types/editors/workflow-studio/components/chain.d.ts.map +1 -0
  213. package/dist/types/editors/workflow-studio/components/run-format.d.ts +29 -6
  214. package/dist/types/editors/workflow-studio/components/run-format.d.ts.map +1 -1
  215. package/dist/types/editors/workflow-studio/components/run-format.test.d.ts +2 -0
  216. package/dist/types/editors/workflow-studio/components/run-format.test.d.ts.map +1 -0
  217. package/dist/types/editors/workflow-studio/components/run-timeline.test.d.ts +2 -0
  218. package/dist/types/editors/workflow-studio/components/run-timeline.test.d.ts.map +1 -0
  219. package/dist/types/editors/workflow-studio/components/ui.d.ts +20 -0
  220. package/dist/types/editors/workflow-studio/components/ui.d.ts.map +1 -0
  221. package/dist/types/editors/workflow-studio/components/useRuns.d.ts +1 -1
  222. package/dist/types/editors/workflow-studio/components/useRuns.d.ts.map +1 -1
  223. package/dist/types/pieces/index.d.ts.map +1 -1
  224. package/dist/types/pieces/reactor/index.d.ts.map +1 -1
  225. package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
  226. package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts +12 -12
  227. package/dist/types/playwright.config.d.ts +3 -0
  228. package/dist/types/playwright.config.d.ts.map +1 -0
  229. package/dist/types/scripts/ui-shots.d.ts +2 -0
  230. package/dist/types/scripts/ui-shots.d.ts.map +1 -0
  231. package/dist/types/scripts/ui-stack.d.ts +77 -0
  232. package/dist/types/scripts/ui-stack.d.ts.map +1 -0
  233. package/dist/types/test/ui/connection-editor.spec.d.ts +2 -0
  234. package/dist/types/test/ui/connection-editor.spec.d.ts.map +1 -0
  235. package/dist/types/test/ui/data-viewer.spec.d.ts +2 -0
  236. package/dist/types/test/ui/data-viewer.spec.d.ts.map +1 -0
  237. package/dist/types/test/ui/fixtures.d.ts +9 -0
  238. package/dist/types/test/ui/fixtures.d.ts.map +1 -0
  239. package/dist/types/test/ui/global-setup.d.ts +2 -0
  240. package/dist/types/test/ui/global-setup.d.ts.map +1 -0
  241. package/dist/types/test/ui/pieces.spec.d.ts +2 -0
  242. package/dist/types/test/ui/pieces.spec.d.ts.map +1 -0
  243. package/dist/types/test/ui/step-panel.spec.d.ts +2 -0
  244. package/dist/types/test/ui/step-panel.spec.d.ts.map +1 -0
  245. package/dist/types/test/ui/studio.spec.d.ts +2 -0
  246. package/dist/types/test/ui/studio.spec.d.ts.map +1 -0
  247. package/dist/types/vitest.config.d.ts.map +1 -1
  248. package/package.json +18 -12
  249. package/dist/browser/PieceMarkdown-CZYNY1qQ.js.map +0 -1
  250. package/dist/browser/ap-layout-BpKqIHQt.js +0 -337
  251. package/dist/browser/ap-layout-BpKqIHQt.js.map +0 -1
  252. package/dist/browser/connection-form-B1SkwNgY.js +0 -453
  253. package/dist/browser/connection-form-B1SkwNgY.js.map +0 -1
  254. package/dist/browser/editor-CCKpl-Gd.js +0 -1550
  255. package/dist/browser/editor-CCKpl-Gd.js.map +0 -1
  256. package/dist/browser/editor-CIZRPdKM.js +0 -134
  257. package/dist/browser/editor-CIZRPdKM.js.map +0 -1
  258. package/dist/browser/editor-D0sdUxJa.js.map +0 -1
  259. package/dist/browser/runtime-api-DKlnn45K.js.map +0 -1
  260. package/dist/browser/status-kpDX5CIA.js +0 -11
  261. package/dist/browser/status-kpDX5CIA.js.map +0 -1
  262. package/dist/browser/upgrade-manifests-Cnpfo6kC.js +0 -8
  263. package/dist/browser/use-runtime-url-By5q3sa_.js +0 -174
  264. package/dist/browser/use-runtime-url-By5q3sa_.js.map +0 -1
  265. package/dist/node/PieceMarkdown-D9nI2gI2.mjs.map +0 -1
  266. package/dist/node/ap-layout-Dzhi9JFC.mjs +0 -337
  267. package/dist/node/ap-layout-Dzhi9JFC.mjs.map +0 -1
  268. package/dist/node/connection-form-DejaNF09.mjs +0 -453
  269. package/dist/node/connection-form-DejaNF09.mjs.map +0 -1
  270. package/dist/node/editor-DfFRZS9L.mjs +0 -134
  271. package/dist/node/editor-DfFRZS9L.mjs.map +0 -1
  272. package/dist/node/editor-NbAB78He.mjs +0 -1550
  273. package/dist/node/editor-NbAB78He.mjs.map +0 -1
  274. package/dist/node/editor-sVzt1o51.mjs.map +0 -1
  275. package/dist/node/runtime-api-CtvvFHut.mjs.map +0 -1
  276. package/dist/node/status-CDRcDUMS.mjs +0 -11
  277. package/dist/node/status-CDRcDUMS.mjs.map +0 -1
  278. package/dist/node/upgrade-manifests-3VN0Bfcf.mjs +0 -8
  279. package/dist/node/use-runtime-url-BbFEkaZy.mjs +0 -174
  280. package/dist/node/use-runtime-url-BbFEkaZy.mjs.map +0 -1
  281. package/dist/types/document-models/connection/v1/tests/config.test.d.ts +0 -2
  282. package/dist/types/document-models/connection/v1/tests/config.test.d.ts.map +0 -1
  283. package/dist/types/document-models/connection/v1/tests/connection.test.d.ts +0 -2
  284. package/dist/types/document-models/connection/v1/tests/connection.test.d.ts.map +0 -1
  285. package/dist/types/document-models/connection/v1/tests/health.test.d.ts +0 -2
  286. package/dist/types/document-models/connection/v1/tests/health.test.d.ts.map +0 -1
  287. package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts +0 -2
  288. package/dist/types/document-models/workflow/v1/tests/edges.test.d.ts.map +0 -1
  289. package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts +0 -2
  290. package/dist/types/document-models/workflow/v1/tests/policy.test.d.ts.map +0 -1
  291. package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts +0 -2
  292. package/dist/types/document-models/workflow/v1/tests/runtime.test.d.ts.map +0 -1
  293. package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts +0 -2
  294. package/dist/types/document-models/workflow/v1/tests/steps.test.d.ts.map +0 -1
  295. package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts +0 -2
  296. package/dist/types/document-models/workflow/v1/tests/trigger.test.d.ts.map +0 -1
  297. package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts +0 -2
  298. package/dist/types/document-models/workflow/v1/tests/variables.test.d.ts.map +0 -1
  299. package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts +0 -2
  300. package/dist/types/document-models/workflow/v1/tests/workflow.test.d.ts.map +0 -1
  301. package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts +0 -7
  302. package/dist/types/editors/workflow-studio/components/ConnectionView.d.ts.map +0 -1
  303. package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts +0 -8
  304. package/dist/types/editors/workflow-studio/components/EditorToolbar.d.ts.map +0 -1
  305. package/dist/types/editors/workflow-studio/components/connection-usage.d.ts.map +0 -1
  306. package/dist/types/editors/workflow-studio/components/connection-usage.test.d.ts.map +0 -1
  307. /package/dist/types/editors/{workflow-studio/components → connection-editor}/connection-usage.d.ts +0 -0
  308. /package/dist/types/editors/{workflow-studio/components → connection-editor}/connection-usage.test.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"editor-fjwq-8Yq.js","names":["RING","RAIL","WORKFLOW_TYPE","WORKFLOW_TYPE","workflow","workflowActions"],"sources":["../../editors/workflow-studio/components/chain.tsx","../../editors/workflow-studio/components/ui.tsx","../../editors/workflow-studio/components/RunsTable.tsx","../../editors/workflow-studio/components/RunsView.tsx","../../editors/workflow-studio/components/Sidebar.tsx","../../editors/workflow-studio/components/use-hash-selection.ts","../../editors/workflow-studio/components/useRuns.ts","../../editors/workflow-studio/components/step-outline.ts","../../editors/workflow-studio/components/WorkflowBoard.tsx","../../editors/workflow-studio/components/WorkflowSteps.tsx","../../editors/workflow-studio/components/WorkflowHeader.tsx","../../editors/workflow-studio/components/WorkflowStudio.tsx","../../editors/workflow-studio/config.ts","../../editors/workflow-studio/editor.tsx"],"sourcesContent":["// A workflow drawn as its chain of piece logos joined by a rail coloured by a\n// run: the studio's signature, used by the overview, the header and each run.\nimport type { RunRecord } from \"../../workflow-editor/runtime-api.js\";\nimport { BlockLogo } from \"../../workflow-editor/ui/BlockSelector.js\";\nimport {\n formatAbsolute,\n RUN_TONE,\n STEP_TONE,\n statusLabel,\n toneOf,\n type Tone,\n} from \"./run-format.js\";\n\nexport interface ChainLink {\n id: string;\n blockType: string;\n label: string;\n // How the run fared here; undefined when it never got this far.\n status?: string;\n}\n\nconst RING: Record<Tone, string> = {\n ok: \"ring-wf-ok\",\n fail: \"ring-wf-fail\",\n warn: \"ring-wf-warn\",\n run: \"ring-wf-run\",\n idle: \"ring-foreground/15\",\n};\n\nconst RAIL: Record<Tone, string> = {\n ok: \"bg-wf-ok\",\n fail: \"bg-wf-fail\",\n warn: \"bg-wf-warn\",\n run: \"bg-wf-run\",\n idle: \"bg-foreground/15\",\n};\n\n// Past this many stops the chain ends in \"+N\", so a long workflow can't spill\n// into the next column; the label still names every step.\nconst MAX_STOPS = 6;\n\nexport function MiniChain(props: { links: ChainLink[]; size?: \"sm\" | \"md\" }) {\n const md = props.size === \"md\";\n const overflow = props.links.length > MAX_STOPS;\n const shown = overflow ? props.links.slice(0, MAX_STOPS - 1) : props.links;\n const hidden = props.links.length - shown.length;\n const tones = shown.map((link) =>\n link.status ? toneOf(STEP_TONE, link.status) : \"idle\",\n );\n return (\n <ol\n className=\"flex items-center\"\n aria-label={props.links\n .map(\n (link) =>\n `${link.label}${link.status ? `: ${link.status.toLowerCase()}` : \"\"}`,\n )\n .join(\", \")}\n >\n {shown.map((link, index) => (\n <li key={link.id} className=\"flex items-center\">\n {index > 0 ? (\n <span\n aria-hidden\n className={`h-0.5 ${md ? \"w-5\" : \"w-3\"} ${RAIL[tones[index]]}`}\n />\n ) : null}\n <span\n title={\n link.status\n ? `${link.label}: ${link.status.toLowerCase()}`\n : link.label\n }\n className={`flex shrink-0 items-center justify-center rounded-full bg-card ring-[1.5px] dark:bg-white ${\n md ? \"h-8 w-8\" : \"h-6 w-6\"\n } ${RING[tones[index]]} ${link.status === \"SKIPPED\" ? \"opacity-50\" : \"\"}`}\n >\n <BlockLogo bare blockType={link.blockType} size={md ? 16 : 14} />\n </span>\n </li>\n ))}\n {overflow ? (\n <li aria-hidden className=\"flex items-center\">\n <span className={`h-0.5 ${md ? \"w-5\" : \"w-3\"} bg-foreground/15`} />\n <span\n title={props.links\n .slice(shown.length)\n .map((link) => link.label)\n .join(\", \")}\n className={`flex shrink-0 items-center justify-center rounded-full bg-muted px-1.5 text-[11px] font-medium tabular-nums text-muted-foreground ${\n md ? \"h-8\" : \"h-6\"\n }`}\n >\n +{hidden}\n </span>\n </li>\n ) : null}\n </ol>\n );\n}\n\n/** A run's own chain: the trigger, then every step it recorded. */\nexport function runLinks(\n run: RunRecord,\n triggerBlockType?: string,\n): ChainLink[] {\n return [\n {\n id: \"trigger\",\n blockType: triggerBlockType ?? `core#${run.triggerKind}`,\n label: \"Trigger\",\n status: \"SUCCEEDED\",\n },\n ...run.steps.map((step) => ({\n id: step.stepId + step.stepKey,\n blockType: step.blockType,\n label: step.stepKey,\n status: step.status,\n })),\n ];\n}\n\nconst STRIP_LENGTH = 14;\n\nconst TICK: Record<Tone, string> = {\n ok: \"bg-wf-ok\",\n fail: \"bg-wf-fail\",\n warn: \"bg-wf-warn\",\n run: \"bg-wf-run animate-pulse\",\n idle: \"bg-foreground/25\",\n};\n\n/** Recent runs as ticks, oldest to newest, padded so strips line up. */\nexport function RunStrip(props: { runs: RunRecord[] }) {\n // Runs arrive newest first.\n const recent = props.runs.slice(0, STRIP_LENGTH).reverse();\n const padding = STRIP_LENGTH - recent.length;\n return (\n <span\n className=\"flex h-5 items-end gap-[3px]\"\n aria-label={\n recent.length === 0\n ? \"No runs yet\"\n : `Last ${recent.length} runs: ${recent.map((run) => run.status.toLowerCase()).join(\", \")}`\n }\n >\n {Array.from({ length: padding }, (_, index) => (\n <span\n key={`pad-${index}`}\n aria-hidden\n className=\"h-1.5 w-1.5 rounded-full bg-foreground/10\"\n />\n ))}\n {recent.map((run) => (\n <span\n key={run.id}\n aria-hidden\n title={`${statusLabel(run.status)}, ${formatAbsolute(run.startedAt)}`}\n className={`h-5 w-1.5 rounded-full ${TICK[toneOf(RUN_TONE, run.status)]}`}\n />\n ))}\n </span>\n );\n}\n","// Studio building blocks, drawn from Connect's theme tokens so both themes work.\nimport type { ReactNode } from \"react\";\nexport { Button } from \"../../shared/controls.js\";\nexport { Icon } from \"../../shared/icons.js\";\nimport { statusLabel, TONE_DOT, TONE_TEXT, type Tone } from \"./run-format.js\";\n\n// A draft or unknown state is hollow, so it never reads as healthy.\nexport function StatusDot(props: { tone: Tone; className?: string }) {\n const hollow = props.tone === \"idle\";\n return (\n <span\n aria-hidden\n className={`inline-block h-2 w-2 shrink-0 rounded-full ${\n hollow\n ? \"border border-solid border-muted-foreground/60\"\n : TONE_DOT[props.tone]\n } ${props.className ?? \"\"}`}\n />\n );\n}\n\nexport function StatusText(props: {\n tone: Tone;\n status: string;\n className?: string;\n}) {\n return (\n <span\n className={`inline-flex items-center gap-1.5 font-medium ${TONE_TEXT[props.tone]} ${props.className ?? \"\"}`}\n >\n <StatusDot tone={props.tone} />\n {statusLabel(props.status)}\n </span>\n );\n}\n\n/** A label/value pair for a header's facts line. */\nexport function Fact(props: {\n label: string;\n children: ReactNode;\n title?: string;\n}) {\n return (\n <div className=\"flex min-w-0 flex-col gap-0.5\" title={props.title}>\n <dt className=\"text-xs text-muted-foreground\">{props.label}</dt>\n <dd className=\"truncate text-[13px] tabular-nums text-foreground\">\n {props.children}\n </dd>\n </div>\n );\n}\n","// The run journal as a filterable table. Rows expand in place to their step\n// executions, so drilling into a failure never leaves the list.\nimport { Fragment, useMemo, useState } from \"react\";\nimport {\n rerunRun,\n type RunRecord,\n type RunStepRecord,\n} from \"../../workflow-editor/runtime-api.js\";\nimport {\n blockMeta,\n usePieceLogos,\n} from \"../../workflow-editor/ui/block-meta.js\";\nimport { describeTrigger } from \"../../workflow-editor/ui/trigger-text.js\";\nimport {\n formatAbsolute,\n formatDuration,\n formatMs,\n formatTrigger,\n formatWhen,\n durationMs,\n RUN_STATUSES,\n RUN_TONE,\n runTimeline,\n STEP_TONE,\n statusLabel,\n toneOf,\n TONE_DOT,\n type TimelineSpan,\n type Tone,\n} from \"./run-format.js\";\nimport { useWorkflowDocumentsInSelectedDrive } from \"document-models/workflow\";\nimport { MiniChain, runLinks } from \"./chain.js\";\nimport { Select } from \"../../shared/controls.js\";\nimport { DataViewer } from \"../../shared/data-viewer.js\";\nimport { Button, Icon, StatusText } from \"./ui.js\";\n\ntype StatusFilter = \"ALL\" | (typeof RUN_STATUSES)[number];\ntype SortKey = \"startedAt\" | \"duration\";\n\nconst CONTROL =\n \"h-8 rounded-md border border-solid border-border bg-card px-2.5 text-[13px] text-foreground placeholder:text-muted-foreground focus:outline-none focus-visible:ring-2 focus-visible:ring-ring\";\n\nfunction stringify(value: unknown): string {\n if (value === undefined) return \"\";\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value as string);\n }\n}\n\n// The step's slice of the run, drawn on a track shared by every row.\nfunction TimelineBar(props: { span?: TimelineSpan; tone: Tone }) {\n return (\n <span className=\"ml-auto flex shrink-0 items-center gap-2\">\n <span\n aria-hidden\n className=\"relative hidden h-1.5 w-40 overflow-hidden rounded-full bg-muted sm:block\"\n >\n {props.span ? (\n <span\n className={`absolute inset-y-0 rounded-full ${TONE_DOT[props.tone]}`}\n style={{\n left: `${props.span.offset * 100}%`,\n width: `max(${props.span.width * 100}%, 4px)`,\n }}\n />\n ) : null}\n </span>\n <span className=\"w-14 text-right text-[11px] tabular-nums text-muted-foreground\">\n {props.span ? formatMs(props.span.ms) : \"–\"}\n </span>\n </span>\n );\n}\n\nfunction StepRow(props: {\n step: RunStepRecord;\n name?: string;\n span?: TimelineSpan;\n}) {\n const { step } = props;\n const meta = blockMeta(step.blockType);\n const [open, setOpen] = useState(false);\n return (\n <div role=\"listitem\" className=\"border-t border-solid border-border\">\n <button\n type=\"button\"\n aria-expanded={open}\n className=\"flex w-full items-center gap-3 px-3 py-2 text-left text-[13px] hover:bg-accent/60 focus-visible:bg-accent/60 focus-visible:outline-none\"\n onClick={() => setOpen((value) => !value)}\n >\n <Icon\n name=\"chevron\"\n className={`h-3.5 w-3.5 text-muted-foreground transition-transform ${open ? \"rotate-90\" : \"\"}`}\n />\n <StatusText\n tone={toneOf(STEP_TONE, step.status)}\n status={step.status}\n className=\"w-24 shrink-0 text-xs\"\n />\n <span\n className=\"shrink-0 font-medium text-foreground\"\n title={`Key: ${step.stepKey}`}\n >\n {props.name ?? step.stepKey}\n </span>\n <span className=\"flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground\">\n {meta.logoUrl ? (\n <img\n src={meta.logoUrl}\n alt=\"\"\n title={meta.subtitle}\n className=\"h-3.5 w-3.5\"\n />\n ) : null}\n <span className=\"truncate\">\n {meta.logoUrl\n ? meta.displayName\n : `${meta.subtitle}: ${meta.displayName}`}\n </span>\n </span>\n {step.port && step.port !== \"next\" ? (\n <span className=\"shrink-0 rounded bg-muted px-1.5 text-[11px] text-muted-foreground\">\n took {step.port}\n </span>\n ) : null}\n <TimelineBar span={props.span} tone={toneOf(STEP_TONE, step.status)} />\n </button>\n {open ? (\n <div className=\"space-y-2 pb-3 pl-10 pr-3\">\n {step.error ? (\n <pre className=\"overflow-x-auto whitespace-pre-wrap rounded-md bg-wf-fail/10 p-2 text-xs text-wf-fail\">\n {step.error}\n </pre>\n ) : null}\n {step.status === \"SKIPPED\" ? (\n <p className=\"text-xs text-muted-foreground\">\n The run never reached this step.\n </p>\n ) : (\n <div className=\"grid items-start gap-2 md:grid-cols-2\">\n <DataViewer label=\"Received\" value={step.input} />\n <DataViewer\n label=\"Produced\"\n value={step.output}\n root={`steps.${step.stepKey}.output`}\n emptyText={\n step.status === \"FAILED\"\n ? \"Nothing, the step failed\"\n : undefined\n }\n />\n </div>\n )}\n </div>\n ) : null}\n </div>\n );\n}\n\nexport const TRIGGER_LABEL: Record<string, string> = {\n manual: \"Manual\",\n schedule: \"Schedule\",\n webhook: \"Webhook\",\n \"document-event\": \"Document change\",\n piece: \"Piece trigger\",\n rerun: \"Rerun\",\n};\n\nexport function triggerLabel(kind: string): string {\n // A piece run records \"piece:<blockType>\"; name it as the workflow list does.\n if (kind.startsWith(\"piece:\")) {\n return describeTrigger({ blockType: kind.slice(6), config: null });\n }\n return TRIGGER_LABEL[kind] ?? formatTrigger(kind);\n}\n\n// \"Step \\\"ping\\\" failed: …\" reads better with the step's own name.\nfunction describeRunError(error: string, names: Map<string, string>): string {\n return error.replace(/^Step \"([^\"]+)\" failed: /, (whole, key: string) => {\n const name = names.get(key);\n return name ? `${name} failed: ` : whole;\n });\n}\n\n// What started the run, drawn as the first row of its step list.\nfunction TriggerRow(props: { run: RunRecord }) {\n const { run } = props;\n const [open, setOpen] = useState(false);\n const payload = stringify(run.triggerPayload);\n const hasPayload = payload !== \"\" && payload !== \"null\" && payload !== \"{}\";\n return (\n <div role=\"listitem\">\n <button\n type=\"button\"\n aria-expanded={hasPayload ? open : undefined}\n disabled={!hasPayload}\n className=\"flex w-full items-center gap-3 px-3 py-2 text-left text-[13px] enabled:hover:bg-accent/60 focus-visible:bg-accent/60 focus-visible:outline-none\"\n onClick={() => setOpen((value) => !value)}\n >\n <Icon\n name=\"chevron\"\n className={`h-3.5 w-3.5 text-muted-foreground transition-transform ${open ? \"rotate-90\" : \"\"} ${hasPayload ? \"\" : \"invisible\"}`}\n />\n <StatusText\n tone=\"ok\"\n status=\"FIRED\"\n className=\"w-24 shrink-0 text-xs\"\n />\n <span className=\"shrink-0 font-medium text-foreground\">Trigger</span>\n <span className=\"truncate text-xs text-muted-foreground\">\n {triggerLabel(run.triggerKind)}\n </span>\n {!hasPayload ? (\n <span className=\"shrink-0 text-[11px] text-muted-foreground\">\n No payload\n </span>\n ) : null}\n <span className=\"ml-auto flex shrink-0 items-center gap-2\">\n <span aria-hidden className=\"relative hidden h-1.5 w-40 sm:block\">\n <span className=\"absolute inset-y-0 left-0 w-1 rounded-full bg-wf-ok\" />\n </span>\n <span className=\"w-14 text-right text-[11px] tabular-nums text-muted-foreground\">\n {new Date(run.startedAt).toLocaleTimeString([], {\n hour: \"2-digit\",\n minute: \"2-digit\",\n second: \"2-digit\",\n hour12: false,\n })}\n </span>\n </span>\n </button>\n {open ? (\n <div className=\"pb-3 pl-10 pr-3\">\n <DataViewer\n label=\"Payload\"\n value={run.triggerPayload}\n root=\"trigger.payload\"\n />\n </div>\n ) : null}\n </div>\n );\n}\n\nfunction RunDetail(props: {\n run: RunRecord;\n names: Map<string, string>;\n onChanged: () => void;\n}) {\n const { run, names } = props;\n const timeline = runTimeline(run);\n const [rerunning, setRerunning] = useState(false);\n const [rerunError, setRerunError] = useState<string | null>(null);\n return (\n <div className=\"space-y-3 bg-muted/40 px-4 py-4\">\n {run.error ? (\n <p className=\"rounded-md bg-wf-fail/10 px-3 py-2 text-[13px] text-wf-fail\">\n {describeRunError(run.error, names)}\n </p>\n ) : null}\n <div className=\"flex flex-wrap items-center gap-x-5 gap-y-1 text-xs text-muted-foreground\">\n <span>\n Run <span className=\"font-mono\">{run.id.slice(0, 8)}</span>\n </span>\n <span>Started {formatAbsolute(run.startedAt)}</span>\n {run.rerunOf ? (\n <span>\n Resumes <span className=\"font-mono\">{run.rerunOf.slice(0, 8)}</span>\n </span>\n ) : null}\n {run.status === \"FAILED\" ? (\n <Button\n className=\"ml-auto\"\n disabled={rerunning}\n onClick={() => {\n setRerunning(true);\n setRerunError(null);\n rerunRun(run.id)\n .then((result) => setRerunError(result.error))\n .catch((error: unknown) =>\n setRerunError(\n error instanceof Error ? error.message : String(error),\n ),\n )\n .finally(() => {\n setRerunning(false);\n props.onChanged();\n });\n }}\n >\n <Icon name=\"retry\" className=\"h-3.5 w-3.5\" />\n {rerunning ? \"Rerunning…\" : \"Rerun from failed step\"}\n </Button>\n ) : null}\n {rerunError ? <span className=\"text-wf-fail\">{rerunError}</span> : null}\n </div>\n <div\n role=\"list\"\n aria-label=\"Steps of this run\"\n className=\"overflow-hidden rounded-md border border-solid border-border bg-card\"\n >\n <TriggerRow run={run} />\n {run.steps.map((step) => (\n <StepRow\n key={step.stepId + step.stepKey}\n step={step}\n name={names.get(step.stepKey)}\n span={timeline.get(step.stepId)}\n />\n ))}\n {run.steps.length === 0 ? (\n <p className=\"border-t border-solid border-border px-3 py-2 pl-10 text-xs text-muted-foreground\">\n No steps ran.\n </p>\n ) : null}\n </div>\n </div>\n );\n}\n\nfunction SortHeader(props: {\n label: string;\n active: boolean;\n descending: boolean;\n onClick: () => void;\n className?: string;\n}) {\n return (\n <th scope=\"col\" className={props.className}>\n <button\n type=\"button\"\n className={`flex items-center gap-1 hover:text-foreground ${props.active ? \"text-foreground\" : \"\"}`}\n onClick={props.onClick}\n >\n {props.label}\n <span aria-hidden className={props.active ? \"\" : \"opacity-0\"}>\n {props.descending ? \"↓\" : \"↑\"}\n </span>\n </button>\n </th>\n );\n}\n\nexport function RunsTable(props: {\n runs: RunRecord[];\n showWorkflow: boolean;\n onChanged: () => void;\n}) {\n const [query, setQuery] = useState(\"\");\n const [status, setStatus] = useState<StatusFilter>(\"ALL\");\n const [workflow, setWorkflow] = useState(\"ALL\");\n const [trigger, setTrigger] = useState(\"ALL\");\n const [sort, setSort] = useState<SortKey>(\"startedAt\");\n const [descending, setDescending] = useState(true);\n const [expanded, setExpanded] = useState<string | null>(null);\n // Each run's chain starts at its workflow's trigger block.\n const documents = useWorkflowDocumentsInSelectedDrive() ?? [];\n const triggerBlock = new Map(\n documents.map((document) => [\n document.header.id,\n document.state.global.trigger?.blockType,\n ]),\n );\n // Step names by key, per workflow; a run of an older version falls back\n // to the keys it recorded.\n const stepNames = new Map(\n documents.map((document) => [\n document.header.id,\n new Map(\n document.state.global.steps.map((step) => [\n step.key,\n step.name || step.key,\n ]),\n ),\n ]),\n );\n // Piece logos and names arrive with the catalog.\n usePieceLogos();\n\n const workflowOptions = useMemo(\n () =>\n [...new Map(props.runs.map((run) => [run.workflowId, run.workflowName]))]\n .map(([id, name]) => ({ id, name }))\n .sort((a, b) => a.name.localeCompare(b.name)),\n [props.runs],\n );\n const triggerOptions = useMemo(\n () => [...new Set(props.runs.map((run) => run.triggerKind))].sort(),\n [props.runs],\n );\n\n // Everything except the status filter, so the status counts describe what\n // picking each one would actually show.\n const scoped = useMemo(() => {\n const needle = query.trim().toLowerCase();\n return props.runs.filter((run) => {\n if (workflow !== \"ALL\" && run.workflowId !== workflow) return false;\n if (trigger !== \"ALL\" && run.triggerKind !== trigger) return false;\n if (!needle) return true;\n return (\n run.workflowName.toLowerCase().includes(needle) ||\n run.id.toLowerCase().includes(needle) ||\n (run.error?.toLowerCase().includes(needle) ?? false) ||\n run.steps.some((step) => step.stepKey.toLowerCase().includes(needle))\n );\n });\n }, [props.runs, query, workflow, trigger]);\n\n const counts = useMemo(\n () => ({\n ALL: scoped.length,\n RUNNING: scoped.filter((run) => run.status === \"RUNNING\").length,\n SUCCEEDED: scoped.filter((run) => run.status === \"SUCCEEDED\").length,\n FAILED: scoped.filter((run) => run.status === \"FAILED\").length,\n }),\n [scoped],\n );\n\n const visible = useMemo(() => {\n const rows = scoped.filter(\n (run) => status === \"ALL\" || run.status === status,\n );\n const direction = descending ? -1 : 1;\n return [...rows].sort((a, b) => {\n if (sort === \"duration\") {\n // An unfinished run has no duration yet; keep those together.\n const left = durationMs(a.startedAt, a.endedAt) ?? Infinity;\n const right = durationMs(b.startedAt, b.endedAt) ?? Infinity;\n return (left - right) * direction;\n }\n return (\n (new Date(a.startedAt).getTime() - new Date(b.startedAt).getTime()) *\n direction\n );\n });\n }, [scoped, status, sort, descending]);\n\n const filtered = query.trim() || workflow !== \"ALL\" || trigger !== \"ALL\";\n const sortBy = (key: SortKey) => {\n if (key === sort) {\n setDescending((value) => !value);\n return;\n }\n setSort(key);\n setDescending(true);\n };\n\n return (\n <div>\n <div className=\"mb-3 flex flex-wrap items-center gap-2\">\n <div className=\"flex h-8 items-center gap-0.5 rounded-md bg-muted p-0.5\">\n {([\"ALL\", ...RUN_STATUSES] as StatusFilter[]).map((option) => (\n <button\n key={option}\n type=\"button\"\n aria-pressed={status === option}\n className={`h-7 rounded px-2.5 text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${\n status === option\n ? \"bg-card font-medium text-foreground shadow-sm\"\n : \"text-muted-foreground hover:text-foreground\"\n }`}\n onClick={() => setStatus(option)}\n >\n {option === \"ALL\" ? \"All\" : statusLabel(option)}\n <span className=\"ml-1.5 tabular-nums text-muted-foreground\">\n {counts[option]}\n </span>\n </button>\n ))}\n </div>\n <input\n type=\"search\"\n className={`${CONTROL} w-48`}\n placeholder=\"Search runs\"\n value={query}\n onChange={(event) => setQuery(event.target.value)}\n />\n {props.showWorkflow && workflowOptions.length > 1 ? (\n <div className=\"w-44\">\n <Select\n value={workflow}\n options={[\n { value: \"ALL\", label: \"Every workflow\" },\n ...workflowOptions.map((option) => ({\n value: option.id,\n label: option.name,\n })),\n ]}\n onChange={setWorkflow}\n />\n </div>\n ) : null}\n {triggerOptions.length > 1 ? (\n <div className=\"w-40\">\n <Select\n value={trigger}\n options={[\n { value: \"ALL\", label: \"Every trigger\" },\n ...triggerOptions.map((option) => ({\n value: option,\n label: triggerLabel(option),\n })),\n ]}\n onChange={setTrigger}\n />\n </div>\n ) : null}\n {filtered ? (\n <button\n type=\"button\"\n className=\"text-[13px] text-muted-foreground underline underline-offset-2 hover:text-foreground\"\n onClick={() => {\n setQuery(\"\");\n setWorkflow(\"ALL\");\n setTrigger(\"ALL\");\n }}\n >\n Clear filters\n </button>\n ) : null}\n <span className=\"ml-auto text-xs tabular-nums text-muted-foreground\">\n {visible.length} of {props.runs.length} runs\n </span>\n </div>\n\n <div className=\"overflow-x-auto rounded-lg border border-solid border-border bg-card\">\n <table className=\"w-full border-collapse text-left\">\n <thead>\n <tr className=\"border-b border-solid border-border text-xs font-medium text-muted-foreground\">\n <th scope=\"col\" className=\"px-3 py-2.5 font-medium\">\n Status\n </th>\n {props.showWorkflow ? (\n <th scope=\"col\" className=\"px-3 py-2.5 font-medium\">\n Workflow\n </th>\n ) : null}\n <th scope=\"col\" className=\"px-3 py-2.5 font-medium\">\n Trigger\n </th>\n <SortHeader\n label=\"Started\"\n className=\"px-3 py-2.5 font-medium\"\n active={sort === \"startedAt\"}\n descending={descending}\n onClick={() => sortBy(\"startedAt\")}\n />\n <SortHeader\n label=\"Duration\"\n className=\"px-3 py-2.5 font-medium\"\n active={sort === \"duration\"}\n descending={descending}\n onClick={() => sortBy(\"duration\")}\n />\n <th scope=\"col\" className=\"px-3 py-2.5 font-medium\">\n Steps\n </th>\n <th scope=\"col\" className=\"w-8 px-3 py-2\">\n <span className=\"sr-only\">Details</span>\n </th>\n </tr>\n </thead>\n <tbody>\n {visible.length === 0 ? (\n <tr>\n <td\n colSpan={props.showWorkflow ? 7 : 6}\n className=\"px-3 py-8 text-center text-[13px] text-muted-foreground\"\n >\n No runs match these filters.\n </td>\n </tr>\n ) : (\n visible.map((run) => {\n const open = expanded === run.id;\n return (\n <Fragment key={run.id}>\n <tr\n className={`cursor-pointer border-b border-solid border-border text-[13px] last:border-b-0 ${\n open ? \"bg-muted/40\" : \"hover:bg-accent/60\"\n }`}\n onClick={() => setExpanded(open ? null : run.id)}\n >\n <td className=\"px-3 py-2.5\">\n <StatusText\n tone={toneOf(RUN_TONE, run.status)}\n status={run.status}\n />\n </td>\n {props.showWorkflow ? (\n <td className=\"max-w-48 truncate px-3 py-2.5 font-medium text-foreground\">\n {run.workflowName}\n </td>\n ) : null}\n <td className=\"px-3 py-2.5 text-muted-foreground\">\n {triggerLabel(run.triggerKind)}\n <span className=\"ml-1.5 text-xs text-muted-foreground/70\">\n v{run.workflowVersion}\n </span>\n </td>\n <td\n className=\"whitespace-nowrap px-3 py-2.5 tabular-nums text-muted-foreground\"\n title={formatAbsolute(run.startedAt)}\n >\n {formatWhen(run.startedAt)}\n </td>\n <td className=\"whitespace-nowrap px-3 py-2.5 tabular-nums text-muted-foreground\">\n {formatDuration(run.startedAt, run.endedAt)}\n </td>\n <td className=\"px-3 py-2\">\n <MiniChain\n links={runLinks(\n run,\n triggerBlock.get(run.workflowId),\n )}\n />\n </td>\n <td className=\"px-3 py-2.5\">\n <button\n type=\"button\"\n aria-expanded={open}\n aria-label={`${open ? \"Hide\" : \"Show\"} steps of the run started ${formatAbsolute(run.startedAt)}`}\n className=\"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring\"\n onClick={(event) => {\n event.stopPropagation();\n setExpanded(open ? null : run.id);\n }}\n >\n <Icon\n name=\"chevron\"\n className={`h-3.5 w-3.5 transition-transform ${open ? \"rotate-90\" : \"\"}`}\n />\n </button>\n </td>\n </tr>\n {open ? (\n <tr>\n <td\n colSpan={props.showWorkflow ? 7 : 6}\n className=\"border-b border-solid border-border p-0\"\n >\n <RunDetail\n run={run}\n names={stepNames.get(run.workflowId) ?? new Map()}\n onChanged={props.onChanged}\n />\n </td>\n </tr>\n ) : null}\n </Fragment>\n );\n })\n )}\n </tbody>\n </table>\n </div>\n </div>\n );\n}\n","// The runs pane: what scope is being shown, how to fire it, and the journal.\n// The run feed is owned by the studio so the header shares these rows.\nimport { useState } from \"react\";\nimport type { RunRecord } from \"../../workflow-editor/runtime-api.js\";\nimport { RunsTable } from \"./RunsTable.js\";\nimport { Button, Icon } from \"./ui.js\";\n\nexport function RunsView(props: {\n title: string;\n runs: RunRecord[] | null;\n error: string | null;\n reload: () => void;\n showWorkflow: boolean;\n // Present only for manual-trigger workflows.\n onFire?: () => Promise<string | null>;\n}) {\n const [firing, setFiring] = useState(false);\n const [fireError, setFireError] = useState<string | null>(null);\n const { runs } = props;\n\n return (\n <div className=\"w-full\">\n <div className=\"mb-4 flex items-center gap-3\">\n <h2 className=\"text-[15px] font-semibold text-foreground\">\n {props.title}\n </h2>\n <span className=\"grow\" />\n {props.onFire ? (\n <Button\n variant=\"primary\"\n disabled={firing}\n onClick={() => {\n setFiring(true);\n setFireError(null);\n props.onFire!()\n .then((fireResultError) => setFireError(fireResultError))\n .catch((fireCallError: unknown) =>\n setFireError(\n fireCallError instanceof Error\n ? fireCallError.message\n : String(fireCallError),\n ),\n )\n .finally(() => {\n setFiring(false);\n props.reload();\n });\n }}\n >\n <Icon name=\"play\" className=\"h-3.5 w-3.5\" />\n {firing ? \"Running…\" : \"Run now\"}\n </Button>\n ) : null}\n </div>\n {fireError ? (\n <p className=\"mb-3 rounded-md bg-wf-fail/10 px-3 py-2 text-[13px] text-wf-fail\">\n {fireError}\n </p>\n ) : null}\n {props.error ? (\n <p className=\"rounded-md bg-wf-warn/10 px-3 py-2 text-[13px] text-wf-warn\">\n Runs can't be listed because the workflow runtime is unreachable.\n <span className=\"mt-0.5 block text-xs opacity-80\">{props.error}</span>\n </p>\n ) : runs === null ? (\n <p className=\"text-[13px] text-muted-foreground\">Loading runs…</p>\n ) : runs.length === 0 ? (\n <div className=\"rounded-lg border border-dashed border-border px-4 py-10 text-center\">\n <p className=\"text-[13px] font-medium text-foreground\">No runs yet</p>\n <p className=\"mt-1 text-xs text-muted-foreground\">\n {props.onFire\n ? \"Use Run now to record the first one.\"\n : \"Runs appear here once the trigger fires.\"}\n </p>\n </div>\n ) : (\n <RunsTable\n runs={runs}\n showWorkflow={props.showWorkflow}\n onChanged={props.reload}\n />\n )}\n </div>\n );\n}\n","// Studio navigation: the drive-wide journal, then the drive's workflows and\n// connections. Each row carries its document's status as a dot.\nimport {\n showDeleteNodeModal,\n useDocumentSafe,\n} from \"@powerhousedao/reactor-browser\";\nimport type { FileNode } from \"@powerhousedao/shared/document-drive\";\nimport { useEffect, type ReactNode } from \"react\";\nimport { errorMessage } from \"../../shared/DocumentErrorBoundary.js\";\nimport { CONNECTION_TONE, toneOf, workflowHealth } from \"./run-format.js\";\nimport { Icon, StatusDot } from \"./ui.js\";\n\nconst WORKFLOW_TYPE = \"powerhouse/workflow\";\n\n// The drive node name goes stale after renames; the document state is the\n// source of truth for both workflow and connection names.\nfunction documentName(document: unknown, fallback: string): string {\n const state = (document as { state?: { global?: { name?: string } } } | null)\n ?.state?.global;\n return state?.name || fallback || \"(unnamed)\";\n}\n\nfunction documentStatus(document: unknown): string | undefined {\n const state = (\n document as { state?: { global?: { status?: string } } } | null\n )?.state?.global;\n return state?.status;\n}\n\nfunction Row(props: {\n active: boolean;\n onClick: () => void;\n children: ReactNode;\n trailing?: ReactNode;\n}) {\n return (\n <div\n className={`group mx-2 flex items-center rounded-md ${\n props.active ? \"bg-accent\" : \"hover:bg-accent/60\"\n }`}\n >\n <button\n type=\"button\"\n aria-current={props.active ? \"true\" : undefined}\n className={`flex min-w-0 grow items-center gap-2.5 rounded-md px-2 py-1.5 text-left text-[13px] focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring ${\n props.active ? \"font-medium text-foreground\" : \"text-foreground/80\"\n }`}\n onClick={props.onClick}\n >\n {props.children}\n </button>\n {props.trailing}\n </div>\n );\n}\n\nconst ROW_ACTION =\n \"flex h-6 w-6 shrink-0 items-center justify-center rounded text-muted-foreground opacity-0 hover:bg-background hover:text-foreground focus-visible:opacity-100 group-hover:opacity-100\";\n\nconst DELETE_ACTION = `${ROW_ACTION} hover:text-wf-fail`;\n\nfunction DeleteButton(props: { node: FileNode; label: string }) {\n return (\n <button\n type=\"button\"\n title=\"Delete\"\n aria-label={`Delete ${props.label}`}\n className={DELETE_ACTION}\n onClick={() => showDeleteNodeModal(props.node)}\n >\n <Icon name=\"trash\" className=\"h-3.5 w-3.5\" />\n </button>\n );\n}\n\n// A node can outlive its document (deleted, or unreadable history), so one\n// broken node degrades to its drive name plus a warning marker.\nfunction NodeRow(props: {\n node: FileNode;\n lastRunStatus?: string;\n active: boolean;\n onOpen: () => void;\n onEdit?: () => void;\n}) {\n const { node } = props;\n const { data: document, error } = useDocumentSafe(node.id);\n useEffect(() => {\n if (error !== undefined) {\n console.error(`Failed to load document ${node.id}:`, error);\n }\n }, [error, node.id]);\n\n if (error !== undefined) {\n return (\n <Row\n active={props.active}\n onClick={props.onOpen}\n trailing={\n <span className=\"mr-1.5 flex shrink-0 items-center\">\n <DeleteButton node={node} label={node.name || node.id} />\n </span>\n }\n >\n <span\n className=\"shrink-0 text-xs text-wf-fail\"\n title={`Could not load ${node.id}: ${errorMessage(error)}`}\n aria-hidden\n >\n ⚠\n </span>\n <span className=\"min-w-0 truncate text-wf-fail\">\n {node.name || \"(unnamed)\"}\n </span>\n </Row>\n );\n }\n\n const status = documentStatus(document);\n const { tone, label } =\n node.documentType === WORKFLOW_TYPE\n ? workflowHealth(status, props.lastRunStatus)\n : { tone: toneOf(CONNECTION_TONE, status), label: status };\n return (\n <Row\n active={props.active}\n onClick={props.onOpen}\n trailing={\n <span className=\"mr-1.5 flex shrink-0 items-center\">\n {props.onEdit ? (\n <button\n type=\"button\"\n title=\"Open in editor\"\n aria-label={`Open ${documentName(document, node.name)} in the editor`}\n className={ROW_ACTION}\n onClick={props.onEdit}\n >\n <Icon name=\"pencil\" className=\"h-3.5 w-3.5\" />\n </button>\n ) : null}\n <DeleteButton node={node} label={documentName(document, node.name)} />\n </span>\n }\n >\n <span title={label} className=\"flex\">\n <StatusDot tone={tone} />\n </span>\n <span className=\"min-w-0 truncate\">\n {documentName(document, node.name)}\n </span>\n </Row>\n );\n}\n\nfunction Section(props: {\n title: string;\n addLabel: string;\n empty: string;\n nodes: FileNode[];\n lastRuns?: Map<string, string>;\n activeId?: string | null;\n onOpen: (node: FileNode) => void;\n onEdit?: (node: FileNode) => void;\n onCreate: () => void;\n creating: boolean;\n}) {\n return (\n <div className=\"mt-5\">\n <div className=\"mb-1 flex items-center justify-between pl-4 pr-3\">\n <h3 className=\"text-xs font-medium text-muted-foreground\">\n {props.title}\n </h3>\n <button\n type=\"button\"\n disabled={props.creating}\n className=\"flex h-6 w-6 items-center justify-center rounded text-muted-foreground hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50\"\n title={props.addLabel}\n aria-label={props.addLabel}\n onClick={props.onCreate}\n >\n <Icon name=\"plus\" className=\"h-3.5 w-3.5\" />\n </button>\n </div>\n {props.nodes.length === 0 ? (\n <p className=\"px-4 py-1 text-xs text-muted-foreground\">{props.empty}</p>\n ) : (\n <div className=\"flex flex-col gap-0.5\">\n {props.nodes.map((node) => (\n <NodeRow\n key={node.id}\n node={node}\n lastRunStatus={props.lastRuns?.get(node.id)}\n active={props.activeId === node.id}\n onOpen={() => props.onOpen(node)}\n onEdit={props.onEdit ? () => props.onEdit!(node) : undefined}\n />\n ))}\n </div>\n )}\n </div>\n );\n}\n\nexport function Sidebar(props: {\n workflows: FileNode[];\n connections: FileNode[];\n // Each workflow's latest run status, by workflow id.\n lastRuns: Map<string, string>;\n activeId?: string | null;\n allRunsActive: boolean;\n creating: boolean;\n onShowAllRuns: () => void;\n onOpenWorkflow: (node: FileNode) => void;\n onEditWorkflow: (node: FileNode) => void;\n onOpenConnection: (node: FileNode) => void;\n onCreateWorkflow: () => void;\n onCreateConnection: () => void;\n}) {\n return (\n <aside className=\"w-60 shrink-0 overflow-y-auto border-r border-solid border-border bg-muted/50 py-3\">\n <Row active={props.allRunsActive} onClick={props.onShowAllRuns}>\n <Icon name=\"list\" className=\"text-muted-foreground\" />\n <span>Overview</span>\n </Row>\n <Section\n title=\"Workflows\"\n addLabel=\"New workflow\"\n empty=\"No workflows yet.\"\n nodes={props.workflows}\n lastRuns={props.lastRuns}\n activeId={props.activeId}\n onOpen={props.onOpenWorkflow}\n onEdit={props.onEditWorkflow}\n onCreate={props.onCreateWorkflow}\n creating={props.creating}\n />\n <Section\n title=\"Connections\"\n addLabel=\"New connection\"\n empty=\"No connections yet.\"\n nodes={props.connections}\n activeId={props.activeId}\n onOpen={props.onOpenConnection}\n onCreate={props.onCreateConnection}\n creating={props.creating}\n />\n </aside>\n );\n}\n","// Connect owns the path (`/d/<drive>/<node>`) for an open editor; the studio's\n// sidebar selection lives in the hash, so it survives a refresh.\nimport { useCallback, useEffect, useState } from \"react\";\n\nfunction readHash(): string | undefined {\n return window.location.hash.replace(/^#/, \"\") || undefined;\n}\n\nexport function useHashSelection(): [\n string | undefined,\n (id?: string) => void,\n] {\n const [selected, setSelected] = useState<string | undefined>(readHash);\n\n useEffect(() => {\n // Covers back/forward and a hand-edited URL.\n const sync = () => setSelected(readHash());\n window.addEventListener(\"hashchange\", sync);\n window.addEventListener(\"popstate\", sync);\n return () => {\n window.removeEventListener(\"hashchange\", sync);\n window.removeEventListener(\"popstate\", sync);\n };\n }, []);\n\n const select = useCallback((id?: string) => {\n setSelected(id);\n // Replaced, not pushed: Connect pushes a path entry on the same click, and\n // two history entries per click breaks the back button.\n const url = new URL(window.location.href);\n url.hash = id ?? \"\";\n window.history.replaceState(null, \"\", url);\n }, []);\n\n return [selected, select];\n}\n","// One polling subscription to the run journal per studio pane. The header,\n// the table and the editor toolbar all read from it, so they stay in step.\nimport { useCallback, useEffect, useRef, useState } from \"react\";\nimport {\n fetchRuns,\n type RunRecord,\n type RunsScope,\n} from \"../../workflow-editor/runtime-api.js\";\n\nconst POLL_MS = 5000;\n\nexport interface RunsFeed {\n runs: RunRecord[] | null;\n error: string | null;\n reload: () => void;\n}\n\n// Inactive feeds hold no subscription, so a pane can borrow another's rows.\nexport function useRuns(scope: RunsScope, active = true): RunsFeed {\n const { workflowId, driveId, limit } = scope;\n const [runs, setRuns] = useState<RunRecord[] | null>(null);\n const [error, setError] = useState<string | null>(null);\n // Lets reload() run against the current scope without re-subscribing.\n const load = useRef<() => void>(() => undefined);\n\n useEffect(() => {\n if (!active) return;\n let cancelled = false;\n const run = () => {\n fetchRuns({ workflowId, driveId, limit }).then(\n (result) => {\n if (cancelled) return;\n setRuns(result);\n setError(null);\n },\n (loadError: unknown) => {\n if (cancelled) return;\n setError(\n loadError instanceof Error ? loadError.message : String(loadError),\n );\n },\n );\n };\n load.current = run;\n // A scope change makes the previous rows the wrong rows.\n setRuns(null);\n run();\n const timer = setInterval(run, POLL_MS);\n return () => {\n cancelled = true;\n clearInterval(timer);\n };\n }, [workflowId, driveId, limit, active]);\n\n const reload = useCallback(() => load.current(), []);\n return { runs, error, reload };\n}\n","// Flattens a workflow's graph into the order a run walks it, so the studio\n// can show the shape of a workflow without drawing the canvas.\nimport { portRank } from \"../../workflow-editor/ui/ap-layout.js\";\n\nexport interface OutlineStep {\n id: string;\n key: string;\n name: string;\n blockType: string;\n}\n\nexport interface OutlineEdge {\n from: string;\n to: string;\n port: string;\n}\n\nexport interface OutlineRow {\n step: OutlineStep;\n // The port that led here; null on the entry step and on \"next\".\n port: string | null;\n}\n\nexport interface StepOutline {\n rows: OutlineRow[];\n // Authored but unreachable from the trigger, so no run ever executes them.\n orphans: OutlineStep[];\n}\n\nexport function stepOutline(args: {\n triggerId?: string | null;\n steps: readonly OutlineStep[];\n edges: readonly OutlineEdge[];\n}): StepOutline {\n const stepById = new Map(args.steps.map((step) => [step.id, step]));\n const outgoing = new Map<string, OutlineEdge[]>();\n for (const edge of args.edges) {\n if (!stepById.has(edge.to)) continue;\n const list = outgoing.get(edge.from) ?? [];\n list.push(edge);\n outgoing.set(edge.from, list);\n }\n for (const list of outgoing.values()) {\n list.sort((a, b) => portRank(a.port) - portRank(b.port));\n }\n\n const rows: OutlineRow[] = [];\n const seen = new Set<string>();\n // Depth-first so a branch reads as a continuous path, as it runs.\n const walk = (fromId: string, port: string | null) => {\n const step = stepById.get(fromId);\n if (step) {\n if (seen.has(fromId)) return;\n seen.add(fromId);\n rows.push({ step, port: port === \"next\" ? null : port });\n }\n for (const edge of outgoing.get(fromId) ?? []) {\n walk(edge.to, edge.port);\n }\n };\n if (args.triggerId) walk(args.triggerId, null);\n\n return {\n rows,\n orphans: args.steps.filter((step) => !seen.has(step.id)),\n };\n}\n","// The drive's workflows at a glance: when each starts, its chain coloured by\n// the latest run, and its recent runs. The studio's landing view.\nimport { useWorkflowDocumentsInSelectedDrive } from \"document-models/workflow\";\nimport type { RunRecord } from \"../../workflow-editor/runtime-api.js\";\nimport { usePieceLogos } from \"../../workflow-editor/ui/block-meta.js\";\nimport { describeTrigger } from \"../../workflow-editor/ui/trigger-text.js\";\nimport { MiniChain, RunStrip, type ChainLink } from \"./chain.js\";\nimport {\n formatAbsolute,\n formatWhen,\n RUN_TONE,\n statusLabel,\n toneOf,\n workflowHealth,\n} from \"./run-format.js\";\nimport { stepOutline } from \"./step-outline.js\";\nimport { Button, Icon, StatusDot } from \"./ui.js\";\n\ninterface BoardRow {\n id: string;\n name: string;\n status: string;\n trigger: string;\n links: ChainLink[];\n runs: RunRecord[];\n}\n\nfunction summary(rows: BoardRow[]): string {\n const count = `${rows.length} ${rows.length === 1 ? \"workflow\" : \"workflows\"}`;\n const failing = rows.filter((row) => row.runs[0]?.status === \"FAILED\").length;\n const enabled = rows.filter((row) => row.status === \"ENABLED\").length;\n const parts = [count, `${enabled} enabled`];\n if (failing > 0) parts.push(`${failing} failed on the last run`);\n return parts.join(\", \");\n}\n\nexport function WorkflowBoard(props: {\n runs: RunRecord[] | null;\n creating: boolean;\n onOpen: (workflowId: string) => void;\n onCreate: () => void;\n}) {\n usePieceLogos();\n const documents = useWorkflowDocumentsInSelectedDrive() ?? [];\n const runs = props.runs ?? [];\n\n const rows: BoardRow[] = documents\n .map((document) => {\n const state = document.state.global;\n const workflowRuns = runs.filter(\n (run) => run.workflowId === document.header.id,\n );\n const latest = workflowRuns.at(0);\n const statusByKey = new Map(\n (latest?.steps ?? []).map((step) => [step.stepKey, step.status]),\n );\n const outline = stepOutline({\n triggerId: state.trigger?.id,\n steps: state.steps,\n edges: state.edges,\n });\n const links: ChainLink[] = [\n ...(state.trigger\n ? [\n {\n id: state.trigger.id,\n blockType: state.trigger.blockType,\n label: \"Trigger\",\n status: latest ? \"SUCCEEDED\" : undefined,\n },\n ]\n : []),\n ...outline.rows.map((row) => ({\n id: row.step.id,\n blockType: row.step.blockType,\n label: row.step.name || row.step.key,\n status: statusByKey.get(row.step.key),\n })),\n ];\n return {\n id: document.header.id,\n name: state.name || document.header.name || \"Untitled workflow\",\n status: state.status,\n trigger: describeTrigger(state.trigger),\n links,\n runs: workflowRuns,\n };\n })\n // Most recently run first, then by name, so the board doesn't reshuffle.\n .sort((a, b) => {\n const at = a.runs[0]?.startedAt ?? \"\";\n const bt = b.runs[0]?.startedAt ?? \"\";\n if (at !== bt) return bt.localeCompare(at);\n return a.name.localeCompare(b.name);\n });\n\n return (\n <section className=\"mb-10\">\n <div className=\"mb-4 flex flex-wrap items-end justify-between gap-3\">\n <div>\n <h2 className=\"text-2xl font-semibold tracking-tight text-foreground\">\n Workflows\n </h2>\n <p className=\"mt-1 text-[13px] text-muted-foreground\">\n {rows.length === 0 ? \"Automations in this drive\" : summary(rows)}\n </p>\n </div>\n <Button\n variant=\"primary\"\n disabled={props.creating}\n onClick={props.onCreate}\n >\n <Icon name=\"plus\" className=\"h-3.5 w-3.5\" />\n New workflow\n </Button>\n </div>\n {rows.length === 0 ? (\n <div className=\"rounded-xl border border-dashed border-foreground/15 px-6 py-12 text-center\">\n <p className=\"text-[15px] font-medium text-foreground\">\n No workflows yet\n </p>\n <p className=\"mx-auto mt-1 max-w-sm text-[13px] text-muted-foreground\">\n A workflow starts on a trigger, like a schedule or a webhook, and\n runs a chain of steps across your services.\n </p>\n </div>\n ) : (\n <ul\n aria-label=\"Workflows\"\n className=\"overflow-hidden rounded-xl border border-solid border-foreground/10 bg-card\"\n >\n {rows.map((row) => {\n const latest = row.runs.at(0);\n const latestTone = toneOf(RUN_TONE, latest?.status);\n const health = workflowHealth(row.status, latest?.status);\n return (\n <li\n key={row.id}\n className=\"border-b border-solid border-foreground/10 last:border-b-0\"\n >\n <button\n type=\"button\"\n className=\"grid w-full grid-cols-[minmax(0,1fr)_auto] items-center gap-x-6 gap-y-3 px-5 py-4 text-left transition-colors hover:bg-accent/50 focus-visible:bg-accent/50 focus-visible:outline-none md:grid-cols-[minmax(0,1.2fr)_minmax(0,1fr)_minmax(0,0.8fr)_auto]\"\n onClick={() => props.onOpen(row.id)}\n >\n <span className=\"min-w-0\">\n <span className=\"flex items-center gap-2\">\n <span title={health.label} className=\"flex\">\n <StatusDot tone={health.tone} />\n </span>\n <span className=\"truncate text-[15px] font-semibold text-foreground\">\n {row.name}\n </span>\n {row.status !== \"ENABLED\" ? (\n <span className=\"shrink-0 rounded-full bg-muted px-2 py-0.5 text-[11px] text-muted-foreground\">\n {statusLabel(row.status)}\n </span>\n ) : null}\n </span>\n <span className=\"mt-0.5 block truncate pl-4 text-[13px] text-muted-foreground\">\n {row.trigger}\n </span>\n </span>\n <span className=\"hidden md:block\">\n <MiniChain links={row.links} />\n </span>\n <span\n className=\"hidden text-[13px] md:block\"\n title={\n latest ? formatAbsolute(latest.startedAt) : undefined\n }\n >\n {latest ? (\n <>\n <span\n className={`font-medium ${latestTone === \"fail\" ? \"text-wf-fail\" : latestTone === \"ok\" ? \"text-wf-ok\" : \"text-foreground\"}`}\n >\n {statusLabel(latest.status)}\n </span>\n <span className=\"block text-xs text-muted-foreground\">\n {formatWhen(latest.startedAt)}\n </span>\n </>\n ) : (\n <span className=\"text-muted-foreground\">Not run yet</span>\n )}\n </span>\n <RunStrip runs={row.runs} />\n </button>\n </li>\n );\n })}\n </ul>\n )}\n </section>\n );\n}\n","// The workflow's shape as a pipeline: trigger, then each step in the order a\n// run walks it, annotated with how that step fared in the latest run.\nimport type { WorkflowState } from \"document-models/workflow\";\nimport type { RunRecord } from \"../../workflow-editor/runtime-api.js\";\nimport {\n blockMeta,\n usePieceLogos,\n} from \"../../workflow-editor/ui/block-meta.js\";\nimport { BlockLogo } from \"../../workflow-editor/ui/BlockSelector.js\";\nimport { STEP_TONE, toneOf, type Tone } from \"./run-format.js\";\nimport { stepOutline, type OutlineStep } from \"./step-outline.js\";\n\nconst RAIL: Record<Tone, string> = {\n ok: \"bg-wf-ok\",\n fail: \"bg-wf-fail\",\n warn: \"bg-wf-warn\",\n run: \"bg-wf-run\",\n idle: \"bg-border\",\n};\n\nconst RING: Record<Tone, string> = {\n ok: \"ring-wf-ok\",\n fail: \"ring-wf-fail\",\n warn: \"ring-wf-warn\",\n run: \"ring-wf-run\",\n idle: \"ring-border\",\n};\n\ninterface Stop {\n id: string;\n title: string;\n subtitle: string;\n blockType: string;\n // How the latest run fared here; undefined when it never reached this stop.\n status?: string;\n // The port the run takes to arrive here, shown on the rail.\n port?: string | null;\n}\n\n// One stop on the rail. The rail segment into a stop is coloured by whether\n// the latest run reached it, so the track shows how far a run got.\nfunction TrackStop(props: {\n stop: Stop;\n first: boolean;\n last: boolean;\n inbound: Tone;\n outbound: Tone;\n onClick: () => void;\n}) {\n const { stop } = props;\n const tone = stop.status ? toneOf(STEP_TONE, stop.status) : \"idle\";\n return (\n <li className=\"relative flex w-40 shrink-0 flex-col items-center\">\n <span\n aria-hidden\n className={`absolute left-0 top-[19px] h-0.5 w-1/2 ${props.first ? \"invisible\" : RAIL[props.inbound]}`}\n />\n <span\n aria-hidden\n className={`absolute right-0 top-[19px] h-0.5 w-1/2 ${props.last ? \"invisible\" : RAIL[props.outbound]}`}\n />\n {stop.port ? (\n <span className=\"absolute -left-4 top-0 rounded bg-background px-1 text-[11px] text-muted-foreground\">\n {stop.port}\n </span>\n ) : null}\n <button\n type=\"button\"\n title={\n stop.status\n ? `${stop.title}: ${stop.status.toLowerCase()}`\n : stop.title\n }\n aria-label={`${stop.title}: ${stop.status ? stop.status.toLowerCase() : \"not run\"}`}\n className={`relative z-10 flex h-10 w-10 items-center justify-center rounded-full bg-card ring-2 transition-shadow dark:bg-white hover:ring-4 focus-visible:outline-none focus-visible:ring-4 ${RING[tone]}`}\n onClick={props.onClick}\n >\n <BlockLogo bare blockType={stop.blockType} size={20} />\n </button>\n <span className=\"mt-2 max-w-full truncate px-2 text-[13px] font-medium text-foreground\">\n {stop.title}\n </span>\n <span\n className=\"max-w-full truncate px-2 text-xs text-muted-foreground\"\n title={stop.subtitle}\n >\n {stop.subtitle}\n </span>\n </li>\n );\n}\n\nfunction Track(props: { stops: Stop[]; onOpenEditor: () => void }) {\n const tones = props.stops.map((stop) =>\n stop.status ? toneOf(STEP_TONE, stop.status) : \"idle\",\n );\n return (\n // Scrolling clips both axes, so the padding leaves room for the rings.\n <ol className=\"-mx-6 flex overflow-x-auto px-6 py-1.5\">\n {props.stops.map((stop, index) => (\n <TrackStop\n key={stop.id}\n stop={stop}\n first={index === 0}\n last={index === props.stops.length - 1}\n inbound={tones[index]}\n outbound={tones[index + 1] ?? \"idle\"}\n onClick={props.onOpenEditor}\n />\n ))}\n </ol>\n );\n}\n\nexport function WorkflowSteps(props: {\n state: WorkflowState;\n latestRun?: RunRecord;\n onOpenEditor: () => void;\n}) {\n const { state } = props;\n // Piece logos arrive with the catalog; re-renders this pipeline once known.\n usePieceLogos();\n const outline = stepOutline({\n triggerId: state.trigger?.id,\n steps: state.steps,\n edges: state.edges,\n });\n // Latest-run outcome per step, so the pipeline shows where a run stopped.\n const statusByKey = new Map(\n (props.latestRun?.steps ?? []).map((step) => [step.stepKey, step.status]),\n );\n\n const stopFor = (step: OutlineStep, port: string | null): Stop => {\n const meta = blockMeta(step.blockType);\n return {\n id: step.id,\n title: step.name || step.key,\n subtitle: meta.displayName,\n blockType: step.blockType,\n status: statusByKey.get(step.key),\n port,\n };\n };\n\n if (!state.trigger && state.steps.length === 0) {\n return (\n <section className=\"mt-8 border-t border-solid border-border pt-6\">\n <p className=\"text-[13px] text-muted-foreground\">\n This workflow has no trigger or steps yet.{\" \"}\n <button\n type=\"button\"\n className=\"font-medium text-foreground underline underline-offset-2\"\n onClick={props.onOpenEditor}\n >\n Open the editor\n </button>{\" \"}\n to build it.\n </p>\n </section>\n );\n }\n\n const triggerMeta = state.trigger ? blockMeta(state.trigger.blockType) : null;\n const stops: Stop[] = [\n ...(state.trigger && triggerMeta\n ? [\n {\n id: state.trigger.id,\n title: triggerMeta.displayName,\n subtitle: \"Trigger\",\n blockType: state.trigger.blockType,\n // Any recorded run means the trigger fired.\n status: props.latestRun ? \"SUCCEEDED\" : undefined,\n },\n ]\n : []),\n ...outline.rows.map((row) => stopFor(row.step, row.port)),\n ];\n\n return (\n <section className=\"mt-8 border-t border-solid border-border pt-6\">\n <div className=\"mb-4 flex items-baseline gap-2\">\n <h3 className=\"text-[13px] font-medium text-foreground\">Steps</h3>\n <span className=\"text-xs text-muted-foreground\">\n {props.latestRun ? \"Coloured by the latest run\" : \"Not run yet\"}\n </span>\n </div>\n {!state.trigger ? (\n <p className=\"mb-3 text-xs text-wf-warn\">\n No trigger set, so this workflow never starts on its own.\n </p>\n ) : null}\n <Track stops={stops} onOpenEditor={props.onOpenEditor} />\n {outline.orphans.length > 0 ? (\n <div className=\"mt-5\">\n <p className=\"mb-3 text-xs text-muted-foreground\">\n Not connected to the trigger, so runs never reach these:\n </p>\n <ol className=\"-mx-6 flex overflow-x-auto px-6 py-1.5 opacity-60\">\n {outline.orphans.map((step) => (\n <TrackStop\n key={step.id}\n stop={stopFor(step, null)}\n first\n last\n inbound=\"idle\"\n outbound=\"idle\"\n onClick={props.onOpenEditor}\n />\n ))}\n </ol>\n </div>\n ) : null}\n </section>\n );\n}\n","// Identity, state and the actions for the workflow whose runs are shown:\n// enable/disable, open the editor, delete. Stats come from the shared feed.\nimport {\n showDeleteNodeModal,\n useDispatch,\n useDocumentSafe,\n} from \"@powerhousedao/reactor-browser\";\nimport type { FileNode } from \"@powerhousedao/shared/document-drive\";\nimport {\n actions as workflowActions,\n type WorkflowDocument,\n} from \"document-models/workflow\";\nimport type { RunRecord } from \"../../workflow-editor/runtime-api.js\";\nimport { DocumentLoadError } from \"../../shared/DocumentErrorBoundary.js\";\nimport {\n formatAbsolute,\n formatWhen,\n RUN_TONE,\n runStats,\n toneOf,\n TONE_BADGE,\n TONE_TEXT,\n statusLabel,\n WORKFLOW_TONE,\n} from \"./run-format.js\";\nimport { Button, Fact, StatusDot } from \"./ui.js\";\nimport { describeTrigger } from \"../../workflow-editor/ui/trigger-text.js\";\nimport { RunStrip } from \"./chain.js\";\nimport { WorkflowSteps } from \"./WorkflowSteps.js\";\n\nconst WORKFLOW_TYPE = \"powerhouse/workflow\";\n\nexport function WorkflowHeader(props: {\n node: FileNode;\n runs: RunRecord[] | null;\n onEdit: () => void;\n}) {\n const workflowId = props.node.id;\n const { data: document, error, reload } = useDocumentSafe(workflowId);\n const [, dispatch] = useDispatch(document);\n\n if (error !== undefined) {\n return (\n <DocumentLoadError\n title=\"This workflow could not be loaded\"\n documentId={workflowId}\n error={error}\n onRetry={() => {\n void reload();\n }}\n />\n );\n }\n if (document?.header.documentType !== WORKFLOW_TYPE) return null;\n\n const workflow = document as WorkflowDocument;\n const state = workflow.state.global;\n const enabled = state.status === \"ENABLED\";\n const stats = runStats(props.runs ?? []);\n\n const lastTone = toneOf(RUN_TONE, stats.lastRun?.status);\n const statusTone = toneOf(WORKFLOW_TONE, state.status);\n\n return (\n <header className=\"mb-8\">\n <div className=\"flex flex-wrap items-start gap-3\">\n <div className=\"min-w-0 grow\">\n <div className=\"flex items-center gap-2.5\">\n <h2 className=\"min-w-0 truncate text-xl font-semibold tracking-tight text-foreground\">\n {state.name || props.node.name || \"Untitled workflow\"}\n </h2>\n <span\n className={`rounded-full px-2 py-0.5 text-xs font-medium ${TONE_BADGE[statusTone]}`}\n >\n {statusLabel(state.status)}\n </span>\n </div>\n {state.description ? (\n <p className=\"mt-1 max-w-prose text-[13px] text-muted-foreground\">\n {state.description}\n </p>\n ) : null}\n </div>\n <div className=\"flex items-center gap-2\">\n <Button\n variant=\"danger\"\n onClick={() => showDeleteNodeModal(props.node)}\n >\n Delete\n </Button>\n <Button\n onClick={() =>\n dispatch(\n workflowActions.setWorkflowStatus({\n status: enabled ? \"DISABLED\" : \"ENABLED\",\n }),\n )\n }\n >\n {enabled ? \"Disable\" : \"Enable\"}\n </Button>\n <Button variant=\"primary\" onClick={props.onEdit}>\n Edit workflow\n </Button>\n </div>\n </div>\n <dl className=\"mt-5 flex flex-wrap gap-x-10 gap-y-3\">\n <Fact label=\"Starts\">\n {state.trigger ? (\n describeTrigger(state.trigger)\n ) : (\n <span className=\"text-wf-warn\">Never: no trigger</span>\n )}\n </Fact>\n <Fact\n label=\"Last run\"\n title={\n stats.lastRun ? formatAbsolute(stats.lastRun.startedAt) : undefined\n }\n >\n {stats.lastRun ? (\n <span\n className={`inline-flex items-center gap-1.5 ${TONE_TEXT[lastTone]}`}\n >\n <StatusDot tone={lastTone} />\n {formatWhen(stats.lastRun.startedAt)}\n </span>\n ) : (\n <span className=\"text-muted-foreground\">Never</span>\n )}\n </Fact>\n <Fact label=\"Recent runs\">\n {stats.total > 0 ? (\n <RunStrip runs={props.runs ?? []} />\n ) : (\n <span className=\"text-muted-foreground\">None yet</span>\n )}\n </Fact>\n <Fact label=\"Success rate\">\n {stats.successRate === null ? (\n <span className=\"text-muted-foreground\">No finished runs</span>\n ) : (\n `${stats.successRate}%`\n )}\n </Fact>\n <Fact label=\"Version\">v{state.version}</Fact>\n </dl>\n <WorkflowSteps\n state={state}\n latestRun={stats.lastRun}\n onOpenEditor={props.onEdit}\n />\n </header>\n );\n}\n","// Workflow Studio: drive app listing workflows and connections with a\n// GitHub-Actions-style run journal; opens the per-document editors inline.\nimport {\n addDocument,\n setSelectedNode,\n useDocumentSafe,\n useFileNodesInSelectedDrive,\n usePHToast,\n useSelectedDrive,\n useSelectedNode,\n} from \"@powerhousedao/reactor-browser\";\nimport type { FileNode } from \"@powerhousedao/shared/document-drive\";\nimport { useEffect, useRef, useState, type ReactNode } from \"react\";\nimport { type WorkflowDocument } from \"document-models/workflow\";\nimport { fireWorkflow } from \"../../workflow-editor/runtime-api.js\";\nimport \"../../workflow-editor/runtime-piece-source.js\";\nimport { DocumentErrorBoundary } from \"../../shared/DocumentErrorBoundary.js\";\nimport { RunsView } from \"./RunsView.js\";\nimport { Sidebar } from \"./Sidebar.js\";\nimport { useHashSelection } from \"./use-hash-selection.js\";\nimport { useRuns } from \"./useRuns.js\";\nimport { WorkflowBoard } from \"./WorkflowBoard.js\";\nimport { WorkflowHeader } from \"./WorkflowHeader.js\";\n\nconst WORKFLOW_TYPE = \"powerhouse/workflow\";\nconst CONNECTION_TYPE = \"powerhouse/connection\";\n\nexport function WorkflowStudio(props: { children?: ReactNode }) {\n const [drive] = useSelectedDrive();\n const fileNodes = useFileNodesInSelectedDrive() ?? [];\n const selectedNode = useSelectedNode();\n const selectedNodeId = selectedNode?.id;\n const toast = usePHToast();\n // The sidebar selection, kept in the URL hash; undefined = all runs.\n const [selectedId, select] = useHashSelection();\n const [creating, setCreating] = useState(false);\n\n const driveId = drive.header.id;\n const workflows = fileNodes.filter(\n (node) => node.documentType === WORKFLOW_TYPE,\n );\n const connections = fileNodes.filter(\n (node) => node.documentType === CONNECTION_TYPE,\n );\n const editorOpen = Boolean(props.children && selectedNodeId);\n\n const create = (documentType: string, baseName: string, count: number) => {\n if (creating) return;\n setCreating(true);\n addDocument(driveId, `${baseName} ${count + 1}`, documentType)\n .then((node) => {\n select(node.id);\n setSelectedNode(node.id);\n })\n .catch((error: unknown) => {\n toast?.(\n error instanceof Error\n ? error.message\n : `Failed to create ${baseName}`,\n { type: \"error\" },\n );\n })\n .finally(() => setCreating(false));\n };\n\n const showRuns = (node: FileNode | null) => {\n setSelectedNode(undefined);\n select(node?.id);\n };\n\n // Resolved from the drive each render, so a deleted node drops out on its own.\n const liveTarget = workflows.find((node) => node.id === selectedId) ?? null;\n // Connections have no page of their own; closing the editor lands on the\n // overview rather than on a selection nothing shows.\n const connectionSelected = connections.some((node) => node.id === selectedId);\n const wasEditing = useRef(editorOpen);\n useEffect(() => {\n if (wasEditing.current && !editorOpen && connectionSelected)\n select(undefined);\n wasEditing.current = editorOpen;\n }, [editorOpen, connectionSelected, select]);\n // A deleted node must not keep the hash pointing at nothing.\n const selectionExists = fileNodes.some((node) => node.id === selectedId);\n useEffect(() => {\n if (selectedId && fileNodes.length > 0 && !selectionExists)\n select(undefined);\n }, [fileNodes.length, select, selectedId, selectionExists]);\n // One feed per pane, shared by the header and the table: the focused\n // workflow's runs, or every run in this drive.\n const focusedWorkflow = liveTarget;\n // The drive feed colours the sidebar and is the overview's own feed; a\n // focused workflow gets its own, so older runs of it aren't cut off.\n const driveFeed = useRuns({ driveId });\n const workflowFeed = useRuns(\n { workflowId: focusedWorkflow?.id },\n Boolean(focusedWorkflow),\n );\n const {\n runs,\n error: runsError,\n reload: reloadRuns,\n } = focusedWorkflow ? workflowFeed : driveFeed;\n const lastRuns = new Map<string, string>();\n for (const run of driveFeed.runs ?? []) {\n if (!lastRuns.has(run.workflowId)) lastRuns.set(run.workflowId, run.status);\n }\n\n // Manual fire only makes sense for core#manual triggers.\n const { data: targetDocument } = useDocumentSafe(liveTarget?.id ?? null);\n const manualTrigger =\n targetDocument?.header.documentType === WORKFLOW_TYPE &&\n (targetDocument as WorkflowDocument).state.global.trigger?.blockType ===\n \"core#manual\";\n\n return (\n <div className=\"flex h-full min-h-0\">\n <Sidebar\n workflows={workflows}\n connections={connections}\n lastRuns={lastRuns}\n activeId={selectedId}\n allRunsActive={!selectedId}\n creating={creating}\n onShowAllRuns={() => showRuns(null)}\n onOpenWorkflow={(node) => showRuns(node)}\n onEditWorkflow={(node) => {\n select(node.id);\n setSelectedNode(node.id);\n }}\n onOpenConnection={(node) => {\n select(node.id);\n setSelectedNode(node.id);\n }}\n onCreateWorkflow={() =>\n create(WORKFLOW_TYPE, \"Workflow\", workflows.length)\n }\n onCreateConnection={() =>\n create(CONNECTION_TYPE, \"Connection\", connections.length)\n }\n />\n <main className=\"min-w-0 flex-1 overflow-y-auto\">\n {editorOpen ? (\n <div className=\"flex h-full min-h-0 flex-col\">\n <div className=\"flex min-h-0 flex-1 flex-col [&>#document-editor-container]:min-h-0\">\n <DocumentErrorBoundary\n key={selectedNodeId}\n documentId={selectedNodeId}\n label={selectedNode?.name}\n onDismiss={() => setSelectedNode(undefined)}\n >\n {props.children}\n </DocumentErrorBoundary>\n </div>\n </div>\n ) : (\n <div className=\"mx-auto w-full max-w-6xl px-8 py-10\">\n {liveTarget ? (\n <WorkflowHeader\n key={liveTarget.id}\n node={liveTarget}\n runs={runs}\n onEdit={() => setSelectedNode(liveTarget.id)}\n />\n ) : (\n <WorkflowBoard\n runs={runs}\n creating={creating}\n onOpen={(workflowId) => select(workflowId)}\n onCreate={() =>\n create(WORKFLOW_TYPE, \"Workflow\", workflows.length)\n }\n />\n )}\n <RunsView\n // The header already names the workflow; don't say it twice.\n title={liveTarget ? \"Runs\" : \"Recent runs\"}\n runs={runs}\n error={runsError}\n reload={reloadRuns}\n showWorkflow={liveTarget === null}\n onFire={\n liveTarget && manualTrigger\n ? () =>\n fireWorkflow(liveTarget.id).then((result) => result.error)\n : undefined\n }\n />\n </div>\n )}\n </main>\n </div>\n );\n}\n","import type { PHAppConfig } from \"@powerhousedao/reactor-browser\";\n\nexport const editorConfig: PHAppConfig = {\n isDragAndDropEnabled: true,\n allowedDocumentTypes: [\"powerhouse/workflow\", \"powerhouse/connection\"],\n};\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport { useSetPHAppConfig } from \"@powerhousedao/reactor-browser\";\nimport type { EditorProps } from \"document-model\";\nimport { useSyncWorkflowRuntimeUrl } from \"../workflow-editor/use-runtime-url.js\";\nimport { WorkflowStudio } from \"./components/WorkflowStudio.js\";\nimport { editorConfig } from \"./config.js\";\n\n/** Editor component for the app */\nexport default function Editor(props: EditorProps) {\n useSetPHAppConfig(editorConfig);\n useSyncWorkflowRuntimeUrl();\n return (\n <div className=\"h-full min-h-0 bg-background\">\n <WorkflowStudio>{props.children}</WorkflowStudio>\n </div>\n );\n}\n"],"mappings":";;;;;;;;;AAqBA,MAAMA,SAA6B;CACjC,IAAI;CACJ,MAAM;CACN,MAAM;CACN,KAAK;CACL,MAAM;AACR;AAEA,MAAMC,SAA6B;CACjC,IAAI;CACJ,MAAM;CACN,MAAM;CACN,KAAK;CACL,MAAM;AACR;AAIA,MAAM,YAAY;AAElB,SAAgB,UAAU,OAAmD;CAC3E,MAAM,KAAK,MAAM,SAAS;CAC1B,MAAM,WAAW,MAAM,MAAM,SAAS;CACtC,MAAM,QAAQ,WAAW,MAAM,MAAM,MAAM,GAAG,CAAa,IAAI,MAAM;CACrE,MAAM,SAAS,MAAM,MAAM,SAAS,MAAM;CAC1C,MAAM,QAAQ,MAAM,KAAK,SACvB,KAAK,SAAS,OAAO,WAAW,KAAK,MAAM,IAAI,MACjD;CACA,OACE,qBAAC,MAAD;EACE,WAAU;EACV,cA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;AAET"}
@@ -2,7 +2,7 @@ import { lazy } from "react";
2
2
  //#region editors/connection-editor/module.ts
3
3
  /** Document editor module for the "powerhouse/connection" document type */
4
4
  const ConnectionEditor = {
5
- Component: lazy(() => import("../../editor-CIZRPdKM.js")),
5
+ Component: lazy(() => import("../../editor-C_E_JTp6.js")),
6
6
  documentTypes: ["powerhouse/connection"],
7
7
  config: {
8
8
  id: "connection-editor",
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/connection-editor/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/connection\" document type */\nexport const ConnectionEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/connection\"],\n config: {\n id: \"connection-editor\",\n name: \"Connection Editor\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,mBAAiC;CAC5C,WAAW,WAAW,OAAO,4BAAe;CAC5C,eAAe,CAAC,wBAAwB;CACxC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF"}
1
+ {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/connection-editor/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/connection\" document type */\nexport const ConnectionEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/connection\"],\n config: {\n id: \"connection-editor\",\n name: \"Connection Editor\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,mBAAiC;CAC5C,WAAW,WAAW,OAAO,2BAAc;CAC3C,eAAe,CAAC,uBAAuB;CACvC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
@@ -2,7 +2,7 @@ import { lazy } from "react";
2
2
  //#region editors/workflow-editor/module.ts
3
3
  /** Document editor module for the "powerhouse/workflow" document type */
4
4
  const WorkflowEditor = {
5
- Component: lazy(() => import("../../editor-D0sdUxJa.js")),
5
+ Component: lazy(() => import("../../editor-YZw296bf.js")),
6
6
  documentTypes: ["powerhouse/workflow"],
7
7
  config: {
8
8
  id: "workflow-editor",
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/workflow-editor/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/workflow\" document type */\nexport const WorkflowEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/workflow\"],\n config: {\n id: \"workflow-editor\",\n name: \"Workflow Editor\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,iBAA+B;CAC1C,WAAW,WAAW,OAAO,4BAAe;CAC5C,eAAe,CAAC,sBAAsB;CACtC,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF"}
1
+ {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/workflow-editor/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/workflow\" document type */\nexport const WorkflowEditor: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/workflow\"],\n config: {\n id: \"workflow-editor\",\n name: \"Workflow Editor\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,iBAA+B;CAC1C,WAAW,WAAW,OAAO,2BAAc;CAC3C,eAAe,CAAC,qBAAqB;CACrC,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
@@ -2,7 +2,7 @@ import { lazy } from "react";
2
2
  //#region editors/workflow-studio/module.ts
3
3
  /** Document editor module for the "powerhouse/document-drive" document type */
4
4
  const WorkflowStudio = {
5
- Component: lazy(() => import("../../editor-CCKpl-Gd.js")),
5
+ Component: lazy(() => import("../../editor-fjwq-8Yq.js")),
6
6
  documentTypes: ["powerhouse/document-drive"],
7
7
  config: {
8
8
  id: "workflow-studio",
@@ -1 +1 @@
1
- {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/workflow-studio/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-drive\" document type */\nexport const WorkflowStudio: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-drive\"],\n config: {\n id: \"workflow-studio\",\n name: \"Workflow Studio\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,iBAA+B;CAC1C,WAAW,WAAW,OAAO,4BAAe;CAC5C,eAAe,CAAC,4BAA4B;CAC5C,QAAQ;EACN,IAAI;EACJ,MAAM;EACP;CACF"}
1
+ {"version":3,"file":"module.js","names":[],"sources":["../../../../editors/workflow-studio/module.ts"],"sourcesContent":["/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { lazy } from \"react\";\n\n/** Document editor module for the \"powerhouse/document-drive\" document type */\nexport const WorkflowStudio: EditorModule = {\n Component: lazy(() => import(\"./editor.js\")),\n documentTypes: [\"powerhouse/document-drive\"],\n config: {\n id: \"workflow-studio\",\n name: \"Workflow Studio\",\n },\n};\n"],"mappings":";;;AAQA,MAAa,iBAA+B;CAC1C,WAAW,WAAW,OAAO,2BAAc;CAC3C,eAAe,CAAC,2BAA2B;CAC3C,QAAQ;EACN,IAAI;EACJ,MAAM;CACR;AACF"}
@@ -1,6 +1,7 @@
1
- import { n as powerhouse_manifest_default, t as documentModels } from "./document-models-BYheX-te.js";
2
- import { C as connectorIdForPiece, D as planFromAuth, E as packageFromConnectorId, T as isConfigValueMissing, a as fetchConnections, c as fetchPieceTriggers, f as fireWorkflow, l as fetchRuns, n as checkConnection, o as fetchPieceActions, p as getBlockForm, s as fetchPieceCatalog, t as DEFAULT_RUNTIME_URL, x as CORE_FORMS, y as setRuntimeUrl } from "./runtime-api-DKlnn45K.js";
3
- import { t as upgradeManifests } from "./upgrade-manifests-Cnpfo6kC.js";
1
+ import { n as powerhouse_manifest_default, t as documentModels } from "./document-models-C6ebrsd9.js";
2
+ import { i as packageFromConnectorId, o as planFromAuth, r as isConfigValueMissing, t as connectorIdForPiece } from "./piece-auth-Z4mZEOtL.js";
3
+ import { a as fetchConnections, c as fetchPieceTriggers, f as fireWorkflow, l as fetchRuns, n as checkConnection, o as fetchPieceActions, p as getBlockForm, s as fetchPieceCatalog, t as DEFAULT_RUNTIME_URL, x as CORE_FORMS, y as setRuntimeUrl } from "./runtime-api-xwvg5PzA.js";
4
+ import { t as upgradeManifests } from "./upgrade-manifests-BLrv3cf2.js";
4
5
  import { ConnectionEditor } from "./editors/connection-editor/module.js";
5
6
  import { WorkflowEditor } from "./editors/workflow-editor/module.js";
6
7
  import { WorkflowStudio } from "./editors/workflow-studio/module.js";
@@ -20,7 +21,7 @@ const READ_ONLY$1 = {
20
21
  idempotentHint: true,
21
22
  openWorldHint: false
22
23
  };
23
- const CORE_TRIGGERS = new Set([
24
+ const CORE_TRIGGERS = /* @__PURE__ */ new Set([
24
25
  "core#manual",
25
26
  "core#schedule",
26
27
  "core#webhook"
@@ -250,7 +251,8 @@ async function getConnections() {
250
251
  const [catalog, summaries] = await Promise.all([fetchPieceCatalog(), fetchConnections()]);
251
252
  const client = typeof window !== "undefined" ? window.ph?.reactorClient : void 0;
252
253
  return { connections: await Promise.all(summaries.map(async (summary) => {
253
- const plan = planFromAuth(catalog.find((entry) => entry.name === packageFromConnectorId(summary.connectorId))?.auth ?? null);
254
+ const piece = catalog.find((entry) => entry.name === packageFromConnectorId(summary.connectorId));
255
+ const plan = planFromAuth(piece?.auth ?? null);
254
256
  let state;
255
257
  if (client) try {
256
258
  state = (await client.get(summary.id)).state.global;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":["READ_ONLY","runConnectionCheck","manifestJson"],"sources":["../../ai/runtime-url.ts","../../ai/workflow-tools.ts","../../ai/tools.ts","../../editors/editors.ts","../../index.ts"],"sourcesContent":["// Points the module-level runtime client at the selected drive's\n// workflow-runtime subgraph before an AI tool talks to it.\nimport { resolveDriveSwitchboard } from \"@powerhousedao/reactor-browser/ai\";\nimport {\n DEFAULT_RUNTIME_URL,\n setRuntimeUrl,\n} from \"../editors/workflow-editor/runtime-api.js\";\n\nexport function syncRuntimeUrl(): void {\n if (typeof window === \"undefined\") return;\n const switchboard = resolveDriveSwitchboard(window.ph?.selectedDriveId);\n // No resolvable switchboard (no selection, or a local/unsynced drive):\n // reset to the default rather than leaving a prior drive's URL attached.\n setRuntimeUrl(\n switchboard\n ? `${switchboard.graphqlUrl}/workflow-runtime`\n : DEFAULT_RUNTIME_URL,\n );\n}\n","// AI tool descriptors for authoring and running workflows: the exact block\n// types a piece offers, a block's config props, the built-in core blocks with\n// the expression syntax, run history and manual firing. Complements the\n// connector/connection tools in tools.ts, which cover the catalog and auth.\nimport type { PhAiToolDescriptor } from \"@powerhousedao/shared/document-model\";\nimport { z } from \"zod\";\nimport {\n fetchPieceActions,\n fetchPieceTriggers,\n fetchRuns,\n fireWorkflow,\n getBlockForm,\n} from \"../editors/workflow-editor/runtime-api.js\";\nimport {\n CORE_FORMS,\n type BlockFormProp,\n} from \"../editors/workflow-editor/ui/forms.js\";\nimport { syncRuntimeUrl } from \"./runtime-url.js\";\n\nconst READ_ONLY = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\n// Core blocks that are triggers. A piece's trigger says so in its own block\n// type, which is how every document trigger is classified now.\nconst CORE_TRIGGERS = new Set([\"core#manual\", \"core#schedule\", \"core#webhook\"]);\n\nfunction kindOf(blockType: string): \"trigger\" | \"step\" {\n return CORE_TRIGGERS.has(blockType) || blockType.includes(\"#trigger:\")\n ? \"trigger\"\n : \"step\";\n}\n\nfunction portsFor(blockType: string): string[] {\n return blockType === \"core#branch\" ? [\"true\", \"false\"] : [\"next\"];\n}\n\nfunction describeProp(prop: BlockFormProp) {\n return {\n name: prop.name,\n label: prop.displayName,\n type: prop.type,\n required: prop.required,\n ...(prop.description ? { description: prop.description } : {}),\n ...(prop.defaultValue !== undefined ? { default: prop.defaultValue } : {}),\n ...(prop.staticOptions\n ? { options: prop.staticOptions.map((option) => option.value) }\n : {}),\n ...(prop.hasDynamicResolver ? { dynamicOptions: true } : {}),\n };\n}\n\nconst EXPRESSIONS = [\n \"Step configs and edge conditions may contain expressions in double braces.\",\n \"{{trigger.payload.<field>}} reads the trigger payload: for core#manual the payload passed to fireWorkflow; for the reactor piece's document triggers it carries documentId, documentType, driveId and name.\",\n \"{{steps.<key>.output.<path>}} reads an upstream step's output by that step's key, e.g. {{steps.fetch.output.body.title}}.\",\n \"{{variables.<key>}} reads a workflow variable.\",\n \"'a' || 'b' picks the first non-empty value, e.g. {{trigger.payload.url || 'https://example.com'}}.\",\n \"A whole-string expression yields the raw value; text around expressions is interpolated.\",\n];\n\nconst GRAPH_RULES = [\n \"A workflow is a powerhouse/workflow document. Build it with SET_TRIGGER once, ADD_STEP per step (each with a unique id and key), and ADD_EDGE from the trigger id to the first step and between steps.\",\n \"Edges use port 'next' for the trigger and ordinary steps; core#branch emits 'true' and 'false'.\",\n \"Piece block types are '<package>@<version>#<action>' for actions and '<package>@<version>#trigger:<trigger>' for triggers. Always use the pinned strings returned by getWorkflowPieceBlocks.\",\n \"Steps whose piece needs a connection must set connectionId to a powerhouse/connection document id (see getConnections).\",\n \"Only workflows with status ENABLED get trigger instances and can be fired; set it with SET_WORKFLOW_STATUS.\",\n];\n\nexport const getWorkflowPieceBlocksTool: PhAiToolDescriptor = {\n name: \"getWorkflowPieceBlocks\",\n description:\n \"Lists the actions and triggers of one Activepieces piece with the exact, version-pinned blockType to use in ADD_STEP or SET_TRIGGER. Takes the piece package name from getConnectors. Call getWorkflowBlockConfig next for a block's config props.\",\n inputSchema: {\n packageName: z\n .string()\n .describe(\"Piece package name, e.g. @activepieces/piece-http.\"),\n },\n annotations: { title: \"Get Workflow Piece Blocks\", ...READ_ONLY },\n callback: async (args: { packageName: string }) => {\n syncRuntimeUrl();\n const [actions, triggers] = await Promise.all([\n fetchPieceActions(args.packageName),\n fetchPieceTriggers(args.packageName),\n ]);\n return {\n packageName: args.packageName,\n actions: actions.map((action) => ({\n blockType: action.blockType,\n displayName: action.displayName,\n description: action.description,\n })),\n triggers: triggers.map((trigger) => ({\n blockType: trigger.blockType,\n displayName: trigger.displayName,\n description: trigger.description,\n strategy: trigger.strategy,\n })),\n };\n },\n};\n\nexport const getWorkflowBlockConfigTool: PhAiToolDescriptor = {\n name: \"getWorkflowBlockConfig\",\n description:\n \"Describes the config of a block type (core#… or a piece blockType): prop names, types, whether required, allowed options, the output ports, and whether a connection is needed. Use it before writing a step or trigger config.\",\n inputSchema: {\n blockType: z\n .string()\n .describe(\n \"Block type, e.g. core#branch or @activepieces/piece-http@0.11.19#send_request.\",\n ),\n },\n annotations: { title: \"Get Workflow Block Config\", ...READ_ONLY },\n callback: async (args: { blockType: string }) => {\n const { blockType } = args;\n if (!Object.hasOwn(CORE_FORMS, blockType)) syncRuntimeUrl();\n const form = await getBlockForm(blockType);\n if (!form) {\n return {\n blockType,\n error:\n \"Unknown block type. Use getConnectors and getWorkflowPieceBlocks to find valid block types (documents live in @powerhousedao/piece-reactor), or listWorkflowCoreBlocks for built-ins.\",\n };\n }\n return {\n blockType,\n title: form.title,\n kind: kindOf(blockType),\n requiresConnection: form.auth === \"required\",\n props: form.props.map(describeProp),\n ports: portsFor(blockType),\n };\n },\n};\n\nexport const listWorkflowCoreBlocksTool: PhAiToolDescriptor = {\n name: \"listWorkflowCoreBlocks\",\n description:\n \"Lists the built-in core#… blocks (manual, schedule and webhook triggers, branch and assert) with their config props, plus the expression syntax and the rules for building a powerhouse/workflow document. Documents are read and written by the @powerhousedao/piece-reactor blocks; list those with getWorkflowPieceBlocks.\",\n inputSchema: {},\n annotations: { title: \"List Workflow Core Blocks\", ...READ_ONLY },\n callback: () =>\n Promise.resolve({\n blocks: Object.entries(CORE_FORMS).map(([blockType, form]) => ({\n blockType,\n title: form.title,\n kind: kindOf(blockType),\n props: form.props.map(describeProp),\n ports: portsFor(blockType),\n })),\n expressions: EXPRESSIONS,\n rules: GRAPH_RULES,\n }),\n};\n\nexport const listWorkflowRunsTool: PhAiToolDescriptor = {\n name: \"listWorkflowRuns\",\n description:\n \"Lists recent workflow runs, newest first, with status, error and each step's outcome. Filter by workflowId to inspect one workflow, or by driveId for every workflow in a drive.\",\n inputSchema: {\n workflowId: z\n .string()\n .optional()\n .describe(\"Workflow document id to filter by.\"),\n driveId: z\n .string()\n .optional()\n .describe(\"Drive id to filter by (all workflows in that drive).\"),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Maximum runs to return (default 10).\"),\n },\n annotations: { title: \"List Workflow Runs\", ...READ_ONLY },\n callback: async (args: {\n workflowId?: string;\n driveId?: string;\n limit?: number;\n }) => {\n syncRuntimeUrl();\n const runs = await fetchRuns({\n workflowId: args.workflowId,\n driveId: args.driveId,\n limit: args.limit ?? 10,\n });\n return {\n runs: runs.map((run) => ({\n id: run.id,\n workflowId: run.workflowId,\n workflowName: run.workflowName,\n status: run.status,\n error: run.error,\n triggerKind: run.triggerKind,\n startedAt: run.startedAt,\n endedAt: run.endedAt,\n steps: run.steps.map((step) => ({\n key: step.stepKey,\n status: step.status,\n error: step.error,\n })),\n })),\n };\n },\n};\n\nexport const fireWorkflowTool: PhAiToolDescriptor = {\n name: \"fireWorkflow\",\n description:\n \"Fires an ENABLED workflow that has a core#manual trigger and runs it to completion. The payload becomes {{trigger.payload}}. Returns the run id and final status.\",\n inputSchema: {\n workflowId: z.string().describe(\"Workflow document id.\"),\n payload: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Trigger payload object.\"),\n },\n annotations: {\n title: \"Fire Workflow\",\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: false,\n },\n callback: (args: {\n workflowId: string;\n payload?: Record<string, unknown>;\n }) => {\n syncRuntimeUrl();\n return fireWorkflow(args.workflowId, args.payload ?? {});\n },\n};\n\n/** Workflow authoring and run tools, merged into `aiTools` in tools.ts. */\nexport const workflowTools: PhAiToolDescriptor[] = [\n getWorkflowPieceBlocksTool,\n getWorkflowBlockConfigTool,\n listWorkflowCoreBlocksTool,\n listWorkflowRunsTool,\n fireWorkflowTool,\n];\n","// Read-only AI tool descriptors for the Connect assistant: the project's\n// piece catalog, connection documents, and connection health. The `aiTools`\n// export is how the host app discovers this package's tools (the line in the\n// project index is synced by `ph generate`).\nimport type { PhAiToolDescriptor } from \"@powerhousedao/shared/document-model\";\nimport { z } from \"zod\";\nimport {\n connectorIdForPiece,\n isConfigValueMissing,\n packageFromConnectorId,\n planFromAuth,\n type AuthField,\n} from \"../editors/connection-editor/piece-auth.js\";\nimport {\n checkConnection as runConnectionCheck,\n fetchConnections,\n fetchPieceActions,\n fetchPieceCatalog,\n fetchPieceTriggers,\n type PieceSummary,\n} from \"../editors/workflow-editor/runtime-api.js\";\nimport { syncRuntimeUrl } from \"./runtime-url.js\";\nimport { workflowTools } from \"./workflow-tools.js\";\n\nconst MAX_CONNECTORS = 20;\n\nexport interface ConnectorField {\n name: string;\n label: string;\n required: boolean;\n description?: string;\n secret: boolean;\n}\n\nexport interface ConnectorDetail {\n connectorId: string;\n pieceName: string;\n displayName: string;\n description: string;\n version: string;\n authType: string;\n /** False for auth kinds the runtime cannot execute yet (OAUTH2, OIDC). */\n supported: boolean;\n fields: ConnectorField[];\n actions: string[];\n triggers: string[];\n}\n\nfunction toField(field: AuthField, secret: boolean): ConnectorField {\n return {\n name: field.name,\n label: field.displayName,\n required: field.required,\n description: field.description,\n secret,\n };\n}\n\nasync function connectorDetail(piece: PieceSummary): Promise<ConnectorDetail> {\n const plan = planFromAuth(piece.auth);\n const [actions, triggers] = await Promise.all([\n fetchPieceActions(piece.name),\n fetchPieceTriggers(piece.name),\n ]);\n return {\n connectorId: connectorIdForPiece(piece.name),\n pieceName: piece.name,\n displayName: piece.displayName,\n description: piece.description,\n version: piece.version,\n authType: plan.authType,\n supported: plan.supported,\n fields: [\n ...plan.configFields.map((field) => toField(field, false)),\n ...plan.secretFields.map((field) => toField(field, true)),\n ],\n actions: actions.map((action) => action.name),\n triggers: triggers.map((trigger) => trigger.name),\n };\n}\n\n/**\n * Stage one of connector discovery: the catalog, optionally narrowed to a\n * case-insensitive substring match on name, display name, or description,\n * capped at {@link MAX_CONNECTORS}. Full auth/action/trigger detail is\n * fetched only for the surviving entries (stage two).\n */\nexport async function getConnectors(query?: string): Promise<{\n total: number;\n matches: number;\n truncated: boolean;\n connectors: ConnectorDetail[];\n}> {\n syncRuntimeUrl();\n const catalog = await fetchPieceCatalog();\n const needle = query?.trim().toLowerCase();\n const matches = needle\n ? catalog.filter((piece) =>\n [piece.name, piece.displayName, piece.description].some((field) =>\n field.toLowerCase().includes(needle),\n ),\n )\n : [...catalog];\n const page = matches.slice(0, MAX_CONNECTORS);\n const connectors = await Promise.all(page.map(connectorDetail));\n return {\n total: catalog.length,\n matches: matches.length,\n truncated: matches.length > page.length,\n connectors,\n };\n}\n\ninterface ConnectionState {\n config?: unknown;\n secretRefs?: { name: string }[];\n}\n\nexport interface ConnectionDetail {\n id: string;\n name: string;\n connectorId: string;\n authType: string;\n status: string;\n accountLabel: string | null;\n /** Required secret fields with no stored ref, by auth property name. */\n missingSecrets: string[];\n /** Required config fields with no value, by auth property name. */\n missingConfig: string[];\n}\n\n/**\n * Every connection document with its credential state compared against the\n * piece's auth plan. Only field names and opaque refs are surfaced; secret\n * values never do.\n */\nexport async function getConnections(): Promise<{\n connections: ConnectionDetail[];\n}> {\n syncRuntimeUrl();\n const [catalog, summaries] = await Promise.all([\n fetchPieceCatalog(),\n fetchConnections(),\n ]);\n const client =\n typeof window !== \"undefined\" ? window.ph?.reactorClient : undefined;\n const connections = await Promise.all(\n summaries.map(async (summary) => {\n const piece = catalog.find(\n (entry) => entry.name === packageFromConnectorId(summary.connectorId),\n );\n const plan = planFromAuth(piece?.auth ?? null);\n let state: ConnectionState | undefined;\n if (client) {\n try {\n const document = await client.get(summary.id);\n state = (document.state as { global?: ConnectionState }).global;\n } catch {\n state = undefined;\n }\n }\n const refNames = new Set(\n (state?.secretRefs ?? []).map((ref) => ref.name),\n );\n const config = (state?.config ?? {}) as Record<string, unknown>;\n return {\n id: summary.id,\n name: summary.name,\n connectorId: summary.connectorId,\n authType: summary.authType,\n status: summary.status,\n accountLabel: summary.accountLabel,\n missingSecrets: plan.secretFields\n .filter((field) => field.required && !refNames.has(field.name))\n .map((field) => field.name),\n missingConfig: plan.configFields\n .filter(\n (field) =>\n field.required && isConfigValueMissing(config[field.name]),\n )\n .map((field) => field.name),\n };\n }),\n );\n return { connections };\n}\n\nconst READ_ONLY = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport const getConnectorsTool: PhAiToolDescriptor = {\n name: \"getConnectors\",\n description:\n \"Lists the connectors (Activepieces pieces) available to the workflow runtime with their auth fields, actions, and triggers. Without a query it returns up to 20 connectors; pass `query` to search by name or description. Secret fields are listed by name only, never by value.\",\n inputSchema: { query: z.string().optional() },\n annotations: { title: \"Get Connectors\", ...READ_ONLY },\n callback: (args: { query?: string }) => getConnectors(args.query),\n};\n\nexport const getConnectionsTool: PhAiToolDescriptor = {\n name: \"getConnections\",\n description:\n \"Lists the project's connection documents with their credential status: which required secrets and config values are still missing, and the last account label. Secret values are never included.\",\n inputSchema: {},\n annotations: { title: \"Get Connections\", ...READ_ONLY },\n callback: () => getConnections(),\n};\n\nexport const checkConnectionTool: PhAiToolDescriptor = {\n name: \"checkConnection\",\n description:\n \"Runs a connection's own check against its stored credentials to verify they work. Takes a connection id (from getConnections) and reports success, the failure detail, and the account label when the provider returns one.\",\n inputSchema: { connectionId: z.string() },\n annotations: { title: \"Check Connection\", ...READ_ONLY },\n callback: (args: { connectionId: string }) => {\n syncRuntimeUrl();\n return runConnectionCheck(args.connectionId);\n },\n};\n\n/** Tool descriptors the host app offers the AI assistant. */\nexport const aiTools: PhAiToolDescriptor[] = [\n getConnectorsTool,\n getConnectionsTool,\n checkConnectionTool,\n ...workflowTools,\n];\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { ConnectionEditor } from \"./connection-editor/module.js\";\nimport { WorkflowEditor } from \"./workflow-editor/module.js\";\nimport { WorkflowStudio } from \"./workflow-studio/module.js\";\n\nexport const editors: EditorModule[] = [\n ConnectionEditor,\n WorkflowEditor,\n WorkflowStudio,\n];\n","import type { Manifest } from \"document-model\";\nimport manifestJson from \"./powerhouse.manifest.json\" with { type: \"json\" };\n\nexport { aiTools } from \"./ai/tools.js\";\nexport { documentModels } from \"./document-models/document-models.js\";\nexport { upgradeManifests } from \"./document-models/upgrade-manifests.js\";\nexport { editors } from \"./editors/editors.js\";\nexport const manifest = manifestJson as Manifest;\n"],"mappings":";;;;;;;;;AAQA,SAAgB,iBAAuB;AACrC,KAAI,OAAO,WAAW,YAAa;CACnC,MAAM,cAAc,wBAAwB,OAAO,IAAI,gBAAgB;AAGvE,eACE,cACI,GAAG,YAAY,WAAW,qBAC1B,oBACL;;;;ACEH,MAAMA,cAAY;CAChB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CAChB;AAID,MAAM,gBAAgB,IAAI,IAAI;CAAC;CAAe;CAAiB;CAAe,CAAC;AAE/E,SAAS,OAAO,WAAuC;AACrD,QAAO,cAAc,IAAI,UAAU,IAAI,UAAU,SAAS,YAAY,GAClE,YACA;;AAGN,SAAS,SAAS,WAA6B;AAC7C,QAAO,cAA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,QAAQ;GAClB,QAAQ,QAAQ;GAChB,cAAc,QAAQ;GACtB,gBAAgB,KAAK,aAClB,QAAQ,UAAU,MAAM,YAAY,CAAC,SAAS,IAAI,MAAM,KAAK,CAAC,CAC9D,KAAK,UAAU,MAAM,KAAK;GAC7B,eAAe,KAAK,aACjB,QACE,UACC,MAAM,YAAY,qBAAqB,OAAO,MAAM,MAAM,CAC7D,CACA,KAAK,UAAU,MAAM,KAAK;GAC9B;GACD,CACH,EACqB;;AAGxB,MAAM,YAAY;CAChB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;CAChB;;AAiCD,MAAa,UAAgC;CA/BQ;EACnD,MAAM;EACN,aACE;EACF,aAAa,EAAE,OAAO,EAAE,QAAQ,CAAC,UAAU,EAAE;EAC7C,aAAa;GAAE,OAAO;GAAkB,GAAG;GAAW;EACtD,WAAW,SAA6B,cAAc,KAAK,MAAM;EAClE;CAEqD;EACpD,MAAM;EACN,aACE;EACF,aAAa,EAAE;EACf,aAAa;GAAE,OAAO;GAAmB,GAAG;GAAW;EACvD,gBAAgB,gBAAgB;EACjC;CAEsD;EACrD,MAAM;EACN,aACE;EACF,aAAa,EAAE,cAAc,EAAE,QAAQ,EAAE;EACzC,aAAa;GAAE,OAAO;GAAoB,GAAG;GAAW;EACxD,WAAW,SAAmC;AAC5C,mBAAgB;AAChB,UAAOC,gBAAmB,KAAK,aAAa;;EAE/C;CAOC,GAAG;CACJ;;;AC7ND,MAAa,UAA0B;CACrC;CACA;CACA;CACD;;;ACND,MAAa,WAAWC"}
1
+ {"version":3,"file":"index.js","names":["READ_ONLY","runConnectionCheck","manifestJson"],"sources":["../../ai/runtime-url.ts","../../ai/workflow-tools.ts","../../ai/tools.ts","../../editors/editors.ts","../../index.ts"],"sourcesContent":["// Points the module-level runtime client at the selected drive's\n// workflow-runtime subgraph before an AI tool talks to it.\nimport { resolveDriveSwitchboard } from \"@powerhousedao/reactor-browser/ai\";\nimport {\n DEFAULT_RUNTIME_URL,\n setRuntimeUrl,\n} from \"../editors/workflow-editor/runtime-api.js\";\n\nexport function syncRuntimeUrl(): void {\n if (typeof window === \"undefined\") return;\n const switchboard = resolveDriveSwitchboard(window.ph?.selectedDriveId);\n // No resolvable switchboard (no selection, or a local/unsynced drive):\n // reset to the default rather than leaving a prior drive's URL attached.\n setRuntimeUrl(\n switchboard\n ? `${switchboard.graphqlUrl}/workflow-runtime`\n : DEFAULT_RUNTIME_URL,\n );\n}\n","// AI tool descriptors for authoring and running workflows: the exact block\n// types a piece offers, a block's config props, the built-in core blocks with\n// the expression syntax, run history and manual firing. Complements the\n// connector/connection tools in tools.ts, which cover the catalog and auth.\nimport type { PhAiToolDescriptor } from \"@powerhousedao/shared/document-model\";\nimport { z } from \"zod\";\nimport {\n fetchPieceActions,\n fetchPieceTriggers,\n fetchRuns,\n fireWorkflow,\n getBlockForm,\n} from \"../editors/workflow-editor/runtime-api.js\";\nimport {\n CORE_FORMS,\n type BlockFormProp,\n} from \"../editors/workflow-editor/ui/forms.js\";\nimport { syncRuntimeUrl } from \"./runtime-url.js\";\n\nconst READ_ONLY = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\n// Core blocks that are triggers. A piece's trigger says so in its own block\n// type, which is how every document trigger is classified now.\nconst CORE_TRIGGERS = new Set([\"core#manual\", \"core#schedule\", \"core#webhook\"]);\n\nfunction kindOf(blockType: string): \"trigger\" | \"step\" {\n return CORE_TRIGGERS.has(blockType) || blockType.includes(\"#trigger:\")\n ? \"trigger\"\n : \"step\";\n}\n\nfunction portsFor(blockType: string): string[] {\n return blockType === \"core#branch\" ? [\"true\", \"false\"] : [\"next\"];\n}\n\nfunction describeProp(prop: BlockFormProp) {\n return {\n name: prop.name,\n label: prop.displayName,\n type: prop.type,\n required: prop.required,\n ...(prop.description ? { description: prop.description } : {}),\n ...(prop.defaultValue !== undefined ? { default: prop.defaultValue } : {}),\n ...(prop.staticOptions\n ? { options: prop.staticOptions.map((option) => option.value) }\n : {}),\n ...(prop.hasDynamicResolver ? { dynamicOptions: true } : {}),\n };\n}\n\nconst EXPRESSIONS = [\n \"Step configs and edge conditions may contain expressions in double braces.\",\n \"{{trigger.payload.<field>}} reads the trigger payload: for core#manual the payload passed to fireWorkflow; for the reactor piece's document triggers it carries documentId, documentType, driveId and name.\",\n \"{{steps.<key>.output.<path>}} reads an upstream step's output by that step's key, e.g. {{steps.fetch.output.body.title}}.\",\n \"{{variables.<key>}} reads a workflow variable.\",\n \"'a' || 'b' picks the first non-empty value, e.g. {{trigger.payload.url || 'https://example.com'}}.\",\n \"A whole-string expression yields the raw value; text around expressions is interpolated.\",\n];\n\nconst GRAPH_RULES = [\n \"A workflow is a powerhouse/workflow document. Build it with SET_TRIGGER once, ADD_STEP per step (each with a unique id and key), and ADD_EDGE from the trigger id to the first step and between steps.\",\n \"Edges use port 'next' for the trigger and ordinary steps; core#branch emits 'true' and 'false'.\",\n \"Piece block types are '<package>@<version>#<action>' for actions and '<package>@<version>#trigger:<trigger>' for triggers. Always use the pinned strings returned by getWorkflowPieceBlocks.\",\n \"Steps whose piece needs a connection must set connectionId to a powerhouse/connection document id (see getConnections).\",\n \"Only workflows with status ENABLED get trigger instances and can be fired; set it with SET_WORKFLOW_STATUS.\",\n];\n\nexport const getWorkflowPieceBlocksTool: PhAiToolDescriptor = {\n name: \"getWorkflowPieceBlocks\",\n description:\n \"Lists the actions and triggers of one Activepieces piece with the exact, version-pinned blockType to use in ADD_STEP or SET_TRIGGER. Takes the piece package name from getConnectors. Call getWorkflowBlockConfig next for a block's config props.\",\n inputSchema: {\n packageName: z\n .string()\n .describe(\"Piece package name, e.g. @activepieces/piece-http.\"),\n },\n annotations: { title: \"Get Workflow Piece Blocks\", ...READ_ONLY },\n callback: async (args: { packageName: string }) => {\n syncRuntimeUrl();\n const [actions, triggers] = await Promise.all([\n fetchPieceActions(args.packageName),\n fetchPieceTriggers(args.packageName),\n ]);\n return {\n packageName: args.packageName,\n actions: actions.map((action) => ({\n blockType: action.blockType,\n displayName: action.displayName,\n description: action.description,\n })),\n triggers: triggers.map((trigger) => ({\n blockType: trigger.blockType,\n displayName: trigger.displayName,\n description: trigger.description,\n strategy: trigger.strategy,\n })),\n };\n },\n};\n\nexport const getWorkflowBlockConfigTool: PhAiToolDescriptor = {\n name: \"getWorkflowBlockConfig\",\n description:\n \"Describes the config of a block type (core#… or a piece blockType): prop names, types, whether required, allowed options, the output ports, and whether a connection is needed. Use it before writing a step or trigger config.\",\n inputSchema: {\n blockType: z\n .string()\n .describe(\n \"Block type, e.g. core#branch or @activepieces/piece-http@0.11.19#send_request.\",\n ),\n },\n annotations: { title: \"Get Workflow Block Config\", ...READ_ONLY },\n callback: async (args: { blockType: string }) => {\n const { blockType } = args;\n if (!Object.hasOwn(CORE_FORMS, blockType)) syncRuntimeUrl();\n const form = await getBlockForm(blockType);\n if (!form) {\n return {\n blockType,\n error:\n \"Unknown block type. Use getConnectors and getWorkflowPieceBlocks to find valid block types (documents live in @powerhousedao/piece-reactor), or listWorkflowCoreBlocks for built-ins.\",\n };\n }\n return {\n blockType,\n title: form.title,\n kind: kindOf(blockType),\n requiresConnection: form.auth === \"required\",\n props: form.props.map(describeProp),\n ports: portsFor(blockType),\n };\n },\n};\n\nexport const listWorkflowCoreBlocksTool: PhAiToolDescriptor = {\n name: \"listWorkflowCoreBlocks\",\n description:\n \"Lists the built-in core#… blocks (manual, schedule and webhook triggers, branch and assert) with their config props, plus the expression syntax and the rules for building a powerhouse/workflow document. Documents are read and written by the @powerhousedao/piece-reactor blocks; list those with getWorkflowPieceBlocks.\",\n inputSchema: {},\n annotations: { title: \"List Workflow Core Blocks\", ...READ_ONLY },\n callback: () =>\n Promise.resolve({\n blocks: Object.entries(CORE_FORMS).map(([blockType, form]) => ({\n blockType,\n title: form.title,\n kind: kindOf(blockType),\n props: form.props.map(describeProp),\n ports: portsFor(blockType),\n })),\n expressions: EXPRESSIONS,\n rules: GRAPH_RULES,\n }),\n};\n\nexport const listWorkflowRunsTool: PhAiToolDescriptor = {\n name: \"listWorkflowRuns\",\n description:\n \"Lists recent workflow runs, newest first, with status, error and each step's outcome. Filter by workflowId to inspect one workflow, or by driveId for every workflow in a drive.\",\n inputSchema: {\n workflowId: z\n .string()\n .optional()\n .describe(\"Workflow document id to filter by.\"),\n driveId: z\n .string()\n .optional()\n .describe(\"Drive id to filter by (all workflows in that drive).\"),\n limit: z\n .number()\n .int()\n .min(1)\n .max(100)\n .optional()\n .describe(\"Maximum runs to return (default 10).\"),\n },\n annotations: { title: \"List Workflow Runs\", ...READ_ONLY },\n callback: async (args: {\n workflowId?: string;\n driveId?: string;\n limit?: number;\n }) => {\n syncRuntimeUrl();\n const runs = await fetchRuns({\n workflowId: args.workflowId,\n driveId: args.driveId,\n limit: args.limit ?? 10,\n });\n return {\n runs: runs.map((run) => ({\n id: run.id,\n workflowId: run.workflowId,\n workflowName: run.workflowName,\n status: run.status,\n error: run.error,\n triggerKind: run.triggerKind,\n startedAt: run.startedAt,\n endedAt: run.endedAt,\n steps: run.steps.map((step) => ({\n key: step.stepKey,\n status: step.status,\n error: step.error,\n })),\n })),\n };\n },\n};\n\nexport const fireWorkflowTool: PhAiToolDescriptor = {\n name: \"fireWorkflow\",\n description:\n \"Fires an ENABLED workflow that has a core#manual trigger and runs it to completion. The payload becomes {{trigger.payload}}. Returns the run id and final status.\",\n inputSchema: {\n workflowId: z.string().describe(\"Workflow document id.\"),\n payload: z\n .record(z.string(), z.unknown())\n .optional()\n .describe(\"Trigger payload object.\"),\n },\n annotations: {\n title: \"Fire Workflow\",\n readOnlyHint: false,\n destructiveHint: true,\n idempotentHint: false,\n openWorldHint: false,\n },\n callback: (args: {\n workflowId: string;\n payload?: Record<string, unknown>;\n }) => {\n syncRuntimeUrl();\n return fireWorkflow(args.workflowId, args.payload ?? {});\n },\n};\n\n/** Workflow authoring and run tools, merged into `aiTools` in tools.ts. */\nexport const workflowTools: PhAiToolDescriptor[] = [\n getWorkflowPieceBlocksTool,\n getWorkflowBlockConfigTool,\n listWorkflowCoreBlocksTool,\n listWorkflowRunsTool,\n fireWorkflowTool,\n];\n","// Read-only AI tool descriptors for the Connect assistant: the project's\n// piece catalog, connection documents, and connection health. The `aiTools`\n// export is how the host app discovers this package's tools (the line in the\n// project index is synced by `ph generate`).\nimport type { PhAiToolDescriptor } from \"@powerhousedao/shared/document-model\";\nimport { z } from \"zod\";\nimport {\n connectorIdForPiece,\n isConfigValueMissing,\n packageFromConnectorId,\n planFromAuth,\n type AuthField,\n} from \"../editors/connection-editor/piece-auth.js\";\nimport {\n checkConnection as runConnectionCheck,\n fetchConnections,\n fetchPieceActions,\n fetchPieceCatalog,\n fetchPieceTriggers,\n type PieceSummary,\n} from \"../editors/workflow-editor/runtime-api.js\";\nimport { syncRuntimeUrl } from \"./runtime-url.js\";\nimport { workflowTools } from \"./workflow-tools.js\";\n\nconst MAX_CONNECTORS = 20;\n\nexport interface ConnectorField {\n name: string;\n label: string;\n required: boolean;\n description?: string;\n secret: boolean;\n}\n\nexport interface ConnectorDetail {\n connectorId: string;\n pieceName: string;\n displayName: string;\n description: string;\n version: string;\n authType: string;\n /** False for auth kinds the runtime cannot execute yet (OAUTH2, OIDC). */\n supported: boolean;\n fields: ConnectorField[];\n actions: string[];\n triggers: string[];\n}\n\nfunction toField(field: AuthField, secret: boolean): ConnectorField {\n return {\n name: field.name,\n label: field.displayName,\n required: field.required,\n description: field.description,\n secret,\n };\n}\n\nasync function connectorDetail(piece: PieceSummary): Promise<ConnectorDetail> {\n const plan = planFromAuth(piece.auth);\n const [actions, triggers] = await Promise.all([\n fetchPieceActions(piece.name),\n fetchPieceTriggers(piece.name),\n ]);\n return {\n connectorId: connectorIdForPiece(piece.name),\n pieceName: piece.name,\n displayName: piece.displayName,\n description: piece.description,\n version: piece.version,\n authType: plan.authType,\n supported: plan.supported,\n fields: [\n ...plan.configFields.map((field) => toField(field, false)),\n ...plan.secretFields.map((field) => toField(field, true)),\n ],\n actions: actions.map((action) => action.name),\n triggers: triggers.map((trigger) => trigger.name),\n };\n}\n\n/**\n * Stage one of connector discovery: the catalog, optionally narrowed to a\n * case-insensitive substring match on name, display name, or description,\n * capped at {@link MAX_CONNECTORS}. Full auth/action/trigger detail is\n * fetched only for the surviving entries (stage two).\n */\nexport async function getConnectors(query?: string): Promise<{\n total: number;\n matches: number;\n truncated: boolean;\n connectors: ConnectorDetail[];\n}> {\n syncRuntimeUrl();\n const catalog = await fetchPieceCatalog();\n const needle = query?.trim().toLowerCase();\n const matches = needle\n ? catalog.filter((piece) =>\n [piece.name, piece.displayName, piece.description].some((field) =>\n field.toLowerCase().includes(needle),\n ),\n )\n : [...catalog];\n const page = matches.slice(0, MAX_CONNECTORS);\n const connectors = await Promise.all(page.map(connectorDetail));\n return {\n total: catalog.length,\n matches: matches.length,\n truncated: matches.length > page.length,\n connectors,\n };\n}\n\ninterface ConnectionState {\n config?: unknown;\n secretRefs?: { name: string }[];\n}\n\nexport interface ConnectionDetail {\n id: string;\n name: string;\n connectorId: string;\n authType: string;\n status: string;\n accountLabel: string | null;\n /** Required secret fields with no stored ref, by auth property name. */\n missingSecrets: string[];\n /** Required config fields with no value, by auth property name. */\n missingConfig: string[];\n}\n\n/**\n * Every connection document with its credential state compared against the\n * piece's auth plan. Only field names and opaque refs are surfaced; secret\n * values never do.\n */\nexport async function getConnections(): Promise<{\n connections: ConnectionDetail[];\n}> {\n syncRuntimeUrl();\n const [catalog, summaries] = await Promise.all([\n fetchPieceCatalog(),\n fetchConnections(),\n ]);\n const client =\n typeof window !== \"undefined\" ? window.ph?.reactorClient : undefined;\n const connections = await Promise.all(\n summaries.map(async (summary) => {\n const piece = catalog.find(\n (entry) => entry.name === packageFromConnectorId(summary.connectorId),\n );\n const plan = planFromAuth(piece?.auth ?? null);\n let state: ConnectionState | undefined;\n if (client) {\n try {\n const document = await client.get(summary.id);\n state = (document.state as { global?: ConnectionState }).global;\n } catch {\n state = undefined;\n }\n }\n const refNames = new Set(\n (state?.secretRefs ?? []).map((ref) => ref.name),\n );\n const config = (state?.config ?? {}) as Record<string, unknown>;\n return {\n id: summary.id,\n name: summary.name,\n connectorId: summary.connectorId,\n authType: summary.authType,\n status: summary.status,\n accountLabel: summary.accountLabel,\n missingSecrets: plan.secretFields\n .filter((field) => field.required && !refNames.has(field.name))\n .map((field) => field.name),\n missingConfig: plan.configFields\n .filter(\n (field) =>\n field.required && isConfigValueMissing(config[field.name]),\n )\n .map((field) => field.name),\n };\n }),\n );\n return { connections };\n}\n\nconst READ_ONLY = {\n readOnlyHint: true,\n destructiveHint: false,\n idempotentHint: true,\n openWorldHint: false,\n} as const;\n\nexport const getConnectorsTool: PhAiToolDescriptor = {\n name: \"getConnectors\",\n description:\n \"Lists the connectors (Activepieces pieces) available to the workflow runtime with their auth fields, actions, and triggers. Without a query it returns up to 20 connectors; pass `query` to search by name or description. Secret fields are listed by name only, never by value.\",\n inputSchema: { query: z.string().optional() },\n annotations: { title: \"Get Connectors\", ...READ_ONLY },\n callback: (args: { query?: string }) => getConnectors(args.query),\n};\n\nexport const getConnectionsTool: PhAiToolDescriptor = {\n name: \"getConnections\",\n description:\n \"Lists the project's connection documents with their credential status: which required secrets and config values are still missing, and the last account label. Secret values are never included.\",\n inputSchema: {},\n annotations: { title: \"Get Connections\", ...READ_ONLY },\n callback: () => getConnections(),\n};\n\nexport const checkConnectionTool: PhAiToolDescriptor = {\n name: \"checkConnection\",\n description:\n \"Runs a connection's own check against its stored credentials to verify they work. Takes a connection id (from getConnections) and reports success, the failure detail, and the account label when the provider returns one.\",\n inputSchema: { connectionId: z.string() },\n annotations: { title: \"Check Connection\", ...READ_ONLY },\n callback: (args: { connectionId: string }) => {\n syncRuntimeUrl();\n return runConnectionCheck(args.connectionId);\n },\n};\n\n/** Tool descriptors the host app offers the AI assistant. */\nexport const aiTools: PhAiToolDescriptor[] = [\n getConnectorsTool,\n getConnectionsTool,\n checkConnectionTool,\n ...workflowTools,\n];\n","/**\n * WARNING: DO NOT EDIT\n * This file is auto-generated and updated by codegen\n */\nimport type { EditorModule } from \"document-model\";\nimport { ConnectionEditor } from \"./connection-editor/module.js\";\nimport { WorkflowEditor } from \"./workflow-editor/module.js\";\nimport { WorkflowStudio } from \"./workflow-studio/module.js\";\n\nexport const editors: EditorModule[] = [\n ConnectionEditor,\n WorkflowEditor,\n WorkflowStudio,\n];\n","import type { Manifest } from \"document-model\";\nimport manifestJson from \"./powerhouse.manifest.json\" with { type: \"json\" };\n\nexport { aiTools } from \"./ai/tools.js\";\nexport { documentModels } from \"./document-models/document-models.js\";\nexport { upgradeManifests } from \"./document-models/upgrade-manifests.js\";\nexport { editors } from \"./editors/editors.js\";\nexport const manifest = manifestJson as Manifest;\n"],"mappings":";;;;;;;;;;AAQA,SAAgB,iBAAuB;CACrC,IAAI,OAAO,WAAW,aAAa;CACnC,MAAM,cAAc,wBAAwB,OAAO,IAAI,eAAe;CAGtE,cACE,cACI,GAAG,YAAY,WAAW,qBAC1B,mBACN;AACF;;;ACCA,MAAMA,cAAY;CAChB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;AACjB;AAIA,MAAM,gCAAgB,IAAI,IAAI;CAAC;CAAe;CAAiB;AAAc,CAAC;AAE9E,SAAS,OAAO,WAAuC;CACrD,OAAO,cAAc,IAAI,SAAS,KAAK,UAAU,SAAS,WAAW,IACjE,YACA;AACN;AAEA,SAAS,SAAS,WAA6B;CAC7C,OAAO,cAAc,gBAAgB,CAAC,QAAQ,OAAO,IAAI,CAAC,MAAM;AAClE;AAEA,SAAS,aAAa,MAAqB;CACzC,OAAO;EACL,MAAM,KAAK;EACX,OAAO,KAAK;EACZ,MAAM,KAAK;EACX,UAAU,KAAK;EACf,GAAI,KAAK,cAAc,EAAE,aAAa,KAAK,YAAY,IAAI,CAAC;EAC5D,GAAI,KAAK,iBAAiB,KAAA,IAAY,EAAE,SAAS,KAAK,aAAa,IAAI,CAAC;EACxE,GAAI,KAAK,gBACL,EAAE,SAAS,KAAK,cAAc,KA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E,UACC,MAAM,YAAY,qBAAqB,OAAO,MAAM,KAAK,CAC7D,CAAC,CACA,KAAK,UAAU,MAAM,IAAI;EAC9B;CACF,CAAC,CACH,EACqB;AACvB;AAEA,MAAM,YAAY;CAChB,cAAc;CACd,iBAAiB;CACjB,gBAAgB;CAChB,eAAe;AACjB;;AAiCA,MAAa,UAAgC;CAC3C;EA/BA,MAAM;EACN,aACE;EACF,aAAa,EAAE,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,EAAE;EAC5C,aAAa;GAAE,OAAO;GAAkB,GAAG;EAAU;EACrD,WAAW,SAA6B,cAAc,KAAK,KAAK;CA0BhE;CACA;EAvBA,MAAM;EACN,aACE;EACF,aAAa,CAAC;EACd,aAAa;GAAE,OAAO;GAAmB,GAAG;EAAU;EACtD,gBAAgB,eAAe;CAkB/B;CACA;EAfA,MAAM;EACN,aACE;EACF,aAAa,EAAE,cAAc,EAAE,OAAO,EAAE;EACxC,aAAa;GAAE,OAAO;GAAoB,GAAG;EAAU;EACvD,WAAW,SAAmC;GAC5C,eAAe;GACf,OAAOC,gBAAmB,KAAK,YAAY;EAC7C;CAOA;CACA,GAAG;AACL;;;AC7NA,MAAa,UAA0B;CACrC;CACA;CACA;AACF;;;ACNA,MAAa,WAAWC"}
@@ -1,4 +1,4 @@
1
- import { n as __exportAll } from "./chunk-BoAXSpZd.js";
1
+ import { n as __exportAll } from "./rolldown-runtime-DC62tzP2.js";
2
2
  import * as z$1 from "zod";
3
3
  import { z } from "zod";
4
4
  import { BaseDocumentHeaderSchema, BaseDocumentStateSchema, baseActions, baseCreateDocument, baseLoadFromInputVersioned, baseSaveToFileHandle, createAction, createBaseState, createReducer, createState, defaultBaseState, isDocumentAction } from "document-model";
@@ -707,7 +707,7 @@ var EdgeNotFoundError = class extends Error {
707
707
  //#endregion
708
708
  //#region document-models/workflow/v1/src/reducers/edges.ts
709
709
  function wouldCycle(edges, from, to) {
710
- const seen = new Set([to]);
710
+ const seen = /* @__PURE__ */ new Set([to]);
711
711
  const queue = [to];
712
712
  while (queue.length > 0) {
713
713
  const current = queue.pop();
@@ -1138,4 +1138,4 @@ const Workflow = {
1138
1138
  //#endregion
1139
1139
  export { RemoveVariableInputSchema as $, addStep as A, creators_exports$6 as B, setWorkflowStatus as C, clearTrigger as D, setVariable as E, creators_exports$4 as F, AddStepRetryPolicyInputSchema as G, AddEdgeInputSchema as H, setLastRun as I, ConcurrencyModeSchema as J, BackoffKindSchema as K, creators_exports$5 as L, removeStep as M, setStepConfig as N, creators_exports$2 as O, updateStep as P, RemoveStepInputSchema as Q, setPolicy as R, setWorkflowName as S, isDefinedNonNullAny as St, removeVariable as T, AddStepInputSchema as U, removeEdge as V, AddStepPositionInputSchema as W, PointSchema as X, FailureModeSchema as Y, RemoveEdgeInputSchema as Z, reducer as _, WorkflowStateSchema as _t, utils$1 as a, SetStepConfigInputSchema as at, creators_exports as b, WorkflowVariableSchema as bt, WorkflowPHStateSchema as c, SetWorkflowDescriptionInputSchema as ct, isWorkflowDocument as d, TriggerBindingSchema as dt, RetryPolicySchema as et, isWorkflowState as f, UpdateStepInputSchema as ft, supportedVersions as g, WorkflowPolicySchema as gt, latestVersion as h, WorkflowEdgeSchema as ht, initialLocalState as i, SetPolicyRetryPolicyInputSchema as it, creators_exports$3 as j, setTrigger as k, assertIsWorkflowDocument as l, SetWorkflowNameInputSchema as lt, workflowUpgradeManifest as m, UpdateStepRetryPolicyInputSchema as mt, utils as n, SetLastRunInputSchema as nt, WorkflowDocumentHeaderSchema as o, SetTriggerInputSchema as ot, workflowDocumentType as p, UpdateStepPositionInputSchema as pt, ClearTriggerInputSchema as q, initialGlobalState as r, SetPolicyInputSchema as rt, WorkflowDocumentSchema as s, SetVariableInputSchema as st, Workflow as t, RunStatusSchema as tt, assertIsWorkflowState as u, SetWorkflowStatusInputSchema as ut, documentModel as v, WorkflowStatusSchema as vt, creators_exports$1 as w, setWorkflowDescription as x, definedNonNullAnySchema as xt, actions as y, WorkflowStepSchema as yt, addEdge as z };
1140
1140
 
1141
- //# sourceMappingURL=module-CYQnNZWl.js.map
1141
+ //# sourceMappingURL=module-Bkms70LV.js.map