@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,81 @@
1
+ "use client";
2
+ // src/modules/executions/utils/run-display.ts
3
+ /**
4
+ * Versions are stored as "v1"/"v2" (legacy: "1.0.0"). Render without
5
+ * double-prefixing: "v1" stays "v1", "1.0.0" becomes "v1.0.0".
6
+ */
7
+ function formatRunVersion(version) {
8
+ if (!version) return "";
9
+ return version.startsWith("v") ? version : `v${version}`;
10
+ }
11
+ function asString(value) {
12
+ return typeof value === "string" && value.trim() ? value : void 0;
13
+ }
14
+ function readableType(value) {
15
+ const type = asString(value);
16
+ return type === void 0 ? void 0 : readableNodeType(type);
17
+ }
18
+ /**
19
+ * BOFF-13267: a node type id read as a name, for a step that has neither a
20
+ * label nor a manifest name: `internal:code` → "Code", `action/http_request`
21
+ * → "HTTP request". The id itself is still shown where the page lists types.
22
+ */
23
+ function readableNodeType(type) {
24
+ const words = (type.split(/[:/]/).filter(Boolean).pop() ?? type).replace(/([a-z0-9])([A-Z])/g, "$1 $2").split(/[-_.\s]+/).filter(Boolean);
25
+ if (words.length === 0) return type;
26
+ const text = words.map((word) => ACRONYMS.get(word.toLowerCase()) ?? word.toLowerCase()).join(" ");
27
+ return text.charAt(0).toUpperCase() + text.slice(1);
28
+ }
29
+ /** Words that read as initials: `http_request` → "HTTP request". */
30
+ const ACRONYMS = new Map([
31
+ "ai",
32
+ "api",
33
+ "csv",
34
+ "ftp",
35
+ "html",
36
+ "http",
37
+ "id",
38
+ "json",
39
+ "llm",
40
+ "pdf",
41
+ "sms",
42
+ "smtp",
43
+ "sql",
44
+ "ssh",
45
+ "url",
46
+ "xml"
47
+ ].map((word) => [word, word.toUpperCase()]));
48
+ /**
49
+ * Build a nodeId → display mapping from a workflow definitionJson.
50
+ * Label priority: user-set node label → manifest name → the node type, read
51
+ * as a name ({@link readableNodeType}).
52
+ * Returns an empty map for missing/malformed definitions (e.g. runs of
53
+ * deleted workflows) — callers fall back to the raw nodeId.
54
+ */
55
+ function buildNodeDisplayMap(definitionJson) {
56
+ const map = {};
57
+ const nodes = definitionJson?.data?.nodes;
58
+ if (!Array.isArray(nodes)) return map;
59
+ for (const node of nodes) {
60
+ const id = asString(node?.id);
61
+ if (!id) continue;
62
+ const label = asString(node?.data?.label) ?? asString(node?.data?.nodeData?.name) ?? readableType(node?.type);
63
+ if (!label) continue;
64
+ const operation = asString(node?.data?.operation_name);
65
+ map[id] = {
66
+ label,
67
+ operation: operation === "execute" ? void 0 : operation
68
+ };
69
+ }
70
+ return map;
71
+ }
72
+ /**
73
+ * "GitHub · searchIssues" title for a node, falling back to the raw nodeId
74
+ * when the definition doesn't know this node.
75
+ */
76
+ function nodeDisplayTitle(display, fallback) {
77
+ if (!display) return fallback;
78
+ return display.operation ? `${display.label} · ${display.operation}` : display.label;
79
+ }
80
+
81
+ export { readableNodeType as i, formatRunVersion as n, nodeDisplayTitle as r, buildNodeDisplayMap as t };
@@ -0,0 +1,285 @@
1
+ "use client";
2
+ // src/modules/executions/utils/run-history.ts
3
+ function isRecord(value) {
4
+ return typeof value === "object" && value !== null && !Array.isArray(value);
5
+ }
6
+ function str(value) {
7
+ return typeof value === "string" && value.trim() ? value : void 0;
8
+ }
9
+ function num(value) {
10
+ return typeof value === "number" && Number.isFinite(value) ? value : void 0;
11
+ }
12
+ function payloadOf(event) {
13
+ return isRecord(event.payload) ? event.payload : {};
14
+ }
15
+ /**
16
+ * Adds `incoming` to `current`, de-duplicated by `seq` and sorted. A live
17
+ * event and the same event from a later backfill page are identical, so the
18
+ * first copy wins. Returns `current` itself when nothing is new, so a React
19
+ * state update with the result is a no-op.
20
+ */
21
+ function mergeHistoryEvents(current, incoming) {
22
+ if (incoming.length === 0) return current;
23
+ const seen = new Set(current.map((event) => event.seq));
24
+ const fresh = incoming.filter((event) => {
25
+ if (seen.has(event.seq)) return false;
26
+ seen.add(event.seq);
27
+ return true;
28
+ });
29
+ if (fresh.length === 0) return current;
30
+ return [...current, ...fresh].sort((a, b) => a.seq - b.seq);
31
+ }
32
+ /** The highest seq held, or 0 for an empty history (the `after` cursor). */
33
+ function lastSeqOf(events) {
34
+ return events.length ? events[events.length - 1].seq : 0;
35
+ }
36
+ /** "250ms", "4s", "2m 5s", "3h 10m", "2d 4h". */
37
+ function formatDurationMs(ms) {
38
+ if (ms < 1e3) return `${Math.max(0, Math.round(ms))}ms`;
39
+ const seconds = Math.round(ms / 1e3);
40
+ if (seconds < 60) return `${seconds}s`;
41
+ const minutes = Math.floor(seconds / 60);
42
+ if (minutes < 60) {
43
+ const rest = seconds % 60;
44
+ return rest ? `${minutes}m ${rest}s` : `${minutes}m`;
45
+ }
46
+ const hours = Math.floor(minutes / 60);
47
+ if (hours < 24) {
48
+ const rest = minutes % 60;
49
+ return rest ? `${hours}h ${rest}m` : `${hours}h`;
50
+ }
51
+ const days = Math.floor(hours / 24);
52
+ const rest = hours % 24;
53
+ return rest ? `${days}d ${rest}h` : `${days}d`;
54
+ }
55
+ function failureOf(value) {
56
+ if (!isRecord(value)) return void 0;
57
+ const message = str(value.message);
58
+ if (!message) return void 0;
59
+ return {
60
+ message,
61
+ errorType: str(value.errorType) ?? str(value.type),
62
+ ...value.category === "BENIGN" ? { benign: true } : {}
63
+ };
64
+ }
65
+ /** Which group an event belongs to, as `[kind, id]`. */
66
+ function groupKeyOf(event) {
67
+ const payload = payloadOf(event);
68
+ const type = event.type;
69
+ if (type.startsWith("WORKFLOW_TASK_")) return ["task", str(payload.taskId) ?? str(event.taskId) ?? `${event.seq}`];
70
+ if (type.startsWith("ACTIVITY_")) return ["activity", str(payload.activityId) ?? `${event.seq}`];
71
+ if (type.startsWith("LOCAL_ACTIVITY_")) return ["activity", str(payload.localActivityId) ?? `${event.seq}`];
72
+ if (type.startsWith("TIMER_")) return ["timer", str(payload.timerId) ?? `${event.seq}`];
73
+ if (type.startsWith("CHILD_RUN_")) return ["child", str(payload.childId) ?? `${event.seq}`];
74
+ if (type.startsWith("EXTERNAL_RUN_")) return ["external", str(payload.externalId) ?? `${event.seq}`];
75
+ if (type.startsWith("UPDATE_")) return ["update", str(payload.updateId) ?? `${event.seq}`];
76
+ if (type === "SIGNAL_RECEIVED") return ["signal", `${event.seq}`];
77
+ if (type === "MARKER_RECORDED") return ["marker", `${event.seq}`];
78
+ if (type === "SIDE_EFFECT_RECORDED") return ["sideEffect", `${event.seq}`];
79
+ if (type === "CONTEXT_UPSERTED") return ["context", `${event.seq}`];
80
+ if (type.startsWith("WORKFLOW_")) return ["workflow", `${event.seq}`];
81
+ return ["other", `${event.seq}`];
82
+ }
83
+ const ACTIVITY_STATUS = {
84
+ ACTIVITY_SCHEDULED: "scheduled",
85
+ ACTIVITY_STARTED: "running",
86
+ ACTIVITY_COMPLETED: "completed",
87
+ ACTIVITY_FAILED: "failed",
88
+ ACTIVITY_TIMED_OUT: "timedOut",
89
+ ACTIVITY_CANCEL_REQUESTED: "cancelRequested",
90
+ ACTIVITY_CANCELLED: "cancelled",
91
+ LOCAL_ACTIVITY_COMPLETED: "completed",
92
+ LOCAL_ACTIVITY_FAILED: "failed"
93
+ };
94
+ const TASK_STATUS = {
95
+ WORKFLOW_TASK_SCHEDULED: "scheduled",
96
+ WORKFLOW_TASK_STARTED: "running",
97
+ WORKFLOW_TASK_COMPLETED: "completed",
98
+ WORKFLOW_TASK_FAILED: "failed",
99
+ WORKFLOW_TASK_TIMED_OUT: "timedOut"
100
+ };
101
+ const TIMER_STATUS = {
102
+ TIMER_STARTED: "running",
103
+ TIMER_FIRED: "fired",
104
+ TIMER_CANCELLED: "cancelled"
105
+ };
106
+ const CHILD_STATUS = {
107
+ CHILD_RUN_INITIATED: "scheduled",
108
+ CHILD_RUN_STARTED: "running",
109
+ CHILD_RUN_COMPLETED: "completed",
110
+ CHILD_RUN_FAILED: "failed",
111
+ CHILD_RUN_CANCELLED: "cancelled",
112
+ CHILD_RUN_TERMINATED: "terminated",
113
+ CHILD_RUN_TIMED_OUT: "timedOut"
114
+ };
115
+ const WORKFLOW_STATUS = {
116
+ WORKFLOW_STARTED: "running",
117
+ WORKFLOW_COMPLETED: "completed",
118
+ WORKFLOW_FAILED: "failed",
119
+ WORKFLOW_CANCELLED: "cancelled",
120
+ WORKFLOW_CANCEL_REQUESTED: "cancelRequested",
121
+ WORKFLOW_TERMINATED: "terminated",
122
+ WORKFLOW_TIMED_OUT: "timedOut",
123
+ WORKFLOW_CONTINUED_AS_NEW: "continued"
124
+ };
125
+ const EXTERNAL_STATUS = {
126
+ EXTERNAL_RUN_CANCEL_REQUESTED: "cancelRequested",
127
+ EXTERNAL_RUN_CANCEL_RESOLVED: "completed",
128
+ EXTERNAL_RUN_SIGNALED: "completed"
129
+ };
130
+ const UPDATE_STATUS = {
131
+ UPDATE_ADMITTED: "scheduled",
132
+ UPDATE_ACCEPTED: "running",
133
+ UPDATE_COMPLETED: "completed"
134
+ };
135
+ /** Statuses after which a group gains no more events. */
136
+ const FINAL_STATUSES = /* @__PURE__ */ new Set([
137
+ "completed",
138
+ "failed",
139
+ "timedOut",
140
+ "cancelled",
141
+ "terminated",
142
+ "continued",
143
+ "fired",
144
+ "received",
145
+ "recorded"
146
+ ]);
147
+ function statusFor(kind, type) {
148
+ switch (kind) {
149
+ case "activity": return ACTIVITY_STATUS[type];
150
+ case "task": return TASK_STATUS[type];
151
+ case "timer": return TIMER_STATUS[type];
152
+ case "child": return CHILD_STATUS[type];
153
+ case "workflow": return WORKFLOW_STATUS[type];
154
+ case "external": return EXTERNAL_STATUS[type];
155
+ case "update": return UPDATE_STATUS[type];
156
+ case "signal": return "received";
157
+ default: return "recorded";
158
+ }
159
+ }
160
+ const WORKFLOW_LABELS = {
161
+ WORKFLOW_STARTED: "Workflow started",
162
+ WORKFLOW_COMPLETED: "Workflow completed",
163
+ WORKFLOW_FAILED: "Workflow failed",
164
+ WORKFLOW_CANCELLED: "Workflow cancelled",
165
+ WORKFLOW_CANCEL_REQUESTED: "Cancel requested",
166
+ WORKFLOW_TERMINATED: "Workflow terminated",
167
+ WORKFLOW_TIMED_OUT: "Workflow timed out",
168
+ WORKFLOW_CONTINUED_AS_NEW: "Continued as new",
169
+ WORKFLOW_RESET: "Workflow reset"
170
+ };
171
+ /** Turns `SOME_EVENT_TYPE` into `Some event type`. */
172
+ function humanizeEventType(type) {
173
+ const words = type.toLowerCase().split("_").filter(Boolean);
174
+ if (!words.length) return type;
175
+ const first = words[0];
176
+ return [first.charAt(0).toUpperCase() + first.slice(1), ...words.slice(1)].join(" ").trim();
177
+ }
178
+ /** Label and detail from the event that opened the group. */
179
+ function describe(kind, id, first) {
180
+ const payload = payloadOf(first);
181
+ const summary = str(payload.summary);
182
+ switch (kind) {
183
+ case "activity": {
184
+ const target = [str(payload.nodeType), str(payload.operation)].filter(Boolean).join(" · ");
185
+ return {
186
+ label: summary ?? (target || `Activity ${id}`),
187
+ detail: summary && target ? target : id
188
+ };
189
+ }
190
+ case "timer": {
191
+ const duration = num(payload.durationMs);
192
+ const span = duration !== void 0 ? formatDurationMs(duration) : "";
193
+ return {
194
+ label: summary ?? (span ? `Timer ${span}` : `Timer ${id}`),
195
+ detail: summary && span ? span : id
196
+ };
197
+ }
198
+ case "child": {
199
+ const target = str(payload.workflowFn) ?? str(payload.workflowKey);
200
+ return {
201
+ label: summary ?? (target ? `Child ${target}` : `Child run ${id}`),
202
+ detail: id
203
+ };
204
+ }
205
+ case "signal": return { label: `Signal ${str(payload.name) ?? ""}`.trim() };
206
+ case "task": return {
207
+ label: "Workflow task",
208
+ detail: id
209
+ };
210
+ case "external": {
211
+ const name = str(payload.name);
212
+ return {
213
+ label: name ? `Signal ${name} to another run` : first.type === "EXTERNAL_RUN_CANCEL_REQUESTED" ? "Cancel another run" : humanizeEventType(first.type),
214
+ detail: id
215
+ };
216
+ }
217
+ case "marker": {
218
+ const markerId = str(payload.markerId) ?? "";
219
+ return {
220
+ label: markerId.startsWith("patch:") ? `Patch ${markerId.slice(6)}` : "Marker",
221
+ detail: markerId || void 0
222
+ };
223
+ }
224
+ case "sideEffect": return {
225
+ label: "Side effect",
226
+ detail: str(payload.sideEffectId)
227
+ };
228
+ case "context": return { label: "Context updated" };
229
+ case "update": return { label: `Update ${str(payload.name) ?? id}` };
230
+ case "workflow": return { label: WORKFLOW_LABELS[first.type] ?? humanizeEventType(first.type) };
231
+ default: return { label: humanizeEventType(first.type) };
232
+ }
233
+ }
234
+ /**
235
+ * Groups a seq-ordered history into rows. Workflow-level events
236
+ * (`WORKFLOW_STARTED`, `WORKFLOW_COMPLETED`, …) and every signal stay rows of
237
+ * their own; the events of one activity, timer, child run, workflow task or
238
+ * update share a row whose status is that of its latest event.
239
+ */
240
+ function groupRunHistory(events) {
241
+ const groups = /* @__PURE__ */ new Map();
242
+ const ordered = [...events].sort((a, b) => a.seq - b.seq);
243
+ for (const event of ordered) {
244
+ const [kind, id] = groupKeyOf(event);
245
+ const key = `${kind}:${id}`;
246
+ const payload = payloadOf(event);
247
+ let group = groups.get(key);
248
+ if (!group) {
249
+ const { label, detail } = describe(kind, id, event);
250
+ group = {
251
+ key,
252
+ kind,
253
+ id,
254
+ label,
255
+ detail,
256
+ status: statusFor(kind, event.type) ?? "recorded",
257
+ events: [],
258
+ firstSeq: event.seq,
259
+ lastSeq: event.seq,
260
+ startedAt: event.createdAt
261
+ };
262
+ groups.set(key, group);
263
+ }
264
+ group.events.push(event);
265
+ group.lastSeq = event.seq;
266
+ const status = statusFor(kind, event.type);
267
+ if (status && !(status === "cancelRequested" && FINAL_STATUSES.has(group.status))) group.status = status;
268
+ if (FINAL_STATUSES.has(group.status)) group.endedAt = event.createdAt;
269
+ const attempt = num(payload.attempt);
270
+ if (attempt !== void 0) group.attempt = Math.max(group.attempt ?? 0, attempt);
271
+ const failure = failureOf(payload.failure) ?? (event.type === "WORKFLOW_TASK_FAILED" || event.type === "WORKFLOW_TASK_TIMED_OUT" ? failureOf({
272
+ message: payload.message,
273
+ errorType: payload.cause
274
+ }) : void 0);
275
+ if (failure) group.failure = {
276
+ ...failure,
277
+ cause: str(payload.cause)
278
+ };
279
+ const childRunId = str(payload.childRunId);
280
+ if (kind === "child" && childRunId) group.childRunId = childRunId;
281
+ }
282
+ return [...groups.values()].sort((a, b) => a.firstSeq - b.firstSeq);
283
+ }
284
+
285
+ export { mergeHistoryEvents as i, groupRunHistory as n, lastSeqOf as r, formatDurationMs as t };
@@ -0,0 +1,98 @@
1
+ "use client";
2
+ import { kh as ErrorType } from "./graphql-types-UTYtujY9.js";
3
+
4
+ // src/modules/executions/utils/run-list-links.ts
5
+ /**
6
+ * Links into the Runs list that carry its filters in the query string
7
+ * (BOFF-9974), and the reading of them on the list.
8
+ *
9
+ * Insights' error panel links each failing node, error type, workflow and day
10
+ * to "the failed runs behind it". The two halves live together so a link and
11
+ * the filter it opens cannot drift apart.
12
+ *
13
+ * ../runs?status=FAILED&failedNodeType=internal%3Ahttp&from=…&to=…
14
+ *
15
+ * `from` / `to` are ISO instants (the list's custom date range); `workflowKey`
16
+ * is read by the list on its own, as it always was.
17
+ */
18
+ /** The filters a link may set; `workflowKey` stays with the list's own sync. */
19
+ const RUN_LIST_LINK_PARAMS = [
20
+ "status",
21
+ "errorType",
22
+ "failedNodeType",
23
+ "from",
24
+ "to"
25
+ ];
26
+ const RUN_STATUSES = [
27
+ "PENDING",
28
+ "RUNNING",
29
+ "COMPLETED",
30
+ "FAILED",
31
+ "CANCELLED",
32
+ "WAITING",
33
+ "TERMINATED"
34
+ ];
35
+ function isRunStatus(value) {
36
+ return RUN_STATUSES.some((status) => status === value);
37
+ }
38
+ /** A classification the service knows (its ErrorType enum). */
39
+ function isErrorType(value) {
40
+ return Object.values(ErrorType).some((type) => type === value);
41
+ }
42
+ function validDate(value) {
43
+ return value instanceof Date && Number.isFinite(value.getTime());
44
+ }
45
+ /** The Runs list with `link`'s filters, relative to an SDK page route. */
46
+ function runListPath(link) {
47
+ const params = new URLSearchParams();
48
+ if (link.workflowKey) params.set("workflowKey", link.workflowKey);
49
+ if (link.status) params.set("status", link.status);
50
+ if (link.errorType) params.set("errorType", link.errorType);
51
+ if (link.failedNodeType) params.set("failedNodeType", link.failedNodeType);
52
+ if (validDate(link.from)) params.set("from", link.from.toISOString());
53
+ if (validDate(link.to)) params.set("to", link.to.toISOString());
54
+ const query = params.toString();
55
+ return query ? `../runs?${query}` : "../runs";
56
+ }
57
+ function parseDate(value) {
58
+ if (!value) return null;
59
+ const date = new Date(value);
60
+ return Number.isFinite(date.getTime()) ? date : null;
61
+ }
62
+ /**
63
+ * The list filters a link's query string sets, or null when it carries none.
64
+ * Unknown values are ignored rather than trusted (the URL is user input); a
65
+ * reversed range is dropped, like the custom range inputs do.
66
+ */
67
+ function runListFilterFromSearch(params) {
68
+ const filter = {};
69
+ const status = params.get("status")?.trim().toUpperCase() ?? "";
70
+ if (isRunStatus(status)) filter.status = status;
71
+ const errorType = params.get("errorType")?.trim().toUpperCase() ?? "";
72
+ if (isErrorType(errorType)) filter.errorType = errorType;
73
+ const failedNodeType = params.get("failedNodeType")?.trim() ?? "";
74
+ if (failedNodeType) filter.failedNodeType = failedNodeType;
75
+ const from = parseDate(params.get("from"));
76
+ const to = parseDate(params.get("to"));
77
+ if ((from || to) && !(from && to && from.getTime() > to.getTime())) filter.dateRange = {
78
+ start: from,
79
+ end: to,
80
+ preset: "custom"
81
+ };
82
+ return Object.keys(filter).length > 0 ? filter : null;
83
+ }
84
+ /** A stable key of the link parameters in `params`, to apply each link once. */
85
+ function runListLinkKey(params) {
86
+ return RUN_LIST_LINK_PARAMS.map((name) => params.get(name) ?? "").join("|");
87
+ }
88
+ /** The UTC day [00:00, 24:00) of an ISO calendar date such as "2026-11-10". */
89
+ function utcDay(date) {
90
+ const from = /* @__PURE__ */ new Date(`${date}T00:00:00.000Z`);
91
+ if (!Number.isFinite(from.getTime())) return null;
92
+ return {
93
+ from,
94
+ to: /* @__PURE__ */ new Date(from.getTime() + 864e5 - 1)
95
+ };
96
+ }
97
+
98
+ export { utcDay as i, runListLinkKey as n, runListPath as r, runListFilterFromSearch as t };
@@ -0,0 +1,82 @@
1
+ "use client";
2
+ import { JH as WorkflowExecutionMode, zH as WorkflowAutonomyLevel } from "./graphql-types-UTYtujY9.js";
3
+ import { r as useTr } from "./TranslationBridge-Da-TPgQm.js";
4
+ import { useMemo } from "react";
5
+
6
+ // src/components/run-mode/run-mode.ts
7
+ /**
8
+ * Run modes and autonomy levels of a workflow (BOFF-9955): the labels and one-line explanations
9
+ * every screen shows, so the list, the cards and Settings say the same thing.
10
+ *
11
+ * - The run mode (`WorkflowDefinition.executionMode`) is derived by the service from the
12
+ * workflow's nodes on every save: DETERMINISTIC (no AI agent node), AGENTIC (apart from triggers,
13
+ * only AI agent nodes) or HYBRID (both). Nobody sets it.
14
+ * - The autonomy level (`definitionJson.config.autonomyLevel`, null = not chosen) is the author's
15
+ * choice in Settings. The service records and audits it; it does not change how agent tool calls
16
+ * are approved yet, so every screen says so.
17
+ */
18
+ const EXECUTION_MODES = [
19
+ "DETERMINISTIC",
20
+ "AGENTIC",
21
+ "HYBRID"
22
+ ];
23
+ const AUTONOMY_LEVELS = [
24
+ "L0",
25
+ "L1",
26
+ "L2",
27
+ "L3"
28
+ ];
29
+ function isExecutionMode(value) {
30
+ return typeof value === "string" && EXECUTION_MODES.includes(value);
31
+ }
32
+ function isAutonomyLevel(value) {
33
+ return typeof value === "string" && AUTONOMY_LEVELS.includes(value);
34
+ }
35
+ /** The icon of each run mode (Iconify names). */
36
+ const EXECUTION_MODE_ICONS = {
37
+ ["DETERMINISTIC"]: "mdi:transit-connection-variant",
38
+ ["AGENTIC"]: "mdi:robot-outline",
39
+ ["HYBRID"]: "mdi:call-split"
40
+ };
41
+ /** Label and one-line explanation of each run mode, in the host's language. */
42
+ function useExecutionModeCopy() {
43
+ const tr = useTr();
44
+ return useMemo(() => ({
45
+ ["DETERMINISTIC"]: {
46
+ label: tr("fluidgrids.runMode.deterministic", "Deterministic"),
47
+ hint: tr("fluidgrids.runMode.deterministicHint", "Every step is fixed in the workflow. No AI agent decides what runs.")
48
+ },
49
+ ["AGENTIC"]: {
50
+ label: tr("fluidgrids.runMode.agentic", "Agentic"),
51
+ hint: tr("fluidgrids.runMode.agenticHint", "AI agents decide the steps. Only the triggers are fixed.")
52
+ },
53
+ ["HYBRID"]: {
54
+ label: tr("fluidgrids.runMode.hybrid", "Hybrid"),
55
+ hint: tr("fluidgrids.runMode.hybridHint", "Fixed steps and AI agents that decide their own steps.")
56
+ }
57
+ }), [tr]);
58
+ }
59
+ /** Label and one-line explanation of each autonomy level, in the host's language. */
60
+ function useAutonomyLevelCopy() {
61
+ const tr = useTr();
62
+ return useMemo(() => ({
63
+ ["L0"]: {
64
+ label: tr("fluidgrids.autonomy.l0", "L0 · Suggest only"),
65
+ hint: tr("fluidgrids.autonomy.l0Hint", "The agent proposes actions and runs none of them.")
66
+ },
67
+ ["L1"]: {
68
+ label: tr("fluidgrids.autonomy.l1", "L1 · Approve every action"),
69
+ hint: tr("fluidgrids.autonomy.l1Hint", "Every action the agent takes waits for a person to approve it.")
70
+ },
71
+ ["L2"]: {
72
+ label: tr("fluidgrids.autonomy.l2", "L2 · Approve risky actions"),
73
+ hint: tr("fluidgrids.autonomy.l2Hint", "Only actions that change or send data wait for approval.")
74
+ },
75
+ ["L3"]: {
76
+ label: tr("fluidgrids.autonomy.l3", "L3 · Act within budget"),
77
+ hint: tr("fluidgrids.autonomy.l3Hint", "The agent acts on its own, within this workflow's AI budget.")
78
+ }
79
+ }), [tr]);
80
+ }
81
+
82
+ export { isExecutionMode as a, isAutonomyLevel as i, EXECUTION_MODES as n, useAutonomyLevelCopy as o, EXECUTION_MODE_ICONS as r, useExecutionModeCopy as s, AUTONOMY_LEVELS as t };
@@ -0,0 +1,144 @@
1
+ "use client";
2
+ import { IV as VersioningBehavior, eP as RunGroupBy } from "./graphql-types-UTYtujY9.js";
3
+
4
+ // src/modules/executions/utils/run-parity.ts
5
+ function isRecord(value) {
6
+ return typeof value === "object" && value !== null && !Array.isArray(value);
7
+ }
8
+ function text(value) {
9
+ return typeof value === "string" && value.trim() ? value : void 0;
10
+ }
11
+ /**
12
+ * The runs a run links to: the first run of its continue-as-new or retry
13
+ * chain, the run it continues, the run that continues it, and the root of its
14
+ * call tree. A link to the run itself is left out, and so is a run already
15
+ * listed under an earlier kind (a chain of two has the same first and
16
+ * previous run), and the root when it is the parent the page already links.
17
+ */
18
+ function runChainLinks(run) {
19
+ const candidates = [
20
+ ["previous", run.continuedFromRunId],
21
+ ["next", run.continuedToRunId],
22
+ ["first", run.firstRunId],
23
+ ["root", run.rootRunId === run.parentRunId ? null : run.rootRunId]
24
+ ];
25
+ const seen = /* @__PURE__ */ new Set([run.id]);
26
+ const links = [];
27
+ for (const [kind, runId] of candidates) {
28
+ if (!runId || seen.has(runId)) continue;
29
+ seen.add(runId);
30
+ links.push({
31
+ kind,
32
+ runId
33
+ });
34
+ }
35
+ return links;
36
+ }
37
+ /** `abcdef123456…` for a long id, the id itself when it is short. */
38
+ function shortRunId(runId, length = 12) {
39
+ return runId.length > length ? `${runId.slice(0, length)}…` : runId;
40
+ }
41
+ function handlersOf(value) {
42
+ const entries = Array.isArray(value) ? value.map((entry) => [void 0, entry]) : isRecord(value) ? Object.entries(value) : [];
43
+ const handlers = [];
44
+ for (const [key, entry] of entries) {
45
+ if (typeof entry === "string") {
46
+ handlers.push({ name: entry });
47
+ continue;
48
+ }
49
+ if (!isRecord(entry)) continue;
50
+ const name = text(entry.name) ?? key;
51
+ if (!name) continue;
52
+ const description = text(entry.description);
53
+ handlers.push(description ? {
54
+ name,
55
+ description
56
+ } : { name });
57
+ }
58
+ return handlers;
59
+ }
60
+ /** The `__metadata` definition: the function's name and declared handlers. */
61
+ function parseMetadataDefinition(definition) {
62
+ const value = isRecord(definition) ? definition : {};
63
+ return {
64
+ name: text(value.name),
65
+ signals: handlersOf(value.signals),
66
+ queries: handlersOf(value.queries),
67
+ updates: handlersOf(value.updates)
68
+ };
69
+ }
70
+ /** The longest workflow id the service accepts (11 §2.1). */
71
+ const WORKFLOW_ID_MAX_LENGTH = 256;
72
+ /**
73
+ * Adds the workflow-id filter to a Runs list request. Only while parity is
74
+ * on and only a real value, so with the flag off the request is exactly what
75
+ * it was before.
76
+ */
77
+ function withWorkflowIdFilter(input, workflowId, parityEnabled) {
78
+ const value = workflowId.trim();
79
+ if (!parityEnabled || !value) return input;
80
+ return {
81
+ ...input,
82
+ businessId: value.slice(0, 256)
83
+ };
84
+ }
85
+ /**
86
+ * The `workflowRunsCount` filter for the status chips: the list's filter
87
+ * without paging (the count ignores it anyway) and without the status, so
88
+ * every status gets its own count instead of only the selected one.
89
+ */
90
+ function statusCountFilter(input) {
91
+ const rest = { ...input };
92
+ delete rest.limit;
93
+ delete rest.offset;
94
+ delete rest.status;
95
+ return rest;
96
+ }
97
+ const STATUS_COUNT_GROUP_BY = ["STATUS"];
98
+ /** Counts per status from a `groupBy: [STATUS]` result, largest first. */
99
+ function statusCountsOf(groups) {
100
+ const counts = /* @__PURE__ */ new Map();
101
+ for (const group of groups) {
102
+ const status = group.values[0] ?? group.key;
103
+ if (!status) continue;
104
+ counts.set(status, (counts.get(status) ?? 0) + group.count);
105
+ }
106
+ return [...counts.entries()].map(([status, count]) => ({
107
+ status,
108
+ count
109
+ })).sort((a, b) => b.count - a.count || a.status.localeCompare(b.status));
110
+ }
111
+ /** The `override` argument of setWorkflowRunVersioningOverride for a choice. */
112
+ function overrideRequestOf(choice, version) {
113
+ if (choice === "remove") return {
114
+ ok: true,
115
+ override: null
116
+ };
117
+ if (choice === "autoUpgrade") return {
118
+ ok: true,
119
+ override: { behavior: "AUTO_UPGRADE" }
120
+ };
121
+ const pinned = version.trim();
122
+ if (!pinned) return {
123
+ ok: false,
124
+ reason: "versionRequired"
125
+ };
126
+ return {
127
+ ok: true,
128
+ override: {
129
+ behavior: "PINNED",
130
+ version: pinned
131
+ }
132
+ };
133
+ }
134
+ /** The chip colour of a callback delivery status. */
135
+ function callbackTone(status) {
136
+ switch (status) {
137
+ case "DELIVERED": return "success";
138
+ case "FAILED": return "error";
139
+ case "DELIVERING": return "info";
140
+ default: return "neutral";
141
+ }
142
+ }
143
+
144
+ export { runChainLinks as a, statusCountsOf as c, parseMetadataDefinition as i, withWorkflowIdFilter as l, callbackTone as n, shortRunId as o, overrideRequestOf as r, statusCountFilter as s, STATUS_COUNT_GROUP_BY as t };