dorkos 0.125.0 → 0.125.2

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 (304) hide show
  1. package/dist/bin/cli.js +27 -15
  2. package/dist/browser/native/package-manifest.json +1 -1
  3. package/dist/browser/source-manifest.json +1 -1
  4. package/dist/client/assets/{AboutPage-GdrU2Z3k.js → AboutPage-BqGlH1pd.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-D1T74VJE.js → ActivityErrorState-C4hqCedX.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-7GXGUwd1.js → ActivityPage-frpyizcK.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-C-8dACWp.js → ActivityRow-DB9c3g1G.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-CRRs6yil.js → AdapterIcon-CEHkdca8.js} +1 -1
  9. package/dist/client/assets/{AdapterSetupWizard-K6DsejqG.js → AdapterSetupWizard-DLJMkb-u.js} +1 -1
  10. package/dist/client/assets/{AgentOptionRow-CF5XZmBx.js → AgentOptionRow-D-QjHi5k.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-BXes2ymU.js → AgentPicker-DoGucmqI.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-BuXVpWfb.js → AgentRequestCard--9GA9ymH.js} +1 -1
  13. package/dist/client/assets/{AppearancePage-DoqoCU4j.js → AppearancePage-NHNiZrtY.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-By8jgPX3.js → ApplyToOverridesDialog-Clo55n6V.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-CgGyTDmT.js → AttentionSignalRow-BOpClaCD.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-BzDxZ-G5.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-D9Tm8ual.js} +1 -1
  17. package/dist/client/assets/{BindingDialog-BXfjFGvP.js → BindingDialog-DZcTXLE8.js} +1 -1
  18. package/dist/client/assets/{BlintzCanvas-C-dobEns.js → BlintzCanvas-DzjdPTlx.js} +3 -3
  19. package/dist/client/assets/{CanvasCsvContent-ClMFJX7T.js → CanvasCsvContent-xYUrbFeA.js} +1 -1
  20. package/dist/client/assets/{CanvasFileContent-BoDE2jjA.js → CanvasFileContent-D6fTvMea.js} +2 -2
  21. package/dist/client/assets/{CanvasModel3dContent-fnWc0B7B.js → CanvasModel3dContent-DEassnBV.js} +2 -2
  22. package/dist/client/assets/{ChannelComposer-DIRPjyyf.js → ChannelComposer-CutghXOq.js} +3 -3
  23. package/dist/client/assets/{ChatAppsOff-DlCWmwEz.js → ChatAppsOff-C00Nl_w6.js} +1 -1
  24. package/dist/client/assets/{CodeMirrorDiff-COsbYyNC.js → CodeMirrorDiff-JYxkSqFi.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-n3l14rY7.js → CodeMirrorEditor-CVXZ9B5S.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-S2O_hvwR.js → CommitmentList-CcCSwcZ8.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-COOCQFpL.js → CommitmentsPage-BrDbzpyR.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-PA9T4FZP.js → ComputerResourceView-BlLvMt1I.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-CnYUWQBS.js → ComputerViewer-B8SWICbj.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-C1ZJtNl-.js → ConnectionAccessLists-Bsb-t24W.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-BBpWiN4-.js → ConnectionsPage-RAhWxuWU.js} +1 -1
  32. package/dist/client/assets/{ConventionPage-sa0Yn2uq.js → ConventionPage-CNij_BXA.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-BztrmZNp.js → ExtensionPageRoute-BsGqTcyI.js} +1 -1
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-CJrqr29-.js → FloatingTanStackRouterDevtools-CqogiFob-eQVA1bL6.js} +1 -1
  35. package/dist/client/assets/HandlePage-XG5mP_e9.js +1 -0
  36. package/dist/client/assets/{HeartbeatPage-BkyUpdZt.js → HeartbeatPage-D0tKoR6G.js} +1 -1
  37. package/dist/client/assets/{KeyEntry-DAMr1NNY.js → KeyEntry-CSmznLcG.js} +1 -1
  38. package/dist/client/assets/{LexicalField-Cnzrh08A.js → LexicalField-gYKPjFfN.js} +1 -1
  39. package/dist/client/assets/{ManagesPage-EAbQtygH.js → ManagesPage-BF6MFrsv.js} +1 -1
  40. package/dist/client/assets/{Marketplace-BfADALGd.js → Marketplace-BWDlXgwH.js} +1 -1
  41. package/dist/client/assets/{MarketplaceSourcesView-u1WKUk-p.js → MarketplaceSourcesView-BhKzgkiO.js} +1 -1
  42. package/dist/client/assets/{McpAppFrame-Cz-Ttlqr.js → McpAppFrame-BotrzoHd.js} +1 -1
  43. package/dist/client/assets/{McpSigninBody-CkOBUhOz.js → McpSigninBody-CdeX_lYs.js} +1 -1
  44. package/dist/client/assets/{Model3dViewer-CvLaSO7V.js → Model3dViewer-KHktOpbD.js} +1 -1
  45. package/dist/client/assets/NamePage-Cdd9-mZg.js +1 -0
  46. package/dist/client/assets/{NewDirectMessageMenu-Be_4mBPd.js → NewDirectMessageMenu-CuvKJEDY.js} +1 -1
  47. package/dist/client/assets/{NotificationsPage-GCk9gfsW.js → NotificationsPage-DWcgfZJD.js} +1 -1
  48. package/dist/client/assets/{OpenMeshSwitch-BBzgYSUc.js → OpenMeshSwitch-DdJ7g4yD.js} +1 -1
  49. package/dist/client/assets/{OperatorIdentityForm-ZAbJ4FJn.js → OperatorIdentityForm-7FUOEWw_.js} +1 -1
  50. package/dist/client/assets/{PermissionHistory-DgmFpdJK.js → PermissionHistory-CgQhZrvg.js} +1 -1
  51. package/dist/client/assets/{PermissionsPage-DHFt_34a.js → PermissionsPage-CK34y1VF.js} +1 -1
  52. package/dist/client/assets/{PersonalityPopover-CobRy95S.js → PersonalityPopover-3BA36sB0.js} +1 -1
  53. package/dist/client/assets/PhotoPage-DFic-gDH.js +1 -0
  54. package/dist/client/assets/{PreviewRefusedNotice-Ux5sq2Om.js → PreviewRefusedNotice-CnqAE9sr.js} +1 -1
  55. package/dist/client/assets/{ProfileFields-kBzeRPfc.js → ProfileFields-CIbISW83.js} +1 -1
  56. package/dist/client/assets/{ProfilePanelContainer-CREt4ZC3.js → ProfilePanelContainer-DPDHtTbI.js} +1 -1
  57. package/dist/client/assets/{ProfileRolePicker-hQbo8P6M.js → ProfileRolePicker-83GFtm2P.js} +1 -1
  58. package/dist/client/assets/{PromptSuggestionChips-CmW1lIso.js → PromptSuggestionChips-B9chKG4w.js} +1 -1
  59. package/dist/client/assets/{ReportsToPopover-Dpa-_NsO.js → ReportsToPopover-DUv03JZP.js} +1 -1
  60. package/dist/client/assets/{RoomSurface-BQhgKnIE.js → RoomSurface-Bq6Slne3.js} +1 -1
  61. package/dist/client/assets/{RoomsPage-BHUDRYzJ.js → RoomsPage-BKxzz-nN.js} +1 -1
  62. package/dist/client/assets/{RunsOnPopover-bGZ6VJoF.js → RunsOnPopover-BIdmMhs9.js} +1 -1
  63. package/dist/client/assets/{RuntimeConnectFlow-DN2ElvcH.js → RuntimeConnectFlow-IaRVgmqH.js} +1 -1
  64. package/dist/client/assets/{RuntimeSetupDialog-CUFie4LV.js → RuntimeSetupDialog-Er-lzjmK.js} +1 -1
  65. package/dist/client/assets/{SeenDevices-D_FnsL7V.js → SeenDevices-9quCcdUW.js} +1 -1
  66. package/dist/client/assets/{SessionsPage-1uOPUCP9.js → SessionsPage-CGic5VaN.js} +1 -1
  67. package/dist/client/assets/{SettingsDialog-AbwEHDG8.js → SettingsDialog-BZ58IaK1.js} +1 -1
  68. package/dist/client/assets/{SkillsPage-BEobBuAr.js → SkillsPage-VRYwez5T.js} +1 -1
  69. package/dist/client/assets/{TaskDialogWrapper-BAFSmT-z.js → TaskDialogWrapper-C9LMV8oe.js} +1 -1
  70. package/dist/client/assets/{TasksEmptyState-BFw2ODM-.js → TasksEmptyState-CagC0LAa.js} +1 -1
  71. package/dist/client/assets/{TasksPage-C0CMgSFx.js → TasksPage-3gkHB1Pv.js} +1 -1
  72. package/dist/client/assets/{TeamComputerEntry-BpjxLA1n.js → TeamComputerEntry-BD89Y5e6.js} +1 -1
  73. package/dist/client/assets/{ToolsPage-dx-rQ2F1.js → ToolsPage-Ds6LwY79.js} +1 -1
  74. package/dist/client/assets/{TopologyGraph-LpxkBhGK.js → TopologyGraph-CiZ2ACcQ.js} +1 -1
  75. package/dist/client/assets/{TourHost--UYZoKlJ.js → TourHost-BISNaEzZ.js} +1 -1
  76. package/dist/client/assets/{UnlinkDialog-BN2odbqD.js → UnlinkDialog-DTuXHNsi.js} +1 -1
  77. package/dist/client/assets/{UnreadDivider-LbVIAoxM.js → UnreadDivider-l_VZ7ECn.js} +1 -1
  78. package/dist/client/assets/{WidgetErrorCard-CAUx4KUI.js → WidgetErrorCard-I8WiJv2g.js} +1 -1
  79. package/dist/client/assets/{WorkView-DVx4WoVI.js → WorkView-_wehEEl-.js} +3 -3
  80. package/dist/client/assets/_shell-BLcPeb8K.js +80 -0
  81. package/dist/client/assets/{_shell._home-uuqgFA3M.js → _shell._home-CcRH-M-A.js} +1 -1
  82. package/dist/client/assets/{_shell._home.activity-CiMsy7bF.js → _shell._home.activity-cR24Vr9Q.js} +1 -1
  83. package/dist/client/assets/{_shell._home.index-0Zm5q3-G.js → _shell._home.index-agU2ItcI.js} +1 -1
  84. package/dist/client/assets/{_shell._home.tasks-BClPai4g.js → _shell._home.tasks-BDR9JTj3.js} +1 -1
  85. package/dist/client/assets/{_shell._home.workspaces-DH4BgLT0.js → _shell._home.workspaces-B4nlcACK.js} +1 -1
  86. package/dist/client/assets/{_shell.channels-BGXkXPhY.js → _shell.channels-B7lTxkqM.js} +1 -1
  87. package/dist/client/assets/{_shell.connections-BwjXkgi1.js → _shell.connections-CWQYcH58.js} +1 -1
  88. package/dist/client/assets/{_shell.feedback-requests-j7gTBF5b.js → _shell.feedback-requests-BkgHtyZr.js} +1 -1
  89. package/dist/client/assets/_shell.marketplace-BMqwT9qX.js +1 -0
  90. package/dist/client/assets/_shell.marketplace_.sources-pXGa7Cqb.js +1 -0
  91. package/dist/client/assets/_shell.session-CmoE1W38.js +1 -0
  92. package/dist/client/assets/{_shell.team-BgJu1gDa.js → _shell.team-CTIVEpZQ.js} +3 -3
  93. package/dist/client/assets/{_shell.threads-C1IJJzcf.js → _shell.threads-ClWYrnld.js} +1 -1
  94. package/dist/client/assets/_shell.x._extensionId-BiXilrSW.js +1 -0
  95. package/dist/client/assets/_shell.x._extensionId_._-BiXilrSW.js +1 -0
  96. package/dist/client/assets/{abnfDiagram-WEYOIA3C-BuEHMh0D.js → abnfDiagram-WEYOIA3C-0-Mx5lSG.js} +1 -1
  97. package/dist/client/assets/{access-copy-BZNjpw9v.js → access-copy-Cj31J6PU.js} +1 -1
  98. package/dist/client/assets/{arc-BbGU9Ctb.js → arc-DVmpcNHP.js} +1 -1
  99. package/dist/client/assets/{architectureDiagram-ZHVYKT53-CdRG5sTM.js → architectureDiagram-ZHVYKT53-BZhMXbuC.js} +1 -1
  100. package/dist/client/assets/{banner-C7kHJJGz.js → banner-Ctq7kvQ0.js} +1 -1
  101. package/dist/client/assets/{blockDiagram-RJAE7QA3-CBQ6YXoI.js → blockDiagram-RJAE7QA3-Ctmof3-7.js} +1 -1
  102. package/dist/client/assets/{c4Diagram-XDPPPE54-DavNcKCF.js → c4Diagram-XDPPPE54-BPglmQhG.js} +1 -1
  103. package/dist/client/assets/{card-D4ek-VvX.js → card-DI7YtQh3.js} +1 -1
  104. package/dist/client/assets/channel-A2WD4smw.js +1 -0
  105. package/dist/client/assets/{chunk-2E7WHVMD-ClO15ze9.js → chunk-2E7WHVMD-DIK6CHka.js} +1 -1
  106. package/dist/client/assets/{chunk-2Q5K7J3B-DsLDzf_i.js → chunk-2Q5K7J3B-C3uATYd9.js} +1 -1
  107. package/dist/client/assets/{chunk-4EMNKR2T-D20fXIIK.js → chunk-4EMNKR2T-Dl3iYXVl.js} +1 -1
  108. package/dist/client/assets/{chunk-55XCU76K-no_S5sRX.js → chunk-55XCU76K-BJF-Hcs9.js} +1 -1
  109. package/dist/client/assets/{chunk-5VM5RSS4-D5xWEZ2p.js → chunk-5VM5RSS4-Cju3BnqQ.js} +1 -1
  110. package/dist/client/assets/{chunk-JWPE2WC7-CnsdZOv0.js → chunk-JWPE2WC7-v1omZzgE.js} +1 -1
  111. package/dist/client/assets/{chunk-VQ5W62QI-DxYg8tsH.js → chunk-VQ5W62QI-2HqA3jPL.js} +1 -1
  112. package/dist/client/assets/{chunk-XXDRQBXY-7CQ-MKdC.js → chunk-XXDRQBXY-RDXwFs9Z.js} +1 -1
  113. package/dist/client/assets/{chunk-ZCHMQSOR-Ca7Jh42b.js → chunk-ZCHMQSOR-DhQsY-OT.js} +2 -2
  114. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-BvZXavcI.js → classDiagram-v2-4MYWR3UA-DC5N-GDk.js} +1 -1
  115. package/dist/client/assets/{command-srO4Wv-5.js → command-DpK0GpDM.js} +1 -1
  116. package/dist/client/assets/{cose-bilkent-JH36ORCC-1NCiJaHv.js → cose-bilkent-JH36ORCC-BriFsb6c.js} +1 -1
  117. package/dist/client/assets/{cpu-CFIu4JtK.js → cpu-DzCUBK-1.js} +1 -1
  118. package/dist/client/assets/{cynefin-EF2NZ3EQ-DgZeohG3.js → cynefin-EF2NZ3EQ-cj34OpiI.js} +1 -1
  119. package/dist/client/assets/{cynefinDiagram-WF24UDRP-MQB2xbJK.js → cynefinDiagram-WF24UDRP-DvAggKpl.js} +1 -1
  120. package/dist/client/assets/{dagre-NK4GIZVX-BFHk_Y44.js → dagre-NK4GIZVX-BskSpt7C.js} +1 -1
  121. package/dist/client/assets/{diagram-CBK3MWTC-CloEvZfp.js → diagram-CBK3MWTC-C6BZljcO.js} +1 -1
  122. package/dist/client/assets/{diagram-I5XIIV2D-9nzUtfKI.js → diagram-I5XIIV2D--4FPRmBZ.js} +1 -1
  123. package/dist/client/assets/{diagram-ODIL2UCW-DVdnelgu.js → diagram-ODIL2UCW-kZxp81Fr.js} +1 -1
  124. package/dist/client/assets/{diagram-PFBEJUXE-tTEeiAHa.js → diagram-PFBEJUXE-BSXBAffS.js} +1 -1
  125. package/dist/client/assets/{diagram-RJA3I4VV-QFehV9_1.js → diagram-RJA3I4VV-DLDPF6FG.js} +1 -1
  126. package/dist/client/assets/{diagram-TYUNFSNR-CYU5li-4.js → diagram-TYUNFSNR-CoU2knZy.js} +1 -1
  127. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-Cn040Beg.js → ebnfDiagram-V4P3TTPT-C77T1UPB.js} +1 -1
  128. package/dist/client/assets/{elk-QONTBCTQ-tBbnwcb3.js → elk-QONTBCTQ-UFXrlbAn.js} +1 -1
  129. package/dist/client/assets/{empty-state-Bxfi7_ss.js → empty-state-aNwJA6H8.js} +1 -1
  130. package/dist/client/assets/{erDiagram-KYQIGQAA-DAA0fFlD.js → erDiagram-KYQIGQAA-CyLB8fKu.js} +1 -1
  131. package/dist/client/assets/{execution-config-afKaYukD.js → execution-config-D7JzMYC2.js} +1 -1
  132. package/dist/client/assets/{file-C-ooqbRY.js → file-bSD5jgk_.js} +1 -1
  133. package/dist/client/assets/{file-exclamation-point-BWWgLsMF.js → file-exclamation-point-BcCIL-rE.js} +1 -1
  134. package/dist/client/assets/{file-text-BJt8biPY.js → file-text-DTvj1wzM.js} +1 -1
  135. package/dist/client/assets/{find-latest-widget-fence-DPQimlUD.js → find-latest-widget-fence-D01ENK2h.js} +1 -1
  136. package/dist/client/assets/{flowDiagram-IUGLLWBU-vYI6TodS.js → flowDiagram-IUGLLWBU-qmnUF-Ak.js} +1 -1
  137. package/dist/client/assets/{form-LJ2Rf9ny.js → form-C_yPntkz.js} +1 -1
  138. package/dist/client/assets/{format-cron-DrUISrHj.js → format-cron-DUPWkOrW.js} +1 -1
  139. package/dist/client/assets/{ganttDiagram-R7GPNTJY-DLYpSX7r.js → ganttDiagram-R7GPNTJY-CBzoqGuU.js} +1 -1
  140. package/dist/client/assets/{git-branch-D5xr7U5P.js → git-branch-ClXAt1_G.js} +1 -1
  141. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-DNIbVOaY.js → gitGraphDiagram-PDYL7XHY-DMh_n1S2.js} +1 -1
  142. package/dist/client/assets/{graph-DNjxkUSL.js → graph-BgkuepqW.js} +1 -1
  143. package/dist/client/assets/{heart-DnR_GX4I.js → heart-BrjEmIsl.js} +1 -1
  144. package/dist/client/assets/{highlighted-body-KPVGNVTW-L_Jd2uei.js → highlighted-body-KPVGNVTW-DlHNVEaV.js} +1 -1
  145. package/dist/client/assets/{image-lightbox-DZIhMyF3.js → image-lightbox-BtzkRztd.js} +1 -1
  146. package/dist/client/assets/{image-off-DdvvVxmq.js → image-off-4yaoLh32.js} +1 -1
  147. package/dist/client/assets/{index-B0jt7Nng.js → index-6yT0Qr0s.js} +1 -1
  148. package/dist/client/assets/{index-Ixk2o7yl.js → index-A_qzw4D8.js} +1 -1
  149. package/dist/client/assets/{index-adYd35CJ.js → index-Adjbt_HC.js} +1 -1
  150. package/dist/client/assets/{index-CXWlrRzK.js → index-B-X82FND.js} +1 -1
  151. package/dist/client/assets/{index-BzKkoaB1.js → index-BMCDckcY.js} +1 -1
  152. package/dist/client/assets/index-BOuCpkRb.js +1 -0
  153. package/dist/client/assets/{index-DTuNXPGU.js → index-BUkUamu4.js} +1 -1
  154. package/dist/client/assets/index-BVq1p60h.js +1 -0
  155. package/dist/client/assets/{index-By8pKNSM.js → index-BXtagrMY.js} +1 -1
  156. package/dist/client/assets/{index-CQ2atcs_.js → index-BeVLPg9t.js} +1 -1
  157. package/dist/client/assets/{index-ld6lMfGU.js → index-Bgg4cW4L.js} +1 -1
  158. package/dist/client/assets/{index-Ba9q2CoQ.js → index-BqHUbNdh.js} +1 -1
  159. package/dist/client/assets/{index-DqCxUalt.js → index-BtG4vr8c.js} +1 -1
  160. package/dist/client/assets/{index-BsHyymmC.js → index-C0LPB1iH.js} +1 -1
  161. package/dist/client/assets/{index-CDo6TA8n.js → index-CJhmUsIv.js} +1 -1
  162. package/dist/client/assets/{index-a6ojvFqI.js → index-CMLDdOez.js} +1 -1
  163. package/dist/client/assets/{index-D-Q7CW4p.js → index-CNV11SW6.js} +1 -1
  164. package/dist/client/assets/{index-9GoQjBFo.js → index-CNiC7KUz.js} +1 -1
  165. package/dist/client/assets/{index-By-VWzSF.js → index-CSyZb1X9.js} +1 -1
  166. package/dist/client/assets/{index-B1gC3xYN.js → index-CThGpHO2.js} +1 -1
  167. package/dist/client/assets/{index-uIonuakd.js → index-C_H6ZIel.js} +1 -1
  168. package/dist/client/assets/{index-ANmu61E0.js → index-C_xSr5lb.js} +1 -1
  169. package/dist/client/assets/{index-r0stHl-2.js → index-Cefoks17.js} +1 -1
  170. package/dist/client/assets/{index-DKTd8X7n.js → index-CjUfPyOM.js} +261 -261
  171. package/dist/client/assets/{index-DXWsH2Ep.js → index-Ckut3u-d.js} +1 -1
  172. package/dist/client/assets/{index-BFecX5dC.js → index-CrQWuUpr.js} +1 -1
  173. package/dist/client/assets/{index-xfRcAp50.js → index-CyfSPJ1D.js} +1 -1
  174. package/dist/client/assets/{index-CSqz4B0v.js → index-D0yajRDv.js} +1 -1
  175. package/dist/client/assets/index-D2ZFfqZZ.css +1 -0
  176. package/dist/client/assets/{index-ZYbeRA5f.js → index-DB2t3GUm.js} +3 -3
  177. package/dist/client/assets/{index-Bri5bZfv.js → index-DFWrO42z.js} +1 -1
  178. package/dist/client/assets/{index-BqKjnd_r.js → index-DGdKO24t.js} +1 -1
  179. package/dist/client/assets/{index-5hCWBj-r.js → index-DQ9ppIWv.js} +1 -1
  180. package/dist/client/assets/{index-DjFFFMc-.js → index-DX546SK5.js} +2 -2
  181. package/dist/client/assets/{index-Blhsfk7u.js → index-DXalAOXT.js} +1 -1
  182. package/dist/client/assets/{index-CDGWl8qL.js → index-DZ1BC5JW.js} +1 -1
  183. package/dist/client/assets/{index-BAIKz_P0.js → index-DgxXSEmR.js} +1 -1
  184. package/dist/client/assets/{index-BsmR2hi4.js → index-Dj4I8KcL.js} +3 -3
  185. package/dist/client/assets/{index-Bpwvxz0c.js → index-DrnHzrt4.js} +1 -1
  186. package/dist/client/assets/{index-CLQIvYHP.js → index-FhmSwVD0.js} +1 -1
  187. package/dist/client/assets/{index-BWQfqbbe.js → index-WkQdt6Zo.js} +1 -1
  188. package/dist/client/assets/{index-BYeyKNKj.js → index-WxG6nG96.js} +1 -1
  189. package/dist/client/assets/{index-D0ujPZdD.js → index-f1W4Bd4W.js} +1 -1
  190. package/dist/client/assets/{index-B2wx4J9U.js → index-qdygDruh.js} +1 -1
  191. package/dist/client/assets/{index-CLbs0fcq.js → index-t-NyR7HD.js} +1 -1
  192. package/dist/client/assets/{index.esm-j5KQ_b6S.js → index.esm-Bb3LMu5X.js} +1 -1
  193. package/dist/client/assets/{infoDiagram-MVDRKAX5-DjvSkTas.js → infoDiagram-MVDRKAX5-DbU4eDjZ.js} +1 -1
  194. package/dist/client/assets/{inline-code-DlVYFFW7.js → inline-code-DwFNff3_.js} +1 -1
  195. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-BBivrI5n.js → ishikawaDiagram-HPEHV2GE-DmHmF-HT.js} +1 -1
  196. package/dist/client/assets/{journeyDiagram-BOSHW7O7-DKdhbtdx.js → journeyDiagram-BOSHW7O7-DsjOeP3J.js} +1 -1
  197. package/dist/client/assets/{kanban-definition-FNSA4HC5-CkgAodR5.js → kanban-definition-FNSA4HC5-ByQ1WGy2.js} +1 -1
  198. package/dist/client/assets/{layers-CzyhuVSM.js → layers-DFZUUHM5.js} +1 -1
  199. package/dist/client/assets/{lightbulb-DwGE7s99.js → lightbulb-Bbgsejp1.js} +1 -1
  200. package/dist/client/assets/{link-2-CljREnN9.js → link-2-xieOmwOK.js} +1 -1
  201. package/dist/client/assets/{list-runtime-types-D5ZO30FL.js → list-runtime-types-B0CSonAi.js} +1 -1
  202. package/dist/client/assets/{markdown-content-CN_dGlgE.js → markdown-content-ysBIqFAg.js} +1 -1
  203. package/dist/client/assets/{mention-pill-C6OT4gx4.js → mention-pill-Daeu1X92.js} +1 -1
  204. package/dist/client/assets/{mermaid.core-DNuzxE7q.js → mermaid.core-B1mQMOXd.js} +4 -4
  205. package/dist/client/assets/{message-square-off-DlkAPJdd.js → message-square-off-D9hm8WNH.js} +1 -1
  206. package/dist/client/assets/{mindmap-definition-6OY57UG3-f9ygKKO1.js → mindmap-definition-6OY57UG3-CoP-DGm1.js} +1 -1
  207. package/dist/client/assets/{more-details-DRPervoL.js → more-details-DHCpYDi7.js} +1 -1
  208. package/dist/client/assets/{owner-notice-C-Q9ySA7.js → owner-notice-Crxco7HN.js} +1 -1
  209. package/dist/client/assets/{package-BVNiaGrb.js → package-CD8xq7hk.js} +1 -1
  210. package/dist/client/assets/{page-container-D03bhclt.js → page-container-B9sDc2wq.js} +1 -1
  211. package/dist/client/assets/{pane-resize-handle-CZ9rHhNr.js → pane-resize-handle-DOchpdJ6.js} +1 -1
  212. package/dist/client/assets/{paperclip-DQQVX5tJ.js → paperclip-CzhXW5qi.js} +1 -1
  213. package/dist/client/assets/{path-input-CQ16nhYd.js → path-input-Z2p922fj.js} +1 -1
  214. package/dist/client/assets/{pegDiagram-ECIUJNBX-CZ_YkcKh.js → pegDiagram-ECIUJNBX-TEsMAO1a.js} +1 -1
  215. package/dist/client/assets/{pieDiagram-GNMPY74T-DLHSPEH7.js → pieDiagram-GNMPY74T-CMIDIiMP.js} +1 -1
  216. package/dist/client/assets/{plug-CadJyjTp.js → plug-BEp9Ly3k.js} +1 -1
  217. package/dist/client/assets/{primer-trigger-DH4xfrlM.js → primer-trigger-4qUY83SX.js} +1 -1
  218. package/dist/client/assets/{profile-errors-DSnHlauU.js → profile-errors-CezsKqhA.js} +1 -1
  219. package/dist/client/assets/{progress-BB97hlmb.js → progress-eQl1UvNz.js} +1 -1
  220. package/dist/client/assets/{quadrantDiagram-D57K4MC3-BWcUu48x.js → quadrantDiagram-D57K4MC3-DXjohzOz.js} +1 -1
  221. package/dist/client/assets/{query-error-state-B456s96E.js → query-error-state-COuKRlU0.js} +1 -1
  222. package/dist/client/assets/{radio-DrpN3x3S.js → radio-Cdnkcg1w.js} +1 -1
  223. package/dist/client/assets/{railroadDiagram-Y72NRBL7-C2VRM83h.js → railroadDiagram-Y72NRBL7-BojgH6Hw.js} +1 -1
  224. package/dist/client/assets/registry-BSucT23N.js +1 -0
  225. package/dist/client/assets/{relay-trace-schemas-BYCaGsVJ.js → relay-trace-schemas-XcVQg5Fa.js} +1 -1
  226. package/dist/client/assets/{repeat-DPzic7-j.js → repeat-wB31CP7I.js} +1 -1
  227. package/dist/client/assets/{requirementDiagram-EQYSW5RA-B1bpdcM7.js → requirementDiagram-EQYSW5RA-Gojbrcvg.js} +1 -1
  228. package/dist/client/assets/{room-files-source-aN4p_kDV.js → room-files-source-DXKpm43a.js} +1 -1
  229. package/dist/client/assets/{rotate-ccw-clock-gqBy98sI.js → rotate-ccw-clock-LSKKAcnR.js} +1 -1
  230. package/dist/client/assets/{rotate-cw-mHsqEte-.js → rotate-cw-scTEKxeZ.js} +1 -1
  231. package/dist/client/assets/{sankeyDiagram-SY24JHO5-QCGTTh9k.js → sankeyDiagram-SY24JHO5-QS71aycL.js} +1 -1
  232. package/dist/client/assets/{scroll-area-DVd6ctli.js → scroll-area-BNFXgTKM.js} +1 -1
  233. package/dist/client/assets/{search-x-CzgTzL0z.js → search-x-Cjf0n9z7.js} +1 -1
  234. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-kiR1gX_u.js → sequenceDiagram-BLEHNHQU-Beg7mj69.js} +1 -1
  235. package/dist/client/assets/{shield-x-Btfd3Xnx.js → shield-x-Dr4BZfo_.js} +1 -1
  236. package/dist/client/assets/{signed-in-gS3tMpTW.js → signed-in-L9MLqTuc.js} +1 -1
  237. package/dist/client/assets/{sizeCapture-INFHLROL-Da56aMj0.js → sizeCapture-INFHLROL-3Oo1KjRp.js} +1 -1
  238. package/dist/client/assets/{soul-file-C7zd1yXt.js → soul-file-CxpOawh5.js} +1 -1
  239. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-BZ3qlQWl.js → stateDiagram-v2-A6IESKWZ-DFYIDQ6C.js} +1 -1
  240. package/dist/client/assets/{swimlanes-B3ENRKFQ-B-wp91_T.js → swimlanes-B3ENRKFQ-BUgKOOrv.js} +1 -1
  241. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Bqjv1MSj.js +8 -0
  242. package/dist/client/assets/{table-BIdFvzBs.js → table-B0LsKsEv.js} +1 -1
  243. package/dist/client/assets/{timeline-definition-JXYKGLGB-CQojjy-8.js → timeline-definition-JXYKGLGB-BsPZ0P_8.js} +1 -1
  244. package/dist/client/assets/{trust-posture-DszobEjt.js → trust-posture-Cm7OhCEx.js} +1 -1
  245. package/dist/client/assets/{unplug-xlfZ61jC.js → unplug-DLA7Ib_s.js} +1 -1
  246. package/dist/client/assets/{unverified-catalog-notice-DymrAwtm.js → unverified-catalog-notice-CxBO_pta.js} +1 -1
  247. package/dist/client/assets/{use-adapter-catalog-CytBTafV.js → use-adapter-catalog-C333Z2Q6.js} +1 -1
  248. package/dist/client/assets/{use-bindings-BPNK3sUh.js → use-bindings-Bu4yLLR5.js} +1 -1
  249. package/dist/client/assets/{use-composer-prefs-DMQT0qiv.js → use-composer-prefs-BnjCX9pM.js} +1 -1
  250. package/dist/client/assets/{use-connector-management-PDVdWccW.js → use-connector-management-Bo6wOJQS.js} +1 -1
  251. package/dist/client/assets/{use-deep-link-scroll-CwapSmGj.js → use-deep-link-scroll-D867V6rs.js} +1 -1
  252. package/dist/client/assets/{use-delete-binding-CgTwS83G.js → use-delete-binding-DKObM-zT.js} +1 -1
  253. package/dist/client/assets/{use-dev-links-BoZCIc4h.js → use-dev-links-C0Zc30aj.js} +1 -1
  254. package/dist/client/assets/{use-direct-message-panel-Cs4I6669.js → use-direct-message-panel-DNWtQq4B.js} +1 -1
  255. package/dist/client/assets/{use-external-adapter-catalog-PBrsasQ8.js → use-external-adapter-catalog-Bv5rDkX4.js} +1 -1
  256. package/dist/client/assets/{use-full-activity-feed-C2seN-V1.js → use-full-activity-feed-CFUj0qCS.js} +1 -1
  257. package/dist/client/assets/use-is-below-desktop-BUS7OPGv.js +1 -0
  258. package/dist/client/assets/use-is-hub-CFhvDMHt.js +1 -0
  259. package/dist/client/assets/{use-local-browser-CF0uGQ6e.js → use-local-browser-BeZjn0gA.js} +1 -1
  260. package/dist/client/assets/{use-mesh-topology-CnCeK4gS.js → use-mesh-topology-DurMpvjU.js} +1 -1
  261. package/dist/client/assets/{use-mounted-ref-BtAb14HI.js → use-mounted-ref-CBSuPNPv.js} +1 -1
  262. package/dist/client/assets/{use-notification-prefs-B8LHpZTt.js → use-notification-prefs-b8iKvzB4.js} +1 -1
  263. package/dist/client/assets/{use-panel-tab-placements-DOXj0Pii.js → use-panel-tab-placements-BcKEux1G.js} +1 -1
  264. package/dist/client/assets/use-pending-read-BBBAnUYu.js +1 -0
  265. package/dist/client/assets/{use-personality-commit-YV9FVC-a.js → use-personality-commit-u3kQ6h3H.js} +1 -1
  266. package/dist/client/assets/{use-promo-activation-CjtGhz_3.js → use-promo-activation-C8_cGmEW.js} +1 -1
  267. package/dist/client/assets/{use-promo-dismissals-4rbLgSDG.js → use-promo-dismissals-B3VuaQCf.js} +1 -1
  268. package/dist/client/assets/{use-pulse-freshness-CGqANpVO.js → use-pulse-freshness-CSWQ0TZS.js} +1 -1
  269. package/dist/client/assets/{use-relay-config-CvU_70WJ.js → use-relay-config-BA6c0FMB.js} +1 -1
  270. package/dist/client/assets/{use-room-follow-claim-Doq_lWjk.js → use-room-follow-claim-BV-MtDQ5.js} +1 -1
  271. package/dist/client/assets/{use-room-sessions-CoEIaBRt.js → use-room-sessions-W62Zl72O.js} +1 -1
  272. package/dist/client/assets/{use-roving-tab-list-BzsrpjWV.js → use-roving-tab-list-CMITzUHu.js} +1 -1
  273. package/dist/client/assets/{use-session-canvas-DQ9ND8il.js → use-session-canvas-u63m2mYH.js} +3 -3
  274. package/dist/client/assets/{use-status-budget-AnHroEO0.js → use-status-budget-CbmPFvpQ.js} +1 -1
  275. package/dist/client/assets/{use-unclaimed-chats-DzOLK27i.js → use-unclaimed-chats-D7SEUfiO.js} +1 -1
  276. package/dist/client/assets/use-update-config-Dfd7KMde.js +1 -0
  277. package/dist/client/assets/{useMutationState-BAU_J-u3.js → useMutationState-rOg4bnKv.js} +1 -1
  278. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BrHN0c6G.js → usecaseDiagram-WPOLBNNX-C-w0e-nv.js} +1 -1
  279. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-CbeP0Pbp.js → vennDiagram-Q3Y3IDCW-BNm2WXT5.js} +1 -1
  280. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-mn5ebFhs.js → wardleyDiagram-IVAIDKWA-BFyFLiir.js} +1 -1
  281. package/dist/client/assets/{xychartDiagram-4URNHDU4-C8fXRQEv.js → xychartDiagram-4URNHDU4-BKxZlnEx.js} +1 -1
  282. package/dist/client/index.html +2 -2
  283. package/dist/server/index.js +278 -101
  284. package/dist/server/index.js.map +2 -2
  285. package/package.json +4 -4
  286. package/dist/client/assets/HandlePage-tZidnrlt.js +0 -1
  287. package/dist/client/assets/NamePage-BS-oN_Hi.js +0 -1
  288. package/dist/client/assets/PhotoPage-BmFypD13.js +0 -1
  289. package/dist/client/assets/_shell-D7Jp6t6_.js +0 -80
  290. package/dist/client/assets/_shell.marketplace-6JRXJ9gt.js +0 -1
  291. package/dist/client/assets/_shell.marketplace_.sources-DriHXfBM.js +0 -1
  292. package/dist/client/assets/_shell.session-BXSWGdwi.js +0 -1
  293. package/dist/client/assets/_shell.x._extensionId-BNgicBXG.js +0 -1
  294. package/dist/client/assets/_shell.x._extensionId_._-BNgicBXG.js +0 -1
  295. package/dist/client/assets/channel-ClNeQ2PQ.js +0 -1
  296. package/dist/client/assets/index-5eNHb7up.js +0 -1
  297. package/dist/client/assets/index-D1kQ19Gb.css +0 -1
  298. package/dist/client/assets/index-DHi8-3w0.js +0 -1
  299. package/dist/client/assets/registry-DRvQ3ChB.js +0 -1
  300. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-Drg_8k1s.js +0 -8
  301. package/dist/client/assets/use-is-below-desktop-pvzUlnxh.js +0 -1
  302. package/dist/client/assets/use-is-hub-CvEPWuj0.js +0 -1
  303. package/dist/client/assets/use-pending-read-DBaC7e8N.js +0 -1
  304. package/dist/client/assets/use-update-config-NRkQbxae.js +0 -1
@@ -1,2 +1,2 @@
1
- import{a1 as l,a2 as u,j as e,fg as i,e as a,fh as m,b8 as x,G as h,eb as p}from"./index-DKTd8X7n.js";import{P as f}from"./page-container-D03bhclt.js";import{Q as g}from"./query-error-state-B456s96E.js";import{L as j}from"./lightbulb-DwGE7s99.js";import{P as N}from"./paperclip-DQQVX5tJ.js";import"./empty-state-Bxfi7_ss.js";const b=["feedback","mine"];function y(){const s=l();return u({queryKey:b,queryFn:()=>s.listMyFeedback()})}const k=/^\d+\.\d+/;function w(s){return k.test(s)?`v${s}`:s}const v={bug:m,idea:j,feedback:i},R={bug:"Bug",idea:"Idea",feedback:"Feedback"};function S(s){switch(s.status){case"received":return"Received";case"triaged":return"Triaged";case"in_progress":return"In progress";case"shipped":return s.shippedVersion?`Shipped ${w(s.shippedVersion)}`:"Shipped";case"closed":return"Closed"}}function E(s){switch(s){case"in_progress":return"bg-amber-500/10 text-amber-600 dark:text-amber-400";case"shipped":return"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";default:return"bg-muted text-muted-foreground"}}function F(s,r=140){const t=s.split(`
1
+ import{a1 as l,a2 as u,j as e,fg as i,e as a,fh as m,b8 as x,G as h,eb as p}from"./index-CjUfPyOM.js";import{P as f}from"./page-container-B9sDc2wq.js";import{Q as g}from"./query-error-state-COuKRlU0.js";import{L as j}from"./lightbulb-Bbgsejp1.js";import{P as N}from"./paperclip-CzhXW5qi.js";import"./empty-state-aNwJA6H8.js";const b=["feedback","mine"];function y(){const s=l();return u({queryKey:b,queryFn:()=>s.listMyFeedback()})}const k=/^\d+\.\d+/;function w(s){return k.test(s)?`v${s}`:s}const v={bug:m,idea:j,feedback:i},R={bug:"Bug",idea:"Idea",feedback:"Feedback"};function S(s){switch(s.status){case"received":return"Received";case"triaged":return"Triaged";case"in_progress":return"In progress";case"shipped":return s.shippedVersion?`Shipped ${w(s.shippedVersion)}`:"Shipped";case"closed":return"Closed"}}function E(s){switch(s){case"in_progress":return"bg-amber-500/10 text-amber-600 dark:text-amber-400";case"shipped":return"bg-emerald-500/10 text-emerald-600 dark:text-emerald-400";default:return"bg-muted text-muted-foreground"}}function F(s,r=140){const t=s.split(`
2
2
  `)[0]??"";return t.length>r?`${t.slice(0,r)}…`:t}function C(s){const r=[s.hasScreenshot&&"screenshot",s.hasTranscript&&"transcript"].filter(t=>!!t);return r.length>0?r.join(", "):null}function L({item:s}){const r=v[s.kind]??i,t=C(s);return e.jsxs("li",{className:"hover:bg-muted/50 flex items-start gap-3 rounded-md px-2 py-2.5 transition-colors",children:[e.jsx(r,{className:"text-muted-foreground mt-0.5 size-4 shrink-0","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("p",{className:"text-foreground truncate text-sm",title:s.message,children:F(s.message)}),e.jsxs("p",{className:"text-muted-foreground mt-0.5 flex items-center gap-1 text-xs",children:[e.jsxs("span",{children:[R[s.kind]," · ",x(s.createdAt)]}),t&&e.jsxs("span",{className:"inline-flex items-center gap-0.5",children:[e.jsx("span",{"aria-hidden":"true",children:"·"}),e.jsx(N,{className:"size-3","aria-hidden":"true"}),t]})]})]}),e.jsx("span",{className:h("shrink-0 rounded-full px-2 py-0.5 text-xs font-medium whitespace-nowrap",E(s.status)),children:S(s)})]})}function n(){return e.jsxs("li",{className:"flex items-start gap-3 rounded-md px-2 py-2.5","aria-hidden":"true",children:[e.jsx(a,{className:"mt-0.5 size-4 shrink-0 rounded-full"}),e.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[e.jsx(a,{className:"h-3.5 w-3/4"}),e.jsx(a,{className:"h-3 w-1/3"})]}),e.jsx(a,{className:"h-4 w-16 shrink-0 rounded-full"})]})}function _(){const{data:s,isLoading:r,isError:t,refetch:o,isFetching:c}=y();return r?e.jsxs("ul",{className:"space-y-0.5","aria-label":"Loading your reports…",children:[e.jsx(n,{}),e.jsx(n,{}),e.jsx(n,{})]}):t?e.jsx(g,{className:"h-full",title:"Couldn’t load your reports",description:"Check that you’re online and try again.",onRetry:()=>void o(),isRetrying:c}):!s||s.length===0?e.jsxs("div",{className:"flex h-full flex-col items-center justify-center gap-2 p-8 text-center",children:[e.jsx(i,{className:"text-muted-foreground/50 size-8","aria-hidden":"true"}),e.jsx("p",{className:"text-sm font-medium",children:"Nothing sent yet"}),e.jsx("p",{className:"text-muted-foreground max-w-xs text-xs",children:"Send a report from the help menu to see it here."})]}):e.jsxs("div",{className:"flex h-full flex-col",children:[e.jsx("ul",{className:"min-h-0 flex-1 space-y-0.5 overflow-y-auto",children:s.map(d=>e.jsx(L,{item:d},d.id))}),e.jsx("p",{className:"text-muted-foreground border-border mt-2 border-t px-2 pt-2 text-xs",children:"Add your email to a report to hear when it ships."})]})}function B(){return e.jsxs(f,{width:"wide",scroll:!1,children:[e.jsxs("header",{className:"mb-6 shrink-0",children:[e.jsx(p,{children:"Your reports"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"What you sent DorkOS, and where each stands."})]}),e.jsx("div",{className:"min-h-0 flex-1",children:e.jsx(_,{})})]})}const D=B;export{D as component};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-CjUfPyOM.js";import{M as o}from"./Marketplace-BWDlXgwH.js";import{P as r}from"./page-container-B9sDc2wq.js";import"./PreviewRefusedNotice-CnqAE9sr.js";import"./shield-x-Dr4BZfo_.js";import"./card-DI7YtQh3.js";import"./empty-state-aNwJA6H8.js";import"./markdown-content-ysBIqFAg.js";import"./use-unclaimed-chats-D7SEUfiO.js";import"./use-bindings-Bu4yLLR5.js";import"./UnlinkDialog-DTuXHNsi.js";import"./use-dev-links-C0Zc30aj.js";import"./more-details-DHCpYDi7.js";import"./file-bSD5jgk_.js";import"./AgentPicker-DoGucmqI.js";import"./command-DpK0GpDM.js";import"./AgentOptionRow-D-QjHi5k.js";import"./useMutationState-rOg4bnKv.js";import"./file-exclamation-point-BcCIL-rE.js";import"./rotate-ccw-clock-LSKKAcnR.js";import"./path-input-Z2p922fj.js";function i(){return t.jsx(r,{width:"wide",children:t.jsx(o,{})})}const R=i;export{R as component};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CjUfPyOM.js";import{P as r}from"./page-container-B9sDc2wq.js";import{M as e}from"./MarketplaceSourcesView-BhKzgkiO.js";import"./use-pending-read-BBBAnUYu.js";function t(){return o.jsx(r,{width:"reading",children:o.jsx(e,{})})}const s=t;export{s as component};
@@ -0,0 +1 @@
1
+ import{S as o}from"./WorkView-_wehEEl-.js";import"./index-CjUfPyOM.js";import"./WidgetErrorCard-I8WiJv2g.js";import"./index-Dj4I8KcL.js";import"./PromptSuggestionChips-B9chKG4w.js";import"./primer-trigger-4qUY83SX.js";import"./use-is-below-desktop-BUS7OPGv.js";import"./use-notification-prefs-b8iKvzB4.js";import"./card-DI7YtQh3.js";import"./use-status-budget-CbmPFvpQ.js";import"./git-branch-ClXAt1_G.js";import"./use-update-config-Dfd7KMde.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./RuntimeSetupDialog-Er-lzjmK.js";import"./inline-code-DwFNff3_.js";import"./list-runtime-types-B0CSonAi.js";import"./RuntimeConnectFlow-IaRVgmqH.js";import"./useMutationState-rOg4bnKv.js";import"./runtime-connect-Dn0T5YWv.js";import"./unverified-catalog-notice-CxBO_pta.js";import"./layers-DFZUUHM5.js";import"./cpu-DzCUBK-1.js";import"./banner-Ctq7kvQ0.js";import"./UnreadDivider-l_VZ7ECn.js";import"./composer-insert-BpyATrmR.js";import"./use-composer-prefs-BnjCX9pM.js";import"./McpAppFrame-BotrzoHd.js";import"./more-details-DHCpYDi7.js";import"./find-latest-widget-fence-D01ENK2h.js";import"./file-bSD5jgk_.js";import"./use-session-canvas-u63m2mYH.js";import"./rotate-cw-scTEKxeZ.js";import"./query-keys-DeYqUDia.js";import"./index.esm-Bb3LMu5X.js";import"./file-text-DTvj1wzM.js";import"./markdown-content-ysBIqFAg.js";import"./shield-x-Dr4BZfo_.js";import"./McpSigninBody-CdeX_lYs.js";import"./image-off-4yaoLh32.js";import"./format-duration-BCr6uzby.js";import"./use-connector-management-Bo6wOJQS.js";import"./AgentRequestCard--9GA9ymH.js";import"./access-copy-Cj31J6PU.js";import"./query-error-state-COuKRlU0.js";import"./empty-state-aNwJA6H8.js";import"./use-bindings-Bu4yLLR5.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-CSmznLcG.js";import"./index-D0yajRDv.js";import"./progress-eQl1UvNz.js";import"./table-B0LsKsEv.js";import"./package-CD8xq7hk.js";import"./heart-BrjEmIsl.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-CzhXW5qi.js";import"./index-6yT0Qr0s.js";const mo=o;export{mo as component};
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TopologyGraph-LpxkBhGK.js","assets/index-DKTd8X7n.js","assets/index-D1kQ19Gb.css","assets/transform-BqqRT-Iy.js","assets/value-wA6veExk.js","assets/heart-DnR_GX4I.js","assets/AdapterIcon-CRRs6yil.js","assets/relay-trace-schemas-BYCaGsVJ.js","assets/form-LJ2Rf9ny.js","assets/BindingDialog-BXfjFGvP.js","assets/use-bindings-BPNK3sUh.js","assets/use-adapter-catalog-CytBTafV.js","assets/trust-posture-DszobEjt.js","assets/session-strategy-labels-C7Wduch3.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/use-mesh-topology-CnCeK4gS.js","assets/empty-state-Bxfi7_ss.js","assets/query-error-state-B456s96E.js","assets/use-delete-binding-CgTwS83G.js","assets/use-relay-config-CvU_70WJ.js","assets/use-pending-read-DBaC7e8N.js","assets/search-x-CzgTzL0z.js","assets/scroll-area-DVd6ctli.js","assets/OpenMeshSwitch-BBzgYSUc.js","assets/table-BIdFvzBs.js","assets/use-is-hub-CvEPWuj0.js","assets/page-container-D03bhclt.js","assets/profile-errors-DSnHlauU.js","assets/CommitmentList-S2O_hvwR.js","assets/TeamComputerEntry-BpjxLA1n.js","assets/ComputerViewer-CnYUWQBS.js","assets/TopologyGraph-C7eadB24.css"])))=>i.map(i=>d[i]);
2
- import{W as yt,r as y,ad as Ue,j as i,G as z,ar as $,cs as jt,B as I,ak as G,k4 as Ke,b8 as ce,_ as A,Y as _t,k5 as Nt,ai as Ft,dV as Ye,aj as Mt,k6 as Pt,a0 as Xe,cj as We,a1 as $t,k7 as Se,k8 as It,z as Qe,k9 as te,e6 as At,a2 as Vt,au as Et,ka as Ze,kb as K,bS as Je,kc as kt,kd as Dt,ke as zt,e as E,e9 as H,kf as _e,kg as Tt,kh as bt,ki as Lt,eK as Ht,f as et,kj as Gt,x as J,ew as Ot,eP as Ne,ho as Bt,T as qt,C as Ut,kk as tt,ba as Kt,eX as Yt,eu as Fe,en as Me,eo as Pe,ep as $e,eq as Ie,er as Ae,kl as ne,bL as Xt,X as Ce,t as nt,bk as Wt,g as st,km as Qt,kn as Zt,dW as Jt,ko as en,ea as tn,by as ge,kp as nn,dI as sn,I as on,kq as rn,d as an,eb as ln,c$ as un,g6 as dn,gR as cn,o as gn,kr as fn,l as Y,ae as mn,af as pn,aZ as hn}from"./index-DKTd8X7n.js";import{u as ot}from"./use-pending-read-DBaC7e8N.js";import{Q as rt}from"./query-error-state-B456s96E.js";import{u as it}from"./use-mesh-topology-CnCeK4gS.js";import{S as xn,u as vn}from"./search-x-CzgTzL0z.js";import{S as Sn}from"./scroll-area-DVd6ctli.js";import{u as Cn,a as wn,O as Ve,b as Rn}from"./OpenMeshSwitch-BBzgYSUc.js";import{T as yn,d as jn,b as X,e as Ee,a as _n,c as ke}from"./table-BIdFvzBs.js";import{u as Nn}from"./use-is-hub-CvEPWuj0.js";import{E as at}from"./empty-state-Bxfi7_ss.js";import{P as Fn}from"./page-container-D03bhclt.js";import{e as Mn,i as Pn}from"./profile-errors-DSnHlauU.js";import{r as $n,C as In}from"./CommitmentList-S2O_hvwR.js";import{T as An}from"./TeamComputerEntry-BpjxLA1n.js";/**
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/TopologyGraph-CiZ2ACcQ.js","assets/index-CjUfPyOM.js","assets/index-D2ZFfqZZ.css","assets/transform-BqqRT-Iy.js","assets/value-wA6veExk.js","assets/heart-BrjEmIsl.js","assets/AdapterIcon-CEHkdca8.js","assets/relay-trace-schemas-XcVQg5Fa.js","assets/form-C_yPntkz.js","assets/BindingDialog-DZcTXLE8.js","assets/use-bindings-Bu4yLLR5.js","assets/use-adapter-catalog-C333Z2Q6.js","assets/trust-posture-Cm7OhCEx.js","assets/session-strategy-labels-C7Wduch3.js","assets/_commonjs-dynamic-modules-TDtrdbi3.js","assets/use-mesh-topology-DurMpvjU.js","assets/empty-state-aNwJA6H8.js","assets/query-error-state-COuKRlU0.js","assets/use-delete-binding-DKObM-zT.js","assets/use-relay-config-BA6c0FMB.js","assets/use-pending-read-BBBAnUYu.js","assets/search-x-Cjf0n9z7.js","assets/scroll-area-BNFXgTKM.js","assets/OpenMeshSwitch-DdJ7g4yD.js","assets/table-B0LsKsEv.js","assets/use-is-hub-CFhvDMHt.js","assets/page-container-B9sDc2wq.js","assets/profile-errors-CezsKqhA.js","assets/CommitmentList-CcCSwcZ8.js","assets/TeamComputerEntry-BD89Y5e6.js","assets/ComputerViewer-B8SWICbj.js","assets/TopologyGraph-C7eadB24.css"])))=>i.map(i=>d[i]);
2
+ import{W as yt,r as y,ad as Ue,j as i,G as z,ar as $,cs as jt,B as I,ak as G,k4 as Ke,b8 as ce,_ as A,Y as _t,k5 as Nt,ai as Ft,dV as Ye,aj as Mt,k6 as Pt,a0 as Xe,cj as We,a1 as $t,k7 as Se,k8 as It,z as Qe,k9 as te,e6 as At,a2 as Vt,au as Et,ka as Ze,kb as K,bS as Je,kc as kt,kd as Dt,ke as zt,e as E,e9 as H,kf as _e,kg as Tt,kh as bt,ki as Lt,eK as Ht,f as et,kj as Gt,x as J,ew as Ot,eP as Ne,ho as Bt,T as qt,C as Ut,kk as tt,ba as Kt,eX as Yt,eu as Fe,en as Me,eo as Pe,ep as $e,eq as Ie,er as Ae,kl as ne,bL as Xt,X as Ce,t as nt,bk as Wt,g as st,km as Qt,kn as Zt,dW as Jt,ko as en,ea as tn,by as ge,kp as nn,dI as sn,I as on,kq as rn,d as an,eb as ln,c$ as un,g6 as dn,gR as cn,o as gn,kr as fn,l as Y,ae as mn,af as pn,aZ as hn}from"./index-CjUfPyOM.js";import{u as ot}from"./use-pending-read-BBBAnUYu.js";import{Q as rt}from"./query-error-state-COuKRlU0.js";import{u as it}from"./use-mesh-topology-DurMpvjU.js";import{S as xn,u as vn}from"./search-x-Cjf0n9z7.js";import{S as Sn}from"./scroll-area-BNFXgTKM.js";import{u as Cn,a as wn,O as Ve,b as Rn}from"./OpenMeshSwitch-DdJ7g4yD.js";import{T as yn,d as jn,b as X,e as Ee,a as _n,c as ke}from"./table-B0LsKsEv.js";import{u as Nn}from"./use-is-hub-CFhvDMHt.js";import{E as at}from"./empty-state-aNwJA6H8.js";import{P as Fn}from"./page-container-B9sDc2wq.js";import{e as Mn,i as Pn}from"./profile-errors-CezsKqhA.js";import{r as $n,C as In}from"./CommitmentList-CcCSwcZ8.js";import{T as An}from"./TeamComputerEntry-BD89Y5e6.js";/**
3
3
  * @license lucide-react v1.48.0 - ISC
4
4
  *
5
5
  * This source code is licensed under the ISC license.
@@ -25,4 +25,4 @@ import{W as yt,r as y,ad as Ue,j as i,G as z,ar as $,cs as jt,B as I,ak as G,k4
25
25
  * LICENSE.md file in the root directory of this source tree.
26
26
  *
27
27
  * @license MIT
28
- */function Te(e,s){return e?ws(e)?y.createElement(e,s):e:null}function ws(e){return Rs(e)||typeof e=="function"||ys(e)}function Rs(e){return typeof e=="function"&&(()=>{const s=Object.getPrototypeOf(e);return s.prototype&&s.prototype.isReactComponent})()}function ys(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function js(e){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=y.useState(()=>({current:Ss(s)})),[n,o]=y.useState(()=>t.current.initialState);return t.current.setOptions(r=>({...r,...e,state:{...n,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),t.current}function _s(e){if("id"in e&&e.id)return e.id;if("accessorKey"in e&&typeof e.accessorKey=="string")return e.accessorKey}function Ns({columns:e,data:s,emptyMessage:t="No results.",tableOptions:n,groupBy:o,className:r,tableClassName:a}){var p;const l=Ue(),u=y.useMemo(()=>{var x;if(!l)return{};const m={};for(const v of e){const w=_s(v);w&&((x=v.meta)!=null&&x.hideOnMobile)&&(m[w]=!1)}return m},[e,l]),d=y.useMemo(()=>{var m;return{...u,...((m=n==null?void 0:n.state)==null?void 0:m.columnVisibility)??{}}},[u,(p=n==null?void 0:n.state)==null?void 0:p.columnVisibility]),f=js({data:s,columns:e,getCoreRowModel:Cs(),...n,state:{...n==null?void 0:n.state,columnVisibility:d}}),h=f.getRowModel().rows,g=f.getVisibleLeafColumns().length,c=y.useMemo(()=>{if(!o)return new Map;const m=new Map;for(const x of h){const v=o.key(x.original);m.set(v,(m.get(v)??0)+1)}return m},[o,h]);return i.jsx("div",{"data-slot":"data-table",className:z("rounded-md border",r),children:i.jsxs(yn,{className:a,children:[i.jsx(jn,{children:f.getHeaderGroups().map(m=>i.jsx(X,{children:m.headers.map(x=>{var v;return i.jsx(Ee,{className:(v=x.column.columnDef.meta)==null?void 0:v.headClassName,children:x.isPlaceholder?null:Te(x.column.columnDef.header,x.getContext())},x.id)})},m.id))}),i.jsx(_n,{children:h.length?h.map((m,x)=>{const v=o==null?void 0:o.key(m.original),w=x>0?o==null?void 0:o.key(h[x-1].original):void 0,R=v!==void 0&&v!==w;return i.jsxs(y.Fragment,{children:[R&&i.jsx(X,{"data-slot":"data-table-group-header",className:"bg-muted/40 hover:bg-muted/40",children:i.jsx(Ee,{colSpan:g,className:"h-8",children:o==null?void 0:o.header(v,c.get(v)??0)})}),i.jsx(X,{"data-state":m.getIsSelected()?"selected":void 0,children:m.getVisibleCells().map(j=>{var _;return i.jsx(ke,{className:(_=j.column.columnDef.meta)==null?void 0:_.cellClassName,children:Te(j.column.columnDef.cell,j.getContext())},j.id)})})]},m.id)}):i.jsx(X,{children:i.jsx(ke,{colSpan:g,className:"h-24 text-center",children:t})})})]})})}function Fs({onClearFilters:e,filterDescription:s}){return i.jsxs($.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[i.jsx(xn,{className:"text-muted-foreground/50 size-10"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:s?`No agents match ${s}`:"No agents match your filters"}),i.jsx(I,{variant:"outline",size:"sm",onClick:e,children:"Clear filters"})]})}function Ms({peopleOnly:e}){return i.jsxs($.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col items-center justify-center gap-2 py-12 text-center","data-slot":"agent-roster-filter-empty",children:[i.jsx(jt,{className:"text-muted-foreground/50 size-10"}),i.jsx("p",{className:"text-muted-foreground max-w-xs text-sm",children:e?"This table lists agents. Switch to Cards to see people.":"No agents match this filter. Change it in Cards."})]})}const be=["needs-you","working","quiet"],Ps=1440*60*1e3;function $s(e,s=Date.now()){const t=Date.parse(e);return Number.isNaN(t)?!0:s-t>=Ps}const Is=30,As=25,Vs=20,Es=20,ks=10,Ds=0;function ve(e){const{healthStatus:s,taskCount:t,chatState:n}=e;return s==="unreachable"?{group:"needs-you",severity:Is}:n==="needs-attention"?{group:"needs-you",severity:As}:s==="stale"&&t>0&&e.isPastOnboardingGrace?{group:"needs-you",severity:Vs}:n==="active"?{group:"working",severity:Es}:s==="active"?{group:"working",severity:ks}:{group:"quiet",severity:Ds}}function Le(e){if(!e)return Number.NEGATIVE_INFINITY;const s=Date.parse(e);return Number.isNaN(s)?Number.NEGATIVE_INFINITY:s}function zs(e,s){const t=ve(e),n=ve(s),o=be.indexOf(t.group)-be.indexOf(n.group);if(o!==0)return o;const r=n.severity-t.severity;if(r!==0)return r;const a=Le(s.lastSeenAt)-Le(e.lastSeenAt);return a!==0?a:G(e).localeCompare(G(s))}function Ts(e,s="asc"){const t=s==="desc"?-1:1;return[...e].sort((n,o)=>t*zs(n,o))}const bs={"needs-you":{label:"Needs you",toneClass:"text-destructive"},working:{label:"Working",toneClass:"text-foreground"},quiet:{label:"Quiet",toneClass:"text-muted-foreground"}};function Ls(e,s,t){if(!t)return e;if(t.kind==="people")return[];if(!(t.owner!==void 0||(t.q??"").trim()!==""))return e;const o=s.filter(a=>a.kind==="agent");if(o.length===0)return e;const r=new Set(Ke(o,t).map(a=>a.id));return e.filter(a=>r.has(a.id))}const He=32,Hs=5,vt="Checked in",Gs={heartbeat:"Checked in",message_sent:"Got a message",response_complete:"Finished a reply"};function Os(e,s){return s===null&&e==="stale"}function Ge(e){return e.length<2||e.length>Hs?!1:e===e.toUpperCase()&&new RegExp("\\p{Lu}","u").test(e)}function Bs(e){const s=Gs[e.trim().toLowerCase()];if(s)return s;const t=e.replace(/[^\p{L}\p{N}]+/gu," ").trim().split(" ").filter(Boolean).map(a=>Ge(a)?a:a.toLowerCase());if(t.length===0)return vt;const n=t[0];t[0]=Ge(n)?n:n.replace(/^./u,a=>a.toUpperCase());const o=t.join(" "),r=Array.from(o);return r.length<=He?o:`${r.slice(0,He-1).join("").trimEnd()}…`}function Oe(e){const s=e.filter(t=>!!t);return s.length>0?s.join(" · "):null}function qs(e){const{healthStatus:s,lastSeenAt:t,lastSeenEvent:n,chatState:o}=e,r=t?ce(t):null,a=n?Bs(n):null;return s==="unreachable"?{primary:"Can’t be reached",secondary:Oe([a,r??"never seen"]),toneClass:"text-destructive"}:o==="needs-attention"?{primary:"A chat needs you",secondary:Oe([a,r]),toneClass:"text-destructive"}:Os(s,t)?o==="active"?{primary:"Active in a chat",secondary:null,toneClass:"text-foreground"}:{primary:"Not used yet",secondary:null,toneClass:"text-muted-foreground"}:{primary:a??vt,secondary:r,toneClass:s==="active"?"text-foreground":"text-muted-foreground"}}function Us(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s.length<=2?e:s.slice(-2).join("/")}function Ks({row:e,onOpen:s}){const{color:t,emoji:n}=Ft(e),o=Us(e.projectPath),r=Ye(e.runtime).label;return i.jsxs("button",{type:"button",className:"flex w-full min-w-0 items-center gap-2 text-left",onClick:s,children:[i.jsx(Mt,{color:t,emoji:n,size:"xs"}),i.jsxs("span",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"block truncate text-sm font-medium hover:underline",children:G(e)}),i.jsxs("span",{className:"text-muted-foreground block truncate text-xs",children:[o??r,o&&i.jsxs("span",{className:"hidden md:inline",children:[" · ",r]})]})]}),e.isDefault&&i.jsxs(A,{size:"xs",variant:"outline",className:"shrink-0 max-md:border-0 max-md:px-0 max-md:py-0",children:[i.jsx(Pt,{className:"size-2.5 fill-current md:mr-0.5"}),i.jsx("span",{className:"sr-only md:not-sr-only",children:"Default"})]})]})}function Ys({row:e}){const{primary:s,secondary:t,toneClass:n}=qs(e);return i.jsxs("span",{className:"block min-w-0",children:[i.jsx("span",{className:z("block truncate text-sm",n),children:s}),t&&i.jsx("span",{className:"text-muted-foreground block truncate text-xs tabular-nums",children:t})]})}function Xs(e){return[{accessorKey:"name",header:"Agent",meta:{headClassName:"w-[42%] md:w-[38%]",cellClassName:"overflow-hidden"},cell:({row:s})=>i.jsx(Ks,{row:s.original,onOpen:()=>e.onNavigate(s.original.projectPath??"")})},{accessorKey:"lastSeenEvent",header:"Activity",meta:{headClassName:"truncate",cellClassName:"truncate"},cell:({row:s})=>i.jsx(Ys,{row:s.original})},{id:"managedBy",header:"Managed by",meta:{hideOnMobile:!0,headClassName:"w-[140px]",cellClassName:"overflow-hidden"},cell:({row:s})=>{const t=s.original.managedBy;return i.jsx("span",{"data-slot":"agent-managed-by",className:"text-muted-foreground block truncate text-xs",children:t??"—"})}},{accessorKey:"taskCount",header:"Scheduled",meta:{hideOnMobile:!0,headClassName:"w-[110px]"},cell:({row:s})=>{const t=s.original.taskCount;return t===0?i.jsx("span",{className:"text-muted-foreground text-xs",children:"—"}):i.jsxs(A,{variant:"outline",className:"whitespace-nowrap",children:[t," ",t===1?"schedule":"schedules"]})}},{id:"actions",header:"",meta:{headClassName:"w-[88px]"},cell:({row:s})=>{const t=s.original;return i.jsxs("div",{className:"flex items-center justify-end gap-1",children:[i.jsx(I,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:n=>{n.stopPropagation(),e.onNavigate(t.projectPath??"")},"aria-label":`Open chat with ${G(t)}`,children:i.jsx(_t,{className:"size-4"})}),i.jsx(I,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:n=>{n.stopPropagation(),e.onViewProfile(t.projectPath??"")},"aria-label":`Open ${G(t)}’s profile`,children:i.jsx(Nt,{className:"size-4"})})]})}}]}function Ws({group:e,count:s}){const{label:t,toneClass:n}=bs[e];return i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-semibold tracking-wide uppercase",children:[e==="needs-you"&&i.jsx(Xe,{className:z("size-3.5",n)}),i.jsx("span",{className:n,children:t}),i.jsx("span",{className:"text-muted-foreground font-normal tabular-nums",children:s})]})}function Qs({rows:e,grouped:s,callbacks:t}){const n=y.useMemo(()=>Xs(t),[t]),o=y.useMemo(()=>s?{key:r=>ve(r).group,header:(r,a)=>i.jsx(Ws,{group:r,count:a})}:void 0,[s]);return i.jsx(Ns,{columns:n,data:e,groupBy:o,emptyMessage:"No agents registered.",className:"border-0",tableClassName:"table-fixed"})}function Zs({agents:e,isLoading:s,rosterFilters:t}){var O;const n=We(),o=$t(),{open:r}=Se(),a=It(),l=vn(te,{debounce:{search:200}}),{data:u}=Qe(),d=y.useMemo(()=>(u==null?void 0:u.members)??[],[u]),f=y.useMemo(()=>Ls(e,d,t),[e,d,t]),h=y.useMemo(()=>[...new Set(f.map(N=>N.namespace).filter(N=>!!N))],[f]),g=!l.sortField||l.sortField===_e,c=y.useMemo(()=>g?te.applyFilters(f,l.values):At(f,te,l.values,bt,{field:l.sortField,direction:l.sortDirection}),[f,g,l.values,l.sortField,l.sortDirection]),p=y.useMemo(()=>e.map(N=>N.projectPath).filter(N=>!!N),[e]),m=Cn(p),{data:x}=Vt({queryKey:Et.current(),queryFn:()=>o.getConfig(),staleTime:3e4}),v=y.useMemo(()=>{const N=new Map;for(const F of d){if(F.kind!=="agent")continue;const L=Ze(F,d);L&&N.set(F.id,K(L))}return N},[d]),w=y.useMemo(()=>{const N=c.map(F=>{var L;return{...F,chatState:(F.projectPath?m[F.projectPath]:void 0)??"fresh",isPastOnboardingGrace:$s(F.registeredAt),isDefault:((L=x==null?void 0:x.agents)==null?void 0:L.defaultAgent)===F.name,managedBy:v.get(F.id)??null}});return g?Ts(N,l.sortDirection):N},[c,m,(O=x==null?void 0:x.agents)==null?void 0:O.defaultAgent,v,g,l.sortDirection]),R=y.useCallback(N=>{const F=a.get(N);if(F===void 0){Je.getState().openProfileDocked(N);return}r(F)},[a,r]),j=y.useCallback(N=>{kt(o,N).then(F=>n(F)).catch(F=>{Dt(o,F),zt(N)})},[n,o]),_=y.useMemo(()=>({onNavigate:j,onViewProfile:R}),[j,R]);function V(){return f.length===0&&e.length>0?i.jsx(Ms,{peopleOnly:(t==null?void 0:t.kind)==="people"}):c.length===0&&f.length>0?i.jsx(Fs,{onClearFilters:l.clearAll,filterDescription:l.describeActive()}):i.jsx(Qs,{rows:w,grouped:g,callbacks:_})}return s?i.jsx("div",{className:"space-y-3 p-4 sm:px-6",children:Array.from({length:3}).map((N,F)=>i.jsx(E,{className:"h-14 w-full rounded-xl"},F))}):i.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[i.jsxs(H,{state:l,className:"sm:px-6",children:[i.jsx(H.Search,{placeholder:"Filter agents…"}),i.jsx(H.Primary,{name:"status"}),i.jsx(H.AddFilter,{dynamicOptions:{namespace:h}}),i.jsx(H.Sort,{options:Tt,defaultField:_e}),i.jsx(H.ResultCount,{count:c.length,total:f.length,noun:"agent"}),i.jsx(H.ActiveFilters,{})]}),i.jsx(Sn,{className:"min-h-0 flex-1",children:i.jsx("div",{className:"px-4 pb-4 sm:px-6",children:V()})})]})}const Js={animate:{transition:{staggerChildren:.1}}},eo={initial:{opacity:0},animate:{opacity:.2,transition:{duration:.3}}};function de(){return i.jsxs($.div,{variants:eo,className:"rounded-xl border border-dashed px-4 py-3",children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx(E,{className:"size-3 rounded-full"}),i.jsx(E,{className:"h-3 w-32"}),i.jsx(E,{className:"h-3 w-16"}),i.jsx(E,{className:"ml-auto h-3 w-10"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(E,{className:"h-2.5 w-48"}),i.jsx(E,{className:"h-2.5 w-20"})]})]})}function St(){const e=Lt(n=>n.open),s=Ht(n=>n.open),t=Nn();return i.jsxs("div",{className:"relative w-full max-w-2xl px-4",children:[i.jsxs($.div,{variants:Js,initial:"initial",animate:"animate",className:"space-y-3",children:[i.jsx(de,{}),i.jsx(de,{}),i.jsx(de,{})]}),i.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:t?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-lg font-semibold",children:"No agents yet"}),i.jsxs(I,{size:"sm",className:"gap-1.5",onClick:()=>s(),children:[i.jsx(et,{className:"size-3.5"}),"Create agent"]})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-lg font-semibold",children:"Bring in existing projects"}),i.jsxs(I,{size:"sm",className:"gap-1.5",onClick:e,children:[i.jsx(Vn,{className:"size-3.5"}),"Search for projects"]})]})})]})}function to(){const{data:e,isLoading:s}=Gt(),t=(e==null?void 0:e.denied)??[];return s?i.jsx("div",{className:"flex items-center justify-center p-8",children:i.jsx(J,{size:"md",className:"text-muted-foreground",label:"Loading blocked paths"})}):t.length===0?i.jsx(at,{icon:Ot,headline:"No blocked paths",description:"Folders you block from scans show up here."}):i.jsx("div",{className:"space-y-2 p-4",children:t.map(n=>i.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border px-4 py-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate font-mono text-sm",title:n.path,children:n.path}),n.reason&&i.jsx("p",{className:"text-muted-foreground truncate text-xs",title:n.reason,children:n.reason})]}),i.jsx(A,{variant:"outline",className:"shrink-0",children:n.deniedBy})]},n.path))})}function no({namespace:e,agentCount:s,agents:t}){const[n,o]=y.useState(!1);return i.jsxs("div",{className:"rounded-xl border",children:[i.jsxs("button",{type:"button",onClick:()=>o(!n),className:"hover:bg-muted/50 flex w-full items-center gap-2 px-4 py-3 text-left transition-colors duration-150",children:[n?i.jsx(qt,{className:"size-4"}):i.jsx(Ut,{className:"size-4"}),i.jsx("span",{className:"text-sm font-medium",children:e}),i.jsxs(A,{variant:"secondary",className:"ml-auto",children:[s," agent",s!==1?"s":""]})]}),n&&i.jsx("div",{className:"space-y-2 border-t px-4 py-2",children:t.map(r=>i.jsx("div",{className:"flex items-center justify-between py-1",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm",children:G(r)}),i.jsx(A,{variant:"outline",children:tt(r.runtime)})]})},r.id))})]})}function so({sourceNamespace:e,targetNamespace:s,action:t,origin:n,onRemove:o}){const r=n==="default";return i.jsxs("div",{className:"flex items-center justify-between rounded-lg border px-3 py-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx("span",{className:"font-mono",children:e}),i.jsx("span",{className:"text-muted-foreground",children:"→"}),i.jsx("span",{className:"font-mono",children:s}),i.jsx(A,{variant:t==="allow"?"default":"destructive",children:t}),r&&i.jsx(A,{tone:"neutral",variant:"outline",children:"built-in"})]}),r?i.jsx("span",{className:"text-muted-foreground flex size-8 items-center justify-center",title:"Built-in rule, always enforced. Not removable",children:i.jsx(Kt,{className:"size-4","aria-hidden":"true"})}):i.jsx(I,{type:"button",variant:"ghost",size:"icon-sm",onClick:o,className:"text-muted-foreground hover:bg-destructive/10 hover:text-destructive","aria-label":`Remove access from ${e} to ${s}`,children:i.jsx(Yt,{})})]})}const Ct="acl-open-mesh-explanation";function oo({namespaces:e,onAdd:s,isPending:t,inert:n}){const[o,r]=y.useState(""),[a,l]=y.useState("");function u(f){f.preventDefault(),!n&&o&&a&&o!==a&&(s(o,a),r(""),l(""))}const d=n?{"aria-disabled":!0,"aria-describedby":Ct}:{};return i.jsxs("form",{onSubmit:u,className:"flex items-end gap-2",children:[i.jsxs("div",{className:"flex-1 space-y-1",children:[i.jsx(Fe,{htmlFor:"acl-source",className:"text-muted-foreground text-xs font-medium",children:"Source"}),i.jsxs(Me,{value:o,onValueChange:n?()=>{}:r,children:[i.jsx(Pe,{id:"acl-source",className:"w-full aria-disabled:pointer-events-none aria-disabled:opacity-50",...d,children:i.jsx($e,{placeholder:"Pick a project"})}),i.jsx(Ie,{children:e.map(f=>i.jsx(Ae,{value:f,children:f},f))})]})]}),i.jsxs("div",{className:"flex-1 space-y-1",children:[i.jsx(Fe,{htmlFor:"acl-target",className:"text-muted-foreground text-xs font-medium",children:"Target"}),i.jsxs(Me,{value:a,onValueChange:n?()=>{}:l,children:[i.jsx(Pe,{id:"acl-target",className:"w-full aria-disabled:pointer-events-none aria-disabled:opacity-50",...d,children:i.jsx($e,{placeholder:"Pick a project"})}),i.jsx(Ie,{children:e.map(f=>i.jsx(Ae,{value:f,children:f},f))})]})]}),i.jsxs(I,{type:"submit",className:"aria-disabled:pointer-events-none aria-disabled:opacity-50",disabled:!n&&(t||!o||!a||o===a),...d,children:[t?i.jsx(J,{}):i.jsx(et,{}),"Allow access"]})]})}function ro({onGoToDiscovery:e}={}){const{data:s,isLoading:t}=it(),{mutate:n,isPending:o}=wn();if(t)return i.jsx("div",{className:"flex items-center justify-center p-8",children:i.jsx(J,{size:"md",className:"text-muted-foreground"})});const r=(s==null?void 0:s.namespaces)??[],a=(s==null?void 0:s.openMesh)??!1,l=((s==null?void 0:s.accessRules)??[]).filter(d=>!(d.origin==="explicit"&&d.sourceNamespace===Ne&&d.targetNamespace===Ne)),u=r.map(d=>d.namespace);return r.length===0?i.jsxs("div",{className:"space-y-6 p-4",children:[i.jsx(Ve,{}),i.jsx(at,{icon:Bt,headline:"You need agents in more than one project",description:"Add agents from a second folder to let two projects talk.",action:e?{label:"Go to Discovery",onClick:e}:void 0})]}):i.jsxs("div",{className:"space-y-6 p-4",children:[i.jsx(Ve,{}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Projects"}),r.map(d=>i.jsx(no,{namespace:d.namespace,agentCount:d.agentCount,agents:d.agents},d.namespace))]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Cross-project access rules"}),l.length===0?i.jsx("p",{className:"text-muted-foreground text-xs",children:"No rules yet. Agents only talk within their own project."}):i.jsx("div",{className:"space-y-1",children:l.map(d=>i.jsx(so,{sourceNamespace:d.sourceNamespace,targetNamespace:d.targetNamespace,action:d.action,origin:d.origin,onRemove:()=>n({sourceNamespace:d.sourceNamespace,targetNamespace:d.targetNamespace,action:"deny"})},`${d.sourceNamespace}-${d.targetNamespace}-${d.action}-${d.origin}`))})]}),u.length>=2&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Allow cross-project access"}),a&&i.jsx("p",{id:Ct,className:"text-muted-foreground text-xs",children:"Already allowed by the switch above. Turn it off to pick pairs."}),i.jsx(oo,{namespaces:u,isPending:o,inert:a,onAdd:(d,f)=>n({sourceNamespace:d,targetNamespace:f,action:"allow"})})]})]})}const wt={active:{label:"Active",dot:ne.working},inactive:{label:"Inactive",dot:ne["needs-you"]},stale:{label:"Stale",dot:"bg-muted-foreground/50"},unreachable:{label:"Unreachable",dot:ne.error}};function io(e){return e in wt}function Be({onClick:e}){return i.jsx("button",{type:"button",onClick:e,"aria-label":"Close detail panel",className:"text-muted-foreground hover:text-foreground",children:i.jsx(Ce,{className:"size-(--size-icon-sm)"})})}function qe({agentId:e,onClose:s}){const{data:t,isLoading:n}=Rn(e),{open:o}=Se();if(n)return i.jsx("div",{className:"flex w-64 items-center justify-center border-l p-4",children:i.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})});if(!t)return i.jsxs("div",{className:"w-64 border-l p-4",children:[i.jsx("div",{className:"flex justify-end",children:i.jsx(Be,{onClick:s})}),i.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Agent not found"})]});const r=io(t.status)?t.status:"stale",a=wt[r];return i.jsxs("div",{className:"w-64 overflow-y-auto border-l p-4",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsx("h3",{className:"truncate text-sm font-semibold",children:t.name}),i.jsx(Be,{onClick:s})]}),i.jsxs("div",{className:"space-y-3 text-xs",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:z("h-2.5 w-2.5 rounded-full",a.dot),"aria-hidden":"true"}),i.jsx("span",{children:a.label})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Last seen: "}),i.jsx("span",{children:t.lastSeenAt?ce(t.lastSeenAt):"Never"})]}),t.lastSeenEvent&&i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Last event: "}),i.jsx("span",{children:t.lastSeenEvent})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Runs on: "}),i.jsx(A,{size:"xs",variant:"secondary",children:tt(t.runtime)})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Registered: "}),i.jsx("span",{children:t.registeredAt?ce(t.registeredAt):"Unknown"})]}),Array.isArray(t.capabilities)&&t.capabilities.length>0&&i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground mb-1 block",children:"Capabilities:"}),i.jsx("div",{className:"flex flex-wrap gap-1",children:t.capabilities.map(l=>i.jsx(A,{size:"xs",variant:"outline",children:l},l))})]})]}),i.jsx("div",{className:"mt-4 space-y-2 border-t pt-3",children:i.jsxs("button",{type:"button",onClick:()=>o(e),className:"hover:bg-muted inline-flex w-full items-center justify-center gap-2 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors duration-150",children:[i.jsx(Xt,{className:"size-3.5"}),"View profile"]})})]})}function ao(){return i.jsx(ro,{})}function lo(e){var s;if(e.agent){const t=Ye(e.agent.runtime).label;return e.agent.model?`${t} · ${e.agent.model}`:t}return(s=e.person)!=null&&s.role?e.person.role:e.origin==="local"?"On this machine":`On ${Zt(e.origin.platform)}`}const uo={layout:"position",initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.97,transition:{duration:.15}},transition:{layout:{type:"spring",stiffness:280,damping:32},duration:.2,ease:[0,0,.2,1]}};function co({member:e,owner:s,onSelectOwner:t,onOpenProfile:n,onSetLinkedToMe:o,linkPending:r=!1,linkError:a,ownedAgentCount:l,layoutAnimated:u=!1,ref:d,className:f}){var p,m,x;const h=nt(e),g=Wt(e),c=(p=e.person)==null?void 0:p.linkedToYou;return i.jsxs($.article,{ref:d,...u?uo:{},"data-slot":"team-member-card","data-member-id":e.id,"data-layout-animated":String(u),style:{"--identity-color":h.color},className:z("bg-card shadow-soft relative flex items-start gap-3 rounded-lg border p-4","border-[color-mix(in_oklch,var(--identity-color)_var(--identity-border-strength),hsl(var(--border)))]","[--identity-border-strength:0%]",n&&["transition-[box-shadow,border-color,translate,scale] duration-(--identity-settle) ease-(--identity-ease-standard)","hover:shadow-elevated hover:-translate-y-px","hover:[--identity-border-strength:var(--identity-border-mix)]","has-[[data-slot=team-member-open]:focus-visible]:shadow-elevated has-[[data-slot=team-member-open]:focus-visible]:-translate-y-px","has-[[data-slot=team-member-open]:focus-visible]:[--identity-border-strength:var(--identity-border-mix)]","active:translate-y-0 active:scale-[0.99] active:duration-(--identity-press)",Qt,"has-[[data-card-aside]:hover]:shadow-soft has-[[data-card-aside]:hover]:translate-y-0 has-[[data-card-aside]:hover]:[--identity-border-strength:0%]","has-[[data-card-aside]:focus-visible]:shadow-soft has-[[data-card-aside]:focus-visible]:translate-y-0 has-[[data-card-aside]:focus-visible]:[--identity-border-strength:0%]","[&:has([data-card-aside]:hover)_[data-slot=identity-badge]]:scale-100 [&:has([data-card-aside]:hover)_[data-slot=identity-badge]]:rotate-0","[&:has([data-card-aside]:focus-visible)_[data-slot=identity-badge]]:scale-100 [&:has([data-card-aside]:focus-visible)_[data-slot=identity-badge]]:rotate-0","has-[[data-card-aside]:active]:scale-100"],f),children:[i.jsx(st,{size:"md",kind:h.kind,color:h.color,emoji:h.emoji,imageUrl:h.imageUrl,fallback:h.fallback,origin:h.origin}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-1",children:[i.jsx("h3",{className:"min-w-0 truncate text-sm font-medium",children:n?i.jsx("button",{type:"button","data-slot":"team-member-open",onClick:()=>n(e.id),"aria-label":`Open ${e.displayName}’s profile`,className:"focus-ring max-w-full truncate rounded text-left after:absolute after:inset-0 after:rounded-lg after:content-['']",children:e.displayName}):e.displayName}),e.isSelf&&i.jsx(A,{size:"xs",variant:"secondary",children:"you"}),((m=e.agent)==null?void 0:m.isDefault)&&i.jsx(A,{size:"xs",variant:"outline",children:"default"}),c&&i.jsx(A,{size:"xs",variant:"secondary",children:"also you"})]}),e.handle!==null&&i.jsxs("p",{"data-slot":"team-member-handle",className:"text-muted-foreground truncate text-xs",children:["@",e.handle]}),g&&i.jsx("p",{"data-slot":"team-member-name-source",className:"text-muted-foreground truncate text-xs",children:g}),i.jsx("p",{className:"text-muted-foreground mt-1.5 truncate text-xs",children:lo(e)}),((x=e.agent)==null?void 0:x.recentlyActive)&&i.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Active in the last hour"}),c!==void 0&&o&&i.jsx("button",{type:"button","data-slot":"team-member-link-to-me","data-card-aside":"",disabled:r,onClick:()=>o(e.id,!c),"aria-label":c?`Stop treating ${e.displayName} as you`:`Tell DorkOS that ${e.displayName} is you`,className:"text-muted-foreground hover:text-foreground focus-visible:text-foreground focus-ring relative mt-1.5 block w-fit max-w-full truncate rounded text-xs underline-offset-2 transition-[color] duration-(--identity-answer) ease-(--identity-ease-standard) hover:underline focus-visible:underline disabled:pointer-events-none disabled:opacity-60",children:c?"Not me":"This is me"}),a&&i.jsx("p",{role:"alert","data-slot":"team-member-link-error",className:"text-destructive relative mt-1 text-xs",children:a}),s&&t&&i.jsxs("div",{className:"relative mt-1.5 flex w-fit max-w-full items-baseline",children:[i.jsxs("button",{type:"button","data-slot":"team-member-owner","data-card-aside":"",onClick:()=>t(s.id),"aria-label":`Show only ${s.displayName} and their agents`,className:"text-muted-foreground hover:text-foreground focus-visible:text-foreground focus-ring peer/owner relative min-w-0 truncate rounded text-xs underline-offset-2 transition-[color] duration-(--identity-answer) ease-(--identity-ease-standard) hover:underline focus-visible:underline",children:["by ",K(s)]}),l!==void 0&&l>0&&i.jsxs("span",{"aria-hidden":!0,"data-slot":"team-member-owner-count",className:"text-muted-foreground pointer-events-none absolute top-0 left-full ml-1 hidden text-xs whitespace-nowrap opacity-0 transition-opacity duration-(--identity-answer) ease-(--identity-ease-standard) peer-hover/owner:opacity-100 peer-focus-visible/owner:opacity-100 [@media(hover:hover)]:block",children:["· ",l," ",l===1?"agent":"agents"]})]})]})]})}const go=120;function fo({memberCount:e,reducedMotion:s}){return!s&&e<=go}const Rt="grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3";function mo({owner:e,onSelectOwner:s,ref:t}){const n=nt(e),o="col-span-full mt-3 flex min-w-0 items-center first:mt-0",r=i.jsxs(i.Fragment,{children:[i.jsx(st,{size:"xs",kind:n.kind,color:n.color,emoji:n.emoji,imageUrl:n.imageUrl,fallback:n.fallback,origin:n.origin}),i.jsx("span",{className:"truncate text-sm font-medium",children:e.displayName}),i.jsx("span",{className:"text-muted-foreground truncate text-xs",children:K(e)})]});return s?i.jsx("h2",{ref:t,className:o,children:i.jsx("button",{type:"button",onClick:()=>s(e.id),className:"focus-ring flex min-w-0 items-center gap-2 rounded",children:r})}):i.jsx("h2",{ref:t,className:z(o,"gap-2"),children:r})}function po({members:e,roster:s,grouped:t,onSelectOwner:n,onOpenProfile:o,onSetLinkedToMe:r,identityLinkState:a,className:l}){const u=Jt(),d=fo({memberCount:e.length,reducedMotion:u===!0}),f=(g,c)=>{const p=c?Ze(g,s):void 0;return i.jsx(co,{member:g,owner:p,ownedAgentCount:p?nn(p.id,s):void 0,onSelectOwner:c?n:void 0,onOpenProfile:o,onSetLinkedToMe:r,linkPending:(a==null?void 0:a.pendingId)===g.id,...(a==null?void 0:a.errorId)===g.id&&a.errorMessage?{linkError:a.errorMessage}:{},layoutAnimated:d},g.id)},h=t?en(e,s).flatMap(g=>[g.owner?i.jsx(mo,{owner:g.owner,onSelectOwner:n},`cluster:${g.owner.id}`):i.jsx("h2",{className:"text-muted-foreground col-span-full mt-3 text-sm font-medium first:mt-0",children:"No owner"},"cluster:__unowned"),...g.members.map(c=>f(c,!1))]):e.map(g=>f(g,!0));return i.jsx("div",{"data-slot":t?"team-roster-groups":"team-roster-grid","data-testid":tn.teamRoster,"data-layout-animated":String(d),className:z(Rt,l),children:i.jsx(ge,{mode:"popLayout",initial:!1,children:h})})}const ho=6;function xo({count:e=ho}={}){return i.jsx("div",{className:Rt,"aria-busy":"true","aria-label":"Loading the team",children:Array.from({length:e}).map((s,t)=>i.jsxs("div",{className:"bg-card shadow-soft flex items-start gap-3 rounded-lg border p-4",children:[i.jsx(E,{className:"size-9 shrink-0 rounded-full"}),i.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[i.jsx(E,{className:"h-4 w-24"}),i.jsx(E,{className:"h-3 w-16"}),i.jsx(E,{className:"h-3 w-32"})]})]},t))})}const vo=[{value:"all",label:"All"},{value:"people",label:"People"},{value:"agents",label:"Agents"}];function So({filters:e,onFiltersChange:s,people:t,className:n}){const o=e.owner?t.find(r=>r.id===e.owner):void 0;return i.jsxs("div",{className:z("space-y-3",n),children:[i.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 overflow-x-auto pb-0.5",children:[i.jsx("div",{role:"group","aria-label":"Filter by kind",className:"flex items-center gap-1.5",children:vo.map(r=>i.jsx(I,{type:"button",size:"xs",variant:e.kind===r.value?"default":"outline","aria-pressed":e.kind===r.value,onClick:()=>s({kind:r.value}),className:"shrink-0",children:r.label},r.value))}),t.length>1&&i.jsx("div",{role:"group","aria-label":"Filter by person",className:"flex items-center gap-1.5",children:t.map(r=>i.jsx(I,{type:"button",size:"xs",variant:e.owner===r.id?"default":"outline","aria-pressed":e.owner===r.id,"aria-label":`Show only ${r.displayName} and their agents`,onClick:()=>s({owner:e.owner===r.id?void 0:r.id}),className:"max-w-40 shrink-0 truncate",children:K(r)},r.id))})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[i.jsx(I,{type:"button",size:"xs",variant:e.group==="manager"?"default":"outline","aria-pressed":e.group==="manager",onClick:()=>s({group:e.group==="manager"?"none":"manager"}),className:"shrink-0",children:"Group by owner"}),i.jsxs("div",{className:"relative flex-1 sm:w-56 sm:flex-none",children:[i.jsx(sn,{"aria-hidden":!0,className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),i.jsx(on,{type:"search","aria-label":"Search the team",placeholder:"Search",value:e.q??"",onChange:r=>s({q:r.target.value===""?void 0:r.target.value}),className:"h-8 pl-8 text-xs"})]})]})]}),o&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("p",{className:"text-muted-foreground text-xs",children:["Showing ",K(o)," and their agents"]}),i.jsxs(I,{type:"button",size:"xs",variant:"ghost",onClick:()=>s({owner:void 0}),children:[i.jsx(Ce,{"aria-hidden":!0,className:"size-3"}),"Clear"]})]})]})}const Co={agents:"Couldn’t read all your agents. Showing the rest.",authors:"Couldn’t read everyone on this install. Showing the rest.",account:"Couldn’t read your account, so your own name may be missing.",claims:"Couldn’t tell which of your agents are working right now.",rooms:"Couldn’t read your rooms, so where agents work may be missing.",sessions:"Couldn’t read recent chats, so “last active” may be missing."};function wo(e){return Co[e]??"Some of your team couldn’t be loaded."}function Ro({warnings:e,className:s}){const[t,n]=y.useState(!1);return!e||e.length===0||t?null:i.jsxs("div",{role:"status","data-slot":"team-roster-warnings",className:z("border-status-warning/40 bg-status-warning/10 flex items-start gap-2 rounded-lg border px-3 py-2",s),children:[i.jsx(Xe,{"aria-hidden":!0,className:"text-status-warning mt-0.5 size-4 shrink-0"}),i.jsx("ul",{className:"min-w-0 flex-1 space-y-0.5 text-xs",children:e.map(o=>i.jsx("li",{children:wo(o.source)},o.source))}),i.jsx(I,{type:"button",size:"xs",variant:"ghost","aria-label":"Dismiss",onClick:()=>n(!0),className:"-my-0.5 shrink-0",children:i.jsx(Ce,{"aria-hidden":!0,className:"size-3"})})]})}function yo({filters:e,onFiltersChange:s}){const[t,n]=y.useState(rn),o=e??t,r=j=>{e!==void 0?s(j):n(_=>({..._,...j}))},{open:a}=Se(),l=Mn(),{data:u,isLoading:d,isError:f,refetch:h}=Qe(),g=ot(d),c=y.useMemo(()=>(u==null?void 0:u.members)??[],[u]),p=y.useMemo(()=>Ke(c,o),[c,o]),m=y.useMemo(()=>c.filter(j=>j.kind==="human"),[c]),x=c.some(j=>j.kind==="agent"),v=y.useMemo(()=>$n(c),[c]),w=y.useMemo(()=>{const j=new Set(c.filter(_=>{const V=an(_,c);return V==="managed"||V==="system"}).flatMap(_=>{var V;return(V=_.agent)!=null&&V.manifestId?[_.agent.manifestId]:[]}));return _=>j.has(_.agentId)},[c]),R=o.kind!=="all"||o.owner!==void 0||(o.q??"")!=="";return f?i.jsx(rt,{className:"h-full",title:"Couldn’t load your team",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void h()}):i.jsxs(Fn,{width:"full",className:"flex flex-col gap-4",children:[i.jsx(Ro,{warnings:u==null?void 0:u.warnings}),i.jsx(So,{filters:o,onFiltersChange:r,people:m}),g?i.jsx(xo,{}):p.length>0?i.jsx(po,{members:p,roster:c,grouped:o.group==="manager",onSelectOwner:j=>r({owner:j}),onOpenProfile:a,onSetLinkedToMe:(j,_)=>l.mutate({memberId:j,linked:_}),identityLinkState:{...l.isPending&&l.variables?{pendingId:l.variables.memberId}:{},...l.isError&&l.variables?{errorId:l.variables.memberId,errorMessage:Pn(l.error,l.variables.linked)}:{}}}):i.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:R?"Nobody here matches that.":"Nobody to show yet."}),!g&&c.length>0&&!x&&i.jsx("div",{className:"flex justify-center py-6",children:i.jsx(St,{})}),!g&&x&&i.jsxs("section",{"aria-labelledby":"team-commitments",className:"flex flex-col gap-2 pt-2",children:[i.jsx("h2",{id:"team-commitments",className:"text-sm font-medium",children:"Commitments"}),i.jsx(In,{nameOf:v,canChange:w})]})]})}const jo=y.lazy(()=>hn(()=>import("./TopologyGraph-LpxkBhGK.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])).then(e=>({default:e.TopologyGraph}))),_o=.15,q={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:_o}};function No(){return i.jsxs(i.Fragment,{children:[i.jsx(ln,{children:"Team"}),i.jsx(Fo,{})]})}function Fo(){const e=un({from:"/_shell/team"}),s=We(),t=Ue(),n=dn(),[,o]=cn(),r=gn(),{data:a,isLoading:l,isError:u,refetch:d}=it(),f=ot(l),h=fn(e.view),g=e.agent,c=y.useMemo(()=>({kind:e.kind,owner:e.owner,group:e.group,q:e.q}),[e.kind,e.owner,e.group,e.q]);function p(w){s({...Y.team(),search:R=>({...R,...w})})}function m(){s({...Y.team(),search:w=>({...w,agent:void 0})})}const x=y.useMemo(()=>(a==null?void 0:a.namespaces.flatMap(w=>w.agents))??[],[a]),v=x.length===0&&!f&&!u&&(h==="table"||h==="topology");return u&&h!=="cards"?i.jsx(rt,{className:"h-full",title:"Couldn’t load agents",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void d()}):v?i.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:i.jsx(St,{})}):i.jsx("div",{className:"flex h-full flex-col",children:i.jsxs(ge,{mode:"wait",initial:!1,children:[h==="cards"&&i.jsx($.div,{...q,className:"flex h-full flex-col",children:i.jsx(yo,{filters:c,onFiltersChange:p})},"view-cards"),h==="table"&&i.jsx($.div,{...q,className:"flex h-full flex-col",children:i.jsx(Zs,{agents:x,isLoading:f,rosterFilters:c})},"view-table"),h==="topology"&&i.jsx($.div,{...q,className:"relative flex-1 overflow-hidden",children:i.jsxs("div",{className:"flex h-full",children:[i.jsx($.div,{layout:!0,className:"min-w-0 flex-1",transition:{type:"spring",stiffness:300,damping:30},children:i.jsx("div",{className:"absolute inset-0",children:i.jsx(y.Suspense,{fallback:i.jsxs("div",{className:"text-muted-foreground flex h-full items-center justify-center text-sm",children:[i.jsx(J,{className:"mr-2"}),"Loading topology…"]}),children:i.jsx(jo,{onSelectAgent:w=>void s({...Y.team(),search:R=>({...R,agent:w})}),onViewProfile:(w,R)=>{Je.getState().openProfileDocked(R)},onOpenChat:w=>{var j;const R=(j=x.find(_=>_.projectPath===w))==null?void 0:j.effectiveRuntimeId;R?r(w,{runtime:R}):o(w)},onOpenAdapterCatalog:()=>n(),onGoToDiscovery:()=>void s({...Y.team(),search:w=>({...w,view:"table"})})})})})}),t?i.jsx(mn,{open:!!g,onOpenChange:w=>!w&&m(),children:i.jsx(pn,{children:g&&i.jsx(qe,{agentId:g,onClose:m})})}):i.jsx(ge,{children:g&&i.jsx($.div,{initial:{width:0,opacity:0},animate:{width:256,opacity:1},exit:{width:0,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"bg-background overflow-y-auto border-l",children:i.jsx(qe,{agentId:g,onClose:m})})})]})},"view-topology"),h==="denied"&&i.jsx($.div,{...q,children:i.jsx(to,{})},"view-denied"),h==="access"&&i.jsx($.div,{...q,children:i.jsx(ao,{})},"view-access")]})})}function Mo(){return i.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-y-auto",children:[i.jsx(An,{}),i.jsx("div",{className:"min-h-0 flex-1",children:i.jsx(No,{})})]})}const Oo=Object.freeze(Object.defineProperty({__proto__:null,component:Mo},Symbol.toStringTag,{value:"Module"}));export{wt as H,Oo as _};
28
+ */function Te(e,s){return e?ws(e)?y.createElement(e,s):e:null}function ws(e){return Rs(e)||typeof e=="function"||ys(e)}function Rs(e){return typeof e=="function"&&(()=>{const s=Object.getPrototypeOf(e);return s.prototype&&s.prototype.isReactComponent})()}function ys(e){return typeof e=="object"&&typeof e.$$typeof=="symbol"&&["react.memo","react.forward_ref"].includes(e.$$typeof.description)}function js(e){const s={state:{},onStateChange:()=>{},renderFallbackValue:null,...e},[t]=y.useState(()=>({current:Ss(s)})),[n,o]=y.useState(()=>t.current.initialState);return t.current.setOptions(r=>({...r,...e,state:{...n,...e.state},onStateChange:a=>{o(a),e.onStateChange==null||e.onStateChange(a)}})),t.current}function _s(e){if("id"in e&&e.id)return e.id;if("accessorKey"in e&&typeof e.accessorKey=="string")return e.accessorKey}function Ns({columns:e,data:s,emptyMessage:t="No results.",tableOptions:n,groupBy:o,className:r,tableClassName:a}){var p;const l=Ue(),u=y.useMemo(()=>{var x;if(!l)return{};const m={};for(const v of e){const w=_s(v);w&&((x=v.meta)!=null&&x.hideOnMobile)&&(m[w]=!1)}return m},[e,l]),d=y.useMemo(()=>{var m;return{...u,...((m=n==null?void 0:n.state)==null?void 0:m.columnVisibility)??{}}},[u,(p=n==null?void 0:n.state)==null?void 0:p.columnVisibility]),f=js({data:s,columns:e,getCoreRowModel:Cs(),...n,state:{...n==null?void 0:n.state,columnVisibility:d}}),h=f.getRowModel().rows,g=f.getVisibleLeafColumns().length,c=y.useMemo(()=>{if(!o)return new Map;const m=new Map;for(const x of h){const v=o.key(x.original);m.set(v,(m.get(v)??0)+1)}return m},[o,h]);return i.jsx("div",{"data-slot":"data-table",className:z("rounded-md border",r),children:i.jsxs(yn,{className:a,children:[i.jsx(jn,{children:f.getHeaderGroups().map(m=>i.jsx(X,{children:m.headers.map(x=>{var v;return i.jsx(Ee,{className:(v=x.column.columnDef.meta)==null?void 0:v.headClassName,children:x.isPlaceholder?null:Te(x.column.columnDef.header,x.getContext())},x.id)})},m.id))}),i.jsx(_n,{children:h.length?h.map((m,x)=>{const v=o==null?void 0:o.key(m.original),w=x>0?o==null?void 0:o.key(h[x-1].original):void 0,R=v!==void 0&&v!==w;return i.jsxs(y.Fragment,{children:[R&&i.jsx(X,{"data-slot":"data-table-group-header",className:"bg-muted/40 hover:bg-muted/40",children:i.jsx(Ee,{colSpan:g,className:"h-8",children:o==null?void 0:o.header(v,c.get(v)??0)})}),i.jsx(X,{"data-state":m.getIsSelected()?"selected":void 0,children:m.getVisibleCells().map(j=>{var _;return i.jsx(ke,{className:(_=j.column.columnDef.meta)==null?void 0:_.cellClassName,children:Te(j.column.columnDef.cell,j.getContext())},j.id)})})]},m.id)}):i.jsx(X,{children:i.jsx(ke,{colSpan:g,className:"h-24 text-center",children:t})})})]})})}function Fs({onClearFilters:e,filterDescription:s}){return i.jsxs($.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[i.jsx(xn,{className:"text-muted-foreground/50 size-10"}),i.jsx("p",{className:"text-muted-foreground text-sm",children:s?`No agents match ${s}`:"No agents match your filters"}),i.jsx(I,{variant:"outline",size:"sm",onClick:e,children:"Clear filters"})]})}function Ms({peopleOnly:e}){return i.jsxs($.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},className:"flex flex-col items-center justify-center gap-2 py-12 text-center","data-slot":"agent-roster-filter-empty",children:[i.jsx(jt,{className:"text-muted-foreground/50 size-10"}),i.jsx("p",{className:"text-muted-foreground max-w-xs text-sm",children:e?"This table lists agents. Switch to Cards to see people.":"No agents match this filter. Change it in Cards."})]})}const be=["needs-you","working","quiet"],Ps=1440*60*1e3;function $s(e,s=Date.now()){const t=Date.parse(e);return Number.isNaN(t)?!0:s-t>=Ps}const Is=30,As=25,Vs=20,Es=20,ks=10,Ds=0;function ve(e){const{healthStatus:s,taskCount:t,chatState:n}=e;return s==="unreachable"?{group:"needs-you",severity:Is}:n==="needs-attention"?{group:"needs-you",severity:As}:s==="stale"&&t>0&&e.isPastOnboardingGrace?{group:"needs-you",severity:Vs}:n==="active"?{group:"working",severity:Es}:s==="active"?{group:"working",severity:ks}:{group:"quiet",severity:Ds}}function Le(e){if(!e)return Number.NEGATIVE_INFINITY;const s=Date.parse(e);return Number.isNaN(s)?Number.NEGATIVE_INFINITY:s}function zs(e,s){const t=ve(e),n=ve(s),o=be.indexOf(t.group)-be.indexOf(n.group);if(o!==0)return o;const r=n.severity-t.severity;if(r!==0)return r;const a=Le(s.lastSeenAt)-Le(e.lastSeenAt);return a!==0?a:G(e).localeCompare(G(s))}function Ts(e,s="asc"){const t=s==="desc"?-1:1;return[...e].sort((n,o)=>t*zs(n,o))}const bs={"needs-you":{label:"Needs you",toneClass:"text-destructive"},working:{label:"Working",toneClass:"text-foreground"},quiet:{label:"Quiet",toneClass:"text-muted-foreground"}};function Ls(e,s,t){if(!t)return e;if(t.kind==="people")return[];if(!(t.owner!==void 0||(t.q??"").trim()!==""))return e;const o=s.filter(a=>a.kind==="agent");if(o.length===0)return e;const r=new Set(Ke(o,t).map(a=>a.id));return e.filter(a=>r.has(a.id))}const He=32,Hs=5,vt="Checked in",Gs={heartbeat:"Checked in",message_sent:"Got a message",response_complete:"Finished a reply"};function Os(e,s){return s===null&&e==="stale"}function Ge(e){return e.length<2||e.length>Hs?!1:e===e.toUpperCase()&&new RegExp("\\p{Lu}","u").test(e)}function Bs(e){const s=Gs[e.trim().toLowerCase()];if(s)return s;const t=e.replace(/[^\p{L}\p{N}]+/gu," ").trim().split(" ").filter(Boolean).map(a=>Ge(a)?a:a.toLowerCase());if(t.length===0)return vt;const n=t[0];t[0]=Ge(n)?n:n.replace(/^./u,a=>a.toUpperCase());const o=t.join(" "),r=Array.from(o);return r.length<=He?o:`${r.slice(0,He-1).join("").trimEnd()}…`}function Oe(e){const s=e.filter(t=>!!t);return s.length>0?s.join(" · "):null}function qs(e){const{healthStatus:s,lastSeenAt:t,lastSeenEvent:n,chatState:o}=e,r=t?ce(t):null,a=n?Bs(n):null;return s==="unreachable"?{primary:"Can’t be reached",secondary:Oe([a,r??"never seen"]),toneClass:"text-destructive"}:o==="needs-attention"?{primary:"A chat needs you",secondary:Oe([a,r]),toneClass:"text-destructive"}:Os(s,t)?o==="active"?{primary:"Active in a chat",secondary:null,toneClass:"text-foreground"}:{primary:"Not used yet",secondary:null,toneClass:"text-muted-foreground"}:{primary:a??vt,secondary:r,toneClass:s==="active"?"text-foreground":"text-muted-foreground"}}function Us(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s.length<=2?e:s.slice(-2).join("/")}function Ks({row:e,onOpen:s}){const{color:t,emoji:n}=Ft(e),o=Us(e.projectPath),r=Ye(e.runtime).label;return i.jsxs("button",{type:"button",className:"flex w-full min-w-0 items-center gap-2 text-left",onClick:s,children:[i.jsx(Mt,{color:t,emoji:n,size:"xs"}),i.jsxs("span",{className:"min-w-0 flex-1",children:[i.jsx("span",{className:"block truncate text-sm font-medium hover:underline",children:G(e)}),i.jsxs("span",{className:"text-muted-foreground block truncate text-xs",children:[o??r,o&&i.jsxs("span",{className:"hidden md:inline",children:[" · ",r]})]})]}),e.isDefault&&i.jsxs(A,{size:"xs",variant:"outline",className:"shrink-0 max-md:border-0 max-md:px-0 max-md:py-0",children:[i.jsx(Pt,{className:"size-2.5 fill-current md:mr-0.5"}),i.jsx("span",{className:"sr-only md:not-sr-only",children:"Default"})]})]})}function Ys({row:e}){const{primary:s,secondary:t,toneClass:n}=qs(e);return i.jsxs("span",{className:"block min-w-0",children:[i.jsx("span",{className:z("block truncate text-sm",n),children:s}),t&&i.jsx("span",{className:"text-muted-foreground block truncate text-xs tabular-nums",children:t})]})}function Xs(e){return[{accessorKey:"name",header:"Agent",meta:{headClassName:"w-[42%] md:w-[38%]",cellClassName:"overflow-hidden"},cell:({row:s})=>i.jsx(Ks,{row:s.original,onOpen:()=>e.onNavigate(s.original.projectPath??"")})},{accessorKey:"lastSeenEvent",header:"Activity",meta:{headClassName:"truncate",cellClassName:"truncate"},cell:({row:s})=>i.jsx(Ys,{row:s.original})},{id:"managedBy",header:"Managed by",meta:{hideOnMobile:!0,headClassName:"w-[140px]",cellClassName:"overflow-hidden"},cell:({row:s})=>{const t=s.original.managedBy;return i.jsx("span",{"data-slot":"agent-managed-by",className:"text-muted-foreground block truncate text-xs",children:t??"—"})}},{accessorKey:"taskCount",header:"Scheduled",meta:{hideOnMobile:!0,headClassName:"w-[110px]"},cell:({row:s})=>{const t=s.original.taskCount;return t===0?i.jsx("span",{className:"text-muted-foreground text-xs",children:"—"}):i.jsxs(A,{variant:"outline",className:"whitespace-nowrap",children:[t," ",t===1?"schedule":"schedules"]})}},{id:"actions",header:"",meta:{headClassName:"w-[88px]"},cell:({row:s})=>{const t=s.original;return i.jsxs("div",{className:"flex items-center justify-end gap-1",children:[i.jsx(I,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:n=>{n.stopPropagation(),e.onNavigate(t.projectPath??"")},"aria-label":`Open chat with ${G(t)}`,children:i.jsx(_t,{className:"size-4"})}),i.jsx(I,{variant:"ghost",size:"sm",className:"size-8 p-0",onClick:n=>{n.stopPropagation(),e.onViewProfile(t.projectPath??"")},"aria-label":`Open ${G(t)}’s profile`,children:i.jsx(Nt,{className:"size-4"})})]})}}]}function Ws({group:e,count:s}){const{label:t,toneClass:n}=bs[e];return i.jsxs("span",{className:"flex items-center gap-1.5 text-xs font-semibold tracking-wide uppercase",children:[e==="needs-you"&&i.jsx(Xe,{className:z("size-3.5",n)}),i.jsx("span",{className:n,children:t}),i.jsx("span",{className:"text-muted-foreground font-normal tabular-nums",children:s})]})}function Qs({rows:e,grouped:s,callbacks:t}){const n=y.useMemo(()=>Xs(t),[t]),o=y.useMemo(()=>s?{key:r=>ve(r).group,header:(r,a)=>i.jsx(Ws,{group:r,count:a})}:void 0,[s]);return i.jsx(Ns,{columns:n,data:e,groupBy:o,emptyMessage:"No agents registered.",className:"border-0",tableClassName:"table-fixed"})}function Zs({agents:e,isLoading:s,rosterFilters:t}){var O;const n=We(),o=$t(),{open:r}=Se(),a=It(),l=vn(te,{debounce:{search:200}}),{data:u}=Qe(),d=y.useMemo(()=>(u==null?void 0:u.members)??[],[u]),f=y.useMemo(()=>Ls(e,d,t),[e,d,t]),h=y.useMemo(()=>[...new Set(f.map(N=>N.namespace).filter(N=>!!N))],[f]),g=!l.sortField||l.sortField===_e,c=y.useMemo(()=>g?te.applyFilters(f,l.values):At(f,te,l.values,bt,{field:l.sortField,direction:l.sortDirection}),[f,g,l.values,l.sortField,l.sortDirection]),p=y.useMemo(()=>e.map(N=>N.projectPath).filter(N=>!!N),[e]),m=Cn(p),{data:x}=Vt({queryKey:Et.current(),queryFn:()=>o.getConfig(),staleTime:3e4}),v=y.useMemo(()=>{const N=new Map;for(const F of d){if(F.kind!=="agent")continue;const L=Ze(F,d);L&&N.set(F.id,K(L))}return N},[d]),w=y.useMemo(()=>{const N=c.map(F=>{var L;return{...F,chatState:(F.projectPath?m[F.projectPath]:void 0)??"fresh",isPastOnboardingGrace:$s(F.registeredAt),isDefault:((L=x==null?void 0:x.agents)==null?void 0:L.defaultAgent)===F.name,managedBy:v.get(F.id)??null}});return g?Ts(N,l.sortDirection):N},[c,m,(O=x==null?void 0:x.agents)==null?void 0:O.defaultAgent,v,g,l.sortDirection]),R=y.useCallback(N=>{const F=a.get(N);if(F===void 0){Je.getState().openProfileDocked(N);return}r(F)},[a,r]),j=y.useCallback(N=>{kt(o,N).then(F=>n(F)).catch(F=>{Dt(o,F),zt(N)})},[n,o]),_=y.useMemo(()=>({onNavigate:j,onViewProfile:R}),[j,R]);function V(){return f.length===0&&e.length>0?i.jsx(Ms,{peopleOnly:(t==null?void 0:t.kind)==="people"}):c.length===0&&f.length>0?i.jsx(Fs,{onClearFilters:l.clearAll,filterDescription:l.describeActive()}):i.jsx(Qs,{rows:w,grouped:g,callbacks:_})}return s?i.jsx("div",{className:"space-y-3 p-4 sm:px-6",children:Array.from({length:3}).map((N,F)=>i.jsx(E,{className:"h-14 w-full rounded-xl"},F))}):i.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[i.jsxs(H,{state:l,className:"sm:px-6",children:[i.jsx(H.Search,{placeholder:"Filter agents…"}),i.jsx(H.Primary,{name:"status"}),i.jsx(H.AddFilter,{dynamicOptions:{namespace:h}}),i.jsx(H.Sort,{options:Tt,defaultField:_e}),i.jsx(H.ResultCount,{count:c.length,total:f.length,noun:"agent"}),i.jsx(H.ActiveFilters,{})]}),i.jsx(Sn,{className:"min-h-0 flex-1",children:i.jsx("div",{className:"px-4 pb-4 sm:px-6",children:V()})})]})}const Js={animate:{transition:{staggerChildren:.1}}},eo={initial:{opacity:0},animate:{opacity:.2,transition:{duration:.3}}};function de(){return i.jsxs($.div,{variants:eo,className:"rounded-xl border border-dashed px-4 py-3",children:[i.jsxs("div",{className:"mb-2 flex items-center gap-2",children:[i.jsx(E,{className:"size-3 rounded-full"}),i.jsx(E,{className:"h-3 w-32"}),i.jsx(E,{className:"h-3 w-16"}),i.jsx(E,{className:"ml-auto h-3 w-10"})]}),i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx(E,{className:"h-2.5 w-48"}),i.jsx(E,{className:"h-2.5 w-20"})]})]})}function St(){const e=Lt(n=>n.open),s=Ht(n=>n.open),t=Nn();return i.jsxs("div",{className:"relative w-full max-w-2xl px-4",children:[i.jsxs($.div,{variants:Js,initial:"initial",animate:"animate",className:"space-y-3",children:[i.jsx(de,{}),i.jsx(de,{}),i.jsx(de,{})]}),i.jsx("div",{className:"absolute inset-0 flex flex-col items-center justify-center gap-4",children:t?i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-lg font-semibold",children:"No agents yet"}),i.jsxs(I,{size:"sm",className:"gap-1.5",onClick:()=>s(),children:[i.jsx(et,{className:"size-3.5"}),"Create agent"]})]}):i.jsxs(i.Fragment,{children:[i.jsx("p",{className:"text-lg font-semibold",children:"Bring in existing projects"}),i.jsxs(I,{size:"sm",className:"gap-1.5",onClick:e,children:[i.jsx(Vn,{className:"size-3.5"}),"Search for projects"]})]})})]})}function to(){const{data:e,isLoading:s}=Gt(),t=(e==null?void 0:e.denied)??[];return s?i.jsx("div",{className:"flex items-center justify-center p-8",children:i.jsx(J,{size:"md",className:"text-muted-foreground",label:"Loading blocked paths"})}):t.length===0?i.jsx(at,{icon:Ot,headline:"No blocked paths",description:"Folders you block from scans show up here."}):i.jsx("div",{className:"space-y-2 p-4",children:t.map(n=>i.jsxs("div",{className:"flex items-center justify-between gap-3 rounded-xl border px-4 py-3",children:[i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsx("p",{className:"truncate font-mono text-sm",title:n.path,children:n.path}),n.reason&&i.jsx("p",{className:"text-muted-foreground truncate text-xs",title:n.reason,children:n.reason})]}),i.jsx(A,{variant:"outline",className:"shrink-0",children:n.deniedBy})]},n.path))})}function no({namespace:e,agentCount:s,agents:t}){const[n,o]=y.useState(!1);return i.jsxs("div",{className:"rounded-xl border",children:[i.jsxs("button",{type:"button",onClick:()=>o(!n),className:"hover:bg-muted/50 flex w-full items-center gap-2 px-4 py-3 text-left transition-colors duration-150",children:[n?i.jsx(qt,{className:"size-4"}):i.jsx(Ut,{className:"size-4"}),i.jsx("span",{className:"text-sm font-medium",children:e}),i.jsxs(A,{variant:"secondary",className:"ml-auto",children:[s," agent",s!==1?"s":""]})]}),n&&i.jsx("div",{className:"space-y-2 border-t px-4 py-2",children:t.map(r=>i.jsx("div",{className:"flex items-center justify-between py-1",children:i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm",children:G(r)}),i.jsx(A,{variant:"outline",children:tt(r.runtime)})]})},r.id))})]})}function so({sourceNamespace:e,targetNamespace:s,action:t,origin:n,onRemove:o}){const r=n==="default";return i.jsxs("div",{className:"flex items-center justify-between rounded-lg border px-3 py-2",children:[i.jsxs("div",{className:"flex items-center gap-2 text-sm",children:[i.jsx("span",{className:"font-mono",children:e}),i.jsx("span",{className:"text-muted-foreground",children:"→"}),i.jsx("span",{className:"font-mono",children:s}),i.jsx(A,{variant:t==="allow"?"default":"destructive",children:t}),r&&i.jsx(A,{tone:"neutral",variant:"outline",children:"built-in"})]}),r?i.jsx("span",{className:"text-muted-foreground flex size-8 items-center justify-center",title:"Built-in rule, always enforced. Not removable",children:i.jsx(Kt,{className:"size-4","aria-hidden":"true"})}):i.jsx(I,{type:"button",variant:"ghost",size:"icon-sm",onClick:o,className:"text-muted-foreground hover:bg-destructive/10 hover:text-destructive","aria-label":`Remove access from ${e} to ${s}`,children:i.jsx(Yt,{})})]})}const Ct="acl-open-mesh-explanation";function oo({namespaces:e,onAdd:s,isPending:t,inert:n}){const[o,r]=y.useState(""),[a,l]=y.useState("");function u(f){f.preventDefault(),!n&&o&&a&&o!==a&&(s(o,a),r(""),l(""))}const d=n?{"aria-disabled":!0,"aria-describedby":Ct}:{};return i.jsxs("form",{onSubmit:u,className:"flex items-end gap-2",children:[i.jsxs("div",{className:"flex-1 space-y-1",children:[i.jsx(Fe,{htmlFor:"acl-source",className:"text-muted-foreground text-xs font-medium",children:"Source"}),i.jsxs(Me,{value:o,onValueChange:n?()=>{}:r,children:[i.jsx(Pe,{id:"acl-source",className:"w-full aria-disabled:pointer-events-none aria-disabled:opacity-50",...d,children:i.jsx($e,{placeholder:"Pick a project"})}),i.jsx(Ie,{children:e.map(f=>i.jsx(Ae,{value:f,children:f},f))})]})]}),i.jsxs("div",{className:"flex-1 space-y-1",children:[i.jsx(Fe,{htmlFor:"acl-target",className:"text-muted-foreground text-xs font-medium",children:"Target"}),i.jsxs(Me,{value:a,onValueChange:n?()=>{}:l,children:[i.jsx(Pe,{id:"acl-target",className:"w-full aria-disabled:pointer-events-none aria-disabled:opacity-50",...d,children:i.jsx($e,{placeholder:"Pick a project"})}),i.jsx(Ie,{children:e.map(f=>i.jsx(Ae,{value:f,children:f},f))})]})]}),i.jsxs(I,{type:"submit",className:"aria-disabled:pointer-events-none aria-disabled:opacity-50",disabled:!n&&(t||!o||!a||o===a),...d,children:[t?i.jsx(J,{}):i.jsx(et,{}),"Allow access"]})]})}function ro({onGoToDiscovery:e}={}){const{data:s,isLoading:t}=it(),{mutate:n,isPending:o}=wn();if(t)return i.jsx("div",{className:"flex items-center justify-center p-8",children:i.jsx(J,{size:"md",className:"text-muted-foreground"})});const r=(s==null?void 0:s.namespaces)??[],a=(s==null?void 0:s.openMesh)??!1,l=((s==null?void 0:s.accessRules)??[]).filter(d=>!(d.origin==="explicit"&&d.sourceNamespace===Ne&&d.targetNamespace===Ne)),u=r.map(d=>d.namespace);return r.length===0?i.jsxs("div",{className:"space-y-6 p-4",children:[i.jsx(Ve,{}),i.jsx(at,{icon:Bt,headline:"You need agents in more than one project",description:"Add agents from a second folder to let two projects talk.",action:e?{label:"Go to Discovery",onClick:e}:void 0})]}):i.jsxs("div",{className:"space-y-6 p-4",children:[i.jsx(Ve,{}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Projects"}),r.map(d=>i.jsx(no,{namespace:d.namespace,agentCount:d.agentCount,agents:d.agents},d.namespace))]}),i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Cross-project access rules"}),l.length===0?i.jsx("p",{className:"text-muted-foreground text-xs",children:"No rules yet. Agents only talk within their own project."}):i.jsx("div",{className:"space-y-1",children:l.map(d=>i.jsx(so,{sourceNamespace:d.sourceNamespace,targetNamespace:d.targetNamespace,action:d.action,origin:d.origin,onRemove:()=>n({sourceNamespace:d.sourceNamespace,targetNamespace:d.targetNamespace,action:"deny"})},`${d.sourceNamespace}-${d.targetNamespace}-${d.action}-${d.origin}`))})]}),u.length>=2&&i.jsxs("div",{className:"space-y-2",children:[i.jsx("h3",{className:"text-muted-foreground text-sm font-medium",children:"Allow cross-project access"}),a&&i.jsx("p",{id:Ct,className:"text-muted-foreground text-xs",children:"Already allowed by the switch above. Turn it off to pick pairs."}),i.jsx(oo,{namespaces:u,isPending:o,inert:a,onAdd:(d,f)=>n({sourceNamespace:d,targetNamespace:f,action:"allow"})})]})]})}const wt={active:{label:"Active",dot:ne.working},inactive:{label:"Inactive",dot:ne["needs-you"]},stale:{label:"Stale",dot:"bg-muted-foreground/50"},unreachable:{label:"Unreachable",dot:ne.error}};function io(e){return e in wt}function Be({onClick:e}){return i.jsx("button",{type:"button",onClick:e,"aria-label":"Close detail panel",className:"text-muted-foreground hover:text-foreground",children:i.jsx(Ce,{className:"size-(--size-icon-sm)"})})}function qe({agentId:e,onClose:s}){const{data:t,isLoading:n}=Rn(e),{open:o}=Se();if(n)return i.jsx("div",{className:"flex w-64 items-center justify-center border-l p-4",children:i.jsx("span",{className:"text-muted-foreground text-sm",children:"Loading…"})});if(!t)return i.jsxs("div",{className:"w-64 border-l p-4",children:[i.jsx("div",{className:"flex justify-end",children:i.jsx(Be,{onClick:s})}),i.jsx("p",{className:"text-muted-foreground mt-2 text-sm",children:"Agent not found"})]});const r=io(t.status)?t.status:"stale",a=wt[r];return i.jsxs("div",{className:"w-64 overflow-y-auto border-l p-4",children:[i.jsxs("div",{className:"mb-3 flex items-center justify-between",children:[i.jsx("h3",{className:"truncate text-sm font-semibold",children:t.name}),i.jsx(Be,{onClick:s})]}),i.jsxs("div",{className:"space-y-3 text-xs",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:z("h-2.5 w-2.5 rounded-full",a.dot),"aria-hidden":"true"}),i.jsx("span",{children:a.label})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Last seen: "}),i.jsx("span",{children:t.lastSeenAt?ce(t.lastSeenAt):"Never"})]}),t.lastSeenEvent&&i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Last event: "}),i.jsx("span",{children:t.lastSeenEvent})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Runs on: "}),i.jsx(A,{size:"xs",variant:"secondary",children:tt(t.runtime)})]}),i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground",children:"Registered: "}),i.jsx("span",{children:t.registeredAt?ce(t.registeredAt):"Unknown"})]}),Array.isArray(t.capabilities)&&t.capabilities.length>0&&i.jsxs("div",{children:[i.jsx("span",{className:"text-muted-foreground mb-1 block",children:"Capabilities:"}),i.jsx("div",{className:"flex flex-wrap gap-1",children:t.capabilities.map(l=>i.jsx(A,{size:"xs",variant:"outline",children:l},l))})]})]}),i.jsx("div",{className:"mt-4 space-y-2 border-t pt-3",children:i.jsxs("button",{type:"button",onClick:()=>o(e),className:"hover:bg-muted inline-flex w-full items-center justify-center gap-2 rounded-md border px-3 py-1.5 text-xs font-medium transition-colors duration-150",children:[i.jsx(Xt,{className:"size-3.5"}),"View profile"]})})]})}function ao(){return i.jsx(ro,{})}function lo(e){var s;if(e.agent){const t=Ye(e.agent.runtime).label;return e.agent.model?`${t} · ${e.agent.model}`:t}return(s=e.person)!=null&&s.role?e.person.role:e.origin==="local"?"On this machine":`On ${Zt(e.origin.platform)}`}const uo={layout:"position",initial:{opacity:0,scale:.97},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.97,transition:{duration:.15}},transition:{layout:{type:"spring",stiffness:280,damping:32},duration:.2,ease:[0,0,.2,1]}};function co({member:e,owner:s,onSelectOwner:t,onOpenProfile:n,onSetLinkedToMe:o,linkPending:r=!1,linkError:a,ownedAgentCount:l,layoutAnimated:u=!1,ref:d,className:f}){var p,m,x;const h=nt(e),g=Wt(e),c=(p=e.person)==null?void 0:p.linkedToYou;return i.jsxs($.article,{ref:d,...u?uo:{},"data-slot":"team-member-card","data-member-id":e.id,"data-layout-animated":String(u),style:{"--identity-color":h.color},className:z("bg-card shadow-soft relative flex items-start gap-3 rounded-lg border p-4","border-[color-mix(in_oklch,var(--identity-color)_var(--identity-border-strength),hsl(var(--border)))]","[--identity-border-strength:0%]",n&&["transition-[box-shadow,border-color,translate,scale] duration-(--identity-settle) ease-(--identity-ease-standard)","hover:shadow-elevated hover:-translate-y-px","hover:[--identity-border-strength:var(--identity-border-mix)]","has-[[data-slot=team-member-open]:focus-visible]:shadow-elevated has-[[data-slot=team-member-open]:focus-visible]:-translate-y-px","has-[[data-slot=team-member-open]:focus-visible]:[--identity-border-strength:var(--identity-border-mix)]","active:translate-y-0 active:scale-[0.99] active:duration-(--identity-press)",Qt,"has-[[data-card-aside]:hover]:shadow-soft has-[[data-card-aside]:hover]:translate-y-0 has-[[data-card-aside]:hover]:[--identity-border-strength:0%]","has-[[data-card-aside]:focus-visible]:shadow-soft has-[[data-card-aside]:focus-visible]:translate-y-0 has-[[data-card-aside]:focus-visible]:[--identity-border-strength:0%]","[&:has([data-card-aside]:hover)_[data-slot=identity-badge]]:scale-100 [&:has([data-card-aside]:hover)_[data-slot=identity-badge]]:rotate-0","[&:has([data-card-aside]:focus-visible)_[data-slot=identity-badge]]:scale-100 [&:has([data-card-aside]:focus-visible)_[data-slot=identity-badge]]:rotate-0","has-[[data-card-aside]:active]:scale-100"],f),children:[i.jsx(st,{size:"md",kind:h.kind,color:h.color,emoji:h.emoji,imageUrl:h.imageUrl,fallback:h.fallback,origin:h.origin}),i.jsxs("div",{className:"min-w-0 flex-1",children:[i.jsxs("div",{className:"flex flex-wrap items-center gap-x-1.5 gap-y-1",children:[i.jsx("h3",{className:"min-w-0 truncate text-sm font-medium",children:n?i.jsx("button",{type:"button","data-slot":"team-member-open",onClick:()=>n(e.id),"aria-label":`Open ${e.displayName}’s profile`,className:"focus-ring max-w-full truncate rounded text-left after:absolute after:inset-0 after:rounded-lg after:content-['']",children:e.displayName}):e.displayName}),e.isSelf&&i.jsx(A,{size:"xs",variant:"secondary",children:"you"}),((m=e.agent)==null?void 0:m.isDefault)&&i.jsx(A,{size:"xs",variant:"outline",children:"default"}),c&&i.jsx(A,{size:"xs",variant:"secondary",children:"also you"})]}),e.handle!==null&&i.jsxs("p",{"data-slot":"team-member-handle",className:"text-muted-foreground truncate text-xs",children:["@",e.handle]}),g&&i.jsx("p",{"data-slot":"team-member-name-source",className:"text-muted-foreground truncate text-xs",children:g}),i.jsx("p",{className:"text-muted-foreground mt-1.5 truncate text-xs",children:lo(e)}),((x=e.agent)==null?void 0:x.recentlyActive)&&i.jsx("p",{className:"text-muted-foreground mt-0.5 text-xs",children:"Active in the last hour"}),c!==void 0&&o&&i.jsx("button",{type:"button","data-slot":"team-member-link-to-me","data-card-aside":"",disabled:r,onClick:()=>o(e.id,!c),"aria-label":c?`Stop treating ${e.displayName} as you`:`Tell DorkOS that ${e.displayName} is you`,className:"text-muted-foreground hover:text-foreground focus-visible:text-foreground focus-ring relative mt-1.5 block w-fit max-w-full truncate rounded text-xs underline-offset-2 transition-[color] duration-(--identity-answer) ease-(--identity-ease-standard) hover:underline focus-visible:underline disabled:pointer-events-none disabled:opacity-60",children:c?"Not me":"This is me"}),a&&i.jsx("p",{role:"alert","data-slot":"team-member-link-error",className:"text-destructive relative mt-1 text-xs",children:a}),s&&t&&i.jsxs("div",{className:"relative mt-1.5 flex w-fit max-w-full items-baseline",children:[i.jsxs("button",{type:"button","data-slot":"team-member-owner","data-card-aside":"",onClick:()=>t(s.id),"aria-label":`Show only ${s.displayName} and their agents`,className:"text-muted-foreground hover:text-foreground focus-visible:text-foreground focus-ring peer/owner relative min-w-0 truncate rounded text-xs underline-offset-2 transition-[color] duration-(--identity-answer) ease-(--identity-ease-standard) hover:underline focus-visible:underline",children:["by ",K(s)]}),l!==void 0&&l>0&&i.jsxs("span",{"aria-hidden":!0,"data-slot":"team-member-owner-count",className:"text-muted-foreground pointer-events-none absolute top-0 left-full ml-1 hidden text-xs whitespace-nowrap opacity-0 transition-opacity duration-(--identity-answer) ease-(--identity-ease-standard) peer-hover/owner:opacity-100 peer-focus-visible/owner:opacity-100 [@media(hover:hover)]:block",children:["· ",l," ",l===1?"agent":"agents"]})]})]})]})}const go=120;function fo({memberCount:e,reducedMotion:s}){return!s&&e<=go}const Rt="grid grid-cols-1 gap-3 md:grid-cols-2 xl:grid-cols-3";function mo({owner:e,onSelectOwner:s,ref:t}){const n=nt(e),o="col-span-full mt-3 flex min-w-0 items-center first:mt-0",r=i.jsxs(i.Fragment,{children:[i.jsx(st,{size:"xs",kind:n.kind,color:n.color,emoji:n.emoji,imageUrl:n.imageUrl,fallback:n.fallback,origin:n.origin}),i.jsx("span",{className:"truncate text-sm font-medium",children:e.displayName}),i.jsx("span",{className:"text-muted-foreground truncate text-xs",children:K(e)})]});return s?i.jsx("h2",{ref:t,className:o,children:i.jsx("button",{type:"button",onClick:()=>s(e.id),className:"focus-ring flex min-w-0 items-center gap-2 rounded",children:r})}):i.jsx("h2",{ref:t,className:z(o,"gap-2"),children:r})}function po({members:e,roster:s,grouped:t,onSelectOwner:n,onOpenProfile:o,onSetLinkedToMe:r,identityLinkState:a,className:l}){const u=Jt(),d=fo({memberCount:e.length,reducedMotion:u===!0}),f=(g,c)=>{const p=c?Ze(g,s):void 0;return i.jsx(co,{member:g,owner:p,ownedAgentCount:p?nn(p.id,s):void 0,onSelectOwner:c?n:void 0,onOpenProfile:o,onSetLinkedToMe:r,linkPending:(a==null?void 0:a.pendingId)===g.id,...(a==null?void 0:a.errorId)===g.id&&a.errorMessage?{linkError:a.errorMessage}:{},layoutAnimated:d},g.id)},h=t?en(e,s).flatMap(g=>[g.owner?i.jsx(mo,{owner:g.owner,onSelectOwner:n},`cluster:${g.owner.id}`):i.jsx("h2",{className:"text-muted-foreground col-span-full mt-3 text-sm font-medium first:mt-0",children:"No owner"},"cluster:__unowned"),...g.members.map(c=>f(c,!1))]):e.map(g=>f(g,!0));return i.jsx("div",{"data-slot":t?"team-roster-groups":"team-roster-grid","data-testid":tn.teamRoster,"data-layout-animated":String(d),className:z(Rt,l),children:i.jsx(ge,{mode:"popLayout",initial:!1,children:h})})}const ho=6;function xo({count:e=ho}={}){return i.jsx("div",{className:Rt,"aria-busy":"true","aria-label":"Loading the team",children:Array.from({length:e}).map((s,t)=>i.jsxs("div",{className:"bg-card shadow-soft flex items-start gap-3 rounded-lg border p-4",children:[i.jsx(E,{className:"size-9 shrink-0 rounded-full"}),i.jsxs("div",{className:"min-w-0 flex-1 space-y-1.5",children:[i.jsx(E,{className:"h-4 w-24"}),i.jsx(E,{className:"h-3 w-16"}),i.jsx(E,{className:"h-3 w-32"})]})]},t))})}const vo=[{value:"all",label:"All"},{value:"people",label:"People"},{value:"agents",label:"Agents"}];function So({filters:e,onFiltersChange:s,people:t,className:n}){const o=e.owner?t.find(r=>r.id===e.owner):void 0;return i.jsxs("div",{className:z("space-y-3",n),children:[i.jsxs("div",{className:"flex flex-col gap-2 sm:flex-row sm:items-center",children:[i.jsxs("div",{className:"flex min-w-0 flex-1 items-center gap-1.5 overflow-x-auto pb-0.5",children:[i.jsx("div",{role:"group","aria-label":"Filter by kind",className:"flex items-center gap-1.5",children:vo.map(r=>i.jsx(I,{type:"button",size:"xs",variant:e.kind===r.value?"default":"outline","aria-pressed":e.kind===r.value,onClick:()=>s({kind:r.value}),className:"shrink-0",children:r.label},r.value))}),t.length>1&&i.jsx("div",{role:"group","aria-label":"Filter by person",className:"flex items-center gap-1.5",children:t.map(r=>i.jsx(I,{type:"button",size:"xs",variant:e.owner===r.id?"default":"outline","aria-pressed":e.owner===r.id,"aria-label":`Show only ${r.displayName} and their agents`,onClick:()=>s({owner:e.owner===r.id?void 0:r.id}),className:"max-w-40 shrink-0 truncate",children:K(r)},r.id))})]}),i.jsxs("div",{className:"flex shrink-0 items-center gap-2",children:[i.jsx(I,{type:"button",size:"xs",variant:e.group==="manager"?"default":"outline","aria-pressed":e.group==="manager",onClick:()=>s({group:e.group==="manager"?"none":"manager"}),className:"shrink-0",children:"Group by owner"}),i.jsxs("div",{className:"relative flex-1 sm:w-56 sm:flex-none",children:[i.jsx(sn,{"aria-hidden":!0,className:"text-muted-foreground pointer-events-none absolute top-1/2 left-2.5 size-3.5 -translate-y-1/2"}),i.jsx(on,{type:"search","aria-label":"Search the team",placeholder:"Search",value:e.q??"",onChange:r=>s({q:r.target.value===""?void 0:r.target.value}),className:"h-8 pl-8 text-xs"})]})]})]}),o&&i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsxs("p",{className:"text-muted-foreground text-xs",children:["Showing ",K(o)," and their agents"]}),i.jsxs(I,{type:"button",size:"xs",variant:"ghost",onClick:()=>s({owner:void 0}),children:[i.jsx(Ce,{"aria-hidden":!0,className:"size-3"}),"Clear"]})]})]})}const Co={agents:"Couldn’t read all your agents. Showing the rest.",authors:"Couldn’t read everyone on this install. Showing the rest.",account:"Couldn’t read your account, so your own name may be missing.",claims:"Couldn’t tell which of your agents are working right now.",rooms:"Couldn’t read your rooms, so where agents work may be missing.",sessions:"Couldn’t read recent chats, so “last active” may be missing."};function wo(e){return Co[e]??"Some of your team couldn’t be loaded."}function Ro({warnings:e,className:s}){const[t,n]=y.useState(!1);return!e||e.length===0||t?null:i.jsxs("div",{role:"status","data-slot":"team-roster-warnings",className:z("border-status-warning/40 bg-status-warning/10 flex items-start gap-2 rounded-lg border px-3 py-2",s),children:[i.jsx(Xe,{"aria-hidden":!0,className:"text-status-warning mt-0.5 size-4 shrink-0"}),i.jsx("ul",{className:"min-w-0 flex-1 space-y-0.5 text-xs",children:e.map(o=>i.jsx("li",{children:wo(o.source)},o.source))}),i.jsx(I,{type:"button",size:"xs",variant:"ghost","aria-label":"Dismiss",onClick:()=>n(!0),className:"-my-0.5 shrink-0",children:i.jsx(Ce,{"aria-hidden":!0,className:"size-3"})})]})}function yo({filters:e,onFiltersChange:s}){const[t,n]=y.useState(rn),o=e??t,r=j=>{e!==void 0?s(j):n(_=>({..._,...j}))},{open:a}=Se(),l=Mn(),{data:u,isLoading:d,isError:f,refetch:h}=Qe(),g=ot(d),c=y.useMemo(()=>(u==null?void 0:u.members)??[],[u]),p=y.useMemo(()=>Ke(c,o),[c,o]),m=y.useMemo(()=>c.filter(j=>j.kind==="human"),[c]),x=c.some(j=>j.kind==="agent"),v=y.useMemo(()=>$n(c),[c]),w=y.useMemo(()=>{const j=new Set(c.filter(_=>{const V=an(_,c);return V==="managed"||V==="system"}).flatMap(_=>{var V;return(V=_.agent)!=null&&V.manifestId?[_.agent.manifestId]:[]}));return _=>j.has(_.agentId)},[c]),R=o.kind!=="all"||o.owner!==void 0||(o.q??"")!=="";return f?i.jsx(rt,{className:"h-full",title:"Couldn’t load your team",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void h()}):i.jsxs(Fn,{width:"full",className:"flex flex-col gap-4",children:[i.jsx(Ro,{warnings:u==null?void 0:u.warnings}),i.jsx(So,{filters:o,onFiltersChange:r,people:m}),g?i.jsx(xo,{}):p.length>0?i.jsx(po,{members:p,roster:c,grouped:o.group==="manager",onSelectOwner:j=>r({owner:j}),onOpenProfile:a,onSetLinkedToMe:(j,_)=>l.mutate({memberId:j,linked:_}),identityLinkState:{...l.isPending&&l.variables?{pendingId:l.variables.memberId}:{},...l.isError&&l.variables?{errorId:l.variables.memberId,errorMessage:Pn(l.error,l.variables.linked)}:{}}}):i.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:R?"Nobody here matches that.":"Nobody to show yet."}),!g&&c.length>0&&!x&&i.jsx("div",{className:"flex justify-center py-6",children:i.jsx(St,{})}),!g&&x&&i.jsxs("section",{"aria-labelledby":"team-commitments",className:"flex flex-col gap-2 pt-2",children:[i.jsx("h2",{id:"team-commitments",className:"text-sm font-medium",children:"Commitments"}),i.jsx(In,{nameOf:v,canChange:w})]})]})}const jo=y.lazy(()=>hn(()=>import("./TopologyGraph-CiZ2ACcQ.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31])).then(e=>({default:e.TopologyGraph}))),_o=.15,q={initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:_o}};function No(){return i.jsxs(i.Fragment,{children:[i.jsx(ln,{children:"Team"}),i.jsx(Fo,{})]})}function Fo(){const e=un({from:"/_shell/team"}),s=We(),t=Ue(),n=dn(),[,o]=cn(),r=gn(),{data:a,isLoading:l,isError:u,refetch:d}=it(),f=ot(l),h=fn(e.view),g=e.agent,c=y.useMemo(()=>({kind:e.kind,owner:e.owner,group:e.group,q:e.q}),[e.kind,e.owner,e.group,e.q]);function p(w){s({...Y.team(),search:R=>({...R,...w})})}function m(){s({...Y.team(),search:w=>({...w,agent:void 0})})}const x=y.useMemo(()=>(a==null?void 0:a.namespaces.flatMap(w=>w.agents))??[],[a]),v=x.length===0&&!f&&!u&&(h==="table"||h==="topology");return u&&h!=="cards"?i.jsx(rt,{className:"h-full",title:"Couldn’t load agents",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void d()}):v?i.jsx("div",{className:"flex h-full flex-col items-center justify-center",children:i.jsx(St,{})}):i.jsx("div",{className:"flex h-full flex-col",children:i.jsxs(ge,{mode:"wait",initial:!1,children:[h==="cards"&&i.jsx($.div,{...q,className:"flex h-full flex-col",children:i.jsx(yo,{filters:c,onFiltersChange:p})},"view-cards"),h==="table"&&i.jsx($.div,{...q,className:"flex h-full flex-col",children:i.jsx(Zs,{agents:x,isLoading:f,rosterFilters:c})},"view-table"),h==="topology"&&i.jsx($.div,{...q,className:"relative flex-1 overflow-hidden",children:i.jsxs("div",{className:"flex h-full",children:[i.jsx($.div,{layout:!0,className:"min-w-0 flex-1",transition:{type:"spring",stiffness:300,damping:30},children:i.jsx("div",{className:"absolute inset-0",children:i.jsx(y.Suspense,{fallback:i.jsxs("div",{className:"text-muted-foreground flex h-full items-center justify-center text-sm",children:[i.jsx(J,{className:"mr-2"}),"Loading topology…"]}),children:i.jsx(jo,{onSelectAgent:w=>void s({...Y.team(),search:R=>({...R,agent:w})}),onViewProfile:(w,R)=>{Je.getState().openProfileDocked(R)},onOpenChat:w=>{var j;const R=(j=x.find(_=>_.projectPath===w))==null?void 0:j.effectiveRuntimeId;R?r(w,{runtime:R}):o(w)},onOpenAdapterCatalog:()=>n(),onGoToDiscovery:()=>void s({...Y.team(),search:w=>({...w,view:"table"})})})})})}),t?i.jsx(mn,{open:!!g,onOpenChange:w=>!w&&m(),children:i.jsx(pn,{children:g&&i.jsx(qe,{agentId:g,onClose:m})})}):i.jsx(ge,{children:g&&i.jsx($.div,{initial:{width:0,opacity:0},animate:{width:256,opacity:1},exit:{width:0,opacity:0},transition:{type:"spring",stiffness:300,damping:30},className:"bg-background overflow-y-auto border-l",children:i.jsx(qe,{agentId:g,onClose:m})})})]})},"view-topology"),h==="denied"&&i.jsx($.div,{...q,children:i.jsx(to,{})},"view-denied"),h==="access"&&i.jsx($.div,{...q,children:i.jsx(ao,{})},"view-access")]})})}function Mo(){return i.jsxs("div",{className:"flex h-full min-h-0 flex-col overflow-y-auto",children:[i.jsx(An,{}),i.jsx("div",{className:"min-h-0 flex-1",children:i.jsx(No,{})})]})}const Oo=Object.freeze(Object.defineProperty({__proto__:null,component:Mo},Symbol.toStringTag,{value:"Module"}));export{wt as H,Oo as _};
@@ -1 +1 @@
1
- import{a1 as R,a2 as C,aP as j,a3 as T,r as c,gW as S,gX as N,gk as A,j as t,G as M,e as x,gY as k,gZ as P,eb as q,B as v,g_ as _,cj as B,g$ as D,h0 as F,l as b}from"./index-DKTd8X7n.js";import{C as O,P as Q}from"./index-BsmR2hi4.js";import{t as H,u as K,a as $,A as L,R as z,C as G,b as Y,c as Z,d as W,e as X}from"./ChannelComposer-DIRPjyyf.js";import{E as J}from"./empty-state-Bxfi7_ss.js";import{P as U}from"./page-container-D03bhclt.js";import"./file-C-ooqbRY.js";import"./file-drag-GDx2qhdk.js";import"./find-latest-widget-fence-DPQimlUD.js";import"./WidgetErrorCard-CAUx4KUI.js";import"./index-CSqz4B0v.js";import"./card-D4ek-VvX.js";import"./progress-BB97hlmb.js";import"./markdown-content-CN_dGlgE.js";import"./table-BIdFvzBs.js";import"./package-BVNiaGrb.js";import"./heart-DnR_GX4I.js";import"./git-branch-D5xr7U5P.js";import"./file-text-BJt8biPY.js";import"./paperclip-DQQVX5tJ.js";import"./index-B0jt7Nng.js";import"./RuntimeSetupDialog-CUFie4LV.js";import"./inline-code-DlVYFFW7.js";import"./list-runtime-types-D5ZO30FL.js";import"./RuntimeConnectFlow-DN2ElvcH.js";import"./useMutationState-BAU_J-u3.js";import"./runtime-connect-Dn0T5YWv.js";import"./repeat-DPzic7-j.js";import"./use-room-sessions-CoEIaBRt.js";import"./format-duration-BCr6uzby.js";import"./mention-pill-C6OT4gx4.js";import"./rotate-ccw-clock-gqBy98sI.js";import"./unplug-xlfZ61jC.js";import"./message-square-off-DlkAPJdd.js";import"./registry-DRvQ3ChB.js";const V=3e4;function ee(){const e=R();return C({queryKey:j.threads(),queryFn:()=>e.listThreads(),staleTime:V})}function te(e){const o=T(),n=c.useRef(null);c.useEffect(()=>{if(e===void 0)return;const r=n.current,i=new Map(e.map(s=>[s.rootEntryId,s.lastActivityAt]));if(n.current=i,r===null)return;const a=new Set;for(const s of e){const d=r.get(s.rootEntryId);d!==void 0&&d!==s.lastActivityAt&&a.add(s.roomId)}for(const s of a)o.invalidateQueries({queryKey:j.entries(s)})},[e,o])}const y=12;function oe(e){const[o,n]=c.useState(y),[r,i]=c.useState(null),a=c.useRef(new Set),s=c.useMemo(()=>e.filter((p,m)=>m<o||a.current.has(p.rootEntryId)),[e,o]);c.useEffect(()=>{for(const p of s)a.current.add(p.rootEntryId)},[s]);const d=e.length>s.length,f=c.useCallback(()=>{const p=new Set(s.map(u=>u.rootEntryId)),m=e.filter(u=>!p.has(u.rootEntryId));m.length<=y&&m[0]!==void 0&&i(m[0].rootEntryId),n(u=>u+y)},[e,s]),h=c.useCallback(()=>i(null),[]);return{visible:s,hasMore:d,showMore:f,focusId:r,focused:h}}function re(e,o){const r=S(e).data;return c.useMemo(()=>{let i;const a=[];for(const s of r??[])s.id===o?i=s:H(s)===o&&a.push(s);return{root:i,latest:a.slice(-2),loaded:r!==void 0}},[r,o])}function se(e){var n;return e.target.closest('button, a, input, textarea, [role="button"], [role="menuitem"]')?!1:(((n=window.getSelection())==null?void 0:n.toString())??"")===""}function ne({thread:e,agents:o,onOpen:n}){const i=N(e.roomId).data,a=A({kind:e.roomKind,slug:e.roomSlug,title:e.roomTitle});return t.jsxs("article",{"aria-label":`Thread in ${a}`,"data-testid":"thread-card","data-thread-root":e.rootEntryId,className:"bg-card rounded-lg border",children:[t.jsxs("header",{className:"flex items-center gap-2 border-b px-4 py-2",children:[t.jsx("button",{type:"button",onClick:()=>n(e),className:M("focus-ring hover:text-foreground min-w-0 truncate rounded text-sm",e.unreadCount>0?"text-foreground font-semibold":"text-muted-foreground"),children:a}),e.unreadCount>0&&t.jsxs("span",{className:"text-primary shrink-0 text-xs font-medium",children:[e.unreadCount," new"]})]}),i===void 0?t.jsx(ie,{}):t.jsx(ae,{room:i,thread:e,agents:o,onOpen:n})]})}function ae({room:e,thread:o,agents:n,onOpen:r}){const{root:i,latest:a,loaded:s}=re(e.id,o.rootEntryId),d=K({room:e,threadRootId:o.rootEntryId}),f=k(e.id,o.rootEntryId),[h,p]=c.useState(!1),m=P(e.members,e.viewerAuthorId),u=c.useMemo(()=>$(e.members,e.formerAuthors),[e.members,e.formerAuthors]),w=c.useMemo(()=>new Map([...u].map(([l,E])=>[l,E.displayName])),[u]),g=Math.max(0,o.replyCount-a.length),I=l=>t.jsx(Y,{roomId:e.id,entry:l,author:Z(W(l,u),u,n.faces),authorRef:u.get(l.authorId),authors:u,viewerAuthorId:e.viewerAuthorId,authorNames:w,reactionFrequents:e.reactionFrequents,isMember:m,grouping:{position:"only"}},l.id);return t.jsx(L,{known:n,children:t.jsxs(O.Root,{surface:"room",capabilities:z,target:d.target,anchor:"rail",children:[t.jsxs("div",{className:"py-2",children:[i!==void 0?t.jsx("div",{"data-testid":"thread-card-root",className:"cursor-pointer",onClick:l=>{se(l)&&r(o)},children:I(i)}):t.jsx("button",{type:"button",onClick:()=>r(o),className:"focus-ring text-foreground hover:bg-accent/40 mx-2 block w-[calc(100%-1rem)] rounded px-2 py-1.5 text-left text-sm",children:s?o.rootPreview||"A message with no text":t.jsx(x,{className:"h-4 w-2/3"})}),g>0&&t.jsx("button",{type:"button","data-testid":"thread-card-more",onClick:()=>r(o),className:"focus-ring text-muted-foreground hover:text-foreground mx-[var(--msg-padding-x)] my-1 rounded text-xs",children:g===1?"1 more reply":`${g} more replies`}),a.map(I),f.map(l=>t.jsx(Q,{post:l,viewerAuthorId:e.viewerAuthorId},l.clientId))]}),m&&t.jsx("div",{className:"border-t",children:h?t.jsx(G,{room:e,threadRootId:o.rootEntryId,attachments:d.attachments,focusOnMount:!0}):t.jsx("button",{type:"button","data-testid":"thread-card-reply",onClick:()=>p(!0),className:"focus-ring text-muted-foreground hover:text-foreground w-full rounded-b-lg px-4 py-2.5 text-left text-sm",children:"Reply…"})})]})})}function ie(){return t.jsxs("div",{className:"flex flex-col gap-2 px-4 py-3","aria-hidden":!0,children:[t.jsx(x,{className:"h-4 w-1/3"}),t.jsx(x,{className:"h-4 w-4/5"})]})}function de(){var n;const e=B(),o=((n=D().room)==null?void 0:n.id)??null;return c.useCallback(r=>{if(F.getState().openThread(r.roomId,r.rootEntryId,!1),r.roomId===o){e({...b.home(),search:{thread:r.rootEntryId}});return}e({...b.channels(),search:{id:r.roomId,thread:r.rootEntryId}})},[e,o])}const ce=[];function ue(){const e=ee(),o=X(),n=de(),r=oe(e.data??ce),i=c.useRef(null);te(e.data);const{focusId:a,focused:s}=r;return c.useEffect(()=>{var f,h;if(a===null)return;const d=(f=i.current)==null?void 0:f.querySelector(`[data-thread-root="${CSS.escape(a)}"]`);(h=d==null?void 0:d.querySelector("button"))==null||h.focus(),s()},[a,s]),t.jsxs(U,{width:"reading",children:[t.jsx("header",{className:"mb-4",children:t.jsx(q,{children:"Threads"})}),e.isPending?t.jsx("div",{className:"flex flex-col gap-3","aria-busy":!0,"data-testid":"threads-loading",children:[0,1,2].map(d=>t.jsx(x,{className:"h-32 w-full rounded-lg"},d))}):e.isError?t.jsxs("div",{className:"text-muted-foreground flex flex-col items-start gap-2 text-sm",children:[t.jsx("p",{children:"Couldn’t load your threads."}),t.jsx(v,{variant:"outline",size:"sm",onClick:()=>void e.refetch(),children:"Try again"})]}):e.data.length===0?t.jsx(J,{icon:_,headline:"No threads yet",description:"Reply to a message in any channel or DM, and the thread shows up here."}):t.jsxs(t.Fragment,{children:[t.jsx("ul",{ref:i,className:"flex flex-col gap-3","aria-label":"Your threads",children:r.visible.map(d=>t.jsx("li",{children:t.jsx(ne,{thread:d,agents:o,onOpen:n})},d.rootEntryId))}),r.hasMore&&t.jsx(v,{variant:"outline",size:"sm",className:"mt-3 self-start",onClick:r.showMore,children:"Show more"})]})]})}const ze=ue;export{ze as component};
1
+ import{a1 as R,a2 as C,aP as j,a3 as T,r as c,gW as S,gX as N,gk as A,j as t,G as M,e as x,gY as k,gZ as P,eb as q,B as v,g_ as _,cj as B,g$ as D,h0 as F,l as b}from"./index-CjUfPyOM.js";import{C as O,P as Q}from"./index-Dj4I8KcL.js";import{t as H,u as K,a as $,A as L,R as z,C as G,b as Y,c as Z,d as W,e as X}from"./ChannelComposer-CutghXOq.js";import{E as J}from"./empty-state-aNwJA6H8.js";import{P as U}from"./page-container-B9sDc2wq.js";import"./file-bSD5jgk_.js";import"./file-drag-GDx2qhdk.js";import"./find-latest-widget-fence-D01ENK2h.js";import"./WidgetErrorCard-I8WiJv2g.js";import"./index-D0yajRDv.js";import"./card-DI7YtQh3.js";import"./progress-eQl1UvNz.js";import"./markdown-content-ysBIqFAg.js";import"./table-B0LsKsEv.js";import"./package-CD8xq7hk.js";import"./heart-BrjEmIsl.js";import"./git-branch-ClXAt1_G.js";import"./file-text-DTvj1wzM.js";import"./paperclip-CzhXW5qi.js";import"./index-6yT0Qr0s.js";import"./RuntimeSetupDialog-Er-lzjmK.js";import"./inline-code-DwFNff3_.js";import"./list-runtime-types-B0CSonAi.js";import"./RuntimeConnectFlow-IaRVgmqH.js";import"./useMutationState-rOg4bnKv.js";import"./runtime-connect-Dn0T5YWv.js";import"./repeat-wB31CP7I.js";import"./use-room-sessions-W62Zl72O.js";import"./format-duration-BCr6uzby.js";import"./mention-pill-Daeu1X92.js";import"./rotate-ccw-clock-LSKKAcnR.js";import"./unplug-DLA7Ib_s.js";import"./message-square-off-D9hm8WNH.js";import"./registry-BSucT23N.js";const V=3e4;function ee(){const e=R();return C({queryKey:j.threads(),queryFn:()=>e.listThreads(),staleTime:V})}function te(e){const o=T(),n=c.useRef(null);c.useEffect(()=>{if(e===void 0)return;const r=n.current,i=new Map(e.map(s=>[s.rootEntryId,s.lastActivityAt]));if(n.current=i,r===null)return;const a=new Set;for(const s of e){const d=r.get(s.rootEntryId);d!==void 0&&d!==s.lastActivityAt&&a.add(s.roomId)}for(const s of a)o.invalidateQueries({queryKey:j.entries(s)})},[e,o])}const y=12;function oe(e){const[o,n]=c.useState(y),[r,i]=c.useState(null),a=c.useRef(new Set),s=c.useMemo(()=>e.filter((p,m)=>m<o||a.current.has(p.rootEntryId)),[e,o]);c.useEffect(()=>{for(const p of s)a.current.add(p.rootEntryId)},[s]);const d=e.length>s.length,f=c.useCallback(()=>{const p=new Set(s.map(u=>u.rootEntryId)),m=e.filter(u=>!p.has(u.rootEntryId));m.length<=y&&m[0]!==void 0&&i(m[0].rootEntryId),n(u=>u+y)},[e,s]),h=c.useCallback(()=>i(null),[]);return{visible:s,hasMore:d,showMore:f,focusId:r,focused:h}}function re(e,o){const r=S(e).data;return c.useMemo(()=>{let i;const a=[];for(const s of r??[])s.id===o?i=s:H(s)===o&&a.push(s);return{root:i,latest:a.slice(-2),loaded:r!==void 0}},[r,o])}function se(e){var n;return e.target.closest('button, a, input, textarea, [role="button"], [role="menuitem"]')?!1:(((n=window.getSelection())==null?void 0:n.toString())??"")===""}function ne({thread:e,agents:o,onOpen:n}){const i=N(e.roomId).data,a=A({kind:e.roomKind,slug:e.roomSlug,title:e.roomTitle});return t.jsxs("article",{"aria-label":`Thread in ${a}`,"data-testid":"thread-card","data-thread-root":e.rootEntryId,className:"bg-card rounded-lg border",children:[t.jsxs("header",{className:"flex items-center gap-2 border-b px-4 py-2",children:[t.jsx("button",{type:"button",onClick:()=>n(e),className:M("focus-ring hover:text-foreground min-w-0 truncate rounded text-sm",e.unreadCount>0?"text-foreground font-semibold":"text-muted-foreground"),children:a}),e.unreadCount>0&&t.jsxs("span",{className:"text-primary shrink-0 text-xs font-medium",children:[e.unreadCount," new"]})]}),i===void 0?t.jsx(ie,{}):t.jsx(ae,{room:i,thread:e,agents:o,onOpen:n})]})}function ae({room:e,thread:o,agents:n,onOpen:r}){const{root:i,latest:a,loaded:s}=re(e.id,o.rootEntryId),d=K({room:e,threadRootId:o.rootEntryId}),f=k(e.id,o.rootEntryId),[h,p]=c.useState(!1),m=P(e.members,e.viewerAuthorId),u=c.useMemo(()=>$(e.members,e.formerAuthors),[e.members,e.formerAuthors]),w=c.useMemo(()=>new Map([...u].map(([l,E])=>[l,E.displayName])),[u]),g=Math.max(0,o.replyCount-a.length),I=l=>t.jsx(Y,{roomId:e.id,entry:l,author:Z(W(l,u),u,n.faces),authorRef:u.get(l.authorId),authors:u,viewerAuthorId:e.viewerAuthorId,authorNames:w,reactionFrequents:e.reactionFrequents,isMember:m,grouping:{position:"only"}},l.id);return t.jsx(L,{known:n,children:t.jsxs(O.Root,{surface:"room",capabilities:z,target:d.target,anchor:"rail",children:[t.jsxs("div",{className:"py-2",children:[i!==void 0?t.jsx("div",{"data-testid":"thread-card-root",className:"cursor-pointer",onClick:l=>{se(l)&&r(o)},children:I(i)}):t.jsx("button",{type:"button",onClick:()=>r(o),className:"focus-ring text-foreground hover:bg-accent/40 mx-2 block w-[calc(100%-1rem)] rounded px-2 py-1.5 text-left text-sm",children:s?o.rootPreview||"A message with no text":t.jsx(x,{className:"h-4 w-2/3"})}),g>0&&t.jsx("button",{type:"button","data-testid":"thread-card-more",onClick:()=>r(o),className:"focus-ring text-muted-foreground hover:text-foreground mx-[var(--msg-padding-x)] my-1 rounded text-xs",children:g===1?"1 more reply":`${g} more replies`}),a.map(I),f.map(l=>t.jsx(Q,{post:l,viewerAuthorId:e.viewerAuthorId},l.clientId))]}),m&&t.jsx("div",{className:"border-t",children:h?t.jsx(G,{room:e,threadRootId:o.rootEntryId,attachments:d.attachments,focusOnMount:!0}):t.jsx("button",{type:"button","data-testid":"thread-card-reply",onClick:()=>p(!0),className:"focus-ring text-muted-foreground hover:text-foreground w-full rounded-b-lg px-4 py-2.5 text-left text-sm",children:"Reply…"})})]})})}function ie(){return t.jsxs("div",{className:"flex flex-col gap-2 px-4 py-3","aria-hidden":!0,children:[t.jsx(x,{className:"h-4 w-1/3"}),t.jsx(x,{className:"h-4 w-4/5"})]})}function de(){var n;const e=B(),o=((n=D().room)==null?void 0:n.id)??null;return c.useCallback(r=>{if(F.getState().openThread(r.roomId,r.rootEntryId,!1),r.roomId===o){e({...b.home(),search:{thread:r.rootEntryId}});return}e({...b.channels(),search:{id:r.roomId,thread:r.rootEntryId}})},[e,o])}const ce=[];function ue(){const e=ee(),o=X(),n=de(),r=oe(e.data??ce),i=c.useRef(null);te(e.data);const{focusId:a,focused:s}=r;return c.useEffect(()=>{var f,h;if(a===null)return;const d=(f=i.current)==null?void 0:f.querySelector(`[data-thread-root="${CSS.escape(a)}"]`);(h=d==null?void 0:d.querySelector("button"))==null||h.focus(),s()},[a,s]),t.jsxs(U,{width:"reading",children:[t.jsx("header",{className:"mb-4",children:t.jsx(q,{children:"Threads"})}),e.isPending?t.jsx("div",{className:"flex flex-col gap-3","aria-busy":!0,"data-testid":"threads-loading",children:[0,1,2].map(d=>t.jsx(x,{className:"h-32 w-full rounded-lg"},d))}):e.isError?t.jsxs("div",{className:"text-muted-foreground flex flex-col items-start gap-2 text-sm",children:[t.jsx("p",{children:"Couldn’t load your threads."}),t.jsx(v,{variant:"outline",size:"sm",onClick:()=>void e.refetch(),children:"Try again"})]}):e.data.length===0?t.jsx(J,{icon:_,headline:"No threads yet",description:"Reply to a message in any channel or DM, and the thread shows up here."}):t.jsxs(t.Fragment,{children:[t.jsx("ul",{ref:i,className:"flex flex-col gap-3","aria-label":"Your threads",children:r.visible.map(d=>t.jsx("li",{children:t.jsx(ne,{thread:d,agents:o,onOpen:n})},d.rootEntryId))}),r.hasMore&&t.jsx(v,{variant:"outline",size:"sm",className:"mt-3 self-start",onClick:r.showMore,children:"Show more"})]})]})}const ze=ue;export{ze as component};
@@ -0,0 +1 @@
1
+ import{E as o}from"./ExtensionPageRoute-BsGqTcyI.js";import"./index-CjUfPyOM.js";import"./empty-state-aNwJA6H8.js";import"./page-container-B9sDc2wq.js";import"./use-dev-links-C0Zc30aj.js";import"./UnlinkDialog-DTuXHNsi.js";const e=o;export{e as component};
@@ -0,0 +1 @@
1
+ import{E as o}from"./ExtensionPageRoute-BsGqTcyI.js";import"./index-CjUfPyOM.js";import"./empty-state-aNwJA6H8.js";import"./page-container-B9sDc2wq.js";import"./use-dev-links-C0Zc30aj.js";import"./UnlinkDialog-DTuXHNsi.js";const e=o;export{e as component};
@@ -1 +1 @@
1
- import{g as p,r as u,d as a}from"./chunk-2E7WHVMD-ClO15ze9.js";import{p as f}from"./chunk-JWPE2WC7-CnsdZOv0.js";import{_ as n,l as o}from"./mermaid.core-DNuzxE7q.js";import"./transform-BqqRT-Iy.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-DgZeohG3.js";import"./index-DKTd8X7n.js";import"./BlintzCanvas-C-dobEns.js";import"./index-BAIKz_P0.js";import"./index-ZYbeRA5f.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),m=t?parseInt(t,10):0,l=s?parseInt(s,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},D={parser:R,db:a,renderer:u,styles:p};export{D as diagram};
1
+ import{g as p,r as u,d as a}from"./chunk-2E7WHVMD-DIK6CHka.js";import{p as f}from"./chunk-JWPE2WC7-v1omZzgE.js";import{_ as n,l as o}from"./mermaid.core-B1mQMOXd.js";import"./transform-BqqRT-Iy.js";import{M as c,b as d}from"./cynefin-EF2NZ3EQ-cj34OpiI.js";import"./index-CjUfPyOM.js";import"./BlintzCanvas-DzjdPTlx.js";import"./index-DgxXSEmR.js";import"./index-DB2t3GUm.js";var v=d().RailroadAbnf.parser.LangiumParser,i=n(e=>{const r=e.alternatives.map(g);return r.length===1?r[0]:{type:"choice",alternatives:r}},"transformAlternation"),g=n(e=>{const r=e.elements.map(y);return r.length===1?r[0]:{type:"sequence",elements:r}},"transformConcatenation"),b=n(e=>{if(e.includes("*")){const[t,s]=e.split("*"),m=t?parseInt(t,10):0,l=s?parseInt(s,10):1/0;return{min:m,max:l}}const r=parseInt(e,10);return{min:r,max:r}},"parseRepeat"),y=n(e=>{const r=A(e.primary);if(!e.repeat)return r;const{min:t,max:s}=b(e.repeat);return t===0&&s===1?{type:"optional",element:r}:{type:"repetition",element:r,min:t,max:s}},"transformElement"),A=n(e=>{switch(e.$type){case"AbnfStringLiteral":return{type:"terminal",value:e.value};case"AbnfNumVal":return{type:"terminal",value:e.value};case"AbnfRuleName":return{type:"nonterminal",name:e.name};case"AbnfGroup":return i(e.element);case"AbnfOptionalGroup":return{type:"optional",element:i(e.element)};default:throw new Error(`Unsupported ABNF primary node: ${e.$type}`)}},"transformPrimary"),P=n(e=>({name:e.name,definition:i(e.definition)}),"transformRule"),h=n(e=>{f(e,a),e.title&&a.setTitle(e.title),e.rules.map(r=>a.addRule(P(r)))},"populateDb"),R={parse:n(e=>{a.clear(),o.debug("[ABNF Parser] Starting Langium parse");const r=v.parse(e);if(r.lexerErrors.length>0||r.parserErrors.length>0)throw new c(r);const t=r.value;o.debug("[ABNF Parser] Parsed rules:",t.rules.length),h(t),o.debug("[ABNF Parser] Parse complete")},"parse"),parser:{yy:a}},D={parser:R,db:a,renderer:u,styles:p};export{D as diagram};
@@ -1 +1 @@
1
- import{du as f,a1 as r,a2 as c,a3 as i,a4 as C,aR as s,av as g,r as d,dv as v}from"./index-DKTd8X7n.js";const m="connections";function q(){return f()?`dorkos://${m}`:`${window.location.origin}/${m}`}const A=300*1e3;function K(n,e=!0){const t=r();return g({queryKey:s.catalog(n),queryFn:({pageParam:o})=>t.getConnectorCatalog({...n.trim()!==""&&{query:n.trim()},...o&&{cursor:o},limit:24}),initialPageParam:void 0,getNextPageParam:o=>o.nextCursor,staleTime:o=>{var a;return(a=o.state.data)!=null&&a.pages.some(u=>u.warnings.length>0)?0:A},enabled:e})}const T=5*6e4;function F(n,e){const t=r();return c({queryKey:s.appActions(e??"",n),queryFn:()=>t.getConnectorAppActions(n,e??""),enabled:!!e&&n!=="",staleTime:T})}function _(){const n=r(),e=i();return C({mutationFn:()=>n.getConnectorCatalog({limit:1}),onSettled:()=>e.invalidateQueries({queryKey:s.all})})}function h(){const n=r();return c({queryKey:s.connections(),queryFn:()=>n.getConnectorConnections()})}const S=15e3;function N(n,e=!0){const t=r();return c({queryKey:s.connection(n??""),queryFn:()=>t.getConnectorConnection(n??""),enabled:e&&!!n,refetchInterval:o=>{var a;return((a=o.state.data)==null?void 0:a.connection.readiness.reason)==="disconnect_finishing"?S:!1}})}function Q(n,e){const t=r();return c({queryKey:s.disconnectImpact(n??""),queryFn:()=>t.getConnectorDisconnectImpact(n??""),enabled:e&&!!n})}function R(n){const e=r();return c({queryKey:s.agentConnections(n??""),queryFn:()=>e.getAgentConnectorConnections(n??""),enabled:!!n})}function b(n=!0){const e=r();return c({queryKey:s.everyAgentGrants(),queryFn:()=>e.getEveryAgentConnectorGrants(),enabled:n})}function O(n){const e=r();return c({queryKey:s.sessionConnections(n??""),queryFn:()=>e.getSessionConnectorConnections(n??""),enabled:!!n})}function P(n){const e=r();return c({queryKey:s.usage(n??""),queryFn:()=>e.getOperatorConnectorUsage({connectionId:n??""}),enabled:!!n})}function B(){const n=r();return C({mutationFn:e=>n.startConnectorAuthentication({returnTo:q(),...e}),meta:{suppressErrorToast:!0}})}function D(n){var a;const e=r(),t=i(),o=c({queryKey:s.authenticationFlow(n??""),queryFn:()=>e.pollConnectorAuthentication(n??""),enabled:!!n,refetchInterval:u=>{var p;const l=(p=u.state.data)==null?void 0:p.state;return l==="starting"||l==="pending"?2e3:!1},staleTime:0,meta:{suppressErrorToast:!0}});return d.useEffect(()=>{var u;((u=o.data)==null?void 0:u.state)==="connected"&&t.invalidateQueries({queryKey:s.connections()})},[(a=o.data)==null?void 0:a.state,t]),o}function y(n){const e=i();return C({mutationFn:({connectionId:t,input:o})=>n(t,o),meta:{suppressErrorToast:!0},onSettled:(t,o,{connectionId:a})=>{e.invalidateQueries({queryKey:s.connections()}),e.invalidateQueries({queryKey:s.connection(a)})}})}function M(){const n=r();return y((e,t)=>n.renameConnectorConnection(e,t))}function U(){const n=r(),e=i();return C({mutationFn:({connectionId:t})=>n.reconnectConnectorConnection(t,{idempotencyKey:crypto.randomUUID(),returnTo:q()}),meta:{suppressErrorToast:!0},onSettled:(t,o,{connectionId:a})=>{e.invalidateQueries({queryKey:s.connections()}),e.invalidateQueries({queryKey:s.connection(a)})}})}function G(){const n=r();return y(e=>n.pauseConnectorConnection(e))}function x(){const n=r();return y(e=>n.resumeConnectorConnection(e))}function L(){const n=r();return y(e=>n.disconnectConnectorConnection(e))}function k(){const n=r();return y(e=>n.removeConnectorConnection(e))}function $(n){const e=r(),t=i();return C({mutationFn:({connectionId:o,on:a})=>e.setSessionConnectorAccess(n,o,{on:a}),meta:{suppressErrorToast:!0},onSuccess:o=>{t.setQueryData(s.sessionConnections(n),o)},onSettled:()=>{t.invalidateQueries({queryKey:s.sessionConnections(n)})}})}const w=v;export{O as a,$ as b,N as c,F as d,h as e,x as f,U as g,_ as h,D as i,K as j,G as k,M as l,Q as m,L as n,k as o,P as p,B as q,b as r,w as s,R as u};
1
+ import{du as f,a1 as r,a2 as c,a3 as i,a4 as C,aR as s,av as g,r as d,dv as v}from"./index-CjUfPyOM.js";const m="connections";function q(){return f()?`dorkos://${m}`:`${window.location.origin}/${m}`}const A=300*1e3;function K(n,e=!0){const t=r();return g({queryKey:s.catalog(n),queryFn:({pageParam:o})=>t.getConnectorCatalog({...n.trim()!==""&&{query:n.trim()},...o&&{cursor:o},limit:24}),initialPageParam:void 0,getNextPageParam:o=>o.nextCursor,staleTime:o=>{var a;return(a=o.state.data)!=null&&a.pages.some(u=>u.warnings.length>0)?0:A},enabled:e})}const T=5*6e4;function F(n,e){const t=r();return c({queryKey:s.appActions(e??"",n),queryFn:()=>t.getConnectorAppActions(n,e??""),enabled:!!e&&n!=="",staleTime:T})}function _(){const n=r(),e=i();return C({mutationFn:()=>n.getConnectorCatalog({limit:1}),onSettled:()=>e.invalidateQueries({queryKey:s.all})})}function h(){const n=r();return c({queryKey:s.connections(),queryFn:()=>n.getConnectorConnections()})}const S=15e3;function N(n,e=!0){const t=r();return c({queryKey:s.connection(n??""),queryFn:()=>t.getConnectorConnection(n??""),enabled:e&&!!n,refetchInterval:o=>{var a;return((a=o.state.data)==null?void 0:a.connection.readiness.reason)==="disconnect_finishing"?S:!1}})}function Q(n,e){const t=r();return c({queryKey:s.disconnectImpact(n??""),queryFn:()=>t.getConnectorDisconnectImpact(n??""),enabled:e&&!!n})}function R(n){const e=r();return c({queryKey:s.agentConnections(n??""),queryFn:()=>e.getAgentConnectorConnections(n??""),enabled:!!n})}function b(n=!0){const e=r();return c({queryKey:s.everyAgentGrants(),queryFn:()=>e.getEveryAgentConnectorGrants(),enabled:n})}function O(n){const e=r();return c({queryKey:s.sessionConnections(n??""),queryFn:()=>e.getSessionConnectorConnections(n??""),enabled:!!n})}function P(n){const e=r();return c({queryKey:s.usage(n??""),queryFn:()=>e.getOperatorConnectorUsage({connectionId:n??""}),enabled:!!n})}function B(){const n=r();return C({mutationFn:e=>n.startConnectorAuthentication({returnTo:q(),...e}),meta:{suppressErrorToast:!0}})}function D(n){var a;const e=r(),t=i(),o=c({queryKey:s.authenticationFlow(n??""),queryFn:()=>e.pollConnectorAuthentication(n??""),enabled:!!n,refetchInterval:u=>{var p;const l=(p=u.state.data)==null?void 0:p.state;return l==="starting"||l==="pending"?2e3:!1},staleTime:0,meta:{suppressErrorToast:!0}});return d.useEffect(()=>{var u;((u=o.data)==null?void 0:u.state)==="connected"&&t.invalidateQueries({queryKey:s.connections()})},[(a=o.data)==null?void 0:a.state,t]),o}function y(n){const e=i();return C({mutationFn:({connectionId:t,input:o})=>n(t,o),meta:{suppressErrorToast:!0},onSettled:(t,o,{connectionId:a})=>{e.invalidateQueries({queryKey:s.connections()}),e.invalidateQueries({queryKey:s.connection(a)})}})}function M(){const n=r();return y((e,t)=>n.renameConnectorConnection(e,t))}function U(){const n=r(),e=i();return C({mutationFn:({connectionId:t})=>n.reconnectConnectorConnection(t,{idempotencyKey:crypto.randomUUID(),returnTo:q()}),meta:{suppressErrorToast:!0},onSettled:(t,o,{connectionId:a})=>{e.invalidateQueries({queryKey:s.connections()}),e.invalidateQueries({queryKey:s.connection(a)})}})}function G(){const n=r();return y(e=>n.pauseConnectorConnection(e))}function x(){const n=r();return y(e=>n.resumeConnectorConnection(e))}function L(){const n=r();return y(e=>n.disconnectConnectorConnection(e))}function k(){const n=r();return y(e=>n.removeConnectorConnection(e))}function $(n){const e=r(),t=i();return C({mutationFn:({connectionId:o,on:a})=>e.setSessionConnectorAccess(n,o,{on:a}),meta:{suppressErrorToast:!0},onSuccess:o=>{t.setQueryData(s.sessionConnections(n),o)},onSettled:()=>{t.invalidateQueries({queryKey:s.sessionConnections(n)})}})}const w=v;export{O as a,$ as b,N as c,F as d,h as e,x as f,U as g,_ as h,D as i,K as j,G as k,M as l,Q as m,L as n,k as o,P as p,B as q,b as r,w as s,R as u};
@@ -1 +1 @@
1
- import{S as ln,T as an,V as j,W as S,X,Y as un,Z as y,$ as tn,a0 as C,a1 as _,a2 as rn,a3 as o,a4 as on,a5 as sn,a6 as fn}from"./mermaid.core-DNuzxE7q.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,Y,a){var I=E-l,i=q-h,n=Y-v,d=a-A,u=d*I-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function L(l,h,E,q,v,A,Y){var a=l-E,I=h-q,i=(Y?A:-A)/C(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,Z=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,O=(g<0?-1:1)*C(on(0,T*T*R-P*P)),V=(P*g-m*O)/R,W=(-P*m-g*O)/R,w=(P*g+m*O)/R,p=(-P*m+g*O)/R,x=V-Z,e=W-t,r=w-Z,$=p-t;return x*x+e*e>r*r+$*$&&(V=w,W=p),{cx:V,cy:W,x01:-n,y01:-d,x11:V*(v/T-1),y11:W*(v/T-1)}}function hn(){var l=cn,h=yn,E=X(0),q=null,v=gn,A=dn,Y=mn,a=null,I=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,Z=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(Z>tn-y)a.moveTo(s*j(f),s*S(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*j(c),u*S(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=Z,O=Z,V=Y.apply(this,arguments)/2,W=V>y&&(q?+q.apply(this,arguments):C(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(W>y){var $=sn(W/u*S(V)),F=sn(W/s*S(V));(P-=$*2)>y?($*=t?1:-1,R+=$,T-=$):(P=0,R=T=(f+c)/2),(O-=F*2)>y?(F*=t?1:-1,m+=F,g-=F):(O=0,m=g=(f+c)/2)}var z=s*j(m),B=s*S(m),G=u*j(T),H=u*S(T);if(w>y){var J=s*j(g),K=s*S(g),M=u*j(R),N=u*S(R),D;if(Z<an)if(D=pn(z,B,M,N,J,K,G,H)){var Q=z-D[0],U=B-D[1],k=J-D[0],b=K-D[1],nn=1/S(fn((Q*k+U*b)/(C(Q*Q+U*U)*C(k*k+b*b)))/2),en=C(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>y?x>y?(e=L(M,N,z,B,s,x,t),r=L(J,K,G,H,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(z,B),a.arc(0,0,s,m,g,!t)):a.moveTo(z,B),!(u>y)||!(P>y)?a.lineTo(G,H):p>y?(e=L(G,H,J,K,u,-p,t),r=L(z,B,M,N,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[j(d)*n,S(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:X(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:X(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:X(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:X(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:X(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:X(+n),i):A},i.padAngle=function(n){return arguments.length?(Y=typeof n=="function"?n:X(+n),i):Y},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};
1
+ import{S as ln,T as an,V as j,W as S,X,Y as un,Z as y,$ as tn,a0 as C,a1 as _,a2 as rn,a3 as o,a4 as on,a5 as sn,a6 as fn}from"./mermaid.core-B1mQMOXd.js";function cn(l){return l.innerRadius}function yn(l){return l.outerRadius}function gn(l){return l.startAngle}function dn(l){return l.endAngle}function mn(l){return l&&l.padAngle}function pn(l,h,E,q,v,A,Y,a){var I=E-l,i=q-h,n=Y-v,d=a-A,u=d*I-n*i;if(!(u*u<y))return u=(n*(h-A)-d*(l-v))/u,[l+u*I,h+u*i]}function L(l,h,E,q,v,A,Y){var a=l-E,I=h-q,i=(Y?A:-A)/C(a*a+I*I),n=i*I,d=-i*a,u=l+n,s=h+d,f=E+n,c=q+d,Z=(u+f)/2,t=(s+c)/2,m=f-u,g=c-s,R=m*m+g*g,T=v-A,P=u*c-f*s,O=(g<0?-1:1)*C(on(0,T*T*R-P*P)),V=(P*g-m*O)/R,W=(-P*m-g*O)/R,w=(P*g+m*O)/R,p=(-P*m+g*O)/R,x=V-Z,e=W-t,r=w-Z,$=p-t;return x*x+e*e>r*r+$*$&&(V=w,W=p),{cx:V,cy:W,x01:-n,y01:-d,x11:V*(v/T-1),y11:W*(v/T-1)}}function hn(){var l=cn,h=yn,E=X(0),q=null,v=gn,A=dn,Y=mn,a=null,I=ln(i);function i(){var n,d,u=+l.apply(this,arguments),s=+h.apply(this,arguments),f=v.apply(this,arguments)-un,c=A.apply(this,arguments)-un,Z=rn(c-f),t=c>f;if(a||(a=n=I()),s<u&&(d=s,s=u,u=d),!(s>y))a.moveTo(0,0);else if(Z>tn-y)a.moveTo(s*j(f),s*S(f)),a.arc(0,0,s,f,c,!t),u>y&&(a.moveTo(u*j(c),u*S(c)),a.arc(0,0,u,c,f,t));else{var m=f,g=c,R=f,T=c,P=Z,O=Z,V=Y.apply(this,arguments)/2,W=V>y&&(q?+q.apply(this,arguments):C(u*u+s*s)),w=_(rn(s-u)/2,+E.apply(this,arguments)),p=w,x=w,e,r;if(W>y){var $=sn(W/u*S(V)),F=sn(W/s*S(V));(P-=$*2)>y?($*=t?1:-1,R+=$,T-=$):(P=0,R=T=(f+c)/2),(O-=F*2)>y?(F*=t?1:-1,m+=F,g-=F):(O=0,m=g=(f+c)/2)}var z=s*j(m),B=s*S(m),G=u*j(T),H=u*S(T);if(w>y){var J=s*j(g),K=s*S(g),M=u*j(R),N=u*S(R),D;if(Z<an)if(D=pn(z,B,M,N,J,K,G,H)){var Q=z-D[0],U=B-D[1],k=J-D[0],b=K-D[1],nn=1/S(fn((Q*k+U*b)/(C(Q*Q+U*U)*C(k*k+b*b)))/2),en=C(D[0]*D[0]+D[1]*D[1]);p=_(w,(u-en)/(nn-1)),x=_(w,(s-en)/(nn+1))}else p=x=0}O>y?x>y?(e=L(M,N,z,B,s,x,t),r=L(J,K,G,H,s,x,t),a.moveTo(e.cx+e.x01,e.cy+e.y01),x<w?a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,x,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,s,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),!t),a.arc(r.cx,r.cy,x,o(r.y11,r.x11),o(r.y01,r.x01),!t))):(a.moveTo(z,B),a.arc(0,0,s,m,g,!t)):a.moveTo(z,B),!(u>y)||!(P>y)?a.lineTo(G,H):p>y?(e=L(G,H,J,K,u,-p,t),r=L(z,B,M,N,u,-p,t),a.lineTo(e.cx+e.x01,e.cy+e.y01),p<w?a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(r.y01,r.x01),!t):(a.arc(e.cx,e.cy,p,o(e.y01,e.x01),o(e.y11,e.x11),!t),a.arc(0,0,u,o(e.cy+e.y11,e.cx+e.x11),o(r.cy+r.y11,r.cx+r.x11),t),a.arc(r.cx,r.cy,p,o(r.y11,r.x11),o(r.y01,r.x01),!t))):a.arc(0,0,u,T,R,t)}if(a.closePath(),n)return a=null,n+""||null}return i.centroid=function(){var n=(+l.apply(this,arguments)+ +h.apply(this,arguments))/2,d=(+v.apply(this,arguments)+ +A.apply(this,arguments))/2-an/2;return[j(d)*n,S(d)*n]},i.innerRadius=function(n){return arguments.length?(l=typeof n=="function"?n:X(+n),i):l},i.outerRadius=function(n){return arguments.length?(h=typeof n=="function"?n:X(+n),i):h},i.cornerRadius=function(n){return arguments.length?(E=typeof n=="function"?n:X(+n),i):E},i.padRadius=function(n){return arguments.length?(q=n==null?null:typeof n=="function"?n:X(+n),i):q},i.startAngle=function(n){return arguments.length?(v=typeof n=="function"?n:X(+n),i):v},i.endAngle=function(n){return arguments.length?(A=typeof n=="function"?n:X(+n),i):A},i.padAngle=function(n){return arguments.length?(Y=typeof n=="function"?n:X(+n),i):Y},i.context=function(n){return arguments.length?(a=n??null,i):a},i}export{hn as d};