@hotmeshio/long-tail 0.9.3 → 0.9.4

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 (195) hide show
  1. package/dashboard/dist/assets/{AdminDashboard-BONGlQva.js → AdminDashboard-DmQG0fUK.js} +2 -2
  2. package/dashboard/dist/assets/{AdminDashboard-BONGlQva.js.map → AdminDashboard-DmQG0fUK.js.map} +1 -1
  3. package/dashboard/dist/assets/{AgentConfigPage-C_NJ4-pr.js → AgentConfigPage-BZ8g7Ml8.js} +5 -5
  4. package/dashboard/dist/assets/{AgentConfigPage-C_NJ4-pr.js.map → AgentConfigPage-BZ8g7Ml8.js.map} +1 -1
  5. package/dashboard/dist/assets/{AgentDetailPage-MSCS6bFD.js → AgentDetailPage-Cdinl7bx.js} +3 -3
  6. package/dashboard/dist/assets/{AgentDetailPage-MSCS6bFD.js.map → AgentDetailPage-Cdinl7bx.js.map} +1 -1
  7. package/dashboard/dist/assets/{AgentsPage-PfSvedS-.js → AgentsPage-GEYMgmez.js} +2 -2
  8. package/dashboard/dist/assets/{AgentsPage-PfSvedS-.js.map → AgentsPage-GEYMgmez.js.map} +1 -1
  9. package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js +2 -0
  10. package/dashboard/dist/assets/AvailableEscalationsPage-qRf3tBYi.js.map +1 -0
  11. package/dashboard/dist/assets/{BotPicker-DmCdoim8.js → BotPicker-Bpglj7RE.js} +2 -2
  12. package/dashboard/dist/assets/{BotPicker-DmCdoim8.js.map → BotPicker-Bpglj7RE.js.map} +1 -1
  13. package/dashboard/dist/assets/{CapabilitiesPage-DVf4zIMZ.js → CapabilitiesPage-ARIQzRiq.js} +2 -2
  14. package/dashboard/dist/assets/{CapabilitiesPage-DVf4zIMZ.js.map → CapabilitiesPage-ARIQzRiq.js.map} +1 -1
  15. package/dashboard/dist/assets/{CollapsibleSection-7ACdYUZy.js → CollapsibleSection-BuZl37uS.js} +2 -2
  16. package/dashboard/dist/assets/{CollapsibleSection-7ACdYUZy.js.map → CollapsibleSection-BuZl37uS.js.map} +1 -1
  17. package/dashboard/dist/assets/{CountdownTimer-Gbp6RHav.js → CountdownTimer-CRK-E2UF.js} +2 -2
  18. package/dashboard/dist/assets/{CountdownTimer-Gbp6RHav.js.map → CountdownTimer-CRK-E2UF.js.map} +1 -1
  19. package/dashboard/dist/assets/{CredentialsPage-JWCUgQMi.js → CredentialsPage-CjBiPahB.js} +2 -2
  20. package/dashboard/dist/assets/{CredentialsPage-JWCUgQMi.js.map → CredentialsPage-CjBiPahB.js.map} +1 -1
  21. package/dashboard/dist/assets/{CronLabel-9GtrGEDe.js → CronLabel-DTXl2Rgj.js} +2 -2
  22. package/dashboard/dist/assets/{CronLabel-9GtrGEDe.js.map → CronLabel-DTXl2Rgj.js.map} +1 -1
  23. package/dashboard/dist/assets/{CustomDurationPicker-xNJMIvjL.js → CustomDurationPicker-qhb23E3p.js} +2 -2
  24. package/dashboard/dist/assets/{CustomDurationPicker-xNJMIvjL.js.map → CustomDurationPicker-qhb23E3p.js.map} +1 -1
  25. package/dashboard/dist/assets/{DropZone-wJqP4zA4.js → DropZone-C1TpkVQG.js} +2 -2
  26. package/dashboard/dist/assets/{DropZone-wJqP4zA4.js.map → DropZone-C1TpkVQG.js.map} +1 -1
  27. package/dashboard/dist/assets/{ElapsedCell-rRiChKDm.js → ElapsedCell-BMhamzj3.js} +2 -2
  28. package/dashboard/dist/assets/{ElapsedCell-rRiChKDm.js.map → ElapsedCell-BMhamzj3.js.map} +1 -1
  29. package/dashboard/dist/assets/{EscalationListSchemaPage-B7PHz5CB.js → EscalationListSchemaPage-BEi89A7y.js} +3 -3
  30. package/dashboard/dist/assets/{EscalationListSchemaPage-B7PHz5CB.js.map → EscalationListSchemaPage-BEi89A7y.js.map} +1 -1
  31. package/dashboard/dist/assets/{EscalationSchemaPage-_CbayTDk.js → EscalationSchemaPage-9NY4Q4ku.js} +3 -3
  32. package/dashboard/dist/assets/{EscalationSchemaPage-_CbayTDk.js.map → EscalationSchemaPage-9NY4Q4ku.js.map} +1 -1
  33. package/dashboard/dist/assets/{EscalationsOverview-C5bVdGf2.js → EscalationsOverview-2VRjFxPV.js} +2 -2
  34. package/dashboard/dist/assets/{EscalationsOverview-C5bVdGf2.js.map → EscalationsOverview-2VRjFxPV.js.map} +1 -1
  35. package/dashboard/dist/assets/{EventTable-DGaRYVnB.js → EventTable-hHPNI3Yq.js} +2 -2
  36. package/dashboard/dist/assets/{EventTable-DGaRYVnB.js.map → EventTable-hHPNI3Yq.js.map} +1 -1
  37. package/dashboard/dist/assets/{GraphInvokePage-R6_p2Sy7.js → GraphInvokePage-B6qAC8zt.js} +2 -2
  38. package/dashboard/dist/assets/{GraphInvokePage-R6_p2Sy7.js.map → GraphInvokePage-B6qAC8zt.js.map} +1 -1
  39. package/dashboard/dist/assets/{HomePage-DHxtqRkD.js → HomePage-DDyQOu57.js} +2 -2
  40. package/dashboard/dist/assets/{HomePage-DHxtqRkD.js.map → HomePage-DDyQOu57.js.map} +1 -1
  41. package/dashboard/dist/assets/{ListToolbar-BhXp7clK.js → ListToolbar-BUgEY8Oc.js} +2 -2
  42. package/dashboard/dist/assets/{ListToolbar-BhXp7clK.js.map → ListToolbar-BUgEY8Oc.js.map} +1 -1
  43. package/dashboard/dist/assets/{McpOverview-COgIIWkK.js → McpOverview-DIenRt0e.js} +2 -2
  44. package/dashboard/dist/assets/{McpOverview-COgIIWkK.js.map → McpOverview-DIenRt0e.js.map} +1 -1
  45. package/dashboard/dist/assets/{McpQueryDetailPage-4LEqQZax.js → McpQueryDetailPage-CxAR4Bpw.js} +2 -2
  46. package/dashboard/dist/assets/{McpQueryDetailPage-4LEqQZax.js.map → McpQueryDetailPage-CxAR4Bpw.js.map} +1 -1
  47. package/dashboard/dist/assets/{McpQueryPage-DWAcSqF-.js → McpQueryPage-CkT4A2c5.js} +2 -2
  48. package/dashboard/dist/assets/{McpQueryPage-DWAcSqF-.js.map → McpQueryPage-CkT4A2c5.js.map} +1 -1
  49. package/dashboard/dist/assets/{McpRunDetailPage-BNjhOPLp.js → McpRunDetailPage-DDiOtG5r.js} +2 -2
  50. package/dashboard/dist/assets/{McpRunDetailPage-BNjhOPLp.js.map → McpRunDetailPage-DDiOtG5r.js.map} +1 -1
  51. package/dashboard/dist/assets/{McpRunsPage-DAjYKqqt.js → McpRunsPage-BWe6WVzw.js} +2 -2
  52. package/dashboard/dist/assets/{McpRunsPage-DAjYKqqt.js.map → McpRunsPage-BWe6WVzw.js.map} +1 -1
  53. package/dashboard/dist/assets/{NamespacePill-BlhSWa5S.js → NamespacePill--ikKtMvx.js} +2 -2
  54. package/dashboard/dist/assets/{NamespacePill-BlhSWa5S.js.map → NamespacePill--ikKtMvx.js.map} +1 -1
  55. package/dashboard/dist/assets/{OperationsPage-5RkfIbtT.js → OperationsPage-CzJx-zxj.js} +2 -2
  56. package/dashboard/dist/assets/{OperationsPage-5RkfIbtT.js.map → OperationsPage-CzJx-zxj.js.map} +1 -1
  57. package/dashboard/dist/assets/{OperatorDashboard-B-2dIbj4.js → OperatorDashboard-CVq7V7hE.js} +2 -2
  58. package/dashboard/dist/assets/{OperatorDashboard-B-2dIbj4.js.map → OperatorDashboard-CVq7V7hE.js.map} +1 -1
  59. package/dashboard/dist/assets/{PageHeader-Ji1AtA4f.js → PageHeader-CiFhzGc0.js} +2 -2
  60. package/dashboard/dist/assets/{PageHeader-Ji1AtA4f.js.map → PageHeader-CiFhzGc0.js.map} +1 -1
  61. package/dashboard/dist/assets/{PageHeaderWithStats-B2qrFAaG.js → PageHeaderWithStats-_zOnWAhq.js} +2 -2
  62. package/dashboard/dist/assets/{PageHeaderWithStats-B2qrFAaG.js.map → PageHeaderWithStats-_zOnWAhq.js.map} +1 -1
  63. package/dashboard/dist/assets/{ProcessDetailPage-Bx7sF-vV.js → ProcessDetailPage-BWVFB-nL.js} +2 -2
  64. package/dashboard/dist/assets/{ProcessDetailPage-Bx7sF-vV.js.map → ProcessDetailPage-BWVFB-nL.js.map} +1 -1
  65. package/dashboard/dist/assets/{ProcessesListPage-Dsfc-DX_.js → ProcessesListPage-kyRO3E9d.js} +2 -2
  66. package/dashboard/dist/assets/{ProcessesListPage-Dsfc-DX_.js.map → ProcessesListPage-kyRO3E9d.js.map} +1 -1
  67. package/dashboard/dist/assets/{RoleDetailPage-DF-ov9E9.js → RoleDetailPage-DrSlAQUQ.js} +3 -3
  68. package/dashboard/dist/assets/{RoleDetailPage-DF-ov9E9.js.map → RoleDetailPage-DrSlAQUQ.js.map} +1 -1
  69. package/dashboard/dist/assets/{RolePill-ColM_ynA.js → RolePill-CUIJSgRq.js} +2 -2
  70. package/dashboard/dist/assets/{RolePill-ColM_ynA.js.map → RolePill-CUIJSgRq.js.map} +1 -1
  71. package/dashboard/dist/assets/{RolesPage-DIlde9bw.js → RolesPage-tT21PIEb.js} +2 -2
  72. package/dashboard/dist/assets/{RolesPage-DIlde9bw.js.map → RolesPage-tT21PIEb.js.map} +1 -1
  73. package/dashboard/dist/assets/{RunAsSelector-DOYUYXcD.js → RunAsSelector-BqhOzi2p.js} +2 -2
  74. package/dashboard/dist/assets/{RunAsSelector-DOYUYXcD.js.map → RunAsSelector-BqhOzi2p.js.map} +1 -1
  75. package/dashboard/dist/assets/{SlidePanel-BzeKveus.js → SlidePanel-BcWKelpn.js} +2 -2
  76. package/dashboard/dist/assets/{SlidePanel-BzeKveus.js.map → SlidePanel-BcWKelpn.js.map} +1 -1
  77. package/dashboard/dist/assets/{StickyPagination-BwXLmDc-.js → StickyPagination-BTDj99Vb.js} +2 -2
  78. package/dashboard/dist/assets/{StickyPagination-BwXLmDc-.js.map → StickyPagination-BTDj99Vb.js.map} +1 -1
  79. package/dashboard/dist/assets/StreamMessageDetail-DjjnJ31Q.js +2 -0
  80. package/dashboard/dist/assets/{StreamMessageDetail-CCez20kE.js.map → StreamMessageDetail-DjjnJ31Q.js.map} +1 -1
  81. package/dashboard/dist/assets/{SwimlaneTimeline-hcWBunXb.js → SwimlaneTimeline-Db7ATobq.js} +2 -2
  82. package/dashboard/dist/assets/{SwimlaneTimeline-hcWBunXb.js.map → SwimlaneTimeline-Db7ATobq.js.map} +1 -1
  83. package/dashboard/dist/assets/{TagInput-By0E_Jym.js → TagInput-BaFJCq9A.js} +2 -2
  84. package/dashboard/dist/assets/{TagInput-By0E_Jym.js.map → TagInput-BaFJCq9A.js.map} +1 -1
  85. package/dashboard/dist/assets/{TaskDetailPage-CIarmoAk.js → TaskDetailPage-BVlCa-PR.js} +2 -2
  86. package/dashboard/dist/assets/{TaskDetailPage-CIarmoAk.js.map → TaskDetailPage-BVlCa-PR.js.map} +1 -1
  87. package/dashboard/dist/assets/{TaskQueuePill-CY1ZSwWu.js → TaskQueuePill-D9e16qkU.js} +2 -2
  88. package/dashboard/dist/assets/{TaskQueuePill-CY1ZSwWu.js.map → TaskQueuePill-D9e16qkU.js.map} +1 -1
  89. package/dashboard/dist/assets/{TasksListPage-CFqMwhLE.js → TasksListPage-PKscNTJs.js} +2 -2
  90. package/dashboard/dist/assets/{TasksListPage-CFqMwhLE.js.map → TasksListPage-PKscNTJs.js.map} +1 -1
  91. package/dashboard/dist/assets/{TimeAgo-CuI-66Kw.js → TimeAgo-CGx_Ffwq.js} +2 -2
  92. package/dashboard/dist/assets/{TimeAgo-CuI-66Kw.js.map → TimeAgo-CGx_Ffwq.js.map} +1 -1
  93. package/dashboard/dist/assets/{TimestampCell-BI3Uptj8.js → TimestampCell-CdD5hp9o.js} +2 -2
  94. package/dashboard/dist/assets/{TimestampCell-BI3Uptj8.js.map → TimestampCell-CdD5hp9o.js.map} +1 -1
  95. package/dashboard/dist/assets/{ToolPill-D0IzqLEe.js → ToolPill-Enc3nyic.js} +2 -2
  96. package/dashboard/dist/assets/{ToolPill-D0IzqLEe.js.map → ToolPill-Enc3nyic.js.map} +1 -1
  97. package/dashboard/dist/assets/{ToolTestPanel-QwGyWRfG.js → ToolTestPanel-DWs0DNGB.js} +2 -2
  98. package/dashboard/dist/assets/{ToolTestPanel-QwGyWRfG.js.map → ToolTestPanel-DWs0DNGB.js.map} +1 -1
  99. package/dashboard/dist/assets/{TopicDetailPage-CGCiqQGf.js → TopicDetailPage-BaL3m3yb.js} +3 -3
  100. package/dashboard/dist/assets/{TopicDetailPage-CGCiqQGf.js.map → TopicDetailPage-BaL3m3yb.js.map} +1 -1
  101. package/dashboard/dist/assets/{TopicsPage-Bk8-inSO.js → TopicsPage-bFjJUYmO.js} +2 -2
  102. package/dashboard/dist/assets/{TopicsPage-Bk8-inSO.js.map → TopicsPage-bFjJUYmO.js.map} +1 -1
  103. package/dashboard/dist/assets/{UserName-BOaihCFP.js → UserName-IdFyeFle.js} +2 -2
  104. package/dashboard/dist/assets/{UserName-BOaihCFP.js.map → UserName-IdFyeFle.js.map} +1 -1
  105. package/dashboard/dist/assets/{WorkflowExecutionPage-CE0QzhIt.js → WorkflowExecutionPage-DtC-71vO.js} +2 -2
  106. package/dashboard/dist/assets/{WorkflowExecutionPage-CE0QzhIt.js.map → WorkflowExecutionPage-DtC-71vO.js.map} +1 -1
  107. package/dashboard/dist/assets/{WorkflowPill-BXmmLR0t.js → WorkflowPill-S6VV2Eax.js} +2 -2
  108. package/dashboard/dist/assets/{WorkflowPill-BXmmLR0t.js.map → WorkflowPill-S6VV2Eax.js.map} +1 -1
  109. package/dashboard/dist/assets/{WorkflowsDashboard-wgWRZOnB.js → WorkflowsDashboard-DGtMG5vL.js} +2 -2
  110. package/dashboard/dist/assets/{WorkflowsDashboard-wgWRZOnB.js.map → WorkflowsDashboard-DGtMG5vL.js.map} +1 -1
  111. package/dashboard/dist/assets/{WorkflowsOverview-CLyitES7.js → WorkflowsOverview-BFs-ZSTn.js} +2 -2
  112. package/dashboard/dist/assets/{WorkflowsOverview-CLyitES7.js.map → WorkflowsOverview-BFs-ZSTn.js.map} +1 -1
  113. package/dashboard/dist/assets/{YamlWorkflowDetailPage-pP2i1ptj.js → YamlWorkflowDetailPage-6FTLoVfO.js} +25 -25
  114. package/dashboard/dist/assets/{YamlWorkflowDetailPage-pP2i1ptj.js.map → YamlWorkflowDetailPage-6FTLoVfO.js.map} +1 -1
  115. package/dashboard/dist/assets/{YamlWorkflowsPage-BwQSMfYw.js → YamlWorkflowsPage-0Moxrj_c.js} +2 -2
  116. package/dashboard/dist/assets/{YamlWorkflowsPage-BwQSMfYw.js.map → YamlWorkflowsPage-0Moxrj_c.js.map} +1 -1
  117. package/dashboard/dist/assets/{agents-CRtBacrZ.js → agents-Dpg829fG.js} +2 -2
  118. package/dashboard/dist/assets/{agents-CRtBacrZ.js.map → agents-Dpg829fG.js.map} +1 -1
  119. package/dashboard/dist/assets/{bots-FjzeqLzA.js → bots-BiS_mYcH.js} +2 -2
  120. package/dashboard/dist/assets/{bots-FjzeqLzA.js.map → bots-BiS_mYcH.js.map} +1 -1
  121. package/dashboard/dist/assets/{capabilities-CB0y1ZCx.js → capabilities-Cpe3amV5.js} +2 -2
  122. package/dashboard/dist/assets/{capabilities-CB0y1ZCx.js.map → capabilities-Cpe3amV5.js.map} +1 -1
  123. package/dashboard/dist/assets/{controlplane-ZJtfQopv.js → controlplane-CjK2cXaD.js} +2 -2
  124. package/dashboard/dist/assets/{controlplane-ZJtfQopv.js.map → controlplane-CjK2cXaD.js.map} +1 -1
  125. package/dashboard/dist/assets/escalation-columns-_KrFogWG.js +2 -0
  126. package/dashboard/dist/assets/escalation-columns-_KrFogWG.js.map +1 -0
  127. package/dashboard/dist/assets/{index-DzIB5CaR.js → index-3ewF-RsR.js} +2 -2
  128. package/dashboard/dist/assets/{index-DzIB5CaR.js.map → index-3ewF-RsR.js.map} +1 -1
  129. package/dashboard/dist/assets/{index-Bho1kYrO.js → index-BFh7zbQF.js} +2 -2
  130. package/dashboard/dist/assets/{index-Bho1kYrO.js.map → index-BFh7zbQF.js.map} +1 -1
  131. package/dashboard/dist/assets/{index-DlrsXckY.js → index-BYpOpKoM.js} +2 -2
  132. package/dashboard/dist/assets/{index-DlrsXckY.js.map → index-BYpOpKoM.js.map} +1 -1
  133. package/dashboard/dist/assets/{index-B_pZXTTp.js → index-Be9bw5cd.js} +2 -2
  134. package/dashboard/dist/assets/{index-B_pZXTTp.js.map → index-Be9bw5cd.js.map} +1 -1
  135. package/dashboard/dist/assets/{index-iEn58vjL.js → index-C42kzl9D.js} +2 -2
  136. package/dashboard/dist/assets/{index-iEn58vjL.js.map → index-C42kzl9D.js.map} +1 -1
  137. package/dashboard/dist/assets/{index-GRckVBX1.js → index-CTTxpoEl.js} +2 -2
  138. package/dashboard/dist/assets/{index-GRckVBX1.js.map → index-CTTxpoEl.js.map} +1 -1
  139. package/dashboard/dist/assets/index-DWXhbO4b.js +5 -0
  140. package/dashboard/dist/assets/index-DWXhbO4b.js.map +1 -0
  141. package/dashboard/dist/assets/index-DYcP4jyl.js +63 -0
  142. package/dashboard/dist/assets/index-DYcP4jyl.js.map +1 -0
  143. package/dashboard/dist/assets/{index-BH0BQHF-.js → index-Dq5RU7sm.js} +2 -2
  144. package/dashboard/dist/assets/{index-BH0BQHF-.js.map → index-Dq5RU7sm.js.map} +1 -1
  145. package/dashboard/dist/assets/{index-DiCp9bmR.js → index-Fc1qNrqI.js} +2 -2
  146. package/dashboard/dist/assets/{index-DiCp9bmR.js.map → index-Fc1qNrqI.js.map} +1 -1
  147. package/dashboard/dist/assets/{index-D4z4fzW5.js → index-IHOuIqlt.js} +2 -2
  148. package/dashboard/dist/assets/{index-D4z4fzW5.js.map → index-IHOuIqlt.js.map} +1 -1
  149. package/dashboard/dist/assets/{index-CzYOxahh.js → index-JQCy1mnu.js} +2 -2
  150. package/dashboard/dist/assets/{index-CzYOxahh.js.map → index-JQCy1mnu.js.map} +1 -1
  151. package/dashboard/dist/assets/{index-AUrwksY_.js → index-p85Oqfqc.js} +2 -2
  152. package/dashboard/dist/assets/{index-AUrwksY_.js.map → index-p85Oqfqc.js.map} +1 -1
  153. package/dashboard/dist/assets/index-waKF7bKZ.css +1 -0
  154. package/dashboard/dist/assets/{knowledge-Bw51BCX9.js → knowledge-Bed_1toa.js} +2 -2
  155. package/dashboard/dist/assets/{knowledge-Bw51BCX9.js.map → knowledge-Bed_1toa.js.map} +1 -1
  156. package/dashboard/dist/assets/{mcp-D4KRVy2a.js → mcp-LRVvEX8W.js} +2 -2
  157. package/dashboard/dist/assets/{mcp-D4KRVy2a.js.map → mcp-LRVvEX8W.js.map} +1 -1
  158. package/dashboard/dist/assets/{mcp-query-0Zo3GwTv.js → mcp-query-k2J65UbP.js} +2 -2
  159. package/dashboard/dist/assets/{mcp-query-0Zo3GwTv.js.map → mcp-query-k2J65UbP.js.map} +1 -1
  160. package/dashboard/dist/assets/{pipelines-B8sOpeCD.js → pipelines-C9fpHxJR.js} +2 -2
  161. package/dashboard/dist/assets/{pipelines-B8sOpeCD.js.map → pipelines-C9fpHxJR.js.map} +1 -1
  162. package/dashboard/dist/assets/{roles-Bs6hUrQJ.js → roles-BO-4Ieun.js} +2 -2
  163. package/dashboard/dist/assets/{roles-Bs6hUrQJ.js.map → roles-BO-4Ieun.js.map} +1 -1
  164. package/dashboard/dist/assets/{tasks-KDV3bflF.js → tasks-BiyBXdk7.js} +2 -2
  165. package/dashboard/dist/assets/{tasks-KDV3bflF.js.map → tasks-BiyBXdk7.js.map} +1 -1
  166. package/dashboard/dist/assets/{topics-BS_n738l.js → topics-m_BXjCFf.js} +2 -2
  167. package/dashboard/dist/assets/{topics-BS_n738l.js.map → topics-m_BXjCFf.js.map} +1 -1
  168. package/dashboard/dist/assets/{useEventHooks-RbAigCWV.js → useEventHooks-CtkD_tnd.js} +2 -2
  169. package/dashboard/dist/assets/{useEventHooks-RbAigCWV.js.map → useEventHooks-CtkD_tnd.js.map} +1 -1
  170. package/dashboard/dist/assets/{useNamespace-ChDZWKAd.js → useNamespace-Dt2COnsG.js} +2 -2
  171. package/dashboard/dist/assets/{useNamespace-ChDZWKAd.js.map → useNamespace-Dt2COnsG.js.map} +1 -1
  172. package/dashboard/dist/assets/{useYamlActivityEvents-6xNaRNAc.js → useYamlActivityEvents--i7p1Ta9.js} +2 -2
  173. package/dashboard/dist/assets/{useYamlActivityEvents-6xNaRNAc.js.map → useYamlActivityEvents--i7p1Ta9.js.map} +1 -1
  174. package/dashboard/dist/assets/{users-BPt2YERY.js → users-BsRZkm9v.js} +2 -2
  175. package/dashboard/dist/assets/{users-BPt2YERY.js.map → users-BsRZkm9v.js.map} +1 -1
  176. package/dashboard/dist/assets/{vendor-icons-BX2Vih4L.js → vendor-icons-DPmIjhZB.js} +129 -124
  177. package/dashboard/dist/assets/vendor-icons-DPmIjhZB.js.map +1 -0
  178. package/dashboard/dist/assets/{workflows-BaSjfNsd.js → workflows-B0djSSvg.js} +2 -2
  179. package/dashboard/dist/assets/{workflows-BaSjfNsd.js.map → workflows-B0djSSvg.js.map} +1 -1
  180. package/dashboard/dist/assets/{yaml-workflows-Be3rM5i2.js → yaml-workflows-CupO7vvi.js} +2 -2
  181. package/dashboard/dist/assets/{yaml-workflows-Be3rM5i2.js.map → yaml-workflows-CupO7vvi.js.map} +1 -1
  182. package/dashboard/dist/index.html +3 -3
  183. package/docs/hitl-guide.md +125 -1
  184. package/package.json +1 -1
  185. package/dashboard/dist/assets/AvailableEscalationsPage-DBeBLNWW.js +0 -2
  186. package/dashboard/dist/assets/AvailableEscalationsPage-DBeBLNWW.js.map +0 -1
  187. package/dashboard/dist/assets/StreamMessageDetail-CCez20kE.js +0 -2
  188. package/dashboard/dist/assets/escalation-columns-735GLlEN.js +0 -2
  189. package/dashboard/dist/assets/escalation-columns-735GLlEN.js.map +0 -1
  190. package/dashboard/dist/assets/index-BTrN5iqE.js +0 -5
  191. package/dashboard/dist/assets/index-BTrN5iqE.js.map +0 -1
  192. package/dashboard/dist/assets/index-CsMAT5cs.css +0 -1
  193. package/dashboard/dist/assets/index-DpGeD89g.js +0 -63
  194. package/dashboard/dist/assets/index-DpGeD89g.js.map +0 -1
  195. package/dashboard/dist/assets/vendor-icons-BX2Vih4L.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{u as h}from"./yaml-workflows-Be3rM5i2.js";import{u}from"./index-DpGeD89g.js";import{u as f}from"./useFilterParams-x-Dg0Vgz.js";import{P as d}from"./PageHeader-Ji1AtA4f.js";import{F as g,a as w,b as j}from"./FilterBar-DDIn8TOs.js";import{E as p}from"./EmptyState-BcsfPq9T.js";import{T as b}from"./ToolPill-D0IzqLEe.js";import{N as v}from"./NamespacePill-BlhSWa5S.js";import{S as y}from"./StatusBadge-CEQMRmSQ.js";import{c as N,W as k}from"./vendor-icons-BX2Vih4L.js";import{c as F}from"./vendor-react-CXumBFUA.js";function O(){var c;const a=F(),{data:r}=u(),o=!!((c=r==null?void 0:r.ai)!=null&&c.enabled),{filters:s,setFilter:l}=f({filters:{status:"",search:""}}),{data:i,isLoading:m}=h({status:s.status||void 0,search:s.search||void 0,limit:200,offset:0}),n=(i==null?void 0:i.workflows)??[];return m?e.jsxs("div",{children:[e.jsx(d,{title:"Configure",docsHash:"#docs:dashboard.md:graph-workflows"}),e.jsx("div",{className:"animate-pulse space-y-0",children:Array.from({length:4}).map((t,x)=>e.jsx("div",{className:"h-14 border-b last:border-b-0 px-6 flex items-center",children:e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-full"})},x))})]}):e.jsxs("div",{children:[e.jsx(d,{title:"Configure",docsHash:"#docs:dashboard.md:graph-workflows",actions:o?e.jsx("button",{onClick:()=>a("/mcp/queries/new"),className:"btn-primary text-xs",children:"Design Flow"}):void 0}),e.jsxs("p",{className:"text-sm text-text-secondary mb-6 max-w-2xl leading-relaxed",children:["The compiled form of a durable workflow — the same guarantees at roughly 3× the speed. Each flow is a graph the router discovers and runs on demand. Open one to inspect or run it",o?", or design a new one from a description.":"."]}),e.jsxs(g,{children:[e.jsx(w,{label:"Search",value:s.search,onChange:t=>l("search",t),placeholder:"Flow or namespace…"}),e.jsx(j,{label:"Status",value:s.status,onChange:t=>l("status",t),options:[{value:"draft",label:"Draft"},{value:"deployed",label:"Deployed"},{value:"active",label:"Active"},{value:"archived",label:"Archived"}]})]}),n.length===0?o?e.jsx("div",{className:"cursor-pointer",onClick:()=>a("/mcp/queries/new"),children:e.jsx(p,{icon:N,title:"No graph flows yet",description:"Open the Designer to compile your first flow from a description, or register flows at startup with the graphWorkflows config."})}):e.jsx(p,{icon:k,title:"No graph flows yet",description:"Register graph flows at startup with the graphWorkflows config — see the docs for an example."}):e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"px-6 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Flow"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-40",children:"Namespace"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-20",children:"Version"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-28",children:"Status"})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{onClick:()=>a(`/mcp/workflows/${t.id}`),className:"border-b border-surface-border/50 hover:bg-surface-hover/40 transition-colors duration-100 cursor-pointer",children:[e.jsxs("td",{className:"px-6 py-2.5",children:[e.jsx(b,{name:t.graph_topic,size:"md"}),t.description&&e.jsx("p",{className:"text-[11px] leading-snug text-text-quaternary mt-0.5",children:t.description})]}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx(v,{namespace:t.app_id})}),e.jsxs("td",{className:"px-4 py-2.5 text-[10px] text-text-quaternary font-mono whitespace-nowrap",children:["v",t.content_version]}),e.jsx("td",{className:"px-4 py-2.5 whitespace-nowrap",children:e.jsx(y,{status:t.status})})]},t.id))})]})]})}export{O as YamlWorkflowsPage};
2
- //# sourceMappingURL=YamlWorkflowsPage-BwQSMfYw.js.map
1
+ import{j as e}from"./vendor-query-B2UbickB.js";import{u as h}from"./yaml-workflows-CupO7vvi.js";import{u}from"./index-DYcP4jyl.js";import{u as f}from"./useFilterParams-x-Dg0Vgz.js";import{P as d}from"./PageHeader-CiFhzGc0.js";import{F as g,a as w,b as j}from"./FilterBar-DDIn8TOs.js";import{E as p}from"./EmptyState-BcsfPq9T.js";import{T as b}from"./ToolPill-Enc3nyic.js";import{N as v}from"./NamespacePill--ikKtMvx.js";import{S as y}from"./StatusBadge-CEQMRmSQ.js";import{d as N,W as k}from"./vendor-icons-DPmIjhZB.js";import{c as F}from"./vendor-react-CXumBFUA.js";function O(){var c;const a=F(),{data:r}=u(),o=!!((c=r==null?void 0:r.ai)!=null&&c.enabled),{filters:s,setFilter:l}=f({filters:{status:"",search:""}}),{data:i,isLoading:m}=h({status:s.status||void 0,search:s.search||void 0,limit:200,offset:0}),n=(i==null?void 0:i.workflows)??[];return m?e.jsxs("div",{children:[e.jsx(d,{title:"Configure",docsHash:"#docs:dashboard.md:graph-workflows"}),e.jsx("div",{className:"animate-pulse space-y-0",children:Array.from({length:4}).map((t,x)=>e.jsx("div",{className:"h-14 border-b last:border-b-0 px-6 flex items-center",children:e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-full"})},x))})]}):e.jsxs("div",{children:[e.jsx(d,{title:"Configure",docsHash:"#docs:dashboard.md:graph-workflows",actions:o?e.jsx("button",{onClick:()=>a("/mcp/queries/new"),className:"btn-primary text-xs",children:"Design Flow"}):void 0}),e.jsxs("p",{className:"text-sm text-text-secondary mb-6 max-w-2xl leading-relaxed",children:["The compiled form of a durable workflow — the same guarantees at roughly 3× the speed. Each flow is a graph the router discovers and runs on demand. Open one to inspect or run it",o?", or design a new one from a description.":"."]}),e.jsxs(g,{children:[e.jsx(w,{label:"Search",value:s.search,onChange:t=>l("search",t),placeholder:"Flow or namespace…"}),e.jsx(j,{label:"Status",value:s.status,onChange:t=>l("status",t),options:[{value:"draft",label:"Draft"},{value:"deployed",label:"Deployed"},{value:"active",label:"Active"},{value:"archived",label:"Archived"}]})]}),n.length===0?o?e.jsx("div",{className:"cursor-pointer",onClick:()=>a("/mcp/queries/new"),children:e.jsx(p,{icon:N,title:"No graph flows yet",description:"Open the Designer to compile your first flow from a description, or register flows at startup with the graphWorkflows config."})}):e.jsx(p,{icon:k,title:"No graph flows yet",description:"Register graph flows at startup with the graphWorkflows config — see the docs for an example."}):e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"px-6 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Flow"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-40",children:"Namespace"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-20",children:"Version"}),e.jsx("th",{className:"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-28",children:"Status"})]})}),e.jsx("tbody",{children:n.map(t=>e.jsxs("tr",{onClick:()=>a(`/mcp/workflows/${t.id}`),className:"border-b border-surface-border/50 hover:bg-surface-hover/40 transition-colors duration-100 cursor-pointer",children:[e.jsxs("td",{className:"px-6 py-2.5",children:[e.jsx(b,{name:t.graph_topic,size:"md"}),t.description&&e.jsx("p",{className:"text-[11px] leading-snug text-text-quaternary mt-0.5",children:t.description})]}),e.jsx("td",{className:"px-4 py-2.5",children:e.jsx(v,{namespace:t.app_id})}),e.jsxs("td",{className:"px-4 py-2.5 text-[10px] text-text-quaternary font-mono whitespace-nowrap",children:["v",t.content_version]}),e.jsx("td",{className:"px-4 py-2.5 whitespace-nowrap",children:e.jsx(y,{status:t.status})})]},t.id))})]})]})}export{O as YamlWorkflowsPage};
2
+ //# sourceMappingURL=YamlWorkflowsPage-0Moxrj_c.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"YamlWorkflowsPage-BwQSMfYw.js","sources":["../../src/pages/workflows/YamlWorkflowsPage.tsx"],"sourcesContent":["import { useNavigate } from 'react-router-dom';\nimport { Wand2, Workflow } from 'lucide-react';\nimport { useYamlWorkflows } from '../../api/yaml-workflows';\nimport { useSettings } from '../../api/settings';\nimport { useFilterParams } from '../../hooks/useFilterParams';\n\nimport { PageHeader } from '../../components/common/layout/PageHeader';\nimport { FilterBar, FilterSelect, FilterInput } from '../../components/common/data/FilterBar';\nimport { EmptyState } from '../../components/common/display/EmptyState';\nimport { ToolPill } from '../../components/common/display/ToolPill';\nimport { NamespacePill } from '../../components/common/display/NamespacePill';\nimport { StatusBadge } from '../../components/common/display/StatusBadge';\n\n// ── Page: Graph › Configure ─────────────────────────────────────────────────\n\nexport function YamlWorkflowsPage() {\n const navigate = useNavigate();\n const { data: settings } = useSettings();\n const aiEnabled = !!settings?.ai?.enabled;\n const { filters, setFilter } = useFilterParams({\n filters: { status: '', search: '' },\n });\n\n const { data, isLoading } = useYamlWorkflows({\n status: (filters.status || undefined) as any,\n search: filters.search || undefined,\n limit: 200,\n offset: 0,\n });\n\n const flows = data?.workflows ?? [];\n\n if (isLoading) {\n return (\n <div>\n <PageHeader title=\"Configure\" docsHash=\"#docs:dashboard.md:graph-workflows\" />\n <div className=\"animate-pulse space-y-0\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"h-14 border-b last:border-b-0 px-6 flex items-center\">\n <div className=\"h-3 bg-surface-sunken rounded w-full\" />\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <PageHeader\n title=\"Configure\"\n docsHash=\"#docs:dashboard.md:graph-workflows\"\n actions={\n aiEnabled ? (\n <button onClick={() => navigate('/mcp/queries/new')} className=\"btn-primary text-xs\">\n Design Flow\n </button>\n ) : undefined\n }\n />\n\n <p className=\"text-sm text-text-secondary mb-6 max-w-2xl leading-relaxed\">\n The compiled form of a durable workflow — the same guarantees at roughly 3× the speed. Each\n flow is a graph the router discovers and runs on demand. Open one to inspect or run it\n {aiEnabled ? ', or design a new one from a description.' : '.'}\n </p>\n\n <FilterBar>\n <FilterInput\n label=\"Search\"\n value={filters.search}\n onChange={(v) => setFilter('search', v)}\n placeholder=\"Flow or namespace…\"\n />\n <FilterSelect\n label=\"Status\"\n value={filters.status}\n onChange={(v) => setFilter('status', v)}\n options={[\n { value: 'draft', label: 'Draft' },\n { value: 'deployed', label: 'Deployed' },\n { value: 'active', label: 'Active' },\n { value: 'archived', label: 'Archived' },\n ]}\n />\n </FilterBar>\n\n {flows.length === 0 ? (\n aiEnabled ? (\n <div className=\"cursor-pointer\" onClick={() => navigate('/mcp/queries/new')}>\n <EmptyState\n icon={Wand2}\n title=\"No graph flows yet\"\n description=\"Open the Designer to compile your first flow from a description, or register flows at startup with the graphWorkflows config.\"\n />\n </div>\n ) : (\n <EmptyState\n icon={Workflow}\n title=\"No graph flows yet\"\n description=\"Register graph flows at startup with the graphWorkflows config — see the docs for an example.\"\n />\n )\n ) : (\n <table className=\"w-full\">\n <thead>\n <tr className=\"border-b\">\n <th className=\"px-6 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary\">\n Flow\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-40\">\n Namespace\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-20\">\n Version\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-28\">\n Status\n </th>\n </tr>\n </thead>\n <tbody>\n {flows.map((flow) => (\n <tr\n key={flow.id}\n onClick={() => navigate(`/mcp/workflows/${flow.id}`)}\n className=\"border-b border-surface-border/50 hover:bg-surface-hover/40 transition-colors duration-100 cursor-pointer\"\n >\n <td className=\"px-6 py-2.5\">\n <ToolPill name={flow.graph_topic} size=\"md\" />\n {flow.description && (\n <p className=\"text-[11px] leading-snug text-text-quaternary mt-0.5\">{flow.description}</p>\n )}\n </td>\n <td className=\"px-4 py-2.5\">\n <NamespacePill namespace={flow.app_id} />\n </td>\n <td className=\"px-4 py-2.5 text-[10px] text-text-quaternary font-mono whitespace-nowrap\">\n v{flow.content_version}\n </td>\n <td className=\"px-4 py-2.5 whitespace-nowrap\">\n <StatusBadge status={flow.status} />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n </div>\n );\n}\n"],"names":["YamlWorkflowsPage","navigate","useNavigate","settings","useSettings","aiEnabled","_a","filters","setFilter","useFilterParams","data","isLoading","useYamlWorkflows","flows","jsx","PageHeader","_","i","jsxs","FilterBar","FilterInput","v","FilterSelect","EmptyState","Wand2","Workflow","flow","ToolPill","NamespacePill","StatusBadge"],"mappings":"ujBAeO,SAASA,GAAoB,OAClC,MAAMC,EAAWC,EAAA,EACX,CAAE,KAAMC,CAAA,EAAaC,EAAA,EACrBC,EAAY,CAAC,GAACC,EAAAH,GAAA,YAAAA,EAAU,KAAV,MAAAG,EAAc,SAC5B,CAAE,QAAAC,EAAS,UAAAC,CAAA,EAAcC,EAAgB,CAC7C,QAAS,CAAE,OAAQ,GAAI,OAAQ,EAAA,CAAG,CACnC,EAEK,CAAE,KAAAC,EAAM,UAAAC,CAAA,EAAcC,EAAiB,CAC3C,OAASL,EAAQ,QAAU,OAC3B,OAAQA,EAAQ,QAAU,OAC1B,MAAO,IACP,OAAQ,CAAA,CACT,EAEKM,GAAQH,GAAA,YAAAA,EAAM,YAAa,CAAA,EAEjC,OAAIC,SAEC,MAAA,CACC,SAAA,CAAAG,EAAAA,IAACC,EAAA,CAAW,MAAM,YAAY,SAAS,qCAAqC,EAC5ED,EAAAA,IAAC,MAAA,CAAI,UAAU,0BACZ,SAAA,MAAM,KAAK,CAAE,OAAQ,CAAA,CAAG,EAAE,IAAI,CAACE,EAAGC,IACjCH,EAAAA,IAAC,MAAA,CAAY,UAAU,uDACrB,SAAAA,EAAAA,IAAC,MAAA,CAAI,UAAU,sCAAA,CAAuC,CAAA,EAD9CG,CAEV,CACD,CAAA,CACH,CAAA,EACF,SAKD,MAAA,CACC,SAAA,CAAAH,EAAAA,IAACC,EAAA,CACC,MAAM,YACN,SAAS,qCAC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,CAAG,UAAU,kGAAkG,SAAA,QAAA,CAEhH,CAAA,CAAA,CACF,CAAA,CACF,EACAA,EAAAA,IAAC,QAAA,CACE,SAAAD,EAAM,IAAKa,GACVR,EAAAA,KAAC,KAAA,CAEC,QAAS,IAAMjB,EAAS,kBAAkByB,EAAK,EAAE,EAAE,EACnD,UAAU,4GAEV,SAAA,CAAAR,EAAAA,KAAC,KAAA,CAAG,UAAU,cACZ,SAAA,CAAAJ,EAAAA,IAACa,EAAA,CAAS,KAAMD,EAAK,YAAa,KAAK,KAAK,EAC3CA,EAAK,aACJZ,EAAAA,IAAC,KAAE,UAAU,uDAAwD,WAAK,WAAA,CAAY,CAAA,EAE1F,EACAA,EAAAA,IAAC,MAAG,UAAU,cACZ,eAACc,EAAA,CAAc,UAAWF,EAAK,MAAA,CAAQ,CAAA,CACzC,EACAR,EAAAA,KAAC,KAAA,CAAG,UAAU,2EAA2E,SAAA,CAAA,IACrFQ,EAAK,eAAA,EACT,EACAZ,EAAAA,IAAC,MAAG,UAAU,gCACZ,eAACe,EAAA,CAAY,OAAQH,EAAK,MAAA,CAAQ,CAAA,CACpC,CAAA,CAAA,EAlBKA,EAAK,EAAA,CAoBb,CAAA,CACH,CAAA,CAAA,CACF,CAAA,EAEJ,CAEJ"}
1
+ {"version":3,"file":"YamlWorkflowsPage-0Moxrj_c.js","sources":["../../src/pages/workflows/YamlWorkflowsPage.tsx"],"sourcesContent":["import { useNavigate } from 'react-router-dom';\nimport { Wand2, Workflow } from 'lucide-react';\nimport { useYamlWorkflows } from '../../api/yaml-workflows';\nimport { useSettings } from '../../api/settings';\nimport { useFilterParams } from '../../hooks/useFilterParams';\n\nimport { PageHeader } from '../../components/common/layout/PageHeader';\nimport { FilterBar, FilterSelect, FilterInput } from '../../components/common/data/FilterBar';\nimport { EmptyState } from '../../components/common/display/EmptyState';\nimport { ToolPill } from '../../components/common/display/ToolPill';\nimport { NamespacePill } from '../../components/common/display/NamespacePill';\nimport { StatusBadge } from '../../components/common/display/StatusBadge';\n\n// ── Page: Graph › Configure ─────────────────────────────────────────────────\n\nexport function YamlWorkflowsPage() {\n const navigate = useNavigate();\n const { data: settings } = useSettings();\n const aiEnabled = !!settings?.ai?.enabled;\n const { filters, setFilter } = useFilterParams({\n filters: { status: '', search: '' },\n });\n\n const { data, isLoading } = useYamlWorkflows({\n status: (filters.status || undefined) as any,\n search: filters.search || undefined,\n limit: 200,\n offset: 0,\n });\n\n const flows = data?.workflows ?? [];\n\n if (isLoading) {\n return (\n <div>\n <PageHeader title=\"Configure\" docsHash=\"#docs:dashboard.md:graph-workflows\" />\n <div className=\"animate-pulse space-y-0\">\n {Array.from({ length: 4 }).map((_, i) => (\n <div key={i} className=\"h-14 border-b last:border-b-0 px-6 flex items-center\">\n <div className=\"h-3 bg-surface-sunken rounded w-full\" />\n </div>\n ))}\n </div>\n </div>\n );\n }\n\n return (\n <div>\n <PageHeader\n title=\"Configure\"\n docsHash=\"#docs:dashboard.md:graph-workflows\"\n actions={\n aiEnabled ? (\n <button onClick={() => navigate('/mcp/queries/new')} className=\"btn-primary text-xs\">\n Design Flow\n </button>\n ) : undefined\n }\n />\n\n <p className=\"text-sm text-text-secondary mb-6 max-w-2xl leading-relaxed\">\n The compiled form of a durable workflow — the same guarantees at roughly 3× the speed. Each\n flow is a graph the router discovers and runs on demand. Open one to inspect or run it\n {aiEnabled ? ', or design a new one from a description.' : '.'}\n </p>\n\n <FilterBar>\n <FilterInput\n label=\"Search\"\n value={filters.search}\n onChange={(v) => setFilter('search', v)}\n placeholder=\"Flow or namespace…\"\n />\n <FilterSelect\n label=\"Status\"\n value={filters.status}\n onChange={(v) => setFilter('status', v)}\n options={[\n { value: 'draft', label: 'Draft' },\n { value: 'deployed', label: 'Deployed' },\n { value: 'active', label: 'Active' },\n { value: 'archived', label: 'Archived' },\n ]}\n />\n </FilterBar>\n\n {flows.length === 0 ? (\n aiEnabled ? (\n <div className=\"cursor-pointer\" onClick={() => navigate('/mcp/queries/new')}>\n <EmptyState\n icon={Wand2}\n title=\"No graph flows yet\"\n description=\"Open the Designer to compile your first flow from a description, or register flows at startup with the graphWorkflows config.\"\n />\n </div>\n ) : (\n <EmptyState\n icon={Workflow}\n title=\"No graph flows yet\"\n description=\"Register graph flows at startup with the graphWorkflows config — see the docs for an example.\"\n />\n )\n ) : (\n <table className=\"w-full\">\n <thead>\n <tr className=\"border-b\">\n <th className=\"px-6 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary\">\n Flow\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-40\">\n Namespace\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-20\">\n Version\n </th>\n <th className=\"px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-28\">\n Status\n </th>\n </tr>\n </thead>\n <tbody>\n {flows.map((flow) => (\n <tr\n key={flow.id}\n onClick={() => navigate(`/mcp/workflows/${flow.id}`)}\n className=\"border-b border-surface-border/50 hover:bg-surface-hover/40 transition-colors duration-100 cursor-pointer\"\n >\n <td className=\"px-6 py-2.5\">\n <ToolPill name={flow.graph_topic} size=\"md\" />\n {flow.description && (\n <p className=\"text-[11px] leading-snug text-text-quaternary mt-0.5\">{flow.description}</p>\n )}\n </td>\n <td className=\"px-4 py-2.5\">\n <NamespacePill namespace={flow.app_id} />\n </td>\n <td className=\"px-4 py-2.5 text-[10px] text-text-quaternary font-mono whitespace-nowrap\">\n v{flow.content_version}\n </td>\n <td className=\"px-4 py-2.5 whitespace-nowrap\">\n <StatusBadge status={flow.status} />\n </td>\n </tr>\n ))}\n </tbody>\n </table>\n )}\n </div>\n );\n}\n"],"names":["YamlWorkflowsPage","navigate","useNavigate","settings","useSettings","aiEnabled","_a","filters","setFilter","useFilterParams","data","isLoading","useYamlWorkflows","flows","jsx","PageHeader","_","i","jsxs","FilterBar","FilterInput","v","FilterSelect","EmptyState","Wand2","Workflow","flow","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MD,EAAK,YAAa,KAAK,KAAK,EAC3CA,EAAK,aACJZ,EAAAA,IAAC,KAAE,UAAU,uDAAwD,WAAK,WAAA,CAAY,CAAA,EAE1F,EACAA,EAAAA,IAAC,MAAG,UAAU,cACZ,eAACc,EAAA,CAAc,UAAWF,EAAK,MAAA,CAAQ,CAAA,CACzC,EACAR,EAAAA,KAAC,KAAA,CAAG,UAAU,2EAA2E,SAAA,CAAA,IACrFQ,EAAK,eAAA,EACT,EACAZ,EAAAA,IAAC,MAAG,UAAU,gCACZ,eAACe,EAAA,CAAY,OAAQH,EAAK,MAAA,CAAQ,CAAA,CACpC,CAAA,CAAA,EAlBKA,EAAK,EAAA,CAoBb,CAAA,CACH,CAAA,CAAA,CACF,CAAA,EAEJ,CAEJ"}
@@ -1,2 +1,2 @@
1
- import{u as o,b as u,c as a}from"./vendor-query-B2UbickB.js";import{d as t}from"./index-DpGeD89g.js";function g(e={}){const n=new URLSearchParams;e.status&&n.set("status",e.status),e.knowledge_domain&&n.set("knowledge_domain",e.knowledge_domain),e.limit!=null&&n.set("limit",String(e.limit)),e.offset!=null&&n.set("offset",String(e.offset));const s=n.toString();return o({queryKey:["agents",e],queryFn:()=>t(`/agents${s?`?${s}`:""}`)})}function y(e){return o({queryKey:["agents",e],queryFn:()=>t(`/agents/${e}`),enabled:!!e})}function c(){const e=u();return a({mutationFn:n=>t("/agents",{method:"POST",body:JSON.stringify(n)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function m(){const e=u();return a({mutationFn:({id:n,...s})=>t(`/agents/${n}`,{method:"PUT",body:JSON.stringify(s)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function d(){const e=u();return a({mutationFn:n=>t(`/agents/${n}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}export{y as a,m as b,d as c,c as d,g as u};
2
- //# sourceMappingURL=agents-CRtBacrZ.js.map
1
+ import{u as o,b as u,c as a}from"./vendor-query-B2UbickB.js";import{d as t}from"./index-DYcP4jyl.js";function g(e={}){const n=new URLSearchParams;e.status&&n.set("status",e.status),e.knowledge_domain&&n.set("knowledge_domain",e.knowledge_domain),e.limit!=null&&n.set("limit",String(e.limit)),e.offset!=null&&n.set("offset",String(e.offset));const s=n.toString();return o({queryKey:["agents",e],queryFn:()=>t(`/agents${s?`?${s}`:""}`)})}function y(e){return o({queryKey:["agents",e],queryFn:()=>t(`/agents/${e}`),enabled:!!e})}function c(){const e=u();return a({mutationFn:n=>t("/agents",{method:"POST",body:JSON.stringify(n)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function m(){const e=u();return a({mutationFn:({id:n,...s})=>t(`/agents/${n}`,{method:"PUT",body:JSON.stringify(s)}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}function d(){const e=u();return a({mutationFn:n=>t(`/agents/${n}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["agents"]})}})}export{y as a,m as b,d as c,c as d,g as u};
2
+ //# sourceMappingURL=agents-Dpg829fG.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"agents-CRtBacrZ.js","sources":["../../src/api/agents.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\nexport interface AgentCapability {\n serverId: string;\n toolNames?: string[];\n}\n\nexport interface AgentTrigger {\n event: string;\n filter?: Record<string, any>;\n}\n\nexport interface AgentSchedule {\n cron: string;\n workflow_type: string;\n envelope?: Record<string, any>;\n execute_as?: string;\n}\n\nexport interface AgentBehaviors {\n cron?: string;\n triggers?: AgentTrigger[];\n schedules?: AgentSchedule[];\n escalationRules?: Record<string, any>;\n}\n\nexport interface Agent {\n /** Agent identifier — human-readable kebab-case name (e.g. 'content-triage') */\n id: string;\n description?: string;\n status: 'inactive' | 'active' | 'paused' | 'error';\n user_id?: string;\n knowledge_domain?: string;\n capabilities: AgentCapability[];\n behaviors: AgentBehaviors;\n goals?: string;\n rules?: string;\n workflow_type?: string;\n pipeline_id?: string;\n metadata: Record<string, any>;\n last_run_at?: string;\n subscription_count?: number;\n sub_topics?: string[];\n created_at: string;\n updated_at: string;\n stats?: {\n knowledge_count: number;\n escalation_count: number;\n last_execution_at?: string;\n };\n}\n\ninterface AgentListResponse {\n agents: Agent[];\n total: number;\n}\n\ninterface AgentFilters {\n status?: string;\n knowledge_domain?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useAgents(filters: AgentFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.knowledge_domain) params.set('knowledge_domain', filters.knowledge_domain);\n if (filters.limit != null) params.set('limit', String(filters.limit));\n if (filters.offset != null) params.set('offset', String(filters.offset));\n const qs = params.toString();\n\n return useQuery<AgentListResponse>({\n queryKey: ['agents', filters],\n queryFn: () => apiFetch(`/agents${qs ? `?${qs}` : ''}`),\n });\n}\n\nexport function useAgent(id: string | null) {\n return useQuery<Agent>({\n queryKey: ['agents', id],\n queryFn: () => apiFetch(`/agents/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateAgent() {\n const queryClient = useQueryClient();\n return useMutation<Agent, Error, Partial<Agent> & { id: string }>({\n mutationFn: (body) =>\n apiFetch('/agents', {\n method: 'POST',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n\nexport function useUpdateAgent() {\n const queryClient = useQueryClient();\n return useMutation<Agent, Error, { id: string } & Partial<Agent>>({\n mutationFn: ({ id, ...body }) =>\n apiFetch(`/agents/${id}`, {\n method: 'PUT',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n\nexport function useDeleteAgent() {\n const queryClient = useQueryClient();\n return useMutation<{ deleted: boolean }, Error, string>({\n mutationFn: (id) =>\n apiFetch(`/agents/${id}`, { method: 'DELETE' }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n"],"names":["useAgents","filters","params","qs","useQuery","apiFetch","useAgent","id","useCreateAgent","queryClient","useQueryClient","useMutation","body","useUpdateAgent","useDeleteAgent"],"mappings":"qGAiEO,SAASA,EAAUC,EAAwB,GAAI,CACpD,MAAMC,EAAS,IAAI,gBACfD,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,kBAAkBC,EAAO,IAAI,mBAAoBD,EAAQ,gBAAgB,EACjFA,EAAQ,OAAS,MAAMC,EAAO,IAAI,QAAS,OAAOD,EAAQ,KAAK,CAAC,EAChEA,EAAQ,QAAU,MAAMC,EAAO,IAAI,SAAU,OAAOD,EAAQ,MAAM,CAAC,EACvE,MAAME,EAAKD,EAAO,SAAA,EAElB,OAAOE,EAA4B,CACjC,SAAU,CAAC,SAAUH,CAAO,EAC5B,QAAS,IAAMI,EAAS,UAAUF,EAAK,IAAIA,CAAE,GAAK,EAAE,EAAE,CAAA,CACvD,CACH,CAEO,SAASG,EAASC,EAAmB,CAC1C,OAAOH,EAAgB,CACrB,SAAU,CAAC,SAAUG,CAAE,EACvB,QAAS,IAAMF,EAAS,WAAWE,CAAE,EAAE,EACvC,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAEO,SAASC,GAAiB,CAC/B,MAAMC,EAAcC,EAAA,EACpB,OAAOC,EAA2D,CAChE,WAAaC,GACXP,EAAS,UAAW,CAClB,OAAQ,OACR,KAAM,KAAK,UAAUO,CAAI,CAAA,CAC1B,EACH,UAAW,IAAM,CACfH,EAAY,kBAAkB,CAAE,SAAU,CAAC,QAAQ,EAAG,CACxD,CAAA,CACD,CACH,CAEO,SAASI,GAAiB,CAC/B,MAAMJ,EAAcC,EAAA,EACpB,OAAOC,EAA2D,CAChE,WAAY,CAAC,CAAE,GAAAJ,EAAI,GAAGK,KACpBP,EAAS,WAAWE,CAAE,GAAI,CACxB,OAAQ,MACR,KAAM,KAAK,UAAUK,CAAI,CAAA,CAC1B,EACH,UAAW,IAAM,CACfH,EAAY,kBAAkB,CAAE,SAAU,CAAC,QAAQ,EAAG,CACxD,CAAA,CACD,CACH,CAEO,SAASK,GAAiB,CAC/B,MAAML,EAAcC,EAAA,EACpB,OAAOC,EAAiD,CACtD,WAAaJ,GACXF,EAAS,WAAWE,CAAE,GAAI,CAAE,OAAQ,SAAU,EAChD,UAAW,IAAM,CACfE,EAAY,kBAAkB,CAAE,SAAU,CAAC,QAAQ,EAAG,CACxD,CAAA,CACD,CACH"}
1
+ {"version":3,"file":"agents-Dpg829fG.js","sources":["../../src/api/agents.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\nexport interface AgentCapability {\n serverId: string;\n toolNames?: string[];\n}\n\nexport interface AgentTrigger {\n event: string;\n filter?: Record<string, any>;\n}\n\nexport interface AgentSchedule {\n cron: string;\n workflow_type: string;\n envelope?: Record<string, any>;\n execute_as?: string;\n}\n\nexport interface AgentBehaviors {\n cron?: string;\n triggers?: AgentTrigger[];\n schedules?: AgentSchedule[];\n escalationRules?: Record<string, any>;\n}\n\nexport interface Agent {\n /** Agent identifier — human-readable kebab-case name (e.g. 'content-triage') */\n id: string;\n description?: string;\n status: 'inactive' | 'active' | 'paused' | 'error';\n user_id?: string;\n knowledge_domain?: string;\n capabilities: AgentCapability[];\n behaviors: AgentBehaviors;\n goals?: string;\n rules?: string;\n workflow_type?: string;\n pipeline_id?: string;\n metadata: Record<string, any>;\n last_run_at?: string;\n subscription_count?: number;\n sub_topics?: string[];\n created_at: string;\n updated_at: string;\n stats?: {\n knowledge_count: number;\n escalation_count: number;\n last_execution_at?: string;\n };\n}\n\ninterface AgentListResponse {\n agents: Agent[];\n total: number;\n}\n\ninterface AgentFilters {\n status?: string;\n knowledge_domain?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useAgents(filters: AgentFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.knowledge_domain) params.set('knowledge_domain', filters.knowledge_domain);\n if (filters.limit != null) params.set('limit', String(filters.limit));\n if (filters.offset != null) params.set('offset', String(filters.offset));\n const qs = params.toString();\n\n return useQuery<AgentListResponse>({\n queryKey: ['agents', filters],\n queryFn: () => apiFetch(`/agents${qs ? `?${qs}` : ''}`),\n });\n}\n\nexport function useAgent(id: string | null) {\n return useQuery<Agent>({\n queryKey: ['agents', id],\n queryFn: () => apiFetch(`/agents/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateAgent() {\n const queryClient = useQueryClient();\n return useMutation<Agent, Error, Partial<Agent> & { id: string }>({\n mutationFn: (body) =>\n apiFetch('/agents', {\n method: 'POST',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n\nexport function useUpdateAgent() {\n const queryClient = useQueryClient();\n return useMutation<Agent, Error, { id: string } & Partial<Agent>>({\n mutationFn: ({ id, ...body }) =>\n apiFetch(`/agents/${id}`, {\n method: 'PUT',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n\nexport function useDeleteAgent() {\n const queryClient = useQueryClient();\n return useMutation<{ deleted: boolean }, Error, string>({\n mutationFn: (id) =>\n apiFetch(`/agents/${id}`, { method: 'DELETE' }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['agents'] });\n },\n });\n}\n"],"names":["useAgents","filters","params","qs","useQuery","apiFetch","useAgent","id","useCreateAgent","queryClient","useQueryClient","useMutation","body","useUpdateAgent","useDeleteAgent"],"mappings":"qGAiEO,SAASA,EAAUC,EAAwB,GAAI,CACpD,MAAMC,EAAS,IAAI,gBACfD,EAAQ,QAAQC,EAAO,IAAI,SAAUD,EAAQ,MAAM,EACnDA,EAAQ,kBAAkBC,EAAO,IAAI,mBAAoBD,EAAQ,gBAAgB,EACjFA,EAAQ,OAAS,MAAMC,EAAO,IAAI,QAAS,OAAOD,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./vendor-query-B2UbickB.js";import{d as n}from"./index-DpGeD89g.js";function y(e={}){const t=new URLSearchParams;return e.limit&&t.set("limit",String(e.limit)),e.offset!==void 0&&t.set("offset",String(e.offset)),a({queryKey:["bots",e],queryFn:()=>n(`/bot-accounts?${t}`)})}function d(e){return a({queryKey:["bots",e,"api-keys"],queryFn:()=>n(`/bot-accounts/${e}/api-keys`),enabled:!!e})}function b(){const e=s();return u({mutationFn:t=>n("/bot-accounts",{method:"POST",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function m(){const e=s();return u({mutationFn:({id:t,...o})=>n(`/bot-accounts/${t}`,{method:"PUT",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function f(){const e=s();return u({mutationFn:t=>n(`/bot-accounts/${t}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function l(){const e=s();return u({mutationFn:({botId:t,name:o,scopes:i})=>n(`/bot-accounts/${t}/api-keys`,{method:"POST",body:JSON.stringify({name:o,scopes:i})}),onSuccess:(t,o)=>{e.invalidateQueries({queryKey:["bots",o.botId,"api-keys"]})}})}function q(){const e=s();return u({mutationFn:({botId:t,keyId:o})=>n(`/bot-accounts/${t}/api-keys/${o}`,{method:"DELETE"}),onSuccess:(t,o)=>{e.invalidateQueries({queryKey:["bots",o.botId,"api-keys"]})}})}function S(){const e=s();return u({mutationFn:({botId:t,role:o,type:i})=>n(`/bot-accounts/${t}/roles`,{method:"POST",body:JSON.stringify({role:o,type:i})}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function p(){const e=s();return u({mutationFn:({botId:t,role:o})=>n(`/bot-accounts/${t}/roles/${encodeURIComponent(o)}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}export{m as a,d as b,l as c,q as d,S as e,p as f,f as g,y as h,b as u};
2
- //# sourceMappingURL=bots-FjzeqLzA.js.map
1
+ import{u as a,b as s,c as u}from"./vendor-query-B2UbickB.js";import{d as n}from"./index-DYcP4jyl.js";function y(e={}){const t=new URLSearchParams;return e.limit&&t.set("limit",String(e.limit)),e.offset!==void 0&&t.set("offset",String(e.offset)),a({queryKey:["bots",e],queryFn:()=>n(`/bot-accounts?${t}`)})}function d(e){return a({queryKey:["bots",e,"api-keys"],queryFn:()=>n(`/bot-accounts/${e}/api-keys`),enabled:!!e})}function b(){const e=s();return u({mutationFn:t=>n("/bot-accounts",{method:"POST",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function m(){const e=s();return u({mutationFn:({id:t,...o})=>n(`/bot-accounts/${t}`,{method:"PUT",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function f(){const e=s();return u({mutationFn:t=>n(`/bot-accounts/${t}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function l(){const e=s();return u({mutationFn:({botId:t,name:o,scopes:i})=>n(`/bot-accounts/${t}/api-keys`,{method:"POST",body:JSON.stringify({name:o,scopes:i})}),onSuccess:(t,o)=>{e.invalidateQueries({queryKey:["bots",o.botId,"api-keys"]})}})}function q(){const e=s();return u({mutationFn:({botId:t,keyId:o})=>n(`/bot-accounts/${t}/api-keys/${o}`,{method:"DELETE"}),onSuccess:(t,o)=>{e.invalidateQueries({queryKey:["bots",o.botId,"api-keys"]})}})}function S(){const e=s();return u({mutationFn:({botId:t,role:o,type:i})=>n(`/bot-accounts/${t}/roles`,{method:"POST",body:JSON.stringify({role:o,type:i})}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}function p(){const e=s();return u({mutationFn:({botId:t,role:o})=>n(`/bot-accounts/${t}/roles/${encodeURIComponent(o)}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["bots"]})}})}export{m as a,d as b,l as c,q as d,S as e,p as f,f as g,y as h,b as u};
2
+ //# sourceMappingURL=bots-BiS_mYcH.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"bots-FjzeqLzA.js","sources":["../../src/api/bots.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { BotRecord, BotApiKeyRecord } from './types';\nimport type { LTRoleType } from './types';\n\ninterface BotListResponse {\n bots: BotRecord[];\n total: number;\n}\n\ninterface BotFilters {\n limit?: number;\n offset?: number;\n}\n\n// ── Query hooks ──────────────────────────────────────────────────────────────\n\nexport function useBots(filters: BotFilters = {}) {\n const params = new URLSearchParams();\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<BotListResponse>({\n queryKey: ['bots', filters],\n queryFn: () => apiFetch(`/bot-accounts?${params}`),\n });\n}\n\nexport function useBotApiKeys(botId: string) {\n return useQuery<{ keys: BotApiKeyRecord[] }>({\n queryKey: ['bots', botId, 'api-keys'],\n queryFn: () => apiFetch(`/bot-accounts/${botId}/api-keys`),\n enabled: !!botId,\n });\n}\n\n// ── Mutation hooks ───────────────────────────────────────────────────────────\n\nexport function useCreateBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (data: {\n name: string;\n description?: string;\n display_name?: string;\n roles?: { role: string; type: LTRoleType }[];\n }) =>\n apiFetch('/bot-accounts', {\n method: 'POST',\n body: JSON.stringify(data),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useUpdateBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n id,\n ...data\n }: {\n id: string;\n display_name?: string;\n description?: string;\n status?: string;\n }) =>\n apiFetch(`/bot-accounts/${id}`, {\n method: 'PUT',\n body: JSON.stringify(data),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useDeleteBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch(`/bot-accounts/${id}`, { method: 'DELETE' }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useCreateBotApiKey() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n botId,\n name,\n scopes,\n }: {\n botId: string;\n name: string;\n scopes?: string[];\n }) =>\n apiFetch<{ id: string; rawKey: string }>(`/bot-accounts/${botId}/api-keys`, {\n method: 'POST',\n body: JSON.stringify({ name, scopes }),\n }),\n onSuccess: (_data, vars) => {\n queryClient.invalidateQueries({ queryKey: ['bots', vars.botId, 'api-keys'] });\n },\n });\n}\n\nexport function useRevokeBotApiKey() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ botId, keyId }: { botId: string; keyId: string }) =>\n apiFetch(`/bot-accounts/${botId}/api-keys/${keyId}`, { method: 'DELETE' }),\n onSuccess: (_data, vars) => {\n queryClient.invalidateQueries({ queryKey: ['bots', vars.botId, 'api-keys'] });\n },\n });\n}\n\nexport function useAddBotRole() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n botId,\n role,\n type,\n }: {\n botId: string;\n role: string;\n type: LTRoleType;\n }) =>\n apiFetch(`/bot-accounts/${botId}/roles`, {\n method: 'POST',\n body: JSON.stringify({ role, type }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useRemoveBotRole() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ botId, role }: { botId: string; role: string }) =>\n apiFetch(`/bot-accounts/${botId}/roles/${encodeURIComponent(role)}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n"],"names":["useBots","filters","params","useQuery","apiFetch","useBotApiKeys","botId","useCreateBot","queryClient","useQueryClient","useMutation","data","useUpdateBot","id","useDeleteBot","useCreateBotApiKey","name","scopes","_data","vars","useRevokeBotApiKey","keyId","useAddBotRole","role","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AAC,GAAI,CACnE,OAAQ,QAAA,CACT,EACH,UAAW,IAAM,CACff,EAAY,kBAAkB,CAAE,SAAU,CAAC,MAAM,EAAG,CACtD,CAAA,CACD,CACH"}
1
+ {"version":3,"file":"bots-BiS_mYcH.js","sources":["../../src/api/bots.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { BotRecord, BotApiKeyRecord } from './types';\nimport type { LTRoleType } from './types';\n\ninterface BotListResponse {\n bots: BotRecord[];\n total: number;\n}\n\ninterface BotFilters {\n limit?: number;\n offset?: number;\n}\n\n// ── Query hooks ──────────────────────────────────────────────────────────────\n\nexport function useBots(filters: BotFilters = {}) {\n const params = new URLSearchParams();\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<BotListResponse>({\n queryKey: ['bots', filters],\n queryFn: () => apiFetch(`/bot-accounts?${params}`),\n });\n}\n\nexport function useBotApiKeys(botId: string) {\n return useQuery<{ keys: BotApiKeyRecord[] }>({\n queryKey: ['bots', botId, 'api-keys'],\n queryFn: () => apiFetch(`/bot-accounts/${botId}/api-keys`),\n enabled: !!botId,\n });\n}\n\n// ── Mutation hooks ───────────────────────────────────────────────────────────\n\nexport function useCreateBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (data: {\n name: string;\n description?: string;\n display_name?: string;\n roles?: { role: string; type: LTRoleType }[];\n }) =>\n apiFetch('/bot-accounts', {\n method: 'POST',\n body: JSON.stringify(data),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useUpdateBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n id,\n ...data\n }: {\n id: string;\n display_name?: string;\n description?: string;\n status?: string;\n }) =>\n apiFetch(`/bot-accounts/${id}`, {\n method: 'PUT',\n body: JSON.stringify(data),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useDeleteBot() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch(`/bot-accounts/${id}`, { method: 'DELETE' }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useCreateBotApiKey() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n botId,\n name,\n scopes,\n }: {\n botId: string;\n name: string;\n scopes?: string[];\n }) =>\n apiFetch<{ id: string; rawKey: string }>(`/bot-accounts/${botId}/api-keys`, {\n method: 'POST',\n body: JSON.stringify({ name, scopes }),\n }),\n onSuccess: (_data, vars) => {\n queryClient.invalidateQueries({ queryKey: ['bots', vars.botId, 'api-keys'] });\n },\n });\n}\n\nexport function useRevokeBotApiKey() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ botId, keyId }: { botId: string; keyId: string }) =>\n apiFetch(`/bot-accounts/${botId}/api-keys/${keyId}`, { method: 'DELETE' }),\n onSuccess: (_data, vars) => {\n queryClient.invalidateQueries({ queryKey: ['bots', vars.botId, 'api-keys'] });\n },\n });\n}\n\nexport function useAddBotRole() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({\n botId,\n role,\n type,\n }: {\n botId: string;\n role: string;\n type: LTRoleType;\n }) =>\n apiFetch(`/bot-accounts/${botId}/roles`, {\n method: 'POST',\n body: JSON.stringify({ role, type }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n\nexport function useRemoveBotRole() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ botId, role }: { botId: string; role: string }) =>\n apiFetch(`/bot-accounts/${botId}/roles/${encodeURIComponent(role)}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['bots'] });\n },\n });\n}\n"],"names":["useBots","filters","params","useQuery","apiFetch","useBotApiKeys","botId","useCreateBot","queryClient","useQueryClient","useMutation","data","useUpdateBot","id","useDeleteBot","useCreateBotApiKey","name","scopes","_data","vars","useRevokeBotApiKey","keyId","useAddBotRole","role","type","useRemoveBotRole"],"mappings":"qGAiBO,SAASA,EAAQC,EAAsB,GAAI,CAChD,MAAMC,EAAS,IAAI,gBACnB,OAAID,EAAQ,OAAOC,EAAO,IAAI,QAAS,OAAOD,EAAQ,KAAK,CAAC,EACxDA,EAAQ,SAAW,QAAWC,EAAO,IAAI,SAAU,OAAOD,EAAQ,MAAM,CAAC,EAEtEE,EAA0B,CAC/B,SAAU,CAAC,OAAQF,CAAO,EAC1B,QAAS,IAAMG,EAAS,iBAAiBF,CAAM,EAAE,CAAA,CAClD,CACH,CAEO,SAASG,EAAcC,EAAe,CAC3C,OAAOH,EAAsC,CAC3C,SAAU,CAAC,OAAQG,EAAO,UAAU,EACpC,QAAS,IAAMF,EAAS,iBAAiBE,CAAK,WAAW,EACzD,QAAS,CAAC,CAACA,CAAA,CACZ,CACH,CAIO,SAASC,GAAe,CAC7B,MAAMC,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAaC,GAMXP,EAAS,gBAAiB,CACxB,OAAQ,OACR,KAAM,KAAK,UAAUO,CAAI,CAAA,CAC1B,EACH,UAAW,IAAM,CACfH,EAAY,kBAAkB,CAAE,SAAU,CAAC,MAAM,EAAG,CACtD,CAAA,CACD,CACH,CAEO,SAASI,GAAe,CAC7B,MAAMJ,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAY,CAAC,CACX,GAAAG,EACA,GAAGF,CAAA,IAOHP,EAAS,iBAAiBS,CAAE,GAAI,CAC9B,OAAQ,MACR,KAAM,KAAK,UAAUF,CAAI,CAAA,CAC1B,EACH,UAAW,IAAM,CACfH,EAAY,kBAAkB,CAAE,SAAU,CAAC,MAAM,EAAG,CACtD,CAAA,CACD,CACH,CAEO,SAASM,GAAe,CAC7B,MAAMN,EAAcC,EAAA,EACpB,OAAOC,EAAY,CACjB,WAAaG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AAY,CAAC,CAAE,MAAAJ,EAAO,KAAAiB,CAAA,IACpBnB,EAAS,iBAAiBE,CAAK,UAAU,mBAAmBiB,CAAI,CAAC,GAAI,CACnE,OAAQ,QAAA,CACT,EACH,UAAW,IAAM,CACff,EAAY,kBAAkB,CAAE,SAAU,CAAC,MAAM,EAAG,CACtD,CAAA,CACD,CACH"}
@@ -1,2 +1,2 @@
1
- import{u as i}from"./vendor-query-B2UbickB.js";import{d as e}from"./index-DpGeD89g.js";function t(){return i({queryKey:["capabilities"],queryFn:()=>e("/capabilities")})}export{t as u};
2
- //# sourceMappingURL=capabilities-CB0y1ZCx.js.map
1
+ import{u as i}from"./vendor-query-B2UbickB.js";import{d as e}from"./index-DYcP4jyl.js";function t(){return i({queryKey:["capabilities"],queryFn:()=>e("/capabilities")})}export{t as u};
2
+ //# sourceMappingURL=capabilities-Cpe3amV5.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"capabilities-CB0y1ZCx.js","sources":["../../src/api/capabilities.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\nexport interface CapabilityTool {\n name: string;\n description: string;\n inputSchema: Record<string, any>;\n serverName: string;\n serverId: string;\n}\n\nexport interface CapabilityCategory {\n name: string;\n tools: CapabilityTool[];\n}\n\nexport interface CapabilitiesResponse {\n categories: CapabilityCategory[];\n totalTools: number;\n}\n\nexport function useCapabilities() {\n return useQuery<CapabilitiesResponse>({\n queryKey: ['capabilities'],\n queryFn: () => apiFetch('/capabilities'),\n });\n}\n"],"names":["useCapabilities","useQuery","apiFetch"],"mappings":"uFAqBO,SAASA,GAAkB,CAChC,OAAOC,EAA+B,CACpC,SAAU,CAAC,cAAc,EACzB,QAAS,IAAMC,EAAS,eAAe,CAAA,CACxC,CACH"}
1
+ {"version":3,"file":"capabilities-Cpe3amV5.js","sources":["../../src/api/capabilities.ts"],"sourcesContent":["import { useQuery } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\nexport interface CapabilityTool {\n name: string;\n description: string;\n inputSchema: Record<string, any>;\n serverName: string;\n serverId: string;\n}\n\nexport interface CapabilityCategory {\n name: string;\n tools: CapabilityTool[];\n}\n\nexport interface CapabilitiesResponse {\n categories: CapabilityCategory[];\n totalTools: number;\n}\n\nexport function useCapabilities() {\n return useQuery<CapabilitiesResponse>({\n queryKey: ['capabilities'],\n queryFn: () => apiFetch('/capabilities'),\n });\n}\n"],"names":["useCapabilities","useQuery","apiFetch"],"mappings":"uFAqBO,SAASA,GAAkB,CAChC,OAAOC,EAA+B,CACpC,SAAU,CAAC,cAAc,EACzB,QAAS,IAAMC,EAAS,eAAe,CAAA,CACxC,CACH"}
@@ -1,2 +1,2 @@
1
- import{u as o,c as l,b as a}from"./vendor-query-B2UbickB.js";import{d as n}from"./index-DpGeD89g.js";function s(){return n("/controlplane/apps")}function c(e){return n(`/controlplane/rollcall?app_id=${encodeURIComponent(e)}`)}function i(e){return n("/controlplane/throttle",{method:"POST",body:JSON.stringify(e)})}function m(e){return n("/controlplane/subscribe",{method:"POST",body:JSON.stringify(e)})}function f(e,t,u){let r=`/controlplane/streams?app_id=${encodeURIComponent(e)}&duration=${encodeURIComponent(t)}`;return n(r)}function b(e){return o({queryKey:["controlplane","apps"],queryFn:s,staleTime:6e4,enabled:(e==null?void 0:e.enabled)??!0})}function d(e,t){return o({queryKey:["controlplane","rollcall",e],queryFn:()=>c(e),enabled:!!e,refetchInterval:t})}function h(){const e=a();return l({mutationFn:i,onSuccess:()=>{setTimeout(()=>{e.invalidateQueries({queryKey:["controlplane","rollcall"]})},1500)}})}function S(e,t,u,r){return o({queryKey:["controlplane","streams",e,t,""],queryFn:()=>f(e,t),enabled:!!e,staleTime:15e3,refetchInterval:r})}function q(){return l({mutationFn:m})}export{h as a,q as b,d as c,S as d,b as u};
2
- //# sourceMappingURL=controlplane-ZJtfQopv.js.map
1
+ import{u as o,c as l,b as a}from"./vendor-query-B2UbickB.js";import{d as n}from"./index-DYcP4jyl.js";function s(){return n("/controlplane/apps")}function c(e){return n(`/controlplane/rollcall?app_id=${encodeURIComponent(e)}`)}function i(e){return n("/controlplane/throttle",{method:"POST",body:JSON.stringify(e)})}function m(e){return n("/controlplane/subscribe",{method:"POST",body:JSON.stringify(e)})}function f(e,t,u){let r=`/controlplane/streams?app_id=${encodeURIComponent(e)}&duration=${encodeURIComponent(t)}`;return n(r)}function b(e){return o({queryKey:["controlplane","apps"],queryFn:s,staleTime:6e4,enabled:(e==null?void 0:e.enabled)??!0})}function d(e,t){return o({queryKey:["controlplane","rollcall",e],queryFn:()=>c(e),enabled:!!e,refetchInterval:t})}function h(){const e=a();return l({mutationFn:i,onSuccess:()=>{setTimeout(()=>{e.invalidateQueries({queryKey:["controlplane","rollcall"]})},1500)}})}function S(e,t,u,r){return o({queryKey:["controlplane","streams",e,t,""],queryFn:()=>f(e,t),enabled:!!e,staleTime:15e3,refetchInterval:r})}function q(){return l({mutationFn:m})}export{h as a,q as b,d as c,S as d,b as u};
2
+ //# sourceMappingURL=controlplane-CjK2cXaD.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"controlplane-ZJtfQopv.js","sources":["../../src/api/controlplane.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport interface ControlPlaneApp {\n appId: string;\n version: string;\n}\n\nexport interface QuorumProfile {\n namespace: string;\n app_id: string;\n engine_id: string;\n entity?: string;\n worker_topic?: string;\n stream?: string;\n stream_depth?: number;\n counts?: Record<string, number>;\n inited?: string;\n timestamp?: string;\n throttle?: number;\n reclaimDelay?: number;\n reclaimCount?: number;\n system?: {\n TotalMemoryGB: string;\n FreeMemoryGB: string;\n UsedMemoryGB: string;\n CPULoad: Array<Record<string, string>>;\n NetworkStats: Array<Record<string, unknown>>;\n };\n is_scout?: boolean;\n signature?: string;\n}\n\n// ── API functions ───────────────────────────────────────────────────────────\n\nfunction fetchApps() {\n return apiFetch<{ apps: ControlPlaneApp[] }>('/controlplane/apps');\n}\n\nfunction fetchRollCall(appId: string) {\n return apiFetch<{ profiles: QuorumProfile[] }>(`/controlplane/rollcall?app_id=${encodeURIComponent(appId)}`);\n}\n\nfunction postThrottle(body: { appId: string; throttle: number; topic?: string; guid?: string; scope?: 'engines' | 'workers' | 'all' }) {\n return apiFetch<{ success: boolean }>('/controlplane/throttle', {\n method: 'POST',\n body: JSON.stringify(body),\n });\n}\n\nfunction postSubscribe(body: { appId: string }) {\n return apiFetch<{ subscribed: boolean; appId: string }>('/controlplane/subscribe', {\n method: 'POST',\n body: JSON.stringify(body),\n });\n}\n\nexport interface StreamStats {\n pending: number;\n processed: number;\n byStream: Array<{ stream_type: 'engine' | 'worker'; stream_name: string; count: number }>;\n}\n\nfunction fetchStreamStats(appId: string, duration: string, stream?: string) {\n let url = `/controlplane/streams?app_id=${encodeURIComponent(appId)}&duration=${encodeURIComponent(duration)}`;\n if (stream) url += `&stream=${encodeURIComponent(stream)}`;\n return apiFetch<StreamStats>(url);\n}\n\n// ── Hooks ───────────────────────────────────────────────────────────────────\n\nexport function useControlPlaneApps(options?: { enabled?: boolean }) {\n return useQuery({\n queryKey: ['controlplane', 'apps'],\n queryFn: fetchApps,\n staleTime: 60_000,\n enabled: options?.enabled ?? true,\n });\n}\n\nexport function useRollCall(appId: string, refetchInterval?: number | false) {\n return useQuery({\n queryKey: ['controlplane', 'rollcall', appId],\n queryFn: () => fetchRollCall(appId),\n enabled: !!appId,\n refetchInterval: refetchInterval ?? false,\n });\n}\n\nexport function useThrottle() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: postThrottle,\n onSuccess: () => {\n // Delay refetch so mesh members have time to process the throttle message\n setTimeout(() => {\n qc.invalidateQueries({ queryKey: ['controlplane', 'rollcall'] });\n }, 1500);\n },\n });\n}\n\nexport function useStreamStats(appId: string, duration: string, stream?: string, refetchInterval?: number | false) {\n return useQuery({\n queryKey: ['controlplane', 'streams', appId, duration, stream ?? ''],\n queryFn: () => fetchStreamStats(appId, duration, stream),\n enabled: !!appId,\n staleTime: 15_000,\n refetchInterval: refetchInterval ?? false,\n });\n}\n\nexport function useSubscribeMesh() {\n return useMutation({\n mutationFn: postSubscribe,\n });\n}\n"],"names":["fetchApps","apiFetch","fetchRollCall","appId","postThrottle","body","postSubscribe","fetchStreamStats","duration","stream","url","useControlPlaneApps","options","useQuery","useRollCall","refetchInterval","useThrottle","qc","useQueryClient","useMutation","useStreamStats","useSubscribeMesh"],"mappings":"qGAqCA,SAASA,GAAY,CACnB,OAAOC,EAAsC,oBAAoB,CACnE,CAEA,SAASC,EAAcC,EAAe,CACpC,OAAOF,EAAwC,iCAAiC,mBAAmBE,CAAK,CAAC,EAAE,CAC7G,CAEA,SAASC,EAAaC,EAAiH,CACrI,OAAOJ,EAA+B,yBAA0B,CAC9D,OAAQ,OACR,KAAM,KAAK,UAAUI,CAAI,CAAA,CAC1B,CACH,CAEA,SAASC,EAAcD,EAAyB,CAC9C,OAAOJ,EAAiD,0BAA2B,CACjF,OAAQ,OACR,KAAM,KAAK,UAAUI,CAAI,CAAA,CAC1B,CACH,CAQA,SAASE,EAAiBJ,EAAeK,EAAkBC,EAAiB,CAC1E,IAAIC,EAAM,gCAAgC,mBAAmBP,CAAK,CAAC,aAAa,mBAAmBK,CAAQ,CAAC,GAE5G,OAAOP,EAAsBS,CAAG,CAClC,CAIO,SAASC,EAAoBC,EAAiC,CACnE,OAAOC,EAAS,CACd,SAAU,CAAC,eAAgB,MAAM,EACjC,QAASb,EACT,UAAW,IACX,SAASY,GAAA,YAAAA,EAAS,UAAW,EAAA,CAC9B,CACH,CAEO,SAASE,EAAYX,EAAeY,EAAkC,CAC3E,OAAOF,EAAS,CACd,SAAU,CAAC,eAAgB,WAAYV,CAAK,EAC5C,QAAS,IAAMD,EAAcC,CAAK,EAClC,QAAS,CAAC,CAACA,EACX,gBAAiBY,CAAmB,CACrC,CACH,CAEO,SAASC,GAAc,CAC5B,MAAMC,EAAKC,EAAA,EACX,OAAOC,EAAY,CACjB,WAAYf,EACZ,UAAW,IAAM,CAEf,WAAW,IAAM,CACfa,EAAG,kBAAkB,CAAE,SAAU,CAAC,eAAgB,UAAU,EAAG,CACjE,EAAG,IAAI,CACT,CAAA,CACD,CACH,CAEO,SAASG,EAAejB,EAAeK,EAAkBC,EAAiBM,EAAkC,CACjH,OAAOF,EAAS,CACd,SAAU,CAAC,eAAgB,UAAWV,EAAOK,EAAoB,EAAE,EACnE,QAAS,IAAMD,EAAiBJ,EAAOK,CAAgB,EACvD,QAAS,CAAC,CAACL,EACX,UAAW,KACX,gBAAiBY,CAAmB,CACrC,CACH,CAEO,SAASM,GAAmB,CACjC,OAAOF,EAAY,CACjB,WAAYb,CAAA,CACb,CACH"}
1
+ {"version":3,"file":"controlplane-CjK2cXaD.js","sources":["../../src/api/controlplane.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\n\n// ── Types ───────────────────────────────────────────────────────────────────\n\nexport interface ControlPlaneApp {\n appId: string;\n version: string;\n}\n\nexport interface QuorumProfile {\n namespace: string;\n app_id: string;\n engine_id: string;\n entity?: string;\n worker_topic?: string;\n stream?: string;\n stream_depth?: number;\n counts?: Record<string, number>;\n inited?: string;\n timestamp?: string;\n throttle?: number;\n reclaimDelay?: number;\n reclaimCount?: number;\n system?: {\n TotalMemoryGB: string;\n FreeMemoryGB: string;\n UsedMemoryGB: string;\n CPULoad: Array<Record<string, string>>;\n NetworkStats: Array<Record<string, unknown>>;\n };\n is_scout?: boolean;\n signature?: string;\n}\n\n// ── API functions ───────────────────────────────────────────────────────────\n\nfunction fetchApps() {\n return apiFetch<{ apps: ControlPlaneApp[] }>('/controlplane/apps');\n}\n\nfunction fetchRollCall(appId: string) {\n return apiFetch<{ profiles: QuorumProfile[] }>(`/controlplane/rollcall?app_id=${encodeURIComponent(appId)}`);\n}\n\nfunction postThrottle(body: { appId: string; throttle: number; topic?: string; guid?: string; scope?: 'engines' | 'workers' | 'all' }) {\n return apiFetch<{ success: boolean }>('/controlplane/throttle', {\n method: 'POST',\n body: JSON.stringify(body),\n });\n}\n\nfunction postSubscribe(body: { appId: string }) {\n return apiFetch<{ subscribed: boolean; appId: string }>('/controlplane/subscribe', {\n method: 'POST',\n body: JSON.stringify(body),\n });\n}\n\nexport interface StreamStats {\n pending: number;\n processed: number;\n byStream: Array<{ stream_type: 'engine' | 'worker'; stream_name: string; count: number }>;\n}\n\nfunction fetchStreamStats(appId: string, duration: string, stream?: string) {\n let url = `/controlplane/streams?app_id=${encodeURIComponent(appId)}&duration=${encodeURIComponent(duration)}`;\n if (stream) url += `&stream=${encodeURIComponent(stream)}`;\n return apiFetch<StreamStats>(url);\n}\n\n// ── Hooks ───────────────────────────────────────────────────────────────────\n\nexport function useControlPlaneApps(options?: { enabled?: boolean }) {\n return useQuery({\n queryKey: ['controlplane', 'apps'],\n queryFn: fetchApps,\n staleTime: 60_000,\n enabled: options?.enabled ?? true,\n });\n}\n\nexport function useRollCall(appId: string, refetchInterval?: number | false) {\n return useQuery({\n queryKey: ['controlplane', 'rollcall', appId],\n queryFn: () => fetchRollCall(appId),\n enabled: !!appId,\n refetchInterval: refetchInterval ?? false,\n });\n}\n\nexport function useThrottle() {\n const qc = useQueryClient();\n return useMutation({\n mutationFn: postThrottle,\n onSuccess: () => {\n // Delay refetch so mesh members have time to process the throttle message\n setTimeout(() => {\n qc.invalidateQueries({ queryKey: ['controlplane', 'rollcall'] });\n }, 1500);\n },\n });\n}\n\nexport function useStreamStats(appId: string, duration: string, stream?: string, refetchInterval?: number | false) {\n return useQuery({\n queryKey: ['controlplane', 'streams', appId, duration, stream ?? ''],\n queryFn: () => fetchStreamStats(appId, duration, stream),\n enabled: !!appId,\n staleTime: 15_000,\n refetchInterval: refetchInterval ?? false,\n });\n}\n\nexport function useSubscribeMesh() {\n return useMutation({\n mutationFn: postSubscribe,\n });\n}\n"],"names":["fetchApps","apiFetch","fetchRollCall","appId","postThrottle","body","postSubscribe","fetchStreamStats","duration","stream","url","useControlPlaneApps","options","useQuery","useRollCall","refetchInterval","useThrottle","qc","useQueryClient","useMutation","useStreamStats","useSubscribeMesh"],"mappings":"qGAqCA,SAASA,GAAY,CACnB,OAAOC,EAAsC,oBAAoB,CACnE,CAEA,SAASC,EAAcC,EAAe,CACpC,OAAOF,EAAwC,iCAAiC,mBAAmBE,CAAK,CAAC,EAAE,CAC7G,CAEA,SAASC,EAAaC,EAAiH,CACrI,OAAOJ,EAA+B,yBAA0B,CAC9D,OAAQ,OACR,KAAM,KAAK,UAAUI,CAAI,CAAA,CAC1B,CACH,CAEA,SAASC,EAAcD,EAAyB,CAC9C,OAAOJ,EAAiD,0BAA2B,CACjF,OAAQ,OACR,KAAM,KAAK,UAAUI,CAAI,CAAA,CAC1B,CACH,CAQA,SAASE,EAAiBJ,EAAeK,EAAkBC,EAAiB,CAC1E,IAAIC,EAAM,gCAAgC,mBAAmBP,CAAK,CAAC,aAAa,mBAAmBK,CAAQ,CAAC,GAE5G,OAAOP,EAAsBS,CAAG,CAClC,CAIO,SAASC,EAAoBC,EAAiC,CACnE,OAAOC,EAAS,CACd,SAAU,CAAC,eAAgB,MAAM,EACjC,QAASb,EACT,UAAW,IACX,SAASY,GAAA,YAAAA,EAAS,UAAW,EAAA,CAC9B,CACH,CAEO,SAASE,EAAYX,EAAeY,EAAkC,CAC3E,OAAOF,EAAS,CACd,SAAU,CAAC,eAAgB,WAAYV,CAAK,EAC5C,QAAS,IAAMD,EAAcC,CAAK,EAClC,QAAS,CAAC,CAACA,EACX,gBAAiBY,CAAmB,CACrC,CACH,CAEO,SAASC,GAAc,CAC5B,MAAMC,EAAKC,EAAA,EACX,OAAOC,EAAY,CACjB,WAAYf,EACZ,UAAW,IAAM,CAEf,WAAW,IAAM,CACfa,EAAG,kBAAkB,CAAE,SAAU,CAAC,eAAgB,UAAU,EAAG,CACjE,EAAG,IAAI,CACT,CAAA,CACD,CACH,CAEO,SAASG,EAAejB,EAAeK,EAAkBC,EAAiBM,EAAkC,CACjH,OAAOF,EAAS,CACd,SAAU,CAAC,eAAgB,UAAWV,EAAOK,EAAoB,EAAE,EACnE,QAAS,IAAMD,EAAiBJ,EAAOK,CAAgB,EACvD,QAAS,CAAC,CAACL,EACX,UAAW,KACX,gBAAiBY,CAAmB,CACrC,CACH,CAEO,SAASM,GAAmB,CACjC,OAAOF,EAAY,CACjB,WAAYb,CAAA,CACb,CACH"}
@@ -0,0 +1,2 @@
1
+ import{j as e,a as g}from"./vendor-query-B2UbickB.js";import{F as v,b as u,c as m,a as C}from"./FilterBar-DDIn8TOs.js";import{P as k}from"./PriorityBadge-B4ykBH7f.js";import{R as S}from"./RolePill-CUIJSgRq.js";import{W as P}from"./WorkflowPill-S6VV2Eax.js";import{C as _,a as E,i as T}from"./CountdownTimer-CRK-E2UF.js";import{y as O,z as $}from"./index-DYcP4jyl.js";import{af as A,ag as I,ah as d,a6 as L,a7 as R}from"./vendor-icons-DPmIjhZB.js";const c="text-text-secondary transition-colors group-hover/row:text-text-primary";function F({row:t}){if(E(t)){const s=t.status==="resolved"?"text-status-success":"text-text-tertiary";return e.jsx(I,{className:`w-3 h-3 shrink-0 ${s}`})}return t.status==="resolved"?e.jsx(d,{className:"w-2.5 h-2.5 shrink-0 text-status-success",strokeWidth:2.5}):t.status==="cancelled"?e.jsx(d,{className:"w-2.5 h-2.5 shrink-0 text-status-error",strokeWidth:2.5}):T(t)?e.jsx(d,{className:"w-2.5 h-2.5 shrink-0 text-status-warning",strokeWidth:2.5}):e.jsx(d,{className:"w-2.5 h-2.5 shrink-0 text-status-active",strokeWidth:2.5})}function W({metadata:t,role:s,highlightKeys:y,onMetaFacet:n}){const[i,x]=g.useState(!1);if(!t||Object.keys(t).length===0)return e.jsx("span",{className:"text-[11px] text-text-tertiary",children:"—"});const o=y??[],l=[...o.filter(a=>a in t),...Object.keys(t).filter(a=>!o.includes(a))],j=i?l:l.slice(0,1),p=l.length-1;return e.jsx("div",{className:"w-full",onClick:a=>a.stopPropagation(),children:e.jsx("div",{className:"space-y-px",children:j.map((a,b)=>{const h=typeof t[a]=="object"&&t[a]!==null?JSON.stringify(t[a]):String(t[a]),f=typeof t[a]=="object"&&t[a]!==null?JSON.stringify(t[a]):t[a],N=o.includes(a),w=b===j.length-1;return e.jsxs("div",{className:"group/mrow flex items-center gap-1 min-w-0",children:[e.jsx("span",{className:`shrink-0 w-14 text-[9px] font-mono uppercase tracking-wide truncate ${N?"text-accent":"text-text-tertiary"}`,title:a,children:a}),e.jsx("span",{className:`flex-1 min-w-0 text-[11px] font-medium truncate ${N?"text-text-primary":"text-text-secondary"}`,title:h,children:h}),n&&e.jsxs("span",{className:"flex items-center gap-px shrink-0 opacity-0 group-hover/mrow:opacity-100 transition-opacity",children:[e.jsx("button",{className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Filter ${s}: ${a} = ${h}`,onClick:r=>{r.stopPropagation(),n(a,f,r.shiftKey,s)},children:e.jsx(L,{className:"w-3 h-3"})}),e.jsx("button",{className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Search all: ${a} = ${h}`,onClick:r=>{r.stopPropagation(),n(a,f,r.shiftKey,null)},children:e.jsx(R,{className:"w-3 h-3"})})]}),!i&&p>0&&e.jsxs("button",{onClick:r=>{r.stopPropagation(),x(!0)},className:"shrink-0 text-[9px] text-text-quaternary hover:text-accent transition-colors font-mono",title:`Show ${p} more fields`,children:["+",p]}),i&&w&&p>0&&e.jsx("button",{onClick:r=>{r.stopPropagation(),x(!1)},className:"shrink-0 text-[9px] text-text-quaternary hover:text-accent transition-colors",title:"Show less",children:"↑"})]},a)})})})}function K(t={}){return[{key:"description",label:"Summary",render:s=>e.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[e.jsx("span",{className:"shrink-0",children:e.jsx(F,{row:s})}),e.jsx("span",{className:`truncate text-xs ${c}`,children:s.description||s.type})]}),className:"max-w-0"},{key:"workflow_type",label:"Workflow",render:s=>e.jsx(P,{type:s.workflow_type||s.type}),className:"w-40 whitespace-nowrap"},{key:"metadata",label:"Metadata",render:s=>e.jsx(W,{metadata:s.metadata,role:s.role,highlightKeys:t.highlightKeys,onMetaFacet:t.onMetaFacet}),className:"w-80 max-w-[19rem] align-top"},{key:"role",label:"Role",render:s=>e.jsx("span",{className:c,children:e.jsx(S,{role:s.role,size:"md",tone:"inherit"})}),className:"w-28"},{key:"priority",label:"Priority",render:s=>e.jsx("span",{className:c,children:e.jsx(k,{priority:s.priority,size:"sm",tone:"inherit"})}),className:"w-14",sortable:!0},{key:"created_time",label:"Created",render:s=>e.jsx("span",{className:`text-[11px] font-mono whitespace-nowrap ${c}`,title:s.created_at,children:O(s.created_at)}),className:"w-40 whitespace-nowrap",sortable:!0},{key:"created_at",label:"Ago",render:s=>e.jsx("span",{className:`text-xs tabular-nums ${c}`,title:s.created_at,children:$(s.created_at)}),className:"w-12 whitespace-nowrap"}]}const Y=K(),G={key:"expires",label:e.jsx(A,{className:"w-3.5 h-3.5 text-text-tertiary"}),render:t=>t.assigned_until?e.jsx(_,{until:t.assigned_until}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-16 whitespace-nowrap"},M=[{value:"1",label:"P1"},{value:"2",label:"P2"},{value:"3",label:"P3"},{value:"4",label:"P4"}],q=[{value:"all",label:"All"},{value:"available",label:"Available"},{value:"claimed",label:"Claimed"},{value:"resolved",label:"Resolved"},{value:"cancelled",label:"Cancelled"},{value:"expired",label:"Expired"}];function Q({filters:t,setFilter:s,roles:y,types:n,showStatus:i=!1,showSearch:x=!0,actions:o}){return e.jsxs(v,{actions:o,children:[i&&e.jsxs(e.Fragment,{children:[e.jsx(u,{label:"Status",value:t.status??"",onChange:l=>s("status",l),options:q}),e.jsx(m,{})]}),e.jsx(u,{label:"Role",value:t.role,onChange:l=>s("role",l),options:y.map(l=>({value:l,label:l}))}),e.jsx(m,{}),e.jsx(u,{label:"Type",value:t.type,onChange:l=>s("type",l),options:n.map(l=>({value:l,label:l}))}),e.jsx(m,{}),e.jsx(u,{label:"Priority",value:t.priority,onChange:l=>s("priority",l),options:M}),x&&e.jsxs(e.Fragment,{children:[e.jsx(m,{}),e.jsx(C,{label:"Search",value:t.search??"",onChange:l=>s("search",l),placeholder:"ID, workflow, origin…"})]})]})}export{Q as E,G as T,Y as a,K as m};
2
+ //# sourceMappingURL=escalation-columns-_KrFogWG.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"escalation-columns-_KrFogWG.js","sources":["../../src/pages/operator/escalation-columns.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Circle, Bell, Clock, ListFilter, Search } from 'lucide-react';\nimport type { Column } from '../../components/common/data/DataTable';\nimport { FilterBar, FilterSelect, FilterInput, FilterDivider } from '../../components/common/data/FilterBar';\nimport { PriorityBadge } from '../../components/common/display/PriorityBadge';\nimport { RolePill } from '../../components/common/display/RolePill';\nimport { WorkflowPill } from '../../components/common/display/WorkflowPill';\nimport { CountdownTimer } from '../../components/common/display/CountdownTimer';\nimport { formatAgoCompact, formatDateTime } from '../../lib/format';\nimport { isEffectivelyClaimed, isAckEscalation } from '../../lib/escalation';\nimport type { LTEscalationRecord } from '../../api/types';\n\nexport type MetaFacetFn = (key: string, value: string | number | boolean, shift: boolean, role: string | null) => void;\n\nexport interface EscalationColumnOpts {\n onMetaFacet?: MetaFacetFn;\n highlightKeys?: string[];\n}\n\n// Shared cell text: a consistent resting shade for every cell, sharpening to\n// the primary text colour when the row is hovered. Cells (and pills via their\n// `inherit` tone) all read this single source so the whole row darkens as one.\nconst CELL_TEXT = 'text-text-secondary transition-colors group-hover/row:text-text-primary';\n\n/** Status dot — rendered inline before summary. */\nfunction StatusDot({ row }: { row: LTEscalationRecord }) {\n if (isAckEscalation(row)) {\n const color = row.status === 'resolved' ? 'text-status-success' : 'text-text-tertiary';\n return <Bell className={`w-3 h-3 shrink-0 ${color}`} />;\n }\n if (row.status === 'resolved') {\n return <Circle className=\"w-2.5 h-2.5 shrink-0 text-status-success\" strokeWidth={2.5} />;\n }\n if (row.status === 'cancelled') {\n return <Circle className=\"w-2.5 h-2.5 shrink-0 text-status-error\" strokeWidth={2.5} />;\n }\n if (isEffectivelyClaimed(row)) {\n return <Circle className=\"w-2.5 h-2.5 shrink-0 text-status-warning\" strokeWidth={2.5} />;\n }\n // pending (unclaimed)\n return <Circle className=\"w-2.5 h-2.5 shrink-0 text-status-active\" strokeWidth={2.5} />;\n}\n\n/** Key/value metadata dict with 1 row collapsed by default, expand for the rest. */\nexport function MetadataCell({\n metadata,\n role,\n highlightKeys,\n onMetaFacet,\n}: {\n metadata: Record<string, unknown> | null;\n role: string;\n highlightKeys?: string[];\n onMetaFacet?: MetaFacetFn;\n}) {\n const [expanded, setExpanded] = useState(false);\n\n if (!metadata || Object.keys(metadata).length === 0) {\n return <span className=\"text-[11px] text-text-tertiary\">—</span>;\n }\n\n const hl = highlightKeys ?? [];\n // Highlighted keys first, then the rest in insertion order.\n const allKeys = [\n ...hl.filter((k) => k in metadata),\n ...Object.keys(metadata).filter((k) => !hl.includes(k)),\n ];\n\n const shown = expanded ? allKeys : allKeys.slice(0, 1);\n const hiddenCount = allKeys.length - 1;\n\n return (\n <div className=\"w-full\" onClick={(e) => e.stopPropagation()}>\n <div className=\"space-y-px\">\n {shown.map((k, i) => {\n const sv = typeof metadata[k] === 'object' && metadata[k] !== null\n ? JSON.stringify(metadata[k])\n : String(metadata[k]);\n // Native type (boolean/number) preserved for facet queries; objects become JSON strings.\n const facetValue: string | number | boolean = typeof metadata[k] === 'object' && metadata[k] !== null\n ? JSON.stringify(metadata[k])\n : (metadata[k] as string | number | boolean);\n const isHl = hl.includes(k);\n const isLastShown = i === shown.length - 1;\n return (\n <div key={k} className=\"group/mrow flex items-center gap-1 min-w-0\">\n <span\n className={`shrink-0 w-14 text-[9px] font-mono uppercase tracking-wide truncate ${isHl ? 'text-accent' : 'text-text-tertiary'}`}\n title={k}\n >\n {k}\n </span>\n <span\n className={`flex-1 min-w-0 text-[11px] font-medium truncate ${isHl ? 'text-text-primary' : 'text-text-secondary'}`}\n title={sv}\n >\n {sv}\n </span>\n {onMetaFacet && (\n <span className=\"flex items-center gap-px shrink-0 opacity-0 group-hover/mrow:opacity-100 transition-opacity\">\n <button\n className=\"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors\"\n title={`Filter ${role}: ${k} = ${sv}`}\n onClick={(ev) => { ev.stopPropagation(); onMetaFacet(k, facetValue, ev.shiftKey, role); }}\n >\n <ListFilter className=\"w-3 h-3\" />\n </button>\n <button\n className=\"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors\"\n title={`Search all: ${k} = ${sv}`}\n onClick={(ev) => { ev.stopPropagation(); onMetaFacet(k, facetValue, ev.shiftKey, null); }}\n >\n <Search className=\"w-3 h-3\" />\n </button>\n </span>\n )}\n {/* +N inline at end of single visible row when collapsed */}\n {!expanded && hiddenCount > 0 && (\n <button\n onClick={(ev) => { ev.stopPropagation(); setExpanded(true); }}\n className=\"shrink-0 text-[9px] text-text-quaternary hover:text-accent transition-colors font-mono\"\n title={`Show ${hiddenCount} more fields`}\n >\n +{hiddenCount}\n </button>\n )}\n {/* ↑ inline at end of last row when expanded */}\n {expanded && isLastShown && hiddenCount > 0 && (\n <button\n onClick={(ev) => { ev.stopPropagation(); setExpanded(false); }}\n className=\"shrink-0 text-[9px] text-text-quaternary hover:text-accent transition-colors\"\n title=\"Show less\"\n >\n ↑\n </button>\n )}\n </div>\n );\n })}\n </div>\n </div>\n );\n}\n\n/** Build the shared column set, optionally wiring metadata filter callbacks. */\nexport function makeEscalationColumns(opts: EscalationColumnOpts = {}): Column<LTEscalationRecord>[] {\n return [\n {\n key: 'description',\n label: 'Summary',\n render: (row) => (\n <div className=\"flex items-center gap-2 overflow-hidden\">\n <span className=\"shrink-0\"><StatusDot row={row} /></span>\n <span className={`truncate text-xs ${CELL_TEXT}`}>{row.description || row.type}</span>\n </div>\n ),\n className: 'max-w-0',\n },\n {\n key: 'workflow_type',\n label: 'Workflow',\n render: (row) => <WorkflowPill type={row.workflow_type || row.type} />,\n className: 'w-40 whitespace-nowrap',\n },\n {\n key: 'metadata',\n label: 'Metadata',\n render: (row) => (\n <MetadataCell\n metadata={row.metadata}\n role={row.role}\n highlightKeys={opts.highlightKeys}\n onMetaFacet={opts.onMetaFacet}\n />\n ),\n className: 'w-80 max-w-[19rem] align-top',\n },\n {\n key: 'role',\n label: 'Role',\n render: (row) => (\n <span className={CELL_TEXT}>\n <RolePill role={row.role} size=\"md\" tone=\"inherit\" />\n </span>\n ),\n className: 'w-28',\n },\n {\n key: 'priority',\n label: 'Priority',\n render: (row) => (\n <span className={CELL_TEXT}>\n <PriorityBadge priority={row.priority} size=\"sm\" tone=\"inherit\" />\n </span>\n ),\n className: 'w-14',\n sortable: true,\n },\n {\n key: 'created_time',\n label: 'Created',\n render: (row) => (\n <span className={`text-[11px] font-mono whitespace-nowrap ${CELL_TEXT}`} title={row.created_at}>\n {formatDateTime(row.created_at)}\n </span>\n ),\n className: 'w-40 whitespace-nowrap',\n sortable: true,\n },\n {\n key: 'created_at',\n label: 'Ago',\n render: (row) => (\n <span className={`text-xs tabular-nums ${CELL_TEXT}`} title={row.created_at}>\n {formatAgoCompact(row.created_at)}\n </span>\n ),\n className: 'w-12 whitespace-nowrap',\n },\n ];\n}\n\n/** Base columns shared by all escalation list pages (no filter callback). */\nexport const ESCALATION_COLUMNS: Column<LTEscalationRecord>[] = makeEscalationColumns();\n\n/** Time-remaining column for claimed escalations — aligns with checkbox column on All Escalations. */\nexport const TIME_LEFT_COLUMN: Column<LTEscalationRecord> = {\n key: 'expires',\n label: (<Clock className=\"w-3.5 h-3.5 text-text-tertiary\" />) as any,\n render: (row) =>\n row.assigned_until ? (\n <CountdownTimer until={row.assigned_until} />\n ) : (\n <span className=\"text-xs text-text-tertiary\">—</span>\n ),\n className: 'w-16 whitespace-nowrap',\n};\n\n/** Status icon column — color-coded filled circle, or bell for ACK/notification escalations. */\nexport const STATUS_COLUMN: Column<LTEscalationRecord> = {\n key: 'status',\n label: '',\n render: (row) => {\n if (isAckEscalation(row)) {\n const color = row.status === 'resolved' ? 'text-status-success' : 'text-text-tertiary';\n return <Bell className={`w-3 h-3 ${color}`} />;\n }\n if (row.status === 'resolved') {\n return <Circle className=\"w-2.5 h-2.5 text-status-success\" strokeWidth={2.5} />;\n }\n if (isEffectivelyClaimed(row)) {\n return <Circle className=\"w-2.5 h-2.5 text-status-warning\" strokeWidth={2.5} />;\n }\n // pending (unclaimed)\n return <Circle className=\"w-2.5 h-2.5 text-text-tertiary\" strokeWidth={2.5} />;\n },\n className: 'w-8',\n};\n\n/** Claimed-only status icon (always orange, or bell for ACK). */\nexport const CLAIMED_STATUS_COLUMN: Column<LTEscalationRecord> = {\n key: 'status',\n label: '',\n render: (row) =>\n isAckEscalation(row)\n ? <Bell className=\"w-3 h-3 text-status-warning\" />\n : <Circle className=\"w-2.5 h-2.5 text-status-warning\" strokeWidth={2.5} />,\n className: 'w-8',\n};\n\n/** Priority filter options shared by both pages. */\nexport const PRIORITY_OPTIONS = [\n { value: '1', label: 'P1' },\n { value: '2', label: 'P2' },\n { value: '3', label: 'P3' },\n { value: '4', label: 'P4' },\n];\n\n/** Status filter options for escalation list pages. `all` spans every status so a\n * metadata search (e.g. one order id) returns its escalations regardless of status. */\nexport const STATUS_OPTIONS = [\n { value: 'all', label: 'All' },\n { value: 'available', label: 'Available' },\n { value: 'claimed', label: 'Claimed' },\n { value: 'resolved', label: 'Resolved' },\n { value: 'cancelled', label: 'Cancelled' },\n { value: 'expired', label: 'Expired' },\n];\n\n/** Shared filter bar for escalation list pages. */\nexport function EscalationFilterBar({\n filters,\n setFilter,\n roles,\n types,\n showStatus = false,\n showSearch = true,\n actions,\n}: {\n filters: { role: string; type: string; priority: string; status?: string; search?: string };\n setFilter: (key: any, value: string) => void;\n roles: string[];\n types: string[];\n showStatus?: boolean;\n // Free-text search lives here by default, but the faceted page folds it into\n // the drawer instead so there's a single search surface.\n showSearch?: boolean;\n actions?: React.ReactNode;\n}) {\n return (\n <FilterBar actions={actions}>\n {showStatus && (\n <>\n <FilterSelect\n label=\"Status\"\n value={filters.status ?? ''}\n onChange={(v) => setFilter('status', v)}\n options={STATUS_OPTIONS}\n />\n <FilterDivider />\n </>\n )}\n <FilterSelect\n label=\"Role\"\n value={filters.role}\n onChange={(v) => setFilter('role', v)}\n options={roles.map((r) => ({ value: r, label: r }))}\n />\n <FilterDivider />\n <FilterSelect\n label=\"Type\"\n value={filters.type}\n onChange={(v) => setFilter('type', v)}\n options={types.map((t) => ({ value: t, label: t }))}\n />\n <FilterDivider />\n <FilterSelect\n label=\"Priority\"\n value={filters.priority}\n onChange={(v) => setFilter('priority', v)}\n options={PRIORITY_OPTIONS}\n />\n {showSearch && (\n <>\n <FilterDivider />\n <FilterInput\n label=\"Search\"\n value={filters.search ?? ''}\n onChange={(v) => setFilter('search', v)}\n placeholder=\"ID, workflow, origin…\"\n />\n </>\n )}\n </FilterBar>\n );\n}\n"],"names":["CELL_TEXT","StatusDot","row","isAckEscalation","color","jsx","Bell","Circle","isEffectivelyClaimed","MetadataCell","metadata","role","highlightKeys","onMetaFacet","expanded","setExpanded","useState","hl","allKeys","k","shown","hiddenCount","e","i","sv","facetValue","isHl","isLastShown","jsxs","ev","ListFilter","Search","makeEscalationColumns","opts","WorkflowPill","RolePill","PriorityBadge","formatDateTime","formatAgoCompact","ESCALATION_COLUMNS","TIME_LEFT_COLUMN","Clock","CountdownTimer","PRIORITY_OPTIONS","STATUS_OPTIONS","EscalationFilterBar","filters","setFilter","roles","types","showStatus","showSearch","actions","FilterBar","Fragment","FilterSelect","v","FilterDivider","r","t","FilterInput"],"mappings":"+bAsBA,MAAMA,EAAY,0EAGlB,SAASC,EAAU,CAAE,IAAAC,GAAoC,CACvD,GAAIC,EAAgBD,CAAG,EAAG,CACxB,MAAME,EAAQF,EAAI,SAAW,WAAa,sBAAwB,qBAClE,OAAOG,EAAAA,IAACC,EAAA,CAAK,UAAW,oBAAoBF,CAAK,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AWU,GAAMT,EAAU,SAAUS,CAAC,EACtC,QAASZ,CAAA,CAAA,QAEVa,EAAA,CAAA,CAAc,CAAA,EACjB,EAEFpD,EAAAA,IAACkD,EAAA,CACC,MAAM,OACN,MAAOT,EAAQ,KACf,SAAWU,GAAMT,EAAU,OAAQS,CAAC,EACpC,QAASR,EAAM,IAAKU,IAAO,CAAE,MAAOA,EAAG,MAAOA,GAAI,CAAA,CAAA,QAEnDD,EAAA,EAAc,EACfpD,EAAAA,IAACkD,EAAA,CACC,MAAM,OACN,MAAOT,EAAQ,KACf,SAAWU,GAAMT,EAAU,OAAQS,CAAC,EACpC,QAASP,EAAM,IAAKU,IAAO,CAAE,MAAOA,EAAG,MAAOA,GAAI,CAAA,CAAA,QAEnDF,EAAA,EAAc,EACfpD,EAAAA,IAACkD,EAAA,CACC,MAAM,WACN,MAAOT,EAAQ,SACf,SAAWU,GAAMT,EAAU,WAAYS,CAAC,EACxC,QAASb,CAAA,CAAA,EAEVQ,GACCvB,EAAAA,KAAA0B,WAAA,CACE,SAAA,CAAAjD,EAAAA,IAACoD,EAAA,EAAc,EACfpD,EAAAA,IAACuD,EAAA,CACC,MAAM,SACN,MAAOd,EAAQ,QAAU,GACzB,SAAWU,GAAMT,EAAU,SAAUS,CAAC,EACtC,YAAY,uBAAA,CAAA,CACd,CAAA,CACF,CAAA,EAEJ,CAEJ"}
@@ -1,5 +1,5 @@
1
- import{a as m,j as e}from"./vendor-query-B2UbickB.js";import{d as z,h as U,u as H,i as K,b as V}from"./workflows-BaSjfNsd.js";import{F as X,b as Y,a as G}from"./FilterBar-DDIn8TOs.js";import{C as O}from"./ConfirmDeleteModal-D9_1b4MW.js";import{R as D}from"./RolePill-ColM_ynA.js";import{W as Z}from"./WorkflowPill-BXmmLR0t.js";import{P as ee}from"./PageHeader-Ji1AtA4f.js";import{t as te,ap as I,ar as $,av as se,P as L,aw as re,ax as W,y as ne,U as T,X as oe,i as ae,V as ie,C as le}from"./vendor-icons-BX2Vih4L.js";import{c as Q,e as ce,f as de}from"./vendor-react-CXumBFUA.js";import{u as ue}from"./roles-Bs6hUrQJ.js";import{B as me}from"./BotPicker-DmCdoim8.js";import{N as xe}from"./NamespacePill-BlhSWa5S.js";import"./index-DpGeD89g.js";import"./Modal-CSrxpXeM.js";import"./bots-FjzeqLzA.js";function pe({tier:t}){return t==="certified"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-status-success",children:[e.jsx($,{className:"w-3 h-3"}),"Certified"]}):t==="registered"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-secondary",children:[e.jsx(ne,{className:"w-3 h-3"}),"Registered"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-quaternary",children:[e.jsx(I,{className:"w-3 h-3"}),"Durable"]})}function Ue(){const t=Q(),{data:o,isLoading:u}=z(),x=U(),[c,g]=m.useState(""),[s,v]=m.useState(null),[j,k]=m.useState(null),l=o??[],f=m.useMemo(()=>[...new Set(l.map(a=>a.task_queue).filter(Boolean))].sort(),[l]),i=m.useMemo(()=>{const a=c.toLowerCase().trim();return(s?[s]:f).map(p=>({queue:p,workflows:l.filter(b=>{var h;return b.task_queue===p&&(!a||b.workflow_type.toLowerCase().includes(a)||((h=b.description)==null?void 0:h.toLowerCase().includes(a)))})})).filter(p=>p.workflows.length>0)},[l,f,c,s]),d=m.useMemo(()=>{const a=c.toLowerCase().trim();return s?[]:l.filter(w=>{var p;return!w.task_queue&&(!a||w.workflow_type.toLowerCase().includes(a)||((p=w.description)==null?void 0:p.toLowerCase().includes(a)))})},[l,c,s]),r=a=>{a.registered?t(`/workflows/registry/${encodeURIComponent(a.workflow_type)}`):t(`/workflows/registry/new?workflow_type=${encodeURIComponent(a.workflow_type)}&task_queue=${encodeURIComponent(a.task_queue??"")}`)},C=()=>{j&&x.mutate(j,{onSuccess:()=>k(null)})};return e.jsxs("div",{children:[e.jsx(ee,{title:"Registered Workflows",docsHash:"#docs:dashboard.md:workflow-registry",actions:e.jsx("button",{onClick:()=>t("/workflows/registry/new"),className:"btn-primary text-xs",children:"Register Workflow"})}),!u&&f.length>0&&e.jsxs(X,{children:[e.jsx(Y,{label:"Queue",value:s??"",onChange:a=>v(a||null),options:f.map(a=>({value:a,label:a}))}),e.jsx(G,{label:"Search",value:c,onChange:g,placeholder:`${l.length} workflows…`})]}),u?e.jsx(he,{}):i.length===0&&d.length===0?e.jsx("p",{className:"text-sm text-text-tertiary mt-8",children:c||s?"No workflows match your filter.":"No workflows discovered yet."}):e.jsxs("div",{className:"space-y-10",children:[i.map(({queue:a,workflows:w})=>e.jsxs("div",{children:[e.jsxs("div",{className:"sticky top-[60px] z-10 bg-surface flex items-center gap-2 py-2 mb-2 border-b border-surface-border",children:[e.jsx(te,{className:"w-3 h-3 text-accent",strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:a}),e.jsx("span",{className:"text-xs text-text-quaternary",children:w.length})]}),e.jsx(E,{}),e.jsx("div",{className:"divide-y divide-surface-border/30",children:w.map(p=>e.jsx(F,{wf:p,onRowClick:r,onDelete:k,onNavigate:t},p.workflow_type))})]},a)),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"sticky top-[60px] z-10 bg-surface flex items-center gap-2 py-2 mb-2 border-b border-surface-border",children:[e.jsx(I,{className:"w-3 h-3 text-text-quaternary",strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:"No Queue"}),e.jsx("span",{className:"text-xs text-text-quaternary",children:d.length})]}),e.jsx(E,{}),e.jsx("div",{className:"divide-y divide-surface-border/30",children:d.map(a=>e.jsx(F,{wf:a,onRowClick:r,onDelete:k,onNavigate:t},a.workflow_type))})]})]}),e.jsx(O,{open:!!j,onClose:()=>k(null),onConfirm:C,title:"Unregister Workflow",description:e.jsxs(e.Fragment,{children:["Delete the registration for"," ",e.jsx("span",{className:"font-mono font-medium text-text-primary",children:j}),"? This removes its invocation settings, certification, and interceptor treatment; the workflow keeps running as a plain durable workflow. To demote certified → registered instead, open the workflow and uncheck Certify — that keeps every setting."]}),isPending:x.isPending,error:x.error})]})}const J="grid grid-cols-[minmax(0,1fr)_7rem_13rem_4.5rem] gap-x-6";function E(){return e.jsxs("div",{className:`${J} px-3 pb-2 pt-1`,children:[e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Workflow"}),e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Tier"}),e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Access"}),e.jsx("span",{})]})}function F({wf:t,onRowClick:o,onDelete:u,onNavigate:x}){const c=t.roles??[],g=t.invocation_roles??[];return e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(t),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&o(t)},className:`group ${J} py-2 px-3 -mx-3 rounded-md cursor-pointer transition-colors items-center`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Z,{type:t.workflow_type,size:"md",variant:t.tier==="certified"?"certified":t.tier==="registered"?"registered":"durable"}),t.description&&e.jsx("p",{className:"flex-1 min-w-0 truncate text-[10px] text-text-tertiary group-hover:text-text-secondary transition-colors",children:t.description})]}),e.jsx("div",{children:e.jsx(pe,{tier:t.tier??"durable"})}),e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden whitespace-nowrap",children:[c.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{title:"Escalation roles",children:e.jsx($,{className:"w-3 h-3 text-text-quaternary shrink-0"})}),c.map(s=>e.jsx(D,{role:s},`e-${s}`))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{title:"Invocation roles",children:e.jsx(se,{className:"w-3 h-3 text-text-quaternary shrink-0"})}),g.map(s=>e.jsx(D,{role:s},`i-${s}`))]}),c.length===0&&g.length===0&&e.jsx("span",{className:"text-xs text-text-quaternary",children:"—"})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.invocable&&e.jsx("button",{title:"Invoke workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/start?type=${encodeURIComponent(t.workflow_type)}&mode=now`)},className:"text-text-quaternary hover:text-status-success transition-colors",children:e.jsx(L,{className:"w-3.5 h-3.5"})}),t.tier==="durable"&&e.jsx("button",{title:"Configure workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/registry/new?workflow_type=${encodeURIComponent(t.workflow_type)}&task_queue=${encodeURIComponent(t.task_queue??"")}`)},className:"text-text-quaternary hover:text-status-info transition-colors",children:e.jsx(I,{className:"w-3.5 h-3.5"})}),t.tier==="registered"&&e.jsx("button",{title:"Certify workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/registry/${encodeURIComponent(t.workflow_type)}`)},className:"text-text-quaternary hover:text-status-success transition-colors",children:e.jsx(re,{className:"w-3.5 h-3.5"})}),t.registered&&e.jsx("button",{title:"Unregister workflow",onClick:s=>{s.stopPropagation(),u(t.workflow_type)},className:"text-text-quaternary hover:text-status-warning transition-colors",children:e.jsx(W,{className:"w-3.5 h-3.5"})})]})]})}function he(){return e.jsx("div",{className:"animate-pulse space-y-8 mt-4",children:[1,2].map(t=>e.jsxs("div",{children:[e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-36 mb-4"}),e.jsx("div",{className:"space-y-4",children:[1,2,3].map(o=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-full"})]},o))})]},t))})}function fe({selected:t,onChange:o,single:u,placeholder:x}){const{data:c}=ue(),g=(c==null?void 0:c.roles)??[],[s,v]=m.useState(!1),j=m.useRef(null);m.useEffect(()=>{const i=d=>{j.current&&!j.current.contains(d.target)&&v(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);const k=i=>{u?(o(t.includes(i)?[]:[i]),v(!1)):o(t.includes(i)?t.filter(d=>d!==i):[...t,i])},l=i=>{o(t.filter(d=>d!==i))},f=x??(u?"Select role...":"Add roles...");return e.jsxs("div",{ref:j,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>v(!s),className:"flex flex-wrap items-center gap-1.5 w-full min-h-[34px] px-2 py-1.5 bg-surface-sunken border border-surface-border rounded-md text-left cursor-pointer hover:border-accent/40 transition-colors focus:ring-1 focus:ring-accent focus:outline-none",children:[t.length===0&&e.jsx("span",{className:"text-xs text-text-tertiary",children:f}),t.map(i=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-accent/[0.08] text-text-secondary text-[11px]",children:[e.jsx(T,{className:"w-2.5 h-2.5 shrink-0 text-accent/75"}),i,e.jsx("span",{role:"button",onClick:d=>{d.stopPropagation(),l(i)},className:"ml-0.5 hover:text-status-error transition-colors",children:e.jsx(oe,{className:"w-2.5 h-2.5"})})]},i)),e.jsx(ae,{className:`w-3.5 h-3.5 ml-auto shrink-0 text-text-tertiary transition-transform ${s?"rotate-180":""}`})]}),s&&e.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white border border-surface-border rounded-md shadow-lg max-h-48 overflow-y-auto",children:g.length===0?e.jsx("p",{className:"px-3 py-2 text-xs text-text-tertiary",children:"No roles defined"}):g.map(i=>{const d=t.includes(i);return e.jsxs("button",{type:"button",onClick:()=>k(i),className:`flex items-center gap-2 w-full px-3 py-1.5 text-left text-xs transition-colors ${d?"bg-accent/[0.06] text-accent":"text-text-primary hover:bg-surface-sunken"}`,children:[e.jsx(T,{className:"w-3 h-3 shrink-0 text-accent/60"}),e.jsx("span",{className:"flex-1",children:i}),d&&e.jsx(ie,{className:"w-3 h-3 shrink-0"})]},i)})})]})}function S(t){return t.split(",").map(o=>o.trim()).filter(Boolean)}const R={workflow_type:"",description:"",task_queue:"",default_role:"reviewer",invocable:!1,roles:"",invocation_roles:"",consumes:"",envelope_schema:"",resolver_schema:"",cron_schedule:"",execute_as:"",certified:!1};function we(t){const o=(t.roles??[]).join(", "),u=(t.consumes??[]).join(", ");return{workflow_type:t.workflow_type,description:t.description??"",task_queue:t.task_queue??"",default_role:t.default_role,invocable:t.invocable,roles:o,invocation_roles:(t.invocation_roles??[]).join(", "),consumes:u,envelope_schema:t.envelope_schema?JSON.stringify(t.envelope_schema,null,2):"",resolver_schema:t.resolver_schema?JSON.stringify(t.resolver_schema,null,2):"",cron_schedule:t.cron_schedule??"",execute_as:t.execute_as??"",certified:t.certified}}function q(t){if(!t.trim())return!0;try{return JSON.parse(t),!0}catch{return!1}}function P({icon:t,color:o,children:u}){return e.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-2 border-b border-surface-border",children:[e.jsx(t,{className:`w-4 h-4 ${o}`,strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:u})]})}function _({label:t,hint:o,children:u}){return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"label",children:t}),u,o&&e.jsx("p",{className:"hint",children:o})]})}const ge="input-json w-full";function je(t){return S(t)}function ve(t){return t.join(", ")}const ke=new Set(["mcpQuery","mcpDeterministic","mcpQueryRouter","mcpTriage","mcpTriageRouter","mcpTriageDeterministic","insightQuery"]);function Oe(){const{workflowType:t}=ce(),o=!t,u=Q(),[x]=de(),{data:c,isLoading:g}=H(),s=K(),v=U(),[j,k]=m.useState(!1),l=(c==null?void 0:c.find(n=>n.workflow_type===t))??null,{data:f}=V({limit:500}),i=m.useMemo(()=>{const n=new Set((c??[]).map(N=>N.workflow_type));return[...new Set(((f==null?void 0:f.jobs)??[]).map(N=>N.entity))].filter(N=>!n.has(N)&&!ke.has(N)).sort()},[c,f]),d=m.useMemo(()=>{if(!o)return R;const n=x.get("workflow_type")??"",y=x.get("task_queue")??"";return n||y?{...R,workflow_type:n,task_queue:y}:R},[o,x]),[r,C]=m.useState(d),[a,w]=m.useState(""),[p,b]=m.useState(!1),h=m.useCallback((n,y)=>C(N=>({...N,[n]:y})),[]);m.useEffect(()=>{if(!p){if(o){C(d),b(!0);return}l&&(C(we(l)),b(!0))}},[l,o,p,d]);const M=()=>{if(!r.workflow_type.trim())return;w("");let n=null,y=null;try{r.envelope_schema.trim()&&(n=JSON.parse(r.envelope_schema))}catch{w("Invalid JSON in Envelope Schema");return}try{r.resolver_schema.trim()&&(y=JSON.parse(r.resolver_schema))}catch{w("Invalid JSON in Resolver Schema");return}s.mutate({workflow_type:r.workflow_type.trim(),description:r.description.trim()||null,task_queue:r.task_queue.trim()||null,default_role:r.default_role.trim()||"reviewer",invocable:r.invocable,certified:r.certified,roles:S(r.roles),invocation_roles:S(r.invocation_roles),consumes:S(r.consumes),envelope_schema:n,resolver_schema:y,cron_schedule:r.cron_schedule.trim()||null,execute_as:r.execute_as.trim()||null},{onSuccess:()=>u("/workflows/registry")})};if(g)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-64"}),e.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]});if(!o&&!l)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Config not found."});const A=!!r.workflow_type.trim()&&q(r.envelope_schema)&&q(r.resolver_schema),B=o&&!r.workflow_type&&i.length>0;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-light font-mono text-text-primary",children:o?"New Workflow":(l==null?void 0:l.workflow_type)??""}),l&&e.jsx("div",{className:"flex items-center gap-2 mt-2",children:e.jsx(xe,{namespace:"durable"})})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx("button",{onClick:()=>u("/workflows/registry"),className:"btn-ghost text-xs",children:"Cancel"}),e.jsx("button",{onClick:M,disabled:!A||s.isPending,className:"btn-primary text-xs",children:s.isPending?"Saving…":o?"Register":"Save"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-x-14 gap-y-10",children:[e.jsxs("div",{children:[e.jsx(P,{icon:le,color:"text-accent",children:"Identity"}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(_,{label:"Workflow Type",hint:"Register a workflow to configure invocation and HITL escalation routing.",children:B?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Select a durable workflow to register:"}),e.jsx("div",{className:"grid gap-1",children:i.map(n=>e.jsx("button",{onClick:()=>h("workflow_type",n),className:"flex items-center gap-2 px-3 py-2 text-left text-xs font-mono rounded-md border border-surface-border hover:border-accent/50 hover:bg-accent/[0.04] transition-colors",children:n},n))}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx("span",{className:"text-[10px] text-text-tertiary",children:"or"}),e.jsx("input",{type:"text",onChange:n=>h("workflow_type",n.target.value),placeholder:"Enter type manually",className:"input font-mono flex-1"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",value:r.workflow_type,onChange:n=>h("workflow_type",n.target.value),disabled:!o,placeholder:"reviewContent",className:"input font-mono w-full"}),o&&r.workflow_type&&i.length>0&&e.jsx("button",{onClick:()=>h("workflow_type",""),className:"text-[10px] text-accent hover:underline mt-1",children:"Choose from durable workflows"})]})}),e.jsx(_,{label:"Description",children:e.jsx("input",{type:"text",value:r.description,onChange:n=>h("description",n.target.value),placeholder:"Describe what this workflow does",className:"input text-xs w-full"})}),e.jsx(_,{label:"Task Queue",hint:"Durable task queue this workflow listens on.",children:e.jsx("input",{type:"text",value:r.task_queue,onChange:n=>h("task_queue",n.target.value),placeholder:"lt-review",className:"input font-mono w-full"})})]})]}),e.jsxs("div",{children:[e.jsx(P,{icon:L,color:"text-accent",children:"Invocation"}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.invocable,onChange:n=>h("invocable",n.target.checked),className:"w-4 h-4 rounded border-border accent-accent"}),e.jsx("span",{className:"text-xs text-text-primary font-medium",children:"Invocable"})]}),e.jsx("p",{className:"hint",children:"Allow this workflow to be started from the dashboard or API."})]}),r.invocable?e.jsxs(e.Fragment,{children:[e.jsx(_,{label:"Run As",hint:"Bot identity to run under. Default runs as the invoking user.",children:e.jsx(me,{selected:r.execute_as,onChange:n=>h("execute_as",n)})}),e.jsx(_,{label:"Invocation Roles",hint:"Only users with these roles can start this workflow. Empty = all authenticated users.",children:e.jsx(fe,{selected:je(r.invocation_roles),onChange:n=>h("invocation_roles",ve(n)),placeholder:"Select roles…"})}),e.jsxs(_,{label:"Envelope Schema",hint:e.jsxs(e.Fragment,{children:["Pre-fills the JSON editor when invoking. Include ",e.jsx("code",{className:"font-mono",children:"data"})," (input) and optional ",e.jsx("code",{className:"font-mono",children:"metadata"}),"."]}),children:[e.jsx("textarea",{value:r.envelope_schema,onChange:n=>h("envelope_schema",n.target.value),placeholder:`{
1
+ import{a as m,j as e}from"./vendor-query-B2UbickB.js";import{d as B,h as U,u as H,i as Y,b as K}from"./workflows-B0djSSvg.js";import{F as X,b as G,a as V}from"./FilterBar-DDIn8TOs.js";import{C as O}from"./ConfirmDeleteModal-D9_1b4MW.js";import{R as D}from"./RolePill-CUIJSgRq.js";import{W as Z}from"./WorkflowPill-S6VV2Eax.js";import{P as ee}from"./PageHeader-CiFhzGc0.js";import{u as te,aq as I,as as $,aw as se,P as L,ax as re,ay as W,z as ne,U as T,X as oe,j as ae,Y as ie,C as le}from"./vendor-icons-DPmIjhZB.js";import{c as Q,e as ce,f as de}from"./vendor-react-CXumBFUA.js";import{u as ue}from"./roles-BO-4Ieun.js";import{B as me}from"./BotPicker-Bpglj7RE.js";import{N as xe}from"./NamespacePill--ikKtMvx.js";import"./index-DYcP4jyl.js";import"./Modal-CSrxpXeM.js";import"./bots-BiS_mYcH.js";function pe({tier:t}){return t==="certified"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-status-success",children:[e.jsx($,{className:"w-3 h-3"}),"Certified"]}):t==="registered"?e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-secondary",children:[e.jsx(ne,{className:"w-3 h-3"}),"Registered"]}):e.jsxs("span",{className:"inline-flex items-center gap-1 text-[10px] font-medium text-text-quaternary",children:[e.jsx(I,{className:"w-3 h-3"}),"Durable"]})}function Ue(){const t=Q(),{data:o,isLoading:u}=B(),x=U(),[c,g]=m.useState(""),[s,v]=m.useState(null),[j,k]=m.useState(null),l=o??[],f=m.useMemo(()=>[...new Set(l.map(a=>a.task_queue).filter(Boolean))].sort(),[l]),i=m.useMemo(()=>{const a=c.toLowerCase().trim();return(s?[s]:f).map(p=>({queue:p,workflows:l.filter(b=>{var h;return b.task_queue===p&&(!a||b.workflow_type.toLowerCase().includes(a)||((h=b.description)==null?void 0:h.toLowerCase().includes(a)))})})).filter(p=>p.workflows.length>0)},[l,f,c,s]),d=m.useMemo(()=>{const a=c.toLowerCase().trim();return s?[]:l.filter(w=>{var p;return!w.task_queue&&(!a||w.workflow_type.toLowerCase().includes(a)||((p=w.description)==null?void 0:p.toLowerCase().includes(a)))})},[l,c,s]),r=a=>{a.registered?t(`/workflows/registry/${encodeURIComponent(a.workflow_type)}`):t(`/workflows/registry/new?workflow_type=${encodeURIComponent(a.workflow_type)}&task_queue=${encodeURIComponent(a.task_queue??"")}`)},C=()=>{j&&x.mutate(j,{onSuccess:()=>k(null)})};return e.jsxs("div",{children:[e.jsx(ee,{title:"Registered Workflows",docsHash:"#docs:dashboard.md:workflow-registry",actions:e.jsx("button",{onClick:()=>t("/workflows/registry/new"),className:"btn-primary text-xs",children:"Register Workflow"})}),!u&&f.length>0&&e.jsxs(X,{children:[e.jsx(G,{label:"Queue",value:s??"",onChange:a=>v(a||null),options:f.map(a=>({value:a,label:a}))}),e.jsx(V,{label:"Search",value:c,onChange:g,placeholder:`${l.length} workflows…`})]}),u?e.jsx(he,{}):i.length===0&&d.length===0?e.jsx("p",{className:"text-sm text-text-tertiary mt-8",children:c||s?"No workflows match your filter.":"No workflows discovered yet."}):e.jsxs("div",{className:"space-y-10",children:[i.map(({queue:a,workflows:w})=>e.jsxs("div",{children:[e.jsxs("div",{className:"sticky top-[60px] z-10 bg-surface flex items-center gap-2 py-2 mb-2 border-b border-surface-border",children:[e.jsx(te,{className:"w-3 h-3 text-accent",strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:a}),e.jsx("span",{className:"text-xs text-text-quaternary",children:w.length})]}),e.jsx(E,{}),e.jsx("div",{className:"divide-y divide-surface-border/30",children:w.map(p=>e.jsx(F,{wf:p,onRowClick:r,onDelete:k,onNavigate:t},p.workflow_type))})]},a)),d.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"sticky top-[60px] z-10 bg-surface flex items-center gap-2 py-2 mb-2 border-b border-surface-border",children:[e.jsx(I,{className:"w-3 h-3 text-text-quaternary",strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:"No Queue"}),e.jsx("span",{className:"text-xs text-text-quaternary",children:d.length})]}),e.jsx(E,{}),e.jsx("div",{className:"divide-y divide-surface-border/30",children:d.map(a=>e.jsx(F,{wf:a,onRowClick:r,onDelete:k,onNavigate:t},a.workflow_type))})]})]}),e.jsx(O,{open:!!j,onClose:()=>k(null),onConfirm:C,title:"Unregister Workflow",description:e.jsxs(e.Fragment,{children:["Delete the registration for"," ",e.jsx("span",{className:"font-mono font-medium text-text-primary",children:j}),"? This removes its invocation settings, certification, and interceptor treatment; the workflow keeps running as a plain durable workflow. To demote certified → registered instead, open the workflow and uncheck Certify — that keeps every setting."]}),isPending:x.isPending,error:x.error})]})}const J="grid grid-cols-[minmax(0,1fr)_7rem_13rem_4.5rem] gap-x-6";function E(){return e.jsxs("div",{className:`${J} px-3 pb-2 pt-1`,children:[e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Workflow"}),e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Tier"}),e.jsx("span",{className:"text-[10px] font-medium text-text-quaternary",children:"Access"}),e.jsx("span",{})]})}function F({wf:t,onRowClick:o,onDelete:u,onNavigate:x}){const c=t.roles??[],g=t.invocation_roles??[];return e.jsxs("div",{role:"button",tabIndex:0,onClick:()=>o(t),onKeyDown:s=>{(s.key==="Enter"||s.key===" ")&&o(t)},className:`group ${J} py-2 px-3 -mx-3 rounded-md cursor-pointer transition-colors items-center`,children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0",children:[e.jsx(Z,{type:t.workflow_type,size:"md",variant:t.tier==="certified"?"certified":t.tier==="registered"?"registered":"durable"}),t.description&&e.jsx("p",{className:"flex-1 min-w-0 truncate text-[10px] text-text-tertiary group-hover:text-text-secondary transition-colors",children:t.description})]}),e.jsx("div",{children:e.jsx(pe,{tier:t.tier??"durable"})}),e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0 overflow-hidden whitespace-nowrap",children:[c.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{title:"Escalation roles",children:e.jsx($,{className:"w-3 h-3 text-text-quaternary shrink-0"})}),c.map(s=>e.jsx(D,{role:s},`e-${s}`))]}),g.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("span",{title:"Invocation roles",children:e.jsx(se,{className:"w-3 h-3 text-text-quaternary shrink-0"})}),g.map(s=>e.jsx(D,{role:s},`i-${s}`))]}),c.length===0&&g.length===0&&e.jsx("span",{className:"text-xs text-text-quaternary",children:"—"})]}),e.jsxs("div",{className:"flex items-center justify-end gap-2.5 opacity-0 group-hover:opacity-100 transition-opacity",children:[t.invocable&&e.jsx("button",{title:"Invoke workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/start?type=${encodeURIComponent(t.workflow_type)}&mode=now`)},className:"text-text-quaternary hover:text-status-success transition-colors",children:e.jsx(L,{className:"w-3.5 h-3.5"})}),t.tier==="durable"&&e.jsx("button",{title:"Configure workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/registry/new?workflow_type=${encodeURIComponent(t.workflow_type)}&task_queue=${encodeURIComponent(t.task_queue??"")}`)},className:"text-text-quaternary hover:text-status-info transition-colors",children:e.jsx(I,{className:"w-3.5 h-3.5"})}),t.tier==="registered"&&e.jsx("button",{title:"Certify workflow",onClick:s=>{s.stopPropagation(),x(`/workflows/registry/${encodeURIComponent(t.workflow_type)}`)},className:"text-text-quaternary hover:text-status-success transition-colors",children:e.jsx(re,{className:"w-3.5 h-3.5"})}),t.registered&&e.jsx("button",{title:"Unregister workflow",onClick:s=>{s.stopPropagation(),u(t.workflow_type)},className:"text-text-quaternary hover:text-status-warning transition-colors",children:e.jsx(W,{className:"w-3.5 h-3.5"})})]})]})}function he(){return e.jsx("div",{className:"animate-pulse space-y-8 mt-4",children:[1,2].map(t=>e.jsxs("div",{children:[e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-36 mb-4"}),e.jsx("div",{className:"space-y-4",children:[1,2,3].map(o=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-3 bg-surface-sunken rounded w-full"})]},o))})]},t))})}function fe({selected:t,onChange:o,single:u,placeholder:x}){const{data:c}=ue(),g=(c==null?void 0:c.roles)??[],[s,v]=m.useState(!1),j=m.useRef(null);m.useEffect(()=>{const i=d=>{j.current&&!j.current.contains(d.target)&&v(!1)};return document.addEventListener("mousedown",i),()=>document.removeEventListener("mousedown",i)},[]);const k=i=>{u?(o(t.includes(i)?[]:[i]),v(!1)):o(t.includes(i)?t.filter(d=>d!==i):[...t,i])},l=i=>{o(t.filter(d=>d!==i))},f=x??(u?"Select role...":"Add roles...");return e.jsxs("div",{ref:j,className:"relative",children:[e.jsxs("button",{type:"button",onClick:()=>v(!s),className:"flex flex-wrap items-center gap-1.5 w-full min-h-[34px] px-2 py-1.5 bg-surface-sunken border border-surface-border rounded-md text-left cursor-pointer hover:border-accent/40 transition-colors focus:ring-1 focus:ring-accent focus:outline-none",children:[t.length===0&&e.jsx("span",{className:"text-xs text-text-tertiary",children:f}),t.map(i=>e.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-lg bg-accent/[0.08] text-text-secondary text-[11px]",children:[e.jsx(T,{className:"w-2.5 h-2.5 shrink-0 text-accent/75"}),i,e.jsx("span",{role:"button",onClick:d=>{d.stopPropagation(),l(i)},className:"ml-0.5 hover:text-status-error transition-colors",children:e.jsx(oe,{className:"w-2.5 h-2.5"})})]},i)),e.jsx(ae,{className:`w-3.5 h-3.5 ml-auto shrink-0 text-text-tertiary transition-transform ${s?"rotate-180":""}`})]}),s&&e.jsx("div",{className:"absolute z-20 mt-1 w-full bg-white border border-surface-border rounded-md shadow-lg max-h-48 overflow-y-auto",children:g.length===0?e.jsx("p",{className:"px-3 py-2 text-xs text-text-tertiary",children:"No roles defined"}):g.map(i=>{const d=t.includes(i);return e.jsxs("button",{type:"button",onClick:()=>k(i),className:`flex items-center gap-2 w-full px-3 py-1.5 text-left text-xs transition-colors ${d?"bg-accent/[0.06] text-accent":"text-text-primary hover:bg-surface-sunken"}`,children:[e.jsx(T,{className:"w-3 h-3 shrink-0 text-accent/60"}),e.jsx("span",{className:"flex-1",children:i}),d&&e.jsx(ie,{className:"w-3 h-3 shrink-0"})]},i)})})]})}function S(t){return t.split(",").map(o=>o.trim()).filter(Boolean)}const R={workflow_type:"",description:"",task_queue:"",default_role:"reviewer",invocable:!1,roles:"",invocation_roles:"",consumes:"",envelope_schema:"",resolver_schema:"",cron_schedule:"",execute_as:"",certified:!1};function we(t){const o=(t.roles??[]).join(", "),u=(t.consumes??[]).join(", ");return{workflow_type:t.workflow_type,description:t.description??"",task_queue:t.task_queue??"",default_role:t.default_role,invocable:t.invocable,roles:o,invocation_roles:(t.invocation_roles??[]).join(", "),consumes:u,envelope_schema:t.envelope_schema?JSON.stringify(t.envelope_schema,null,2):"",resolver_schema:t.resolver_schema?JSON.stringify(t.resolver_schema,null,2):"",cron_schedule:t.cron_schedule??"",execute_as:t.execute_as??"",certified:t.certified}}function q(t){if(!t.trim())return!0;try{return JSON.parse(t),!0}catch{return!1}}function P({icon:t,color:o,children:u}){return e.jsxs("div",{className:"flex items-center gap-2 mb-4 pb-2 border-b border-surface-border",children:[e.jsx(t,{className:`w-4 h-4 ${o}`,strokeWidth:1.5}),e.jsx("h2",{className:"section-h2",children:u})]})}function _({label:t,hint:o,children:u}){return e.jsxs("div",{className:"space-y-1.5",children:[e.jsx("label",{className:"label",children:t}),u,o&&e.jsx("p",{className:"hint",children:o})]})}const ge="input-json w-full";function je(t){return S(t)}function ve(t){return t.join(", ")}const ke=new Set(["mcpQuery","mcpDeterministic","mcpQueryRouter","mcpTriage","mcpTriageRouter","mcpTriageDeterministic","insightQuery"]);function Oe(){const{workflowType:t}=ce(),o=!t,u=Q(),[x]=de(),{data:c,isLoading:g}=H(),s=Y(),v=U(),[j,k]=m.useState(!1),l=(c==null?void 0:c.find(n=>n.workflow_type===t))??null,{data:f}=K({limit:500}),i=m.useMemo(()=>{const n=new Set((c??[]).map(N=>N.workflow_type));return[...new Set(((f==null?void 0:f.jobs)??[]).map(N=>N.entity))].filter(N=>!n.has(N)&&!ke.has(N)).sort()},[c,f]),d=m.useMemo(()=>{if(!o)return R;const n=x.get("workflow_type")??"",y=x.get("task_queue")??"";return n||y?{...R,workflow_type:n,task_queue:y}:R},[o,x]),[r,C]=m.useState(d),[a,w]=m.useState(""),[p,b]=m.useState(!1),h=m.useCallback((n,y)=>C(N=>({...N,[n]:y})),[]);m.useEffect(()=>{if(!p){if(o){C(d),b(!0);return}l&&(C(we(l)),b(!0))}},[l,o,p,d]);const M=()=>{if(!r.workflow_type.trim())return;w("");let n=null,y=null;try{r.envelope_schema.trim()&&(n=JSON.parse(r.envelope_schema))}catch{w("Invalid JSON in Envelope Schema");return}try{r.resolver_schema.trim()&&(y=JSON.parse(r.resolver_schema))}catch{w("Invalid JSON in Resolver Schema");return}s.mutate({workflow_type:r.workflow_type.trim(),description:r.description.trim()||null,task_queue:r.task_queue.trim()||null,default_role:r.default_role.trim()||"reviewer",invocable:r.invocable,certified:r.certified,roles:S(r.roles),invocation_roles:S(r.invocation_roles),consumes:S(r.consumes),envelope_schema:n,resolver_schema:y,cron_schedule:r.cron_schedule.trim()||null,execute_as:r.execute_as.trim()||null},{onSuccess:()=>u("/workflows/registry")})};if(g)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-64"}),e.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]});if(!o&&!l)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Config not found."});const z=!!r.workflow_type.trim()&&q(r.envelope_schema)&&q(r.resolver_schema),A=o&&!r.workflow_type&&i.length>0;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-start justify-between mb-8",children:[e.jsxs("div",{children:[e.jsx("h1",{className:"text-3xl font-light font-mono text-text-primary",children:o?"New Workflow":(l==null?void 0:l.workflow_type)??""}),l&&e.jsx("div",{className:"flex items-center gap-2 mt-2",children:e.jsx(xe,{namespace:"durable"})})]}),e.jsxs("div",{className:"flex items-center gap-3 mt-1",children:[e.jsx("button",{onClick:()=>u("/workflows/registry"),className:"btn-ghost text-xs",children:"Cancel"}),e.jsx("button",{onClick:M,disabled:!z||s.isPending,className:"btn-primary text-xs",children:s.isPending?"Saving…":o?"Register":"Save"})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-x-14 gap-y-10",children:[e.jsxs("div",{children:[e.jsx(P,{icon:le,color:"text-accent",children:"Identity"}),e.jsxs("div",{className:"space-y-5",children:[e.jsx(_,{label:"Workflow Type",hint:"Register a workflow to configure invocation and HITL escalation routing.",children:A?e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-xs text-text-secondary",children:"Select a durable workflow to register:"}),e.jsx("div",{className:"grid gap-1",children:i.map(n=>e.jsx("button",{onClick:()=>h("workflow_type",n),className:"flex items-center gap-2 px-3 py-2 text-left text-xs font-mono rounded-md border border-surface-border hover:border-accent/50 hover:bg-accent/[0.04] transition-colors",children:n},n))}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx("span",{className:"text-[10px] text-text-tertiary",children:"or"}),e.jsx("input",{type:"text",onChange:n=>h("workflow_type",n.target.value),placeholder:"Enter type manually",className:"input font-mono flex-1"})]})]}):e.jsxs(e.Fragment,{children:[e.jsx("input",{type:"text",value:r.workflow_type,onChange:n=>h("workflow_type",n.target.value),disabled:!o,placeholder:"reviewContent",className:"input font-mono w-full"}),o&&r.workflow_type&&i.length>0&&e.jsx("button",{onClick:()=>h("workflow_type",""),className:"text-[10px] text-accent hover:underline mt-1",children:"Choose from durable workflows"})]})}),e.jsx(_,{label:"Description",children:e.jsx("input",{type:"text",value:r.description,onChange:n=>h("description",n.target.value),placeholder:"Describe what this workflow does",className:"input text-xs w-full"})}),e.jsx(_,{label:"Task Queue",hint:"Durable task queue this workflow listens on.",children:e.jsx("input",{type:"text",value:r.task_queue,onChange:n=>h("task_queue",n.target.value),placeholder:"lt-review",className:"input font-mono w-full"})})]})]}),e.jsxs("div",{children:[e.jsx(P,{icon:L,color:"text-accent",children:"Invocation"}),e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:r.invocable,onChange:n=>h("invocable",n.target.checked),className:"w-4 h-4 rounded border-border accent-accent"}),e.jsx("span",{className:"text-xs text-text-primary font-medium",children:"Invocable"})]}),e.jsx("p",{className:"hint",children:"Allow this workflow to be started from the dashboard or API."})]}),r.invocable?e.jsxs(e.Fragment,{children:[e.jsx(_,{label:"Run As",hint:"Bot identity to run under. Default runs as the invoking user.",children:e.jsx(me,{selected:r.execute_as,onChange:n=>h("execute_as",n)})}),e.jsx(_,{label:"Invocation Roles",hint:"Only users with these roles can start this workflow. Empty = all authenticated users.",children:e.jsx(fe,{selected:je(r.invocation_roles),onChange:n=>h("invocation_roles",ve(n)),placeholder:"Select roles…"})}),e.jsxs(_,{label:"Envelope Schema",hint:e.jsxs(e.Fragment,{children:["Pre-fills the JSON editor when invoking. Include ",e.jsx("code",{className:"font-mono",children:"data"})," (input) and optional ",e.jsx("code",{className:"font-mono",children:"metadata"}),"."]}),children:[e.jsx("textarea",{value:r.envelope_schema,onChange:n=>h("envelope_schema",n.target.value),placeholder:`{
2
2
  "data": {},
3
3
  "metadata": {}
4
4
  }`,className:ge,rows:8,spellCheck:!1}),r.envelope_schema.trim()&&!q(r.envelope_schema)&&e.jsx("p",{className:"text-[10px] text-status-error mt-1",children:"Invalid JSON"})]})]}):e.jsxs("p",{className:"text-[11px] text-text-tertiary py-2",children:["Enable ",e.jsx("span",{className:"font-medium text-text-secondary",children:"Invocable"})," to configure invocation roles and an input template."]})]})]}),l&&e.jsxs("div",{children:[e.jsx(P,{icon:W,color:"text-text-tertiary",children:"Registration"}),e.jsxs("button",{onClick:()=>k(!0),className:"flex items-center gap-1.5 text-[11px] text-status-warning hover:underline",title:"Delete this registration — the workflow returns to plain durable",children:[e.jsx(W,{className:"w-3 h-3"})," Unregister workflow"]})]})]}),(a||s.error)&&e.jsx("p",{className:"text-xs text-status-error mt-8",children:a||s.error.message}),e.jsx(O,{open:j,onClose:()=>k(!1),onConfirm:()=>v.mutate(l.workflow_type,{onSuccess:()=>u("/workflows/registry")}),title:"Unregister Workflow",description:e.jsxs(e.Fragment,{children:["Delete the registration for"," ",e.jsx("span",{className:"font-mono font-medium text-text-primary",children:l==null?void 0:l.workflow_type}),"? This removes its invocation settings, certification, and interceptor treatment; the workflow keeps running as a plain durable workflow. Escalation schemas versioned on roles are untouched."]}),isPending:v.isPending,error:v.error})]})}export{Oe as WorkflowConfigDetailPage,Ue as WorkflowConfigsPage};
5
- //# sourceMappingURL=index-DzIB5CaR.js.map
5
+ //# sourceMappingURL=index-3ewF-RsR.js.map