@hotmeshio/long-tail 0.4.4 → 0.4.5
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.
- package/build/api/agent-subscriptions.js +14 -0
- package/build/lib/events/index.js +3 -0
- package/build/lib/events/nats.js +2 -0
- package/build/services/agent/index.js +14 -0
- package/build/services/agent/trigger-registry.d.ts +2 -0
- package/build/services/agent/trigger-registry.js +37 -8
- package/build/start/workers.js +3 -0
- package/build/types/events.d.ts +1 -1
- package/dashboard/dist/assets/AdminDashboard-ntLz5Pro.js +2 -0
- package/dashboard/dist/assets/{AdminDashboard-DISq0Tz8.js.map → AdminDashboard-ntLz5Pro.js.map} +1 -1
- package/dashboard/dist/assets/AgentConfigPage-D27vWOI6.js +16 -0
- package/dashboard/dist/assets/{AgentConfigPage-DqaJpB3K.js.map → AgentConfigPage-D27vWOI6.js.map} +1 -1
- package/dashboard/dist/assets/AgentDetailPage-Cm2KFR4O.js +4 -0
- package/dashboard/dist/assets/{AgentDetailPage-BPzPk2GC.js.map → AgentDetailPage-Cm2KFR4O.js.map} +1 -1
- package/dashboard/dist/assets/AgentsPage-_ptA-0YO.js +2 -0
- package/dashboard/dist/assets/{AgentsPage-CLcxJWjC.js.map → AgentsPage-_ptA-0YO.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-bdPqEzbx.js +2 -0
- package/dashboard/dist/assets/{AvailableEscalationsPage-hOcjAAIj.js.map → AvailableEscalationsPage-bdPqEzbx.js.map} +1 -1
- package/dashboard/dist/assets/BotPicker-CYfFMpkY.js +2 -0
- package/dashboard/dist/assets/{BotPicker-DuAZgHbJ.js.map → BotPicker-CYfFMpkY.js.map} +1 -1
- package/dashboard/dist/assets/CapabilitiesPage-M7-ZTFNV.js +2 -0
- package/dashboard/dist/assets/{CapabilitiesPage-PRel6TXd.js.map → CapabilitiesPage-M7-ZTFNV.js.map} +1 -1
- package/dashboard/dist/assets/CollapsibleSection-DU5KAtQ-.js +2 -0
- package/dashboard/dist/assets/{CollapsibleSection-DnoUFQVf.js.map → CollapsibleSection-DU5KAtQ-.js.map} +1 -1
- package/dashboard/dist/assets/ConfirmDeleteModal-_hW5Vc05.js +2 -0
- package/dashboard/dist/assets/{ConfirmDeleteModal-dOxidrSR.js.map → ConfirmDeleteModal-_hW5Vc05.js.map} +1 -1
- package/dashboard/dist/assets/CopyableId-DiWqv41D.js +2 -0
- package/dashboard/dist/assets/{CopyableId-D0SQ39nR.js.map → CopyableId-DiWqv41D.js.map} +1 -1
- package/dashboard/dist/assets/CredentialsPage-CmbwypSF.js +2 -0
- package/dashboard/dist/assets/{CredentialsPage-CqedUU7b.js.map → CredentialsPage-CmbwypSF.js.map} +1 -1
- package/dashboard/dist/assets/CronLabel-nycfAefc.js +2 -0
- package/dashboard/dist/assets/{CronLabel-CPEjE-mH.js.map → CronLabel-nycfAefc.js.map} +1 -1
- package/dashboard/dist/assets/CustomDurationPicker-gNZRBaHg.js +2 -0
- package/dashboard/dist/assets/{CustomDurationPicker-BIQWzbv0.js.map → CustomDurationPicker-gNZRBaHg.js.map} +1 -1
- package/dashboard/dist/assets/DataTable-DGerT2ZM.js +2 -0
- package/dashboard/dist/assets/{DataTable-D9yuBv0w.js.map → DataTable-DGerT2ZM.js.map} +1 -1
- package/dashboard/dist/assets/DropZone-vNcqMd05.js +2 -0
- package/dashboard/dist/assets/{DropZone-e5EOL5gC.js.map → DropZone-vNcqMd05.js.map} +1 -1
- package/dashboard/dist/assets/ElapsedCell-CdvQbtve.js +2 -0
- package/dashboard/dist/assets/{ElapsedCell-CzVjr74Y.js.map → ElapsedCell-CdvQbtve.js.map} +1 -1
- package/dashboard/dist/assets/EmptyState-DMldv8c5.js +2 -0
- package/dashboard/dist/assets/{EmptyState-BcsfPq9T.js.map → EmptyState-DMldv8c5.js.map} +1 -1
- package/dashboard/dist/assets/EscalationsOverview-BNENCL_2.js +2 -0
- package/dashboard/dist/assets/{EscalationsOverview-Bcrb44xJ.js.map → EscalationsOverview-BNENCL_2.js.map} +1 -1
- package/dashboard/dist/assets/EventTable-BqDAyXyc.js +2 -0
- package/dashboard/dist/assets/{EventTable-CGfJU7e1.js.map → EventTable-BqDAyXyc.js.map} +1 -1
- package/dashboard/dist/assets/EventTopicPill-CnHFBglc.js +2 -0
- package/dashboard/dist/assets/{EventTopicPill-xJJnxvlP.js.map → EventTopicPill-CnHFBglc.js.map} +1 -1
- package/dashboard/dist/assets/FilterBar-TYiTtUgv.js +2 -0
- package/dashboard/dist/assets/{FilterBar-Ck4K4rzu.js.map → FilterBar-TYiTtUgv.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-fterfLKH.js +2 -0
- package/dashboard/dist/assets/{HomePage-BIzUcGW9.js.map → HomePage-fterfLKH.js.map} +1 -1
- package/dashboard/dist/assets/ListToolbar-BO5Igi6v.js +2 -0
- package/dashboard/dist/assets/{ListToolbar-DNAGFe14.js.map → ListToolbar-BO5Igi6v.js.map} +1 -1
- package/dashboard/dist/assets/McpOverview-BQokGg0z.js +2 -0
- package/dashboard/dist/assets/{McpOverview-BpYk21es.js.map → McpOverview-BQokGg0z.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryDetailPage-0WOp2n_j.js +5 -0
- package/dashboard/dist/assets/{McpQueryDetailPage-DlrZiSuL.js.map → McpQueryDetailPage-0WOp2n_j.js.map} +1 -1
- package/dashboard/dist/assets/McpQueryPage-DUey_h9J.js +2 -0
- package/dashboard/dist/assets/{McpQueryPage-COfPssO7.js.map → McpQueryPage-DUey_h9J.js.map} +1 -1
- package/dashboard/dist/assets/McpRunDetailPage-Cv4qyr91.js +2 -0
- package/dashboard/dist/assets/{McpRunDetailPage-Cra0nQSw.js.map → McpRunDetailPage-Cv4qyr91.js.map} +1 -1
- package/dashboard/dist/assets/McpRunsPage-B3R6KZ61.js +2 -0
- package/dashboard/dist/assets/{McpRunsPage-BlgcGN3k.js.map → McpRunsPage-B3R6KZ61.js.map} +1 -1
- package/dashboard/dist/assets/Modal-Qe8lW7gQ.js +2 -0
- package/dashboard/dist/assets/{Modal-DEODGeqx.js.map → Modal-Qe8lW7gQ.js.map} +1 -1
- package/dashboard/dist/assets/OperatorDashboard-dldvzjcg.js +2 -0
- package/dashboard/dist/assets/{OperatorDashboard-BbO6cWzb.js.map → OperatorDashboard-dldvzjcg.js.map} +1 -1
- package/dashboard/dist/assets/PageHeader-DF4BeEm4.js +2 -0
- package/dashboard/dist/assets/{PageHeader-B_gV_jKk.js.map → PageHeader-DF4BeEm4.js.map} +1 -1
- package/dashboard/dist/assets/PageHeaderWithStats-BQZw6BgA.js +2 -0
- package/dashboard/dist/assets/{PageHeaderWithStats-D0I0nrnx.js.map → PageHeaderWithStats-BQZw6BgA.js.map} +1 -1
- package/dashboard/dist/assets/PriorityBadge-DMyB3WLZ.js +2 -0
- package/dashboard/dist/assets/{PriorityBadge-DfQY9St9.js.map → PriorityBadge-DMyB3WLZ.js.map} +1 -1
- package/dashboard/dist/assets/ProcessDetailPage-Beo-QVL-.js +2 -0
- package/dashboard/dist/assets/{ProcessDetailPage-s_iV8ICg.js.map → ProcessDetailPage-Beo-QVL-.js.map} +1 -1
- package/dashboard/dist/assets/ProcessesListPage-C_ars8gp.js +2 -0
- package/dashboard/dist/assets/{ProcessesListPage-MnLMnxAa.js.map → ProcessesListPage-C_ars8gp.js.map} +1 -1
- package/dashboard/dist/assets/RolePill-DrBZ7JJj.js +2 -0
- package/dashboard/dist/assets/{RolePill-BOBytzrP.js.map → RolePill-DrBZ7JJj.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-DgSXFFGL.js +2 -0
- package/dashboard/dist/assets/{RolesPage-BH7KASM7.js.map → RolesPage-DgSXFFGL.js.map} +1 -1
- package/dashboard/dist/assets/RowActions-QcakGbVA.js +2 -0
- package/dashboard/dist/assets/{RowActions-Dg-Fsm5O.js.map → RowActions-QcakGbVA.js.map} +1 -1
- package/dashboard/dist/assets/RunAsSelector-CYMeZwrM.js +2 -0
- package/dashboard/dist/assets/{RunAsSelector-_QbJKhlo.js.map → RunAsSelector-CYMeZwrM.js.map} +1 -1
- package/dashboard/dist/assets/ServerName-D5NKD06M.js +2 -0
- package/dashboard/dist/assets/{ServerName-uqa4eBqm.js.map → ServerName-D5NKD06M.js.map} +1 -1
- package/dashboard/dist/assets/StatCard-PZQmmCHK.js +2 -0
- package/dashboard/dist/assets/{StatCard-DlgF0CJC.js.map → StatCard-PZQmmCHK.js.map} +1 -1
- package/dashboard/dist/assets/StatusBadge-ME2R6a7K.js +2 -0
- package/dashboard/dist/assets/{StatusBadge-XQlNFwmH.js.map → StatusBadge-ME2R6a7K.js.map} +1 -1
- package/dashboard/dist/assets/StepIndicator-CDDVahOz.js +2 -0
- package/dashboard/dist/assets/{StepIndicator-CuUIGxKk.js.map → StepIndicator-CDDVahOz.js.map} +1 -1
- package/dashboard/dist/assets/StickyPagination-Ddy93Q5I.js +2 -0
- package/dashboard/dist/assets/{StickyPagination-F9FZsRy9.js.map → StickyPagination-Ddy93Q5I.js.map} +1 -1
- package/dashboard/dist/assets/SwimlaneTimeline-CYYA8nd9.js +2 -0
- package/dashboard/dist/assets/{SwimlaneTimeline-og79Llvs.js.map → SwimlaneTimeline-CYYA8nd9.js.map} +1 -1
- package/dashboard/dist/assets/TagInput-B45Dm3IW.js +2 -0
- package/dashboard/dist/assets/{TagInput-D3f11sbM.js.map → TagInput-B45Dm3IW.js.map} +1 -1
- package/dashboard/dist/assets/TaskDetailPage-CoZFkJ6d.js +2 -0
- package/dashboard/dist/assets/TaskDetailPage-CoZFkJ6d.js.map +1 -0
- package/dashboard/dist/assets/TaskQueuePill-BJRUjVDv.js +2 -0
- package/dashboard/dist/assets/{TaskQueuePill-Bc45J7X1.js.map → TaskQueuePill-BJRUjVDv.js.map} +1 -1
- package/dashboard/dist/assets/TasksListPage-Czu08px3.js +2 -0
- package/dashboard/dist/assets/{TasksListPage-BYj3OqUi.js.map → TasksListPage-Czu08px3.js.map} +1 -1
- package/dashboard/dist/assets/TimeAgo-CJ56IUy6.js +2 -0
- package/dashboard/dist/assets/{TimeAgo-W7TdJpV-.js.map → TimeAgo-CJ56IUy6.js.map} +1 -1
- package/dashboard/dist/assets/TimestampCell-QtcYZ9Jx.js +2 -0
- package/dashboard/dist/assets/{TimestampCell-Bi2nc9Q_.js.map → TimestampCell-QtcYZ9Jx.js.map} +1 -1
- package/dashboard/dist/assets/ToolPill-DpDv3FwI.js +2 -0
- package/dashboard/dist/assets/{ToolPill-CuoXcmhv.js.map → ToolPill-DpDv3FwI.js.map} +1 -1
- package/dashboard/dist/assets/ToolTestPanel-BzFOwzd_.js +2 -0
- package/dashboard/dist/assets/{ToolTestPanel-Dl3C53zb.js.map → ToolTestPanel-BzFOwzd_.js.map} +1 -1
- package/dashboard/dist/assets/TopicDetailPage-DwShZbh9.js +9 -0
- package/dashboard/dist/assets/{TopicDetailPage-CjaZn4WP.js.map → TopicDetailPage-DwShZbh9.js.map} +1 -1
- package/dashboard/dist/assets/TopicsPage-DKXlpZl_.js +2 -0
- package/dashboard/dist/assets/{TopicsPage-BfsJEC1p.js.map → TopicsPage-DKXlpZl_.js.map} +1 -1
- package/dashboard/dist/assets/UserName-zlR1so37.js +2 -0
- package/dashboard/dist/assets/{UserName-b4baWHM_.js.map → UserName-zlR1so37.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowExecutionPage-BMNIxeJB.js +2 -0
- package/dashboard/dist/assets/{WorkflowExecutionPage-BGmJnXnk.js.map → WorkflowExecutionPage-BMNIxeJB.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowPill-B5B3yGlh.js +2 -0
- package/dashboard/dist/assets/{WorkflowPill-Bg2-0Hkg.js.map → WorkflowPill-B5B3yGlh.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsDashboard-BlAPZbQZ.js +2 -0
- package/dashboard/dist/assets/{WorkflowsDashboard-BzH7jMRu.js.map → WorkflowsDashboard-BlAPZbQZ.js.map} +1 -1
- package/dashboard/dist/assets/WorkflowsOverview-NnPi6rwS.js +2 -0
- package/dashboard/dist/assets/{WorkflowsOverview-BcUgBvjD.js.map → WorkflowsOverview-NnPi6rwS.js.map} +1 -1
- package/dashboard/dist/assets/YamlWorkflowsPage-C4mZum6x.js +2 -0
- package/dashboard/dist/assets/{YamlWorkflowsPage-OhpCQJ0l.js.map → YamlWorkflowsPage-C4mZum6x.js.map} +1 -1
- package/dashboard/dist/assets/{agents-Ce3HmPz4.js → agents-B5wvILeV.js} +2 -2
- package/dashboard/dist/assets/{agents-Ce3HmPz4.js.map → agents-B5wvILeV.js.map} +1 -1
- package/dashboard/dist/assets/{bots-B0BomNnf.js → bots-BPlouRDm.js} +2 -2
- package/dashboard/dist/assets/{bots-B0BomNnf.js.map → bots-BPlouRDm.js.map} +1 -1
- package/dashboard/dist/assets/capabilities-DkvRG09b.js +2 -0
- package/dashboard/dist/assets/{capabilities-t-w5N9K9.js.map → capabilities-DkvRG09b.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-BrtAZnJM.js → controlplane-0m_rA-UW.js} +2 -2
- package/dashboard/dist/assets/{controlplane-BrtAZnJM.js.map → controlplane-0m_rA-UW.js.map} +1 -1
- package/dashboard/dist/assets/escalation-CfIAIUg2.js +2 -0
- package/dashboard/dist/assets/{escalation-DilnDxw2.js.map → escalation-CfIAIUg2.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-CLIdxlbe.js +2 -0
- package/dashboard/dist/assets/{escalation-columns-C0slywOY.js.map → escalation-columns-CLIdxlbe.js.map} +1 -1
- package/dashboard/dist/assets/helpers-prGqC38M.js +2 -0
- package/dashboard/dist/assets/{helpers-BMvPqQr8.js.map → helpers-prGqC38M.js.map} +1 -1
- package/dashboard/dist/assets/index-4T7Z_gQ4.js +281 -0
- package/dashboard/dist/assets/index-4T7Z_gQ4.js.map +1 -0
- package/dashboard/dist/assets/index-BR3SwTNI.js +2 -0
- package/dashboard/dist/assets/{index-pIMl0mYp.js.map → index-BR3SwTNI.js.map} +1 -1
- package/dashboard/dist/assets/index-BWKIigEk.js +2 -0
- package/dashboard/dist/assets/{index-qNuxC8kX.js.map → index-BWKIigEk.js.map} +1 -1
- package/dashboard/dist/assets/index-BgVuyWhi.js +15 -0
- package/dashboard/dist/assets/{index-D_wqdvG_.js.map → index-BgVuyWhi.js.map} +1 -1
- package/dashboard/dist/assets/index-C0sDEKdo.js +2 -0
- package/dashboard/dist/assets/{index-30-pN97P.js.map → index-C0sDEKdo.js.map} +1 -1
- package/dashboard/dist/assets/index-C2MJzu6J.js +2 -0
- package/dashboard/dist/assets/{index-f-0Duls3.js.map → index-C2MJzu6J.js.map} +1 -1
- package/dashboard/dist/assets/index-CFoddJDr.js +6 -0
- package/dashboard/dist/assets/{index-Ck2QdJXT.js.map → index-CFoddJDr.js.map} +1 -1
- package/dashboard/dist/assets/index-CrMxD5Ib.js +6 -0
- package/dashboard/dist/assets/{index-DPW_i3fH.js.map → index-CrMxD5Ib.js.map} +1 -1
- package/dashboard/dist/assets/index-CuY5hPYB.js +2 -0
- package/dashboard/dist/assets/{index-DnsVYMMg.js.map → index-CuY5hPYB.js.map} +1 -1
- package/dashboard/dist/assets/index-CwkJBn87.js +2 -0
- package/dashboard/dist/assets/{index-Bl9wzQ8Q.js.map → index-CwkJBn87.js.map} +1 -1
- package/dashboard/dist/assets/index-DeL84Cag.js +2 -0
- package/dashboard/dist/assets/{index-DNmlrCAp.js.map → index-DeL84Cag.js.map} +1 -1
- package/dashboard/dist/assets/index-DqeLbz6j.js +2 -0
- package/dashboard/dist/assets/{index-BxOuF0hm.js.map → index-DqeLbz6j.js.map} +1 -1
- package/dashboard/dist/assets/index-P9huxx3-.js +2 -0
- package/dashboard/dist/assets/{index-H5TlloTk.js.map → index-P9huxx3-.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-D01NdF5h.js → knowledge-CUZxyRCO.js} +2 -2
- package/dashboard/dist/assets/{knowledge-D01NdF5h.js.map → knowledge-CUZxyRCO.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CjXjDZI0.js → mcp-B5VQPoF3.js} +2 -2
- package/dashboard/dist/assets/{mcp-CjXjDZI0.js.map → mcp-B5VQPoF3.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-LlKQcWLJ.js → mcp-query-Ba5Zj3yg.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-LlKQcWLJ.js.map → mcp-query-Ba5Zj3yg.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-runs-C0C54hU6.js → mcp-runs-CAiEr5Fc.js} +2 -2
- package/dashboard/dist/assets/{mcp-runs-C0C54hU6.js.map → mcp-runs-CAiEr5Fc.js.map} +1 -1
- package/dashboard/dist/assets/namespaces-sVr5scma.js +2 -0
- package/dashboard/dist/assets/{namespaces-6qWDXXJV.js.map → namespaces-sVr5scma.js.map} +1 -1
- package/dashboard/dist/assets/{roles-Dtj0uabn.js → roles-E_bA4e0f.js} +2 -2
- package/dashboard/dist/assets/{roles-Dtj0uabn.js.map → roles-E_bA4e0f.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-BevFBjZq.js → tasks-CL6Gv8jB.js} +2 -2
- package/dashboard/dist/assets/{tasks-BevFBjZq.js.map → tasks-CL6Gv8jB.js.map} +1 -1
- package/dashboard/dist/assets/{topics-BMG5tx2g.js → topics-DbtPHERP.js} +2 -2
- package/dashboard/dist/assets/{topics-BMG5tx2g.js.map → topics-DbtPHERP.js.map} +1 -1
- package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js → useCollapsedSections-CGNA5oKV.js} +2 -2
- package/dashboard/dist/assets/{useCollapsedSections-BU5HULGs.js.map → useCollapsedSections-CGNA5oKV.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-CPyvFlVR.js → useEventHooks-C6c618cj.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-CPyvFlVR.js.map → useEventHooks-C6c618cj.js.map} +1 -1
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js → useExpandedRows-Cg9iq6Vy.js} +2 -2
- package/dashboard/dist/assets/{useExpandedRows-CkcEntB-.js.map → useExpandedRows-Cg9iq6Vy.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js → useFilterParams-CGRYFw_A.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-DZCAaBC7.js.map → useFilterParams-CGRYFw_A.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-Bll8NPNQ.js → useYamlActivityEvents-eK7kIUdh.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-Bll8NPNQ.js.map → useYamlActivityEvents-eK7kIUdh.js.map} +1 -1
- package/dashboard/dist/assets/{users-XZ349b0r.js → users-CCHSIAxt.js} +2 -2
- package/dashboard/dist/assets/{users-XZ349b0r.js.map → users-CCHSIAxt.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-B_Yla7iD.js → vendor-icons-D8-ZINAH.js} +2 -2
- package/dashboard/dist/assets/{vendor-icons-B_Yla7iD.js.map → vendor-icons-D8-ZINAH.js.map} +1 -1
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js +35 -0
- package/dashboard/dist/assets/vendor-query-DLp59M9_.js.map +1 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js +26 -0
- package/dashboard/dist/assets/vendor-react-Co3Y8ikm.js.map +1 -0
- package/dashboard/dist/assets/{workflows-Do-Eiv8f.js → workflows-BNbocg_9.js} +2 -2
- package/dashboard/dist/assets/{workflows-Do-Eiv8f.js.map → workflows-BNbocg_9.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DolGRQ5f.js → yaml-workflows-Cu1FUwrc.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DolGRQ5f.js.map → yaml-workflows-Cu1FUwrc.js.map} +1 -1
- package/dashboard/dist/index.html +4 -4
- package/package.json +1 -1
- package/dashboard/dist/assets/AdminDashboard-DISq0Tz8.js +0 -2
- package/dashboard/dist/assets/AgentConfigPage-DqaJpB3K.js +0 -16
- package/dashboard/dist/assets/AgentDetailPage-BPzPk2GC.js +0 -4
- package/dashboard/dist/assets/AgentsPage-CLcxJWjC.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-hOcjAAIj.js +0 -2
- package/dashboard/dist/assets/BotPicker-DuAZgHbJ.js +0 -2
- package/dashboard/dist/assets/CapabilitiesPage-PRel6TXd.js +0 -2
- package/dashboard/dist/assets/CollapsibleSection-DnoUFQVf.js +0 -2
- package/dashboard/dist/assets/ConfirmDeleteModal-dOxidrSR.js +0 -2
- package/dashboard/dist/assets/CopyableId-D0SQ39nR.js +0 -2
- package/dashboard/dist/assets/CredentialsPage-CqedUU7b.js +0 -2
- package/dashboard/dist/assets/CronLabel-CPEjE-mH.js +0 -2
- package/dashboard/dist/assets/CustomDurationPicker-BIQWzbv0.js +0 -2
- package/dashboard/dist/assets/DataTable-D9yuBv0w.js +0 -2
- package/dashboard/dist/assets/DropZone-e5EOL5gC.js +0 -2
- package/dashboard/dist/assets/ElapsedCell-CzVjr74Y.js +0 -2
- package/dashboard/dist/assets/EmptyState-BcsfPq9T.js +0 -2
- package/dashboard/dist/assets/EscalationsOverview-Bcrb44xJ.js +0 -2
- package/dashboard/dist/assets/EventTable-CGfJU7e1.js +0 -2
- package/dashboard/dist/assets/EventTopicPill-xJJnxvlP.js +0 -2
- package/dashboard/dist/assets/FilterBar-Ck4K4rzu.js +0 -2
- package/dashboard/dist/assets/HomePage-BIzUcGW9.js +0 -2
- package/dashboard/dist/assets/ListToolbar-DNAGFe14.js +0 -2
- package/dashboard/dist/assets/McpOverview-BpYk21es.js +0 -2
- package/dashboard/dist/assets/McpQueryDetailPage-DlrZiSuL.js +0 -5
- package/dashboard/dist/assets/McpQueryPage-COfPssO7.js +0 -2
- package/dashboard/dist/assets/McpRunDetailPage-Cra0nQSw.js +0 -2
- package/dashboard/dist/assets/McpRunsPage-BlgcGN3k.js +0 -2
- package/dashboard/dist/assets/Modal-DEODGeqx.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-BbO6cWzb.js +0 -2
- package/dashboard/dist/assets/PageHeader-B_gV_jKk.js +0 -2
- package/dashboard/dist/assets/PageHeaderWithStats-D0I0nrnx.js +0 -2
- package/dashboard/dist/assets/PriorityBadge-DfQY9St9.js +0 -2
- package/dashboard/dist/assets/ProcessDetailPage-s_iV8ICg.js +0 -2
- package/dashboard/dist/assets/ProcessesListPage-MnLMnxAa.js +0 -2
- package/dashboard/dist/assets/RolePill-BOBytzrP.js +0 -2
- package/dashboard/dist/assets/RolesPage-BH7KASM7.js +0 -2
- package/dashboard/dist/assets/RowActions-Dg-Fsm5O.js +0 -2
- package/dashboard/dist/assets/RunAsSelector-_QbJKhlo.js +0 -2
- package/dashboard/dist/assets/ServerName-uqa4eBqm.js +0 -2
- package/dashboard/dist/assets/StatCard-DlgF0CJC.js +0 -2
- package/dashboard/dist/assets/StatusBadge-XQlNFwmH.js +0 -2
- package/dashboard/dist/assets/StepIndicator-CuUIGxKk.js +0 -2
- package/dashboard/dist/assets/StickyPagination-F9FZsRy9.js +0 -2
- package/dashboard/dist/assets/SwimlaneTimeline-og79Llvs.js +0 -2
- package/dashboard/dist/assets/TagInput-D3f11sbM.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-DPV4ySd9.js +0 -2
- package/dashboard/dist/assets/TaskDetailPage-DPV4ySd9.js.map +0 -1
- package/dashboard/dist/assets/TaskQueuePill-Bc45J7X1.js +0 -2
- package/dashboard/dist/assets/TasksListPage-BYj3OqUi.js +0 -2
- package/dashboard/dist/assets/TimeAgo-W7TdJpV-.js +0 -2
- package/dashboard/dist/assets/TimestampCell-Bi2nc9Q_.js +0 -2
- package/dashboard/dist/assets/ToolPill-CuoXcmhv.js +0 -2
- package/dashboard/dist/assets/ToolTestPanel-Dl3C53zb.js +0 -2
- package/dashboard/dist/assets/TopicDetailPage-CjaZn4WP.js +0 -9
- package/dashboard/dist/assets/TopicsPage-BfsJEC1p.js +0 -2
- package/dashboard/dist/assets/UserName-b4baWHM_.js +0 -2
- package/dashboard/dist/assets/WorkflowExecutionPage-BGmJnXnk.js +0 -2
- package/dashboard/dist/assets/WorkflowPill-Bg2-0Hkg.js +0 -2
- package/dashboard/dist/assets/WorkflowsDashboard-BzH7jMRu.js +0 -2
- package/dashboard/dist/assets/WorkflowsOverview-BcUgBvjD.js +0 -2
- package/dashboard/dist/assets/YamlWorkflowsPage-OhpCQJ0l.js +0 -2
- package/dashboard/dist/assets/capabilities-t-w5N9K9.js +0 -2
- package/dashboard/dist/assets/escalation-DilnDxw2.js +0 -2
- package/dashboard/dist/assets/escalation-columns-C0slywOY.js +0 -2
- package/dashboard/dist/assets/helpers-BMvPqQr8.js +0 -2
- package/dashboard/dist/assets/index-30-pN97P.js +0 -2
- package/dashboard/dist/assets/index-Bl9wzQ8Q.js +0 -2
- package/dashboard/dist/assets/index-BxOuF0hm.js +0 -2
- package/dashboard/dist/assets/index-Ck2QdJXT.js +0 -6
- package/dashboard/dist/assets/index-DNmlrCAp.js +0 -2
- package/dashboard/dist/assets/index-DPW_i3fH.js +0 -6
- package/dashboard/dist/assets/index-DZX-E_3q.js +0 -63
- package/dashboard/dist/assets/index-DZX-E_3q.js.map +0 -1
- package/dashboard/dist/assets/index-D_wqdvG_.js +0 -15
- package/dashboard/dist/assets/index-DnsVYMMg.js +0 -2
- package/dashboard/dist/assets/index-H5TlloTk.js +0 -2
- package/dashboard/dist/assets/index-f-0Duls3.js +0 -2
- package/dashboard/dist/assets/index-pIMl0mYp.js +0 -2
- package/dashboard/dist/assets/index-qNuxC8kX.js +0 -2
- package/dashboard/dist/assets/namespaces-6qWDXXJV.js +0 -2
- package/dashboard/dist/assets/vendor-query-B2UbickB.js +0 -18
- package/dashboard/dist/assets/vendor-query-B2UbickB.js.map +0 -1
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js +0 -22
- package/dashboard/dist/assets/vendor-react-CX88sFS5.js.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-query-B2UbickB.js";import{U as r}from"./vendor-icons-B_Yla7iD.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-BOBytzrP.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-Dtj0uabn.js";import{D as C}from"./DataTable-D9yuBv0w.js";import{C as v}from"./ConfirmDeleteModal-dOxidrSR.js";import{P as k}from"./PageHeader-B_gV_jKk.js";import{M as w}from"./Modal-DEODGeqx.js";import{R as _}from"./RolePill-BOBytzrP.js";import{R,a as S}from"./RowActions-Dg-Fsm5O.js";import{n as P}from"./vendor-icons-B_Yla7iD.js";import"./index-DZX-E_3q.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-BH7KASM7.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-DuAZgHbJ.js";import{j as m}from"./index-DZX-E_3q.js";import{a as o,a9 as x}from"./vendor-icons-B_Yla7iD.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-_QbJKhlo.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-query-B2UbickB.js";import{b as i,a3 as x}from"./vendor-icons-B_Yla7iD.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-uqa4eBqm.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,d as L,J as w,f as I,C as Y}from"./index-DZX-E_3q.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:i}){const r=i?O(i.envelope):null,d=i?O(i.data):null;return!i&&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:c=>c.stopPropagation(),children:s.attributes.child_workflow_id})]})}):i?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/${i.workflow_id}`,className:"text-xs font-mono text-accent hover:underline",onClick:c=>c.stopPropagation(),children:i.workflow_id}),t.jsx(J,{status:i.status}),i.completed_at&&t.jsxs("span",{className:"text-[10px] text-text-tertiary",children:["Completed ",t.jsx(L,{date:i.completed_at,format:"relative"})]})]}),(r!=null||d!=null)&&t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[r!=null?t.jsx(w,{data:r,label:"Input (Envelope)",variant:"panel"}):t.jsx("div",{}),d!=null?t.jsx(w,{data:d,label:"Output (Result)",variant:"panel"}):t.jsx("div",{})]})]}):null}function G({event:s,childTask:i}){const r=s.attributes.input,d=s.attributes.result,c=s.category==="signal",x=s.category==="activity",o=s.category==="child_workflow",m=r!==void 0&&(x||o),p=!i&&d!==void 0&&(x||o),l=s.attributes.activity_type==="ltSignalParent"?"Signal Payload":"Result";return m||p?t.jsxs("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-4",children:[m?t.jsx(w,{data:r,label:"Input",variant:"panel"}):t.jsx("div",{}),p?t.jsx(w,{data:d,label:l,variant:"panel"}):t.jsx("div",{})]}):c&&r!==void 0?t.jsx(w,{data:r,label:"Signal Payload",variant:"panel"}):null}function H({event:s,childTask:i,pending:r=!1,onClose:d}){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"]})]}),d&&t.jsx("button",{onClick:d,className:"text-text-tertiary hover:text-text-primary text-xs",children:"Close"})]}),t.jsx(z,{event:s}),t.jsx(B,{event:s,childTask:i}),t.jsx(G,{event:s,childTask:i}),s.attributes.failure!==void 0&&t.jsx(w,{data:s.attributes.failure,label:"Failure"}),(()=>{const{kind:c,activity_type:x,result:o,timeline_key:m,execution_index:p,signal_name:l,input:_,child_workflow_id:N,awaited:g,wait_event_id:k,scheduled_event_id:h,initiated_event_id:u,failure:y,trace_id:v,span_id:E,...M}=s.attributes;return Object.keys(M).length>0?t.jsx(w,{data:M,label:"Attributes"}):null})()]})}const j={activity:{bar:"bg-blue-500",outline:"border border-blue-400/40 bg-blue-400/15",text:"text-blue-500",label:"Activities"},signal:{bar:"bg-emerald-500",outline:"border border-emerald-400/40 bg-emerald-400/15",text:"text-emerald-500",label:"Signals"},timer:{bar:"bg-status-warning",outline:"border border-amber-400/40 bg-amber-400/15",text:"text-status-warning",label:"Timers"},child_workflow:{bar:"bg-violet-500",outline:"border border-violet-400/40 bg-violet-400/15",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,i){if(!s||typeof s!="string")return s??"";if(s.length<=i)return s;const r=Math.floor((i-1)/2);return`${s.slice(0,r)}…${s.slice(s.length-r)}`}function Q(s){const i=[],r=new Map,d=new Map;for(const x of s){const o=x.attributes.timeline_key;if(!o)continue;const m=x.event_type;m==="activity_task_scheduled"||m==="timer_started"||m==="child_workflow_execution_started"||m==="signal_wait_started"?r.set(o,x):d.set(o,x)}const c=new Set;for(const x of s){const o=x.attributes.timeline_key;if(o&&c.has(o))continue;o&&c.add(o);const m=o?r.get(o):void 0,p=o?d.get(o):void 0,l=p||m||x,_=l.category,N=String(l.attributes.activity_type||l.attributes.signal_name||l.attributes.child_workflow_id||l.event_type||"unknown"),g=m||l,k=p,h=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-h):l.duration_ms!==null?(y=l.duration_ms,u=h+y):v=!0,i.push({category:_,name:N||l.event_type,startTime:h,endTime:u,duration:y,eventId:l.event_id,pending:v})}return i}function st({events:s,childTasks:i,outline:r}){const[d,c]=D.useState(new Set),[x,o]=D.useState(null),p=s.filter(e=>e.category!=="workflow");if(p.length===0)return null;const l=Q(p);if(l.length===0)return null;const _=Date.now(),N=l.flatMap(e=>{const n=[e.startTime];return e.endTime?n.push(e.endTime):n.push(_),n}),g=Math.min(...N),h=Math.max(...N)-g||1,u=new Map;for(const e of l){const n=`${e.category}:${e.name}`,a=e.startTime-g,b=(e.endTime?e.endTime-g:_-g)-a,S={eventId:e.eventId,startPct:a/h*100,widthPct:Math.max(b/h*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(n)||u.set(n,{name:e.name,category:e.category,segments:[]}),u.get(n).segments.push(S)}const y=Array.from(u.values()),v=5,E=Array.from({length:v+1},(e,n)=>({pct:n/v*100,label:I(Math.round(n/v*h))})),M=[...new Set(l.map(e=>e.category))],R=e=>{if(!(i!=null&&i.length))return;const n=e.attributes.activity_type;if(n)return i.find(a=>a.workflow_type===n)},$=e=>{c(n=>{const a=new Set(n);return a.has(e)?a.delete(e):a.add(e),a})},C=l.map(e=>e.eventId),P=C.length>0&&C.every(e=>d.has(e)),V=()=>{c(P?new Set:new Set(C))},T=(e,n)=>{var a,f;return n?F:r?((a=j[e])==null?void 0:a.outline)??"border-text-tertiary bg-transparent":((f=j[e])==null?void 0:f.bar)??"bg-text-tertiary"},W=e=>{var n;return r?((n=j[e])==null?void 0:n.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 n,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 ${((n=j[e])==null?void 0:n.outline)??"border-text-tertiary"}`:((a=j[e])==null?void 0:a.bar)??"bg-text-tertiary"}`}),t.jsx("span",{className:"text-[9px] text-text-tertiary",children:((f=j[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 n=j[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 ${(n==null?void 0:n.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,b=d.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 ${b?`${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:b?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=d.has(a.eventId),b=p.find(S=>S.event_id===a.eventId);return t.jsx(Y,{open:f,children:b&&t.jsx("div",{className:"py-3",children:t.jsx(H,{event:b,childTask:R(b),pending:a.pending,onClose:()=>$(b.event_id)})})},a.eventId)})]},`${e.category}:${e.name}`)})]})}export{H as E,st as S};
|
|
2
|
-
//# sourceMappingURL=SwimlaneTimeline-og79Llvs.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-B_Yla7iD.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-D3f11sbM.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-query-B2UbickB.js";import{d as c}from"./tasks-BevFBjZq.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-DZX-E_3q.js";import{P as p}from"./PageHeader-B_gV_jKk.js";import{e as j,L as u}from"./vendor-react-CX88sFS5.js";import"./vendor-icons-B_Yla7iD.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-DPV4ySd9.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TaskDetailPage-DPV4ySd9.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-B_Yla7iD.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-Bc45J7X1.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as t}from"./vendor-query-B2UbickB.js";import{c as u}from"./tasks-BevFBjZq.js";import{u as g}from"./workflows-Do-Eiv8f.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-W7TdJpV-.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-B_gV_jKk.js";import{W as _}from"./WorkflowPill-Bg2-0Hkg.js";import{c as j}from"./vendor-react-CX88sFS5.js";import"./index-DZX-E_3q.js";import"./vendor-icons-B_Yla7iD.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-BYj3OqUi.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-query-B2UbickB.js";import{d as r}from"./index-DZX-E_3q.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-Bi2nc9Q_.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as o}from"./vendor-query-B2UbickB.js";import{ac as a}from"./vendor-icons-B_Yla7iD.js";const c=["Describe","Discover","Compile","Deploy","Test","Verify"];function f(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{c as S,x as T,d as b,m as e,f as m};
|
|
2
|
-
//# sourceMappingURL=ToolPill-CuoXcmhv.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-CjXjDZI0.js";import{J as A}from"./index-DZX-E_3q.js";import{R as L}from"./RunAsSelector-_QbJKhlo.js";import{b as z,T as F}from"./ToolPill-CuoXcmhv.js";import{S as I}from"./ServerName-uqa4eBqm.js";import{X as M,ab as _,P as B,a3 as J,a8 as D}from"./vendor-icons-B_Yla7iD.js";import{L as E}from"./vendor-react-CX88sFS5.js";function U({error:n}){const r=n instanceof Error?n.message:"";return r.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:r}),e.jsxs(E,{to:"/credentials",className:"text-[11px] text-accent hover:underline inline-flex items-center gap-1",children:["Go to Credentials ",e.jsx(J,{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:r||"Tool call failed"})})}function $({data:n}){const r=n==null?void 0:n.result,a=r==null?void 0:r.job_id,u=(r==null?void 0:r.namespace)||"longtail";return a?e.jsxs(E,{to:`/mcp/executions/${encodeURIComponent(a)}?namespace=${encodeURIComponent(u)}`,className:"inline-flex items-center gap-1.5 text-xs text-accent hover:underline",children:[e.jsx(J,{size:12}),"View Execution"]}):null}const N="input text-xs",R="label";function K({value:n,onChange:r,className:a}){const[u,t]=m.useState(n.join(", ")),o=()=>r(u.split(",").map(c=>c.trim()).filter(Boolean));return m.useEffect(()=>{t(n.join(", "))},[JSON.stringify(n)]),e.jsx("input",{type:"text",value:u,onChange:c=>t(c.target.value),onBlur:o,onKeyDown:c=>{c.key==="Enter"&&(c.preventDefault(),o())},placeholder:"comma-separated values",className:a})}function ee({serverId:n,serverName:r,tool:a,onClose:u}){const t=k(),[o,c]=m.useState(!1),[x,p]=m.useState({}),[g,b]=m.useState(""),[S,y]=m.useState(""),[v,O]=m.useState("");m.useEffect(()=>{const s=z(a.inputSchema);p(s),b(JSON.stringify(s,null,2)),c(!1),y(""),t.reset()},[a.name,n]);const q=!!t.data||!!t.error,T=()=>{if(!o)b(JSON.stringify(x,null,2));else try{p(JSON.parse(g))}catch{}c(!o)},P=()=>{y(""),t.reset();let s;if(o)try{s=JSON.parse(g)}catch{y("Invalid JSON");return}else s={...x};t.mutate({serverId:n,toolName:a.name,arguments:s,...v?{execute_as:v}:{}})};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:r,serverId:n,short:!1}),e.jsx("div",{children:e.jsx(F,{name:a.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:[a.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:a.description})}),e.jsxs("div",{children:[e.jsx("label",{className:R,children:"run as"}),e.jsx(L,{selected:v,onChange:O})]}),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:g,onChange:s=>b(s.target.value),className:"input-json w-full",rows:6,spellCheck:!1}):e.jsxs("div",{className:"space-y-3",children:[Object.entries(x).sort(([s],[i])=>{var f;const l=((f=a.inputSchema)==null?void 0:f.required)??[],j=l.indexOf(s),h=l.indexOf(i);return j!==-1&&h!==-1?j-h:j!==-1?-1:h!==-1?1:s.localeCompare(i)}).map(([s,i])=>{var f,C,w;const l=(C=(f=a.inputSchema)==null?void 0:f.properties)==null?void 0:C[s],j=l==null?void 0:l.description,h=(((w=a.inputSchema)==null?void 0:w.required)??[]).includes(s);return e.jsxs("div",{children:[e.jsxs("label",{className:R,children:[s,h&&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:N,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:N}):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:`${N} 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:N,placeholder:(l==null?void 0:l.type)==="string"&&(l==null?void 0:l.example)||""}),j&&e.jsx("p",{className:"text-[9px] text-text-quaternary/70 mt-0.5 leading-snug",children:j})]},s)}),Object.keys(x).length===0&&e.jsx("p",{className:"text-[11px] text-text-quaternary",children:"No parameters"})]}),S&&e.jsx("p",{className:"text-[11px] text-status-error mt-1",children:S})]}),e.jsx("button",{onClick:P,disabled:t.isPending,className:"btn-primary text-xs disabled:opacity-50 inline-flex items-center gap-1.5",children:t.isPending?"Running...":q?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-Dl3C53zb.js.map
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import{a as c,j as e}from"./vendor-query-B2UbickB.js";import{a as U,b as $,c as B}from"./topics-BMG5tx2g.js";import{d as h,J as C}from"./index-DZX-E_3q.js";import{L as I}from"./ListToolbar-DNAGFe14.js";import{R as n,B as M,J as z,n as A,aL as V,X as G,T as H,a as _}from"./vendor-icons-B_Yla7iD.js";import{e as K,c as X}from"./vendor-react-CX88sFS5.js";const Y={task:"bg-blue-400/15 text-blue-400",workflow:"bg-accent/15 text-accent",escalation:"bg-amber-400/15 text-amber-400",activity:"bg-cyan-400/15 text-cyan-400",knowledge:"bg-violet-400/15 text-violet-400",agent:"bg-emerald-400/15 text-emerald-400",app:"bg-rose-400/15 text-rose-400",milestone:"bg-violet-400/15 text-violet-400"};function l({icon:r,color:d,children:i}){return e.jsxs("div",{className:"flex items-center gap-2 mb-3 pb-2 border-b border-surface-border",children:[e.jsx(r,{className:`w-4 h-4 ${d}`,strokeWidth:1.5}),e.jsx("h2",{className:"text-xs font-semibold uppercase tracking-widest text-accent/80",children:i})]})}function ne(){var w,S,k;const{topic:r}=K(),d=r?decodeURIComponent(r):null,i=X(),{data:t,isLoading:T,refetch:u,isFetching:E}=U(d),j=$(),q=B(),[a,x]=c.useState(!1),[g,f]=c.useState(""),[b,N]=c.useState(""),[m,y]=c.useState(""),[v,o]=c.useState("");if(T)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(!t)return e.jsxs("div",{className:"flex flex-col items-center justify-center py-20 text-center",children:[e.jsx(n,{className:"w-12 h-12 text-text-quaternary mb-4",strokeWidth:1}),e.jsx("h2",{className:"text-lg font-medium text-text-primary mb-2",children:"Topic not found"})]});const P=t.source==="system",D=!t.managed,O=Y[t.category]??"bg-zinc-400/15 text-zinc-400",R=()=>{f(t.description??""),N((t.tags??[]).join(", ")),y(t.payload_schema?JSON.stringify(t.payload_schema,null,2):""),o(""),x(!0)},J=()=>x(!1),W=()=>{const s=b.split(",").map(L=>L.trim()).filter(Boolean);let p;if(m.trim())try{p=JSON.parse(m),o("")}catch{o("Invalid JSON");return}j.mutate({topic:t.topic,description:g,tags:s,...p!==void 0?{payload_schema:p}:{}},{onSuccess:()=>{x(!1),u()}})},F=()=>{confirm(`Delete topic "${t.topic}"?
|
|
2
|
-
|
|
3
|
-
This removes it from the catalog. Active subscriptions are not affected.`)&&q.mutate(t.topic,{onSuccess:()=>i("/topics")})};return e.jsxs("div",{className:"max-w-3xl",children:[e.jsxs("div",{className:"flex items-start justify-between mb-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx(n,{className:"w-5 h-5 text-accent",strokeWidth:1.5}),e.jsx("h1",{className:"text-lg font-mono font-medium text-text-primary",children:t.topic}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:topics.md"},className:"text-text-quaternary hover:text-accent transition-colors",title:"Topic docs",children:e.jsx(M,{className:"w-4 h-4",strokeWidth:1.5})})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium ${O}`,children:t.category}),e.jsxs("span",{className:"text-[10px] font-mono text-text-quaternary",children:["source: ",t.source]}),t.last_seen_at&&e.jsxs("span",{className:"text-[10px] text-text-quaternary",children:["last seen ",e.jsx(h,{date:t.last_seen_at})]})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(I,{onRefresh:()=>u(),isFetching:E,apiPath:`/topics/by-name/${encodeURIComponent(t.topic)}`}),!a&&D&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:R,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-accent text-text-inverse hover:bg-accent-hover transition-colors",children:[e.jsx(z,{className:"w-3 h-3"})," Edit"]}),!P&&e.jsxs("button",{onClick:F,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md text-red-400/60 hover:text-red-400 hover:bg-red-600/10 transition-colors",children:[e.jsx(A,{className:"w-3 h-3"})," Delete"]})]}),a&&e.jsxs(e.Fragment,{children:[e.jsxs("button",{onClick:W,disabled:j.isPending,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md bg-accent text-text-inverse hover:bg-accent-hover transition-colors",children:[e.jsx(V,{className:"w-3 h-3"})," Save"]}),e.jsxs("button",{onClick:J,className:"flex items-center gap-1.5 px-3 py-1.5 text-xs rounded-md text-text-tertiary hover:text-text-primary hover:bg-surface-hover transition-colors",children:[e.jsx(G,{className:"w-3 h-3"})," Cancel"]})]})]})]}),e.jsx("div",{className:"mb-8",children:a?e.jsxs("div",{children:[e.jsx("label",{className:"section-header",children:"Description"}),e.jsx("textarea",{value:g,onChange:s=>f(s.target.value),rows:3,className:"input resize-none",placeholder:"What this topic represents"})]}):t.description?e.jsx("p",{className:"text-sm text-text-secondary leading-relaxed",children:t.description}):e.jsx("p",{className:"text-sm text-text-quaternary italic",children:"No description"})}),e.jsx("div",{className:"mb-8",children:a?e.jsxs("div",{children:[e.jsx("label",{className:"section-header",children:"Tags"}),e.jsx("input",{type:"text",value:b,onChange:s=>N(s.target.value),placeholder:"lifecycle, core, error",className:"input font-mono"}),e.jsx("p",{className:"hint",children:"Comma-separated. Used for filtering in the catalog."})]}):((w=t.tags)==null?void 0:w.length)>0?e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(H,{className:"w-3 h-3 text-text-quaternary",strokeWidth:1.5}),t.tags.map(s=>e.jsx("span",{className:"inline-flex items-center px-2 py-0.5 rounded text-[10px] font-mono text-text-tertiary bg-surface-sunken",children:s},s))]}):null}),e.jsx("div",{className:"mb-8",children:a?e.jsxs("div",{children:[e.jsx("label",{className:"section-header",children:"Payload Schema"}),e.jsx("textarea",{value:m,onChange:s=>{y(s.target.value),o("")},rows:12,className:"input-json w-full",placeholder:`{
|
|
4
|
-
"type": "object",
|
|
5
|
-
"properties": {
|
|
6
|
-
"orderId": { "type": "string" }
|
|
7
|
-
}
|
|
8
|
-
}`}),v&&e.jsx("p",{className:"text-[10px] text-red-400 mt-1",children:v}),e.jsx("p",{className:"hint",children:"JSON Schema describing the event.data shape. Shown in subscription editor as field reference."})]}):t.payload_schema?e.jsxs(e.Fragment,{children:[e.jsx(l,{icon:n,color:"text-accent",children:"Payload Schema"}),e.jsx(C,{data:t.payload_schema})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{icon:n,color:"text-accent",children:"Payload Schema"}),e.jsx("p",{className:"text-[11px] text-text-quaternary",children:"No schema defined. Click Edit to add one."})]})}),t.example_payload&&e.jsxs("div",{className:"mb-8",children:[e.jsx(l,{icon:n,color:"text-cyan-400",children:"Example Payload"}),e.jsx(C,{data:t.example_payload})]}),e.jsxs("div",{className:"mb-8",children:[e.jsxs(l,{icon:_,color:"text-emerald-400",children:["Subscribers (",((S=t.subscribers)==null?void 0:S.length)??0,")"]}),(k=t.subscribers)!=null&&k.length?e.jsx("div",{className:"space-y-1",children:t.subscribers.map(s=>e.jsxs("div",{className:"flex items-center justify-between py-2 px-3 rounded-md hover:bg-surface-hover transition-colors",children:[e.jsxs("button",{onClick:()=>i(`/agents/${s.agent_id}`),className:"flex items-center gap-2 text-left min-w-0",children:[e.jsx(_,{className:"w-3 h-3 text-emerald-400 shrink-0",strokeWidth:1.5}),e.jsx("span",{className:"text-xs text-text-primary hover:text-accent transition-colors",children:s.agent_name})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("span",{className:"text-[10px] font-mono text-text-quaternary",children:s.topic}),e.jsx("span",{className:"text-[10px] text-text-tertiary",children:s.reaction_type})]})]},s.id))}):e.jsx("p",{className:"text-[11px] text-text-quaternary py-2",children:"No agents are subscribed to this topic."})]}),e.jsxs("div",{className:"text-[10px] text-text-quaternary space-y-1 pt-4 border-t border-surface-border",children:[e.jsxs("p",{children:["Created ",e.jsx(h,{date:t.created_at})]}),e.jsxs("p",{children:["Updated ",e.jsx(h,{date:t.updated_at})]})]})]})}export{ne as TopicDetailPage};
|
|
9
|
-
//# sourceMappingURL=TopicDetailPage-CjaZn4WP.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e}from"./vendor-query-B2UbickB.js";import{u as x}from"./topics-BMG5tx2g.js";import{u as m}from"./useFilterParams-DZCAaBC7.js";import{D as g}from"./DataTable-D9yuBv0w.js";import{S as u}from"./StickyPagination-F9FZsRy9.js";import{F as d,b}from"./FilterBar-Ck4K4rzu.js";import{P as f}from"./PageHeader-B_gV_jKk.js";import{L as y}from"./ListToolbar-DNAGFe14.js";import{d as h}from"./index-DZX-E_3q.js";import{R as j}from"./vendor-icons-B_Yla7iD.js";import{c as v}from"./vendor-react-CX88sFS5.js";import"./EmptyState-BcsfPq9T.js";const k={task:"bg-blue-400/15 text-blue-400",workflow:"bg-accent/15 text-accent",escalation:"bg-amber-400/15 text-amber-400",activity:"bg-cyan-400/15 text-cyan-400",knowledge:"bg-violet-400/15 text-violet-400",agent:"bg-emerald-400/15 text-emerald-400",app:"bg-rose-400/15 text-rose-400",milestone:"bg-violet-400/15 text-violet-400"},N=[{value:"task",label:"Task"},{value:"workflow",label:"Workflow"},{value:"escalation",label:"Escalation"},{value:"activity",label:"Activity"},{value:"knowledge",label:"Knowledge"},{value:"agent",label:"Agent"},{value:"app",label:"App"},{value:"milestone",label:"Milestone"}];function w({category:t}){const a=k[t]??"bg-zinc-400/15 text-zinc-400";return e.jsx("span",{className:`inline-flex items-center px-2 py-0.5 rounded text-[10px] font-medium ${a}`,children:t})}const P=[{key:"topic",label:"Topic",render:t=>e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx(j,{className:"w-3 h-3 shrink-0 text-text-quaternary",strokeWidth:1.5}),e.jsx("span",{className:"text-xs font-mono text-text-primary truncate",children:t.topic})]})},{key:"category",label:"Category",render:t=>e.jsx(w,{category:t.category}),className:"w-28"},{key:"description",label:"Description",render:t=>t.description?e.jsx("span",{className:"text-[11px] text-text-secondary truncate block max-w-xs",children:t.description}):e.jsx("span",{className:"text-text-quaternary",children:"—"})},{key:"source",label:"Source",render:t=>e.jsx("span",{className:"text-[10px] font-mono text-text-tertiary",children:t.source}),className:"w-24"},{key:"subscriber_count",label:"Subscribers",render:t=>{const a=t.subscriber_count??0;return a?e.jsx("span",{className:"inline-flex items-center justify-center min-w-[20px] px-1.5 py-0.5 rounded-full text-[10px] font-medium bg-accent/15 text-accent",children:a}):e.jsx("span",{className:"text-text-quaternary",children:"—"})},className:"w-24 text-center"},{key:"last_seen_at",label:"Last Seen",render:t=>t.last_seen_at?e.jsx("span",{className:"whitespace-nowrap",children:e.jsx(h,{date:t.last_seen_at})}):e.jsx("span",{className:"text-text-quaternary",children:"—"}),className:"w-28"}];function D(){const t=v(),{filters:a,setFilter:n,pagination:s}=m({filters:{category:""}}),{data:o,isLoading:l,refetch:c,isFetching:p}=x({category:a.category||void 0,limit:s.pageSize,offset:s.offset}),i=(o==null?void 0:o.total)??0;return e.jsxs("div",{children:[e.jsx(f,{title:"Topic Catalog",docsHash:"#docs:topics.md"}),e.jsx(d,{actions:e.jsx(y,{onRefresh:()=>c(),isFetching:p,apiPath:`/topics?limit=${s.pageSize}&offset=${s.offset}${a.category?`&category=${a.category}`:""}`}),children:e.jsx(b,{label:"Category",value:a.category,onChange:r=>n("category",r),options:N})}),e.jsx(g,{columns:P,data:(o==null?void 0:o.topics)??[],keyFn:r=>r.topic,onRowClick:r=>t(`/topics/${encodeURIComponent(r.topic)}`),isLoading:l,emptyMessage:"No topics registered yet"}),e.jsx(u,{page:s.page,totalPages:s.totalPages(i),onPageChange:s.setPage,total:i,pageSize:s.pageSize,onPageSizeChange:s.setPageSize})]})}export{D as TopicsPage};
|
|
2
|
-
//# sourceMappingURL=TopicsPage-BfsJEC1p.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as r}from"./vendor-query-B2UbickB.js";import{a as t}from"./users-XZ349b0r.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-b4baWHM_.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,a as b}from"./vendor-query-B2UbickB.js";import{a as S,g as L}from"./workflows-Do-Eiv8f.js";import{h as P}from"./useEventHooks-CPyvFlVR.js";import{u as R}from"./useCollapsedSections-BU5HULGs.js";import{b as A,e as D}from"./tasks-BevFBjZq.js";import{d as y,D as V,J as N,e as K}from"./index-DZX-E_3q.js";import{P as Q}from"./PageHeader-B_gV_jKk.js";import{C as k}from"./CollapsibleSection-DnoUFQVf.js";import{L as U}from"./ListToolbar-DNAGFe14.js";import{S as _}from"./StatusBadge-XQlNFwmH.js";import{C as z}from"./CopyableId-D0SQ39nR.js";import{L as f,e as B,u as H,c as J}from"./vendor-react-CX88sFS5.js";import{S as M}from"./SwimlaneTimeline-og79Llvs.js";import{E as O}from"./EventTable-CGfJU7e1.js";import"./vendor-icons-B_Yla7iD.js";import"./FilterBar-Ck4K4rzu.js";function u({label:t,value:a,mono:r,truncate:s,children:i}){return e.jsxs("div",{children:[e.jsx("p",{className:"text-[10px] font-semibold uppercase tracking-widest text-text-tertiary mb-1",children:t}),i||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 q({execution:t,task:a,escalations:r}){const s=t.parent_workflow_id,n=a&&a.workflow_id===t.workflow_id?a.parent_workflow_id:null,d=s||n||null,c=d&&d!==t.workflow_id?d:null,{taskQueue:p,workflowType:o}=F(t.workflow_type);return e.jsxs("div",{className:"bg-surface-sunken/50 rounded-md px-6 py-5 mb-6",children:[e.jsxs("div",{className:"grid grid-cols-2 sm:grid-cols-4 gap-y-4 gap-x-8",children:[e.jsx(z,{label:"Workflow Type",value:o,href:`/workflows/executions?entity=${encodeURIComponent(o)}`}),e.jsx(u,{label:"Task Queue",value:p,mono:!0}),e.jsx(u,{label:"Start Time",children:t.start_time?e.jsx(y,{date:t.start_time,format:"datetime",className:"text-text-primary"}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"--"})}),e.jsx(u,{label:"End Time",children:t.close_time?e.jsx(y,{date:t.close_time,format:"datetime",className:"text-text-primary"}):e.jsx("span",{className:"text-xs text-text-tertiary",children:"--"})}),e.jsx(u,{label:"Duration",children:e.jsx(V,{ms:t.duration_ms,className:"font-mono text-text-primary"})}),e.jsx(u,{label:"History Size",value:`${t.summary.total_events} events`}),e.jsx(u,{label:"Activities",value:`${t.summary.activities.completed} / ${t.summary.activities.total}`}),e.jsx(u,{label:"Workflow ID",value:t.workflow_id,mono:!0,truncate:!0})]}),(c||r&&r.length>0)&&e.jsxs("div",{className:"mt-5 pt-4 border-t border-surface-border/50 space-y-3",children:[c&&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(f,{to:`/workflows/executions/${c}`,className:"text-xs font-mono text-accent hover:underline truncate",title:c,children:c})]}),!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(m=>e.jsxs(f,{to:`/escalations/detail/${m.id}`,className:"inline-flex items-center gap-1.5 text-xs font-mono text-accent hover:underline",children:[e.jsx("span",{children:m.type}),e.jsx(_,{status:m.status})]},m.id))})]})]})]})}function Z(t){var s;const a=t.events.find(i=>i.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 G({execution:t}){const a=Z(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 X({isRunning:t,hasToolCalls:a,workflowId:r,onAction:s}){const[i,n]=b.useState(!1),d=b.useRef(null);return b.useEffect(()=>{if(!i)return;const c=p=>{d.current&&!d.current.contains(p.target)&&n(!1)};return document.addEventListener("mousedown",c),()=>document.removeEventListener("mousedown",c)},[i]),e.jsxs("div",{className:"relative",ref:d,children:[e.jsx("button",{onClick:()=>n(!i),className:"btn-primary text-xs",children:"Actions"}),i&&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"),n(!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"),n(!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(f,{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:()=>n(!1),children:"Compile into Pipeline"}),e.jsx(f,{to:`/mcp/executions/${encodeURIComponent(r)}?namespace=durable`,className:"block w-full text-left px-4 py-2 text-xs text-text-secondary hover:bg-surface-hover",onClick:()=>n(!1),children:"View Raw Execution"})]})]})}function fe(){const{workflowId:t}=B(),{pathname:a}=H();P(t);const r=(a.startsWith("/workflows/durable/"),"Durable Execution"),{data:s,isLoading:i,error:n,refetch:d,isFetching:c}=S(t),{data:p}=A(t),{data:o}=D(t),{data:m}=K(t),E=J(),h=L(),{isCollapsed:w,toggle:v}=R("workflow-execution"),T=x=>{var l;if(x==="terminate")confirm("Are you sure you want to terminate this workflow?")&&h.mutate(t);else if(x==="restart"&&s){const W=s.workflow_id.replace(/-[A-Za-z0-9_-]{20,}$/,""),j=s.events.find($=>$.event_type==="workflow_execution_started"),g=(l=j==null?void 0:j.attributes)==null?void 0:l.input;g&&sessionStorage.setItem("lt:invoke:prefill",JSON.stringify(g)),E(`/workflows/start?type=${encodeURIComponent(W)}&mode=now`)}};if(i)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(n||!s){const x=(n==null?void 0:n.message)??"",l=x.includes("expired")||x.includes("no longer available");return e.jsxs("div",{children:[e.jsx(f,{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:l?"Execution data is no longer available":n?"Unable to load execution":"Execution not found"}),e.jsx("p",{className:"text-xs text-text-tertiary",children:l?"This workflow's underlying job has expired. The task record is preserved, but the execution timeline has been cleaned up.":x||"The workflow could not be resolved."})]})]})}const C=s.status!=="completed"&&s.status!=="failed",I=s.status==="completed"&&s.events.some(x=>{if(x.event_type!=="activity_task_completed")return!1;const l=x.attributes.activity_type;return l==="callDbTool"||l==="callVisionTool"||l==="callMcpTool"||(l==null?void 0:l.startsWith("mcp_"))});return e.jsxs("div",{children:[e.jsx(Q,{title:r,actions:e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx(U,{onRefresh:()=>d(),isFetching:c,apiPath:`/workflow-states/${t}/execution`}),e.jsx(_,{status:s.status}),e.jsx(X,{isRunning:C,hasToolCalls:I,workflowId:t,onAction:T})]})}),e.jsx(q,{execution:s,task:p,childTasks:o==null?void 0:o.tasks,escalations:m==null?void 0:m.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(k,{title:"Details",sectionKey:"details",isCollapsed:w("details"),onToggle:v,contentClassName:"mt-4 ml-9",children:e.jsx(G,{execution:s})}),e.jsx(k,{title:"Execution Timeline",sectionKey:"timeline",isCollapsed:w("timeline"),onToggle:v,contentClassName:"mt-4 ml-9",children:e.jsx(M,{events:s.events,childTasks:o==null?void 0:o.tasks})}),e.jsx(k,{title:"Events",sectionKey:"events",isCollapsed:w("events"),onToggle:v,contentClassName:"mt-4 ml-9",children:e.jsx(O,{events:s.events,childTasks:o==null?void 0:o.tasks})})]})]})}export{fe as WorkflowExecutionPage};
|
|
2
|
-
//# sourceMappingURL=WorkflowExecutionPage-BGmJnXnk.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./vendor-query-B2UbickB.js";import{c as d,Z as u,W as f,S as m,aa as h}from"./vendor-icons-B_Yla7iD.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 y(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[y(e)%s.length]}const C={certified:h,configured:m,pipeline:f,capability:u,durable:d},w={certified:"text-status-success",configured:"text-status-info"};function N({type:e,size:t="sm",certified:x,variant:r}){const a=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",l=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=C[o],b=w[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 ${a} font-mono text-text-secondary border border-surface-border rounded-lg`,style:{fontSize:l,lineHeight:1.1},children:[n.jsx(c,{className:`${i} shrink-0 ${p}`}),e]})}export{N as W};
|
|
2
|
-
//# sourceMappingURL=WorkflowPill-Bg2-0Hkg.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-Bi2nc9Q_.js";import{E as D}from"./ElapsedCell-CzVjr74Y.js";import{u as R,e as z,b as E}from"./workflows-Do-Eiv8f.js";import{j as W}from"./index-DZX-E_3q.js";import{b as A}from"./useEventHooks-CPyvFlVR.js";import{u as L}from"./useFilterParams-DZCAaBC7.js";import{D as M}from"./DataTable-D9yuBv0w.js";import{W as I}from"./WorkflowPill-Bg2-0Hkg.js";import{P as U}from"./PageHeader-B_gV_jKk.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-DNAGFe14.js";import{R as G,a as w}from"./RowActions-Dg-Fsm5O.js";import{r as J,S as V}from"./vendor-icons-B_Yla7iD.js";import{c as q}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(G,{children:[s.jsx(w,{icon:J,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:V,title:"View config",onClick:()=>a(`/workflows/registry/${encodeURIComponent(e.entity)}`)})]}),className:"w-24 text-right"}]}function xe({tier:d="all"}){A();const n=q(),{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-BzH7jMRu.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-Do-Eiv8f.js";import{b as $}from"./useEventHooks-CPyvFlVR.js";import{P as D}from"./PageHeader-B_gV_jKk.js";import{S as h}from"./StatCard-DlgF0CJC.js";import{c as w}from"./vendor-react-CX88sFS5.js";import"./index-DZX-E_3q.js";import"./vendor-icons-B_Yla7iD.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-BcUgBvjD.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-DolGRQ5f.js";import{a as q,d as Y}from"./useYamlActivityEvents-Bll8NPNQ.js";import{u as B}from"./useFilterParams-DZCAaBC7.js";import{u as D}from"./useExpandedRows-CkcEntB-.js";import{P}from"./PageHeader-B_gV_jKk.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-_QbJKhlo.js";import{b as A,T as G}from"./ToolPill-CuoXcmhv.js";import{X as L,a3 as X,ab as K,P as T,m as Q,ac as Z,a4 as ee,W as te}from"./vendor-icons-B_Yla7iD.js";import{L as se,c as re}from"./vendor-react-CX88sFS5.js";import{S as w}from"./index-DZX-E_3q.js";import{d as M,C as ae}from"./helpers-BMvPqQr8.js";import{S as E}from"./StatusBadge-XQlNFwmH.js";import{S as ne}from"./ServerName-uqa4eBqm.js";import"./BotPicker-DuAZgHbJ.js";import"./bots-B0BomNnf.js";import"./TimeAgo-W7TdJpV-.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-OhpCQJ0l.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{a,j as r}from"./vendor-query-B2UbickB.js";import{w as l,x as c,y as m}from"./index-DZX-E_3q.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-DilnDxw2.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-BOBytzrP.js";import{W as u}from"./WorkflowPill-Bg2-0Hkg.js";import{T as d}from"./TimestampCell-Bi2nc9Q_.js";import{C as y,i as h,a as j}from"./escalation-DilnDxw2.js";import{a3 as v,a4 as b,a5 as f,a6 as r}from"./vendor-icons-B_Yla7iD.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-C0slywOY.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as n}from"./vendor-query-B2UbickB.js";import{T as o}from"./TimeAgo-W7TdJpV-.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-BMvPqQr8.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-B_gV_jKk.js";import{F as le,a as ce}from"./FilterBar-Ck4K4rzu.js";import{L as de}from"./ListToolbar-DNAGFe14.js";import{S as xe}from"./StickyPagination-F9FZsRy9.js";import{E as Q}from"./EmptyState-BcsfPq9T.js";import{D as me}from"./DropZone-e5EOL5gC.js";import{T as B}from"./TimeAgo-W7TdJpV-.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-D01NdF5h.js";import{T as je}from"./TagInput-D3f11sbM.js";import{n as ye,X as be,Y as Z,d as X,m as ee,D as te,aB as se}from"./vendor-icons-B_Yla7iD.js";import{a as Ne,f as ve}from"./vendor-react-CX88sFS5.js";import"./index-DZX-E_3q.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 _(){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 Y(t){t.key==="Escape"?(E(""),n("")):t.key==="Enter"&&(t.metaKey||t.ctrlKey)&&(t.preventDefault(),_())}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(B,{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:Y,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:Y,placeholder:"value"}),j.trim()&&e.jsxs("div",{className:"flex gap-2 mt-1.5",children:[e.jsx("button",{onClick:_,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(Q,{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(B,{date:s.latest})})]},s.domain))})]}):J.length===0?e.jsx("div",{className:"cursor-pointer",onClick:()=>{g(void 0),f(!0)},children:e.jsx(Q,{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(B,{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-30-pN97P.js.map
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{u as $,j as t,a as y}from"./vendor-query-B2UbickB.js";import{a as D}from"./vendor-react-CX88sFS5.js";import{b as M,S as d,J as R,d as A}from"./index-DZX-E_3q.js";import{a as L}from"./controlplane-BrtAZnJM.js";import{u as O}from"./useFilterParams-DZCAaBC7.js";import{D as z}from"./DataTable-D9yuBv0w.js";import{S as E}from"./StickyPagination-F9FZsRy9.js";import{F as I,b,a as J}from"./FilterBar-Ck4K4rzu.js";import{T as j}from"./TimestampCell-Bi2nc9Q_.js";import{P as q}from"./PageHeader-B_gV_jKk.js";import{L as U}from"./ListToolbar-DNAGFe14.js";import{r as W,X as g}from"./vendor-icons-B_Yla7iD.js";import"./EmptyState-BcsfPq9T.js";function B(e){const a=new URLSearchParams;return a.set("namespace",e.namespace),a.set("source",e.source),e.limit&&a.set("limit",String(e.limit)),e.offset&&a.set("offset",String(e.offset)),e.sort_by&&a.set("sort_by",e.sort_by),e.order&&a.set("order",e.order),e.status&&a.set("status",e.status),e.stream_name&&a.set("stream_name",e.stream_name),e.msg_type&&a.set("msg_type",e.msg_type),e.topic&&a.set("topic",e.topic),e.workflow_name&&a.set("workflow_name",e.workflow_name),e.jid&&a.set("jid",e.jid),e.aid&&a.set("aid",e.aid),M(`/controlplane/stream-messages?${a}`)}function H(e){return $({queryKey:["controlplane","stream-messages",e],queryFn:()=>B(e),enabled:!!e.namespace,staleTime:15e3})}const _={pending:"bg-text-tertiary",claimed:"bg-status-warning",processed:"bg-status-success",dead_lettered:"bg-status-error"},f={pending:"Pending",claimed:"Claimed",processed:"Processed",dead_lettered:"Dead Lettered"},N="inline-block px-1.5 py-0.5 text-[10px] font-mono rounded bg-surface-sunken text-text-secondary",K=[{value:"pending",label:"Pending"},{value:"claimed",label:"Claimed"},{value:"processed",label:"Processed"},{value:"dead_lettered",label:"Dead Lettered"}],V=[{value:"engine",label:"Engine"},{value:"worker",label:"Worker"}];function m({label:e,value:a}){return a?t.jsxs("div",{children:[t.jsx("span",{className:"text-text-tertiary",children:e}),t.jsx("div",{className:"mt-0.5",children:t.jsx(A,{date:a,format:"datetime"})})]}):null}function x({label:e,value:a}){return a?t.jsxs("div",{children:[t.jsx("span",{className:"text-text-tertiary",children:e}),t.jsx("p",{className:"text-xs text-text-primary font-mono break-all",children:a})]}):null}function l({label:e,value:a,onFilter:r}){return a?t.jsxs("div",{children:[t.jsx("span",{className:"text-text-tertiary",children:e}),t.jsxs("button",{onClick:()=>r==null?void 0:r(a),className:"flex items-center gap-1 group text-left w-full",title:`Filter by ${e.toLowerCase()}: ${a}`,children:[t.jsx("p",{className:"text-xs text-text-primary font-mono break-all group-hover:text-accent transition-colors",children:a}),t.jsx(W,{className:"w-2.5 h-2.5 shrink-0 text-text-quaternary opacity-0 group-hover:opacity-100 transition-opacity"})]})]}):null}function G({message:e,filters:a}){return e?t.jsxs("div",{className:"space-y-5 text-[11px]",children:[t.jsxs("div",{children:[t.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[t.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${_[e.status]}`}),t.jsx(l,{label:"",value:f[e.status],onFilter:()=>{var r;return(r=a==null?void 0:a.onFilterStatus)==null?void 0:r.call(a,e.status)}}),t.jsx("span",{className:N,children:e.source})]}),t.jsx(l,{label:"",value:e.stream_name,onFilter:()=>{var r;return(r=a==null?void 0:a.onFilterStreamName)==null?void 0:r.call(a,e.stream_name)}}),t.jsxs("p",{className:"text-[10px] text-text-tertiary mt-0.5",children:["ID: ",e.id]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(d,{children:"Timestamps"}),t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[t.jsx(m,{label:"Created",value:e.created_at}),t.jsx(m,{label:"Reserved",value:e.reserved_at}),t.jsx(m,{label:"Processed",value:e.expired_at}),t.jsx(m,{label:"Dead-lettered",value:e.dead_lettered_at})]})]}),t.jsxs("div",{className:"space-y-2",children:[t.jsx(d,{children:"Metadata"}),t.jsxs("div",{className:"grid grid-cols-2 gap-2",children:[t.jsx(x,{label:"Priority",value:String(e.priority)}),t.jsx(x,{label:"Retries",value:`${e.retry_attempt} / ${e.max_retry_attempts}`}),t.jsx(x,{label:"Reserved by",value:e.reserved_by})]})]}),e.jid&&t.jsxs("div",{className:"space-y-2",children:[t.jsx(d,{children:"Job"}),t.jsx("div",{className:"grid grid-cols-1 gap-2",children:t.jsx(l,{label:"Job ID",value:e.jid,onFilter:a==null?void 0:a.onFilterJid})})]}),e.source==="worker"&&t.jsxs("div",{className:"space-y-2",children:[t.jsx(d,{children:"Worker Details"}),t.jsxs("div",{className:"grid grid-cols-1 gap-2",children:[t.jsx(l,{label:"Workflow",value:e.workflow_name,onFilter:a==null?void 0:a.onFilterWorkflow}),t.jsx(l,{label:"Activity",value:e.aid,onFilter:a==null?void 0:a.onFilterAid}),t.jsx(x,{label:"Dimension",value:e.dad}),t.jsx(l,{label:"Type",value:e.msg_type,onFilter:a==null?void 0:a.onFilterMsgType}),t.jsx(l,{label:"Topic",value:e.topic,onFilter:a==null?void 0:a.onFilterTopic})]})]}),t.jsx("div",{className:"space-y-2",children:t.jsx(R,{data:e.message,label:"Payload",defaultCollapsed:!1})})]}):null}function ce(){const{filters:e,setFilter:a,pagination:r,sort:u,setSort:k}=O({filters:{namespace:"durable",source:"worker",status:"",stream_name:"",msg_type:"",topic:"",workflow_name:"",jid:"",aid:""}}),[n,h]=y.useState(null),{data:c}=L(),w=y.useMemo(()=>((c==null?void 0:c.apps)??[]).map(s=>({value:s.appId,label:s.appId})),[c]),{data:o,isLoading:S,refetch:F,isFetching:P}=H({namespace:e.namespace||"durable",source:e.source||"worker",limit:r.pageSize,offset:r.offset,sort_by:u.sort_by||"created_at",order:u.order||"desc",status:e.status||void 0,stream_name:e.stream_name||void 0,msg_type:e.msg_type||void 0,topic:e.topic||void 0,workflow_name:e.workflow_name||void 0,jid:e.jid||void 0,aid:e.aid||void 0}),p=(o==null?void 0:o.messages)??[],v=(o==null?void 0:o.total)??0,i=y.useMemo(()=>n?p.find(s=>s.id===n.id&&s.source===n.source)??n:null,[p,n]),T=!!i,C=[{key:"status",label:"Status",render:s=>t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx("span",{className:`w-2 h-2 rounded-full shrink-0 ${_[s.status]}`}),t.jsx("span",{className:"text-xs",children:f[s.status]})]}),className:"w-28"},{key:"source",label:"Source",render:s=>t.jsx("span",{className:N,children:s.source}),className:"w-20"},{key:"stream_name",label:"Stream",sortable:!0,render:s=>t.jsx("span",{className:"font-mono text-xs text-text-secondary truncate block max-w-[240px]",title:s.stream_name,children:s.stream_name})},{key:"msg_type",label:"Type",render:s=>t.jsx("span",{className:"text-xs text-text-secondary",children:s.msg_type||"—"}),className:"w-24"},{key:"created_at",label:"Created",sortable:!0,render:s=>t.jsx(j,{date:s.created_at}),className:"w-44"},{key:"reserved_at",label:"Reserved",render:s=>s.reserved_at?t.jsx(j,{date:s.reserved_at}):t.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-44"},{key:"expired_at",label:"Processed",render:s=>s.expired_at?t.jsx(j,{date:s.expired_at}):t.jsx("span",{className:"text-xs text-text-tertiary",children:"—"}),className:"w-44"},{key:"priority",label:"Pri",sortable:!0,render:s=>t.jsx("span",{className:"text-xs text-text-secondary",children:s.priority}),className:"w-12 text-right"},{key:"retry_attempt",label:"Retries",render:s=>t.jsxs("span",{className:"text-xs text-text-secondary",children:[s.retry_attempt,"/",s.max_retry_attempts]}),className:"w-16"}];return t.jsxs("div",{children:[t.jsx(q,{title:"Messages",docsHash:"#docs:dashboard.md:messages"}),t.jsxs(I,{actions:t.jsx(U,{onRefresh:()=>F(),isFetching:P,apiPath:`/controlplane/stream-messages?namespace=${e.namespace||"durable"}&source=${e.source||"worker"}&limit=${r.pageSize}&offset=${r.offset}${e.status?`&status=${e.status}`:""}${e.stream_name?`&stream_name=${e.stream_name}`:""}`}),children:[t.jsx(b,{label:"Namespace",value:e.namespace,onChange:s=>a("namespace",s),options:w,required:!0}),t.jsx(b,{label:"Source",value:e.source,onChange:s=>a("source",s),options:V,required:!0}),t.jsx(b,{label:"Status",value:e.status,onChange:s=>a("status",s),options:K}),t.jsx(J,{label:"Stream",value:e.stream_name,onChange:s=>a("stream_name",s),placeholder:"Filter by stream name…"}),[{key:"topic",label:"Topic",value:e.topic},{key:"workflow_name",label:"Workflow",value:e.workflow_name},{key:"jid",label:"Job",value:e.jid},{key:"aid",label:"Activity",value:e.aid},{key:"msg_type",label:"Type",value:e.msg_type}].filter(s=>s.value).map(s=>t.jsxs("button",{onClick:()=>a(s.key,""),className:"inline-flex items-center gap-1 px-2 py-0.5 text-[10px] font-mono rounded-full bg-accent/15 text-accent hover:bg-accent/25 transition-colors",title:`Clear ${s.label} filter`,children:[s.label,": ",s.value,t.jsx(g,{className:"w-2.5 h-2.5"})]},s.key))]}),t.jsx(z,{columns:C,data:p,keyFn:s=>`${s.source}:${s.id}`,isLoading:S,emptyMessage:"No stream messages found",onRowClick:s=>h(s),activeRowKey:i?`${i.source}:${i.id}`:null,sort:u,onSort:k}),t.jsx(E,{page:r.page,totalPages:r.totalPages(v),onPageChange:r.setPage,total:v,pageSize:r.pageSize,onPageSizeChange:r.setPageSize}),T&&D.createPortal(t.jsxs("div",{className:"fixed right-0 bottom-0 w-[400px] z-40 border-l border-surface-border bg-surface overflow-y-auto shadow-lg",style:{top:"3.5rem"},children:[t.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between px-4 py-3 bg-surface border-b border-surface-border/50",children:[t.jsx("span",{className:"text-xs font-medium text-text-primary",children:"Message Detail"}),t.jsx("button",{onClick:()=>h(null),className:"p-1 rounded hover:bg-surface-hover text-text-tertiary hover:text-text-primary transition-colors",title:"Close",children:t.jsx(g,{className:"w-4 h-4"})})]}),t.jsx("div",{className:"px-4 py-4",children:t.jsx(G,{message:i,filters:{onFilterStatus:s=>a("status",s),onFilterStreamName:s=>a("stream_name",s),onFilterMsgType:s=>a("msg_type",s),onFilterTopic:s=>a("topic",s),onFilterWorkflow:s=>a("workflow_name",s),onFilterJid:s=>a("jid",s),onFilterAid:s=>a("aid",s)}})})]}),document.body)]})}export{ce as StreamMessagesPage};
|
|
2
|
-
//# sourceMappingURL=index-Bl9wzQ8Q.js.map
|