@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7

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 (323) hide show
  1. package/README.md +564 -2
  2. package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
  3. package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
  4. package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
  5. package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
  6. package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
  7. package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
  8. package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
  9. package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
  10. package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
  11. package/dist/DateTimeField-B1qR4ruo.js +51 -0
  12. package/dist/Disclosure-BNKij7-v.js +45 -0
  13. package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
  14. package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
  15. package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
  16. package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
  17. package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
  18. package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
  19. package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
  20. package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
  21. package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
  22. package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
  23. package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
  24. package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
  25. package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
  26. package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
  27. package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
  28. package/dist/FluidGridsMark-CE2blT7K.js +74 -0
  29. package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
  30. package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
  31. package/dist/HistoryPage-BSBISXoj.js +2835 -0
  32. package/dist/Icon-BtQ0HXLh.js +160 -0
  33. package/dist/InsightsPage-D7ybj8N9.js +11245 -0
  34. package/dist/IsolationSetting-vy911E8b.js +1153 -0
  35. package/dist/LibraryParts-DOeNgR8A.js +413 -0
  36. package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
  37. package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
  38. package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
  39. package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
  40. package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
  41. package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
  42. package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
  43. package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
  44. package/dist/NodesPage-O7KeeKtd.js +653 -0
  45. package/dist/OfflineIcon-TwMKYWjA.js +207 -0
  46. package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
  47. package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
  48. package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
  49. package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
  50. package/dist/RunActionsMenu-DodOgIQm.js +59 -0
  51. package/dist/RunnerStatusPill-C1v967iq.js +24 -0
  52. package/dist/RunnersPage-dB0RSdY_.js +1929 -0
  53. package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
  54. package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
  55. package/dist/SearchBox-BGtYjvfs.js +49 -0
  56. package/dist/SequenceEditor-CFiHeHkR.js +497 -0
  57. package/dist/SettingsPage-0CQBNPZV.js +8695 -0
  58. package/dist/StewardPages-DAJhepen.js +47 -0
  59. package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
  60. package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
  61. package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
  62. package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
  63. package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
  64. package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
  65. package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
  66. package/dist/TemplatePreview-cx7-NOeG.js +868 -0
  67. package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
  68. package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
  69. package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
  70. package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
  71. package/dist/TranslationBridge-Da-TPgQm.js +68 -0
  72. package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
  73. package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
  74. package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
  75. package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
  76. package/dist/VariablesPage-ChfGuW22.js +2243 -0
  77. package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
  78. package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
  79. package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
  80. package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
  81. package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
  82. package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
  83. package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
  84. package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
  85. package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
  86. package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
  87. package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
  88. package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
  89. package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
  90. package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
  91. package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
  92. package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
  93. package/dist/WorkflowsList--hR2_8gf.js +4593 -0
  94. package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
  95. package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
  96. package/dist/addonCatalog-CbZS4deh.js +58 -0
  97. package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
  98. package/dist/addons.d.ts +3 -0
  99. package/dist/addons.js +4 -0
  100. package/dist/agent-form-Bfvm32j1.js +83 -0
  101. package/dist/agent-tools.d.ts +3 -0
  102. package/dist/agent-tools.js +5 -0
  103. package/dist/agentTools-CyL7DLOF.js +320 -0
  104. package/dist/ai-usage-BrxDgvdR.js +240 -0
  105. package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
  106. package/dist/api-BKq-nIOZ.js +2286 -0
  107. package/dist/api-Ol7I8NxE.js +8289 -0
  108. package/dist/apollo-type-policies.d.ts +11 -0
  109. package/dist/apollo-type-policies.js +64 -0
  110. package/dist/askAboutBridge-ByYsQams.js +106 -0
  111. package/dist/askQuestions-Cmx7VnMm.js +742 -0
  112. package/dist/assert-rules-lfYEMc99.js +318 -0
  113. package/dist/assistant.d.ts +94 -0
  114. package/dist/assistant.js +99 -0
  115. package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
  116. package/dist/badge-CXfPhoMH.js +26 -0
  117. package/dist/basil.generated-BK-EHbwN.js +10 -0
  118. package/dist/browser-steps-DMpS5TyB.js +533 -0
  119. package/dist/builderTimings-pvGnK1m-.js +510 -0
  120. package/dist/button-DG7y_FVJ.js +48 -0
  121. package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
  122. package/dist/card-Bomy_1UG.js +44 -0
  123. package/dist/catalogGrid-BOrfMgi-.js +41 -0
  124. package/dist/channel-CPyQ1NR1.js +212 -0
  125. package/dist/chips-CvNrYJZa.js +27 -0
  126. package/dist/client-holder-C0M5Cfwl.js +68 -0
  127. package/dist/cn-QqidFIgr.js +10 -0
  128. package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
  129. package/dist/code-editor-field-x_JrY8KR.js +113 -0
  130. package/dist/codec-client-DPuD6mw7.js +515 -0
  131. package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
  132. package/dist/config-DO68jw5k.js +322 -0
  133. package/dist/constants-DgbVc24O.d.ts +296 -0
  134. package/dist/constants-DlRnHBfQ.js +217 -0
  135. package/dist/convert-browser-action-pfecelF7.js +347 -0
  136. package/dist/convert-dialog-B_o22NiJ.js +382 -0
  137. package/dist/create-workflow-first-Azg3JUdX.js +120 -0
  138. package/dist/definition-canvas-Bsda-rDT.js +31 -0
  139. package/dist/dialog-BVd152GS.js +94 -0
  140. package/dist/durable-nodes-BXyYCLxT.js +91 -0
  141. package/dist/duration-CDb7-mT_.js +33 -0
  142. package/dist/edge-mapper-wEAdGVU2.js +4477 -0
  143. package/dist/element-library-DkSlg_VE.js +727 -0
  144. package/dist/entities-I_0kio3q.js +38 -0
  145. package/dist/error-advice-QLr5NCm7.js +65 -0
  146. package/dist/errors-ClKb5sEt.js +188 -0
  147. package/dist/executions.d.ts +3 -0
  148. package/dist/executions.js +5 -0
  149. package/dist/feature-flags-B2qetXKd.js +385 -0
  150. package/dist/field-label-DPZRmE_B.js +153 -0
  151. package/dist/firstWorkflow-C_h0KMB2.js +133 -0
  152. package/dist/flags.d.ts +3 -0
  153. package/dist/flags.js +4 -0
  154. package/dist/flow-builder-DIvLOhz0.js +28038 -0
  155. package/dist/flow-store-holder-CUN7Terz.js +52 -0
  156. package/dist/fluent.generated-CA_e6-4l.js +14 -0
  157. package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
  158. package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
  159. package/dist/global-client-BQPuFrFa.js +433 -0
  160. package/dist/global-operations-BG6YgxrM.js +136 -0
  161. package/dist/graphql-types-UTYtujY9.js +21358 -0
  162. package/dist/history.d.ts +3 -0
  163. package/dist/history.js +4 -0
  164. package/dist/index-AoJAa5vU.d.ts +164958 -0
  165. package/dist/index-DEMT3iAM.d.ts +120 -0
  166. package/dist/index-ROZzNGyY.d.ts +76 -0
  167. package/dist/index.d.ts +20 -0
  168. package/dist/index.js +8123 -0
  169. package/dist/ion.generated-mbajjcAg.js +10 -0
  170. package/dist/label-Lzb8ZXf_.js +29 -0
  171. package/dist/labels-rXd9gYQz.js +1236 -0
  172. package/dist/liveCanvas-D5ytXDp8.js +103 -0
  173. package/dist/logos.generated-X6_0kjVR.js +21 -0
  174. package/dist/logs-panel-Cw0DkG0l.js +468 -0
  175. package/dist/lucide.generated-B6NVd3GT.js +29 -0
  176. package/dist/marksStore-a9oIMMot.js +175 -0
  177. package/dist/mcp-trigger-D0nRdvq5.js +307 -0
  178. package/dist/mdi.generated-D1BV74d6.js +292 -0
  179. package/dist/menus-CU3hDGYl.js +160 -0
  180. package/dist/mynaui.generated-DMWr5cXz.js +66 -0
  181. package/dist/navigation-v2.d.ts +3 -0
  182. package/dist/navigation-v2.js +5 -0
  183. package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
  184. package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
  185. package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
  186. package/dist/node-registry-refresh-s3okf83X.js +27 -0
  187. package/dist/node-role-TMbnkmeP.js +132 -0
  188. package/dist/node-type-icon-BZa8n4iG.js +33 -0
  189. package/dist/nodes.d.ts +3 -0
  190. package/dist/nodes.js +4 -0
  191. package/dist/notesKey-5EaREBGA.js +12 -0
  192. package/dist/observability.d.ts +3 -0
  193. package/dist/observability.js +5 -0
  194. package/dist/offset-pages-zghoClB3.js +55 -0
  195. package/dist/operations-BBmT9ToP.js +663 -0
  196. package/dist/operations-WxRJWeqO.js +3133 -0
  197. package/dist/output-files-Ba8bu5lv.js +196 -0
  198. package/dist/page-operation-DrWuhd6Y.js +129 -0
  199. package/dist/page-twins.d.ts +13 -0
  200. package/dist/page-twins.js +186 -0
  201. package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
  202. package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
  203. package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
  204. package/dist/panels-PfBBAToE.js +346 -0
  205. package/dist/parts-B7fBcw-B.js +346 -0
  206. package/dist/popover-Dms9Vz3j.js +3389 -0
  207. package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
  208. package/dist/proactive.d.ts +66 -0
  209. package/dist/proactive.js +237 -0
  210. package/dist/quick-config-panel-DFd77xho.js +451 -0
  211. package/dist/quota-DeA_CJ2e.js +175 -0
  212. package/dist/quota.d.ts +3 -0
  213. package/dist/quota.js +4 -0
  214. package/dist/read-only-context-Dt9N9SIG.js +18 -0
  215. package/dist/relative-time-Dxt8ZIIu.js +55 -0
  216. package/dist/results-CwK_yDxK.js +325 -0
  217. package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
  218. package/dist/route-data.d.ts +12 -0
  219. package/dist/route-data.js +69 -0
  220. package/dist/route-match-C-0_EnAt.d.ts +5 -0
  221. package/dist/route-match-DMkUICYV.js +41 -0
  222. package/dist/route-preload-C4DlGoCd.js +120 -0
  223. package/dist/run-display-UjLAoYqQ.js +81 -0
  224. package/dist/run-history-arGiHzGU.js +285 -0
  225. package/dist/run-list-links-DJn4Mf1T.js +98 -0
  226. package/dist/run-mode-USmM0-Uo.js +82 -0
  227. package/dist/run-parity-CWXqEJqM.js +144 -0
  228. package/dist/runsQuota-B6SyTbne.js +100 -0
  229. package/dist/runsQuota-DsniKiSg.d.ts +20 -0
  230. package/dist/safe-expression-Cw7-SCsm.js +1251 -0
  231. package/dist/save-status-store-C7nEYpfb.js +631 -0
  232. package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
  233. package/dist/schedule-rules-ggVKRkBH.js +358 -0
  234. package/dist/secrets-Re_wSiE3.js +153 -0
  235. package/dist/settings.d.ts +4 -0
  236. package/dist/settings.js +6 -0
  237. package/dist/shared-DAWGGMSM.js +177 -0
  238. package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
  239. package/dist/solar.generated-CGYuUQAC.js +10 -0
  240. package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
  241. package/dist/start-url-CT6Yz96K.js +24 -0
  242. package/dist/status-CessxGpm.js +55 -0
  243. package/dist/store-icon-OctYp5zP.js +155 -0
  244. package/dist/styles-WGmTnZ2n.js +26 -0
  245. package/dist/styles.css +139 -0
  246. package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
  247. package/dist/template-code-CzN6JWNV.js +191 -0
  248. package/dist/template-graph-DLF9dygU.js +20 -0
  249. package/dist/template-preview-DcIIKOOL.js +32 -0
  250. package/dist/template-price-CdUHZRMF.js +40 -0
  251. package/dist/templates.d.ts +3 -0
  252. package/dist/templates.js +5 -0
  253. package/dist/theme-provider-CntfC4_i.js +23 -0
  254. package/dist/transient-DgZfhDfN.js +57 -0
  255. package/dist/typed-calls-C5tO03wq.js +26 -0
  256. package/dist/ui-script-By74Guk3.js +1094 -0
  257. package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
  258. package/dist/ui-step-fix-8uM2_Hft.js +67 -0
  259. package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
  260. package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
  261. package/dist/ui-target-editor-D2JhB_lD.js +673 -0
  262. package/dist/uiMarkTools-CSznnO1i.js +1054 -0
  263. package/dist/upgradePrompt-BAFBKKW5.js +72 -0
  264. package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
  265. package/dist/use-browser-available-hj8wc3Kb.js +241 -0
  266. package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
  267. package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
  268. package/dist/use-mobile-BTqCUjzS.js +27 -0
  269. package/dist/use-sdk-query-C697xZVv.js +116 -0
  270. package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
  271. package/dist/useActionParam-B2tU2BlY.js +85 -0
  272. package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
  273. package/dist/useBrowserClients-3v95-gSh.js +103 -0
  274. package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
  275. package/dist/useConnections-DsgEJs05.js +439 -0
  276. package/dist/useDebouncedValue-BFekcv6n.js +18 -0
  277. package/dist/useDurableParity-8fnMZmBc.js +1787 -0
  278. package/dist/useEntityTags-D0spL6Ut.js +460 -0
  279. package/dist/useExecutions-2u5nGJJk.js +681 -0
  280. package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
  281. package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
  282. package/dist/useHumanRequests-zlYDp3l1.js +221 -0
  283. package/dist/useNavigationV2-C2WeqN7d.js +29 -0
  284. package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
  285. package/dist/useObservability-BRlQ0tOA.js +285 -0
  286. package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
  287. package/dist/useRunHistory-CXCMUPyf.js +2759 -0
  288. package/dist/useRunLive-D0JvVZT2.js +1060 -0
  289. package/dist/useRunnerList-Dbi59i1K.js +446 -0
  290. package/dist/useRunners-URUc5quU.js +173 -0
  291. package/dist/useRunsPage-DG656UCK.js +2709 -0
  292. package/dist/useVariables-BIelxcWr.js +463 -0
  293. package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
  294. package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
  295. package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
  296. package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
  297. package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
  298. package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
  299. package/dist/utils-fvBb5qOD.js +89 -0
  300. package/dist/webhook-deliveries-AvQujaZy.js +99 -0
  301. package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
  302. package/dist/workflow-builder.d.ts +3 -0
  303. package/dist/workflow-builder.js +8 -0
  304. package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
  305. package/dist/workflow-embed.d.ts +3 -0
  306. package/dist/workflow-embed.js +4 -0
  307. package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
  308. package/dist/workflow-host.d.ts +6 -0
  309. package/dist/workflow-host.js +11 -0
  310. package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
  311. package/dist/workflow-pages.d.ts +3 -0
  312. package/dist/workflow-pages.js +115 -0
  313. package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
  314. package/dist/workflow-preview.d.ts +65 -0
  315. package/dist/workflow-preview.js +4 -0
  316. package/dist/workflow-route.d.ts +33 -0
  317. package/dist/workflow-route.js +4 -0
  318. package/dist/workflow-save-state-D0l-DkLf.js +767 -0
  319. package/dist/workflow-transfer-CQnQC-ke.js +104 -0
  320. package/dist/workflowRouteData-BkfVOc-O.js +169 -0
  321. package/dist/workflows-list.d.ts +10 -0
  322. package/dist/workflows-list.js +5 -0
  323. package/package.json +320 -4
@@ -0,0 +1,459 @@
1
+ "use client";
2
+ import { s as throwIfResultError, t as describeOperationError } from "./errors-ClKb5sEt.js";
3
+ import { n as getFluidGridsClient } from "./client-holder-C0M5Cfwl.js";
4
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
5
+ import { t as Icon } from "./Icon-BtQ0HXLh.js";
6
+ import { a as mcpPublicUrl } from "./save-status-store-C7nEYpfb.js";
7
+ import { useCallback, useEffect, useState } from "react";
8
+ import { jsx, jsxs } from "react/jsx-runtime";
9
+ import { toast } from "sonner";
10
+ import { cn } from "@burdenoff/fe-libs/utils";
11
+ import { Badge, EmptyState } from "@burdenoff/fe-libs/ui";
12
+ import { gql } from "@apollo/client";
13
+ import { Button as Button$1 } from "@burdenoff/fe-libs/button";
14
+
15
+ // src/modules/agent-definitions/hooks/useAgentDefinitions.ts
16
+ /**
17
+ * Agent definitions (BOFF-9962): list, create, update and delete agents, and grant or revoke
18
+ * their right to act for people. wspace-workflow-svc enforces every rule.
19
+ */
20
+ const AGENT_FIELDS = `
21
+ id
22
+ name
23
+ description
24
+ appId
25
+ toolAllowlist { nodeType operations }
26
+ connectionScope
27
+ requireToolApproval
28
+ ownerUserId
29
+ status
30
+ createdAt
31
+ updatedAt
32
+ `;
33
+ const GRANT_FIELDS = `
34
+ agentDefinitionId
35
+ userId
36
+ grantedBy
37
+ grantedAt
38
+ expiresAt
39
+ status
40
+ isMine
41
+ `;
42
+ const AGENT_DEFINITIONS = gql`
43
+ query AgentDefinitions {
44
+ agentDefinitions {
45
+ ${AGENT_FIELDS}
46
+ }
47
+ }
48
+ `;
49
+ const AGENT_GRANTS = gql`
50
+ query AgentDefinitionGrants($agentDefinitionId: ID!) {
51
+ agentDefinitionGrants(agentDefinitionId: $agentDefinitionId) {
52
+ ${GRANT_FIELDS}
53
+ }
54
+ }
55
+ `;
56
+ const CREATE_AGENT = gql`
57
+ mutation CreateAgentDefinition($input: AgentDefinitionInput!) {
58
+ createAgentDefinition(input: $input) {
59
+ ${AGENT_FIELDS}
60
+ }
61
+ }
62
+ `;
63
+ const UPDATE_AGENT = gql`
64
+ mutation UpdateAgentDefinition($id: ID!, $input: AgentDefinitionInput!) {
65
+ updateAgentDefinition(id: $id, input: $input) {
66
+ ${AGENT_FIELDS}
67
+ }
68
+ }
69
+ `;
70
+ const DELETE_AGENT = gql`
71
+ mutation DeleteAgentDefinition($id: ID!) {
72
+ deleteAgentDefinition(id: $id)
73
+ }
74
+ `;
75
+ const GRANT_AGENT = gql`
76
+ mutation GrantAgentDefinition($agentDefinitionId: ID!, $expiresInDays: Int) {
77
+ grantAgentDefinition(agentDefinitionId: $agentDefinitionId, expiresInDays: $expiresInDays) {
78
+ ${GRANT_FIELDS}
79
+ }
80
+ }
81
+ `;
82
+ const REVOKE_MY_GRANT = gql`
83
+ mutation RevokeMyAgentGrant($agentDefinitionId: ID!) {
84
+ revokeMyAgentGrant(agentDefinitionId: $agentDefinitionId)
85
+ }
86
+ `;
87
+ const REVOKE_GRANT = gql`
88
+ mutation RevokeAgentGrant($agentDefinitionId: ID!, $userId: String!) {
89
+ revokeAgentGrant(agentDefinitionId: $agentDefinitionId, userId: $userId)
90
+ }
91
+ `;
92
+ const AGENTS_USING_CONNECTION = gql`
93
+ query AgentDefinitionsUsingConnection($connectionId: ID!) {
94
+ agentDefinitionsUsingConnection(connectionId: $connectionId) {
95
+ id
96
+ name
97
+ status
98
+ }
99
+ }
100
+ `;
101
+ function asError(err) {
102
+ return err instanceof Error ? err : new Error(String(err));
103
+ }
104
+ /** The workspace's agent definitions. */
105
+ function useAgentDefinitionList() {
106
+ const [agents, setAgents] = useState([]);
107
+ const [loading, setLoading] = useState(true);
108
+ const [error, setError] = useState(null);
109
+ const reload = useCallback(async () => {
110
+ try {
111
+ const result = await getFluidGridsClient().query({
112
+ query: AGENT_DEFINITIONS,
113
+ fetchPolicy: "network-only"
114
+ });
115
+ throwIfResultError(result);
116
+ setAgents(result.data?.agentDefinitions ?? []);
117
+ setError(null);
118
+ } catch (err) {
119
+ setError(asError(err));
120
+ } finally {
121
+ setLoading(false);
122
+ }
123
+ }, []);
124
+ useEffect(() => {
125
+ reload();
126
+ }, [reload]);
127
+ return {
128
+ agents,
129
+ loading,
130
+ error,
131
+ reload
132
+ };
133
+ }
134
+ /** Everything Settings → Agents needs. */
135
+ function useAgentDefinitions() {
136
+ const list = useAgentDefinitionList();
137
+ const { reload } = list;
138
+ const save = useCallback(async (id, input) => {
139
+ const client = getFluidGridsClient();
140
+ const result = id ? await client.mutate({
141
+ mutation: UPDATE_AGENT,
142
+ variables: {
143
+ id,
144
+ input
145
+ }
146
+ }) : await client.mutate({
147
+ mutation: CREATE_AGENT,
148
+ variables: { input }
149
+ });
150
+ throwIfResultError(result);
151
+ await reload();
152
+ }, [reload]);
153
+ const remove = useCallback(async (id) => {
154
+ const result = await getFluidGridsClient().mutate({
155
+ mutation: DELETE_AGENT,
156
+ variables: { id }
157
+ });
158
+ throwIfResultError(result);
159
+ await reload();
160
+ }, [reload]);
161
+ const grants = useCallback(async (agentDefinitionId) => {
162
+ const result = await getFluidGridsClient().query({
163
+ query: AGENT_GRANTS,
164
+ variables: { agentDefinitionId },
165
+ fetchPolicy: "network-only"
166
+ });
167
+ throwIfResultError(result);
168
+ return result.data?.agentDefinitionGrants ?? [];
169
+ }, []);
170
+ const grant = useCallback(async (agentDefinitionId, expiresInDays) => {
171
+ const result = await getFluidGridsClient().mutate({
172
+ mutation: GRANT_AGENT,
173
+ variables: {
174
+ agentDefinitionId,
175
+ expiresInDays
176
+ }
177
+ });
178
+ throwIfResultError(result);
179
+ }, []);
180
+ const revoke = useCallback(async (agentDefinitionId, userId) => {
181
+ const result = userId ? await getFluidGridsClient().mutate({
182
+ mutation: REVOKE_GRANT,
183
+ variables: {
184
+ agentDefinitionId,
185
+ userId
186
+ }
187
+ }) : await getFluidGridsClient().mutate({
188
+ mutation: REVOKE_MY_GRANT,
189
+ variables: { agentDefinitionId }
190
+ });
191
+ throwIfResultError(result);
192
+ }, []);
193
+ return {
194
+ ...list,
195
+ save,
196
+ remove,
197
+ grants,
198
+ grant,
199
+ revoke
200
+ };
201
+ }
202
+ /**
203
+ * The agents allowed to use a connection (its "used by agents" list). Viewers without access to
204
+ * agent definitions get an empty list rather than an error: the list is informational.
205
+ */
206
+ function useAgentsUsingConnection(connectionId) {
207
+ const [agents, setAgents] = useState([]);
208
+ useEffect(() => {
209
+ if (!connectionId) {
210
+ setAgents([]);
211
+ return;
212
+ }
213
+ let cancelled = false;
214
+ getFluidGridsClient().query({
215
+ query: AGENTS_USING_CONNECTION,
216
+ variables: { connectionId },
217
+ fetchPolicy: "network-only"
218
+ }).then((result) => {
219
+ throwIfResultError(result);
220
+ if (!cancelled) setAgents(result.data?.agentDefinitionsUsingConnection ?? []);
221
+ }).catch(() => {
222
+ if (!cancelled) setAgents([]);
223
+ });
224
+ return () => {
225
+ cancelled = true;
226
+ };
227
+ }, [connectionId]);
228
+ return agents;
229
+ }
230
+
231
+ // src/modules/mcp-gateway/components/McpTriggerServers.tsx
232
+ /**
233
+ * MCP Server Triggers (BOFF-12237 backend, BOFF-14527 editor).
234
+ *
235
+ * `McpServerDetails` shows one served trigger: its URL, schema version, tools, the tools left out
236
+ * with the reason, and the API key scope. The builder's trigger panel and Settings → MCP both use
237
+ * it; `McpTriggerServersSection` is the Settings list.
238
+ */
239
+ const CARD = "rounded-lg border border-border-default bg-surface-canvas p-4 space-y-3";
240
+ async function copyText(value, done, failed) {
241
+ try {
242
+ await navigator.clipboard.writeText(value);
243
+ toast.success(done);
244
+ } catch {
245
+ toast.error(failed);
246
+ }
247
+ }
248
+ /** A value with a copy button (URL, scope). */
249
+ function McpCopyLine({ value, copyLabel, copiedMessage, testId }) {
250
+ const tr = useTr();
251
+ return /* @__PURE__ */ jsxs("div", {
252
+ className: "flex min-w-0 items-center gap-2",
253
+ children: [/* @__PURE__ */ jsx("code", {
254
+ className: "min-w-0 flex-1 break-all rounded bg-surface px-2 py-1 font-mono text-xs text-text-primary",
255
+ "data-testid": testId,
256
+ children: value
257
+ }), /* @__PURE__ */ jsx(Button$1, {
258
+ size: "sm",
259
+ variant: "outline",
260
+ "aria-label": copyLabel,
261
+ title: copyLabel,
262
+ "data-testid": `${testId}-copy`,
263
+ onClick: () => void copyText(value, copiedMessage, tr("fluidgrids.mcp.copyFailed", "Copy failed")),
264
+ children: /* @__PURE__ */ jsx(Icon, {
265
+ icon: "mdi:content-copy",
266
+ width: 14
267
+ })
268
+ })]
269
+ });
270
+ }
271
+ /** One served (or once served) MCP Server Trigger. */
272
+ function McpServerDetails({ server, onAllowWrite, testIdPrefix = "mcp-server" }) {
273
+ const tr = useTr();
274
+ const url = mcpPublicUrl(server.endpointPath);
275
+ return /* @__PURE__ */ jsxs("div", {
276
+ className: "space-y-3",
277
+ "data-testid": `${testIdPrefix}-details`,
278
+ children: [
279
+ /* @__PURE__ */ jsxs("div", {
280
+ className: "flex flex-wrap items-center gap-2 text-xs text-text-secondary",
281
+ children: [
282
+ /* @__PURE__ */ jsx(Badge, {
283
+ variant: "outline",
284
+ className: cn("text-xs", server.isActive ? "border-status-success-border bg-status-success-bg-subtle text-status-success-text" : "border-border-default bg-surface text-text-secondary"),
285
+ "data-testid": `${testIdPrefix}-status`,
286
+ children: server.isActive ? tr("fluidgrids.mcp.server.serving", "Serving") : tr("fluidgrids.mcp.server.stopped", "Not served")
287
+ }),
288
+ /* @__PURE__ */ jsx("span", {
289
+ "data-testid": `${testIdPrefix}-schema-version`,
290
+ children: tr("fluidgrids.mcp.server.schemaVersion", "Schema version {{version}}", { version: server.schemaVersion })
291
+ }),
292
+ /* @__PURE__ */ jsx("span", { children: tr("fluidgrids.mcp.server.fromVersion", "from workflow version {{version}}", { version: server.workflowVersion }) })
293
+ ]
294
+ }),
295
+ /* @__PURE__ */ jsxs("div", {
296
+ className: "space-y-1",
297
+ children: [/* @__PURE__ */ jsx("p", {
298
+ className: "text-xs font-medium text-text-secondary",
299
+ children: tr("fluidgrids.mcp.server.url", "Production URL (POST, Streamable HTTP)")
300
+ }), /* @__PURE__ */ jsx(McpCopyLine, {
301
+ value: url,
302
+ copyLabel: tr("fluidgrids.mcp.server.copyUrl", "Copy the server URL"),
303
+ copiedMessage: tr("fluidgrids.mcp.server.urlCopied", "Server URL copied"),
304
+ testId: `${testIdPrefix}-url`
305
+ })]
306
+ }),
307
+ /* @__PURE__ */ jsxs("div", {
308
+ className: "space-y-1",
309
+ children: [
310
+ /* @__PURE__ */ jsx("p", {
311
+ className: "text-xs font-medium text-text-secondary",
312
+ children: tr("fluidgrids.mcp.server.scope", "API key scope for this server")
313
+ }),
314
+ /* @__PURE__ */ jsx(McpCopyLine, {
315
+ value: server.scope,
316
+ copyLabel: tr("fluidgrids.mcp.server.copyScope", "Copy the scope"),
317
+ copiedMessage: tr("fluidgrids.mcp.server.scopeCopied", "Scope copied"),
318
+ testId: `${testIdPrefix}-scope`
319
+ }),
320
+ /* @__PURE__ */ jsx("p", {
321
+ className: "text-[11px] leading-snug text-text-secondary",
322
+ children: tr("fluidgrids.mcp.server.scopeHelp", "Create a token with this scope in Settings → MCP. A client can pin this tool list with ?version={{version}}.", { version: server.schemaVersion })
323
+ })
324
+ ]
325
+ }),
326
+ /* @__PURE__ */ jsxs("div", {
327
+ className: "space-y-1",
328
+ children: [/* @__PURE__ */ jsx("p", {
329
+ className: "text-xs font-medium text-text-secondary",
330
+ children: tr("fluidgrids.mcp.server.tools", "Served tools ({{count}})", { count: server.tools.length })
331
+ }), server.tools.length === 0 ? /* @__PURE__ */ jsx(EmptyState, {
332
+ kind: "first-use",
333
+ illustration: "servers",
334
+ size: "inline",
335
+ compact: true,
336
+ icon: null,
337
+ title: tr("fluidgrids.mcp.server.noTools", "No tools are served.")
338
+ }) : /* @__PURE__ */ jsx("ul", {
339
+ className: "space-y-1",
340
+ "data-testid": `${testIdPrefix}-tools`,
341
+ children: server.tools.map((tool) => /* @__PURE__ */ jsxs("li", {
342
+ className: "text-xs",
343
+ children: [
344
+ /* @__PURE__ */ jsx("span", {
345
+ className: "font-mono text-text-primary",
346
+ children: tool.name
347
+ }),
348
+ " ",
349
+ /* @__PURE__ */ jsx("span", {
350
+ className: cn("rounded border px-1 text-[10px]", tool.readOnly ? "border-status-success-border text-status-success-text" : "border-status-warning-border text-status-warning-text"),
351
+ children: tool.readOnly ? tr("fluidgrids.mcp.tools.readOnly", "Read only") : tr("fluidgrids.mcp.tools.write", "Changes data")
352
+ }),
353
+ tool.description ? /* @__PURE__ */ jsx("span", {
354
+ className: "block text-text-secondary",
355
+ children: tool.description
356
+ }) : null
357
+ ]
358
+ }, tool.name))
359
+ })]
360
+ }),
361
+ server.skipped.length > 0 && /* @__PURE__ */ jsxs("div", {
362
+ className: "space-y-1",
363
+ children: [/* @__PURE__ */ jsx("p", {
364
+ className: "text-xs font-medium text-status-warning-text",
365
+ children: tr("fluidgrids.mcp.server.skipped", "Not served ({{count}})", { count: server.skipped.length })
366
+ }), /* @__PURE__ */ jsx("ul", {
367
+ className: "space-y-1",
368
+ "data-testid": `${testIdPrefix}-skipped`,
369
+ children: server.skipped.map((skip) => /* @__PURE__ */ jsxs("li", {
370
+ className: "flex flex-wrap items-start justify-between gap-2 text-xs",
371
+ children: [/* @__PURE__ */ jsxs("span", { children: [/* @__PURE__ */ jsx("span", {
372
+ className: "font-mono text-text-primary",
373
+ children: skip.toolName
374
+ }), /* @__PURE__ */ jsx("span", {
375
+ className: "block text-text-secondary",
376
+ children: skip.reason
377
+ })] }), onAllowWrite && /* @__PURE__ */ jsx(Button$1, {
378
+ size: "sm",
379
+ variant: "outline",
380
+ onClick: () => onAllowWrite(skip.toolName),
381
+ "data-testid": `${testIdPrefix}-allow-${skip.toolName}`,
382
+ children: tr("fluidgrids.mcp.server.allowWrite", "Allow writes")
383
+ })]
384
+ }, skip.toolName))
385
+ })]
386
+ })
387
+ ]
388
+ });
389
+ }
390
+ /** Settings → MCP: the workspace's MCP Server Triggers. */
391
+ function McpTriggerServersSection({ servers, loading, error, onReload, workflowKey }) {
392
+ const tr = useTr();
393
+ return /* @__PURE__ */ jsxs("section", {
394
+ className: CARD,
395
+ "data-testid": "mcp-trigger-servers",
396
+ children: [
397
+ /* @__PURE__ */ jsxs("div", {
398
+ className: "flex items-center justify-between gap-2",
399
+ children: [/* @__PURE__ */ jsx("h3", {
400
+ className: "text-base font-semibold text-text-primary",
401
+ children: tr("fluidgrids.mcp.servers.title", "MCP Server Triggers")
402
+ }), /* @__PURE__ */ jsx(Button$1, {
403
+ size: "sm",
404
+ variant: "ghost",
405
+ "aria-label": tr("fluidgrids.mcp.servers.refresh", "Refresh"),
406
+ onClick: onReload,
407
+ children: /* @__PURE__ */ jsx(Icon, {
408
+ icon: "mdi:refresh",
409
+ width: 16
410
+ })
411
+ })]
412
+ }),
413
+ /* @__PURE__ */ jsx("p", {
414
+ className: "text-xs text-text-secondary",
415
+ children: workflowKey ? tr("fluidgrids.mcp.servers.helpWorkflow", "MCP servers this workflow serves. Add an MCP Server Trigger, wire tool nodes to its Tool port and activate the workflow.") : tr("fluidgrids.mcp.servers.help", "Each MCP Server Trigger serves the tool nodes wired to it as its own MCP server while its workflow is active. Grant a token its scope to call it.")
416
+ }),
417
+ error && !loading && servers.length === 0 ? /* @__PURE__ */ jsx("p", {
418
+ className: "text-sm text-status-error-text",
419
+ children: describeOperationError(error)
420
+ }) : null,
421
+ /* @__PURE__ */ jsxs("ul", {
422
+ className: "divide-y divide-border-default",
423
+ children: [servers.map((server) => /* @__PURE__ */ jsxs("li", {
424
+ className: "space-y-2 py-3",
425
+ children: [/* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsxs("p", {
426
+ className: "text-sm font-medium text-text-primary",
427
+ children: [
428
+ server.serverName,
429
+ " ",
430
+ /* @__PURE__ */ jsxs("span", {
431
+ className: "font-mono text-xs text-text-secondary",
432
+ children: ["/s/", server.path]
433
+ })
434
+ ]
435
+ }), /* @__PURE__ */ jsx("p", {
436
+ className: "text-xs text-text-secondary",
437
+ children: tr("fluidgrids.mcp.servers.workflow", "Workflow {{key}}", { key: server.workflowKey })
438
+ })] }), /* @__PURE__ */ jsx(McpServerDetails, {
439
+ server,
440
+ testIdPrefix: `mcp-server-${server.path}`
441
+ })]
442
+ }, server.id)), !loading && !error && servers.length === 0 && /* @__PURE__ */ jsx("li", {
443
+ className: "py-2",
444
+ "data-testid": "mcp-trigger-servers-empty",
445
+ children: /* @__PURE__ */ jsx(EmptyState, {
446
+ kind: "first-use",
447
+ illustration: "servers",
448
+ size: "inline",
449
+ compact: true,
450
+ icon: null,
451
+ title: tr("fluidgrids.mcp.servers.empty", "No MCP Server Triggers have been activated yet.")
452
+ })
453
+ })]
454
+ })
455
+ ]
456
+ });
457
+ }
458
+
459
+ export { useAgentDefinitions as a, useAgentDefinitionList as i, McpServerDetails as n, useAgentsUsingConnection as o, McpTriggerServersSection as r, McpCopyLine as t };
@@ -0,0 +1,224 @@
1
+ "use client";
2
+ import { a as DialogFooter$1, i as DialogDescription$1, l as DialogTitle$1, o as DialogHeader$1, r as DialogContent$1, t as Dialog$1 } from "./dialog-BVd152GS.js";
3
+ import { t as Button$1 } from "./button-DG7y_FVJ.js";
4
+ import { t as Badge$1 } from "./badge-CXfPhoMH.js";
5
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
+ import { AlertTriangle, CheckCircle2, Download, ExternalLink, Puzzle, ShoppingCart } from "lucide-react";
7
+ import { SpinnerIcon } from "@burdenoff/fe-libs/ui";
8
+
9
+ // src/builder/components/flow-builder/components/templates/MissingNodesInstallModal.tsx
10
+ function MissingNodesInstallModal({ open, onOpenChange, workflowName, nodeCheckResult, onConfirm, onSkip, installing = false, installProgress, installErrors = [] }) {
11
+ const hasMissingFreeNodes = (nodeCheckResult?.missing.length ?? 0) > 0;
12
+ const hasPaidBlockers = (nodeCheckResult?.missingPaid.length ?? 0) > 0;
13
+ const needsUpdateNodes = nodeCheckResult?.needsUpdate ?? [];
14
+ const hasNeedsUpdate = needsUpdateNodes.length > 0;
15
+ const unavailableNodes = nodeCheckResult?.unavailable ?? [];
16
+ const hasUnavailableNodes = unavailableNodes.length > 0;
17
+ const buttonLabel = hasPaidBlockers ? "Purchase Required Nodes First" : installing && !!installProgress ? `Installing nodes (${installProgress.current}/${installProgress.total})...` : hasMissingFreeNodes && hasNeedsUpdate ? "Install & Update Nodes" : hasMissingFreeNodes ? "Install Missing Nodes" : hasNeedsUpdate ? "Update Nodes" : "Open in Builder";
18
+ return /* @__PURE__ */ jsx(Dialog$1, {
19
+ open,
20
+ onOpenChange,
21
+ children: /* @__PURE__ */ jsxs(DialogContent$1, {
22
+ size: "lg",
23
+ className: "!flex !flex-col !max-h-[85vh] overflow-hidden p-0 gap-0",
24
+ children: [
25
+ /* @__PURE__ */ jsxs(DialogHeader$1, {
26
+ className: "px-6 pt-6 pb-4 border-b shrink-0",
27
+ children: [/* @__PURE__ */ jsxs("div", {
28
+ className: "flex items-center gap-2",
29
+ children: [/* @__PURE__ */ jsx(Puzzle, { className: "size-5 text-primary" }), /* @__PURE__ */ jsx(DialogTitle$1, {
30
+ className: "text-xl",
31
+ children: !hasMissingFreeNodes && !hasPaidBlockers && !hasUnavailableNodes && hasNeedsUpdate ? workflowName ? `Node updates for "${workflowName}"` : "Workflow node updates" : workflowName ? `Missing nodes for "${workflowName}"` : "Missing workflow nodes"
32
+ })]
33
+ }), /* @__PURE__ */ jsx(DialogDescription$1, { children: hasMissingFreeNodes || hasPaidBlockers ? "This workflow uses nodes that are not installed in your workspace. Install them now, or open the workflow and install them later." : hasNeedsUpdate ? "This workflow needs a newer version of some nodes than the one installed in your workspace. Update them now, or open the workflow and update them later." : "This workflow uses nodes that are not available in your workspace. You can still open the workflow — the affected steps will need attention before it can run." })]
34
+ }),
35
+ /* @__PURE__ */ jsxs("div", {
36
+ className: "flex-1 overflow-y-auto px-6 py-5 space-y-6",
37
+ children: [
38
+ nodeCheckResult && /* @__PURE__ */ jsxs("div", {
39
+ className: "space-y-3",
40
+ children: [/* @__PURE__ */ jsxs("h4", {
41
+ className: "text-sm font-semibold text-foreground flex items-center gap-2",
42
+ children: [/* @__PURE__ */ jsx(Download, { className: "size-4" }), "Node Dependencies"]
43
+ }), /* @__PURE__ */ jsxs("div", {
44
+ className: "space-y-2",
45
+ children: [
46
+ nodeCheckResult.installed.map((node) => /* @__PURE__ */ jsxs("div", {
47
+ className: "flex items-center gap-2 text-sm",
48
+ children: [
49
+ /* @__PURE__ */ jsx(CheckCircle2, { className: "size-4 text-status-success-text shrink-0" }),
50
+ /* @__PURE__ */ jsxs("span", { children: [
51
+ node.displayName || node.nodeType,
52
+ " v",
53
+ node.nodeVersion
54
+ ] }),
55
+ /* @__PURE__ */ jsx(Badge$1, {
56
+ variant: "secondary",
57
+ className: "text-xs ml-auto",
58
+ children: "Installed"
59
+ })
60
+ ]
61
+ }, node.nodeType)),
62
+ needsUpdateNodes.map((node) => /* @__PURE__ */ jsxs("div", {
63
+ className: "flex items-center gap-2 text-sm",
64
+ children: [
65
+ /* @__PURE__ */ jsx(Download, { className: "size-4 text-status-info-text shrink-0" }),
66
+ /* @__PURE__ */ jsxs("span", { children: [
67
+ node.displayName || node.nodeType,
68
+ " v",
69
+ node.nodeVersion
70
+ ] }),
71
+ /* @__PURE__ */ jsx(Badge$1, {
72
+ variant: "outline",
73
+ className: "text-xs ml-auto border-status-info-border text-status-info-text",
74
+ children: "Needs update"
75
+ })
76
+ ]
77
+ }, node.nodeType)),
78
+ nodeCheckResult.missing.map((node) => /* @__PURE__ */ jsxs("div", {
79
+ className: "flex items-center gap-2 text-sm",
80
+ children: [
81
+ /* @__PURE__ */ jsx(Download, { className: "size-4 text-status-info-text shrink-0" }),
82
+ /* @__PURE__ */ jsxs("span", { children: [
83
+ node.displayName || node.nodeType,
84
+ " v",
85
+ node.nodeVersion
86
+ ] }),
87
+ /* @__PURE__ */ jsx(Badge$1, {
88
+ variant: "outline",
89
+ className: "text-xs ml-auto border-status-info-border text-status-info-text",
90
+ children: "Not installed"
91
+ })
92
+ ]
93
+ }, node.nodeType)),
94
+ unavailableNodes.map((node) => /* @__PURE__ */ jsxs("div", {
95
+ className: "flex items-center gap-2 text-sm",
96
+ children: [
97
+ /* @__PURE__ */ jsx(AlertTriangle, { className: "size-4 text-muted-foreground shrink-0" }),
98
+ /* @__PURE__ */ jsxs("span", { children: [
99
+ node.displayName || node.nodeType,
100
+ " v",
101
+ node.nodeVersion
102
+ ] }),
103
+ /* @__PURE__ */ jsx(Badge$1, {
104
+ variant: "outline",
105
+ className: "text-xs ml-auto",
106
+ children: "Not available in store"
107
+ })
108
+ ]
109
+ }, node.nodeType)),
110
+ nodeCheckResult.missingPaid.map((node) => /* @__PURE__ */ jsxs("div", {
111
+ className: "flex items-center gap-2 text-sm",
112
+ children: [
113
+ /* @__PURE__ */ jsx(ShoppingCart, { className: "size-4 text-status-warning-text shrink-0" }),
114
+ /* @__PURE__ */ jsxs("span", { children: [
115
+ node.displayName || node.nodeType,
116
+ " v",
117
+ node.nodeVersion
118
+ ] }),
119
+ /* @__PURE__ */ jsx(Badge$1, {
120
+ variant: "outline",
121
+ className: "text-xs ml-auto border-status-warning-border text-status-warning-text",
122
+ children: "Purchase required"
123
+ })
124
+ ]
125
+ }, node.nodeType))
126
+ ]
127
+ })]
128
+ }),
129
+ installErrors.length > 0 && /* @__PURE__ */ jsxs("div", {
130
+ className: "rounded-lg bg-destructive/10 border border-destructive/30 p-3 text-sm text-destructive flex items-start gap-2",
131
+ children: [/* @__PURE__ */ jsx(AlertTriangle, { className: "size-4 mt-0.5 shrink-0" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
132
+ className: "font-medium",
133
+ children: "Some nodes could not be installed"
134
+ }), /* @__PURE__ */ jsxs("p", {
135
+ className: "mt-1 text-xs",
136
+ children: [installErrors.join(", "), ". Try again, or open the workflow without installing."]
137
+ })] })]
138
+ }),
139
+ hasUnavailableNodes && !hasMissingFreeNodes && !hasPaidBlockers && /* @__PURE__ */ jsxs("div", {
140
+ className: "rounded-lg bg-muted/50 border border-border p-3 text-sm text-muted-foreground flex items-start gap-2",
141
+ children: [/* @__PURE__ */ jsx(AlertTriangle, { className: "size-4 mt-0.5 shrink-0" }), /* @__PURE__ */ jsxs("div", { children: [/* @__PURE__ */ jsx("p", {
142
+ className: "font-medium text-foreground",
143
+ children: "Nothing to install"
144
+ }), /* @__PURE__ */ jsx("p", {
145
+ className: "mt-1 text-xs",
146
+ children: "These nodes are not published to the store, so they cannot be installed from here. Open the workflow to review the steps that use them."
147
+ })] })]
148
+ }),
149
+ hasPaidBlockers && /* @__PURE__ */ jsxs("div", {
150
+ className: "rounded-lg bg-status-warning-bg-subtle border border-status-warning-border p-3 text-sm text-status-warning-text flex items-start gap-2",
151
+ children: [/* @__PURE__ */ jsx(AlertTriangle, { className: "size-4 mt-0.5 shrink-0" }), /* @__PURE__ */ jsxs("div", { children: [
152
+ /* @__PURE__ */ jsx("p", {
153
+ className: "font-medium",
154
+ children: "Purchase required before installing"
155
+ }),
156
+ /* @__PURE__ */ jsx("p", {
157
+ className: "mt-1 text-xs",
158
+ children: "The nodes marked \"Purchase required\" must be purchased from the store before this workflow can use them."
159
+ }),
160
+ /* @__PURE__ */ jsxs(Button$1, {
161
+ variant: "link",
162
+ size: "sm",
163
+ className: "mt-1 h-auto p-0 text-xs text-status-warning-text underline",
164
+ onClick: () => window.open("/store", "_blank"),
165
+ children: [/* @__PURE__ */ jsx(ExternalLink, { className: "size-3 mr-1" }), "Go to Store"]
166
+ })
167
+ ] })]
168
+ })
169
+ ]
170
+ }),
171
+ /* @__PURE__ */ jsxs(DialogFooter$1, {
172
+ className: "px-6 py-4 border-t shrink-0 flex-col gap-2",
173
+ children: [installProgress && /* @__PURE__ */ jsxs("div", {
174
+ className: "w-full space-y-1.5",
175
+ children: [/* @__PURE__ */ jsxs("div", {
176
+ className: "flex items-center justify-between text-xs text-muted-foreground",
177
+ children: [/* @__PURE__ */ jsxs("span", {
178
+ className: "flex items-center gap-1.5",
179
+ children: [
180
+ /* @__PURE__ */ jsx(SpinnerIcon, { className: "size-3 animate-spin" }),
181
+ "Installing: ",
182
+ installProgress.nodeName
183
+ ]
184
+ }), /* @__PURE__ */ jsxs("span", { children: [
185
+ installProgress.current,
186
+ " / ",
187
+ installProgress.total
188
+ ] })]
189
+ }), /* @__PURE__ */ jsx("div", {
190
+ className: "h-1.5 w-full rounded-full bg-muted overflow-hidden",
191
+ children: /* @__PURE__ */ jsx("div", {
192
+ className: "h-full bg-primary transition-all duration-300",
193
+ style: { width: `${installProgress.current / installProgress.total * 100}%` }
194
+ })
195
+ })]
196
+ }), /* @__PURE__ */ jsxs("div", {
197
+ className: "flex w-full justify-end gap-2",
198
+ children: [
199
+ onSkip && /* @__PURE__ */ jsx(Button$1, {
200
+ variant: "outline",
201
+ onClick: onSkip,
202
+ disabled: installing,
203
+ children: "Open Without Installing"
204
+ }),
205
+ /* @__PURE__ */ jsx(Button$1, {
206
+ variant: "outline",
207
+ onClick: () => onOpenChange(false),
208
+ disabled: installing,
209
+ children: "Cancel"
210
+ }),
211
+ /* @__PURE__ */ jsx(Button$1, {
212
+ onClick: onConfirm,
213
+ disabled: installing || hasPaidBlockers,
214
+ children: installing ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(SpinnerIcon, { className: "size-4 mr-2 animate-spin" }), buttonLabel] }) : /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Download, { className: "size-4 mr-2" }), buttonLabel] })
215
+ })
216
+ ]
217
+ })]
218
+ })
219
+ ]
220
+ })
221
+ });
222
+ }
223
+
224
+ export { MissingNodesInstallModal };