@openscout/scout 0.2.96 → 0.2.97

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 (305) hide show
  1. package/bin/scoutd +0 -0
  2. package/dist/build-manifest.json +3 -3
  3. package/dist/client/assets/{ActivityScreen-BnoaUkVZ.js → ActivityScreen-y-5DLleY.js} +1 -1
  4. package/dist/client/assets/{AddProjectForm-IqOtJfRs.js → AddProjectForm-r_1tVuWk.js} +1 -1
  5. package/dist/client/assets/{AgentAvatar-6-KBVKUu.js → AgentAvatar-B7c0egdP.js} +1 -1
  6. package/dist/client/assets/{AgentConfigurationScreen-CuZJy07q.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
  7. package/dist/client/assets/{AgentDefinitionsWorkspace-Iyl4BesU.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
  8. package/dist/client/assets/{AgentDetailCard-C9rn3Fj5.js → AgentDetailCard-B_KLcgsP.js} +1 -1
  9. package/dist/client/assets/{AgentFloorView-YT-Jjccf.js → AgentFloorView-DMFiHs21.js} +1 -1
  10. package/dist/client/assets/{AgentInfoScreen-Dr99gQEZ.js → AgentInfoScreen-DHGLRddI.js} +1 -1
  11. package/dist/client/assets/{AgentLaneCard-DI2iW9zO.js → AgentLaneCard-ajZvcfdW.js} +1 -1
  12. package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-CTp39syR.js} +1 -1
  13. package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
  14. package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
  15. package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
  16. package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CFadSaia.js} +1 -1
  17. package/dist/client/assets/{AgentLanesView-CetZZDyF.js → AgentLanesView-u5vpLwQf.js} +1 -1
  18. package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-CsQA3pu_.js} +1 -1
  19. package/dist/client/assets/{AgentMasterScreen-DJPnstoD.js → AgentMasterScreen-C5WlWNmk.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-DCPCG4xb.js → AgentSessions-BePq5Lgc.js} +1 -1
  21. package/dist/client/assets/{AgentsConsole-CsYOoFJi.js → AgentsConsole-BuiZ_bDo.js} +1 -1
  22. package/dist/client/assets/{AgentsScreen-k8LvBuU_.js → AgentsScreen-CRi-hG2k.js} +1 -1
  23. package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
  24. package/dist/client/assets/{AstronautSuit-DbjQtfD_.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
  25. package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-PxWQd-sX.js} +1 -1
  26. package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-Cto0Ioz9.js} +1 -1
  27. package/dist/client/assets/{BriefingDetailScreen-CUCXO-KH.js → BriefingDetailScreen-C29smC5d.js} +1 -1
  28. package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-DNyFBrPn.js} +1 -1
  29. package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
  30. package/dist/client/assets/{BrokerScreen-BPbOHhCS.js → BrokerScreen-CS0s4Gm4.js} +1 -1
  31. package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CTBHjjGw.js} +1 -1
  32. package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-D4rc7wBQ.js} +1 -1
  33. package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-QvxCUzTi.js} +1 -1
  34. package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.js → CodeProjectPicker-DplkpM7f.js} +1 -1
  35. package/dist/client/assets/{CodeScreen-CeuO3EhR.js → CodeScreen-CrR2JaVj.js} +1 -1
  36. package/dist/client/assets/{ConversationComposer-CXPKx86g.js → ConversationComposer-H8_hsYSc.js} +1 -1
  37. package/dist/client/assets/{ConversationFeedRows-WrH-YI3L.js → ConversationFeedRows-hlEFlURs.js} +1 -1
  38. package/dist/client/assets/{ConversationHeader-BQWzGzLK.js → ConversationHeader-B0ZBhE_E.js} +1 -1
  39. package/dist/client/assets/{ConversationPanels-Dujvnmup.js → ConversationPanels-fMo6Uy1v.js} +2 -2
  40. package/dist/client/assets/{ConversationScreen-CR9pWB65.js → ConversationScreen-CXAHQwQ3.js} +1 -1
  41. package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-DI5GCiyW.js} +1 -1
  42. package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CXJHLNVM.js} +1 -1
  43. package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
  44. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
  45. package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-DXIlOlVu.js} +1 -1
  46. package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-CrELgl2e.js} +1 -1
  47. package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
  48. package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
  49. package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-D9X16fKq.js} +1 -1
  50. package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CY0RN78e.js} +1 -1
  51. package/dist/client/assets/{FlightObserveScreen-6mGnmWQA.js → FlightObserveScreen-qyzHzxLa.js} +1 -1
  52. package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-wZ-z67mX.js} +1 -1
  53. package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DAaWPiT_.js} +1 -1
  54. package/dist/client/assets/{HarnessesScreen-CHTuv8p6.js → HarnessesScreen-DbKkQM4o.js} +1 -1
  55. package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-CYKRfBad.js} +1 -1
  56. package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DYyd3cpz.js} +1 -1
  57. package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-NtM0bsg8.js} +1 -1
  58. package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchScreen-D3o3IODW.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
  60. package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
  61. package/dist/client/assets/{LaneTraceDetailSheet-BUgHz-sd.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
  62. package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
  63. package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-TvsID4fe.js} +1 -1
  64. package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
  65. package/dist/client/assets/{MeshScreen-BcxPkhm6.js → MeshScreen-BJ-j9YXv.js} +1 -1
  66. package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-BjprutE8.js} +2 -2
  67. package/dist/client/assets/{MessagesScreen-Bb5l13MO.js → MessagesScreen-CyNIZ3-X.js} +1 -1
  68. package/dist/client/assets/{MissionContextRail-DF0_kiU7.js → MissionContextRail-Be0uXljQ.js} +1 -1
  69. package/dist/client/assets/{MissionControlView-E3V7bENU.js → MissionControlView-Bj7cAbZd.js} +1 -1
  70. package/dist/client/assets/{MissionFocusOverlay-h15sQFvP.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
  71. package/dist/client/assets/{MissionLeftAgentRow-KPdk9rSa.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
  72. package/dist/client/assets/{MissionLogPane-BbdDKjUl.js → MissionLogPane-EsM_S3ro.js} +1 -1
  73. package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-Cqiq1CE1.js} +1 -1
  74. package/dist/client/assets/{NewChatComposer-_Stj0fZy.js → NewChatComposer-C_1op4dH.js} +1 -1
  75. package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-D7hwp6dm.js} +1 -1
  76. package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
  77. package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-BcrGQet8.js} +2 -2
  78. package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
  79. package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.js → OpenScoutAppShell-BtfvMkAp.js} +1 -1
  80. package/dist/client/assets/{OpsAgentsView-DI5wu1si.js → OpsAgentsView-DBYtmLnh.js} +1 -1
  81. package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
  82. package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
  83. package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
  84. package/dist/client/assets/{ProjectAgentProfileBar-k2QHHHsQ.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
  85. package/dist/client/assets/{ProjectAgentProfileHero-Bpxk1ui2.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
  86. package/dist/client/assets/{ProjectsInbox-C_bMHLCc.js → ProjectsInbox-JgU0lrY8.js} +1 -1
  87. package/dist/client/assets/{ProjectsRail-J-aH_pxT.js → ProjectsRail-p99BRBOa.js} +1 -1
  88. package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
  89. package/dist/client/assets/{ProjectsThreadAside-_ourdM-Q.js → ProjectsThreadAside-BHDTJWOz.js} +1 -1
  90. package/dist/client/assets/{Provider-CtXJeLrP.js → Provider-Bu-C8Hxc.js} +1 -1
  91. package/dist/client/assets/{RailRow-CEH2MFBw.js → RailRow-ClMmtaIE.js} +1 -1
  92. package/dist/client/assets/{RawSessionsTable-CDyrom-F.js → RawSessionsTable-BtKdQPiv.js} +1 -1
  93. package/dist/client/assets/{RealtimeVoiceScreen-DBl3DN1H.js → RealtimeVoiceScreen-KPHJgO1l.js} +1 -1
  94. package/dist/client/assets/{RepoDiffEmbedScreen-kY2pHjIs.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
  95. package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
  96. package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-BFperHQg.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
  98. package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-C8dT4bK0.js} +1 -1
  99. package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-BcJsm2Kq.js} +1 -1
  100. package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-DmzEtrx8.js} +1 -1
  101. package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-DU15Plja.js} +1 -1
  102. package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-BrXMtvKE.js} +1 -1
  103. package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-Bt4flmAx.js} +1 -1
  104. package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BCehTlO8.js} +1 -1
  105. package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
  106. package/dist/client/assets/{SessionRefScreen-COVQMbtE.js → SessionRefScreen-C8BiRVPx.js} +1 -1
  107. package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
  108. package/dist/client/assets/{SettingsDrawer-RGVK_bmE.js → SettingsDrawer-BieUmb8g.js} +1 -1
  109. package/dist/client/assets/{SettingsScreen-CCxzy5IU.js → SettingsScreen-3JvX1WFL.js} +1 -1
  110. package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-DPWsVNtn.js} +1 -1
  111. package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-BMRIR6bH.js} +1 -1
  112. package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-56DTXxSV.js} +1 -1
  113. package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BcuYUgsD.js} +1 -1
  114. package/dist/client/assets/{TailView-0uEIj2JH.js → TailView-BDy8c2VB.js} +1 -1
  115. package/dist/client/assets/{Terminal-DouZeNxc.js → Terminal-BlUQY9_Z.js} +1 -1
  116. package/dist/client/assets/{TerminalEmbedScreen-dMNUbzXr.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
  117. package/dist/client/assets/{TerminalHeaderMount-BL07cd0q.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
  118. package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
  119. package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-B4no_aGI.js} +1 -1
  120. package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
  121. package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DIFQufak.js} +1 -1
  122. package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
  123. package/dist/client/assets/{activity-DcrMApUY.js → activity-CqZafWfx.js} +1 -1
  124. package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-CM6F_JRD.js} +1 -1
  125. package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DRTiePFC.js} +1 -1
  126. package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-DXUBnlkN.js} +1 -1
  127. package/dist/client/assets/{agent-essentials-D7KRGYvF.js → agent-essentials-vytdybaX.js} +1 -1
  128. package/dist/client/assets/{agent-master-model-DqjrVI2h.js → agent-master-model-DAZL92oe.js} +1 -1
  129. package/dist/client/assets/{agent-specialization-BujJVUTD.js → agent-specialization-BtxLN4UR.js} +1 -1
  130. package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
  131. package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-Bh84oHJ7.js} +1 -1
  132. package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-DvTsLokL.js} +1 -1
  133. package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-DHfdXJVZ.js} +1 -1
  134. package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-BBsrogWf.js} +1 -1
  135. package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-CY0Vw_67.js} +1 -1
  136. package/dist/client/assets/{bot-rd0awxD3.js → bot-DzkOUFBb.js} +1 -1
  137. package/dist/client/assets/{check-ofKUE8yH.js → check-DbIkldnK.js} +1 -1
  138. package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-C475vltS.js} +1 -1
  139. package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CnZRSd-V.js} +1 -1
  140. package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
  141. package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
  142. package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
  143. package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
  144. package/dist/client/assets/{clock-B88r8OrZ.js → clock-DVvENUU5.js} +1 -1
  145. package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CvKBY3KA.js} +1 -1
  146. package/dist/client/assets/{compass-Dt1AMXz2.js → compass-BcRI_YXo.js} +1 -1
  147. package/dist/client/assets/content--T3p6akp.js +1 -0
  148. package/dist/client/assets/content-4nFMLuzF.js +1 -0
  149. package/dist/client/assets/content-BJ4nHvcu.js +1 -0
  150. package/dist/client/assets/{content-nkx0swDe.js → content-BNyAjpUl.js} +1 -1
  151. package/dist/client/assets/content-BmGp9wNl.js +1 -0
  152. package/dist/client/assets/content-CBWhwaRo.js +1 -0
  153. package/dist/client/assets/{content-C9ijJxyl.js → content-CQlykFbe.js} +1 -1
  154. package/dist/client/assets/content-CevL0DgF.js +1 -0
  155. package/dist/client/assets/content-Ch8pf2bj.js +1 -0
  156. package/dist/client/assets/content-Cpvdcm_l.js +1 -0
  157. package/dist/client/assets/content-DfS3vgAu.js +1 -0
  158. package/dist/client/assets/content-DpQdNePJ.js +1 -0
  159. package/dist/client/assets/content-Dqpibejl.js +1 -0
  160. package/dist/client/assets/content-TV0nd6-r.js +1 -0
  161. package/dist/client/assets/{content-BWPNyXJ0.js → content-odbb5H4U.js} +1 -1
  162. package/dist/client/assets/content-uXHLPHe0.js +1 -0
  163. package/dist/client/assets/{conversation-icons-tp9BX6X2.js → conversation-icons-CBMKBGHd.js} +1 -1
  164. package/dist/client/assets/{conversation-model-Dc02NsGp.js → conversation-model-QsJVfSeG.js} +1 -1
  165. package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
  166. package/dist/client/assets/{copy-CWWAJ75H.js → copy-Cj-owMb-.js} +1 -1
  167. package/dist/client/assets/{cpu-DrqejfkB.js → cpu-DuD3RFX5.js} +1 -1
  168. package/dist/client/assets/{createLucideIcon-DezKXSG2.js → createLucideIcon-DthwWQIg.js} +1 -1
  169. package/dist/client/assets/{discover-C2CZO4Tk.js → discover-B3uQlh5L.js} +2 -2
  170. package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
  171. package/dist/client/assets/{external-link-Dp_a2vRZ.js → external-link-C_nxk0MJ.js} +1 -1
  172. package/dist/client/assets/{eye-BRyD0jno.js → eye-FnaaPfja.js} +1 -1
  173. package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-DDPq4Cur.js} +1 -1
  174. package/dist/client/assets/{file-text-CqJgwxmv.js → file-text--hfhwZH1.js} +1 -1
  175. package/dist/client/assets/{gauge-hU--hKVP.js → gauge-BVEknshP.js} +1 -1
  176. package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-3gw5VgUS.js} +1 -1
  177. package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-DJyvr0k-.js} +1 -1
  178. package/dist/client/assets/{home-moving-signal-BjDtEJUP.js → home-moving-signal-BPqBoNSm.js} +1 -1
  179. package/dist/client/assets/{home-now-card-nF8OotI-.js → home-now-card-UspVW2-2.js} +1 -1
  180. package/dist/client/assets/{home-now-card-nano-C-r_bBg5.js → home-now-card-nano-G8kMB32m.js} +1 -1
  181. package/dist/client/assets/{hooks-D46bABUP.js → hooks-BMsQzo9j.js} +1 -1
  182. package/dist/client/assets/{index-DvLtl7rV.js → index-BI9AljSD.js} +2 -2
  183. package/dist/client/assets/{index-kL1WLbeS.js → index-C-v0Z6ZS.js} +1 -1
  184. package/dist/client/assets/{index-CPrU5q04.js → index-D9DzUORB.js} +1 -1
  185. package/dist/client/assets/index-DfsTyYDx.js +1 -0
  186. package/dist/client/assets/{inspector-panel-Dkc7rLvY.js → inspector-panel-CFSArQ8Y.js} +1 -1
  187. package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-e6yGeorb.js} +1 -1
  188. package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-Q7pcblY5.js} +1 -1
  189. package/dist/client/assets/{layers-CSsg3JVP.js → layers-Dz2dKOnU.js} +1 -1
  190. package/dist/client/assets/{layout-grid-DOChPJdZ.js → layout-grid-Bvs5fdB4.js} +1 -1
  191. package/dist/client/assets/{left-BNRFiRsb.js → left-B4Ak-Ibt.js} +1 -1
  192. package/dist/client/assets/{left-BggzhgXN.js → left-BMb493FZ.js} +1 -1
  193. package/dist/client/assets/{left-YT7mIGuH.js → left-BjFLvVOC.js} +1 -1
  194. package/dist/client/assets/{left-B3wSE6ql.js → left-CsXQ8Q3G.js} +1 -1
  195. package/dist/client/assets/left-FNH7faCI.js +1 -0
  196. package/dist/client/assets/{left-CARCvvxS.js → left-POkqE8gI.js} +1 -1
  197. package/dist/client/assets/{left-CpokZYHt.js → left-UulOTcWh.js} +1 -1
  198. package/dist/client/assets/{left-advisor-CCY0vkcO.js → left-advisor-CJkQS2d6.js} +1 -1
  199. package/dist/client/assets/{left-agents-trhO5sL8.js → left-agents-CFMxyEjT.js} +1 -1
  200. package/dist/client/assets/{left-default-CG33elBs.js → left-default-rnX5HANc.js} +1 -1
  201. package/dist/client/assets/{left-lanes-CitMgeTp.js → left-lanes-BpLXT_qH.js} +1 -1
  202. package/dist/client/assets/{left-mission-Zl2m_5eU.js → left-mission-B0bhseWw.js} +1 -1
  203. package/dist/client/assets/library-D1iXfda2.js +1 -0
  204. package/dist/client/assets/{loader-circle-pM56HNhR.js → loader-circle-B2W9DPG5.js} +1 -1
  205. package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-DKr-gIDC.js} +1 -1
  206. package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-DuLQnEcn.js} +1 -1
  207. package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CRR-KnCG.js} +1 -1
  208. package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CiET-yN8.js} +1 -1
  209. package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-B2DoYKDO.js} +1 -1
  210. package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-Cc_O-WdA.js} +1 -1
  211. package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-O-Hu9Mk2.js} +1 -1
  212. package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-DDAgWKUl.js} +1 -1
  213. package/dist/client/assets/{observe-BpEm1INu.js → observe-Da2mRAsc.js} +1 -1
  214. package/dist/client/assets/{page-status-E5jnk48p.js → page-status-Crtgjbq3.js} +1 -1
  215. package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-BudMKSyr.js} +1 -1
  216. package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-xJz-qAFc.js} +1 -1
  217. package/dist/client/assets/{plus-Co-dqKul.js → plus-BJ1If8vj.js} +1 -1
  218. package/dist/client/assets/{profile-APxDsN2P.js → profile-B3qDSbrH.js} +1 -1
  219. package/dist/client/assets/{projects-inbox-Cg4X2lUQ.js → projects-inbox-CLek3QaG.js} +1 -1
  220. package/dist/client/assets/{proxy-BiW5suC7.js → proxy-1BABCaDb.js} +1 -1
  221. package/dist/client/assets/{radio-BOxBQX-T.js → radio-B5OpHrrK.js} +1 -1
  222. package/dist/client/assets/{refresh-cw-DMxGzDwn.js → refresh-cw-DmNAhaH0.js} +1 -1
  223. package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
  224. package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
  225. package/dist/client/assets/{right-Bmfd3pjP.js → right-BgJ4mQLf.js} +1 -1
  226. package/dist/client/assets/{right-Dz_xD0Vj.js → right-Bk6h7o-Z.js} +1 -1
  227. package/dist/client/assets/{right-CkCCPbCX.js → right-BrICCmEt.js} +1 -1
  228. package/dist/client/assets/{right-CdkcrmeD.js → right-C1QIbqFZ.js} +1 -1
  229. package/dist/client/assets/{right-BwlW6E57.js → right-CfliKiHY.js} +1 -1
  230. package/dist/client/assets/{right-BuCgE0fZ.js → right-CtOLXB9s.js} +1 -1
  231. package/dist/client/assets/{right-CimaAvQN.js → right-D8id_DWQ.js} +1 -1
  232. package/dist/client/assets/{right-C0ybUw0j.js → right-DJ34yMAi.js} +1 -1
  233. package/dist/client/assets/{right-D3eSiy41.js → right-DiFmtw6d.js} +1 -1
  234. package/dist/client/assets/{right-BqI-nr9G.js → right-Lx79pxpG.js} +1 -1
  235. package/dist/client/assets/{rocket-BQm5_CvR.js → rocket-D3-TUJ2m.js} +1 -1
  236. package/dist/client/assets/{router-B9vQkNJL.js → router-DTtux5sP.js} +1 -1
  237. package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-CPM0sBw_.js} +1 -1
  238. package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-BZKsdquE.js} +1 -1
  239. package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
  240. package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-kPhYbh-M.js} +1 -1
  241. package/dist/client/assets/{search-CDko0PKE.js → search-DmFM_9jm.js} +1 -1
  242. package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
  243. package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-Dy2mtMyi.js} +1 -1
  244. package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-qyjNgEaV.js} +1 -1
  245. package/dist/client/assets/{server-Bzj7lPIx.js → server-nWqndnxu.js} +1 -1
  246. package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-BkmktBHI.js} +1 -1
  247. package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-DKSF0mrS.js} +1 -1
  248. package/dist/client/assets/{settings-Dyvpkb1D.js → settings-C6h9y5XX.js} +1 -1
  249. package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-BhHKxsCO.js} +1 -1
  250. package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-Cf8gin88.js} +1 -1
  251. package/dist/client/assets/{sse-CD9MMUxl.js → sse-DDHEHUgz.js} +1 -1
  252. package/dist/client/assets/{tail-events-Ps8KpKah.js → tail-events-BdUrO0kb.js} +1 -1
  253. package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-C3YRPfyz.js} +1 -1
  254. package/dist/client/assets/{terminal-relay-GYMIvKs1.js → terminal-relay-BFhdIstF.js} +1 -1
  255. package/dist/client/assets/{terminal-takeover-_Jyys4me.js → terminal-takeover-B6H4llRR.js} +1 -1
  256. package/dist/client/assets/{text-BP3oyl8-.js → text-Faa3ZStB.js} +1 -1
  257. package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-DO5J8T1H.js} +1 -1
  258. package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-BtgNnRgK.js} +1 -1
  259. package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
  260. package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-8WuxLa5l.js} +1 -1
  261. package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
  262. package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
  263. package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
  264. package/dist/client/assets/{usePierreRuntime-ejq9dCWV.js → usePierreRuntime-BfZHKAkI.js} +1 -1
  265. package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-DkxnZRlR.js} +1 -1
  266. package/dist/client/assets/{x-CAbNespN.js → x-DfRJbqrh.js} +1 -1
  267. package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-CJw8Epxv.js} +1 -1
  268. package/dist/client/assets/{zap-Cq8eWkcF.js → zap-CIo8msJB.js} +1 -1
  269. package/dist/client/index.html +1 -1
  270. package/dist/main.mjs +65 -21
  271. package/dist/pairing-runtime-controller.mjs +8 -0
  272. package/dist/runtime/broker-daemon.mjs +58 -10
  273. package/dist/scout-control-plane-web.mjs +8 -0
  274. package/package.json +2 -2
  275. package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
  276. package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
  277. package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
  278. package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
  279. package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
  280. package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
  281. package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
  282. package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
  283. package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
  284. package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
  285. package/dist/client/assets/content-9K38QchR.js +0 -1
  286. package/dist/client/assets/content-BRgnyXWh.js +0 -1
  287. package/dist/client/assets/content-BdkI07v3.js +0 -1
  288. package/dist/client/assets/content-C4oWa8SB.js +0 -1
  289. package/dist/client/assets/content-CFZ4rghn.js +0 -1
  290. package/dist/client/assets/content-CIqu_Ci_.js +0 -1
  291. package/dist/client/assets/content-CnJF9DGO.js +0 -1
  292. package/dist/client/assets/content-CriW8Y8u.js +0 -1
  293. package/dist/client/assets/content-DDCyPPk_.js +0 -1
  294. package/dist/client/assets/content-DtcZeh5m.js +0 -1
  295. package/dist/client/assets/content-U9tsdtle.js +0 -1
  296. package/dist/client/assets/content-hFLK3CON.js +0 -1
  297. package/dist/client/assets/content-p00KQrtD.js +0 -1
  298. package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
  299. package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
  300. package/dist/client/assets/index-zvhpRHao.js +0 -1
  301. package/dist/client/assets/left-B-SdEJSJ.js +0 -1
  302. package/dist/client/assets/library-DkALuCh5.js +0 -1
  303. package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
  304. package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
  305. package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
@@ -1,2 +1,2 @@
1
- import{r,j as e}from"./index-DvLtl7rV.js";/* empty css */import{n as k}from"./colors-BtO5_zlx.js";import{p as C,a as L}from"./api-Co9aQ2Jw.js";import{u as F,m as $,d as D,g as H}from"./Provider-CtXJeLrP.js";import{b as O}from"./router-B9vQkNJL.js";import{d as B,r as G}from"./operator-attention-RqieiSY8.js";import{u as K}from"./sse-CD9MMUxl.js";import{t as f}from"./time-Dhsh_2EG.js";import{o as P}from"./openAgent-Dbv5wfuL.js";import{R as g}from"./RailRow-CEH2MFBw.js";import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";const U=new Set(["message.posted","flight.updated","collaboration.event.appended","agent.updated"]),V=4,z=4,X=3,N="/api/fleet",Y=3e4;function Vt({prepend:t}){const{agents:o,agentsLoaded:a,navigate:c,route:n}=F(),[i]=r.useState(()=>C(N,Y)),[l,y]=r.useState(i),[A,T]=r.useState(i!==null),[j,b]=r.useState(()=>new Set),p=O(n),S=r.useMemo(()=>$(o,p),[o,p]),m=r.useMemo(()=>D(o,p),[o,p]),u=r.useMemo(()=>H(l,S),[l,S]),d=r.useCallback(async()=>{try{y(await L(N))}catch{}finally{T(!0)}},[]);r.useEffect(()=>{d()},[d]),K(s=>{U.has(s.kind)&&d()});const w=r.useMemo(()=>Z(m).slice(0,V),[m]),R=r.useMemo(()=>(u?.activity??[]).slice(0,z),[u]),_=r.useMemo(()=>(u?.needsAttention??[]).filter(s=>!j.has(s.recordId)).slice(0,X),[u,j]),M=r.useCallback(async s=>{b(h=>new Set(h).add(s.recordId));try{await B({recordKind:s.kind,recordId:s.recordId,itemUpdatedAt:s.updatedAt})}catch{b(h=>{const I=new Set(h);return I.delete(s.recordId),I});return}d()},[d]);return e.jsxs("div",{className:"ctx-panel base-rail",children:[t?e.jsx("div",{className:"base-rail-prepend",children:t}):null,e.jsx(q,{agents:w,totalCount:m.length,loading:!a,onSelect:s=>P(c,s,{returnTo:n}),onSeeAll:()=>c({view:"agents-v2"})}),e.jsx(Q,{items:R,loading:!A,onSelect:s=>c(tt(s)),onSeeAll:()=>c({view:"activity"})}),e.jsx(W,{items:_,loading:!A,onSelect:s=>c(G(s)),onDismiss:s=>{M(s)}})]})}function q({agents:t,totalCount:o,loading:a,onSelect:c,onSeeAll:n}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Recent agents",onSeeAll:o>0?n:void 0}),a?e.jsx(v,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No agents yet"}):t.map(i=>e.jsx(g,{name:i.name||i.id,meta:i.updatedAt?f(i.updatedAt):void 0,tone:k(i.state),title:J(i),onClick:()=>c(i)},i.id))]})}function J(t){const o=[];return t.project&&o.push(`project: ${t.project}`),t.branch&&o.push(`branch: ${t.branch}`),t.harness&&o.push(`harness: ${t.harness}`),o.join(`
1
+ import{r,j as e}from"./index-BI9AljSD.js";/* empty css */import{n as k}from"./colors-BtO5_zlx.js";import{p as C,a as L}from"./api-Co9aQ2Jw.js";import{u as F,m as $,d as D,g as H}from"./Provider-Bu-C8Hxc.js";import{b as O}from"./router-DTtux5sP.js";import{d as B,r as G}from"./operator-attention-RqieiSY8.js";import{u as K}from"./sse-DDHEHUgz.js";import{t as f}from"./time-Dhsh_2EG.js";import{o as P}from"./openAgent-Dbv5wfuL.js";import{R as g}from"./RailRow-ClMmtaIE.js";import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";const U=new Set(["message.posted","flight.updated","collaboration.event.appended","agent.updated"]),V=4,z=4,X=3,N="/api/fleet",Y=3e4;function Vt({prepend:t}){const{agents:o,agentsLoaded:a,navigate:c,route:n}=F(),[i]=r.useState(()=>C(N,Y)),[l,y]=r.useState(i),[A,T]=r.useState(i!==null),[j,b]=r.useState(()=>new Set),p=O(n),S=r.useMemo(()=>$(o,p),[o,p]),m=r.useMemo(()=>D(o,p),[o,p]),u=r.useMemo(()=>H(l,S),[l,S]),d=r.useCallback(async()=>{try{y(await L(N))}catch{}finally{T(!0)}},[]);r.useEffect(()=>{d()},[d]),K(s=>{U.has(s.kind)&&d()});const w=r.useMemo(()=>Z(m).slice(0,V),[m]),R=r.useMemo(()=>(u?.activity??[]).slice(0,z),[u]),_=r.useMemo(()=>(u?.needsAttention??[]).filter(s=>!j.has(s.recordId)).slice(0,X),[u,j]),M=r.useCallback(async s=>{b(h=>new Set(h).add(s.recordId));try{await B({recordKind:s.kind,recordId:s.recordId,itemUpdatedAt:s.updatedAt})}catch{b(h=>{const I=new Set(h);return I.delete(s.recordId),I});return}d()},[d]);return e.jsxs("div",{className:"ctx-panel base-rail",children:[t?e.jsx("div",{className:"base-rail-prepend",children:t}):null,e.jsx(q,{agents:w,totalCount:m.length,loading:!a,onSelect:s=>P(c,s,{returnTo:n}),onSeeAll:()=>c({view:"agents-v2"})}),e.jsx(Q,{items:R,loading:!A,onSelect:s=>c(tt(s)),onSeeAll:()=>c({view:"activity"})}),e.jsx(W,{items:_,loading:!A,onSelect:s=>c(G(s)),onDismiss:s=>{M(s)}})]})}function q({agents:t,totalCount:o,loading:a,onSelect:c,onSeeAll:n}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Recent agents",onSeeAll:o>0?n:void 0}),a?e.jsx(v,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No agents yet"}):t.map(i=>e.jsx(g,{name:i.name||i.id,meta:i.updatedAt?f(i.updatedAt):void 0,tone:k(i.state),title:J(i),onClick:()=>c(i)},i.id))]})}function J(t){const o=[];return t.project&&o.push(`project: ${t.project}`),t.branch&&o.push(`branch: ${t.branch}`),t.harness&&o.push(`harness: ${t.harness}`),o.join(`
2
2
  `)}function Q({items:t,loading:o,onSelect:a,onSeeAll:c}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Recent Scout coordination",meta:(t.length>0,void 0),onSeeAll:t.length>0?c:void 0}),o?e.jsx(v,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No recent Scout messages or dispatches"}):t.map(n=>{const i=n.actorName??n.agentName??n.agentId??"system",l=n.title??n.summary??E(n.kind);return e.jsx(g,{name:l,meta:n.ts?f(n.ts):void 0,tone:"neutral",title:`${i} · ${E(n.kind)}`,onClick:()=>a(n)},n.id)})]})}function W({items:t,loading:o,onSelect:a,onDismiss:c}){return!o&&t.length===0?null:e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Needs attention",meta:t.length>0?`${t.length}`:void 0}),o?e.jsx(v,{rows:2}):t.map(n=>{const i=n.agentName??n.agentId??"operator";return e.jsx(g,{name:n.title,meta:f(n.updatedAt),tone:"in_turn",unread:!0,title:`${i} · ${n.kind}`,onClick:()=>a(n),actions:e.jsx("button",{type:"button",className:"rr-row-action",title:"Dismiss — stop asking until this changes","aria-label":"Dismiss",onClick:l=>{l.stopPropagation(),c(n)},children:"Dismiss"})},n.recordId)})]})}function v({rows:t=3}){return e.jsx("div",{className:"base-rail-loading",role:"status","aria-label":"Loading",children:Array.from({length:t},(o,a)=>e.jsx("span",{"aria-hidden":"true"},a))})}function x({title:t,meta:o,onSeeAll:a}){return e.jsxs("div",{className:"ctx-panel-section-label base-rail-section-label",children:[e.jsx("span",{children:t}),e.jsxs("span",{className:"base-rail-section-trailing",children:[o?e.jsx("span",{className:"ctx-panel-count",children:o}):null,a?e.jsx("button",{type:"button",className:"base-rail-see-all",onClick:a,children:"all"}):null]})]})}function Z(t){return[...t].sort((o,a)=>(a.updatedAt??0)-(o.updatedAt??0))}function E(t){switch(t){case"message":return"Message";case"invocation":return"Invocation";case"flight":return"Flight update";case"collaboration":return"Collaboration";default:return t.replace(/_/g," ")}}function tt(t){return t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?{view:"agents-v2",agentId:t.agentId}:{view:"activity"}}export{Vt as HomeLeft};
@@ -1 +1 @@
1
- import{r as N,j as e}from"./index-DvLtl7rV.js";import{a as I}from"./api-Co9aQ2Jw.js";import{b as L,c as j,s as R}from"./router-B9vQkNJL.js";import{u as $,r as y,s as b,i as C}from"./mesh-ops-BZ1h5RQs.js";import{u as E,s as T}from"./mesh-view-store-ChUOASK8.js";import{u as A}from"./Provider-CtXJeLrP.js";import{R as h}from"./RailRow-CEH2MFBw.js";import{u as U}from"./use-mesh-ops-items-Dh54ymEp.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";function S(s){return s.hostName?.split(".")[0]??s.name??s.id.slice(0,12)}function It(){const{route:s,navigate:u}=A(),l=L(s),{items:i,unattributedOnly:c,lab:M,refreshToken:g}=$(),{meshSnapshot:r}=E();U(l);const[w]=N.useState(()=>y());N.useEffect(()=>{let t=!1;return I("/api/mesh").then(o=>{t||T(o)}).catch(()=>{}),()=>{t=!0}},[g]);const m=t=>{b(!1),u(t?R(s,t):j(s))},O=()=>{u(j(s)),b(!0)},p=r?.localNode??null,d=r?Object.values(r.nodes).filter(t=>t.id!==p?.id):[],a=t=>M.lastLook?t.filter(o=>C(o,w)).length:0,x=i.filter(t=>t.hostNodeId===null),f=t=>{const o=i.filter(k=>k.hostNodeId===t.id),n=a(o),v=l===t.id;return e.jsx(h,{name:S(t),meta:o.length>0?`${n>0?`${n}·`:""}${o.length}`:"—",tone:n>0?"needs_attention":"neutral",active:v,unread:n>0,onClick:()=>m(v?null:t.id),title:`Scope the list to ${S(t)}`},t.id)};return e.jsxs("div",{className:"ctx-panel mesh-ops-rail",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),e.jsx(h,{name:"everywhere",meta:`${a(i)>0?`${a(i)}·`:""}${i.length}`,tone:a(i)>0?"needs_attention":"neutral",active:l===null&&!c,onClick:()=>m(null),title:"Show items across all hosts"})]}),p&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"This host"}),f(p)]}),d.length>0&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Peers"}),d.map(t=>f(t))]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"No venue"}),e.jsx(h,{name:"unattributed",meta:x.length>0?String(x.length):"—",tone:"neutral",active:c,onClick:()=>c?m(null):O(),title:"Items with no venue host"})]}),!r&&e.jsx("div",{className:"ctx-panel-empty",children:"Loading mesh…"})]})}export{It as MeshOpsLeft};
1
+ import{r as N,j as e}from"./index-BI9AljSD.js";import{a as I}from"./api-Co9aQ2Jw.js";import{b as L,c as j,s as R}from"./router-DTtux5sP.js";import{u as $,r as y,s as b,i as C}from"./mesh-ops-CRR-KnCG.js";import{u as E,s as T}from"./mesh-view-store-CiET-yN8.js";import{u as A}from"./Provider-Bu-C8Hxc.js";import{R as h}from"./RailRow-ClMmtaIE.js";import{u as U}from"./use-mesh-ops-items-N1HHhChY.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";function S(s){return s.hostName?.split(".")[0]??s.name??s.id.slice(0,12)}function It(){const{route:s,navigate:u}=A(),l=L(s),{items:i,unattributedOnly:c,lab:M,refreshToken:g}=$(),{meshSnapshot:r}=E();U(l);const[w]=N.useState(()=>y());N.useEffect(()=>{let t=!1;return I("/api/mesh").then(o=>{t||T(o)}).catch(()=>{}),()=>{t=!0}},[g]);const m=t=>{b(!1),u(t?R(s,t):j(s))},O=()=>{u(j(s)),b(!0)},p=r?.localNode??null,d=r?Object.values(r.nodes).filter(t=>t.id!==p?.id):[],a=t=>M.lastLook?t.filter(o=>C(o,w)).length:0,x=i.filter(t=>t.hostNodeId===null),f=t=>{const o=i.filter(k=>k.hostNodeId===t.id),n=a(o),v=l===t.id;return e.jsx(h,{name:S(t),meta:o.length>0?`${n>0?`${n}·`:""}${o.length}`:"—",tone:n>0?"needs_attention":"neutral",active:v,unread:n>0,onClick:()=>m(v?null:t.id),title:`Scope the list to ${S(t)}`},t.id)};return e.jsxs("div",{className:"ctx-panel mesh-ops-rail",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),e.jsx(h,{name:"everywhere",meta:`${a(i)>0?`${a(i)}·`:""}${i.length}`,tone:a(i)>0?"needs_attention":"neutral",active:l===null&&!c,onClick:()=>m(null),title:"Show items across all hosts"})]}),p&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"This host"}),f(p)]}),d.length>0&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Peers"}),d.map(t=>f(t))]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"No venue"}),e.jsx(h,{name:"unattributed",meta:x.length>0?String(x.length):"—",tone:"neutral",active:c,onClick:()=>c?m(null):O(),title:"Items with no venue host"})]}),!r&&e.jsx("div",{className:"ctx-panel-empty",children:"Loading mesh…"})]})}export{It as MeshOpsLeft};
@@ -1 +1 @@
1
- import{r,j as e}from"./index-DvLtl7rV.js";/* empty css */import{d as w,c as S,e as y,f as M,g as A,i as N}from"./NewChatComposer-_Stj0fZy.js";import{u as k,d as b}from"./Provider-CtXJeLrP.js";import{A as I}from"./AgentAvatar-6-KBVKUu.js";import{a as g}from"./api-Co9aQ2Jw.js";import{b as C}from"./router-B9vQkNJL.js";import{a as B}from"./sse-CD9MMUxl.js";import{o as P,i as j}from"./surface-activity-B1rgWB1i.js";import"./text-BP3oyl8-.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./createLucideIcon-DezKXSG2.js";import"./conversation-model-Dc02NsGp.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./keyboard-nav-BLYDhL3Z.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./file-text-CqJgwxmv.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";function W(){const{agents:n,route:d}=k(),m=C(d),l=r.useMemo(()=>b(n,m),[n,m]),[u,h]=r.useState([]),[v,s]=r.useState(null),[a,p]=r.useState(null),c=r.useCallback(async()=>{const[t,i,o]=await Promise.allSettled([g("/api/conversations"),g("/api/fleet"),g("/api/tail/discover")]);t.status==="fulfilled"&&h(t.value),i.status==="fulfilled"&&s(i.value),o.status==="fulfilled"&&p(o.value)},[]);r.useEffect(()=>{c()},[c]),r.useEffect(()=>{const t=()=>{j()&&c()},i=window.setInterval(t,1e4),o=P(t);return()=>{window.clearInterval(i),o()}},[c]),B(()=>!0,()=>{j()&&c()});const x=r.useMemo(()=>{const t=new Map;for(const i of v?.activeAsks??[]){const o=t.get(i.agentId)??[];o.push(i),t.set(i.agentId,o)}return t},[v?.activeAsks]);return{projects:r.useMemo(()=>{const{sessionByAgentId:t}=w(u),i=l.map(f=>S(f,t.get(f.id)??null,x.get(f.id)??[])),o=y(a,Date.now());return M(i,u,o)},[l,u,x,a])}}function ye(){const{route:n,navigate:d,openContextCapture:m}=k(),{projects:l}=W(),u=n.view==="agents-v2"?n.projectSlug:void 0,h=n.view==="agents-v2"?n.agentId:void 0,v=u??l[0]?.slice.slug;return e.jsxs("div",{className:"ctx-panel s-agents-rail",children:[e.jsx("div",{className:"s-agents-recent s-rail-projects",children:l.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No projects yet"}):l.map(s=>{const a=A(s),p=N(s),c=s.slice.slug===v&&!h;return e.jsxs("button",{type:"button",className:"s-rail-proj","data-selected":c||void 0,"data-live":a>0||void 0,"data-needs":p||void 0,title:s.slice.root??void 0,onClick:()=>d({view:"agents-v2",projectSlug:s.slice.slug}),children:[e.jsx(I,{name:s.slice.title,size:22,tile:!0,presence:!1}),e.jsxs("span",{className:"s-rail-proj-name","data-idle":a===0||void 0,children:[e.jsx("span",{"aria-hidden":!0,style:{opacity:.4},children:"/"}),s.slice.title]}),a>0?e.jsx("span",{className:"s-rail-proj-count","data-needs":p||void 0,title:p?"needs you":void 0,children:a}):null]},s.slice.key)})}),e.jsxs("div",{className:"s-agents-foot s-rail-foot-icons",children:[e.jsx("button",{type:"button",className:"s-rail-icon",title:"Search","aria-label":"Search",onClick:()=>d({view:"search"}),children:e.jsx(E,{})}),e.jsx("button",{type:"button",className:"s-rail-icon",title:"New chat (⌘⌥N)","aria-label":"New chat",onClick:()=>m(),children:e.jsx(L,{})}),e.jsx("button",{type:"button",className:"s-rail-icon s-rail-icon--end",title:"Settings","aria-label":"Settings",onClick:()=>d({view:"settings"}),children:e.jsx(D,{})})]})]})}function E(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.25",stroke:"currentColor",strokeWidth:"1.4"}),e.jsx("path",{d:"M10.5 10.5 14 14",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function L(){return e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function D(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"8",cy:"8",r:"2.25",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"M8 1.5v1.6M8 12.9v1.6M14.5 8h-1.6M3.1 8H1.5M12.6 3.4l-1.1 1.1M4.5 11.5l-1.1 1.1M12.6 12.6l-1.1-1.1M4.5 4.5 3.4 3.4",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}export{ye as AgentsLeft};
1
+ import{r,j as e}from"./index-BI9AljSD.js";/* empty css */import{d as w,c as S,e as y,f as M,g as A,i as N}from"./NewChatComposer-C_1op4dH.js";import{u as k,d as b}from"./Provider-Bu-C8Hxc.js";import{A as I}from"./AgentAvatar-B7c0egdP.js";import{a as g}from"./api-Co9aQ2Jw.js";import{b as C}from"./router-DTtux5sP.js";import{a as B}from"./sse-DDHEHUgz.js";import{o as P,i as j}from"./surface-activity-B1rgWB1i.js";import"./text-Faa3ZStB.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./createLucideIcon-DthwWQIg.js";import"./conversation-model-QsJVfSeG.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./keyboard-nav-e6yGeorb.js";import"./x-DfRJbqrh.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./file-text--hfhwZH1.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";function W(){const{agents:n,route:d}=k(),m=C(d),l=r.useMemo(()=>b(n,m),[n,m]),[u,h]=r.useState([]),[v,s]=r.useState(null),[a,p]=r.useState(null),c=r.useCallback(async()=>{const[t,i,o]=await Promise.allSettled([g("/api/conversations"),g("/api/fleet"),g("/api/tail/discover")]);t.status==="fulfilled"&&h(t.value),i.status==="fulfilled"&&s(i.value),o.status==="fulfilled"&&p(o.value)},[]);r.useEffect(()=>{c()},[c]),r.useEffect(()=>{const t=()=>{j()&&c()},i=window.setInterval(t,1e4),o=P(t);return()=>{window.clearInterval(i),o()}},[c]),B(()=>!0,()=>{j()&&c()});const x=r.useMemo(()=>{const t=new Map;for(const i of v?.activeAsks??[]){const o=t.get(i.agentId)??[];o.push(i),t.set(i.agentId,o)}return t},[v?.activeAsks]);return{projects:r.useMemo(()=>{const{sessionByAgentId:t}=w(u),i=l.map(f=>S(f,t.get(f.id)??null,x.get(f.id)??[])),o=y(a,Date.now());return M(i,u,o)},[l,u,x,a])}}function ye(){const{route:n,navigate:d,openContextCapture:m}=k(),{projects:l}=W(),u=n.view==="agents-v2"?n.projectSlug:void 0,h=n.view==="agents-v2"?n.agentId:void 0,v=u??l[0]?.slice.slug;return e.jsxs("div",{className:"ctx-panel s-agents-rail",children:[e.jsx("div",{className:"s-agents-recent s-rail-projects",children:l.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No projects yet"}):l.map(s=>{const a=A(s),p=N(s),c=s.slice.slug===v&&!h;return e.jsxs("button",{type:"button",className:"s-rail-proj","data-selected":c||void 0,"data-live":a>0||void 0,"data-needs":p||void 0,title:s.slice.root??void 0,onClick:()=>d({view:"agents-v2",projectSlug:s.slice.slug}),children:[e.jsx(I,{name:s.slice.title,size:22,tile:!0,presence:!1}),e.jsxs("span",{className:"s-rail-proj-name","data-idle":a===0||void 0,children:[e.jsx("span",{"aria-hidden":!0,style:{opacity:.4},children:"/"}),s.slice.title]}),a>0?e.jsx("span",{className:"s-rail-proj-count","data-needs":p||void 0,title:p?"needs you":void 0,children:a}):null]},s.slice.key)})}),e.jsxs("div",{className:"s-agents-foot s-rail-foot-icons",children:[e.jsx("button",{type:"button",className:"s-rail-icon",title:"Search","aria-label":"Search",onClick:()=>d({view:"search"}),children:e.jsx(E,{})}),e.jsx("button",{type:"button",className:"s-rail-icon",title:"New chat (⌘⌥N)","aria-label":"New chat",onClick:()=>m(),children:e.jsx(L,{})}),e.jsx("button",{type:"button",className:"s-rail-icon s-rail-icon--end",title:"Settings","aria-label":"Settings",onClick:()=>d({view:"settings"}),children:e.jsx(D,{})})]})]})}function E(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.25",stroke:"currentColor",strokeWidth:"1.4"}),e.jsx("path",{d:"M10.5 10.5 14 14",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function L(){return e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function D(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"8",cy:"8",r:"2.25",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"M8 1.5v1.6M8 12.9v1.6M14.5 8h-1.6M3.1 8H1.5M12.6 3.4l-1.1 1.1M4.5 11.5l-1.1 1.1M12.6 12.6l-1.1-1.1M4.5 4.5 3.4 3.4",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}export{ye as AgentsLeft};
@@ -1 +1 @@
1
- import{r as m,j as t}from"./index-DvLtl7rV.js";import{u as re,L as z}from"./chunk-YOZR3KYS-DwHPHa6f.js";import{a as le,f as oe,b as ce,c as me,d as de,s as ue}from"./terminal-sessions-BQ6t92tJ.js";import{a as ve,b as pe,r as G,m as he}from"./keyboard-nav-BLYDhL3Z.js";import{u as be}from"./Provider-CtXJeLrP.js";import{c as fe}from"./colors-BtO5_zlx.js";import{r as P,c as xe}from"./terminal-relay-GYMIvKs1.js";import{t as ye,a as q,s as je,b as y,P as ge}from"./session-table-BQfR7u6r.js";/* empty css */import{R as ke}from"./refresh-cw-DMxGzDwn.js";import{A as Ne}from"./activity-DcrMApUY.js";import{C as we}from"./clock-B88r8OrZ.js";import{F as Se}from"./DocumentFocusViewer-Do3wQ_3Z.js";import{L as Ae}from"./layers-CSsg3JVP.js";import{C as Ie}from"./chevron-right-D-HdlPg8.js";import{E as U}from"./eye-BRyD0jno.js";import{T as Ee}from"./terminal-9GRS_Qdc.js";import"./createLucideIcon-DezKXSG2.js";import"./arrow-down-CKtSUjmW.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";const Te=[{id:"fleet",label:"Fleet",title:"Group by fleet: herdr, tmux, background"},{id:"places",label:"Places",title:"Group by project"},{id:"time",label:"Time",title:"Group by last activity"},{id:"attention",label:"Attention",title:"Group by attention state: attached, live, detached, exited"}],Ce=[{id:"herdr",label:"Herdr"},{id:"tmux-named",label:"Tmux"},{id:"tmux-auto",label:"Tmux · auto"},{id:"external",label:"Background"}],Re=900*1e3,Me=1440*60*1e3,Le=10080*60*1e3,V=[{key:"now",label:"Now",maxAgeMs:Re},{key:"today",label:"Today",maxAgeMs:Me},{key:"week",label:"This week",maxAgeMs:Le},{key:"older",label:"Older",maxAgeMs:null},{key:"unknown",label:"Unknown",maxAgeMs:null}],$e=[{key:"attached",label:"Attached",rank:3},{key:"live",label:"Live",rank:2},{key:"detached",label:"Detached",rank:1},{key:"exited",label:"Exited",rank:0}];function _e(a){return Ce.map(n=>({key:n.id,label:n.label,items:a.filter(l=>le(l)===n.id)})).filter(n=>n.items.length>0)}function Oe(a){const n=new Map;for(const i of a){const o=n.get(i.project);o?o.push(i):n.set(i.project,[i])}const l=new Set(["backend-only","unscoped"]),r=[...n.entries()].map(([i,o])=>({key:`project:${i}`,label:i,items:o,latestActivity:Math.max(...o.map(d=>q(d)??0)),isCatchAll:l.has(i)}));return r.sort((i,o)=>i.isCatchAll!==o.isCatchAll?i.isCatchAll?1:-1:i.latestActivity!==o.latestActivity?o.latestActivity-i.latestActivity:i.label.localeCompare(o.label,void 0,{numeric:!0,sensitivity:"base"})),r.map(({key:i,label:o,items:d})=>({key:i,label:o,items:d}))}function Fe(a,n){const l=r=>{const i=q(r);if(i===null)return"unknown";const o=Math.max(0,n-i);for(const d of V)if(d.maxAgeMs!==null&&o<d.maxAgeMs)return d.key;return"older"};return V.map(r=>({key:r.key,label:r.label,items:a.filter(i=>l(i)===r.key)})).filter(r=>r.items.length>0)}function Ke(a){return $e.map(n=>({key:n.key,label:n.label,items:a.filter(l=>ye(l)===n.rank)})).filter(n=>n.items.length>0)}function Be(a,n,l=Date.now()){switch(n){case"fleet":return _e(a);case"places":return Oe(a);case"time":return Fe(a,l);case"attention":return Ke(a)}}const De=8e3,We=[{id:"recent",label:"Recent"},{id:"name",label:"A–Z"}],ze={fleet:Ae,places:Se,time:we,attention:Ne};function Bt(){const{route:a,navigate:n,agents:l}=be(),[r,i]=m.useState({state:"loading",sessions:[]}),[o,d]=m.useState(""),[f,Q]=m.useState("recent"),[A,Y]=re("terminal-nav-mode","fleet"),[Z,J]=m.useState(!1),[X,M]=m.useState(null),[L,$]=m.useState(null),_=m.useRef(null),O=m.useRef(null),ee=ve(),te=he(()=>O.current);pe(m.useCallback(()=>_.current,[]));const x=m.useCallback((e={})=>{e.silent||i(s=>({state:"loading",sessions:s.sessions})),oe({includeDiscovered:!0}).then(s=>{i({state:"ready",sessions:s})}).catch(s=>{e.silent||i(c=>({state:"failed",sessions:c.sessions,error:s instanceof Error?s.message:String(s)}))})},[]);m.useEffect(()=>{x()},[x]),m.useEffect(()=>{const e=()=>{document.visibilityState==="visible"&&x({silent:!0})},s=window.setInterval(e,De);return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.clearInterval(s),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[x]);const k=m.useMemo(()=>ce(r.sessions),[r.sessions]),p=m.useMemo(()=>je(me(k),f==="recent"?{column:"activity",direction:"desc"}:{column:"name",direction:"asc"}),[f,k]),j=m.useMemo(()=>Ge(l,f).filter(e=>{const s=P(e);return s?!k.some(c=>c.surface.backend===s.backend&&c.surface.sessionName===s.sessionName&&(s.paneId==null||c.surface.paneId===s.paneId)):!0}),[l,k,f]),u=o.trim().toLowerCase(),g=u?p.filter(e=>e.searchable.includes(u)):p,N=g.filter(e=>y(e)==="current"),ae=Be(N,A),w=g.filter(e=>y(e)==="inactive"),h=g.filter(e=>y(e)==="review"),F=u?w.length+h.length:p.filter(e=>y(e)!=="current").length,K=u?h.length:p.filter(e=>y(e)==="review").length,S=Z||!!u,v=u?j.filter(e=>Ue(e).includes(u)):j,ne=a.view==="terminal"?a.terminalSurfaceKey??null:null,B=a.view==="terminal"?a.terminalSessionId??null:null,I=e=>de(e.key,ne)&&(!B||e.session.id===B),E=a.view==="terminal"&&a.agentId?`agent:${a.agentId}`:null,D=!!(N.some(I)||S&&[...w,...h].some(I)||E!=null&&v.some(e=>`agent:${e.id}`===E)),W=N[0]?.id??(S?w[0]?.id??h[0]?.id:void 0)??(v[0]?`agent:${v[0].id}`:void 0),se=r.state==="loading"?"Syncing":u?`${g.length+v.length}/${p.length+j.length}`:`${p.length+j.length} targets`,T=(e,s)=>({view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:ue(e.surface),...s?{mode:s}:{}}),C=(e,s="takeover")=>({view:"terminal",agentId:e.id,mode:s}),ie=async e=>{if(e.surface.backend==="tmux"&&window.confirm(`Release inactive terminal ${e.surface.sessionName}? The tmux surface will stop, but any associated Scout agent remains available and can be started again.`)){M(e.id),$(null);try{await xe({backend:"tmux",sessionName:e.surface.sessionName,paneId:e.surface.paneId??null,socketDir:e.surface.socketDir??null},"release"),x({silent:!0})}catch(s){$(s instanceof Error?s.message:String(s))}finally{M(null)}}},R=e=>{const s=I(e),c=y(e),b=X===e.id;return t.jsxs("div",{className:`terminal-nav-row${s?" terminal-nav-row--active":""}${c==="review"?" terminal-nav-row--review":""}`,title:e.surface.sessionName,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(s,D,e.id===W),onClick:()=>n(T(e)),children:[t.jsx(Ee,{className:"terminal-nav-row-icon",size:14,strokeWidth:1.7}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.title})}),t.jsx("span",{className:"terminal-nav-row-detail",children:e.detail||e.session.sourceSessionId})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:e.surface.backend}),t.jsx("span",{className:`terminal-nav-badge${c==="review"?" terminal-nav-badge--review":""}`,children:c==="current"?e.condition:c})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"takeover")),title:"Enter this terminal","aria-label":"Enter this terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"observe")),title:"Observe this terminal read-only","aria-label":"Observe this terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]}),c==="review"&&e.surface.backend==="tmux"&&t.jsxs("button",{type:"button",className:"terminal-nav-action terminal-nav-action--release",onClick:()=>{ie(e)},disabled:b,title:"Release this inactive tmux surface; keep the agent","aria-label":"Release this inactive tmux surface; keep the agent",children:[t.jsx(ge,{size:12,strokeWidth:1.8}),t.jsx("span",{children:b?"Releasing":"Release"})]})]})]},e.id)};return t.jsxs("div",{className:"ctx-panel terminal-nav",children:[t.jsxs("div",{className:"terminal-nav-head",children:[t.jsxs("div",{children:[t.jsx("div",{className:"terminal-nav-title",children:"Terminals"}),t.jsx("div",{className:"terminal-nav-summary",children:se})]}),t.jsx("button",{type:"button",className:"terminal-nav-refresh",onClick:()=>x(),disabled:r.state==="loading",title:"Refresh terminals","aria-label":"Refresh terminals",children:t.jsx(ke,{size:14,strokeWidth:1.8})})]}),t.jsx("div",{className:"terminal-nav-modes",role:"group","aria-label":"Group terminals",children:Te.map(e=>{const s=ze[e.id];return t.jsx("button",{type:"button",title:e.title,"aria-label":e.title,"aria-pressed":A===e.id,className:`terminal-nav-mode${A===e.id?" terminal-nav-mode--active":""}`,onClick:()=>Y(e.id),children:t.jsx(s,{size:13,strokeWidth:1.8})},e.id)})}),t.jsxs("div",{className:"ctx-panel-toolbar terminal-nav-toolbar",children:[t.jsx("input",{ref:_,type:"text",className:"ctx-panel-search-input",placeholder:"Search… (/)",value:o,onChange:e=>d(e.target.value),onKeyDown:te}),t.jsx("div",{className:"ctx-panel-sort",role:"group","aria-label":"Sort terminals",children:We.map(e=>t.jsx("button",{type:"button",title:e.id==="recent"?"Sort by most recent":"Sort alphabetically","aria-pressed":f===e.id,className:`ctx-panel-sort-option${f===e.id?" ctx-panel-sort-option--active":""}`,onClick:()=>Q(e.id),children:e.label},e.id))})]}),r.state==="failed"&&t.jsx("div",{className:"terminal-nav-error",children:r.error}),L&&t.jsx("div",{className:"terminal-nav-error",children:L}),t.jsx("div",{ref:O,className:"terminal-nav-list",onKeyDown:ee,children:g.length===0&&v.length===0&&r.state!=="loading"?t.jsx("div",{className:"ctx-panel-empty",children:p.length+j.length===0?"No terminal targets":"No matches"}):t.jsxs(t.Fragment,{children:[ae.map(e=>e.items.length===0?null:t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:e.label}),t.jsx("span",{children:e.items.length})]}),e.items.map(R)]},e.key)),N.length===0&&r.state!=="loading"&&t.jsx("div",{className:"terminal-nav-empty",children:"No sessions"}),F>0&&t.jsxs("div",{className:"terminal-nav-section terminal-nav-section--inactive",children:[t.jsxs("button",{type:"button",className:"terminal-nav-inactive-toggle","aria-expanded":S,onClick:()=>J(e=>!e),children:[t.jsx(Ie,{size:13,strokeWidth:1.8}),t.jsx("span",{children:"Inactive"}),t.jsx("span",{children:F}),K>0&&t.jsxs("span",{className:"terminal-nav-review-count",children:[K," review"]})]}),S&&t.jsxs(t.Fragment,{children:[w.map(R),h.length>0&&t.jsxs("div",{className:"terminal-nav-section-title terminal-nav-section-title--review",children:[t.jsx("span",{children:"Review after 30 days"}),t.jsx("span",{children:h.length})]}),h.map(R)]})]}),t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:"Available agents"}),t.jsx("span",{children:v.length})]}),v.map(e=>{const s=`agent:${e.id}`,c=s===E,b=P(e);return t.jsxs("div",{className:`terminal-nav-row terminal-nav-row--agent${c?" terminal-nav-row--active":""}`,title:e.name,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(c,D,s===W),onClick:()=>n(C(e)),children:[t.jsx("span",{className:`terminal-nav-agent-dot${b?" terminal-nav-agent-dot--bound":""}`,"aria-hidden":!0}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.name})}),t.jsx("span",{className:"terminal-nav-row-detail",children:Pe(e)})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:b?.backend??e.harness??"agent"}),t.jsx("span",{className:"terminal-nav-badge",children:b?"bound":fe(e.state)})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"takeover")),title:"Enter this agent terminal","aria-label":"Enter this agent terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),b&&t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"observe")),title:"Observe this agent terminal read-only","aria-label":"Observe this agent terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]})]})]},e.id)}),v.length===0&&t.jsx("div",{className:"terminal-nav-empty",children:"No agents"})]})]})})]})}function Ge(a,n){return[...a].filter(l=>!l.retiredFromFleet&&!l.staleLocalRegistration).sort((l,r)=>{const i=l.name.localeCompare(r.name,void 0,{numeric:!0,sensitivity:"base"});return n==="name"?i||l.id.localeCompare(r.id):(r.updatedAt??0)-(l.updatedAt??0)||i||l.id.localeCompare(r.id)})}function Pe(a){const n=a.project??H(a.cwd)??H(a.projectRoot)??a.definitionId;return[a.handle?`@${a.handle}`:null,a.harness,n,a.branch].filter(Boolean).join(" · ")}function Ue(a){return[a.name,a.handle,a.harness,a.state,a.project,a.branch,a.cwd,a.projectRoot,a.definitionId].filter(Boolean).join(" ").toLowerCase()}function H(a){const n=a?.trim().replace(/\/+$/u,"");return n?n.split("/").pop()||n:null}export{Bt as TerminalLeft};
1
+ import{r as m,j as t}from"./index-BI9AljSD.js";import{u as re,L as z}from"./chunk-YOZR3KYS-DN5EJulq.js";import{a as le,f as oe,b as ce,c as me,d as de,s as ue}from"./terminal-sessions-BQ6t92tJ.js";import{a as ve,b as pe,r as G,m as he}from"./keyboard-nav-e6yGeorb.js";import{u as be}from"./Provider-Bu-C8Hxc.js";import{c as fe}from"./colors-BtO5_zlx.js";import{r as P,c as xe}from"./terminal-relay-BFhdIstF.js";import{t as ye,a as q,s as je,b as y,P as ge}from"./session-table-DKSF0mrS.js";/* empty css */import{R as ke}from"./refresh-cw-DmNAhaH0.js";import{A as Ne}from"./activity-CqZafWfx.js";import{C as we}from"./clock-DVvENUU5.js";import{F as Se}from"./DocumentFocusViewer-DFFE85Tq.js";import{L as Ae}from"./layers-Dz2dKOnU.js";import{C as Ie}from"./chevron-right-CnZRSd-V.js";import{E as U}from"./eye-FnaaPfja.js";import{T as Ee}from"./terminal-C3YRPfyz.js";import"./createLucideIcon-DthwWQIg.js";import"./arrow-down-DvTsLokL.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./x-DfRJbqrh.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";const Te=[{id:"fleet",label:"Fleet",title:"Group by fleet: herdr, tmux, background"},{id:"places",label:"Places",title:"Group by project"},{id:"time",label:"Time",title:"Group by last activity"},{id:"attention",label:"Attention",title:"Group by attention state: attached, live, detached, exited"}],Ce=[{id:"herdr",label:"Herdr"},{id:"tmux-named",label:"Tmux"},{id:"tmux-auto",label:"Tmux · auto"},{id:"external",label:"Background"}],Re=900*1e3,Me=1440*60*1e3,Le=10080*60*1e3,V=[{key:"now",label:"Now",maxAgeMs:Re},{key:"today",label:"Today",maxAgeMs:Me},{key:"week",label:"This week",maxAgeMs:Le},{key:"older",label:"Older",maxAgeMs:null},{key:"unknown",label:"Unknown",maxAgeMs:null}],$e=[{key:"attached",label:"Attached",rank:3},{key:"live",label:"Live",rank:2},{key:"detached",label:"Detached",rank:1},{key:"exited",label:"Exited",rank:0}];function _e(a){return Ce.map(n=>({key:n.id,label:n.label,items:a.filter(l=>le(l)===n.id)})).filter(n=>n.items.length>0)}function Oe(a){const n=new Map;for(const i of a){const o=n.get(i.project);o?o.push(i):n.set(i.project,[i])}const l=new Set(["backend-only","unscoped"]),r=[...n.entries()].map(([i,o])=>({key:`project:${i}`,label:i,items:o,latestActivity:Math.max(...o.map(d=>q(d)??0)),isCatchAll:l.has(i)}));return r.sort((i,o)=>i.isCatchAll!==o.isCatchAll?i.isCatchAll?1:-1:i.latestActivity!==o.latestActivity?o.latestActivity-i.latestActivity:i.label.localeCompare(o.label,void 0,{numeric:!0,sensitivity:"base"})),r.map(({key:i,label:o,items:d})=>({key:i,label:o,items:d}))}function Fe(a,n){const l=r=>{const i=q(r);if(i===null)return"unknown";const o=Math.max(0,n-i);for(const d of V)if(d.maxAgeMs!==null&&o<d.maxAgeMs)return d.key;return"older"};return V.map(r=>({key:r.key,label:r.label,items:a.filter(i=>l(i)===r.key)})).filter(r=>r.items.length>0)}function Ke(a){return $e.map(n=>({key:n.key,label:n.label,items:a.filter(l=>ye(l)===n.rank)})).filter(n=>n.items.length>0)}function Be(a,n,l=Date.now()){switch(n){case"fleet":return _e(a);case"places":return Oe(a);case"time":return Fe(a,l);case"attention":return Ke(a)}}const De=8e3,We=[{id:"recent",label:"Recent"},{id:"name",label:"A–Z"}],ze={fleet:Ae,places:Se,time:we,attention:Ne};function Bt(){const{route:a,navigate:n,agents:l}=be(),[r,i]=m.useState({state:"loading",sessions:[]}),[o,d]=m.useState(""),[f,Q]=m.useState("recent"),[A,Y]=re("terminal-nav-mode","fleet"),[Z,J]=m.useState(!1),[X,M]=m.useState(null),[L,$]=m.useState(null),_=m.useRef(null),O=m.useRef(null),ee=ve(),te=he(()=>O.current);pe(m.useCallback(()=>_.current,[]));const x=m.useCallback((e={})=>{e.silent||i(s=>({state:"loading",sessions:s.sessions})),oe({includeDiscovered:!0}).then(s=>{i({state:"ready",sessions:s})}).catch(s=>{e.silent||i(c=>({state:"failed",sessions:c.sessions,error:s instanceof Error?s.message:String(s)}))})},[]);m.useEffect(()=>{x()},[x]),m.useEffect(()=>{const e=()=>{document.visibilityState==="visible"&&x({silent:!0})},s=window.setInterval(e,De);return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.clearInterval(s),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[x]);const k=m.useMemo(()=>ce(r.sessions),[r.sessions]),p=m.useMemo(()=>je(me(k),f==="recent"?{column:"activity",direction:"desc"}:{column:"name",direction:"asc"}),[f,k]),j=m.useMemo(()=>Ge(l,f).filter(e=>{const s=P(e);return s?!k.some(c=>c.surface.backend===s.backend&&c.surface.sessionName===s.sessionName&&(s.paneId==null||c.surface.paneId===s.paneId)):!0}),[l,k,f]),u=o.trim().toLowerCase(),g=u?p.filter(e=>e.searchable.includes(u)):p,N=g.filter(e=>y(e)==="current"),ae=Be(N,A),w=g.filter(e=>y(e)==="inactive"),h=g.filter(e=>y(e)==="review"),F=u?w.length+h.length:p.filter(e=>y(e)!=="current").length,K=u?h.length:p.filter(e=>y(e)==="review").length,S=Z||!!u,v=u?j.filter(e=>Ue(e).includes(u)):j,ne=a.view==="terminal"?a.terminalSurfaceKey??null:null,B=a.view==="terminal"?a.terminalSessionId??null:null,I=e=>de(e.key,ne)&&(!B||e.session.id===B),E=a.view==="terminal"&&a.agentId?`agent:${a.agentId}`:null,D=!!(N.some(I)||S&&[...w,...h].some(I)||E!=null&&v.some(e=>`agent:${e.id}`===E)),W=N[0]?.id??(S?w[0]?.id??h[0]?.id:void 0)??(v[0]?`agent:${v[0].id}`:void 0),se=r.state==="loading"?"Syncing":u?`${g.length+v.length}/${p.length+j.length}`:`${p.length+j.length} targets`,T=(e,s)=>({view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:ue(e.surface),...s?{mode:s}:{}}),C=(e,s="takeover")=>({view:"terminal",agentId:e.id,mode:s}),ie=async e=>{if(e.surface.backend==="tmux"&&window.confirm(`Release inactive terminal ${e.surface.sessionName}? The tmux surface will stop, but any associated Scout agent remains available and can be started again.`)){M(e.id),$(null);try{await xe({backend:"tmux",sessionName:e.surface.sessionName,paneId:e.surface.paneId??null,socketDir:e.surface.socketDir??null},"release"),x({silent:!0})}catch(s){$(s instanceof Error?s.message:String(s))}finally{M(null)}}},R=e=>{const s=I(e),c=y(e),b=X===e.id;return t.jsxs("div",{className:`terminal-nav-row${s?" terminal-nav-row--active":""}${c==="review"?" terminal-nav-row--review":""}`,title:e.surface.sessionName,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(s,D,e.id===W),onClick:()=>n(T(e)),children:[t.jsx(Ee,{className:"terminal-nav-row-icon",size:14,strokeWidth:1.7}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.title})}),t.jsx("span",{className:"terminal-nav-row-detail",children:e.detail||e.session.sourceSessionId})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:e.surface.backend}),t.jsx("span",{className:`terminal-nav-badge${c==="review"?" terminal-nav-badge--review":""}`,children:c==="current"?e.condition:c})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"takeover")),title:"Enter this terminal","aria-label":"Enter this terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"observe")),title:"Observe this terminal read-only","aria-label":"Observe this terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]}),c==="review"&&e.surface.backend==="tmux"&&t.jsxs("button",{type:"button",className:"terminal-nav-action terminal-nav-action--release",onClick:()=>{ie(e)},disabled:b,title:"Release this inactive tmux surface; keep the agent","aria-label":"Release this inactive tmux surface; keep the agent",children:[t.jsx(ge,{size:12,strokeWidth:1.8}),t.jsx("span",{children:b?"Releasing":"Release"})]})]})]},e.id)};return t.jsxs("div",{className:"ctx-panel terminal-nav",children:[t.jsxs("div",{className:"terminal-nav-head",children:[t.jsxs("div",{children:[t.jsx("div",{className:"terminal-nav-title",children:"Terminals"}),t.jsx("div",{className:"terminal-nav-summary",children:se})]}),t.jsx("button",{type:"button",className:"terminal-nav-refresh",onClick:()=>x(),disabled:r.state==="loading",title:"Refresh terminals","aria-label":"Refresh terminals",children:t.jsx(ke,{size:14,strokeWidth:1.8})})]}),t.jsx("div",{className:"terminal-nav-modes",role:"group","aria-label":"Group terminals",children:Te.map(e=>{const s=ze[e.id];return t.jsx("button",{type:"button",title:e.title,"aria-label":e.title,"aria-pressed":A===e.id,className:`terminal-nav-mode${A===e.id?" terminal-nav-mode--active":""}`,onClick:()=>Y(e.id),children:t.jsx(s,{size:13,strokeWidth:1.8})},e.id)})}),t.jsxs("div",{className:"ctx-panel-toolbar terminal-nav-toolbar",children:[t.jsx("input",{ref:_,type:"text",className:"ctx-panel-search-input",placeholder:"Search… (/)",value:o,onChange:e=>d(e.target.value),onKeyDown:te}),t.jsx("div",{className:"ctx-panel-sort",role:"group","aria-label":"Sort terminals",children:We.map(e=>t.jsx("button",{type:"button",title:e.id==="recent"?"Sort by most recent":"Sort alphabetically","aria-pressed":f===e.id,className:`ctx-panel-sort-option${f===e.id?" ctx-panel-sort-option--active":""}`,onClick:()=>Q(e.id),children:e.label},e.id))})]}),r.state==="failed"&&t.jsx("div",{className:"terminal-nav-error",children:r.error}),L&&t.jsx("div",{className:"terminal-nav-error",children:L}),t.jsx("div",{ref:O,className:"terminal-nav-list",onKeyDown:ee,children:g.length===0&&v.length===0&&r.state!=="loading"?t.jsx("div",{className:"ctx-panel-empty",children:p.length+j.length===0?"No terminal targets":"No matches"}):t.jsxs(t.Fragment,{children:[ae.map(e=>e.items.length===0?null:t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:e.label}),t.jsx("span",{children:e.items.length})]}),e.items.map(R)]},e.key)),N.length===0&&r.state!=="loading"&&t.jsx("div",{className:"terminal-nav-empty",children:"No sessions"}),F>0&&t.jsxs("div",{className:"terminal-nav-section terminal-nav-section--inactive",children:[t.jsxs("button",{type:"button",className:"terminal-nav-inactive-toggle","aria-expanded":S,onClick:()=>J(e=>!e),children:[t.jsx(Ie,{size:13,strokeWidth:1.8}),t.jsx("span",{children:"Inactive"}),t.jsx("span",{children:F}),K>0&&t.jsxs("span",{className:"terminal-nav-review-count",children:[K," review"]})]}),S&&t.jsxs(t.Fragment,{children:[w.map(R),h.length>0&&t.jsxs("div",{className:"terminal-nav-section-title terminal-nav-section-title--review",children:[t.jsx("span",{children:"Review after 30 days"}),t.jsx("span",{children:h.length})]}),h.map(R)]})]}),t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:"Available agents"}),t.jsx("span",{children:v.length})]}),v.map(e=>{const s=`agent:${e.id}`,c=s===E,b=P(e);return t.jsxs("div",{className:`terminal-nav-row terminal-nav-row--agent${c?" terminal-nav-row--active":""}`,title:e.name,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(c,D,s===W),onClick:()=>n(C(e)),children:[t.jsx("span",{className:`terminal-nav-agent-dot${b?" terminal-nav-agent-dot--bound":""}`,"aria-hidden":!0}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.name})}),t.jsx("span",{className:"terminal-nav-row-detail",children:Pe(e)})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:b?.backend??e.harness??"agent"}),t.jsx("span",{className:"terminal-nav-badge",children:b?"bound":fe(e.state)})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"takeover")),title:"Enter this agent terminal","aria-label":"Enter this agent terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),b&&t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"observe")),title:"Observe this agent terminal read-only","aria-label":"Observe this agent terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]})]})]},e.id)}),v.length===0&&t.jsx("div",{className:"terminal-nav-empty",children:"No agents"})]})]})})]})}function Ge(a,n){return[...a].filter(l=>!l.retiredFromFleet&&!l.staleLocalRegistration).sort((l,r)=>{const i=l.name.localeCompare(r.name,void 0,{numeric:!0,sensitivity:"base"});return n==="name"?i||l.id.localeCompare(r.id):(r.updatedAt??0)-(l.updatedAt??0)||i||l.id.localeCompare(r.id)})}function Pe(a){const n=a.project??H(a.cwd)??H(a.projectRoot)??a.definitionId;return[a.handle?`@${a.handle}`:null,a.harness,n,a.branch].filter(Boolean).join(" · ")}function Ue(a){return[a.name,a.handle,a.harness,a.state,a.project,a.branch,a.cwd,a.projectRoot,a.definitionId].filter(Boolean).join(" ").toLowerCase()}function H(a){const n=a?.trim().replace(/\/+$/u,"");return n?n.split("/").pop()||n:null}export{Bt as TerminalLeft};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-BI9AljSD.js";import{u as o}from"./Provider-Bu-C8Hxc.js";import{OpsAgentsLeft as i}from"./left-agents-CFMxyEjT.js";import{OpsDefaultLeft as m}from"./left-default-rnX5HANc.js";import{OpsLanesLeft as p}from"./left-lanes-BpLXT_qH.js";import{OpsMissionLeft as s}from"./left-mission-B0bhseWw.js";import{OpsAdvisorLeft as e}from"./left-advisor-CJkQS2d6.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";/* empty css */import"./use-fleet-active-asks-BtgNnRgK.js";import"./RailRow-ClMmtaIE.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./operator-attention-RqieiSY8.js";import"./openContent-C6XO6kr5.js";import"./agent-lanes-model-DXqjs0OK.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-roster-store-Q7pcblY5.js";import"./mission-control-store-DDAgWKUl.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./page-status-Crtgjbq3.js";import"./server-nWqndnxu.js";import"./layers-Dz2dKOnU.js";import"./sparkles-Cf8gin88.js";import"./activity-CqZafWfx.js";import"./cpu-DuD3RFX5.js";import"./gauge-BVEknshP.js";import"./terminal-C3YRPfyz.js";function vr(){const{route:t}=o();if(t.view!=="ops")return null;switch(t.mode){case"mission":return r.jsx(s,{});case"agents":return r.jsx(i,{});case"advisor":return r.jsx(e,{});case"lanes":return r.jsx(p,{});default:return r.jsx(m,{})}}export{vr as OpsLeft};
@@ -1,2 +1,2 @@
1
- import{r as u,j as a}from"./index-DvLtl7rV.js";/* empty css */import{u as mt,m as gt,e as vt,a as ht,i as ft}from"./Provider-CtXJeLrP.js";import{a as bt,b as wt,m as xt,r as Qe}from"./keyboard-nav-BLYDhL3Z.js";import{n as me,g as Be}from"./colors-BtO5_zlx.js";import{s as It,a as _,h as Te,q as ye,i as He,u as jt}from"./conversation-model-Dc02NsGp.js";import{l as yt,i as q,a as O,p as Ee,t as At,b as Ct}from"./conversation-prefs-DNre-Lcx.js";import{i as Rt,l as St,s as Ue}from"./sessionRead-CvFz2RHv.js";import{u as kt,f as pe,b as Mt}from"./use-fleet-active-asks-DAspZQjE.js";import{a as Ge,c as Oe,p as Nt,N as _e,g as $t,t as Lt}from"./agent-master-model-DqjrVI2h.js";import{t as te}from"./time-Dhsh_2EG.js";import{u as Pt}from"./use-conversation-list-C9ABzjXI.js";import{b as Bt}from"./router-B9vQkNJL.js";import{a as Ye}from"./message-visibility-CGOmSSKs.js";import{R as Ae}from"./RailRow-CEH2MFBw.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";function de(e){const n=e.split("/").filter(Boolean);return n[n.length-1]??e}function Je(e){const n=e.replace(/\/+$/,"").split("/");return n[n.length-1]??e}function Tt(e,n){const s=de(n).toLowerCase(),c=e.filter(v=>!!v.projectRoot),l=c.filter(v=>Je(v.projectRoot).toLowerCase()===s),d=l.length>0?l:c,i=Et(d);return i?{label:(l.length>0?d.find(v=>v.projectRoot===i):[...d].sort((v,f)=>f.lastActivityAt-v.lastActivityAt)[0])?.project??de(n),canonicalRoot:i}:{label:de(n),canonicalRoot:null}}function Et(e){const n=new Map;for(const d of e){const i=n.get(d.projectRoot)??{count:0,latest:0};i.count+=1,i.latest=Math.max(i.latest,d.lastActivityAt),n.set(d.projectRoot,i)}let s=null,c=-1,l=-1;for(const[d,i]of n)(i.count>c||i.count===c&&i.latest>l)&&(s=d,c=i.count,l=i.latest);return s}function Ut(e,n,s,c){const l=new Map;for(const i of e){const w=It(i),v=i.agentId?n.get(i.agentId):void 0,f=v?.repoKey??null,g=v?.project??null,M=(i.agentName??_(i)).trim(),h=w?`channel:${i.id}`:f?`repo:${f.toLowerCase()}`:g?`project:${g.toLowerCase()}`:M?`name:${M.toLowerCase()}`:`dm:${i.id}`,A=w?_(i):f?de(f):g??M??_(i);let b=l.get(h);if(b||(b={key:h,label:A,isChannel:w,conversations:[],bestState:"blocked",latestUpdate:0,unreadCount:0,canonicalRoot:null},l.set(h,b)),b.conversations.push(i),b.latestUpdate=Math.max(b.latestUpdate,i.lastMessageAt??0),Rt(i.lastMessageAt,i.id,s)&&(b.unreadCount+=1),!w&&v){const P=me(v.state);Be(P)<Be(b.bestState)&&(b.bestState=P)}}for(const i of l.values()){if(i.key.startsWith("repo:")){const w=i.conversations.map(f=>{const g=f.agentId?n.get(f.agentId):void 0;return{project:g?.project??null,projectRoot:g?.projectRoot??null,lastActivityAt:f.lastMessageAt??0}}),v=Tt(w,i.key.slice(5));i.label=v.label,i.canonicalRoot=v.canonicalRoot}i.conversations.sort((w,v)=>(v.lastMessageAt??0)-(w.lastMessageAt??0))}const d=Array.from(l.values());return d.sort((i,w)=>w.latestUpdate-i.latestUpdate),d}const We="scout:messages:rail:v1",ce={view:"agents",groupBy:"project"};let Ie=null;function Gt(e){return e==="agents"||e==="sessions"}function Ot(e){return e==="project"||e==="agent"||e==="day"||e==="state"}function _t(){if(Ie)return Ie;try{const e=window.localStorage.getItem(We);if(!e)return{...ce};const n=JSON.parse(e);return{view:Gt(n.view)?n.view:ce.view,groupBy:Ot(n.groupBy)?n.groupBy:ce.groupBy}}catch{return{...ce}}}function De(e){try{window.localStorage.setItem(We,JSON.stringify(e))}catch{Ie=e}return e}const Dt=12,Ft=[["project","Project"],["agent","Agent"],["day","Day"],["state","State"]];function Fn(){const{route:e,navigate:n,agents:s,apiConnection:c}=mt(),{sessions:l,loading:d,loadError:i,reload:w}=Pt(),[v,f]=u.useState(()=>St()),[g,M]=u.useState(()=>yt()),[h,A]=u.useState(""),[b,P]=u.useState(()=>new Set),[I,r]=u.useState(!1),[D,F]=u.useState(!1),[Q,ge]=u.useState(!1),[K,ne]=u.useState(()=>_t()),C=K.view,Re=u.useCallback(t=>{ne(o=>De({...o,view:t}))},[]),et=u.useCallback(t=>{ne(o=>De({...o,groupBy:t}))},[]),k=kt(),j=Bt(e),J=u.useMemo(()=>gt(s,j),[s,j]),R=u.useMemo(()=>{const t=new Map,o=J?s.filter(p=>J.has(p.id)):s;for(const p of o)t.set(p.id,p);return t},[s,J]),ve=e.view==="messages"||e.view==="conversation"||e.view==="agent-info"||e.view==="agents-v2"?e.conversationId:void 0,W=e.view==="messages"?e.agentId:void 0;u.useEffect(()=>{F(!1)},[h]);const z=u.useMemo(()=>vt(l,J,j),[l,J,j]),he=u.useMemo(()=>h?z.filter(t=>Fe(t,h)):z,[z,h]),X=u.useMemo(()=>{const t=o=>pe(k,o)?.updatedAt??0;return z.filter(o=>q(o.id,g)||!Te(o)?!1:pe(k,o)?.status==="needs_attention").sort((o,p)=>t(p)-t(o))},[z,g,k]),Z=u.useMemo(()=>h?X.filter(t=>Fe(t,h)):X,[X,h]),x=u.useMemo(()=>{const t=he.filter(S=>!q(S.id,g)),o=le(he.filter(S=>q(S.id,g))),p=t.filter(S=>O(S.id,g)).sort((S,Y)=>Ee(Y.id,g)-Ee(S.id,g)||(Y.lastMessageAt??0)-(S.lastMessageAt??0)),H=t.filter(S=>!O(S.id,g)),m=H.filter(ye),y=H.filter(Te),$=H.filter(He);return{pinned:p,channels:le(m),dms:le(y),observed:Ut(le($),R,v),archived:o}},[he,R,v,g]),N=u.useMemo(()=>{const t=new Map,o=[];for(const m of x.dms){if(!m.agentId){o.push(m);continue}const y=R.get(m.agentId),$=Ge(y,m.agentId),S=y?[...R.values()].filter(E=>Ge(E,E.id)===$):[],Y=Oe(S)??y,ut=Y?.name??m.agentName??m.agentId.split(".")[0]??m.agentId,L=t.get($);if(L){L.count+=1,L.memberAgentIds.includes(m.agentId)||L.memberAgentIds.push(m.agentId);const E=Oe([L.agent,y].filter(pt=>!!pt));L.agent=E,L.agentId=E?.id??[...L.memberAgentIds].sort()[0],L.name=E?.name??L.name;continue}t.set($,{agentId:Y?.id??m.agentId,agent:Y,name:ut,memberAgentIds:S.length>0?S.map(E=>E.id).sort():[m.agentId],latest:m,count:1})}const p=new Map;for(const m of t.values()){const y=Nt(m.agent),$=p.get(y);$?$.push(m):p.set(y,[m])}for(const m of p.values())m.sort((y,$)=>y.name.localeCompare($.name));return{projects:[...p.keys()].sort((m,y)=>m===_e?1:y===_e?-1:m.localeCompare(y)).map(m=>({label:m,entries:p.get(m)})),unassigned:o}},[x.dms,R]),oe=u.useMemo(()=>C==="sessions"?$t(x.dms,K.groupBy,R,k,Date.now()):[],[C,x.dms,K.groupBy,R,k]),Se=ht(),se=u.useCallback(t=>{M(o=>At(t,o))},[]),ae=u.useCallback(t=>{M(o=>Ct(t,o))},[]),B=u.useCallback(t=>{f(Ue(t.id)),n({view:"messages",conversationId:t.id,...j?{machineId:j}:{}})},[n,j]),tt=u.useCallback(t=>{n({view:"messages",agentId:t,...j?{machineId:j}:{}})},[n,j]),nt=u.useCallback(t=>{if(f(Ue(t.id)),t.agentId){n({view:"messages",agentId:t.agentId,threadId:t.id,...j?{machineId:j}:{}});return}n({view:"messages",conversationId:t.id,...j?{machineId:j}:{}})},[n,j]),V=u.useCallback((t,o)=>{const p=O(o.id,g),H=q(o.id,g),m=_(o);Se(t,[{kind:"action",label:"Open",onSelect:()=>B(o)},{kind:"separator"},{kind:"action",label:p?"Unpin":"Pin to top",onSelect:()=>se(o.id)},{kind:"action",label:H?"Unarchive":"Archive",onSelect:()=>ae(o.id)},{kind:"separator"},{kind:"action",label:"Copy name",onSelect:()=>{navigator.clipboard?.writeText(m).catch(()=>{})}}])},[g,B,se,ae,Se]),ot=t=>{P(o=>{const p=new Set(o);return p.has(t)?p.delete(t):p.add(t),p})},st=c.status==="offline"||ft(i),ke=u.useRef(null),Me=u.useRef(null),at=bt(),it=xt(()=>ke.current);wt(u.useCallback(()=>Me.current,[]));const fe=x.pinned.length,be=x.channels.length,rt=C==="agents"?N.projects.reduce((t,o)=>t+o.entries.length,0)+N.unassigned.length:oe.reduce((t,o)=>t+o.sessions.length,0),we=x.observed.reduce((t,o)=>t+o.conversations.length,0),ie=x.archived.length,Ne=fe+be+rt+we+ie,ct=I||!!h,xe=u.useMemo(()=>{const t=[];for(const o of Z)t.push({rowId:`ny-${o.id}`,id:o.id});for(const o of x.pinned)t.push({rowId:`pin-${o.id}`,id:o.id});if(C==="agents"){for(const o of N.projects)for(const p of o.entries)t.push({rowId:`agent-${p.agentId}`,id:`agent-${p.agentId}`});for(const o of N.unassigned)t.push({rowId:o.id,id:o.id})}else for(const o of oe)for(const p of o.sessions)t.push({rowId:p.id,id:p.id});for(const o of x.channels)t.push({rowId:o.id,id:o.id});for(const o of x.observed)for(const p of o.conversations)t.push({rowId:p.id,id:p.id});for(const o of x.archived)t.push({rowId:`arch-${o.id}`,id:o.id});return t},[Z,x,C,N,oe]),lt=e.view==="messages"?e.threadId:void 0,$e=u.useMemo(()=>{if(W){for(const t of N.projects)for(const o of t.entries)if(o.agentId===W||o.memberAgentIds.includes(W))return o.agentId;return W}},[W,N]),re=ve??(C==="sessions"?lt:void 0)??($e?`agent-${$e}`:void 0),T=u.useMemo(()=>({activeId:re,activeRowId:re?xe.find(t=>t.id===re)?.rowId:void 0,firstRowId:xe[0]?.rowId}),[re,xe]),Le=D||h?x.observed:x.observed.slice(0,Dt),Pe=Math.max(0,x.observed.length-Le.length),dt=t=>!!(h||b.has(t.key)||ve&&t.conversations.some(o=>o.id===ve)),ee=t=>a.jsx(je,{pinned:O(t.id,g),archived:q(t.id,g),onTogglePin:()=>se(t.id),onToggleArchive:()=>ae(t.id)});return a.jsxs("div",{className:"ctx-panel",children:[a.jsxs("div",{className:"ctx-panel-toolbar",children:[a.jsx("input",{ref:Me,type:"text",className:"ctx-panel-search-input",placeholder:"Filter… (/)",value:h,onChange:t=>A(t.target.value),onKeyDown:it}),X.length>0&&a.jsx("span",{className:"ctx-panel-rail-stat",title:"Asks waiting on your reply",children:Qt(X.length)})]}),a.jsxs("div",{className:"ctx-panel-viewtoggle",role:"tablist","aria-label":"Rail view",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":C==="agents",className:`ctx-panel-viewtab${C==="agents"?" ctx-panel-viewtab--on":""}`,onClick:()=>Re("agents"),children:"Agents"}),a.jsx("button",{type:"button",role:"tab","aria-selected":C==="sessions",className:`ctx-panel-viewtab${C==="sessions"?" ctx-panel-viewtab--on":""}`,onClick:()=>Re("sessions"),children:"Sessions"})]}),a.jsx("div",{ref:ke,className:["ctx-panel-list","ctx-panel-list--scroll",Ne===0&&"ctx-panel-list--empty"].filter(Boolean).join(" "),onKeyDown:at,children:Ne===0?a.jsx(qt,{query:h,loading:d,error:i,apiOffline:st,onRetry:()=>{w(!0)}}):a.jsxs(a.Fragment,{children:[Z.length>0&&a.jsx(U,{label:"Needs you",count:Z.length,hint:"Asks waiting on your reply",children:Z.map(t=>a.jsx(G,{rowId:`ny-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,onSelect:B,onContextMenu:V},`ny-${t.id}`))}),fe>0&&a.jsx(U,{label:"Pinned",count:fe,hint:"Pinned conversations",children:x.pinned.map(t=>a.jsx(G,{rowId:`pin-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,pinned:!0,actions:ee(t),onSelect:B,onContextMenu:V},`pin-${t.id}`))}),C==="agents"&&N.projects.map(t=>a.jsx(U,{label:t.label,count:t.entries.length,children:t.entries.map(o=>a.jsx(Kt,{entry:o,nav:T,ask:Mt(k,o.memberAgentIds),onSelect:tt},o.agentId))},t.label)),C==="agents"&&N.unassigned.length>0&&a.jsx(U,{label:"Direct",count:N.unassigned.length,hint:"Conversations without a resolved agent",children:N.unassigned.map(t=>a.jsx(G,{rowId:t.id,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},t.id))}),C==="sessions"&&a.jsxs("div",{className:"ctx-panel-groupbar",role:"radiogroup","aria-label":"Group sessions by",children:[a.jsx("span",{className:"ctx-panel-groupbar-label",children:"Group"}),Ft.map(([t,o])=>a.jsx("button",{type:"button",role:"radio","aria-checked":K.groupBy===t,className:`ctx-panel-groupchip${K.groupBy===t?" ctx-panel-groupchip--on":""}`,onClick:()=>et(t),children:o},t))]}),C==="sessions"&&oe.map(t=>a.jsx(U,{label:t.label,count:t.sessions.length,children:t.sessions.map(o=>a.jsx(G,{rowId:o.id,session:o,nav:T,agentById:R,asksByAgent:k,taskTitled:!0,actions:ee(o),onSelect:nt,onContextMenu:V},o.id))},t.label)),be>0&&a.jsx(U,{label:"Channels",count:be,children:x.channels.map(t=>a.jsx(G,{rowId:t.id,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},t.id))}),we>0&&a.jsxs(U,{label:"Observed",count:we,hint:"Agent conversations you’re not in",open:ct,onToggle:()=>r(t=>!t),children:[Le.map(t=>a.jsx(Vt,{group:t,isOpen:dt(t),nav:T,agentById:R,asksByAgent:k,prefs:g,observed:!0,onToggle:()=>ot(t.key),onSelect:B,onTogglePin:se,onToggleArchive:ae,onContextMenu:V},t.key)),Pe>0?a.jsxs("button",{type:"button",className:"ctx-panel-more",onClick:()=>F(!0),children:["+ ",Pe," more observed"]}):null]}),ie>0&&a.jsxs(U,{label:"Archived",count:ie,hint:"Hidden from the main rail",children:[a.jsx("button",{type:"button",className:"ctx-panel-more",onClick:()=>ge(t=>!t),children:Q?"▾ hide archived":`› show ${ie} archived`}),Q?x.archived.map(t=>a.jsx(G,{rowId:`arch-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},`arch-${t.id}`)):null]})]})})]})}function U({label:e,count:n,hint:s,open:c,onToggle:l,children:d}){return l?a.jsxs("section",{className:"ctx-panel-rail-section","aria-label":e,children:[a.jsxs("button",{type:"button",className:"ctx-panel-section-label ctx-panel-section-toggle",title:s,"aria-expanded":!!c,onClick:l,children:[a.jsxs("span",{className:"ctx-panel-section-toggle-label",children:[a.jsx("span",{className:"ctx-panel-section-chevron","aria-hidden":!0,children:c?"▾":"▸"}),e]}),a.jsx("span",{className:"ctx-panel-count",children:n})]}),c?a.jsx("div",{className:"ctx-panel-rail-section-body",children:d}):null]}):a.jsxs("section",{className:"ctx-panel-rail-section","aria-label":e,children:[a.jsxs("div",{className:"ctx-panel-section-label",title:s,children:[a.jsx("span",{children:e}),a.jsx("span",{className:"ctx-panel-count",children:n})]}),a.jsx("div",{className:"ctx-panel-rail-section-body",children:d})]})}function je({pinned:e,archived:n,onTogglePin:s,onToggleArchive:c}){return a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:["rr-row-action",e&&"rr-row-action--on"].filter(Boolean).join(" "),title:e?"Unpin":"Pin to top","aria-label":e?"Unpin":"Pin",onClick:l=>{l.stopPropagation(),s()},children:e?"Unpin":"Pin"}),a.jsx("button",{type:"button",className:["rr-row-action",n&&"rr-row-action--on"].filter(Boolean).join(" "),title:n?"Unarchive":"Archive","aria-label":n?"Unarchive":"Archive",onClick:l=>{l.stopPropagation(),c()},children:n?"Restore":"Archive"})]})}function G({session:e,rowId:n,nav:s,agentById:c,asksByAgent:l,pinned:d,depth:i,actions:w,worktreeLabel:v,taskTitled:f,onSelect:g,onContextMenu:M}){const h=e.id===s.activeId,A=f?Lt(e):_(e),b=ye(e),P=He(e),I=e.agentId?c.get(e.agentId):void 0,r=pe(l,e),D=!b&&!P&&r?.status==="needs_attention",F=Ve(e,I),Q=I?.name??e.agentName??void 0,ge=b?`${e.participantCount??e.participantIds.length} members`:f?Q?.toLowerCase()===A.toLowerCase()?void 0:Q:F.toLowerCase()===A.toLowerCase()?void 0:F,K=!b&&!f&&r?Ze(e,I,r):ge;return a.jsx(Ae,{depth:i,name:i===1?Ke(e,I,r):A,sub:i===1?Ve(e,I):K,meta:r?te(r.updatedAt):e.lastMessageAt?te(e.lastMessageAt):void 0,tone:b?"channel":r?Xe(I,r):I?me(I.state):"dm",agent:b?void 0:I,avatarName:i===1?I?.name??Ke(e,I,r):f?Q??A:A,avatarKind:b?"channel":"user",active:h,unread:D,pinned:d,activityLabel:r?Ce(r):void 0,activityTone:r?ze(r):void 0,worktreeLabel:v??void 0,title:i===1?Ht(e,I,r):void 0,actions:w,tabIndex:Qe(n===s.activeRowId,s.activeRowId!==void 0,n===s.firstRowId),onClick:()=>g(e),onContextMenu:M?ne=>M(ne,e):void 0})}function Kt({entry:e,nav:n,ask:s,onSelect:c}){const l=`agent-${e.agentId}`,d=e.agent,i=s?te(s.updatedAt):e.latest.lastMessageAt?te(e.latest.lastMessageAt):void 0;return a.jsx(Ae,{name:e.name,sub:s?Ze(e.latest,d,s):void 0,meta:e.count>1?i?`${e.count} · ${i}`:`${e.count}`:i,tone:s?Xe(d,s):d?me(d.state):"dm",agent:d,avatarName:e.name,avatarKind:"user",active:l===n.activeId,unread:s?.status==="needs_attention",activityLabel:s?Ce(s):void 0,activityTone:s?ze(s):void 0,tabIndex:Qe(l===n.activeRowId,n.activeRowId!==void 0,l===n.firstRowId),onClick:()=>c(e.agentId)})}function Vt({group:e,isOpen:n,nav:s,agentById:c,asksByAgent:l,prefs:d,observed:i,onToggle:w,onSelect:v,onTogglePin:f,onToggleArchive:g,onContextMenu:M}){if(e.conversations.length===1){const r=e.conversations[0];return a.jsx(G,{rowId:r.id,session:r,nav:s,agentById:c,asksByAgent:l,pinned:O(r.id,d),actions:a.jsx(je,{pinned:O(r.id,d),archived:q(r.id,d),onTogglePin:()=>f(r.id),onToggleArchive:()=>g(r.id)}),onSelect:v,onContextMenu:M})}const h=e.conversations.map(r=>pe(l,r)).filter(r=>!!r),A=h.length,b=h.filter(r=>r.status==="working").length,P=h.filter(r=>r.status==="needs_attention").length,I=e.conversations.some(r=>r.id===s.activeId);return a.jsxs("div",{children:[a.jsx(Ae,{name:e.label,meta:A>0?`${A} active · ${qe(e)}`:qe(e),tone:b>0?"in_turn":e.bestState,caret:n?"open":"closed",active:I&&!n,unread:!i&&P>0&&!n,activityLabel:A>0?`${A} active`:void 0,activityTone:P>0?"attention":b>0?"working":"pending",onClick:w}),n&&e.conversations.map(r=>{const D=r.agentId?c.get(r.agentId):void 0,F=e.canonicalRoot&&D?.projectRoot&&D.projectRoot!==e.canonicalRoot?Je(D.projectRoot):null;return a.jsx(G,{rowId:r.id,session:r,depth:1,nav:s,agentById:c,asksByAgent:l,pinned:O(r.id,d),worktreeLabel:F,actions:a.jsx(je,{pinned:O(r.id,d),archived:q(r.id,d),onTogglePin:()=>f(r.id),onToggleArchive:()=>g(r.id)}),onSelect:v,onContextMenu:M},r.id)})]},e.key)}function qt({query:e,loading:n,error:s,apiOffline:c,onRetry:l}){const d=e.trim().length>0,i=n?"Loading conversations":c?"Scout server offline":s?"Couldn't load conversations":d?"No matching conversations":"No conversations yet",w=n?"Checking the broker for your conversations, channels, and observed threads.":c?"Start or restart Scout services, then retry.":s||(d?"Try a shorter filter.":"Your conversations, channels, and observed agent threads will show here.");return a.jsxs("div",{className:"ctx-panel-empty-card","data-tone":c||s?"error":"neutral",children:[a.jsx("div",{className:"ctx-panel-empty-card-title",children:i}),a.jsx("div",{className:"ctx-panel-empty-card-detail",children:w}),(c||s)&&a.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:l,children:"Retry"})]})}function Fe(e,n){const s=n.toLowerCase();return _(e).toLowerCase().includes(s)||e.id.toLowerCase().includes(s)||(e.preview??"").toLowerCase().includes(s)||(e.agentName??"").toLowerCase().includes(s)}function Qt(e){return e===1?"1 needs a reply":`${e} need a reply`}function Ce(e){return e.status==="queued"?"Starting":e.status==="working"?"Working":e.status==="needs_attention"?"Needs you":e.statusLabel||e.status}function ze(e){return e.status==="queued"?"pending":e.status==="needs_attention"?"attention":"working"}function Xe(e,n){return n.status==="working"?"in_turn":e?me(e.state):"dm"}function Ze(e,n,s){const c=Ce(s),l=ue(s.task)??ue(s.summary)??ue(e.preview)??e.currentBranch??n?.branch??"";return l?`${c} · ${l}`:c}function le(e){return[...e].sort((n,s)=>(s.lastMessageAt??0)-(n.lastMessageAt??0))}function Ke(e,n,s){const c=s?.task??ue(e.preview)??e.currentBranch??n?.branch??"",l=n?.name??e.agentName??_(e);return c?`${l} · ${c}`:l}function Ht(e,n,s){const c=[];return s&&c.push(`task: ${s.task}`),e.preview&&c.push(`preview: ${Ye(e.preview)}`),(e.currentBranch??n?.branch)&&c.push(`branch: ${e.currentBranch??n?.branch}`),n?.harness&&c.push(`harness: ${n.harness}`),c.length>0?c.join(`
1
+ import{r as u,j as a}from"./index-BI9AljSD.js";/* empty css */import{u as mt,m as gt,e as vt,a as ht,i as ft}from"./Provider-Bu-C8Hxc.js";import{a as bt,b as wt,m as xt,r as Qe}from"./keyboard-nav-e6yGeorb.js";import{n as me,g as Be}from"./colors-BtO5_zlx.js";import{s as It,a as _,h as Te,q as ye,i as He,u as jt}from"./conversation-model-QsJVfSeG.js";import{l as yt,i as q,a as O,p as Ee,t as At,b as Ct}from"./conversation-prefs-DNre-Lcx.js";import{i as Rt,l as St,s as Ue}from"./sessionRead-CvFz2RHv.js";import{u as kt,f as pe,b as Mt}from"./use-fleet-active-asks-BtgNnRgK.js";import{a as Ge,c as Oe,p as Nt,N as _e,g as $t,t as Lt}from"./agent-master-model-DAZL92oe.js";import{t as te}from"./time-Dhsh_2EG.js";import{u as Pt}from"./use-conversation-list-DO5J8T1H.js";import{b as Bt}from"./router-DTtux5sP.js";import{a as Ye}from"./message-visibility-CGOmSSKs.js";import{R as Ae}from"./RailRow-ClMmtaIE.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";function de(e){const n=e.split("/").filter(Boolean);return n[n.length-1]??e}function Je(e){const n=e.replace(/\/+$/,"").split("/");return n[n.length-1]??e}function Tt(e,n){const s=de(n).toLowerCase(),c=e.filter(v=>!!v.projectRoot),l=c.filter(v=>Je(v.projectRoot).toLowerCase()===s),d=l.length>0?l:c,i=Et(d);return i?{label:(l.length>0?d.find(v=>v.projectRoot===i):[...d].sort((v,f)=>f.lastActivityAt-v.lastActivityAt)[0])?.project??de(n),canonicalRoot:i}:{label:de(n),canonicalRoot:null}}function Et(e){const n=new Map;for(const d of e){const i=n.get(d.projectRoot)??{count:0,latest:0};i.count+=1,i.latest=Math.max(i.latest,d.lastActivityAt),n.set(d.projectRoot,i)}let s=null,c=-1,l=-1;for(const[d,i]of n)(i.count>c||i.count===c&&i.latest>l)&&(s=d,c=i.count,l=i.latest);return s}function Ut(e,n,s,c){const l=new Map;for(const i of e){const w=It(i),v=i.agentId?n.get(i.agentId):void 0,f=v?.repoKey??null,g=v?.project??null,M=(i.agentName??_(i)).trim(),h=w?`channel:${i.id}`:f?`repo:${f.toLowerCase()}`:g?`project:${g.toLowerCase()}`:M?`name:${M.toLowerCase()}`:`dm:${i.id}`,A=w?_(i):f?de(f):g??M??_(i);let b=l.get(h);if(b||(b={key:h,label:A,isChannel:w,conversations:[],bestState:"blocked",latestUpdate:0,unreadCount:0,canonicalRoot:null},l.set(h,b)),b.conversations.push(i),b.latestUpdate=Math.max(b.latestUpdate,i.lastMessageAt??0),Rt(i.lastMessageAt,i.id,s)&&(b.unreadCount+=1),!w&&v){const P=me(v.state);Be(P)<Be(b.bestState)&&(b.bestState=P)}}for(const i of l.values()){if(i.key.startsWith("repo:")){const w=i.conversations.map(f=>{const g=f.agentId?n.get(f.agentId):void 0;return{project:g?.project??null,projectRoot:g?.projectRoot??null,lastActivityAt:f.lastMessageAt??0}}),v=Tt(w,i.key.slice(5));i.label=v.label,i.canonicalRoot=v.canonicalRoot}i.conversations.sort((w,v)=>(v.lastMessageAt??0)-(w.lastMessageAt??0))}const d=Array.from(l.values());return d.sort((i,w)=>w.latestUpdate-i.latestUpdate),d}const We="scout:messages:rail:v1",ce={view:"agents",groupBy:"project"};let Ie=null;function Gt(e){return e==="agents"||e==="sessions"}function Ot(e){return e==="project"||e==="agent"||e==="day"||e==="state"}function _t(){if(Ie)return Ie;try{const e=window.localStorage.getItem(We);if(!e)return{...ce};const n=JSON.parse(e);return{view:Gt(n.view)?n.view:ce.view,groupBy:Ot(n.groupBy)?n.groupBy:ce.groupBy}}catch{return{...ce}}}function De(e){try{window.localStorage.setItem(We,JSON.stringify(e))}catch{Ie=e}return e}const Dt=12,Ft=[["project","Project"],["agent","Agent"],["day","Day"],["state","State"]];function Fn(){const{route:e,navigate:n,agents:s,apiConnection:c}=mt(),{sessions:l,loading:d,loadError:i,reload:w}=Pt(),[v,f]=u.useState(()=>St()),[g,M]=u.useState(()=>yt()),[h,A]=u.useState(""),[b,P]=u.useState(()=>new Set),[I,r]=u.useState(!1),[D,F]=u.useState(!1),[Q,ge]=u.useState(!1),[K,ne]=u.useState(()=>_t()),C=K.view,Re=u.useCallback(t=>{ne(o=>De({...o,view:t}))},[]),et=u.useCallback(t=>{ne(o=>De({...o,groupBy:t}))},[]),k=kt(),j=Bt(e),J=u.useMemo(()=>gt(s,j),[s,j]),R=u.useMemo(()=>{const t=new Map,o=J?s.filter(p=>J.has(p.id)):s;for(const p of o)t.set(p.id,p);return t},[s,J]),ve=e.view==="messages"||e.view==="conversation"||e.view==="agent-info"||e.view==="agents-v2"?e.conversationId:void 0,W=e.view==="messages"?e.agentId:void 0;u.useEffect(()=>{F(!1)},[h]);const z=u.useMemo(()=>vt(l,J,j),[l,J,j]),he=u.useMemo(()=>h?z.filter(t=>Fe(t,h)):z,[z,h]),X=u.useMemo(()=>{const t=o=>pe(k,o)?.updatedAt??0;return z.filter(o=>q(o.id,g)||!Te(o)?!1:pe(k,o)?.status==="needs_attention").sort((o,p)=>t(p)-t(o))},[z,g,k]),Z=u.useMemo(()=>h?X.filter(t=>Fe(t,h)):X,[X,h]),x=u.useMemo(()=>{const t=he.filter(S=>!q(S.id,g)),o=le(he.filter(S=>q(S.id,g))),p=t.filter(S=>O(S.id,g)).sort((S,Y)=>Ee(Y.id,g)-Ee(S.id,g)||(Y.lastMessageAt??0)-(S.lastMessageAt??0)),H=t.filter(S=>!O(S.id,g)),m=H.filter(ye),y=H.filter(Te),$=H.filter(He);return{pinned:p,channels:le(m),dms:le(y),observed:Ut(le($),R,v),archived:o}},[he,R,v,g]),N=u.useMemo(()=>{const t=new Map,o=[];for(const m of x.dms){if(!m.agentId){o.push(m);continue}const y=R.get(m.agentId),$=Ge(y,m.agentId),S=y?[...R.values()].filter(E=>Ge(E,E.id)===$):[],Y=Oe(S)??y,ut=Y?.name??m.agentName??m.agentId.split(".")[0]??m.agentId,L=t.get($);if(L){L.count+=1,L.memberAgentIds.includes(m.agentId)||L.memberAgentIds.push(m.agentId);const E=Oe([L.agent,y].filter(pt=>!!pt));L.agent=E,L.agentId=E?.id??[...L.memberAgentIds].sort()[0],L.name=E?.name??L.name;continue}t.set($,{agentId:Y?.id??m.agentId,agent:Y,name:ut,memberAgentIds:S.length>0?S.map(E=>E.id).sort():[m.agentId],latest:m,count:1})}const p=new Map;for(const m of t.values()){const y=Nt(m.agent),$=p.get(y);$?$.push(m):p.set(y,[m])}for(const m of p.values())m.sort((y,$)=>y.name.localeCompare($.name));return{projects:[...p.keys()].sort((m,y)=>m===_e?1:y===_e?-1:m.localeCompare(y)).map(m=>({label:m,entries:p.get(m)})),unassigned:o}},[x.dms,R]),oe=u.useMemo(()=>C==="sessions"?$t(x.dms,K.groupBy,R,k,Date.now()):[],[C,x.dms,K.groupBy,R,k]),Se=ht(),se=u.useCallback(t=>{M(o=>At(t,o))},[]),ae=u.useCallback(t=>{M(o=>Ct(t,o))},[]),B=u.useCallback(t=>{f(Ue(t.id)),n({view:"messages",conversationId:t.id,...j?{machineId:j}:{}})},[n,j]),tt=u.useCallback(t=>{n({view:"messages",agentId:t,...j?{machineId:j}:{}})},[n,j]),nt=u.useCallback(t=>{if(f(Ue(t.id)),t.agentId){n({view:"messages",agentId:t.agentId,threadId:t.id,...j?{machineId:j}:{}});return}n({view:"messages",conversationId:t.id,...j?{machineId:j}:{}})},[n,j]),V=u.useCallback((t,o)=>{const p=O(o.id,g),H=q(o.id,g),m=_(o);Se(t,[{kind:"action",label:"Open",onSelect:()=>B(o)},{kind:"separator"},{kind:"action",label:p?"Unpin":"Pin to top",onSelect:()=>se(o.id)},{kind:"action",label:H?"Unarchive":"Archive",onSelect:()=>ae(o.id)},{kind:"separator"},{kind:"action",label:"Copy name",onSelect:()=>{navigator.clipboard?.writeText(m).catch(()=>{})}}])},[g,B,se,ae,Se]),ot=t=>{P(o=>{const p=new Set(o);return p.has(t)?p.delete(t):p.add(t),p})},st=c.status==="offline"||ft(i),ke=u.useRef(null),Me=u.useRef(null),at=bt(),it=xt(()=>ke.current);wt(u.useCallback(()=>Me.current,[]));const fe=x.pinned.length,be=x.channels.length,rt=C==="agents"?N.projects.reduce((t,o)=>t+o.entries.length,0)+N.unassigned.length:oe.reduce((t,o)=>t+o.sessions.length,0),we=x.observed.reduce((t,o)=>t+o.conversations.length,0),ie=x.archived.length,Ne=fe+be+rt+we+ie,ct=I||!!h,xe=u.useMemo(()=>{const t=[];for(const o of Z)t.push({rowId:`ny-${o.id}`,id:o.id});for(const o of x.pinned)t.push({rowId:`pin-${o.id}`,id:o.id});if(C==="agents"){for(const o of N.projects)for(const p of o.entries)t.push({rowId:`agent-${p.agentId}`,id:`agent-${p.agentId}`});for(const o of N.unassigned)t.push({rowId:o.id,id:o.id})}else for(const o of oe)for(const p of o.sessions)t.push({rowId:p.id,id:p.id});for(const o of x.channels)t.push({rowId:o.id,id:o.id});for(const o of x.observed)for(const p of o.conversations)t.push({rowId:p.id,id:p.id});for(const o of x.archived)t.push({rowId:`arch-${o.id}`,id:o.id});return t},[Z,x,C,N,oe]),lt=e.view==="messages"?e.threadId:void 0,$e=u.useMemo(()=>{if(W){for(const t of N.projects)for(const o of t.entries)if(o.agentId===W||o.memberAgentIds.includes(W))return o.agentId;return W}},[W,N]),re=ve??(C==="sessions"?lt:void 0)??($e?`agent-${$e}`:void 0),T=u.useMemo(()=>({activeId:re,activeRowId:re?xe.find(t=>t.id===re)?.rowId:void 0,firstRowId:xe[0]?.rowId}),[re,xe]),Le=D||h?x.observed:x.observed.slice(0,Dt),Pe=Math.max(0,x.observed.length-Le.length),dt=t=>!!(h||b.has(t.key)||ve&&t.conversations.some(o=>o.id===ve)),ee=t=>a.jsx(je,{pinned:O(t.id,g),archived:q(t.id,g),onTogglePin:()=>se(t.id),onToggleArchive:()=>ae(t.id)});return a.jsxs("div",{className:"ctx-panel",children:[a.jsxs("div",{className:"ctx-panel-toolbar",children:[a.jsx("input",{ref:Me,type:"text",className:"ctx-panel-search-input",placeholder:"Filter… (/)",value:h,onChange:t=>A(t.target.value),onKeyDown:it}),X.length>0&&a.jsx("span",{className:"ctx-panel-rail-stat",title:"Asks waiting on your reply",children:Qt(X.length)})]}),a.jsxs("div",{className:"ctx-panel-viewtoggle",role:"tablist","aria-label":"Rail view",children:[a.jsx("button",{type:"button",role:"tab","aria-selected":C==="agents",className:`ctx-panel-viewtab${C==="agents"?" ctx-panel-viewtab--on":""}`,onClick:()=>Re("agents"),children:"Agents"}),a.jsx("button",{type:"button",role:"tab","aria-selected":C==="sessions",className:`ctx-panel-viewtab${C==="sessions"?" ctx-panel-viewtab--on":""}`,onClick:()=>Re("sessions"),children:"Sessions"})]}),a.jsx("div",{ref:ke,className:["ctx-panel-list","ctx-panel-list--scroll",Ne===0&&"ctx-panel-list--empty"].filter(Boolean).join(" "),onKeyDown:at,children:Ne===0?a.jsx(qt,{query:h,loading:d,error:i,apiOffline:st,onRetry:()=>{w(!0)}}):a.jsxs(a.Fragment,{children:[Z.length>0&&a.jsx(U,{label:"Needs you",count:Z.length,hint:"Asks waiting on your reply",children:Z.map(t=>a.jsx(G,{rowId:`ny-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,onSelect:B,onContextMenu:V},`ny-${t.id}`))}),fe>0&&a.jsx(U,{label:"Pinned",count:fe,hint:"Pinned conversations",children:x.pinned.map(t=>a.jsx(G,{rowId:`pin-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,pinned:!0,actions:ee(t),onSelect:B,onContextMenu:V},`pin-${t.id}`))}),C==="agents"&&N.projects.map(t=>a.jsx(U,{label:t.label,count:t.entries.length,children:t.entries.map(o=>a.jsx(Kt,{entry:o,nav:T,ask:Mt(k,o.memberAgentIds),onSelect:tt},o.agentId))},t.label)),C==="agents"&&N.unassigned.length>0&&a.jsx(U,{label:"Direct",count:N.unassigned.length,hint:"Conversations without a resolved agent",children:N.unassigned.map(t=>a.jsx(G,{rowId:t.id,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},t.id))}),C==="sessions"&&a.jsxs("div",{className:"ctx-panel-groupbar",role:"radiogroup","aria-label":"Group sessions by",children:[a.jsx("span",{className:"ctx-panel-groupbar-label",children:"Group"}),Ft.map(([t,o])=>a.jsx("button",{type:"button",role:"radio","aria-checked":K.groupBy===t,className:`ctx-panel-groupchip${K.groupBy===t?" ctx-panel-groupchip--on":""}`,onClick:()=>et(t),children:o},t))]}),C==="sessions"&&oe.map(t=>a.jsx(U,{label:t.label,count:t.sessions.length,children:t.sessions.map(o=>a.jsx(G,{rowId:o.id,session:o,nav:T,agentById:R,asksByAgent:k,taskTitled:!0,actions:ee(o),onSelect:nt,onContextMenu:V},o.id))},t.label)),be>0&&a.jsx(U,{label:"Channels",count:be,children:x.channels.map(t=>a.jsx(G,{rowId:t.id,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},t.id))}),we>0&&a.jsxs(U,{label:"Observed",count:we,hint:"Agent conversations you’re not in",open:ct,onToggle:()=>r(t=>!t),children:[Le.map(t=>a.jsx(Vt,{group:t,isOpen:dt(t),nav:T,agentById:R,asksByAgent:k,prefs:g,observed:!0,onToggle:()=>ot(t.key),onSelect:B,onTogglePin:se,onToggleArchive:ae,onContextMenu:V},t.key)),Pe>0?a.jsxs("button",{type:"button",className:"ctx-panel-more",onClick:()=>F(!0),children:["+ ",Pe," more observed"]}):null]}),ie>0&&a.jsxs(U,{label:"Archived",count:ie,hint:"Hidden from the main rail",children:[a.jsx("button",{type:"button",className:"ctx-panel-more",onClick:()=>ge(t=>!t),children:Q?"▾ hide archived":`› show ${ie} archived`}),Q?x.archived.map(t=>a.jsx(G,{rowId:`arch-${t.id}`,session:t,nav:T,agentById:R,asksByAgent:k,actions:ee(t),onSelect:B,onContextMenu:V},`arch-${t.id}`)):null]})]})})]})}function U({label:e,count:n,hint:s,open:c,onToggle:l,children:d}){return l?a.jsxs("section",{className:"ctx-panel-rail-section","aria-label":e,children:[a.jsxs("button",{type:"button",className:"ctx-panel-section-label ctx-panel-section-toggle",title:s,"aria-expanded":!!c,onClick:l,children:[a.jsxs("span",{className:"ctx-panel-section-toggle-label",children:[a.jsx("span",{className:"ctx-panel-section-chevron","aria-hidden":!0,children:c?"▾":"▸"}),e]}),a.jsx("span",{className:"ctx-panel-count",children:n})]}),c?a.jsx("div",{className:"ctx-panel-rail-section-body",children:d}):null]}):a.jsxs("section",{className:"ctx-panel-rail-section","aria-label":e,children:[a.jsxs("div",{className:"ctx-panel-section-label",title:s,children:[a.jsx("span",{children:e}),a.jsx("span",{className:"ctx-panel-count",children:n})]}),a.jsx("div",{className:"ctx-panel-rail-section-body",children:d})]})}function je({pinned:e,archived:n,onTogglePin:s,onToggleArchive:c}){return a.jsxs(a.Fragment,{children:[a.jsx("button",{type:"button",className:["rr-row-action",e&&"rr-row-action--on"].filter(Boolean).join(" "),title:e?"Unpin":"Pin to top","aria-label":e?"Unpin":"Pin",onClick:l=>{l.stopPropagation(),s()},children:e?"Unpin":"Pin"}),a.jsx("button",{type:"button",className:["rr-row-action",n&&"rr-row-action--on"].filter(Boolean).join(" "),title:n?"Unarchive":"Archive","aria-label":n?"Unarchive":"Archive",onClick:l=>{l.stopPropagation(),c()},children:n?"Restore":"Archive"})]})}function G({session:e,rowId:n,nav:s,agentById:c,asksByAgent:l,pinned:d,depth:i,actions:w,worktreeLabel:v,taskTitled:f,onSelect:g,onContextMenu:M}){const h=e.id===s.activeId,A=f?Lt(e):_(e),b=ye(e),P=He(e),I=e.agentId?c.get(e.agentId):void 0,r=pe(l,e),D=!b&&!P&&r?.status==="needs_attention",F=Ve(e,I),Q=I?.name??e.agentName??void 0,ge=b?`${e.participantCount??e.participantIds.length} members`:f?Q?.toLowerCase()===A.toLowerCase()?void 0:Q:F.toLowerCase()===A.toLowerCase()?void 0:F,K=!b&&!f&&r?Ze(e,I,r):ge;return a.jsx(Ae,{depth:i,name:i===1?Ke(e,I,r):A,sub:i===1?Ve(e,I):K,meta:r?te(r.updatedAt):e.lastMessageAt?te(e.lastMessageAt):void 0,tone:b?"channel":r?Xe(I,r):I?me(I.state):"dm",agent:b?void 0:I,avatarName:i===1?I?.name??Ke(e,I,r):f?Q??A:A,avatarKind:b?"channel":"user",active:h,unread:D,pinned:d,activityLabel:r?Ce(r):void 0,activityTone:r?ze(r):void 0,worktreeLabel:v??void 0,title:i===1?Ht(e,I,r):void 0,actions:w,tabIndex:Qe(n===s.activeRowId,s.activeRowId!==void 0,n===s.firstRowId),onClick:()=>g(e),onContextMenu:M?ne=>M(ne,e):void 0})}function Kt({entry:e,nav:n,ask:s,onSelect:c}){const l=`agent-${e.agentId}`,d=e.agent,i=s?te(s.updatedAt):e.latest.lastMessageAt?te(e.latest.lastMessageAt):void 0;return a.jsx(Ae,{name:e.name,sub:s?Ze(e.latest,d,s):void 0,meta:e.count>1?i?`${e.count} · ${i}`:`${e.count}`:i,tone:s?Xe(d,s):d?me(d.state):"dm",agent:d,avatarName:e.name,avatarKind:"user",active:l===n.activeId,unread:s?.status==="needs_attention",activityLabel:s?Ce(s):void 0,activityTone:s?ze(s):void 0,tabIndex:Qe(l===n.activeRowId,n.activeRowId!==void 0,l===n.firstRowId),onClick:()=>c(e.agentId)})}function Vt({group:e,isOpen:n,nav:s,agentById:c,asksByAgent:l,prefs:d,observed:i,onToggle:w,onSelect:v,onTogglePin:f,onToggleArchive:g,onContextMenu:M}){if(e.conversations.length===1){const r=e.conversations[0];return a.jsx(G,{rowId:r.id,session:r,nav:s,agentById:c,asksByAgent:l,pinned:O(r.id,d),actions:a.jsx(je,{pinned:O(r.id,d),archived:q(r.id,d),onTogglePin:()=>f(r.id),onToggleArchive:()=>g(r.id)}),onSelect:v,onContextMenu:M})}const h=e.conversations.map(r=>pe(l,r)).filter(r=>!!r),A=h.length,b=h.filter(r=>r.status==="working").length,P=h.filter(r=>r.status==="needs_attention").length,I=e.conversations.some(r=>r.id===s.activeId);return a.jsxs("div",{children:[a.jsx(Ae,{name:e.label,meta:A>0?`${A} active · ${qe(e)}`:qe(e),tone:b>0?"in_turn":e.bestState,caret:n?"open":"closed",active:I&&!n,unread:!i&&P>0&&!n,activityLabel:A>0?`${A} active`:void 0,activityTone:P>0?"attention":b>0?"working":"pending",onClick:w}),n&&e.conversations.map(r=>{const D=r.agentId?c.get(r.agentId):void 0,F=e.canonicalRoot&&D?.projectRoot&&D.projectRoot!==e.canonicalRoot?Je(D.projectRoot):null;return a.jsx(G,{rowId:r.id,session:r,depth:1,nav:s,agentById:c,asksByAgent:l,pinned:O(r.id,d),worktreeLabel:F,actions:a.jsx(je,{pinned:O(r.id,d),archived:q(r.id,d),onTogglePin:()=>f(r.id),onToggleArchive:()=>g(r.id)}),onSelect:v,onContextMenu:M},r.id)})]},e.key)}function qt({query:e,loading:n,error:s,apiOffline:c,onRetry:l}){const d=e.trim().length>0,i=n?"Loading conversations":c?"Scout server offline":s?"Couldn't load conversations":d?"No matching conversations":"No conversations yet",w=n?"Checking the broker for your conversations, channels, and observed threads.":c?"Start or restart Scout services, then retry.":s||(d?"Try a shorter filter.":"Your conversations, channels, and observed agent threads will show here.");return a.jsxs("div",{className:"ctx-panel-empty-card","data-tone":c||s?"error":"neutral",children:[a.jsx("div",{className:"ctx-panel-empty-card-title",children:i}),a.jsx("div",{className:"ctx-panel-empty-card-detail",children:w}),(c||s)&&a.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:l,children:"Retry"})]})}function Fe(e,n){const s=n.toLowerCase();return _(e).toLowerCase().includes(s)||e.id.toLowerCase().includes(s)||(e.preview??"").toLowerCase().includes(s)||(e.agentName??"").toLowerCase().includes(s)}function Qt(e){return e===1?"1 needs a reply":`${e} need a reply`}function Ce(e){return e.status==="queued"?"Starting":e.status==="working"?"Working":e.status==="needs_attention"?"Needs you":e.statusLabel||e.status}function ze(e){return e.status==="queued"?"pending":e.status==="needs_attention"?"attention":"working"}function Xe(e,n){return n.status==="working"?"in_turn":e?me(e.state):"dm"}function Ze(e,n,s){const c=Ce(s),l=ue(s.task)??ue(s.summary)??ue(e.preview)??e.currentBranch??n?.branch??"";return l?`${c} · ${l}`:c}function le(e){return[...e].sort((n,s)=>(s.lastMessageAt??0)-(n.lastMessageAt??0))}function Ke(e,n,s){const c=s?.task??ue(e.preview)??e.currentBranch??n?.branch??"",l=n?.name??e.agentName??_(e);return c?`${l} · ${c}`:l}function Ht(e,n,s){const c=[];return s&&c.push(`task: ${s.task}`),e.preview&&c.push(`preview: ${Ye(e.preview)}`),(e.currentBranch??n?.branch)&&c.push(`branch: ${e.currentBranch??n?.branch}`),n?.harness&&c.push(`harness: ${n.harness}`),c.length>0?c.join(`
2
2
  `):void 0}function Ve(e,n){if(ye(e))return jt(e);const s=n?.handle?.trim().replace(/^@+/,"");return s||(e.agentId?e.agentId.split(".")[0]??e.agentId:_(e))}function ue(e){if(!e)return null;const n=Ye(e).replace(/\s+/g," ").trim();return n?n.length>60?`${n.slice(0,57)}…`:n:null}function qe(e){const n=e.latestUpdate?te(e.latestUpdate):"",s=`${e.conversations.length}`;return n?`${s} · ${n}`:s}export{Fn as ChatLeft};
@@ -1 +1 @@
1
- import{j as e,r as S}from"./index-DvLtl7rV.js";import{u as O,g as q,i as P,j as G,k as C,l as H,c as I,r as w}from"./mesh-view-store-ChUOASK8.js";import{u as Q}from"./Provider-CtXJeLrP.js";import{n as F,a as V}from"./colors-BtO5_zlx.js";import{b as D}from"./mesh-buckets-6y3ZIibI.js";import{u as J,h as U}from"./use-fleet-active-asks-DAspZQjE.js";import{R as u}from"./RailRow-CEH2MFBw.js";import{o as W}from"./openAgent-Dbv5wfuL.js";/* empty css */import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./mesh-roster-Bc7T4b7z.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./openContent-C6XO6kr5.js";function X({value:o,onChange:c,placeholder:i="Search…",onKeyDown:l}){return e.jsx("input",{type:"search",className:"fleet-search",placeholder:i,value:o,onChange:h=>c(h.target.value),onKeyDown:l,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"})}const Y=["needs_attention","in_turn","in_flight","callable","blocked"],Z={in_turn:"in turn",in_flight:"in flight",needs_attention:"needs attention",callable:"callable",blocked:"blocked"},ee={in_turn:"working",in_flight:"working",needs_attention:"working",callable:"available",blocked:"offline"};function te({active:o,onToggle:c}){return e.jsx("div",{className:"fleet-pills",role:"group","aria-label":"State filters",children:Y.map(i=>{const l=o.has(i);return e.jsx("button",{type:"button",className:`fleet-pill fleet-pill--${ee[i]}${l?" fleet-pill--on":""}`,onClick:()=>c(i),"aria-pressed":l,children:Z[i]},i)})})}const T=10;function ne(o){return F(o.state)}function _(o){return o.updatedAt??o.createdAt??0}function We(){const{agents:o,navigate:c}=Q(),{meshSnapshot:i,selectedId:l,selectedType:h,query:d,agentStateFilters:g,hiddenMachineIds:f,treeFullMachineIds:b}=O(),L=J(),p=S.useMemo(()=>i?D(o,i):[],[o,i]),y=S.useMemo(()=>{const n=d.trim().toLowerCase();return p.filter(s=>!f.has(s.machineId)).map(s=>{const t=s.agents.filter(r=>g.has(ne(r))?n?`${r.name??""} ${r.project??""} ${r.branch??""} ${r.harness??""}`.toLowerCase().includes(n):!0:!1);return{...s,agents:t}})},[p,d,g,f]),v=S.useMemo(()=>{const n=new Map([["this",[]],["peer",[]],["tailnet",[]]]);for(const s of y){const t=s.reachability==="this"?"this":s.reachability==="peer"?"peer":"tailnet";n.get(t)?.push(s)}return n},[y]);if(!i)return e.jsx("div",{className:"ctx-panel ctx-panel--empty",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading mesh…"})})});const $=n=>{const s=p.map(t=>t.machineId);H(n,s),I(n,"node"),w(n)},x=f.size,j=p.length,E=n=>{I(n.id,"agent");const s=n.authorityNodeId??n.homeNodeId;s&&w(s),W(c,n,{returnTo:{view:"mesh"}})},k=(n,s)=>s.length===0?null:e.jsxs("section",{className:"mesh-nav-group",children:[e.jsx("div",{className:"mesh-nav-group-label",children:n}),s.map(t=>{const r=b.has(t.machineId),m=[...t.agents].sort((a,A)=>_(A)-_(a)),M=r?m:m.slice(0,T),N=m.length-M.length,B=l===t.machineId&&h==="node",R=t.agents.filter(a=>V(a.state)).length,z=t.agents.length>0?`${R}/${t.agents.length}`:t.online?"—":"not ready";return e.jsxs("div",{className:"mesh-nav-machine",children:[e.jsx(u,{name:t.machineLabel,meta:z,tone:"neutral",active:B,onClick:()=>$(t.machineId),title:`Focus ${t.machineLabel} on the map`}),M.map(a=>{const A=l===a.id&&h==="agent",K=U(L,a.id);return e.jsx(u,{name:a.name,tone:F(a.state),depth:1,active:A,unread:K,onClick:()=>E(a),title:a.name},a.id)}),!r&&N>0&&e.jsx(u,{name:`see ${N} more`,depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show all agents on this machine"}),r&&m.length>T&&e.jsx(u,{name:"see less",depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show recent agents only"})]},t.machineId)})]},n);return e.jsxs("div",{className:"ctx-panel mesh-nav",children:[e.jsxs("div",{className:"mesh-nav-head",children:[e.jsx(X,{value:d,onChange:q,placeholder:"Find machines or agents…"}),e.jsx(te,{active:g,onToggle:P}),x>0&&x<j&&e.jsxs("button",{type:"button",className:"mesh-nav-focus-chip",onClick:G,title:"Show all machines",children:[e.jsxs("span",{className:"mesh-nav-focus-chip-label",children:["focused · ",j-x,"/",j]}),e.jsx("span",{className:"mesh-nav-focus-chip-clear","aria-hidden":!0,children:"×"})]})]}),e.jsxs("div",{className:"mesh-nav-tree",children:[k("this host",v.get("this")??[]),k("peers",v.get("peer")??[]),k("tailnet",v.get("tailnet")??[])]})]})}export{We as MeshLeft};
1
+ import{j as e,r as S}from"./index-BI9AljSD.js";import{u as O,g as q,i as P,j as G,k as C,l as H,c as I,r as w}from"./mesh-view-store-CiET-yN8.js";import{u as Q}from"./Provider-Bu-C8Hxc.js";import{n as F,a as V}from"./colors-BtO5_zlx.js";import{b as D}from"./mesh-buckets-6y3ZIibI.js";import{u as J,h as U}from"./use-fleet-active-asks-BtgNnRgK.js";import{R as u}from"./RailRow-ClMmtaIE.js";import{o as W}from"./openAgent-Dbv5wfuL.js";/* empty css */import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./mesh-roster-Bc7T4b7z.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./openContent-C6XO6kr5.js";function X({value:o,onChange:c,placeholder:i="Search…",onKeyDown:l}){return e.jsx("input",{type:"search",className:"fleet-search",placeholder:i,value:o,onChange:h=>c(h.target.value),onKeyDown:l,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"})}const Y=["needs_attention","in_turn","in_flight","callable","blocked"],Z={in_turn:"in turn",in_flight:"in flight",needs_attention:"needs attention",callable:"callable",blocked:"blocked"},ee={in_turn:"working",in_flight:"working",needs_attention:"working",callable:"available",blocked:"offline"};function te({active:o,onToggle:c}){return e.jsx("div",{className:"fleet-pills",role:"group","aria-label":"State filters",children:Y.map(i=>{const l=o.has(i);return e.jsx("button",{type:"button",className:`fleet-pill fleet-pill--${ee[i]}${l?" fleet-pill--on":""}`,onClick:()=>c(i),"aria-pressed":l,children:Z[i]},i)})})}const T=10;function ne(o){return F(o.state)}function _(o){return o.updatedAt??o.createdAt??0}function We(){const{agents:o,navigate:c}=Q(),{meshSnapshot:i,selectedId:l,selectedType:h,query:d,agentStateFilters:g,hiddenMachineIds:f,treeFullMachineIds:b}=O(),L=J(),p=S.useMemo(()=>i?D(o,i):[],[o,i]),y=S.useMemo(()=>{const n=d.trim().toLowerCase();return p.filter(s=>!f.has(s.machineId)).map(s=>{const t=s.agents.filter(r=>g.has(ne(r))?n?`${r.name??""} ${r.project??""} ${r.branch??""} ${r.harness??""}`.toLowerCase().includes(n):!0:!1);return{...s,agents:t}})},[p,d,g,f]),v=S.useMemo(()=>{const n=new Map([["this",[]],["peer",[]],["tailnet",[]]]);for(const s of y){const t=s.reachability==="this"?"this":s.reachability==="peer"?"peer":"tailnet";n.get(t)?.push(s)}return n},[y]);if(!i)return e.jsx("div",{className:"ctx-panel ctx-panel--empty",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading mesh…"})})});const $=n=>{const s=p.map(t=>t.machineId);H(n,s),I(n,"node"),w(n)},x=f.size,j=p.length,E=n=>{I(n.id,"agent");const s=n.authorityNodeId??n.homeNodeId;s&&w(s),W(c,n,{returnTo:{view:"mesh"}})},k=(n,s)=>s.length===0?null:e.jsxs("section",{className:"mesh-nav-group",children:[e.jsx("div",{className:"mesh-nav-group-label",children:n}),s.map(t=>{const r=b.has(t.machineId),m=[...t.agents].sort((a,A)=>_(A)-_(a)),M=r?m:m.slice(0,T),N=m.length-M.length,B=l===t.machineId&&h==="node",R=t.agents.filter(a=>V(a.state)).length,z=t.agents.length>0?`${R}/${t.agents.length}`:t.online?"—":"not ready";return e.jsxs("div",{className:"mesh-nav-machine",children:[e.jsx(u,{name:t.machineLabel,meta:z,tone:"neutral",active:B,onClick:()=>$(t.machineId),title:`Focus ${t.machineLabel} on the map`}),M.map(a=>{const A=l===a.id&&h==="agent",K=U(L,a.id);return e.jsx(u,{name:a.name,tone:F(a.state),depth:1,active:A,unread:K,onClick:()=>E(a),title:a.name},a.id)}),!r&&N>0&&e.jsx(u,{name:`see ${N} more`,depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show all agents on this machine"}),r&&m.length>T&&e.jsx(u,{name:"see less",depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show recent agents only"})]},t.machineId)})]},n);return e.jsxs("div",{className:"ctx-panel mesh-nav",children:[e.jsxs("div",{className:"mesh-nav-head",children:[e.jsx(X,{value:d,onChange:q,placeholder:"Find machines or agents…"}),e.jsx(te,{active:g,onToggle:P}),x>0&&x<j&&e.jsxs("button",{type:"button",className:"mesh-nav-focus-chip",onClick:G,title:"Show all machines",children:[e.jsxs("span",{className:"mesh-nav-focus-chip-label",children:["focused · ",j-x,"/",j]}),e.jsx("span",{className:"mesh-nav-focus-chip-clear","aria-hidden":!0,children:"×"})]})]}),e.jsxs("div",{className:"mesh-nav-tree",children:[k("this host",v.get("this")??[]),k("peers",v.get("peer")??[]),k("tailnet",v.get("tailnet")??[])]})]})}export{We as MeshLeft};
@@ -1 +1 @@
1
- import{r as a,j as s}from"./index-DvLtl7rV.js";/* empty css */import{a as r}from"./api-Co9aQ2Jw.js";import{u as h}from"./sse-CD9MMUxl.js";import{u as v}from"./Provider-CtXJeLrP.js";import{S as u}from"./server-Bzj7lPIx.js";import{L as j}from"./layers-CSsg3JVP.js";import{S as b}from"./sparkles-CETYrxGA.js";import{A as N}from"./activity-DcrMApUY.js";import{C as f}from"./cpu-DrqejfkB.js";import{G as g,D as k}from"./gauge-hU--hKVP.js";import{T as y}from"./terminal-9GRS_Qdc.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";function vs(){const{agents:l,navigate:t}=v(),[m,p]=a.useState(null),[n,x]=a.useState([]),i=a.useCallback(async()=>{const[e,o]=await Promise.allSettled([r("/api/tail/discover"),r("/api/service-budgets")]);e.status==="fulfilled"&&p(e.value),o.status==="fulfilled"&&o.value?.gauges&&x(o.value.gauges)},[]);a.useEffect(()=>{i()},[i]),h(()=>{i()});const d=m?.processes??[],c=n.length>0?Math.round(Math.max(...n.map(e=>e.fill??0))*100):100;return s.jsxs("div",{className:"s-advisor-left-nav",children:[s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(u,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"HOST TELEMETRY"})]}),s.jsxs("div",{className:"s-ctx-stat-list",children:[s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Agents Connected"}),s.jsx("span",{className:"chip chip--sm chip--mono",children:l.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Active Processes"}),s.jsx("span",{className:"chip chip--sm chip--working chip--mono",children:d.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Peak Quota"}),s.jsxs("span",{className:`chip chip--sm chip--mono ${c>80?"chip--warning":"chip--working"}`,children:[c,"%"]})]})]})]}),s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(j,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"OPERATIONS SURFACES"})]}),s.jsxs("div",{className:"s-ctx-nav-list",children:[s.jsxs("button",{type:"button",className:"s-ctx-nav-btn s-ctx-nav-btn--active",onClick:()=>t({view:"ops",mode:"advisor"}),children:[s.jsx(b,{size:13}),s.jsx("span",{children:"Host Advisor"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"mission"}),children:[s.jsx(N,{size:13}),s.jsx("span",{children:"Mission Control"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"lanes"}),children:[s.jsx(f,{size:13}),s.jsx("span",{children:"Agent Lanes"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"harnesses"}),children:[s.jsx(g,{size:13}),s.jsx("span",{children:"Agent Providers & Quotas"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"terminal"}),children:[s.jsx(y,{size:13}),s.jsx("span",{children:"Terminal Relays"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"search"}),children:[s.jsx(k,{size:13}),s.jsx("span",{children:"Knowledge Indexer"})]})]})]})]})}export{vs as OpsAdvisorLeft};
1
+ import{r as a,j as s}from"./index-BI9AljSD.js";/* empty css */import{a as r}from"./api-Co9aQ2Jw.js";import{u as h}from"./sse-DDHEHUgz.js";import{u as v}from"./Provider-Bu-C8Hxc.js";import{S as u}from"./server-nWqndnxu.js";import{L as j}from"./layers-Dz2dKOnU.js";import{S as b}from"./sparkles-Cf8gin88.js";import{A as N}from"./activity-CqZafWfx.js";import{C as f}from"./cpu-DuD3RFX5.js";import{G as g,D as k}from"./gauge-BVEknshP.js";import{T as y}from"./terminal-C3YRPfyz.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";function vs(){const{agents:l,navigate:t}=v(),[m,p]=a.useState(null),[n,x]=a.useState([]),i=a.useCallback(async()=>{const[e,o]=await Promise.allSettled([r("/api/tail/discover"),r("/api/service-budgets")]);e.status==="fulfilled"&&p(e.value),o.status==="fulfilled"&&o.value?.gauges&&x(o.value.gauges)},[]);a.useEffect(()=>{i()},[i]),h(()=>{i()});const d=m?.processes??[],c=n.length>0?Math.round(Math.max(...n.map(e=>e.fill??0))*100):100;return s.jsxs("div",{className:"s-advisor-left-nav",children:[s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(u,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"HOST TELEMETRY"})]}),s.jsxs("div",{className:"s-ctx-stat-list",children:[s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Agents Connected"}),s.jsx("span",{className:"chip chip--sm chip--mono",children:l.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Active Processes"}),s.jsx("span",{className:"chip chip--sm chip--working chip--mono",children:d.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Peak Quota"}),s.jsxs("span",{className:`chip chip--sm chip--mono ${c>80?"chip--warning":"chip--working"}`,children:[c,"%"]})]})]})]}),s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(j,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"OPERATIONS SURFACES"})]}),s.jsxs("div",{className:"s-ctx-nav-list",children:[s.jsxs("button",{type:"button",className:"s-ctx-nav-btn s-ctx-nav-btn--active",onClick:()=>t({view:"ops",mode:"advisor"}),children:[s.jsx(b,{size:13}),s.jsx("span",{children:"Host Advisor"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"mission"}),children:[s.jsx(N,{size:13}),s.jsx("span",{children:"Mission Control"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"lanes"}),children:[s.jsx(f,{size:13}),s.jsx("span",{children:"Agent Lanes"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"harnesses"}),children:[s.jsx(g,{size:13}),s.jsx("span",{children:"Agent Providers & Quotas"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"terminal"}),children:[s.jsx(y,{size:13}),s.jsx("span",{children:"Terminal Relays"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"search"}),children:[s.jsx(k,{size:13}),s.jsx("span",{children:"Knowledge Indexer"})]})]})]})]})}export{vs as OpsAdvisorLeft};
@@ -1 +1 @@
1
- import{r,j as o}from"./index-DvLtl7rV.js";/* empty css */import{a as j}from"./api-Co9aQ2Jw.js";import{a as v}from"./sse-CD9MMUxl.js";import{u as N}from"./Provider-CtXJeLrP.js";import{u as g}from"./use-fleet-active-asks-DAspZQjE.js";import{i as w}from"./colors-BtO5_zlx.js";import{R as a}from"./RailRow-CEH2MFBw.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";const $=new Set(["message.posted","conversation.upserted","agent.updated"]);function k(e){const n=x(e.cwd),m=x(e.projectRoot);return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??n??m??"local"}function R(e){return e.project??e.role??e.agentClass??"Unassigned"}function x(e){if(!e)return null;const n=e.split("/").filter(Boolean);return n[n.length-1]??null}function dt(){const{agents:e,navigate:n}=N(),[m,f]=r.useState([]),p=g(),c=r.useCallback(async()=>{const t=await j("/api/conversations").catch(()=>[]);f(t)},[]);r.useEffect(()=>{c()},[c]),v(t=>$.has(t.kind),()=>{c()});const h=r.useMemo(()=>e.filter(t=>w(t.state)).length,[e]),l=r.useMemo(()=>{let t=0;for(const s of p.asks)(s.status==="failed"||s.status==="needs_attention")&&(t+=1);return t},[p]),u=r.useMemo(()=>{const t=new Map;for(const s of e){const i=R(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]),d=r.useMemo(()=>{const t=new Map;for(const s of e){const i=k(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]);return o.jsxs("div",{className:"ctx-panel",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Agents"}),o.jsx(a,{name:"Overview",meta:`${e.length}`,tone:"neutral",onClick:()=>n({view:"inbox"})}),o.jsx(a,{name:"Agents",meta:`${h}`,tone:"callable",active:!0,onClick:()=>n({view:"ops",mode:"agents"})}),o.jsx(a,{name:"Sessions",meta:`${m.length}`,tone:"neutral",onClick:()=>n({view:"sessions"})}),o.jsx(a,{name:"Alerts",meta:`${l}`,tone:l>0?"in_turn":"neutral",unread:l>0,onClick:()=>n({view:"activity"})})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Projects"}),u.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No projects"}):u.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Machines"}),d.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No machines"}):d.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]})]})}export{dt as OpsAgentsLeft};
1
+ import{r,j as o}from"./index-BI9AljSD.js";/* empty css */import{a as j}from"./api-Co9aQ2Jw.js";import{a as v}from"./sse-DDHEHUgz.js";import{u as N}from"./Provider-Bu-C8Hxc.js";import{u as g}from"./use-fleet-active-asks-BtgNnRgK.js";import{i as w}from"./colors-BtO5_zlx.js";import{R as a}from"./RailRow-ClMmtaIE.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";const $=new Set(["message.posted","conversation.upserted","agent.updated"]);function k(e){const n=x(e.cwd),m=x(e.projectRoot);return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??n??m??"local"}function R(e){return e.project??e.role??e.agentClass??"Unassigned"}function x(e){if(!e)return null;const n=e.split("/").filter(Boolean);return n[n.length-1]??null}function dt(){const{agents:e,navigate:n}=N(),[m,f]=r.useState([]),p=g(),c=r.useCallback(async()=>{const t=await j("/api/conversations").catch(()=>[]);f(t)},[]);r.useEffect(()=>{c()},[c]),v(t=>$.has(t.kind),()=>{c()});const h=r.useMemo(()=>e.filter(t=>w(t.state)).length,[e]),l=r.useMemo(()=>{let t=0;for(const s of p.asks)(s.status==="failed"||s.status==="needs_attention")&&(t+=1);return t},[p]),u=r.useMemo(()=>{const t=new Map;for(const s of e){const i=R(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]),d=r.useMemo(()=>{const t=new Map;for(const s of e){const i=k(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]);return o.jsxs("div",{className:"ctx-panel",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Agents"}),o.jsx(a,{name:"Overview",meta:`${e.length}`,tone:"neutral",onClick:()=>n({view:"inbox"})}),o.jsx(a,{name:"Agents",meta:`${h}`,tone:"callable",active:!0,onClick:()=>n({view:"ops",mode:"agents"})}),o.jsx(a,{name:"Sessions",meta:`${m.length}`,tone:"neutral",onClick:()=>n({view:"sessions"})}),o.jsx(a,{name:"Alerts",meta:`${l}`,tone:l>0?"in_turn":"neutral",unread:l>0,onClick:()=>n({view:"activity"})})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Projects"}),u.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No projects"}):u.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Machines"}),d.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No machines"}):d.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]})]})}export{dt as OpsAgentsLeft};
@@ -1 +1 @@
1
- import{r,j as o}from"./index-DvLtl7rV.js";/* empty css */import{a as h}from"./api-Co9aQ2Jw.js";import{n as f}from"./colors-BtO5_zlx.js";import{r as g,a as j}from"./operator-attention-RqieiSY8.js";import{u as N}from"./sse-CD9MMUxl.js";import{t as c}from"./time-Dhsh_2EG.js";import{u as A}from"./Provider-CtXJeLrP.js";import{o as l}from"./openContent-C6XO6kr5.js";import{R as m}from"./RailRow-CEH2MFBw.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";const w=[{name:"Control",route:{view:"ops",mode:"mission"},active:e=>e.view==="ops"&&(e.mode===void 0||e.mode==="mission")},{name:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{name:"Mesh",route:{view:"mesh"},active:e=>e.view==="mesh"},{name:"Tail",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{name:"Runtime",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop"}];function dt(){const{navigate:e,route:n}=A(),[p,d]=r.useState(null),s=r.useCallback(async()=>{const t=await h("/api/fleet").catch(()=>null);d(t)},[]);r.useEffect(()=>{s()},[s]),N(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&s()});const i=p?.needsAttention??[],a=(p?.activeAsks??[]).filter(t=>t.status!=="needs_attention"),u=t=>{l(e,g(t),{returnTo:n})},v=t=>{l(e,j(t),{returnTo:n})};return o.jsxs("div",{className:"ctx-panel ctx-panel--ops",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Surfaces"}),w.map(t=>o.jsx(m,{name:t.name,tone:"neutral",active:t.active(n),onClick:()=>e(t.route)},t.name))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Needs you",i.length>0&&o.jsx("span",{className:"ctx-panel-count",children:i.length})]}),i.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"All clear"}):i.slice(0,4).map(t=>{const x=t.agentName??t.agentId??"operator";return o.jsx(m,{name:t.title,meta:c(t.updatedAt),tone:"in_turn",unread:!0,title:`${x} · ${t.kind}`,onClick:()=>u(t)},t.recordId)})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Active",a.length>0&&o.jsx("span",{className:"ctx-panel-count",children:a.length})]}),a.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):a.slice(0,10).map(t=>o.jsx(m,{name:t.task,meta:c(t.updatedAt),tone:f(t.agentState),title:`${t.agentName??t.agentId} · ${t.statusLabel}`,onClick:()=>v(t)},t.invocationId))]})]})}export{dt as OpsDefaultLeft};
1
+ import{r,j as o}from"./index-BI9AljSD.js";/* empty css */import{a as h}from"./api-Co9aQ2Jw.js";import{n as f}from"./colors-BtO5_zlx.js";import{r as g,a as j}from"./operator-attention-RqieiSY8.js";import{u as N}from"./sse-DDHEHUgz.js";import{t as c}from"./time-Dhsh_2EG.js";import{u as A}from"./Provider-Bu-C8Hxc.js";import{o as l}from"./openContent-C6XO6kr5.js";import{R as m}from"./RailRow-ClMmtaIE.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";const w=[{name:"Control",route:{view:"ops",mode:"mission"},active:e=>e.view==="ops"&&(e.mode===void 0||e.mode==="mission")},{name:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{name:"Mesh",route:{view:"mesh"},active:e=>e.view==="mesh"},{name:"Tail",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{name:"Runtime",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop"}];function dt(){const{navigate:e,route:n}=A(),[p,d]=r.useState(null),s=r.useCallback(async()=>{const t=await h("/api/fleet").catch(()=>null);d(t)},[]);r.useEffect(()=>{s()},[s]),N(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&s()});const i=p?.needsAttention??[],a=(p?.activeAsks??[]).filter(t=>t.status!=="needs_attention"),u=t=>{l(e,g(t),{returnTo:n})},v=t=>{l(e,j(t),{returnTo:n})};return o.jsxs("div",{className:"ctx-panel ctx-panel--ops",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Surfaces"}),w.map(t=>o.jsx(m,{name:t.name,tone:"neutral",active:t.active(n),onClick:()=>e(t.route)},t.name))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Needs you",i.length>0&&o.jsx("span",{className:"ctx-panel-count",children:i.length})]}),i.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"All clear"}):i.slice(0,4).map(t=>{const x=t.agentName??t.agentId??"operator";return o.jsx(m,{name:t.title,meta:c(t.updatedAt),tone:"in_turn",unread:!0,title:`${x} · ${t.kind}`,onClick:()=>u(t)},t.recordId)})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Active",a.length>0&&o.jsx("span",{className:"ctx-panel-count",children:a.length})]}),a.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):a.slice(0,10).map(t=>o.jsx(m,{name:t.task,meta:c(t.updatedAt),tone:f(t.agentState),title:`${t.agentName??t.agentId} · ${t.statusLabel}`,onClick:()=>v(t)},t.invocationId))]})]})}export{dt as OpsDefaultLeft};
@@ -1 +1 @@
1
- import{r as f,j as t}from"./index-DvLtl7rV.js";/* empty css */import{t as x}from"./time-Dhsh_2EG.js";import{u as b}from"./Provider-CtXJeLrP.js";import{R as g}from"./RailRow-CEH2MFBw.js";import{S as v}from"./SpriteAvatar-z5hHesx9.js";import{n as L}from"./colors-BtO5_zlx.js";import{b as h,c as j,l as n,d as N}from"./agent-lanes-model-DXqjs0OK.js";import{u as _,b as A,g as p}from"./lane-roster-store-DOdI1O13.js";import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./AgentAvatar-6-KBVKUu.js";import"./CrewAvatar-BwXjyg8N.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";function c(s,e,a){const i=`[data-lane-id="${s.replace(/["\\]/g,"\\$&")}"]`,r=typeof document<"u"?document.querySelector(i):null;if(r){r.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),r.focus();return}e&&a({view:"agents-v2",agentId:e,tab:"profile"})}function R(s){return s.filter(e=>!h(e)&&j(e)).sort((e,a)=>{const i=(a.updatedAt??0)-(e.updatedAt??0);return i!==0?i:n(e,"scout").localeCompare(n(a,"scout"))}).map(e=>({id:e.id,label:n(e,"scout"),statusLabel:N(e,"scout"),tone:L(e.state,e),agentId:e.id,updatedAt:e.updatedAt??void 0}))}function ho(){const{agents:s,navigate:e}=b(),a=_(),i=A(),r=f.useMemo(()=>R(s),[s]),l=a??r,d=l.some(o=>o.floor);return t.jsx("div",{className:"ctx-panel ctx-panel--ops",children:t.jsxs("section",{className:"ctx-panel-section",children:[t.jsxs("div",{className:"ctx-panel-section-label",children:[d?"Fleet":"Lanes",l.length>0&&t.jsx("span",{className:"ctx-panel-count",children:l.length})]}),l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No active lanes"}):l.map(o=>o.floor?t.jsxs("button",{type:"button",className:`agent-floor__ledger-row is-rail${i===o.id?" is-focus":""}`,onClick:()=>{const m=p();m?m.onSelect(o.id):c(o.id,o.agentId,e)},onPointerEnter:()=>p()?.onHover(o.id),onPointerLeave:()=>p()?.onHover(null),children:[t.jsxs("span",{className:"agent-floor__ledger-id",children:[t.jsx(v,{name:o.label,size:16,tile:!0}),t.jsx("span",{className:"agent-floor__ledger-name",children:o.label}),t.jsx("span",{className:`agent-floor__card-dot${o.floor.live?" is-live":""}`})]}),t.jsx("span",{className:"agent-floor__ledger-strip",children:o.floor.strip.slice(-6).map((m,u)=>t.jsx("span",{className:`agent-floor__ledger-cell is-${m}`},u))})]},o.id):t.jsx(g,{name:o.label,sub:o.statusLabel||void 0,meta:o.updatedAt?x(o.updatedAt):void 0,tone:o.tone,title:o.statusLabel,onClick:()=>c(o.id,o.agentId,e)},o.id))]})})}export{ho as OpsLanesLeft};
1
+ import{r as f,j as t}from"./index-BI9AljSD.js";/* empty css */import{t as x}from"./time-Dhsh_2EG.js";import{u as b}from"./Provider-Bu-C8Hxc.js";import{R as g}from"./RailRow-ClMmtaIE.js";import{S as v}from"./SpriteAvatar-56DTXxSV.js";import{n as L}from"./colors-BtO5_zlx.js";import{b as h,c as j,l as n,d as N}from"./agent-lanes-model-DXqjs0OK.js";import{u as _,b as A,g as p}from"./lane-roster-store-Q7pcblY5.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentAvatar-B7c0egdP.js";import"./CrewAvatar-CXJHLNVM.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";function c(s,e,a){const i=`[data-lane-id="${s.replace(/["\\]/g,"\\$&")}"]`,r=typeof document<"u"?document.querySelector(i):null;if(r){r.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),r.focus();return}e&&a({view:"agents-v2",agentId:e,tab:"profile"})}function R(s){return s.filter(e=>!h(e)&&j(e)).sort((e,a)=>{const i=(a.updatedAt??0)-(e.updatedAt??0);return i!==0?i:n(e,"scout").localeCompare(n(a,"scout"))}).map(e=>({id:e.id,label:n(e,"scout"),statusLabel:N(e,"scout"),tone:L(e.state,e),agentId:e.id,updatedAt:e.updatedAt??void 0}))}function ho(){const{agents:s,navigate:e}=b(),a=_(),i=A(),r=f.useMemo(()=>R(s),[s]),l=a??r,d=l.some(o=>o.floor);return t.jsx("div",{className:"ctx-panel ctx-panel--ops",children:t.jsxs("section",{className:"ctx-panel-section",children:[t.jsxs("div",{className:"ctx-panel-section-label",children:[d?"Fleet":"Lanes",l.length>0&&t.jsx("span",{className:"ctx-panel-count",children:l.length})]}),l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No active lanes"}):l.map(o=>o.floor?t.jsxs("button",{type:"button",className:`agent-floor__ledger-row is-rail${i===o.id?" is-focus":""}`,onClick:()=>{const m=p();m?m.onSelect(o.id):c(o.id,o.agentId,e)},onPointerEnter:()=>p()?.onHover(o.id),onPointerLeave:()=>p()?.onHover(null),children:[t.jsxs("span",{className:"agent-floor__ledger-id",children:[t.jsx(v,{name:o.label,size:16,tile:!0}),t.jsx("span",{className:"agent-floor__ledger-name",children:o.label}),t.jsx("span",{className:`agent-floor__card-dot${o.floor.live?" is-live":""}`})]}),t.jsx("span",{className:"agent-floor__ledger-strip",children:o.floor.strip.slice(-6).map((m,u)=>t.jsx("span",{className:`agent-floor__ledger-cell is-${m}`},u))})]},o.id):t.jsx(g,{name:o.label,sub:o.statusLabel||void 0,meta:o.updatedAt?x(o.updatedAt):void 0,tone:o.tone,title:o.statusLabel,onClick:()=>c(o.id,o.agentId,e)},o.id))]})})}export{ho as OpsLanesLeft};
@@ -1 +1 @@
1
- import{r as c,j as s}from"./index-DvLtl7rV.js";/* empty css */import{n as S}from"./colors-BtO5_zlx.js";import{u as M,s as A,a as h,b as I,M as C,c as k,d as w,e as F,r as R,t as E}from"./mission-control-store-nDLdUZPA.js";import{u as K}from"./Provider-CtXJeLrP.js";import{a as T,b as q,r as B,m as D}from"./keyboard-nav-BLYDhL3Z.js";import{MissionLeftAgentRow as L}from"./MissionLeftAgentRow-KPdk9rSa.js";import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./page-status-E5jnk48p.js";import"./RailRow-CEH2MFBw.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";function we(){const{navigate:r}=K(),i=M(),o=i.visibleAgents,m=c.useRef(null),p=c.useRef(null),v=T(),x=D(()=>m.current);q(c.useCallback(()=>p.current,[]));const[d,y]=c.useState(null),u=i.activityFilter==="active",a=i.selectedIds.length,j=e=>{y(t=>t===e?null:e)},N=()=>{if(a===0)return;const t=o.filter(l=>i.selectedIds.includes(l.id)).map(l=>l.handle??l.name).filter(Boolean).join("|");t&&r({view:"ops",mode:"tail",tailQuery:t})};return s.jsxs("div",{className:"ctx-panel ml-panel",children:[s.jsxs("div",{className:"ml-section",children:[s.jsx("div",{className:"ml-section-label",children:"Source"}),s.jsx("div",{className:"ml-chips ml-chips--primary",children:["all","scout","native"].map(e=>s.jsx("button",{type:"button",className:["ml-chip",i.sourceFilter===e&&"ml-chip--active"].filter(Boolean).join(" "),onClick:()=>A(e),children:e==="all"?"All":e==="scout"?"Scout":"Native"},e))})]}),s.jsx("div",{className:"ctx-panel-search",children:s.jsx("input",{ref:p,type:"text",className:"ctx-panel-search-input",placeholder:"Filter agents… (press /)",value:i.query,onChange:e=>h(e.target.value),onKeyDown:e=>{x(e),e.key==="Escape"&&i.query&&h("")}})}),s.jsx("div",{className:"ml-section ml-section--secondary",children:s.jsxs("div",{className:"ml-chips ml-chips--secondary",children:[["active","live","all"].map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityFilter===e&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>I(e),children:e==="active"?"Active":e==="live"?"Live":"Any"},e)),u&&s.jsx("span",{className:"ml-divider","aria-hidden":!0}),u&&C.map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityWindowMs===e.value&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>k(e.value),children:e.label},e.value))]})}),s.jsxs("div",{className:"ml-section ml-section--grouping",children:[s.jsx("div",{className:"ml-section-label",children:"Order by"}),s.jsx("div",{className:"ml-chips ml-chips--grouping",children:[["activity","Activity"],["workspace","Project"],["harness","Harness"],["state","Status"],["source","Source"]].map(([e,t])=>s.jsx("button",{type:"button",className:["ml-chip","ml-chip--group",i.groupMode===e&&"ml-chip--group-active"].filter(Boolean).join(" "),"aria-pressed":i.groupMode===e,onClick:()=>w(e),children:t},e))})]}),a>0?s.jsxs("div",{className:"ml-selection",children:[s.jsxs("span",{className:"ml-selection-label",children:[a," selected"]}),s.jsxs("div",{className:"ml-selection-actions",children:[s.jsx("button",{type:"button",className:"ml-selection-btn ml-selection-btn--primary",onClick:N,children:"Tail ↗"}),s.jsx("button",{type:"button",className:"ml-selection-btn",onClick:F,children:"Clear"})]})]}):s.jsxs("div",{className:"ml-count",children:[o.length," visible",s.jsx("span",{className:"ml-count-hint",children:"⌘-click · ⌘A all"})]}),s.jsx("div",{ref:m,className:"ctx-panel-list ctx-panel-list--scroll",onKeyDown:v,children:o.length===0?s.jsx("div",{className:"ctx-panel-empty",children:i.query?"No match":"Nothing visible"}):o.map((e,t)=>{const l=e.id===d,b=o.some(n=>n.id===d),g=i.selectedIds.includes(e.id),f=S(e.state);return s.jsx(L,{agent:e,state:f,isExpanded:l,isSelected:g,tabIndex:B(l,b,t===0),onToggle:n=>{n.metaKey||n.ctrlKey||n.shiftKey?E(e.id):j(e.id)},onReveal:()=>R(e.id),onOpen:()=>r({view:"agents-v2",agentId:e.id})},e.id)})})]})}export{we as OpsMissionLeft};
1
+ import{r as c,j as s}from"./index-BI9AljSD.js";/* empty css */import{n as S}from"./colors-BtO5_zlx.js";import{u as M,s as A,a as h,b as I,M as C,c as k,d as w,e as F,r as R,t as E}from"./mission-control-store-DDAgWKUl.js";import{u as K}from"./Provider-Bu-C8Hxc.js";import{a as T,b as q,r as B,m as D}from"./keyboard-nav-e6yGeorb.js";import{MissionLeftAgentRow as L}from"./MissionLeftAgentRow-B0QG7Gys.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-C_1op4dH.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./time-Dhsh_2EG.js";import"./index-DfsTyYDx.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./page-status-Crtgjbq3.js";import"./RailRow-ClMmtaIE.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";function we(){const{navigate:r}=K(),i=M(),o=i.visibleAgents,m=c.useRef(null),p=c.useRef(null),v=T(),x=D(()=>m.current);q(c.useCallback(()=>p.current,[]));const[d,y]=c.useState(null),u=i.activityFilter==="active",a=i.selectedIds.length,j=e=>{y(t=>t===e?null:e)},N=()=>{if(a===0)return;const t=o.filter(l=>i.selectedIds.includes(l.id)).map(l=>l.handle??l.name).filter(Boolean).join("|");t&&r({view:"ops",mode:"tail",tailQuery:t})};return s.jsxs("div",{className:"ctx-panel ml-panel",children:[s.jsxs("div",{className:"ml-section",children:[s.jsx("div",{className:"ml-section-label",children:"Source"}),s.jsx("div",{className:"ml-chips ml-chips--primary",children:["all","scout","native"].map(e=>s.jsx("button",{type:"button",className:["ml-chip",i.sourceFilter===e&&"ml-chip--active"].filter(Boolean).join(" "),onClick:()=>A(e),children:e==="all"?"All":e==="scout"?"Scout":"Native"},e))})]}),s.jsx("div",{className:"ctx-panel-search",children:s.jsx("input",{ref:p,type:"text",className:"ctx-panel-search-input",placeholder:"Filter agents… (press /)",value:i.query,onChange:e=>h(e.target.value),onKeyDown:e=>{x(e),e.key==="Escape"&&i.query&&h("")}})}),s.jsx("div",{className:"ml-section ml-section--secondary",children:s.jsxs("div",{className:"ml-chips ml-chips--secondary",children:[["active","live","all"].map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityFilter===e&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>I(e),children:e==="active"?"Active":e==="live"?"Live":"Any"},e)),u&&s.jsx("span",{className:"ml-divider","aria-hidden":!0}),u&&C.map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityWindowMs===e.value&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>k(e.value),children:e.label},e.value))]})}),s.jsxs("div",{className:"ml-section ml-section--grouping",children:[s.jsx("div",{className:"ml-section-label",children:"Order by"}),s.jsx("div",{className:"ml-chips ml-chips--grouping",children:[["activity","Activity"],["workspace","Project"],["harness","Harness"],["state","Status"],["source","Source"]].map(([e,t])=>s.jsx("button",{type:"button",className:["ml-chip","ml-chip--group",i.groupMode===e&&"ml-chip--group-active"].filter(Boolean).join(" "),"aria-pressed":i.groupMode===e,onClick:()=>w(e),children:t},e))})]}),a>0?s.jsxs("div",{className:"ml-selection",children:[s.jsxs("span",{className:"ml-selection-label",children:[a," selected"]}),s.jsxs("div",{className:"ml-selection-actions",children:[s.jsx("button",{type:"button",className:"ml-selection-btn ml-selection-btn--primary",onClick:N,children:"Tail ↗"}),s.jsx("button",{type:"button",className:"ml-selection-btn",onClick:F,children:"Clear"})]})]}):s.jsxs("div",{className:"ml-count",children:[o.length," visible",s.jsx("span",{className:"ml-count-hint",children:"⌘-click · ⌘A all"})]}),s.jsx("div",{ref:m,className:"ctx-panel-list ctx-panel-list--scroll",onKeyDown:v,children:o.length===0?s.jsx("div",{className:"ctx-panel-empty",children:i.query?"No match":"Nothing visible"}):o.map((e,t)=>{const l=e.id===d,b=o.some(n=>n.id===d),g=i.selectedIds.includes(e.id),f=S(e.state);return s.jsx(L,{agent:e,state:f,isExpanded:l,isSelected:g,tabIndex:B(l,b,t===0),onToggle:n=>{n.metaKey||n.ctrlKey||n.shiftKey?E(e.id):j(e.id)},onReveal:()=>R(e.id),onOpen:()=>r({view:"agents-v2",agentId:e.id})},e.id)})})]})}export{we as OpsMissionLeft};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./index-BI9AljSD.js";/* empty css */import{t as O}from"./time-Dhsh_2EG.js";import{u as H,a as $}from"./Provider-Bu-C8Hxc.js";import{S as G}from"./SpriteAvatar-56DTXxSV.js";import{H as R}from"./HarnessMark-DAaWPiT_.js";import{AgentSessions as J}from"./AgentSessions-BePq5Lgc.js";import{a as T}from"./api-Co9aQ2Jw.js";import{g as q,p as V,b as _}from"./agents-project-model-UYiamtrU.js";import{c as Q,e as X,f as Y,g as Z}from"./NewChatComposer-C_1op4dH.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./createLucideIcon-DthwWQIg.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./file-text--hfhwZH1.js";import"./x-DfRJbqrh.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./text-Faa3ZStB.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";const ee=30*6e4,D=a=>a==="pi"?"grok":a,K=a=>a?a.replace(/^claude-/,"").replace(/-\d{8}$/,""):null;function qe({agents:a,fleet:d,sessionByAgentId:c,sessions:A,discovery:k,loading:C,navigate:N,selectedAgentId:S}){const{route:u,reload:p,openContextCapture:j}=H(),m=u.view==="agents-v2"?u.projectSlug:void 0,v=l.useMemo(()=>{const n=new Map;for(const b of d?.activeAsks??[]){const i=n.get(b.agentId)??[];i.push(b),n.set(b.agentId,i)}return n},[d?.activeAsks]),f=l.useMemo(()=>a.map(n=>Q(n,c.get(n.id)??null,v.get(n.id)??[])),[v,a,c]),g=l.useMemo(()=>X(k,Date.now()),[k]),h=l.useMemo(()=>Y(f,A,g),[f,A,g]),w=l.useMemo(()=>h.find(n=>n.slice.slug===m)??h[0]??null,[h,m]),r=w?.slice.slug,M={selectAgent:n=>N({view:"agents-v2",agentId:n.agent.id,...r?{projectSlug:r}:{}}),openAgentPage:n=>N({view:"agents-v2",agentId:n.agent.id,tab:"profile"}),startSession:n=>j({intent:"new-task",projectPath:n.agent.projectRoot??n.agent.cwd??void 0}),openSession:n=>N(n),configureAgent:n=>N({view:"agents-v2",agentId:n.agent.id,tab:"config"}),restartAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/config`,{method:"POST",body:JSON.stringify({restart:!0})}).catch(()=>{})},stopAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/interrupt`,{method:"POST",body:JSON.stringify({})}).catch(()=>{})},archiveAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/archive`,{method:"POST",body:JSON.stringify({archived:!0})}).then(()=>p()).catch(()=>{})}};return!w&&C?e.jsx("div",{className:"s-aproj","aria-busy":"true",children:e.jsx("div",{className:"ap-loading",role:"status","aria-label":"Loading agents",children:Array.from({length:7},(n,b)=>e.jsx("span",{"aria-hidden":"true"},b))})}):w?e.jsx("div",{className:"s-aproj",children:e.jsx(te,{project:w,selectedAgentId:S,gestures:M,sessions:A})}):e.jsx("div",{className:"s-aproj",children:e.jsx("div",{className:"ap-empty",children:"No agents discovered yet — they appear here as harnesses register and work."})})}function se(){return e.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.2",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"m10.5 10.5 3 3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function ae({tone:a}){return a==="idle"?null:e.jsx("span",{className:"ap-dot","data-tone":a,"aria-hidden":!0})}function ne({g:a,gestures:d,sessions:c,selected:A,cursor:k,rowRef:C}){const N=$(),S=Date.now()-a.lastActivityAt<ee,u=a.needs?"needs":S?"live":"idle",p=a.nodes[0];if(!p)return null;const j=p.row.agent.handle?.trim()||a.name,m=a.branches.length>0?a.branches:["main"],v=m.length>1,f=v?`${m.length} branches`:m[0],g=[...new Set(a.nodes.map(r=>r.row.agent.model).filter(r=>!!r))],h=g.length>1,w=[{kind:"action",label:"Configure…",onSelect:()=>d.configureAgent(p.row)},{kind:"action",label:"Restart",onSelect:()=>d.restartAgent(p.row)},{kind:"separator"},{kind:"action",label:"Stop",onSelect:()=>d.stopAgent(p.row)},{kind:"action",label:"Archive",onSelect:()=>d.archiveAgent(p.row)}];return e.jsxs("div",{ref:C,tabIndex:-1,className:"ap-row","data-tone":u,"data-selected":A||void 0,"data-cursor":k||void 0,children:[e.jsxs("div",{className:"ap-rowMain",onClick:()=>d.selectAgent(p.row),children:[e.jsxs("div",{className:"ap-rowBody",children:[e.jsxs("div",{className:"ap-rowTop",children:[e.jsx(ae,{tone:u}),e.jsx("span",{className:"ap-rowMark","data-idle":u==="idle"||void 0,"aria-hidden":!0,children:e.jsx(R,{harness:D(a.harness),size:11})}),e.jsxs("span",{className:"ap-rowName","data-idle":u==="idle"||void 0,children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),j]}),a.needs?e.jsx("span",{className:"ap-needsWord",children:"needs you"}):u==="live"?e.jsx("span",{className:"ap-rowState",children:"working"}):null]}),e.jsxs("div",{className:"ap-rowMeta",children:[e.jsx("span",{className:"ap-rowBranch","data-dim":!0,title:v?m.join(" · "):void 0,children:f}),h?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",title:g.join(" · "),children:[g.length," models"]})]}):null,a.sessionCount?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",children:[a.sessionCount," session",a.sessionCount===1?"":"s"]})]}):null]})]}),e.jsxs("div",{className:"ap-rowTailWrap",children:[e.jsxs("div",{className:"ap-rowTail",children:[e.jsxs("div",{className:"ap-tailMeta","aria-hidden":u==="needs"||void 0,children:[e.jsx("span",{className:"ap-rowAgo",children:a.lastActivityAt?O(a.lastActivityAt):"—"}),!h&&K(a.model)?e.jsx("span",{className:"ap-rowModel",children:K(a.model)}):null]}),e.jsxs("div",{className:"ap-rowActions",children:[e.jsx("button",{type:"button",className:"ap-act ap-actPrimary",onClick:r=>{r.stopPropagation(),d.openAgentPage(p.row)},children:"Open ↗"}),e.jsx("button",{type:"button",className:"ap-act",onClick:r=>{r.stopPropagation(),d.startSession(p.row)},children:"+ Session"})]})]}),e.jsx("button",{type:"button",className:"ap-rowMore","aria-label":"Agent actions",title:"Configure · restart · stop",onClick:r=>{r.stopPropagation(),N(r,w)},children:"⋯"})]})]}),e.jsx(J,{agentIds:a.nodes.map(r=>r.row.agent.id),sessions:c})]})}function te({project:a,selectedAgentId:d,gestures:c,sessions:A}){const[k,C]=l.useState(""),[N,S]=l.useState(null),[u,p]=l.useState(!1),[j,m]=l.useState(-1),v=l.useRef(null),f=l.useRef(new Map),g=l.useMemo(()=>q(a),[a]),{primary:h,ephemeral:w}=l.useMemo(()=>V(g),[g]),r=l.useMemo(()=>_(a),[a]),M=l.useMemo(()=>[...new Set(h.map(s=>D(s.harness)))],[h]),n=k.trim().toLowerCase(),b=s=>(!N||D(s.harness)===N)&&(!n||s.name.toLowerCase().includes(n)||s.branches.some(t=>t.toLowerCase().includes(n))||s.harness.includes(n)),i=h.filter(b),I=w.filter(b),E=!!(n||N),o=i.find(s=>s.needs)??i[0],U=i.some(s=>s.needs),B=h.length<=1;Z(a);const W=g.reduce((s,t)=>s+t.sessionCount,0),z=s=>!!(d&&s.nodes.some(t=>t.row.agent.id===d));return l.useEffect(()=>{function s(t){const y=document.activeElement,L=!!y&&(y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable);if(t.key.toLowerCase()==="k"&&(t.metaKey||t.ctrlKey)||t.key==="/"&&!L){t.preventDefault(),v.current?.focus(),v.current?.select();return}if(t.key==="Escape"){L&&y?.blur();return}if(L)return;const F=i.length;if(F){if(t.key==="ArrowDown"||t.key==="j")t.preventDefault(),m(x=>x<0?0:Math.min(F-1,x+1));else if(t.key==="ArrowUp"||t.key==="k")t.preventDefault(),m(x=>x<0?0:Math.max(0,x-1));else if(t.key==="Enter"&&(t.metaKey||t.ctrlKey)){const x=i.find(P=>P.needs)??i[0];x&&(t.preventDefault(),m(i.indexOf(x)),c.selectAgent(x.nodes[0].row))}else if(t.key==="Enter"){const x=j<0?0:j,P=i[x];P&&(t.preventDefault(),m(x),c.selectAgent(P.nodes[0].row))}}}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[i,j,c]),l.useEffect(()=>{if(!(j<0)){if(j>=i.length){m(i.length-1);return}f.current.get(i[j]?.name??"")?.scrollIntoView({block:"nearest"})}},[j,i]),e.jsx("div",{className:"ap-view",children:e.jsxs("div",{className:"ap-content",children:[e.jsxs("header",{className:"ap-head",children:[e.jsx(G,{name:a.slice.title,size:56,tile:!0}),e.jsxs("div",{className:"ap-headIdent",children:[e.jsx("div",{className:"ap-headTop",children:e.jsxs("h1",{className:"ap-headName",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"/"}),a.slice.title]})}),a.slice.root?e.jsx("span",{className:"ap-headRoot",children:a.slice.root}):null]}),e.jsx("div",{className:"ap-headActions",children:e.jsx("button",{type:"button",className:"ap-headCta",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent"})})]}),e.jsxs("div",{className:"ap-digest",children:[e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:h.length}),e.jsx("span",{className:"ap-statLbl",children:h.length===1?"agent":"agents"})]}),e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:W}),e.jsx("span",{className:"ap-statLbl",children:W===1?"session":"sessions"})]}),r.length>0?e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:r.length}),e.jsx("span",{className:"ap-statLbl",children:"in flight"})]}):null,e.jsx("span",{className:"ap-statMarks",children:M.map(s=>e.jsx("span",{title:s,"aria-hidden":!0,children:e.jsx(R,{harness:s,size:12})},s))})]}),o&&!E&&!B?e.jsxs("div",{className:"ap-resume","data-tone":o.needs?"needs":"live","aria-live":"polite",children:[e.jsx("span",{className:"ap-dot","data-tone":o.needs?"needs":"live","aria-hidden":!0}),e.jsx("span",{className:"ap-resumeLbl",children:o.needs?"Waiting on you":"Most recent"}),e.jsxs("span",{className:"ap-resumeWho",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),o.nodes[0].row.agent.handle?.trim()||o.name]}),e.jsxs("span",{className:"ap-resumeMeta",children:[o.branches[0]??"main"," · ",o.lastActivityAt?O(o.lastActivityAt):"—"]}),e.jsxs("span",{className:"ap-resumeActions",children:[e.jsx("button",{type:"button",className:"ap-linkAccent",onClick:()=>c.selectAgent(o.nodes[0].row),children:o.needs?"Continue":"Resume"}),e.jsx("button",{type:"button",className:"ap-link",onClick:()=>c.openAgentPage(o.nodes[0].row),children:"Open ↗"})]})]}):null,B?null:e.jsxs("div",{className:"ap-find",children:[e.jsx("span",{className:"ap-findIco","aria-hidden":!0,children:e.jsx(se,{})}),e.jsx("input",{ref:v,className:"ap-findInput",placeholder:"Find an agent, branch, or harness… (⌘K)",value:k,onChange:s=>C(s.target.value)}),e.jsx("div",{className:"ap-findFilters",children:M.map(s=>e.jsxs("button",{type:"button",className:"ap-filter","data-on":N===s||void 0,onClick:()=>S(t=>t===s?null:s),children:[e.jsx(R,{harness:s,size:11}),s.charAt(0).toUpperCase()+s.slice(1)]},s))})]}),e.jsxs("div",{className:"ap-main",children:[e.jsxs("div",{className:"ap-sectionHead",children:[e.jsx("span",{className:"ap-sectionTitle",children:"Agents"}),e.jsxs("span",{className:"ap-sectionMeta",children:[i.length," shown",E?" · filtered":""]}),e.jsxs("span",{className:"ap-kbdHint","aria-hidden":!0,children:["↑↓ move · ↵ open",U?" · ⌘↵ needs":""]})]}),e.jsxs("div",{className:"ap-roster",children:[i.map((s,t)=>e.jsx(ne,{g:s,gestures:c,sessions:A,selected:z(s),cursor:j===t,rowRef:y=>{y?f.current.set(s.name,y):f.current.delete(s.name)}},s.name)),i.length===0?e.jsx("div",{className:"ap-empty",children:E?"No agents match.":I.length?"No primary agents — workflow & clone agents are in the fold below.":"No agents in this project yet."}):null]}),I.length?e.jsxs("div",{className:"ap-ephBlock",children:[e.jsxs("button",{type:"button",className:"ap-ephToggle",onClick:()=>p(s=>!s),children:[e.jsx("span",{className:"ap-ephCount",children:I.length})," ephemeral · workflow & clone agents",e.jsx("span",{className:"ap-ephCaret",children:u?"▴":"▾"})]}),u?e.jsx("div",{className:"ap-ephList",children:I.map(s=>e.jsxs("button",{type:"button",className:"ap-ephRow",onClick:()=>c.openAgentPage(s.nodes[0].row),children:[e.jsx("span",{className:"ap-ephMark","aria-hidden":!0,children:e.jsx(R,{harness:D(s.harness),size:10})}),e.jsx("span",{className:"ap-ephName",children:s.name}),e.jsx("span",{className:"ap-ephBranch",children:s.branches[0]??"main"}),e.jsx("span",{className:"ap-ephAgo",children:s.lastActivityAt?O(s.lastActivityAt):"—"})]},s.name))}):null]}):null,e.jsx("button",{type:"button",className:"ap-newAgent",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent on this project"})]})]})})}export{qe as AgentsLibrary};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-DezKXSG2.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
1
+ import{c}from"./createLucideIcon-DthwWQIg.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
@@ -1 +1 @@
1
- import{r}from"./index-DvLtl7rV.js";import{a as d}from"./api-Co9aQ2Jw.js";import{u as f}from"./Provider-CtXJeLrP.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};
1
+ import{r}from"./index-BI9AljSD.js";import{a as d}from"./api-Co9aQ2Jw.js";import{u as f}from"./Provider-Bu-C8Hxc.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};