@microvac/ui 0.1.0-rc.14 → 0.1.0-rc.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/dist/assets/{ActiveAgentsPanel-C9AP9hJu.js → ActiveAgentsPanel-BEx06tMt.js} +1 -1
  2. package/dist/assets/{AdapterManager-CmxTUKJH.js → AdapterManager-3kEEQWFJ.js} +1 -1
  3. package/dist/assets/{AdvancedToolsRoute-CXsQnTei.js → AdvancedToolsRoute-CgS6B-oh.js} +1 -1
  4. package/dist/assets/{AgentActionButtons-DWq2OuVK.js → AgentActionButtons-Cz3jCEd7.js} +1 -1
  5. package/dist/assets/{AgentAdvancedTab-dhBDxF-H.js → AgentAdvancedTab-BG6ZIAuN.js} +1 -1
  6. package/dist/assets/{AgentBulkSettingsSheet-DYT4ovDg.js → AgentBulkSettingsSheet-BrrbvspS.js} +1 -1
  7. package/dist/assets/{AgentChat-r0TPOfPK.js → AgentChat-Dw9iXD6H.js} +1 -1
  8. package/dist/assets/{AgentDetailPage-Bc_okBuS.js → AgentDetailPage-CuVIHv_q.js} +3 -3
  9. package/dist/assets/{AgentIdentityChip-CB2NBXkZ.js → AgentIdentityChip-BrVCcuHQ.js} +1 -1
  10. package/dist/assets/{AgentRosterFilters-b7qMLv8-.js → AgentRosterFilters-GQ2bdXfW.js} +2 -2
  11. package/dist/assets/{Agents-BsvXy3pZ.js → Agents-clrVQnvc.js} +2 -2
  12. package/dist/assets/{Agents.production-BeOZmzaF.js → Agents.production-DTopo7XB.js} +2 -2
  13. package/dist/assets/{AnimatedDialogContent-CWshmxP2.js → AnimatedDialogContent-CDLfw-dJ.js} +1 -1
  14. package/dist/assets/{AppDetail-DbqENTF_.js → AppDetail-BcWBg5yW.js} +1 -1
  15. package/dist/assets/{AppNotConnected-BhnCqL0F.js → AppNotConnected-NgfyHZ4L.js} +1 -1
  16. package/dist/assets/{ApprovalDetail-B2KiYLTj.js → ApprovalDetail-Dm_1V4tC.js} +1 -1
  17. package/dist/assets/{Approvals-j-wRmqKj.js → Approvals-i5AB3JPj.js} +1 -1
  18. package/dist/assets/{AppsConnect-CcPVEZ0C.js → AppsConnect-D660Tpuo.js} +1 -1
  19. package/dist/assets/{AppsReview-B8eWvKkS.js → AppsReview-DdTqOisY.js} +1 -1
  20. package/dist/assets/{ArtifactEmptyGraphic-5mdkS5jj.js → ArtifactEmptyGraphic-DzxCruYA.js} +1 -1
  21. package/dist/assets/{Artifacts-Bz7Oo6VX.js → Artifacts-CkXBz6nh.js} +1 -1
  22. package/dist/assets/{AssigneePickerInner-DdpF7hck.js → AssigneePickerInner-BNjyABBe.js} +1 -1
  23. package/dist/assets/{AssistantConnection-BpaaJDc_.js → AssistantConnection-CNF6mDmO.js} +1 -1
  24. package/dist/assets/{AttentionInlineVerbs-DlPQVCO-.js → AttentionInlineVerbs-BiyZ1ekZ.js} +1 -1
  25. package/dist/assets/{AttentionQueueRow-BC6ezctS.js → AttentionQueueRow-Bh0dKHpF.js} +1 -1
  26. package/dist/assets/{AuditHub-BVP7LKL9.js → AuditHub-BK848cb4.js} +1 -1
  27. package/dist/assets/{AuditRuns-DqizHgX1.js → AuditRuns-CUdlbP7S.js} +1 -1
  28. package/dist/assets/{Auth-DOF0snjp.js → Auth-DDqxm5gD.js} +1 -1
  29. package/dist/assets/{BoardChat-BYAbDtfd.js → BoardChat-fvKqk0R7.js} +1 -1
  30. package/dist/assets/{BoardClaim-7y41Pr8e.js → BoardClaim-BEC5BZfz.js} +1 -1
  31. package/dist/assets/{BootstrapSetupUxLab-BftH1vOv.js → BootstrapSetupUxLab-CXzErrin.js} +1 -1
  32. package/dist/assets/{Browse-Ck01W1Yl.js → Browse-DoovSMuF.js} +1 -1
  33. package/dist/assets/{BudgetPolicyCard-CKhrzfgy.js → BudgetPolicyCard-BYMlczCq.js} +1 -1
  34. package/dist/assets/{CaseDetail-qlXKJ66D.js → CaseDetail-UMAcSH_x.js} +1 -1
  35. package/dist/assets/{CaseStatus-B3RiZVDH.js → CaseStatus-BI0aMl9l.js} +1 -1
  36. package/dist/assets/{Cases-CFV3V-5X.js → Cases-CMTkGghU.js} +1 -1
  37. package/dist/assets/{ChatEndpointDetail-7Hi5TJNt.js → ChatEndpointDetail-CocNEInH.js} +1 -1
  38. package/dist/assets/{ChatEndpointSetup-CtwgH6sg.js → ChatEndpointSetup-Cyi2tI9K.js} +1 -1
  39. package/dist/assets/{ChatIdentityConfirm-CXjksBwX.js → ChatIdentityConfirm-Ba3JuTX1.js} +1 -1
  40. package/dist/assets/{CliAuth-KVjrGMfZ.js → CliAuth-D2jnueGH.js} +1 -1
  41. package/dist/assets/{Companies-oeJem3De.js → Companies-K75I9dJs.js} +1 -1
  42. package/dist/assets/{CompanyAccess-vWT6G-n_.js → CompanyAccess-Cw6nLUhE.js} +1 -1
  43. package/dist/assets/{CompanyActivity-zOzzeN1B.js → CompanyActivity-BsgmVpWS.js} +1 -1
  44. package/dist/assets/CompanyActivity.production-w-KGxvo6.js +1 -0
  45. package/dist/assets/{CompanyConnections-llSEaVa2.js → CompanyConnections-yRPYSdm7.js} +1 -1
  46. package/dist/assets/{CompanyEnvironments-DNyyGC_S.js → CompanyEnvironments-BA7kWdOJ.js} +1 -1
  47. package/dist/assets/{CompanyExport-CFa-F8Es.js → CompanyExport-DfsK4b9c.js} +1 -1
  48. package/dist/assets/{CompanyImport-DG6qwQ8F.js → CompanyImport-DJHAsmSF.js} +1 -1
  49. package/dist/assets/{CompanySettings-Dv5Z3ZQi.js → CompanySettings-DwzHGXec.js} +1 -1
  50. package/dist/assets/{CompanySettingsPluginPage-CZk1d_0d.js → CompanySettingsPluginPage-Bpa81PF3.js} +1 -1
  51. package/dist/assets/{CompanySkills-CdzWhJfQ.js → CompanySkills-eTqgbqQN.js} +1 -1
  52. package/dist/assets/{CompanySkills.production-IoCRW5FQ.js → CompanySkills.production-CQSWfH0r.js} +1 -1
  53. package/dist/assets/{ConfigureBuiltInAgentModal-BwW7XQ1O.js → ConfigureBuiltInAgentModal-DgeD7t_i.js} +1 -1
  54. package/dist/assets/{CopyableGatewayUrl-PTn061ft.js → CopyableGatewayUrl-B6K3rOal.js} +1 -1
  55. package/dist/assets/{CordisPluginSettings-C_BeeGEc.js → CordisPluginSettings-DD3AnD2G.js} +1 -1
  56. package/dist/assets/{Costs-DhuNxwSj.js → Costs-orBM8T-a.js} +1 -1
  57. package/dist/assets/{CrossIssueCollaborationUxLab-ZaAXq46r.js → CrossIssueCollaborationUxLab-Bv9y9-NE.js} +1 -1
  58. package/dist/assets/{Dashboard-BaDnqiKo.js → Dashboard-CrSBNKX1.js} +1 -1
  59. package/dist/assets/{DashboardLive-D-Ed7osd.js → DashboardLive-Cg8C9RiS.js} +1 -1
  60. package/dist/assets/{DecisionDateChips-D3pl_mLn.js → DecisionDateChips-BLZKZH71.js} +1 -1
  61. package/dist/assets/{DecisionHistoryPanel-D5MzyrOh.js → DecisionHistoryPanel-yK-CP7Qg.js} +1 -1
  62. package/dist/assets/{DecisionQueuePage-D3UZ9oRk.js → DecisionQueuePage-BKXbERai.js} +1 -1
  63. package/dist/assets/{DesignGuide-COTo7ICj.js → DesignGuide-2FswNsXz.js} +1 -1
  64. package/dist/assets/{DesignSandboxTaskThread-CMeCSQid.js → DesignSandboxTaskThread-CGU--FXR.js} +1 -1
  65. package/dist/assets/{EmailConnectionAccess-kCL7obSr.js → EmailConnectionAccess-CZ5QRKyg.js} +1 -1
  66. package/dist/assets/{EmailEndpointSetup-BGrksR_u.js → EmailEndpointSetup-BI2vsd8Y.js} +1 -1
  67. package/dist/assets/{EnforcementBanner-_Eb_nK3M.js → EnforcementBanner-B-iX466h.js} +1 -1
  68. package/dist/assets/{EntityRow-gpsOgEtu.js → EntityRow-BsICt6pd.js} +1 -1
  69. package/dist/assets/{ExecutionWorkspaceDetail-DwGkH6d3.js → ExecutionWorkspaceDetail-CMqR9puh.js} +1 -1
  70. package/dist/assets/{ExternalAgentInviteDialog-CGid6pM9.js → ExternalAgentInviteDialog-De30ZrLP.js} +1 -1
  71. package/dist/assets/{FilterBar-1D-VhrvG.js → FilterBar-rCmsTtG4.js} +1 -1
  72. package/dist/assets/{FolderControls-CQ6kef3c.js → FolderControls-CmnB7Ap-.js} +1 -1
  73. package/dist/assets/{GatewayDetail-CCqekM1J.js → GatewayDetail-Duw9pJ10.js} +1 -1
  74. package/dist/assets/{GatewaysList-nFsRcszh.js → GatewaysList-BBhVGhRq.js} +1 -1
  75. package/dist/assets/{GitHubConnectionRecovery-B9sFWJup.js → GitHubConnectionRecovery-6VshLoNV.js} +1 -1
  76. package/dist/assets/{GoalDetail-BQ8y55P-.js → GoalDetail-CahntjlI.js} +1 -1
  77. package/dist/assets/{GoalTree-laRjXp0P.js → GoalTree-CU4GBFCh.js} +1 -1
  78. package/dist/assets/{Goals-Cm14EaeP.js → Goals-CzM2NDFR.js} +1 -1
  79. package/dist/assets/{InstanceAccess-DxQ-Akt_.js → InstanceAccess-CZzkE65W.js} +1 -1
  80. package/dist/assets/{InstanceExperimentalSettings-BxwqbXNw.js → InstanceExperimentalSettings-DWumKtOK.js} +1 -1
  81. package/dist/assets/{InviteLanding-Cf0L_u6s.js → InviteLanding-BIy2z50u.js} +1 -1
  82. package/dist/assets/{IssueChatLongThreadPerf-BfsF6FdF.js → IssueChatLongThreadPerf-D4DJvdOG.js} +1 -1
  83. package/dist/assets/{JoinRequestQueue-BXCdTFG_.js → JoinRequestQueue-C5rauGYm.js} +1 -1
  84. package/dist/assets/{Layout.production-CqzU0qMi.js → Layout.production-BSDWnupa.js} +1 -1
  85. package/dist/assets/{McpConnect-COWnZ9Eb.js → McpConnect-BN8ST0RS.js} +1 -1
  86. package/dist/assets/{MembershipAction-C9i9Sdmi.js → MembershipAction-DTjhGn-L.js} +1 -1
  87. package/dist/assets/{MetricCard-Bwnt3_p3.js → MetricCard-CeL9Pdn5.js} +1 -1
  88. package/dist/assets/{MissingPluginTabPlaceholder-B0Zxv1Kx.js → MissingPluginTabPlaceholder-CbQiSVnZ.js} +1 -1
  89. package/dist/assets/{NewAgent-BIlJ5Dyt.js → NewAgent-BszrNpQk.js} +1 -1
  90. package/dist/assets/{NewAgentDialog-CJdMxxYL.js → NewAgentDialog-U9qAcTzc.js} +1 -1
  91. package/dist/assets/{NewGoalDialog-B8izfKLm.js → NewGoalDialog-DqKbk4-i.js} +1 -1
  92. package/dist/assets/{NewProjectDialog-DXqjTYFK.js → NewProjectDialog-DrlUAF-N.js} +1 -1
  93. package/dist/assets/{OnboardingPrimitives-DHYBqn_0.js → OnboardingPrimitives-BkgPF4Mu.js} +1 -1
  94. package/dist/assets/{OnboardingWizard-DqSfZ13V.js → OnboardingWizard-CMBMcuXv.js} +1 -1
  95. package/dist/assets/{OrgChart.production-DrSFUf7i.js → OrgChart.production-BLczTjRj.js} +1 -1
  96. package/dist/assets/{PaperclipCloudOAuthHandoff-jPUvjJ8q.js → PaperclipCloudOAuthHandoff-BTtF8UPD.js} +1 -1
  97. package/dist/assets/{PluginManager-h3LFPaUq.js → PluginManager-CCcqlfgK.js} +1 -1
  98. package/dist/assets/{PluginPage-E5Im4454.js → PluginPage-B1empV69.js} +1 -1
  99. package/dist/assets/{PluginSettings-BBO0jAgo.js → PluginSettings-DtopaRqR.js} +1 -1
  100. package/dist/assets/{ProfileDetailRoute-CQBD7fms.js → ProfileDetailRoute-BqvVpBZi.js} +1 -1
  101. package/dist/assets/{ProfileSettings-BwnVEHLp.js → ProfileSettings-5__tVfGi.js} +1 -1
  102. package/dist/assets/{ProfileWizardRoute-By_SC6Gn.js → ProfileWizardRoute-vt-MRLuD.js} +1 -1
  103. package/dist/assets/{ProjectDetail-CbiwFBAE.js → ProjectDetail-DJ4zjube.js} +1 -1
  104. package/dist/assets/{ProjectRepositoryInput-DZF9bX4E.js → ProjectRepositoryInput-BJcnj3At.js} +1 -1
  105. package/dist/assets/{ProjectWorkspaceDetail-DPsl_4bD.js → ProjectWorkspaceDetail-DEAO3q6v.js} +1 -1
  106. package/dist/assets/{ProjectWorkspacesContent-COH4dOWK.js → ProjectWorkspacesContent-CZvO7p0i.js} +1 -1
  107. package/dist/assets/{Projects-Ch9Qu7sn.js → Projects-Dm7-zXUH.js} +1 -1
  108. package/dist/assets/{QuotaBar-DIFOT9Uh.js → QuotaBar-Drp3CaxX.js} +1 -1
  109. package/dist/assets/{RepositoryEditor-DHB1bqId.js → RepositoryEditor-BT_VAkJu.js} +1 -1
  110. package/dist/assets/{Responsibilities-C5O0JXXG.js → Responsibilities-DbUEtGZu.js} +1 -1
  111. package/dist/assets/{ResponsibilityDetail-D6NpZpkm.js → ResponsibilityDetail--S8_GOkb.js} +1 -1
  112. package/dist/assets/{ResponsibleUserDenialUxLab-CFrIWYwe.js → ResponsibleUserDenialUxLab-1PB3JNG0.js} +1 -1
  113. package/dist/assets/{ReviewQueueCard-BPC4Lm67.js → ReviewQueueCard-B8w9aXKU.js} +1 -1
  114. package/dist/assets/{RoutineAuditActivity-sKyzMajz.js → RoutineAuditActivity-BCo7pYe5.js} +1 -1
  115. package/dist/assets/{RoutineDetail-CG8HF5fp.js → RoutineDetail-C9Dwn5G9.js} +1 -1
  116. package/dist/assets/{RoutineRunVariablesDialog-CKh3CmLD.js → RoutineRunVariablesDialog-Baomcbe3.js} +1 -1
  117. package/dist/assets/{Routines-tF2qfUKo.js → Routines-Dkv4gJno.js} +1 -1
  118. package/dist/assets/{Routines.production-BTyj1Ljr.js → Routines.production-Cs2Y-lpt.js} +1 -1
  119. package/dist/assets/{RoutinesToolbar-CvUFVCGN.js → RoutinesToolbar-BNKfCrTo.js} +1 -1
  120. package/dist/assets/{Search-Z9D0NuS1.js → Search-CVx4cl2o.js} +1 -1
  121. package/dist/assets/{Secrets-DgmbLOJK.js → Secrets-C2qv2HKZ.js} +1 -1
  122. package/dist/assets/{SkillBinaryFile-F3_9qcaM.js → SkillBinaryFile-DDkhLlfC.js} +1 -1
  123. package/dist/assets/{SkillCardIcon-CXHUCMej.js → SkillCardIcon-Cp_hws0N.js} +1 -1
  124. package/dist/assets/{SkillFolderTree-CB3lrTIE.js → SkillFolderTree-Cv0CmfYx.js} +1 -1
  125. package/dist/assets/{SkillSourceTree-BbuciCo6.js → SkillSourceTree-DmjlUswf.js} +1 -1
  126. package/dist/assets/{SkillSources-Dlo6Cew3.js → SkillSources-nmlYypUU.js} +1 -1
  127. package/dist/assets/{SkillStudio-ZO-Nf7eI.js → SkillStudio-BK3y_3zr.js} +1 -1
  128. package/dist/assets/{SkillsNavigationTabs-B9Iqnlqt.js → SkillsNavigationTabs-DRwMP1eu.js} +1 -1
  129. package/dist/assets/{SpekoPhoneCallback-C4VnMiZh.js → SpekoPhoneCallback-Cqi7AIyH.js} +1 -1
  130. package/dist/assets/{SpekoProviderSetup-I4evPZb3.js → SpekoProviderSetup-CJI4oXk5.js} +1 -1
  131. package/dist/assets/{StatusCards-D0MVzbsw.js → StatusCards-DKyyY81S.js} +1 -1
  132. package/dist/assets/{SummarySlotCard-DUXgZPxG.js → SummarySlotCard-f3RomdZS.js} +1 -1
  133. package/dist/assets/{TailscaleConnector-CMhT73gj.js → TailscaleConnector-yQWLR1Ra.js} +1 -1
  134. package/dist/assets/{TaskChatLab-D9-KAE-7.js → TaskChatLab-Dsr7eyj4.js} +1 -1
  135. package/dist/assets/{TaskSummaryList-CUxieFNe.js → TaskSummaryList-eFDfK_QH.js} +1 -1
  136. package/dist/assets/{Timeline-BNMoRbtK.js → Timeline-BWA9dyk6.js} +1 -1
  137. package/dist/assets/{ToolsAdminGate-CEr0zy2T.js → ToolsAdminGate-DpBg30hQ.js} +1 -1
  138. package/dist/assets/{TrustPresetSection-B9YXZtkh.js → TrustPresetSection-DtWjK9Kp.js} +1 -1
  139. package/dist/assets/{UserProfile-D-tnW96X.js → UserProfile-C66UI5xx.js} +1 -1
  140. package/dist/assets/{WebhookUrlWarning-Ba_DixKh.js → WebhookUrlWarning-CDygVnDH.js} +1 -1
  141. package/dist/assets/{WhatNeedsMe-B-Jzj8_M.js → WhatNeedsMe-BQ82RHus.js} +1 -1
  142. package/dist/assets/{Workspaces-BqhDI_Bl.js → Workspaces-DrjJes30.js} +1 -1
  143. package/dist/assets/{abnfDiagram-YUKMZFIV-Bn9P-nUW.js → abnfDiagram-YUKMZFIV-Crkksu2D.js} +1 -1
  144. package/dist/assets/{architecture-WOLXFQ4H-V1ldsZlt.js → architecture-WOLXFQ4H-bHU8FW0c.js} +1 -1
  145. package/dist/assets/{architectureDiagram-47P4ROYG-BkYxt-Gc.js → architectureDiagram-47P4ROYG-Bj5Styf9.js} +1 -1
  146. package/dist/assets/{arrow-down-left-o81ENfeW.js → arrow-down-left-Ck9VQyqQ.js} +1 -1
  147. package/dist/assets/{blockDiagram-E7TT5TSB-BO7pPYbp.js → blockDiagram-E7TT5TSB-OeHpNCQ-.js} +1 -1
  148. package/dist/assets/{budgets-0Dw6TH1A.js → budgets-CAWPqcn4.js} +1 -1
  149. package/dist/assets/{building-complex-DciZTnys.js → building-complex-Dxiyk_pH.js} +1 -1
  150. package/dist/assets/{c4Diagram-CRA5TL53-D4EpmmzV.js → c4Diagram-CRA5TL53-QbK5p76P.js} +1 -1
  151. package/dist/assets/channel-BSmZkKA8.js +1 -0
  152. package/dist/assets/{chat-channels-DWyry-9M.js → chat-channels-CzTZV2fr.js} +1 -1
  153. package/dist/assets/{chunk-2BW5OAIV-DFXIyCJy.js → chunk-2BW5OAIV-Ckr4HfBO.js} +1 -1
  154. package/dist/assets/{chunk-3YJQHVM4-Dj5wEKIw.js → chunk-3YJQHVM4-C_uoPpLR.js} +1 -1
  155. package/dist/assets/{chunk-4EA7E6EY-5XiUVgzK.js → chunk-4EA7E6EY-BeMEfIRS.js} +1 -1
  156. package/dist/assets/{chunk-7TKQ45FW-D0opKcsy.js → chunk-7TKQ45FW-DiwqWHvN.js} +1 -1
  157. package/dist/assets/{chunk-AW2ZBBNX-DnjsTe04.js → chunk-AW2ZBBNX-Cf57K3PO.js} +1 -1
  158. package/dist/assets/{chunk-DBDB3WZW-DNqSQPZ0.js → chunk-DBDB3WZW-B2qouVQO.js} +1 -1
  159. package/dist/assets/{chunk-E2ZNV5FY-cjSf_BTz.js → chunk-E2ZNV5FY-DG8wQ_NS.js} +1 -1
  160. package/dist/assets/{chunk-EU5HNXII-CZYBiaSw.js → chunk-EU5HNXII-cxRrXRGV.js} +1 -1
  161. package/dist/assets/{chunk-FVRAUYC3-DSc0-wJA.js → chunk-FVRAUYC3-Dizswk0V.js} +1 -1
  162. package/dist/assets/{chunk-HJ2JQQFS-MXK0gYSP.js → chunk-HJ2JQQFS-DL4lnpSv.js} +1 -1
  163. package/dist/assets/{chunk-HTAEGDNF-BjDZm_5k.js → chunk-HTAEGDNF-Zxjdb6kj.js} +1 -1
  164. package/dist/assets/{chunk-KQW6MTUR-Bfj0tDmO.js → chunk-KQW6MTUR-BsVaJdnu.js} +1 -1
  165. package/dist/assets/{chunk-NTY3LDVX-Bpz5TkVb.js → chunk-NTY3LDVX-DyT9N5sM.js} +1 -1
  166. package/dist/assets/{chunk-VPRB5NB3-CfeHjtbb.js → chunk-VPRB5NB3-BNz5CtBn.js} +1 -1
  167. package/dist/assets/{chunk-XC4XBNZT-FBCWmi6K.js → chunk-XC4XBNZT-CCgIhjYS.js} +1 -1
  168. package/dist/assets/{circle-slash-DqKFFqfb.js → circle-slash-uNv_ha0X.js} +1 -1
  169. package/dist/assets/{classDiagram-v2-K4WV4PDN-DbC_J0kK.js → classDiagram-v2-K4WV4PDN-Cdh3CEl4.js} +1 -1
  170. package/dist/assets/{coins-BztUbqyl.js → coins-BDAh8hDQ.js} +1 -1
  171. package/dist/assets/{collections-BxrcELwt.js → collections-B58p51lw.js} +1 -1
  172. package/dist/assets/{connection-owner-D-ikSHyR.js → connection-owner-D8fNrFqC.js} +1 -1
  173. package/dist/assets/{cynefin-EF2NZ3EQ-COwSJ4qP.js → cynefin-EF2NZ3EQ-BkwhfqJ0.js} +1 -1
  174. package/dist/assets/{cynefinDiagram-3GCD6N5R-diaEJq9Y.js → cynefinDiagram-3GCD6N5R-DuGb_wq2.js} +1 -1
  175. package/dist/assets/{dagre-W4DXFKR2-BPAMRuIj.js → dagre-W4DXFKR2-Bxq_Mhia.js} +1 -1
  176. package/dist/assets/{diagram-2UJZ2QOL-BvRnO1Id.js → diagram-2UJZ2QOL-B-P_hrXV.js} +1 -1
  177. package/dist/assets/{diagram-OVF4WLC6-CDgBeD0m.js → diagram-OVF4WLC6-Ds0BqQWH.js} +1 -1
  178. package/dist/assets/{diagram-PFPMY2P6-DAw9lREG.js → diagram-PFPMY2P6-Dpqb2-Cb.js} +1 -1
  179. package/dist/assets/{diagram-UMYRVEAY-ZQqQn22t.js → diagram-UMYRVEAY-BJSoxjiu.js} +1 -1
  180. package/dist/assets/{diagram-YEKJPTXX-CoJtGgWs.js → diagram-YEKJPTXX-BxaG_9tT.js} +1 -1
  181. package/dist/assets/{diagram-ZIFT7M5P-qW_Zn_bO.js → diagram-ZIFT7M5P-6acvVOtc.js} +1 -1
  182. package/dist/assets/{dist-B2E6oBK1.js → dist-0EWXio4m.js} +1 -1
  183. package/dist/assets/{dist-IcdxEhjC.js → dist-BGvZP_Cl.js} +1 -1
  184. package/dist/assets/{dist-DXjkgaZX.js → dist-BZ7AbEhN.js} +1 -1
  185. package/dist/assets/{dist-_EtfntKJ.js → dist-BlosHr86.js} +1 -1
  186. package/dist/assets/{dist-DylHAy-6.js → dist-Bmr4uhSk.js} +1 -1
  187. package/dist/assets/{dist-DML0cJH3.js → dist-C6yMfMNS.js} +1 -1
  188. package/dist/assets/{dist-Dl94YqeS.js → dist-CMZQedYl.js} +1 -1
  189. package/dist/assets/{dist-DKyBHaH2.js → dist-C_N_-eaT.js} +1 -1
  190. package/dist/assets/{dist-CvRpZH53.js → dist-CaUbG4Hl.js} +1 -1
  191. package/dist/assets/{dist-ptDa9fKh.js → dist-Cn7-nxjU.js} +1 -1
  192. package/dist/assets/{dist-CG-phytt.js → dist-Cnj95_pX.js} +1 -1
  193. package/dist/assets/{dist-DbXGl-wj.js → dist-D9DR7k9k.js} +1 -1
  194. package/dist/assets/{dist-CjRqeLFz.js → dist-DIwsVdS2.js} +1 -1
  195. package/dist/assets/{dist-BCJybC91.js → dist-DVE0lLId.js} +1 -1
  196. package/dist/assets/{dist-CPgRB-NQ.js → dist-DkAPL4CQ.js} +1 -1
  197. package/dist/assets/{dist-CeSzCyeG.js → dist-Dl6N3kpQ.js} +1 -1
  198. package/dist/assets/{dist-DZruZxAk.js → dist-DmBvXBzK.js} +1 -1
  199. package/dist/assets/{dist-CdmdXwCZ.js → dist-DpgXK0aZ.js} +1 -1
  200. package/dist/assets/{dist-CYRzGbSY.js → dist-gMRyU9GJ.js} +1 -1
  201. package/dist/assets/{dist-CG6fC1Db.js → dist-jQQX2kOU.js} +1 -1
  202. package/dist/assets/{dist-DZIxMHOT.js → dist-lUaUoFTq.js} +1 -1
  203. package/dist/assets/{dist-CuwPDbnL.js → dist-qw1ZF2vD.js} +1 -1
  204. package/dist/assets/{dist-B6Qde8KJ.js → dist-rH4qrNAn.js} +1 -1
  205. package/dist/assets/{ebnfDiagram-VR2GEFS7-DA4UvKXV.js → ebnfDiagram-VR2GEFS7-Ytj3Z5qC.js} +1 -1
  206. package/dist/assets/{elk-IJKZMXRS-CM74d3mJ.js → elk-IJKZMXRS-CJurNqqK.js} +1 -1
  207. package/dist/assets/{erDiagram-O2IAPWRE-d869V0qL.js → erDiagram-O2IAPWRE-hyXckW2d.js} +1 -1
  208. package/dist/assets/{eventmodeling-K75KTNOO-C-oz_eyI.js → eventmodeling-K75KTNOO-D3xQujrh.js} +1 -1
  209. package/dist/assets/flowDiagram-OXPTDLAJ-D4ojBTuY.js +1 -0
  210. package/dist/assets/{folder-plus-CxWXoYCi.js → folder-plus-BJZSMzuj.js} +1 -1
  211. package/dist/assets/{ganttDiagram-R7TSEDQI-BBul4Kpm.js → ganttDiagram-R7TSEDQI-C8U_ITl4.js} +1 -1
  212. package/dist/assets/{gitGraph-VSP46ZUC-BriEZgAq.js → gitGraph-VSP46ZUC-CDeq3yKT.js} +1 -1
  213. package/dist/assets/{gitGraphDiagram-XJZIOB7I-I12rg8s1.js → gitGraphDiagram-XJZIOB7I-CST3EWE9.js} +1 -1
  214. package/dist/assets/{goals-CvMWzjH4.js → goals-BNJZ4nzg.js} +1 -1
  215. package/dist/assets/{index-Bt31d8ga.js → index-BJtnP7H1.js} +8 -8
  216. package/dist/assets/{info-OHQRW6UA-CxrcGiem.js → info-OHQRW6UA-CPvTWk7J.js} +1 -1
  217. package/dist/assets/{infoDiagram-5W2HQ5XZ-4Sm0LiOu.js → infoDiagram-5W2HQ5XZ-BPUiNdxI.js} +1 -1
  218. package/dist/assets/{ishikawaDiagram-K3B6WC7H-CKXvKV-s.js → ishikawaDiagram-K3B6WC7H-D5Z3rmaA.js} +1 -1
  219. package/dist/assets/{issue-detail-4PCbYpdv.js → issue-detail-CZfjXs0M.js} +3 -3
  220. package/dist/assets/{journeyDiagram-COXZFDF6-BHsrZLvQ.js → journeyDiagram-COXZFDF6-CEkwEYdR.js} +1 -1
  221. package/dist/assets/{kanban-definition-P3RFRI5V-8HhnIs_l.js → kanban-definition-P3RFRI5V-8h_R6Qjq.js} +1 -1
  222. package/dist/assets/{line-rrKrpB-b.js → line-Ljt_vfsb.js} +1 -1
  223. package/dist/assets/{link-BecLzmfo.js → link-DvgFK0mz.js} +1 -1
  224. package/dist/assets/{list-filter-BC3D4IoX.js → list-filter-BR4_dvwm.js} +1 -1
  225. package/dist/assets/{log-in-BJCGwGGT.js → log-in-Dvx9-FMC.js} +1 -1
  226. package/dist/assets/{mcpSkills-DRs3pGKn.js → mcpSkills-76szK_k1.js} +1 -1
  227. package/dist/assets/{mermaid-parser.core-DmG0b4S0.js → mermaid-parser.core-BjFu937m.js} +3 -3
  228. package/dist/assets/{mermaid.core-D1vILTuF.js → mermaid.core-B0t95EIS.js} +4 -4
  229. package/dist/assets/{mindmap-definition-LZFPQGKD-DIMpL0de.js → mindmap-definition-LZFPQGKD-TVnHYUR4.js} +1 -1
  230. package/dist/assets/{packet-JDAUHWVQ-BnbYht3G.js → packet-JDAUHWVQ-aNGiRWLy.js} +1 -1
  231. package/dist/assets/{pegDiagram-BGZESJAR-BUjtJVjT.js → pegDiagram-BGZESJAR-DDadxqWQ.js} +1 -1
  232. package/dist/assets/{pie-XZMESJXO-CM4VXUb-.js → pie-XZMESJXO-CydFP1hd.js} +1 -1
  233. package/dist/assets/{pieDiagram-CAPJLFHJ-B3v8ryvG.js → pieDiagram-CAPJLFHJ-KhdUDwDS.js} +1 -1
  234. package/dist/assets/{power-0mw59G-l.js → power-sYV-WuqQ.js} +1 -1
  235. package/dist/assets/{profile-summary-B5rPf8v-.js → profile-summary-D4LPX-Dv.js} +1 -1
  236. package/dist/assets/{quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js → quadrantDiagram-GDMTTRAM-B1X8K2Fs.js} +1 -1
  237. package/dist/assets/{radar-ABXABTNO-v6yZj4Fk.js → radar-ABXABTNO-BqodkLpx.js} +1 -1
  238. package/dist/assets/{railroad-I3PHUGI6-D-U8Cs0m.js → railroad-I3PHUGI6-HmRKXDJj.js} +1 -1
  239. package/dist/assets/{railroad-abnf-LNEFI6M7-Dw3fkrVy.js → railroad-abnf-LNEFI6M7-CkBttaHp.js} +1 -1
  240. package/dist/assets/{railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js → railroad-ebnf-DWYD2UWJ-C6DBawFA.js} +1 -1
  241. package/dist/assets/{railroad-peg-JR7BVNR7-Bf8u1-RZ.js → railroad-peg-JR7BVNR7-Z9df3u5o.js} +1 -1
  242. package/dist/assets/{railroadDiagram-SM67HX2B-Drr5UhQI.js → railroadDiagram-SM67HX2B-2vDUUppL.js} +1 -1
  243. package/dist/assets/{requirementDiagram-X7JNWC4A-D5ef6_ac.js → requirementDiagram-X7JNWC4A-DAuP39Hc.js} +1 -1
  244. package/dist/assets/{sankeyDiagram-UM26HJRW-DncJWIz_.js → sankeyDiagram-UM26HJRW-ByS54QZK.js} +1 -1
  245. package/dist/assets/{saved-permissions-CizWg8-P.js → saved-permissions-CPiYtxkZ.js} +1 -1
  246. package/dist/assets/{scroll-text-Ck6HB7eM.js → scroll-text-CVSt6aO2.js} +1 -1
  247. package/dist/assets/{sdk-CWyUlmcn.js → sdk-vrG4HtB4.js} +1 -1
  248. package/dist/assets/{search-DkTqg7ab.js → search-CG-QtPVH.js} +1 -1
  249. package/dist/assets/{send-CYVi50sh.js → send-CH-0xdLm.js} +1 -1
  250. package/dist/assets/{sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js → sequenceDiagram-ZO4K6R2Y-DvWxKTLK.js} +1 -1
  251. package/dist/assets/{shared-CIwISWMj.js → shared-D37zfckm.js} +1 -1
  252. package/dist/assets/{smoke-lab-matrix-A7ubFpfk.js → smoke-lab-matrix-C5gR81E3.js} +1 -1
  253. package/dist/assets/{stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js → stateDiagram-v2-TBUQTH76-DtiiZIXq.js} +1 -1
  254. package/dist/assets/{swimlanes-N4OXWK64-NXVbx1w8.js → swimlanes-N4OXWK64-BWSEtCbX.js} +1 -1
  255. package/dist/assets/swimlanesDiagram-K3J5GTZL-Bl_9DvHU.js +8 -0
  256. package/dist/assets/{timeline-definition-YOQAKGHF-DqI-Mv2e.js → timeline-definition-YOQAKGHF-U4QcniMh.js} +1 -1
  257. package/dist/assets/{treeView-D4JQ5SDB-CZBlE7ya.js → treeView-D4JQ5SDB-B2tdrtsj.js} +1 -1
  258. package/dist/assets/{treemap-SAJKECNS-BlueznID.js → treemap-SAJKECNS-DodN8j4n.js} +1 -1
  259. package/dist/assets/{useAgentlessOnboardingAutoOpen-CnFwEQ-H.js → useAgentlessOnboardingAutoOpen-DSWW7Juw.js} +1 -1
  260. package/dist/assets/{useAuthorizationWindow-DnFQsiFj.js → useAuthorizationWindow-tg3aKEU7.js} +1 -1
  261. package/dist/assets/{useDateRange-9EbqkWXy.js → useDateRange-CnZQr2KO.js} +1 -1
  262. package/dist/assets/{useFastResponsesEnabled-D8dunm4j.js → useFastResponsesEnabled-B8tHSJ1y.js} +1 -1
  263. package/dist/assets/{usePageView-BiX5i8ck.js → usePageView-CtFMs34g.js} +1 -1
  264. package/dist/assets/{useProfilesData-0VYQ4lAT.js → useProfilesData-CWHdMSuL.js} +1 -1
  265. package/dist/assets/{useReviewCount-WBWxwKI3.js → useReviewCount-W_bCZ2Hz.js} +1 -1
  266. package/dist/assets/{useRoutineFormOptions-DnX5DBn1.js → useRoutineFormOptions-CCLMmVSF.js} +1 -1
  267. package/dist/assets/{useSummaryDraftStream-DPQRvaXT.js → useSummaryDraftStream-NVNYNt72.js} +1 -1
  268. package/dist/assets/{useTailscaleConnections-BDff6dWx.js → useTailscaleConnections-Dy52nCY3.js} +1 -1
  269. package/dist/assets/{usecaseDiagram-VIAY4XPW-BSDn8OaJ.js → usecaseDiagram-VIAY4XPW-kEHhqgOj.js} +1 -1
  270. package/dist/assets/{vennDiagram-BLWOH2XV-BBSA9KNN.js → vennDiagram-BLWOH2XV-NPJU0aCU.js} +1 -1
  271. package/dist/assets/{wardley-7MLQ67FV-CsT-rTZ9.js → wardley-7MLQ67FV-bUGKvIPT.js} +1 -1
  272. package/dist/assets/{wardleyDiagram-YMQ3BMBF-BLClsIjw.js → wardleyDiagram-YMQ3BMBF-qtUDHfhb.js} +1 -1
  273. package/dist/assets/{xychartDiagram-TAQBALBS-2x4wB0gq.js → xychartDiagram-TAQBALBS-C-z57aZj.js} +1 -1
  274. package/dist/index.html +4 -4
  275. package/dist/sw.js +1 -1
  276. package/package.json +1 -1
  277. package/dist/assets/CompanyActivity.production-DbaFBsM0.js +0 -1
  278. package/dist/assets/channel-BQh2vFIU.js +0 -1
  279. package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +0 -1
  280. package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +0 -8
@@ -1 +1 @@
1
- var r=Object.defineProperty;var n=(t,i)=>r(t,"name",{value:i,configurable:!0});import{a}from"./rolldown-runtime-DhZMWcEn.js";import{$A as s,jb as m}from"./index-Bt31d8ga.js";var e=a(s(),1),d="agent-identity-chip inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md px-2 py-1 text-xs";function l({agent:t}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m,{agent:t,size:20}),(0,e.jsx)("span",{className:"truncate",children:t.name})]})}n(l,"AgentIdentityChipContent");export{d as n,l as t};
1
+ var r=Object.defineProperty;var n=(t,i)=>r(t,"name",{value:i,configurable:!0});import{a}from"./rolldown-runtime-DhZMWcEn.js";import{$A as s,jb as m}from"./index-BJtnP7H1.js";var e=a(s(),1),d="agent-identity-chip inline-flex min-w-0 max-w-full items-center gap-1.5 rounded-md px-2 py-1 text-xs";function l({agent:t}){return(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(m,{agent:t,size:20}),(0,e.jsx)("span",{className:"truncate",children:t.name})]})}n(l,"AgentIdentityChipContent");export{d as n,l as t};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AgentBulkSettingsSheet-DYT4ovDg.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-Bt31d8ga.js","assets/index-z7lcCz2I.css","assets/AgentIdentityChip-CB2NBXkZ.js"])))=>i.map(i=>d[i]);
2
- var ae=Object.defineProperty;var r=(t,l)=>ae(t,"name",{value:l,configurable:!0});import{a as T}from"./rolldown-runtime-DhZMWcEn.js";import{v as le}from"./collections-BxrcELwt.js";import{$A as re,Cx as oe,Dp as ie,Ex as ce,Fm as de,HD as ue,ME as me,MT as he,NE as M,Pm as ge,Sp as J,Sy as xe,Tx as pe,Uw as fe,Wb as be,XC as ve,Yd as je,Zp as Q,ej as ye,hE as Ce,iC as Ne,nj as Ae,qd as I,rb as _e,sE as we,vD as Se,xE as X,zE as K}from"./index-Bt31d8ga.js";var h=T(Ae(),1),ke=T(ye(),1),_=r(t=>Se(t.adapterType,t.adapterConfig),"bulkAgentHarness"),Ee=r(t=>typeof t.adapterConfig.model=="string"&&t.adapterConfig.model.trim()||null,"agentDefaultModel"),V=r(t=>ue.safeParse(t.runtimeConfig.aiConnection).data,"agentConnection"),Oe=r((t,l)=>{const a=r(i=>JSON.stringify(i&&Object.fromEntries(Object.entries(i).sort(([c],[d])=>c.localeCompare(d)))),"canonical");return a(t)===a(l)},"sameBinding");function R(t,l=!1,a=de){if(l&&!a.isCloudHarnessAllowed(t.adapterType,t.adapterConfig))return"This harness is not available on Microvac Cloud";if(["terminated","pending_approval"].includes(t.status))return"This agent is not available for bulk edits";if(V(t)?.mode==="router")return"Edit connection pool members on the agent's configuration page";if(!["codex_local","claude_local","gemini_local","grok_local","opencode_local","hermes_local","pi_local","copilot_runtime","antigravity_runtime","cursor_local"].includes(_(t)))return"Connection and model are managed externally"}r(R,"bulkAgentDisabledReason");function Te(t,l){return l.connections.find(a=>t?.mode==="responsible_user"?a.provider===t.provider&&a.isDefault&&a.ownership==="personal"&&a.ownerUserId===l.currentUserId:a.id===t?.connectionId&&a.grantId===t?.grantId)}r(Te,"resolveBulkConnection");function De(t,l){return t?t.mode==="router"?"Connection pool":t.mode==="responsible_user"?"Responsible user's default":l?.connections.find(a=>a.id===t.connectionId&&a.grantId===t.grantId)?.name??"Assigned connection":"Local credentials"}r(De,"bulkConnectionName");async function He(t,l,a=4){const i=new Array(t.length);let c=0;return await Promise.all(Array.from({length:Math.min(a,t.length)},async()=>{for(;c<t.length;){const d=c++;try{i[d]={status:"fulfilled",value:await l(t[d])}}catch(p){i[d]={status:"rejected",reason:p}}}})),i}r(He,"mapBulkAgents");var E=["model","status","harness","connection"],O={model:"",status:"",harness:"",connection:""};function W(t,l){const a=new Map(l?.connections.map(s=>[JSON.stringify([s.id,s.grantId]),s.name])),i=new Map(l?.pools?.map(s=>[s.id,s.name])),c=new Map,d=Object.fromEntries(E.map(s=>[s,new Map]));for(const s of t){if(["terminated","pending_approval"].includes(s.status))continue;const g=je(s),v=g??_(s),w=Ee(s),b=V(s);let m;g?m={value:"unconfigured",label:"Not configured"}:["http","process"].includes(s.adapterType)?m={value:"external",label:"Managed externally"}:b?b.mode==="responsible_user"?m={value:"responsible_user",label:"Responsible user's default"}:b.mode==="router"?m={value:`pool:${b.connectionId}`,label:i.get(b.connectionId)??"Connection pool"}:m={value:`connection:${b.connectionId}`,label:a.get(JSON.stringify([b.connectionId,b.grantId]))??"Assigned connection"}:m={value:"local",label:"Local credentials"};const N={harness:{value:v,label:I(v)},model:g?{value:"unconfigured",label:"Not available yet"}:w?{value:`model:${w}`,label:w}:{value:"default",label:"Harness default"},status:{value:s.status,label:s.status.charAt(0).toUpperCase()+s.status.slice(1)},connection:m};c.set(s.id,N);for(const f of E)N[f]=d[f].get(N[f].value)??N[f],d[f].set(N[f].value,N[f])}const p=Object.fromEntries(E.map(s=>[s,[...d[s].values()].sort((g,v)=>g.label.localeCompare(v.label)||g.value.localeCompare(v.value))])),u=new Map;for(const s of p.connection)u.set(s.label,(u.get(s.label)??0)+1);const o=new Map;for(const s of p.connection){const g=s.label;if(u.get(g)<2)continue;const v=(o.get(g)??0)+1;o.set(g,v),s.label=`${g} (${v})`}return{byAgentId:c,options:p}}r(W,"buildAgentRosterIndex");function Re(t,l){return E.every(a=>!l[a]||t?.[a].value===l[a])}r(Re,"matchesAgentRosterFilters");var e=T(re(),1),Me=(0,h.lazy)(()=>we(()=>import("./AgentBulkSettingsSheet-DYT4ovDg.js").then(t=>({default:t.AgentBulkSettingsSheet})),__vite__mapDeps([0,1,2,3,4])));function Le({companyId:t,agents:l,visibleAgents:a,renderAgent:i,renderChat:c,renderStatus:d}){const p=me(),u=!!xe(),o=ge(),s=(0,h.useRef)(!1),[g,v]=(0,h.useState)(!1),[w,b]=(0,h.useState)(""),[m,N]=(0,h.useState)([]),f=(0,h.useRef)(0),P=r(n=>{f.current+=1,N(n)},"changeSelection"),[F,D]=(0,h.useState)(null),[H,Y]=(0,h.useState)(""),L=X({queryKey:["ai-connections",t],queryFn:r(()=>Q.list(t),"queryFn")}),S=a,Z=(0,h.useMemo)(()=>W(l,L.data),[l,L.data]),k=S.filter(n=>!R(n,u,o)),j=(0,h.useMemo)(()=>l.filter(n=>m.includes(n.id)&&!R(n,u,o)),[l,m,u,o]),[G,ee]=(0,h.useState)([]);(0,h.useEffect)(()=>{j.length&&ee(j)},[j]);const $=j.length?j:G,z=[...new Set($.map(_))],q=k.length>0&&k.every(n=>m.includes(n.id)),te=k.some(n=>m.includes(n.id)),U=$.filter(n=>!S.includes(n)).length,se=r(()=>P(q?m.filter(n=>!k.some(x=>x.id===n)):[...new Set([...m,...k.map(n=>n.id)])]),"toggleAll");async function ne(n){if(s.current)return;s.current=!0,v(!0),b("");const x=be(p),y=f.current;try{if(await x.whenAccountReady(),!x.isCurrentAccount()||y!==f.current)return;const A=await Promise.all(j.filter(C=>_(C)===n).map(C=>_e.get(C.id,t,{cache:"no-store",fresh:!0})));if(!x.isCurrentAccount()||y!==f.current)return;if(A.some(C=>C.companyId!==t||_(C)!==n||R(C,u,o))){b("The selected agents changed. Refresh the roster and select them again.");return}D(A)}catch(A){x.isCurrentScope()&&y===f.current&&b(Ce(A).body)}finally{s.current=!1,v(!1)}}return r(ne,"openEditor"),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,ke.createPortal)((0,e.jsxs)("div",{role:"region","aria-label":"Bulk actions","aria-hidden":j.length===0,inert:j.length===0,"data-state":j.length>0?"open":"closed",className:"agent-selection-bar flex flex-wrap items-center gap-3 rounded-lg border bg-background p-3",children:[(0,e.jsxs)("span",{className:"text-sm font-medium",children:[$.length," selected"]}),U>0&&(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[U," hidden by filters"]}),z.length>1&&(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"Choose a harness to edit"}),(0,e.jsxs)("div",{className:"flex flex-1 flex-wrap items-center justify-end gap-2",children:[z.map(n=>(0,e.jsxs)(M,{size:"sm",variant:"outline",disabled:g,onClick:r(()=>{ne(n)},"onClick"),children:[(0,e.jsx)(ve,{className:"size-3.5","aria-hidden":!0}),z.length===1?"Edit connection & model":`Edit ${$.filter(x=>_(x)===n).length} ${I(n)}`]},n)),(0,e.jsx)(M,{size:"icon-sm",variant:"ghost","aria-label":"Clear selection",onClick:r(()=>P([]),"onClick"),children:(0,e.jsx)(Ne,{className:"size-4"})})]})]}),document.body),g&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading current agent settings…"}),w&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:w}),H&&(0,e.jsxs)("p",{role:"status",className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)(he,{className:"size-4","aria-hidden":!0}),H]}),(0,e.jsx)("div",{className:"overflow-x-auto",children:(0,e.jsxs)("table",{"aria-label":"Agent roster",className:"agent-roster w-full text-left text-sm",children:[(0,e.jsx)("thead",{className:"text-xs text-muted-foreground [&_th]:px-3 [&_th]:py-3 [&_th]:font-normal",children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"w-10",children:(0,e.jsx)(J,{"aria-label":"Select all visible editable agents",checked:q?!0:te?"indeterminate":!1,disabled:!k.length,onCheckedChange:se})}),(0,e.jsxs)("th",{scope:"col",children:[S.length," ",S.length===1?"agent":"agents"]}),c&&(0,e.jsx)("th",{scope:"col",children:(0,e.jsx)("span",{className:"sr-only",children:"Chat"})}),(0,e.jsx)("th",{scope:"col",children:"Status"}),(0,e.jsx)("th",{scope:"col",children:"Harness"}),(0,e.jsx)("th",{scope:"col",children:"Default model"}),(0,e.jsx)("th",{scope:"col",children:"Connection"})]})}),(0,e.jsx)("tbody",{children:S.map(n=>{const x=Z.byAgentId.get(n.id);return(0,e.jsxs)("tr",{"data-state":m.includes(n.id)?"selected":void 0,className:"group/agent-row border-t border-border data-[state=selected]:bg-accent/30 hover:bg-accent/50 focus-within:bg-accent/50 [&_td]:px-3 [&_td]:align-middle",children:[(0,e.jsx)("td",{title:R(n,u,o),children:(0,e.jsx)(J,{"aria-label":`Select ${n.name}`,checked:j.some(y=>y.id===n.id),disabled:!!R(n,u,o),onCheckedChange:r(y=>P(y?[...new Set([...m,n.id])]:m.filter(A=>A!==n.id)),"onCheckedChange")})}),(0,e.jsx)("td",{className:"min-w-64 p-0",children:i(n)}),c&&(0,e.jsx)("td",{children:c(n)}),(0,e.jsx)("td",{children:d?d(n):(0,e.jsx)(le,{status:n.status})}),(0,e.jsx)("td",{className:"whitespace-nowrap text-xs",children:x.harness.label}),(0,e.jsx)("td",{className:"text-xs",children:x.model.label}),(0,e.jsx)("td",{className:"text-xs",children:x.connection.label})]},n.id)})})]})}),!S.length&&(0,e.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No agents match these filters."}),F&&(0,e.jsx)(h.Suspense,{fallback:(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading editor…"}),children:(0,e.jsx)(Me,{companyId:t,agents:F,totalSelected:j.length,onClose:r((n,x)=>{D(null),n.length&&(P(y=>y.filter(A=>!(x?F.map(C=>C.id):n).includes(A))),Y(`Updated ${n.length} ${I(_(F[0]))} ${n.length===1?"agent":"agents"}.`))},"onClose")})})]})}r(Le,"AgentBulkRoster");var Pe=[],B={model:"Model",status:"Status",harness:"Harness",connection:"Connection"},Fe={model:"All models",status:"All statuses",harness:"All harnesses",connection:"All connections"};function qe(t,l=Pe){const[a,i]=(0,h.useState)({companyId:t,filters:O}),c=a.companyId===t?a.filters:O,d=X({queryKey:["ai-connections",t],queryFn:r(()=>Q.list(t),"queryFn"),enabled:!!t}),p=(0,h.useMemo)(()=>W(l,d.data),[l,d.data]),u=E.filter(s=>c[s]).length,o=(0,h.useCallback)(s=>Re(p.byAgentId.get(s.id),c),[p,c]);return{filters:c,options:p.options,activeCount:u,onChange:r(s=>i({companyId:t,filters:s}),"onChange"),matches:o,connectionError:d.error,retryConnections:r(()=>{d.refetch()},"retryConnections")}}r(qe,"useAgentRosterFilters");function Ue({filters:t,options:l,onChange:a,activeCount:i,count:c,connectionError:d,retryConnections:p,compact:u=!1}){return(0,e.jsxs)("div",{"data-canonical-toolbar":"agent-filters",role:"toolbar","aria-label":"Agent filters",className:K("flex flex-wrap items-center gap-3",!u&&"justify-between"),children:[(0,e.jsxs)(oe,{children:[(0,e.jsx)(ce,{asChild:!0,children:(0,e.jsxs)(M,{variant:u?"outline":"ghost",size:"icon","aria-label":"Filter agents",title:i?`Filters: ${i}`:"Filter agents",className:K("relative shrink-0",u&&"design-toolbar-icon",i>0&&"text-blue-600 dark:text-blue-400"),children:[(0,e.jsx)(fe,{className:"size-3.5","aria-hidden":!0}),i>0&&(0,e.jsx)("span",{"aria-hidden":!0,className:"absolute -right-1 -top-1 flex size-3.5 items-center justify-center rounded-full bg-blue-600 text-(length:--text-nano) font-bold text-white",children:i})]})}),(0,e.jsxs)(pe,{"aria-label":"Agent filter choices",align:"start",className:"max-h-96 w-72 space-y-3 overflow-y-auto p-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:"Filters"}),i>0&&(0,e.jsx)(M,{variant:"ghost",size:"sm",onClick:r(()=>a(O),"onClick"),children:"Clear filters"})]}),E.map(o=>(0,e.jsxs)("label",{className:"block space-y-1 text-xs font-medium text-muted-foreground",children:[(0,e.jsx)("span",{children:B[o]}),(0,e.jsxs)(ie,{"aria-label":B[o],value:t[o],onChange:r(s=>a({...t,[o]:s.target.value}),"onChange"),className:"h-11 text-base md:text-sm",children:[(0,e.jsx)("option",{value:"",children:Fe[o]}),t[o]&&!l[o].some(s=>s.value===t[o])&&(0,e.jsxs)("option",{value:t[o],children:["Previously selected ",B[o].toLowerCase()]}),l[o].map(s=>(0,e.jsx)("option",{value:s.value,children:s.label},s.value))]})]},o))]})]}),!u&&(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c," ",c===1?"agent":"agents"]}),!!d&&(0,e.jsxs)("p",{role:"alert",className:"basis-full text-xs text-destructive",children:["Connection names couldn’t be loaded. ",(0,e.jsx)(M,{variant:"link",size:"sm",onClick:p,children:"Retry"})]})]})}r(Ue,"AgentRosterFilters");export{Ee as a,He as c,V as i,Te as l,qe as n,_ as o,Le as r,De as s,Ue as t,Oe as u};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/AgentBulkSettingsSheet-BrrbvspS.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-BJtnP7H1.js","assets/index-z7lcCz2I.css","assets/AgentIdentityChip-BrVCcuHQ.js"])))=>i.map(i=>d[i]);
2
+ var ae=Object.defineProperty;var r=(t,l)=>ae(t,"name",{value:l,configurable:!0});import{a as T}from"./rolldown-runtime-DhZMWcEn.js";import{v as le}from"./collections-B58p51lw.js";import{$A as re,Cx as oe,Dp as ie,Ex as ce,Fm as de,HD as ue,ME as me,MT as he,NE as M,Pm as ge,Sp as J,Sy as xe,Tx as pe,Uw as fe,Wb as be,XC as ve,Yd as je,Zp as Q,ej as ye,hE as Ce,iC as Ne,nj as Ae,qd as I,rb as _e,sE as we,vD as Se,xE as X,zE as K}from"./index-BJtnP7H1.js";var h=T(Ae(),1),ke=T(ye(),1),_=r(t=>Se(t.adapterType,t.adapterConfig),"bulkAgentHarness"),Ee=r(t=>typeof t.adapterConfig.model=="string"&&t.adapterConfig.model.trim()||null,"agentDefaultModel"),V=r(t=>ue.safeParse(t.runtimeConfig.aiConnection).data,"agentConnection"),Oe=r((t,l)=>{const a=r(i=>JSON.stringify(i&&Object.fromEntries(Object.entries(i).sort(([c],[d])=>c.localeCompare(d)))),"canonical");return a(t)===a(l)},"sameBinding");function R(t,l=!1,a=de){if(l&&!a.isCloudHarnessAllowed(t.adapterType,t.adapterConfig))return"This harness is not available on Microvac Cloud";if(["terminated","pending_approval"].includes(t.status))return"This agent is not available for bulk edits";if(V(t)?.mode==="router")return"Edit connection pool members on the agent's configuration page";if(!["codex_local","claude_local","gemini_local","grok_local","opencode_local","hermes_local","pi_local","copilot_runtime","antigravity_runtime","cursor_local"].includes(_(t)))return"Connection and model are managed externally"}r(R,"bulkAgentDisabledReason");function Te(t,l){return l.connections.find(a=>t?.mode==="responsible_user"?a.provider===t.provider&&a.isDefault&&a.ownership==="personal"&&a.ownerUserId===l.currentUserId:a.id===t?.connectionId&&a.grantId===t?.grantId)}r(Te,"resolveBulkConnection");function De(t,l){return t?t.mode==="router"?"Connection pool":t.mode==="responsible_user"?"Responsible user's default":l?.connections.find(a=>a.id===t.connectionId&&a.grantId===t.grantId)?.name??"Assigned connection":"Local credentials"}r(De,"bulkConnectionName");async function He(t,l,a=4){const i=new Array(t.length);let c=0;return await Promise.all(Array.from({length:Math.min(a,t.length)},async()=>{for(;c<t.length;){const d=c++;try{i[d]={status:"fulfilled",value:await l(t[d])}}catch(p){i[d]={status:"rejected",reason:p}}}})),i}r(He,"mapBulkAgents");var E=["model","status","harness","connection"],O={model:"",status:"",harness:"",connection:""};function W(t,l){const a=new Map(l?.connections.map(s=>[JSON.stringify([s.id,s.grantId]),s.name])),i=new Map(l?.pools?.map(s=>[s.id,s.name])),c=new Map,d=Object.fromEntries(E.map(s=>[s,new Map]));for(const s of t){if(["terminated","pending_approval"].includes(s.status))continue;const g=je(s),v=g??_(s),w=Ee(s),b=V(s);let m;g?m={value:"unconfigured",label:"Not configured"}:["http","process"].includes(s.adapterType)?m={value:"external",label:"Managed externally"}:b?b.mode==="responsible_user"?m={value:"responsible_user",label:"Responsible user's default"}:b.mode==="router"?m={value:`pool:${b.connectionId}`,label:i.get(b.connectionId)??"Connection pool"}:m={value:`connection:${b.connectionId}`,label:a.get(JSON.stringify([b.connectionId,b.grantId]))??"Assigned connection"}:m={value:"local",label:"Local credentials"};const N={harness:{value:v,label:I(v)},model:g?{value:"unconfigured",label:"Not available yet"}:w?{value:`model:${w}`,label:w}:{value:"default",label:"Harness default"},status:{value:s.status,label:s.status.charAt(0).toUpperCase()+s.status.slice(1)},connection:m};c.set(s.id,N);for(const f of E)N[f]=d[f].get(N[f].value)??N[f],d[f].set(N[f].value,N[f])}const p=Object.fromEntries(E.map(s=>[s,[...d[s].values()].sort((g,v)=>g.label.localeCompare(v.label)||g.value.localeCompare(v.value))])),u=new Map;for(const s of p.connection)u.set(s.label,(u.get(s.label)??0)+1);const o=new Map;for(const s of p.connection){const g=s.label;if(u.get(g)<2)continue;const v=(o.get(g)??0)+1;o.set(g,v),s.label=`${g} (${v})`}return{byAgentId:c,options:p}}r(W,"buildAgentRosterIndex");function Re(t,l){return E.every(a=>!l[a]||t?.[a].value===l[a])}r(Re,"matchesAgentRosterFilters");var e=T(re(),1),Me=(0,h.lazy)(()=>we(()=>import("./AgentBulkSettingsSheet-BrrbvspS.js").then(t=>({default:t.AgentBulkSettingsSheet})),__vite__mapDeps([0,1,2,3,4])));function Le({companyId:t,agents:l,visibleAgents:a,renderAgent:i,renderChat:c,renderStatus:d}){const p=me(),u=!!xe(),o=ge(),s=(0,h.useRef)(!1),[g,v]=(0,h.useState)(!1),[w,b]=(0,h.useState)(""),[m,N]=(0,h.useState)([]),f=(0,h.useRef)(0),P=r(n=>{f.current+=1,N(n)},"changeSelection"),[F,D]=(0,h.useState)(null),[H,Y]=(0,h.useState)(""),L=X({queryKey:["ai-connections",t],queryFn:r(()=>Q.list(t),"queryFn")}),S=a,Z=(0,h.useMemo)(()=>W(l,L.data),[l,L.data]),k=S.filter(n=>!R(n,u,o)),j=(0,h.useMemo)(()=>l.filter(n=>m.includes(n.id)&&!R(n,u,o)),[l,m,u,o]),[G,ee]=(0,h.useState)([]);(0,h.useEffect)(()=>{j.length&&ee(j)},[j]);const $=j.length?j:G,z=[...new Set($.map(_))],q=k.length>0&&k.every(n=>m.includes(n.id)),te=k.some(n=>m.includes(n.id)),U=$.filter(n=>!S.includes(n)).length,se=r(()=>P(q?m.filter(n=>!k.some(x=>x.id===n)):[...new Set([...m,...k.map(n=>n.id)])]),"toggleAll");async function ne(n){if(s.current)return;s.current=!0,v(!0),b("");const x=be(p),y=f.current;try{if(await x.whenAccountReady(),!x.isCurrentAccount()||y!==f.current)return;const A=await Promise.all(j.filter(C=>_(C)===n).map(C=>_e.get(C.id,t,{cache:"no-store",fresh:!0})));if(!x.isCurrentAccount()||y!==f.current)return;if(A.some(C=>C.companyId!==t||_(C)!==n||R(C,u,o))){b("The selected agents changed. Refresh the roster and select them again.");return}D(A)}catch(A){x.isCurrentScope()&&y===f.current&&b(Ce(A).body)}finally{s.current=!1,v(!1)}}return r(ne,"openEditor"),(0,e.jsxs)("div",{className:"space-y-4",children:[(0,ke.createPortal)((0,e.jsxs)("div",{role:"region","aria-label":"Bulk actions","aria-hidden":j.length===0,inert:j.length===0,"data-state":j.length>0?"open":"closed",className:"agent-selection-bar flex flex-wrap items-center gap-3 rounded-lg border bg-background p-3",children:[(0,e.jsxs)("span",{className:"text-sm font-medium",children:[$.length," selected"]}),U>0&&(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[U," hidden by filters"]}),z.length>1&&(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"Choose a harness to edit"}),(0,e.jsxs)("div",{className:"flex flex-1 flex-wrap items-center justify-end gap-2",children:[z.map(n=>(0,e.jsxs)(M,{size:"sm",variant:"outline",disabled:g,onClick:r(()=>{ne(n)},"onClick"),children:[(0,e.jsx)(ve,{className:"size-3.5","aria-hidden":!0}),z.length===1?"Edit connection & model":`Edit ${$.filter(x=>_(x)===n).length} ${I(n)}`]},n)),(0,e.jsx)(M,{size:"icon-sm",variant:"ghost","aria-label":"Clear selection",onClick:r(()=>P([]),"onClick"),children:(0,e.jsx)(Ne,{className:"size-4"})})]})]}),document.body),g&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading current agent settings…"}),w&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:w}),H&&(0,e.jsxs)("p",{role:"status",className:"flex items-center gap-2 text-sm",children:[(0,e.jsx)(he,{className:"size-4","aria-hidden":!0}),H]}),(0,e.jsx)("div",{className:"overflow-x-auto",children:(0,e.jsxs)("table",{"aria-label":"Agent roster",className:"agent-roster w-full text-left text-sm",children:[(0,e.jsx)("thead",{className:"text-xs text-muted-foreground [&_th]:px-3 [&_th]:py-3 [&_th]:font-normal",children:(0,e.jsxs)("tr",{children:[(0,e.jsx)("th",{className:"w-10",children:(0,e.jsx)(J,{"aria-label":"Select all visible editable agents",checked:q?!0:te?"indeterminate":!1,disabled:!k.length,onCheckedChange:se})}),(0,e.jsxs)("th",{scope:"col",children:[S.length," ",S.length===1?"agent":"agents"]}),c&&(0,e.jsx)("th",{scope:"col",children:(0,e.jsx)("span",{className:"sr-only",children:"Chat"})}),(0,e.jsx)("th",{scope:"col",children:"Status"}),(0,e.jsx)("th",{scope:"col",children:"Harness"}),(0,e.jsx)("th",{scope:"col",children:"Default model"}),(0,e.jsx)("th",{scope:"col",children:"Connection"})]})}),(0,e.jsx)("tbody",{children:S.map(n=>{const x=Z.byAgentId.get(n.id);return(0,e.jsxs)("tr",{"data-state":m.includes(n.id)?"selected":void 0,className:"group/agent-row border-t border-border data-[state=selected]:bg-accent/30 hover:bg-accent/50 focus-within:bg-accent/50 [&_td]:px-3 [&_td]:align-middle",children:[(0,e.jsx)("td",{title:R(n,u,o),children:(0,e.jsx)(J,{"aria-label":`Select ${n.name}`,checked:j.some(y=>y.id===n.id),disabled:!!R(n,u,o),onCheckedChange:r(y=>P(y?[...new Set([...m,n.id])]:m.filter(A=>A!==n.id)),"onCheckedChange")})}),(0,e.jsx)("td",{className:"min-w-64 p-0",children:i(n)}),c&&(0,e.jsx)("td",{children:c(n)}),(0,e.jsx)("td",{children:d?d(n):(0,e.jsx)(le,{status:n.status})}),(0,e.jsx)("td",{className:"whitespace-nowrap text-xs",children:x.harness.label}),(0,e.jsx)("td",{className:"text-xs",children:x.model.label}),(0,e.jsx)("td",{className:"text-xs",children:x.connection.label})]},n.id)})})]})}),!S.length&&(0,e.jsx)("p",{className:"py-8 text-center text-sm text-muted-foreground",children:"No agents match these filters."}),F&&(0,e.jsx)(h.Suspense,{fallback:(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading editor…"}),children:(0,e.jsx)(Me,{companyId:t,agents:F,totalSelected:j.length,onClose:r((n,x)=>{D(null),n.length&&(P(y=>y.filter(A=>!(x?F.map(C=>C.id):n).includes(A))),Y(`Updated ${n.length} ${I(_(F[0]))} ${n.length===1?"agent":"agents"}.`))},"onClose")})})]})}r(Le,"AgentBulkRoster");var Pe=[],B={model:"Model",status:"Status",harness:"Harness",connection:"Connection"},Fe={model:"All models",status:"All statuses",harness:"All harnesses",connection:"All connections"};function qe(t,l=Pe){const[a,i]=(0,h.useState)({companyId:t,filters:O}),c=a.companyId===t?a.filters:O,d=X({queryKey:["ai-connections",t],queryFn:r(()=>Q.list(t),"queryFn"),enabled:!!t}),p=(0,h.useMemo)(()=>W(l,d.data),[l,d.data]),u=E.filter(s=>c[s]).length,o=(0,h.useCallback)(s=>Re(p.byAgentId.get(s.id),c),[p,c]);return{filters:c,options:p.options,activeCount:u,onChange:r(s=>i({companyId:t,filters:s}),"onChange"),matches:o,connectionError:d.error,retryConnections:r(()=>{d.refetch()},"retryConnections")}}r(qe,"useAgentRosterFilters");function Ue({filters:t,options:l,onChange:a,activeCount:i,count:c,connectionError:d,retryConnections:p,compact:u=!1}){return(0,e.jsxs)("div",{"data-canonical-toolbar":"agent-filters",role:"toolbar","aria-label":"Agent filters",className:K("flex flex-wrap items-center gap-3",!u&&"justify-between"),children:[(0,e.jsxs)(oe,{children:[(0,e.jsx)(ce,{asChild:!0,children:(0,e.jsxs)(M,{variant:u?"outline":"ghost",size:"icon","aria-label":"Filter agents",title:i?`Filters: ${i}`:"Filter agents",className:K("relative shrink-0",u&&"design-toolbar-icon",i>0&&"text-blue-600 dark:text-blue-400"),children:[(0,e.jsx)(fe,{className:"size-3.5","aria-hidden":!0}),i>0&&(0,e.jsx)("span",{"aria-hidden":!0,className:"absolute -right-1 -top-1 flex size-3.5 items-center justify-center rounded-full bg-blue-600 text-(length:--text-nano) font-bold text-white",children:i})]})}),(0,e.jsxs)(pe,{"aria-label":"Agent filter choices",align:"start",className:"max-h-96 w-72 space-y-3 overflow-y-auto p-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:"Filters"}),i>0&&(0,e.jsx)(M,{variant:"ghost",size:"sm",onClick:r(()=>a(O),"onClick"),children:"Clear filters"})]}),E.map(o=>(0,e.jsxs)("label",{className:"block space-y-1 text-xs font-medium text-muted-foreground",children:[(0,e.jsx)("span",{children:B[o]}),(0,e.jsxs)(ie,{"aria-label":B[o],value:t[o],onChange:r(s=>a({...t,[o]:s.target.value}),"onChange"),className:"h-11 text-base md:text-sm",children:[(0,e.jsx)("option",{value:"",children:Fe[o]}),t[o]&&!l[o].some(s=>s.value===t[o])&&(0,e.jsxs)("option",{value:t[o],children:["Previously selected ",B[o].toLowerCase()]}),l[o].map(s=>(0,e.jsx)("option",{value:s.value,children:s.label},s.value))]})]},o))]})]}),!u&&(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:[c," ",c===1?"agent":"agents"]}),!!d&&(0,e.jsxs)("p",{role:"alert",className:"basis-full text-xs text-destructive",children:["Connection names couldn’t be loaded. ",(0,e.jsx)(M,{variant:"link",size:"sm",onClick:p,children:"Retry"})]})]})}r(Ue,"AgentRosterFilters");export{Ee as a,He as c,V as i,Te as l,qe as n,_ as o,Le as r,De as s,Ue as t,Oe as u};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConfigureBuiltInAgentModal-BwW7XQ1O.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-Bt31d8ga.js","assets/index-z7lcCz2I.css"])))=>i.map(i=>d[i]);
2
- var Et=Object.defineProperty;var a=(s,o)=>Et(s,"name",{value:o,configurable:!0});import{a as Ze}from"./rolldown-runtime-DhZMWcEn.js";import{v as It,x as Tt}from"./collections-BxrcELwt.js";import{$A as zt,Ad as Rt,Ao as Pt,By as Lt,Cs as $t,Dy as _t,E_ as Ft,FE as Ue,Fy as Dt,GS as U,Gb as Se,Gd as qt,IE as at,Id as Je,Iy as Ht,KA as Bt,Kv as Ot,Ky as Zt,LS as ot,Ly as Xt,NE as J,Oo as Yt,QC as Kt,Qu as Wt,RT as et,Ry as Vt,Ss as Gt,Sy as Qt,Tw as Ut,Wy as Jt,Xo as es,Yb as it,Yo as ts,Zn as ss,ab as Ae,as as ns,aw as rs,ck as lt,dl as as,ej as os,fw as is,gb as ls,hC as cs,iD as us,ib as ct,is as ds,jb as ut,jo as hs,lS as gs,nE as dt,nj as ms,o_ as fs,on as Te,pC as ps,pb as ht,qC as gt,rS as mt,rT as xs,rb as ze,ry as ys,sE as vs,sw as bs,tw as Be,ub as Ee,vb as ws,vw as js,xE as G,xb as Cs,yb as ks,zE as De}from"./index-Bt31d8ga.js";import{n as Ms,r as Ns,t as Ss}from"./AgentRosterFilters-b7qMLv8-.js";import{t as As}from"./EntityRow-gpsOgEtu.js";var i=Ze(ms(),1),t=Ze(zt(),1);function ft({zoomIn:s,zoomOut:o,fit:n,children:c}){return(0,t.jsxs)("div",{className:"org-chart-controls flex items-center gap-2",role:"group","aria-label":"Org chart controls",children:[(0,t.jsxs)("div",{className:"design-view-toggle",role:"group","aria-label":"Chart camera",children:[(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Zoom out",title:"Zoom out",onClick:o,children:(0,t.jsx)(rs,{className:"size-4"})}),(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Zoom in",title:"Zoom in",onClick:s,children:(0,t.jsx)(gt,{className:"size-4"})}),(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Fit chart to screen",title:"Fit chart to screen",onClick:n,children:(0,t.jsx)(is,{className:"size-4"})})]}),c]})}a(ft,"OrgChartControls");var Es=Ze(os(),1);function Oe(s,o,n){s.offsetX=(s.offsetX??0)+o,s.offsetY=(s.offsetY??0)+n}a(Oe,"shift");function pt(s,o=0,n=0){o+=s.offsetX??0,n+=s.offsetY??0,s.x+=o,s.y+=n,s.children.forEach(c=>pt(c,o,n)),delete s.offsetX,delete s.offsetY}a(pt,"resolvePositions");function qe(s,o,n){const c=[];for(let h=0;h<s.length;h+=o)c.push(s.slice(h,h+o));const u=Math.max(0,...c.map(h=>h.reduce((w,g)=>w+g.width,0)+(h.length-1)*n));let d=0;const f=[];for(const h of c){let w=0;for(const g of h)g.roots.forEach(q=>{Oe(q,w,d),f.push(q)}),w+=g.width+n;d+=Math.max(...h.map(g=>g.height))+n}return{roots:f,width:u,height:Math.max(0,d-n)}}a(qe,"pack");function Is(s,o,n){let c=0;const u=a(b=>{c++;const{reports:T,...z}=b;return{...z,reports:T.map(u)}},"snapshot"),d=s.map(u),f=Math.min(1,Math.max(0,(c-4)/8)),h=n.sparsePadding+(n.padding-n.sparsePadding)*f,w=n.sparseFitZoomMax+(n.fitZoomMax-n.sparseFitZoomMax)*f;if(!d.length)return{roots:[],width:0,height:0,maxFitZoom:w};const g=Math.max(1,o.width-n.padding),q=Math.max(1,o.height-n.padding),ne=a(b=>Math.min(g/b.width,q/b.height,w),"fitScale"),m=a(b=>{const T=a((k,ue)=>{const O=k.reports,re=O.length>0,R=re?ue===0?1:2:3,B=R===1?n.leaderWidth:R===2?n.managerWidth:n.memberWidth,ee=R===1?n.leaderHeight:R===2?n.managerHeight:n.memberHeight,Y=O.map(P=>T(P,ue+1)),de=Y.filter(P=>P.roots[0].leader),ae=Y.filter(P=>!P.roots[0].leader),M=qe(de.length&&ae.length?[...de,qe(ae,1,n.gap)]:Y,b,n.gap),_=Math.max(B,M.width);return M.roots.forEach(P=>Oe(P,(_-M.width)/2,ee+n.levelGap)),{roots:[{id:k.id,name:k.name,role:k.role,status:k.status,x:(_-B)/2,y:0,width:B,height:ee,depth:ue,tier:R,leader:re,children:M.roots}],width:_,height:ee+(M.roots.length?n.levelGap+M.height:0)}},"build"),z=qe(d.map(k=>T(k,0)),b,n.levelGap);return{...z,width:z.width+h*2,height:z.height+h*2}},"arrange");let j=m(1),H=-1/0;for(let b=1;b<=6;b++){const T=b===1?j:m(b),z=ne(T),k=z*(.8+T.width*T.height*z*z/Math.max(1,o.width*o.height)*.2);k>H&&(j=T,H=k)}return j.roots.forEach(b=>{Oe(b,h,h),pt(b)}),{...j,maxFitZoom:w}}a(Is,"layoutOrganization");function Ts(s,o){const n=[],c=a(u=>{const d=new Map;for(const m of u.children){const j=d.get(m.x)??[];j.push(m),d.set(m.x,j)}const f=[];for(const m of d.values())m.sort((j,H)=>j.y-H.y),m.forEach((j,H)=>f.push({child:j,x:j.x-o*(H+1)/(m.length+1),port:0}));f.sort((m,j)=>m.x-j.x),f.forEach((m,j)=>{m.port=u.x+o/2+(u.width-o)*(j+1)/(f.length+1)});const h=f.filter(m=>m.x<m.port),w=f.filter(m=>m.x>=m.port).reverse(),g=[...h,...w],q=u.y+u.height,ne=Math.min(...u.children.map(m=>m.y));g.forEach((m,j)=>{const H=q+(ne-q)*(j+1)/(g.length+1),b=m.child.y+m.child.height/2,T=[{x:m.port,y:q},{x:m.port,y:H},{x:m.x,y:H},{x:m.x,y:b},{x:m.child.x,y:b}];n.push({parent:u,child:m.child,points:T,path:T.map((z,k)=>`${k?"L":"M"} ${z.x} ${z.y}`).join(" ")})}),u.children.forEach(c)},"visit");return s.forEach(c),n}a(Ts,"routeReportingEdges");function zs(s,o,n){const c=new Map(o.map(d=>[d.id,d])),u=new Map;for(const d of s){if(d.status!=="running"||!d.issueId||!n.has(d.agentId))continue;const f=u.get(d.issueId)??new Set;f.add(d.agentId),u.set(d.issueId,f)}return[...u].sort(([d],[f])=>d.localeCompare(f)).map(([d,f])=>{const h=c.get(d),w=[...f].sort();return{id:d,title:h?.title??"Running task",identifier:h?.identifier??null,agentIds:w,ownerId:w[0]}})}a(zs,"collectChartTasks");var Rs=new Map([...Jt,...Zt].map(s=>[s.id,s.label])),Ps=.05,Ls=2,Ne=40,He=6;function $s(s){const o=[];function n(c){o.push(c),c.children.forEach(n)}return a(n,"walk"),s.forEach(n),o}a($s,"flattenLayout");function Ie(s){return Math.min(Math.max(s,Ps),Ls)}a(Ie,"clampZoom");function tt(s,o,n,c){if(s<=Ne||o-c<=Ne||n.width<=0||n.height<=0)return null;const u=(s-Ne)/n.width,d=(o-c-Ne)/n.height,f=Ie(Math.min(u,d,n.maxFitZoom)),h=n.width*f,w=n.height*f;return{zoom:f,pan:{x:(s-h)/2,y:c+(o-c-w)/2}}}a(tt,"fitChartToViewport");function _s(s){return{x:s.clientX,y:s.clientY}}a(_s,"touchPoint");function st(s,o){const n=s.clientX-o.clientX,c=s.clientY-o.clientY;return Math.hypot(n,c)}a(st,"touchDistance");function nt(s,o,n){const c=n.getBoundingClientRect();return{x:(s.clientX+o.clientX)/2-c.left,y:(s.clientY+o.clientY)/2-c.top}}a(nt,"touchCenter");function Fs({orgTree:s,agents:o,matchingAgentIds:n,embedded:c=!1,controlsContainer:u,actionsRef:d,enableTaskLayer:f=!1}={}){const{selectedCompanyId:h}=ot(),{setBreadcrumbs:w}=ct(),g=it();dt();const q=!1,ne=!!Qt(),{hidden:m}=ys(),j=!ne&&!m.has("company.import"),H=!m.has("company.export"),b=G({queryKey:U.org(h),queryFn:a(()=>ze.org(h),"queryFn"),enabled:!!h&&s===void 0}),{data:T,isLoading:z}=b,k=Ee(b),{data:ue}=G({queryKey:U.agents.list(h),queryFn:a(()=>ze.list(h),"queryFn"),enabled:!!h&&o===void 0}),O=s??T,re=o??ue,R=es(h),B=ts(h),ee=(0,i.useMemo)(()=>new Set(R.data?.starredAgentIds??[]),[R.data?.starredAgentIds]),Y=(0,i.useMemo)(()=>{const e=new Map;for(const r of re??[])e.set(r.id,r);return e},[re]);(0,i.useEffect)(()=>{c||w([{label:"Org Chart"}])},[c,w]);const[de,ae]=(0,i.useState)(q),M=f&&de,_=G({queryKey:[...U.liveRuns(h),"org-chart-tasks"],queryFn:a(()=>mt.liveRunsForCompany(h,{limit:100}),"queryFn"),enabled:!!(h&&M),refetchInterval:M?15e3:!1}),P=(0,i.useMemo)(()=>[...new Set((_.data??[]).filter(e=>e.status==="running"&&e.issueId).map(e=>e.issueId))].sort(),[_.data]),ye=G({queryKey:["org-chart-task-titles",h,P],queryFn:a(async()=>{const e=[];for(let r=0;r<P.length;r+=50)e.push(...await gs.summaries(h,P.slice(r,r+50)));return e},"queryFn"),enabled:!!(h&&M&&P.length)}),L=Ee(_),we=Ee(ye),Z=(0,i.useMemo)(()=>M?zs(_.data??[],ye.data??[],new Set(Y.keys())):[],[M,q,O,_.data,ye.data,Y]),[C]=(0,i.useState)(()=>{const e=getComputedStyle(document.documentElement),r=a(p=>parseFloat(e.getPropertyValue(`--org-${p}`))||0,"value");return{leaderWidth:r("leader-width"),leaderHeight:r("leader-height"),managerWidth:r("manager-width"),managerHeight:r("manager-height"),memberWidth:r("member-width"),memberHeight:r("member-height"),gap:r("gap"),levelGap:r("level-gap"),padding:r("padding"),sparsePadding:r("sparse-padding"),fitZoomMax:r("fit-zoom-max"),sparseFitZoomMax:r("sparse-fit-zoom-max"),taskHeight:r("task-height"),taskBandHeight:r("task-band-height"),taskLabelWidth:r("task-label-width"),taskLegendHeight:r("task-legend-height"),toolbarClearance:r("toolbar-clearance")}}),$=(0,i.useRef)(null),he=(0,i.useId)(),[oe,ke]=(0,i.useState)(0),te=(0,i.useRef)(null),[ge,je]=(0,i.useState)(c?C.toolbarClearance:0);(0,i.useEffect)(()=>{const e=u?.closest(".agents-org-toolbar");if(!e)return;const r=a(()=>je(e.offsetHeight),"measure");r();const p=typeof ResizeObserver>"u"?null:new ResizeObserver(r);return p?.observe(e),()=>p?.disconnect()},[u]);const Q=ge+(f?C.taskBandHeight:0),[S,Me]=(0,i.useState)({width:800,height:600});(0,i.useEffect)(()=>{const e=$.current;if(!e)return;const r=a(()=>Me(y=>{const E=e.clientWidth,I=e.clientHeight;return E===y.width&&I===y.height?y:{width:E,height:I}}),"measure");r();const p=typeof ResizeObserver>"u"?null:new ResizeObserver(r);return p?.observe(e),window.addEventListener("resize",r),()=>{p?.disconnect(),window.removeEventListener("resize",r)}},[O]);const me=(0,i.useMemo)(()=>Is(O??[],{width:S.width,height:Math.max(0,S.height-Q)},C),[O,S,C,Q]),ie=me.roots,K=(0,i.useMemo)(()=>$s(ie),[ie]),ve=(0,i.useMemo)(()=>new Map(K.map(e=>[e.id,e])),[K]),Re=(0,i.useMemo)(()=>Ts(ie,C.gap),[ie,C.gap]),be=(0,i.useMemo)(()=>({width:me.width,height:me.height,maxFitZoom:me.maxFitZoom}),[me]),[x,W]=(0,i.useState)({x:0,y:0}),[v,fe]=(0,i.useState)(1),[l,N]=(0,i.useState)(!1),F=(0,i.useRef)({x:0,y:0,panX:0,panY:0}),A=(0,i.useRef)({mode:null,startPoint:{x:0,y:0},startPan:{x:0,y:0},startZoom:1,startDistance:0,startCenter:{x:0,y:0},moved:!1}),le=(0,i.useRef)(!1),se=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>{se.current!==null&&window.clearTimeout(se.current)},[]);const Pe=(0,i.useRef)(!1);(0,i.useEffect)(()=>{Pe.current=!1},[O,S,Q]),(0,i.useEffect)(()=>{if(Pe.current||K.length===0||!$.current)return;const e=$.current,r=tt(e.clientWidth,e.clientHeight,be,Q);r&&(Pe.current=!0,fe(r.zoom),W(r.pan))},[K,be,Q]);const wt=(0,i.useCallback)(e=>{e.button===0&&(e.target.closest("[data-org-card], button, a")||(N(!0),F.current={x:e.clientX,y:e.clientY,panX:x.x,panY:x.y}))},[x]),jt=(0,i.useCallback)(e=>{if(!l)return;const r=e.clientX-F.current.x,p=e.clientY-F.current.y;W({x:F.current.panX+r,y:F.current.panY+p})},[l]),Ye=(0,i.useCallback)(()=>{N(!1)},[]),Ct=(0,i.useCallback)(e=>{e.preventDefault();const r=$.current;if(!r)return;const p=r.getBoundingClientRect(),y=e.clientX-p.left,E=e.clientY-p.top,I=e.deltaY<0?1.1:.9,X=Ie(v*I),ce=X/v;W({x:y-ce*(y-x.x),y:E-ce*(E-x.y)}),fe(X)},[v,x]),Le=(0,i.useCallback)((e,r)=>{const p=Ie(e),y=p/v;W({x:r.x-y*(r.x-x.x),y:r.y-y*(r.y-x.y)}),fe(p)},[v,x]),Ke=(0,i.useCallback)(()=>{if(!$.current)return;const e=tt($.current.clientWidth,$.current.clientHeight,be,Q);e&&(fe(e.zoom),W(e.pan))},[be,Q]),kt=(0,i.useCallback)(e=>{if(e.touches.length>=2&&$.current){const[p,y]=[e.touches[0],e.touches[1]];A.current={mode:"pinch",startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:st(p,y),startCenter:nt(p,y,$.current),moved:!1};return}const r=e.touches[0];r&&(A.current={mode:"pan",startPoint:_s(r),startPan:x,startZoom:v,startDistance:0,startCenter:{x:0,y:0},moved:!1})},[x,v]),Mt=(0,i.useCallback)(e=>{const r=$.current;if(!r||!A.current.mode)return;if(e.touches.length>=2){const[I,X]=[e.touches[0],e.touches[1]],ce=st(I,X),xe=nt(I,X,r);if(A.current.mode!=="pinch"||A.current.startDistance===0){A.current={mode:"pinch",startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:ce,startCenter:xe,moved:!1};return}const D=A.current,V=Ie(D.startZoom*(ce/D.startDistance)),Qe=V/D.startZoom,St=xe.x-D.startCenter.x,At=xe.y-D.startCenter.y;D.moved=D.moved||Math.abs(ce-D.startDistance)>He||Math.hypot(St,At)>He,fe(V),W({x:xe.x-Qe*(D.startCenter.x-D.startPan.x),y:xe.y-Qe*(D.startCenter.y-D.startPan.y)});return}const p=e.touches[0];if(!p||A.current.mode!=="pan")return;const y=p.clientX-A.current.startPoint.x,E=p.clientY-A.current.startPoint.y;A.current.moved=A.current.moved||Math.hypot(y,E)>He,W({x:A.current.startPan.x+y,y:A.current.startPan.y+E})},[x,v]),We=(0,i.useCallback)(()=>{A.current.moved&&(le.current=!0,se.current!==null&&window.clearTimeout(se.current),se.current=window.setTimeout(()=>{le.current=!1,se.current=null},400)),A.current={mode:null,startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:0,startCenter:{x:0,y:0},moved:!1}},[x,v]),$e=(0,i.useMemo)(()=>({zoomIn:a(()=>Le(v*1.2,{x:S.width/2,y:S.height/2}),"zoomIn"),zoomOut:a(()=>Le(v*.8,{x:S.width/2,y:S.height/2}),"zoomOut"),fit:Ke}),[Le,v,S,Ke]);(0,i.useImperativeHandle)(d,()=>$e,[$e]);const Ve=(0,t.jsx)(ft,{...$e,children:f&&(0,t.jsxs)(J,{variant:M?"secondary":"outline",size:"sm","aria-pressed":M,onClick:a(()=>ae(e=>!e),"onClick"),children:[(0,t.jsx)(Ut,{className:"size-4"}),"Tasks"]})}),pe=Math.min(C.taskLabelWidth,Math.max(0,S.width-C.padding*2)),Ce=C.gap/2,Ge=Z.length*(pe+Ce)-Ce,_e=Math.max(C.padding,(S.width-Ge)/2),Nt=ge+C.taskLegendHeight,Fe=(0,i.useMemo)(()=>{const e=[];return Z.forEach((r,p)=>{const y=_e+p*(pe+Ce)-oe;y+pe<0||y>S.width||r.agentIds.forEach((E,I)=>{const X=ve.get(E);X&&e.push({key:`${r.id}-${E}`,node:X,x:y+pe*(I+1)/(r.agentIds.length+1)})})}),e},[Z,_e,pe,Ce,oe,S.width,ve]);return h?s===void 0&&(z||k.kind==="reconnecting")?(0,t.jsx)(ht,{variant:"org-chart"}):s===void 0&&k.kind==="error"?(0,t.jsx)(Ae,{size:"page",error:k.error,action:"load the org chart",onRetry:k.retry,retrying:k.isFetching}):O&&O.length===0?(0,t.jsx)(Te,{icon:Be,message:"No organizational hierarchy defined."}):(0,t.jsxs)("div",{className:c?"org-chart-shell flex min-h-0 flex-1 flex-col":"flex h-(--sz-calc-38) min-h-(--sz-420px) flex-col md:h-full md:min-h-0",children:[d?null:u?(0,Es.createPortal)(Ve,u):c?null:(0,t.jsx)("div",{className:"mb-2 flex justify-end",children:Ve}),!c&&(j||H)?(0,t.jsxs)("div",{className:"mb-2 flex shrink-0 flex-wrap items-center justify-start gap-2",children:[j?(0,t.jsx)(Se,{to:"/company/import",children:(0,t.jsxs)(J,{variant:"outline",size:"sm",children:[(0,t.jsx)(ps,{className:"mr-1.5 h-3.5 w-3.5"}),"Import organization"]})}):null,H?(0,t.jsx)(Se,{to:"/company/export",children:(0,t.jsxs)(J,{variant:"outline",size:"sm",children:[(0,t.jsx)(xs,{className:"mr-1.5 h-3.5 w-3.5"}),"Export organization"]})}):null]}):null,(0,t.jsxs)("div",{ref:$,"data-testid":"org-chart-viewport",className:"org-chart-canvas w-full flex-1 min-h-0 overflow-hidden relative",style:{cursor:l?"grabbing":"grab",touchAction:"none",overscrollBehavior:"contain"},onMouseDown:wt,onMouseMove:jt,onMouseUp:Ye,onMouseLeave:Ye,onWheel:Ct,onTouchStart:kt,onTouchMove:Mt,onTouchEnd:We,onTouchCancel:We,children:[(0,t.jsx)("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%"},children:(0,t.jsx)("g",{transform:`translate(${x.x}, ${x.y}) scale(${v})`,children:Re.map(({parent:e,child:r,path:p})=>(0,t.jsx)("path",{d:p,fill:"none",className:"org-reporting-edge","data-filter-match":n?n.has(e.id)&&n.has(r.id):void 0},`${e.id}-${r.id}`))})}),(0,t.jsx)("div",{"data-testid":"org-chart-card-layer",className:"org-chart-cards absolute inset-0",style:{transform:`translate(${x.x}px, ${x.y}px) scale(${v})`,transformOrigin:"0 0"},children:K.map(e=>{const r=Y.get(e.id),p=r?qt(r):void 0,y=Vt(r),E=(Rs.get(y)??y.split("/").pop()??y).replace(/^(?:Claude|Codex)\s+/i,""),I=r?Lt({adapterConfig:r.adapterConfig},r.adapterType).effort:null,X=(r?.status??e.status).replace(/_/g," "),ce=X==="active"?"Idle":X.charAt(0).toUpperCase()+X.slice(1),xe=B.isPending&&B.variables?.resourceId===e.id,D=a(()=>g(r?at(r):`/agents/${e.id}`),"openAgent");return(0,t.jsxs)(Ft,{"data-org-card":!0,"data-leader":e.leader,"data-tier":e.tier,"data-depth":e.depth,"data-filter-match":n?n.has(e.id):void 0,interactive:!0,role:"link",tabIndex:0,"aria-label":`Open ${e.name} overview`,className:"org-chart-agent-card absolute gap-0 select-none",onKeyDown:a(V=>{V.key==="Enter"&&V.target===V.currentTarget&&D()},"onKeyDown"),style:{left:e.x,top:e.y,width:e.width,height:e.height},onClick:D,onClickCapture:a(V=>{le.current&&(le.current=!1,V.preventDefault(),V.stopPropagation())},"onClickCapture"),children:[e.leader&&(0,t.jsx)("div",{className:"org-card-badge-slot","aria-hidden":!0}),(0,t.jsxs)("div",{className:"org-card-heading min-w-0 text-left",children:[e.leader&&(0,t.jsx)(Yt,{size:"button",className:"org-card-star",starred:ee.has(e.id),resourceName:e.name,pending:xe,error:B.isError&&B.variables?.resourceId===e.id,onToggle:a(V=>B.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,starred:V}),"onToggle")}),(0,t.jsx)("div",{className:"org-card-name truncate font-medium text-foreground",title:e.name,children:e.name}),(0,t.jsx)("div",{className:"org-card-title line-clamp-2 text-muted-foreground",title:r?.title||rt(e.role),children:r?.title||rt(e.role)}),e.leader&&(0,t.jsx)("div",{className:"org-card-status truncate text-muted-foreground",children:ce})]}),(0,t.jsx)("div",{className:"org-card-character flex min-h-0 items-center justify-center",children:e.leader?(0,t.jsx)(as,{agent:r??{id:e.id,name:e.name},size:256,state:"idle",trackingScope:"page",followCursor:!0,animationGroup:"org-chart",className:"org-card-live-character"}):(0,t.jsx)(ut,{agent:r??{id:e.id,name:e.name},size:128,pose:"rest",view:"portrait",className:"org-card-avatar"})}),p&&(E||I)&&(0,t.jsxs)("div",{className:"org-card-model min-w-0",children:[E&&(0,t.jsxs)("span",{className:"org-card-model-label",title:y,children:[(0,t.jsx)("span",{className:"org-card-model-mark",children:(0,t.jsx)(Rt,{type:p,className:"size-4 shrink-0"})}),(0,t.jsx)("span",{className:"org-card-model-name",children:E})]}),E&&I&&" ",I&&(0,t.jsx)("span",{className:"org-card-effort text-muted-foreground",title:I,children:Xt[I]??I})]})]},e.id)})}),M&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("svg",{className:"org-task-overlay absolute inset-0 size-full pointer-events-none","aria-hidden":!0,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("mask",{id:he,children:[(0,t.jsx)("rect",{width:"100%",height:"100%",className:"org-task-mask-open"}),K.map(e=>(0,t.jsx)("rect",{className:"org-task-mask-card",x:x.x+e.x*v,y:x.y+e.y*v,width:e.width*v,height:e.height*v},e.id))]})}),(0,t.jsx)("g",{mask:`url(#${he})`,children:Fe.map((e,r)=>{const p=x.x+(e.node.x-C.gap*(.25+(r+1)/(Fe.length+1)*.5))*v,y=Q+C.padding*v*(r+1)/(Fe.length+1),E=x.x+e.node.x*v,I=x.y+(e.node.y+e.node.height/2)*v;return(0,t.jsx)("path",{className:"org-task-edge",d:`M ${e.x} ${Nt+C.taskHeight} V ${y} H ${p} V ${I} H ${E}`,fill:"none"},e.key)})})]}),(0,t.jsxs)("div",{className:"org-task-band absolute inset-x-0",style:{top:ge},children:[(0,t.jsx)("div",{className:"org-task-legend text-xs text-muted-foreground",role:"status",children:L.kind==="error"?(0,t.jsx)(Ae,{size:"inline",error:L.error,action:"load running tasks",onRetry:L.retry}):we.kind==="error"&&P.length?(0,t.jsx)(Ae,{size:"inline",error:we.error,action:"load task titles",onRetry:we.retry}):L.kind==="stale"?"Task updates paused while reconnecting…":_.isPending||L.kind==="reconnecting"?"Loading running tasks…":Z.length?`${Z.length} running ${Z.length===1?"task":"tasks"}${(_.data?.length??0)>=100?" · showing first 100 runs":""}`:"No running tasks"}),(0,t.jsx)("div",{className:"org-task-strip",onScroll:a(e=>ke(e.currentTarget.scrollLeft),"onScroll"),onWheel:a(e=>e.stopPropagation(),"onWheel"),onMouseDown:a(e=>e.stopPropagation(),"onMouseDown"),onTouchStart:a(e=>{e.stopPropagation(),te.current=e.touches[0]?.clientX??null},"onTouchStart"),onTouchMove:a(e=>{e.stopPropagation();const r=e.touches[0]?.clientX;te.current!==null&&r!==void 0&&(e.currentTarget.scrollLeft+=te.current-r),te.current=r??null},"onTouchMove"),onTouchEnd:a(e=>{e.stopPropagation(),te.current=null},"onTouchEnd"),onTouchCancel:a(e=>{e.stopPropagation(),te.current=null},"onTouchCancel"),children:(0,t.jsx)("div",{className:"relative h-full",style:{width:Math.max(S.width,Ge+C.padding*2)},children:Z.map((e,r)=>{const p={"data-org-task":!0,title:`${e.identifier??"Task"} · ${e.title} · Working: ${e.agentIds.map(y=>Y.get(y)?.name??"Agent").join(", ")}`,className:"org-task-label absolute flex items-center gap-1.5 rounded px-2 text-xs text-muted-foreground no-underline hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",style:{left:_e+r*(pe+Ce),width:pe,height:C.taskHeight},children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Kt,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.title})]})};return(0,t.jsx)(Se,{to:`/issues/${e.identifier??e.id}`,...p},e.id)})})})]})]})]})]}):(0,t.jsx)(Te,{icon:Be,message:"Select an organization to view the org chart."})}a(Fs,"OrgChart");var Ds=lt;function rt(s){return Ds[s]??s}a(rt,"roleLabel");function qs({query:s,onQueryChange:o,view:n,onViewChange:c,hideViewToggle:u,onNewAgent:d,filters:f,orgControlsRef:h,orgActions:w}){return(0,t.jsx)("div",{"data-canonical-toolbar":"agents",role:"toolbar","aria-label":"Agents controls",className:"flex flex-wrap items-center gap-3",children:(0,t.jsxs)("div",{className:"design-toolbar-controls flex w-full flex-wrap items-center gap-4",children:[(0,t.jsx)(Tt,{query:s,onQueryChange:o,label:"Search agents",placeholder:"Search agents…"}),!u&&(0,t.jsxs)("div",{className:"design-view-toggle",role:"group","aria-label":"Agent view",children:[(0,t.jsx)(J,{type:"button",size:"icon-sm",variant:n==="list"?"secondary":"ghost",className:"design-toolbar-icon",onClick:a(()=>c("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":n==="list",children:(0,t.jsx)(js,{"aria-hidden":!0})}),(0,t.jsx)(J,{type:"button",size:"icon-sm",variant:n==="org"?"secondary":"ghost",className:"design-toolbar-icon",onClick:a(()=>c("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":n==="org",children:(0,t.jsx)(Be,{"aria-hidden":!0})})]}),f,(0,t.jsxs)("div",{className:"design-toolbar-actions",children:[w&&(0,t.jsx)("div",{ref:h,"data-org-toolbar-controls":!0,className:"agents-org-controls-reveal","data-visible":n==="org","aria-hidden":n!=="org",inert:n!=="org",children:(0,t.jsx)("div",{className:"min-w-0 overflow-hidden",children:(0,t.jsx)(ft,{...w})})}),(0,t.jsxs)(J,{size:"sm",variant:"outline","data-toolbar-primary":!0,onClick:d,children:[(0,t.jsx)(gt,{"aria-hidden":!0}),"New Agent"]})]})]})})}a(qs,"AgentsToolbar");var xt=lt,Hs=(0,i.lazy)(()=>vs(()=>import("./ConfigureBuiltInAgentModal-BwW7XQ1O.js").then(s=>s.n).then(s=>({default:s.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3])));function Bs(s){return ss.includes(s)}a(Bs,"isFilterTab");var yt={label:"Local",detail:"Microvac host",title:"Local - Microvac host"},Os={label:"—",detail:"Loading environment",title:"Loading environment"},Xe=new Set(["terminated","pending_approval"]);function vt(s,o){return o==="all"?!0:o==="active"?s==="active"||s==="running"||s==="idle":o==="paused"?s==="paused":o==="error"?s==="error":!0}a(vt,"matchesFilter");function Zs(s,o){const n=o.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean),c=[s.name,s.role,xt[s.role],s.title].filter(Boolean).join(" ").toLocaleLowerCase();return n.every(u=>c.includes(u))}a(Zs,"matchesSearch");function Xs(s,o,n,c=""){return s.filter(u=>Xe.has(u.status)||!Zs(u,c)?!1:o==="builtin"?n.has(u.id):vt(u.status,o)).sort((u,d)=>u.name.localeCompare(d.name))}a(Xs,"filterAgents");function Ys(s){return s==="ssh"?"SSH":s.charAt(0).toUpperCase()+s.slice(1)}a(Ys,"formatEnvironmentDriver");function Ks(s,o){const n=typeof s.config.provider=="string"?s.config.provider.trim():"";return n?o?.sandboxProviders?.[n]?.displayName??n:"Sandbox"}a(Ks,"getSandboxProviderLabel");function Ws(s,o){const n=Wt(s)?"Managed by Microvac":s.driver==="sandbox"?`${Ks(s,o)} sandbox provider`:s.driver==="local"?"Microvac host":Ys(s.driver);return{label:s.name,detail:n,title:`${s.name} - ${n}`}}a(Ws,"describeEnvironment");function Vs(s){return{label:"Unknown environment",detail:s.slice(0,8),title:`Unknown environment - ${s}`}}a(Vs,"describeMissingEnvironment");function Gs(s,o,n,c){const u=s.defaultEnvironmentId??n;if(!u)return yt;const d=o.get(u);return d?Ws(d,c):Vs(u)}a(Gs,"resolveAgentEnvironment");function bt(s,o,n,c){return s.reduce((u,d)=>{const f=bt(d.reports,o,n,c);return Xe.has(d.status)?(u.push(...f),u):(((o==="builtin"?n.has(d.id):vt(d.status,o))&&(!c||c.has(d.id))||f.length>0)&&u.push({...d,reports:f}),u)},[]).sort((u,d)=>u.name.localeCompare(d.name))}a(bt,"filterOrgTree");function rn({initialView:s="list"}={}){const o=$t(),[n,c]=(0,i.useState)(""),u=(0,i.useRef)(null),d=(0,i.useMemo)(()=>({zoomIn:a(()=>u.current?.zoomIn(),"zoomIn"),zoomOut:a(()=>u.current?.zoomOut(),"zoomOut"),fit:a(()=>u.current?.fit(),"fit")}),[]),[f,h]=(0,i.useState)(null),w=Dt(),{selectedCompanyId:g}=ot(),{openNewAgent:q}=_t(),{setBreadcrumbs:ne}=ct(),m=it(),j=dt(),{isMobile:H}=Ht(),{enabled:b}=fs(),T=j.pathname.split("/").pop()??"all",z=Bs(T)?T:"all",k=!1,[ue,O]=(0,i.useState)(()=>b?s:"org"),re=!b&&H,R=re?"list":ue;(0,i.useEffect)(()=>{O(b?s:"org")},[s,b,k]);const{data:B}=G({queryKey:U.instance.settings,queryFn:a(()=>Ot.get(),"queryFn"),enabled:!!g}),ee=B?.experimental.enableBuiltInAgents===!0,Y="all",{data:de}=G({queryKey:U.builtInAgents.list(g),queryFn:a(()=>ns.list(g),"queryFn"),enabled:!!g&&ee}),ae=(0,i.useMemo)(()=>{const l=new Map;if(!ee)return l;for(const N of de??[])N.agentId&&l.set(N.agentId,N);return l},[de,ee]),M=(0,i.useMemo)(()=>new Set(ae.keys()),[ae]),[_,P]=(0,i.useState)(null),ye=G({queryKey:U.agents.list(g),queryFn:a(()=>ze.list(g),"queryFn"),enabled:!!g}),{data:L,isLoading:we}=ye,Z=Ms(g,L),C=Ee(ye),{data:$}=G({queryKey:U.org(g),queryFn:a(()=>ze.org(g),"queryFn"),enabled:!!g&&R==="org"}),he=B?.experimental.enableEnvironments===!0,{data:oe}=G({queryKey:U.environments.list(g),queryFn:a(()=>Je.list(g),"queryFn"),enabled:!!g&&he}),{data:ke}=G({queryKey:U.environments.capabilities(g),queryFn:a(()=>Je.capabilities(g),"queryFn"),enabled:!!g&&he}),te=[...U.liveRuns(g),"agents-page"],ge=hs({companyId:g,resourceKey:"live-runs:agents-page",queryKey:te,enabled:!!g,refetchInterval:15e3,leaderOnly:!0}),{data:je,dataUpdatedAt:Q}=G({queryKey:te,queryFn:a(()=>mt.liveRunsForCompany(g),"queryFn"),enabled:ge.enabled,refetchInterval:ge.refetchInterval});Pt(ge,je,Q);const S=(0,i.useMemo)(()=>{const l=new Map;for(const N of je??[]){if(N.status!=="running"&&N.status!=="queued")continue;const F=l.get(N.agentId);if(F){F.liveCount+=1;continue}l.set(N.agentId,{runId:N.id,liveCount:1})}return l},[je]),Me=(0,i.useMemo)(()=>{const l=new Map;for(const N of oe??[])l.set(N.id,N);return l},[oe]),me=(0,i.useMemo)(()=>{const l=new Map;for(const N of L??[])l.set(N.id,Gs(N,Me,B?.defaultEnvironmentId??null,ke));return l},[L,Me,ke,B?.defaultEnvironmentId]);(0,i.useEffect)(()=>{ne([{label:"Agents"}])},[ne]),(0,i.useEffect)(()=>{z!=="all"&&m("/agents/all",{replace:!0})},[m,z]);const ie=(0,i.useMemo)(()=>(L??[]).filter(l=>!Xe.has(l.status)),[L]),K=(0,i.useMemo)(()=>Xs(ie,Y,M,n).filter(Z.matches),[ie,Y,M,n,Z.matches]),ve=(0,i.useMemo)(()=>bt($??[],"all",M),[$,M]),Re=(0,i.useMemo)(()=>new Set(K.map(l=>l.id)),[K]);if(!g)return(0,t.jsx)(Te,{icon:et,message:"Select an organization to view agents."});if(we||C.kind==="reconnecting")return(0,t.jsx)(ht,{variant:"list"});if(C.kind==="error")return(0,t.jsx)(Ae,{size:"page",error:C.error,action:"load agents",onRetry:C.retry,retrying:C.isFetching});const be=he&&oe===void 0,x=he&&(oe===void 0||oe.length>1),W=a(l=>be?Os:me.get(l)??yt,"resolveRenderedEnvironment"),v=a(l=>{const N=l.orgChainHealth?.status==="invalid_org_chain",F=ae.get(l.id),A=F?.status==="needs_setup"||F?.status==="pending_approval",le=F&&A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ds,{status:F.status}),F.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(se=>{se.preventDefault(),se.stopPropagation()},"onClick"),children:(0,t.jsx)(J,{size:"xs",variant:"outline",onClick:a(()=>P(F),"onClick"),children:"Set up"})})]}):null;return(0,t.jsxs)("div",{className:"agent-pin-row agent-roster-pin-row group/agent-pin relative",children:[(0,t.jsx)(As,{title:l.name,titleAccessory:(0,t.jsx)(ls,{agentId:l.id,companyId:l.companyId}),titleClassName:"agent-pin-text flex-1",titleTextClassName:"truncate",subtitleClassName:"truncate",subtitle:`${xt[l.role]??l.role}${l.title?` - ${l.title}`:""}`,to:at(l),className:"agent-roster-identity group py-3 group-hover/agent-pin:bg-accent/50 group-focus-within/agent-pin:bg-accent/50",leading:N?(0,t.jsx)(cs,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ut,{agent:l,size:32}),secondaryRowClassName:De("pl-11",!le&&!x&&!l.lastHeartbeatAt&&"sm:hidden"),secondaryRow:(l.status==="paused"||le||x||l.lastHeartbeatAt)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[le,x&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",title:W(l.id).title,children:[W(l.id).label," · ",W(l.id).detail]}),l.lastHeartbeatAt&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",title:"Last heartbeat",children:us(l.lastHeartbeatAt)})]})}),(0,t.jsx)(Gt,{agent:l,pins:o})]},l.id)},"renderAgentRow"),fe=a(l=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[S.has(l.id)&&(0,t.jsx)(Qs,{agentRef:Ue(l),runId:S.get(l.id).runId,liveCount:S.get(l.id).liveCount}),(0,t.jsx)(It,{status:l.status})]}),"renderAgentStatus");return(0,t.jsxs)("div",{className:De("agents-surface flex flex-col gap-4 @container",R==="org"&&"agents-org-surface h-full min-h-0"),children:[(0,t.jsx)("div",{className:R==="org"?"agents-org-toolbar":void 0,children:(0,t.jsx)(qs,{orgActions:ve.length?d:void 0,orgControlsRef:h,query:n,onQueryChange:c,view:R,onViewChange:O,hideViewToggle:re,onNewAgent:q,filters:(0,t.jsx)(Ss,{...Z,count:K.length,compact:!0})})}),(0,t.jsxs)("div",{className:De("min-h-0 space-y-4",R==="org"&&"agents-org-content flex flex-1 flex-col"),children:[L&&L.length===0&&(0,t.jsx)(Te,{icon:et,message:"Create your first agent to get started.",action:"New Agent",onAction:q}),R==="list"&&L&&L.length>0&&(0,t.jsx)(Ns,{companyId:g,agents:ie,visibleAgents:K,renderAgent:v,renderStatus:fe,renderChat:w.enabled?l=>(0,t.jsx)(Bt,{skipDelayDuration:0,children:(0,t.jsxs)(ws,{children:[(0,t.jsx)(Cs,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",className:"inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover/agent-row:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100","aria-label":`Chat with ${l.name}`,onClick:a(()=>m(`/chats/${Ue(l)}`),"onClick"),children:[(0,t.jsx)(bs,{className:"size-3.5","aria-hidden":!0}),"Chat"]})}),(0,t.jsx)(ks,{children:"chat with this agent"})]})}):void 0},g),R==="org"&&ve.length>0&&(0,t.jsx)(Fs,{embedded:!0,actionsRef:u,controlsContainer:f,orgTree:ve,agents:L??[],matchingAgentIds:n.trim()||Z.activeCount?Re:void 0}),R==="org"&&$&&$.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),_&&g&&(0,t.jsx)(i.Suspense,{fallback:null,children:(0,t.jsx)(Hs,{companyId:g,state:_,open:_!==null,onOpenChange:a(l=>{l||P(null)},"onOpenChange")})})]})]})}a(rn,"Agents");function Qs({agentRef:s,runId:o,liveCount:n}){return(0,t.jsxs)(Se,{to:`/agents/${s}/runs/${o}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:a(c=>c.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",n>1?` (${n})`:""]})]})}a(Qs,"LiveRunIndicator");export{rn as Agents};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConfigureBuiltInAgentModal-DgeD7t_i.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-BJtnP7H1.js","assets/index-z7lcCz2I.css"])))=>i.map(i=>d[i]);
2
+ var Et=Object.defineProperty;var a=(s,o)=>Et(s,"name",{value:o,configurable:!0});import{a as Ze}from"./rolldown-runtime-DhZMWcEn.js";import{v as It,x as Tt}from"./collections-B58p51lw.js";import{$A as zt,Ad as Rt,Ao as Pt,By as Lt,Cs as $t,Dy as _t,E_ as Ft,FE as Ue,Fy as Dt,GS as U,Gb as Se,Gd as qt,IE as at,Id as Je,Iy as Ht,KA as Bt,Kv as Ot,Ky as Zt,LS as ot,Ly as Xt,NE as J,Oo as Yt,QC as Kt,Qu as Wt,RT as et,Ry as Vt,Ss as Gt,Sy as Qt,Tw as Ut,Wy as Jt,Xo as es,Yb as it,Yo as ts,Zn as ss,ab as Ae,as as ns,aw as rs,ck as lt,dl as as,ej as os,fw as is,gb as ls,hC as cs,iD as us,ib as ct,is as ds,jb as ut,jo as hs,lS as gs,nE as dt,nj as ms,o_ as fs,on as Te,pC as ps,pb as ht,qC as gt,rS as mt,rT as xs,rb as ze,ry as ys,sE as vs,sw as bs,tw as Be,ub as Ee,vb as ws,vw as js,xE as G,xb as Cs,yb as ks,zE as De}from"./index-BJtnP7H1.js";import{n as Ms,r as Ns,t as Ss}from"./AgentRosterFilters-GQ2bdXfW.js";import{t as As}from"./EntityRow-BsICt6pd.js";var i=Ze(ms(),1),t=Ze(zt(),1);function ft({zoomIn:s,zoomOut:o,fit:n,children:c}){return(0,t.jsxs)("div",{className:"org-chart-controls flex items-center gap-2",role:"group","aria-label":"Org chart controls",children:[(0,t.jsxs)("div",{className:"design-view-toggle",role:"group","aria-label":"Chart camera",children:[(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Zoom out",title:"Zoom out",onClick:o,children:(0,t.jsx)(rs,{className:"size-4"})}),(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Zoom in",title:"Zoom in",onClick:s,children:(0,t.jsx)(gt,{className:"size-4"})}),(0,t.jsx)(J,{variant:"ghost",size:"icon-sm",className:"design-toolbar-icon","aria-label":"Fit chart to screen",title:"Fit chart to screen",onClick:n,children:(0,t.jsx)(is,{className:"size-4"})})]}),c]})}a(ft,"OrgChartControls");var Es=Ze(os(),1);function Oe(s,o,n){s.offsetX=(s.offsetX??0)+o,s.offsetY=(s.offsetY??0)+n}a(Oe,"shift");function pt(s,o=0,n=0){o+=s.offsetX??0,n+=s.offsetY??0,s.x+=o,s.y+=n,s.children.forEach(c=>pt(c,o,n)),delete s.offsetX,delete s.offsetY}a(pt,"resolvePositions");function qe(s,o,n){const c=[];for(let h=0;h<s.length;h+=o)c.push(s.slice(h,h+o));const u=Math.max(0,...c.map(h=>h.reduce((w,g)=>w+g.width,0)+(h.length-1)*n));let d=0;const f=[];for(const h of c){let w=0;for(const g of h)g.roots.forEach(q=>{Oe(q,w,d),f.push(q)}),w+=g.width+n;d+=Math.max(...h.map(g=>g.height))+n}return{roots:f,width:u,height:Math.max(0,d-n)}}a(qe,"pack");function Is(s,o,n){let c=0;const u=a(b=>{c++;const{reports:T,...z}=b;return{...z,reports:T.map(u)}},"snapshot"),d=s.map(u),f=Math.min(1,Math.max(0,(c-4)/8)),h=n.sparsePadding+(n.padding-n.sparsePadding)*f,w=n.sparseFitZoomMax+(n.fitZoomMax-n.sparseFitZoomMax)*f;if(!d.length)return{roots:[],width:0,height:0,maxFitZoom:w};const g=Math.max(1,o.width-n.padding),q=Math.max(1,o.height-n.padding),ne=a(b=>Math.min(g/b.width,q/b.height,w),"fitScale"),m=a(b=>{const T=a((k,ue)=>{const O=k.reports,re=O.length>0,R=re?ue===0?1:2:3,B=R===1?n.leaderWidth:R===2?n.managerWidth:n.memberWidth,ee=R===1?n.leaderHeight:R===2?n.managerHeight:n.memberHeight,Y=O.map(P=>T(P,ue+1)),de=Y.filter(P=>P.roots[0].leader),ae=Y.filter(P=>!P.roots[0].leader),M=qe(de.length&&ae.length?[...de,qe(ae,1,n.gap)]:Y,b,n.gap),_=Math.max(B,M.width);return M.roots.forEach(P=>Oe(P,(_-M.width)/2,ee+n.levelGap)),{roots:[{id:k.id,name:k.name,role:k.role,status:k.status,x:(_-B)/2,y:0,width:B,height:ee,depth:ue,tier:R,leader:re,children:M.roots}],width:_,height:ee+(M.roots.length?n.levelGap+M.height:0)}},"build"),z=qe(d.map(k=>T(k,0)),b,n.levelGap);return{...z,width:z.width+h*2,height:z.height+h*2}},"arrange");let j=m(1),H=-1/0;for(let b=1;b<=6;b++){const T=b===1?j:m(b),z=ne(T),k=z*(.8+T.width*T.height*z*z/Math.max(1,o.width*o.height)*.2);k>H&&(j=T,H=k)}return j.roots.forEach(b=>{Oe(b,h,h),pt(b)}),{...j,maxFitZoom:w}}a(Is,"layoutOrganization");function Ts(s,o){const n=[],c=a(u=>{const d=new Map;for(const m of u.children){const j=d.get(m.x)??[];j.push(m),d.set(m.x,j)}const f=[];for(const m of d.values())m.sort((j,H)=>j.y-H.y),m.forEach((j,H)=>f.push({child:j,x:j.x-o*(H+1)/(m.length+1),port:0}));f.sort((m,j)=>m.x-j.x),f.forEach((m,j)=>{m.port=u.x+o/2+(u.width-o)*(j+1)/(f.length+1)});const h=f.filter(m=>m.x<m.port),w=f.filter(m=>m.x>=m.port).reverse(),g=[...h,...w],q=u.y+u.height,ne=Math.min(...u.children.map(m=>m.y));g.forEach((m,j)=>{const H=q+(ne-q)*(j+1)/(g.length+1),b=m.child.y+m.child.height/2,T=[{x:m.port,y:q},{x:m.port,y:H},{x:m.x,y:H},{x:m.x,y:b},{x:m.child.x,y:b}];n.push({parent:u,child:m.child,points:T,path:T.map((z,k)=>`${k?"L":"M"} ${z.x} ${z.y}`).join(" ")})}),u.children.forEach(c)},"visit");return s.forEach(c),n}a(Ts,"routeReportingEdges");function zs(s,o,n){const c=new Map(o.map(d=>[d.id,d])),u=new Map;for(const d of s){if(d.status!=="running"||!d.issueId||!n.has(d.agentId))continue;const f=u.get(d.issueId)??new Set;f.add(d.agentId),u.set(d.issueId,f)}return[...u].sort(([d],[f])=>d.localeCompare(f)).map(([d,f])=>{const h=c.get(d),w=[...f].sort();return{id:d,title:h?.title??"Running task",identifier:h?.identifier??null,agentIds:w,ownerId:w[0]}})}a(zs,"collectChartTasks");var Rs=new Map([...Jt,...Zt].map(s=>[s.id,s.label])),Ps=.05,Ls=2,Ne=40,He=6;function $s(s){const o=[];function n(c){o.push(c),c.children.forEach(n)}return a(n,"walk"),s.forEach(n),o}a($s,"flattenLayout");function Ie(s){return Math.min(Math.max(s,Ps),Ls)}a(Ie,"clampZoom");function tt(s,o,n,c){if(s<=Ne||o-c<=Ne||n.width<=0||n.height<=0)return null;const u=(s-Ne)/n.width,d=(o-c-Ne)/n.height,f=Ie(Math.min(u,d,n.maxFitZoom)),h=n.width*f,w=n.height*f;return{zoom:f,pan:{x:(s-h)/2,y:c+(o-c-w)/2}}}a(tt,"fitChartToViewport");function _s(s){return{x:s.clientX,y:s.clientY}}a(_s,"touchPoint");function st(s,o){const n=s.clientX-o.clientX,c=s.clientY-o.clientY;return Math.hypot(n,c)}a(st,"touchDistance");function nt(s,o,n){const c=n.getBoundingClientRect();return{x:(s.clientX+o.clientX)/2-c.left,y:(s.clientY+o.clientY)/2-c.top}}a(nt,"touchCenter");function Fs({orgTree:s,agents:o,matchingAgentIds:n,embedded:c=!1,controlsContainer:u,actionsRef:d,enableTaskLayer:f=!1}={}){const{selectedCompanyId:h}=ot(),{setBreadcrumbs:w}=ct(),g=it();dt();const q=!1,ne=!!Qt(),{hidden:m}=ys(),j=!ne&&!m.has("company.import"),H=!m.has("company.export"),b=G({queryKey:U.org(h),queryFn:a(()=>ze.org(h),"queryFn"),enabled:!!h&&s===void 0}),{data:T,isLoading:z}=b,k=Ee(b),{data:ue}=G({queryKey:U.agents.list(h),queryFn:a(()=>ze.list(h),"queryFn"),enabled:!!h&&o===void 0}),O=s??T,re=o??ue,R=es(h),B=ts(h),ee=(0,i.useMemo)(()=>new Set(R.data?.starredAgentIds??[]),[R.data?.starredAgentIds]),Y=(0,i.useMemo)(()=>{const e=new Map;for(const r of re??[])e.set(r.id,r);return e},[re]);(0,i.useEffect)(()=>{c||w([{label:"Org Chart"}])},[c,w]);const[de,ae]=(0,i.useState)(q),M=f&&de,_=G({queryKey:[...U.liveRuns(h),"org-chart-tasks"],queryFn:a(()=>mt.liveRunsForCompany(h,{limit:100}),"queryFn"),enabled:!!(h&&M),refetchInterval:M?15e3:!1}),P=(0,i.useMemo)(()=>[...new Set((_.data??[]).filter(e=>e.status==="running"&&e.issueId).map(e=>e.issueId))].sort(),[_.data]),ye=G({queryKey:["org-chart-task-titles",h,P],queryFn:a(async()=>{const e=[];for(let r=0;r<P.length;r+=50)e.push(...await gs.summaries(h,P.slice(r,r+50)));return e},"queryFn"),enabled:!!(h&&M&&P.length)}),L=Ee(_),we=Ee(ye),Z=(0,i.useMemo)(()=>M?zs(_.data??[],ye.data??[],new Set(Y.keys())):[],[M,q,O,_.data,ye.data,Y]),[C]=(0,i.useState)(()=>{const e=getComputedStyle(document.documentElement),r=a(p=>parseFloat(e.getPropertyValue(`--org-${p}`))||0,"value");return{leaderWidth:r("leader-width"),leaderHeight:r("leader-height"),managerWidth:r("manager-width"),managerHeight:r("manager-height"),memberWidth:r("member-width"),memberHeight:r("member-height"),gap:r("gap"),levelGap:r("level-gap"),padding:r("padding"),sparsePadding:r("sparse-padding"),fitZoomMax:r("fit-zoom-max"),sparseFitZoomMax:r("sparse-fit-zoom-max"),taskHeight:r("task-height"),taskBandHeight:r("task-band-height"),taskLabelWidth:r("task-label-width"),taskLegendHeight:r("task-legend-height"),toolbarClearance:r("toolbar-clearance")}}),$=(0,i.useRef)(null),he=(0,i.useId)(),[oe,ke]=(0,i.useState)(0),te=(0,i.useRef)(null),[ge,je]=(0,i.useState)(c?C.toolbarClearance:0);(0,i.useEffect)(()=>{const e=u?.closest(".agents-org-toolbar");if(!e)return;const r=a(()=>je(e.offsetHeight),"measure");r();const p=typeof ResizeObserver>"u"?null:new ResizeObserver(r);return p?.observe(e),()=>p?.disconnect()},[u]);const Q=ge+(f?C.taskBandHeight:0),[S,Me]=(0,i.useState)({width:800,height:600});(0,i.useEffect)(()=>{const e=$.current;if(!e)return;const r=a(()=>Me(y=>{const E=e.clientWidth,I=e.clientHeight;return E===y.width&&I===y.height?y:{width:E,height:I}}),"measure");r();const p=typeof ResizeObserver>"u"?null:new ResizeObserver(r);return p?.observe(e),window.addEventListener("resize",r),()=>{p?.disconnect(),window.removeEventListener("resize",r)}},[O]);const me=(0,i.useMemo)(()=>Is(O??[],{width:S.width,height:Math.max(0,S.height-Q)},C),[O,S,C,Q]),ie=me.roots,K=(0,i.useMemo)(()=>$s(ie),[ie]),ve=(0,i.useMemo)(()=>new Map(K.map(e=>[e.id,e])),[K]),Re=(0,i.useMemo)(()=>Ts(ie,C.gap),[ie,C.gap]),be=(0,i.useMemo)(()=>({width:me.width,height:me.height,maxFitZoom:me.maxFitZoom}),[me]),[x,W]=(0,i.useState)({x:0,y:0}),[v,fe]=(0,i.useState)(1),[l,N]=(0,i.useState)(!1),F=(0,i.useRef)({x:0,y:0,panX:0,panY:0}),A=(0,i.useRef)({mode:null,startPoint:{x:0,y:0},startPan:{x:0,y:0},startZoom:1,startDistance:0,startCenter:{x:0,y:0},moved:!1}),le=(0,i.useRef)(!1),se=(0,i.useRef)(null);(0,i.useEffect)(()=>()=>{se.current!==null&&window.clearTimeout(se.current)},[]);const Pe=(0,i.useRef)(!1);(0,i.useEffect)(()=>{Pe.current=!1},[O,S,Q]),(0,i.useEffect)(()=>{if(Pe.current||K.length===0||!$.current)return;const e=$.current,r=tt(e.clientWidth,e.clientHeight,be,Q);r&&(Pe.current=!0,fe(r.zoom),W(r.pan))},[K,be,Q]);const wt=(0,i.useCallback)(e=>{e.button===0&&(e.target.closest("[data-org-card], button, a")||(N(!0),F.current={x:e.clientX,y:e.clientY,panX:x.x,panY:x.y}))},[x]),jt=(0,i.useCallback)(e=>{if(!l)return;const r=e.clientX-F.current.x,p=e.clientY-F.current.y;W({x:F.current.panX+r,y:F.current.panY+p})},[l]),Ye=(0,i.useCallback)(()=>{N(!1)},[]),Ct=(0,i.useCallback)(e=>{e.preventDefault();const r=$.current;if(!r)return;const p=r.getBoundingClientRect(),y=e.clientX-p.left,E=e.clientY-p.top,I=e.deltaY<0?1.1:.9,X=Ie(v*I),ce=X/v;W({x:y-ce*(y-x.x),y:E-ce*(E-x.y)}),fe(X)},[v,x]),Le=(0,i.useCallback)((e,r)=>{const p=Ie(e),y=p/v;W({x:r.x-y*(r.x-x.x),y:r.y-y*(r.y-x.y)}),fe(p)},[v,x]),Ke=(0,i.useCallback)(()=>{if(!$.current)return;const e=tt($.current.clientWidth,$.current.clientHeight,be,Q);e&&(fe(e.zoom),W(e.pan))},[be,Q]),kt=(0,i.useCallback)(e=>{if(e.touches.length>=2&&$.current){const[p,y]=[e.touches[0],e.touches[1]];A.current={mode:"pinch",startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:st(p,y),startCenter:nt(p,y,$.current),moved:!1};return}const r=e.touches[0];r&&(A.current={mode:"pan",startPoint:_s(r),startPan:x,startZoom:v,startDistance:0,startCenter:{x:0,y:0},moved:!1})},[x,v]),Mt=(0,i.useCallback)(e=>{const r=$.current;if(!r||!A.current.mode)return;if(e.touches.length>=2){const[I,X]=[e.touches[0],e.touches[1]],ce=st(I,X),xe=nt(I,X,r);if(A.current.mode!=="pinch"||A.current.startDistance===0){A.current={mode:"pinch",startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:ce,startCenter:xe,moved:!1};return}const D=A.current,V=Ie(D.startZoom*(ce/D.startDistance)),Qe=V/D.startZoom,St=xe.x-D.startCenter.x,At=xe.y-D.startCenter.y;D.moved=D.moved||Math.abs(ce-D.startDistance)>He||Math.hypot(St,At)>He,fe(V),W({x:xe.x-Qe*(D.startCenter.x-D.startPan.x),y:xe.y-Qe*(D.startCenter.y-D.startPan.y)});return}const p=e.touches[0];if(!p||A.current.mode!=="pan")return;const y=p.clientX-A.current.startPoint.x,E=p.clientY-A.current.startPoint.y;A.current.moved=A.current.moved||Math.hypot(y,E)>He,W({x:A.current.startPan.x+y,y:A.current.startPan.y+E})},[x,v]),We=(0,i.useCallback)(()=>{A.current.moved&&(le.current=!0,se.current!==null&&window.clearTimeout(se.current),se.current=window.setTimeout(()=>{le.current=!1,se.current=null},400)),A.current={mode:null,startPoint:{x:0,y:0},startPan:x,startZoom:v,startDistance:0,startCenter:{x:0,y:0},moved:!1}},[x,v]),$e=(0,i.useMemo)(()=>({zoomIn:a(()=>Le(v*1.2,{x:S.width/2,y:S.height/2}),"zoomIn"),zoomOut:a(()=>Le(v*.8,{x:S.width/2,y:S.height/2}),"zoomOut"),fit:Ke}),[Le,v,S,Ke]);(0,i.useImperativeHandle)(d,()=>$e,[$e]);const Ve=(0,t.jsx)(ft,{...$e,children:f&&(0,t.jsxs)(J,{variant:M?"secondary":"outline",size:"sm","aria-pressed":M,onClick:a(()=>ae(e=>!e),"onClick"),children:[(0,t.jsx)(Ut,{className:"size-4"}),"Tasks"]})}),pe=Math.min(C.taskLabelWidth,Math.max(0,S.width-C.padding*2)),Ce=C.gap/2,Ge=Z.length*(pe+Ce)-Ce,_e=Math.max(C.padding,(S.width-Ge)/2),Nt=ge+C.taskLegendHeight,Fe=(0,i.useMemo)(()=>{const e=[];return Z.forEach((r,p)=>{const y=_e+p*(pe+Ce)-oe;y+pe<0||y>S.width||r.agentIds.forEach((E,I)=>{const X=ve.get(E);X&&e.push({key:`${r.id}-${E}`,node:X,x:y+pe*(I+1)/(r.agentIds.length+1)})})}),e},[Z,_e,pe,Ce,oe,S.width,ve]);return h?s===void 0&&(z||k.kind==="reconnecting")?(0,t.jsx)(ht,{variant:"org-chart"}):s===void 0&&k.kind==="error"?(0,t.jsx)(Ae,{size:"page",error:k.error,action:"load the org chart",onRetry:k.retry,retrying:k.isFetching}):O&&O.length===0?(0,t.jsx)(Te,{icon:Be,message:"No organizational hierarchy defined."}):(0,t.jsxs)("div",{className:c?"org-chart-shell flex min-h-0 flex-1 flex-col":"flex h-(--sz-calc-38) min-h-(--sz-420px) flex-col md:h-full md:min-h-0",children:[d?null:u?(0,Es.createPortal)(Ve,u):c?null:(0,t.jsx)("div",{className:"mb-2 flex justify-end",children:Ve}),!c&&(j||H)?(0,t.jsxs)("div",{className:"mb-2 flex shrink-0 flex-wrap items-center justify-start gap-2",children:[j?(0,t.jsx)(Se,{to:"/company/import",children:(0,t.jsxs)(J,{variant:"outline",size:"sm",children:[(0,t.jsx)(ps,{className:"mr-1.5 h-3.5 w-3.5"}),"Import organization"]})}):null,H?(0,t.jsx)(Se,{to:"/company/export",children:(0,t.jsxs)(J,{variant:"outline",size:"sm",children:[(0,t.jsx)(xs,{className:"mr-1.5 h-3.5 w-3.5"}),"Export organization"]})}):null]}):null,(0,t.jsxs)("div",{ref:$,"data-testid":"org-chart-viewport",className:"org-chart-canvas w-full flex-1 min-h-0 overflow-hidden relative",style:{cursor:l?"grabbing":"grab",touchAction:"none",overscrollBehavior:"contain"},onMouseDown:wt,onMouseMove:jt,onMouseUp:Ye,onMouseLeave:Ye,onWheel:Ct,onTouchStart:kt,onTouchMove:Mt,onTouchEnd:We,onTouchCancel:We,children:[(0,t.jsx)("svg",{className:"absolute inset-0 pointer-events-none",style:{width:"100%",height:"100%"},children:(0,t.jsx)("g",{transform:`translate(${x.x}, ${x.y}) scale(${v})`,children:Re.map(({parent:e,child:r,path:p})=>(0,t.jsx)("path",{d:p,fill:"none",className:"org-reporting-edge","data-filter-match":n?n.has(e.id)&&n.has(r.id):void 0},`${e.id}-${r.id}`))})}),(0,t.jsx)("div",{"data-testid":"org-chart-card-layer",className:"org-chart-cards absolute inset-0",style:{transform:`translate(${x.x}px, ${x.y}px) scale(${v})`,transformOrigin:"0 0"},children:K.map(e=>{const r=Y.get(e.id),p=r?qt(r):void 0,y=Vt(r),E=(Rs.get(y)??y.split("/").pop()??y).replace(/^(?:Claude|Codex)\s+/i,""),I=r?Lt({adapterConfig:r.adapterConfig},r.adapterType).effort:null,X=(r?.status??e.status).replace(/_/g," "),ce=X==="active"?"Idle":X.charAt(0).toUpperCase()+X.slice(1),xe=B.isPending&&B.variables?.resourceId===e.id,D=a(()=>g(r?at(r):`/agents/${e.id}`),"openAgent");return(0,t.jsxs)(Ft,{"data-org-card":!0,"data-leader":e.leader,"data-tier":e.tier,"data-depth":e.depth,"data-filter-match":n?n.has(e.id):void 0,interactive:!0,role:"link",tabIndex:0,"aria-label":`Open ${e.name} overview`,className:"org-chart-agent-card absolute gap-0 select-none",onKeyDown:a(V=>{V.key==="Enter"&&V.target===V.currentTarget&&D()},"onKeyDown"),style:{left:e.x,top:e.y,width:e.width,height:e.height},onClick:D,onClickCapture:a(V=>{le.current&&(le.current=!1,V.preventDefault(),V.stopPropagation())},"onClickCapture"),children:[e.leader&&(0,t.jsx)("div",{className:"org-card-badge-slot","aria-hidden":!0}),(0,t.jsxs)("div",{className:"org-card-heading min-w-0 text-left",children:[e.leader&&(0,t.jsx)(Yt,{size:"button",className:"org-card-star",starred:ee.has(e.id),resourceName:e.name,pending:xe,error:B.isError&&B.variables?.resourceId===e.id,onToggle:a(V=>B.mutate({resourceType:"agent",resourceId:e.id,resourceName:e.name,starred:V}),"onToggle")}),(0,t.jsx)("div",{className:"org-card-name truncate font-medium text-foreground",title:e.name,children:e.name}),(0,t.jsx)("div",{className:"org-card-title line-clamp-2 text-muted-foreground",title:r?.title||rt(e.role),children:r?.title||rt(e.role)}),e.leader&&(0,t.jsx)("div",{className:"org-card-status truncate text-muted-foreground",children:ce})]}),(0,t.jsx)("div",{className:"org-card-character flex min-h-0 items-center justify-center",children:e.leader?(0,t.jsx)(as,{agent:r??{id:e.id,name:e.name},size:256,state:"idle",trackingScope:"page",followCursor:!0,animationGroup:"org-chart",className:"org-card-live-character"}):(0,t.jsx)(ut,{agent:r??{id:e.id,name:e.name},size:128,pose:"rest",view:"portrait",className:"org-card-avatar"})}),p&&(E||I)&&(0,t.jsxs)("div",{className:"org-card-model min-w-0",children:[E&&(0,t.jsxs)("span",{className:"org-card-model-label",title:y,children:[(0,t.jsx)("span",{className:"org-card-model-mark",children:(0,t.jsx)(Rt,{type:p,className:"size-4 shrink-0"})}),(0,t.jsx)("span",{className:"org-card-model-name",children:E})]}),E&&I&&" ",I&&(0,t.jsx)("span",{className:"org-card-effort text-muted-foreground",title:I,children:Xt[I]??I})]})]},e.id)})}),M&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("svg",{className:"org-task-overlay absolute inset-0 size-full pointer-events-none","aria-hidden":!0,children:[(0,t.jsx)("defs",{children:(0,t.jsxs)("mask",{id:he,children:[(0,t.jsx)("rect",{width:"100%",height:"100%",className:"org-task-mask-open"}),K.map(e=>(0,t.jsx)("rect",{className:"org-task-mask-card",x:x.x+e.x*v,y:x.y+e.y*v,width:e.width*v,height:e.height*v},e.id))]})}),(0,t.jsx)("g",{mask:`url(#${he})`,children:Fe.map((e,r)=>{const p=x.x+(e.node.x-C.gap*(.25+(r+1)/(Fe.length+1)*.5))*v,y=Q+C.padding*v*(r+1)/(Fe.length+1),E=x.x+e.node.x*v,I=x.y+(e.node.y+e.node.height/2)*v;return(0,t.jsx)("path",{className:"org-task-edge",d:`M ${e.x} ${Nt+C.taskHeight} V ${y} H ${p} V ${I} H ${E}`,fill:"none"},e.key)})})]}),(0,t.jsxs)("div",{className:"org-task-band absolute inset-x-0",style:{top:ge},children:[(0,t.jsx)("div",{className:"org-task-legend text-xs text-muted-foreground",role:"status",children:L.kind==="error"?(0,t.jsx)(Ae,{size:"inline",error:L.error,action:"load running tasks",onRetry:L.retry}):we.kind==="error"&&P.length?(0,t.jsx)(Ae,{size:"inline",error:we.error,action:"load task titles",onRetry:we.retry}):L.kind==="stale"?"Task updates paused while reconnecting…":_.isPending||L.kind==="reconnecting"?"Loading running tasks…":Z.length?`${Z.length} running ${Z.length===1?"task":"tasks"}${(_.data?.length??0)>=100?" · showing first 100 runs":""}`:"No running tasks"}),(0,t.jsx)("div",{className:"org-task-strip",onScroll:a(e=>ke(e.currentTarget.scrollLeft),"onScroll"),onWheel:a(e=>e.stopPropagation(),"onWheel"),onMouseDown:a(e=>e.stopPropagation(),"onMouseDown"),onTouchStart:a(e=>{e.stopPropagation(),te.current=e.touches[0]?.clientX??null},"onTouchStart"),onTouchMove:a(e=>{e.stopPropagation();const r=e.touches[0]?.clientX;te.current!==null&&r!==void 0&&(e.currentTarget.scrollLeft+=te.current-r),te.current=r??null},"onTouchMove"),onTouchEnd:a(e=>{e.stopPropagation(),te.current=null},"onTouchEnd"),onTouchCancel:a(e=>{e.stopPropagation(),te.current=null},"onTouchCancel"),children:(0,t.jsx)("div",{className:"relative h-full",style:{width:Math.max(S.width,Ge+C.padding*2)},children:Z.map((e,r)=>{const p={"data-org-task":!0,title:`${e.identifier??"Task"} · ${e.title} · Working: ${e.agentIds.map(y=>Y.get(y)?.name??"Agent").join(", ")}`,className:"org-task-label absolute flex items-center gap-1.5 rounded px-2 text-xs text-muted-foreground no-underline hover:text-foreground focus-visible:ring-2 focus-visible:ring-ring",style:{left:_e+r*(pe+Ce),width:pe,height:C.taskHeight},children:(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(Kt,{className:"size-3 shrink-0"}),(0,t.jsx)("span",{className:"truncate",children:e.title})]})};return(0,t.jsx)(Se,{to:`/issues/${e.identifier??e.id}`,...p},e.id)})})})]})]})]})]}):(0,t.jsx)(Te,{icon:Be,message:"Select an organization to view the org chart."})}a(Fs,"OrgChart");var Ds=lt;function rt(s){return Ds[s]??s}a(rt,"roleLabel");function qs({query:s,onQueryChange:o,view:n,onViewChange:c,hideViewToggle:u,onNewAgent:d,filters:f,orgControlsRef:h,orgActions:w}){return(0,t.jsx)("div",{"data-canonical-toolbar":"agents",role:"toolbar","aria-label":"Agents controls",className:"flex flex-wrap items-center gap-3",children:(0,t.jsxs)("div",{className:"design-toolbar-controls flex w-full flex-wrap items-center gap-4",children:[(0,t.jsx)(Tt,{query:s,onQueryChange:o,label:"Search agents",placeholder:"Search agents…"}),!u&&(0,t.jsxs)("div",{className:"design-view-toggle",role:"group","aria-label":"Agent view",children:[(0,t.jsx)(J,{type:"button",size:"icon-sm",variant:n==="list"?"secondary":"ghost",className:"design-toolbar-icon",onClick:a(()=>c("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":n==="list",children:(0,t.jsx)(js,{"aria-hidden":!0})}),(0,t.jsx)(J,{type:"button",size:"icon-sm",variant:n==="org"?"secondary":"ghost",className:"design-toolbar-icon",onClick:a(()=>c("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":n==="org",children:(0,t.jsx)(Be,{"aria-hidden":!0})})]}),f,(0,t.jsxs)("div",{className:"design-toolbar-actions",children:[w&&(0,t.jsx)("div",{ref:h,"data-org-toolbar-controls":!0,className:"agents-org-controls-reveal","data-visible":n==="org","aria-hidden":n!=="org",inert:n!=="org",children:(0,t.jsx)("div",{className:"min-w-0 overflow-hidden",children:(0,t.jsx)(ft,{...w})})}),(0,t.jsxs)(J,{size:"sm",variant:"outline","data-toolbar-primary":!0,onClick:d,children:[(0,t.jsx)(gt,{"aria-hidden":!0}),"New Agent"]})]})]})})}a(qs,"AgentsToolbar");var xt=lt,Hs=(0,i.lazy)(()=>vs(()=>import("./ConfigureBuiltInAgentModal-DgeD7t_i.js").then(s=>s.n).then(s=>({default:s.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3])));function Bs(s){return ss.includes(s)}a(Bs,"isFilterTab");var yt={label:"Local",detail:"Microvac host",title:"Local - Microvac host"},Os={label:"—",detail:"Loading environment",title:"Loading environment"},Xe=new Set(["terminated","pending_approval"]);function vt(s,o){return o==="all"?!0:o==="active"?s==="active"||s==="running"||s==="idle":o==="paused"?s==="paused":o==="error"?s==="error":!0}a(vt,"matchesFilter");function Zs(s,o){const n=o.trim().toLocaleLowerCase().split(/\s+/).filter(Boolean),c=[s.name,s.role,xt[s.role],s.title].filter(Boolean).join(" ").toLocaleLowerCase();return n.every(u=>c.includes(u))}a(Zs,"matchesSearch");function Xs(s,o,n,c=""){return s.filter(u=>Xe.has(u.status)||!Zs(u,c)?!1:o==="builtin"?n.has(u.id):vt(u.status,o)).sort((u,d)=>u.name.localeCompare(d.name))}a(Xs,"filterAgents");function Ys(s){return s==="ssh"?"SSH":s.charAt(0).toUpperCase()+s.slice(1)}a(Ys,"formatEnvironmentDriver");function Ks(s,o){const n=typeof s.config.provider=="string"?s.config.provider.trim():"";return n?o?.sandboxProviders?.[n]?.displayName??n:"Sandbox"}a(Ks,"getSandboxProviderLabel");function Ws(s,o){const n=Wt(s)?"Managed by Microvac":s.driver==="sandbox"?`${Ks(s,o)} sandbox provider`:s.driver==="local"?"Microvac host":Ys(s.driver);return{label:s.name,detail:n,title:`${s.name} - ${n}`}}a(Ws,"describeEnvironment");function Vs(s){return{label:"Unknown environment",detail:s.slice(0,8),title:`Unknown environment - ${s}`}}a(Vs,"describeMissingEnvironment");function Gs(s,o,n,c){const u=s.defaultEnvironmentId??n;if(!u)return yt;const d=o.get(u);return d?Ws(d,c):Vs(u)}a(Gs,"resolveAgentEnvironment");function bt(s,o,n,c){return s.reduce((u,d)=>{const f=bt(d.reports,o,n,c);return Xe.has(d.status)?(u.push(...f),u):(((o==="builtin"?n.has(d.id):vt(d.status,o))&&(!c||c.has(d.id))||f.length>0)&&u.push({...d,reports:f}),u)},[]).sort((u,d)=>u.name.localeCompare(d.name))}a(bt,"filterOrgTree");function rn({initialView:s="list"}={}){const o=$t(),[n,c]=(0,i.useState)(""),u=(0,i.useRef)(null),d=(0,i.useMemo)(()=>({zoomIn:a(()=>u.current?.zoomIn(),"zoomIn"),zoomOut:a(()=>u.current?.zoomOut(),"zoomOut"),fit:a(()=>u.current?.fit(),"fit")}),[]),[f,h]=(0,i.useState)(null),w=Dt(),{selectedCompanyId:g}=ot(),{openNewAgent:q}=_t(),{setBreadcrumbs:ne}=ct(),m=it(),j=dt(),{isMobile:H}=Ht(),{enabled:b}=fs(),T=j.pathname.split("/").pop()??"all",z=Bs(T)?T:"all",k=!1,[ue,O]=(0,i.useState)(()=>b?s:"org"),re=!b&&H,R=re?"list":ue;(0,i.useEffect)(()=>{O(b?s:"org")},[s,b,k]);const{data:B}=G({queryKey:U.instance.settings,queryFn:a(()=>Ot.get(),"queryFn"),enabled:!!g}),ee=B?.experimental.enableBuiltInAgents===!0,Y="all",{data:de}=G({queryKey:U.builtInAgents.list(g),queryFn:a(()=>ns.list(g),"queryFn"),enabled:!!g&&ee}),ae=(0,i.useMemo)(()=>{const l=new Map;if(!ee)return l;for(const N of de??[])N.agentId&&l.set(N.agentId,N);return l},[de,ee]),M=(0,i.useMemo)(()=>new Set(ae.keys()),[ae]),[_,P]=(0,i.useState)(null),ye=G({queryKey:U.agents.list(g),queryFn:a(()=>ze.list(g),"queryFn"),enabled:!!g}),{data:L,isLoading:we}=ye,Z=Ms(g,L),C=Ee(ye),{data:$}=G({queryKey:U.org(g),queryFn:a(()=>ze.org(g),"queryFn"),enabled:!!g&&R==="org"}),he=B?.experimental.enableEnvironments===!0,{data:oe}=G({queryKey:U.environments.list(g),queryFn:a(()=>Je.list(g),"queryFn"),enabled:!!g&&he}),{data:ke}=G({queryKey:U.environments.capabilities(g),queryFn:a(()=>Je.capabilities(g),"queryFn"),enabled:!!g&&he}),te=[...U.liveRuns(g),"agents-page"],ge=hs({companyId:g,resourceKey:"live-runs:agents-page",queryKey:te,enabled:!!g,refetchInterval:15e3,leaderOnly:!0}),{data:je,dataUpdatedAt:Q}=G({queryKey:te,queryFn:a(()=>mt.liveRunsForCompany(g),"queryFn"),enabled:ge.enabled,refetchInterval:ge.refetchInterval});Pt(ge,je,Q);const S=(0,i.useMemo)(()=>{const l=new Map;for(const N of je??[]){if(N.status!=="running"&&N.status!=="queued")continue;const F=l.get(N.agentId);if(F){F.liveCount+=1;continue}l.set(N.agentId,{runId:N.id,liveCount:1})}return l},[je]),Me=(0,i.useMemo)(()=>{const l=new Map;for(const N of oe??[])l.set(N.id,N);return l},[oe]),me=(0,i.useMemo)(()=>{const l=new Map;for(const N of L??[])l.set(N.id,Gs(N,Me,B?.defaultEnvironmentId??null,ke));return l},[L,Me,ke,B?.defaultEnvironmentId]);(0,i.useEffect)(()=>{ne([{label:"Agents"}])},[ne]),(0,i.useEffect)(()=>{z!=="all"&&m("/agents/all",{replace:!0})},[m,z]);const ie=(0,i.useMemo)(()=>(L??[]).filter(l=>!Xe.has(l.status)),[L]),K=(0,i.useMemo)(()=>Xs(ie,Y,M,n).filter(Z.matches),[ie,Y,M,n,Z.matches]),ve=(0,i.useMemo)(()=>bt($??[],"all",M),[$,M]),Re=(0,i.useMemo)(()=>new Set(K.map(l=>l.id)),[K]);if(!g)return(0,t.jsx)(Te,{icon:et,message:"Select an organization to view agents."});if(we||C.kind==="reconnecting")return(0,t.jsx)(ht,{variant:"list"});if(C.kind==="error")return(0,t.jsx)(Ae,{size:"page",error:C.error,action:"load agents",onRetry:C.retry,retrying:C.isFetching});const be=he&&oe===void 0,x=he&&(oe===void 0||oe.length>1),W=a(l=>be?Os:me.get(l)??yt,"resolveRenderedEnvironment"),v=a(l=>{const N=l.orgChainHealth?.status==="invalid_org_chain",F=ae.get(l.id),A=F?.status==="needs_setup"||F?.status==="pending_approval",le=F&&A?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ds,{status:F.status}),F.status==="needs_setup"&&(0,t.jsx)("span",{onClick:a(se=>{se.preventDefault(),se.stopPropagation()},"onClick"),children:(0,t.jsx)(J,{size:"xs",variant:"outline",onClick:a(()=>P(F),"onClick"),children:"Set up"})})]}):null;return(0,t.jsxs)("div",{className:"agent-pin-row agent-roster-pin-row group/agent-pin relative",children:[(0,t.jsx)(As,{title:l.name,titleAccessory:(0,t.jsx)(ls,{agentId:l.id,companyId:l.companyId}),titleClassName:"agent-pin-text flex-1",titleTextClassName:"truncate",subtitleClassName:"truncate",subtitle:`${xt[l.role]??l.role}${l.title?` - ${l.title}`:""}`,to:at(l),className:"agent-roster-identity group py-3 group-hover/agent-pin:bg-accent/50 group-focus-within/agent-pin:bg-accent/50",leading:N?(0,t.jsx)(cs,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(ut,{agent:l,size:32}),secondaryRowClassName:De("pl-11",!le&&!x&&!l.lastHeartbeatAt&&"sm:hidden"),secondaryRow:(l.status==="paused"||le||x||l.lastHeartbeatAt)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[le,x&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",title:W(l.id).title,children:[W(l.id).label," · ",W(l.id).detail]}),l.lastHeartbeatAt&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",title:"Last heartbeat",children:us(l.lastHeartbeatAt)})]})}),(0,t.jsx)(Gt,{agent:l,pins:o})]},l.id)},"renderAgentRow"),fe=a(l=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[S.has(l.id)&&(0,t.jsx)(Qs,{agentRef:Ue(l),runId:S.get(l.id).runId,liveCount:S.get(l.id).liveCount}),(0,t.jsx)(It,{status:l.status})]}),"renderAgentStatus");return(0,t.jsxs)("div",{className:De("agents-surface flex flex-col gap-4 @container",R==="org"&&"agents-org-surface h-full min-h-0"),children:[(0,t.jsx)("div",{className:R==="org"?"agents-org-toolbar":void 0,children:(0,t.jsx)(qs,{orgActions:ve.length?d:void 0,orgControlsRef:h,query:n,onQueryChange:c,view:R,onViewChange:O,hideViewToggle:re,onNewAgent:q,filters:(0,t.jsx)(Ss,{...Z,count:K.length,compact:!0})})}),(0,t.jsxs)("div",{className:De("min-h-0 space-y-4",R==="org"&&"agents-org-content flex flex-1 flex-col"),children:[L&&L.length===0&&(0,t.jsx)(Te,{icon:et,message:"Create your first agent to get started.",action:"New Agent",onAction:q}),R==="list"&&L&&L.length>0&&(0,t.jsx)(Ns,{companyId:g,agents:ie,visibleAgents:K,renderAgent:v,renderStatus:fe,renderChat:w.enabled?l=>(0,t.jsx)(Bt,{skipDelayDuration:0,children:(0,t.jsxs)(ws,{children:[(0,t.jsx)(Cs,{asChild:!0,children:(0,t.jsxs)("button",{type:"button",className:"inline-flex shrink-0 items-center gap-1.5 rounded-md px-2 py-1 text-xs font-medium text-muted-foreground opacity-0 transition-opacity hover:bg-accent hover:text-foreground group-hover/agent-row:opacity-100 focus-visible:opacity-100 pointer-coarse:opacity-100","aria-label":`Chat with ${l.name}`,onClick:a(()=>m(`/chats/${Ue(l)}`),"onClick"),children:[(0,t.jsx)(bs,{className:"size-3.5","aria-hidden":!0}),"Chat"]})}),(0,t.jsx)(ks,{children:"chat with this agent"})]})}):void 0},g),R==="org"&&ve.length>0&&(0,t.jsx)(Fs,{embedded:!0,actionsRef:u,controlsContainer:f,orgTree:ve,agents:L??[],matchingAgentIds:n.trim()||Z.activeCount?Re:void 0}),R==="org"&&$&&$.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),_&&g&&(0,t.jsx)(i.Suspense,{fallback:null,children:(0,t.jsx)(Hs,{companyId:g,state:_,open:_!==null,onOpenChange:a(l=>{l||P(null)},"onOpenChange")})})]})]})}a(rn,"Agents");function Qs({agentRef:s,runId:o,liveCount:n}){return(0,t.jsxs)(Se,{to:`/agents/${s}/runs/${o}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:a(c=>c.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",n>1?` (${n})`:""]})]})}a(Qs,"LiveRunIndicator");export{rn as Agents};
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConfigureBuiltInAgentModal-BwW7XQ1O.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-Bt31d8ga.js","assets/index-z7lcCz2I.css"])))=>i.map(i=>d[i]);
2
- var Ae=Object.defineProperty;var r=(e,n)=>Ae(e,"name",{value:n,configurable:!0});import{a as ae}from"./rolldown-runtime-DhZMWcEn.js";import{v as D}from"./collections-BxrcELwt.js";import{$A as Ie,Ao as Ce,Bw as Ee,Dy as Se,FE as K,GS as v,Gb as ie,IE as le,Id as te,Iy as _e,Kv as Le,LS as ke,NE as O,Qu as Me,RT as se,Yb as qe,ab as Fe,as as Re,ck as Te,gb as Be,hC as oe,iD as ce,ib as Pe,is as ue,jb as de,jo as $e,nE as De,nj as Ke,on as ne,pb as Oe,qC as ze,qd as He,rS as Qe,rb as re,sE as Ue,ub as Ve,vw as Ge,xE as b,zE as $}from"./index-Bt31d8ga.js";import{n as Ye,r as Je,t as We}from"./AgentRosterFilters-b7qMLv8-.js";import{t as Xe}from"./EntityRow-gpsOgEtu.js";var d=ae(Ke(),1),t=ae(Ie(),1),me=Te,Ze=(0,d.lazy)(()=>Ue(()=>import("./ConfigureBuiltInAgentModal-BwW7XQ1O.js").then(e=>e.n).then(e=>({default:e.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3]))),et=["all","active","paused","error","builtin"];function tt(e){return et.includes(e)}r(tt,"isFilterTab");var H={label:"Local",detail:"Microvac host",title:"Local - Microvac host"},ge={label:"—",detail:"Loading environment",title:"Loading environment"},pe=new Set(["terminated","pending_approval"]);function xe(e,n){return n==="all"?!0:n==="active"?e==="active"||e==="running"||e==="idle":n==="paused"?e==="paused":n==="error"?e==="error":!0}r(xe,"matchesFilter");function st(e,n,a){return e.filter(i=>pe.has(i.status)?!1:n==="builtin"?a.has(i.id):xe(i.status,n)).sort((i,l)=>i.name.localeCompare(l.name))}r(st,"filterAgents");function nt(e){const n=e.adapterConfig?.model;if(typeof n!="string")return null;const a=n.trim();return a.length>0?a:null}r(nt,"getConfiguredModel");function rt(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}r(rt,"formatEnvironmentDriver");function at(e,n){const a=typeof e.config.provider=="string"?e.config.provider.trim():"";return a?n?.sandboxProviders?.[a]?.displayName??a:"Sandbox"}r(at,"getSandboxProviderLabel");function it(e,n){const a=Me(e)?"Managed by Microvac":e.driver==="sandbox"?`${at(e,n)} sandbox provider`:e.driver==="local"?"Microvac host":rt(e.driver);return{label:e.name,detail:a,title:`${e.name} - ${a}`}}r(it,"describeEnvironment");function lt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}r(lt,"describeMissingEnvironment");function ot(e,n,a,i){const l=e.defaultEnvironmentId??a;if(!l)return H;const u=n.get(l);return u?it(u,i):lt(l)}r(ot,"resolveAgentEnvironment");function fe(e,n,a,i){return e.reduce((l,u)=>{const p=fe(u.reports,n,a,i);return pe.has(u.status)?(l.push(...p),l):(((n==="builtin"?a.has(u.id):xe(u.status,n))&&(!i||i.has(u.id))||p.length>0)&&l.push({...u,reports:p}),l)},[]).sort((l,u)=>l.name.localeCompare(u.name))}r(fe,"filterOrgTree");function ft(){const{selectedCompanyId:e}=ke(),{openNewAgent:n}=Se(),{setBreadcrumbs:a}=Pe(),i=qe(),l=De(),{isMobile:u}=_e(),p=l.pathname.split("/").pop()??"all",y=tt(p)?p:"all",[I,c]=(0,d.useState)("org"),x=u,m=x?"list":I,{data:j}=b({queryKey:v.instance.settings,queryFn:r(()=>Le.get(),"queryFn"),enabled:!!e}),f=j?.experimental.enableBuiltInAgents===!0,Q="all",{data:U}=b({queryKey:v.builtInAgents.list(e),queryFn:r(()=>Re.list(e),"queryFn"),enabled:!!e&&f}),C=(0,d.useMemo)(()=>{const s=new Map;if(!f)return s;for(const o of U??[])o.agentId&&s.set(o.agentId,o);return s},[U,f]),V=(0,d.useMemo)(()=>new Set(C.keys()),[C]),[L,k]=(0,d.useState)(null),G=b({queryKey:v.agents.list(e),queryFn:r(()=>re.list(e),"queryFn"),enabled:!!e}),{data:g,isLoading:ve}=G,M=Ye(e,g),w=Ve(G),{data:N}=b({queryKey:v.org(e),queryFn:r(()=>re.org(e),"queryFn"),enabled:!!e&&m==="org"}),E=j?.experimental.enableEnvironments===!0,{data:A}=b({queryKey:v.environments.list(e),queryFn:r(()=>te.list(e),"queryFn"),enabled:!!e&&E}),{data:Y}=b({queryKey:v.environments.capabilities(e),queryFn:r(()=>te.capabilities(e),"queryFn"),enabled:!!e&&E}),J=[...v.liveRuns(e),"agents-page"],q=$e({companyId:e,resourceKey:"live-runs:agents-page",queryKey:J,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:F,dataUpdatedAt:be}=b({queryKey:J,queryFn:r(()=>Qe.liveRunsForCompany(e),"queryFn"),enabled:q.enabled,refetchInterval:q.refetchInterval});Ce(q,F,be);const S=(0,d.useMemo)(()=>{const s=new Map;for(const o of F??[]){if(o.status!=="running"&&o.status!=="queued")continue;const h=s.get(o.agentId);if(h){h.liveCount+=1;continue}s.set(o.agentId,{runId:o.id,liveCount:1})}return s},[F]),je=(0,d.useMemo)(()=>{const s=new Map;for(const o of g??[])s.set(o.id,o);return s},[g]),W=(0,d.useMemo)(()=>{const s=new Map;for(const o of A??[])s.set(o.id,o);return s},[A]),X=(0,d.useMemo)(()=>{const s=new Map;for(const o of g??[])s.set(o.id,ot(o,W,j?.defaultEnvironmentId??null,Y));return s},[g,W,Y,j?.defaultEnvironmentId]);if((0,d.useEffect)(()=>{a([{label:"Agents"}])},[a]),(0,d.useEffect)(()=>{y!=="all"&&i("/agents/all",{replace:!0})},[i,y]),!e)return(0,t.jsx)(ne,{icon:se,message:"Select a company to view agents."});if(ve||w.kind==="reconnecting")return(0,t.jsx)(Oe,{variant:"list"});if(w.kind==="error")return(0,t.jsx)(Fe,{size:"page",error:w.error,action:"load agents",onRetry:w.retry,retrying:w.isFetching});const R=st(g??[],Q,V).filter(M.matches),T=fe(N??[],Q,V,M.activeCount?new Set(R.map(s=>s.id)):void 0),Z=E&&A===void 0,_=E&&(A===void 0||A.length>1),B=r(s=>Z?ge:X.get(s)??H,"resolveRenderedEnvironment"),ye=r(s=>{const o=s.orgChainHealth?.status==="invalid_org_chain",h=C.get(s.id),Ne=h?.status==="needs_setup"||h?.status==="pending_approval",P=h&&Ne?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ue,{status:h.status}),h.status==="needs_setup"&&(0,t.jsx)("span",{onClick:r(ee=>{ee.preventDefault(),ee.stopPropagation()},"onClick"),children:(0,t.jsx)(O,{size:"xs",variant:"outline",onClick:r(()=>k(h),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(Xe,{title:s.name,titleAccessory:(0,t.jsx)(Be,{agentId:s.id,companyId:s.companyId}),titleClassName:"flex-1",titleTextClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitleClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitle:`${me[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:le(s),className:"agent-roster-identity group py-3",leading:o?(0,t.jsx)(oe,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(de,{agent:s,size:32}),secondaryRowClassName:$("pl-11",!P&&!_&&!s.lastHeartbeatAt&&"sm:hidden"),secondaryRow:(s.status==="paused"||P||_||s.lastHeartbeatAt)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[P,_&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",title:B(s.id).title,children:[B(s.id).label," · ",B(s.id).detail]}),s.lastHeartbeatAt&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",title:"Last heartbeat",children:ce(s.lastHeartbeatAt)})]})},s.id)},"renderAgentRow"),we=r(s=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[S.has(s.id)&&(0,t.jsx)(z,{agentRef:K(s),runId:S.get(s.id).runId,liveCount:S.get(s.id).liveCount}),(0,t.jsx)(D,{status:s.status})]}),"renderAgentStatus");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!x&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:$("p-1.5 transition-colors",m==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:r(()=>c("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":m==="list",children:(0,t.jsx)(Ge,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:$("p-1.5 transition-colors",m==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:r(()=>c("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":m==="org",children:(0,t.jsx)(Ee,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(O,{size:"sm",variant:"outline",onClick:n,children:[(0,t.jsx)(ze,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})}),(0,t.jsx)(We,{...M,count:R.length}),g&&g.length===0&&(0,t.jsx)(ne,{icon:se,message:"Create your first agent to get started.",action:"New Agent",onAction:n}),m==="list"&&g&&g.length>0&&(0,t.jsx)(Je,{companyId:e,agents:g,visibleAgents:R,renderAgent:ye,renderStatus:we},e),m==="org"&&T.length>0&&(0,t.jsx)("div",{className:"py-1",children:T.map(s=>(0,t.jsx)(he,{node:s,depth:0,agentMap:je,liveRunByAgent:S,environmentByAgentId:X,environmentDataLoading:Z,showEnvironment:_,builtInByAgentId:C,onConfigureBuiltIn:k},s.id))}),m==="org"&&N&&N.length>0&&T.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected filters."}),m==="org"&&N&&N.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),L&&e&&(0,t.jsx)(d.Suspense,{fallback:null,children:(0,t.jsx)(Ze,{companyId:e,state:L,open:L!==null,onOpenChange:r(s=>{s||k(null)},"onOpenChange")})})]})}r(ft,"Agents");function he({node:e,depth:n,agentMap:a,liveRunByAgent:i,environmentByAgentId:l,environmentDataLoading:u,showEnvironment:p,builtInByAgentId:y,onConfigureBuiltIn:I}){const c=a.get(e.id),x=y.get(e.id),m=x?.status==="needs_setup"||x?.status==="pending_approval",j=!!(c&&c.orgChainHealth?.status==="invalid_org_chain");return(0,t.jsxs)("div",{style:{paddingLeft:n*24},children:[(0,t.jsxs)(ie,{to:c?le(c):`/agents/${e.id}`,className:"group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-accent/50 transition-colors w-full text-left no-underline text-inherit",children:[j?(0,t.jsx)(oe,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(de,{agent:c??e,size:24}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"min-w-(--sz-7rem) truncate",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[me[e.role]??e.role,c?.title?` - ${c.title}`:""]})]}),x&&m&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(ue,{status:x.status}),x.status==="needs_setup"&&(0,t.jsx)("span",{onClick:r(f=>{f.preventDefault(),f.stopPropagation()},"onClick"),children:(0,t.jsx)(O,{size:"xs",variant:"outline",onClick:r(()=>I(x),"onClick"),children:"Set up"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,t.jsx)("span",{className:"sm:hidden",children:i.has(e.id)?(0,t.jsx)(z,{agentRef:c?K(c):e.id,runId:i.get(e.id).runId,liveCount:i.get(e.id).liveCount}):(0,t.jsx)(D,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[i.has(e.id)&&(0,t.jsx)(z,{agentRef:c?K(c):e.id,runId:i.get(e.id).runId,liveCount:i.get(e.id).liveCount}),c&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(ct,{agent:c,environment:u?ge:l.get(c.id)??H,showEnvironment:p})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:e.status})})]})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(f=>(0,t.jsx)(he,{node:f,depth:n+1,agentMap:a,liveRunByAgent:i,environmentByAgentId:l,environmentDataLoading:u,showEnvironment:p,builtInByAgentId:y,onConfigureBuiltIn:I},f.id))})]})}r(he,"OrgTreeNode");function ct({agent:e,environment:n,showEnvironment:a}){const i=nt(e),l=He(e.adapterType);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate font-mono text-xs text-muted-foreground",title:i??void 0,children:i??"—"}),(0,t.jsx)("div",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground/70",title:l,children:l})]}),a&&(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",title:n.title,children:n.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:n.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?ce(e.lastHeartbeatAt):"—"})]})}r(ct,"AgentMetaColumns");function z({agentRef:e,runId:n,liveCount:a}){return(0,t.jsxs)(ie,{to:`/agents/${e}/runs/${n}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:r(i=>i.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",a>1?` (${a})`:""]})]})}r(z,"LiveRunIndicator");export{ft as Agents};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/ConfigureBuiltInAgentModal-DgeD7t_i.js","assets/rolldown-runtime-DhZMWcEn.js","assets/index-BJtnP7H1.js","assets/index-z7lcCz2I.css"])))=>i.map(i=>d[i]);
2
+ var Ae=Object.defineProperty;var r=(e,n)=>Ae(e,"name",{value:n,configurable:!0});import{a as ae}from"./rolldown-runtime-DhZMWcEn.js";import{v as D}from"./collections-B58p51lw.js";import{$A as Ie,Ao as Ce,Bw as Ee,Dy as Se,FE as K,GS as v,Gb as ie,IE as le,Id as te,Iy as _e,Kv as Le,LS as ke,NE as O,Qu as Me,RT as se,Yb as qe,ab as Fe,as as Re,ck as Te,gb as Be,hC as oe,iD as ce,ib as Pe,is as ue,jb as de,jo as $e,nE as De,nj as Ke,on as ne,pb as Oe,qC as ze,qd as He,rS as Qe,rb as re,sE as Ue,ub as Ve,vw as Ge,xE as b,zE as $}from"./index-BJtnP7H1.js";import{n as Ye,r as Je,t as We}from"./AgentRosterFilters-GQ2bdXfW.js";import{t as Xe}from"./EntityRow-BsICt6pd.js";var d=ae(Ke(),1),t=ae(Ie(),1),me=Te,Ze=(0,d.lazy)(()=>Ue(()=>import("./ConfigureBuiltInAgentModal-DgeD7t_i.js").then(e=>e.n).then(e=>({default:e.ConfigureBuiltInAgentModal})),__vite__mapDeps([0,1,2,3]))),et=["all","active","paused","error","builtin"];function tt(e){return et.includes(e)}r(tt,"isFilterTab");var H={label:"Local",detail:"Microvac host",title:"Local - Microvac host"},ge={label:"—",detail:"Loading environment",title:"Loading environment"},pe=new Set(["terminated","pending_approval"]);function xe(e,n){return n==="all"?!0:n==="active"?e==="active"||e==="running"||e==="idle":n==="paused"?e==="paused":n==="error"?e==="error":!0}r(xe,"matchesFilter");function st(e,n,a){return e.filter(i=>pe.has(i.status)?!1:n==="builtin"?a.has(i.id):xe(i.status,n)).sort((i,l)=>i.name.localeCompare(l.name))}r(st,"filterAgents");function nt(e){const n=e.adapterConfig?.model;if(typeof n!="string")return null;const a=n.trim();return a.length>0?a:null}r(nt,"getConfiguredModel");function rt(e){return e==="ssh"?"SSH":e.charAt(0).toUpperCase()+e.slice(1)}r(rt,"formatEnvironmentDriver");function at(e,n){const a=typeof e.config.provider=="string"?e.config.provider.trim():"";return a?n?.sandboxProviders?.[a]?.displayName??a:"Sandbox"}r(at,"getSandboxProviderLabel");function it(e,n){const a=Me(e)?"Managed by Microvac":e.driver==="sandbox"?`${at(e,n)} sandbox provider`:e.driver==="local"?"Microvac host":rt(e.driver);return{label:e.name,detail:a,title:`${e.name} - ${a}`}}r(it,"describeEnvironment");function lt(e){return{label:"Unknown environment",detail:e.slice(0,8),title:`Unknown environment - ${e}`}}r(lt,"describeMissingEnvironment");function ot(e,n,a,i){const l=e.defaultEnvironmentId??a;if(!l)return H;const u=n.get(l);return u?it(u,i):lt(l)}r(ot,"resolveAgentEnvironment");function fe(e,n,a,i){return e.reduce((l,u)=>{const p=fe(u.reports,n,a,i);return pe.has(u.status)?(l.push(...p),l):(((n==="builtin"?a.has(u.id):xe(u.status,n))&&(!i||i.has(u.id))||p.length>0)&&l.push({...u,reports:p}),l)},[]).sort((l,u)=>l.name.localeCompare(u.name))}r(fe,"filterOrgTree");function ft(){const{selectedCompanyId:e}=ke(),{openNewAgent:n}=Se(),{setBreadcrumbs:a}=Pe(),i=qe(),l=De(),{isMobile:u}=_e(),p=l.pathname.split("/").pop()??"all",y=tt(p)?p:"all",[I,c]=(0,d.useState)("org"),x=u,m=x?"list":I,{data:j}=b({queryKey:v.instance.settings,queryFn:r(()=>Le.get(),"queryFn"),enabled:!!e}),f=j?.experimental.enableBuiltInAgents===!0,Q="all",{data:U}=b({queryKey:v.builtInAgents.list(e),queryFn:r(()=>Re.list(e),"queryFn"),enabled:!!e&&f}),C=(0,d.useMemo)(()=>{const s=new Map;if(!f)return s;for(const o of U??[])o.agentId&&s.set(o.agentId,o);return s},[U,f]),V=(0,d.useMemo)(()=>new Set(C.keys()),[C]),[L,k]=(0,d.useState)(null),G=b({queryKey:v.agents.list(e),queryFn:r(()=>re.list(e),"queryFn"),enabled:!!e}),{data:g,isLoading:ve}=G,M=Ye(e,g),w=Ve(G),{data:N}=b({queryKey:v.org(e),queryFn:r(()=>re.org(e),"queryFn"),enabled:!!e&&m==="org"}),E=j?.experimental.enableEnvironments===!0,{data:A}=b({queryKey:v.environments.list(e),queryFn:r(()=>te.list(e),"queryFn"),enabled:!!e&&E}),{data:Y}=b({queryKey:v.environments.capabilities(e),queryFn:r(()=>te.capabilities(e),"queryFn"),enabled:!!e&&E}),J=[...v.liveRuns(e),"agents-page"],q=$e({companyId:e,resourceKey:"live-runs:agents-page",queryKey:J,enabled:!!e,refetchInterval:15e3,leaderOnly:!0}),{data:F,dataUpdatedAt:be}=b({queryKey:J,queryFn:r(()=>Qe.liveRunsForCompany(e),"queryFn"),enabled:q.enabled,refetchInterval:q.refetchInterval});Ce(q,F,be);const S=(0,d.useMemo)(()=>{const s=new Map;for(const o of F??[]){if(o.status!=="running"&&o.status!=="queued")continue;const h=s.get(o.agentId);if(h){h.liveCount+=1;continue}s.set(o.agentId,{runId:o.id,liveCount:1})}return s},[F]),je=(0,d.useMemo)(()=>{const s=new Map;for(const o of g??[])s.set(o.id,o);return s},[g]),W=(0,d.useMemo)(()=>{const s=new Map;for(const o of A??[])s.set(o.id,o);return s},[A]),X=(0,d.useMemo)(()=>{const s=new Map;for(const o of g??[])s.set(o.id,ot(o,W,j?.defaultEnvironmentId??null,Y));return s},[g,W,Y,j?.defaultEnvironmentId]);if((0,d.useEffect)(()=>{a([{label:"Agents"}])},[a]),(0,d.useEffect)(()=>{y!=="all"&&i("/agents/all",{replace:!0})},[i,y]),!e)return(0,t.jsx)(ne,{icon:se,message:"Select a company to view agents."});if(ve||w.kind==="reconnecting")return(0,t.jsx)(Oe,{variant:"list"});if(w.kind==="error")return(0,t.jsx)(Fe,{size:"page",error:w.error,action:"load agents",onRetry:w.retry,retrying:w.isFetching});const R=st(g??[],Q,V).filter(M.matches),T=fe(N??[],Q,V,M.activeCount?new Set(R.map(s=>s.id)):void 0),Z=E&&A===void 0,_=E&&(A===void 0||A.length>1),B=r(s=>Z?ge:X.get(s)??H,"resolveRenderedEnvironment"),ye=r(s=>{const o=s.orgChainHealth?.status==="invalid_org_chain",h=C.get(s.id),Ne=h?.status==="needs_setup"||h?.status==="pending_approval",P=h&&Ne?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ue,{status:h.status}),h.status==="needs_setup"&&(0,t.jsx)("span",{onClick:r(ee=>{ee.preventDefault(),ee.stopPropagation()},"onClick"),children:(0,t.jsx)(O,{size:"xs",variant:"outline",onClick:r(()=>k(h),"onClick"),children:"Set up"})})]}):null;return(0,t.jsx)(Xe,{title:s.name,titleAccessory:(0,t.jsx)(Be,{agentId:s.id,companyId:s.companyId}),titleClassName:"flex-1",titleTextClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitleClassName:"whitespace-normal break-words xl:truncate xl:whitespace-nowrap",subtitle:`${me[s.role]??s.role}${s.title?` - ${s.title}`:""}`,to:le(s),className:"agent-roster-identity group py-3",leading:o?(0,t.jsx)(oe,{className:"h-3.5 w-3.5 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(de,{agent:s,size:32}),secondaryRowClassName:$("pl-11",!P&&!_&&!s.lastHeartbeatAt&&"sm:hidden"),secondaryRow:(s.status==="paused"||P||_||s.lastHeartbeatAt)&&(0,t.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[P,_&&(0,t.jsxs)("span",{className:"text-xs text-muted-foreground",title:B(s.id).title,children:[B(s.id).label," · ",B(s.id).detail]}),s.lastHeartbeatAt&&(0,t.jsx)("span",{className:"text-xs text-muted-foreground",title:"Last heartbeat",children:ce(s.lastHeartbeatAt)})]})},s.id)},"renderAgentRow"),we=r(s=>(0,t.jsxs)("div",{className:"flex items-center gap-3",children:[S.has(s.id)&&(0,t.jsx)(z,{agentRef:K(s),runId:S.get(s.id).runId,liveCount:S.get(s.id).liveCount}),(0,t.jsx)(D,{status:s.status})]}),"renderAgentStatus");return(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsx)("div",{className:"flex justify-end",children:(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[!x&&(0,t.jsxs)("div",{className:"flex items-center border border-border",role:"group","aria-label":"View mode",children:[(0,t.jsx)("button",{className:$("p-1.5 transition-colors",m==="list"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:r(()=>c("list"),"onClick"),title:"List view","aria-label":"List view","aria-pressed":m==="list",children:(0,t.jsx)(Ge,{className:"h-3.5 w-3.5"})}),(0,t.jsx)("button",{className:$("p-1.5 transition-colors",m==="org"?"bg-accent text-foreground":"text-muted-foreground hover:bg-accent/50"),onClick:r(()=>c("org"),"onClick"),title:"Org chart view","aria-label":"Org chart view","aria-pressed":m==="org",children:(0,t.jsx)(Ee,{className:"h-3.5 w-3.5"})})]}),(0,t.jsxs)(O,{size:"sm",variant:"outline",onClick:n,children:[(0,t.jsx)(ze,{className:"h-3.5 w-3.5 mr-1.5"}),"New Agent"]})]})}),(0,t.jsx)(We,{...M,count:R.length}),g&&g.length===0&&(0,t.jsx)(ne,{icon:se,message:"Create your first agent to get started.",action:"New Agent",onAction:n}),m==="list"&&g&&g.length>0&&(0,t.jsx)(Je,{companyId:e,agents:g,visibleAgents:R,renderAgent:ye,renderStatus:we},e),m==="org"&&T.length>0&&(0,t.jsx)("div",{className:"py-1",children:T.map(s=>(0,t.jsx)(he,{node:s,depth:0,agentMap:je,liveRunByAgent:S,environmentByAgentId:X,environmentDataLoading:Z,showEnvironment:_,builtInByAgentId:C,onConfigureBuiltIn:k},s.id))}),m==="org"&&N&&N.length>0&&T.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No agents match the selected filters."}),m==="org"&&N&&N.length===0&&(0,t.jsx)("p",{className:"text-sm text-muted-foreground text-center py-8",children:"No organizational hierarchy defined."}),L&&e&&(0,t.jsx)(d.Suspense,{fallback:null,children:(0,t.jsx)(Ze,{companyId:e,state:L,open:L!==null,onOpenChange:r(s=>{s||k(null)},"onOpenChange")})})]})}r(ft,"Agents");function he({node:e,depth:n,agentMap:a,liveRunByAgent:i,environmentByAgentId:l,environmentDataLoading:u,showEnvironment:p,builtInByAgentId:y,onConfigureBuiltIn:I}){const c=a.get(e.id),x=y.get(e.id),m=x?.status==="needs_setup"||x?.status==="pending_approval",j=!!(c&&c.orgChainHealth?.status==="invalid_org_chain");return(0,t.jsxs)("div",{style:{paddingLeft:n*24},children:[(0,t.jsxs)(ie,{to:c?le(c):`/agents/${e.id}`,className:"group flex items-center gap-3 rounded-lg px-3 py-2 hover:bg-accent/50 transition-colors w-full text-left no-underline text-inherit",children:[j?(0,t.jsx)(oe,{className:"h-3.5 w-3.5 shrink-0 text-amber-500","aria-label":"Invalid reporting chain"}):(0,t.jsx)(de,{agent:c??e,size:24}),(0,t.jsxs)("div",{className:"flex-1 min-w-0 flex flex-wrap items-center gap-2",children:[(0,t.jsxs)("div",{className:"min-w-(--sz-7rem) truncate",children:[(0,t.jsx)("span",{className:"text-sm font-medium",children:e.name}),(0,t.jsxs)("span",{className:"text-xs text-muted-foreground ml-2",children:[me[e.role]??e.role,c?.title?` - ${c.title}`:""]})]}),x&&m&&(0,t.jsxs)("div",{className:"flex items-center gap-1.5 shrink-0",children:[(0,t.jsx)(ue,{status:x.status}),x.status==="needs_setup"&&(0,t.jsx)("span",{onClick:r(f=>{f.preventDefault(),f.stopPropagation()},"onClick"),children:(0,t.jsx)(O,{size:"xs",variant:"outline",onClick:r(()=>I(x),"onClick"),children:"Set up"})})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-3 shrink-0",children:[(0,t.jsx)("span",{className:"sm:hidden",children:i.has(e.id)?(0,t.jsx)(z,{agentRef:c?K(c):e.id,runId:i.get(e.id).runId,liveCount:i.get(e.id).liveCount}):(0,t.jsx)(D,{status:e.status})}),(0,t.jsxs)("div",{className:"hidden sm:flex items-center gap-3",children:[i.has(e.id)&&(0,t.jsx)(z,{agentRef:c?K(c):e.id,runId:i.get(e.id).runId,liveCount:i.get(e.id).liveCount}),c&&(0,t.jsx)("div",{className:"hidden xl:flex items-center gap-3",children:(0,t.jsx)(ct,{agent:c,environment:u?ge:l.get(c.id)??H,showEnvironment:p})}),(0,t.jsx)("span",{className:"w-20 flex justify-end",children:(0,t.jsx)(D,{status:e.status})})]})]})]}),e.reports&&e.reports.length>0&&(0,t.jsx)("div",{className:"border-l border-border ml-4",children:e.reports.map(f=>(0,t.jsx)(he,{node:f,depth:n+1,agentMap:a,liveRunByAgent:i,environmentByAgentId:l,environmentDataLoading:u,showEnvironment:p,builtInByAgentId:y,onConfigureBuiltIn:I},f.id))})]})}r(he,"OrgTreeNode");function ct({agent:e,environment:n,showEnvironment:a}){const i=nt(e),l=He(e.adapterType);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate font-mono text-xs text-muted-foreground",title:i??void 0,children:i??"—"}),(0,t.jsx)("div",{className:"truncate font-mono text-(length:--text-micro) text-muted-foreground/70",title:l,children:l})]}),a&&(0,t.jsxs)("div",{className:"w-44 min-w-0 leading-tight",children:[(0,t.jsx)("div",{className:"truncate text-xs text-muted-foreground",title:n.title,children:n.label}),(0,t.jsx)("div",{className:"truncate text-(length:--text-micro) text-muted-foreground/70",children:n.detail})]}),(0,t.jsx)("span",{className:"w-24 whitespace-nowrap text-right text-xs text-muted-foreground",children:e.lastHeartbeatAt?ce(e.lastHeartbeatAt):"—"})]})}r(ct,"AgentMetaColumns");function z({agentRef:e,runId:n,liveCount:a}){return(0,t.jsxs)(ie,{to:`/agents/${e}/runs/${n}`,className:"flex items-center gap-1.5 px-2 py-0.5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors no-underline",onClick:r(i=>i.stopPropagation(),"onClick"),children:[(0,t.jsxs)("span",{className:"relative flex h-2 w-2",children:[(0,t.jsx)("span",{className:"animate-pulse absolute inline-flex h-full w-full rounded-full bg-blue-400 opacity-75"}),(0,t.jsx)("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-blue-500"})]}),(0,t.jsxs)("span",{className:"text-(length:--text-micro) font-medium text-blue-600 dark:text-blue-400",children:["Live",a>1?` (${a})`:""]})]})}r(z,"LiveRunIndicator");export{ft as Agents};
@@ -1 +1 @@
1
- var y=Object.defineProperty;var g=(n,o)=>y(n,"name",{value:o,configurable:!0});import{a as x}from"./rolldown-runtime-DhZMWcEn.js";import{$A as _,Gp as j,Kp as R,T_ as z,ly as C,nj as A,zE as E}from"./index-Bt31d8ga.js";var c=x(A(),1),h=x(_(),1);function B({children:n,className:o,...v}){const[u,b]=(0,c.useState)(null),l=(0,c.useRef)(null),d=z();return(0,c.useLayoutEffect)(()=>{const e=u,r=l.current;if(!e||!r||typeof ResizeObserver>"u")return;let i,t;const m=new ResizeObserver(()=>{const p=getComputedStyle(e),s=r.getBoundingClientRect().height+parseFloat(p.borderTopWidth)+parseFloat(p.borderBottomWidth);if(s===i)return;const f=t?.playState==="running"?e.getBoundingClientRect().height:i;if(t?.cancel(),i=s,f===void 0||d||typeof e.animate!="function")return;const a=j("--motion-ease-out-expo");t=e.animate([{height:`${f}px`},{height:`${s}px`}],{duration:R("--onboarding-motion-step"),easing:Array.isArray(a)?`cubic-bezier(${a.join(",")})`:a})});return m.observe(r),()=>{m.disconnect(),t?.cancel()}},[u,d]),(0,h.jsx)(C,{...v,ref:b,className:E("overflow-hidden p-0",o),children:(0,h.jsx)("div",{ref:l,className:"flex max-h-(--sz-calc-18) shrink-0 flex-col",children:n})})}g(B,"AnimatedDialogContent");export{B as t};
1
+ var y=Object.defineProperty;var g=(n,o)=>y(n,"name",{value:o,configurable:!0});import{a as x}from"./rolldown-runtime-DhZMWcEn.js";import{$A as _,Gp as j,Kp as R,T_ as z,ly as C,nj as A,zE as E}from"./index-BJtnP7H1.js";var c=x(A(),1),h=x(_(),1);function B({children:n,className:o,...v}){const[u,b]=(0,c.useState)(null),l=(0,c.useRef)(null),d=z();return(0,c.useLayoutEffect)(()=>{const e=u,r=l.current;if(!e||!r||typeof ResizeObserver>"u")return;let i,t;const m=new ResizeObserver(()=>{const p=getComputedStyle(e),s=r.getBoundingClientRect().height+parseFloat(p.borderTopWidth)+parseFloat(p.borderBottomWidth);if(s===i)return;const f=t?.playState==="running"?e.getBoundingClientRect().height:i;if(t?.cancel(),i=s,f===void 0||d||typeof e.animate!="function")return;const a=j("--motion-ease-out-expo");t=e.animate([{height:`${f}px`},{height:`${s}px`}],{duration:R("--onboarding-motion-step"),easing:Array.isArray(a)?`cubic-bezier(${a.join(",")})`:a})});return m.observe(r),()=>{m.disconnect(),t?.cancel()}},[u,d]),(0,h.jsx)(C,{...v,ref:b,className:E("overflow-hidden p-0",o),children:(0,h.jsx)("div",{ref:l,className:"flex max-h-(--sz-calc-18) shrink-0 flex-col",children:n})})}g(B,"AnimatedDialogContent");export{B as t};