@powerhousedao/workflow 6.2.3-dev.43 → 6.2.3-dev.45

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 (233) hide show
  1. package/dist/browser/{BlockSelector-C-C56Wcf.js → BlockSelector-B41mSc0W.js} +431 -411
  2. package/dist/browser/BlockSelector-B41mSc0W.js.map +1 -0
  3. package/dist/browser/assets/{entry-KqlcH_wb.js → entry-CtB3hwiW.js} +99 -3
  4. package/dist/browser/assets/{projection-entry-DD5A5lZY.js → projection-entry-Cd33KgnS.js} +2 -3
  5. package/dist/browser/{connection-BUum0hJI.js → connection-BP17lpt3.js} +2 -2
  6. package/dist/browser/{connection-BUum0hJI.js.map → connection-BP17lpt3.js.map} +1 -1
  7. package/dist/browser/{connection-form-C9iDnI6H.js → connection-form-CkRzKggD.js} +524 -13
  8. package/dist/browser/connection-form-CkRzKggD.js.map +1 -0
  9. package/dist/browser/{data-tree-B4W7ZUmG.js → data-tree-BugZMgLk.js} +2 -2
  10. package/dist/browser/{data-tree-B4W7ZUmG.js.map → data-tree-BugZMgLk.js.map} +1 -1
  11. package/dist/browser/document-models/connection/index.js +3 -3
  12. package/dist/browser/document-models/index.js +3 -3
  13. package/dist/browser/document-models/workflow/index.js +2 -2
  14. package/dist/browser/{document-models-C1ZgIZyV.js → document-models-B7IwLbfO.js} +3 -3
  15. package/dist/browser/{document-models-C1ZgIZyV.js.map → document-models-B7IwLbfO.js.map} +1 -1
  16. package/dist/browser/{editor-cEmJfc9W.js → editor-9eSmoDTm.js} +331 -39
  17. package/dist/browser/editor-9eSmoDTm.js.map +1 -0
  18. package/dist/browser/{editor-4BJf6hN7.js → editor-DvK4LPwF.js} +7 -10
  19. package/dist/browser/editor-DvK4LPwF.js.map +1 -0
  20. package/dist/browser/{editor-Crt3ZeGd.js → editor-ldDYxtLV.js} +166 -43
  21. package/dist/browser/editor-ldDYxtLV.js.map +1 -0
  22. package/dist/browser/editors/connection-editor/module.js +1 -1
  23. package/dist/browser/editors/workflow-editor/module.js +1 -1
  24. package/dist/browser/editors/workflow-studio/module.js +1 -1
  25. package/dist/browser/graphql-Cr1ia6fo.js +2474 -0
  26. package/dist/browser/graphql-Cr1ia6fo.js.map +1 -0
  27. package/dist/browser/index.js +9 -5
  28. package/dist/browser/index.js.map +1 -1
  29. package/dist/browser/{module-jDZ4pq3W.js → module-B2BMwu5E.js} +129 -17
  30. package/dist/browser/module-B2BMwu5E.js.map +1 -0
  31. package/dist/browser/{module-DU2vb3FH.js → module-D4UiG9ii.js} +13 -5
  32. package/dist/browser/module-D4UiG9ii.js.map +1 -0
  33. package/dist/browser/reactor/index.js +2 -2
  34. package/dist/browser/{runtime-queries-Ds2kk-Ow.js → runtime-queries-IZG_nonR.js} +85 -11
  35. package/dist/browser/runtime-queries-IZG_nonR.js.map +1 -0
  36. package/dist/browser/{trigger-text-5CT870cu.js → trigger-text-C37YRggR.js} +142 -20
  37. package/dist/browser/trigger-text-C37YRggR.js.map +1 -0
  38. package/dist/browser/upgrade-manifests-C_9cyumV.js +8 -0
  39. package/dist/browser/{upgrade-manifests-BpakVE9l.js.map → upgrade-manifests-C_9cyumV.js.map} +1 -1
  40. package/dist/browser/{workflow-BxShRhVy.js → workflow-DFLQ2cFr.js} +2 -2
  41. package/dist/browser/{workflow-BxShRhVy.js.map → workflow-DFLQ2cFr.js.map} +1 -1
  42. package/dist/node/{BlockSelector-C9_1wbx4.mjs → BlockSelector-BMnBzXcA.mjs} +431 -411
  43. package/dist/node/BlockSelector-BMnBzXcA.mjs.map +1 -0
  44. package/dist/node/{connection-D544oqVW.mjs → connection-BxJoL8js.mjs} +2 -2
  45. package/dist/node/{connection-D544oqVW.mjs.map → connection-BxJoL8js.mjs.map} +1 -1
  46. package/dist/node/{connection-form-DUOXUqBz.mjs → connection-form-DZFudcoD.mjs} +524 -13
  47. package/dist/node/connection-form-DZFudcoD.mjs.map +1 -0
  48. package/dist/node/{data-tree-CoV-swZZ.mjs → data-tree-CR8IOshA.mjs} +2 -2
  49. package/dist/node/{data-tree-CoV-swZZ.mjs.map → data-tree-CR8IOshA.mjs.map} +1 -1
  50. package/dist/node/document-models/connection/index.mjs +3 -3
  51. package/dist/node/document-models/index.mjs +3 -3
  52. package/dist/node/document-models/workflow/index.mjs +2 -2
  53. package/dist/node/{editor-BFDE4Q3v.mjs → editor-BV5CYmUI.mjs} +7 -10
  54. package/dist/node/editor-BV5CYmUI.mjs.map +1 -0
  55. package/dist/node/{editor-D2jRtRNl.mjs → editor-D_P9-st9.mjs} +166 -43
  56. package/dist/node/editor-D_P9-st9.mjs.map +1 -0
  57. package/dist/node/{editor-BwOQIwVw.mjs → editor-NUaiiO4B.mjs} +331 -39
  58. package/dist/node/editor-NUaiiO4B.mjs.map +1 -0
  59. package/dist/node/editors/connection-editor/module.mjs +1 -1
  60. package/dist/node/editors/workflow-editor/module.mjs +1 -1
  61. package/dist/node/editors/workflow-studio/module.mjs +1 -1
  62. package/dist/node/graphql-BGVLRhC1.mjs +14554 -0
  63. package/dist/node/graphql-BGVLRhC1.mjs.map +1 -0
  64. package/dist/node/index.mjs +9 -6
  65. package/dist/node/index.mjs.map +1 -1
  66. package/dist/node/{module-BMwJQh65.mjs → module-BlT-atBQ.mjs} +129 -17
  67. package/dist/node/module-BlT-atBQ.mjs.map +1 -0
  68. package/dist/node/{module-Dhe5E-VA.mjs → module-BsqRZox1.mjs} +13 -5
  69. package/dist/node/module-BsqRZox1.mjs.map +1 -0
  70. package/dist/node/pieces/reactor/descriptor.json +34 -17
  71. package/dist/node/pieces/reactor/index.mjs +67 -67
  72. package/dist/node/pieces/reactor/package.json +1 -1
  73. package/dist/node/{runtime-queries-D5EGaCrH.mjs → runtime-queries-BM6I7dDA.mjs} +85 -11
  74. package/dist/node/runtime-queries-BM6I7dDA.mjs.map +1 -0
  75. package/dist/node/{trigger-text-CXnnanWC.mjs → trigger-text-78ZhfT-b.mjs} +142 -20
  76. package/dist/node/trigger-text-78ZhfT-b.mjs.map +1 -0
  77. package/dist/node/upgrade-manifests-CYZfts3a.mjs +8 -0
  78. package/dist/node/{upgrade-manifests-CmNd742Y.mjs.map → upgrade-manifests-CYZfts3a.mjs.map} +1 -1
  79. package/dist/node/{workflow-CGzYGZnr.mjs → workflow-BpfdBHyS.mjs} +2 -2
  80. package/dist/node/{workflow-CGzYGZnr.mjs.map → workflow-BpfdBHyS.mjs.map} +1 -1
  81. package/dist/powerhouse.manifest.json +1 -1
  82. package/dist/style.css +44 -0
  83. package/dist/types/ai/workflow-tools.d.ts.map +1 -1
  84. package/dist/types/document-models/connection/v1/gen/config/error.d.ts +15 -1
  85. package/dist/types/document-models/connection/v1/gen/config/error.d.ts.map +1 -1
  86. package/dist/types/document-models/connection/v1/gen/connection/error.d.ts +13 -1
  87. package/dist/types/document-models/connection/v1/gen/connection/error.d.ts.map +1 -1
  88. package/dist/types/document-models/connection/v1/gen/document-model.d.ts.map +1 -1
  89. package/dist/types/document-models/connection/v1/gen/reducer.d.ts.map +1 -1
  90. package/dist/types/document-models/connection/v1/gen/schema/types.d.ts +11 -2
  91. package/dist/types/document-models/connection/v1/gen/schema/types.d.ts.map +1 -1
  92. package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts +3 -1
  93. package/dist/types/document-models/connection/v1/gen/schema/zod.d.ts.map +1 -1
  94. package/dist/types/document-models/connection/v1/src/reactor-connection.d.ts +17 -0
  95. package/dist/types/document-models/connection/v1/src/reactor-connection.d.ts.map +1 -0
  96. package/dist/types/document-models/connection/v1/src/reducers/config.d.ts.map +1 -1
  97. package/dist/types/document-models/connection/v1/src/reducers/connection.d.ts.map +1 -1
  98. package/dist/types/document-models/connection/v1/src/utils.d.ts +1 -1
  99. package/dist/types/document-models/connection/v1/src/utils.d.ts.map +1 -1
  100. package/dist/types/document-models/connection/v1/tests/reactor-connection.test.d.ts +2 -0
  101. package/dist/types/document-models/connection/v1/tests/reactor-connection.test.d.ts.map +1 -0
  102. package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts +7 -0
  103. package/dist/types/document-models/workflow/v1/gen/schema/types.d.ts.map +1 -1
  104. package/dist/types/document-models/workflow/v1/gen/schema/zod.d.ts.map +1 -1
  105. package/dist/types/document-models/workflow/v1/src/reducers/steps.d.ts.map +1 -1
  106. package/dist/types/document-models/workflow/v1/src/reducers/trigger.d.ts.map +1 -1
  107. package/dist/types/document-models/workflow/v1/tests/reactor-connection.test.d.ts +2 -0
  108. package/dist/types/document-models/workflow/v1/tests/reactor-connection.test.d.ts.map +1 -0
  109. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts +1 -1
  110. package/dist/types/editors/connection-editor/ConnectionToolbar.d.ts.map +1 -1
  111. package/dist/types/editors/connection-editor/ReactorBindings.d.ts +6 -0
  112. package/dist/types/editors/connection-editor/ReactorBindings.d.ts.map +1 -0
  113. package/dist/types/editors/connection-editor/ReactorConnectionSettings.d.ts +7 -0
  114. package/dist/types/editors/connection-editor/ReactorConnectionSettings.d.ts.map +1 -0
  115. package/dist/types/editors/connection-editor/connection-callbacks.d.ts.map +1 -1
  116. package/dist/types/editors/connection-editor/connection-form.d.ts +4 -1
  117. package/dist/types/editors/connection-editor/connection-form.d.ts.map +1 -1
  118. package/dist/types/editors/connection-editor/connection-usage.d.ts +13 -3
  119. package/dist/types/editors/connection-editor/connection-usage.d.ts.map +1 -1
  120. package/dist/types/editors/connection-editor/editor.d.ts.map +1 -1
  121. package/dist/types/editors/connection-editor/status.d.ts.map +1 -1
  122. package/dist/types/editors/shared/data-viewer.d.ts.map +1 -1
  123. package/dist/types/editors/shared/document-ref.d.ts +5 -0
  124. package/dist/types/editors/shared/document-ref.d.ts.map +1 -0
  125. package/dist/types/editors/workflow-editor/document/useWorkflowModel.d.ts.map +1 -1
  126. package/dist/types/editors/workflow-editor/editor.d.ts.map +1 -1
  127. package/dist/types/editors/workflow-editor/reactor-hooks.d.ts +25 -0
  128. package/dist/types/editors/workflow-editor/reactor-hooks.d.ts.map +1 -0
  129. package/dist/types/editors/workflow-editor/runtime-client.d.ts +16 -1
  130. package/dist/types/editors/workflow-editor/runtime-client.d.ts.map +1 -1
  131. package/dist/types/editors/workflow-editor/runtime-persist.d.ts +1 -1
  132. package/dist/types/editors/workflow-editor/ui/CreateConnectionModal.d.ts.map +1 -1
  133. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts +3 -0
  134. package/dist/types/editors/workflow-editor/ui/PropertyForm.d.ts.map +1 -1
  135. package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts +13 -0
  136. package/dist/types/editors/workflow-editor/ui/PublishControls.d.ts.map +1 -1
  137. package/dist/types/editors/workflow-editor/ui/ReactorConnectionField.d.ts +9 -0
  138. package/dist/types/editors/workflow-editor/ui/ReactorConnectionField.d.ts.map +1 -0
  139. package/dist/types/editors/workflow-editor/ui/SignInPrompt.d.ts +6 -0
  140. package/dist/types/editors/workflow-editor/ui/SignInPrompt.d.ts.map +1 -0
  141. package/dist/types/editors/workflow-editor/ui/StepError.d.ts +4 -0
  142. package/dist/types/editors/workflow-editor/ui/StepError.d.ts.map +1 -0
  143. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts +1 -0
  144. package/dist/types/editors/workflow-editor/ui/StepPanel.d.ts.map +1 -1
  145. package/dist/types/editors/workflow-editor/ui/SwitchboardGrants.d.ts +2 -0
  146. package/dist/types/editors/workflow-editor/ui/SwitchboardGrants.d.ts.map +1 -0
  147. package/dist/types/editors/workflow-editor/ui/WorkflowEditorApp.d.ts.map +1 -1
  148. package/dist/types/editors/workflow-editor/ui/design-time.d.ts +1 -0
  149. package/dist/types/editors/workflow-editor/ui/design-time.d.ts.map +1 -1
  150. package/dist/types/editors/workflow-editor/ui/document-options.d.ts +24 -0
  151. package/dist/types/editors/workflow-editor/ui/document-options.d.ts.map +1 -0
  152. package/dist/types/editors/workflow-editor/ui/document-options.test.d.ts +2 -0
  153. package/dist/types/editors/workflow-editor/ui/document-options.test.d.ts.map +1 -0
  154. package/dist/types/editors/workflow-editor/ui/document-shape.d.ts +8 -0
  155. package/dist/types/editors/workflow-editor/ui/document-shape.d.ts.map +1 -0
  156. package/dist/types/editors/workflow-editor/ui/document-shape.test.d.ts +2 -0
  157. package/dist/types/editors/workflow-editor/ui/document-shape.test.d.ts.map +1 -0
  158. package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts +2 -0
  159. package/dist/types/editors/workflow-editor/ui/expression-scope.d.ts.map +1 -1
  160. package/dist/types/editors/workflow-editor/ui/forms.d.ts +5 -1
  161. package/dist/types/editors/workflow-editor/ui/forms.d.ts.map +1 -1
  162. package/dist/types/editors/workflow-editor/ui/model.d.ts +14 -0
  163. package/dist/types/editors/workflow-editor/ui/model.d.ts.map +1 -1
  164. package/dist/types/editors/workflow-editor/ui/query-keys.d.ts +6 -3
  165. package/dist/types/editors/workflow-editor/ui/query-keys.d.ts.map +1 -1
  166. package/dist/types/editors/workflow-editor/ui/reactor-access.d.ts +43 -0
  167. package/dist/types/editors/workflow-editor/ui/reactor-access.d.ts.map +1 -0
  168. package/dist/types/editors/workflow-editor/ui/reactor-access.test.d.ts +2 -0
  169. package/dist/types/editors/workflow-editor/ui/reactor-access.test.d.ts.map +1 -0
  170. package/dist/types/editors/workflow-editor/ui/reactor-connection-create.d.ts +2 -0
  171. package/dist/types/editors/workflow-editor/ui/reactor-connection-create.d.ts.map +1 -0
  172. package/dist/types/editors/workflow-editor/ui/reactor-connection-create.test.d.ts +2 -0
  173. package/dist/types/editors/workflow-editor/ui/reactor-connection-create.test.d.ts.map +1 -0
  174. package/dist/types/editors/workflow-editor/ui/reactor-view.d.ts +25 -0
  175. package/dist/types/editors/workflow-editor/ui/reactor-view.d.ts.map +1 -0
  176. package/dist/types/editors/workflow-editor/ui/reactor-view.test.d.ts +2 -0
  177. package/dist/types/editors/workflow-editor/ui/reactor-view.test.d.ts.map +1 -0
  178. package/dist/types/editors/workflow-editor/ui/use-validity.d.ts +1 -0
  179. package/dist/types/editors/workflow-editor/ui/use-validity.d.ts.map +1 -1
  180. package/dist/types/editors/workflow-editor/ui/validation.d.ts +3 -1
  181. package/dist/types/editors/workflow-editor/ui/validation.d.ts.map +1 -1
  182. package/dist/types/editors/workflow-studio/components/RunsTable.d.ts.map +1 -1
  183. package/dist/types/pieces/reactor/index.d.ts.map +1 -1
  184. package/dist/types/pieces/reactor/lib/actions/document-create.d.ts +4 -3
  185. package/dist/types/pieces/reactor/lib/actions/document-create.d.ts.map +1 -1
  186. package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts +2 -2
  187. package/dist/types/pieces/reactor/lib/actions/document-dispatch.d.ts.map +1 -1
  188. package/dist/types/pieces/reactor/lib/actions/document-find.d.ts +3 -2
  189. package/dist/types/pieces/reactor/lib/actions/document-find.d.ts.map +1 -1
  190. package/dist/types/pieces/reactor/lib/actions/document-get.d.ts +2 -2
  191. package/dist/types/pieces/reactor/lib/actions/document-get.d.ts.map +1 -1
  192. package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts +2 -2
  193. package/dist/types/pieces/reactor/lib/actions/document-schema.d.ts.map +1 -1
  194. package/dist/types/pieces/reactor/lib/actions/document-types.d.ts +1 -1
  195. package/dist/types/pieces/reactor/lib/actions/document-types.d.ts.map +1 -1
  196. package/dist/types/pieces/reactor/lib/documents.d.ts +32 -0
  197. package/dist/types/pieces/reactor/lib/documents.d.ts.map +1 -0
  198. package/dist/types/pieces/reactor/lib/parse.d.ts.map +1 -1
  199. package/dist/types/pieces/reactor/lib/reactor.d.ts +15 -4
  200. package/dist/types/pieces/reactor/lib/reactor.d.ts.map +1 -1
  201. package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts +6 -6
  202. package/dist/types/pieces/reactor/lib/triggers/document-event.d.ts.map +1 -1
  203. package/dist/types/pieces/reactor/reactor.test.d.ts +2 -0
  204. package/dist/types/pieces/reactor/reactor.test.d.ts.map +1 -0
  205. package/dist/types/pieces/reactor/test-signer.d.ts +3 -0
  206. package/dist/types/pieces/reactor/test-signer.d.ts.map +1 -0
  207. package/dist/types/scripts/ui-stack.d.ts +4 -1
  208. package/dist/types/scripts/ui-stack.d.ts.map +1 -1
  209. package/dist/types/test/ui/reactor-connection.spec.d.ts +2 -0
  210. package/dist/types/test/ui/reactor-connection.spec.d.ts.map +1 -0
  211. package/package.json +8 -8
  212. package/dist/browser/BlockSelector-C-C56Wcf.js.map +0 -1
  213. package/dist/browser/connection-form-C9iDnI6H.js.map +0 -1
  214. package/dist/browser/editor-4BJf6hN7.js.map +0 -1
  215. package/dist/browser/editor-Crt3ZeGd.js.map +0 -1
  216. package/dist/browser/editor-cEmJfc9W.js.map +0 -1
  217. package/dist/browser/module-DU2vb3FH.js.map +0 -1
  218. package/dist/browser/module-jDZ4pq3W.js.map +0 -1
  219. package/dist/browser/runtime-queries-Ds2kk-Ow.js.map +0 -1
  220. package/dist/browser/trigger-text-5CT870cu.js.map +0 -1
  221. package/dist/browser/upgrade-manifests-BpakVE9l.js +0 -8
  222. package/dist/node/BlockSelector-C9_1wbx4.mjs.map +0 -1
  223. package/dist/node/connection-form-DUOXUqBz.mjs.map +0 -1
  224. package/dist/node/editor-BFDE4Q3v.mjs.map +0 -1
  225. package/dist/node/editor-BwOQIwVw.mjs.map +0 -1
  226. package/dist/node/editor-D2jRtRNl.mjs.map +0 -1
  227. package/dist/node/module-BMwJQh65.mjs.map +0 -1
  228. package/dist/node/module-Dhe5E-VA.mjs.map +0 -1
  229. package/dist/node/runtime-queries-D5EGaCrH.mjs.map +0 -1
  230. package/dist/node/trigger-text-CXnnanWC.mjs.map +0 -1
  231. package/dist/node/upgrade-manifests-CmNd742Y.mjs +0 -8
  232. package/dist/types/pieces/reactor/lib/actions/dispatch-outcome.test.d.ts +0 -2
  233. package/dist/types/pieces/reactor/lib/actions/dispatch-outcome.test.d.ts.map +0 -1
@@ -1,11 +1,12 @@
1
1
  import { c as planFromAuth, i as isAuthComplete, l as plansFromAuth, n as UNKNOWN_AUTH, o as packageFromConnectorId, r as connectorIdForPiece, s as planForConnection, t as OAUTH_TOKEN } from "./piece-auth-BS5CtQOG.js";
2
- import { Ct as Hint$1, Dt as Switch, Et as Select, Nt as textInputClass, Pt as Icon, St as FieldLabel$1, bt as Button, dt as useOAuthAttempt, ft as useOAuthRedirectUri, nt as formatWhen, pt as usePieceCatalog, vt as useRuntimeActions, wt as IconButton, xt as FieldError, yt as useSecretStat } from "./BlockSelector-C-C56Wcf.js";
3
- import { y as actions } from "./module-jDZ4pq3W.js";
2
+ import { _ as runtimeKeys } from "./runtime-queries-IZG_nonR.js";
3
+ import { Ct as Hint$1, Dt as Switch, E as formatWhen, Et as Select, Nt as textInputClass, Pt as Icon, St as FieldLabel$1, Tt as Segmented, _t as useRuntime, bt as Button, dt as useOAuthAttempt, ft as useOAuthRedirectUri, pt as usePieceCatalog, vt as useRuntimeActions, wt as IconButton, xt as FieldError, yt as useSecretStat, zt as useQuery } from "./BlockSelector-B41mSc0W.js";
4
+ import { A as REACTOR_CONNECTOR_ID, M as defaultReactorConnectionConfig, N as isReactorConnectorId, P as parseReactorConnectionConfig, y as actions } from "./module-B2BMwu5E.js";
4
5
  import { useEffect, useId, useRef, useState } from "react";
5
- import { jsx, jsxs } from "react/jsx-runtime";
6
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
7
  import { generateId } from "document-model";
7
- import { setSelectedNode, useDocumentById } from "@powerhousedao/reactor-browser";
8
- import { baseReducerVersion, garbageCollect, garbageCollectV2, generateId as generateId$1, sortOperations, undo } from "@powerhousedao/shared/document-model";
8
+ import { dispatchActions, setSelectedNode, useDid, useDocumentById, useDrives, useReactorClient, useRenownAuth } from "@powerhousedao/reactor-browser";
9
+ import { baseReducerVersion, decide, garbageCollect, garbageCollectV2, generateId as generateId$1, setGrant, sortOperations, undo } from "@powerhousedao/shared/document-model";
9
10
  //#region editors/shared/undo-plan.ts
10
11
  const GROUP_PREFIX = "undo-group:";
11
12
  function newUndoGroup() {
@@ -276,6 +277,24 @@ function connectionCallbacks(state, dispatch) {
276
277
  status,
277
278
  checkedAt: (/* @__PURE__ */ new Date()).toISOString()
278
279
  }));
280
+ },
281
+ pickReactor: () => {
282
+ dispatch(actions.setConnector({
283
+ connectorId: REACTOR_CONNECTOR_ID,
284
+ authType: "REACTOR"
285
+ }));
286
+ dispatch(actions.setConfig({ config: defaultReactorConnectionConfig() }));
287
+ dispatch(actions.recordCheckResult({
288
+ status: "OK",
289
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString()
290
+ }));
291
+ },
292
+ setReactorConfig: (config) => {
293
+ dispatch(actions.setConfig({ config }));
294
+ if (state.status === "UNCONFIGURED") dispatch(actions.recordCheckResult({
295
+ status: "OK",
296
+ checkedAt: (/* @__PURE__ */ new Date()).toISOString()
297
+ }));
279
298
  }
280
299
  };
281
300
  }
@@ -300,8 +319,487 @@ const AUTH_TYPE_LABEL = {
300
319
  BASIC_AUTH: "Username and password",
301
320
  CUSTOM_AUTH: "Keys and tokens",
302
321
  OAUTH2: "OAuth 2",
303
- OIDC: "OpenID Connect"
322
+ OIDC: "OpenID Connect",
323
+ REACTOR: "Reactor access"
304
324
  };
325
+ function isReactorConnection(connection) {
326
+ return connection.authType === "REACTOR" && connection.connectorId === "@powerhousedao/reactor#reactor";
327
+ }
328
+ function reactorConnections(connections) {
329
+ return connections.filter(isReactorConnection);
330
+ }
331
+ function signInRequired(access, signedIn) {
332
+ return access?.authEnforcement === true && !signedIn;
333
+ }
334
+ function switchboardGrantId(identity) {
335
+ return `switchboard:${identity.address ?? identity.key}`;
336
+ }
337
+ const SWITCHBOARD_DOCUMENT_OPERATIONS = [
338
+ "DELETE_DOCUMENT",
339
+ "ADD_RELATIONSHIP",
340
+ "REMOVE_RELATIONSHIP"
341
+ ];
342
+ function switchboardGrants(identity, authConditions) {
343
+ if (!identity) return [];
344
+ const principal = authConditions ? { match: { eq: [{ attr: "subject.key" }, { lit: identity.key }] } } : identity.address ? { address: identity.address } : null;
345
+ if (!principal) return [];
346
+ const grant = (id, capability) => ({
347
+ id,
348
+ description: "Lets the Switchboard apply workflow writes",
349
+ effect: "allow",
350
+ principal,
351
+ capability
352
+ });
353
+ return [grant(switchboardGrantId(identity), {
354
+ can: "execute",
355
+ scope: "global"
356
+ }), grant(`${switchboardGrantId(identity)}:document`, {
357
+ can: "execute",
358
+ scope: "document",
359
+ operation: [...SWITCHBOARD_DOCUMENT_OPERATIONS]
360
+ })];
361
+ }
362
+ function switchboardMayWrite(auth, identity) {
363
+ const id = switchboardGrantId(identity);
364
+ const ids = new Set(auth?.grants.map((grant) => grant.id));
365
+ if (ids.has(id) && ids.has(`${id}:document`)) return true;
366
+ const subject = identity.address ? { address: identity.address } : {};
367
+ return decide(auth, subject, {
368
+ verb: "execute",
369
+ scope: "global"
370
+ }) === "allow" && SWITCHBOARD_DOCUMENT_OPERATIONS.every((operation) => decide(auth, subject, {
371
+ verb: "execute",
372
+ scope: "document",
373
+ operation
374
+ }) === "allow");
375
+ }
376
+ function canChangeGrants(auth, subject) {
377
+ return decide(auth, subject, {
378
+ verb: "execute",
379
+ scope: "auth",
380
+ operation: "SET_GRANT"
381
+ }) === "allow";
382
+ }
383
+ function planGrants(ids, authOf, subject) {
384
+ const plan = {
385
+ grantable: [],
386
+ noPermission: [],
387
+ notHere: []
388
+ };
389
+ for (const id of ids) {
390
+ const auth = authOf(id);
391
+ if (auth === null) plan.notHere.push(id);
392
+ else if (canChangeGrants(auth, subject)) plan.grantable.push(id);
393
+ else plan.noPermission.push(id);
394
+ }
395
+ return plan;
396
+ }
397
+ function withReactorConfig(current, patch) {
398
+ const access = patch.access === void 0 ? current.access : patch.access === "read" ? "read" : void 0;
399
+ return {
400
+ endpoint: "local",
401
+ ...access ? { access } : {}
402
+ };
403
+ }
404
+ function accessMismatch(requireReactor, access) {
405
+ return requireReactor === "write" && access === "read" ? "Writes, but this connection allows reads only" : null;
406
+ }
407
+ //#endregion
408
+ //#region editors/workflow-editor/ui/reactor-view.ts
409
+ function shortAddress(address) {
410
+ return address.length <= 12 ? address : `${address.slice(0, 6)}…${address.slice(-4)}`;
411
+ }
412
+ function publisherOf(operations) {
413
+ let latest;
414
+ for (const operation of operations) {
415
+ if (operation.action.type !== "PUBLISH_WORKFLOW") continue;
416
+ if (operation.error) continue;
417
+ if (!latest || operation.index > latest.index) latest = operation;
418
+ }
419
+ if (!latest) return void 0;
420
+ const signer = latest.action.context?.signer;
421
+ const address = signer?.user?.address;
422
+ return address && signer.signatures?.length ? address : null;
423
+ }
424
+ function runsAsText(publisher, loading, hostAddress) {
425
+ if (loading) return null;
426
+ if (publisher && hostAddress && publisher.toLowerCase() === hostAddress.toLowerCase()) return "Published by the Switchboard: runs get no reactor access while document permissions are enforced.";
427
+ if (publisher === void 0) return "Not published yet: runs will act as whoever publishes.";
428
+ if (publisher === null) return "Published unsigned: runs get no reactor access while document permissions are enforced.";
429
+ return `Runs as ${shortAddress(publisher)} (last publisher)`;
430
+ }
431
+ function missingInPublished(blocks) {
432
+ return blocks.filter((block) => block.requireReactor && !block.reactorConnectionId).map((block) => block.label);
433
+ }
434
+ //#endregion
435
+ //#region editors/workflow-editor/reactor-hooks.ts
436
+ function useReactorAccess() {
437
+ const { client, queryClient } = useRuntime();
438
+ const { address } = useRenownAuth();
439
+ return useQuery({
440
+ queryKey: runtimeKeys.reactorAccess(client.url, address ?? null),
441
+ queryFn: () => client.fetchReactorAccess(),
442
+ staleTime: 3e5
443
+ }, queryClient).data;
444
+ }
445
+ function useSignInGate() {
446
+ const access = useReactorAccess();
447
+ const auth = useRenownAuth();
448
+ const did = useDid();
449
+ const signedIn = auth.status === "authorized" && Boolean(auth.address);
450
+ return {
451
+ required: signInRequired(access, signedIn),
452
+ signedIn,
453
+ pending: auth.pending || auth.status === "checking",
454
+ login: () => auth.login(),
455
+ access,
456
+ subject: {
457
+ ...auth.address ? { address: auth.address } : {},
458
+ ...did ? { key: did } : {}
459
+ }
460
+ };
461
+ }
462
+ function useDocumentAuths(ids) {
463
+ const { client: runtime, queryClient } = useRuntime();
464
+ const reactor = useReactorClient();
465
+ const query = useQuery({
466
+ queryKey: [
467
+ runtime.url,
468
+ "documentAuth",
469
+ [...ids].sort()
470
+ ],
471
+ queryFn: async () => new Map(await Promise.all(ids.map(async (id) => {
472
+ try {
473
+ return [id, (await reactor.get(id)).state.auth];
474
+ } catch {
475
+ return [id, null];
476
+ }
477
+ }))),
478
+ enabled: ids.length > 0 && Boolean(reactor),
479
+ staleTime: 0,
480
+ gcTime: 0
481
+ }, queryClient);
482
+ if (ids.length === 0) return /* @__PURE__ */ new Map();
483
+ if (!reactor) return new Map(ids.map((id) => [id, null]));
484
+ return query.data;
485
+ }
486
+ async function grantOnDocuments(ids, grants) {
487
+ return Promise.all(ids.map(async (id) => {
488
+ let failure;
489
+ try {
490
+ if (!await dispatchActions(grants.map((grant) => setGrant({ grant })), id, (errors) => {
491
+ failure = errors[0]?.message ?? "The grant was refused";
492
+ }) && !failure) failure = "The grant was not applied";
493
+ } catch (error) {
494
+ failure = error instanceof Error ? error.message : String(error);
495
+ }
496
+ return failure ? {
497
+ id,
498
+ error: failure
499
+ } : { id };
500
+ }));
501
+ }
502
+ function useReactorAccessDenial(workflowId, refresh) {
503
+ const { client, queryClient } = useRuntime();
504
+ return useQuery({
505
+ queryKey: [...runtimeKeys.reactorDenial(client.url, workflowId ?? ""), refresh],
506
+ queryFn: () => client.fetchReactorAccessDenial(workflowId),
507
+ enabled: Boolean(workflowId),
508
+ refetchInterval: 15e3,
509
+ staleTime: 0
510
+ }, queryClient).data ?? null;
511
+ }
512
+ function usePublisher(workflowId, publishedVersion) {
513
+ const { client: runtime, queryClient } = useRuntime();
514
+ const reactor = useReactorClient();
515
+ const query = useQuery({
516
+ queryKey: [
517
+ runtime.url,
518
+ "publisher",
519
+ workflowId,
520
+ publishedVersion ?? 0
521
+ ],
522
+ queryFn: async () => {
523
+ const operations = [];
524
+ let page = await reactor.getOperations(workflowId, { scopes: ["global"] }, { actionTypes: ["PUBLISH_WORKFLOW"] });
525
+ for (;;) {
526
+ operations.push(...page.results);
527
+ if (!page.next || page.results.length === 0) break;
528
+ try {
529
+ page = await page.next();
530
+ } catch {
531
+ break;
532
+ }
533
+ }
534
+ const found = publisherOf(operations);
535
+ return found === void 0 ? "" : found;
536
+ },
537
+ enabled: Boolean(workflowId && reactor),
538
+ staleTime: Infinity
539
+ }, queryClient);
540
+ if (query.status === "error") return {
541
+ publisher: void 0,
542
+ loading: false
543
+ };
544
+ if (query.status === "pending") return {
545
+ publisher: void 0,
546
+ loading: Boolean(workflowId && reactor)
547
+ };
548
+ return {
549
+ publisher: query.data === "" ? void 0 : query.data,
550
+ loading: false
551
+ };
552
+ }
553
+ //#endregion
554
+ //#region editors/workflow-editor/ui/document-options.ts
555
+ function documentOptions(drives) {
556
+ const seen = /* @__PURE__ */ new Map();
557
+ for (const drive of drives) {
558
+ const driveName = drive.state.global.name || drive.header.name || "";
559
+ for (const node of drive.state.global.nodes) {
560
+ if (node.kind.toUpperCase() !== "FILE" || seen.has(node.id)) continue;
561
+ seen.set(node.id, {
562
+ value: node.id,
563
+ label: node.name || node.id,
564
+ description: [node.documentType, driveName].filter(Boolean).join(" · ")
565
+ });
566
+ }
567
+ }
568
+ return [...seen.values()].sort((a, b) => a.label.localeCompare(b.label));
569
+ }
570
+ //#endregion
571
+ //#region editors/workflow-editor/ui/SignInPrompt.tsx
572
+ function SignInPrompt(props) {
573
+ const { gate } = props;
574
+ if (!gate.required) return null;
575
+ return /* @__PURE__ */ jsxs("div", {
576
+ role: "note",
577
+ "aria-label": "Sign in required",
578
+ className: "flex items-start gap-2.5 rounded-md border border-solid border-wf-warn/30 bg-wf-warn/10 px-3 py-2.5",
579
+ children: [
580
+ /* @__PURE__ */ jsx(Icon, {
581
+ name: "lock",
582
+ className: "mt-0.5 h-3.5 w-3.5 shrink-0 text-wf-warn"
583
+ }),
584
+ /* @__PURE__ */ jsxs("p", {
585
+ className: "min-w-0 flex-1 text-xs leading-relaxed text-foreground",
586
+ children: ["This Switchboard enforces document permissions. ", props.reason]
587
+ }),
588
+ /* @__PURE__ */ jsx(Button, {
589
+ size: "sm",
590
+ variant: "primary",
591
+ disabled: gate.pending,
592
+ onClick: gate.login,
593
+ children: gate.pending ? "Signing in…" : "Sign in"
594
+ })
595
+ ]
596
+ });
597
+ }
598
+ //#endregion
599
+ //#region editors/workflow-editor/ui/SwitchboardGrants.tsx
600
+ function NamedList(props) {
601
+ if (props.ids.length === 0) return null;
602
+ return /* @__PURE__ */ jsxs("div", { children: [
603
+ /* @__PURE__ */ jsx("p", {
604
+ className: "text-xs font-medium text-foreground",
605
+ children: props.heading
606
+ }),
607
+ /* @__PURE__ */ jsx("ul", {
608
+ "aria-label": props.label,
609
+ className: "mt-1",
610
+ children: props.ids.map((id) => /* @__PURE__ */ jsx("li", {
611
+ className: "truncate text-xs text-foreground",
612
+ children: props.names.get(id) ?? id
613
+ }, id))
614
+ }),
615
+ /* @__PURE__ */ jsx("p", {
616
+ className: "mt-1 text-xs text-muted-foreground",
617
+ children: props.next
618
+ })
619
+ ] });
620
+ }
621
+ function SwitchboardGrants() {
622
+ const gate = useSignInGate();
623
+ const options = documentOptions(useDrives() ?? []);
624
+ const [chosen, setChosen] = useState([]);
625
+ const auths = useDocumentAuths(chosen);
626
+ const [busy, setBusy] = useState(false);
627
+ const [outcomes, setOutcomes] = useState([]);
628
+ const access = gate.access;
629
+ if (!access?.authEnforcement) return null;
630
+ const identity = access.reactorIdentity;
631
+ const grants = switchboardGrants(identity, access.authConditions);
632
+ const names = new Map(options.map((option) => [option.value, option.label]));
633
+ const header = /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h4", {
634
+ className: "text-[13px] font-medium text-foreground",
635
+ children: "Switchboard grants"
636
+ }), /* @__PURE__ */ jsx("p", {
637
+ className: "mt-0.5 text-xs text-muted-foreground",
638
+ children: "With document permissions enforced, a write lands only when the Switchboard may make it too. Grant it on each document steps write."
639
+ })] });
640
+ if (!gate.signedIn) return /* @__PURE__ */ jsxs("section", {
641
+ "aria-label": "Switchboard grants",
642
+ className: "flex flex-col gap-3",
643
+ children: [header, /* @__PURE__ */ jsx(SignInPrompt, {
644
+ gate: {
645
+ ...gate,
646
+ required: true
647
+ },
648
+ reason: "Sign in to grant the Switchboard on documents."
649
+ })]
650
+ });
651
+ if (!identity || grants.length === 0) return /* @__PURE__ */ jsxs("section", {
652
+ "aria-label": "Switchboard grants",
653
+ className: "flex flex-col gap-3",
654
+ children: [header, /* @__PURE__ */ jsx("p", {
655
+ className: "text-xs text-wf-warn",
656
+ children: "The Switchboard does not say who it signs as, so it can't be granted from here."
657
+ })]
658
+ });
659
+ const done = new Set(outcomes.filter((outcome) => !outcome.error).map((outcome) => outcome.id));
660
+ const failed = new Map(outcomes.flatMap((outcome) => outcome.error ? [[outcome.id, outcome.error]] : []));
661
+ const granted = chosen.filter((id) => {
662
+ if (done.has(id)) return true;
663
+ const auth = auths?.get(id);
664
+ return auths?.has(id) && auth !== null && switchboardMayWrite(auth, identity);
665
+ });
666
+ const pending = chosen.filter((id) => !granted.includes(id));
667
+ const plan = auths ? planGrants(pending, (id) => auths.get(id), gate.subject) : null;
668
+ const grantOn = (ids) => {
669
+ setBusy(true);
670
+ grantOnDocuments(ids, grants).then((next) => setOutcomes((previous) => [...previous.filter((outcome) => !ids.includes(outcome.id)), ...next])).finally(() => setBusy(false));
671
+ };
672
+ return /* @__PURE__ */ jsxs("section", {
673
+ "aria-label": "Switchboard grants",
674
+ className: "flex flex-col gap-3",
675
+ children: [
676
+ header,
677
+ /* @__PURE__ */ jsxs("div", { children: [
678
+ /* @__PURE__ */ jsx(FieldLabel$1, {
679
+ label: "Documents",
680
+ optional: true
681
+ }),
682
+ /* @__PURE__ */ jsx(Select, {
683
+ ariaLabel: "Documents to grant on",
684
+ multiple: true,
685
+ searchable: true,
686
+ value: chosen,
687
+ options,
688
+ placeholder: "Choose documents",
689
+ emptyText: "No documents in this Connect's drives.",
690
+ onChange: setChosen
691
+ }),
692
+ /* @__PURE__ */ jsx(Hint$1, { text: "Grants are per document; a drive's grants do not cover its documents." })
693
+ ] }),
694
+ chosen.length > 0 && !plan ? /* @__PURE__ */ jsx("div", { className: "h-10 animate-pulse rounded-md bg-foreground/5" }) : null,
695
+ granted.length > 0 ? /* @__PURE__ */ jsx("ul", {
696
+ "aria-label": "Documents the Switchboard may write",
697
+ className: "flex flex-col gap-1",
698
+ children: granted.map((id) => /* @__PURE__ */ jsxs("li", {
699
+ className: "flex items-center gap-2 text-xs",
700
+ children: [/* @__PURE__ */ jsx("span", {
701
+ className: "min-w-0 flex-1 truncate text-foreground",
702
+ children: names.get(id) ?? id
703
+ }), /* @__PURE__ */ jsx("span", {
704
+ className: "text-wf-ok",
705
+ children: "Granted"
706
+ })]
707
+ }, id))
708
+ }) : null,
709
+ plan && plan.grantable.length > 0 ? /* @__PURE__ */ jsx("ul", {
710
+ className: "flex flex-col gap-1",
711
+ children: plan.grantable.map((id) => /* @__PURE__ */ jsxs("li", {
712
+ className: "flex items-center gap-2 text-xs",
713
+ children: [
714
+ /* @__PURE__ */ jsx("span", {
715
+ className: "min-w-0 flex-1 truncate text-foreground",
716
+ children: names.get(id) ?? id
717
+ }),
718
+ failed.has(id) ? /* @__PURE__ */ jsx("span", {
719
+ className: "truncate text-wf-fail",
720
+ title: failed.get(id),
721
+ children: failed.get(id)
722
+ }) : null,
723
+ /* @__PURE__ */ jsx(Button, {
724
+ size: "sm",
725
+ disabled: busy,
726
+ "aria-label": `Grant the Switchboard on ${names.get(id) ?? id}`,
727
+ onClick: () => grantOn([id]),
728
+ children: "Grant"
729
+ })
730
+ ]
731
+ }, id))
732
+ }) : null,
733
+ plan && plan.grantable.length > 1 ? /* @__PURE__ */ jsx(Button, {
734
+ size: "sm",
735
+ variant: "primary",
736
+ disabled: busy,
737
+ className: "self-start",
738
+ onClick: () => grantOn(plan.grantable),
739
+ children: busy ? "Granting…" : `Grant all ${plan.grantable.length}`
740
+ }) : null,
741
+ plan ? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(NamedList, {
742
+ label: "Documents you may not grant on",
743
+ heading: "You don't have permission to change grants on these:",
744
+ next: "Ask each document's admin to grant the Switchboard.",
745
+ ids: plan.noPermission,
746
+ names
747
+ }), /* @__PURE__ */ jsx(NamedList, {
748
+ label: "Documents not in this drive",
749
+ heading: "Not in this Connect, so they can't be granted from here:",
750
+ next: "Open the drive that holds them and grant there, or ask its admin.",
751
+ ids: plan.notHere,
752
+ names
753
+ })] }) : null
754
+ ]
755
+ });
756
+ }
757
+ //#endregion
758
+ //#region editors/connection-editor/ReactorConnectionSettings.tsx
759
+ function ReactorConnectionSettings(props) {
760
+ const parsed = parseReactorConnectionConfig(props.state.config);
761
+ const current = parsed.ok ? parsed.config : { endpoint: "local" };
762
+ const [error, setError] = useState(parsed.ok ? null : parsed.error);
763
+ const save = (patch) => {
764
+ const next = withReactorConfig(current, patch);
765
+ const check = parseReactorConnectionConfig(next);
766
+ if (!check.ok) {
767
+ setError(check.error);
768
+ return;
769
+ }
770
+ setError(null);
771
+ props.callbacks.setReactorConfig(check.config);
772
+ };
773
+ return /* @__PURE__ */ jsxs("div", {
774
+ className: "flex flex-col gap-5 border-t border-solid border-foreground/10 pt-5",
775
+ children: [
776
+ /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("h3", {
777
+ className: "text-[13px] font-semibold text-foreground",
778
+ children: "Reactor access"
779
+ }), /* @__PURE__ */ jsx("p", {
780
+ className: "mt-0.5 text-xs text-muted-foreground",
781
+ children: "Each workflow's runs act as its last publisher, and reach only what this connection allows and that person may do."
782
+ })] }),
783
+ /* @__PURE__ */ jsxs("div", { children: [
784
+ /* @__PURE__ */ jsx(FieldLabel$1, { label: "Access" }),
785
+ /* @__PURE__ */ jsx(Segmented, {
786
+ value: current.access === "read" ? "read" : "write",
787
+ options: [{
788
+ value: "write",
789
+ label: "Read and write"
790
+ }, {
791
+ value: "read",
792
+ label: "Read only"
793
+ }],
794
+ onChange: (value) => save({ access: value === "read" ? "read" : "write" })
795
+ }),
796
+ /* @__PURE__ */ jsx(Hint$1, { text: "Read only refuses every write, whatever the step declares." })
797
+ ] }),
798
+ /* @__PURE__ */ jsx(FieldError, { children: error }),
799
+ /* @__PURE__ */ jsx(SwitchboardGrants, {})
800
+ ]
801
+ });
802
+ }
305
803
  //#endregion
306
804
  //#region editors/connection-editor/connection-form.tsx
307
805
  const inputClass = textInputClass;
@@ -690,6 +1188,7 @@ function methodLabel(plan) {
690
1188
  }
691
1189
  function ConnectionForm(props) {
692
1190
  const { state, callbacks } = props;
1191
+ const reactor = isReactorConnectorId(state.connectorId);
693
1192
  const catalogQuery = usePieceCatalog();
694
1193
  const catalog = catalogQuery.data ?? (catalogQuery.isError ? [] : null);
695
1194
  const packageName = packageFromConnectorId(state.connectorId);
@@ -719,10 +1218,14 @@ function ConnectionForm(props) {
719
1218
  /* @__PURE__ */ jsxs("div", { children: [
720
1219
  /* @__PURE__ */ jsx(FieldLabel$1, { label: "Service" }),
721
1220
  /* @__PURE__ */ jsx(Select, {
722
- value: packageName,
1221
+ value: reactor ? REACTOR_CONNECTOR_ID : packageName,
723
1222
  loading: catalog === null,
724
1223
  placeholder: "Choose the service to connect",
725
- options: (catalog ?? []).map((entry) => ({
1224
+ options: [...props.offerReactor !== false || reactor ? [{
1225
+ value: REACTOR_CONNECTOR_ID,
1226
+ label: "Powerhouse documents",
1227
+ description: "Lets a step read or write documents on this Switchboard"
1228
+ }] : [], ...(catalog ?? []).map((entry) => ({
726
1229
  value: entry.name,
727
1230
  label: entry.displayName,
728
1231
  ...planFromAuth(entry.auth).authType === "UNKNOWN" ? {
@@ -735,15 +1238,23 @@ function ConnectionForm(props) {
735
1238
  loading: "lazy",
736
1239
  className: "h-4 w-4 shrink-0 object-contain"
737
1240
  }) : void 0
738
- })),
1241
+ }))],
739
1242
  onChange: (name) => {
1243
+ if (name === "@powerhousedao/reactor#reactor") {
1244
+ callbacks.pickReactor();
1245
+ return;
1246
+ }
740
1247
  const picked = catalog?.find((entry) => entry.name === name);
741
1248
  if (picked) callbacks.pickPiece(picked);
742
1249
  }
743
1250
  }),
744
1251
  piece ? /* @__PURE__ */ jsx(Hint$1, { text: piece.description }) : null
745
1252
  ] }),
746
- plans.length > 1 ? /* @__PURE__ */ jsxs("div", { children: [
1253
+ reactor ? /* @__PURE__ */ jsx(ReactorConnectionSettings, {
1254
+ state,
1255
+ callbacks
1256
+ }) : null,
1257
+ !reactor && plans.length > 1 ? /* @__PURE__ */ jsxs("div", { children: [
747
1258
  /* @__PURE__ */ jsx(FieldLabel$1, { label: "Sign in with" }),
748
1259
  /* @__PURE__ */ jsx(Select, {
749
1260
  value: plan.authType,
@@ -766,7 +1277,7 @@ function ConnectionForm(props) {
766
1277
  }),
767
1278
  plan.description ? /* @__PURE__ */ jsx(Hint$1, { text: plan.description }) : null
768
1279
  ] }) : null,
769
- plan.supported ? null : /* @__PURE__ */ jsx("p", {
1280
+ plan.supported || reactor ? null : /* @__PURE__ */ jsx("p", {
770
1281
  className: "rounded-md bg-wf-warn/10 px-3 py-2 text-xs text-wf-warn",
771
1282
  children: plan.authType === "UNKNOWN" ? `${plan.declaredType ?? "This sign-in method"}: not supported by this runtime.` : `${plan.authType} connections are not executable by the workflow runtime yet.`
772
1283
  }),
@@ -826,6 +1337,6 @@ function ConnectionForm(props) {
826
1337
  });
827
1338
  }
828
1339
  //#endregion
829
- export { BackButton as a, newUndoGroup as c, connectionCallbacks as i, CONNECTION_STATUS_LABEL as n, UndoRedo as o, CONNECTION_STATUS_STYLES as r, groupedAction as s, ConnectionForm as t };
1340
+ export { useSignInGate as a, accessMismatch as c, CONNECTION_STATUS_STYLES as d, connectionCallbacks as f, newUndoGroup as g, groupedAction as h, useReactorAccessDenial as i, reactorConnections as l, UndoRedo as m, SignInPrompt as n, missingInPublished as o, BackButton as p, usePublisher as r, runsAsText as s, ConnectionForm as t, CONNECTION_STATUS_LABEL as u };
830
1341
 
831
- //# sourceMappingURL=connection-form-C9iDnI6H.js.map
1342
+ //# sourceMappingURL=connection-form-CkRzKggD.js.map