@hotmeshio/long-tail 0.7.5 → 0.8.1

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 (364) hide show
  1. package/build/api/workflows/config.d.ts +7 -1
  2. package/build/api/workflows/config.js +7 -1
  3. package/build/api/workflows/discovery.js +1 -4
  4. package/build/lib/db/schemas/020_workflow_certified.sql +34 -0
  5. package/build/modules/ltconfig.d.ts +3 -2
  6. package/build/modules/ltconfig.js +4 -4
  7. package/build/routes/workflows/config.js +1 -0
  8. package/build/services/config/cache.js +1 -0
  9. package/build/services/config/read.js +2 -0
  10. package/build/services/config/sql.d.ts +2 -2
  11. package/build/services/config/sql.js +6 -5
  12. package/build/services/config/write.js +13 -0
  13. package/build/services/escalation/bulk.d.ts +3 -1
  14. package/build/services/escalation/bulk.js +3 -1
  15. package/build/services/escalation/crud.d.ts +4 -3
  16. package/build/services/escalation/crud.js +4 -3
  17. package/build/start/workers.js +1 -0
  18. package/build/system/mcp-servers/admin/schemas.d.ts +3 -0
  19. package/build/system/mcp-servers/admin/schemas.js +3 -1
  20. package/build/system/mcp-servers/admin/workflow-config.js +1 -0
  21. package/build/types/config.d.ts +16 -0
  22. package/build/types/startup.d.ts +11 -1
  23. package/dashboard/dist/assets/AdminDashboard-Ck5-jV9T.js +2 -0
  24. package/dashboard/dist/assets/{AdminDashboard-Bgomc_jH.js.map → AdminDashboard-Ck5-jV9T.js.map} +1 -1
  25. package/dashboard/dist/assets/AgentConfigPage-DFiXRBWs.js +16 -0
  26. package/dashboard/dist/assets/AgentConfigPage-DFiXRBWs.js.map +1 -0
  27. package/dashboard/dist/assets/AgentDetailPage-BBgM_pMe.js +4 -0
  28. package/dashboard/dist/assets/AgentDetailPage-BBgM_pMe.js.map +1 -0
  29. package/dashboard/dist/assets/AgentsPage-DxwFuedf.js +2 -0
  30. package/dashboard/dist/assets/AgentsPage-DxwFuedf.js.map +1 -0
  31. package/dashboard/dist/assets/AvailableEscalationsPage-DNQbeIcn.js +2 -0
  32. package/dashboard/dist/assets/{AvailableEscalationsPage-C9DAtNGp.js.map → AvailableEscalationsPage-DNQbeIcn.js.map} +1 -1
  33. package/dashboard/dist/assets/BotPicker-mqwKVOE3.js +2 -0
  34. package/dashboard/dist/assets/{BotPicker-MnI3OyE7.js.map → BotPicker-mqwKVOE3.js.map} +1 -1
  35. package/dashboard/dist/assets/CapabilitiesPage-Biffm0kW.js +2 -0
  36. package/dashboard/dist/assets/CapabilitiesPage-Biffm0kW.js.map +1 -0
  37. package/dashboard/dist/assets/CollapsibleSection-Bn6Ks79X.js +2 -0
  38. package/dashboard/dist/assets/{CollapsibleSection-Ne-Q3QFM.js.map → CollapsibleSection-Bn6Ks79X.js.map} +1 -1
  39. package/dashboard/dist/assets/ConfirmDeleteModal-no0-c_1G.js +2 -0
  40. package/dashboard/dist/assets/{ConfirmDeleteModal-D9_1b4MW.js.map → ConfirmDeleteModal-no0-c_1G.js.map} +1 -1
  41. package/dashboard/dist/assets/CopyableId-DS6IDMIX.js +2 -0
  42. package/dashboard/dist/assets/{CopyableId-blg-gZvT.js.map → CopyableId-DS6IDMIX.js.map} +1 -1
  43. package/dashboard/dist/assets/CredentialsPage-C3NyncEB.js +2 -0
  44. package/dashboard/dist/assets/CredentialsPage-C3NyncEB.js.map +1 -0
  45. package/dashboard/dist/assets/CronLabel-DQWBx57H.js +2 -0
  46. package/dashboard/dist/assets/CronLabel-DQWBx57H.js.map +1 -0
  47. package/dashboard/dist/assets/CustomDurationPicker-DV42oZ1G.js +2 -0
  48. package/dashboard/dist/assets/{CustomDurationPicker-Cp1fgzPX.js.map → CustomDurationPicker-DV42oZ1G.js.map} +1 -1
  49. package/dashboard/dist/assets/DataTable-Bf4dgxll.js +2 -0
  50. package/dashboard/dist/assets/{DataTable-ZWgVQg7F.js.map → DataTable-Bf4dgxll.js.map} +1 -1
  51. package/dashboard/dist/assets/DropZone-CTSXBb3c.js +2 -0
  52. package/dashboard/dist/assets/{DropZone-CZDmNBn-.js.map → DropZone-CTSXBb3c.js.map} +1 -1
  53. package/dashboard/dist/assets/ElapsedCell-roy4G5SQ.js +2 -0
  54. package/dashboard/dist/assets/{ElapsedCell-Gr5UlUbn.js.map → ElapsedCell-roy4G5SQ.js.map} +1 -1
  55. package/dashboard/dist/assets/EmptyState-CLVm9KmA.js +2 -0
  56. package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-CLVm9KmA.js.map} +1 -1
  57. package/dashboard/dist/assets/EscalationSchemaPage-DulCCxea.js +9 -0
  58. package/dashboard/dist/assets/EscalationSchemaPage-DulCCxea.js.map +1 -0
  59. package/dashboard/dist/assets/EscalationsOverview-DDwxn_mT.js +2 -0
  60. package/dashboard/dist/assets/{EscalationsOverview-BIZVnSBF.js.map → EscalationsOverview-DDwxn_mT.js.map} +1 -1
  61. package/dashboard/dist/assets/EventTable-BaLNvCew.js +2 -0
  62. package/dashboard/dist/assets/EventTable-BaLNvCew.js.map +1 -0
  63. package/dashboard/dist/assets/FilterBar-DEAbNQqp.js +2 -0
  64. package/dashboard/dist/assets/FilterBar-DEAbNQqp.js.map +1 -0
  65. package/dashboard/dist/assets/GraphInvokePage-BmM8r0R3.js +2 -0
  66. package/dashboard/dist/assets/GraphInvokePage-BmM8r0R3.js.map +1 -0
  67. package/dashboard/dist/assets/HomePage-Ds3PzWWr.js +2 -0
  68. package/dashboard/dist/assets/HomePage-Ds3PzWWr.js.map +1 -0
  69. package/dashboard/dist/assets/ListToolbar-Dviaskni.js +2 -0
  70. package/dashboard/dist/assets/{ListToolbar-CdmIvEIF.js.map → ListToolbar-Dviaskni.js.map} +1 -1
  71. package/dashboard/dist/assets/McpOverview-BBm66wbF.js +2 -0
  72. package/dashboard/dist/assets/{McpOverview-C-Ypezuv.js.map → McpOverview-BBm66wbF.js.map} +1 -1
  73. package/dashboard/dist/assets/McpQueryDetailPage-B6GJOMcz.js +5 -0
  74. package/dashboard/dist/assets/McpQueryDetailPage-B6GJOMcz.js.map +1 -0
  75. package/dashboard/dist/assets/McpQueryPage-C-8nIdBL.js +2 -0
  76. package/dashboard/dist/assets/McpQueryPage-C-8nIdBL.js.map +1 -0
  77. package/dashboard/dist/assets/McpRunDetailPage-CSq_0qqi.js +2 -0
  78. package/dashboard/dist/assets/{McpRunDetailPage-B1sCxKLD.js.map → McpRunDetailPage-CSq_0qqi.js.map} +1 -1
  79. package/dashboard/dist/assets/McpRunsPage-BdK8ahX7.js +2 -0
  80. package/dashboard/dist/assets/McpRunsPage-BdK8ahX7.js.map +1 -0
  81. package/dashboard/dist/assets/Modal-C6HI6btY.js +2 -0
  82. package/dashboard/dist/assets/{Modal-CSrxpXeM.js.map → Modal-C6HI6btY.js.map} +1 -1
  83. package/dashboard/dist/assets/NamespacePill-eGsbJBFa.js +2 -0
  84. package/dashboard/dist/assets/{NamespacePill-DlqBTvFR.js.map → NamespacePill-eGsbJBFa.js.map} +1 -1
  85. package/dashboard/dist/assets/OperationsPage-DODPFmf2.js +2 -0
  86. package/dashboard/dist/assets/OperationsPage-DODPFmf2.js.map +1 -0
  87. package/dashboard/dist/assets/OperatorDashboard-BbmgsOmQ.js +2 -0
  88. package/dashboard/dist/assets/{OperatorDashboard-YP6kP-f_.js.map → OperatorDashboard-BbmgsOmQ.js.map} +1 -1
  89. package/dashboard/dist/assets/PageHeader-DcgGV0Y2.js +2 -0
  90. package/dashboard/dist/assets/{PageHeader-CFta2VaS.js.map → PageHeader-DcgGV0Y2.js.map} +1 -1
  91. package/dashboard/dist/assets/PageHeaderWithStats-Cf8TYFRh.js +2 -0
  92. package/dashboard/dist/assets/PageHeaderWithStats-Cf8TYFRh.js.map +1 -0
  93. package/dashboard/dist/assets/PriorityBadge-a7u8C9uY.js +2 -0
  94. package/dashboard/dist/assets/{PriorityBadge-B4ykBH7f.js.map → PriorityBadge-a7u8C9uY.js.map} +1 -1
  95. package/dashboard/dist/assets/ProcessDetailPage-D80w44rV.js +2 -0
  96. package/dashboard/dist/assets/ProcessDetailPage-D80w44rV.js.map +1 -0
  97. package/dashboard/dist/assets/ProcessesListPage-BjW5xUkv.js +2 -0
  98. package/dashboard/dist/assets/{ProcessesListPage-BNhFwTLl.js.map → ProcessesListPage-BjW5xUkv.js.map} +1 -1
  99. package/dashboard/dist/assets/RoleDetailPage-oahg0cdT.js +11 -0
  100. package/dashboard/dist/assets/RoleDetailPage-oahg0cdT.js.map +1 -0
  101. package/dashboard/dist/assets/RolePill-BAeaQUXX.js +2 -0
  102. package/dashboard/dist/assets/RolePill-BAeaQUXX.js.map +1 -0
  103. package/dashboard/dist/assets/RolesPage-BI1Xtqq_.js +2 -0
  104. package/dashboard/dist/assets/RolesPage-BI1Xtqq_.js.map +1 -0
  105. package/dashboard/dist/assets/RowActions--m4F6GW8.js +2 -0
  106. package/dashboard/dist/assets/{RowActions-BA9L9djf.js.map → RowActions--m4F6GW8.js.map} +1 -1
  107. package/dashboard/dist/assets/RunAsSelector-DiGzSfiG.js +2 -0
  108. package/dashboard/dist/assets/{RunAsSelector-CokM3Ifp.js.map → RunAsSelector-DiGzSfiG.js.map} +1 -1
  109. package/dashboard/dist/assets/StatCard-DCPGFzCv.js +2 -0
  110. package/dashboard/dist/assets/StatCard-DCPGFzCv.js.map +1 -0
  111. package/dashboard/dist/assets/StatusBadge-mk-dJwPT.js +2 -0
  112. package/dashboard/dist/assets/{StatusBadge-D9MeQHrh.js.map → StatusBadge-mk-dJwPT.js.map} +1 -1
  113. package/dashboard/dist/assets/StickyPagination-Clm9H840.js +2 -0
  114. package/dashboard/dist/assets/{StickyPagination-_H2j2CAH.js.map → StickyPagination-Clm9H840.js.map} +1 -1
  115. package/dashboard/dist/assets/StreamMessageDetail-Bikvs1Cz.js +2 -0
  116. package/dashboard/dist/assets/StreamMessageDetail-Bikvs1Cz.js.map +1 -0
  117. package/dashboard/dist/assets/SwimlaneTimeline-C9X3IVqI.js +2 -0
  118. package/dashboard/dist/assets/SwimlaneTimeline-C9X3IVqI.js.map +1 -0
  119. package/dashboard/dist/assets/TagInput-DmJLnghg.js +2 -0
  120. package/dashboard/dist/assets/{TagInput-CQg-TrV9.js.map → TagInput-DmJLnghg.js.map} +1 -1
  121. package/dashboard/dist/assets/TaskDetailPage-C0tbiUi7.js +2 -0
  122. package/dashboard/dist/assets/TaskDetailPage-C0tbiUi7.js.map +1 -0
  123. package/dashboard/dist/assets/TaskQueuePill--1OX6egx.js +2 -0
  124. package/dashboard/dist/assets/{TaskQueuePill-DyvtL8X4.js.map → TaskQueuePill--1OX6egx.js.map} +1 -1
  125. package/dashboard/dist/assets/TasksListPage-DcYV-GMA.js +2 -0
  126. package/dashboard/dist/assets/{TasksListPage-B71FxvrY.js.map → TasksListPage-DcYV-GMA.js.map} +1 -1
  127. package/dashboard/dist/assets/TimeAgo-pYn3T9IZ.js +2 -0
  128. package/dashboard/dist/assets/{TimeAgo-JgT0U_sd.js.map → TimeAgo-pYn3T9IZ.js.map} +1 -1
  129. package/dashboard/dist/assets/TimestampCell-BPMCscic.js +2 -0
  130. package/dashboard/dist/assets/{TimestampCell-gEreK8Nn.js.map → TimestampCell-BPMCscic.js.map} +1 -1
  131. package/dashboard/dist/assets/ToolPill-BnF9lCUX.js +2 -0
  132. package/dashboard/dist/assets/{ToolPill-miuRcj1Q.js.map → ToolPill-BnF9lCUX.js.map} +1 -1
  133. package/dashboard/dist/assets/ToolTestPanel-Bw4z_Tya.js +2 -0
  134. package/dashboard/dist/assets/{ToolTestPanel-ChfHw9Aq.js.map → ToolTestPanel-Bw4z_Tya.js.map} +1 -1
  135. package/dashboard/dist/assets/TopicDetailPage-CtFztOnn.js +9 -0
  136. package/dashboard/dist/assets/TopicDetailPage-CtFztOnn.js.map +1 -0
  137. package/dashboard/dist/assets/TopicsPage-BXdc6pAU.js +2 -0
  138. package/dashboard/dist/assets/TopicsPage-BXdc6pAU.js.map +1 -0
  139. package/dashboard/dist/assets/UserName-R96NG6xB.js +2 -0
  140. package/dashboard/dist/assets/{UserName-uncbaKYf.js.map → UserName-R96NG6xB.js.map} +1 -1
  141. package/dashboard/dist/assets/WorkflowExecutionPage-DmRJabMQ.js +2 -0
  142. package/dashboard/dist/assets/{WorkflowExecutionPage-DwzLKTkt.js.map → WorkflowExecutionPage-DmRJabMQ.js.map} +1 -1
  143. package/dashboard/dist/assets/WorkflowPill-Cc2MlYbB.js +2 -0
  144. package/dashboard/dist/assets/WorkflowPill-Cc2MlYbB.js.map +1 -0
  145. package/dashboard/dist/assets/WorkflowsDashboard-uLU5ZToY.js +2 -0
  146. package/dashboard/dist/assets/WorkflowsDashboard-uLU5ZToY.js.map +1 -0
  147. package/dashboard/dist/assets/WorkflowsOverview-BhgE0RS8.js +2 -0
  148. package/dashboard/dist/assets/{WorkflowsOverview-ihhW8DiS.js.map → WorkflowsOverview-BhgE0RS8.js.map} +1 -1
  149. package/dashboard/dist/assets/YamlWorkflowDetailPage-CvIgB5y7.js +33 -0
  150. package/dashboard/dist/assets/{YamlWorkflowDetailPage-C61-8y-E.js.map → YamlWorkflowDetailPage-CvIgB5y7.js.map} +1 -1
  151. package/dashboard/dist/assets/YamlWorkflowsPage-DWnsgl2v.js +2 -0
  152. package/dashboard/dist/assets/{YamlWorkflowsPage-CMpgsLEo.js.map → YamlWorkflowsPage-DWnsgl2v.js.map} +1 -1
  153. package/dashboard/dist/assets/{agents-27sErp5R.js → agents-BpYMwrsB.js} +2 -2
  154. package/dashboard/dist/assets/{agents-27sErp5R.js.map → agents-BpYMwrsB.js.map} +1 -1
  155. package/dashboard/dist/assets/{bots-CPHuAvjW.js → bots-DI6Wqp5X.js} +2 -2
  156. package/dashboard/dist/assets/{bots-CPHuAvjW.js.map → bots-DI6Wqp5X.js.map} +1 -1
  157. package/dashboard/dist/assets/capabilities-BKZZb8eM.js +2 -0
  158. package/dashboard/dist/assets/{capabilities-BBTPqF-V.js.map → capabilities-BKZZb8eM.js.map} +1 -1
  159. package/dashboard/dist/assets/{controlplane-C9j2mwX8.js → controlplane-Djshb7fm.js} +2 -2
  160. package/dashboard/dist/assets/{controlplane-C9j2mwX8.js.map → controlplane-Djshb7fm.js.map} +1 -1
  161. package/dashboard/dist/assets/escalation-D8mrXtjS.js +2 -0
  162. package/dashboard/dist/assets/{escalation-CyJ_wz-f.js.map → escalation-D8mrXtjS.js.map} +1 -1
  163. package/dashboard/dist/assets/escalation-columns-CyLzgPkz.js +2 -0
  164. package/dashboard/dist/assets/escalation-columns-CyLzgPkz.js.map +1 -0
  165. package/dashboard/dist/assets/index-B5MAG4Uv.js +2 -0
  166. package/dashboard/dist/assets/{index-CCHGKErT.js.map → index-B5MAG4Uv.js.map} +1 -1
  167. package/dashboard/dist/assets/index-BfxiRwk2.js +6 -0
  168. package/dashboard/dist/assets/index-BfxiRwk2.js.map +1 -0
  169. package/dashboard/dist/assets/index-C71I-f5G.js +2 -0
  170. package/dashboard/dist/assets/{index-D9pi0fs6.js.map → index-C71I-f5G.js.map} +1 -1
  171. package/dashboard/dist/assets/index-CC4g-6QE.css +1 -0
  172. package/dashboard/dist/assets/index-CJb3dXku.js +2 -0
  173. package/dashboard/dist/assets/index-CJb3dXku.js.map +1 -0
  174. package/dashboard/dist/assets/index-CQtv2rj6.js +2 -0
  175. package/dashboard/dist/assets/index-CQtv2rj6.js.map +1 -0
  176. package/dashboard/dist/assets/index-CphzO7b8.js +2 -0
  177. package/dashboard/dist/assets/{index-CNprOGuS.js.map → index-CphzO7b8.js.map} +1 -1
  178. package/dashboard/dist/assets/index-CwAmiy_j.js +2 -0
  179. package/dashboard/dist/assets/index-CwAmiy_j.js.map +1 -0
  180. package/dashboard/dist/assets/index-DgCS2Frb.js +281 -0
  181. package/dashboard/dist/assets/index-DgCS2Frb.js.map +1 -0
  182. package/dashboard/dist/assets/index-DkbnD-Te.js +2 -0
  183. package/dashboard/dist/assets/{index-Dzqt3g-K.js.map → index-DkbnD-Te.js.map} +1 -1
  184. package/dashboard/dist/assets/index-Y6yj36QR.js +9 -0
  185. package/dashboard/dist/assets/index-Y6yj36QR.js.map +1 -0
  186. package/dashboard/dist/assets/index-eshNd6NY.js +6 -0
  187. package/dashboard/dist/assets/{index-BiLZJ43R.js.map → index-eshNd6NY.js.map} +1 -1
  188. package/dashboard/dist/assets/index-xn9fmkHC.js +2 -0
  189. package/dashboard/dist/assets/index-xn9fmkHC.js.map +1 -0
  190. package/dashboard/dist/assets/index-yxnQew1X.js +2 -0
  191. package/dashboard/dist/assets/index-yxnQew1X.js.map +1 -0
  192. package/dashboard/dist/assets/{knowledge-BErJA3Je.js → knowledge-C_1r0faY.js} +2 -2
  193. package/dashboard/dist/assets/{knowledge-BErJA3Je.js.map → knowledge-C_1r0faY.js.map} +1 -1
  194. package/dashboard/dist/assets/{mcp-Cx9L42EN.js → mcp-BtG54ZAx.js} +2 -2
  195. package/dashboard/dist/assets/{mcp-Cx9L42EN.js.map → mcp-BtG54ZAx.js.map} +1 -1
  196. package/dashboard/dist/assets/{mcp-query-Cf6kcBoW.js → mcp-query-CSdQWxmv.js} +2 -2
  197. package/dashboard/dist/assets/{mcp-query-Cf6kcBoW.js.map → mcp-query-CSdQWxmv.js.map} +1 -1
  198. package/dashboard/dist/assets/{pipelines-CFctrv71.js → pipelines-DVkwxN64.js} +2 -2
  199. package/dashboard/dist/assets/{pipelines-CFctrv71.js.map → pipelines-DVkwxN64.js.map} +1 -1
  200. package/dashboard/dist/assets/{roles-CCXZtqDr.js → roles-CpRcUIMm.js} +2 -2
  201. package/dashboard/dist/assets/{roles-CCXZtqDr.js.map → roles-CpRcUIMm.js.map} +1 -1
  202. package/dashboard/dist/assets/{tasks-BPNj8ZWL.js → tasks-DNdvW5H6.js} +2 -2
  203. package/dashboard/dist/assets/{tasks-BPNj8ZWL.js.map → tasks-DNdvW5H6.js.map} +1 -1
  204. package/dashboard/dist/assets/{topics-CR4UBuSV.js → topics-DNC77Chw.js} +2 -2
  205. package/dashboard/dist/assets/{topics-CR4UBuSV.js.map → topics-DNC77Chw.js.map} +1 -1
  206. package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js → useCollapsedSections-CGNA5oKV.js} +2 -2
  207. package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js.map → useCollapsedSections-CGNA5oKV.js.map} +1 -1
  208. package/dashboard/dist/assets/{useDebouncedValue-BA5S7V54.js → useDebouncedValue-DmL3uNt_.js} +2 -2
  209. package/dashboard/dist/assets/{useDebouncedValue-BA5S7V54.js.map → useDebouncedValue-DmL3uNt_.js.map} +1 -1
  210. package/dashboard/dist/assets/{useEventHooks-BgdnN8Rj.js → useEventHooks-CUUeBSH1.js} +2 -2
  211. package/dashboard/dist/assets/{useEventHooks-BgdnN8Rj.js.map → useEventHooks-CUUeBSH1.js.map} +1 -1
  212. package/dashboard/dist/assets/{useFilterParams-x-Dg0Vgz.js → useFilterParams-Ch-a71bE.js} +2 -2
  213. package/dashboard/dist/assets/{useFilterParams-x-Dg0Vgz.js.map → useFilterParams-Ch-a71bE.js.map} +1 -1
  214. package/dashboard/dist/assets/{useNamespace-BDsKfT0f.js → useNamespace-D-AjLnPK.js} +2 -2
  215. package/dashboard/dist/assets/{useNamespace-BDsKfT0f.js.map → useNamespace-D-AjLnPK.js.map} +1 -1
  216. package/dashboard/dist/assets/{useYamlActivityEvents-CWZwHIlR.js → useYamlActivityEvents-DRdetOb_.js} +2 -2
  217. package/dashboard/dist/assets/{useYamlActivityEvents-CWZwHIlR.js.map → useYamlActivityEvents-DRdetOb_.js.map} +1 -1
  218. package/dashboard/dist/assets/{users-BqmKVXR1.js → users-BUgdEsec.js} +2 -2
  219. package/dashboard/dist/assets/{users-BqmKVXR1.js.map → users-BUgdEsec.js.map} +1 -1
  220. package/dashboard/dist/assets/{vendor-icons-BaQqUm-e.js → vendor-icons-CNyYGNsk.js} +3 -3
  221. package/dashboard/dist/assets/{vendor-icons-BaQqUm-e.js.map → vendor-icons-CNyYGNsk.js.map} +1 -1
  222. package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
  223. package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
  224. package/dashboard/dist/assets/vendor-react-zA2lQFDs.js +26 -0
  225. package/dashboard/dist/assets/vendor-react-zA2lQFDs.js.map +1 -0
  226. package/dashboard/dist/assets/{workflows-Dps45zjk.js → workflows-BfyR5VJt.js} +2 -2
  227. package/dashboard/dist/assets/workflows-BfyR5VJt.js.map +1 -0
  228. package/dashboard/dist/assets/{yaml-workflows-DhlTkbvY.js → yaml-workflows-Bz7yEnhl.js} +2 -2
  229. package/dashboard/dist/assets/{yaml-workflows-DhlTkbvY.js.map → yaml-workflows-Bz7yEnhl.js.map} +1 -1
  230. package/dashboard/dist/index.html +5 -5
  231. package/docs/api/http/escalations.md +3 -3
  232. package/docs/api/http/workflows.md +2 -1
  233. package/docs/api/mcp/admin.md +13 -7
  234. package/docs/api/sdk/escalations.md +3 -1
  235. package/docs/api/sdk/workflows.md +3 -2
  236. package/docs/architecture.md +2 -2
  237. package/docs/dashboard.md +6 -5
  238. package/docs/iam.md +3 -3
  239. package/docs/workflows.md +7 -5
  240. package/package.json +2 -2
  241. package/dashboard/dist/assets/AdminDashboard-Bgomc_jH.js +0 -2
  242. package/dashboard/dist/assets/AgentConfigPage-C6gDgz21.js +0 -16
  243. package/dashboard/dist/assets/AgentConfigPage-C6gDgz21.js.map +0 -1
  244. package/dashboard/dist/assets/AgentDetailPage-0rrH5FmV.js +0 -4
  245. package/dashboard/dist/assets/AgentDetailPage-0rrH5FmV.js.map +0 -1
  246. package/dashboard/dist/assets/AgentsPage-DkIU2zed.js +0 -2
  247. package/dashboard/dist/assets/AgentsPage-DkIU2zed.js.map +0 -1
  248. package/dashboard/dist/assets/AvailableEscalationsPage-C9DAtNGp.js +0 -2
  249. package/dashboard/dist/assets/BotPicker-MnI3OyE7.js +0 -2
  250. package/dashboard/dist/assets/CapabilitiesPage-Cv_AD_5i.js +0 -2
  251. package/dashboard/dist/assets/CapabilitiesPage-Cv_AD_5i.js.map +0 -1
  252. package/dashboard/dist/assets/CollapsibleSection-Ne-Q3QFM.js +0 -2
  253. package/dashboard/dist/assets/ConfirmDeleteModal-D9_1b4MW.js +0 -2
  254. package/dashboard/dist/assets/CopyableId-blg-gZvT.js +0 -2
  255. package/dashboard/dist/assets/CredentialsPage-B3Mfwl22.js +0 -2
  256. package/dashboard/dist/assets/CredentialsPage-B3Mfwl22.js.map +0 -1
  257. package/dashboard/dist/assets/CronLabel-CtjUBRPo.js +0 -2
  258. package/dashboard/dist/assets/CronLabel-CtjUBRPo.js.map +0 -1
  259. package/dashboard/dist/assets/CustomDurationPicker-Cp1fgzPX.js +0 -2
  260. package/dashboard/dist/assets/DataTable-ZWgVQg7F.js +0 -2
  261. package/dashboard/dist/assets/DropZone-CZDmNBn-.js +0 -2
  262. package/dashboard/dist/assets/ElapsedCell-Gr5UlUbn.js +0 -2
  263. package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
  264. package/dashboard/dist/assets/EscalationSchemaPage-C5tuV6SJ.js +0 -9
  265. package/dashboard/dist/assets/EscalationSchemaPage-C5tuV6SJ.js.map +0 -1
  266. package/dashboard/dist/assets/EscalationsOverview-BIZVnSBF.js +0 -2
  267. package/dashboard/dist/assets/EventTable-90aUfsNr.js +0 -2
  268. package/dashboard/dist/assets/EventTable-90aUfsNr.js.map +0 -1
  269. package/dashboard/dist/assets/FilterBar-BQ2JGg8U.js +0 -2
  270. package/dashboard/dist/assets/FilterBar-BQ2JGg8U.js.map +0 -1
  271. package/dashboard/dist/assets/GraphInvokePage-Io5ZucT8.js +0 -2
  272. package/dashboard/dist/assets/GraphInvokePage-Io5ZucT8.js.map +0 -1
  273. package/dashboard/dist/assets/HomePage-Cu0vUzTF.js +0 -2
  274. package/dashboard/dist/assets/HomePage-Cu0vUzTF.js.map +0 -1
  275. package/dashboard/dist/assets/ListToolbar-CdmIvEIF.js +0 -2
  276. package/dashboard/dist/assets/McpOverview-C-Ypezuv.js +0 -2
  277. package/dashboard/dist/assets/McpQueryDetailPage-DdontKcj.js +0 -5
  278. package/dashboard/dist/assets/McpQueryDetailPage-DdontKcj.js.map +0 -1
  279. package/dashboard/dist/assets/McpQueryPage-D-1TaOGG.js +0 -2
  280. package/dashboard/dist/assets/McpQueryPage-D-1TaOGG.js.map +0 -1
  281. package/dashboard/dist/assets/McpRunDetailPage-B1sCxKLD.js +0 -2
  282. package/dashboard/dist/assets/McpRunsPage-eWJ7cDa3.js +0 -2
  283. package/dashboard/dist/assets/McpRunsPage-eWJ7cDa3.js.map +0 -1
  284. package/dashboard/dist/assets/Modal-CSrxpXeM.js +0 -2
  285. package/dashboard/dist/assets/NamespacePill-DlqBTvFR.js +0 -2
  286. package/dashboard/dist/assets/OperationsPage-C5phWL0O.js +0 -2
  287. package/dashboard/dist/assets/OperationsPage-C5phWL0O.js.map +0 -1
  288. package/dashboard/dist/assets/OperatorDashboard-YP6kP-f_.js +0 -2
  289. package/dashboard/dist/assets/PageHeader-CFta2VaS.js +0 -2
  290. package/dashboard/dist/assets/PageHeaderWithStats-CcVAji-7.js +0 -2
  291. package/dashboard/dist/assets/PageHeaderWithStats-CcVAji-7.js.map +0 -1
  292. package/dashboard/dist/assets/PriorityBadge-B4ykBH7f.js +0 -2
  293. package/dashboard/dist/assets/ProcessDetailPage-C_BXQvBs.js +0 -2
  294. package/dashboard/dist/assets/ProcessDetailPage-C_BXQvBs.js.map +0 -1
  295. package/dashboard/dist/assets/ProcessesListPage-BNhFwTLl.js +0 -2
  296. package/dashboard/dist/assets/RoleDetailPage-8GLNjj9I.js +0 -11
  297. package/dashboard/dist/assets/RoleDetailPage-8GLNjj9I.js.map +0 -1
  298. package/dashboard/dist/assets/RolePill-CXEyPMqb.js +0 -2
  299. package/dashboard/dist/assets/RolePill-CXEyPMqb.js.map +0 -1
  300. package/dashboard/dist/assets/RolesPage-B59tE2lZ.js +0 -2
  301. package/dashboard/dist/assets/RolesPage-B59tE2lZ.js.map +0 -1
  302. package/dashboard/dist/assets/RowActions-BA9L9djf.js +0 -2
  303. package/dashboard/dist/assets/RunAsSelector-CokM3Ifp.js +0 -2
  304. package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
  305. package/dashboard/dist/assets/StatCard-DlgF0CJC.js.map +0 -1
  306. package/dashboard/dist/assets/StatusBadge-D9MeQHrh.js +0 -2
  307. package/dashboard/dist/assets/StickyPagination-_H2j2CAH.js +0 -2
  308. package/dashboard/dist/assets/StreamMessageDetail-sSfHDYIa.js +0 -2
  309. package/dashboard/dist/assets/StreamMessageDetail-sSfHDYIa.js.map +0 -1
  310. package/dashboard/dist/assets/SwimlaneTimeline-LZWtfBK3.js +0 -2
  311. package/dashboard/dist/assets/SwimlaneTimeline-LZWtfBK3.js.map +0 -1
  312. package/dashboard/dist/assets/TagInput-CQg-TrV9.js +0 -2
  313. package/dashboard/dist/assets/TaskDetailPage-CHBV2V6R.js +0 -2
  314. package/dashboard/dist/assets/TaskDetailPage-CHBV2V6R.js.map +0 -1
  315. package/dashboard/dist/assets/TaskQueuePill-DyvtL8X4.js +0 -2
  316. package/dashboard/dist/assets/TasksListPage-B71FxvrY.js +0 -2
  317. package/dashboard/dist/assets/TimeAgo-JgT0U_sd.js +0 -2
  318. package/dashboard/dist/assets/TimestampCell-gEreK8Nn.js +0 -2
  319. package/dashboard/dist/assets/ToolPill-miuRcj1Q.js +0 -2
  320. package/dashboard/dist/assets/ToolTestPanel-ChfHw9Aq.js +0 -2
  321. package/dashboard/dist/assets/TopicDetailPage-DigI0HGt.js +0 -9
  322. package/dashboard/dist/assets/TopicDetailPage-DigI0HGt.js.map +0 -1
  323. package/dashboard/dist/assets/TopicsPage-BHjlFpPN.js +0 -2
  324. package/dashboard/dist/assets/TopicsPage-BHjlFpPN.js.map +0 -1
  325. package/dashboard/dist/assets/UserName-uncbaKYf.js +0 -2
  326. package/dashboard/dist/assets/WorkflowExecutionPage-DwzLKTkt.js +0 -2
  327. package/dashboard/dist/assets/WorkflowPill-BegV-iRF.js +0 -2
  328. package/dashboard/dist/assets/WorkflowPill-BegV-iRF.js.map +0 -1
  329. package/dashboard/dist/assets/WorkflowsDashboard-rpnGhGnl.js +0 -2
  330. package/dashboard/dist/assets/WorkflowsDashboard-rpnGhGnl.js.map +0 -1
  331. package/dashboard/dist/assets/WorkflowsOverview-ihhW8DiS.js +0 -2
  332. package/dashboard/dist/assets/YamlWorkflowDetailPage-C61-8y-E.js +0 -33
  333. package/dashboard/dist/assets/YamlWorkflowsPage-CMpgsLEo.js +0 -2
  334. package/dashboard/dist/assets/capabilities-BBTPqF-V.js +0 -2
  335. package/dashboard/dist/assets/escalation-CyJ_wz-f.js +0 -2
  336. package/dashboard/dist/assets/escalation-columns-DU4Jyxxo.js +0 -2
  337. package/dashboard/dist/assets/escalation-columns-DU4Jyxxo.js.map +0 -1
  338. package/dashboard/dist/assets/index-BBQggGcf.js +0 -2
  339. package/dashboard/dist/assets/index-BBQggGcf.js.map +0 -1
  340. package/dashboard/dist/assets/index-BHS-ubrT.js +0 -6
  341. package/dashboard/dist/assets/index-BHS-ubrT.js.map +0 -1
  342. package/dashboard/dist/assets/index-BVHXREYZ.js +0 -2
  343. package/dashboard/dist/assets/index-BVHXREYZ.js.map +0 -1
  344. package/dashboard/dist/assets/index-BiLZJ43R.js +0 -6
  345. package/dashboard/dist/assets/index-BoZydcaW.js +0 -63
  346. package/dashboard/dist/assets/index-BoZydcaW.js.map +0 -1
  347. package/dashboard/dist/assets/index-CCHGKErT.js +0 -2
  348. package/dashboard/dist/assets/index-CNprOGuS.js +0 -2
  349. package/dashboard/dist/assets/index-CZ6-l8_0.css +0 -1
  350. package/dashboard/dist/assets/index-CgeFUhUr.js +0 -2
  351. package/dashboard/dist/assets/index-CgeFUhUr.js.map +0 -1
  352. package/dashboard/dist/assets/index-ChniBGqD.js +0 -9
  353. package/dashboard/dist/assets/index-ChniBGqD.js.map +0 -1
  354. package/dashboard/dist/assets/index-CjXzZ19T.js +0 -2
  355. package/dashboard/dist/assets/index-CjXzZ19T.js.map +0 -1
  356. package/dashboard/dist/assets/index-D9pi0fs6.js +0 -2
  357. package/dashboard/dist/assets/index-DoivEaUZ.js +0 -2
  358. package/dashboard/dist/assets/index-DoivEaUZ.js.map +0 -1
  359. package/dashboard/dist/assets/index-Dzqt3g-K.js +0 -2
  360. package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
  361. package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
  362. package/dashboard/dist/assets/vendor-react-CXumBFUA.js +0 -22
  363. package/dashboard/dist/assets/vendor-react-CXumBFUA.js.map +0 -1
  364. package/dashboard/dist/assets/workflows-Dps45zjk.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{a as d,j as t}from"./vendor-query-B2UbickB.js";import{E as z}from"./ElapsedCell-Gr5UlUbn.js";import{j as A,b as v}from"./index-BoZydcaW.js";import{u as E,d as $,b as L}from"./workflows-Dps45zjk.js";import{u as M}from"./useNamespace-BDsKfT0f.js";import{b as I}from"./useEventHooks-BgdnN8Rj.js";import{u as U}from"./useFilterParams-x-Dg0Vgz.js";import{b as O}from"./api-path-u2Jf9QXS.js";import{D as B}from"./DataTable-ZWgVQg7F.js";import{W as H}from"./WorkflowPill-BegV-iRF.js";import{P as V}from"./PageHeader-CFta2VaS.js";import{F as G,c as f,b as x}from"./FilterBar-BQ2JGg8U.js";import{S as J}from"./StickyPagination-_H2j2CAH.js";import{L as q}from"./ListToolbar-CdmIvEIF.js";import{R as K,a as k}from"./RowActions-BA9L9djf.js";import{u as Q,y as X}from"./vendor-icons-BaQqUm-e.js";import{c as Y}from"./vendor-react-CXumBFUA.js";import"./controlplane-C9j2mwX8.js";import"./EmptyState-BcsfPq9T.js";const Z={running:"in_progress",completed:"completed",failed:"failed"},ee={in_progress:"bg-status-active",completed:"bg-status-success",failed:"bg-status-error"},te={running:"text-status-active",completed:"text-status-success",failed:"text-status-error"};function se(p,n,m,l,a){return[{key:"workflow_id",label:"Workflow ID",render:e=>{const o=ee[Z[e.status]??e.status]??"bg-status-pending",r=e.status==="running"?" animate-pulse":"";return t.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[t.jsx("span",{className:`w-1.5 h-1.5 shrink-0 rounded-full ${o}${r}`,title:e.status}),t.jsx("span",{className:"font-mono text-xs text-text-primary truncate",children:e.workflow_id})]})}},{key:"entity",label:"Type",render:e=>t.jsx(H,{type:e.entity,variant:a.get(e.entity)??"durable",size:"xs"}),className:"w-44 shrink-0"},{key:"created_at",label:"Created",render:e=>t.jsx(v,{date:e.created_at,format:"relative",className:"text-xs text-text-secondary whitespace-nowrap"}),className:"w-32",sortable:!0},{key:"updated_at",label:"Updated",render:e=>t.jsx(v,{date:e.updated_at,format:"relative",className:"text-xs text-text-secondary whitespace-nowrap"}),className:"w-32",sortable:!0},{key:"duration",label:"Duration",render:e=>t.jsx(z,{startDate:e.created_at,endDate:e.status==="running"?null:e.updated_at,isLive:e.status==="running"}),className:"w-28"},{key:"actions",label:"",render:e=>t.jsxs(K,{children:[t.jsx(k,{icon:Q,title:`Filter by ${e.entity}`,onClick:()=>p(e.entity)}),t.jsx("button",{onClick:o=>{o.stopPropagation(),n(e.status)},className:"opacity-0 group-hover/row:opacity-100 transition-opacity",title:`Filter by ${e.status}`,children:t.jsx("svg",{className:`w-[18px] h-[18px] ${te[e.status]??"text-text-tertiary"} hover:opacity-70`,viewBox:"0 0 24 24",fill:"currentColor",children:t.jsx("circle",{cx:"12",cy:"12",r:"6"})})}),m&&t.jsx(k,{icon:X,title:"View config",onClick:()=>l(`/workflows/registry/${encodeURIComponent(e.entity)}`)})]}),className:"w-24 text-right"}]}function ke({tier:p="all"}){I();const n=Y(),{isSuperAdmin:m}=A(),{namespace:l}=M(),{filters:a,setFilter:e,pagination:o,sort:r,setSort:j}=U({filters:{search:"",entity:"",status:"",tier:p}}),c=a.tier||"all",g=c==="certified"?"true":c==="durable"?"false":void 0,{data:b}=E(),{data:y}=$(),S=d.useMemo(()=>{const s=new Map;for(const w of y??[])s.set(w.workflow_type,w.tier??"durable");return s},[y]),_=se(s=>e("entity",s),s=>e("status",s),m,n,S),[u,C]=d.useState(a.search);d.useEffect(()=>{if(u===a.search)return;const s=setTimeout(()=>e("search",u),300);return()=>clearTimeout(s)},[u,e,a.search]);const{data:i,isLoading:N,refetch:P,isFetching:T}=L({limit:o.pageSize,offset:o.offset,entity:a.entity||void 0,search:a.search||void 0,status:a.status||void 0,sort_by:r.sort_by||"created_at",order:r.order||"desc",registered:g,namespace:l||void 0}),h=(i==null?void 0:i.total)??0,F=(i==null?void 0:i.jobs)??[],D=d.useMemo(()=>[...new Set((b??[]).map(s=>s.workflow_type))].sort(),[b]),R="Workflow Executions",W=c==="certified"?"No certified workflow executions found":c==="durable"?"No durable workflow executions found":"No workflow executions found";return t.jsxs("div",{children:[t.jsx(V,{title:R,docsHash:"#docs:dashboard.md:durable-executions"}),t.jsxs(G,{actions:t.jsx(q,{onRefresh:()=>P(),isFetching:T,apiPath:O("/workflow-states/jobs",{limit:o.pageSize,offset:o.offset,entity:a.entity||void 0,search:a.search||void 0,status:a.status||void 0,sort_by:r.sort_by||"created_at",order:r.order||"desc",registered:g,namespace:l||void 0})}),children:[t.jsx("input",{type:"text",placeholder:"Search workflow ID...",value:u,onChange:s=>C(s.target.value),className:"input text-[11px] py-1 px-2 w-56"}),t.jsx(f,{}),t.jsx(x,{label:"Type",value:a.entity,onChange:s=>e("entity",s),options:D.map(s=>({value:s,label:s}))}),t.jsx(f,{}),t.jsx(x,{label:"Status",value:a.status,onChange:s=>e("status",s),options:[{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}]}),t.jsx(f,{}),t.jsx(x,{label:"Tier",value:a.tier==="all"?"":a.tier,onChange:s=>e("tier",s||"all"),options:[{value:"certified",label:"Certified"},{value:"durable",label:"Durable"}]})]}),t.jsx(B,{columns:_,data:F,keyFn:s=>s.workflow_id,onRowClick:s=>n(`/workflows/executions/${s.workflow_id}`),isLoading:N,emptyMessage:W,sort:r,onSort:j}),t.jsx(J,{page:o.page,totalPages:o.totalPages(h),onPageChange:o.setPage,total:h,pageSize:o.pageSize,onPageSizeChange:o.setPageSize})]})}export{ke as WorkflowsDashboard};
2
- //# sourceMappingURL=WorkflowsDashboard-rpnGhGnl.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"WorkflowsDashboard-rpnGhGnl.js","sources":["../../src/pages/workflows/WorkflowsDashboard.tsx"],"sourcesContent":["import { useState, useEffect, useMemo } from 'react';\nimport { useNavigate } from 'react-router-dom';\nimport { Filter, Settings } from 'lucide-react';\nimport { ElapsedCell } from '../../components/common/display/ElapsedCell';\nimport { DateValue } from '../../components/common/display/DateValue';\nimport { useJobs, useWorkflowConfigs, useDiscoveredWorkflows } from '../../api/workflows';\nimport { useAuth } from '../../hooks/useAuth';\nimport { useNamespace } from '../../hooks/useNamespace';\nimport { useWorkflowListEvents } from '../../hooks/useEventHooks';\nimport { useFilterParams } from '../../hooks/useFilterParams';\nimport { buildApiPath } from '../../lib/api-path';\nimport { DataTable, type Column } from '../../components/common/data/DataTable';\nimport { WorkflowPill } from '../../components/common/display/WorkflowPill';\nimport { PageHeader } from '../../components/common/layout/PageHeader';\nimport { FilterBar, FilterSelect, FilterDivider } from '../../components/common/data/FilterBar';\nimport { StickyPagination } from '../../components/common/data/StickyPagination';\nimport { ListToolbar } from '../../components/common/data/ListToolbar';\nimport { RowAction, RowActionGroup } from '../../components/common/layout/RowActions';\nimport type { LTJob, WorkflowTier } from '../../api/types';\n\nexport type ExecutionsTier = 'all' | 'certified' | 'durable';\n\nconst jobStatusMap: Record<string, string> = {\n running: 'in_progress',\n completed: 'completed',\n failed: 'failed',\n};\n\nconst STATUS_DOT: Record<string, string> = {\n in_progress: 'bg-status-active',\n completed: 'bg-status-success',\n failed: 'bg-status-error',\n};\n\nconst STATUS_COLORS: Record<string, string> = {\n running: 'text-status-active',\n completed: 'text-status-success',\n failed: 'text-status-error',\n};\n\nfunction buildColumns(\n onFilterEntity: (entity: string) => void,\n onFilterStatus: (status: string) => void,\n isSuperAdmin: boolean,\n navigate: (path: string) => void,\n tierMap: Map<string, WorkflowTier>,\n): Column<LTJob>[] {\n return [\n {\n key: 'workflow_id',\n label: 'Workflow ID',\n render: (row) => {\n const dotClass = STATUS_DOT[jobStatusMap[row.status] ?? row.status] ?? 'bg-status-pending';\n const pulseClass = row.status === 'running' ? ' animate-pulse' : '';\n return (\n <div className=\"flex items-center gap-2 min-w-0\">\n <span className={`w-1.5 h-1.5 shrink-0 rounded-full ${dotClass}${pulseClass}`} title={row.status} />\n <span className=\"font-mono text-xs text-text-primary truncate\">{row.workflow_id}</span>\n </div>\n );\n },\n },\n {\n key: 'entity',\n label: 'Type',\n render: (row) => <WorkflowPill type={row.entity} variant={tierMap.get(row.entity) ?? 'durable'} size=\"xs\" />,\n className: 'w-44 shrink-0',\n },\n {\n key: 'created_at',\n label: 'Created',\n render: (row) => <DateValue date={row.created_at} format=\"relative\" className=\"text-xs text-text-secondary whitespace-nowrap\" />,\n className: 'w-32',\n sortable: true,\n },\n {\n key: 'updated_at',\n label: 'Updated',\n render: (row) => <DateValue date={row.updated_at} format=\"relative\" className=\"text-xs text-text-secondary whitespace-nowrap\" />,\n className: 'w-32',\n sortable: true,\n },\n {\n key: 'duration',\n label: 'Duration',\n render: (row) => (\n <ElapsedCell\n startDate={row.created_at}\n endDate={row.status === 'running' ? null : row.updated_at}\n isLive={row.status === 'running'}\n />\n ),\n className: 'w-28',\n },\n {\n key: 'actions',\n label: '',\n render: (row) => (\n <RowActionGroup>\n <RowAction\n icon={Filter}\n title={`Filter by ${row.entity}`}\n onClick={() => onFilterEntity(row.entity)}\n />\n <button\n onClick={(e) => { e.stopPropagation(); onFilterStatus(row.status); }}\n className=\"opacity-0 group-hover/row:opacity-100 transition-opacity\"\n title={`Filter by ${row.status}`}\n >\n <svg className={`w-[18px] h-[18px] ${STATUS_COLORS[row.status] ?? 'text-text-tertiary'} hover:opacity-70`} viewBox=\"0 0 24 24\" fill=\"currentColor\">\n <circle cx=\"12\" cy=\"12\" r=\"6\" />\n </svg>\n </button>\n {isSuperAdmin && (\n <RowAction\n icon={Settings}\n title=\"View config\"\n onClick={() => navigate(`/workflows/registry/${encodeURIComponent(row.entity)}`)}\n />\n )}\n </RowActionGroup>\n ),\n className: 'w-24 text-right',\n },\n ];\n}\n\nexport function WorkflowsDashboard({ tier: initialTier = 'all' }: { tier?: ExecutionsTier }) {\n useWorkflowListEvents();\n const navigate = useNavigate();\n const { isSuperAdmin } = useAuth();\n const { namespace } = useNamespace();\n\n const { filters, setFilter, pagination, sort, setSort } = useFilterParams({\n filters: { search: '', entity: '', status: '', tier: initialTier },\n });\n\n const activeTier = (filters.tier || 'all') as ExecutionsTier;\n\n // Map tier to server-side registered filter\n const registeredFilter = activeTier === 'certified' ? 'true'\n : activeTier === 'durable' ? 'false'\n : undefined;\n\n const { data: configs } = useWorkflowConfigs();\n const { data: discoveredData } = useDiscoveredWorkflows();\n\n const tierMap = useMemo(() => {\n const map = new Map<string, WorkflowTier>();\n for (const dw of discoveredData ?? []) {\n map.set(dw.workflow_type, dw.tier ?? 'durable');\n }\n return map;\n }, [discoveredData]);\n\n const columns = buildColumns(\n (entity) => setFilter('entity', entity),\n (status) => setFilter('status', status),\n isSuperAdmin,\n navigate,\n tierMap,\n );\n const [searchInput, setSearchInput] = useState(filters.search);\n\n useEffect(() => {\n if (searchInput === filters.search) return;\n const timer = setTimeout(() => setFilter('search', searchInput), 300);\n return () => clearTimeout(timer);\n }, [searchInput, setFilter, filters.search]);\n\n const { data: jobsData, isLoading, refetch, isFetching } = useJobs({\n limit: pagination.pageSize,\n offset: pagination.offset,\n entity: filters.entity || undefined,\n search: filters.search || undefined,\n status: filters.status || undefined,\n sort_by: sort.sort_by || 'created_at',\n order: sort.order || 'desc',\n registered: registeredFilter,\n namespace: namespace || undefined,\n });\n\n const total = jobsData?.total ?? 0;\n const jobs = jobsData?.jobs ?? [];\n\n const entities = useMemo(() => {\n return [...new Set((configs ?? []).map((c) => c.workflow_type))].sort();\n }, [configs]);\n\n const pageTitle = 'Workflow Executions';\n\n const emptyMessage = activeTier === 'certified'\n ? 'No certified workflow executions found'\n : activeTier === 'durable'\n ? 'No durable workflow executions found'\n : 'No workflow executions found';\n\n return (\n <div>\n <PageHeader title={pageTitle} docsHash=\"#docs:dashboard.md:durable-executions\" />\n\n <FilterBar actions={\n <ListToolbar\n onRefresh={() => refetch()}\n isFetching={isFetching}\n apiPath={buildApiPath('/workflow-states/jobs', {\n limit: pagination.pageSize,\n offset: pagination.offset,\n entity: filters.entity || undefined,\n search: filters.search || undefined,\n status: filters.status || undefined,\n sort_by: sort.sort_by || 'created_at',\n order: sort.order || 'desc',\n registered: registeredFilter,\n namespace: namespace || undefined,\n })}\n />\n }>\n <input\n type=\"text\"\n placeholder=\"Search workflow ID...\"\n value={searchInput}\n onChange={(e) => setSearchInput(e.target.value)}\n className=\"input text-[11px] py-1 px-2 w-56\"\n />\n <FilterDivider />\n <FilterSelect\n label=\"Type\"\n value={filters.entity}\n onChange={(v) => setFilter('entity', v)}\n options={entities.map((e) => ({ value: e, label: e }))}\n />\n <FilterDivider />\n <FilterSelect\n label=\"Status\"\n value={filters.status}\n onChange={(v) => setFilter('status', v)}\n options={[\n { value: 'running', label: 'Running' },\n { value: 'completed', label: 'Completed' },\n { value: 'failed', label: 'Failed' },\n ]}\n />\n <FilterDivider />\n <FilterSelect\n label=\"Tier\"\n value={filters.tier === 'all' ? '' : filters.tier}\n onChange={(v) => setFilter('tier', v || 'all')}\n options={[\n { value: 'certified', label: 'Certified' },\n { value: 'durable', label: 'Durable' },\n ]}\n />\n </FilterBar>\n\n <DataTable\n columns={columns}\n data={jobs}\n keyFn={(row) => row.workflow_id}\n onRowClick={(row) => navigate(`/workflows/executions/${row.workflow_id}`)}\n isLoading={isLoading}\n emptyMessage={emptyMessage}\n sort={sort}\n onSort={setSort}\n />\n\n <StickyPagination\n page={pagination.page}\n totalPages={pagination.totalPages(total)}\n onPageChange={pagination.setPage}\n total={total}\n pageSize={pagination.pageSize}\n onPageSizeChange={pagination.setPageSize}\n />\n </div>\n );\n}\n"],"names":["jobStatusMap","STATUS_DOT","STATUS_COLORS","buildColumns","onFilterEntity","onFilterStatus","isSuperAdmin","navigate","tierMap","row","dotClass","pulseClass","jsxs","jsx","WorkflowPill","DateValue","ElapsedCell","RowActionGroup","RowAction","Filter","e","Settings","WorkflowsDashboard","initialTier","useWorkflowListEvents","useNavigate","useAuth","namespace","useNamespace","filters","setFilter","pagination","sort","setSort","useFilterParams","activeTier","registeredFilter","configs","useWorkflowConfigs","discoveredData","useDiscoveredWorkflows","useMemo","map","dw","columns","entity","status","searchInput","setSearchInput","useState","useEffect","timer","jobsData","isLoading","refetch","isFetching","useJobs","total","jobs","entities","c","pageTitle","emptyMessage","PageHeader","FilterBar","ListToolbar","buildApiPath","FilterDivider","FilterSelect","v","DataTable","StickyPagination"],"mappings":"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"}
@@ -1,2 +0,0 @@
1
- import{a as x,j as t}from"./vendor-query-B2UbickB.js";import{b as C,u as k}from"./workflows-Dps45zjk.js";import{b as $}from"./useEventHooks-BgdnN8Rj.js";import{P as D}from"./PageHeader-CFta2VaS.js";import{S as h}from"./StatCard-DlgF0CJC.js";import{c as w}from"./vendor-react-CXumBFUA.js";import"./index-BoZydcaW.js";import"./vendor-icons-BaQqUm-e.js";const v=[{label:"1h",ms:36e5},{label:"24h",ms:864e5},{label:"7d",ms:6048e5},{label:"30d",ms:2592e6}];function T(r){return r<1e3?`${Math.round(r)}ms`:r<6e4?`${(r/1e3).toFixed(1)}s`:r<36e5?`${(r/6e4).toFixed(1)}m`:`${(r/36e5).toFixed(1)}h`}function p({value:r,colorClass:o,onClick:f}){return r===0?t.jsx("span",{className:"text-text-tertiary",children:"0"}):t.jsx("button",{onClick:f,className:`${o} hover:underline tabular-nums font-medium`,children:r})}function _(){$();const r=w(),[o,f]=x.useState("24h"),{data:c}=C({limit:500}),{data:g}=k(),b=x.useMemo(()=>{const e=v.find(i=>i.label===o);return Date.now()-e.ms},[o]),n=x.useMemo(()=>((c==null?void 0:c.jobs)??[]).filter(e=>new Date(e.created_at).getTime()>=b),[c==null?void 0:c.jobs,b]),j=x.useMemo(()=>{const e=new Map;for(const a of n){const s=e.get(a.entity)??{total:0,running:0,completed:0,failed:0,durations:[]};if(s.total++,a.status==="running"&&s.running++,a.status==="completed"){s.completed++;const m=new Date(a.updated_at).getTime()-new Date(a.created_at).getTime();m>0&&s.durations.push(m)}a.status==="failed"&&s.failed++,e.set(a.entity,s)}const i=[];for(const[a,s]of e)i.push({type:a,...s,avgDuration:s.durations.length>0?s.durations.reduce((m,N)=>m+N,0)/s.durations.length:null});return i.sort((a,s)=>s.total-a.total)},[n]),u=x.useMemo(()=>({total:n.length,running:n.filter(e=>e.status==="running").length,completed:n.filter(e=>e.status==="completed").length,failed:n.filter(e=>e.status==="failed").length}),[n]),y=(g==null?void 0:g.length)??0,l=(e,i)=>{const a=new URLSearchParams;e&&a.set("entity",e),i&&a.set("status",i);const s=a.toString();r(`/workflows/executions${s?`?${s}`:""}`)},d="pb-2 text-[10px] font-semibold uppercase tracking-widest text-text-tertiary";return t.jsxs("div",{children:[t.jsx(D,{title:"Workflows",actions:t.jsxs("span",{className:"text-xs text-text-tertiary",children:[y," certified type",y!==1?"s":""]})}),t.jsx("div",{className:"flex items-center gap-1 mb-6",children:v.map(e=>t.jsx("button",{onClick:()=>f(e.label),className:`px-3 py-1 text-xs rounded-full transition-colors ${o===e.label?"bg-accent text-text-inverse":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:e.label},e.label))}),t.jsxs("div",{className:"grid grid-cols-4 gap-4 mb-8",children:[t.jsx(h,{label:"Total",value:u.total,onClick:()=>l()}),t.jsx(h,{label:"Running",value:u.running,colorClass:"text-status-active",onClick:()=>l(void 0,"running")}),t.jsx(h,{label:"Completed",value:u.completed,colorClass:"text-status-success",onClick:()=>l(void 0,"completed")}),t.jsx(h,{label:"Failed",value:u.failed,colorClass:"text-status-error",onClick:()=>l(void 0,"failed")})]}),j.length>0&&t.jsxs("table",{className:"w-full text-left",children:[t.jsx("thead",{children:t.jsxs("tr",{className:"border-b border-surface-border",children:[t.jsx("th",{className:d,children:"Type"}),t.jsx("th",{className:`${d} text-right w-20`,children:"Total"}),t.jsx("th",{className:`${d} text-right w-20`,children:"Running"}),t.jsx("th",{className:`${d} text-right w-24`,children:"Completed"}),t.jsx("th",{className:`${d} text-right w-20`,children:"Failed"}),t.jsx("th",{className:`${d} text-right w-28`,children:"Avg Duration"})]})}),t.jsx("tbody",{children:j.map(e=>t.jsxs("tr",{className:"border-b border-surface-border last:border-b-0",children:[t.jsx("td",{className:"py-3 text-sm font-mono text-text-primary",children:t.jsx("button",{onClick:()=>l(e.type),className:"hover:text-accent hover:underline",children:e.type})}),t.jsx("td",{className:"py-3 text-sm text-right",children:t.jsx(p,{value:e.total,colorClass:"text-text-secondary",onClick:()=>l(e.type)})}),t.jsx("td",{className:"py-3 text-sm text-right",children:t.jsx(p,{value:e.running,colorClass:"text-status-active",onClick:()=>l(e.type,"running")})}),t.jsx("td",{className:"py-3 text-sm text-right",children:t.jsx(p,{value:e.completed,colorClass:"text-status-success",onClick:()=>l(e.type,"completed")})}),t.jsx("td",{className:"py-3 text-sm text-right",children:t.jsx(p,{value:e.failed,colorClass:"text-status-error",onClick:()=>l(e.type,"failed")})}),t.jsx("td",{className:"py-3 text-sm font-mono text-text-secondary text-right",children:e.avgDuration!==null?T(e.avgDuration):"—"})]},e.type))})]}),j.length===0&&t.jsx("div",{className:"py-16 text-center",children:t.jsxs("p",{className:"text-sm text-text-tertiary",children:["No workflow activity in the last ",o]})})]})}export{_ as WorkflowsOverview};
2
- //# sourceMappingURL=WorkflowsOverview-ihhW8DiS.js.map
@@ -1,33 +0,0 @@
1
- import{j as p}from"./vendor-query-B2UbickB.js";import{c as vn,d as An}from"./yaml-workflows-DhlTkbvY.js";import{S as yn}from"./StatusBadge-D9MeQHrh.js";import{N as _n}from"./NamespacePill-DlqBTvFR.js";import{B as Cn,P as wn,a9 as bn,g as se,W as Sn,a2 as En,ag as Nn}from"./vendor-icons-BaQqUm-e.js";import{e as Fn,c as Tn}from"./vendor-react-CXumBFUA.js";import"./index-BoZydcaW.js";/*! js-yaml 4.1.1 https://github.com/nodeca/js-yaml @license MIT */function Te(e){return typeof e>"u"||e===null}function kn(e){return typeof e=="object"&&e!==null}function On(e){return Array.isArray(e)?e:Te(e)?[]:[e]}function In(e,n){var i,l,r,u;if(n)for(u=Object.keys(n),i=0,l=u.length;i<l;i+=1)r=u[i],e[r]=n[r];return e}function jn(e,n){var i="",l;for(l=0;l<n;l+=1)i+=e;return i}function Ln(e){return e===0&&Number.NEGATIVE_INFINITY===1/e}var Rn=Te,Dn=kn,Mn=On,Pn=jn,Yn=Ln,Bn=In,_={isNothing:Rn,isObject:Dn,toArray:Mn,repeat:Pn,isNegativeZero:Yn,extend:Bn};function ke(e,n){var i="",l=e.reason||"(unknown reason)";return e.mark?(e.mark.name&&(i+='in "'+e.mark.name+'" '),i+="("+(e.mark.line+1)+":"+(e.mark.column+1)+")",!n&&e.mark.snippet&&(i+=`
2
-
3
- `+e.mark.snippet),l+" "+i):l}function B(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=ke(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}B.prototype=Object.create(Error.prototype);B.prototype.constructor=B;B.prototype.toString=function(n){return this.name+": "+ke(this,n)};var b=B;function X(e,n,i,l,r){var u="",o="",c=Math.floor(r/2)-1;return l-n>c&&(u=" ... ",n=l-c+u.length),i-l>c&&(o=" ...",i=l+c-o.length),{str:u+e.slice(n,i).replace(/\t/g,"→")+o,pos:l-n+u.length}}function Z(e,n){return _.repeat(" ",n-e.length)+e}function Hn(e,n){if(n=Object.create(n||null),!e.buffer)return null;n.maxLength||(n.maxLength=79),typeof n.indent!="number"&&(n.indent=1),typeof n.linesBefore!="number"&&(n.linesBefore=3),typeof n.linesAfter!="number"&&(n.linesAfter=2);for(var i=/\r?\n|\r|\0/g,l=[0],r=[],u,o=-1;u=i.exec(e.buffer);)r.push(u.index),l.push(u.index+u[0].length),e.position<=u.index&&o<0&&(o=l.length-2);o<0&&(o=l.length-1);var c="",a,t,s=Math.min(e.line+n.linesAfter,r.length).toString().length,f=n.maxLength-(n.indent+s+3);for(a=1;a<=n.linesBefore&&!(o-a<0);a++)t=X(e.buffer,l[o-a],r[o-a],e.position-(l[o]-l[o-a]),f),c=_.repeat(" ",n.indent)+Z((e.line-a+1).toString(),s)+" | "+t.str+`
4
- `+c;for(t=X(e.buffer,l[o],r[o],e.position,f),c+=_.repeat(" ",n.indent)+Z((e.line+1).toString(),s)+" | "+t.str+`
5
- `,c+=_.repeat("-",n.indent+s+3+t.pos)+`^
6
- `,a=1;a<=n.linesAfter&&!(o+a>=r.length);a++)t=X(e.buffer,l[o+a],r[o+a],e.position-(l[o]-l[o+a]),f),c+=_.repeat(" ",n.indent)+Z((e.line+a+1).toString(),s)+" | "+t.str+`
7
- `;return c.replace(/\n$/,"")}var Un=Hn,qn=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],Kn=["scalar","sequence","mapping"];function Wn(e){var n={};return e!==null&&Object.keys(e).forEach(function(i){e[i].forEach(function(l){n[String(l)]=i})}),n}function Gn(e,n){if(n=n||{},Object.keys(n).forEach(function(i){if(qn.indexOf(i)===-1)throw new b('Unknown option "'+i+'" is met in definition of "'+e+'" YAML type.')}),this.options=n,this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(i){return i},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.representName=n.representName||null,this.defaultStyle=n.defaultStyle||null,this.multi=n.multi||!1,this.styleAliases=Wn(n.styleAliases||null),Kn.indexOf(this.kind)===-1)throw new b('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}var C=Gn;function de(e,n){var i=[];return e[n].forEach(function(l){var r=i.length;i.forEach(function(u,o){u.tag===l.tag&&u.kind===l.kind&&u.multi===l.multi&&(r=o)}),i[r]=l}),i}function $n(){var e={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},n,i;function l(r){r.multi?(e.multi[r.kind].push(r),e.multi.fallback.push(r)):e[r.kind][r.tag]=e.fallback[r.tag]=r}for(n=0,i=arguments.length;n<i;n+=1)arguments[n].forEach(l);return e}function ee(e){return this.extend(e)}ee.prototype.extend=function(n){var i=[],l=[];if(n instanceof C)l.push(n);else if(Array.isArray(n))l=l.concat(n);else if(n&&(Array.isArray(n.implicit)||Array.isArray(n.explicit)))n.implicit&&(i=i.concat(n.implicit)),n.explicit&&(l=l.concat(n.explicit));else throw new b("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.forEach(function(u){if(!(u instanceof C))throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(u.loadKind&&u.loadKind!=="scalar")throw new b("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(u.multi)throw new b("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),l.forEach(function(u){if(!(u instanceof C))throw new b("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var r=Object.create(ee.prototype);return r.implicit=(this.implicit||[]).concat(i),r.explicit=(this.explicit||[]).concat(l),r.compiledImplicit=de(r,"implicit"),r.compiledExplicit=de(r,"explicit"),r.compiledTypeMap=$n(r.compiledImplicit,r.compiledExplicit),r};var Oe=ee,Ie=new C("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}}),je=new C("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}}),Le=new C("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}}),Re=new Oe({explicit:[Ie,je,Le]});function Qn(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function Vn(){return null}function Xn(e){return e===null}var De=new C("tag:yaml.org,2002:null",{kind:"scalar",resolve:Qn,construct:Vn,predicate:Xn,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function Zn(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function zn(e){return e==="true"||e==="True"||e==="TRUE"}function Jn(e){return Object.prototype.toString.call(e)==="[object Boolean]"}var Me=new C("tag:yaml.org,2002:bool",{kind:"scalar",resolve:Zn,construct:zn,predicate:Jn,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"});function ei(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function ni(e){return 48<=e&&e<=55}function ii(e){return 48<=e&&e<=57}function ri(e){if(e===null)return!1;var n=e.length,i=0,l=!1,r;if(!n)return!1;if(r=e[i],(r==="-"||r==="+")&&(r=e[++i]),r==="0"){if(i+1===n)return!0;if(r=e[++i],r==="b"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(r!=="0"&&r!=="1")return!1;l=!0}return l&&r!=="_"}if(r==="x"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!ei(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}if(r==="o"){for(i++;i<n;i++)if(r=e[i],r!=="_"){if(!ni(e.charCodeAt(i)))return!1;l=!0}return l&&r!=="_"}}if(r==="_")return!1;for(;i<n;i++)if(r=e[i],r!=="_"){if(!ii(e.charCodeAt(i)))return!1;l=!0}return!(!l||r==="_")}function li(e){var n=e,i=1,l;if(n.indexOf("_")!==-1&&(n=n.replace(/_/g,"")),l=n[0],(l==="-"||l==="+")&&(l==="-"&&(i=-1),n=n.slice(1),l=n[0]),n==="0")return 0;if(l==="0"){if(n[1]==="b")return i*parseInt(n.slice(2),2);if(n[1]==="x")return i*parseInt(n.slice(2),16);if(n[1]==="o")return i*parseInt(n.slice(2),8)}return i*parseInt(n,10)}function oi(e){return Object.prototype.toString.call(e)==="[object Number]"&&e%1===0&&!_.isNegativeZero(e)}var Pe=new C("tag:yaml.org,2002:int",{kind:"scalar",resolve:ri,construct:li,predicate:oi,represent:{binary:function(e){return e>=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0o"+e.toString(8):"-0o"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),ui=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function ci(e){return!(e===null||!ui.test(e)||e[e.length-1]==="_")}function ai(e){var n,i;return n=e.replace(/_/g,"").toLowerCase(),i=n[0]==="-"?-1:1,"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?i===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:i*parseFloat(n,10)}var ti=/^[-+]?[0-9]+e/;function fi(e,n){var i;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(_.isNegativeZero(e))return"-0.0";return i=e.toString(10),ti.test(i)?i.replace("e",".e"):i}function pi(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!==0||_.isNegativeZero(e))}var Ye=new C("tag:yaml.org,2002:float",{kind:"scalar",resolve:ci,construct:ai,predicate:pi,represent:fi,defaultStyle:"lowercase"}),Be=Re.extend({implicit:[De,Me,Pe,Ye]}),He=Be,Ue=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),qe=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function si(e){return e===null?!1:Ue.exec(e)!==null||qe.exec(e)!==null}function di(e){var n,i,l,r,u,o,c,a=0,t=null,s,f,h;if(n=Ue.exec(e),n===null&&(n=qe.exec(e)),n===null)throw new Error("Date resolve error");if(i=+n[1],l=+n[2]-1,r=+n[3],!n[4])return new Date(Date.UTC(i,l,r));if(u=+n[4],o=+n[5],c=+n[6],n[7]){for(a=n[7].slice(0,3);a.length<3;)a+="0";a=+a}return n[9]&&(s=+n[10],f=+(n[11]||0),t=(s*60+f)*6e4,n[9]==="-"&&(t=-t)),h=new Date(Date.UTC(i,l,r,u,o,c,a)),t&&h.setTime(h.getTime()-t),h}function hi(e){return e.toISOString()}var Ke=new C("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:si,construct:di,instanceOf:Date,represent:hi});function xi(e){return e==="<<"||e===null}var We=new C("tag:yaml.org,2002:merge",{kind:"scalar",resolve:xi}),ue=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
8
- \r`;function mi(e){if(e===null)return!1;var n,i,l=0,r=e.length,u=ue;for(i=0;i<r;i++)if(n=u.indexOf(e.charAt(i)),!(n>64)){if(n<0)return!1;l+=6}return l%8===0}function gi(e){var n,i,l=e.replace(/[\r\n=]/g,""),r=l.length,u=ue,o=0,c=[];for(n=0;n<r;n++)n%4===0&&n&&(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)),o=o<<6|u.indexOf(l.charAt(n));return i=r%4*6,i===0?(c.push(o>>16&255),c.push(o>>8&255),c.push(o&255)):i===18?(c.push(o>>10&255),c.push(o>>2&255)):i===12&&c.push(o>>4&255),new Uint8Array(c)}function vi(e){var n="",i=0,l,r,u=e.length,o=ue;for(l=0;l<u;l++)l%3===0&&l&&(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]),i=(i<<8)+e[l];return r=u%3,r===0?(n+=o[i>>18&63],n+=o[i>>12&63],n+=o[i>>6&63],n+=o[i&63]):r===2?(n+=o[i>>10&63],n+=o[i>>4&63],n+=o[i<<2&63],n+=o[64]):r===1&&(n+=o[i>>2&63],n+=o[i<<4&63],n+=o[64],n+=o[64]),n}function Ai(e){return Object.prototype.toString.call(e)==="[object Uint8Array]"}var Ge=new C("tag:yaml.org,2002:binary",{kind:"scalar",resolve:mi,construct:gi,predicate:Ai,represent:vi}),yi=Object.prototype.hasOwnProperty,_i=Object.prototype.toString;function Ci(e){if(e===null)return!0;var n=[],i,l,r,u,o,c=e;for(i=0,l=c.length;i<l;i+=1){if(r=c[i],o=!1,_i.call(r)!=="[object Object]")return!1;for(u in r)if(yi.call(r,u))if(!o)o=!0;else return!1;if(!o)return!1;if(n.indexOf(u)===-1)n.push(u);else return!1}return!0}function wi(e){return e!==null?e:[]}var $e=new C("tag:yaml.org,2002:omap",{kind:"sequence",resolve:Ci,construct:wi}),bi=Object.prototype.toString;function Si(e){if(e===null)return!0;var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1){if(l=o[n],bi.call(l)!=="[object Object]"||(r=Object.keys(l),r.length!==1))return!1;u[n]=[r[0],l[r[0]]]}return!0}function Ei(e){if(e===null)return[];var n,i,l,r,u,o=e;for(u=new Array(o.length),n=0,i=o.length;n<i;n+=1)l=o[n],r=Object.keys(l),u[n]=[r[0],l[r[0]]];return u}var Qe=new C("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:Si,construct:Ei}),Ni=Object.prototype.hasOwnProperty;function Fi(e){if(e===null)return!0;var n,i=e;for(n in i)if(Ni.call(i,n)&&i[n]!==null)return!1;return!0}function Ti(e){return e!==null?e:{}}var Ve=new C("tag:yaml.org,2002:set",{kind:"mapping",resolve:Fi,construct:Ti}),ce=He.extend({implicit:[Ke,We],explicit:[Ge,$e,Qe,Ve]}),k=Object.prototype.hasOwnProperty,K=1,Xe=2,Ze=3,W=4,z=1,ki=2,he=3,Oi=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,Ii=/[\x85\u2028\u2029]/,ji=/[,\[\]\{\}]/,ze=/^(?:!|!!|![a-z\-]+!)$/i,Je=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function xe(e){return Object.prototype.toString.call(e)}function N(e){return e===10||e===13}function O(e){return e===9||e===32}function S(e){return e===9||e===32||e===10||e===13}function D(e){return e===44||e===91||e===93||e===123||e===125}function Li(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function Ri(e){return e===120?2:e===117?4:e===85?8:0}function Di(e){return 48<=e&&e<=57?e-48:-1}function me(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?`
9
- `:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"\x1B":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"…":e===95?" ":e===76?"\u2028":e===80?"\u2029":""}function Mi(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}function en(e,n,i){n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:i}):e[n]=i}var nn=new Array(256),rn=new Array(256);for(var I=0;I<256;I++)nn[I]=me(I)?1:0,rn[I]=me(I);function Pi(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||ce,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function ln(e,n){var i={name:e.filename,buffer:e.input.slice(0,-1),position:e.position,line:e.line,column:e.position-e.lineStart};return i.snippet=Un(i),new b(n,i)}function d(e,n){throw ln(e,n)}function G(e,n){e.onWarning&&e.onWarning.call(null,ln(e,n))}var ge={YAML:function(n,i,l){var r,u,o;n.version!==null&&d(n,"duplication of %YAML directive"),l.length!==1&&d(n,"YAML directive accepts exactly one argument"),r=/^([0-9]+)\.([0-9]+)$/.exec(l[0]),r===null&&d(n,"ill-formed argument of the YAML directive"),u=parseInt(r[1],10),o=parseInt(r[2],10),u!==1&&d(n,"unacceptable YAML version of the document"),n.version=l[0],n.checkLineBreaks=o<2,o!==1&&o!==2&&G(n,"unsupported YAML version of the document")},TAG:function(n,i,l){var r,u;l.length!==2&&d(n,"TAG directive accepts exactly two arguments"),r=l[0],u=l[1],ze.test(r)||d(n,"ill-formed tag handle (first argument) of the TAG directive"),k.call(n.tagMap,r)&&d(n,'there is a previously declared suffix for "'+r+'" tag handle'),Je.test(u)||d(n,"ill-formed tag prefix (second argument) of the TAG directive");try{u=decodeURIComponent(u)}catch{d(n,"tag prefix is malformed: "+u)}n.tagMap[r]=u}};function T(e,n,i,l){var r,u,o,c;if(n<i){if(c=e.input.slice(n,i),l)for(r=0,u=c.length;r<u;r+=1)o=c.charCodeAt(r),o===9||32<=o&&o<=1114111||d(e,"expected valid JSON character");else Oi.test(c)&&d(e,"the stream contains non-printable characters");e.result+=c}}function ve(e,n,i,l){var r,u,o,c;for(_.isObject(i)||d(e,"cannot merge mappings; the provided source object is unacceptable"),r=Object.keys(i),o=0,c=r.length;o<c;o+=1)u=r[o],k.call(n,u)||(en(n,u,i[u]),l[u]=!0)}function M(e,n,i,l,r,u,o,c,a){var t,s;if(Array.isArray(r))for(r=Array.prototype.slice.call(r),t=0,s=r.length;t<s;t+=1)Array.isArray(r[t])&&d(e,"nested arrays are not supported inside keys"),typeof r=="object"&&xe(r[t])==="[object Object]"&&(r[t]="[object Object]");if(typeof r=="object"&&xe(r)==="[object Object]"&&(r="[object Object]"),r=String(r),n===null&&(n={}),l==="tag:yaml.org,2002:merge")if(Array.isArray(u))for(t=0,s=u.length;t<s;t+=1)ve(e,n,u[t],i);else ve(e,n,u,i);else!e.json&&!k.call(i,r)&&k.call(n,r)&&(e.line=o||e.line,e.lineStart=c||e.lineStart,e.position=a||e.position,d(e,"duplicated mapping key")),en(n,r,u),delete i[r];return n}function ae(e){var n;n=e.input.charCodeAt(e.position),n===10?e.position++:n===13?(e.position++,e.input.charCodeAt(e.position)===10&&e.position++):d(e,"a line break is expected"),e.line+=1,e.lineStart=e.position,e.firstTabInLine=-1}function y(e,n,i){for(var l=0,r=e.input.charCodeAt(e.position);r!==0;){for(;O(r);)r===9&&e.firstTabInLine===-1&&(e.firstTabInLine=e.position),r=e.input.charCodeAt(++e.position);if(n&&r===35)do r=e.input.charCodeAt(++e.position);while(r!==10&&r!==13&&r!==0);if(N(r))for(ae(e),r=e.input.charCodeAt(e.position),l++,e.lineIndent=0;r===32;)e.lineIndent++,r=e.input.charCodeAt(++e.position);else break}return i!==-1&&l!==0&&e.lineIndent<i&&G(e,"deficient indentation"),l}function V(e){var n=e.position,i;return i=e.input.charCodeAt(n),!!((i===45||i===46)&&i===e.input.charCodeAt(n+1)&&i===e.input.charCodeAt(n+2)&&(n+=3,i=e.input.charCodeAt(n),i===0||S(i)))}function te(e,n){n===1?e.result+=" ":n>1&&(e.result+=_.repeat(`
10
- `,n-1))}function Yi(e,n,i){var l,r,u,o,c,a,t,s,f=e.kind,h=e.result,x;if(x=e.input.charCodeAt(e.position),S(x)||D(x)||x===35||x===38||x===42||x===33||x===124||x===62||x===39||x===34||x===37||x===64||x===96||(x===63||x===45)&&(r=e.input.charCodeAt(e.position+1),S(r)||i&&D(r)))return!1;for(e.kind="scalar",e.result="",u=o=e.position,c=!1;x!==0;){if(x===58){if(r=e.input.charCodeAt(e.position+1),S(r)||i&&D(r))break}else if(x===35){if(l=e.input.charCodeAt(e.position-1),S(l))break}else{if(e.position===e.lineStart&&V(e)||i&&D(x))break;if(N(x))if(a=e.line,t=e.lineStart,s=e.lineIndent,y(e,!1,-1),e.lineIndent>=n){c=!0,x=e.input.charCodeAt(e.position);continue}else{e.position=o,e.line=a,e.lineStart=t,e.lineIndent=s;break}}c&&(T(e,u,o,!1),te(e,e.line-a),u=o=e.position,c=!1),O(x)||(o=e.position+1),x=e.input.charCodeAt(++e.position)}return T(e,u,o,!1),e.result?!0:(e.kind=f,e.result=h,!1)}function Bi(e,n){var i,l,r;if(i=e.input.charCodeAt(e.position),i!==39)return!1;for(e.kind="scalar",e.result="",e.position++,l=r=e.position;(i=e.input.charCodeAt(e.position))!==0;)if(i===39)if(T(e,l,e.position,!0),i=e.input.charCodeAt(++e.position),i===39)l=e.position,e.position++,r=e.position;else return!0;else N(i)?(T(e,l,r,!0),te(e,y(e,!1,n)),l=r=e.position):e.position===e.lineStart&&V(e)?d(e,"unexpected end of the document within a single quoted scalar"):(e.position++,r=e.position);d(e,"unexpected end of the stream within a single quoted scalar")}function Hi(e,n){var i,l,r,u,o,c;if(c=e.input.charCodeAt(e.position),c!==34)return!1;for(e.kind="scalar",e.result="",e.position++,i=l=e.position;(c=e.input.charCodeAt(e.position))!==0;){if(c===34)return T(e,i,e.position,!0),e.position++,!0;if(c===92){if(T(e,i,e.position,!0),c=e.input.charCodeAt(++e.position),N(c))y(e,!1,n);else if(c<256&&nn[c])e.result+=rn[c],e.position++;else if((o=Ri(c))>0){for(r=o,u=0;r>0;r--)c=e.input.charCodeAt(++e.position),(o=Li(c))>=0?u=(u<<4)+o:d(e,"expected hexadecimal character");e.result+=Mi(u),e.position++}else d(e,"unknown escape sequence");i=l=e.position}else N(c)?(T(e,i,l,!0),te(e,y(e,!1,n)),i=l=e.position):e.position===e.lineStart&&V(e)?d(e,"unexpected end of the document within a double quoted scalar"):(e.position++,l=e.position)}d(e,"unexpected end of the stream within a double quoted scalar")}function Ui(e,n){var i=!0,l,r,u,o=e.tag,c,a=e.anchor,t,s,f,h,x,m=Object.create(null),v,A,E,g;if(g=e.input.charCodeAt(e.position),g===91)s=93,x=!1,c=[];else if(g===123)s=125,x=!0,c={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=c),g=e.input.charCodeAt(++e.position);g!==0;){if(y(e,!0,n),g=e.input.charCodeAt(e.position),g===s)return e.position++,e.tag=o,e.anchor=a,e.kind=x?"mapping":"sequence",e.result=c,!0;i?g===44&&d(e,"expected the node content, but found ','"):d(e,"missed comma between flow collection entries"),A=v=E=null,f=h=!1,g===63&&(t=e.input.charCodeAt(e.position+1),S(t)&&(f=h=!0,e.position++,y(e,!0,n))),l=e.line,r=e.lineStart,u=e.position,P(e,n,K,!1,!0),A=e.tag,v=e.result,y(e,!0,n),g=e.input.charCodeAt(e.position),(h||e.line===l)&&g===58&&(f=!0,g=e.input.charCodeAt(++e.position),y(e,!0,n),P(e,n,K,!1,!0),E=e.result),x?M(e,c,m,A,v,E,l,r,u):f?c.push(M(e,null,m,A,v,E,l,r,u)):c.push(v),y(e,!0,n),g=e.input.charCodeAt(e.position),g===44?(i=!0,g=e.input.charCodeAt(++e.position)):i=!1}d(e,"unexpected end of the stream within a flow collection")}function qi(e,n){var i,l,r=z,u=!1,o=!1,c=n,a=0,t=!1,s,f;if(f=e.input.charCodeAt(e.position),f===124)l=!1;else if(f===62)l=!0;else return!1;for(e.kind="scalar",e.result="";f!==0;)if(f=e.input.charCodeAt(++e.position),f===43||f===45)z===r?r=f===43?he:ki:d(e,"repeat of a chomping mode identifier");else if((s=Di(f))>=0)s===0?d(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):o?d(e,"repeat of an indentation width identifier"):(c=n+s-1,o=!0);else break;if(O(f)){do f=e.input.charCodeAt(++e.position);while(O(f));if(f===35)do f=e.input.charCodeAt(++e.position);while(!N(f)&&f!==0)}for(;f!==0;){for(ae(e),e.lineIndent=0,f=e.input.charCodeAt(e.position);(!o||e.lineIndent<c)&&f===32;)e.lineIndent++,f=e.input.charCodeAt(++e.position);if(!o&&e.lineIndent>c&&(c=e.lineIndent),N(f)){a++;continue}if(e.lineIndent<c){r===he?e.result+=_.repeat(`
11
- `,u?1+a:a):r===z&&u&&(e.result+=`
12
- `);break}for(l?O(f)?(t=!0,e.result+=_.repeat(`
13
- `,u?1+a:a)):t?(t=!1,e.result+=_.repeat(`
14
- `,a+1)):a===0?u&&(e.result+=" "):e.result+=_.repeat(`
15
- `,a):e.result+=_.repeat(`
16
- `,u?1+a:a),u=!0,o=!0,a=0,i=e.position;!N(f)&&f!==0;)f=e.input.charCodeAt(++e.position);T(e,i,e.position,!1)}return!0}function Ae(e,n){var i,l=e.tag,r=e.anchor,u=[],o,c=!1,a;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=u),a=e.input.charCodeAt(e.position);a!==0&&(e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,d(e,"tab characters must not be used in indentation")),!(a!==45||(o=e.input.charCodeAt(e.position+1),!S(o))));){if(c=!0,e.position++,y(e,!0,-1)&&e.lineIndent<=n){u.push(null),a=e.input.charCodeAt(e.position);continue}if(i=e.line,P(e,n,Ze,!1,!0),u.push(e.result),y(e,!0,-1),a=e.input.charCodeAt(e.position),(e.line===i||e.lineIndent>n)&&a!==0)d(e,"bad indentation of a sequence entry");else if(e.lineIndent<n)break}return c?(e.tag=l,e.anchor=r,e.kind="sequence",e.result=u,!0):!1}function Ki(e,n,i){var l,r,u,o,c,a,t=e.tag,s=e.anchor,f={},h=Object.create(null),x=null,m=null,v=null,A=!1,E=!1,g;if(e.firstTabInLine!==-1)return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=f),g=e.input.charCodeAt(e.position);g!==0;){if(!A&&e.firstTabInLine!==-1&&(e.position=e.firstTabInLine,d(e,"tab characters must not be used in indentation")),l=e.input.charCodeAt(e.position+1),u=e.line,(g===63||g===58)&&S(l))g===63?(A&&(M(e,f,h,x,m,null,o,c,a),x=m=v=null),E=!0,A=!0,r=!0):A?(A=!1,r=!0):d(e,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),e.position+=1,g=l;else{if(o=e.line,c=e.lineStart,a=e.position,!P(e,i,Xe,!1,!0))break;if(e.line===u){for(g=e.input.charCodeAt(e.position);O(g);)g=e.input.charCodeAt(++e.position);if(g===58)g=e.input.charCodeAt(++e.position),S(g)||d(e,"a whitespace character is expected after the key-value separator within a block mapping"),A&&(M(e,f,h,x,m,null,o,c,a),x=m=v=null),E=!0,A=!1,r=!1,x=e.tag,m=e.result;else if(E)d(e,"can not read an implicit mapping pair; a colon is missed");else return e.tag=t,e.anchor=s,!0}else if(E)d(e,"can not read a block mapping entry; a multiline key may not be an implicit key");else return e.tag=t,e.anchor=s,!0}if((e.line===u||e.lineIndent>n)&&(A&&(o=e.line,c=e.lineStart,a=e.position),P(e,n,W,!0,r)&&(A?m=e.result:v=e.result),A||(M(e,f,h,x,m,v,o,c,a),x=m=v=null),y(e,!0,-1),g=e.input.charCodeAt(e.position)),(e.line===u||e.lineIndent>n)&&g!==0)d(e,"bad indentation of a mapping entry");else if(e.lineIndent<n)break}return A&&M(e,f,h,x,m,null,o,c,a),E&&(e.tag=t,e.anchor=s,e.kind="mapping",e.result=f),E}function Wi(e){var n,i=!1,l=!1,r,u,o;if(o=e.input.charCodeAt(e.position),o!==33)return!1;if(e.tag!==null&&d(e,"duplication of a tag property"),o=e.input.charCodeAt(++e.position),o===60?(i=!0,o=e.input.charCodeAt(++e.position)):o===33?(l=!0,r="!!",o=e.input.charCodeAt(++e.position)):r="!",n=e.position,i){do o=e.input.charCodeAt(++e.position);while(o!==0&&o!==62);e.position<e.length?(u=e.input.slice(n,e.position),o=e.input.charCodeAt(++e.position)):d(e,"unexpected end of the stream within a verbatim tag")}else{for(;o!==0&&!S(o);)o===33&&(l?d(e,"tag suffix cannot contain exclamation marks"):(r=e.input.slice(n-1,e.position+1),ze.test(r)||d(e,"named tag handle cannot contain such characters"),l=!0,n=e.position+1)),o=e.input.charCodeAt(++e.position);u=e.input.slice(n,e.position),ji.test(u)&&d(e,"tag suffix cannot contain flow indicator characters")}u&&!Je.test(u)&&d(e,"tag name cannot contain such characters: "+u);try{u=decodeURIComponent(u)}catch{d(e,"tag name is malformed: "+u)}return i?e.tag=u:k.call(e.tagMap,r)?e.tag=e.tagMap[r]+u:r==="!"?e.tag="!"+u:r==="!!"?e.tag="tag:yaml.org,2002:"+u:d(e,'undeclared tag handle "'+r+'"'),!0}function Gi(e){var n,i;if(i=e.input.charCodeAt(e.position),i!==38)return!1;for(e.anchor!==null&&d(e,"duplication of an anchor property"),i=e.input.charCodeAt(++e.position),n=e.position;i!==0&&!S(i)&&!D(i);)i=e.input.charCodeAt(++e.position);return e.position===n&&d(e,"name of an anchor node must contain at least one character"),e.anchor=e.input.slice(n,e.position),!0}function $i(e){var n,i,l;if(l=e.input.charCodeAt(e.position),l!==42)return!1;for(l=e.input.charCodeAt(++e.position),n=e.position;l!==0&&!S(l)&&!D(l);)l=e.input.charCodeAt(++e.position);return e.position===n&&d(e,"name of an alias node must contain at least one character"),i=e.input.slice(n,e.position),k.call(e.anchorMap,i)||d(e,'unidentified alias "'+i+'"'),e.result=e.anchorMap[i],y(e,!0,-1),!0}function P(e,n,i,l,r){var u,o,c,a=1,t=!1,s=!1,f,h,x,m,v,A;if(e.listener!==null&&e.listener("open",e),e.tag=null,e.anchor=null,e.kind=null,e.result=null,u=o=c=W===i||Ze===i,l&&y(e,!0,-1)&&(t=!0,e.lineIndent>n?a=1:e.lineIndent===n?a=0:e.lineIndent<n&&(a=-1)),a===1)for(;Wi(e)||Gi(e);)y(e,!0,-1)?(t=!0,c=u,e.lineIndent>n?a=1:e.lineIndent===n?a=0:e.lineIndent<n&&(a=-1)):c=!1;if(c&&(c=t||r),(a===1||W===i)&&(K===i||Xe===i?v=n:v=n+1,A=e.position-e.lineStart,a===1?c&&(Ae(e,A)||Ki(e,A,v))||Ui(e,v)?s=!0:(o&&qi(e,v)||Bi(e,v)||Hi(e,v)?s=!0:$i(e)?(s=!0,(e.tag!==null||e.anchor!==null)&&d(e,"alias node should not have any properties")):Yi(e,v,K===i)&&(s=!0,e.tag===null&&(e.tag="?")),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):a===0&&(s=c&&Ae(e,A))),e.tag===null)e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);else if(e.tag==="?"){for(e.result!==null&&e.kind!=="scalar"&&d(e,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+e.kind+'"'),f=0,h=e.implicitTypes.length;f<h;f+=1)if(m=e.implicitTypes[f],m.resolve(e.result)){e.result=m.construct(e.result),e.tag=m.tag,e.anchor!==null&&(e.anchorMap[e.anchor]=e.result);break}}else if(e.tag!=="!"){if(k.call(e.typeMap[e.kind||"fallback"],e.tag))m=e.typeMap[e.kind||"fallback"][e.tag];else for(m=null,x=e.typeMap.multi[e.kind||"fallback"],f=0,h=x.length;f<h;f+=1)if(e.tag.slice(0,x[f].tag.length)===x[f].tag){m=x[f];break}m||d(e,"unknown tag !<"+e.tag+">"),e.result!==null&&m.kind!==e.kind&&d(e,"unacceptable node kind for !<"+e.tag+'> tag; it should be "'+m.kind+'", not "'+e.kind+'"'),m.resolve(e.result,e.tag)?(e.result=m.construct(e.result,e.tag),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):d(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")}return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||s}function Qi(e){var n=e.position,i,l,r,u=!1,o;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);(o=e.input.charCodeAt(e.position))!==0&&(y(e,!0,-1),o=e.input.charCodeAt(e.position),!(e.lineIndent>0||o!==37));){for(u=!0,o=e.input.charCodeAt(++e.position),i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);for(l=e.input.slice(i,e.position),r=[],l.length<1&&d(e,"directive name must not be less than one character in length");o!==0;){for(;O(o);)o=e.input.charCodeAt(++e.position);if(o===35){do o=e.input.charCodeAt(++e.position);while(o!==0&&!N(o));break}if(N(o))break;for(i=e.position;o!==0&&!S(o);)o=e.input.charCodeAt(++e.position);r.push(e.input.slice(i,e.position))}o!==0&&ae(e),k.call(ge,l)?ge[l](e,l,r):G(e,'unknown document directive "'+l+'"')}if(y(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,y(e,!0,-1)):u&&d(e,"directives end mark is expected"),P(e,e.lineIndent-1,W,!1,!0),y(e,!0,-1),e.checkLineBreaks&&Ii.test(e.input.slice(n,e.position))&&G(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&V(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,y(e,!0,-1));return}if(e.position<e.length-1)d(e,"end of the stream or a document separator is expected");else return}function on(e,n){e=String(e),n=n||{},e.length!==0&&(e.charCodeAt(e.length-1)!==10&&e.charCodeAt(e.length-1)!==13&&(e+=`
17
- `),e.charCodeAt(0)===65279&&(e=e.slice(1)));var i=new Pi(e,n),l=e.indexOf("\0");for(l!==-1&&(i.position=l,d(i,"null byte is not allowed in input")),i.input+="\0";i.input.charCodeAt(i.position)===32;)i.lineIndent+=1,i.position+=1;for(;i.position<i.length-1;)Qi(i);return i.documents}function Vi(e,n,i){n!==null&&typeof n=="object"&&typeof i>"u"&&(i=n,n=null);var l=on(e,i);if(typeof n!="function")return l;for(var r=0,u=l.length;r<u;r+=1)n(l[r])}function Xi(e,n){var i=on(e,n);if(i.length!==0){if(i.length===1)return i[0];throw new b("expected a single document in the stream, but found more")}}var Zi=Vi,zi=Xi,un={loadAll:Zi,load:zi},cn=Object.prototype.toString,an=Object.prototype.hasOwnProperty,fe=65279,Ji=9,H=10,er=13,nr=32,ir=33,rr=34,ne=35,lr=37,or=38,ur=39,cr=42,tn=44,ar=45,$=58,tr=61,fr=62,pr=63,sr=64,fn=91,pn=93,dr=96,sn=123,hr=124,dn=125,w={};w[0]="\\0";w[7]="\\a";w[8]="\\b";w[9]="\\t";w[10]="\\n";w[11]="\\v";w[12]="\\f";w[13]="\\r";w[27]="\\e";w[34]='\\"';w[92]="\\\\";w[133]="\\N";w[160]="\\_";w[8232]="\\L";w[8233]="\\P";var xr=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],mr=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function gr(e,n){var i,l,r,u,o,c,a;if(n===null)return{};for(i={},l=Object.keys(n),r=0,u=l.length;r<u;r+=1)o=l[r],c=String(n[o]),o.slice(0,2)==="!!"&&(o="tag:yaml.org,2002:"+o.slice(2)),a=e.compiledTypeMap.fallback[o],a&&an.call(a.styleAliases,c)&&(c=a.styleAliases[c]),i[o]=c;return i}function vr(e){var n,i,l;if(n=e.toString(16).toUpperCase(),e<=255)i="x",l=2;else if(e<=65535)i="u",l=4;else if(e<=4294967295)i="U",l=8;else throw new b("code point within a string may not be greater than 0xFFFFFFFF");return"\\"+i+_.repeat("0",l-n.length)+n}var Ar=1,U=2;function yr(e){this.schema=e.schema||ce,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=_.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=gr(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType=e.quotingType==='"'?U:Ar,this.forceQuotes=e.forceQuotes||!1,this.replacer=typeof e.replacer=="function"?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function ye(e,n){for(var i=_.repeat(" ",n),l=0,r=-1,u="",o,c=e.length;l<c;)r=e.indexOf(`
18
- `,l),r===-1?(o=e.slice(l),l=c):(o=e.slice(l,r+1),l=r+1),o.length&&o!==`
19
- `&&(u+=i),u+=o;return u}function ie(e,n){return`
20
- `+_.repeat(" ",e.indent*n)}function _r(e,n){var i,l,r;for(i=0,l=e.implicitTypes.length;i<l;i+=1)if(r=e.implicitTypes[i],r.resolve(n))return!0;return!1}function Q(e){return e===nr||e===Ji}function q(e){return 32<=e&&e<=126||161<=e&&e<=55295&&e!==8232&&e!==8233||57344<=e&&e<=65533&&e!==fe||65536<=e&&e<=1114111}function _e(e){return q(e)&&e!==fe&&e!==er&&e!==H}function Ce(e,n,i){var l=_e(e),r=l&&!Q(e);return(i?l:l&&e!==tn&&e!==fn&&e!==pn&&e!==sn&&e!==dn)&&e!==ne&&!(n===$&&!r)||_e(n)&&!Q(n)&&e===ne||n===$&&r}function Cr(e){return q(e)&&e!==fe&&!Q(e)&&e!==ar&&e!==pr&&e!==$&&e!==tn&&e!==fn&&e!==pn&&e!==sn&&e!==dn&&e!==ne&&e!==or&&e!==cr&&e!==ir&&e!==hr&&e!==tr&&e!==fr&&e!==ur&&e!==rr&&e!==lr&&e!==sr&&e!==dr}function wr(e){return!Q(e)&&e!==$}function Y(e,n){var i=e.charCodeAt(n),l;return i>=55296&&i<=56319&&n+1<e.length&&(l=e.charCodeAt(n+1),l>=56320&&l<=57343)?(i-55296)*1024+l-56320+65536:i}function hn(e){var n=/^\n* /;return n.test(e)}var xn=1,re=2,mn=3,gn=4,R=5;function br(e,n,i,l,r,u,o,c){var a,t=0,s=null,f=!1,h=!1,x=l!==-1,m=-1,v=Cr(Y(e,0))&&wr(Y(e,e.length-1));if(n||o)for(a=0;a<e.length;t>=65536?a+=2:a++){if(t=Y(e,a),!q(t))return R;v=v&&Ce(t,s,c),s=t}else{for(a=0;a<e.length;t>=65536?a+=2:a++){if(t=Y(e,a),t===H)f=!0,x&&(h=h||a-m-1>l&&e[m+1]!==" ",m=a);else if(!q(t))return R;v=v&&Ce(t,s,c),s=t}h=h||x&&a-m-1>l&&e[m+1]!==" "}return!f&&!h?v&&!o&&!r(e)?xn:u===U?R:re:i>9&&hn(e)?R:o?u===U?R:re:h?gn:mn}function Sr(e,n,i,l,r){e.dump=(function(){if(n.length===0)return e.quotingType===U?'""':"''";if(!e.noCompatMode&&(xr.indexOf(n)!==-1||mr.test(n)))return e.quotingType===U?'"'+n+'"':"'"+n+"'";var u=e.indent*Math.max(1,i),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-u),c=l||e.flowLevel>-1&&i>=e.flowLevel;function a(t){return _r(e,t)}switch(br(n,c,e.indent,o,a,e.quotingType,e.forceQuotes&&!l,r)){case xn:return n;case re:return"'"+n.replace(/'/g,"''")+"'";case mn:return"|"+we(n,e.indent)+be(ye(n,u));case gn:return">"+we(n,e.indent)+be(ye(Er(n,o),u));case R:return'"'+Nr(n)+'"';default:throw new b("impossible error: invalid scalar style")}})()}function we(e,n){var i=hn(e)?String(n):"",l=e[e.length-1]===`
21
- `,r=l&&(e[e.length-2]===`
22
- `||e===`
23
- `),u=r?"+":l?"":"-";return i+u+`
24
- `}function be(e){return e[e.length-1]===`
25
- `?e.slice(0,-1):e}function Er(e,n){for(var i=/(\n+)([^\n]*)/g,l=(function(){var t=e.indexOf(`
26
- `);return t=t!==-1?t:e.length,i.lastIndex=t,Se(e.slice(0,t),n)})(),r=e[0]===`
27
- `||e[0]===" ",u,o;o=i.exec(e);){var c=o[1],a=o[2];u=a[0]===" ",l+=c+(!r&&!u&&a!==""?`
28
- `:"")+Se(a,n),r=u}return l}function Se(e,n){if(e===""||e[0]===" ")return e;for(var i=/ [^ ]/g,l,r=0,u,o=0,c=0,a="";l=i.exec(e);)c=l.index,c-r>n&&(u=o>r?o:c,a+=`
29
- `+e.slice(r,u),r=u+1),o=c;return a+=`
30
- `,e.length-r>n&&o>r?a+=e.slice(r,o)+`
31
- `+e.slice(o+1):a+=e.slice(r),a.slice(1)}function Nr(e){for(var n="",i=0,l,r=0;r<e.length;i>=65536?r+=2:r++)i=Y(e,r),l=w[i],!l&&q(i)?(n+=e[r],i>=65536&&(n+=e[r+1])):n+=l||vr(i);return n}function Fr(e,n,i){var l="",r=e.tag,u,o,c;for(u=0,o=i.length;u<o;u+=1)c=i[u],e.replacer&&(c=e.replacer.call(i,String(u),c)),(F(e,n,c,!1,!1)||typeof c>"u"&&F(e,n,null,!1,!1))&&(l!==""&&(l+=","+(e.condenseFlow?"":" ")),l+=e.dump);e.tag=r,e.dump="["+l+"]"}function Ee(e,n,i,l){var r="",u=e.tag,o,c,a;for(o=0,c=i.length;o<c;o+=1)a=i[o],e.replacer&&(a=e.replacer.call(i,String(o),a)),(F(e,n+1,a,!0,!0,!1,!0)||typeof a>"u"&&F(e,n+1,null,!0,!0,!1,!0))&&((!l||r!=="")&&(r+=ie(e,n)),e.dump&&H===e.dump.charCodeAt(0)?r+="-":r+="- ",r+=e.dump);e.tag=u,e.dump=r||"[]"}function Tr(e,n,i){var l="",r=e.tag,u=Object.keys(i),o,c,a,t,s;for(o=0,c=u.length;o<c;o+=1)s="",l!==""&&(s+=", "),e.condenseFlow&&(s+='"'),a=u[o],t=i[a],e.replacer&&(t=e.replacer.call(i,a,t)),F(e,n,a,!1,!1)&&(e.dump.length>1024&&(s+="? "),s+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),F(e,n,t,!1,!1)&&(s+=e.dump,l+=s));e.tag=r,e.dump="{"+l+"}"}function kr(e,n,i,l){var r="",u=e.tag,o=Object.keys(i),c,a,t,s,f,h;if(e.sortKeys===!0)o.sort();else if(typeof e.sortKeys=="function")o.sort(e.sortKeys);else if(e.sortKeys)throw new b("sortKeys must be a boolean or a function");for(c=0,a=o.length;c<a;c+=1)h="",(!l||r!=="")&&(h+=ie(e,n)),t=o[c],s=i[t],e.replacer&&(s=e.replacer.call(i,t,s)),F(e,n+1,t,!0,!0,!0)&&(f=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,f&&(e.dump&&H===e.dump.charCodeAt(0)?h+="?":h+="? "),h+=e.dump,f&&(h+=ie(e,n)),F(e,n+1,s,!0,f)&&(e.dump&&H===e.dump.charCodeAt(0)?h+=":":h+=": ",h+=e.dump,r+=h));e.tag=u,e.dump=r||"{}"}function Ne(e,n,i){var l,r,u,o,c,a;for(r=i?e.explicitTypes:e.implicitTypes,u=0,o=r.length;u<o;u+=1)if(c=r[u],(c.instanceOf||c.predicate)&&(!c.instanceOf||typeof n=="object"&&n instanceof c.instanceOf)&&(!c.predicate||c.predicate(n))){if(i?c.multi&&c.representName?e.tag=c.representName(n):e.tag=c.tag:e.tag="?",c.represent){if(a=e.styleMap[c.tag]||c.defaultStyle,cn.call(c.represent)==="[object Function]")l=c.represent(n,a);else if(an.call(c.represent,a))l=c.represent[a](n,a);else throw new b("!<"+c.tag+'> tag resolver accepts not "'+a+'" style');e.dump=l}return!0}return!1}function F(e,n,i,l,r,u,o){e.tag=null,e.dump=i,Ne(e,i,!1)||Ne(e,i,!0);var c=cn.call(e.dump),a=l,t;l&&(l=e.flowLevel<0||e.flowLevel>n);var s=c==="[object Object]"||c==="[object Array]",f,h;if(s&&(f=e.duplicates.indexOf(i),h=f!==-1),(e.tag!==null&&e.tag!=="?"||h||e.indent!==2&&n>0)&&(r=!1),h&&e.usedDuplicates[f])e.dump="*ref_"+f;else{if(s&&h&&!e.usedDuplicates[f]&&(e.usedDuplicates[f]=!0),c==="[object Object]")l&&Object.keys(e.dump).length!==0?(kr(e,n,e.dump,r),h&&(e.dump="&ref_"+f+e.dump)):(Tr(e,n,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object Array]")l&&e.dump.length!==0?(e.noArrayIndent&&!o&&n>0?Ee(e,n-1,e.dump,r):Ee(e,n,e.dump,r),h&&(e.dump="&ref_"+f+e.dump)):(Fr(e,n,e.dump),h&&(e.dump="&ref_"+f+" "+e.dump));else if(c==="[object String]")e.tag!=="?"&&Sr(e,e.dump,n,u,a);else{if(c==="[object Undefined]")return!1;if(e.skipInvalid)return!1;throw new b("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(t=encodeURI(e.tag[0]==="!"?e.tag.slice(1):e.tag).replace(/!/g,"%21"),e.tag[0]==="!"?t="!"+t:t.slice(0,18)==="tag:yaml.org,2002:"?t="!!"+t.slice(18):t="!<"+t+">",e.dump=t+" "+e.dump)}return!0}function Or(e,n){var i=[],l=[],r,u;for(le(e,i,l),r=0,u=l.length;r<u;r+=1)n.duplicates.push(i[l[r]]);n.usedDuplicates=new Array(u)}function le(e,n,i){var l,r,u;if(e!==null&&typeof e=="object")if(r=n.indexOf(e),r!==-1)i.indexOf(r)===-1&&i.push(r);else if(n.push(e),Array.isArray(e))for(r=0,u=e.length;r<u;r+=1)le(e[r],n,i);else for(l=Object.keys(e),r=0,u=l.length;r<u;r+=1)le(e[l[r]],n,i)}function Ir(e,n){n=n||{};var i=new yr(n);i.noRefs||Or(e,i);var l=e;return i.replacer&&(l=i.replacer.call({"":l},"",l)),F(i,0,l,!0,!0)?i.dump+`
32
- `:""}var jr=Ir,Lr={dump:jr};function pe(e,n){return function(){throw new Error("Function yaml."+e+" is removed in js-yaml 4. Use yaml."+n+" instead, which is now safe by default.")}}var Rr=C,Dr=Oe,Mr=Re,Pr=Be,Yr=He,Br=ce,Hr=un.load,Ur=un.loadAll,qr=Lr.dump,Kr=b,Wr={binary:Ge,float:Ye,map:Le,null:De,pairs:Qe,set:Ve,timestamp:Ke,bool:Me,int:Pe,merge:We,omap:$e,seq:je,str:Ie},Gr=pe("safeLoad","load"),$r=pe("safeLoadAll","loadAll"),Qr=pe("safeDump","dump"),Vr={Type:Rr,Schema:Dr,FAILSAFE_SCHEMA:Mr,JSON_SCHEMA:Pr,CORE_SCHEMA:Yr,DEFAULT_SCHEMA:Br,load:Hr,loadAll:Ur,dump:qr,YAMLException:Kr,types:Wr,safeLoad:Gr,safeLoadAll:$r,safeDump:Qr};function Xr({children:e,className:n=""}){return p.jsx("span",{className:`px-2 py-0.5 text-[10px] bg-surface-sunken rounded-full text-text-secondary ${n}`,children:e})}function j({icon:e,color:n,children:i}){return p.jsxs("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-surface-border",children:[p.jsx(e,{className:`w-4 h-4 ${n}`,strokeWidth:1.5}),p.jsx("h2",{className:"section-h2",children:i})]})}function oe({text:e}){return p.jsx("p",{className:"text-[11px] text-text-quaternary py-2",children:e})}function L({label:e,children:n}){return p.jsxs("div",{className:"flex items-baseline justify-between py-2 gap-4",children:[p.jsx("span",{className:"text-[10px] uppercase tracking-widest text-text-quaternary shrink-0",children:e}),p.jsx("span",{className:"text-xs text-text-primary text-right min-w-0 truncate",children:n})]})}function J(e){return e?new Date(e).toLocaleString("en-US",{dateStyle:"medium",timeStyle:"short"}):"—"}function Zr(e){const n=(e==null?void 0:e.properties)??{};return Object.entries(n).map(([i,l])=>({key:i,type:(l==null?void 0:l.type)??"any",description:(l==null?void 0:l.description)??""}))}function Fe({schema:e,empty:n}){const i=Zr(e);return i.length===0?p.jsx(oe,{text:n}):p.jsx("div",{className:"divide-y divide-surface-border/30",children:i.map(l=>p.jsxs("div",{className:"py-2",children:[p.jsxs("div",{className:"flex items-baseline gap-2",children:[p.jsx("code",{className:"text-xs font-mono text-text-primary",children:l.key}),p.jsx("span",{className:"text-[10px] font-mono text-text-quaternary",children:l.type})]}),l.description&&p.jsx("p",{className:"text-[11px] text-text-tertiary mt-0.5 leading-snug",children:l.description})]},l.key))})}function ol(){var a;const{id:e=""}=Fn(),n=Tn(),{data:i,isLoading:l}=vn(e),{data:r}=An(e),u=(r==null?void 0:r.versions)??[];if(l||!i)return p.jsxs("div",{className:"animate-pulse space-y-4",children:[p.jsx("div",{className:"h-8 bg-surface-sunken rounded w-64"}),p.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]});const o=i.activity_manifest??[],c=(()=>{var s,f,h,x;const t=i.output_schema;if(t&&Object.keys(t).length>0)return t;try{const m=Vr.load(i.yaml_content);return((x=(h=(f=(s=m==null?void 0:m.app)==null?void 0:s.graphs)==null?void 0:f[0])==null?void 0:h.output)==null?void 0:x.schema)??void 0}catch{return}})();return p.jsxs("div",{children:[p.jsxs("div",{className:"flex items-start justify-between mb-3",children:[p.jsxs("div",{className:"flex items-center gap-2",children:[p.jsx("h1",{className:"text-3xl font-light text-text-primary font-mono",children:i.graph_topic}),p.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:mcp-pipeline-tools"},className:"text-text-quaternary hover:text-accent transition-colors mt-1",title:"Docs",children:p.jsx(Cn,{className:"w-4 h-4",strokeWidth:1.5})})]}),p.jsx("div",{className:"flex items-center gap-3",children:i.status==="active"&&p.jsxs("button",{onClick:()=>n(`/mcp/workflows/invoke?id=${i.id}`),className:"flex items-center gap-1.5 px-4 py-1.5 text-xs rounded-md bg-accent text-text-inverse hover:bg-accent-hover transition-colors",children:[p.jsx(wn,{className:"w-3 h-3"})," Run"]})})]}),p.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[p.jsx(yn,{status:i.status}),p.jsx(_n,{namespace:i.app_id}),p.jsxs("span",{className:"text-[11px] font-mono text-text-quaternary",children:["v",i.content_version]})]}),i.description&&p.jsx("p",{className:"text-sm text-text-secondary mb-8 max-w-2xl leading-relaxed",children:i.description}),((a=i.tags)==null?void 0:a.length)>0&&p.jsx("div",{className:"flex items-center gap-1.5 mb-10",children:i.tags.map(t=>p.jsx(Xr,{children:t},t))}),p.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-x-14 gap-y-10 mb-12",children:[p.jsxs("div",{children:[p.jsx(j,{icon:bn,color:"text-accent",children:"Overview"}),p.jsxs("div",{className:"divide-y divide-surface-border/30",children:[p.jsx(L,{label:"Topic",children:p.jsx("code",{className:"font-mono",children:i.graph_topic})}),p.jsx(L,{label:"Namespace",children:p.jsx("code",{className:"font-mono",children:i.app_id})}),p.jsx(L,{label:"App version",children:i.app_version}),p.jsx(L,{label:"Runs as",children:i.execute_as||"caller"}),p.jsx(L,{label:"Deployed",children:J(i.deployed_at)}),p.jsx(L,{label:"Activated",children:J(i.activated_at)})]})]}),p.jsxs("div",{className:"space-y-10",children:[p.jsxs("div",{children:[p.jsx(j,{icon:se,color:"text-emerald-400",children:"Input"}),p.jsx(Fe,{schema:i.input_schema,empty:"No declared input fields"})]}),p.jsxs("div",{children:[p.jsx(j,{icon:se,color:"text-amber-400",children:"Output"}),p.jsx(Fe,{schema:c,empty:"No declared output fields"})]})]}),p.jsxs("div",{children:[p.jsx(j,{icon:Sn,color:"text-violet-400",children:"Graph"}),o.length===0?p.jsx(oe,{text:"A single trigger maps the input straight to the output — see the graph definition below."}):p.jsx("div",{className:"divide-y divide-surface-border/30",children:o.map(t=>p.jsxs("div",{className:"flex items-center justify-between py-2 gap-3",children:[p.jsxs("div",{className:"min-w-0",children:[p.jsx("code",{className:"text-xs font-mono text-text-primary",children:t.title||t.activity_id}),t.topic&&p.jsx("p",{className:"text-[10px] font-mono text-text-quaternary truncate",children:t.topic})]}),p.jsx("span",{className:"text-[10px] uppercase tracking-widest text-text-quaternary shrink-0",children:t.tool_source||t.type})]},t.activity_id))})]})]}),p.jsxs("div",{className:"mb-12",children:[p.jsx(j,{icon:En,color:"text-cyan-400",children:"Definition"}),p.jsx("pre",{className:"text-[11px] font-mono text-text-secondary bg-surface-sunken/50 rounded-md p-4 overflow-x-auto leading-relaxed",children:i.yaml_content})]}),p.jsxs("div",{children:[p.jsxs(j,{icon:Nn,color:"text-rose-400",children:["Versions (",u.length,")"]}),u.length===0?p.jsx(oe,{text:"No prior versions"}):p.jsx("div",{className:"divide-y divide-surface-border/30",children:u.map(t=>p.jsxs("div",{className:"flex items-center justify-between py-2 gap-3",children:[p.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[p.jsxs("span",{className:"text-xs font-mono text-text-primary",children:["v",t.version]}),t.change_summary&&p.jsx("span",{className:"text-[11px] text-text-tertiary truncate",children:t.change_summary})]}),p.jsx("span",{className:"text-[10px] text-text-quaternary shrink-0",children:J(t.created_at)})]},t.id))})]})]})}export{ol as YamlWorkflowDetailPage};
33
- //# sourceMappingURL=YamlWorkflowDetailPage-C61-8y-E.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{u as h}from"./yaml-workflows-DhlTkbvY.js";import{u}from"./index-BoZydcaW.js";import{u as f}from"./useFilterParams-x-Dg0Vgz.js";import{P as p}from"./PageHeader-CFta2VaS.js";import{F as g,a as j,b}from"./FilterBar-BQ2JGg8U.js";import{E as d}from"./EmptyState-BcsfPq9T.js";import{T as w}from"./ToolPill-miuRcj1Q.js";import{N as v}from"./NamespacePill-DlqBTvFR.js";import{S as y}from"./StatusBadge-D9MeQHrh.js";import{c as N,W as k}from"./vendor-icons-BaQqUm-e.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(p,{title:"Configure",docsHash:"#docs:dashboard.md:mcp-pipeline-tools"}),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(p,{title:"Configure",docsHash:"#docs:dashboard.md:mcp-pipeline-tools",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(j,{label:"Search",value:s.search,onChange:t=>l("search",t),placeholder:"Flow or namespace…"}),e.jsx(b,{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(d,{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(d,{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(w,{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-CMpgsLEo.js.map
@@ -1,2 +0,0 @@
1
- import{u as i}from"./vendor-query-B2UbickB.js";import{d as e}from"./index-BoZydcaW.js";function t(){return i({queryKey:["capabilities"],queryFn:()=>e("/capabilities")})}export{t as u};
2
- //# sourceMappingURL=capabilities-BBTPqF-V.js.map
@@ -1,2 +0,0 @@
1
- import{a,j as r}from"./vendor-query-B2UbickB.js";import{G as l,H as c,I as m}from"./index-BoZydcaW.js";const n=[{maxMs:0,color:"text-status-error"},{maxMs:300*1e3,color:"text-status-error"},{maxMs:900*1e3,color:"text-status-warning"},{maxMs:1/0,color:"text-text-secondary"}];function u(t){if(t<=0)return n[0].color;for(const e of n)if(t<e.maxMs)return e.color;return n[n.length-1].color}function w({until:t}){const[e,s]=a.useState(()=>new Date(t).getTime()-Date.now());a.useEffect(()=>{const o=setInterval(()=>{s(new Date(t).getTime()-Date.now())},1e3);return()=>clearInterval(o)},[t]);const i=a.useMemo(()=>{const o=new Date(t);return[{label:"ms",value:String(Math.max(0,e))},{label:"until",value:o.toISOString()},{label:"local",value:l(o,"MMM d, yyyy h:mm:ss a")}]},[t,e]);return r.jsx(c,{options:i,children:r.jsx("span",{className:`text-xs font-mono ${u(e)}`,children:m(e)})})}function d(t){return!!(t.assigned_to&&t.assigned_until&&new Date(t.assigned_until)>new Date)}function g(t){return!t.workflow_type}export{w as C,d as a,g as i};
2
- //# sourceMappingURL=escalation-CyJ_wz-f.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,a as p}from"./vendor-query-B2UbickB.js";import{F as u,b as n,c as o,a as h}from"./FilterBar-BQ2JGg8U.js";import{P as j}from"./PriorityBadge-B4ykBH7f.js";import{R as f}from"./RolePill-CXEyPMqb.js";import{W as v}from"./WorkflowPill-BegV-iRF.js";import{C as w,i as y,a as N}from"./escalation-CyJ_wz-f.js";import{x as b,y as g,J as k}from"./index-BoZydcaW.js";import{a6 as C,a7 as _,a8 as c,o as P}from"./vendor-icons-BaQqUm-e.js";const l="text-text-secondary transition-colors group-hover/row:text-text-primary";function T({row:a}){if(y(a)){const t=a.status==="resolved"?"text-status-success":"text-text-tertiary";return e.jsx(_,{className:`w-3 h-3 shrink-0 ${t}`})}return a.status==="resolved"?e.jsx(c,{className:"w-2.5 h-2.5 shrink-0 fill-status-success text-status-success"}):a.status==="cancelled"?e.jsx(c,{className:"w-2.5 h-2.5 shrink-0 fill-status-error text-status-error"}):N(a)?e.jsx(c,{className:"w-2.5 h-2.5 shrink-0 fill-status-warning text-status-warning"}):e.jsx(c,{className:"w-2.5 h-2.5 shrink-0 fill-status-active text-status-active"})}function E({metadata:a}){const[t,x]=p.useState(!1);if(!a||Object.keys(a).length===0)return e.jsx("span",{className:"text-[11px] text-text-tertiary",children:"—"});const r=Object.keys(a),m=`${r.slice(0,2).join(", ")}${r.length>2?` +${r.length-2}`:""}`;return e.jsxs("div",{className:"w-full",children:[e.jsxs("button",{onClick:i=>{i.stopPropagation(),x(d=>!d)},className:`inline-flex max-w-full items-center gap-1 font-mono text-[11px] ${l}`,title:t?"Collapse metadata":"Expand metadata",children:[e.jsx(P,{className:`h-3 w-3 shrink-0 transition-transform ${t?"rotate-90":""}`}),e.jsx("span",{className:"truncate",children:`{ ${m} }`})]}),e.jsx("div",{className:`grid transition-[grid-template-rows] duration-200 ease-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:e.jsx("div",{className:"overflow-hidden",children:e.jsx("div",{className:"mt-1 overflow-x-auto",onClick:i=>i.stopPropagation(),children:e.jsx(k,{data:a,defaultCollapsed:!0})})})})]})}const D=[{key:"description",label:"Summary",render:a=>e.jsxs("div",{className:"flex items-center gap-2 overflow-hidden",children:[e.jsx("span",{className:"shrink-0",children:e.jsx(T,{row:a})}),e.jsx("span",{className:`truncate text-xs ${l}`,children:a.description||a.type})]}),className:"max-w-0"},{key:"workflow_type",label:"Workflow",render:a=>e.jsx(v,{type:a.workflow_type||a.type}),className:"w-40 whitespace-nowrap"},{key:"metadata",label:"Metadata",render:a=>e.jsx(E,{metadata:a.metadata}),className:"w-80 max-w-[19rem] align-top"},{key:"role",label:"Role",render:a=>e.jsx("span",{className:l,children:e.jsx(f,{role:a.role,size:"md",tone:"inherit"})}),className:"w-28"},{key:"priority",label:"Priority",render:a=>e.jsx("span",{className:l,children:e.jsx(j,{priority:a.priority,size:"sm",tone:"inherit"})}),className:"w-14",sortable:!0},{key:"created_time",label:"Created",render:a=>e.jsx("span",{className:`text-[11px] font-mono whitespace-nowrap ${l}`,title:a.created_at,children:b(a.created_at)}),className:"w-40 whitespace-nowrap"},{key:"created_at",label:"Ago",render:a=>e.jsx("span",{className:`text-xs tabular-nums ${l}`,title:a.created_at,children:g(a.created_at)}),className:"w-12 whitespace-nowrap",sortable:!0}],U={key:"expires",label:e.jsx(C,{className:"w-3.5 h-3.5 text-text-tertiary"}),render:a=>a.assigned_until?e.jsx(w,{until:a.assigned_until}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-16 whitespace-nowrap"},S=[{value:"1",label:"P1"},{value:"2",label:"P2"},{value:"3",label:"P3"},{value:"4",label:"P4"}],O=[{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 W({filters:a,setFilter:t,roles:x,types:r,showStatus:m=!1,showSearch:i=!0,actions:d}){return e.jsxs(u,{actions:d,children:[m&&e.jsxs(e.Fragment,{children:[e.jsx(n,{label:"Status",value:a.status??"",onChange:s=>t("status",s),options:O}),e.jsx(o,{})]}),e.jsx(n,{label:"Role",value:a.role,onChange:s=>t("role",s),options:x.map(s=>({value:s,label:s}))}),e.jsx(o,{}),e.jsx(n,{label:"Type",value:a.type,onChange:s=>t("type",s),options:r.map(s=>({value:s,label:s}))}),e.jsx(o,{}),e.jsx(n,{label:"Priority",value:a.priority,onChange:s=>t("priority",s),options:S}),i&&e.jsxs(e.Fragment,{children:[e.jsx(o,{}),e.jsx(h,{label:"Search",value:a.search??"",onChange:s=>t("search",s),placeholder:"ID, workflow, origin…"})]})]})}export{D as E,U as T,W as a};
2
- //# sourceMappingURL=escalation-columns-DU4Jyxxo.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escalation-columns-DU4Jyxxo.js","sources":["../../src/pages/operator/escalation-columns.tsx"],"sourcesContent":["import { useState } from 'react';\nimport { Circle, Bell, Clock, ChevronRight } 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 { JsonViewer } from '../../components/common/data/JsonViewer';\nimport { formatAgoCompact, formatDateTime } from '../../lib/format';\nimport { isEffectivelyClaimed, isAckEscalation } from '../../lib/escalation';\nimport type { LTEscalationRecord } from '../../api/types';\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 fill-status-success text-status-success\" />;\n }\n if (row.status === 'cancelled') {\n return <Circle className=\"w-2.5 h-2.5 shrink-0 fill-status-error text-status-error\" />;\n }\n if (isEffectivelyClaimed(row)) {\n return <Circle className=\"w-2.5 h-2.5 shrink-0 fill-status-warning text-status-warning\" />;\n }\n // pending (unclaimed)\n return <Circle className=\"w-2.5 h-2.5 shrink-0 fill-status-active text-status-active\" />;\n}\n\n/**\n * Metadata cell — a compact `{ key, key +N }` preview that expands inline to the\n * pretty-printed JSON. The same metadata the faceted query filters on, visible per row.\n */\nfunction MetadataCell({ metadata }: { metadata: Record<string, unknown> | null }) {\n const [open, setOpen] = useState(false);\n if (!metadata || Object.keys(metadata).length === 0) {\n return <span className=\"text-[11px] text-text-tertiary\">—</span>;\n }\n const keys = Object.keys(metadata);\n const preview = `${keys.slice(0, 2).join(', ')}${keys.length > 2 ? ` +${keys.length - 2}` : ''}`;\n // Width is fixed by the wrapper so toggling never changes the column width —\n // the JSON viewer reveals with an animated row-height transition, and long\n // lines scroll horizontally inside the cell rather than widening it.\n return (\n <div className=\"w-full\">\n <button\n onClick={(e) => { e.stopPropagation(); setOpen((v) => !v); }}\n className={`inline-flex max-w-full items-center gap-1 font-mono text-[11px] ${CELL_TEXT}`}\n title={open ? 'Collapse metadata' : 'Expand metadata'}\n >\n <ChevronRight className={`h-3 w-3 shrink-0 transition-transform ${open ? 'rotate-90' : ''}`} />\n <span className=\"truncate\">{`{ ${preview} }`}</span>\n </button>\n <div\n className={`grid transition-[grid-template-rows] duration-200 ease-out ${open ? 'grid-rows-[1fr]' : 'grid-rows-[0fr]'}`}\n >\n <div className=\"overflow-hidden\">\n <div className=\"mt-1 overflow-x-auto\" onClick={(e) => e.stopPropagation()}>\n {/* defaultCollapsed → root expanded, nested objects collapsed (one level). */}\n <JsonViewer data={metadata} defaultCollapsed />\n </div>\n </div>\n </div>\n </div>\n );\n}\n\n/** Base columns shared by all escalation list pages. */\nexport const ESCALATION_COLUMNS: Column<LTEscalationRecord>[] = [\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 // The workflow function name (e.g. `richForm`, `basicSignal`) lives in\n // workflow_type; `type` is the escalation category. Fall back to type for\n // standalone escalations with no 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) => <MetadataCell metadata={row.metadata} />,\n // Fixed width — never grows on expand (the viewer reveals via row-height).\n // Given extra room (borrowed from priority/ago/actions) so JSON wraps less.\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 },\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 sortable: true,\n },\n];\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 fill-status-success text-status-success\" />;\n }\n if (isEffectivelyClaimed(row)) {\n return <Circle className=\"w-2.5 h-2.5 fill-status-warning text-status-warning\" />;\n }\n // pending (unclaimed)\n return <Circle className=\"w-2.5 h-2.5 fill-text-tertiary text-text-tertiary\" />;\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 fill-status-warning text-status-warning\" />,\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","open","setOpen","useState","keys","preview","jsxs","e","v","ChevronRight","JsonViewer","ESCALATION_COLUMNS","WorkflowPill","RolePill","PriorityBadge","formatDateTime","formatAgoCompact","TIME_LEFT_COLUMN","Clock","CountdownTimer","PRIORITY_OPTIONS","STATUS_OPTIONS","EscalationFilterBar","filters","setFilter","roles","types","showStatus","showSearch","actions","FilterBar","Fragment","FilterSelect","FilterDivider","r","t","FilterInput"],"mappings":"ybAgBA,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,GAAI,CACvD,CACA,OAAIF,EAAI,SAAW,WACVG,EAAAA,IAACE,EAAA,CAAO,UAAU,8DAAA,CAA+D,EAEtFL,EAAI,SAAW,YACVG,EAAAA,IAACE,EAAA,CAAO,UAAU,0DAAA,CAA2D,EAElFC,EAAqBN,CAAG,EACnBG,EAAAA,IAACE,EAAA,CAAO,UAAU,8DAAA,CAA+D,EAGnFF,EAAAA,IAACE,EAAA,CAAO,UAAU,4DAAA,CAA6D,CACxF,CAMA,SAASE,EAAa,CAAE,SAAAC,GAA0D,CAChF,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAK,EACtC,GAAI,CAACH,GAAY,OAAO,KAAKA,CAAQ,EAAE,SAAW,EAChD,OAAOL,EAAAA,IAAC,OAAA,CAAK,UAAU,iCAAiC,SAAA,IAAC,EAE3D,MAAMS,EAAO,OAAO,KAAKJ,CAAQ,EAC3BK,EAAU,GAAGD,EAAK,MAAM,EAAG,CAAC,EAAE,KAAK,IAAI,CAAC,GAAGA,EAAK,OAAS,EAAI,KAAKA,EAAK,OAAS,CAAC,GAAK,EAAE,GAI9F,OACEE,EAAAA,KAAC,MAAA,CAAI,UAAU,SACb,SAAA,CAAAA,EAAAA,KAAC,SAAA,CACC,QAAUC,GAAM,CAAEA,EAAE,gBAAA,EAAmBL,EAASM,GAAM,CAACA,CAAC,CAAG,EAC3D,UAAW,mEAAmElB,CAAS,GACvF,MAAOW,EAAO,oBAAsB,kBAEpC,SAAA,CAAAN,MAACc,GAAa,UAAW,yCAAyCR,EAAO,YAAc,EAAE,GAAI,QAC5F,OAAA,CAAK,UAAU,WAAY,SAAA,KAAKI,CAAO,IAAA,CAAK,CAAA,CAAA,CAAA,EAE/CV,EAAAA,IAAC,MAAA,CACC,UAAW,8DAA8DM,EAAO,kBAAoB,iBAAiB,GAErH,SAAAN,EAAAA,IAAC,OAAI,UAAU,kBACb,eAAC,MAAA,CAAI,UAAU,uBAAuB,QAAUY,GAAMA,EAAE,gBAAA,EAEtD,SAAAZ,EAAAA,IAACe,EAAA,CAAW,KAAMV,EAAU,iBAAgB,EAAA,CAAC,CAAA,CAC/C,CAAA,CACF,CAAA,CAAA,CACF,EACF,CAEJ,CAGO,MAAMW,EAAmD,CAC9D,CACE,IAAK,cACL,MAAO,UACP,OAASnB,GACPc,EAAAA,KAAC,MAAA,CAAI,UAAU,0CACb,SAAA,CAAAX,EAAAA,IAAC,QAAK,UAAU,WAAW,SAAAA,EAAAA,IAACJ,EAAA,CAAU,IAAAC,EAAU,EAAE,EAClDG,EAAAA,IAAC,QAAK,UAAW,oBAAoBL,CAAS,GAAK,SAAAE,EAAI,aAAeA,EAAI,IAAA,CAAK,CAAA,EACjF,EAEF,UAAW,SAAA,EAEb,CACE,IAAK,gBACL,MAAO,WAIP,OAASA,GAAQG,EAAAA,IAACiB,GAAa,KAAMpB,EAAI,eAAiBA,EAAI,KAAM,EACpE,UAAW,wBAAA,EAEb,CACE,IAAK,WACL,MAAO,WACP,OAASA,SAASO,EAAA,CAAa,SAAUP,EAAI,SAAU,EAGvD,UAAW,8BAAA,EAEb,CACE,IAAK,OACL,MAAO,OACP,OAASA,GACPG,MAAC,OAAA,CAAK,UAAWL,EACf,SAAAK,EAAAA,IAACkB,EAAA,CAAS,KAAMrB,EAAI,KAAM,KAAK,KAAK,KAAK,UAAU,EACrD,EAEF,UAAW,MAAA,EAEb,CACE,IAAK,WACL,MAAO,WACP,OAASA,GACPG,MAAC,OAAA,CAAK,UAAWL,EACf,SAAAK,EAAAA,IAACmB,EAAA,CAAc,SAAUtB,EAAI,SAAU,KAAK,KAAK,KAAK,UAAU,EAClE,EAEF,UAAW,OACX,SAAU,EAAA,EAEZ,CACE,IAAK,eACL,MAAO,UACP,OAASA,GACPG,EAAAA,IAAC,QAAK,UAAW,2CAA2CL,CAAS,GAAI,MAAOE,EAAI,WACjF,SAAAuB,EAAevB,EAAI,UAAU,EAChC,EAEF,UAAW,wBAAA,EAEb,CACE,IAAK,aACL,MAAO,MACP,OAASA,GACPG,EAAAA,IAAC,QAAK,UAAW,wBAAwBL,CAAS,GAAI,MAAOE,EAAI,WAC9D,SAAAwB,EAAiBxB,EAAI,UAAU,EAClC,EAEF,UAAW,yBACX,SAAU,EAAA,CAEd,EAGayB,EAA+C,CAC1D,IAAK,UACL,MAAQtB,EAAAA,IAACuB,EAAA,CAAM,UAAU,gCAAA,CAAiC,EAC1D,OAAS1B,GACPA,EAAI,eACFG,MAACwB,EAAA,CAAe,MAAO3B,EAAI,eAAgB,EAE3CG,EAAAA,IAAC,OAAA,CAAK,UAAU,6BAA6B,SAAA,IAAC,EAElD,UAAW,wBACb,EAmCayB,EAAmB,CAC9B,CAAE,MAAO,IAAK,MAAO,IAAA,EACrB,CAAE,MAAO,IAAK,MAAO,IAAA,EACrB,CAAE,MAAO,IAAK,MAAO,IAAA,EACrB,CAAE,MAAO,IAAK,MAAO,IAAA,CACvB,EAIaC,EAAiB,CAC5B,CAAE,MAAO,MAAO,MAAO,KAAA,EACvB,CAAE,MAAO,YAAa,MAAO,WAAA,EAC7B,CAAE,MAAO,UAAW,MAAO,SAAA,EAC3B,CAAE,MAAO,WAAY,MAAO,UAAA,EAC5B,CAAE,MAAO,YAAa,MAAO,WAAA,EAC7B,CAAE,MAAO,UAAW,MAAO,SAAA,CAC7B,EAGO,SAASC,EAAoB,CAClC,QAAAC,EACA,UAAAC,EACA,MAAAC,EACA,MAAAC,EACA,WAAAC,EAAa,GACb,WAAAC,EAAa,GACb,QAAAC,CACF,EAUG,CACD,OACEvB,OAACwB,GAAU,QAAAD,EACR,SAAA,CAAAF,GACCrB,EAAAA,KAAAyB,WAAA,CACE,SAAA,CAAApC,EAAAA,IAACqC,EAAA,CACC,MAAM,SACN,MAAOT,EAAQ,QAAU,GACzB,SAAWf,GAAMgB,EAAU,SAAUhB,CAAC,EACtC,QAASa,CAAA,CAAA,QAEVY,EAAA,CAAA,CAAc,CAAA,EACjB,EAEFtC,EAAAA,IAACqC,EAAA,CACC,MAAM,OACN,MAAOT,EAAQ,KACf,SAAWf,GAAMgB,EAAU,OAAQhB,CAAC,EACpC,QAASiB,EAAM,IAAKS,IAAO,CAAE,MAAOA,EAAG,MAAOA,GAAI,CAAA,CAAA,QAEnDD,EAAA,EAAc,EACftC,EAAAA,IAACqC,EAAA,CACC,MAAM,OACN,MAAOT,EAAQ,KACf,SAAWf,GAAMgB,EAAU,OAAQhB,CAAC,EACpC,QAASkB,EAAM,IAAKS,IAAO,CAAE,MAAOA,EAAG,MAAOA,GAAI,CAAA,CAAA,QAEnDF,EAAA,EAAc,EACftC,EAAAA,IAACqC,EAAA,CACC,MAAM,WACN,MAAOT,EAAQ,SACf,SAAWf,GAAMgB,EAAU,WAAYhB,CAAC,EACxC,QAASY,CAAA,CAAA,EAEVQ,GACCtB,EAAAA,KAAAyB,WAAA,CACE,SAAA,CAAApC,EAAAA,IAACsC,EAAA,EAAc,EACftC,EAAAA,IAACyC,EAAA,CACC,MAAM,SACN,MAAOb,EAAQ,QAAU,GACzB,SAAWf,GAAMgB,EAAU,SAAUhB,CAAC,EACtC,YAAY,uBAAA,CAAA,CACd,CAAA,CACF,CAAA,EAEJ,CAEJ"}
@@ -1,2 +0,0 @@
1
- import{a as i,j as e}from"./vendor-query-B2UbickB.js";import{P as ye}from"./PageHeaderWithStats-CcVAji-7.js";import{F as we,b as ke}from"./FilterBar-BQ2JGg8U.js";import{u as Ne}from"./useFilterParams-x-Dg0Vgz.js";import{u as ve}from"./useNamespace-BDsKfT0f.js";import{a as ee,u as Ce,b as $e,c as Se,d as _e}from"./controlplane-C9j2mwX8.js";import{M as Te}from"./Modal-CSrxpXeM.js";import{O as K,ax as U,P as Ee,ay as Z,az as J,o as te,I as Re,aA as Me,a6 as Pe,R as Ae,y as Le,aB as We,E as Qe,Z as Fe,au as Oe}from"./vendor-icons-BaQqUm-e.js";import{C as I}from"./CollapsibleSection-Ne-Q3QFM.js";import{T as Be}from"./TaskQueuePill-DyvtL8X4.js";import{D as ze}from"./DataTable-ZWgVQg7F.js";import{C as W,c as Ie,J as Je}from"./index-BoZydcaW.js";import{R as De,a as Y}from"./RowActions-BA9L9djf.js";import{f as Ue}from"./vendor-react-CXumBFUA.js";import"./EmptyState-BcsfPq9T.js";const Ve=[{label:"15m",value:"15m"},{label:"30m",value:"30m"},{label:"1h",value:"1h"},{label:"1d",value:"1d"},{label:"7d",value:"7d"}],se={pong:"text-status-success",ping:"text-accent",throttle:"text-status-warning",job:"text-purple-400",work:"text-text-secondary",activate:"text-status-error",cron:"text-text-tertiary",user:"text-text-secondary"},He={pong:"roll call",ping:"ping",throttle:"throttle",job:"job",work:"work",activate:"activate",cron:"cron",user:"user"},qe=250;function M(t){return!!t.worker_topic}function P(t){return typeof t.throttle=="number"&&t.throttle!==0}function V(t){return t===void 0||t===0?"Normal":t===-1?"Paused":t>=864e5?`${(t/864e5).toFixed(0)}d`:t>=36e5?`${(t/36e5).toFixed(1)}h`:t>=6e4?`${(t/6e4).toFixed(1)}m`:t>=1e3?`${(t/1e3).toFixed(1)}s`:`${t}ms`}function Ge(t){if(!t)return null;const s=t.match(/^(\d{4})(\d{2})(\d{2})(\d{2})(\d{2})(\d{2})\.(\d+)$/);if(s){const[,r,n,o,u,l,m,d]=s;return new Date(`${r}-${n}-${o}T${u}:${l}:${m}.${d}Z`)}const a=new Date(t);return isNaN(a.getTime())?null:a}function Ke(t){const s=Ge(t);if(!s)return"--";const a=Date.now()-s.getTime();if(a<0||isNaN(a))return"--";const r=Math.floor(a/1e3);if(r<60)return`${r}s`;const n=Math.floor(r/60);if(n<60)return`${n}m`;const o=Math.floor(n/60);return o<24?`${o}h ${n%60}m`:`${Math.floor(o/24)}d ${o%24}h`}function ne(t){return t.replace(/^hmsh:[^:]+:x:/,"")||"(engine)"}function F(t){const s=t.match(/^([^:]+)::(.+?)-[A-Za-z0-9_]{10,}$/);return s?s[2]:t.length>20?t.slice(0,20)+"...":t}function Ze(t){const s=t.match(/^([^:]+)::/);return(s==null?void 0:s[1])||""}const re=[{key:"pong",label:"Roll Call",description:"Node health check responses"},{key:"ping",label:"Ping",description:"Health check broadcasts"},{key:"throttle",label:"Throttle",description:"Throttle commands"},{key:"job",label:"Job",description:"Job lifecycle events"},{key:"work",label:"Work",description:"Worker dispatch events"},{key:"activate",label:"Activate",description:"Worker activation"},{key:"cron",label:"Cron",description:"Cron schedule triggers"},{key:"user",label:"User",description:"User-defined messages"}];function B(t){return`${t.engine_id}-${t.worker_topic||"engine"}`}function Ye(t){const s=new Map;for(const a of t){if(!a.worker_topic)continue;const r=a.worker_topic;s.has(r)||s.set(r,[]),s.get(r).push(a)}return s}function T(t){let s=0,a=0,r=0;for(const n of t)if(n.counts)for(const[o,u]of Object.entries(n.counts))s+=u,o==="200"?a+=u:o==="500"&&(r+=u);return{total:s,success:a,errors:r}}function Xe(t){let s=0;for(const a of t)typeof a.stream_depth=="number"&&(s+=a.stream_depth);return s}function et(t){if(t.length===0)return"healthy";if(t.every(r=>r.throttle===-1))return"paused";const{errors:a}=T(t);return a>0||t.some(P)?"degraded":"healthy"}function tt({activeAppId:t,allProfiles:s,profiles:a}){const r=ee(),[n,o]=i.useState(new Set),[u,l]=i.useState(!1),[m,d]=i.useState([]);i.useEffect(()=>{o(new Set)},[t]);const k=i.useCallback(p=>{o(C=>{const f=new Set(C),$=B(p);return f.has($)?f.delete($):f.add($),f})},[]),b=i.useCallback(()=>{n.size===a.length?o(new Set):o(new Set(a.map(B)))},[a,n.size]),j=i.useMemo(()=>{const p=a.filter(N=>n.has(B(N)));if(p.length===0)return[];if(p.length===s.length)return[{label:"Entire Mesh"}];const C=p.filter(N=>!M(N)),f=p.filter(M),$=[];for(const N of C)$.push({label:`Engine ${N.engine_id}`,guid:N.engine_id,scope:"engines"});const A=new Map;for(const N of f){const R=N.worker_topic;A.has(R)||A.set(R,[]),A.get(R).push(N)}for(const[N,R]of A){const O=s.filter(L=>L.worker_topic===N);if(R.length===O.length)$.push({label:N,topic:N});else for(const L of R)$.push({label:`${N} ${L.engine_id}`,guid:L.engine_id})}return $},[a,s,n]);return{selectedIds:n,setSelectedIds:o,toggleCheckbox:k,toggleAll:b,throttleModalOpen:u,throttleTargets:m,selectedThrottleTargets:j,throttleMutation:r,handleBulkThrottle:p=>{const C=m.length>0?m:j;for(const f of C)r.mutate({appId:t,throttle:p,...f.topic?{topic:f.topic}:{},...f.guid?{guid:f.guid}:{},...f.scope?{scope:f.scope}:{}});l(!1),d([])},handleRowClick:(p,C)=>{const f=M(p)?`${p.worker_topic} ${p.engine_id}`:`Engine ${p.engine_id}`;d([{label:f,guid:p.engine_id,scope:C||(M(p)?"workers":"engines")}]),l(!0)},handleBulkThrottleOpen:()=>{d(j),l(!0)},handleResumeThrottle:(p,C)=>{const f=C||(M(p)?"workers":"engines");r.mutate({appId:t,throttle:0,guid:p.engine_id,scope:f})},handleResumeQueue:p=>{r.mutate({appId:t,throttle:0,topic:p})},handleQueueThrottle:p=>{d([{label:p,topic:p}]),l(!0)},closeThrottleModal:()=>{l(!1),d([])}}}const st=[{label:"Resume",ms:0},{label:"0.5s",ms:500},{label:"1s",ms:1e3},{label:"5s",ms:5e3},{label:"30s",ms:3e4},{label:"Pause",ms:-1}];function nt({target:t}){const s=t.label==="Entire Mesh",a=t.label==="All Engines"||t.label.startsWith("Engine "),r=s?"bg-status-error/10 text-status-error":a?"bg-blue-500/10 text-blue-500":"bg-accent/[0.06] text-text-secondary",n=t.scope==="engines"?"engine only":t.scope==="workers"?"worker only":t.guid?"guid":t.topic?"topic":"mesh";return e.jsxs("span",{className:`inline-flex items-center gap-1.5 px-2 py-0.5 text-[10px] font-medium rounded-lg ${r}`,children:[t.label,e.jsx("span",{className:"text-[8px] opacity-50",children:n})]})}function rt({open:t,onClose:s,targets:a,onApply:r,isPending:n}){const[o,u]=i.useState("");return e.jsx(Te,{open:t,onClose:s,title:"Adjust Throttle",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-2",children:"Targets"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:a.map((l,m)=>e.jsx(nt,{target:l},l.guid||l.topic||m))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-2",children:"Presets"}),e.jsx("div",{className:"flex flex-wrap gap-2",children:st.map(l=>e.jsx("button",{onClick:()=>r(l.ms),disabled:n,className:`px-3 py-1.5 text-xs rounded transition-colors ${l.ms===-1?"bg-status-error/10 text-status-error hover:bg-status-error/20":l.ms===0?"bg-status-success/10 text-status-success hover:bg-status-success/20":"bg-surface-sunken text-text-secondary hover:bg-surface-hover"} disabled:opacity-50`,children:l.label},l.label))})]}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-2",children:"Custom delay (seconds)"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"number",step:"0.1",min:"0",value:o,onChange:l=>u(l.target.value),placeholder:"e.g. 2.5",className:"input text-xs py-1.5 px-3 w-28"}),e.jsx("button",{onClick:()=>{const l=parseFloat(o);isNaN(l)||l<0||r(Math.round(l*1e3))},disabled:n,className:"btn-primary text-xs py-1.5 px-4 disabled:opacity-50",children:"Apply"})]})]})]})})}function at(){const{data:t}=Ce(),s=ee(),[a,r]=i.useState(null),[n,o]=i.useState(!1),u=(t==null?void 0:t.apps)??[],l=i.useCallback(async(d,k="all")=>{if(u.length===0)return;o(!0);const b=await Promise.allSettled(u.map(v=>s.mutateAsync({appId:v.appId,throttle:d,...k!=="all"?{scope:k}:{}}))),j=b.filter(v=>v.status==="rejected").length;j>0&&console.error(`Emergency throttle: ${j}/${b.length} apps failed`),o(!1),r(null)},[u,s]),m=d=>d==="engines"?"engines":d==="workers"?"workers":"everything";return a?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs text-status-error",children:["Pause ",m(a.scope),"?"]}),e.jsx("button",{onClick:()=>l(a.ms,a.scope),disabled:n,className:"px-2.5 py-1 text-xs rounded-md bg-status-error text-white hover:bg-status-error/90 transition-colors disabled:opacity-50",children:n?e.jsx(K,{className:"w-3.5 h-3.5 animate-spin"}):"Confirm"}),e.jsx("button",{onClick:()=>r(null),disabled:n,className:"px-2.5 py-1 text-xs text-text-tertiary hover:text-text-primary transition-colors disabled:opacity-50",children:"Cancel"})]}):e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{onClick:()=>r({ms:-1,scope:"all"}),disabled:n,className:"flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md text-status-error/80 hover:text-status-error hover:bg-status-error/10 transition-colors disabled:opacity-50",title:"Pause all engines and workers",children:[e.jsx(U,{className:"w-3.5 h-3.5"}),"Pause All"]}),e.jsxs("button",{onClick:()=>l(0),disabled:n,className:"flex items-center gap-1.5 px-2.5 py-1 text-xs rounded-md text-status-success/80 hover:text-status-success hover:bg-status-success/10 transition-colors disabled:opacity-50",title:"Resume all engines and workers",children:[n?e.jsx(K,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Ee,{className:"w-3.5 h-3.5"}),"Resume All"]})]})}function ot({byStream:t,onNodeFilter:s}){const[a,r]=i.useState(!1);if(i.useEffect(()=>{r(!1);const d=requestAnimationFrame(()=>r(!0));return()=>cancelAnimationFrame(d)},[t]),t.length===0)return e.jsx("p",{className:"text-xs text-text-tertiary py-4 text-center",children:"No activity in this period"});const n=t.filter(d=>d.stream_type==="engine"),o=t.filter(d=>d.stream_type==="worker"),u=Math.max(...t.map(d=>d.count)),l=d=>{const k=u>0?d.count/u*100:0,b=d.stream_type==="engine",j=b?"(all engines)":ne(d.stream_name),v=b?"bg-blue-500/70":"bg-accent/60",y=b?"text-blue-500":"text-text-tertiary";return e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`text-[9px] font-mono ${y} w-36 truncate text-right shrink-0`,title:d.stream_name,children:j}),e.jsx("div",{className:"flex-1 h-4 bg-surface-sunken rounded overflow-hidden",children:e.jsx("div",{className:`h-full ${v} rounded transition-all duration-500 ease-out`,style:{width:a?`${k}%`:"0%"}})}),e.jsx("span",{className:"text-[10px] font-mono tabular-nums text-text-secondary w-12 text-right shrink-0",children:d.count.toLocaleString()})]},`${d.stream_type}-${d.stream_name}`)},m="text-[9px] uppercase tracking-widest font-semibold mb-1 cursor-pointer hover:underline";return e.jsxs("div",{className:"space-y-1.5",children:[n.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:`${m} text-blue-500/70 hover:text-blue-500`,onClick:()=>s==null?void 0:s("engines"),children:"Engine Stream"}),n.map(l),o.length>0&&e.jsx("div",{className:"h-2"})]}),o.length>0&&e.jsxs(e.Fragment,{children:[e.jsx("p",{className:`${m} text-accent/70 hover:text-accent`,onClick:()=>s==null?void 0:s("workers"),children:"Worker Streams"}),o.map(l)]})]})}function lt({queue:t,workers:s,expanded:a,onToggle:r,onWorkerClick:n,onResumeThrottle:o,onQueueThrottle:u,onResumeQueue:l,byStream:m,activeDuration:d}){const k=i.useMemo(()=>{const c=m.find(g=>g.stream_type==="worker"&&ne(g.stream_name)===t);return(c==null?void 0:c.count)??0},[m,t]),b=i.useMemo(()=>et(s),[s]),j=i.useMemo(()=>Xe(s),[s]),{errors:v}=i.useMemo(()=>T(s),[s]),y=b==="paused"?"bg-status-error":b==="degraded"?"bg-status-warning":"bg-status-success",x=i.useMemo(()=>[...s].sort((c,g)=>T([g]).total-T([c]).total),[s]),w=i.useMemo(()=>[{key:"engine_id",label:"Router",render:c=>{var p;const g=c.engine_id.replace(/^[^:]+::/,"").replace(/-[A-Za-z0-9_]{10,}$/,"")||c.engine_id,E=((p=c.engine_id.match(/^([^:]+)::/))==null?void 0:p[1])||"";return e.jsxs("div",{className:"flex items-center gap-2",title:c.engine_id,children:[e.jsx("span",{className:"text-xs text-text-secondary truncate max-w-[180px]",children:g}),E&&e.jsx("span",{className:"text-[9px] text-text-tertiary/50",children:E})]})}},{key:"processed",label:"Processed",render:c=>{const g=T([c]);return e.jsx("span",{className:"text-xs font-mono tabular-nums text-text-tertiary",children:g.total>0?g.total.toLocaleString():"--"})},className:"w-24"},{key:"throttle",label:"Throttle",render:c=>{const g=c.throttle;return g===-1?e.jsx("span",{className:"text-xs text-status-error font-medium",children:"Paused"}):g&&g>0?e.jsx("span",{className:"text-xs text-status-warning font-medium",children:V(g)}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"0"})},className:"w-24"},{key:"actions",label:"",render:c=>e.jsxs(De,{children:[P(c)&&e.jsx(Y,{icon:Z,title:"Resume (remove throttle)",onClick:()=>o(c),colorClass:"text-text-tertiary hover:text-status-success"}),e.jsx(Y,{icon:J,title:"Adjust throttle",onClick:()=>n(c)})]}),className:"w-16"}],[n,o]);return e.jsxs("div",{children:[e.jsxs("button",{onClick:()=>r(t),className:"group/row relative flex items-center gap-3 w-full py-2 hover:bg-surface-hover transition-colors text-left rounded",children:[e.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${y}`,title:b}),e.jsx(te,{className:`w-3.5 h-3.5 text-text-tertiary/50 transition-transform duration-200 ${a?"rotate-90":""}`,strokeWidth:2}),e.jsx(Be,{queue:t,size:"sm"}),e.jsx("span",{className:"flex-1"}),v>0&&e.jsxs("span",{className:"text-[10px] text-status-error font-medium mr-2",children:[v," errors"]}),j>0&&e.jsxs("span",{className:"flex items-center gap-1 text-[10px] text-status-warning w-20",children:[e.jsx(Re,{className:"w-3 h-3 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"font-mono tabular-nums",children:j.toLocaleString()})]}),e.jsxs("span",{className:`flex items-center gap-1 text-xs w-24 ${s.some(P)?"text-status-warning":"text-text-tertiary"}`,children:[e.jsx(Me,{className:"w-3 h-3 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"font-mono tabular-nums",children:s.length}),e.jsx("span",{children:"workers"})]}),e.jsx("span",{className:"flex items-center gap-1 text-xs font-mono text-text-tertiary w-28 justify-end mr-16",children:k>0?e.jsxs(e.Fragment,{children:[e.jsx(Pe,{className:"w-3 h-3 shrink-0",strokeWidth:1.5}),k.toLocaleString()," in ",d]}):e.jsx("span",{className:"text-text-tertiary/40",children:"—"})}),e.jsxs("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 opacity-0 group-hover/row:opacity-100 transition-opacity flex items-center gap-2",children:[s.some(P)&&e.jsx(Z,{className:"w-4 h-4 text-text-tertiary hover:text-status-success",strokeWidth:1.5,onClick:c=>{c.stopPropagation(),l(t)}}),e.jsx(J,{className:"w-4 h-4 text-text-tertiary hover:text-accent",strokeWidth:1.5,onClick:c=>{c.stopPropagation(),u(t)}})]})]}),e.jsx(W,{open:a,children:e.jsx("div",{className:"ml-6",children:e.jsx(ze,{columns:w,data:x,keyFn:B,onRowClick:n,emptyMessage:"No workers",inline:!0})})})]})}let it=0;function ct(t){const s=t.data||{},a=s.topic?String(s.topic):"",r=s.guid?String(s.guid).slice(0,8):"";switch(t.type){case"pong":return a?`Worker ${r}... on "${a}" responded`:`Engine ${r}... responded`;case"ping":return"Roll call broadcast";case"throttle":{const n=s.throttle,o=a?`queue "${a}"`:r?`node ${r}...`:"all nodes";return`${V(n)} applied to ${o}`}case"job":return`Job ${r?r+"...":""} ${s.status||"updated"}`;case"work":return`Dispatched to "${a||"worker"}" ${r?"("+r+"...)":""}`;case"activate":return`Worker "${a||"unknown"}" activated`;case"cron":return`Cron triggered ${a?'"'+a+'"':""}`;default:return a||r||t.type}}function ut(t){const s=[];let a=0;for(;a<t.length;){const r=t[a];if(r.type==="pong"){let n=a+1;for(;n<t.length&&t[n].type==="pong";)n++;const o=t.slice(a,n);if(o.length>=3)s.push({kind:"group",type:"pong",count:o.length,firstTimestamp:o[o.length-1].timestamp,lastTimestamp:o[0].timestamp,events:o});else for(const u of o)s.push({kind:"single",event:u});a=n}else s.push({kind:"single",event:r}),a++}return s}function ae({event:t}){const[s,a]=i.useState(!1);return e.jsxs("div",{className:"border-b border-surface-border/50 last:border-b-0",children:[e.jsxs("button",{onClick:()=>a(!s),className:"flex items-center gap-2 py-1.5 w-full text-left hover:bg-surface-hover/50 transition-colors",children:[e.jsx("span",{className:"text-[9px] font-mono text-text-tertiary whitespace-nowrap tabular-nums shrink-0",children:new Date(t.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),e.jsx("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${se[t.type]||"text-text-tertiary"} bg-surface-sunken whitespace-nowrap shrink-0`,children:He[t.type]||t.type}),e.jsx("span",{className:"text-[9px] text-text-secondary flex-1 min-w-0 truncate",children:ct(t)}),e.jsx("svg",{className:`w-2.5 h-2.5 text-text-tertiary shrink-0 transition-transform duration-150 ${s?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),e.jsx(W,{open:s,children:e.jsx("div",{className:"pb-2",children:e.jsx(Je,{data:t.data})})})]})}function dt({group:t}){const[s,a]=i.useState(!1),r=t.events.filter(o=>{var u;return!((u=o.data)!=null&&u.topic)}).length,n=t.count-r;return e.jsxs("div",{className:"border-b border-surface-border/50 last:border-b-0",children:[e.jsxs("button",{onClick:()=>a(!s),className:"flex items-center gap-2 py-1.5 w-full text-left hover:bg-surface-hover/50 transition-colors",children:[e.jsx("span",{className:"text-[9px] font-mono text-text-tertiary whitespace-nowrap tabular-nums shrink-0",children:new Date(t.lastTimestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"})}),e.jsx("span",{className:`text-[9px] font-medium px-1 py-0.5 rounded ${se.pong} bg-surface-sunken whitespace-nowrap shrink-0`,children:"roll call"}),e.jsxs("span",{className:"text-[9px] text-text-secondary flex-1 min-w-0 truncate",children:[t.count," nodes responded",r>0&&n>0?` (${r} engine${r!==1?"s":""}, ${n} worker${n!==1?"s":""})`:r>0?` (${r} engine${r!==1?"s":""})`:` (${n} worker${n!==1?"s":""})`]}),e.jsx("svg",{className:`w-2.5 h-2.5 text-text-tertiary shrink-0 transition-transform duration-150 ${s?"rotate-180":""}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19 9l-7 7-7-7"})})]}),e.jsx(W,{open:s,children:e.jsx("div",{className:"ml-4",children:t.events.map(o=>e.jsx(ae,{event:o},o.id))})})]})}function xt({channels:t,onToggle:s,customFilter:a,onCustomFilterChange:r}){return e.jsxs("div",{className:"space-y-3 pb-3 border-b border-surface-border mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Channels"}),e.jsx("p",{className:"text-[9px] text-text-tertiary",children:"Unchecked channels are dropped before buffering"})]}),e.jsx("div",{className:"grid grid-cols-2 gap-1",children:re.map(n=>e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer py-0.5",children:[e.jsx("input",{type:"checkbox",checked:t.has(n.key),onChange:()=>s(n.key),className:"w-3 h-3 rounded border-border accent-accent"}),e.jsx("span",{className:"text-[10px] text-text-secondary",title:n.description,children:n.label})]},n.key))}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Text Filter"}),e.jsx("input",{type:"text",value:a,onChange:n=>r(n.target.value),placeholder:"pong",className:"input text-[10px] font-mono py-1 px-2 w-full"}),e.jsxs("p",{className:"text-[9px] text-text-tertiary mt-1",children:["Filter by event type, e.g. ",e.jsx("span",{className:"font-mono",children:"pong"}),", ",e.jsx("span",{className:"font-mono",children:"throttle"}),", or any text in the event data."]})]})]})}function pt({bridgeActive:t}){const[s,a]=i.useState(!1),[r,n]=i.useState(!1),[o,u]=i.useState([]),[l,m]=i.useState(()=>new Set(re.map(x=>x.key))),[d,k]=i.useState(""),b=i.useRef(l);i.useEffect(()=>{b.current=l},[l]);const j=i.useRef(d);i.useEffect(()=>{j.current=d},[d]);const v=x=>{m(w=>{const c=new Set(w);return c.has(x)?c.delete(x):c.add(x),c})};Ie("lt.events.mesh.>",i.useCallback(x=>{var g;const w=((g=x.type)==null?void 0:g.replace("mesh.",""))||"unknown";if(!b.current.has(w))return;const c=j.current;c&&!`${w} ${JSON.stringify(x.data||x)}`.toLowerCase().includes(c.toLowerCase())||u(E=>[{id:++it,type:w,timestamp:x.timestamp||new Date().toISOString(),data:x.data||x},...E].slice(0,qe))},[]));const y=()=>u([]);return e.jsxs("div",{className:"border-l border-surface-border pl-6 pt-4 min-h-[300px] sticky top-14 self-start max-h-[calc(100vh-8rem)] flex flex-col",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-3",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Event Stream"}),e.jsx(Ae,{className:`w-3 h-3 ${t?"text-status-success animate-pulse":"text-text-tertiary"}`}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:t?"Live":"..."}),e.jsxs("span",{className:"ml-auto flex items-center gap-1",children:[e.jsx("button",{onClick:()=>{a(x=>!x),n(!1)},className:`p-1 rounded transition-colors ${s?"text-accent bg-accent/10":"text-text-tertiary hover:text-text-primary"}`,title:"Configure channels",children:e.jsx(Le,{className:"w-3.5 h-3.5"})}),e.jsx("button",{onClick:()=>{n(x=>!x),a(!1)},className:`p-1 rounded transition-colors ${r?"text-accent bg-accent/10":"text-text-tertiary hover:text-text-primary"}`,title:"View raw JSON",children:e.jsx(We,{className:"w-3.5 h-3.5"})}),o.length>0&&e.jsx("button",{onClick:y,className:"p-1 rounded text-text-tertiary hover:text-text-primary transition-colors",title:"Clear events",children:e.jsx(Qe,{className:"w-3.5 h-3.5"})})]})]}),e.jsx(W,{open:s,children:e.jsx(xt,{channels:l,onToggle:v,customFilter:d,onCustomFilterChange:k})}),e.jsx(W,{open:r,children:e.jsx("div",{className:"pb-3 border-b border-surface-border mb-3",children:e.jsx("pre",{className:"text-[9px] font-mono text-text-tertiary bg-surface-sunken rounded-lg p-3 max-h-[50vh] overflow-auto whitespace-pre-wrap",children:JSON.stringify(o.slice(0,50),null,2)})})}),o.length>0&&e.jsxs("p",{className:"text-[9px] text-text-tertiary mb-2",children:[o.length," events"]}),e.jsx("div",{className:"flex-1 overflow-y-auto",children:o.length===0?e.jsx("p",{className:"text-xs text-text-tertiary py-6 text-center",children:t?"Waiting for events...":"Subscribing..."}):ut(o).map((x,w)=>x.kind==="group"?e.jsx(dt,{group:x},`grp-${w}`):e.jsx(ae,{event:x.event},x.event.id))})]})}function mt(t){const s=[],a=[],r=[];for(const n of t)P(n)?r.push(n):n.is_scout||T([n]).total>0?s.push(n):a.push(n);return s.sort((n,o)=>n.is_scout&&!o.is_scout?-1:!n.is_scout&&o.is_scout?1:T([o]).total-T([n]).total),a.sort((n,o)=>F(n.engine_id).localeCompare(F(o.engine_id))),r.sort((n,o)=>F(n.engine_id).localeCompare(F(o.engine_id))),{active:s,idle:a,paused:r}}function D({engine:t,isFirst:s,onThrottle:a}){const r=F(t.engine_id),n=Ze(t.engine_id),o=T([t]),u=t.stream_depth??0,l=P(t);return e.jsxs("div",{className:"group/row flex items-center gap-3 py-2 hover:bg-surface-hover/50 transition-colors rounded px-1",children:[l?e.jsx(U,{className:"w-3.5 h-3.5 text-status-warning shrink-0",strokeWidth:1.5}):e.jsx(Fe,{className:`w-3.5 h-3.5 shrink-0 ${o.total>0||t.is_scout?"text-status-success":"text-text-tertiary/30"}`,strokeWidth:1.5}),e.jsx("span",{className:`${s?"text-base font-medium":"text-xs"} text-text-primary truncate max-w-[180px]`,title:t.engine_id,children:r}),n&&e.jsx("span",{className:"text-[10px] text-text-tertiary/50",children:n}),t.is_scout&&e.jsx("span",{className:"text-[9px] text-amber-500 uppercase tracking-widest",children:"scout"}),e.jsx("span",{className:"flex-1"}),l&&e.jsx("span",{className:"text-[10px] text-status-warning",children:t.throttle===-1?"Paused":V(t.throttle)}),o.total>0&&e.jsx("span",{className:"text-[10px] font-mono tabular-nums text-text-tertiary w-16 text-right",children:o.total.toLocaleString()}),u>0&&e.jsxs("span",{className:`text-[10px] font-mono tabular-nums w-14 text-right ${u>100?"text-status-warning":"text-text-tertiary/50"}`,children:[u.toLocaleString()," q"]}),e.jsx("span",{className:"text-[10px] font-mono text-text-tertiary/40 w-12 text-right",children:Ke(t.inited)}),e.jsx("span",{className:"opacity-0 group-hover/row:opacity-100 transition-opacity",children:e.jsx("button",{onClick:m=>{m.stopPropagation(),a(t)},className:"text-text-tertiary hover:text-accent transition-colors",title:l?"Resume / adjust throttle":"Pause / throttle",children:e.jsx(J,{className:"w-3.5 h-3.5",strokeWidth:1.5})})})]})}function X({label:t,engines:s,onThrottle:a}){const[r,n]=i.useState(!1);return s.length===0?null:e.jsxs("div",{className:"mt-1",children:[e.jsxs("button",{onClick:()=>n(!r),className:"flex items-center gap-1.5 text-[10px] text-text-tertiary hover:text-text-secondary transition-colors py-1",children:[e.jsx(te,{className:`w-3 h-3 transition-transform duration-200 ${r?"rotate-90":""}`,strokeWidth:2}),s.length," ",t]}),e.jsx(W,{open:r,children:e.jsx("div",{className:"ml-1",children:s.map(o=>e.jsx(D,{engine:o,onThrottle:a},o.engine_id))})})]})}function ht({engines:t,onThrottle:s,isLoading:a}){const{active:r,idle:n,paused:o}=i.useMemo(()=>mt(t),[t]);return a?e.jsx("p",{className:"text-xs text-text-tertiary",children:"Discovering engines..."}):t.length===0?e.jsx("p",{className:"text-xs text-text-tertiary",children:"No engines found."}):r.length===0&&n.length===0?e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 py-2",children:[e.jsx(U,{className:"w-4 h-4 text-status-error shrink-0",strokeWidth:1.5}),e.jsxs("span",{className:"text-base text-status-error font-medium",children:["All ",t.length," engines paused"]})]}),e.jsx("p",{className:"text-[10px] text-text-tertiary ml-7",children:"Messages are accumulating. Resume at least one engine to restore processing."}),e.jsx("div",{className:"ml-1 mt-2",children:o.map(u=>e.jsx(D,{engine:u,onThrottle:s},u.engine_id))})]}):e.jsxs("div",{children:[r.map((u,l)=>e.jsx(D,{engine:u,isFirst:l===0,onThrottle:s},u.engine_id)),e.jsx(X,{label:"idle",engines:n,onThrottle:s}),e.jsx(X,{label:"paused",engines:o,onThrottle:s})]})}function gt({collapsed:t,toggleSection:s,activeDuration:a,streamStats:r,isLoading:n,queueMap:o,expandedQueues:u,toggleQueue:l,allQueuesExpanded:m,toggleAllQueues:d,handleRowClick:k,handleResumeThrottle:b,handleQueueThrottle:j,handleResumeQueue:v,engines:y,bridgeActive:x}){return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_340px] gap-6",children:[e.jsxs("div",{className:"flex flex-col gap-12 mt-10",children:[e.jsx(I,{title:`Message Volume (${a})`,sectionKey:"volume",isCollapsed:!!t.volume,onToggle:s,contentClassName:"mt-4 ml-7",children:e.jsx(ot,{byStream:(r==null?void 0:r.byStream)??[],onNodeFilter:()=>{},onQueueFilter:()=>{}})}),e.jsx(I,{title:`Engine Routers (${y.length})`,sectionKey:"engines",isCollapsed:!!t.engines,onToggle:s,contentClassName:"mt-4 ml-7",children:e.jsx(ht,{engines:y,onThrottle:k,isLoading:n})}),e.jsx(I,{title:"Worker Routers",sectionKey:"queues",isCollapsed:!!t.queues,onToggle:s,contentClassName:"mt-4 ml-7 flex flex-col gap-0",children:n?e.jsx("p",{className:"text-xs text-text-tertiary",children:"Discovering mesh nodes..."}):o.size===0?e.jsx("p",{className:"text-xs text-text-tertiary",children:'No worker routers found. Click "Roll Call" to discover.'}):e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex justify-end mb-2",children:e.jsx("button",{onClick:d,className:"text-[10px] text-accent hover:underline",children:m?"Collapse all":"Expand all"})}),[...o.entries()].sort(([w],[c])=>w.localeCompare(c)).map(([w,c])=>e.jsx(lt,{queue:w,workers:c,expanded:u.has(w),onToggle:l,onWorkerClick:k,onResumeThrottle:b,onQueueThrottle:j,onResumeQueue:v,byStream:(r==null?void 0:r.byStream)??[],activeDuration:a},w))]})})]}),e.jsx(pt,{bridgeActive:x})]})}function Mt(){const{namespace:t,available:s}=ve(),{filters:a,setFilter:r}=Ne({filters:{app_id:"",duration:"1h"}}),n=a.app_id||t,o=a.duration||"1h",u=$e(),l=6e4,{data:m,isLoading:d,error:k,refetch:b,isFetching:j}=Se(n,l),{data:v}=_e(n,o,void 0,l),y=i.useMemo(()=>[...(m==null?void 0:m.profiles)??[]].sort((S,_)=>{const z=S.worker_topic||S.stream||"",Q=_.worker_topic||_.stream||"";return!S.worker_topic&&_.worker_topic?-1:S.worker_topic&&!_.worker_topic?1:z.localeCompare(Q)}),[m==null?void 0:m.profiles]),x=i.useMemo(()=>y.filter(h=>!M(h)),[y]),w=i.useMemo(()=>y.filter(M),[y]),c=i.useMemo(()=>Ye(y),[y]),g=y.filter(P).length,E=i.useMemo(()=>{const h=new Set(s);return n&&h.add(n),[...h].sort().map(S=>({value:S,label:S}))},[s,n]),[p]=Ue(),C=p.get("queue"),[f,$]=i.useState(()=>C?new Set([C]):new Set),A=i.useCallback(h=>{$(S=>{const _=S.has(h),z=_?new Set:new Set([h]),Q=new URLSearchParams(window.location.search);_?Q.delete("queue"):Q.set("queue",h);const G=Q.toString();return window.history.pushState(null,"",`${window.location.pathname}${G?`?${G}`:""}`),z})},[]),N=c.size>0&&[...c.keys()].every(h=>f.has(h)),R=i.useCallback(()=>{$(N?new Set:new Set(c.keys()))},[N,c]),O="lt:controlplane:collapsed",[L,oe]=i.useState(()=>{try{const h=JSON.parse(localStorage.getItem(O)||"{}");return C&&(h.queues=!1),h}catch{return{}}}),le=i.useCallback(h=>{oe(S=>{const _={...S,[h]:!S[h]};return localStorage.setItem(O,JSON.stringify(_)),_})},[]),{throttleModalOpen:ie,throttleTargets:H,selectedThrottleTargets:ce,throttleMutation:ue,handleBulkThrottle:de,handleRowClick:xe,handleResumeThrottle:pe,handleResumeQueue:me,handleQueueThrottle:he,closeThrottleModal:ge}=tt({activeAppId:n,allProfiles:y,profiles:y}),fe=i.useMemo(()=>{const h=[{label:"Engines",value:x.length,dotClass:"bg-blue-500"},{label:"Workers",value:w.length,dotClass:"bg-text-secondary"},{label:"Topics",value:c.size}];return g>0&&h.push({label:"Throttled",value:g,dotClass:"bg-status-warning"}),h},[x.length,w.length,c.size,g]),[q,be]=i.useState(!1),je=i.useCallback(()=>{u.mutate({appId:n},{onSuccess:()=>be(!0)})},[n,u]);return i.useEffect(()=>{!q&&n&&je()},[n]),e.jsxs("div",{children:[e.jsx(ye,{title:"Routers",docsHash:"#docs:dashboard.md:task-queues",stats:fe,actions:e.jsx(at,{})}),e.jsxs(we,{actions:e.jsx("div",{className:"flex items-center gap-1",children:Ve.map(h=>e.jsx("button",{onClick:()=>r("duration",h.value),className:`px-3 py-1 text-xs rounded-full transition-colors ${o===h.value?"bg-accent text-text-inverse":"text-text-tertiary hover:text-text-primary hover:bg-surface-hover"}`,children:h.label},h.value))}),children:[e.jsx(ke,{label:"Application",value:a.app_id,onChange:h=>r("app_id",h),options:E}),e.jsxs("button",{onClick:()=>b(),disabled:j,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs text-text-tertiary hover:text-text-primary transition-colors disabled:opacity-50",children:[e.jsx(Oe,{className:`w-3.5 h-3.5 ${j?"animate-spin":""}`}),"Roll Call"]})]}),k&&e.jsx("div",{className:"mb-6 px-4 py-3 rounded bg-status-error/10 border border-status-error/20",children:e.jsx("p",{className:"text-xs text-status-error font-medium",children:k.message==="Session expired"?"Session expired — please log in again.":`Failed to load mesh data: ${k.message}`})}),e.jsx(gt,{collapsed:L,toggleSection:le,activeDuration:o,streamStats:v,isLoading:d,queueMap:c,expandedQueues:f,toggleQueue:A,allQueuesExpanded:N,toggleAllQueues:R,handleRowClick:xe,handleResumeThrottle:pe,handleQueueThrottle:he,handleResumeQueue:me,engines:x,bridgeActive:q}),e.jsx(rt,{open:ie,onClose:ge,targets:H.length>0?H:ce,onApply:de,isPending:ue.isPending})]})}export{Mt as ControlPlanePage};
2
- //# sourceMappingURL=index-BBQggGcf.js.map