dorkos 0.126.2 → 0.126.4

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 (317) hide show
  1. package/dist/bin/cli.js +254 -114
  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-BQ66xWcJ.js → AboutPage-CAt15a-r.js} +1 -1
  5. package/dist/client/assets/{ActivityErrorState-CPbfgXjw.js → ActivityErrorState-s4xAcJQR.js} +1 -1
  6. package/dist/client/assets/{ActivityPage-CesljfZn.js → ActivityPage-BpSggjZV.js} +1 -1
  7. package/dist/client/assets/{ActivityRow-DzhwE0ht.js → ActivityRow-5PJBHIt2.js} +1 -1
  8. package/dist/client/assets/{AdapterIcon-BXJkyF5g.js → AdapterIcon-d8mZODCX.js} +1 -1
  9. package/dist/client/assets/AdapterSetupWizard-R-KxNMiM.js +2 -0
  10. package/dist/client/assets/{AgentOptionRow-0VdNzXCF.js → AgentOptionRow-hemBruhh.js} +1 -1
  11. package/dist/client/assets/{AgentPicker-Ldh64iOA.js → AgentPicker-DOba9a77.js} +1 -1
  12. package/dist/client/assets/{AgentRequestCard-CmAlDGTr.js → AgentRequestCard-RFQOrk-W.js} +1 -1
  13. package/dist/client/assets/{AppearancePage-DmsZPHst.js → AppearancePage-1m4bJ-Rg.js} +1 -1
  14. package/dist/client/assets/{ApplyToOverridesDialog-Ct1W283T.js → ApplyToOverridesDialog-BxeMLhGv.js} +1 -1
  15. package/dist/client/assets/{AttentionSignalRow-B7gezgzA.js → AttentionSignalRow-BoTonsR5.js} +1 -1
  16. package/dist/client/assets/{BaseTanStackRouterDevtoolsPanel-B-iktbLX-Nqvr65_g.js → BaseTanStackRouterDevtoolsPanel-B-iktbLX-Bz6XyZ6v.js} +3 -3
  17. package/dist/client/assets/BindingDialog-CILm91iU.js +1 -0
  18. package/dist/client/assets/{BlintzCanvas-BCtfZPrs.js → BlintzCanvas-BFJXKo1L.js} +3 -3
  19. package/dist/client/assets/{CanvasCsvContent-DYksqzaf.js → CanvasCsvContent-DzkaHpEo.js} +3 -3
  20. package/dist/client/assets/{CanvasFileContent-CqEqSxuJ.js → CanvasFileContent-DZf9SjJn.js} +2 -2
  21. package/dist/client/assets/{CanvasModel3dContent-vR6ze4IR.js → CanvasModel3dContent-Cd8hf6Ba.js} +2 -2
  22. package/dist/client/assets/{ChannelComposer-BVACOdph.js → ChannelComposer-YXkkFcyY.js} +10 -10
  23. package/dist/client/assets/{ChatAppsOff-VsPP2Hye.js → ChatAppsOff-X5Y8OHAz.js} +2 -2
  24. package/dist/client/assets/{CodeMirrorDiff-CmKjH03N.js → CodeMirrorDiff-BsQKbrls.js} +1 -1
  25. package/dist/client/assets/{CodeMirrorEditor-BtNgazuc.js → CodeMirrorEditor-DnkumDd3.js} +1 -1
  26. package/dist/client/assets/{CommitmentList-D9I-CmNy.js → CommitmentList-BjI2jvMX.js} +1 -1
  27. package/dist/client/assets/{CommitmentsPage-BORMYDZb.js → CommitmentsPage-7g68FcGR.js} +1 -1
  28. package/dist/client/assets/{ComputerResourceView-BZ9BxgOi.js → ComputerResourceView-Dcd0e_Oj.js} +1 -1
  29. package/dist/client/assets/{ComputerViewer-CbuU9tXK.js → ComputerViewer-Dq3aQyZD.js} +1 -1
  30. package/dist/client/assets/{ConnectionAccessLists-uE-Fzp6Y.js → ConnectionAccessLists-CXPn8ICQ.js} +1 -1
  31. package/dist/client/assets/{ConnectionsPage-D7QTHeQQ.js → ConnectionsPage-DEc4JsR5.js} +2 -2
  32. package/dist/client/assets/{ConventionPage-PS2WWCyB.js → ConventionPage-B7cm4O1D.js} +1 -1
  33. package/dist/client/assets/{ExtensionPageRoute-Cn7bYxGB.js → ExtensionPageRoute-ba2uGsYs.js} +2 -2
  34. package/dist/client/assets/{FloatingTanStackRouterDevtools-CqogiFob-DKGNSXVz.js → FloatingTanStackRouterDevtools-CqogiFob-Dxk_rLHR.js} +1 -1
  35. package/dist/client/assets/{ForwardConsentHost-CLIHtWwq.js → ForwardConsentHost-CNuTTR3q.js} +1 -1
  36. package/dist/client/assets/HandlePage-WIwOCyJg.js +1 -0
  37. package/dist/client/assets/{HeartbeatPage-7MTowke-.js → HeartbeatPage-CEb8SaAx.js} +1 -1
  38. package/dist/client/assets/{KeyEntry-Cf7D0Oo6.js → KeyEntry-CHJpgP6H.js} +1 -1
  39. package/dist/client/assets/{LexicalField-DqvzeMr3.js → LexicalField-B0tWaDy5.js} +1 -1
  40. package/dist/client/assets/{ManagesPage-DxR4zWMf.js → ManagesPage-rcz--gCT.js} +1 -1
  41. package/dist/client/assets/{Marketplace-V_92jKOn.js → Marketplace-wjAUiULQ.js} +4 -4
  42. package/dist/client/assets/{MarketplaceSourcesView-CjCVMP_d.js → MarketplaceSourcesView-BMGnEy8T.js} +1 -1
  43. package/dist/client/assets/{McpAppFrame-4JDJsrmg.js → McpAppFrame-CmwiQHxf.js} +2 -2
  44. package/dist/client/assets/{McpSigninBody-DG1XX7XT.js → McpSigninBody-D99PCc0n.js} +1 -1
  45. package/dist/client/assets/{Model3dViewer-DedBFHsl.js → Model3dViewer-qUwwZnb2.js} +1 -1
  46. package/dist/client/assets/NamePage-B7VSrPmK.js +1 -0
  47. package/dist/client/assets/{NewDirectMessageMenu-C8t7x-sB.js → NewDirectMessageMenu-DyMfEU7i.js} +1 -1
  48. package/dist/client/assets/{NotificationsPage-DwGFE3F6.js → NotificationsPage-BsOaV6Ei.js} +1 -1
  49. package/dist/client/assets/{OpenMeshSwitch-DPmTA9eg.js → OpenMeshSwitch-CjCPWZn0.js} +2 -2
  50. package/dist/client/assets/{OperatorIdentityForm-Cu0h8Xqy.js → OperatorIdentityForm-Cd6B2hxb.js} +1 -1
  51. package/dist/client/assets/{PermissionHistory-zD6ksrl2.js → PermissionHistory-xp6vPQ20.js} +1 -1
  52. package/dist/client/assets/{PermissionsPage-Durcnmie.js → PermissionsPage-DaAJew99.js} +1 -1
  53. package/dist/client/assets/{PersonalityPopover-DuRjJuLj.js → PersonalityPopover-BZaif5Fn.js} +1 -1
  54. package/dist/client/assets/PhotoPage-43WNaavk.js +1 -0
  55. package/dist/client/assets/{PreviewRefusedNotice-hlYrFDQM.js → PreviewRefusedNotice-CCpHgrea.js} +1 -1
  56. package/dist/client/assets/{ProfileFields-x-x8vgNo.js → ProfileFields-DyVqmcPr.js} +1 -1
  57. package/dist/client/assets/{ProfilePanelContainer-8WxopRj2.js → ProfilePanelContainer-CMRG6AmB.js} +1 -1
  58. package/dist/client/assets/{ProfileRolePicker-BfciiNpr.js → ProfileRolePicker-Q_hY6ybO.js} +1 -1
  59. package/dist/client/assets/{PromptSuggestionChips-D34Zeaq_.js → PromptSuggestionChips-B5afjbD0.js} +1 -1
  60. package/dist/client/assets/{ReportsToPopover-BhqA5qXi.js → ReportsToPopover-CVF7Rtzh.js} +1 -1
  61. package/dist/client/assets/{RoomSurface-BlMNuQsT.js → RoomSurface-Bz1DfoQD.js} +1 -1
  62. package/dist/client/assets/{RoomsPage-C52AOHIE.js → RoomsPage-4u74yonc.js} +1 -1
  63. package/dist/client/assets/{RunsOnPopover-DLhEKwXF.js → RunsOnPopover-CnUm4LP2.js} +1 -1
  64. package/dist/client/assets/{RuntimeConnectFlow-D3H5Fpkc.js → RuntimeConnectFlow-B0TIITVq.js} +1 -1
  65. package/dist/client/assets/{RuntimeSetupDialog-DPU4QIY9.js → RuntimeSetupDialog-CEUC7GrY.js} +1 -1
  66. package/dist/client/assets/{SeenDevices-CDSHTsL7.js → SeenDevices-CxhuIRp3.js} +2 -2
  67. package/dist/client/assets/{SessionsPage-Crh3D3Jj.js → SessionsPage-l6_Qc7hz.js} +1 -1
  68. package/dist/client/assets/{SettingsDialog-D0Oh-ku1.js → SettingsDialog-GEK8nhI8.js} +4 -4
  69. package/dist/client/assets/{SkillsPage-BPexZwnJ.js → SkillsPage-PlVj6VdA.js} +1 -1
  70. package/dist/client/assets/{TaskDialogWrapper-D6RB8E59.js → TaskDialogWrapper-TspfYk9J.js} +1 -1
  71. package/dist/client/assets/{TasksEmptyState-Di3SbhJM.js → TasksEmptyState-DsHh0blU.js} +2 -2
  72. package/dist/client/assets/{TasksPage-CDLsY1Ww.js → TasksPage-Va0dvkif.js} +1 -1
  73. package/dist/client/assets/{TeamComputerEntry-B_q-oVSs.js → TeamComputerEntry-C6juiObF.js} +1 -1
  74. package/dist/client/assets/{ToolsPage-gvIVTnwf.js → ToolsPage-C0ESG42C.js} +2 -2
  75. package/dist/client/assets/{TopologyGraph-Bp8aL_qw.js → TopologyGraph-M24Edx-I.js} +3 -3
  76. package/dist/client/assets/TourHost-CcN4uCDR.js +1 -0
  77. package/dist/client/assets/{UnlinkDialog-Ddd1Yxfk.js → UnlinkDialog-DlD1cmRZ.js} +1 -1
  78. package/dist/client/assets/{UnreadDivider-LL4_YtF0.js → UnreadDivider-DPD9MQ8-.js} +1 -1
  79. package/dist/client/assets/{WidgetErrorCard-BA3P7hNv.js → WidgetErrorCard-Bte2obmw.js} +3 -3
  80. package/dist/client/assets/{WithheldExtensionsNotice-quqWNbus.js → WithheldExtensionsNotice-CZibLuKA.js} +1 -1
  81. package/dist/client/assets/{WorkView-C_h8sclU.js → WorkView-PsLjURld.js} +15 -15
  82. package/dist/client/assets/{_shell-D9q8zLfr.js → _shell-Ce_cSF7V.js} +2 -2
  83. package/dist/client/assets/{_shell._home-CrTxBB3h.js → _shell._home-DcZcTXu8.js} +1 -1
  84. package/dist/client/assets/{_shell._home.activity-2M0BJkbQ.js → _shell._home.activity-BXw8iSC4.js} +1 -1
  85. package/dist/client/assets/_shell._home.index-BleaCq_y.js +3 -0
  86. package/dist/client/assets/{_shell._home.tasks-Dfrqv2nl.js → _shell._home.tasks-gdbnkq3-.js} +1 -1
  87. package/dist/client/assets/{_shell._home.workspaces-DPLQXDdH.js → _shell._home.workspaces-BCwJX783.js} +1 -1
  88. package/dist/client/assets/{_shell.channels-CJqfUTZ1.js → _shell.channels-D-lMqbSA.js} +1 -1
  89. package/dist/client/assets/_shell.connections-BFmTpceq.js +1 -0
  90. package/dist/client/assets/{_shell.feedback-requests-BeWCqScf.js → _shell.feedback-requests-NKpm6Uhu.js} +1 -1
  91. package/dist/client/assets/_shell.marketplace-DB7NSxDU.js +1 -0
  92. package/dist/client/assets/_shell.marketplace_.sources-WU9ILkRM.js +1 -0
  93. package/dist/client/assets/_shell.session-CchZWYRA.js +1 -0
  94. package/dist/client/assets/{_shell.team-EPvcS7RS.js → _shell.team-DcCRbdAb.js} +4 -4
  95. package/dist/client/assets/{_shell.threads-NJDzq9dv.js → _shell.threads-BLy6Cgqk.js} +1 -1
  96. package/dist/client/assets/_shell.x._extensionId-CVW0g7Rb.js +1 -0
  97. package/dist/client/assets/_shell.x._extensionId_._-CVW0g7Rb.js +1 -0
  98. package/dist/client/assets/{abnfDiagram-WEYOIA3C-DUHshdrR.js → abnfDiagram-WEYOIA3C-DpkXbw1_.js} +1 -1
  99. package/dist/client/assets/{access-copy-DHfPjN3G.js → access-copy-Y2_F9uAx.js} +1 -1
  100. package/dist/client/assets/{arc-sP6zNsGB.js → arc-B3bZAGvi.js} +1 -1
  101. package/dist/client/assets/{architectureDiagram-ZHVYKT53-C8PTjsPx.js → architectureDiagram-ZHVYKT53-BKR1sFvp.js} +1 -1
  102. package/dist/client/assets/{banner-CVrzHqOT.js → banner-CqhUGJmy.js} +2 -2
  103. package/dist/client/assets/{blockDiagram-RJAE7QA3-Cydde2fz.js → blockDiagram-RJAE7QA3-C2I50BMQ.js} +1 -1
  104. package/dist/client/assets/{c4Diagram-XDPPPE54-DbM6KAK7.js → c4Diagram-XDPPPE54-dhHi_wUH.js} +1 -1
  105. package/dist/client/assets/{card-DA_Z-FYX.js → card-CM7-_8nD.js} +1 -1
  106. package/dist/client/assets/channel-NlrM9BR7.js +1 -0
  107. package/dist/client/assets/{chunk-2E7WHVMD-CEbspaNh.js → chunk-2E7WHVMD-B0B27SHJ.js} +1 -1
  108. package/dist/client/assets/{chunk-2Q5K7J3B-DDP1SiE0.js → chunk-2Q5K7J3B-dsUDjsr2.js} +1 -1
  109. package/dist/client/assets/{chunk-4EMNKR2T-BFjozJqd.js → chunk-4EMNKR2T-C3IdUlS9.js} +1 -1
  110. package/dist/client/assets/{chunk-55XCU76K-0JSp6acZ.js → chunk-55XCU76K-D6qgX8rY.js} +1 -1
  111. package/dist/client/assets/{chunk-5VM5RSS4-DswTXnmp.js → chunk-5VM5RSS4-CWhRZZS1.js} +1 -1
  112. package/dist/client/assets/{chunk-JWPE2WC7-D0PYncYV.js → chunk-JWPE2WC7-Bd3RyNB2.js} +1 -1
  113. package/dist/client/assets/{chunk-VQ5W62QI-r5T-ZVBs.js → chunk-VQ5W62QI-HqUjzAO7.js} +1 -1
  114. package/dist/client/assets/{chunk-XXDRQBXY-D8kkjktE.js → chunk-XXDRQBXY-CfeGRauy.js} +1 -1
  115. package/dist/client/assets/{chunk-ZCHMQSOR-D6XtRzln.js → chunk-ZCHMQSOR-D30UE34C.js} +2 -2
  116. package/dist/client/assets/{classDiagram-v2-4MYWR3UA-DUPDMGfm.js → classDiagram-v2-4MYWR3UA-ClIZEeNx.js} +1 -1
  117. package/dist/client/assets/{command-BvXBgZfv.js → command-DuhX52Bi.js} +1 -1
  118. package/dist/client/assets/{cose-bilkent-JH36ORCC-tiQpE-Q8.js → cose-bilkent-JH36ORCC-C_MZbmxw.js} +1 -1
  119. package/dist/client/assets/{cpu-mx7zDf7k.js → cpu-BMUMZCWW.js} +1 -1
  120. package/dist/client/assets/{cynefin-EF2NZ3EQ-BjAUxFfb.js → cynefin-EF2NZ3EQ-DjzC1gsw.js} +1 -1
  121. package/dist/client/assets/{cynefinDiagram-WF24UDRP-PmlyltXR.js → cynefinDiagram-WF24UDRP-Dnu1pf_9.js} +1 -1
  122. package/dist/client/assets/{dagre-NK4GIZVX-DDePjPkn.js → dagre-NK4GIZVX-Bruwoqfg.js} +1 -1
  123. package/dist/client/assets/{diagram-CBK3MWTC-D7N3T4Fx.js → diagram-CBK3MWTC-Co7nk3xQ.js} +1 -1
  124. package/dist/client/assets/{diagram-I5XIIV2D-BfZHSbR2.js → diagram-I5XIIV2D-CDJY0Snc.js} +1 -1
  125. package/dist/client/assets/{diagram-ODIL2UCW-sXAa9bzN.js → diagram-ODIL2UCW-CF0utpvI.js} +1 -1
  126. package/dist/client/assets/{diagram-PFBEJUXE-Dfd_61WO.js → diagram-PFBEJUXE-BrLRX5Ip.js} +1 -1
  127. package/dist/client/assets/{diagram-RJA3I4VV-BCzdEfnM.js → diagram-RJA3I4VV-BOo6-thr.js} +1 -1
  128. package/dist/client/assets/{diagram-TYUNFSNR-BMqtz6sZ.js → diagram-TYUNFSNR-B-206XZy.js} +1 -1
  129. package/dist/client/assets/{ebnfDiagram-V4P3TTPT-CyWj1615.js → ebnfDiagram-V4P3TTPT-C6SZjvSQ.js} +1 -1
  130. package/dist/client/assets/{elk-QONTBCTQ-BkQMBXse.js → elk-QONTBCTQ-B_QHOQ8G.js} +1 -1
  131. package/dist/client/assets/{empty-state-Dv5iV4jb.js → empty-state-BzWMBBQZ.js} +1 -1
  132. package/dist/client/assets/{erDiagram-KYQIGQAA-DiPsX7uU.js → erDiagram-KYQIGQAA-BTKJgVOK.js} +1 -1
  133. package/dist/client/assets/{execution-config-Bej0Ot8e.js → execution-config-D_PgYyCI.js} +1 -1
  134. package/dist/client/assets/{file-DXbyb23e.js → file-DiYwTQdD.js} +1 -1
  135. package/dist/client/assets/{file-exclamation-point-C8XqHyzY.js → file-exclamation-point-CnQYdJiV.js} +1 -1
  136. package/dist/client/assets/{file-text-CRTgqqkn.js → file-text-DLPhIP0f.js} +1 -1
  137. package/dist/client/assets/{find-latest-widget-fence-D1i7qNny.js → find-latest-widget-fence-BYtG5PzD.js} +3 -3
  138. package/dist/client/assets/{flowDiagram-IUGLLWBU-BSM44aJP.js → flowDiagram-IUGLLWBU-o2In4cGl.js} +1 -1
  139. package/dist/client/assets/{form-DYSiVEri.js → form-DUFlQ-yL.js} +1 -1
  140. package/dist/client/assets/{format-cron-DYYwmo-o.js → format-cron-D5dtMPdH.js} +1 -1
  141. package/dist/client/assets/{ganttDiagram-R7GPNTJY-BWCjYexX.js → ganttDiagram-R7GPNTJY-WwrWLB2J.js} +1 -1
  142. package/dist/client/assets/{git-branch-1zYKSuur.js → git-branch-uZFa3Tmr.js} +1 -1
  143. package/dist/client/assets/{gitGraphDiagram-PDYL7XHY-ULC7Zunc.js → gitGraphDiagram-PDYL7XHY-C1yG6xrf.js} +1 -1
  144. package/dist/client/assets/{graph-BsZzo5TN.js → graph-C10tj8MW.js} +1 -1
  145. package/dist/client/assets/{heart-C4CSHUW7.js → heart--8btr31M.js} +1 -1
  146. package/dist/client/assets/{highlighted-body-KPVGNVTW-CFECg7iB.js → highlighted-body-KPVGNVTW-DGp-Vg6c.js} +1 -1
  147. package/dist/client/assets/{image-lightbox-M9t3Wulc.js → image-lightbox-BfwZy_vF.js} +1 -1
  148. package/dist/client/assets/{image-off-c01kxBAm.js → image-off-Bmtj2Xtq.js} +1 -1
  149. package/dist/client/assets/{index-BScgHCO_.js → index-8hXtJ0Xw.js} +1 -1
  150. package/dist/client/assets/{index-DG13Cp5o.js → index-B5i5B8F0.js} +1 -1
  151. package/dist/client/assets/{index-DzHj8lCz.js → index-BBaFVr5z.js} +9 -9
  152. package/dist/client/assets/{index-DIDUjTkq.js → index-BCZa5De0.js} +1 -1
  153. package/dist/client/assets/{index-BTGRc0hC.js → index-BE8yM241.js} +1 -1
  154. package/dist/client/assets/{index-XEE1k4cl.js → index-BHXG7bNX.js} +1 -1
  155. package/dist/client/assets/{index-BqwCOIbF.js → index-BJ_fl1Gy.js} +1 -1
  156. package/dist/client/assets/{index-DhoaVQXu.js → index-BbIFaQ9_.js} +1 -1
  157. package/dist/client/assets/{index-Dt7RONID.js → index-BlHuuCes.js} +1 -1
  158. package/dist/client/assets/{index-C3swXqWW.js → index-BtrV6g02.js} +1 -1
  159. package/dist/client/assets/{index-C1XazYWZ.js → index-C-tNYOVV.js} +1 -1
  160. package/dist/client/assets/{index-BYY8HEOz.js → index-C3LZBxuM.js} +1 -1
  161. package/dist/client/assets/{index-B-7P1Q9s.js → index-CO9QUYdl.js} +1 -1
  162. package/dist/client/assets/{index-BIVIHPoe.js → index-CP47qL8N.js} +1 -1
  163. package/dist/client/assets/{index-BRH6C3LJ.js → index-CYM65t4i.js} +1 -1
  164. package/dist/client/assets/{index-DhkfALZp.js → index-CaZ9yNIm.js} +1 -1
  165. package/dist/client/assets/index-CaxFHvSK.js +1 -0
  166. package/dist/client/assets/index-CdHuEKYh.js +1 -0
  167. package/dist/client/assets/{index-YXyEu3Ia.js → index-CoL3MmPh.js} +1 -1
  168. package/dist/client/assets/{index-Du4HX97h.js → index-CtN6_QCQ.js} +2 -2
  169. package/dist/client/assets/{index-JG_0k1NX.js → index-CvIKejlx.js} +1 -1
  170. package/dist/client/assets/{index-FwAvbbet.js → index-CypEgDik.js} +1 -1
  171. package/dist/client/assets/index-Cz9N1NHd.js +1 -0
  172. package/dist/client/assets/{index-CnltS8ym.js → index-D-ZRSiaH.js} +1 -1
  173. package/dist/client/assets/{index-DQTTC52E.js → index-D8ZcqMea.js} +1 -1
  174. package/dist/client/assets/{index-CAjKQnAd.js → index-D97clHqL.js} +1 -1
  175. package/dist/client/assets/index-DAaYbj1s.js +1 -0
  176. package/dist/client/assets/{index-B3xeyV6n.js → index-DI9IsN-O.js} +1 -1
  177. package/dist/client/assets/{index-DhYnXLRT.js → index-DLPkp7I9.js} +1 -1
  178. package/dist/client/assets/{index-CAAsqmfP.js → index-DMTfnznD.js} +1 -1
  179. package/dist/client/assets/{index-BSxkprTm.js → index-DZQUx5pX.js} +3 -3
  180. package/dist/client/assets/{index-B_he44rF.js → index-DamNtsio.js} +1 -1
  181. package/dist/client/assets/{index-Ce3HZQem.js → index-DenTxAiI.js} +1 -1
  182. package/dist/client/assets/{index-jLIoULQt.js → index-DmG7yphM.js} +1 -1
  183. package/dist/client/assets/{index-BnXWm8Db.js → index-Dqouol3i.js} +1 -1
  184. package/dist/client/assets/{index-DsasLE1l.js → index-Dsj1fDYU.js} +1 -1
  185. package/dist/client/assets/{index-Br35Gqfz.js → index-E5KPj_ZX.js} +1 -1
  186. package/dist/client/assets/{index-DrENuQdJ.js → index-LGTvsZzp.js} +1 -1
  187. package/dist/client/assets/{index-uLbyd6YP.js → index-Nr39AP-T.js} +1 -1
  188. package/dist/client/assets/{index-DrQqkQq_.js → index-YrSNUw95.js} +1 -1
  189. package/dist/client/assets/index-fge85Gub.js +1053 -0
  190. package/dist/client/assets/{index-D847rJXW.js → index-mweR5xOP.js} +1 -1
  191. package/dist/client/assets/{index-LpaxG4VS.js → index-ocZzSFoR.js} +1 -1
  192. package/dist/client/assets/{index.esm-CZ68Qd2t.js → index.esm-BEGwgVfU.js} +1 -1
  193. package/dist/client/assets/{infoDiagram-MVDRKAX5-BCjhXqIT.js → infoDiagram-MVDRKAX5-oeBcoEBA.js} +1 -1
  194. package/dist/client/assets/{inline-code-BKPMIXZR.js → inline-code-7dwi7wWG.js} +1 -1
  195. package/dist/client/assets/{ishikawaDiagram-HPEHV2GE-C9rsv2nh.js → ishikawaDiagram-HPEHV2GE-CLIGz304.js} +1 -1
  196. package/dist/client/assets/{journeyDiagram-BOSHW7O7-BRYr1XL1.js → journeyDiagram-BOSHW7O7-Cg0HlPT5.js} +1 -1
  197. package/dist/client/assets/{kanban-definition-FNSA4HC5-2ey8FXEn.js → kanban-definition-FNSA4HC5-DXaqYXhm.js} +1 -1
  198. package/dist/client/assets/{layers-DE3wjQuk.js → layers-BhECZJWp.js} +1 -1
  199. package/dist/client/assets/{lightbulb-BXJIRUdm.js → lightbulb-DjMxuZnu.js} +1 -1
  200. package/dist/client/assets/{link-2-DzWm9OxA.js → link-2-BY2WyWzK.js} +1 -1
  201. package/dist/client/assets/{list-runtime-types-BhkZkTrB.js → list-runtime-types-hMouIGtG.js} +1 -1
  202. package/dist/client/assets/{markdown-content-Bk9lCksw.js → markdown-content-DV3AiG76.js} +1 -1
  203. package/dist/client/assets/{mention-pill-os_7QQu2.js → mention-pill-Db0XBC6Z.js} +1 -1
  204. package/dist/client/assets/{mermaid.core-BcRUBvZd.js → mermaid.core-_ZqWvaFB.js} +4 -4
  205. package/dist/client/assets/{message-square-off-DuOiETNI.js → message-square-off-w0__0O5g.js} +1 -1
  206. package/dist/client/assets/{mindmap-definition-6OY57UG3-DBhXkS2i.js → mindmap-definition-6OY57UG3-BRVkHL68.js} +1 -1
  207. package/dist/client/assets/{more-details-Bt9nlPmS.js → more-details-BUolHzrY.js} +1 -1
  208. package/dist/client/assets/{owner-notice-4ZSBxa2K.js → owner-notice-Cn5EUxgh.js} +1 -1
  209. package/dist/client/assets/{package-BmOMrNwc.js → package-BafFSryH.js} +1 -1
  210. package/dist/client/assets/{page-container-LomhzyuS.js → page-container-BCdJ_DsH.js} +1 -1
  211. package/dist/client/assets/{pane-resize-handle-BOtzx5Q4.js → pane-resize-handle-Bar-FdkY.js} +1 -1
  212. package/dist/client/assets/{paperclip-C1tkiT74.js → paperclip-DY4e-IlK.js} +1 -1
  213. package/dist/client/assets/{path-input-JHTlL97W.js → path-input-SZl4NGTs.js} +1 -1
  214. package/dist/client/assets/{pegDiagram-ECIUJNBX-B01fb3t0.js → pegDiagram-ECIUJNBX-D9J7XmXK.js} +1 -1
  215. package/dist/client/assets/{pieDiagram-GNMPY74T-BJ7JYrTk.js → pieDiagram-GNMPY74T-myMGqtsR.js} +1 -1
  216. package/dist/client/assets/{plug-CsqfQsYq.js → plug-BdWCGVJg.js} +1 -1
  217. package/dist/client/assets/primer-trigger-r8N0YY5e.js +3 -0
  218. package/dist/client/assets/{profile-errors-CpvSy5wY.js → profile-errors-DymWFWiP.js} +1 -1
  219. package/dist/client/assets/{progress-qB87L0zJ.js → progress-es667_cM.js} +1 -1
  220. package/dist/client/assets/{quadrantDiagram-D57K4MC3-mJYGGmOV.js → quadrantDiagram-D57K4MC3-D5_2lcqK.js} +1 -1
  221. package/dist/client/assets/{query-error-state-MyJ1ivia.js → query-error-state-BNPduDBN.js} +1 -1
  222. package/dist/client/assets/{radio-DJV7l0fv.js → radio-DpWUX1KL.js} +1 -1
  223. package/dist/client/assets/{railroadDiagram-Y72NRBL7-BlXWwQe2.js → railroadDiagram-Y72NRBL7-D15ELhSC.js} +1 -1
  224. package/dist/client/assets/{registry-tJrGs7kB.js → registry-5Qudcjd5.js} +4 -4
  225. package/dist/client/assets/registry-DvKu39S1.js +1 -0
  226. package/dist/client/assets/relay-trace-schemas-DURazPP9.js +6 -0
  227. package/dist/client/assets/{repeat-CBnopqBr.js → repeat-HOHWZc6L.js} +1 -1
  228. package/dist/client/assets/{requirementDiagram-EQYSW5RA-Dqr1Y74x.js → requirementDiagram-EQYSW5RA-CHcEVlsR.js} +1 -1
  229. package/dist/client/assets/{room-files-source-BFo0FEUP.js → room-files-source-BO3E2ed0.js} +1 -1
  230. package/dist/client/assets/{rotate-ccw-clock-D9XRHj5E.js → rotate-ccw-clock-Dniulnw5.js} +1 -1
  231. package/dist/client/assets/{rotate-cw-DNa7ENG3.js → rotate-cw-um9OzAM7.js} +1 -1
  232. package/dist/client/assets/{sankeyDiagram-SY24JHO5-DGYZs_kW.js → sankeyDiagram-SY24JHO5-_R5087R3.js} +1 -1
  233. package/dist/client/assets/{scroll-area-Bf6IGziJ.js → scroll-area-MdXbnM77.js} +1 -1
  234. package/dist/client/assets/search-x-CHNgYj0F.js +6 -0
  235. package/dist/client/assets/{sequenceDiagram-BLEHNHQU-BW3u4L9y.js → sequenceDiagram-BLEHNHQU-BzHmSHMF.js} +1 -1
  236. package/dist/client/assets/{shield-x-WGxwrtNV.js → shield-x-CDXAW9YF.js} +1 -1
  237. package/dist/client/assets/{signed-in-eV4_EXuv.js → signed-in-JAMHtSjx.js} +1 -1
  238. package/dist/client/assets/{sizeCapture-INFHLROL-C1TpueOu.js → sizeCapture-INFHLROL-CqA3cZcy.js} +1 -1
  239. package/dist/client/assets/{soul-file-e1iYX9IV.js → soul-file-BcaDvIdL.js} +1 -1
  240. package/dist/client/assets/{stateDiagram-v2-A6IESKWZ-DvrHUauN.js → stateDiagram-v2-A6IESKWZ-RAA8YyBW.js} +1 -1
  241. package/dist/client/assets/{swimlanes-B3ENRKFQ-BUbTcoId.js → swimlanes-B3ENRKFQ-BQvgJIcj.js} +1 -1
  242. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-iDgTYazX.js +8 -0
  243. package/dist/client/assets/{table-DsxLk3Gx.js → table-BcJvj9rx.js} +1 -1
  244. package/dist/client/assets/{timeline-definition-JXYKGLGB-CzbVpGxn.js → timeline-definition-JXYKGLGB-DXi0saeN.js} +1 -1
  245. package/dist/client/assets/{trust-posture-Blofy7eE.js → trust-posture-vH4plBRD.js} +1 -1
  246. package/dist/client/assets/{unplug-B6dUhqA7.js → unplug-CK2bPGpg.js} +1 -1
  247. package/dist/client/assets/untrusted-text-BDygHCRk.js +1 -0
  248. package/dist/client/assets/{unverified-catalog-notice-6pwZtIjx.js → unverified-catalog-notice-WMkPDdUp.js} +1 -1
  249. package/dist/client/assets/{use-bindings-BgXZ0D7k.js → use-bindings-h_mG9d64.js} +1 -1
  250. package/dist/client/assets/{use-composer-prefs--zO2mm_M.js → use-composer-prefs-DhCnTsrF.js} +1 -1
  251. package/dist/client/assets/{use-connector-management-9Q7wHb06.js → use-connector-management-CXVz2xe3.js} +1 -1
  252. package/dist/client/assets/{use-deep-link-scroll-CXqwdwGr.js → use-deep-link-scroll-DYOZ5k0G.js} +1 -1
  253. package/dist/client/assets/{use-delete-binding-BBQNMtUY.js → use-delete-binding-CHAeTC_Q.js} +1 -1
  254. package/dist/client/assets/{use-dev-links-C643CCcq.js → use-dev-links-CM2NIeqy.js} +1 -1
  255. package/dist/client/assets/{use-direct-message-panel-BD_daG2E.js → use-direct-message-panel-DXTH05Ym.js} +1 -1
  256. package/dist/client/assets/use-external-adapter-catalog-DKlBkkvF.js +1 -0
  257. package/dist/client/assets/use-full-activity-feed-QZAZ5vBJ.js +1 -0
  258. package/dist/client/assets/use-is-below-desktop-DS51QTwj.js +1 -0
  259. package/dist/client/assets/{use-local-browser-P93oA-F5.js → use-local-browser-43FpcgCM.js} +1 -1
  260. package/dist/client/assets/{use-mesh-topology-B0k0gLoW.js → use-mesh-topology-Bw7MmKA9.js} +1 -1
  261. package/dist/client/assets/{use-mounted-ref-DE7EQsBF.js → use-mounted-ref-Cuui7-gf.js} +1 -1
  262. package/dist/client/assets/{use-notification-prefs-B8JtshQ0.js → use-notification-prefs-CJnF55Rv.js} +1 -1
  263. package/dist/client/assets/use-pending-read-DB25CO5E.js +1 -0
  264. package/dist/client/assets/{use-personality-commit-Dh5Sejj_.js → use-personality-commit-p6Of1UxX.js} +1 -1
  265. package/dist/client/assets/{use-promo-activation-C9FWA7ru.js → use-promo-activation-CxG-kZJQ.js} +3 -3
  266. package/dist/client/assets/{use-promo-dismissals-BIfafj9f.js → use-promo-dismissals-DeNbRWOh.js} +1 -1
  267. package/dist/client/assets/{use-pulse-freshness-CxzVMmVK.js → use-pulse-freshness-CdRkKThf.js} +1 -1
  268. package/dist/client/assets/{use-room-follow-claim-B1QPFaUb.js → use-room-follow-claim-_B7HonZx.js} +1 -1
  269. package/dist/client/assets/{use-room-sessions-CdjzO67_.js → use-room-sessions-CrFskgCJ.js} +1 -1
  270. package/dist/client/assets/{use-roving-tab-list-Nu-MIapD.js → use-roving-tab-list-DSjW4_wm.js} +1 -1
  271. package/dist/client/assets/use-session-canvas-KguPfnsc.js +27 -0
  272. package/dist/client/assets/{use-status-budget-DgeTxC3h.js → use-status-budget-CTereFSr.js} +3 -3
  273. package/dist/client/assets/{use-transform-CiJqtMBf.js → use-transform-YUDqOhoc.js} +1 -1
  274. package/dist/client/assets/{use-unclaimed-chats-Blkq6U4D.js → use-unclaimed-chats-B9ChucvA.js} +1 -1
  275. package/dist/client/assets/use-update-config-BH0agtZh.js +1 -0
  276. package/dist/client/assets/{useMutationState-lbcdmnfE.js → useMutationState-TJGtJT5R.js} +1 -1
  277. package/dist/client/assets/{usecaseDiagram-WPOLBNNX-BM36oESm.js → usecaseDiagram-WPOLBNNX-Cjs1EpVL.js} +1 -1
  278. package/dist/client/assets/{vennDiagram-Q3Y3IDCW-Zrybcs91.js → vennDiagram-Q3Y3IDCW-BtgH-ZyN.js} +1 -1
  279. package/dist/client/assets/{wardleyDiagram-IVAIDKWA-CO4pzGG0.js → wardleyDiagram-IVAIDKWA-BCWHQ18G.js} +1 -1
  280. package/dist/client/assets/{xychartDiagram-4URNHDU4-pi_wF1CM.js → xychartDiagram-4URNHDU4-CUBPWq_V.js} +1 -1
  281. package/dist/client/index.html +1 -1
  282. package/dist/server/index.js +7695 -5486
  283. package/dist/server/index.js.map +2 -2
  284. package/package.json +5 -5
  285. package/dist/client/assets/AdapterSetupWizard-CwKYl1vG.js +0 -2
  286. package/dist/client/assets/BindingDialog-CpBZoSZU.js +0 -1
  287. package/dist/client/assets/HandlePage-BjlcYr_l.js +0 -1
  288. package/dist/client/assets/NamePage-A8X09lY7.js +0 -1
  289. package/dist/client/assets/PhotoPage-DP5WoeFd.js +0 -1
  290. package/dist/client/assets/TourHost-Cg8EHvod.js +0 -1
  291. package/dist/client/assets/_shell._home.index-BTJhhEWN.js +0 -3
  292. package/dist/client/assets/_shell.connections-Cpe1hru3.js +0 -1
  293. package/dist/client/assets/_shell.marketplace-CzLqm8iR.js +0 -1
  294. package/dist/client/assets/_shell.marketplace_.sources-DtraxnMx.js +0 -1
  295. package/dist/client/assets/_shell.session-72JEfodU.js +0 -1
  296. package/dist/client/assets/_shell.x._extensionId-CcJi8pKR.js +0 -1
  297. package/dist/client/assets/_shell.x._extensionId_._-CcJi8pKR.js +0 -1
  298. package/dist/client/assets/channel-DMgpNBDz.js +0 -1
  299. package/dist/client/assets/index-B6Scr7KJ.js +0 -1053
  300. package/dist/client/assets/index-DyN65ufd.js +0 -1
  301. package/dist/client/assets/index-UJq1qaku.js +0 -1
  302. package/dist/client/assets/index-e6oawwKv.js +0 -1
  303. package/dist/client/assets/index-j30EyYIU.js +0 -1
  304. package/dist/client/assets/primer-trigger-DLdK7lVr.js +0 -3
  305. package/dist/client/assets/registry-BrjQCdmG.js +0 -1
  306. package/dist/client/assets/relay-trace-schemas-TH0-GYCB.js +0 -6
  307. package/dist/client/assets/search-x-DFBBEouE.js +0 -6
  308. package/dist/client/assets/swimlanesDiagram-AYQRV4AK-wkooBe_N.js +0 -8
  309. package/dist/client/assets/untrusted-text-pHjcUwfI.js +0 -1
  310. package/dist/client/assets/use-adapter-catalog-J43bUHJu.js +0 -1
  311. package/dist/client/assets/use-external-adapter-catalog-BjbC1V6t.js +0 -1
  312. package/dist/client/assets/use-full-activity-feed-DUH8r8jx.js +0 -1
  313. package/dist/client/assets/use-is-below-desktop-DAZnwJGB.js +0 -1
  314. package/dist/client/assets/use-pending-read-DeGO1wGC.js +0 -1
  315. package/dist/client/assets/use-relay-config-DQE3dmJ2.js +0 -1
  316. package/dist/client/assets/use-session-canvas-BfKGOpNy.js +0 -27
  317. package/dist/client/assets/use-update-config-BFFW_6Mc.js +0 -1
@@ -1,4 +1,4 @@
1
- var Bu=Object.defineProperty;var zu=(e,t,s)=>t in e?Bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var bn=(e,t,s)=>zu(e,typeof t!="symbol"?t+"":t,s);import{rQ as Uu,r as u,fa as Ho,rR as Ku,f8 as Yr,j as n,rS as Hu,rT as Gi,fb as Wu,k5 as Vr,a1 as ae,a2 as Ie,aI as Be,f6 as _e,fX as Rn,rU as Gs,k2 as as,rV as Gu,rW as qu,a3 as le,ap as pe,jP as Wo,rX as Yu,O as Ge,et as js,ar as se,B as L,X as Ue,G as K,js as qi,rY as Vu,x as De,a0 as Yi,bx as Vi,be as ks,dH as ze,aZ as Qu,rZ as Go,r_ as Xu,bS as Ju,aH as Qi,cu as Pe,aN as Le,s as $t,kn as Zu,ko as Xi,a7 as ce,lt as Ln,lu as jt,lv as Ji,aY as P,rr as em,eT as kt,dW as is,iV as an,r$ as tm,a4 as Wt,eG as Zi,fy as Qr,dc as Xr,au as Gt,s0 as qo,jO as nm,jT as ec,jN as sm,pG as Jr,jr as Fn,J as cn,iq as Zr,es as nn,l as je,aJ as tc,eQ as nc,ea as sc,eb as rc,eR as rm,s1 as om,ef as it,bz as ln,bA as dn,U as qt,bB as un,bD as mn,C as hn,eo as We,ep as am,mL as oc,l4 as ac,aP as Ke,s2 as im,gM as ic,bT as Yo,s3 as cm,g as cs,k1 as vr,z as eo,e4 as lt,hI as rt,gd as to,fD as Ss,kg as no,f as At,b9 as cc,eF as Cs,s4 as lc,em as lm,am as so,_ as Tn,dl as fn,dm as pn,dn as gn,ak as $e,aq as Ns,nF as dc,s5 as dm,s6 as um,c$ as mm,dV as ls,by as Xe,ku as As,kt as en,d2 as xt,d3 as bt,d5 as ht,d6 as tt,d7 as ft,eD as St,dO as tn,dM as hm,co as $n,ez as uc,s7 as fm,cm as mc,gv as hc,h6 as Vo,s8 as pm,ic as ds,kc as gm,ke as xm,h4 as fc,s9 as bm,g1 as Es,g2 as Is,g4 as Rs,sa as pc,g5 as Qe,sb as Bn,g7 as es,h as ro,sc as oo,sd as ym,g3 as vm,qE as wm,se as gc,jE as jm,sf as km,sg as Sm,sh as Cm,hn as xc,si as Nm,sj as Am,iU as Em,sk as Im,sl as Rm,ax as Tm,gm as bc,ad as Fe,hl as Ts,sm as Dm,sn as Om,gn as Mm,rK as Qo,i1 as _m,mJ as Pm,i3 as Lm,i4 as Fm,i5 as $m,jh as yc,so as Bm,sp as me,sq as zm,sr as vc,ss as ao,st as wr,su as wc,sv as io,sw as co,b8 as zn,sx as Ds,sy as Um,sz as Km,sA as Hm,sB as Wm,sC as Gm,sD as qm,sE as Ym,sF as Tt,k3 as Vm,jx as Qm,oe as Xm,sG as Xo,bd as Jm,hU as jc,sH as Bt,sI as sn,sJ as Zm,sK as eh,sL as th,sM as nh,fC as kc,c6 as Dt,sN as Sc,sO as us,sP as Cc,sQ as sh,sR as rh,sS as Nc,sT as Ac,sU as oh,sV as ah,i6 as Ec,i7 as Ic,sW as zt,sX as ih,sY as ch,ev as lh,sZ as Dn,s_ as dh,a$ as Rc,s$ as uh,t0 as mh,t1 as hh,t2 as fh,t3 as ph,t4 as Tc,t5 as Ot,fB as Ct,fJ as ct,fH as Un,fI as he,fM as Kn,fL as _t,fP as xe,I as gt,p1 as Dc,pb as Oc,n8 as Ut,n7 as rn,cq as Os,kY as gh,n6 as Mc,eU as _c,rB as Pc,om as xh,n5 as bh,t6 as yh,t7 as Jo,t8 as vh,t9 as on,ta as Lc,b_ as Ms,id as Fc,tb as wh,pZ as jh,tc as kh,td as $c,te as Sh,tf as Ch,gw as Nh,a_ as lo,n9 as uo,tg as Ah,gp as _s,th as Sn,ti as mo,q as ms,ly as Bc,tj as Eh,o as zc,tk as Ih,kp as Zo,md as Rh,oE as Th,tl as Dh,cc as Oh,tm as Mh,aj as ho,ai as fo,ng as Uc,nf as Kc,tn as _h,dF as Ps,kJ as Hc,to as Ph,tp as Lh,tq as Fh,tr as $h,ts as Bh,tt as zh,tu as Uh,hh as po,pF as Kh,tv as Wc,nI as Hh,l2 as jr,e6 as Wh,tw as Ls,nb as Fs,tx as $s,ty as Gh,na as qh,ij as go,nc as Gc,tz as Yh,qy as Vh,tA as Qh,tB as Xh,tC as ea,tD as Jh,tE as Zh,tF as ef,tG as tf,tH as ta,tI as nf,tJ as sf,tK as rf,tL as of,tM as na,e as Pt,tN as af,tO as cf,l0 as Bs,lK as qc,tP as lf,gr as Yc,lF as df,lR as uf,tQ as mf,b6 as hf,jF as ff,tR as pf,tS as hs,l_ as Vc,tT as Qc,tU as gf,tV as xf,tW as Xc,tX as sa,tY as ra,tZ as Jc,b5 as bf,t_ as yf,t$ as Zc,u0 as qn,u1 as vf,u2 as wf,u3 as jf,u4 as el,go as zs,u5 as kr,u6 as kf,cD as yn,H as tl,aV as Sf,u7 as nl,eS as oa,ki as xo,bj as Cf,t as Nf,iv as Sr,i0 as Af,aQ as bo,ia as sl,u8 as Ef,m4 as If,m5 as Rf,p5 as Tf,k$ as Df,u9 as Of,l1 as aa,lS as rl,bJ as Mf,bK as _f,bL as Pf,bM as Lf,bN as Ff,bO as $f,bP as Bf,ua as zf,ub as Cr,uc as Uf,ud as qs,ue as Kf,uf as Hf,ug as On,uh as Wf,ui as ia,mN as Gf,lL as qf,uj as Yf,k6 as Vf,k7 as Qf,ba as fs,k8 as Xf,k9 as ca,mm as la,mk as Jf,ml as da,uk as Zf,lZ as ep,ul as tp,um as np,ff as sp,un as rp,uo as op,up as ap,c1 as ip,uq as cp,ur as ol,us as al,Q as yo,T as vo,V as wo,ut as lp,uu as dp,bX as up,f$ as mp,uv as Ys,ha as hp,uw as fp,ux as pp,uy as gp,uz as xp,uA as bp,uB as yp,uC as vp,uD as wp,uE as jp,uF as ua,jD as kp,bW as Sp,uG as il,uH as Cp,fE as Np,uI as ma,h$ as Ap,uJ as Ep,uK as Ip,p6 as Rp,uL as Tp,uM as Dp,cl as Op,uN as Mp,uO as ha,uP as _p,uQ as Pp,p0 as Lp,pj as Fp,jX as $p,ed as Bp,uR as zp,a9 as cl,uS as Up,jR as Kp,jS as Hp,kK as Wp,fl as ll,fm as dl,fn as ul,fo as ml,dI as Gp,er as qp,fj as Yp,fk as Vp,j5 as Qp,jc as Xp,kO as Jp,j6 as Zp,uT as eg,ex as tg,kP as ng,uU as hl,uV as sg,uW as rg,kN as og,kM as ag,j7 as ig,eA as cg,k0 as lg,iY as dg,uX as ug,uY as fl,uZ as Us,bi as pl,$ as gl,u_ as xl,pI as mg,bg as hg,bh as fg,eX as fa,bf as pg,gO as Vs,gW as Qs,eq as gg,u$ as jo,n as xg,aS as pa,p4 as bg,bC as bl,v0 as yl,v1 as vl,pT as yg,v2 as vg,v3 as wg,v4 as Zt,dt as jg,v5 as ga,nn as kg,np as wl,dN as Sg,jM as Cg,oD as Ng,v6 as Nr,g0 as Ag,iu as Eg,nA as ut,nC as Ig,rq as Rg,o8 as xa,cW as Tg,v7 as Dg,v8 as Og,v9 as Mg,va as _g,vb as Pg,vc as Lg,vd as Fg,ve as $g,vf as Bg,rP as zg,kD as Ug,h8 as Kg,vg as Hg,vh as Wg,vi as Gg,vj as qg,vk as Yg,vl as Vg,cx as Qg,vm as Xg,vn as Jg,jg as Zg,db as ex}from"./index-B6Scr7KJ.js";import{u as tx,g as nx}from"./use-connector-management-9Q7wHb06.js";import{D as Nt,a as sx}from"./TourHost-Cg8EHvod.js";import{r as rx,f as ox,b as ax,K as ix}from"./RuntimeConnectFlow-D3H5Fpkc.js";import{O as cx,B as jl}from"./banner-CVrzHqOT.js";import{u as Ks,P as kl,a as lx}from"./ProfileRolePicker-BfciiNpr.js";import{u as dx}from"./use-dev-links-C643CCcq.js";import{B as ux,u as mx}from"./use-bindings-BgXZ0D7k.js";import{C as ko,o as Sl,O as Cl,p as at,H as hx,q as wt,I as nt,t as ps,s as Hn,v as Nl,x as fx,y as Al,z as px,u as El,r as gx,w as xx,b as bx,j as yx,D as Ar,A as vx,T as wx,a as jx,P as kx,B as Sx,e as Il,E as Rl,F as Tl,G as Cx,J as Nx,h as Ax,S as ba,n as Ex,L as Ix}from"./SeenDevices-CDSHTsL7.js";import{d as Rx}from"./untrusted-text-pHjcUwfI.js";import{S as Nn}from"./scroll-area-Bf6IGziJ.js";import{T as Dl,a as Ol,b as ts,c as Xs,u as Tx,i as Dx,d as Ox,P as Ml}from"./PreviewRefusedNotice-hlYrFDQM.js";import{P as Mx}from"./paperclip-C1tkiT74.js";import{L as _x}from"./lightbulb-BXJIRUdm.js";import{u as Wn}from"./use-update-config-BFFW_6Mc.js";import{a as Px,u as Lx,S as Fx,s as $x,b as Bx,P as zx}from"./ApplyToOverridesDialog-Ct1W283T.js";import{r as _l,s as ya,e as Ux}from"./access-copy-DHfPjN3G.js";import{t as Kx,I as va}from"./trust-posture-Blofy7eE.js";import{a as Hx}from"./use-pulse-freshness-CxzVMmVK.js";import{c as Wx,B as Gx,w as qx,b as Yx,a as Vx,e as Qx}from"./primer-trigger-DLdK7lVr.js";import{M as Xx,u as Jx,s as Zx,P as eb,a as tb}from"./use-promo-activation-C9FWA7ru.js";import{u as Pl}from"./use-promo-dismissals-BIfafj9f.js";import{u as Ll}from"./use-pending-read-DeGO1wGC.js";import{a as pt}from"./dorkbot-templates-8Yu9POWJ.js";import{i as nb,O as Fl,c as sb,b as rb}from"./OperatorIdentityForm-Cu0h8Xqy.js";import{A as $l}from"./repeat-CBnopqBr.js";import{S as Bl,P as ob}from"./progress-qB87L0zJ.js";import{P as ab,M as ib}from"./plug-CsqfQsYq.js";import{i as So,a as cb,u as lb}from"./use-notification-prefs-B8JtshQ0.js";import{R as db}from"./rotate-cw-DNa7ENG3.js";import{b as ub,u as mb,O as hb,c as fb}from"./OpenMeshSwitch-DPmTA9eg.js";import{u as pb,a as gb,C as xb,N as bb}from"./NewDirectMessageMenu-C8t7x-sB.js";import{P as yb,C as vb,f as wb,a as jb}from"./find-latest-widget-fence-D1i7qNny.js";import{o as kb}from"./owner-notice-4ZSBxa2K.js";import{a as zl,C as Sb}from"./cpu-mx7zDf7k.js";import{U as Cb}from"./unplug-B6dUhqA7.js";import{c as Nb,H as Ul,a as Kl,b as Hl}from"./RuntimeSetupDialog-DPU4QIY9.js";import{a as Ab,u as Eb,F as Ib}from"./ForwardConsentHost-CLIHtWwq.js";import{P as wa}from"./page-container-LomhzyuS.js";import{A as Rb}from"./AttentionSignalRow-B7gezgzA.js";import{u as Tb}from"./use-roving-tab-list-Nu-MIapD.js";import{R as Wl}from"./rotate-ccw-clock-D9XRHj5E.js";import{d as et,e as Ce,f as ja,g as Gl,C as ql,a as Yl,b as Vl,c as Db}from"./command-BvXBgZfv.js";import{A as Ob,M as Mb}from"./McpAppFrame-4JDJsrmg.js";import{L as _b}from"./layers-DE3wjQuk.js";import{A as Pb}from"./AgentOptionRow-0VdNzXCF.js";import{R as Lb}from"./radio-DJV7l0fv.js";import{a as Fb}from"./sound-D3r8dGFH.js";import{d as $b}from"./connection-copy--MA7AN04.js";import{P as Bb}from"./path-input-JHTlL97W.js";import"./WidgetErrorCard-BA3P7hNv.js";import{a as zb}from"./ComputerResourceView-BZ9BxgOi.js";import{P as Ub,u as Kb}from"./pane-resize-handle-BOtzx5Q4.js";import{u as Ql}from"./use-is-below-desktop-DAZnwJGB.js";import{W as Hb}from"./WithheldExtensionsNotice-quqWNbus.js";import{u as Wb}from"./use-direct-message-panel-BD_daG2E.js";import{u as Gb}from"./ComputerViewer-CbuU9tXK.js";import{a as qb}from"./use-local-browser-P93oA-F5.js";import{F as Yb}from"./file-text-CRTgqqkn.js";import"./use-relay-config-DQE3dmJ2.js";import"./use-external-adapter-catalog-BjbC1V6t.js";import"./use-adapter-catalog-J43bUHJu.js";import"./inline-code-BKPMIXZR.js";import"./useMutationState-lbcdmnfE.js";import"./runtime-connect-Dn0T5YWv.js";import"./execution-config-Bej0Ot8e.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./shield-x-WGxwrtNV.js";import"./use-full-activity-feed-DUH8r8jx.js";import"./profile-errors-CpvSy5wY.js";import"./use-mounted-ref-DE7EQsBF.js";import"./ProfileFields-x-x8vgNo.js";import"./use-mesh-topology-B0k0gLoW.js";import"./card-DA_Z-FYX.js";import"./list-runtime-types-BhkZkTrB.js";import"./more-details-Bt9nlPmS.js";import"./index-B3xeyV6n.js";import"./markdown-content-Bk9lCksw.js";import"./table-DsxLk3Gx.js";import"./package-BmOMrNwc.js";import"./heart-C4CSHUW7.js";import"./git-branch-1zYKSuur.js";import"./file-DXbyb23e.js";function Vb({children:e,isValidProp:t,...s}){t&&Uu(t);const r=u.useContext(Ho);s={...r,...s},s.transition=Ku(s.transition,r.transition),s.isStatic=Yr(()=>s.isStatic);const o=u.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion,s.skipAnimations]);return n.jsx(Ho.Provider,{value:o,children:e})}function Qb(e){e.values.forEach(t=>t.stop())}function Er(e,t){[...t].reverse().forEach(r=>{const o=e.getVariant(r);o&&Gi(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{Er(a,t)})})}function Xb(e,t){if(Array.isArray(t))return Er(e,t);if(typeof t=="string")return Er(e,[t]);Gi(e,t)}function Jb(){const e=new Set,t={subscribe(s){return e.add(s),()=>void e.delete(s)},start(s,r){const o=[];return e.forEach(a=>{o.push(Hu(a,s,{transitionOverride:r}))}),Promise.all(o)},set(s){return e.forEach(r=>{Xb(r,s)})},stop(){e.forEach(s=>{Qb(s)})},mount(){return()=>{t.stop()}}};return t}function Zb(){const e=Yr(Jb);return Wu(e.mount,[]),e}class ey{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,s){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,s)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const ty=()=>new ey;function ny(){return Yr(ty)}const sy=`${Vr.repo}/issues/new`,ry={"tunnel.enabled":"boolean","tasks.enabled":"boolean","relay.enabled":"boolean","scheduler.enabled":"boolean","mesh.enabled":"boolean","mcp.enabled":"boolean","telemetry.install":"boolean","telemetry.heartbeat":"boolean","telemetry.errorReporting":"boolean","auth.enabled":"boolean","workspace.enabled":"boolean","harness.autoSync":"boolean","harness.autoAdopt":"boolean","runtimes.codex.enabled":"boolean","runtimes.opencode.enabled":"boolean","runtimes.default":"enum","logging.level":"enum","ui.theme":"enum"},oy={"runtimes.default":["claude-code","codex","opencode","doe"],"logging.level":["fatal","error","warn","info","debug","trace"],"ui.theme":["light","dark","system"]},ay=/^[a-z0-9][a-z0-9._-]{0,31}$/,iy={bug:["bug"],feature:["enhancement"],runtime:["bug"]},cy={bug:"Bug: (describe what went wrong)",feature:"Feature: (describe what you want)",runtime:"Runtime issue: (describe what went wrong)"};function ly(e){return e.replace(/\b(?:sk-|pk-|rk-|ghp_|gho_|ghu_|ghs_|github_pat_|glpat-|npm_|xox[baprsc]-)[A-Za-z0-9._-]+/g,"[redacted]").replace(/\b(?:AKIA|ASIA|AGPA|AIDA|AROA|ANPA)[0-9A-Z]{16}\b/g,"[redacted]").replace(/\bBearer\s+[A-Za-z0-9._-]+/gi,"[redacted]")}function Co(e){return ly(e).replace(/[^\s/@]+@[^\s/@]+\.[^\s/@]+/g,"[email]").replace(/\b\d{1,3}(?:\.\d{1,3}){3}\b/g,"[ip]").replace(/\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{1,4}\b/g,"[ip]").replace(new RegExp("(?<![\\w:.])(?:[A-Fa-f0-9]{1,4})?(?::[A-Fa-f0-9]{0,4}){2,}(?![\\w:.])","g"),"[ip]").replace(/\\\\[^\s\\]+(?:\\[^\s\\]+)+/g,"[path]").replace(/(^|[\s"'`(<[{])\/\/[^\s"'`)>\]}/]+\/[^\s"'`)>\]}]+/g,"$1[path]").replace(/\b[A-Za-z]:\\[^\r\n]*/g,"[path]").replace(/(^|[\s"'`(<[{/:])(~|\/(?:Users|home))\/[^\s"'`)>\]}]+/g,"$1[home]").replace(/(^|[\s"'`(<[{])\/[\w.-]+(?:\/[\w.-]*)+/g,"$1[path]").replace(/\b(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{24,}\b/g,"[redacted]")}function dy(e,t){const s=oy[e];return s?s.includes(t):ay.test(t)&&Co(t)===t}function uy(e){const t={};for(const[s,r]of Object.entries(ry)){const o=e[s];o!=null&&(r==="boolean"&&typeof o=="boolean"||r==="number"&&typeof o=="number"&&Number.isFinite(o)||r==="enum"&&typeof o=="string"&&dy(s,o))&&(t[s]=o)}return t}const my=["details","summary"];function No(e){return Rx(Co(e),my)}function hy(e){const t=e.runtimes.length>0?e.runtimes.join(", "):"none configured",s=Object.entries(e.flags).map(([o,a])=>`- ${o}: ${String(a)}`).join(`
1
+ var Bu=Object.defineProperty;var zu=(e,t,s)=>t in e?Bu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:s}):e[t]=s;var bn=(e,t,s)=>zu(e,typeof t!="symbol"?t+"":t,s);import{s0 as Uu,r as u,f9 as Ho,s1 as Ku,f7 as Yr,j as n,s2 as Hu,s3 as Gi,fa as Wu,k8 as Vr,a1 as ae,a2 as Ie,aG as Be,f5 as _e,fW as Rn,s4 as Gs,k5 as as,s5 as Gu,s6 as qu,a3 as le,an as pe,jS as Wo,s7 as Yu,O as Ge,es as js,ap as se,B as L,X as Ue,G as K,jv as qi,s8 as Vu,x as De,a0 as Yi,bv as Vi,bc as ks,dG as ze,aX as Qu,s9 as Go,sa as Xu,bQ as Ju,aF as Qi,cs as Pe,aL as Le,s as $t,kq as Zu,kr as Xi,dD as ce,lw as Ln,lx as jt,ly as Ji,aW as P,rD as em,eS as kt,dV as is,iY as an,sb as tm,a4 as Wt,eF as Zi,fx as Qr,da as Xr,as as Gt,sc as qo,jR as nm,jW as ec,jQ as sm,pS as Jr,ju as Fn,J as cn,it as Zr,er as nn,l as je,aH as tc,eP as nc,e9 as sc,ea as rc,eQ as rm,sd as om,ee as it,bx as ln,by as dn,U as qt,bz as un,bB as mn,C as hn,en as We,eo as am,mP as oc,l7 as ac,aN as Ke,se as im,gM as ic,bR as Yo,sf as cm,g as cs,k4 as vr,z as eo,e3 as lt,hI as rt,gd as to,fC as Ss,kj as no,f as At,b7 as cc,eE as Cs,sg as lc,el as lm,ak as so,_ as Tn,dj as fn,dk as pn,dl as gn,ai as $e,ao as Ns,nR as dc,sh as dm,si as um,cZ as mm,dU as ls,bw as Xe,kx as As,kw as en,d0 as xt,d1 as bt,d3 as ht,d4 as tt,d5 as ft,eC as St,dN as tn,dL as hm,cm as $n,ey as uc,sj as fm,ck as mc,gv as hc,h6 as Vo,sk as pm,ig as ds,kf as gm,kh as xm,h4 as fc,sl as bm,g0 as Es,g1 as Is,g3 as Rs,sm as pc,g4 as Qe,sn as Bn,g6 as es,h as ro,so as oo,sp as ym,g2 as vm,qQ as wm,sq as gc,jH as jm,sr as km,ss as Sm,st as Cm,hn as xc,su as Nm,sv as Am,iX as Em,sw as Im,sx as Rm,av as Tm,gm as bc,ab as Fe,hl as Ts,sy as Dm,sz as Om,gn as Mm,rW as Qo,i1 as _m,mN as Pm,i3 as Lm,i4 as Fm,i5 as $m,jk as yc,sA as Bm,sB as me,sC as zm,sD as vc,sE as ao,sF as wr,sG as wc,sH as io,sI as co,b6 as zn,sJ as Ds,sK as Um,sL as Km,sM as Hm,sN as Wm,sO as Gm,sP as qm,sQ as Ym,sR as Tt,k6 as Vm,jA as Qm,oq as Xm,sS as Xo,bb as Jm,hU as jc,sT as Bt,sU as sn,sV as Zm,sW as eh,sX as th,sY as nh,fB as kc,c4 as Dt,sZ as Sc,s_ as us,s$ as Cc,t0 as sh,t1 as rh,t2 as Nc,t3 as Ac,t4 as oh,t5 as ah,i9 as Ec,ia as Ic,t6 as zt,t7 as ih,t8 as ch,eu as lh,t9 as Dn,ta as dh,aZ as Rc,tb as uh,tc as mh,td as hh,te as fh,tf as ph,tg as Tc,th as Ot,fA as Ct,fI as ct,fG as Un,fH as he,fL as Kn,fK as _t,fO as xe,I as gt,pd as Dc,pn as Oc,nk as Ut,nj as rn,co as Os,k$ as gh,ni as Mc,eT as _c,rN as Pc,oy as xh,nh as bh,ti as yh,tj as Jo,tk as vh,tl as on,tm as Lc,bY as Ms,ih as Fc,tn as wh,q9 as jh,to as kh,tp as $c,tq as Sh,tr as Ch,gw as Nh,aY as lo,nl as uo,ts as Ah,gp as _s,tt as Sn,tu as mo,q as ms,lB as Bc,tv as Eh,o as zc,tw as Ih,ks as Zo,mg as Rh,oQ as Th,tx as Dh,ca as Oh,ty as Mh,ah as ho,ag as fo,ns as Uc,nr as Kc,tz as _h,dE as Ps,kM as Hc,tA as Ph,tB as Lh,tC as Fh,tD as $h,tE as Bh,tF as zh,tG as Uh,hh as po,pR as Kh,tH as Wc,nU as Hh,l5 as jr,e5 as Wh,tI as Ls,nn as Fs,tJ as $s,tK as Gh,nm as qh,im as go,no as Gc,tL as Yh,qK as Vh,tM as Qh,tN as Xh,tO as ea,tP as Jh,tQ as Zh,tR as ef,tS as tf,tT as ta,tU as nf,tV as sf,tW as rf,tX as of,tY as na,e as Pt,tZ as af,t_ as cf,l3 as Bs,lN as qc,t$ as lf,gr as Yc,lI as df,lU as uf,u0 as mf,b4 as hf,jI as ff,u1 as pf,u2 as hs,m1 as Vc,u3 as Qc,u4 as gf,u5 as xf,u6 as Xc,u7 as sa,u8 as ra,u9 as Jc,b3 as bf,ua as yf,ub as Zc,uc as qn,ud as vf,ue as wf,uf as jf,ug as el,go as zs,uh as kr,ui as kf,cB as yn,H as tl,aT as Sf,uj as nl,eR as oa,kl as xo,bh as Cf,t as Nf,iy as Sr,i0 as Af,aO as bo,id as sl,uk as Ef,m7 as If,m8 as Rf,ph as Tf,l2 as Df,ul as Of,l4 as aa,lV as rl,bH as Mf,bI as _f,bJ as Pf,bK as Lf,bL as Ff,bM as $f,bN as Bf,um as zf,un as Cr,uo as Uf,up as qs,uq as Kf,ur as Hf,us as On,ut as Wf,uu as ia,mZ as Gf,lO as qf,uv as Yf,k9 as Vf,ka as Qf,b8 as fs,kb as Xf,kc as ca,mp as la,mn as Jf,mo as da,uw as Zf,m0 as ep,ux as tp,uy as np,fe as sp,uz as rp,uA as op,uB as ap,b$ as ip,uC as cp,uD as ol,uE as al,Q as yo,T as vo,V as wo,uF as lp,uG as dp,bV as up,f_ as mp,uH as Ys,ha as hp,uI as fp,uJ as pp,uK as gp,uL as xp,uM as bp,uN as yp,uO as vp,uP as wp,uQ as jp,uR as ua,jG as kp,bU as Sp,uS as il,uT as Cp,fD as Np,uU as ma,h$ as Ap,uV as Ep,uW as Ip,pi as Rp,uX as Tp,uY as Dp,cj as Op,uZ as Mp,u_ as ha,u$ as _p,v0 as Pp,pc as Lp,pv as Fp,j_ as $p,ec as Bp,v1 as zp,a7 as cl,v2 as Up,jU as Kp,jV as Hp,kN as Wp,fk as ll,fl as dl,fm as ul,fn as ml,dH as Gp,eq as qp,fi as Yp,fj as Vp,j8 as Qp,jf as Xp,kR as Jp,j9 as Zp,v3 as eg,ew as tg,kS as ng,v4 as hl,v5 as sg,v6 as rg,kQ as og,kP as ag,ja as ig,ez as cg,k3 as lg,i$ as dg,v7 as ug,v8 as fl,v9 as Us,bg as pl,$ as gl,va as xl,pU as mg,be as hg,bf as fg,eW as fa,bd as pg,gO as Vs,gW as Qs,ep as gg,vb as jo,n as xg,aQ as pa,pg as bg,bA as bl,vc as yl,vd as vl,q3 as yg,ve as vg,vf as wg,vg as Zt,dr as jg,vh as ga,nz as kg,nB as wl,dM as Sg,jP as Cg,oP as Ng,vi as Nr,f$ as Ag,ix as Eg,nM as ut,nO as Ig,rC as Rg,ok as xa,cU as Tg,vj as Dg,vk as Og,vl as Mg,vm as _g,vn as Pg,vo as Lg,vp as Fg,vq as $g,vr as Bg,r$ as zg,kG as Ug,h8 as Kg,vs as Hg,vt as Wg,vu as Gg,vv as qg,vw as Yg,vx as Vg,cv as Qg,vy as Xg,vz as Jg,jj as Zg,d9 as ex}from"./index-fge85Gub.js";import{u as tx,g as nx}from"./use-connector-management-CXVz2xe3.js";import{D as Nt,a as sx}from"./TourHost-CcN4uCDR.js";import{r as rx,f as ox,b as ax,K as ix}from"./RuntimeConnectFlow-B0TIITVq.js";import{O as cx,B as jl}from"./banner-CqhUGJmy.js";import{u as Ks,P as kl,a as lx}from"./ProfileRolePicker-Q_hY6ybO.js";import{u as dx}from"./use-dev-links-CM2NIeqy.js";import{B as ux,u as mx}from"./use-bindings-h_mG9d64.js";import{C as ko,o as Sl,O as Cl,p as at,H as hx,q as wt,I as nt,t as ps,s as Hn,v as Nl,x as fx,y as Al,z as px,u as El,r as gx,w as xx,b as bx,j as yx,D as Ar,A as vx,T as wx,a as jx,P as kx,B as Sx,e as Il,E as Rl,F as Tl,G as Cx,J as Nx,h as Ax,S as ba,n as Ex,L as Ix}from"./SeenDevices-CxhuIRp3.js";import{d as Rx}from"./untrusted-text-BDygHCRk.js";import{S as Nn}from"./scroll-area-MdXbnM77.js";import{T as Dl,a as Ol,b as ts,c as Xs,u as Tx,i as Dx,d as Ox,P as Ml}from"./PreviewRefusedNotice-CCpHgrea.js";import{P as Mx}from"./paperclip-DY4e-IlK.js";import{L as _x}from"./lightbulb-DjMxuZnu.js";import{u as Wn}from"./use-update-config-BH0agtZh.js";import{a as Px,u as Lx,S as Fx,s as $x,b as Bx,P as zx}from"./ApplyToOverridesDialog-BxeMLhGv.js";import{r as _l,s as ya,e as Ux}from"./access-copy-Y2_F9uAx.js";import{t as Kx,I as va}from"./trust-posture-vH4plBRD.js";import{a as Hx}from"./use-pulse-freshness-CdRkKThf.js";import{c as Wx,B as Gx,w as qx,b as Yx,a as Vx,e as Qx}from"./primer-trigger-r8N0YY5e.js";import{M as Xx,u as Jx,s as Zx,P as eb,a as tb}from"./use-promo-activation-CxG-kZJQ.js";import{u as Pl}from"./use-promo-dismissals-DeNbRWOh.js";import{u as Ll}from"./use-pending-read-DB25CO5E.js";import{a as pt}from"./dorkbot-templates-8Yu9POWJ.js";import{i as nb,O as Fl,c as sb,b as rb}from"./OperatorIdentityForm-Cd6B2hxb.js";import{A as $l}from"./repeat-HOHWZc6L.js";import{S as Bl,P as ob}from"./progress-es667_cM.js";import{P as ab,M as ib}from"./plug-BdWCGVJg.js";import{i as So,a as cb,u as lb}from"./use-notification-prefs-CJnF55Rv.js";import{R as db}from"./rotate-cw-um9OzAM7.js";import{b as ub,u as mb,O as hb,c as fb}from"./OpenMeshSwitch-CjCPWZn0.js";import{u as pb,a as gb,C as xb,N as bb}from"./NewDirectMessageMenu-DyMfEU7i.js";import{P as yb,C as vb,f as wb,a as jb}from"./find-latest-widget-fence-BYtG5PzD.js";import{o as kb}from"./owner-notice-Cn5EUxgh.js";import{a as zl,C as Sb}from"./cpu-BMUMZCWW.js";import{U as Cb}from"./unplug-CK2bPGpg.js";import{c as Nb,H as Ul,a as Kl,b as Hl}from"./RuntimeSetupDialog-CEUC7GrY.js";import{a as Ab,u as Eb,F as Ib}from"./ForwardConsentHost-CNuTTR3q.js";import{P as wa}from"./page-container-BCdJ_DsH.js";import{A as Rb}from"./AttentionSignalRow-BoTonsR5.js";import{u as Tb}from"./use-roving-tab-list-DSjW4_wm.js";import{R as Wl}from"./rotate-ccw-clock-Dniulnw5.js";import{d as et,e as Ce,f as ja,g as Gl,C as ql,a as Yl,b as Vl,c as Db}from"./command-DuhX52Bi.js";import{A as Ob,M as Mb}from"./McpAppFrame-CmwiQHxf.js";import{L as _b}from"./layers-BhECZJWp.js";import{A as Pb}from"./AgentOptionRow-hemBruhh.js";import{R as Lb}from"./radio-DpWUX1KL.js";import{a as Fb}from"./sound-D3r8dGFH.js";import{d as $b}from"./connection-copy--MA7AN04.js";import{P as Bb}from"./path-input-SZl4NGTs.js";import"./WidgetErrorCard-Bte2obmw.js";import{a as zb}from"./ComputerResourceView-Dcd0e_Oj.js";import{P as Ub,u as Kb}from"./pane-resize-handle-Bar-FdkY.js";import{u as Ql}from"./use-is-below-desktop-DS51QTwj.js";import{W as Hb}from"./WithheldExtensionsNotice-CZibLuKA.js";import{u as Wb}from"./use-direct-message-panel-DXTH05Ym.js";import{u as Gb}from"./ComputerViewer-Dq3aQyZD.js";import{a as qb}from"./use-local-browser-43FpcgCM.js";import{F as Yb}from"./file-text-DLPhIP0f.js";import"./use-external-adapter-catalog-DKlBkkvF.js";import"./inline-code-7dwi7wWG.js";import"./useMutationState-TJGtJT5R.js";import"./runtime-connect-Dn0T5YWv.js";import"./execution-config-D_PgYyCI.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./shield-x-CDXAW9YF.js";import"./use-full-activity-feed-QZAZ5vBJ.js";import"./profile-errors-DymWFWiP.js";import"./use-mounted-ref-Cuui7-gf.js";import"./ProfileFields-DyVqmcPr.js";import"./use-mesh-topology-Bw7MmKA9.js";import"./card-CM7-_8nD.js";import"./list-runtime-types-hMouIGtG.js";import"./more-details-BUolHzrY.js";import"./index-DI9IsN-O.js";import"./markdown-content-DV3AiG76.js";import"./table-BcJvj9rx.js";import"./package-BafFSryH.js";import"./heart--8btr31M.js";import"./git-branch-uZFa3Tmr.js";import"./file-DiYwTQdD.js";function Vb({children:e,isValidProp:t,...s}){t&&Uu(t);const r=u.useContext(Ho);s={...r,...s},s.transition=Ku(s.transition,r.transition),s.isStatic=Yr(()=>s.isStatic);const o=u.useMemo(()=>s,[JSON.stringify(s.transition),s.transformPagePoint,s.reducedMotion,s.skipAnimations]);return n.jsx(Ho.Provider,{value:o,children:e})}function Qb(e){e.values.forEach(t=>t.stop())}function Er(e,t){[...t].reverse().forEach(r=>{const o=e.getVariant(r);o&&Gi(e,o),e.variantChildren&&e.variantChildren.forEach(a=>{Er(a,t)})})}function Xb(e,t){if(Array.isArray(t))return Er(e,t);if(typeof t=="string")return Er(e,[t]);Gi(e,t)}function Jb(){const e=new Set,t={subscribe(s){return e.add(s),()=>void e.delete(s)},start(s,r){const o=[];return e.forEach(a=>{o.push(Hu(a,s,{transitionOverride:r}))}),Promise.all(o)},set(s){return e.forEach(r=>{Xb(r,s)})},stop(){e.forEach(s=>{Qb(s)})},mount(){return()=>{t.stop()}}};return t}function Zb(){const e=Yr(Jb);return Wu(e.mount,[]),e}class ey{constructor(){this.componentControls=new Set}subscribe(t){return this.componentControls.add(t),()=>this.componentControls.delete(t)}start(t,s){this.componentControls.forEach(r=>{r.start(t.nativeEvent||t,s)})}cancel(){this.componentControls.forEach(t=>{t.cancel()})}stop(){this.componentControls.forEach(t=>{t.stop()})}}const ty=()=>new ey;function ny(){return Yr(ty)}const sy=`${Vr.repo}/issues/new`,ry={"tunnel.enabled":"boolean","tasks.enabled":"boolean","relay.enabled":"boolean","scheduler.enabled":"boolean","mesh.enabled":"boolean","mcp.enabled":"boolean","telemetry.install":"boolean","telemetry.heartbeat":"boolean","telemetry.errorReporting":"boolean","auth.enabled":"boolean","workspace.enabled":"boolean","harness.autoSync":"boolean","harness.autoAdopt":"boolean","runtimes.codex.enabled":"boolean","runtimes.opencode.enabled":"boolean","runtimes.default":"enum","logging.level":"enum","ui.theme":"enum"},oy={"runtimes.default":["claude-code","codex","opencode","doe"],"logging.level":["fatal","error","warn","info","debug","trace"],"ui.theme":["light","dark","system"]},ay=/^[a-z0-9][a-z0-9._-]{0,31}$/,iy={bug:["bug"],feature:["enhancement"],runtime:["bug"]},cy={bug:"Bug: (describe what went wrong)",feature:"Feature: (describe what you want)",runtime:"Runtime issue: (describe what went wrong)"};function ly(e){return e.replace(/\b(?:sk-|pk-|rk-|ghp_|gho_|ghu_|ghs_|github_pat_|glpat-|npm_|xox[baprsc]-)[A-Za-z0-9._-]+/g,"[redacted]").replace(/\b(?:AKIA|ASIA|AGPA|AIDA|AROA|ANPA)[0-9A-Z]{16}\b/g,"[redacted]").replace(/\bBearer\s+[A-Za-z0-9._-]+/gi,"[redacted]")}function Co(e){return ly(e).replace(/[^\s/@]+@[^\s/@]+\.[^\s/@]+/g,"[email]").replace(/\b\d{1,3}(?:\.\d{1,3}){3}\b/g,"[ip]").replace(/\b(?:[A-Fa-f0-9]{1,4}:){2,7}[A-Fa-f0-9]{1,4}\b/g,"[ip]").replace(new RegExp("(?<![\\w:.])(?:[A-Fa-f0-9]{1,4})?(?::[A-Fa-f0-9]{0,4}){2,}(?![\\w:.])","g"),"[ip]").replace(/\\\\[^\s\\]+(?:\\[^\s\\]+)+/g,"[path]").replace(/(^|[\s"'`(<[{])\/\/[^\s"'`)>\]}/]+\/[^\s"'`)>\]}]+/g,"$1[path]").replace(/\b[A-Za-z]:\\[^\r\n]*/g,"[path]").replace(/(^|[\s"'`(<[{/:])(~|\/(?:Users|home))\/[^\s"'`)>\]}]+/g,"$1[home]").replace(/(^|[\s"'`(<[{])\/[\w.-]+(?:\/[\w.-]*)+/g,"$1[path]").replace(/\b(?=[A-Za-z0-9_-]*\d)[A-Za-z0-9_-]{24,}\b/g,"[redacted]")}function dy(e,t){const s=oy[e];return s?s.includes(t):ay.test(t)&&Co(t)===t}function uy(e){const t={};for(const[s,r]of Object.entries(ry)){const o=e[s];o!=null&&(r==="boolean"&&typeof o=="boolean"||r==="number"&&typeof o=="number"&&Number.isFinite(o)||r==="enum"&&typeof o=="string"&&dy(s,o))&&(t[s]=o)}return t}const my=["details","summary"];function No(e){return Rx(Co(e),my)}function hy(e){const t=e.runtimes.length>0?e.runtimes.join(", "):"none configured",s=Object.entries(e.flags).map(([o,a])=>`- ${o}: ${String(a)}`).join(`
2
2
  `),r=[`- DorkOS version: ${e.version}`,`- OS / arch: ${e.platform}`,`- Runtimes configured: ${t}`,`- Reported from: ${e.surface}`,"","Settings (on/off values only, no secrets or file paths):",s.length>0?s:"- (none available)"];return Co(r.join(`
3
3
  `))}function fy(e){var s;const t=(s=e.body)==null?void 0:s.trim();return t?[No(t)]:e.kind==="feature"?["## What do you want DorkOS to do?","","","## Why would it help?","",""]:["## What happened?","","","## What did you expect?","","","## Steps to reproduce","","1. ","2. ","3. "]}function py(e){return["<details><summary>Environment</summary>","",hy(e),"","</details>","","DorkOS filled in the details above. Please check them and remove anything you do not want to share.","","---","",...fy(e)].join(`
4
4
  `)}function Js(e){var r;const t=(r=e.title)==null?void 0:r.trim(),s=new URLSearchParams({title:No(t||cy[e.kind]),body:py(e),labels:iy[e.kind].join(",")});return`${sy}?${s.toString()}`}const gy=6e3,ka=`
@@ -77,4 +77,4 @@ Start writing…`,title:"Document"}):void 0,removeDocument:Ee?()=>void Rt(()=>g?
77
77
 
78
78
  Your declared abilities include: ${t.join(", ")}. Draw your first-action offer from these when it fits.`:"";return["You have just been created. This is your first moment awake — greet the person who made you.","",`Read your ${Zt.soul} to recall who you are, then, in 2 to 4 short sentences:`,"- Introduce yourself in your own voice, drawn from that persona.","- State plainly what your job is.","- Propose one concrete first action you could take — as an offer, and wait for their go-ahead.","",`Do NOT start any work yet — do not act on the project or change any files. (Reading your own ${Zt.soul} so you can introduce yourself is fine; anything beyond that waits for their go-ahead.) Just make the offer and let them decide. Speak warmly and directly to the person.`+s].join(`
79
79
  `)}function aI(e){return[`You have just been created${e.displayName?` and named ${e.displayName}`:""}, and you do not have a job yet — the person who made you will define it with you, right now, in this conversation. This is your first moment awake, and by the end of it you will have written your own ${Zt.soul}.`,"","Run a short interview to discover who you should be, then capture it:","","1. Say a brief, warm hello (1 to 2 sentences) and ask them what they would like you to take care of. Do not assume a role yet.","",`2. Hold a SHORT interview. Ask AT MOST ${$i} questions in total across this whole conversation — this is a hard limit. Only ask what you genuinely need to write a good soul (typically the scope of the work, how often you should do it, and anything you must never touch). If their first answer already tells you enough, ask fewer. For a one-word or vague answer, ask a single clarifying question and then proceed with a reasonable role rather than interrogating them. If they say something like "just figure it out," do not push — propose a sensible role from what you have and move on. Never trap them in endless back-and-forth: once you have asked ${$i} questions, stop asking and write your best soul from what you learned.`,"","3. Before you write, tell them in one line what you understood and that you are about to capture it as your soul — so they see it coming. Then write it.","",`4. Write your ${Zt.soul} now, using your file-editing tools. It lives at \`.dork/${Zt.soul}\` in your working directory and already contains a "Personality Traits" block fenced by \`${jg}\` and \`${ga}\` — leave that fenced block exactly as it is. Replace only the prose BELOW the \`${ga}\` marker with your persona: who you are in your own voice, what you take care of, how you go about it, and the boundaries you keep. Keep it concise.`,"","5. After the file is written, confirm it in one or two sentences and propose ONE concrete first action you could take — as an offer, and wait for their go-ahead.","",`Do not start the actual job yet — your own ${Zt.soul} is the only file you touch now. Do not act on their project or run their work until they say go. Speak warmly and directly to the person throughout.`].join(`
80
- `)}const iI={template:oI,"design-your-own":aI};function cI(e,t){return iI[e](t)}function lI(e,t){return qx(cI(e,t))}const Pu="🤖",dI=["🤖","🦾","🧭","🛰️","📡","🔭","🗺️","🧠","🦉","🦊","🐝","🐙","🚀","⚡","🌟","🔮","🛠️","🔧","📊","📋","✅","🗂️","🔔","🛡️"];function Bi({face:e,title:t,subtitle:s,chips:r,variant:o,tabIndex:a,onSelect:i,onKeyDown:c,ref:d,"data-testid":l}){return n.jsxs("button",{ref:d,type:"button",tabIndex:a,onClick:i,onKeyDown:c,"data-gallery-card":"","data-testid":l,className:K("card-interactive group flex h-full flex-col gap-2 rounded-xl border p-4 text-left","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",o==="design"?"border-primary/40 bg-primary/5 hover:border-primary/60 border-dashed":"bg-card hover:border-border/80 hover:shadow-md"),children:[n.jsx("span",{className:"text-3xl leading-none","aria-hidden":!0,children:e}),n.jsxs("div",{className:"space-y-0.5",children:[n.jsx("p",{className:"text-sm font-semibold",children:t}),n.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed",children:s})]}),r&&r.length>0&&n.jsx("div",{className:"mt-auto flex flex-wrap gap-1 pt-1",children:r.map(m=>n.jsx("span",{className:"bg-muted text-muted-foreground text-2xs rounded-full px-2 py-0.5",children:m},m))})]})}function uI(e){return{source:e.source,name:e.name,displayName:wl(e),description:e.description,icon:e.icon,tags:e.tags,category:e.category,packageName:e.name,...e.marketplace?{marketplace:e.marketplace}:{}}}function mI(e){return e.tags&&e.tags.length>0?e.tags.slice(0,2):e.category?[e.category]:[]}function hI(e){const t=e.replace(/\/+$/,"");return t.split("/").pop()??t}function fI({onDesignYourOwn:e,onSelectTemplate:t,onImport:s}){const{data:r,error:o,isLoading:a}=kg(),i=Ll(a),[c,d]=u.useState(""),[l,m]=u.useState(!1),f=u.useMemo(()=>(r??[]).filter(h=>h.type==="agent"),[r]),p=Ny(f.length+1);return n.jsxs("div",{className:"space-y-5",children:[n.jsxs("div",{role:"group","aria-label":"Choose what your agent will do",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4","data-testid":"agent-gallery",children:[n.jsx(Bi,{ref:p.setRef(0),variant:"design",face:n.jsx(bo,{className:"text-primary size-7"}),title:"Design your own",subtitle:"Describe the job in your own words.",tabIndex:p.tabIndexFor(0),onSelect:e,onKeyDown:h=>p.handleKeyDown(h,0),"data-testid":"gallery-design-your-own"}),f.map((h,g)=>{const x=g+1;return n.jsx(Bi,{ref:p.setRef(x),variant:"template",face:h.icon??Pu,title:wl(h),subtitle:h.description??"A ready-made agent.",chips:mI(h),tabIndex:p.tabIndexFor(x),onSelect:()=>t(uI(h)),onKeyDown:b=>p.handleKeyDown(b,x),"data-testid":`gallery-template-${h.name}`},h.name)}),i&&f.length===0&&Array.from({length:2}).map((h,g)=>n.jsx(Pt,{className:"h-28 rounded-xl","data-testid":"gallery-skeleton"},g))]}),!i&&f.length===0&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"gallery-templates-note",children:o?"Couldn’t load ready-made agents. Check marketplace sources in Settings.":"No ready-made agents yet. Add a marketplace source in Settings."}),n.jsxs(yo,{open:l,onOpenChange:m,children:[n.jsx(vo,{asChild:!0,children:n.jsxs("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","data-testid":"advanced-toggle",children:[n.jsx(qt,{className:K("size-3.5 transition-transform",l&&"rotate-180")}),"Build from a template URL"]})}),n.jsx(wo,{children:n.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[n.jsx(gt,{value:c,onChange:h=>d(h.target.value),placeholder:"github.com/org/repo","data-testid":"custom-url-input",className:"flex-1"}),n.jsx(L,{size:"sm",disabled:!c,onClick:()=>{const h=hI(c);t({source:c,name:h,displayName:Sg(h)}),d("")},"data-testid":"custom-url-go",children:"Continue"})]})})]}),s&&n.jsx("div",{className:"border-t pt-3",children:n.jsxs("button",{type:"button",onClick:s,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-sm transition-colors","data-testid":"gallery-import-link",children:[n.jsx(Cg,{className:"size-4"}),"Bring in an existing project folder",n.jsx("span",{"aria-hidden":!0,children:"→"})]})})]})}function pI({value:e,onChange:t}){return n.jsx("div",{role:"group","aria-label":"Choose a face",className:"flex flex-wrap gap-1.5","data-testid":"face-picker",children:dI.map(s=>{const r=s===e;return n.jsx("button",{type:"button","aria-label":`Face ${s}`,"aria-pressed":r,onClick:()=>t(s),className:K("flex size-9 items-center justify-center rounded-md border text-lg transition-colors","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",r?"border-primary bg-primary/10":"hover:border-border hover:bg-accent border-transparent"),"data-testid":`face-${s}`,children:n.jsx("span",{"aria-hidden":!0,children:s})},s)})})}function gI({value:e,onChange:t}){return n.jsx("div",{role:"radiogroup","aria-label":"Runs on",className:"flex gap-1.5","data-testid":"runtime-picker",children:Ng.map(s=>{const r=it(s),o=r.icon,a=e===s;return n.jsxs("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>t(s),className:K("flex flex-1 items-center justify-center gap-1.5 rounded-md border px-2 py-1.5 text-xs transition-colors","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",a?"border-primary bg-primary/10 font-medium":"hover:border-border hover:bg-accent border-transparent"),"data-testid":`runtime-${s}`,children:[n.jsx(o,{size:14}),r.label]},s)})})}function xI({face:e,name:t,jobLine:s,capabilities:r,className:o}){const a=t.trim()||"Your agent",i=t.trim().length===0;return n.jsxs("div",{className:K("bg-card shadow-soft flex flex-col items-center gap-3 rounded-lg border p-5",o),"data-testid":"agent-preview",children:[n.jsx("span",{className:"bg-primary/10 flex size-16 items-center justify-center rounded-full text-3xl","aria-hidden":!0,children:e}),n.jsxs("div",{className:"space-y-1 text-center",children:[n.jsx("p",{className:K("text-lg font-semibold",i&&"text-muted-foreground"),"data-testid":"preview-name",children:a}),n.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s})]}),r.length>0&&n.jsx("div",{className:"flex flex-wrap justify-center gap-1.5","data-testid":"preview-capabilities",children:r.map(c=>n.jsx("span",{className:"bg-muted text-muted-foreground rounded-full px-2 py-0.5 text-xs",children:c},c))})]})}function Lu({schedules:e,checkFailed:t,testIdPrefix:s}){return n.jsxs(n.Fragment,{children:[e.length>0&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":`${s}-package-schedules`,children:[n.jsx(jo,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Brings a schedule"}),n.jsx("dd",{className:"min-w-0 space-y-1",children:e.map((r,o)=>n.jsxs("p",{children:[n.jsx("span",{className:"font-medium",children:r.name}),": ",Ox(r)]},`${r.name}-${o}`))})]}),t&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":`${s}-offer-check-failed`,children:[n.jsx(Yi,{className:"text-status-warning-dot mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Not checked"}),n.jsx("dd",{className:"min-w-0",children:"Couldn’t check for scheduled work. Anything it brings still needs your approval."})]})]})}const zi=4;function bI({form:e,suggestionPool:t,jobLine:s,previewCapabilities:r,onBack:o,onImportInstead:a,onCreate:i,isCreating:c,packageSchedules:d=[],offerCheckFailed:l=!1,isCheckingOffer:m=!1,offerRefusal:f,packageDirectory:p,templateReview:h,inheritance:g,isCheckingInheritance:x=!1}){const b=u.useRef(null),[y,N]=u.useState(0),k=e.displayName.trim().toLowerCase(),I=t.filter(_=>_.toLowerCase()!==k),v=tI(I,y,zi);u.useEffect(()=>{const _=setTimeout(()=>{var O;return(O=b.current)==null?void 0:O.focus()},160);return()=>clearTimeout(_)},[]);const A=e.displayName.trim(),R=c?`Creating ${A||"your agent"}…`:`Create ${A||"agent"}`;return n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs("div",{className:"space-y-5",children:[n.jsxs("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center gap-1 text-xs transition-colors","data-testid":"naming-back",children:[n.jsx(Ec,{className:"size-3.5"}),"Choose a different agent"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(We,{htmlFor:"agent-name",className:"text-sm",children:"Name"}),n.jsx(gt,{ref:b,id:"agent-name",placeholder:"Name your agent",value:e.displayName,onChange:_=>e.handleNameChange(_.target.value),"aria-invalid":e.showSlugError,"aria-describedby":e.showSlugError?"agent-name-error":void 0,className:"h-11 text-base"}),e.showSlugError&&n.jsx("p",{id:"agent-name-error",className:"text-destructive text-xs",role:"alert",children:e.slugValidation.error}),e.conflictStatus==="exists-has-dork"&&n.jsxs("div",{"data-testid":"conflict-status",children:[n.jsx("p",{className:"text-status-warning-fg text-xs font-medium",children:"This folder has a project"}),a&&n.jsx("button",{type:"button",className:"text-primary text-xs hover:underline",onClick:a,"data-testid":"import-instead-link",children:"Import it instead"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-muted-foreground text-xs",children:"Need a name?"}),n.jsx("button",{type:"button",onClick:()=>N(_=>_+zi),"aria-label":"Show other names",className:"text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded text-sm transition-colors focus-visible:ring-2 focus-visible:outline-none","data-testid":"suggestion-reroll",children:n.jsx("span",{"aria-hidden":!0,children:"🎲"})})]}),n.jsx("div",{className:"flex flex-wrap gap-1.5","data-testid":"name-suggestions",children:v.map(_=>n.jsx("button",{type:"button",onClick:()=>e.handleNameChange(_),className:"bg-muted hover:bg-accent focus-visible:ring-ring rounded-full px-2.5 py-1 text-xs transition-colors focus-visible:ring-2 focus-visible:outline-none","data-testid":`suggestion-${_}`,children:_},_))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx(We,{className:"text-sm",children:"Face"}),!e.icon&&n.jsx("span",{className:"text-muted-foreground text-xs",children:"Picked for you if skipped"})]}),n.jsx(pI,{value:e.icon,onChange:e.setIcon})]}),n.jsxs(yo,{open:e.directoryOpen,onOpenChange:e.setDirectoryOpen,children:[n.jsx(vo,{asChild:!0,children:n.jsxs("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full items-center gap-1 text-sm transition-colors","data-testid":"details-toggle",children:[n.jsx(qt,{className:K("size-4 transition-transform",e.directoryOpen&&"rotate-180")}),"Details",e.directoryOverride&&n.jsx("span",{className:"bg-primary/10 text-primary ml-1 rounded px-1.5 py-0.5 text-xs",children:"Custom"})]})}),n.jsx(wo,{children:n.jsxs("div",{className:"space-y-4 pt-3",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(We,{className:"text-muted-foreground text-xs",children:"Runs on"}),n.jsx(gI,{value:e.runtime,onChange:e.setRuntime})]}),p?n.jsxs("div",{className:"space-y-1.5","data-testid":"package-directory",children:[n.jsx(We,{className:"text-muted-foreground text-xs",children:"Directory"}),n.jsx("p",{className:"font-mono text-xs [overflow-wrap:anywhere]",children:p}),n.jsx("p",{className:"text-muted-foreground text-xs",children:"Kept in its package’s folder so updates reach it."})]}):n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(We,{htmlFor:"agent-directory",className:"text-muted-foreground text-xs",children:"Directory"}),n.jsx(Bb,{id:"agent-directory",placeholder:e.resolvedDirectory||(e.defaultDirectory?`${e.defaultDirectory}/…`:""),value:e.directoryOverride,onChange:e.setDirectoryOverride,onBrowse:()=>e.setDirectoryPickerOpen(!0),browseTestId:"browse-directory-button","data-testid":"directory-preview"}),e.conflictStatus==="no-path"&&n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"conflict-status",children:"Creates a new folder"}),e.conflictStatus==="exists-no-dork"&&n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"conflict-status",children:"That folder is already there. The project goes inside it."}),e.conflictStatus==="error"&&n.jsx("p",{className:"text-destructive text-xs","data-testid":"conflict-status",children:"Can’t open this folder. Pick another."})]}),!p&&e.slug&&!e.showSlugError&&n.jsxs("p",{className:"text-muted-foreground text-xs",children:["Folder name:"," ",n.jsx("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:e.slug})]})]})})]})]}),n.jsxs("div",{className:"flex flex-col gap-4 self-start",children:[n.jsx(xI,{face:e.icon||Pu,name:e.displayName,jobLine:s,capabilities:r}),(d.length>0||l)&&n.jsx("dl",{className:"bg-muted/30 space-y-2.5 rounded-lg border p-3.5 text-sm",children:n.jsx(Lu,{schedules:d,checkFailed:l,testIdPrefix:"naming"})}),f!==void 0&&n.jsx(Ml,{error:f}),h,m&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"naming-checking-offer",children:"Checking for scheduled work…"}),g,n.jsx(L,{size:"lg",onClick:i,disabled:!e.canSubmit||c||m||x||f!==void 0,"data-testid":"create-button",children:R})]})]})}function yI({seed:e,packageSchedules:t,isCheckingOffer:s,offerCheckFailed:r,offerRefusal:o,resolvedDirectory:a,canSubmit:i,isCreating:c,inheritance:d,isCheckingInheritance:l=!1,onCreate:m,onCustomize:f,onNotNow:p}){const{displayName:h,persona:g,runtime:x,capabilities:b,skills:y,schedule:N,icon:k}=e.template,I=it(x??"claude-code").label,v=h.trim().charAt(0).toUpperCase()||"?",A=k&&Nr(k)?k:v,R=e.sourceLabel?`Offered by ${e.sourceLabel}.`:"A ready-made agent.";return n.jsxs("div",{className:"mx-auto max-w-md space-y-6","data-testid":"arrival-confirm",children:[n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[n.jsx("span",{className:"bg-primary/10 text-primary flex size-20 items-center justify-center rounded-full text-4xl font-semibold","aria-hidden":"true",children:A}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs(tt,{className:"text-xl",children:["Meet ",h]}),n.jsx(ft,{children:R})]})]}),g&&n.jsx("p",{className:"text-foreground text-sm leading-relaxed whitespace-pre-line",children:g}),n.jsxs("dl",{className:"bg-muted/30 space-y-2.5 rounded-lg border p-3.5 text-sm",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vI,{runtime:x}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Runs on"}),n.jsx("dd",{children:I})]}),n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ns,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Lives in"}),n.jsx("dd",{className:"min-w-0",children:a?n.jsx("code",{className:"text-xs break-all",children:a}):n.jsx(Pt,{className:"h-3.5 w-48 max-w-full rounded"})})]}),N&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":"arrival-schedule",children:[n.jsx(jo,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Runs on a schedule"}),n.jsx("dd",{children:N})]}),n.jsx(Lu,{schedules:t,checkFailed:r,testIdPrefix:"arrival"}),b&&b.length>0&&n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ex,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Can"}),n.jsx("dd",{children:b.join(", ")})]}),y&&y.length>0&&n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ag,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Uses skills"}),n.jsx("dd",{children:y.join(", ")})]})]}),o!==void 0&&n.jsx(Ml,{error:o}),n.jsxs("div",{className:"flex flex-col gap-2",children:[!i&&n.jsx("p",{className:"text-status-warning-fg text-center text-xs","data-testid":"arrival-needs-name",children:"Needs a name. Choose “Customize first” to add one."}),s&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"arrival-checking-offer",children:"Checking for scheduled work…"}),d,n.jsx(L,{size:"lg",onClick:m,disabled:c||!i||s||l||o!==void 0,"data-testid":"arrival-create",children:c?"Creating…":`Create ${h}`}),n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsx(L,{variant:"ghost",size:"sm",onClick:f,className:"text-muted-foreground","data-testid":"arrival-customize",children:"Customize first"}),n.jsx(L,{variant:"ghost",size:"sm",onClick:p,className:"text-muted-foreground","data-testid":"arrival-not-now",children:"Not now"})]})]})]})}function vI({runtime:e}){const t=it(e??"claude-code").icon;return n.jsx(t,{size:16,className:"text-muted-foreground shrink-0"})}function wI(e){const t=e==null?void 0:e.body;return(t==null?void 0:t.code)==="template_needs_review"?t.template:void 0}function jI(e,t){const s=e.replace(/\/*$/,"/");return t.filter(r=>r.path===e||r.path.startsWith(s))}function kI(e){return e.omitted==="link"?"A link. It isn’t copied into the agent.":e.omitted==="not-text"?`Not text (${e.bytes} bytes).`:`Too long to show (${e.bytes} bytes). Read it in the template first.`}function SI(e){const t=(e.settings??[]).filter(s=>s.omitted==="too-long"||s.omitted==="not-text");return t.length===0?"Create with these":t.length===1?`Create without seeing ${t[0].path}`:`Create without seeing ${t.length} files`}function CI(e){const{disclosed:t}=e;return[...e.findings.map(s=>({key:`finding:${s.path}`,label:s.path,detail:"Settings the agent loads: hooks, permission rules or servers.",files:jI(s.path,e.settings??[])})),...t.hooks.map((s,r)=>({key:`hook:${r}`,label:ut(s.command),detail:`Runs on ${s.event}${s.source?`, while ${ut(s.source)} is in use`:""}.`})),...(t.skillCommands??[]).map((s,r)=>({key:`command:${s.source}:${r}`,label:ut(s.command),detail:`Runs when skill “${ut(s.skill)}” is used (${ut(s.source)})`+(s.usesArguments?". Reads the text typed after it.":".")})),...t.mcpServers.map(s=>({key:`mcp:${s.name}`,label:s.command?Ig(s.command,s.args):ut(s.url??s.name),detail:`Starts the MCP server “${ut(s.name)}”.`})),...t.skillTools.map(s=>({key:`tools:${s.source}`,label:s.tools.map(ut).join(", "),detail:`Skill “${ut(s.skill)}” may use these without asking you.`}))]}function NI({template:e,onCreateAnyway:t,onCancel:s,isCreating:r}){return n.jsxs("div",{role:"alert",className:"space-y-3 rounded-md border border-amber-500/40 bg-amber-500/5 p-3 text-sm","data-testid":"template-review",children:[n.jsxs("p",{className:"flex items-center gap-2 font-medium text-amber-700 dark:text-amber-300",children:[n.jsx(Eg,{className:"size-4 shrink-0","aria-hidden":!0}),"This template brings things that run in your agent’s chats"]}),n.jsxs("p",{className:"text-muted-foreground text-xs [overflow-wrap:anywhere]",children:["From ",e.source,". Check each before you create the agent."]}),n.jsx("ul",{className:"space-y-2",children:CI(e).map(o=>{var a;return n.jsxs("li",{className:"text-xs",children:[n.jsx("code",{className:"bg-muted text-foreground block rounded px-1.5 py-1 font-mono [overflow-wrap:anywhere] whitespace-pre-wrap",children:o.label}),n.jsx("span",{className:"text-muted-foreground",children:o.detail}),(a=o.files)==null?void 0:a.map(i=>n.jsxs("details",{className:"mt-1","data-testid":"template-settings-file",children:[n.jsx("summary",{className:"text-muted-foreground hover:text-foreground cursor-pointer",children:i.path===o.label?"Show what it contains":`Show ${i.path}`}),i.content!==void 0?n.jsx("pre",{className:"border-border/60 bg-muted/40 mt-1 max-h-[50dvh] overflow-auto rounded border p-2 font-mono text-xs break-words whitespace-pre-wrap md:max-h-56",children:i.content}):n.jsx("p",{className:"text-muted-foreground mt-1",children:kI(i)})]},i.path))]},o.key)})}),n.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[n.jsx(L,{variant:"ghost",size:"sm",onClick:s,disabled:r,children:"Don’t create it"}),n.jsx(L,{size:"sm",onClick:t,disabled:r,className:"h-auto max-w-full py-1.5 text-left [overflow-wrap:anywhere] whitespace-normal",children:r?"Creating…":SI(e)})]})]})}function AI(){const{isOpen:e,seed:t,onCreated:s,close:r}=Cs(),o=en(z=>z.open),a=YE(),i=Pe(),[c,d]=u.useState("gallery"),[l,m]=u.useState(null),[f,p]=u.useState(!1);e!==f&&(p(e),e&&(m(null),d(t?"arrival":"gallery")));const h=t!=null&&t.template.icon&&Nr(t.template.icon)?t.template.icon:void 0,g=l!=null&&l.icon&&Nr(l.icon)?l.icon:h??null,x=(t==null?void 0:t.template.runtime)??"claude-code",b=(t==null?void 0:t.packageName)!==void 0?t:(l==null?void 0:l.packageName)!==void 0?{packageName:l.packageName,marketplace:l.marketplace}:null,y=XE(b),{data:N}=Le(),k=As()?void 0:w,I=b&&y.packageAgentName&&(N!=null&&N.dorkHome)?`${N.dorkHome}/agents/${y.packageAgentName}`:void 0,[v,A]=u.useState(null),R=QE({step:c,templateName:(l==null?void 0:l.displayName)??null,seedDisplayName:(t==null?void 0:t.template.displayName)??null,faceSeed:g,runtimeSeed:x}),_=eI(l?{name:l.name,description:l.description,category:l.category,tags:l.tags}:t?{name:t.template.displayName,description:t.template.persona}:void 0),O=l?l.description??"A ready-made agent.":t!=null&&t.template.persona?t.template.persona:"You’ll define the job together in your first chat.",M=l?l.tags??[]:(t==null?void 0:t.template.capabilities)??[];function T(){R.reset(),A(null),m(null),d("gallery")}const j=u.useCallback(z=>{m(z),d("naming")},[]),S=u.useCallback(()=>{m(null),d("naming")},[]);function E(){d(t?"arrival":"gallery")}function w(){r(),T(),o()}function D(z){var de;if(!R.canSubmit||a.isPending)return;const Y=(b==null?void 0:b.packageName)!==void 0&&y.approval?{package:{name:b.packageName,...b.marketplace?{marketplace:b.marketplace}:{},...y.approval}}:void 0,te=Y?void 0:(l==null?void 0:l.source)??(t==null?void 0:t.template.source);a.mutate({name:R.slug,displayName:R.displayName.trim()||void 0,runtime:R.runtime,...!Y&&R.directoryOverride?{directory:R.directoryOverride}:{},...R.icon?{icon:R.icon}:{},...Y??{},...te?{template:te}:{},...z?{approvedTemplateHash:z}:{},...t!=null&&t.template.persona?{persona:t.template.persona}:{},...(de=t==null?void 0:t.template.capabilities)!=null&&de.length?{capabilities:t.template.capabilities}:{}},{onSuccess:Q=>{const q=crypto.randomUUID(),re=Q.displayName??Q.name,ge=l||t?"template":"design-your-own";Rg.getState().register(q,{name:Q.name,displayName:re,agentId:Q.id,icon:Q.icon,color:Q.color,bornAt:Q.registeredAt,path:Q._path,runtime:Q.runtime,kickoffMessage:lI(ge,{displayName:re,capabilities:Q.capabilities})}),Fb();const Z=s;if(r(),T(),Z){Z();return}i($t({agentId:Q.id,draft:"1",session:q,runtime:Q.runtime}))},onError:Q=>{const q=wI(Q);q&&A(q)}})}function F(z){z||(r(),T())}const $=_l(e),W=n.jsx(Yv,{agentName:R.displayName||(t==null?void 0:t.template.displayName)||""}),ne=JE[c],fe=c==="gallery"?"max-w-6xl":c==="naming"?"max-w-5xl":"max-w-2xl";return n.jsx(xt,{open:e,onOpenChange:F,defaultFullscreen:!0,children:n.jsxs(bt,{className:"flex flex-col gap-0 p-0",children:["title"in ne&&n.jsxs(ht,{className:"shrink-0 border-b px-5 py-4",children:[n.jsx(tt,{children:ne.title}),n.jsx(ft,{children:ne.description})]}),n.jsx("span",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:ne.description}),n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-6 sm:px-8",children:n.jsxs("div",{className:`mx-auto my-auto w-full ${fe}`,children:[n.jsx(Xe,{mode:"wait",children:n.jsxs(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:[c==="gallery"&&n.jsx(fI,{onDesignYourOwn:S,onSelectTemplate:j,onImport:k}),c==="arrival"&&t&&n.jsx(yI,{seed:t,packageSchedules:y.schedules,isCheckingOffer:y.isChecking,offerCheckFailed:y.failed,offerRefusal:y.refusal,resolvedDirectory:I??R.resolvedDirectory,canSubmit:R.canSubmit,isCreating:a.isPending,inheritance:W,isCheckingInheritance:$.isPending,onCreate:()=>D(),onCustomize:()=>d("naming"),onNotNow:()=>F(!1)}),c==="naming"&&n.jsx(bI,{form:R,suggestionPool:_,jobLine:O,previewCapabilities:M,onBack:E,onImportInstead:k,onCreate:()=>D(),isCreating:a.isPending,packageSchedules:y.schedules,offerCheckFailed:y.failed,offerRefusal:y.refusal,isCheckingOffer:y.isChecking,packageDirectory:I,inheritance:W,isCheckingInheritance:$.isPending,templateReview:v?n.jsx(NI,{template:v,isCreating:a.isPending,onCreateAnyway:()=>D(v.contentHash),onCancel:()=>A(null)}):void 0})]},c)}),c!=="gallery"&&n.jsx(fb,{className:"mt-6"})]})}),n.jsx(dc,{open:R.directoryPickerOpen,onOpenChange:R.setDirectoryPickerOpen,initialPath:R.directoryOverride||R.defaultDirectory,onSelect:z=>{R.setDirectoryOverride(z),R.directoryOpen||R.setDirectoryOpen(!0)}})]})})}function EI({sessionId:e}){u.useEffect(()=>{var a;const r=kt.getState(),o=((a=r.sessions[e])==null?void 0:a.cwd)??r.statusCwds[e]??null;return is.pinSession(e,o),xa.getState().setPinnedSession(e),()=>{is.unpinSession(),xa.getState().setPinnedSession(null)}},[e]);const t=Tg(e),s=u.useMemo(()=>wb(t),[t]);return s===null?n.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-4 text-center text-sm",children:"No live widget in this chat"}):n.jsx(jb,{code:s.code,isIncomplete:s.isIncomplete,sessionId:e,isLatestMessage:s.isLatest,isStreaming:s.isStreaming},s.sourceMessageKey)}function II({content:e}){return n.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-4 text-center text-sm",children:e.title})}const xr=64,RI={type:"spring",stiffness:480,damping:44};function TI({content:e,onRestore:t,onClose:s}){u.useEffect(()=>(document.documentElement.style.setProperty("--pip-dock",`${xr}px`),()=>{document.documentElement.style.removeProperty("--pip-dock")}),[]);const r=Kb();return js.createPortal(n.jsxs(se.div,{"data-slot":"pip-minibar",role:"complementary","aria-label":e.title,initial:{y:xr},animate:{y:0},exit:{y:xr},transition:RI,style:{bottom:`max(var(--mobile-tab-dock, 0px), ${r}px)`},className:"bg-background border-border shadow-elevated fixed inset-x-0 z-40 flex h-16 items-center border-t",children:[n.jsxs("button",{type:"button",onClick:t,className:"focus-ring flex h-full min-w-0 flex-1 items-center gap-3 px-4 text-left",children:[n.jsx("span",{className:"bg-primary size-2 shrink-0 animate-pulse rounded-full"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e.title}),n.jsx(Iy,{className:"text-muted-foreground size-4 shrink-0"})]}),n.jsx("button",{type:"button","aria-label":"Close",onClick:s,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring mr-3 flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(Ue,{className:"size-4"})})]}),document.body)}const Zn={peek:.5,expanded:.94},DI=.4,OI=800,Ui=500,br={type:"spring",stiffness:480,damping:44};function MI({content:e,onClose:t,onMinimize:s,children:r}){const o=ny(),a=Zb(),[i,c]=u.useState("peek"),d=Jl(),l=d.height,m=Math.max(0,window.innerHeight-d.top-d.height),f=Zn.expanded*l,p=(Zn.expanded-Zn.peek)*l,h=i==="expanded"?0:p;u.useEffect(()=>{a.start({y:h,transition:br})},[a,h]);const g=(b,y)=>{const N=h+y.offset.y,k=y.velocity.y,I=N-p,v=Zn.peek*l;if(I>DI*v||I>0&&k>OI){s();return}let A;k<-Ui?A="expanded":k>Ui?A="peek":A=N<p/2?"expanded":"peek",A===i?a.start({y:h,transition:br}):c(A)},x=b=>{b.target.closest("button")||o.start(b)};return js.createPortal(n.jsxs(se.div,{"data-slot":"pip-sheet",role:"complementary","aria-label":e.title,initial:{y:f},animate:a,exit:{y:f},transition:br,drag:"y",dragListener:!1,dragControls:o,dragConstraints:{top:0,bottom:f},dragElastic:.1,dragMomentum:!1,onDragEnd:g,style:{height:f,bottom:m},className:"bg-background border-border shadow-modal fixed inset-x-0 z-40 flex flex-col rounded-t-lg border-t",children:[n.jsxs("div",{onPointerDown:x,className:"cursor-grab touch-none select-none active:cursor-grabbing",children:[n.jsx("div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b pt-1 pr-[max(1rem,env(safe-area-inset-right))] pb-2 pl-[max(1rem,env(safe-area-inset-left))]",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e.title}),n.jsx("button",{type:"button","aria-label":"Minimize",onClick:s,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(qt,{className:"size-4"})}),n.jsx("button",{type:"button","aria-label":"Close",onClick:t,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(Ue,{className:"size-4"})})]})]}),n.jsx("div",{"data-slot":"pip-sheet-content",style:{marginBottom:h},className:"min-h-0 flex-1 overflow-y-auto pt-3 pr-[max(0.75rem,env(safe-area-inset-right))] pb-[max(0.75rem,env(safe-area-inset-bottom))] pl-[max(0.75rem,env(safe-area-inset-left))]",children:r})]}),document.body)}const Ki=360,Hi=240,qr=16,yr={demo:II,mcp_app:_I,widget:PI};function _I({content:e}){return n.jsx(Mb,{sessionId:e.sessionId,serverName:e.serverName,uri:e.uri,title:e.title,className:"h-full"})}function PI({content:e}){return n.jsx(EI,{sessionId:e.sessionId})}function LI(e){u.useEffect(()=>{},[e])}function Wi(){return{x:window.innerWidth-Ki-qr,y:window.innerHeight-Hi-qr,width:Ki,height:Hi}}function FI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fu(e){switch(e.kind){case"demo":{const t=yr.demo;return n.jsx(t,{content:e})}case"mcp_app":{const t=yr.mcp_app;return n.jsx(t,{content:e})}case"computer":return n.jsx(zb,{content:e});case"widget":{const t=yr.widget;return n.jsx(t,{content:e})}default:return e}}function $I({content:e,onClose:t}){const s=P(c=>c.pipGeometry),r=P(c=>c.setPipGeometry),[o,a]=u.useState(Wi);u.useEffect(()=>{if(s!==null)return;const c=()=>a(d=>{const l=Wi();return FI(d,l)?d:l});return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[s]);const i=u.useMemo(()=>s||((e==null?void 0:e.kind)!=="computer"?o:{...o,width:480,height:360,x:Math.max(0,window.innerWidth-480-qr),y:Math.max(0,window.innerHeight-360-80)}),[s,o,e==null?void 0:e.kind]);return n.jsx(Xe,{children:e!==null&&n.jsx(zy,{title:e.title,geometry:i,onGeometryChange:r,onClose:t,minWidth:e.kind==="computer"?360:void 0,minHeight:e.kind==="computer"?300:void 0,children:Fu(e)},"pip-panel")})}function BI(){const e=P(d=>d.pipContent),t=P(d=>d.pipMinimized),s=P(d=>d.closePip),r=P(d=>d.minimizePip),o=P(d=>d.restorePip),a=P(d=>d.openPip),i=Fe();LI(a);const c=u.useRef(i);return u.useEffect(()=>{i&&!c.current&&e!==null&&r(),c.current=i},[i,e,r]),i?n.jsx(Xe,{children:e!==null&&(t?n.jsx(TI,{content:e,onRestore:o,onClose:s},"pip-minibar"):n.jsx(MI,{content:e,onClose:s,onMinimize:r,children:Fu(e)},"pip-sheet"))}):n.jsx($I,{content:e,onClose:s})}const zI=new Set(["permission-prompt","question","schedule-approval"]),UI={"permission-prompt":"Needs your approval to go on.",question:"Has a question for you.","schedule-approval":"Wants to run on a timer."};function $u(e){const t=hl(),s=Dg(),r=Dt(e),o=u.useRef(null);u.useEffect(()=>{var l,m,f,p;if(s)return;const a=new Map;for(const h of t)zI.has(h.kind)&&a.set(h.id,{id:h.id,who:h.primary,summary:UI[h.kind],deepLink:h.deepLink});const i=o.current;if(o.current=new Set(a.keys()),i===null)return;const c=[...a.values()].filter(h=>!i.has(h.id)),d=[...i].filter(h=>!a.has(h));c.length>0&&((m=(l=r.read()).onArrive)==null||m.call(l,c)),d.length>0&&((p=(f=r.read()).onDepart)==null||p.call(f,d,a.size))},[s,t,r])}function KI(){const{permission:e}=cb(),{prefs:t}=lb(),s=ro(),r=ze(),o=u.useRef(new Map),a=Dt(s),i=u.useCallback(()=>r||e!=="granted"||typeof document>"u"||!document.hidden?!1:typeof window<"u"&&typeof window.Notification<"u",[r,e]),c=u.useCallback((f,p,h,g)=>{let x;try{x=new Notification(p,{body:h,tag:f,silent:!0})}catch{return}x.onclick=()=>{var b;window.focus(),x.close(),o.current.delete(f),g!==null&&((b=a.read())==null||b({href:g}))},x.onclose=()=>{o.current.delete(f)},o.current.set(f,{notification:x,href:g})},[a]),d=u.useCallback(f=>{if(i())for(const p of f)c(p.id,`${p.who} needs you`,p.summary,p.deepLink)},[i,c]),l=u.useCallback(f=>{for(const p of f){const h=o.current.get(p);h!==void 0&&(h.notification.close(),o.current.delete(p))}},[]);$u({onArrive:d,onDepart:l});const m=t.notifyOnTurnCompleteWhileAway;pe("notification",f=>{const p=Og.safeParse(f);if(!p.success)return;const h=p.data.notification;if(h.tier!=="notable"||!m||!i())return;const g=Mg(h),x=g===null?null:HI(g.to,g.search);c(h.id,h.title,h.body??"",x)}),u.useEffect(()=>{const f=o.current;return()=>{for(const{notification:p}of f.values())p.close();f.clear()}},[])}function HI(e,t){const s=new URLSearchParams;for(const[o,a]of Object.entries(t))a!=null&&s.set(o,String(a));const r=s.toString();return r===""?e:`${e}?${r}`}function WI(){const{play:e}=Yx(),t=u.useCallback(()=>{e("knock"),Vx()},[e]),s=u.useCallback((r,o)=>{o===0&&e("settle")},[e]);return $u({onArrive:t,onDepart:s}),KI(),null}function GI(){const e=P(r=>r.shortcutsPanelOpen),t=P(r=>r.setShortcutsPanelOpen),s=_g();return n.jsx(xt,{open:e,onOpenChange:t,children:n.jsxs(bt,{className:"sm:max-w-md",children:[n.jsx(ht,{children:n.jsx(tt,{children:"Keyboard shortcuts"})}),n.jsx(St,{className:"space-y-6",children:s.map(({group:r,label:o,shortcuts:a})=>n.jsxs("div",{children:[n.jsx("h3",{className:"text-muted-foreground mb-2 text-xs font-medium tracking-wider uppercase",children:o}),n.jsx("div",{className:"space-y-1",children:a.map(i=>n.jsxs("div",{className:"flex items-center justify-between py-1.5 text-sm",children:[n.jsx("span",{children:i.label}),n.jsx(nl,{className:"inline-flex",children:Bt(i)})]},i.id))})]},r))})]})})}function qI(){const e=P(t=>t.toggleShortcutsPanel);u.useEffect(()=>{const t=s=>{const r=s.target,o=r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable;s.key==="?"&&!o&&(s.preventDefault(),e())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e])}const YI=15e3;function VI(){const e=_e({select:r=>r.location.pathname}),s=Ts("sidebar.body").find(r=>{var o;return(o=r.visibleWhen)==null?void 0:o.call(r,{pathname:e})});if(s){const r=s.component;return{key:`body:${s.id}`,body:n.jsx(A1,{contributionId:s.id,children:n.jsx(u.Suspense,{fallback:null,children:n.jsx(r,{})})}),direction:1,isTakeover:!0}}return{key:"dashboard",body:n.jsx(oN,{}),direction:-1,isTakeover:!1}}function QI(){const e=_e({select:t=>t.matches});return hj(e)}function XI(){const{sidebarOpen:e,setSidebarOpen:t}=P(),s=Fe(),r=ws(Z=>Z.panelUp),[o]=mc(),a=_e({select:Z=>Z.location.pathname}),i=_e({select:Z=>Z.location.searchStr}),c=new URLSearchParams(i),d=a==="/channels"&&!!c.get("community")&&!!c.get("id"),l=F1(lt()??!1),m=_e({select:Z=>$1(Z.matches)});bv();const[f]=_s(),p=P(Z=>Z.isStreaming),{data:h}=bc(f),g=Hc(h??null,f??""),{room:x,unreadRoomCount:b}=j1();C1(),jy({cwd:f,isStreaming:p,color:h?g.color:void 0}),qI(),dj(),sb(),PE(),rb(),Qx(),Qj(),x1(),b1();const y=y1();v1(),Sv(),n0(),$w(),Bw(),Pg(),Ix(),iw(),Lg(),uv(),lx(),Sy(),Fg(),ow(),$g(),b0(),Hx();const N=P(Z=>Z.onboardingHiddenForSession),k=P(Z=>Z.setOnboardingHiddenForSession),{shouldShowOnboarding:I,isLoading:v,isOnboardingComplete:A,isOnboardingDismissed:R}=Yt(),_=Cv({shouldShowOnboarding:I,onboardingHiddenForSession:N});Av({done:A||R,overlayVisible:_}),Uw({blocked:_});const{dataUpdatedAt:O,errorUpdatedAt:M,error:T}=Le({refetchOnMount:L1}),j=O>on,S=M>on,E=P1(M,T),[w,D]=u.useState(!1);u.useEffect(()=>{if(j)return;const Z=setTimeout(()=>D(!0),YI);return()=>clearTimeout(Z)},[j]);const F=(E==null?void 0:E.status)===void 0,$=!j&&F&&(S||w),W=j||(E==null?void 0:E.status)===void 0?void 0:E,[ne,fe]=u.useState(!1);u.useEffect(()=>{if(!v)return;const Z=setTimeout(()=>fe(!0),3e3);return()=>clearTimeout(Z)},[v]);const z=u.useCallback(()=>k(!0),[k]),Y=VI(),{origin:te,originLabel:de}=Bg(o),{data:Q}=zg(o,{enabled:!1,select:Z=>Z.title}),q=QI(),re=u.useMemo(()=>({sessionId:o??void 0,agentName:h?$e(h):void 0,agentVisual:h?g:void 0,origin:te,originLabel:de,sessionTitle:Q,sessionDirectoryName:f?ol(f):void 0,room:x,teamViewMode:Ug(new URLSearchParams(i).get("view")??void 0)}),[o,h,g,te,de,Q,f,x,i]),ge=tE();return $?n.jsx(I1,{}):(W==null?void 0:W.status)!==void 0?n.jsx(M1,{status:W.status,message:W.message,code:W.code}):v&&!ne?n.jsx("div",{className:"bg-background h-dvh"}):n.jsxs(Kg,{children:[n.jsx(k1,{unreadRoomCount:b}),n.jsxs(Vb,{reducedMotion:"user",children:[n.jsx(Xe,{mode:"wait",children:_?n.jsx(se.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50",children:n.jsx(Qv,{onComplete:z,slots:D1})},"onboarding"):n.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"h-dvh",children:n.jsxs("div",{"data-testid":"app-shell",className:"bg-background text-foreground flex h-dvh flex-col",children:[n.jsxs(Hg,{open:e,onOpenChange:t,className:K("flex-1 overflow-hidden",s&&"min-h-0"),style:{"--sidebar-width":"calc(272px + 1rem)"},children:[!s&&n.jsxs(Wg,{variant:"inset",children:[n.jsx(N1,{isFullscreen:y}),n.jsx(ku,{}),n.jsx("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:n.jsx(Xe,{mode:"wait",initial:!1,custom:Y.direction,children:n.jsx(se.div,{"data-testid":"sidebar-body-swap",custom:Y.direction,initial:"enter",animate:"center",exit:"exit",variants:{enter:Z=>({x:`${Z*100}%`,opacity:0}),center:{x:0,opacity:1},exit:Z=>({x:`${Z*-100}%`,opacity:0})},transition:{duration:.2,ease:[.4,0,.2,1]},className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:Y.body},Y.key)})}),n.jsx(Gg,{className:"px-2 py-3",children:n.jsx(fl,{})}),n.jsx(qg,{})]}),n.jsxs(Yg,{className:"overflow-hidden",inert:s&&r,children:[ze()&&n.jsx(Pj,{className:K("app-drag-region",!e&&!y&&"desktop-darwin:pl-20")}),n.jsxs("header",{className:"app-drag-region @container/bar relative flex h-9 shrink-0 items-center gap-1 border-b px-2 transition-[border-color] duration-300 lg:gap-2",children:[!s&&n.jsxs(n.Fragment,{children:[n.jsx(Vg,{className:"-ml-0.5"}),n.jsx($j,{}),n.jsx(Qg,{orientation:"vertical",className:"mr-1 h-4"})]}),s&&n.jsx(BN,{}),n.jsx(Xe,{mode:"wait",initial:!1,children:q&&n.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:"flex min-w-0 flex-1 items-center gap-1 self-stretch lg:gap-2",children:n.jsx(Xg,{value:re,children:n.jsx(q.Header,{})})},q.key)}),n.jsx(_E,{}),n.jsx(WE,{}),n.jsx(qE,{}),n.jsx(Jg,{})]}),n.jsx(B1,{descriptors:ge}),n.jsx("main",{id:Id,className:"flex-1 overflow-hidden pb-[var(--pip-dock,0px)]",children:n.jsxs(Zg,{direction:"horizontal",id:Tr,autoSaveId:Tr,children:[n.jsx(yc,{id:"main-content",order:1,minSize:30,defaultSize:100,children:n.jsx(se.div,{initial:l?{opacity:0}:!1,animate:{opacity:1},transition:l?{duration:.12,ease:"easeOut"}:{duration:0},"data-route-fade":l,className:"h-full",children:n.jsx(ex,{})},m)}),n.jsx(lj,{pathname:a,isRemoteCommunityRoom:d})]})})]})]}),s&&n.jsx(kE,{takeover:Y.isTakeover?Y.body:null})]})},"main-app")}),n.jsx(bA,{}),n.jsx(xE,{onboardingOverlayVisible:_}),n.jsx(g1,{}),n.jsx(WN,{}),n.jsx(mA,{}),n.jsx(AI,{}),n.jsx(Lw,{}),n.jsx(GI,{}),n.jsx(Uy,{}),n.jsx(Ib,{}),n.jsx(BI,{}),n.jsx(sx,{}),n.jsx(WI,{})]})]})}const ET=XI;export{ET as component};
80
+ `)}const iI={template:oI,"design-your-own":aI};function cI(e,t){return iI[e](t)}function lI(e,t){return qx(cI(e,t))}const Pu="🤖",dI=["🤖","🦾","🧭","🛰️","📡","🔭","🗺️","🧠","🦉","🦊","🐝","🐙","🚀","⚡","🌟","🔮","🛠️","🔧","📊","📋","✅","🗂️","🔔","🛡️"];function Bi({face:e,title:t,subtitle:s,chips:r,variant:o,tabIndex:a,onSelect:i,onKeyDown:c,ref:d,"data-testid":l}){return n.jsxs("button",{ref:d,type:"button",tabIndex:a,onClick:i,onKeyDown:c,"data-gallery-card":"","data-testid":l,className:K("card-interactive group flex h-full flex-col gap-2 rounded-xl border p-4 text-left","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",o==="design"?"border-primary/40 bg-primary/5 hover:border-primary/60 border-dashed":"bg-card hover:border-border/80 hover:shadow-md"),children:[n.jsx("span",{className:"text-3xl leading-none","aria-hidden":!0,children:e}),n.jsxs("div",{className:"space-y-0.5",children:[n.jsx("p",{className:"text-sm font-semibold",children:t}),n.jsx("p",{className:"text-muted-foreground text-xs leading-relaxed",children:s})]}),r&&r.length>0&&n.jsx("div",{className:"mt-auto flex flex-wrap gap-1 pt-1",children:r.map(m=>n.jsx("span",{className:"bg-muted text-muted-foreground text-2xs rounded-full px-2 py-0.5",children:m},m))})]})}function uI(e){return{source:e.source,name:e.name,displayName:wl(e),description:e.description,icon:e.icon,tags:e.tags,category:e.category,packageName:e.name,...e.marketplace?{marketplace:e.marketplace}:{}}}function mI(e){return e.tags&&e.tags.length>0?e.tags.slice(0,2):e.category?[e.category]:[]}function hI(e){const t=e.replace(/\/+$/,"");return t.split("/").pop()??t}function fI({onDesignYourOwn:e,onSelectTemplate:t,onImport:s}){const{data:r,error:o,isLoading:a}=kg(),i=Ll(a),[c,d]=u.useState(""),[l,m]=u.useState(!1),f=u.useMemo(()=>(r??[]).filter(h=>h.type==="agent"),[r]),p=Ny(f.length+1);return n.jsxs("div",{className:"space-y-5",children:[n.jsxs("div",{role:"group","aria-label":"Choose what your agent will do",className:"grid grid-cols-1 gap-3 sm:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4","data-testid":"agent-gallery",children:[n.jsx(Bi,{ref:p.setRef(0),variant:"design",face:n.jsx(bo,{className:"text-primary size-7"}),title:"Design your own",subtitle:"Describe the job in your own words.",tabIndex:p.tabIndexFor(0),onSelect:e,onKeyDown:h=>p.handleKeyDown(h,0),"data-testid":"gallery-design-your-own"}),f.map((h,g)=>{const x=g+1;return n.jsx(Bi,{ref:p.setRef(x),variant:"template",face:h.icon??Pu,title:wl(h),subtitle:h.description??"A ready-made agent.",chips:mI(h),tabIndex:p.tabIndexFor(x),onSelect:()=>t(uI(h)),onKeyDown:b=>p.handleKeyDown(b,x),"data-testid":`gallery-template-${h.name}`},h.name)}),i&&f.length===0&&Array.from({length:2}).map((h,g)=>n.jsx(Pt,{className:"h-28 rounded-xl","data-testid":"gallery-skeleton"},g))]}),!i&&f.length===0&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"gallery-templates-note",children:o?"Couldn’t load ready-made agents. Check marketplace sources in Settings.":"No ready-made agents yet. Add a marketplace source in Settings."}),n.jsxs(yo,{open:l,onOpenChange:m,children:[n.jsx(vo,{asChild:!0,children:n.jsxs("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex items-center gap-1 text-xs transition-colors","data-testid":"advanced-toggle",children:[n.jsx(qt,{className:K("size-3.5 transition-transform",l&&"rotate-180")}),"Build from a template URL"]})}),n.jsx(wo,{children:n.jsxs("div",{className:"flex items-center gap-2 pt-2",children:[n.jsx(gt,{value:c,onChange:h=>d(h.target.value),placeholder:"github.com/org/repo","data-testid":"custom-url-input",className:"flex-1"}),n.jsx(L,{size:"sm",disabled:!c,onClick:()=>{const h=hI(c);t({source:c,name:h,displayName:Sg(h)}),d("")},"data-testid":"custom-url-go",children:"Continue"})]})})]}),s&&n.jsx("div",{className:"border-t pt-3",children:n.jsxs("button",{type:"button",onClick:s,className:"text-muted-foreground hover:text-foreground inline-flex items-center gap-1.5 text-sm transition-colors","data-testid":"gallery-import-link",children:[n.jsx(Cg,{className:"size-4"}),"Bring in an existing project folder",n.jsx("span",{"aria-hidden":!0,children:"→"})]})})]})}function pI({value:e,onChange:t}){return n.jsx("div",{role:"group","aria-label":"Choose a face",className:"flex flex-wrap gap-1.5","data-testid":"face-picker",children:dI.map(s=>{const r=s===e;return n.jsx("button",{type:"button","aria-label":`Face ${s}`,"aria-pressed":r,onClick:()=>t(s),className:K("flex size-9 items-center justify-center rounded-md border text-lg transition-colors","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",r?"border-primary bg-primary/10":"hover:border-border hover:bg-accent border-transparent"),"data-testid":`face-${s}`,children:n.jsx("span",{"aria-hidden":!0,children:s})},s)})})}function gI({value:e,onChange:t}){return n.jsx("div",{role:"radiogroup","aria-label":"Runs on",className:"flex gap-1.5","data-testid":"runtime-picker",children:Ng.map(s=>{const r=it(s),o=r.icon,a=e===s;return n.jsxs("button",{type:"button",role:"radio","aria-checked":a,onClick:()=>t(s),className:K("flex flex-1 items-center justify-center gap-1.5 rounded-md border px-2 py-1.5 text-xs transition-colors","focus-visible:ring-ring focus-visible:ring-2 focus-visible:ring-offset-2 focus-visible:outline-none",a?"border-primary bg-primary/10 font-medium":"hover:border-border hover:bg-accent border-transparent"),"data-testid":`runtime-${s}`,children:[n.jsx(o,{size:14}),r.label]},s)})})}function xI({face:e,name:t,jobLine:s,capabilities:r,className:o}){const a=t.trim()||"Your agent",i=t.trim().length===0;return n.jsxs("div",{className:K("bg-card shadow-soft flex flex-col items-center gap-3 rounded-lg border p-5",o),"data-testid":"agent-preview",children:[n.jsx("span",{className:"bg-primary/10 flex size-16 items-center justify-center rounded-full text-3xl","aria-hidden":!0,children:e}),n.jsxs("div",{className:"space-y-1 text-center",children:[n.jsx("p",{className:K("text-lg font-semibold",i&&"text-muted-foreground"),"data-testid":"preview-name",children:a}),n.jsx("p",{className:"text-muted-foreground text-sm leading-relaxed",children:s})]}),r.length>0&&n.jsx("div",{className:"flex flex-wrap justify-center gap-1.5","data-testid":"preview-capabilities",children:r.map(c=>n.jsx("span",{className:"bg-muted text-muted-foreground rounded-full px-2 py-0.5 text-xs",children:c},c))})]})}function Lu({schedules:e,checkFailed:t,testIdPrefix:s}){return n.jsxs(n.Fragment,{children:[e.length>0&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":`${s}-package-schedules`,children:[n.jsx(jo,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Brings a schedule"}),n.jsx("dd",{className:"min-w-0 space-y-1",children:e.map((r,o)=>n.jsxs("p",{children:[n.jsx("span",{className:"font-medium",children:r.name}),": ",Ox(r)]},`${r.name}-${o}`))})]}),t&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":`${s}-offer-check-failed`,children:[n.jsx(Yi,{className:"text-status-warning-dot mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Not checked"}),n.jsx("dd",{className:"min-w-0",children:"Couldn’t check for scheduled work. Anything it brings still needs your approval."})]})]})}const zi=4;function bI({form:e,suggestionPool:t,jobLine:s,previewCapabilities:r,onBack:o,onImportInstead:a,onCreate:i,isCreating:c,packageSchedules:d=[],offerCheckFailed:l=!1,isCheckingOffer:m=!1,offerRefusal:f,packageDirectory:p,templateReview:h,inheritance:g,isCheckingInheritance:x=!1}){const b=u.useRef(null),[y,N]=u.useState(0),k=e.displayName.trim().toLowerCase(),I=t.filter(_=>_.toLowerCase()!==k),v=tI(I,y,zi);u.useEffect(()=>{const _=setTimeout(()=>{var O;return(O=b.current)==null?void 0:O.focus()},160);return()=>clearTimeout(_)},[]);const A=e.displayName.trim(),R=c?`Creating ${A||"your agent"}…`:`Create ${A||"agent"}`;return n.jsxs("div",{className:"grid gap-6 md:grid-cols-2",children:[n.jsxs("div",{className:"space-y-5",children:[n.jsxs("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground -ml-1 inline-flex items-center gap-1 text-xs transition-colors","data-testid":"naming-back",children:[n.jsx(Ec,{className:"size-3.5"}),"Choose a different agent"]}),n.jsxs("div",{className:"space-y-2",children:[n.jsx(We,{htmlFor:"agent-name",className:"text-sm",children:"Name"}),n.jsx(gt,{ref:b,id:"agent-name",placeholder:"Name your agent",value:e.displayName,onChange:_=>e.handleNameChange(_.target.value),"aria-invalid":e.showSlugError,"aria-describedby":e.showSlugError?"agent-name-error":void 0,className:"h-11 text-base"}),e.showSlugError&&n.jsx("p",{id:"agent-name-error",className:"text-destructive text-xs",role:"alert",children:e.slugValidation.error}),e.conflictStatus==="exists-has-dork"&&n.jsxs("div",{"data-testid":"conflict-status",children:[n.jsx("p",{className:"text-status-warning-fg text-xs font-medium",children:"This folder has a project"}),a&&n.jsx("button",{type:"button",className:"text-primary text-xs hover:underline",onClick:a,"data-testid":"import-instead-link",children:"Import it instead"})]})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-center justify-between",children:[n.jsx("span",{className:"text-muted-foreground text-xs",children:"Need a name?"}),n.jsx("button",{type:"button",onClick:()=>N(_=>_+zi),"aria-label":"Show other names",className:"text-muted-foreground hover:text-foreground focus-visible:ring-ring rounded text-sm transition-colors focus-visible:ring-2 focus-visible:outline-none","data-testid":"suggestion-reroll",children:n.jsx("span",{"aria-hidden":!0,children:"🎲"})})]}),n.jsx("div",{className:"flex flex-wrap gap-1.5","data-testid":"name-suggestions",children:v.map(_=>n.jsx("button",{type:"button",onClick:()=>e.handleNameChange(_),className:"bg-muted hover:bg-accent focus-visible:ring-ring rounded-full px-2.5 py-1 text-xs transition-colors focus-visible:ring-2 focus-visible:outline-none","data-testid":`suggestion-${_}`,children:_},_))})]}),n.jsxs("div",{className:"space-y-2",children:[n.jsxs("div",{className:"flex items-baseline gap-2",children:[n.jsx(We,{className:"text-sm",children:"Face"}),!e.icon&&n.jsx("span",{className:"text-muted-foreground text-xs",children:"Picked for you if skipped"})]}),n.jsx(pI,{value:e.icon,onChange:e.setIcon})]}),n.jsxs(yo,{open:e.directoryOpen,onOpenChange:e.setDirectoryOpen,children:[n.jsx(vo,{asChild:!0,children:n.jsxs("button",{type:"button",className:"text-muted-foreground hover:text-foreground flex w-full items-center gap-1 text-sm transition-colors","data-testid":"details-toggle",children:[n.jsx(qt,{className:K("size-4 transition-transform",e.directoryOpen&&"rotate-180")}),"Details",e.directoryOverride&&n.jsx("span",{className:"bg-primary/10 text-primary ml-1 rounded px-1.5 py-0.5 text-xs",children:"Custom"})]})}),n.jsx(wo,{children:n.jsxs("div",{className:"space-y-4 pt-3",children:[n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(We,{className:"text-muted-foreground text-xs",children:"Runs on"}),n.jsx(gI,{value:e.runtime,onChange:e.setRuntime})]}),p?n.jsxs("div",{className:"space-y-1.5","data-testid":"package-directory",children:[n.jsx(We,{className:"text-muted-foreground text-xs",children:"Directory"}),n.jsx("p",{className:"font-mono text-xs [overflow-wrap:anywhere]",children:p}),n.jsx("p",{className:"text-muted-foreground text-xs",children:"Kept in its package’s folder so updates reach it."})]}):n.jsxs("div",{className:"space-y-1.5",children:[n.jsx(We,{htmlFor:"agent-directory",className:"text-muted-foreground text-xs",children:"Directory"}),n.jsx(Bb,{id:"agent-directory",placeholder:e.resolvedDirectory||(e.defaultDirectory?`${e.defaultDirectory}/…`:""),value:e.directoryOverride,onChange:e.setDirectoryOverride,onBrowse:()=>e.setDirectoryPickerOpen(!0),browseTestId:"browse-directory-button","data-testid":"directory-preview"}),e.conflictStatus==="no-path"&&n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"conflict-status",children:"Creates a new folder"}),e.conflictStatus==="exists-no-dork"&&n.jsx("p",{className:"text-muted-foreground text-xs","data-testid":"conflict-status",children:"That folder is already there. The project goes inside it."}),e.conflictStatus==="error"&&n.jsx("p",{className:"text-destructive text-xs","data-testid":"conflict-status",children:"Can’t open this folder. Pick another."})]}),!p&&e.slug&&!e.showSlugError&&n.jsxs("p",{className:"text-muted-foreground text-xs",children:["Folder name:"," ",n.jsx("code",{className:"bg-muted rounded px-1 py-0.5 font-mono text-xs",children:e.slug})]})]})})]})]}),n.jsxs("div",{className:"flex flex-col gap-4 self-start",children:[n.jsx(xI,{face:e.icon||Pu,name:e.displayName,jobLine:s,capabilities:r}),(d.length>0||l)&&n.jsx("dl",{className:"bg-muted/30 space-y-2.5 rounded-lg border p-3.5 text-sm",children:n.jsx(Lu,{schedules:d,checkFailed:l,testIdPrefix:"naming"})}),f!==void 0&&n.jsx(Ml,{error:f}),h,m&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"naming-checking-offer",children:"Checking for scheduled work…"}),g,n.jsx(L,{size:"lg",onClick:i,disabled:!e.canSubmit||c||m||x||f!==void 0,"data-testid":"create-button",children:R})]})]})}function yI({seed:e,packageSchedules:t,isCheckingOffer:s,offerCheckFailed:r,offerRefusal:o,resolvedDirectory:a,canSubmit:i,isCreating:c,inheritance:d,isCheckingInheritance:l=!1,onCreate:m,onCustomize:f,onNotNow:p}){const{displayName:h,persona:g,runtime:x,capabilities:b,skills:y,schedule:N,icon:k}=e.template,I=it(x??"claude-code").label,v=h.trim().charAt(0).toUpperCase()||"?",A=k&&Nr(k)?k:v,R=e.sourceLabel?`Offered by ${e.sourceLabel}.`:"A ready-made agent.";return n.jsxs("div",{className:"mx-auto max-w-md space-y-6","data-testid":"arrival-confirm",children:[n.jsxs("div",{className:"flex flex-col items-center gap-3 text-center",children:[n.jsx("span",{className:"bg-primary/10 text-primary flex size-20 items-center justify-center rounded-full text-4xl font-semibold","aria-hidden":"true",children:A}),n.jsxs("div",{className:"space-y-1",children:[n.jsxs(tt,{className:"text-xl",children:["Meet ",h]}),n.jsx(ft,{children:R})]})]}),g&&n.jsx("p",{className:"text-foreground text-sm leading-relaxed whitespace-pre-line",children:g}),n.jsxs("dl",{className:"bg-muted/30 space-y-2.5 rounded-lg border p-3.5 text-sm",children:[n.jsxs("div",{className:"flex items-center gap-2",children:[n.jsx(vI,{runtime:x}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Runs on"}),n.jsx("dd",{children:I})]}),n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ns,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Lives in"}),n.jsx("dd",{className:"min-w-0",children:a?n.jsx("code",{className:"text-xs break-all",children:a}):n.jsx(Pt,{className:"h-3.5 w-48 max-w-full rounded"})})]}),N&&n.jsxs("div",{className:"flex items-start gap-2","data-testid":"arrival-schedule",children:[n.jsx(jo,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Runs on a schedule"}),n.jsx("dd",{children:N})]}),n.jsx(Lu,{schedules:t,checkFailed:r,testIdPrefix:"arrival"}),b&&b.length>0&&n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ex,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Can"}),n.jsx("dd",{children:b.join(", ")})]}),y&&y.length>0&&n.jsxs("div",{className:"flex items-start gap-2",children:[n.jsx(Ag,{className:"text-muted-foreground mt-0.5 size-4 shrink-0"}),n.jsx("dt",{className:"text-muted-foreground shrink-0",children:"Uses skills"}),n.jsx("dd",{children:y.join(", ")})]})]}),o!==void 0&&n.jsx(Ml,{error:o}),n.jsxs("div",{className:"flex flex-col gap-2",children:[!i&&n.jsx("p",{className:"text-status-warning-fg text-center text-xs","data-testid":"arrival-needs-name",children:"Needs a name. Choose “Customize first” to add one."}),s&&n.jsx("p",{className:"text-muted-foreground text-center text-xs","data-testid":"arrival-checking-offer",children:"Checking for scheduled work…"}),d,n.jsx(L,{size:"lg",onClick:m,disabled:c||!i||s||l||o!==void 0,"data-testid":"arrival-create",children:c?"Creating…":`Create ${h}`}),n.jsxs("div",{className:"flex items-center justify-center gap-4",children:[n.jsx(L,{variant:"ghost",size:"sm",onClick:f,className:"text-muted-foreground","data-testid":"arrival-customize",children:"Customize first"}),n.jsx(L,{variant:"ghost",size:"sm",onClick:p,className:"text-muted-foreground","data-testid":"arrival-not-now",children:"Not now"})]})]})]})}function vI({runtime:e}){const t=it(e??"claude-code").icon;return n.jsx(t,{size:16,className:"text-muted-foreground shrink-0"})}function wI(e){const t=e==null?void 0:e.body;return(t==null?void 0:t.code)==="template_needs_review"?t.template:void 0}function jI(e,t){const s=e.replace(/\/*$/,"/");return t.filter(r=>r.path===e||r.path.startsWith(s))}function kI(e){return e.omitted==="link"?"A link. It isn’t copied into the agent.":e.omitted==="not-text"?`Not text (${e.bytes} bytes).`:`Too long to show (${e.bytes} bytes). Read it in the template first.`}function SI(e){const t=(e.settings??[]).filter(s=>s.omitted==="too-long"||s.omitted==="not-text");return t.length===0?"Create with these":t.length===1?`Create without seeing ${t[0].path}`:`Create without seeing ${t.length} files`}function CI(e){const{disclosed:t}=e;return[...e.findings.map(s=>({key:`finding:${s.path}`,label:s.path,detail:"Settings the agent loads: hooks, permission rules or servers.",files:jI(s.path,e.settings??[])})),...t.hooks.map((s,r)=>({key:`hook:${r}`,label:ut(s.command),detail:`Runs on ${s.event}${s.source?`, while ${ut(s.source)} is in use`:""}.`})),...(t.skillCommands??[]).map((s,r)=>({key:`command:${s.source}:${r}`,label:ut(s.command),detail:`Runs when skill “${ut(s.skill)}” is used (${ut(s.source)})`+(s.usesArguments?". Reads the text typed after it.":".")})),...t.mcpServers.map(s=>({key:`mcp:${s.name}`,label:s.command?Ig(s.command,s.args):ut(s.url??s.name),detail:`Starts the MCP server “${ut(s.name)}”.`})),...t.skillTools.map(s=>({key:`tools:${s.source}`,label:s.tools.map(ut).join(", "),detail:`Skill “${ut(s.skill)}” may use these without asking you.`}))]}function NI({template:e,onCreateAnyway:t,onCancel:s,isCreating:r}){return n.jsxs("div",{role:"alert",className:"space-y-3 rounded-md border border-amber-500/40 bg-amber-500/5 p-3 text-sm","data-testid":"template-review",children:[n.jsxs("p",{className:"flex items-center gap-2 font-medium text-amber-700 dark:text-amber-300",children:[n.jsx(Eg,{className:"size-4 shrink-0","aria-hidden":!0}),"This template brings things that run in your agent’s chats"]}),n.jsxs("p",{className:"text-muted-foreground text-xs [overflow-wrap:anywhere]",children:["From ",e.source,". Check each before you create the agent."]}),n.jsx("ul",{className:"space-y-2",children:CI(e).map(o=>{var a;return n.jsxs("li",{className:"text-xs",children:[n.jsx("code",{className:"bg-muted text-foreground block rounded px-1.5 py-1 font-mono [overflow-wrap:anywhere] whitespace-pre-wrap",children:o.label}),n.jsx("span",{className:"text-muted-foreground",children:o.detail}),(a=o.files)==null?void 0:a.map(i=>n.jsxs("details",{className:"mt-1","data-testid":"template-settings-file",children:[n.jsx("summary",{className:"text-muted-foreground hover:text-foreground cursor-pointer",children:i.path===o.label?"Show what it contains":`Show ${i.path}`}),i.content!==void 0?n.jsx("pre",{className:"border-border/60 bg-muted/40 mt-1 max-h-[50dvh] overflow-auto rounded border p-2 font-mono text-xs break-words whitespace-pre-wrap md:max-h-56",children:i.content}):n.jsx("p",{className:"text-muted-foreground mt-1",children:kI(i)})]},i.path))]},o.key)})}),n.jsxs("div",{className:"flex flex-wrap justify-end gap-2",children:[n.jsx(L,{variant:"ghost",size:"sm",onClick:s,disabled:r,children:"Don’t create it"}),n.jsx(L,{size:"sm",onClick:t,disabled:r,className:"h-auto max-w-full py-1.5 text-left [overflow-wrap:anywhere] whitespace-normal",children:r?"Creating…":SI(e)})]})]})}function AI(){const{isOpen:e,seed:t,onCreated:s,close:r}=Cs(),o=en(z=>z.open),a=YE(),i=Pe(),[c,d]=u.useState("gallery"),[l,m]=u.useState(null),[f,p]=u.useState(!1);e!==f&&(p(e),e&&(m(null),d(t?"arrival":"gallery")));const h=t!=null&&t.template.icon&&Nr(t.template.icon)?t.template.icon:void 0,g=l!=null&&l.icon&&Nr(l.icon)?l.icon:h??null,x=(t==null?void 0:t.template.runtime)??"claude-code",b=(t==null?void 0:t.packageName)!==void 0?t:(l==null?void 0:l.packageName)!==void 0?{packageName:l.packageName,marketplace:l.marketplace}:null,y=XE(b),{data:N}=Le(),k=As()?void 0:w,I=b&&y.packageAgentName&&(N!=null&&N.dorkHome)?`${N.dorkHome}/agents/${y.packageAgentName}`:void 0,[v,A]=u.useState(null),R=QE({step:c,templateName:(l==null?void 0:l.displayName)??null,seedDisplayName:(t==null?void 0:t.template.displayName)??null,faceSeed:g,runtimeSeed:x}),_=eI(l?{name:l.name,description:l.description,category:l.category,tags:l.tags}:t?{name:t.template.displayName,description:t.template.persona}:void 0),O=l?l.description??"A ready-made agent.":t!=null&&t.template.persona?t.template.persona:"You’ll define the job together in your first chat.",M=l?l.tags??[]:(t==null?void 0:t.template.capabilities)??[];function T(){R.reset(),A(null),m(null),d("gallery")}const j=u.useCallback(z=>{m(z),d("naming")},[]),S=u.useCallback(()=>{m(null),d("naming")},[]);function E(){d(t?"arrival":"gallery")}function w(){r(),T(),o()}function D(z){var de;if(!R.canSubmit||a.isPending)return;const Y=(b==null?void 0:b.packageName)!==void 0&&y.approval?{package:{name:b.packageName,...b.marketplace?{marketplace:b.marketplace}:{},...y.approval}}:void 0,te=Y?void 0:(l==null?void 0:l.source)??(t==null?void 0:t.template.source);a.mutate({name:R.slug,displayName:R.displayName.trim()||void 0,runtime:R.runtime,...!Y&&R.directoryOverride?{directory:R.directoryOverride}:{},...R.icon?{icon:R.icon}:{},...Y??{},...te?{template:te}:{},...z?{approvedTemplateHash:z}:{},...t!=null&&t.template.persona?{persona:t.template.persona}:{},...(de=t==null?void 0:t.template.capabilities)!=null&&de.length?{capabilities:t.template.capabilities}:{}},{onSuccess:Q=>{const q=crypto.randomUUID(),re=Q.displayName??Q.name,ge=l||t?"template":"design-your-own";Rg.getState().register(q,{name:Q.name,displayName:re,agentId:Q.id,icon:Q.icon,color:Q.color,bornAt:Q.registeredAt,path:Q._path,runtime:Q.runtime,kickoffMessage:lI(ge,{displayName:re,capabilities:Q.capabilities})}),Fb();const Z=s;if(r(),T(),Z){Z();return}i($t({agentId:Q.id,draft:"1",session:q,runtime:Q.runtime}))},onError:Q=>{const q=wI(Q);q&&A(q)}})}function F(z){z||(r(),T())}const $=_l(e),W=n.jsx(Yv,{agentName:R.displayName||(t==null?void 0:t.template.displayName)||""}),ne=JE[c],fe=c==="gallery"?"max-w-6xl":c==="naming"?"max-w-5xl":"max-w-2xl";return n.jsx(xt,{open:e,onOpenChange:F,defaultFullscreen:!0,children:n.jsxs(bt,{className:"flex flex-col gap-0 p-0",children:["title"in ne&&n.jsxs(ht,{className:"shrink-0 border-b px-5 py-4",children:[n.jsx(tt,{children:ne.title}),n.jsx(ft,{children:ne.description})]}),n.jsx("span",{className:"sr-only","aria-live":"polite","aria-atomic":"true",children:ne.description}),n.jsx("div",{className:"flex min-h-0 flex-1 flex-col overflow-y-auto px-5 py-6 sm:px-8",children:n.jsxs("div",{className:`mx-auto my-auto w-full ${fe}`,children:[n.jsx(Xe,{mode:"wait",children:n.jsxs(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.15},children:[c==="gallery"&&n.jsx(fI,{onDesignYourOwn:S,onSelectTemplate:j,onImport:k}),c==="arrival"&&t&&n.jsx(yI,{seed:t,packageSchedules:y.schedules,isCheckingOffer:y.isChecking,offerCheckFailed:y.failed,offerRefusal:y.refusal,resolvedDirectory:I??R.resolvedDirectory,canSubmit:R.canSubmit,isCreating:a.isPending,inheritance:W,isCheckingInheritance:$.isPending,onCreate:()=>D(),onCustomize:()=>d("naming"),onNotNow:()=>F(!1)}),c==="naming"&&n.jsx(bI,{form:R,suggestionPool:_,jobLine:O,previewCapabilities:M,onBack:E,onImportInstead:k,onCreate:()=>D(),isCreating:a.isPending,packageSchedules:y.schedules,offerCheckFailed:y.failed,offerRefusal:y.refusal,isCheckingOffer:y.isChecking,packageDirectory:I,inheritance:W,isCheckingInheritance:$.isPending,templateReview:v?n.jsx(NI,{template:v,isCreating:a.isPending,onCreateAnyway:()=>D(v.contentHash),onCancel:()=>A(null)}):void 0})]},c)}),c!=="gallery"&&n.jsx(fb,{className:"mt-6"})]})}),n.jsx(dc,{open:R.directoryPickerOpen,onOpenChange:R.setDirectoryPickerOpen,initialPath:R.directoryOverride||R.defaultDirectory,onSelect:z=>{R.setDirectoryOverride(z),R.directoryOpen||R.setDirectoryOpen(!0)}})]})})}function EI({sessionId:e}){u.useEffect(()=>{var a;const r=kt.getState(),o=((a=r.sessions[e])==null?void 0:a.cwd)??r.statusCwds[e]??null;return is.pinSession(e,o),xa.getState().setPinnedSession(e),()=>{is.unpinSession(),xa.getState().setPinnedSession(null)}},[e]);const t=Tg(e),s=u.useMemo(()=>wb(t),[t]);return s===null?n.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-4 text-center text-sm",children:"No live widget in this chat"}):n.jsx(jb,{code:s.code,isIncomplete:s.isIncomplete,sessionId:e,isLatestMessage:s.isLatest,isStreaming:s.isStreaming},s.sourceMessageKey)}function II({content:e}){return n.jsx("div",{className:"text-muted-foreground flex h-full items-center justify-center p-4 text-center text-sm",children:e.title})}const xr=64,RI={type:"spring",stiffness:480,damping:44};function TI({content:e,onRestore:t,onClose:s}){u.useEffect(()=>(document.documentElement.style.setProperty("--pip-dock",`${xr}px`),()=>{document.documentElement.style.removeProperty("--pip-dock")}),[]);const r=Kb();return js.createPortal(n.jsxs(se.div,{"data-slot":"pip-minibar",role:"complementary","aria-label":e.title,initial:{y:xr},animate:{y:0},exit:{y:xr},transition:RI,style:{bottom:`max(var(--mobile-tab-dock, 0px), ${r}px)`},className:"bg-background border-border shadow-elevated fixed inset-x-0 z-40 flex h-16 items-center border-t",children:[n.jsxs("button",{type:"button",onClick:t,className:"focus-ring flex h-full min-w-0 flex-1 items-center gap-3 px-4 text-left",children:[n.jsx("span",{className:"bg-primary size-2 shrink-0 animate-pulse rounded-full"}),n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e.title}),n.jsx(Iy,{className:"text-muted-foreground size-4 shrink-0"})]}),n.jsx("button",{type:"button","aria-label":"Close",onClick:s,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring mr-3 flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(Ue,{className:"size-4"})})]}),document.body)}const Zn={peek:.5,expanded:.94},DI=.4,OI=800,Ui=500,br={type:"spring",stiffness:480,damping:44};function MI({content:e,onClose:t,onMinimize:s,children:r}){const o=ny(),a=Zb(),[i,c]=u.useState("peek"),d=Jl(),l=d.height,m=Math.max(0,window.innerHeight-d.top-d.height),f=Zn.expanded*l,p=(Zn.expanded-Zn.peek)*l,h=i==="expanded"?0:p;u.useEffect(()=>{a.start({y:h,transition:br})},[a,h]);const g=(b,y)=>{const N=h+y.offset.y,k=y.velocity.y,I=N-p,v=Zn.peek*l;if(I>DI*v||I>0&&k>OI){s();return}let A;k<-Ui?A="expanded":k>Ui?A="peek":A=N<p/2?"expanded":"peek",A===i?a.start({y:h,transition:br}):c(A)},x=b=>{b.target.closest("button")||o.start(b)};return js.createPortal(n.jsxs(se.div,{"data-slot":"pip-sheet",role:"complementary","aria-label":e.title,initial:{y:f},animate:a,exit:{y:f},transition:br,drag:"y",dragListener:!1,dragControls:o,dragConstraints:{top:0,bottom:f},dragElastic:.1,dragMomentum:!1,onDragEnd:g,style:{height:f,bottom:m},className:"bg-background border-border shadow-modal fixed inset-x-0 z-40 flex flex-col rounded-t-lg border-t",children:[n.jsxs("div",{onPointerDown:x,className:"cursor-grab touch-none select-none active:cursor-grabbing",children:[n.jsx("div",{className:"bg-muted mx-auto mt-4 h-2 w-[100px] rounded-full"}),n.jsxs("div",{className:"flex items-center justify-between gap-2 border-b pt-1 pr-[max(1rem,env(safe-area-inset-right))] pb-2 pl-[max(1rem,env(safe-area-inset-left))]",children:[n.jsx("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:e.title}),n.jsx("button",{type:"button","aria-label":"Minimize",onClick:s,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(qt,{className:"size-4"})}),n.jsx("button",{type:"button","aria-label":"Close",onClick:t,className:"text-muted-foreground hover:bg-muted hover:text-foreground focus-ring flex size-11 shrink-0 items-center justify-center rounded-md transition-colors",children:n.jsx(Ue,{className:"size-4"})})]})]}),n.jsx("div",{"data-slot":"pip-sheet-content",style:{marginBottom:h},className:"min-h-0 flex-1 overflow-y-auto pt-3 pr-[max(0.75rem,env(safe-area-inset-right))] pb-[max(0.75rem,env(safe-area-inset-bottom))] pl-[max(0.75rem,env(safe-area-inset-left))]",children:r})]}),document.body)}const Ki=360,Hi=240,qr=16,yr={demo:II,mcp_app:_I,widget:PI};function _I({content:e}){return n.jsx(Mb,{sessionId:e.sessionId,serverName:e.serverName,uri:e.uri,title:e.title,className:"h-full"})}function PI({content:e}){return n.jsx(EI,{sessionId:e.sessionId})}function LI(e){u.useEffect(()=>{},[e])}function Wi(){return{x:window.innerWidth-Ki-qr,y:window.innerHeight-Hi-qr,width:Ki,height:Hi}}function FI(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function Fu(e){switch(e.kind){case"demo":{const t=yr.demo;return n.jsx(t,{content:e})}case"mcp_app":{const t=yr.mcp_app;return n.jsx(t,{content:e})}case"computer":return n.jsx(zb,{content:e});case"widget":{const t=yr.widget;return n.jsx(t,{content:e})}default:return e}}function $I({content:e,onClose:t}){const s=P(c=>c.pipGeometry),r=P(c=>c.setPipGeometry),[o,a]=u.useState(Wi);u.useEffect(()=>{if(s!==null)return;const c=()=>a(d=>{const l=Wi();return FI(d,l)?d:l});return c(),window.addEventListener("resize",c),()=>window.removeEventListener("resize",c)},[s]);const i=u.useMemo(()=>s||((e==null?void 0:e.kind)!=="computer"?o:{...o,width:480,height:360,x:Math.max(0,window.innerWidth-480-qr),y:Math.max(0,window.innerHeight-360-80)}),[s,o,e==null?void 0:e.kind]);return n.jsx(Xe,{children:e!==null&&n.jsx(zy,{title:e.title,geometry:i,onGeometryChange:r,onClose:t,minWidth:e.kind==="computer"?360:void 0,minHeight:e.kind==="computer"?300:void 0,children:Fu(e)},"pip-panel")})}function BI(){const e=P(d=>d.pipContent),t=P(d=>d.pipMinimized),s=P(d=>d.closePip),r=P(d=>d.minimizePip),o=P(d=>d.restorePip),a=P(d=>d.openPip),i=Fe();LI(a);const c=u.useRef(i);return u.useEffect(()=>{i&&!c.current&&e!==null&&r(),c.current=i},[i,e,r]),i?n.jsx(Xe,{children:e!==null&&(t?n.jsx(TI,{content:e,onRestore:o,onClose:s},"pip-minibar"):n.jsx(MI,{content:e,onClose:s,onMinimize:r,children:Fu(e)},"pip-sheet"))}):n.jsx($I,{content:e,onClose:s})}const zI=new Set(["permission-prompt","question","schedule-approval"]),UI={"permission-prompt":"Needs your approval to go on.",question:"Has a question for you.","schedule-approval":"Wants to run on a timer."};function $u(e){const t=hl(),s=Dg(),r=Dt(e),o=u.useRef(null);u.useEffect(()=>{var l,m,f,p;if(s)return;const a=new Map;for(const h of t)zI.has(h.kind)&&a.set(h.id,{id:h.id,who:h.primary,summary:UI[h.kind],deepLink:h.deepLink});const i=o.current;if(o.current=new Set(a.keys()),i===null)return;const c=[...a.values()].filter(h=>!i.has(h.id)),d=[...i].filter(h=>!a.has(h));c.length>0&&((m=(l=r.read()).onArrive)==null||m.call(l,c)),d.length>0&&((p=(f=r.read()).onDepart)==null||p.call(f,d,a.size))},[s,t,r])}function KI(){const{permission:e}=cb(),{prefs:t}=lb(),s=ro(),r=ze(),o=u.useRef(new Map),a=Dt(s),i=u.useCallback(()=>r||e!=="granted"||typeof document>"u"||!document.hidden?!1:typeof window<"u"&&typeof window.Notification<"u",[r,e]),c=u.useCallback((f,p,h,g)=>{let x;try{x=new Notification(p,{body:h,tag:f,silent:!0})}catch{return}x.onclick=()=>{var b;window.focus(),x.close(),o.current.delete(f),g!==null&&((b=a.read())==null||b({href:g}))},x.onclose=()=>{o.current.delete(f)},o.current.set(f,{notification:x,href:g})},[a]),d=u.useCallback(f=>{if(i())for(const p of f)c(p.id,`${p.who} needs you`,p.summary,p.deepLink)},[i,c]),l=u.useCallback(f=>{for(const p of f){const h=o.current.get(p);h!==void 0&&(h.notification.close(),o.current.delete(p))}},[]);$u({onArrive:d,onDepart:l});const m=t.notifyOnTurnCompleteWhileAway;pe("notification",f=>{const p=Og.safeParse(f);if(!p.success)return;const h=p.data.notification;if(h.tier!=="notable"||!m||!i())return;const g=Mg(h),x=g===null?null:HI(g.to,g.search);c(h.id,h.title,h.body??"",x)}),u.useEffect(()=>{const f=o.current;return()=>{for(const{notification:p}of f.values())p.close();f.clear()}},[])}function HI(e,t){const s=new URLSearchParams;for(const[o,a]of Object.entries(t))a!=null&&s.set(o,String(a));const r=s.toString();return r===""?e:`${e}?${r}`}function WI(){const{play:e}=Yx(),t=u.useCallback(()=>{e("knock"),Vx()},[e]),s=u.useCallback((r,o)=>{o===0&&e("settle")},[e]);return $u({onArrive:t,onDepart:s}),KI(),null}function GI(){const e=P(r=>r.shortcutsPanelOpen),t=P(r=>r.setShortcutsPanelOpen),s=_g();return n.jsx(xt,{open:e,onOpenChange:t,children:n.jsxs(bt,{className:"sm:max-w-md",children:[n.jsx(ht,{children:n.jsx(tt,{children:"Keyboard shortcuts"})}),n.jsx(St,{className:"space-y-6",children:s.map(({group:r,label:o,shortcuts:a})=>n.jsxs("div",{children:[n.jsx("h3",{className:"text-muted-foreground mb-2 text-xs font-medium tracking-wider uppercase",children:o}),n.jsx("div",{className:"space-y-1",children:a.map(i=>n.jsxs("div",{className:"flex items-center justify-between py-1.5 text-sm",children:[n.jsx("span",{children:i.label}),n.jsx(nl,{className:"inline-flex",children:Bt(i)})]},i.id))})]},r))})]})})}function qI(){const e=P(t=>t.toggleShortcutsPanel);u.useEffect(()=>{const t=s=>{const r=s.target,o=r.tagName==="INPUT"||r.tagName==="TEXTAREA"||r.isContentEditable;s.key==="?"&&!o&&(s.preventDefault(),e())};return document.addEventListener("keydown",t),()=>document.removeEventListener("keydown",t)},[e])}const YI=15e3;function VI(){const e=_e({select:r=>r.location.pathname}),s=Ts("sidebar.body").find(r=>{var o;return(o=r.visibleWhen)==null?void 0:o.call(r,{pathname:e})});if(s){const r=s.component;return{key:`body:${s.id}`,body:n.jsx(A1,{contributionId:s.id,children:n.jsx(u.Suspense,{fallback:null,children:n.jsx(r,{})})}),direction:1,isTakeover:!0}}return{key:"dashboard",body:n.jsx(oN,{}),direction:-1,isTakeover:!1}}function QI(){const e=_e({select:t=>t.matches});return hj(e)}function XI(){const{sidebarOpen:e,setSidebarOpen:t}=P(),s=Fe(),r=ws(Z=>Z.panelUp),[o]=mc(),a=_e({select:Z=>Z.location.pathname}),i=_e({select:Z=>Z.location.searchStr}),c=new URLSearchParams(i),d=a==="/channels"&&!!c.get("community")&&!!c.get("id"),l=F1(lt()??!1),m=_e({select:Z=>$1(Z.matches)});bv();const[f]=_s(),p=P(Z=>Z.isStreaming),{data:h}=bc(f),g=Hc(h??null,f??""),{room:x,unreadRoomCount:b}=j1();C1(),jy({cwd:f,isStreaming:p,color:h?g.color:void 0}),qI(),dj(),sb(),PE(),rb(),Qx(),Qj(),x1(),b1();const y=y1();v1(),Sv(),n0(),$w(),Bw(),Pg(),Ix(),iw(),Lg(),uv(),lx(),Sy(),Fg(),ow(),$g(),b0(),Hx();const N=P(Z=>Z.onboardingHiddenForSession),k=P(Z=>Z.setOnboardingHiddenForSession),{shouldShowOnboarding:I,isLoading:v,isOnboardingComplete:A,isOnboardingDismissed:R}=Yt(),_=Cv({shouldShowOnboarding:I,onboardingHiddenForSession:N});Av({done:A||R,overlayVisible:_}),Uw({blocked:_});const{dataUpdatedAt:O,errorUpdatedAt:M,error:T}=Le({refetchOnMount:L1}),j=O>on,S=M>on,E=P1(M,T),[w,D]=u.useState(!1);u.useEffect(()=>{if(j)return;const Z=setTimeout(()=>D(!0),YI);return()=>clearTimeout(Z)},[j]);const F=(E==null?void 0:E.status)===void 0,$=!j&&F&&(S||w),W=j||(E==null?void 0:E.status)===void 0?void 0:E,[ne,fe]=u.useState(!1);u.useEffect(()=>{if(!v)return;const Z=setTimeout(()=>fe(!0),3e3);return()=>clearTimeout(Z)},[v]);const z=u.useCallback(()=>k(!0),[k]),Y=VI(),{origin:te,originLabel:de}=Bg(o),{data:Q}=zg(o,{enabled:!1,select:Z=>Z.title}),q=QI(),re=u.useMemo(()=>({sessionId:o??void 0,agentName:h?$e(h):void 0,agentVisual:h?g:void 0,origin:te,originLabel:de,sessionTitle:Q,sessionDirectoryName:f?ol(f):void 0,room:x,teamViewMode:Ug(new URLSearchParams(i).get("view")??void 0)}),[o,h,g,te,de,Q,f,x,i]),ge=tE();return $?n.jsx(I1,{}):(W==null?void 0:W.status)!==void 0?n.jsx(M1,{status:W.status,message:W.message,code:W.code}):v&&!ne?n.jsx("div",{className:"bg-background h-dvh"}):n.jsxs(Kg,{children:[n.jsx(k1,{unreadRoomCount:b}),n.jsxs(Vb,{reducedMotion:"user",children:[n.jsx(Xe,{mode:"wait",children:_?n.jsx(se.div,{initial:{opacity:1},exit:{opacity:0},transition:{duration:.2},className:"fixed inset-0 z-50",children:n.jsx(Qv,{onComplete:z,slots:D1})},"onboarding"):n.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"h-dvh",children:n.jsxs("div",{"data-testid":"app-shell",className:"bg-background text-foreground flex h-dvh flex-col",children:[n.jsxs(Hg,{open:e,onOpenChange:t,className:K("flex-1 overflow-hidden",s&&"min-h-0"),style:{"--sidebar-width":"calc(272px + 1rem)"},children:[!s&&n.jsxs(Wg,{variant:"inset",children:[n.jsx(N1,{isFullscreen:y}),n.jsx(ku,{}),n.jsx("div",{className:"relative flex min-h-0 flex-1 flex-col overflow-hidden",children:n.jsx(Xe,{mode:"wait",initial:!1,custom:Y.direction,children:n.jsx(se.div,{"data-testid":"sidebar-body-swap",custom:Y.direction,initial:"enter",animate:"center",exit:"exit",variants:{enter:Z=>({x:`${Z*100}%`,opacity:0}),center:{x:0,opacity:1},exit:Z=>({x:`${Z*-100}%`,opacity:0})},transition:{duration:.2,ease:[.4,0,.2,1]},className:"flex min-h-0 flex-1 flex-col overflow-hidden",children:Y.body},Y.key)})}),n.jsx(Gg,{className:"px-2 py-3",children:n.jsx(fl,{})}),n.jsx(qg,{})]}),n.jsxs(Yg,{className:"overflow-hidden",inert:s&&r,children:[ze()&&n.jsx(Pj,{className:K("app-drag-region",!e&&!y&&"desktop-darwin:pl-20")}),n.jsxs("header",{className:"app-drag-region @container/bar relative flex h-9 shrink-0 items-center gap-1 border-b px-2 transition-[border-color] duration-300 lg:gap-2",children:[!s&&n.jsxs(n.Fragment,{children:[n.jsx(Vg,{className:"-ml-0.5"}),n.jsx($j,{}),n.jsx(Qg,{orientation:"vertical",className:"mr-1 h-4"})]}),s&&n.jsx(BN,{}),n.jsx(Xe,{mode:"wait",initial:!1,children:q&&n.jsx(se.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:.1},className:"flex min-w-0 flex-1 items-center gap-1 self-stretch lg:gap-2",children:n.jsx(Xg,{value:re,children:n.jsx(q.Header,{})})},q.key)}),n.jsx(_E,{}),n.jsx(WE,{}),n.jsx(qE,{}),n.jsx(Jg,{})]}),n.jsx(B1,{descriptors:ge}),n.jsx("main",{id:Id,className:"flex-1 overflow-hidden pb-[var(--pip-dock,0px)]",children:n.jsxs(Zg,{direction:"horizontal",id:Tr,autoSaveId:Tr,children:[n.jsx(yc,{id:"main-content",order:1,minSize:30,defaultSize:100,children:n.jsx(se.div,{initial:l?{opacity:0}:!1,animate:{opacity:1},transition:l?{duration:.12,ease:"easeOut"}:{duration:0},"data-route-fade":l,className:"h-full",children:n.jsx(ex,{})},m)}),n.jsx(lj,{pathname:a,isRemoteCommunityRoom:d})]})})]})]}),s&&n.jsx(kE,{takeover:Y.isTakeover?Y.body:null})]})},"main-app")}),n.jsx(bA,{}),n.jsx(xE,{onboardingOverlayVisible:_}),n.jsx(g1,{}),n.jsx(WN,{}),n.jsx(mA,{}),n.jsx(AI,{}),n.jsx(Lw,{}),n.jsx(GI,{}),n.jsx(Uy,{}),n.jsx(Ib,{}),n.jsx(BI,{}),n.jsx(sx,{}),n.jsx(WI,{})]})]})}const NT=XI;export{NT as component};
@@ -1 +1 @@
1
- import{j as o,db as t}from"./index-B6Scr7KJ.js";function e(){return o.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:o.jsx(t,{})})}const s=e;export{s as component};
1
+ import{j as o,d9 as t}from"./index-fge85Gub.js";function e(){return o.jsx("div",{className:"h-full min-h-0 overflow-hidden",children:o.jsx(t,{})})}const s=e;export{s as component};
@@ -1 +1 @@
1
- import{cu as R,dc as D,r as l,iT as C,iU as B,j as e,by as O,ar as g,B as M,X as G,G as x,A as j,hp as Y,hq as k,_ as q,e as v,x as K,a1 as z,a2 as U,iV as X,hl as Q,iW as J,ez as Z,e2 as ee}from"./index-B6Scr7KJ.js";import{P as te}from"./page-container-LomhzyuS.js";import{g as se,A as ne,a as ie,b as ae}from"./ActivityErrorState-CPbfgXjw.js";import{u as re}from"./use-full-activity-feed-DUH8r8jx.js";import{C as w,A as oe}from"./ActivityRow-DzhwE0ht.js";import{T as P,a as _,b as ce,c as p}from"./table-DsxLk3Gx.js";import{E as b}from"./empty-state-Dv5iV4jb.js";import{u as le,W as ue}from"./WithheldExtensionsNotice-quqWNbus.js";const S=["categories","actorType","actorId","since"];function A(){const s=R(),n=D({strict:!1}),t={categories:n.categories,actorType:n.actorType,actorId:n.actorId,since:n.since},i=S.some(c=>n[c]!==void 0),a={};t.categories&&(a.categories=t.categories),t.actorType&&(a.actorType=t.actorType),t.actorId&&(a.actorId=t.actorId),t.since&&(a.since=t.since);const r=l.useCallback(c=>{s({search:c})},[s]),o=l.useCallback(c=>{r(f=>{const y=f.categories?f.categories.split(","):[],N=y.includes(c)?y.filter(W=>W!==c):[...y,c];return{...f,categories:N.length>0?N.join(","):void 0}})},[r]),d=l.useCallback(c=>{r(f=>({...f,actorType:c}))},[r]),m=l.useCallback(c=>{r(f=>({...f,actorId:c}))},[r]),u=l.useCallback(c=>{r(f=>({...f,since:c}))},[r]),h=l.useCallback(()=>{r(c=>{const f={...c};for(const y of S)delete f[y];return f})},[r]);return{filters:t,queryFilters:a,isFiltered:i,toggleCategory:o,setActorType:d,setActorId:m,setSince:u,clearAll:h}}function de(){const s=R(),t=D({strict:!1}).view==="all"?"all":"activity",i=l.useCallback(a=>{s({search:(r=>({...r,view:a==="all"?"all":void 0}))})},[s]);return{view:t,setView:i}}function me(){const[s]=l.useState(()=>C.getState().lastSeenAt);return l.useEffect(()=>{const{markSeen:n,setViewing:t}=C.getState();return n(),t(!0),()=>{n(),t(!1)}},[]),s}function he(s){const n=l.useRef(null),t=l.useCallback(i=>{var d,m,u;const a=n.current;if(!a)return;const r=a.querySelectorAll("[data-activity-row]"),o=Array.from(r).findIndex(h=>h===document.activeElement||h.contains(document.activeElement));switch(i.key){case"ArrowDown":{i.preventDefault();const h=Math.min(o+1,r.length-1);(d=r[h])==null||d.focus();break}case"ArrowUp":{i.preventDefault();const h=Math.max(o-1,0);(m=r[h])==null||m.focus();break}case"Escape":{(u=document.activeElement)==null||u.blur();break}}},[s]);return{containerRef:n,handleKeyDown:t}}const xe=["tasks","relay","agent","config","system","permissions"],L="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",$="inline-flex h-6 items-center rounded-full px-2.5 text-xs font-medium transition-colors group-focus-visible:ring-ring group-focus-visible:ring-2 group-focus-visible:ring-offset-1";function fe({category:s,isActive:n,onToggle:t}){const i=w[s];return e.jsx(g.button,{type:"button",layout:!0,onClick:t,"aria-pressed":n,transition:{duration:.15},className:L,children:e.jsx("span",{className:x($,n?x(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function ge({isActive:s,onClick:n}){return e.jsx(g.button,{type:"button",layout:!0,onClick:n,"aria-pressed":s,transition:{duration:.15},className:L,children:e.jsx("span",{className:x($,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function ye({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=A(),r=l.useRef(null),o=B(r,"horizontal"),d=new Set(n.categories?n.categories.split(","):[]),m=()=>{t&&a()};return e.jsxs("div",{className:x("relative",s),children:[e.jsxs("div",{ref:r,onScroll:o.onScroll,"data-slot":"activity-filter-bar",className:"flex items-center gap-1 overflow-x-auto",children:[e.jsx(ge,{isActive:!t,onClick:m}),xe.map(u=>e.jsx(fe,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(O,{children:t&&e.jsx(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:e.jsxs(M,{variant:"ghost",size:"xs",className:"ml-1",onClick:a,children:[e.jsx(G,{"aria-hidden":!0}),"Clear"]})},"clear-filters")})]}),o.start&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-start",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r to-transparent"}),o.end&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-end",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l to-transparent"})]})}function pe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=A();return n==="all"?e.jsx(b,{className:t,icon:j,headline:"No actions yet",description:"Every action a person or agent takes shows up here."}):s?e.jsx(b,{className:t,icon:j,headline:`No ${ve(i.categories)} activity found`,description:"Try other filters.",action:{label:"Clear filters",onClick:a,variant:"outline"}}):e.jsx(b,{className:t,icon:j,headline:"No activity yet",description:"Your agents’ work shows up here."})}function ve(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=w[r])==null?void 0:o.label)??r});if(t.length===1)return t[0];const i=t[t.length-1];return`${t.slice(0,-1).join(", ")} or ${i}`}function je({view:s,onViewChange:n,className:t}){return e.jsxs(Y,{"aria-label":"Which list to show",className:x("w-fit shrink-0",t),value:s,onValueChange:i=>n(i),children:[e.jsx(k,{value:"activity",children:"Activity"}),e.jsx(k,{value:"all",children:"All actions"})]})}function be(s){const n=Date.now()-new Date(s).getTime(),t=Math.floor(n/36e5);return t<1?"recently":t<24?`${t}h ago`:`${Math.floor(t/24)}d ago`}function we(s,n){const t=new Date(n),i={};for(const a of s)new Date(a.occurredAt)>t&&(i[a.category]=(i[a.category]??0)+1);return i}function Ae(s){const n={tasks:"scheduled run",relay:"message",agent:"agent update",config:"settings change",system:"system event",permissions:"permission change"};return Object.entries(s).filter(([,t])=>t>0).map(([t,i])=>{const a=n[t];return`${i} ${i===1?a:`${a}s`}`}).join(" · ")}function Ne({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=we(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=be(s),o=Ae(i);return e.jsxs(g.div,{"data-slot":"activity-since-last-visit",initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},className:x("rounded-lg border px-4 py-3","bg-card border-border",t),children:[e.jsxs("p",{className:"text-muted-foreground text-xs",children:[e.jsx("span",{className:"text-foreground font-medium",children:"Since your last visit"})," ",e.jsxs("span",{children:["(",r,")"]})]}),e.jsx("p",{className:"text-foreground/80 mt-0.5 text-sm",children:o}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Object.keys(i).map(d=>{const m=i[d];if(!m)return null;const u=w[d];return e.jsxs(q,{shape:"pill",className:x("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ce={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ke(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(ce,{children:[e.jsx(p,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx(v,{className:"h-3 w-20"})}),e.jsx(p,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(v,{className:"h-5 w-20 rounded-full"})}),e.jsx(p,{className:"py-1.5 max-sm:pl-2",children:e.jsx(v,{className:"h-3 rounded",style:{width:n}})}),e.jsx(p,{className:"w-16 py-1.5 max-sm:w-10"})]})}function Se(){return e.jsxs("div",{"data-slot":"activity-timeline-skeleton",className:"space-y-1",children:[e.jsx("div",{className:"py-2",children:e.jsx(v,{className:"h-3 w-16 rounded"})}),e.jsx(P,{children:e.jsx(_,{children:Array.from({length:5}).map((s,n)=>e.jsx(ke,{},n))})})]})}function H({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>se(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=he(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(Se,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(ne,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(pe,{isFiltered:a,view:r})}):e.jsx("div",{ref:m,onKeyDown:u,"data-slot":"activity-timeline",className:x(o),children:d.map(h=>e.jsxs("section",{children:[e.jsx(ie,{label:h.label}),e.jsx(g.div,{variants:Ce,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(_,{children:h.items.map(c=>e.jsx(oe,{item:c},c.id))})})})]},h.label))})}function V({onLoadMore:s,isFetching:n,hasNextPage:t,className:i}){return t?e.jsx(g.div,{"data-slot":"activity-load-more",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.1},className:x("flex justify-center py-4",i),children:e.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:n,className:"gap-2",children:[n&&e.jsx(K,{size:"xs"}),"Load 50 more events"]})}):null}const T=7;function Te(){var t;const s=z(),{data:n}=U({queryKey:X.dailyCounts(T),queryFn:()=>s.getSessionDailyCounts(T),staleTime:6e4});return!n||n.dailyCounts.length===0?null:{dailyCounts:n.dailyCounts,degraded:(((t=n.warnings)==null?void 0:t.length)??0)>0}}function Ie(s,n){const t=s.reduce((a,r)=>a+r,0),i=t===1?"session":"sessions";return n?t===0?"This week’s count is incomplete":`Your agents started at least ${t} ${i} this week`:t===0?"Your agents started no chats this week":`Your agents started ${t} ${i} this week`}const I=10,Ee=4,E=30,F=1;function Fe({data:s,className:n}){const t=Math.max(...s,1);return e.jsx("svg",{viewBox:"0 0 100 30",className:x("text-muted-foreground",n),"aria-hidden":"true",children:s.map((i,a)=>{const r=i/t*E;return e.jsx("rect",{x:a*(I+Ee)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Re(){const s=Te();return s===null?null:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:Ie(s.dailyCounts,s.degraded)}),e.jsx(Fe,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function De(){const s=l.useId(),n=Q("dashboard.sections"),t=l.useMemo(()=>n.filter(a=>J(a.id)&&(!a.visibleWhen||a.visibleWhen())),[n]),i=le("dashboard.sections");return t.length===0&&i.length===0?null:e.jsxs("section",{className:"space-y-3","aria-labelledby":s,children:[e.jsx("h2",{id:s,className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:"From your extensions"}),e.jsx(ue,{slot:"dashboard.sections",onReview:()=>Z()}),e.jsx("div",{className:"space-y-4",children:t.map(a=>e.jsx(a.component,{},a.id))})]})}function Me(){const{view:s,setView:n}=de();return e.jsxs(e.Fragment,{children:[e.jsx(ee,{children:"Activity"}),e.jsxs(te,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(je,{view:s,onViewChange:n}),s==="activity"&&e.jsx(ye,{className:"min-w-0 flex-1"})]}),e.jsx(Re,{}),e.jsx(De,{}),s==="all"?e.jsx(_e,{}):e.jsx(Pe,{})]})]})}function Pe(){const{queryFilters:s,isFiltered:n}=A(),t=me(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=re(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{lastVisitedAt:t,items:h}),e.jsx(H,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(V,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function _e(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ae();return e.jsxs(e.Fragment,{children:[e.jsx(H,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(V,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Ye=Me;export{Ye as component};
1
+ import{cs as R,da as D,r as l,iW as C,iX as O,j as e,bw as V,ap as g,B as M,X as Y,G as x,A as j,hp as G,hq as k,_ as q,e as v,x as K,a1 as z,a2 as U,iY as X,hl as Q,iZ as Z,ey as J,e1 as ee}from"./index-fge85Gub.js";import{P as te}from"./page-container-BCdJ_DsH.js";import{g as se,A as ne,a as ie,b as ae}from"./ActivityErrorState-s4xAcJQR.js";import{u as re}from"./use-full-activity-feed-QZAZ5vBJ.js";import{C as w,A as oe}from"./ActivityRow-5PJBHIt2.js";import{T as P,a as _,b as ce,c as p}from"./table-BcJvj9rx.js";import{E as b}from"./empty-state-BzWMBBQZ.js";import{u as le,W as ue}from"./WithheldExtensionsNotice-CZibLuKA.js";const S=["categories","actorType","actorId","since"];function A(){const s=R(),n=D({strict:!1}),t={categories:n.categories,actorType:n.actorType,actorId:n.actorId,since:n.since},i=S.some(c=>n[c]!==void 0),a={};t.categories&&(a.categories=t.categories),t.actorType&&(a.actorType=t.actorType),t.actorId&&(a.actorId=t.actorId),t.since&&(a.since=t.since);const r=l.useCallback(c=>{s({search:c})},[s]),o=l.useCallback(c=>{r(f=>{const y=f.categories?f.categories.split(","):[],N=y.includes(c)?y.filter(B=>B!==c):[...y,c];return{...f,categories:N.length>0?N.join(","):void 0}})},[r]),d=l.useCallback(c=>{r(f=>({...f,actorType:c}))},[r]),m=l.useCallback(c=>{r(f=>({...f,actorId:c}))},[r]),u=l.useCallback(c=>{r(f=>({...f,since:c}))},[r]),h=l.useCallback(()=>{r(c=>{const f={...c};for(const y of S)delete f[y];return f})},[r]);return{filters:t,queryFilters:a,isFiltered:i,toggleCategory:o,setActorType:d,setActorId:m,setSince:u,clearAll:h}}function de(){const s=R(),t=D({strict:!1}).view==="all"?"all":"activity",i=l.useCallback(a=>{s({search:(r=>({...r,view:a==="all"?"all":void 0}))})},[s]);return{view:t,setView:i}}function me(){const[s]=l.useState(()=>C.getState().lastSeenAt);return l.useEffect(()=>{const{markSeen:n,setViewing:t}=C.getState();return n(),t(!0),()=>{n(),t(!1)}},[]),s}function he(s){const n=l.useRef(null),t=l.useCallback(i=>{var d,m,u;const a=n.current;if(!a)return;const r=a.querySelectorAll("[data-activity-row]"),o=Array.from(r).findIndex(h=>h===document.activeElement||h.contains(document.activeElement));switch(i.key){case"ArrowDown":{i.preventDefault();const h=Math.min(o+1,r.length-1);(d=r[h])==null||d.focus();break}case"ArrowUp":{i.preventDefault();const h=Math.max(o-1,0);(m=r[h])==null||m.focus();break}case"Escape":{(u=document.activeElement)==null||u.blur();break}}},[s]);return{containerRef:n,handleKeyDown:t}}const xe=["tasks","relay","agent","config","system","permissions"],L="group inline-flex min-h-11 shrink-0 items-center outline-none md:min-h-0",$="inline-flex h-6 items-center rounded-full px-2.5 text-xs font-medium transition-colors group-focus-visible:ring-ring group-focus-visible:ring-2 group-focus-visible:ring-offset-1";function fe({category:s,isActive:n,onToggle:t}){const i=w[s];return e.jsx(g.button,{type:"button",layout:!0,onClick:t,"aria-pressed":n,transition:{duration:.15},className:L,children:e.jsx("span",{className:x($,n?x(i.bg,i.text):"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:i.label})})}function ge({isActive:s,onClick:n}){return e.jsx(g.button,{type:"button",layout:!0,onClick:n,"aria-pressed":s,transition:{duration:.15},className:L,children:e.jsx("span",{className:x($,s?"bg-foreground text-background":"text-muted-foreground group-hover:bg-muted group-hover:text-foreground"),children:"All"})})}function ye({className:s}){const{filters:n,isFiltered:t,toggleCategory:i,clearAll:a}=A(),r=l.useRef(null),o=O(r,"horizontal"),d=new Set(n.categories?n.categories.split(","):[]),m=()=>{t&&a()};return e.jsxs("div",{className:x("relative",s),children:[e.jsxs("div",{ref:r,onScroll:o.onScroll,"data-slot":"activity-filter-bar",className:"flex items-center gap-1 overflow-x-auto",children:[e.jsx(ge,{isActive:!t,onClick:m}),xe.map(u=>e.jsx(fe,{category:u,isActive:d.has(u),onToggle:()=>i(u)},u)),e.jsx(V,{children:t&&e.jsx(g.div,{initial:{opacity:0,scale:.95},animate:{opacity:1,scale:1},exit:{opacity:0,scale:.95},transition:{duration:.15},children:e.jsxs(M,{variant:"ghost",size:"xs",className:"ml-1",onClick:a,children:[e.jsx(Y,{"aria-hidden":!0}),"Clear"]})},"clear-filters")})]}),o.start&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-start",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 left-0 w-8 bg-gradient-to-r to-transparent"}),o.end&&e.jsx("div",{"aria-hidden":!0,"data-testid":"activity-filter-bar-fade-end",className:"from-background via-background/70 pointer-events-none absolute inset-y-0 right-0 w-8 bg-gradient-to-l to-transparent"})]})}function pe({isFiltered:s=!1,view:n="activity",className:t}){const{filters:i,clearAll:a}=A();return n==="all"?e.jsx(b,{className:t,icon:j,headline:"No actions yet",description:"Every action a person or agent takes shows up here."}):s?e.jsx(b,{className:t,icon:j,headline:`No ${ve(i.categories)} activity found`,description:"Try other filters.",action:{label:"Clear filters",onClick:a,variant:"outline"}}):e.jsx(b,{className:t,icon:j,headline:"No activity yet",description:"Your agents’ work shows up here."})}function ve(s){if(!s)return"matching";const t=s.split(",").map(r=>{var o;return((o=w[r])==null?void 0:o.label)??r});if(t.length===1)return t[0];const i=t[t.length-1];return`${t.slice(0,-1).join(", ")} or ${i}`}function je({view:s,onViewChange:n,className:t}){return e.jsxs(G,{"aria-label":"Which list to show",className:x("w-fit shrink-0",t),value:s,onValueChange:i=>n(i),children:[e.jsx(k,{value:"activity",children:"Activity"}),e.jsx(k,{value:"all",children:"All actions"})]})}function be(s){const n=Date.now()-new Date(s).getTime(),t=Math.floor(n/36e5);return t<1?"recently":t<24?`${t}h ago`:`${Math.floor(t/24)}d ago`}function we(s,n){const t=new Date(n),i={};for(const a of s)new Date(a.occurredAt)>t&&(i[a.category]=(i[a.category]??0)+1);return i}function Ae(s){const n={tasks:"scheduled run",relay:"message",agent:"agent update",config:"settings change",system:"system event",permissions:"permission change"};return Object.entries(s).filter(([,t])=>t>0).map(([t,i])=>{const a=n[t];return`${i} ${i===1?a:`${a}s`}`}).join(" · ")}function Ne({lastVisitedAt:s,items:n,className:t}){if(!s)return null;const i=we(n,s);if(Object.values(i).reduce((d,m)=>d+(m??0),0)===0)return null;const r=be(s),o=Ae(i);return e.jsxs(g.div,{"data-slot":"activity-since-last-visit",initial:{opacity:0,y:-6},animate:{opacity:1,y:0},transition:{duration:.2,ease:"easeOut"},className:x("rounded-lg border px-4 py-3","bg-card border-border",t),children:[e.jsxs("p",{className:"text-muted-foreground text-xs",children:[e.jsx("span",{className:"text-foreground font-medium",children:"Since your last visit"})," ",e.jsxs("span",{children:["(",r,")"]})]}),e.jsx("p",{className:"text-foreground/80 mt-0.5 text-sm",children:o}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-2",children:Object.keys(i).map(d=>{const m=i[d];if(!m)return null;const u=w[d];return e.jsxs(q,{shape:"pill",className:x("border-transparent",u.bg,u.text),children:[m," ",u.label]},d)})})]})}const Ce={initial:{opacity:0,y:6},animate:{opacity:1,y:0,transition:{duration:.2,ease:"easeOut"}}};function ke(){const s=l.useId(),n=l.useMemo(()=>`${s.split("").reduce((i,a)=>i+a.charCodeAt(0),0)%40+50}%`,[s]);return e.jsxs(ce,{children:[e.jsx(p,{className:"w-28 py-1.5 pr-0 pl-2 max-sm:hidden",children:e.jsx(v,{className:"h-3 w-20"})}),e.jsx(p,{className:"w-24 py-1.5 pr-0 max-sm:hidden",children:e.jsx(v,{className:"h-5 w-20 rounded-full"})}),e.jsx(p,{className:"py-1.5 max-sm:pl-2",children:e.jsx(v,{className:"h-3 rounded",style:{width:n}})}),e.jsx(p,{className:"w-16 py-1.5 max-sm:w-10"})]})}function Se(){return e.jsxs("div",{"data-slot":"activity-timeline-skeleton",className:"space-y-1",children:[e.jsx("div",{className:"py-2",children:e.jsx(v,{className:"h-3 w-16 rounded"})}),e.jsx(P,{children:e.jsx(_,{children:Array.from({length:5}).map((s,n)=>e.jsx(ke,{},n))})})]})}function H({items:s,isLoading:n,isError:t,onRetry:i,isFiltered:a,view:r="activity",className:o}){const d=l.useMemo(()=>se(s,new Date),[s]),{containerRef:m,handleKeyDown:u}=he(s.length);return n&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(Se,{})}):t&&s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(ne,{onRetry:i})}):s.length===0?e.jsx("div",{"data-slot":"activity-timeline",className:x(o),children:e.jsx(pe,{isFiltered:a,view:r})}):e.jsx("div",{ref:m,onKeyDown:u,"data-slot":"activity-timeline",className:x(o),children:d.map(h=>e.jsxs("section",{children:[e.jsx(ie,{label:h.label}),e.jsx(g.div,{variants:Ce,initial:"initial",animate:"animate",children:e.jsx(P,{children:e.jsx(_,{children:h.items.map(c=>e.jsx(oe,{item:c},c.id))})})})]},h.label))})}function W({onLoadMore:s,isFetching:n,hasNextPage:t,className:i}){return t?e.jsx(g.div,{"data-slot":"activity-load-more",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2,delay:.1},className:x("flex justify-center py-4",i),children:e.jsxs(M,{variant:"outline",size:"sm",onClick:s,disabled:n,className:"gap-2",children:[n&&e.jsx(K,{size:"xs"}),"Load 50 more events"]})}):null}const T=7;function Te(){var t;const s=z(),{data:n}=U({queryKey:X.dailyCounts(T),queryFn:()=>s.getSessionDailyCounts(T),staleTime:6e4});return!n||n.dailyCounts.length===0?null:{dailyCounts:n.dailyCounts,degraded:(((t=n.warnings)==null?void 0:t.length)??0)>0}}function Ie(s,n){const t=s.reduce((a,r)=>a+r,0),i=t===1?"session":"sessions";return n?t===0?"This week’s count is incomplete":`Your agents started at least ${t} ${i} this week`:t===0?"Your agents started no chats this week":`Your agents started ${t} ${i} this week`}const I=10,Ee=4,E=30,F=1;function Fe({data:s,className:n}){const t=Math.max(...s,1);return e.jsx("svg",{viewBox:"0 0 100 30",className:x("text-muted-foreground",n),"aria-hidden":"true",children:s.map((i,a)=>{const r=i/t*E;return e.jsx("rect",{x:a*(I+Ee)+1,y:E-Math.max(r,F),width:I,height:Math.max(r,F),rx:2,fill:"currentColor",opacity:.6},a)})})}function Re(){const s=Te();return s===null?null:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:Ie(s.dailyCounts,s.degraded)}),e.jsx(Fe,{data:s.dailyCounts,className:"h-6 w-24 shrink-0"})]})}function De(){const s=l.useId(),n=Q("dashboard.sections"),t=l.useMemo(()=>n.filter(a=>Z(a.id)&&(!a.visibleWhen||a.visibleWhen())),[n]),i=le("dashboard.sections");return t.length===0&&i.length===0?null:e.jsxs("section",{className:"space-y-3","aria-labelledby":s,children:[e.jsx("h2",{id:s,className:"text-muted-foreground text-xs font-medium tracking-widest uppercase",children:"From your extensions"}),e.jsx(ue,{slot:"dashboard.sections",onReview:()=>J()}),e.jsx("div",{className:"space-y-4",children:t.map(a=>e.jsx(a.component,{},a.id))})]})}function Me(){const{view:s,setView:n}=de();return e.jsxs(e.Fragment,{children:[e.jsx(ee,{children:"Activity"}),e.jsxs(te,{width:"wide",className:"space-y-4",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-3",children:[e.jsx(je,{view:s,onViewChange:n}),s==="activity"&&e.jsx(ye,{className:"min-w-0 flex-1"})]}),e.jsx(Re,{}),e.jsx(De,{}),s==="all"?e.jsx(_e,{}):e.jsx(Pe,{})]})]})}function Pe(){const{queryFilters:s,isFiltered:n}=A(),t=me(),{data:i,isLoading:a,isError:r,refetch:o,isFetchingNextPage:d,hasNextPage:m,fetchNextPage:u}=re(s),h=l.useMemo(()=>(i==null?void 0:i.pages.flatMap(c=>c.items))??[],[i]);return e.jsxs(e.Fragment,{children:[e.jsx(Ne,{lastVisitedAt:t,items:h}),e.jsx(H,{items:h,isLoading:a,isError:r,onRetry:()=>void o(),isFiltered:n}),e.jsx(W,{onLoadMore:()=>void u(),isFetching:d,hasNextPage:!!m})]})}function _e(){const{data:s,isLoading:n,isError:t,refetch:i,isFetchingNextPage:a,hasNextPage:r,fetchNextPage:o}=ae();return e.jsxs(e.Fragment,{children:[e.jsx(H,{items:s??[],isLoading:n,isError:t,onRetry:()=>void i(),isFiltered:!1,view:"all"}),e.jsx(W,{onLoadMore:()=>void o(),isFetching:a,hasNextPage:!!r})]})}const Ge=Me;export{Ge as component};
@@ -0,0 +1,3 @@
1
+ import{kH as be,kI as ye,j as t,i1 as $,i2 as F,i3 as L,i4 as q,i5 as z,_ as I,at as A,Q as Se,T as Ne,C as ke,V as we,kJ as B,B as b,kK as Re,kL as Ce,cs as W,e as C,G as y,s as H,r as m,J as Ie,kM as Ae,ah as Pe,ai as De,ee as Oe,aW as Me,X as oe,kN as Te,kO as Ee,aO as $e,e3 as ie,iX as Fe,bw as V,ap as R,U as Le,kP as qe,ja as ze,kQ as Be,ez as We,eA as He,j8 as _e,jf as Ue,kR as Ke,kS as Ve,et as ae,ev as Ge,kT as Qe,da as re,ab as Ye,ew as Xe,j9 as Je,l as le,kU as de,kV as ce,gv as Ze,kW as _,eu as et,bd as tt,aZ as st,hh as nt,hI as ot,kX as it,aL as at,gx as ue,g as rt,gw as me,kY as G,ag as Q,cg as lt,kZ as dt,k_ as ct,k$ as ut,a1 as mt,l0 as ht,co as gt,bY as ft,jx as pt,aN as xt,im as jt,eS as M,kl as vt,q as Y,e1 as bt,gA as yt,l1 as St,n as Nt}from"./index-fge85Gub.js";import{I as kt,p as wt}from"./ChannelComposer-YXkkFcyY.js";import{b as Rt}from"./registry-5Qudcjd5.js";import{R as Ct}from"./RoomSurface-Bz1DfoQD.js";import{P as he}from"./PromptSuggestionChips-B5afjbD0.js";import{S as U}from"./scroll-area-MdXbnM77.js";import{d as It}from"./dead-letter-reasons-DtBHju9v.js";import{u as At}from"./use-mesh-topology-Bw7MmKA9.js";import{A as Pt}from"./AttentionSignalRow-BoTonsR5.js";import{u as ge}from"./use-promo-dismissals-DeNbRWOh.js";import{u as Dt,s as Ot,P as Mt,a as Tt}from"./use-promo-activation-CxG-kZJQ.js";import"./WidgetErrorCard-Bte2obmw.js";import"./index-DI9IsN-O.js";import"./card-CM7-_8nD.js";import"./progress-es667_cM.js";import"./markdown-content-DV3AiG76.js";import"./table-BcJvj9rx.js";import"./package-BafFSryH.js";import"./heart--8btr31M.js";import"./git-branch-uZFa3Tmr.js";import"./file-text-DLPhIP0f.js";import"./file-DiYwTQdD.js";import"./repeat-HOHWZc6L.js";import"./use-room-sessions-CrFskgCJ.js";import"./find-latest-widget-fence-BYtG5PzD.js";import"./format-duration-BCr6uzby.js";import"./RuntimeSetupDialog-CEUC7GrY.js";import"./inline-code-7dwi7wWG.js";import"./list-runtime-types-hMouIGtG.js";import"./RuntimeConnectFlow-B0TIITVq.js";import"./useMutationState-TJGtJT5R.js";import"./runtime-connect-Dn0T5YWv.js";import"./mention-pill-Db0XBC6Z.js";import"./rotate-ccw-clock-Dniulnw5.js";import"./unplug-CK2bPGpg.js";import"./message-square-off-w0__0O5g.js";import"./registry-DvKu39S1.js";import"./file-drag-GDx2qhdk.js";import"./paperclip-DY4e-IlK.js";import"./index-CvIKejlx.js";import"./use-transform-YUDqOhoc.js";import"./pane-resize-handle-Bar-FdkY.js";import"./UnreadDivider-DPD9MQ8-.js";import"./use-room-follow-claim-_B7HonZx.js";import"./use-connector-management-CXVz2xe3.js";import"./AgentRequestCard-RFQOrk-W.js";import"./access-copy-Y2_F9uAx.js";import"./query-error-state-BNPduDBN.js";import"./empty-state-BzWMBBQZ.js";import"./use-bindings-h_mG9d64.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-CHJpgP6H.js";import"./use-update-config-BH0agtZh.js";function Et({open:e,itemId:n,onClose:o}){const{data:s}=be(),i=ye(),a=(n==null?void 0:n.indexOf("::"))??-1,r=a>=0?n.slice(0,a):void 0,l=a>=0?n.slice(a+2):void 0,d=s==null?void 0:s.find(h=>h.source===r&&h.reason===l),c=()=>{!r||!l||i.mutate({source:r,reason:l},{onSuccess:o})};return t.jsx($,{open:e,onOpenChange:h=>!h&&o(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Messages that never arrived"}),t.jsx(z,{children:r??"Source unknown"})]}),t.jsx(U,{className:"flex-1 px-4",children:d?t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"space-y-2",children:[t.jsx("p",{className:"text-muted-foreground text-sm",children:"These never reached an agent. Clearing them doesn’t send them."}),t.jsxs("p",{className:"text-foreground text-sm",children:[d.count," message",d.count===1?"":"s"," couldn’t be delivered"]}),t.jsx(I,{variant:"secondary",children:It(d.reason)})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[t.jsxs("p",{className:"text-muted-foreground",children:["First happened ",A(d.firstSeen)," ago"]}),t.jsxs("p",{className:"text-muted-foreground",children:["Last happened ",A(d.lastSeen)," ago"]})]}),d.sample!=null&&t.jsxs(Se,{children:[t.jsxs(Ne,{className:"text-muted-foreground hover:text-foreground group flex items-center gap-1 text-xs font-medium transition-colors",children:[t.jsx(ke,{className:"size-3 transition-transform group-data-[state=open]:rotate-90"}),"What one of them looked like"]}),t.jsx(we,{children:t.jsx("pre",{className:"bg-muted mt-1 overflow-x-auto rounded-md p-3 font-mono text-xs",children:JSON.stringify(d.sample,null,2)})})]})]}):t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"These are cleared already."})}),t.jsxs(B,{children:[d&&t.jsx(b,{variant:"destructive",onClick:c,disabled:i.isPending,children:i.isPending?"Clearing…":"Clear these"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function $t(e){const n=Math.floor(e/1e3);if(n<60)return`${n}s`;const o=Math.floor(n/60),s=n%60;if(o<60)return`${o}m ${s}s`;const i=Math.floor(o/60),a=o%60;return`${i}h ${a}m`}function Ft(e){switch(e){case"needs_attention":return{label:"Needs attention",badge:"destructive",tone:"error",heading:"What it needed",title:"Run that was refused a tool"};case"failed":return{label:"Didn’t finish",badge:"destructive",tone:"error",heading:"Error",title:"Run that didn’t finish"};case"cancelled":return{label:"Cancelled",badge:"secondary",tone:"neutral",heading:"Stopped",title:"Run that was stopped"};case"skipped":return{label:"Skipped",badge:"secondary",tone:"neutral",heading:"Why",title:"Run that never started"};case"running":return{label:"Running",badge:"secondary",tone:"neutral",heading:"Latest",title:"Run that is still going"};default:return{label:"Completed",badge:"secondary",tone:"neutral",heading:"Note",title:"Run that finished"}}}const Lt={error:{box:"bg-destructive/10 border-destructive/20",heading:"text-destructive",body:"text-destructive"},neutral:{box:"bg-muted border-border",heading:"text-foreground",body:"text-foreground/80"}};function qt({open:e,itemId:n,onClose:o}){const{data:s,isLoading:i,isError:a}=Re(e?n??null:null),r=Ce(),l=W(),d=()=>{s!=null&&s.sessionId&&l(H({session:s.sessionId}))},c=()=>{s&&r.mutate(s.id)},h=s?Ft(s.status):null,g=h?Lt[h.tone]:null;return t.jsx($,{open:e,onOpenChange:f=>!f&&o(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:(h==null?void 0:h.title)??"Run that needs a look"}),t.jsx(z,{children:n?n.slice(0,8):"Unknown"})]}),t.jsxs(U,{className:"flex-1 px-4",children:[i&&t.jsxs("div",{className:"space-y-4",children:[t.jsx(C,{className:"h-6 w-24"}),t.jsx(C,{className:"h-4 w-48"}),t.jsx(C,{className:"h-20 w-full"})]}),a&&t.jsx("p",{className:"text-destructive py-8 text-center text-sm",children:"Couldn’t load this run."}),!i&&!a&&!s&&t.jsx("p",{className:"text-muted-foreground py-8 text-center text-sm",children:"Already resolved."}),s&&t.jsxs("div",{className:"space-y-4",children:[t.jsxs("div",{className:"flex gap-2",children:[t.jsx(I,{variant:h.badge,children:h.label}),t.jsx(I,{variant:"secondary",children:s.trigger==="scheduled"?"Scheduled":"Manual"})]}),t.jsxs("div",{className:"space-y-1 text-sm",children:[s.startedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Started: ",A(s.startedAt)," ago"]}),s.finishedAt&&t.jsxs("p",{className:"text-muted-foreground",children:["Finished: ",A(s.finishedAt)," ago"]}),s.durationMs!=null&&t.jsxs("p",{className:"text-muted-foreground",children:["Duration: ",$t(s.durationMs)]})]}),s.error&&t.jsxs("div",{className:y("rounded-md border p-3",g.box),children:[t.jsx("p",{className:y("text-sm font-medium",g.heading),children:h.heading}),t.jsx("p",{className:y("mt-1 text-sm",g.body),children:s.error})]}),s.outputSummary&&t.jsxs("div",{className:"space-y-1",children:[t.jsx("p",{className:"text-muted-foreground text-xs font-medium",children:"Output"}),t.jsx("pre",{className:"bg-muted max-h-48 overflow-auto rounded-md p-3 font-mono text-xs",children:s.outputSummary})]})]})]}),t.jsxs(B,{children:[(s==null?void 0:s.sessionId)&&t.jsx(b,{variant:"default",onClick:d,children:"View chat"}),(s==null?void 0:s.status)==="running"&&t.jsx(b,{variant:"destructive",onClick:c,disabled:r.isPending,children:r.isPending?"Cancelling…":"Cancel run"}),t.jsx(b,{variant:"outline",onClick:o,children:"Close"})]})]})})}function zt({agent:e}){const n=Ae(e,e.projectPath??"");return t.jsxs("div",{className:"flex items-center gap-3 py-2",children:[t.jsx(Pe,{color:n.color,emoji:n.emoji,size:"sm",className:"shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground truncate text-sm font-medium",children:De(e)}),t.jsxs("div",{className:"flex items-center gap-2",children:[t.jsx(I,{variant:"destructive",children:"Unreachable"}),e.runtime&&t.jsx(I,{variant:"secondary",children:Oe(e.runtime).label})]})]}),e.lastSeenAt&&t.jsxs("span",{className:"text-muted-foreground shrink-0 text-xs",children:[A(e.lastSeenAt)," ago"]})]})}function Bt({open:e,onClose:n}){const{data:o}=At(void 0,e),s=m.useMemo(()=>o?o.namespaces.flatMap(i=>i.agents).filter(i=>i.healthStatus==="unreachable"):[],[o]);return t.jsx($,{open:e,onOpenChange:i=>!i&&n(),children:t.jsxs(F,{side:"right",children:[t.jsxs(L,{children:[t.jsx(q,{children:"Agents that aren’t answering"}),t.jsxs(z,{children:["DorkOS can’t reach ",s.length," agent",s.length===1?"":"s"," right now"]})]}),t.jsx(U,{className:"flex-1 px-4",children:s.length>0?t.jsx("div",{className:"divide-y",children:s.map(i=>t.jsx(zt,{agent:i},i.id))}):t.jsxs("div",{className:"flex flex-col items-center gap-2 py-8",children:[t.jsx(Ie,{className:"text-status-success size-6"}),t.jsx("p",{className:"text-muted-foreground text-sm",children:"All agents are online"})]})}),t.jsx(B,{children:t.jsx(b,{variant:"outline",onClick:n,children:"Close"})})]})})}function Wt(e){return e.content.suggestion!==void 0}function Ht(){const e=Dt(),{dismissedIds:n}=ge(),o=Me(s=>s.promoEnabled);return m.useMemo(()=>{if(!o)return null;const[s]=Ot(Mt.filter(Wt),e,n,1);return s??null},[e,n,o])}function _t({suggestion:e,promoTitle:n,onAccept:o,onDismiss:s}){return t.jsxs("p",{"data-slot":"quiet-suggestion",className:"text-muted-foreground/70 text-2xs mt-1",children:[e.question," ",t.jsx("button",{type:"button",onClick:o,className:"text-muted-foreground hover:text-foreground focus-ring rounded-sm font-medium underline-offset-4 transition-colors hover:underline focus-visible:underline",children:e.action}),t.jsx("button",{type:"button","aria-label":`Dismiss suggestion: ${n}`,onClick:s,className:"text-muted-foreground/60 hover:text-foreground focus-ring -my-1.5 ml-0.5 inline-flex translate-y-[3px] items-center justify-center rounded-sm p-1.5 align-baseline transition-colors",children:t.jsx(oe,{className:"size-3"})})]})}function Ut({promo:e}){const{dismissPromo:n}=ge(),{activate:o,dialog:s}=Tt(e);return t.jsxs(t.Fragment,{children:[t.jsx(_t,{suggestion:e.content.suggestion,promoTitle:e.content.title,onAccept:o,onDismiss:()=>n(e.id)}),s]})}function Kt(){const e=Ht();return e===null?null:t.jsx(Ut,{promo:e},e.id)}const Vt=["report.daily"];function fe(){const{notifications:e}=Te({kinds:Vt,unread:!0});return m.useMemo(()=>e[0],[e])}function Gt({questions:e,requests:n,schedules:o,approvalsUnavailable:s,attention:i}){const a=[],r=[],l=e+n+o;return l>0?(a.push(`${Ee(e,n,o)} ${l===1?"is":"are"} waiting on you.`),r.push(`${l} waiting`)):s&&(a.push("Couldn’t read approvals."),r.push("Couldn’t read approvals")),i===1?(a.push("1 thing needs attention."),r.push("1 needs attention")):i>1&&(a.push(`${i} things need attention.`),r.push(`${i} need attention`)),{spoken:a.join(" "),compact:r.join(" · ")}}function Qt({notification:e,onDismiss:n}){return t.jsxs("div",{"data-slot":"shift-report-card",className:"border-border/60 bg-background/60 relative rounded-lg border p-3 pr-8",children:[t.jsxs("div",{className:"flex items-start gap-2.5",children:[t.jsx($e,{"aria-hidden":!0,className:"text-muted-foreground mt-0.5 size-3.5 shrink-0"}),t.jsxs("div",{className:"min-w-0 flex-1",children:[t.jsx("p",{className:"text-foreground text-xs font-medium",children:e.title}),e.body!==void 0&&t.jsx("p",{className:"text-muted-foreground mt-1 text-xs leading-relaxed",children:e.body})]})]}),t.jsx("button",{type:"button",onClick:n,"aria-label":"Dismiss",className:"text-muted-foreground hover:text-foreground focus-ring absolute top-2 right-2 rounded-md p-1 transition-colors",children:t.jsx(oe,{className:"size-3.5"})})]})}const Yt="max-h-[40svh] sm:max-h-[50svh]",Xt={initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0}};function T({title:e,tone:n="waiting",children:o}){const s=m.useId();return t.jsxs("section",{"aria-labelledby":s,className:"min-w-0",children:[t.jsx("h2",{id:s,className:y("mb-2 text-xs font-medium",n==="waiting"?"text-status-warning-fg":"text-muted-foreground"),children:e}),o]})}function X({edge:e}){return t.jsx("div",{"aria-hidden":"true","data-slot":`pinned-triage-fade-${e}`,className:y("from-background/95 via-background/65 pointer-events-none absolute inset-x-0 h-6 to-transparent",e==="bottom"?"bottom-0 bg-gradient-to-t":"top-0 bg-gradient-to-b")})}const J={animate:{transition:{staggerChildren:.04}}};function Jt(e){return e?0:.18}function Zt({approvals:e,asks:n,settlingAsks:o,askAgentNames:s,onOpenSession:i,approvalsUnavailable:a,onRetryApprovals:r,scheduleApprovals:l,errorSignals:d,activityItems:c,onOpenActivity:h,shiftReport:g,presence:f,condensed:j,onExpand:x,className:u}){const p=ie(),v=m.useRef(null),N=Fe(v),k=e.length>0||n.length>0||o.length>0||l.length>0||a,P=d.length>0,w=c.length>0,je=k||P||w||g!==void 0||(f==null?void 0:f.occupied)===!0,O=Gt({questions:n.length,requests:e.length,schedules:l.length,approvalsUnavailable:a,attention:d.length+c.length}),ve=j===!0&&O.compact!=="";return t.jsxs(t.Fragment,{children:[t.jsx("div",{role:"status","aria-live":"polite","aria-atomic":"true",className:"sr-only",children:O.spoken}),t.jsxs(V,{initial:!1,children:[ve&&t.jsx(R.div,{"data-slot":"pinned-triage-summary",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},transition:{duration:Jt(p===!0)},className:y("bg-background/95 border-border/60 shrink-0 border-b backdrop-blur-sm",u),children:t.jsxs("button",{type:"button",onClick:x,className:"text-muted-foreground hover:text-foreground flex min-h-11 w-full min-w-0 items-center gap-2 px-[var(--msg-padding-x)] text-left text-xs",children:[t.jsx("span",{className:"bg-status-warning-dot size-1.5 shrink-0 rounded-full","aria-hidden":!0}),t.jsx("span",{className:"min-w-0 flex-1 truncate",children:O.compact}),t.jsx(Le,{className:"size-3.5 shrink-0","aria-hidden":!0})]})},"triage-summary"),je&&j!==!0&&t.jsxs(R.div,{"data-slot":"pinned-triage-header",...Xt,transition:{duration:p?0:.25,ease:[0,0,.2,1]},className:y("bg-background/95 border-border/60 relative shrink-0 overflow-hidden border-b backdrop-blur-sm",u),children:[t.jsxs("div",{ref:v,onScroll:N.onScroll,"data-slot":"pinned-triage-scroller",className:y("flex w-full min-w-0 scroll-py-6 flex-col gap-3 overflow-y-auto overscroll-contain px-[var(--msg-padding-x)] py-3",Yt),children:[k&&t.jsxs(T,{title:"Waiting on you",children:[(n.length>0||o.length>0)&&t.jsx(qe,{asks:n,agentNames:s,onOpenSession:i,emptyState:t.jsx("p",{className:"text-muted-foreground text-xs",children:"Nothing needs you"})}),e.length>0&&t.jsx(ze,{approvals:e}),e.length===0&&a&&t.jsx(Be,{onRetry:r}),t.jsx(V,{initial:!1,children:l.map(S=>t.jsx(We,{task:S,className:"mt-2"},S.id))})]}),P&&t.jsx(T,{title:"Needs attention",children:t.jsx("div",{className:"border-status-warning-border/40 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:J,initial:"initial",animate:"animate",children:d.map(S=>t.jsx(Pt,{signal:S},S.id))})})}),g&&t.jsx(Qt,{notification:g.notification,onDismiss:g.onDismiss}),w&&t.jsx(T,{title:"Recent activity",tone:"neutral",children:t.jsx("div",{className:"border-border/60 bg-background/60 rounded-lg border p-2",children:t.jsx(R.div,{variants:J,initial:"initial",animate:"animate",children:c.map(S=>t.jsx(He,{notification:S,onOpen:()=>h(S)},S.id))})})}),f==null?void 0:f.node]}),N.start&&t.jsx(X,{edge:"top"}),N.end&&t.jsx(X,{edge:"bottom"})]},"triage-header")]})]})}function es({presence:e,composerFocused:n,onExpand:o,className:s}){const{approvals:i,isError:a,retry:r}=_e(),{interactions:l}=Ue(),d=Ke(),c=Ve(l),{schedules:h,errors:g,activity:f}=ae(),j=Ge(),x=fe(),{mutate:u}=Qe(),p=re({strict:!1}),v=W(),N=Ye(),k=Xe(h),P=Je(i),w=m.useCallback(()=>{v({...le.home(),search:{}})},[v]);return t.jsxs(t.Fragment,{children:[t.jsx(Zt,{approvals:P,asks:l,settlingAsks:d,askAgentNames:c,onOpenSession:K=>{v(H({session:K}))},approvalsUnavailable:a&&i.length===0,onRetryApprovals:r,scheduleApprovals:k,errorSignals:g,activityItems:f,onOpenActivity:j,shiftReport:x===void 0?void 0:{notification:x,onDismiss:()=>u(x.id)},presence:e,condensed:N&&n===!0,onExpand:o,className:s}),t.jsx(Et,{open:p.detail==="dead-letter",itemId:p.itemId,onClose:w}),t.jsx(qt,{open:p.detail==="failed-run",itemId:p.itemId,onClose:w}),t.jsx(Bt,{open:p.detail==="offline-agent",onClose:w})]})}const ts=["What can you help with?","Make my first agent","What’s in this project?","Set up a daily run"];function ss({roomId:e}){const n=m.useCallback(o=>{de.getState().set(e,o),ce.getState().requestFocus(e)},[e]);return t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1",children:t.jsx(he,{suggestions:ts,onChipClick:n,ariaLabel:"Ways to start",size:"comfortable"})})}function ns(e){var a;const{data:n}=Ze(e),o=((a=n==null?void 0:n.members.find(r=>r.author.id===n.viewerAuthorId))==null?void 0:a.lastReadSeq)??null,[s,i]=m.useState({roomId:null,seq:null});return s.roomId===e?s.seq:o===null?null:(i({roomId:e,seq:o}),o)}function os(e,n){if(e===void 0)return null;let o=null,s=1/0;for(const i of e){if(!i.enabled||i.status!=="active")continue;const a=i.nextRun;if(a==null)continue;const r=Date.parse(a);Number.isNaN(r)||r<=n||r>=s||(s=r,o={name:i.displayName??i.name,at:a})}return o}function is(e,n){const o=new Date(e),s=o.toLocaleTimeString(void 0,{hour:"numeric",minute:"2-digit"}),i=as(new Date(n),o);return i===0?`today at ${s}`:i===1?`tomorrow at ${s}`:`on ${o.toLocaleDateString(void 0,{weekday:"long",month:"short",day:"numeric"})} at ${s}`}function as(e,n){const o=s=>new Date(s.getFullYear(),s.getMonth(),s.getDate()).getTime();return Math.round((o(n)-o(e))/864e5)}function rs(e,n){return e===null?null:`Next up: ${e.name} runs ${is(e.at,n)}.`}function ls({forwardLook:e,suggestion:n}){return t.jsx(R.div,{"data-slot":"home-quiet-state",initial:{opacity:0},animate:{opacity:1},transition:{duration:.2},className:"border-border/60 shrink-0 border-b",children:t.jsxs("div",{className:"w-full px-[var(--msg-padding-x)] py-2",children:[t.jsxs("p",{className:"text-muted-foreground text-xs",children:[t.jsx("span",{className:"text-foreground/80 font-medium",children:"All quiet."}),e!==null&&t.jsxs(t.Fragment,{children:[" ",e]})]}),n]})})}function ds({roomId:e,presenceOccupied:n}){const o=_(e),s=ns(e),{items:i,isLoading:a,isAnyError:r}=et(),{total:l}=ae(),d=fe(),c=o!==void 0&&o.length>0,h=s!==null&&o!==void 0&&o.every(k=>k.seq<=s),g=i.length>0||a||r||l>0||d!==void 0||n,f=c&&h&&!g,[j,x]=m.useState("waiting");f&&j==="waiting"?x("shown"):!f&&j==="shown"&&x("retired");const u=f&&j!=="retired",p=tt(),{data:v}=st(p&&u),N=nt();return u?t.jsx(ls,{forwardLook:rs(os(v,N),N),suggestion:t.jsx(Kt,{})}):null}const pe="dorkos:home-opened-on";function Z(){const e=new Date,n=String(e.getMonth()+1).padStart(2,"0"),o=String(e.getDate()).padStart(2,"0");return`${e.getFullYear()}-${n}-${o}`}function cs(){try{return localStorage.getItem(pe)}catch{return null}}function us(e){try{localStorage.setItem(pe,e)}catch{}}function ms(){const[e]=m.useState(()=>cs()!==Z());return m.useEffect(()=>{e&&us(Z())},[e]),e}function hs({children:e}){const n=ms(),o=ie(),s=n&&o!==!0;return t.jsx(R.div,{className:"h-full",initial:s?{opacity:0}:!1,animate:{opacity:1},transition:{duration:.45,ease:[0,0,.2,1]},children:e})}const ee="@dorkbot",gs="Build me a tracker for my customers",fs="Make a daily plan board",xe="Something else",ps=[gs,fs,xe];function xs({roomId:e,mode:n}){const o=Rt(),s=ot(),i=m.useCallback(a=>{if(a===xe){de.getState().set(e,`${ee} `),ce.getState().requestFocus(e);return}o.mutate({roomId:e,text:`${ee} ${a}`,clientId:it()})},[e,o]);return n==="starters"?t.jsx("div",{className:"w-full px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-chips",children:t.jsx(he,{suggestions:ps,onChipClick:i,ariaLabel:"First jobs for DorkBot",size:"comfortable"})}):t.jsxs("div",{className:"flex w-full flex-wrap gap-2 px-[var(--msg-padding-x)] pb-1","data-testid":"first-run-connect-chips",children:[t.jsx(b,{size:"sm",onClick:()=>s.open("account"),children:"Continue with DorkOS"}),t.jsx(b,{size:"sm",variant:"outline",onClick:()=>s.open("runtimes"),children:"Use my own AI"})]})}function js(e){var r,l;const{data:n}=at(),o=_(e),s=ue(e,null),i=((r=n==null?void 0:n.onboarding)==null?void 0:r.welcomeEntryId)??null;if(e===null||i===null||!o||s.length>0)return null;const a=o.reduce((d,c)=>d===void 0||c.seq>d.seq?c:d,void 0);return(a==null?void 0:a.id)!==i?null:((l=n==null?void 0:n.onboarding)==null?void 0:l.firstRunPath)==="none"?"connect":"starters"}const vs=5,bs="relative after:absolute after:-inset-x-1 after:-inset-y-2.5 md:after:hidden";function ys(e,n){return e===null||n===null?null:Math.max(0,n-Date.parse(e))}function Ss({row:e,onFollow:n,onViewProfile:o}){const[s,i]=m.useState(null),a=ys(e.since,s),r=e.profileMemberId,l=o===void 0||r===null?void 0:()=>o(r);return t.jsx(kt,{onViewProfile:l,identity:{kind:e.face.kind,displayName:e.name,...e.handle!==null?{handle:e.handle}:{},color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},...e.face.kind==="agent"?{agent:{...e.runtime!==null?{runtime:e.runtime}:{},...a!==null?{working:{...e.roomTitle!==null?{room:e.roomTitle}:{},forMs:a}}:{}}}:{}},children:t.jsxs("button",{type:"button","aria-label":e.detail===null?`Watch ${e.name}`:`Watch ${e.name}: ${e.detail}`,onClick:()=>n(e.follow),onPointerEnter:()=>i(Date.now()),onPointerLeave:()=>i(null),onFocus:()=>i(Date.now()),onBlur:()=>i(null),className:y("focus-ring group/identity hover:bg-muted/60 flex min-w-0 items-center gap-1.5 rounded-full py-1 pr-2.5 pl-1 text-xs transition-colors",bs),children:[t.jsx(rt,{size:"xs",kind:e.face.kind,color:e.face.color,...e.face.emoji!==void 0?{emoji:e.face.emoji}:{},...e.face.imageUrl!==void 0?{imageUrl:e.face.imageUrl}:{},...e.face.origin!==void 0?{origin:e.face.origin}:{},fallback:e.face.fallback,status:"working"}),t.jsx("span",{className:"text-foreground shrink-0 font-medium",children:e.name}),e.detail!==null&&t.jsxs("span",{"aria-hidden":!0,className:"text-muted-foreground truncate",children:["· ",e.detail]})]})})}function Ns({rows:e,onFollow:n,onViewProfile:o,className:s}){if(e.length===0)return null;const i=e.slice(0,vs),a=e.length-i.length;return t.jsxs("ul",{"data-testid":"presence-strip","aria-label":"Working right now",className:y("flex items-center gap-x-2 overflow-hidden",s),children:[i.map(r=>t.jsx("li",{className:"min-w-0",children:t.jsx(Ss,{row:r,onFollow:n,onViewProfile:o})},r.id)),a>0&&t.jsx("li",{"aria-label":a===1?"1 more agent is working":`${a} more agents are working`,className:"text-muted-foreground shrink-0 text-xs",children:t.jsxs("span",{"aria-hidden":!0,children:["+",a," more"]})})]})}function ks(e){return`replying in ${e}`}const ws="working in a chat";function Rs(e,n){var i;const o=n.rosters[e];if(o!==void 0)return o.members.map(a=>({author:a.author,origin:a.origin}));const s=(i=n.rooms[e])==null?void 0:i.participants;return s==null?[]:s.map(a=>({author:a}))}function Cs(e){const n=new Map;for(const[o,s]of Object.entries(e))s!==null&&n.set(lt(o),{path:o,manifest:s});return n}function te(e){return{...e,line:ct(e.name,e.binding,e.state),detail:dt(e.binding,e.state)}}function Is(e){const n=Cs(e.agents),o=new Set(e.excludeRoomIds??[]),s=[],i=new Set;for(const l of e.claims){const d=Rs(l.roomId,e).find(f=>f.author.id===l.authorId);if(d===void 0)continue;const c=d.author.agentRef===void 0?void 0:n.get(d.author.agentRef);if(c!==void 0&&i.add(c.path),o.has(l.roomId))continue;const h=e.rooms[l.roomId],g=h===void 0?null:me(h);s.push(te({id:`room:${l.roomId}:${l.authorId}`,name:d.author.displayName,handle:d.author.handle,face:G({record:d.author,override:c===void 0?null:Q(c.manifest),...d.origin!==void 0?{origin:d.origin}:{}}),binding:g===null?null:ks(g),state:l.state,since:l.since,roomTitle:g,runtime:(c==null?void 0:c.manifest.runtime)??null,profileMemberId:c===void 0?null:e.meshIdByPath[c.path]??null,follow:{kind:"room",roomId:l.roomId}}))}const a=new Set(i),r=[];for(const l of e.sessions){if(a.has(l.cwd))continue;const d=e.agents[l.cwd];if(d==null)continue;a.add(l.cwd);const c=d.displayName??d.name;r.push(te({id:`session:${l.sessionId}`,name:c,handle:null,face:G({record:{id:d.id,kind:"agent",displayName:c},override:Q(d)}),binding:ws,state:"working",since:null,roomTitle:null,runtime:d.runtime,profileMemberId:e.meshIdByPath[l.cwd]??null,follow:{kind:"session",sessionId:l.sessionId,cwd:l.cwd}}))}return r.sort((l,d)=>l.name.localeCompare(d.name)||l.id.localeCompare(d.id)),[...s,...r]}function As(e,n,o){var a;const s=new Set(ut(Object.keys(n),Object.values(o))),i=[];for(const[r,l]of Object.entries(n))((a=e[r])==null?void 0:a.lifecycle)==="streaming"&&s.has(r)&&i.push({sessionId:r,cwd:l});return i}const se=[],Ps=[],ne="\0",D="";function Ds(){const e=M(m.useCallback(i=>i.statuses,[])),n=M(m.useCallback(i=>i.statusCwds,[])),o=M(m.useCallback(i=>i.sessions,[])),s=m.useMemo(()=>As(e,n,o).map(i=>`${i.sessionId}${ne}${i.cwd}`).sort().join(D),[e,n,o]);return m.useMemo(()=>s.length===0?Ps:s.split(D).map(i=>{const[a,r]=i.split(ne);return{sessionId:a,cwd:r}}),[s])}function Os(e=[]){const n=mt(),o=ht(),s=Ds(),{data:i}=gt(),{data:a}=ft(),r=m.useMemo(()=>[...new Set(o.map(u=>u.roomId))].sort().join(`
2
+ `),[o]),l=m.useMemo(()=>r.length===0?[]:r.split(`
3
+ `),[r]),d=pt({queries:l.map(u=>({queryKey:xt.detail(u),queryFn:()=>n.getRoom(u)})),combine:u=>{const p={};for(const v of u)v.data!==void 0&&(p[v.data.id]=v.data);return p}}),c=m.useMemo(()=>{const u={};for(const p of i??[])u[p.id]=p;return u},[i]),h=m.useMemo(()=>((a==null?void 0:a.agents)??[]).map(u=>u.projectPath),[a]),{data:g}=jt(h),f=m.useMemo(()=>g??{},[g]),j=m.useMemo(()=>{const u={};for(const p of(a==null?void 0:a.agents)??[])u[p.projectPath]=p.id;return u},[a]),x=e.join(D);return m.useMemo(()=>{if(o.length===0&&s.length===0)return se;const u=Is({claims:o,rosters:d,rooms:c,sessions:s,agents:f,meshIdByPath:j,excludeRoomIds:x.length===0?[]:x.split(D)});return u.length===0?se:u},[o,d,c,s,f,j,x])}function Ms(e=[]){const n=Os(e),o=W(),{open:s}=vt(),i=m.useCallback(r=>{if(r.kind==="room"){Y.getState().recordOpened("room",r.roomId),o({...le.channels(),search:{id:r.roomId}});return}r.cwd&&Y.getState().recordOpened("agent",r.cwd),o(H({session:r.sessionId,dir:r.cwd}))},[o]),a=m.useMemo(()=>t.jsx(Ns,{rows:n,onFollow:i,onViewProfile:s}),[n,i,s]);return{occupied:n.length>0,node:a}}function E({title:e,children:n,action:o}){return t.jsxs("div",{className:"text-muted-foreground flex h-full flex-col items-center justify-center gap-2 p-10 text-center text-sm",children:[t.jsx(Nt,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),t.jsx("p",{className:"text-foreground font-medium",children:e}),t.jsx("p",{className:"max-w-sm",children:n}),o]})}function Ts(){return t.jsxs(t.Fragment,{children:[t.jsx(bt,{children:"Home"}),t.jsx(Es,{})]})}function Es(){var f,j,x;const e=yt(),[n,o]=m.useState(!1),s=m.useCallback(()=>{const u=document.activeElement;wt(u)&&u.blur()},[]),{thread:i,entry:a}=re({strict:!1}),r=St(),l=Ms(e.room===null?[]:[e.room.id]),d=_(((f=e.room)==null?void 0:f.id)??null),c=ue(((j=e.room)==null?void 0:j.id)??null,null),h=d!==void 0&&d.length===0&&c.length===0,g=js(((x=e.room)==null?void 0:x.id)??null);if(e.status==="loading")return t.jsxs("div",{className:"flex h-full flex-col","aria-busy":!0,children:[t.jsxs("div",{className:"flex items-center gap-3 border-b px-4 py-3",children:[t.jsx(C,{className:"size-7 rounded-full"}),t.jsx(C,{className:"h-4 w-40"})]}),t.jsx("div",{className:"flex-1"})]});if(e.status==="error")return t.jsx(E,{title:"Couldn’t load your team room",action:t.jsx(b,{variant:"outline",size:"sm",className:"mt-2",onClick:e.retry,children:"Try again"}),children:"Its messages are safe."});if(e.status==="missing")return t.jsx(E,{title:"Your team room isn’t open yet",children:"DorkOS opens it at startup. Still missing? Restart DorkOS."});if(e.status==="archived"){const u=e.room;return t.jsx(E,{title:`${me(u)} is archived`,action:t.jsx(b,{variant:"outline",size:"sm",className:"mt-2",disabled:r.isPending,onClick:()=>r.mutate({roomId:u.id}),children:r.isPending?"Bringing it back…":"Bring it back"}),children:"Its messages are safe."})}return t.jsx(hs,{children:t.jsx(Ct,{roomId:e.room.id,threadId:i,entrySeq:a,threadRoute:"/",offerJumpBackIn:!0,onComposerFocusChange:o,aboveTimeline:t.jsxs(t.Fragment,{children:[t.jsx(es,{presence:l,composerFocused:n,onExpand:s}),t.jsx(ds,{roomId:e.room.id,presenceOccupied:l.occupied})]}),aboveComposer:g?t.jsx(xs,{roomId:e.room.id,mode:g}):h?t.jsx(ss,{roomId:e.room.id}):void 0})})}const $n=Ts;export{$n as component};
@@ -1 +1 @@
1
- import{j as e,G as R,ar as f,be as D,B as E,eY as C,r as n,eZ as M,e_ as b,e$ as F,f0 as _,f1 as B,e as L,f2 as u,f3 as z,d0 as H,e2 as $,bf as G,a$ as U,c$ as K,b2 as Q}from"./index-B6Scr7KJ.js";import{Q as V}from"./query-error-state-MyJ1ivia.js";import{P as N}from"./page-container-LomhzyuS.js";import{F as W,T as X,C as Y}from"./TasksEmptyState-Di3SbhJM.js";import{i as Z}from"./registry-BrjQCdmG.js";import{u as q,S as J}from"./search-x-DFBBEouE.js";import{S as ee}from"./scroll-area-Bf6IGziJ.js";import"./empty-state-Dv5iV4jb.js";import"./inline-code-BKPMIXZR.js";import"./form-DYSiVEri.js";import"./command-BvXBgZfv.js";import"./AgentPicker-Ldh64iOA.js";import"./AgentOptionRow-0VdNzXCF.js";import"./execution-config-Bej0Ot8e.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./list-runtime-types-BhkZkTrB.js";import"./format-cron-DYYwmo-o.js";const te="relative after:absolute after:-inset-x-1 after:-inset-y-2 md:after:hidden";function se({count:a,active:r,onToggle:d}){return e.jsxs("button",{type:"button","data-slot":"tasks-failing-chip","aria-pressed":r,onClick:d,className:R("text-destructive hover:bg-destructive/10 inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs",te,r?"border-destructive/50 bg-destructive/10":"border-input"),children:["Failing",e.jsx("span",{className:"font-medium tabular-nums",children:a})]})}function ae({count:a,onShow:r}){return e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsxs("button",{type:"button","data-slot":"tasks-failing-count",onClick:r,className:"text-destructive rounded-sm underline-offset-2 hover:underline",children:[a," failing"]})]})}function ie({onShowAll:a}){return e.jsxs(f.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},"data-slot":"tasks-nothing-failing",className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[e.jsx(D,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing is failing. Every schedule’s last run did its job."}),e.jsx(E,{variant:"outline",size:"sm",onClick:a,children:"Show all"})]})}const ne=8,re={visible:{transition:{staggerChildren:.04}},hidden:{}},oe={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}};function le({tasks:a,isLoading:r,agentMap:d,onEditTask:k,agentId:x}){const s=q(C,{debounce:{search:200}}),[c]=n.useState(0),[v,h]=n.useState(null),o=n.useMemo(()=>x?a.filter(t=>t.agentId===x):a,[a,x]),j=n.useMemo(()=>[...new Set(o.map(t=>t.agentId).filter(t=>!!t))],[o]),m=n.useMemo(()=>{const t=M(o,C,s.values,F,{field:s.sortField||b,direction:s.sortDirection});return s.sortField?t:_(t)},[o,s.values,s.sortField,s.sortDirection]),l=n.useMemo(()=>o.filter(B).length,[o]),g=s.values.health==="failing",y=()=>s.set("health",g?"":"failing");return r?e.jsx("div",{className:"space-y-3 py-4",children:Array.from({length:3}).map((t,p)=>e.jsx(L,{className:"h-14 w-full rounded-xl"},p))}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsxs(u,{state:s,className:"px-0",children:[e.jsx(u.Search,{placeholder:"Filter tasks…"}),(l>0||g)&&e.jsx(se,{count:l,active:g,onToggle:y}),e.jsx(u.Primary,{name:"status"}),e.jsx(u.AddFilter,{dynamicOptions:{agent:j}}),e.jsx(u.Sort,{options:F,defaultField:b}),e.jsx(u.ResultCount,{count:m.length,total:o.length,noun:"schedule",children:l>0&&e.jsx(ae,{count:l,onShow:()=>s.set("health","failing")})}),e.jsx(u.ActiveFilters,{})]}),e.jsx(ee,{className:"min-h-0 flex-1","data-testid":z.tasksList,children:e.jsx("div",{className:"space-y-2 pb-4",children:m.length===0&&g&&l===0?e.jsx(ie,{onShowAll:()=>s.clear("health")}):m.length===0&&o.length>0?e.jsxs(f.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:[e.jsx(J,{className:"text-muted-foreground/50 size-10"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.describeActive()?`No tasks match ${s.describeActive()}`:"No tasks match your filters"}),e.jsx(E,{variant:"outline",size:"sm",onClick:s.clearAll,children:"Clear filters"})]}):e.jsx(f.div,{initial:"hidden",animate:"visible",variants:re,className:"space-y-2",children:m.map((t,p)=>e.jsx(f.div,{variants:p<ne?oe:void 0,transition:{duration:.15},children:e.jsx(H,{task:t,agent:(t.agentId?d.get(t.agentId):void 0)??null,expanded:v===t.id,onToggleExpand:()=>h(v===t.id?null:t.id),onEdit:()=>k(t)})},t.id))},c)})})]})}function de(){return e.jsxs(e.Fragment,{children:[e.jsx($,{children:"Schedules"}),e.jsx(ce,{})]})}function ce(){const a=G(),{data:r=[],isLoading:d,isError:k,refetch:x}=U(a),[s,c]=n.useState(!1),[v,h]=n.useState(),[o,j]=n.useState(null),m=r.some(i=>i.agentId),{data:l}=K(void 0,m||!d),g=n.useMemo(()=>{const i=new Map;for(const S of(l==null?void 0:l.agents)??[])i.set(S.id,S);return i},[l]),{externalTrigger:y,clear:t}=Q(),[p,T]=n.useState(!1);y&&!p&&!s?(T(!0),h(void 0),c(!0),t()):!y&&p&&T(!1);const A=i=>{j(i),h(void 0),c(!0)},O=()=>{j(null),h(void 0),c(!0)},w=i=>{h(i),c(!0)},P=i=>{c(i),i||j(null)};if(!a)return e.jsx(W,{icon:Z.tasks,name:"Scheduling",description:"Agents run tasks on a schedule, even while you’re away.",command:"dorkos --tasks"});if(k)return e.jsx(V,{className:"h-full",title:"Couldn’t load your scheduled tasks",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void x()});const I=r.length>0;return e.jsxs(e.Fragment,{children:[!I&&!d?e.jsx(f.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(N,{width:"full",children:e.jsx(X,{onCreateWithPreset:A,onCreateBlank:O})})}):e.jsx(f.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(N,{width:"full",scroll:!1,children:e.jsx(le,{tasks:r,isLoading:d,agentMap:g,onEditTask:w})})}),e.jsx(Y,{open:s,onOpenChange:P,editTask:v,initialPreset:o})]})}const Ee=de;export{Ee as component};
1
+ import{j as e,G as R,ap as f,bc as _,B as E,eX as C,r as n,eY as D,eZ as b,e_ as F,e$ as M,f0 as B,e as L,f1 as u,f2 as z,c_ as H,e1 as G,bd as U,aZ as Z,cZ as K,b0 as Q}from"./index-fge85Gub.js";import{Q as V}from"./query-error-state-BNPduDBN.js";import{P as N}from"./page-container-BCdJ_DsH.js";import{F as W,T as X,C as $}from"./TasksEmptyState-DsHh0blU.js";import{i as Y}from"./registry-DvKu39S1.js";import{u as q,S as J}from"./search-x-CHNgYj0F.js";import{S as ee}from"./scroll-area-MdXbnM77.js";import"./empty-state-BzWMBBQZ.js";import"./inline-code-7dwi7wWG.js";import"./form-DUFlQ-yL.js";import"./command-DuhX52Bi.js";import"./AgentPicker-DOba9a77.js";import"./AgentOptionRow-hemBruhh.js";import"./execution-config-D_PgYyCI.js";import"./settings-for-runtime-BoOa-ZFG.js";import"./list-runtime-types-hMouIGtG.js";import"./format-cron-D5dtMPdH.js";const te="relative after:absolute after:-inset-x-1 after:-inset-y-2 md:after:hidden";function se({count:a,active:r,onToggle:d}){return e.jsxs("button",{type:"button","data-slot":"tasks-failing-chip","aria-pressed":r,onClick:d,className:R("text-destructive hover:bg-destructive/10 inline-flex h-7 items-center gap-1.5 rounded-md border px-2.5 text-xs",te,r?"border-destructive/50 bg-destructive/10":"border-input"),children:["Failing",e.jsx("span",{className:"font-medium tabular-nums",children:a})]})}function ae({count:a,onShow:r}){return e.jsxs(e.Fragment,{children:[e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsxs("button",{type:"button","data-slot":"tasks-failing-count",onClick:r,className:"text-destructive rounded-sm underline-offset-2 hover:underline",children:[a," failing"]})]})}function ie({onShowAll:a}){return e.jsxs(f.div,{initial:{opacity:0,y:20},animate:{opacity:1,y:0},transition:{duration:.3,ease:"easeOut"},"data-slot":"tasks-nothing-failing",className:"flex flex-col items-center justify-center gap-3 py-12 text-center",children:[e.jsx(_,{className:"text-muted-foreground/50 size-10","aria-hidden":!0}),e.jsx("p",{className:"text-muted-foreground text-sm",children:"Nothing is failing. Every schedule’s last run did its job."}),e.jsx(E,{variant:"outline",size:"sm",onClick:a,children:"Show all"})]})}const ne=8,re={visible:{transition:{staggerChildren:.04}},hidden:{}},oe={hidden:{opacity:0,y:8},visible:{opacity:1,y:0}};function le({tasks:a,isLoading:r,agentMap:d,onEditTask:k,agentId:x}){const s=q(C,{debounce:{search:200}}),[c]=n.useState(0),[v,h]=n.useState(null),o=n.useMemo(()=>x?a.filter(t=>t.agentId===x):a,[a,x]),j=n.useMemo(()=>[...new Set(o.map(t=>t.agentId).filter(t=>!!t))],[o]),m=n.useMemo(()=>{const t=D(o,C,s.values,F,{field:s.sortField||b,direction:s.sortDirection});return s.sortField?t:M(t)},[o,s.values,s.sortField,s.sortDirection]),l=n.useMemo(()=>o.filter(B).length,[o]),g=s.values.health==="failing",y=()=>s.set("health",g?"":"failing");return r?e.jsx("div",{className:"space-y-3 py-4",children:Array.from({length:3}).map((t,p)=>e.jsx(L,{className:"h-14 w-full rounded-xl"},p))}):e.jsxs("div",{className:"flex h-full flex-col overflow-hidden",children:[e.jsxs(u,{state:s,className:"px-0",children:[e.jsx(u.Search,{placeholder:"Filter tasks…"}),(l>0||g)&&e.jsx(se,{count:l,active:g,onToggle:y}),e.jsx(u.Primary,{name:"status"}),e.jsx(u.AddFilter,{dynamicOptions:{agent:j}}),e.jsx(u.Sort,{options:F,defaultField:b}),e.jsx(u.ResultCount,{count:m.length,total:o.length,noun:"schedule",children:l>0&&e.jsx(ae,{count:l,onShow:()=>s.set("health","failing")})}),e.jsx(u.ActiveFilters,{})]}),e.jsx(ee,{className:"min-h-0 flex-1","data-testid":z.tasksList,children:e.jsx("div",{className:"space-y-2 pb-4",children:m.length===0&&g&&l===0?e.jsx(ie,{onShowAll:()=>s.clear("health")}):m.length===0&&o.length>0?e.jsxs(f.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:[e.jsx(J,{className:"text-muted-foreground/50 size-10"}),e.jsx("p",{className:"text-muted-foreground text-sm",children:s.describeActive()?`No tasks match ${s.describeActive()}`:"No tasks match your filters"}),e.jsx(E,{variant:"outline",size:"sm",onClick:s.clearAll,children:"Clear filters"})]}):e.jsx(f.div,{initial:"hidden",animate:"visible",variants:re,className:"space-y-2",children:m.map((t,p)=>e.jsx(f.div,{variants:p<ne?oe:void 0,transition:{duration:.15},children:e.jsx(H,{task:t,agent:(t.agentId?d.get(t.agentId):void 0)??null,expanded:v===t.id,onToggleExpand:()=>h(v===t.id?null:t.id),onEdit:()=>k(t)})},t.id))},c)})})]})}function de(){return e.jsxs(e.Fragment,{children:[e.jsx(G,{children:"Schedules"}),e.jsx(ce,{})]})}function ce(){const a=U(),{data:r=[],isLoading:d,isError:k,refetch:x}=Z(a),[s,c]=n.useState(!1),[v,h]=n.useState(),[o,j]=n.useState(null),m=r.some(i=>i.agentId),{data:l}=K(void 0,m||!d),g=n.useMemo(()=>{const i=new Map;for(const S of(l==null?void 0:l.agents)??[])i.set(S.id,S);return i},[l]),{externalTrigger:y,clear:t}=Q(),[p,T]=n.useState(!1);y&&!p&&!s?(T(!0),h(void 0),c(!0),t()):!y&&p&&T(!1);const A=i=>{j(i),h(void 0),c(!0)},O=()=>{j(null),h(void 0),c(!0)},w=i=>{h(i),c(!0)},P=i=>{c(i),i||j(null)};if(!a)return e.jsx(W,{icon:Y.tasks,name:"Scheduling",description:"Agents run tasks on a schedule, even while you’re away.",command:"dorkos --tasks"});if(k)return e.jsx(V,{className:"h-full",title:"Couldn’t load your scheduled tasks",description:"The DorkOS server didn’t answer. Check that it’s running.",onRetry:()=>void x()});const I=r.length>0;return e.jsxs(e.Fragment,{children:[!I&&!d?e.jsx(f.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(N,{width:"full",children:e.jsx(X,{onCreateWithPreset:A,onCreateBlank:O})})}):e.jsx(f.div,{initial:{opacity:0},animate:{opacity:1},transition:{duration:.15},className:"h-full min-h-0",children:e.jsx(N,{width:"full",scroll:!1,children:e.jsx(le,{tasks:r,isLoading:d,agentMap:g,onEditTask:w})})}),e.jsx($,{open:s,onOpenChange:P,editTask:v,initialPreset:o})]})}const Ee=de;export{Ee as component};
@@ -1 +1 @@
1
- import{a1 as j,a2 as g,r as f,j as e,e2 as N,am as i,a0 as b,e3 as y,_ as u,b8 as w}from"./index-B6Scr7KJ.js";import{I as C}from"./inline-code-BKPMIXZR.js";import{T,d as v,b as p,e as c,a as S,c as d}from"./table-DsxLk3Gx.js";import{P as k}from"./page-container-LomhzyuS.js";import{G as L}from"./git-branch-1zYKSuur.js";const F=["workspaces","scan"],P=6e4;function W(){var a,n,l;const s=j(),t=g({queryKey:F,queryFn:()=>s.scanWorktrees(),staleTime:P,refetchOnWindowFocus:!0});return{root:((a=t.data)==null?void 0:a.root)??null,worktrees:((n=t.data)==null?void 0:n.worktrees)??[],warnings:((l=t.data)==null?void 0:l.warnings)??[],isLoading:t.isLoading,isError:t.isError}}const m="—";function A(s){return s.changedFiles===null?m:s.changedFiles===0?"Clean":`${s.changedFiles} changed`}function B(s){const{ahead:t,behind:a,upstreamGone:n}=s;return n?"Branch merged or deleted":t===null||a===null?m:t===0&&a===0?"In sync":[t>0&&`${t} ahead`,a>0&&`${a} behind`].filter(Boolean).join(" · ")}function E({worktree:s}){const t=(s.changedFiles??0)>0;return e.jsxs(p,{children:[e.jsxs(d,{className:"max-w-0",children:[e.jsx("div",{className:"truncate font-medium",children:s.name}),e.jsx("div",{className:"text-muted-foreground truncate text-xs",title:s.path,children:i(s.path)})]}),e.jsx(d,{className:"max-w-0",children:s.readable?s.branch?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(L,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"truncate text-xs",children:s.branch})]}):e.jsx("span",{className:"text-muted-foreground text-xs",children:"No branch"}):e.jsx(u,{variant:"outline",title:"DorkOS couldn’t read this folder with git.",children:"Can’t read"})}),e.jsx(d,{className:t?"text-status-warning-fg":"text-muted-foreground",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:A(s)})}),e.jsx(d,{className:"text-muted-foreground hidden md:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:B(s)})}),e.jsx(d,{className:"text-muted-foreground hidden sm:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:s.lastCommitAt?w(s.lastCommitAt):m})})]})}function G({project:s,worktrees:t}){return e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[s,e.jsx(u,{variant:"secondary",children:t.length})]}),e.jsx("div",{className:"bg-card rounded-lg border",children:e.jsxs(T,{children:[e.jsx(v,{children:e.jsxs(p,{children:[e.jsx(c,{children:"Folder"}),e.jsx(c,{children:"Branch"}),e.jsx(c,{children:"Changes"}),e.jsx(c,{className:"hidden md:table-cell",children:"Compared to remote"}),e.jsx(c,{className:"hidden sm:table-cell",children:"Last commit"})]})}),e.jsx(S,{children:t.map(a=>e.jsx(E,{worktree:a},a.path))})]})})]})}function H(){const{root:s,worktrees:t,warnings:a,isLoading:n,isError:l}=W(),x=f.useMemo(()=>{const r=new Map;for(const o of t){const h=r.get(o.project)??[];h.push(o),r.set(o.project,h)}return[...r.entries()]},[t]);return e.jsxs(k,{width:"wide",children:[e.jsx(N,{children:"Workspaces"}),e.jsx("p",{className:"text-muted-foreground mb-6 text-sm",children:"Copies of your code, per agent."}),a.length>0&&e.jsxs("div",{className:"mb-6 rounded-lg border border-amber-600/40 bg-amber-500/10 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Some folders couldn’t be read"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"This list may be missing what’s inside them."}),e.jsx("ul",{className:"text-muted-foreground mt-2 space-y-0.5 text-xs",children:a.map(r=>e.jsxs("li",{className:"truncate",title:r.path,children:[i(r.path)," (",r.reason,")"]},r.path))})]}),n?e.jsx("p",{className:"text-muted-foreground text-sm",children:"Looking for your worktrees…"}):l?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(b,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"Couldn’t check your worktrees"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"The scan didn’t finish. DorkOS tries again on its own."})]}):x.length===0?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(y,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"No worktrees yet"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"A worktree is a copy of your project, so agents’ edits never collide."}),s&&e.jsxs("p",{className:"text-muted-foreground mt-3 truncate text-xs",title:s,"data-slot":"workspaces-root-path",children:["Looking in ",e.jsx(C,{children:i(s)})]})]}):e.jsx("div",{className:"flex flex-col gap-8",children:x.map(([r,o])=>e.jsx(G,{project:r,worktrees:o},r))})]})}const K=H;export{K as component};
1
+ import{a1 as j,a2 as g,r as f,j as e,e1 as N,ak as i,a0 as b,e2 as y,_ as u,b6 as w}from"./index-fge85Gub.js";import{I as C}from"./inline-code-7dwi7wWG.js";import{T,d as v,b as p,e as c,a as k,c as d}from"./table-BcJvj9rx.js";import{P as S}from"./page-container-BCdJ_DsH.js";import{G as L}from"./git-branch-uZFa3Tmr.js";const F=["workspaces","scan"],P=6e4;function W(){var a,n,l;const s=j(),t=g({queryKey:F,queryFn:()=>s.scanWorktrees(),staleTime:P,refetchOnWindowFocus:!0});return{root:((a=t.data)==null?void 0:a.root)??null,worktrees:((n=t.data)==null?void 0:n.worktrees)??[],warnings:((l=t.data)==null?void 0:l.warnings)??[],isLoading:t.isLoading,isError:t.isError}}const m="—";function A(s){return s.changedFiles===null?m:s.changedFiles===0?"Clean":`${s.changedFiles} changed`}function B(s){const{ahead:t,behind:a,upstreamGone:n}=s;return n?"Branch merged or deleted":t===null||a===null?m:t===0&&a===0?"In sync":[t>0&&`${t} ahead`,a>0&&`${a} behind`].filter(Boolean).join(" · ")}function E({worktree:s}){const t=(s.changedFiles??0)>0;return e.jsxs(p,{children:[e.jsxs(d,{className:"max-w-0",children:[e.jsx("div",{className:"truncate font-medium",children:s.name}),e.jsx("div",{className:"text-muted-foreground truncate text-xs",title:s.path,children:i(s.path)})]}),e.jsx(d,{className:"max-w-0",children:s.readable?s.branch?e.jsxs("span",{className:"flex items-center gap-1.5",children:[e.jsx(L,{className:"text-muted-foreground size-3.5 shrink-0"}),e.jsx("span",{className:"truncate text-xs",children:s.branch})]}):e.jsx("span",{className:"text-muted-foreground text-xs",children:"No branch"}):e.jsx(u,{variant:"outline",title:"DorkOS couldn’t read this folder with git.",children:"Can’t read"})}),e.jsx(d,{className:t?"text-status-warning-fg":"text-muted-foreground",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:A(s)})}),e.jsx(d,{className:"text-muted-foreground hidden md:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:B(s)})}),e.jsx(d,{className:"text-muted-foreground hidden sm:table-cell",children:e.jsx("span",{className:"text-xs whitespace-nowrap",children:s.lastCommitAt?w(s.lastCommitAt):m})})]})}function G({project:s,worktrees:t}){return e.jsxs("section",{children:[e.jsxs("h2",{className:"mb-3 flex items-center gap-2 text-sm font-semibold",children:[s,e.jsx(u,{variant:"secondary",children:t.length})]}),e.jsx("div",{className:"bg-card rounded-lg border",children:e.jsxs(T,{children:[e.jsx(v,{children:e.jsxs(p,{children:[e.jsx(c,{children:"Folder"}),e.jsx(c,{children:"Branch"}),e.jsx(c,{children:"Changes"}),e.jsx(c,{className:"hidden md:table-cell",children:"Compared to remote"}),e.jsx(c,{className:"hidden sm:table-cell",children:"Last commit"})]})}),e.jsx(k,{children:t.map(a=>e.jsx(E,{worktree:a},a.path))})]})})]})}function H(){const{root:s,worktrees:t,warnings:a,isLoading:n,isError:l}=W(),x=f.useMemo(()=>{const r=new Map;for(const o of t){const h=r.get(o.project)??[];h.push(o),r.set(o.project,h)}return[...r.entries()]},[t]);return e.jsxs(S,{width:"wide",children:[e.jsx(N,{children:"Workspaces"}),e.jsx("p",{className:"text-muted-foreground mb-6 text-sm",children:"Copies of your code, per agent."}),a.length>0&&e.jsxs("div",{className:"mb-6 rounded-lg border border-amber-600/40 bg-amber-500/10 p-4",children:[e.jsx("p",{className:"text-sm font-medium",children:"Some folders couldn’t be read"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"This list may be missing what’s inside them."}),e.jsx("ul",{className:"text-muted-foreground mt-2 space-y-0.5 text-xs",children:a.map(r=>e.jsxs("li",{className:"truncate",title:r.path,children:[i(r.path)," (",r.reason,")"]},r.path))})]}),n?e.jsx("p",{className:"text-muted-foreground text-sm",children:"Looking for your worktrees…"}):l?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(b,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"Couldn’t check your worktrees"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"The scan didn’t finish. DorkOS tries again on its own."})]}):x.length===0?e.jsxs("div",{className:"bg-card rounded-xl border p-10 text-center",children:[e.jsx(y,{className:"text-muted-foreground/60 mx-auto size-8"}),e.jsx("p",{className:"mt-3 font-medium",children:"No worktrees yet"}),e.jsx("p",{className:"text-muted-foreground mt-1 text-sm",children:"A worktree is a copy of your project, so agents’ edits never collide."}),s&&e.jsxs("p",{className:"text-muted-foreground mt-3 truncate text-xs",title:s,"data-slot":"workspaces-root-path",children:["Looking in ",e.jsx(C,{children:i(s)})]})]}):e.jsx("div",{className:"flex flex-col gap-8",children:x.map(([r,o])=>e.jsx(G,{project:r,worktrees:o},r))})]})}const K=H;export{K as component};
@@ -1,4 +1,4 @@
1
- import{O as Jt,r as f,j as e,gs as Qt,a1 as V,lt as mt,a2 as ft,lu as Y,a3 as ce,a4 as $e,lv as Wt,lw as fe,lx as X,cq as Gt,ly as Vt,ch as Xt,gA as Zt,cu as Ie,l as Ne,lz as es,lA as ts,lB as ss,lC as Se,lD as Fe,B as S,lE as ns,c$ as ht,lF as pt,eo as re,eh as xt,ei as gt,ej as yt,ek as vt,el as _e,I as qe,bJ as jt,h1 as as,bK as Nt,bL as wt,bM as bt,bN as Ct,bO as St,bP as Rt,bR as rs,$ as is,lG as os,lH as ls,lI as cs,l0 as he,d2 as He,d3 as Be,d5 as Je,d6 as Qe,d7 as We,eD as Ge,dO as Ve,a7 as kt,ll as ds,lm as us,h$ as ms,lJ as fs,lK as Xe,lL as hs,lM as ps,lN as At,lO as xs,lP as Dt,lQ as Tt,lR as gs,e2 as Mt,lS as ys,lT as vs,lU as js,jr as Ns,a0 as ws,es as bs,fB as Cs,lV as Ss,lW as Rs,G as ve,ba as Re,er as Ze,Y as De,h2 as ks,lX as As,lY as rt,lZ as it,dc as Et,l_ as Ds,l$ as Ts,ku as Ms,ad as Es,n as ot}from"./index-B6Scr7KJ.js";import{T as Os,a as $s,R as Is}from"./RoomSurface-BlMNuQsT.js";import{c as ge,C as ke}from"./registry-tJrGs7kB.js";import{M as Ls}from"./markdown-content-Bk9lCksw.js";import{o as Us,a as zs,c as Fs}from"./owner-notice-4ZSBxa2K.js";import{B as Ps}from"./banner-CVrzHqOT.js";import"./ChannelComposer-BVACOdph.js";import"./pane-resize-handle-BOtzx5Q4.js";import"./UnreadDivider-LL4_YtF0.js";import"./use-room-follow-claim-B1QPFaUb.js";import"./use-connector-management-9Q7wHb06.js";import"./AgentRequestCard-CmAlDGTr.js";import"./access-copy-DHfPjN3G.js";import"./query-error-state-MyJ1ivia.js";import"./empty-state-Dv5iV4jb.js";import"./use-bindings-BgXZ0D7k.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-Cf7D0Oo6.js";import"./use-room-sessions-CdjzO67_.js";import"./file-DXbyb23e.js";import"./file-drag-GDx2qhdk.js";import"./find-latest-widget-fence-D1i7qNny.js";import"./WidgetErrorCard-BA3P7hNv.js";import"./index-B3xeyV6n.js";import"./card-DA_Z-FYX.js";import"./progress-qB87L0zJ.js";import"./table-DsxLk3Gx.js";import"./package-BmOMrNwc.js";import"./heart-C4CSHUW7.js";import"./git-branch-1zYKSuur.js";import"./file-text-CRTgqqkn.js";import"./paperclip-C1tkiT74.js";import"./index-JG_0k1NX.js";import"./RuntimeSetupDialog-DPU4QIY9.js";import"./inline-code-BKPMIXZR.js";import"./list-runtime-types-BhkZkTrB.js";import"./RuntimeConnectFlow-D3H5Fpkc.js";import"./useMutationState-lbcdmnfE.js";import"./runtime-connect-Dn0T5YWv.js";import"./use-transform-CiJqtMBf.js";import"./repeat-CBnopqBr.js";import"./format-duration-BCr6uzby.js";import"./mention-pill-os_7QQu2.js";import"./rotate-ccw-clock-D9XRHj5E.js";import"./unplug-B6dUhqA7.js";import"./message-square-off-DuOiETNI.js";import"./registry-BrjQCdmG.js";/**
1
+ import{O as Jt,r as f,j as e,gs as Qt,a1 as V,lw as mt,a2 as ft,lx as Y,a3 as ce,a4 as $e,ly as Wt,lz as fe,lA as X,co as Gt,lB as Vt,cf as Xt,gA as Zt,cs as Ie,l as Ne,lC as es,lD as ts,lE as ss,lF as Se,lG as Fe,B as S,lH as ns,cZ as ht,lI as pt,en as re,eg as xt,eh as gt,ei as yt,ej as vt,ek as _e,I as qe,bH as jt,h1 as as,bI as Nt,bJ as wt,bK as bt,bL as Ct,bM as St,bN as Rt,bP as rs,$ as is,lJ as os,lK as ls,lL as cs,l3 as he,d0 as He,d1 as Be,d3 as Je,d4 as Qe,d5 as We,eC as Ge,dN as Ve,dD as kt,lo as ds,lp as us,h$ as ms,lM as fs,lN as Xe,lO as hs,lP as ps,lQ as At,lR as xs,lS as Dt,lT as Tt,lU as gs,e1 as Mt,lV as ys,lW as vs,lX as js,ju as Ns,a0 as ws,er as bs,fA as Cs,lY as Ss,lZ as Rs,G as ve,b8 as Re,eq as Ze,Y as De,h2 as ks,l_ as As,l$ as rt,m0 as it,da as Et,m1 as Ds,m2 as Ts,kx as Ms,ab as Es,n as ot}from"./index-fge85Gub.js";import{T as Os,a as $s,R as Is}from"./RoomSurface-Bz1DfoQD.js";import{c as ge,C as ke}from"./registry-5Qudcjd5.js";import{M as Ls}from"./markdown-content-DV3AiG76.js";import{o as Us,a as zs,c as Fs}from"./owner-notice-Cn5EUxgh.js";import{B as Ps}from"./banner-CqhUGJmy.js";import"./ChannelComposer-YXkkFcyY.js";import"./pane-resize-handle-Bar-FdkY.js";import"./UnreadDivider-DPD9MQ8-.js";import"./use-room-follow-claim-_B7HonZx.js";import"./use-connector-management-CXVz2xe3.js";import"./AgentRequestCard-RFQOrk-W.js";import"./access-copy-Y2_F9uAx.js";import"./query-error-state-BNPduDBN.js";import"./empty-state-BzWMBBQZ.js";import"./use-bindings-h_mG9d64.js";import"./connection-copy--MA7AN04.js";import"./KeyEntry-CHJpgP6H.js";import"./use-room-sessions-CrFskgCJ.js";import"./file-DiYwTQdD.js";import"./file-drag-GDx2qhdk.js";import"./find-latest-widget-fence-BYtG5PzD.js";import"./WidgetErrorCard-Bte2obmw.js";import"./index-DI9IsN-O.js";import"./card-CM7-_8nD.js";import"./progress-es667_cM.js";import"./table-BcJvj9rx.js";import"./package-BafFSryH.js";import"./heart--8btr31M.js";import"./git-branch-uZFa3Tmr.js";import"./file-text-DLPhIP0f.js";import"./paperclip-DY4e-IlK.js";import"./index-CvIKejlx.js";import"./RuntimeSetupDialog-CEUC7GrY.js";import"./inline-code-7dwi7wWG.js";import"./list-runtime-types-hMouIGtG.js";import"./RuntimeConnectFlow-B0TIITVq.js";import"./useMutationState-TJGtJT5R.js";import"./runtime-connect-Dn0T5YWv.js";import"./use-transform-YUDqOhoc.js";import"./repeat-HOHWZc6L.js";import"./format-duration-BCr6uzby.js";import"./mention-pill-Db0XBC6Z.js";import"./rotate-ccw-clock-Dniulnw5.js";import"./unplug-CK2bPGpg.js";import"./message-square-off-w0__0O5g.js";import"./registry-DvKu39S1.js";/**
2
2
  * @license lucide-react v1.48.0 - ISC
3
3
  *
4
4
  * This source code is licensed under the ISC license.