@openscout/scout 0.2.86 → 0.2.90

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 (462) hide show
  1. package/README.md +10 -5
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +4 -4
  4. package/dist/client/assets/ActivityScreen-BUeb4ERK.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-BNRpRPod.js → AddProjectForm-DtTfn4Zk.js} +1 -1
  6. package/dist/client/assets/AgentAvatar-CneOa70z.js +1 -0
  7. package/dist/client/assets/AgentConfigurationScreen-CkZ7EjZh.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-0Y3kqMtv.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-FelCxQrT.js → AgentDetailCard-Dtc02KUO.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-B5raPB_U.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-DFG4ElZD.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-CRDG74C1.js → AgentLaneCard-BRAkw8YJ.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-CWFqUdch.js → AgentLaneChrome-T8QE5742.js} +1 -1
  14. package/dist/client/assets/AgentLaneDetailSheet-C8RYotnv.js +4 -0
  15. package/dist/client/assets/{AgentLaneSummaryResize-yTM4GQAJ.js → AgentLaneSummaryResize-FyYweLo_.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-DJeDRTAN.js → AgentLanesPreflight-Cil3dNwu.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-DPfO8MOo.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-Bn3zeZBN.js → AgentLiveActions-DwScaVRF.js} +1 -1
  20. package/dist/client/assets/AgentSessions-DKoWA0Lm.js +6 -0
  21. package/dist/client/assets/AgentsConsole-DoBIWGoq.js +1 -0
  22. package/dist/client/assets/AgentsScreen-JuUiSuwY.js +1 -0
  23. package/dist/client/assets/AgentsSubnav-BV0WAgzf.js +1 -0
  24. package/dist/client/assets/{AtopView-DymBCiXv.js → AtopView-ycxMrRwp.js} +1 -1
  25. package/dist/client/assets/BackToPicker-D6WgIDb-.js +1 -0
  26. package/dist/client/assets/BriefingDetailScreen-Zw-taW1s.js +6 -0
  27. package/dist/client/assets/{BriefingsScreen-CLvSOJjy.js → BriefingsScreen-BerYOoWS.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-DFAH-NO6.js → BrokerMetadataPanel-Cu93j-Ga.js} +1 -1
  29. package/dist/client/assets/BrokerScreen-CeN90URH.js +5 -0
  30. package/dist/client/assets/ChatCollapsedStrip-DdKyMSEM.js +1 -0
  31. package/dist/client/assets/{CodeDiffPane-C9HT1dCT.js → CodeDiffPane-BjCOBLze.js} +1 -1
  32. package/dist/client/assets/{CodeProjectPicker-5Y3GvXkM.js → CodeProjectPicker-NSGdCaK0.js} +1 -1
  33. package/dist/client/assets/{CodeScreen-DpN9kQvm.js → CodeScreen-CA9Sq6Dx.js} +1 -1
  34. package/dist/client/assets/ContextMenu-DnFcmfMR.js +1 -0
  35. package/dist/client/assets/ConversationComposer-CjRXFkvY.js +1 -0
  36. package/dist/client/assets/ConversationFeedRows-CgRTIpAv.js +1 -0
  37. package/dist/client/assets/ConversationHeader-CRmdtuL7.js +1 -0
  38. package/dist/client/assets/ConversationPanels-DCkcLIHk.js +2 -0
  39. package/dist/client/assets/ConversationScreen-Br0QQ3xo.js +1 -0
  40. package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
  41. package/dist/client/assets/ConversationStatus-BJ1CMbAv.js +1 -0
  42. package/dist/client/assets/{DataTable-oJP339bX.js → DataTable-Dzqiaha4.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-CH02HAVw.js → DispatchAftermath-B0WMg_z3.js} +1 -1
  44. package/dist/client/assets/DocumentFocusViewer-CZVVIAD5.js +1 -0
  45. package/dist/client/assets/{EmbeddableSurfacesLab-84b9I3fy.js → EmbeddableSurfacesLab-C3a7hJWO.js} +1 -1
  46. package/dist/client/assets/{EmptyState-BnDda92b.js → EmptyState-CYNJZMrZ.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-Dg7_88pv.js → FileViewerPane-Fwt8_KmD.js} +1 -1
  48. package/dist/client/assets/FleetSearch-Dsi_l2KW.js +1 -0
  49. package/dist/client/assets/FleetSearch-EXOe8ulE.css +1 -0
  50. package/dist/client/assets/FlightObserveScreen-g_tiGmvz.js +1 -0
  51. package/dist/client/assets/{FollowScreen-DcFBqr6l.js → FollowScreen-Bb_rcrzi.js} +1 -1
  52. package/dist/client/assets/{HarnessMark-DGZ6o6Ct.js → HarnessMark-DrE57dUq.js} +1 -1
  53. package/dist/client/assets/HarnessesScreen-CAsCJ_tG.js +1 -0
  54. package/dist/client/assets/{HerdrSession-DV2hD6Yh.js → HerdrSession-1eVu9Owj.js} +1 -1
  55. package/dist/client/assets/HomeHero-DEl-WBsT.css +1 -0
  56. package/dist/client/assets/HomeHero-W445QrG1.js +1 -0
  57. package/dist/client/assets/{KnowledgeSearchInspector-DNQjeWZO.js → KnowledgeSearchInspector-CbPVg3fr.js} +1 -1
  58. package/dist/client/assets/KnowledgeSearchScreen-C1lN1xJk.js +1 -0
  59. package/dist/client/assets/{LaneToolHoverCard-197xYmRp.js → LaneToolHoverCard-BkBcDYm-.js} +1 -1
  60. package/dist/client/assets/LaneTraceDetailSheet-CzTd44rf.js +1 -0
  61. package/dist/client/assets/{LaneTraceEventFocus-C9cmqxnK.js → LaneTraceEventFocus-BmMmPTyJ.js} +1 -1
  62. package/dist/client/assets/{MeshCanvas-C3_2p9B6.js → MeshCanvas-DwkjsiJ5.js} +2 -2
  63. package/dist/client/assets/{MeshCanvasMinimap-ZTjYWXTZ.js → MeshCanvasMinimap-vmCpU1sD.js} +1 -1
  64. package/dist/client/assets/MeshScreen-CkMepUpT.js +1 -0
  65. package/dist/client/assets/{MeshTopologyView-CBjHbAZw.js → MeshTopologyView-BD2xLE2C.js} +2 -2
  66. package/dist/client/assets/MessageComposerSuggestions-qbalTne_.js +1 -0
  67. package/dist/client/assets/MessagesScreen-C8UynyLC.js +1 -0
  68. package/dist/client/assets/{MissionContextRail-DXkrbcnZ.js → MissionContextRail-D5MEP2f4.js} +1 -1
  69. package/dist/client/assets/MissionControlView-K_I7eftL.js +1 -0
  70. package/dist/client/assets/MissionFocusOverlay-CWKLdUKG.js +1 -0
  71. package/dist/client/assets/MissionLeftAgentRow-ByGrNAcs.js +1 -0
  72. package/dist/client/assets/MissionLogPane-ZwHJ137T.js +1 -0
  73. package/dist/client/assets/{NewAgentModal-C18Ajovd.js → NewAgentModal-Do9aVvan.js} +1 -1
  74. package/dist/client/assets/NewChatComposer-DKlNX1UA.js +19 -0
  75. package/dist/client/assets/{NewChatOrigin-DpHS2Wmt.js → NewChatOrigin-DXPvX-hh.js} +1 -1
  76. package/dist/client/assets/ObserveEmbedScreen-Dghsq2on.js +2 -0
  77. package/dist/client/assets/ObserveTextFlow-DWNlmTVm.js +2 -0
  78. package/dist/client/assets/ObservedTopologyPanel-BlmGoxCE.js +2 -0
  79. package/dist/client/assets/OpenScoutAppShell-DDqQi-oe.js +87 -0
  80. package/dist/client/assets/OpsAgentsView-Bn_fGBdo.js +1 -0
  81. package/dist/client/assets/OpsScreen-DHnT-Q9R.js +1 -0
  82. package/dist/client/assets/OpsSubnav-CJRD7MjM.js +1 -0
  83. package/dist/client/assets/PlanView-B6gKo543.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-Be1VOkI4.js +1 -0
  85. package/dist/client/assets/{ProjectAgentProfileBar-IDEpKZvI.js → ProjectAgentProfileBar-C5QWwZCn.js} +1 -1
  86. package/dist/client/assets/ProjectAgentProfileHero-DC7Dd8VL.js +1 -0
  87. package/dist/client/assets/ProjectsInbox-DCLrDmj1.js +2 -0
  88. package/dist/client/assets/ProjectsRail-C4hiXYSb.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-jruZRjgD.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-DYmL2dCY.js +1 -0
  91. package/dist/client/assets/Provider-p-xuaAoE.js +1 -0
  92. package/dist/client/assets/RailRow-Cf9LOiEj.css +1 -0
  93. package/dist/client/assets/RailRow-bRkkXIpR.js +1 -0
  94. package/dist/client/assets/RawSessionsTable-B7WKmXrk.js +1 -0
  95. package/dist/client/assets/RealtimeVoiceScreen-BzP3BQq9.js +1 -0
  96. package/dist/client/assets/{RepoDiffEmbedScreen-C97Euf4s.js → RepoDiffEmbedScreen-xjzjcJ_c.js} +1 -1
  97. package/dist/client/assets/{RepoDiffPageScreen-DUKLzkrW.js → RepoDiffPageScreen-DRzIY-dk.js} +1 -1
  98. package/dist/client/assets/RepoDiffViewer-CNDp01KM.js +7 -0
  99. package/dist/client/assets/RepoDiffViewerLazy-b6vjYxez.js +2 -0
  100. package/dist/client/assets/{ReposScreen-BR1LqTf1.js → ReposScreen-CpaLC_NU.js} +6 -6
  101. package/dist/client/assets/ScoutDeckSurface-DkpZ-0DH.js +1 -0
  102. package/dist/client/assets/{ScoutSurface-BMKW7hSu.js → ScoutSurface-BENBUt5-.js} +1 -1
  103. package/dist/client/assets/ScoutbotBroadcastChip-CGZyxS5H.js +2 -0
  104. package/dist/client/assets/{agent-autocomplete-C7xwIcwd.css → ScoutbotBroadcastChip-CxtYZWPZ.css} +1 -1
  105. package/dist/client/assets/{ScoutbotFxLab-0O2iDRrF.js → ScoutbotFxLab-Bk2ZsfPp.js} +1 -1
  106. package/dist/client/assets/ScoutbotRealtimeVoiceCall-n63LdBZs.js +1 -0
  107. package/dist/client/assets/{SecondaryNav-cYTw2p39.js → SecondaryNav-B4IsujYh.js} +1 -1
  108. package/dist/client/assets/{SessionEmbedScreen-mNjT0R6j.js → SessionEmbedScreen-CPfH-jqN.js} +1 -1
  109. package/dist/client/assets/{SessionObserve-zAlFbwFn.js → SessionObserve-B-SkP3tu.js} +1 -1
  110. package/dist/client/assets/{SessionObserveEvidence-BVawzqoE.js → SessionObserveEvidence-CF5jnH3-.js} +1 -1
  111. package/dist/client/assets/SessionRefScreen-C-4jjmVG.js +1 -0
  112. package/dist/client/assets/SessionsScreen-HAjFvmIq.js +1 -0
  113. package/dist/client/assets/SettingsDrawer-DATxwZrn.js +3 -0
  114. package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
  115. package/dist/client/assets/SettingsScreen-Bu53X7J_.js +1 -0
  116. package/dist/client/assets/{ShikiPane-DyEJdcvb.js → ShikiPane-DH8yYDks.js} +1 -1
  117. package/dist/client/assets/{SlidePanel-Dg8_styW.js → SlidePanel-RFXJpfUa.js} +1 -1
  118. package/dist/client/assets/{SpriteAvatar-DMrSssNZ.js → SpriteAvatar-CEYdCzem.js} +1 -1
  119. package/dist/client/assets/{StatusPill-NFFnphtx.js → StatusPill-9uy70ttd.js} +1 -1
  120. package/dist/client/assets/{TailView-BfObcZu3.js → TailView-6bIrgdxN.js} +2 -2
  121. package/dist/client/assets/Terminal-BI6km7H4.js +1 -0
  122. package/dist/client/assets/TerminalEmbedScreen-D4JOWwtm.js +1 -0
  123. package/dist/client/assets/{TextDocumentSurface-C7fGlzY8.js → TextDocumentSurface-BcP9vvji.js} +1 -1
  124. package/dist/client/assets/{TmuxPeek-BSeKIjnX.js → TmuxPeek-IaWqCgyJ.js} +1 -1
  125. package/dist/client/assets/{VoicePermissionsPanel-BkIGTzgw.js → VoicePermissionsPanel-C80iZxgy.js} +1 -1
  126. package/dist/client/assets/{WorkDetailScreen-Cwe-KWK4.js → WorkDetailScreen-CweZ6fEd.js} +3 -3
  127. package/dist/client/assets/WorkFilesViewer-Dy_-06iI.js +1 -0
  128. package/dist/client/assets/{activity-D4W2XZY2.js → activity-DS0u0Itf.js} +1 -1
  129. package/dist/client/assets/{addon-fit-Celjj2yn.js → addon-fit-CN888B3D.js} +1 -1
  130. package/dist/client/assets/{addon-webgl-Cu4tJ21-.js → addon-webgl-CoAnanQS.js} +1 -1
  131. package/dist/client/assets/{agent-essentials-CngjUhQj.js → agent-essentials-CuK4G_zS.js} +1 -1
  132. package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
  133. package/dist/client/assets/{agent-lane-card-model-CSugZCdy.js → agent-lane-card-model-q4cwzLX4.js} +1 -1
  134. package/dist/client/assets/{agent-lane-detail-D5EIlX7_.js → agent-lane-detail-BNNm6FNu.js} +1 -1
  135. package/dist/client/assets/{agent-lane-preview-BhplDYGf.js → agent-lane-preview-C33Dwpn7.js} +1 -1
  136. package/dist/client/assets/{agent-lanes-DlqcEf0l.css → agent-lanes-BDNktFBZ.css} +1 -1
  137. package/dist/client/assets/{agent-lanes-model-BKOs_32K.js → agent-lanes-model-VYQ5a68i.js} +2 -2
  138. package/dist/client/assets/{api-BHHEUSS3.js → api-BkjHJfgJ.js} +1 -1
  139. package/dist/client/assets/api-h5zurxmi.js +1 -0
  140. package/dist/client/assets/{arc.es-DNT50Y-_.js → arc.es-BET9ev6q.js} +1 -1
  141. package/dist/client/assets/arrow-down-DxxPnPwh.js +1 -0
  142. package/dist/client/assets/{arrow-left-i-h6JAgs.js → arrow-left-CXDkJuCg.js} +1 -1
  143. package/dist/client/assets/{arrow-up-right-RBC6k8nn.js → arrow-up-right-Bj8RjSqW.js} +1 -1
  144. package/dist/client/assets/{bot-r2IuAuJd.js → bot-BSGSicKC.js} +1 -1
  145. package/dist/client/assets/broker-display-pp33bLsu.js +2 -0
  146. package/dist/client/assets/{cache-BO2Bd_LV.js → cache-Dr0why2k.js} +1 -1
  147. package/dist/client/assets/{check-Bfs7hMb1.js → check-BfA0T8UD.js} +1 -1
  148. package/dist/client/assets/{chevron-down-Da5tV19_.js → chevron-down-BVg09D6U.js} +1 -1
  149. package/dist/client/assets/{chevron-right-BMqtBds_.js → chevron-right-CaEwYkxE.js} +1 -1
  150. package/dist/client/assets/{chunk-HRAB3GC3-BUVYXXAp.js → chunk-HRAB3GC3-HhKwnZCi.js} +1 -1
  151. package/dist/client/assets/chunk-JTPDIGGW-DX2eTIQ_.js +46 -0
  152. package/dist/client/assets/chunk-T65CQEWV-D-bOfuCH.js +1 -0
  153. package/dist/client/assets/chunk-YOZR3KYS-oS9dlQCI.js +2 -0
  154. package/dist/client/assets/{clock-DaKLp6Xd.js → clock-C3TUL7D7.js} +1 -1
  155. package/dist/client/assets/{code-xml-ByQsfOI_.js → code-xml-Dbvjk9Kw.js} +1 -1
  156. package/dist/client/assets/collapsed-strip-Dz-of2SM.css +1 -0
  157. package/dist/client/assets/content-BQuEedeL.js +1 -0
  158. package/dist/client/assets/content-BUae-L_N.js +1 -0
  159. package/dist/client/assets/content-BfG98J1k.js +1 -0
  160. package/dist/client/assets/content-BkVTfkAC.js +1 -0
  161. package/dist/client/assets/content-BsNMos_d.js +1 -0
  162. package/dist/client/assets/content-C2TZOKSE.js +1 -0
  163. package/dist/client/assets/content-CCn98eSk.js +1 -0
  164. package/dist/client/assets/content-CJuH5cDP.js +1 -0
  165. package/dist/client/assets/content-CYnPp9yo.js +1 -0
  166. package/dist/client/assets/content-CcrUhm4P.js +1 -0
  167. package/dist/client/assets/content-CiOMtgQc.js +1 -0
  168. package/dist/client/assets/content-CxuVONeQ.js +1 -0
  169. package/dist/client/assets/content-Dmq9n1_L.js +1 -0
  170. package/dist/client/assets/content-DskHP2NI.js +1 -0
  171. package/dist/client/assets/content-DvvzL2HK.js +1 -0
  172. package/dist/client/assets/content-snCAUbwv.js +1 -0
  173. package/dist/client/assets/{conversation-icons-C4amK8Sa.js → conversation-icons-DmC_Ak3z.js} +1 -1
  174. package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
  175. package/dist/client/assets/conversation-motion-features-DPiGTO21.js +1 -0
  176. package/dist/client/assets/{copy-De4s38o2.js → copy-C79v_7D-.js} +1 -1
  177. package/dist/client/assets/{createLucideIcon-DLlxGjKt.js → createLucideIcon-DCq_3fQn.js} +1 -1
  178. package/dist/client/assets/ctx-panel-B4s49N9e.css +1 -0
  179. package/dist/client/assets/discover-IEnbrH8_.js +2 -0
  180. package/dist/client/assets/embed-entry-XUPb-AzL.js +2 -0
  181. package/dist/client/assets/{external-link-BGHC_naA.js → external-link-Dd8xaveL.js} +1 -1
  182. package/dist/client/assets/{eye-BeCSqJn1.js → eye-DkU59kfl.js} +1 -1
  183. package/dist/client/assets/{file-text-BVhkMWyC.js → file-text-BITQqGtF.js} +1 -1
  184. package/dist/client/assets/gestures-B5rLNRpi.js +1 -0
  185. package/dist/client/assets/home-moving-signal-Bs635mVw.js +1 -0
  186. package/dist/client/assets/home-moving-signal-CAa0V91u.css +1 -0
  187. package/dist/client/assets/home-now-card-VxlLjg1A.js +1 -0
  188. package/dist/client/assets/{home-now-card-nano-Djhy6ax0.js → home-now-card-nano-C06GMiwD.js} +1 -1
  189. package/dist/client/assets/hooks-BWiLxTw1.js +2 -0
  190. package/dist/client/assets/index-9as_JTUs.css +1 -0
  191. package/dist/client/assets/index-BTj2MguM.js +1 -0
  192. package/dist/client/assets/index-BZovGpDk.js +10 -0
  193. package/dist/client/assets/index-CvF09yvf.css +1 -0
  194. package/dist/client/assets/index-DiiEQwdc.js +1 -0
  195. package/dist/client/assets/index-vbaJ8sin.js +1 -0
  196. package/dist/client/assets/inspector-panel-C96HcyK5.js +2 -0
  197. package/dist/client/assets/{keyboard-nav-7iEtvu9P.js → keyboard-nav-CHo_xmjw.js} +1 -1
  198. package/dist/client/assets/{lane-observe-vfyACHi0.js → lane-observe-BA3g9aVd.js} +1 -1
  199. package/dist/client/assets/{lane-roster-store-pHT3TAVs.js → lane-roster-store-B6ybJlHJ.js} +1 -1
  200. package/dist/client/assets/left-Bk3XnxPD.css +1 -0
  201. package/dist/client/assets/left-BuJ0wJW1.js +2 -0
  202. package/dist/client/assets/left-C6Zj3cR4.js +1 -0
  203. package/dist/client/assets/left-CCoobxPS.css +1 -0
  204. package/dist/client/assets/left-COMAiMfB.js +2 -0
  205. package/dist/client/assets/left-Ce4WKYPK.js +1 -0
  206. package/dist/client/assets/left-DMJkmJOF.js +1 -0
  207. package/dist/client/assets/left-DrCbY6ja.js +1 -0
  208. package/dist/client/assets/left-agents-BuSyVNGE.js +1 -0
  209. package/dist/client/assets/left-default-DRHywOKX.js +1 -0
  210. package/dist/client/assets/left-l92tw5Kc.js +1 -0
  211. package/dist/client/assets/left-lanes-4-aUyyrV.js +1 -0
  212. package/dist/client/assets/left-mission-e849d_Td.js +1 -0
  213. package/dist/client/assets/left-plan-MchYwAB_.js +2 -0
  214. package/dist/client/assets/library-DygjpA6u.js +1 -0
  215. package/dist/client/assets/{loader-circle-DoT8gpw6.js → loader-circle-B-l2Wj3-.js} +1 -1
  216. package/dist/client/assets/{local-agents-BMadXuP1.js → local-agents-Wof5knTJ.js} +1 -1
  217. package/dist/client/assets/{mentions-Cd6XticV.js → mentions-BjXfeF7t.js} +1 -1
  218. package/dist/client/assets/{mesh-ops-C0zCLTR8.js → mesh-ops-C1gq8zKf.js} +1 -1
  219. package/dist/client/assets/{mesh-view-store-Cpqil_2D.js → mesh-view-store-B56D3f77.js} +1 -1
  220. package/dist/client/assets/{message-circle-44KSmbvQ.js → message-circle-BwVx5X0q.js} +1 -1
  221. package/dist/client/assets/{message-markup-DAnnGpWr.js → message-markup-DlVX-iuc.js} +1 -1
  222. package/dist/client/assets/{message-square-DlY4EneU.js → message-square-BnkG6tae.js} +1 -1
  223. package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
  224. package/dist/client/assets/{mission-control-store-DtjtRs9Z.js → mission-control-store-CMgIVjLJ.js} +1 -1
  225. package/dist/client/assets/model-Co0zkMIc.js +1 -0
  226. package/dist/client/assets/{observe-DL5_8-Zj.js → observe-DVHAcIrv.js} +1 -1
  227. package/dist/client/assets/{operator-attention-BqoWAlhp.js → operator-attention-BwSPeheT.js} +1 -1
  228. package/dist/client/assets/{page-status-CW8co39E.js → page-status-Bg2hd27j.js} +1 -1
  229. package/dist/client/assets/paperclip-DblaLD_N.js +1 -0
  230. package/dist/client/assets/plan-view-D56fneVF.css +1 -0
  231. package/dist/client/assets/{plus-64n9qucr.js → plus-BAI0t5g9.js} +1 -1
  232. package/dist/client/assets/profile-3Q4sUtvJ.js +1 -0
  233. package/dist/client/assets/projects-inbox-Da2hYEn6.js +1 -0
  234. package/dist/client/assets/{radio-BjpQTKT0.js → radio-BGtkyCG9.js} +1 -1
  235. package/dist/client/assets/{refresh-cw-IgN2fZLM.js → refresh-cw-DtF8xPqX.js} +1 -1
  236. package/dist/client/assets/resolve-panes-D4tlKNCT.js +1 -0
  237. package/dist/client/assets/resolve-sidebar-context-B27lj3Ci.js +1 -0
  238. package/dist/client/assets/right-B8qg3JdB.js +1 -0
  239. package/dist/client/assets/{right-B96CBzrV.js → right-BU_W1kSH.js} +1 -1
  240. package/dist/client/assets/right-BlR7h0US.js +1 -0
  241. package/dist/client/assets/right-BwgwTGGd.js +1 -0
  242. package/dist/client/assets/right-ByptvkVX.js +1 -0
  243. package/dist/client/assets/right-CUP-NIDG.js +1 -0
  244. package/dist/client/assets/right-Ch_jrNe2.js +1 -0
  245. package/dist/client/assets/right-Dd2DscRz.js +1 -0
  246. package/dist/client/assets/right-DmVHd8Xj.js +1 -0
  247. package/dist/client/assets/{right-DqiVyo8v.js → right-c4PAdFYZ.js} +1 -1
  248. package/dist/client/assets/{rocket-DnmN_YOD.js → rocket-BWh18pt_.js} +1 -1
  249. package/dist/client/assets/router-63XV_E7f.js +1 -0
  250. package/dist/client/assets/{text-BR9Bap0E.js → runtime-picker-BXKJbLot.js} +1 -1
  251. package/dist/client/assets/runtime-picker-vhm0gtLs.css +1 -0
  252. package/dist/client/assets/{scope-views-Z8aoAmtU.js → scope-views-Dm2_-NPi.js} +1 -1
  253. package/dist/client/assets/scout-voice-D8Q5sZOL.js +1 -0
  254. package/dist/client/assets/{scoutbot-D4vuKzOL.js → scoutbot-BTIErYHo.js} +2 -2
  255. package/dist/client/assets/{scroll-text-DRidbcse.js → scroll-text-DZb3mmYo.js} +1 -1
  256. package/dist/client/assets/{search-BbgsEMXa.js → search-1QMVOxF3.js} +1 -1
  257. package/dist/client/assets/secondaryNavConfig-c0cz3MkJ.js +1 -0
  258. package/dist/client/assets/{selection-bridge-CpzFGx3-.js → selection-bridge-O9C4kGfF.js} +1 -1
  259. package/dist/client/assets/{send-horizontal-BXo2uz3Z.js → send-horizontal-DbyEkGql.js} +1 -1
  260. package/dist/client/assets/{server-Dt3tpiBj.js → server-Bncn9S7r.js} +1 -1
  261. package/dist/client/assets/{session-catalog-CUQ8LUJY.js → session-catalog-DC6BlBBC.js} +1 -1
  262. package/dist/client/assets/{session-table-B4JOKevn.js → session-table-BUPq9Viy.js} +1 -1
  263. package/dist/client/assets/{sliders-horizontal-7V8B3xsf.js → sliders-horizontal-CMe8Bay1.js} +1 -1
  264. package/dist/client/assets/{sparkles-ytTwpCbZ.js → sparkles-_7cTZsIH.js} +1 -1
  265. package/dist/client/assets/{sse-CSozY6mp.js → sse-Bb0EOcU9.js} +1 -1
  266. package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
  267. package/dist/client/assets/{tail-display-DcliDVkW.js → tail-display-BRcJltQa.js} +1 -1
  268. package/dist/client/assets/{tail-events-CrN-Rmxj.js → tail-events-C12pfUax.js} +1 -1
  269. package/dist/client/assets/{terminal-relay-pSm7_An6.js → terminal-relay-BgfVJXIL.js} +1 -1
  270. package/dist/client/assets/{terminal-sessions-D4dHTRkt.js → terminal-sessions-AmSgHklm.js} +1 -1
  271. package/dist/client/assets/{terminal-takeover-CtA3wcXh.js → terminal-takeover--05EYhJm.js} +1 -1
  272. package/dist/client/assets/{terminal-BiNIXhna.js → terminal-xGf_F3y7.js} +1 -1
  273. package/dist/client/assets/text-DsBWV_4k.js +1 -0
  274. package/dist/client/assets/{use-conversation-list-C0bEXFeH.js → use-conversation-list-DWX02INv.js} +1 -1
  275. package/dist/client/assets/{use-fleet-active-asks-CK4aw-3G.js → use-fleet-active-asks-Cnwa4hTK.js} +1 -1
  276. package/dist/client/assets/{use-mesh-ops-items-QixBijmT.js → use-mesh-ops-items-BRFm37oY.js} +1 -1
  277. package/dist/client/assets/use-reduced-motion-C8cWvIZ3.js +1 -0
  278. package/dist/client/assets/use-scout-dev-flags-FkMreOOb.js +1 -0
  279. package/dist/client/assets/{useAgentHoverCard-6N8b7qsU.js → useAgentHoverCard-DvPZSJK3.js} +1 -1
  280. package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +1 -0
  281. package/dist/client/assets/{usePierreRuntime-Bq6mXrgd.js → usePierreRuntime-C8WJ0X3F.js} +1 -1
  282. package/dist/client/assets/{wrench-CQvdf7KT.js → wrench-_tHBGTop.js} +1 -1
  283. package/dist/client/assets/{x-BJyPzFnn.js → x-CrGUKNRv.js} +1 -1
  284. package/dist/client/assets/{xterm-D6dE_wMr.js → xterm-Ks-VlLTq.js} +1 -1
  285. package/dist/client/index.html +2 -2
  286. package/dist/main.mjs +38 -169
  287. package/dist/node/main.mjs +240 -272
  288. package/dist/pairing-runtime-controller.mjs +476 -394
  289. package/dist/runtime/base-daemon.mjs +121 -49
  290. package/dist/runtime/broker-daemon.mjs +60 -171
  291. package/dist/runtime/broker-process-manager.mjs +0 -6
  292. package/dist/runtime/mesh-discover.mjs +0 -6
  293. package/dist/scout-control-plane-web.mjs +477 -672
  294. package/dist/scout-web-server.mjs +477 -672
  295. package/package.json +7 -6
  296. package/dist/client/assets/ActivityScreen-C7AwUogt.js +0 -1
  297. package/dist/client/assets/AgentAvatar-B1xvQ7ej.js +0 -1
  298. package/dist/client/assets/AgentConfigurationScreen-BoBQpyz5.js +0 -1
  299. package/dist/client/assets/AgentDefinitionsWorkspace-rw3vh8Lm.js +0 -1
  300. package/dist/client/assets/AgentFloorView-Crdw8Uo5.js +0 -1
  301. package/dist/client/assets/AgentInfoScreen-Cge7HHbV.js +0 -1
  302. package/dist/client/assets/AgentLaneDetailSheet-DCIIg3Zp.js +0 -4
  303. package/dist/client/assets/AgentLanesEmbedScreen-BJLwXSNp.js +0 -1
  304. package/dist/client/assets/AgentLanesView-CbY9qD0z.js +0 -2
  305. package/dist/client/assets/AgentSessions-czl5zT7A.js +0 -6
  306. package/dist/client/assets/AgentsConsole-CoT2crwq.js +0 -1
  307. package/dist/client/assets/AgentsScreen-BcPM-z1T.js +0 -1
  308. package/dist/client/assets/AgentsSubnav-3_vpn2bT.js +0 -1
  309. package/dist/client/assets/AstronautSuit-BADl7m8x.js +0 -1
  310. package/dist/client/assets/BackToPicker-CqYhOaLB.js +0 -1
  311. package/dist/client/assets/BriefingDetailScreen-DDfZ8ci1.js +0 -1
  312. package/dist/client/assets/BrokerScreen-Bkvu92jk.js +0 -5
  313. package/dist/client/assets/Canvas-KyTsDJlB.js +0 -1
  314. package/dist/client/assets/ChatCollapsedStrip-Bjjqa30K.js +0 -1
  315. package/dist/client/assets/ConversationComposer-Ce7Byw48.js +0 -1
  316. package/dist/client/assets/ConversationFeedRows-DygDfQn_.js +0 -1
  317. package/dist/client/assets/ConversationHeader-C3sg0ULI.js +0 -1
  318. package/dist/client/assets/ConversationPanels-Dg4Y2GgX.js +0 -6
  319. package/dist/client/assets/ConversationScreen-BP5tdz2k.css +0 -1
  320. package/dist/client/assets/ConversationScreen-CjWWmuuh.js +0 -1
  321. package/dist/client/assets/ConversationStatus-BhVIYQza.js +0 -1
  322. package/dist/client/assets/CrewWorkspaces-B6YIyw1z.css +0 -1
  323. package/dist/client/assets/CrewWorkspaces-CDU-wy1Y.js +0 -1
  324. package/dist/client/assets/DocumentFocusViewer-DmtFisY9.js +0 -1
  325. package/dist/client/assets/FlightObserveScreen-DL3Xhl0h.js +0 -1
  326. package/dist/client/assets/HarnessesScreen-DTDL-XaA.js +0 -1
  327. package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
  328. package/dist/client/assets/HomeHero-CENwVZ45.js +0 -1
  329. package/dist/client/assets/HostAdvisorView-PgiZUkd_.js +0 -1
  330. package/dist/client/assets/KnowledgeSearchScreen-Bj80IgR0.js +0 -1
  331. package/dist/client/assets/LaneTraceDetailSheet-BztwvOv9.js +0 -1
  332. package/dist/client/assets/MeshScreen-lJKaOyGB.js +0 -1
  333. package/dist/client/assets/MessagesScreen-D6MVLvdg.js +0 -1
  334. package/dist/client/assets/MissionControlView-BCH-Zsp4.js +0 -1
  335. package/dist/client/assets/MissionFocusOverlay-DbAliOSF.js +0 -1
  336. package/dist/client/assets/MissionLeftAgentRow-Bx6Pg8_O.js +0 -1
  337. package/dist/client/assets/MissionLogPane-D06c29Y8.js +0 -1
  338. package/dist/client/assets/NewChatComposer-Bgqes0UQ.js +0 -19
  339. package/dist/client/assets/ObserveEmbedScreen-Cmhwai4X.js +0 -2
  340. package/dist/client/assets/ObserveTextFlow-C1f5oize.js +0 -2
  341. package/dist/client/assets/ObservedTopologyPanel-D85P6RAk.js +0 -2
  342. package/dist/client/assets/OpenScoutAppShell-IDI4fuUE.js +0 -88
  343. package/dist/client/assets/OpsAgentsView-yt0JavoB.js +0 -1
  344. package/dist/client/assets/OpsScreen-C3yNQqJE.js +0 -1
  345. package/dist/client/assets/OpsSubnav-BijKI3yG.js +0 -1
  346. package/dist/client/assets/ProjectAgentProfile-DnIeC16r.js +0 -1
  347. package/dist/client/assets/ProjectAgentProfileHero-Bh_aISs-.js +0 -1
  348. package/dist/client/assets/ProjectsInbox-B8Srlklk.js +0 -2
  349. package/dist/client/assets/ProjectsRail-DqAbdvCf.js +0 -1
  350. package/dist/client/assets/ProjectsScreen-DKHQ2iEv.js +0 -1
  351. package/dist/client/assets/ProjectsThreadAside-DpkjYLL2.js +0 -1
  352. package/dist/client/assets/Provider-Ve8yXaWR.js +0 -1
  353. package/dist/client/assets/RailRow-B0sRaJc6.css +0 -1
  354. package/dist/client/assets/RailRow-C4GNGR80.js +0 -1
  355. package/dist/client/assets/RawSessionsTable-Co3vzwsf.js +0 -1
  356. package/dist/client/assets/RealtimeVoiceScreen-DMd1CBAf.js +0 -9
  357. package/dist/client/assets/RepoDiffViewer-CovKjSgb.js +0 -7
  358. package/dist/client/assets/RepoDiffViewerLazy-zIiEmh-e.js +0 -2
  359. package/dist/client/assets/ScoutDeckSurface-BGsVicc2.js +0 -1
  360. package/dist/client/assets/SessionRefScreen-BmKhf29o.js +0 -1
  361. package/dist/client/assets/SessionsScreen-CsSqjIY2.js +0 -1
  362. package/dist/client/assets/SettingsDrawer-Dsj-On_x.css +0 -1
  363. package/dist/client/assets/SettingsDrawer-DwYQTGi8.js +0 -3
  364. package/dist/client/assets/SettingsScreen-Btaku7YM.js +0 -1
  365. package/dist/client/assets/Terminal-Dr-M9U4u.js +0 -1
  366. package/dist/client/assets/TerminalEmbedScreen-BmyZkonh.js +0 -1
  367. package/dist/client/assets/TerminalRelay-lJ2KdMCW.js +0 -46
  368. package/dist/client/assets/WorkFilesViewer-BBtKRBPv.js +0 -1
  369. package/dist/client/assets/agent-autocomplete-Dv-_9dAw.js +0 -2
  370. package/dist/client/assets/agent-identity-DzHGhLdJ.js +0 -1
  371. package/dist/client/assets/agent-specialization-CNrsRbKA.js +0 -1
  372. package/dist/client/assets/api-DEHEgJ9m.js +0 -1
  373. package/dist/client/assets/archive-DH49QqFG.js +0 -1
  374. package/dist/client/assets/arrow-right-B0Yi01Zr.js +0 -1
  375. package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
  376. package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
  377. package/dist/client/assets/compass-BepM5iWH.js +0 -1
  378. package/dist/client/assets/content-5hnDC9WE.js +0 -1
  379. package/dist/client/assets/content-BRFZ-a6m.js +0 -1
  380. package/dist/client/assets/content-BYykncDo.js +0 -1
  381. package/dist/client/assets/content-Be6yyWbJ.js +0 -1
  382. package/dist/client/assets/content-Bgl_X3ao.js +0 -1
  383. package/dist/client/assets/content-BopJW1Zx.js +0 -1
  384. package/dist/client/assets/content-Bv2sfg0w.js +0 -1
  385. package/dist/client/assets/content-CMBiIZTg.js +0 -1
  386. package/dist/client/assets/content-CPVqvf5o.js +0 -1
  387. package/dist/client/assets/content-CbwyFqdI.js +0 -1
  388. package/dist/client/assets/content-ClQjAWYi.js +0 -1
  389. package/dist/client/assets/content-Cv2tSAbv.js +0 -1
  390. package/dist/client/assets/content-DFFe3-Ot.js +0 -1
  391. package/dist/client/assets/content-DY5hwBmm.js +0 -1
  392. package/dist/client/assets/content-_IXoxGno.js +0 -1
  393. package/dist/client/assets/content-j_tewJdE.js +0 -1
  394. package/dist/client/assets/conversation-model-CigSPlKA.js +0 -1
  395. package/dist/client/assets/conversation-motion-features-_95aZx_1.js +0 -1
  396. package/dist/client/assets/cpu-Bc268H9Q.js +0 -1
  397. package/dist/client/assets/credentials-qwds23lv.js +0 -1
  398. package/dist/client/assets/ctx-panel-D_HJ3nhb.css +0 -1
  399. package/dist/client/assets/discover-DOlk1hG7.js +0 -2
  400. package/dist/client/assets/embed-entry-BqDJfa87.js +0 -2
  401. package/dist/client/assets/file-code-corner-CX53Cd9y.js +0 -1
  402. package/dist/client/assets/gauge-CPcEPmNt.js +0 -1
  403. package/dist/client/assets/gestures-BXIGYk_p.js +0 -1
  404. package/dist/client/assets/git-branch-q8Ayc8py.js +0 -1
  405. package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
  406. package/dist/client/assets/home-moving-signal-Dm2Z2x0p.js +0 -1
  407. package/dist/client/assets/home-now-card-xU5LGP7q.js +0 -1
  408. package/dist/client/assets/hooks-CdKx1CxP.js +0 -2
  409. package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
  410. package/dist/client/assets/index-Bli6bTLU.js +0 -10
  411. package/dist/client/assets/index-D7UEHxaY.js +0 -1
  412. package/dist/client/assets/index-DFdlQs_c.js +0 -1
  413. package/dist/client/assets/index-DhfOMK0D.js +0 -1
  414. package/dist/client/assets/index-DzlEgstl.css +0 -1
  415. package/dist/client/assets/index-wLwc74Pu.css +0 -1
  416. package/dist/client/assets/inspector-panel-B8pigRsg.js +0 -2
  417. package/dist/client/assets/layers-BiZA-Clc.js +0 -1
  418. package/dist/client/assets/layout-grid-DMpv9CZM.js +0 -1
  419. package/dist/client/assets/left-BayK4ocL.js +0 -1
  420. package/dist/client/assets/left-BhZhSrS2.js +0 -1
  421. package/dist/client/assets/left-BhgU6NOA.js +0 -1
  422. package/dist/client/assets/left-CY_FGnN7.js +0 -1
  423. package/dist/client/assets/left-Cq8mjamr.js +0 -1
  424. package/dist/client/assets/left-DH44V4I_.css +0 -1
  425. package/dist/client/assets/left-Dnqla0b5.js +0 -2
  426. package/dist/client/assets/left-Dy403II2.js +0 -2
  427. package/dist/client/assets/left-R2OOE7VG.css +0 -1
  428. package/dist/client/assets/left-advisor-oOAtJ9YE.js +0 -1
  429. package/dist/client/assets/left-agents-TIKe8vW8.js +0 -1
  430. package/dist/client/assets/left-default-owH0Lwxo.js +0 -1
  431. package/dist/client/assets/left-lanes-BE_co2lP.js +0 -1
  432. package/dist/client/assets/left-mission-C_nWUtfA.js +0 -1
  433. package/dist/client/assets/library-BSVrjn_m.js +0 -1
  434. package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
  435. package/dist/client/assets/persistent-state-DYjP8lqN.js +0 -1
  436. package/dist/client/assets/profile-BkmuseW7.js +0 -1
  437. package/dist/client/assets/projects-inbox-C0umZMSY.js +0 -1
  438. package/dist/client/assets/provider-CX9EWecp.js +0 -1
  439. package/dist/client/assets/proxy-C35W-YHZ.js +0 -1
  440. package/dist/client/assets/resolve-panes-CCqRkQdM.js +0 -1
  441. package/dist/client/assets/resolve-sidebar-context-JkxY8qsV.js +0 -1
  442. package/dist/client/assets/right-B3PQUHd5.js +0 -1
  443. package/dist/client/assets/right-BPirlFC8.js +0 -1
  444. package/dist/client/assets/right-BUP2Ro_M.js +0 -1
  445. package/dist/client/assets/right-BVWYPIFX.js +0 -1
  446. package/dist/client/assets/right-BoAJxwA3.js +0 -1
  447. package/dist/client/assets/right-C2aOC2li.js +0 -1
  448. package/dist/client/assets/right-CtPJjgOV.js +0 -1
  449. package/dist/client/assets/right-SfSu0zHC.js +0 -1
  450. package/dist/client/assets/router-B0YclXYg.js +0 -1
  451. package/dist/client/assets/scout-voice-DvG_3stJ.js +0 -1
  452. package/dist/client/assets/scoutbot-markdown-BJJyaPu2.js +0 -6
  453. package/dist/client/assets/secondaryNavConfig-DyC_P9Wx.js +0 -1
  454. package/dist/client/assets/settings-BzWCF3NF.js +0 -1
  455. package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +0 -1
  456. package/dist/client/assets/text-rLpBg4_z.css +0 -1
  457. package/dist/client/assets/use-reduced-motion-BLn59zLn.js +0 -1
  458. package/dist/client/assets/use-scout-dev-flags-JKb1EhFh.js +0 -1
  459. package/dist/client/assets/useContentSecondaryNav-D-hVKzM9.js +0 -1
  460. package/dist/client/assets/usePersistentState-DOEahRlt.js +0 -1
  461. package/dist/client/assets/zap-rw7uwZht.js +0 -1
  462. /package/dist/client/assets/{DocumentFocusViewer-BSC_JwVE.css → document-focus-viewer-BSC_JwVE.css} +0 -0
package/package.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "name": "@openscout/scout",
3
- "version": "0.2.86",
4
- "description": "Public Scout package that installs the `scout` command and bundled local runtime",
3
+ "version": "0.2.90",
4
+ "description": "Scout CLI and bundled local control plane for coordinating coding agents",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "repository": {
8
8
  "type": "git",
9
- "url": "git+https://github.com/arach/openscout.git",
9
+ "url": "git+https://github.com/oscout/scout.git",
10
10
  "directory": "packages/cli"
11
11
  },
12
12
  "bugs": {
13
- "url": "https://github.com/arach/openscout/issues"
13
+ "url": "https://github.com/oscout/scout/issues"
14
14
  },
15
- "homepage": "https://github.com/arach/openscout#readme",
15
+ "homepage": "https://github.com/oscout/scout#readme",
16
16
  "bin": {
17
17
  "scout": "./bin/scout",
18
18
  "openscout-runtime": "./bin/openscout-runtime.mjs"
@@ -42,5 +42,6 @@
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"
45
- }
45
+ },
46
+ "gitHead": "d07ae9447d6da8408e4d1a1b8d21cb364151340d"
46
47
  }
@@ -1 +0,0 @@
1
- import{r as n,j as s}from"./index-Bli6bTLU.js";import{a as Y}from"./api-DEHEgJ9m.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as J}from"./sse-CSozY6mp.js";import{d as Q}from"./colors-BtO5_zlx.js";import{u as X,a as Z,m as ss,b as es}from"./Provider-Ve8yXaWR.js";import{d as as}from"./router-B0YclXYg.js";import{r as O}from"./mentions-Cd6XticV.js";import{t as I,b as B}from"./time-Dhsh_2EG.js";import{E as C}from"./EmptyState-BnDda92b.js";/* empty css */import"./index-BWHgHrtv.js";import"./provider-CX9EWecp.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";const ts={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"sent a request",ask_working:"working",flight_created:"started task",message_sent:"sent",message_received:"received"},ns=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),ls={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function q(a){return ts[a]??a.replace(/[._]/g," ")}function is(a){return a.startsWith("agent.")||a.includes("registered")||a.includes("online")||a.includes("offline")?"presence":a.startsWith("flight")||a.startsWith("ask_")?"work":a.startsWith("message")?"message":a.startsWith("collaboration")?"collaboration":"system"}function rs(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function os(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function cs(a){return`${a.actorName??"system"} ${q(a.kind)}`}function ds(a){return a.workspaceRoot?`Recorded from ${a.workspaceRoot}.`:a.conversationId?`Linked to thread ${u(a.conversationId)}.`:"No additional detail was captured for this event."}function te({navigate:a}){const{agents:p,route:z}=X(),[v,U]=n.useState([]),[x,w]=n.useState(null),[y,A]=n.useState(!0),[R,$]=n.useState(!1),[h,S]=n.useState(null),[N,F]=n.useState(null),T=n.useRef([]),b=n.useRef(0),f=n.useRef(null),K=Z(),_=as(z),L=n.useMemo(()=>ss(p,_),[p,_]),l=n.useMemo(()=>es(v,L).filter(e=>!ns.has(e.kind)),[v,L]);n.useEffect(()=>{T.current=v},[v]),n.useEffect(()=>{x&&!l.some(e=>e.id===x)&&w(null)},[x,l]);const m=n.useCallback(async(e="initial")=>{const i=++b.current;!(T.current.length>0)&&e!=="background"?(A(!0),S(null)):$(!0);try{const o=await Y("/api/activity");if(i!==b.current)return;U(o),S(null),F(Date.now()),w(g=>o.some(E=>E.id===g)?g:null)}catch(o){if(i!==b.current)return;S(o instanceof Error?o.message:String(o))}finally{i===b.current&&(A(!1),$(!1))}},[]),P=n.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);n.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),J(P);const G=n.useMemo(()=>{const e=new Set(l.map(c=>c.actorName??"system")),i=new Set(l.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${l.length}`,detail:l.length>0?`Latest ${I(l[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${i.size}`,detail:i.size>0?"Conversation-linked records":"No linked threads"}]},[l]),H=!y&&l.length===0&&!!h,V=!y&&l.length===0&&!h;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity Log"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:y?"Loading audit ledger...":h&&l.length>0?`Showing last confirmed snapshot from ${N?I(N):"earlier"}`:N?`Updated ${I(N)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:y||R,onClick:()=>{m("manual")},children:R?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:G.map(e=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:e.label}),s.jsx("strong",{className:"sys-stat-value",children:e.value}),s.jsx("span",{className:"sys-stat-detail",children:e.detail})]},e.label))}),h&&l.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&l.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),H&&s.jsx(C,{className:"sys-state-card-error",title:"Activity is unavailable",body:h,action:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{m("manual")},children:"Try again"})}),V&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),l.length>0&&s.jsx("div",{className:"sys-audit-list",children:l.map(e=>{const i=x===e.id,c=is(e.kind),o=ls[c],g=os(e.workspaceRoot),E=e.summary&&e.summary!==e.title?e.summary:ds(e),r=[];if(e.conversationId&&r.push({key:"thread",label:"Thread",title:`Open thread ${u(e.conversationId)}`,route:{view:"conversation",conversationId:e.conversationId}}),e.recordId&&r.push({key:"work",label:"Work",title:"Open work item",route:{view:"work",workId:e.recordId}}),e.agentId){const t=e.agentName??"Agent";r.push({key:"agent",label:t,title:`Open agent ${t}`,route:{view:"agents-v2",agentId:e.agentId}})}e.sessionId&&r.push({key:"session",label:"Session",title:"Open session",route:{view:"sessions",sessionId:e.sessionId}}),(e.flightId||e.invocationId)&&r.push({key:"follow",label:"Follow",title:"Follow live execution",route:{view:"follow",...e.flightId?{flightId:e.flightId}:{},...e.invocationId?{invocationId:e.invocationId}:{},...e.conversationId?{conversationId:e.conversationId}:{}}});const D=()=>w(i?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${i?" sys-audit-entry-expanded":""}`,onContextMenu:t=>{const j=window.getSelection()?.toString().trim(),d=[];j&&(d.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{k(j)}}),d.push({kind:"separator"}));const W=e.title??e.summary??"";if(W&&d.push({kind:"action",label:"Copy Details",onSelect:()=>{k(W)}}),e.actorName&&d.push({kind:"action",label:"Copy Actor",onSelect:()=>{k(e.actorName)}}),d.push({kind:"action",label:"Copy Event ID",onSelect:()=>{k(e.id)}}),r.length>0){d.push({kind:"separator"});for(const M of r)d.push({kind:"action",label:`Open ${M.label}`,onSelect:()=>a(M.route)})}K(t,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":i,onClick:D,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),D())},children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:I(e.ts)}),s.jsx("span",{className:"sys-audit-date",children:B(e.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${o.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:o.label}),s.jsx("span",{className:"sys-audit-kind",children:q(e.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:O(e.title??cs(e))}),s.jsx("p",{className:"sys-audit-summary",children:O(E)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:Q(e.actorName??"system")},children:rs(e.actorName)}),e.actorName??"system"]}),g&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",g]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(t=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:t.title,onClick:j=>{j.stopPropagation(),a(t.route)},children:t.label},t.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:i?"Close":"Details"})]}),i&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:e.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:B(e.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:e.actorName??"system"})]}),e.agentName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Agent"}),s.jsx("span",{className:"sys-detail-value",children:e.agentName})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:e.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:e.conversationId?u(e.conversationId):"Not attached"})]}),e.recordId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Work"}),s.jsx("span",{className:"sys-detail-value",children:u(e.recordId)})]}),e.sessionId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Session"}),s.jsx("span",{className:"sys-detail-value",children:u(e.sessionId)})]}),e.flightId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Flight"}),s.jsx("span",{className:"sys-detail-value",children:u(e.flightId)})]}),e.invocationId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Invocation"}),s.jsx("span",{className:"sys-detail-value",children:u(e.invocationId)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:e.id})]})]}),r.length>0&&s.jsx("div",{className:"sys-inline-actions",children:r.map(t=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(t.route),children:["Open ",t.label]},t.key))})]})]},e.id)})})]})}export{te as ActivityScreen};
@@ -1 +0,0 @@
1
- import{j as c}from"./index-Bli6bTLU.js";import{c as T}from"./Provider-Ve8yXaWR.js";import{a as D,S as I}from"./SpriteAvatar-DMrSssNZ.js";import{i as L,s as O,e as R}from"./colors-BtO5_zlx.js";const A={hero:{tile:!1,presence:!1,glow:!0},inspector:{sizes:{compact:32,regular:40,large:52},tile:!0,presence:!0},row:{sizes:{compact:20,regular:24,large:32},tile:!0,presence:!0},turn:{tile:!1,presence:!1},list:{tile:!1,presence:!1},roster:{tile:!1,presence:!1},node:{sizes:{compact:14,regular:16,large:20},tile:!1,presence:!1}},_={compact:.85,regular:1,large:1.25};function F(e,r){return A[e].sizes?.[r]}function k(e,r){if(r==="regular")return e;const t=Math.round(e*_[r]);return r==="compact"?Math.max(20,Math.min(e,t)):t}function G({agent:e,name:r,harness:t,state:d,kind:S="agent",placement:v="row",size:p,scaleWithPreference:x=!0,presence:w,tile:j,salt:z,className:s,channelClassName:E,style:n,title:i}){const a=e?.name??r??"?";if(S==="channel")return c.jsx("span",{className:E??s,style:n,title:i??a,children:"#"});const M=T(),o=A[v],f=x?M?.appearanceDetails?.avatarSize??"regular":"regular",g=p!=null?k(p,f):o.sizes?.[f],l=d??e?.state??null,m=D({harness:t??e?.harness??null,state:l}),h=w??o.presence,b=L(l),C=h&&b?O(l):void 0,P=h&&R(l),u=c.jsx(I,{name:a,size:g,hue:m?.hue,tone:m?.tone,salt:z,tile:j??o.tile,glow:o.glow,corner:C,cornerPulse:P,title:i??a});return g==null?c.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",...n},title:i??a,children:u}):s||n?c.jsx("span",{className:s,style:n,children:u}):u}export{G as A,F as p};
@@ -1 +0,0 @@
1
- import{r as t,j as s}from"./index-Bli6bTLU.js";import{E as L}from"./EmptyState-BnDda92b.js";import{a as R}from"./api-DEHEgJ9m.js";import{h as _}from"./NewChatComposer-Bgqes0UQ.js";import{d as K}from"./time-Dhsh_2EG.js";import{u as D}from"./Provider-Ve8yXaWR.js";import{o as U}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as q}from"./AgentsSubnav-3_vpn2bT.js";/* empty css */import{R as W}from"./refresh-cw-IgN2fZLM.js";import{S as V}from"./settings-BzWCF3NF.js";import{c as I}from"./createLucideIcon-DLlxGjKt.js";import{B as O}from"./bot-r2IuAuJd.js";import{W as Y}from"./wrench-CQvdf7KT.js";import{S as F}from"./server-Dt3tpiBj.js";import{C as J}from"./cpu-Bc268H9Q.js";import"./text-BR9Bap0E.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./colors-BtO5_zlx.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./keyboard-nav-7iEtvu9P.js";import"./x-BJyPzFnn.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./file-text-BVhkMWyC.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./SecondaryNav-cYTw2p39.js";import"./secondaryNavConfig-DyC_P9Wx.js";import"./message-square-DlY4EneU.js";import"./compass-BepM5iWH.js";import"./terminal-BiNIXhna.js";import"./git-branch-q8Ayc8py.js";import"./scroll-text-DRidbcse.js";const G=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],B=I("key-round",G);const Q=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],X=I("save",Q);function C(e){switch(e){case"ready":case"running":case"available":case"enabled":return"sys-chip-success";case"configured":case"installed":case"working":return"sys-chip-warning";case"missing":case"offline":case"not_ready":case"error":return"sys-chip-danger";default:return"sys-chip-neutral"}}function A(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function E(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function Z(e){return e.length>0?e.join(", "):"No capabilities reported"}function ss({runtime:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(J,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.label}),s.jsx("div",{className:"agent-config-row-detail",children:e.description}),s.jsx("div",{className:"agent-config-row-meta",children:e.detail})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${C(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function es({provider:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(B,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.protocol}),s.jsx("code",{className:"agent-config-code",children:e.baseUrl}),s.jsxs("div",{className:"agent-config-row-meta",children:["Keys: ",e.envKeys.join(", ")]}),s.jsx("div",{className:"agent-config-row-meta",children:e.note})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${C(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function as({agent:e,selected:l,navigate:p}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${l?" agent-config-row-selected":""}`,onClick:()=>p({view:"agents-v2",agentId:e.id,tab:"config"}),children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(O,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.id}),s.jsxs("div",{className:"agent-config-row-meta",children:[e.harness??"unknown harness"," / ",e.transport??"unknown transport",e.model?` / ${e.model}`:""]})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${C(e.status)}`,children:A(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:E(e.projectRoot??e.cwd)})]})]})}function T(e,l,p,n,o){l(e),p(e.model??""),n(e.runtime.cwd),o(e.runtime.harness)}function ns({agent:e,navigate:l,onConfigSaved:p}){const{route:n}=D(),o=e?.id??null,[c,f]=t.useState(null),[u,v]=t.useState(!1),[N,g]=t.useState(null),[x,d]=t.useState(""),[w,h]=t.useState(""),[y,a]=t.useState(""),[b,m]=t.useState(!1),[j,M]=t.useState("idle"),[$,k]=t.useState(null),S=t.useRef(0),z=t.useCallback(async()=>{const i=++S.current;if(k(null),m(!1),!o){f(null),g(null),v(!1);return}v(!0),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`);if(i!==S.current)return;T(r,f,d,h,a)}catch(r){if(i!==S.current)return;f(null),d(""),h(""),a(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===S.current&&v(!1)}},[e?.harness,o]);t.useEffect(()=>{z()},[z]);const P=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,y].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,y]),H=async i=>{if(i.preventDefault(),!(!o||!c||j==="saving")){M("saving"),k(null),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`,{method:"POST",body:JSON.stringify({model:x.trim()||null,runtime:{cwd:w.trim()||c.runtime.cwd,harness:y.trim()||c.runtime.harness},restart:b})});T(r.config,f,d,h,a),m(!1),k(r.restarted?"Saved and restarted":"Saved"),p?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{M("idle")}}};return e?s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:e.name}),s.jsx("p",{className:"sys-section-subtitle",children:e.id})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("button",{type:"button",className:"s-btn",onClick:()=>l({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{_(e).then(i=>{U(l,{view:"conversation",conversationId:i},{returnTo:n})})},children:"Open Chat"})]})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Status"}),s.jsx("span",{className:`sys-chip ${C(e.status)}`,children:A(e.status)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Harness"}),s.jsx("strong",{className:"agent-config-selectable",children:e.harness??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Transport"}),s.jsx("strong",{className:"agent-config-selectable",children:e.transport??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Reported model"}),s.jsx("strong",{className:"agent-config-selectable",children:e.model??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Configured model"}),s.jsx("strong",{className:"agent-config-selectable",children:u?"Loading...":c?c.model??"Harness default":"Not editable"})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Project"}),s.jsx("code",{className:"agent-config-inline-code",title:e.projectRoot??void 0,children:E(e.projectRoot)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Working dir"}),s.jsx("code",{className:"agent-config-inline-code",title:e.cwd??c?.runtime.cwd??void 0,children:E(e.cwd??c?.runtime.cwd??null)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Capabilities"}),s.jsx("span",{className:"agent-config-selectable",children:Z(e.capabilities)})]})]}),u&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-note",children:"Loading editable launch config..."})}),!u&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:H,children:[s.jsxs("div",{className:"agent-config-edit-grid",children:[s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Model"}),s.jsx("input",{name:"model",value:x,placeholder:"Harness default",disabled:!c.editable||j==="saving",onChange:i=>d(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:y,disabled:!c.editable||j==="saving",onChange:i=>a(i.currentTarget.value),children:P.map(i=>s.jsx("option",{value:i,children:i},i))})]}),s.jsxs("label",{className:"agent-config-field agent-config-field-wide",children:[s.jsx("span",{children:"Working dir"}),s.jsx("input",{name:"cwd",value:w,disabled:!c.editable||j==="saving",onChange:i=>h(i.currentTarget.value)})]})]}),s.jsxs("div",{className:"agent-config-save-row",children:[s.jsxs("label",{className:"agent-config-check",children:[s.jsx("input",{type:"checkbox",checked:b,disabled:!c.editable||j==="saving",onChange:i=>m(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||j==="saving",children:[s.jsx(X,{size:13}),j==="saving"?"Saving...":"Save config"]}),$&&s.jsx("span",{className:"agent-config-save-note",children:$}),N&&s.jsx("span",{className:"agent-config-save-error",children:N})]})]}),!u&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:N??"No editable local config found"})})]}):s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agent Details"}),s.jsx("p",{className:"sys-section-subtitle",children:"Select an agent to inspect runtime, model, and tool context."})]})}),s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agent selected"}),s.jsx("p",{children:"Choose an agent from the configuration roster."})]})]})}function ne({navigate:e,selectedAgentId:l}){const{route:p}=D(),[n,o]=t.useState(null),[c,f]=t.useState(!0),[u,v]=t.useState(!1),[N,g]=t.useState(null),x=t.useRef(0),d=t.useCallback(async(a="initial")=>{const b=++x.current;a==="initial"?f(!0):v(!0),g(null);try{const m=await R("/api/agent-config/snapshot");if(b!==x.current)return;o(m)}catch(m){if(b!==x.current)return;g(m instanceof Error?m.message:String(m))}finally{b===x.current&&(f(!1),v(!1))}},[]);t.useEffect(()=>{d()},[d]);const w=t.useMemo(()=>n?n.agents.find(a=>a.id===l)??n.agents[0]??null:null,[l,n]),h=n?.providers??[],y=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(h.length),detail:`${h.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>A(a.status)!=="not ready").length} ready`},{label:"Broker",value:n.broker.label,detail:n.broker.nodeId??"No node id"}]:[];return s.jsxs("div",{className:"s-secondary-nav-shell",children:[s.jsx("div",{className:"s-secondary-nav-bar",children:s.jsx(q,{activeRoute:p,navigate:e})}),s.jsx("div",{className:"s-secondary-nav-body s-secondary-nav-body--scroll",children:s.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Agent Configuration"}),s.jsx("p",{className:"sys-page-subtitle",children:"Runtimes, agents, project inventory, delivery bridges, and the missing tool/provider surfaces in one control plane."})]}),s.jsxs("div",{className:"sys-page-actions",children:[n&&s.jsxs("div",{className:"sys-sync-note",children:["Updated ",K(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:c||u,onClick:()=>{d("manual")},children:[s.jsx(W,{size:13}),u?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:y.map(a=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:a.label}),s.jsx("strong",{className:"sys-stat-value",children:a.value}),s.jsx("span",{className:"sys-stat-detail",children:a.detail})]},a.label))}),N&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:N})]}),c&&!n&&s.jsx(L,{title:"Loading configuration",body:"Reading Scout settings, runtime readiness, broker agents, and project inventory."}),n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Runtimes"}),s.jsx("p",{className:"sys-section-subtitle",children:"Harness readiness replaces provider auth for the current local-first posture."})]}),s.jsx(V,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ss,{runtime:a},a.id))})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"BYOK Providers"}),s.jsx("p",{className:"sys-section-subtitle",children:"OpenAI-compatible vendors OpenScout can discover from local environment configuration."})]}),s.jsx(B,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:h.map(a=>s.jsx(es,{provider:a},a.id))})]})]}),s.jsxs("div",{className:"agent-config-layout agent-config-layout-primary",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agents"}),s.jsx("p",{className:"sys-section-subtitle",children:"Broker-visible endpoints with runtime, model, and source state."})]}),s.jsx(O,{size:15})]}),s.jsx("div",{className:"agent-config-list agent-config-list-scroll",children:n.agents.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agents registered"}),s.jsx("p",{children:"Run setup or start a local agent to populate this roster."})]}):n.agents.map(a=>s.jsx(as,{agent:a,selected:a.id===w?.id,navigate:e},a.id))})]}),s.jsx(ns,{agent:w,navigate:e,onConfigSaved:()=>{d("manual")}})]}),s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tools & Context"}),s.jsx("p",{className:"sys-section-subtitle",children:"The next model boundary to make first-class."})]}),s.jsx(Y,{size:15})]}),s.jsx("p",{className:"agent-config-copy",children:n.toolContext.note}),s.jsxs("div",{className:"agent-config-chip-row",children:[s.jsxs("span",{className:"sys-chip sys-chip-neutral",children:[n.toolContext.mcpServerCount," MCP servers"]}),s.jsx("span",{className:"sys-chip sys-chip-warning",children:"loadouts pending"})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Broker & Delivery"}),s.jsx("p",{className:"sys-section-subtitle",children:"Control-plane state and bridges that route attention back to you."})]}),s.jsx(F,{size:15})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Broker"}),s.jsx("span",{className:`sys-chip ${n.broker.healthy?"sys-chip-success":"sys-chip-danger"}`,children:n.broker.label})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Messages"}),s.jsx("strong",{children:n.broker.messageCount})]}),n.integrations.map(a=>s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:a.name}),s.jsx("span",{children:a.detail})]},a.id))]})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Known Missing Pieces"}),s.jsx("p",{className:"sys-section-subtitle",children:"The configuration model is now visible; these are the next root-cause surfaces to build."})]})}),s.jsx("div",{className:"agent-config-gap-list",children:n.gaps.map(a=>s.jsx("span",{children:a},a))})]})]})]})})]})}export{ne as AgentConfigurationScreen};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./index-Bli6bTLU.js";import{A as k}from"./AgentAvatar-B1xvQ7ej.js";import{a as R}from"./api-DEHEgJ9m.js";import{c as T}from"./colors-BtO5_zlx.js";import{t as D}from"./time-Dhsh_2EG.js";import{u as M}from"./Provider-Ve8yXaWR.js";import{a as I}from"./agent-specialization-CNrsRbKA.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as $}from"./FileViewerPane-Dg7_88pv.js";/* empty css */import{C as z}from"./chevron-right-BMqtBds_.js";import{C as L}from"./chevron-down-Da5tV19_.js";import{F as H,a as U}from"./DocumentFocusViewer-DmtFisY9.js";import{F as G}from"./file-text-BVhkMWyC.js";import"./SpriteAvatar-DMrSssNZ.js";import"./agent-identity-DzHGhLdJ.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./createLucideIcon-DLlxGjKt.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./x-BJyPzFnn.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";function B({payload:t,selectedSlug:i,selectedFile:v,filter:S,collapsed:n,onToggleFolder:N,onSelectFile:h}){const p=S.trim().toLowerCase(),b=t.folders.filter(o=>!p||o.slug.includes(p)?!0:o.files.some(c=>c.name.toLowerCase().includes(p)||c.relativePath.toLowerCase().includes(p)));return b.length===0?e.jsx("div",{className:"adef-treeEmpty",children:t.agentsRootExists?"No agent folders in .agents yet.":"No .agents directory on disk."}):e.jsx(e.Fragment,{children:b.map(o=>{const c=n.has(o.slug),C=o.slug===i;return e.jsxs("div",{className:"adef-folder","data-selected-agent":C||void 0,children:[e.jsxs("button",{type:"button",className:"adef-folderRow",onClick:()=>N(o.slug),children:[e.jsx("span",{className:"adef-folderChevron","aria-hidden":!0,children:c?e.jsx(z,{size:12}):e.jsx(L,{size:12})}),e.jsx("span",{className:"adef-folderIcon","aria-hidden":!0,children:c?e.jsx(H,{size:13}):e.jsx(U,{size:13})}),e.jsx("span",{className:"adef-folderName",children:o.slug})]}),c?null:o.files.map(d=>{const f=v?.absolutePath===d.absolutePath;return e.jsxs("button",{type:"button",className:"adef-fileRow","data-selected":f||void 0,onClick:()=>h({slug:o.slug,name:d.name,relativePath:`.agents/${d.relativePath}`,absolutePath:d.absolutePath,excerpt:d.excerpt}),children:[e.jsx("span",{className:"adef-fileIcon","aria-hidden":!0,children:e.jsx(G,{size:12})}),e.jsx("span",{className:"adef-fileName",children:d.name})]},d.absolutePath)})]},o.slug)})})}function J({agent:t,config:i,onConfigSaved:v,sessionCatalog:S,navigate:n,homeView:N}){const h=I(t,i),p=t.handle?.replace(/^@+/,"")||t.name,b=S?.sessions.length??0,[o,c]=l.useState(""),[C,d]=l.useState(""),[f,x]=l.useState(""),[E,w]=l.useState(!1),[m,g]=l.useState("idle"),[P,y]=l.useState(null),[j,F]=l.useState(null);l.useEffect(()=>{if(!i){c(""),d(""),x(t.harness??"");return}c(i.model??""),d(i.runtime.cwd),x(i.runtime.harness),w(!1),y(null),F(null)},[t.harness,t.id,i]);const A=l.useMemo(()=>{const s=["claude","codex","pi",i?.runtime.harness,t.harness,f].filter(u=>!!u?.trim());return Array.from(new Set(s))},[t.harness,i?.runtime.harness,f]),a=async s=>{if(s.preventDefault(),!(!i||m==="saving")){g("saving"),y(null),F(null);try{const u=await R(`/api/agents/${encodeURIComponent(t.id)}/config`,{method:"POST",body:JSON.stringify({model:o.trim()||null,runtime:{cwd:C.trim()||i.runtime.cwd,harness:f.trim()||i.runtime.harness},restart:E})});v(u.config),w(!1),y(u.restarted?"Saved and restarted":"Saved")}catch(u){F(u instanceof Error?u.message:"Could not save config")}finally{g("idle")}}},r=()=>n({view:N,agentId:t.id,tab:"profile"});return e.jsxs("aside",{className:"adef-inspector",children:[e.jsxs("header",{className:"adef-inspectorHead",children:[e.jsx(k,{agent:t,size:36,tile:!0,presence:!1}),e.jsxs("div",{className:"adef-inspectorIdent",children:[e.jsxs("span",{className:"adef-inspectorHandle",children:["@",p]}),e.jsx("span",{className:"adef-inspectorSpec",children:h.headline})]})]}),e.jsxs("dl",{className:"adef-inspectorFacts",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"State"}),e.jsx("dd",{children:T(t.state,t)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sessions"}),e.jsx("dd",{children:b})]})]}),i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"adef-inspectorSec",children:"Runtime"}),e.jsxs("form",{className:"adef-configEdit",onSubmit:a,children:[e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Model"}),e.jsx("input",{value:o,placeholder:"Harness default",disabled:!i.editable||m==="saving",onChange:s=>c(s.currentTarget.value)})]}),e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Harness"}),e.jsx("select",{value:f,disabled:!i.editable||m==="saving",onChange:s=>x(s.currentTarget.value),children:A.map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsxs("label",{className:"adef-configField adef-configField--wide",children:[e.jsx("span",{children:"Working dir"}),e.jsx("input",{value:C,disabled:!i.editable||m==="saving",onChange:s=>d(s.currentTarget.value)})]}),e.jsxs("div",{className:"adef-configSaveRow",children:[e.jsxs("label",{className:"adef-configCheck",children:[e.jsx("input",{type:"checkbox",checked:E,disabled:!i.editable||m==="saving",onChange:s=>w(s.currentTarget.checked)}),e.jsx("span",{children:"Restart"})]}),e.jsx("button",{type:"submit",className:"adef-inspectorAct","data-primary":!0,disabled:!i.editable||m==="saving",children:m==="saving"?"Saving…":"Save"})]}),P?e.jsx("p",{className:"adef-inspectorMeta",children:P}):null,j?e.jsx("p",{className:"adef-configError",children:j}):null]}),e.jsx("div",{className:"adef-inspectorSec",children:"Permissions"}),e.jsx("p",{className:"adef-inspectorMono",children:O(i.permissionProfile)}),e.jsx("div",{className:"adef-inspectorSec",children:"Tools"}),e.jsx("div",{className:"adef-inspectorChips",children:(h.capabilities.length>0?h.capabilities:["—"]).map(s=>e.jsx("span",{className:"adef-inspectorChip",children:s},s))})]}):e.jsx("p",{className:"adef-inspectorMeta",children:"No editable local config on disk."}),t.updatedAt?e.jsxs("p",{className:"adef-inspectorMeta",children:["Updated ",D(t.updatedAt)]}):null,e.jsx("div",{className:"adef-inspectorActs",children:e.jsx("button",{type:"button",className:"adef-inspectorAct","data-primary":!0,onClick:r,children:"Sessions"})})]})}function Me({agent:t,navigate:i,homeView:v="agents-v2"}){const{openFilePreview:S}=M(),[n,N]=l.useState(null),[h,p]=l.useState(null),[b,o]=l.useState(null),[c,C]=l.useState(null),[d,f]=l.useState("loading"),[x,E]=l.useState(""),[w,m]=l.useState(()=>new Set),[g,P]=l.useState(null),y=l.useCallback(async a=>{await R("/api/file/reveal",{method:"POST",body:JSON.stringify({path:a})}).catch(()=>{})},[]);l.useEffect(()=>{let a=!1;return f("loading"),(async()=>{const[r,s,u]=await Promise.allSettled([R(`/api/agents/${encodeURIComponent(t.id)}/definitions`),R(`/api/agents/${encodeURIComponent(t.id)}/config`).catch(()=>null),R(`/api/agents/${encodeURIComponent(t.id)}/session-catalog`).catch(()=>null)]);a||(r.status==="fulfilled"&&N(r.value),s.status==="fulfilled"&&p(s.value),u.status==="fulfilled"&&o(u.value),f("ready"))})(),()=>{a=!0}},[t.id]);const j=l.useMemo(()=>{if(!n)return null;const a=n.folders.find(s=>s.slug===n.selectedSlug)??n.folders[0]??null,r=a?.files.find(s=>s.name==="AGENT.md")??a?.files[0]??null;return!a||!r?null:{slug:a.slug,name:r.name,relativePath:`.agents/${r.relativePath}`,absolutePath:r.absolutePath,excerpt:r.excerpt}},[n]);l.useEffect(()=>{j&&(P(a=>a&&n?.folders.some(r=>r.files.some(s=>s.absolutePath===a.absolutePath))?a:j),n?.selectedSlug&&m(a=>{const r=new Set(a);return r.delete(n.selectedSlug),r}))},[j,n]);const F=n?.folders.reduce((a,r)=>a+r.files.length,0)??0,A=l.useCallback(a=>{m(r=>{const s=new Set(r);return s.has(a)?s.delete(a):s.add(a),s})},[]);return e.jsxs("div",{className:"adef-workspace",children:[e.jsxs("header",{className:"adef-head",children:[e.jsxs("div",{className:"adef-headCopy",children:[e.jsx("span",{className:"adef-headKind",children:"Config"}),e.jsxs("span",{className:"adef-headPath",title:n?.agentsRoot,children:[n?.agentsRootExists?".agents · explore & edit":"explore & edit",n?` · ${n.folders.length} agents · ${F} files`:""]})]}),e.jsx("input",{type:"search",className:"adef-filter",placeholder:"Filter agents & files…",value:x,onChange:a=>E(a.target.value)})]}),d==="loading"?e.jsx("div",{className:"adef-loading",children:"Loading agent config…"}):e.jsxs("div",{className:"adef-frame",children:[e.jsx("aside",{className:"adef-tree","aria-label":"Agent definition files",children:n?e.jsx(B,{payload:n,selectedSlug:n.selectedSlug,selectedFile:g,filter:x,collapsed:w,onToggleFolder:A,onSelectFile:P}):null}),e.jsx("section",{className:"adef-viewer","aria-label":"Definition file",children:g?e.jsx($,{artifact:g,onOpen:S,onReveal:a=>{y(a)},onBrowse:n?a=>i({view:"code",root:n.projectRoot,file:a}):void 0}):e.jsx("div",{className:"av2-repoViewerState",children:n?.agentsRootExists?"Select a definition file — or create .agents/<handle>/AGENT.md":"Create .agents/<handle>/AGENT.md in the project root to define this expert on disk."})}),e.jsx(J,{agent:t,config:h,onConfigSaved:p,sessionCatalog:c,navigate:i,homeView:v})]})]})}export{Me as AgentDefinitionsWorkspace};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./index-Bli6bTLU.js";/* empty css */import{H as Me}from"./HarnessMark-DGZ6o6Ct.js";import{a as ue,S as fe}from"./SpriteAvatar-DMrSssNZ.js";import{n as Ze}from"./colors-BtO5_zlx.js";import{o as He,l as Ke}from"./lane-observe-vfyACHi0.js";import{t as We}from"./time-Dhsh_2EG.js";import{S as Be}from"./SessionObserve-zAlFbwFn.js";import{l as X,i as Ge}from"./agent-lanes-model-BKOs_32K.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-pHT3TAVs.js";import"./agent-identity-DzHGhLdJ.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-197xYmRp.js";import"./index-DFdlQs_c.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-DEHEgJ9m.js";import"./mentions-Cd6XticV.js";import"./Provider-Ve8yXaWR.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./message-markup-DAnnGpWr.js";import"./ObservedTopologyPanel-D85P6RAk.js";import"./ObserveTextFlow-C1f5oize.js";import"./use-reduced-motion-BLn59zLn.js";import"./proxy-C35W-YHZ.js";import"./SessionObserveEvidence-BVawzqoE.js";import"./message-circle-44KSmbvQ.js";import"./wrench-CQvdf7KT.js";import"./external-link-BGHC_naA.js";import"./context-budget-DX_fwUs3.js";const z=5*6e4,qe=6,Z=qe+1,be=8,Ue=30*6e4,ye=.65,Ae=1.45,ke=.1,ve=360,Se=260;function pe(t){return Math.round(Math.min(Ae,Math.max(ye,t))*100)/100}function se(t,o){return Math.round(Math.min(o,Math.max(-o,t)))}const I=164,ne=56,$e=14,Le=12,C=66,me=7,P=96,ce=12,D=88,M=150,Je=48,Qe=24,et=480,tt=38,Oe="openscout:agent-floor-orient",Ee="openscout:agent-floor-lane-order";function st(){try{const t=localStorage.getItem(Oe);if(t==="past-left"||t==="past-right")return t}catch{}return"past-left"}function nt(){try{const t=JSON.parse(sessionStorage.getItem(Ee)??"[]");return Array.isArray(t)?t.filter(o=>typeof o=="string"):[]}catch{return[]}}function ae(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}const at=/^(edit|multi_?edit|write|apply_?patch|patch_apply|str_?replace|notebook_?edit|create_file)/i;function ot(t){return t.kind==="tool"?t.diff||t.tool&&at.test(t.tool.trim())?"edit":"tool":t.kind==="message"||t.kind==="ask"?"msg":null}function lt(t,o){const a=t.observe?.metadata?.session?.sessionStart,l={tool:0,edit:0,msg:0},c=Array.from({length:Z},()=>({blocks:[],counts:{tool:0,edit:0,msg:0},tools:new Map,total:0})),u=[];let b=0,g=null;for(const m of t.observe?.events??[]){const r=ot(m);if(!r)continue;const d=He(m,a),w=d===null||d>=o?0:Math.floor((o-d)/z)+1;if(w>=Z)continue;const _=c[w];_.blocks.push(r),_.counts[r]+=1,_.total+=1,l[r]+=1,b+=1;const x=r==="msg"?null:m.tool?.trim()||"tool";x&&_.tools.set(x,(_.tools.get(x)??0)+1),u.push({kind:r,label:r==="msg"?Ke(m.text,44,1):m.text.trim()||x||"tool",at:d}),g={at:d,label:r==="msg"?"message":m.tool?.trim()||"tool"}}return{lane:t,live:Ge(t.observe)&&b>0,slots:c.map(m=>({blocks:m.blocks.slice(-8),counts:m.counts,tools:[...m.tools.entries()].sort((r,d)=>d[1]-r[1]),total:m.total})),counts:l,strip:u.slice(-10).map(m=>m.kind),lastLabel:g?.label??null,lastAt:g?.at??(t.lastActiveAt||null)}}function oe(t){const o=(a,l,c)=>`${a} ${a===1?l:c}`;return[o(t.tool,"tool","tools"),o(t.edit,"edit","edits"),o(t.msg,"msg","msgs")].join(" · ")}function rt(t){return/^(working|active|running|in_turn|in_flight)/i.test(t.lane.agent.state??"")?"quiet":"idle"}function F(t){return t.tool+t.edit+t.msg}function we(t){if(F(t)===0)return"quiet";const a=[["tool-led",t.tool],["edit-heavy",t.edit],["conversation-led",t.msg]].sort((l,c)=>c[1]-l[1]);return a[0][1]===a[1][1]?"balanced":a[0][0]}function it(t){const o=new Map;for(const l of t.slots)for(const[c,u]of l.tools)o.set(c,(o.get(c)??0)+u);const[a]=[...o.entries()].sort((l,c)=>c[1]-l[1]);return a?{value:a[0],detail:`${a[1]} call${a[1]===1?"":"s"} · 30m`}:{value:"no tool pattern",detail:"messages and edits only"}}function ct(t){const o=t.slots[0]?.total??0,a=t.slots[1]?.total??0;return o===0&&a===0?{value:"quiet",detail:"no work in the last 10m"}:o===0?{value:"paused",detail:`${a} in the prior 5m`}:a===0?{value:"new burst",detail:`${o} in the current 5m`}:o>=a+3?{value:"building",detail:`${o} now · ${a} prior`}:a>=o+3?{value:"easing",detail:`${o} now · ${a} prior`}:{value:"steady",detail:`${o} now · ${a} prior`}}function L({label:t,value:o,detail:a,mix:l}){const c=l?Math.max(1,F(l)):1;return e.jsxs("span",{className:"agent-floor__dock-insight",children:[e.jsx("span",{className:"agent-floor__dock-insight-label",children:t}),e.jsx("span",{className:"agent-floor__dock-insight-value",children:o}),e.jsx("span",{className:"agent-floor__dock-insight-detail",children:a}),l?e.jsx("span",{className:"agent-floor__dock-mix",style:{"--mix-tool":`${l.tool/c*100}%`,"--mix-edit":`${(l.tool+l.edit)/c*100}%`},"aria-hidden":"true"}):null]})}function Ce(t,o){const a=t.lastAt?We(t.lastAt,o):null;return t.live?{glyph:"▸",label:t.lastLabel??"working",meta:a??"now"}:{glyph:"⏸",label:rt(t),meta:a?`· ${a}`:""}}function Fe({series:t,now:o}){const a=Ce(t,o);return t.live?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-run",children:a.glyph}),e.jsx("span",{className:"agent-floor__card-tool",children:a.label}),e.jsx("span",{className:"agent-floor__card-ago",children:a.meta})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-pause",children:a.glyph}),e.jsxs("span",{className:"agent-floor__card-idle",children:[a.label,a.meta?` ${a.meta}`:""]})]})}function de({kind:t,z:o,size:a=ne,faceH:l=Le,pad:c,live:u}){return e.jsxs("span",{className:`agent-floor__block is-${t}${c?" is-pedestal":""}${u?" is-live":""}`,style:{"--z":`${o}px`,"--bs":`${a}px`,"--bh":`${l}px`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function dt({slot:t}){const o=Math.max(1,t.total),a=t.counts.tool/o*100,l=t.counts.edit/o*100;return e.jsxs("span",{className:"agent-floor__block agent-floor__slab",style:{"--z":"0px","--bs":`${C}px`,"--bh":`${me}px`,"--mix-a":`${a.toFixed(1)}%`,"--mix-b":`${(a+l).toFixed(1)}%`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function pt({slot:t,slotIndex:o,periodStart:a}){const l=o===0?`${ae(a)} — now`:`${ae(a-o*z)} – ${ae(a-(o-1)*z)}`;return e.jsxs("span",{className:"agent-floor__peek",children:[e.jsx("span",{className:"agent-floor__peek-range",children:l}),e.jsxs("span",{className:"agent-floor__peek-cols",children:[e.jsxs("span",{className:"agent-floor__peek-col",children:[t.tools.slice(0,3).map(([c,u])=>e.jsxs("span",{className:"agent-floor__peek-tool",children:[c,u>1?` ×${u}`:""]},c)),t.tools.length===0?e.jsx("span",{className:"agent-floor__peek-tool is-empty",children:"no tools"}):null]}),e.jsxs("span",{className:"agent-floor__peek-col is-right",children:[e.jsxs("span",{children:[t.counts.edit," edit",t.counts.edit===1?"":"s"]}),e.jsxs("span",{children:[t.counts.msg," msg",t.counts.msg===1?"":"s"]})]})]})]})}function mt({series:t,index:o,planeW:a,flip:l,periodStart:c,now:u,focused:b,pinned:g,dimmed:m,peekSlot:r,onFocus:d,onPeek:w,onSelect:_}){const{lane:x,live:j,slots:S}=t,O=x.agent,$=X(O,x.source),R=ue(O),H=l?(M-P)/2:a-M+(M-P)/2,Y=(I-P)/2,K=(I-C)/2,le=k=>{const N=(D-C)/2;return l?M+k*D+N:a-M-(k+1)*D+N},W=ce+tt+o%2*14;return e.jsxs("button",{type:"button",className:`agent-floor__lane${j?" is-live":""}${o%2===1?" is-alt":""}${b?" is-focus":""}${g?" is-pinned":""}${m?" is-dim":""}`,style:{left:0,top:o*I,width:a,height:I},onClick:()=>_(x),onMouseEnter:()=>d(x.id),onMouseLeave:()=>{d(null),w(x.id,null)},"aria-label":g?`${$} — open timeline`:`${$} — pin details`,children:[e.jsx("span",{className:"agent-floor__lane-strip","aria-hidden":"true"}),S.map((k,N)=>{if(k.total===0)return null;const B=b&&r===N,T=me+2+k.blocks.length*$e;return e.jsxs("span",{className:`agent-floor__stack${N===0?" is-now":" is-minted"}${B?" is-peeking":""}`,style:{left:le(N),top:K},onMouseEnter:()=>w(x.id,N),children:[e.jsx(dt,{slot:k}),e.jsx("span",{className:"agent-floor__stack-blocks",style:{left:(C-ne)/2,top:(C-ne)/2},children:k.blocks.map((re,y)=>e.jsx(de,{kind:re,z:me+2+y*$e},y))}),B?e.jsx("span",{className:"agent-floor__bb agent-floor__peek-anchor",style:{left:C/2,top:C/2,"--z":`${T+46}px`},children:e.jsx(pt,{slot:k,slotIndex:N,periodStart:c})}):null]},N)}),e.jsxs("span",{className:"agent-floor__pad",style:{left:H,top:Y},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__ground"}),e.jsx(de,{kind:"pad",z:0,size:P,faceH:ce,pad:!0}),j?e.jsx(de,{kind:"head",z:ce+2,size:ne,faceH:Le,live:!0}):null]}),e.jsx("span",{className:"agent-floor__bb agent-floor__flag-anchor",style:{left:H+P/2,top:Y+P/2,"--z":`${W}px`},children:e.jsxs("span",{className:`agent-floor__flag${b?" is-focus":""}${g?" is-pinned":""}`,children:[e.jsx(fe,{name:O.name,size:15,tile:!0,hue:R.hue,tone:R.tone}),e.jsx("span",{className:"agent-floor__flag-name",children:$}),e.jsx("span",{className:"agent-floor__flag-action",children:e.jsx(Fe,{series:t,now:u})}),e.jsx("span",{className:`agent-floor__card-dot${j?" is-live":""}`})]})})]})}function ut({focus:t,pinned:o,ledger:a,liveCount:l,now:c}){if(!t){const d=a.reduce((j,S)=>(j.tool+=S.counts.tool,j.edit+=S.counts.edit,j.msg+=S.counts.msg,j),{tool:0,edit:0,msg:0}),w=a.filter(j=>F(j.counts)>0).length,_=[...a].sort((j,S)=>F(S.counts)-F(j.counts))[0]??null,x=_?F(_.counts):0;return e.jsxs("div",{className:"agent-floor__dock is-resting",children:[e.jsx("span",{className:"agent-floor__dock-id agent-floor__dock-fleet",children:e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsx("span",{className:"agent-floor__dock-title",children:"fleet at a glance"}),e.jsxs("span",{children:[a.length," lane",a.length===1?"":"s"," · ",l," live"]})]})}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"coverage",value:`${w}/${a.length} lanes`,detail:"showed work · 30m"}),e.jsx(L,{label:"hottest lane",value:_?X(_.lane.agent,_.lane.source):"none yet",detail:_?`${x} classified events`:"waiting for activity"}),e.jsx(L,{label:"throughput",value:`${F(d)} events`,detail:"classified · 30m"}),e.jsx(L,{label:"activity mix",value:we(d),detail:oe(d),mix:d})]})]})}const u=t.lane.agent,b=ue(u),g=ct(t),m=it(t),r=t.slots.filter(d=>d.total>0).length;return e.jsxs("div",{className:`agent-floor__dock${o?" is-pinned":""}`,children:[e.jsxs("span",{className:"agent-floor__dock-id",children:[e.jsx(fe,{name:u.name,size:30,tile:!0,hue:b.hue,tone:b.tone}),e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsxs("span",{className:"agent-floor__dock-name",children:[X(u,t.lane.source),e.jsx(Me,{harness:u.harness,size:12,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${t.live?" is-live":""}`}),o?e.jsx("span",{className:"agent-floor__dock-lock",children:"locked"}):null]}),e.jsx("span",{className:"agent-floor__dock-action",children:e.jsx(Fe,{series:t,now:c})})]})]}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"momentum",value:g.value,detail:g.detail}),e.jsx(L,{label:"cadence",value:`${r}/${t.slots.length} windows`,detail:"active five-minute bands"}),e.jsx(L,{label:"signature",value:m.value,detail:m.detail}),e.jsx(L,{label:"activity mix",value:we(t.counts),detail:oe(t.counts),mix:t.counts})]})]})}function ft({series:t,now:o,concise:a,onConciseChange:l,onClose:c,onOpenFull:u,operatorName:b}){const{agent:g,observe:m,source:r}=t.lane,d=X(g,r);return e.jsxs("aside",{className:"agent-floor__trace-panel","aria-label":`${d} selected lane trace`,children:[e.jsx("button",{type:"button",className:"agent-floor__trace-close",onClick:c,"aria-label":"Close selected lane trace",children:"×"}),e.jsx("div",{className:"agent-floor__trace-body",children:m?e.jsx(Be,{data:m,agentId:r==="scout"?g.id:void 0,sessionId:g.harnessSessionId,showRail:!1,variant:"lane",nowMs:o,traceWindowMs:Ue,traceWindowLabel:"30m",laneCollapseTechnicalEvents:a,onLaneCollapseTechnicalEventsChange:l,laneOperatorName:b,onLaneEventSelect:u}):e.jsx("div",{className:"agent-floor__trace-empty",children:"Waiting for trace activity…"})})]})}function gt({zoom:t,fit:o,onZoomChange:a,onReset:l}){const c=Math.round(t*100);return e.jsxs("div",{className:"agent-floor__zoom",role:"group","aria-label":"Floor zoom",children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:t<=ye,onClick:()=>a(pe(t-ke)),children:"−"}),e.jsx("button",{type:"button",className:"agent-floor__zoom-reset","aria-label":"Reset floor zoom to fit",title:"Reset zoom and position to automatic fit",onClick:l,children:o?"fit":`${c}%`}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:t>=Ae,onClick:()=>a(pe(t+ke)),children:"+"})]})}function ys({lanes:t,now:o,onOpenTrace:a,railLedger:l=!1,operatorName:c}){const[u,b]=i.useState(st),[g,m]=i.useState(null),[r,d]=i.useState(null),[w,_]=i.useState(null),[x,j]=i.useState(!1),[S,O]=i.useState(1),[$,R]=i.useState({x:0,y:0}),[H,Y]=i.useState(!1),[K,le]=i.useState(nt),W=i.useRef(null),k=i.useRef(null),[N,B]=i.useState(null),T=u==="past-right";i.useEffect(()=>{const s=W.current;if(!s)return;const n=new ResizeObserver(p=>{const h=p[0]?.contentRect;h&&B(f=>f&&Math.abs(f.w-h.width)<2&&Math.abs(f.h-h.height)<2?f:{w:h.width,h:h.height})});return n.observe(s),()=>n.disconnect()},[]);const re=i.useCallback(()=>{b(s=>{const n=s==="past-left"?"past-right":"past-left";try{localStorage.setItem(Oe,n)}catch{}return n})},[]),y=i.useCallback(s=>{m(s),s===null&&_(null)},[]),Re=i.useCallback((s,n)=>{_(n===null?null:{laneId:s,slot:n})},[]),G=i.useCallback(s=>{r===s.id?a(s):d(s.id)},[r,a]),Te=i.useCallback(()=>{O(1),R({x:0,y:0})},[]),Pe=i.useCallback(s=>{if(!(s.target instanceof Element?s.target:null)?.closest(".agent-floor__trace-panel, .agent-floor__zoom")){if(s.preventDefault(),s.metaKey||s.ctrlKey){O(p=>pe(p-s.deltaY*.002));return}R(p=>({x:se(p.x-s.deltaX,ve),y:se(p.y-s.deltaY,Se)}))}},[]),Ie=i.useCallback(s=>{const n=s.target instanceof Element?s.target:null;s.button!==0||n?.closest("button, .agent-floor__trace-panel")||(k.current={pointerId:s.pointerId,startX:s.clientX,startY:s.clientY,panX:$.x,panY:$.y},s.currentTarget.setPointerCapture(s.pointerId),Y(!0))},[$]),ze=i.useCallback(s=>{const n=k.current;!n||n.pointerId!==s.pointerId||R({x:se(n.panX+s.clientX-n.startX,ve),y:se(n.panY+s.clientY-n.startY,Se)})},[]),ge=i.useCallback(s=>{k.current?.pointerId===s.pointerId&&(k.current=null,s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),Y(!1))},[]);i.useEffect(()=>{if(r===null)return;const s=n=>{n.key==="Escape"&&d(null)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[r]);const V=Math.floor(o/z)*z,q=i.useMemo(()=>{const s=new Map(t.map(f=>[f.id,f])),n=K.flatMap(f=>{const te=s.get(f);return te?[te]:[]}),p=new Set(n.map(f=>f.id)),h=t.filter(f=>!p.has(f.id)).sort((f,te)=>te.lastActiveAt-f.lastActiveAt);return n.concat(h)},[t,K]);i.useEffect(()=>{const s=q.map(n=>n.id);le(n=>n.length===s.length&&n.every((p,h)=>p===s[h])?n:s);try{sessionStorage.setItem(Ee,JSON.stringify(s))}catch{}},[q]);const{series:U,hidden:J,planeW:E,planeD:Q,lanesStartY:_e}=i.useMemo(()=>{const s=q.map(f=>lt(f,V)),n=s.slice(0,be),p=n.length*I,h=Math.max(et,p+Qe*2);return{series:n,hidden:s.slice(be),planeW:Je+Z*D+M,planeD:h,lanesStartY:(h-p)/2}},[q,V]),v=i.useMemo(()=>U.concat(J),[U,J]),ie=v.filter(s=>s.live).length,A=g??r,De=A===null?null:v.find(s=>s.lane.id===A)??null,ee=r===null?null:v.find(s=>s.lane.id===r)??null;i.useEffect(()=>{r!==null&&!v.some(s=>s.lane.id===r)&&d(null)},[v,r]),i.useEffect(()=>{j(!1)},[r]),i.useEffect(()=>{if(!l)return;const s=v.map(n=>{const p=Ce(n,o);return{id:n.lane.id,label:X(n.lane.agent,n.lane.source),statusLabel:n.lane.agent.harness?.trim()||"lane",tone:Ze(n.lane.agent.state,n.lane.agent),updatedAt:n.lane.lastActiveAt>0?n.lane.lastActiveAt:void 0,floor:{live:n.live,harness:n.lane.agent.harness,actionGlyph:p.glyph,actionLabel:p.label,actionMeta:p.meta,strip:n.strip,countsLabel:oe(n.counts)}}});Ve(s)},[l,v,o]),i.useEffect(()=>{if(l)return je({onHover:y,onSelect:s=>{const n=v.find(p=>p.lane.id===s);n&&G(n.lane)}}),()=>je(null)},[l,v,y,G]),i.useEffect(()=>{if(l)return Ne(A),()=>Ne(null)},[l,A]);const he=s=>T?M+s*D:E-M-s*D,xe=_e+U.length*I+26,Xe=i.useMemo(()=>{if(!N)return 1;const s=E+Q,n=.708*s+60,p=.386*s+250,h=Math.min(N.w/n,N.h/p);return Math.round(Math.min(1.6,Math.max(.7,h))*100)/100},[N,E,Q]),Ye=Math.round(Xe*S*100)/100;return e.jsxs("div",{className:`agent-floor${l?" is-rail-ledger":""}`,"data-live-count":ie,"data-floor-orient":u,children:[e.jsxs("div",{className:"agent-floor__body",children:[l?null:e.jsxs("aside",{className:"agent-floor__ledger","aria-label":"Fleet ledger",children:[e.jsxs("header",{className:"agent-floor__ledger-head",children:[e.jsx("span",{className:"agent-floor__ledger-title",children:"fleet"}),e.jsxs("span",{className:"agent-floor__ledger-meta",children:[v.length," lane",v.length===1?"":"s"," · ",ie," live"]}),e.jsx("span",{className:"agent-floor__ledger-trace",children:"trace 30m"})]}),e.jsx("div",{className:"agent-floor__ledger-rows",children:v.map(s=>{const n=s.lane.agent,p=ue(n);return e.jsxs("button",{type:"button",className:`agent-floor__ledger-row${A===s.lane.id?" is-focus":""}`,onClick:()=>G(s.lane),onMouseEnter:()=>y(s.lane.id),onMouseLeave:()=>y(null),children:[e.jsxs("span",{className:"agent-floor__ledger-id",children:[e.jsx(fe,{name:n.name,size:18,tile:!0,hue:p.hue,tone:p.tone}),e.jsx("span",{className:"agent-floor__ledger-name",children:X(n,s.lane.source)}),e.jsx(Me,{harness:n.harness,size:11,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${s.live?" is-live":""}`})]}),e.jsxs("span",{className:"agent-floor__ledger-tally",children:[e.jsx("span",{className:"agent-floor__ledger-strip",children:s.strip.map((h,f)=>e.jsx("span",{className:`agent-floor__ledger-cell is-${h}`},f))}),e.jsx("span",{className:"agent-floor__ledger-counts",children:oe(s.counts)})]})]},s.lane.id)})}),e.jsx("footer",{className:"agent-floor__ledger-foot",children:"rows and flags are linked — hover to unroll, click to pin"})]}),e.jsxs("div",{className:`agent-floor__viewport${ee?" is-inspecting":""}${H?" is-dragging":""}`,ref:W,onWheel:Pe,onPointerDown:Ie,onPointerMove:ze,onPointerUp:ge,onPointerCancel:ge,children:[e.jsx(gt,{zoom:S,fit:S===1&&$.x===0&&$.y===0,onZoomChange:O,onReset:Te}),e.jsx("div",{className:"agent-floor__stage",style:{transform:`translate3d(${$.x}px, ${$.y}px, 0) scale(${Ye}) rotateX(57deg) rotateZ(45deg)`},children:e.jsxs("div",{className:"agent-floor__field",style:{width:E,height:Q,left:-E/2,top:-Q/2},children:[e.jsx("div",{className:"agent-floor__plane"}),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__seam${n===0?" is-front":""}`,style:{left:he(n)}},n)),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__bb agent-floor__tick${n===0?" is-now":""}`,style:{left:he(n),top:xe},children:n===0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__tick-pulse"}),e.jsx("span",{children:"now"})]}):ae(V-(n-1)*z)},n)),e.jsx("div",{className:"agent-floor__lanes",style:{left:0,top:_e},"data-focus":A!==null||void 0,children:U.map((s,n)=>e.jsx(mt,{series:s,index:n,planeW:E,flip:T,periodStart:V,now:o,focused:A===s.lane.id,pinned:r===s.lane.id,dimmed:r===null&&g!==null&&g!==s.lane.id,peekSlot:w?.laneId===s.lane.id?w.slot:null,onFocus:y,onPeek:Re,onSelect:G},s.lane.id))}),J.length>0?e.jsxs("div",{className:"agent-floor__bb agent-floor__chip",style:{left:T?M/2:E-M/2,top:xe+30},children:["+",J.length," more in the ledger"]}):null]})}),ee?e.jsx(ft,{series:ee,now:o,concise:x,onConciseChange:j,onClose:()=>d(null),onOpenFull:()=>a(ee.lane),operatorName:c}):null]})]}),e.jsx(ut,{focus:De,pinned:r!==null&&A===r,ledger:v,liveCount:ie,now:o}),e.jsxs("footer",{className:"agent-floor__legend",children:[e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-tool"}),"tool call"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-edit"}),"file edit"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-msg"}),"message"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-pulse"}),"live — pad glows"]}),e.jsxs("button",{type:"button",className:"agent-floor__legend-flip",onClick:re,title:"Flip which side history accumulates on",children:["past ",T?"→":"←"]}),e.jsx("span",{className:"agent-floor__legend-note",children:"Towers mint every 5 min · details land in the dock · click to pin, click again for the timeline"})]})]})}export{ys as AgentFloorView};
@@ -1 +0,0 @@
1
- import{r as m,j as a}from"./index-Bli6bTLU.js";/* empty css */import{c as q,d as K,s as V,b as G}from"./colors-BtO5_zlx.js";import{m as J,c as X}from"./conversation-model-CigSPlKA.js";import{a as D}from"./api-DEHEgJ9m.js";import{u as Y}from"./sse-CSozY6mp.js";import{b as Z,t as ee}from"./time-Dhsh_2EG.js";import{f as h}from"./text-BR9Bap0E.js";import{u as ae}from"./Provider-Ve8yXaWR.js";import{o as te}from"./openContent-C6XO6kr5.js";import{B as E}from"./BackToPicker-CqYhOaLB.js";import{A as se}from"./AgentLiveActions-Bn3zeZBN.js";import{O as le}from"./ObservedTopologyPanel-D85P6RAk.js";import{a as re}from"./NewChatComposer-Bgqes0UQ.js";import"./createLucideIcon-DLlxGjKt.js";import"./index-BWHgHrtv.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./keyboard-nav-7iEtvu9P.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./terminal-takeover-CtA3wcXh.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";function k({values:t}){return a.jsx("span",{className:"s-agent-token-list",children:t.map(s=>a.jsx("span",{className:"s-agent-token",children:s},s))})}function r({value:t}){return a.jsx("span",{className:"s-agent-code-value",children:t})}function w({label:t,value:s}){return s?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:t}),a.jsx("span",{className:"s-agent-profile-chip-value",children:s})]}):null}function $(t){return(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function oe(t){return t.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(s=>s.slice(0,1).toUpperCase()+s.slice(1)).join(" ")}function ie(t,s,i,c){let l=t.trim().replace(/^@+/,"");const f=[s,i,c,c?h(c):null].filter(d=>!!d?.trim());for(const d of f){const p=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${p}[-_.:\\s·]+`,"iu"),"")}return l}function ne(t,s,i,c){const l=s?.participants?.find(u=>u.agentId===t.id||u.actorId===t.id),f=$(t.harness),d=$(i),p=[l?.scopedAlias,s?.alias,t.handle,l?.displayName,s?.agentName,t.name];for(const u of p){if(!u?.trim())continue;const j=ie(u,i,c,t.harness),v=oe(j),n=$(v);if(!(!n||n===d||n===f))return v}return null}function ce(t){const s=t?.trim();return s?s.toLowerCase()==="a2a"?"A2A":h(s)??s:null}function ue({name:t,url:s}){return s?a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:t}):a.jsx(a.Fragment,{children:t})}function x({title:t,subtitle:s,items:i,variant:c}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${c?` s-agent-profile-card-${c}`:""}`,children:[a.jsx("div",{className:"s-agent-profile-card-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"s-agent-profile-card-title",children:t}),s&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:s})]})}),a.jsx("div",{className:"s-agent-meta-card-body",children:i.map(l=>a.jsxs("div",{className:"s-agent-meta-row",children:[a.jsx("span",{className:"s-agent-meta-label",children:l.label}),a.jsx("span",{className:"s-agent-meta-value",children:l.value})]},l.label))})]})}function aa({conversationId:t,navigate:s}){const{agents:i,route:c}=ae(),[l,f]=m.useState(null),[d,p]=m.useState(null),[u,j]=m.useState(null),v=m.useCallback(async()=>{j(null);try{const o=await D(`/api/session/${encodeURIComponent(t)}`).catch(()=>null);f(o)}catch(o){j(o instanceof Error?o.message:String(o)),f(null)}},[t]);m.useEffect(()=>{v()},[v]),Y(()=>{v()});const n=l?.agentId??null;m.useEffect(()=>{if(!n||i.some(P=>P.id===n)){p(null);return}let o=!1;return D(`/api/agents/${encodeURIComponent(n)}`).then(P=>{o||p(P)}).catch(()=>{o||p(null)}),()=>{o=!0}},[i,n]);const e=m.useMemo(()=>n?i.find(o=>o.id===n)??(d?.id===n?d:null):null,[d,i,n]);if(!e)return a.jsxs("div",{children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const H=J(e),A=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,I=e.selector??e.defaultSelector??A,S=q(e.state),L=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,R=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,C=e.skills??[],b=ce(e.protocol),N=!!(e.providerName||b||C.length>0),T=re(e),g=T.title,y=ne(e,l,g,T.slug),F=y?`${g} · ${y}`:g,B=l?.participants?.find(o=>o.agentId===e.id||o.actorId===e.id),M=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,U=[h(e.harness??"")??e.harness,M].filter(o=>!!o).join(" · "),W=[{label:"Project",value:g},{label:"Alias",value:y??"Default project participant"},...I?[{label:"Primary selector",value:a.jsx(r,{value:I})}]:[],...B?.scopedAlias?[{label:"Scoped alias",value:a.jsx(r,{value:B.scopedAlias})}]:[],...A?[{label:"Handle",value:a.jsx(r,{value:A})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(r,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(r,{value:e.definitionId})}],z=[{label:"Routable agent ID",value:a.jsx(r,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(ue,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...C.length>0?[{label:"Skills",value:a.jsx(k,{values:C})}]:[],...N?[]:[{label:"Class",value:h(e.agentClass)??"—"}],...!N&&e.role?[{label:"Role",value:h(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(r,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(r,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(r,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],O=[...e.projectRoot?[{label:"Project path",value:a.jsx(r,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(r,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...L?[{label:"Authority node",value:a.jsx(r,{value:L})}]:[],...R?[{label:"Home node",value:a.jsx(r,{value:R})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(r,{value:e.conversationId})}]:[]],Q=[...!N&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!N&&e.transport?[{label:"Transport",value:h(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:h(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(r,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(r,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(k,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(k,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(k,{values:e.authorityProfile.writeTools})}]:[],...e.authorityProfile?[{label:"Machine access",value:`shell ${e.authorityProfile.shell?"allowed":"blocked"} · code writes ${e.authorityProfile.codebaseWrites?"allowed":"blocked"}`}]:[],...e.runtimePolicy?.sandbox?[{label:"Sandbox",value:e.runtimePolicy.sandbox}]:[]],_=[{label:"Conversation ID",value:a.jsx(r,{value:t})},...l?.alias?[{label:"Conversation alias",value:a.jsx(r,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(r,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(r,{value:l.workspaceRoot})}]:[],...l?.currentBranch?[{label:"Session branch",value:l.currentBranch}]:[],...l?.messageCount!=null?[{label:"Messages",value:String(l.messageCount)}]:[],...l?.lastMessageAt?[{label:"Last message",value:Z(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>s({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsxs("section",{className:"s-agent-profile-hero",children:[a.jsx("div",{className:"s-agent-profile-hero-main",children:a.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[a.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:K(e.name)},children:e.name[0].toUpperCase()}),a.jsxs("div",{className:"s-agent-profile-hero-copy",children:[a.jsxs("div",{className:"s-agent-casefile-title-meta",children:[a.jsx("span",{className:"s-agent-casefile-record",children:I??H??X(e.id)??e.id}),S&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${G(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:V(e.state)}}),S]}),e.staleLocalRegistration&&a.jsx("span",{className:"s-agent-state-chip s-agent-state-chip-offline",children:"Superseded registration"})]}),a.jsx("h1",{className:"s-agent-profile-hero-title",children:F}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(w,{label:"Project",value:g}),a.jsx(w,{label:"Alias",value:y??"Default"}),a.jsx(w,{label:"Runtime",value:U||null}),a.jsx(w,{label:"Host",value:e.homeNodeName?.replace(/\.local$/i,"")??null})]}),a.jsxs("p",{className:"s-agent-profile-hero-context",children:[l?.title?`Conversation: ${l.title}.`:"Attached to this conversation.",e.updatedAt?` Updated ${ee(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(se,{agent:e,navigate:s,returnTo:c}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>te(s,{view:"conversation",conversationId:t},{returnTo:c}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(x,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:W,variant:"primary"}),a.jsx(x,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:_}),a.jsx(x,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:Q}),a.jsx(x,{title:"Location",subtitle:"Where this alias resolves right now.",items:O}),a.jsx(x,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:z,variant:"secondary"})]}),a.jsx(le,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{aa as AgentInfoScreen};
@@ -1,4 +0,0 @@
1
- import{r as c,j as e}from"./index-Bli6bTLU.js";import{S as ze}from"./SlidePanel-Dg8_styW.js";import{a as de}from"./api-DEHEgJ9m.js";import{A as We}from"./AgentAvatar-B1xvQ7ej.js";import{H as He}from"./HarnessMark-DGZ6o6Ct.js";import{t as ce}from"./time-Dhsh_2EG.js";import{h as qe}from"./tail-display-DcliDVkW.js";import{a as Ge}from"./colors-BtO5_zlx.js";import{c as V}from"./clipboard-e3fSpeo7.js";import{d as Je,c as Ke}from"./context-budget-DX_fwUs3.js";import{P as Ve}from"./router-B0YclXYg.js";import{u as Ue}from"./Provider-Ve8yXaWR.js";import{s as Qe,t as Xe,b as Ye}from"./bash-format-BRV5C6Gv.js";import{i as Ze}from"./keyboard-nav-7iEtvu9P.js";import{o as te}from"./openContent-C6XO6kr5.js";import{b as es,f as Ce}from"./agent-lane-preview-BhplDYGf.js";import{i as ss}from"./synthetic-agent-routing-aduMYO7P.js";import{b as Se,a as as,l as ts,r as ns,d as ls}from"./agent-lane-detail-D5EIlX7_.js";import{l as is,a as cs,s as rs}from"./agent-lanes-model-BKOs_32K.js";import{E as he}from"./external-link-BGHC_naA.js";async function os(s){return de("/api/session-control/compact",{method:"POST",body:JSON.stringify(s)})}function Le(s){return ss(s.id)}function ds(s){return Se(s).sessionId?.trim()||null}function Ie(s){const n=ds(s);if(!n)return null;const r=Le(s.agent)?void 0:s.agent.id;return{view:"sessions",sessionId:n,...r?{agentId:r}:{}}}function hs(s){return Ie(s)}function us(s){return Le(s.agent)?null:{view:"agents-v2",agentId:s.agent.id,tab:"profile"}}const ms={created:"+",modified:"~",read:"○"},ps={blocked:"blocked",completed:"done",in_progress:"active",pending:"todo",unknown:"step"},$e=["s-lane-sheet-vitals","s-lane-sheet-runtime","s-lane-sheet-files","s-lane-sheet-commands","s-lane-sheet-plans","s-lane-sheet-docs"];function re(s){return!!(s&&$e.includes(s))}function fs(){if(typeof window>"u")return null;const s=window.location.hash.replace(/^#/,"");return re(s)?s:null}function ne(s){return typeof s!="number"||!Number.isFinite(s)?"—":s.toLocaleString()}function xs(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(s>=1e5?0:1)}k`:`${s}`}function js(s){const n=s.lastIndexOf("/");return n<0?{dir:"",base:s}:{dir:s.slice(0,n+1),base:s.slice(n+1)}}function gs(s,n){const r=new Map;for(const i of n?.events??[]){if(i.kind!=="tool"||!i.diff||!i.arg)continue;const o=i.arg.trim().split(/[\\/]/).filter(Boolean).pop();if(!o)continue;const t=r.get(o)??{add:0,del:0};t.add+=i.diff.add??0,t.del+=i.diff.del??0,r.set(o,t)}return s.map(i=>{const o=i.path.split(/[\\/]/).filter(Boolean).pop()??i.path,t=r.get(o);return{...i,add:t?.add??0,del:t?.del??0}})}function le(s,n=48){return s?s.length<=n?s:`…${s.slice(-(n-1))}`:"—"}async function vs(s){await de("/api/local-path/reveal",{method:"POST",body:JSON.stringify({path:s.path,...s.basePath?{basePath:s.basePath}:{},...s.agentId?{agentId:s.agentId}:{},...s.sessionId?{sessionId:s.sessionId}:{}})})}function oe(s,n){return s.startsWith("/")||s.startsWith("~/")?s:n?`${n.replace(/\/$/u,"")}/${s}`:s}function U({value:s,label:n}){const[r,i]=c.useState(!1),o=c.useRef(null);c.useEffect(()=>()=>{o.current&&clearTimeout(o.current)},[]);const t=c.useCallback(h=>{h.preventDefault(),h.stopPropagation(),V(s).then($=>{$&&(i(!0),o.current&&clearTimeout(o.current),o.current=setTimeout(()=>i(!1),1100))})},[s]);return e.jsx("button",{type:"button",className:`s-lane-sheet-copy${r?" s-lane-sheet-copy--done":""}`,onClick:t,title:r?"Copied":`Copy ${n}`,"aria-label":r?`Copied ${n}`:`Copy ${n}`,children:r?e.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:e.jsx("path",{d:"M2.5 6.2 4.8 8.5 9.5 3.8",fill:"none",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"})}):e.jsxs("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:[e.jsx("rect",{x:"3.4",y:"3.4",width:"5.8",height:"5.8",rx:"1.3",fill:"none",stroke:"currentColor",strokeWidth:"1"}),e.jsx("path",{d:"M2.4 7.2V2.8c0-.4.3-.7.7-.7h4",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})]})})}function Te({path:s,basePath:n,agentId:r,sessionId:i,label:o}){return e.jsx("button",{type:"button",className:"s-lane-sheet-reveal",title:`Reveal ${o} in OS`,"aria-label":`Reveal ${o} in OS`,onClick:t=>{t.preventDefault(),t.stopPropagation(),vs({path:s,basePath:n,agentId:r,sessionId:i}).catch(h=>console.warn("Failed to reveal local path",h))},children:e.jsx(he,{size:11,strokeWidth:1.6})})}function K({id:s,label:n,count:r,actions:i}){return e.jsxs("div",{className:"s-lane-sheet-sechead",id:s,children:[e.jsx("span",{className:"s-lane-sheet-sechead-label",children:n}),r!=null&&r!==!1&&e.jsx("span",{className:"s-lane-sheet-sechead-count",children:r}),e.jsx("span",{className:"s-lane-sheet-sechead-rule","aria-hidden":"true"}),i&&e.jsx("span",{className:"s-lane-sheet-sechead-actions",children:i})]})}function C({children:s,onClick:n,primary:r=!1,disabled:i=!1}){return e.jsx("button",{type:"button",className:`s-lane-sheet-ghost${r?" s-lane-sheet-ghost--primary":""}`,onClick:n,disabled:i,children:s})}function y({label:s,value:n,title:r,copy:i,reveal:o}){return e.jsxs("div",{className:"s-lane-sheet-meta-row",children:[e.jsx("dt",{children:s}),e.jsxs("dd",{className:"s-lane-sheet-fact",children:[e.jsx("span",{className:"s-lane-sheet-fact-val",title:r??n,children:n}),o&&e.jsx(Te,{...o,label:s}),i&&e.jsx(U,{value:i,label:s})]})]})}function ie({file:s,basePath:n,agentId:r,sessionId:i,onOpen:o}){const t=Ce(s),h=s.path,$=oe(h,n),{dir:S,base:L}=js(h),A=s.add>0||s.del>0;return e.jsxs("div",{className:"s-lane-sheet-frow",title:h,children:[e.jsx("span",{className:`s-lane-sheet-fstate s-lane-sheet-fstate--${s.state}`,"aria-hidden":"true",children:ms[s.state]??"○"}),e.jsxs("span",{className:"s-lane-sheet-fpath",children:[S&&e.jsx("span",{className:"s-lane-sheet-fdir",children:S}),e.jsx("span",{className:"s-lane-sheet-fbase",children:L})]}),A&&e.jsxs("span",{className:"s-lane-sheet-fdiff",children:[s.add>0&&e.jsxs("span",{className:"s-lane-sheet-file-add",children:["+",s.add]}),s.del>0&&e.jsxs("span",{className:"s-lane-sheet-file-del",children:["−",s.del]})]}),e.jsxs("span",{className:"s-lane-sheet-frow-acts",children:[e.jsx("button",{type:"button",className:"s-lane-sheet-rowact",title:`Open ${t} in diff`,"aria-label":`Open ${t} in diff`,onClick:()=>o($),children:e.jsx(he,{size:11,strokeWidth:1.6})}),e.jsx(Te,{path:h,basePath:n,agentId:r,sessionId:i,label:t}),e.jsx(U,{value:h,label:"file path"})]})]})}function Ns({entry:s}){const{dir:n,rest:r}=Qe(Xe(s.command)),i=Ye(r||s.command);return e.jsxs("div",{className:"s-lane-sheet-crow",title:s.command,children:[e.jsx("span",{className:"s-lane-sheet-cmark","aria-hidden":"true",children:"❯"}),e.jsxs("span",{className:"s-lane-sheet-ctext",children:[n&&e.jsxs("span",{className:"s-lane-sheet-bash-dir",children:[n,"/"]}),i.map((o,t)=>e.jsxs("span",{className:`s-lane-sheet-bash-${o.tier}${o.known?" s-lane-sheet-bash-prog--known":""}${o.flag?" s-lane-sheet-bash-flag":""}`,children:[t>0?" ":"",o.text]},t))]}),s.outcome&&e.jsx("span",{className:"s-lane-sheet-cresult",children:s.outcome}),e.jsx("span",{className:"s-lane-sheet-crow-acts",children:e.jsx(U,{value:s.command,label:"command"})})]})}function ye({label:s,hint:n,children:r}){const[i,o]=c.useState(!1);return e.jsxs("div",{className:`s-lane-sheet-disc${i?" s-lane-sheet-disc--open":""}`,children:[e.jsxs("button",{type:"button",className:"s-lane-sheet-disc-head","aria-expanded":i,onClick:()=>o(t=>!t),children:[e.jsx("span",{className:`s-lane-sheet-disc-caret${i?" s-lane-sheet-disc-caret--open":""}`,"aria-hidden":"true",children:"›"}),e.jsx("span",{className:"s-lane-sheet-disc-label",children:s}),n!=null&&n!==!1&&e.jsx("span",{className:"s-lane-sheet-disc-hint",children:n})]}),i&&e.jsx("div",{className:"s-lane-sheet-disc-body",children:r})]})}function bs({plan:s,onOpen:n}){const[r,i]=c.useState(!1),o=s.steps.filter(h=>h.status==="completed").length,t=s.steps.find(h=>h.status==="in_progress");return e.jsxs("div",{className:`s-lane-sheet-plan${r?" s-lane-sheet-plan--open":""}`,children:[e.jsxs("button",{type:"button",className:"s-lane-sheet-plan-head","aria-expanded":r,onClick:()=>i(h=>!h),children:[e.jsx("span",{className:`s-lane-sheet-plan-caret${r?" s-lane-sheet-plan-caret--open":""}`,"aria-hidden":"true",children:"›"}),e.jsx("span",{className:"s-lane-sheet-plan-title",title:s.title,children:s.title}),e.jsxs("span",{className:"s-lane-sheet-plan-tally",children:[o,"/",s.steps.length]})]}),!r&&t&&e.jsxs("div",{className:"s-lane-sheet-plan-now",title:t.text,children:[e.jsx("span",{className:"s-lane-sheet-plan-now-mark","aria-hidden":"true",children:"▸"}),e.jsx("span",{className:"s-lane-sheet-plan-now-text",children:t.text})]}),r&&e.jsxs("div",{className:"s-lane-sheet-plan-steps",children:[s.steps.map(h=>e.jsxs("div",{className:`s-lane-sheet-pstep s-lane-sheet-pstep--${h.status}`,children:[e.jsx("span",{className:"s-lane-sheet-pstep-box","aria-hidden":"true",children:h.status==="completed"?"✓":h.status==="in_progress"?"▸":"○"}),e.jsx("span",{className:"s-lane-sheet-pstep-text",children:h.text})]},h.id)),e.jsx("div",{className:"s-lane-sheet-plan-foot",children:e.jsx(C,{onClick:n,children:"Open in Plans →"})})]})]})}function ws({document:s,expanded:n,onToggle:r,onOpen:i}){const o=ls(s),t=s.steps.length>0;return e.jsxs("article",{className:"s-lane-sheet-doc",children:[e.jsxs("button",{type:"button",className:"s-lane-sheet-doc-head","aria-expanded":n,onClick:r,children:[e.jsx("span",{className:"s-lane-sheet-doc-title",children:s.title}),e.jsxs("span",{className:"s-lane-sheet-doc-meta",children:[t?`${s.steps.length} steps`:Ce(s.path)," · ",ce(s.updatedAt)]}),!n&&o&&e.jsx("span",{className:"s-lane-sheet-doc-excerpt",children:o})]}),n&&e.jsxs("div",{className:"s-lane-sheet-doc-body",children:[s.summary&&e.jsx("p",{className:"s-lane-sheet-doc-summary",children:s.summary}),t&&s.steps.length>0&&e.jsx("ol",{className:"s-lane-sheet-doc-steps",children:s.steps.map(h=>e.jsxs("li",{className:`s-lane-sheet-doc-step s-lane-sheet-doc-step--${h.status}`,children:[e.jsx("span",{className:"s-lane-sheet-doc-step-state",children:ps[h.status]}),e.jsx("span",{className:"s-lane-sheet-doc-step-text",children:h.text})]},h.id))}),(s.body||s.rawText)&&e.jsx("pre",{className:"s-lane-sheet-doc-pre",children:s.body||s.rawText}),e.jsx("button",{type:"button",className:"s-lane-sheet-doc-open",onClick:i,children:"Open in Plans"})]})]})}function ks({lane:s,navigate:n,returnRoute:r,onClose:i,navigationEnabled:o=!0}){const{agent:t,observe:h,source:$,lastActiveAt:S}=s,{openFilePreview:L}=Ue(),A=c.useMemo(()=>Ge(t.state??null,t),[t]),N=c.useMemo(()=>es(h,t,{isLive:A}),[h,t,A]),[D,Q]=c.useState(!1),[O,ue]=c.useState([]),[F,me]=c.useState([]),[Pe,Ae]=c.useState(null),[B,De]=c.useState(!1),[Oe,pe]=c.useState(!1),[_,fe]=c.useState(!1),[xe,X]=c.useState(null),[f,Y]=c.useState("s-lane-sheet-vitals"),E=c.useRef(null),Z=c.useRef(null);c.useEffect(()=>()=>{E.current&&clearTimeout(E.current)},[]);const je=c.useCallback(a=>{typeof window>"u"||window.location.hash!==`#${a}`&&Ve({hash:a,replace:!1})},[]),z=c.useCallback(a=>{const u=Z.current,p=u?.querySelector(`#${a}`);if(!u||!p)return!1;const j=u.getBoundingClientRect().top,w=p.getBoundingClientRect().top;return u.scrollTop=Math.max(0,u.scrollTop+w-j),Y(a),!0},[]),T=c.useCallback((a,u)=>{a.preventDefault(),z(u)&&je(u)},[z,je]),W=is(t,$),Fe=cs(t,$),l=c.useMemo(()=>Se(s),[s]),d=s.facts,I=d?.turn?.phase?d.turn.phase==="started":A,m=c.useMemo(()=>{const a=d?.touchedFiles.length?d.touchedFiles:as(h,1/0),u=gs(a,h),p=u.filter(g=>g.state==="created"),j=u.filter(g=>g.state==="modified"),w=u.filter(g=>g.state==="read"),M=[...p,...j];return{created:p,modified:j,read:w,changed:M,totalAdd:M.reduce((g,v)=>g+v.add,0),totalDel:M.reduce((g,v)=>g+v.del,0)}},[d,h]),H=m.changed.length+m.read.length,k=c.useMemo(()=>ts(h),[h]),ee=c.useMemo(()=>m.changed.map(a=>oe(a.path,l.cwd)).join(`
2
- `),[m.changed,l.cwd]),ge=c.useMemo(()=>{const a=[`agent: ${W}`],u=t.harness??l.harness,p=d?.model??l.model;(u||p||d?.effort)&&a.push(`harness: ${[u,p,d?.effort].filter(Boolean).join(" · ")}`);const j=d?.branch??l.branch;return j&&a.push(`branch: ${j}`),l.cwd&&a.push(`cwd: ${l.cwd}`),l.sessionId&&a.push(`session: ${l.sessionId}`),t.harnessLogPath&&a.push(`transcript: ${t.harnessLogPath}`),d?.originator&&a.push(`origin: ${d.originator}`),a.join(`
3
- `)},[t,d,W,l]),ve=c.useMemo(()=>k.map(a=>a.command).join(`
4
- `),[k]),Ee=c.useCallback(()=>{V(ge)},[ge]),Re=c.useCallback(()=>{V(ve)},[ve]),Me=c.useCallback(()=>{for(const a of m.changed)L(oe(a.path,l.cwd))},[m.changed,l.cwd,L]),Be=c.useCallback(()=>{ee&&V(ee).then(a=>{a&&(pe(!0),E.current&&clearTimeout(E.current),E.current=setTimeout(()=>pe(!1),1100))})},[ee]),x=d?.usage??l.usage,Ne=c.useMemo(()=>x?[{label:"in",value:x.inputTokens},{label:"out",value:x.outputTokens},{label:"cache rd",value:x.cacheReadInputTokens},{label:"cache wr",value:x.cacheCreationInputTokens},{label:"total",value:x.totalTokens},{label:"reasoning",value:x.reasoningOutputTokens}].filter(a=>typeof a.value=="number"):[],[x]),b=c.useMemo(()=>Je(x,{model:d?.model??l.model,adapterType:t.harness??l.harness}),[x,d?.model,l.model,t.harness,l.harness]),se=!!(d?.compaction?.eligible&&rs(t.harness??l.harness)&&l.sessionId),_e=c.useCallback(async()=>{if(!(!se||_)){fe(!0),X(null);try{const a=await os({harness:t.harness??l.harness,sessionId:l.sessionId,transcriptPath:t.harnessLogPath,agentId:t.id});(!a.ok||!a.delivered)&&X(a.error??"Compaction was not delivered to the harness")}catch(a){X(a instanceof Error?a.message:"Compaction request failed")}finally{fe(!1)}}},[t.harness,t.harnessLogPath,t.id,se,_,l.harness,l.sessionId]),be=S?ce(S):null,q=c.useMemo(()=>Ie(s),[s]),P=c.useMemo(()=>us(s),[s]),G=c.useMemo(()=>hs(s),[s]),R=c.useCallback(()=>{!o||!q||(te(n,q,{returnTo:r}),i())},[n,o,i,r,q]),ae=c.useCallback(()=>{if(o){if(P){te(n,P,{returnTo:r}),i();return}R()}},[n,o,i,R,P,r]),J=c.useCallback(()=>{!o||!G||(te(n,G,{returnTo:r}),i())},[n,o,i,r,G]);c.useEffect(()=>{const a=u=>{if(!Ze(u.target))switch(u.key.toLowerCase()){case"o":u.preventDefault(),R();break;case"t":u.preventDefault(),J();break;case"p":if(!P)return;u.preventDefault(),ae();break}};return window.addEventListener("keydown",a),()=>window.removeEventListener("keydown",a)},[ae,R,J,P]);const we=c.useCallback(a=>{o&&(n({view:"ops",mode:"advisor",planDocumentId:a}),i())},[n,o,i]);return c.useEffect(()=>{let a=!1;return Q(!1),de("/api/plan-documents").then(u=>{if(a)return;const p=ns(u.documents,s);ue(p.plans),me(p.docs),Q(!0)}).catch(()=>{a||(ue([]),me([]),Q(!0))}),()=>{a=!0}},[s.id]),c.useEffect(()=>{const a=()=>{const u=fs();u&&window.requestAnimationFrame(()=>{z(u)})};return a(),window.addEventListener("hashchange",a),window.addEventListener("popstate",a),()=>{window.removeEventListener("hashchange",a),window.removeEventListener("popstate",a)}},[s.id,k.length,z]),c.useEffect(()=>{const a=Z.current;if(!a)return;let u=0;const p=()=>{u=0;const w=$e.map(v=>a.querySelector(`#${v}`)).filter(v=>!!v);if(w.length===0)return;if(a.scrollTop+a.clientHeight>=a.scrollHeight-2){const v=w[w.length-1].id;re(v)&&Y(v);return}const M=a.getBoundingClientRect().top+18,g=w.reduce((v,ke)=>ke.getBoundingClientRect().top<=M?ke:v,w[0]);re(g.id)&&Y(g.id)},j=()=>{u||(u=window.requestAnimationFrame(p))};return p(),a.addEventListener("scroll",j,{passive:!0}),window.addEventListener("resize",j),()=>{u&&window.cancelAnimationFrame(u),a.removeEventListener("scroll",j),window.removeEventListener("resize",j)}},[k.length,D,O.length,F.length]),e.jsxs(ze,{open:!0,onClose:i,side:"right",owner:"openscout.agent-lane",resizable:!0,defaultSize:720,minSize:420,maxSize:960,scrollLock:!0,ariaLabel:`${W} lane detail`,className:"s-lane-sheet",children:[e.jsxs("div",{className:"s-slide-header s-lane-sheet-header",children:[e.jsx(We,{agent:t,placement:"row",size:28,presence:!1,className:"s-agent-lane-avatar"}),e.jsxs("div",{className:"s-lane-sheet-header-copy",children:[e.jsx("div",{className:"s-lane-sheet-title",children:W}),e.jsxs("div",{className:"s-lane-sheet-sub",children:[Fe," · ",S?ce(S):"idle"]})]}),e.jsx("span",{className:"s-slide-spacer"}),e.jsxs("div",{className:"s-lane-sheet-header-cta",children:[e.jsx(He,{harness:t.harness??l.harness,size:18,className:`s-lane-sheet-hmark${I?" s-lane-sheet-hmark--working":""}`}),o?e.jsxs(e.Fragment,{children:[e.jsx(C,{primary:!0,onClick:R,disabled:!q,children:"Open session"}),P?e.jsx(C,{onClick:ae,children:"Agent profile"}):null,e.jsx(C,{onClick:J,disabled:!G,children:"Traces"})]}):null]}),e.jsx("button",{type:"button",className:"s-slide-close",onClick:i,"aria-label":"Close",children:"×"})]}),e.jsxs("nav",{className:"s-lane-sheet-anchors","aria-label":"Jump to section",children:[e.jsx("a",{href:"#s-lane-sheet-vitals",className:`s-lane-sheet-anchor${f==="s-lane-sheet-vitals"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-vitals"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-vitals"),children:"Vitals"}),e.jsx("a",{href:"#s-lane-sheet-runtime",className:`s-lane-sheet-anchor${f==="s-lane-sheet-runtime"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-runtime"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-runtime"),children:"Runtime"}),e.jsxs("a",{href:"#s-lane-sheet-files",className:`s-lane-sheet-anchor${f==="s-lane-sheet-files"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-files"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-files"),children:["Files",H>0&&e.jsx("span",{className:"s-lane-sheet-anchor-n",children:H})]}),k.length>0&&e.jsxs("a",{href:"#s-lane-sheet-commands",className:`s-lane-sheet-anchor${f==="s-lane-sheet-commands"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-commands"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-commands"),children:["Commands",e.jsx("span",{className:"s-lane-sheet-anchor-n",children:k.length})]}),e.jsx("a",{href:"#s-lane-sheet-plans",className:`s-lane-sheet-anchor${f==="s-lane-sheet-plans"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-plans"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-plans"),children:"Plans"}),e.jsx("a",{href:"#s-lane-sheet-docs",className:`s-lane-sheet-anchor${f==="s-lane-sheet-docs"?" s-lane-sheet-anchor--active":""}`,"aria-current":f==="s-lane-sheet-docs"?"location":void 0,onClick:a=>T(a,"s-lane-sheet-docs"),children:"Docs"}),I&&d?.turn&&e.jsxs("span",{className:"s-lane-sheet-anchorbar-turn",children:["turn ",d.turn.phase,d.turn.index?` · #${d.turn.index}`:""]})]}),e.jsxs("div",{ref:Z,className:`s-slide-body s-lane-sheet-body${I?" s-lane-sheet-body--working":" s-lane-sheet-body--idle"}`,children:[e.jsxs("section",{id:"s-lane-sheet-vitals",className:`s-lane-sheet-section s-lane-sheet-vitals${I?"":" s-lane-sheet-vitals--idle"}`,children:[N&&e.jsxs("div",{className:"s-lane-sheet-vitals-now",children:[e.jsxs("div",{className:"s-lane-sheet-vitals-now-top",children:[e.jsxs("span",{className:"s-lane-sheet-vitals-live","aria-hidden":"true",children:[e.jsx("span",{className:"s-lane-sheet-vitals-live-dot"}),e.jsx("span",{className:"s-lane-sheet-vitals-live-ring"})]}),e.jsx("span",{className:"s-lane-sheet-vitals-now-label",children:I?"executing now":"last action"}),I&&d?.turn&&e.jsxs("span",{className:"s-lane-sheet-vitals-now-turn",children:["turn ",d.turn.phase,d.turn.index?` · #${d.turn.index}`:""]})]}),e.jsxs("div",{className:"s-lane-sheet-vitals-well",children:[N.headlineFrom==="user"?e.jsx("span",{className:"s-lane-sheet-vitals-prompt","aria-hidden":"true",children:"←"}):N.headlineFrom==="agent"?e.jsx("span",{className:"s-lane-sheet-vitals-prompt","aria-hidden":"true",children:"→"}):e.jsx("span",{className:"s-lane-sheet-vitals-prompt s-lane-sheet-vitals-prompt--cmd","aria-hidden":"true",children:"❯"}),e.jsx("span",{className:"s-lane-sheet-vitals-cmd",title:N.headFull,children:N.headline}),I&&e.jsx("span",{className:"s-lane-sheet-vitals-caret","aria-hidden":"true"}),e.jsxs("span",{className:"s-lane-sheet-vitals-now-acts",children:[o&&e.jsx("button",{type:"button",className:"s-lane-sheet-reveal",title:"Open trace at this step","aria-label":"Open trace",onClick:J,children:e.jsx(he,{size:11,strokeWidth:1.6})}),N.headFull&&N.headFull!==N.headline&&e.jsx(U,{value:N.headFull,label:"current action"})]})]})]}),b&&e.jsxs("div",{className:`s-lane-sheet-vitals-gauge${b.overLimit?" s-lane-sheet-vitals-gauge--over":""}`,children:[e.jsxs("div",{className:"s-lane-sheet-vitals-gauge-top",children:[e.jsx("span",{className:"s-lane-sheet-vitals-gauge-label",children:"context"}),e.jsxs("span",{className:"s-lane-sheet-vitals-gauge-read",children:[e.jsx("b",{children:b.usedLabel}),e.jsxs("span",{className:"s-lane-sheet-vitals-gauge-of",children:[" / ",b.budgetLabel]}),e.jsx("span",{className:"s-lane-sheet-vitals-gauge-unit",children:" tokens"}),e.jsxs("span",{className:"s-lane-sheet-vitals-gauge-pct",children:[b.pct,"%",b.overLimit?" over":""]})]}),se&&e.jsx("button",{type:"button",className:"s-lane-sheet-vitals-compact",onClick:()=>{_e()},disabled:_,title:"Force a context compaction on this live session",children:_?"Compacting…":"Compact context"})]}),e.jsxs("div",{className:"s-lane-sheet-vitals-gaugebar",role:"meter","aria-label":"context budget","aria-valuenow":b.pct,"aria-valuemin":0,"aria-valuemax":Math.max(100,b.pct),children:[e.jsx("span",{className:"s-lane-sheet-vitals-gaugebar-fill",style:{width:`${Ke(b)}%`},children:e.jsx("span",{className:"s-lane-sheet-vitals-gaugebar-edge","aria-hidden":"true"})}),[25,50,75].map(a=>e.jsx("span",{className:"s-lane-sheet-vitals-gaugebar-tick",style:{left:`${a}%`},"aria-hidden":"true"},a))]}),xe&&e.jsx("div",{className:"s-lane-sheet-vitals-compact-error",role:"status",children:xe}),d?.compaction?.lastCompactedSummary&&e.jsxs("div",{className:"s-lane-sheet-vitals-compact-note",children:["last compaction · ",d.compaction.lastCompactedSummary]})]}),e.jsxs("div",{className:"s-lane-sheet-vitals-cadence",children:[e.jsx("b",{children:ne(l.events)})," events · ",e.jsx("b",{children:ne(l.tools)})," tools",be?e.jsxs(e.Fragment,{children:[" · ",be]}):null]})]}),e.jsxs("section",{id:"s-lane-sheet-runtime",className:"s-lane-sheet-section",children:[e.jsxs(ye,{label:"Runtime",hint:[t.harness??l.harness,d?.model??l.model].filter(Boolean).join(" · ")||void 0,children:[e.jsxs("dl",{className:"s-lane-sheet-meta",children:[e.jsx(y,{label:"Effort",value:d?.effort??"—"}),e.jsx(y,{label:"Branch",value:d?.branch??l.branch??"—",copy:d?.branch??l.branch??null}),e.jsx(y,{label:"Working dir",value:le(l.cwd),title:l.cwd??void 0,copy:l.cwd??null,reveal:l.cwd?{path:l.cwd,basePath:l.cwd,agentId:t.id,sessionId:l.sessionId}:void 0}),e.jsx(y,{label:"Session",value:le(l.sessionId,36),title:l.sessionId??void 0,copy:l.sessionId??null}),t.harnessLogPath&&e.jsx(y,{label:"Transcript",value:le(t.harnessLogPath,36),title:t.harnessLogPath,copy:t.harnessLogPath,reveal:{path:t.harnessLogPath,basePath:l.cwd,agentId:t.id,sessionId:l.sessionId}}),e.jsx(y,{label:"Origin",value:d?.originator??"—",copy:d?.originator??null}),e.jsx(y,{label:"Attribution",value:d?.attribution?qe(d.attribution):"—"}),d?.currentTask&&e.jsx(y,{label:"Task",value:d.currentTask,title:d.currentTask,copy:d.currentTask})]}),e.jsx("div",{className:"s-lane-sheet-disc-bar",children:e.jsx(C,{onClick:Ee,children:"Copy diagnostics"})})]}),Ne.length>0&&e.jsx(ye,{label:"Tokens",hint:typeof x?.totalTokens=="number"?xs(x.totalTokens):void 0,children:e.jsx("div",{className:"s-lane-sheet-dials",children:Ne.map(a=>e.jsxs("span",{className:"s-lane-sheet-dial",children:[e.jsx("span",{className:"s-lane-sheet-dial-value",children:ne(a.value)}),e.jsx("span",{className:"s-lane-sheet-dial-label",children:a.label})]},a.label))})})]}),e.jsxs("section",{id:"s-lane-sheet-files",className:"s-lane-sheet-section",children:[e.jsx(K,{label:"Files",count:H>0?`${m.changed.length} changed · ${m.read.length} read`:void 0,actions:m.changed.length>0?e.jsxs(e.Fragment,{children:[(m.totalAdd>0||m.totalDel>0)&&e.jsxs("span",{className:"s-lane-sheet-file-diff","aria-hidden":"true",children:[m.totalAdd>0&&e.jsxs("span",{className:"s-lane-sheet-file-add",children:["+",m.totalAdd]}),m.totalDel>0&&e.jsxs("span",{className:"s-lane-sheet-file-del",children:["−",m.totalDel]})]}),e.jsx(C,{onClick:Be,children:Oe?"Copied":"Copy changed"}),e.jsx(C,{onClick:Me,children:"Open all → diff"})]}):void 0}),H===0?e.jsx("div",{className:"s-lane-sheet-empty",children:"No files touched in this session yet."}):e.jsxs("div",{className:"s-lane-sheet-filegroups",children:[m.created.length>0&&e.jsxs("div",{className:"s-lane-sheet-filegroup",children:[e.jsxs("div",{className:"s-lane-sheet-fglabel",children:[e.jsx("span",{className:"s-lane-sheet-fgmark s-lane-sheet-fgmark--created","aria-hidden":"true"}),"new",e.jsx("span",{className:"s-lane-sheet-fgcount",children:m.created.length})]}),e.jsx("div",{className:"s-lane-sheet-files",children:m.created.map(a=>e.jsx(ie,{file:a,basePath:l.cwd,agentId:t.id,sessionId:l.sessionId,onOpen:L},a.path))})]}),m.modified.length>0&&e.jsxs("div",{className:"s-lane-sheet-filegroup",children:[e.jsxs("div",{className:"s-lane-sheet-fglabel",children:[e.jsx("span",{className:"s-lane-sheet-fgmark s-lane-sheet-fgmark--modified","aria-hidden":"true"}),"modified",e.jsx("span",{className:"s-lane-sheet-fgcount",children:m.modified.length})]}),e.jsx("div",{className:"s-lane-sheet-files",children:m.modified.map(a=>e.jsx(ie,{file:a,basePath:l.cwd,agentId:t.id,sessionId:l.sessionId,onOpen:L},a.path))})]}),m.read.length>0&&e.jsxs("div",{className:"s-lane-sheet-filegroup",children:[e.jsxs("button",{type:"button",className:"s-lane-sheet-fglabel s-lane-sheet-fglabel--btn","aria-expanded":B,onClick:()=>De(a=>!a),children:[e.jsx("span",{className:`s-lane-sheet-fgcaret${B?" s-lane-sheet-fgcaret--open":""}`,"aria-hidden":"true",children:"›"}),e.jsx("span",{className:"s-lane-sheet-fgmark s-lane-sheet-fgmark--read","aria-hidden":"true"}),"read",e.jsx("span",{className:"s-lane-sheet-fgcount",children:m.read.length}),!B&&e.jsx("span",{className:"s-lane-sheet-fghint",children:"collapsed"})]}),B&&e.jsx("div",{className:"s-lane-sheet-files",children:m.read.map(a=>e.jsx(ie,{file:a,basePath:l.cwd,agentId:t.id,sessionId:l.sessionId,onOpen:L},a.path))})]})]})]}),k.length>0&&e.jsxs("section",{id:"s-lane-sheet-commands",className:"s-lane-sheet-section",children:[e.jsx(K,{label:"Commands",count:"recent",actions:e.jsx(C,{onClick:Re,children:"Copy all"})}),e.jsx("div",{className:"s-lane-sheet-cmds",children:k.map(a=>e.jsx(Ns,{entry:a},a.id))})]}),e.jsxs("section",{id:"s-lane-sheet-plans",className:"s-lane-sheet-section",children:[e.jsx(K,{label:"Plans",count:D&&O.length>0?O.length:void 0}),D?O.length===0?e.jsx("div",{className:"s-lane-sheet-empty",children:"No plans matched this session yet."}):e.jsx("div",{className:"s-lane-sheet-plans",children:O.map(a=>e.jsx(bs,{plan:a,onOpen:()=>we(a.id)},a.id))}):e.jsx("div",{className:"s-lane-sheet-empty",children:"Indexing plan documents…"})]}),e.jsxs("section",{id:"s-lane-sheet-docs",className:"s-lane-sheet-section",children:[e.jsx(K,{label:"Docs",count:D&&F.length>0?F.length:void 0}),D?F.length===0?e.jsx("div",{className:"s-lane-sheet-empty",children:"No related docs matched this session yet."}):e.jsx("div",{className:"s-lane-sheet-docs",children:F.map(a=>e.jsx(ws,{document:a,expanded:Pe===a.id,onToggle:()=>Ae(u=>u===a.id?null:a.id),onOpen:()=>we(a.id)},a.id))}):e.jsx("div",{className:"s-lane-sheet-empty",children:"Indexing documents…"})]})]})]})}const qs=Object.freeze(Object.defineProperty({__proto__:null,AgentLaneDetailSheet:ks},Symbol.toStringTag,{value:"Module"}));export{ks as A,qs as a,Le as i};
@@ -1 +0,0 @@
1
- import{r as t,j as m}from"./index-Bli6bTLU.js";import{u as a}from"./Provider-Ve8yXaWR.js";import{A as n}from"./AgentLanesView-CbY9qD0z.js";import{k as c,l}from"./router-B0YclXYg.js";import"./provider-CX9EWecp.js";import"./api-DEHEgJ9m.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./time-Dhsh_2EG.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";/* empty css */import"./tail-events-CrN-Rmxj.js";import"./observe-DL5_8-Zj.js";import"./terminal-sessions-D4dHTRkt.js";import"./types-B0PlfpKc.js";import"./AgentAvatar-B1xvQ7ej.js";import"./SpriteAvatar-DMrSssNZ.js";import"./agent-identity-DzHGhLdJ.js";import"./SessionObserve-zAlFbwFn.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-197xYmRp.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-Cd6XticV.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./openContent-C6XO6kr5.js";import"./eye-BeCSqJn1.js";import"./terminal-BiNIXhna.js";import"./message-markup-DAnnGpWr.js";import"./ObservedTopologyPanel-D85P6RAk.js";import"./ObserveTextFlow-C1f5oize.js";import"./use-reduced-motion-BLn59zLn.js";import"./proxy-C35W-YHZ.js";import"./SessionObserveEvidence-BVawzqoE.js";import"./message-circle-44KSmbvQ.js";import"./wrench-CQvdf7KT.js";import"./external-link-BGHC_naA.js";import"./AgentFloorView-Crdw8Uo5.js";/* empty css */import"./agent-lanes-model-BKOs_32K.js";import"./context-budget-DX_fwUs3.js";import"./lane-roster-store-pHT3TAVs.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./AgentLanesPreflight-DJeDRTAN.js";import"./AgentLaneChrome-CWFqUdch.js";import"./AgentLaneCard-CRDG74C1.js";/* empty css */import"./AgentLaneSummaryResize-yTM4GQAJ.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-CSugZCdy.js";import"./agent-lane-preview-BhplDYGf.js";import"./AgentLaneDetailSheet-DCIIg3Zp.js";import"./SlidePanel-Dg8_styW.js";import"./agent-lane-detail-D5EIlX7_.js";import"./LaneTraceDetailSheet-BztwvOv9.js";import"./LaneTraceEventFocus-C9cmqxnK.js";function p(r){return new URLSearchParams(window.location.search).get(r)?.trim()||null}function Hr(){const{agents:r,navigate:o}=a(),e=t.useMemo(()=>c(),[]),s=t.useMemo(()=>l(),[]),i=t.useMemo(()=>({harnessFilter:p("harness"),projectFilter:p("project")}),[]);return m.jsx("div",{className:"s-agent-lanes-embed","data-scout-theme":!0,children:m.jsx(n,{navigate:o,agents:r,embedded:!0,profileId:e,laneSize:s,harnessFilter:i.harnessFilter,projectFilter:i.projectFilter})})}export{Hr as AgentLanesEmbedScreen};
@@ -1,2 +0,0 @@
1
- import{r as o,j as r}from"./index-Bli6bTLU.js";/* empty css */import{a as tn}from"./api-DEHEgJ9m.js";import{u as zn}from"./tail-events-CrN-Rmxj.js";import{i as le,o as we}from"./surface-activity-B1rgWB1i.js";import{u as Pn}from"./observe-DL5_8-Zj.js";import{f as Mn}from"./terminal-sessions-D4dHTRkt.js";import{n as On}from"./colors-BtO5_zlx.js";import{S as $n}from"./Provider-Ve8yXaWR.js";import{d as Fn}from"./types-B0PlfpKc.js";import{A as Wn}from"./AgentAvatar-B1xvQ7ej.js";import{S as Hn}from"./SessionObserve-zAlFbwFn.js";import{V as Bn,W as sn,X as Gn,Y as Vn,Z as Ue,_ as Kn,$ as Un,a0 as qn,a1 as Yn,a2 as Zn,a3 as qe,a4 as Xn,a5 as Jn,a6 as Qn,a7 as an,a8 as et,a9 as nt,k as rn,l as on}from"./router-B0YclXYg.js";import{AgentFloorView as tt}from"./AgentFloorView-Crdw8Uo5.js";import{useLaneBootVisibility as st,AgentLanesPreflightDeck as at,AgentLanesLoadingSheet as rt,LANE_BOOT_EXIT_MS as ot}from"./AgentLanesPreflight-DJeDRTAN.js";import{AgentLaneChrome as it}from"./AgentLaneChrome-CWFqUdch.js";import{AgentLaneCard as lt}from"./AgentLaneCard-CRDG74C1.js";import{a as ct}from"./agent-lane-card-model-CSugZCdy.js";import{i as dt,A as ut}from"./AgentLaneDetailSheet-DCIIg3Zp.js";import{LaneTraceDetailSheet as ft}from"./LaneTraceDetailSheet-BztwvOv9.js";import{readStoredLaneSummaryHeight as mt,useLaneSummaryResize as ht,AgentLaneSummaryResizeHandle as gt}from"./AgentLaneSummaryResize-yTM4GQAJ.js";import{A as de,i as ln,l as q,j as pt,k as cn,m as Lt,e as yt,g as bt,n as vt,r as St,d as dn,D as kt,h as xt}from"./agent-lanes-model-BKOs_32K.js";import{i as wt,c as Nt,n as Ye}from"./keyboard-nav-7iEtvu9P.js";import{p as Ze}from"./lane-roster-store-pHT3TAVs.js";function Ne(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Et(e){const n=new Set,t=[];for(const s of e){const i=Ne(s);n.has(i)||(n.add(i),t.push(s))}return t}function jt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Ct(e,n,t){const s=Ne(n);for(const d of e)if(Ne(d)===s)return e;const i=[...e,n];return i.length>t?i.slice(i.length-t):i}function Rt(e,n,t){return jt(Et([...n,...e]),t)}function At(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const It=500,Tt=3e4;function _t(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function Dt(e,n){const t=new URLSearchParams({limit:String(e)});return n&&t.set("transcripts","true"),(await tn(`/api/tail/recent?${t.toString()}`)).events??[]}function zt(e,n){const t=new URLSearchParams;e&&t.set("scope",e),typeof n=="number"&&Number.isFinite(n)&&n>0&&t.set("limit",String(Math.floor(n)));const s=t.toString();return s?`/api/tail/discover?${s}`:"/api/tail/discover"}function Pt(e){const n=e?.recentLimit??It,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Tt,i=e?.includeTranscriptReplay??!1,d=e?.hydrateOnDiscovery??i,f=e?.discoveryScope,v=e?.discoveryLimit,u=e?.pauseWhenHidden??!1,[c,l]=o.useState(null),[L,m]=o.useState([]),[y,j]=o.useState({discovery:"loading",recent:"loading",discoveryLoaded:!1,recentLoaded:!1}),k=o.useRef("loading"),g=o.useRef(null),x=o.useRef(0);zn(b=>{m(p=>Ct(p,b,n))},t);const T=o.useCallback((b=!1)=>{if(!t||u&&!le())return Promise.resolve();b&&(k.current="loading",j(I=>({...I,recent:"loading"})));const p=`${n}:${i?"replay":"live"}`,S=g.current;if(S?.key===p)return S.promise;const E=++x.current;let P;return P=Dt(n,i).then(I=>{m(M=>Rt(M,I,n)),E===x.current&&(k.current="ready",j(M=>({...M,recent:"ready",recentLoaded:!0})))}).catch(()=>{E===x.current&&(k.current="error",j(I=>({...I,recent:"error"})))}).finally(()=>{g.current?.promise===P&&(g.current=null)}),g.current={key:p,promise:P},P},[t,i,u,n]),C=o.useCallback(async(b=!1)=>{if(t&&!(u&&!le())){b&&j(p=>({...p,discovery:"loading"}));try{const p=await tn(zt(f,v));l(p),j(E=>({...E,discovery:"ready",discoveryLoaded:!0}));const S=(p.transcripts?.length??0)>0||p.processes.length>0;(d&&S||k.current==="error")&&T()}catch{l(p=>p??_t()),j(p=>({...p,discovery:"error"}))}}},[v,f,t,d,u,T]),_=o.useCallback(async()=>{await Promise.all([C(!0),T(!0)])},[C,T]);return o.useEffect(()=>{if(!t)return;let b=!1;const p=()=>{b||C()};p();const S=setInterval(p,s),E=u?we(p):null;return()=>{b=!0,clearInterval(S),E?.()}},[s,t,u,C]),o.useEffect(()=>{if(!t)return;let b=!1,p=!1;const S=()=>{b||p||u&&!le()||(p=!0,T(!0))};S();const E=u?we(S):null;return()=>{b=!0,E?.()}},[t,u,T]),{discovery:c,events:L,loadState:y,refreshDiscovery:C,retryInitialLoad:_}}function Mt({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s}){const[i,d]=o.useState(-1),f=o.useRef(new Map);o.useEffect(()=>{if(i<0)return;if(i>=e.length){d(e.length-1);return}const c=e[i];if(!c)return;const l=f.current.get(c.id);l?.scrollIntoView({block:"nearest",inline:"nearest"}),l?.focus()},[i,e]),o.useEffect(()=>{n||i>=e.length&&d(e.length>0?e.length-1:-1)},[i,n,e.length]);const v=o.useCallback((c,l)=>{l?f.current.set(c,l):f.current.delete(c)},[]);o.useEffect(()=>{const c=l=>{if(!document.querySelector(".s-agent-lanes")||wt(l.target)||Nt()||n||e.length===0)return;const L=Number(l.key)-1;if(!l.metaKey&&!l.ctrlKey&&!l.altKey&&L>=0&&L<de.length){l.preventDefault(),s(de[L].key);return}if(l.key==="ArrowDown"||l.key==="j"){l.preventDefault(),d(m=>Ye(m,e.length,1));return}if(l.key==="ArrowUp"||l.key==="k"){l.preventDefault(),d(m=>Ye(m,e.length,-1));return}if(l.key==="Home"||l.key==="g"&&!l.shiftKey){l.preventDefault(),d(0);return}if(l.key==="End"||l.key==="G"){l.preventDefault(),d(e.length-1);return}if(l.key==="Enter"||l.key==="i"){const m=i<0?0:i,y=e[m];if(!y)return;l.preventDefault(),d(m),t(y)}};return window.addEventListener("keydown",c),()=>window.removeEventListener("keydown",c)},[i,n,e,s,t]);const u=o.useCallback((c,l)=>({"data-cursor":i===c?!0:void 0,tabIndex:i===c?0:-1,ref:L=>v(l,L),onFocus:()=>d(c)}),[i,v]);return{focusedIndex:i,getLaneFocusProps:u}}function Ot(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function ce(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function un(e,n){if(!n)return!0;const t=ce(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const d=i.toLowerCase(),f=Ot(i);return d===n||ce(i)===t||!!(f&&(f.toLowerCase()===n||ce(f)===t))})}function $t(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:d}=e;return un([s.harness,s.definitionId,i?.attribution,d],t)}function Ft(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:d}=e;return un([s.project,s.projectRoot,s.cwd,i?.cwd,q(s,d)],t)}function Wt(e){return e.current||ln(e.observe)}function Xe(e,n,t,s){return sn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function Ht(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>$t(t,e.harness));case"project":return n.filter(t=>Ft(t,e.projectPath));case"attention":return n.filter(t=>Wt(t));default:return[]}}function Je(e,n,t){n.has(t.lane.id)||(n.add(t.lane.id),e.push({key:t.slot?`${t.slot.id}:${t.lane.id}`:t.lane.id,lane:t.lane,widthPx:t.widthPx,zone:t.zone,position:t.position,slotId:t.slot?.id,laneDefId:t.laneDef?.id,isPinned:t.zone!=="main"}))}function ke(e){return[...e].sort((n,t)=>{const s=Gn(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function Bt(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,d=[],f=[],v=[],u=new Map(t.laneDefs.map(m=>[m.id,m]));for(const m of Bn(t.slots)){const y=u.get(m.laneDefId);if(!y)continue;const j=Ht(y,n),k=m.zone==="pinned_left"?d:m.zone==="pinned_right"?v:f;for(const g of j)Je(k,i,{lane:g,zone:m.zone,position:m.position,widthPx:Xe(t,g,m,s),slot:m,laneDef:y})}if(t.showAutoLanes){let m=0;for(const y of n)i.has(y.id)||(Je(f,i,{lane:y,zone:"main",position:m,widthPx:Xe(t,y,void 0,s)}),m+=1)}const c=ke(d),l=ke(f),L=ke(v);return{pinnedLeft:c,main:l,pinnedRight:L,flat:[...c,...l,...L]}}function Gt(e){return e.slots.some(n=>n.laneDefId===Vn)}function ie(e,n){const t=`harness:${ce(n)}`;return e.slots.some(s=>s.laneDefId===t)}function Vt(e,n,t){const[s,i]=o.useState(()=>Ue(e,n));o.useEffect(()=>{i(Ue(e,n))},[n,e]);const d=o.useCallback(g=>{Kn(g),i(g)},[]),f=o.useMemo(()=>Bt({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),v=o.useCallback((g,x="pinned_left")=>{d(Un(s,{laneId:g.id,title:q(g.agent,g.source),zone:x,width:s.laneWidths[g.id]}))},[s,d]),u=o.useCallback(g=>{d(qn(s,g))},[s,d]),c=o.useCallback((g,x)=>{d(Yn(s,g,x))},[s,d]),l=o.useCallback(g=>{d(Zn(s,g))},[s,d]),L=o.useCallback((g,x)=>{d(qe(s,{kind:"harness",title:x??`${g} sessions`,harness:g,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,d]),m=o.useCallback(()=>{d(qe(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,d]),y=o.useCallback(()=>{d(Xn(s))},[s,d]),j=o.useCallback(g=>Jn(s,g),[s]),k=o.useCallback(g=>Qn(s,g),[s]);return{deck:s,layout:f,pinLane:v,unpinLane:u,setLaneWidth:c,setDefaultLaneWidth:l,addHarnessLane:L,addAttentionLane:m,clearPins:y,isPinned:j,pinnedZone:k}}function Kt(e){const[n,t]=o.useState(null),s=o.useRef({laneId:"",x:0,width:512}),i=o.useRef(512),d=o.useCallback((u,c,l)=>{c.preventDefault(),c.stopPropagation(),c.currentTarget.setPointerCapture(c.pointerId),s.current={laneId:u,x:c.clientX,width:l},i.current=l,t(u),document.body.classList.add("s-agent-lanes--resizing-width")},[]),f=o.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const c=an(i.current);e(s.current.laneId,c.tier??c.px)}return null})},[e]);o.useEffect(()=>{if(!n)return;const u=l=>{const L=l.clientX-s.current.x;i.current=Math.min(et,Math.max(nt,s.current.width+L));const m=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);m&&m.style.setProperty("--lane-width",`${i.current}px`)},c=()=>f();return window.addEventListener("pointermove",u),window.addEventListener("pointerup",c),window.addEventListener("pointercancel",c),()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",c),window.removeEventListener("pointercancel",c)}},[f,n]);const v=o.useCallback((u,c)=>{e(u,c),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:d,resetLaneWidth:v,resizingLaneId:n}}const Qe=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],Ut=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function qt(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function Yt(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function Zt(e){return e?Qe.filter(n=>n.key!=="floor"):Qe}const fn="openscout:agent-lanes-horizon",mn="openscout:agent-lanes-layout",hn="openscout:agent-lanes-grid-columns",gn="openscout:agent-lanes-technical-rollup",Xt=`${gn}:lane:`,Jt="openscout:agent-lanes-scroll",Qt=96,es=3e4,ns=3e4,ts=3e4,ss=3e4,as=12e4,rs=["pinned-left","main","pinned-right"];function en(){return!le()}function pn(e,n){return`${Jt}:${e}:${n}`}function os(e,n){try{const t=sessionStorage.getItem(pn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function is(e,n,t){try{sessionStorage.setItem(pn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function ls(){try{const e=sessionStorage.getItem(fn);if(e&&de.some(n=>n.key===e))return e}catch{}return kt}function cs(e){try{const n=sessionStorage.getItem(mn);return qt(n,e)}catch{}return"lanes"}function ds(){try{return Yt(sessionStorage.getItem(hn))}catch{return"auto"}}function us(){try{const e=sessionStorage.getItem(gn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function Ln(e){return`${Xt}${encodeURIComponent(e)}`}function nn(e){try{const n=sessionStorage.getItem(Ln(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return us()??!1}function fs(e,n){try{sessionStorage.setItem(Ln(e),n?"1":"0")}catch{}}function ms(e,n){const t=o.useRef(new Map),s=o.useRef({}),i=o.useCallback((u,c=t.current.get(u))=>{if(!c)return;const l=s.current[u]??os(e,u);if(l<=0)return;const L=Math.max(0,c.scrollWidth-c.clientWidth),m=Math.min(l,L);Math.abs(c.scrollLeft-m)>1&&(c.scrollLeft=m)},[e]),d=o.useCallback(()=>{for(const u of rs)i(u)},[i]);o.useLayoutEffect(()=>{d();const u=window.requestAnimationFrame(d);return()=>window.cancelAnimationFrame(u)},[e,d,n]);const f=o.useCallback((u,c)=>{if(!c){t.current.delete(u);return}t.current.set(u,c),i(u,c)},[i]);return{handleLaneScroll:o.useCallback((u,c)=>{const l=c.currentTarget.scrollLeft;s.current[u]=l,is(e,u,l)},[e]),setLaneScrollNode:f}}function hs({issue:e}){const n=e.agentNames?.length?e.agentNames.join(", "):e.agentIds?.join(", "),t=e.transcriptPaths?.join(" · "),s=[n,t].filter(Boolean).join(" · ");return r.jsxs("li",{className:"s-agent-lanes-issues-item",children:[r.jsx("span",{className:"s-agent-lanes-issues-kind",children:e.kind.replaceAll("_"," ")}),r.jsx("span",{className:"s-agent-lanes-issues-message",children:e.message}),s?r.jsx("span",{className:"s-agent-lanes-issues-detail",children:s}):null]})}function gs({loadState:e,onRetry:n}){const t=[e.discovery==="error"?"session discovery":"",e.recent==="error"?"recent history":""].filter(Boolean).join(" and "),s=e.recent==="error"?"Recent activity could not be loaded":"Session discovery could not be completed";return r.jsx("div",{className:"s-agent-lanes-empty s-agent-lanes-empty--degraded",role:"alert",children:r.jsxs("div",{className:"s-agent-lanes-empty-card",children:[r.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[r.jsx("span",{className:"s-agent-lanes-empty-kicker",children:"Tail incomplete"}),r.jsx("h2",{children:s}),r.jsxs("p",{children:["Scout could not finish ",t||"the tail scan",", so this is not being treated as a quiet interval."]}),r.jsx("p",{className:"s-agent-lanes-empty-secondary",children:"Live events can still arrive while Scout retries."})]}),r.jsx("div",{className:"s-agent-lanes-empty-actions",children:r.jsx("button",{type:"button",onClick:n,children:"Retry tail scan"})})]})})}function ps({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:d,onAddCodexLane:f,sourceCount:v,eventCount:u,degraded:c=!1,onRetry:l}){const L=!!e,m=L?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",y=L?`${e} has no activity in the last ${t}.`:s?`Scout checked ${v.toLocaleString()} session source${v===1?"":"s"} and ${u.toLocaleString()} recent tail event${u===1?"":"s"}; nothing is active in this interval.`:"Automatic lanes are off, and this deck has no pinned sessions.",j=c?"The last tail refresh failed, so this reading is from the previous scan and may be behind.":s?"Scout will keep listening. New turns and tool output will appear here automatically.":"Pin a session lane or turn automatic lanes back on to populate the deck.",k=n==="5m"?"30m":n==="24h"?null:"24h";return r.jsx("div",{className:"s-agent-lanes-empty",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"s-agent-lanes-empty-card",children:[r.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[r.jsx("span",{className:"s-agent-lanes-empty-kicker",children:c?"Tail refresh behind":L?"Filter checked":s?"Tail scanned":"Lane deck ready"}),r.jsx("h2",{children:m}),r.jsx("p",{children:y}),r.jsx("p",{className:"s-agent-lanes-empty-secondary",children:j})]}),r.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[c&&l?r.jsx("button",{type:"button",onClick:l,children:"Retry tail scan"}):null,k?r.jsxs("button",{type:"button",onClick:()=>i(k),children:["Look back ",cn(k)]}):null,r.jsx("button",{type:"button",onClick:d,children:"Show attention"}),r.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function Ls({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:d,isNew:f,nowMs:v,traceWindowMs:u,traceWindowLabel:c,summaryHeight:l,onSummaryResizeStart:L,onSummaryResizeReset:m,summaryResizing:y,onInspect:j,onTraceEventSelect:k,onTogglePin:g,onWidthChange:x,onWidthResizeStart:T,widthResizing:C,focusProps:_,operatorName:b,grid:p=!1}){const{agent:S,observe:E,source:P}=e,I=ln(E),M=!!E,Q=I?" s-agent-lane--live":"",ee=f?" s-agent-lane--new":"",[H,ne]=o.useState(!0),[Y,B]=o.useState(()=>nn(e.id)),F=o.useRef(e.id);o.useEffect(()=>{if(F.current!==e.id){F.current=e.id,B(nn(e.id));return}fs(e.id,Y)},[Y,e.id]);const D=_?.ref,G=_?{"data-cursor":_["data-cursor"],tabIndex:_.tabIndex,onFocus:_.onFocus}:void 0,O=()=>r.jsx("section",{className:"s-agent-lane-trace","aria-label":`${q(S,P)} trace`,children:r.jsx("div",{className:"s-agent-lane-body",children:M?r.jsx(Hn,{data:E??void 0,agentId:e.source==="scout"?S.id:void 0,sessionId:S.harnessSessionId,showRail:!1,variant:"lane",nowMs:v,traceWindowMs:u,traceWindowLabel:c,laneCollapseTechnicalEvents:Y,onLaneCollapseTechnicalEventsChange:B,laneOperatorName:b,onLaneEventSelect:V=>k(e,V)}):r.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})});return r.jsxs("article",{ref:D,"data-lane-id":e.id,className:`s-agent-lane${p?" s-agent-lane--grid":""}${Q}${ee}${s?" s-agent-lane--pinned":""}${_?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:p?void 0:{"--lane-width":`${n}px`},...G,children:[r.jsx(it,{title:t,width:i,defaultWidth:d,pinned:s,onTogglePin:g,onWidthChange:x,onResizeStart:T,resizing:C,statusLabel:dn(S,P),live:I,widthControls:!p}),r.jsx(lt,{model:ct(e,{isLive:I,nowMs:v}),avatar:r.jsx(Wn,{agent:S,placement:"row",size:44,presence:!1,tile:!1}),collapsed:H,cockpitHeight:H?void 0:l,onToggleCollapsed:()=>ne(V=>!V),onOpen:()=>j(e)}),!H&&r.jsx(gt,{onResizeStart:L,onReset:m,active:y}),O()]})}function ys({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:d,harnessFilter:f,projectFilter:v}){const u=o.useContext($n),c=t?.agents??n??u?.agents??[],l=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,L=d??rn(),m=i??on(),[y,j]=o.useState(Date.now()),[k,g]=o.useState(ls),[x,T]=o.useState(()=>cs(s)),[C,_]=o.useState(ds),b=!s&&x==="floor",p=x==="grid",S=b?"4h":k,[E,P]=o.useState(mt),[I,M]=o.useState([]),{beginResize:Q,resetSummaryHeight:ee,resizing:H}=ht(P),ne=o.useCallback(a=>Q(a,E),[Q,E]),Y=xt(S),B=pt(S),F=Pt({enabled:!t,includeTranscriptReplay:!0,hydrateOnDiscovery:!0,discoveryIntervalMs:s?es:5e3,recentLimit:Y,discoveryLimit:s?Qt:void 0,pauseWhenHidden:!0}),D=t?.discovery??F.discovery,G=t?.tailEvents??F.events,O=t?.loadState??F.loadState,V=t?.retryInitialLoad??F.retryInitialLoad,Ee=t?.terminalSessions??I,yn={view:"ops",mode:"lanes"},Z=cn(S),je=s?ns:1e4,Ce=s?ts:1e4;o.useEffect(()=>{const a=setInterval(()=>{en()||j(Date.now())},je);return()=>clearInterval(a)},[je]),o.useEffect(()=>{if(t)return;let a=!1;const h=async()=>{if(!en())try{const ve=await Mn({includeDiscovered:!1});a||M(ve)}catch{a||M([])}};h();const N=setInterval(()=>{h()},Ce),R=we(()=>{h()});return()=>{a=!0,clearInterval(N),R()}},[t,Ce]),o.useEffect(()=>{try{sessionStorage.setItem(fn,k)}catch{}},[k]),o.useEffect(()=>{try{sessionStorage.setItem(mn,x)}catch{}},[x]),o.useEffect(()=>{try{sessionStorage.setItem(hn,C)}catch{}},[C]);const bn=o.useRef(Lt()),Re=o.useRef(""),[te,Ae]=o.useState(()=>new Set),[me,Ie]=o.useState(null),vn=o.useMemo(()=>c.filter(a=>yt(a,y,S)),[c,y,S]),Sn=Pn(vn,{enabled:!t,activeIntervalMs:s?ss:void 0,idleIntervalMs:s?as:void 0,pauseWhenHidden:!0}),Te=t?.observeCache??Sn,kn=O.discovery==="loading"||O.recent==="loading",_e=At(O),De=_e==="blank",xn=_e==="degraded",ze=D?.totals.transcripts??D?.transcripts?.length??0,se=st(kn,De?0:ot);o.useEffect(()=>{if(te.size===0)return;const a=setTimeout(()=>Ae(new Set),900);return()=>clearTimeout(a)},[te]);const{lanes:ae,issues:z,freshLaneIds:he}=o.useMemo(()=>{const a=bt({transcripts:D?.transcripts??[],tailEvents:G,processes:D?.processes??[],scoutAgents:c,terminalSessions:Ee,observeCache:Te,now:y,workingOnly:!0,horizon:S}),h=vt(a.lanes,bn.current),N=[...St(D),...a.issues];return{lanes:h.lanes,issues:N,freshLaneIds:h.newLaneIds}},[D,G,c,Ee,Te,y,S]);o.useEffect(()=>{const a=z.map(h=>`${h.id}\0${h.message}`).join(`
2
- `);a!==Re.current&&(Re.current=a,z.length!==0&&console.warn(`[agent-lanes] ${z.length} roster issue${z.length===1?"":"s"}`,z))},[z]),o.useEffect(()=>{he.length!==0&&Ae(a=>{const h=new Set(a);for(const N of he)h.add(N);return h})},[he.join("\0")]);const Pe=o.useMemo(()=>ae.find(a=>a.id===me)??null,[me,ae]),X=o.useMemo(()=>ae.filter(a=>vs(a,{harnessFilter:f,projectFilter:v})),[ae,f,v]),wn=o.useCallback(a=>Ss(a,{harnessFilter:f,projectFilter:v}),[f,v]),{deck:A,layout:w,pinLane:Me,unpinLane:Oe,setLaneWidth:ge,addHarnessLane:J,addAttentionLane:$e,clearPins:Nn,isPinned:Fe}=Vt(L,m,X),{beginResize:We,resizingLaneId:He}=Kt(ge),pe=o.useMemo(()=>ks({harnessFilter:f,projectFilter:v}),[f,v]),W=w.flat,Le=w.pinnedLeft.length+w.pinnedRight.length,En=o.useMemo(()=>[w.pinnedLeft,w.main,w.pinnedRight].map(a=>a.map(h=>`${h.key}:${h.widthPx}`).join(",")).join("/"),[w.main,w.pinnedLeft,w.pinnedRight]),{handleLaneScroll:K,setLaneScrollNode:U}=ms(L,En),jn=o.useCallback(a=>{U("pinned-left",a)},[U]),Cn=o.useCallback(a=>{U("main",a)},[U]),Rn=o.useCallback(a=>{U("pinned-right",a)},[U]),An=o.useCallback(a=>{K("pinned-left",a)},[K]),In=o.useCallback(a=>{K("main",a)},[K]),Tn=o.useCallback(a=>{K("pinned-right",a)},[K]);o.useEffect(()=>{if(b)return;const a=W.map(h=>{const{lane:N}=h;return{id:N.id,label:q(N.agent,N.source),statusLabel:dn(N.agent,N.source),tone:On(N.agent.state,N.agent),agentId:dt(N.agent)?void 0:N.agent.id,updatedAt:N.lastActiveAt>0?N.lastActiveAt:void 0}});Ze(a)},[W,b]),o.useEffect(()=>()=>Ze(null),[]);const[Be,ye]=o.useState(null),be=o.useCallback(a=>{Ie(a.id)},[]),Ge=o.useCallback((a,h)=>{ye({lane:a,event:h})},[]),_n=o.useCallback(a=>{const h=a.observe?.events.at(-1);h&&ye({lane:a,event:h})},[]),{getLaneFocusProps:Ve}=Mt({lanes:W.map(a=>a.lane),inspectedLaneId:me,onInspect:be,onHorizonChange:g}),[re,$]=o.useState(!1),Ke=o.useRef(null);o.useEffect(()=>{if(!re)return;const a=h=>{Ke.current?.contains(h.target)||$(!1)};return window.addEventListener("pointerdown",a),()=>window.removeEventListener("pointerdown",a)},[re]);const oe=o.useCallback((a,h,N=!1)=>{const{lane:R}=a,ve=q(R.agent,R.source),Dn=A.laneWidths[R.id]??an(a.widthPx).tier??a.widthPx;return r.jsx(Ls,{lane:R,widthPx:a.widthPx,laneTitle:ve,pinned:a.isPinned,laneWidth:Dn,defaultWidth:A.defaultLaneWidth,isNew:te.has(R.id),nowMs:y,traceWindowMs:B,traceWindowLabel:Z,summaryHeight:E,onSummaryResizeStart:ne,onSummaryResizeReset:ee,summaryResizing:H,onInspect:be,onTraceEventSelect:Ge,onTogglePin:()=>{Fe(R.id)?Oe(R.id):Me(R)},onWidthChange:Se=>ge(R.id,Se),onWidthResizeStart:Se=>We(R.id,Se,a.widthPx),widthResizing:He===R.id,focusProps:Ve(h,R.id),operatorName:l,grid:N},a.key)},[We,A.defaultLaneWidth,A.laneWidths,Ve,ne,Z,be,Ge,Fe,l,te,y,Me,ee,He,ge,E,H,B,Oe]);return r.jsxs("div",{className:`s-agent-lanes${s?" s-agent-lanes--embedded s-agent-lanes--low-motion":""}`,"data-lane-profile":L,"data-lane-layout":b?"floor":x,"data-lanes-deck-version":"1",children:[r.jsxs("div",{className:"s-agent-lanes-bar",children:[r.jsxs("div",{className:"s-agent-lanes-bar-leading",children:[r.jsx("div",{className:"s-agent-lanes-title",children:"Agent Lanes"}),r.jsxs("div",{className:"s-agent-lanes-meta","aria-label":"Lane deck status",children:[r.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[b?X.length:W.length," live"]}),!b&&Le>0?r.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[Le," pinned"]}):null,r.jsx("span",{className:"s-agent-lanes-meta-stat",children:b?"past 30m · lanes 4h":`trace ${Z}`}),pe?r.jsx("span",{className:"s-agent-lanes-meta-filter",children:pe}):null,r.jsxs("span",{className:"s-agent-lanes-meta-detail",children:["deck v1 · ",L]})]})]}),r.jsxs("div",{className:"s-agent-lanes-bar-controls",children:[r.jsx("div",{className:"s-agent-lanes-layouts",role:"group","aria-label":"Lane layout",children:Zt(s).map(a=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${x===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":x===a.key,onClick:()=>T(a.key),children:a.label},a.key))}),p?r.jsx("div",{className:"s-agent-lanes-grid-density",role:"group","aria-label":"Grid columns",children:Ut.map(a=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${C===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":C===a.key,title:a.key==="auto"?"Fit columns to the available width":`${a.key} columns`,onClick:()=>_(a.key),children:a.label},a.key))}):null,r.jsxs("div",{className:"s-agent-lanes-deck-menu",ref:Ke,hidden:b,children:[r.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":re,onClick:()=>$(a=>!a),children:"+ Lane"}),re?r.jsxs("div",{className:"s-agent-lanes-deck-popover",role:"menu",children:[r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{$e(),$(!1)},disabled:Gt(A),children:"Needs attention"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{J("codex","Codex sessions"),$(!1)},disabled:ie(A,"codex"),children:"Codex sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{J("claude","Claude sessions"),$(!1)},disabled:ie(A,"claude"),children:"Claude sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{J("grok","Grok sessions"),$(!1)},disabled:ie(A,"grok"),children:"Grok sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{J("kimi","Kimi sessions"),$(!1)},disabled:ie(A,"kimi"),children:"Kimi sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item s-agent-lanes-deck-item--danger",onClick:()=>{Nn(),$(!1)},disabled:Le===0,children:"Clear pinned lanes"})]}):null]}),b?null:r.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":"Activity window",children:de.map((a,h)=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${k===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":k===a.key,title:`${a.label} window (${h+1})`,onClick:()=>g(a.key),children:a.label},a.key))})]})]}),t==null&&z.length>0?r.jsxs("div",{className:"s-agent-lanes-issues",role:"status","aria-live":"polite",children:[r.jsxs("div",{className:"s-agent-lanes-issues-head",children:[r.jsx("span",{className:"s-agent-lanes-issues-badge",children:"Roster issues"}),r.jsxs("span",{className:"s-agent-lanes-issues-meta",children:[z.length," fleet/transcript warning",z.length===1?"":"s"," — lanes follow tail, not agent registry"]})]}),r.jsx("ul",{className:"s-agent-lanes-issues-list",children:z.map(a=>r.jsx(hs,{issue:a},a.id))})]}):null,(b?X.length:W.length)===0?se.visible?r.jsx(at,{discovery:D,discoveryPhase:O.discovery,windowMs:B,nowMs:y,layout:b?"none":p?"grid":"scroll",gridColumns:C,laneWidthPx:sn(A.defaultLaneWidth,A.defaultLaneWidth),matchTranscript:wn}):De?r.jsx(gs,{loadState:O,onRetry:()=>{V()}}):r.jsx(ps,{activeFilterLabel:pe,horizon:k,horizonLabel:Z,showAutoLanes:A.showAutoLanes,onHorizonChange:g,onAddAttentionLane:$e,onAddCodexLane:()=>J("codex","Codex sessions"),sourceCount:ze,eventCount:G.length,degraded:xn,onRetry:()=>{V()}}):b?r.jsx(tt,{lanes:X,now:y,onOpenTrace:_n,railLedger:!0,operatorName:l}):p?r.jsx("div",{className:"s-agent-lanes-grid","data-grid-columns":C,role:"listbox","aria-label":"Agent lane grid",children:W.map((a,h)=>oe(a,h,!0))}):r.jsxs("div",{className:"s-agent-lanes-body",children:[w.pinnedLeft.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-left","aria-label":"Pinned lanes",children:[r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),r.jsx("div",{ref:jn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:An,children:w.pinnedLeft.map((a,h)=>oe(a,h))})]}):null,w.main.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main","aria-label":"Active lanes",children:[w.pinnedLeft.length>0?r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Live"}):null,r.jsx("div",{ref:Cn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:In,children:w.main.map((a,h)=>oe(a,w.pinnedLeft.length+h))})]}):null,w.pinnedRight.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-right","aria-label":"Pinned right lanes",children:[r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),r.jsx("div",{ref:Rn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:Tn,children:w.pinnedRight.map((a,h)=>oe(a,w.pinnedLeft.length+w.main.length+h))})]}):null]}),se.visible?r.jsx(rt,{loadState:O,sourceCount:ze,processCount:D?.processes.length??0,eventCount:G.length,laneCount:b?X.length:W.length,horizonLabel:Z,handedOff:se.exiting,exiting:se.exiting}):null,Pe&&r.jsx(ut,{lane:Pe,navigate:e,returnRoute:yn,navigationEnabled:t==null,onClose:()=>Ie(null)}),Be&&r.jsx(ft,{target:Be,onClose:()=>ye(null)})]})}function ue(e){const n=e?.trim().toLowerCase();return n||null}function xe(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function bs(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function fe(e,n){if(!n)return!0;const t=xe(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const d=i.toLowerCase(),f=bs(i);return d===n||xe(i)===t||!!(f&&(f.toLowerCase()===n||xe(f)===t))})}function vs(e,n){const t=ue(n.harnessFilter),s=ue(n.projectFilter),{agent:i,facts:d,source:f}=e;return fe([i.harness,i.definitionId,d?.attribution,f],t)&&fe([i.project,i.projectRoot,i.cwd,d?.cwd,q(i,f)],s)}function Ss(e,n){return fe([e.harness,e.source],ue(n.harnessFilter))&&fe([e.project,e.cwd],ue(n.projectFilter))}function ks(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const xs=Fn({id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},webPath:"/ops/lanes",screen:"AgentLanesView",embed:{path:"/embed/agent-lanes",aliases:["/ops/lanes/embed","/embed/lanes","/embed/traces"],profile:"macos.lanes",rootClassName:"s-agent-lanes-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:e=>({profileId:rn(),laneSize:on(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),qs=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:ys,scoutSurface:xs},Symbol.toStringTag,{value:"Module"}));export{ys as A,qs as a,Bt as r,Pt as u};
@@ -1,6 +0,0 @@
1
- import{j as s,r as p}from"./index-Bli6bTLU.js";import{u as K}from"./Provider-Ve8yXaWR.js";import{o as E}from"./openContent-C6XO6kr5.js";import{a as H}from"./api-DEHEgJ9m.js";import{c as P}from"./clipboard-e3fSpeo7.js";import{t as D}from"./time-Dhsh_2EG.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./HarnessMark-DGZ6o6Ct.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";const q=30*6e4,z=/^(?:hey|hi|hello)\b[^,]{0,24},\s*|^(?:can|could|would|will)\s+(?:you|we|i)\s+(?:please\s+)?|^please\s+|^let'?s\s+/i,L={created:"+",modified:"~",read:"·"};function J(e){const a=(e.preview??"").replace(/^\[ask:[^\]]+\]\s*/i,"").replace(/\s+/g," ").replace(z,"").trim();if(a)return a.length>150?`${a.slice(0,150).replace(/\s+\S*$/,"")}…`:a;const t=e.title?.trim();return t&&t!==e.agentName?t:"Untitled session"}function R(e){if(!e)return"—";const a=e.replace(/\.jsonl$/,"").replace(/^c\./,"").replace(/^session[_:-]?/i,"");return a.length<=10?a:`${a.slice(0,8)}…${a.slice(-3)}`}function Q(e){return e.replace(/^\/(?:Users|home)\/[^/]+\/(?:dev\/|projects\/|src\/|code\/)?/,"")}function u(e){return!e||e<=0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(e<1e4?1:0).replace(/\.0$/,"")}k`}function X(e){const a=new Map;for(const t of e){if(t.kind!=="tool")continue;const l=(t.tool??"tool").toLowerCase();a.set(l,(a.get(l)??0)+1)}return[...a.entries()].map(([t,l])=>({name:t,n:l})).sort((t,l)=>l.n-t.n).slice(0,8)}function F(){const[e,a]=p.useState(!1),t=p.useRef(null),l=p.useCallback(r=>{P(r).then(c=>{c&&(a(!0),t.current&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>a(!1),1200))})},[]);return p.useEffect(()=>()=>{t.current&&window.clearTimeout(t.current)},[]),[e,l]}function B({copied:e}){return s.jsx("svg",{className:"ap-sx-copyIco",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none","aria-hidden":!0,children:e?s.jsx("path",{d:"M2.6 6.3 5 8.6 9.5 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}):s.jsxs(s.Fragment,{children:[s.jsx("rect",{x:"3.6",y:"3.6",width:"6",height:"6",rx:"1.3",stroke:"currentColor",strokeWidth:"1.05"}),s.jsx("path",{d:"M7.8 3.6V2.5A1.1 1.1 0 0 0 6.7 1.4H2.5A1.1 1.1 0 0 0 1.4 2.5v4.2A1.1 1.1 0 0 0 2.5 7.8h1.1",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function Y({value:e,display:a,title:t,className:l}){const[r,c]=F();return s.jsxs("button",{type:"button",className:l?`ap-sx-copy ${l}`:"ap-sx-copy","data-copied":r||void 0,title:r?"Copied":t??e,"aria-label":`Copy ${e}`,onClick:o=>{o.stopPropagation(),c(e)},children:[s.jsx("span",{className:"ap-sx-copyText",children:a}),s.jsx(B,{copied:r})]})}function Z({session:e,agentId:a,status:t}){const{route:l,navigate:r}=K(),[c,o]=p.useState(null),[v,d]=p.useState("loading"),h=e.harnessSessionId??e.id;p.useEffect(()=>{if(!a){d("loaded");return}let n=!1;return d("loading"),o(null),H(`/api/agents/${encodeURIComponent(a)}/observe`).then(i=>{n||(o(i),d("loaded"))}).catch(()=>{n||d("loaded")}),()=>{n=!0}},[a]);const m=c?.data??null,b=m?.metadata,x=b?.usage,g=b?.session,f=m?.files??[],k=p.useMemo(()=>X(m?.events??[]),[m?.events]),[T,O]=F(),M=g?.gitBranch?.trim()||e.currentBranch?.trim()||"—",S=g?.model?.trim()||"—",y=g?.turnCount??x?.assistantMessages??e.messageCount??null,w=g?.sessionStart??e.lastMessageAt??null,A=x?.contextInputTokens??0,C=x?.contextWindowTokens??0,j=C>0?Math.min(100,Math.round(A/C*100)):null,I=(x?.cacheReadInputTokens??0)+(x?.cacheCreationInputTokens??0),W=()=>E(r,{view:"sessions",sessionId:e.id},{returnTo:l}),U=()=>E(r,{view:"terminal",agentId:a,mode:"takeover"},{returnTo:l}),V=[["branch",M],["model",S],["started",w?D(w):"—"],["turns",y!=null?`${y}`:"—"]],_=()=>{const i=[["session",h],["agent",a||"—"],["branch",M],["model",S],["cwd",g?.cwd?.trim()||"—"],["started",w?new Date(w).toISOString():"—"],["turns",y!=null?`${y}`:"—"],["context",j!=null?`${u(A)} / ${u(C)} (${j}%)`:"—"]].map(([N,G])=>`${`${N}:`.padEnd(9)}${G}`).join(`
2
- `),$=f.length?`
3
-
4
- files touched:
5
- ${[...f].slice(0,24).map(N=>` ${L[N.state]} ${N.path}`).join(`
6
- `)}`:"";return i+$};return v==="loading"?s.jsx("div",{className:"ap-sx-card ap-sx-loading",children:"Loading session…"}):s.jsxs("div",{className:"ap-sx-card",children:[s.jsxs("div",{className:"ap-sx-statGrid",children:[s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:"session"}),s.jsx(Y,{className:"ap-sx-copyStat",value:h,display:`#${R(h)}`,title:h})]}),V.map(([n,i])=>s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:n}),s.jsx("span",{className:"ap-sx-statVal",title:i,children:i})]},n))]}),m?s.jsxs("div",{className:"ap-sx-cols",children:[s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"context"}),j!=null?s.jsxs("span",{className:"ap-sx-read",children:[s.jsx("span",{className:"ap-sx-num",children:u(A)}),s.jsxs("span",{className:"ap-sx-dim",children:[" / ",u(C)]}),s.jsx("span",{className:"ap-sx-sep",children:"·"}),s.jsxs("span",{className:"ap-sx-num",children:[j,"%"]})]}):null]}),j!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ap-sx-gauge","aria-hidden":!0,children:s.jsx("span",{className:"ap-sx-gaugeFill",style:{width:`${j}%`}})}),s.jsxs("div",{className:"ap-sx-flow",children:[s.jsxs("span",{children:["↑",u(x?.inputTokens)," in"]}),s.jsxs("span",{children:["↓",u(x?.outputTokens)," out"]}),I>0?s.jsxs("span",{className:"ap-sx-faint",children:["cache ",u(I)]}):null]})]}):s.jsx("div",{className:"ap-sx-empty",children:"No usage captured."})]}),s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"tools"}),k.length>0?s.jsxs("span",{className:"ap-sx-meta",children:[k.reduce((n,i)=>n+i.n,0)," calls"]}):null]}),k.length>0?s.jsx("div",{className:"ap-sx-tools",children:k.map(n=>s.jsxs("span",{className:"ap-sx-tool",children:[s.jsx("span",{className:"ap-sx-toolName",children:n.name}),s.jsxs("span",{className:"ap-sx-toolN",children:["×",n.n]})]},n.name))}):s.jsx("div",{className:"ap-sx-empty",children:"No tools yet."})]})]}):s.jsx("div",{className:"ap-sx-empty ap-sx-noTrace",children:"No live trace for this session."}),f.length>0?s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"files touched"}),s.jsx("span",{className:"ap-sx-meta",children:f.length})]}),s.jsx("div",{className:"ap-sx-files",children:[...f].sort((n,i)=>(n.state==="read"?1:0)-(i.state==="read"?1:0)).slice(0,8).map(n=>{const i=n.state!=="read",$=n.path.replace(/\/+$/,"").split("/").pop()??n.path,N=Q(n.path.slice(0,n.path.length-$.length));return s.jsxs("div",{className:"ap-sx-fileRow","data-changed":i||void 0,children:[s.jsx("span",{className:"ap-sx-fileMark","data-state":n.state,"aria-hidden":!0,children:L[n.state]}),s.jsx("span",{className:"ap-sx-fileName",children:$}),s.jsx("span",{className:"ap-sx-fileDir",children:N}),s.jsxs("span",{className:"ap-sx-fileN",children:["×",n.touches]})]},n.path)})})]}):null,s.jsxs("div",{className:"ap-sx-actions",children:[s.jsx("button",{type:"button",className:"ap-sx-open",onClick:W,children:"Open ↗"}),s.jsx("button",{type:"button",className:"ap-sx-resume",onClick:U,children:t==="running"?"Send":"Take over"}),s.jsxs("button",{type:"button",className:"ap-sx-copyAll","data-copied":T||void 0,title:"Copy session id + metadata",onClick:()=>O(_()),children:[s.jsx(B,{copied:T}),T?"Copied":"Copy details"]})]})]})}function ss({session:e,fallbackAgentId:a}){const t=e.agentId??a,[l,r]=p.useState(!1),o=e.lastMessageAt!=null&&Date.now()-e.lastMessageAt<q?"running":"idle",v=J(e),d=e.currentBranch?.trim(),h=R(e.harnessSessionId??e.id),m=e.lastMessageAt?D(e.lastMessageAt):"—";return s.jsxs("div",{className:"ap-sx-session","data-open":l||void 0,"data-status":o,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>r(b=>!b),children:[s.jsx("span",{className:"ap-sx-tri","data-open":l||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ap-sx-dot","data-tone":o,"aria-hidden":!0}),s.jsxs("span",{className:"ap-sx-rowBody",children:[s.jsxs("span",{className:"ap-sx-line",children:[s.jsx("span",{className:"ap-sx-title",title:v,children:v}),s.jsxs("span",{className:"ap-sx-rowMeta",children:[s.jsx("span",{className:"ap-sx-badge","data-tone":o,children:o==="running"?"RUNNING":"IDLE"}),s.jsx("span",{className:"ap-sx-age",children:m})]})]}),l?null:s.jsxs("span",{className:"ap-sx-sub",children:[d?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subBranch",children:d}),s.jsx("span",{className:"ap-sx-subSep",children:"·"})]}):null,s.jsxs("span",{className:"ap-sx-subId",children:["#",h]}),e.messageCount>0?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subSep",children:"·"}),s.jsxs("span",{children:[e.messageCount," turn",e.messageCount===1?"":"s"]})]}):null]})]})]}),l?s.jsx(Z,{session:e,agentId:t,status:o}):null]})}function Ws({agentIds:e,sessions:a}){const t=e??[],l=(a??[]).filter(c=>c.agentId!=null&&t.includes(c.agentId)).slice().sort((c,o)=>(o.lastMessageAt??0)-(c.lastMessageAt??0)).slice(0,8);if(l.length===0)return null;const r=t[0]??"";return s.jsx("div",{className:"ap-sx-list",children:l.map(c=>s.jsx(ss,{session:c,fallbackAgentId:r},c.id))})}export{Ws as AgentSessions};
@@ -1 +0,0 @@
1
- import{r as h,j as s}from"./index-Bli6bTLU.js";import{A as B}from"./AgentAvatar-B1xvQ7ej.js";import{H as S,h as w}from"./HarnessMark-DGZ6o6Ct.js";import{c as P}from"./colors-BtO5_zlx.js";import{f as R}from"./text-BR9Bap0E.js";import{t as C}from"./time-Dhsh_2EG.js";import"./Provider-Ve8yXaWR.js";import"./provider-CX9EWecp.js";import"./router-B0YclXYg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./api-DEHEgJ9m.js";import"./sse-CSozY6mp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./NewChatComposer-Bgqes0UQ.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./search-BbgsEMXa.js";import"./loader-circle-DoT8gpw6.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./SpriteAvatar-DMrSssNZ.js";import"./agent-identity-DzHGhLdJ.js";import"./voice-levels-Dcr3jglk.js";function K(n){return n.needsYou?"needs":n.status==="in_turn"||n.status==="in_flight"?"live":"idle"}const H=[{id:"prompt",label:"System prompt",sigil:"◆"},{id:"config",label:"Config",sigil:"▤"},{id:"conversations",label:"Conversations",sigil:"◇"},{id:"context",label:"Context",sigil:"▸"}],q={prompt:"System prompt",config:"Config",conversations:"Conversations",context:"Context"};function U(n){return n?n.replace(/^\/Users\/[^/]+/,"~").replace(/^\/home\/[^/]+/,"~"):""}const k=(n,e)=>`${n} ${e}${n===1?"":"s"}`;function Ds({projects:n,initialSelection:e,onEdit:a,onInterrupt:l,onResetContext:i,onOpenConversation:m,onNewAgent:o}){const d=h.useMemo(()=>n.flatMap(t=>t.agents.map(c=>[t,c])),[n]),x=d[0]?.[1],[u,A]=h.useState(e?.agentId??x?.agent.id??null),[F,E]=h.useState(e?.facet??"prompt"),[I,y]=h.useState(()=>new Set(u?[u]:[])),[M,V]=h.useState(""),g=M.trim().toLowerCase(),D=h.useMemo(()=>g?n.map(t=>({...t,agents:t.agents.filter(c=>c.agent.name.toLowerCase().includes(g)||(c.agent.harness??"").toLowerCase().includes(g)||t.slug.toLowerCase().includes(g))})).filter(t=>t.agents.length>0):n,[n,g]),v=h.useMemo(()=>{for(const[t,c]of d)if(c.agent.id===u)return{project:t,entry:c};return null},[d,u]),T=n.reduce((t,c)=>t+c.agents.length,0),_=T*H.length,z=(t,c)=>{A(t),c&&E(c),y(r=>new Set(r).add(t))},$=t=>{y(c=>{const r=new Set(c);return r.has(t)?r.delete(t):r.add(t),r}),A(t)};return s.jsxs("div",{className:"s-acon",children:[s.jsxs("div",{className:"ac-shell",children:[s.jsxs("aside",{className:"ac-tree",children:[s.jsxs("div",{className:"ac-treeHead",children:[s.jsx("span",{className:"ac-treeIco","aria-hidden":!0,children:"⌕"}),s.jsx("input",{className:"ac-treeFind",placeholder:"Filter agents…",value:M,onChange:t=>V(t.target.value)})]}),s.jsxs("div",{className:"ac-treeScroll",children:[D.map(t=>s.jsxs("div",{className:"ac-treeGroup",children:[s.jsxs("div",{className:"ac-treeProject",children:[s.jsx("span",{className:"ac-sigil",children:"/"}),t.slug,s.jsx("span",{className:"ac-treeProjectCount",children:t.agents.length})]}),t.agents.map(c=>{const r=I.has(c.agent.id),f=K(c),G=c.agent.id===u;return s.jsxs("div",{className:"ac-agentBlock",children:[s.jsxs("button",{type:"button",className:"ac-agent","data-open":r||void 0,onClick:()=>$(c.agent.id),children:[s.jsx("span",{className:"ac-agentChev","data-open":r||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ac-agentAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:c.agent.name,harness:c.agent.harness,state:c.agent.state},placement:"node",size:16})}),s.jsx("span",{className:"ac-agentName","data-idle":f==="idle"||void 0,children:c.agent.name}),f==="needs"?s.jsx("span",{className:"ac-needs",children:"needs you"}):null,s.jsxs("span",{className:"ac-agentTail",children:[f!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":f,"aria-hidden":!0}):null,c.agent.harness?s.jsx("span",{className:"ac-agentMark","aria-hidden":!0,children:s.jsx(S,{harness:c.agent.harness,size:11})}):null]})]}),r?s.jsx("div",{className:"ac-facets",children:H.map(j=>{const L=j.id==="conversations"?c.sessions.length:void 0,W=G&&F===j.id;return s.jsxs("button",{type:"button",className:"ac-facet","data-active":W||void 0,onClick:()=>z(c.agent.id,j.id),children:[s.jsx("span",{className:"ac-facetSigil","aria-hidden":!0,children:j.sigil}),s.jsx("span",{className:"ac-facetLabel",children:j.label}),L!=null?s.jsx("span",{className:"ac-facetCount",children:L}):null]},j.id)})}):null]},c.agent.id)})]},t.key)),o?s.jsx("button",{type:"button",className:"ac-newAgent",onClick:o,children:"+ new agent"}):null]})]}),s.jsx("main",{className:"ac-read",children:v?s.jsx(Y,{project:v.project,entry:v.entry,facet:F,onEdit:a,onInterrupt:l,onResetContext:i,onOpenConversation:m}):s.jsx("div",{className:"ac-empty",children:"No agents."})}),s.jsx("aside",{className:"ac-rail",children:v?s.jsx(ss,{entry:v.entry,onOpenConversation:m}):null})]}),s.jsxs("div",{className:"ac-foot",children:[s.jsx("span",{className:"ac-footStat",children:k(n.length,"project")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(T,"agent")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(_,"facet")})]})]})}function Y({project:n,entry:e,facet:a,onEdit:l,onInterrupt:i,onResetContext:m,onOpenConversation:o}){const{agent:d,config:x}=e,u=e.status==="in_turn"||e.status==="in_flight";return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"ac-readHead",children:[s.jsxs("div",{className:"ac-crumb",children:[s.jsx("span",{className:"ac-crumbDim",children:n.slug}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsxs("span",{className:"ac-crumbAgent",children:["@",d.name]}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsx("span",{className:"ac-crumbFacet",children:q[a]})]}),s.jsxs("div",{className:"ac-readActions",children:[(a==="prompt"||a==="config")&&l&&x.editable?s.jsx("button",{type:"button",className:"ac-actPrimary",onClick:()=>l(d.id),children:"Edit"}):null,u&&i?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>i(d.id),children:"Interrupt"}):null,a==="context"&&m?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>m(d.id),children:"Reset"}):null,o?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>o(d.id),children:"Open ↗"}):null]})]}),s.jsxs("div",{className:"ac-metaStrip",children:[s.jsx(b,{k:"Type",v:Q(a)}),x.model?s.jsx(b,{k:"Model",v:x.model,mono:!0}):null,s.jsx(b,{k:"Editable",v:x.editable?"yes":"read-only"}),e.lastActivityAt?s.jsx(b,{k:"Active",v:C(e.lastActivityAt)}):null]}),s.jsxs("div",{className:"ac-readBody",children:[a==="prompt"?s.jsx(J,{entry:e}):null,a==="config"?s.jsx(X,{entry:e}):null,a==="conversations"?s.jsx(Z,{entry:e,onOpenConversation:o}):null,a==="context"?s.jsx(O,{entry:e}):null]})]})}function Q(n){switch(n){case"prompt":return"Markdown · system prompt";case"config":return"Runtime config";case"conversations":return"Conversation list";case"context":return"Live context window"}}function J({entry:n}){const{agent:e,config:a}=n,l=a.systemPrompt.trim()||a.templateHint||"default template",i=!a.systemPrompt.trim();return s.jsxs("div",{className:"ac-doc",children:[s.jsxs("div",{className:"ac-docHead",children:[s.jsx("span",{className:"ac-docKey",children:"name"}),s.jsx("span",{className:"ac-docVal",children:e.name}),e.role?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"role"}),s.jsx("span",{className:"ac-docVal",children:R(e.role)??e.role})]}):null,s.jsx("span",{className:"ac-docKey",children:"harness"}),s.jsx("span",{className:"ac-docVal",children:w(e.harness)}),a.model?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"model"}),s.jsx("span",{className:"ac-docVal",children:a.model})]}):null]}),s.jsx("div",{className:"ac-docLabel",children:i?"Default template":"System prompt"}),s.jsx("pre",{className:"ac-prose","data-default":i||void 0,children:l})]})}function X({entry:n}){const{agent:e,config:a}=n;return s.jsxs("div",{className:"ac-config",children:[s.jsxs(N,{k:"Harness",children:[s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:e.harness,size:12})}),w(e.harness)]}),s.jsx(N,{k:"Model",children:a.model??"—"}),s.jsx(N,{k:"Permissions",children:a.permission??"default"}),s.jsx(N,{k:"Transport",children:a.runtime.transport}),s.jsx(N,{k:"Workdir",mono:!0,title:a.runtime.cwd,children:U(a.runtime.cwd)||a.runtime.cwd}),s.jsx(N,{k:"Session",mono:!0,children:a.runtime.sessionId}),a.launchArgs.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Launch"}),s.jsxs("pre",{className:"ac-cmd",children:[a.runtime.harness," ",a.launchArgs.join(" ")]})]}):null,a.capabilities.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Capabilities"}),s.jsx("div",{className:"ac-chips",children:a.capabilities.map(l=>s.jsx("span",{className:"ac-chip",children:l},l))})]}):null]})}function Z({entry:n,onOpenConversation:e}){return n.sessions.length?s.jsx("div",{className:"ac-convos",children:n.sessions.map(a=>s.jsxs("button",{type:"button",className:"ac-convo",disabled:!e,onClick:()=>e?.(n.agent.id,a.id),children:[s.jsx("span",{className:"ac-convoDot","aria-hidden":!0}),s.jsxs("span",{className:"ac-convoBody",children:[s.jsx("span",{className:"ac-convoTitle",children:a.title||a.preview||"Conversation"}),a.preview&&a.title?s.jsx("span",{className:"ac-convoPreview",children:a.preview}):null,s.jsxs("span",{className:"ac-convoMeta",children:[a.currentBranch?s.jsx("span",{className:"ac-convoBranch",children:a.currentBranch}):null,s.jsxs("span",{children:[a.messageCount," msgs"]}),a.lastMessageAt?s.jsx("span",{children:C(a.lastMessageAt)}):null]})]})]},a.id))}):s.jsx("div",{className:"ac-empty",children:"No conversations yet."})}function O({entry:n}){const e=n.context;if(!e)return s.jsx("div",{className:"ac-empty",children:"No live context — agent is not in an active session."});const a=e.usedPercent!=null?Math.round(e.usedPercent):null;return s.jsxs("div",{className:"ac-ctx",children:[s.jsxs("div",{className:"ac-ctxTop",children:[s.jsx("span",{className:"ac-ctxState","data-state":e.state,children:e.state}),s.jsxs("span",{className:"ac-ctxTurns",children:[e.turnCount," turns"]})]}),a!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ac-ctxGauge",children:s.jsx("span",{className:"ac-ctxFill",style:{width:`${Math.min(100,a)}%`}})}),s.jsxs("div",{className:"ac-ctxRead",children:[s.jsxs("span",{className:"ac-ctxNum",children:[a,"%"]}),s.jsx("span",{className:"ac-ctxDim",children:"of context window used"})]})]}):null,e.contextInputTokens!=null&&e.contextWindowTokens!=null?s.jsxs("div",{className:"ac-ctxTokens",children:[e.contextInputTokens.toLocaleString()," / ",e.contextWindowTokens.toLocaleString()," ","tokens"]}):null]})}function ss({entry:n,onOpenConversation:e}){const{agent:a,config:l}=n,i=K(n),m=a.ownerName||a.ownerHandle||null;return s.jsxs("div",{className:"ac-railInner",children:[s.jsxs("div",{className:"ac-railIdent",children:[s.jsx("span",{className:"ac-railAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:a.name,harness:a.harness,state:a.state},placement:"inspector"})}),s.jsxs("div",{className:"ac-railNames",children:[s.jsxs("div",{className:"ac-railName",children:["@",a.name]}),a.role?s.jsx("div",{className:"ac-railRole",children:R(a.role)??a.role}):null]})]}),s.jsxs("div",{className:"ac-railState","data-tone":i==="idle"?void 0:i,children:[i!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":i,"aria-hidden":!0}):null,s.jsx("span",{children:n.needsYou?"Needs you":P(a.state)})]}),n.activeTask?s.jsx("div",{className:"ac-railTask",children:n.activeTask}):null,s.jsxs("div",{className:"ac-railGroup",children:[s.jsx(p,{k:"Harness",v:w(a.harness),mark:a.harness}),s.jsx(p,{k:"Model",v:l.model??"—"}),m?s.jsx(p,{k:"Owner",v:m}):null,a.branch?s.jsx(p,{k:"Branch",v:a.branch,mono:!0}):null,s.jsx(p,{k:"State",v:P(a.state)}),a.updatedAt?s.jsx(p,{k:"Updated",v:C(a.updatedAt)}):null,s.jsx(p,{k:"Sessions",v:String(n.sessions.length)})]}),l.permission?s.jsxs("div",{className:"ac-railSub",children:[s.jsx("div",{className:"ac-railSubHead",children:"Permissions"}),s.jsx("span",{className:"ac-chip",children:l.permission})]}):null,l.capabilities.length?s.jsxs("div",{className:"ac-railSub",children:[s.jsxs("div",{className:"ac-railSubHead",children:["Capabilities · ",l.capabilities.length]}),s.jsx("div",{className:"ac-chips",children:l.capabilities.map(o=>s.jsx("span",{className:"ac-chip",children:o},o))})]}):null,a.conversationId&&e?s.jsx("button",{type:"button",className:"ac-railOpen",onClick:()=>e(a.id),children:"Open conversation →"}):null]})}function b({k:n,v:e,mono:a}){return s.jsxs("span",{className:"ac-metaItem",children:[s.jsx("span",{className:"ac-metaKey",children:n}),s.jsx("span",{className:"ac-metaVal","data-mono":a||void 0,children:e})]})}function N({k:n,children:e,mono:a,title:l}){return s.jsxs("div",{className:"ac-configRow",children:[s.jsx("span",{className:"ac-configKey",children:n}),s.jsx("span",{className:"ac-configVal","data-mono":a||void 0,title:l,children:e})]})}function p({k:n,v:e,mono:a,mark:l}){return s.jsxs("div",{className:"ac-railFact",children:[s.jsx("span",{className:"ac-railFactKey",children:n}),s.jsxs("span",{className:"ac-railFactVal","data-mono":a||void 0,children:[l?s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:l,size:11})}):null,e]})]})}export{Ds as AgentsConsole};
@@ -1 +0,0 @@
1
- import{j as e,r as d}from"./index-Bli6bTLU.js";import{p as v,a as b}from"./api-DEHEgJ9m.js";import{u as Q,d as Z}from"./Provider-Ve8yXaWR.js";import{P as ee,d as te}from"./router-B0YclXYg.js";import{u as se}from"./sse-CSozY6mp.js";import{o as oe,i as D}from"./surface-activity-B1rgWB1i.js";/* empty css */import{AgentsSubnav as ne}from"./AgentsSubnav-3_vpn2bT.js";import{AgentsLibrary as ie}from"./library-BSVrjn_m.js";import{r as re,d as ae}from"./NewChatComposer-Bgqes0UQ.js";import{AgentDetailWithRail as de,AgentProfileBar as le}from"./profile-BkmuseW7.js";/* empty css *//* empty css *//* empty css */import"./provider-CX9EWecp.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-DmtFisY9.js";import"./createLucideIcon-DLlxGjKt.js";import"./TextDocumentSurface-C7fGlzY8.js";import"./file-text-BVhkMWyC.js";import"./x-BJyPzFnn.js";import"./chevron-right-BMqtBds_.js";import"./code-xml-ByQsfOI_.js";import"./arrow-left-i-h6JAgs.js";import"./arrow-right-B0Yi01Zr.js";import"./scout-voice-DvG_3stJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-7iEtvu9P.js";import"./chunk-HRAB3GC3-BUVYXXAp.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-cYTw2p39.js";import"./secondaryNavConfig-DyC_P9Wx.js";import"./message-square-DlY4EneU.js";import"./search-BbgsEMXa.js";import"./compass-BepM5iWH.js";import"./settings-BzWCF3NF.js";import"./terminal-BiNIXhna.js";import"./git-branch-q8Ayc8py.js";import"./scroll-text-DRidbcse.js";/* empty css */import"./time-Dhsh_2EG.js";import"./SpriteAvatar-DMrSssNZ.js";import"./agent-identity-DzHGhLdJ.js";import"./HarnessMark-DGZ6o6Ct.js";import"./AgentSessions-czl5zT7A.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./text-BR9Bap0E.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DoT8gpw6.js";import"./conversation-model-CigSPlKA.js";import"./index-DFdlQs_c.js";import"./NewChatOrigin-DpHS2Wmt.js";import"./chevron-down-Da5tV19_.js";import"./agents-project-model-UYiamtrU.js";import"./AgentAvatar-B1xvQ7ej.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-CUQ8LUJY.js";import"./terminal-relay-pSm7_An6.js";import"./BackToPicker-CqYhOaLB.js";import"./ConversationScreen-CjWWmuuh.js";import"./ConversationComposer-Ce7Byw48.js";import"./zap-rw7uwZht.js";import"./message-markup-DAnnGpWr.js";import"./mentions-Cd6XticV.js";import"./AgentDetailCard-FelCxQrT.js";import"./AgentLiveActions-Bn3zeZBN.js";import"./terminal-takeover-CtA3wcXh.js";import"./eye-BeCSqJn1.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-C3sg0ULI.js";import"./AstronautSuit-BADl7m8x.js";import"./ConversationFeedRows-DygDfQn_.js";import"./ConversationPanels-Dg4Y2GgX.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-BLn59zLn.js";import"./proxy-C35W-YHZ.js";import"./activity-D4W2XZY2.js";import"./message-circle-44KSmbvQ.js";import"./tail-events-CrN-Rmxj.js";import"./ConversationStatus-BhVIYQza.js";import"./check-Bfs7hMb1.js";import"./sparkles-ytTwpCbZ.js";import"./SessionObserve-zAlFbwFn.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-197xYmRp.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-D85P6RAk.js";import"./ObserveTextFlow-C1f5oize.js";import"./SessionObserveEvidence-BVawzqoE.js";import"./wrench-CQvdf7KT.js";import"./external-link-BGHC_naA.js";import"./AgentDefinitionsWorkspace-rw3vh8Lm.js";import"./agent-specialization-CNrsRbKA.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Dg7_88pv.js";/* empty css */import"./agent-essentials-CngjUhQj.js";const K=new Set(["0","false","off","no","clear","none"]),ce=new Set(["1","true","on","yes"]),me=new Set(["localhost","127.0.0.1","::1"]);function ue(t){return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}function L(t){const o=t?.trim().toLowerCase();return o==="before"||o==="after"?o:null}function z(t){if(!t)return null;const o=t.trim().toLowerCase();return ce.has(o)?!0:K.has(o)?!1:null}function M(t,o,i=[]){const r=z(t);if(r!==null)return r;if(!t)return null;const l=o.toLowerCase(),a=new Set([l,l.replace(/-/g,""),...i.map(n=>n.trim().toLowerCase()).filter(Boolean)]),s=t.split(",").map(n=>n.trim().toLowerCase()).filter(Boolean);return s.some(n=>K.has(n))?!1:s.some(n=>a.has(n))?!0:null}function pe({studyId:t,aliases:o,href:i,storedEnabled:r,storedMode:l,dev:a,defaultMode:s="after"}){const n=i?new URL(i,"http://localhost"):null,p=M(n?.searchParams.get("studio"),t,o)??M(n?.searchParams.get(`studio.${t}`),t,o)??M(n?.searchParams.get("studioInjection"),t,o),c=n?me.has(ue(n.hostname)):!1;if(!a&&!c)return{enabled:!1,mode:s};const u=p??z(r)??!1,g=L(n?.searchParams.get("studioMode"))??L(n?.searchParams.get(`studioMode.${t}`))??L(l)??s;return{enabled:u,mode:g}}const he="openscout.studio.inject.",fe="openscout.studio.mode.";function O(t){return`${he}${t}`}function T(t){return`${fe}${t}`}function $(t){if(typeof window>"u")return null;try{return window.localStorage.getItem(t)}catch{return null}}function I(t,o){if(!(typeof window>"u"))try{window.localStorage.setItem(t,o)}catch{}}function ge(){return import.meta.env?.DEV===!0}function je(t){return t==="before"?"after":"before"}function xe(t){typeof window>"u"||ee({searchPatch:{studio:null,[`studio.${t}`]:null,studioInjection:null,studioMode:null,[`studioMode.${t}`]:null},replace:!0})}function ve(t,o=[]){const[i,r]=d.useState(()=>pe({studyId:t,aliases:o,href:typeof window>"u"?void 0:window.location.href,storedEnabled:$(O(t)),storedMode:$(T(t)),dev:ge()})),[l,a]=d.useState(!1);d.useEffect(()=>{if(!i.enabled){a(!1);return}const c=j=>{j.altKey&&a(!0)},u=j=>{j.altKey||a(!1)},g=()=>a(!1);return window.addEventListener("keydown",c),window.addEventListener("keyup",u),window.addEventListener("blur",g),()=>{window.removeEventListener("keydown",c),window.removeEventListener("keyup",u),window.removeEventListener("blur",g)}},[i.enabled]);const s=d.useCallback(c=>{I(O(t),c?"1":"0"),r(u=>({...u,enabled:c}))},[t]),n=d.useCallback(c=>{I(T(t),c),r(u=>({...u,mode:c}))},[t]),p=l?je(i.mode):i.mode;return d.useMemo(()=>({...i,renderedMode:p,peeking:p!==i.mode,setEnabled:s,setMode:n}),[p,s,n,i])}function Se({studyId:t,aliases:o,anchor:i,title:r,children:l,renderStudy:a}){const s=ve(t,o);return s.enabled?e.jsxs("div",{className:"s-studio-injection","data-studio-anchor":i,children:[e.jsxs("div",{className:"s-studio-injection-bar",children:[e.jsxs("div",{className:"s-studio-injection-label",children:[e.jsx("span",{className:"s-studio-injection-kicker",children:"Studio injection"}),e.jsx("span",{className:"s-studio-injection-title",children:r}),e.jsx("span",{className:"s-studio-injection-anchor",children:i})]}),e.jsxs("div",{className:"s-studio-injection-controls",role:"group","aria-label":`${r} mode`,children:[e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="before","aria-pressed":s.mode==="before",onClick:()=>s.setMode("before"),children:"Before"}),e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="after","aria-pressed":s.mode==="after",onClick:()=>s.setMode("after"),children:"After"})]}),e.jsx("span",{className:"s-studio-injection-state",children:s.peeking?`Option: ${s.renderedMode}`:s.renderedMode}),e.jsx("button",{type:"button",className:"s-studio-injection-close",onClick:()=>{xe(t),s.setEnabled(!1)},children:"Close"})]}),e.jsx("div",{className:"s-studio-injection-body","data-studio-mode":s.renderedMode,children:s.renderedMode==="before"?l:a()})]}):e.jsx(e.Fragment,{children:l})}const N=[{id:"openscout",title:"openscout",root:"~/dev/openscout",signal:"Studio mode injection for agent directory",sessions:9,agents:[{id:"hudson",name:"Hudson",handle:"@hudson",state:"working",role:"web design system",branch:"feat/studio-mode",task:"Refactoring the agent directory into insertion points",last:"18s"},{id:"scout",name:"Scout",handle:"@scout",state:"attention",role:"operator assistant",branch:"main",task:"Needs placement decision",last:"1m"},{id:"quill",name:"Quill",handle:"@quill",state:"ready",role:"docs",branch:"docs/agent-view",task:"Ready to write the study summary",last:"7m"}]},{id:"hudson",title:"hudson",root:"~/dev/hudson",signal:"Slot contracts and chrome primitives",sessions:4,agents:[{id:"atlas",name:"Atlas",handle:"@atlas",state:"working",role:"framework",branch:"slots/studio-anchor",task:"Mapping chrome slots to page anchors",last:"3m"},{id:"mira",name:"Mira",handle:"@mira",state:"ready",role:"qa",branch:"main",task:"Idle",last:"12m"}]},{id:"lattices",title:"lattices",root:"~/dev/lattices",signal:"macOS web view parity pass",sessions:2,agents:[{id:"north",name:"North",handle:"@north",state:"offline",role:"native",branch:"main",task:"No active session",last:"1h"}]}],we={working:"working",ready:"ready",attention:"attention",offline:"offline"};function ye({children:t}){return e.jsx(Se,{studyId:"agent-directory",aliases:["agents","agent","agent-directory-before-after"],anchor:"agents.directory",title:"Agent Directory",renderStudy:()=>e.jsx(be,{}),children:t})}function be(){const t=N.flatMap(s=>s.agents),o=t.filter(s=>s.state==="working"),i=t.filter(s=>s.state==="ready"),r=t.filter(s=>s.state==="attention"),l=N.reduce((s,n)=>s+n.sessions,0),a=o[0]??t[0];return e.jsxs("section",{className:"s-agent-studio-study","aria-label":"Agent directory injected study",children:[e.jsxs("div",{className:"s-agent-studio-banner",children:[e.jsx("span",{children:"After study"}),e.jsx("strong",{children:"Injected static view inside the live Agents route"}),e.jsx("em",{children:"Fixture data · insertion-point prototype · no backend writes"})]}),e.jsxs("header",{className:"s-agent-studio-head","data-studio-anchor":"agent.directory.header",children:[e.jsxs("div",{className:"s-agent-studio-title-block",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Studio / agents.directory / after"}),e.jsx("h1",{className:"s-agent-studio-title",children:"Project command center"}),e.jsxs("span",{className:"s-agent-studio-subtitle",children:[t.length," agents across ",N.length," projects"]})]}),e.jsxs("div",{className:"s-agent-studio-metrics","aria-label":"Agent study summary",children:[e.jsx(A,{label:"working",value:o.length,tone:"working"}),e.jsx(A,{label:"ready",value:i.length}),e.jsx(A,{label:"attention",value:r.length,tone:"attention"}),e.jsx(A,{label:"sessions",value:l})]})]}),e.jsxs("div",{className:"s-agent-studio-layout",children:[e.jsxs("div",{className:"s-agent-studio-main",children:[e.jsxs("section",{className:"s-agent-studio-pressure","data-studio-anchor":"agent.active-strip",children:[e.jsxs("div",{className:"s-agent-studio-section-head",children:[e.jsx("span",{children:"Pressure queue"}),e.jsx("strong",{children:o.length+r.length})]}),e.jsx("div",{className:"s-agent-studio-pressure-list",children:[...o,...r].map(s=>e.jsxs("article",{className:`s-agent-studio-pressure-card s-agent-studio-pressure-card--${s.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":s.state}),e.jsxs("div",{className:"s-agent-studio-pressure-copy",children:[e.jsx("strong",{children:s.name}),e.jsx("span",{children:s.task})]}),e.jsx("time",{children:s.last})]},s.id))})]}),e.jsx("section",{className:"s-agent-studio-projects","data-studio-anchor":"agent.project-board",children:N.map(s=>e.jsxs("article",{className:"s-agent-studio-project",children:[e.jsxs("div",{className:"s-agent-studio-project-main",children:[e.jsxs("div",{children:[e.jsx("span",{className:"s-agent-studio-project-root",children:s.root}),e.jsx("h2",{children:s.title})]}),e.jsxs("span",{className:"s-agent-studio-project-sessions",children:[s.sessions," sessions"]})]}),e.jsx("p",{children:s.signal}),e.jsx("div",{className:"s-agent-studio-agent-row",children:s.agents.map(n=>e.jsxs("span",{className:`s-agent-studio-agent-pill s-agent-studio-agent-pill--${n.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":n.state}),n.name]},n.id))})]},s.id))})]}),e.jsxs("aside",{className:"s-agent-studio-detail","data-studio-anchor":"agent.detail-preview",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Pinned agent"}),e.jsx("h2",{children:a.name}),e.jsx("span",{className:`s-agent-studio-state s-agent-studio-state--${a.state}`,children:we[a.state]}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Handle"}),e.jsx("dd",{children:a.handle})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Role"}),e.jsx("dd",{children:a.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Branch"}),e.jsx("dd",{children:a.branch})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Current task"}),e.jsx("dd",{children:a.task})]})]})]})]})]})}function A({label:t,value:o,tone:i}){return e.jsxs("div",{className:`s-agent-studio-metric${i?` s-agent-studio-metric--${i}`:""}`,children:[e.jsx("strong",{children:o}),e.jsx("span",{children:t})]})}const P="/api/conversations",H="/api/fleet",F="/api/tail/discover",U="/api/topology/snapshot?force=1",S=3e4;function ys({navigate:t,selectedAgentId:o,conversationId:i,tab:r,activeRoute:l}){const{agents:a,agentsLoaded:s,route:n}=Q(),[p,c]=d.useState(()=>v(P,S)??[]),[u,g]=d.useState(()=>v(H,S)),[j,G]=d.useState(()=>v(F,S)),[q,W]=d.useState(()=>v(U,S)),[X,Y]=d.useState(()=>v(P,S)===null),R=te(n),k=d.useMemo(()=>Z(a,R),[a,R]),x=d.useCallback(async()=>{const[h,f,y,C]=await Promise.allSettled([b(P),b(H),b(F),b(U)]);h.status==="fulfilled"&&c(h.value),f.status==="fulfilled"&&g(f.value),y.status==="fulfilled"&&G(y.value),C.status==="fulfilled"&&W(C.value),Y(!1)},[]);d.useEffect(()=>{x()},[x]),d.useEffect(()=>{const h=()=>{D()&&x()},f=window.setInterval(h,1e4),y=oe(h);return()=>{window.clearInterval(f),y()}},[x]),se(()=>{D()&&x()});const m=re(k,o),_=!!(o&&m&&m.id!==o),w=n.view==="agents-v2"?n.projectSlug:void 0,E=!!(w&&!r),{conversationByAgentId:B,sessionByAgentId:J}=ae(p);if(d.useEffect(()=>{!o||!m||!_||t({view:"agents-v2",agentId:m.id,...E&&w?{projectSlug:w}:{},...i?{conversationId:i}:{},...r?{tab:r}:{}})},[i,r,E,t,w,m,o,_]),m&&!E){const h=i??B.get(m.id)??m.conversationId??null,f=r??(i?"message":"profile");return e.jsx(V,{activeRoute:l??n,navigate:t,bar:e.jsx(le,{agent:m,conversationId:h,activeTab:f,navigate:t}),children:e.jsx(de,{agent:m,allAgents:k,conversationId:h,navigate:t,activeTab:f})})}return e.jsx(V,{activeRoute:l??n,navigate:t,children:e.jsx(ye,{children:e.jsx(ie,{agents:k,fleet:u,sessionByAgentId:J,conversationByAgentId:B,sessions:p,discovery:j,topologySnapshot:q,loading:!s||X,navigate:t,selectedAgentId:m?.id??o})})})}function V({activeRoute:t,children:o,navigate:i,bar:r}){return e.jsxs("div",{className:"s-secondary-nav-shell",children:[e.jsx("div",{className:"s-secondary-nav-bar",children:r??e.jsx(ne,{activeRoute:t,navigate:i})}),e.jsx("div",{className:"s-secondary-nav-body",children:o})]})}export{ys as AgentsScreen};