@openscout/scout 0.2.80 → 0.2.83

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 (358) hide show
  1. package/README.md +1 -1
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +4 -4
  4. package/dist/client/assets/ActivityScreen-aewI4Ul1.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-CtEiLQnm.js → AddProjectForm-Czb5uwou.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-CszU5eaU.js → AgentAvatar-DMov24_o.js} +1 -1
  7. package/dist/client/assets/AgentConfigurationScreen-BjG6ECjl.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-D4MbSMXp.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-sZuHl1de.js → AgentDetailCard-Biq8b2gv.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-h9KDJdw0.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-SjhK_SBh.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-nB68f2CI.js → AgentLaneCard-C4DMQR-c.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-O9Yf0uR-.js → AgentLaneChrome-D1xNNf7A.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-BfhpaEQ3.js → AgentLaneDetailSheet-DnAKe4e3.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-Ct3b0TQR.js → AgentLaneSummaryResize-C9loK-st.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-BNOYF16R.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-DNGvZvjd.js → AgentLanesPreflight-M7iDXdP2.js} +1 -1
  18. package/dist/client/assets/{AgentLanesView-DqRK5-d2.js → AgentLanesView-Ct-Gz5WD.js} +1 -1
  19. package/dist/client/assets/{AgentLiveActions-DI4ooSHW.js → AgentLiveActions-0iy8QZ1T.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-BxWIPkWh.js → AgentSessions-CDfSfNiE.js} +2 -2
  21. package/dist/client/assets/{AgentsConsole-D6VHSCfZ.js → AgentsConsole-BVxhBqRa.js} +1 -1
  22. package/dist/client/assets/AgentsScreen-Bww6HgFs.js +1 -0
  23. package/dist/client/assets/AgentsSubnav-CiIuzxnZ.js +1 -0
  24. package/dist/client/assets/{AtopView-VZkk40v0.js → AtopView-h_aFoNkP.js} +1 -1
  25. package/dist/client/assets/BackToPicker-BXp5E2ck.js +1 -0
  26. package/dist/client/assets/{BriefingDetailScreen-BZU4qMwE.js → BriefingDetailScreen-C83o2YfN.js} +1 -1
  27. package/dist/client/assets/{BriefingsScreen-Bfc3tqPp.js → BriefingsScreen-BTsvr5fv.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-CaFe6kdh.js → BrokerMetadataPanel-jg7odHQp.js} +1 -1
  29. package/dist/client/assets/BrokerScreen-DplF8d_X.js +5 -0
  30. package/dist/client/assets/Canvas-BePL08RR.js +1 -0
  31. package/dist/client/assets/{ChatCollapsedStrip-Cov54p9V.js → ChatCollapsedStrip-BRljIymi.js} +1 -1
  32. package/dist/client/assets/{CodeDiffPane-C1ebFt-Y.js → CodeDiffPane-86odpBSt.js} +1 -1
  33. package/dist/client/assets/{CodeProjectPicker-tsCly-f3.js → CodeProjectPicker-8svr_S_A.js} +1 -1
  34. package/dist/client/assets/{CodeScreen-D0hpZNLP.js → CodeScreen-CJ2RgB32.js} +1 -1
  35. package/dist/client/assets/{ContextMenu-N-Z6X0Z1.js → ContextMenu-CxkmFQcN.js} +1 -1
  36. package/dist/client/assets/{ConversationComposer-CiEF7dhd.js → ConversationComposer-CWohCCmn.js} +1 -1
  37. package/dist/client/assets/ConversationFeedRows-IWh0JSIL.js +1 -0
  38. package/dist/client/assets/{ConversationHeader-BGgbITvr.js → ConversationHeader-BxTzXl8e.js} +1 -1
  39. package/dist/client/assets/ConversationPanels-D9UCwNkS.js +2 -0
  40. package/dist/client/assets/ConversationScreen-oZSitVtX.js +1 -0
  41. package/dist/client/assets/{ConversationStatus-COEj5loj.js → ConversationStatus-B6pAbo2w.js} +1 -1
  42. package/dist/client/assets/{DataTable-BoofV-_4.js → DataTable-CGw5CECG.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-OXYlMbT1.js → DispatchAftermath-DowTb7uO.js} +1 -1
  44. package/dist/client/assets/{DocumentFocusViewer-BCG2kOmd.js → DocumentFocusViewer-DRKjNG9s.js} +1 -1
  45. package/dist/client/assets/{EmbeddableSurfacesLab-C2SZvrHJ.js → EmbeddableSurfacesLab-CxfJXS2g.js} +1 -1
  46. package/dist/client/assets/{EmptyState-DypEjx0V.js → EmptyState-BUvllvA6.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-CXCq-oKj.js → FileViewerPane-BM4AD_bo.js} +1 -1
  48. package/dist/client/assets/{FleetSearch-Dj7-CfNi.js → FleetSearch-CYeWn85V.js} +1 -1
  49. package/dist/client/assets/FlightObserveScreen-DYJJ3Z2B.js +1 -0
  50. package/dist/client/assets/{FollowScreen-DRgYuAvp.js → FollowScreen-DG0osbUp.js} +1 -1
  51. package/dist/client/assets/{HarnessMark-BE-YSyci.js → HarnessMark-MztYnrGK.js} +1 -1
  52. package/dist/client/assets/HarnessesScreen-BWqirBjK.js +1 -0
  53. package/dist/client/assets/{HerdrSession-DKFCJMst.js → HerdrSession-6sFln7WX.js} +1 -1
  54. package/dist/client/assets/{HomeHero-CAEg8Yg5.js → HomeHero-BPBArHXa.js} +1 -1
  55. package/dist/client/assets/{KnowledgeSearchInspector-C2EZsQ5i.js → KnowledgeSearchInspector-BOIhFWd2.js} +1 -1
  56. package/dist/client/assets/KnowledgeSearchScreen-BP8tD-Bh.js +1 -0
  57. package/dist/client/assets/{LaneToolHoverCard-DrPXYZvQ.js → LaneToolHoverCard-CcEiQC6B.js} +1 -1
  58. package/dist/client/assets/LaneTraceDetailSheet-B4i1Ut4R.js +1 -0
  59. package/dist/client/assets/{LaneTraceEventFocus-X4-DDFEo.js → LaneTraceEventFocus-Bl9L0EYb.js} +1 -1
  60. package/dist/client/assets/{MeshCanvas-rtCBD7s6.js → MeshCanvas-ZjIuMiRo.js} +1 -1
  61. package/dist/client/assets/{MeshCanvasMinimap-CuvXOkc7.js → MeshCanvasMinimap-C-LQtiX6.js} +1 -1
  62. package/dist/client/assets/MeshScreen-Bs3soujg.js +1 -0
  63. package/dist/client/assets/{MeshTopologyView-CeTShs-U.js → MeshTopologyView-C0LUyT3K.js} +2 -2
  64. package/dist/client/assets/{MessageComposerSuggestions-Cs9u-F_3.js → MessageComposerSuggestions-Dfc3PH2y.js} +1 -1
  65. package/dist/client/assets/MessagesScreen-TgSL5KMc.js +1 -0
  66. package/dist/client/assets/{MissionContextRail-0O-Zu1Tn.js → MissionContextRail-CjGAEGu8.js} +1 -1
  67. package/dist/client/assets/MissionControlView-D629w2A8.js +1 -0
  68. package/dist/client/assets/{MissionFocusOverlay-LnjmqBiW.js → MissionFocusOverlay-Bubrr8Gc.js} +1 -1
  69. package/dist/client/assets/{MissionLeftAgentRow-nc1Jyq3D.js → MissionLeftAgentRow-DokImu4Y.js} +1 -1
  70. package/dist/client/assets/{MissionLogPane-lZ9vUftY.js → MissionLogPane-Cs0LuIkn.js} +1 -1
  71. package/dist/client/assets/{NewAgentModal-K1cvdmZr.js → NewAgentModal-D5e0YUAo.js} +1 -1
  72. package/dist/client/assets/{NewChatComposer-DXDxV2Mh.js → NewChatComposer-S08F6_La.js} +1 -1
  73. package/dist/client/assets/{NewChatOrigin-CnjoswTG.js → NewChatOrigin-BEz6jyqf.js} +1 -1
  74. package/dist/client/assets/{ObserveEmbedScreen-CRpzYf0Y.js → ObserveEmbedScreen-CHx2sEAA.js} +2 -2
  75. package/dist/client/assets/ObserveTextFlow-_ApDwRCO.js +2 -0
  76. package/dist/client/assets/{ObservedTopologyPanel-C1AQM0Mq.js → ObservedTopologyPanel-ByW7Ar7p.js} +1 -1
  77. package/dist/client/assets/OpenScoutAppShell-DTmnbG-h.js +88 -0
  78. package/dist/client/assets/OpsAgentsView-DiFuHcJs.js +1 -0
  79. package/dist/client/assets/OpsScreen-CCR3U_9P.js +1 -0
  80. package/dist/client/assets/OpsSubnav-CZs_OL2N.js +1 -0
  81. package/dist/client/assets/{PlanView-DDXdC19M.js → PlanView-C54eAzig.js} +1 -1
  82. package/dist/client/assets/ProjectAgentProfile-BEfYOaxc.js +1 -0
  83. package/dist/client/assets/{ProjectAgentProfileBar-MODhG0P6.js → ProjectAgentProfileBar-B1VpwzGD.js} +1 -1
  84. package/dist/client/assets/{ProjectAgentProfileHero-C1ImgGDu.js → ProjectAgentProfileHero-B4f_AoCr.js} +1 -1
  85. package/dist/client/assets/ProjectsInbox-DoPZ17FC.js +2 -0
  86. package/dist/client/assets/{ProjectsRail-B1zrQLZe.js → ProjectsRail-CWOkZjsY.js} +1 -1
  87. package/dist/client/assets/ProjectsScreen-Dse0Q6p6.js +1 -0
  88. package/dist/client/assets/ProjectsThreadAside-DMnfyPLE.js +1 -0
  89. package/dist/client/assets/Provider-DKZWuzSR.js +1 -0
  90. package/dist/client/assets/{RailRow-DerXOXQS.js → RailRow-DIGd3MMM.js} +1 -1
  91. package/dist/client/assets/RawSessionsTable-Zkl4YDvz.js +1 -0
  92. package/dist/client/assets/RealtimeVoiceScreen-B_PMJxY_.js +1 -0
  93. package/dist/client/assets/{RepoDiffEmbedScreen-C9oLCcZX.js → RepoDiffEmbedScreen-VLg4caej.js} +1 -1
  94. package/dist/client/assets/{RepoDiffPageScreen-CGEMAv2Z.js → RepoDiffPageScreen-BelnvgnP.js} +1 -1
  95. package/dist/client/assets/{RepoDiffViewer-CB8PSVey.js → RepoDiffViewer-VrUJw33u.js} +1 -1
  96. package/dist/client/assets/RepoDiffViewerLazy-BPg_JkYW.js +2 -0
  97. package/dist/client/assets/{ReposScreen-BN1lVjOj.js → ReposScreen-IINK-CFn.js} +2 -2
  98. package/dist/client/assets/ScoutDeckSurface-MbwGp6Ab.js +1 -0
  99. package/dist/client/assets/{ScoutSurface-BEnDlynn.js → ScoutSurface-x_QbcRyk.js} +1 -1
  100. package/dist/client/assets/ScoutbotBroadcastChip-DAKQKB25.js +2 -0
  101. package/dist/client/assets/{ScoutbotFxLab-fAROyIfz.js → ScoutbotFxLab-7t9JVvZg.js} +1 -1
  102. package/dist/client/assets/{ScoutbotRealtimeVoiceCall-CDyFJX8m.js → ScoutbotRealtimeVoiceCall-Br4bYVAx.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-Hv5AJ3Fv.js → SecondaryNav-Dj30epYF.js} +1 -1
  104. package/dist/client/assets/{SessionEmbedScreen-CDRpQc3g.js → SessionEmbedScreen-s2mJ5Fg9.js} +1 -1
  105. package/dist/client/assets/{SessionObserve-BmmJ8dEh.js → SessionObserve-DaUrJCMq.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-CEedIk2a.js → SessionObserveEvidence-ClUW8jpV.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-DLZNFZFK.js +1 -0
  108. package/dist/client/assets/SessionsScreen-D-hN1n4k.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-DL-SVLdd.js → SettingsDrawer-BFsnww-k.js} +3 -3
  110. package/dist/client/assets/SettingsScreen-Bc3Xtv5V.js +1 -0
  111. package/dist/client/assets/{ShikiPane-B7O4if20.js → ShikiPane-Dkwyx--r.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-B3gc5HnM.js → SlidePanel-CuTeirnk.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-BpQDpOkq.js → SpriteAvatar-DQ3PTb8L.js} +1 -1
  114. package/dist/client/assets/{StatusPill-B33sQinT.js → StatusPill-BJ1ierIR.js} +1 -1
  115. package/dist/client/assets/{TailView-DL3YZkzE.js → TailView-CufWcrvf.js} +2 -2
  116. package/dist/client/assets/Terminal-D_OmdFmr.js +1 -0
  117. package/dist/client/assets/TerminalEmbedScreen-D21ytNXW.js +1 -0
  118. package/dist/client/assets/TerminalRelay-rvUzI9Ek.js +46 -0
  119. package/dist/client/assets/{TextDocumentSurface-DRjctOIt.js → TextDocumentSurface-Bc-kHPgG.js} +1 -1
  120. package/dist/client/assets/{TmuxPeek-DNC4uWky.js → TmuxPeek-DLyDkq_D.js} +1 -1
  121. package/dist/client/assets/{VoicePermissionsPanel-WLN0V-Xv.js → VoicePermissionsPanel-CD903y9K.js} +1 -1
  122. package/dist/client/assets/{WorkDetailScreen-D2Yl0mYZ.js → WorkDetailScreen-D51oI0dH.js} +2 -2
  123. package/dist/client/assets/{WorkFilesViewer-BbVfcUN-.js → WorkFilesViewer-BDMNbxE4.js} +1 -1
  124. package/dist/client/assets/{activity-BxwKkT8z.js → activity-BvGruxWG.js} +1 -1
  125. package/dist/client/assets/{addon-fit-B9O2vJoh.js → addon-fit-Cfq4Ayjd.js} +1 -1
  126. package/dist/client/assets/{addon-webgl-BhRZFDcn.js → addon-webgl-B8sIf9-s.js} +1 -1
  127. package/dist/client/assets/{agent-essentials-SrzMYEXV.js → agent-essentials-yb4wIJlX.js} +1 -1
  128. package/dist/client/assets/{agent-lane-card-model-DSWdGu-v.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
  129. package/dist/client/assets/{agent-lanes-model-CPgQRenB.js → agent-lanes-model-VYQ5a68i.js} +1 -1
  130. package/dist/client/assets/{arc.es-NlJw-19N.js → arc.es-BBTfhvLE.js} +1 -1
  131. package/dist/client/assets/{arrow-left-_vS7itsV.js → arrow-left-BOht-YQu.js} +1 -1
  132. package/dist/client/assets/{arrow-up-right-CcrWONpD.js → arrow-up-right-hoR8_oUz.js} +1 -1
  133. package/dist/client/assets/{bot-BRINYlC6.js → bot-BUK7dOPS.js} +1 -1
  134. package/dist/client/assets/{check-COxArFXG.js → check--esHw52j.js} +1 -1
  135. package/dist/client/assets/{chevron-down-DRCbnzyY.js → chevron-down-NAhBUkFd.js} +1 -1
  136. package/dist/client/assets/{chevron-right-CNE6QAVr.js → chevron-right-C10o7t_X.js} +1 -1
  137. package/dist/client/assets/{chunk-HRAB3GC3-CAeEKaf5.js → chunk-HRAB3GC3-DF8R9rPv.js} +1 -1
  138. package/dist/client/assets/{clock-CyfvRmj6.js → clock-of01sAB6.js} +1 -1
  139. package/dist/client/assets/{code-xml--LjSM4Mv.js → code-xml-CLn3TDWF.js} +1 -1
  140. package/dist/client/assets/content-B-SUUhXj.js +1 -0
  141. package/dist/client/assets/content-BRY2vo1_.js +1 -0
  142. package/dist/client/assets/content-BTm0mVyD.js +1 -0
  143. package/dist/client/assets/content-BTqvyb5E.js +1 -0
  144. package/dist/client/assets/content-BjDaXmSD.js +1 -0
  145. package/dist/client/assets/content-BrR6deGh.js +1 -0
  146. package/dist/client/assets/content-C5yvBEMy.js +1 -0
  147. package/dist/client/assets/content-Cgj5AWqT.js +1 -0
  148. package/dist/client/assets/content-CkhG__-v.js +1 -0
  149. package/dist/client/assets/content-CudIBsiP.js +1 -0
  150. package/dist/client/assets/content-DBb7ppd5.js +1 -0
  151. package/dist/client/assets/content-DEw_kGyK.js +1 -0
  152. package/dist/client/assets/content-DIy0DCzK.js +1 -0
  153. package/dist/client/assets/content-THl9hRAo.js +1 -0
  154. package/dist/client/assets/content-vi9FbmV9.js +1 -0
  155. package/dist/client/assets/content-wcgPMGVf.js +1 -0
  156. package/dist/client/assets/{conversation-icons-c-hXv7hY.js → conversation-icons-ClBJi21l.js} +1 -1
  157. package/dist/client/assets/conversation-motion-features-zU0k3Agz.js +1 -0
  158. package/dist/client/assets/{copy-4LfKIdQJ.js → copy-Dty8ZYsM.js} +1 -1
  159. package/dist/client/assets/{createLucideIcon-ClCdc3F9.js → createLucideIcon-Bt67PWH-.js} +1 -1
  160. package/dist/client/assets/discover-NDAqNvKt.js +2 -0
  161. package/dist/client/assets/embed-entry-BVR09F6e.js +2 -0
  162. package/dist/client/assets/{external-link-CnaI1QFS.js → external-link-Dem738OJ.js} +1 -1
  163. package/dist/client/assets/{eye-BFlhMzQL.js → eye-B3lBIwJZ.js} +1 -1
  164. package/dist/client/assets/{file-text-DG-pufl1.js → file-text-iF0hyVyU.js} +1 -1
  165. package/dist/client/assets/{home-moving-signal-aNJusIzL.js → home-moving-signal-C8dTXieA.js} +1 -1
  166. package/dist/client/assets/{home-now-card-BQK4EFHx.js → home-now-card-BgvVcE83.js} +1 -1
  167. package/dist/client/assets/{home-now-card-nano-CdtzqSIF.js → home-now-card-nano-hZl9klbP.js} +1 -1
  168. package/dist/client/assets/hooks-DBIezYS2.js +2 -0
  169. package/dist/client/assets/index-BMwKgdz_.js +1 -0
  170. package/dist/client/assets/index-Bu-fckyR.css +1 -0
  171. package/dist/client/assets/index-BxoufAPA.js +1 -0
  172. package/dist/client/assets/index-Cj7NnSxI.js +1 -0
  173. package/dist/client/assets/{index-CzVeWScw.js → index-o4FKpU7Z.js} +2 -2
  174. package/dist/client/assets/{inspector-panel-DgOM8nCo.js → inspector-panel-Dy2cVTCi.js} +2 -2
  175. package/dist/client/assets/{keyboard-nav-BJnFoFDP.js → keyboard-nav-Chf51dns.js} +1 -1
  176. package/dist/client/assets/{lane-roster-store-pR4ZaYQm.js → lane-roster-store-BiIVlYmG.js} +1 -1
  177. package/dist/client/assets/left-BC7p5QbT.js +1 -0
  178. package/dist/client/assets/left-BCSGqccQ.js +1 -0
  179. package/dist/client/assets/left-BSyj8PuJ.js +2 -0
  180. package/dist/client/assets/left-DDnxNUxd.js +1 -0
  181. package/dist/client/assets/left-DLoDKxT5.js +2 -0
  182. package/dist/client/assets/left-O-TBH7JB.js +1 -0
  183. package/dist/client/assets/left-agents-Dk9Y89lb.js +1 -0
  184. package/dist/client/assets/left-default-B3JBRQNJ.js +1 -0
  185. package/dist/client/assets/left-lanes-30Oe_3RM.js +1 -0
  186. package/dist/client/assets/left-mission-DEl4-7xu.js +1 -0
  187. package/dist/client/assets/left-plan-B4qdm4Gn.js +2 -0
  188. package/dist/client/assets/left-rvUOB14X.js +1 -0
  189. package/dist/client/assets/library-DDKSLFJ_.js +1 -0
  190. package/dist/client/assets/{loader-circle-Byb9kSFx.js → loader-circle-4LDsy4Ke.js} +1 -1
  191. package/dist/client/assets/{local-agents-DBaUbP-_.js → local-agents-DIi2EacM.js} +1 -1
  192. package/dist/client/assets/{mentions-fbQJ2mBI.js → mentions-CvDaviLJ.js} +1 -1
  193. package/dist/client/assets/{mesh-ops-Cnw3vwAu.js → mesh-ops-JZwGuAPn.js} +1 -1
  194. package/dist/client/assets/{mesh-view-store-Btlyc7rW.js → mesh-view-store-Du7VqIT_.js} +1 -1
  195. package/dist/client/assets/{message-circle-aGOfQWm2.js → message-circle-BM3XgevU.js} +1 -1
  196. package/dist/client/assets/{message-markup-mGF07emJ.js → message-markup-BcY1lShv.js} +1 -1
  197. package/dist/client/assets/{message-square-CIXda-Y7.js → message-square-ER1_q2pe.js} +1 -1
  198. package/dist/client/assets/{mission-control-store-CcoNeQHG.js → mission-control-store-C6w5iVfg.js} +1 -1
  199. package/dist/client/assets/{observe-BNFzh-7B.js → observe-3-jn4SXb.js} +1 -1
  200. package/dist/client/assets/{page-status-DDvNdA8s.js → page-status-0LPfBC8S.js} +1 -1
  201. package/dist/client/assets/{plus-CmFQp9Uj.js → plus-C-2gTcPK.js} +1 -1
  202. package/dist/client/assets/profile-DW80Gn5k.js +1 -0
  203. package/dist/client/assets/{projects-inbox-Diddml6e.js → projects-inbox-DCeD3FfV.js} +1 -1
  204. package/dist/client/assets/provider-BvAxRQfE.js +1 -0
  205. package/dist/client/assets/{radio-PauJIekM.js → radio-v7UAMZGh.js} +1 -1
  206. package/dist/client/assets/{refresh-cw-4oeFn1Jn.js → refresh-cw-B5To7b6B.js} +1 -1
  207. package/dist/client/assets/resolve-panes-BDi9Qx4R.js +1 -0
  208. package/dist/client/assets/resolve-sidebar-context-HE-5eZYa.js +1 -0
  209. package/dist/client/assets/right-BDf_yTv6.js +1 -0
  210. package/dist/client/assets/{right-BcFnuse9.js → right-BvoGOUKH.js} +1 -1
  211. package/dist/client/assets/right-C-bgjYg-.js +1 -0
  212. package/dist/client/assets/right-C3JdEfYQ.js +1 -0
  213. package/dist/client/assets/right-CYIs2tEe.js +1 -0
  214. package/dist/client/assets/right-CyRCv6Up.js +1 -0
  215. package/dist/client/assets/right-DBYGtoRv.js +1 -0
  216. package/dist/client/assets/right-o3LHMiKa.js +1 -0
  217. package/dist/client/assets/right-oPrcx9MX.js +1 -0
  218. package/dist/client/assets/right-sSvBUK-j.js +1 -0
  219. package/dist/client/assets/{rocket-C-AskjZH.js → rocket-BQQQv2L5.js} +1 -1
  220. package/dist/client/assets/router-C65cZYPn.js +1 -0
  221. package/dist/client/assets/{runtime-picker-BCQD7d4K.js → runtime-picker-eDEvx2Mz.js} +1 -1
  222. package/dist/client/assets/{scope-views-BhkbIFPY.js → scope-views-BOOmgmwx.js} +1 -1
  223. package/dist/client/assets/{scout-voice-S5_YZ2v8.js → scout-voice-B7kXlkcl.js} +1 -1
  224. package/dist/client/assets/{scroll-text-BV-BB7v-.js → scroll-text-BuneRiAD.js} +1 -1
  225. package/dist/client/assets/{search-C3bSJluv.js → search-7_n7CxWl.js} +1 -1
  226. package/dist/client/assets/{secondaryNavConfig-Bg4Tc0gT.js → secondaryNavConfig-CSFDCQAf.js} +1 -1
  227. package/dist/client/assets/{selection-bridge-B1dmkX3P.js → selection-bridge-SlGsgHw2.js} +1 -1
  228. package/dist/client/assets/{send-horizontal-CqogPmbY.js → send-horizontal-DP16OOIW.js} +1 -1
  229. package/dist/client/assets/{server-Brw5Y1Gh.js → server-pYOMFjrT.js} +1 -1
  230. package/dist/client/assets/{session-catalog-9FqXmjBw.js → session-catalog-_QfQ7fhZ.js} +1 -1
  231. package/dist/client/assets/{session-table-1xdSxSXq.js → session-table-CYN8e4s3.js} +1 -1
  232. package/dist/client/assets/{sliders-horizontal-CUiOH26y.js → sliders-horizontal-D2Z8gz6J.js} +1 -1
  233. package/dist/client/assets/{sparkles-BjCA3Evu.js → sparkles-Bth2iK7t.js} +1 -1
  234. package/dist/client/assets/{sse-QcU9bikk.js → sse-CL6gctHY.js} +1 -1
  235. package/dist/client/assets/{tail-events-C6K7bCWB.js → tail-events-NLIWLq27.js} +1 -1
  236. package/dist/client/assets/{terminal-DrTkVXIj.js → terminal-By1Lw2i2.js} +1 -1
  237. package/dist/client/assets/{terminal-relay-BkXjjSkq.js → terminal-relay-CjkI5aUy.js} +1 -1
  238. package/dist/client/assets/{terminal-sessions-C3qU8tnY.js → terminal-sessions-AmSgHklm.js} +1 -1
  239. package/dist/client/assets/{terminal-takeover-KvmTwABa.js → terminal-takeover-7AvNpnkC.js} +1 -1
  240. package/dist/client/assets/{use-conversation-list-C5sF6WBR.js → use-conversation-list-BCzY032j.js} +1 -1
  241. package/dist/client/assets/{use-fleet-active-asks-BOMPW0nl.js → use-fleet-active-asks-CJ6-oj5k.js} +1 -1
  242. package/dist/client/assets/{use-mesh-ops-items-Co05vcTV.js → use-mesh-ops-items-D5L-CKe_.js} +1 -1
  243. package/dist/client/assets/use-reduced-motion-CqXpVXv-.js +1 -0
  244. package/dist/client/assets/use-scout-dev-flags-BohC8seq.js +1 -0
  245. package/dist/client/assets/{useAgentHoverCard-FtCmY-b9.js → useAgentHoverCard-RsLUYyeh.js} +1 -1
  246. package/dist/client/assets/useContentSecondaryNav-DOr5yHbT.js +1 -0
  247. package/dist/client/assets/usePersistentState-D3M4m2Ou.js +1 -0
  248. package/dist/client/assets/{usePierreRuntime-Bo4lD7Ui.js → usePierreRuntime-B4hbNWTz.js} +1 -1
  249. package/dist/client/assets/{wrench-CeCdjiPF.js → wrench-M4G7WtYB.js} +1 -1
  250. package/dist/client/assets/{x-D4X_y1j_.js → x-ynOfVadO.js} +1 -1
  251. package/dist/client/assets/{xterm-D2a5wrkJ.js → xterm-DZHyijPp.js} +1 -1
  252. package/dist/client/index.html +2 -2
  253. package/dist/main.mjs +41 -26
  254. package/dist/node/main.mjs +19 -5
  255. package/dist/pairing-runtime-controller.mjs +2 -2
  256. package/dist/runtime/broker-daemon.mjs +2 -2
  257. package/dist/scout-control-plane-web.mjs +21 -7
  258. package/dist/scout-web-server.mjs +21 -7
  259. package/package.json +4 -4
  260. package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +0 -1
  261. package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +0 -1
  262. package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +0 -1
  263. package/dist/client/assets/AgentFloorView-DMivAYHU.js +0 -1
  264. package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +0 -1
  265. package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +0 -1
  266. package/dist/client/assets/AgentsScreen-zR6b2bUL.js +0 -1
  267. package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +0 -1
  268. package/dist/client/assets/BackToPicker-DZg_4nHL.js +0 -1
  269. package/dist/client/assets/BrokerScreen-Chh8sGen.js +0 -5
  270. package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +0 -1
  271. package/dist/client/assets/ConversationPanels-vI9YuQJh.js +0 -2
  272. package/dist/client/assets/ConversationScreen-C-PrCRz1.js +0 -1
  273. package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +0 -1
  274. package/dist/client/assets/HarnessesScreen-L-emPcXd.js +0 -1
  275. package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +0 -1
  276. package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +0 -1
  277. package/dist/client/assets/MeshScreen-D5zzTn0o.js +0 -1
  278. package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +0 -1
  279. package/dist/client/assets/MissionControlView-D2JO9u-y.js +0 -1
  280. package/dist/client/assets/ObserveTextFlow-DJxQc2H6.js +0 -2
  281. package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +0 -87
  282. package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +0 -1
  283. package/dist/client/assets/OpsScreen-BeC0lieE.js +0 -1
  284. package/dist/client/assets/OpsSubnav-D5Bpowtk.js +0 -1
  285. package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +0 -1
  286. package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +0 -2
  287. package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +0 -1
  288. package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +0 -1
  289. package/dist/client/assets/Provider-DSsb2gLR.js +0 -1
  290. package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +0 -1
  291. package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +0 -1
  292. package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +0 -2
  293. package/dist/client/assets/ScoutDeckSurface-BCpl0QCx.js +0 -1
  294. package/dist/client/assets/ScoutbotBroadcastChip-z9R_pC_U.js +0 -2
  295. package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +0 -1
  296. package/dist/client/assets/SessionsScreen-BJEjuo2X.js +0 -1
  297. package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +0 -1
  298. package/dist/client/assets/Terminal-Dp1FSGIS.js +0 -1
  299. package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +0 -1
  300. package/dist/client/assets/arrow-down-D3-IbArq.js +0 -1
  301. package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +0 -46
  302. package/dist/client/assets/chunk-T65CQEWV-CiZ_ICHW.js +0 -1
  303. package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +0 -2
  304. package/dist/client/assets/content-7ZeCPAEt.js +0 -1
  305. package/dist/client/assets/content-BHUcUCH5.js +0 -1
  306. package/dist/client/assets/content-BUhvLPkv.js +0 -1
  307. package/dist/client/assets/content-BomQ5YWo.js +0 -1
  308. package/dist/client/assets/content-C39ELNgC.js +0 -1
  309. package/dist/client/assets/content-C4RYKHut.js +0 -1
  310. package/dist/client/assets/content-CCiZfG4H.js +0 -1
  311. package/dist/client/assets/content-CDpDtVI-.js +0 -1
  312. package/dist/client/assets/content-CO-9CeFd.js +0 -1
  313. package/dist/client/assets/content-CuOLxp1x.js +0 -1
  314. package/dist/client/assets/content-CvtLIjXS.js +0 -1
  315. package/dist/client/assets/content-CzwTUb9n.js +0 -1
  316. package/dist/client/assets/content-DQXbo2RO.js +0 -1
  317. package/dist/client/assets/content-DRTQ9QQb.js +0 -1
  318. package/dist/client/assets/content-LCELs6zg.js +0 -1
  319. package/dist/client/assets/content-qsDjA4Au.js +0 -1
  320. package/dist/client/assets/conversation-motion-features-T8vF9zED.js +0 -1
  321. package/dist/client/assets/discover-7Ks00w-M.js +0 -2
  322. package/dist/client/assets/embed-entry-n2ThmSSX.js +0 -2
  323. package/dist/client/assets/gestures-CxG3Dphs.js +0 -1
  324. package/dist/client/assets/hooks-Dst1TH7n.js +0 -2
  325. package/dist/client/assets/index-9as_JTUs.css +0 -1
  326. package/dist/client/assets/index-CU9dtwJk.js +0 -1
  327. package/dist/client/assets/index-Dewd56RX.js +0 -1
  328. package/dist/client/assets/index-_YQXKEhb.js +0 -1
  329. package/dist/client/assets/left-BhzPp-_E.js +0 -1
  330. package/dist/client/assets/left-CN1MABD0.js +0 -2
  331. package/dist/client/assets/left-DDgbsio7.js +0 -1
  332. package/dist/client/assets/left-Dpf2R9uD.js +0 -1
  333. package/dist/client/assets/left-HwwbMVtl.js +0 -2
  334. package/dist/client/assets/left-YfH0daht.js +0 -1
  335. package/dist/client/assets/left-agents-CYUwAy2Z.js +0 -1
  336. package/dist/client/assets/left-default-vEGZALPv.js +0 -1
  337. package/dist/client/assets/left-lanes-bphF-vlX.js +0 -1
  338. package/dist/client/assets/left-mission-B54-c3hq.js +0 -1
  339. package/dist/client/assets/left-np5USKqG.js +0 -1
  340. package/dist/client/assets/left-plan-BNBuDoPQ.js +0 -2
  341. package/dist/client/assets/library-DbCVJG_O.js +0 -1
  342. package/dist/client/assets/paperclip-DfpJkR4s.js +0 -1
  343. package/dist/client/assets/profile-s3KRbip1.js +0 -1
  344. package/dist/client/assets/resolve-panes-cp6eNewO.js +0 -1
  345. package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +0 -1
  346. package/dist/client/assets/right-09W2JJFg.js +0 -1
  347. package/dist/client/assets/right-B-MKhiJ6.js +0 -1
  348. package/dist/client/assets/right-B91Zl8lQ.js +0 -1
  349. package/dist/client/assets/right-BdtMzn35.js +0 -1
  350. package/dist/client/assets/right-BqmKXLtf.js +0 -1
  351. package/dist/client/assets/right-BzeB-Dpt.js +0 -1
  352. package/dist/client/assets/right-CkGOs-sq.js +0 -1
  353. package/dist/client/assets/right-CzGiNBzB.js +0 -1
  354. package/dist/client/assets/right-Dc7uqv7l.js +0 -1
  355. package/dist/client/assets/router-B-K15T7B.js +0 -1
  356. package/dist/client/assets/use-reduced-motion-Dla-G_Jz.js +0 -1
  357. package/dist/client/assets/use-scout-dev-flags-BOQF3fW2.js +0 -1
  358. package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +0 -1
@@ -1 +0,0 @@
1
- import{j as e,r as n,n as no,o as ro,B as io,C as ao}from"./index-CzVeWScw.js";import{u as F,C as co,n as lo,a as uo,b as mo,o as ge,p as vt,s as po,i as ho,f as yt,j as fo}from"./Provider-DSsb2gLR.js";import{resolveContentPane as go,resolveRightPane as xo,resolveLeftPane as bo}from"./resolve-panes-cp6eNewO.js";import{S as vo}from"./ScoutSurface-BEnDlynn.js";import{u as nt}from"./router-B-K15T7B.js";import{a as $}from"./api-h5zurxmi.js";import{c as Ee}from"./clipboard-e3fSpeo7.js";import{u as yo}from"./ContextMenu-N-Z6X0Z1.js";import{o as So,S as ko,V as jo,a as wo}from"./ScoutbotBroadcastChip-z9R_pC_U.js";import{e as Co}from"./SettingsDrawer-DL-SVLdd.js";import{u as Xe,a as Pt,b as No}from"./content-qsDjA4Au.js";import{s as xe,e as To,S as St}from"./scoutbot-BTIErYHo.js";import{g as Eo,d as Ro,i as Oo,e as Ao,s as Io}from"./scout-voice-S5_YZ2v8.js";import{d as Po}from"./colors-BtO5_zlx.js";import{i as Mo,S as Mt,a as Lo}from"./runtime-picker-BCQD7d4K.js";import{d as zo,f as kt,n as ve}from"./time-Dhsh_2EG.js";import{S as _o}from"./BriefingDetailScreen-BZU4qMwE.js";import{L as K}from"./loader-circle-Byb9kSFx.js";import{P as Do}from"./plus-CmFQp9Uj.js";import{H as Ho}from"./ScoutbotRealtimeVoiceCall-CDyFJX8m.js";import{C as Qe}from"./chevron-down-DRCbnzyY.js";import{A as Bo}from"./ProjectsRail-B1zrQLZe.js";import{S as $o}from"./send-horizontal-CqogPmbY.js";import{c as Vo}from"./createLucideIcon-ClCdc3F9.js";import{C as Uo}from"./copy-4LfKIdQJ.js";import{R as jt}from"./rocket-C-AskjZH.js";import{X as Fo}from"./x-D4X_y1j_.js";import{R as Wo}from"./refresh-cw-4oeFn1Jn.js";import{S as Go,d as qo}from"./secondaryNavConfig-Bg4Tc0gT.js";import{V as wt}from"./fx-z37u1o2z.js";import{B as Yo}from"./bot-BRINYlC6.js";import{BrokerRight as Ko}from"./right-CzGiNBzB.js";import{OpsRight as Jo}from"./inspector-panel-DgOM8nCo.js";import{M as Xo}from"./MeshCanvasMinimap-CuvXOkc7.js";import{u as Qo,T as Zo}from"./chunk-JTPDIGGW-s6WbxdjC.js";import{u as es,a as ts,b as os,c as ss,d as ns,e as rs}from"./hooks-Dst1TH7n.js";import{T as is}from"./chunk-HRAB3GC3-CAeEKaf5.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./search-C3bSJluv.js";import"./content-CDpDtVI-.js";import"./ActivityScreen-BXm6nJ6L.js";import"./mentions-fbQJ2mBI.js";import"./AgentDetailCard-sZuHl1de.js";import"./AgentLiveActions-DI4ooSHW.js";import"./terminal-takeover-KvmTwABa.js";import"./openContent-C6XO6kr5.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./EmptyState-DypEjx0V.js";/* empty css */import"./voice-levels-Dcr3jglk.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./left-BhzPp-_E.js";/* empty css */import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./content-BHUcUCH5.js";import"./AgentInfoScreen-CPkLg1pK.js";/* empty css */import"./BackToPicker-DZg_4nHL.js";import"./ObservedTopologyPanel-C1AQM0Mq.js";import"./AgentsScreen-zR6b2bUL.js";/* empty css */import"./AgentsSubnav-q0xcZi6C.js";import"./SecondaryNav-Hv5AJ3Fv.js";import"./message-square-CIXda-Y7.js";import"./scroll-text-BV-BB7v-.js";import"./library-DbCVJG_O.js";/* empty css */import"./AgentSessions-BxWIPkWh.js";import"./agents-project-model-UYiamtrU.js";import"./profile-s3KRbip1.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-9FqXmjBw.js";import"./terminal-relay-BkXjjSkq.js";import"./ConversationScreen-C-PrCRz1.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BGgbITvr.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./SessionObserve-BmmJ8dEh.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./AgentDefinitionsWorkspace-4Z0aN8AR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CXCq-oKj.js";/* empty css */import"./agent-essentials-SrzMYEXV.js";/* empty css *//* empty css */import"./right-B-MKhiJ6.js";import"./openAgent-Dbv5wfuL.js";import"./TmuxPeek-DNC4uWky.js";import"./ProjectsScreen-PW_NH5VK.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Dk-O4OVt.js";/* empty css */import"./AddProjectForm-CtEiLQnm.js";import"./projects-inbox-Diddml6e.js";import"./model-IGCUEsMy.js";import"./cache-Dr0why2k.js";import"./arrow-up-right-CcrWONpD.js";import"./ProjectAgentProfile-zE1cApxw.js";import"./ProjectAgentProfileBar-MODhG0P6.js";import"./ProjectsThreadAside-DaCEUWN1.js";import"./content-CvtLIjXS.js";import"./BriefingsScreen-Bfc3tqPp.js";/* empty css */import"./content-CuOLxp1x.js";import"./BrokerScreen-Chh8sGen.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-CaFe6kdh.js";import"./DispatchAftermath-OXYlMbT1.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-B7O4if20.js";import"./arrow-down-D3-IbArq.js";import"./sparkles-BjCA3Evu.js";import"./paperclip-DfpJkR4s.js";import"./check-COxArFXG.js";import"./radio-PauJIekM.js";import"./left-CN1MABD0.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./RailRow-DerXOXQS.js";/* empty css */import"./content-CO-9CeFd.js";import"./MessagesScreen-BhOJ7_tj.js";import"./right-Dc7uqv7l.js";import"./CodeScreen-D0hpZNLP.js";import"./CodeDiffPane-C1ebFt-Y.js";import"./usePierreRuntime-Bo4lD7Ui.js";/* empty css */import"./CodeProjectPicker-tsCly-f3.js";/* empty css */import"./content-C39ELNgC.js";import"./FollowScreen-DRgYuAvp.js";import"./content-BUhvLPkv.js";import"./HarnessesScreen-L-emPcXd.js";import"./useContentSecondaryNav-BX7Sq7vy.js";import"./OpsSubnav-D5Bpowtk.js";/* empty css */import"./left-HwwbMVtl.js";import"./operator-attention-BwSPeheT.js";import"./right-BqmKXLtf.js";import"./left-YfH0daht.js";import"./mesh-view-store-Btlyc7rW.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./content-DQXbo2RO.js";import"./MeshScreen-D5zzTn0o.js";import"./MeshCanvas-rtCBD7s6.js";import"./chunk-T65CQEWV-CiZ_ICHW.js";import"./useAgentHoverCard-FtCmY-b9.js";import"./local-agents-DBaUbP-_.js";/* empty css */import"./right-B91Zl8lQ.js";import"./left-DDgbsio7.js";import"./mesh-ops-Cnw3vwAu.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./content-C4RYKHut.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./right-CkGOs-sq.js";import"./left-np5USKqG.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./agent-lanes-model-CPgQRenB.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-mission-B54-c3hq.js";import"./mission-control-store-CcoNeQHG.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./page-status-DDvNdA8s.js";import"./left-plan-BNBuDoPQ.js";import"./content-BomQ5YWo.js";import"./OpsScreen-BeC0lieE.js";/* empty css */import"./AgentLanesView-DqRK5-d2.js";/* empty css */import"./observe-BNFzh-7B.js";import"./AgentFloorView-DMivAYHU.js";/* empty css */import"./AgentLanesPreflight-DNGvZvjd.js";import"./AgentLaneChrome-O9Yf0uR-.js";import"./AgentLaneCard-nB68f2CI.js";/* empty css */import"./AgentLaneSummaryResize-Ct3b0TQR.js";import"./agent-lane-card-model-DSWdGu-v.js";import"./agent-lane-preview-C33Dwpn7.js";import"./AgentLaneDetailSheet-BfhpaEQ3.js";import"./SlidePanel-B3gc5HnM.js";import"./agent-lane-detail-BNNm6FNu.js";import"./LaneTraceDetailSheet-Dl7foF88.js";import"./LaneTraceEventFocus-X4-DDFEo.js";import"./MissionControlView-D2JO9u-y.js";/* empty css */import"./MissionContextRail-0O-Zu1Tn.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-LnjmqBiW.js";import"./MissionLogPane-lZ9vUftY.js";import"./OpsAgentsView-BnMX0vEY.js";/* empty css */import"./DataTable-BoofV-_4.js";/* empty css */import"./sliders-horizontal-CUiOH26y.js";import"./PlanView-DDXdC19M.js";/* empty css */import"./AtopView-VZkk40v0.js";import"./TailView-DL3YZkzE.js";import"./content-LCELs6zg.js";import"./RepoDiffPageScreen-CGEMAv2Z.js";import"./RepoDiffViewerLazy-DIxkiMto.js";import"./ReposScreen-BN1lVjOj.js";/* empty css */import"./selection-bridge-B1dmkX3P.js";import"./right-BcFnuse9.js";import"./content-7ZeCPAEt.js";import"./KnowledgeSearchScreen-DvdOFh-b.js";/* empty css */import"./clock-CyfvRmj6.js";import"./KnowledgeSearchInspector-C2EZsQ5i.js";import"./content-CzwTUb9n.js";import"./SessionsScreen-BJEjuo2X.js";import"./RawSessionsTable-LWEvXJzj.js";import"./FlightObserveScreen-Yq5NtQQJ.js";/* empty css */import"./right-BzeB-Dpt.js";import"./content-DRTQ9QQb.js";import"./SettingsScreen-DJ-BhBwR.js";import"./StatusPill-B33sQinT.js";import"./AgentConfigurationScreen-CfBXxrsD.js";import"./server-Brw5Y1Gh.js";import"./VoicePermissionsPanel-WLN0V-Xv.js";import"./left-Dpf2R9uD.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./session-table-1xdSxSXq.js";import"./Terminal-Dp1FSGIS.js";/* empty css */import"./HerdrSession-DKFCJMst.js";import"./right-09W2JJFg.js";import"./content-CCiZfG4H.js";import"./WorkDetailScreen-D2Yl0mYZ.js";import"./WorkFilesViewer-BbVfcUN-.js";import"./right-BdtMzn35.js";import"./RealtimeVoiceScreen-XtxbCjOs.js";import"./HomeHero-CAEg8Yg5.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";const as=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]],cs=Vo("circle-check",as);function ls(){const{route:t,navigate:o,agents:s}=F();return e.jsx(vo,{children:go(t,o,s)})}const ds=new Set(["air-local","local","mini","node"]),us=new Set(["main","master","trunk"]);function ms(t){return t.replace(/```[\s\S]*?```/g," code omitted ").replace(/\*\*([^*\n]+)\*\*/g,"$1").replace(/(^|[\s(])\*([^\s*][^*\n]*?[^\s*]|[^\s*])\*(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/(^|[\s(])_([^\s_][^_\n]*?[^\s_]|[^\s_])_(?=[\s)\].,!?;:]|$)/g,"$1$2").replace(/^\s*[-*]\s+/gm,"").replace(/\bhttps?:\/\/[^\s)]+/gi,o=>ps(o)).replace(/\b(session|conversation|message|flight|invocation|work)(?:\s+(?:id|ref))?\s*[:#]?\s+([a-z0-9][a-z0-9._:-]{9,})\b/gi,(o,s,r)=>`${s.toLowerCase()} ending in ${Ze(r)}`).replace(/\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi,o=>`ID ending in ${Ze(o)}`).replace(/@?([a-z][a-z0-9-]*(?:\.[a-z0-9][a-z0-9-]*){2,})\b/gi,(o,s)=>hs(o)?o:fs(s)).replace(/`([^`]+)`/g,(o,s)=>gs(s)).replace(/\s+/g," ").trim()}function ps(t){try{return new URL(t).hostname.replace(/^www\./,"").replace(/\./g," dot ")}catch{return"link"}}function hs(t){const o=t.replace(/^@/,"").toLowerCase();return/\.(com|app|dev|org|net|io|local)(?:\b|\/)/.test(o)&&!o.endsWith(".air-local")}function fs(t){const o=t.split(".").filter(Boolean);if(o.length<2)return t;const s=[...o];for(;s.length>1&&ds.has(s.at(-1).toLowerCase());)s.pop();const[r,...l]=s,a=l.filter(u=>!us.has(u.toLowerCase())).map(et).filter(Boolean);return[et(r),...a].filter(Boolean).join(", ")}function gs(t){return/^[a-z0-9][a-z0-9._:-]{12,}$/i.test(t)?`ID ending in ${Ze(t)}`:et(t)}function Ze(t){return(t.replace(/[^a-z0-9]/gi,"").slice(-4)||t.slice(-4)).split("").join(" ")}function et(t){return t.replace(/^@/,"").replace(/[_./:-]+/g," ").replace(/\s+/g," ").trim()}function rt(t){return t.handle??t.id}function xs(t,o){if(!o)return!0;const s=o.toLowerCase();return t.name.toLowerCase().includes(s)||rt(t).toLowerCase().includes(s)||t.id.toLowerCase().includes(s)}function bs({agents:t,query:o,excludeIds:s,maxResults:r=50}){const l=n.useMemo(()=>new Set(s??[]),[s]),a=n.useMemo(()=>t.filter(y=>!l.has(y.id)&&xs(y,o.trim())).slice(0,r),[t,l,o,r]),[u,d]=n.useState(0);n.useEffect(()=>{d(v=>a.length===0?0:Math.min(v,a.length-1))},[a]);const f=n.useCallback(v=>{d(y=>a.length===0?0:(y+v+a.length)%a.length)},[a.length]),b=n.useCallback(()=>d(0),[]);return{filtered:a,highlightedIndex:u,setHighlightedIndex:d,moveHighlight:f,resetHighlight:b}}function vs({agents:t,highlightedIndex:o,onSelect:s,onHover:r,emptyHint:l,pendingId:a,className:u,id:d}){return t.length===0?e.jsx("div",{className:`agent-autocomplete ${u??""}`,id:d,children:e.jsx("div",{className:"agent-autocomplete-empty",children:l??"No matches."})}):e.jsx("div",{className:`agent-autocomplete ${u??""}`,role:"listbox",id:d,children:t.map((f,b)=>{const v=rt(f),y=b===o;return e.jsxs("button",{type:"button",role:"option","aria-selected":y,className:`agent-autocomplete-item${y?" is-active":""}`,onMouseDown:S=>{S.preventDefault(),s(f)},onMouseEnter:()=>r?.(b),disabled:a===f.id,children:[e.jsx("div",{className:"agent-autocomplete-avatar",style:{background:Po(f.name)},children:f.name[0]?.toUpperCase()??"?"}),e.jsxs("div",{className:"agent-autocomplete-info",children:[e.jsx("span",{className:"agent-autocomplete-name",children:f.name}),e.jsxs("span",{className:"agent-autocomplete-handle",children:["@",v]})]})]},f.id)})})}const ys=/(^|\s)@([a-zA-Z0-9_.-]*)$/,Ne=4,Ss=254;function ks(t,o){if(o<=0)return null;const s=t.slice(0,o),r=ys.exec(s);if(!r)return null;r[1];const l=r[2]??"",a=s.length-l.length-1;return a<0?null:(t.slice(o,o+1),{start:a,end:o,query:l})}const js=["boxSizing","width","height","overflowX","overflowY","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderStyle","paddingTop","paddingRight","paddingBottom","paddingLeft","fontStyle","fontVariant","fontWeight","fontStretch","fontSize","fontSizeAdjust","lineHeight","fontFamily","textAlign","textTransform","textIndent","textDecoration","letterSpacing","wordSpacing","tabSize","whiteSpace","wordWrap","wordBreak"];function ws(t,o){const s=document.createElement("div");document.body.appendChild(s);const r=s.style,l=window.getComputedStyle(t);r.position="absolute",r.visibility="hidden",r.whiteSpace="pre-wrap",r.wordWrap="break-word",r.top="0",r.left="-9999px";for(const b of js)r[b]=l[b];s.textContent=t.value.slice(0,o);const a=document.createElement("span");a.textContent=t.value.slice(o)||".",s.appendChild(a);const u=a.offsetTop,d=a.offsetLeft,f=parseInt(l.lineHeight,10)||a.offsetHeight;return document.body.removeChild(s),{top:u,left:d,height:f}}const Cs=n.forwardRef(function({agents:o,excludeIds:s,value:r,onChange:l,onSubmit:a,placeholder:u,rows:d=1,disabled:f,submitOnEnter:b=!1,className:v,textareaClassName:y,emptyHint:S,onMention:k},T){const j=n.useRef(null),I=n.useRef(null),[N,x]=n.useState(null),[h,C]=n.useState(null);n.useImperativeHandle(T,()=>({focus:()=>j.current?.focus(),blur:()=>j.current?.blur(),get textarea(){return j.current}}),[]);const O=N?.query??"",{filtered:P,highlightedIndex:L,setHighlightedIndex:V,moveHighlight:z}=bs({agents:o,query:O,excludeIds:s}),W=n.useCallback(()=>{const m=j.current;if(!m)return;const g=window.getComputedStyle(m),E=parseFloat(g.minHeight)||0,R=parseFloat(g.maxHeight);m.style.height="0px";const M=Math.max(m.scrollHeight,E),A=Number.isFinite(R)&&R>0?Math.min(M,R):M;m.style.height=`${A}px`,m.style.overflowY=M>A?"auto":"hidden"},[]);n.useLayoutEffect(()=>{W()},[W,r]);const J=n.useCallback(()=>{const m=j.current;if(!m)return;const g=ks(m.value,m.selectionStart??0);x(g)},[]);n.useLayoutEffect(()=>{const m=j.current;if(!m||!N){C(null);return}const{top:g,left:E,height:R}=ws(m,N.start),M=m.getBoundingClientRect(),A=m.parentElement?.getBoundingClientRect(),_=A?M.top-A.top:0,Z=A?M.left-A.left:0,ee=I.current?.offsetHeight||Ss,q=window.visualViewport,Me=q?.offsetTop??0,se=Me+(q?.height??window.innerHeight),le=M.top+g-m.scrollTop,D=le+R,X=se-D-Ne,de=le-Me-Ne,Le=X<ee&&de>X;C({top:Le?_+g-m.scrollTop-ee-Ne:_+g+R-m.scrollTop+Ne,left:Z+E-m.scrollLeft})},[N,r,P.length]);const G=n.useCallback(m=>{const g=j.current,E=N;if(!g||!E)return;const R=rt(m),M=r.slice(0,E.start),A=r.slice(E.end),_=`@${R} `,Z=`${M}${_}${A}`;l(Z),k?.(m),x(null);const ee=E.start+_.length;queueMicrotask(()=>{const q=j.current;q&&(q.focus(),q.setSelectionRange(ee,ee))})},[N,r,l,k]),ce=m=>{if(Mo(m)||b&&m.key==="Enter"&&!m.shiftKey&&!m.nativeEvent?.isComposing&&!(N&&P.length>0)){m.preventDefault(),a?.();return}if(N&&P.length>0){if(m.key==="ArrowDown"){m.preventDefault(),z(1);return}if(m.key==="ArrowUp"){m.preventDefault(),z(-1);return}if(m.key==="Enter"||m.key==="Tab"){if(m.key==="Enter"&&m.shiftKey)return;const E=P[L];if(E){m.preventDefault(),G(E);return}}if(m.key==="Escape"){m.preventDefault(),x(null);return}}};return e.jsxs("div",{className:`agent-mention-wrap ${v??""}`,children:[e.jsx("textarea",{ref:j,className:y,value:r,rows:d,placeholder:u,disabled:f,onChange:m=>{l(m.target.value),W(),queueMicrotask(J)},onKeyUp:J,onClick:J,onBlur:()=>x(null),onKeyDown:ce,"aria-autocomplete":"list"}),N&&e.jsx("div",{ref:I,className:"agent-mention-popover",style:{top:`${h?.top??0}px`,left:`${h?.left??0}px`,visibility:h?void 0:"hidden"},children:e.jsx(vs,{agents:P,highlightedIndex:L,onSelect:G,onHover:V,emptyHint:S??"No matches."})})]})});function Ns({state:t,chatExpanded:o,onToggleExpanded:s,sessionPickerOpen:r,onToggleSessionPicker:l,onStartNewChat:a,startingNewChat:u,onSwitchSession:d,switchingSessionId:f,sending:b,briefing:v,pendingAsk:y,onArchiveSession:S,archivingSessionId:k,onAssistantContextMenu:T,suggestedPrompts:j,onSelectPrompt:I}){const x=t.session.messages,h=o?x:x.slice(-4),C=o?0:Math.max(0,x.length-h.length),O=x.length,P=t.sessions.length,L=t.retention,V=x.length===0&&!y&&!b&&!v,z=u||b||v||!!f||!!k,W=t.session.createdAt?zo(t.session.createdAt):null,J=V?"Scout conversation":t.session.title&&t.session.title!=="New Scout Session"?t.session.title:`Session ${t.session.id.slice(0,8)}`,G=n.useRef(null),ce=x[x.length-1]?.id??null,m=x[x.length-1]?.body??"";return n.useEffect(()=>{const g=G.current;g&&(g.scrollTop=g.scrollHeight)},[ce,m,y,b,o,t.session.id]),e.jsxs("div",{className:"flex h-full min-h-0 flex-1 flex-col overflow-hidden rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 font-mono text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsxs("div",{className:"flex shrink-0 items-center justify-between gap-2 border-b border-[var(--scout-chrome-border-soft)] px-2.5 py-1.5",children:[e.jsxs("div",{className:"flex min-w-0 items-center gap-1.5",children:[e.jsx("span",{className:"min-w-0 truncate text-[var(--scout-chrome-ink)]",title:t.session.id,children:J}),W&&!V&&e.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",W]}),!V&&e.jsxs("span",{className:"shrink-0 text-[var(--scout-chrome-ink-ghost)]",children:["· ",O," msg",O===1?"":"s"]})]}),e.jsxs("div",{className:"flex shrink-0 items-center gap-1",children:[e.jsxs("button",{type:"button",title:"Start a new chat (keeps this chat in Chats)","aria-label":"Start new chat",onClick:a,disabled:z,className:"flex items-center gap-1 rounded border border-lime-300/30 bg-lime-300/[0.06] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-lime-100 transition-colors hover:border-lime-300/50 hover:bg-lime-300/10 disabled:cursor-not-allowed disabled:opacity-40",children:[u?e.jsx(K,{size:10,className:"animate-spin"}):e.jsx(Do,{size:10}),e.jsx("span",{children:u?"Starting":"New chat"})]}),e.jsxs("button",{type:"button",title:`Switch chat (${P} total)`,"aria-label":"Switch chat",onClick:l,className:`flex items-center gap-1 rounded border px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] transition-colors ${r?"border-lime-300/40 bg-lime-300/10 text-lime-100":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[e.jsx(Ho,{size:10}),e.jsx("span",{children:"Chats"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink-ghost)]",children:P}),e.jsx(Qe,{size:9,className:r?"rotate-180 transition-transform":"transition-transform"})]}),O>4&&e.jsxs("button",{type:"button",title:o?"Collapse chat":"View full session","aria-label":o?"Collapse chat":"View full session",onClick:s,className:"flex items-center gap-1 rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:[e.jsx("span",{children:o?"Collapse":"Full"}),o?e.jsx(co,{size:9}):e.jsx(Qe,{size:9})]})]})]}),r&&e.jsxs("div",{className:"shrink-0 border-b border-[var(--scout-chrome-border-soft)] px-2 py-1.5",children:[e.jsxs("div",{className:"mb-1 flex items-center justify-between gap-2 px-0.5 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{children:"Recent chats"}),L&&L.archivedCount>0&&e.jsxs("span",{children:[L.archivedCount," archived"]})]}),e.jsx("div",{className:"flex max-h-40 flex-col gap-0.5 overflow-y-auto pr-0.5",children:t.sessions.map(g=>{const E=g.id===t.session.id,R=f===g.id,M=k===g.id,A=kt(g.updatedAt)||"unknown",_=g.title&&g.title!=="New Scout Session"?g.title:`Session ${g.id.slice(0,8)}`;return e.jsxs("div",{className:`flex items-center gap-2 rounded border px-2 py-1 text-left transition-colors ${E?"border-lime-300/40 bg-lime-300/[0.06] text-lime-100":"border-transparent text-[var(--scout-chrome-ink-faint)] hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[e.jsxs("button",{type:"button",onClick:()=>{E||d(g.id)},disabled:E||!!f||!!k,className:"flex min-w-0 flex-1 items-center gap-2 text-left disabled:cursor-not-allowed disabled:opacity-40",children:[e.jsx("span",{className:`h-1.5 w-1.5 shrink-0 rounded-full ${E?"bg-lime-300":"bg-[var(--scout-chrome-ink-ghost)]"}`}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink)]",children:_}),e.jsxs("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[g.messageCount," msg"]}),e.jsx("span",{className:"shrink-0 text-2xs text-[var(--scout-chrome-ink-ghost)]",children:A}),R&&e.jsx(K,{size:10,className:"shrink-0 animate-spin text-lime-200"})]}),e.jsx("button",{type:"button",title:"Archive chat","aria-label":`Archive chat ${_}`,onClick:()=>S(g.id),disabled:!!f||!!k,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-transparent text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-black/20 hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-30",children:M?e.jsx(K,{size:10,className:"animate-spin"}):e.jsx(Bo,{size:10})})]},g.id)})})]}),e.jsxs("div",{ref:G,className:"flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto px-2.5 py-2",children:[C>0&&e.jsxs("button",{type:"button",onClick:s,className:"self-start text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)] hover:text-[var(--scout-chrome-ink)]",children:["↑ ",C," earlier message",C===1?"":"s"]}),V&&e.jsx(Ts,{suggestedPrompts:j,onSelectPrompt:I}),h.map((g,E)=>{const R=Os(h[E-1],g),M=As(g.createdAt);return e.jsxs("div",{className:"flex flex-col gap-1",children:[R&&e.jsx("div",{className:"self-center rounded-full bg-white/[0.06] px-2.5 py-0.5 font-mono text-2xs font-medium text-[var(--scout-chrome-ink-ghost)]",title:kt(g.createdAt),"aria-label":M,children:M}),e.jsx(Ct,{role:g.role,body:g.body,onContextMenu:g.role==="assistant"&&T?A=>T(A,g.body):void 0})]},g.id)}),y&&e.jsx(Ct,{role:"user",body:y,pending:!0}),b&&!y&&e.jsx("p",{className:"text-[var(--scout-chrome-ink-ghost)]",children:"Reading the control plane…"}),v&&e.jsxs("div",{className:"flex items-center gap-2 rounded border border-lime-300/30 bg-lime-300/[0.06] px-2.5 py-2 font-mono text-xs leading-relaxed text-lime-100",children:[e.jsx(K,{size:12,className:"shrink-0 animate-spin text-lime-300","aria-hidden":"true"}),e.jsxs("div",{className:"min-w-0 flex flex-col gap-0.5",children:[e.jsx("span",{className:"text-xs uppercase tracking-[0.14em] text-lime-300",children:"Briefing"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:"Codex is reviewing the control-plane snapshot. Voice will pick up when it lands."})]})]})]})]})}function Ts({suggestedPrompts:t=[],onSelectPrompt:o}){return e.jsxs("div",{className:"flex min-h-0 flex-1 flex-col justify-start gap-2 px-1 py-2.5",children:[t.length>0?e.jsx("div",{className:"grid gap-1",children:t.slice(0,3).map(s=>e.jsx("button",{type:"button",onClick:()=>o?.(s),className:"min-h-7 truncate rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 text-left font-mono text-xs leading-snug text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:s},s))}):null,e.jsxs("div",{className:"max-w-[30rem]",children:[e.jsx("div",{className:"font-sans text-lg font-semibold leading-tight text-[var(--scout-chrome-ink)]",children:"Start with a question."}),e.jsx("p",{className:"mt-0.5 font-sans text-xs leading-snug text-[var(--scout-chrome-ink-faint)]",children:"Paste a failed result or ask about what you are seeing. Scout replies when you ask."})]})]})}function Es({agents:t,draft:o,onDraftChange:s,onSubmit:r,sending:l,recording:a,voiceLabel:u,voiceBusy:d,voiceUnavailable:f,voiceHeld:b=!1,onMicClick:v,prominent:y=!1,autoFocus:S,focusSignal:k}){const T=n.useRef(null),j=n.useCallback(()=>{const h=T.current;h&&(h.textarea?h.textarea.focus({preventScroll:!0}):h.focus())},[]);n.useEffect(()=>{S&&j()},[S,j]),n.useEffect(()=>{k&&j()},[k,j]);let I="Start talking";f&&(I="Set up Scout voice"),a&&(I="Stop talking"),(d||b)&&(I=u);const N=d||a||b,x=["w-full resize-none rounded border font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)]",y?"min-h-[88px] max-h-[170px] border-lime-300/30 bg-black/25 px-3 py-2 text-md":"min-h-[44px] max-h-[124px] border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5"].join(" ");return e.jsxs("form",{className:"flex flex-col gap-1.5",onSubmit:h=>{h.preventDefault(),r()},children:[e.jsx(Cs,{ref:T,agents:t,value:o,onChange:s,onSubmit:()=>{o.trim()&&!l&&r()},placeholder:b?"Type while live voice is on…":y?"Ask Scout about what you are seeing…":"Ask Scout…",rows:y?4:2,disabled:l,submitOnEnter:!0,className:"min-w-0",textareaClassName:x}),e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("button",{type:"button",title:I,"aria-label":I,onClick:v,disabled:l||d||b,className:`flex h-8 items-center justify-center rounded border transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${a?"border-lime-300/50 bg-lime-300/10 text-lime-200":b?"border-lime-300/25 bg-lime-300/[0.05] text-lime-100/70":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"} ${N?"gap-1.5 px-3 font-mono text-xs uppercase tracking-[0.12em]":"w-9"}`,children:[d?e.jsx(K,{size:13,className:"animate-spin"}):a?e.jsx(Mt,{size:12,className:"fill-current"}):e.jsx(Lo,{size:13}),N&&e.jsx("span",{className:"truncate",children:u})]}),e.jsx("button",{type:"submit",title:"Send","aria-label":"Send",disabled:!o.trim()||l,className:"flex h-8 w-9 items-center justify-center rounded bg-lime-300/90 text-black transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:l?e.jsx(K,{size:13,className:"animate-spin"}):e.jsx($o,{size:13})})]})]})}function Ct({role:t,body:o,pending:s=!1,onContextMenu:r}){const l=t==="user",a=l?o:xe(o),[u,d]=n.useState(!1),f=n.useCallback(()=>{Ee(a).then(()=>{d(!0),window.setTimeout(()=>d(!1),1200)}).catch(()=>{})},[a]);return e.jsxs("div",{className:"group flex flex-col gap-0.5",onContextMenu:r,children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("span",{className:`text-2xs uppercase tracking-[0.12em] ${l?"text-[var(--scout-chrome-ink-ghost)]":"text-lime-300"}`,children:[l?"You":"Reply",s&&" · sending"]}),e.jsx("button",{type:"button",title:u?"Copied":"Copy message","aria-label":u?"Copied message":"Copy message",disabled:s||!a.trim(),onClick:f,className:"flex h-5 w-5 shrink-0 items-center justify-center rounded border border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-ghost)] opacity-70 transition hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-20 group-hover:opacity-100",children:u?e.jsx(cs,{size:11}):e.jsx(Uo,{size:11})})]}),l?e.jsx("p",{className:`whitespace-pre-wrap break-words text-sm leading-relaxed text-[var(--scout-chrome-ink)] ${s?"opacity-60":""}`,children:a}):e.jsx("div",{className:s?"opacity-60":"",children:e.jsx(_o,{text:a})})]})}const Rs=5*6e4;function Os(t,o){if(!t||!tt(t.createdAt,o.createdAt))return!0;const s=ve(t.createdAt),r=ve(o.createdAt);return s===null||r===null?!0:Math.abs(r-s)>=Rs}function tt(t,o){const s=ve(t),r=ve(o);if(s===null||r===null)return!1;const l=new Date(s),a=new Date(r);return l.getFullYear()===a.getFullYear()&&l.getMonth()===a.getMonth()&&l.getDate()===a.getDate()}function As(t){const o=ve(t);if(o===null)return"";const s=new Date(o),r=new Date,l=new Date(r);l.setDate(r.getDate()-1);const a=s.toLocaleTimeString([],{hour:"numeric",minute:"2-digit"});return tt(o,r.getTime())?`Today ${a}`:tt(o,l.getTime())?`Yesterday ${a}`:s.getFullYear()===r.getFullYear()?`${s.toLocaleDateString([],{month:"short",day:"numeric"})} ${a}`:`${s.toLocaleDateString([],{month:"short",day:"numeric",year:"numeric"})} ${a}`}function Nt({icon:t,title:o,onClick:s,disabled:r,active:l,badge:a}){return e.jsxs("button",{type:"button",title:o,"aria-label":o,onClick:s,disabled:r,className:`flex shrink-0 items-center gap-1 rounded border p-1 text-xs transition-colors disabled:cursor-not-allowed disabled:opacity-40 ${l?"border-lime-300/50 bg-lime-300/10 text-lime-200":"border-[var(--scout-chrome-border-soft)] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]"}`,children:[t,a&&e.jsx("span",{className:"font-mono text-3xs tracking-tight",children:a})]})}function Is({issue:t,probeState:o,onLaunch:s,onRetry:r,onSettings:l,onDismiss:a}){const u=o==="probing"||o==="launching";return e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/15 px-2.5 py-2 font-mono text-xs text-[var(--scout-chrome-ink)]",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(jt,{size:13,className:"mt-0.5 shrink-0 text-[var(--scout-chrome-ink-faint)]"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsx("div",{className:"uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:"Scout Voice"}),e.jsx("p",{className:"mt-1 leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"Open Scout Menu to use speech."}),t&&e.jsx("p",{className:"mt-2 break-words leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:t})]}),a?e.jsx("button",{type:"button",title:"Hide voice setup","aria-label":"Hide voice setup",onClick:a,className:"shrink-0 rounded border border-transparent p-1 text-[var(--scout-chrome-ink-ghost)] transition-colors hover:border-[var(--scout-chrome-border-soft)] hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)]",children:e.jsx(Fo,{size:11})}):null]}),e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1.5",children:[e.jsx(qe,{icon:o==="launching"?e.jsx(K,{size:12,className:"animate-spin"}):e.jsx(jt,{size:12}),label:o==="launching"?"Opening":"Open",onClick:s,disabled:o==="probing",title:"Open Scout services"}),e.jsx(qe,{icon:o==="probing"?e.jsx(K,{size:12,className:"animate-spin"}):e.jsx(Wo,{size:12}),label:"Retry",onClick:r,disabled:u,title:"Check Scout voice again"}),e.jsx(qe,{icon:e.jsx(Go,{size:12}),label:"Voice",onClick:l,disabled:o==="probing",title:"Open Scoutbot voice settings"})]})]})}function qe({icon:t,label:o,onClick:s,disabled:r,title:l}){return e.jsxs("button",{type:"button",title:l,onClick:s,disabled:r,className:"flex min-h-7 items-center justify-center gap-1.5 rounded border border-[var(--scout-chrome-border-soft)] px-2 text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] transition-colors hover:bg-[var(--scout-chrome-hover)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-not-allowed disabled:opacity-45",children:[t,o]})}function Ps({voicePresetId:t,onVoicePresetId:o,voiceDefaults:s,modelDraft:r,onModelDraft:l,promptDraft:a,onPromptDraft:u,configLoading:d,configSaving:f,configError:b,configStatus:v,onSave:y,onReload:S}){return e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 p-3",children:e.jsxs("div",{className:"flex flex-col gap-2",children:[e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Voice FX",e.jsx("select",{value:t,onChange:k=>o(k.target.value),className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:wt.map(k=>e.jsxs("option",{value:k.id,children:[k.label," — ",k.family]},k.id))}),e.jsx("span",{className:"font-mono text-2xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink-ghost)]",children:wt.find(k=>k.id===t)?.description??"Custom voice mood for spoken replies."})]}),e.jsxs("div",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Scout Voice",e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)]",children:s?`${s.modelId}${s.voiceId?` / ${s.voiceId}`:""}`:"Unavailable"})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["Preferred model",e.jsx("input",{value:r,onChange:k=>l(k.target.value),placeholder:"gpt-4.1-mini",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5 font-mono text-sm normal-case tracking-normal text-[var(--scout-chrome-ink)] placeholder:text-[var(--scout-chrome-ink-ghost)]",disabled:d||f})]}),e.jsxs("label",{className:"flex flex-col gap-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:["System Prompt",e.jsx("textarea",{value:a,onChange:k=>u(k.target.value),rows:6,className:"w-full resize-y rounded border border-[var(--scout-chrome-border-soft)] bg-black/20 px-2 py-1.5 font-mono text-xs normal-case leading-relaxed tracking-normal text-[var(--scout-chrome-ink)]",disabled:d||f})]}),b&&e.jsx("div",{className:"font-mono text-xs leading-relaxed text-red-300",children:b}),v&&e.jsx("div",{className:"font-mono text-xs leading-relaxed text-lime-200",children:v}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("button",{type:"button",onClick:y,disabled:d||f||!a.trim(),className:"flex items-center justify-center gap-2 rounded bg-lime-300/90 px-2.5 py-2 font-mono text-xs font-bold uppercase tracking-[0.12em] text-black transition-opacity disabled:cursor-not-allowed disabled:opacity-40",children:[(d||f)&&e.jsx(K,{size:13,className:"animate-spin"}),f?"Saving":"Save"]}),e.jsx("button",{type:"button",onClick:S,disabled:d||f,className:"rounded border border-[var(--scout-chrome-border-soft)] px-2.5 py-2 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-hover)] disabled:cursor-not-allowed disabled:opacity-40",children:"Reload"})]})]})})}const Ms="chill-dispatcher",Ls=6e4,zs=2500,_s=1.2,Ds={lowCutHz:160,highCutHz:5200,bandQ:.35,saturationAmount:.035,bitcrushAmount:0,hissGain:0,hissCutoffHz:1800,presencePeakDb:1.5,presenceCenterHz:1500,presenceQ:.65,compressorThresholdDb:-15,compressorRatio:2.2,clickEnabled:!0,clickGain:.24,clickDurationMs:45,squelchTailEnabled:!0,squelchTailGain:.018,squelchTailDurationMs:95,outputGain:1,wetMix:.38};function Hs(t){const o=Math.min(1,t/8);return{saturationAmount:.035+o*.025,presencePeakDb:1.5+o*1.5}}function Bs(t,o){return{...t==="chill-dispatcher"?Ds:{},...Hs(o)}}function Lt(t,o,s){return new Promise((r,l)=>{const a=window.setTimeout(()=>l(new Error(s)),o);t.then(r,l).finally(()=>window.clearTimeout(a))})}async function Tt(t,o={}){!t.sessionId&&!o.allowCurrentSession||await Lt(t.cancel(),zs,"Timed out releasing Scout voice session.").catch(()=>{})}function $s(t){const o=t instanceof Error?t.message:String(t);return/session_cancelled|was cancelled|cancelled/i.test(o)}const Et=new RegExp("(?:^|(?<=[\\s(`'\"<>]))(?:~\\/|\\/(?:Users|home|opt|var|etc|tmp|private)\\/)[^\\s)`'\"<>]+\\.[A-Za-z0-9]{1,8}\\b","g");function Vs(t){const o=[],s=new Set;Et.lastIndex=0;let r;for(;(r=Et.exec(t))!==null;)s.has(r[0])||(s.add(r[0]),o.push(r[0]));return o}function Rt(t){const o=t.split("/").filter(Boolean);return o.length<=2?t:`…/${o.slice(-2).join("/")}`}function Us(){return{requesterName:"OpenScout",productName:"Scout Voice",headline:"Turn on local voice",body:"Scout voice handles local speech capture and spoken replies. Start Scout services, then return here to talk with your workspace.",actionLabel:"Return to OpenScout",logo:{url:new URL("/openscout-icon.png",window.location.href).toString(),symbolName:"sparkles"}}}const Fs=["Explain what went wrong here.","Help me rewrite this message.","What should I try next?"];function Ot({height:t,forceExpanded:o=!1,fill:s=!1}={}){const{applyScoutbotUiAction:r,agents:l,route:a,onlineCount:u}=F(),d=lo(),f=nt(uo,!1),b=mo(),v=f&&(b.state==="connecting"||b.state==="live"),[y,S]=Xe("openscout.scoutbot.collapsed",!0),[k,T]=n.useState(""),[j,I]=n.useState(!1),[N,x]=n.useState(null),[h,C]=n.useState(null),[O,P]=n.useState(null),[L,V]=n.useState("idle"),[z,W]=Xe("openscout.scoutbot.voiceReplies",!1),[J]=Pt("openscout.scoutbot.voiceSpeed",_s),[G,ce]=No("openscout.scoutbot.voicePresetId",Ms),[m,g]=n.useState(!1),[E,R]=n.useState(null),[M,A]=n.useState(""),[_,Z]=n.useState(!1),[ee,q]=n.useState(null),[Me,se]=n.useState(null),[le,D]=n.useState(null),[X,de]=n.useState(!1),[Le,ze]=n.useState(!1),[Y,ne]=n.useState(null),[ue,it]=n.useState(!1),[_e,at]=n.useState(null),[Dt,ct]=n.useState(!1),[Ht,lt]=n.useState(!1),[Bt,Se]=n.useState(null),[$t,De]=n.useState(null),[He,Be]=n.useState(""),[$e,Ve]=n.useState(""),[Vt,dt]=n.useState(null),[Ut,re]=n.useState(!1),[Ft,ie]=n.useState(0),[Wt,ke]=n.useState(!1),[Ue,ut]=n.useState(null),je=n.useRef(Eo()),te=n.useRef(null),me=n.useRef(null),pe=n.useRef(null),mt=n.useRef(z);mt.current=z;const B=n.useCallback(()=>{pe.current?.stop(),pe.current=null,Z(!1)},[]),we=n.useCallback(i=>{if(!i)return;B();const c=Ro(ms(i),{speed:J,presetId:G,params:Bs(G,u)});pe.current=c,Z(!0),c.promise.catch(p=>{Oo(p)||x(p instanceof Error?p.message:"Scout voice speech failed.")}).finally(()=>{pe.current===c&&(pe.current=null,Z(!1))})},[B,J,u,G]),pt=n.useCallback(i=>{mt.current&&we(i)},[we]),ht=n.useCallback(i=>{we(xe(i))},[we]),{openFilePreview:ft}=F(),gt=yo(),Gt=n.useCallback((i,c)=>{const p=window.getSelection()?.toString().trim(),w=xe(c),H=Vs(w),U=[];if(p&&(U.push({kind:"action",label:"Copy selection",shortcut:"⌘C",onSelect:()=>{Ee(p)}}),U.push({kind:"separator"})),U.push({kind:"action",label:"Copy message",onSelect:()=>{Ee(w)}}),H.length>0){U.push({kind:"separator"});for(const Q of H.slice(0,5)){const Ge=Rt(Q);U.push({kind:"action",label:`Preview ${Ge}`,onSelect:()=>ft(Q)})}for(const Q of H.slice(0,5)){const Ge=Rt(Q);U.push({kind:"action",label:`Open ${Ge} in OS`,onSelect:()=>{$("/api/file/reveal",{method:"POST",body:JSON.stringify({path:Q})}).catch(()=>{})}})}U.push({kind:"action",label:H.length===1?"Copy path":"Copy first path",onSelect:()=>{Ee(H[0])}})}U.push({kind:"separator"}),U.push({kind:"action",label:_?"Say again (stop current)":"Say",onSelect:()=>ht(c)}),gt(i,U)},[ft,ht,gt,_]);n.useEffect(()=>()=>{B()},[B]);const qt=Fs,ae=n.useCallback(i=>{const c=[...i.messages].reverse().find(w=>w.role==="user"),p=[...i.messages].reverse().find(w=>w.role==="assistant");q(c?.body??null),se(p?xe(p.body):null)},[]),he=n.useCallback(async()=>{try{const i=await $("/api/scoutbot/session");ne(i),ae(i.session)}catch{ne(null)}},[ae]);n.useEffect(()=>{he()},[he]);const Fe=n.useCallback(async()=>{ct(!0),Se(null);try{const i=await $("/api/scoutbot/config");Be(i.model),Ve(i.systemPrompt),De(null)}catch(i){Se(i instanceof Error?i.message:"Could not load settings.")}finally{ct(!1)}},[]);n.useEffect(()=>{X&&Fe()},[Fe,X]),n.useEffect(()=>{if(!X)return;let i=!1;return $("/api/voice/defaults").then(c=>{i||dt(c)}).catch(()=>{i||dt(null)}),()=>{i=!0}},[X]);const Yt=n.useCallback(async()=>{lt(!0),Se(null),De(null);try{const i=await $("/api/scoutbot/config",{method:"POST",body:JSON.stringify({model:He,systemPrompt:$e})});Be(i.config.model),Ve(i.config.systemPrompt),De("Saved")}catch(i){Se(i instanceof Error?i.message:"Could not save settings.")}finally{lt(!1)}},[He,$e]),Kt=n.useCallback(async i=>{if(!(!i||Ue)){ut(i),x(null),B();try{const c=await $("/api/scoutbot/session/switch",{method:"POST",body:JSON.stringify({id:i})});ne(c),ae(c.session),ke(!1),re(!1),window.dispatchEvent(new CustomEvent(ge,{detail:{id:c.session.id}}))}catch(c){x(c instanceof Error?c.message:"Could not switch session.")}finally{ut(null)}}},[B,Ue,ae]),We=n.useCallback(async()=>{if(!(ue||j)){if(Y?.session.messages.length===0){T(""),x(null),re(!1),ke(!1),D("New chat ready"),ie(i=>i+1);return}it(!0),x(null),D("Starting new chat"),B();try{const i=await $("/api/scoutbot/session/reset",{method:"POST"});ne(i),T(""),q(null),se(null),re(!1),ke(!1),D("New chat ready"),ie(c=>c+1),window.dispatchEvent(new CustomEvent(ge,{detail:{id:i.session.id}}))}catch(i){D(null),x(i instanceof Error?i.message:"Could not start a new chat.")}finally{it(!1)}}},[ue,j,Y,B]),Jt=n.useCallback(async i=>{if(!(!i||_e)){at(i),x(null),B();try{const c=await $("/api/scoutbot/session/archive",{method:"POST",body:JSON.stringify({id:i})});ne(c),ae(c.session),re(!1),D("session archived"),window.dispatchEvent(new CustomEvent(ge,{detail:{id:c.session.id}}))}catch(c){x(c instanceof Error?c.message:"Could not archive session.")}finally{at(null)}}},[_e,B,ae]),Ce=n.useCallback((i,c)=>{C(c),P(c?null:i.lastUnavailableReason??"Scout voice service is not reachable."),V("idle")},[]),oe=n.useCallback(async(i=!1)=>{const c=je.current;V(w=>w==="launching"?w:"probing");const p=await c.probe(i?{force:!0}:void 0);return Ce(c,p),p},[Ce]);n.useEffect(()=>{Ao();const i=je.current,c=Io(p=>{C(p.ok),P(p.ok?null:p.reason),V("idle")});return i.connectionState==="unknown"?oe():Ce(i,i.connectionState==="connected"),c},[Ce,oe]);const Xt=n.useCallback(()=>{const i=je.current;x(null),V("launching"),i.launch({source:"openscout",context:Us()}),window.setTimeout(()=>{oe(!0)},2400)},[oe]),xt=n.useCallback(i=>{const c=xe(i);se(c);for(const p of To(i))p.type==="ask-agent"?(D(`Sending to ${p.targetLabel}`),$("/api/scoutbot/actions/ask",{method:"POST",body:JSON.stringify({targetLabel:p.targetLabel,targetAgentId:p.targetAgentId,body:p.body,channel:p.channel})}).then(w=>{D(w.flightId?`Sent to ${w.targetAgentId??w.targetLabel} · run ${w.flightId}`:`Sent to ${w.targetAgentId??w.targetLabel}`)}).catch(w=>{D(null),x(w instanceof Error?w.message:"Could not send to agent.")})):p.type!=="reminder"&&r(p);pt(c)},[r,pt]);n.useEffect(()=>{const i=()=>{D("Scoutbot replied by voice"),he()},c=()=>{D("Scoutbot chat changed"),he()};return window.addEventListener(vt,i),window.addEventListener(ge,c),()=>{window.removeEventListener(vt,i),window.removeEventListener(ge,c)}},[he]);const fe=n.useCallback(async i=>{const c=i.trim();if(!(!c||j)){I(!0),x(null),q(c),se(null),D("Sending"),T(p=>p.trim()===c?"":p);try{await Co().catch(()=>null);const p=await $("/api/scoutbot/chat",{method:"POST",body:JSON.stringify({body:c,route:a,uiContext:po("web")})});ne({session:p.session,sessions:p.sessions,config:p.config}),D("Reply received"),xt(p.reply.body)}catch(p){D(null),x(p instanceof Error?p.message:"Could not send.")}finally{I(!1)}}},[xt,a,j]),Qt=n.useCallback(async()=>{if(m)return;const i=je.current;if(me.current=null,x(null),A(""),R("starting"),h!==!0&&!await oe(!0)){R(null);return}let c=null,p=!1;const w=async()=>{!c||p||(p=!0,await Tt(c,{allowCurrentSession:te.current===c}),te.current===c&&(te.current=null))};try{c=await i.startLive({onState:R,onPartial:A}),te.current=c,g(!0);const H=await c.result;if(await w(),g(!1),A(""),me.current)return;R("done"),H.text&&await fe(H.text)}catch(H){const U=me.current,Q=!!U||$s(H);if(await w(),g(!1),A(""),U==="stop-failed")return;R(Q?null:"error"),Q||x(H instanceof Error?H.message:"Scout voice recording failed.")}finally{await w(),me.current=null}},[fe,oe,m,h]),Zt=n.useCallback(async()=>{const i=te.current;if(i){R("processing");try{await Lt(i.stop(),Ls,"Scout voice did not finish processing the recording.")}catch(c){me.current="stop-failed",await Tt(i,{allowCurrentSession:!0}),te.current===i&&(te.current=null,g(!1),A(""),R("error")),x(c instanceof Error?`Scout voice recording did not finish: ${c.message}`:"Scout voice recording did not finish.")}}},[]);n.useEffect(()=>{const i=()=>S(!1);return window.addEventListener("scout:scoutbot-panel-open",i),()=>window.removeEventListener("scout:scoutbot-panel-open",i)},[S]),n.useEffect(()=>So(()=>S(!y)),[y,S]),n.useEffect(()=>{const i=c=>{const p=c.detail,w=p&&typeof p=="object"&&"body"in p?p.body:null;typeof w=="string"&&w.trim()&&(S(!1),fe(w))};return window.addEventListener(St,i),()=>window.removeEventListener(St,i)},[fe,S]),n.useEffect(()=>{const i=c=>{const p=c.detail,w=p&&typeof p=="object"&&"body"in p?p.body:null;typeof w=="string"&&w.trim()&&(S(!1),T(w),ie(H=>H+1))};return window.addEventListener("scout:scoutbot-compose",i),()=>window.removeEventListener("scout:scoutbot-compose",i)},[S]);const bt=n.useMemo(()=>{const i=_?"speaking":j?"thinking":m?"listening":"idle",c=Y?.session??null,p=c&&c.messages.length>0?c.messages[c.messages.length-1]:null;return{activity:i,brief:{lastDeliveredAt:null},reminders:{dueCount:0,upcomingCount:0,due:[],next:null},voice:{available:h,setupBlocked:h===!1,replies:z},error:N,session:{title:c?.title??null,lastActivityAt:p?.createdAt??c?.updatedAt??null},conversation:{messageCount:c?.messages.length??0,loading:Y===null}}},[_,j,m,h,z,N,Y]);n.useEffect(()=>{d?.publishState(bt)},[d,bt]),n.useEffect(()=>{if(!d)return;const i={focusScoutbot:()=>S(!1),triggerBrief:()=>{S(!1),ie(c=>c+1)},triggerAskState:()=>{S(!1),ie(c=>c+1)},toggleVoiceReplies:()=>{const c=!z;W(c),c||B()},openScoutbotSettings:()=>{S(!1),de(!0)},startNewChat:()=>{S(!1),ue||We()},dismissReminder:()=>{},askReminderStatus:()=>{S(!1),ie(c=>c+1)}};d.registerActions(i)},[d,S,z,W,B,de,ue,We]),n.useEffect(()=>{h===!0&&ze(!1)},[h]);const eo=v?"Live call":m?E==="processing"?"Sending":"Stop":L==="probing"?"Checking Voice":L==="launching"?"Opening Scout":h===!1?"Open Scout":"Start Talking",to=Y!==null&&Y.session.messages.length===0&&!j;if(y&&!o)return e.jsx("div",{className:"flex shrink-0 items-center border-t border-[var(--scout-chrome-border-soft)] px-3 py-1.5",children:e.jsx(ko,{})});const oo=s?"flex h-full min-h-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":t===void 0?"flex max-h-[60vh] shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]":"flex shrink-0 flex-col overflow-hidden border-t border-[var(--scout-chrome-border-soft)]",so=t===void 0||s?void 0:{height:`${t}px`};return e.jsxs("section",{className:oo,style:so,children:[e.jsxs("div",{className:"flex shrink-0 flex-col gap-2 px-3 pt-2.5 pb-1.5",children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("div",{className:"flex min-w-0 items-center gap-2",children:e.jsx(Yo,{size:20,className:"shrink-0 text-lime-300","aria-hidden":"true"})}),e.jsxs("div",{className:"flex shrink-0 items-center gap-0.5",children:[e.jsx(Nt,{icon:z?e.jsx(jo,{size:11}):e.jsx(wo,{size:11}),title:v?z?"Voice replies on for typed chat (live call has its own audio)":"Voice replies off for typed chat (live call has its own audio)":z?"Voice replies on (click to mute)":"Voice replies off (click to enable)",onClick:()=>{const i=!z;W(i),i||B()},active:z}),!o&&e.jsx(Nt,{icon:e.jsx(Qe,{size:11}),title:"Minimize",onClick:()=>S(!0)})]})]}),X&&e.jsx(Ps,{voicePresetId:G,onVoicePresetId:ce,voiceDefaults:Vt,modelDraft:He,onModelDraft:Be,promptDraft:$e,onPromptDraft:Ve,configLoading:Dt,configSaving:Ht,configError:Bt,configStatus:$t,onSave:()=>{Yt()},onReload:()=>{Fe()}})]}),e.jsx("div",{className:"flex min-h-0 flex-1 flex-col px-3 pb-1.5",children:Y&&e.jsx(Ns,{state:Y,chatExpanded:Ut,onToggleExpanded:()=>re(i=>!i),sessionPickerOpen:Wt,onToggleSessionPicker:()=>ke(i=>!i),onStartNewChat:()=>{We()},startingNewChat:ue,onSwitchSession:i=>{Kt(i)},switchingSessionId:Ue,sending:j,briefing:!1,pendingAsk:j?ee:null,onArchiveSession:i=>{Jt(i)},archivingSessionId:_e,onAssistantContextMenu:Gt,suggestedPrompts:qt,onSelectPrompt:i=>{T(i),re(!1)}})}),e.jsxs("div",{className:"flex shrink-0 flex-col gap-1.5 border-t border-[var(--scout-chrome-border-soft)] bg-black/10 px-3 pt-2 pb-2.5",children:[h===!1&&Le&&!v&&e.jsx(Is,{issue:O,probeState:L,onLaunch:Xt,onRetry:()=>{oe(!0)},onSettings:()=>de(!0),onDismiss:()=>ze(!1)}),(M||_)&&!v&&e.jsxs("div",{className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-black/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"min-w-0 truncate",children:_?"Speaking reply…":M}),_&&e.jsx("button",{type:"button",title:"Stop spoken reply",onClick:B,className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] p-1 text-[var(--scout-chrome-ink)] hover:bg-[var(--scout-chrome-hover)]",children:e.jsx(Mt,{size:11,className:"fill-current"})})]}),le&&!j&&e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:le}),e.jsx(Es,{agents:l,draft:k,onDraftChange:T,onSubmit:()=>{fe(k)},sending:j,recording:m,voiceLabel:eo,voiceBusy:E==="processing"||L==="probing"||L==="launching",voiceUnavailable:h===!1,voiceHeld:v,onMicClick:()=>{if(!v){if(h===!1){ze(!0);return}m?Zt():Qt()}},prominent:to&&!v,autoFocus:o,focusSignal:Ft}),N&&e.jsx("div",{className:"rounded border border-red-400/30 bg-red-400/10 px-2.5 py-2 font-mono text-xs leading-relaxed text-red-200",children:N})]})]})}function Ws({onResizeStart:t}){const o=n.useCallback(s=>{s.preventDefault(),t(s)},[t]);return e.jsxs("div",{role:"separator","aria-orientation":"horizontal",onMouseDown:o,className:"group relative flex h-[7px] shrink-0 cursor-ns-resize items-center justify-center",children:[e.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)]"}),e.jsxs("div",{className:"flex flex-row gap-[3px] opacity-0 transition-opacity group-hover:opacity-100",children:[e.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"}),e.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"}),e.jsx("div",{className:"h-[3px] w-[3px] rounded-full bg-[var(--scout-chrome-ink-faint)]"})]})]})}const At=260,Gs=.7,qs=260;function Ye(t,o){const s=Math.max(At,Math.floor(o*Gs));return Math.min(s,Math.max(At,Math.round(t)))}function Ys(){const t=nt("surface.scoutbot",!0),{route:o,navigate:s,agents:r,selectedBrokerAttempt:l,clearBrokerAttempt:a}=F(),[u]=Xe("openscout.scoutbot.collapsed",!0),[d,f]=Pt("openscout.scoutbot.height",qs),b=n.useRef(null),[v,y]=n.useState(0);n.useLayoutEffect(()=>{const N=b.current;if(!N)return;y(N.getBoundingClientRect().height);const x=new ResizeObserver(h=>{const C=h[0];C&&y(C.contentRect.height)});return x.observe(N),()=>x.disconnect()},[]),n.useEffect(()=>{if(v<=0)return;const N=Ye(d,v);N!==d&&f(N)},[v,d,f]);const S=n.useCallback(N=>{const x=N.clientY,h=d,C=b.current?.getBoundingClientRect().height??v,O=L=>{const V=L.clientY-x;f(Ye(h-V,C))},P=()=>{document.removeEventListener("mousemove",O),document.removeEventListener("mouseup",P),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",O),document.addEventListener("mouseup",P)},[v,d,f]);let k=null;const T=t&&o.view==="ops"&&o.mode==="lanes";if(T)k=e.jsx(Ot,{forceExpanded:!0,fill:!0});else switch(o.view){case"ops":k=e.jsx(Jo,{mode:o.mode??"mission",agents:r,navigate:s,returnRoute:o});break;case"broker":k=e.jsx(Ko,{selectedAttempt:l,navigate:s,onClose:a});break;default:k=xo(o,s)}const j=v>0?Ye(d,v):d,I=t&&o.view!=="broker";return e.jsxs("div",{ref:b,className:"flex h-full flex-col overflow-hidden",children:[e.jsx("div",{className:"min-h-0 flex-1 overflow-hidden",children:k}),I&&!T&&!u&&e.jsx(Ws,{onResizeStart:S}),I&&!T&&e.jsx(Ot,{height:u?void 0:j})]})}const zt="openscout.globalJumpDock.mode.v1";function Ks(){if(typeof window>"u")return null;try{const t=window.localStorage.getItem(zt);return t==="jump"||t==="minimap"?t:null}catch{return null}}function Js(t){try{window.localStorage.setItem(zt,t)}catch{}}function Xs(){const{route:t,navigate:o}=F(),s=t.view==="mesh",[r,l]=n.useState(()=>{const u=Ks();return u==="minimap"&&s?"minimap":u==="jump"?"jump":s?"minimap":"jump"});n.useEffect(()=>{r==="minimap"&&!s&&l("jump")},[r,s]);const a=u=>{l(u),Js(u)};return e.jsxs("div",{className:"gjd",children:[e.jsxs("div",{className:"gjd-head",children:[e.jsx("span",{className:"gjd-ear","aria-hidden":!0}),e.jsxs("div",{className:"gjd-mode",role:"group","aria-label":"Bottom dock mode",children:[e.jsx("button",{type:"button",className:`gjd-mode-btn${r==="jump"?" gjd-mode-btn--active":""}`,onClick:()=>a("jump"),"aria-pressed":r==="jump",children:"jump"}),s&&e.jsx("button",{type:"button",className:`gjd-mode-btn${r==="minimap"?" gjd-mode-btn--active":""}`,onClick:()=>a("minimap"),"aria-pressed":r==="minimap",children:"minimap"})]}),e.jsx("span",{className:"gjd-ear","aria-hidden":!0})]}),e.jsx("div",{className:"gjd-body",children:r==="minimap"&&s?e.jsx(Xo,{}):e.jsx(Zs,{navigate:o})})]})}const Qs=qo();function Zs({navigate:t}){const o=nt("ops.control",!0),s=Qs.filter(r=>!r.opsGated||o);return e.jsx("div",{className:"gjd-jumps",children:s.map(r=>{const l=r.icon;return e.jsxs("button",{type:"button",className:"gjd-jump",onClick:()=>t(r.route),children:[e.jsx("span",{className:"gjd-jump-icon",children:n.createElement(l,{size:13,strokeWidth:1.6})}),e.jsx("span",{className:"gjd-jump-label",children:r.label})]},r.id)})})}function en(){const{route:t,navigate:o}=F();return e.jsxs("div",{className:"scout-left-shell",children:[e.jsx("div",{className:"scout-left-shell-rail",children:bo(t,o)}),e.jsx(Xs,{})]})}function tn(){const t=no(),o=ro(),s=Qo({url:t,healthUrl:o,autoConnect:!0,sessionKey:"scout-terminal"});return e.jsx("div",{style:{height:"100%",background:"#0d0d0d",overflow:"hidden"},children:e.jsx(Zo,{relay:s,fontSize:13,configItems:[{label:"ws",value:t},{label:"health",value:o}]})})}const on="Scout's local server isn't responding. It may still be starting up — wait a moment and try again.",sn="Scout couldn't start its background service. Restart Scout from the menu bar icon, then try again.",nn="The broker isn't running yet. Start Scout's services from the menu bar icon, then run setup again.",rn="Starting the broker took too long. Try again — if it keeps happening, restart Scout.",an="Scout couldn't write its settings in your home folder (~/.openscout). Check the folder's permissions and try again.",cn="That folder doesn't exist on this Mac. Double-check the path — for example /Users/you/dev.";function ye(t,o){const s=o instanceof Error?o.message:String(o);return ho(yt(o))?on:/Unable to locate scoutd|Unable to locate Bun/i.test(s)?sn:/openscout-runtime broker/i.test(s)?nn:/timed out/i.test(s)?rn:/EACCES|EPERM|EROFS/i.test(s)?an:t==="project"&&/ENOENT|does not exist|doesn'?t exist/i.test(s)?/does not exist|doesn'?t exist/i.test(s)&&/[/~]/.test(s)?s:cn:yt(o)}const Oe=4;function ln(){const{onboarding:t}=F();return t?t.hasLocalConfig?t.hasOperatorName?t.hasProjectConfig?t.needed!==!1&&(!t.brokerReachable||!t.hasReadyRuntime)?e.jsx(Te,{children:e.jsx(pn,{step:4})}):null:e.jsx(Te,{children:e.jsx(mn,{step:3})}):e.jsx(Te,{children:e.jsx(un,{step:2})}):e.jsx(Te,{children:e.jsx(dn,{step:1})}):null}function Te({children:t}){return e.jsx("div",{style:{width:"100%",height:"100%",display:"flex",alignItems:"center",justifyContent:"center",overflow:"auto",background:"var(--bg)",color:"var(--ink)"},children:e.jsx("div",{style:{width:"100%",maxWidth:720,padding:"80px 72px",display:"flex",flexDirection:"column",gap:40},children:t})})}function Ae({eyebrow:t,title:o,description:s}){return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:16},children:[e.jsx("div",{style:hn,children:t}),e.jsx("div",{style:fn,children:o}),e.jsx("div",{style:gn,children:s})]})}function Ie({primary:t,onPrimary:o,primaryDisabled:s,busy:r}){const{skipOnboarding:l}=F();return e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:10,paddingTop:8},children:[e.jsxs("div",{style:{display:"flex",alignItems:"center",gap:24},children:[e.jsx("button",{type:"button",onClick:o,disabled:s||r,style:{...xn,opacity:s||r?.5:1,cursor:s||r?"default":"pointer"},children:r?"Working…":t}),e.jsx("button",{type:"button",onClick:l,style:bn,onMouseEnter:a=>{a.currentTarget.style.color="rgba(255,255,255,0.8)"},onMouseLeave:a=>{a.currentTarget.style.color="rgba(255,255,255,0.45)"},children:"Set up later"})]}),e.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.35)",lineHeight:1.5},children:"Scout stays limited until setup finishes."})]})}function Pe({message:t}){return t?e.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:t}):null}function dn({step:t}){const{onboarding:o,refreshOnboarding:s}=F(),[r,l]=n.useState(!1),[a,u]=n.useState(null),d=async()=>{l(!0),u(null);try{await $("/api/onboarding/init",{method:"POST",body:"{}"}),await s()}catch(f){u(ye("init",f))}finally{l(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{eyebrow:`First-run setup · Step ${t} of ${Oe}`,title:"Welcome to Scout",description:e.jsxs(e.Fragment,{children:["Scout needs a local config before it can talk to the broker, the web app, and paired devices. This writes"," ",e.jsx("code",{style:st,children:"~/.openscout/config.json"})," with sensible defaults — you can edit it any time."]})}),e.jsxs("ul",{style:_t,children:[e.jsx(be,{label:"Local config (~/.openscout/config.json)",done:!1,hint:"missing"}),e.jsx(be,{label:".openscout/project.json in a repo",done:!!o?.hasProjectConfig,hint:o?.hasProjectConfig?o.projectRoot??void 0:"checked after setup"})]}),e.jsx(Pe,{message:a}),e.jsx(Ie,{primary:"Initialize Scout",onPrimary:()=>{d()},busy:r})]})}function un({step:t}){const{onboarding:o,refreshOnboarding:s}=F(),r=o?.operatorNameSuggestion??"",[l,a]=n.useState(r),[u,d]=n.useState(!1),[f,b]=n.useState(null);n.useEffect(()=>{!l&&r&&a(r)},[r,l]);const v=async()=>{const y=l.trim();if(!y){b("Name is required.");return}d(!0),b(null);try{await $("/api/user",{method:"POST",body:JSON.stringify({name:y})}),await s()}catch(S){b(ye("identity",S))}finally{d(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{eyebrow:`Identity · Step ${t} of ${Oe}`,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."}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[e.jsx("label",{style:Re,children:"Your name"}),e.jsx("input",{autoFocus:!0,value:l,onChange:y=>{a(y.target.value),b(null)},onKeyDown:y=>{y.key==="Enter"&&v()},placeholder:r||"Operator",style:ot}),r?e.jsx("div",{style:{fontSize:11,color:"rgba(255,255,255,0.4)",fontFamily:"var(--hud-font-mono)"},children:"Prefilled from your machine."}):null]}),e.jsx(Pe,{message:f}),e.jsx(Ie,{primary:"Continue",onPrimary:()=>{v()},busy:u,primaryDisabled:!l.trim()})]})}function mn({step:t}){const{onboarding:o,refreshOnboarding:s}=F(),r=o?.currentDirectory??"",l=r||"~/dev",[a,u]=n.useState([l]),[d,f]=n.useState(r),[b,v]=n.useState("claude"),[y,S]=n.useState(!1),[k,T]=n.useState(null),j=(h,C)=>{u(O=>O.map((P,L)=>L===h?C:P))},I=()=>u(h=>[...h,""]),N=h=>u(C=>C.filter((O,P)=>P!==h)),x=async()=>{const h=a.map(O=>O.trim()).filter(Boolean),C=d.trim();if(!C){T("Pick where Scout should anchor this context.");return}S(!0),T(null);try{await $("/api/onboarding/project",{method:"POST",body:JSON.stringify({contextRoot:C,sourceRoots:h,defaultHarness:b})}),await s()}catch(O){T(ye("project",O))}finally{S(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{eyebrow:`Project · Step ${t} of ${Oe}`,title:"Where do your repos live?",description:e.jsxs(e.Fragment,{children:["Scout scans these folders for projects and anchors this context at"," ",e.jsx("code",{style:st,children:"<context>/.openscout/project.json"}),"."]})}),e.jsxs("div",{style:Ke,children:[e.jsx("label",{style:Re,children:"Scan folders"}),e.jsxs("div",{style:{display:"flex",flexDirection:"column",gap:8},children:[a.map((h,C)=>e.jsxs("div",{style:{display:"flex",gap:8},children:[e.jsx("input",{value:h,onChange:O=>j(C,O.target.value),placeholder:C===0?l:"Add another folder",style:{...ot,flex:1}}),e.jsx("button",{type:"button",onClick:()=>N(C),disabled:a.length<=1,style:{...It,opacity:a.length<=1?.4:1,cursor:a.length<=1?"default":"pointer"},"aria-label":`Remove folder ${C+1}`,children:"−"})]},C)),e.jsx("button",{type:"button",onClick:I,style:{...It,alignSelf:"flex-start"},children:"+ Add folder"})]})]}),e.jsxs("div",{style:Ke,children:[e.jsx("label",{style:Re,children:"Context root"}),e.jsx("input",{value:d,onChange:h=>f(h.target.value),placeholder:l,style:ot}),e.jsxs("div",{style:Je,children:["Scout writes ",e.jsx("code",{style:st,children:".openscout/project.json"})," ","inside this folder."]}),e.jsx("div",{style:Je,children:"Tip: ~ expands to your home folder."})]}),e.jsxs("div",{style:Ke,children:[e.jsx("label",{style:Re,children:"Default harness"}),e.jsx("div",{style:{display:"grid",gridTemplateColumns:"1fr 1fr",gap:12},children:["claude","codex"].map(h=>{const C=b===h;return e.jsxs("button",{type:"button",onClick:()=>v(h),style:{...vn,borderColor:C?"var(--accent, #2dd4bf)":"rgba(255,255,255,0.12)",backgroundColor:C?"rgba(45,212,191,0.08)":"rgba(255,255,255,0.02)"},children:[e.jsx("div",{style:{fontSize:15,fontWeight:600,textTransform:"capitalize"},children:h}),e.jsx("div",{style:{fontSize:12,color:"rgba(255,255,255,0.55)",marginTop:6,lineHeight:1.5},children:h==="claude"?"Anthropic Claude Code — local CLI agent.":"OpenAI Codex — cloud agentic sandbox."}),e.jsx("div",{style:{fontSize:11,fontFamily:"var(--hud-font-mono)",color:"rgba(255,255,255,0.4)",marginTop:8,lineHeight:1.5},children:h==="claude"?"Requires the Claude Code CLI, installed and signed in.":"Requires the Codex CLI, installed and signed in."})]},h)})}),e.jsx("div",{style:Je,children:"Not installed yet? Pick one anyway — the final step checks and tells you what's missing."})]}),e.jsx(Pe,{message:k}),e.jsx(Ie,{primary:"Create project",onPrimary:()=>{x()},busy:y,primaryDisabled:!d.trim()})]})}function pn({step:t}){const{onboarding:o,refreshOnboarding:s}=F(),[r,l]=n.useState(!1),[a,u]=n.useState(null),d=async()=>{l(!0),u(null);try{const f=await $("/api/onboarding/setup",{method:"POST",body:"{}"});await s(),f.brokerWarning?u(ye("setup",f.brokerWarning)):f.hasReadyRuntime===!1&&u("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(f){u(ye("setup",f))}finally{l(!1)}};return e.jsxs(e.Fragment,{children:[e.jsx(Ae,{eyebrow:`Setup · Step ${t} of ${Oe}`,title:"Finish setup",description:"Scout will install its harness skills, start the local broker, refresh discovery, and check for a ready agent runtime."}),e.jsxs("ul",{style:_t,children:[e.jsx(be,{label:".openscout/project.json",done:!!o?.hasProjectConfig,hint:o?.projectConfigPath??o?.projectRoot??void 0}),e.jsx(be,{label:"Broker reachable",done:!!o?.brokerReachable,hint:o?.brokerReachable?"connected":"starts when you run setup"}),e.jsx(be,{label:"Agent runtime",done:!!o?.hasReadyRuntime,hint:o?.hasReadyRuntime?"ready":"install or sign in to a supported runtime"})]}),e.jsx(Pe,{message:a}),e.jsx(Ie,{primary:"Run setup",onPrimary:()=>{d()},busy:r})]})}function be({label:t,done:o,hint:s}){return e.jsxs("li",{style:{display:"flex",alignItems:"flex-start",gap:16},children:[e.jsx("span",{style:{marginTop:2,width:20,height:20,borderRadius:999,display:"flex",alignItems:"center",justifyContent:"center",fontSize:11,fontWeight:700,flexShrink:0,backgroundColor:o?"rgba(34,197,94,0.15)":"rgba(255,255,255,0.07)",color:o?"#4ade80":"rgba(255,255,255,0.5)"},children:o?"✓":"•"}),e.jsxs("div",{style:{minWidth:0},children:[e.jsx("div",{style:{fontSize:13,lineHeight:1.5,color:o?"rgba(255,255,255,0.75)":"rgba(255,255,255,0.9)"},children:t}),s?e.jsx("div",{style:{fontSize:11,fontFamily:"var(--hud-font-mono)",color:"rgba(255,255,255,0.35)",marginTop:4,wordBreak:"break-all"},children:s}):null]})]})}const hn={fontSize:11,fontFamily:"var(--hud-font-mono)",textTransform:"uppercase",letterSpacing:"0.18em",color:"rgba(255,255,255,0.4)"},fn={fontSize:36,fontWeight:600,letterSpacing:"-0.01em",lineHeight:1.15},gn={fontSize:15,lineHeight:1.75,color:"rgba(255,255,255,0.6)",maxWidth:580},Ke={display:"flex",flexDirection:"column",gap:10},Re={fontSize:11,fontFamily:"var(--hud-font-mono)",textTransform:"uppercase",letterSpacing:"0.15em",color:"rgba(255,255,255,0.5)"},ot={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"},Je={fontSize:12,color:"rgba(255,255,255,0.45)",lineHeight:1.6},st={fontFamily:"var(--hud-font-mono)",fontSize:12,padding:"2px 6px",borderRadius:4,backgroundColor:"rgba(255,255,255,0.06)"},xn={fontSize:13,fontWeight:600,padding:"12px 24px",borderRadius:10,backgroundColor:"var(--accent, #2dd4bf)",color:"#0b0d12",border:"none",transition:"opacity 0.15s ease"},It={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"},bn={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"},_t={display:"flex",flexDirection:"column",gap:20,margin:0,padding:0,listStyle:"none"},vn={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"},yn=[{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 Repos",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 Sn(t={}){const{initialTheme:o="dark"}=t,s=io();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:r})=>n.createElement(is,{defaultTheme:o,defaultTemplate:s,storageKey:ao,children:n.createElement(fo,{initialTheme:o,children:r})}),leftPanel:{title:"Navigation"},rightPanel:{title:"Context"},slots:{Content:ls,LeftPanel:en,Inspector:Ys,Takeover:ln,Terminal:tn},intents:yn,hooks:{useCommands:rs,useStatus:ns,useNavCenter:ss,useNavActions:os,useLayoutMode:ts,useTakeover:es}}}Sn();export{Sn as createScoutApp};
@@ -1 +0,0 @@
1
- import{e as r}from"./index-CzVeWScw.js";var o=r();export{o as r};
@@ -1 +0,0 @@
1
- import{u as q,a as ie,s as Pe,S as Oe}from"./scope-views-BhkbIFPY.js";import{b as ll,i as cl,c as dl,d as pl}from"./scope-views-BhkbIFPY.js";import{ab as de,ac as Me,$ as $e,a0 as Fe,a1 as Be,a2 as We,a3 as pe,a4 as ze,a5 as Ge,a6 as He,ad as Ke,a7 as Ue,ae as Ve,P as qe,T as Ye,R as Ze,k as Je,u as Se}from"./router-B-K15T7B.js";import{af as ml,ag as fl,ah as hl,ai as gl,aj as _l,ak as Sl,al as bl,am as vl,an as xl,ao as wl,U as Ll,ap as Nl,aq as yl,ar as jl,Q as kl}from"./router-B-K15T7B.js";import{r as p,j as r,D as le,m as Qe}from"./index-CzVeWScw.js";import{k as El,w as Al,p as Il,E as Tl,t as Rl,G as Dl,A as Pl,q as Ol,z as Ml,l as $l,H as Fl,I as Bl}from"./index-CzVeWScw.js";import{u as be}from"./Provider-DSsb2gLR.js";import{S as Xe}from"./ScoutSurface-BEnDlynn.js";import{resolveContentPane as et}from"./resolve-panes-cp6eNewO.js";import{i as tt}from"./model-IGCUEsMy.js";import{t as st}from"./bash-format-BRV5C6Gv.js";import{t as ve}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 dt,A as K,D as pt,h as ut}from"./agent-lanes-model-CPgQRenB.js";import{S as mt}from"./SlidePanel-B3gc5HnM.js";import{H as ft}from"./HarnessMark-BE-YSyci.js";import{o as ht,f as gt,b as _t}from"./lane-observe-BA3g9aVd.js";import{S as we}from"./SessionObserve-BmmJ8dEh.js";import{LaneTraceEventFocus as St}from"./LaneTraceEventFocus-X4-DDFEo.js";import{b as bt}from"./agent-lane-detail-BNNm6FNu.js";import{r as vt,u as xt}from"./AgentLanesView-DqRK5-d2.js";import{u as wt}from"./observe-BNFzh-7B.js";import{f as Lt}from"./terminal-sessions-C3qU8tnY.js";import{o as Nt,i as yt}from"./surface-activity-B1rgWB1i.js";import{AgentFloorView as jt}from"./AgentFloorView-DMivAYHU.js";import{i as kt,c as Ct,n as ue}from"./keyboard-nav-BJnFoFDP.js";import{a as Et}from"./api-h5zurxmi.js";import{RawSessionsTable as At}from"./RawSessionsTable-LWEvXJzj.js";import{SessionRefScreen as It}from"./SessionRefScreen-Dk-O4OVt.js";import{TailView as Tt}from"./TailView-DL3YZkzE.js";import{c as Rt,b as Dt,u as Pt,r as Ot}from"./hooks-Dst1TH7n.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./content-CDpDtVI-.js";import"./ActivityScreen-BXm6nJ6L.js";import"./clipboard-e3fSpeo7.js";import"./mentions-fbQJ2mBI.js";import"./AgentDetailCard-sZuHl1de.js";import"./AgentLiveActions-DI4ooSHW.js";import"./terminal-takeover-KvmTwABa.js";import"./openContent-C6XO6kr5.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./EmptyState-DypEjx0V.js";/* empty css */import"./left-BhzPp-_E.js";/* empty css */import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./content-BHUcUCH5.js";import"./AgentInfoScreen-CPkLg1pK.js";/* empty css */import"./BackToPicker-DZg_4nHL.js";import"./ObservedTopologyPanel-C1AQM0Mq.js";import"./AgentsScreen-zR6b2bUL.js";/* empty css */import"./AgentsSubnav-q0xcZi6C.js";import"./SecondaryNav-Hv5AJ3Fv.js";import"./secondaryNavConfig-Bg4Tc0gT.js";import"./message-square-CIXda-Y7.js";import"./scroll-text-BV-BB7v-.js";import"./library-DbCVJG_O.js";/* empty css */import"./AgentSessions-BxWIPkWh.js";import"./agents-project-model-UYiamtrU.js";import"./profile-s3KRbip1.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-9FqXmjBw.js";import"./terminal-relay-BkXjjSkq.js";import"./ConversationScreen-C-PrCRz1.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BGgbITvr.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./AgentDefinitionsWorkspace-4Z0aN8AR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CXCq-oKj.js";/* empty css */import"./agent-essentials-SrzMYEXV.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";/* empty css *//* empty css */import"./right-B-MKhiJ6.js";import"./openAgent-Dbv5wfuL.js";import"./TmuxPeek-DNC4uWky.js";import"./refresh-cw-4oeFn1Jn.js";import"./ProjectsRail-B1zrQLZe.js";import"./AddProjectForm-CtEiLQnm.js";import"./projects-inbox-Diddml6e.js";import"./ProjectsScreen-PW_NH5VK.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./cache-Dr0why2k.js";import"./arrow-up-right-CcrWONpD.js";/* empty css */import"./ProjectAgentProfile-zE1cApxw.js";import"./ProjectAgentProfileBar-MODhG0P6.js";import"./ProjectsThreadAside-DaCEUWN1.js";import"./content-CvtLIjXS.js";import"./BriefingDetailScreen-BZU4qMwE.js";/* empty css */import"./BriefingsScreen-Bfc3tqPp.js";import"./content-CuOLxp1x.js";import"./BrokerScreen-Chh8sGen.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-CaFe6kdh.js";import"./DispatchAftermath-OXYlMbT1.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-B7O4if20.js";import"./arrow-down-D3-IbArq.js";import"./sparkles-BjCA3Evu.js";import"./paperclip-DfpJkR4s.js";import"./plus-CmFQp9Uj.js";import"./send-horizontal-CqogPmbY.js";import"./check-COxArFXG.js";import"./copy-4LfKIdQJ.js";import"./radio-PauJIekM.js";import"./bot-BRINYlC6.js";import"./left-CN1MABD0.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./RailRow-DerXOXQS.js";/* empty css */import"./content-CO-9CeFd.js";import"./MessagesScreen-BhOJ7_tj.js";import"./right-Dc7uqv7l.js";import"./CodeScreen-D0hpZNLP.js";import"./CodeDiffPane-C1ebFt-Y.js";import"./usePierreRuntime-Bo4lD7Ui.js";/* empty css */import"./CodeProjectPicker-tsCly-f3.js";/* empty css */import"./content-C39ELNgC.js";import"./FollowScreen-DRgYuAvp.js";import"./content-BUhvLPkv.js";import"./HarnessesScreen-L-emPcXd.js";import"./useContentSecondaryNav-BX7Sq7vy.js";import"./OpsSubnav-D5Bpowtk.js";/* empty css */import"./left-HwwbMVtl.js";import"./operator-attention-BwSPeheT.js";import"./content-qsDjA4Au.js";import"./HomeHero-CAEg8Yg5.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";import"./right-BqmKXLtf.js";import"./left-YfH0daht.js";import"./mesh-view-store-Btlyc7rW.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./content-DQXbo2RO.js";import"./MeshScreen-D5zzTn0o.js";import"./MeshCanvas-rtCBD7s6.js";import"./chunk-T65CQEWV-CiZ_ICHW.js";import"./useAgentHoverCard-FtCmY-b9.js";import"./local-agents-DBaUbP-_.js";/* empty css */import"./right-B91Zl8lQ.js";import"./left-DDgbsio7.js";import"./mesh-ops-Cnw3vwAu.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./content-C4RYKHut.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./right-CkGOs-sq.js";import"./left-np5USKqG.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-mission-B54-c3hq.js";import"./mission-control-store-CcoNeQHG.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./page-status-DDvNdA8s.js";import"./left-plan-BNBuDoPQ.js";import"./content-BomQ5YWo.js";import"./OpsScreen-BeC0lieE.js";/* empty css */import"./MissionControlView-D2JO9u-y.js";/* empty css */import"./MissionContextRail-0O-Zu1Tn.js";import"./agent-lane-preview-C33Dwpn7.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-LnjmqBiW.js";import"./MissionLogPane-lZ9vUftY.js";import"./OpsAgentsView-BnMX0vEY.js";/* empty css */import"./DataTable-BoofV-_4.js";/* empty css */import"./sliders-horizontal-CUiOH26y.js";import"./PlanView-DDXdC19M.js";/* empty css */import"./AtopView-VZkk40v0.js";/* empty css *//* empty css */import"./AgentLanesPreflight-DNGvZvjd.js";import"./AgentLaneChrome-O9Yf0uR-.js";import"./AgentLaneCard-nB68f2CI.js";/* empty css */import"./AgentLaneSummaryResize-Ct3b0TQR.js";import"./agent-lane-card-model-DSWdGu-v.js";import"./AgentLaneDetailSheet-BfhpaEQ3.js";import"./LaneTraceDetailSheet-Dl7foF88.js";import"./content-LCELs6zg.js";import"./RepoDiffPageScreen-CGEMAv2Z.js";import"./RepoDiffViewerLazy-DIxkiMto.js";import"./ReposScreen-BN1lVjOj.js";/* empty css */import"./selection-bridge-B1dmkX3P.js";import"./right-BcFnuse9.js";import"./content-7ZeCPAEt.js";import"./KnowledgeSearchScreen-DvdOFh-b.js";/* empty css */import"./clock-CyfvRmj6.js";import"./KnowledgeSearchInspector-C2EZsQ5i.js";import"./content-CzwTUb9n.js";import"./SessionsScreen-BJEjuo2X.js";import"./FlightObserveScreen-Yq5NtQQJ.js";/* empty css */import"./right-BzeB-Dpt.js";import"./content-DRTQ9QQb.js";import"./SettingsScreen-DJ-BhBwR.js";import"./StatusPill-B33sQinT.js";import"./AgentConfigurationScreen-CfBXxrsD.js";import"./server-Brw5Y1Gh.js";import"./SettingsDrawer-DL-SVLdd.js";import"./VoicePermissionsPanel-WLN0V-Xv.js";import"./left-Dpf2R9uD.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./session-table-1xdSxSXq.js";import"./Terminal-Dp1FSGIS.js";/* empty css */import"./HerdrSession-DKFCJMst.js";import"./chunk-JTPDIGGW-s6WbxdjC.js";import"./right-09W2JJFg.js";import"./content-CCiZfG4H.js";import"./WorkDetailScreen-D2Yl0mYZ.js";import"./WorkFilesViewer-BbVfcUN-.js";import"./right-BdtMzn35.js";import"./RealtimeVoiceScreen-XtxbCjOs.js";import"./ScoutbotRealtimeVoiceCall-CDyFJX8m.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,d=ot(n),i=$t(s.cwd||s.project||s.projectRoot||"—"),a=d?`${c} · live`:`${c} · ${ve(l??t)}`;return{source:Mt(c),sessionRef:Ft(s.harnessSessionId),path:i,statusLine:a,live:d}}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,d=p.useMemo(()=>bt(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?` · ${ve(c)}`:""]})]}),r.jsx(ft,{harness:o.harness??d.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:d.events})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"tools"}),r.jsx("dd",{children:d.tools})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"files"}),r.jsx("dd",{children:d.files})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"model"}),r.jsx("dd",{children:d.model??"—"})]}),r.jsxs("div",{className:"scope-lane-detail__stat",children:[r.jsx("dt",{children:"branch"}),r.jsx("dd",{children:d.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(we,{data:n??void 0,agentId:l==="scout"?o.id:void 0,sessionId:o.harnessSessionId??d.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 Le({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]=p.useState(()=>de(e));p.useEffect(()=>{o(de(e))},[e]);const n=p.useCallback(u=>{Me(u),o(u)},[]),l=p.useMemo(()=>vt({autoLanes:t,deck:s,defaultWidthTier:e}),[t,s,e]),c=p.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]),d=p.useCallback(u=>{n(Fe(s,u))},[s,n]),i=p.useCallback((u,S)=>{n(Be(s,u,S))},[s,n]),a=p.useCallback(u=>{n(We(s,u))},[s,n]),f=p.useCallback((u,S)=>{n(pe(s,{kind:"harness",title:S??`${u} sessions`,harness:u,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,n]),g=p.useCallback(()=>{n(pe(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,n]),_=p.useCallback(()=>{n(ze(s))},[s,n]),h=p.useCallback(u=>Ge(s,u),[s]),m=p.useCallback(u=>He(s,u),[s]);return{deck:s,layout:l,pinLane:c,unpinLane:d,setLaneWidth:i,setDefaultLaneWidth:a,addHarnessLane:f,addAttentionLane:g,clearPins:_,isPinned:h,pinnedZone:m}}const Ne=le("lanes-horizon");function Gt(){try{const e=sessionStorage.getItem(Ne);if(e&&K.some(t=>t.key===e))return e}catch{}return pt}function ye({scoutAgents:e,defaultWidthTier:t="md",harnessFilter:s,projectFilter:o,horizonOverride:n}){const[l,c]=p.useState(Date.now()),[d,i]=p.useState(Gt),a=n??d,[f,g]=p.useState([]),[_,h]=p.useState(()=>new Set),m=ut(a),u=nt(a),S=rt(a),{discovery:b,events:v,loadState:k}=xt({includeTranscriptReplay:!0,discoveryIntervalMs:5e3,recentLimit:m,pauseWhenHidden:!0});p.useEffect(()=>{const x=setInterval(()=>c(Date.now()),1e4);return()=>clearInterval(x)},[]),p.useEffect(()=>{let x=!1;const N=async()=>{if(yt())try{const ee=await Lt({includeDiscovered:!1});x||g(ee)}catch{x||g([])}};N();const I=setInterval(()=>{N()},1e4),X=Nt(()=>{N()});return()=>{x=!0,clearInterval(I),X()}},[]),p.useEffect(()=>{try{sessionStorage.setItem(Ne,d)}catch{}},[d]);const y=p.useRef(at()),T=p.useMemo(()=>e.filter(x=>it(x,l,a)),[e,l,a]),E=wt(T,{pauseWhenHidden:!0}),R=k.discovery==="loading"||k.recent==="loading";p.useEffect(()=>{if(_.size===0)return;const x=setTimeout(()=>h(new Set),900);return()=>clearTimeout(x)},[_]);const{lanes:L,issues:A,freshLaneIds:D}=p.useMemo(()=>{const x=lt({transcripts:b?.transcripts??[],tailEvents:v,processes:b?.processes??[],scoutAgents:e,terminalSessions:f,observeCache:E,now:l,workingOnly:!0,horizon:a}),N=ct(x.lanes,y.current),I=[...dt(b),...x.issues];return{lanes:N.lanes,issues:I,freshLaneIds:N.newLaneIds}},[b,v,e,f,E,l,a]);p.useEffect(()=>{if(A.length!==0)for(const x of A)console.warn(`[agent-lanes] ${x.message}`,x)},[A]),p.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=p.useMemo(()=>L.filter(x=>Kt(x,{harnessFilter:s,projectFilter:o})),[L,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:Ut({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 Ht(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=Ht(n);return l===t||se(n)===s||!!(c&&(c.toLowerCase()===t||se(c)===s))})}function Kt(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 Ut(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}function Vt(e){return e?`${e[0]?.toUpperCase()}${e.slice(1)}`:"local"}function qt(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,d)=>(d.lastActiveAt??0)-(c.lastActiveAt??0)),l=n.filter(c=>F(c).live).length;return{harness:s,label:Vt(s),lanes:n,liveCount:l}}).sort((s,o)=>o.lanes.length-s.lanes.length)}function Yt({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 Zt({navigate:e,agents:t}){const s=q(),{now:o,horizonLabel:n,lanes:l,tailLoading:c}=ye({scoutAgents:t,defaultWidthTier:"md"}),d=p.useMemo(()=>qt(l),[l]),[i,a]=p.useState(null),f=p.useCallback(h=>{const m=h.observe?.events?.at(-1);m&&a({lane:h,event:m})},[]),g=l.length,_=d.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]})]})}),d.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:d.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(Yt,{lane:m,nowMs:o,onOpen:f},m.id))})]},h.harness))}),i?r.jsx(Le,{target:i,onClose:()=>a(null)}):null]})}function Jt({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)},d=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:d,children:"⠿"})}const Qt=["sm","md","lg"],Xt={sm:"¼",md:"½",lg:"full"},es={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,d=l==="grid";return r.jsx("div",{className:`scope-lane-width${o?" is-compact":""}${d?" is-grid":""}`,role:"group","aria-label":n,onClick:i=>i.stopPropagation(),onKeyDown:i=>i.stopPropagation(),children:Qt.map(i=>r.jsx("button",{type:"button",className:`scope-lane-width__btn${c===i?" is-on":""}`,"aria-pressed":c===i,title:d?es[i]:`${i.toUpperCase()} column width`,onClick:()=>s(i),children:d?Xt[i]:i},i))})}function ts({lane:e,layoutMode:t,compact:s,laneWidth:o,defaultLaneWidth:n,onLaneWidthChange:l,nowMs:c,traceWindowMs:d,traceWindowLabel:i,onOpenTrace:a,onTraceEventSelect:f,onDragStart:g,onDragEnd:_,onDragKeyMove:h,focusProps:m}){const{agent:u,observe:S,source:b}=e,v=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,E=()=>{const L=S?.events?.at(-1);a(e,L)},R=L=>{(L.key==="Enter"||L.key===" ")&&(L.preventDefault(),E())};return r.jsxs("article",{ref:y,"data-lane-id":e.id,className:["scope-lane",v.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:L=>{L.target instanceof HTMLElement&&L.target.closest(".scope-lane__drag")||E()},onKeyDown:R,"aria-label":`${v.source} ${v.sessionRef}`,children:[r.jsx(Jt,{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:[v.source,r.jsxs("span",{className:"scope-lane__ref",children:[" · ",v.sessionRef]})]}),r.jsx("span",{className:"scope-lane__path",title:u.cwd??u.project??void 0,children:v.path}),s?null:r.jsx("span",{className:"scope-lane__status",children:v.statusLine}),l&&(t==="grid"||!s)?r.jsx(je,{value:o,defaultValue:n,onChange:l,compact:!0,label:`${v.sessionRef} width`,variant:t==="grid"?"grid":"tier"}):null]})]}),r.jsx("section",{className:"scope-lane__trace","aria-label":`${xe(u,b)} trace · ${i}`,children:k?r.jsx(we,{data:S??void 0,agentId:b==="scout"?u.id:void 0,sessionId:u.harnessSessionId,showRail:!1,variant:"lane",surface:"scope",nowMs:c,traceWindowMs:d,traceWindowLabel:i,onLaneEventSelect:L=>f(e,L)}):r.jsx("div",{className:"scope-lane__empty",children:"waiting for events"})})]})}function ss({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 os=[{key:"swim",label:"swim"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}];function ns({liveCount:e,horizon:t,horizonLabel:s,layoutMode:o,laneWidth:n,onHorizonChange:l,onLayoutChange:c,onLaneWidthChange:d}){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:os.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:d,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 U=.22,ce=.46,$=14,V=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 rs(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 C(e){return{before:!1,stackBand:0,targetAgentId:null,label:"",previewColumn:!1,col:null,...e}}function as(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 d=n[0].getBoundingClientRect(),i=G(n[0],e),a=Math.max(V*3,d.width*U);if(t<=d.left+a)return C({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(V*3,_.width*U);if(m){const S=m.getBoundingClientRect(),b=_.right-u*.4,v=S.left+u*.4;if(t>=b&&t<=v){const k=(_.right+S.left)/2;if(t<k)return C({mode:"reorder",before:!1,slotIndex:h,slot:g,col:z(g),label:"new column",previewColumn:!0});const y=G(m,e);return C({mode:"reorder",before:!0,slotIndex:y,slot:m,col:z(m),label:"new column",previewColumn:!0})}continue}if(t>=_.right-u)return C({mode:"reorder",before:!1,slotIndex:h,slot:g,col:z(g),label:"new column",previewColumn:!0})}return null}function is(e,t,s,o,n,l){const c=s.closest(".scope-lane-space");if(!c)return null;const d=s.getBoundingClientRect(),i=c.getBoundingClientRect(),a=G(c,o),f=rs(c),g=(t-d.top)/d.height,_=(e-d.left)/d.width,h=(e-i.left)/i.width;if(g<ce){if(h<U)return C({mode:"reorder",before:!0,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0});if(h>1-U)return C({mode:"reorder",before:!1,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0});const S=_<.5;return C({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 C({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 C({mode:"reorder",before:S,slotIndex:a,slot:c,col:s,label:"new column",previewColumn:!0})}const u=ls(c,t);return C({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 ls(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 d=o[0].getBoundingClientRect(),i=d.top+d.height*ce,a=d.top+d.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 d=0;d<o.length;d+=1){const i=o[d].getBoundingClientRect();if(t<i.top+i.height/2){n=d;break}}let l;if(he(n,o.length))l=H(s);else if(n===0){const d=o[0].getBoundingClientRect();l={top:d.top,left:s.left,width:s.width,height:Math.max(18,d.height*.5)}}else{const d=o[n-1].getBoundingClientRect(),i=o[n].getBoundingClientRect();l={top:(d.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 cs(e,t,s,o,n){const l=document.elementFromPoint(e,t);if(l&&s.contains(l)){const c=l.closest("[data-lane-id]"),d=c?.getAttribute("data-lane-id");if(c&&d&&d!==o&&!c.classList.contains("is-dragging"))return is(e,t,c,s,o,n)}return as(s,e,t)}function ds(e){return e.querySelector(".scope-lane-space")?.getBoundingClientRect().width||360}function ps(e){return[e.mode,e.slotIndex,e.before,e.stackBand,e.targetAgentId,e.label,e.previewColumn,e.col?.getAttribute("data-lane-id")].join("|")}function us(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=ds(t),_=[...t.querySelectorAll(".scope-lane-space")],h=ke(_,l.top+l.height/2),m=(h.length?h:[s.slot]).map(v=>v.getBoundingClientRect()),u=Math.max(...m.map(v=>v.height),l.height),S=Math.min(...m.map(v=>v.top)),b=Math.max(0,s.before?l.left-n.left+t.scrollLeft-g-V/2:l.right-n.left+t.scrollLeft+V/2);e.hidden=!1,e.className="scope-lane-drop is-column",e.dataset.mode="column",e.dataset.label=s.label||"",e.style.transform=`translate(${b}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 d,i,a,f;c==="column"?(d=l.left-n.left+t.scrollLeft,i=(s.before?l.top:l.bottom)-n.top+t.scrollTop-2,a=l.width,f=3):(d=(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(${d}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 ms({stackMax:e,onReorder:t,onStack:s,indicatorRef:o}){const n=p.useRef(null),l=p.useRef(null),c=p.useRef(oe),d=p.useRef(""),i=p.useCallback(h=>{n.current?.closest(".scope-lanes")?.classList.toggle("is-dragging",h)},[]),a=p.useCallback(h=>{l.current=h,d.current="",c.current=oe,i(!0)},[i]),f=p.useCallback(()=>{l.current=null,d.current="",c.current=oe,ne(n.current,o.current),i(!1)},[o,i]),g=p.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 b=cs(h.clientX,h.clientY,u,m,e);if(!b){d.current&&(d.current="",ne(u,S));return}const v=ps(b);if(v===d.current)return;const k=!!(d.current&&b.mode==="reorder");d.current=v,c.current={mode:b.mode,before:b.before,slotIndex:b.slotIndex,stackBand:b.stackBand??0,targetAgentId:b.targetAgentId??null},ne(u,S,{keepIndicator:k}),b.col&&(b.col.classList.add("is-drop-target"),b.col.dataset.dropZone=b.mode,b.label&&(b.col.dataset.dropLabel=b.label)),b.slot.dataset.dropZone=b.mode,us(S,u,b)},[o,e]),_=p.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 p.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"),fs=2,hs=6,B=4;function gs(e){const t=Number(e);return Number.isFinite(t)?Math.min(hs,Math.max(fs,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 _s(e,t,s=B){const o=new Set(t),n=new Set,l=[];for(const c of e){const d=Y(c),i=d.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":d.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?_s(t,e,s):e.map(o=>({ids:[o],orient:"row"}))}function Ce(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 Ss(e,t,s,o){const n=Ce(e,t),l=Math.min(o?s:s+1,n.length);return n.splice(l,0,{ids:[t],orient:"row"}),n}function bs(e,t,s,o,n=B){const l=Ce(e,t),d=[...Y(l[s]??{ids:[],orient:"row"}).ids],i=Math.min(Math.max(0,o),d.length);d.splice(i,0,t);const a=d.slice(0,n);return l[s]={ids:a,orient:a.length>1?"column":"row"},l}function vs(){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 xs(e){try{if(!e.length){sessionStorage.removeItem(re);return}sessionStorage.setItem(re,JSON.stringify(e))}catch{}}function ws(e,t=B){const s=p.useMemo(()=>e.map(m=>m.lane.id),[e]),o=p.useMemo(()=>new Map(e.map(m=>[m.lane.id,m])),[e]),[n,l]=p.useState(()=>vs()),[c,d]=p.useState(()=>n.length>0),i=p.useMemo(()=>c?ge(s,n,t):ge(s,[],t),[s,c,t,n]);p.useEffect(()=>{c&&xs(i)},[c,i]);const a=p.useCallback(m=>{d(!0),l(m)},[]),f=p.useCallback((m,u,S)=>{a(Ss(i,m,u,S))},[a,i]),g=p.useCallback((m,u,S,b=t)=>{a(bs(i,m,u,S,b))},[a,i,t]),_=p.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=p.useMemo(()=>_.flatMap(m=>m.columns),[_]);return{spaces:i,resolvedSpaces:_,flatColumns:h,reorderLane:f,stackLane:g,stackMax:gs(t)}}function Ls({lanes:e,onOpenTrace:t,onHorizonChange:s}){const[o,n]=p.useState(-1),l=p.useRef(new Map);p.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=p.useCallback((i,a)=>{a?l.current.set(i,a):l.current.delete(i)},[]);p.useEffect(()=>{const i=a=>{if(!document.querySelector(".scope-lanes")||kt(a.target)||Ct()||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 d=p.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:d}}const Ee=4;function Ae(e){switch(e){case"sm":return 1;case"md":return 2;case"lg":return Ee}}function Ns(e,t){if(e==="sm"||e==="md"||e==="lg")return e;if(typeof e=="number"&&Number.isFinite(e)){const{tier:s,px:o}=Ue(e);if(s)return s;let n=t,l=Number.POSITIVE_INFINITY;for(const[c,d]of Object.entries(Ve)){const i=Math.abs(d-o);i<l&&(l=i,n=c)}return n}return t}function ys(e,t){return Ae(Ns(e,t))}function js(e,t){return e.length?Math.max(...e.map(s=>ys(s,t))):Ae(t)}const ae=le("lanes-layout");function Ie(e){return e==="swim"||e==="grid"||e==="floor"}function ks(){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 Cs(){const[e,t]=p.useState(()=>_e()??ks()),s=p.useCallback(o=>{t(o);try{sessionStorage.setItem(ae,o)}catch{}typeof window>"u"||qe({searchPatch:{layout:o==="swim"?null:o},replace:!0})},[]);return p.useEffect(()=>{const o=_e();if(o&&o!==e){t(o);try{sessionStorage.setItem(ae,o)}catch{}}},[e]),{layoutMode:e,setLayoutMode:s}}function Es({message:e}){return r.jsx("li",{className:"scope-lanes__issue",children:r.jsx("span",{className:"scope-lanes__issue-msg",children:e})})}function As({navigate:e,agents:t}){const s=q(),{layoutMode:o,setLayoutMode:n}=Cs(),l=o==="floor",{now:c,horizon:d,setHorizon:i,horizonLabel:a,traceWindowMs:f,lanes:g,layout:_,deck:h,setLaneWidth:m,setDefaultLaneWidth:u,activeFilterLabel:S,issues:b,tailLoading:v}=ye({scoutAgents:t,defaultWidthTier:"md",horizonOverride:l?"4h":void 0}),{resolvedSpaces:k,flatColumns:y,reorderLane:T,stackLane:E,stackMax:R}=ws(_.flat),L=o==="grid",[A,D]=p.useState(null),O=p.useRef(null),{scrollRef:W,onDragStart:Z,onDragEnd:J,scrollDragProps:Q}=ms({stackMax:R,onReorder:T,onStack:E,indicatorRef:O}),x=p.useCallback(w=>{W.current=w},[W]),N=p.useCallback((w,M)=>{const P=M??w.observe?.events?.at(-1);P&&D({lane:w,event:P})},[]),I=p.useMemo(()=>{const w=new Map;return y.forEach((M,P)=>w.set(M.lane.id,P)),w},[y]),{getLaneFocusProps:X}=Ls({lanes:y.map(w=>w.lane),onOpenTrace:N,onHorizonChange:i}),ee=p.useMemo(()=>v?"Loading sessions…":S?`No lanes match ${S} in the last ${a}.`:`No sessions with recent work in the last ${a}.`,[S,a,v]);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":L?Ee:void 0,style:{"--scope-lane-stack-max":String(R)},...s,children:[r.jsx(ns,{liveCount:l?g.length:y.length,horizon:d,horizonLabel:a,layoutMode:o,laneWidth:h.defaultLaneWidth,onHorizonChange:i,onLayoutChange:n,onLaneWidthChange:u}),b.length>0?r.jsx("div",{className:"scope-lanes__issues",role:"status","aria-live":"polite",children:r.jsx("ul",{className:"scope-lanes__issues-list",children:b.map(w=>r.jsx(Es,{message:w.message},w.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((w,M)=>{const P=w.space.orient==="column"&&w.columns.length>1,Te=Math.max(...w.columns.map(j=>j.widthPx)),Re=L?js(w.columns.map(j=>h.laneWidths[j.lane.id]??h.defaultLaneWidth),h.defaultLaneWidth):void 0;return r.jsx(ss,{space:w.space,layoutMode:o,widthPx:Te,gridSpan:Re,children:w.columns.map(j=>{const De=I.get(j.lane.id)??0;return r.jsx(ts,{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)})},w.space.ids.join(":"))}),r.jsx("div",{ref:O,className:"scope-lane-drop","aria-hidden":"true",hidden:!0})]})}),A?r.jsx(Le,{target:A,onClose:()=>D(null)}):null]})}const Is=1e4;function Ts({route:e,navigate:t}){const s=q(),[o,n]=p.useState(null),[l,c]=p.useState(null),d=p.useCallback(async()=>{c(null);try{n(await Et("/api/tail/discover"))}catch(f){c(f instanceof Error?f.message:String(f))}},[]);p.useEffect(()=>{d();const f=setInterval(()=>{d()},Is);return()=>clearInterval(f)},[d]);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 Rs({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 Ds(e,t,s,o){if(!Ye(o))return null;const n=Ze(e);if(!n)return null;switch(n){case"lanes":return r.jsx(As,{navigate:t,agents:s});case"tail":return e.view!=="ops"||e.mode!=="tail"?null:r.jsx(Rs,{navigate:t,tailQuery:e.tailQuery});case"sessions":return e.view!=="sessions"?null:r.jsx(Ts,{route:e,navigate:t});case"agents":return e.view!=="agents-v2"||tt(e)?null:r.jsx(Zt,{navigate:t,agents:s});default:return null}}function Ps(){const{route:e,navigate:t,agents:s}=be(),{pathname:o}=Je(),n=Ds(e,t,s,o);return r.jsx(Xe,{children:n??et(e,t,s)})}function Os(){const{route:e,navigate:t}=be();return Ot({className:"scout-nav-tabs scout-nav-tabs--scope",brandTag:Qe,items:Oe,activeKey:Pe(e),navigate:t})}function Ms(){const e=ie(),t=Rt(),s=Os();return Se("nav.sidebar",!1)?null:e?s:t}function $s(){const e=ie(),t=Dt();return Se("nav.sidebar",!1)?null:e?p.createElement("div",{className:"scout-nav-actions"}):t}function Fs(){const e=ie(),t=Pt();return e?{active:!1,dismissible:!0}:t}function rl(e){e.slots.Content=Ps,e.hooks.useNavCenter=Ms,e.hooks.useNavActions=$s,e.hooks.useTakeover=Fs}export{Qe as SCOPE_BRAND_LABEL,ll as SCOPE_ENABLE_HINTS,El as SCOPE_FLAG_BUNDLE,Al as SCOPE_FLAG_BUNDLE_ALIASES,Il as SCOPE_FLAG_KEY,ml as SCOPE_FLAG_REGISTRY_KEY,fl as SCOPE_LANE_DECK_DEFAULTS,Ke as SCOPE_LANE_DECK_PROFILE,Tl as SCOPE_LEGACY_FLAG_BUNDLE,Rl as SCOPE_LEGACY_FLAG_KEY,Dl as SCOPE_LEGACY_PATH_PREFIX,Pl as SCOPE_LEGACY_PATH_SEGMENT,Ol as SCOPE_PATH_PREFIX,Ml as SCOPE_PATH_SEGMENT,$l as SCOPE_ROUTE_SEGMENTS,Fl as SCOPE_STORAGE_PREFIX,Oe as SCOPE_TOP_NAV_ITEMS,Ps as ScopeAppContent,Zt as ScopeDirView,ts as ScopeLaneColumn,Wt as ScopeLaneDetailView,Le as ScopeLaneTraceSheet,ns as ScopeLanesBar,As as ScopeLanesView,hl as buildScopePath,gl as buildScopeRoutePath,Bl as canonicalizeScopePathname,cl as isScopeOnboardingExempt,Ye as isScopePath,_l as isScopePresentation,Sl as parseScopeRouteFromUrl,bl as preserveLocationSearch,Ds as resolveScopeContentPane,vl as routeBelongsInScopeNamespace,Ze as routeToScopeSegment,xl as scopeInstrumentBundleLayer,wl as scopeLaneDeckProfileId,Ll as scopePresentationAttrs,dl as scopePresentationTitle,Nl as scopeRoutePath,le as scopeStorageKey,yl as scopeSurfaceFlagDefinition,Pe as scopeTopNavKeyForRoute,jl as scopeViewSegment,kl as segmentToRoute,ie as useScopePresentation,q as useScopePresentationAttrs,pl as useScopeShellChrome,rl as wireScopeOntoScout};
@@ -1 +0,0 @@
1
- import{r,j as t}from"./index-CzVeWScw.js";/* empty css */import"./NewChatComposer-DXDxV2Mh.js";import{u as k,e as w}from"./Provider-DSsb2gLR.js";import{A as S}from"./AgentAvatar-CszU5eaU.js";import{a as g}from"./api-h5zurxmi.js";import{b as y}from"./router-B-K15T7B.js";import{u as M}from"./sse-QcU9bikk.js";import{o as A,i as j}from"./surface-activity-B1rgWB1i.js";import{d as N,c as b,e as I,f as C,g as B,h as P}from"./model-Co0zkMIc.js";import"./runtime-picker-BCQD7d4K.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./createLucideIcon-ClCdc3F9.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./keyboard-nav-BJnFoFDP.js";import"./x-D4X_y1j_.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./file-text-DG-pufl1.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./index-BWHgHrtv.js";import"./text-DsBWV_4k.js";function W(){const{agents:n,route:d}=k(),m=y(d),l=r.useMemo(()=>w(n,m),[n,m]),[u,h]=r.useState([]),[v,s]=r.useState(null),[a,p]=r.useState(null),c=r.useCallback(async()=>{const[e,i,o]=await Promise.allSettled([g("/api/conversations"),g("/api/fleet"),g("/api/tail/discover")]);e.status==="fulfilled"&&h(e.value),i.status==="fulfilled"&&s(i.value),o.status==="fulfilled"&&p(o.value)},[]);r.useEffect(()=>{c()},[c]),r.useEffect(()=>{const e=()=>{j()&&c()},i=window.setInterval(e,1e4),o=A(e);return()=>{window.clearInterval(i),o()}},[c]),M(()=>{j()&&c()});const x=r.useMemo(()=>{const e=new Map;for(const i of v?.activeAsks??[]){const o=e.get(i.agentId)??[];o.push(i),e.set(i.agentId,o)}return e},[v?.activeAsks]);return{projects:r.useMemo(()=>{const{sessionByAgentId:e}=N(u),i=l.map(f=>b(f,e.get(f.id)??null,x.get(f.id)??[])),o=I(a,Date.now());return C(i,u,o)},[l,u,x,a])}}function Nt(){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 t.jsxs("div",{className:"ctx-panel s-agents-rail",children:[t.jsx("div",{className:"s-agents-recent s-rail-projects",children:l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No projects yet"}):l.map(s=>{const a=B(s),p=P(s),c=s.slice.slug===v&&!h;return t.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:[t.jsx(S,{name:s.slice.title,size:22,tile:!0,presence:!1}),t.jsxs("span",{className:"s-rail-proj-name","data-idle":a===0||void 0,children:[t.jsx("span",{"aria-hidden":!0,style:{opacity:.4},children:"/"}),s.slice.title]}),a>0?t.jsx("span",{className:"s-rail-proj-count","data-needs":p||void 0,title:p?"needs you":void 0,children:a}):null]},s.slice.key)})}),t.jsxs("div",{className:"s-agents-foot s-rail-foot-icons",children:[t.jsx("button",{type:"button",className:"s-rail-icon",title:"Search","aria-label":"Search",onClick:()=>d({view:"search"}),children:t.jsx(E,{})}),t.jsx("button",{type:"button",className:"s-rail-icon",title:"New chat (⌘⌥N)","aria-label":"New chat",onClick:()=>m(),children:t.jsx(L,{})}),t.jsx("button",{type:"button",className:"s-rail-icon s-rail-icon--end",title:"Settings","aria-label":"Settings",onClick:()=>d({view:"settings"}),children:t.jsx(D,{})})]})]})}function E(){return t.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[t.jsx("circle",{cx:"7",cy:"7",r:"4.25",stroke:"currentColor",strokeWidth:"1.4"}),t.jsx("path",{d:"M10.5 10.5 14 14",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function L(){return t.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:t.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function D(){return t.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[t.jsx("circle",{cx:"8",cy:"8",r:"2.25",stroke:"currentColor",strokeWidth:"1.3"}),t.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{Nt as AgentsLeft};
@@ -1,2 +0,0 @@
1
- import{r as h,j as i}from"./index-CzVeWScw.js";/* empty css */import{u as Ot,m as Gt,g as _t,i as Dt}from"./Provider-DSsb2gLR.js";import{a as Vt,b as Ft,m as Kt,r as qt}from"./keyboard-nav-BJnFoFDP.js";import{n as ct,g as wt}from"./colors-BtO5_zlx.js";import{j as Ht,a as N,k as jt,l as lt,i as Mt,n as Qt}from"./conversation-model-CHwHZNw-.js";import{l as Wt,i as $,a as M,p as yt,t as Yt,b as zt}from"./conversation-prefs-DNre-Lcx.js";import{i as Jt,l as Xt,s as Zt}from"./sessionRead-CvFz2RHv.js";import{u as te}from"./ContextMenu-N-Z6X0Z1.js";import{t as at}from"./time-Dhsh_2EG.js";import{u as ee}from"./use-conversation-list-C5sF6WBR.js";import{u as ne}from"./use-fleet-active-asks-BOMPW0nl.js";import{b as oe}from"./router-B-K15T7B.js";import{R as Nt}from"./RailRow-DerXOXQS.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function Y(t){const n=t.split("/").filter(Boolean);return n[n.length-1]??t}function $t(t){const n=t.replace(/\/+$/,"").split("/");return n[n.length-1]??t}function se(t,n){const o=Y(n).toLowerCase(),r=t.filter(p=>!!p.projectRoot),c=r.filter(p=>$t(p.projectRoot).toLowerCase()===o),d=c.length>0?c:r,s=ie(d);return s?{label:(c.length>0?d.find(p=>p.projectRoot===s):[...d].sort((p,w)=>w.lastActivityAt-p.lastActivityAt)[0])?.project??Y(n),canonicalRoot:s}:{label:Y(n),canonicalRoot:null}}function ie(t){const n=new Map;for(const d of t){const s=n.get(d.projectRoot)??{count:0,latest:0};s.count+=1,s.latest=Math.max(s.latest,d.lastActivityAt),n.set(d.projectRoot,s)}let o=null,r=-1,c=-1;for(const[d,s]of n)(s.count>r||s.count===r&&s.latest>c)&&(o=d,r=s.count,c=s.latest);return o}function Ct(t,n,o,r){const c=new Map;for(const s of t){const f=Ht(s),p=s.agentId?n.get(s.agentId):void 0,w=p?.repoKey??null,u=p?.project??null,C=(s.agentName??N(s)).trim(),m=f?`channel:${s.id}`:w?`repo:${w.toLowerCase()}`:u?`project:${u.toLowerCase()}`:C?`name:${C.toLowerCase()}`:`dm:${s.id}`,y=f?N(s):w?Y(w):u??C??N(s);let j=c.get(m);if(j||(j={key:m,label:y,isChannel:f,conversations:[],bestState:"blocked",latestUpdate:0,unreadCount:0,canonicalRoot:null},c.set(m,j)),j.conversations.push(s),j.latestUpdate=Math.max(j.latestUpdate,s.lastMessageAt??0),Jt(s.lastMessageAt,s.id,o)&&(j.unreadCount+=1),!f&&p){const g=ct(p.state);wt(g)<wt(j.bestState)&&(j.bestState=g)}}for(const s of c.values()){if(s.key.startsWith("repo:")){const f=s.conversations.map(w=>{const u=w.agentId?n.get(w.agentId):void 0;return{project:u?.project??null,projectRoot:u?.projectRoot??null,lastActivityAt:w.lastMessageAt??0}}),p=se(f,s.key.slice(5));s.label=p.label,s.canonicalRoot=p.canonicalRoot}s.conversations.sort((f,p)=>(p.lastMessageAt??0)-(f.lastMessageAt??0))}const d=Array.from(c.values());return d.sort((s,f)=>f.latestUpdate-s.latestUpdate),d}const ae=12;function cn(){const{route:t,navigate:n,agents:o,apiConnection:r}=Ot(),{sessions:c,loading:d,loadError:s,reload:f}=ee(),[p,w]=h.useState(()=>Xt()),[u,C]=h.useState(()=>Wt()),[m,y]=h.useState(""),[j,g]=h.useState(()=>new Set),[b,l]=h.useState(!1),[R,L]=h.useState(!1),[q,J]=h.useState(!1),k=ne(),H=oe(t),O=h.useMemo(()=>Gt(o,H),[o,H]),I=h.useMemo(()=>{const e=new Map,a=O?o.filter(v=>O.has(v.id)):o;for(const v of a)e.set(v.id,v);return e},[o,O]),T=t.view==="messages"||t.view==="conversation"||t.view==="agent-info"||t.view==="agents-v2"?t.conversationId:void 0;h.useEffect(()=>{L(!1)},[m]);const G=h.useMemo(()=>_t(c,O,H),[c,O,H]),X=h.useMemo(()=>m?G.filter(e=>kt(e,m)):G,[G,m]),_=h.useMemo(()=>{const e=a=>(a.agentId?k.get(a.agentId)?.updatedAt:void 0)??0;return G.filter(a=>$(a.id,u)||!jt(a)?!1:(a.agentId?k.get(a.agentId):void 0)?.status==="needs_attention").sort((a,v)=>e(v)-e(a))},[G,u,k]),D=h.useMemo(()=>m?_.filter(e=>kt(e,m)):_,[_,m]),x=h.useMemo(()=>{const e=X.filter(A=>!$(A.id,u)),a=W(X.filter(A=>$(A.id,u))),v=e.filter(A=>M(A.id,u)).sort((A,xt)=>yt(xt.id,u)-yt(A.id,u)||(xt.lastMessageAt??0)-(A.lastMessageAt??0)),K=e.filter(A=>!M(A.id,u)),it=K.filter(lt),bt=K.filter(jt),Et=K.filter(Mt);return{pinned:v,channels:W(it),agents:Ct(W(bt),I,p),observed:Ct(W(Et),I,p),archived:a}},[X,I,p,u]),dt=te(),V=h.useCallback(e=>{C(a=>Yt(e,a))},[]),F=h.useCallback(e=>{C(a=>zt(e,a))},[]),S=h.useCallback(e=>{w(Zt(e.id)),n({view:"messages",conversationId:e.id})},[n]),P=h.useCallback((e,a)=>{const v=M(a.id,u),K=$(a.id,u),it=N(a);dt(e,[{kind:"action",label:"Open",onSelect:()=>S(a)},{kind:"separator"},{kind:"action",label:v?"Unpin":"Pin to top",onSelect:()=>V(a.id)},{kind:"action",label:K?"Unarchive":"Archive",onSelect:()=>F(a.id)},{kind:"separator"},{kind:"action",label:"Copy name",onSelect:()=>{navigator.clipboard?.writeText(it).catch(()=>{})}}])},[u,S,V,F,dt]),ut=e=>{g(a=>{const v=new Set(a);return v.has(e)?v.delete(e):v.add(e),v})},Tt=r.status==="offline"||Dt(s),pt=h.useRef(null),mt=h.useRef(null),Pt=Vt(),Ut=Kt(()=>pt.current);Ft(h.useCallback(()=>mt.current,[]));const Z=x.pinned.length,tt=x.channels.length,et=x.agents.reduce((e,a)=>e+a.conversations.length,0),nt=x.observed.reduce((e,a)=>e+a.conversations.length,0),Q=x.archived.length,ht=Z+tt+et+nt+Q,Bt=b||!!m,ot=h.useMemo(()=>{const e=[];for(const a of D)e.push({rowId:`ny-${a.id}`,id:a.id});for(const a of x.pinned)e.push({rowId:`pin-${a.id}`,id:a.id});for(const a of x.agents)for(const v of a.conversations)e.push({rowId:v.id,id:v.id});for(const a of x.channels)e.push({rowId:a.id,id:a.id});for(const a of x.observed)for(const v of a.conversations)e.push({rowId:v.id,id:v.id});for(const a of x.archived)e.push({rowId:`arch-${a.id}`,id:a.id});return e},[D,x]),U=h.useMemo(()=>({activeId:T,activeRowId:T?ot.find(e=>e.id===T)?.rowId:void 0,firstRowId:ot[0]?.rowId}),[T,ot]),vt=R||m?x.observed:x.observed.slice(0,ae),ft=Math.max(0,x.observed.length-vt.length),gt=e=>!!(m||j.has(e.key)||T&&e.conversations.some(a=>a.id===T)),st=e=>i.jsx(rt,{pinned:M(e.id,u),archived:$(e.id,u),onTogglePin:()=>V(e.id),onToggleArchive:()=>F(e.id)});return i.jsxs("div",{className:"ctx-panel",children:[i.jsxs("div",{className:"ctx-panel-toolbar",children:[i.jsx("input",{ref:mt,type:"text",className:"ctx-panel-search-input",placeholder:"Filter… (/)",value:m,onChange:e=>y(e.target.value),onKeyDown:Ut}),_.length>0&&i.jsx("span",{className:"ctx-panel-rail-stat",title:"Asks waiting on your reply",children:ce(_.length)})]}),i.jsx("div",{ref:pt,className:["ctx-panel-list","ctx-panel-list--scroll",ht===0&&"ctx-panel-list--empty"].filter(Boolean).join(" "),onKeyDown:Pt,children:ht===0?i.jsx(re,{query:m,loading:d,error:s,apiOffline:Tt,onRetry:()=>{f(!0)}}):i.jsxs(i.Fragment,{children:[D.length>0&&i.jsx(B,{label:"Needs you",count:D.length,hint:"Asks waiting on your reply",children:D.map(e=>i.jsx(E,{rowId:`ny-${e.id}`,session:e,nav:U,agentById:I,asksByAgent:k,onSelect:S,onContextMenu:P},`ny-${e.id}`))}),Z>0&&i.jsx(B,{label:"Pinned",count:Z,hint:"Pinned conversations",children:x.pinned.map(e=>i.jsx(E,{rowId:`pin-${e.id}`,session:e,nav:U,agentById:I,asksByAgent:k,pinned:!0,actions:st(e),onSelect:S,onContextMenu:P},`pin-${e.id}`))}),et>0&&i.jsx(B,{label:"Agents",count:et,children:x.agents.map(e=>i.jsx(At,{group:e,isOpen:gt(e),nav:U,agentById:I,asksByAgent:k,prefs:u,onToggle:()=>ut(e.key),onSelect:S,onTogglePin:V,onToggleArchive:F,onContextMenu:P},e.key))}),tt>0&&i.jsx(B,{label:"Channels",count:tt,children:x.channels.map(e=>i.jsx(E,{rowId:e.id,session:e,nav:U,agentById:I,asksByAgent:k,actions:st(e),onSelect:S,onContextMenu:P},e.id))}),nt>0&&i.jsxs(B,{label:"Observed",count:nt,hint:"Agent conversations you’re not in",open:Bt,onToggle:()=>l(e=>!e),children:[vt.map(e=>i.jsx(At,{group:e,isOpen:gt(e),nav:U,agentById:I,asksByAgent:k,prefs:u,observed:!0,onToggle:()=>ut(e.key),onSelect:S,onTogglePin:V,onToggleArchive:F,onContextMenu:P},e.key)),ft>0?i.jsxs("button",{type:"button",className:"ctx-panel-more",onClick:()=>L(!0),children:["+ ",ft," more observed"]}):null]}),Q>0&&i.jsxs(B,{label:"Archived",count:Q,hint:"Hidden from the main rail",children:[i.jsx("button",{type:"button",className:"ctx-panel-more",onClick:()=>J(e=>!e),children:q?"▾ hide archived":`› show ${Q} archived`}),q?x.archived.map(e=>i.jsx(E,{rowId:`arch-${e.id}`,session:e,nav:U,agentById:I,asksByAgent:k,actions:st(e),onSelect:S,onContextMenu:P},`arch-${e.id}`)):null]})]})})]})}function B({label:t,count:n,hint:o,open:r,onToggle:c,children:d}){return c?i.jsxs("section",{className:"ctx-panel-rail-section","aria-label":t,children:[i.jsxs("button",{type:"button",className:"ctx-panel-section-label ctx-panel-section-toggle",title:o,"aria-expanded":!!r,onClick:c,children:[i.jsxs("span",{className:"ctx-panel-section-toggle-label",children:[i.jsx("span",{className:"ctx-panel-section-chevron","aria-hidden":!0,children:r?"▾":"▸"}),t]}),i.jsx("span",{className:"ctx-panel-count",children:n})]}),r?i.jsx("div",{className:"ctx-panel-rail-section-body",children:d}):null]}):i.jsxs("section",{className:"ctx-panel-rail-section","aria-label":t,children:[i.jsxs("div",{className:"ctx-panel-section-label",title:o,children:[i.jsx("span",{children:t}),i.jsx("span",{className:"ctx-panel-count",children:n})]}),i.jsx("div",{className:"ctx-panel-rail-section-body",children:d})]})}function rt({pinned:t,archived:n,onTogglePin:o,onToggleArchive:r}){return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:["rr-row-action",t&&"rr-row-action--on"].filter(Boolean).join(" "),title:t?"Unpin":"Pin to top","aria-label":t?"Unpin":"Pin",onClick:c=>{c.stopPropagation(),o()},children:t?"Unpin":"Pin"}),i.jsx("button",{type:"button",className:["rr-row-action",n&&"rr-row-action--on"].filter(Boolean).join(" "),title:n?"Unarchive":"Archive","aria-label":n?"Unarchive":"Archive",onClick:c=>{c.stopPropagation(),r()},children:n?"Restore":"Archive"})]})}function E({session:t,rowId:n,nav:o,agentById:r,asksByAgent:c,pinned:d,depth:s,actions:f,worktreeLabel:p,onSelect:w,onContextMenu:u}){const C=t.id===o.activeId,m=N(t),y=lt(t),j=Mt(t),g=t.agentId?r.get(t.agentId):void 0,b=t.agentId?c.get(t.agentId):void 0,l=!y&&!j&&b?.status==="needs_attention",R=Rt(t,g),L=y?`${t.participantIds.length} members`:R.toLowerCase()===m.toLowerCase()?void 0:R,q=!y&&b?ue(t,g,b):L;return i.jsx(Nt,{depth:s,name:s===1?It(t,g,b):m,sub:s===1?Rt(t,g):q,meta:b?at(b.updatedAt):t.lastMessageAt?at(t.lastMessageAt):void 0,tone:y?"channel":b?de(g,b):g?ct(g.state):"dm",avatarName:s===1?g?.name??It(t,g,b):m,avatarKind:y?"channel":"user",active:C,unread:l,pinned:d,activityLabel:b?Lt(b):void 0,activityTone:b?le(b):void 0,worktreeLabel:p??void 0,title:s===1?pe(t,g,b):void 0,actions:f,tabIndex:qt(n===o.activeRowId,o.activeRowId!==void 0,n===o.firstRowId),onClick:()=>w(t),onContextMenu:u?J=>u(J,t):void 0})}function At({group:t,isOpen:n,nav:o,agentById:r,asksByAgent:c,prefs:d,observed:s,onToggle:f,onSelect:p,onTogglePin:w,onToggleArchive:u,onContextMenu:C}){if(t.conversations.length===1){const l=t.conversations[0];return i.jsx(E,{rowId:l.id,session:l,nav:o,agentById:r,asksByAgent:c,pinned:M(l.id,d),actions:i.jsx(rt,{pinned:M(l.id,d),archived:$(l.id,d),onTogglePin:()=>w(l.id),onToggleArchive:()=>u(l.id)}),onSelect:p,onContextMenu:C})}const m=t.conversations.map(l=>l.agentId?c.get(l.agentId):void 0).filter(l=>!!l),y=m.length,j=m.filter(l=>l.status==="working").length,g=m.filter(l=>l.status==="needs_attention").length,b=t.conversations.some(l=>l.id===o.activeId);return i.jsxs("div",{children:[i.jsx(Nt,{name:t.label,meta:y>0?`${y} active · ${St(t)}`:St(t),tone:j>0?"in_turn":t.bestState,caret:n?"open":"closed",active:b&&!n,unread:!s&&g>0&&!n,activityLabel:y>0?`${y} active`:void 0,activityTone:g>0?"attention":j>0?"working":"pending",onClick:f}),n&&t.conversations.map(l=>{const R=l.agentId?r.get(l.agentId):void 0,L=t.canonicalRoot&&R?.projectRoot&&R.projectRoot!==t.canonicalRoot?$t(R.projectRoot):null;return i.jsx(E,{rowId:l.id,session:l,depth:1,nav:o,agentById:r,asksByAgent:c,pinned:M(l.id,d),worktreeLabel:L,actions:i.jsx(rt,{pinned:M(l.id,d),archived:$(l.id,d),onTogglePin:()=>w(l.id),onToggleArchive:()=>u(l.id)}),onSelect:p,onContextMenu:C},l.id)})]},t.key)}function re({query:t,loading:n,error:o,apiOffline:r,onRetry:c}){const d=t.trim().length>0,s=n?"Loading conversations":r?"Scout server offline":o?"Couldn't load conversations":d?"No matching conversations":"No conversations yet",f=n?"Checking the broker for your conversations, channels, and observed threads.":r?"Start or restart Scout services, then retry.":o||(d?"Try a shorter filter.":"Your conversations, channels, and observed agent threads will show here.");return i.jsxs("div",{className:"ctx-panel-empty-card","data-tone":r||o?"error":"neutral",children:[i.jsx("div",{className:"ctx-panel-empty-card-title",children:s}),i.jsx("div",{className:"ctx-panel-empty-card-detail",children:f}),(r||o)&&i.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:c,children:"Retry"})]})}function kt(t,n){const o=n.toLowerCase();return N(t).toLowerCase().includes(o)||t.id.toLowerCase().includes(o)||(t.preview??"").toLowerCase().includes(o)||(t.agentName??"").toLowerCase().includes(o)}function ce(t){return t===1?"1 needs a reply":`${t} need a reply`}function Lt(t){return t.status==="queued"?"Starting":t.status==="working"?"Working":t.status==="needs_attention"?"Needs you":t.statusLabel||t.status}function le(t){return t.status==="queued"?"pending":t.status==="needs_attention"?"attention":"working"}function de(t,n){return n.status==="working"?"in_turn":t?ct(t.state):"dm"}function ue(t,n,o){const r=Lt(o),c=z(o.task)??z(o.summary)??z(t.preview)??t.currentBranch??n?.branch??"";return c?`${r} · ${c}`:r}function W(t){return[...t].sort((n,o)=>(o.lastMessageAt??0)-(n.lastMessageAt??0))}function It(t,n,o){const r=o?.task??z(t.preview)??t.currentBranch??n?.branch??"",c=n?.name??t.agentName??N(t);return r?`${c} · ${r}`:c}function pe(t,n,o){const r=[];return o&&r.push(`task: ${o.task}`),t.preview&&r.push(`preview: ${t.preview}`),(t.currentBranch??n?.branch)&&r.push(`branch: ${t.currentBranch??n?.branch}`),n?.harness&&r.push(`harness: ${n.harness}`),r.length>0?r.join(`
2
- `):void 0}function Rt(t,n){if(lt(t))return Qt(t);const o=n?.handle?.trim().replace(/^@+/,"");return o||(t.agentId?t.agentId.split(".")[0]??t.agentId:N(t))}function z(t){if(!t)return null;const n=t.replace(/\s+/g," ").trim();return n?n.length>60?`${n.slice(0,57)}…`:n:null}function St(t){const n=t.latestUpdate?at(t.latestUpdate):"",o=`${t.conversations.length}`;return n?`${o} · ${n}`:o}export{cn as ChatLeft};
@@ -1 +0,0 @@
1
- import{r as N,j as e}from"./index-CzVeWScw.js";import{a as I}from"./api-h5zurxmi.js";import{b as L,c as j,s as R}from"./router-B-K15T7B.js";import{u as $,r as y,s as b,i as C}from"./mesh-ops-Cnw3vwAu.js";import{u as E,s as T}from"./mesh-view-store-Btlyc7rW.js";import{u as A}from"./Provider-DSsb2gLR.js";import{R as h}from"./RailRow-DerXOXQS.js";import{u as U}from"./use-mesh-ops-items-Co05vcTV.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function S(s){return s.hostName?.split(".")[0]??s.name??s.id.slice(0,12)}function $t(){const{route:s,navigate:u}=A(),l=L(s),{items:i,unattributedOnly:m,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 c=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:()=>c(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&&!m,onClick:()=>c(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:m,onClick:()=>m?c(null):O(),title:"Items with no venue host"})]}),!r&&e.jsx("div",{className:"ctx-panel-empty",children:"Loading mesh…"})]})}export{$t as MeshOpsLeft};
@@ -1 +0,0 @@
1
- import{r as m,j as t}from"./index-CzVeWScw.js";import{u as re,L as W}from"./chunk-YOZR3KYS-DLOc92uD.js";import{a as le,f as oe,b as ce,c as me,d as de,s as ue}from"./terminal-sessions-C3qU8tnY.js";import{a as ve,b as pe,r as G,m as he}from"./keyboard-nav-BJnFoFDP.js";import{u as be}from"./Provider-DSsb2gLR.js";import{c as fe}from"./colors-BtO5_zlx.js";import{r as P,c as xe}from"./terminal-relay-BkXjjSkq.js";import{t as ye,a as H,s as je,b as y,P as ge}from"./session-table-1xdSxSXq.js";/* empty css */import{R as ke}from"./refresh-cw-4oeFn1Jn.js";import{A as Ne}from"./activity-BxwKkT8z.js";import{C as we}from"./clock-CyfvRmj6.js";import{F as Se}from"./DocumentFocusViewer-BCG2kOmd.js";import{c as Ae}from"./createLucideIcon-ClCdc3F9.js";import{C as Ie}from"./chevron-right-CNE6QAVr.js";import{E as U}from"./eye-BFlhMzQL.js";import{T as Ee}from"./terminal-DrTkVXIj.js";import"./arrow-down-D3-IbArq.js";import"./api-h5zurxmi.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./TextDocumentSurface-DRjctOIt.js";import"./file-text-DG-pufl1.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-D4X_y1j_.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";/* empty css */const Te=[["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"}]],Ce=Ae("layers",Te),Re=[{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"}],Me=[{id:"herdr",label:"Herdr"},{id:"tmux-named",label:"Tmux"},{id:"tmux-auto",label:"Tmux · auto"},{id:"external",label:"Background"}],Le=900*1e3,$e=1440*60*1e3,_e=10080*60*1e3,V=[{key:"now",label:"Now",maxAgeMs:Le},{key:"today",label:"Today",maxAgeMs:$e},{key:"week",label:"This week",maxAgeMs:_e},{key:"older",label:"Older",maxAgeMs:null},{key:"unknown",label:"Unknown",maxAgeMs:null}],Oe=[{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 Fe(a){return Me.map(n=>({key:n.id,label:n.label,items:a.filter(l=>le(l)===n.id)})).filter(n=>n.items.length>0)}function Ke(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=>H(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 Be(a,n){const l=r=>{const i=H(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 De(a){return Oe.map(n=>({key:n.key,label:n.label,items:a.filter(l=>ye(l)===n.rank)})).filter(n=>n.items.length>0)}function ze(a,n,l=Date.now()){switch(n){case"fleet":return Fe(a);case"places":return Ke(a);case"time":return Be(a,l);case"attention":return De(a)}}const We=8e3,Ge=[{id:"recent",label:"Recent"},{id:"name",label:"A–Z"}],Pe={fleet:Ce,places:Se,time:we,attention:Ne};function Gt(){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,We);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(()=>Ue(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=ze(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=>qe(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)),z=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===z),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(W,{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:Re.map(e=>{const s=Pe[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:Ge.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===z),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:Ve(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(W,{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 Ue(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 Ve(a){const n=a.project??q(a.cwd)??q(a.projectRoot)??a.definitionId;return[a.handle?`@${a.handle}`:null,a.harness,n,a.branch].filter(Boolean).join(" · ")}function qe(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 q(a){const n=a?.trim().replace(/\/+$/u,"");return n?n.split("/").pop()||n:null}export{Gt as TerminalLeft};
@@ -1,2 +0,0 @@
1
- import{r,j as e}from"./index-CzVeWScw.js";/* empty css */import{n as k}from"./colors-BtO5_zlx.js";import{p as C,a as L}from"./api-h5zurxmi.js";import{u as F,m as $,e as D,h as H}from"./Provider-DSsb2gLR.js";import{b as O}from"./router-B-K15T7B.js";import{d as B,a as G}from"./operator-attention-BwSPeheT.js";import{u as K}from"./sse-QcU9bikk.js";import{t as f}from"./time-Dhsh_2EG.js";import{o as P}from"./openAgent-Dbv5wfuL.js";import{R as v}from"./RailRow-DerXOXQS.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";const U=new Set(["message.posted","flight.updated","collaboration.event.appended","agent.updated"]),V=4,z=4,Q=3,N="/api/fleet",X=3e4;function Xt({prepend:t}){const{agents:o,agentsLoaded:a,navigate:c,route:n}=F(),[i]=r.useState(()=>C(N,X)),[l,E]=r.useState(i),[A,T]=r.useState(i!==null),[j,b]=r.useState(()=>new Set),p=O(n),I=r.useMemo(()=>$(o,p),[o,p]),m=r.useMemo(()=>D(o,p),[o,p]),u=r.useMemo(()=>H(l,I),[l,I]),d=r.useCallback(async()=>{try{E(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,Q),[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 S=new Set(h);return S.delete(s.recordId),S});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(Y,{agents:w,totalCount:m.length,loading:!a,onSelect:s=>P(c,s,{returnTo:n}),onSeeAll:()=>c({view:"agents-v2"})}),e.jsx(J,{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 Y({agents:t,totalCount:o,loading:a,onSelect:c,onSeeAll:n}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(g,{title:"Recent agents",onSeeAll:o>0?n:void 0}),a?e.jsx(x,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No agents yet"}):t.map(i=>e.jsx(v,{name:i.name||i.id,meta:i.updatedAt?f(i.updatedAt):void 0,tone:k(i.state),title:q(i),onClick:()=>c(i)},i.id))]})}function q(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
- `)}function J({items:t,loading:o,onSelect:a,onSeeAll:c}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(g,{title:"Recent activity",meta:(t.length>0,void 0),onSeeAll:t.length>0?c:void 0}),o?e.jsx(x,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"Quiet so far"}):t.map(n=>{const i=n.actorName??n.agentName??n.agentId??"system",l=n.title??n.summary??y(n.kind);return e.jsx(v,{name:l,meta:n.ts?f(n.ts):void 0,tone:"neutral",title:`${i} · ${y(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(g,{title:"Needs attention",meta:t.length>0?`${t.length}`:void 0}),o?e.jsx(x,{rows:2}):t.map(n=>{const i=n.agentName??n.agentId??"operator";return e.jsx(v,{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 x({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 g({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 y(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{Xt as HomeLeft};
@@ -1 +0,0 @@
1
- import{j as e,r as A}from"./index-CzVeWScw.js";import{u as q,g as z,i as P,j as G,k as I,l as H,a as w,r as T}from"./mesh-view-store-Btlyc7rW.js";import{u as Q}from"./Provider-DSsb2gLR.js";import{n as b,a as V}from"./colors-BtO5_zlx.js";import{b as D}from"./mesh-buckets-CfAukILK.js";import{u as J}from"./use-fleet-active-asks-BOMPW0nl.js";import{R as h}from"./RailRow-DerXOXQS.js";import{F as U}from"./FleetSearch-Dj7-CfNi.js";import{o as W}from"./openAgent-Dbv5wfuL.js";/* empty css */import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./openContent-C6XO6kr5.js";const X=["needs_attention","in_turn","in_flight","callable","blocked"],Y={in_turn:"in turn",in_flight:"in flight",needs_attention:"needs attention",callable:"callable",blocked:"blocked"},Z={in_turn:"working",in_flight:"working",needs_attention:"working",callable:"available",blocked:"offline"};function ee({active:a,onToggle:p}){return e.jsx("div",{className:"fleet-pills",role:"group","aria-label":"State filters",children:X.map(o=>{const l=a.has(o);return e.jsx("button",{type:"button",className:`fleet-pill fleet-pill--${Z[o]}${l?" fleet-pill--on":""}`,onClick:()=>p(o),"aria-pressed":l,children:Y[o]},o)})})}const _=10;function te(a){return b(a.state)}function C(a){return a.updatedAt??a.createdAt??0}function Ye(){const{agents:a,navigate:p}=Q(),{meshSnapshot:o,selectedId:l,selectedType:S,query:d,agentStateFilters:u,hiddenMachineIds:g,treeFullMachineIds:F}=q(),L=J(),m=A.useMemo(()=>o?D(a,o):[],[a,o]),y=A.useMemo(()=>{const n=d.trim().toLowerCase();return m.filter(s=>!g.has(s.machineId)).map(s=>{const t=s.agents.filter(r=>u.has(te(r))?n?`${r.name??""} ${r.project??""} ${r.branch??""} ${r.harness??""}`.toLowerCase().includes(n):!0:!1);return{...s,agents:t}})},[m,d,u,g]),f=A.useMemo(()=>{const n=new Map([["this",[]],["peer",[]],["tailnet",[]]]);for(const s of y){const t=s.reachability==="this"?"this":s.reachability==="peer"?"peer":"tailnet";n.get(t)?.push(s)}return n},[y]);if(!o)return e.jsx("div",{className:"ctx-panel ctx-panel--empty",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading mesh…"})})});const $=n=>{const s=m.map(t=>t.machineId);H(n,s),w(n,"node"),T(n)},v=g.size,x=m.length,E=n=>{w(n.id,"agent");const s=n.authorityNodeId??n.homeNodeId;s&&T(s),W(p,n,{returnTo:{view:"mesh"}})},j=(n,s)=>s.length===0?null:e.jsxs("section",{className:"mesh-nav-group",children:[e.jsx("div",{className:"mesh-nav-group-label",children:n}),s.map(t=>{const r=F.has(t.machineId),c=[...t.agents].sort((i,k)=>C(k)-C(i)),M=r?c:c.slice(0,_),N=c.length-M.length,B=l===t.machineId&&S==="node",R=t.agents.filter(i=>V(i.state)).length,K=t.agents.length>0?`${R}/${t.agents.length}`:t.online?"—":"not ready";return e.jsxs("div",{className:"mesh-nav-machine",children:[e.jsx(h,{name:t.machineLabel,meta:K,tone:"neutral",active:B,onClick:()=>$(t.machineId),title:`Focus ${t.machineLabel} on the map`}),M.map(i=>{const k=l===i.id&&S==="agent",O=L.has(i.id);return e.jsx(h,{name:i.name,tone:b(i.state),depth:1,active:k,unread:O,onClick:()=>E(i),title:i.name},i.id)}),!r&&N>0&&e.jsx(h,{name:`see ${N} more`,depth:1,tone:"neutral",onClick:()=>I(t.machineId),title:"Show all agents on this machine"}),r&&c.length>_&&e.jsx(h,{name:"see less",depth:1,tone:"neutral",onClick:()=>I(t.machineId),title:"Show recent agents only"})]},t.machineId)})]},n);return e.jsxs("div",{className:"ctx-panel mesh-nav",children:[e.jsxs("div",{className:"mesh-nav-head",children:[e.jsx(U,{value:d,onChange:z,placeholder:"Find machines or agents…"}),e.jsx(ee,{active:u,onToggle:P}),v>0&&v<x&&e.jsxs("button",{type:"button",className:"mesh-nav-focus-chip",onClick:G,title:"Show all machines",children:[e.jsxs("span",{className:"mesh-nav-focus-chip-label",children:["focused · ",x-v,"/",x]}),e.jsx("span",{className:"mesh-nav-focus-chip-clear","aria-hidden":!0,children:"×"})]})]}),e.jsxs("div",{className:"mesh-nav-tree",children:[j("this host",f.get("this")??[]),j("peers",f.get("peer")??[]),j("tailnet",f.get("tailnet")??[])]})]})}export{Ye as MeshLeft};
@@ -1 +0,0 @@
1
- import{r,j as o}from"./index-CzVeWScw.js";/* empty css */import{a as j}from"./api-h5zurxmi.js";import{u as v}from"./sse-QcU9bikk.js";import{u as N}from"./Provider-DSsb2gLR.js";import{u as g}from"./use-fleet-active-asks-BOMPW0nl.js";import{i as w}from"./colors-BtO5_zlx.js";import{R as a}from"./RailRow-DerXOXQS.js";import"./index-BWHgHrtv.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";const $=new Set(["message.posted","conversation.upserted","agent.updated"]);function k(e){const n=x(e.cwd),m=x(e.projectRoot);return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??n??m??"local"}function b(e){return e.project??e.role??e.agentClass??"Unassigned"}function x(e){if(!e)return null;const n=e.split("/").filter(Boolean);return n[n.length-1]??null}function ht(){const{agents:e,navigate:n}=N(),[m,f]=r.useState([]),p=g(),c=r.useCallback(async()=>{const t=await j("/api/conversations").catch(()=>[]);f(t)},[]);r.useEffect(()=>{c()},[c]),v(t=>{$.has(t.kind)&&c()});const h=r.useMemo(()=>e.filter(t=>w(t.state)).length,[e]),l=r.useMemo(()=>{let t=0;for(const s of p.values())(s.status==="failed"||s.status==="needs_attention")&&(t+=1);return t},[p]),u=r.useMemo(()=>{const t=new Map;for(const s of e){const i=b(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]),d=r.useMemo(()=>{const t=new Map;for(const s of e){const i=k(s);t.set(i,(t.get(i)??0)+1)}return[...t.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[e]);return o.jsxs("div",{className:"ctx-panel",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Agents"}),o.jsx(a,{name:"Overview",meta:`${e.length}`,tone:"neutral",onClick:()=>n({view:"inbox"})}),o.jsx(a,{name:"Agents",meta:`${h}`,tone:"callable",active:!0,onClick:()=>n({view:"ops",mode:"agents"})}),o.jsx(a,{name:"Sessions",meta:`${m.length}`,tone:"neutral",onClick:()=>n({view:"sessions"})}),o.jsx(a,{name:"Alerts",meta:`${l}`,tone:l>0?"in_turn":"neutral",unread:l>0,onClick:()=>n({view:"activity"})})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Projects"}),u.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No projects"}):u.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Machines"}),d.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No machines"}):d.map(([t,s])=>o.jsx(a,{name:t,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${t}`},t))]})]})}export{ht as OpsAgentsLeft};
@@ -1 +0,0 @@
1
- import{r,j as o}from"./index-CzVeWScw.js";/* empty css */import{a as h}from"./api-h5zurxmi.js";import{n as f}from"./colors-BtO5_zlx.js";import{a as g,r as j}from"./operator-attention-BwSPeheT.js";import{u as N}from"./sse-QcU9bikk.js";import{t as c}from"./time-Dhsh_2EG.js";import{u as A}from"./Provider-DSsb2gLR.js";import{o as l}from"./openContent-C6XO6kr5.js";import{R as m}from"./RailRow-DerXOXQS.js";import"./index-BWHgHrtv.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";const w=[{name:"Control",route:{view:"ops",mode:"mission"},active:e=>e.view==="ops"&&(e.mode===void 0||e.mode==="mission")},{name:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{name:"Mesh",route:{view:"mesh"},active:e=>e.view==="mesh"},{name:"Tail",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{name:"Runtime",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop"}];function xt(){const{navigate:e,route:n}=A(),[p,d]=r.useState(null),s=r.useCallback(async()=>{const t=await h("/api/fleet").catch(()=>null);d(t)},[]);r.useEffect(()=>{s()},[s]),N(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&s()});const i=p?.needsAttention??[],a=(p?.activeAsks??[]).filter(t=>t.status!=="needs_attention"),u=t=>{l(e,g(t),{returnTo:n})},v=t=>{l(e,j(t),{returnTo:n})};return o.jsxs("div",{className:"ctx-panel ctx-panel--ops",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Surfaces"}),w.map(t=>o.jsx(m,{name:t.name,tone:"neutral",active:t.active(n),onClick:()=>e(t.route)},t.name))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Needs you",i.length>0&&o.jsx("span",{className:"ctx-panel-count",children:i.length})]}),i.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"All clear"}):i.slice(0,4).map(t=>{const x=t.agentName??t.agentId??"operator";return o.jsx(m,{name:t.title,meta:c(t.updatedAt),tone:"in_turn",unread:!0,title:`${x} · ${t.kind}`,onClick:()=>u(t)},t.recordId)})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Active",a.length>0&&o.jsx("span",{className:"ctx-panel-count",children:a.length})]}),a.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):a.slice(0,10).map(t=>o.jsx(m,{name:t.task,meta:c(t.updatedAt),tone:f(t.agentState),title:`${t.agentName??t.agentId} · ${t.statusLabel}`,onClick:()=>v(t)},t.invocationId))]})]})}export{xt as OpsDefaultLeft};
@@ -1 +0,0 @@
1
- import{r as f,j as t}from"./index-CzVeWScw.js";/* empty css */import{t as x}from"./time-Dhsh_2EG.js";import{u as b}from"./Provider-DSsb2gLR.js";import{R as g}from"./RailRow-DerXOXQS.js";import{S as v}from"./SpriteAvatar-BpQDpOkq.js";import{n as L}from"./colors-BtO5_zlx.js";import{b as h,c as j,l as p,d as N}from"./agent-lanes-model-CPgQRenB.js";import{u as _,b as A,g as n}from"./lane-roster-store-pR4ZaYQm.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./agent-identity-BxCsXnDp.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-BA3g9aVd.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";function c(s,e,i){const a=`[data-lane-id="${s.replace(/["\\]/g,"\\$&")}"]`,r=typeof document<"u"?document.querySelector(a):null;if(r){r.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),r.focus();return}e&&i({view:"agents-v2",agentId:e,tab:"profile"})}function R(s){return s.filter(e=>!h(e)&&j(e)).sort((e,i)=>{const a=(i.updatedAt??0)-(e.updatedAt??0);return a!==0?a:p(e,"scout").localeCompare(p(i,"scout"))}).map(e=>({id:e.id,label:p(e,"scout"),statusLabel:N(e,"scout"),tone:L(e.state,e),agentId:e.id,updatedAt:e.updatedAt??void 0}))}function _o(){const{agents:s,navigate:e}=b(),i=_(),a=A(),r=f.useMemo(()=>R(s),[s]),l=i??r,d=l.some(o=>o.floor);return t.jsx("div",{className:"ctx-panel ctx-panel--ops",children:t.jsxs("section",{className:"ctx-panel-section",children:[t.jsxs("div",{className:"ctx-panel-section-label",children:[d?"Fleet":"Lanes",l.length>0&&t.jsx("span",{className:"ctx-panel-count",children:l.length})]}),l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No active lanes"}):l.map(o=>o.floor?t.jsxs("button",{type:"button",className:`agent-floor__ledger-row is-rail${a===o.id?" is-focus":""}`,onClick:()=>{const m=n();m?m.onSelect(o.id):c(o.id,o.agentId,e)},onPointerEnter:()=>n()?.onHover(o.id),onPointerLeave:()=>n()?.onHover(null),children:[t.jsxs("span",{className:"agent-floor__ledger-id",children:[t.jsx(v,{name:o.label,size:16,tile:!0}),t.jsx("span",{className:"agent-floor__ledger-name",children:o.label}),t.jsx("span",{className:`agent-floor__card-dot${o.floor.live?" is-live":""}`})]}),t.jsx("span",{className:"agent-floor__ledger-strip",children:o.floor.strip.slice(-6).map((m,u)=>t.jsx("span",{className:`agent-floor__ledger-cell is-${m}`},u))})]},o.id):t.jsx(g,{name:o.label,sub:o.statusLabel||void 0,meta:o.updatedAt?x(o.updatedAt):void 0,tone:o.tone,title:o.statusLabel,onClick:()=>c(o.id,o.agentId,e)},o.id))]})})}export{_o as OpsLanesLeft};
@@ -1 +0,0 @@
1
- import{r as c,j as i}from"./index-CzVeWScw.js";/* empty css */import{n as S}from"./colors-BtO5_zlx.js";import{u as M,s as A,a as h,b as I,M as C,c as k,d as w,e as F,r as R,t as E}from"./mission-control-store-CcoNeQHG.js";import{u as K}from"./Provider-DSsb2gLR.js";import{a as T,b as q,r as B,m as D}from"./keyboard-nav-BJnFoFDP.js";import{MissionLeftAgentRow as L}from"./MissionLeftAgentRow-nc1Jyq3D.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./page-status-DDvNdA8s.js";import"./RailRow-DerXOXQS.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function Ee(){const{navigate:r}=K(),s=M(),o=s.visibleAgents,m=c.useRef(null),p=c.useRef(null),v=T(),x=D(()=>m.current);q(c.useCallback(()=>p.current,[]));const[d,y]=c.useState(null),u=s.activityFilter==="active",a=s.selectedIds.length,j=e=>{y(t=>t===e?null:e)},N=()=>{if(a===0)return;const t=o.filter(l=>s.selectedIds.includes(l.id)).map(l=>l.handle??l.name).filter(Boolean).join("|");t&&r({view:"ops",mode:"tail",tailQuery:t})};return i.jsxs("div",{className:"ctx-panel ml-panel",children:[i.jsxs("div",{className:"ml-section",children:[i.jsx("div",{className:"ml-section-label",children:"Source"}),i.jsx("div",{className:"ml-chips ml-chips--primary",children:["all","scout","native"].map(e=>i.jsx("button",{type:"button",className:["ml-chip",s.sourceFilter===e&&"ml-chip--active"].filter(Boolean).join(" "),onClick:()=>A(e),children:e==="all"?"All":e==="scout"?"Scout":"Native"},e))})]}),i.jsx("div",{className:"ctx-panel-search",children:i.jsx("input",{ref:p,type:"text",className:"ctx-panel-search-input",placeholder:"Filter agents… (press /)",value:s.query,onChange:e=>h(e.target.value),onKeyDown:e=>{x(e),e.key==="Escape"&&s.query&&h("")}})}),i.jsx("div",{className:"ml-section ml-section--secondary",children:i.jsxs("div",{className:"ml-chips ml-chips--secondary",children:[["active","live","all"].map(e=>i.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",s.activityFilter===e&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>I(e),children:e==="active"?"Active":e==="live"?"Live":"Any"},e)),u&&i.jsx("span",{className:"ml-divider","aria-hidden":!0}),u&&C.map(e=>i.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",s.activityWindowMs===e.value&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>k(e.value),children:e.label},e.value))]})}),i.jsxs("div",{className:"ml-section ml-section--grouping",children:[i.jsx("div",{className:"ml-section-label",children:"Order by"}),i.jsx("div",{className:"ml-chips ml-chips--grouping",children:[["activity","Activity"],["workspace","Project"],["harness","Harness"],["state","Status"],["source","Source"]].map(([e,t])=>i.jsx("button",{type:"button",className:["ml-chip","ml-chip--group",s.groupMode===e&&"ml-chip--group-active"].filter(Boolean).join(" "),"aria-pressed":s.groupMode===e,onClick:()=>w(e),children:t},e))})]}),a>0?i.jsxs("div",{className:"ml-selection",children:[i.jsxs("span",{className:"ml-selection-label",children:[a," selected"]}),i.jsxs("div",{className:"ml-selection-actions",children:[i.jsx("button",{type:"button",className:"ml-selection-btn ml-selection-btn--primary",onClick:N,children:"Tail ↗"}),i.jsx("button",{type:"button",className:"ml-selection-btn",onClick:F,children:"Clear"})]})]}):i.jsxs("div",{className:"ml-count",children:[o.length," visible",i.jsx("span",{className:"ml-count-hint",children:"⌘-click · ⌘A all"})]}),i.jsx("div",{ref:m,className:"ctx-panel-list ctx-panel-list--scroll",onKeyDown:v,children:o.length===0?i.jsx("div",{className:"ctx-panel-empty",children:s.query?"No match":"Nothing visible"}):o.map((e,t)=>{const l=e.id===d,b=o.some(n=>n.id===d),g=s.selectedIds.includes(e.id),f=S(e.state);return i.jsx(L,{agent:e,state:f,isExpanded:l,isSelected:g,tabIndex:B(l,b,t===0),onToggle:n=>{n.metaKey||n.ctrlKey||n.shiftKey?E(e.id):j(e.id)},onReveal:()=>R(e.id),onOpen:()=>r({view:"agents-v2",agentId:e.id})},e.id)})})]})}export{Ee as OpsMissionLeft};
@@ -1 +0,0 @@
1
- import{j as t}from"./index-CzVeWScw.js";import{u as o}from"./Provider-DSsb2gLR.js";import{OpsAgentsLeft as m}from"./left-agents-CYUwAy2Z.js";import{OpsDefaultLeft as p}from"./left-default-vEGZALPv.js";import{OpsLanesLeft as i}from"./left-lanes-bphF-vlX.js";import{OpsMissionLeft as s}from"./left-mission-B54-c3hq.js";import{OpsPlanLeft as e}from"./left-plan-BNBuDoPQ.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";/* empty css */import"./use-fleet-active-asks-BOMPW0nl.js";import"./RailRow-DerXOXQS.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./operator-attention-BwSPeheT.js";import"./openContent-C6XO6kr5.js";import"./agent-lanes-model-CPgQRenB.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-BA3g9aVd.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-roster-store-pR4ZaYQm.js";import"./mission-control-store-CcoNeQHG.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./page-status-DDvNdA8s.js";import"./FleetSearch-Dj7-CfNi.js";function Lt(){const{route:r}=o();if(r.view!=="ops")return null;switch(r.mode){case"mission":return t.jsx(s,{});case"agents":return t.jsx(m,{});case"plan":return t.jsx(e,{});case"lanes":return t.jsx(i,{});default:return t.jsx(p,{})}}export{Lt as OpsLeft};