@microvac/ui 0.0.0-stage → 0.1.0-rc.14

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 (609) hide show
  1. package/README.md +29 -2
  2. package/dist/android-chrome-192x192.png +0 -0
  3. package/dist/android-chrome-512x512.png +0 -0
  4. package/dist/announcement-preview.svg +11 -0
  5. package/dist/apple-touch-icon.png +0 -0
  6. package/dist/assets/ActiveAgentsPanel-C9AP9hJu.js +1 -0
  7. package/dist/assets/AdapterManager-CmxTUKJH.js +1 -0
  8. package/dist/assets/AdvancedToolsRoute-CXsQnTei.js +39 -0
  9. package/dist/assets/AgentActionButtons-DWq2OuVK.js +1 -0
  10. package/dist/assets/AgentAdvancedTab-dhBDxF-H.js +131 -0
  11. package/dist/assets/AgentBulkSettingsSheet-DYT4ovDg.js +1 -0
  12. package/dist/assets/AgentChat-r0TPOfPK.js +1 -0
  13. package/dist/assets/AgentDetailPage-Bc_okBuS.js +39 -0
  14. package/dist/assets/AgentIdentityChip-CB2NBXkZ.js +1 -0
  15. package/dist/assets/AgentRosterFilters-b7qMLv8-.js +2 -0
  16. package/dist/assets/Agents-BsvXy3pZ.js +2 -0
  17. package/dist/assets/Agents.production-BeOZmzaF.js +2 -0
  18. package/dist/assets/AnimatedDialogContent-CWshmxP2.js +1 -0
  19. package/dist/assets/AppDetail-DbqENTF_.js +1 -0
  20. package/dist/assets/AppNotConnected-BhnCqL0F.js +1 -0
  21. package/dist/assets/ApprovalDetail-B2KiYLTj.js +1 -0
  22. package/dist/assets/Approvals-j-wRmqKj.js +1 -0
  23. package/dist/assets/AppsConnect-CcPVEZ0C.js +1 -0
  24. package/dist/assets/AppsReview-B8eWvKkS.js +1 -0
  25. package/dist/assets/ArtifactEmptyGraphic-5mdkS5jj.js +1 -0
  26. package/dist/assets/Artifacts-Bz7Oo6VX.js +1 -0
  27. package/dist/assets/AssigneePickerInner-DdpF7hck.js +1 -0
  28. package/dist/assets/AssistantConnection-BpaaJDc_.js +1 -0
  29. package/dist/assets/AttentionInlineVerbs-DlPQVCO-.js +1 -0
  30. package/dist/assets/AttentionQueueRow-BC6ezctS.js +1 -0
  31. package/dist/assets/AuditHub-BVP7LKL9.js +1 -0
  32. package/dist/assets/AuditRuns-DqizHgX1.js +1 -0
  33. package/dist/assets/Auth-DOF0snjp.js +3 -0
  34. package/dist/assets/BoardChat-BYAbDtfd.js +18 -0
  35. package/dist/assets/BoardClaim-7y41Pr8e.js +1 -0
  36. package/dist/assets/BootstrapSetupUxLab-BftH1vOv.js +1 -0
  37. package/dist/assets/Browse-Ck01W1Yl.js +1 -0
  38. package/dist/assets/BudgetPolicyCard-CKhrzfgy.js +1 -0
  39. package/dist/assets/CaseDetail-qlXKJ66D.js +1 -0
  40. package/dist/assets/CaseStatus-B3RiZVDH.js +1 -0
  41. package/dist/assets/Cases-CFV3V-5X.js +1 -0
  42. package/dist/assets/ChatEndpointDetail-7Hi5TJNt.js +5 -0
  43. package/dist/assets/ChatEndpointSetup-CtwgH6sg.js +1 -0
  44. package/dist/assets/ChatIdentityConfirm-CXjksBwX.js +1 -0
  45. package/dist/assets/CliAuth-KVjrGMfZ.js +1 -0
  46. package/dist/assets/Companies-oeJem3De.js +1 -0
  47. package/dist/assets/CompanyAccess-vWT6G-n_.js +1 -0
  48. package/dist/assets/CompanyActivity-zOzzeN1B.js +1 -0
  49. package/dist/assets/CompanyActivity.production-DbaFBsM0.js +1 -0
  50. package/dist/assets/CompanyConnections-llSEaVa2.js +1 -0
  51. package/dist/assets/CompanyEnvironments-BrP-ENHg.css +1 -0
  52. package/dist/assets/CompanyEnvironments-DNyyGC_S.js +35 -0
  53. package/dist/assets/CompanyExport-CFa-F8Es.js +4 -0
  54. package/dist/assets/CompanyImport-DG6qwQ8F.js +1 -0
  55. package/dist/assets/CompanySettings-Dv5Z3ZQi.js +1 -0
  56. package/dist/assets/CompanySettingsPluginPage-CZk1d_0d.js +1 -0
  57. package/dist/assets/CompanySkills-CdzWhJfQ.js +10 -0
  58. package/dist/assets/CompanySkills.production-IoCRW5FQ.js +10 -0
  59. package/dist/assets/ConfigureBuiltInAgentModal-BwW7XQ1O.js +1 -0
  60. package/dist/assets/CopyableGatewayUrl-PTn061ft.js +1 -0
  61. package/dist/assets/CordisPluginSettings-C_BeeGEc.js +1 -0
  62. package/dist/assets/Costs-DhuNxwSj.js +1 -0
  63. package/dist/assets/CrossIssueCollaborationUxLab-ZaAXq46r.js +1 -0
  64. package/dist/assets/Dashboard-BaDnqiKo.js +2 -0
  65. package/dist/assets/DashboardLive-D-Ed7osd.js +1 -0
  66. package/dist/assets/DecisionDateChips-D3pl_mLn.js +1 -0
  67. package/dist/assets/DecisionHistoryPanel-D5MzyrOh.js +1 -0
  68. package/dist/assets/DecisionQueuePage-D3UZ9oRk.js +1 -0
  69. package/dist/assets/DesignGuide-COTo7ICj.js +25 -0
  70. package/dist/assets/DesignSandboxTaskThread-CMeCSQid.js +28 -0
  71. package/dist/assets/EmailConnectionAccess-kCL7obSr.js +1 -0
  72. package/dist/assets/EmailEndpointSetup-BGrksR_u.js +1 -0
  73. package/dist/assets/EnforcementBanner-_Eb_nK3M.js +1 -0
  74. package/dist/assets/EntityRow-gpsOgEtu.js +1 -0
  75. package/dist/assets/ExecutionWorkspaceDetail-DwGkH6d3.js +19 -0
  76. package/dist/assets/ExternalAgentInviteDialog-CGid6pM9.js +50 -0
  77. package/dist/assets/FilterBar-1D-VhrvG.js +1 -0
  78. package/dist/assets/FolderControls-CQ6kef3c.js +1 -0
  79. package/dist/assets/GatewayDetail-CCqekM1J.js +2 -0
  80. package/dist/assets/GatewaysList-nFsRcszh.js +1 -0
  81. package/dist/assets/GitHubConnectionRecovery-B9sFWJup.js +1 -0
  82. package/dist/assets/GoalDetail-BQ8y55P-.js +1 -0
  83. package/dist/assets/GoalTree-laRjXp0P.js +1 -0
  84. package/dist/assets/Goals-Cm14EaeP.js +1 -0
  85. package/dist/assets/InstanceAccess-DxQ-Akt_.js +1 -0
  86. package/dist/assets/InstanceExperimentalSettings-BxwqbXNw.js +1 -0
  87. package/dist/assets/InviteLanding-Cf0L_u6s.js +1 -0
  88. package/dist/assets/IssueChatLongThreadPerf-BfsF6FdF.js +2 -0
  89. package/dist/assets/JoinRequestQueue-BXCdTFG_.js +1 -0
  90. package/dist/assets/Layout.production-CqzU0qMi.js +1 -0
  91. package/dist/assets/McpConnect-COWnZ9Eb.js +1 -0
  92. package/dist/assets/MembershipAction-C9i9Sdmi.js +1 -0
  93. package/dist/assets/MetricCard-Bwnt3_p3.js +1 -0
  94. package/dist/assets/MissingPluginTabPlaceholder-B0Zxv1Kx.js +1 -0
  95. package/dist/assets/NewAgent-BIlJ5Dyt.js +1 -0
  96. package/dist/assets/NewAgentDialog-CJdMxxYL.js +1 -0
  97. package/dist/assets/NewGoalDialog-B8izfKLm.js +1 -0
  98. package/dist/assets/NewProjectDialog-DXqjTYFK.js +1 -0
  99. package/dist/assets/OnboardingPrimitives-DHYBqn_0.js +1 -0
  100. package/dist/assets/OnboardingWizard-DqSfZ13V.js +2 -0
  101. package/dist/assets/OrgChart.production-DrSFUf7i.js +1 -0
  102. package/dist/assets/PaperclipCloudOAuthHandoff-jPUvjJ8q.js +1 -0
  103. package/dist/assets/PluginManager-h3LFPaUq.js +1 -0
  104. package/dist/assets/PluginPage-E5Im4454.js +1 -0
  105. package/dist/assets/PluginSettings-BBO0jAgo.js +1 -0
  106. package/dist/assets/ProfileDetailRoute-CQBD7fms.js +1 -0
  107. package/dist/assets/ProfileSettings-BwnVEHLp.js +1 -0
  108. package/dist/assets/ProfileWizardRoute-By_SC6Gn.js +1 -0
  109. package/dist/assets/ProjectDetail-CbiwFBAE.js +1 -0
  110. package/dist/assets/ProjectRepositoryInput-DZF9bX4E.js +1 -0
  111. package/dist/assets/ProjectWorkspaceDetail-DPsl_4bD.js +29 -0
  112. package/dist/assets/ProjectWorkspacesContent-COH4dOWK.js +1 -0
  113. package/dist/assets/Projects-Ch9Qu7sn.js +1 -0
  114. package/dist/assets/QuotaBar-DIFOT9Uh.js +1 -0
  115. package/dist/assets/RepositoryEditor-DHB1bqId.js +1 -0
  116. package/dist/assets/Responsibilities-C5O0JXXG.js +4 -0
  117. package/dist/assets/ResponsibilityDetail-D6NpZpkm.js +1 -0
  118. package/dist/assets/ResponsibleUserDenialUxLab-CFrIWYwe.js +1 -0
  119. package/dist/assets/ReviewQueueCard-BPC4Lm67.js +1 -0
  120. package/dist/assets/RoutineAuditActivity-sKyzMajz.js +1 -0
  121. package/dist/assets/RoutineDetail-CG8HF5fp.js +2 -0
  122. package/dist/assets/RoutineRunVariablesDialog-CKh3CmLD.js +1 -0
  123. package/dist/assets/Routines-tF2qfUKo.js +1 -0
  124. package/dist/assets/Routines.production-BTyj1Ljr.js +1 -0
  125. package/dist/assets/RoutinesToolbar-CvUFVCGN.js +1 -0
  126. package/dist/assets/Search-Z9D0NuS1.js +1 -0
  127. package/dist/assets/Secrets-DgmbLOJK.js +4 -0
  128. package/dist/assets/SkillBinaryFile-F3_9qcaM.js +1 -0
  129. package/dist/assets/SkillCardIcon-CXHUCMej.js +2 -0
  130. package/dist/assets/SkillFolderTree-CB3lrTIE.js +1 -0
  131. package/dist/assets/SkillSourceTree-BbuciCo6.js +2 -0
  132. package/dist/assets/SkillSources-Dlo6Cew3.js +2 -0
  133. package/dist/assets/SkillStudio-ZO-Nf7eI.js +9 -0
  134. package/dist/assets/SkillsNavigationTabs-B9Iqnlqt.js +1 -0
  135. package/dist/assets/SpekoPhoneCallback-C4VnMiZh.js +1 -0
  136. package/dist/assets/SpekoProviderSetup-I4evPZb3.js +1 -0
  137. package/dist/assets/StatusCards-D0MVzbsw.js +1 -0
  138. package/dist/assets/SummarySlotCard-DUXgZPxG.js +1 -0
  139. package/dist/assets/TailscaleConnector-CMhT73gj.js +1 -0
  140. package/dist/assets/TaskChatLab-D9-KAE-7.js +11 -0
  141. package/dist/assets/TaskSummaryList-CUxieFNe.js +1 -0
  142. package/dist/assets/Timeline-BNMoRbtK.js +1 -0
  143. package/dist/assets/ToolsAdminGate-CEr0zy2T.js +1 -0
  144. package/dist/assets/TrustPresetSection-B9YXZtkh.js +1 -0
  145. package/dist/assets/UserProfile-D-tnW96X.js +1 -0
  146. package/dist/assets/WebhookUrlWarning-Ba_DixKh.js +1 -0
  147. package/dist/assets/WhatNeedsMe-B-Jzj8_M.js +1 -0
  148. package/dist/assets/Workspaces-BqhDI_Bl.js +1 -0
  149. package/dist/assets/abnfDiagram-YUKMZFIV-Bn9P-nUW.js +1 -0
  150. package/dist/assets/apl-MHzTCvfx.js +1 -0
  151. package/dist/assets/arc-Dnq9Aszq.js +1 -0
  152. package/dist/assets/architecture-WOLXFQ4H-V1ldsZlt.js +1 -0
  153. package/dist/assets/architectureDiagram-47P4ROYG-BkYxt-Gc.js +36 -0
  154. package/dist/assets/array-CL5Tisss.js +1 -0
  155. package/dist/assets/arrow-down-left-o81ENfeW.js +1 -0
  156. package/dist/assets/asciiarmor-DFLNSgns.js +1 -0
  157. package/dist/assets/asn1-CfPVWRYE.js +1 -0
  158. package/dist/assets/asterisk-CJ4OeA7Y.js +1 -0
  159. package/dist/assets/blockDiagram-E7TT5TSB-BO7pPYbp.js +140 -0
  160. package/dist/assets/brainfuck-NEHkmXMc.js +1 -0
  161. package/dist/assets/budgets-0Dw6TH1A.js +1 -0
  162. package/dist/assets/building-complex-DciZTnys.js +1 -0
  163. package/dist/assets/c4Diagram-CRA5TL53-D4EpmmzV.js +38 -0
  164. package/dist/assets/channel-BQh2vFIU.js +1 -0
  165. package/dist/assets/character-CguPM7IG.js +1 -0
  166. package/dist/assets/chat-channels-DWyry-9M.js +1 -0
  167. package/dist/assets/chunk-2BW5OAIV-DFXIyCJy.js +10 -0
  168. package/dist/assets/chunk-2Q5K7J3B-CkPHWFj-.js +1 -0
  169. package/dist/assets/chunk-3YJQHVM4-Dj5wEKIw.js +2 -0
  170. package/dist/assets/chunk-4EA7E6EY-5XiUVgzK.js +1 -0
  171. package/dist/assets/chunk-5VM5RSS4-2H3r6wq0.js +15 -0
  172. package/dist/assets/chunk-7TKQ45FW-D0opKcsy.js +1 -0
  173. package/dist/assets/chunk-AW2ZBBNX-DnjsTe04.js +88 -0
  174. package/dist/assets/chunk-DBDB3WZW-DNqSQPZ0.js +1 -0
  175. package/dist/assets/chunk-DUW6YSOI-slPglwIh.js +1 -0
  176. package/dist/assets/chunk-E2ZNV5FY-cjSf_BTz.js +70 -0
  177. package/dist/assets/chunk-EU5HNXII-CZYBiaSw.js +213 -0
  178. package/dist/assets/chunk-FVRAUYC3-DSc0-wJA.js +2 -0
  179. package/dist/assets/chunk-HJ2JQQFS-MXK0gYSP.js +1 -0
  180. package/dist/assets/chunk-HTAEGDNF-BjDZm_5k.js +1 -0
  181. package/dist/assets/chunk-J5ZVWO5B-ClU583ja.js +1 -0
  182. package/dist/assets/chunk-JWPE2WC7--HEGjv3t.js +1 -0
  183. package/dist/assets/chunk-KQW6MTUR-Bfj0tDmO.js +1 -0
  184. package/dist/assets/chunk-NGNAAXSQ-e5XI1hSt.js +128 -0
  185. package/dist/assets/chunk-NTY3LDVX-Bpz5TkVb.js +1 -0
  186. package/dist/assets/chunk-VPRB5NB3-CfeHjtbb.js +129 -0
  187. package/dist/assets/chunk-XC4XBNZT-FBCWmi6K.js +62 -0
  188. package/dist/assets/chunk-XXDRQBXY-BdWplhUD.js +1 -0
  189. package/dist/assets/chunk-Y2CYZVJY-OvsAdhaO.js +1 -0
  190. package/dist/assets/circle-slash-DqKFFqfb.js +1 -0
  191. package/dist/assets/classDiagram-v2-K4WV4PDN-DbC_J0kK.js +217 -0
  192. package/dist/assets/clike-CIx9nZSv.js +1 -0
  193. package/dist/assets/clojure-DFaIEz5O.js +1 -0
  194. package/dist/assets/cmake-koz-qBlo.js +1 -0
  195. package/dist/assets/cobol-Bo8Zw9gB.js +1 -0
  196. package/dist/assets/coffeescript-CXYzYf-Y.js +1 -0
  197. package/dist/assets/coins-BztUbqyl.js +1 -0
  198. package/dist/assets/collections-BxrcELwt.js +3 -0
  199. package/dist/assets/commonlisp-C4OOCwkD.js +1 -0
  200. package/dist/assets/company-skill-routes-D5LJ1l8M.js +1 -0
  201. package/dist/assets/company-skill-summary-DnWVmP1S.js +1 -0
  202. package/dist/assets/configuration-warnings-CZKSfHJv.js +2 -0
  203. package/dist/assets/connection-owner-D-ikSHyR.js +1 -0
  204. package/dist/assets/cose-bilkent-JH36ORCC-DFyVDb92.js +1 -0
  205. package/dist/assets/crystal-BlJXQDvy.js +1 -0
  206. package/dist/assets/css-DEZwfVpY.js +1 -0
  207. package/dist/assets/cynefin-EF2NZ3EQ-COwSJ4qP.js +1 -0
  208. package/dist/assets/cynefinDiagram-3GCD6N5R-diaEJq9Y.js +62 -0
  209. package/dist/assets/cypher-z2oFsVv2.js +1 -0
  210. package/dist/assets/cytoscape.esm-C2vp4vBx.js +321 -0
  211. package/dist/assets/d-Dkt6y7AQ.js +1 -0
  212. package/dist/assets/dagre-W4DXFKR2-BPAMRuIj.js +4 -0
  213. package/dist/assets/defaultLocale-C2Bpu8Ih.js +1 -0
  214. package/dist/assets/definition-DxwMBXnu.js +1 -0
  215. package/dist/assets/diagram-2UJZ2QOL-BvRnO1Id.js +200 -0
  216. package/dist/assets/diagram-OVF4WLC6-CDgBeD0m.js +24 -0
  217. package/dist/assets/diagram-PFPMY2P6-DAw9lREG.js +30 -0
  218. package/dist/assets/diagram-UMYRVEAY-ZQqQn22t.js +24 -0
  219. package/dist/assets/diagram-YEKJPTXX-CoJtGgWs.js +41 -0
  220. package/dist/assets/diagram-ZIFT7M5P-qW_Zn_bO.js +3 -0
  221. package/dist/assets/diff-C60bAYOU.js +1 -0
  222. package/dist/assets/dist-B2E6oBK1.js +1 -0
  223. package/dist/assets/dist-B6Qde8KJ.js +1 -0
  224. package/dist/assets/dist-BCJybC91.js +1 -0
  225. package/dist/assets/dist-CG-phytt.js +1 -0
  226. package/dist/assets/dist-CG6fC1Db.js +1 -0
  227. package/dist/assets/dist-CPgRB-NQ.js +1 -0
  228. package/dist/assets/dist-CTlCK4Pe.js +1 -0
  229. package/dist/assets/dist-CYRzGbSY.js +7 -0
  230. package/dist/assets/dist-Cd7wdKYE.js +39 -0
  231. package/dist/assets/dist-CdmdXwCZ.js +1 -0
  232. package/dist/assets/dist-CeSzCyeG.js +1 -0
  233. package/dist/assets/dist-CjRqeLFz.js +2 -0
  234. package/dist/assets/dist-CuwPDbnL.js +1 -0
  235. package/dist/assets/dist-CvRpZH53.js +1 -0
  236. package/dist/assets/dist-DKyBHaH2.js +1 -0
  237. package/dist/assets/dist-DML0cJH3.js +13 -0
  238. package/dist/assets/dist-DXjkgaZX.js +1 -0
  239. package/dist/assets/dist-DZIxMHOT.js +1 -0
  240. package/dist/assets/dist-DZruZxAk.js +1 -0
  241. package/dist/assets/dist-DbXGl-wj.js +3 -0
  242. package/dist/assets/dist-Dl94YqeS.js +1 -0
  243. package/dist/assets/dist-DylHAy-6.js +1 -0
  244. package/dist/assets/dist-IcdxEhjC.js +1 -0
  245. package/dist/assets/dist-_EtfntKJ.js +6 -0
  246. package/dist/assets/dist-ptDa9fKh.js +1 -0
  247. package/dist/assets/dockerfile-BttNdtK0.js +1 -0
  248. package/dist/assets/dtd-CCVZU5Da.js +1 -0
  249. package/dist/assets/dylan-3pmV5wzs.js +1 -0
  250. package/dist/assets/ebnf-bm-I2WIh.js +1 -0
  251. package/dist/assets/ebnfDiagram-VR2GEFS7-DA4UvKXV.js +1 -0
  252. package/dist/assets/ecl-BIv3PrZb.js +1 -0
  253. package/dist/assets/eiffel-DuLnr4-r.js +1 -0
  254. package/dist/assets/elk-IJKZMXRS-CM74d3mJ.js +25 -0
  255. package/dist/assets/elm-njbaCU-L.js +1 -0
  256. package/dist/assets/erDiagram-O2IAPWRE-d869V0qL.js +99 -0
  257. package/dist/assets/erlang-CuhOC2I8.js +1 -0
  258. package/dist/assets/eventmodeling-K75KTNOO-C-oz_eyI.js +1 -0
  259. package/dist/assets/factor-CM3-9V3b.js +1 -0
  260. package/dist/assets/fcl-nWsMJ92o.js +1 -0
  261. package/dist/assets/flowDiagram-OXPTDLAJ-Be1xLbJu.js +1 -0
  262. package/dist/assets/folder-plus-CxWXoYCi.js +1 -0
  263. package/dist/assets/forth-BQ9HrCVY.js +1 -0
  264. package/dist/assets/fortran-DHJe28ev.js +1 -0
  265. package/dist/assets/ganttDiagram-R7TSEDQI-BBul4Kpm.js +292 -0
  266. package/dist/assets/gas-ByO0qYMr.js +1 -0
  267. package/dist/assets/gherkin-CwOmHL5K.js +1 -0
  268. package/dist/assets/gitGraph-VSP46ZUC-BriEZgAq.js +1 -0
  269. package/dist/assets/gitGraphDiagram-XJZIOB7I-I12rg8s1.js +106 -0
  270. package/dist/assets/goals-CvMWzjH4.js +1 -0
  271. package/dist/assets/googleAccessRemoval-CQIi1dvu.js +1 -0
  272. package/dist/assets/graphlib-DHhK3saS.js +1 -0
  273. package/dist/assets/groovy-ByXGF8cx.js +1 -0
  274. package/dist/assets/haskell-CHSpCNOy.js +1 -0
  275. package/dist/assets/haxe-P2jh68ck.js +1 -0
  276. package/dist/assets/http-0jwMmfWP.js +1 -0
  277. package/dist/assets/idl-DTVVj6r5.js +1 -0
  278. package/dist/assets/index-Bt31d8ga.js +706 -0
  279. package/dist/assets/index-z7lcCz2I.css +1 -0
  280. package/dist/assets/info-OHQRW6UA-CxrcGiem.js +1 -0
  281. package/dist/assets/infoDiagram-5W2HQ5XZ-4Sm0LiOu.js +2 -0
  282. package/dist/assets/init-BXPE0p7i.js +1 -0
  283. package/dist/assets/invite-memory-BKdqfr5K.js +1 -0
  284. package/dist/assets/ishikawaDiagram-K3B6WC7H-CKXvKV-s.js +70 -0
  285. package/dist/assets/issue-detail-4PCbYpdv.js +119 -0
  286. package/dist/assets/javascript-Cblpdx44.js +1 -0
  287. package/dist/assets/journeyDiagram-COXZFDF6-BHsrZLvQ.js +139 -0
  288. package/dist/assets/julia-KVJvUu_F.js +1 -0
  289. package/dist/assets/kanban-definition-P3RFRI5V-8HhnIs_l.js +89 -0
  290. package/dist/assets/katex-Du_FPwxl.js +257 -0
  291. package/dist/assets/line-rrKrpB-b.js +1 -0
  292. package/dist/assets/linear-BRQgexd0.js +1 -0
  293. package/dist/assets/link-BecLzmfo.js +1 -0
  294. package/dist/assets/list-filter-BC3D4IoX.js +1 -0
  295. package/dist/assets/livescript-DSHsJPcD.js +1 -0
  296. package/dist/assets/log-in-BJCGwGGT.js +1 -0
  297. package/dist/assets/lua-Vher-70I.js +1 -0
  298. package/dist/assets/mathematica-CE9SaVsW.js +1 -0
  299. package/dist/assets/mbox-JGl1Fgvq.js +1 -0
  300. package/dist/assets/mcpSkills-DRs3pGKn.js +1 -0
  301. package/dist/assets/mermaid-parser.core-DmG0b4S0.js +7 -0
  302. package/dist/assets/mermaid.core-D1vILTuF.js +42 -0
  303. package/dist/assets/mindmap-definition-LZFPQGKD-DIMpL0de.js +96 -0
  304. package/dist/assets/mirc-BGWbO906.js +1 -0
  305. package/dist/assets/mllike-DuNQsEw8.js +1 -0
  306. package/dist/assets/model-DL5biheO.js +1 -0
  307. package/dist/assets/modelica-5XCgKQt8.js +1 -0
  308. package/dist/assets/mscgen-mVFg19ri.js +1 -0
  309. package/dist/assets/mumps-C7oS353s.js +1 -0
  310. package/dist/assets/nginx-DXVlpyCz.js +1 -0
  311. package/dist/assets/nsis-KFC6hioG.js +1 -0
  312. package/dist/assets/ntriples-5ckCopnn.js +1 -0
  313. package/dist/assets/octave-D1J2QQNt.js +1 -0
  314. package/dist/assets/onboarding-state-C5_mIw3o.js +1 -0
  315. package/dist/assets/ordinal-BJyFM1v8.js +1 -0
  316. package/dist/assets/oz-CPsllMDD.js +1 -0
  317. package/dist/assets/packet-JDAUHWVQ-BnbYht3G.js +1 -0
  318. package/dist/assets/palette-tokens-CL5ZDrEd.js +1 -0
  319. package/dist/assets/pascal-B-I6JP0Y.js +1 -0
  320. package/dist/assets/path-D6mommQw.js +1 -0
  321. package/dist/assets/pegDiagram-BGZESJAR-BUjtJVjT.js +1 -0
  322. package/dist/assets/perl-CI8WIWBi.js +1 -0
  323. package/dist/assets/pie-XZMESJXO-CM4VXUb-.js +1 -0
  324. package/dist/assets/pieDiagram-CAPJLFHJ-B3v8ryvG.js +39 -0
  325. package/dist/assets/pig-FQI0W3S3.js +1 -0
  326. package/dist/assets/portable-files-CloN_vbk.js +1 -0
  327. package/dist/assets/power-0mw59G-l.js +1 -0
  328. package/dist/assets/powershell-BAu6x78A.js +1 -0
  329. package/dist/assets/prod-C6Q7tISe.js +495 -0
  330. package/dist/assets/profile-summary-B5rPf8v-.js +1 -0
  331. package/dist/assets/properties-BKTTDgau.js +1 -0
  332. package/dist/assets/protobuf-UWh8gh_j.js +1 -0
  333. package/dist/assets/pug-C20tNwmy.js +1 -0
  334. package/dist/assets/puppet-BAHVzCkO.js +1 -0
  335. package/dist/assets/python-C2DOnsac.js +1 -0
  336. package/dist/assets/q-Cooe-Nh8.js +1 -0
  337. package/dist/assets/quadrantDiagram-GDMTTRAM-Cv-dS2Rn.js +7 -0
  338. package/dist/assets/r-CktBKya9.js +1 -0
  339. package/dist/assets/radar-ABXABTNO-v6yZj4Fk.js +1 -0
  340. package/dist/assets/railroad-I3PHUGI6-D-U8Cs0m.js +1 -0
  341. package/dist/assets/railroad-abnf-LNEFI6M7-Dw3fkrVy.js +1 -0
  342. package/dist/assets/railroad-ebnf-DWYD2UWJ-_ln-e3Tx.js +1 -0
  343. package/dist/assets/railroad-peg-JR7BVNR7-Bf8u1-RZ.js +1 -0
  344. package/dist/assets/railroadDiagram-SM67HX2B-Drr5UhQI.js +1 -0
  345. package/dist/assets/requirementDiagram-X7JNWC4A-D5ef6_ac.js +84 -0
  346. package/dist/assets/rolldown-runtime-DhZMWcEn.js +1 -0
  347. package/dist/assets/rough.esm-DnC5Tr1g.js +1 -0
  348. package/dist/assets/rpm-Csj9nLHl.js +1 -0
  349. package/dist/assets/ruby-bGx9eo-K.js +1 -0
  350. package/dist/assets/runtime-IAg0vdY9.js +4137 -0
  351. package/dist/assets/sankeyDiagram-UM26HJRW-DncJWIz_.js +40 -0
  352. package/dist/assets/sas-Drou_EQ9.js +1 -0
  353. package/dist/assets/saved-permissions-CizWg8-P.js +1 -0
  354. package/dist/assets/scheme-DcjG9bAf.js +1 -0
  355. package/dist/assets/scroll-text-Ck6HB7eM.js +1 -0
  356. package/dist/assets/sdk-CWyUlmcn.js +1 -0
  357. package/dist/assets/search-DkTqg7ab.js +1 -0
  358. package/dist/assets/send-CYVi50sh.js +1 -0
  359. package/dist/assets/sequenceDiagram-ZO4K6R2Y-Cs0nGCCg.js +169 -0
  360. package/dist/assets/shared-CIwISWMj.js +1 -0
  361. package/dist/assets/shell-BSKClwid.js +1 -0
  362. package/dist/assets/sieve-CcvsXPZo.js +1 -0
  363. package/dist/assets/simple-mode-B79cVo-x.js +1 -0
  364. package/dist/assets/sizeCapture-INFHLROL-XURNLuv_.js +1 -0
  365. package/dist/assets/skill-source-connect-return-eFTeuj7y.js +1 -0
  366. package/dist/assets/smalltalk-Cmg-4mjQ.js +1 -0
  367. package/dist/assets/smoke-lab-matrix-A7ubFpfk.js +1 -0
  368. package/dist/assets/solr-Dj8ahEwG.js +1 -0
  369. package/dist/assets/sparql-LAJYmgfk.js +1 -0
  370. package/dist/assets/spreadsheet-B8doD_pL.js +1 -0
  371. package/dist/assets/sql-C3kWxFGw.js +1 -0
  372. package/dist/assets/src-DYjgETqR.js +1 -0
  373. package/dist/assets/stateDiagram-v2-TBUQTH76-Dpp3m5Wq.js +291 -0
  374. package/dist/assets/stex-CW6K5Nmu.js +1 -0
  375. package/dist/assets/stylus-BS-Ienrc.js +1 -0
  376. package/dist/assets/swift-BD82LMDK.js +1 -0
  377. package/dist/assets/swimlanes-N4OXWK64-NXVbx1w8.js +1 -0
  378. package/dist/assets/swimlanesDiagram-K3J5GTZL-Ct3LnXZt.js +8 -0
  379. package/dist/assets/tcl-RZa1cqc-.js +1 -0
  380. package/dist/assets/textile-C-BY_OGF.js +1 -0
  381. package/dist/assets/tiddlywiki-C9bm_Oju.js +1 -0
  382. package/dist/assets/tiki-DJOT-rFT.js +1 -0
  383. package/dist/assets/timeline-definition-YOQAKGHF-DqI-Mv2e.js +120 -0
  384. package/dist/assets/toml-Civ2fTsu.js +1 -0
  385. package/dist/assets/treeView-D4JQ5SDB-CZBlE7ya.js +1 -0
  386. package/dist/assets/treemap-SAJKECNS-BlueznID.js +1 -0
  387. package/dist/assets/troff-Lns35Xcq.js +1 -0
  388. package/dist/assets/ttcn-7vlxVTUK.js +1 -0
  389. package/dist/assets/ttcn-cfg-B8qhhp6o.js +1 -0
  390. package/dist/assets/turtle-DTIS1YQ7.js +1 -0
  391. package/dist/assets/useAgentlessOnboardingAutoOpen-CnFwEQ-H.js +1 -0
  392. package/dist/assets/useAuthorizationWindow-DnFQsiFj.js +1 -0
  393. package/dist/assets/useDateRange-9EbqkWXy.js +1 -0
  394. package/dist/assets/useFastResponsesEnabled-D8dunm4j.js +1 -0
  395. package/dist/assets/usePageView-BiX5i8ck.js +1 -0
  396. package/dist/assets/useProfilesData-0VYQ4lAT.js +1 -0
  397. package/dist/assets/useReviewCount-WBWxwKI3.js +1 -0
  398. package/dist/assets/useRoutineFormOptions-DnX5DBn1.js +3 -0
  399. package/dist/assets/useSummaryDraftStream-DPQRvaXT.js +3 -0
  400. package/dist/assets/useTailscaleConnections-BDff6dWx.js +1 -0
  401. package/dist/assets/usecaseDiagram-VIAY4XPW-BSDn8OaJ.js +362 -0
  402. package/dist/assets/vb-BO8UacKu.js +1 -0
  403. package/dist/assets/vbscript-DWLru3lT.js +1 -0
  404. package/dist/assets/velocity-BIIn-Nl2.js +1 -0
  405. package/dist/assets/vennDiagram-BLWOH2XV-BBSA9KNN.js +34 -0
  406. package/dist/assets/verilog-BVYlmXGg.js +1 -0
  407. package/dist/assets/vhdl-Cn8cC8Yb.js +1 -0
  408. package/dist/assets/wardley-7MLQ67FV-CsT-rTZ9.js +1 -0
  409. package/dist/assets/wardleyDiagram-YMQ3BMBF-BLClsIjw.js +78 -0
  410. package/dist/assets/webidl-ChvzbZ5-.js +1 -0
  411. package/dist/assets/xquery-BKN7qEbU.js +1 -0
  412. package/dist/assets/xychartDiagram-TAQBALBS-2x4wB0gq.js +7 -0
  413. package/dist/assets/yacas-BG9ha7tU.js +1 -0
  414. package/dist/assets/z80-CB2cGLew.js +1 -0
  415. package/dist/brands/adapters/LICENSE +21 -0
  416. package/dist/brands/adapters/README.md +7 -0
  417. package/dist/brands/adapters/cursor-dark.svg +1 -0
  418. package/dist/brands/adapters/cursor.svg +1 -0
  419. package/dist/brands/adapters/gemini-color.svg +1 -0
  420. package/dist/brands/adapters/grok-dark.svg +1 -0
  421. package/dist/brands/adapters/grok.svg +1 -0
  422. package/dist/brands/adapters/hermesagent-dark.svg +1 -0
  423. package/dist/brands/adapters/hermesagent.svg +1 -0
  424. package/dist/brands/adapters/kimi-color-light.svg +1 -0
  425. package/dist/brands/adapters/kimi-color.svg +1 -0
  426. package/dist/brands/adapters/openai-dot.README.md +7 -0
  427. package/dist/brands/adapters/openai-dot.svg +3 -0
  428. package/dist/brands/adapters/pi-dark.svg +1 -0
  429. package/dist/brands/adapters/pi.svg +1 -0
  430. package/dist/brands/apps/1password-dark.svg +1 -0
  431. package/dist/brands/apps/1password.svg +1 -0
  432. package/dist/brands/apps/LOBE-LICENSE +21 -0
  433. package/dist/brands/apps/agentmail-dark.svg +16 -0
  434. package/dist/brands/apps/agentmail.svg +17 -0
  435. package/dist/brands/apps/airtable.svg +1 -0
  436. package/dist/brands/apps/anthropic-dark.svg +1 -0
  437. package/dist/brands/apps/anthropic.svg +1 -0
  438. package/dist/brands/apps/antigravity.svg +31 -0
  439. package/dist/brands/apps/api-key-generic.svg +1 -0
  440. package/dist/brands/apps/arcade.png +0 -0
  441. package/dist/brands/apps/asana.svg +12 -0
  442. package/dist/brands/apps/aws-dark.svg +1 -0
  443. package/dist/brands/apps/aws.svg +1 -0
  444. package/dist/brands/apps/bedrock.svg +1 -0
  445. package/dist/brands/apps/beehiiv.png +0 -0
  446. package/dist/brands/apps/bitly.svg +1 -0
  447. package/dist/brands/apps/box.svg +1 -0
  448. package/dist/brands/apps/braintrust-dark.png +0 -0
  449. package/dist/brands/apps/braintrust.png +0 -0
  450. package/dist/brands/apps/brex-dark.svg +1 -0
  451. package/dist/brands/apps/brex.svg +1 -0
  452. package/dist/brands/apps/browser-use.svg +6 -0
  453. package/dist/brands/apps/calendly.png +0 -0
  454. package/dist/brands/apps/candid.png +0 -0
  455. package/dist/brands/apps/circleback.png +0 -0
  456. package/dist/brands/apps/clickhouse-dark.svg +1 -0
  457. package/dist/brands/apps/clickhouse.svg +1 -0
  458. package/dist/brands/apps/clickup.png +0 -0
  459. package/dist/brands/apps/cloudflare.svg +1 -0
  460. package/dist/brands/apps/cloudinary-dark.svg +1 -0
  461. package/dist/brands/apps/cloudinary.svg +3 -0
  462. package/dist/brands/apps/coda.svg +1 -0
  463. package/dist/brands/apps/cognee.png +0 -0
  464. package/dist/brands/apps/composio-dark.svg +11 -0
  465. package/dist/brands/apps/composio.svg +16 -0
  466. package/dist/brands/apps/connection-pool.svg +1 -0
  467. package/dist/brands/apps/context7-dark.svg +8 -0
  468. package/dist/brands/apps/context7.svg +8 -0
  469. package/dist/brands/apps/daytona-dark.svg +1 -0
  470. package/dist/brands/apps/daytona.svg +1 -0
  471. package/dist/brands/apps/discord-dark.svg +1 -0
  472. package/dist/brands/apps/discord.svg +1 -0
  473. package/dist/brands/apps/ditto.png +0 -0
  474. package/dist/brands/apps/egnyte.svg +1 -0
  475. package/dist/brands/apps/embat.svg +1 -0
  476. package/dist/brands/apps/enterpret.png +0 -0
  477. package/dist/brands/apps/exa.svg +5 -0
  478. package/dist/brands/apps/executor.png +0 -0
  479. package/dist/brands/apps/firecrawl.svg +12 -0
  480. package/dist/brands/apps/fireflies.svg +76 -0
  481. package/dist/brands/apps/gauge.png +0 -0
  482. package/dist/brands/apps/github-copilot-dark.svg +1 -0
  483. package/dist/brands/apps/github-copilot.svg +1 -0
  484. package/dist/brands/apps/github-dark.svg +10 -0
  485. package/dist/brands/apps/github.svg +10 -0
  486. package/dist/brands/apps/gmail.svg +1 -0
  487. package/dist/brands/apps/google-calendar.svg +1 -0
  488. package/dist/brands/apps/google-chat.svg +1 -0
  489. package/dist/brands/apps/google-docs.svg +1 -0
  490. package/dist/brands/apps/google-drive.svg +1 -0
  491. package/dist/brands/apps/google-people.svg +1 -0
  492. package/dist/brands/apps/google-sheets.svg +1 -0
  493. package/dist/brands/apps/google-slides.svg +1 -0
  494. package/dist/brands/apps/google-workspace-search.svg +1 -0
  495. package/dist/brands/apps/google.svg +1 -0
  496. package/dist/brands/apps/gsc-wizard.png +0 -0
  497. package/dist/brands/apps/honcho.svg +33 -0
  498. package/dist/brands/apps/hugging-face.svg +8 -0
  499. package/dist/brands/apps/imessage-photon.png +0 -0
  500. package/dist/brands/apps/jam-dev-dark.svg +1 -0
  501. package/dist/brands/apps/jam-dev.svg +1 -0
  502. package/dist/brands/apps/jira-dark.svg +1 -0
  503. package/dist/brands/apps/jira.svg +4 -0
  504. package/dist/brands/apps/kernel.svg +3 -0
  505. package/dist/brands/apps/klaviyo.png +0 -0
  506. package/dist/brands/apps/linear-dark.svg +5 -0
  507. package/dist/brands/apps/linear.svg +5 -0
  508. package/dist/brands/apps/local-falcon.png +0 -0
  509. package/dist/brands/apps/make-dark.svg +1 -0
  510. package/dist/brands/apps/make.svg +1 -0
  511. package/dist/brands/apps/manifest.json +756 -0
  512. package/dist/brands/apps/manufact-dark.svg +6 -0
  513. package/dist/brands/apps/manufact.svg +5 -0
  514. package/dist/brands/apps/mem0.svg +1 -0
  515. package/dist/brands/apps/microsoft-teams.svg +68 -0
  516. package/dist/brands/apps/miro-dark.svg +1 -0
  517. package/dist/brands/apps/miro.svg +4 -0
  518. package/dist/brands/apps/mixpanel-dark.svg +1 -0
  519. package/dist/brands/apps/mixpanel.svg +1 -0
  520. package/dist/brands/apps/monday-dark.png +0 -0
  521. package/dist/brands/apps/monday.png +0 -0
  522. package/dist/brands/apps/neon.png +0 -0
  523. package/dist/brands/apps/netlify-dark.svg +1 -0
  524. package/dist/brands/apps/netlify.svg +16 -0
  525. package/dist/brands/apps/notion-dark.svg +1 -0
  526. package/dist/brands/apps/notion.svg +1 -0
  527. package/dist/brands/apps/oauth-generic.svg +1 -0
  528. package/dist/brands/apps/openai-dark.svg +1 -0
  529. package/dist/brands/apps/openai.svg +1 -0
  530. package/dist/brands/apps/openrouter-dark.svg +3 -0
  531. package/dist/brands/apps/openrouter.svg +3 -0
  532. package/dist/brands/apps/oreilly.svg +1 -0
  533. package/dist/brands/apps/pagerduty.svg +4 -0
  534. package/dist/brands/apps/paperclip-notebook-dark.svg +1 -0
  535. package/dist/brands/apps/paperclip-notebook.svg +1 -0
  536. package/dist/brands/apps/parallel-dark.svg +11 -0
  537. package/dist/brands/apps/parallel.svg +11 -0
  538. package/dist/brands/apps/planetscale-dark.svg +1 -0
  539. package/dist/brands/apps/planetscale.svg +1 -0
  540. package/dist/brands/apps/posthog-dark.svg +1 -0
  541. package/dist/brands/apps/posthog.svg +1 -0
  542. package/dist/brands/apps/postman.svg +1 -0
  543. package/dist/brands/apps/railway-dark.svg +1 -0
  544. package/dist/brands/apps/railway.svg +1 -0
  545. package/dist/brands/apps/razorpay-dark.svg +1 -0
  546. package/dist/brands/apps/razorpay.svg +1 -0
  547. package/dist/brands/apps/resend-dark.svg +1 -0
  548. package/dist/brands/apps/resend.svg +1 -0
  549. package/dist/brands/apps/sanity-dark.svg +1 -0
  550. package/dist/brands/apps/sanity.svg +1 -0
  551. package/dist/brands/apps/sentry-dark.svg +1 -0
  552. package/dist/brands/apps/sentry.svg +1 -0
  553. package/dist/brands/apps/shopify.svg +24 -0
  554. package/dist/brands/apps/similarweb-dark.svg +1 -0
  555. package/dist/brands/apps/similarweb.svg +1 -0
  556. package/dist/brands/apps/slack.png +0 -0
  557. package/dist/brands/apps/slack.svg +17 -0
  558. package/dist/brands/apps/speko.svg +16 -0
  559. package/dist/brands/apps/stripe.svg +11 -0
  560. package/dist/brands/apps/supabase.svg +15 -0
  561. package/dist/brands/apps/superagent.png +0 -0
  562. package/dist/brands/apps/supermemory.png +0 -0
  563. package/dist/brands/apps/tailscale.png +0 -0
  564. package/dist/brands/apps/tavily.png +0 -0
  565. package/dist/brands/apps/telegram.svg +12 -0
  566. package/dist/brands/apps/telem-dark.svg +9 -0
  567. package/dist/brands/apps/telem.svg +9 -0
  568. package/dist/brands/apps/ticket-tailor-dark.svg +1 -0
  569. package/dist/brands/apps/ticket-tailor.svg +1 -0
  570. package/dist/brands/apps/ticktick.svg +1 -0
  571. package/dist/brands/apps/todoist.svg +1 -0
  572. package/dist/brands/apps/unikraft.svg +1 -0
  573. package/dist/brands/apps/vercel-dark.svg +1 -0
  574. package/dist/brands/apps/vercel.svg +1 -0
  575. package/dist/brands/apps/webflow.svg +1 -0
  576. package/dist/brands/apps/windsor-ai.png +0 -0
  577. package/dist/brands/apps/wix-dark.svg +12 -0
  578. package/dist/brands/apps/wix.svg +12 -0
  579. package/dist/brands/apps/xai-dark.svg +1 -0
  580. package/dist/brands/apps/xai.svg +1 -0
  581. package/dist/brands/apps/xero.svg +1 -0
  582. package/dist/brands/apps/youcom-dark.svg +13 -0
  583. package/dist/brands/apps/youcom.svg +13 -0
  584. package/dist/brands/apps/zapier.svg +1 -0
  585. package/dist/brands/apps/zep.png +0 -0
  586. package/dist/brands/claude-color.svg +17 -0
  587. package/dist/brands/codex-color.svg +17 -0
  588. package/dist/brands/opencode-logo-dark-square.svg +18 -0
  589. package/dist/brands/opencode-logo-light-square.svg +18 -0
  590. package/dist/favicon-16x16.png +0 -0
  591. package/dist/favicon-32x32.png +0 -0
  592. package/dist/favicon.ico +0 -0
  593. package/dist/favicon.svg +7 -0
  594. package/dist/fonts/InterVariable-Italic.woff2 +0 -0
  595. package/dist/fonts/InterVariable.woff2 +0 -0
  596. package/dist/fonts/NOTICE.md +30 -0
  597. package/dist/fonts/PaperMono-OFL.txt +93 -0
  598. package/dist/fonts/PaperMono-Variable.woff2 +0 -0
  599. package/dist/index.html +165 -0
  600. package/dist/microvac-push-sw.js +37 -0
  601. package/dist/paperclip-thinking.svg +17 -0
  602. package/dist/site.webmanifest +30 -0
  603. package/dist/storybook/grok-comparison.csv +4 -0
  604. package/dist/sw.js +176 -0
  605. package/dist/worktree-favicon-16x16.png +0 -0
  606. package/dist/worktree-favicon-32x32.png +0 -0
  607. package/dist/worktree-favicon.ico +0 -0
  608. package/dist/worktree-favicon.svg +9 -0
  609. package/package.json +20 -4
@@ -0,0 +1,5 @@
1
+ var Ts=Object.defineProperty;var t=(s,a)=>Ts(s,"name",{value:a,configurable:!0});import{a as is}from"./rolldown-runtime-DhZMWcEn.js";import{Br as Rs}from"./issue-detail-4PCbYpdv.js";import{C as Ps,b as Te}from"./collections-BxrcELwt.js";import{t as Es}from"./arrow-down-left-o81ENfeW.js";import{t as $s}from"./send-CYVi50sh.js";import{$A as _s,$S as M,Cb as He,Ci as B,Db as Ge,Dp as Oe,Eb as Ke,Ep as fe,Ev as os,Fb as qs,Fu as Us,GD as ls,GS as $,Gb as L,HC as Ce,Hm as Be,IC as Ls,JC as Fs,Jp as Ds,Lw as Ms,ME as Y,MT as pe,Mb as ke,NE as C,Nb as zs,Ob as Qe,Pb as Hs,QT as cs,RS as Gs,Rb as Os,Rp as xe,Sb as Ve,Sp as Se,TT as Ks,Tb as We,Ti as _,UT as Bs,VS as Qs,WE as le,YD as ds,Yb as us,ZC as Vs,ZT as Ws,__ as J,_v as ge,_w as W,aE as Js,ab as G,ay as Je,bE as Q,cT as X,cw as Ys,dy as ms,fy as Re,gC as Zs,g_ as hs,hC as Xs,hE as F,hv as ps,hy as et,ib as st,jT as tt,jb as xs,kb as Ye,ly as be,my as ve,nE as at,nT as gs,nj as nt,on as fs,op as H,pv as bs,qC as Ze,qb as rt,qp as oe,rb as Ae,sv as Pe,sy as ye,tT as ue,uE as ne,ub as D,uy as Ee,vT as it,vb as ot,vm as lt,wb as Xe,x as Ne,xE as U,x_ as ct,xb as dt,y_ as ut,yb as mt,zE as z}from"./index-Bt31d8ga.js";import{a as ht,c as pt,l as xt,o as gt,r as ft,t as bt}from"./SpekoPhoneCallback-C4VnMiZh.js";import{t as vt}from"./EmailConnectionAccess-kCL7obSr.js";import{n as yt}from"./EmailEndpointSetup-BGrksR_u.js";import{t as jt}from"./useAuthorizationWindow-DnFQsiFj.js";import{a as kt,c as K,d as Nt,i as wt,o as Ct,r as St,s as At,u as Ie}from"./GitHubConnectionRecovery-B9sFWJup.js";var es=["opened","synchronize","reopened","ready_for_review","mention","comment"],vs={name:"at-sign",size:24,node:[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]]};vs.node;var It=cs(vs),ys={name:"unlink",size:24,node:[["path",{d:"m18.84 12.25 1.72-1.71h-.02a5.004 5.004 0 0 0-.12-7.07 5.006 5.006 0 0 0-6.95 0l-1.72 1.71",key:"yqzxt4"}],["path",{d:"m5.17 11.75-1.71 1.71a5.004 5.004 0 0 0 .12 7.07 5.006 5.006 0 0 0 6.95 0l1.71-1.71",key:"4qinb0"}],["line",{x1:"8",x2:"8",y1:"2",y2:"5",key:"1041cp"}],["line",{x1:"2",x2:"5",y1:"8",y2:"8",key:"14m1p5"}],["line",{x1:"16",x2:"16",y1:"19",y2:"22",key:"rzdirn"}],["line",{x1:"19",x2:"22",y1:"16",y2:"16",key:"ox905f"}]]};ys.node;var Tt=cs(ys),b=is(nt(),1),e=is(_s(),1);function Rt({endpointId:s}){const a=Y(),[n,l]=(0,b.useState)(()=>crypto.randomUUID()),[d,x]=(0,b.useState)(null),[g,m]=(0,b.useState)(null),[h,k]=(0,b.useState)(""),[i,u]=(0,b.useState)(!1),[p,r]=(0,b.useState)(""),o=Q({mutationFn:t(y=>_.sendSlackTestMessage(s,{requestId:n,...y}),"mutationFn"),onSuccess:t((y,T)=>{if(y.status==="connection_required"){x(S=>T.accountCursor?[...new Map([...S??[],...y.accounts].map(R=>[R.id,R])).values()]:y.accounts),m(y.nextCursor);return}x(null),a.invalidateQueries({queryKey:$.chatEndpoints.principals(s)})},"onSuccess")}),f=o.data?.status==="sent",A=o.data?.status==="connection_pending"?o.data:null;(0,b.useEffect)(()=>{if(u(!1),!A)return;const y=setTimeout(()=>u(!0),Math.max(0,new Date(A.expiresAt).getTime()-Date.now()));return()=>clearTimeout(y)},[A?.expiresAt]);const w=U({queryKey:$.chatEndpoints.principals(s),queryFn:t(()=>_.listPrincipals(s),"queryFn"),enabled:!!A&&!i,refetchInterval:A&&!i?3e3:!1}),I=!!(A&&w.data?.some(y=>y.principalId===A.principalId&&y.status==="linked"));(0,b.useEffect)(()=>{I&&!o.isPending&&!o.error&&o.mutate({slackUserId:h})},[I,o.isPending,o.error]);const E=t(()=>{l(crypto.randomUUID()),o.reset()},"reset"),j=t(()=>{if(i){const y=crypto.randomUUID();l(y),o.mutate({requestId:y,slackUserId:h})}else o.mutate({})},"startTest");return(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)(C,{variant:"outline",disabled:o.isPending||f||!!(A&&!i),onClick:j,children:[o.isPending?(0,e.jsx)(W,{className:"size-4 animate-spin"}):f?(0,e.jsx)(pe,{className:"size-4"}):(0,e.jsx)($s,{className:"size-4"}),o.isPending?"Sending…":f?"Test message sent":i?"Request a new invitation":A?"Waiting for Slack connection…":"Send me a test message"]}),A&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:i?"The Slack invitation expired.":"Open the invitation in Slack to connect your account."}),o.error&&(0,e.jsxs)("div",{role:"alert",className:"max-w-sm text-sm text-destructive",children:[F(o.error).body," ",(0,e.jsx)("button",{className:"underline",onClick:E,children:"Dismiss"})]}),(0,e.jsx)(ye,{open:d!==null,onOpenChange:t(y=>{!y&&!o.isPending&&x(null)},"onOpenChange"),children:(0,e.jsxs)(be,{className:M,children:[(0,e.jsxs)(Re,{children:[(0,e.jsx)(ve,{children:"Connect your Slack account"}),(0,e.jsx)(Ee,{children:"Choose your account. Messages to this agent will use your Microvac permissions."})]}),(0,e.jsx)(J,{"aria-label":"Find your Slack account",placeholder:"Find your name",value:p,onChange:t(y=>r(y.target.value),"onChange")}),(0,e.jsxs)("div",{className:"max-h-64 space-y-1 overflow-y-auto",role:"radiogroup","aria-label":"Your Slack account",children:[d?.filter(y=>`${y.name} ${y.id}`.toLowerCase().includes(p.toLowerCase())).map(y=>(0,e.jsxs)("label",{className:"flex cursor-pointer items-center gap-3 rounded-md border border-border p-3 text-sm",children:[(0,e.jsx)("input",{type:"radio",name:"slack-account",value:y.id,checked:h===y.id,onChange:t(()=>k(y.id),"onChange")}),(0,e.jsxs)("span",{className:M,children:[y.name," ",(0,e.jsxs)("span",{className:"text-muted-foreground",children:["(",y.id,")"]})]})]},y.id)),d?.length===0&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No available accounts found in this Slack workspace."})]}),g&&(0,e.jsx)(C,{variant:"ghost",disabled:o.isPending,onClick:t(()=>o.mutate({accountCursor:g}),"onClick"),children:"Load more Slack accounts"}),o.error&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:F(o.error).body}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)(C,{variant:"ghost",disabled:o.isPending,onClick:t(()=>x(null),"onClick"),children:"Cancel"}),(0,e.jsx)(C,{disabled:!h||o.isPending,onClick:t(()=>o.mutate({slackUserId:h}),"onClick"),children:o.isPending?"Sending invitation…":"Send connection invitation"})]})]})})]})}t(Rt,"SlackTestMessageButton");var re=t((s,a)=>`/companies/${s}/slack/endpoints/${a}`,"root"),ie={capabilities:t((s,a)=>ne.get(`${re(s,a)}/capabilities`),"capabilities"),search:t((s,a)=>ne.get(`${re(s,a)}/search`),"search"),configure:t((s,a,n)=>ne.put(`${re(s,a)}/search`,n),"configure"),connect:t((s,a)=>ne.post(`${re(s,a)}/search/connect`,{}),"connect"),disconnect:t((s,a)=>ne.delete(`${re(s,a)}/search`),"disconnect")};function Pt({capabilities:s,error:a}){return(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Read, search, and act in Slack. Some actions require approval."}),a&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:a}),!s&&!a&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Checking Slack permissions…"}),s&&(0,e.jsx)(e.Fragment,{children:s.missingScopes.length>0&&(0,e.jsxs)("div",{className:"rounded-lg border border-border bg-muted p-3 space-y-2",children:[(0,e.jsx)("p",{className:"text-sm font-medium",children:"Add permissions to unlock more tools"}),(0,e.jsxs)("p",{className:"text-sm",children:["Your existing connection still works. In"," ",(0,e.jsx)("a",{className:"underline underline-offset-4",href:"https://api.slack.com/apps",target:"_blank",rel:"noreferrer",children:"Slack app settings"}),", choose your app, open OAuth & Permissions, add these Bot Token Scopes, then reinstall the app to your workspace."]}),(0,e.jsx)("p",{className:"text-xs font-mono break-words",children:s.missingScopes.join(", ")})]})})]})}t(Pt,"SlackCapabilitiesView");function Et({status:s,onConnect:a,onDisconnect:n,onConfigure:l}){const d=(0,b.useId)(),[x,g]=(0,b.useState)(s.clientId??""),[m,h]=(0,b.useState)(""),[k,i]=(0,b.useState)(!1),[u,p]=(0,b.useState)(null),r=t(async o=>{i(!0),p(null);try{await o()}catch(f){p(F(f).body)}finally{i(!1)}},"perform");return(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Your Slack search access"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Optional personal authorization enables private search on supported runtimes. It cannot read channels the bot hasn’t joined or let the bot write as you. Basic channel reading works without it."}),!s.nativeSearchAvailable&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:s.limitation}),s.connected?(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("span",{className:"text-sm",children:"Slack search connected"}),(0,e.jsx)(C,{variant:"outline",size:"sm",disabled:k,onClick:t(()=>{r(n)},"onClick"),children:"Disconnect search"})]}):(0,e.jsx)(C,{variant:"outline",disabled:k||!s.configured,onClick:t(()=>{r(a)},"onClick"),children:"Connect Slack search"}),!s.configured&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"A connection manager needs to configure your Slack app’s OAuth credentials first."}),s.canConfigure&&(0,e.jsxs)("details",{className:"text-sm",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"OAuth app configuration for connection managers"}),(0,e.jsxs)("form",{className:"mt-3 space-y-3",onSubmit:t(o=>{o.preventDefault(),r(async()=>{await l({clientId:x,clientSecret:m}),h("")})},"onSubmit"),children:[(0,e.jsxs)("p",{className:"text-sm",children:["In Slack app settings, add this redirect URL under OAuth & Permissions. Add user scopes ",(0,e.jsx)("code",{children:"search:read.public"}),","," ",(0,e.jsx)("code",{children:"search:read.private"})," and"," ",(0,e.jsx)("code",{children:"search:read.files"}),". Find Client ID and Client Secret under Basic Information."]}),(0,e.jsx)("p",{className:"text-xs font-mono break-all",children:s.redirectUri??"Configure a public HTTPS URL first."}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{htmlFor:`${d}-client`,children:"Client ID"}),(0,e.jsx)(J,{id:`${d}-client`,value:x,onChange:t(o=>g(o.target.value),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{htmlFor:`${d}-secret`,children:"Client Secret"}),(0,e.jsx)(J,{id:`${d}-secret`,type:"password",autoComplete:"new-password",value:m,onChange:t(o=>h(o.target.value),"onChange")})]}),(0,e.jsx)("div",{className:"flex items-center justify-end gap-3",children:(0,e.jsx)(C,{type:"submit",size:"sm",disabled:k||!x||!m,children:"Save OAuth configuration"})})]})]}),u&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:u})]})}t(Et,"SlackSearchView");function $t({companyId:s,endpointId:a}){const n=U({queryKey:["slack-capabilities",s,a],queryFn:t(()=>ie.capabilities(s,a),"queryFn"),staleTime:6e4}),l=D(n);return(0,e.jsx)("div",{className:"space-y-3",children:(0,e.jsx)(Pt,{capabilities:n.data,error:l.kind==="error"?F(n.error).body:void 0})})}t($t,"SlackToolsSettings");function _t({companyId:s,endpointId:a}){const n=U({queryKey:["slack-search",s,a],queryFn:t(()=>ie.search(s,a),"queryFn")}),l=jt(),d=D(n);return d.kind==="error"?(0,e.jsx)(G,{error:n.error,action:"load Slack search access",onRetry:d.retry,retrying:d.isFetching}):n.data?(0,e.jsxs)(e.Fragment,{children:[l.fallback,(0,e.jsx)(Et,{status:n.data,onConnect:t(async()=>{l.reserve();try{const x=await ie.connect(s,a);await l.open(x.url)}catch(x){throw l.cancel(),x}},"onConnect"),onDisconnect:t(async()=>{await ie.disconnect(s,a),await n.refetch()},"onDisconnect"),onConfigure:t(async x=>{await ie.configure(s,a,x),await n.refetch()},"onConfigure")})]}):(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading search access…"})}t(_t,"SlackSearchAccess");function qt({value:s,onSave:a}){const n=(0,b.useId)(),[l,d]=(0,b.useState)(null),[x,g]=(0,b.useState)(!1),[m,h]=(0,b.useState)(null),[k,i]=(0,b.useState)(!1),u=l??s,p=u.trim()!==s;return(0,e.jsxs)("form",{className:"space-y-3","aria-labelledby":`${n}-label`,onSubmit:t(async r=>{if(r.preventDefault(),!(x||!p)){g(!0),h(null),i(!1);try{await a(u.trim()),d(null),i(!0)}catch(o){h(F(o).body)}finally{g(!1)}}},"onSubmit"),children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("label",{id:`${n}-label`,htmlFor:n,className:"text-sm font-semibold",children:"Additional communication instructions"}),(0,e.jsx)("p",{id:`${n}-help`,className:"text-sm text-muted-foreground",children:"Applies to new conversations."})]}),(0,e.jsx)(hs,{id:n,"aria-describedby":`${n}-help`,value:u,disabled:x,maxLength:4e3,rows:4,placeholder:"For example: Keep replies brief and explain technical terms.",onChange:t(r=>{d(r.target.value),i(!1),h(null)},"onChange")}),m&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:m}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("div",{children:p?(0,e.jsx)(C,{type:"button",variant:"ghost",disabled:x,onClick:t(()=>{d(null),h(null),i(!1)},"onClick"),children:"Cancel"}):k?(0,e.jsx)("span",{role:"status",className:"text-sm text-muted-foreground",children:"Saved. Applies to new tasks."}):null}),(0,e.jsx)(C,{type:"submit",disabled:!p||x,children:x?"Saving…":"Save instructions"})]})]})}t(qt,"ChatCommunicationInstructions");function Ut(s){return s===void 0?"inherit":s===null?"clear":s.kind==="task_directory"?"task":s.kind==="existing"?`existing:${s.workspaceId}`:`source:${s.projectWorkspaceId}:${s.mode}`}t(Ut,"selectionKey");function $e({companyId:s,value:a,resource:n=!1,onSave:l}){const d=(0,b.useId)(),[x,g]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),[k,i]=(0,b.useState)(null),[u,p]=(0,b.useState)(null),r=U({...ct(s)}),o=U({queryKey:["channel-workspace-choices",s],queryFn:t(()=>ut.listSummaries(s,{selectableForTask:!0}),"queryFn")}),f=x??a??{},A=JSON.stringify(a??{}),w=u!==null;(0,b.useEffect)(()=>{u!==null&&u!==A&&g(null)},[u,A]);const I=f.projectId===void 0?"inherit":f.projectId??"none",E=Ut(f.workspace),j=new Map;j.set("task",{kind:"task_directory"});for(const S of r.data??[])for(const R of S.workspaces??[])for(const c of["managed_isolated","shared"])j.set(`source:${R.id}:${c}`,{kind:"configured_source",projectWorkspaceId:R.id,mode:c});for(const S of o.data??[])j.set(`existing:${S.id}`,{kind:"existing",workspaceId:S.id});const y=!w&&JSON.stringify(f)!==A,T=t(S=>{g(S),p(null),i(null)},"change");return(0,e.jsxs)("form",{className:"space-y-3","aria-labelledby":`${d}-title`,onSubmit:t(async S=>{if(S.preventDefault(),!(m||!y)){h(!0),i(null),p(null);try{await l(Object.keys(f).length?f:null),p(A)}catch(R){i(R instanceof Error?R.message:"Couldn’t save task defaults. Try again.")}finally{h(!1)}}},"onSubmit"),children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h3",{id:`${d}-title`,className:"text-sm font-semibold",children:"Task defaults"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Applies to new conversations. Existing tasks keep their files and project."})]}),(r.isError||o.isError)&&(0,e.jsxs)("p",{role:"alert",className:"text-sm text-destructive",children:["Couldn’t load available projects or workspaces. ",(0,e.jsx)("button",{type:"button",className:"underline",onClick:t(()=>{r.refetch(),o.refetch()},"onClick"),children:"Try again"})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{htmlFor:`${d}-project`,className:"text-sm font-medium",children:"Project"}),(0,e.jsxs)(Oe,{id:`${d}-project`,value:I,disabled:m||r.isPending,onChange:t(S=>{const{projectId:R,...c}=f;T(S.target.value==="inherit"?c:{...c,projectId:S.target.value==="none"?null:S.target.value})},"onChange"),children:[(0,e.jsx)("option",{value:"inherit",children:n?"Use connection defaults":"Use task defaults"}),(0,e.jsx)("option",{value:"none",children:"No project"}),f.projectId&&!r.data?.some(S=>S.id===f.projectId)&&(0,e.jsx)("option",{value:f.projectId,children:"Saved project (unavailable)"}),(r.data??[]).map(S=>(0,e.jsx)("option",{value:S.id,children:S.name},S.id))]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("label",{htmlFor:`${d}-workspace`,className:"text-sm font-medium",children:"Workspace"}),(0,e.jsxs)(Oe,{id:`${d}-workspace`,value:E,disabled:m||r.isPending||o.isPending,onChange:t(S=>{const R=S.target.value,{workspace:c,...v}=f;if(R==="inherit")T(v);else if(R==="clear")T({...v,workspace:null});else{const q=j.get(R);q&&T({...v,workspace:q})}},"onChange"),children:[(0,e.jsx)("option",{value:"inherit",children:n?"Use connection defaults":"Use project or task defaults"}),n&&(0,e.jsx)("option",{value:"clear",children:"Use project or task defaults"}),!n&&E==="clear"&&(0,e.jsx)("option",{value:"clear",children:"Use project or task defaults"}),(0,e.jsx)("option",{value:"task",children:"Task files — separate folder"}),f.workspace&&!j.has(E)&&(0,e.jsx)("option",{value:E,children:"Saved workspace (unavailable)"}),(r.data??[]).filter(S=>S.workspaces?.length).map(S=>(0,e.jsx)("optgroup",{label:S.name,children:S.workspaces.flatMap(R=>[(0,e.jsxs)("option",{value:`source:${R.id}:managed_isolated`,children:[R.name," — isolated checkout"]},`${R.id}:isolated`),(0,e.jsxs)("option",{value:`source:${R.id}:shared`,children:[R.name," — shared folder"]},`${R.id}:shared`)])},S.id)),(o.data?.length??0)>0&&(0,e.jsx)("optgroup",{label:"Existing workspaces",children:o.data.map(S=>(0,e.jsx)("option",{value:`existing:${S.id}`,children:S.name},S.id))})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Project and workspace access is checked for each task. A shared folder must also be allowed by the agent’s execution policy."})]}),k&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:k}),(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("div",{children:y?(0,e.jsx)(C,{type:"button",variant:"ghost",disabled:m,onClick:t(()=>{g(null),i(null)},"onClick"),children:"Cancel"}):w?(0,e.jsx)("span",{role:"status",className:"text-sm text-muted-foreground",children:"Saved for new tasks."}):null}),(0,e.jsx)(C,{type:"submit",disabled:!y||m,children:m?"Saving…":"Save defaults"})]})]})}t($e,"ChatExecutionDefaults");function Lt(s,a){if(a==="github"&&s.externalUrl)try{const n=new URL(s.externalUrl),l=n.pathname.split("/");if(n.hostname==="github.com"&&["issues","pull"].includes(l[3])&&/^\d+$/.test(l[4]))return`${l[1]}/${l[2]} #${l[4]}`}catch{}return s.externalLabel}t(Lt,"conversationDestination");function Ft({rows:s,provider:a}){return s.length?(0,e.jsx)("ul",{"aria-label":"Conversations",className:"divide-y divide-border border-y border-border",children:s.map(n=>(0,e.jsxs)("li",{className:"flex items-start gap-3 py-4 text-sm",children:[(0,e.jsx)(xe,{name:a,brandKey:a,compact:!0,className:"mt-0.5 size-5! shrink-0 rounded-sm bg-transparent"}),(0,e.jsxs)("div",{className:"min-w-0 flex-1 space-y-1",children:[(0,e.jsxs)("div",{className:"break-words",children:[n.issueIdentifier&&(0,e.jsx)("span",{className:"mr-2 text-xs text-muted-foreground",children:n.issueIdentifier}),n.issueId?(0,e.jsx)(L,{className:"break-words font-medium hover:underline",to:`/issues/${n.issueId}`,children:n.issueTitle??n.issueIdentifier??"Microvac task"}):(0,e.jsx)("span",{className:"font-medium",children:n.issueTitle??"Waiting for task"})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-baseline gap-x-3 gap-y-1 text-xs text-muted-foreground",children:[n.externalUrl?(0,e.jsx)("a",{href:n.externalUrl,target:"_blank",rel:"noreferrer",className:z("break-words hover:text-foreground hover:underline",M),children:Lt(n,a)}):(0,e.jsx)("span",{className:z("break-all",M),children:n.externalLabel}),n.updatedAt&&(0,e.jsx)("time",{dateTime:n.updatedAt,children:le(n.updatedAt)}),n.state==="completed"&&(0,e.jsx)("span",{children:"Completed"})]})]}),n.state!=="active"&&n.state!=="completed"&&(0,e.jsx)(Te,{status:n.state})]},n.id))}):(0,e.jsx)(fs,{icon:Ys,message:"No conversations yet",description:a==="speko"?"Open an assigned task and choose Talk to agent.":a==="agentmail"?"Send an email to this agent’s address to start one.":"Mention the agent in an enabled destination to start one."})}t(Ft,"ChatConversationList");function ss({companyId:s,members:a,access:n,value:l,onChange:d,label:x}){const g=n?.memberships?.find(i=>i.companyId===s&&i.status==="active"),m=n?.isInstanceAdmin===!0||g?.membershipRole==="owner"||g?.membershipRole==="admin",h=a.filter(i=>i.status==="active"&&i.membershipRole!=="viewer"&&n&&(m||i.principalId===n.userId)).map(i=>({key:i.principalId,value:i.principalId,label:i.user?.name??i.user?.email??i.principalId,avatarUrl:i.user?.image,searchText:i.user?.email??void 0})),k=a.find(i=>i.principalId===l);return(0,e.jsx)(lt,{value:l,groups:[{id:"sponsors",options:h}],onValueChange:d,placeholder:"Select a member",searchPlaceholder:"Search members…",triggerAriaLabel:x,disabled:!n||h.length===0,renderValue:t(i=>i?(0,e.jsx)(ke,{name:i.label,avatarUrl:i.avatarUrl,size:"sm"}):l?(0,e.jsx)(ke,{name:k?.user?.name??k?.user?.email??l,avatarUrl:k?.user?.image,size:"sm"}):null,"renderValue"),renderOption:t(i=>(0,e.jsx)(ke,{name:i.label,avatarUrl:i.avatarUrl,size:"sm"}),"renderOption")})}t(ss,"GitHubSponsorSelect");var ts="w-full rounded-md border border-input bg-background px-3 py-2 text-sm",we={opened:"New pull request",synchronize:"Updated commits",reopened:"Reopened",ready_for_review:"Ready for review",mention:"Mention",comment:"Follow-up comment"};function Dt({label:s,children:a}){const[n,l]=(0,b.useState)(!1);return(0,e.jsxs)(ot,{open:n,onOpenChange:l,children:[(0,e.jsx)(dt,{asChild:!0,children:(0,e.jsx)("button",{type:"button","aria-label":`About ${s}`,className:"inline-flex shrink-0 items-center text-muted-foreground hover:text-foreground",onClick:t(()=>l(!0),"onClick"),children:(0,e.jsx)(it,{className:"size-4"})})}),(0,e.jsx)(mt,{className:z("max-w-xs",M),children:a})]})}t(Dt,"GitHubHelp");function O({label:s,description:a,help:n,checked:l,onChange:d,ariaLabel:x,disabled:g}){return(0,e.jsxs)("div",{className:"flex items-center justify-between gap-4 py-2",children:[(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)("p",{className:"break-words text-sm font-medium",children:s}),n&&(0,e.jsx)(Dt,{label:s,children:n})]}),a&&(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:a})]}),(0,e.jsx)(fe,{"aria-label":x??s,disabled:g,checked:l,onCheckedChange:d})]})}t(O,"GitHubToggle");function as({id:s,values:a,separator:n=`
2
+ `,onChange:l}){const d=n===","?", ":`
3
+ `,[x,g]=(0,b.useState)(a.join(d)),m=t(k=>k.split(n).map(i=>i.trim()).filter(Boolean),"parse");(0,b.useEffect)(()=>{g(k=>JSON.stringify(m(k))===JSON.stringify(a)?k:a.join(d))},[a,n]);const h={id:s,value:x,onChange:t(k=>{g(k.target.value),l(m(k.target.value))},"onChange")};return n===`
4
+ `?(0,e.jsx)(hs,{...h}):(0,e.jsx)(J,{...h})}t(as,"GitHubListInput");function Mt({value:s,onChange:a,onValidityChange:n,text:l,onTextChange:d}){const x=(0,b.useId)(),[g,m]=(0,b.useState)(String(s??5)),h=l??g,k=d??m,i=Number(h),u=s===null||h.trim()!==""&&Number.isInteger(i)&&i>=1&&i<=5;return(0,b.useEffect)(()=>m(String(s??5)),[s]),(0,b.useEffect)(()=>{n?.(u)},[u,n]),(0,e.jsxs)("div",{className:"space-y-3 py-3",children:[(0,e.jsx)(H,{htmlFor:x,children:"Passing score"}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-4",children:[(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(J,{id:x,type:"number",min:1,max:5,step:1,required:!0,className:"w-20",value:h,disabled:s===null,"aria-invalid":!u,"aria-describedby":`${x}-help${u?"":` ${x}-error`}`,onChange:t(p=>{const r=p.target.value;k(r);const o=Number(r);r.trim()&&Number.isInteger(o)&&o>=1&&o<=5&&a(o)},"onChange")}),(0,e.jsx)("span",{className:"text-sm text-muted-foreground",children:"out of 5"})]}),(0,e.jsxs)(H,{className:"flex items-center gap-2 text-sm font-normal",children:[(0,e.jsx)(Se,{"aria-label":"Report only",checked:s===null,onCheckedChange:t(p=>{k("5"),a(p===!0?null:5)},"onCheckedChange")}),"Report only"]})]}),!u&&(0,e.jsx)("p",{id:`${x}-error`,role:"alert",className:"text-xs text-destructive",children:"Enter a whole number from 1 to 5."}),(0,e.jsx)("p",{id:`${x}-help`,className:"text-xs text-muted-foreground",children:s===null?"Publishes a neutral check without a score requirement. GitHub can accept neutral checks for merging.":"Microvac passes the check when a complete review of the latest commit meets this score. Lower scores fail. This does not approve the PR."}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["To block merging, require the ",(0,e.jsx)("strong",{children:"Microvac Review"})," check from this App in your GitHub branch rules."," ",(0,e.jsx)("a",{className:"underline hover:text-foreground",href:"https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-rulesets/creating-rulesets-for-a-repository",target:"_blank",rel:"noreferrer",children:"Configure on GitHub"})]})]})}t(Mt,"GitHubPassingScore");function zt({policy:s,onChange:a,accessHref:n,onValidityChange:l,scoreText:d,onScoreTextChange:x,rememberedAutomaticMode:g,readOnly:m=!1}){const h=(0,b.useId)(),k=(0,b.useRef)("linked_authors");s.invocation!=="mentions_only"&&(k.current=s.invocation);const i=t((o,f,A)=>(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(H,{htmlFor:`${h}-github-${o}`,children:f}),(0,e.jsx)(as,{id:`${h}-github-${o}`,values:s[o],onChange:t(w=>r(o,w),"onChange")}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:A})]}),"filterField"),[u,p]=(0,b.useState)("opened"),r=t((o,f)=>a({...s,[o]:f}),"set");return(0,e.jsxs)("div",{className:"space-y-8",children:[(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":`${h}-github-instructions-heading`,children:[(0,e.jsx)("h2",{id:`${h}-github-instructions-heading`,className:"text-base font-semibold",children:"Instructions"}),(0,e.jsx)(Be,{readOnly:m,ariaLabel:"Agent instructions",contentClassName:"min-h-32",value:s.instructions,placeholder:"What should this agent do on GitHub?",onChange:t(o=>r("instructions",o),"onChange")}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Included in every GitHub task. Type / to select a skill for the agent to use."}),(0,e.jsx)(K,{title:"Event-specific instructions",children:(0,e.jsxs)("div",{className:"grid gap-3 pt-3",children:[(0,e.jsx)(H,{htmlFor:`${h}-github-prompt-event`,className:"sr-only",children:"Event"}),(0,e.jsxs)("select",{id:`${h}-github-prompt-event`,className:ts,value:u,onChange:t(o=>p(o.target.value),"onChange"),children:[es.map(o=>(0,e.jsx)("option",{value:o,children:we[o]},o)),(0,e.jsx)("option",{value:"issue_opened",children:"New issue"})]}),(0,e.jsx)(Be,{readOnly:m,ariaLabel:`${u==="issue_opened"?"New issue":we[u]} instructions`,contentClassName:"min-h-32",value:u==="issue_opened"?s.issueOpenedInstructions??"":s.prompts[u],onChange:t(o=>u==="issue_opened"?r("issueOpenedInstructions",o):r("prompts",{...s.prompts,[u]:o}),"onChange")},u),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Added to the main instructions for this event. Type / to select a skill for the agent to use."})]})})]}),(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":`${h}-github-triggers-heading`,children:[(0,e.jsx)("h2",{id:`${h}-github-triggers-heading`,className:"text-base font-semibold",children:"When to run"}),(0,e.jsxs)("div",{className:"flex items-start gap-3 py-2",children:[(0,e.jsx)(It,{className:"mt-0.5 size-4 shrink-0 text-muted-foreground"}),(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("p",{className:"text-sm font-medium",children:"When mentioned"}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Authorized people can always @mention this bot."," ",n&&(0,e.jsx)(L,{className:"underline underline-offset-4",to:n,children:"Manage people in Access"})]})]})]}),(0,e.jsx)(O,{label:"Run automatically",description:"Start work without a mention when an allowed person creates an issue or updates a pull request.",checked:s.invocation!=="mentions_only",onChange:t(o=>r("invocation",o?g??k.current:"mentions_only"),"onChange")}),s.invocation!=="mentions_only"&&(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"grid gap-x-6 gap-y-3 sm:grid-cols-2","aria-label":"Automatic events",children:[es.slice(0,4).map(o=>(0,e.jsxs)(H,{className:"flex cursor-pointer items-center gap-3 text-sm font-normal",children:[(0,e.jsx)(Se,{checked:s.events.includes(o),onCheckedChange:t(f=>r("events",f===!0?[...new Set([...s.events,o])]:s.events.filter(A=>A!==o)),"onCheckedChange")}),we[o]]},o)),(0,e.jsxs)(H,{className:"flex cursor-pointer items-center gap-3 text-sm font-normal",children:[(0,e.jsx)(Se,{checked:s.issueOpened===!0,onCheckedChange:t(o=>r("issueOpened",o===!0),"onCheckedChange")}),"New issues"]})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Runs for authorized authors in Access. Use the author filters below to limit whose issues and PRs start work."}),(0,e.jsxs)(K,{title:"Automatic review filters",children:[(0,e.jsxs)("div",{children:[(0,e.jsx)(O,{label:"Include draft PRs",checked:s.reviewDrafts,onChange:t(o=>r("reviewDrafts",o),"onChange")}),(0,e.jsx)(O,{label:"Include bot authors",description:"The account also needs a sponsor and external-contributor automatic runs enabled in Access.",checked:s.reviewBotAuthors,onChange:t(o=>r("reviewBotAuthors",o),"onChange")})]}),(0,e.jsx)(K,{title:"Authors",children:(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[i("includeAuthors","Included authors","Leave empty for all authorized authors. One username or glob per line."),i("excludeAuthors","Excluded authors","One username or glob per line.")]})}),(0,e.jsx)(K,{title:"Branches",children:(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[i("targetBranches","Target branches","Leave empty for all branches. Supports * and **."),i("excludedBranches","Excluded branches","Supports * and **.")]})}),(0,e.jsx)(K,{title:"Labels",children:(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[i("requiredLabels","Required labels","All listed labels must be present."),i("excludedLabels","Excluded labels","Any listed label prevents automatic review.")]})}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Reviews requested by @mention bypass these scheduling filters. Repository access and ignored files still apply."})]})]})]}),(0,e.jsxs)("section",{className:"space-y-3","aria-labelledby":`${h}-github-results-heading`,children:[(0,e.jsx)("h2",{id:`${h}-github-results-heading`,className:"text-base font-semibold",children:"Review results"}),(0,e.jsxs)("div",{className:"grid gap-x-8 sm:grid-cols-2",children:[(0,e.jsx)(O,{label:"Post a review summary",checked:s.publishSummary,onChange:t(o=>r("publishSummary",o),"onChange")}),(0,e.jsx)(O,{label:"Post inline findings",checked:s.publishInline,onChange:t(o=>r("publishInline",o),"onChange")})]}),(0,e.jsx)(Mt,{value:s.ratingThreshold,text:d,onTextChange:x,onChange:t(o=>r("ratingThreshold",o),"onChange"),onValidityChange:l})]}),(0,e.jsxs)("div",{className:"divide-y divide-border",children:[(0,e.jsx)(K,{title:"Ignored files",children:i("ignoredPaths","File patterns","Excluded from all reviews, including @mentions. One pattern per line; supports * and **.")}),(0,e.jsx)(K,{title:"Inline comment options",children:(0,e.jsxs)("div",{className:"grid gap-4 sm:grid-cols-2",children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(H,{htmlFor:`${h}-github-categories`,children:"Finding categories"}),(0,e.jsx)(as,{id:`${h}-github-categories`,values:s.findingCategories,separator:",",onChange:t(o=>r("findingCategories",o),"onChange")})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(H,{htmlFor:`${h}-github-severity`,children:"Minimum inline severity"}),(0,e.jsxs)("select",{id:`${h}-github-severity`,className:ts,value:s.minimumCommentSeverity,onChange:t(o=>r("minimumCommentSeverity",o.target.value),"onChange"),children:[(0,e.jsx)("option",{value:"info",children:"Info"}),(0,e.jsx)("option",{value:"warning",children:"Warning"}),(0,e.jsx)("option",{value:"error",children:"Error"})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Hidden findings still count in the assessment."})]})]})}),(0,e.jsxs)(K,{title:"Approvals and change requests",children:[(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Optional formal decisions on GitHub. Scores, comments, and checks still work when these are off."}),(0,e.jsxs)("div",{children:[(0,e.jsx)(O,{label:"Allow approvals",help:"Lets the agent submit an Approve review on GitHub after a complete assessment. The agent must explicitly choose it; a 5/5 score or passing check does not approve the PR. Off still allows scores, comments, and checks.",checked:s.allowApprove,onChange:t(o=>r("allowApprove",o),"onChange")}),(0,e.jsx)(O,{label:"Allow request changes",help:"Lets the agent submit a Request changes review on GitHub after a complete assessment. This is a formal review decision and may prevent merging under your repository rules. Off still allows findings, comments, and a failing check.",checked:s.allowRequestChanges,onChange:t(o=>r("allowRequestChanges",o),"onChange")})]})]})]})]})}t(zt,"GitHubPolicyEditor");function Ht({endpointId:s,companyId:a,configuration:n,onChange:l}){const d=Gs()?.companies.find(N=>N.id===a),x=(0,b.useRef)(null),[g,m]=(0,b.useState)(!1),[h,k]=(0,b.useState)(null),i=U({queryKey:["github-members",a],queryFn:t(()=>Je.listMembers(a),"queryFn")}),u=U({queryKey:$.access.currentBoardAccess,queryFn:t(()=>Je.getCurrentBoardAccess(),"queryFn")}),p=U({queryKey:["github-linked-members",s],queryFn:t(()=>_.listPrincipals(s),"queryFn")}),r=D(i),o=D(p),f=D(u),A=o.kind==="ready"||o.kind==="stale",[w,I]=(0,b.useState)(""),[E,j]=(0,b.useState)(""),y=E||u.data?.userId||"",[T,S]=(0,b.useState)(null),[R,c]=(0,b.useState)(""),[v,q]=(0,b.useState)(""),[V,ce]=(0,b.useState)(!1),Z=(i.data?.members??[]).filter(N=>N.status==="active"&&N.membershipRole!=="viewer"),de=(p.data??[]).filter(N=>N.status==="linked"),Cs=Z.find(N=>N.principalId===n.responsibleUserId),_e=t(N=>Z.find(P=>P.principalId===N)?.user?.name??N,"memberName"),je=n.defaults.invocation!=="mentions_only",Ss=n.defaults.invocation==="allowed_authors",qe=n.people.filter(N=>N.kind==="guest"),Ue=[...n.people.filter(N=>N.kind==="member"),...de.filter(N=>N.githubUserId&&N.paperclipUserId&&!n.people.some(P=>P.githubUserId===N.githubUserId)).map(N=>({kind:"member",userId:N.paperclipUserId,githubUserId:N.githubUserId,login:N.githubLogin??N.externalLabel}))],Le=t(N=>l({...n,people:n.people.some(P=>P.githubUserId===N.githubUserId)?n.people.map(P=>P.githubUserId===N.githubUserId?N:P):[...n.people,N]}),"updatePerson"),Fe=t(N=>l({...n,people:n.people.filter(P=>P.githubUserId!==N.githubUserId)}),"removePerson"),As=t(async N=>{ce(!0),c("");try{await _.revokeLink(s,N),await p.refetch()}catch(P){c(F(P).body)}finally{ce(!1)}},"unlink"),De=t(N=>(0,e.jsx)("div",{className:"divide-y divide-border",children:N.map(P=>{const se=de.find(ae=>ae.githubUserId===P.githubUserId),te=P.kind==="guest"||!!se,Me=n.people.some(ae=>ae.githubUserId===P.githubUserId),Is=P.kind==="guest"||n.memberAccess==="all_linked"||Me,ze=Me&&(P.kind==="guest"||n.memberAccess==="selected");return(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-4 gap-y-3 py-4",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1 basis-32",children:[(0,e.jsxs)("p",{className:z("break-words text-sm font-medium",M),children:["@",P.login]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:P.kind==="guest"?`Sponsored by ${_e(P.sponsorUserId)}`:se?.paperclipUserLabel??"Company member"}),!te&&(0,e.jsx)("p",{className:"mt-1 text-xs text-destructive",children:"GitHub account needs linking."})]}),(0,e.jsxs)("div",{className:"flex items-center gap-5",children:[(0,e.jsxs)("div",{className:"flex flex-col items-center gap-2",children:[(0,e.jsx)("span",{className:"text-xs text-muted-foreground",children:"Mentions"}),P.kind==="guest"||n.memberAccess==="all_linked"?(0,e.jsxs)("span",{className:"flex h-5 items-center gap-1 text-xs","aria-label":`Mentions ${te?"allowed":"unavailable"} for @${P.login}`,children:[te&&(0,e.jsx)(pe,{className:"size-3.5 text-muted-foreground"}),te?"Allowed":"Unlinked"]}):(0,e.jsx)(fe,{"aria-label":`Allow mentions from @${P.login}`,checked:Is,disabled:!te,onCheckedChange:t(ae=>ae?Le(P):Fe(P),"onCheckedChange")})]}),(se||ze)&&(0,e.jsxs)(bs,{children:[(0,e.jsx)(os,{asChild:!0,children:(0,e.jsx)(C,{size:"icon",variant:"ghost","aria-label":`Manage @${P.login}`,children:(0,e.jsx)(gs,{className:"size-4"})})}),(0,e.jsxs)(ps,{className:"ph-mask ph-sensitive",align:"end",children:[ze&&(0,e.jsx)(ge,{onClick:t(()=>Fe(P),"onClick"),children:"Remove access"}),se&&(0,e.jsx)(ge,{disabled:V,onClick:t(()=>{As(se.principalId)},"onClick"),children:"Unlink GitHub account"})]})]})]})]},P.githubUserId)})}),"peopleRows");return(0,e.jsxs)("section",{className:"space-y-6","aria-label":"People",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:"People"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Choose who can mention this bot and whose activity can start work automatically."})]}),(0,e.jsxs)("section",{className:"space-y-2","aria-label":"Company members",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Company members"}),(0,e.jsxs)(C,{variant:"outline",size:"sm",onClick:t(()=>{k("member"),m(!1),c("")},"onClick"),children:[(0,e.jsx)(Ze,{className:"size-4"}),"Link a member"]})]}),(0,e.jsx)(O,{label:"Allow mentions from all linked members",description:n.memberAccess==="all_linked"?`Includes members from ${d?.name??"this company"} who link their GitHub account later.`:"Only members you enable below can mention this bot.",checked:n.memberAccess==="all_linked",onChange:t(N=>l({...n,memberAccess:N?"all_linked":"selected"}),"onChange")}),De(Ue),(p.isPending||o.kind==="reconnecting")&&(0,e.jsx)("p",{role:"status",className:"py-4 text-sm text-muted-foreground",children:"Loading linked accounts…"}),A&&Ue.length===0&&(0,e.jsx)("p",{className:"py-4 text-sm text-muted-foreground",children:"No members linked yet. Link an account to get started."}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:je?(0,e.jsxs)(e.Fragment,{children:["Automatic runs use the events and author filters in"," ",(0,e.jsx)(L,{className:"underline underline-offset-4",to:`/apps/chat/${s}/settings`,children:"Settings"}),"."]}):(0,e.jsxs)(e.Fragment,{children:["Automatic runs are off in"," ",(0,e.jsx)(L,{className:"underline underline-offset-4",to:`/apps/chat/${s}/settings`,children:"Settings"}),". Authorized @mentions still work."]})})]}),(0,e.jsxs)("section",{className:"space-y-2 border-t border-border pt-6","aria-label":"External contributors",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"External contributors"}),(0,e.jsxs)(C,{variant:"outline",size:"sm",onClick:t(()=>{j(u.data?.userId??""),k("guest"),q("")},"onClick"),children:[(0,e.jsx)(Ze,{className:"size-4"}),"Add external contributor"]})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Allow specific GitHub users with a member as their sponsor. They receive restricted access, without company membership or the sponsor’s personal credentials."}),De(qe),qe.length>0&&(0,e.jsx)(O,{label:"Allow automatic runs for external contributors",description:je?"Authorized contributors can trigger the events and author filters configured in Settings.":"Turn on automatic runs in Settings first. Mentions remain available.",checked:Ss,disabled:!je,onChange:t(N=>l({...n,defaults:{...n.defaults,invocation:N?"allowed_authors":"linked_authors"}}),"onChange")})]}),(0,e.jsx)(K,{title:"Automatic task responsibility",children:(0,e.jsxs)("div",{className:"space-y-2",children:[Z.length===1&&Cs?(0,e.jsxs)("p",{className:"text-sm",children:["Responsible member: ",_e(n.responsibleUserId)]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(H,{children:"Responsible member"}),(0,e.jsx)(ss,{label:"Responsible member",companyId:a,members:Z,access:u.data,value:n.responsibleUserId,onChange:t(N=>l({...n,responsibleUserId:N}),"onChange")})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"The member accountable for automatically created Microvac tasks. GitHub authors remain recorded separately. This grants no access to the member’s personal credentials. Only company owners, company admins, and instance admins can select another person as a sponsor or responsible member."})]})}),R&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:R}),(r.kind==="error"||o.kind==="error"||f.kind==="error")&&(0,e.jsx)(G,{error:r.kind==="error"?i.error:o.kind==="error"?p.error:u.error,action:"load members, linked accounts, and your access",onRetry:t(()=>{r.retry(),o.retry(),f.retry()},"onRetry"),retrying:i.isFetching||p.isFetching||u.isFetching}),(0,e.jsx)(ye,{open:h!==null,onOpenChange:t(N=>{N||k(null)},"onOpenChange"),children:(0,e.jsxs)(be,{className:M,children:[(0,e.jsxs)(Re,{children:[(0,e.jsx)(ve,{children:h==="member"?"Link a company member":"Add external contributor"}),(0,e.jsx)(Ee,{children:h==="member"?"Each member confirms their own GitHub identity. Share this link with an existing company member, or link your own account.":"Allow a GitHub user to mention this bot. A company member must sponsor their restricted access."})]}),h==="member"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)(C,{variant:"outline","aria-label":"Copy account linking URL",onClick:t(()=>{x.current&&oe(x.current.href).then(()=>m(!0),()=>c("Could not copy the link. Open account linking and copy the address."))},"onClick"),children:[(0,e.jsx)(X,{className:"size-4"}),g?"Copied":"Copy invitation link"]}),(0,e.jsx)(L,{ref:x,to:`/apps/chat/connect?provider=github&resume=${s}&stage=identity`,className:"text-sm underline underline-offset-4",children:"Link your account"}),R&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:R})]}):(0,e.jsxs)(e.Fragment,{children:[(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(H,{htmlFor:"github-guest-login",children:"GitHub username"}),(0,e.jsxs)("div",{className:"flex gap-2",children:[(0,e.jsx)(J,{id:"github-guest-login",value:w,placeholder:"octocat",disabled:V,onChange:t(N=>{I(N.target.value),S(null),q("")},"onChange")}),(0,e.jsx)(C,{variant:"outline",disabled:V||!w.trim(),onClick:t(async()=>{ce(!0),q(""),S(null);try{S(await B.lookup(s,w))}catch(N){q(F(N).body)}finally{ce(!1)}},"onClick"),children:V?"Looking up…":"Look up"})]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)(H,{children:"Sponsor"}),(0,e.jsx)(ss,{label:"Sponsor",companyId:a,members:Z,access:u.data,value:y,onChange:j})]}),T&&(0,e.jsx)("p",{role:"status",className:z("text-sm","ph-mask ph-sensitive"),children:n.people.some(N=>N.githubUserId===T.githubUserId)||de.some(N=>N.githubUserId===T.githubUserId)?`@${T.login} is already listed in People.`:`Found @${T.login}. They will be able to mention the bot after you save.`}),v&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:v}),(0,e.jsxs)(ms,{className:"flex-row justify-between sm:justify-between",children:[(0,e.jsx)(C,{variant:"ghost",onClick:t(()=>k(null),"onClick"),children:"Cancel"}),(0,e.jsx)(C,{disabled:!T||!Z.some(N=>N.principalId===y)||n.people.some(N=>N.githubUserId===T.githubUserId)||de.some(N=>N.githubUserId===T.githubUserId),onClick:t(()=>{T&&(Le({...T,kind:"guest",sponsorUserId:y,permissionProfile:"restricted"}),k(null),S(null),I(""))},"onClick"),children:"Add contributor"})]})]})]})})]})}t(Ht,"GitHubAccessEditor");function Gt({endpointId:s,companyId:a,managementUrl:n,pending:l,onRefresh:d,onChange:x,onToggleAll:g}){const m=Y(),[h,k]=(0,b.useState)(""),i=(0,b.useRef)(null),u=(0,b.useRef)(null),p=Ps({queryKey:["github-bot-repository-pages",s,h],queryFn:t(({pageParam:w})=>B.repositories(s,{limit:20,offset:w,search:h}),"queryFn"),initialPageParam:0,getNextPageParam:t(w=>w.nextOffset??void 0,"getNextPageParam")}),r=D(p),o=p.data?.pages.flatMap(w=>w.items)??[],f=p.data?.pages[0],A=(f?.enabledCount??0)>0;return(0,b.useEffect)(()=>{i.current&&(i.current.scrollTop=0)},[h]),(0,b.useEffect)(()=>{if(!p.hasNextPage||p.isFetching||p.isError||r.kind==="error"||l||!u.current||typeof IntersectionObserver>"u")return;const w=new IntersectionObserver(([I])=>{I?.isIntersecting&&p.fetchNextPage({cancelRefetch:!1})},{root:i.current});return w.observe(u.current),()=>w.disconnect()},[p.hasNextPage,p.isFetching,p.isError,r.kind,p.fetchNextPage,l]),(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:"Repositories"}),(0,e.jsxs)(bs,{children:[(0,e.jsx)(os,{asChild:!0,children:(0,e.jsx)(C,{variant:"ghost",size:"icon","aria-label":"Manage repositories",children:(0,e.jsx)(gs,{className:"size-4"})})}),(0,e.jsxs)(ps,{className:M,align:"end",children:[(0,e.jsx)(ge,{asChild:!0,children:(0,e.jsxs)("a",{href:n,target:"_blank",rel:"noreferrer",children:["Manage on GitHub",(0,e.jsx)(ue,{className:"size-4"})]})}),(0,e.jsxs)(ge,{disabled:l,onClick:d,children:[(0,e.jsx)(Ce,{className:"size-4"}),"Refresh repositories"]})]})]})]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Choose where the bot can receive messages and use tools. Repository changes save immediately."}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-3",children:[(0,e.jsxs)("div",{className:"relative min-w-0 flex-1 basis-48",children:[(0,e.jsx)(Ls,{className:"pointer-events-none absolute left-3 top-1/2 size-4 -translate-y-1/2 text-muted-foreground"}),(0,e.jsx)(J,{"aria-label":"Search repositories",placeholder:"Search repositories",className:"pl-9",value:h,maxLength:200,onChange:t(w=>k(w.target.value),"onChange")})]}),(0,e.jsx)(C,{variant:"outline",size:"sm",disabled:l||p.isFetching||!f||!f.totalCount||!A&&!f.availableCount,"aria-label":`${A?"Disable":"Enable"} all repositories`,onClick:t(()=>g(!A),"onClick"),children:A?"Disable all":"Enable all"})]}),f&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[f.enabledCount," of ",f.totalCount," repositories enabled. Toggle all applies across the entire connection."]}),r.kind==="error"&&(0,e.jsx)(G,{error:p.error,action:"load repositories",onRetry:r.retry,retrying:r.isFetching}),(0,e.jsxs)("div",{ref:i,role:"region","aria-label":"Repositories",tabIndex:0,className:"max-h-96 overflow-y-auto overscroll-contain border-y border-border",children:[(0,e.jsx)("div",{className:"divide-y divide-border",children:o.map(w=>(0,e.jsxs)("div",{className:"px-1 py-1",children:[(0,e.jsx)(O,{label:w.label??w.providerResourceId,checked:w.enabled,disabled:l||w.availability!=="available"&&!w.enabled,description:w.availability==="available"?void 0:"Unavailable on GitHub. Update the App’s installation access, then refresh.",onChange:t(I=>x(w.id,I),"onChange")}),(0,e.jsxs)("details",{className:"text-sm",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"Task defaults"}),(0,e.jsx)("div",{className:"pt-3",children:(0,e.jsx)($e,{companyId:a,value:w.executionDefaults,resource:!0,onSave:t(async I=>{await _.updateResources(s,[{id:w.id,executionDefaults:I}]),await m.invalidateQueries({queryKey:["github-bot-repositories",s]}),await m.invalidateQueries({queryKey:["github-bot-repository-pages",s]})},"onSave")})})]})]},w.id))}),p.isPending||r.kind==="reconnecting"?(0,e.jsx)("p",{role:"status",className:"py-4 text-sm text-muted-foreground",children:"Loading repositories…"}):(r.kind==="ready"||r.kind==="stale")&&o.length===0&&(0,e.jsx)("p",{className:"py-4 text-sm text-muted-foreground",children:h?"No repositories match your search.":"No repositories available. Add repository access on GitHub, then refresh."}),p.hasNextPage&&(0,e.jsx)("div",{ref:u,className:"flex justify-center py-2",children:(0,e.jsx)(C,{variant:"ghost",size:"sm",disabled:l||p.isFetching,onClick:t(()=>{p.fetchNextPage({cancelRefetch:!1})},"onClick"),children:p.isFetchingNextPage?"Loading repositories…":"Load more repositories"})})]})]})}t(Gt,"GitHubRepositoryAccess");function Ot({endpoint:s,view:a}){const n=Y(),l=U({queryKey:["github-bot-configuration",s.id],queryFn:t(()=>B.configuration(s.id),"queryFn")}),d=D(l),[x,g]=(0,b.useState)(null),[m,h]=(0,b.useState)(0),[k,i]=(0,b.useState)(null),[u,p]=(0,b.useState)(null),[r,o]=(0,b.useState)(!1),[f,A]=(0,b.useState)(""),[w,I]=(0,b.useState)(""),E=x??l.data,j=k??String(E?.configuration.defaults.ratingThreshold??5),y=Number(j),T=E?.configuration.defaults.ratingThreshold===null||j.trim()!==""&&Number.isInteger(y)&&y>=1&&y<=5,S=!!(x&&JSON.stringify(x.configuration)!==JSON.stringify(l.data?.configuration)),R=t(q=>{E&&(q.defaults.invocation!=="mentions_only"?p(q.defaults.invocation):E.configuration.defaults.invocation!=="mentions_only"&&p(E.configuration.defaults.invocation),g({...E,configuration:q})),A("")},"edit"),c=t(async q=>{o(!0),I("");try{await q()}catch(V){I(F(V).body)}finally{o(!1)}},"act");if(d.kind==="error")return(0,e.jsx)(G,{error:l.error,action:"load the bot configuration",onRetry:d.retry,retrying:d.isFetching});if(!E)return(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading configuration…"});const v=E.configuration;return(0,e.jsxs)("section",{className:"max-w-3xl space-y-8",children:[(0,e.jsx)("fieldset",{disabled:r,className:"min-w-0 space-y-8",children:a==="access"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(Gt,{endpointId:s.id,companyId:s.companyId,pending:r,managementUrl:s.setup?.github?.managementUrl??s.setup?.github?.installationUrl??"https://github.com/settings/installations",onRefresh:t(()=>{c(async()=>{await B.refreshRepositories(s.id),await n.invalidateQueries({queryKey:["github-bot-repositories",s.id]}),await n.invalidateQueries({queryKey:["github-bot-repository-pages",s.id]}),A("Repository access refreshed. New repositories stay disabled.")})},"onRefresh"),onChange:t((q,V)=>{c(async()=>{await _.updateResources(s.id,[{id:q,enabled:V}]),await n.invalidateQueries({queryKey:["github-bot-repositories",s.id]}),await n.invalidateQueries({queryKey:["github-bot-repository-pages",s.id]})})},"onChange"),onToggleAll:t(q=>{c(async()=>{await B.toggleAllRepositories(s.id,q),await n.invalidateQueries({queryKey:["github-bot-repositories",s.id]}),await n.invalidateQueries({queryKey:["github-bot-repository-pages",s.id]})})},"onToggleAll")}),(0,e.jsx)(Ht,{endpointId:s.id,companyId:s.companyId,configuration:v,onChange:R}),!v.toolsEnabled&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"This saved bot has GitHub tools disabled, so it cannot start work or respond."}),(0,e.jsx)(C,{variant:"outline",onClick:t(()=>R({...v,toolsEnabled:!0}),"onClick"),children:"Enable bot tools"})]}),s.connectionId&&(0,e.jsx)(L,{className:"text-xs text-muted-foreground underline underline-offset-4",to:`/apps/${s.connectionId}`,children:"Manage tool permissions"})]}):(0,e.jsx)(e.Fragment,{children:(0,e.jsx)(zt,{readOnly:r,scoreText:j,onScoreTextChange:i,rememberedAutomaticMode:u??(v.defaults.invocation==="mentions_only"?"linked_authors":v.defaults.invocation),accessHref:`/apps/chat/${s.id}/access`,policy:v.defaults,onChange:t(q=>R({...v,defaults:q}),"onChange")},m)})}),w&&(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:w}),f&&(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:f}),(S||!T)&&(0,e.jsxs)("div",{className:"sticky bottom-(--tc-composer-bottom) z-10 flex items-center justify-between gap-3 border-t border-border bg-background py-4 md:bottom-0",children:[(0,e.jsx)(C,{variant:"ghost",disabled:r,onClick:t(()=>{g(null),i(null),p(null),h(q=>q+1),I("")},"onClick"),children:"Discard changes"}),(0,e.jsx)(C,{disabled:r||!T,onClick:t(()=>{c(async()=>{const q=await B.save(s.id,E.revision,v);n.setQueryData(["github-bot-configuration",s.id],q),g(null),i(null),p(null),A("Changes saved.")})},"onClick"),children:r?"Saving…":"Save changes"})]})]})}t(Ot,"GitHubBotManagement");function Kt(s){return[...s].sort((a,n)=>Date.parse(n.createdAt)-Date.parse(a.createdAt))}t(Kt,"orderedGitHubReviews");function js(s){const a=s.state==="completed"&&s.assessment?.complete,n=s.conclusion?{success:"Passed",failure:"Below threshold",neutral:"Report only",action_required:"Action required"}[s.conclusion]:"Awaiting check",l={queued:"Queued",running:"Reviewing",completed:"Incomplete",incomplete:"Incomplete",error:"Review failed",superseded:"Superseded",manual_required:"Action required"}[s.state];return a?`${s.assessment.score}/5 · ${n}`:l}t(js,"gitHubReviewResultLabel");function Bt({review:s}){return(0,e.jsxs)("div",{className:"space-y-4",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-baseline justify-between gap-3",children:[(0,e.jsx)("span",{className:"text-sm font-medium",children:js(s)}),(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Commit ",(0,e.jsx)("code",{children:s.headSha.slice(0,7)})," ·"," ",le(s.updatedAt)]})]}),s.assessment?(0,e.jsx)(Ne,{className:"text-sm",children:s.assessment.summary}):(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"No assessment has been submitted yet."}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-4 text-xs text-muted-foreground",children:[(0,e.jsx)(L,{className:"underline underline-offset-4",to:`/issues/${s.issueId}`,children:"Microvac task"}),s.summaryUrl&&(0,e.jsx)("a",{className:"underline underline-offset-4",href:s.summaryUrl,target:"_blank",rel:"noreferrer",children:"GitHub comment"}),s.checkUrl&&(0,e.jsx)("a",{className:"underline underline-offset-4",href:s.checkUrl,target:"_blank",rel:"noreferrer",children:"Check"})]}),(0,e.jsx)("section",{className:"space-y-4 text-sm","aria-label":"Review evidence",children:(0,e.jsxs)("div",{className:"space-y-3",children:[s.runId&&(0,e.jsx)(L,{className:"text-xs underline underline-offset-4",to:`/issues/${s.issueId}?runId=${s.runId}`,children:"Agent run"}),s.assessment&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("h3",{className:"font-medium",children:"Rationale"}),(0,e.jsx)(Ne,{children:s.assessment.rationale}),s.assessment.findings.length>0&&(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsx)("h3",{className:"font-medium",children:"Findings"}),s.assessment.findings.map(a=>(0,e.jsxs)("div",{className:"space-y-2 border-l border-border pl-4",children:[(0,e.jsxs)("p",{className:"break-all font-mono text-xs",children:[a.path,":",a.line," · ",a.severity]}),(0,e.jsx)(Ne,{children:a.body})]},a.key))]}),(0,e.jsx)("h3",{className:"font-medium",children:"Coverage"}),(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:[s.assessment.coverage.reviewedPaths.length," files reviewed · ",s.assessment.coverage.omittedPaths.length," omitted"]}),s.assessment.coverage.limitations.map((a,n)=>(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:a},n))]})]})})]})}t(Bt,"ReviewResult");function Qt({endpointId:s,reviews:a}){return a.length?(0,e.jsx)("ul",{"aria-label":"Reviews",className:"divide-y divide-border border-y border-border",children:Kt(a).map(n=>(0,e.jsx)("li",{children:(0,e.jsxs)(L,{to:`/apps/chat/${s}/reviews/${n.id}`,className:"flex flex-wrap items-center gap-x-6 gap-y-2 py-4 text-sm hover:bg-accent/50",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1 basis-48 space-y-1",children:[(0,e.jsx)("p",{className:"break-words font-medium",children:n.event.title||`Pull request #${n.pullNumber}`}),(0,e.jsxs)("p",{className:"break-all text-xs text-muted-foreground",children:[n.repository," #",n.pullNumber," ·"," ",(0,e.jsx)("code",{children:n.headSha.slice(0,7)})]})]}),(0,e.jsxs)("div",{className:"space-y-1 text-right",children:[(0,e.jsx)("p",{className:"font-medium",children:js(n)}),(0,e.jsx)("time",{className:"text-xs text-muted-foreground",dateTime:n.createdAt,children:le(n.createdAt)})]})]})},n.id))}):(0,e.jsx)(fs,{icon:Ms,message:"No reviews yet",description:"Mention the bot on a pull request, or enable automatic events in Settings."})}t(Qt,"GitHubReviewList");function Vt({endpointId:s,review:a}){return(0,e.jsxs)("article",{className:"max-w-3xl space-y-6",children:[(0,e.jsx)(L,{className:"text-sm text-muted-foreground hover:underline",to:`/apps/chat/${s}/reviews`,children:"← All reviews"}),(0,e.jsxs)("header",{className:"space-y-2",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:a.event.title||`Pull request #${a.pullNumber}`}),(0,e.jsxs)("a",{className:"break-all text-sm text-muted-foreground hover:underline",href:`https://github.com/${a.repository}/pull/${a.pullNumber}`,target:"_blank",rel:"noreferrer",children:[a.repository," #",a.pullNumber]})]}),(0,e.jsx)(Bt,{review:a})]})}t(Vt,"GitHubReviewDetail");function Wt({endpointId:s,reviewId:a}){const n=U({queryKey:["github-bot-reviews",s,a??"list"],queryFn:t(async()=>a?[await B.review(s,a)]:B.reviews(s),"queryFn"),refetchInterval:5e3}),l=D(n),d=(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)("p",{role:"alert",className:"text-sm text-muted-foreground",children:"This review was not found in this connection."}),(0,e.jsx)(L,{to:`/apps/chat/${s}/reviews`,className:"text-sm underline",children:"All reviews"})]});if(l.kind==="error")return a&&l.errorKind==="not_found"?d:(0,e.jsx)(G,{error:n.error,action:a?"load the review":"load reviews",onRetry:l.retry,retrying:l.isFetching});if(n.isPending||l.kind==="reconnecting")return(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading reviews…"});if(a){const x=n.data?.find(g=>g.id===a);return x?(0,e.jsx)(Vt,{endpointId:s,review:x}):d}return(0,e.jsx)(Qt,{endpointId:s,reviews:n.data??[]})}t(Wt,"GitHubReviews");function Jt({endpoint:s,agent:a,runtimeChecks:n,onClose:l,onCloseAutoFocus:d}){const x=U({queryKey:["github-connected-repositories",s.id],queryFn:t(()=>B.repositories(s.id,{limit:1}),"queryFn")}),g=D(x),m=a??{id:s.assignedAgentId,name:s.assignedAgentName},h=`${At(s)||"@your-bot"} review this pull request`,k=x.data?.enabledCount,i=n?.filter(u=>!u.ok)??[];return(0,e.jsx)(ye,{open:!0,onOpenChange:t(u=>{u||l()},"onOpenChange"),children:(0,e.jsx)(be,{className:z("max-h-(--sz-85dvh) overflow-y-auto sm:max-w-xl",M),"aria-describedby":void 0,onCloseAutoFocus:d?u=>{u.preventDefault(),d()}:void 0,children:(0,e.jsxs)("div",{className:"@container space-y-6",children:[(0,e.jsxs)("header",{className:"space-y-5",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(Ks,{className:"size-6 shrink-0 text-(--status-task-done)"}),(0,e.jsx)(ve,{className:"text-xl leading-normal",children:"GitHub connected"})]}),(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsx)(xs,{agent:m,size:48}),(0,e.jsxs)("div",{className:"min-w-0 space-y-1",children:[(0,e.jsx)("h2",{className:"break-words text-base font-semibold",children:s.botLabel??s.botUsername??s.assignedAgentName}),(0,e.jsxs)("p",{className:"flex flex-wrap items-center gap-x-2 gap-y-1 text-sm text-muted-foreground",children:[(0,e.jsx)(L,{to:`/agents/${s.assignedAgentId}`,className:"hover:text-foreground hover:underline",children:s.assignedAgentName}),s.providerAccountLabel&&(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)("span",{"aria-hidden":"true",children:"·"}),(0,e.jsxs)("span",{className:z("inline-flex items-center gap-1.5","ph-mask ph-sensitive"),children:[(0,e.jsx)(xe,{name:"GitHub",brandKey:"github",compact:!0,className:"size-4! rounded-sm bg-transparent"}),s.providerAccountLabel]})]})]}),(0,e.jsx)(L,{to:`/apps/chat/${s.id}/access`,className:"inline-block text-xs text-muted-foreground underline underline-offset-4",children:g.kind==="error"?"Repository access unavailable":k===void 0?"Repository access":k===0?"No repositories enabled":`${k} ${k===1?"repository":"repositories"} enabled`})]})]})]}),i.length>0&&(0,e.jsxs)("section",{className:"space-y-2",children:[(0,e.jsx)("h2",{className:"text-sm font-medium",children:"Before your first review"}),i.map(u=>(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:u.detail},u.key))]}),(0,e.jsxs)("section",{className:"space-y-3",children:[(0,e.jsxs)("div",{className:"space-y-1",children:[(0,e.jsx)("h2",{className:"text-base font-semibold",children:"Try your bot"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:k===0?"Enable a repository in Access to try your bot.":"Post this on a pull request in an enabled repository."})]}),(0,e.jsxs)(Us,{text:h,ariaLabel:"Copy mention",title:"Copy mention",containerClassName:"w-full",className:"flex w-full items-center gap-3 rounded-md border border-border bg-muted/30 p-3 text-left outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,e.jsx)("code",{className:"min-w-0 flex-1 break-words text-sm",children:h}),(0,e.jsx)(X,{className:"size-4 shrink-0 text-muted-foreground"})]})]}),(0,e.jsx)(wt,{endpoint:s,avatarUrl:ls(ds(m.appearance,s.assignedAgentId),512,1,"rest")}),(0,e.jsx)(ms,{children:(0,e.jsx)(C,{onClick:l,children:"Done"})})]})})})}t(Jt,"GitHubConnectionComplete");var ks=["settings","access","reviews","conversations","activity"],Yt=ks.map(s=>({value:s,label:s[0].toUpperCase()+s.slice(1)})),Ns={speko:"Speko",agentmail:"AgentMail",slack:"Slack",github:"GitHub",discord:"Discord","microsoft-teams":"Microsoft Teams",telegram:"Telegram","imessage-photon":"iMessage Photon"},ns={speko:{reconnect:"Reverify this voice persona and update its signed session tools. Existing task assignments stay attached to their history.",remove:"Stop this connection from accepting voice requests. Accepted work and task history remain in Microvac."},agentmail:{reconnect:"Reconnect the same email inbox.",remove:"Disconnect email and retain task history."},slack:{reconnect:"Reconnect verifies or replaces credentials for this same Slack app. It does not reinstall the app or change its workspace or channel membership.",remove:"Microvac archives the endpoint, stops new ingress, and retires its saved Slack credentials. It does not uninstall the Slack app: the app remains installed, and its bot remains in channels, until you remove them in Slack."},github:{reconnect:"Reconnect verifies this same App and installation, then updates its webhook URL, secret, and secure delivery settings. It does not reinstall the App or change repository access.",remove:"Microvac archives the endpoint, stops new ingress, and retires its saved App key and webhook secret. It does not uninstall the GitHub App: the App, its installations, and its webhook settings remain until you remove or update them on GitHub."},discord:{reconnect:"Reconnect verifies this same Discord application and server installation. It does not add or remove the bot from the server.",remove:"Microvac archives the endpoint, stops its Microvac Gateway connection, and retires its saved bot token. It does not uninstall the bot: the bot remains in the Discord server, and the application remains in the Developer Portal, until you remove them there."},"microsoft-teams":{reconnect:"Reconnect verifies this same Microsoft app, tenant, and bot identity. It does not upload or reinstall the Teams app.",remove:"Microvac archives the endpoint, stops new ingress, and retires its saved client secret. It does not uninstall the Teams app: the Entra app registration, Azure Bot, custom Teams app, and Teams installations remain until you remove them in Microsoft."},"imessage-photon":{reconnect:"Reconnect verifies the same Photon project and line allocation, then recovers eligible missed messages.",remove:"Disconnect archives this channel and removes its saved secret. Your Photon project, number, subscription, and Messages history remain in Photon."},telegram:{reconnect:"Reconnect verifies this same BotFather bot and automatically refreshes its Microvac webhook and command menu.",remove:"Microvac archives the endpoint and queues durable removal of its Telegram webhook and command menu. After Telegram confirms that cleanup, Microvac retires the saved token. The BotFather bot and its chat memberships remain until you remove them in Telegram."}},Zt={delivery:"Inbound delivery",publication:"Outbound publication",action:"Provider action",health:"Connection health",repair:"Connection repair"},ws=new Set(["failed"]),ee={staleTime:0,refetchInterval:5e3,refetchIntervalInBackground:!1};function Xt(s){return s.fileTransfer||!s.replayable||!ws.has(s.status)?!1:s.kind==="delivery"?s.status==="failed":s.kind==="publication"}t(Xt,"isReplayEligible");function me(s){const a=s.resolutionActions??[];return s.fileTransfer?s.kind!=="publication"||!Number.isSafeInteger(s.fileTransfer.version)||s.fileTransfer.version<1?[]:["consent_unknown","upload_unknown","file_info_unknown","conflict"].includes(s.fileTransfer.phase)?s.fileTransfer.phase==="file_info_unknown"?a:a.filter(n=>n==="cancel"):[]:a}t(me,"activityResolutionActions");function ea(s){const a=s.fileTransfer?.phase;return a==="file_info_unknown"?"The file upload was confirmed, but its Teams notification was not. Check Teams first. Retrying sends only that notification, not the file bytes, and may create a duplicate card.":a==="consent_unknown"?"The consent card may have reached Teams. File delivery is not confirmed. Cancelling here does not remove any card already sent.":a?"The file may already exist in OneDrive. Cancelling stops this Microvac transfer; it does not delete remote bytes. Uploads cannot be marked delivered or retried from this uncertain state.":"Microvac lost confirmation after sending. Check the provider conversation first. Retrying can create a duplicate message."}t(ea,"activityResolutionDescription");function sa(s){return(s.kind==="publication"||s.kind==="action")&&s.status==="delivery_unknown"&&me(s).length>0}t(sa,"isResolutionEligible");function ta(s,a){return!(s==="microsoft-teams"&&(a==="direct_message"||a==="group_chat"))}t(ta,"isIndividuallyToggleableResource");function aa(s){return ws.has(s.status)?"Reason":"Details"}t(aa,"activityDetailLabel");function na(s){const a=s.status==="active"?null:{draft:"Connection setup is incomplete.",verifying:"Connection verification is in progress.",paused:"Connection is paused. Resume it to receive new messages.",attention:"Connection needs attention.",revoked:"Connection access is revoked. Reconnect to verify access.",archived:"Connection has been removed from Microvac."}[s.status];return{message:a??s.healthMessage??null,previousHealth:a?s.healthMessage??null:null,error:s.lastError??null,errorLabel:["active","attention","revoked"].includes(s.status)?"Reason":"Last reported error"}}t(na,"connectionHealthPresentation");function Na(){const{userId:s,settled:a}=Qs(),{endpointId:n="",tab:l,reviewId:d}=Js(),x=d?"reviews":l??"settings",g=ks.includes(x)?x:null,m=us(),h=at(),k=(0,b.useRef)(null),i=h.state?.githubConnectionComplete,{setBreadcrumbs:u}=st(),p=U({queryKey:$.chatEndpoints.detail(n),queryFn:t(()=>_.get(n),"queryFn"),enabled:!!(n&&g),...ee,refetchInterval:g==="activity"||g==="conversations"?ee.refetchInterval:!1}),r=p.data,o=D(p),f=U({queryKey:$.agents.detail(r?.assignedAgentId??""),queryFn:t(()=>Ae.get(r.assignedAgentId),"queryFn"),enabled:r?.provider==="github"}),[A,w]=(0,b.useState)(null),I=U({queryKey:$.agents.detail(r?.assignedAgentId??""),queryFn:t(()=>Ae.get(r.assignedAgentId,r.companyId),"queryFn"),enabled:!!r?.assignedAgentId});if((0,b.useEffect)(()=>{if(!(!r||!g))return u([{label:"Connectors",href:"/apps"},{label:`${r.assignedAgentName} · ${Ns[r.provider]}`,href:`/apps/chat/${r.id}/settings`},...d?[{label:"Reviews",href:`/apps/chat/${r.id}/reviews`},{label:"Review"}]:[{label:Yt.find(T=>T.value===g)?.label??"Settings"}]]),()=>u([])},[g,r,d,u]),!g)return(0,e.jsx)(rt,{replace:!0,to:`/apps/chat/${n}/settings`});if(p.isLoading||o.kind==="reconnecting")return(0,e.jsxs)("div",{className:"flex items-center gap-2 text-sm text-muted-foreground",children:[(0,e.jsx)(W,{className:"h-4 w-4 animate-spin"}),"Loading connection…"]});if(o.kind==="error"||!r)return(0,e.jsx)(G,{size:"page",error:p.error,action:"load the connection",onRetry:o.retry,retrying:o.isFetching});if(r.provider==="agentmail"&&g==="settings")return(0,e.jsxs)("div",{className:"space-y-7",children:[(0,e.jsx)(yt,{endpointId:r.id,companyId:r.companyId,assignedAgentName:r.assignedAgentName},r.id),(0,e.jsx)(rs,{endpoint:r})]});const E=r.setup?.step!=="complete"&&!(r.provider==="slack"&&r.setup?.step==="test")&&["draft","verifying","attention","revoked"].includes(r.status),j=r.setup?.slackRegistration?.appId,y=r.provider==="slack"?j?`https://api.slack.com/apps/${encodeURIComponent(j)}/oauth`:"https://api.slack.com/apps":null;return(0,e.jsxs)("div",{className:"max-w-5xl space-y-6 pb-12",children:[(0,e.jsxs)("header",{className:"flex flex-wrap items-start justify-between gap-4",children:[(0,e.jsxs)("div",{className:"flex min-w-0 items-center gap-3",children:[(0,e.jsx)(xs,{agent:I.data??{id:r.assignedAgentId,name:r.assignedAgentName},size:r.provider==="github"?64:48}),(0,e.jsxs)("div",{className:"min-w-0",children:[(0,e.jsxs)("h1",{ref:k,tabIndex:-1,className:r.provider==="speko"?"flex items-center gap-3 text-xl font-bold":"text-xl font-bold",children:[r.provider==="speko"&&(0,e.jsx)(xe,{name:"Speko",brandKey:"speko",size:36}),r.provider==="github"?r.botLabel??r.assignedAgentName:r.assignedAgentName,r.provider==="speko"?" in Speko":""]}),(0,e.jsx)("p",{className:z("mt-1 flex flex-wrap items-center gap-2 text-sm text-muted-foreground",M),children:r.provider==="github"?(0,e.jsxs)(e.Fragment,{children:[(0,e.jsx)(xe,{name:"GitHub",brandKey:"github",compact:!0,className:"size-4! rounded-sm bg-transparent"}),(0,e.jsx)(L,{to:`/agents/${r.assignedAgentId}`,className:"hover:underline",children:r.assignedAgentName}),r.providerAccountLabel&&(0,e.jsxs)("span",{children:["· ",r.providerAccountLabel]})]}):r.providerAccountLabel??(r.provider==="agentmail"?r.botExternalId??"Email connection":"Chat connection")}),r.provider==="github"&&(0,e.jsxs)("div",{className:"mt-1 flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,e.jsx)(Ct,{endpoint:r}),(0,e.jsx)(kt,{endpoint:r,avatarUrl:f.data?ls(ds(f.data.appearance,r.assignedAgentId),512,1,"rest"):void 0})]}),r.provider==="imessage-photon"&&r.botExternalId&&r.photonAllocation!=="shared"&&(0,e.jsxs)("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-sm",children:[(0,e.jsx)("span",{children:r.botExternalId}),(0,e.jsxs)(C,{variant:"ghost",size:"sm","aria-label":"Copy dedicated number",onClick:t(async()=>{try{await oe(r.botExternalId),w("Number copied")}catch{w("Could not copy the number. Select and copy it manually.")}},"onClick"),children:[(0,e.jsx)(X,{className:"size-4"}),"Copy number"]}),(0,e.jsx)("span",{role:"status",className:"text-muted-foreground",children:A})]})]})]}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[r.provider==="speko"&&(0,e.jsxs)("a",{href:"https://platform.speko.ai/agents",target:"_blank",rel:"noreferrer",className:"inline-flex items-center gap-1 text-sm text-primary underline",children:["Open Speko",(0,e.jsx)(ue,{className:"size-3.5","aria-hidden":"true"})]}),r.provider==="slack"&&!E&&(0,e.jsx)(C,{asChild:!0,variant:"outline",children:(0,e.jsxs)("a",{href:Nt(r,a?s:null),target:"_blank",rel:"noopener noreferrer",children:["Open Slack ",(0,e.jsx)(ue,{className:"size-4"})]})}),y&&(0,e.jsx)(C,{asChild:!0,variant:"outline",children:(0,e.jsxs)("a",{href:y,target:"_blank",rel:"noopener noreferrer",children:["Open Slack configuration ",(0,e.jsx)(ue,{className:"size-4"})]})}),E?(0,e.jsx)(C,{variant:"outline",onClick:t(()=>m(`/apps/chat/connect?provider=${r.provider}&purpose=chat&resume=${r.id}`),"onClick"),children:"Continue setup"}):null,r.status!=="active"&&(0,e.jsx)(Te,{status:r.status,className:r.provider==="speko"?"text-foreground":void 0})]})]}),(0,e.jsxs)("div",{className:z("space-y-6",M),children:[r.provider==="github"&&(0,e.jsx)(St,{endpoint:r}),g==="settings"&&r.provider==="speko"&&r.status==="active"&&(0,e.jsxs)("div",{className:"space-y-6",children:[(0,e.jsx)(bt,{companyId:r.companyId,endpointId:r.id}),(0,e.jsx)(xt,{companyId:r.companyId,endpointId:r.id}),(0,e.jsx)(pt,{companyId:r.companyId,endpointId:r.id,agentId:r.assignedAgentId})]}),r.provider==="slack"&&(0,e.jsx)(Rt,{endpointId:r.id},r.id),r.provider==="github"&&(0,e.jsx)("div",{hidden:g!=="settings"&&g!=="access",children:(0,e.jsx)(Ot,{endpoint:r,view:g==="access"?"access":"settings"},r.id)}),g==="settings"&&r.provider!=="github"&&(0,e.jsx)(ia,{endpointId:r.id,endpoint:r}),g==="settings"&&(0,e.jsx)(rs,{endpoint:r}),g==="reviews"&&r.provider==="github"&&(0,e.jsx)(Wt,{endpointId:r.id,reviewId:d}),g==="access"&&r.provider==="speko"&&(0,e.jsxs)("section",{className:"max-w-3xl space-y-3",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Private voice access"}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Browser calls use the signed-in Microvac user’s current company access. Each call stays bound to its selected agent and task."}),(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Outgoing calls use your saved callback number and opt-in. For a private incoming call, enter the code spoken on the phone in signed-in Microvac and select a task to approve that live call. Incoming calls can start a new conversation task without sign-in, under a task-scoped low-trust policy. Private mode is optional and requires approval before accessing existing tasks."})]}),g==="access"&&r.provider==="agentmail"&&(0,e.jsx)(ra,{endpoint:r}),g==="access"&&r.provider!=="speko"&&r.provider!=="github"&&r.provider!=="agentmail"&&(0,e.jsx)(oa,{endpointId:r.id,allowUnlinked:r.allowUnlinkedPeople,endpoint:r}),g==="conversations"&&(0,e.jsx)(la,{endpointId:r.id,provider:r.provider}),g==="activity"&&(0,e.jsx)(ca,{endpointId:r.id,endpoint:r}),r.provider==="github"&&g==="settings"&&r.status==="active"&&r.setup?.step==="complete"&&i?.endpointId===r.id&&(0,e.jsx)(Jt,{endpoint:r,agent:f.data,runtimeChecks:i.runtimeChecks,onClose:t(()=>{const{githubConnectionComplete:T,...S}=h.state;m({pathname:h.pathname,search:h.search,hash:h.hash},{replace:!0,state:S})},"onClose"),onCloseAutoFocus:t(()=>k.current?.focus(),"onCloseAutoFocus")})]})]})}t(Na,"ChatEndpointDetail");function rs({endpoint:s}){const a=Y();return(0,e.jsx)("section",{className:"max-w-3xl py-5",children:(0,e.jsx)($e,{companyId:s.companyId,value:s.executionDefaults,onSave:t(async n=>{const l=await _.update(s.id,{executionDefaults:n});a.setQueryData($.chatEndpoints.detail(s.id),l)},"onSave")},s.id)})}t(rs,"EndpointExecutionDefaults");function ra({endpoint:s}){const a=U({queryKey:$.tools.connection(s.connectionId??""),queryFn:t(()=>Ds.getConnection(s.connectionId),"queryFn"),enabled:!!s.connectionId}),n=U({queryKey:$.agents.list(s.companyId),queryFn:t(()=>Ae.list(s.companyId),"queryFn")}),l=D(n),d=D(a);if(!s.connectionId)return(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:"Connection access could not be loaded."});if(l.kind==="error"||d.kind==="error")return(0,e.jsx)(G,{error:l.kind==="error"?n.error:a.error,action:"load connection access",onRetry:t(()=>{l.retry(),d.retry()},"onRetry"),retrying:n.isFetching||a.isFetching});if(n.isPending||a.isPending||l.kind==="reconnecting"||d.kind==="reconnecting")return(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading access…"});const x=a.data?.config?.credentialConnectionId,g=typeof x=="string"?x:s.connectionId;return(0,e.jsxs)("section",{className:"max-w-3xl space-y-4",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Access"}),g!==s.connectionId&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"These settings apply to the saved AgentMail account and all inboxes using it."}),(0,e.jsx)(vt,{companyId:s.companyId,connectionId:g,agents:n.data??[]},g)]})}t(ra,"EmailAccess");function ia({endpointId:s,endpoint:a}){const n=Y(),{pushToast:l}=Pe(),d=U({queryKey:$.chatEndpoints.resources(s),queryFn:t(()=>_.listResources(s),"queryFn"),enabled:a.provider!=="speko",...a.provider==="slack"?ee:{}}),x=D(d),g=Q({mutationFn:t(i=>_.updateResources(s,[i]),"mutationFn"),onSuccess:t(i=>n.setQueryData($.chatEndpoints.resources(s),i),"onSuccess"),onError:t(i=>l({title:"Couldn't update destination",body:F(i).body,tone:"error"}),"onError")}),m=Q({mutationFn:_.update.bind(null,s),onSuccess:t(i=>n.setQueryData($.chatEndpoints.detail(s),i),"onSuccess"),onError:t(i=>l({title:"Couldn't update settings",body:F(i).body,tone:"error"}),"onError")});if(a.provider==="speko")return null;const h=(d.data??[]).filter(i=>ta(a.provider,i.type)),k=t((i,u)=>g.mutate({id:i.id,enabled:u}),"toggleResource");return(0,e.jsxs)("section",{className:"max-w-3xl space-y-7",children:[a.provider==="imessage-photon"&&(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:a.photonAllocation==="shared"?"Shared Photon project · direct messages only. Enroll senders in Photon and link their Messages identities in Access. Groups cannot be enabled.":"Enable each group individually. Agent replies are visible to everyone in that group; only authorized senders can start work."}),a.provider==="telegram"&&(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Telegram group command"}),(0,e.jsxs)("div",{className:"rounded-lg border border-border p-3 text-sm",children:[(0,e.jsxs)("code",{children:["/task@",a.botUsername?.replace(/^@/,"")??"bot_username"," ","<request>"]}),(0,e.jsx)("p",{className:"mt-2 text-muted-foreground",children:"Telegram's default privacy mode does not deliver ordinary mentions to bots. Use this command to start or continue group work, or reply directly to a message from the bot."})]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:a.provider==="slack"?"Allowed Channels":"Destinations"}),x.kind==="error"?(0,e.jsx)(G,{size:"inline",error:d.error,action:a.provider==="slack"?"load the channels":"load the destinations",onRetry:x.retry,retrying:x.isFetching}):d.isLoading||x.kind==="reconnecting"?(0,e.jsx)("p",{className:"text-sm text-muted-foreground",children:"Loading destinations…"}):h.length===0&&a.provider!=="slack"?(0,e.jsx)("p",{className:"rounded-lg border border-dashed border-border p-4 text-sm text-muted-foreground",children:"No destinations yet."}):(0,e.jsxs)("div",{className:a.provider==="slack"?"space-y-1":"divide-y divide-border border-y border-border",children:[h.map(i=>(0,e.jsxs)("div",{className:"py-3 space-y-3",children:[(0,e.jsxs)("div",{className:"flex items-center gap-3",children:[(0,e.jsxs)("div",{className:z("min-w-0 flex-1",M),children:[(0,e.jsx)("p",{className:"truncate text-sm font-medium",children:i.label}),(i.availability!=="available"||i.detail)&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:i.availability==="available"?i.detail:"Unavailable at the provider"}),i.participants?.length?(0,e.jsxs)("p",{className:"mt-1 break-words text-xs text-muted-foreground",children:["Participants: ",i.participants.join(", ")]}):null]}),(0,e.jsx)(fe,{"aria-label":`Enable ${i.label}`,checked:i.enabled,disabled:a.photonAllocation==="shared"||i.availability!=="available"||g.isPending,onCheckedChange:t(u=>k(i,u),"onCheckedChange")})]}),(0,e.jsxs)("details",{className:"text-sm",children:[(0,e.jsx)("summary",{className:"cursor-pointer text-muted-foreground",children:"Task defaults"}),(0,e.jsx)("div",{className:"pt-3",children:(0,e.jsx)($e,{companyId:a.companyId,value:i.executionDefaults,resource:!0,onSave:t(async u=>{const p=await _.updateResources(s,[{id:i.id,executionDefaults:u}]);n.setQueryData($.chatEndpoints.resources(s),p)},"onSave")})})]})]},i.id)),a.provider==="slack"&&(0,e.jsxs)("p",{className:"py-3 text-sm text-muted-foreground",children:["Invite ",a.assignedAgentName," to a channel to add it"]})]})]}),a.provider!=="github"&&(0,e.jsxs)("div",{className:"space-y-3",children:[(0,e.jsx)(he,{label:"Allow direct messages",detail:a.provider==="discord"?"People must also enable Direct Messages in their shared Discord server’s Privacy Settings.":void 0,checked:a.allowDirectMessages??!1,pending:m.isPending,onChange:t(i=>m.mutate({allowDirectMessages:i}),"onChange")}),a.provider==="slack"&&(0,e.jsx)(he,{label:"Require at-mention in channels",detail:"In channels, require an @mention to start a conversation with this bot. Replies in existing threads and direct messages do not require an @mention. Direct messages must be allowed above.",checked:a.requireAtMention??!1,pending:m.isPending,onChange:t(i=>m.mutate({requireAtMention:i}),"onChange")}),a.provider==="microsoft-teams"&&(0,e.jsx)(he,{label:"Allow group chats",detail:"The bot may participate in group chats where it is installed.",checked:a.allowGroupChats??!1,pending:m.isPending,onChange:t(i=>m.mutate({allowGroupChats:i}),"onChange")})]}),a.provider==="slack"&&(0,e.jsx)(qt,{value:a.communicationInstructions??"",onSave:t(async i=>{const u=await _.update(s,{communicationInstructions:i});n.setQueryData($.chatEndpoints.detail(s),u)},"onSave")},a.id),a.provider==="slack"&&(0,e.jsx)(Ie,{label:"Slack tools",children:(0,e.jsx)($t,{companyId:a.companyId,endpointId:s})})]})}t(ia,"Settings");function he({label:s,detail:a,checked:n,pending:l,onChange:d}){return(0,e.jsxs)("div",{className:"flex items-center gap-3 py-3",children:[(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsx)("p",{className:"text-sm font-medium",children:s}),a&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:a})]}),(0,e.jsx)(fe,{"aria-label":s,checked:n,disabled:l,onCheckedChange:d})]})}t(he,"SettingToggle");function oa({endpointId:s,allowUnlinked:a,endpoint:n}){const l=Y(),{pushToast:d}=Pe(),[x,g]=(0,b.useState)(null),[m,h]=(0,b.useState)(!1),[k,i]=(0,b.useState)(!1),[u,p]=(0,b.useState)(null),r=`${n.setup?.slackApp?.command??n.setup?.command??"/paperclip"} connect`,o=U({queryKey:$.chatEndpoints.principals(s),queryFn:t(()=>_.listPrincipals(s),"queryFn"),refetchInterval:5e3}),f=D(o),A=Q({mutationFn:t(j=>_.update(s,{allowUnlinkedPeople:j}),"mutationFn"),onSuccess:t(j=>l.setQueryData($.chatEndpoints.detail(s),j),"onSuccess"),onError:t(j=>d({title:"Couldn’t update access",body:F(j).body,tone:"error"}),"onError")}),w=Q({mutationFn:t(j=>_.createLinkIntent(s,j),"mutationFn"),onSuccess:t(({confirmationUrl:j})=>{g(new URL(j,window.location.origin).toString())},"onSuccess"),onError:t(j=>d({title:"Couldn't create identity link",body:F(j).body,tone:"error"}),"onError")}),I=Q({mutationFn:t(j=>_.revokeLink(s,j),"mutationFn"),onSuccess:t(()=>l.invalidateQueries({queryKey:$.chatEndpoints.principals(s)}),"onSuccess"),onError:t(j=>d({title:"Couldn't disconnect account",body:F(j).body,tone:"error"}),"onError")}),E=o.data??[];return(0,e.jsxs)("section",{className:"max-w-3xl space-y-7",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"People"}),n.provider==="slack"&&(0,e.jsxs)(ye,{children:[(0,e.jsx)(et,{asChild:!0,children:(0,e.jsx)(C,{children:"Invite people"})}),(0,e.jsxs)(be,{className:"ph-mask ph-sensitive",children:[(0,e.jsxs)(Re,{children:[(0,e.jsxs)(ve,{children:["Invite people to talk to ",n.assignedAgentName]}),(0,e.jsx)(Ee,{children:"Share these instructions with someone in your Slack workspace."})]}),(0,e.jsxs)("div",{className:"space-y-4 text-sm",children:[(0,e.jsxs)("ol",{className:"list-decimal space-y-3 pl-5",children:[(0,e.jsxs)("li",{children:["Send ",(0,e.jsx)("code",{className:"font-mono",children:r})," in Slack."]}),(0,e.jsx)("li",{children:"Open the bot’s private link and sign in to Microvac to confirm your Slack account."}),(0,e.jsx)("li",{children:"If you’re new to this organization, request access and wait for an admin to approve."})]}),(0,e.jsx)("p",{className:"text-muted-foreground",children:"The confirmation link is personal and expires after 15 minutes."}),(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3",children:[(0,e.jsxs)(C,{variant:"ghost",onClick:t(()=>{oe(r).then(()=>h(!0),()=>d({title:"Couldn't copy the command",tone:"error"}))},"onClick"),children:[m?(0,e.jsx)(pe,{className:"size-4"}):(0,e.jsx)(X,{className:"size-4"}),m?"Copied":"Copy command"]}),(0,e.jsxs)(C,{onClick:t(()=>{const j=n.providerAccountId?`https://app.slack.com/client/${encodeURIComponent(n.providerAccountId)}`:"https://app.slack.com/";oe(`Talk to ${n.assignedAgentName} in Slack: ${j}
5
+ Send ${r}, then open the bot’s private link and sign in to Microvac to confirm your account. If you’re new to the organization, request access for an admin to approve.`).then(()=>i(!0),()=>d({title:"Couldn't copy invitation",tone:"error"}))},"onClick"),children:[k?(0,e.jsx)(pe,{className:"size-4"}):(0,e.jsx)(X,{className:"size-4"}),k?"Invitation copied":"Copy invitation"]})]})]})]})]})]}),(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["People with linked accounts use their own Microvac permissions. ",(0,e.jsx)(L,{className:"underline underline-offset-4",to:"/company/settings/members",children:"Manage members"})]}),x&&(0,e.jsxs)("div",{className:"space-y-2 border-y border-border py-3",children:[(0,e.jsxs)("p",{className:z("text-sm font-medium","ph-mask ph-sensitive"),children:["Confirm ",u??"this account"]}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:"Share only with this person. They must sign in and confirm their own account."}),(0,e.jsx)("p",{className:z("break-all text-xs text-muted-foreground","ph-no-capture"),children:x}),(0,e.jsxs)(C,{size:"sm",variant:"outline",onClick:t(()=>{oe(x).then(()=>d({title:"Confirmation link copied",tone:"success"}),()=>d({title:"Couldn't copy the link",body:"Select and copy it manually.",tone:"error"}))},"onClick"),children:[(0,e.jsx)(X,{}),"Copy link"]})]}),(0,e.jsx)("div",{className:"space-y-2",children:o.isPending||f.kind==="reconnecting"?(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading people…"}):f.kind==="error"?(0,e.jsx)(G,{size:"inline",error:o.error,action:"load people",onRetry:f.retry,retrying:f.isFetching}):E.length===0?(0,e.jsx)("p",{className:"rounded-lg border border-dashed border-border p-4 text-sm text-muted-foreground",children:"No linked accounts yet. Invite someone to connect."}):(0,e.jsx)("div",{role:"list","aria-label":"People",className:"divide-y divide-border border-y border-border",children:E.map(j=>(0,e.jsxs)("div",{role:"listitem",className:"flex flex-wrap items-center gap-3 py-3",children:[(0,e.jsxs)("div",{className:"flex min-w-0 flex-1 items-center gap-2",children:[(0,e.jsxs)(Hs,{"aria-hidden":"true",children:[j.paperclipUserImage&&(0,e.jsx)(Os,{src:j.paperclipUserImage,alt:""}),(0,e.jsx)(qs,{children:zs(j.paperclipUserLabel??j.externalLabel)})]}),(0,e.jsxs)("div",{className:z("min-w-0",M),children:[(0,e.jsx)("p",{className:"truncate text-sm",title:j.paperclipUserLabel??j.externalLabel,children:j.paperclipUserLabel??j.externalLabel}),(j.status!=="linked"||j.externalLabel!==j.paperclipUserLabel)&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:j.status==="revoked"?"Disconnected":j.status==="linked"?j.externalLabel:"Waiting for account confirmation"})]})]}),j.status==="linked"?(0,e.jsxs)(C,{size:"sm",variant:"ghost",disabled:I.isPending,onClick:t(()=>I.mutate(j.principalId),"onClick"),children:[(0,e.jsx)(Tt,{}),"Disconnect"]}):(0,e.jsx)(C,{size:"sm",variant:"outline",disabled:w.isPending,onClick:t(()=>{g(null),p(j.externalLabel),w.mutate(j.principalId)},"onClick"),children:"Create confirmation link"})]},j.id))})}),(0,e.jsx)(Ie,{label:"Guest access",children:(0,e.jsx)(he,{label:"Allow unlinked people",detail:"People without linked accounts can start isolated tasks. They cannot approve actions, spend, or manage access. Requests are refused when isolation is unavailable.",checked:a,pending:A.isPending,onChange:t(j=>A.mutate(j),"onChange")})}),n.provider==="slack"&&(0,e.jsx)(Ie,{label:"Personal Slack search",children:(0,e.jsx)(_t,{companyId:n.companyId,endpointId:s})})]})}t(oa,"Access");function la({endpointId:s,provider:a}){const n=U({queryKey:$.chatEndpoints.conversations(s),queryFn:t(()=>_.listConversations(s),"queryFn"),...ee}),l=D(n);return(0,e.jsx)("section",{className:"space-y-4",children:n.isPending||l.kind==="reconnecting"?(0,e.jsx)("p",{role:"status",className:"text-sm text-muted-foreground",children:"Loading conversations…"}):l.kind==="error"?(0,e.jsx)(G,{error:n.error,action:"load the conversations",onRetry:l.retry,retrying:l.isFetching}):(0,e.jsx)(Ft,{rows:n.data??[],provider:a})})}t(la,"Conversations");function ca({endpointId:s,endpoint:a}){const n=Y(),l=us(),{pushToast:d}=Pe(),[x,g]=(0,b.useState)(!1),[m,h]=(0,b.useState)(null),[k,i]=(0,b.useState)([void 0]),u=k[k.length-1];(0,b.useEffect)(()=>i([void 0]),[s]);const p=U({queryKey:[...$.chatEndpoints.activity(s),u??null],queryFn:t(()=>_.listActivityPage(s,u),"queryFn"),...ee,refetchInterval:u?!1:ee.refetchInterval}),r=D(p),o=r.kind==="ready"||r.kind==="stale",f=gt(a.companyId,s,a.provider==="speko"&&!u),A=Q({mutationFn:t(c=>c.kind==="publication"?_.replayPublication(s,c.id):_.replayDelivery(s,c.id),"mutationFn"),onSuccess:t(async(c,v)=>{await n.invalidateQueries({queryKey:$.chatEndpoints.activity(s)}),d({title:`${v.kind==="publication"?"Publication":"Delivery"} queued for replay`,tone:"success"})},"onSuccess"),onError:t(c=>d({title:"Couldn't replay activity",body:F(c).body,tone:"error"}),"onError")}),w=Q({mutationFn:t(c=>c.item.kind==="publication"?_.resolvePublication(s,c.item.id,c.action,c.item.fileTransfer?{phase:c.item.fileTransfer.phase,version:c.item.fileTransfer.version}:void 0):_.resolveAction(s,c.item.id,c.action),"mutationFn"),onSuccess:t(async(c,v)=>{h(null),await n.invalidateQueries({queryKey:$.chatEndpoints.activity(s)}),d({title:v.item.actionType==="slash_task_start"&&v.action==="retry_anyway"?"Task start retried":v.item.actionType==="slash_task_start"?"Task start cancelled":v.item.actionType==="provider_effect"&&v.action==="mark_delivered"?"Provider reply marked delivered":v.item.actionType==="provider_effect"&&v.action==="retry_anyway"?"Provider reply retried":v.item.actionType==="provider_effect"?"Provider reply cancelled":v.action==="mark_delivered"?"Publication marked delivered":v.action==="retry_anyway"?"Publication queued for retry":"Publication cancelled",tone:"success"})},"onSuccess"),onError:t(c=>d({title:"Couldn't resolve activity",body:F(c).body,tone:"error"}),"onError")}),I=Q({mutationFn:t(async c=>a.provider==="agentmail"?Rs.control(s,c):_.setup(s,{action:c}),"mutationFn"),onSuccess:t(async(c,v)=>{if(await n.invalidateQueries({queryKey:$.chatEndpoints.list(c.companyId)}),a.provider==="agentmail"&&await Promise.all([n.invalidateQueries({queryKey:["email-inboxes",c.companyId]}),n.invalidateQueries({queryKey:$.chatEndpoints.detail(s)})]),v==="remove"){l("/apps");return}a.provider!=="agentmail"&&n.setQueryData($.chatEndpoints.detail(s),c),d({title:v==="pause"?"Connection paused":"Connection resumed",tone:"success"})},"onSuccess"),onError:t(c=>d({title:"Couldn't update connection",body:F(c).body,tone:"error"}),"onError")}),E=p.data?.items??[],j=[...r.kind!=="error"?E.map(c=>({kind:"connection",id:`connection:${c.id}`,createdAt:c.createdAt,item:c})):[],...!u&&!f.error?f.entries.map(c=>({kind:"call",id:`call:${c.session.id}`,createdAt:c.session.createdAt,entry:c})):[],...!u&&!f.incomingError?f.unapprovedCalls.map(c=>({kind:"unapproved_call",id:`unapproved:${c.id}`,createdAt:c.createdAt,call:c})):[]].sort((c,v)=>v.createdAt.localeCompare(c.createdAt)||c.id.localeCompare(v.id)),{status:y}=a,T=na(a),S=I.variables,R=a.setup?.callbackSurfaces?[["Events API",a.setup.callbackSurfaces.events],["Interactivity",a.setup.callbackSurfaces.interactivity],["Slash command",a.setup.callbackSurfaces.slashCommands]]:[];return(0,e.jsxs)("section",{className:"space-y-5","aria-label":"Connection activity",children:[(0,e.jsx)("h2",{className:"text-lg font-semibold",children:"Connection activity"}),(y!=="active"&&T.message||T.error)&&(0,e.jsxs)("div",{className:`flex items-start gap-2 rounded-lg border p-3 text-sm ${y==="attention"||y==="revoked"?"border-destructive/40 bg-destructive/5 text-destructive":"border-border bg-muted/30 text-foreground"}`,children:[(y==="attention"||y==="revoked")&&(0,e.jsx)(Xs,{className:"mt-0.5 h-4 w-4 shrink-0"}),(0,e.jsxs)("div",{children:[T.message&&(0,e.jsx)("p",{children:T.message}),T.previousHealth&&(0,e.jsxs)("p",{className:"mt-1 text-xs opacity-80",children:[(0,e.jsx)("span",{className:"font-medium",children:"Last reported health:"})," ",T.previousHealth]}),T.error&&(0,e.jsxs)("p",{className:"mt-1 text-xs opacity-80",children:[(0,e.jsxs)("span",{className:"font-medium",children:[T.errorLabel,":"]})," ",T.error]})]})]}),(0,e.jsxs)("details",{className:"group rounded-lg border border-border",children:[(0,e.jsxs)("summary",{className:"flex cursor-pointer list-none items-center justify-between gap-3 p-4 text-sm font-medium chat-connection-health-summary",children:[(0,e.jsx)("span",{children:"Connection health and controls"}),(0,e.jsxs)("span",{className:"flex items-center gap-2",children:[a.setup?.callbacksNeedUpdate&&(0,e.jsx)("span",{className:"text-xs text-(--status-task-blocked)",children:"Callback URLs need attention"}),(0,e.jsx)(tt,{className:"size-4 text-muted-foreground transition-transform group-open:rotate-180"})]})]}),(0,e.jsxs)("div",{className:"space-y-5 border-t border-border p-4",children:[a.provider==="slack"&&R.length>0&&(0,e.jsxs)("div",{className:"space-y-3 text-sm",children:[(0,e.jsx)("p",{className:"font-medium",children:"Slack callback health"}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:a.setup?.callbacksNeedUpdate?"Slack callback URLs need an update. Save the current App Manifest, then exercise Events, Interactivity, and the registered command again.":"Microvac records each callback surface independently after Slack successfully calls it."}),(0,e.jsx)("div",{className:"divide-y divide-border border-y border-border",children:R.map(([c,v])=>(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 py-2",children:[(0,e.jsx)("p",{className:"text-xs font-medium",children:c}),(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:v.status==="current"?"Current":v.status==="stale"?"Stale URL":"Not observed"}),v.observedAt&&(0,e.jsxs)("p",{className:"text-xs text-muted-foreground",children:["Last observed"," ",(0,e.jsx)("time",{dateTime:v.observedAt,title:v.observedAt,className:"font-mono",children:le(v.observedAt,{includeSeconds:!0})})]})]},c))})]}),y!=="archived"&&(0,e.jsxs)("div",{className:"space-y-3 pt-2",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-2",children:[y==="active"&&(0,e.jsxs)(C,{variant:"outline",disabled:I.isPending,onClick:t(()=>I.mutate("pause"),"onClick"),children:[I.isPending&&S==="pause"?(0,e.jsx)(W,{className:"animate-spin"}):(0,e.jsx)(Vs,{}),"Pause"]}),y==="paused"&&(0,e.jsxs)(C,{variant:"outline",disabled:I.isPending,onClick:t(()=>I.mutate("resume"),"onClick"),children:[I.isPending&&S==="resume"?(0,e.jsx)(W,{className:"animate-spin"}):(0,e.jsx)(Fs,{}),"Resume"]}),["active","paused","attention","revoked","draft","verifying"].includes(y)&&(0,e.jsxs)(C,{variant:"outline",disabled:I.isPending,onClick:t(()=>l(a.provider==="agentmail"&&y!=="draft"&&y!=="verifying"?`/apps/chat/${a.id}/settings`:`/apps/chat/connect?provider=${a.provider}&purpose=chat&resume=${a.id}${y==="draft"||y==="verifying"?"":"&reconnect=1"}`),"onClick"),children:[(0,e.jsx)(Ce,{}),y==="draft"||y==="verifying"?"Finish setup":"Reconnect"]}),(0,e.jsxs)(C,{variant:"ghost",className:"text-destructive hover:text-destructive",disabled:I.isPending,onClick:t(()=>g(!0),"onClick"),children:[(0,e.jsx)(Zs,{}),"Remove connection"]})]}),y!=="draft"&&y!=="verifying"&&(0,e.jsx)("p",{className:"text-xs text-muted-foreground",children:ns[a.provider].reconnect})]})]})]}),(0,e.jsxs)("div",{className:"space-y-2",children:[(0,e.jsxs)("div",{className:"flex items-center justify-between gap-3",children:[(0,e.jsx)("h3",{className:"text-sm font-semibold",children:"Recent activity"}),a.provider==="speko"&&!u&&(0,e.jsx)(C,{size:"sm",variant:"ghost",onClick:t(()=>{p.refetch(),f.onRetry()},"onClick"),disabled:p.isFetching||f.loading,children:"Refresh"})]}),a.provider==="agentmail"&&E.some(c=>c.kind==="publication"&&c.status==="delivery_unknown")&&(0,e.jsxs)("p",{className:"text-sm text-muted-foreground",children:["Review unconfirmed email delivery in the"," ",(0,e.jsx)(L,{to:`/apps/chat/${s}/conversations`,className:"underline underline-offset-4",children:"conversation’s task"}),"."]}),(0,e.jsxs)("div",{className:"divide-y divide-border border-y border-border",children:[(p.isLoading||r.kind==="reconnecting"||f.loading)&&(0,e.jsxs)("div",{className:"flex items-center gap-2 py-5 text-sm text-muted-foreground",children:[(0,e.jsx)(W,{className:"h-4 w-4 animate-spin"}),"Loading activity…"]}),r.kind==="error"&&(0,e.jsx)("div",{className:"py-4",children:(0,e.jsx)(G,{error:p.error,action:"load the connection activity",onRetry:r.retry,retrying:r.isFetching})}),a.provider==="speko"&&!u&&[f.error&&`Call activity could not be loaded. ${f.error}`,f.incomingError&&`Unapproved calls could not be loaded. ${f.incomingError}`,f.endError&&`The call could not be ended. ${f.endError}`].filter(Boolean).map(c=>(0,e.jsxs)("div",{className:"flex flex-wrap items-center justify-between gap-3 py-4",children:[(0,e.jsx)("p",{role:"alert",className:"text-sm text-destructive",children:c}),(0,e.jsx)(C,{size:"sm",variant:"outline",onClick:f.onRetry,children:"Retry calls"})]},String(c))),j.map(c=>{if(c.kind==="call")return(0,e.jsx)(ft,{entry:c.entry,presentation:"activity",onEnd:f.onEnd,ending:f.endingSessionId===c.entry.session.id},c.id);if(c.kind==="unapproved_call")return(0,e.jsx)(ht,{call:c.call,presentation:"activity"},c.id);const v=c.item;return(0,e.jsxs)("div",{"data-activity-kind":"connection",className:"flex items-start gap-3 px-2 py-3 transition-colors hover:bg-accent/50",children:[(0,e.jsx)("span",{className:"mt-0.5 text-muted-foreground","aria-hidden":"true",children:v.kind==="delivery"?(0,e.jsx)(Es,{className:"size-4"}):v.kind==="publication"?(0,e.jsx)(Bs,{className:"size-4"}):(0,e.jsx)(Ws,{className:"size-4"})}),(0,e.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,e.jsxs)("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1",children:[(0,e.jsx)("p",{className:"min-w-0 flex-1 text-sm font-medium",children:v.summary}),(0,e.jsx)(Te,{status:v.status}),(0,e.jsx)("time",{dateTime:v.createdAt,title:v.createdAt,className:"shrink-0 text-xs tabular-nums text-muted-foreground",children:le(v.createdAt,{includeSeconds:!0})})]}),(0,e.jsx)("p",{className:"mt-1 text-xs text-muted-foreground",children:Zt[v.kind]}),v.fileTransfer&&(0,e.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[v.fileTransfer.filename," —"," ",v.fileTransfer.phase.replaceAll("_"," ")]}),v.detail&&(0,e.jsxs)("p",{className:"mt-1 text-xs text-muted-foreground",children:[(0,e.jsxs)("span",{className:"font-medium text-foreground",children:[aa(v),":"]})," ",v.detail]})]}),a.provider!=="agentmail"&&Xt(v)&&(0,e.jsxs)(C,{size:"sm",variant:"outline","aria-label":`Replay failed ${v.kind}`,disabled:A.isPending,onClick:t(()=>A.mutate(v),"onClick"),children:[A.isPending&&A.variables?.id===v.id?(0,e.jsx)(W,{className:"animate-spin"}):(0,e.jsx)(Ce,{}),"Replay"]}),a.provider!=="agentmail"&&sa(v)&&(0,e.jsx)(C,{size:"sm",variant:"outline",onClick:t(()=>h(v),"onClick"),children:"Resolve"})]},c.id)}),o&&!f.loading&&!f.error&&!f.incomingError&&j.length===0&&(0,e.jsx)("p",{className:"py-5 text-sm text-muted-foreground",children:"No connection activity yet."})]})]}),(0,e.jsxs)("nav",{"aria-label":"Activity pagination",className:"flex items-center justify-between gap-3",children:[(0,e.jsxs)("span",{className:"text-xs text-muted-foreground",children:["Page ",k.length]}),(0,e.jsxs)("div",{className:"flex items-center gap-2",children:[(0,e.jsx)(C,{size:"sm",variant:"outline",disabled:k.length===1||p.isFetching,onClick:t(()=>i(c=>c.slice(0,-1)),"onClick"),children:"Previous"}),(0,e.jsx)(C,{size:"sm",variant:"outline",disabled:!p.data?.nextCursor||p.isFetching||r.kind==="error",onClick:t(()=>{p.data?.nextCursor&&i(c=>[...c,p.data.nextCursor])},"onClick"),children:"Next"})]})]}),(0,e.jsx)(Ve,{open:m!==null,onOpenChange:t(c=>!c&&h(null),"onOpenChange"),children:(0,e.jsxs)(We,{className:M,children:[(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ye,{children:m?.actionType==="slash_task_start"?"Resolve unconfirmed task start":m?.actionType==="provider_effect"?"Resolve unconfirmed provider reply":"Resolve unconfirmed delivery"}),(0,e.jsx)(Ke,{children:m?.actionType==="slash_task_start"?"Microvac lost confirmation after asking Slack to start the task. Check Slack first. Retrying can create a duplicate starter message and task.":m?.actionType==="provider_effect"?"Microvac lost confirmation after sending this provider reply. Check the provider first. Marking it delivered applies any pending Microvac state change; retrying can create a duplicate message.":m?ea(m):""})]}),(0,e.jsxs)(Ge,{className:"sm:flex-wrap",children:[(0,e.jsx)(Xe,{disabled:w.isPending,children:"Keep unresolved"}),m&&me(m).includes("cancel")&&(0,e.jsx)(C,{variant:"outline",disabled:w.isPending,onClick:t(()=>m&&w.mutate({item:m,action:"cancel"}),"onClick"),children:m.actionType==="slash_task_start"?"Cancel task start":m.actionType==="provider_effect"?"Cancel provider reply":m.fileTransfer?"Cancel file transfer":"Cancel publication"}),m&&me(m).includes("retry_anyway")&&(0,e.jsx)(C,{variant:"outline",disabled:w.isPending,onClick:t(()=>m&&w.mutate({item:m,action:"retry_anyway"}),"onClick"),children:m.fileTransfer?"Retry file notification":"Retry anyway"}),m&&me(m).includes("mark_delivered")&&(0,e.jsx)(He,{disabled:w.isPending,onClick:t(c=>{c.preventDefault(),m&&w.mutate({item:m,action:"mark_delivered"})},"onClick"),children:"Mark delivered"})]})]})}),(0,e.jsx)(Ve,{open:x,onOpenChange:g,children:(0,e.jsxs)(We,{className:M,children:[(0,e.jsxs)(Qe,{children:[(0,e.jsx)(Ye,{children:"Remove this connection?"}),(0,e.jsxs)(Ke,{children:[a.assignedAgentName," will stop receiving new work from",` ${Ns[a.provider]}`,". Existing Microvac tasks remain available."," ",ns[a.provider].remove,a.provider==="slack"&&(0,e.jsxs)(e.Fragment,{children:[" ",(0,e.jsx)("a",{href:a.setup?.slackRegistration?.managementUrl??"https://api.slack.com/apps",target:"_blank",rel:"noopener noreferrer",className:"underline underline-offset-4",children:"Open Slack app settings"})," to manage or delete the Slack app."]})]})]}),(0,e.jsxs)(Ge,{children:[(0,e.jsx)(Xe,{children:"Cancel"}),(0,e.jsxs)(He,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",disabled:I.isPending,onClick:t(()=>I.mutate("remove"),"onClick"),children:[I.isPending&&(0,e.jsx)(W,{className:"h-4 w-4 animate-spin"}),"Remove connection"]})]})]})})]})}t(ca,"Activity");export{Na as ChatEndpointDetail};