@hotmeshio/long-tail 0.3.0 → 0.3.2

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 (314) hide show
  1. package/build/api/topics.d.ts +22 -0
  2. package/build/api/topics.js +104 -0
  3. package/build/index.d.ts +3 -1
  4. package/build/index.js +7 -2
  5. package/build/lib/db/schemas/001_schema.sql +3 -3
  6. package/build/lib/db/schemas/006_agent_sub_unique.sql +1 -0
  7. package/build/lib/db/schemas/007_topic_catalog.sql +27 -0
  8. package/build/routes/index.js +2 -0
  9. package/build/routes/topics.d.ts +2 -0
  10. package/build/routes/topics.js +90 -0
  11. package/build/services/topics/index.d.ts +77 -0
  12. package/build/services/topics/index.js +116 -0
  13. package/build/services/topics/sql.d.ts +10 -0
  14. package/build/services/topics/sql.js +80 -0
  15. package/build/services/topics/system-topics.d.ts +11 -0
  16. package/build/services/topics/system-topics.js +270 -0
  17. package/build/start/workers.js +5 -0
  18. package/build/system/mcp-servers/events.js +73 -1
  19. package/build/system/seed/tool-manifests-events.d.ts +75 -0
  20. package/build/system/seed/tool-manifests-events.js +27 -0
  21. package/build/tsconfig.tsbuildinfo +1 -1
  22. package/build/types/index.d.ts +2 -2
  23. package/build/types/startup.d.ts +27 -0
  24. package/dashboard/dist/assets/AdminDashboard-CbeSejVX.js +2 -0
  25. package/dashboard/dist/assets/{AdminDashboard-Bb6zouF5.js.map → AdminDashboard-CbeSejVX.js.map} +1 -1
  26. package/dashboard/dist/assets/AgentConfigPage-CFJNOrlg.js +13 -0
  27. package/dashboard/dist/assets/AgentConfigPage-CFJNOrlg.js.map +1 -0
  28. package/dashboard/dist/assets/AgentDetailPage-Dbx2t-Uk.js +4 -0
  29. package/dashboard/dist/assets/{AgentDetailPage-WwA573u9.js.map → AgentDetailPage-Dbx2t-Uk.js.map} +1 -1
  30. package/dashboard/dist/assets/AgentsPage-Bz61Nl-x.js +2 -0
  31. package/dashboard/dist/assets/{AgentsPage-BZkZ_hXN.js.map → AgentsPage-Bz61Nl-x.js.map} +1 -1
  32. package/dashboard/dist/assets/AvailableEscalationsPage-DdrzePy4.js +2 -0
  33. package/dashboard/dist/assets/{AvailableEscalationsPage-C-Df3ZsZ.js.map → AvailableEscalationsPage-DdrzePy4.js.map} +1 -1
  34. package/dashboard/dist/assets/BotPicker-kKBifD1w.js +2 -0
  35. package/dashboard/dist/assets/{BotPicker-CwfVVWxh.js.map → BotPicker-kKBifD1w.js.map} +1 -1
  36. package/dashboard/dist/assets/CapabilitiesPage-Ch5qY0I7.js +2 -0
  37. package/dashboard/dist/assets/{CapabilitiesPage-DJEQ_5dV.js.map → CapabilitiesPage-Ch5qY0I7.js.map} +1 -1
  38. package/dashboard/dist/assets/CollapsibleSection-kYTBL7dT.js +2 -0
  39. package/dashboard/dist/assets/{CollapsibleSection-DaFQGU6S.js.map → CollapsibleSection-kYTBL7dT.js.map} +1 -1
  40. package/dashboard/dist/assets/ConfirmDeleteModal-CcaAapMl.js +2 -0
  41. package/dashboard/dist/assets/{ConfirmDeleteModal-dOxidrSR.js.map → ConfirmDeleteModal-CcaAapMl.js.map} +1 -1
  42. package/dashboard/dist/assets/CopyableId-B4CL12pv.js +2 -0
  43. package/dashboard/dist/assets/{CopyableId-DmLF-RqZ.js.map → CopyableId-B4CL12pv.js.map} +1 -1
  44. package/dashboard/dist/assets/CredentialsPage-D1VAlwid.js +2 -0
  45. package/dashboard/dist/assets/{CredentialsPage-D-tkqdhu.js.map → CredentialsPage-D1VAlwid.js.map} +1 -1
  46. package/dashboard/dist/assets/CronLabel-DRmO5rH0.js +2 -0
  47. package/dashboard/dist/assets/{CronLabel-C6iCjsXd.js.map → CronLabel-DRmO5rH0.js.map} +1 -1
  48. package/dashboard/dist/assets/CustomDurationPicker-C06QDDir.js +2 -0
  49. package/dashboard/dist/assets/{CustomDurationPicker--wCtBkmT.js.map → CustomDurationPicker-C06QDDir.js.map} +1 -1
  50. package/dashboard/dist/assets/DataTable-J5R6mepB.js +2 -0
  51. package/dashboard/dist/assets/{DataTable-D9yuBv0w.js.map → DataTable-J5R6mepB.js.map} +1 -1
  52. package/dashboard/dist/assets/DropZone-DwNj3GiG.js +2 -0
  53. package/dashboard/dist/assets/{DropZone-2mGyDo1P.js.map → DropZone-DwNj3GiG.js.map} +1 -1
  54. package/dashboard/dist/assets/ElapsedCell-ChyMzl9n.js +2 -0
  55. package/dashboard/dist/assets/{ElapsedCell-DKoH0bqR.js.map → ElapsedCell-ChyMzl9n.js.map} +1 -1
  56. package/dashboard/dist/assets/EmptyState-BXGvOADa.js +2 -0
  57. package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-BXGvOADa.js.map} +1 -1
  58. package/dashboard/dist/assets/EscalationsOverview-DM6zmE4g.js +2 -0
  59. package/dashboard/dist/assets/{EscalationsOverview-C6A4Q9Ne.js.map → EscalationsOverview-DM6zmE4g.js.map} +1 -1
  60. package/dashboard/dist/assets/EventTable-CvJ98E8s.js +2 -0
  61. package/dashboard/dist/assets/{EventTable-DWxH0vMp.js.map → EventTable-CvJ98E8s.js.map} +1 -1
  62. package/dashboard/dist/assets/EventTopicPill-CB_rIGlL.js +2 -0
  63. package/dashboard/dist/assets/{EventTopicPill-BUxxvpNg.js.map → EventTopicPill-CB_rIGlL.js.map} +1 -1
  64. package/dashboard/dist/assets/FilterBar-Bdssa-Xn.js +2 -0
  65. package/dashboard/dist/assets/{FilterBar-Ck4K4rzu.js.map → FilterBar-Bdssa-Xn.js.map} +1 -1
  66. package/dashboard/dist/assets/HomePage-BuZkdXZt.js +2 -0
  67. package/dashboard/dist/assets/{HomePage-Tlu1j8fK.js.map → HomePage-BuZkdXZt.js.map} +1 -1
  68. package/dashboard/dist/assets/ListToolbar-jy8NL6ll.js +2 -0
  69. package/dashboard/dist/assets/{ListToolbar-DuON-br0.js.map → ListToolbar-jy8NL6ll.js.map} +1 -1
  70. package/dashboard/dist/assets/McpOverview-xkaKuHbX.js +2 -0
  71. package/dashboard/dist/assets/{McpOverview-byott48x.js.map → McpOverview-xkaKuHbX.js.map} +1 -1
  72. package/dashboard/dist/assets/McpQueryDetailPage-D5ICn6cR.js +5 -0
  73. package/dashboard/dist/assets/{McpQueryDetailPage-ieZPpcPn.js.map → McpQueryDetailPage-D5ICn6cR.js.map} +1 -1
  74. package/dashboard/dist/assets/McpQueryPage-C46fzfm5.js +2 -0
  75. package/dashboard/dist/assets/{McpQueryPage-BOO0ACYO.js.map → McpQueryPage-C46fzfm5.js.map} +1 -1
  76. package/dashboard/dist/assets/McpRunDetailPage-Znsl4Yc-.js +2 -0
  77. package/dashboard/dist/assets/{McpRunDetailPage-Di8s7-u9.js.map → McpRunDetailPage-Znsl4Yc-.js.map} +1 -1
  78. package/dashboard/dist/assets/McpRunsPage-DT-armx5.js +2 -0
  79. package/dashboard/dist/assets/{McpRunsPage-DdUVqUFi.js.map → McpRunsPage-DT-armx5.js.map} +1 -1
  80. package/dashboard/dist/assets/Modal-C6k6_5KB.js +2 -0
  81. package/dashboard/dist/assets/{Modal-DEODGeqx.js.map → Modal-C6k6_5KB.js.map} +1 -1
  82. package/dashboard/dist/assets/OperatorDashboard-e5N3_dVl.js +2 -0
  83. package/dashboard/dist/assets/{OperatorDashboard-oGmDbNYv.js.map → OperatorDashboard-e5N3_dVl.js.map} +1 -1
  84. package/dashboard/dist/assets/PageHeader-COcgWWf-.js +2 -0
  85. package/dashboard/dist/assets/{PageHeader-DLjHNYHX.js.map → PageHeader-COcgWWf-.js.map} +1 -1
  86. package/dashboard/dist/assets/PageHeaderWithStats-C0PCY3aJ.js +2 -0
  87. package/dashboard/dist/assets/{PageHeaderWithStats-Oljg3n4j.js.map → PageHeaderWithStats-C0PCY3aJ.js.map} +1 -1
  88. package/dashboard/dist/assets/PriorityBadge-BQCsYMpM.js +2 -0
  89. package/dashboard/dist/assets/{PriorityBadge-DfQY9St9.js.map → PriorityBadge-BQCsYMpM.js.map} +1 -1
  90. package/dashboard/dist/assets/ProcessDetailPage-C03LOgI0.js +2 -0
  91. package/dashboard/dist/assets/{ProcessDetailPage-Da-miMYZ.js.map → ProcessDetailPage-C03LOgI0.js.map} +1 -1
  92. package/dashboard/dist/assets/ProcessesListPage-iyPsmlhm.js +2 -0
  93. package/dashboard/dist/assets/{ProcessesListPage-CW-2yFw_.js.map → ProcessesListPage-iyPsmlhm.js.map} +1 -1
  94. package/dashboard/dist/assets/RolePill-CHwys1f9.js +2 -0
  95. package/dashboard/dist/assets/{RolePill-Bp10-WfX.js.map → RolePill-CHwys1f9.js.map} +1 -1
  96. package/dashboard/dist/assets/RolesPage-Bmc3XaUk.js +2 -0
  97. package/dashboard/dist/assets/{RolesPage-Bg_hEu9H.js.map → RolesPage-Bmc3XaUk.js.map} +1 -1
  98. package/dashboard/dist/assets/RowActions-Bs4PF-Gd.js +2 -0
  99. package/dashboard/dist/assets/{RowActions-Dg-Fsm5O.js.map → RowActions-Bs4PF-Gd.js.map} +1 -1
  100. package/dashboard/dist/assets/RunAsSelector-DXzAr2WW.js +2 -0
  101. package/dashboard/dist/assets/{RunAsSelector-hYP59xHH.js.map → RunAsSelector-DXzAr2WW.js.map} +1 -1
  102. package/dashboard/dist/assets/ServerName-BIdLC1Ay.js +2 -0
  103. package/dashboard/dist/assets/{ServerName-C9lUCFYb.js.map → ServerName-BIdLC1Ay.js.map} +1 -1
  104. package/dashboard/dist/assets/StatCard-OKzRSSx4.js +2 -0
  105. package/dashboard/dist/assets/{StatCard-DlgF0CJC.js.map → StatCard-OKzRSSx4.js.map} +1 -1
  106. package/dashboard/dist/assets/StatusBadge-CQlF46RR.js +2 -0
  107. package/dashboard/dist/assets/{StatusBadge-XQlNFwmH.js.map → StatusBadge-CQlF46RR.js.map} +1 -1
  108. package/dashboard/dist/assets/StepIndicator-CP7eycjI.js +2 -0
  109. package/dashboard/dist/assets/{StepIndicator-CuUIGxKk.js.map → StepIndicator-CP7eycjI.js.map} +1 -1
  110. package/dashboard/dist/assets/StickyPagination-CGk8VAKt.js +2 -0
  111. package/dashboard/dist/assets/{StickyPagination-F9FZsRy9.js.map → StickyPagination-CGk8VAKt.js.map} +1 -1
  112. package/dashboard/dist/assets/SwimlaneTimeline-MEUPc3yJ.js +2 -0
  113. package/dashboard/dist/assets/{SwimlaneTimeline-2JHwAM2f.js.map → SwimlaneTimeline-MEUPc3yJ.js.map} +1 -1
  114. package/dashboard/dist/assets/TagInput-BGxXKiWD.js +2 -0
  115. package/dashboard/dist/assets/{TagInput-Dkljw_WI.js.map → TagInput-BGxXKiWD.js.map} +1 -1
  116. package/dashboard/dist/assets/TaskDetailPage-pN5BXzYA.js +2 -0
  117. package/dashboard/dist/assets/TaskDetailPage-pN5BXzYA.js.map +1 -0
  118. package/dashboard/dist/assets/TaskQueuePill-bw8ieKsf.js +2 -0
  119. package/dashboard/dist/assets/{TaskQueuePill-DPwm25Cc.js.map → TaskQueuePill-bw8ieKsf.js.map} +1 -1
  120. package/dashboard/dist/assets/TasksListPage-D1INzcrA.js +2 -0
  121. package/dashboard/dist/assets/{TasksListPage-kCH4r-70.js.map → TasksListPage-D1INzcrA.js.map} +1 -1
  122. package/dashboard/dist/assets/TimeAgo-CywLVIBA.js +2 -0
  123. package/dashboard/dist/assets/{TimeAgo-RPbch7Te.js.map → TimeAgo-CywLVIBA.js.map} +1 -1
  124. package/dashboard/dist/assets/TimestampCell-B4Pc6f3A.js +2 -0
  125. package/dashboard/dist/assets/{TimestampCell-Dgpl-lKv.js.map → TimestampCell-B4Pc6f3A.js.map} +1 -1
  126. package/dashboard/dist/assets/ToolPill-DdLN3JOT.js +2 -0
  127. package/dashboard/dist/assets/{ToolPill-D_DIWFJ5.js.map → ToolPill-DdLN3JOT.js.map} +1 -1
  128. package/dashboard/dist/assets/ToolTestPanel-DusbUka5.js +2 -0
  129. package/dashboard/dist/assets/{ToolTestPanel-D1TWdZQi.js.map → ToolTestPanel-DusbUka5.js.map} +1 -1
  130. package/dashboard/dist/assets/TopicDetailPage-DadwM52Y.js +9 -0
  131. package/dashboard/dist/assets/TopicDetailPage-DadwM52Y.js.map +1 -0
  132. package/dashboard/dist/assets/TopicsPage-DbtrnQON.js +2 -0
  133. package/dashboard/dist/assets/TopicsPage-DbtrnQON.js.map +1 -0
  134. package/dashboard/dist/assets/UserName-CLbusknU.js +2 -0
  135. package/dashboard/dist/assets/{UserName-BXZGXJsU.js.map → UserName-CLbusknU.js.map} +1 -1
  136. package/dashboard/dist/assets/WorkflowExecutionPage-C61R-3Gg.js +2 -0
  137. package/dashboard/dist/assets/{WorkflowExecutionPage-DWlNYb2M.js.map → WorkflowExecutionPage-C61R-3Gg.js.map} +1 -1
  138. package/dashboard/dist/assets/WorkflowPill-7vt2F6wR.js +2 -0
  139. package/dashboard/dist/assets/{WorkflowPill-BbgVTGgI.js.map → WorkflowPill-7vt2F6wR.js.map} +1 -1
  140. package/dashboard/dist/assets/WorkflowsDashboard-BWiUNvyl.js +2 -0
  141. package/dashboard/dist/assets/{WorkflowsDashboard-Dgq8RcD6.js.map → WorkflowsDashboard-BWiUNvyl.js.map} +1 -1
  142. package/dashboard/dist/assets/WorkflowsOverview-DA2ZOs7D.js +2 -0
  143. package/dashboard/dist/assets/{WorkflowsOverview-DnInrUPO.js.map → WorkflowsOverview-DA2ZOs7D.js.map} +1 -1
  144. package/dashboard/dist/assets/YamlWorkflowsPage-CLebf2eL.js +2 -0
  145. package/dashboard/dist/assets/{YamlWorkflowsPage-z1Z9J-mc.js.map → YamlWorkflowsPage-CLebf2eL.js.map} +1 -1
  146. package/dashboard/dist/assets/{agents-C9RLPt1z.js → agents-Dga6NU7U.js} +2 -2
  147. package/dashboard/dist/assets/{agents-C9RLPt1z.js.map → agents-Dga6NU7U.js.map} +1 -1
  148. package/dashboard/dist/assets/{bots-zyUDnQhH.js → bots-CtU4i4OQ.js} +2 -2
  149. package/dashboard/dist/assets/{bots-zyUDnQhH.js.map → bots-CtU4i4OQ.js.map} +1 -1
  150. package/dashboard/dist/assets/{controlplane-v-5KV6pl.js → controlplane-BVoALhbL.js} +2 -2
  151. package/dashboard/dist/assets/{controlplane-v-5KV6pl.js.map → controlplane-BVoALhbL.js.map} +1 -1
  152. package/dashboard/dist/assets/escalation-_N5GfuIi.js +2 -0
  153. package/dashboard/dist/assets/{escalation-BseAikei.js.map → escalation-_N5GfuIi.js.map} +1 -1
  154. package/dashboard/dist/assets/escalation-columns-CoTmTpHp.js +2 -0
  155. package/dashboard/dist/assets/{escalation-columns-Cs2CkkEs.js.map → escalation-columns-CoTmTpHp.js.map} +1 -1
  156. package/dashboard/dist/assets/helpers-Dz2U3Ctb.js +2 -0
  157. package/dashboard/dist/assets/{helpers-DVICI_VA.js.map → helpers-Dz2U3Ctb.js.map} +1 -1
  158. package/dashboard/dist/assets/index-6Kd78p_v.js +2 -0
  159. package/dashboard/dist/assets/{index-BzBZo8Sn.js.map → index-6Kd78p_v.js.map} +1 -1
  160. package/dashboard/dist/assets/index-B9ealjkt.js +6 -0
  161. package/dashboard/dist/assets/{index-CPpNn3z2.js.map → index-B9ealjkt.js.map} +1 -1
  162. package/dashboard/dist/assets/index-BIUHY2Jz.css +1 -0
  163. package/dashboard/dist/assets/index-BWHDW_CF.js +2 -0
  164. package/dashboard/dist/assets/{index-XCEX7Zof.js.map → index-BWHDW_CF.js.map} +1 -1
  165. package/dashboard/dist/assets/index-BYwPVJv0.js +15 -0
  166. package/dashboard/dist/assets/{index-M17tP_HX.js.map → index-BYwPVJv0.js.map} +1 -1
  167. package/dashboard/dist/assets/index-CCOSf1PY.js +281 -0
  168. package/dashboard/dist/assets/index-CCOSf1PY.js.map +1 -0
  169. package/dashboard/dist/assets/index-CS61sh5q.js +2 -0
  170. package/dashboard/dist/assets/{index-BP76o_S8.js.map → index-CS61sh5q.js.map} +1 -1
  171. package/dashboard/dist/assets/index-CtbG3UN-.js +5 -0
  172. package/dashboard/dist/assets/{index-DVFm5329.js.map → index-CtbG3UN-.js.map} +1 -1
  173. package/dashboard/dist/assets/index-DWUunWxh.js +2 -0
  174. package/dashboard/dist/assets/{index-DyqdoZPY.js.map → index-DWUunWxh.js.map} +1 -1
  175. package/dashboard/dist/assets/index-D_H_Prht.js +2 -0
  176. package/dashboard/dist/assets/{index-C0TSBQw8.js.map → index-D_H_Prht.js.map} +1 -1
  177. package/dashboard/dist/assets/index-Dpjguclc.js +2 -0
  178. package/dashboard/dist/assets/{index-DDFK1A8T.js.map → index-Dpjguclc.js.map} +1 -1
  179. package/dashboard/dist/assets/index-QicYdUsl.js +2 -0
  180. package/dashboard/dist/assets/{index-tK8lfgAj.js.map → index-QicYdUsl.js.map} +1 -1
  181. package/dashboard/dist/assets/index-dM-OgCY3.js +2 -0
  182. package/dashboard/dist/assets/{index-D2tDlpuv.js.map → index-dM-OgCY3.js.map} +1 -1
  183. package/dashboard/dist/assets/{knowledge-BhK8xuod.js → knowledge-DJlebU82.js} +2 -2
  184. package/dashboard/dist/assets/{knowledge-BhK8xuod.js.map → knowledge-DJlebU82.js.map} +1 -1
  185. package/dashboard/dist/assets/{mcp-CWFliwjc.js → mcp-CsLJ5SRm.js} +2 -2
  186. package/dashboard/dist/assets/{mcp-CWFliwjc.js.map → mcp-CsLJ5SRm.js.map} +1 -1
  187. package/dashboard/dist/assets/{mcp-query-Dm7_m5Fi.js → mcp-query-WNK1ItRV.js} +2 -2
  188. package/dashboard/dist/assets/{mcp-query-Dm7_m5Fi.js.map → mcp-query-WNK1ItRV.js.map} +1 -1
  189. package/dashboard/dist/assets/{mcp-runs-aBDudwEi.js → mcp-runs-DtTTsuPH.js} +2 -2
  190. package/dashboard/dist/assets/{mcp-runs-aBDudwEi.js.map → mcp-runs-DtTTsuPH.js.map} +1 -1
  191. package/dashboard/dist/assets/namespaces-iRejH3_A.js +2 -0
  192. package/dashboard/dist/assets/{namespaces-C45c4uoO.js.map → namespaces-iRejH3_A.js.map} +1 -1
  193. package/dashboard/dist/assets/{roles-BMAzzeHR.js → roles-3Jm5KtKc.js} +2 -2
  194. package/dashboard/dist/assets/{roles-BMAzzeHR.js.map → roles-3Jm5KtKc.js.map} +1 -1
  195. package/dashboard/dist/assets/settings-DmN2I-c6.js +2 -0
  196. package/dashboard/dist/assets/{settings-D0v7RI3o.js.map → settings-DmN2I-c6.js.map} +1 -1
  197. package/dashboard/dist/assets/{tasks-DwEUQ6my.js → tasks-Cc-QoITQ.js} +2 -2
  198. package/dashboard/dist/assets/{tasks-DwEUQ6my.js.map → tasks-Cc-QoITQ.js.map} +1 -1
  199. package/dashboard/dist/assets/topics-p8anbgi0.js +2 -0
  200. package/dashboard/dist/assets/topics-p8anbgi0.js.map +1 -0
  201. package/dashboard/dist/assets/{useEventHooks-BccPxFR6.js → useEventHooks-VaJ52jMm.js} +2 -2
  202. package/dashboard/dist/assets/{useEventHooks-BccPxFR6.js.map → useEventHooks-VaJ52jMm.js.map} +1 -1
  203. package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js → useExpandedRows-Cg9iq6Vy.js} +2 -2
  204. package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js.map → useExpandedRows-Cg9iq6Vy.js.map} +1 -1
  205. package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js → useFilterParams-CGRYFw_A.js} +2 -2
  206. package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js.map → useFilterParams-CGRYFw_A.js.map} +1 -1
  207. package/dashboard/dist/assets/{useYamlActivityEvents-BBioXSKA.js → useYamlActivityEvents-BU4Uhksl.js} +2 -2
  208. package/dashboard/dist/assets/{useYamlActivityEvents-BBioXSKA.js.map → useYamlActivityEvents-BU4Uhksl.js.map} +1 -1
  209. package/dashboard/dist/assets/{users-CCHT00of.js → users-oXOlnold.js} +2 -2
  210. package/dashboard/dist/assets/{users-CCHT00of.js.map → users-oXOlnold.js.map} +1 -1
  211. package/dashboard/dist/assets/{vendor-icons-E6836lXZ.js → vendor-icons-CBOM6Es0.js} +100 -95
  212. package/dashboard/dist/assets/vendor-icons-CBOM6Es0.js.map +1 -0
  213. package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
  214. package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
  215. package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +26 -0
  216. package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +1 -0
  217. package/dashboard/dist/assets/{workflows-DNZf6Pmq.js → workflows-Yq7cK-vR.js} +2 -2
  218. package/dashboard/dist/assets/{workflows-DNZf6Pmq.js.map → workflows-Yq7cK-vR.js.map} +1 -1
  219. package/dashboard/dist/assets/{yaml-workflows-BKZdGciI.js → yaml-workflows-Ch53yD43.js} +2 -2
  220. package/dashboard/dist/assets/{yaml-workflows-BKZdGciI.js.map → yaml-workflows-Ch53yD43.js.map} +1 -1
  221. package/dashboard/dist/index.html +5 -5
  222. package/docs/agents.md +6 -0
  223. package/docs/api/http/topics.md +164 -0
  224. package/docs/api/sdk/topics.md +204 -0
  225. package/docs/dashboard.md +22 -0
  226. package/docs/events.md +7 -0
  227. package/docs/sdk.md +15 -0
  228. package/docs/topics.md +154 -0
  229. package/package.json +2 -2
  230. package/dashboard/dist/assets/AdminDashboard-Bb6zouF5.js +0 -2
  231. package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js +0 -13
  232. package/dashboard/dist/assets/AgentConfigPage-DqHEK73E.js.map +0 -1
  233. package/dashboard/dist/assets/AgentDetailPage-WwA573u9.js +0 -4
  234. package/dashboard/dist/assets/AgentsPage-BZkZ_hXN.js +0 -2
  235. package/dashboard/dist/assets/AvailableEscalationsPage-C-Df3ZsZ.js +0 -2
  236. package/dashboard/dist/assets/BotPicker-CwfVVWxh.js +0 -2
  237. package/dashboard/dist/assets/CapabilitiesPage-DJEQ_5dV.js +0 -2
  238. package/dashboard/dist/assets/CollapsibleSection-DaFQGU6S.js +0 -2
  239. package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +0 -2
  240. package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +0 -2
  241. package/dashboard/dist/assets/CredentialsPage-D-tkqdhu.js +0 -2
  242. package/dashboard/dist/assets/CronLabel-C6iCjsXd.js +0 -2
  243. package/dashboard/dist/assets/CustomDurationPicker--wCtBkmT.js +0 -2
  244. package/dashboard/dist/assets/DataTable-D9yuBv0w.js +0 -2
  245. package/dashboard/dist/assets/DropZone-2mGyDo1P.js +0 -2
  246. package/dashboard/dist/assets/ElapsedCell-DKoH0bqR.js +0 -2
  247. package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
  248. package/dashboard/dist/assets/EscalationsOverview-C6A4Q9Ne.js +0 -2
  249. package/dashboard/dist/assets/EventTable-DWxH0vMp.js +0 -2
  250. package/dashboard/dist/assets/EventTopicPill-BUxxvpNg.js +0 -2
  251. package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +0 -2
  252. package/dashboard/dist/assets/HomePage-Tlu1j8fK.js +0 -2
  253. package/dashboard/dist/assets/ListToolbar-DuON-br0.js +0 -2
  254. package/dashboard/dist/assets/McpOverview-byott48x.js +0 -2
  255. package/dashboard/dist/assets/McpQueryDetailPage-ieZPpcPn.js +0 -5
  256. package/dashboard/dist/assets/McpQueryPage-BOO0ACYO.js +0 -2
  257. package/dashboard/dist/assets/McpRunDetailPage-Di8s7-u9.js +0 -2
  258. package/dashboard/dist/assets/McpRunsPage-DdUVqUFi.js +0 -2
  259. package/dashboard/dist/assets/Modal-DEODGeqx.js +0 -2
  260. package/dashboard/dist/assets/OperatorDashboard-oGmDbNYv.js +0 -2
  261. package/dashboard/dist/assets/PageHeader-DLjHNYHX.js +0 -2
  262. package/dashboard/dist/assets/PageHeaderWithStats-Oljg3n4j.js +0 -2
  263. package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +0 -2
  264. package/dashboard/dist/assets/ProcessDetailPage-Da-miMYZ.js +0 -2
  265. package/dashboard/dist/assets/ProcessesListPage-CW-2yFw_.js +0 -2
  266. package/dashboard/dist/assets/RolePill-Bp10-WfX.js +0 -2
  267. package/dashboard/dist/assets/RolesPage-Bg_hEu9H.js +0 -2
  268. package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +0 -2
  269. package/dashboard/dist/assets/RunAsSelector-hYP59xHH.js +0 -2
  270. package/dashboard/dist/assets/ServerName-C9lUCFYb.js +0 -2
  271. package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
  272. package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +0 -2
  273. package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
  274. package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +0 -2
  275. package/dashboard/dist/assets/SwimlaneTimeline-2JHwAM2f.js +0 -2
  276. package/dashboard/dist/assets/TagInput-Dkljw_WI.js +0 -2
  277. package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js +0 -2
  278. package/dashboard/dist/assets/TaskDetailPage--9FEVeTB.js.map +0 -1
  279. package/dashboard/dist/assets/TaskQueuePill-DPwm25Cc.js +0 -2
  280. package/dashboard/dist/assets/TasksListPage-kCH4r-70.js +0 -2
  281. package/dashboard/dist/assets/TimeAgo-RPbch7Te.js +0 -2
  282. package/dashboard/dist/assets/TimestampCell-Dgpl-lKv.js +0 -2
  283. package/dashboard/dist/assets/ToolPill-D_DIWFJ5.js +0 -2
  284. package/dashboard/dist/assets/ToolTestPanel-D1TWdZQi.js +0 -2
  285. package/dashboard/dist/assets/UserName-BXZGXJsU.js +0 -2
  286. package/dashboard/dist/assets/WorkflowExecutionPage-DWlNYb2M.js +0 -2
  287. package/dashboard/dist/assets/WorkflowPill-BbgVTGgI.js +0 -2
  288. package/dashboard/dist/assets/WorkflowsDashboard-Dgq8RcD6.js +0 -2
  289. package/dashboard/dist/assets/WorkflowsOverview-DnInrUPO.js +0 -2
  290. package/dashboard/dist/assets/YamlWorkflowsPage-z1Z9J-mc.js +0 -2
  291. package/dashboard/dist/assets/escalation-BseAikei.js +0 -2
  292. package/dashboard/dist/assets/escalation-columns-Cs2CkkEs.js +0 -2
  293. package/dashboard/dist/assets/helpers-DVICI_VA.js +0 -2
  294. package/dashboard/dist/assets/index-BMIU7Im5.js +0 -63
  295. package/dashboard/dist/assets/index-BMIU7Im5.js.map +0 -1
  296. package/dashboard/dist/assets/index-BP76o_S8.js +0 -2
  297. package/dashboard/dist/assets/index-BciXgS35.css +0 -1
  298. package/dashboard/dist/assets/index-BzBZo8Sn.js +0 -2
  299. package/dashboard/dist/assets/index-C0TSBQw8.js +0 -2
  300. package/dashboard/dist/assets/index-CPpNn3z2.js +0 -6
  301. package/dashboard/dist/assets/index-D2tDlpuv.js +0 -2
  302. package/dashboard/dist/assets/index-DDFK1A8T.js +0 -2
  303. package/dashboard/dist/assets/index-DVFm5329.js +0 -5
  304. package/dashboard/dist/assets/index-DyqdoZPY.js +0 -2
  305. package/dashboard/dist/assets/index-M17tP_HX.js +0 -15
  306. package/dashboard/dist/assets/index-XCEX7Zof.js +0 -2
  307. package/dashboard/dist/assets/index-tK8lfgAj.js +0 -2
  308. package/dashboard/dist/assets/namespaces-C45c4uoO.js +0 -2
  309. package/dashboard/dist/assets/settings-D0v7RI3o.js +0 -2
  310. package/dashboard/dist/assets/vendor-icons-E6836lXZ.js.map +0 -1
  311. package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
  312. package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
  313. package/dashboard/dist/assets/vendor-react-CX88sFS5.js +0 -22
  314. package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{j as s}from"./vendor-query-B2UbickB.js";import{i as b,r as v,o as P,q as j}from"./index-BMIU7Im5.js";import{f as $}from"./useEventHooks-BccPxFR6.js";import{u as C}from"./roles-BMAzzeHR.js";import{u as L}from"./useFilterParams-DZCAaBC7.js";import{D as R}from"./DataTable-D9yuBv0w.js";import{P as _}from"./PageHeader-DLjHNYHX.js";import{S as w}from"./StickyPagination-F9FZsRy9.js";import{R as F,a as N}from"./RowActions-Dg-Fsm5O.js";import{a as T,T as k,E as z}from"./escalation-columns-Cs2CkkEs.js";import{L as A}from"./ListToolbar-DuON-br0.js";import{$ as M}from"./vendor-icons-E6836lXZ.js";import{c as O}from"./vendor-react-CX88sFS5.js";import"./EmptyState-BcsfPq9T.js";import"./FilterBar-Ck4K4rzu.js";import"./PriorityBadge-DfQY9St9.js";import"./RolePill-Bp10-WfX.js";import"./WorkflowPill-BbgVTGgI.js";import"./TimestampCell-Dgpl-lKv.js";import"./escalation-BseAikei.js";function re(){$();const c=O(),{user:n}=b(),{filters:e,setFilter:d,pagination:t,sort:r,setSort:g}=L({filters:{role:"",type:"",priority:""}}),u=v(),{data:l}=C(),{data:p}=P(),{data:a,isLoading:f,error:i,refetch:y,isFetching:x}=j({assigned_to:n==null?void 0:n.userId,status:"pending",role:e.role||void 0,type:e.type||void 0,priority:e.priority?parseInt(e.priority):void 0,limit:t.pageSize,offset:t.offset,sort_by:r.sort_by||void 0,order:r.sort_by?r.order:void 0}),h=((a==null?void 0:a.escalations)??[]).filter(o=>o.assigned_until&&new Date(o.assigned_until)>new Date),m=(a==null?void 0:a.total)??0,E={key:"actions",label:"",render:o=>s.jsx(F,{children:s.jsx(N,{icon:M,title:"Release escalation",onClick:()=>u.mutate(o.id),colorClass:"text-text-tertiary hover:text-status-warning"})}),className:"w-16 text-right"},S=[k,...z,E];return s.jsxs("div",{children:[s.jsx(_,{title:"My Escalations"}),s.jsx(T,{filters:e,setFilter:d,roles:(l==null?void 0:l.roles)??[],types:(p==null?void 0:p.types)??[],actions:s.jsx(A,{onRefresh:()=>y(),isFetching:x,apiPath:`/escalations?status=claimed&limit=${t.pageSize}&offset=${t.offset}${e.role?`&role=${e.role}`:""}${e.type?`&type=${e.type}`:""}${e.priority?`&priority=${e.priority}`:""}`})}),i&&s.jsx("div",{className:"mb-4 px-4 py-3 rounded-md bg-status-error/10 border border-status-error/20 text-xs text-status-error",children:i.message==="Session expired"?"Your session has expired. Please log in again.":`Failed to load escalations: ${i.message}`}),s.jsx(R,{columns:S,data:h,keyFn:o=>o.id,onRowClick:o=>c(`/escalations/detail/${o.id}`,{state:{from:"/escalations/queue"}}),isLoading:f,emptyMessage:i?"Unable to load data":"No assigned escalations",sort:r,onSort:g}),s.jsx(w,{page:t.page,totalPages:t.totalPages(m),onPageChange:t.setPage,total:m,pageSize:t.pageSize,onPageSizeChange:t.setPageSize})]})}export{re as OperatorDashboard};
2
- //# sourceMappingURL=OperatorDashboard-oGmDbNYv.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{B as r}from"./vendor-icons-E6836lXZ.js";function l({title:a,actions:t,docsHash:s}){return e.jsxs("div",{className:"flex items-center gap-4 mb-10",children:[e.jsxs("div",{className:"flex items-center gap-2 flex-1",children:[e.jsx("h1",{className:"text-3xl font-light text-text-primary",children:a}),s&&e.jsx("button",{onClick:()=>{window.location.hash=s},className:"text-text-quaternary hover:text-accent transition-colors mt-1",title:"Open docs for this page",children:e.jsx(r,{className:"w-4 h-4",strokeWidth:1.5})})]}),t&&e.jsx("div",{className:"flex items-center gap-3",children:t})]})}export{l as P};
2
- //# sourceMappingURL=PageHeader-DLjHNYHX.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{B as r}from"./vendor-icons-E6836lXZ.js";function m({title:n,subtitle:a,stats:s,actions:l,docsHash:i}){return e.jsxs("div",{className:"flex items-baseline justify-between mb-10",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h1",{className:"text-3xl font-light text-text-primary",children:n}),i&&e.jsx("button",{onClick:()=>{window.location.hash=i},className:"text-text-quaternary hover:text-accent transition-colors mt-1",title:"Open docs for this page",children:e.jsx(r,{className:"w-4 h-4",strokeWidth:1.5})})]}),a&&e.jsx("span",{className:"text-sm text-text-tertiary font-light",children:a})]}),e.jsxs("div",{className:"flex items-center gap-5",children:[s==null?void 0:s.map(t=>e.jsxs("div",{className:"flex items-center gap-1.5 text-xs text-text-tertiary",children:[t.dotClass&&e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${t.dotClass}`}),e.jsx("span",{children:t.label}),e.jsx("span",{className:"font-medium text-text-secondary",children:t.value})]},t.label)),l&&e.jsx("div",{className:"flex items-center gap-3",children:l})]})]})}export{m as P};
2
- //# sourceMappingURL=PageHeaderWithStats-Oljg3n4j.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";const r={1:"P1",2:"P2",3:"P3",4:"P4"},s={1:"text-text-primary font-semibold",2:"text-text-primary font-medium",3:"text-text-secondary",4:"text-text-tertiary"};function o({priority:t}){return e.jsx("span",{className:`text-xs ${s[t]??"text-text-secondary"}`,children:r[t]??`P${t}`})}export{o as P};
2
- //# sourceMappingURL=PriorityBadge-DfQY9St9.js.map
@@ -1,2 +0,0 @@
1
- import{a as b,j as e}from"./vendor-query-B2UbickB.js";import{a as z}from"./tasks-DwEUQ6my.js";import{a as V}from"./useEventHooks-BccPxFR6.js";import{u as J}from"./settings-D0v7RI3o.js";import{P as q}from"./PageHeaderWithStats-Oljg3n4j.js";import{D as S,f as L,C as G,a as K,J as P,S as T}from"./index-BMIU7Im5.js";import{S as W}from"./StatusBadge-XQlNFwmH.js";import{W as Q}from"./WorkflowPill-BbgVTGgI.js";import{T as y}from"./TimestampCell-Dgpl-lKv.js";import{L as D,e as X}from"./vendor-react-CX88sFS5.js";import{R as Y}from"./RolePill-Bp10-WfX.js";import{U as Z}from"./UserName-BXZGXJsU.js";import"./vendor-icons-E6836lXZ.js";import"./users-CCHT00of.js";const ee="bg-stripes animate-pulse opacity-70";function $(t){switch(t){case"completed":return"text-status-success";case"in_progress":case"pending":return"text-status-warning";case"needs_intervention":return"text-status-error";case"cancelled":return"text-text-tertiary";default:return"text-text-tertiary"}}function I(t){switch(t){case"resolved":return"text-status-success";case"pending":return"text-status-warning";case"cancelled":return"text-text-tertiary";default:return"text-text-tertiary"}}function te(t,a,l){return`${t==="task"?"Task":l?"Notification":"Escalation"} is ${a.replace(/_/g," ")}`}function se(t,a){if(a)return ee;switch(t){case"completed":case"resolved":return"bg-status-success";case"pending":case"in_progress":case"needs_intervention":return"bg-status-warning";case"cancelled":return"bg-status-error";default:return"bg-text-tertiary"}}function ae(t){return t.startsWith("mcp")||t.startsWith("Mcp")}function E(t){return!t.workflow_type}function A(t,a){if(t.length<=a)return t;const l=Math.floor((a-1)/2);return`${t.slice(0,l)}…${t.slice(t.length-l)}`}function ne(t,a){const l=Date.now(),c=new Map,x=[];for(const s of a)s.task_id?(c.has(s.task_id)||c.set(s.task_id,[]),c.get(s.task_id).push(s)):x.push(s);const r=[...t].sort((s,d)=>new Date(s.created_at).getTime()-new Date(d.created_at).getTime()),i=[];for(const s of t)i.push(new Date(s.created_at).getTime()),s.completed_at&&i.push(new Date(s.completed_at).getTime());for(const s of a)i.push(new Date(s.created_at).getTime()),s.resolved_at&&i.push(new Date(s.resolved_at).getTime()),s.claimed_at&&i.push(new Date(s.claimed_at).getTime());if(i.length===0)return{lanes:[],timeMin:0,timeMax:1};const o=Math.min(...i),f=t.some(s=>!s.completed_at)||a.some(s=>!s.resolved_at)?Math.max(l,Math.max(...i)):Math.max(...i),p=f-o||1,m=s=>(s-o)/p*100,h=[];for(const s of r){const d=new Date(s.created_at).getTime(),j=s.completed_at?new Date(s.completed_at).getTime():l,g=!s.completed_at;h.push({kind:"task",id:s.id,label:s.workflow_type,taskId:s.id,startMs:d,endMs:j,startPct:m(d),widthPct:Math.max((j-d)/p*100,.5),durationMs:j-d,isOpen:g,task:s});const v=(c.get(s.id)||[]).sort((n,u)=>new Date(n.created_at).getTime()-new Date(u.created_at).getTime());for(const n of v){const u=new Date(n.created_at).getTime(),N=n.resolved_at?new Date(n.resolved_at).getTime():l,M=!n.resolved_at;let w=null;if(n.claimed_at){const U=new Date(n.claimed_at).getTime(),H=N-u||1;w=(U-u)/H*100}h.push({kind:"escalation",id:n.id,label:n.role,taskId:s.id,startMs:u,endMs:N,startPct:m(u),widthPct:Math.max((N-u)/p*100,.5),durationMs:N-u,isOpen:M,escalation:n,claimPct:w})}}for(const s of x){const d=new Date(s.created_at).getTime(),j=s.resolved_at?new Date(s.resolved_at).getTime():l;let g=null;if(s.claimed_at){const v=new Date(s.claimed_at).getTime(),n=j-d||1;g=(v-d)/n*100}h.push({kind:"escalation",id:s.id,label:s.role,taskId:"",startMs:d,endMs:j,startPct:m(d),widthPct:Math.max((j-d)/p*100,.5),durationMs:j-d,isOpen:!s.resolved_at,escalation:s,claimPct:g})}return{lanes:h,timeMin:o,timeMax:f}}function re(t,a,l,c=500){const[x,r]=b.useState(0),i=b.useRef(null),o=l-a||1;b.useEffect(()=>{if(t===0)return;i.current=null,r(0);let f;const p=m=>{i.current===null&&(i.current=m);const h=m-i.current,s=Math.min(h/c,1),d=1-Math.pow(1-s,3);r(d),s<1&&(f=requestAnimationFrame(p))};return f=requestAnimationFrame(p),()=>cancelAnimationFrame(f)},[t,c]);const k=b.useCallback(f=>{const p=(f.startMs-a)/o,m=(f.endMs-a)/o;if(x<p)return{width:0,opacity:0};const h=m-p||.001,s=Math.min((x-p)/h,1),d=f.widthPct*s,j=Math.min(s/.1,1);return{width:d,opacity:j}},[x,a,o]);return{progress:x,animatedBar:k}}function R({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4"})})}function B({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904L9 18.75l-.813-2.846a4.5 4.5 0 00-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 003.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 003.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 00-3.09 3.09zM18.259 8.715L18 9.75l-.259-1.035a3.375 3.375 0 00-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 002.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 002.455 2.456L21.75 6l-1.036.259a3.375 3.375 0 00-2.455 2.456zM16.894 20.567L16.5 21.75l-.394-1.183a2.25 2.25 0 00-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 001.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 001.423 1.423l1.183.394-1.183.394a2.25 2.25 0 00-1.423 1.423z"})})}function O({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M14.857 17.082a23.848 23.848 0 005.454-1.31A8.967 8.967 0 0118 9.75V9A6 6 0 006 9v.75a8.967 8.967 0 01-2.312 6.022c1.733.64 3.56 1.085 5.455 1.31m5.714 0a24.255 24.255 0 01-5.714 0m5.714 0a3 3 0 11-5.714 0"})})}function F({className:t}){return e.jsx("svg",{className:t,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:1.5,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 11-7.5 0 3.75 3.75 0 017.5 0zM4.501 20.118a7.5 7.5 0 0114.998 0A17.933 17.933 0 0112 21.75c-2.676 0-5.216-.584-7.499-1.632z"})})}function ie({allExpanded:t,onToggleAll:a}){return e.jsxs("div",{className:"flex items-center gap-4 mb-4 flex-wrap",children:[e.jsx("button",{onClick:a,className:"text-[10px] text-accent hover:underline",children:t?"Collapse all":"Expand all"}),e.jsxs("div",{className:"flex items-center gap-4 ml-auto",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(R,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Task"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(B,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"AI Task"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(F,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Escalation"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx(O,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Notification"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-status-success"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Done"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsx("span",{className:"w-2 h-2 rounded-full bg-status-warning"}),e.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Active"})]})]})]})}function oe({ticks:t}){return e.jsxs("div",{className:"flex",children:[e.jsx("div",{className:"w-52 shrink-0"}),e.jsx("div",{className:"flex-1 relative h-6 border-b border-surface-border",children:t.map(a=>e.jsx("span",{className:"absolute text-[9px] font-mono text-text-tertiary -translate-x-1/2 bottom-1 whitespace-nowrap",style:{left:`${a.pct}%`},children:a.label},a.pct))})]})}function _({label:t,children:a}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-0.5",children:t}),e.jsx("div",{className:"text-xs text-text-primary",children:a})]})}function le({traceId:t,href:a}){const[l,c]=b.useState(!1),x=i=>{i.stopPropagation(),navigator.clipboard.writeText(t),c(!0),setTimeout(()=>c(!1),1500)},r=i=>{i.stopPropagation(),a&&window.open(a,"_blank","noopener,noreferrer")};return e.jsxs("span",{className:"group/trace inline-flex items-center gap-1.5",children:[a&&e.jsx("button",{onClick:r,title:"Open trace",className:"opacity-0 group-hover/trace:opacity-100 transition-opacity p-0.5",children:e.jsx("svg",{className:"w-3 h-3 text-text-tertiary hover:text-accent",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M13.5 6H5.25A2.25 2.25 0 003 8.25v10.5A2.25 2.25 0 005.25 21h10.5A2.25 2.25 0 0018 18.75V10.5m-4.5-4.5h6m0 0v6m0-6L10.5 15"})})}),e.jsx("button",{onClick:x,title:"Copy trace ID",className:"opacity-0 group-hover/trace:opacity-100 transition-opacity p-0.5",children:e.jsx("svg",{className:`w-3 h-3 transition-colors ${l?"text-status-success":"text-text-tertiary hover:text-accent"}`,fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:l?e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 13l4 4L19 7"}):e.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M8 5H6a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2v-1M8 5a2 2 0 002 2h2a2 2 0 002-2M8 5a2 2 0 012-2h2a2 2 0 012 2m0 0h2a2 2 0 012 2v3"})})}),e.jsx("span",{className:"text-[11px] text-accent",children:"Trace Details"})]})}function ce({task:t,traceUrl:a}){const l=t.completed_at?new Date(t.completed_at).getTime()-new Date(t.created_at).getTime():Date.now()-new Date(t.created_at).getTime();return e.jsxs("div",{className:"grid grid-cols-[3fr_1fr] gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(W,{status:t.status}),e.jsx(Q,{type:t.workflow_type})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsx(_,{label:"Started",children:e.jsx(y,{date:t.created_at})}),e.jsx(_,{label:"Completed",children:t.completed_at?e.jsx(y,{date:t.completed_at}):e.jsx("span",{className:"text-text-tertiary italic text-xs",children:"In progress"})}),e.jsx(_,{label:"Duration",children:e.jsx(S,{ms:l,className:"font-mono text-sm"})})]}),t.milestones.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-1.5",children:"Milestones"}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:t.milestones.map((c,x)=>e.jsxs("span",{className:"px-2 py-0.5 text-[10px] font-mono bg-accent-faint/50 rounded text-text-secondary",children:[c.name,": ",String(c.value)]},x))})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2",children:[e.jsx(D,{to:`/workflows/executions/${encodeURIComponent(t.workflow_id)}`,className:"block text-[11px] text-accent hover:underline",children:"Execution Details"}),e.jsx(D,{to:`/workflows/tasks/detail/${t.id}`,className:"block text-[11px] text-accent hover:underline",children:"Task Details"}),t.trace_id&&e.jsx(le,{traceId:t.trace_id,href:a?a.replace("{traceId}",t.trace_id):void 0})]})]})}function de({escalation:t}){const a=new Date(t.created_at).getTime(),l=t.claimed_at?new Date(t.claimed_at).getTime()-a:null,c=t.resolved_at?new Date(t.resolved_at).getTime()-a:null;return e.jsxs("div",{className:"grid grid-cols-[3fr_1fr] gap-6",children:[e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(W,{status:t.status}),e.jsx(Y,{role:t.role}),t.type&&e.jsxs("span",{className:"text-[10px] text-text-tertiary",children:[t.type,t.subtype?` / ${t.subtype}`:""]})]}),e.jsxs("div",{className:"grid grid-cols-3 gap-4",children:[e.jsx(_,{label:"Created",children:e.jsx(y,{date:t.created_at})}),e.jsx(_,{label:"Claimed",children:t.claimed_at?e.jsxs(e.Fragment,{children:[e.jsx(y,{date:t.claimed_at}),e.jsxs("p",{className:"text-[10px] text-text-tertiary mt-0.5",children:["after ",e.jsx(S,{ms:l}),t.assigned_to&&e.jsxs(e.Fragment,{children:[" ","by"," ",e.jsx("span",{className:"text-text-secondary font-medium",children:e.jsx(Z,{userId:t.assigned_to})})]})]})]}):e.jsx("span",{className:"text-text-tertiary italic text-xs",children:"Unclaimed"})}),e.jsx(_,{label:"Resolved",children:t.resolved_at?e.jsxs(e.Fragment,{children:[e.jsx(y,{date:t.resolved_at}),e.jsxs("p",{className:"text-[10px] text-text-tertiary mt-0.5",children:[e.jsx(S,{ms:c})," total"]})]}):e.jsx("span",{className:"text-text-tertiary italic text-xs",children:"Pending"})})]}),t.description&&e.jsxs("div",{children:[e.jsx("p",{className:"text-[9px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Description"}),e.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed",children:t.description})]})]}),e.jsxs("div",{className:"flex flex-col items-end gap-2",children:[t.workflow_id&&e.jsx(D,{to:`/workflows/executions/${encodeURIComponent(t.workflow_id)}`,className:"block text-[11px] text-accent hover:underline",children:"Execution Details"}),e.jsx(D,{to:`/escalations/detail/${t.id}`,className:"block text-[11px] text-accent hover:underline",children:"Escalation Details"})]})]})}function xe({lane:t,ticks:a,isExpanded:l,onToggle:c,anim:x,animDone:r,traceUrl:i}){var m,h;const o=t.kind==="task",k=o?t.task.status:t.escalation.status,f=se(k,t.isOpen),p=x.opacity>0;return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center border-b border-surface-border cursor-pointer hover:bg-surface-sunken/40 transition-colors",onClick:c,children:[e.jsxs("div",{className:`w-52 shrink-0 py-3 pr-4 flex items-center gap-2 ${o?"":"pl-6"}`,style:{opacity:p?1:0,transition:"opacity 0.15s ease-out"},children:[o?ae(t.task.workflow_type)?e.jsx(B,{className:`w-4 h-4 shrink-0 ${$(t.task.status)}`}):e.jsx(R,{className:`w-4 h-4 shrink-0 ${$(t.task.status)}`}):E(t.escalation)?e.jsx(O,{className:`w-4 h-4 shrink-0 ${I(t.escalation.status)}`}):e.jsx(F,{className:`w-4 h-4 shrink-0 ${I(t.escalation.status)}`}),e.jsx("p",{className:"text-xs font-mono text-text-secondary whitespace-nowrap overflow-hidden",title:te(t.kind,o?t.task.status:t.escalation.status,!o&&E(t.escalation)),children:o?A(t.label,24):A(((m=t.escalation)==null?void 0:m.role)??t.label,20)})]}),e.jsxs("div",{className:"flex-1 relative h-10",children:[a.map(s=>e.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-surface-border opacity-30",style:{left:`${s.pct}%`}},s.pct)),e.jsxs("div",{className:`absolute top-2 h-6 rounded-sm ${l?`${f} ring-2 ring-accent ring-offset-1`:`${f} hover:opacity-80`}`,style:{left:`${t.startPct}%`,width:p?`${Math.max(x.width,.3)}%`:"0%",minWidth:p?"4px":"0px",opacity:x.opacity},title:`${t.label} — ${L(t.durationMs)} — ${new Date(t.startMs).toLocaleTimeString()}`,children:[x.width>8&&r&&e.jsx("span",{className:"absolute inset-0 flex items-center px-1.5 text-[9px] font-mono text-white truncate",children:L(t.durationMs)}),t.claimPct!=null&&r&&e.jsx("div",{className:"absolute top-0 bottom-0 w-px border-l border-dashed border-white/70",style:{left:`${t.claimPct}%`},title:(h=t.escalation)!=null&&h.assigned_to?`Claimed by ${t.escalation.assigned_to}`:"Claimed",children:e.jsx("div",{className:"absolute -top-1 -left-[3px] w-[7px] h-[7px] rounded-full bg-white border border-amber-600"})})]})]})]}),e.jsx(G,{open:l,children:e.jsx("div",{className:"py-4 px-6 pl-52 border-b border-surface-border bg-surface-sunken/20",children:o&&t.task?e.jsx(ce,{task:t.task,traceUrl:i}):t.escalation?e.jsx(de,{escalation:t.escalation}):null})})]})}function me({tasks:t,escalations:a,traceUrl:l}){const[c,x]=b.useState(new Set),{lanes:r,timeMin:i,timeMax:o}=b.useMemo(()=>ne(t,a),[t,a]),k=o-i||1,{progress:f,animatedBar:p}=re(r.length,i,o);if(r.length===0)return e.jsx("p",{className:"text-sm text-text-tertiary py-8 text-center",children:"No events in this process."});const m=5,h=Array.from({length:m+1},(n,u)=>({pct:u/m*100,label:L(Math.round(u/m*k))})),s=n=>{x(u=>{const N=new Set(u);return N.has(n)?N.delete(n):N.add(n),N})},d=r.map(n=>n.id),j=d.length>0&&d.every(n=>c.has(n)),g=()=>{x(j?new Set:new Set(d))},v=f>=1;return e.jsxs("div",{className:"py-2",children:[e.jsx(ie,{allExpanded:j,onToggleAll:g}),e.jsx(oe,{ticks:h}),r.map(n=>e.jsx(xe,{lane:n,ticks:h,isExpanded:c.has(n.id),onToggle:()=>s(n.id),anim:p(n),animDone:v,traceUrl:l},`${n.kind}-${n.id}`))]})}function C(t){if(!t)return null;try{return JSON.parse(t)}catch{return null}}function ue(t){return t.length===0?null:[...t].sort((a,l)=>new Date(a.created_at).getTime()-new Date(l.created_at).getTime())[0]}function Te(){var j;const{originId:t}=X();V(t);const{data:a,isLoading:l}=z(t??""),{data:c}=J(),x=((j=c==null?void 0:c.telemetry)==null?void 0:j.traceUrl)??null,r=(a==null?void 0:a.tasks)??[],i=(a==null?void 0:a.escalations)??[],o=b.useMemo(()=>ue(r),[r]),k=b.useMemo(()=>C(o==null?void 0:o.envelope),[o]),f=b.useMemo(()=>{if(o!=null&&o.data)return C(o.data);const g=r.filter(v=>v.status==="completed"&&v.data).sort((v,n)=>new Date(n.completed_at).getTime()-new Date(v.completed_at).getTime());return g.length>0?C(g[0].data):null},[o,r]),p=b.useMemo(()=>r.length>0&&r.some(g=>g.status!=="completed"&&g.status!=="cancelled"),[r]),m=b.useMemo(()=>{const g=r.filter(u=>u.status==="completed").length,v=r.filter(u=>u.status==="needs_intervention").length,n=i.filter(u=>u.status==="resolved").length;return{tasks:r.length,completed:g,escalated:v,escalations:i.length,resolved:n}},[r,i]),h=b.useMemo(()=>{if(r.length===0&&i.length===0)return null;const v=[...r.map(w=>w.created_at),...i.map(w=>w.created_at)].sort()[0],n=r.every(w=>w.status==="completed"||w.status==="cancelled"),u=i.every(w=>w.status==="resolved"),N=r.length>0&&n&&u,M=N?[...r.map(w=>w.completed_at),...i.map(w=>w.resolved_at)].filter(Boolean).sort().pop()??null:null;return{startIso:v,endIso:M,isFinished:N,elapsed:K(v,M)}},[r,i]),s=b.useMemo(()=>{const g=[];return h&&g.push({label:h.isFinished?"Completed":"Running",value:h.elapsed,dotClass:h.isFinished?"bg-status-success":"bg-status-pending animate-pulse"}),g.push({label:"Tasks",value:`${m.completed}/${m.tasks}`},{label:"Escalations",value:`${m.resolved}/${m.escalations}`}),g},[h,m]);if(l&&r.length===0)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]});const d=k||f||p;return e.jsxs("div",{children:[e.jsx(q,{title:"Process Detail",docsHash:"#docs:dashboard.md:process-detail",subtitle:t,stats:s}),d&&e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-8 mb-10",children:[e.jsx("div",{children:k?e.jsx(P,{data:k,label:"Input",defaultMode:"json",defaultCollapsed:!0}):e.jsxs("div",{children:[e.jsx(T,{children:"Input"}),e.jsx("div",{className:"font-mono text-xs bg-surface-sunken rounded-md p-4 text-text-tertiary italic mt-2",children:"Waiting for task..."})]})}),e.jsx("div",{children:f?e.jsx(P,{data:f,label:"Output",defaultMode:"json",defaultCollapsed:!0}):p?e.jsxs("div",{children:[e.jsx(T,{children:"Output"}),e.jsxs("div",{className:"flex items-center gap-2 font-mono text-xs bg-surface-sunken rounded-md p-4 text-text-secondary mt-2",children:[e.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-status-pending animate-pulse"}),"Processing..."]})]}):null})]}),e.jsx(T,{className:"mb-6",children:"Timeline"}),e.jsx(me,{tasks:r,escalations:i,traceUrl:x})]})}export{Te as ProcessDetailPage};
2
- //# sourceMappingURL=ProcessDetailPage-Da-miMYZ.js.map
@@ -1,2 +0,0 @@
1
- import{a as c,j as s}from"./vendor-query-B2UbickB.js";import{u as h}from"./tasks-DwEUQ6my.js";import{u as w}from"./workflows-DNZf6Pmq.js";import{u as k}from"./useEventHooks-BccPxFR6.js";import{u as y}from"./useFilterParams-DZCAaBC7.js";import{D as _}from"./DataTable-D9yuBv0w.js";import{T as p}from"./TimestampCell-Dgpl-lKv.js";import{S as b}from"./StickyPagination-F9FZsRy9.js";import{F as j,a as v,b as m}from"./FilterBar-Ck4K4rzu.js";import{P}from"./PageHeader-DLjHNYHX.js";import{L as S}from"./ListToolbar-DuON-br0.js";import{W as N}from"./WorkflowPill-BbgVTGgI.js";import{c as T}from"./vendor-react-CX88sFS5.js";import"./index-BMIU7Im5.js";import"./vendor-icons-E6836lXZ.js";import"./EmptyState-BcsfPq9T.js";function C(e,t=300){const[i,o]=c.useState(e);return c.useEffect(()=>{const l=setTimeout(()=>o(e),t);return()=>clearTimeout(l)},[e,t]),i}const $=[{value:"active",label:"Active"},{value:"completed",label:"Completed"},{value:"escalated",label:"Escalated"}],F=[{key:"origin_id",label:"Origin",render:e=>s.jsx("span",{className:"font-mono text-xs",title:e.origin_id,children:e.origin_id.length>40?`${e.origin_id.slice(0,40)}…`:e.origin_id})},{key:"workflow_types",label:"Workflows",render:e=>s.jsx("div",{className:"flex flex-wrap gap-1",children:e.workflow_types.map(t=>s.jsx(N,{type:t},t))})},{key:"task_count",label:"Tasks",render:e=>s.jsx("span",{children:e.task_count}),className:"w-20 text-right"},{key:"completed",label:"Completed",render:e=>e.completed>0?s.jsx("span",{className:"text-status-success",children:e.completed}):s.jsx("span",{className:"text-text-tertiary",children:"0"}),className:"w-24 text-right"},{key:"escalated",label:"Escalated",render:e=>e.escalated>0?s.jsx("span",{className:"text-status-error",children:e.escalated}):s.jsx("span",{className:"text-text-tertiary",children:"0"}),className:"w-24 text-right"},{key:"started_at",label:"Started",render:e=>s.jsx(p,{date:e.started_at}),className:"w-44"},{key:"last_activity",label:"Last Activity",render:e=>s.jsx(p,{date:e.last_activity}),className:"w-44"}];function J(){k();const e=T(),{filters:t,setFilter:i,pagination:o}=y({filters:{workflow_type:"",status:"",search:""}}),l=C(t.search,300),{data:d}=w(),f=[...new Set((d??[]).map(a=>a.workflow_type))].sort(),{data:r,isLoading:u,refetch:g,isFetching:x}=h({workflow_type:t.workflow_type||void 0,status:t.status||void 0,search:l||void 0,limit:o.pageSize,offset:o.offset}),n=(r==null?void 0:r.total)??0;return s.jsxs("div",{children:[s.jsx(P,{title:"All Processes",docsHash:"#docs:dashboard.md:processes-overview"}),s.jsxs(j,{actions:s.jsx(S,{onRefresh:()=>g(),isFetching:x,apiPath:`/tasks/processes?limit=${o.pageSize}&offset=${o.offset}${t.workflow_type?`&workflow_type=${t.workflow_type}`:""}${t.status?`&status=${t.status}`:""}${l?`&search=${l}`:""}`}),children:[s.jsx(v,{label:"Search",value:t.search,onChange:a=>i("search",a),placeholder:"origin, workflow, or trace ID"}),s.jsx(m,{label:"Status",value:t.status,onChange:a=>i("status",a),options:$}),s.jsx(m,{label:"Workflow Type",value:t.workflow_type,onChange:a=>i("workflow_type",a),options:f.map(a=>({value:a,label:a}))})]}),s.jsx(_,{columns:F,data:(r==null?void 0:r.processes)??[],keyFn:a=>a.origin_id,onRowClick:a=>e(`/processes/detail/${encodeURIComponent(a.origin_id)}`),isLoading:u,emptyMessage:"No business processes found"}),s.jsx(b,{page:o.page,totalPages:o.totalPages(n),onPageChange:o.setPage,total:n,pageSize:o.pageSize,onPageSizeChange:o.setPageSize})]})}export{J as ProcessesListPage};
2
- //# sourceMappingURL=ProcessesListPage-CW-2yFw_.js.map
@@ -1,2 +0,0 @@
1
- import{j as t}from"./vendor-query-B2UbickB.js";import{U as r}from"./vendor-icons-E6836lXZ.js";function c({role:e,size:s="sm"}){const n=s==="md"?"py-0.5 text-[11px] gap-1.5":"py-0.5 text-[10px] gap-1",a=s==="md"?"w-3 h-3":"w-2.5 h-2.5";return t.jsxs("span",{className:`inline-flex items-center ${n} text-text-secondary`,children:[t.jsx(r,{className:`${a} shrink-0 text-accent/75`}),e]})}export{c as R};
2
- //# sourceMappingURL=RolePill-Bp10-WfX.js.map
@@ -1,2 +0,0 @@
1
- import{a as i,j as e}from"./vendor-query-B2UbickB.js";import{b as f,c as j,d as g,e as N,f as y,g as b}from"./roles-BMAzzeHR.js";import{D as C}from"./DataTable-D9yuBv0w.js";import{C as v}from"./ConfirmDeleteModal-dOxidrSR.js";import{P as k}from"./PageHeader-DLjHNYHX.js";import{M as w}from"./Modal-DEODGeqx.js";import{R as _}from"./RolePill-Bp10-WfX.js";import{R,a as S}from"./RowActions-Dg-Fsm5O.js";import{m as P}from"./vendor-icons-E6836lXZ.js";import"./index-BMIU7Im5.js";import"./vendor-react-CX88sFS5.js";import"./EmptyState-BcsfPq9T.js";function A({open:s,onClose:r}){const a=f(),[l,m]=i.useState(""),[n,c]=i.useState(s);s!==n&&(c(s),s&&(m(""),a.reset()));const x=()=>{const o=l.trim().toLowerCase();o&&a.mutate(o,{onSuccess:r})};return e.jsx(w,{open:s,onClose:r,title:"Create Role",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Role Name (required)"}),e.jsx("input",{type:"text",value:l,onChange:o=>m(o.target.value),placeholder:"e.g., reviewer",className:"input text-xs w-full",onKeyDown:o=>{o.key==="Enter"&&x()}}),e.jsx("p",{className:"text-[10px] text-text-tertiary mt-1",children:"Lowercase letters, numbers, hyphens, and underscores only."})]}),a.error&&e.jsx("p",{className:"text-xs text-status-error",children:a.error.message}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:r,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:x,disabled:!l.trim()||a.isPending,className:"btn-primary text-xs",children:a.isPending?"Creating...":"Create"})]})]})})}function D({selectedRole:s,allRoles:r}){const{data:a}=j(),l=g(),m=N(),[n,c]=i.useState(""),x=(a==null?void 0:a.chains)??[],o=i.useMemo(()=>s?x.filter(t=>t.source_role===s).map(t=>t.target_role):[],[x,s]),d=i.useMemo(()=>s?r.filter(t=>t!==s&&t!=="superadmin"&&!o.includes(t)):[],[r,s,o]),u=()=>{!s||!n.trim()||l.mutate({source_role:s,target_role:n.trim()},{onSuccess:()=>c("")})},p=t=>{s&&m.mutate({source_role:s,target_role:t})},h=s==="superadmin";return e.jsxs("div",{className:"border-l border-surface-border pl-6 min-h-[300px]",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-4",children:"Escalation Routing"}),s?h?e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-mono text-text-primary mb-2",children:s}),e.jsx("p",{className:"text-xs text-text-tertiary",children:"Superadmins can escalate to any role implicitly."})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-mono text-text-primary",children:s}),e.jsx("p",{className:"text-[10px] text-text-tertiary mt-0.5",children:"Can escalate to:"})]}),o.length===0?e.jsx("p",{className:"text-xs text-text-tertiary",children:"No escalation targets configured."}):e.jsx("div",{className:"flex flex-wrap gap-2",children:o.map(t=>e.jsxs("span",{className:"inline-flex items-center gap-1.5 px-2.5 py-1 text-xs bg-surface-sunken rounded-full text-text-secondary font-mono",children:[t,e.jsx("button",{onClick:()=>p(t),className:"text-text-tertiary hover:text-status-error transition-colors",title:`Remove ${t}`,children:"×"})]},t))}),d.length>0&&e.jsxs("div",{className:"pt-3 border-t border-surface-border",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-2",children:"Add Target"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("select",{value:n,onChange:t=>c(t.target.value),className:"select text-xs font-mono flex-1",children:[e.jsx("option",{value:"",children:"Select a role..."}),d.map(t=>e.jsx("option",{value:t,children:t},t))]}),e.jsx("button",{onClick:u,disabled:!n||l.isPending,className:"btn-primary text-xs",children:l.isPending?"Adding...":"Add"})]})]})]}):e.jsx("p",{className:"text-xs text-text-tertiary",children:"Select a role to manage its escalation targets."})]})}function E(s){return[{key:"role",label:"Role",render:r=>e.jsx(_,{role:r.role})},{key:"user_count",label:"Users",render:r=>r.user_count>0?e.jsx("span",{className:"text-text-primary",children:r.user_count}):e.jsx("span",{className:"text-text-tertiary",children:"0"}),className:"w-24 text-right"},{key:"chain_count",label:"Escalations",render:r=>r.chain_count>0?e.jsx("span",{className:"text-text-primary",children:r.chain_count}):e.jsx("span",{className:"text-text-tertiary",children:"0"}),className:"w-28 text-right"},{key:"workflow_count",label:"Workflows",render:r=>r.workflow_count>0?e.jsx("span",{className:"text-text-primary",children:r.workflow_count}):e.jsx("span",{className:"text-text-tertiary",children:"0"}),className:"w-28 text-right"},{key:"actions",label:"",render:r=>r.user_count>0||r.chain_count>0||r.workflow_count>0?null:e.jsx(R,{children:e.jsx(S,{icon:P,title:"Delete role",onClick:()=>s(r),colorClass:"text-text-tertiary hover:text-status-error"})}),className:"w-16 text-right"}]}function z(){const{data:s,isLoading:r}=y(),a=b(),[l,m]=i.useState(!1),[n,c]=i.useState(null),[x,o]=i.useState(null),d=(s==null?void 0:s.roles)??[],u=i.useMemo(()=>d.map(t=>t.role),[d]),p=E(t=>c(t)),h=()=>{n&&a.mutate(n.role,{onSuccess:()=>c(null)})};return e.jsxs("div",{children:[e.jsx(k,{title:"Roles",docsHash:"#docs:dashboard.md:roles-and-permissions",actions:e.jsx("button",{onClick:()=>m(!0),className:"btn-primary text-xs",children:"Add Role"})}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_320px] gap-6",children:[e.jsx("div",{children:e.jsx(C,{columns:p,data:d,keyFn:t=>t.role,isLoading:r,emptyMessage:"No roles found",onRowClick:t=>o(t.role),activeRowKey:x})}),e.jsx(D,{selectedRole:x,allRoles:u})]}),e.jsx(A,{open:l,onClose:()=>m(!1)}),e.jsx(v,{open:!!n,onClose:()=>c(null),onConfirm:h,title:"Delete Role",description:e.jsxs(e.Fragment,{children:["Delete role"," ",e.jsx("span",{className:"font-medium font-mono text-text-primary",children:n==null?void 0:n.role}),"? This action cannot be undone."]}),isPending:a.isPending,error:a.error})]})}export{z as RolesPage};
2
- //# sourceMappingURL=RolesPage-Bg_hEu9H.js.map
@@ -1,2 +0,0 @@
1
- import{j as o}from"./vendor-query-B2UbickB.js";function c({icon:t,title:e,onClick:i,colorClass:n="text-text-tertiary hover:text-accent",alwaysVisible:r}){return o.jsx("button",{onClick:a=>{a.stopPropagation(),i(a)},className:`transition-opacity ${r?"opacity-100":"opacity-0 group-hover/row:opacity-100"} ${n}`,title:e,children:o.jsx(t,{className:"w-[18px] h-[18px]",strokeWidth:1.5})})}function p({children:t}){return o.jsx("span",{className:"flex items-center justify-end gap-2.5",children:t})}export{p as R,c as a};
2
- //# sourceMappingURL=RowActions-Dg-Fsm5O.js.map
@@ -1,2 +0,0 @@
1
- import{j as s}from"./vendor-query-B2UbickB.js";import{B as c}from"./BotPicker-CwfVVWxh.js";import{i as m}from"./index-BMIU7Im5.js";import{a as o,a5 as x}from"./vendor-icons-E6836lXZ.js";function j({selected:e,onChange:n}){const{user:t,isSuperAdmin:a,hasRoleType:i}=m(),r=a||i("admin");return s.jsx("div",{children:r?s.jsx(c,{selected:e,onChange:n}):s.jsx("div",{className:"flex items-center gap-1.5",children:e?s.jsxs(s.Fragment,{children:[s.jsx(o,{className:"w-3 h-3 text-accent/75 shrink-0",strokeWidth:1.5}),s.jsxs("span",{className:"text-[10px] text-text-secondary",children:["Running as ",s.jsx("span",{className:"font-medium text-accent font-mono",children:e})]})]}):s.jsxs(s.Fragment,{children:[s.jsx(x,{className:"w-3 h-3 text-accent/75 shrink-0",strokeWidth:1.5}),s.jsxs("span",{className:"text-[10px] text-text-secondary",children:["Running as ",s.jsx("span",{className:"font-medium text-accent",children:(t==null?void 0:t.displayName)||(t==null?void 0:t.userId)||"you"})]})]})})})}export{j as R};
2
- //# sourceMappingURL=RunAsSelector-hYP59xHH.js.map
@@ -1,2 +0,0 @@
1
- import{j as t}from"./vendor-query-B2UbickB.js";import{b as i,a0 as x}from"./vendor-icons-E6836lXZ.js";import{c}from"./vendor-react-CX88sFS5.js";function h({name:e,serverId:r,short:a=!0}){const n=c(),s=a?e.replace(/^long-tail-/,""):e;return r?t.jsxs("button",{onClick:o=>{o.stopPropagation(),n(`/mcp/servers/${r}`)},className:"group/srv inline-flex items-center gap-1 text-[11px] font-mono text-text-tertiary hover:text-accent transition-colors",title:e,children:[t.jsx(i,{className:"w-2.5 h-2.5 shrink-0 text-text-quaternary group-hover/srv:text-accent",strokeWidth:1.5}),s,t.jsx(x,{className:"w-2 h-2 shrink-0 invisible group-hover/srv:visible text-accent",strokeWidth:1.5})]}):t.jsxs("span",{className:"inline-flex items-center gap-1 text-[11px] font-mono text-text-tertiary",title:e,children:[t.jsx(i,{className:"w-2.5 h-2.5 shrink-0 text-text-quaternary",strokeWidth:1.5}),s]})}export{h as S};
2
- //# sourceMappingURL=ServerName-C9lUCFYb.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";function l({label:c,value:x,sub:t,dotClass:r,colorClass:i="text-text-primary",onClick:s}){const a=e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[r&&e.jsx("span",{className:`w-2 h-2 rounded-full ${r}`}),e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:c})]}),e.jsx("p",{className:`text-2xl font-light tabular-nums ${i}`,children:x}),t&&e.jsx("p",{className:"text-xs text-text-tertiary mt-1",children:t})]}),n="bg-surface-raised border border-surface-border rounded-md p-4 text-left";return s?e.jsx("button",{onClick:s,className:`${n} hover:border-accent/40 transition-colors`,children:a}):e.jsx("div",{className:n,children:a})}export{l as S};
2
- //# sourceMappingURL=StatCard-DlgF0CJC.js.map
@@ -1,2 +0,0 @@
1
- import{j as s}from"./vendor-query-B2UbickB.js";const r={pending:"bg-status-pending",in_progress:"bg-status-active animate-pulse",completed:"bg-status-success",resolved:"bg-status-success",needs_intervention:"bg-status-error",failed:"bg-status-error",cancelled:"bg-accent-muted",draft:"bg-status-draft",deployed:"bg-status-active",active:"bg-status-success",archived:"bg-text-tertiary",connected:"bg-status-success",registered:"bg-status-pending",disconnected:"bg-text-tertiary",error:"bg-status-error"},a={pending:"Pending",in_progress:"In Progress",completed:"Completed",resolved:"Resolved",needs_intervention:"Needs Intervention",failed:"Failed",cancelled:"Cancelled",draft:"Draft",deployed:"Deployed",active:"Active",archived:"Archived",connected:"connected",registered:"registered",disconnected:"disconnected",error:"error"};function c({status:e}){const t=r[e]??"bg-status-pending",n=a[e]??e;return s.jsxs("span",{className:"inline-flex items-center gap-2",children:[s.jsx("span",{className:`w-2 h-2 rounded-full ${t}`}),s.jsx("span",{className:"text-xs text-text-secondary",children:n})]})}export{c as S};
2
- //# sourceMappingURL=StatusBadge-XQlNFwmH.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";function d({steps:i,currentStep:c,onStepClick:n}){return e.jsx("div",{className:"flex items-center justify-center gap-1 pb-4 border-b border-surface-border mb-4",children:i.map((a,t)=>{const o=t<c,r=t===c,s=!!n;return e.jsxs("div",{className:"flex items-center gap-1",children:[t>0&&e.jsx("div",{className:`w-4 h-px ${o?"bg-accent":"bg-surface-border"}`}),e.jsxs("button",{type:"button",onClick:s?()=>n(t):void 0,className:`flex items-center gap-1 ${s?"cursor-pointer":"cursor-default"}`,children:[e.jsx("span",{className:`w-5 h-5 rounded-full text-[10px] font-semibold flex items-center justify-center shrink-0 transition-colors ${r?"bg-accent text-text-inverse":o?"bg-accent-muted text-accent":"bg-surface-sunken text-text-tertiary"} ${s&&!r?"hover:bg-accent-muted hover:text-accent":""}`,children:t+1}),e.jsx("span",{className:`text-[10px] font-semibold uppercase tracking-wider whitespace-nowrap transition-colors ${r?"text-text-primary":"text-text-tertiary"} ${s&&!r?"hover:text-text-primary":""}`,children:a})]})]},a)})})}export{d as S};
2
- //# sourceMappingURL=StepIndicator-CuUIGxKk.js.map
@@ -1,2 +0,0 @@
1
- import{j as s}from"./vendor-query-B2UbickB.js";const d=[10,25,50,100];function o({page:t,totalPages:r,onPageChange:l,total:n,pageSize:c,onPageSizeChange:i}){if(n===0)return null;const a=(t-1)*c+1,x=Math.min(t*c,n);return s.jsxs("div",{className:"flex items-center justify-between pt-4",children:[s.jsxs("div",{className:"flex items-center gap-4",children:[s.jsxs("p",{className:"text-xs text-text-tertiary",children:[a,"–",x," of ",n]}),i&&s.jsx("select",{value:c,onChange:e=>i(parseInt(e.target.value)),className:"select text-xs py-1",children:d.map(e=>s.jsxs("option",{value:e,children:[e," / page"]},e))})]}),r>1&&s.jsxs("div",{className:"flex items-center gap-1",children:[s.jsx("button",{onClick:()=>l(t-1),disabled:t<=1,className:"btn-ghost text-xs disabled:opacity-30 disabled:cursor-not-allowed",children:"Previous"}),s.jsxs("span",{className:"px-3 text-xs text-text-secondary",children:[t," / ",r]}),s.jsx("button",{onClick:()=>l(t+1),disabled:t>=r,className:"btn-ghost text-xs disabled:opacity-30 disabled:cursor-not-allowed",children:"Next"})]})]})}function m(t){return t.total===0?null:s.jsx("div",{className:"sticky bg-surface/95 backdrop-blur-sm border-t border-surface-border -mx-10 px-10 pt-2 pb-4",style:{bottom:"calc(var(--feed-height, 0px) - 8px)"},children:s.jsx(o,{...t})})}export{m as S};
2
- //# sourceMappingURL=StickyPagination-F9FZsRy9.js.map
@@ -1,2 +0,0 @@
1
- import{j as t,a as D}from"./vendor-query-B2UbickB.js";import{D as K,c as L,J as j,f as I,C as Y}from"./index-BMIU7Im5.js";import{S as J}from"./StatusBadge-XQlNFwmH.js";import{L as A}from"./vendor-react-CX88sFS5.js";function O(s){if(!s)return null;try{return JSON.parse(s)}catch{return s}}function z({event:s}){return t.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-3",children:[s.attributes.activity_type&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Activity"}),t.jsx("p",{className:"text-xs font-mono text-text-primary",children:s.attributes.activity_type})]}),t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Kind"}),t.jsx("p",{className:"text-xs font-mono text-text-primary",children:s.attributes.kind})]}),s.duration_ms!==null&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Duration"}),t.jsx(K,{ms:s.duration_ms,className:"font-mono text-text-primary"})]}),t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Time"}),t.jsx(L,{date:s.event_time,format:"datetime",className:"font-mono text-text-primary"})]}),s.attributes.signal_name&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Signal"}),t.jsx("p",{className:"text-xs font-mono text-text-primary",children:s.attributes.signal_name})]}),s.attributes.awaited!==void 0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Awaited"}),t.jsx("p",{className:"text-xs font-mono text-text-primary",children:s.attributes.awaited?"Yes":"No (fire-and-forget)"})]}),s.attributes.timeline_key&&t.jsxs("div",{className:"col-span-2",children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Timeline Key"}),t.jsx("p",{className:"text-xs font-mono text-text-primary truncate",title:s.attributes.timeline_key,children:s.attributes.timeline_key})]}),s.attributes.execution_index!==void 0&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Exec Index"}),t.jsx("p",{className:"text-xs font-mono text-text-primary",children:s.attributes.execution_index})]}),s.attributes.scheduled_event_id!=null&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Scheduled Event"}),t.jsxs("p",{className:"text-xs font-mono text-text-primary",children:["#",s.attributes.scheduled_event_id]})]}),s.attributes.wait_event_id!=null&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Wait Started"}),t.jsxs("p",{className:"text-xs font-mono text-text-primary",children:["Event #",s.attributes.wait_event_id]})]}),s.attributes.initiated_event_id!=null&&t.jsxs("div",{children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Initiated Event"}),t.jsxs("p",{className:"text-xs font-mono text-text-primary",children:["#",s.attributes.initiated_event_id]})]})]})}function B({event:s,childTask:n}){const r=n?O(n.envelope):null,c=n?O(n.data):null;return!n&&s.attributes.child_workflow_id?t.jsx("div",{className:"border-t border-surface-border pt-3",children:t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[t.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Child Workflow"}),t.jsx(A,{to:`/workflows/executions/${s.attributes.child_workflow_id}`,className:"text-xs font-mono text-accent hover:underline",onClick:d=>d.stopPropagation(),children:s.attributes.child_workflow_id})]})}):n?t.jsxs("div",{className:"space-y-3 border-t border-surface-border pt-3",children:[t.jsxs("div",{className:"flex items-center gap-3 flex-wrap",children:[t.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Child Workflow"}),t.jsx(A,{to:`/workflows/executions/${n.workflow_id}`,className:"text-xs font-mono text-accent hover:underline",onClick:d=>d.stopPropagation(),children:n.workflow_id}),t.jsx(J,{status:n.status}),n.completed_at&&t.jsxs("span",{className:"text-[10px] text-text-tertiary",children:["Completed ",t.jsx(L,{date:n.completed_at,format:"relative"})]})]}),(r!=null||c!=null)&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r!=null?t.jsx(j,{data:r,label:"Input (Envelope)",variant:"panel"}):t.jsx("div",{}),c!=null?t.jsx(j,{data:c,label:"Output (Result)",variant:"panel"}):t.jsx("div",{})]})]}):null}function G({event:s,childTask:n}){const r=s.attributes.input,c=s.attributes.result,d=s.category==="signal",x=s.category==="activity",o=s.category==="child_workflow",p=r!==void 0&&(x||o),m=!n&&c!==void 0&&(x||o),l=s.attributes.activity_type==="ltSignalParent"?"Signal Payload":"Result";return p||m?t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[p?t.jsx(j,{data:r,label:"Input",variant:"panel"}):t.jsx("div",{}),m?t.jsx(j,{data:c,label:l,variant:"panel"}):t.jsx("div",{})]}):d&&r!==void 0?t.jsx(j,{data:r,label:"Signal Payload",variant:"panel"}):null}function H({event:s,childTask:n,pending:r=!1,onClose:c}){return t.jsxs("div",{className:"p-4 bg-surface-sunken rounded-md space-y-4",children:[t.jsxs("div",{className:"flex items-center justify-between gap-2",children:[t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("p",{className:"font-mono font-medium text-sm text-text-primary",children:s.attributes.activity_type??s.attributes.signal_name??s.attributes.child_workflow_id??s.event_type}),r&&t.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-status-warning/15 text-status-warning",children:[t.jsx("span",{className:"w-1.5 h-1.5 rounded-full bg-status-warning animate-pulse"}),"Pending"]})]}),c&&t.jsx("button",{onClick:c,className:"text-text-tertiary hover:text-text-primary text-xs",children:"Close"})]}),t.jsx(z,{event:s}),t.jsx(B,{event:s,childTask:n}),t.jsx(G,{event:s,childTask:n}),s.attributes.failure!==void 0&&t.jsx(j,{data:s.attributes.failure,label:"Failure"}),(()=>{const{kind:d,activity_type:x,result:o,timeline_key:p,execution_index:m,signal_name:l,input:_,child_workflow_id:N,awaited:g,wait_event_id:k,scheduled_event_id:b,initiated_event_id:u,failure:y,trace_id:v,span_id:E,...M}=s.attributes;return Object.keys(M).length>0?t.jsx(j,{data:M,label:"Attributes"}):null})()]})}const w={activity:{bar:"bg-blue-500",outline:"border-blue-500 bg-transparent",text:"text-blue-500",label:"Activities"},signal:{bar:"bg-emerald-500",outline:"border-emerald-500 bg-transparent",text:"text-emerald-500",label:"Signals"},timer:{bar:"bg-status-warning",outline:"border-status-warning bg-transparent",text:"text-status-warning",label:"Timers"},child_workflow:{bar:"bg-violet-500",outline:"border-violet-500 bg-transparent",text:"text-violet-500",label:"Child Workflows"}},F="bg-stripes animate-pulse opacity-70",X=new Set(["callLLM","callDbTool","callVisionTool","callMcpTool","getDBTools","getVisionTools"]);function q(s,n){if(!s||typeof s!="string")return s??"";if(s.length<=n)return s;const r=Math.floor((n-1)/2);return`${s.slice(0,r)}…${s.slice(s.length-r)}`}function Q(s){const n=[],r=new Map,c=new Map;for(const x of s){const o=x.attributes.timeline_key;if(!o)continue;const p=x.event_type;p==="activity_task_scheduled"||p==="timer_started"||p==="child_workflow_execution_started"||p==="signal_wait_started"?r.set(o,x):c.set(o,x)}const d=new Set;for(const x of s){const o=x.attributes.timeline_key;if(o&&d.has(o))continue;o&&d.add(o);const p=o?r.get(o):void 0,m=o?c.get(o):void 0,l=m||p||x,_=l.category,N=String(l.attributes.activity_type||l.attributes.signal_name||l.attributes.child_workflow_id||l.event_type||"unknown"),g=p||l,k=m,b=new Date(g.event_time).getTime();let u=null,y=null,v=!1;k?(u=new Date(k.event_time).getTime(),y=k.duration_ms??u-b):l.duration_ms!==null?(y=l.duration_ms,u=b+y):v=!0,n.push({category:_,name:N||l.event_type,startTime:b,endTime:u,duration:y,eventId:l.event_id,pending:v})}return n}function st({events:s,childTasks:n,outline:r}){const[c,d]=D.useState(new Set),[x,o]=D.useState(null),m=s.filter(e=>e.category!=="workflow");if(m.length===0)return null;const l=Q(m);if(l.length===0)return null;const _=Date.now(),N=l.flatMap(e=>{const i=[e.startTime];return e.endTime?i.push(e.endTime):i.push(_),i}),g=Math.min(...N),b=Math.max(...N)-g||1,u=new Map;for(const e of l){const i=`${e.category}:${e.name}`,a=e.startTime-g,h=(e.endTime?e.endTime-g:_-g)-a,S={eventId:e.eventId,startPct:a/b*100,widthPct:Math.max(h/b*100,.5),duration:e.duration,label:`${e.name} — ${e.duration!==null?I(e.duration):"pending"} — ${new Date(e.startTime).toLocaleTimeString()}`,eventTime:new Date(e.startTime).toISOString(),pending:e.pending};u.has(i)||u.set(i,{name:e.name,category:e.category,segments:[]}),u.get(i).segments.push(S)}const y=Array.from(u.values()),v=5,E=Array.from({length:v+1},(e,i)=>({pct:i/v*100,label:I(Math.round(i/v*b))})),M=[...new Set(l.map(e=>e.category))],R=e=>{if(!(n!=null&&n.length))return;const i=e.attributes.activity_type;if(i)return n.find(a=>a.workflow_type===i)},$=e=>{d(i=>{const a=new Set(i);return a.has(e)?a.delete(e):a.add(e),a})},C=l.map(e=>e.eventId),P=C.length>0&&C.every(e=>c.has(e)),V=()=>{d(P?new Set:new Set(C))},T=(e,i)=>{var a,f;return i?F:r?((a=w[e])==null?void 0:a.outline)??"border-text-tertiary bg-transparent":((f=w[e])==null?void 0:f.bar)??"bg-text-tertiary"},W=e=>{var i;return r?((i=w[e])==null?void 0:i.text)??"text-text-tertiary":"text-white"};return t.jsxs("div",{className:"px-6 py-6 mb-6",children:[t.jsxs("div",{className:"flex items-center gap-4 mb-4 flex-wrap",children:[t.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Execution Timeline"}),t.jsx("button",{onClick:V,className:"text-[10px] text-accent hover:underline",children:P?"Collapse all":"Expand all"}),t.jsxs("div",{className:"flex items-center gap-3 ml-auto",children:[M.map(e=>{var i,a,f;return t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:`w-2 h-2 rounded-full ${r?`border ${((i=w[e])==null?void 0:i.outline)??"border-text-tertiary"}`:((a=w[e])==null?void 0:a.bar)??"bg-text-tertiary"}`}),t.jsx("span",{className:"text-[9px] text-text-tertiary",children:((f=w[e])==null?void 0:f.label)??e})]},e)}),l.some(e=>e.pending)&&t.jsxs("div",{className:"flex items-center gap-1",children:[t.jsx("span",{className:"w-2 h-2 rounded-full bg-status-warning animate-pulse"}),t.jsx("span",{className:"text-[9px] text-text-tertiary",children:"Pending"})]})]})]}),t.jsxs("div",{className:"flex",children:[t.jsx("div",{className:"w-56 shrink-0"}),t.jsx("div",{className:"flex-1 relative h-6 border-b border-surface-border",children:E.map(e=>t.jsx("span",{className:"absolute text-[9px] font-mono text-text-tertiary -translate-x-1/2 bottom-1",style:{left:`${e.pct}%`},children:e.label},e.pct))})]}),y.map(e=>{const i=w[e.category];return t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center border-b border-surface-border",children:[t.jsxs("div",{className:"w-56 shrink-0 py-3 pr-4 flex items-center gap-2",children:[t.jsx("span",{className:`w-1.5 h-1.5 rounded-full shrink-0 ${(i==null?void 0:i.bar)??"bg-text-tertiary"}`}),t.jsx("p",{className:"text-xs font-mono text-text-secondary whitespace-nowrap overflow-hidden",title:e.name,children:q(e.name,28)}),X.has(e.name)&&t.jsx("span",{className:"shrink-0 text-accent/60",title:"MCP tool interaction",children:t.jsx("svg",{className:"w-3 h-3",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",strokeWidth:2,children:t.jsx("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.663 17h4.674M12 3v1m6.364 1.636l-.707.707M21 12h-1M4 12H3m3.343-5.657l-.707-.707m2.828 9.9a5 5 0 117.072 0l-.548.547A3.374 3.374 0 0014 18.469V19a2 2 0 11-4 0v-.531c0-.895-.356-1.754-.988-2.386l-.548-.547z"})})})]}),t.jsxs("div",{className:"flex-1 relative h-10",children:[E.map(a=>t.jsx("div",{className:"absolute top-0 bottom-0 w-px bg-surface-border opacity-30",style:{left:`${a.pct}%`}},a.pct)),e.segments.map(a=>{const f=x===a.eventId,h=c.has(a.eventId),S=a.widthPct<3;return t.jsx("div",{className:`absolute top-2 h-6 rounded-sm cursor-pointer transition-all duration-200 origin-center ${r?"border-2":""} ${h?`${T(e.category,a.pending)} ring-2 ring-accent ring-offset-1`:`${T(e.category,a.pending)} hover:opacity-80`}`,style:{left:`${a.startPct}%`,width:`${a.widthPct}%`,minWidth:"4px",...f&&S?{transform:"scaleX(4) scaleY(1.3) translateY(-2px)",zIndex:20,borderRadius:"4px"}:{zIndex:h?10:1}},title:a.label,onClick:()=>$(a.eventId),onMouseEnter:()=>o(a.eventId),onMouseLeave:()=>o(null),children:a.widthPct>8&&t.jsx("span",{className:`absolute inset-0 flex items-center px-1.5 text-[9px] font-mono ${W(e.category)} truncate`,children:a.duration!==null?I(a.duration):"pending"})},a.eventId)})]})]}),e.segments.map(a=>{const f=c.has(a.eventId),h=m.find(S=>S.event_id===a.eventId);return t.jsx(Y,{open:f,children:h&&t.jsx("div",{className:"py-3",children:t.jsx(H,{event:h,childTask:R(h),pending:a.pending,onClose:()=>$(h.event_id)})})},a.eventId)})]},`${e.category}:${e.name}`)})]})}export{H as E,st as S};
2
- //# sourceMappingURL=SwimlaneTimeline-2JHwAM2f.js.map
@@ -1,2 +0,0 @@
1
- import{a as p,j as a}from"./vendor-query-B2UbickB.js";import{X as m}from"./vendor-icons-E6836lXZ.js";function d(t){return t.toLowerCase().replace(/[^a-z0-9-]/g,"").replace(/^-|-$/g,"")}function y({tags:t,onChange:o,placeholder:u="Add tag...",compact:x}){const[r,s]=p.useState(""),c=p.useRef(null),i=e=>{const n=d(e);n&&!t.includes(n)&&o([...t,n]),s("")},l=e=>{o(t.filter(n=>n!==e))},f=e=>{e.key==="Enter"||e.key===","?(e.preventDefault(),i(r)):e.key==="Backspace"&&!r&&t.length>0&&l(t[t.length-1])};return a.jsxs("div",{className:x?"flex flex-wrap items-center gap-1.5":"flex flex-wrap items-center gap-1.5 bg-surface-sunken border border-surface-border rounded-md px-2 py-1.5 focus-within:ring-1 focus-within:ring-accent-primary cursor-text",onClick:()=>{var e;return(e=c.current)==null?void 0:e.focus()},children:[t.map(e=>a.jsxs("span",{className:"inline-flex items-center gap-1 px-2 py-0.5 rounded-full bg-accent/10 text-accent text-[11px] font-medium",children:[e,a.jsx("button",{type:"button",onClick:n=>{n.stopPropagation(),l(e)},className:"hover:text-status-error transition-colors",children:a.jsx(m,{className:"w-2.5 h-2.5"})})]},e)),a.jsx("input",{ref:c,type:"text",value:r,onChange:e=>s(e.target.value),onKeyDown:f,onBlur:()=>{r.trim()&&i(r)},placeholder:t.length===0?u:"",className:"flex-1 min-w-[80px] bg-transparent text-xs text-text-primary outline-none placeholder:text-text-tertiary"})]})}export{y as T};
2
- //# sourceMappingURL=TagInput-Dkljw_WI.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{d as c}from"./tasks-DwEUQ6my.js";import{S as x}from"./StatusBadge-XQlNFwmH.js";import{P as m}from"./PriorityBadge-DfQY9St9.js";import{S as i,J as r}from"./index-BMIU7Im5.js";import{P as p}from"./PageHeader-DLjHNYHX.js";import{e as j,L as u}from"./vendor-react-CX88sFS5.js";import"./vendor-icons-E6836lXZ.js";function a({label:t,value:s}){return e.jsxs("div",{children:[e.jsx(i,{className:"mb-1",children:t}),e.jsx("div",{className:"text-sm text-text-primary",children:s??"—"})]})}function f({items:t}){return t.length===0?null:e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-[7px] top-3 bottom-3 w-px bg-surface-border"}),e.jsx("div",{className:"space-y-0",children:t.map(s=>e.jsxs("div",{className:"relative flex gap-4 py-3",children:[e.jsx("div",{className:"relative z-10 mt-1",children:e.jsx("div",{className:`w-[15px] h-[15px] rounded-full border-2 ${s.category==="system"?"border-accent-muted bg-surface-raised":"border-accent bg-accent"}`})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-baseline gap-3",children:[e.jsx("p",{className:"text-sm text-text-primary",children:s.label}),s.timestamp&&e.jsx("time",{className:"text-[10px] text-text-tertiary font-mono shrink-0",children:new Date(s.timestamp).toLocaleTimeString()})]}),s.detail&&e.jsx("div",{className:"mt-1",children:s.detail})]})]},s.id))})]})}function S(){const{id:t}=j(),{data:s,isLoading:o}=c(t);if(o)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-48"}),e.jsx("div",{className:"h-40 bg-surface-sunken rounded"})]});if(!s)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Task not found."});const n=(s.milestones??[]).map((l,d)=>({id:d,label:l.name,timestamp:l.created_at,detail:e.jsx("span",{className:"text-xs text-text-secondary font-mono",children:typeof l.value=="object"?JSON.stringify(l.value):String(l.value)}),category:"user"}));return e.jsxs("div",{children:[e.jsx(p,{title:"Task Detail"}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-12",children:[e.jsxs("div",{className:"lg:col-span-2 space-y-10",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-6",children:[e.jsx(a,{label:"Status",value:e.jsx(x,{status:s.status})}),e.jsx(a,{label:"Priority",value:e.jsx(m,{priority:s.priority})}),e.jsx(a,{label:"Workflow Type",value:e.jsx("span",{className:"font-mono text-xs",children:s.workflow_type})}),e.jsx(a,{label:"LT Type",value:e.jsx("span",{className:"font-mono text-xs",children:s.lt_type})}),e.jsx(a,{label:"Task Queue",value:e.jsx("span",{className:"font-mono text-xs",children:s.task_queue})}),e.jsx(a,{label:"Workflow ID",value:e.jsx("span",{className:"font-mono text-xs break-all",children:s.workflow_id})}),e.jsx(a,{label:"Started",value:s.started_at?new Date(s.started_at).toLocaleString():"—"}),e.jsx(a,{label:"Completed",value:s.completed_at?new Date(s.completed_at).toLocaleString():"—"}),e.jsx(a,{label:"Signal ID",value:e.jsx("span",{className:"font-mono text-xs break-all",children:s.signal_id})})]}),s.error&&e.jsxs("div",{children:[e.jsx(i,{className:"mb-2 text-status-error",children:"Error"}),e.jsx("p",{className:"text-sm text-text-primary font-mono",children:s.error})]}),n.length>0&&e.jsxs("div",{children:[e.jsx(i,{className:"mb-4",children:"Milestones"}),e.jsx(f,{items:n})]}),e.jsx(u,{to:`/workflows/executions/${s.workflow_id}`,className:"btn-secondary inline-block text-xs",children:"View Workflow Execution"})]}),e.jsxs("div",{className:"space-y-8",children:[e.jsx(r,{data:s.envelope,label:"Envelope"}),s.metadata&&e.jsx(r,{data:s.metadata,label:"Metadata"}),s.data&&e.jsx(r,{data:s.data,label:"Result Data"})]})]})]})}export{S as TaskDetailPage};
2
- //# sourceMappingURL=TaskDetailPage--9FEVeTB.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TaskDetailPage--9FEVeTB.js","sources":["../../src/components/common/data/Field.tsx","../../src/components/common/display/Timeline.tsx","../../src/pages/workflows/TaskDetailPage.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\nimport { SectionLabel } from '../layout/SectionLabel';\n\ninterface FieldProps {\n label: string;\n value: ReactNode;\n}\n\nexport function Field({ label, value }: FieldProps) {\n return (\n <div>\n <SectionLabel className=\"mb-1\">{label}</SectionLabel>\n <div className=\"text-sm text-text-primary\">{value ?? '—'}</div>\n </div>\n );\n}\n","import type { ReactNode } from 'react';\n\nexport interface TimelineItem {\n id: string | number;\n label: string;\n timestamp?: string;\n detail?: ReactNode;\n category?: 'system' | 'user';\n}\n\nexport function Timeline({ items }: { items: TimelineItem[] }) {\n if (items.length === 0) return null;\n\n return (\n <div className=\"relative\">\n {/* Vertical line */}\n <div className=\"absolute left-[7px] top-3 bottom-3 w-px bg-surface-border\" />\n\n <div className=\"space-y-0\">\n {items.map((item) => (\n <div key={item.id} className=\"relative flex gap-4 py-3\">\n {/* Dot */}\n <div className=\"relative z-10 mt-1\">\n <div\n className={`w-[15px] h-[15px] rounded-full border-2 ${\n item.category === 'system'\n ? 'border-accent-muted bg-surface-raised'\n : 'border-accent bg-accent'\n }`}\n />\n </div>\n\n {/* Content */}\n <div className=\"flex-1 min-w-0\">\n <div className=\"flex items-baseline gap-3\">\n <p className=\"text-sm text-text-primary\">{item.label}</p>\n {item.timestamp && (\n <time className=\"text-[10px] text-text-tertiary font-mono shrink-0\">\n {new Date(item.timestamp).toLocaleTimeString()}\n </time>\n )}\n </div>\n {item.detail && <div className=\"mt-1\">{item.detail}</div>}\n </div>\n </div>\n ))}\n </div>\n </div>\n );\n}\n","import { useParams, Link } from 'react-router-dom';\nimport { useTask } from '../../api/tasks';\nimport { StatusBadge } from '../../components/common/display/StatusBadge';\nimport { PriorityBadge } from '../../components/common/display/PriorityBadge';\nimport { Field } from '../../components/common/data/Field';\nimport { JsonViewer } from '../../components/common/data/JsonViewer';\nimport { PageHeader } from '../../components/common/layout/PageHeader';\nimport { SectionLabel } from '../../components/common/layout/SectionLabel';\nimport { Timeline, type TimelineItem } from '../../components/common/display/Timeline';\n\nexport function TaskDetailPage() {\n const { id } = useParams<{ id: string }>();\n const { data: task, isLoading } = useTask(id!);\n\n if (isLoading) {\n return (\n <div className=\"animate-pulse space-y-4\">\n <div className=\"h-8 bg-surface-sunken rounded w-48\" />\n <div className=\"h-40 bg-surface-sunken rounded\" />\n </div>\n );\n }\n\n if (!task) {\n return <p className=\"text-sm text-text-secondary\">Task not found.</p>;\n }\n\n const milestoneItems: TimelineItem[] = (task.milestones ?? []).map((m, i) => ({\n id: i,\n label: m.name,\n timestamp: m.created_at,\n detail: (\n <span className=\"text-xs text-text-secondary font-mono\">\n {typeof m.value === 'object' ? JSON.stringify(m.value) : String(m.value)}\n </span>\n ),\n category: 'user' as const,\n }));\n\n return (\n <div>\n <PageHeader title=\"Task Detail\" />\n\n <div className=\"grid grid-cols-1 lg:grid-cols-3 gap-12\">\n {/* Left column — metadata */}\n <div className=\"lg:col-span-2 space-y-10\">\n <div className=\"grid grid-cols-2 sm:grid-cols-3 gap-6\">\n <Field label=\"Status\" value={<StatusBadge status={task.status} />} />\n <Field label=\"Priority\" value={<PriorityBadge priority={task.priority} />} />\n <Field label=\"Workflow Type\" value={<span className=\"font-mono text-xs\">{task.workflow_type}</span>} />\n <Field label=\"LT Type\" value={<span className=\"font-mono text-xs\">{task.lt_type}</span>} />\n <Field label=\"Task Queue\" value={<span className=\"font-mono text-xs\">{task.task_queue}</span>} />\n <Field label=\"Workflow ID\" value={<span className=\"font-mono text-xs break-all\">{task.workflow_id}</span>} />\n <Field label=\"Started\" value={task.started_at ? new Date(task.started_at).toLocaleString() : '—'} />\n <Field label=\"Completed\" value={task.completed_at ? new Date(task.completed_at).toLocaleString() : '—'} />\n <Field label=\"Signal ID\" value={<span className=\"font-mono text-xs break-all\">{task.signal_id}</span>} />\n </div>\n\n {task.error && (\n <div>\n <SectionLabel className=\"mb-2 text-status-error\">Error</SectionLabel>\n <p className=\"text-sm text-text-primary font-mono\">{task.error}</p>\n </div>\n )}\n\n {milestoneItems.length > 0 && (\n <div>\n <SectionLabel className=\"mb-4\">Milestones</SectionLabel>\n <Timeline items={milestoneItems} />\n </div>\n )}\n\n <Link\n to={`/workflows/executions/${task.workflow_id}`}\n className=\"btn-secondary inline-block text-xs\"\n >\n View Workflow Execution\n </Link>\n </div>\n\n {/* Right column — payloads */}\n <div className=\"space-y-8\">\n <JsonViewer data={task.envelope} label=\"Envelope\" />\n {task.metadata && <JsonViewer data={task.metadata} label=\"Metadata\" />}\n {task.data && <JsonViewer data={task.data} label=\"Result Data\" />}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["Field","label","value","jsx","SectionLabel","Timeline","items","jsxs","item","TaskDetailPage","id","useParams","task","isLoading","useTask","milestoneItems","m","i","PageHeader","StatusBadge","PriorityBadge","Link","JsonViewer"],"mappings":"0WAQO,SAASA,EAAM,CAAE,MAAAC,EAAO,MAAAC,GAAqB,CAClD,cACG,MAAA,CACC,SAAA,CAAAC,EAAAA,IAACC,EAAA,CAAa,UAAU,OAAQ,SAAAH,EAAM,EACtCE,EAAAA,IAAC,MAAA,CAAI,UAAU,4BAA6B,YAAS,GAAA,CAAI,CAAA,EAC3D,CAEJ,CCLO,SAASE,EAAS,CAAE,MAAAC,GAAoC,CAC7D,OAAIA,EAAM,SAAW,EAAU,KAG7BC,EAAAA,KAAC,MAAA,CAAI,UAAU,WAEb,SAAA,CAAAJ,EAAAA,IAAC,MAAA,CAAI,UAAU,2DAAA,CAA4D,EAE3EA,EAAAA,IAAC,MAAA,CAAI,UAAU,YACZ,SAAAG,EAAM,IAAKE,GACVD,EAAAA,KAAC,MAAA,CAAkB,UAAU,2BAE3B,SAAA,CAAAJ,EAAAA,IAAC,MAAA,CAAI,UAAU,qBACb,SAAAA,EAAAA,IAAC,MAAA,CACC,UAAW,2CACTK,EAAK,WAAa,SACd,wCACA,yBACN,EAAA,CAAA,EAEJ,EAGAD,EAAAA,KAAC,MAAA,CAAI,UAAU,iBACb,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,4BACb,SAAA,CAAAJ,EAAAA,IAAC,IAAA,CAAE,UAAU,4BAA6B,SAAAK,EAAK,MAAM,EACpDA,EAAK,WACJL,EAAAA,IAAC,OAAA,CAAK,UAAU,oDACb,SAAA,IAAI,KAAKK,EAAK,SAAS,EAAE,mBAAA,CAAmB,CAC/C,CAAA,EAEJ,EACCA,EAAK,QAAUL,EAAAA,IAAC,OAAI,UAAU,OAAQ,WAAK,MAAA,CAAO,CAAA,CAAA,CACrD,CAAA,GAvBQK,EAAK,EAwBf,CACD,CAAA,CACH,CAAA,EACF,CAEJ,CCvCO,SAASC,GAAiB,CAC/B,KAAM,CAAE,GAAAC,CAAA,EAAOC,EAAA,EACT,CAAE,KAAMC,EAAM,UAAAC,CAAA,EAAcC,EAAQJ,CAAG,EAE7C,GAAIG,EACF,OACEN,EAAAA,KAAC,MAAA,CAAI,UAAU,0BACb,SAAA,CAAAJ,EAAAA,IAAC,MAAA,CAAI,UAAU,oCAAA,CAAqC,EACpDA,EAAAA,IAAC,MAAA,CAAI,UAAU,gCAAA,CAAiC,CAAA,EAClD,EAIJ,GAAI,CAACS,EACH,OAAOT,EAAAA,IAAC,IAAA,CAAE,UAAU,8BAA8B,SAAA,kBAAe,EAGnE,MAAMY,GAAkCH,EAAK,YAAc,CAAA,GAAI,IAAI,CAACI,EAAGC,KAAO,CAC5E,GAAIA,EACJ,MAAOD,EAAE,KACT,UAAWA,EAAE,WACb,OACEb,EAAAA,IAAC,OAAA,CAAK,UAAU,wCACb,gBAAOa,EAAE,OAAU,SAAW,KAAK,UAAUA,EAAE,KAAK,EAAI,OAAOA,EAAE,KAAK,EACzE,EAEF,SAAU,MAAA,EACV,EAEF,cACG,MAAA,CACC,SAAA,CAAAb,EAAAA,IAACe,EAAA,CAAW,MAAM,aAAA,CAAc,EAEhCX,EAAAA,KAAC,MAAA,CAAI,UAAU,yCAEb,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,2BACb,SAAA,CAAAA,EAAAA,KAAC,MAAA,CAAI,UAAU,wCACb,SAAA,CAAAJ,EAAAA,IAACH,EAAA,CAAM,MAAM,SAAS,YAAQmB,EAAA,CAAY,OAAQP,EAAK,MAAA,CAAQ,CAAA,CAAI,EACnET,EAAAA,IAACH,EAAA,CAAM,MAAM,WAAW,YAAQoB,EAAA,CAAc,SAAUR,EAAK,QAAA,CAAU,CAAA,CAAI,EAC3ET,EAAAA,IAACH,EAAA,CAAM,MAAM,gBAAgB,MAAOG,EAAAA,IAAC,OAAA,CAAK,UAAU,oBAAqB,SAAAS,EAAK,aAAA,CAAc,CAAA,CAAS,EACrGT,EAAAA,IAACH,EAAA,CAAM,MAAM,UAAU,MAAOG,EAAAA,IAAC,OAAA,CAAK,UAAU,oBAAqB,SAAAS,EAAK,OAAA,CAAQ,CAAA,CAAS,EACzFT,EAAAA,IAACH,EAAA,CAAM,MAAM,aAAa,MAAOG,EAAAA,IAAC,OAAA,CAAK,UAAU,oBAAqB,SAAAS,EAAK,UAAA,CAAW,CAAA,CAAS,EAC/FT,EAAAA,IAACH,EAAA,CAAM,MAAM,cAAc,MAAOG,EAAAA,IAAC,OAAA,CAAK,UAAU,8BAA+B,SAAAS,EAAK,WAAA,CAAY,CAAA,CAAS,EAC3GT,EAAAA,IAACH,EAAA,CAAM,MAAM,UAAU,MAAOY,EAAK,WAAa,IAAI,KAAKA,EAAK,UAAU,EAAE,eAAA,EAAmB,GAAA,CAAK,EAClGT,EAAAA,IAACH,EAAA,CAAM,MAAM,YAAY,MAAOY,EAAK,aAAe,IAAI,KAAKA,EAAK,YAAY,EAAE,eAAA,EAAmB,GAAA,CAAK,EACxGT,EAAAA,IAACH,EAAA,CAAM,MAAM,YAAY,MAAOG,EAAAA,IAAC,OAAA,CAAK,UAAU,8BAA+B,SAAAS,EAAK,SAAA,CAAU,CAAA,CAAS,CAAA,EACzG,EAECA,EAAK,OACJL,EAAAA,KAAC,MAAA,CACC,SAAA,CAAAJ,EAAAA,IAACC,EAAA,CAAa,UAAU,yBAAyB,SAAA,QAAK,EACtDD,EAAAA,IAAC,IAAA,CAAE,UAAU,sCAAuC,WAAK,KAAA,CAAM,CAAA,EACjE,EAGDY,EAAe,OAAS,GACvBR,EAAAA,KAAC,MAAA,CACC,SAAA,CAAAJ,EAAAA,IAACC,EAAA,CAAa,UAAU,OAAO,SAAA,aAAU,EACzCD,EAAAA,IAACE,EAAA,CAAS,MAAOU,CAAA,CAAgB,CAAA,EACnC,EAGFZ,EAAAA,IAACkB,EAAA,CACC,GAAI,yBAAyBT,EAAK,WAAW,GAC7C,UAAU,qCACX,SAAA,yBAAA,CAAA,CAED,EACF,EAGAL,EAAAA,KAAC,MAAA,CAAI,UAAU,YACb,SAAA,CAAAJ,EAAAA,IAACmB,EAAA,CAAW,KAAMV,EAAK,SAAU,MAAM,WAAW,EACjDA,EAAK,UAAYT,EAAAA,IAACmB,EAAA,CAAW,KAAMV,EAAK,SAAU,MAAM,WAAW,EACnEA,EAAK,MAAQT,EAAAA,IAACmB,EAAA,CAAW,KAAMV,EAAK,KAAM,MAAM,aAAA,CAAc,CAAA,CAAA,CACjE,CAAA,CAAA,CACF,CAAA,EACF,CAEJ"}
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{R as a}from"./vendor-icons-E6836lXZ.js";function p({queue:t,size:s="sm"}){const r=s==="md"?"px-2.5 py-0.5 text-[11px] gap-1.5":"px-2 py-0.5 text-[10px] gap-1",o=s==="md"?"w-3 h-3":"w-2.5 h-2.5";return e.jsxs("span",{className:`inline-flex items-center ${r} font-mono border-y border-surface-border/50 text-text-secondary`,children:[e.jsx(a,{className:`${o} shrink-0 text-accent/75`}),t]})}export{p as T};
2
- //# sourceMappingURL=TaskQueuePill-DPwm25Cc.js.map
@@ -1,2 +0,0 @@
1
- import{j as t}from"./vendor-query-B2UbickB.js";import{c as u}from"./tasks-DwEUQ6my.js";import{u as g}from"./workflows-DNZf6Pmq.js";import{u as w}from"./useFilterParams-DZCAaBC7.js";import{D as y}from"./DataTable-D9yuBv0w.js";import{S as c}from"./StatusBadge-XQlNFwmH.js";import{P as k}from"./PriorityBadge-DfQY9St9.js";import{T as n}from"./TimeAgo-RPbch7Te.js";import{S as x}from"./StickyPagination-F9FZsRy9.js";import{F as P,b as p}from"./FilterBar-Ck4K4rzu.js";import{P as b}from"./PageHeader-DLjHNYHX.js";import{W as _}from"./WorkflowPill-BbgVTGgI.js";import{c as j}from"./vendor-react-CX88sFS5.js";import"./index-BMIU7Im5.js";import"./vendor-icons-E6836lXZ.js";import"./EmptyState-BcsfPq9T.js";const v=[{value:"pending",label:"Pending"},{value:"in_progress",label:"In Progress"},{value:"completed",label:"Completed"},{value:"needs_intervention",label:"Needs Intervention"},{value:"cancelled",label:"Cancelled"}],S=[{key:"status",label:"Status",render:e=>t.jsx(c,{status:e.status}),className:"w-40"},{key:"workflow_type",label:"Workflow Type",render:e=>t.jsx(_,{type:e.workflow_type})},{key:"lt_type",label:"LT Type",render:e=>t.jsx("span",{className:"text-text-secondary text-xs",children:e.lt_type})},{key:"priority",label:"Priority",render:e=>t.jsx(k,{priority:e.priority}),className:"w-20"},{key:"started_at",label:"Started",render:e=>t.jsx(n,{date:e.started_at}),className:"w-28"},{key:"updated_at",label:"Updated",render:e=>t.jsx(n,{date:e.updated_at}),className:"w-28"}];function O(){const e=j(),{filters:r,setFilter:l,pagination:s}=w({filters:{status:"",workflow_type:""}}),{data:m}=g(),d=[...new Set((m??[]).map(a=>a.workflow_type))].sort(),{data:o,isLoading:f}=u({status:r.status||void 0,workflow_type:r.workflow_type||void 0,limit:s.pageSize,offset:s.offset}),i=(o==null?void 0:o.total)??0;return t.jsxs("div",{children:[t.jsx(b,{title:"Tasks"}),t.jsxs(P,{children:[t.jsx(p,{label:"Status",value:r.status,onChange:a=>l("status",a),options:v}),t.jsx(p,{label:"Workflow Type",value:r.workflow_type,onChange:a=>l("workflow_type",a),options:d.map(a=>({value:a,label:a}))})]}),t.jsx(y,{columns:S,data:(o==null?void 0:o.tasks)??[],keyFn:a=>a.id,onRowClick:a=>e(`/workflows/tasks/detail/${a.id}`),isLoading:f,emptyMessage:"No tasks found"}),t.jsx(x,{page:s.page,totalPages:s.totalPages(i),onPageChange:s.setPage,total:i,pageSize:s.pageSize,onPageSizeChange:s.setPageSize})]})}export{O as TasksListPage};
2
- //# sourceMappingURL=TasksListPage-kCH4r-70.js.map
@@ -1,2 +0,0 @@
1
- import{j as o}from"./vendor-query-B2UbickB.js";import{c as e}from"./index-BMIU7Im5.js";function i({date:r,className:t=""}){return o.jsx(e,{date:r,format:"relative",className:t})}export{i as T};
2
- //# sourceMappingURL=TimeAgo-RPbch7Te.js.map
@@ -1,2 +0,0 @@
1
- import{j as e}from"./vendor-query-B2UbickB.js";import{c as r}from"./index-BMIU7Im5.js";function o({date:t}){return e.jsxs("div",{children:[e.jsx(r,{date:t,format:"relative"}),e.jsxs("p",{className:"text-[9px] font-mono text-text-secondary mt-0.5 whitespace-nowrap",children:[new Date(t).toISOString().replace("T"," ").slice(0,19)," UTC"]})]})}export{o as T};
2
- //# sourceMappingURL=TimestampCell-Dgpl-lKv.js.map
@@ -1,2 +0,0 @@
1
- import{j as o}from"./vendor-query-B2UbickB.js";import{f as a}from"./vendor-icons-E6836lXZ.js";const f=["Describe","Discover","Compile","Deploy","Test","Verify"];function c(t){return t?t.status==="completed"?"completed":t.status==="failed"?"failed":"in_progress":"pending"}function m(t){const e=t.match(/```json\s*([\s\S]*?)```/)||t.match(/\{[\s\S]*?\n\}/);if(!e)return null;try{return JSON.parse((e[1]??e[0]).trim())}catch{return null}}const l=new Set(["token","authorization","bearer_token","access_token","api_token"]);function d(t){if(!(t!=null&&t.properties))return{};const e={},r=sessionStorage.getItem("lt_token")||"";for(const[s,i]of Object.entries(t.properties)){const n=i;n.default!==void 0?e[s]=n.default:l.has(s.toLowerCase())&&n.type==="string"?e[s]=r:n.type==="string"?e[s]="":n.type==="number"||n.type==="integer"?e[s]=n.minimum??0:n.type==="boolean"?e[s]=!1:n.type==="object"?e[s]={}:n.type==="array"?e[s]=[]:e[s]=null}return e}function x({name:t,size:e="sm"}){const r=e==="md"?"px-2 py-0.5 text-[12px] gap-1.5":"px-1.5 py-px text-[11px] gap-1",s=e==="md"?"w-2.5 h-2.5":"w-2 h-2";return o.jsxs("span",{className:`inline-flex items-center ${r} font-mono text-text-secondary bg-surface-sunken/50 rounded-md`,children:[o.jsx(a,{className:`${s} shrink-0 text-text-quaternary`,strokeWidth:1.5}),t]})}export{f as S,x as T,d as b,m as e,c as m};
2
- //# sourceMappingURL=ToolPill-D_DIWFJ5.js.map
@@ -1,2 +0,0 @@
1
- import{a as m,j as e}from"./vendor-query-B2UbickB.js";import{h as k}from"./mcp-CWFliwjc.js";import{J as A}from"./index-BMIU7Im5.js";import{R as L}from"./RunAsSelector-hYP59xHH.js";import{b as z,T as F}from"./ToolPill-D_DIWFJ5.js";import{S as I}from"./ServerName-C9lUCFYb.js";import{X as M,a7 as _,P as B,a0 as R,a4 as D}from"./vendor-icons-E6836lXZ.js";import{L as J}from"./vendor-react-CX88sFS5.js";function U({error:n}){const a=n instanceof Error?n.message:"";return a.startsWith("No credential found for provider")?e.jsxs("div",{className:"bg-status-warning/10 border border-status-warning/30 rounded-md px-3 py-2 flex items-start gap-2",children:[e.jsx(D,{size:14,className:"text-status-warning mt-0.5 shrink-0"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] font-medium text-text-primary mb-0.5",children:"Credential required"}),e.jsx("p",{className:"text-[11px] text-text-secondary mb-1",children:a}),e.jsxs(J,{to:"/credentials",className:"text-[11px] text-accent hover:underline inline-flex items-center gap-1",children:["Go to Credentials ",e.jsx(R,{size:10})]})]})]}):e.jsx("div",{className:"bg-status-error/10 border border-status-error/20 rounded-md px-3 py-2",children:e.jsx("p",{className:"text-[11px] text-status-error",children:a||"Tool call failed"})})}function $({data:n}){const a=n==null?void 0:n.result,r=a==null?void 0:a.job_id,u=(a==null?void 0:a.namespace)||"longtail";return r?e.jsxs(J,{to:`/mcp/executions/${encodeURIComponent(r)}?namespace=${encodeURIComponent(u)}`,className:"inline-flex items-center gap-1.5 text-xs text-accent hover:underline",children:[e.jsx(R,{size:12}),"View Execution"]}):null}const j="input text-xs",w="label";function K({value:n,onChange:a,className:r}){const[u,t]=m.useState(n.join(", ")),o=()=>a(u.split(",").map(l=>l.trim()).filter(Boolean));return m.useEffect(()=>{t(n.join(", "))},[JSON.stringify(n)]),e.jsx("input",{type:"text",value:u,onChange:l=>t(l.target.value),onBlur:o,onKeyDown:l=>{l.key==="Enter"&&(l.preventDefault(),o())},placeholder:"comma-separated values",className:r})}function ee({serverId:n,serverName:a,tool:r,onClose:u}){const t=k(),[o,l]=m.useState(!1),[x,p]=m.useState({}),[h,f]=m.useState(""),[b,N]=m.useState(""),[g,E]=m.useState("");m.useEffect(()=>{const s=z(r.inputSchema);p(s),f(JSON.stringify(s,null,2)),l(!1),N(""),t.reset()},[r.name,n]);const O=!!t.data||!!t.error,T=()=>{if(!o)f(JSON.stringify(x,null,2));else try{p(JSON.parse(h))}catch{}l(!o)},q=()=>{N(""),t.reset();let s;if(o)try{s=JSON.parse(h)}catch{N("Invalid JSON");return}else s={...x};t.mutate({serverId:n,toolName:r.name,arguments:s,...g?{execute_as:g}:{}})};return e.jsxs("div",{className:"border-l border-surface-border bg-surface-raised",children:[e.jsxs("div",{className:"flex items-start justify-between px-4 py-3 border-b border-surface-border/50 shrink-0",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx(I,{name:a,serverId:n,short:!1}),e.jsx("div",{children:e.jsx(F,{name:r.name,size:"md"})})]}),e.jsx("button",{onClick:u,className:"p-1 text-text-quaternary hover:text-text-primary shrink-0 ml-2",children:e.jsx(M,{className:"w-3.5 h-3.5"})})]}),e.jsxs("div",{className:"px-4 py-4 space-y-5",children:[r.description&&e.jsx("div",{className:"border-l-2 border-accent/30 pl-3 py-1",children:e.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed italic",children:r.description})}),e.jsxs("div",{children:[e.jsx("label",{className:w,children:"run as"}),e.jsx(L,{selected:g,onChange:E})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("span",{className:"text-[10px] text-text-quaternary",children:"Parameters"}),e.jsx("button",{onClick:T,className:"text-[10px] text-accent/70 hover:text-accent transition-colors",children:o?"Form view":"JSON view"})]}),o?e.jsx("textarea",{value:h,onChange:s=>f(s.target.value),className:"input-json w-full",rows:6,spellCheck:!1}):e.jsxs("div",{className:"space-y-3",children:[Object.entries(x).map(([s,i])=>{var v,S,C;const c=(S=(v=r.inputSchema)==null?void 0:v.properties)==null?void 0:S[s],y=c==null?void 0:c.description,P=(((C=r.inputSchema)==null?void 0:C.required)??[]).includes(s);return e.jsxs("div",{children:[e.jsxs("label",{className:w,children:[s,P&&e.jsx("span",{className:"text-accent/50 ml-0.5",children:"*"})]}),typeof i=="boolean"?e.jsxs("select",{value:String(i),onChange:d=>p({...x,[s]:d.target.value==="true"}),className:j,children:[e.jsx("option",{value:"true",children:"true"}),e.jsx("option",{value:"false",children:"false"})]}):Array.isArray(i)?e.jsx(K,{value:i,onChange:d=>p({...x,[s]:d}),className:j}):typeof i=="object"&&i!==null?e.jsx("textarea",{value:JSON.stringify(i,null,2),onChange:d=>{try{p({...x,[s]:JSON.parse(d.target.value)})}catch{}},className:`${j} min-h-[48px] font-mono resize-y`}):e.jsx("input",{type:typeof i=="number"?"number":"text",value:String(i??""),onChange:d=>p({...x,[s]:typeof i=="number"?Number(d.target.value):d.target.value}),className:j,placeholder:(c==null?void 0:c.type)==="string"&&(c==null?void 0:c.example)||""}),y&&e.jsx("p",{className:"text-[9px] text-text-quaternary/70 mt-0.5 leading-snug",children:y})]},s)}),Object.keys(x).length===0&&e.jsx("p",{className:"text-[11px] text-text-quaternary",children:"No parameters"})]}),b&&e.jsx("p",{className:"text-[11px] text-status-error mt-1",children:b})]}),e.jsx("button",{onClick:q,disabled:t.isPending,className:"btn-primary text-xs disabled:opacity-50 inline-flex items-center gap-1.5",children:t.isPending?"Running...":O?e.jsxs(e.Fragment,{children:[e.jsx(_,{size:12})," Re-run"]}):e.jsxs(e.Fragment,{children:[e.jsx(B,{size:12})," Run"]})}),t.isPending&&e.jsxs("div",{className:"animate-pulse",children:[e.jsx("p",{className:"text-[10px] text-text-quaternary mb-1",children:"Response"}),e.jsx("div",{className:"h-20 bg-surface-sunken/50 rounded-md"})]}),t.data?e.jsxs("div",{className:"space-y-2",children:[e.jsx(A,{data:t.data,label:"Response",defaultCollapsed:!0}),e.jsx($,{data:t.data})]}):null,t.error?e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] text-text-quaternary mb-1",children:"Response"}),e.jsx(U,{error:t.error})]}):null]})]})}export{ee as T};
2
- //# sourceMappingURL=ToolTestPanel-D1TWdZQi.js.map
@@ -1,2 +0,0 @@
1
- import{j as r}from"./vendor-query-B2UbickB.js";import{a as t}from"./users-CCHT00of.js";function m({userId:a,fallback:s}){const{data:e}=t(a);return e?r.jsx(r.Fragment,{children:e.display_name||e.email||e.external_id}):r.jsx(r.Fragment,{children:s??`${a.slice(0,8)}…`})}export{m as U};
2
- //# sourceMappingURL=UserName-BXZGXJsU.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,a as b}from"./vendor-query-B2UbickB.js";import{a as $,g as L}from"./workflows-DNZf6Pmq.js";import{h as R}from"./useEventHooks-BccPxFR6.js";import{u as P,E as A}from"./EventTable-DWxH0vMp.js";import{b as D,e as K}from"./tasks-DwEUQ6my.js";import{c as k,D as Q,J as N,d as V}from"./index-BMIU7Im5.js";import{P as z}from"./PageHeader-DLjHNYHX.js";import{C as g}from"./CollapsibleSection-DaFQGU6S.js";import{L as B}from"./ListToolbar-DuON-br0.js";import{S as _}from"./StatusBadge-XQlNFwmH.js";import{L as u,e as H,u as J,c as M}from"./vendor-react-CX88sFS5.js";import{S as O}from"./SwimlaneTimeline-2JHwAM2f.js";import"./FilterBar-Ck4K4rzu.js";import"./vendor-icons-E6836lXZ.js";function x({label:t,value:a,mono:r,truncate:s,children:n}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:t}),n||e.jsx("p",{className:`text-xs text-text-primary ${r?"font-mono":""} ${s?"truncate":""}`,title:s?a:void 0,children:a})]})}function F(t){const a=t.lastIndexOf("-");return a<=0?{taskQueue:t,workflowType:t}:{taskQueue:t.substring(0,a),workflowType:t.substring(a+1)}}function U({execution:t,task:a,escalations:r}){const n=a&&a.workflow_id===t.workflow_id?a.parent_workflow_id:null,{taskQueue:o,workflowType:m}=F(t.workflow_type);return e.jsxs("div",{className:"px-6 py-6 mb-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-y-4 gap-x-8",children:[e.jsx(x,{label:"Workflow Type",value:m,mono:!0}),e.jsx(x,{label:"Task Queue",value:o,mono:!0}),e.jsx(x,{label:"Start Time",children:t.start_time?e.jsx(k,{date:t.start_time,format:"datetime",className:"text-text-primary"}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"--"})}),e.jsx(x,{label:"End Time",children:t.close_time?e.jsx(k,{date:t.close_time,format:"datetime",className:"text-text-primary"}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"--"})}),e.jsx(x,{label:"Duration",children:e.jsx(Q,{ms:t.duration_ms,className:"font-mono text-text-primary"})}),e.jsx(x,{label:"History Size",value:`${t.summary.total_events} events`}),e.jsx(x,{label:"Activities",value:`${t.summary.activities.completed} / ${t.summary.activities.total}`}),e.jsx(x,{label:"Run ID",value:t.workflow_id,mono:!0,truncate:!0})]}),(n||a||r&&r.length>0)&&e.jsxs("div",{className:"mt-5 pt-4 border-t border-surface-border space-y-3",children:[n&&e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary shrink-0",children:"Parent"}),e.jsx(u,{to:`/workflows/executions/${n}`,className:"text-xs font-mono text-accent hover:underline truncate",title:n,children:n})]}),!1,r&&r.length>0&&e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx("span",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary shrink-0 mt-0.5",children:r.length===1?"Escalation":"Escalations"}),e.jsx("div",{className:"flex flex-wrap gap-x-4 gap-y-1",children:r.map(l=>e.jsxs(u,{to:`/escalations/detail/${l.id}`,className:"inline-flex items-center gap-1.5 text-xs font-mono text-accent hover:underline",children:[e.jsx("span",{children:l.type}),e.jsx(_,{status:l.status})]},l.id))})]})]})]})}function q(t){var s;const a=t.events.find(n=>n.event_type==="workflow_execution_started"),r=(s=a==null?void 0:a.attributes)==null?void 0:s.input;return r&&typeof r=="object"?r:null}function Z({execution:t}){const a=q(t),r=t.result,s=(r==null?void 0:r.data)??r??null;return!a&&!s?null:e.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4 mb-6",children:[a!==null&&e.jsx("div",{children:e.jsx(N,{data:a,label:"Input Envelope"})}),s!==null&&e.jsx("div",{children:e.jsx(N,{data:s,label:"Result"})})]})}function G({isRunning:t,hasToolCalls:a,workflowId:r,onAction:s}){const[n,o]=b.useState(!1),m=b.useRef(null);return b.useEffect(()=>{if(!n)return;const l=p=>{m.current&&!m.current.contains(p.target)&&o(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[n]),e.jsxs("div",{className:"relative",ref:m,children:[e.jsx("button",{onClick:()=>o(!n),className:"btn-primary text-xs",children:"Actions"}),n&&e.jsxs("div",{className:"absolute right-0 mt-1 w-44 bg-surface-raised border border-surface-border rounded-md shadow-lg z-10",children:[e.jsx("button",{onClick:()=>{s("restart"),o(!1)},className:"block w-full text-left px-4 py-2 text-xs text-text-secondary hover:bg-surface-hover",children:"Restart Workflow"}),t&&e.jsx("button",{onClick:()=>{s("terminate"),o(!1)},className:"block w-full text-left px-4 py-2 text-xs text-status-error hover:bg-surface-hover",children:"Terminate"}),a&&e.jsx(u,{to:`/mcp/queries/${r}?step=3`,className:"block w-full text-left px-4 py-2 text-xs text-accent hover:bg-surface-hover",onClick:()=>o(!1),children:"Compile into Pipeline"})]})]})}function me(){const{workflowId:t}=H(),{pathname:a}=J();R(t);const r=(a.startsWith("/workflows/durable/"),"Durable Execution"),{data:s,isLoading:n,error:o,refetch:m,isFetching:l}=$(t),{data:p}=D(t),{data:c}=K(t),{data:f}=V(t),T=M(),h=L(),{isCollapsed:w,toggle:j}=P("workflow-execution"),E=d=>{var i;if(d==="terminate")confirm("Are you sure you want to terminate this workflow?")&&h.mutate(t);else if(d==="restart"&&s){const I=s.workflow_id.replace(/-[A-Za-z0-9_-]{20,}$/,""),v=s.events.find(S=>S.event_type==="workflow_execution_started"),y=(i=v==null?void 0:v.attributes)==null?void 0:i.input;y&&sessionStorage.setItem("lt:invoke:prefill",JSON.stringify(y)),T(`/workflows/start?type=${encodeURIComponent(I)}&mode=now`)}};if(n)return e.jsxs("div",{className:"animate-pulse space-y-4",children:[e.jsx("div",{className:"h-8 bg-surface-sunken rounded w-64"}),e.jsx("div",{className:"h-60 bg-surface-sunken rounded"})]});if(o||!s){const d=(o==null?void 0:o.message)??"",i=d.includes("expired")||d.includes("no longer available");return e.jsxs("div",{children:[e.jsx(u,{to:"/workflows/executions",className:"text-xs text-text-tertiary hover:text-text-primary",children:"← Workflows"}),e.jsxs("div",{className:"mt-4 text-center py-8",children:[e.jsx("p",{className:"text-sm text-text-primary mb-1",children:i?"Execution data is no longer available":o?"Unable to load execution":"Execution not found"}),e.jsx("p",{className:"text-xs text-text-tertiary",children:i?"This workflow's underlying job has expired. The task record is preserved, but the execution timeline has been cleaned up.":d||"The workflow could not be resolved."})]})]})}const C=s.status!=="completed"&&s.status!=="failed",W=s.status==="completed"&&s.events.some(d=>{if(d.event_type!=="activity_task_completed")return!1;const i=d.attributes.activity_type;return i==="callDbTool"||i==="callVisionTool"||i==="callMcpTool"||(i==null?void 0:i.startsWith("mcp_"))});return e.jsxs("div",{children:[e.jsx(z,{title:r,actions:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(B,{onRefresh:()=>m(),isFetching:l,apiPath:`/workflow-states/${t}/execution`}),e.jsx(_,{status:s.status}),e.jsx(G,{isRunning:C,hasToolCalls:W,workflowId:t,onAction:E})]})}),e.jsx(U,{execution:s,task:p,childTasks:c==null?void 0:c.tasks,escalations:f==null?void 0:f.escalations}),h.error&&e.jsx("div",{className:"py-3 mb-6",children:e.jsxs("p",{className:"text-xs text-status-error",children:["Terminate failed: ",h.error.message]})}),e.jsxs("div",{className:"space-y-6",children:[e.jsx(g,{title:"Details",sectionKey:"details",isCollapsed:w("details"),onToggle:j,contentClassName:"mt-4 ml-9",children:e.jsx(Z,{execution:s})}),e.jsx(g,{title:"Execution Timeline",sectionKey:"timeline",isCollapsed:w("timeline"),onToggle:j,contentClassName:"mt-4 ml-9",children:e.jsx(O,{events:s.events,childTasks:c==null?void 0:c.tasks})}),e.jsx(g,{title:"Events",sectionKey:"events",isCollapsed:w("events"),onToggle:j,contentClassName:"mt-4 ml-9",children:e.jsx(A,{events:s.events,childTasks:c==null?void 0:c.tasks})})]})]})}export{me as WorkflowExecutionPage};
2
- //# sourceMappingURL=WorkflowExecutionPage-DWlNYb2M.js.map
@@ -1,2 +0,0 @@
1
- import{j as n}from"./vendor-query-B2UbickB.js";import{c as d,W as u,S as f,a6 as m}from"./vendor-icons-E6836lXZ.js";const s=[{text:"text-rose-400",bg:"bg-rose-400/[0.08]"},{text:"text-pink-400",bg:"bg-pink-400/[0.08]"},{text:"text-fuchsia-400",bg:"bg-fuchsia-400/[0.08]"},{text:"text-purple-400",bg:"bg-purple-400/[0.08]"},{text:"text-violet-400",bg:"bg-violet-400/[0.08]"},{text:"text-indigo-400",bg:"bg-indigo-400/[0.08]"},{text:"text-blue-400",bg:"bg-blue-400/[0.08]"},{text:"text-sky-400",bg:"bg-sky-400/[0.08]"},{text:"text-cyan-400",bg:"bg-cyan-400/[0.08]"},{text:"text-teal-400",bg:"bg-teal-400/[0.08]"},{text:"text-emerald-400",bg:"bg-emerald-400/[0.08]"},{text:"text-green-400",bg:"bg-green-400/[0.08]"},{text:"text-lime-400",bg:"bg-lime-400/[0.08]"},{text:"text-yellow-400",bg:"bg-yellow-400/[0.08]"},{text:"text-amber-400",bg:"bg-amber-400/[0.08]"},{text:"text-orange-400",bg:"bg-orange-400/[0.08]"},{text:"text-red-400",bg:"bg-red-400/[0.08]"},{text:"text-stone-400",bg:"bg-stone-400/[0.08]"},{text:"text-rose-300",bg:"bg-rose-300/[0.08]"},{text:"text-violet-300",bg:"bg-violet-300/[0.08]"},{text:"text-sky-300",bg:"bg-sky-300/[0.08]"},{text:"text-teal-300",bg:"bg-teal-300/[0.08]"},{text:"text-amber-300",bg:"bg-amber-300/[0.08]"},{text:"text-pink-300",bg:"bg-pink-300/[0.08]"}];function h(e){let t=0;for(let x=0;x<e.length;x++)t=(t<<5)-t+e.charCodeAt(x)|0;return Math.abs(t)}function k(e){return s[h(e)%s.length]}const y={certified:m,configured:f,pipeline:u,durable:d},C={certified:"text-status-success",configured:"text-status-info"};function I({type:e,size:t="sm",certified:x,variant:r}){const l=t==="md"?"px-2.5 py-0.5 gap-1.5":t==="xs"?"px-1 py-px gap-0.5":"px-1.5 py-px gap-1",a=t==="md"?"13px":t==="xs"?"9px":"11px",i=t==="md"?"w-3.5 h-3.5":t==="xs"?"w-2 h-2":"w-2.5 h-2.5",o=r??(x?"certified":"durable"),c=y[o],b=C[o],g=b?null:k(e),p=b||((g==null?void 0:g.text)??"text-accent/75");return n.jsxs("span",{className:`inline-flex items-center ${l} font-mono text-text-secondary border border-surface-border rounded-lg`,style:{fontSize:a,lineHeight:1.1},children:[n.jsx(c,{className:`${i} shrink-0 ${p}`}),e]})}export{I as W};
2
- //# sourceMappingURL=WorkflowPill-BbgVTGgI.js.map
@@ -1,2 +0,0 @@
1
- import{a as u,j as s}from"./vendor-query-B2UbickB.js";import{T as h}from"./TimestampCell-Dgpl-lKv.js";import{E as D}from"./ElapsedCell-DKoH0bqR.js";import{u as R,e as z,b as E}from"./workflows-DNZf6Pmq.js";import{i as W}from"./index-BMIU7Im5.js";import{b as A}from"./useEventHooks-BccPxFR6.js";import{u as L}from"./useFilterParams-DZCAaBC7.js";import{D as M}from"./DataTable-D9yuBv0w.js";import{W as I}from"./WorkflowPill-BbgVTGgI.js";import{P as U}from"./PageHeader-DLjHNYHX.js";import{F as O,b as f}from"./FilterBar-Ck4K4rzu.js";import{S as B}from"./StickyPagination-F9FZsRy9.js";import{L as H}from"./ListToolbar-DuON-br0.js";import{R as q,a as w}from"./RowActions-Dg-Fsm5O.js";import{q as G,S as J}from"./vendor-icons-E6836lXZ.js";import{c as V}from"./vendor-react-CX88sFS5.js";import"./EmptyState-BcsfPq9T.js";const K={running:"in_progress",completed:"completed",failed:"failed"},Q={in_progress:"bg-status-active",completed:"bg-status-success",failed:"bg-status-error"},X={running:"text-status-active",completed:"text-status-success",failed:"text-status-error"};function Y(d,n,p,a,r){return[{key:"workflow_id",label:"Workflow ID / Type",render:e=>{const o=Q[K[e.status]??e.status]??"bg-status-pending",m=e.status==="running"?" animate-pulse":"";return s.jsxs("div",{className:"flex items-start gap-2 min-w-0",children:[s.jsx("span",{className:`w-1.5 h-1.5 shrink-0 rounded-full mt-1.5 ${o}${m}`,title:e.status}),s.jsxs("div",{className:"min-w-0",children:[s.jsx("span",{className:"font-mono text-xs text-text-primary truncate block",children:e.workflow_id}),s.jsx("div",{className:"mt-0.5",children:s.jsx(I,{type:e.entity,variant:r.get(e.entity)??"durable",size:"xs"})})]})]})}},{key:"created_at",label:"Created",render:e=>s.jsx(h,{date:e.created_at}),className:"w-40",sortable:!0},{key:"updated_at",label:"Updated",render:e=>s.jsx(h,{date:e.updated_at}),className:"w-40",sortable:!0},{key:"duration",label:"Duration",render:e=>s.jsx(D,{startDate:e.created_at,endDate:e.status==="running"?null:e.updated_at,isLive:e.status==="running"}),className:"w-28"},{key:"actions",label:"",render:e=>s.jsxs(q,{children:[s.jsx(w,{icon:G,title:`Filter by ${e.entity}`,onClick:()=>d(e.entity)}),s.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:s.jsx("svg",{className:`w-[18px] h-[18px] ${X[e.status]??"text-text-tertiary"} hover:opacity-70`,viewBox:"0 0 24 24",fill:"currentColor",children:s.jsx("circle",{cx:"12",cy:"12",r:"6"})})}),p&&s.jsx(w,{icon:J,title:"View config",onClick:()=>a(`/workflows/registry/${encodeURIComponent(e.entity)}`)})]}),className:"w-24 text-right"}]}function xe({tier:d="all"}){A();const n=V(),{isSuperAdmin:p}=W(),{filters:a,setFilter:r,pagination:e,sort:o,setSort:m}=L({filters:{search:"",entity:"",status:"",tier:d}}),l=a.tier||"all",v=l==="certified"?"true":l==="durable"?"false":void 0,{data:g}=R(),{data:x}=z(),k=u.useMemo(()=>{const t=new Map;for(const y of x??[])t.set(y.workflow_type,y.tier??"durable");return t},[x]),j=Y(t=>r("entity",t),t=>r("status",t),p,n,k),[c,S]=u.useState(a.search);u.useEffect(()=>{if(c===a.search)return;const t=setTimeout(()=>r("search",c),300);return()=>clearTimeout(t)},[c,r,a.search]);const{data:i,isLoading:C,refetch:_,isFetching:$}=E({limit:e.pageSize,offset:e.offset,entity:a.entity||void 0,search:a.search||void 0,status:a.status||void 0,sort_by:o.sort_by||void 0,order:o.sort_by?o.order:void 0,registered:v}),b=(i==null?void 0:i.total)??0,N=(i==null?void 0:i.jobs)??[],T=u.useMemo(()=>[...new Set((g??[]).map(t=>t.workflow_type))].sort(),[g]),P="Durable Executions",F=l==="certified"?"No certified workflow executions found":l==="durable"?"No durable workflow executions found":"No workflow executions found";return s.jsxs("div",{children:[s.jsx(U,{title:P,docsHash:"#docs:dashboard.md:durable-executions"}),s.jsxs(O,{actions:s.jsx(H,{onRefresh:()=>_(),isFetching:$,apiPath:`/workflow-states/jobs?limit=${e.pageSize}&offset=${e.offset}${a.entity?`&entity=${a.entity}`:""}${a.search?`&search=${a.search}`:""}${a.status?`&status=${a.status}`:""}${o.sort_by?`&sort_by=${o.sort_by}&order=${o.order}`:""}`}),children:[s.jsx("input",{type:"text",placeholder:"Search workflow ID...",value:c,onChange:t=>S(t.target.value),className:"input text-[11px] py-1 px-2 w-56"}),s.jsx(f,{label:"Type",value:a.entity,onChange:t=>r("entity",t),options:T.map(t=>({value:t,label:t}))}),s.jsx(f,{label:"Status",value:a.status,onChange:t=>r("status",t),options:[{value:"running",label:"Running"},{value:"completed",label:"Completed"},{value:"failed",label:"Failed"}]}),s.jsx(f,{label:"Tier",value:a.tier==="all"?"":a.tier,onChange:t=>r("tier",t||"all"),options:[{value:"certified",label:"Certified"},{value:"durable",label:"Durable"}]})]}),s.jsx(M,{columns:j,data:N,keyFn:t=>t.workflow_id,onRowClick:t=>n(`/workflows/executions/${t.workflow_id}`),isLoading:C,emptyMessage:F,sort:o,onSort:m}),s.jsx(B,{page:e.page,totalPages:e.totalPages(b),onPageChange:e.setPage,total:b,pageSize:e.pageSize,onPageSizeChange:e.setPageSize})]})}export{xe as WorkflowsDashboard};
2
- //# sourceMappingURL=WorkflowsDashboard-Dgq8RcD6.js.map
@@ -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-DNZf6Pmq.js";import{b as $}from"./useEventHooks-BccPxFR6.js";import{P as D}from"./PageHeader-DLjHNYHX.js";import{S as h}from"./StatCard-DlgF0CJC.js";import{c as w}from"./vendor-react-CX88sFS5.js";import"./index-BMIU7Im5.js";import"./vendor-icons-E6836lXZ.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-DnInrUPO.js.map
@@ -1,2 +0,0 @@
1
- import{a as x,j as e}from"./vendor-query-B2UbickB.js";import{l as W,n as z,o as $,u as F}from"./yaml-workflows-BKZdGciI.js";import{a as q,d as Y}from"./useYamlActivityEvents-BBioXSKA.js";import{u as B}from"./useFilterParams-DZCAaBC7.js";import{u as D}from"./useExpandedRows-CkcEntB-.js";import{P}from"./PageHeader-DLjHNYHX.js";import{F as V,a as H,b as O}from"./FilterBar-Ck4K4rzu.js";import{E as U}from"./EmptyState-BcsfPq9T.js";import{R as J}from"./RunAsSelector-hYP59xHH.js";import{b as A,T as G}from"./ToolPill-D_DIWFJ5.js";import{X as L,a0 as X,a7 as K,P as T,l as Q,f as Z,a1 as ee,W as te}from"./vendor-icons-E6836lXZ.js";import{L as se,c as re}from"./vendor-react-CX88sFS5.js";import{S as w}from"./index-BMIU7Im5.js";import{d as M,C as ae}from"./helpers-DVICI_VA.js";import{S as E}from"./StatusBadge-XQlNFwmH.js";import{S as ne}from"./ServerName-C9lUCFYb.js";import"./BotPicker-CwfVVWxh.js";import"./bots-zyUDnQhH.js";import"./TimeAgo-RPbch7Te.js";const I={mcp:{border:"border-blue-500",text:"text-blue-500",icon:"MCP"},db:{border:"border-blue-500",text:"text-blue-500",icon:"DB"},llm:{border:"border-violet-500",text:"text-violet-500",icon:"LLM"},transform:{border:"border-emerald-500",text:"text-emerald-500",icon:"Map"}};function oe({steps:t,manifest:i,isComplete:r}){const a=i.filter(s=>s.type==="worker"),u=a.length,o=a.map(s=>{const l=t.find(d=>d.activityId===s.activity_id),p=s.tool_source||"mcp",f=I[p]||I.mcp;return{activityId:s.activity_id,title:s.title||s.mcp_tool_name||s.activity_id,toolName:s.mcp_tool_name,colors:f,status:(l==null?void 0:l.status)||"pending",error:l==null?void 0:l.error}});return e.jsxs("div",{children:[e.jsx("p",{className:"text-[11px] text-text-secondary mb-3",children:r?`All ${u} steps completed`:`Running step ${o.filter(s=>s.status==="completed").length+1} of ${u}...`}),e.jsx("div",{className:"space-y-0",children:o.map((s,l)=>{const p=l===o.length-1;return e.jsxs("div",{className:"flex items-stretch gap-2",children:[e.jsxs("div",{className:"flex flex-col items-center w-4 shrink-0",children:[e.jsx("span",{className:`w-2.5 h-2.5 rounded-full shrink-0 border-2 transition-colors ${s.status==="completed"?"bg-status-success border-status-success":s.status==="running"?`${s.colors.border} bg-transparent animate-pulse`:s.status==="failed"?"bg-status-error border-status-error":"bg-surface-sunken border-surface-border"}`}),!p&&e.jsx("span",{className:`w-px flex-1 transition-colors ${s.status==="completed"?"bg-status-success/30":"bg-surface-border"}`})]}),e.jsxs("div",{className:p?"":"pb-3",children:[e.jsx("p",{className:`text-[11px] font-medium ${s.status==="running"?"text-text-primary":s.status==="completed"?"text-text-secondary":s.status==="failed"?"text-status-error":"text-text-tertiary"}`,children:s.title}),s.toolName&&e.jsx("span",{className:"text-[9px] text-text-tertiary font-mono",children:s.toolName}),s.error&&e.jsx("p",{className:"text-[9px] text-status-error mt-0.5",children:s.error})]})]},s.activityId)})})]})}function ie({workflow:t,onClose:i}){const r=W(),[a,u]=x.useState(!1),[o,s]=x.useState({}),[l,p]=x.useState(""),[f,d]=x.useState(""),[m,j]=x.useState(""),[b,N]=x.useState(null),[v,y]=x.useState(null),{steps:k,isComplete:n}=q(b);x.useEffect(()=>{N(null),y(null),d(""),r.reset();const h=A(t.input_schema);s(h),p(JSON.stringify(h,null,2)),u(!1)},[t.id]),x.useEffect(()=>{if(n&&b){const h=b,g=setTimeout(()=>{y({jobId:h}),N(null)},800);return()=>clearTimeout(g)}},[n,b]);const c=()=>{if(!a)p(JSON.stringify(o,null,2));else try{s(JSON.parse(l))}catch{}u(!a)},S=async()=>{d(""),y(null);let h;if(a)try{h=JSON.parse(l)}catch{d("Invalid JSON");return}else h={...o};try{const g=await r.mutateAsync({id:t.id,data:h,sync:!1,...m?{execute_as:m}:{}});g.job_id&&N(g.job_id)}catch{}},_=!!b,R=t.app_id||"longtail";return e.jsxs("div",{className:"border-l border-surface-border bg-surface-raised flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-surface-border shrink-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:t.app_id}),e.jsx("code",{className:"text-[11px] font-mono text-accent truncate block",children:t.graph_topic})]}),e.jsx("button",{onClick:()=>{_||i()},className:"p-1 text-text-tertiary hover:text-text-primary shrink-0 ml-2",children:e.jsx(L,{className:"w-4 h-4"})})]}),e.jsx("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4",children:_?e.jsx(oe,{steps:k,manifest:t.activity_manifest,isComplete:n}):v?e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("svg",{className:"w-4 h-4 text-status-success",viewBox:"0 0 16 16",fill:"currentColor",children:e.jsx("path",{d:"M8 1a7 7 0 110 14A7 7 0 018 1zm3.36 4.65a.5.5 0 00-.72 0L7 9.29 5.36 7.65a.5.5 0 10-.72.7l2 2a.5.5 0 00.72 0l4-4a.5.5 0 000-.7z"})}),e.jsx("p",{className:"text-xs font-medium text-status-success",children:"Workflow completed"})]}),e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs(se,{to:`/mcp/executions/${encodeURIComponent(v.jobId)}?namespace=${encodeURIComponent(R)}`,className:"inline-flex items-center gap-1.5 text-xs text-accent hover:underline",children:[e.jsx(X,{size:12})," View execution"]}),e.jsxs("button",{onClick:()=>y(null),className:"btn-primary text-xs inline-flex items-center gap-1.5",children:[e.jsx(K,{size:12})," Run again"]})]})]}):e.jsxs(e.Fragment,{children:[e.jsx(J,{selected:m,onChange:j}),t.description&&e.jsx("p",{className:"text-[11px] text-text-secondary leading-relaxed",children:t.description}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx("label",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Input"}),e.jsx("button",{onClick:c,className:"text-[10px] text-accent hover:underline",children:a?"Form view":"JSON view"})]}),a?e.jsx("textarea",{value:l,onChange:h=>p(h.target.value),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-2 font-mono text-[11px] text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary resize-y",rows:6,spellCheck:!1}):e.jsxs("div",{className:"space-y-3 max-h-[300px] overflow-y-auto",children:[Object.entries(o).map(([h,g])=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:h}),typeof g=="boolean"?e.jsxs("select",{value:String(g),onChange:C=>s({...o,[h]:C.target.value==="true"}),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary",children:[e.jsx("option",{value:"true",children:"true"}),e.jsx("option",{value:"false",children:"false"})]}):typeof g=="object"?e.jsx("textarea",{value:JSON.stringify(g,null,2),onChange:C=>{try{s({...o,[h]:JSON.parse(C.target.value)})}catch{}},className:"w-full min-h-[60px] px-3 py-1.5 bg-surface-sunken border border-surface-border rounded-md font-mono text-xs text-text-primary resize-y focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary"}):e.jsx("input",{type:typeof g=="number"?"number":"text",value:String(g??""),onChange:C=>s({...o,[h]:typeof g=="number"?Number(C.target.value):C.target.value}),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary"})]},h)),Object.keys(o).length===0&&e.jsx("p",{className:"text-[11px] text-text-tertiary italic",children:"No input fields defined"})]}),f&&e.jsx("p",{className:"text-[11px] text-status-error mt-1",children:f})]}),r.isError&&e.jsx("div",{className:"bg-status-error/10 border border-status-error/20 rounded-md px-3 py-2",children:e.jsx("p",{className:"text-[11px] text-status-error",children:r.error instanceof Error?r.error.message:"Invocation failed"})}),e.jsx("button",{onClick:S,disabled:r.isPending,className:"btn-primary text-xs disabled:opacity-50 inline-flex items-center gap-1.5",children:r.isPending?"Starting...":e.jsxs(e.Fragment,{children:[e.jsx(T,{size:12})," Run"]})})]})})]})}function ce({cronInput:t,setCronInput:i,setCron:r,hasCronSchedule:a,onSave:u,onClear:o}){return e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx(w,{className:"mb-3",children:"Schedule"}),e.jsxs("div",{className:"flex gap-3 items-start",children:[e.jsxs("div",{className:"flex-1",children:[e.jsx("input",{type:"text",value:t,onChange:s=>{i(s.target.value),r.reset()},placeholder:"0 */6 * * *",className:"input-json w-full"}),t.trim()&&M(t.trim())&&e.jsx("p",{className:"text-xs text-text-secondary mt-1.5",children:M(t.trim())})]}),e.jsx("button",{onClick:u,disabled:r.isPending,className:"btn-primary text-xs shrink-0",children:r.isPending?"Saving...":"Save"}),a&&e.jsx("button",{onClick:o,disabled:r.isPending,className:"btn-ghost text-xs text-status-error shrink-0",children:"Clear"})]}),r.isSuccess&&e.jsx("p",{className:"text-[10px] text-status-success mt-2",children:"Schedule updated"}),r.error&&e.jsx("p",{className:"text-[10px] text-status-error mt-2",children:r.error.message})]}),e.jsxs("div",{className:"bg-surface-sunken rounded-lg p-4",children:[e.jsx(w,{className:"mb-2",children:"Common Patterns"}),e.jsx("div",{className:"grid grid-cols-2 sm:grid-cols-3 gap-x-6 gap-y-1.5",children:ae.map(([s,l])=>e.jsxs("button",{type:"button",onClick:()=>{i(s),r.reset()},className:"flex items-center gap-2 text-left py-0.5 group",children:[e.jsx("code",{className:"font-mono text-[11px] text-accent group-hover:text-accent-hover",children:s}),e.jsx("span",{className:"text-[10px] text-text-tertiary",children:l})]},s))})]})]})}function le({workflow:t,onClose:i}){const r=z(),a=$(),[u,o]=x.useState(""),[s,l]=x.useState(""),[p,f]=x.useState(!1),[d,m]=x.useState({}),[j,b]=x.useState("{}");x.useEffect(()=>{o(t.cron_schedule??""),l(t.execute_as??""),r.reset(),a.reset();const n=t.cron_envelope||{},c=Object.keys(n).length>0?n:A(t.input_schema);m(c),b(JSON.stringify(c,null,2)),f(!1)},[t.id]);const N=()=>{if(!p)b(JSON.stringify(d,null,2));else try{m(JSON.parse(j))}catch{}f(!p)},v=()=>{let n;if(p)try{n=JSON.parse(j)}catch{return}else n={...d};r.mutate({id:t.id,cron_schedule:u.trim(),cron_envelope:Object.keys(n).length>0?n:null,execute_as:s||null})},y=()=>{a.mutate(t.id,{onSuccess:()=>{o("")}})},k={isPending:r.isPending||a.isPending,isSuccess:r.isSuccess||a.isSuccess,error:r.error||a.error,reset:()=>{r.reset(),a.reset()}};return e.jsxs("div",{className:"border-l border-surface-border bg-surface-raised flex flex-col h-full",children:[e.jsxs("div",{className:"flex items-center justify-between px-4 py-3 border-b border-surface-border shrink-0",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-text-primary truncate",children:"Cron Schedule"}),e.jsx("code",{className:"text-[11px] font-mono text-accent truncate block",children:t.graph_topic})]}),e.jsx("button",{onClick:i,className:"p-1 text-text-tertiary hover:text-text-primary shrink-0 ml-2",children:e.jsx(L,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex-1 overflow-y-auto px-4 py-3 space-y-4",children:[e.jsx(J,{selected:s,onChange:l}),e.jsx(ce,{cronInput:u,setCronInput:o,setCron:k,hasCronSchedule:!!t.cron_schedule,onSave:v,onClear:y}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-1",children:[e.jsx(w,{children:"Default Input"}),e.jsx("button",{onClick:N,className:"text-[10px] text-accent hover:underline",children:p?"Form view":"JSON view"})]}),p?e.jsx("textarea",{value:j,onChange:n=>b(n.target.value),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-2 font-mono text-[11px] text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary resize-y",rows:6,spellCheck:!1}):e.jsxs("div",{className:"space-y-3 max-h-[200px] overflow-y-auto",children:[Object.entries(d).map(([n,c])=>e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:n}),typeof c=="boolean"?e.jsxs("select",{value:String(c),onChange:S=>m({...d,[n]:S.target.value==="true"}),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary",children:[e.jsx("option",{value:"true",children:"true"}),e.jsx("option",{value:"false",children:"false"})]}):typeof c=="object"?e.jsx("textarea",{value:JSON.stringify(c,null,2),onChange:S=>{try{m({...d,[n]:JSON.parse(S.target.value)})}catch{}},className:"w-full min-h-[60px] px-3 py-1.5 bg-surface-sunken border border-surface-border rounded-md font-mono text-xs text-text-primary resize-y focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary"}):e.jsx("input",{type:typeof c=="number"?"number":"text",value:String(c??""),onChange:S=>m({...d,[n]:typeof c=="number"?Number(S.target.value):S.target.value}),className:"w-full bg-surface-sunken border border-surface-border rounded-md px-3 py-1.5 text-xs text-text-primary focus:outline-none focus:ring-1 focus:ring-inset focus:ring-accent-primary"})]},n)),Object.keys(d).length===0&&e.jsx("p",{className:"text-[11px] text-text-tertiary italic",children:"No input fields defined"})]})]})]})]})}function de(t){const i=new Map;for(const r of t){const a=i.get(r.app_id)??[];a.push(r),i.set(r.app_id,a)}return[...i.entries()].map(([r,a])=>{var f;const u={active:0,deployed:1,draft:2,archived:3},o=a.reduce((d,m)=>(u[m.status]??9)<(u[d]??9)?m.status:d,a[0].status),s=a.reduce((d,m)=>m.updated_at>d?m.updated_at:d,a[0].updated_at),l=a.reduce((d,m)=>{const j=parseInt(m.app_version||"0",10);return j>d?j:d},0),p=((f=a.find(d=>d.set_id))==null?void 0:f.set_id)||null;return{appId:r,workflows:a,toolCount:a.length,status:o,updatedAt:s,appVersion:String(l),setId:p}})}function ue(t,i){if(!i)return!0;const r=i.toLowerCase();return t.appId.toLowerCase().includes(r)?!0:t.workflows.some(a=>{var u,o;return a.graph_topic.toLowerCase().includes(r)||((u=a.name)==null?void 0:u.toLowerCase().includes(r))||((o=a.description)==null?void 0:o.toLowerCase().includes(r))})}function xe(t,i){if(!i)return t;const r=i.toLowerCase();return t.filter(a=>{var u,o;return a.graph_topic.toLowerCase().includes(r)||((u=a.name)==null?void 0:u.toLowerCase().includes(r))||((o=a.description)==null?void 0:o.toLowerCase().includes(r))})}function pe({wf:t,onTry:i,onCron:r}){const a=t.status==="active",u=!!t.cron_schedule;return e.jsxs("tr",{onClick:a?i:void 0,className:`group/row hover:bg-surface-hover/50 transition-colors border-b border-surface-border/15 ${a?"cursor-pointer":""}`,children:[e.jsxs("td",{className:"pl-14 pr-6 py-2.5",children:[e.jsx(G,{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.jsxs("td",{className:"px-4 py-2.5 w-20 text-[10px] text-text-quaternary font-mono whitespace-nowrap",children:["v",t.content_version]}),e.jsx("td",{className:"px-4 py-2.5 w-28 whitespace-nowrap",children:e.jsx(E,{status:t.status})}),e.jsx("td",{className:"px-4 py-2.5 w-16",children:e.jsxs("div",{className:"flex items-center justify-end gap-1.5",children:[a&&e.jsx("button",{onClick:o=>{o.stopPropagation(),i()},className:"opacity-0 group-hover/row:opacity-100 transition-opacity text-text-tertiary hover:text-accent",title:"Test tool",children:e.jsx(T,{className:"w-3.5 h-3.5",strokeWidth:1.5})}),e.jsx("button",{onClick:o=>{o.stopPropagation(),r()},className:u?"text-status-success":"opacity-0 group-hover/row:opacity-100 transition-opacity text-text-tertiary hover:text-accent",title:u?`Cron: ${t.cron_schedule}`:"Schedule cron",children:e.jsx(ee,{className:"w-3.5 h-3.5",strokeWidth:1.5})})]})})]})}function me({server:t,expanded:i,onToggle:r,onTryTool:a,onWorkbench:u,onCron:o,visibleTools:s}){return e.jsxs(e.Fragment,{children:[e.jsxs("tr",{onClick:r,className:"group/row border-b border-surface-border/50 transition-colors duration-100 cursor-pointer row-hover",children:[e.jsx("td",{className:"px-6 py-2.5",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`transition-transform duration-150 ${i?"rotate-90":""} text-text-tertiary`,children:e.jsx(Q,{size:14})}),e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(ne,{name:t.appId,short:!1}),e.jsx("sup",{className:"text-[9px] font-normal text-accent/70",children:t.toolCount})]})]})}),e.jsxs("td",{className:"px-4 py-2.5 text-[10px] text-text-quaternary font-mono whitespace-nowrap",children:["v",t.appVersion]}),e.jsx("td",{className:"px-4 py-2.5 whitespace-nowrap",children:e.jsx(E,{status:t.status})}),e.jsx("td",{className:"px-4 py-2.5 w-16",children:e.jsx("div",{className:"flex items-center justify-end gap-1.5",children:t.setId&&e.jsx("button",{onClick:l=>{l.stopPropagation(),u()},className:"opacity-0 group-hover/row:opacity-100 transition-opacity text-text-tertiary hover:text-accent",title:"Open workbench",children:e.jsx(Z,{className:"w-3.5 h-3.5",strokeWidth:1.5})})})})]}),i&&s.map(l=>e.jsx(pe,{wf:l,onTry:()=>a(l),onCron:()=>o(l)},l.id))]})}function Le(){const t=re(),{filters:i,setFilter:r}=B({filters:{status:"",server:"",search:""}}),{data:a,isLoading:u}=F({status:i.status||void 0,app_id:i.server||void 0,search:i.search||void 0,limit:200,offset:0}),o=(a==null?void 0:a.workflows)??[],{data:s}=Y({limit:100}),l=x.useMemo(()=>{const n=new Map;for(const c of(s==null?void 0:s.sets)??[])c.source_workflow_id&&n.set(c.id,c.source_workflow_id);return n},[s==null?void 0:s.sets]),p=x.useMemo(()=>de(o),[o]),f=x.useMemo(()=>[...new Set(o.map(c=>c.app_id))].sort().map(c=>({value:c,label:c})),[o]),d=x.useMemo(()=>i.search?p.filter(n=>ue(n,i.search)):p,[p,i.search]),{expandedIds:m,toggle:j}=D("lt:expanded:yaml-workflows"),[b,N]=x.useState(null),[v,y]=x.useState(null),k=b||v;return u?e.jsxs("div",{children:[e.jsx(P,{title:"MCP Pipeline Tools",docsHash:"#docs:dashboard.md:mcp-pipeline-tools"}),e.jsx("div",{className:"animate-pulse space-y-0",children:Array.from({length:4}).map((n,c)=>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"})},c))})]}):e.jsxs("div",{children:[e.jsx(P,{title:"MCP Pipeline Tools",docsHash:"#docs:dashboard.md:mcp-pipeline-tools",actions:e.jsx("button",{onClick:()=>t("/mcp/queries/new"),className:"btn-primary text-xs",children:"Design Pipeline"})}),e.jsx("p",{className:"text-sm text-text-secondary mb-6 max-w-2xl leading-relaxed",children:"Deterministic tools compiled from dynamic MCP executions. Each tool is a YAML DAG that the router discovers and invokes automatically."}),e.jsxs(V,{children:[e.jsx(H,{label:"Search",value:i.search,onChange:n=>r("search",n),placeholder:"Server or tool name…"}),f.length>1&&e.jsx(O,{label:"Server",value:i.server,onChange:n=>r("server",n),options:f}),e.jsx(O,{label:"Status",value:i.status,onChange:n=>r("status",n),options:[{value:"draft",label:"Draft"},{value:"deployed",label:"Deployed"},{value:"active",label:"Active"},{value:"archived",label:"Archived"}]})]}),e.jsxs("div",{className:"flex gap-0",children:[e.jsx("div",{className:`${k?"flex-1 min-w-0":"w-full"} transition-all`,children:d.length===0?e.jsx("div",{className:"cursor-pointer",onClick:()=>t("/mcp/queries/new"),children:e.jsx(U,{icon:te,title:"No pipelines yet",description:"Click to open the MCP Tool Designer and create your first deterministic tool."})}):e.jsxs("table",{className:"w-full",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b",children:[e.jsx("th",{className:"sticky top-[2.75rem] z-10 bg-surface px-6 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary",children:"Server / Tool"}),e.jsx("th",{className:"sticky top-[2.75rem] z-10 bg-surface px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-20",children:"Version"}),e.jsx("th",{className:"sticky top-[2.75rem] z-10 bg-surface px-4 py-3 text-left text-[10px] font-semibold uppercase tracking-widest text-text-tertiary w-28",children:"Status"}),e.jsx("th",{className:"sticky top-[2.75rem] z-10 bg-surface w-16"})]})}),e.jsx("tbody",{children:d.map(n=>e.jsx(me,{server:n,expanded:m.has(n.appId),onToggle:()=>j(n.appId),onTryTool:c=>{y(null),N(c)},onWorkbench:()=>{if(n.setId){const c=l.get(n.setId);c&&t(`/mcp/queries/${c}?mode=plan&set_id=${n.setId}&step=2`)}},onCron:c=>{N(null),y(c)},visibleTools:xe(n.workflows,i.search)},n.appId))})]})}),b&&e.jsx("div",{className:"w-[380px] shrink-0 sticky top-0 max-h-screen overflow-y-auto",children:e.jsx(ie,{workflow:b,onClose:()=>N(null)})}),v&&e.jsx("div",{className:"w-[380px] shrink-0 sticky top-0 max-h-screen overflow-y-auto",children:e.jsx(le,{workflow:v,onClose:()=>y(null)})})]})]})}export{Le as YamlWorkflowsPage};
2
- //# sourceMappingURL=YamlWorkflowsPage-z1Z9J-mc.js.map
@@ -1,2 +0,0 @@
1
- import{a,j as r}from"./vendor-query-B2UbickB.js";import{v as l,w as c,x as m}from"./index-BMIU7Im5.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-BseAikei.js.map
@@ -1,2 +0,0 @@
1
- import{j as s}from"./vendor-query-B2UbickB.js";import{F as x,b as l}from"./FilterBar-Ck4K4rzu.js";import{P as m}from"./PriorityBadge-DfQY9St9.js";import{R as p}from"./RolePill-Bp10-WfX.js";import{W as u}from"./WorkflowPill-BbgVTGgI.js";import{T as d}from"./TimestampCell-Dgpl-lKv.js";import{C as y,i as h,a as j}from"./escalation-BseAikei.js";import{a0 as v,a1 as b,a2 as f,a3 as r}from"./vendor-icons-E6836lXZ.js";import{L as k}from"./vendor-react-CX88sFS5.js";function N({row:e}){if(h(e)){const t=e.status==="resolved"?"text-status-success":"text-text-tertiary";return s.jsx(f,{className:`w-3 h-3 shrink-0 ${t}`})}return e.status==="resolved"?s.jsx(r,{className:"w-2.5 h-2.5 shrink-0 fill-status-success text-status-success"}):e.status==="cancelled"?s.jsx(r,{className:"w-2.5 h-2.5 shrink-0 fill-status-error text-status-error"}):j(e)?s.jsx(r,{className:"w-2.5 h-2.5 shrink-0 fill-status-warning text-status-warning"}):s.jsx(r,{className:"w-2.5 h-2.5 shrink-0 fill-status-active text-status-active"})}const I=[{key:"description",label:"Summary",render:e=>s.jsxs("div",{className:"flex items-start gap-2 overflow-hidden",children:[s.jsx("span",{className:"mt-1 shrink-0",children:s.jsx(N,{row:e})}),s.jsxs("div",{className:"min-w-0 overflow-hidden",children:[s.jsx("p",{className:"text-xs text-text-primary truncate",children:e.description||e.type}),s.jsxs("div",{className:"flex items-center gap-2 mt-0.5",children:[s.jsx(u,{type:e.type}),e.subtype&&e.subtype!==e.type&&s.jsx("span",{className:"text-[10px] text-text-tertiary whitespace-nowrap",children:e.subtype})]})]})]}),className:"max-w-0"},{key:"task_id",label:"Task",render:e=>e.task_id?s.jsxs(k,{to:`/workflows/tasks/detail/${e.task_id}`,onClick:t=>t.stopPropagation(),className:"group/task inline-flex items-center gap-1 text-xs font-mono text-text-secondary hover:text-accent transition-colors",children:[e.task_id.slice(0,12),"…",s.jsx(v,{size:10,className:"opacity-0 group-hover/task:opacity-100 transition-opacity"})]}):s.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-36 whitespace-nowrap"},{key:"role",label:"Role",render:e=>s.jsx(p,{role:e.role}),className:"w-28"},{key:"priority",label:"Priority",render:e=>s.jsx(m,{priority:e.priority}),className:"w-20",sortable:!0},{key:"created_at",label:"Created",render:e=>s.jsx(d,{date:e.created_at}),className:"w-40",sortable:!0}],A={key:"expires",label:s.jsx(b,{className:"w-3.5 h-3.5 text-text-tertiary"}),render:e=>e.assigned_until?s.jsx(y,{until:e.assigned_until}):s.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-16 whitespace-nowrap"},C=[{value:"1",label:"P1"},{value:"2",label:"P2"},{value:"3",label:"P3"},{value:"4",label:"P4"}],g=[{value:"available",label:"Available"},{value:"claimed",label:"Claimed"},{value:"resolved",label:"Resolved"}];function B({filters:e,setFilter:t,roles:i,types:n,showStatus:o=!1,actions:c}){return s.jsxs(x,{actions:c,children:[o&&s.jsx(l,{label:"Status",value:e.status??"",onChange:a=>t("status",a),options:g}),s.jsx(l,{label:"Role",value:e.role,onChange:a=>t("role",a),options:i.map(a=>({value:a,label:a}))}),s.jsx(l,{label:"Type",value:e.type,onChange:a=>t("type",a),options:n.map(a=>({value:a,label:a}))}),s.jsx(l,{label:"Priority",value:e.priority,onChange:a=>t("priority",a),options:C})]})}export{I as E,A as T,B as a};
2
- //# sourceMappingURL=escalation-columns-Cs2CkkEs.js.map
@@ -1,2 +0,0 @@
1
- import{j as n}from"./vendor-query-B2UbickB.js";import{T as o}from"./TimeAgo-RPbch7Te.js";import{S as l}from"./StatusBadge-XQlNFwmH.js";const i={"* * * * *":"Every minute","*/5 * * * *":"Every 5 minutes","*/15 * * * *":"Every 15 minutes","*/30 * * * *":"Every 30 minutes","0 * * * *":"Every hour","0 */2 * * *":"Every 2 hours","0 */6 * * *":"Every 6 hours","0 */12 * * *":"Every 12 hours","0 0 * * *":"Daily at midnight","0 9 * * *":"Daily at 9 AM","0 9 * * 1-5":"Weekdays at 9 AM","0 0 * * 0":"Weekly (Sunday midnight)","0 0 1 * *":"Monthly (1st at midnight)","0 2 * * *":"Daily at 2 AM"};function c(t){return i[t]??""}const f=[["*/15 * * * *","Every 15 min"],["0 * * * *","Every hour"],["0 */6 * * *","Every 6 hours"],["0 9 * * *","Daily 9 AM"],["0 9 * * 1-5","Weekdays 9 AM"],["0 0 * * 0","Weekly (Sun)"]];function E(t){const r=t==null?void 0:t.data;if(!r||typeof r!="object"||Array.isArray(r))return null;const s=Object.entries(r);return s.length===0||!s.every(([,e])=>typeof e=="string"||typeof e=="number"||typeof e=="boolean"||e===null)?null:s.map(([e,a])=>({key:e,value:a===null?"":String(a),type:a===null?"string":typeof a}))}const h=[{key:"workflow_id",label:"Workflow ID",render:t=>n.jsx("span",{className:"font-mono text-[11px] text-text-secondary",children:t.workflow_id.length>40?`${t.workflow_id.slice(0,40)}...`:t.workflow_id})},{key:"status",label:"Status",render:t=>n.jsx(l,{status:t.status}),className:"w-28"},{key:"created_at",label:"Started",render:t=>n.jsx(o,{date:t.created_at}),className:"w-32"}];export{f as C,c as d,E as e,h as j};
2
- //# sourceMappingURL=helpers-DVICI_VA.js.map