@openscout/scout 0.2.92 → 0.2.95

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 (508) hide show
  1. package/NOTICE +14 -0
  2. package/README.md +164 -348
  3. package/bin/scoutd +0 -0
  4. package/dist/build-manifest.json +3 -3
  5. package/dist/client/apple-touch-icon.png +0 -0
  6. package/dist/client/assets/ActivityScreen--eANwuxa.js +1 -0
  7. package/dist/client/assets/{AddProjectForm-CpyytDf2.js → AddProjectForm-CcD6qvV8.js} +1 -1
  8. package/dist/client/assets/AgentAvatar-CYhf6twS.js +1 -0
  9. package/dist/client/assets/AgentConfigurationScreen-BTI24HQX.js +1 -0
  10. package/dist/client/assets/AgentDefinitionsWorkspace-srmN6-vj.js +1 -0
  11. package/dist/client/assets/{AgentDetailCard-BTiOmh-a.js → AgentDetailCard-UqPNpcvB.js} +1 -1
  12. package/dist/client/assets/AgentFloorView-XXNgI5Cj.js +1 -0
  13. package/dist/client/assets/AgentInfoScreen-CimdOnZ9.js +1 -0
  14. package/dist/client/assets/{AgentLaneCard-lfRNb7JD.js → AgentLaneCard-Z-aOBR3W.js} +1 -1
  15. package/dist/client/assets/{AgentLaneChrome-Dlwrbq3g.js → AgentLaneChrome-CyhA1reW.js} +1 -1
  16. package/dist/client/assets/AgentLaneDetailSheet-BNzjMjIH.js +4 -0
  17. package/dist/client/assets/{AgentLaneSummaryResize-6SOEWUnr.js → AgentLaneSummaryResize-Box8-_rS.js} +1 -1
  18. package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +1 -0
  19. package/dist/client/assets/{AgentLanesPreflight-C3uOiOzd.js → AgentLanesPreflight-5B6sXvRB.js} +1 -1
  20. package/dist/client/assets/AgentLanesView-DHyzVBk6.js +2 -0
  21. package/dist/client/assets/{AgentLiveActions-BJ5dIfL3.js → AgentLiveActions-BwuzOE8h.js} +1 -1
  22. package/dist/client/assets/AgentSessions-CsZwoukw.js +6 -0
  23. package/dist/client/assets/AgentsConsole-KCao4XmX.js +1 -0
  24. package/dist/client/assets/AgentsScreen-CtPAmwRX.js +1 -0
  25. package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +1 -0
  26. package/dist/client/assets/AstronautSuit-Ckx7lu7G.js +1 -0
  27. package/dist/client/assets/AtopView-DYlpgEHf.js +1 -0
  28. package/dist/client/assets/{BackToPicker-D1LV6Cqp.js → BackToPicker-4JaeRvDm.js} +1 -1
  29. package/dist/client/assets/BriefingDetailScreen-D6-xqrpo.js +1 -0
  30. package/dist/client/assets/BriefingsScreen-DKxSDEmk.js +1 -0
  31. package/dist/client/assets/{BrokerMetadataPanel-BhjECqOK.js → BrokerMetadataPanel-BbREmsbK.js} +1 -1
  32. package/dist/client/assets/BrokerScreen-fbPIouMw.js +5 -0
  33. package/dist/client/assets/CastPicker-BcA2vDDV.js +1 -0
  34. package/dist/client/assets/CastPicker-zXsnkTIy.css +1 -0
  35. package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +1 -0
  36. package/dist/client/assets/{CodeDiffPane-Bx_2VAzv.js → CodeDiffPane-Cn8Y9hAt.js} +1 -1
  37. package/dist/client/assets/{CodeProjectPicker-C1yOJKvs.js → CodeProjectPicker-nPFktrco.js} +1 -1
  38. package/dist/client/assets/CodeScreen-BlAxtxE5.js +1 -0
  39. package/dist/client/assets/ConversationComposer-2HjbGPL9.js +1 -0
  40. package/dist/client/assets/ConversationFeedRows-C6wUqJrx.js +1 -0
  41. package/dist/client/assets/ConversationHeader-C8vfXaTF.js +1 -0
  42. package/dist/client/assets/ConversationPanels-CNCIbpqU.js +6 -0
  43. package/dist/client/assets/ConversationScreen-BNULZAp2.js +2 -0
  44. package/dist/client/assets/ConversationScreen-CkWnKXt6.css +1 -0
  45. package/dist/client/assets/ConversationStatus-DZuyKsWN.js +1 -0
  46. package/dist/client/assets/CrewAvatar-CTIuxp4G.js +1 -0
  47. package/dist/client/assets/CrewAvatar-D0c9z5Qr.css +1 -0
  48. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +1 -0
  49. package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +1 -0
  50. package/dist/client/assets/{DataTable-CJbbgBdA.js → DataTable-6IDhanr5.js} +1 -1
  51. package/dist/client/assets/DispatchAftermath-DC1u9itO.js +1 -0
  52. package/dist/client/assets/DocumentFocusViewer-DZVhS7as.js +1 -0
  53. package/dist/client/assets/{EmbeddableSurfacesLab-BdsYRDky.js → EmbeddableSurfacesLab-BKUFJMCV.js} +1 -1
  54. package/dist/client/assets/{EmptyState-BRY5jTpz.js → EmptyState-CeBl0iGd.js} +1 -1
  55. package/dist/client/assets/{FileViewerPane-9Bveqm9c.js → FileViewerPane-DQlpNt2S.js} +2 -2
  56. package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +1 -0
  57. package/dist/client/assets/FollowScreen-BXHOp3gb.js +1 -0
  58. package/dist/client/assets/{HarnessMark-BPAphNjx.js → HarnessMark-D5CA5uSp.js} +1 -1
  59. package/dist/client/assets/HarnessesScreen-DhFXq1qz.js +1 -0
  60. package/dist/client/assets/{HerdrSession-BujfGzrP.js → HerdrSession-BRhs5LIR.js} +1 -1
  61. package/dist/client/assets/HomeHero-7JwycwFY.css +1 -0
  62. package/dist/client/assets/HomeHero-DMABJuze.js +1 -0
  63. package/dist/client/assets/HostAdvisorView-RAociATV.js +1 -0
  64. package/dist/client/assets/{KnowledgeSearchInspector-B4ZY24xE.js → KnowledgeSearchInspector-CZPyVNSw.js} +1 -1
  65. package/dist/client/assets/KnowledgeSearchScreen-mGTKIg00.js +1 -0
  66. package/dist/client/assets/{LaneToolHoverCard-B7KdvQvf.js → LaneToolHoverCard-D_DMlBeT.js} +1 -1
  67. package/dist/client/assets/LaneTraceDetailSheet-BEHg3LmH.js +1 -0
  68. package/dist/client/assets/{LaneTraceEventFocus-mkMw2wJU.js → LaneTraceEventFocus-DVimcizS.js} +1 -1
  69. package/dist/client/assets/{MeshCanvas-CpKcWxKy.js → MeshCanvas-BOuZx4AM.js} +2 -2
  70. package/dist/client/assets/{MeshCanvasMinimap-C9IoGHbe.js → MeshCanvasMinimap-wL-1N94e.js} +1 -1
  71. package/dist/client/assets/MeshScreen-DMY9Bmh5.js +1 -0
  72. package/dist/client/assets/{MeshTopologyView-DFzr0IZM.js → MeshTopologyView-DiDcX5f4.js} +2 -2
  73. package/dist/client/assets/MessagesScreen-Eulveud3.js +1 -0
  74. package/dist/client/assets/{MissionContextRail-Y8QxUZGE.js → MissionContextRail-DrNKXG5u.js} +1 -1
  75. package/dist/client/assets/MissionControlView-ByBlHVN8.js +1 -0
  76. package/dist/client/assets/MissionFocusOverlay-D1i6R6Zt.js +1 -0
  77. package/dist/client/assets/MissionLeftAgentRow-DN9NcCML.js +1 -0
  78. package/dist/client/assets/MissionLogPane-DSeIv3Xo.js +1 -0
  79. package/dist/client/assets/NewAgentModal-V7yK6J6j.js +1 -0
  80. package/dist/client/assets/NewChatComposer-hlWT-nbR.js +19 -0
  81. package/dist/client/assets/{NewChatOrigin-DmuJ32wa.js → NewChatOrigin-DdpzE4kz.js} +1 -1
  82. package/dist/client/assets/ObserveEmbedScreen-l_Q3ts2q.js +2 -0
  83. package/dist/client/assets/ObserveTextFlow-BSEtYTxU.js +2 -0
  84. package/dist/client/assets/ObservedTopologyPanel-CdGUXxGR.js +2 -0
  85. package/dist/client/assets/OpenScoutAppShell-DN8dOSK4.js +79 -0
  86. package/dist/client/assets/OpsAgentsView-ntGr4pz4.js +1 -0
  87. package/dist/client/assets/OpsScreen-Ppen_Lmj.js +1 -0
  88. package/dist/client/assets/OpsSubnav-GAKsoSor.js +1 -0
  89. package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +1 -0
  90. package/dist/client/assets/{ProjectAgentProfileBar-BLVg5EeA.js → ProjectAgentProfileBar-BQET-qrY.js} +1 -1
  91. package/dist/client/assets/ProjectAgentProfileHero-Ck8mThtx.js +1 -0
  92. package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +2 -0
  93. package/dist/client/assets/ProjectsRail-DCfNMmnW.js +1 -0
  94. package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +1 -0
  95. package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +1 -0
  96. package/dist/client/assets/Provider-B2xuo3rf.js +1 -0
  97. package/dist/client/assets/RailRow-B-GycCBx.js +1 -0
  98. package/dist/client/assets/RailRow-B0sRaJc6.css +1 -0
  99. package/dist/client/assets/RawSessionsTable-AQThi6sm.js +1 -0
  100. package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +1 -0
  101. package/dist/client/assets/{RepoDiffEmbedScreen-BCDXFE3D.js → RepoDiffEmbedScreen-DXWoRF_c.js} +1 -1
  102. package/dist/client/assets/{RepoDiffPageScreen-m62FiWXC.js → RepoDiffPageScreen-D_274ExO.js} +1 -1
  103. package/dist/client/assets/RepoDiffViewer-DbedmHDX.js +7 -0
  104. package/dist/client/assets/RepoDiffViewerLazy-C0--fPtk.js +2 -0
  105. package/dist/client/assets/ReposScreen-D39_YG4H.js +6 -0
  106. package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +1 -0
  107. package/dist/client/assets/{ScoutSurface-CkgT7A-c.js → ScoutSurface-UsRy0t-I.js} +1 -1
  108. package/dist/client/assets/{ScoutbotFxLab-D-kV5j4T.js → ScoutbotFxLab-Fmdfboxs.js} +1 -1
  109. package/dist/client/assets/{SecondaryNav-_wyKjwNf.js → SecondaryNav-o2RL9H8H.js} +1 -1
  110. package/dist/client/assets/{SessionEmbedScreen-CJZmIBV7.js → SessionEmbedScreen-RD5XOx7R.js} +1 -1
  111. package/dist/client/assets/{SessionObserve-yYA8Gy5s.js → SessionObserve-Dsd0j05N.js} +9 -9
  112. package/dist/client/assets/{SessionObserveEvidence-cHdjYOJe.js → SessionObserveEvidence-DopQYDkD.js} +1 -1
  113. package/dist/client/assets/SessionRefScreen-B_cTv47v.js +1 -0
  114. package/dist/client/assets/SessionsScreen-Bq0Z77On.js +1 -0
  115. package/dist/client/assets/SettingsDrawer-R8a0TlJD.css +1 -0
  116. package/dist/client/assets/SettingsDrawer-_AwuopMS.js +3 -0
  117. package/dist/client/assets/SettingsScreen-Cw4DDfJP.js +1 -0
  118. package/dist/client/assets/{ShikiPane-dBS9hD-z.js → ShikiPane-BfHc_3pM.js} +1 -1
  119. package/dist/client/assets/{SlidePanel-CH-3-8_2.js → SlidePanel-C-q7XwTa.js} +1 -1
  120. package/dist/client/assets/SpriteAvatar-Bs68ZENy.js +1 -0
  121. package/dist/client/assets/{StatusPill-C8m9ZymF.js → StatusPill-ZZQwxB1a.js} +1 -1
  122. package/dist/client/assets/{TailView-B0BSopPs.js → TailView-Q4FVMsUH.js} +2 -2
  123. package/dist/client/assets/Terminal-D7zqHwHV.js +1 -0
  124. package/dist/client/assets/TerminalEmbedScreen-CXIJ7qv6.js +1 -0
  125. package/dist/client/assets/TerminalHeaderMount-BnBLOPbb.js +1 -0
  126. package/dist/client/assets/{TextDocumentSurface-BWJCGBZf.js → TextDocumentSurface-CKQP-cBT.js} +1 -1
  127. package/dist/client/assets/{TmuxPeek-B4QdHbGm.js → TmuxPeek-V9dGESfO.js} +1 -1
  128. package/dist/client/assets/{VoicePermissionsPanel-Dd4ITJy_.js → VoicePermissionsPanel-k7sbLXx2.js} +1 -1
  129. package/dist/client/assets/WorkDetailScreen-60p9litn.js +5 -0
  130. package/dist/client/assets/WorkFilesViewer-BjJS7GyM.js +1 -0
  131. package/dist/client/assets/{activity-CC8JzJNH.js → activity-Bj3Hnbj3.js} +1 -1
  132. package/dist/client/assets/{addon-fit-CaZ-uLrg.js → addon-fit-BL-NTWRU.js} +1 -1
  133. package/dist/client/assets/{addon-webgl-B8utL3bM.js → addon-webgl-CIMgmNjg.js} +1 -1
  134. package/dist/client/assets/{ScoutbotBroadcastChip-CxtYZWPZ.css → agent-autocomplete-C7xwIcwd.css} +1 -1
  135. package/dist/client/assets/agent-autocomplete-DXlvdc4b.js +10 -0
  136. package/dist/client/assets/{agent-essentials-B3wcxg_v.js → agent-essentials-BOMHR0_U.js} +1 -1
  137. package/dist/client/assets/{agent-lane-card-model-q4cwzLX4.js → agent-lane-card-model-CTLxf3R4.js} +1 -1
  138. package/dist/client/assets/agent-lane-detail-ppJId6Jc.js +2 -0
  139. package/dist/client/assets/{agent-lane-preview-C33Dwpn7.js → agent-lane-preview-BhplDYGf.js} +1 -1
  140. package/dist/client/assets/{agent-lanes-BDNktFBZ.css → agent-lanes-DlqcEf0l.css} +1 -1
  141. package/dist/client/assets/{agent-lanes-model-VYQ5a68i.js → agent-lanes-model-AfrjRNK5.js} +2 -2
  142. package/dist/client/assets/agent-specialization-BIPIBW8u.js +1 -0
  143. package/dist/client/assets/api-Co9aQ2Jw.js +1 -0
  144. package/dist/client/assets/{api-BkjHJfgJ.js → api-HFH8wFyb.js} +1 -1
  145. package/dist/client/assets/{arc.es-uFv9UrHn.js → arc.es-IR5r6sj_.js} +1 -1
  146. package/dist/client/assets/archive-BjcGiAy8.js +1 -0
  147. package/dist/client/assets/{arrow-down-w1HPzDSE.js → arrow-down-BydciYFZ.js} +1 -1
  148. package/dist/client/assets/{arrow-left-B-3GJ7ct.js → arrow-left-CghA0kTw.js} +1 -1
  149. package/dist/client/assets/arrow-right-iJFv3jNh.js +1 -0
  150. package/dist/client/assets/{arrow-up-right-G6bJXxhK.js → arrow-up-right-CCfZXPqD.js} +1 -1
  151. package/dist/client/assets/{bot-DzCOGKi6.js → bot-B5sub1-i.js} +1 -1
  152. package/dist/client/assets/broker-display-Q75fupqG.js +2 -0
  153. package/dist/client/assets/{cache-Dr0why2k.js → cache-CeWH_KzJ.js} +1 -1
  154. package/dist/client/assets/{check-BX8nRgop.js → check-C18YQC90.js} +1 -1
  155. package/dist/client/assets/{chevron-down-B3VVRJcV.js → chevron-down-Mp9mu_yd.js} +1 -1
  156. package/dist/client/assets/{chevron-right-BYMV1511.js → chevron-right-CzH-TaSF.js} +1 -1
  157. package/dist/client/assets/{chunk-HRAB3GC3-dRd2eQMJ.js → chunk-HRAB3GC3-swV8PA2k.js} +1 -1
  158. package/dist/client/assets/{chunk-JTPDIGGW-BjX67kHU.js → chunk-JTPDIGGW-BKXqcLKw.js} +3 -3
  159. package/dist/client/assets/{chunk-T65CQEWV-kP6nJjkU.js → chunk-T65CQEWV-vYbNJ8E6.js} +1 -1
  160. package/dist/client/assets/{chunk-YOZR3KYS-C13bZPVd.js → chunk-YOZR3KYS-U65yUmqt.js} +1 -1
  161. package/dist/client/assets/{clock-B9ukVaVn.js → clock-B4PTFi5m.js} +1 -1
  162. package/dist/client/assets/{code-xml-BFc3TMSm.js → code-xml-Jtxsp5d1.js} +1 -1
  163. package/dist/client/assets/collapsed-strip-raJWthAH.css +1 -0
  164. package/dist/client/assets/compass-0_54-vz3.js +1 -0
  165. package/dist/client/assets/content-6RvWTrtk.js +1 -0
  166. package/dist/client/assets/content-BCgwMUqz.js +1 -0
  167. package/dist/client/assets/content-Bf2VLhx0.js +1 -0
  168. package/dist/client/assets/content-BrU_38-m.js +1 -0
  169. package/dist/client/assets/content-BvvJN8rN.js +1 -0
  170. package/dist/client/assets/content-CAeEqYPw.js +1 -0
  171. package/dist/client/assets/content-CHghn-rT.js +1 -0
  172. package/dist/client/assets/{content-Uqt8AG-s.css → content-CINHz-rZ.css} +1 -1
  173. package/dist/client/assets/content-CI_Z9DXk.js +1 -0
  174. package/dist/client/assets/content-CbyKONhW.js +1 -0
  175. package/dist/client/assets/content-Czogvp43.js +1 -0
  176. package/dist/client/assets/content-DFk0zNzX.js +1 -0
  177. package/dist/client/assets/content-DHe4DgkA.js +1 -0
  178. package/dist/client/assets/content-DMbawvqU.js +1 -0
  179. package/dist/client/assets/content-DTz7cKjo.js +1 -0
  180. package/dist/client/assets/content-E3kudY-W.js +1 -0
  181. package/dist/client/assets/content-LpO0aO_U.js +1 -0
  182. package/dist/client/assets/{conversation-icons-gpsv650H.js → conversation-icons-BV10B2Me.js} +1 -1
  183. package/dist/client/assets/conversation-model-CwF6Y9gx.js +1 -0
  184. package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +1 -0
  185. package/dist/client/assets/{copy-BFmOcWof.js → copy-Dtpx4FOE.js} +1 -1
  186. package/dist/client/assets/cpu-BjVis9mc.js +1 -0
  187. package/dist/client/assets/{createLucideIcon-CFBn0Sdk.js → createLucideIcon-DXpqZP7I.js} +1 -1
  188. package/dist/client/assets/credentials-BTce3VP1.js +1 -0
  189. package/dist/client/assets/ctx-panel-D_HJ3nhb.css +1 -0
  190. package/dist/client/assets/discover-CHbrEItO.js +2 -0
  191. package/dist/client/assets/embed-entry-vil28MyU.js +2 -0
  192. package/dist/client/assets/{external-link-B1TI5yIt.js → external-link-Ckiyzjwo.js} +1 -1
  193. package/dist/client/assets/{eye-1J4yOUoG.js → eye-CpfyvdLq.js} +1 -1
  194. package/dist/client/assets/file-code-corner-7mo7EviR.js +1 -0
  195. package/dist/client/assets/{file-text-DcYSrI4v.js → file-text-KijGBnME.js} +1 -1
  196. package/dist/client/assets/gauge-y-Xg8Mrv.js +1 -0
  197. package/dist/client/assets/gestures-Bq9XnSqY.js +1 -0
  198. package/dist/client/assets/git-branch-BQ_x8KZL.js +1 -0
  199. package/dist/client/assets/harnesses-screen-2z36fJKE.css +1 -0
  200. package/dist/client/assets/home-moving-signal-DMguaRWR.css +1 -0
  201. package/dist/client/assets/home-moving-signal-DtRpiNa0.js +1 -0
  202. package/dist/client/assets/home-now-card-DFb4GOgM.js +1 -0
  203. package/dist/client/assets/{home-now-card-nano-y1EhBvVL.js → home-now-card-nano-D--m9jpq.js} +1 -1
  204. package/dist/client/assets/hooks-9d1SoaQA.js +2 -0
  205. package/dist/client/assets/host-advisor-B2Fqs5Dd.css +1 -0
  206. package/dist/client/assets/index-BVlMw8x_.js +1 -0
  207. package/dist/client/assets/index-CZ-05hKz.js +10 -0
  208. package/dist/client/assets/index-Cn0GR-q1.js +1 -0
  209. package/dist/client/assets/index-DosI4AG9.js +1 -0
  210. package/dist/client/assets/index-i7TMxlwW.css +1 -0
  211. package/dist/client/assets/index-wLwc74Pu.css +1 -0
  212. package/dist/client/assets/inspector-panel-C-EhEDYy.js +2 -0
  213. package/dist/client/assets/{keyboard-nav-h1IdakpD.js → keyboard-nav-DFhAJkW3.js} +1 -1
  214. package/dist/client/assets/{lane-observe-BA3g9aVd.js → lane-observe-vfyACHi0.js} +1 -1
  215. package/dist/client/assets/{lane-roster-store-71vFgAem.js → lane-roster-store-gUBsydNf.js} +1 -1
  216. package/dist/client/assets/layers-CGou-LwV.js +1 -0
  217. package/dist/client/assets/layout-grid-BrZt31QH.js +1 -0
  218. package/dist/client/assets/left-B_o51JV6.js +1 -0
  219. package/dist/client/assets/left-BpgWnaah.js +1 -0
  220. package/dist/client/assets/left-CwHZCGO3.js +2 -0
  221. package/dist/client/assets/left-CwLs0okF.js +1 -0
  222. package/dist/client/assets/left-Cx0kv6pe.js +1 -0
  223. package/dist/client/assets/left-DA0amyfu.js +1 -0
  224. package/dist/client/assets/left-DH44V4I_.css +1 -0
  225. package/dist/client/assets/left-R2OOE7VG.css +1 -0
  226. package/dist/client/assets/left-advisor-DU3s01gk.js +1 -0
  227. package/dist/client/assets/left-agents-qL5PpUY-.js +1 -0
  228. package/dist/client/assets/left-default-uvuvDmt0.js +1 -0
  229. package/dist/client/assets/left-lanes-DnNLgec8.js +1 -0
  230. package/dist/client/assets/left-mission-DN3-NLPC.js +1 -0
  231. package/dist/client/assets/left-z-6CkuBe.js +2 -0
  232. package/dist/client/assets/library-DIo5NiGP.js +1 -0
  233. package/dist/client/assets/{loader-circle-d6PKL_KD.js → loader-circle-BiohlpM3.js} +1 -1
  234. package/dist/client/assets/{local-agents-B5pq17tZ.js → local-agents-wUIaBcEr.js} +1 -1
  235. package/dist/client/assets/{mentions-agCGDgyA.js → mentions-CcPFMbmZ.js} +1 -1
  236. package/dist/client/assets/mesh-buckets-ByyFXdKT.js +1 -0
  237. package/dist/client/assets/{mesh-ops-5pZCYptW.js → mesh-ops-CvGyjK84.js} +1 -1
  238. package/dist/client/assets/mesh-roster-n2nDpEmA.js +1 -0
  239. package/dist/client/assets/{mesh-screen-BSDUjrnV.css → mesh-screen-D1Yvo8fU.css} +1 -1
  240. package/dist/client/assets/{mesh-view-store-KJzABIkN.js → mesh-view-store-BpxGm71b.js} +1 -1
  241. package/dist/client/assets/{message-circle-CJO-pi7b.js → message-circle-B2ddzBrX.js} +1 -1
  242. package/dist/client/assets/{message-markup-CyRDLdOn.js → message-markup-RkfmDfME.js} +1 -1
  243. package/dist/client/assets/{message-square-D1hMsMj_.js → message-square-D9YYWE0x.js} +1 -1
  244. package/dist/client/assets/message-visibility-DwxgcgYK.js +1 -0
  245. package/dist/client/assets/mission-control-CnU7dNt1.css +1 -0
  246. package/dist/client/assets/{mission-control-store-Ce6dOvnZ.js → mission-control-store-Bf4b54MV.js} +1 -1
  247. package/dist/client/assets/{observe-BSWVM8YA.js → observe-CJRIvOCn.js} +1 -1
  248. package/dist/client/assets/{operator-attention-BwSPeheT.js → operator-attention-RqieiSY8.js} +1 -1
  249. package/dist/client/assets/{page-status-D2FQLJOX.js → page-status-BptpTdQ-.js} +1 -1
  250. package/dist/client/assets/{paperclip-iZmDMOS5.js → paperclip-B1UNGl5d.js} +1 -1
  251. package/dist/client/assets/perf-PX8Rx0EP.js +1 -0
  252. package/dist/client/assets/persistent-state-YI-WHSCF.js +1 -0
  253. package/dist/client/assets/{plus-gZ0T0eBI.js → plus-CuU_X0-8.js} +1 -1
  254. package/dist/client/assets/profile-rY8jO38P.js +1 -0
  255. package/dist/client/assets/projects-inbox-BBs1hG13.css +1 -0
  256. package/dist/client/assets/projects-inbox-D-zAb9Gp.js +1 -0
  257. package/dist/client/assets/proxy-DnLpZIi9.js +1 -0
  258. package/dist/client/assets/{radio-RMLfV4EO.js → radio-Dm1ItnA4.js} +1 -1
  259. package/dist/client/assets/{refresh-cw-C4x1x6b_.js → refresh-cw-BRn9Oxxl.js} +1 -1
  260. package/dist/client/assets/resolve-panes-DO6LkwhQ.js +1 -0
  261. package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +1 -0
  262. package/dist/client/assets/right-BJltPRnd.js +1 -0
  263. package/dist/client/assets/right-BbyYdzHn.js +1 -0
  264. package/dist/client/assets/right-Beh3nCUB.js +1 -0
  265. package/dist/client/assets/right-C1yumXNx.js +1 -0
  266. package/dist/client/assets/{right-D-k9Z1Fe.js → right-CJnB_Bg7.js} +2 -2
  267. package/dist/client/assets/right-CPP7GyOm.js +1 -0
  268. package/dist/client/assets/right-D3aTKf1F.js +1 -0
  269. package/dist/client/assets/right-DI1B79nR.js +1 -0
  270. package/dist/client/assets/right-DtsRNX5b.js +1 -0
  271. package/dist/client/assets/right-Shpw_xDy.js +1 -0
  272. package/dist/client/assets/{rocket-CMM-IdLy.js → rocket-DOwXHKWA.js} +1 -1
  273. package/dist/client/assets/router-DJj2WbDg.js +1 -0
  274. package/dist/client/assets/{scope-views-BIfMTXU4.js → scope-views-A4_vP97W.js} +1 -1
  275. package/dist/client/assets/scout-voice-BhPzrc6P.js +1 -0
  276. package/dist/client/assets/{scoutbot-BTIErYHo.js → scoutbot-BJIamJOH.js} +2 -2
  277. package/dist/client/assets/scoutbot-markdown-jh7tzFB1.js +6 -0
  278. package/dist/client/assets/{scroll-text-DPPYrqB9.js → scroll-text-DO0GQzvN.js} +1 -1
  279. package/dist/client/assets/{search-DAyagUtF.js → search-D1tJSAWe.js} +1 -1
  280. package/dist/client/assets/secondaryNavConfig-B9IF8wXl.js +1 -0
  281. package/dist/client/assets/{selection-bridge-BXw09aRF.js → selection-bridge-i2S9zpf8.js} +1 -1
  282. package/dist/client/assets/{send-horizontal-IcG46D2M.js → send-horizontal-CgLppsIC.js} +1 -1
  283. package/dist/client/assets/{server-BySujhDV.js → server-Dymv5Emh.js} +1 -1
  284. package/dist/client/assets/{session-catalog-ClS9xf6i.js → session-catalog-DNaOEzoQ.js} +1 -1
  285. package/dist/client/assets/{session-table-BdpHs1GN.js → session-table-PTQVoTyc.js} +1 -1
  286. package/dist/client/assets/settings-2fC_G9nX.js +1 -0
  287. package/dist/client/assets/{sliders-horizontal-R5pWUUcH.js → sliders-horizontal-BPSMHhbm.js} +1 -1
  288. package/dist/client/assets/{sparkles-DJOBD_8l.js → sparkles-Dy8p5xN8.js} +1 -1
  289. package/dist/client/assets/sse-CiOSzE5n.js +1 -0
  290. package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +1 -0
  291. package/dist/client/assets/{tail-display-BRcJltQa.js → tail-display-DcliDVkW.js} +1 -1
  292. package/dist/client/assets/{tail-events-BdvqZHLr.js → tail-events-BMQmSx1n.js} +1 -1
  293. package/dist/client/assets/{terminal-relay-TffuSPGs.js → terminal-relay-9lhzEp2V.js} +1 -1
  294. package/dist/client/assets/terminal-screen-BLk4PAYt.css +1 -0
  295. package/dist/client/assets/terminal-sessions-BQ6t92tJ.js +1 -0
  296. package/dist/client/assets/{terminal-takeover-BOFPRPjR.js → terminal-takeover-DANQfTcy.js} +1 -1
  297. package/dist/client/assets/{terminal-DJPUp_Qn.js → terminal-yN9xN-h9.js} +1 -1
  298. package/dist/client/assets/{runtime-picker--IW3cRry.js → text-CnZ0e1-V.js} +1 -1
  299. package/dist/client/assets/text-rLpBg4_z.css +1 -0
  300. package/dist/client/assets/use-conversation-list-D9BNLfnW.js +1 -0
  301. package/dist/client/assets/{use-fleet-active-asks-BHzeBZSW.js → use-fleet-active-asks-BeAdcl09.js} +1 -1
  302. package/dist/client/assets/{use-mesh-ops-items-KmaauBr_.js → use-mesh-ops-items-BIvIHlqe.js} +1 -1
  303. package/dist/client/assets/use-reduced-motion-CKkhq9c5.js +1 -0
  304. package/dist/client/assets/{use-scout-dev-flags-BJbw87PK.js → use-scout-dev-flags-B2KCzPxn.js} +1 -1
  305. package/dist/client/assets/{useAgentHoverCard-C6o0tlat.js → useAgentHoverCard-CHBsxcbp.js} +1 -1
  306. package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +1 -0
  307. package/dist/client/assets/{usePierreRuntime-Cm7-qdm0.js → usePierreRuntime-DUuXH5yp.js} +1 -1
  308. package/dist/client/assets/{wrench-CvRjjByE.js → wrench-YcXMlsh2.js} +1 -1
  309. package/dist/client/assets/{x-C8ayPBtj.js → x-e3h2hDsp.js} +1 -1
  310. package/dist/client/assets/{xterm-B0ci4Q9a.js → xterm-Byp1Hep_.js} +1 -1
  311. package/dist/client/assets/zap-nMcjPoWB.js +1 -0
  312. package/dist/client/favicon-16.png +0 -0
  313. package/dist/client/favicon-32.png +0 -0
  314. package/dist/client/favicon.ico +0 -0
  315. package/dist/client/favicon.svg +20 -47
  316. package/dist/client/index.html +5 -5
  317. package/dist/client/openscout-icon.png +0 -0
  318. package/dist/client/site.webmanifest +2 -2
  319. package/dist/client/web-app-icon-192.png +0 -0
  320. package/dist/client/web-app-icon-512.png +0 -0
  321. package/dist/main.mjs +20095 -78203
  322. package/dist/node/main.mjs +322 -252
  323. package/dist/pairing-runtime-controller.mjs +1032 -804
  324. package/dist/runtime/base-daemon.mjs +49 -121
  325. package/dist/runtime/broker-daemon.mjs +1105 -281
  326. package/dist/runtime/broker-process-manager.mjs +6 -0
  327. package/dist/runtime/mesh-discover.mjs +6 -0
  328. package/dist/scout-control-plane-web.mjs +3326 -1912
  329. package/package.json +27 -5
  330. package/dist/client/assets/ActivityScreen-DkUP7V7M.js +0 -1
  331. package/dist/client/assets/AgentAvatar-D8ZtMluU.js +0 -1
  332. package/dist/client/assets/AgentConfigurationScreen-BlGI6fuM.js +0 -1
  333. package/dist/client/assets/AgentDefinitionsWorkspace-CfaDVCVt.js +0 -1
  334. package/dist/client/assets/AgentFloorView-DjNLILLt.js +0 -1
  335. package/dist/client/assets/AgentInfoScreen-DG5dlHb_.js +0 -1
  336. package/dist/client/assets/AgentLaneDetailSheet-BzYzBfcW.js +0 -4
  337. package/dist/client/assets/AgentLanesEmbedScreen-Crxx1srt.js +0 -1
  338. package/dist/client/assets/AgentLanesView-ChNlmY-F.js +0 -2
  339. package/dist/client/assets/AgentSessions-DpY0htZV.js +0 -6
  340. package/dist/client/assets/AgentsConsole-CHyXrjhm.js +0 -1
  341. package/dist/client/assets/AgentsScreen-BhCjX2lD.js +0 -1
  342. package/dist/client/assets/AgentsSubnav-az_VDkri.js +0 -1
  343. package/dist/client/assets/AtopView-BjjPM8OX.js +0 -1
  344. package/dist/client/assets/BriefingDetailScreen-B7qJ90Np.js +0 -6
  345. package/dist/client/assets/BriefingsScreen-CW6N829d.js +0 -1
  346. package/dist/client/assets/BrokerScreen-X3z50712.js +0 -5
  347. package/dist/client/assets/ChatCollapsedStrip-DNR9osDy.js +0 -1
  348. package/dist/client/assets/CodeScreen-CIKK1LcZ.js +0 -1
  349. package/dist/client/assets/ContextMenu-CHIuVKz7.js +0 -1
  350. package/dist/client/assets/ConversationComposer-Bf7Ga_49.js +0 -1
  351. package/dist/client/assets/ConversationFeedRows-Cm1Lgo43.js +0 -1
  352. package/dist/client/assets/ConversationHeader-B_GXrKR0.js +0 -1
  353. package/dist/client/assets/ConversationPanels-BTBbEvrP.js +0 -2
  354. package/dist/client/assets/ConversationScreen-B3l2m3JI.js +0 -1
  355. package/dist/client/assets/ConversationScreen-yIKEsm-8.css +0 -1
  356. package/dist/client/assets/ConversationStatus-BqhUHD85.js +0 -1
  357. package/dist/client/assets/DispatchAftermath-BDA9CrOd.js +0 -1
  358. package/dist/client/assets/DocumentFocusViewer-B9vodVmG.js +0 -1
  359. package/dist/client/assets/FleetSearch-Bj9SCl2f.js +0 -1
  360. package/dist/client/assets/FleetSearch-EXOe8ulE.css +0 -1
  361. package/dist/client/assets/FlightObserveScreen-BVMdsiCC.js +0 -1
  362. package/dist/client/assets/FollowScreen-BifwHWOV.js +0 -1
  363. package/dist/client/assets/HarnessesScreen-fMnbnrD4.js +0 -1
  364. package/dist/client/assets/HomeHero-BgM6S39l.js +0 -1
  365. package/dist/client/assets/HomeHero-DEl-WBsT.css +0 -1
  366. package/dist/client/assets/KnowledgeSearchScreen-Ch_WENUC.js +0 -1
  367. package/dist/client/assets/LaneTraceDetailSheet-H3AnN-vN.js +0 -1
  368. package/dist/client/assets/MeshScreen-48QkJSDI.js +0 -1
  369. package/dist/client/assets/MessageComposerSuggestions-FdVHnT_q.js +0 -1
  370. package/dist/client/assets/MessagesScreen-BMOOfbWX.js +0 -1
  371. package/dist/client/assets/MissionControlView-BpsHKu1F.js +0 -1
  372. package/dist/client/assets/MissionFocusOverlay-BPnAEA3F.js +0 -1
  373. package/dist/client/assets/MissionLeftAgentRow-iOZ6ds9L.js +0 -1
  374. package/dist/client/assets/MissionLogPane-B0csI89E.js +0 -1
  375. package/dist/client/assets/NewAgentModal-DBHJR9Qm.js +0 -1
  376. package/dist/client/assets/NewChatComposer-Hd7pI5Ac.js +0 -19
  377. package/dist/client/assets/ObserveEmbedScreen-DyArn7Id.js +0 -2
  378. package/dist/client/assets/ObserveTextFlow-CkMrtT8s.js +0 -2
  379. package/dist/client/assets/ObservedTopologyPanel-CaSZZP05.js +0 -2
  380. package/dist/client/assets/OpenScoutAppShell-BtlKkiuF.js +0 -87
  381. package/dist/client/assets/OpsAgentsView-CnqrwbC2.js +0 -1
  382. package/dist/client/assets/OpsScreen-DOlmlVkP.js +0 -1
  383. package/dist/client/assets/OpsSubnav-Dj3ShAKv.js +0 -1
  384. package/dist/client/assets/PlanView-BLGdWDx6.js +0 -1
  385. package/dist/client/assets/ProjectAgentProfile-Dv1sVnQl.js +0 -1
  386. package/dist/client/assets/ProjectAgentProfileHero-0-GDhsPT.js +0 -1
  387. package/dist/client/assets/ProjectsInbox-B3DpAI5b.js +0 -2
  388. package/dist/client/assets/ProjectsRail-BDl7U9Jq.js +0 -1
  389. package/dist/client/assets/ProjectsScreen-Dl2FcGrR.js +0 -1
  390. package/dist/client/assets/ProjectsThreadAside-BcGC5mHE.js +0 -1
  391. package/dist/client/assets/Provider-cJCdHAxu.js +0 -1
  392. package/dist/client/assets/RailRow-CLcVmywd.js +0 -1
  393. package/dist/client/assets/RailRow-Cf9LOiEj.css +0 -1
  394. package/dist/client/assets/RawSessionsTable-DBto4Ts-.js +0 -1
  395. package/dist/client/assets/RealtimeVoiceScreen-DXEU5v3g.js +0 -1
  396. package/dist/client/assets/RepoDiffViewer-PaNeZMhJ.js +0 -7
  397. package/dist/client/assets/RepoDiffViewerLazy-CWE5GxMP.js +0 -2
  398. package/dist/client/assets/ReposScreen-Cksv1cAD.js +0 -6
  399. package/dist/client/assets/ScoutDeckSurface-BCjPl7C4.js +0 -1
  400. package/dist/client/assets/ScoutbotBroadcastChip-DkiRCHuK.js +0 -2
  401. package/dist/client/assets/ScoutbotRealtimeVoiceCall-1ixiEn1L.js +0 -1
  402. package/dist/client/assets/SessionRefScreen-OkTY7Szg.js +0 -1
  403. package/dist/client/assets/SessionsScreen-B-GFjxIA.js +0 -1
  404. package/dist/client/assets/SettingsDrawer-Co11RFX0.js +0 -3
  405. package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +0 -1
  406. package/dist/client/assets/SettingsScreen-Cn09nq5_.js +0 -1
  407. package/dist/client/assets/SpriteAvatar-DS6Tmyua.js +0 -1
  408. package/dist/client/assets/Terminal-U8gjIdm3.js +0 -1
  409. package/dist/client/assets/TerminalEmbedScreen-CTmdE7us.js +0 -1
  410. package/dist/client/assets/WorkDetailScreen-mJs0mb99.js +0 -5
  411. package/dist/client/assets/WorkFilesViewer-ODzLXKxj.js +0 -1
  412. package/dist/client/assets/agent-identity-BxCsXnDp.js +0 -1
  413. package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +0 -2
  414. package/dist/client/assets/api-h5zurxmi.js +0 -1
  415. package/dist/client/assets/broker-display-pp33bLsu.js +0 -2
  416. package/dist/client/assets/collapsed-strip-Dz-of2SM.css +0 -1
  417. package/dist/client/assets/content-B8gahuBy.js +0 -1
  418. package/dist/client/assets/content-BIqX06OQ.js +0 -1
  419. package/dist/client/assets/content-BKDZ6Fxe.js +0 -1
  420. package/dist/client/assets/content-C15Ya-iu.js +0 -1
  421. package/dist/client/assets/content-CDE9tJDF.js +0 -1
  422. package/dist/client/assets/content-CSAfI-PX.js +0 -1
  423. package/dist/client/assets/content-CTF9D60D.js +0 -1
  424. package/dist/client/assets/content-CbAGkYQO.js +0 -1
  425. package/dist/client/assets/content-CtqLJOVp.js +0 -1
  426. package/dist/client/assets/content-Dvs1KRfo.js +0 -1
  427. package/dist/client/assets/content-DyJdVZjI.js +0 -1
  428. package/dist/client/assets/content-Ji7ATaf7.js +0 -1
  429. package/dist/client/assets/content-eqZXKWcP.js +0 -1
  430. package/dist/client/assets/content-iyyQKwvA.js +0 -1
  431. package/dist/client/assets/content-pDE7Fpb9.js +0 -1
  432. package/dist/client/assets/content-pPSd2dua.js +0 -1
  433. package/dist/client/assets/conversation-model-CHwHZNw-.js +0 -1
  434. package/dist/client/assets/conversation-motion-features-DXtKlmuM.js +0 -1
  435. package/dist/client/assets/ctx-panel-B4s49N9e.css +0 -1
  436. package/dist/client/assets/discover-DKf0aTr_.js +0 -2
  437. package/dist/client/assets/embed-entry-RlQUTtc4.js +0 -2
  438. package/dist/client/assets/gestures-CcEOV6Sr.js +0 -1
  439. package/dist/client/assets/harnesses-screen-DBZoTZz8.css +0 -1
  440. package/dist/client/assets/home-moving-signal-Bh2FugbH.js +0 -1
  441. package/dist/client/assets/home-moving-signal-CAa0V91u.css +0 -1
  442. package/dist/client/assets/home-now-card-ByRH5fFx.js +0 -1
  443. package/dist/client/assets/hooks-DUZwL3Aq.js +0 -2
  444. package/dist/client/assets/index-BBznYVWk.css +0 -1
  445. package/dist/client/assets/index-BTuq-8Iv.js +0 -1
  446. package/dist/client/assets/index-CmwGCxUk.js +0 -1
  447. package/dist/client/assets/index-CvF09yvf.css +0 -1
  448. package/dist/client/assets/index-DmFAhGPj.js +0 -10
  449. package/dist/client/assets/index-Dtaswdsh.js +0 -1
  450. package/dist/client/assets/inspector-panel-DzgS5_Mv.js +0 -2
  451. package/dist/client/assets/left-8NITBvFX.js +0 -1
  452. package/dist/client/assets/left-B2HEqrTM.js +0 -2
  453. package/dist/client/assets/left-Bk3XnxPD.css +0 -1
  454. package/dist/client/assets/left-CCoobxPS.css +0 -1
  455. package/dist/client/assets/left-CTYUvXbe.js +0 -1
  456. package/dist/client/assets/left-CwDRT50z.js +0 -2
  457. package/dist/client/assets/left-CxlDLJlw.js +0 -1
  458. package/dist/client/assets/left-XFXxNd4g.js +0 -1
  459. package/dist/client/assets/left-agents-Ck4Xn-R8.js +0 -1
  460. package/dist/client/assets/left-default-BeOyS0bR.js +0 -1
  461. package/dist/client/assets/left-lanes-DZp3jJMo.js +0 -1
  462. package/dist/client/assets/left-mission-CuKFQ5xL.js +0 -1
  463. package/dist/client/assets/left-p1hkO6P0.js +0 -1
  464. package/dist/client/assets/left-plan-3rrFENhp.js +0 -2
  465. package/dist/client/assets/library-E--gKzEZ.js +0 -1
  466. package/dist/client/assets/mesh-buckets-CfAukILK.js +0 -1
  467. package/dist/client/assets/message-visibility-kJM8XcSG.js +0 -1
  468. package/dist/client/assets/mission-control-m3BTDQ9l.css +0 -1
  469. package/dist/client/assets/model-Co0zkMIc.js +0 -1
  470. package/dist/client/assets/plan-view-D56fneVF.css +0 -1
  471. package/dist/client/assets/profile-Dxj3VVOM.js +0 -1
  472. package/dist/client/assets/projects-inbox-COZ23dLR.css +0 -1
  473. package/dist/client/assets/projects-inbox-Dzt_GQDv.js +0 -1
  474. package/dist/client/assets/resolve-panes-C9gF0w4e.js +0 -1
  475. package/dist/client/assets/resolve-sidebar-context-DxbY5RCH.js +0 -1
  476. package/dist/client/assets/right-5L7Tn0zG.js +0 -1
  477. package/dist/client/assets/right-CYtkMmRu.js +0 -1
  478. package/dist/client/assets/right-CreoQzPP.js +0 -1
  479. package/dist/client/assets/right-D9xFfy2b.js +0 -1
  480. package/dist/client/assets/right-DI7zHADe.js +0 -1
  481. package/dist/client/assets/right-DUbJ3WVc.js +0 -1
  482. package/dist/client/assets/right-DiybhsiK.js +0 -1
  483. package/dist/client/assets/right-Jh_1Q88s.js +0 -1
  484. package/dist/client/assets/right-udr1qTJG.js +0 -1
  485. package/dist/client/assets/router-Cn_s9IGH.js +0 -1
  486. package/dist/client/assets/runtime-picker-vhm0gtLs.css +0 -1
  487. package/dist/client/assets/scout-voice-CwbOz6EN.js +0 -1
  488. package/dist/client/assets/secondaryNavConfig-Dw3gS1jR.js +0 -1
  489. package/dist/client/assets/sse-CxXt4tqI.js +0 -1
  490. package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +0 -1
  491. package/dist/client/assets/terminal-screen-BqVnCwl0.css +0 -1
  492. package/dist/client/assets/terminal-sessions-AmSgHklm.js +0 -1
  493. package/dist/client/assets/text-DsBWV_4k.js +0 -1
  494. package/dist/client/assets/use-conversation-list-C-dPcjQe.js +0 -1
  495. package/dist/client/assets/use-reduced-motion-CYqhYqHO.js +0 -1
  496. package/dist/client/assets/useContentSecondaryNav-DjHBrgnS.js +0 -1
  497. package/dist/highlights-eq9cgrbb.scm +0 -604
  498. package/dist/highlights-ghv9g403.scm +0 -205
  499. package/dist/highlights-hk7bwhj4.scm +0 -284
  500. package/dist/highlights-r812a2qc.scm +0 -150
  501. package/dist/highlights-x6tmsnaa.scm +0 -115
  502. package/dist/injections-73j83es3.scm +0 -27
  503. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  504. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  505. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  506. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  507. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  508. /package/dist/client/assets/{document-focus-viewer-BSC_JwVE.css → DocumentFocusViewer-BSC_JwVE.css} +0 -0
@@ -0,0 +1 @@
1
+ .scout-left-shell{display:flex;flex-direction:column;height:100%;min-height:0}.scout-left-shell-rail{flex:1 1 auto;min-height:0;overflow:hidden;display:flex;flex-direction:column}.scout-left-shell-rail>*{flex:1 1 auto;min-height:0}.gjd{flex:0 0 auto;display:flex;flex-direction:column;border-top:1px solid color-mix(in srgb,var(--ink) 8%,transparent);background:color-mix(in srgb,var(--surface) 92%,transparent)}.gjd-head{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:var(--space-xs);padding:var(--space-xs) var(--space-md)}.gjd-ear{height:1px;background:color-mix(in srgb,var(--ink) 10%,transparent)}.gjd-mode{display:inline-flex;gap:var(--space-3xs);padding:var(--space-3xs);border-radius:var(--radius-sm);background:color-mix(in srgb,var(--ink) 5%,transparent)}.gjd-mode-btn{font-family:var(--font-mono);font-size:var(--text-xs);font-weight:600;letter-spacing:var(--tracking-sm);text-transform:uppercase;padding:var(--space-2xs) var(--space-sm);border:none;background:transparent;color:color-mix(in srgb,var(--ink) 55%,transparent);border-radius:var(--radius-sm);cursor:pointer;transition:background .12s,color .12s}.gjd-mode-btn:hover{color:var(--ink)}.gjd-mode-btn--active{background:color-mix(in srgb,var(--ink) 10%,transparent);color:var(--ink)}.gjd-body{padding:0}.gjd-jumps{display:grid;grid-template-columns:1fr 1fr;gap:var(--space-3xs);padding:var(--space-xs) var(--space-sm) var(--space-md)}.gjd-jump{display:flex;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-sm);border-radius:var(--radius-sm);border:1px solid transparent;background:transparent;color:color-mix(in srgb,var(--ink) 75%,transparent);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:500;cursor:pointer;text-align:left;transition:background .12s,color .12s,border-color .12s}.gjd-jump:hover{background:color-mix(in srgb,var(--ink) 6%,transparent);color:var(--ink);border-color:color-mix(in srgb,var(--ink) 10%,transparent)}.gjd-jump-icon{display:inline-flex;align-items:center;color:color-mix(in srgb,var(--ink) 50%,transparent)}.gjd-jump:hover .gjd-jump-icon{color:var(--accent)}.gjd-jump-label{flex:1}.gjd-body>.mesh-rail{border-top:0}
@@ -0,0 +1,2 @@
1
+ import{r as o,j as e}from"./index-CZ-05hKz.js";import{u as b}from"./Provider-B2xuo3rf.js";import{o as k}from"./openAgent-Dbv5wfuL.js";import{o as y}from"./openContent-C6XO6kr5.js";import{a as A,i as S,b as I,c as O}from"./colors-BtO5_zlx.js";import{a as j}from"./api-Co9aQ2Jw.js";import{c as T}from"./clipboard-e3fSpeo7.js";import{u as E}from"./sse-CiOSzE5n.js";import{t as v}from"./time-Dhsh_2EG.js";import{X as B}from"./x-e3h2hDsp.js";import{C as $}from"./check-C18YQC90.js";import{C as L}from"./copy-Dtpx4FOE.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./index-BWHgHrtv.js";const P={mission:"Control",advisor:"Host Advisor",issues:"Alerts",tail:"Tail",atop:"Runtime",agents:"Agents",lanes:"Lanes"};function Ie({mode:t,agents:s,navigate:c,returnRoute:i}){const[l,r]=o.useState(null),[n,g]=o.useState(()=>typeof window>"u"?null:N(window.scoutOpsDetailSnapshot)),x=o.useCallback(async()=>{const a=await j("/api/fleet").catch(()=>null);r(a)},[]);if(o.useEffect(()=>{x()},[x]),o.useEffect(()=>{const a=h=>{g(N(h.detail))};return window.addEventListener("scout:ops-detail",a),()=>window.removeEventListener("scout:ops-detail",a)},[]),E(a=>{(a.kind==="message.posted"||a.kind==="flight.updated"||a.kind==="collaboration.event.appended")&&x()}),t==="advisor")return e.jsx(H,{navigate:c});if(t==="tail"||t==="issues")return e.jsx(D,{detail:n?.source==="tail"?n:null,mode:t,navigate:c});const d=(l?.activeAsks??[]).filter(a=>a.status!=="needs_attention"),p=l?.needsAttention??[];if(t==="lanes")return null;const w=s.filter(a=>A(a.state)),C=s.filter(a=>S(a.state)),u=[...s].sort((a,h)=>(h.updatedAt??0)-(a.updatedAt??0)).slice(0,7);return e.jsxs("div",{className:"ctx-panel ctx-panel--ops-inspector",children:[n&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-selected-detail",children:[e.jsx("div",{className:"ctx-panel-section-label",children:n.focus==="flow"?"Message":"Selection"}),e.jsxs("div",{className:"ctx-panel-selected-card",children:[e.jsx("div",{className:"ctx-panel-selected-title",children:n.title}),e.jsx("div",{className:"ctx-panel-selected-meta",children:n.meta}),e.jsx("div",{className:"ctx-panel-selected-body",children:n.body}),n.action&&e.jsx("button",{type:"button",className:"ctx-panel-selected-action",onClick:()=>c(n.action.route),children:n.action.label})]})]}),e.jsxs("section",{className:"ctx-panel-section ctx-panel-ops-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Ops Context"}),e.jsxs("div",{className:"ctx-panel-ops-mode-card",children:[e.jsx("span",{children:"Current"}),e.jsx("strong",{children:P[t]}),e.jsx("small",{children:l?`${v(l.generatedAt)} refresh`:"loading"})]}),e.jsxs("div",{className:"ctx-panel-stat-grid",children:[e.jsx(m,{label:"Needs",value:p.length,tone:p.length>0?"warn":"ok"}),e.jsx(m,{label:"Active",value:d.length}),e.jsx(m,{label:"Online",value:`${C.length}/${s.length}`}),e.jsx(m,{label:"Working",value:w.length})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Queue",p.length>0&&e.jsx("span",{className:"ctx-panel-count",children:p.length})]}),p.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No operator cues"}):e.jsx("div",{className:"ctx-panel-list",children:p.slice(0,5).map(a=>e.jsx(W,{item:a,navigate:c},a.recordId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Runs",d.length>0&&e.jsx("span",{className:"ctx-panel-count",children:d.length})]}),d.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):e.jsx("div",{className:"ctx-panel-list",children:d.slice(0,5).map(a=>e.jsx(z,{ask:a,navigate:c},a.invocationId))})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:["Recent activity",u.length>0&&e.jsx("span",{className:"ctx-panel-count",children:u.length})]}),e.jsx("div",{className:"ctx-panel-pulse-list",children:u.map(a=>e.jsxs("button",{type:"button",className:"ctx-panel-pulse-row",onClick:()=>k(c,a,{returnTo:i}),children:[e.jsx("span",{className:`ctx-panel-pulse-dot ctx-panel-pulse-dot--${I(a.state)}`}),e.jsx("span",{children:a.name}),e.jsxs("small",{children:[O(a.state)," · ",a.updatedAt?v(a.updatedAt):"unknown"]})]},a.id))})]})]})}function R(){if(typeof window>"u")return;const t=window;t.scoutOpsDetailSnapshot=null,window.dispatchEvent(new CustomEvent("scout:ops-detail",{detail:null}))}function D({detail:t,mode:s,navigate:c}){const i=s==="issues"?"Alert detail":"Tail detail",l=t?.copy?.find(n=>n.label==="Copy message")?.value??t?.body??"",r=t?.copy?.find(n=>n.label==="Copy metadata")?.value??t?.metadata?.map(n=>`${n.label}: ${n.value}`).join(`
2
+ `)??"";return e.jsx("div",{className:"ctx-panel ctx-panel--ops-inspector ctx-panel--tail-inspector",children:e.jsxs("section",{className:"ctx-panel-section ctx-panel-tail-detail",children:[e.jsxs("div",{className:"ctx-panel-section-label ctx-panel-tail-detail-label",children:[e.jsx("span",{children:i}),t&&e.jsx("button",{type:"button",className:"ctx-panel-tail-icon-button",onClick:R,"aria-label":"Clear Tail detail",title:"Clear",children:e.jsx(B,{size:13,strokeWidth:2,"aria-hidden":"true"})})]}),t?e.jsxs("div",{className:"ctx-panel-tail-card",children:[e.jsxs("div",{className:"ctx-panel-tail-card-head",children:[e.jsx("div",{className:"ctx-panel-tail-card-title",children:t.title}),e.jsx("div",{className:"ctx-panel-tail-card-meta",children:t.meta})]}),t.metadata&&t.metadata.length>0&&e.jsxs("div",{className:"ctx-panel-tail-copy-scope",children:[e.jsx("dl",{className:"ctx-panel-tail-metadata",children:t.metadata.map(n=>e.jsxs("div",{className:"ctx-panel-tail-metadata-row",children:[e.jsx("dt",{children:n.label}),e.jsx("dd",{title:n.value,children:n.value})]},n.label))}),r&&e.jsx(f,{label:"Copy metadata",value:r})]}),t.action&&e.jsx("div",{className:"ctx-panel-tail-actions",children:e.jsx("button",{type:"button",className:"ctx-panel-tail-action-button",onClick:()=>c(t.action.route),children:t.action.label})}),e.jsxs("div",{className:"ctx-panel-tail-copy-scope ctx-panel-tail-copy-scope--message",children:[e.jsx("div",{className:"ctx-panel-tail-message",children:t.body}),l&&e.jsx(f,{label:"Copy message",value:l})]})]}):e.jsxs("div",{className:"ctx-panel-tail-empty-card",children:[e.jsx("span",{children:"Tail"}),e.jsx("strong",{children:"No log selected"})]})]})})}function f({label:t,value:s}){const[c,i]=o.useState(!1),l=o.useRef(null);o.useEffect(()=>()=>{l.current!=null&&window.clearTimeout(l.current)},[]);const r=o.useCallback(async()=>{await T(s)&&(i(!0),l.current!=null&&window.clearTimeout(l.current),l.current=window.setTimeout(()=>i(!1),1200))},[s]);return e.jsxs("button",{type:"button",className:`ctx-panel-tail-hover-copy${c?" ctx-panel-tail-hover-copy--copied":""}`,onClick:()=>{r()},title:t,children:[c?e.jsx($,{size:13,strokeWidth:2,"aria-hidden":"true"}):e.jsx(L,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:c?"Copied":t})]})}function H({navigate:t}){const[s,c]=o.useState(null),[i,l]=o.useState(null);return o.useEffect(()=>{Promise.allSettled([j("/.host-info"),j("/api/build")]).then(([r,n])=>{r.status==="fulfilled"&&c(r.value),n.status==="fulfilled"&&l(n.value)})},[]),e.jsxs("div",{className:"ctx-panel ctx-panel--ops-inspector ctx-panel--plan-inspector",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-ops-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Host Telemetry"}),e.jsxs("div",{className:"ctx-panel-summary-card",children:[e.jsx("div",{className:"ctx-panel-summary-title",children:s?.nodeName||"Local Host"}),e.jsxs("div",{className:"ctx-panel-summary-kicker",children:["Node: ",s?.nodeId||"local"]}),e.jsxs("div",{className:"ctx-panel-summary-meta",children:[e.jsxs("span",{children:[i?.runtime?.platform||"darwin"," ",i?.runtime?.arch||"arm64"]}),i?.gitBranch&&e.jsxs("span",{children:["branch: ",i.gitBranch]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Host Endpoints"}),e.jsxs("div",{className:"ctx-panel-metric-stack",children:[e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Broker Port"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.ports?.broker??43110})]}),e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Web UI Port"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.ports?.web??43120})]}),e.jsxs("div",{className:"ctx-panel-metric-row",children:[e.jsx("span",{className:"ctx-panel-metric-label",children:"Advertise Scope"}),e.jsx("span",{className:"ctx-panel-metric-value",children:s?.advertiseScope||"mesh"})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Quick Actions"}),e.jsxs("div",{className:"ctx-panel-stack",children:[e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"ops",mode:"mission"}),children:"Mission Control Wall →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"harnesses"}),children:"Agent Providers & Quotas →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"terminal"}),children:"Terminal Relays →"}),e.jsx("button",{type:"button",className:"ctx-panel-action-btn",onClick:()=>t({view:"search"}),children:"Knowledge Search →"})]})]})]})}function m({label:t,value:s,tone:c}){return e.jsxs("div",{className:`ctx-panel-stat${c?` ctx-panel-stat--${c}`:""}`,children:[e.jsx("span",{children:t}),e.jsx("strong",{children:s})]})}function N(t){if(!t||typeof t!="object")return null;const s=t;if(s.focus!=="flow"&&s.focus!=="item"||typeof s.title!="string"||typeof s.meta!="string"||typeof s.body!="string")return null;const c=Array.isArray(s.metadata)?s.metadata.filter(l=>l!=null&&typeof l=="object"&&typeof l.label=="string"&&typeof l.value=="string"):void 0,i=Array.isArray(s.copy)?s.copy.filter(l=>l!=null&&typeof l=="object"&&typeof l.label=="string"&&typeof l.value=="string"):void 0;return{source:s.source==="tail"?"tail":"generic",focus:s.focus,title:s.title,meta:s.meta,body:s.body,metadata:c,copy:i,action:s.action&&typeof s.action=="object"?s.action:null}}function W({item:t,navigate:s}){const{route:c}=b();return e.jsx("button",{type:"button",className:"ctx-panel-item ctx-panel-item--attention",onClick:()=>{t.conversationId?y(s,{view:"conversation",conversationId:t.conversationId},{returnTo:c}):s({view:"ops",mode:"mission"})},children:e.jsxs("div",{className:"ctx-panel-body",children:[e.jsx("span",{className:"ctx-panel-name",children:t.title}),e.jsxs("span",{className:"ctx-panel-sub",children:[t.agentName??t.agentId??"operator"," · ",v(t.updatedAt)]})]})})}function z({ask:t,navigate:s}){const{route:c}=b();return e.jsx("button",{type:"button",className:"ctx-panel-item",onClick:()=>{t.conversationId?y(s,{view:"conversation",conversationId:t.conversationId},{returnTo:c}):s({view:"ops",mode:"mission"})},children:e.jsxs("div",{className:"ctx-panel-body",children:[e.jsx("span",{className:"ctx-panel-name",children:t.task}),e.jsxs("span",{className:"ctx-panel-sub",children:[t.agentName??t.agentId," · ",t.statusLabel]})]})})}export{Ie as OpsInspectorPanel,Ie as OpsRight};
@@ -1 +1 @@
1
- import{r as l}from"./index-DmFAhGPj.js";const d=["input","textarea","select","[contenteditable='']","[contenteditable='true']","[contenteditable='plaintext-only']","[role='combobox']","[role='searchbox']","[role='spinbutton']","[role='textbox']"].join(","),y=[".xterm",".xterm-helper-textarea","[data-scout-terminal-input='true']"].join(",");function m(t){const e=t;if(!e)return!1;const n=typeof e.tagName=="string"?e.tagName.toLowerCase():"";return n==="input"||n==="textarea"||n==="select"||e.isContentEditable===!0||typeof e.closest=="function"&&e.closest(d)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(d)}function x(t){const e=t;return e?typeof e.closest=="function"&&e.closest(y)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(y):!1}function k(t){return(t.metaKey||t.ctrlKey)&&t.shiftKey&&!t.altKey&&t.key.toLowerCase()==="b"}function h(){return!!(document.querySelector(".kb-help-backdrop")||document.querySelector("[data-command-palette-open='true']")||document.querySelector("[role='dialog'][aria-modal='true']"))}function g(t,e,n){return e<=0?-1:t<0?n>0?0:e-1:Math.max(0,Math.min(e-1,t+n))}const f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function w(t=!0){const e=l.useRef(null),n=l.useRef(null);l.useEffect(()=>{if(!t)return;n.current=document.activeElement;const o=e.current;return o?((o.querySelector(f)??o).focus(),()=>{n.current?.focus?.()}):void 0},[t]);const r=l.useCallback(o=>{if(!t||o.key!=="Tab")return;const s=e.current;if(!s)return;const c=Array.from(s.querySelectorAll(f));if(c.length===0){o.preventDefault(),s.focus();return}const u=c[0],a=c[c.length-1],i=document.activeElement;o.shiftKey?(i===u||!s.contains(i))&&(o.preventDefault(),a.focus()):i===a&&(o.preventDefault(),u.focus())},[t]);return{ref:e,onKeyDown:r}}function p(t){return Array.from(t.querySelectorAll([":scope > button:not([disabled])",":scope > [role='button']:not([aria-disabled='true'])",":scope > * > button[data-list-primary]:not([disabled])"].join(", ")))}function b(t,e){t.forEach((n,r)=>{n.tabIndex=r===e?0:-1}),t[e]?.focus()}function S(){return l.useCallback(t=>{const e=t.key==="ArrowDown"||t.key==="j",n=t.key==="ArrowUp"||t.key==="k",r=t.key==="Home"||t.key==="g"&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey,o=t.key==="End"||t.key==="G";if(!e&&!n&&!r&&!o)return;const s=p(t.currentTarget);if(s.length===0)return;const c=document.activeElement,u=s.findIndex(i=>i===c);let a;e?a=u<0?0:Math.min(s.length-1,u+1):n?a=u<0?s.length-1:Math.max(0,u-1):r?a=0:a=s.length-1,t.preventDefault(),b(s,a)},[])}function T(t,e,n){return t||!e&&n?0:-1}function v(){l.useEffect(()=>{const t=e=>{if(e.key!=="["&&e.key!=="]"||m(e.target))return;const n=e.target,r=["left","center","right"],o=e.key==="]"?1:-1,s=r.findIndex(u=>{const a=document.querySelector(`[data-pane="${u}"]`);return a?a.contains(n):!1}),c=s<0?o>0?-1:r.length:s;for(let u=c+o;u>=0&&u<r.length;u+=o){const a=document.querySelector(`[data-pane="${r[u]}"]`);if(!a)continue;const i=a.querySelector(f);if(i){e.preventDefault(),i.focus();return}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[])}function L(t){l.useEffect(()=>{const e=n=>{if(n.key!=="/"||m(n.target))return;const r=t();r&&(n.preventDefault(),r.focus(),r.select())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t])}function A(t){return e=>{if(e.key!=="ArrowDown")return;const n=t();if(!n)return;const r=p(n);if(r.length===0)return;const o=r.findIndex(c=>c.tabIndex===0),s=o>=0?o:0;e.preventDefault(),b(r,s)}}export{S as a,L as b,h as c,v as d,k as e,x as f,m as i,A as m,g as n,T as r,w as u};
1
+ import{r as l}from"./index-CZ-05hKz.js";const d=["input","textarea","select","[contenteditable='']","[contenteditable='true']","[contenteditable='plaintext-only']","[role='combobox']","[role='searchbox']","[role='spinbutton']","[role='textbox']"].join(","),y=[".xterm",".xterm-helper-textarea","[data-scout-terminal-input='true']"].join(",");function m(t){const e=t;if(!e)return!1;const n=typeof e.tagName=="string"?e.tagName.toLowerCase():"";return n==="input"||n==="textarea"||n==="select"||e.isContentEditable===!0||typeof e.closest=="function"&&e.closest(d)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(d)}function x(t){const e=t;return e?typeof e.closest=="function"&&e.closest(y)?!0:typeof e.parentElement?.closest=="function"&&!!e.parentElement.closest(y):!1}function k(t){return(t.metaKey||t.ctrlKey)&&t.shiftKey&&!t.altKey&&t.key.toLowerCase()==="b"}function h(){return!!(document.querySelector(".kb-help-backdrop")||document.querySelector("[data-command-palette-open='true']")||document.querySelector("[role='dialog'][aria-modal='true']"))}function g(t,e,n){return e<=0?-1:t<0?n>0?0:e-1:Math.max(0,Math.min(e-1,t+n))}const f=["a[href]","button:not([disabled])","textarea:not([disabled])","input:not([disabled])","select:not([disabled])","[tabindex]:not([tabindex='-1'])"].join(", ");function w(t=!0){const e=l.useRef(null),n=l.useRef(null);l.useEffect(()=>{if(!t)return;n.current=document.activeElement;const o=e.current;return o?((o.querySelector(f)??o).focus(),()=>{n.current?.focus?.()}):void 0},[t]);const r=l.useCallback(o=>{if(!t||o.key!=="Tab")return;const s=e.current;if(!s)return;const c=Array.from(s.querySelectorAll(f));if(c.length===0){o.preventDefault(),s.focus();return}const u=c[0],a=c[c.length-1],i=document.activeElement;o.shiftKey?(i===u||!s.contains(i))&&(o.preventDefault(),a.focus()):i===a&&(o.preventDefault(),u.focus())},[t]);return{ref:e,onKeyDown:r}}function p(t){return Array.from(t.querySelectorAll([":scope > button:not([disabled])",":scope > [role='button']:not([aria-disabled='true'])",":scope > * > button[data-list-primary]:not([disabled])"].join(", ")))}function b(t,e){t.forEach((n,r)=>{n.tabIndex=r===e?0:-1}),t[e]?.focus()}function S(){return l.useCallback(t=>{const e=t.key==="ArrowDown"||t.key==="j",n=t.key==="ArrowUp"||t.key==="k",r=t.key==="Home"||t.key==="g"&&!t.shiftKey&&!t.metaKey&&!t.ctrlKey,o=t.key==="End"||t.key==="G";if(!e&&!n&&!r&&!o)return;const s=p(t.currentTarget);if(s.length===0)return;const c=document.activeElement,u=s.findIndex(i=>i===c);let a;e?a=u<0?0:Math.min(s.length-1,u+1):n?a=u<0?s.length-1:Math.max(0,u-1):r?a=0:a=s.length-1,t.preventDefault(),b(s,a)},[])}function T(t,e,n){return t||!e&&n?0:-1}function v(){l.useEffect(()=>{const t=e=>{if(e.key!=="["&&e.key!=="]"||m(e.target))return;const n=e.target,r=["left","center","right"],o=e.key==="]"?1:-1,s=r.findIndex(u=>{const a=document.querySelector(`[data-pane="${u}"]`);return a?a.contains(n):!1}),c=s<0?o>0?-1:r.length:s;for(let u=c+o;u>=0&&u<r.length;u+=o){const a=document.querySelector(`[data-pane="${r[u]}"]`);if(!a)continue;const i=a.querySelector(f);if(i){e.preventDefault(),i.focus();return}}};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[])}function L(t){l.useEffect(()=>{const e=n=>{if(n.key!=="/"||m(n.target))return;const r=t();r&&(n.preventDefault(),r.focus(),r.select())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[t])}function A(t){return e=>{if(e.key!=="ArrowDown")return;const n=t();if(!n)return;const r=p(n);if(r.length===0)return;const o=r.findIndex(c=>c.tabIndex===0),s=o>=0?o:0;e.preventDefault(),b(r,s)}}export{S as a,L as b,h as c,v as d,k as e,x as f,m as i,A as m,g as n,T as r,w as u};
@@ -1,4 +1,4 @@
1
- import{n as m,t as T,b as A}from"./time-Dhsh_2EG.js";import{o as p,a as v}from"./tail-display-BRcJltQa.js";const w=2*6e4,_=9e4;function y(e,n=Date.now()){const t=T(e,n);return t==="now"?"now":`${t} ago`}function H(e){return A(e)}function D(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<6e4)return`${Math.max(1,Math.round(e/1e3))}s`;if(e<36e5)return`${Math.max(1,Math.round(e/6e4))}m`;const n=Math.floor(e/36e5),t=Math.round(e%36e5/6e4);return t>0?`${n}h ${t}m`:`${n}h`}function R(e){if(!Number.isFinite(e)||e<w)return null;const n=Math.floor(e/1e3);if(n<3600)return`${Math.floor(n/60)}m gap`;const t=Math.floor(n/3600),s=Math.floor(n%3600/60);return s>0?`${t}h ${s}m gap`:`${t}h gap`}function C(e,n,t,s,o=0){const a=t-s,r=e.map(f=>u(f,n)).filter(f=>f!==null);if(r.length===0)return{eventCount:0,spanMs:0,oldestAt:null,newestAt:null,truncatedBefore:!1,hiddenBeforeCount:o};const i=Math.min(...r),c=Math.max(...r);return{eventCount:e.length,spanMs:Math.max(0,c-i),oldestAt:i,newestAt:c,truncatedBefore:i>a+_,hiddenBeforeCount:o}}function u(e,n){const t=m(e.at);if(t!==null)return t;if(!Number.isFinite(e.t)||e.t<0)return null;const s=m(n);return s===null?null:s+e.t*1e3}function E(e,n,t,s){const o=t-s;return e.filter(a=>{const r=u(a,n);return r===null?!1:r>=o})}function G(e,n,t,s){const o=t-s;return e.reduce((a,r)=>{const i=u(r,n);return i===null||i>=o?a:a+1},0)}const N=50;function q(e,n,t,s=N){const o=S(e,n,t);return!e||!o?o??null:o.events.length>=s||e.events.length<=o.events.length?o:{...e,events:e.events.slice(-s)}}function S(e,n,t){if(!e)return null;const s=e.metadata?.session?.sessionStart,o=E(e.events,s,n,t);if(o.length===e.events.length)return e;const a=n-t,r=e.files.filter(i=>typeof s!="number"||!Number.isFinite(s)||!Number.isFinite(i.lastT)||i.lastT<0?!0:s+i.lastT*1e3>=a);return{...e,events:o,files:r}}const g=180,b=3;function X(e,n=g,t=b){const s=e.replace(/\r\n/g,`
1
+ import{n as m,t as T,b as A}from"./time-Dhsh_2EG.js";import{o as p,a as v}from"./tail-display-DcliDVkW.js";const w=2*6e4,_=9e4;function y(e,n=Date.now()){const t=T(e,n);return t==="now"?"now":`${t} ago`}function H(e){return A(e)}function D(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<6e4)return`${Math.max(1,Math.round(e/1e3))}s`;if(e<36e5)return`${Math.max(1,Math.round(e/6e4))}m`;const n=Math.floor(e/36e5),t=Math.round(e%36e5/6e4);return t>0?`${n}h ${t}m`:`${n}h`}function R(e){if(!Number.isFinite(e)||e<w)return null;const n=Math.floor(e/1e3);if(n<3600)return`${Math.floor(n/60)}m gap`;const t=Math.floor(n/3600),s=Math.floor(n%3600/60);return s>0?`${t}h ${s}m gap`:`${t}h gap`}function C(e,n,t,s,o=0){const a=t-s,r=e.map(f=>u(f,n)).filter(f=>f!==null);if(r.length===0)return{eventCount:0,spanMs:0,oldestAt:null,newestAt:null,truncatedBefore:!1,hiddenBeforeCount:o};const i=Math.min(...r),c=Math.max(...r);return{eventCount:e.length,spanMs:Math.max(0,c-i),oldestAt:i,newestAt:c,truncatedBefore:i>a+_,hiddenBeforeCount:o}}function u(e,n){const t=m(e.at);if(t!==null)return t;if(!Number.isFinite(e.t)||e.t<0)return null;const s=m(n);return s===null?null:s+e.t*1e3}function E(e,n,t,s){const o=t-s;return e.filter(a=>{const r=u(a,n);return r===null?!1:r>=o})}function G(e,n,t,s){const o=t-s;return e.reduce((a,r)=>{const i=u(r,n);return i===null||i>=o?a:a+1},0)}const N=50;function q(e,n,t,s=N){const o=S(e,n,t);return!e||!o?o??null:o.events.length>=s||e.events.length<=o.events.length?o:{...e,events:e.events.slice(-s)}}function S(e,n,t){if(!e)return null;const s=e.metadata?.session?.sessionStart,o=E(e.events,s,n,t);if(o.length===e.events.length)return e;const a=n-t,r=e.files.filter(i=>typeof s!="number"||!Number.isFinite(s)||!Number.isFinite(i.lastT)||i.lastT<0?!0:s+i.lastT*1e3>=a);return{...e,events:o,files:r}}const g=180,b=3;function X(e,n=g,t=b){const s=e.replace(/\r\n/g,`
2
2
  `).trim();if(!s)return"";const o=s.split(`
3
3
  `),a=o.slice(0,t).join(`
4
4
  `);if(a.length<=n&&o.length<=t)return a;const r=a.slice(0,n).trimEnd(),i=Math.max(r.lastIndexOf(" "),r.lastIndexOf(`
@@ -1 +1 @@
1
- import{r as c}from"./index-DmFAhGPj.js";let s=null;const o=new Set;function d(e,t){return e===t?!0:!e||!t?!1:e.live===t.live&&e.harness===t.harness&&e.actionGlyph===t.actionGlyph&&e.actionLabel===t.actionLabel&&e.actionMeta===t.actionMeta&&e.countsLabel===t.countsLabel&&e.strip.length===t.strip.length&&e.strip.every((n,r)=>n===t.strip[r])}function L(e,t){return e.id===t.id&&e.label===t.label&&e.statusLabel===t.statusLabel&&e.tone===t.tone&&e.agentId===t.agentId&&e.updatedAt===t.updatedAt&&d(e.floor,t.floor)}function p(e,t){return e===t?!0:e===null||t===null||e.length!==t.length?!1:e.every((n,r)=>L(n,t[r]))}function E(e){if(!p(s,e)){s=e;for(const t of o)t()}}function g(e){return o.add(e),()=>{o.delete(e)}}function i(){return s}function I(){return c.useSyncExternalStore(g,i,i)}let u=null;const l=new Set;function y(e){if(u!==e){u=e;for(const t of l)t()}}function h(e){return l.add(e),()=>{l.delete(e)}}function a(){return u}function F(){return c.useSyncExternalStore(h,a,a)}let f=null;function v(e){f=e}function R(){return f}export{y as a,F as b,R as g,E as p,v as s,I as u};
1
+ import{r as c}from"./index-CZ-05hKz.js";let s=null;const o=new Set;function d(e,t){return e===t?!0:!e||!t?!1:e.live===t.live&&e.harness===t.harness&&e.actionGlyph===t.actionGlyph&&e.actionLabel===t.actionLabel&&e.actionMeta===t.actionMeta&&e.countsLabel===t.countsLabel&&e.strip.length===t.strip.length&&e.strip.every((n,r)=>n===t.strip[r])}function L(e,t){return e.id===t.id&&e.label===t.label&&e.statusLabel===t.statusLabel&&e.tone===t.tone&&e.agentId===t.agentId&&e.updatedAt===t.updatedAt&&d(e.floor,t.floor)}function p(e,t){return e===t?!0:e===null||t===null||e.length!==t.length?!1:e.every((n,r)=>L(n,t[r]))}function E(e){if(!p(s,e)){s=e;for(const t of o)t()}}function g(e){return o.add(e),()=>{o.delete(e)}}function i(){return s}function I(){return c.useSyncExternalStore(g,i,i)}let u=null;const l=new Set;function y(e){if(u!==e){u=e;for(const t of l)t()}}function h(e){return l.add(e),()=>{l.delete(e)}}function a(){return u}function F(){return c.useSyncExternalStore(h,a,a)}let f=null;function v(e){f=e}function R(){return f}export{y as a,F as b,R as g,E as p,v as s,I as u};
@@ -0,0 +1 @@
1
+ import{c as a}from"./createLucideIcon-DXpqZP7I.js";const e=[["path",{d:"M12.83 2.18a2 2 0 0 0-1.66 0L2.6 6.08a1 1 0 0 0 0 1.83l8.58 3.91a2 2 0 0 0 1.66 0l8.58-3.9a1 1 0 0 0 0-1.83z",key:"zw3jo"}],["path",{d:"M2 12a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 12",key:"1wduqc"}],["path",{d:"M2 17a1 1 0 0 0 .58.91l8.6 3.91a2 2 0 0 0 1.65 0l8.58-3.9A1 1 0 0 0 22 17",key:"kqbvx6"}]],c=a("layers",e);export{c as L};
@@ -0,0 +1 @@
1
+ import{c as t}from"./createLucideIcon-DXpqZP7I.js";const e=[["rect",{width:"7",height:"7",x:"3",y:"3",rx:"1",key:"1g98yp"}],["rect",{width:"7",height:"7",x:"14",y:"3",rx:"1",key:"6d4xhi"}],["rect",{width:"7",height:"7",x:"14",y:"14",rx:"1",key:"nxv5o0"}],["rect",{width:"7",height:"7",x:"3",y:"14",rx:"1",key:"1bb6yr"}]],i=t("layout-grid",e);export{i as L};
@@ -0,0 +1 @@
1
+ import{r as m,j as t}from"./index-CZ-05hKz.js";import{u as re,L as z}from"./chunk-YOZR3KYS-U65yUmqt.js";import{a as le,f as oe,b as ce,c as me,d as de,s as ue}from"./terminal-sessions-BQ6t92tJ.js";import{a as ve,b as pe,r as G,m as he}from"./keyboard-nav-DFhAJkW3.js";import{u as be}from"./Provider-B2xuo3rf.js";import{c as fe}from"./colors-BtO5_zlx.js";import{r as P,c as xe}from"./terminal-relay-9lhzEp2V.js";import{t as ye,a as q,s as je,b as y,P as ge}from"./session-table-PTQVoTyc.js";/* empty css */import{R as ke}from"./refresh-cw-BRn9Oxxl.js";import{A as Ne}from"./activity-Bj3Hnbj3.js";import{C as we}from"./clock-B4PTFi5m.js";import{F as Se}from"./DocumentFocusViewer-DZVhS7as.js";import{L as Ae}from"./layers-CGou-LwV.js";import{C as Ie}from"./chevron-right-CzH-TaSF.js";import{E as U}from"./eye-CpfyvdLq.js";import{T as Ee}from"./terminal-yN9xN-h9.js";import"./createLucideIcon-DXpqZP7I.js";import"./arrow-down-BydciYFZ.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";const Te=[{id:"fleet",label:"Fleet",title:"Group by fleet: herdr, tmux, background"},{id:"places",label:"Places",title:"Group by project"},{id:"time",label:"Time",title:"Group by last activity"},{id:"attention",label:"Attention",title:"Group by attention state: attached, live, detached, exited"}],Ce=[{id:"herdr",label:"Herdr"},{id:"tmux-named",label:"Tmux"},{id:"tmux-auto",label:"Tmux · auto"},{id:"external",label:"Background"}],Re=900*1e3,Me=1440*60*1e3,Le=10080*60*1e3,V=[{key:"now",label:"Now",maxAgeMs:Re},{key:"today",label:"Today",maxAgeMs:Me},{key:"week",label:"This week",maxAgeMs:Le},{key:"older",label:"Older",maxAgeMs:null},{key:"unknown",label:"Unknown",maxAgeMs:null}],$e=[{key:"attached",label:"Attached",rank:3},{key:"live",label:"Live",rank:2},{key:"detached",label:"Detached",rank:1},{key:"exited",label:"Exited",rank:0}];function _e(a){return Ce.map(n=>({key:n.id,label:n.label,items:a.filter(l=>le(l)===n.id)})).filter(n=>n.items.length>0)}function Oe(a){const n=new Map;for(const i of a){const o=n.get(i.project);o?o.push(i):n.set(i.project,[i])}const l=new Set(["backend-only","unscoped"]),r=[...n.entries()].map(([i,o])=>({key:`project:${i}`,label:i,items:o,latestActivity:Math.max(...o.map(d=>q(d)??0)),isCatchAll:l.has(i)}));return r.sort((i,o)=>i.isCatchAll!==o.isCatchAll?i.isCatchAll?1:-1:i.latestActivity!==o.latestActivity?o.latestActivity-i.latestActivity:i.label.localeCompare(o.label,void 0,{numeric:!0,sensitivity:"base"})),r.map(({key:i,label:o,items:d})=>({key:i,label:o,items:d}))}function Fe(a,n){const l=r=>{const i=q(r);if(i===null)return"unknown";const o=Math.max(0,n-i);for(const d of V)if(d.maxAgeMs!==null&&o<d.maxAgeMs)return d.key;return"older"};return V.map(r=>({key:r.key,label:r.label,items:a.filter(i=>l(i)===r.key)})).filter(r=>r.items.length>0)}function Ke(a){return $e.map(n=>({key:n.key,label:n.label,items:a.filter(l=>ye(l)===n.rank)})).filter(n=>n.items.length>0)}function Be(a,n,l=Date.now()){switch(n){case"fleet":return _e(a);case"places":return Oe(a);case"time":return Fe(a,l);case"attention":return Ke(a)}}const De=8e3,We=[{id:"recent",label:"Recent"},{id:"name",label:"A–Z"}],ze={fleet:Ae,places:Se,time:we,attention:Ne};function Bt(){const{route:a,navigate:n,agents:l}=be(),[r,i]=m.useState({state:"loading",sessions:[]}),[o,d]=m.useState(""),[f,Q]=m.useState("recent"),[A,Y]=re("terminal-nav-mode","fleet"),[Z,J]=m.useState(!1),[X,M]=m.useState(null),[L,$]=m.useState(null),_=m.useRef(null),O=m.useRef(null),ee=ve(),te=he(()=>O.current);pe(m.useCallback(()=>_.current,[]));const x=m.useCallback((e={})=>{e.silent||i(s=>({state:"loading",sessions:s.sessions})),oe({includeDiscovered:!0}).then(s=>{i({state:"ready",sessions:s})}).catch(s=>{e.silent||i(c=>({state:"failed",sessions:c.sessions,error:s instanceof Error?s.message:String(s)}))})},[]);m.useEffect(()=>{x()},[x]),m.useEffect(()=>{const e=()=>{document.visibilityState==="visible"&&x({silent:!0})},s=window.setInterval(e,De);return window.addEventListener("focus",e),document.addEventListener("visibilitychange",e),()=>{window.clearInterval(s),window.removeEventListener("focus",e),document.removeEventListener("visibilitychange",e)}},[x]);const k=m.useMemo(()=>ce(r.sessions),[r.sessions]),p=m.useMemo(()=>je(me(k),f==="recent"?{column:"activity",direction:"desc"}:{column:"name",direction:"asc"}),[f,k]),j=m.useMemo(()=>Ge(l,f).filter(e=>{const s=P(e);return s?!k.some(c=>c.surface.backend===s.backend&&c.surface.sessionName===s.sessionName&&(s.paneId==null||c.surface.paneId===s.paneId)):!0}),[l,k,f]),u=o.trim().toLowerCase(),g=u?p.filter(e=>e.searchable.includes(u)):p,N=g.filter(e=>y(e)==="current"),ae=Be(N,A),w=g.filter(e=>y(e)==="inactive"),h=g.filter(e=>y(e)==="review"),F=u?w.length+h.length:p.filter(e=>y(e)!=="current").length,K=u?h.length:p.filter(e=>y(e)==="review").length,S=Z||!!u,v=u?j.filter(e=>Ue(e).includes(u)):j,ne=a.view==="terminal"?a.terminalSurfaceKey??null:null,B=a.view==="terminal"?a.terminalSessionId??null:null,I=e=>de(e.key,ne)&&(!B||e.session.id===B),E=a.view==="terminal"&&a.agentId?`agent:${a.agentId}`:null,D=!!(N.some(I)||S&&[...w,...h].some(I)||E!=null&&v.some(e=>`agent:${e.id}`===E)),W=N[0]?.id??(S?w[0]?.id??h[0]?.id:void 0)??(v[0]?`agent:${v[0].id}`:void 0),se=r.state==="loading"?"Syncing":u?`${g.length+v.length}/${p.length+j.length}`:`${p.length+j.length} targets`,T=(e,s)=>({view:"terminal",terminalSessionId:e.session.id,terminalSurfaceKey:ue(e.surface),...s?{mode:s}:{}}),C=(e,s="takeover")=>({view:"terminal",agentId:e.id,mode:s}),ie=async e=>{if(e.surface.backend==="tmux"&&window.confirm(`Release inactive terminal ${e.surface.sessionName}? The tmux surface will stop, but any associated Scout agent remains available and can be started again.`)){M(e.id),$(null);try{await xe({backend:"tmux",sessionName:e.surface.sessionName,paneId:e.surface.paneId??null,socketDir:e.surface.socketDir??null},"release"),x({silent:!0})}catch(s){$(s instanceof Error?s.message:String(s))}finally{M(null)}}},R=e=>{const s=I(e),c=y(e),b=X===e.id;return t.jsxs("div",{className:`terminal-nav-row${s?" terminal-nav-row--active":""}${c==="review"?" terminal-nav-row--review":""}`,title:e.surface.sessionName,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(s,D,e.id===W),onClick:()=>n(T(e)),children:[t.jsx(Ee,{className:"terminal-nav-row-icon",size:14,strokeWidth:1.7}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.title})}),t.jsx("span",{className:"terminal-nav-row-detail",children:e.detail||e.session.sourceSessionId})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:e.surface.backend}),t.jsx("span",{className:`terminal-nav-badge${c==="review"?" terminal-nav-badge--review":""}`,children:c==="current"?e.condition:c})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"takeover")),title:"Enter this terminal","aria-label":"Enter this terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&s&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(T(e,"observe")),title:"Observe this terminal read-only","aria-label":"Observe this terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]}),c==="review"&&e.surface.backend==="tmux"&&t.jsxs("button",{type:"button",className:"terminal-nav-action terminal-nav-action--release",onClick:()=>{ie(e)},disabled:b,title:"Release this inactive tmux surface; keep the agent","aria-label":"Release this inactive tmux surface; keep the agent",children:[t.jsx(ge,{size:12,strokeWidth:1.8}),t.jsx("span",{children:b?"Releasing":"Release"})]})]})]},e.id)};return t.jsxs("div",{className:"ctx-panel terminal-nav",children:[t.jsxs("div",{className:"terminal-nav-head",children:[t.jsxs("div",{children:[t.jsx("div",{className:"terminal-nav-title",children:"Terminals"}),t.jsx("div",{className:"terminal-nav-summary",children:se})]}),t.jsx("button",{type:"button",className:"terminal-nav-refresh",onClick:()=>x(),disabled:r.state==="loading",title:"Refresh terminals","aria-label":"Refresh terminals",children:t.jsx(ke,{size:14,strokeWidth:1.8})})]}),t.jsx("div",{className:"terminal-nav-modes",role:"group","aria-label":"Group terminals",children:Te.map(e=>{const s=ze[e.id];return t.jsx("button",{type:"button",title:e.title,"aria-label":e.title,"aria-pressed":A===e.id,className:`terminal-nav-mode${A===e.id?" terminal-nav-mode--active":""}`,onClick:()=>Y(e.id),children:t.jsx(s,{size:13,strokeWidth:1.8})},e.id)})}),t.jsxs("div",{className:"ctx-panel-toolbar terminal-nav-toolbar",children:[t.jsx("input",{ref:_,type:"text",className:"ctx-panel-search-input",placeholder:"Search… (/)",value:o,onChange:e=>d(e.target.value),onKeyDown:te}),t.jsx("div",{className:"ctx-panel-sort",role:"group","aria-label":"Sort terminals",children:We.map(e=>t.jsx("button",{type:"button",title:e.id==="recent"?"Sort by most recent":"Sort alphabetically","aria-pressed":f===e.id,className:`ctx-panel-sort-option${f===e.id?" ctx-panel-sort-option--active":""}`,onClick:()=>Q(e.id),children:e.label},e.id))})]}),r.state==="failed"&&t.jsx("div",{className:"terminal-nav-error",children:r.error}),L&&t.jsx("div",{className:"terminal-nav-error",children:L}),t.jsx("div",{ref:O,className:"terminal-nav-list",onKeyDown:ee,children:g.length===0&&v.length===0&&r.state!=="loading"?t.jsx("div",{className:"ctx-panel-empty",children:p.length+j.length===0?"No terminal targets":"No matches"}):t.jsxs(t.Fragment,{children:[ae.map(e=>e.items.length===0?null:t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:e.label}),t.jsx("span",{children:e.items.length})]}),e.items.map(R)]},e.key)),N.length===0&&r.state!=="loading"&&t.jsx("div",{className:"terminal-nav-empty",children:"No sessions"}),F>0&&t.jsxs("div",{className:"terminal-nav-section terminal-nav-section--inactive",children:[t.jsxs("button",{type:"button",className:"terminal-nav-inactive-toggle","aria-expanded":S,onClick:()=>J(e=>!e),children:[t.jsx(Ie,{size:13,strokeWidth:1.8}),t.jsx("span",{children:"Inactive"}),t.jsx("span",{children:F}),K>0&&t.jsxs("span",{className:"terminal-nav-review-count",children:[K," review"]})]}),S&&t.jsxs(t.Fragment,{children:[w.map(R),h.length>0&&t.jsxs("div",{className:"terminal-nav-section-title terminal-nav-section-title--review",children:[t.jsx("span",{children:"Review after 30 days"}),t.jsx("span",{children:h.length})]}),h.map(R)]})]}),t.jsxs("div",{className:"terminal-nav-section",children:[t.jsxs("div",{className:"terminal-nav-section-title",children:[t.jsx("span",{children:"Available agents"}),t.jsx("span",{children:v.length})]}),v.map(e=>{const s=`agent:${e.id}`,c=s===E,b=P(e);return t.jsxs("div",{className:`terminal-nav-row terminal-nav-row--agent${c?" terminal-nav-row--active":""}`,title:e.name,children:[t.jsxs("button",{type:"button","data-list-primary":!0,className:"terminal-nav-row-select",tabIndex:G(c,D,s===W),onClick:()=>n(C(e)),children:[t.jsx("span",{className:`terminal-nav-agent-dot${b?" terminal-nav-agent-dot--bound":""}`,"aria-hidden":!0}),t.jsxs("span",{className:"terminal-nav-row-main",children:[t.jsx("span",{className:"terminal-nav-row-title",children:t.jsx("span",{children:e.name})}),t.jsx("span",{className:"terminal-nav-row-detail",children:Pe(e)})]}),t.jsxs("span",{className:"terminal-nav-badges",children:[t.jsx("span",{className:"terminal-nav-badge terminal-nav-badge--backend",children:b?.backend??e.harness??"agent"}),t.jsx("span",{className:"terminal-nav-badge",children:b?"bound":fe(e.state)})]})]}),t.jsxs("div",{className:"terminal-nav-row-actions",children:[t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="takeover"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"takeover")),title:"Enter this agent terminal","aria-label":"Enter this agent terminal",children:[t.jsx(z,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Enter"})]}),b&&t.jsxs("button",{type:"button",className:`terminal-nav-action${a.view==="terminal"&&c&&a.mode==="observe"?" terminal-nav-action--selected":""}`,onClick:()=>n(C(e,"observe")),title:"Observe this agent terminal read-only","aria-label":"Observe this agent terminal read-only",children:[t.jsx(U,{size:12,strokeWidth:1.8}),t.jsx("span",{children:"Observe"})]})]})]},e.id)}),v.length===0&&t.jsx("div",{className:"terminal-nav-empty",children:"No agents"})]})]})})]})}function Ge(a,n){return[...a].filter(l=>!l.retiredFromFleet&&!l.staleLocalRegistration).sort((l,r)=>{const i=l.name.localeCompare(r.name,void 0,{numeric:!0,sensitivity:"base"});return n==="name"?i||l.id.localeCompare(r.id):(r.updatedAt??0)-(l.updatedAt??0)||i||l.id.localeCompare(r.id)})}function Pe(a){const n=a.project??H(a.cwd)??H(a.projectRoot)??a.definitionId;return[a.handle?`@${a.handle}`:null,a.harness,n,a.branch].filter(Boolean).join(" · ")}function Ue(a){return[a.name,a.handle,a.harness,a.state,a.project,a.branch,a.cwd,a.projectRoot,a.definitionId].filter(Boolean).join(" ").toLowerCase()}function H(a){const n=a?.trim().replace(/\/+$/u,"");return n?n.split("/").pop()||n:null}export{Bt as TerminalLeft};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-CZ-05hKz.js";import{u as o}from"./Provider-B2xuo3rf.js";import{OpsAgentsLeft as i}from"./left-agents-qL5PpUY-.js";import{OpsDefaultLeft as m}from"./left-default-uvuvDmt0.js";import{OpsLanesLeft as p}from"./left-lanes-DnNLgec8.js";import{OpsMissionLeft as s}from"./left-mission-DN3-NLPC.js";import{OpsAdvisorLeft as e}from"./left-advisor-DU3s01gk.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";/* empty css */import"./use-fleet-active-asks-BeAdcl09.js";import"./RailRow-B-GycCBx.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./operator-attention-RqieiSY8.js";import"./openContent-C6XO6kr5.js";import"./agent-lanes-model-AfrjRNK5.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-roster-store-gUBsydNf.js";import"./mission-control-store-Bf4b54MV.js";import"./MissionLeftAgentRow-DN9NcCML.js";import"./page-status-BptpTdQ-.js";import"./server-Dymv5Emh.js";import"./layers-CGou-LwV.js";import"./sparkles-Dy8p5xN8.js";import"./activity-Bj3Hnbj3.js";import"./cpu-BjVis9mc.js";import"./gauge-y-Xg8Mrv.js";import"./terminal-yN9xN-h9.js";function vr(){const{route:t}=o();if(t.view!=="ops")return null;switch(t.mode){case"mission":return r.jsx(s,{});case"agents":return r.jsx(i,{});case"advisor":return r.jsx(e,{});case"lanes":return r.jsx(p,{});default:return r.jsx(m,{})}}export{vr as OpsLeft};
@@ -0,0 +1,2 @@
1
+ import{r,j as e}from"./index-CZ-05hKz.js";/* empty css */import{n as k}from"./colors-BtO5_zlx.js";import{p as C,a as L}from"./api-Co9aQ2Jw.js";import{u as F,m as $,d as D,g as H}from"./Provider-B2xuo3rf.js";import{b as O}from"./router-DJj2WbDg.js";import{d as B,r as G}from"./operator-attention-RqieiSY8.js";import{u as K}from"./sse-CiOSzE5n.js";import{t as f}from"./time-Dhsh_2EG.js";import{o as P}from"./openAgent-Dbv5wfuL.js";import{R as g}from"./RailRow-B-GycCBx.js";import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./openContent-C6XO6kr5.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";const U=new Set(["message.posted","flight.updated","collaboration.event.appended","agent.updated"]),V=4,z=4,X=3,N="/api/fleet",Y=3e4;function Vt({prepend:t}){const{agents:o,agentsLoaded:a,navigate:c,route:n}=F(),[i]=r.useState(()=>C(N,Y)),[l,y]=r.useState(i),[A,T]=r.useState(i!==null),[j,b]=r.useState(()=>new Set),p=O(n),S=r.useMemo(()=>$(o,p),[o,p]),m=r.useMemo(()=>D(o,p),[o,p]),u=r.useMemo(()=>H(l,S),[l,S]),d=r.useCallback(async()=>{try{y(await L(N))}catch{}finally{T(!0)}},[]);r.useEffect(()=>{d()},[d]),K(s=>{U.has(s.kind)&&d()});const w=r.useMemo(()=>Z(m).slice(0,V),[m]),R=r.useMemo(()=>(u?.activity??[]).slice(0,z),[u]),_=r.useMemo(()=>(u?.needsAttention??[]).filter(s=>!j.has(s.recordId)).slice(0,X),[u,j]),M=r.useCallback(async s=>{b(h=>new Set(h).add(s.recordId));try{await B({recordKind:s.kind,recordId:s.recordId,itemUpdatedAt:s.updatedAt})}catch{b(h=>{const I=new Set(h);return I.delete(s.recordId),I});return}d()},[d]);return e.jsxs("div",{className:"ctx-panel base-rail",children:[t?e.jsx("div",{className:"base-rail-prepend",children:t}):null,e.jsx(q,{agents:w,totalCount:m.length,loading:!a,onSelect:s=>P(c,s,{returnTo:n}),onSeeAll:()=>c({view:"agents-v2"})}),e.jsx(Q,{items:R,loading:!A,onSelect:s=>c(tt(s)),onSeeAll:()=>c({view:"activity"})}),e.jsx(W,{items:_,loading:!A,onSelect:s=>c(G(s)),onDismiss:s=>{M(s)}})]})}function q({agents:t,totalCount:o,loading:a,onSelect:c,onSeeAll:n}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Recent agents",onSeeAll:o>0?n:void 0}),a?e.jsx(v,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No agents yet"}):t.map(i=>e.jsx(g,{name:i.name||i.id,meta:i.updatedAt?f(i.updatedAt):void 0,tone:k(i.state),title:J(i),onClick:()=>c(i)},i.id))]})}function J(t){const o=[];return t.project&&o.push(`project: ${t.project}`),t.branch&&o.push(`branch: ${t.branch}`),t.harness&&o.push(`harness: ${t.harness}`),o.join(`
2
+ `)}function Q({items:t,loading:o,onSelect:a,onSeeAll:c}){return e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Recent Scout coordination",meta:(t.length>0,void 0),onSeeAll:t.length>0?c:void 0}),o?e.jsx(v,{}):t.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No recent Scout messages or dispatches"}):t.map(n=>{const i=n.actorName??n.agentName??n.agentId??"system",l=n.title??n.summary??E(n.kind);return e.jsx(g,{name:l,meta:n.ts?f(n.ts):void 0,tone:"neutral",title:`${i} · ${E(n.kind)}`,onClick:()=>a(n)},n.id)})]})}function W({items:t,loading:o,onSelect:a,onDismiss:c}){return!o&&t.length===0?null:e.jsxs("section",{className:"ctx-panel-section base-rail-section",children:[e.jsx(x,{title:"Needs attention",meta:t.length>0?`${t.length}`:void 0}),o?e.jsx(v,{rows:2}):t.map(n=>{const i=n.agentName??n.agentId??"operator";return e.jsx(g,{name:n.title,meta:f(n.updatedAt),tone:"in_turn",unread:!0,title:`${i} · ${n.kind}`,onClick:()=>a(n),actions:e.jsx("button",{type:"button",className:"rr-row-action",title:"Dismiss — stop asking until this changes","aria-label":"Dismiss",onClick:l=>{l.stopPropagation(),c(n)},children:"Dismiss"})},n.recordId)})]})}function v({rows:t=3}){return e.jsx("div",{className:"base-rail-loading",role:"status","aria-label":"Loading",children:Array.from({length:t},(o,a)=>e.jsx("span",{"aria-hidden":"true"},a))})}function x({title:t,meta:o,onSeeAll:a}){return e.jsxs("div",{className:"ctx-panel-section-label base-rail-section-label",children:[e.jsx("span",{children:t}),e.jsxs("span",{className:"base-rail-section-trailing",children:[o?e.jsx("span",{className:"ctx-panel-count",children:o}):null,a?e.jsx("button",{type:"button",className:"base-rail-see-all",onClick:a,children:"all"}):null]})]})}function Z(t){return[...t].sort((o,a)=>(a.updatedAt??0)-(o.updatedAt??0))}function E(t){switch(t){case"message":return"Message";case"invocation":return"Invocation";case"flight":return"Flight update";case"collaboration":return"Collaboration";default:return t.replace(/_/g," ")}}function tt(t){return t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?{view:"agents-v2",agentId:t.agentId}:{view:"activity"}}export{Vt as HomeLeft};
@@ -0,0 +1 @@
1
+ import{r,j as e}from"./index-CZ-05hKz.js";/* empty css */import{d as w,c as S,e as y,f as M,g as A,i as N}from"./NewChatComposer-hlWT-nbR.js";import{u as k,d as b}from"./Provider-B2xuo3rf.js";import{A as I}from"./AgentAvatar-CYhf6twS.js";import{a as g}from"./api-Co9aQ2Jw.js";import{b as C}from"./router-DJj2WbDg.js";import{a as B}from"./sse-CiOSzE5n.js";import{o as P,i as j}from"./surface-activity-B1rgWB1i.js";import"./text-CnZ0e1-V.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./createLucideIcon-DXpqZP7I.js";import"./conversation-model-CwF6Y9gx.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./keyboard-nav-DFhAJkW3.js";import"./x-e3h2hDsp.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./file-text-KijGBnME.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";function W(){const{agents:n,route:d}=k(),m=C(d),l=r.useMemo(()=>b(n,m),[n,m]),[u,h]=r.useState([]),[v,s]=r.useState(null),[a,p]=r.useState(null),c=r.useCallback(async()=>{const[t,i,o]=await Promise.allSettled([g("/api/conversations"),g("/api/fleet"),g("/api/tail/discover")]);t.status==="fulfilled"&&h(t.value),i.status==="fulfilled"&&s(i.value),o.status==="fulfilled"&&p(o.value)},[]);r.useEffect(()=>{c()},[c]),r.useEffect(()=>{const t=()=>{j()&&c()},i=window.setInterval(t,1e4),o=P(t);return()=>{window.clearInterval(i),o()}},[c]),B(()=>!0,()=>{j()&&c()});const x=r.useMemo(()=>{const t=new Map;for(const i of v?.activeAsks??[]){const o=t.get(i.agentId)??[];o.push(i),t.set(i.agentId,o)}return t},[v?.activeAsks]);return{projects:r.useMemo(()=>{const{sessionByAgentId:t}=w(u),i=l.map(f=>S(f,t.get(f.id)??null,x.get(f.id)??[])),o=y(a,Date.now());return M(i,u,o)},[l,u,x,a])}}function ye(){const{route:n,navigate:d,openContextCapture:m}=k(),{projects:l}=W(),u=n.view==="agents-v2"?n.projectSlug:void 0,h=n.view==="agents-v2"?n.agentId:void 0,v=u??l[0]?.slice.slug;return e.jsxs("div",{className:"ctx-panel s-agents-rail",children:[e.jsx("div",{className:"s-agents-recent s-rail-projects",children:l.length===0?e.jsx("div",{className:"ctx-panel-empty",children:"No projects yet"}):l.map(s=>{const a=A(s),p=N(s),c=s.slice.slug===v&&!h;return e.jsxs("button",{type:"button",className:"s-rail-proj","data-selected":c||void 0,"data-live":a>0||void 0,"data-needs":p||void 0,title:s.slice.root??void 0,onClick:()=>d({view:"agents-v2",projectSlug:s.slice.slug}),children:[e.jsx(I,{name:s.slice.title,size:22,tile:!0,presence:!1}),e.jsxs("span",{className:"s-rail-proj-name","data-idle":a===0||void 0,children:[e.jsx("span",{"aria-hidden":!0,style:{opacity:.4},children:"/"}),s.slice.title]}),a>0?e.jsx("span",{className:"s-rail-proj-count","data-needs":p||void 0,title:p?"needs you":void 0,children:a}):null]},s.slice.key)})}),e.jsxs("div",{className:"s-agents-foot s-rail-foot-icons",children:[e.jsx("button",{type:"button",className:"s-rail-icon",title:"Search","aria-label":"Search",onClick:()=>d({view:"search"}),children:e.jsx(E,{})}),e.jsx("button",{type:"button",className:"s-rail-icon",title:"New chat (⌘⌥N)","aria-label":"New chat",onClick:()=>m(),children:e.jsx(L,{})}),e.jsx("button",{type:"button",className:"s-rail-icon s-rail-icon--end",title:"Settings","aria-label":"Settings",onClick:()=>d({view:"settings"}),children:e.jsx(D,{})})]})]})}function E(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.25",stroke:"currentColor",strokeWidth:"1.4"}),e.jsx("path",{d:"M10.5 10.5 14 14",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})]})}function L(){return e.jsx("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:e.jsx("path",{d:"M8 3v10M3 8h10",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round"})})}function D(){return e.jsxs("svg",{width:"15",height:"15",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"8",cy:"8",r:"2.25",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"M8 1.5v1.6M8 12.9v1.6M14.5 8h-1.6M3.1 8H1.5M12.6 3.4l-1.1 1.1M4.5 11.5l-1.1 1.1M12.6 12.6l-1.1-1.1M4.5 4.5 3.4 3.4",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}export{ye as AgentsLeft};
@@ -0,0 +1 @@
1
+ import{j as e,r as y}from"./index-CZ-05hKz.js";import{u as O,g as q,i as P,j as G,k as C,l as H,c as I,r as w}from"./mesh-view-store-BpxGm71b.js";import{u as Q}from"./Provider-B2xuo3rf.js";import{n as b,a as V}from"./colors-BtO5_zlx.js";import{b as D}from"./mesh-buckets-ByyFXdKT.js";import{u as J}from"./use-fleet-active-asks-BeAdcl09.js";import{R as u}from"./RailRow-B-GycCBx.js";import{o as U}from"./openAgent-Dbv5wfuL.js";/* empty css */import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./mesh-roster-n2nDpEmA.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./openContent-C6XO6kr5.js";function W({value:o,onChange:c,placeholder:i="Search…",onKeyDown:l}){return e.jsx("input",{type:"search",className:"fleet-search",placeholder:i,value:o,onChange:h=>c(h.target.value),onKeyDown:l,spellCheck:!1,autoCorrect:"off",autoCapitalize:"off"})}const 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:o,onToggle:c}){return e.jsx("div",{className:"fleet-pills",role:"group","aria-label":"State filters",children:X.map(i=>{const l=o.has(i);return e.jsx("button",{type:"button",className:`fleet-pill fleet-pill--${Z[i]}${l?" fleet-pill--on":""}`,onClick:()=>c(i),"aria-pressed":l,children:Y[i]},i)})})}const T=10;function te(o){return b(o.state)}function _(o){return o.updatedAt??o.createdAt??0}function Ue(){const{agents:o,navigate:c}=Q(),{meshSnapshot:i,selectedId:l,selectedType:h,query:d,agentStateFilters:g,hiddenMachineIds:f,treeFullMachineIds:F}=O(),L=J(),p=y.useMemo(()=>i?D(o,i):[],[o,i]),A=y.useMemo(()=>{const n=d.trim().toLowerCase();return p.filter(s=>!f.has(s.machineId)).map(s=>{const t=s.agents.filter(r=>g.has(te(r))?n?`${r.name??""} ${r.project??""} ${r.branch??""} ${r.harness??""}`.toLowerCase().includes(n):!0:!1);return{...s,agents:t}})},[p,d,g,f]),v=y.useMemo(()=>{const n=new Map([["this",[]],["peer",[]],["tailnet",[]]]);for(const s of A){const t=s.reachability==="this"?"this":s.reachability==="peer"?"peer":"tailnet";n.get(t)?.push(s)}return n},[A]);if(!i)return e.jsx("div",{className:"ctx-panel ctx-panel--empty",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading mesh…"})})});const $=n=>{const s=p.map(t=>t.machineId);H(n,s),I(n,"node"),w(n)},x=f.size,j=p.length,E=n=>{I(n.id,"agent");const s=n.authorityNodeId??n.homeNodeId;s&&w(s),U(c,n,{returnTo:{view:"mesh"}})},k=(n,s)=>s.length===0?null:e.jsxs("section",{className:"mesh-nav-group",children:[e.jsx("div",{className:"mesh-nav-group-label",children:n}),s.map(t=>{const r=F.has(t.machineId),m=[...t.agents].sort((a,S)=>_(S)-_(a)),M=r?m:m.slice(0,T),N=m.length-M.length,B=l===t.machineId&&h==="node",R=t.agents.filter(a=>V(a.state)).length,z=t.agents.length>0?`${R}/${t.agents.length}`:t.online?"—":"not ready";return e.jsxs("div",{className:"mesh-nav-machine",children:[e.jsx(u,{name:t.machineLabel,meta:z,tone:"neutral",active:B,onClick:()=>$(t.machineId),title:`Focus ${t.machineLabel} on the map`}),M.map(a=>{const S=l===a.id&&h==="agent",K=L.has(a.id);return e.jsx(u,{name:a.name,tone:b(a.state),depth:1,active:S,unread:K,onClick:()=>E(a),title:a.name},a.id)}),!r&&N>0&&e.jsx(u,{name:`see ${N} more`,depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show all agents on this machine"}),r&&m.length>T&&e.jsx(u,{name:"see less",depth:1,tone:"neutral",onClick:()=>C(t.machineId),title:"Show recent agents only"})]},t.machineId)})]},n);return e.jsxs("div",{className:"ctx-panel mesh-nav",children:[e.jsxs("div",{className:"mesh-nav-head",children:[e.jsx(W,{value:d,onChange:q,placeholder:"Find machines or agents…"}),e.jsx(ee,{active:g,onToggle:P}),x>0&&x<j&&e.jsxs("button",{type:"button",className:"mesh-nav-focus-chip",onClick:G,title:"Show all machines",children:[e.jsxs("span",{className:"mesh-nav-focus-chip-label",children:["focused · ",j-x,"/",j]}),e.jsx("span",{className:"mesh-nav-focus-chip-clear","aria-hidden":!0,children:"×"})]})]}),e.jsxs("div",{className:"mesh-nav-tree",children:[k("this host",v.get("this")??[]),k("peers",v.get("peer")??[]),k("tailnet",v.get("tailnet")??[])]})]})}export{Ue as MeshLeft};
@@ -0,0 +1 @@
1
+ import{r as N,j as e}from"./index-CZ-05hKz.js";import{a as I}from"./api-Co9aQ2Jw.js";import{b as L,c as j,s as R}from"./router-DJj2WbDg.js";import{u as $,r as y,s as b,i as C}from"./mesh-ops-CvGyjK84.js";import{u as E,s as T}from"./mesh-view-store-BpxGm71b.js";import{u as A}from"./Provider-B2xuo3rf.js";import{R as h}from"./RailRow-B-GycCBx.js";import{u as U}from"./use-mesh-ops-items-BIvIHlqe.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";function S(s){return s.hostName?.split(".")[0]??s.name??s.id.slice(0,12)}function It(){const{route:s,navigate:u}=A(),l=L(s),{items:i,unattributedOnly:c,lab:M,refreshToken:g}=$(),{meshSnapshot:r}=E();U(l);const[w]=N.useState(()=>y());N.useEffect(()=>{let t=!1;return I("/api/mesh").then(o=>{t||T(o)}).catch(()=>{}),()=>{t=!0}},[g]);const m=t=>{b(!1),u(t?R(s,t):j(s))},O=()=>{u(j(s)),b(!0)},p=r?.localNode??null,d=r?Object.values(r.nodes).filter(t=>t.id!==p?.id):[],a=t=>M.lastLook?t.filter(o=>C(o,w)).length:0,x=i.filter(t=>t.hostNodeId===null),f=t=>{const o=i.filter(k=>k.hostNodeId===t.id),n=a(o),v=l===t.id;return e.jsx(h,{name:S(t),meta:o.length>0?`${n>0?`${n}·`:""}${o.length}`:"—",tone:n>0?"needs_attention":"neutral",active:v,unread:n>0,onClick:()=>m(v?null:t.id),title:`Scope the list to ${S(t)}`},t.id)};return e.jsxs("div",{className:"ctx-panel mesh-ops-rail",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),e.jsx(h,{name:"everywhere",meta:`${a(i)>0?`${a(i)}·`:""}${i.length}`,tone:a(i)>0?"needs_attention":"neutral",active:l===null&&!c,onClick:()=>m(null),title:"Show items across all hosts"})]}),p&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"This host"}),f(p)]}),d.length>0&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Peers"}),d.map(t=>f(t))]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"No venue"}),e.jsx(h,{name:"unattributed",meta:x.length>0?String(x.length):"—",tone:"neutral",active:c,onClick:()=>c?m(null):O(),title:"Items with no venue host"})]}),!r&&e.jsx("div",{className:"ctx-panel-empty",children:"Loading mesh…"})]})}export{It as MeshOpsLeft};
@@ -0,0 +1 @@
1
+ .terminal-nav-head{flex:none;display:flex;align-items:center;justify-content:space-between;gap:var(--space-md);padding:var(--space-lg);border-bottom:1px solid color-mix(in srgb,var(--border) 32%,transparent)}.terminal-nav-title{font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.terminal-nav-summary{margin-top:var(--space-3xs);font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-sm);color:var(--muted);text-transform:uppercase}.terminal-nav-refresh{width:28px;height:28px;display:inline-flex;align-items:center;justify-content:center;flex:none;border:1px solid color-mix(in srgb,var(--border) 48%,transparent);border-radius:var(--radius-sm);background:transparent;color:var(--muted);cursor:pointer}.terminal-nav-refresh:hover:not(:disabled){border-color:color-mix(in srgb,var(--ink) 18%,transparent);color:var(--ink);background:color-mix(in srgb,var(--ink) 5%,transparent)}.terminal-nav-refresh:disabled{cursor:progress;opacity:.55}.terminal-nav-toolbar{padding:var(--space-md) var(--space-lg)}.terminal-nav-modes{flex:none;display:flex;gap:1px;margin:var(--space-sm) var(--space-lg) 0;padding:var(--space-3xs);background:color-mix(in srgb,var(--ink) 4%,transparent);border:1px solid color-mix(in srgb,var(--border) 40%,transparent);border-radius:var(--radius-md)}.terminal-nav-mode{flex:1;display:inline-flex;align-items:center;justify-content:center;padding:var(--space-2xs, 3px) 0;border:none;background:transparent;color:var(--muted);border-radius:var(--radius-sm);cursor:pointer;transition:background .1s,color .1s}.terminal-nav-mode:hover{color:var(--ink)}.terminal-nav-mode--active{background:color-mix(in srgb,var(--accent) 16%,transparent);color:var(--accent)}.terminal-nav-error{flex:none;padding:0 var(--space-lg) var(--space-sm);font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--red)}.terminal-nav-list{flex:1;min-height:0;overflow-y:auto;padding:var(--space-xs) 0 var(--space-lg)}.terminal-nav-section{padding:var(--space-xs) 0 var(--space-sm)}.terminal-nav-section+.terminal-nav-section{border-top:1px solid color-mix(in srgb,var(--ink) 7%,transparent);padding-top:var(--space-md)}.terminal-nav-section-title{display:flex;align-items:center;justify-content:space-between;gap:var(--space-sm);padding:var(--space-xs) var(--space-lg) var(--space-sm);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;color:var(--dim)}.terminal-nav-section-title span:last-child{color:var(--muted);letter-spacing:var(--tracking-sm)}.terminal-nav-section-title--review{padding-top:var(--space-md);color:color-mix(in srgb,var(--red) 76%,var(--dim))}.terminal-nav-inactive-toggle{width:100%;min-height:34px;display:grid;grid-template-columns:16px minmax(0,1fr) auto auto;align-items:center;gap:var(--space-xs);padding:var(--space-xs) var(--space-lg);border:0;background:transparent;color:var(--dim);cursor:pointer;font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-lg);text-align:left;text-transform:uppercase}.terminal-nav-inactive-toggle:hover,.terminal-nav-inactive-toggle:focus-visible{background:color-mix(in srgb,var(--ink) 5%,transparent);color:var(--muted)}.terminal-nav-inactive-toggle:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.terminal-nav-inactive-toggle svg{transition:transform .12s ease}.terminal-nav-inactive-toggle[aria-expanded=true] svg{transform:rotate(90deg)}.terminal-nav-review-count{color:color-mix(in srgb,var(--red) 68%,var(--dim));letter-spacing:var(--tracking-sm)}.terminal-nav-empty{padding:var(--space-md) var(--space-lg);font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-md);text-transform:uppercase;color:var(--dim)}.terminal-nav-row{width:100%;position:relative;border-left:2px solid transparent;border-bottom:1px solid color-mix(in srgb,var(--ink) 5%,transparent);background:transparent}.terminal-nav-row:hover,.terminal-nav-row:focus-within{background:color-mix(in srgb,var(--ink) 5%,transparent)}.terminal-nav-row--active{border-left-color:var(--accent);background:color-mix(in srgb,var(--accent) 8%,transparent)}.terminal-nav-row-select{width:100%;min-height:48px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:var(--space-sm);padding:var(--space-xs) var(--space-lg);border:0;background:transparent;color:var(--muted);cursor:pointer;text-align:left;font-family:inherit}.terminal-nav-row:hover .terminal-nav-row-select,.terminal-nav-row:focus-within .terminal-nav-row-select,.terminal-nav-row--active .terminal-nav-row-select{padding-right:calc(var(--space-lg) + 56px)}.terminal-nav-row--review:hover .terminal-nav-row-select,.terminal-nav-row--review:focus-within .terminal-nav-row-select,.terminal-nav-row--review.terminal-nav-row--active .terminal-nav-row-select{padding-right:calc(var(--space-lg) + 84px)}.terminal-nav-row-select:focus-visible,.terminal-nav-action:focus-visible{outline:1px solid var(--accent);outline-offset:-1px}.terminal-nav-row-icon{color:color-mix(in srgb,var(--ink) 44%,transparent)}.terminal-nav-agent-dot{width:10px;height:10px;justify-self:center;border:1px solid color-mix(in srgb,var(--ink) 26%,transparent);border-radius:999px;background:color-mix(in srgb,var(--ink) 10%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--ink) 4%,transparent)}.terminal-nav-agent-dot--bound{border-color:color-mix(in srgb,var(--accent) 46%,transparent);background:color-mix(in srgb,var(--accent) 62%,transparent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 9%,transparent)}.terminal-nav-row-main{min-width:0;display:grid;gap:1px}.terminal-nav-row-title{min-width:0;display:flex;align-items:center;gap:var(--space-sm);font-family:var(--font-mono);font-size:var(--text-sm);font-weight:500;color:var(--muted)}.terminal-nav-row--active .terminal-nav-row-title{color:var(--ink)}.terminal-nav-row-title span:last-child,.terminal-nav-row-detail{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.terminal-nav-row-detail{font-family:var(--font-mono);font-size:var(--text-2xs);color:var(--dim);letter-spacing:var(--tracking-sm)}.terminal-nav-badges{flex:none;display:inline-flex;align-items:center;gap:var(--space-3xs);max-width:128px;overflow:hidden;transition:opacity .12s ease}.terminal-nav-badge{min-width:0;max-width:78px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;padding:1px var(--space-2xs);border:1px solid color-mix(in srgb,var(--border) 42%,transparent);border-radius:var(--radius-sm);font-family:var(--font-mono);font-size:var(--text-2xs);letter-spacing:var(--tracking-sm);color:color-mix(in srgb,var(--ink) 48%,transparent);text-transform:uppercase}.terminal-nav-badge--backend{max-width:48px;color:color-mix(in srgb,var(--ink) 60%,transparent)}.terminal-nav-badge--review{border-color:color-mix(in srgb,var(--red) 28%,transparent);color:color-mix(in srgb,var(--red) 76%,var(--muted))}.terminal-nav-row-actions{position:absolute;top:50%;right:var(--space-lg);display:flex;align-items:center;gap:var(--space-3xs);transform:translateY(-50%);opacity:0;visibility:hidden;pointer-events:none;transition:opacity .12s ease,visibility .12s ease}.terminal-nav-row:hover .terminal-nav-row-actions,.terminal-nav-row:focus-within .terminal-nav-row-actions,.terminal-nav-row--active .terminal-nav-row-actions{opacity:1;visibility:visible;pointer-events:auto}.terminal-nav-row:hover .terminal-nav-badges,.terminal-nav-row:focus-within .terminal-nav-badges,.terminal-nav-row--active .terminal-nav-badges{width:0;max-width:0;gap:0;opacity:0;visibility:hidden}.terminal-nav-action{min-width:0;width:24px;height:24px;display:inline-flex;align-items:center;justify-content:center;border:1px solid color-mix(in srgb,var(--border) 48%,transparent);border-radius:var(--radius-sm);background:color-mix(in srgb,var(--ink) 3%,transparent);color:color-mix(in srgb,var(--ink) 62%,transparent);cursor:pointer}.terminal-nav-action span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.terminal-nav-action:hover{border-color:color-mix(in srgb,var(--ink) 20%,transparent);background:color-mix(in srgb,var(--ink) 7%,transparent);color:var(--ink)}.terminal-nav-action:disabled{cursor:progress;opacity:.5}.terminal-nav-action--release:hover:not(:disabled){border-color:color-mix(in srgb,var(--red) 36%,transparent);background:color-mix(in srgb,var(--red) 10%,transparent);color:var(--red)}.terminal-nav-action--selected{border-color:color-mix(in srgb,var(--accent) 36%,transparent);background:color-mix(in srgb,var(--accent) 10%,transparent);color:var(--ink)}
@@ -0,0 +1 @@
1
+ .fleet-search{width:100%;padding:var(--space-xs) var(--space-md);font-family:var(--font-mono);font-size:var(--text-sm);color:var(--ink);background:color-mix(in srgb,var(--ink) 4%,transparent);border:1px solid color-mix(in srgb,var(--border) 50%,transparent);border-radius:var(--radius-sm);outline:0;transition:border-color .12s,background .12s}.fleet-search::placeholder{color:color-mix(in srgb,var(--ink) 35%,transparent)}.fleet-search:focus{border-color:color-mix(in srgb,var(--accent) 55%,transparent);background:color-mix(in srgb,var(--ink) 3%,transparent)}.fleet-pills{display:flex;gap:var(--space-2xs)}.fleet-pill{flex:1 1 0;padding:var(--space-2xs) var(--space-xs);border:1px solid color-mix(in srgb,var(--border) 45%,transparent);background:transparent;color:color-mix(in srgb,var(--ink) 40%,transparent);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;cursor:pointer;border-radius:var(--radius-sm);transition:background .12s,color .12s,border-color .12s}.fleet-pill:hover{color:var(--ink);border-color:color-mix(in srgb,var(--border) 70%,transparent)}.fleet-pill--on{color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent);border-color:color-mix(in srgb,var(--border) 70%,transparent)}.fleet-pill--on.fleet-pill--active,.fleet-pill--on.fleet-pill--working{color:var(--accent);border-color:color-mix(in srgb,var(--accent) 38%,transparent)}.mesh-nav{display:flex;flex-direction:column;height:100%;min-height:0;padding:0;background:transparent;font-family:var(--font-mono)}.mesh-nav-head{display:flex;flex-direction:column;gap:var(--space-sm);padding:var(--space-md) var(--space-md) var(--space-sm);border-bottom:1px solid color-mix(in srgb,var(--border) 35%,transparent)}.mesh-nav-focus-chip{display:inline-flex;align-items:center;gap:var(--space-xs);align-self:flex-start;padding:var(--space-2xs) var(--space-sm);border-radius:var(--radius-sm);border:1px solid color-mix(in srgb,var(--border) 55%,transparent);background:color-mix(in srgb,var(--accent) 14%,transparent);color:var(--ink);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:600;letter-spacing:var(--tracking-xl);text-transform:uppercase;cursor:pointer}.mesh-nav-focus-chip:hover{background:color-mix(in srgb,var(--accent) 22%,transparent)}.mesh-nav-focus-chip-clear{font-size:var(--text-md);line-height:var(--leading-none);opacity:.7}.mesh-nav-tree{flex:1 1 auto;min-height:0;overflow-y:auto;padding:var(--space-2xs) 0 var(--space-sm)}.mesh-nav-group{display:flex;flex-direction:column}.mesh-nav-group+.mesh-nav-group{margin-top:var(--space-xs)}.mesh-nav-group-label{padding:var(--space-sm) var(--space-lg) var(--space-2xs);font-family:var(--font-mono);font-size:var(--text-2xs);font-weight:700;letter-spacing:var(--tracking-xl);text-transform:uppercase;color:color-mix(in srgb,var(--ink) 38%,transparent)}.mesh-nav-machine{display:flex;flex-direction:column}.mesh-nav-machine+.mesh-nav-machine{margin-top:var(--space-3xs)}.mesh-nav-minimap{flex:0 0 auto;border-top:1px solid color-mix(in srgb,var(--border) 35%,transparent);padding:var(--space-sm);max-height:50%;display:flex;flex-direction:column}.mesh-nav-minimap .mesh-rail{flex:1 1 auto;min-height:0}
@@ -0,0 +1 @@
1
+ import{r as a,j as s}from"./index-CZ-05hKz.js";/* empty css */import{a as r}from"./api-Co9aQ2Jw.js";import{u as h}from"./sse-CiOSzE5n.js";import{u as v}from"./Provider-B2xuo3rf.js";import{S as u}from"./server-Dymv5Emh.js";import{L as j}from"./layers-CGou-LwV.js";import{S as b}from"./sparkles-Dy8p5xN8.js";import{A as N}from"./activity-Bj3Hnbj3.js";import{C as f}from"./cpu-BjVis9mc.js";import{G as g,D as k}from"./gauge-y-Xg8Mrv.js";import{T as y}from"./terminal-yN9xN-h9.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";function vs(){const{agents:l,navigate:t}=v(),[m,p]=a.useState(null),[n,x]=a.useState([]),i=a.useCallback(async()=>{const[e,o]=await Promise.allSettled([r("/api/tail/discover"),r("/api/service-budgets")]);e.status==="fulfilled"&&p(e.value),o.status==="fulfilled"&&o.value?.gauges&&x(o.value.gauges)},[]);a.useEffect(()=>{i()},[i]),h(()=>{i()});const d=m?.processes??[],c=n.length>0?Math.round(Math.max(...n.map(e=>e.fill??0))*100):100;return s.jsxs("div",{className:"s-advisor-left-nav",children:[s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(u,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"HOST TELEMETRY"})]}),s.jsxs("div",{className:"s-ctx-stat-list",children:[s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Agents Connected"}),s.jsx("span",{className:"chip chip--sm chip--mono",children:l.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Active Processes"}),s.jsx("span",{className:"chip chip--sm chip--working chip--mono",children:d.length})]}),s.jsxs("div",{className:"s-ctx-stat-item",children:[s.jsx("span",{className:"label-xs s-ctx-stat-label",children:"Peak Quota"}),s.jsxs("span",{className:`chip chip--sm chip--mono ${c>80?"chip--warning":"chip--working"}`,children:[c,"%"]})]})]})]}),s.jsxs("div",{className:"s-ctx-panel-section",children:[s.jsxs("div",{className:"s-ctx-panel-head",children:[s.jsx(j,{size:14,className:"s-ctx-icon"}),s.jsx("span",{className:"label-xs",children:"OPERATIONS SURFACES"})]}),s.jsxs("div",{className:"s-ctx-nav-list",children:[s.jsxs("button",{type:"button",className:"s-ctx-nav-btn s-ctx-nav-btn--active",onClick:()=>t({view:"ops",mode:"advisor"}),children:[s.jsx(b,{size:13}),s.jsx("span",{children:"Host Advisor"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"mission"}),children:[s.jsx(N,{size:13}),s.jsx("span",{children:"Mission Control"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"ops",mode:"lanes"}),children:[s.jsx(f,{size:13}),s.jsx("span",{children:"Agent Lanes"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"harnesses"}),children:[s.jsx(g,{size:13}),s.jsx("span",{children:"Agent Providers & Quotas"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"terminal"}),children:[s.jsx(y,{size:13}),s.jsx("span",{children:"Terminal Relays"})]}),s.jsxs("button",{type:"button",className:"s-ctx-nav-btn",onClick:()=>t({view:"search"}),children:[s.jsx(k,{size:13}),s.jsx("span",{children:"Knowledge Indexer"})]})]})]})]})}export{vs as OpsAdvisorLeft};
@@ -0,0 +1 @@
1
+ import{r,j as o}from"./index-CZ-05hKz.js";/* empty css */import{a as j}from"./api-Co9aQ2Jw.js";import{a as v}from"./sse-CiOSzE5n.js";import{u as N}from"./Provider-B2xuo3rf.js";import{u as g}from"./use-fleet-active-asks-BeAdcl09.js";import{i as w}from"./colors-BtO5_zlx.js";import{R as a}from"./RailRow-B-GycCBx.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";const $=new Set(["message.posted","conversation.upserted","agent.updated"]);function k(t){const n=x(t.cwd),m=x(t.projectRoot);return t.authorityNodeName??t.homeNodeName??t.authorityNodeId??t.homeNodeId??t.transport??n??m??"local"}function R(t){return t.project??t.role??t.agentClass??"Unassigned"}function x(t){if(!t)return null;const n=t.split("/").filter(Boolean);return n[n.length-1]??null}function de(){const{agents:t,navigate:n}=N(),[m,f]=r.useState([]),p=g(),c=r.useCallback(async()=>{const e=await j("/api/conversations").catch(()=>[]);f(e)},[]);r.useEffect(()=>{c()},[c]),v(e=>$.has(e.kind),()=>{c()});const h=r.useMemo(()=>t.filter(e=>w(e.state)).length,[t]),l=r.useMemo(()=>{let e=0;for(const s of p.values())(s.status==="failed"||s.status==="needs_attention")&&(e+=1);return e},[p]),u=r.useMemo(()=>{const e=new Map;for(const s of t){const i=R(s);e.set(i,(e.get(i)??0)+1)}return[...e.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[t]),d=r.useMemo(()=>{const e=new Map;for(const s of t){const i=k(s);e.set(i,(e.get(i)??0)+1)}return[...e.entries()].sort((s,i)=>i[1]-s[1]).slice(0,8)},[t]);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:`${t.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(([e,s])=>o.jsx(a,{name:e,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${e}`},e))]}),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(([e,s])=>o.jsx(a,{name:e,meta:`${s}`,tone:"neutral",title:`${s} agent${s===1?"":"s"} on ${e}`},e))]})]})}export{de as OpsAgentsLeft};
@@ -0,0 +1 @@
1
+ import{r,j as o}from"./index-CZ-05hKz.js";/* empty css */import{a as h}from"./api-Co9aQ2Jw.js";import{n as f}from"./colors-BtO5_zlx.js";import{r as g,a as j}from"./operator-attention-RqieiSY8.js";import{u as N}from"./sse-CiOSzE5n.js";import{t as c}from"./time-Dhsh_2EG.js";import{u as A}from"./Provider-B2xuo3rf.js";import{o as l}from"./openContent-C6XO6kr5.js";import{R as m}from"./RailRow-B-GycCBx.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";const w=[{name:"Control",route:{view:"ops",mode:"mission"},active:e=>e.view==="ops"&&(e.mode===void 0||e.mode==="mission")},{name:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{name:"Mesh",route:{view:"mesh"},active:e=>e.view==="mesh"},{name:"Tail",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{name:"Runtime",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop"}];function dt(){const{navigate:e,route:n}=A(),[p,d]=r.useState(null),s=r.useCallback(async()=>{const t=await h("/api/fleet").catch(()=>null);d(t)},[]);r.useEffect(()=>{s()},[s]),N(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&s()});const i=p?.needsAttention??[],a=(p?.activeAsks??[]).filter(t=>t.status!=="needs_attention"),u=t=>{l(e,g(t),{returnTo:n})},v=t=>{l(e,j(t),{returnTo:n})};return o.jsxs("div",{className:"ctx-panel ctx-panel--ops",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Surfaces"}),w.map(t=>o.jsx(m,{name:t.name,tone:"neutral",active:t.active(n),onClick:()=>e(t.route)},t.name))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Needs you",i.length>0&&o.jsx("span",{className:"ctx-panel-count",children:i.length})]}),i.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"All clear"}):i.slice(0,4).map(t=>{const x=t.agentName??t.agentId??"operator";return o.jsx(m,{name:t.title,meta:c(t.updatedAt),tone:"in_turn",unread:!0,title:`${x} · ${t.kind}`,onClick:()=>u(t)},t.recordId)})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Active",a.length>0&&o.jsx("span",{className:"ctx-panel-count",children:a.length})]}),a.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):a.slice(0,10).map(t=>o.jsx(m,{name:t.task,meta:c(t.updatedAt),tone:f(t.agentState),title:`${t.agentName??t.agentId} · ${t.statusLabel}`,onClick:()=>v(t)},t.invocationId))]})]})}export{dt as OpsDefaultLeft};
@@ -0,0 +1 @@
1
+ import{r as f,j as t}from"./index-CZ-05hKz.js";/* empty css */import{t as x}from"./time-Dhsh_2EG.js";import{u as b}from"./Provider-B2xuo3rf.js";import{R as g}from"./RailRow-B-GycCBx.js";import{S as v}from"./SpriteAvatar-Bs68ZENy.js";import{n as L}from"./colors-BtO5_zlx.js";import{b as h,c as j,l as n,d as N}from"./agent-lanes-model-AfrjRNK5.js";import{u as _,b as A,g as p}from"./lane-roster-store-gUBsydNf.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./AgentAvatar-CYhf6twS.js";import"./CrewAvatar-CTIuxp4G.js";import"./context-budget-DX_fwUs3.js";import"./lane-observe-vfyACHi0.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";function c(s,e,a){const i=`[data-lane-id="${s.replace(/["\\]/g,"\\$&")}"]`,r=typeof document<"u"?document.querySelector(i):null;if(r){r.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),r.focus();return}e&&a({view:"agents-v2",agentId:e,tab:"profile"})}function R(s){return s.filter(e=>!h(e)&&j(e)).sort((e,a)=>{const i=(a.updatedAt??0)-(e.updatedAt??0);return i!==0?i:n(e,"scout").localeCompare(n(a,"scout"))}).map(e=>({id:e.id,label:n(e,"scout"),statusLabel:N(e,"scout"),tone:L(e.state,e),agentId:e.id,updatedAt:e.updatedAt??void 0}))}function ho(){const{agents:s,navigate:e}=b(),a=_(),i=A(),r=f.useMemo(()=>R(s),[s]),l=a??r,d=l.some(o=>o.floor);return t.jsx("div",{className:"ctx-panel ctx-panel--ops",children:t.jsxs("section",{className:"ctx-panel-section",children:[t.jsxs("div",{className:"ctx-panel-section-label",children:[d?"Fleet":"Lanes",l.length>0&&t.jsx("span",{className:"ctx-panel-count",children:l.length})]}),l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No active lanes"}):l.map(o=>o.floor?t.jsxs("button",{type:"button",className:`agent-floor__ledger-row is-rail${i===o.id?" is-focus":""}`,onClick:()=>{const m=p();m?m.onSelect(o.id):c(o.id,o.agentId,e)},onPointerEnter:()=>p()?.onHover(o.id),onPointerLeave:()=>p()?.onHover(null),children:[t.jsxs("span",{className:"agent-floor__ledger-id",children:[t.jsx(v,{name:o.label,size:16,tile:!0}),t.jsx("span",{className:"agent-floor__ledger-name",children:o.label}),t.jsx("span",{className:`agent-floor__card-dot${o.floor.live?" is-live":""}`})]}),t.jsx("span",{className:"agent-floor__ledger-strip",children:o.floor.strip.slice(-6).map((m,u)=>t.jsx("span",{className:`agent-floor__ledger-cell is-${m}`},u))})]},o.id):t.jsx(g,{name:o.label,sub:o.statusLabel||void 0,meta:o.updatedAt?x(o.updatedAt):void 0,tone:o.tone,title:o.statusLabel,onClick:()=>c(o.id,o.agentId,e)},o.id))]})})}export{ho as OpsLanesLeft};
@@ -0,0 +1 @@
1
+ import{r as c,j as s}from"./index-CZ-05hKz.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-Bf4b54MV.js";import{u as K}from"./Provider-B2xuo3rf.js";import{a as T,b as q,r as B,m as D}from"./keyboard-nav-DFhAJkW3.js";import{MissionLeftAgentRow as L}from"./MissionLeftAgentRow-DN9NcCML.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./time-Dhsh_2EG.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./page-status-BptpTdQ-.js";import"./RailRow-B-GycCBx.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";function we(){const{navigate:r}=K(),i=M(),o=i.visibleAgents,m=c.useRef(null),p=c.useRef(null),v=T(),x=D(()=>m.current);q(c.useCallback(()=>p.current,[]));const[d,y]=c.useState(null),u=i.activityFilter==="active",a=i.selectedIds.length,j=e=>{y(t=>t===e?null:e)},N=()=>{if(a===0)return;const t=o.filter(l=>i.selectedIds.includes(l.id)).map(l=>l.handle??l.name).filter(Boolean).join("|");t&&r({view:"ops",mode:"tail",tailQuery:t})};return s.jsxs("div",{className:"ctx-panel ml-panel",children:[s.jsxs("div",{className:"ml-section",children:[s.jsx("div",{className:"ml-section-label",children:"Source"}),s.jsx("div",{className:"ml-chips ml-chips--primary",children:["all","scout","native"].map(e=>s.jsx("button",{type:"button",className:["ml-chip",i.sourceFilter===e&&"ml-chip--active"].filter(Boolean).join(" "),onClick:()=>A(e),children:e==="all"?"All":e==="scout"?"Scout":"Native"},e))})]}),s.jsx("div",{className:"ctx-panel-search",children:s.jsx("input",{ref:p,type:"text",className:"ctx-panel-search-input",placeholder:"Filter agents… (press /)",value:i.query,onChange:e=>h(e.target.value),onKeyDown:e=>{x(e),e.key==="Escape"&&i.query&&h("")}})}),s.jsx("div",{className:"ml-section ml-section--secondary",children:s.jsxs("div",{className:"ml-chips ml-chips--secondary",children:[["active","live","all"].map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityFilter===e&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>I(e),children:e==="active"?"Active":e==="live"?"Live":"Any"},e)),u&&s.jsx("span",{className:"ml-divider","aria-hidden":!0}),u&&C.map(e=>s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",i.activityWindowMs===e.value&&"ml-chip--ghost-active"].filter(Boolean).join(" "),onClick:()=>k(e.value),children:e.label},e.value))]})}),s.jsxs("div",{className:"ml-section ml-section--grouping",children:[s.jsx("div",{className:"ml-section-label",children:"Order by"}),s.jsx("div",{className:"ml-chips ml-chips--grouping",children:[["activity","Activity"],["workspace","Project"],["harness","Harness"],["state","Status"],["source","Source"]].map(([e,t])=>s.jsx("button",{type:"button",className:["ml-chip","ml-chip--group",i.groupMode===e&&"ml-chip--group-active"].filter(Boolean).join(" "),"aria-pressed":i.groupMode===e,onClick:()=>w(e),children:t},e))})]}),a>0?s.jsxs("div",{className:"ml-selection",children:[s.jsxs("span",{className:"ml-selection-label",children:[a," selected"]}),s.jsxs("div",{className:"ml-selection-actions",children:[s.jsx("button",{type:"button",className:"ml-selection-btn ml-selection-btn--primary",onClick:N,children:"Tail ↗"}),s.jsx("button",{type:"button",className:"ml-selection-btn",onClick:F,children:"Clear"})]})]}):s.jsxs("div",{className:"ml-count",children:[o.length," visible",s.jsx("span",{className:"ml-count-hint",children:"⌘-click · ⌘A all"})]}),s.jsx("div",{ref:m,className:"ctx-panel-list ctx-panel-list--scroll",onKeyDown:v,children:o.length===0?s.jsx("div",{className:"ctx-panel-empty",children:i.query?"No match":"Nothing visible"}):o.map((e,t)=>{const l=e.id===d,b=o.some(n=>n.id===d),g=i.selectedIds.includes(e.id),f=S(e.state);return s.jsx(L,{agent:e,state:f,isExpanded:l,isSelected:g,tabIndex:B(l,b,t===0),onToggle:n=>{n.metaKey||n.ctrlKey||n.shiftKey?E(e.id):j(e.id)},onReveal:()=>R(e.id),onOpen:()=>r({view:"agents-v2",agentId:e.id})},e.id)})})]})}export{we as OpsMissionLeft};
@@ -0,0 +1,2 @@
1
+ import{r as h,j as i}from"./index-CZ-05hKz.js";/* empty css */import{u as Ge,m as _e,e as De,a as Ve,i as Fe}from"./Provider-B2xuo3rf.js";import{a as Ke,b as qe,m as He,r as Qe}from"./keyboard-nav-DFhAJkW3.js";import{n as ce,g as we}from"./colors-BtO5_zlx.js";import{b as We,a as N,d as je,e as le,i as Me,g as Ye}from"./conversation-model-CwF6Y9gx.js";import{l as ze,i as $,a as M,p as ye,t as Je,b as Xe}from"./conversation-prefs-DNre-Lcx.js";import{i as Ze,l as et,s as tt}from"./sessionRead-CvFz2RHv.js";import{t as ae}from"./time-Dhsh_2EG.js";import{u as nt}from"./use-conversation-list-D9BNLfnW.js";import{u as ot}from"./use-fleet-active-asks-BeAdcl09.js";import{b as st}from"./router-DJj2WbDg.js";import{c as Ne}from"./message-visibility-DwxgcgYK.js";import{R as $e}from"./RailRow-B-GycCBx.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./index-BVlMw8x_.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./AgentAvatar-CYhf6twS.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";function Y(e){const n=e.split("/").filter(Boolean);return n[n.length-1]??e}function Le(e){const n=e.replace(/\/+$/,"").split("/");return n[n.length-1]??e}function it(e,n){const o=Y(n).toLowerCase(),r=e.filter(p=>!!p.projectRoot),c=r.filter(p=>Le(p.projectRoot).toLowerCase()===o),d=c.length>0?c:r,s=at(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 at(e){const n=new Map;for(const d of e){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 Ce(e,n,o,r){const c=new Map;for(const s of e){const f=We(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),Ze(s.lastMessageAt,s.id,o)&&(j.unreadCount+=1),!f&&p){const g=ce(p.state);we(g)<we(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=it(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 rt=12;function rn(){const{route:e,navigate:n,agents:o,apiConnection:r}=Ge(),{sessions:c,loading:d,loadError:s,reload:f}=nt(),[p,w]=h.useState(()=>et()),[u,C]=h.useState(()=>ze()),[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=ot(),H=st(e),O=h.useMemo(()=>_e(o,H),[o,H]),I=h.useMemo(()=>{const t=new Map,a=O?o.filter(v=>O.has(v.id)):o;for(const v of a)t.set(v.id,v);return t},[o,O]),T=e.view==="messages"||e.view==="conversation"||e.view==="agent-info"||e.view==="agents-v2"?e.conversationId:void 0;h.useEffect(()=>{L(!1)},[m]);const G=h.useMemo(()=>De(c,O,H),[c,O,H]),X=h.useMemo(()=>m?G.filter(t=>ke(t,m)):G,[G,m]),_=h.useMemo(()=>{const t=a=>(a.agentId?k.get(a.agentId)?.updatedAt:void 0)??0;return G.filter(a=>$(a.id,u)||!je(a)?!1:(a.agentId?k.get(a.agentId):void 0)?.status==="needs_attention").sort((a,v)=>t(v)-t(a))},[G,u,k]),D=h.useMemo(()=>m?_.filter(t=>ke(t,m)):_,[_,m]),x=h.useMemo(()=>{const t=X.filter(A=>!$(A.id,u)),a=W(X.filter(A=>$(A.id,u))),v=t.filter(A=>M(A.id,u)).sort((A,xe)=>ye(xe.id,u)-ye(A.id,u)||(xe.lastMessageAt??0)-(A.lastMessageAt??0)),K=t.filter(A=>!M(A.id,u)),ie=K.filter(le),be=K.filter(je),Oe=K.filter(Me);return{pinned:v,channels:W(ie),agents:Ce(W(be),I,p),observed:Ce(W(Oe),I,p),archived:a}},[X,I,p,u]),de=Ve(),V=h.useCallback(t=>{C(a=>Je(t,a))},[]),F=h.useCallback(t=>{C(a=>Xe(t,a))},[]),S=h.useCallback(t=>{w(tt(t.id)),n({view:"messages",conversationId:t.id})},[n]),P=h.useCallback((t,a)=>{const v=M(a.id,u),K=$(a.id,u),ie=N(a);de(t,[{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(ie).catch(()=>{})}}])},[u,S,V,F,de]),ue=t=>{g(a=>{const v=new Set(a);return v.has(t)?v.delete(t):v.add(t),v})},Pe=r.status==="offline"||Fe(s),pe=h.useRef(null),me=h.useRef(null),Ue=Ke(),Be=He(()=>pe.current);qe(h.useCallback(()=>me.current,[]));const Z=x.pinned.length,ee=x.channels.length,te=x.agents.reduce((t,a)=>t+a.conversations.length,0),ne=x.observed.reduce((t,a)=>t+a.conversations.length,0),Q=x.archived.length,he=Z+ee+te+ne+Q,Ee=b||!!m,oe=h.useMemo(()=>{const t=[];for(const a of D)t.push({rowId:`ny-${a.id}`,id:a.id});for(const a of x.pinned)t.push({rowId:`pin-${a.id}`,id:a.id});for(const a of x.agents)for(const v of a.conversations)t.push({rowId:v.id,id:v.id});for(const a of x.channels)t.push({rowId:a.id,id:a.id});for(const a of x.observed)for(const v of a.conversations)t.push({rowId:v.id,id:v.id});for(const a of x.archived)t.push({rowId:`arch-${a.id}`,id:a.id});return t},[D,x]),U=h.useMemo(()=>({activeId:T,activeRowId:T?oe.find(t=>t.id===T)?.rowId:void 0,firstRowId:oe[0]?.rowId}),[T,oe]),ve=R||m?x.observed:x.observed.slice(0,rt),fe=Math.max(0,x.observed.length-ve.length),ge=t=>!!(m||j.has(t.key)||T&&t.conversations.some(a=>a.id===T)),se=t=>i.jsx(re,{pinned:M(t.id,u),archived:$(t.id,u),onTogglePin:()=>V(t.id),onToggleArchive:()=>F(t.id)});return i.jsxs("div",{className:"ctx-panel",children:[i.jsxs("div",{className:"ctx-panel-toolbar",children:[i.jsx("input",{ref:me,type:"text",className:"ctx-panel-search-input",placeholder:"Filter… (/)",value:m,onChange:t=>y(t.target.value),onKeyDown:Be}),_.length>0&&i.jsx("span",{className:"ctx-panel-rail-stat",title:"Asks waiting on your reply",children:lt(_.length)})]}),i.jsx("div",{ref:pe,className:["ctx-panel-list","ctx-panel-list--scroll",he===0&&"ctx-panel-list--empty"].filter(Boolean).join(" "),onKeyDown:Ue,children:he===0?i.jsx(ct,{query:m,loading:d,error:s,apiOffline:Pe,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(t=>i.jsx(E,{rowId:`ny-${t.id}`,session:t,nav:U,agentById:I,asksByAgent:k,onSelect:S,onContextMenu:P},`ny-${t.id}`))}),Z>0&&i.jsx(B,{label:"Pinned",count:Z,hint:"Pinned conversations",children:x.pinned.map(t=>i.jsx(E,{rowId:`pin-${t.id}`,session:t,nav:U,agentById:I,asksByAgent:k,pinned:!0,actions:se(t),onSelect:S,onContextMenu:P},`pin-${t.id}`))}),te>0&&i.jsx(B,{label:"Agents",count:te,children:x.agents.map(t=>i.jsx(Ae,{group:t,isOpen:ge(t),nav:U,agentById:I,asksByAgent:k,prefs:u,onToggle:()=>ue(t.key),onSelect:S,onTogglePin:V,onToggleArchive:F,onContextMenu:P},t.key))}),ee>0&&i.jsx(B,{label:"Channels",count:ee,children:x.channels.map(t=>i.jsx(E,{rowId:t.id,session:t,nav:U,agentById:I,asksByAgent:k,actions:se(t),onSelect:S,onContextMenu:P},t.id))}),ne>0&&i.jsxs(B,{label:"Observed",count:ne,hint:"Agent conversations you’re not in",open:Ee,onToggle:()=>l(t=>!t),children:[ve.map(t=>i.jsx(Ae,{group:t,isOpen:ge(t),nav:U,agentById:I,asksByAgent:k,prefs:u,observed:!0,onToggle:()=>ue(t.key),onSelect:S,onTogglePin:V,onToggleArchive:F,onContextMenu:P},t.key)),fe>0?i.jsxs("button",{type:"button",className:"ctx-panel-more",onClick:()=>L(!0),children:["+ ",fe," 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(t=>!t),children:q?"▾ hide archived":`› show ${Q} archived`}),q?x.archived.map(t=>i.jsx(E,{rowId:`arch-${t.id}`,session:t,nav:U,agentById:I,asksByAgent:k,actions:se(t),onSelect:S,onContextMenu:P},`arch-${t.id}`)):null]})]})})]})}function B({label:e,count:n,hint:o,open:r,onToggle:c,children:d}){return c?i.jsxs("section",{className:"ctx-panel-rail-section","aria-label":e,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?"▾":"▸"}),e]}),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":e,children:[i.jsxs("div",{className:"ctx-panel-section-label",title:o,children:[i.jsx("span",{children:e}),i.jsx("span",{className:"ctx-panel-count",children:n})]}),i.jsx("div",{className:"ctx-panel-rail-section-body",children:d})]})}function re({pinned:e,archived:n,onTogglePin:o,onToggleArchive:r}){return i.jsxs(i.Fragment,{children:[i.jsx("button",{type:"button",className:["rr-row-action",e&&"rr-row-action--on"].filter(Boolean).join(" "),title:e?"Unpin":"Pin to top","aria-label":e?"Unpin":"Pin",onClick:c=>{c.stopPropagation(),o()},children:e?"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:e,rowId:n,nav:o,agentById:r,asksByAgent:c,pinned:d,depth:s,actions:f,worktreeLabel:p,onSelect:w,onContextMenu:u}){const C=e.id===o.activeId,m=N(e),y=le(e),j=Me(e),g=e.agentId?r.get(e.agentId):void 0,b=e.agentId?c.get(e.agentId):void 0,l=!y&&!j&&b?.status==="needs_attention",R=Re(e,g),L=y?`${e.participantCount??e.participantIds.length} members`:R.toLowerCase()===m.toLowerCase()?void 0:R,q=!y&&b?pt(e,g,b):L;return i.jsx($e,{depth:s,name:s===1?Ie(e,g,b):m,sub:s===1?Re(e,g):q,meta:b?ae(b.updatedAt):e.lastMessageAt?ae(e.lastMessageAt):void 0,tone:y?"channel":b?ut(g,b):g?ce(g.state):"dm",agent:y?void 0:g,avatarName:s===1?g?.name??Ie(e,g,b):m,avatarKind:y?"channel":"user",active:C,unread:l,pinned:d,activityLabel:b?Te(b):void 0,activityTone:b?dt(b):void 0,worktreeLabel:p??void 0,title:s===1?mt(e,g,b):void 0,actions:f,tabIndex:Qe(n===o.activeRowId,o.activeRowId!==void 0,n===o.firstRowId),onClick:()=>w(e),onContextMenu:u?J=>u(J,e):void 0})}function Ae({group:e,isOpen:n,nav:o,agentById:r,asksByAgent:c,prefs:d,observed:s,onToggle:f,onSelect:p,onTogglePin:w,onToggleArchive:u,onContextMenu:C}){if(e.conversations.length===1){const l=e.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(re,{pinned:M(l.id,d),archived:$(l.id,d),onTogglePin:()=>w(l.id),onToggleArchive:()=>u(l.id)}),onSelect:p,onContextMenu:C})}const m=e.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=e.conversations.some(l=>l.id===o.activeId);return i.jsxs("div",{children:[i.jsx($e,{name:e.label,meta:y>0?`${y} active · ${Se(e)}`:Se(e),tone:j>0?"in_turn":e.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&&e.conversations.map(l=>{const R=l.agentId?r.get(l.agentId):void 0,L=e.canonicalRoot&&R?.projectRoot&&R.projectRoot!==e.canonicalRoot?Le(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(re,{pinned:M(l.id,d),archived:$(l.id,d),onTogglePin:()=>w(l.id),onToggleArchive:()=>u(l.id)}),onSelect:p,onContextMenu:C},l.id)})]},e.key)}function ct({query:e,loading:n,error:o,apiOffline:r,onRetry:c}){const d=e.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 ke(e,n){const o=n.toLowerCase();return N(e).toLowerCase().includes(o)||e.id.toLowerCase().includes(o)||(e.preview??"").toLowerCase().includes(o)||(e.agentName??"").toLowerCase().includes(o)}function lt(e){return e===1?"1 needs a reply":`${e} need a reply`}function Te(e){return e.status==="queued"?"Starting":e.status==="working"?"Working":e.status==="needs_attention"?"Needs you":e.statusLabel||e.status}function dt(e){return e.status==="queued"?"pending":e.status==="needs_attention"?"attention":"working"}function ut(e,n){return n.status==="working"?"in_turn":e?ce(e.state):"dm"}function pt(e,n,o){const r=Te(o),c=z(o.task)??z(o.summary)??z(e.preview)??e.currentBranch??n?.branch??"";return c?`${r} · ${c}`:r}function W(e){return[...e].sort((n,o)=>(o.lastMessageAt??0)-(n.lastMessageAt??0))}function Ie(e,n,o){const r=o?.task??z(e.preview)??e.currentBranch??n?.branch??"",c=n?.name??e.agentName??N(e);return r?`${c} · ${r}`:c}function mt(e,n,o){const r=[];return o&&r.push(`task: ${o.task}`),e.preview&&r.push(`preview: ${Ne(e.preview)}`),(e.currentBranch??n?.branch)&&r.push(`branch: ${e.currentBranch??n?.branch}`),n?.harness&&r.push(`harness: ${n.harness}`),r.length>0?r.join(`
2
+ `):void 0}function Re(e,n){if(le(e))return Ye(e);const o=n?.handle?.trim().replace(/^@+/,"");return o||(e.agentId?e.agentId.split(".")[0]??e.agentId:N(e))}function z(e){if(!e)return null;const n=Ne(e).replace(/\s+/g," ").trim();return n?n.length>60?`${n.slice(0,57)}…`:n:null}function Se(e){const n=e.latestUpdate?ae(e.latestUpdate):"",o=`${e.conversations.length}`;return n?`${o} · ${n}`:o}export{rn as ChatLeft};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./index-CZ-05hKz.js";/* empty css */import{t as O}from"./time-Dhsh_2EG.js";import{u as H,a as $}from"./Provider-B2xuo3rf.js";import{S as G}from"./SpriteAvatar-Bs68ZENy.js";import{H as R}from"./HarnessMark-D5CA5uSp.js";import{AgentSessions as J}from"./AgentSessions-CsZwoukw.js";import{a as T}from"./api-Co9aQ2Jw.js";import{g as q,p as V,b as _}from"./agents-project-model-UYiamtrU.js";import{c as Q,e as X,f as Y,g as Z}from"./NewChatComposer-hlWT-nbR.js";import"./router-DJj2WbDg.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CiOSzE5n.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";const ee=30*6e4,D=a=>a==="pi"?"grok":a,K=a=>a?a.replace(/^claude-/,"").replace(/-\d{8}$/,""):null;function qe({agents:a,fleet:d,sessionByAgentId:c,sessions:A,discovery:k,loading:C,navigate:x,selectedAgentId:S}){const{route:N,reload:p,openContextCapture:u}=H(),m=N.view==="agents-v2"?N.projectSlug:void 0,v=l.useMemo(()=>{const n=new Map;for(const b of d?.activeAsks??[]){const i=n.get(b.agentId)??[];i.push(b),n.set(b.agentId,i)}return n},[d?.activeAsks]),f=l.useMemo(()=>a.map(n=>Q(n,c.get(n.id)??null,v.get(n.id)??[])),[v,a,c]),g=l.useMemo(()=>X(k,Date.now()),[k]),h=l.useMemo(()=>Y(f,A,g),[f,A,g]),w=l.useMemo(()=>h.find(n=>n.slice.slug===m)??h[0]??null,[h,m]),r=w?.slice.slug,M={selectAgent:n=>x({view:"agents-v2",agentId:n.agent.id,...r?{projectSlug:r}:{}}),openAgentPage:n=>x({view:"agents-v2",agentId:n.agent.id,tab:"profile"}),startSession:n=>u({intent:"new-task",projectPath:n.agent.projectRoot??n.agent.cwd??void 0}),openSession:n=>x(n),configureAgent:n=>x({view:"agents-v2",agentId:n.agent.id,tab:"config"}),restartAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/config`,{method:"POST",body:JSON.stringify({restart:!0})}).catch(()=>{})},stopAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/interrupt`,{method:"POST",body:JSON.stringify({})}).catch(()=>{})},archiveAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/archive`,{method:"POST",body:JSON.stringify({archived:!0})}).then(()=>p()).catch(()=>{})}};return!w&&C?e.jsx("div",{className:"s-aproj","aria-busy":"true",children:e.jsx("div",{className:"ap-loading",role:"status","aria-label":"Loading agents",children:Array.from({length:7},(n,b)=>e.jsx("span",{"aria-hidden":"true"},b))})}):w?e.jsx("div",{className:"s-aproj",children:e.jsx(te,{project:w,selectedAgentId:S,gestures:M,sessions:A})}):e.jsx("div",{className:"s-aproj",children:e.jsx("div",{className:"ap-empty",children:"No agents discovered yet — they appear here as harnesses register and work."})})}function se(){return e.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.2",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"m10.5 10.5 3 3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function ae({tone:a}){return a==="idle"?null:e.jsx("span",{className:"ap-dot","data-tone":a,"aria-hidden":!0})}function ne({g:a,gestures:d,sessions:c,selected:A,cursor:k,rowRef:C}){const x=$(),S=Date.now()-a.lastActivityAt<ee,N=a.needs?"needs":S?"live":"idle",p=a.nodes[0];if(!p)return null;const u=p.row.agent.handle?.trim()||a.name,m=a.branches.length>0?a.branches:["main"],v=m.length>1,f=v?`${m.length} branches`:m[0],g=[...new Set(a.nodes.map(r=>r.row.agent.model).filter(r=>!!r))],h=g.length>1,w=[{kind:"action",label:"Configure…",onSelect:()=>d.configureAgent(p.row)},{kind:"action",label:"Restart",onSelect:()=>d.restartAgent(p.row)},{kind:"separator"},{kind:"action",label:"Stop",onSelect:()=>d.stopAgent(p.row)},{kind:"action",label:"Archive",onSelect:()=>d.archiveAgent(p.row)}];return e.jsxs("div",{ref:C,tabIndex:-1,className:"ap-row","data-tone":N,"data-selected":A||void 0,"data-cursor":k||void 0,children:[e.jsxs("div",{className:"ap-rowMain",onClick:()=>d.selectAgent(p.row),children:[e.jsxs("div",{className:"ap-rowBody",children:[e.jsxs("div",{className:"ap-rowTop",children:[e.jsx(ae,{tone:N}),e.jsxs("span",{className:"ap-rowName","data-idle":N==="idle"||void 0,children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),u]}),e.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:e.jsx(R,{harness:D(a.harness),size:11})}),a.needs?e.jsx("span",{className:"ap-needsWord",children:"needs you"}):N==="live"?e.jsx("span",{className:"ap-rowState",children:"working"}):null]}),e.jsxs("div",{className:"ap-rowMeta",children:[e.jsx("span",{className:"ap-rowBranch","data-dim":!0,title:v?m.join(" · "):void 0,children:f}),h?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",title:g.join(" · "),children:[g.length," models"]})]}):null,a.sessionCount?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",children:[a.sessionCount," session",a.sessionCount===1?"":"s"]})]}):null]})]}),e.jsxs("div",{className:"ap-rowTailWrap",children:[e.jsxs("div",{className:"ap-rowTail",children:[e.jsxs("div",{className:"ap-tailMeta","aria-hidden":N==="needs"||void 0,children:[e.jsx("span",{className:"ap-rowAgo",children:a.lastActivityAt?O(a.lastActivityAt):"—"}),!h&&K(a.model)?e.jsx("span",{className:"ap-rowModel",children:K(a.model)}):null]}),e.jsxs("div",{className:"ap-rowActions",children:[e.jsx("button",{type:"button",className:"ap-act ap-actPrimary",onClick:r=>{r.stopPropagation(),d.openAgentPage(p.row)},children:"Open ↗"}),e.jsx("button",{type:"button",className:"ap-act",onClick:r=>{r.stopPropagation(),d.startSession(p.row)},children:"+ Session"})]})]}),e.jsx("button",{type:"button",className:"ap-rowMore","aria-label":"Agent actions",title:"Configure · restart · stop",onClick:r=>{r.stopPropagation(),x(r,w)},children:"⋯"})]})]}),e.jsx(J,{agentIds:a.nodes.map(r=>r.row.agent.id),sessions:c})]})}function te({project:a,selectedAgentId:d,gestures:c,sessions:A}){const[k,C]=l.useState(""),[x,S]=l.useState(null),[N,p]=l.useState(!1),[u,m]=l.useState(-1),v=l.useRef(null),f=l.useRef(new Map),g=l.useMemo(()=>q(a),[a]),{primary:h,ephemeral:w}=l.useMemo(()=>V(g),[g]),r=l.useMemo(()=>_(a),[a]),M=l.useMemo(()=>[...new Set(h.map(s=>D(s.harness)))],[h]),n=k.trim().toLowerCase(),b=s=>(!x||D(s.harness)===x)&&(!n||s.name.toLowerCase().includes(n)||s.branches.some(t=>t.toLowerCase().includes(n))||s.harness.includes(n)),i=h.filter(b),I=w.filter(b),E=!!(n||x),o=i.find(s=>s.needs)??i[0],U=i.some(s=>s.needs),B=h.length<=1;Z(a);const W=g.reduce((s,t)=>s+t.sessionCount,0),z=s=>!!(d&&s.nodes.some(t=>t.row.agent.id===d));return l.useEffect(()=>{function s(t){const y=document.activeElement,L=!!y&&(y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable);if(t.key.toLowerCase()==="k"&&(t.metaKey||t.ctrlKey)||t.key==="/"&&!L){t.preventDefault(),v.current?.focus(),v.current?.select();return}if(t.key==="Escape"){L&&y?.blur();return}if(L)return;const F=i.length;if(F){if(t.key==="ArrowDown"||t.key==="j")t.preventDefault(),m(j=>j<0?0:Math.min(F-1,j+1));else if(t.key==="ArrowUp"||t.key==="k")t.preventDefault(),m(j=>j<0?0:Math.max(0,j-1));else if(t.key==="Enter"&&(t.metaKey||t.ctrlKey)){const j=i.find(P=>P.needs)??i[0];j&&(t.preventDefault(),m(i.indexOf(j)),c.selectAgent(j.nodes[0].row))}else if(t.key==="Enter"){const j=u<0?0:u,P=i[j];P&&(t.preventDefault(),m(j),c.selectAgent(P.nodes[0].row))}}}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[i,u,c]),l.useEffect(()=>{if(!(u<0)){if(u>=i.length){m(i.length-1);return}f.current.get(i[u]?.name??"")?.scrollIntoView({block:"nearest"})}},[u,i]),e.jsx("div",{className:"ap-view",children:e.jsxs("div",{className:"ap-content",children:[e.jsxs("header",{className:"ap-head",children:[e.jsx(G,{name:a.slice.title,size:56,tile:!0}),e.jsxs("div",{className:"ap-headIdent",children:[e.jsx("div",{className:"ap-headTop",children:e.jsxs("h1",{className:"ap-headName",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"/"}),a.slice.title]})}),a.slice.root?e.jsx("span",{className:"ap-headRoot",children:a.slice.root}):null]}),e.jsx("div",{className:"ap-headActions",children:e.jsx("button",{type:"button",className:"ap-headCta",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent"})})]}),e.jsxs("div",{className:"ap-digest",children:[e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:h.length}),e.jsx("span",{className:"ap-statLbl",children:h.length===1?"agent":"agents"})]}),e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:W}),e.jsx("span",{className:"ap-statLbl",children:W===1?"session":"sessions"})]}),r.length>0?e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:r.length}),e.jsx("span",{className:"ap-statLbl",children:"in flight"})]}):null,e.jsx("span",{className:"ap-statMarks",children:M.map(s=>e.jsx("span",{title:s,"aria-hidden":!0,children:e.jsx(R,{harness:s,size:12})},s))})]}),o&&!E&&!B?e.jsxs("div",{className:"ap-resume","data-tone":o.needs?"needs":"live","aria-live":"polite",children:[e.jsx("span",{className:"ap-dot","data-tone":o.needs?"needs":"live","aria-hidden":!0}),e.jsx("span",{className:"ap-resumeLbl",children:o.needs?"Waiting on you":"Most recent"}),e.jsxs("span",{className:"ap-resumeWho",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),o.nodes[0].row.agent.handle?.trim()||o.name]}),e.jsxs("span",{className:"ap-resumeMeta",children:[o.branches[0]??"main"," · ",o.lastActivityAt?O(o.lastActivityAt):"—"]}),e.jsxs("span",{className:"ap-resumeActions",children:[e.jsx("button",{type:"button",className:"ap-linkAccent",onClick:()=>c.selectAgent(o.nodes[0].row),children:o.needs?"Continue":"Resume"}),e.jsx("button",{type:"button",className:"ap-link",onClick:()=>c.openAgentPage(o.nodes[0].row),children:"Open ↗"})]})]}):null,B?null:e.jsxs("div",{className:"ap-find",children:[e.jsx("span",{className:"ap-findIco","aria-hidden":!0,children:e.jsx(se,{})}),e.jsx("input",{ref:v,className:"ap-findInput",placeholder:"Find an agent, branch, or harness… (⌘K)",value:k,onChange:s=>C(s.target.value)}),e.jsx("div",{className:"ap-findFilters",children:M.map(s=>e.jsxs("button",{type:"button",className:"ap-filter","data-on":x===s||void 0,onClick:()=>S(t=>t===s?null:s),children:[e.jsx(R,{harness:s,size:11}),s.charAt(0).toUpperCase()+s.slice(1)]},s))})]}),e.jsxs("div",{className:"ap-main",children:[e.jsxs("div",{className:"ap-sectionHead",children:[e.jsx("span",{className:"ap-sectionTitle",children:"Agents"}),e.jsxs("span",{className:"ap-sectionMeta",children:[i.length," shown",E?" · filtered":""]}),e.jsxs("span",{className:"ap-kbdHint","aria-hidden":!0,children:["↑↓ move · ↵ open",U?" · ⌘↵ needs":""]})]}),e.jsxs("div",{className:"ap-roster",children:[i.map((s,t)=>e.jsx(ne,{g:s,gestures:c,sessions:A,selected:z(s),cursor:u===t,rowRef:y=>{y?f.current.set(s.name,y):f.current.delete(s.name)}},s.name)),i.length===0?e.jsx("div",{className:"ap-empty",children:E?"No agents match.":I.length?"No primary agents — workflow & clone agents are in the fold below.":"No agents in this project yet."}):null]}),I.length?e.jsxs("div",{className:"ap-ephBlock",children:[e.jsxs("button",{type:"button",className:"ap-ephToggle",onClick:()=>p(s=>!s),children:[e.jsx("span",{className:"ap-ephCount",children:I.length})," ephemeral · workflow & clone agents",e.jsx("span",{className:"ap-ephCaret",children:N?"▴":"▾"})]}),N?e.jsx("div",{className:"ap-ephList",children:I.map(s=>e.jsxs("button",{type:"button",className:"ap-ephRow",onClick:()=>c.openAgentPage(s.nodes[0].row),children:[e.jsx("span",{className:"ap-ephMark","aria-hidden":!0,children:e.jsx(R,{harness:D(s.harness),size:10})}),e.jsx("span",{className:"ap-ephName",children:s.name}),e.jsx("span",{className:"ap-ephBranch",children:s.branches[0]??"main"}),e.jsx("span",{className:"ap-ephAgo",children:s.lastActivityAt?O(s.lastActivityAt):"—"})]},s.name))}):null]}):null,e.jsx("button",{type:"button",className:"ap-newAgent",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent on this project"})]})]})})}export{qe as AgentsLibrary};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-CFBn0Sdk.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
1
+ import{c}from"./createLucideIcon-DXpqZP7I.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
@@ -1 +1 @@
1
- import{r}from"./index-DmFAhGPj.js";import{a as d}from"./api-h5zurxmi.js";import{u as f}from"./Provider-cJCdHAxu.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};
1
+ import{r}from"./index-CZ-05hKz.js";import{a as d}from"./api-Co9aQ2Jw.js";import{u as f}from"./Provider-B2xuo3rf.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};
@@ -1 +1 @@
1
- import{j as l,r as d}from"./index-DmFAhGPj.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-CmwGCxUk.js";import{a as Z}from"./api-h5zurxmi.js";import{u as N}from"./Provider-cJCdHAxu.js";import{A as U}from"./AgentDetailCard-BTiOmh-a.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
1
+ import{j as l,r as d}from"./index-CZ-05hKz.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-BVlMw8x_.js";import{a as Z}from"./api-Co9aQ2Jw.js";import{u as N}from"./Provider-B2xuo3rf.js";import{A as U}from"./AgentDetailCard-UqPNpcvB.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
@@ -0,0 +1 @@
1
+ import{f as b}from"./mesh-roster-n2nDpEmA.js";function i(t){return t?t.replace(/^https?:\/\//,"").split("/")[0].split(":")[0].split(".")[0]||t.slice(0,8):""}function h(t){return t&&((t.hostName?i(t.hostName):null)||t.name)||"this host"}function w(t){if(!t)return"Host";const e=h(t.localNode);return e==="this host"?"Host":e}function L(t){return i(t.hostName)||t.name||"tailnet peer"}function N(t){return i(t.dnsName)||i(t.hostName)||(t.name??"").toLowerCase()}function p(t){return i(t.hostName)||(t.name?i(t.name):"")}function y(t){const e=(t.hostName??t.dnsName??t.name??"").trim().toLowerCase();return e?i(e).toLowerCase()==="localhost"||e==="127.0.0.1"||e.startsWith("localhost."):!1}function C(t,e){const u=b(t),s=new Map,l=e.localNode?.id??"local",f=h(e.localNode),m=(e.localNode&&e.nodes?.[e.localNode.id]?.host)??e.nodes?.[l]?.host;s.set(l,{machineId:l,machineLabel:f,reachability:"this",online:!0,host:m,agents:[]});for(const o of u){const n=o.authorityNodeId??o.homeNodeId??l;if(n!==l&&!e.nodes?.[n])continue;let a=s.get(n);if(!a){const c=e.nodes?.[n];a={machineId:n,machineLabel:h(c)||o.authorityNodeName||o.homeNodeName||n,reachability:"peer",online:!0,host:c?.host,agents:[]},s.set(n,a)}a.agents.push(o)}const r=new Set;for(const o of s.values()){r.add(o.machineLabel.toLowerCase());const n=e.nodes?.[o.machineId];if(n){const a=p(n);a&&r.add(a.toLowerCase())}}for(const o of e.tailscale?.peers??[]){if(y(o))continue;const n=L(o),a=N(o).toLowerCase();if(a&&r.has(a)||r.has(n.toLowerCase()))continue;const c=`tailnet:${o.id}`;s.has(c)||(s.set(c,{machineId:c,machineLabel:n,reachability:"tailnet",online:!!(o.online&&e.tailscale?.running),agents:[]}),a&&r.add(a),r.add(n.toLowerCase()))}const d=o=>o.reachability==="this"?0:o.reachability==="peer"?1:2;return Array.from(s.values()).sort((o,n)=>{const a=d(o)-d(n);return a!==0?a:o.machineLabel.localeCompare(n.machineLabel)})}export{C as b,w as l};
@@ -1 +1 @@
1
- import{r as p}from"./index-DmFAhGPj.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
1
+ import{r as p}from"./index-CZ-05hKz.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
@@ -0,0 +1 @@
1
+ function r(t){const e=t.id.trim();return e.startsWith("session-")||e.startsWith("local-session-agent-")}function i(t){return!!(r(t)||t.handle?.trim().toLowerCase()?.startsWith("session-")||t.definitionId?.trim().toLowerCase()?.startsWith("session-")||/^session\s+/i.test(t.name.trim())||`${t.selector??""} ${t.defaultSelector??""}`.toLowerCase().includes("@session-"))}function n(t){return!!(t.project?.trim()||t.projectRoot?.trim())}function o(t){const e=t.handle?.trim();if(e&&!e.toLowerCase().startsWith("session-")||t.role?.trim())return!0;const s=t.definitionId?.trim();return!!(s&&!s.toLowerCase().startsWith("session-")&&!s.toLowerCase().startsWith("local-session-agent-"))}function u(t){return t.retiredFromFleet||t.staleLocalRegistration||t.agentClass==="organic"||i(t)?!1:n(t)||o(t)}function l(t){return t.filter(u)}export{l as f};