@openscout/scout 0.2.95 → 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 (363) hide show
  1. package/bin/scout +26 -10
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/{ActivityScreen--eANwuxa.js → ActivityScreen-y-5DLleY.js} +1 -1
  5. package/dist/client/assets/{AddProjectForm-CcD6qvV8.js → AddProjectForm-r_1tVuWk.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-CYhf6twS.js → AgentAvatar-B7c0egdP.js} +1 -1
  7. package/dist/client/assets/{AgentConfigurationScreen-BTI24HQX.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
  8. package/dist/client/assets/{AgentDefinitionsWorkspace-srmN6-vj.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
  9. package/dist/client/assets/{AgentDetailCard-UqPNpcvB.js → AgentDetailCard-B_KLcgsP.js} +1 -1
  10. package/dist/client/assets/{AgentFloorView-XXNgI5Cj.js → AgentFloorView-DMFiHs21.js} +1 -1
  11. package/dist/client/assets/{AgentInfoScreen-CimdOnZ9.js → AgentInfoScreen-DHGLRddI.js} +1 -1
  12. package/dist/client/assets/{AgentLaneCard-Z-aOBR3W.js → AgentLaneCard-ajZvcfdW.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-CyhA1reW.js → AgentLaneChrome-CTp39syR.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-BNzjMjIH.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-Box8-_rS.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
  17. package/dist/client/assets/AgentLanesPreflight-CFadSaia.js +1 -0
  18. package/dist/client/assets/AgentLanesView-u5vpLwQf.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-BwuzOE8h.js → AgentLiveActions-CsQA3pu_.js} +1 -1
  20. package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +1 -0
  21. package/dist/client/assets/{AgentSessions-CsZwoukw.js → AgentSessions-BePq5Lgc.js} +1 -1
  22. package/dist/client/assets/{AgentsConsole-KCao4XmX.js → AgentsConsole-BuiZ_bDo.js} +1 -1
  23. package/dist/client/assets/{AgentsScreen-CtPAmwRX.js → AgentsScreen-CRi-hG2k.js} +1 -1
  24. package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
  25. package/dist/client/assets/{AstronautSuit-Ckx7lu7G.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
  26. package/dist/client/assets/{AtopView-DYlpgEHf.js → AtopView-PxWQd-sX.js} +1 -1
  27. package/dist/client/assets/{BackToPicker-4JaeRvDm.js → BackToPicker-Cto0Ioz9.js} +1 -1
  28. package/dist/client/assets/{BriefingDetailScreen-D6-xqrpo.js → BriefingDetailScreen-C29smC5d.js} +1 -1
  29. package/dist/client/assets/{BriefingsScreen-DKxSDEmk.js → BriefingsScreen-DNyFBrPn.js} +1 -1
  30. package/dist/client/assets/{BrokerMetadataPanel-BbREmsbK.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
  31. package/dist/client/assets/{BrokerScreen-fbPIouMw.js → BrokerScreen-CS0s4Gm4.js} +1 -1
  32. package/dist/client/assets/{CastPicker-BcA2vDDV.js → CastPicker-CTBHjjGw.js} +1 -1
  33. package/dist/client/assets/ChatCollapsedStrip-D4rc7wBQ.js +1 -0
  34. package/dist/client/assets/{CodeDiffPane-Cn8Y9hAt.js → CodeDiffPane-QvxCUzTi.js} +1 -1
  35. package/dist/client/assets/{CodeProjectPicker-nPFktrco.js → CodeProjectPicker-DplkpM7f.js} +1 -1
  36. package/dist/client/assets/{CodeScreen-BlAxtxE5.js → CodeScreen-CrR2JaVj.js} +1 -1
  37. package/dist/client/assets/{ConversationComposer-2HjbGPL9.js → ConversationComposer-H8_hsYSc.js} +1 -1
  38. package/dist/client/assets/{ConversationFeedRows-C6wUqJrx.js → ConversationFeedRows-hlEFlURs.js} +1 -1
  39. package/dist/client/assets/{ConversationHeader-C8vfXaTF.js → ConversationHeader-B0ZBhE_E.js} +1 -1
  40. package/dist/client/assets/{ConversationPanels-CNCIbpqU.js → ConversationPanels-fMo6Uy1v.js} +2 -2
  41. package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +2 -0
  42. package/dist/client/assets/{ConversationStatus-DZuyKsWN.js → ConversationStatus-DI5GCiyW.js} +1 -1
  43. package/dist/client/assets/{CrewAvatar-CTIuxp4G.js → CrewAvatar-CXJHLNVM.js} +1 -1
  44. package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
  45. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
  46. package/dist/client/assets/{DataTable-6IDhanr5.js → DataTable-DXIlOlVu.js} +1 -1
  47. package/dist/client/assets/{DispatchAftermath-DC1u9itO.js → DispatchAftermath-CrELgl2e.js} +1 -1
  48. package/dist/client/assets/{DocumentFocusViewer-DZVhS7as.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
  49. package/dist/client/assets/{EmbeddableSurfacesLab-BKUFJMCV.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
  50. package/dist/client/assets/{EmptyState-CeBl0iGd.js → EmptyState-D9X16fKq.js} +1 -1
  51. package/dist/client/assets/{FileViewerPane-DQlpNt2S.js → FileViewerPane-CY0RN78e.js} +1 -1
  52. package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +1 -0
  53. package/dist/client/assets/{FollowScreen-BXHOp3gb.js → FollowScreen-wZ-z67mX.js} +1 -1
  54. package/dist/client/assets/{HarnessMark-D5CA5uSp.js → HarnessMark-DAaWPiT_.js} +1 -1
  55. package/dist/client/assets/{HarnessesScreen-DhFXq1qz.js → HarnessesScreen-DbKkQM4o.js} +1 -1
  56. package/dist/client/assets/{HerdrSession-BRhs5LIR.js → HerdrSession-CYKRfBad.js} +1 -1
  57. package/dist/client/assets/{HomeHero-DMABJuze.js → HomeHero-DYyd3cpz.js} +1 -1
  58. package/dist/client/assets/{HostAdvisorView-RAociATV.js → HostAdvisorView-NtM0bsg8.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchInspector-CZPyVNSw.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
  60. package/dist/client/assets/{KnowledgeSearchScreen-mGTKIg00.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
  61. package/dist/client/assets/{LaneToolHoverCard-D_DMlBeT.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
  62. package/dist/client/assets/{LaneTraceDetailSheet-BEHg3LmH.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
  63. package/dist/client/assets/{LaneTraceEventFocus-DVimcizS.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
  64. package/dist/client/assets/{MeshCanvas-BOuZx4AM.js → MeshCanvas-TvsID4fe.js} +1 -1
  65. package/dist/client/assets/{MeshCanvasMinimap-wL-1N94e.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
  66. package/dist/client/assets/{MeshScreen-DMY9Bmh5.js → MeshScreen-BJ-j9YXv.js} +1 -1
  67. package/dist/client/assets/{MeshTopologyView-DiDcX5f4.js → MeshTopologyView-BjprutE8.js} +2 -2
  68. package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +1 -0
  69. package/dist/client/assets/{MissionContextRail-DrNKXG5u.js → MissionContextRail-Be0uXljQ.js} +1 -1
  70. package/dist/client/assets/{MissionControlView-ByBlHVN8.js → MissionControlView-Bj7cAbZd.js} +1 -1
  71. package/dist/client/assets/{MissionFocusOverlay-D1i6R6Zt.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
  72. package/dist/client/assets/{MissionLeftAgentRow-DN9NcCML.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
  73. package/dist/client/assets/{MissionLogPane-DSeIv3Xo.js → MissionLogPane-EsM_S3ro.js} +1 -1
  74. package/dist/client/assets/{NewAgentModal-V7yK6J6j.js → NewAgentModal-Cqiq1CE1.js} +1 -1
  75. package/dist/client/assets/NewChatComposer-C_1op4dH.js +19 -0
  76. package/dist/client/assets/{NewChatOrigin-DdpzE4kz.js → NewChatOrigin-D7hwp6dm.js} +1 -1
  77. package/dist/client/assets/{ObserveEmbedScreen-l_Q3ts2q.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
  78. package/dist/client/assets/{ObserveTextFlow-BSEtYTxU.js → ObserveTextFlow-BcrGQet8.js} +2 -2
  79. package/dist/client/assets/{ObservedTopologyPanel-CdGUXxGR.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
  80. package/dist/client/assets/{OpenScoutAppShell-DN8dOSK4.js → OpenScoutAppShell-BtfvMkAp.js} +25 -25
  81. package/dist/client/assets/{OpsAgentsView-ntGr4pz4.js → OpsAgentsView-DBYtmLnh.js} +1 -1
  82. package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
  83. package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
  85. package/dist/client/assets/{ProjectAgentProfileBar-BQET-qrY.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
  86. package/dist/client/assets/{ProjectAgentProfileHero-Ck8mThtx.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
  87. package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +2 -0
  88. package/dist/client/assets/ProjectsRail-p99BRBOa.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +1 -0
  91. package/dist/client/assets/{Provider-B2xuo3rf.js → Provider-Bu-C8Hxc.js} +1 -1
  92. package/dist/client/assets/{RailRow-B-GycCBx.js → RailRow-ClMmtaIE.js} +1 -1
  93. package/dist/client/assets/{RawSessionsTable-AQThi6sm.js → RawSessionsTable-BtKdQPiv.js} +1 -1
  94. package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +1 -0
  95. package/dist/client/assets/{RepoDiffEmbedScreen-DXWoRF_c.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
  96. package/dist/client/assets/{RepoDiffPageScreen-D_274ExO.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewer-DbedmHDX.js → RepoDiffViewer-BFperHQg.js} +1 -1
  98. package/dist/client/assets/{RepoDiffViewerLazy-C0--fPtk.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
  99. package/dist/client/assets/{ReposScreen-D39_YG4H.js → ReposScreen-C8dT4bK0.js} +1 -1
  100. package/dist/client/assets/ScoutDeckSurface-BcJsm2Kq.js +1 -0
  101. package/dist/client/assets/{ScoutSurface-UsRy0t-I.js → ScoutSurface-DmzEtrx8.js} +1 -1
  102. package/dist/client/assets/{ScoutbotFxLab-Fmdfboxs.js → ScoutbotFxLab-DU15Plja.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-o2RL9H8H.js → SecondaryNav-BrXMtvKE.js} +1 -1
  104. package/dist/client/assets/SessionEmbedScreen-Bt4flmAx.js +1 -0
  105. package/dist/client/assets/{SessionObserve-Dsd0j05N.js → SessionObserve-BCehTlO8.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-DopQYDkD.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +1 -0
  108. package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-_AwuopMS.js → SettingsDrawer-BieUmb8g.js} +1 -1
  110. package/dist/client/assets/{SettingsScreen-Cw4DDfJP.js → SettingsScreen-3JvX1WFL.js} +1 -1
  111. package/dist/client/assets/{ShikiPane-BfHc_3pM.js → ShikiPane-DPWsVNtn.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-C-q7XwTa.js → SlidePanel-BMRIR6bH.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-Bs68ZENy.js → SpriteAvatar-56DTXxSV.js} +1 -1
  114. package/dist/client/assets/{StatusPill-ZZQwxB1a.js → StatusPill-BcuYUgsD.js} +1 -1
  115. package/dist/client/assets/{TailView-Q4FVMsUH.js → TailView-BDy8c2VB.js} +1 -1
  116. package/dist/client/assets/{Terminal-D7zqHwHV.js → Terminal-BlUQY9_Z.js} +1 -1
  117. package/dist/client/assets/{TerminalEmbedScreen-CXIJ7qv6.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
  118. package/dist/client/assets/{TerminalHeaderMount-BnBLOPbb.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
  119. package/dist/client/assets/{TextDocumentSurface-CKQP-cBT.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
  120. package/dist/client/assets/{TmuxPeek-V9dGESfO.js → TmuxPeek-B4no_aGI.js} +1 -1
  121. package/dist/client/assets/{VoicePermissionsPanel-k7sbLXx2.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
  122. package/dist/client/assets/{WorkDetailScreen-60p9litn.js → WorkDetailScreen-DIFQufak.js} +1 -1
  123. package/dist/client/assets/{WorkFilesViewer-BjJS7GyM.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
  124. package/dist/client/assets/{activity-Bj3Hnbj3.js → activity-CqZafWfx.js} +1 -1
  125. package/dist/client/assets/{addon-fit-BL-NTWRU.js → addon-fit-CM6F_JRD.js} +1 -1
  126. package/dist/client/assets/{addon-webgl-CIMgmNjg.js → addon-webgl-DRTiePFC.js} +1 -1
  127. package/dist/client/assets/{agent-autocomplete-DXlvdc4b.js → agent-autocomplete-DXUBnlkN.js} +1 -1
  128. package/dist/client/assets/{agent-essentials-BOMHR0_U.js → agent-essentials-vytdybaX.js} +1 -1
  129. package/dist/client/assets/{agent-lane-card-model-CTLxf3R4.js → agent-lane-card-model-CNZMPkhc.js} +1 -1
  130. package/dist/client/assets/{agent-lanes-model-AfrjRNK5.js → agent-lanes-model-DXqjs0OK.js} +2 -2
  131. package/dist/client/assets/agent-master-I1W-5d-x.css +1 -0
  132. package/dist/client/assets/agent-master-model-DAZL92oe.js +1 -0
  133. package/dist/client/assets/{agent-specialization-BIPIBW8u.js → agent-specialization-BtxLN4UR.js} +1 -1
  134. package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
  135. package/dist/client/assets/{arc.es-IR5r6sj_.js → arc.es-Bh84oHJ7.js} +1 -1
  136. package/dist/client/assets/{arrow-down-BydciYFZ.js → arrow-down-DvTsLokL.js} +1 -1
  137. package/dist/client/assets/{arrow-left-CghA0kTw.js → arrow-left-DHfdXJVZ.js} +1 -1
  138. package/dist/client/assets/{arrow-right-iJFv3jNh.js → arrow-right-BBsrogWf.js} +1 -1
  139. package/dist/client/assets/{arrow-up-right-CCfZXPqD.js → arrow-up-right-CY0Vw_67.js} +1 -1
  140. package/dist/client/assets/{bot-B5sub1-i.js → bot-DzkOUFBb.js} +1 -1
  141. package/dist/client/assets/{check-C18YQC90.js → check-DbIkldnK.js} +1 -1
  142. package/dist/client/assets/{chevron-down-Mp9mu_yd.js → chevron-down-C475vltS.js} +1 -1
  143. package/dist/client/assets/{chevron-right-CzH-TaSF.js → chevron-right-CnZRSd-V.js} +1 -1
  144. package/dist/client/assets/{chunk-HRAB3GC3-swV8PA2k.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
  145. package/dist/client/assets/{chunk-JTPDIGGW-BKXqcLKw.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
  146. package/dist/client/assets/{chunk-T65CQEWV-vYbNJ8E6.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
  147. package/dist/client/assets/{chunk-YOZR3KYS-U65yUmqt.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
  148. package/dist/client/assets/{clock-B4PTFi5m.js → clock-DVvENUU5.js} +1 -1
  149. package/dist/client/assets/{code-xml-Jtxsp5d1.js → code-xml-CvKBY3KA.js} +1 -1
  150. package/dist/client/assets/{compass-0_54-vz3.js → compass-BcRI_YXo.js} +1 -1
  151. package/dist/client/assets/content--T3p6akp.js +1 -0
  152. package/dist/client/assets/content-4nFMLuzF.js +1 -0
  153. package/dist/client/assets/content-BJ4nHvcu.js +1 -0
  154. package/dist/client/assets/{content-DMbawvqU.js → content-BNyAjpUl.js} +1 -1
  155. package/dist/client/assets/content-BmGp9wNl.js +1 -0
  156. package/dist/client/assets/content-CBWhwaRo.js +1 -0
  157. package/dist/client/assets/content-CQlykFbe.js +1 -0
  158. package/dist/client/assets/content-CevL0DgF.js +1 -0
  159. package/dist/client/assets/content-Ch8pf2bj.js +1 -0
  160. package/dist/client/assets/content-Cpvdcm_l.js +1 -0
  161. package/dist/client/assets/content-DfS3vgAu.js +1 -0
  162. package/dist/client/assets/content-DpQdNePJ.js +1 -0
  163. package/dist/client/assets/content-Dqpibejl.js +1 -0
  164. package/dist/client/assets/content-TV0nd6-r.js +1 -0
  165. package/dist/client/assets/{content-CHghn-rT.js → content-odbb5H4U.js} +1 -1
  166. package/dist/client/assets/content-uXHLPHe0.js +1 -0
  167. package/dist/client/assets/{conversation-icons-BV10B2Me.js → conversation-icons-CBMKBGHd.js} +1 -1
  168. package/dist/client/assets/{conversation-model-CwF6Y9gx.js → conversation-model-QsJVfSeG.js} +1 -1
  169. package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
  170. package/dist/client/assets/{copy-Dtpx4FOE.js → copy-Cj-owMb-.js} +1 -1
  171. package/dist/client/assets/{cpu-BjVis9mc.js → cpu-DuD3RFX5.js} +1 -1
  172. package/dist/client/assets/{createLucideIcon-DXpqZP7I.js → createLucideIcon-DthwWQIg.js} +1 -1
  173. package/dist/client/assets/{ctx-panel-D_HJ3nhb.css → ctx-panel-F05jXK4Q.css} +1 -1
  174. package/dist/client/assets/discover-B3uQlh5L.js +2 -0
  175. package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
  176. package/dist/client/assets/{external-link-Ckiyzjwo.js → external-link-C_nxk0MJ.js} +1 -1
  177. package/dist/client/assets/{eye-CpfyvdLq.js → eye-FnaaPfja.js} +1 -1
  178. package/dist/client/assets/{file-code-corner-7mo7EviR.js → file-code-corner-DDPq4Cur.js} +1 -1
  179. package/dist/client/assets/{file-text-KijGBnME.js → file-text--hfhwZH1.js} +1 -1
  180. package/dist/client/assets/{gauge-y-Xg8Mrv.js → gauge-BVEknshP.js} +1 -1
  181. package/dist/client/assets/{gestures-Bq9XnSqY.js → gestures-3gw5VgUS.js} +1 -1
  182. package/dist/client/assets/{git-branch-BQ_x8KZL.js → git-branch-DJyvr0k-.js} +1 -1
  183. package/dist/client/assets/{home-moving-signal-DtRpiNa0.js → home-moving-signal-BPqBoNSm.js} +1 -1
  184. package/dist/client/assets/{home-now-card-DFb4GOgM.js → home-now-card-UspVW2-2.js} +1 -1
  185. package/dist/client/assets/{home-now-card-nano-D--m9jpq.js → home-now-card-nano-G8kMB32m.js} +1 -1
  186. package/dist/client/assets/{hooks-9d1SoaQA.js → hooks-BMsQzo9j.js} +1 -1
  187. package/dist/client/assets/{index-CZ-05hKz.js → index-BI9AljSD.js} +5 -5
  188. package/dist/client/assets/index-C-v0Z6ZS.js +1 -0
  189. package/dist/client/assets/index-D9DzUORB.js +1 -0
  190. package/dist/client/assets/index-DfsTyYDx.js +1 -0
  191. package/dist/client/assets/{inspector-panel-C-EhEDYy.js → inspector-panel-CFSArQ8Y.js} +1 -1
  192. package/dist/client/assets/{keyboard-nav-DFhAJkW3.js → keyboard-nav-e6yGeorb.js} +1 -1
  193. package/dist/client/assets/{lane-roster-store-gUBsydNf.js → lane-roster-store-Q7pcblY5.js} +1 -1
  194. package/dist/client/assets/{layers-CGou-LwV.js → layers-Dz2dKOnU.js} +1 -1
  195. package/dist/client/assets/{layout-grid-BrZt31QH.js → layout-grid-Bvs5fdB4.js} +1 -1
  196. package/dist/client/assets/{left-CwHZCGO3.js → left-B4Ak-Ibt.js} +1 -1
  197. package/dist/client/assets/{left-DA0amyfu.js → left-BMb493FZ.js} +1 -1
  198. package/dist/client/assets/{left-CwLs0okF.js → left-BjFLvVOC.js} +1 -1
  199. package/dist/client/assets/{left-B_o51JV6.js → left-CsXQ8Q3G.js} +1 -1
  200. package/dist/client/assets/left-FNH7faCI.js +1 -0
  201. package/dist/client/assets/left-POkqE8gI.js +2 -0
  202. package/dist/client/assets/left-UulOTcWh.js +1 -0
  203. package/dist/client/assets/{left-advisor-DU3s01gk.js → left-advisor-CJkQS2d6.js} +1 -1
  204. package/dist/client/assets/left-agents-CFMxyEjT.js +1 -0
  205. package/dist/client/assets/{left-default-uvuvDmt0.js → left-default-rnX5HANc.js} +1 -1
  206. package/dist/client/assets/{left-lanes-DnNLgec8.js → left-lanes-BpLXT_qH.js} +1 -1
  207. package/dist/client/assets/{left-mission-DN3-NLPC.js → left-mission-B0bhseWw.js} +1 -1
  208. package/dist/client/assets/library-D1iXfda2.js +1 -0
  209. package/dist/client/assets/{loader-circle-BiohlpM3.js → loader-circle-B2W9DPG5.js} +1 -1
  210. package/dist/client/assets/{local-agents-wUIaBcEr.js → local-agents-DKr-gIDC.js} +1 -1
  211. package/dist/client/assets/{mentions-CcPFMbmZ.js → mentions-DuLQnEcn.js} +1 -1
  212. package/dist/client/assets/{mesh-buckets-ByyFXdKT.js → mesh-buckets-6y3ZIibI.js} +1 -1
  213. package/dist/client/assets/{mesh-ops-CvGyjK84.js → mesh-ops-CRR-KnCG.js} +1 -1
  214. package/dist/client/assets/{mesh-roster-n2nDpEmA.js → mesh-roster-Bc7T4b7z.js} +1 -1
  215. package/dist/client/assets/{mesh-view-store-BpxGm71b.js → mesh-view-store-CiET-yN8.js} +1 -1
  216. package/dist/client/assets/{message-circle-B2ddzBrX.js → message-circle-B2DoYKDO.js} +1 -1
  217. package/dist/client/assets/{message-markup-RkfmDfME.js → message-markup-Cc_O-WdA.js} +1 -1
  218. package/dist/client/assets/{message-square-D9YYWE0x.js → message-square-O-Hu9Mk2.js} +1 -1
  219. package/dist/client/assets/{message-visibility-DwxgcgYK.js → message-visibility-CGOmSSKs.js} +1 -1
  220. package/dist/client/assets/{mission-control-store-Bf4b54MV.js → mission-control-store-DDAgWKUl.js} +1 -1
  221. package/dist/client/assets/{observe-CJRIvOCn.js → observe-Da2mRAsc.js} +1 -1
  222. package/dist/client/assets/{page-status-BptpTdQ-.js → page-status-Crtgjbq3.js} +1 -1
  223. package/dist/client/assets/{paperclip-B1UNGl5d.js → paperclip-BudMKSyr.js} +1 -1
  224. package/dist/client/assets/{persistent-state-YI-WHSCF.js → persistent-state-xJz-qAFc.js} +1 -1
  225. package/dist/client/assets/{plus-CuU_X0-8.js → plus-BJ1If8vj.js} +1 -1
  226. package/dist/client/assets/{profile-rY8jO38P.js → profile-B3qDSbrH.js} +1 -1
  227. package/dist/client/assets/projects-inbox-CLek3QaG.js +1 -0
  228. package/dist/client/assets/projects-inbox-DRBl2N85.css +1 -0
  229. package/dist/client/assets/{proxy-DnLpZIi9.js → proxy-1BABCaDb.js} +1 -1
  230. package/dist/client/assets/{radio-Dm1ItnA4.js → radio-B5OpHrrK.js} +1 -1
  231. package/dist/client/assets/{refresh-cw-BRn9Oxxl.js → refresh-cw-DmNAhaH0.js} +1 -1
  232. package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
  233. package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
  234. package/dist/client/assets/{right-BJltPRnd.js → right-BgJ4mQLf.js} +1 -1
  235. package/dist/client/assets/{right-DtsRNX5b.js → right-Bk6h7o-Z.js} +1 -1
  236. package/dist/client/assets/{right-C1yumXNx.js → right-BrICCmEt.js} +1 -1
  237. package/dist/client/assets/{right-BbyYdzHn.js → right-C1QIbqFZ.js} +1 -1
  238. package/dist/client/assets/{right-Shpw_xDy.js → right-CfliKiHY.js} +1 -1
  239. package/dist/client/assets/{right-D3aTKf1F.js → right-CtOLXB9s.js} +1 -1
  240. package/dist/client/assets/{right-CJnB_Bg7.js → right-D8id_DWQ.js} +1 -1
  241. package/dist/client/assets/{right-CPP7GyOm.js → right-DJ34yMAi.js} +1 -1
  242. package/dist/client/assets/{right-DI1B79nR.js → right-DiFmtw6d.js} +1 -1
  243. package/dist/client/assets/{right-Beh3nCUB.js → right-Lx79pxpG.js} +1 -1
  244. package/dist/client/assets/{rocket-DOwXHKWA.js → rocket-D3-TUJ2m.js} +1 -1
  245. package/dist/client/assets/router-DTtux5sP.js +1 -0
  246. package/dist/client/assets/{scope-views-A4_vP97W.js → scope-views-CPM0sBw_.js} +1 -1
  247. package/dist/client/assets/{scout-voice-BhPzrc6P.js → scout-voice-BZKsdquE.js} +1 -1
  248. package/dist/client/assets/{scoutbot-markdown-jh7tzFB1.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
  249. package/dist/client/assets/{scroll-text-DO0GQzvN.js → scroll-text-kPhYbh-M.js} +1 -1
  250. package/dist/client/assets/{search-D1tJSAWe.js → search-DmFM_9jm.js} +1 -1
  251. package/dist/client/assets/{secondaryNavConfig-B9IF8wXl.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
  252. package/dist/client/assets/{selection-bridge-i2S9zpf8.js → selection-bridge-Dy2mtMyi.js} +1 -1
  253. package/dist/client/assets/{send-horizontal-CgLppsIC.js → send-horizontal-qyjNgEaV.js} +1 -1
  254. package/dist/client/assets/{server-Dymv5Emh.js → server-nWqndnxu.js} +1 -1
  255. package/dist/client/assets/{session-catalog-DNaOEzoQ.js → session-catalog-BkmktBHI.js} +1 -1
  256. package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +1 -0
  257. package/dist/client/assets/{session-table-PTQVoTyc.js → session-table-DKSF0mrS.js} +1 -1
  258. package/dist/client/assets/{settings-2fC_G9nX.js → settings-C6h9y5XX.js} +1 -1
  259. package/dist/client/assets/{sliders-horizontal-BPSMHhbm.js → sliders-horizontal-BhHKxsCO.js} +1 -1
  260. package/dist/client/assets/{sparkles-Dy8p5xN8.js → sparkles-Cf8gin88.js} +1 -1
  261. package/dist/client/assets/{sse-CiOSzE5n.js → sse-DDHEHUgz.js} +1 -1
  262. package/dist/client/assets/{tail-events-BMQmSx1n.js → tail-events-BdUrO0kb.js} +1 -1
  263. package/dist/client/assets/{terminal-yN9xN-h9.js → terminal-C3YRPfyz.js} +1 -1
  264. package/dist/client/assets/{terminal-relay-9lhzEp2V.js → terminal-relay-BFhdIstF.js} +1 -1
  265. package/dist/client/assets/{terminal-takeover-DANQfTcy.js → terminal-takeover-B6H4llRR.js} +1 -1
  266. package/dist/client/assets/{text-rLpBg4_z.css → text-BYAFNLNq.css} +1 -1
  267. package/dist/client/assets/{text-CnZ0e1-V.js → text-Faa3ZStB.js} +1 -1
  268. package/dist/client/assets/{use-conversation-list-D9BNLfnW.js → use-conversation-list-DO5J8T1H.js} +1 -1
  269. package/dist/client/assets/use-fleet-active-asks-BtgNnRgK.js +1 -0
  270. package/dist/client/assets/{use-mesh-ops-items-BIvIHlqe.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
  271. package/dist/client/assets/{use-reduced-motion-CKkhq9c5.js → use-reduced-motion-8WuxLa5l.js} +1 -1
  272. package/dist/client/assets/{use-scout-dev-flags-B2KCzPxn.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
  273. package/dist/client/assets/{useAgentHoverCard-CHBsxcbp.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
  274. package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
  275. package/dist/client/assets/{usePierreRuntime-DUuXH5yp.js → usePierreRuntime-BfZHKAkI.js} +1 -1
  276. package/dist/client/assets/{wrench-YcXMlsh2.js → wrench-DkxnZRlR.js} +1 -1
  277. package/dist/client/assets/{x-e3h2hDsp.js → x-DfRJbqrh.js} +1 -1
  278. package/dist/client/assets/{xterm-Byp1Hep_.js → xterm-CJw8Epxv.js} +1 -1
  279. package/dist/client/assets/{zap-nMcjPoWB.js → zap-CIo8msJB.js} +1 -1
  280. package/dist/client/index.html +1 -1
  281. package/dist/drizzle/0009_old_korg.sql +72 -0
  282. package/dist/drizzle/0010_sparkling_colonel_america.sql +2 -0
  283. package/dist/drizzle/0011_funny_onslaught.sql +4 -0
  284. package/dist/drizzle/0012_high_blazing_skull.sql +16 -0
  285. package/dist/drizzle/0013_perfect_juggernaut.sql +1 -0
  286. package/dist/drizzle/0014_legal_meggan.sql +6 -0
  287. package/dist/drizzle/0015_lame_marvel_boy.sql +12 -0
  288. package/dist/drizzle/0016_early_goliath.sql +6 -0
  289. package/dist/drizzle/meta/0009_snapshot.json +6262 -0
  290. package/dist/drizzle/meta/0010_snapshot.json +6286 -0
  291. package/dist/drizzle/meta/0011_snapshot.json +6337 -0
  292. package/dist/drizzle/meta/0012_snapshot.json +6458 -0
  293. package/dist/drizzle/meta/0013_snapshot.json +6465 -0
  294. package/dist/drizzle/meta/0014_snapshot.json +6503 -0
  295. package/dist/drizzle/meta/0015_snapshot.json +6596 -0
  296. package/dist/drizzle/meta/0016_snapshot.json +6611 -0
  297. package/dist/drizzle/meta/_journal.json +56 -0
  298. package/dist/main.mjs +1355 -365
  299. package/dist/node/main.mjs +314 -12
  300. package/dist/pairing-runtime-controller.mjs +616 -108
  301. package/dist/runtime/base-daemon.mjs +30 -3
  302. package/dist/runtime/broker-daemon.mjs +4822 -532
  303. package/dist/runtime/broker-process-manager.mjs +23 -2
  304. package/dist/runtime/mesh-discover.mjs +23 -2
  305. package/dist/scout-control-plane-web.mjs +1922 -478
  306. package/package.json +2 -2
  307. package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +0 -1
  308. package/dist/client/assets/AgentLanesPreflight-5B6sXvRB.js +0 -1
  309. package/dist/client/assets/AgentLanesView-DHyzVBk6.js +0 -2
  310. package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +0 -1
  311. package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +0 -1
  312. package/dist/client/assets/ConversationScreen-BNULZAp2.js +0 -2
  313. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
  314. package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +0 -1
  315. package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +0 -1
  316. package/dist/client/assets/MessagesScreen-Eulveud3.js +0 -1
  317. package/dist/client/assets/NewChatComposer-hlWT-nbR.js +0 -19
  318. package/dist/client/assets/OpsScreen-Ppen_Lmj.js +0 -1
  319. package/dist/client/assets/OpsSubnav-GAKsoSor.js +0 -1
  320. package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +0 -1
  321. package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +0 -2
  322. package/dist/client/assets/ProjectsRail-DCfNMmnW.js +0 -1
  323. package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +0 -1
  324. package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +0 -1
  325. package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +0 -1
  326. package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +0 -1
  327. package/dist/client/assets/SessionEmbedScreen-RD5XOx7R.js +0 -1
  328. package/dist/client/assets/SessionRefScreen-B_cTv47v.js +0 -1
  329. package/dist/client/assets/SessionsScreen-Bq0Z77On.js +0 -1
  330. package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
  331. package/dist/client/assets/archive-BjcGiAy8.js +0 -1
  332. package/dist/client/assets/content-6RvWTrtk.js +0 -1
  333. package/dist/client/assets/content-BCgwMUqz.js +0 -1
  334. package/dist/client/assets/content-Bf2VLhx0.js +0 -1
  335. package/dist/client/assets/content-BrU_38-m.js +0 -1
  336. package/dist/client/assets/content-BvvJN8rN.js +0 -1
  337. package/dist/client/assets/content-CAeEqYPw.js +0 -1
  338. package/dist/client/assets/content-CI_Z9DXk.js +0 -1
  339. package/dist/client/assets/content-CbyKONhW.js +0 -1
  340. package/dist/client/assets/content-Czogvp43.js +0 -1
  341. package/dist/client/assets/content-DFk0zNzX.js +0 -1
  342. package/dist/client/assets/content-DHe4DgkA.js +0 -1
  343. package/dist/client/assets/content-DTz7cKjo.js +0 -1
  344. package/dist/client/assets/content-E3kudY-W.js +0 -1
  345. package/dist/client/assets/content-LpO0aO_U.js +0 -1
  346. package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +0 -1
  347. package/dist/client/assets/discover-CHbrEItO.js +0 -2
  348. package/dist/client/assets/embed-entry-vil28MyU.js +0 -2
  349. package/dist/client/assets/index-BVlMw8x_.js +0 -1
  350. package/dist/client/assets/index-Cn0GR-q1.js +0 -1
  351. package/dist/client/assets/index-DosI4AG9.js +0 -1
  352. package/dist/client/assets/left-BpgWnaah.js +0 -1
  353. package/dist/client/assets/left-Cx0kv6pe.js +0 -1
  354. package/dist/client/assets/left-agents-qL5PpUY-.js +0 -1
  355. package/dist/client/assets/left-z-6CkuBe.js +0 -2
  356. package/dist/client/assets/library-DIo5NiGP.js +0 -1
  357. package/dist/client/assets/projects-inbox-BBs1hG13.css +0 -1
  358. package/dist/client/assets/projects-inbox-D-zAb9Gp.js +0 -1
  359. package/dist/client/assets/resolve-panes-DO6LkwhQ.js +0 -1
  360. package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +0 -1
  361. package/dist/client/assets/router-DJj2WbDg.js +0 -1
  362. package/dist/client/assets/use-fleet-active-asks-BeAdcl09.js +0 -1
  363. package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as t,r as n,G as q,I as V,J as X,K as Q}from"./index-BI9AljSD.js";import{u as v,i as Z,f as W,h as tt}from"./Provider-Bu-C8Hxc.js";import{resolveContentPane as et,resolveRightPane as ot,resolveLeftPane as rt}from"./resolve-panes-DXw-cHaj.js";import{S as it}from"./ScoutSurface-DmzEtrx8.js";import{h as $}from"./router-DTtux5sP.js";import{S as U}from"./RealtimeVoiceScreen-KPHJgO1l.js";import{BrokerRight as nt}from"./right-Lx79pxpG.js";import{OpsInspectorPanel as st}from"./inspector-panel-CFSArQ8Y.js";import{b as at,u as ct}from"./persistent-state-xJz-qAFc.js";import{M as lt}from"./MeshCanvasMinimap-CxqeVVco.js";import{p as pt}from"./secondaryNavConfig-C9bQ9_IA.js";import{u as mt,T as dt}from"./chunk-JTPDIGGW-Ci5j4vzV.js";import{a as E}from"./api-Co9aQ2Jw.js";import{u as ut,a as gt,b as ht,c as ft,d as yt,e as vt}from"./hooks-BMsQzo9j.js";import{T as bt}from"./chunk-HRAB3GC3-DLNT8aOo.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"./content--T3p6akp.js";import"./ActivityScreen-y-5DLleY.js";import"./clipboard-e3fSpeo7.js";import"./mentions-DuLQnEcn.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./EmptyState-D9X16fKq.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./left-BjFLvVOC.js";/* empty css */import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./content-TV0nd6-r.js";import"./AgentInfoScreen-DHGLRddI.js";/* empty css */import"./BackToPicker-Cto0Ioz9.js";import"./ObservedTopologyPanel-BhVsvwkh.js";import"./AgentsScreen-CRi-hG2k.js";/* empty css */import"./AgentsSubnav-DUsya4WK.js";import"./SecondaryNav-BrXMtvKE.js";import"./message-square-O-Hu9Mk2.js";import"./compass-BcRI_YXo.js";import"./settings-C6h9y5XX.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";import"./library-D1iXfda2.js";/* empty css */import"./AgentSessions-BePq5Lgc.js";import"./agents-project-model-UYiamtrU.js";import"./profile-B3qDSbrH.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-BkmktBHI.js";import"./terminal-relay-BFhdIstF.js";import"./ConversationScreen-CXAHQwQ3.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./message-markup-Cc_O-WdA.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";import"./SessionObserve-BCehTlO8.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./AgentDefinitionsWorkspace-BbcZc9Xk.js";import"./agent-specialization-BtxLN4UR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CY0RN78e.js";/* empty css */import"./agent-essentials-vytdybaX.js";/* empty css *//* empty css */import"./right-CfliKiHY.js";import"./openAgent-Dbv5wfuL.js";import"./TmuxPeek-B4no_aGI.js";import"./refresh-cw-DmNAhaH0.js";import"./ProjectsRail-p99BRBOa.js";import"./AddProjectForm-r_1tVuWk.js";import"./projects-inbox-CLek3QaG.js";import"./mesh-roster-Bc7T4b7z.js";import"./model-IGCUEsMy.js";import"./ProjectsScreen-BB45DU53.js";import"./ProjectsInbox-JgU0lrY8.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-C8BiRVPx.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./CrewWorkspaces-Bz2Dcnt4.js";import"./sliders-horizontal-BhHKxsCO.js";import"./api-HFH8wFyb.js";import"./cache-CeWH_KzJ.js";import"./arrow-up-right-CY0Vw_67.js";import"./ProjectAgentProfile-BhXAZEkW.js";import"./ProjectAgentProfileBar-uJw9Wdfk.js";import"./ProjectsThreadAside-BHDTJWOz.js";import"./content-Dqpibejl.js";import"./BriefingDetailScreen-C29smC5d.js";import"./scoutbot-markdown-CQ7Y1McC.js";/* empty css */import"./BriefingsScreen-DNyFBrPn.js";import"./content-uXHLPHe0.js";import"./BrokerScreen-CS0s4Gm4.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-Q75fupqG.js";import"./BrokerMetadataPanel-DbaCQlhw.js";import"./DispatchAftermath-CrELgl2e.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-DPWsVNtn.js";import"./arrow-down-DvTsLokL.js";import"./paperclip-BudMKSyr.js";import"./plus-BJ1If8vj.js";import"./send-horizontal-qyjNgEaV.js";import"./copy-Cj-owMb-.js";import"./radio-B5OpHrrK.js";import"./bot-DzkOUFBb.js";import"./left-POkqE8gI.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-BtgNnRgK.js";import"./agent-master-model-DAZL92oe.js";import"./use-conversation-list-DO5J8T1H.js";import"./RailRow-ClMmtaIE.js";/* empty css */import"./content-BmGp9wNl.js";import"./MessagesScreen-CyNIZ3-X.js";import"./AgentMasterScreen-C5WlWNmk.js";/* empty css */import"./right-C1QIbqFZ.js";import"./CodeScreen-CrR2JaVj.js";import"./CodeDiffPane-QvxCUzTi.js";import"./usePierreRuntime-BfZHKAkI.js";/* empty css */import"./CodeProjectPicker-DplkpM7f.js";/* empty css */import"./content-odbb5H4U.js";import"./FollowScreen-wZ-z67mX.js";import"./content-BJ4nHvcu.js";import"./HarnessesScreen-DbKkQM4o.js";import"./useContentSecondaryNav-Bpkc8ayb.js";import"./OpsSubnav-BEU4kKXm.js";/* empty css */import"./left-B4Ak-Ibt.js";import"./content-CQlykFbe.js";import"./HomeHero-DYyd3cpz.js";import"./TailView-BDy8c2VB.js";import"./SlidePanel-BMRIR6bH.js";import"./observe-Da2mRAsc.js";import"./agent-lanes-model-DXqjs0OK.js";import"./home-moving-signal-BPqBoNSm.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DuD3RFX5.js";import"./file-code-corner-DDPq4Cur.js";import"./right-BrICCmEt.js";import"./left-UulOTcWh.js";import"./mesh-view-store-CiET-yN8.js";import"./mesh-buckets-6y3ZIibI.js";import"./content-DpQdNePJ.js";import"./MeshScreen-BJ-j9YXv.js";import"./MeshCanvas-TvsID4fe.js";import"./chunk-T65CQEWV-BtNvicWs.js";import"./useAgentHoverCard-Bkv-Uz_V.js";import"./local-agents-DKr-gIDC.js";/* empty css */import"./right-BgJ4mQLf.js";import"./left-BMb493FZ.js";import"./mesh-ops-CRR-KnCG.js";import"./use-mesh-ops-items-N1HHhChY.js";import"./content-BNyAjpUl.js";import"./use-scout-dev-flags-B31qTy6m.js";import"./right-CtOLXB9s.js";import"./left-FNH7faCI.js";import"./left-agents-CFMxyEjT.js";import"./left-default-rnX5HANc.js";import"./left-lanes-BpLXT_qH.js";import"./lane-roster-store-Q7pcblY5.js";import"./left-mission-B0bhseWw.js";import"./mission-control-store-DDAgWKUl.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./page-status-Crtgjbq3.js";import"./left-advisor-CJkQS2d6.js";import"./server-nWqndnxu.js";import"./layers-Dz2dKOnU.js";import"./gauge-BVEknshP.js";import"./content-CBWhwaRo.js";import"./OpsScreen-CuYVgkC_.js";/* empty css */import"./AgentLanesView-u5vpLwQf.js";/* empty css */import"./AgentFloorView-DMFiHs21.js";/* empty css */import"./AgentLanesPreflight-CFadSaia.js";import"./AgentLaneChrome-CTp39syR.js";import"./AgentLaneCard-ajZvcfdW.js";/* empty css */import"./AgentLaneSummaryResize-VMNDo7kD.js";import"./agent-lane-card-model-CNZMPkhc.js";import"./agent-lane-preview-BhplDYGf.js";import"./agent-lane-detail-ppJId6Jc.js";import"./AgentLaneDetailSheet-DRc-TpMB.js";import"./LaneTraceDetailSheet-C3C8UjXv.js";import"./LaneTraceEventFocus-Cek_64zR.js";import"./MissionControlView-Bj7cAbZd.js";/* empty css */import"./MissionContextRail-Be0uXljQ.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-DvTw6ts5.js";import"./MissionLogPane-EsM_S3ro.js";import"./OpsAgentsView-DBYtmLnh.js";/* empty css */import"./DataTable-DXIlOlVu.js";/* empty css */import"./HostAdvisorView-NtM0bsg8.js";/* empty css */import"./layout-grid-Bvs5fdB4.js";import"./AtopView-PxWQd-sX.js";import"./content-Cpvdcm_l.js";import"./RepoDiffPageScreen-CdTFfmbk.js";import"./RepoDiffViewerLazy-BkBmbi1Z.js";import"./ReposScreen-C8dT4bK0.js";/* empty css */import"./selection-bridge-Dy2mtMyi.js";import"./right-D8id_DWQ.js";import"./content-4nFMLuzF.js";import"./KnowledgeSearchScreen-DvbRRPQB.js";/* empty css */import"./clock-DVvENUU5.js";import"./KnowledgeSearchInspector-CU6BCFcS.js";import"./content-CevL0DgF.js";import"./SessionsScreen-BNvjUflN.js";import"./RawSessionsTable-BtKdQPiv.js";import"./FlightObserveScreen-qyzHzxLa.js";/* empty css */import"./right-DJ34yMAi.js";import"./content-Ch8pf2bj.js";import"./SettingsScreen-3JvX1WFL.js";import"./StatusPill-BcuYUgsD.js";import"./AgentConfigurationScreen-BD7Unt2P.js";import"./CastPicker-CTBHjjGw.js";import"./SettingsDrawer-BieUmb8g.js";import"./credentials-BTce3VP1.js";import"./VoicePermissionsPanel-Bd16scwz.js";import"./left-CsXQ8Q3G.js";import"./chunk-YOZR3KYS-DN5EJulq.js";import"./session-table-DKSF0mrS.js";import"./Terminal-BlUQY9_Z.js";/* empty css */import"./HerdrSession-CYKRfBad.js";import"./TerminalHeaderMount-Cy-uxkey.js";import"./right-DiFmtw6d.js";import"./content-DfS3vgAu.js";import"./WorkDetailScreen-DIFQufak.js";import"./WorkFilesViewer-CT5XEFGf.js";import"./right-Bk6h7o-Z.js";import"./agent-autocomplete-DXUBnlkN.js";import"./gestures-3gw5VgUS.js";import"./rocket-D3-TUJ2m.js";function xt(){const{route:o,navigate:e,agents:r}=v();return t.jsx(it,{children:et(o,e,r)})}function jt({onResizeStart:o}){const e=n.useCallback(r=>{r.preventDefault(),o(r)},[o]);return t.jsxs("div",{role:"separator","aria-orientation":"horizontal",onMouseDown:e,className:"group relative flex h-[7px] shrink-0 cursor-ns-resize items-center justify-center",children:[t.jsx("div",{className:"absolute inset-x-0 top-0 h-px bg-[var(--scout-chrome-border-soft)] transition-colors group-hover:bg-[var(--scout-chrome-ink-faint)]"}),t.jsxs("div",{className:"flex flex-row gap-[3px] opacity-0 transition-opacity group-hover:opacity-100",children:[t.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"}),t.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"}),t.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"})]})]})}const _=260,St=.7,kt=260;function H(o,e){const r=Math.max(_,Math.floor(e*St));return Math.min(r,Math.max(_,Math.round(o)))}function wt(){const o=$("surface.scoutbot",!0),{route:e,navigate:r,agents:i,selectedBrokerAttempt:s,clearBrokerAttempt:l}=v(),[a]=at("openscout.scoutbot.collapsed",!0),[m,d]=ct("openscout.scoutbot.height",kt),g=n.useRef(null),[u,h]=n.useState(0);n.useLayoutEffect(()=>{const y=g.current;if(!y)return;h(y.getBoundingClientRect().height);const S=new ResizeObserver(c=>{const p=c[0];p&&h(p.contentRect.height)});return S.observe(y),()=>S.disconnect()},[]),n.useEffect(()=>{if(u<=0)return;const y=H(m,u);y!==m&&d(y)},[u,m,d]);const j=n.useCallback(y=>{const S=y.clientY,c=m,p=g.current?.getBoundingClientRect().height??u,f=z=>{const Y=z.clientY-S;d(H(c-Y,p))},k=()=>{document.removeEventListener("mousemove",f),document.removeEventListener("mouseup",k),document.body.style.removeProperty("cursor"),document.body.style.removeProperty("user-select")};document.body.style.cursor="ns-resize",document.body.style.userSelect="none",document.addEventListener("mousemove",f),document.addEventListener("mouseup",k)},[u,m,d]);let b=null;const x=o&&e.view==="ops"&&e.mode==="lanes";if(x)b=t.jsx(U,{forceExpanded:!0,fill:!0});else switch(e.view){case"ops":b=t.jsx(st,{mode:e.mode??"mission",agents:i,navigate:r,returnRoute:e});break;case"broker":b=t.jsx(nt,{selectedAttempt:s,navigate:r,onClose:l});break;default:b=ot(e,r)}const A=u>0?H(m,u):m,R=o&&e.view!=="broker"&&e.view!=="voice";return t.jsxs("div",{ref:g,className:"flex h-full flex-col overflow-hidden",children:[t.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:b}),R&&!x&&!a&&t.jsx(jt,{onResizeStart:j}),R&&!x&&t.jsx(U,{height:a?void 0:A})]})}const J="openscout.globalJumpDock.mode.v1";function Ct(){if(typeof window>"u")return null;try{const o=window.localStorage.getItem(J);return o==="jump"||o==="minimap"?o:null}catch{return null}}function Rt(o){try{window.localStorage.setItem(J,o)}catch{}}function Tt(){const{route:o,navigate:e}=v(),r=o.view==="mesh",[i,s]=n.useState(()=>{const a=Ct();return a==="minimap"&&r?"minimap":a==="jump"?"jump":r?"minimap":"jump"});n.useEffect(()=>{i==="minimap"&&!r&&s("jump")},[i,r]);const l=a=>{s(a),Rt(a)};return t.jsxs("div",{className:"gjd",children:[t.jsxs("div",{className:"gjd-head",children:[t.jsx("span",{className:"gjd-ear","aria-hidden":!0}),t.jsxs("div",{className:"gjd-mode",role:"group","aria-label":"Bottom dock mode",children:[t.jsx("button",{type:"button",className:`gjd-mode-btn${i==="jump"?" gjd-mode-btn--active":""}`,onClick:()=>l("jump"),"aria-pressed":i==="jump",children:"jump"}),r&&t.jsx("button",{type:"button",className:`gjd-mode-btn${i==="minimap"?" gjd-mode-btn--active":""}`,onClick:()=>l("minimap"),"aria-pressed":i==="minimap",children:"minimap"})]}),t.jsx("span",{className:"gjd-ear","aria-hidden":!0})]}),t.jsx("div",{className:"gjd-body",children:i==="minimap"&&r?t.jsx(lt,{}):t.jsx(Et,{navigate:e})})]})}const Ot=pt();function Et({navigate:o}){const e=$("ops.control",!0),r=Ot.filter(i=>!i.opsGated||e);return t.jsx("div",{className:"gjd-jumps",children:r.map(i=>{const s=i.icon;return t.jsxs("button",{type:"button",className:"gjd-jump",onClick:()=>o(i.route),children:[t.jsx("span",{className:"gjd-jump-icon",children:n.createElement(s,{size:13,strokeWidth:1.6})}),t.jsx("span",{className:"gjd-jump-label",children:i.label})]},i.id)})})}function It(){const{route:o,navigate:e}=v();return t.jsxs("div",{className:"scout-left-shell",children:[t.jsx("div",{className:"scout-left-shell-rail",children:rt(o,e)}),t.jsx(Tt,{})]})}function Nt(){const o=q(),e=V(),r=mt({url:o,healthUrl:e,autoConnect:!0,sessionKey:"scout-terminal"});return t.jsx("div",{style:{height:"100%",background:"#0d0d0d",overflow:"hidden"},children:t.jsx(dt,{relay:r,fontSize:13,configItems:[{label:"ws",value:o},{label:"health",value:e}]})})}const Pt="Scout's local server isn't responding. It may still be starting up — wait a moment and try again.",Mt="Scout couldn't start its background service. Restart Scout from the menu bar icon, then try again.",At="The broker isn't running yet. Start Scout's services from the menu bar icon, then run setup again.",zt="Starting the broker took too long. Try again — if it keeps happening, restart Scout.",Ht="Scout couldn't write its settings in your home folder (~/.openscout). Check the folder's permissions and try again.",Bt="That folder doesn't exist on this Mac. Double-check the path — for example /Users/you/dev.";function C(o,e){const r=e instanceof Error?e.message:String(e);return Z(W(e))?Pt:/Unable to locate scoutd|Unable to locate Bun/i.test(r)?Mt:/openscout-runtime broker/i.test(r)?At:/timed out/i.test(r)?zt:/EACCES|EPERM|EROFS/i.test(r)?Ht:o==="project"&&/ENOENT|does not exist|doesn'?t exist/i.test(r)?/does not exist|doesn'?t exist/i.test(r)&&/[/~]/.test(r)?r:Bt:W(e)}const I=4;function Dt(){const{onboarding:o}=v();return o?o.hasLocalConfig?o.hasOperatorName?o.hasProjectConfig?o.needed===!0&&(!o.brokerReachable||!o.hasReadyRuntime)?t.jsx(T,{children:t.jsx(Ut,{step:4})}):null:t.jsx(T,{children:t.jsx(Wt,{step:3})}):t.jsx(T,{children:t.jsx(Ft,{step:2})}):t.jsx(T,{children:t.jsx(Lt,{step:1})}):null}function T({children:o}){return t.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",background:"var(--bg)",color:"var(--ink)"},children:t.jsx("div",{style:{width:"100%",maxWidth:720,padding:"80px 72px",display:"flex",flexDirection:"column",gap:40},children:o})})}function N({eyebrow:o,title:e,description:r}){return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[t.jsx("div",{style:_t,children:o}),t.jsx("div",{style:Gt,children:e}),t.jsx("div",{style:$t,children:r})]})}function P({primary:o,onPrimary:e,primaryDisabled:r,busy:i}){const{skipOnboarding:s}=v();return t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,paddingTop:8},children:[t.jsxs("div",{style:{display:"flex",alignItems:"center",gap:24},children:[t.jsx("button",{type:"button",onClick:e,disabled:r||i,style:{...Jt,opacity:r||i?.5:1,cursor:r||i?"default":"pointer"},children:i?"Working…":o}),t.jsx("button",{type:"button",onClick:s,style:Kt,onMouseEnter:l=>{l.currentTarget.style.color="rgba(255,255,255,0.8)"},onMouseLeave:l=>{l.currentTarget.style.color="rgba(255,255,255,0.45)"},children:"Set up later"})]}),t.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.35)",lineHeight:1.5},children:"Scout stays limited until setup finishes."})]})}function M({message:o}){return o?t.jsx("div",{style:{borderRadius:8,border:"1px solid rgba(239,68,68,0.35)",backgroundColor:"rgba(239,68,68,0.08)",color:"rgba(252,165,165,0.95)",padding:"12px 16px",fontSize:12,lineHeight:1.5},children:o}):null}function Lt({step:o}){const{onboarding:e,refreshOnboarding:r}=v(),[i,s]=n.useState(!1),[l,a]=n.useState(null),m=async()=>{s(!0),a(null);try{await E("/api/onboarding/init",{method:"POST",body:"{}"}),await r()}catch(d){a(C("init",d))}finally{s(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(N,{eyebrow:`First-run setup · Step ${o} of ${I}`,title:"Welcome to Scout",description:t.jsxs(t.Fragment,{children:["Scout needs a local config before it can talk to the broker, the web app, and paired devices. This writes"," ",t.jsx("code",{style:F,children:"~/.openscout/config.json"})," with sensible defaults — you can edit it any time."]})}),t.jsxs("ul",{style:K,children:[t.jsx(w,{label:"Local config (~/.openscout/config.json)",done:!1,hint:"missing"}),t.jsx(w,{label:".openscout/project.json in a repo",done:!!e?.hasProjectConfig,hint:e?.hasProjectConfig?e.projectRoot??void 0:"checked after setup"})]}),t.jsx(M,{message:l}),t.jsx(P,{primary:"Initialize Scout",onPrimary:()=>{m()},busy:i})]})}function Ft({step:o}){const{onboarding:e,refreshOnboarding:r}=v(),i=e?.operatorNameSuggestion??"",[s,l]=n.useState(i),[a,m]=n.useState(!1),[d,g]=n.useState(null);n.useEffect(()=>{!s&&i&&l(i)},[i,s]);const u=async()=>{const h=s.trim();if(!h){g("Name is required.");return}m(!0),g(null);try{await E("/api/user",{method:"POST",body:JSON.stringify({name:h})}),await r()}catch(j){g(C("identity",j))}finally{m(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(N,{eyebrow:`Identity · Step ${o} of ${I}`,title:"What should we call you?",description:"Your name shows up on messages you send and in any agent that speaks for you. You can change it later in Settings."}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[t.jsx("label",{style:O,children:"Your name"}),t.jsx("input",{autoFocus:!0,value:s,onChange:h=>{l(h.target.value),g(null)},onKeyDown:h=>{h.key==="Enter"&&u()},placeholder:i||"Operator",style:L}),i?t.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.4)",fontFamily:"var(--hud-font-mono)"},children:"Prefilled from your machine."}):null]}),t.jsx(M,{message:d}),t.jsx(P,{primary:"Continue",onPrimary:()=>{u()},busy:a,primaryDisabled:!s.trim()})]})}function Wt({step:o}){const{onboarding:e,refreshOnboarding:r}=v(),i=e?.currentDirectory??"",s=i||"~/dev",[l,a]=n.useState([s]),[m,d]=n.useState(i),[g,u]=n.useState("claude"),[h,j]=n.useState(!1),[b,x]=n.useState(null),A=(c,p)=>{a(f=>f.map((k,z)=>z===c?p:k))},R=()=>a(c=>[...c,""]),y=c=>a(p=>p.filter((f,k)=>k!==c)),S=async()=>{const c=l.map(f=>f.trim()).filter(Boolean),p=m.trim();if(!p){x("Pick where Scout should anchor this context.");return}j(!0),x(null);try{await E("/api/onboarding/project",{method:"POST",body:JSON.stringify({contextRoot:p,sourceRoots:c,defaultHarness:g})}),await r()}catch(f){x(C("project",f))}finally{j(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(N,{eyebrow:`Project · Step ${o} of ${I}`,title:"Where do your repos live?",description:t.jsxs(t.Fragment,{children:["Scout scans these folders for projects and anchors this context at"," ",t.jsx("code",{style:F,children:"<context>/.openscout/project.json"}),"."]})}),t.jsxs("div",{style:B,children:[t.jsx("label",{style:O,children:"Scan folders"}),t.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[l.map((c,p)=>t.jsxs("div",{style:{display:"flex",gap:8},children:[t.jsx("input",{value:c,onChange:f=>A(p,f.target.value),placeholder:p===0?s:"Add another folder",style:{...L,flex:1}}),t.jsx("button",{type:"button",onClick:()=>y(p),disabled:l.length<=1,style:{...G,opacity:l.length<=1?.4:1,cursor:l.length<=1?"default":"pointer"},"aria-label":`Remove folder ${p+1}`,children:"−"})]},p)),t.jsx("button",{type:"button",onClick:R,style:{...G,alignSelf:"flex-start"},children:"+ Add folder"})]})]}),t.jsxs("div",{style:B,children:[t.jsx("label",{style:O,children:"Context root"}),t.jsx("input",{value:m,onChange:c=>d(c.target.value),placeholder:s,style:L}),t.jsxs("div",{style:D,children:["Scout writes ",t.jsx("code",{style:F,children:".openscout/project.json"})," ","inside this folder."]}),t.jsx("div",{style:D,children:"Tip: ~ expands to your home folder."})]}),t.jsxs("div",{style:B,children:[t.jsx("label",{style:O,children:"Default harness"}),t.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:["claude","codex"].map(c=>{const p=g===c;return t.jsxs("button",{type:"button",onClick:()=>u(c),style:{...Yt,borderColor:p?"var(--accent, #2dd4bf)":"rgba(255,255,255,0.12)",backgroundColor:p?"rgba(45,212,191,0.08)":"rgba(255,255,255,0.02)"},children:[t.jsx("div",{style:{fontSize:15,fontWeight:600,textTransform:"capitalize"},children:c}),t.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.55)",marginTop:6,lineHeight:1.5},children:c==="claude"?"Anthropic Claude Code — local CLI agent.":"OpenAI Codex — cloud agentic sandbox."}),t.jsx("div",{style:{fontSize:11,fontFamily:"var(--hud-font-mono)",color:"rgba(255,255,255,0.4)",marginTop:8,lineHeight:1.5},children:c==="claude"?"Requires the Claude Code CLI, installed and signed in.":"Requires the Codex CLI, installed and signed in."})]},c)})}),t.jsx("div",{style:D,children:"Not installed yet? Pick one anyway — the final step checks and tells you what's missing."})]}),t.jsx(M,{message:b}),t.jsx(P,{primary:"Create project",onPrimary:()=>{S()},busy:h,primaryDisabled:!m.trim()})]})}function Ut({step:o}){const{onboarding:e,refreshOnboarding:r}=v(),[i,s]=n.useState(!1),[l,a]=n.useState(null),m=async()=>{s(!0),a(null);try{const d=await E("/api/onboarding/setup",{method:"POST",body:"{}"});await r(),d.brokerWarning?a(C("setup",d.brokerWarning)):d.hasReadyRuntime===!1&&a("Setup finished, but Scout didn't find a ready agent runtime. Install or sign in to a supported runtime, then choose Run setup again.")}catch(d){a(C("setup",d))}finally{s(!1)}};return t.jsxs(t.Fragment,{children:[t.jsx(N,{eyebrow:`Setup · Step ${o} of ${I}`,title:"Finish setup",description:"Scout will install its harness skills, start the local broker, refresh discovery, and check for a ready agent runtime."}),t.jsxs("ul",{style:K,children:[t.jsx(w,{label:".openscout/project.json",done:!!e?.hasProjectConfig,hint:e?.projectConfigPath??e?.projectRoot??void 0}),t.jsx(w,{label:"Broker reachable",done:!!e?.brokerReachable,hint:e?.brokerReachable?"connected":"starts when you run setup"}),t.jsx(w,{label:"Agent runtime",done:!!e?.hasReadyRuntime,hint:e?.hasReadyRuntime?"ready":"install or sign in to a supported runtime"})]}),t.jsx(M,{message:l}),t.jsx(P,{primary:"Run setup",onPrimary:()=>{m()},busy:i})]})}function w({label:o,done:e,hint:r}){return t.jsxs("li",{style:{display:"flex",alignItems:"flex-start",gap:16},children:[t.jsx("span",{style:{marginTop:2,width:20,height:20,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,flexShrink:0,backgroundColor:e?"rgba(34,197,94,0.15)":"rgba(255,255,255,0.07)",color:e?"#4ade80":"rgba(255,255,255,0.5)"},children:e?"✓":"•"}),t.jsxs("div",{style:{minWidth:0},children:[t.jsx("div",{style:{fontSize:13,lineHeight:1.5,color:e?"rgba(255,255,255,0.75)":"rgba(255,255,255,0.9)"},children:o}),r?t.jsx("div",{style:{fontSize:11,fontFamily:"var(--hud-font-mono)",color:"rgba(255,255,255,0.35)",marginTop:4,wordBreak:"break-all"},children:r}):null]})]})}const _t={fontSize:11,fontFamily:"var(--hud-font-mono)",textTransform:"uppercase",letterSpacing:"0.18em",color:"rgba(255,255,255,0.4)"},Gt={fontSize:36,fontWeight:600,letterSpacing:"-0.01em",lineHeight:1.15},$t={fontSize:15,lineHeight:1.75,color:"rgba(255,255,255,0.6)",maxWidth:580},B={display:"flex",flexDirection:"column",gap:10},O={fontSize:11,fontFamily:"var(--hud-font-mono)",textTransform:"uppercase",letterSpacing:"0.15em",color:"rgba(255,255,255,0.5)"},L={width:"100%",padding:"10px 14px",fontSize:14,fontFamily:"var(--hud-font-mono)",color:"rgba(255,255,255,0.92)",backgroundColor:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.12)",borderRadius:8,outline:"none",boxSizing:"border-box"},D={fontSize:12,color:"rgba(255,255,255,0.45)",lineHeight:1.6},F={fontFamily:"var(--hud-font-mono)",fontSize:12,padding:"2px 6px",borderRadius:4,backgroundColor:"rgba(255,255,255,0.06)"},Jt={fontSize:13,fontWeight:600,padding:"12px 24px",borderRadius:10,backgroundColor:"var(--accent, #2dd4bf)",color:"#0b0d12",border:"none",transition:"opacity 0.15s ease"},G={fontSize:13,fontWeight:500,padding:"10px 14px",borderRadius:8,backgroundColor:"rgba(255,255,255,0.04)",border:"1px solid rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.85)",transition:"all 0.15s ease"},Kt={fontSize:12,color:"rgba(255,255,255,0.45)",textDecoration:"underline dotted rgba(255,255,255,0.25)",textUnderlineOffset:4,background:"none",border:"none",cursor:"pointer",padding:"4px 2px",transition:"color 0.15s ease"},K={display:"flex",flexDirection:"column",gap:20,margin:0,padding:0,listStyle:"none"},Yt={textAlign:"left",padding:"16px 18px",borderRadius:12,borderWidth:1,borderStyle:"solid",borderColor:"rgba(255,255,255,0.12)",color:"rgba(255,255,255,0.9)",cursor:"pointer",transition:"all 0.15s ease"},qt=[{commandId:"nav:home",title:"Go to Home",description:"Navigate to the home overview showing queue, threads, signal, and activity",category:"navigation",keywords:["home","inbox","dashboard"],shortcut:"Cmd+1"},{commandId:"nav:agents",title:"Go to Agents",description:"Navigate to the agents roster showing all registered agents",category:"navigation",keywords:["agents","roster","list"],shortcut:"Cmd+2"},{commandId:"nav:messages",title:"Go to Chat",description:"Navigate to the unified chat surface backed by the normalized conversations service",category:"navigation",keywords:["conversations","comms","chat","threads","channels","channel","group","broadcast"],shortcut:"Cmd+3"},{commandId:"nav:sessions",title:"Open Sessions",description:"Navigate to the sessions list showing all active conversations",category:"navigation",keywords:["sessions","conversations","threads"]},{commandId:"nav:search",title:"Go to Search",description:"Navigate to the session knowledge search surface for extraction, search, and raw-log drilldown planning",category:"navigation",keywords:["search","knowledge","qmd","history"],shortcut:"Cmd+4"},{commandId:"nav:activity",title:"Open Activity",description:"Navigate to the activity feed showing recent events",category:"navigation",keywords:["activity","feed","events","log"]},{commandId:"nav:mesh",title:"Open Mesh",description:"Navigate to the mesh network view showing nodes and topology",category:"navigation",keywords:["mesh","network","nodes","peers","topology"]},{commandId:"nav:dispatch",title:"Open Dispatch",description:"Navigate to the dispatch ledger for routing, delivery attempts, and failed queries",category:"navigation",keywords:["dispatch","broker","routing","delivery","messages"]},{commandId:"nav:repos",title:"Open Repositories",description:"Navigate to the repos view for branches, diffs, and working-tree state",category:"navigation",keywords:["repos","repositories","git","branches","diffs"]},{commandId:"nav:harnesses",title:"Open Providers",description:"Open the central view for providers, harnesses, observed topology, and budget feeds",category:"navigation",keywords:["provider","providers","harness","harnesses","claude","codex","budget","usage","topology"]},{commandId:"nav:ops",title:"Go to Ops",description:"Navigate to the operator workspace for dispatch, mesh, tail, runtime, alerts, and agent operations",category:"navigation",keywords:["ops","operator","control","tail","runtime","services","atop","dispatch","mesh"],shortcut:"Cmd+5"},{commandId:"nav:ops-atop",title:"Open Runtime",description:"Open the live agent/process view with observed harness families",category:"navigation",keywords:["runtime","services","atop","process","session","agent","topology"]},{commandId:"nav:settings",title:"Open Settings",description:"Open the settings screen for pairing, identity, and relay config",category:"settings",keywords:["settings","preferences","config","pair"],shortcut:"Cmd+,"},{commandId:"nav:agent-config",title:"Open Agent Configuration",description:"Open the unified agent configuration surface for runtimes, agents, tools, delivery, and broker state",category:"settings",keywords:["agent config","runtimes","providers","mcp","tools"]},{commandId:"nav:pair",title:"Pair Device",description:"Open the device pairing flow to connect a mobile device",category:"settings",keywords:["pair","qr","device","phone","mobile"]},{commandId:"scout:reload",title:"Reload Agents",description:"Refresh the agent list and message state from the broker",category:"workspace",keywords:["reload","refresh","sync"]},{commandId:"scout:open:*",title:"Open Agent",description:"Open the agent's view (runtime, sessions, inspector) for one specific agent.",category:"navigation",keywords:["open","agent","view","inspect"],params:[{name:"agentId",description:"The agent identifier to open",type:"string"}]},{commandId:"scout:message:*",title:"Message Agent",description:"Open the DM conversation for one specific agent to message them. One agent maps to a DM; group work belongs in an explicit channel and broadcasts belong in the shared channel.",category:"workspace",keywords:["message","chat","conversation","dm","tell","ask","reply"],params:[{name:"agentId",description:"The agent identifier to message",type:"string"}]}];function Vt(o={}){const{initialTheme:e="dark"}=o,r=X();return{id:"openscout",name:"Scout",description:"All your agents, one message away. Scout is a control plane for managing coding agents: Send posts into a Chat, direct agent messages create or steer Runs, and shared work stays in explicit channels.",mode:"panel",icon:n.createElement("svg",{width:14,height:14,viewBox:"0 0 20 20",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0},n.createElement("polygon",{points:"10,4.3 14.8,7.1 14.8,12.9 10,15.7 5.2,12.9 5.2,7.1",strokeWidth:1.9}),n.createElement("polygon",{points:"10,7 12.4,8.4 12.4,10.6 10,12 7.6,10.6 7.6,8.4",strokeWidth:1.32,opacity:.74})),Provider:({children:i})=>n.createElement(bt,{defaultTheme:e,defaultTemplate:r,storageKey:Q,children:n.createElement(tt,{initialTheme:e,children:i})}),leftPanel:{title:"Navigation"},rightPanel:{title:"Context"},slots:{Content:xt,LeftPanel:It,Inspector:wt,Takeover:Dt,Terminal:Nt},intents:qt,hooks:{useCommands:vt,useStatus:yt,useNavCenter:ft,useNavActions:ht,useLayoutMode:gt,useTakeover:ut}}}Vt();export{Vt as createScoutApp};
@@ -0,0 +1 @@
1
+ import{u as q,a as ie,s as Pe,S as Oe}from"./scope-views-CPM0sBw_.js";import{b as Il,i as Tl,c as Rl,d as Dl}from"./scope-views-CPM0sBw_.js";import{ad as pe,ae as Me,a1 as $e,a2 as Fe,a3 as Be,a4 as We,a5 as de,a6 as ze,a7 as Ge,a8 as He,af as Ke,a9 as Ve,ag as Ue,Q as qe,U as Ye,T as Ze,k as Je,h as Se}from"./router-DTtux5sP.js";import{ah as Ol,ai as Ml,aj as $l,ak as Fl,al as Bl,am as Wl,an as zl,ao as Gl,ap as Hl,aq as Kl,V as Vl,ar as Ul,as as ql,at as Yl,R as Zl}from"./router-DTtux5sP.js";import{r as d,j as r,X as le,E as Qe}from"./index-BI9AljSD.js";import{A as Ql,R as Xl,N as ec,Y as tc,P as sc,Z as oc,W as nc,O as rc,V as ac,D as ic,$ as lc,a0 as cc}from"./index-BI9AljSD.js";import{u as ve}from"./Provider-Bu-C8Hxc.js";import{S as Xe}from"./ScoutSurface-DmzEtrx8.js";import{resolveContentPane as et}from"./resolve-panes-DXw-cHaj.js";import{i as tt}from"./model-IGCUEsMy.js";import{t as st}from"./bash-format-BRV5C6Gv.js";import{t as be}from"./time-Dhsh_2EG.js";import{i as ot,l as xe,j as nt,k as rt,m as at,e as it,g as lt,n as ct,r as pt,A as K,D as dt,h as ut}from"./agent-lanes-model-DXqjs0OK.js";import{S as mt}from"./SlidePanel-BMRIR6bH.js";import{H as ft}from"./HarnessMark-DAaWPiT_.js";import{o as ht,f as gt,b as _t}from"./lane-observe-vfyACHi0.js";import{S as Le}from"./SessionObserve-BCehTlO8.js";import{LaneTraceEventFocus as St}from"./LaneTraceEventFocus-Cek_64zR.js";import{b as vt}from"./agent-lane-detail-ppJId6Jc.js";import{r as bt,u as xt}from"./AgentLanesView-u5vpLwQf.js";import{u as Lt}from"./observe-Da2mRAsc.js";import{f as wt}from"./terminal-sessions-BQ6t92tJ.js";import{o as Nt,i as yt}from"./surface-activity-B1rgWB1i.js";import{AgentFloorView as jt}from"./AgentFloorView-DMFiHs21.js";import{i as kt,c as Et,n as ue}from"./keyboard-nav-e6yGeorb.js";import{a as Ct}from"./api-Co9aQ2Jw.js";import{RawSessionsTable as At}from"./RawSessionsTable-BtKdQPiv.js";import{SessionRefScreen as It}from"./SessionRefScreen-C8BiRVPx.js";import{TailView as Tt}from"./TailView-BDy8c2VB.js";import{c as Rt,b as Dt,u as Pt,r as Ot}from"./hooks-BMsQzo9j.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-DDHEHUgz.js";import"./index-BWHgHrtv.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"./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"./NewChatOrigin-D7hwp6dm.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./content--T3p6akp.js";import"./ActivityScreen-y-5DLleY.js";import"./clipboard-e3fSpeo7.js";import"./mentions-DuLQnEcn.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./EmptyState-D9X16fKq.js";/* empty css */import"./left-BjFLvVOC.js";/* empty css */import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./CrewAvatar-CXJHLNVM.js";import"./content-TV0nd6-r.js";import"./AgentInfoScreen-DHGLRddI.js";/* empty css */import"./BackToPicker-Cto0Ioz9.js";import"./ObservedTopologyPanel-BhVsvwkh.js";import"./AgentsScreen-CRi-hG2k.js";/* empty css */import"./AgentsSubnav-DUsya4WK.js";import"./SecondaryNav-BrXMtvKE.js";import"./secondaryNavConfig-C9bQ9_IA.js";import"./message-square-O-Hu9Mk2.js";import"./compass-BcRI_YXo.js";import"./settings-C6h9y5XX.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";import"./library-D1iXfda2.js";/* empty css */import"./AgentSessions-BePq5Lgc.js";import"./agents-project-model-UYiamtrU.js";import"./profile-B3qDSbrH.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-BkmktBHI.js";import"./terminal-relay-BFhdIstF.js";import"./ConversationScreen-CXAHQwQ3.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./message-markup-Cc_O-WdA.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";import"./AgentDefinitionsWorkspace-BbcZc9Xk.js";import"./agent-specialization-BtxLN4UR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CY0RN78e.js";/* empty css */import"./agent-essentials-vytdybaX.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";/* empty css *//* empty css */import"./right-CfliKiHY.js";import"./openAgent-Dbv5wfuL.js";import"./TmuxPeek-B4no_aGI.js";import"./refresh-cw-DmNAhaH0.js";import"./ProjectsRail-p99BRBOa.js";import"./AddProjectForm-r_1tVuWk.js";import"./projects-inbox-CLek3QaG.js";import"./mesh-roster-Bc7T4b7z.js";import"./ProjectsScreen-BB45DU53.js";import"./ProjectsInbox-JgU0lrY8.js";import"./ui-LM8pS8qE.js";import"./CrewWorkspaces-Bz2Dcnt4.js";import"./sliders-horizontal-BhHKxsCO.js";import"./api-HFH8wFyb.js";import"./cache-CeWH_KzJ.js";import"./arrow-up-right-CY0Vw_67.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./ProjectAgentProfile-BhXAZEkW.js";import"./ProjectAgentProfileBar-uJw9Wdfk.js";import"./ProjectsThreadAside-BHDTJWOz.js";import"./content-Dqpibejl.js";import"./BriefingDetailScreen-C29smC5d.js";import"./scoutbot-markdown-CQ7Y1McC.js";/* empty css */import"./BriefingsScreen-DNyFBrPn.js";import"./content-uXHLPHe0.js";import"./BrokerScreen-CS0s4Gm4.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-Q75fupqG.js";import"./BrokerMetadataPanel-DbaCQlhw.js";import"./DispatchAftermath-CrELgl2e.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-DPWsVNtn.js";import"./arrow-down-DvTsLokL.js";import"./paperclip-BudMKSyr.js";import"./plus-BJ1If8vj.js";import"./send-horizontal-qyjNgEaV.js";import"./copy-Cj-owMb-.js";import"./radio-B5OpHrrK.js";import"./bot-DzkOUFBb.js";import"./left-POkqE8gI.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-BtgNnRgK.js";import"./agent-master-model-DAZL92oe.js";import"./use-conversation-list-DO5J8T1H.js";import"./RailRow-ClMmtaIE.js";/* empty css */import"./content-BmGp9wNl.js";import"./MessagesScreen-CyNIZ3-X.js";import"./AgentMasterScreen-C5WlWNmk.js";/* empty css */import"./right-C1QIbqFZ.js";import"./CodeScreen-CrR2JaVj.js";import"./CodeDiffPane-QvxCUzTi.js";import"./usePierreRuntime-BfZHKAkI.js";/* empty css */import"./CodeProjectPicker-DplkpM7f.js";/* empty css */import"./content-odbb5H4U.js";import"./FollowScreen-wZ-z67mX.js";import"./content-BJ4nHvcu.js";import"./HarnessesScreen-DbKkQM4o.js";import"./useContentSecondaryNav-Bpkc8ayb.js";import"./OpsSubnav-BEU4kKXm.js";/* empty css */import"./left-B4Ak-Ibt.js";import"./content-CQlykFbe.js";import"./HomeHero-DYyd3cpz.js";import"./persistent-state-xJz-qAFc.js";import"./home-moving-signal-BPqBoNSm.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DuD3RFX5.js";import"./file-code-corner-DDPq4Cur.js";import"./right-BrICCmEt.js";import"./left-UulOTcWh.js";import"./mesh-view-store-CiET-yN8.js";import"./mesh-buckets-6y3ZIibI.js";import"./content-DpQdNePJ.js";import"./MeshScreen-BJ-j9YXv.js";import"./MeshCanvas-TvsID4fe.js";import"./chunk-T65CQEWV-BtNvicWs.js";import"./useAgentHoverCard-Bkv-Uz_V.js";import"./local-agents-DKr-gIDC.js";/* empty css */import"./right-BgJ4mQLf.js";import"./left-BMb493FZ.js";import"./mesh-ops-CRR-KnCG.js";import"./use-mesh-ops-items-N1HHhChY.js";import"./content-BNyAjpUl.js";import"./use-scout-dev-flags-B31qTy6m.js";import"./right-CtOLXB9s.js";import"./left-FNH7faCI.js";import"./left-agents-CFMxyEjT.js";import"./left-default-rnX5HANc.js";import"./left-lanes-BpLXT_qH.js";import"./lane-roster-store-Q7pcblY5.js";import"./left-mission-B0bhseWw.js";import"./mission-control-store-DDAgWKUl.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./page-status-Crtgjbq3.js";import"./left-advisor-CJkQS2d6.js";import"./server-nWqndnxu.js";import"./layers-Dz2dKOnU.js";import"./gauge-BVEknshP.js";import"./content-CBWhwaRo.js";import"./OpsScreen-CuYVgkC_.js";/* empty css */import"./MissionControlView-Bj7cAbZd.js";/* empty css */import"./MissionContextRail-Be0uXljQ.js";import"./agent-lane-preview-BhplDYGf.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-DvTw6ts5.js";import"./MissionLogPane-EsM_S3ro.js";import"./OpsAgentsView-DBYtmLnh.js";/* empty css */import"./DataTable-DXIlOlVu.js";/* empty css */import"./HostAdvisorView-NtM0bsg8.js";/* empty css */import"./layout-grid-Bvs5fdB4.js";import"./AtopView-PxWQd-sX.js";/* empty css *//* empty css */import"./AgentLanesPreflight-CFadSaia.js";import"./AgentLaneChrome-CTp39syR.js";import"./AgentLaneCard-ajZvcfdW.js";/* empty css */import"./AgentLaneSummaryResize-VMNDo7kD.js";import"./agent-lane-card-model-CNZMPkhc.js";import"./AgentLaneDetailSheet-DRc-TpMB.js";import"./LaneTraceDetailSheet-C3C8UjXv.js";import"./content-Cpvdcm_l.js";import"./RepoDiffPageScreen-CdTFfmbk.js";import"./RepoDiffViewerLazy-BkBmbi1Z.js";import"./ReposScreen-C8dT4bK0.js";/* empty css */import"./selection-bridge-Dy2mtMyi.js";import"./right-D8id_DWQ.js";import"./content-4nFMLuzF.js";import"./KnowledgeSearchScreen-DvbRRPQB.js";/* empty css */import"./clock-DVvENUU5.js";import"./KnowledgeSearchInspector-CU6BCFcS.js";import"./content-CevL0DgF.js";import"./SessionsScreen-BNvjUflN.js";import"./FlightObserveScreen-qyzHzxLa.js";/* empty css */import"./right-DJ34yMAi.js";import"./content-Ch8pf2bj.js";import"./SettingsScreen-3JvX1WFL.js";import"./StatusPill-BcuYUgsD.js";import"./AgentConfigurationScreen-BD7Unt2P.js";import"./CastPicker-CTBHjjGw.js";import"./SettingsDrawer-BieUmb8g.js";import"./credentials-BTce3VP1.js";import"./VoicePermissionsPanel-Bd16scwz.js";import"./left-CsXQ8Q3G.js";import"./chunk-YOZR3KYS-DN5EJulq.js";import"./session-table-DKSF0mrS.js";import"./Terminal-BlUQY9_Z.js";/* empty css */import"./HerdrSession-CYKRfBad.js";import"./chunk-JTPDIGGW-Ci5j4vzV.js";import"./TerminalHeaderMount-Cy-uxkey.js";import"./right-DiFmtw6d.js";import"./content-DfS3vgAu.js";import"./WorkDetailScreen-DIFQufak.js";import"./WorkFilesViewer-CT5XEFGf.js";import"./right-Bk6h7o-Z.js";import"./RealtimeVoiceScreen-KPHJgO1l.js";import"./agent-autocomplete-DXUBnlkN.js";import"./gestures-3gw5VgUS.js";import"./rocket-D3-TUJ2m.js";function Mt(e){return e?`${e[0]?.toUpperCase()}${e.slice(1)}`:"local"}function $t(e){const t=st(e.trim()),s=t.replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean);return s.length===0?t:s.slice(-2).join("/")}function Ft(e){const t=e?.trim();return t?t.replace(/\.jsonl$/u,"").slice(0,8):"—"}function F(e,t=Date.now()){const{agent:s,source:o,observe:n,lastActiveAt:l}=e,c=s.harness?.trim()||o,p=ot(n),i=$t(s.cwd||s.project||s.projectRoot||"—"),a=p?`${c} · live`:`${c} · ${be(l??t)}`;return{source:Mt(c),sessionRef:Ft(s.harnessSessionId),path:i,statusLine:a,live:p}}const Bt={think:"Thought",tool:"Tool",ask:"Request",message:"Message",note:"Note",system:"System",boot:"Boot"};function Wt({lane:e,event:t,nowMs:s=Date.now()}){const{agent:o,observe:n,source:l,lastActiveAt:c}=e,p=d.useMemo(()=>vt(e),[e]),i=F(e,s),a=t??n?.events?.at(-1),f=a?Bt[a.kind]??a.kind:null,g=n?.metadata?.session?.sessionStart,_=a?ht(a,g):null,h=_!=null?gt(_,c):void 0,m=_!=null?_t(_):void 0,u=a?.kind==="tool"||a?.kind==="ask"?a:void 0;return r.jsxs("div",{className:"scope-lane-detail",children:[r.jsxs("header",{className:"scope-lane-detail__head",children:[r.jsxs("div",{className:"scope-lane-detail__copy",children:[r.jsx("span",{className:"scope-lane-detail__kicker",children:"Lane trace"}),r.jsxs("h2",{className:"scope-lane-detail__title",children:[i.source,r.jsxs("span",{className:"scope-lane-detail__ref",children:[" · ",i.sessionRef]})]}),r.jsxs("div",{className:"scope-lane-detail__sub",children:[i.path,f?` · ${f}`:"",c?` · ${be(c)}`:""]})]}),r.jsx(ft,{harness:o.harness??p.harness,size:18,className:"scope-lane-detail__hmark"})]}),r.jsxs("dl",{className:"scope-lane-detail__meta","aria-label":"Session stats",children:[r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"events"}),r.jsx("dd",{children:p.events})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"tools"}),r.jsx("dd",{children:p.tools})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"files"}),r.jsx("dd",{children:p.files})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"model"}),r.jsx("dd",{children:p.model??"—"})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"branch"}),r.jsx("dd",{children:p.branch??"—"})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"status"}),r.jsx("dd",{children:i.statusLine})]})]}),r.jsx("div",{className:"scope-lane-detail__trace",children:r.jsx(Le,{data:n??void 0,agentId:l==="scout"?o.id:void 0,sessionId:o.harnessSessionId??p.sessionId,showRail:!1,variant:"default",surface:"scope",initialCursorT:a?.t,focusEventId:a?.id,inlineFocusEventId:u?.id,inlineFocusContent:u?r.jsx(St,{event:u,wallLabel:h,wallTitle:m,variant:"inline"}):void 0})})]})}function we({target:e,onClose:t}){const{lane:s,event:o}=e,n=F(s);return r.jsxs(mt,{open:!0,onClose:t,side:"right",owner:"scope.lane-trace",layer:"elevated",resizable:!0,defaultSize:980,minSize:560,maxSize:1280,scrollLock:!0,ariaLabel:`${n.source} ${n.sessionRef} trace`,className:"scope-lane-trace-sheet","data-scope-presentation":!0,children:[r.jsx("div",{className:"scope-lane-trace-sheet__toolbar",children:r.jsx("button",{type:"button",className:"scope-lane-trace-sheet__close",onClick:t,"aria-label":"Close",children:"×"})}),r.jsx(Wt,{lane:s,event:o})]})}function zt(e,t){const[s,o]=d.useState(()=>pe(e));d.useEffect(()=>{o(pe(e))},[e]);const n=d.useCallback(u=>{Me(u),o(u)},[]),l=d.useMemo(()=>bt({autoLanes:t,deck:s,defaultWidthTier:e}),[t,s,e]),c=d.useCallback((u,S="pinned_left")=>{n($e(s,{laneId:u.id,title:xe(u.agent,u.source),zone:S,width:s.laneWidths[u.id]}))},[s,n]),p=d.useCallback(u=>{n(Fe(s,u))},[s,n]),i=d.useCallback((u,S)=>{n(Be(s,u,S))},[s,n]),a=d.useCallback(u=>{n(We(s,u))},[s,n]),f=d.useCallback((u,S)=>{n(de(s,{kind:"harness",title:S??`${u} sessions`,harness:u,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,n]),g=d.useCallback(()=>{n(de(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,n]),_=d.useCallback(()=>{n(ze(s))},[s,n]),h=d.useCallback(u=>Ge(s,u),[s]),m=d.useCallback(u=>He(s,u),[s]);return{deck:s,layout:l,pinLane:c,unpinLane:p,setLaneWidth:i,setDefaultLaneWidth:a,addHarnessLane:f,addAttentionLane:g,clearPins:_,isPinned:h,pinnedZone:m}}const Ne=le("lanes-horizon"),Gt=6e4,Ht=160;function Kt(){try{const e=sessionStorage.getItem(Ne);if(e&&K.some(t=>t.key===e))return e}catch{}return dt}function ye({scoutAgents:e,defaultWidthTier:t="md",harnessFilter:s,projectFilter:o,horizonOverride:n}){const[l,c]=d.useState(Date.now()),[p,i]=d.useState(Kt),a=n??p,[f,g]=d.useState([]),[_,h]=d.useState(()=>new Set),m=ut(),u=nt(a),S=rt(a),{discovery:v,events:b,loadState:k}=xt({includeTranscriptReplay:!0,discoveryIntervalMs:Gt,discoveryLimit:Ht,recentLimit:m,recentWindowMs:u,pauseWhenHidden:!0});d.useEffect(()=>{const x=setInterval(()=>c(Date.now()),1e4);return()=>clearInterval(x)},[]),d.useEffect(()=>{let x=!1;const N=async()=>{if(yt())try{const ee=await wt({includeDiscovered:!1});x||g(ee)}catch{x||g([])}};N();const I=setInterval(()=>{N()},1e4),X=Nt(()=>{N()});return()=>{x=!0,clearInterval(I),X()}},[]),d.useEffect(()=>{try{sessionStorage.setItem(Ne,p)}catch{}},[p]);const y=d.useRef(at()),T=d.useMemo(()=>e.filter(x=>it(x,l,a)),[e,l,a]),C=Lt(T,{pauseWhenHidden:!0}),R=k.discovery==="loading"||k.recent==="loading";d.useEffect(()=>{if(_.size===0)return;const x=setTimeout(()=>h(new Set),900);return()=>clearTimeout(x)},[_]);const{lanes:w,issues:A,freshLaneIds:D}=d.useMemo(()=>{const x=lt({transcripts:v?.transcripts??[],tailEvents:b,processes:v?.processes??[],scoutAgents:e,terminalSessions:f,observeCache:C,now:l,workingOnly:!0,horizon:a}),N=ct(x.lanes,y.current),I=[...pt(v),...x.issues];return{lanes:N.lanes,issues:I,freshLaneIds:N.newLaneIds}},[v,b,e,f,C,l,a]);d.useEffect(()=>{if(A.length!==0)for(const x of A)console.warn(`[agent-lanes] ${x.message}`,x)},[A]),d.useEffect(()=>{D.length!==0&&h(x=>{const N=new Set(x);for(const I of D)N.add(I);return N})},[D.join("\0")]);const O=d.useMemo(()=>w.filter(x=>Ut(x,{harnessFilter:s,projectFilter:o})),[w,s,o]),{deck:W,layout:Z,setLaneWidth:J,setDefaultLaneWidth:Q}=zt(t,O);return{profileId:Ke,now:l,horizon:a,setHorizon:i,horizonLabel:S,traceWindowMs:u,lanes:O,issues:A,newLaneIds:_,tailLoading:R,deck:W,layout:Z,setLaneWidth:J,setDefaultLaneWidth:Q,activeFilterLabel:qt({harnessFilter:s,projectFilter:o})}}function me(e){const t=e?.trim().toLowerCase();return t||null}function se(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Vt(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function fe(e,t){if(!t)return!0;const s=se(t);return e.some(o=>{const n=o?.trim();if(!n)return!1;const l=n.toLowerCase(),c=Vt(n);return l===t||se(n)===s||!!(c&&(c.toLowerCase()===t||se(c)===s))})}function Ut(e,t){const s=me(t.harnessFilter),o=me(t.projectFilter),{agent:n,facts:l,source:c}=e;return fe([n.harness,n.definitionId,l?.attribution,c],s)&&fe([n.project,n.projectRoot,n.cwd,l?.cwd],o)}function qt(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}function Yt(e){return e?`${e[0]?.toUpperCase()}${e.slice(1)}`:"local"}function Zt(e){const t=new Map;for(const s of e){const o=s.agent.harness?.trim()||s.source,n=t.get(o)??[];n.push(s),t.set(o,n)}return[...t.entries()].map(([s,o])=>{const n=[...o].sort((c,p)=>(p.lastActiveAt??0)-(c.lastActiveAt??0)),l=n.filter(c=>F(c).live).length;return{harness:s,label:Yt(s),lanes:n,liveCount:l}}).sort((s,o)=>o.lanes.length-s.lanes.length)}function Jt({lane:e,nowMs:t,onOpen:s}){const o=F(e,t),n=e.observe?.events?.length??0,l=c=>{(c.key==="Enter"||c.key===" ")&&(c.preventDefault(),s(e))};return r.jsxs("div",{className:`scope-dir__row${o.live?" is-live":""}`,role:"button",tabIndex:0,onClick:()=>s(e),onKeyDown:l,"aria-label":`${o.source} ${o.sessionRef}`,children:[r.jsx("span",{className:`scope-dir__dot${o.live?" is-live":""}`,"aria-hidden":!0}),r.jsx("span",{className:"scope-dir__ref",children:o.sessionRef}),r.jsx("span",{className:"scope-dir__path",title:e.agent.cwd??e.agent.project??void 0,children:o.path}),r.jsxs("span",{className:"scope-dir__events",children:[n,r.jsx("span",{className:"scope-dir__unit",children:"ev"})]}),r.jsx("span",{className:"scope-dir__status",children:o.statusLine})]})}function Qt({navigate:e,agents:t}){const s=q(),{now:o,horizonLabel:n,lanes:l,tailLoading:c}=ye({scoutAgents:t,defaultWidthTier:"md"}),p=d.useMemo(()=>Zt(l),[l]),[i,a]=d.useState(null),f=d.useCallback(h=>{const m=h.observe?.events?.at(-1);m&&a({lane:h,event:m})},[]),g=l.length,_=p.reduce((h,m)=>h+m.liveCount,0);return r.jsxs("div",{className:"scope-dir","data-scope-presentation":!0,...s,children:[r.jsx("header",{className:"scope-dir__bar",children:r.jsxs("div",{className:"scope-dir__summary",children:[r.jsxs("span",{className:"scope-dir__count",children:[g," instance",g===1?"":"s"]}),_>0?r.jsxs("span",{className:"scope-dir__live",children:[_," live"]}):null,r.jsxs("span",{className:"scope-dir__window",children:["window ",n]})]})}),p.length===0?r.jsx("div",{className:"scope-dir__empty",children:c?"Discovering sessions…":"No sessions discovered for this workspace."}):r.jsx("div",{className:"scope-dir__body",children:p.map(h=>r.jsxs("section",{className:"scope-dir__group",children:[r.jsxs("header",{className:"scope-dir__group-head",children:[r.jsx("span",{className:"scope-dir__group-name",children:h.label}),r.jsx("span",{className:"scope-dir__group-kind",children:"runtime"}),r.jsxs("span",{className:"scope-dir__group-counts",children:[h.lanes.length," ",h.lanes.length===1?"instance":"instances",h.liveCount?` · ${h.liveCount} live`:""]})]}),r.jsx("div",{className:"scope-dir__list",role:"list",children:h.lanes.map(m=>r.jsx(Jt,{lane:m,nowMs:o,onOpen:f},m.id))})]},h.harness))}),i?r.jsx(we,{target:i,onClose:()=>a(null)}):null]})}function Xt({laneId:e,grabbed:t,onKeyMove:s,onDragStart:o,onDragEnd:n}){const l=i=>{if(!(!i.altKey||!s)){if(i.key==="ArrowLeft"||i.key==="ArrowUp"){i.preventDefault(),i.stopPropagation(),s("before");return}(i.key==="ArrowRight"||i.key==="ArrowDown")&&(i.preventDefault(),i.stopPropagation(),s("after"))}},c=i=>{i.stopPropagation();const a=i.dataTransfer;if(!a)return;a.setData("text/plain",e),a.effectAllowed="move";const f=i.currentTarget.closest("[data-lane-id]");f instanceof HTMLElement&&(a.setDragImage(f,Math.min(48,f.clientWidth/2),18),f.classList.add("is-dragging")),o?.(e)},p=i=>{i.currentTarget.closest("[data-lane-id]")?.classList.remove("is-dragging"),n?.()};return r.jsx("span",{className:"scope-lane__drag",role:"button",tabIndex:0,draggable:!0,"aria-grabbed":t?"true":"false","aria-keyshortcuts":"Alt+ArrowLeft Alt+ArrowRight Alt+ArrowUp Alt+ArrowDown","aria-label":"Drag to reorder lane. Drop in a gutter for a new column. Alt+arrow keys also move.",title:"Drag to reorder · drop in gutters for a new column",onClick:i=>i.stopPropagation(),onKeyDown:l,onDragStart:c,onDragEnd:p,children:"⠿"})}const es=["sm","md","lg"],ts={sm:"¼",md:"½",lg:"full"},ss={sm:"Quarter row",md:"Half row",lg:"Full row"};function je({value:e,defaultValue:t,onChange:s,compact:o=!1,label:n="Lane width",variant:l="tier"}){const c=typeof e=="string"?e:t,p=l==="grid";return r.jsx("div",{className:`scope-lane-width${o?" is-compact":""}${p?" is-grid":""}`,role:"group","aria-label":n,onClick:i=>i.stopPropagation(),onKeyDown:i=>i.stopPropagation(),children:es.map(i=>r.jsx("button",{type:"button",className:`scope-lane-width__btn${c===i?" is-on":""}`,"aria-pressed":c===i,title:p?ss[i]:`${i.toUpperCase()} column width`,onClick:()=>s(i),children:p?ts[i]:i},i))})}function os({lane:e,layoutMode:t,compact:s,laneWidth:o,defaultLaneWidth:n,onLaneWidthChange:l,nowMs:c,traceWindowMs:p,traceWindowLabel:i,onOpenTrace:a,onTraceEventSelect:f,onDragStart:g,onDragEnd:_,onDragKeyMove:h,focusProps:m}){const{agent:u,observe:S,source:v}=e,b=F(e,c),k=!!(S&&S.events.length>0),y=m?.ref,T=m?{"data-cursor":m["data-cursor"],tabIndex:m.tabIndex,onFocus:m.onFocus}:void 0,C=()=>{const w=S?.events?.at(-1);a(e,w)},R=w=>{(w.key==="Enter"||w.key===" ")&&(w.preventDefault(),C())};return r.jsxs("article",{ref:y,"data-lane-id":e.id,className:["scope-lane",b.live?"is-live":"",m?.["data-cursor"]?"is-cursor":"",s?"is-stack-compact":"",t==="grid"?"is-grid":""].filter(Boolean).join(" "),...T,children:[r.jsxs("header",{className:`scope-lane__head${s?" is-compact":""}`,role:"button",tabIndex:0,onClick:w=>{w.target instanceof HTMLElement&&w.target.closest(".scope-lane__drag")||C()},onKeyDown:R,"aria-label":`${b.source} ${b.sessionRef}`,children:[r.jsx(Xt,{laneId:e.id,onKeyMove:h,onDragStart:g,onDragEnd:_}),r.jsx("span",{className:"scope-lane__live","aria-hidden":"true"}),r.jsxs("div",{className:"scope-lane__meta",children:[r.jsxs("span",{className:"scope-lane__source",children:[b.source,r.jsxs("span",{className:"scope-lane__ref",children:[" · ",b.sessionRef]})]}),r.jsx("span",{className:"scope-lane__path",title:u.cwd??u.project??void 0,children:b.path}),s?null:r.jsx("span",{className:"scope-lane__status",children:b.statusLine}),l&&(t==="grid"||!s)?r.jsx(je,{value:o,defaultValue:n,onChange:l,compact:!0,label:`${b.sessionRef} width`,variant:t==="grid"?"grid":"tier"}):null]})]}),r.jsx("section",{className:"scope-lane__trace","aria-label":`${xe(u,v)} trace · ${i}`,children:k?r.jsx(Le,{data:S??void 0,agentId:v==="scout"?u.id:void 0,sessionId:u.harnessSessionId,showRail:!1,variant:"lane",surface:"scope",nowMs:c,traceWindowMs:p,traceWindowLabel:i,onLaneEventSelect:w=>f(e,w)}):r.jsx("div",{className:"scope-lane__empty",children:"waiting for events"})})]})}function ns({space:e,layoutMode:t,widthPx:s,gridSpan:o,children:n}){const l=t==="swim"?{"--scope-lane-width":`${s}px`}:t==="grid"&&o?{gridColumn:`span ${o}`}:void 0;return r.jsx("div",{className:`scope-lane-space${t==="grid"?" is-grid":""}`,style:l,"data-split":e.ids.length,"data-orient":e.orient,"data-grid-span":t==="grid"?o:void 0,children:r.jsx("div",{className:"scope-lane-space__lanes",children:n})})}const rs=[{key:"swim",label:"swim"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}];function as({liveCount:e,horizon:t,horizonLabel:s,layoutMode:o,laneWidth:n,onHorizonChange:l,onLayoutChange:c,onLaneWidthChange:p}){const i=o==="floor";return r.jsxs("header",{className:"scope-lanes-bar",children:[r.jsxs("div",{className:"scope-lanes-bar__summary",children:[r.jsxs("span",{className:"scope-lanes-bar__count",children:[e," lane",e===1?"":"s"]}),r.jsx("span",{className:"scope-lanes-bar__window",children:i?"past 30m · lanes 4h":`window ${s}`})]}),r.jsxs("div",{className:"scope-lanes-bar__controls",children:[r.jsx("div",{className:"scope-lanes-bar__layouts",role:"group","aria-label":"Lane layout",children:rs.map(a=>r.jsx("button",{type:"button",className:`scope-lanes-bar__layout${o===a.key?" is-on":""}`,"aria-pressed":o===a.key,onClick:()=>c(a.key),children:a.label},a.key))}),i?null:r.jsxs(r.Fragment,{children:[r.jsx(je,{value:n,defaultValue:n,onChange:p,label:"Default column width",variant:o==="grid"?"grid":"tier"}),r.jsx("div",{className:"scope-lanes-bar__horizons",role:"group","aria-label":"Activity window",children:K.map(a=>r.jsx("button",{type:"button",className:`scope-lanes-bar__horizon${t===a.key?" is-on":""}`,"aria-pressed":t===a.key,onClick:()=>l(a.key),children:a.label},a.key))})]})]})]})}const V=.22,ce=.46,$=14,U=12,oe={mode:null,before:!0,slotIndex:-1,stackBand:0,targetAgentId:null};function G(e,t){return[...t.querySelectorAll(".scope-lane-space")].indexOf(e)}function is(e){return[...e.querySelectorAll("[data-lane-id]")].map(t=>t.getAttribute("data-lane-id")).filter(t=>!!t)}function z(e){return e?.querySelector("[data-lane-id]")??null}function ke(e,t){const s=e.filter(n=>{const l=n.getBoundingClientRect();return t>=l.top-$&&t<=l.bottom+$});if(!s.length)return[];const o=s[0].getBoundingClientRect().top;return e.filter(n=>Math.abs(n.getBoundingClientRect().top-o)<=$)}function E(e){return{before:!1,stackBand:0,targetAgentId:null,label:"",previewColumn:!1,col:null,...e}}function ls(e,t,s){const o=[...e.querySelectorAll(".scope-lane-space")];if(!o.length)return null;const n=ke(o,s);if(!n.length)return null;const l=n[0].getBoundingClientRect().top,c=Math.max(...n.map(f=>f.getBoundingClientRect().bottom));if(s<l-$||s>c+$)return null;const p=n[0].getBoundingClientRect(),i=G(n[0],e),a=Math.max(U*3,p.width*V);if(t<=p.left+a)return E({mode:"reorder",before:!0,slotIndex:i,slot:n[0],col:z(n[0]),label:"new column",previewColumn:!0});for(let f=0;f<n.length;f+=1){const g=n[f],_=g.getBoundingClientRect(),h=G(g,e),m=n[f+1],u=Math.max(U*3,_.width*V);if(m){const S=m.getBoundingClientRect(),v=_.right-u*.4,b=S.left+u*.4;if(t>=v&&t<=b){const k=(_.right+S.left)/2;if(t<k)return E({mode:"reorder",before:!1,slotIndex:h,slot:g,col:z(g),label:"new column",previewColumn:!0});const y=G(m,e);return E({mode:"reorder",before:!0,slotIndex:y,slot:m,col:z(m),label:"new column",previewColumn:!0})}continue}if(t>=_.right-u)return E({mode:"reorder",before:!1,slotIndex:h,slot:g,col:z(g),label:"new column",previewColumn:!0})}return null}function cs(e,t,s,o,n,l){const c=s.closest(".scope-lane-space");if(!c)return null;const p=s.getBoundingClientRect(),i=c.getBoundingClientRect(),a=G(c,o),f=is(c),g=(t-p.top)/p.height,_=(e-p.left)/p.width,h=(e-i.left)/i.width;if(g<ce){if(h<V)return E({mode:"reorder",before:!0,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0});if(h>1-V)return E({mode:"reorder",before:!1,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0});const S=_<.5;return E({mode:"reorder",before:S,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0})}const m=c.dataset.orient||"row";if(l<=1){const S=_<.5;return E({mode:"reorder",before:S,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0})}if(m==="column"&&f.length>=l&&!f.includes(n)){const S=_<.5;return E({mode:"reorder",before:S,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0})}const u=ps(c,t);return E({mode:"stack",stackBand:u.band,targetAgentId:s.getAttribute("data-lane-id"),slotIndex:a,slot:c,col:s,label:u.label,stackPreview:u.preview})}function H(e){const t=e.top+e.height*ce;return{top:t,left:e.left,width:e.width,height:Math.max(24,e.bottom-t)}}function he(e,t){return t<=1?e>=1:e>=t}function ps(e,t){const s=e.getBoundingClientRect(),o=[...e.querySelectorAll("[data-lane-id]")];if(!o.length)return{band:0,label:"stack",preview:H(s)};if(o.length===1){const p=o[0].getBoundingClientRect(),i=p.top+p.height*ce,a=p.top+p.height*.5,f=t<a?0:1,g=f===0?{top:i,left:s.left,width:s.width,height:Math.max(18,a-i)}:H(s);return{band:f,label:f===0?"stack above":"stack below",preview:g}}let n=o.length;for(let p=0;p<o.length;p+=1){const i=o[p].getBoundingClientRect();if(t<i.top+i.height/2){n=p;break}}let l;if(he(n,o.length))l=H(s);else if(n===0){const p=o[0].getBoundingClientRect();l={top:p.top,left:s.left,width:s.width,height:Math.max(18,p.height*.5)}}else{const p=o[n-1].getBoundingClientRect(),i=o[n].getBoundingClientRect();l={top:(p.bottom+i.top)/2-10,left:s.left,width:s.width,height:20}}const c=n===0?"stack top":he(n,o.length)?"stack bottom":"stack between";return{band:n,label:c,preview:l}}function ds(e,t,s,o,n){const l=document.elementFromPoint(e,t);if(l&&s.contains(l)){const c=l.closest("[data-lane-id]"),p=c?.getAttribute("data-lane-id");if(c&&p&&p!==o&&!c.classList.contains("is-dragging"))return cs(e,t,c,s,o,n)}return ls(s,e,t)}function us(e){return e.querySelector(".scope-lane-space")?.getBoundingClientRect().width||360}function ms(e){return[e.mode,e.slotIndex,e.before,e.stackBand,e.targetAgentId,e.label,e.previewColumn,e.col?.getAttribute("data-lane-id")].join("|")}function fs(e,t,s,o){const n=t.getBoundingClientRect(),l=s.slot.getBoundingClientRect();if(s.mode==="stack"){const g=s.stackPreview??H(l),_=s.label==="stack below"||s.label==="stack bottom";e.hidden=!1,e.className=`scope-lane-drop is-band${_?" is-bottom-stack":""}`,e.dataset.mode="stack",e.dataset.label=s.label||"",e.style.transform=`translate(${g.left-n.left+t.scrollLeft}px, ${g.top-n.top+t.scrollTop}px)`,e.style.width=`${g.width}px`,e.style.height=`${g.height}px`;return}if(s.previewColumn){const g=us(t),_=[...t.querySelectorAll(".scope-lane-space")],h=ke(_,l.top+l.height/2),m=(h.length?h:[s.slot]).map(b=>b.getBoundingClientRect()),u=Math.max(...m.map(b=>b.height),l.height),S=Math.min(...m.map(b=>b.top)),v=Math.max(0,s.before?l.left-n.left+t.scrollLeft-g-U/2:l.right-n.left+t.scrollLeft+U/2);e.hidden=!1,e.className="scope-lane-drop is-column",e.dataset.mode="column",e.dataset.label=s.label||"",e.style.transform=`translate(${v}px, ${S-n.top+t.scrollTop}px)`,e.style.width=`${g}px`,e.style.height=`${u}px`;return}const c=s.slot.dataset.orient||"row";let p,i,a,f;c==="column"?(p=l.left-n.left+t.scrollLeft,i=(s.before?l.top:l.bottom)-n.top+t.scrollTop-2,a=l.width,f=3):(p=(s.before?l.left:l.right)-n.left+t.scrollLeft-2,i=l.top-n.top+t.scrollTop,a=3,f=l.height),e.hidden=!1,e.className="scope-lane-drop is-line",e.dataset.mode="reorder",e.dataset.label=s.label||"",e.style.transform=`translate(${p}px, ${i}px)`,e.style.width=`${a}px`,e.style.height=`${f}px`}function ne(e,t,s={}){!s.keepIndicator&&t&&(t.hidden=!0,t.className="scope-lane-drop",delete t.dataset.label,delete t.dataset.mode,t.style.transform="",t.style.width="",t.style.height=""),e&&(e.querySelectorAll(".scope-lane-space").forEach(o=>{delete o.dataset.dropZone}),e.querySelectorAll("[data-lane-id].is-drop-target").forEach(o=>{o.classList.remove("is-drop-target"),delete o.dataset.dropZone,delete o.dataset.dropLabel}))}function hs({stackMax:e,onReorder:t,onStack:s,indicatorRef:o}){const n=d.useRef(null),l=d.useRef(null),c=d.useRef(oe),p=d.useRef(""),i=d.useCallback(h=>{n.current?.closest(".scope-lanes")?.classList.toggle("is-dragging",h)},[]),a=d.useCallback(h=>{l.current=h,p.current="",c.current=oe,i(!0)},[i]),f=d.useCallback(()=>{l.current=null,p.current="",c.current=oe,ne(n.current,o.current),i(!1)},[o,i]),g=d.useCallback(h=>{const m=l.current;if(!m)return;h.preventDefault(),h.dataTransfer.dropEffect="move";const u=n.current,S=o.current;if(!u||!S)return;const v=ds(h.clientX,h.clientY,u,m,e);if(!v){p.current&&(p.current="",ne(u,S));return}const b=ms(v);if(b===p.current)return;const k=!!(p.current&&v.mode==="reorder");p.current=b,c.current={mode:v.mode,before:v.before,slotIndex:v.slotIndex,stackBand:v.stackBand??0,targetAgentId:v.targetAgentId??null},ne(u,S,{keepIndicator:k}),v.col&&(v.col.classList.add("is-drop-target"),v.col.dataset.dropZone=v.mode,v.label&&(v.col.dataset.dropLabel=v.label)),v.slot.dataset.dropZone=v.mode,fs(S,u,v)},[o,e]),_=d.useCallback(h=>{h.preventDefault();const m=h.dataTransfer.getData("text/plain")||l.current,u=c.current;if(!m||u.slotIndex<0||!u.mode){f();return}u.mode==="stack"?s(m,u.slotIndex,u.stackBand):t(m,u.slotIndex,u.before),f()},[f,t,s]);return d.useEffect(()=>{const h=m=>{m.key!=="Escape"||!l.current||f()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[f]),{scrollRef:n,onDragStart:a,onDragEnd:f,scrollDragProps:{onDragEnter:h=>{l.current&&h.preventDefault()},onDragOver:g,onDrop:_}}}const re=le("lane-spaces"),gs=2,_s=6,B=4;function Ss(e){const t=Number(e);return Number.isFinite(t)?Math.min(_s,Math.max(gs,Math.round(t))):B}function Y(e){if(Array.isArray(e))return{ids:e.filter(s=>typeof s=="string"),orient:"row"};if(e&&typeof e=="object"&&Array.isArray(e.ids)){const t=e;return{ids:t.ids.filter(o=>typeof o=="string"),orient:t.orient==="column"?"column":"row"}}return{ids:[],orient:"row"}}function vs(e,t,s=B){const o=new Set(t),n=new Set,l=[];for(const c of e){const p=Y(c),i=p.ids.filter(g=>o.has(g)&&!n.has(g));if(i.forEach(g=>n.add(g)),!i.length)continue;const a=i.length===1?"row":p.orient,f=a==="column"?s:4;l.push({ids:i.slice(0,f),orient:a})}for(const c of t)n.has(c)||(l.push({ids:[c],orient:"row"}),n.add(c));return l}function ge(e,t,s=B){return t.length?vs(t,e,s):e.map(o=>({ids:[o],orient:"row"}))}function Ee(e,t){return e.map(s=>{const o=Y(s),n=o.ids.filter(l=>l!==t);return n.length?{ids:n,orient:n.length===1?"row":o.orient}:null}).filter(s=>s!==null)}function bs(e,t,s,o){const n=Ee(e,t),l=Math.min(o?s:s+1,n.length);return n.splice(l,0,{ids:[t],orient:"row"}),n}function xs(e,t,s,o,n=B){const l=Ee(e,t),p=[...Y(l[s]??{ids:[],orient:"row"}).ids],i=Math.min(Math.max(0,o),p.length);p.splice(i,0,t);const a=p.slice(0,n);return l[s]={ids:a,orient:a.length>1?"column":"row"},l}function Ls(){try{const e=sessionStorage.getItem(re);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.map(Y).filter(s=>s.ids.length>0):[]}catch{return[]}}function ws(e){try{if(!e.length){sessionStorage.removeItem(re);return}sessionStorage.setItem(re,JSON.stringify(e))}catch{}}function Ns(e,t=B){const s=d.useMemo(()=>e.map(m=>m.lane.id),[e]),o=d.useMemo(()=>new Map(e.map(m=>[m.lane.id,m])),[e]),[n,l]=d.useState(()=>Ls()),[c,p]=d.useState(()=>n.length>0),i=d.useMemo(()=>c?ge(s,n,t):ge(s,[],t),[s,c,t,n]);d.useEffect(()=>{c&&ws(i)},[c,i]);const a=d.useCallback(m=>{p(!0),l(m)},[]),f=d.useCallback((m,u,S)=>{a(bs(i,m,u,S))},[a,i]),g=d.useCallback((m,u,S,v=t)=>{a(xs(i,m,u,S,v))},[a,i,t]),_=d.useMemo(()=>i.map(m=>({space:m,columns:m.ids.map(u=>o.get(u)).filter(u=>u!==void 0)})).filter(m=>m.columns.length>0),[o,i]),h=d.useMemo(()=>_.flatMap(m=>m.columns),[_]);return{spaces:i,resolvedSpaces:_,flatColumns:h,reorderLane:f,stackLane:g,stackMax:Ss(t)}}function ys({lanes:e,onOpenTrace:t,onHorizonChange:s}){const[o,n]=d.useState(-1),l=d.useRef(new Map);d.useEffect(()=>{if(o<0)return;if(o>=e.length){n(e.length-1);return}const i=e[o];if(!i)return;const a=l.current.get(i.id);a?.scrollIntoView({block:"nearest",inline:"nearest"}),a?.focus()},[o,e]);const c=d.useCallback((i,a)=>{a?l.current.set(i,a):l.current.delete(i)},[]);d.useEffect(()=>{const i=a=>{if(!document.querySelector(".scope-lanes")||kt(a.target)||Et()||e.length===0)return;const f=Number(a.key)-1;if(!a.metaKey&&!a.ctrlKey&&!a.altKey&&f>=0&&f<K.length){a.preventDefault(),s(K[f].key);return}if(a.key==="ArrowRight"||a.key==="ArrowDown"||a.key==="j"){a.preventDefault(),n(g=>ue(g,e.length,1));return}if(a.key==="ArrowLeft"||a.key==="ArrowUp"||a.key==="k"){a.preventDefault(),n(g=>ue(g,e.length,-1));return}if(a.key==="Home"||a.key==="g"&&!a.shiftKey){a.preventDefault(),n(0);return}if(a.key==="End"||a.key==="G"){a.preventDefault(),n(e.length-1);return}if(a.key==="Enter"||a.key===" "){const g=o<0?0:o,_=e[g];if(!_)return;a.preventDefault(),n(g),t(_,_.observe?.events?.at(-1))}};return window.addEventListener("keydown",i),()=>window.removeEventListener("keydown",i)},[o,e,s,t]);const p=d.useCallback((i,a)=>({"data-cursor":o===i?!0:void 0,tabIndex:o===i?0:-1,ref:f=>c(a,f),onFocus:()=>n(i)}),[o,c]);return{focusedIndex:o,getLaneFocusProps:p}}const Ce=4;function Ae(e){switch(e){case"sm":return 1;case"md":return 2;case"lg":return Ce}}function js(e,t){if(e==="sm"||e==="md"||e==="lg")return e;if(typeof e=="number"&&Number.isFinite(e)){const{tier:s,px:o}=Ve(e);if(s)return s;let n=t,l=Number.POSITIVE_INFINITY;for(const[c,p]of Object.entries(Ue)){const i=Math.abs(p-o);i<l&&(l=i,n=c)}return n}return t}function ks(e,t){return Ae(js(e,t))}function Es(e,t){return e.length?Math.max(...e.map(s=>ks(s,t))):Ae(t)}const ae=le("lanes-layout");function Ie(e){return e==="swim"||e==="grid"||e==="floor"}function Cs(){try{const e=sessionStorage.getItem(ae);if(Ie(e))return e}catch{}return"swim"}function _e(){if(typeof window>"u")return null;const e=new URLSearchParams(window.location.search).get("layout")?.trim().toLowerCase();return Ie(e)?e:null}function As(){const[e,t]=d.useState(()=>_e()??Cs()),s=d.useCallback(o=>{t(o);try{sessionStorage.setItem(ae,o)}catch{}typeof window>"u"||qe({searchPatch:{layout:o==="swim"?null:o},replace:!0})},[]);return d.useEffect(()=>{const o=_e();if(o&&o!==e){t(o);try{sessionStorage.setItem(ae,o)}catch{}}},[e]),{layoutMode:e,setLayoutMode:s}}function Is({message:e}){return r.jsx("li",{className:"scope-lanes__issue",children:r.jsx("span",{className:"scope-lanes__issue-msg",children:e})})}function Ts({navigate:e,agents:t}){const s=q(),{layoutMode:o,setLayoutMode:n}=As(),l=o==="floor",{now:c,horizon:p,setHorizon:i,horizonLabel:a,traceWindowMs:f,lanes:g,layout:_,deck:h,setLaneWidth:m,setDefaultLaneWidth:u,activeFilterLabel:S,issues:v,tailLoading:b}=ye({scoutAgents:t,defaultWidthTier:"md",horizonOverride:l?"4h":void 0}),{resolvedSpaces:k,flatColumns:y,reorderLane:T,stackLane:C,stackMax:R}=Ns(_.flat),w=o==="grid",[A,D]=d.useState(null),O=d.useRef(null),{scrollRef:W,onDragStart:Z,onDragEnd:J,scrollDragProps:Q}=hs({stackMax:R,onReorder:T,onStack:C,indicatorRef:O}),x=d.useCallback(L=>{W.current=L},[W]),N=d.useCallback((L,M)=>{const P=M??L.observe?.events?.at(-1);P&&D({lane:L,event:P})},[]),I=d.useMemo(()=>{const L=new Map;return y.forEach((M,P)=>L.set(M.lane.id,P)),L},[y]),{getLaneFocusProps:X}=ys({lanes:y.map(L=>L.lane),onOpenTrace:N,onHorizonChange:i}),ee=d.useMemo(()=>b?"Loading sessions…":S?`No lanes match ${S} in the last ${a}.`:`No sessions with recent work in the last ${a}.`,[S,a,b]);return r.jsxs("div",{className:`scope-lanes${o==="grid"?" is-grid":""}`,"data-scope-presentation":!0,"data-scope-view":"lanes","data-scope-layout":o,"data-grid-cols":w?Ce:void 0,style:{"--scope-lane-stack-max":String(R)},...s,children:[r.jsx(as,{liveCount:l?g.length:y.length,horizon:p,horizonLabel:a,layoutMode:o,laneWidth:h.defaultLaneWidth,onHorizonChange:i,onLayoutChange:n,onLaneWidthChange:u}),v.length>0?r.jsx("div",{className:"scope-lanes__issues",role:"status","aria-live":"polite",children:r.jsx("ul",{className:"scope-lanes__issues-list",children:v.map(L=>r.jsx(Is,{message:L.message},L.id))})}):null,(l?g.length:y.length)===0?r.jsx("div",{className:"scope-lanes__empty",children:ee}):l?r.jsx(jt,{lanes:g,now:c,onOpenTrace:N}):r.jsx("div",{className:"scope-lanes__canvas",role:"listbox","aria-label":"Session lanes",children:r.jsxs("div",{ref:x,className:`scope-lanes__scroll${o==="grid"?" is-grid":""}`,...Q,children:[k.map((L,M)=>{const P=L.space.orient==="column"&&L.columns.length>1,Te=Math.max(...L.columns.map(j=>j.widthPx)),Re=w?Es(L.columns.map(j=>h.laneWidths[j.lane.id]??h.defaultLaneWidth),h.defaultLaneWidth):void 0;return r.jsx(ns,{space:L.space,layoutMode:o,widthPx:Te,gridSpan:Re,children:L.columns.map(j=>{const De=I.get(j.lane.id)??0;return r.jsx(os,{lane:j.lane,layoutMode:o,compact:P,laneWidth:h.laneWidths[j.lane.id]??h.defaultLaneWidth,defaultLaneWidth:h.defaultLaneWidth,onLaneWidthChange:te=>m(j.lane.id,te),nowMs:c,traceWindowMs:f,traceWindowLabel:a,onOpenTrace:N,onTraceEventSelect:N,onDragStart:Z,onDragEnd:J,onDragKeyMove:te=>{T(j.lane.id,M,te==="before")},focusProps:X(De,j.lane.id)},j.key)})},L.space.ids.join(":"))}),r.jsx("div",{ref:O,className:"scope-lane-drop","aria-hidden":"true",hidden:!0})]})}),A?r.jsx(we,{target:A,onClose:()=>D(null)}):null]})}const Rs=1e4;function Ds({route:e,navigate:t}){const s=q(),[o,n]=d.useState(null),[l,c]=d.useState(null),p=d.useCallback(async()=>{c(null);try{n(await Ct("/api/tail/discover"))}catch(f){c(f instanceof Error?f.message:String(f))}},[]);d.useEffect(()=>{p();const f=setInterval(()=>{p()},Rs);return()=>clearInterval(f)},[p]);const i=o?.transcripts?.length??0,a=o?.processes?.length??0;return e.sessionId?r.jsx("div",{className:"scope-sessions-route","data-scope-view":"sessions",...s,children:r.jsx(It,{sessionRef:e.sessionId,navigate:t})}):r.jsx("div",{className:"scope-sessions-route","data-scope-view":"sessions",...s,children:r.jsxs("div",{className:"scope-sessions",children:[r.jsx("header",{className:"scope-sessions__bar",children:r.jsxs("div",{className:"scope-sessions__summary",children:[r.jsxs("span",{className:"scope-sessions__count",children:[i," session",i===1?"":"s"]}),a>0?r.jsxs("span",{className:"scope-sessions__live",children:[a," active"]}):null,l?r.jsx("span",{className:"scope-sessions__warn",children:"discovery error"}):null]})}),r.jsx("div",{className:"scope-sessions__body",children:r.jsx("div",{className:"scope-sessions__atop",children:r.jsx(At,{navigate:t})})})]})})}function Ps({navigate:e,tailQuery:t}){const s=q();return r.jsx("div",{className:"scope-tail-route","data-scope-view":"tail",...s,children:r.jsxs("div",{className:"scope-tail",children:[r.jsx("header",{className:"scope-tail__bar",children:r.jsxs("div",{className:"scope-tail__summary",children:[r.jsx("span",{className:"scope-tail__count",children:"tail"}),r.jsx("span",{className:"scope-tail__hint",children:"live event stream"}),t?r.jsxs("span",{className:"scope-tail__query",title:t,children:["q=",t]}):null]})}),r.jsx("div",{className:"scope-tail__body",children:r.jsx("div",{className:"scope-tail__stream",children:r.jsx(Tt,{navigate:e,initialFilter:t,variant:"tail",chrome:"embedded"})})})]})})}function Os(e,t,s,o){if(!Ye(o))return null;const n=Ze(e);if(!n)return null;switch(n){case"lanes":return r.jsx(Ts,{navigate:t,agents:s});case"tail":return e.view!=="ops"||e.mode!=="tail"?null:r.jsx(Ps,{navigate:t,tailQuery:e.tailQuery});case"sessions":return e.view!=="sessions"?null:r.jsx(Ds,{route:e,navigate:t});case"agents":return e.view!=="agents-v2"||tt(e)?null:r.jsx(Qt,{navigate:t,agents:s});default:return null}}function Ms(){const{route:e,navigate:t,agents:s}=ve(),{pathname:o}=Je(),n=Os(e,t,s,o);return r.jsx(Xe,{children:n??et(e,t,s)})}function $s(){const{route:e,navigate:t}=ve();return Ot({className:"scout-nav-tabs scout-nav-tabs--scope",brandTag:Qe,items:Oe,activeKey:Pe(e),navigate:t})}function Fs(){const e=ie(),t=Rt(),s=$s();return Se("nav.sidebar",!1)?null:e?s:t}function Bs(){const e=ie(),t=Dt();return Se("nav.sidebar",!1)?null:e?d.createElement("div",{className:"scout-nav-actions"}):t}function Ws(){const e=ie(),t=Pt();return e?{active:!1,dismissible:!0}:t}function El(e){e.slots.Content=Ms,e.hooks.useNavCenter=Fs,e.hooks.useNavActions=Bs,e.hooks.useTakeover=Ws}export{Qe as SCOPE_BRAND_LABEL,Il as SCOPE_ENABLE_HINTS,Ql as SCOPE_FLAG_BUNDLE,Xl as SCOPE_FLAG_BUNDLE_ALIASES,ec as SCOPE_FLAG_KEY,Ol as SCOPE_FLAG_REGISTRY_KEY,Ml as SCOPE_LANE_DECK_DEFAULTS,Ke as SCOPE_LANE_DECK_PROFILE,tc as SCOPE_LEGACY_FLAG_BUNDLE,sc as SCOPE_LEGACY_FLAG_KEY,oc as SCOPE_LEGACY_PATH_PREFIX,nc as SCOPE_LEGACY_PATH_SEGMENT,rc as SCOPE_PATH_PREFIX,ac as SCOPE_PATH_SEGMENT,ic as SCOPE_ROUTE_SEGMENTS,lc as SCOPE_STORAGE_PREFIX,Oe as SCOPE_TOP_NAV_ITEMS,Ms as ScopeAppContent,Qt as ScopeDirView,os as ScopeLaneColumn,Wt as ScopeLaneDetailView,we as ScopeLaneTraceSheet,as as ScopeLanesBar,Ts as ScopeLanesView,$l as buildScopePath,Fl as buildScopeRoutePath,cc as canonicalizeScopePathname,Tl as isScopeOnboardingExempt,Ye as isScopePath,Bl as isScopePresentation,Wl as parseScopeRouteFromUrl,zl as preserveLocationSearch,Os as resolveScopeContentPane,Gl as routeBelongsInScopeNamespace,Ze as routeToScopeSegment,Hl as scopeInstrumentBundleLayer,Kl as scopeLaneDeckProfileId,Vl as scopePresentationAttrs,Rl as scopePresentationTitle,Ul as scopeRoutePath,le as scopeStorageKey,ql as scopeSurfaceFlagDefinition,Pe as scopeTopNavKeyForRoute,Yl as scopeViewSegment,Zl as segmentToRoute,ie as useScopePresentation,q as useScopePresentationAttrs,Dl as useScopeShellChrome,El as wireScopeOntoScout};
@@ -0,0 +1 @@
1
+ import{e as r}from"./index-BI9AljSD.js";var o=r();export{o as r};
@@ -1,2 +1,2 @@
1
- import{r as o,j as e}from"./index-CZ-05hKz.js";import{u as b}from"./Provider-B2xuo3rf.js";import{o as k}from"./openAgent-Dbv5wfuL.js";import{o as y}from"./openContent-C6XO6kr5.js";import{a as A,i as S,b as I,c as O}from"./colors-BtO5_zlx.js";import{a as j}from"./api-Co9aQ2Jw.js";import{c as T}from"./clipboard-e3fSpeo7.js";import{u as E}from"./sse-CiOSzE5n.js";import{t as v}from"./time-Dhsh_2EG.js";import{X as B}from"./x-e3h2hDsp.js";import{C as $}from"./check-C18YQC90.js";import{C as L}from"./copy-Dtpx4FOE.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./index-BWHgHrtv.js";const P={mission:"Control",advisor:"Host Advisor",issues:"Alerts",tail:"Tail",atop:"Runtime",agents:"Agents",lanes:"Lanes"};function Ie({mode:t,agents:s,navigate:c,returnRoute:i}){const[l,r]=o.useState(null),[n,g]=o.useState(()=>typeof window>"u"?null:N(window.scoutOpsDetailSnapshot)),x=o.useCallback(async()=>{const a=await j("/api/fleet").catch(()=>null);r(a)},[]);if(o.useEffect(()=>{x()},[x]),o.useEffect(()=>{const a=h=>{g(N(h.detail))};return window.addEventListener("scout:ops-detail",a),()=>window.removeEventListener("scout:ops-detail",a)},[]),E(a=>{(a.kind==="message.posted"||a.kind==="flight.updated"||a.kind==="collaboration.event.appended")&&x()}),t==="advisor")return e.jsx(H,{navigate:c});if(t==="tail"||t==="issues")return e.jsx(D,{detail:n?.source==="tail"?n:null,mode:t,navigate:c});const d=(l?.activeAsks??[]).filter(a=>a.status!=="needs_attention"),p=l?.needsAttention??[];if(t==="lanes")return null;const w=s.filter(a=>A(a.state)),C=s.filter(a=>S(a.state)),u=[...s].sort((a,h)=>(h.updatedAt??0)-(a.updatedAt??0)).slice(0,7);return e.jsxs("div",{className:"ctx-panel ctx-panel--ops-inspector",children:[n&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-selected-detail",children:[e.jsx("div",{className:"ctx-panel-section-label",children:n.focus==="flow"?"Message":"Selection"}),e.jsxs("div",{className:"ctx-panel-selected-card",children:[e.jsx("div",{className:"ctx-panel-selected-title",children:n.title}),e.jsx("div",{className:"ctx-panel-selected-meta",children:n.meta}),e.jsx("div",{className:"ctx-panel-selected-body",children:n.body}),n.action&&e.jsx("button",{type:"button",className:"ctx-panel-selected-action",onClick:()=>c(n.action.route),children:n.action.label})]})]}),e.jsxs("section",{className:"ctx-panel-section ctx-panel-ops-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Ops Context"}),e.jsxs("div",{className:"ctx-panel-ops-mode-card",children:[e.jsx("span",{children:"Current"}),e.jsx("strong",{children:P[t]}),e.jsx("small",{children:l?`${v(l.generatedAt)} refresh`:"loading"})]}),e.jsxs("div",{className:"ctx-panel-stat-grid",children:[e.jsx(m,{label:"Needs",value:p.length,tone:p.length>0?"warn":"ok"}),e.jsx(m,{label:"Active",value:d.length}),e.jsx(m,{label:"Online",value:`${C.length}/${s.length}`}),e.jsx(m,{label:"Working",value:w.length})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Queue",p.length>0&&e.jsx("span",{className:"ctx-panel-count",children:p.length})]}),p.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No operator cues"}):e.jsx("div",{className:"ctx-panel-list",children:p.slice(0,5).map(a=>e.jsx(W,{item:a,navigate:c},a.recordId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Runs",d.length>0&&e.jsx("span",{className:"ctx-panel-count",children:d.length})]}),d.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):e.jsx("div",{className:"ctx-panel-list",children:d.slice(0,5).map(a=>e.jsx(z,{ask:a,navigate:c},a.invocationId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Recent activity",u.length>0&&e.jsx("span",{className:"ctx-panel-count",children:u.length})]}),e.jsx("div",{className:"ctx-panel-pulse-list",children:u.map(a=>e.jsxs("button",{type:"button",className:"ctx-panel-pulse-row",onClick:()=>k(c,a,{returnTo:i}),children:[e.jsx("span",{className:`ctx-panel-pulse-dot ctx-panel-pulse-dot--${I(a.state)}`}),e.jsx("span",{children:a.name}),e.jsxs("small",{children:[O(a.state)," · ",a.updatedAt?v(a.updatedAt):"unknown"]})]},a.id))})]})]})}function R(){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=null,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:null}))}function D({detail:t,mode:s,navigate:c}){const i=s==="issues"?"Alert detail":"Tail detail",l=t?.copy?.find(n=>n.label==="Copy message")?.value??t?.body??"",r=t?.copy?.find(n=>n.label==="Copy metadata")?.value??t?.metadata?.map(n=>`${n.label}: ${n.value}`).join(`
1
+ import{r as o,j as e}from"./index-BI9AljSD.js";import{u as b}from"./Provider-Bu-C8Hxc.js";import{o as k}from"./openAgent-Dbv5wfuL.js";import{o as y}from"./openContent-C6XO6kr5.js";import{a as A,i as S,b as I,c as O}from"./colors-BtO5_zlx.js";import{a as j}from"./api-Co9aQ2Jw.js";import{c as T}from"./clipboard-e3fSpeo7.js";import{u as E}from"./sse-DDHEHUgz.js";import{t as v}from"./time-Dhsh_2EG.js";import{X as B}from"./x-DfRJbqrh.js";import{C as $}from"./check-DbIkldnK.js";import{C as L}from"./copy-Cj-owMb-.js";import"./router-DTtux5sP.js";import"./perf-PX8Rx0EP.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"./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"./index-BWHgHrtv.js";const P={mission:"Control",advisor:"Host Advisor",issues:"Alerts",tail:"Tail",atop:"Runtime",agents:"Agents",lanes:"Lanes"};function Ie({mode:t,agents:s,navigate:c,returnRoute:i}){const[l,r]=o.useState(null),[n,g]=o.useState(()=>typeof window>"u"?null:N(window.scoutOpsDetailSnapshot)),x=o.useCallback(async()=>{const a=await j("/api/fleet").catch(()=>null);r(a)},[]);if(o.useEffect(()=>{x()},[x]),o.useEffect(()=>{const a=h=>{g(N(h.detail))};return window.addEventListener("scout:ops-detail",a),()=>window.removeEventListener("scout:ops-detail",a)},[]),E(a=>{(a.kind==="message.posted"||a.kind==="flight.updated"||a.kind==="collaboration.event.appended")&&x()}),t==="advisor")return e.jsx(H,{navigate:c});if(t==="tail"||t==="issues")return e.jsx(D,{detail:n?.source==="tail"?n:null,mode:t,navigate:c});const d=(l?.activeAsks??[]).filter(a=>a.status!=="needs_attention"),p=l?.needsAttention??[];if(t==="lanes")return null;const w=s.filter(a=>A(a.state)),C=s.filter(a=>S(a.state)),u=[...s].sort((a,h)=>(h.updatedAt??0)-(a.updatedAt??0)).slice(0,7);return e.jsxs("div",{className:"ctx-panel ctx-panel--ops-inspector",children:[n&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-selected-detail",children:[e.jsx("div",{className:"ctx-panel-section-label",children:n.focus==="flow"?"Message":"Selection"}),e.jsxs("div",{className:"ctx-panel-selected-card",children:[e.jsx("div",{className:"ctx-panel-selected-title",children:n.title}),e.jsx("div",{className:"ctx-panel-selected-meta",children:n.meta}),e.jsx("div",{className:"ctx-panel-selected-body",children:n.body}),n.action&&e.jsx("button",{type:"button",className:"ctx-panel-selected-action",onClick:()=>c(n.action.route),children:n.action.label})]})]}),e.jsxs("section",{className:"ctx-panel-section ctx-panel-ops-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Ops Context"}),e.jsxs("div",{className:"ctx-panel-ops-mode-card",children:[e.jsx("span",{children:"Current"}),e.jsx("strong",{children:P[t]}),e.jsx("small",{children:l?`${v(l.generatedAt)} refresh`:"loading"})]}),e.jsxs("div",{className:"ctx-panel-stat-grid",children:[e.jsx(m,{label:"Needs",value:p.length,tone:p.length>0?"warn":"ok"}),e.jsx(m,{label:"Active",value:d.length}),e.jsx(m,{label:"Online",value:`${C.length}/${s.length}`}),e.jsx(m,{label:"Working",value:w.length})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Queue",p.length>0&&e.jsx("span",{className:"ctx-panel-count",children:p.length})]}),p.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No operator cues"}):e.jsx("div",{className:"ctx-panel-list",children:p.slice(0,5).map(a=>e.jsx(W,{item:a,navigate:c},a.recordId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Runs",d.length>0&&e.jsx("span",{className:"ctx-panel-count",children:d.length})]}),d.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):e.jsx("div",{className:"ctx-panel-list",children:d.slice(0,5).map(a=>e.jsx(z,{ask:a,navigate:c},a.invocationId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Recent activity",u.length>0&&e.jsx("span",{className:"ctx-panel-count",children:u.length})]}),e.jsx("div",{className:"ctx-panel-pulse-list",children:u.map(a=>e.jsxs("button",{type:"button",className:"ctx-panel-pulse-row",onClick:()=>k(c,a,{returnTo:i}),children:[e.jsx("span",{className:`ctx-panel-pulse-dot ctx-panel-pulse-dot--${I(a.state)}`}),e.jsx("span",{children:a.name}),e.jsxs("small",{children:[O(a.state)," · ",a.updatedAt?v(a.updatedAt):"unknown"]})]},a.id))})]})]})}function R(){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=null,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:null}))}function D({detail:t,mode:s,navigate:c}){const i=s==="issues"?"Alert detail":"Tail detail",l=t?.copy?.find(n=>n.label==="Copy message")?.value??t?.body??"",r=t?.copy?.find(n=>n.label==="Copy metadata")?.value??t?.metadata?.map(n=>`${n.label}: ${n.value}`).join(`
2
2
  `)??"";return e.jsx("div",{className:"ctx-panel ctx-panel--ops-inspector ctx-panel--tail-inspector",children:e.jsxs("section",{className:"ctx-panel-section ctx-panel-tail-detail",children:[e.jsxs("div",{className:"ctx-panel-section-label ctx-panel-tail-detail-label",children:[e.jsx("span",{children:i}),t&&e.jsx("button",{type:"button",className:"ctx-panel-tail-icon-button",onClick:R,"aria-label":"Clear Tail detail",title:"Clear",children:e.jsx(B,{size:13,strokeWidth:2,"aria-hidden":"true"})})]}),t?e.jsxs("div",{className:"ctx-panel-tail-card",children:[e.jsxs("div",{className:"ctx-panel-tail-card-head",children:[e.jsx("div",{className:"ctx-panel-tail-card-title",children:t.title}),e.jsx("div",{className:"ctx-panel-tail-card-meta",children:t.meta})]}),t.metadata&&t.metadata.length>0&&e.jsxs("div",{className:"ctx-panel-tail-copy-scope",children:[e.jsx("dl",{className:"ctx-panel-tail-metadata",children:t.metadata.map(n=>e.jsxs("div",{className:"ctx-panel-tail-metadata-row",children:[e.jsx("dt",{children:n.label}),e.jsx("dd",{title:n.value,children:n.value})]},n.label))}),r&&e.jsx(f,{label:"Copy metadata",value:r})]}),t.action&&e.jsx("div",{className:"ctx-panel-tail-actions",children:e.jsx("button",{type:"button",className:"ctx-panel-tail-action-button",onClick:()=>c(t.action.route),children:t.action.label})}),e.jsxs("div",{className:"ctx-panel-tail-copy-scope ctx-panel-tail-copy-scope--message",children:[e.jsx("div",{className:"ctx-panel-tail-message",children:t.body}),l&&e.jsx(f,{label:"Copy message",value:l})]})]}):e.jsxs("div",{className:"ctx-panel-tail-empty-card",children:[e.jsx("span",{children:"Tail"}),e.jsx("strong",{children:"No log selected"})]})]})})}function f({label:t,value:s}){const[c,i]=o.useState(!1),l=o.useRef(null);o.useEffect(()=>()=>{l.current!=null&&window.clearTimeout(l.current)},[]);const r=o.useCallback(async()=>{await T(s)&&(i(!0),l.current!=null&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>i(!1),1200))},[s]);return e.jsxs("button",{type:"button",className:`ctx-panel-tail-hover-copy${c?" ctx-panel-tail-hover-copy--copied":""}`,onClick:()=>{r()},title:t,children:[c?e.jsx($,{size:13,strokeWidth:2,"aria-hidden":"true"}):e.jsx(L,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:c?"Copied":t})]})}function H({navigate:t}){const[s,c]=o.useState(null),[i,l]=o.useState(null);return o.useEffect(()=>{Promise.allSettled([j("/.host-info"),j("/api/build")]).then(([r,n])=>{r.status==="fulfilled"&&c(r.value),n.status==="fulfilled"&&l(n.value)})},[]),e.jsxs("div",{className:"ctx-panel ctx-panel--ops-inspector ctx-panel--plan-inspector",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-ops-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Host Telemetry"}),e.jsxs("div",{className:"ctx-panel-summary-card",children:[e.jsx("div",{className:"ctx-panel-summary-title",children:s?.nodeName||"Local Host"}),e.jsxs("div",{className:"ctx-panel-summary-kicker",children:["Node: ",s?.nodeId||"local"]}),e.jsxs("div",{className:"ctx-panel-summary-meta",children:[e.jsxs("span",{children:[i?.runtime?.platform||"darwin"," ",i?.runtime?.arch||"arm64"]}),i?.gitBranch&&e.jsxs("span",{children:["branch: ",i.gitBranch]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Host Endpoints"}),e.jsxs("div",{className:"ctx-panel-metric-stack",children:[e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Broker Port"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.ports?.broker??43110})]}),e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Web UI Port"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.ports?.web??43120})]}),e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Advertise Scope"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.advertiseScope||"mesh"})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Quick Actions"}),e.jsxs("div",{className:"ctx-panel-stack",children:[e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"ops",mode:"mission"}),children:"Mission Control Wall →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"harnesses"}),children:"Agent Providers & Quotas →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"terminal"}),children:"Terminal Relays →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"search"}),children:"Knowledge Search →"})]})]})]})}function m({label:t,value:s,tone:c}){return e.jsxs("div",{className:`ctx-panel-stat${c?` ctx-panel-stat--${c}`:""}`,children:[e.jsx("span",{children:t}),e.jsx("strong",{children:s})]})}function N(t){if(!t||typeof t!="object")return null;const s=t;if(s.focus!=="flow"&&s.focus!=="item"||typeof s.title!="string"||typeof s.meta!="string"||typeof s.body!="string")return null;const c=Array.isArray(s.metadata)?s.metadata.filter(l=>l!=null&&typeof l=="object"&&typeof l.label=="string"&&typeof l.value=="string"):void 0,i=Array.isArray(s.copy)?s.copy.filter(l=>l!=null&&typeof l=="object"&&typeof l.label=="string"&&typeof l.value=="string"):void 0;return{source:s.source==="tail"?"tail":"generic",focus:s.focus,title:s.title,meta:s.meta,body:s.body,metadata:c,copy:i,action:s.action&&typeof s.action=="object"?s.action:null}}function W({item:t,navigate:s}){const{route:c}=b();return e.jsx("button",{type:"button",className:"ctx-panel-item ctx-panel-item--attention",onClick:()=>{t.conversationId?y(s,{view:"conversation",conversationId:t.conversationId},{returnTo:c}):s({view:"ops",mode:"mission"})},children:e.jsxs("div",{className:"ctx-panel-body",children:[e.jsx("span",{className:"ctx-panel-name",children:t.title}),e.jsxs("span",{className:"ctx-panel-sub",children:[t.agentName??t.agentId??"operator"," · ",v(t.updatedAt)]})]})})}function z({ask:t,navigate:s}){const{route:c}=b();return e.jsx("button",{type:"button",className:"ctx-panel-item",onClick:()=>{t.conversationId?y(s,{view:"conversation",conversationId:t.conversationId},{returnTo:c}):s({view:"ops",mode:"mission"})},children:e.jsxs("div",{className:"ctx-panel-body",children:[e.jsx("span",{className:"ctx-panel-name",children:t.task}),e.jsxs("span",{className:"ctx-panel-sub",children:[t.agentName??t.agentId," · ",t.statusLabel]})]})})}export{Ie as OpsInspectorPanel,Ie as OpsRight};
@@ -1 +1 @@
1
- import{r as l}from"./index-CZ-05hKz.js";const d=["input","textarea","select","[contenteditable='']","[contenteditable='true']","[contenteditable='plaintext-only']","[role='combobox']","[role='searchbox']","[role='spinbutton']","[role='textbox']"].join(","),y=[".xterm",".xterm-helper-textarea","[data-scout-terminal-input='true']"].join(",");function m(t){const e=t;if(!e)return!1;const n=typeof e.tagName=="string"?e.tagName.toLowerCase():"";return n==="input"||n==="textarea"||n==="select"||e.isContentEditable===!0||typeof e.closest=="function"&&e.closest(d)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(d)}function x(t){const e=t;return e?typeof e.closest=="function"&&e.closest(y)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(y):!1}function k(t){return(t.metaKey||t.ctrlKey)&&t.shiftKey&&!t.altKey&&t.key.toLowerCase()==="b"}function h(){return!!(document.querySelector(".kb-help-backdrop")||document.querySelector("[data-command-palette-open='true']")||document.querySelector("[role='dialog'][aria-modal='true']"))}function g(t,e,n){return e<=0?-1:t<0?n>0?0:e-1:Math.max(0,Math.min(e-1,t+n))}const f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function w(t=!0){const e=l.useRef(null),n=l.useRef(null);l.useEffect(()=>{if(!t)return;n.current=document.activeElement;const o=e.current;return o?((o.querySelector(f)??o).focus(),()=>{n.current?.focus?.()}):void 0},[t]);const r=l.useCallback(o=>{if(!t||o.key!=="Tab")return;const s=e.current;if(!s)return;const c=Array.from(s.querySelectorAll(f));if(c.length===0){o.preventDefault(),s.focus();return}const u=c[0],a=c[c.length-1],i=document.activeElement;o.shiftKey?(i===u||!s.contains(i))&&(o.preventDefault(),a.focus()):i===a&&(o.preventDefault(),u.focus())},[t]);return{ref:e,onKeyDown:r}}function p(t){return Array.from(t.querySelectorAll([":scope > button:not([disabled])",":scope > [role='button']:not([aria-disabled='true'])",":scope > * > button[data-list-primary]:not([disabled])"].join(", ")))}function b(t,e){t.forEach((n,r)=>{n.tabIndex=r===e?0:-1}),t[e]?.focus()}function S(){return l.useCallback(t=>{const e=t.key==="ArrowDown"||t.key==="j",n=t.key==="ArrowUp"||t.key==="k",r=t.key==="Home"||t.key==="g"&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey,o=t.key==="End"||t.key==="G";if(!e&&!n&&!r&&!o)return;const s=p(t.currentTarget);if(s.length===0)return;const c=document.activeElement,u=s.findIndex(i=>i===c);let a;e?a=u<0?0:Math.min(s.length-1,u+1):n?a=u<0?s.length-1:Math.max(0,u-1):r?a=0:a=s.length-1,t.preventDefault(),b(s,a)},[])}function T(t,e,n){return t||!e&&n?0:-1}function v(){l.useEffect(()=>{const t=e=>{if(e.key!=="["&&e.key!=="]"||m(e.target))return;const n=e.target,r=["left","center","right"],o=e.key==="]"?1:-1,s=r.findIndex(u=>{const a=document.querySelector(`[data-pane="${u}"]`);return a?a.contains(n):!1}),c=s<0?o>0?-1:r.length:s;for(let u=c+o;u>=0&&u<r.length;u+=o){const a=document.querySelector(`[data-pane="${r[u]}"]`);if(!a)continue;const i=a.querySelector(f);if(i){e.preventDefault(),i.focus();return}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[])}function L(t){l.useEffect(()=>{const e=n=>{if(n.key!=="/"||m(n.target))return;const r=t();r&&(n.preventDefault(),r.focus(),r.select())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t])}function A(t){return e=>{if(e.key!=="ArrowDown")return;const n=t();if(!n)return;const r=p(n);if(r.length===0)return;const o=r.findIndex(c=>c.tabIndex===0),s=o>=0?o:0;e.preventDefault(),b(r,s)}}export{S as a,L as b,h as c,v as d,k as e,x as f,m as i,A as m,g as n,T as r,w as u};
1
+ import{r as l}from"./index-BI9AljSD.js";const d=["input","textarea","select","[contenteditable='']","[contenteditable='true']","[contenteditable='plaintext-only']","[role='combobox']","[role='searchbox']","[role='spinbutton']","[role='textbox']"].join(","),y=[".xterm",".xterm-helper-textarea","[data-scout-terminal-input='true']"].join(",");function m(t){const e=t;if(!e)return!1;const n=typeof e.tagName=="string"?e.tagName.toLowerCase():"";return n==="input"||n==="textarea"||n==="select"||e.isContentEditable===!0||typeof e.closest=="function"&&e.closest(d)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(d)}function x(t){const e=t;return e?typeof e.closest=="function"&&e.closest(y)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(y):!1}function k(t){return(t.metaKey||t.ctrlKey)&&t.shiftKey&&!t.altKey&&t.key.toLowerCase()==="b"}function h(){return!!(document.querySelector(".kb-help-backdrop")||document.querySelector("[data-command-palette-open='true']")||document.querySelector("[role='dialog'][aria-modal='true']"))}function g(t,e,n){return e<=0?-1:t<0?n>0?0:e-1:Math.max(0,Math.min(e-1,t+n))}const f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function w(t=!0){const e=l.useRef(null),n=l.useRef(null);l.useEffect(()=>{if(!t)return;n.current=document.activeElement;const o=e.current;return o?((o.querySelector(f)??o).focus(),()=>{n.current?.focus?.()}):void 0},[t]);const r=l.useCallback(o=>{if(!t||o.key!=="Tab")return;const s=e.current;if(!s)return;const c=Array.from(s.querySelectorAll(f));if(c.length===0){o.preventDefault(),s.focus();return}const u=c[0],a=c[c.length-1],i=document.activeElement;o.shiftKey?(i===u||!s.contains(i))&&(o.preventDefault(),a.focus()):i===a&&(o.preventDefault(),u.focus())},[t]);return{ref:e,onKeyDown:r}}function p(t){return Array.from(t.querySelectorAll([":scope > button:not([disabled])",":scope > [role='button']:not([aria-disabled='true'])",":scope > * > button[data-list-primary]:not([disabled])"].join(", ")))}function b(t,e){t.forEach((n,r)=>{n.tabIndex=r===e?0:-1}),t[e]?.focus()}function S(){return l.useCallback(t=>{const e=t.key==="ArrowDown"||t.key==="j",n=t.key==="ArrowUp"||t.key==="k",r=t.key==="Home"||t.key==="g"&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey,o=t.key==="End"||t.key==="G";if(!e&&!n&&!r&&!o)return;const s=p(t.currentTarget);if(s.length===0)return;const c=document.activeElement,u=s.findIndex(i=>i===c);let a;e?a=u<0?0:Math.min(s.length-1,u+1):n?a=u<0?s.length-1:Math.max(0,u-1):r?a=0:a=s.length-1,t.preventDefault(),b(s,a)},[])}function T(t,e,n){return t||!e&&n?0:-1}function v(){l.useEffect(()=>{const t=e=>{if(e.key!=="["&&e.key!=="]"||m(e.target))return;const n=e.target,r=["left","center","right"],o=e.key==="]"?1:-1,s=r.findIndex(u=>{const a=document.querySelector(`[data-pane="${u}"]`);return a?a.contains(n):!1}),c=s<0?o>0?-1:r.length:s;for(let u=c+o;u>=0&&u<r.length;u+=o){const a=document.querySelector(`[data-pane="${r[u]}"]`);if(!a)continue;const i=a.querySelector(f);if(i){e.preventDefault(),i.focus();return}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[])}function L(t){l.useEffect(()=>{const e=n=>{if(n.key!=="/"||m(n.target))return;const r=t();r&&(n.preventDefault(),r.focus(),r.select())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t])}function A(t){return e=>{if(e.key!=="ArrowDown")return;const n=t();if(!n)return;const r=p(n);if(r.length===0)return;const o=r.findIndex(c=>c.tabIndex===0),s=o>=0?o:0;e.preventDefault(),b(r,s)}}export{S as a,L as b,h as c,v as d,k as e,x as f,m as i,A as m,g as n,T as r,w as u};
@@ -1 +1 @@
1
- import{r as c}from"./index-CZ-05hKz.js";let s=null;const o=new Set;function d(e,t){return e===t?!0:!e||!t?!1:e.live===t.live&&e.harness===t.harness&&e.actionGlyph===t.actionGlyph&&e.actionLabel===t.actionLabel&&e.actionMeta===t.actionMeta&&e.countsLabel===t.countsLabel&&e.strip.length===t.strip.length&&e.strip.every((n,r)=>n===t.strip[r])}function L(e,t){return e.id===t.id&&e.label===t.label&&e.statusLabel===t.statusLabel&&e.tone===t.tone&&e.agentId===t.agentId&&e.updatedAt===t.updatedAt&&d(e.floor,t.floor)}function p(e,t){return e===t?!0:e===null||t===null||e.length!==t.length?!1:e.every((n,r)=>L(n,t[r]))}function E(e){if(!p(s,e)){s=e;for(const t of o)t()}}function g(e){return o.add(e),()=>{o.delete(e)}}function i(){return s}function I(){return c.useSyncExternalStore(g,i,i)}let u=null;const l=new Set;function y(e){if(u!==e){u=e;for(const t of l)t()}}function h(e){return l.add(e),()=>{l.delete(e)}}function a(){return u}function F(){return c.useSyncExternalStore(h,a,a)}let f=null;function v(e){f=e}function R(){return f}export{y as a,F as b,R as g,E as p,v as s,I as u};
1
+ import{r as c}from"./index-BI9AljSD.js";let s=null;const o=new Set;function d(e,t){return e===t?!0:!e||!t?!1:e.live===t.live&&e.harness===t.harness&&e.actionGlyph===t.actionGlyph&&e.actionLabel===t.actionLabel&&e.actionMeta===t.actionMeta&&e.countsLabel===t.countsLabel&&e.strip.length===t.strip.length&&e.strip.every((n,r)=>n===t.strip[r])}function L(e,t){return e.id===t.id&&e.label===t.label&&e.statusLabel===t.statusLabel&&e.tone===t.tone&&e.agentId===t.agentId&&e.updatedAt===t.updatedAt&&d(e.floor,t.floor)}function p(e,t){return e===t?!0:e===null||t===null||e.length!==t.length?!1:e.every((n,r)=>L(n,t[r]))}function E(e){if(!p(s,e)){s=e;for(const t of o)t()}}function g(e){return o.add(e),()=>{o.delete(e)}}function i(){return s}function I(){return c.useSyncExternalStore(g,i,i)}let u=null;const l=new Set;function y(e){if(u!==e){u=e;for(const t of l)t()}}function h(e){return l.add(e),()=>{l.delete(e)}}function a(){return u}function F(){return c.useSyncExternalStore(h,a,a)}let f=null;function v(e){f=e}function R(){return f}export{y as a,F as b,R as g,E as p,v as s,I as u};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DXpqZP7I.js";const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],c=a("layers",e);export{c as L};
1
+ import{c as a}from"./createLucideIcon-DthwWQIg.js";const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],c=a("layers",e);export{c as L};
@@ -1 +1 @@
1
- import{c as t}from"./createLucideIcon-DXpqZP7I.js";const e=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],i=t("layout-grid",e);export{i as L};
1
+ import{c as t}from"./createLucideIcon-DthwWQIg.js";const e=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],i=t("layout-grid",e);export{i as L};
@@ -1,2 +1,2 @@
1
- import{r,j as e}from"./index-CZ-05hKz.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-B2xuo3rf.js";import{b as O}from"./router-DJj2WbDg.js";import{d as B,r as G}from"./operator-attention-RqieiSY8.js";import{u as K}from"./sse-CiOSzE5n.js";import{t as f}from"./time-Dhsh_2EG.js";import{o as P}from"./openAgent-Dbv5wfuL.js";import{R as g}from"./RailRow-B-GycCBx.js";import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.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-CZ-05hKz.js";import{a as I}from"./api-Co9aQ2Jw.js";import{b as L,c as j,s as R}from"./router-DJj2WbDg.js";import{u as $,r as y,s as b,i as C}from"./mesh-ops-CvGyjK84.js";import{u as E,s as T}from"./mesh-view-store-BpxGm71b.js";import{u as A}from"./Provider-B2xuo3rf.js";import{R as h}from"./RailRow-B-GycCBx.js";import{u as U}from"./use-mesh-ops-items-BIvIHlqe.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.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-CZ-05hKz.js";/* empty css */import{d as w,c as S,e as y,f as M,g as A,i as N}from"./NewChatComposer-hlWT-nbR.js";import{u as k,d as b}from"./Provider-B2xuo3rf.js";import{A as I}from"./AgentAvatar-CYhf6twS.js";import{a as g}from"./api-Co9aQ2Jw.js";import{b as C}from"./router-DJj2WbDg.js";import{a as B}from"./sse-CiOSzE5n.js";import{o as P,i as j}from"./surface-activity-B1rgWB1i.js";import"./text-CnZ0e1-V.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./createLucideIcon-DXpqZP7I.js";import"./conversation-model-CwF6Y9gx.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./keyboard-nav-DFhAJkW3.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./file-text-KijGBnME.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.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-CZ-05hKz.js";import{u as re,L as z}from"./chunk-YOZR3KYS-U65yUmqt.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-DFhAJkW3.js";import{u as be}from"./Provider-B2xuo3rf.js";import{c as fe}from"./colors-BtO5_zlx.js";import{r as P,c as xe}from"./terminal-relay-9lhzEp2V.js";import{t as ye,a as q,s as je,b as y,P as ge}from"./session-table-PTQVoTyc.js";/* empty css */import{R as ke}from"./refresh-cw-BRn9Oxxl.js";import{A as Ne}from"./activity-Bj3Hnbj3.js";import{C as we}from"./clock-B4PTFi5m.js";import{F as Se}from"./DocumentFocusViewer-DZVhS7as.js";import{L as Ae}from"./layers-CGou-LwV.js";import{C as Ie}from"./chevron-right-CzH-TaSF.js";import{E as U}from"./eye-CpfyvdLq.js";import{T as Ee}from"./terminal-yN9xN-h9.js";import"./createLucideIcon-DXpqZP7I.js";import"./arrow-down-BydciYFZ.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.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};