@hotmeshio/long-tail 0.10.10 → 0.10.11
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/escalations/list.js +11 -4
- package/build/api/roles.d.ts +2 -0
- package/build/api/roles.js +4 -0
- package/build/lib/db/schemas/025_ops_home_default.sql +11 -0
- package/build/modules/features.d.ts +9 -0
- package/build/modules/features.js +1 -0
- package/build/services/role/index.js +1 -0
- package/build/services/role/sql.d.ts +6 -2
- package/build/services/role/sql.js +11 -2
- package/build/services/role/types.d.ts +9 -0
- package/build/system/mcp-servers/admin/schemas.d.ts +3 -0
- package/build/system/mcp-servers/admin/schemas.js +1 -0
- package/build/system/mcp-servers/admin/users.js +1 -0
- package/build/system/seed/tool-manifests-admin.d.ts +82 -0
- package/build/system/seed/tool-manifests-admin.js +1 -1
- package/build/types/startup.d.ts +8 -0
- package/dashboard/dist/assets/{AdminDashboard-cGYuppUP.js → AdminDashboard-CkTbRfY9.js} +2 -2
- package/dashboard/dist/assets/{AdminDashboard-cGYuppUP.js.map → AdminDashboard-CkTbRfY9.js.map} +1 -1
- package/dashboard/dist/assets/{AgentConfigPage-DwaUyoCy.js → AgentConfigPage-Cm8FRpXi.js} +2 -2
- package/dashboard/dist/assets/{AgentConfigPage-DwaUyoCy.js.map → AgentConfigPage-Cm8FRpXi.js.map} +1 -1
- package/dashboard/dist/assets/{AgentDetailPage-DxpFaltM.js → AgentDetailPage-sQ1-UT46.js} +2 -2
- package/dashboard/dist/assets/{AgentDetailPage-DxpFaltM.js.map → AgentDetailPage-sQ1-UT46.js.map} +1 -1
- package/dashboard/dist/assets/{AgentsPage-ByOoA8oT.js → AgentsPage-bSx_mdae.js} +2 -2
- package/dashboard/dist/assets/{AgentsPage-ByOoA8oT.js.map → AgentsPage-bSx_mdae.js.map} +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-8pMC7Xv6.js +2 -0
- package/dashboard/dist/assets/AvailableEscalationsPage-8pMC7Xv6.js.map +1 -0
- package/dashboard/dist/assets/{BotPicker-Dohv8dhR.js → BotPicker-C4uGH2x9.js} +2 -2
- package/dashboard/dist/assets/{BotPicker-Dohv8dhR.js.map → BotPicker-C4uGH2x9.js.map} +1 -1
- package/dashboard/dist/assets/{CapabilitiesPage-DeijFG3J.js → CapabilitiesPage-BRoOeKcc.js} +2 -2
- package/dashboard/dist/assets/{CapabilitiesPage-DeijFG3J.js.map → CapabilitiesPage-BRoOeKcc.js.map} +1 -1
- package/dashboard/dist/assets/{CollapsibleSection-BPNwS4eO.js → CollapsibleSection-CIj8Adc9.js} +2 -2
- package/dashboard/dist/assets/{CollapsibleSection-BPNwS4eO.js.map → CollapsibleSection-CIj8Adc9.js.map} +1 -1
- package/dashboard/dist/assets/{ConfirmDeleteModal-DD7SEMeX.js → ConfirmDeleteModal-Ugi_9Ukq.js} +2 -2
- package/dashboard/dist/assets/{ConfirmDeleteModal-DD7SEMeX.js.map → ConfirmDeleteModal-Ugi_9Ukq.js.map} +1 -1
- package/dashboard/dist/assets/{CopyableId-BpB-NvDh.js → CopyableId-GUEdiiL5.js} +2 -2
- package/dashboard/dist/assets/{CopyableId-BpB-NvDh.js.map → CopyableId-GUEdiiL5.js.map} +1 -1
- package/dashboard/dist/assets/CountdownTimer-D3t0XMhE.js +2 -0
- package/dashboard/dist/assets/{CountdownTimer-BF71ldGF.js.map → CountdownTimer-D3t0XMhE.js.map} +1 -1
- package/dashboard/dist/assets/{CredentialsPage-oeNmMzTM.js → CredentialsPage-B73Si6K1.js} +2 -2
- package/dashboard/dist/assets/{CredentialsPage-oeNmMzTM.js.map → CredentialsPage-B73Si6K1.js.map} +1 -1
- package/dashboard/dist/assets/{CronLabel-CebR1m2k.js → CronLabel-Ca1aHolt.js} +2 -2
- package/dashboard/dist/assets/{CronLabel-CebR1m2k.js.map → CronLabel-Ca1aHolt.js.map} +1 -1
- package/dashboard/dist/assets/{CustomDurationPicker-Bh9QdBVw.js → CustomDurationPicker-_9E9x1YN.js} +2 -2
- package/dashboard/dist/assets/{CustomDurationPicker-Bh9QdBVw.js.map → CustomDurationPicker-_9E9x1YN.js.map} +1 -1
- package/dashboard/dist/assets/{DropZone-Bavzt2QR.js → DropZone-NYn6TWHz.js} +2 -2
- package/dashboard/dist/assets/{DropZone-Bavzt2QR.js.map → DropZone-NYn6TWHz.js.map} +1 -1
- package/dashboard/dist/assets/{ElapsedCell-Caa6CU_y.js → ElapsedCell-karxia93.js} +2 -2
- package/dashboard/dist/assets/{ElapsedCell-Caa6CU_y.js.map → ElapsedCell-karxia93.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationListSchemaPage-CAGfq0eK.js → EscalationListSchemaPage-CDaNmbUA.js} +2 -2
- package/dashboard/dist/assets/{EscalationListSchemaPage-CAGfq0eK.js.map → EscalationListSchemaPage-CDaNmbUA.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationSchemaPage-qDD4ur6P.js → EscalationSchemaPage-k-2hFT2t.js} +2 -2
- package/dashboard/dist/assets/{EscalationSchemaPage-qDD4ur6P.js.map → EscalationSchemaPage-k-2hFT2t.js.map} +1 -1
- package/dashboard/dist/assets/{EscalationsOverview-CC1wRTzy.js → EscalationsOverview-C1e7IPn_.js} +2 -2
- package/dashboard/dist/assets/{EscalationsOverview-CC1wRTzy.js.map → EscalationsOverview-C1e7IPn_.js.map} +1 -1
- package/dashboard/dist/assets/{EventTable-4JeTcXr_.js → EventTable-CIrrtL7_.js} +2 -2
- package/dashboard/dist/assets/{EventTable-4JeTcXr_.js.map → EventTable-CIrrtL7_.js.map} +1 -1
- package/dashboard/dist/assets/{FilterBar-BOV8DWIO.js → FilterBar-CzjtH74v.js} +2 -2
- package/dashboard/dist/assets/{FilterBar-BOV8DWIO.js.map → FilterBar-CzjtH74v.js.map} +1 -1
- package/dashboard/dist/assets/{GraphInvokePage-C0i1speW.js → GraphInvokePage-LMpWw8z1.js} +2 -2
- package/dashboard/dist/assets/{GraphInvokePage-C0i1speW.js.map → GraphInvokePage-LMpWw8z1.js.map} +1 -1
- package/dashboard/dist/assets/HomePage-Kl2DBG6l.js +2 -0
- package/dashboard/dist/assets/HomePage-Kl2DBG6l.js.map +1 -0
- package/dashboard/dist/assets/ListToolbar-B2fub0DY.js +2 -0
- package/dashboard/dist/assets/ListToolbar-B2fub0DY.js.map +1 -0
- package/dashboard/dist/assets/{McpOverview-Chn2zIXr.js → McpOverview-odYnCZCC.js} +2 -2
- package/dashboard/dist/assets/{McpOverview-Chn2zIXr.js.map → McpOverview-odYnCZCC.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryDetailPage-Cv1FKrvw.js → McpQueryDetailPage-BtqwHUAg.js} +2 -2
- package/dashboard/dist/assets/{McpQueryDetailPage-Cv1FKrvw.js.map → McpQueryDetailPage-BtqwHUAg.js.map} +1 -1
- package/dashboard/dist/assets/{McpQueryPage-Dzn8JE4E.js → McpQueryPage-CPkVwNIK.js} +2 -2
- package/dashboard/dist/assets/{McpQueryPage-Dzn8JE4E.js.map → McpQueryPage-CPkVwNIK.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunDetailPage-CuNtR4Ed.js → McpRunDetailPage-D-Rz9MRw.js} +2 -2
- package/dashboard/dist/assets/{McpRunDetailPage-CuNtR4Ed.js.map → McpRunDetailPage-D-Rz9MRw.js.map} +1 -1
- package/dashboard/dist/assets/{McpRunsPage-C8iifeKN.js → McpRunsPage-rdpZ2yMh.js} +2 -2
- package/dashboard/dist/assets/{McpRunsPage-C8iifeKN.js.map → McpRunsPage-rdpZ2yMh.js.map} +1 -1
- package/dashboard/dist/assets/{Modal-CA2Iv02H.js → Modal-Dr1Xy0j0.js} +2 -2
- package/dashboard/dist/assets/{Modal-CA2Iv02H.js.map → Modal-Dr1Xy0j0.js.map} +1 -1
- package/dashboard/dist/assets/{NamespacePill-ep9Zmokr.js → NamespacePill-GwO-WfhX.js} +2 -2
- package/dashboard/dist/assets/{NamespacePill-ep9Zmokr.js.map → NamespacePill-GwO-WfhX.js.map} +1 -1
- package/dashboard/dist/assets/OperationsPage-DlyGLPAs.js +2 -0
- package/dashboard/dist/assets/OperationsPage-DlyGLPAs.js.map +1 -0
- package/dashboard/dist/assets/OperatorDashboard-Csei5vj-.js +2 -0
- package/dashboard/dist/assets/OperatorDashboard-Csei5vj-.js.map +1 -0
- package/dashboard/dist/assets/{PageHeader-Bw8RNkqR.js → PageHeader-Bo9BU9pK.js} +2 -2
- package/dashboard/dist/assets/{PageHeader-Bw8RNkqR.js.map → PageHeader-Bo9BU9pK.js.map} +1 -1
- package/dashboard/dist/assets/{PageHeaderWithStats-NR_4idn6.js → PageHeaderWithStats-8_5cOSKL.js} +2 -2
- package/dashboard/dist/assets/{PageHeaderWithStats-NR_4idn6.js.map → PageHeaderWithStats-8_5cOSKL.js.map} +1 -1
- package/dashboard/dist/assets/{PersonaDetailPage-DKILoUqL.js → PersonaDetailPage--ZL6Or6v.js} +2 -2
- package/dashboard/dist/assets/{PersonaDetailPage-DKILoUqL.js.map → PersonaDetailPage--ZL6Or6v.js.map} +1 -1
- package/dashboard/dist/assets/{PersonasPage-qvzHTrFw.js → PersonasPage-Bdcoay3P.js} +2 -2
- package/dashboard/dist/assets/{PersonasPage-qvzHTrFw.js.map → PersonasPage-Bdcoay3P.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessDetailPage-C3LfeKvi.js → ProcessDetailPage-HrmVQq7S.js} +2 -2
- package/dashboard/dist/assets/{ProcessDetailPage-C3LfeKvi.js.map → ProcessDetailPage-HrmVQq7S.js.map} +1 -1
- package/dashboard/dist/assets/{ProcessesListPage-OoZ_u4ty.js → ProcessesListPage-_xmj6Bo-.js} +2 -2
- package/dashboard/dist/assets/{ProcessesListPage-OoZ_u4ty.js.map → ProcessesListPage-_xmj6Bo-.js.map} +1 -1
- package/dashboard/dist/assets/RoleDetailPage-C0ju2-4K.js +8 -0
- package/dashboard/dist/assets/RoleDetailPage-C0ju2-4K.js.map +1 -0
- package/dashboard/dist/assets/{RolePill-TySZq7dB.js → RolePill-CQlnEWkK.js} +2 -2
- package/dashboard/dist/assets/{RolePill-TySZq7dB.js.map → RolePill-CQlnEWkK.js.map} +1 -1
- package/dashboard/dist/assets/RolesPage-CKluVSpB.js +2 -0
- package/dashboard/dist/assets/{RolesPage-CNueMVuJ.js.map → RolesPage-CKluVSpB.js.map} +1 -1
- package/dashboard/dist/assets/{RunAsSelector-CwWEpiSF.js → RunAsSelector-DdfecQ1U.js} +2 -2
- package/dashboard/dist/assets/{RunAsSelector-CwWEpiSF.js.map → RunAsSelector-DdfecQ1U.js.map} +1 -1
- package/dashboard/dist/assets/{ScopeBadge-C7Uixtmk.js → ScopeBadge-BBYkevuR.js} +2 -2
- package/dashboard/dist/assets/{ScopeBadge-C7Uixtmk.js.map → ScopeBadge-BBYkevuR.js.map} +1 -1
- package/dashboard/dist/assets/{StickyPagination-DvIF3kQK.js → StickyPagination-cLddIdtT.js} +2 -2
- package/dashboard/dist/assets/{StickyPagination-DvIF3kQK.js.map → StickyPagination-cLddIdtT.js.map} +1 -1
- package/dashboard/dist/assets/{StreamMessageDetail-DkFK_XGD.js → StreamMessageDetail-CZXWDawC.js} +2 -2
- package/dashboard/dist/assets/{StreamMessageDetail-DkFK_XGD.js.map → StreamMessageDetail-CZXWDawC.js.map} +1 -1
- package/dashboard/dist/assets/{SwimlaneTimeline-CMw-Et6h.js → SwimlaneTimeline-fWY0gaf3.js} +2 -2
- package/dashboard/dist/assets/{SwimlaneTimeline-CMw-Et6h.js.map → SwimlaneTimeline-fWY0gaf3.js.map} +1 -1
- package/dashboard/dist/assets/{TagInput-D8gSp48D.js → TagInput-CDKbslLx.js} +2 -2
- package/dashboard/dist/assets/{TagInput-D8gSp48D.js.map → TagInput-CDKbslLx.js.map} +1 -1
- package/dashboard/dist/assets/{TaskDetailPage-BhXuChOf.js → TaskDetailPage-BjE4G2yn.js} +2 -2
- package/dashboard/dist/assets/{TaskDetailPage-BhXuChOf.js.map → TaskDetailPage-BjE4G2yn.js.map} +1 -1
- package/dashboard/dist/assets/{TaskQueuePill-CHqolBmU.js → TaskQueuePill-G3RuYRNZ.js} +2 -2
- package/dashboard/dist/assets/{TaskQueuePill-CHqolBmU.js.map → TaskQueuePill-G3RuYRNZ.js.map} +1 -1
- package/dashboard/dist/assets/{TasksListPage-6JHQQ5QZ.js → TasksListPage-KAhmCWB2.js} +2 -2
- package/dashboard/dist/assets/{TasksListPage-6JHQQ5QZ.js.map → TasksListPage-KAhmCWB2.js.map} +1 -1
- package/dashboard/dist/assets/{TimeAgo-CInx-vzY.js → TimeAgo-C_H2TyZw.js} +2 -2
- package/dashboard/dist/assets/{TimeAgo-CInx-vzY.js.map → TimeAgo-C_H2TyZw.js.map} +1 -1
- package/dashboard/dist/assets/{TimestampCell-Fq17Zrsu.js → TimestampCell-COG_4Flg.js} +2 -2
- package/dashboard/dist/assets/{TimestampCell-Fq17Zrsu.js.map → TimestampCell-COG_4Flg.js.map} +1 -1
- package/dashboard/dist/assets/{ToolPill-BbgMDhaE.js → ToolPill-ChSyRJZC.js} +2 -2
- package/dashboard/dist/assets/{ToolPill-BbgMDhaE.js.map → ToolPill-ChSyRJZC.js.map} +1 -1
- package/dashboard/dist/assets/{ToolTestPanel-DhjEe59s.js → ToolTestPanel-BPdJECW0.js} +2 -2
- package/dashboard/dist/assets/{ToolTestPanel-DhjEe59s.js.map → ToolTestPanel-BPdJECW0.js.map} +1 -1
- package/dashboard/dist/assets/{TopicDetailPage-DbIdmQpQ.js → TopicDetailPage-DAqx5JqA.js} +3 -3
- package/dashboard/dist/assets/{TopicDetailPage-DbIdmQpQ.js.map → TopicDetailPage-DAqx5JqA.js.map} +1 -1
- package/dashboard/dist/assets/TopicsPage-DoGqAdPm.js +2 -0
- package/dashboard/dist/assets/{TopicsPage-CAP-GUbr.js.map → TopicsPage-DoGqAdPm.js.map} +1 -1
- package/dashboard/dist/assets/{UserName-DggcLkSc.js → UserName-CKO_rk1R.js} +2 -2
- package/dashboard/dist/assets/{UserName-DggcLkSc.js.map → UserName-CKO_rk1R.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowExecutionPage-Bmra5fVt.js → WorkflowExecutionPage-D3VQ9iQV.js} +2 -2
- package/dashboard/dist/assets/{WorkflowExecutionPage-Bmra5fVt.js.map → WorkflowExecutionPage-D3VQ9iQV.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowPill-CcUUVugA.js → WorkflowPill-CNbwug5p.js} +2 -2
- package/dashboard/dist/assets/{WorkflowPill-CcUUVugA.js.map → WorkflowPill-CNbwug5p.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsDashboard-BQsZAGYU.js → WorkflowsDashboard-DdJ86We6.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsDashboard-BQsZAGYU.js.map → WorkflowsDashboard-DdJ86We6.js.map} +1 -1
- package/dashboard/dist/assets/{WorkflowsOverview-CeliraHZ.js → WorkflowsOverview-ZfFBzePp.js} +2 -2
- package/dashboard/dist/assets/{WorkflowsOverview-CeliraHZ.js.map → WorkflowsOverview-ZfFBzePp.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-DGxlonrV.js → YamlWorkflowDetailPage-4bd5yXdA.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowDetailPage-DGxlonrV.js.map → YamlWorkflowDetailPage-4bd5yXdA.js.map} +1 -1
- package/dashboard/dist/assets/{YamlWorkflowsPage-DnT8UiyQ.js → YamlWorkflowsPage-iHPNXjQj.js} +2 -2
- package/dashboard/dist/assets/{YamlWorkflowsPage-DnT8UiyQ.js.map → YamlWorkflowsPage-iHPNXjQj.js.map} +1 -1
- package/dashboard/dist/assets/{agents-mRV7m4sh.js → agents-DjD5U3Wb.js} +2 -2
- package/dashboard/dist/assets/{agents-mRV7m4sh.js.map → agents-DjD5U3Wb.js.map} +1 -1
- package/dashboard/dist/assets/{bots-SONCZlCM.js → bots-DiljVapH.js} +2 -2
- package/dashboard/dist/assets/{bots-SONCZlCM.js.map → bots-DiljVapH.js.map} +1 -1
- package/dashboard/dist/assets/{capabilities-DZjCMN32.js → capabilities-DV_5ghHT.js} +2 -2
- package/dashboard/dist/assets/{capabilities-DZjCMN32.js.map → capabilities-DV_5ghHT.js.map} +1 -1
- package/dashboard/dist/assets/{controlplane-RQNXjna2.js → controlplane-BKMvfWCB.js} +2 -2
- package/dashboard/dist/assets/{controlplane-RQNXjna2.js.map → controlplane-BKMvfWCB.js.map} +1 -1
- package/dashboard/dist/assets/escalation-columns-BQpCaJId.js +2 -0
- package/dashboard/dist/assets/escalation-columns-BQpCaJId.js.map +1 -0
- package/dashboard/dist/assets/{index-iHV3d7o3.js → index-B-WkiNRN.js} +2 -2
- package/dashboard/dist/assets/{index-iHV3d7o3.js.map → index-B-WkiNRN.js.map} +1 -1
- package/dashboard/dist/assets/{index-DY_hlZCQ.js → index-BO-7S9Xw.js} +2 -2
- package/dashboard/dist/assets/{index-DY_hlZCQ.js.map → index-BO-7S9Xw.js.map} +1 -1
- package/dashboard/dist/assets/{index-CK-6m8e_.js → index-BaV3l0UE.js} +2 -2
- package/dashboard/dist/assets/{index-CK-6m8e_.js.map → index-BaV3l0UE.js.map} +1 -1
- package/dashboard/dist/assets/{index-CxVGlkK6.js → index-BsOxMMmb.js} +2 -2
- package/dashboard/dist/assets/{index-CxVGlkK6.js.map → index-BsOxMMmb.js.map} +1 -1
- package/dashboard/dist/assets/{index-CkeSxuZ0.js → index-CI8rrKjx.js} +2 -2
- package/dashboard/dist/assets/{index-CkeSxuZ0.js.map → index-CI8rrKjx.js.map} +1 -1
- package/dashboard/dist/assets/{index-DYKRtstT.js → index-CItsikDw.js} +2 -2
- package/dashboard/dist/assets/{index-DYKRtstT.js.map → index-CItsikDw.js.map} +1 -1
- package/dashboard/dist/assets/{index-C6GsrvX1.js → index-CStR4uIU.js} +2 -2
- package/dashboard/dist/assets/{index-C6GsrvX1.js.map → index-CStR4uIU.js.map} +1 -1
- package/dashboard/dist/assets/{index-Dh3CVChT.js → index-DbTD-dio.js} +26 -26
- package/dashboard/dist/assets/index-DbTD-dio.js.map +1 -0
- package/dashboard/dist/assets/{index-DqsLfO-0.js → index-DhATO1cS.js} +2 -2
- package/dashboard/dist/assets/{index-DqsLfO-0.js.map → index-DhATO1cS.js.map} +1 -1
- package/dashboard/dist/assets/index-DnlsDaAw.css +1 -0
- package/dashboard/dist/assets/{index-ymm58cTW.js → index-Tx_ETzcH.js} +2 -2
- package/dashboard/dist/assets/{index-ymm58cTW.js.map → index-Tx_ETzcH.js.map} +1 -1
- package/dashboard/dist/assets/{index-D2CfSx_x.js → index-kzIIeVbx.js} +4 -4
- package/dashboard/dist/assets/{index-D2CfSx_x.js.map → index-kzIIeVbx.js.map} +1 -1
- package/dashboard/dist/assets/{index-DFJF8aWz.js → index-nIrYejxe.js} +2 -2
- package/dashboard/dist/assets/{index-DFJF8aWz.js.map → index-nIrYejxe.js.map} +1 -1
- package/dashboard/dist/assets/{index-DbZpL10z.js → index-xZqQxqu2.js} +2 -2
- package/dashboard/dist/assets/{index-DbZpL10z.js.map → index-xZqQxqu2.js.map} +1 -1
- package/dashboard/dist/assets/{knowledge-Bawo8u7l.js → knowledge-BocTnSiA.js} +2 -2
- package/dashboard/dist/assets/{knowledge-Bawo8u7l.js.map → knowledge-BocTnSiA.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-CKIpbpRZ.js → mcp-C1KBjKQ_.js} +2 -2
- package/dashboard/dist/assets/{mcp-CKIpbpRZ.js.map → mcp-C1KBjKQ_.js.map} +1 -1
- package/dashboard/dist/assets/{mcp-query-vld4hYxQ.js → mcp-query-B3cjukkA.js} +2 -2
- package/dashboard/dist/assets/{mcp-query-vld4hYxQ.js.map → mcp-query-B3cjukkA.js.map} +1 -1
- package/dashboard/dist/assets/{personas-BsARc3df.js → personas-DiA2bJaX.js} +2 -2
- package/dashboard/dist/assets/{personas-BsARc3df.js.map → personas-DiA2bJaX.js.map} +1 -1
- package/dashboard/dist/assets/{pipelines-BTSL-5ko.js → pipelines-Dt2d2EFR.js} +2 -2
- package/dashboard/dist/assets/{pipelines-BTSL-5ko.js.map → pipelines-Dt2d2EFR.js.map} +1 -1
- package/dashboard/dist/assets/{tasks-DggQdNbj.js → tasks-cDh2hNml.js} +2 -2
- package/dashboard/dist/assets/{tasks-DggQdNbj.js.map → tasks-cDh2hNml.js.map} +1 -1
- package/dashboard/dist/assets/{topics-DzAKa34X.js → topics-yFlGF-u1.js} +2 -2
- package/dashboard/dist/assets/{topics-DzAKa34X.js.map → topics-yFlGF-u1.js.map} +1 -1
- package/dashboard/dist/assets/{useEventHooks-5uI9oI5W.js → useEventHooks-D2R_ckS8.js} +2 -2
- package/dashboard/dist/assets/{useEventHooks-5uI9oI5W.js.map → useEventHooks-D2R_ckS8.js.map} +1 -1
- package/dashboard/dist/assets/{useFilterParams-CvRyYHJN.js → useFilterParams-B7suPsIK.js} +2 -2
- package/dashboard/dist/assets/{useFilterParams-CvRyYHJN.js.map → useFilterParams-B7suPsIK.js.map} +1 -1
- package/dashboard/dist/assets/{useNamespace-CEKzFIqe.js → useNamespace-u-V1GVUD.js} +2 -2
- package/dashboard/dist/assets/{useNamespace-CEKzFIqe.js.map → useNamespace-u-V1GVUD.js.map} +1 -1
- package/dashboard/dist/assets/{useYamlActivityEvents-hHgX1Z50.js → useYamlActivityEvents-BhOZeqgE.js} +2 -2
- package/dashboard/dist/assets/{useYamlActivityEvents-hHgX1Z50.js.map → useYamlActivityEvents-BhOZeqgE.js.map} +1 -1
- package/dashboard/dist/assets/{users-AO8lUyNr.js → users-BoXPwdee.js} +2 -2
- package/dashboard/dist/assets/{users-AO8lUyNr.js.map → users-BoXPwdee.js.map} +1 -1
- package/dashboard/dist/assets/{vendor-icons-DN9yGSuM.js → vendor-icons-D71XjkNy.js} +131 -136
- package/dashboard/dist/assets/vendor-icons-D71XjkNy.js.map +1 -0
- package/dashboard/dist/assets/{vendor-react-BpdAFEQc.js → vendor-react-C1YOyCSV.js} +2 -2
- package/dashboard/dist/assets/{vendor-react-BpdAFEQc.js.map → vendor-react-C1YOyCSV.js.map} +1 -1
- package/dashboard/dist/assets/{workflows-PtnlRK09.js → workflows-mCoyKuLZ.js} +2 -2
- package/dashboard/dist/assets/{workflows-PtnlRK09.js.map → workflows-mCoyKuLZ.js.map} +1 -1
- package/dashboard/dist/assets/{yaml-workflows-DPu3Y8vG.js → yaml-workflows-CWxXGDpn.js} +2 -2
- package/dashboard/dist/assets/{yaml-workflows-DPu3Y8vG.js.map → yaml-workflows-CWxXGDpn.js.map} +1 -1
- package/dashboard/dist/index.html +4 -4
- package/docs/dashboard.md +9 -2
- package/docs/design-principles.md +4 -0
- package/docs/hitl/pinned-views.md +3 -3
- package/docs/operations.md +1 -1
- package/package.json +1 -1
- package/dashboard/dist/assets/AvailableEscalationsPage-C1vtTvqP.js +0 -2
- package/dashboard/dist/assets/AvailableEscalationsPage-C1vtTvqP.js.map +0 -1
- package/dashboard/dist/assets/CountdownTimer-BF71ldGF.js +0 -2
- package/dashboard/dist/assets/HomePage-HPCd8SjF.js +0 -2
- package/dashboard/dist/assets/HomePage-HPCd8SjF.js.map +0 -1
- package/dashboard/dist/assets/ListToolbar-BFHVOba6.js +0 -2
- package/dashboard/dist/assets/ListToolbar-BFHVOba6.js.map +0 -1
- package/dashboard/dist/assets/OperationsPage-flrZ-EJ9.js +0 -2
- package/dashboard/dist/assets/OperationsPage-flrZ-EJ9.js.map +0 -1
- package/dashboard/dist/assets/OperatorDashboard-Dhs2eo8p.js +0 -2
- package/dashboard/dist/assets/OperatorDashboard-Dhs2eo8p.js.map +0 -1
- package/dashboard/dist/assets/RoleDetailPage-D70jTLZm.js +0 -8
- package/dashboard/dist/assets/RoleDetailPage-D70jTLZm.js.map +0 -1
- package/dashboard/dist/assets/RolesPage-CNueMVuJ.js +0 -2
- package/dashboard/dist/assets/TopicsPage-CAP-GUbr.js +0 -2
- package/dashboard/dist/assets/escalation-columns-XLEcZRCg.js +0 -2
- package/dashboard/dist/assets/escalation-columns-XLEcZRCg.js.map +0 -1
- package/dashboard/dist/assets/index-2BwHxjCw.css +0 -1
- package/dashboard/dist/assets/index-Dh3CVChT.js.map +0 -1
- package/dashboard/dist/assets/role-display-Dvo2lDpU.js +0 -2
- package/dashboard/dist/assets/role-display-Dvo2lDpU.js.map +0 -1
- package/dashboard/dist/assets/vendor-icons-DN9yGSuM.js.map +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as n,b as t,c as u}from"./vendor-query-B2UbickB.js";import{d as s}from"./index-
|
|
2
|
-
//# sourceMappingURL=workflows-
|
|
1
|
+
import{u as n,b as t,c as u}from"./vendor-query-B2UbickB.js";import{d as s}from"./index-DbTD-dio.js";function f(){return n({queryKey:["activeWorkers"],queryFn:async()=>(await s("/workflows/workers")).workers})}function w(){return n({queryKey:["discoveredWorkflows"],queryFn:async()=>(await s("/workflows/discovered")).workflows})}function l(){return n({queryKey:["workflowConfigs"],queryFn:async()=>(await s("/workflows/config")).workflows})}function d(){return n({queryKey:["cronStatus"],queryFn:async()=>(await s("/workflows/cron/status")).schedules})}function k(e){return n({queryKey:["workflowExecution",e],queryFn:()=>s(`/workflow-states/${e}/execution`),enabled:!!e})}function m(e,o){const r=new URLSearchParams;return e.limit&&r.set("limit",String(e.limit)),e.offset!==void 0&&r.set("offset",String(e.offset)),e.entity&&r.set("entity",e.entity),e.search&&r.set("search",e.search),e.status&&r.set("status",e.status),e.sort_by&&r.set("sort_by",e.sort_by),e.order&&r.set("order",e.order),e.registered&&r.set("registered",e.registered),e.namespace&&r.set("namespace",e.namespace),n({queryKey:["jobs",e],queryFn:()=>s(`/workflow-states/jobs?${r}`),enabled:(o==null?void 0:o.enabled)??!0})}function q(){const e=t();return u({mutationFn:o=>s(`/workflows/${o}/terminate`,{method:"POST"}),onSuccess:(o,r)=>{e.invalidateQueries({queryKey:["workflowExecution",r],refetchType:"all"}),e.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}function g(){const e=t();return u({mutationFn:({workflow_type:o,...r})=>s(`/workflows/${encodeURIComponent(o)}/config`,{method:"PUT",body:JSON.stringify(r)}),onSuccess:()=>{e.invalidateQueries({queryKey:["workflowConfigs"],refetchType:"all"})}})}function h(){const e=t();return u({mutationFn:o=>s(`/workflows/${encodeURIComponent(o)}/config`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["workflowConfigs"],refetchType:"all"})}})}function b(){const e=t();return u({mutationFn:({workflowType:o,data:r,metadata:i,execute_as:a})=>s(`/workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:r,metadata:i,...a?{execute_as:a}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["tasks"],refetchType:"all"}),e.invalidateQueries({queryKey:["jobs"],refetchType:"all"})}})}export{k as a,m as b,b as c,w as d,d as e,q as f,f as g,h,g as i,l as u};
|
|
2
|
+
//# sourceMappingURL=workflows-mCoyKuLZ.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflows-
|
|
1
|
+
{"version":3,"file":"workflows-mCoyKuLZ.js","sources":["../../src/api/workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { ActiveWorker, CronScheduleEntry, DiscoveredWorkflow, LTJob, LTWorkflowConfig, WorkflowExecution } from './types';\n\nexport function useActiveWorkers() {\n return useQuery<ActiveWorker[]>({\n queryKey: ['activeWorkers'],\n queryFn: async () => {\n const res = await apiFetch<{ workers: ActiveWorker[] }>('/workflows/workers');\n return res.workers;\n },\n });\n}\n\nexport function useDiscoveredWorkflows() {\n return useQuery<DiscoveredWorkflow[]>({\n queryKey: ['discoveredWorkflows'],\n queryFn: async () => {\n const res = await apiFetch<{ workflows: DiscoveredWorkflow[] }>('/workflows/discovered');\n return res.workflows;\n },\n });\n}\n\nexport function useWorkflowConfigs() {\n return useQuery<LTWorkflowConfig[]>({\n queryKey: ['workflowConfigs'],\n queryFn: async () => {\n const res = await apiFetch<{ workflows: LTWorkflowConfig[] }>('/workflows/config');\n return res.workflows;\n },\n });\n}\n\nexport function useCronStatus() {\n return useQuery<CronScheduleEntry[]>({\n queryKey: ['cronStatus'],\n queryFn: async () => {\n const res = await apiFetch<{ schedules: CronScheduleEntry[] }>('/workflows/cron/status');\n return res.schedules;\n },\n });\n}\n\nexport function useWorkflowExecution(workflowId: string) {\n return useQuery<WorkflowExecution>({\n queryKey: ['workflowExecution', workflowId],\n queryFn: () =>\n apiFetch(`/workflow-states/${workflowId}/execution`),\n enabled: !!workflowId,\n });\n}\n\nexport function useWorkflowState(workflowId: string) {\n return useQuery<{ workflow_id: string; state: Record<string, unknown> }>({\n queryKey: ['workflowState', workflowId],\n queryFn: () => apiFetch(`/workflow-states/${workflowId}/state`),\n enabled: !!workflowId,\n });\n}\n\nexport function useJobs(filters: {\n limit?: number;\n offset?: number;\n entity?: string;\n search?: string;\n status?: string;\n sort_by?: string;\n order?: string;\n registered?: string;\n namespace?: string;\n}, options?: { enabled?: boolean }) {\n const params = new URLSearchParams();\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n if (filters.entity) params.set('entity', filters.entity);\n if (filters.search) params.set('search', filters.search);\n if (filters.status) params.set('status', filters.status);\n if (filters.sort_by) params.set('sort_by', filters.sort_by);\n if (filters.order) params.set('order', filters.order);\n if (filters.registered) params.set('registered', filters.registered);\n if (filters.namespace) params.set('namespace', filters.namespace);\n\n return useQuery<{ jobs: LTJob[]; total: number }>({\n queryKey: ['jobs', filters],\n queryFn: () => apiFetch(`/workflow-states/jobs?${params}`),\n enabled: options?.enabled ?? true,\n });\n}\n\nexport function useTerminateWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (workflowId: string) =>\n apiFetch(`/workflows/${workflowId}/terminate`, { method: 'POST' }),\n onSuccess: (_data, workflowId) => {\n queryClient.invalidateQueries({ queryKey: ['workflowExecution', workflowId], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['jobs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpsertWorkflowConfig() {\n const queryClient = useQueryClient();\n return useMutation<\n LTWorkflowConfig,\n Error,\n {\n workflow_type: string;\n description?: string | null;\n\n invocable?: boolean;\n certified?: boolean;\n task_queue?: string | null;\n default_role?: string;\n roles?: string[];\n invocation_roles?: string[];\n consumes?: string[];\n envelope_schema?: Record<string, unknown> | null;\n resolver_schema?: Record<string, unknown> | null;\n cron_schedule?: string | null;\n execute_as?: string | null;\n }\n >({\n mutationFn: ({ workflow_type, ...body }) =>\n apiFetch(`/workflows/${encodeURIComponent(workflow_type)}/config`, {\n method: 'PUT',\n body: JSON.stringify(body),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteWorkflowConfig() {\n const queryClient = useQueryClient();\n return useMutation<{ deleted: boolean; workflow_type: string }, Error, string>({\n mutationFn: (workflowType) =>\n apiFetch(`/workflows/${encodeURIComponent(workflowType)}/config`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n },\n });\n}\n\nexport function useSetCronSchedule() {\n const queryClient = useQueryClient();\n return useMutation<\n LTWorkflowConfig,\n Error,\n { config: LTWorkflowConfig; cron_schedule: string | null; envelope_schema?: Record<string, unknown> | null }\n >({\n mutationFn: ({ config, cron_schedule, envelope_schema }) =>\n apiFetch(`/workflows/${encodeURIComponent(config.workflow_type)}/config`, {\n method: 'PUT',\n body: JSON.stringify({\n ...config,\n cron_schedule,\n ...(envelope_schema !== undefined ? { envelope_schema } : {}),\n }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['workflowConfigs'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['cronStatus'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeWorkflow() {\n const queryClient = useQueryClient();\n return useMutation<\n { workflowId: string; message: string },\n Error,\n { workflowType: string; data: Record<string, unknown>; metadata?: Record<string, unknown>; execute_as?: string }\n >({\n mutationFn: ({ workflowType, data, metadata, execute_as }) =>\n apiFetch(`/workflows/${workflowType}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, metadata, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['tasks'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['jobs'], refetchType: 'all' });\n },\n });\n}\n"],"names":["useActiveWorkers","useQuery","apiFetch","useDiscoveredWorkflows","useWorkflowConfigs","useCronStatus","useWorkflowExecution","workflowId","useJobs","filters","options","params","useTerminateWorkflow","queryClient","useQueryClient","useMutation","_data","useUpsertWorkflowConfig","workflow_type","body","useDeleteWorkflowConfig","workflowType","useInvokeWorkflow","data","metadata","execute_as"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{u as l,b as a,c as s}from"./vendor-query-B2UbickB.js";import{d as r}from"./index-
|
|
2
|
-
//# sourceMappingURL=yaml-workflows-
|
|
1
|
+
import{u as l,b as a,c as s}from"./vendor-query-B2UbickB.js";import{d as r}from"./index-DbTD-dio.js";function f(e={}){const o=new URLSearchParams;return e.status&&o.set("status",e.status),e.graph_topic&&o.set("graph_topic",e.graph_topic),e.app_id&&o.set("app_id",e.app_id),e.search&&o.set("search",e.search),e.set_id&&o.set("set_id",e.set_id),e.limit&&o.set("limit",String(e.limit)),e.offset!==void 0&&o.set("offset",String(e.offset)),l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows?${o}`)})}function m(){return l({queryKey:["yamlWorkflowAppIds"],queryFn:()=>r("/yaml-workflows/app-ids")})}function c(e){return l({queryKey:["yamlWorkflows",e],queryFn:()=>r(`/yaml-workflows/${e}`),enabled:!!e})}function w(){const e=a();return s({mutationFn:o=>r("/yaml-workflows",{method:"POST",body:JSON.stringify(o)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function k(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/deploy`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function p(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/activate`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function d(){const e=a();return s({mutationFn:({id:o,data:t,sync:n,execute_as:u})=>r(`/yaml-workflows/${o}/invoke`,{method:"POST",body:JSON.stringify({data:t,sync:n,...u?{execute_as:u}:{}})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function h(){const e=a();return s({mutationFn:({id:o,task_queue:t,compilation_feedback:n})=>r(`/yaml-workflows/${o}/regenerate`,{method:"POST",body:JSON.stringify({task_queue:t,compilation_feedback:n})}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function q(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/archive`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function W(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}/restore`,{method:"POST"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"}),e.invalidateQueries({queryKey:["yamlWorkflow"],refetchType:"all"})}})}function S(){const e=a();return s({mutationFn:({id:o,...t})=>r(`/yaml-workflows/${o}`,{method:"PUT",body:JSON.stringify(t)}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function v(){const e=a();return s({mutationFn:o=>r(`/yaml-workflows/${o}`,{method:"DELETE"}),onSuccess:()=>{e.invalidateQueries({queryKey:["yamlWorkflows"],refetchType:"all"})}})}function T(e){return l({queryKey:["yamlWorkflows",e,"versions"],queryFn:()=>r(`/yaml-workflows/${e}/versions`),enabled:!!e})}function F(e,o){return l({queryKey:["yamlWorkflows",e,"versions",o],queryFn:()=>r(`/yaml-workflows/${e}/versions/${o}`),enabled:!!e&&o!==null})}export{m as a,S as b,c,T as d,k as e,p as f,q as g,W as h,v as i,h as j,F as k,d as l,w as m,f as u};
|
|
2
|
+
//# sourceMappingURL=yaml-workflows-CWxXGDpn.js.map
|
package/dashboard/dist/assets/{yaml-workflows-DPu3Y8vG.js.map → yaml-workflows-CWxXGDpn.js.map}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"yaml-workflows-DPu3Y8vG.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"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"}
|
|
1
|
+
{"version":3,"file":"yaml-workflows-CWxXGDpn.js","sources":["../../src/api/yaml-workflows.ts"],"sourcesContent":["import { useQuery, useMutation, useQueryClient } from '@tanstack/react-query';\nimport { apiFetch } from './client';\nimport type { LTYamlWorkflowRecord, LTYamlWorkflowStatus, LTYamlWorkflowVersion } from './types';\n\ninterface YamlWorkflowListResponse {\n workflows: LTYamlWorkflowRecord[];\n total: number;\n}\n\ninterface YamlWorkflowFilters {\n status?: LTYamlWorkflowStatus;\n graph_topic?: string;\n app_id?: string;\n search?: string;\n set_id?: string;\n limit?: number;\n offset?: number;\n}\n\nexport function useYamlWorkflows(filters: YamlWorkflowFilters = {}) {\n const params = new URLSearchParams();\n if (filters.status) params.set('status', filters.status);\n if (filters.graph_topic) params.set('graph_topic', filters.graph_topic);\n if (filters.app_id) params.set('app_id', filters.app_id);\n if (filters.search) params.set('search', filters.search);\n if (filters.set_id) params.set('set_id', filters.set_id);\n if (filters.limit) params.set('limit', String(filters.limit));\n if (filters.offset !== undefined) params.set('offset', String(filters.offset));\n\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', filters],\n queryFn: () => apiFetch(`/yaml-workflows?${params}`),\n });\n}\n\nexport function useYamlWorkflowAppIds() {\n return useQuery<{ app_ids: string[] }>({\n queryKey: ['yamlWorkflowAppIds'],\n queryFn: () => apiFetch('/yaml-workflows/app-ids'),\n });\n}\n\nexport function useYamlWorkflowByTopic(graphTopic: string | undefined, appId?: string) {\n return useQuery<YamlWorkflowListResponse>({\n queryKey: ['yamlWorkflows', 'byTopic', graphTopic, appId],\n queryFn: () => {\n const params = new URLSearchParams({ graph_topic: graphTopic!, limit: '1' });\n if (appId) params.set('app_id', appId);\n return apiFetch(`/yaml-workflows?${params}`);\n },\n enabled: !!graphTopic,\n });\n}\n\nexport function useYamlWorkflow(id: string) {\n return useQuery<LTYamlWorkflowRecord>({\n queryKey: ['yamlWorkflows', id],\n queryFn: () => apiFetch(`/yaml-workflows/${id}`),\n enabled: !!id,\n });\n}\n\nexport function useCreateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (input: {\n workflow_id: string;\n task_queue: string;\n workflow_name: string;\n name: string;\n description?: string;\n app_id?: string;\n subscribes?: string;\n tags?: string[];\n compilation_feedback?: string;\n }) =>\n apiFetch<LTYamlWorkflowRecord>('/yaml-workflows', {\n method: 'POST',\n body: JSON.stringify(input),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeployYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/deploy`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useActivateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/activate`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useInvokeYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, data, sync, execute_as }: { id: string; data: Record<string, unknown>; sync?: boolean; execute_as?: string }) =>\n apiFetch<{ result?: unknown; job_id?: string }>(`/yaml-workflows/${id}/invoke`, {\n method: 'POST',\n body: JSON.stringify({ data, sync, ...(execute_as ? { execute_as } : {}) }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRegenerateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, task_queue, compilation_feedback }: { id: string; task_queue?: string; compilation_feedback?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/regenerate`, {\n method: 'POST',\n body: JSON.stringify({ task_queue, compilation_feedback }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useArchiveYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/archive`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useRestoreYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/restore`, {\n method: 'POST',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflow'], refetchType: 'all' });\n },\n });\n}\n\nexport function useUpdateYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, ...updates }: { id: string; yaml_content?: string; name?: string; description?: string; input_schema?: Record<string, unknown>; output_schema?: Record<string, unknown>; tags?: string[]; app_id?: string; graph_topic?: string }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}`, {\n method: 'PUT',\n body: JSON.stringify(updates),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useDeleteYamlWorkflow() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<{ deleted: boolean }>(`/yaml-workflows/${id}`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Cron scheduling ─────────────────────────────────────────────\n\nexport function useSetYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: ({ id, cron_schedule, cron_envelope, execute_as }: {\n id: string;\n cron_schedule: string;\n cron_envelope?: Record<string, unknown> | null;\n execute_as?: string | null;\n }) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'PUT',\n body: JSON.stringify({ cron_schedule, cron_envelope, execute_as }),\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\nexport function useClearYamlCron() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (id: string) =>\n apiFetch<LTYamlWorkflowRecord>(`/yaml-workflows/${id}/cron`, {\n method: 'DELETE',\n }),\n onSuccess: () => {\n queryClient.invalidateQueries({ queryKey: ['yamlWorkflows'], refetchType: 'all' });\n },\n });\n}\n\n// ── Version history ─────────────────────────────────────────────\n\nexport function useYamlWorkflowVersions(id: string) {\n return useQuery<{ versions: LTYamlWorkflowVersion[]; total: number }>({\n queryKey: ['yamlWorkflows', id, 'versions'],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions`),\n enabled: !!id,\n });\n}\n\nexport function useYamlWorkflowVersion(id: string, version: number | null) {\n return useQuery<LTYamlWorkflowVersion>({\n queryKey: ['yamlWorkflows', id, 'versions', version],\n queryFn: () => apiFetch(`/yaml-workflows/${id}/versions/${version}`),\n enabled: !!id && version !== null,\n });\n}\n"],"names":["useYamlWorkflows","filters","params","useQuery","apiFetch","useYamlWorkflowAppIds","useYamlWorkflow","id","useCreateYamlWorkflow","queryClient","useQueryClient","useMutation","input","useDeployYamlWorkflow","useActivateYamlWorkflow","useInvokeYamlWorkflow","data","sync","execute_as","useRegenerateYamlWorkflow","task_queue","compilation_feedback","useArchiveYamlWorkflow","useRestoreYamlWorkflow","useUpdateYamlWorkflow","updates","useDeleteYamlWorkflow","useYamlWorkflowVersions","useYamlWorkflowVersion","version"],"mappings":"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"}
|
|
@@ -8,11 +8,11 @@
|
|
|
8
8
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
9
9
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
10
10
|
<link href="https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet" />
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-DbTD-dio.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/vendor-query-B2UbickB.js">
|
|
13
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-react-
|
|
14
|
-
<link rel="modulepreload" crossorigin href="./assets/vendor-icons-
|
|
15
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
13
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-react-C1YOyCSV.js">
|
|
14
|
+
<link rel="modulepreload" crossorigin href="./assets/vendor-icons-D71XjkNy.js">
|
|
15
|
+
<link rel="stylesheet" crossorigin href="./assets/index-DnlsDaAw.css">
|
|
16
16
|
</head>
|
|
17
17
|
<body>
|
|
18
18
|
<div id="root"></div>
|
package/docs/dashboard.md
CHANGED
|
@@ -12,7 +12,7 @@ The reactive, event-driven surface — where operations watch the floor and buil
|
|
|
12
12
|
|
|
13
13
|
| Page | Route | Purpose |
|
|
14
14
|
|------|-------|---------|
|
|
15
|
-
| **Pace Board** | `/operations` | COO shop-floor view — pace chart of actual-vs-target flow across every station role, station table with live metrics, and the station detail panel.
|
|
15
|
+
| **Pace Board** | `/operations` | COO shop-floor view — pace chart of actual-vs-target flow across every station role, station table with live metrics, and the station detail panel. Readable by every login (aggregate counts and trends) while `features.publicPaceBoard`, default on, stands. |
|
|
16
16
|
| **Event Topics** | `/topics` | Topic catalog — browse all known event topics with descriptions, schemas, and subscriber counts. |
|
|
17
17
|
| **Agents** | `/agents` | Autonomous event-driven automations (labeled **Automations** when AI is not configured). Configure subscriptions, schedules, and knowledge domains. |
|
|
18
18
|
| **Capabilities** | `/capabilities` | Browse MCP tools grouped by capability category, with a live run panel. |
|
|
@@ -82,7 +82,7 @@ The top navigation bar contains:
|
|
|
82
82
|
|
|
83
83
|
## Home — Recent Activity
|
|
84
84
|
|
|
85
|
-
The home page
|
|
85
|
+
The home page leads with the **Pace Board** for every login — the operational heartbeat on top, **All Escalations** and **My Escalations** panels below (each server-scoped to what the viewer may see). A role flagged **Home Segment** (Role Detail → Pace Board settings) picks which sequence the home board opens on; unset, the first sequence leads. When a deployment sets `features.publicPaceBoard: false`, homes re-tier: admins keep this layout, engineers see escalation panels beside their recent **Procedural** and **Graph** executions, and operators get their per-lane task-queue cards.
|
|
86
86
|
|
|
87
87
|
## Key Pages
|
|
88
88
|
|
|
@@ -331,6 +331,7 @@ Messages are read-only. Status is derived from timestamps: pending (no timestamp
|
|
|
331
331
|
|
|
332
332
|
The central queue for all escalation activity across every workflow.
|
|
333
333
|
|
|
334
|
+
- **Title = queue selector** — the page title reads as the selected role's friendly title, or "All Escalations" when unfiltered; clicking it switches queues over the same `?role=` param the filter bar mirrors. The **My Escalations** personal inbox (`/escalations/queue`) carries the identical control, titling itself "My Escalations" or the filtered role's title.
|
|
334
335
|
- **Filter bar** — filter by status (pending/claimed/resolved), role, workflow type, priority, and time window.
|
|
335
336
|
- **Columns:** Escalation ID, workflow type, role, status, priority, created time, and claimed-by user.
|
|
336
337
|
- **Rich list view** — when the list is scoped to exactly one role (`?role=<role>`) and that role owns a [list schema](#escalations-list-schema), a role-authored view renders in place of the table (the live item as a card, plus a load-on-demand history), with a **Table view** toggle back to the columns.
|
|
@@ -450,6 +451,12 @@ The Inbox icon in the header shows a badge count when the current user has pendi
|
|
|
450
451
|
|
|
451
452
|
The bottom bar contains a collapsible live event stream showing workflow start/completion events, task state transitions, escalation activity, and activity checkpoints. Events stream via NATS subscription.
|
|
452
453
|
|
|
454
|
+
### Claim Hand-off
|
|
455
|
+
|
|
456
|
+
The shell monitors the role-scoped `claimed` events across the viewer's roles; when one carries `assigned_to = viewer`, the dashboard navigates to that escalation's detail page. Pre-assignment is the system saying "this is yours next," and the UI honors it: a resolve → side-effect → follow-on chain (e.g. submit, a label prints, the harvest task opens) lands the user on the next step instead of history's previous page.
|
|
457
|
+
|
|
458
|
+
Workflows need no UI coupling — assigning the follow-on escalation to the resolving user is the whole contract. The gesture is naturally idempotent: a claim the user made themselves resolves to the page their click already opened.
|
|
459
|
+
|
|
453
460
|
### Contextual Documentation
|
|
454
461
|
|
|
455
462
|
Each page header includes a documentation icon that opens the in-app docs drawer to the relevant section. The drawer supports navigation history, anchor linking, and markdown rendering.
|
|
@@ -35,6 +35,10 @@ Chroma is spent, not spread.
|
|
|
35
35
|
inverted — never a flat white page with white sections.
|
|
36
36
|
- **The accent appears in small doses**: links, buttons, checks, pills,
|
|
37
37
|
section labels, focus states. Because it is scarce, it reads as "act here."
|
|
38
|
+
Icon links follow the same rule in every theme: clickable glyphs (toolbar
|
|
39
|
+
icons, view toggles) render through the `.icon-link` recipe — muted accent
|
|
40
|
+
at rest, full accent on hover — never a neutral text tone, which reads as
|
|
41
|
+
a static mark.
|
|
38
42
|
- **Dark themes are the same principle, inverted** — near-black neutral
|
|
39
43
|
surfaces, the identical accent discipline. Midnight is not a different
|
|
40
44
|
design; it is the same design at night.
|
|
@@ -26,13 +26,13 @@ The merge is a single guarded statement (no read-then-write) and the document is
|
|
|
26
26
|
|
|
27
27
|
## The Pinned Section
|
|
28
28
|
|
|
29
|
-
Pins render as
|
|
29
|
+
Pins render as first-class nav sections: each role's pins sit under the role's **display title**, styled exactly like the built-in categories (Monitor, Orchestrate, Storage) — the same composition the persona config screen previews. There is no "Pinned" umbrella; the role names are the categories. The user's own pins, when present, lead as their own **Pinned** section (stored order, drag to reorder, ✕ to remove). A section heading exists only over visible pins (a role whose pins are all hidden or promoted contributes no heading) and pins sit flush at the nav's left edge — the heading labels, it never indents. Every pin carries its full label as a tooltip. **Pin this view** on the escalations list captures the live filter set into a new pin, prompting only for a label.
|
|
30
30
|
|
|
31
|
-
`badge: true` renders a live count
|
|
31
|
+
`badge: true` renders a live count as bare superscript digits on the row's right rail — tabular, right-aligned so counts read as a column — using the same server-side predicate the pin opens onto (the pin's URL is parsed back into its query and counted with `limit: 1`), so the badge and the list always agree, including `jeopardy=1` pins. Counts refresh on escalation events, and a pin whose URL isn't a countable escalations list renders without a badge.
|
|
32
32
|
|
|
33
33
|
## Role Default Pins
|
|
34
34
|
|
|
35
|
-
A role may declare `default_pins: [{ label, url, badge? }]` (edited on Role Detail → Default Pins). Members see them in their Pinned section from first login,
|
|
35
|
+
A role may declare `default_pins: [{ label, url, badge? }]` (edited on Role Detail → Default Pins). Members see them in their Pinned section from first login, grouped under the role's display title, and may:
|
|
36
36
|
|
|
37
37
|
- **Promote** — copy into their own pins (an own pin with the same label supersedes the role default)
|
|
38
38
|
- **Hide** — dismiss it (recorded in `hiddenRolePins`)
|
package/docs/operations.md
CHANGED
|
@@ -123,4 +123,4 @@ See [MCP Admin Tools — Ortho Pipeline](api/mcp/admin.md#ortho-pipeline) for th
|
|
|
123
123
|
|
|
124
124
|
## Navigation
|
|
125
125
|
|
|
126
|
-
The Operations entry lives in the choreography sidebar (the left rail visible on `/operations` and `/escalations`), separate from the Admin sidebar. The `/operations` route admits
|
|
126
|
+
The Operations entry lives in the choreography sidebar (the left rail visible on `/operations` and `/escalations`), separate from the Admin sidebar. The `/operations` route admits every authenticated user — the board is aggregate counts and trends, readonly by nature. Station metrics span all roles for any login while the `features.publicPaceBoard` flag (default on) stands; a deployment that sets it false (e.g. one provisioning external one-time accounts) narrows metrics back to role membership and the board back to admin-type users and superadmins.
|
package/package.json
CHANGED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{j as e,a as g}from"./vendor-query-B2UbickB.js";import{u as Ot,j as Ft,k as Ke,m as Re,p as $t,w as _t,l as Lt,n as Bt,o as Rt,q as zt,r as qt,s as Dt,t as It,g as Vt,v as Ut,x as Gt,y as Ht,z as Jt,A as Qt,B as Kt,E as Wt,G as Xt,H as Yt,I as Zt,K as es,L as ts,M as ss}from"./index-Dh3CVChT.js";import{i as as}from"./task-queues-7-sHKPsN.js";import{f as ns}from"./useEventHooks-5uI9oI5W.js";import{X as ae,r as We,aa as rs,ab as ls,C as is,a as os,ac as cs,ad as ds,s as us,ae as xs,B as ms,af as ze,ag as hs,ah as ps,P as fs,f as gs,ai as bs}from"./vendor-icons-DN9yGSuM.js";import{u as pe,C as Xe,a as ys}from"./CustomDurationPicker-Bh9QdBVw.js";import{d as vs,a as js}from"./role-display-Dvo2lDpU.js";import{i as Ns,E as Cs}from"./CountdownTimer-BF71ldGF.js";import{u as ks}from"./useFilterParams-CvRyYHJN.js";import{u as Ye}from"./useDebouncedValue-BA5S7V54.js";import{b as ws}from"./api-path-u2Jf9QXS.js";import{D as Ss}from"./DataTable-BTu2AaEl.js";import{S as Ps}from"./StickyPagination-DvIF3kQK.js";import{P as Ms}from"./constants-BHkpVaqx.js";import{M as fe}from"./Modal-CA2Iv02H.js";import{u as Es}from"./users-AO8lUyNr.js";import{m as As,E as Ts}from"./escalation-columns-XLEcZRCg.js";import{R as Os,a as Fs}from"./RowActions-BA9L9djf.js";import{L as $s}from"./ListToolbar-BFHVOba6.js";import{L as qe,a as _s,f as Ls,u as Bs}from"./vendor-react-BpdAFEQc.js";import"./StatusBadge-BwUvykDo.js";import"./EmptyState-BcsfPq9T.js";import"./FilterBar-BOV8DWIO.js";import"./PriorityBadge-CCERr9vQ.js";import"./RolePill-TySZq7dB.js";import"./WorkflowPill-CcUUVugA.js";const Rs=["<","<=",">",">=","="],zs=["priority","created_at","updated_at","status","role"],D="input text-xs py-1",De="select text-xs py-1",te="text-text-tertiary hover:text-text-primary transition-colors";function Ie(t){return t==="true"?!0:t==="false"?!1:t.trim()!==""&&!Number.isNaN(Number(t))?Number(t):t}const qs=t=>Object.entries(t??{}).map(([s,o])=>({key:s,value:String(o)})),Ds=t=>(t??[]).map(s=>{const[o,r]=Object.entries(s)[0]??["",""];return{key:o,value:String(r)}});function z({title:t,hint:s,children:o}){return e.jsxs("div",{className:"border-t border-surface-border/50 py-3 first:border-t-0 first:pt-1",children:[e.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between",children:[e.jsx("span",{className:"text-2xs font-medium uppercase tracking-wide text-text-tertiary",children:t}),s&&e.jsx("span",{className:"text-2xs font-mono text-text-tertiary/70",children:s})]}),o]})}function se({value:t,onChange:s,placeholder:o}){return e.jsx("input",{list:"lt-facet-keys",className:`${D} w-40`,placeholder:o,value:t,onChange:r=>s(r.target.value)})}function Is({value:t,onChange:s,facetKeys:o=[],search:r="",onSearchChange:h}){const x=qs(t.facets),p=Ds(t.block),f=t.range??[],i=t.exists??[],c=t.orderBy??[],v=l=>{const m={};for(const d of l)d.key&&(m[d.key]=Ie(d.value));s({...t,facets:Object.keys(m).length?m:void 0})},k=l=>{const m=l.filter(d=>d.key).map(d=>({[d.key]:Ie(d.value)}));s({...t,block:m.length?m:void 0})},M=l=>s({...t,range:l.length?l:void 0}),j=l=>s({...t,exists:l.length?l:void 0}),w=l=>s({...t,orderBy:l.length?l:void 0});return e.jsxs("div",{className:"text-xs",children:[e.jsx("datalist",{id:"lt-facet-keys",children:o.map(l=>e.jsx("option",{value:l},l))}),e.jsxs("datalist",{id:"lt-sort-fields",children:[zs.map(l=>e.jsx("option",{value:l},l)),o.map(l=>e.jsx("option",{value:`metadata.${l}`},l))]}),h&&e.jsx(z,{title:"Match id",hint:"id · workflow · origin",children:e.jsx("input",{className:`${D} w-full`,placeholder:"Exact escalation, workflow, or origin id…",value:r,onChange:l=>h(l.target.value)})}),e.jsx(z,{title:"Has facet",hint:"metadata @>",children:[...x,{key:"",value:""}].map((l,m)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(se,{value:l.key,placeholder:"key",onChange:d=>{const u=[...x];u[m]={...l,key:d},v(u)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${D} w-40`,placeholder:"value",value:l.value,onChange:d=>{const u=[...x];u[m]={...l,value:d.target.value},v(u)}}),m<x.length&&e.jsx("button",{className:te,onClick:()=>v(x.filter((d,u)=>u!==m)),children:"×"})]},m))}),e.jsx(z,{title:"Range",hint:"numeric",children:[...f,{facet:"",op:"<=",value:0}].map((l,m)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(se,{value:l.facet,placeholder:"numeric facet",onChange:d=>{const u=[...f];u[m]={...l,facet:d},M(u.filter(a=>a.facet))}}),e.jsx("select",{className:De,value:l.op,onChange:d=>{const u=[...f];u[m]={...l,op:d.target.value},M(u.filter(a=>a.facet))},children:Rs.map(d=>e.jsx("option",{value:d,children:d},d))}),e.jsx("input",{type:"number",className:`${D} w-24`,value:l.value,onChange:d=>{const u=[...f];u[m]={...l,value:Number(d.target.value)},M(u.filter(a=>a.facet))}}),m<f.length&&e.jsx("button",{className:te,onClick:()=>M(f.filter((d,u)=>u!==m)),children:"×"})]},m))}),e.jsx(z,{title:"Has key",hint:"metadata ? key",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[i.map(l=>e.jsxs("span",{className:"flex items-center gap-1 rounded bg-accent/15 px-1.5 py-0.5 text-accent",children:[l,e.jsx("button",{className:"text-accent/70 hover:text-accent",onClick:()=>j(i.filter(m=>m!==l)),children:"×"})]},l)),e.jsx(se,{value:"",placeholder:"+ key",onChange:l=>{l&&!i.includes(l)&&j([...i,l])}})]})}),e.jsx(z,{title:"Exclude",hint:"NOT @>",children:[...p,{key:"",value:""}].map((l,m)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx(se,{value:l.key,placeholder:"key",onChange:d=>{const u=[...p];u[m]={...l,key:d},k(u)}}),e.jsx("span",{className:"text-text-tertiary",children:"="}),e.jsx("input",{className:`${D} w-40`,placeholder:"value",value:l.value,onChange:d=>{const u=[...p];u[m]={...l,value:d.target.value},k(u)}}),m<p.length&&e.jsx("button",{className:te,onClick:()=>k(p.filter((d,u)=>u!==m)),children:"×"})]},m))}),e.jsx(z,{title:"Sort by",children:[...c,{field:"",direction:"asc"}].map((l,m)=>e.jsxs("div",{className:"mb-1 flex items-center gap-1",children:[e.jsx("input",{list:"lt-sort-fields",className:`${D} w-44`,placeholder:"column or metadata.key",value:l.field,onChange:d=>{const u=[...c];u[m]={...l,field:d.target.value},w(u.filter(a=>a.field))}}),e.jsxs("select",{className:De,value:l.direction??"asc",onChange:d=>{const u=[...c];u[m]={...l,direction:d.target.value},w(u.filter(a=>a.field))},children:[e.jsx("option",{value:"asc",children:"asc"}),e.jsx("option",{value:"desc",children:"desc"})]}),e.jsxs("label",{className:"flex items-center gap-1 text-text-tertiary",children:[e.jsx("input",{type:"checkbox",checked:!!l.numeric,onChange:d=>{const u=[...c];u[m]={...l,numeric:d.target.checked},w(u.filter(a=>a.field))}}),"num"]}),m<c.length&&e.jsx("button",{className:te,onClick:()=>w(c.filter((d,u)=>u!==m)),children:"×"})]},m))})]})}function Vs({value:t,onChange:s,facetKeys:o,search:r,onSearchChange:h,activeFacetCount:x,onClear:p,onClose:f}){return e.jsxs("div",{className:"h-full overflow-y-auto",children:[e.jsxs("div",{className:"sticky top-0 z-10 flex items-center justify-between px-4 py-3 bg-surface-raised border-b border-surface-border/50",children:[e.jsx("span",{className:"text-xs font-semibold text-text-primary",children:"Faceted query"}),e.jsxs("div",{className:"flex items-center gap-2",children:[x>0&&e.jsx("button",{onClick:p,className:"text-2xs text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"}),e.jsx("button",{onClick:f,className:"p-1 rounded hover:bg-surface-hover text-text-tertiary hover:text-text-primary transition-colors",title:"Close",children:e.jsx(ae,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"px-4 py-2",children:[e.jsxs("p",{className:"mb-2 text-2xs leading-snug text-text-tertiary",children:["Precise metadata facets plus exact correlation-id lookup — they compose in one SQL query. Facet keys are the ones that actually exist in your visible escalations. Set status to ",e.jsx("span",{className:"font-medium",children:"All"})," to find an order across every status; the whole query is shareable via the URL."]}),e.jsx(Is,{value:t,onChange:s,facetKeys:o,search:r,onSearchChange:h})]})]})}function Us({role:t,options:s,onChange:o}){var i;const[r,h]=g.useState(!1),x=g.useRef(null);g.useEffect(()=>{if(!r)return;const c=k=>{x.current&&!x.current.contains(k.target)&&h(!1)},v=k=>{k.key==="Escape"&&h(!1)};return document.addEventListener("mousedown",c),document.addEventListener("keydown",v),()=>{document.removeEventListener("mousedown",c),document.removeEventListener("keydown",v)}},[r]);const p=t?((i=s.find(c=>c.value===t))==null?void 0:i.label)??vs(t):"All Escalations",f=c=>`w-full text-left px-3 py-1.5 text-sm flex items-baseline gap-2 transition-colors ${c?"text-accent bg-accent/5":"text-text-primary hover:bg-surface-hover"}`;return e.jsxs("div",{ref:x,className:"relative min-w-0",children:[e.jsxs("button",{type:"button",onClick:()=>h(c=>!c),className:"group flex items-center gap-2 min-w-0 heading-1 hover:text-accent transition-colors",children:[e.jsx("span",{className:"truncate",children:p}),e.jsx(We,{className:`w-6 h-6 shrink-0 text-text-tertiary group-hover:text-accent transition-transform ${r?"rotate-180":""}`,strokeWidth:1.5})]}),r&&e.jsxs("div",{className:"absolute z-[100] top-full left-0 mt-2 min-w-[16rem] max-h-80 overflow-y-auto bg-surface-raised border border-surface-border rounded-md shadow-lg py-1",children:[e.jsx("button",{type:"button",onClick:()=>{o(""),h(!1)},className:f(!t),children:"All Escalations"}),s.length>0&&e.jsx("div",{className:"h-px bg-surface-border my-1"}),s.map(c=>e.jsxs("button",{type:"button",onClick:()=>{o(c.value),h(!1)},className:f(t===c.value),children:[e.jsx("span",{className:"truncate",children:c.label}),c.label!==c.value&&e.jsx("span",{className:"text-2xs font-mono text-text-quaternary shrink-0",children:c.value})]},c.value))]})]})}const Ve="created_at";function xe(t){return t.replace(/^metadata\./,"")}function Gs({orderBy:t,onChange:s}){const o=t==null?void 0:t[0],r=(o==null?void 0:o.field)??Ve,h=(o==null?void 0:o.direction)??"desc",x=r===Ve,p=f=>s([{...o??{},field:r,direction:f}]);return e.jsxs("div",{className:"flex items-center gap-1.5",children:[!x&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"text-text-quaternary",children:"sort"}),e.jsx("span",{className:"font-mono max-w-[120px] truncate",title:r,children:xe(r)}),e.jsx("button",{onClick:()=>s(void 0),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":"Reset sort to created date",children:e.jsx(ae,{className:"w-2.5 h-2.5"})})]}),e.jsxs("div",{className:"flex items-center rounded overflow-hidden border border-surface-border",role:"radiogroup","aria-label":"Sort direction",children:[e.jsx("button",{type:"button",role:"radio","aria-checked":h==="desc",onClick:()=>p("desc"),className:`px-1.5 py-1 transition-colors ${h==="desc"?"bg-accent text-text-inverse":"text-text-tertiary hover:bg-surface-hover"}`,title:x?"Newest first":`${xe(r)} descending`,children:e.jsx(rs,{className:"w-3.5 h-3.5"})}),e.jsx("button",{type:"button",role:"radio","aria-checked":h==="asc",onClick:()=>p("asc"),className:`px-1.5 py-1 border-l border-surface-border transition-colors ${h==="asc"?"bg-accent text-text-inverse":"text-text-tertiary hover:bg-surface-hover"}`,title:x?"Oldest first":`${xe(r)} ascending`,children:e.jsx(ls,{className:"w-3.5 h-3.5"})})]})]})}const Hs=t=>t.isPriorityPending||t.isClaimPending||t.isAssignPending||t.isEscalatePending||t.isTriagePending||t.isCancelPending,he="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-text-secondary bg-surface border border-surface-border rounded-[4px] hover:border-accent/50 hover:text-text-primary transition-colors disabled:opacity-50 disabled:hover:border-surface-border",me=`${he} appearance-none cursor-pointer`,Js="inline-flex items-center h-7 px-2.5 text-2xs font-medium text-status-error bg-surface border border-status-error/30 rounded-[4px] hover:border-status-error hover:bg-status-error/5 transition-colors disabled:opacity-50";function Qs(t){var f;const s=Hs(t),o=pe(),{data:r}=Ot(),h=Ft(),x=h!==null?h:((f=r==null?void 0:r.ai)==null?void 0:f.enabled)===!0,p=t.selectedCount>0;return e.jsx("div",{className:`grid transition-all duration-200 ease-in-out ${p?"grid-rows-[1fr] opacity-100":"grid-rows-[0fr] opacity-0 pointer-events-none"}`,children:e.jsx("div",{className:"overflow-hidden",children:e.jsxs("div",{className:"flex flex-wrap items-center gap-2 py-2.5 pl-3 pr-2 mt-4 mb-3 bg-surface-sunken/60 border-l-2 border-l-accent",children:[e.jsxs("span",{className:"text-2xs font-semibold uppercase tracking-wider text-accent tabular-nums",children:[t.selectedCount," selected"]}),e.jsx("div",{className:"mx-1 h-4 w-px bg-surface-border"}),e.jsxs("select",{onChange:i=>{i.target.value&&(t.onSetPriority(parseInt(i.target.value)),i.target.value="")},disabled:s,className:me,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Priority…"}),Ms.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))]}),e.jsxs("select",{onChange:i=>{i.target.value&&(t.onClaim(parseInt(i.target.value)),i.target.value="")},disabled:s,className:me,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Claim for…"}),o.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value))]}),e.jsx("button",{onClick:t.onAssign,disabled:s,className:he,children:t.isAssignPending?"Assigning…":"Assign to…"}),t.availableRoles.length>0&&e.jsxs("select",{onChange:i=>{i.target.value&&(t.onEscalate(i.target.value),i.target.value="")},disabled:s,className:me,defaultValue:"",children:[e.jsx("option",{value:"",disabled:!0,children:"Escalate to…"}),t.availableRoles.map(i=>e.jsx("option",{value:i,children:i},i))]}),x&&e.jsx("button",{onClick:t.onTriage,disabled:s,className:he,children:t.isTriagePending?"Triaging…":"Triage"}),e.jsx("button",{onClick:t.onCancel,disabled:s,className:Js,children:t.isCancelPending?"Cancelling…":"Cancel"}),e.jsx("div",{className:"flex-1"}),s&&e.jsx("span",{className:"text-2xs text-text-tertiary animate-pulse",children:"Processing…"}),e.jsx("button",{onClick:t.onClearSelection,className:"px-1 text-2xs font-medium text-text-tertiary hover:text-text-primary transition-colors",children:"Clear"})]})})})}function Ks({open:t,onClose:s,selectedCount:o,selectedRoles:r,onSubmit:h,isPending:x}){const{isSuperAdmin:p}=Ke(),f=pe(),[i,c]=g.useState("user"),[v,k]=g.useState(null),[M,j]=g.useState(""),[w,l]=g.useState("30"),[m,d]=g.useState(0),u=g.useCallback(y=>d(y),[]),a=!p&&r.length===1?r[0]:void 0,C=Ye(M,250),{data:S,isLoading:P}=Es({role:a,status:"active",search:C.trim()||void 0,limit:200}),E=(S==null?void 0:S.users)??[],A=()=>{c("user"),k(null),j(""),l("30"),d(0),s()},T=y=>{k(y),c("duration")},I=()=>{c("user")},V=()=>{if(!v)return;const y=w==="custom"?m:parseInt(w);!y||y<=0||h(v.id,y)};return e.jsx(fe,{open:t,onClose:A,title:"Assign Escalations",children:e.jsxs("div",{className:"space-y-4",children:[i==="user"&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Select a user to assign"," ",e.jsx("span",{className:"font-medium text-text-primary",children:o})," ","escalation(s) to:"]}),e.jsx("input",{type:"text",value:M,onChange:y=>j(y.target.value),placeholder:"Search by name or email...",className:"input text-xs w-full",autoFocus:!0}),e.jsxs("div",{className:"max-h-60 overflow-y-auto border border-surface-border rounded-lg divide-y divide-surface-border",children:[P&&e.jsx("p",{className:"text-xs text-text-tertiary p-3",children:"Loading users..."}),!P&&E.length===0&&e.jsx("p",{className:"text-xs text-text-tertiary p-3",children:"No users found"}),E.map(y=>e.jsxs("button",{onClick:()=>T(y),className:"w-full text-left px-3 py-2 hover:bg-surface-hover transition-colors",children:[e.jsx("p",{className:"text-xs font-medium text-text-primary",children:y.display_name||y.external_id}),y.email&&e.jsx("p",{className:"text-2xs text-text-tertiary",children:y.email})]},y.id))]}),e.jsx("div",{className:"flex justify-end pt-2",children:e.jsx("button",{onClick:A,className:"btn-secondary text-xs",children:"Cancel"})})]}),i==="duration"&&v&&e.jsxs(e.Fragment,{children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Assign to"," ",e.jsx("span",{className:"font-medium text-text-primary",children:v.display_name||v.external_id})," ","for:"]}),e.jsxs("select",{value:w,onChange:y=>{l(y.target.value),d(0)},className:"select w-full text-sm",children:[f.map(y=>e.jsx("option",{value:y.value,children:y.label},y.value)),e.jsx("option",{value:"custom",children:"Other..."})]}),w==="custom"&&e.jsx(Xe,{onChange:u,autoFocus:!0}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:I,className:"btn-secondary text-xs",children:"Back"}),e.jsx("button",{onClick:V,disabled:x,className:"btn-primary text-xs",children:x?"Assigning...":"Assign"})]})]})]})})}function Ws({open:t,onClose:s,selectedCount:o,onSubmit:r,isPending:h}){const[x,p]=g.useState(""),f=()=>{r(x||void 0)};return e.jsx(fe,{open:t,onClose:s,title:"Submit for AI Triage",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Submit ",e.jsx("span",{className:"font-medium text-text-primary",children:o})," escalation(s) for AI triage? The triage orchestrator will take over resolution."]}),e.jsxs("div",{children:[e.jsxs("label",{className:"text-xs font-medium text-text-secondary block mb-1",children:["Triage hint ",e.jsx("span",{className:"text-text-tertiary",children:"(optional)"})]}),e.jsx("input",{type:"text",value:x,onChange:i=>p(i.target.value),placeholder:"e.g., image_orientation",className:"input text-xs font-mono w-full"}),e.jsx("p",{className:"text-2xs text-text-tertiary mt-1",children:"Guides the triage workflow on what remediation to apply"})]}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:s,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:f,disabled:h,className:"btn-primary text-xs",children:h?"Submitting...":"Submit for Triage"})]})]})})}function q(t,s,o){return r=>{t.mutate(r,{onSuccess:()=>{s(),o==null||o()}})}}function Xs(t){const s=()=>[...t.selectedIds];return{handleSetPriority:i=>{q(t.setPriority,t.clearSelection)({ids:s(),priority:i})},handleBulkClaim:i=>{q(t.bulkClaim,t.clearSelection)({ids:s(),durationMinutes:i})},handleBulkEscalate:i=>{q(t.bulkEscalate,t.clearSelection)({ids:s(),targetRole:i})},handleBulkTriage:i=>{q(t.bulkTriage,t.clearSelection,t.closeTriageModal)({ids:s(),hint:i})},handleBulkAssign:(i,c)=>{q(t.bulkAssign,t.clearSelection,t.closeAssignModal)({ids:s(),targetUserId:i,durationMinutes:c})},handleBulkCancel:()=>{q(t.bulkCancel,t.clearSelection,t.closeCancelModal)({ids:s()})}}}function Ys({claimTarget:t,onClose:s,claimDuration:o,onDurationChange:r,claimDurations:h,onCustomClaimChange:x,onClaim:p,isPending:f}){return e.jsx(fe,{open:!!t,onClose:s,title:"Claim Escalation",children:e.jsxs("div",{className:"space-y-4",children:[e.jsxs("p",{className:"text-sm text-text-secondary",children:["Claim ",e.jsx("span",{className:"font-medium text-text-primary",children:t==null?void 0:t.type})," for:"]}),e.jsxs("select",{value:o,onChange:i=>{r(i.target.value)},className:"select w-full text-sm",children:[h.map(i=>e.jsx("option",{value:i.value,children:i.label},i.value)),e.jsx("option",{value:"custom",children:"Other..."})]}),o==="custom"&&e.jsx(Xe,{onChange:x,autoFocus:!0}),e.jsxs("div",{className:"flex justify-end gap-3 pt-2",children:[e.jsx("button",{onClick:s,className:"btn-secondary text-xs",children:"Cancel"}),e.jsx("button",{onClick:p,className:"btn-primary text-xs",disabled:f,children:f?"Claiming...":"Claim"})]})]})})}const Ze={pending:"--lt-status-queued-graphic",claimed:"--lt-status-claimed-graphic",resolved:"--lt-status-success-graphic",cancelled:"--lt-text-quaternary",expired:"--lt-text-tertiary"},et="--lt-text-quaternary";function Zs(t){return Ze[t]??et}const H=Object.fromEntries(Object.entries(Ze).map(([t,s])=>[t,`rgb(var(${s}))`])),Ue=40,ea=64,ta=24,Ge=3;function tt(t){return t<6e4?`${Math.round(t/1e3)}s`:t<36e5?`${Math.round(t/6e4)}m`:t<864e5?`${(t/36e5).toFixed(1)}h`:`${(t/864e5).toFixed(1)}d`}function He(t){const s=Date.now()-t;return s<6e4?"just now":s<36e5?`${Math.round(s/6e4)}m ago`:s<864e5?`${Math.round(s/36e5)}h ago`:`${Math.round(s/864e5)}d ago`}function Je(t){return t.replace(/-/g," ").replace(/\b\w/g,s=>s.toUpperCase())}function sa(t,s){return t?[...s.filter(r=>r in t),...Object.keys(t).filter(r=>!s.includes(r))].map(r=>[r,t[r]]):[]}function aa({e:t}){const s=t.endMs-t.startMs;if(s<=0)return null;const o=H.pending,r=H.claimed,h=t.status==="cancelled"||t.status==="expired"?H.cancelled:H.resolved;let x=100,p=0,f=0;return t.claimedMs!==null?(x=Math.max(0,Math.min(100,(t.claimedMs-t.startMs)/s*100)),t.isOpen?p=100-x:(p=Math.max(0,Math.min(100-x,(t.endMs-t.claimedMs)/s*100)),f=Math.max(0,100-x-p))):t.isOpen||(f=100,x=0),e.jsxs("div",{className:"mt-2 h-0.5 rounded-full overflow-hidden flex bg-surface-sunken",children:[x>0&&e.jsx("div",{style:{width:`${x}%`,backgroundColor:o,opacity:.6}}),p>0&&e.jsx("div",{style:{width:`${p}%`,backgroundColor:r,opacity:.6}}),f>0&&e.jsx("div",{style:{width:`${f}%`,backgroundColor:h,opacity:.6}})]})}function na({gapMs:t,heightPx:s}){return e.jsx("div",{className:"relative flex items-center justify-center",style:{height:s},children:t>=6e4&&e.jsx("span",{className:"text-2xs text-text-quaternary font-mono bg-surface px-2 relative z-10",children:tt(t)})})}function Qe({e:t,highlightKeys:s,onRowClick:o}){const[r,h]=g.useState(!1),x=H[t.displayStatus]??`rgb(var(${et}))`,p=sa(t.metadata,s),f=r?p:p.slice(0,Ge),i=p.length-Ge;return e.jsxs("div",{className:"cursor-pointer max-w-[460px] min-w-[260px] w-full bg-surface-raised rounded-lg shadow-sm border border-surface-border/60 px-3.5 pt-2.5 pb-2 hover:shadow-md hover:border-surface-border transition-all duration-150",style:{borderTopWidth:"3px",borderTopColor:x},onClick:()=>o==null?void 0:o(t),children:[e.jsxs("div",{className:"flex items-baseline gap-2 mb-1.5",children:[e.jsx("span",{className:"text-2xs font-bold uppercase tracking-widest text-text-quaternary shrink-0",children:Je(t.role)}),e.jsxs("span",{className:"text-xs font-semibold text-text-primary truncate",title:t.type,children:[t.type,t.subtype&&t.subtype!==t.type&&t.subtype!==""&&e.jsxs("span",{className:"font-normal text-text-tertiary",children:[" · ",t.subtype]})]})]}),f.length>0&&e.jsxs("div",{className:"border-t border-surface-border/40 pt-1 space-y-px",children:[f.map(([c,v])=>{const k=String(v),M=s.includes(c);return e.jsxs("div",{className:"group/row flex items-center gap-1.5 -mx-1 px-1 py-[2px] rounded",children:[e.jsx("span",{className:`shrink-0 w-[60px] text-2xs font-mono uppercase tracking-wide truncate ${M?"text-accent":"text-text-quaternary"}`,title:c,children:c}),e.jsx("span",{className:`flex-1 min-w-0 text-2xs font-medium truncate ${M?"text-text-primary":"text-text-tertiary"}`,title:k,children:k}),e.jsxs("span",{className:"flex items-center gap-px shrink-0 opacity-0 group-hover/row:opacity-100 transition-opacity",children:[e.jsx(qe,{to:Re(c,v,t.role),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Filter ${Je(t.role)}: ${c} = ${k}`,onClick:j=>j.stopPropagation(),children:e.jsx(cs,{className:"w-2.5 h-2.5"})}),e.jsx(qe,{to:Re(c,v),className:"p-0.5 rounded text-text-quaternary hover:text-accent transition-colors",title:`Search all: ${c} = ${k}`,onClick:j=>j.stopPropagation(),children:e.jsx(ds,{className:"w-2.5 h-2.5"})})]})]},c)}),i>0&&e.jsx("button",{className:"flex items-center gap-0.5 text-2xs text-text-quaternary hover:text-accent transition-colors mt-0.5 -mx-1 px-1 py-px",onClick:c=>{c.stopPropagation(),h(v=>!v)},children:r?e.jsxs(e.Fragment,{children:[e.jsx(us,{className:"w-2.5 h-2.5"})," less"]}):e.jsxs(e.Fragment,{children:[e.jsx(We,{className:"w-2.5 h-2.5"})," ",i," more"]})})]}),e.jsx(aa,{e:t})]})}function ra({escalations:t,highlightKeys:s=[],onRowClick:o,total:r,page:h,totalPages:x,onPageChange:p}){var d,u;const f=Date.now(),c=t.map(a=>{const C=new Date(a.created_at).getTime(),S=a.resolved_at?new Date(a.resolved_at).getTime():null,P=a.claimed_at?new Date(a.claimed_at).getTime():null,E=!S&&a.status!=="cancelled"&&a.status!=="expired",A=S??(E?f:C+3e4),T=a.status==="pending"&&Ns(a)?"claimed":a.status;return{...a,startMs:C,claimedMs:P,endMs:A,isOpen:E,displayStatus:T}});if(c.length===0)return e.jsx("p",{className:"mt-12 text-center text-sm text-text-tertiary",children:"No escalations matched."});const v=c.length,M=Math.max(Math.abs((((d=c[v-1])==null?void 0:d.startMs)??0)-(((u=c[0])==null?void 0:u.startMs)??0)),1)/Math.max(v-1,1),j=ea/Math.max(M,1),l=new Set(c.map(a=>new Date(a.startMs).toDateString())).size>1;function m(a){const C=new Date(a),S=C.toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"});return l?C.toLocaleDateString([],{month:"short",day:"numeric"})+" "+S:S}return e.jsxs("div",{className:"mt-4 pb-24",children:[e.jsxs("div",{className:"relative",children:[e.jsx("div",{className:"absolute left-1/2 -translate-x-px inset-y-0 w-px bg-surface-border/80"}),c.map((a,C)=>{const S=c[C-1],P=S?Math.abs(a.startMs-S.startMs):null,E=P!==null?Math.max(ta,Math.round(P*j)):0,A=C%2===0,T=Zs(a.displayStatus),I=`rgb(var(${T}))`,V=a.endMs-a.startMs,y=a.isOpen?He(a.startMs):`${He(a.startMs)} · ${tt(V)}`;return e.jsxs("div",{children:[C>0&&e.jsx(na,{gapMs:P,heightPx:E}),e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-1 flex justify-end items-center",children:A?e.jsxs("div",{className:"flex items-center",children:[e.jsx(Qe,{e:a,highlightKeys:s,onRowClick:o}),e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:Ue}})]}):e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pr-3",children:y})}),e.jsx("div",{className:"relative z-10 flex-shrink-0 w-3.5 h-3.5 rounded-full border-2 border-surface cursor-pointer transition-all duration-150 hover:scale-[1.5]",style:{backgroundColor:I,boxShadow:`0 0 0 3px rgb(var(${T}) / 0.16), 0 1px 3px rgb(var(${T}) / 0.19)`},onClick:()=>o==null?void 0:o(a)}),e.jsx("div",{className:"flex-1 flex justify-start items-center",children:A?e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums pl-3",children:y}):e.jsxs("div",{className:"flex items-center",children:[e.jsx("div",{className:"flex-shrink-0 h-px bg-surface-border/70",style:{width:Ue}}),e.jsx(Qe,{e:a,highlightKeys:s,onRowClick:o})]})})]}),e.jsx("div",{className:"flex justify-center relative z-10 mt-0.5",children:e.jsx("span",{className:"text-2xs text-text-quaternary font-mono tabular-nums bg-surface px-1.5",children:m(a.startMs)})})]},a.id)})]}),x>1&&e.jsxs("div",{className:"sticky bottom-0 z-20 bg-surface/95 backdrop-blur-sm border-t border-surface-border -mx-page-x px-page-x pt-2 pb-4 flex items-center justify-between mt-10",children:[e.jsxs("span",{className:"text-2xs text-text-tertiary",children:["Page ",e.jsx("span",{className:"font-medium text-text-secondary",children:h})," ","of ",e.jsx("span",{className:"font-medium text-text-secondary",children:x})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("button",{onClick:()=>p(h-1),disabled:h<=1,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(is,{className:"w-4 h-4"})}),e.jsx("button",{onClick:()=>p(h+1),disabled:h>=x,className:"p-1.5 rounded hover:bg-surface-hover disabled:opacity-30 text-text-tertiary hover:text-text-primary transition-colors disabled:cursor-not-allowed",children:e.jsx(os,{className:"w-4 h-4"})})]})]})]})}function Fa(){var Te,Oe,Fe,$e,_e,Le,Be;const t=_s(),{filters:s,setFilter:o,pagination:r}=ks({filters:{role:"",type:"",priority:"",status:"available",search:""}});ns({role:s.role||null,verbs:["created","claimed"]});const h=Ye(s.search,300),x=pe(),[p,f]=g.useState(null),[i,c]=g.useState("30"),[v,k]=g.useState(0),M=g.useCallback(n=>k(n),[]),[j,w]=g.useState(new Set),[l,m]=g.useState(!1),[d,u]=Ls(),a=g.useMemo(()=>$t(d),[d]),C=g.useCallback(n=>{u(b=>{const N=new URLSearchParams(b);return _t(N,n),N.delete("page"),N})},[u]),{data:S}=Lt(l),P=Bt(a)+(s.search?1:0),E="facet-query",{setPanel:A,closePanel:T,open:I,ownerKey:V}=Rt();g.useEffect(()=>{if(!l){T(E);return}A(e.jsx(Vs,{value:a,onChange:C,facetKeys:(S==null?void 0:S.keys)??[],search:s.search??"",onSearchChange:n=>o("search",n),activeFacetCount:P,onClear:()=>{C({}),o("search","")},onClose:()=>m(!1)}),{width:420,key:E})},[l,a,C,S,s.search,o,P,A,T]);const y=I&&V===E,ne=g.useRef(!1);g.useEffect(()=>{if(y){ne.current=!0;return}ne.current&&(ne.current=!1,m(!1))},[y]);const[st,re]=g.useState(!1),[at,le]=g.useState(!1),[nt,ie]=g.useState(!1),rt=g.useCallback(n=>C({...a,orderBy:n}),[a,C]),J=Bs(),{data:Q}=zt(),ge=qt(),lt=g.useCallback(()=>{var N;const n=window.prompt("Pin label:");if(!(n!=null&&n.trim()))return;const b=((N=Q==null?void 0:Q.preferences)==null?void 0:N.pinnedViews)??[];ge.mutate({pinnedViews:[...b,{id:Dt(),label:n.trim(),url:J.pathname+J.search,badge:!0}]})},[J.pathname,J.search,Q,ge]),{canBulk:it}=It(),be=a.facets?Object.keys(a.facets):[],K=d.get("view"),ye=g.useCallback(n=>{u(b=>{const N=new URLSearchParams(b);return n?N.set("view",n):N.delete("view"),N},{replace:!0})},[u]),$=K?K==="timeline":P>0,ot=g.useCallback(n=>{const{[n]:b,...N}=a.facets??{};C({...a,facets:Object.keys(N).length>0?N:void 0})},[a,C]),ve=Vt(),je=Ut(),Ne=Gt(),oe=Ht(),Ce=Jt(),ce=Qt(),W=Kt(),{data:B}=Wt(),{data:_}=Xt(),{data:de}=Yt(),{user:X,isSuperAdmin:ct,hasRoleType:dt}=Ke(),ke=ct||dt("admin"),we=g.useMemo(()=>new Set(((X==null?void 0:X.roles)??[]).map(n=>n.role)),[X]),ut=g.useMemo(()=>{const n=(_==null?void 0:_.roles)??[];return(ke?n:n.filter(N=>we.has(N.role)&&!as(N.role))).map(N=>({value:N.role,label:js(N)})).sort((N,Tt)=>N.label.localeCompare(Tt.label))},[_,ke,we]);g.useEffect(()=>{w(new Set)},[s.role,s.type,s.priority,s.status,h,r.page,r.pageSize]);const U=s.status||"",G=U==="available",ue=U==="claimed",Se=ue?"pending":U==="resolved"?"resolved":U==="cancelled"?"cancelled":U==="expired"?"expired":void 0,Pe=100,Me={role:s.role||void 0,type:s.type||void 0,priority:s.priority?parseInt(s.priority):void 0,limit:$?Pe:r.pageSize,offset:r.offset,sort_by:"created_at",order:"desc",search:h||void 0,...a},xt=Zt({...Me,enabled:G}),mt=es({status:Se,claimed:ue||void 0,...Me,enabled:!G}),ht=G?xt:mt,{data:R,isLoading:pt,error:Y,refetch:ft,isFetching:gt}=ht,bt=ws(`/escalations${G?"/available":""}`,{status:Se,claimed:ue||void 0,role:s.role||void 0,type:s.type||void 0,priority:s.priority||void 0,search:h||void 0,sort_by:"created_at",order:"desc",limit:r.pageSize,offset:r.offset,facets:a.facets&&Object.keys(a.facets).length?JSON.stringify(a.facets):void 0,block:(Te=a.block)!=null&&Te.length?JSON.stringify(a.block):void 0,range:(Oe=a.range)!=null&&Oe.length?JSON.stringify(a.range):void 0,exists:(Fe=a.exists)!=null&&Fe.length?JSON.stringify(a.exists):void 0,roles:($e=a.roles)!=null&&$e.length?JSON.stringify(a.roles):void 0,orderBy:(_e=a.orderBy)!=null&&_e.length?JSON.stringify(a.orderBy):void 0,available:a.available!=null?String(a.available):void 0}),F=(R==null?void 0:R.escalations)??[],O=(R==null?void 0:R.total)??0,L=s.role||(((Le=a.roles)==null?void 0:Le.length)===1?a.roles[0]:null),Z=((Be=ts(L??"",void 0,!!L).data)==null?void 0:Be.list_schema)??null,Ee=!!L&&!!Z&&!!Z["x-lt-layout"]&&Z["x-lt-layout"]!=="table",ee=Ee&&!$&&(K?K==="rich":!0),Ae=g.useMemo(()=>{if(!a.jeopardy||!L)return null;const n=((_==null?void 0:_.roles)??[]).find(N=>N.role===L),b=(n==null?void 0:n.priority_threshold_minutes)??(n==null?void 0:n.sla_minutes)??null;return b!=null?ss(b*6e4):null},[a.jeopardy,L,_]),yt=g.useMemo(()=>{const n=new Set;for(const b of F)j.has(b.id)&&n.add(b.role);return[...n]},[F,j]),vt=g.useCallback(()=>w(new Set),[]),jt=()=>{if(!p)return;const n=i==="custom"?v:parseInt(i);!n||n<=0||ve.mutate({id:p.id,durationMinutes:n},{onSuccess:()=>{f(null),t(`/escalations/detail/${p.id}`)}})},{handleSetPriority:Nt,handleBulkClaim:Ct,handleBulkEscalate:kt,handleBulkTriage:wt,handleBulkAssign:St,handleBulkCancel:Pt}=Xs({selectedIds:j,clearSelection:vt,setPriority:je,bulkClaim:Ne,bulkEscalate:Ce,bulkTriage:ce,bulkAssign:oe,bulkCancel:W,closeTriageModal:()=>re(!1),closeAssignModal:()=>le(!1),closeCancelModal:()=>ie(!1)}),Mt=n=>{const b=new Set(j);b.has(n)?b.delete(n):b.add(n),w(b)},Et=()=>{j.size===F.length?w(new Set):w(new Set(F.map(n=>n.id)))},At=[it?{key:"select",label:e.jsx("input",{type:"checkbox",checked:F.length>0&&j.size===F.length,onChange:Et,className:"rounded"}),render:n=>e.jsx("input",{type:"checkbox",checked:j.has(n.id),onChange:b=>{b.stopPropagation(),Mt(n.id)},onClick:b=>b.stopPropagation(),className:"rounded"}),className:"w-10",priority:1}:{key:"spacer",label:"",render:()=>null,className:"w-10",priority:3},...As({highlightKeys:be}),{key:"actions",label:"",render:n=>e.jsx(Os,{children:e.jsx(Fs,{icon:xs,title:"Claim escalation",onClick:()=>f(n),alwaysVisible:!0,colorClass:"text-accent/40 hover:text-accent",size:"sm"})}),className:"w-10 text-right"}];return e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-10 min-w-0",children:[e.jsx(Us,{role:s.role,options:ut,onChange:n=>o("role",n)}),e.jsx("button",{onClick:()=>{window.location.hash="#docs:dashboard.md:all-escalations"},className:"text-text-quaternary hover:text-accent transition-colors mt-1 shrink-0",title:"Open docs for this page",children:e.jsx(ms,{className:"w-4 h-4",strokeWidth:1.5})})]}),e.jsx(Ts,{filters:s,setFilter:o,roles:(B==null?void 0:B.roles)??[],types:(de==null?void 0:de.types)??[],showStatus:!0,showSearch:!1,actions:e.jsxs(e.Fragment,{children:[$&&e.jsxs("span",{className:"text-2xs text-text-tertiary whitespace-nowrap",children:[O>100&&e.jsxs(e.Fragment,{children:[e.jsxs("span",{className:"font-medium text-text-secondary",children:[(r.page-1)*100+1,"–",Math.min(r.page*100,O)]})," of "]}),e.jsx("span",{className:"font-medium text-text-secondary",children:O})," ",O===1?"escalation":"escalations"]}),e.jsx(Gs,{orderBy:a.orderBy,onChange:rt}),e.jsx("span",{className:"h-3.5 w-px bg-surface-border shrink-0"}),e.jsx($s,{onRefresh:()=>ft(),isFetching:gt,apiPath:bt}),Ee&&!$&&e.jsx("button",{onClick:()=>ye(ee?"table":"rich"),className:"ml-2 inline-flex h-7 w-7 items-center justify-center rounded text-text-tertiary hover:bg-surface-hover hover:text-text-primary transition-colors",title:ee?"Table view":"Rich view",children:ee?e.jsx(ze,{className:"w-4 h-4"}):e.jsx(hs,{className:"w-4 h-4"})}),P>0&&e.jsx("button",{onClick:()=>ye($?"table":"timeline"),className:"ml-2 inline-flex h-7 w-7 items-center justify-center rounded text-text-tertiary hover:bg-surface-hover hover:text-text-primary transition-colors",title:$?"Table view":"Timeline view",children:$?e.jsx(ze,{className:"w-4 h-4"}):e.jsx(ps,{className:"w-4 h-4"})}),e.jsx("button",{onClick:lt,className:"ml-2 inline-flex h-7 w-7 items-center justify-center rounded text-text-tertiary hover:bg-surface-hover hover:text-accent transition-colors",title:"Pin this view — save the current filters to your Pinned section","data-testid":"pin-current-view",children:e.jsx(fs,{className:"w-4 h-4"})}),e.jsxs("button",{onClick:()=>m(n=>!n),className:"relative ml-2 inline-flex h-7 w-7 items-center justify-center rounded text-text-tertiary hover:bg-surface-hover hover:text-text-primary transition-colors",title:"Faceted query",children:[e.jsx(gs,{className:"w-4 h-4"}),P>0&&e.jsx("span",{className:"absolute -right-1 -top-1 flex h-3.5 min-w-[14px] items-center justify-center rounded-full bg-accent px-0.5 text-2xs font-medium text-text-inverse",children:P})]})]})}),e.jsx(Qs,{selectedCount:j.size,onClearSelection:()=>w(new Set),onSetPriority:Nt,onClaim:Ct,onAssign:()=>le(!0),onEscalate:kt,onTriage:()=>re(!0),onCancel:()=>ie(!0),isPriorityPending:je.isPending,isClaimPending:Ne.isPending,isAssignPending:oe.isPending,isEscalatePending:Ce.isPending,isTriagePending:ce.isPending,isCancelPending:W.isPending,availableRoles:(B==null?void 0:B.roles)??[]}),(a.facets&&Object.keys(a.facets).length>0||a.jeopardy)&&e.jsxs("div",{className:"sticky top-14 z-30 bg-surface/98 backdrop-blur-sm border-b border-surface-border/30 -mx-page-x px-page-x py-2 flex items-center gap-1.5 flex-wrap",children:[a.jeopardy&&e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full bg-status-error px-2.5 py-0.5 text-2xs font-semibold text-text-inverse",children:[e.jsx(bs,{className:"w-2.5 h-2.5",strokeWidth:2.5}),"in jeopardy",Ae&&e.jsxs("span",{className:"font-mono font-normal opacity-90",children:["> ",Ae]}),e.jsx("button",{onClick:()=>C({...a,jeopardy:void 0}),className:"ml-0.5 -mr-0.5 flex items-center text-text-inverse/70 hover:text-text-inverse transition-colors","aria-label":"Clear jeopardy filter",children:e.jsx(ae,{className:"w-2.5 h-2.5"})})]}),Object.entries(a.facets??{}).map(([n,b])=>e.jsxs("span",{className:"inline-flex items-center gap-1 rounded-full border border-accent/25 bg-accent/8 px-2.5 py-0.5 text-2xs font-medium text-accent/90",children:[e.jsx("span",{className:"font-mono text-text-tertiary",children:n}),e.jsx("span",{className:"text-text-quaternary",children:"="}),e.jsx("span",{className:"font-mono max-w-[160px] truncate",title:String(b),children:String(b)}),e.jsx("button",{onClick:()=>ot(n),className:"ml-0.5 -mr-0.5 flex items-center text-text-quaternary hover:text-status-error transition-colors","aria-label":`Remove ${n} filter`,children:e.jsx(ae,{className:"w-2.5 h-2.5"})})]},n)),Object.keys(a.facets??{}).length>1&&e.jsx("button",{onClick:()=>C({...a,facets:void 0}),className:"text-2xs text-text-quaternary hover:text-text-secondary transition-colors px-1",children:"clear all"})]}),Y&&e.jsx("div",{className:"mb-4 px-4 py-3 rounded-md bg-status-error/10 border border-status-error/20 text-xs text-status-error",children:Y.message==="Session expired"?"Your session has expired. Please log in again.":`Failed to load escalations: ${Y.message}`}),$?e.jsx(ra,{escalations:F,highlightKeys:be,onRowClick:n=>t(`/escalations/detail/${n.id}`,{state:{from:"/escalations/available"}}),total:O,page:r.page,totalPages:Math.ceil(O/Pe),onPageChange:r.setPage}):ee?e.jsx(Cs,{role:L,listSchema:Z,activeEscalations:F,onRowClick:n=>t(`/escalations/detail/${n.id}`,{state:{from:"/escalations/available"}}),onOpenGroup:n=>t(n),onAddFacet:(n,b)=>C({...a,facets:{...a.facets??{},[n]:typeof b=="object"&&b!==null?JSON.stringify(b):b}}),total:O,page:r.page,totalPages:r.totalPages(O),pageSize:r.pageSize,onPageChange:r.setPage,onPageSizeChange:r.setPageSize}):e.jsxs(e.Fragment,{children:[e.jsx(Ss,{columns:At,data:F,layout:"fixed",keyFn:n=>n.id,onRowClick:n=>t(`/escalations/detail/${n.id}`,{state:{from:"/escalations/available"}}),isLoading:pt,emptyMessage:Y?"Unable to load data":"No escalations"}),e.jsx(Ps,{page:r.page,totalPages:r.totalPages(O),onPageChange:r.setPage,total:O,pageSize:r.pageSize,onPageSizeChange:r.setPageSize})]}),e.jsx(Ys,{claimTarget:p,onClose:()=>f(null),claimDuration:i,onDurationChange:n=>{c(n),k(0)},claimDurations:x,customClaimMinutes:v,onCustomClaimChange:M,onClaim:jt,isPending:ve.isPending}),e.jsx(Ws,{open:st,onClose:()=>re(!1),selectedCount:j.size,onSubmit:wt,isPending:ce.isPending}),e.jsx(Ks,{open:at,onClose:()=>le(!1),selectedCount:j.size,selectedRoles:yt,onSubmit:St,isPending:oe.isPending}),e.jsx(ys,{open:nt,onClose:()=>ie(!1),onConfirm:Pt,selectedCount:j.size,isPending:W.isPending,error:W.error})]})}export{Fa as AvailableEscalationsPage};
|
|
2
|
-
//# sourceMappingURL=AvailableEscalationsPage-C1vtTvqP.js.map
|