@hotmeshio/long-tail 0.2.6 → 0.2.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (279) hide show
  1. package/dashboard/dist/assets/AdminDashboard-45Ya2uzl.js +2 -0
  2. package/dashboard/dist/assets/{AdminDashboard-DThDjhN5.js.map → AdminDashboard-45Ya2uzl.js.map} +1 -1
  3. package/dashboard/dist/assets/AgentConfigPage-BOASC5vi.js +13 -0
  4. package/dashboard/dist/assets/AgentConfigPage-BOASC5vi.js.map +1 -0
  5. package/dashboard/dist/assets/AgentDetailPage-5M7JTcFz.js +4 -0
  6. package/dashboard/dist/assets/AgentDetailPage-5M7JTcFz.js.map +1 -0
  7. package/dashboard/dist/assets/AgentsPage--I4d5y9J.js +2 -0
  8. package/dashboard/dist/assets/{AgentsPage-pKfjHe4u.js.map → AgentsPage--I4d5y9J.js.map} +1 -1
  9. package/dashboard/dist/assets/AvailableEscalationsPage-CXUkRz18.js +2 -0
  10. package/dashboard/dist/assets/AvailableEscalationsPage-CXUkRz18.js.map +1 -0
  11. package/dashboard/dist/assets/BotPicker-DgbzCesR.js +2 -0
  12. package/dashboard/dist/assets/{BotPicker-Zxf7Npew.js.map → BotPicker-DgbzCesR.js.map} +1 -1
  13. package/dashboard/dist/assets/CapabilitiesPage-B2S8_Gsc.js +2 -0
  14. package/dashboard/dist/assets/{CapabilitiesPage-6zOJ12cB.js.map → CapabilitiesPage-B2S8_Gsc.js.map} +1 -1
  15. package/dashboard/dist/assets/CollapsibleSection-4Eo3b5ha.js +2 -0
  16. package/dashboard/dist/assets/{CollapsibleSection-DvBx4tmw.js.map → CollapsibleSection-4Eo3b5ha.js.map} +1 -1
  17. package/dashboard/dist/assets/ConfirmDeleteModal-Bac7RmDD.js +2 -0
  18. package/dashboard/dist/assets/{ConfirmDeleteModal-dOxidrSR.js.map → ConfirmDeleteModal-Bac7RmDD.js.map} +1 -1
  19. package/dashboard/dist/assets/CopyableId-BhwdwAJN.js +2 -0
  20. package/dashboard/dist/assets/{CopyableId-DmLF-RqZ.js.map → CopyableId-BhwdwAJN.js.map} +1 -1
  21. package/dashboard/dist/assets/CredentialsPage-CSEBaYx1.js +2 -0
  22. package/dashboard/dist/assets/{CredentialsPage-C5f-Bg-o.js.map → CredentialsPage-CSEBaYx1.js.map} +1 -1
  23. package/dashboard/dist/assets/CronLabel-DV2v2FlP.js +2 -0
  24. package/dashboard/dist/assets/{CronLabel-CAVTt5AG.js.map → CronLabel-DV2v2FlP.js.map} +1 -1
  25. package/dashboard/dist/assets/CustomDurationPicker-B_Oxq_nK.js +2 -0
  26. package/dashboard/dist/assets/{CustomDurationPicker-Bk7D38y7.js.map → CustomDurationPicker-B_Oxq_nK.js.map} +1 -1
  27. package/dashboard/dist/assets/DataTable-etck0Zmp.js +2 -0
  28. package/dashboard/dist/assets/{DataTable-D9yuBv0w.js.map → DataTable-etck0Zmp.js.map} +1 -1
  29. package/dashboard/dist/assets/DropZone-BDpzHWsI.js +2 -0
  30. package/dashboard/dist/assets/{DropZone-2mGyDo1P.js.map → DropZone-BDpzHWsI.js.map} +1 -1
  31. package/dashboard/dist/assets/ElapsedCell-D35Z-HSJ.js +2 -0
  32. package/dashboard/dist/assets/{ElapsedCell-BpJjG1s-.js.map → ElapsedCell-D35Z-HSJ.js.map} +1 -1
  33. package/dashboard/dist/assets/EmptyState-Bk3_P-b8.js +2 -0
  34. package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-Bk3_P-b8.js.map} +1 -1
  35. package/dashboard/dist/assets/EscalationsOverview-Bt6gGFW4.js +2 -0
  36. package/dashboard/dist/assets/{EscalationsOverview-DPNd1vjF.js.map → EscalationsOverview-Bt6gGFW4.js.map} +1 -1
  37. package/dashboard/dist/assets/EventTable-BMk93q8A.js +2 -0
  38. package/dashboard/dist/assets/{EventTable-BoP8KC3M.js.map → EventTable-BMk93q8A.js.map} +1 -1
  39. package/dashboard/dist/assets/EventTopicPill-9LcMnLF0.js +2 -0
  40. package/dashboard/dist/assets/{EventTopicPill-BUxxvpNg.js.map → EventTopicPill-9LcMnLF0.js.map} +1 -1
  41. package/dashboard/dist/assets/FilterBar-CZGTOMoo.js +2 -0
  42. package/dashboard/dist/assets/{FilterBar-Ck4K4rzu.js.map → FilterBar-CZGTOMoo.js.map} +1 -1
  43. package/dashboard/dist/assets/HomePage-Dtk7mgmf.js +2 -0
  44. package/dashboard/dist/assets/{HomePage-h8I5ZolJ.js.map → HomePage-Dtk7mgmf.js.map} +1 -1
  45. package/dashboard/dist/assets/ListToolbar-CJEzypCM.js +2 -0
  46. package/dashboard/dist/assets/{ListToolbar-BaYIIsAt.js.map → ListToolbar-CJEzypCM.js.map} +1 -1
  47. package/dashboard/dist/assets/McpOverview-ChUa4l3t.js +2 -0
  48. package/dashboard/dist/assets/{McpOverview-BhZ3lSO6.js.map → McpOverview-ChUa4l3t.js.map} +1 -1
  49. package/dashboard/dist/assets/McpQueryDetailPage-04CTIN0v.js +5 -0
  50. package/dashboard/dist/assets/{McpQueryDetailPage-DVgcKa61.js.map → McpQueryDetailPage-04CTIN0v.js.map} +1 -1
  51. package/dashboard/dist/assets/McpQueryPage-DFnHFdbr.js +2 -0
  52. package/dashboard/dist/assets/{McpQueryPage-CTWOBqKT.js.map → McpQueryPage-DFnHFdbr.js.map} +1 -1
  53. package/dashboard/dist/assets/McpRunDetailPage-B95c3bFw.js +2 -0
  54. package/dashboard/dist/assets/{McpRunDetailPage-CIpZJWRB.js.map → McpRunDetailPage-B95c3bFw.js.map} +1 -1
  55. package/dashboard/dist/assets/McpRunsPage-DS43YmLU.js +2 -0
  56. package/dashboard/dist/assets/{McpRunsPage-B3zpzPBf.js.map → McpRunsPage-DS43YmLU.js.map} +1 -1
  57. package/dashboard/dist/assets/Modal-EUrK2c_A.js +2 -0
  58. package/dashboard/dist/assets/{Modal-DEODGeqx.js.map → Modal-EUrK2c_A.js.map} +1 -1
  59. package/dashboard/dist/assets/OperatorDashboard-DBF_AbRH.js +2 -0
  60. package/dashboard/dist/assets/{OperatorDashboard-l2hVlIF3.js.map → OperatorDashboard-DBF_AbRH.js.map} +1 -1
  61. package/dashboard/dist/assets/PageHeader-BuUnJ5NY.js +2 -0
  62. package/dashboard/dist/assets/{PageHeader-DLjHNYHX.js.map → PageHeader-BuUnJ5NY.js.map} +1 -1
  63. package/dashboard/dist/assets/PageHeaderWithStats-cQKaJBAM.js +2 -0
  64. package/dashboard/dist/assets/{PageHeaderWithStats-Oljg3n4j.js.map → PageHeaderWithStats-cQKaJBAM.js.map} +1 -1
  65. package/dashboard/dist/assets/PriorityBadge-Bl0_pgex.js +2 -0
  66. package/dashboard/dist/assets/{PriorityBadge-DfQY9St9.js.map → PriorityBadge-Bl0_pgex.js.map} +1 -1
  67. package/dashboard/dist/assets/ProcessDetailPage-DgeXrHon.js +2 -0
  68. package/dashboard/dist/assets/{ProcessDetailPage-BJ1rhK9_.js.map → ProcessDetailPage-DgeXrHon.js.map} +1 -1
  69. package/dashboard/dist/assets/ProcessesListPage-BGiiH4dW.js +2 -0
  70. package/dashboard/dist/assets/{ProcessesListPage-IQKk_qkn.js.map → ProcessesListPage-BGiiH4dW.js.map} +1 -1
  71. package/dashboard/dist/assets/RolePill-DsYF2JN9.js +2 -0
  72. package/dashboard/dist/assets/{RolePill-Bp10-WfX.js.map → RolePill-DsYF2JN9.js.map} +1 -1
  73. package/dashboard/dist/assets/RolesPage-CQ7vPamb.js +2 -0
  74. package/dashboard/dist/assets/{RolesPage-Dwcirtze.js.map → RolesPage-CQ7vPamb.js.map} +1 -1
  75. package/dashboard/dist/assets/RowActions-DBpvm3Jy.js +2 -0
  76. package/dashboard/dist/assets/{RowActions-Dg-Fsm5O.js.map → RowActions-DBpvm3Jy.js.map} +1 -1
  77. package/dashboard/dist/assets/RunAsSelector-ZLKGTYP_.js +2 -0
  78. package/dashboard/dist/assets/{RunAsSelector-D4Fu8LVG.js.map → RunAsSelector-ZLKGTYP_.js.map} +1 -1
  79. package/dashboard/dist/assets/ServerName-B5-E7gZD.js +2 -0
  80. package/dashboard/dist/assets/{ServerName-C9lUCFYb.js.map → ServerName-B5-E7gZD.js.map} +1 -1
  81. package/dashboard/dist/assets/StatCard-B7ySTryP.js +2 -0
  82. package/dashboard/dist/assets/{StatCard-DlgF0CJC.js.map → StatCard-B7ySTryP.js.map} +1 -1
  83. package/dashboard/dist/assets/StatusBadge-DNXTk01O.js +2 -0
  84. package/dashboard/dist/assets/{StatusBadge-XQlNFwmH.js.map → StatusBadge-DNXTk01O.js.map} +1 -1
  85. package/dashboard/dist/assets/StepIndicator-ftNmaJsu.js +2 -0
  86. package/dashboard/dist/assets/{StepIndicator-CuUIGxKk.js.map → StepIndicator-ftNmaJsu.js.map} +1 -1
  87. package/dashboard/dist/assets/StickyPagination-CI5AyVVd.js +2 -0
  88. package/dashboard/dist/assets/{StickyPagination-F9FZsRy9.js.map → StickyPagination-CI5AyVVd.js.map} +1 -1
  89. package/dashboard/dist/assets/SwimlaneTimeline-BA4aFrHf.js +2 -0
  90. package/dashboard/dist/assets/{SwimlaneTimeline-DQqgvwmC.js.map → SwimlaneTimeline-BA4aFrHf.js.map} +1 -1
  91. package/dashboard/dist/assets/TagInput-DfbVwc27.js +2 -0
  92. package/dashboard/dist/assets/{TagInput-Dkljw_WI.js.map → TagInput-DfbVwc27.js.map} +1 -1
  93. package/dashboard/dist/assets/TaskDetailPage-A_kHjYRn.js +2 -0
  94. package/dashboard/dist/assets/TaskDetailPage-A_kHjYRn.js.map +1 -0
  95. package/dashboard/dist/assets/TaskQueuePill-Dtsa8CPO.js +2 -0
  96. package/dashboard/dist/assets/{TaskQueuePill-DPwm25Cc.js.map → TaskQueuePill-Dtsa8CPO.js.map} +1 -1
  97. package/dashboard/dist/assets/TasksListPage-Cw46VTuA.js +2 -0
  98. package/dashboard/dist/assets/{TasksListPage-CnJdTsoX.js.map → TasksListPage-Cw46VTuA.js.map} +1 -1
  99. package/dashboard/dist/assets/TimeAgo-Cx1kK1id.js +2 -0
  100. package/dashboard/dist/assets/{TimeAgo-C3A1r1Cv.js.map → TimeAgo-Cx1kK1id.js.map} +1 -1
  101. package/dashboard/dist/assets/TimestampCell-VDp4nVn6.js +2 -0
  102. package/dashboard/dist/assets/{TimestampCell-DPfLR6bZ.js.map → TimestampCell-VDp4nVn6.js.map} +1 -1
  103. package/dashboard/dist/assets/ToolPill-BNaTJhu8.js +2 -0
  104. package/dashboard/dist/assets/{ToolPill-D_DIWFJ5.js.map → ToolPill-BNaTJhu8.js.map} +1 -1
  105. package/dashboard/dist/assets/ToolTestPanel-BickLBjP.js +2 -0
  106. package/dashboard/dist/assets/{ToolTestPanel-CwZ9zkD-.js.map → ToolTestPanel-BickLBjP.js.map} +1 -1
  107. package/dashboard/dist/assets/UserName-DCdb6xnk.js +2 -0
  108. package/dashboard/dist/assets/{UserName-ClO0a6Ar.js.map → UserName-DCdb6xnk.js.map} +1 -1
  109. package/dashboard/dist/assets/WorkflowExecutionPage-BZfxY1iB.js +2 -0
  110. package/dashboard/dist/assets/{WorkflowExecutionPage-B-2aHAHK.js.map → WorkflowExecutionPage-BZfxY1iB.js.map} +1 -1
  111. package/dashboard/dist/assets/WorkflowPill-BzhfqGa-.js +2 -0
  112. package/dashboard/dist/assets/{WorkflowPill-BbgVTGgI.js.map → WorkflowPill-BzhfqGa-.js.map} +1 -1
  113. package/dashboard/dist/assets/WorkflowsDashboard-B7M8kPoH.js +2 -0
  114. package/dashboard/dist/assets/{WorkflowsDashboard-NtiQKl_i.js.map → WorkflowsDashboard-B7M8kPoH.js.map} +1 -1
  115. package/dashboard/dist/assets/WorkflowsOverview-1V8vQ-mo.js +2 -0
  116. package/dashboard/dist/assets/{WorkflowsOverview-BQip_pvL.js.map → WorkflowsOverview-1V8vQ-mo.js.map} +1 -1
  117. package/dashboard/dist/assets/YamlWorkflowsPage-BteCRoV5.js +2 -0
  118. package/dashboard/dist/assets/YamlWorkflowsPage-BteCRoV5.js.map +1 -0
  119. package/dashboard/dist/assets/{agents-5APoyRH8.js → agents-SXs4tMLb.js} +2 -2
  120. package/dashboard/dist/assets/{agents-5APoyRH8.js.map → agents-SXs4tMLb.js.map} +1 -1
  121. package/dashboard/dist/assets/{bots-BoDH-pS7.js → bots-Ci5aCzDK.js} +2 -2
  122. package/dashboard/dist/assets/{bots-BoDH-pS7.js.map → bots-Ci5aCzDK.js.map} +1 -1
  123. package/dashboard/dist/assets/{controlplane-D4NhQux3.js → controlplane-BiPTCZeL.js} +2 -2
  124. package/dashboard/dist/assets/{controlplane-D4NhQux3.js.map → controlplane-BiPTCZeL.js.map} +1 -1
  125. package/dashboard/dist/assets/escalation-D-zr9D9G.js +2 -0
  126. package/dashboard/dist/assets/{escalation-BD2wtAt2.js.map → escalation-D-zr9D9G.js.map} +1 -1
  127. package/dashboard/dist/assets/escalation-columns-Bpp7Sdbd.js +2 -0
  128. package/dashboard/dist/assets/{escalation-columns-DjHcNgjo.js.map → escalation-columns-Bpp7Sdbd.js.map} +1 -1
  129. package/dashboard/dist/assets/helpers-CQZkvg6D.js +2 -0
  130. package/dashboard/dist/assets/{helpers-D1ZPA4kI.js.map → helpers-CQZkvg6D.js.map} +1 -1
  131. package/dashboard/dist/assets/index-Bp5f2OWJ.js +2 -0
  132. package/dashboard/dist/assets/{index-D9qswqDQ.js.map → index-Bp5f2OWJ.js.map} +1 -1
  133. package/dashboard/dist/assets/index-C7FUIcaY.js +2 -0
  134. package/dashboard/dist/assets/{index-_5qNyf9o.js.map → index-C7FUIcaY.js.map} +1 -1
  135. package/dashboard/dist/assets/index-COiEQlp9.js +2 -0
  136. package/dashboard/dist/assets/{index-jp94-YlF.js.map → index-COiEQlp9.js.map} +1 -1
  137. package/dashboard/dist/assets/index-CSsOukxa.js +2 -0
  138. package/dashboard/dist/assets/{index-_dKxJhey.js.map → index-CSsOukxa.js.map} +1 -1
  139. package/dashboard/dist/assets/index-DOE7HCzb.js +6 -0
  140. package/dashboard/dist/assets/{index-B6vQeWwf.js.map → index-DOE7HCzb.js.map} +1 -1
  141. package/dashboard/dist/assets/index-DV0_tQW3.js +2 -0
  142. package/dashboard/dist/assets/{index-Zn5XforP.js.map → index-DV0_tQW3.js.map} +1 -1
  143. package/dashboard/dist/assets/index-Da8R5Fn_.js +281 -0
  144. package/dashboard/dist/assets/index-Da8R5Fn_.js.map +1 -0
  145. package/dashboard/dist/assets/index-DtbAmRkr.js +15 -0
  146. package/dashboard/dist/assets/{index-qdYsS9h2.js.map → index-DtbAmRkr.js.map} +1 -1
  147. package/dashboard/dist/assets/index-DzL5pT70.js +5 -0
  148. package/dashboard/dist/assets/index-DzL5pT70.js.map +1 -0
  149. package/dashboard/dist/assets/index-OTsFiHXP.js +2 -0
  150. package/dashboard/dist/assets/index-OTsFiHXP.js.map +1 -0
  151. package/dashboard/dist/assets/index-hfravTJF.js +2 -0
  152. package/dashboard/dist/assets/{index-BgJR7kwH.js.map → index-hfravTJF.js.map} +1 -1
  153. package/dashboard/dist/assets/index-q4T_i7zT.js +2 -0
  154. package/dashboard/dist/assets/{index-DC7f6rWu.js.map → index-q4T_i7zT.js.map} +1 -1
  155. package/dashboard/dist/assets/{knowledge-DsAU_TGL.js → knowledge-D8osen1O.js} +2 -2
  156. package/dashboard/dist/assets/{knowledge-DsAU_TGL.js.map → knowledge-D8osen1O.js.map} +1 -1
  157. package/dashboard/dist/assets/{mcp-CA3OeIyH.js → mcp-CUFhWTyT.js} +2 -2
  158. package/dashboard/dist/assets/{mcp-CA3OeIyH.js.map → mcp-CUFhWTyT.js.map} +1 -1
  159. package/dashboard/dist/assets/{mcp-query-BgmTDc7h.js → mcp-query-n1t4sNm7.js} +2 -2
  160. package/dashboard/dist/assets/{mcp-query-BgmTDc7h.js.map → mcp-query-n1t4sNm7.js.map} +1 -1
  161. package/dashboard/dist/assets/{mcp-runs-C-FK2SyD.js → mcp-runs-BkRnXbcq.js} +2 -2
  162. package/dashboard/dist/assets/{mcp-runs-C-FK2SyD.js.map → mcp-runs-BkRnXbcq.js.map} +1 -1
  163. package/dashboard/dist/assets/namespaces-CacF05ft.js +2 -0
  164. package/dashboard/dist/assets/{namespaces-B8KNk0Jb.js.map → namespaces-CacF05ft.js.map} +1 -1
  165. package/dashboard/dist/assets/{roles-BAPy1LU_.js → roles-CjLCgM_6.js} +2 -2
  166. package/dashboard/dist/assets/{roles-BAPy1LU_.js.map → roles-CjLCgM_6.js.map} +1 -1
  167. package/dashboard/dist/assets/{tasks-BHlTusW0.js → tasks-BLCzIHol.js} +2 -2
  168. package/dashboard/dist/assets/{tasks-BHlTusW0.js.map → tasks-BLCzIHol.js.map} +1 -1
  169. package/dashboard/dist/assets/{useEventHooks-DBMdj9vw.js → useEventHooks-AwwZnweF.js} +2 -2
  170. package/dashboard/dist/assets/{useEventHooks-DBMdj9vw.js.map → useEventHooks-AwwZnweF.js.map} +1 -1
  171. package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js → useExpandedRows-Cg9iq6Vy.js} +2 -2
  172. package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js.map → useExpandedRows-Cg9iq6Vy.js.map} +1 -1
  173. package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js → useFilterParams-CGRYFw_A.js} +2 -2
  174. package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js.map → useFilterParams-CGRYFw_A.js.map} +1 -1
  175. package/dashboard/dist/assets/{useYamlActivityEvents-BH_ynR_L.js → useYamlActivityEvents-9Zs0PXY6.js} +2 -2
  176. package/dashboard/dist/assets/{useYamlActivityEvents-BH_ynR_L.js.map → useYamlActivityEvents-9Zs0PXY6.js.map} +1 -1
  177. package/dashboard/dist/assets/{users-C9K2cMyb.js → users-BtLRzvZE.js} +2 -2
  178. package/dashboard/dist/assets/{users-C9K2cMyb.js.map → users-BtLRzvZE.js.map} +1 -1
  179. package/dashboard/dist/assets/{vendor-icons-E6836lXZ.js → vendor-icons-1qQ3NKfa.js} +2 -2
  180. package/dashboard/dist/assets/{vendor-icons-E6836lXZ.js.map → vendor-icons-1qQ3NKfa.js.map} +1 -1
  181. package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
  182. package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
  183. package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +26 -0
  184. package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +1 -0
  185. package/dashboard/dist/assets/{workflows-B2rsLjoh.js → workflows-B9xdIsfM.js} +2 -2
  186. package/dashboard/dist/assets/{workflows-B2rsLjoh.js.map → workflows-B9xdIsfM.js.map} +1 -1
  187. package/dashboard/dist/assets/{yaml-workflows-BLiTvQM2.js → yaml-workflows-xOJxyEsQ.js} +2 -2
  188. package/dashboard/dist/assets/{yaml-workflows-BLiTvQM2.js.map → yaml-workflows-xOJxyEsQ.js.map} +1 -1
  189. package/dashboard/dist/index.html +4 -4
  190. package/package.json +2 -2
  191. package/dashboard/dist/assets/AdminDashboard-DThDjhN5.js +0 -2
  192. package/dashboard/dist/assets/AgentConfigPage-NgxblxBW.js +0 -13
  193. package/dashboard/dist/assets/AgentConfigPage-NgxblxBW.js.map +0 -1
  194. package/dashboard/dist/assets/AgentDetailPage-DMS46nYY.js +0 -4
  195. package/dashboard/dist/assets/AgentDetailPage-DMS46nYY.js.map +0 -1
  196. package/dashboard/dist/assets/AgentsPage-pKfjHe4u.js +0 -2
  197. package/dashboard/dist/assets/AvailableEscalationsPage-BFzHVnPh.js +0 -2
  198. package/dashboard/dist/assets/AvailableEscalationsPage-BFzHVnPh.js.map +0 -1
  199. package/dashboard/dist/assets/BotPicker-Zxf7Npew.js +0 -2
  200. package/dashboard/dist/assets/CapabilitiesPage-6zOJ12cB.js +0 -2
  201. package/dashboard/dist/assets/CollapsibleSection-DvBx4tmw.js +0 -2
  202. package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +0 -2
  203. package/dashboard/dist/assets/CopyableId-DmLF-RqZ.js +0 -2
  204. package/dashboard/dist/assets/CredentialsPage-C5f-Bg-o.js +0 -2
  205. package/dashboard/dist/assets/CronLabel-CAVTt5AG.js +0 -2
  206. package/dashboard/dist/assets/CustomDurationPicker-Bk7D38y7.js +0 -2
  207. package/dashboard/dist/assets/DataTable-D9yuBv0w.js +0 -2
  208. package/dashboard/dist/assets/DropZone-2mGyDo1P.js +0 -2
  209. package/dashboard/dist/assets/ElapsedCell-BpJjG1s-.js +0 -2
  210. package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
  211. package/dashboard/dist/assets/EscalationsOverview-DPNd1vjF.js +0 -2
  212. package/dashboard/dist/assets/EventTable-BoP8KC3M.js +0 -2
  213. package/dashboard/dist/assets/EventTopicPill-BUxxvpNg.js +0 -2
  214. package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +0 -2
  215. package/dashboard/dist/assets/HomePage-h8I5ZolJ.js +0 -2
  216. package/dashboard/dist/assets/ListToolbar-BaYIIsAt.js +0 -2
  217. package/dashboard/dist/assets/McpOverview-BhZ3lSO6.js +0 -2
  218. package/dashboard/dist/assets/McpQueryDetailPage-DVgcKa61.js +0 -5
  219. package/dashboard/dist/assets/McpQueryPage-CTWOBqKT.js +0 -2
  220. package/dashboard/dist/assets/McpRunDetailPage-CIpZJWRB.js +0 -2
  221. package/dashboard/dist/assets/McpRunsPage-B3zpzPBf.js +0 -2
  222. package/dashboard/dist/assets/Modal-DEODGeqx.js +0 -2
  223. package/dashboard/dist/assets/OperatorDashboard-l2hVlIF3.js +0 -2
  224. package/dashboard/dist/assets/PageHeader-DLjHNYHX.js +0 -2
  225. package/dashboard/dist/assets/PageHeaderWithStats-Oljg3n4j.js +0 -2
  226. package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +0 -2
  227. package/dashboard/dist/assets/ProcessDetailPage-BJ1rhK9_.js +0 -2
  228. package/dashboard/dist/assets/ProcessesListPage-IQKk_qkn.js +0 -2
  229. package/dashboard/dist/assets/RolePill-Bp10-WfX.js +0 -2
  230. package/dashboard/dist/assets/RolesPage-Dwcirtze.js +0 -2
  231. package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +0 -2
  232. package/dashboard/dist/assets/RunAsSelector-D4Fu8LVG.js +0 -2
  233. package/dashboard/dist/assets/ServerName-C9lUCFYb.js +0 -2
  234. package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
  235. package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +0 -2
  236. package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
  237. package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +0 -2
  238. package/dashboard/dist/assets/SwimlaneTimeline-DQqgvwmC.js +0 -2
  239. package/dashboard/dist/assets/TagInput-Dkljw_WI.js +0 -2
  240. package/dashboard/dist/assets/TaskDetailPage-AHBMSHAA.js +0 -2
  241. package/dashboard/dist/assets/TaskDetailPage-AHBMSHAA.js.map +0 -1
  242. package/dashboard/dist/assets/TaskQueuePill-DPwm25Cc.js +0 -2
  243. package/dashboard/dist/assets/TasksListPage-CnJdTsoX.js +0 -2
  244. package/dashboard/dist/assets/TimeAgo-C3A1r1Cv.js +0 -2
  245. package/dashboard/dist/assets/TimestampCell-DPfLR6bZ.js +0 -2
  246. package/dashboard/dist/assets/ToolPill-D_DIWFJ5.js +0 -2
  247. package/dashboard/dist/assets/ToolTestPanel-CwZ9zkD-.js +0 -2
  248. package/dashboard/dist/assets/UserName-ClO0a6Ar.js +0 -2
  249. package/dashboard/dist/assets/WorkflowExecutionPage-B-2aHAHK.js +0 -2
  250. package/dashboard/dist/assets/WorkflowPill-BbgVTGgI.js +0 -2
  251. package/dashboard/dist/assets/WorkflowsDashboard-NtiQKl_i.js +0 -2
  252. package/dashboard/dist/assets/WorkflowsOverview-BQip_pvL.js +0 -2
  253. package/dashboard/dist/assets/YamlWorkflowsPage-BWFCVQ8b.js +0 -2
  254. package/dashboard/dist/assets/YamlWorkflowsPage-BWFCVQ8b.js.map +0 -1
  255. package/dashboard/dist/assets/escalation-BD2wtAt2.js +0 -2
  256. package/dashboard/dist/assets/escalation-columns-DjHcNgjo.js +0 -2
  257. package/dashboard/dist/assets/helpers-D1ZPA4kI.js +0 -2
  258. package/dashboard/dist/assets/index-B-Z9TisY.js +0 -2
  259. package/dashboard/dist/assets/index-B-Z9TisY.js.map +0 -1
  260. package/dashboard/dist/assets/index-B6vQeWwf.js +0 -6
  261. package/dashboard/dist/assets/index-BD2vW8MG.js +0 -5
  262. package/dashboard/dist/assets/index-BD2vW8MG.js.map +0 -1
  263. package/dashboard/dist/assets/index-BgJR7kwH.js +0 -2
  264. package/dashboard/dist/assets/index-D9qswqDQ.js +0 -2
  265. package/dashboard/dist/assets/index-DC7f6rWu.js +0 -2
  266. package/dashboard/dist/assets/index-Zn5XforP.js +0 -2
  267. package/dashboard/dist/assets/index-_5qNyf9o.js +0 -2
  268. package/dashboard/dist/assets/index-_dKxJhey.js +0 -2
  269. package/dashboard/dist/assets/index-jp94-YlF.js +0 -2
  270. package/dashboard/dist/assets/index-oGYUhkFa.js +0 -63
  271. package/dashboard/dist/assets/index-oGYUhkFa.js.map +0 -1
  272. package/dashboard/dist/assets/index-qdYsS9h2.js +0 -15
  273. package/dashboard/dist/assets/namespaces-B8KNk0Jb.js +0 -2
  274. package/dashboard/dist/assets/settings-Da0QSQDH.js +0 -2
  275. package/dashboard/dist/assets/settings-Da0QSQDH.js.map +0 -1
  276. package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
  277. package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
  278. package/dashboard/dist/assets/vendor-react-CX88sFS5.js +0 -22
  279. package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +0 -1
@@ -1,2 +0,0 @@
1
- import{u as _,c as M,j as e,a as i,b as ae}from"./vendor-query-B2UbickB.js";import{f as ne,a as le}from"./vendor-react-CX88sFS5.js";import{P as ie}from"./PageHeader-DLjHNYHX.js";import{F as oe,a as ce}from"./FilterBar-Ck4K4rzu.js";import{L as xe}from"./ListToolbar-BaYIIsAt.js";import{E as de}from"./EmptyState-BcsfPq9T.js";import{D as ue}from"./DropZone-2mGyDo1P.js";import{b as v}from"./index-oGYUhkFa.js";import{F as pe,l as X,H as J,J as me,j as he,an as fe,ao as ge,ap as je,aq as be,ar as ye,X as Ne,as as ve,a0 as we,at as ke,m as Se,au as G,av as Ce,k as Fe}from"./vendor-icons-E6836lXZ.js";import{T as Q}from"./TimeAgo-C3A1r1Cv.js";function Te(t,a=100,n){const s=new URLSearchParams;t&&s.set("prefix",t),s.set("pageSize",String(a)),n&&s.set("continuationToken",n);const o=s.toString();return _({queryKey:["fileBrowse",t,a,n],queryFn:()=>v(`/file-browser/browse?${o}`)})}function $e(t){return _({queryKey:["fileMetadata",t],queryFn:()=>v(`/file-browser/metadata/${t}`),enabled:!!t})}function Pe(){return M({mutationFn:t=>v("/file-browser/signed-url",{method:"POST",body:JSON.stringify(t)})})}function Ue(){return M({mutationFn:t=>v(`/file-browser/delete/${t}`,{method:"DELETE"})})}function Ee(){return M({mutationFn:async({path:t,file:a})=>{const n=await a.arrayBuffer();return v(`/file-browser/upload?path=${encodeURIComponent(t)}`,{method:"POST",headers:{"Content-Type":"application/octet-stream"},body:n})}})}function De(t){return _({queryKey:["filePreviewUrl",t],queryFn:async()=>(await v("/file-browser/signed-url",{method:"POST",body:JSON.stringify({path:t,expiresIn:3600})})).url,enabled:!!t,staleTime:3e3*1e3})}function Le({prefix:t,onNavigate:a}){const n=t?t.replace(/\/+$/,"").split("/").filter(Boolean):[];return e.jsxs("nav",{className:"flex items-center gap-1 text-sm mb-6 min-h-[28px]",children:[e.jsxs("button",{onClick:()=>a(""),className:`flex items-center gap-1.5 px-1.5 py-0.5 rounded transition-colors ${n.length===0?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(pe,{className:"w-4 h-4 text-accent/75",strokeWidth:1.5}),e.jsx("span",{children:"Root"})]}),n.map((s,o)=>{const l=o===n.length-1,d=n.slice(0,o+1).join("/")+"/";return e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(X,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsx("button",{onClick:()=>a(d),className:`px-1.5 py-0.5 rounded transition-colors ${l?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary hover:bg-surface-hover"}`,children:s})]},d)})]})}function Be(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(1)} GB`}function S(t){return t.split("/").pop()||t}function I({label:t,value:a,mono:n,children:s}){return e.jsxs("div",{children:[e.jsx("dt",{className:"text-[10px] uppercase tracking-wider text-text-tertiary mb-0.5",children:t}),e.jsx("dd",{className:`text-sm text-text-secondary ${n?"font-mono text-xs break-all":""}`,children:s||a})]})}function Re({url:t}){const[a,n]=i.useState(null),[s,o]=i.useState(!1);return a===null&&!s&&fetch(t).then(l=>{if(!l.ok)throw new Error;return l.text()}).then(l=>n(l.slice(0,1e5))).catch(()=>o(!0)),s?e.jsx("p",{className:"text-xs text-text-tertiary",children:"Could not load preview"}):a===null?e.jsx("div",{className:"animate-pulse h-32 bg-surface-sunken rounded"}):e.jsx("pre",{className:"font-mono text-xs text-text-secondary bg-surface-sunken rounded-md p-3 overflow-x-auto max-h-[400px] overflow-y-auto whitespace-pre-wrap break-words",children:a})}function Ie({metadata:t}){const[a,n]=i.useState(null);async function s(o,l){await navigator.clipboard.writeText(o),n(l),setTimeout(()=>n(null),2e3)}return e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("dt",{className:"text-[10px] uppercase tracking-wider text-text-tertiary mb-0.5",children:"Path"}),e.jsxs("dd",{onClick:()=>s(t.path,"path"),className:"group flex items-center gap-1.5 text-xs font-mono text-text-secondary break-all cursor-pointer hover:text-text-primary transition-colors",title:"Click to copy",children:[e.jsx("span",{className:"flex-1",children:t.path}),a==="path"?e.jsx(J,{className:"w-3.5 h-3.5 text-status-success shrink-0"}):e.jsx(me,{className:"w-3.5 h-3.5 opacity-0 group-hover:opacity-100 text-text-tertiary shrink-0 transition-opacity"})]})]}),e.jsx(I,{label:"Type",value:t.content_type}),e.jsx(I,{label:"Size",value:Be(t.size)}),e.jsx(I,{label:"Modified",children:e.jsx(Q,{date:t.modified_at})})]})}async function _e(t,a){const s=await(await fetch(t)).blob(),o=URL.createObjectURL(s),l=document.createElement("a");l.href=o,l.download=a,l.style.display="none",document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o)}function Me(t){return t<1024?`${t} B`:t<1024*1024?`${(t/1024).toFixed(1)} KB`:t<1024*1024*1024?`${(t/(1024*1024)).toFixed(1)} MB`:`${(t/(1024*1024*1024)).toFixed(1)} GB`}function Oe(t){var n;const a=((n=t.split(".").pop())==null?void 0:n.toLowerCase())||"";return["png","jpg","jpeg","gif","svg","webp"].includes(a)?e.jsx(fe,{className:"w-4 h-4 text-accent/60",strokeWidth:1.5}):["json"].includes(a)?e.jsx(ge,{className:"w-4 h-4 text-accent/60",strokeWidth:1.5}):["csv","xlsx","xls"].includes(a)?e.jsx(je,{className:"w-4 h-4 text-accent/60",strokeWidth:1.5}):["txt","md","html","xml","yaml","yml","css","js","ts"].includes(a)?e.jsx(be,{className:"w-4 h-4 text-accent/60",strokeWidth:1.5}):e.jsx(ye,{className:"w-4 h-4 text-accent/60",strokeWidth:1.5})}function ze(t){var n;const a=((n=t.split(".").pop())==null?void 0:n.toLowerCase())||"";return["png","jpg","jpeg","gif","svg","webp"].includes(a)}function qe(t){const a=t.replace(/\/+$/,"");return a.split("/").pop()||a}function We(t){return t.split("/").pop()||t}function Ae({directories:t,files:a,onNavigate:n,onSelect:s,selectedFile:o}){return e.jsxs("table",{className:"w-full mt-2",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-[10px] uppercase tracking-wider text-text-tertiary",children:[e.jsx("th",{className:"pb-2 pl-2 font-medium",children:"Name"}),e.jsx("th",{className:"pb-2 font-medium w-24 text-right",children:"Size"}),e.jsx("th",{className:"pb-2 pr-2 font-medium w-40 text-right",children:"Modified"})]})}),e.jsxs("tbody",{children:[t.map(l=>e.jsxs("tr",{onClick:()=>n(l),className:"row-hover cursor-pointer group",children:[e.jsx("td",{className:"py-2 pl-2",children:e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(he,{className:"w-4 h-4 text-accent/75 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary group-hover:text-accent transition-colors",children:qe(l)})]})}),e.jsx("td",{className:"py-2 text-right text-xs text-text-tertiary",children:"—"}),e.jsx("td",{className:"py-2 pr-2 text-right text-xs text-text-tertiary",children:"—"})]},l)),a.map(l=>e.jsxs("tr",{onClick:()=>s(l.path),className:`row-hover cursor-pointer group ${o===l.path?"bg-surface-hover":""}`,children:[e.jsx("td",{className:"py-2 pl-2",children:e.jsxs("span",{className:"flex items-center gap-2.5",children:[Oe(l.path),e.jsx("span",{className:"text-sm text-text-primary truncate",children:We(l.path)})]})}),e.jsx("td",{className:"py-2 text-right text-xs text-text-secondary tabular-nums",children:Me(l.size)}),e.jsx("td",{className:"py-2 pr-2 text-right text-xs text-text-secondary",children:e.jsx(Q,{date:l.modified_at})})]},l.path))]})]})}const Ke=[{label:"1 hour",value:3600},{label:"6 hours",value:21600},{label:"24 hours",value:86400},{label:"7 days",value:604800},{label:"30 days",value:2592e3}];function He({filePath:t,onClose:a,onDeleted:n}){var j,k;const{data:s,isLoading:o}=$e(t),l=Pe(),d=Ue(),[w,f]=i.useState(!1),[b,C]=i.useState(!1),[y,h]=i.useState(!1),{data:u}=De(t),g=((j=s==null?void 0:s.content_type)==null?void 0:j.startsWith("image/"))||ze(t),F=/\.(ts|tsx|js|jsx|json|md|yaml|yml|toml|xml|csv|sql|sh|py|rb|go|rs|java|c|cpp|h|css|scss|html|txt|log|env|ini|cfg|conf)$/i,p=((k=s==null?void 0:s.content_type)==null?void 0:k.startsWith("text/"))||(s==null?void 0:s.content_type)==="application/json"||(s==null?void 0:s.content_type)==="application/xml"||(s==null?void 0:s.content_type)==="application/octet-stream"&&F.test(t),U=(s==null?void 0:s.content_type)==="application/pdf";async function E(){try{const c=await l.mutateAsync({path:t,expiresIn:3600}),x=c.url.startsWith("http")?c.url:`${window.location.origin}${c.url}`;_e(x,S(t))}catch{}}async function T(c){f(!1);try{const x=await l.mutateAsync({path:t,expiresIn:c}),N=x.url.startsWith("http")?x.url:`${window.location.origin}${x.url}`;await navigator.clipboard.writeText(N),C(!0),setTimeout(()=>C(!1),2e3)}catch{}}return e.jsx(e.Fragment,{children:e.jsxs("div",{className:"w-[380px] shrink-0 border-l border-surface-border bg-surface overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 bg-surface z-10 px-5 pt-5 pb-3 border-b border-surface-border",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsx("h3",{className:"text-sm font-medium text-text-primary truncate pr-2",title:S(t),children:S(t)}),e.jsx("button",{onClick:a,className:"text-text-tertiary hover:text-text-primary shrink-0",children:e.jsx(Ne,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-wrap",children:[e.jsxs("button",{onClick:E,className:"btn-ghost flex items-center gap-1.5 !px-2.5 !py-1.5 text-xs",title:"Download",children:[e.jsx(ve,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Download"})]}),e.jsxs("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"btn-ghost flex items-center gap-1.5 !px-2.5 !py-1.5 text-xs",title:"Open in new tab",children:[e.jsx(we,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Open"})]}),e.jsxs("div",{className:"relative",children:[e.jsxs("button",{onClick:()=>f(c=>!c),className:"btn-ghost flex items-center gap-1.5 !px-2.5 !py-1.5 text-xs",title:"Share with signed URL",children:[b?e.jsx(J,{className:"w-3.5 h-3.5 text-status-success"}):e.jsx(ke,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:b?"Copied":"Share"})]}),w&&e.jsx("div",{className:"absolute top-full left-0 mt-1 bg-surface-raised border border-surface-border rounded-md shadow-lg py-1 z-20 min-w-[120px]",children:Ke.map(c=>e.jsx("button",{onClick:()=>T(c.value),className:"w-full text-left px-3 py-1.5 text-xs text-text-secondary hover:bg-surface-hover hover:text-text-primary transition-colors",children:c.label},c.value))})]}),e.jsxs("button",{onClick:()=>h(!0),className:"btn-ghost flex items-center gap-1.5 !px-2.5 !py-1.5 text-xs text-status-error/70 hover:text-status-error",title:"Delete file",children:[e.jsx(Se,{className:"w-3.5 h-3.5"}),e.jsx("span",{children:"Delete"})]})]}),y&&e.jsxs("div",{className:"mt-3 p-3 bg-status-error/5 border border-status-error/20 rounded-md",children:[e.jsxs("p",{className:"text-xs text-text-primary mb-2",children:["Permanently delete ",e.jsx("span",{className:"font-medium",children:S(t)}),"? This cannot be undone."]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsx("button",{onClick:()=>h(!1),className:"btn-secondary text-xs",disabled:d.isPending,children:"Cancel"}),e.jsx("button",{onClick:async()=>{try{await d.mutateAsync(t),h(!1),n==null||n()}catch{}},className:"btn-primary text-xs !bg-status-error hover:!bg-status-error/90",disabled:d.isPending,children:d.isPending?"Deleting...":"Delete"})]}),d.isError&&e.jsx("p",{className:"text-xs text-status-error mt-2",children:d.error.message})]}),l.isError&&e.jsx("p",{className:"text-xs text-status-error mt-2",children:l.error.message})]}),e.jsx("div",{className:"p-5",children:o?e.jsxs("div",{className:"animate-pulse space-y-3",children:[e.jsx("div",{className:"h-48 bg-surface-sunken rounded"}),e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-2/3"})]}):e.jsxs(e.Fragment,{children:[g&&u&&e.jsx("div",{className:"mb-5 rounded-md border border-surface-border bg-surface-sunken overflow-hidden",style:{maxHeight:"400px"},children:e.jsx("img",{src:u,alt:S(t),className:"w-full object-cover object-top",style:{maxHeight:"400px"}})}),p&&u&&e.jsx("div",{className:"mb-5",children:e.jsx(Re,{url:u})}),U&&u&&e.jsx("div",{className:"mb-5 p-4 bg-surface-sunken rounded-md text-center",children:e.jsx("a",{href:u,target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:text-accent-hover text-sm font-medium",children:"Open PDF in new tab"})}),s&&e.jsx(Ie,{metadata:s})]})})]})})}const Ge=[25,50,100,200];function at(){const[t,a]=ne(),n=t.get("prefix")||"",[s,o]=i.useState(""),[l,d]=i.useState(""),[w,f]=i.useState(null),[b,C]=i.useState(100),[y,h]=i.useState([]),[u,g]=i.useState();i.useEffect(()=>{const r=setTimeout(()=>{d(s),g(void 0),h([])},300);return()=>clearTimeout(r)},[s]);const F=l?`${n}${l}`:n,{data:p,isLoading:U,isFetching:E,refetch:T}=Te(F,b,u),j=Ee(),k=ae(),c=i.useRef(null),[x,N]=i.useState(null),[$,O]=i.useState(""),z=i.useCallback(r=>{N(r),O(n)},[n]),[q,W]=i.useState(""),Z=i.useCallback(()=>{if(!x)return;W("");let r=x.length;for(const m of x){const K=`${$}${m.name}`;j.mutate({path:K,file:m},{onSuccess:()=>{r--,k.invalidateQueries({queryKey:["fileBrowse"]}),r<=0&&N(null)},onError:H=>{r--,W(H.message),console.error("[Upload] failed:",K,H)}})}},[x,$,j,k]),D=(p==null?void 0:p.directories)??[],P=(p==null?void 0:p.files)??[],L=p==null?void 0:p.nextToken,A=i.useCallback(r=>{o(""),d(""),f(null),g(void 0),h([]),a(r?{prefix:r}:{})},[a]);function V(){L&&(h(r=>[...r,u||""]),g(L))}function Y(){if(y.length===0)return;const r=[...y],m=r.pop();h(r),g(m||void 0)}function ee(r){C(r),g(void 0),h([])}const te=D.length===0&&P.length===0,se=y.length+1,B=!!L,R=y.length>0,re=`/file-browser/browse?prefix=${encodeURIComponent(F)}&pageSize=${b}${u?`&continuationToken=${encodeURIComponent(u)}`:""}`;return e.jsxs(ue,{onDrop:z,label:"Drop files to upload",children:[e.jsxs("div",{className:"flex gap-0",children:[e.jsx("input",{ref:c,type:"file",multiple:!0,className:"hidden",onChange:r=>{const m=Array.from(r.target.files||[]);m.length&&z(m),r.target.value=""}}),e.jsxs("div",{className:"flex-1 min-w-0 overflow-hidden",children:[e.jsx(ie,{title:"Files",docsHash:"#docs:dashboard.md:files",actions:e.jsxs("button",{onClick:()=>{var r;return(r=c.current)==null?void 0:r.click()},disabled:j.isPending,className:"btn-primary text-xs inline-flex items-center gap-1.5",children:[e.jsx(G,{className:"w-3.5 h-3.5"}),j.isPending?"Uploading...":"Upload"]})}),e.jsx(Le,{prefix:n,onNavigate:A}),e.jsx(oe,{actions:e.jsx(xe,{onRefresh:()=>T(),isFetching:E,apiPath:re}),children:e.jsx(ce,{label:"Search",value:s,onChange:o,placeholder:"Filter by prefix..."})}),U?e.jsx("div",{className:"animate-pulse space-y-2 mt-4",children:Array.from({length:6}).map((r,m)=>e.jsx("div",{className:"h-10 bg-surface-sunken rounded"},m))}):te?e.jsx("div",{className:"cursor-pointer",onClick:()=>{var r;return(r=c.current)==null?void 0:r.click()},children:e.jsx(de,{icon:Ce,title:s?"No matching files":"No files yet",description:s?void 0:"Drop files here or click to upload"})}):e.jsx(Ae,{directories:D,files:P,onNavigate:A,onSelect:f,selectedFile:w}),(R||B||P.length>0)&&e.jsxs("div",{className:"flex items-center justify-between pt-4 pb-2",children:[e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("p",{className:"text-xs text-text-tertiary",children:["Page ",se," · ",P.length+D.length," items"]}),e.jsx("select",{value:b,onChange:r=>ee(parseInt(r.target.value)),className:"select text-xs py-1",children:Ge.map(r=>e.jsxs("option",{value:r,children:[r," / page"]},r))})]}),(R||B)&&e.jsxs("div",{className:"flex items-center gap-1",children:[e.jsxs("button",{onClick:Y,disabled:!R,className:"btn-ghost text-xs disabled:opacity-30 disabled:cursor-not-allowed flex items-center gap-1",children:[e.jsx(Fe,{className:"w-3.5 h-3.5"}),"Previous"]}),e.jsxs("button",{onClick:V,disabled:!B,className:"btn-ghost text-xs disabled:opacity-30 disabled:cursor-not-allowed flex items-center gap-1",children:["Next",e.jsx(X,{className:"w-3.5 h-3.5"})]})]})]})]}),w&&e.jsx(He,{filePath:w,onClose:()=>f(null),onDeleted:()=>{f(null),T()}})]}),x&&le.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:()=>N(null)}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-4",children:e.jsxs("div",{className:"bg-surface-raised border border-surface-border rounded-lg shadow-lg w-full max-w-sm",children:[e.jsx("div",{className:"px-5 py-4 border-b border-surface-border",children:e.jsxs("h3",{className:"text-sm font-medium text-text-primary",children:["Upload ",x.length," file",x.length>1?"s":""]})}),e.jsxs("div",{className:"px-5 py-4 space-y-3",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Destination folder"}),e.jsx("input",{type:"text",value:$,onChange:r=>O(r.target.value),placeholder:"e.g., images/ or leave empty for root",className:"input text-xs w-full font-mono"})]}),e.jsx("div",{className:"text-[10px] text-text-quaternary space-y-0.5",children:x.map((r,m)=>e.jsxs("p",{className:"truncate",children:[$,r.name," ",e.jsxs("span",{className:"text-text-tertiary",children:["(",(r.size/1024).toFixed(1)," KB)"]})]},m))}),q&&e.jsx("p",{className:"text-xs text-status-error",children:q})]}),e.jsxs("div",{className:"flex justify-end gap-2 px-5 py-3 border-t border-surface-border",children:[e.jsx("button",{onClick:()=>N(null),className:"btn-ghost text-xs",children:"Cancel"}),e.jsxs("button",{onClick:Z,className:"btn-primary text-xs",children:[e.jsx(G,{className:"w-3.5 h-3.5 mr-1.5 inline"}),"Upload"]})]})]})})]}),document.body)]})}export{at as FilesPage};
2
- //# sourceMappingURL=index-DC7f6rWu.js.map
@@ -1,2 +0,0 @@
1
- import{a as n,j as t}from"./vendor-query-B2UbickB.js";import{h}from"./workflows-B2rsLjoh.js";import{D as g}from"./DataTable-D9yuBv0w.js";import{F as y,b as j}from"./FilterBar-Ck4K4rzu.js";import{R as q,a as u}from"./RowActions-Dg-Fsm5O.js";import{u as C}from"./useFilterParams-DZCAaBC7.js";import{P as R}from"./PageHeader-DLjHNYHX.js";import{T as b}from"./TaskQueuePill-DPwm25Cc.js";import{W as _}from"./WorkflowPill-BbgVTGgI.js";import{a6 as v,a8 as N,O as I}from"./vendor-icons-E6836lXZ.js";import{c as P}from"./vendor-react-CX88sFS5.js";import"./index-oGYUhkFa.js";import"./EmptyState-BcsfPq9T.js";function H(){const r=P(),{data:c,isLoading:m}=h(),{filters:s,setFilter:i}=C({filters:{search:"",queue:""}}),[a,p]=n.useState(s.search);n.useEffect(()=>{if(a===s.search)return;const e=setTimeout(()=>i("search",a),300);return()=>clearTimeout(e)},[a,i,s.search]);const o=c??[],d=n.useMemo(()=>[...new Set(o.map(e=>e.task_queue).filter(Boolean))].sort(),[o]),f=n.useMemo(()=>{let e=o;if(s.search){const l=s.search.toLowerCase();e=e.filter(w=>w.name.toLowerCase().includes(l))}return s.queue&&(e=e.filter(l=>l.task_queue===s.queue)),e},[o,s]),k=[{key:"name",label:"Workflow",render:e=>t.jsx(_,{type:e.name})},{key:"task_queue",label:"Queue",render:e=>t.jsx(b,{queue:e.task_queue}),className:"whitespace-nowrap"},{key:"registered",label:"Status",render:e=>e.registered?t.jsxs("span",{className:"inline-flex items-center gap-1 px-1.5 py-0.5 rounded text-[10px] font-medium bg-accent/10 text-accent",children:[t.jsx(v,{className:"w-3 h-3"}),"Certified"]}):t.jsx("span",{className:"inline-flex items-center px-1.5 py-0.5 rounded text-[10px] font-medium bg-surface-sunken text-text-tertiary",children:"Durable"}),className:"whitespace-nowrap"},{key:"actions",label:"",render:e=>t.jsx(q,{children:e.registered?t.jsx(u,{icon:N,title:"View config",onClick:()=>r(`/workflows/registry/${encodeURIComponent(e.name)}`)}):t.jsx(u,{icon:I,title:"Register workflow",onClick:()=>r(`/workflows/registry/new?workflow_type=${encodeURIComponent(e.name)}&task_queue=${encodeURIComponent(e.task_queue)}`)})}),className:"w-16 text-right"}],x=e=>{e.registered?r(`/workflows/registry/${encodeURIComponent(e.name)}`):r(`/workflows/registry/new?workflow_type=${encodeURIComponent(e.name)}&task_queue=${encodeURIComponent(e.task_queue)}`)};return t.jsxs("div",{children:[t.jsx(R,{title:"Workers",docsHash:"#docs:dashboard.md:task-queues"}),t.jsxs(y,{children:[t.jsx("input",{type:"text",placeholder:"Search workers...",value:a,onChange:e=>p(e.target.value),className:"input text-[11px] py-1 px-2 w-56"}),t.jsx(j,{label:"Queue",value:s.queue,onChange:e=>i("queue",e),options:d.map(e=>({value:e,label:e}))})]}),t.jsx(g,{columns:k,data:f,keyFn:e=>e.name,onRowClick:x,isLoading:m,emptyMessage:"No active workers"})]})}export{H as WorkersPage};
2
- //# sourceMappingURL=index-Zn5XforP.js.map
@@ -1,2 +0,0 @@
1
- import{a as i,j as e}from"./vendor-query-B2UbickB.js";import{P as oe}from"./PageHeader-DLjHNYHX.js";import{F as le,a as ce}from"./FilterBar-Ck4K4rzu.js";import{L as de}from"./ListToolbar-BaYIIsAt.js";import{S as xe}from"./StickyPagination-F9FZsRy9.js";import{E as Y}from"./EmptyState-BcsfPq9T.js";import{D as me}from"./DropZone-2mGyDo1P.js";import{T as _}from"./TimeAgo-C3A1r1Cv.js";import{u as ue,a as pe,b as ne,c as he,d as fe,e as ie,f as ge}from"./knowledge-DsAU_TGL.js";import{T as je}from"./TagInput-Dkljw_WI.js";import{m as ye,X as be,O as Z,d as X,l as ee,aw as te,ax as se}from"./vendor-icons-E6836lXZ.js";import{a as Ne,f as ve}from"./vendor-react-CX88sFS5.js";import"./index-oGYUhkFa.js";function we(a){return a==null?"":typeof a=="string"?a:JSON.stringify(a,null,2)}function ae(a){const r=a.trim();if(!r)return{value:"",looksLikeJson:!1,parsedOk:!1};const o=r.startsWith("{")||r.startsWith("[");try{return{value:JSON.parse(r),looksLikeJson:o,parsedOk:!0}}catch{return{value:r,looksLikeJson:o,parsedOk:!1}}}function re(a){if(typeof a=="string"){const r=a.trim();return!(r.startsWith("{")&&r.endsWith("}")||r.startsWith("[")&&r.endsWith("]"))}return typeof a=="number"||typeof a=="boolean"||a===null}function q({value:a,onChange:r,onKeyDown:o,placeholder:l,mono:d}){const x=i.useRef(null);return i.useEffect(()=>{x.current&&(x.current.style.height="auto",x.current.style.height=`${x.current.scrollHeight}px`,x.current.focus())},[a]),e.jsx("textarea",{ref:x,value:a,onChange:y=>r(y.target.value),onKeyDown:o,placeholder:l,rows:1,className:`w-full bg-transparent text-xs text-text-primary resize-none outline-none p-0 ${d?"font-mono":""}`,style:{minHeight:"1.5em"}})}function ke({domain:a,entryKey:r,onDeleted:o}){const{data:l,isLoading:d,refetch:x}=ue(a,r),y=pe(),m=ne(),F=he(),k=fe(),[S,O]=i.useState(!1),[u,f]=i.useState(null),[C,g]=i.useState(""),[j,E]=i.useState(""),[P,n]=i.useState(""),[A,J]=i.useState(null),[$,L]=i.useState(null),[K,b]=i.useState(!1),N=l==null?void 0:l.data,R=N?Object.entries(N):[],H=i.useMemo(()=>{const t=j.trim().toLowerCase();return t?R.filter(([h])=>h.toLowerCase().includes(t)):R},[R,j]),G=i.useCallback((t,h)=>h==="field"?t:we(N==null?void 0:N[t]),[N]),z=u?C!==G(u.field,u.column):!1;function M(t,h){f({field:t,column:h}),g(G(t,h)),J(null)}function T(){f(null),g("")}function s(){L("Invalid JSON — saved as text"),setTimeout(()=>L(null),4e3)}async function c(){if(!u||!N)return;const{field:t,column:h}=u;if(h==="value"){const{value:w,looksLikeJson:D,parsedOk:I}=ae(C);D&&!I&&s(),await F.mutateAsync({domain:a,key:r,path:t,value:w})}else{const w=C.trim();if(!w||w===t){T();return}const D=N[t];await k.mutateAsync({domain:a,key:r,path:t}),await F.mutateAsync({domain:a,key:r,path:w,value:D})}f(null),g(""),x()}async function v(t){await k.mutateAsync({domain:a,key:r,path:t}),J(null),f(null),x()}async function p(t){await m.mutateAsync({domain:a,key:r,data:N||{},tags:t,replace:!0}),x()}async function B(){const t=j.trim();if(!t)return;const{value:h,looksLikeJson:w,parsedOk:D}=ae(P);w&&!D&&s();const I={...N,[t]:h||""};await m.mutateAsync({domain:a,key:r,data:I}),E(""),n(""),x()}function U(t){t.key==="Escape"?T():t.key==="Enter"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),c())}function Q(t){t.key==="Escape"?(E(""),n("")):t.key==="Enter"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),B())}return d?e.jsxs("div",{className:"animate-pulse space-y-3 mt-4",children:[e.jsx("div",{className:"h-4 bg-surface-sunken rounded w-1/3"}),e.jsx("div",{className:"h-48 bg-surface-sunken rounded"})]}):!l||l.found===!1?e.jsx("p",{className:"text-sm text-text-tertiary mt-4",children:"Entry not found."}):e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-4",children:[e.jsx("div",{className:"flex items-center gap-4 min-h-[28px]",children:K?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(je,{tags:l.tags||[],onChange:t=>{p(t)},placeholder:"Add tag...",compact:!0}),e.jsx("button",{onClick:()=>b(!1),className:"text-[10px] text-text-tertiary hover:text-text-secondary shrink-0",children:"Done"})]}):e.jsx("div",{className:"flex items-center gap-1 cursor-text group",onClick:()=>b(!0),title:"Click to edit tags",children:l.tags&&l.tags.length>0?l.tags.map(t=>e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded-full text-[10px] font-medium bg-accent/10 text-accent",children:t},t)):e.jsx("span",{className:"text-[10px] text-text-tertiary/40 italic group-hover:text-text-tertiary",children:"add tags..."})})}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[10px] text-text-tertiary",children:e.jsx(_,{date:l.updated_at})}),S?e.jsxs("span",{className:"flex items-center gap-2 text-[10px]",children:[e.jsx("span",{className:"text-status-error",children:"Delete entry?"}),e.jsx("button",{onClick:async()=>{try{await y.mutateAsync({domain:a,key:r}),o()}catch{}},className:"font-medium text-status-error hover:text-status-error/80",disabled:y.isPending,children:y.isPending?"Deleting...":"Yes"}),e.jsx("button",{onClick:()=>O(!1),className:"text-text-tertiary hover:text-text-secondary",children:"No"})]}):e.jsx("button",{onClick:()=>O(!0),className:"text-text-tertiary/50 hover:text-status-error transition-colors",title:"Delete entry",children:e.jsx(ye,{className:"w-3.5 h-3.5"})})]})]}),$&&e.jsxs("div",{className:"flex items-center justify-end gap-2 mb-2 px-1",children:[e.jsx("span",{className:"inline-block w-1.5 h-1.5 rounded-full bg-status-warning animate-pulse"}),e.jsx("span",{className:"text-xs text-status-warning",children:$})]}),e.jsxs("table",{className:"w-full border-collapse",children:[e.jsxs("thead",{className:"sticky top-0 z-10 bg-surface",children:[e.jsxs("tr",{className:"text-left text-[10px] uppercase tracking-wider text-text-tertiary border-b border-surface-border",children:[e.jsx("th",{className:"px-3 py-2 font-medium w-[200px] border-r border-surface-border",children:"Field"}),e.jsx("th",{className:"px-3 py-2 font-medium",children:"Value"})]}),e.jsxs("tr",{className:"border-b border-surface-border bg-surface",children:[e.jsx("td",{className:"px-3 py-2 align-top border-r border-surface-border",children:e.jsx("input",{value:j,onChange:t=>E(t.target.value),onKeyDown:Q,placeholder:R.length?"add or filter...":"new field",className:"w-full bg-transparent text-xs text-text-primary placeholder:text-text-tertiary/40 placeholder:italic outline-none p-0"})}),e.jsxs("td",{className:"px-3 py-2 align-top",children:[e.jsx(q,{value:P,onChange:n,onKeyDown:Q,placeholder:"value"}),j.trim()&&e.jsxs("div",{className:"flex gap-2 mt-1.5",children:[e.jsx("button",{onClick:B,className:"text-[10px] font-medium text-accent hover:text-accent-hover",disabled:m.isPending,children:m.isPending?"Saving...":"Save"}),e.jsx("button",{onClick:()=>{E(""),n("")},className:"text-[10px] text-text-tertiary hover:text-text-secondary",children:"Cancel"})]})]})]})]}),e.jsx("tbody",{children:H.map(([t,h])=>{const w=(u==null?void 0:u.field)===t&&u.column==="field",D=(u==null?void 0:u.field)===t&&u.column==="value",I=w||D,W=A===t;return e.jsxs("tr",{className:`border-b border-surface-border ${W?"bg-status-error/10":I?"":"hover:bg-surface-hover/30"}`,children:[e.jsx("td",{className:`px-3 py-2 align-top border-r cursor-text ${W?"bg-transparent border-r-transparent":w?"border-r-surface-border bg-accent/5 border-l-2 border-l-accent":"border-r-surface-border"}`,onClick:()=>!w&&!W&&M(t,"field"),children:w?e.jsxs("div",{children:[e.jsx(q,{value:C,onChange:g,onKeyDown:U,placeholder:"field name"}),z&&e.jsxs("div",{className:"flex gap-2 mt-1.5",children:[e.jsx("button",{onClick:c,className:"text-[10px] font-medium text-accent hover:text-accent-hover",disabled:m.isPending,children:m.isPending?"Saving...":"Save"}),e.jsx("button",{onClick:T,className:"text-[10px] text-text-tertiary hover:text-text-secondary",children:"Cancel"})]})]}):e.jsx("span",{className:"text-xs font-medium text-text-secondary break-all",children:t})}),e.jsx("td",{className:`px-3 py-2 align-top cursor-text ${W?"bg-transparent":D?"bg-accent/5 border-l-2 border-l-accent":""}`,onClick:()=>!D&&!W&&M(t,"value"),children:W?e.jsxs("span",{className:"flex items-center justify-end gap-2 text-[10px]",children:[e.jsxs("span",{className:"text-status-error",children:["Remove ",e.jsx("span",{className:"font-medium",children:t}),"?"]}),e.jsx("button",{onClick:V=>{V.stopPropagation(),v(t)},className:"font-medium text-status-error hover:text-status-error/80",disabled:m.isPending,children:m.isPending?"...":"Yes"}),e.jsx("button",{onClick:V=>{V.stopPropagation(),J(null)},className:"text-text-tertiary hover:text-text-secondary",children:"No"})]}):D?e.jsxs("div",{children:[e.jsx(q,{value:C,onChange:g,onKeyDown:U,placeholder:"value (string or JSON)",mono:!re(h)}),e.jsxs("div",{className:"flex gap-2 mt-1.5",children:[z&&e.jsx("button",{onClick:c,className:"text-[10px] font-medium text-accent hover:text-accent-hover",disabled:m.isPending,children:m.isPending?"Saving...":"Save"}),e.jsx("button",{onClick:T,className:"text-[10px] text-text-tertiary hover:text-text-secondary",children:"Cancel"}),e.jsx("button",{onClick:V=>{V.stopPropagation(),J(t)},className:"text-[10px] text-status-error/50 hover:text-status-error ml-auto",children:"Remove"})]})]}):re(h)?e.jsx("p",{className:"text-xs text-text-primary break-words whitespace-pre-wrap",children:String(h)}):e.jsx("pre",{className:"text-xs text-text-primary font-mono whitespace-pre-wrap break-words",children:typeof h=="string"?h:JSON.stringify(h,null,2)})})]},t)})})]})]})}function Se({open:a,onClose:r,onCreated:o,prefillData:l,prefillDomain:d}){const{data:x}=ie(),y=ne(),[m,F]=i.useState(d||""),[k,S]=i.useState(""),[O,u]=i.useState(l?JSON.stringify(l,null,2):"{}"),[f,C]=i.useState(""),[g,j]=i.useState(""),E=((x==null?void 0:x.domains)??[]).map(n=>n.domain);if(i.useEffect(()=>{a&&(u(l?JSON.stringify(l,null,2):"{}"),F(d||""),S(""),C(""),j(""))},[a,l,d]),!a)return null;const P=async()=>{if(j(""),!m.trim()){j("Domain is required");return}if(!k.trim()){j("Key is required");return}let n;try{if(n=JSON.parse(O),typeof n!="object"||Array.isArray(n))throw new Error}catch{j("Data must be a valid JSON object");return}try{await y.mutateAsync({domain:m.trim(),key:k.trim(),data:n,tags:f?f.split(",").map(A=>A.trim()).filter(Boolean):[]}),o==null||o(m.trim(),k.trim()),r()}catch(A){j(A.message)}};return Ne.createPortal(e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"fixed inset-0 z-40 bg-black/30",onClick:r}),e.jsx("div",{className:"fixed inset-0 z-50 flex items-center justify-center p-6 overflow-y-auto",children:e.jsxs("div",{className:"bg-surface-raised border border-surface-border rounded-lg shadow-lg w-full max-w-md max-h-[85vh] flex flex-col",children:[e.jsxs("div",{className:"flex items-center justify-between px-5 py-4 border-b border-surface-border",children:[e.jsx("h3",{className:"text-sm font-medium text-text-primary",children:"New Knowledge Entry"}),e.jsx("button",{onClick:r,className:"text-text-tertiary hover:text-text-primary",children:e.jsx(be,{className:"w-4 h-4"})})]}),e.jsxs("div",{className:"px-5 py-4 space-y-4 overflow-y-auto flex-1 min-h-0",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Domain"}),e.jsx("input",{type:"text",list:"domain-list",value:m,onChange:n=>F(n.target.value),placeholder:"e.g., screenshots, config, emails",className:"input text-xs w-full"}),e.jsx("datalist",{id:"domain-list",children:E.map(n=>e.jsx("option",{value:n},n))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Key"}),e.jsx("input",{type:"text",value:k,onChange:n=>S(n.target.value),placeholder:"e.g., homepage, user-profile, report-2026",className:"input text-xs w-full"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Data (JSON)"}),e.jsx("textarea",{value:O,onChange:n=>u(n.target.value),rows:8,className:"input-json w-full max-h-[30vh]"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:"Tags (comma-separated)"}),e.jsx("input",{type:"text",value:f,onChange:n=>C(n.target.value),placeholder:"e.g., important, review, 401k",className:"input text-xs w-full"})]}),g&&e.jsx("p",{className:"text-xs text-status-error",children:g})]}),e.jsxs("div",{className:"flex justify-end gap-2 px-5 py-3 border-t border-surface-border",children:[e.jsx("button",{onClick:r,className:"btn-ghost text-xs",children:"Cancel"}),e.jsx("button",{onClick:P,disabled:y.isPending,className:"btn-primary text-xs",children:y.isPending?"Creating...":"Create Entry"})]})]})})]}),document.body)}const Ce=50;function ze(){var z,M,T;const[a,r]=ve(),o=a.get("domain")||"",l=a.get("key")||"",[d,x]=i.useState(""),[y,m]=i.useState(""),[F,k]=i.useState(1),[S,O]=i.useState(Ce),[u,f]=i.useState(!1),[C,g]=i.useState(),j=i.useCallback(s=>{console.debug("[Knowledge] drop received:",s.map(p=>({name:p.name,type:p.type,size:p.size})));const c=s.find(p=>p.name.endsWith(".json")||p.type==="application/json");if(!c){console.warn("[Knowledge] no JSON file found in dropped files");return}console.debug("[Knowledge] reading:",c.name);const v=new FileReader;v.onload=()=>{try{const p=JSON.parse(v.result);typeof p=="object"&&!Array.isArray(p)?(console.debug("[Knowledge] parsed object with keys:",Object.keys(p)),g(p),f(!0)):console.warn("[Knowledge] JSON is not a plain object, got:",Array.isArray(p)?"array":typeof p)}catch(p){console.warn("[Knowledge] JSON parse failed:",p)}},v.readAsText(c)},[]);i.useEffect(()=>{const s=setTimeout(()=>{m(d),k(1)},300);return()=>clearTimeout(s)},[d]);const E=(F-1)*S,P=ie(),n=ge(o,{search:y||void 0,limit:S,offset:E}),A=((z=P.data)==null?void 0:z.domains)??[],J=((M=n.data)==null?void 0:M.entries)??[],$=((T=n.data)==null?void 0:T.total)??0,L=i.useMemo(()=>{if(!d)return A;const s=d.toLowerCase();return A.filter(c=>c.domain.toLowerCase().includes(s))},[A,d]);function K(s,c){x(""),m(""),k(1);const v={};s&&(v.domain=s),c&&(v.key=c),r(v)}const b=l?"entry":o?"entries":"domains",N=b==="entries"?n.isLoading:b==="domains"?P.isLoading:!1,R=Math.ceil((b==="entries"?$:L.length)/S),H=o?`/knowledge/entries?domain=${encodeURIComponent(o)}&limit=${S}&offset=${E}${y?`&search=${encodeURIComponent(y)}`:""}`:void 0;return e.jsxs(me,{onDrop:j,label:"Drop a JSON file to create an entry",accept:".json,application/json",children:[e.jsxs("div",{children:[e.jsx(oe,{title:"Knowledge",docsHash:"#docs:dashboard.md:knowledge",actions:e.jsxs("button",{onClick:()=>{g(void 0),f(!0)},className:"btn-primary text-xs inline-flex items-center gap-1.5",children:[e.jsx(Z,{className:"w-3.5 h-3.5"}),"New Entry"]})}),e.jsxs("nav",{className:"flex items-center gap-1 text-sm mb-6 min-h-[28px]",children:[e.jsxs("button",{onClick:()=>K(""),className:`flex items-center gap-1.5 px-1.5 py-0.5 rounded transition-colors ${b==="domains"?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(X,{className:"w-4 h-4 text-accent/75",strokeWidth:1.5}),e.jsx("span",{children:"All Domains"})]}),o&&e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsxs("button",{onClick:()=>K(o),className:`flex items-center gap-1.5 px-1.5 py-0.5 rounded transition-colors ${b==="entries"?"text-text-primary font-medium":"text-text-secondary hover:text-text-primary hover:bg-surface-hover"}`,children:[e.jsx(te,{className:"w-3.5 h-3.5 text-accent/60",strokeWidth:1.5}),o]})]}),l&&e.jsxs(e.Fragment,{children:[e.jsx(ee,{className:"w-3.5 h-3.5 text-text-tertiary"}),e.jsxs("span",{className:"flex items-center gap-1.5 px-1.5 py-0.5 text-text-primary font-medium",children:[e.jsx(se,{className:"w-3.5 h-3.5 text-accent/60",strokeWidth:1.5}),l]})]})]}),b==="entry"?e.jsx(ke,{domain:o,entryKey:l,onDeleted:()=>K(o)}):e.jsxs(e.Fragment,{children:[e.jsx(le,{actions:e.jsx(de,{onRefresh:()=>b==="entries"?n.refetch():P.refetch(),isFetching:b==="entries"?n.isFetching:P.isFetching,apiPath:b==="entries"?H:"/knowledge/domains"}),children:e.jsx(ce,{label:"Search",value:d,onChange:x,placeholder:o?"Filter by key or tag...":"Filter by domain..."})}),N?e.jsx("div",{className:"animate-pulse space-y-2 mt-4",children:Array.from({length:6}).map((s,c)=>e.jsx("div",{className:"h-10 bg-surface-sunken rounded"},c))}):b==="domains"?L.length===0?e.jsx("div",{className:"cursor-pointer",onClick:()=>{g(void 0),f(!0)},children:e.jsx(Y,{icon:X,title:d?"No matching domains":"No knowledge yet",description:d?void 0:"Create your first entry or drop a JSON file"})}):e.jsxs("table",{className:"w-full mt-2",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-[10px] uppercase tracking-wider text-text-tertiary",children:[e.jsx("th",{className:"pb-2 pl-2 font-medium",children:"Domain"}),e.jsx("th",{className:"pb-2 font-medium w-24 text-right",children:"Entries"}),e.jsx("th",{className:"pb-2 pr-2 font-medium w-40 text-right",children:"Latest"})]})}),e.jsx("tbody",{children:L.map(s=>e.jsxs("tr",{onClick:()=>K(s.domain),className:"row-hover cursor-pointer group",children:[e.jsx("td",{className:"py-2 pl-2",children:e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(te,{className:"w-4 h-4 text-accent/75 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary group-hover:text-accent transition-colors",children:s.domain})]})}),e.jsx("td",{className:"py-2 text-right text-xs text-text-secondary tabular-nums",children:s.count}),e.jsx("td",{className:"py-2 pr-2 text-right text-xs text-text-secondary",children:e.jsx(_,{date:s.latest})})]},s.domain))})]}):J.length===0?e.jsx("div",{className:"cursor-pointer",onClick:()=>{g(void 0),f(!0)},children:e.jsx(Y,{icon:Z,title:d?"No matching entries":"No entries in this domain",description:d?void 0:"Add an entry or drop a JSON file"})}):e.jsxs(e.Fragment,{children:[e.jsxs("table",{className:"w-full mt-2",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"text-left text-[10px] uppercase tracking-wider text-text-tertiary",children:[e.jsx("th",{className:"pb-2 pl-2 font-medium w-[200px]",children:"Key"}),e.jsx("th",{className:"pb-2 font-medium",children:"Tags"}),e.jsx("th",{className:"pb-2 font-medium w-16 text-right",children:"Fields"}),e.jsx("th",{className:"pb-2 pr-2 font-medium w-32 text-right",children:"Updated"})]})}),e.jsx("tbody",{children:J.map(s=>{var c;return e.jsxs("tr",{onClick:()=>K(o,s.key),className:"row-hover cursor-pointer group",children:[e.jsx("td",{className:"py-2 pl-2 w-[200px]",children:e.jsxs("span",{className:"flex items-center gap-2.5",children:[e.jsx(se,{className:"w-4 h-4 text-accent/75 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-sm text-text-primary group-hover:text-accent transition-colors truncate max-w-[160px]",title:s.key,children:s.key})]})}),e.jsx("td",{className:"py-2",children:e.jsxs("div",{className:"flex flex-wrap gap-1",children:[(c=s.tags)==null?void 0:c.slice(0,5).map(v=>e.jsx("span",{className:"inline-flex items-center px-1.5 py-0 rounded-full text-[10px] font-medium bg-accent/10 text-accent",children:v},v)),s.tags&&s.tags.length>5&&e.jsxs("span",{className:"text-[10px] text-text-tertiary",children:["+",s.tags.length-5]})]})}),e.jsx("td",{className:"py-2 text-right text-xs text-text-secondary tabular-nums",children:s.data?Object.keys(s.data).length:0}),e.jsx("td",{className:"py-2 pr-2 text-right text-xs text-text-secondary",children:e.jsx(_,{date:s.updated_at})})]},s.key)})})]}),e.jsx(xe,{page:F,totalPages:R,onPageChange:k,total:$,pageSize:S,onPageSizeChange:O})]})]})]}),e.jsx(Se,{open:u,onClose:()=>{f(!1),g(void 0)},onCreated:(s,c)=>{r({domain:s,key:c}),P.refetch()},prefillData:C,prefillDomain:o||void 0})]})}export{ze as KnowledgePage};
2
- //# sourceMappingURL=index-_5qNyf9o.js.map
@@ -1,2 +0,0 @@
1
- import{c as k,u as R,b as J,j as e,a as o}from"./vendor-query-B2UbickB.js";import{P as O}from"./PageHeader-DLjHNYHX.js";import{b as g}from"./index-oGYUhkFa.js";import{M as A}from"./Modal-DEODGeqx.js";import{R as F,C as w}from"./constants-BHkpVaqx.js";import{ah as b,m as M,a1 as D}from"./vendor-icons-E6836lXZ.js";import"./vendor-react-CX88sFS5.js";function I(){return R({queryKey:["maintenance"],queryFn:()=>g("/config/maintenance")})}function _(){const t=J();return k({mutationFn:r=>g("/config/maintenance",{method:"PUT",body:JSON.stringify(r)}),onSuccess:()=>{t.invalidateQueries({queryKey:["maintenance"]})}})}function q(){return k({mutationFn:t=>g("/dba/prune",{method:"POST",body:JSON.stringify(t)})})}function h({checked:t,onToggle:r,label:n,hint:s,value:l,onChange:c}){return e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsxs("label",{className:"flex items-center gap-2.5 cursor-pointer w-64 shrink-0",children:[e.jsx("input",{type:"checkbox",checked:t,onChange:i=>r(i.target.checked),className:"w-4 h-4 rounded border-border accent-accent shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-text-primary",children:n}),e.jsx("p",{className:"text-[10px] text-text-tertiary",children:s})]})]}),e.jsx("select",{value:l,onChange:i=>c(i.target.value),disabled:!t,className:`select text-xs w-36 transition-opacity ${t?"":"opacity-40 cursor-not-allowed"}`,children:F.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))})]})}function f({checked:t,onChange:r,label:n,description:s}){return e.jsxs("label",{className:"flex items-start gap-2.5 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:t,onChange:l=>r(l.target.checked),className:"w-4 h-4 mt-0.5 rounded border-border accent-accent shrink-0"}),e.jsxs("div",{children:[e.jsx("span",{className:"text-xs text-text-primary",children:n}),e.jsx("p",{className:"text-[10px] text-text-tertiary",children:s})]})]})}function U(){return e.jsxs("div",{className:"flex items-start gap-2 mt-2 px-3 py-2 rounded bg-surface-sunken",children:[e.jsx(b,{className:"w-3.5 h-3.5 text-text-tertiary shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[10px] text-text-tertiary leading-relaxed",children:"Stripping preserves workflow results and timeline data needed for the execution detail view. Transient jobs are internal bookkeeping that accumulates over time."})]})}const j={pruneJobs:!0,expire:"30 days",engineStreams:!0,engineStreamsExpire:"1 day",workerStreams:!0,workerStreamsExpire:"90 days",stripAttributes:!1,pruneTransient:!1};function S(t){return t.pruneJobs||t.engineStreams||t.workerStreams||t.stripAttributes||t.pruneTransient}function C({fields:t,onChange:r}){const n=(s,l)=>r({...t,[s]:l});return e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-10",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-4",children:"Delete Expired Data"}),e.jsxs("div",{className:"space-y-3",children:[e.jsx(h,{checked:t.pruneJobs,onToggle:s=>n("pruneJobs",s),label:"Jobs",hint:"Hard-delete completed job rows",value:t.expire,onChange:s=>n("expire",s)}),e.jsx(h,{checked:t.engineStreams,onToggle:s=>n("engineStreams",s),label:"Engine streams",hint:"Internal routing (prune aggressively)",value:t.engineStreamsExpire,onChange:s=>n("engineStreamsExpire",s)}),e.jsx(h,{checked:t.workerStreams,onToggle:s=>n("workerStreams",s),label:"Worker streams",hint:"Activity payloads for execution playback",value:t.workerStreamsExpire,onChange:s=>n("workerStreamsExpire",s)})]})]}),e.jsxs("div",{className:"lg:w-72",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-4",children:"Cleanup"}),e.jsxs("div",{className:"space-y-4",children:[e.jsx(f,{checked:t.stripAttributes,onChange:s=>n("stripAttributes",s),label:"Strip execution artifacts",description:"Remove step-level detail from completed jobs. Return data and export history are preserved."}),e.jsx(f,{checked:t.pruneTransient,onChange:s=>n("pruneTransient",s),label:"Delete transient jobs",description:"Orphaned jobs without an entity type. Usually safe to remove."}),e.jsx(U,{})]})]})]})}function u({label:t,value:r}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-lg font-light text-text-primary",children:r.toLocaleString()}),e.jsx("p",{className:"text-[10px] text-text-tertiary",children:t})]})}function W(){const t=q(),[r,n]=o.useState(j),[s,l]=o.useState(null),[c,i]=o.useState(!1),a=()=>{l(null),t.mutate({expire:r.expire,jobs:r.pruneJobs,engineStreams:r.engineStreams,engineStreamsExpire:r.engineStreamsExpire,workerStreams:r.workerStreams,workerStreamsExpire:r.workerStreamsExpire,attributes:r.stripAttributes,pruneTransient:r.pruneTransient},{onSuccess:x=>{l(x),i(!1)}})};return e.jsxs("div",{className:"space-y-8",children:[e.jsx(C,{fields:r,onChange:n}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-surface-border",children:[e.jsx("p",{className:"text-[10px] text-text-tertiary",children:S(r)?"This action permanently deletes data and cannot be undone.":"Select at least one operation to enable pruning."}),e.jsx("button",{onClick:()=>i(!0),disabled:!S(r)||t.isPending,className:"bg-status-error text-white px-4 py-1.5 rounded-md text-xs hover:opacity-90 transition-opacity disabled:opacity-40 shrink-0",children:t.isPending?"Pruning...":"Prune Now"})]}),s&&e.jsxs("div",{className:"bg-surface-sunken rounded-md px-4 py-3",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-2",children:"Results"}),e.jsxs("div",{className:"flex flex-wrap gap-6",children:[s.jobs!=null&&s.jobs>0&&e.jsx(u,{label:"Jobs deleted",value:s.jobs}),s.engineStreams!=null&&s.engineStreams>0&&e.jsx(u,{label:"Engine streams",value:s.engineStreams}),s.workerStreams!=null&&s.workerStreams>0&&e.jsx(u,{label:"Worker streams",value:s.workerStreams}),s.streams!=null&&s.engineStreams==null&&s.streams>0&&e.jsx(u,{label:"Streams",value:s.streams}),s.attributes!=null&&s.attributes>0&&e.jsx(u,{label:"Artifacts stripped",value:s.attributes}),s.transient!=null&&s.transient>0&&e.jsx(u,{label:"Transient deleted",value:s.transient}),s.marked!=null&&s.marked>0&&e.jsx(u,{label:"Marked pruned",value:s.marked}),Object.values(s).every(x=>!x||x===0)&&e.jsx("p",{className:"text-xs text-text-tertiary",children:"Nothing to prune within the selected retention windows."})]})]}),t.error&&e.jsx("p",{className:"text-xs text-status-error",children:t.error.message}),e.jsx(A,{open:c,onClose:()=>i(!1),title:"Confirm Prune",children:e.jsxs("div",{className:"space-y-4",children:[e.jsx("p",{className:"text-sm text-text-secondary",children:"This will permanently delete data. This action cannot be undone."}),e.jsxs("ul",{className:"text-xs text-text-secondary space-y-1 list-disc list-inside",children:[r.pruneJobs&&e.jsxs("li",{children:["Delete jobs older than ",r.expire]}),r.engineStreams&&e.jsxs("li",{children:["Delete engine streams older than ",r.engineStreamsExpire]}),r.workerStreams&&e.jsxs("li",{children:["Delete worker streams older than ",r.workerStreamsExpire]}),r.stripAttributes&&e.jsx("li",{children:"Strip execution artifacts from completed jobs"}),r.pruneTransient&&e.jsx("li",{children:"Delete transient (entity-less) jobs"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:()=>i(!1),className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:a,className:"bg-status-error text-white px-3 py-1.5 rounded-md text-xs hover:opacity-90 transition-opacity",disabled:t.isPending,children:t.isPending?"Pruning...":"Confirm Prune"})]})]})})]})}function v(t){var i;if(!((i=t==null?void 0:t.rules)!=null&&i.length))return j;const r=t.rules,n=r.find(a=>a.target==="streams"&&a.action==="delete"),s=r.find(a=>a.target==="jobs"&&a.action==="delete"&&a.hasEntity===!1),l=r.find(a=>a.target==="jobs"&&a.action==="prune"&&a.hasEntity===!0),c=r.find(a=>a.target==="jobs"&&a.action==="delete"&&a.pruned===!0);return{pruneJobs:!!c,expire:(c==null?void 0:c.olderThan)??"180 days",engineStreams:!!n,engineStreamsExpire:(n==null?void 0:n.olderThan)??"1 day",workerStreams:!!n,workerStreamsExpire:(n==null?void 0:n.olderThan)??"90 days",stripAttributes:!!l,pruneTransient:!!s}}function $(t){const r=[];return t.engineStreams&&r.push({target:"streams",action:"delete",olderThan:t.engineStreamsExpire}),t.workerStreams&&t.workerStreamsExpire!==t.engineStreamsExpire&&r.push({target:"streams",action:"delete",olderThan:t.workerStreamsExpire}),t.pruneTransient&&r.push({target:"jobs",action:"delete",olderThan:t.expire,hasEntity:!1}),t.stripAttributes&&r.push({target:"jobs",action:"prune",olderThan:t.expire,hasEntity:!0}),t.pruneJobs&&r.push({target:"jobs",action:"delete",olderThan:t.expire,pruned:!0}),r}function N(t){var r;return((r=w.find(n=>n.value===t))==null?void 0:r.label)??""}function H(){const{data:t,isLoading:r}=I(),n=_(),[s,l]=o.useState(""),[c,i]=o.useState(j),[a,x]=o.useState(""),p=o.useCallback(()=>{t!=null&&t.config&&(l(t.config.schedule),i(v(t.config)),x(JSON.stringify({schedule:t.config.schedule,fields:v(t.config)})))},[t]);o.useEffect(()=>{p()},[p]);const E=JSON.stringify({schedule:s,fields:c}),y=a!==""&&E!==a,m=(t==null?void 0:t.active)??!1,T=()=>{const d=$(c);n.mutate({schedule:s,rules:d},{onSuccess:()=>{x(JSON.stringify({schedule:s,fields:c}))}})},P=()=>{p()};return r?e.jsx("div",{className:"animate-pulse h-40 bg-surface-sunken rounded"}):e.jsxs("div",{className:"space-y-8",children:[e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-[1fr_auto] gap-10",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-4",children:"Schedule"}),e.jsxs("div",{className:"flex items-end gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-[10px] text-text-tertiary mb-1",children:"Cron Expression"}),e.jsx("input",{type:"text",value:s,onChange:d=>l(d.target.value),placeholder:"0 2 * * *",className:"input text-xs font-mono w-48"})]}),e.jsx("div",{children:e.jsxs("div",{className:"flex items-center gap-1.5 h-8",children:[e.jsx("span",{className:`w-1.5 h-1.5 rounded-full ${m?"bg-status-success":"bg-text-tertiary"}`}),e.jsx("span",{className:`text-xs ${m?"text-status-success":"text-text-tertiary"}`,children:m?"Active":"Inactive"})]})}),N(s)&&e.jsx("p",{className:"text-xs text-text-tertiary h-8 flex items-center",children:N(s)})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-3",children:w.map(d=>e.jsx("button",{type:"button",onClick:()=>l(d.value),className:`px-2.5 py-1 text-[10px] rounded-full transition-colors ${s===d.value?"bg-accent/10 text-accent font-medium":"bg-surface-sunken text-text-tertiary hover:text-text-secondary"}`,children:d.label},d.value))})]}),e.jsxs("div",{className:"lg:w-72",children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-4",children:"How It Works"}),e.jsxs("div",{className:"flex items-start gap-2 px-3 py-2 rounded bg-surface-sunken",children:[e.jsx(b,{className:"w-3.5 h-3.5 text-text-tertiary shrink-0 mt-0.5"}),e.jsx("p",{className:"text-[10px] text-text-tertiary leading-relaxed",children:"Rules execute sequentially on each cron cycle. Engine streams can be pruned aggressively since they only contain internal routing data. Worker streams should be retained longer to preserve execution playback and input enrichment."})]})]})]}),e.jsx(C,{fields:c,onChange:i}),e.jsxs("div",{className:"flex items-center justify-between pt-2 border-t border-surface-border",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[y&&e.jsx("button",{onClick:P,className:"text-[10px] text-text-tertiary hover:text-text-primary transition-colors",children:"Revert changes"}),n.error&&e.jsx("p",{className:"text-xs text-status-error",children:n.error.message})]}),e.jsx("button",{onClick:T,disabled:!y||!s.trim()||n.isPending,className:"btn-primary text-xs disabled:opacity-40 shrink-0",children:n.isPending?"Saving...":"Save Schedule"})]})]})}function L({mode:t,onChange:r}){const n=(s,l,c)=>e.jsxs("button",{onClick:()=>r(s),className:`flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md transition-colors ${t===s?"bg-accent/10 text-accent font-medium":"text-text-tertiary hover:text-text-secondary hover:bg-surface-hover"}`,children:[l,c]});return e.jsxs("div",{className:"flex gap-1 p-0.5 bg-surface-sunken rounded-lg w-fit",children:[n("prune",e.jsx(M,{className:"w-3.5 h-3.5"}),"Prune Now"),n("schedule",e.jsx(D,{className:"w-3.5 h-3.5"}),"Schedule")]})}function Y(){const[t,r]=o.useState("schedule");return e.jsxs("div",{children:[e.jsx(O,{title:"DB Maintenance",docsHash:"#docs:dashboard.md:db-maintenance",actions:e.jsx(L,{mode:t,onChange:r})}),e.jsxs("div",{className:"flex items-start gap-2 px-4 py-3 mb-8 rounded-md bg-accent/5 border border-accent/10",children:[e.jsx(b,{className:"w-4 h-4 text-accent shrink-0 mt-0.5"}),e.jsx("p",{className:"text-xs text-text-secondary leading-relaxed",children:"Completed process data grows indefinitely. Schedule regular pruning to keep the database lean and queries fast. Worker streams are retained longer than engine streams to preserve execution playback."})]}),t==="prune"?e.jsx(W,{}):e.jsx(H,{})]})}export{Y as MaintenancePage};
2
- //# sourceMappingURL=index-_dKxJhey.js.map
@@ -1,2 +0,0 @@
1
- import{j as e,a as u}from"./vendor-query-B2UbickB.js";import{d as H,e as $,f as z,g as O}from"./mcp-CA3OeIyH.js";import{S as U}from"./StepIndicator-CuUIGxKk.js";import{P as J}from"./PageHeader-DLjHNYHX.js";import{T as Y}from"./TagInput-Dkljw_WI.js";import{X as q,z as K,ae as V,af as X}from"./vendor-icons-E6836lXZ.js";import{e as G,c as W,f as Q}from"./vendor-react-CX88sFS5.js";import"./index-oGYUhkFa.js";const T={name:"",description:"",mode:"network",transport_type:"sse",command:"",args:"",env_vars:"{}",url:"",auto_connect:!1,tags:[],compile_hints:"",credential_providers:[],discovered_tools:null};function Z(s){const t=s.transport_config??{},r=!!t.builtin;let a="network";return r?a="in-process":s.transport_type==="stdio"&&(a="local-process"),{name:s.name,description:s.description??"",mode:a,transport_type:s.transport_type,command:t.command??"",args:(t.args??[]).join(", "),env_vars:t.env?JSON.stringify(t.env,null,2):"{}",url:t.url??"",auto_connect:s.auto_connect,tags:s.tags??[],compile_hints:s.compile_hints??"",credential_providers:s.credential_providers??[],discovered_tools:s.tool_manifest??null}}function M(s){let t={};return s.mode==="local-process"?t={command:s.command.trim(),args:s.args.split(",").map(r=>r.trim()).filter(Boolean),env:s.env_vars.trim()?JSON.parse(s.env_vars):void 0}:s.mode==="network"&&(t={url:s.url.trim()}),{name:s.name.trim(),description:s.description.trim()||void 0,transport_type:s.mode==="local-process"?"stdio":s.transport_type,transport_config:t,auto_connect:s.auto_connect,tags:s.tags,compile_hints:s.compile_hints.trim()||void 0,credential_providers:s.credential_providers.length>0?s.credential_providers:void 0}}const L=["Transport","Discovery","Test","Review"];function E(s,t){return s===1?!(!t.name.trim()||t.mode==="network"&&!t.url.trim()||t.mode==="local-process"&&!t.command.trim()):!0}const c="label",h="hint",ee=[{value:"in-process",label:"In-Process",hint:"Built-in server running inside the app"},{value:"network",label:"Network Service",hint:"Remote server via SSE or Streamable HTTP"},{value:"local-process",label:"Local Process",hint:"Spawn a local command via stdio"}];function se({form:s,set:t,isBuiltin:r}){return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Connection Mode"}),e.jsx("div",{className:"grid grid-cols-3 gap-3 mt-1",children:ee.map(a=>{const d=s.mode===a.value,l=r&&a.value!=="in-process";return e.jsxs("button",{type:"button",disabled:l,onClick:()=>{t("mode",a.value),a.value==="local-process"&&t("transport_type","stdio"),a.value==="network"&&t("transport_type","sse")},className:`text-left p-3 rounded-md border transition-colors ${d?"border-accent bg-accent/5":l?"border-surface-border bg-surface-sunken opacity-50 cursor-not-allowed":"border-surface-border hover:border-text-tertiary cursor-pointer"}`,children:[e.jsx("span",{className:`text-xs font-medium ${d?"text-accent":"text-text-primary"}`,children:a.label}),e.jsx("span",{className:"block text-[10px] text-text-tertiary mt-0.5",children:a.hint})]},a.value)})})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Name"}),e.jsx("input",{type:"text",value:s.name,onChange:a=>t("name",a.target.value),placeholder:"e.g., vision-server",className:"input text-xs w-full",disabled:r})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Description"}),e.jsx("input",{type:"text",value:s.description,onChange:a=>t("description",a.target.value),placeholder:"Optional description",className:"input text-xs w-full"})]})]}),s.mode==="in-process"&&e.jsx("div",{children:e.jsx("p",{className:h,children:"This server runs in-process via InMemoryTransport. Transport is managed automatically — no configuration needed."})}),s.mode==="network"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Server URL"}),e.jsx("input",{type:"text",value:s.url,onChange:a=>t("url",a.target.value),placeholder:"https://mcp-server.example.com/sse",className:"input text-xs w-full font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Transport Protocol"}),e.jsx("div",{className:"flex gap-2 mt-1",children:["sse","streamable-http"].map(a=>e.jsx("button",{type:"button",onClick:()=>t("transport_type",a),className:`px-3 py-1.5 text-xs rounded-md border transition-colors ${s.transport_type===a?"border-accent bg-accent/5 text-accent font-medium":"border-surface-border text-text-secondary hover:border-text-tertiary"}`,children:a==="sse"?"SSE":"Streamable HTTP"},a))})]})]}),s.mode==="local-process"&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Command"}),e.jsx("input",{type:"text",value:s.command,onChange:a=>t("command",a.target.value),placeholder:"e.g., npx",className:"input text-xs w-full font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Arguments (comma-separated)"}),e.jsx("input",{type:"text",value:s.args,onChange:a=>t("args",a.target.value),placeholder:"e.g., -y, @modelcontextprotocol/server-filesystem, /tmp",className:"input text-xs w-full font-mono"})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Environment Variables (JSON)"}),e.jsx("textarea",{value:s.env_vars,onChange:a=>t("env_vars",a.target.value),className:"input-json w-full",rows:3,spellCheck:!1})]})]}),e.jsxs("label",{className:"flex items-center gap-2 cursor-pointer",children:[e.jsx("input",{type:"checkbox",checked:s.auto_connect,onChange:a=>t("auto_connect",a.target.checked),className:"w-4 h-4 rounded border-border accent-accent"}),e.jsx("span",{className:"text-xs text-text-primary",children:"Auto-connect on startup"})]})]})}function te({form:s,set:t}){const[r,a]=u.useState(""),d=n=>{const i=n.trim().toLowerCase();i&&!s.credential_providers.includes(i)&&t("credential_providers",[...s.credential_providers,i]),a("")},l=n=>{t("credential_providers",s.credential_providers.filter(i=>i!==n))},p=n=>{n.key==="Enter"||n.key===","?(n.preventDefault(),d(r)):n.key==="Backspace"&&!r&&s.credential_providers.length>0&&l(s.credential_providers[s.credential_providers.length-1])};return e.jsxs("div",{className:"space-y-5",children:[e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Tags"}),e.jsx(Y,{tags:s.tags,onChange:n=>t("tags",n),placeholder:"Add tag (e.g., database, analytics)..."}),e.jsx("p",{className:h,children:"Tags enable tool discovery. Workflows filter available MCP servers by tags to find relevant tools."})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Compile Hints"}),e.jsx("textarea",{value:s.compile_hints,onChange:n=>t("compile_hints",n.target.value),placeholder:"Guidance for the workflow compiler when generating YAML from this server's tools...",className:"input text-xs w-full leading-relaxed",rows:4,spellCheck:!1}),e.jsx("p",{className:h,children:"Free-form text that guides the workflow compiler. Describe how tools should be composed, sequenced, or parameterized."})]}),e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Credential Providers"}),e.jsxs("div",{className:"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",children:[s.credential_providers.map(n=>e.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:[n,e.jsx("button",{type:"button",onClick:()=>l(n),className:"hover:text-status-error transition-colors",children:e.jsx(q,{className:"w-2.5 h-2.5"})})]},n)),e.jsx("input",{type:"text",value:r,onChange:n=>a(n.target.value),onKeyDown:p,onBlur:()=>{r.trim()&&d(r)},placeholder:s.credential_providers.length===0?"Add provider (e.g., github, slack)...":"",className:"flex-1 min-w-[80px] bg-transparent text-xs text-text-primary outline-none placeholder:text-text-tertiary"})]}),e.jsx("p",{className:h,children:"IAM credential providers required by this server's tools. Users will be prompted to connect these before tool execution."})]})]})}function ae({form:s,set:t}){const r=H(),a=s.mode==="in-process",d=()=>{const n=M(s);r.mutate({transport_type:n.transport_type,transport_config:n.transport_config},{onSuccess:i=>{i.success&&t("discovered_tools",i.tools)}})},l=r.data,p=s.discovered_tools??(l==null?void 0:l.tools)??[];return e.jsx("div",{className:"space-y-5",children:a?e.jsxs("div",{children:[e.jsx("p",{className:"text-sm text-text-secondary",children:"In-process servers connect lazily on first tool call. No connection test needed."}),s.discovered_tools&&s.discovered_tools.length>0&&e.jsxs("div",{className:"mt-4",children:[e.jsxs("p",{className:"text-xs text-text-tertiary mb-2",children:[s.discovered_tools.length," tool",s.discovered_tools.length!==1?"s":""," cached from last connection"]}),e.jsx(I,{tools:s.discovered_tools})]})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("button",{type:"button",onClick:d,disabled:r.isPending,className:"btn-primary text-xs",children:r.isPending?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(K,{className:"w-3 h-3 animate-spin"}),"Connecting..."]}):"Test Connection"}),(l==null?void 0:l.success)&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-status-success",children:[e.jsx(V,{className:"w-3.5 h-3.5"}),"Connected — ",p.length," tool",p.length!==1?"s":""," discovered"]}),l&&!l.success&&e.jsxs("span",{className:"flex items-center gap-1 text-xs text-status-error",children:[e.jsx(X,{className:"w-3.5 h-3.5"}),l.error||"Connection failed"]})]}),p.length>0&&e.jsxs("div",{children:[e.jsx("p",{className:"text-xs text-text-tertiary mb-2",children:"Discovered tools"}),e.jsx(I,{tools:p})]}),e.jsx("p",{className:h,children:"Tests connectivity by connecting to the server and listing available tools. The server must be reachable from this machine."})]})})}function I({tools:s}){return e.jsx("div",{className:"max-h-[280px] overflow-y-auto border border-surface-border rounded-md divide-y divide-surface-border",children:s.map(t=>e.jsxs("div",{className:"px-3 py-2",children:[e.jsx("span",{className:"text-xs font-medium text-text-primary font-mono",children:t.name}),t.description&&e.jsx("span",{className:"block text-[10px] text-text-tertiary mt-0.5 line-clamp-2",children:t.description})]},t.name))})}const re={"in-process":"In-Process",network:"Network Service","local-process":"Local Process"},ne={stdio:"stdio",sse:"SSE","streamable-http":"Streamable HTTP"};function le({form:s}){const t=s.discovered_tools??[];return e.jsxs("div",{className:"space-y-4",children:[e.jsx(x,{label:"Name",value:s.name}),s.description&&e.jsx(x,{label:"Description",value:s.description}),e.jsx(x,{label:"Mode",value:re[s.mode]??s.mode}),s.mode==="network"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{label:"Transport",value:ne[s.transport_type]??s.transport_type}),e.jsx(x,{label:"URL",value:s.url,mono:!0})]}),s.mode==="local-process"&&e.jsxs(e.Fragment,{children:[e.jsx(x,{label:"Command",value:s.command,mono:!0}),s.args&&e.jsx(x,{label:"Args",value:s.args,mono:!0})]}),e.jsx(x,{label:"Auto-connect",value:s.auto_connect?"Yes":"No"}),s.tags.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Tags"}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:s.tags.map(r=>e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-accent/10 text-accent text-[11px] font-medium",children:r},r))})]}),s.credential_providers.length>0&&e.jsxs("div",{children:[e.jsx("label",{className:c,children:"Credential Providers"}),e.jsx("div",{className:"flex flex-wrap gap-1.5 mt-1",children:s.credential_providers.map(r=>e.jsx("span",{className:"px-2 py-0.5 rounded-full bg-accent/10 text-accent text-[11px] font-medium",children:r},r))})]}),s.compile_hints&&e.jsx(x,{label:"Compile Hints",value:s.compile_hints}),t.length>0&&e.jsx(x,{label:"Discovered Tools",value:`${t.length} tool${t.length!==1?"s":""}`})]})}function x({label:s,value:t,mono:r}){return e.jsxs("div",{children:[e.jsx("label",{className:c,children:s}),e.jsx("p",{className:`text-xs text-text-primary mt-0.5 ${r?"font-mono":""}`,children:t})]})}function ve(){var C,k,P;const{serverId:s}=G(),t=!s,r=W(),{data:a,isLoading:d}=$(s??""),l=z(),p=O(),[n,i]=u.useState(T),[N,y]=u.useState(!1),[R,_]=u.useState(""),[D,f]=Q(),o=parseInt(D.get("step")||"1",10),j=u.useCallback(m=>{f(v=>{const g=new URLSearchParams(v);return g.set("step",String(m)),g},{replace:!1})},[f]);u.useEffect(()=>{if(!N){if(t){i(T),y(!0);return}a&&(i(Z(a)),y(!0))}},[a,t,N]);const b=(m,v)=>i(g=>({...g,[m]:v})),A=!!((C=a==null?void 0:a.transport_config)!=null&&C.builtin),F=()=>{_("");const m=M(n);a?p.mutate({id:a.id,...m},{onSuccess:()=>r("/mcp/servers")}):l.mutate(m,{onSuccess:()=>r("/mcp/servers"),onError:v=>_(v.message)})};if(!t&&d)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-60 bg-surface-sunken rounded"})]});if(!t&&!a&&!d)return e.jsx("p",{className:"text-sm text-text-secondary",children:"Server not found."});const B=o===L.length,w=l.isPending||p.isPending,S=R||((k=l.error)==null?void 0:k.message)||((P=p.error)==null?void 0:P.message);return e.jsxs("div",{children:[e.jsx(J,{title:t?"Register MCP Server":(a==null?void 0:a.name)??""}),e.jsxs("div",{className:"max-w-3xl",children:[e.jsx(U,{steps:L,currentStep:o-1,onStepClick:m=>j(m+1)}),e.jsxs("div",{className:"min-h-[360px] py-2",children:[o===1&&e.jsx(se,{form:n,set:b,isBuiltin:A}),o===2&&e.jsx(te,{form:n,set:b}),o===3&&e.jsx(ae,{form:n,set:b}),o===4&&e.jsx(le,{form:n})]}),S&&e.jsx("p",{className:"text-xs text-status-error mt-4",children:S}),e.jsxs("div",{className:"flex justify-between items-center pt-4 border-t border-surface-border mt-4",children:[e.jsx("div",{children:o>1&&e.jsx("button",{onClick:()=>j(o-1),className:"btn-secondary text-xs",children:"Back"})}),e.jsxs("div",{className:"flex gap-3",children:[e.jsx("button",{onClick:()=>r("/mcp/servers"),className:"btn-ghost text-xs",children:"Cancel"}),B?e.jsx("button",{onClick:F,disabled:!E(o,n)||w,className:"btn-primary text-xs",children:w?"Saving...":a?"Save":"Register"}):e.jsx("button",{onClick:()=>j(o+1),disabled:!E(o,n),className:"btn-primary text-xs",children:"Next"})]})]})]})]})}export{ve as McpServerDetailPage};
2
- //# sourceMappingURL=index-jp94-YlF.js.map