@openscout/scout 0.2.87 → 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 (486) 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-Dw2oyCcz.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-2DZQahiN.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-CeSjWWwh.js → AgentLaneCard-BRAkw8YJ.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-Do7CXwin.js → AgentLaneChrome-T8QE5742.js} +1 -1
  14. package/dist/client/assets/AgentLaneDetailSheet-C8RYotnv.js +4 -0
  15. package/dist/client/assets/{AgentLaneSummaryResize--lHgnncr.js → AgentLaneSummaryResize-FyYweLo_.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-BwkGk8JH.js → AgentLanesPreflight-Cil3dNwu.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-DPfO8MOo.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-BmXDRxER.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-DOKJbiJL.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-DLIJ8eYj.js → BriefingsScreen-BerYOoWS.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-C8WERmHF.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-CtgqIuS0.js → CodeDiffPane-BjCOBLze.js} +1 -1
  32. package/dist/client/assets/{CodeProjectPicker-C4W_udc7.js → CodeProjectPicker-NSGdCaK0.js} +1 -1
  33. package/dist/client/assets/{CodeScreen-WhTvVUKY.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-DFacT2uu.js → DataTable-Dzqiaha4.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-D797PbCe.js → DispatchAftermath-B0WMg_z3.js} +1 -1
  44. package/dist/client/assets/DocumentFocusViewer-CZVVIAD5.js +1 -0
  45. package/dist/client/assets/{EmbeddableSurfacesLab-JczLmmF-.js → EmbeddableSurfacesLab-C3a7hJWO.js} +1 -1
  46. package/dist/client/assets/{EmptyState-uQbB-bvP.js → EmptyState-CYNJZMrZ.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-ebbCtnHE.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-Bfu2_KtU.js → FollowScreen-Bb_rcrzi.js} +1 -1
  52. package/dist/client/assets/{HarnessMark-CEzmPFHC.js → HarnessMark-DrE57dUq.js} +1 -1
  53. package/dist/client/assets/HarnessesScreen-CAsCJ_tG.js +1 -0
  54. package/dist/client/assets/{HerdrSession-BDLa_rrK.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-GjmxYBi_.js → KnowledgeSearchInspector-CbPVg3fr.js} +1 -1
  58. package/dist/client/assets/KnowledgeSearchScreen-C1lN1xJk.js +1 -0
  59. package/dist/client/assets/{LaneToolHoverCard-DCY-m0JK.js → LaneToolHoverCard-BkBcDYm-.js} +1 -1
  60. package/dist/client/assets/LaneTraceDetailSheet-CzTd44rf.js +1 -0
  61. package/dist/client/assets/{LaneTraceEventFocus-BfKZ7G5c.js → LaneTraceEventFocus-BmMmPTyJ.js} +1 -1
  62. package/dist/client/assets/{MeshCanvas-CZYHLTvw.js → MeshCanvas-DwkjsiJ5.js} +2 -2
  63. package/dist/client/assets/{MeshCanvasMinimap-D3mJ78CM.js → MeshCanvasMinimap-vmCpU1sD.js} +1 -1
  64. package/dist/client/assets/MeshScreen-CkMepUpT.js +1 -0
  65. package/dist/client/assets/{MeshTopologyView-A-wh0Ad1.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-MTL2EAnr.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-Ctixol4_.js → NewAgentModal-Do9aVvan.js} +1 -1
  74. package/dist/client/assets/NewChatComposer-DKlNX1UA.js +19 -0
  75. package/dist/client/assets/{NewChatOrigin-CCiPg_WR.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-B4RqrI0Q.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-Cr1SL5ht.js → RepoDiffEmbedScreen-xjzjcJ_c.js} +1 -1
  97. package/dist/client/assets/{RepoDiffPageScreen-DeC8fsh_.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-BQwIShXf.js → ReposScreen-CpaLC_NU.js} +6 -6
  101. package/dist/client/assets/ScoutDeckSurface-DkpZ-0DH.js +1 -0
  102. package/dist/client/assets/{ScoutSurface-DdVzN3DA.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-sLjfSKtS.js → ScoutbotFxLab-Bk2ZsfPp.js} +1 -1
  106. package/dist/client/assets/ScoutbotRealtimeVoiceCall-n63LdBZs.js +1 -0
  107. package/dist/client/assets/{SecondaryNav-CCQqTT3e.js → SecondaryNav-B4IsujYh.js} +1 -1
  108. package/dist/client/assets/{SessionEmbedScreen-BrLMZJ3N.js → SessionEmbedScreen-CPfH-jqN.js} +1 -1
  109. package/dist/client/assets/{SessionObserve-pbozyqVv.js → SessionObserve-B-SkP3tu.js} +1 -1
  110. package/dist/client/assets/{SessionObserveEvidence-C54Xvbps.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-CiVH-45m.js → ShikiPane-DH8yYDks.js} +1 -1
  117. package/dist/client/assets/{SlidePanel-BLrLF9dt.js → SlidePanel-RFXJpfUa.js} +1 -1
  118. package/dist/client/assets/{SpriteAvatar-vpHO-rXs.js → SpriteAvatar-CEYdCzem.js} +1 -1
  119. package/dist/client/assets/{StatusPill-a3XBw1GG.js → StatusPill-9uy70ttd.js} +1 -1
  120. package/dist/client/assets/{TailView-C3rjOV7i.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-B29xZNlI.js → TextDocumentSurface-BcP9vvji.js} +1 -1
  124. package/dist/client/assets/{TmuxPeek-eVfqPB4m.js → TmuxPeek-IaWqCgyJ.js} +1 -1
  125. package/dist/client/assets/{VoicePermissionsPanel-DpInOlVq.js → VoicePermissionsPanel-C80iZxgy.js} +1 -1
  126. package/dist/client/assets/{WorkDetailScreen-DYwgGaJs.js → WorkDetailScreen-CweZ6fEd.js} +3 -3
  127. package/dist/client/assets/WorkFilesViewer-Dy_-06iI.js +1 -0
  128. package/dist/client/assets/{activity-DTqqWiyV.js → activity-DS0u0Itf.js} +1 -1
  129. package/dist/client/assets/{addon-fit-CcaylYTX.js → addon-fit-CN888B3D.js} +1 -1
  130. package/dist/client/assets/{addon-webgl-B37iuzOG.js → addon-webgl-CoAnanQS.js} +1 -1
  131. package/dist/client/assets/{agent-essentials-DbbJm3ne.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-BRPqOKIx.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-B0CdJdAC.js → arrow-left-CXDkJuCg.js} +1 -1
  143. package/dist/client/assets/{arrow-up-right-CilNLf4t.js → arrow-up-right-Bj8RjSqW.js} +1 -1
  144. package/dist/client/assets/{bot-Ba3gcRVa.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-BdovFDz8.js → check-BfA0T8UD.js} +1 -1
  148. package/dist/client/assets/{chevron-down-Jh540uf3.js → chevron-down-BVg09D6U.js} +1 -1
  149. package/dist/client/assets/{chevron-right-CV7sEVBS.js → chevron-right-CaEwYkxE.js} +1 -1
  150. package/dist/client/assets/{chunk-HRAB3GC3-BYQZ1LOn.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-DpfYdWcr.js → clock-C3TUL7D7.js} +1 -1
  155. package/dist/client/assets/{code-xml-CPzpZkhu.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-bHIIZ9z3.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-DQAM0eSY.js → copy-C79v_7D-.js} +1 -1
  177. package/dist/client/assets/{createLucideIcon-Da0lq809.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-BheHazeW.js → external-link-Dd8xaveL.js} +1 -1
  182. package/dist/client/assets/{eye-B908WSFH.js → eye-DkU59kfl.js} +1 -1
  183. package/dist/client/assets/{file-text-BGVkHS4_.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-iwd10r9G.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-feLCB3Zm.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-BAmj273z.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-Be0T8xv2.js → loader-circle-B-l2Wj3-.js} +1 -1
  216. package/dist/client/assets/{local-agents-Q6KQ12B9.js → local-agents-Wof5knTJ.js} +1 -1
  217. package/dist/client/assets/{mentions-KNASbAjG.js → mentions-BjXfeF7t.js} +1 -1
  218. package/dist/client/assets/{mesh-ops-C-i8OMiM.js → mesh-ops-C1gq8zKf.js} +1 -1
  219. package/dist/client/assets/{mesh-view-store-B0lqpw8M.js → mesh-view-store-B56D3f77.js} +1 -1
  220. package/dist/client/assets/{message-circle-2v9Udia0.js → message-circle-BwVx5X0q.js} +1 -1
  221. package/dist/client/assets/{message-markup-BP2nH9kQ.js → message-markup-DlVX-iuc.js} +1 -1
  222. package/dist/client/assets/{message-square-DURSOrUr.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-HeCy97KT.js → mission-control-store-CMgIVjLJ.js} +1 -1
  225. package/dist/client/assets/model-Co0zkMIc.js +1 -0
  226. package/dist/client/assets/{observe-DkAhvkfn.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-CEP5pGf3.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-ZReaTFF-.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-BC9TO5Pl.js → radio-BGtkyCG9.js} +1 -1
  235. package/dist/client/assets/{refresh-cw-C4E58VJK.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-BarpRgcv.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-CIzaNH58.js → right-c4PAdFYZ.js} +1 -1
  248. package/dist/client/assets/{rocket-BahfIwFz.js → rocket-BWh18pt_.js} +1 -1
  249. package/dist/client/assets/router-63XV_E7f.js +1 -0
  250. package/dist/client/assets/{text-B2UZi3l9.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-CmG2X_S0.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-uulNqrf7.js → scroll-text-DZb3mmYo.js} +1 -1
  256. package/dist/client/assets/{search-HmdKXdtR.js → search-1QMVOxF3.js} +1 -1
  257. package/dist/client/assets/secondaryNavConfig-c0cz3MkJ.js +1 -0
  258. package/dist/client/assets/{selection-bridge-n4wNTm1B.js → selection-bridge-O9C4kGfF.js} +1 -1
  259. package/dist/client/assets/{send-horizontal-DOjHkZCD.js → send-horizontal-DbyEkGql.js} +1 -1
  260. package/dist/client/assets/{server-CX-xQjJA.js → server-Bncn9S7r.js} +1 -1
  261. package/dist/client/assets/{session-catalog-b7B1Sof1.js → session-catalog-DC6BlBBC.js} +1 -1
  262. package/dist/client/assets/{session-table-Djain1Qr.js → session-table-BUPq9Viy.js} +1 -1
  263. package/dist/client/assets/{sliders-horizontal-D2O6QiDN.js → sliders-horizontal-CMe8Bay1.js} +1 -1
  264. package/dist/client/assets/{sparkles-CgTby-ap.js → sparkles-_7cTZsIH.js} +1 -1
  265. package/dist/client/assets/{sse-QSbhyq9A.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-B7BrDaFi.js → tail-events-C12pfUax.js} +1 -1
  269. package/dist/client/assets/{terminal-relay-C2TUIuh1.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-BArLfNtd.js → terminal-takeover--05EYhJm.js} +1 -1
  272. package/dist/client/assets/{terminal-DNZTCr6a.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-htp0Ui63.js → use-conversation-list-DWX02INv.js} +1 -1
  275. package/dist/client/assets/{use-fleet-active-asks-BhuTn5mV.js → use-fleet-active-asks-Cnwa4hTK.js} +1 -1
  276. package/dist/client/assets/{use-mesh-ops-items-CD-qsvNX.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-BIrm8esH.js → useAgentHoverCard-DvPZSJK3.js} +1 -1
  280. package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +1 -0
  281. package/dist/client/assets/{usePierreRuntime-CVTMzChM.js → usePierreRuntime-C8WJ0X3F.js} +1 -1
  282. package/dist/client/assets/{wrench-DwFKomxg.js → wrench-_tHBGTop.js} +1 -1
  283. package/dist/client/assets/{x-DuzAbpk5.js → x-CrGUKNRv.js} +1 -1
  284. package/dist/client/assets/{xterm-xQGYNyB-.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-DRHTQIxu.js +0 -1
  297. package/dist/client/assets/AgentAvatar-CQqJcwOQ.js +0 -1
  298. package/dist/client/assets/AgentAvatar-CUZZARWG.css +0 -1
  299. package/dist/client/assets/AgentConfigurationScreen-C3OI6JmZ.js +0 -1
  300. package/dist/client/assets/AgentDefinitionsWorkspace-D0LDEqfl.js +0 -1
  301. package/dist/client/assets/AgentFloorView-CoGh2q5f.js +0 -1
  302. package/dist/client/assets/AgentInfoScreen-5ybfIL9p.js +0 -1
  303. package/dist/client/assets/AgentLaneDetailSheet-BD8B51ka.js +0 -4
  304. package/dist/client/assets/AgentLanesEmbedScreen-FRTVASPw.js +0 -1
  305. package/dist/client/assets/AgentLanesView-Bm85ittm.js +0 -2
  306. package/dist/client/assets/AgentSessions-C_tAfGN2.js +0 -6
  307. package/dist/client/assets/AgentsConsole-DsHWsaOJ.js +0 -1
  308. package/dist/client/assets/AgentsScreen-Bod6AHlA.js +0 -1
  309. package/dist/client/assets/AgentsSubnav-CsvYzzQ-.js +0 -1
  310. package/dist/client/assets/AstronautSuit-C05Ezxl9.js +0 -1
  311. package/dist/client/assets/BackToPicker-CXsbxbHM.js +0 -1
  312. package/dist/client/assets/BriefingDetailScreen-Uvnk3t0v.js +0 -1
  313. package/dist/client/assets/BrokerScreen-LZ3T7hGG.js +0 -5
  314. package/dist/client/assets/Canvas-BO9mx5_P.js +0 -1
  315. package/dist/client/assets/ChatCollapsedStrip-CtLPTLTY.js +0 -1
  316. package/dist/client/assets/ConversationComposer-DPWu3HvK.js +0 -1
  317. package/dist/client/assets/ConversationFeedRows-MhcPfxUr.js +0 -1
  318. package/dist/client/assets/ConversationHeader-Ce7TENb9.js +0 -1
  319. package/dist/client/assets/ConversationPanels-D-b5SLO-.js +0 -6
  320. package/dist/client/assets/ConversationScreen-C5HnXd5w.css +0 -1
  321. package/dist/client/assets/ConversationScreen-D77SoLos.js +0 -1
  322. package/dist/client/assets/ConversationStatus-lIvSKRic.js +0 -1
  323. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
  324. package/dist/client/assets/CrewWorkspaces-CdojnRMG.js +0 -1
  325. package/dist/client/assets/DocumentFocusViewer-CetjnYut.js +0 -1
  326. package/dist/client/assets/FlightObserveScreen-sqvt7HUO.js +0 -1
  327. package/dist/client/assets/HarnessesScreen-CGhRsqD5.js +0 -1
  328. package/dist/client/assets/HomeHero-7JwycwFY.css +0 -1
  329. package/dist/client/assets/HomeHero-DdxTQ-6a.js +0 -1
  330. package/dist/client/assets/HostAdvisorView-BAUi5ZxX.js +0 -1
  331. package/dist/client/assets/KnowledgeSearchScreen-CRei9pyl.js +0 -1
  332. package/dist/client/assets/LaneTraceDetailSheet-CFsCvKa3.js +0 -1
  333. package/dist/client/assets/MeshScreen-dxNxRtKm.js +0 -1
  334. package/dist/client/assets/MessagesScreen-CR5v-WIE.js +0 -1
  335. package/dist/client/assets/MissionControlView-BGj1qnI2.js +0 -1
  336. package/dist/client/assets/MissionFocusOverlay-hWi6y87j.js +0 -1
  337. package/dist/client/assets/MissionLeftAgentRow-BSRRiiig.js +0 -1
  338. package/dist/client/assets/MissionLogPane-bbG_pM9B.js +0 -1
  339. package/dist/client/assets/NewChatComposer-BPsg8shF.js +0 -19
  340. package/dist/client/assets/ObserveEmbedScreen-Be87Chod.js +0 -2
  341. package/dist/client/assets/ObserveTextFlow-CKYltTPJ.js +0 -2
  342. package/dist/client/assets/ObservedTopologyPanel-CfHYu-4Z.js +0 -2
  343. package/dist/client/assets/OpenScoutAppShell-DPeP1vtK.js +0 -88
  344. package/dist/client/assets/OpsAgentsView-dEtw9yt-.js +0 -1
  345. package/dist/client/assets/OpsScreen-QXRJY8Vf.js +0 -1
  346. package/dist/client/assets/OpsSubnav-BK9Fj3gU.js +0 -1
  347. package/dist/client/assets/ProjectAgentProfile-BjykZ2Xd.js +0 -1
  348. package/dist/client/assets/ProjectAgentProfileHero-Bc0g8rhW.js +0 -1
  349. package/dist/client/assets/ProjectsInbox--ZIqo-IE.js +0 -2
  350. package/dist/client/assets/ProjectsRail-CzS0qTCI.js +0 -1
  351. package/dist/client/assets/ProjectsScreen-0gx7f30h.js +0 -1
  352. package/dist/client/assets/ProjectsThreadAside-BsQRFbdy.js +0 -1
  353. package/dist/client/assets/Provider-Cd-QZltN.js +0 -1
  354. package/dist/client/assets/RailRow-B0sRaJc6.css +0 -1
  355. package/dist/client/assets/RailRow-BY6fxePa.js +0 -1
  356. package/dist/client/assets/RawSessionsTable-CbopOF34.js +0 -1
  357. package/dist/client/assets/RealtimeVoiceScreen-CU4uXz4C.js +0 -9
  358. package/dist/client/assets/RepoDiffViewer-CiTOWK_Z.js +0 -7
  359. package/dist/client/assets/RepoDiffViewerLazy-BU3V7Kwq.js +0 -2
  360. package/dist/client/assets/ScoutDeckSurface-BncYKicb.js +0 -1
  361. package/dist/client/assets/SessionRefScreen-UVNVrwAf.js +0 -1
  362. package/dist/client/assets/SessionsScreen-KeDb5gz4.js +0 -1
  363. package/dist/client/assets/SettingsDrawer-CWdj0VvN.js +0 -3
  364. package/dist/client/assets/SettingsDrawer-J-8x1eII.css +0 -1
  365. package/dist/client/assets/SettingsScreen-C7zJgZzj.js +0 -1
  366. package/dist/client/assets/Terminal-CMQFmHnn.js +0 -1
  367. package/dist/client/assets/TerminalEmbedScreen-GvpoGERN.js +0 -1
  368. package/dist/client/assets/TerminalRelay-CIHlLVf1.js +0 -46
  369. package/dist/client/assets/WorkFilesViewer-C7H5fXaZ.js +0 -1
  370. package/dist/client/assets/agent-autocomplete-cOPLtuhM.js +0 -2
  371. package/dist/client/assets/agent-identity-CIMT7oV6.js +0 -1
  372. package/dist/client/assets/agent-specialization-D3-sqwhU.js +0 -1
  373. package/dist/client/assets/api-DEHEgJ9m.js +0 -1
  374. package/dist/client/assets/archive-DPMdoW_D.js +0 -1
  375. package/dist/client/assets/arrow-right-YRBoTTyf.js +0 -1
  376. package/dist/client/assets/broker-display-Q75fupqG.js +0 -2
  377. package/dist/client/assets/collapsed-strip-raJWthAH.css +0 -1
  378. package/dist/client/assets/compass-D5Io6BIV.js +0 -1
  379. package/dist/client/assets/content-3b_jmxEx.js +0 -1
  380. package/dist/client/assets/content-B-i0XY-t.js +0 -1
  381. package/dist/client/assets/content-BD-DNFmb.js +0 -1
  382. package/dist/client/assets/content-BGeo5tgd.js +0 -1
  383. package/dist/client/assets/content-BMvXPLiQ.js +0 -1
  384. package/dist/client/assets/content-BWTbfMDg.js +0 -1
  385. package/dist/client/assets/content-BwCmeUmF.js +0 -1
  386. package/dist/client/assets/content-C1K3NcZa.js +0 -1
  387. package/dist/client/assets/content-C34J5_Af.js +0 -1
  388. package/dist/client/assets/content-CGRtIS2m.js +0 -1
  389. package/dist/client/assets/content-CIJo_-JS.js +0 -1
  390. package/dist/client/assets/content-CvqIqVAV.js +0 -1
  391. package/dist/client/assets/content-DRnwm-Vu.js +0 -1
  392. package/dist/client/assets/content-Dh39SSvP.js +0 -1
  393. package/dist/client/assets/content-DoypqDj5.js +0 -1
  394. package/dist/client/assets/content-n3mvc6NQ.js +0 -1
  395. package/dist/client/assets/conversation-model-CIzM7aXT.js +0 -1
  396. package/dist/client/assets/conversation-motion-features-CrP5K-dk.js +0 -1
  397. package/dist/client/assets/cpu-CtQc0Z9D.js +0 -1
  398. package/dist/client/assets/credentials-qwds23lv.js +0 -1
  399. package/dist/client/assets/ctx-panel-D_HJ3nhb.css +0 -1
  400. package/dist/client/assets/discover-DdkMhTAV.js +0 -2
  401. package/dist/client/assets/embed-entry-DoSM1GZB.js +0 -2
  402. package/dist/client/assets/file-code-corner-C5Pc6znt.js +0 -1
  403. package/dist/client/assets/gauge-sc_gb5Zw.js +0 -1
  404. package/dist/client/assets/gestures-AzPBSf20.js +0 -1
  405. package/dist/client/assets/git-branch-CdJU49Af.js +0 -1
  406. package/dist/client/assets/home-moving-signal-CZo2bYBi.js +0 -1
  407. package/dist/client/assets/home-moving-signal-DMguaRWR.css +0 -1
  408. package/dist/client/assets/home-now-card-DgxfZHcR.js +0 -1
  409. package/dist/client/assets/hooks-CeCCO6Yg.js +0 -2
  410. package/dist/client/assets/host-advisor-B2Fqs5Dd.css +0 -1
  411. package/dist/client/assets/index-BIiI9gfa.js +0 -1
  412. package/dist/client/assets/index-CD2foMB8.js +0 -1
  413. package/dist/client/assets/index-DReHD_4U.js +0 -1
  414. package/dist/client/assets/index-DzlEgstl.css +0 -1
  415. package/dist/client/assets/index-NRbRrZw-.js +0 -10
  416. package/dist/client/assets/index-wLwc74Pu.css +0 -1
  417. package/dist/client/assets/inspector-panel-CBf8pW7s.js +0 -2
  418. package/dist/client/assets/layers-D9fblkql.js +0 -1
  419. package/dist/client/assets/layout-grid-Vd1chalc.js +0 -1
  420. package/dist/client/assets/left-41_3QKk1.js +0 -1
  421. package/dist/client/assets/left-B3ofA1Pr.js +0 -2
  422. package/dist/client/assets/left-BWBZQhxQ.js +0 -1
  423. package/dist/client/assets/left-BhA6essi.js +0 -1
  424. package/dist/client/assets/left-BmTKCv4f.js +0 -1
  425. package/dist/client/assets/left-CCGR6tIF.js +0 -2
  426. package/dist/client/assets/left-DH44V4I_.css +0 -1
  427. package/dist/client/assets/left-Dfwzkwh_.js +0 -1
  428. package/dist/client/assets/left-R2OOE7VG.css +0 -1
  429. package/dist/client/assets/left-advisor-yrzW1Kwz.js +0 -1
  430. package/dist/client/assets/left-agents-Bgahk0FF.js +0 -1
  431. package/dist/client/assets/left-default-CtkfAquc.js +0 -1
  432. package/dist/client/assets/left-lanes-CpujaVN3.js +0 -1
  433. package/dist/client/assets/left-mission-Bbd-fW6W.js +0 -1
  434. package/dist/client/assets/library-Dx14WNGd.js +0 -1
  435. package/dist/client/assets/mission-control-CnU7dNt1.css +0 -1
  436. package/dist/client/assets/persistent-state-Bm_0TmZL.js +0 -1
  437. package/dist/client/assets/profile-Y0X7HZHc.js +0 -1
  438. package/dist/client/assets/projects-inbox-Cbfj4Hx7.js +0 -1
  439. package/dist/client/assets/provider-Bq0ScH3v.js +0 -1
  440. package/dist/client/assets/proxy-DtC2iXnT.js +0 -1
  441. package/dist/client/assets/resolve-panes-BI3WdDS-.js +0 -1
  442. package/dist/client/assets/resolve-sidebar-context-_g0pIxOr.js +0 -1
  443. package/dist/client/assets/right-BA0F8fPI.js +0 -1
  444. package/dist/client/assets/right-C4GXB45w.js +0 -1
  445. package/dist/client/assets/right-CXetlD8X.js +0 -1
  446. package/dist/client/assets/right-CnRcQS_I.js +0 -1
  447. package/dist/client/assets/right-D2_rmbAH.js +0 -1
  448. package/dist/client/assets/right-Dqp--KwX.js +0 -1
  449. package/dist/client/assets/right-HJJzRuGD.js +0 -1
  450. package/dist/client/assets/right-WCMb8YXJ.js +0 -1
  451. package/dist/client/assets/router-Bx1tiwVe.js +0 -1
  452. package/dist/client/assets/scout-voice-BT3gYDhU.js +0 -1
  453. package/dist/client/assets/scoutbot-markdown-DIhLsYxz.js +0 -6
  454. package/dist/client/assets/secondaryNavConfig-BVQiyAXu.js +0 -1
  455. package/dist/client/assets/settings-BpKRzxOD.js +0 -1
  456. package/dist/client/assets/system-surfaces-redesign-QVXNeGYw.css +0 -1
  457. package/dist/client/assets/text-rLpBg4_z.css +0 -1
  458. package/dist/client/assets/use-reduced-motion-0fAsybdo.js +0 -1
  459. package/dist/client/assets/use-scout-dev-flags-DV_I6URU.js +0 -1
  460. package/dist/client/assets/useContentSecondaryNav-4atpGgFw.js +0 -1
  461. package/dist/client/assets/usePersistentState-InmPXIN4.js +0 -1
  462. package/dist/client/assets/zap-CocRNtyr.js +0 -1
  463. package/dist/client/crew/brik-bust.webp +0 -0
  464. package/dist/client/crew/brik-chip-id.webp +0 -0
  465. package/dist/client/crew/lulu-bust.webp +0 -0
  466. package/dist/client/crew/milo-bust.webp +0 -0
  467. package/dist/client/crew/milo-chip-id.webp +0 -0
  468. package/dist/client/crew/nori-bust.webp +0 -0
  469. package/dist/client/crew/sheets/eye-plate-v1/blink-half.webp +0 -0
  470. package/dist/client/crew/sheets/eye-plate-v1/blink-shut.webp +0 -0
  471. package/dist/client/crew/sheets/eye-plate-v1/look-left.webp +0 -0
  472. package/dist/client/crew/sheets/eye-plate-v1/look-right.webp +0 -0
  473. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  474. package/dist/client/crew/sheets/eye-plate-v1/rest.webp +0 -0
  475. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  476. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  477. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  478. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  479. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  480. package/dist/client/crew/sprout-bust.webp +0 -0
  481. package/dist/client/crew/sprout-chip-id.webp +0 -0
  482. package/dist/client/crew/vex-bust.webp +0 -0
  483. package/dist/client/crew/vex-chip-id.webp +0 -0
  484. package/dist/client/crew/wrench-bust.webp +0 -0
  485. package/dist/client/crew/wrench-chip-id.webp +0 -0
  486. /package/dist/client/assets/{DocumentFocusViewer-BSC_JwVE.css → document-focus-viewer-BSC_JwVE.css} +0 -0
package/README.md CHANGED
@@ -1,8 +1,12 @@
1
- # scout
1
+ # Scout CLI
2
2
 
3
- > **Requires [Bun](https://bun.sh).** Scout uses Bun as its runtime. If you don't have it: `brew install bun`
3
+ The `scout` command is the front door to the local Scout control plane. It
4
+ discovers coding-agent sessions, routes messages and work through the broker,
5
+ and returns durable handles for follow-up across harnesses and machines.
4
6
 
5
- Install:
7
+ > **Requires [Bun](https://bun.sh).** On macOS, install it with `brew install bun`.
8
+
9
+ ## Install
6
10
 
7
11
  ```bash
8
12
  bun add -g @openscout/scout
@@ -27,7 +31,8 @@ scout ask --project ../talkie --harness claude "can you review our docs?"
27
31
  `scout setup` is the canonical onboarding entry point. It creates or updates:
28
32
 
29
33
  - `~/Library/Application Support/OpenScout/settings.json`
30
- - `~/Library/Application Support/OpenScout/relay-agents.json` for compatibility with the existing machine-local agent registry
34
+ - `~/Library/Application Support/OpenScout/relay-agents.json` as compatibility
35
+ configuration that the broker reconciles into its canonical live state
31
36
  - `.openscout/project.json` for the current repo when needed
32
37
 
33
38
  It also discovers local and project-backed agents from your configured workspace roots, installs the base Scout service, attempts to start it, and ensures Caddy is available for the local `scout.local` edge. On macOS, setup installs missing Caddy with `brew install caddy`; otherwise install Caddy yourself or set `OPENSCOUT_CADDY_BIN`.
@@ -98,7 +103,7 @@ The routing rules do not change by harness, UI, or host:
98
103
  Short mutable callback names are broker-owned route aliases:
99
104
 
100
105
  ```bash
101
- scout alias set review --to scope.main.arts-mac-mini-local
106
+ scout alias set review --to scope.main.dev-mac-mini-local
102
107
  scout alias set patch --to session:019eff52-9347-7470-ba5c-6bfe99d8dd83
103
108
  scout alias resolve patch
104
109
  scout alias repoint patch --to session:<new-id> --if-revision 1
package/bin/scoutd CHANGED
Binary file
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "schemaVersion": 1,
3
3
  "packageName": "@openscout/scout",
4
- "version": "0.2.87",
5
- "commit": "84a70671e3b0c847705628984aad354299893fbd",
6
- "branch": "main",
4
+ "version": "0.2.90",
5
+ "commit": "d07ae9447d6da8408e4d1a1b8d21cb364151340d",
6
+ "branch": "HEAD",
7
7
  "sourceDirty": false,
8
- "builtAt": "2026-08-23T21:40:05.085Z"
8
+ "builtAt": "2026-08-26T01:15:37.434Z"
9
9
  }
@@ -0,0 +1 @@
1
+ import{r as n,j as s}from"./index-BZovGpDk.js";import{a as Y}from"./api-h5zurxmi.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as J}from"./sse-Bb0EOcU9.js";import{d as Q}from"./colors-BtO5_zlx.js";import{u as X,m as Z,d as ss}from"./Provider-p-xuaAoE.js";import{b as es}from"./router-63XV_E7f.js";import{r as O}from"./mentions-BjXfeF7t.js";import{t as I,b as B}from"./time-Dhsh_2EG.js";import{u as as}from"./ContextMenu-DnFcmfMR.js";import{E as C}from"./EmptyState-CYNJZMrZ.js";/* empty css */import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./createLucideIcon-DCq_3fQn.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./AgentDetailCard-Dtc02KUO.js";import"./AgentLiveActions-DwScaVRF.js";import"./terminal-takeover--05EYhJm.js";import"./openContent-C6XO6kr5.js";import"./eye-DkU59kfl.js";import"./terminal-xGf_F3y7.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"]),is={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 ls(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 le({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=as(),_=es(z),L=n.useMemo(()=>Z(p,_),[p,_]),i=n.useMemo(()=>ss(v,L).filter(e=>!ns.has(e.kind)),[v,L]);n.useEffect(()=>{T.current=v},[v]),n.useEffect(()=>{x&&!i.some(e=>e.id===x)&&w(null)},[x,i]);const m=n.useCallback(async(e="initial")=>{const l=++b.current;!(T.current.length>0)&&e!=="background"?(A(!0),S(null)):$(!0);try{const o=await Y("/api/activity");if(l!==b.current)return;U(o),S(null),F(Date.now()),w(g=>o.some(E=>E.id===g)?g:null)}catch(o){if(l!==b.current)return;S(o instanceof Error?o.message:String(o))}finally{l===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(i.map(c=>c.actorName??"system")),l=new Set(i.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${i.length}`,detail:i.length>0?`Latest ${I(i[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${l.size}`,detail:l.size>0?"Conversation-linked records":"No linked threads"}]},[i]),H=!y&&i.length===0&&!!h,V=!y&&i.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&&i.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&&i.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&i.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."}),i.length>0&&s.jsx("div",{className:"sys-audit-list",children:i.map(e=>{const l=x===e.id,c=ls(e.kind),o=is[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(l?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${l?" 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":l,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:l?"Close":"Details"})]}),l&&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{le as ActivityScreen};
@@ -1 +1 @@
1
- import{r as n,j as o}from"./index-NRbRrZw-.js";import{a as y}from"./api-DEHEgJ9m.js";import{c as j}from"./createLucideIcon-Da0lq809.js";const m=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],f=j("folder-plus",m);function h({onClose:p}){const[d,l]=n.useState(""),[r,c]=n.useState(!1),[i,a]=n.useState(null),u=async()=>{const e=d.trim();if(!(!e||r)){c(!0),a(null);try{const t=await y("/api/projects/add",{method:"POST",body:JSON.stringify({root:e})}),s=t.projects[0]?.title??null;t.alreadyRegistered?a({text:s?`/${s} is already registered`:"Already registered",tone:"ok"}):s?(a({text:`Registered /${s}`,tone:"ok"}),l("")):a({text:"Root added, but no project found there yet",tone:"error"})}catch(t){a({text:t instanceof Error?t.message:String(t),tone:"error"})}finally{c(!1)}}};return o.jsxs("div",{className:"pi-addProject",children:[o.jsxs("div",{className:"pi-addProjectBox","data-busy":r||void 0,children:[o.jsx(f,{size:13,strokeWidth:1.8,"aria-hidden":!0}),o.jsx("input",{className:"pi-addProjectInput",type:"text",value:d,placeholder:"~/dev/my-project","aria-label":"Project folder path",autoFocus:!0,disabled:r,spellCheck:!1,onChange:e=>l(e.currentTarget.value),onKeyDown:e=>{e.key==="Enter"&&u(),e.key==="Escape"&&p()}}),o.jsx("button",{type:"button",className:"pi-addProjectSubmit",disabled:r||!d.trim(),onClick:()=>{u()},children:r?"Adding...":"Add"})]}),i?o.jsx("div",{className:"pi-addProjectNote","data-tone":i.tone,role:"status",children:i.text}):null]})}const k=Object.freeze(Object.defineProperty({__proto__:null,AddProjectForm:h},Symbol.toStringTag,{value:"Module"}));export{h as A,f as F,k as a};
1
+ import{r as n,j as o}from"./index-BZovGpDk.js";import{a as y}from"./api-h5zurxmi.js";import{c as j}from"./createLucideIcon-DCq_3fQn.js";const m=[["path",{d:"M12 10v6",key:"1bos4e"}],["path",{d:"M9 13h6",key:"1uhe8q"}],["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],f=j("folder-plus",m);function h({onClose:p}){const[d,l]=n.useState(""),[r,c]=n.useState(!1),[i,a]=n.useState(null),u=async()=>{const e=d.trim();if(!(!e||r)){c(!0),a(null);try{const t=await y("/api/projects/add",{method:"POST",body:JSON.stringify({root:e})}),s=t.projects[0]?.title??null;t.alreadyRegistered?a({text:s?`/${s} is already registered`:"Already registered",tone:"ok"}):s?(a({text:`Registered /${s}`,tone:"ok"}),l("")):a({text:"Root added, but no project found there yet",tone:"error"})}catch(t){a({text:t instanceof Error?t.message:String(t),tone:"error"})}finally{c(!1)}}};return o.jsxs("div",{className:"pi-addProject",children:[o.jsxs("div",{className:"pi-addProjectBox","data-busy":r||void 0,children:[o.jsx(f,{size:13,strokeWidth:1.8,"aria-hidden":!0}),o.jsx("input",{className:"pi-addProjectInput",type:"text",value:d,placeholder:"~/dev/my-project","aria-label":"Project folder path",autoFocus:!0,disabled:r,spellCheck:!1,onChange:e=>l(e.currentTarget.value),onKeyDown:e=>{e.key==="Enter"&&u(),e.key==="Escape"&&p()}}),o.jsx("button",{type:"button",className:"pi-addProjectSubmit",disabled:r||!d.trim(),onClick:()=>{u()},children:r?"Adding...":"Add"})]}),i?o.jsx("div",{className:"pi-addProjectNote","data-tone":i.tone,role:"status",children:i.text}):null]})}const k=Object.freeze(Object.defineProperty({__proto__:null,AddProjectForm:h},Symbol.toStringTag,{value:"Module"}));export{h as A,f as F,k as a};
@@ -0,0 +1 @@
1
+ import{j as l}from"./index-BZovGpDk.js";import{a as g,S}from"./SpriteAvatar-CEYdCzem.js";import{i as b,s as E,e as P}from"./colors-BtO5_zlx.js";const C={hero:{tile:!1,presence:!1,glow:!0},inspector:{size:40,tile:!0,presence:!0},row:{size:24,tile:!0,presence:!0},turn:{tile:!1,presence:!1},list:{tile:!1,presence:!1},roster:{tile:!1,presence:!1},node:{size:16,tile:!1,presence:!1}};function I({agent:e,name:u,kind:f="agent",placement:d="row",size:h,presence:m,tile:v,salt:w,className:s,channelClassName:x,style:t,title:o}){const r=e?.name??u??"?";if(f==="channel")return l.jsx("span",{className:x??s,style:t,title:o??r,children:"#"});const n=C[d],a=e?g(e):null,c=m??n.presence,A=b(e?.state??null),j=c&&A?E(e?.state??null):void 0,z=c&&P(e?.state??null),p=h??n.size,i=l.jsx(S,{name:r,size:p,hue:a?.hue,tone:a?.tone,salt:w,tile:v??n.tile,glow:n.glow,corner:j,cornerPulse:z,title:o??r});return p==null?l.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",...t},title:o??r,children:i}):s||t?l.jsx("span",{className:s,style:t,children:i}):i}export{I as A};
@@ -0,0 +1 @@
1
+ import{r as t,j as s}from"./index-BZovGpDk.js";import{E as H}from"./EmptyState-CYNJZMrZ.js";import{a as R}from"./api-h5zurxmi.js";import{e as L}from"./NewChatComposer-DKlNX1UA.js";import{d as K}from"./time-Dhsh_2EG.js";import{u as I}from"./Provider-p-xuaAoE.js";import{o as U}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as q}from"./AgentsSubnav-BV0WAgzf.js";/* empty css */import{R as W}from"./refresh-cw-DtF8xPqX.js";import{S as V}from"./secondaryNavConfig-c0cz3MkJ.js";import{c as E}from"./createLucideIcon-DCq_3fQn.js";import{B as O}from"./bot-BSGSicKC.js";import{W as Y}from"./wrench-_tHBGTop.js";import{S as F}from"./server-Bncn9S7r.js";import"./runtime-picker-BXKJbLot.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./NewChatOrigin-DXPvX-hh.js";import"./keyboard-nav-CHo_xmjw.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-CrGUKNRv.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./file-text-BITQqGtF.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-Bb0EOcU9.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./SecondaryNav-B4IsujYh.js";import"./message-square-BnkG6tae.js";import"./terminal-xGf_F3y7.js";import"./scroll-text-DZb3mmYo.js";const J=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],G=E("cpu",J);const Q=[["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=E("key-round",Q);const X=[["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"}]],Z=E("save",X);function S(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 M(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function ss(e){return e.length>0?e.join(", "):"No capabilities reported"}function es({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(G,{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 ${S(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function as({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 ${S(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function ns({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 ${S(e.status)}`,children:A(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:M(e.projectRoot??e.cwd)})]})]})}function D(e,l,p,n,o){l(e),p(e.model??""),n(e.runtime.cwd),o(e.runtime.harness)}function is({agent:e,navigate:l,onConfigSaved:p}){const{route:n}=I(),o=e?.id??null,[c,f]=t.useState(null),[u,v]=t.useState(!1),[y,g]=t.useState(null),[x,d]=t.useState(""),[w,m]=t.useState(""),[N,a]=t.useState(""),[b,h]=t.useState(!1),[j,$]=t.useState("idle"),[z,C]=t.useState(null),k=t.useRef(0),T=t.useCallback(async()=>{const i=++k.current;if(C(null),h(!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!==k.current)return;D(r,f,d,m,a)}catch(r){if(i!==k.current)return;f(null),d(""),m(""),a(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===k.current&&v(!1)}},[e?.harness,o]);t.useEffect(()=>{T()},[T]);const P=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,N].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,N]),_=async i=>{if(i.preventDefault(),!(!o||!c||j==="saving")){$("saving"),C(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:N.trim()||c.runtime.harness},restart:b})});D(r.config,f,d,m,a),h(!1),C(r.restarted?"Saved and restarted":"Saved"),p?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{$("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:()=>{L(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 ${S(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:M(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:M(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:ss(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:_,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:N,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=>m(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=>h(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(Z,{size:13}),j==="saving"?"Saving...":"Save config"]}),z&&s.jsx("span",{className:"agent-config-save-note",children:z}),y&&s.jsx("span",{className:"agent-config-save-error",children:y})]})]}),!u&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:y??"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}=I(),[n,o]=t.useState(null),[c,f]=t.useState(!0),[u,v]=t.useState(!1),[y,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 h=await R("/api/agent-config/snapshot");if(b!==x.current)return;o(h)}catch(h){if(b!==x.current)return;g(h instanceof Error?h.message:String(h))}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]),m=n?.providers??[],N=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(m.length),detail:`${m.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:N.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))}),y&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:y})]}),c&&!n&&s.jsx(H,{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(es,{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:m.map(a=>s.jsx(as,{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(ns,{agent:a,selected:a.id===w?.id,navigate:e},a.id))})]}),s.jsx(is,{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};
@@ -0,0 +1 @@
1
+ import{r,j as e}from"./index-BZovGpDk.js";import{A as E}from"./AgentAvatar-CneOa70z.js";import{a as F}from"./api-h5zurxmi.js";import{c as T}from"./colors-BtO5_zlx.js";import{t as D}from"./time-Dhsh_2EG.js";import{u as L}from"./Provider-p-xuaAoE.js";import{f as M}from"./text-DsBWV_4k.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as z}from"./FileViewerPane-Fwt8_KmD.js";/* empty css */import{C as I}from"./chevron-right-CaEwYkxE.js";import{C as $}from"./chevron-down-BVg09D6U.js";import{F as B,a as G}from"./DocumentFocusViewer-CZVVIAD5.js";import{F as H}from"./file-text-BITQqGtF.js";import"./SpriteAvatar-CEYdCzem.js";import"./agent-identity-BxCsXnDp.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-Bb0EOcU9.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./TextDocumentSurface-BcP9vvji.js";import"./createLucideIcon-DCq_3fQn.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./x-CrGUKNRv.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";/* empty css */const U={general:"Generalist",builder:"Builder",reviewer:"Reviewer",researcher:"Researcher",operator:"Operator",bridge:"Bridge",system:"System",organic:"Organic",managed:"Managed"};function J(s){if(!s?.trim())return"Generalist";const n=s.trim().toLowerCase();return U[n]??s.replace(/_/g," ")}function V(s){return s?.trim()?M(s)?.trim()??null:null}function W(s,n){const f=s.agentClass?.trim()||"general",g=J(f),i=V(s.role),v=[...new Set(s.skills??[])].filter(Boolean),h=[...new Set([...s.capabilities??[],...n?.capabilities??[]])].filter(Boolean),m=f==="general"&&!i&&v.length===0;return{kind:g,kindRaw:f,role:i,isGeneralist:m,headline:i??g,skills:v,capabilities:h}}function _({payload:s,selectedSlug:n,selectedFile:f,filter:g,collapsed:i,onToggleFolder:v,onSelectFile:h}){const m=g.trim().toLowerCase(),j=s.folders.filter(o=>!m||o.slug.includes(m)?!0:o.files.some(c=>c.name.toLowerCase().includes(m)||c.relativePath.toLowerCase().includes(m)));return j.length===0?e.jsx("div",{className:"adef-treeEmpty",children:s.agentsRootExists?"No agent folders in .agents yet.":"No .agents directory on disk."}):e.jsx(e.Fragment,{children:j.map(o=>{const c=i.has(o.slug),C=o.slug===n;return e.jsxs("div",{className:"adef-folder","data-selected-agent":C||void 0,children:[e.jsxs("button",{type:"button",className:"adef-folderRow",onClick:()=>v(o.slug),children:[e.jsx("span",{className:"adef-folderChevron","aria-hidden":!0,children:c?e.jsx(I,{size:12}):e.jsx($,{size:12})}),e.jsx("span",{className:"adef-folderIcon","aria-hidden":!0,children:c?e.jsx(B,{size:13}):e.jsx(G,{size:13})}),e.jsx("span",{className:"adef-folderName",children:o.slug})]}),c?null:o.files.map(d=>{const x=f?.absolutePath===d.absolutePath;return e.jsxs("button",{type:"button",className:"adef-fileRow","data-selected":x||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(H,{size:12})}),e.jsx("span",{className:"adef-fileName",children:d.name})]},d.absolutePath)})]},o.slug)})})}function K({agent:s,config:n,onConfigSaved:f,sessionCatalog:g,navigate:i,homeView:v}){const h=W(s,n),m=s.handle?.replace(/^@+/,"")||s.name,j=g?.sessions.length??0,[o,c]=r.useState(""),[C,d]=r.useState(""),[x,S]=r.useState(""),[k,w]=r.useState(!1),[u,N]=r.useState("idle"),[y,P]=r.useState(null),[b,R]=r.useState(null);r.useEffect(()=>{if(!n){c(""),d(""),S(s.harness??"");return}c(n.model??""),d(n.runtime.cwd),S(n.runtime.harness),w(!1),P(null),R(null)},[s.harness,s.id,n]);const A=r.useMemo(()=>{const t=["claude","codex","pi",n?.runtime.harness,s.harness,x].filter(p=>!!p?.trim());return Array.from(new Set(t))},[s.harness,n?.runtime.harness,x]),a=async t=>{if(t.preventDefault(),!(!n||u==="saving")){N("saving"),P(null),R(null);try{const p=await F(`/api/agents/${encodeURIComponent(s.id)}/config`,{method:"POST",body:JSON.stringify({model:o.trim()||null,runtime:{cwd:C.trim()||n.runtime.cwd,harness:x.trim()||n.runtime.harness},restart:k})});f(p.config),w(!1),P(p.restarted?"Saved and restarted":"Saved")}catch(p){R(p instanceof Error?p.message:"Could not save config")}finally{N("idle")}}},l=()=>i({view:v,agentId:s.id,tab:"profile"});return e.jsxs("aside",{className:"adef-inspector",children:[e.jsxs("header",{className:"adef-inspectorHead",children:[e.jsx(E,{agent:s,size:36,tile:!0,presence:!1}),e.jsxs("div",{className:"adef-inspectorIdent",children:[e.jsxs("span",{className:"adef-inspectorHandle",children:["@",m]}),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(s.state,s)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sessions"}),e.jsx("dd",{children:j})]})]}),n?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:!n.editable||u==="saving",onChange:t=>c(t.currentTarget.value)})]}),e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Harness"}),e.jsx("select",{value:x,disabled:!n.editable||u==="saving",onChange:t=>S(t.currentTarget.value),children:A.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsxs("label",{className:"adef-configField adef-configField--wide",children:[e.jsx("span",{children:"Working dir"}),e.jsx("input",{value:C,disabled:!n.editable||u==="saving",onChange:t=>d(t.currentTarget.value)})]}),e.jsxs("div",{className:"adef-configSaveRow",children:[e.jsxs("label",{className:"adef-configCheck",children:[e.jsx("input",{type:"checkbox",checked:k,disabled:!n.editable||u==="saving",onChange:t=>w(t.currentTarget.checked)}),e.jsx("span",{children:"Restart"})]}),e.jsx("button",{type:"submit",className:"adef-inspectorAct","data-primary":!0,disabled:!n.editable||u==="saving",children:u==="saving"?"Saving…":"Save"})]}),y?e.jsx("p",{className:"adef-inspectorMeta",children:y}):null,b?e.jsx("p",{className:"adef-configError",children:b}):null]}),e.jsx("div",{className:"adef-inspectorSec",children:"Permissions"}),e.jsx("p",{className:"adef-inspectorMono",children:O(n.permissionProfile)}),e.jsx("div",{className:"adef-inspectorSec",children:"Tools"}),e.jsx("div",{className:"adef-inspectorChips",children:(h.capabilities.length>0?h.capabilities:["—"]).map(t=>e.jsx("span",{className:"adef-inspectorChip",children:t},t))})]}):e.jsx("p",{className:"adef-inspectorMeta",children:"No editable local config on disk."}),s.updatedAt?e.jsxs("p",{className:"adef-inspectorMeta",children:["Updated ",D(s.updatedAt)]}):null,e.jsx("div",{className:"adef-inspectorActs",children:e.jsx("button",{type:"button",className:"adef-inspectorAct","data-primary":!0,onClick:l,children:"Sessions"})})]})}function Be({agent:s,navigate:n,homeView:f="agents-v2"}){const{openFilePreview:g}=L(),[i,v]=r.useState(null),[h,m]=r.useState(null),[j,o]=r.useState(null),[c,C]=r.useState(null),[d,x]=r.useState("loading"),[S,k]=r.useState(""),[w,u]=r.useState(()=>new Set),[N,y]=r.useState(null),P=r.useCallback(async a=>{await F("/api/file/reveal",{method:"POST",body:JSON.stringify({path:a})}).catch(()=>{})},[]);r.useEffect(()=>{let a=!1;return x("loading"),(async()=>{const[l,t,p]=await Promise.allSettled([F(`/api/agents/${encodeURIComponent(s.id)}/definitions`),F(`/api/agents/${encodeURIComponent(s.id)}/config`).catch(()=>null),F(`/api/agents/${encodeURIComponent(s.id)}/session-catalog`).catch(()=>null)]);a||(l.status==="fulfilled"&&v(l.value),t.status==="fulfilled"&&m(t.value),p.status==="fulfilled"&&o(p.value),x("ready"))})(),()=>{a=!0}},[s.id]);const b=r.useMemo(()=>{if(!i)return null;const a=i.folders.find(t=>t.slug===i.selectedSlug)??i.folders[0]??null,l=a?.files.find(t=>t.name==="AGENT.md")??a?.files[0]??null;return!a||!l?null:{slug:a.slug,name:l.name,relativePath:`.agents/${l.relativePath}`,absolutePath:l.absolutePath,excerpt:l.excerpt}},[i]);r.useEffect(()=>{b&&(y(a=>a&&i?.folders.some(l=>l.files.some(t=>t.absolutePath===a.absolutePath))?a:b),i?.selectedSlug&&u(a=>{const l=new Set(a);return l.delete(i.selectedSlug),l}))},[b,i]);const R=i?.folders.reduce((a,l)=>a+l.files.length,0)??0,A=r.useCallback(a=>{u(l=>{const t=new Set(l);return t.has(a)?t.delete(a):t.add(a),t})},[]);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:i?.agentsRoot,children:[i?.agentsRootExists?".agents · explore & edit":"explore & edit",i?` · ${i.folders.length} agents · ${R} files`:""]})]}),e.jsx("input",{type:"search",className:"adef-filter",placeholder:"Filter agents & files…",value:S,onChange:a=>k(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:i?e.jsx(_,{payload:i,selectedSlug:i.selectedSlug,selectedFile:N,filter:S,collapsed:w,onToggleFolder:A,onSelectFile:y}):null}),e.jsx("section",{className:"adef-viewer","aria-label":"Definition file",children:N?e.jsx(z,{artifact:N,onOpen:g,onReveal:a=>{P(a)},onBrowse:i?a=>n({view:"code",root:i.projectRoot,file:a}):void 0}):e.jsx("div",{className:"av2-repoViewerState",children:i?.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(K,{agent:s,config:h,onConfigSaved:m,sessionCatalog:c,navigate:n,homeView:f})]})]})}export{Be as AgentDefinitionsWorkspace};
@@ -1 +1 @@
1
- import{r as v,j as a}from"./index-NRbRrZw-.js";import{n as A,b as C,c as y,s as $}from"./colors-BtO5_zlx.js";import{t as k}from"./time-Dhsh_2EG.js";import{A as w}from"./AgentLiveActions-BmXDRxER.js";function F(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}const E=v.forwardRef(function({agent:e,pinned:l,onOpen:N,onClose:b,onAction:u,style:g,className:o},f){const r=A(e.state),m=C(e.state),n=e.cwd??e.projectRoot,d=l?n:F(n),t=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,h=e.selector??e.defaultSelector,p=t??e.name,j=e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId,i=y(r);return a.jsxs("div",{ref:f,className:`agent-card${l?" agent-card--pinned":""}${o?` ${o}`:""}`,style:g,role:"dialog","aria-label":`${p} details`,children:[a.jsxs("header",{className:"agent-card-head",children:[a.jsx("div",{className:"agent-card-name",children:p}),a.jsxs("div",{className:"agent-card-meta",children:[a.jsx("span",{className:`agent-card-dot agent-card-dot--${m}`,style:r==="in_turn"||r==="in_flight"?{background:$(e.state)}:void 0}),i&&a.jsx("span",{className:`agent-card-state agent-card-state--${m}`,children:i}),e.updatedAt&&a.jsxs(a.Fragment,{children:[i&&a.jsx("span",{className:"agent-card-sep",children:"·"}),a.jsx("span",{className:"agent-card-time",children:k(e.updatedAt)})]})]})]}),a.jsxs("div",{className:"agent-card-body",children:[t&&a.jsx(s,{label:"handle",children:a.jsx("code",{className:"agent-card-mono",children:t})}),h&&a.jsx(s,{label:"selector",children:a.jsx("code",{className:"agent-card-mono",children:h})}),d&&a.jsx(s,{label:"cwd",children:a.jsx("code",{className:"agent-card-mono",title:n??d,children:d})}),j&&a.jsx(s,{label:"machine",children:a.jsx("span",{className:"agent-card-mono",children:j})}),(e.project||e.branch)&&a.jsx(s,{label:"project",children:a.jsxs("span",{className:"agent-card-mono",children:[e.project??"—",e.branch&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-branch",children:e.branch})]})]})}),(e.harness||e.model)&&a.jsx(s,{label:"runtime",children:a.jsxs("span",{className:"agent-card-mono",children:[e.harness??"—",e.model&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-model",children:e.model})]})]})}),e.transport&&a.jsx(s,{label:"launch transport",children:a.jsx("span",{className:"agent-card-mono",children:e.transport})}),e.role&&a.jsx(s,{label:"role",children:a.jsx("span",{className:"agent-card-mono",children:e.role})}),e.capabilities&&e.capabilities.length>0&&a.jsx(s,{label:"capabilities",children:a.jsxs("div",{className:"agent-card-caps",children:[e.capabilities.slice(0,8).map(x=>a.jsx("span",{className:"agent-card-cap",children:x},x)),e.capabilities.length>8&&a.jsxs("span",{className:"agent-card-cap agent-card-cap--more",children:["+",e.capabilities.length-8]})]})})]}),a.jsx(w,{agent:e,variant:"compact",onNavigate:u}),a.jsxs("footer",{className:"agent-card-foot",children:[a.jsxs("button",{type:"button",className:"agent-card-link",onClick:N,children:["Open agent ",a.jsx("span",{"aria-hidden":!0,children:"→"})]}),l&&a.jsx("button",{type:"button",className:"agent-card-close",onClick:b,"aria-label":"Close",children:"esc"})]})]})});function s({label:c,children:e}){return a.jsxs("div",{className:"agent-card-field",children:[a.jsx("span",{className:"agent-card-label",children:c}),a.jsx("div",{className:"agent-card-value",children:e})]})}export{E as A};
1
+ import{r as v,j as a}from"./index-BZovGpDk.js";import{n as A,b as C,c as y,s as $}from"./colors-BtO5_zlx.js";import{t as k}from"./time-Dhsh_2EG.js";import{A as w}from"./AgentLiveActions-DwScaVRF.js";function F(c){return c?c.replace(/^\/Users\/[^/]+/,"~"):null}const E=v.forwardRef(function({agent:e,pinned:l,onOpen:N,onClose:b,onAction:u,style:g,className:o},f){const r=A(e.state),m=C(e.state),n=e.cwd??e.projectRoot,d=l?n:F(n),t=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,h=e.selector??e.defaultSelector,p=t??e.name,j=e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId,i=y(r);return a.jsxs("div",{ref:f,className:`agent-card${l?" agent-card--pinned":""}${o?` ${o}`:""}`,style:g,role:"dialog","aria-label":`${p} details`,children:[a.jsxs("header",{className:"agent-card-head",children:[a.jsx("div",{className:"agent-card-name",children:p}),a.jsxs("div",{className:"agent-card-meta",children:[a.jsx("span",{className:`agent-card-dot agent-card-dot--${m}`,style:r==="in_turn"||r==="in_flight"?{background:$(e.state)}:void 0}),i&&a.jsx("span",{className:`agent-card-state agent-card-state--${m}`,children:i}),e.updatedAt&&a.jsxs(a.Fragment,{children:[i&&a.jsx("span",{className:"agent-card-sep",children:"·"}),a.jsx("span",{className:"agent-card-time",children:k(e.updatedAt)})]})]})]}),a.jsxs("div",{className:"agent-card-body",children:[t&&a.jsx(s,{label:"handle",children:a.jsx("code",{className:"agent-card-mono",children:t})}),h&&a.jsx(s,{label:"selector",children:a.jsx("code",{className:"agent-card-mono",children:h})}),d&&a.jsx(s,{label:"cwd",children:a.jsx("code",{className:"agent-card-mono",title:n??d,children:d})}),j&&a.jsx(s,{label:"machine",children:a.jsx("span",{className:"agent-card-mono",children:j})}),(e.project||e.branch)&&a.jsx(s,{label:"project",children:a.jsxs("span",{className:"agent-card-mono",children:[e.project??"—",e.branch&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-branch",children:e.branch})]})]})}),(e.harness||e.model)&&a.jsx(s,{label:"runtime",children:a.jsxs("span",{className:"agent-card-mono",children:[e.harness??"—",e.model&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"agent-card-sep agent-card-sep--inline",children:"·"}),a.jsx("span",{className:"agent-card-model",children:e.model})]})]})}),e.transport&&a.jsx(s,{label:"launch transport",children:a.jsx("span",{className:"agent-card-mono",children:e.transport})}),e.role&&a.jsx(s,{label:"role",children:a.jsx("span",{className:"agent-card-mono",children:e.role})}),e.capabilities&&e.capabilities.length>0&&a.jsx(s,{label:"capabilities",children:a.jsxs("div",{className:"agent-card-caps",children:[e.capabilities.slice(0,8).map(x=>a.jsx("span",{className:"agent-card-cap",children:x},x)),e.capabilities.length>8&&a.jsxs("span",{className:"agent-card-cap agent-card-cap--more",children:["+",e.capabilities.length-8]})]})})]}),a.jsx(w,{agent:e,variant:"compact",onNavigate:u}),a.jsxs("footer",{className:"agent-card-foot",children:[a.jsxs("button",{type:"button",className:"agent-card-link",onClick:N,children:["Open agent ",a.jsx("span",{"aria-hidden":!0,children:"→"})]}),l&&a.jsx("button",{type:"button",className:"agent-card-close",onClick:b,"aria-label":"Close",children:"esc"})]})]})});function s({label:c,children:e}){return a.jsxs("div",{className:"agent-card-field",children:[a.jsx("span",{className:"agent-card-label",children:c}),a.jsx("div",{className:"agent-card-value",children:e})]})}export{E as A};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./index-BZovGpDk.js";/* empty css */import{H as Me}from"./HarnessMark-DrE57dUq.js";import{a as ue,S as fe}from"./SpriteAvatar-CEYdCzem.js";import{n as Ze}from"./colors-BtO5_zlx.js";import{o as He,l as Ke}from"./lane-observe-BA3g9aVd.js";import{t as We}from"./time-Dhsh_2EG.js";import{S as Be}from"./SessionObserve-B-SkP3tu.js";import{l as X,i as Ge}from"./agent-lanes-model-VYQ5a68i.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-B6ybJlHJ.js";import"./agent-identity-BxCsXnDp.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BkBcDYm-.js";import"./index-DiiEQwdc.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-h5zurxmi.js";import"./mentions-BjXfeF7t.js";import"./Provider-p-xuaAoE.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./sse-Bb0EOcU9.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./createLucideIcon-DCq_3fQn.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./AgentDetailCard-Dtc02KUO.js";import"./AgentLiveActions-DwScaVRF.js";import"./terminal-takeover--05EYhJm.js";import"./openContent-C6XO6kr5.js";import"./eye-DkU59kfl.js";import"./terminal-xGf_F3y7.js";import"./message-markup-DlVX-iuc.js";import"./ObservedTopologyPanel-BlmGoxCE.js";import"./ObserveTextFlow-DWNlmTVm.js";import"./use-reduced-motion-C8cWvIZ3.js";import"./SessionObserveEvidence-CF5jnH3-.js";import"./message-circle-BwVx5X0q.js";import"./wrench-_tHBGTop.js";import"./external-link-Dd8xaveL.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 Ls({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{Ls as AgentFloorView};
@@ -0,0 +1 @@
1
+ import{r as m,j as a}from"./index-BZovGpDk.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-CHwHZNw-.js";import{a as D}from"./api-h5zurxmi.js";import{u as Y}from"./sse-Bb0EOcU9.js";import{b as Z,t as ee}from"./time-Dhsh_2EG.js";import{f as h}from"./text-DsBWV_4k.js";import{u as ae}from"./Provider-p-xuaAoE.js";import{o as te}from"./openContent-C6XO6kr5.js";import{B as E}from"./BackToPicker-D6WgIDb-.js";import{A as se}from"./AgentLiveActions-DwScaVRF.js";import{O as le}from"./ObservedTopologyPanel-BlmGoxCE.js";import{a as re}from"./model-Co0zkMIc.js";import"./index-BWHgHrtv.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./createLucideIcon-DCq_3fQn.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./NewChatOrigin-DXPvX-hh.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./terminal-takeover--05EYhJm.js";import"./eye-DkU59kfl.js";import"./terminal-xGf_F3y7.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 la({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{la as AgentInfoScreen};
@@ -1 +1 @@
1
- import{j as a,r as u}from"./index-NRbRrZw-.js";/* empty css */import{AgentLaneCockpitPane as w,cockpitHeightTier as y}from"./AgentLaneSummaryResize--lHgnncr.js";import{c as $}from"./clipboard-e3fSpeo7.js";import{H as L}from"./HarnessMark-CEzmPFHC.js";function F(){return a.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",className:"s-lane-card-gmark",children:a.jsx("path",{d:"M2 4.2c0-.4.3-.7.7-.7h2.1l1 1h3.5c.4 0 .7.3.7.7V9c0 .4-.3.7-.7.7H2.7c-.4 0-.7-.3-.7-.7V4.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})})}function T(){return a.jsxs("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",className:"s-lane-card-gmark",children:[a.jsx("circle",{cx:"6",cy:"3",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("circle",{cx:"6",cy:"9",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("path",{d:"M6 4.5v3",stroke:"currentColor",strokeWidth:"1"})]})}function W({dir:s}){return a.jsx("span",{className:"s-lane-card-dir","aria-hidden":"true",children:s==="from"?"←":"→"})}function M(){return a.jsxs(a.Fragment,{children:[a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-t","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-b","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-l","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-r","aria-hidden":"true"})]})}function d({value:s,label:l,side:n}){const[r,e]=u.useState(!1),c=u.useRef(null);u.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const i=u.useCallback(t=>{t.preventDefault(),t.stopPropagation(),$(s).then(o=>{o&&(e(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>e(!1),1100))})},[s]);return a.jsx("button",{type:"button",className:`s-lane-card-copydot s-lane-card-copydot--${n}${r?" s-lane-card-copydot--done":""}`,onClick:i,title:r?"Copied":`Copy ${l}`,"aria-label":r?`Copied ${l}`:`Copy ${l}`,children:r?a.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:a.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"})}):a.jsxs("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:[a.jsx("rect",{x:"3.4",y:"3.4",width:"5.8",height:"5.8",rx:"1.3",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("path",{d:"M2.4 7.2V2.8c0-.4.3-.7.7-.7h4",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})]})})}function N({value:s,label:l,group:n}){const r=!!n&&n.rows.length>0;return a.jsxs("span",{className:`s-lane-card-instr${r?" s-lane-card-instr--pop":""}`,children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s}),a.jsx("span",{className:"s-lane-card-instr-label",children:l}),r&&a.jsxs("span",{className:"s-lane-card-pop",role:"tooltip",children:[a.jsxs("span",{className:"s-lane-card-pop-h",children:[a.jsx("span",{className:"s-lane-card-pop-title",children:l}),a.jsx("span",{className:"s-lane-card-pop-count",children:n.more>0?`top ${n.rows.length} · ${s}`:s})]}),a.jsxs("span",{className:"s-lane-card-pop-list",children:[n.rows.map((e,c)=>a.jsxs("span",{className:"s-lane-card-pop-row",title:e.full??e.text,children:[a.jsx("span",{className:`s-lane-card-pop-mark s-lane-card-pop-mark--${e.tone}`,children:e.mark}),a.jsx("span",{className:"s-lane-card-pop-text",children:e.text})]},`${c}:${e.full||e.text}`)),n.more>0&&a.jsxs("span",{className:"s-lane-card-pop-more",children:["+",n.more," more"]})]})]})]})}function P(s){return s.toLocaleString()}function B(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(s>=1e5?0:1)}k`:`${s}`}function S({usage:s}){return s.dials.length===0?null:a.jsxs("div",{className:"s-lane-card-cockpit-tokens","aria-label":"Token usage",children:[a.jsxs("div",{className:"s-lane-card-cockpit-tokens-head",children:[a.jsxs("span",{className:"s-lane-card-cockpit-tokens-label",children:[a.jsx("span",{className:"s-lane-card-cockpit-tokens-mark","aria-hidden":"true",children:"◎"}),"Tokens"]}),s.total!=null&&a.jsx("span",{className:"s-lane-card-cockpit-tokens-hint",children:B(s.total)})]}),a.jsx("div",{className:"s-lane-card-cockpit-dials",children:s.dials.map(l=>a.jsxs("span",{className:"s-lane-card-cockpit-dial",children:[a.jsx("span",{className:"s-lane-card-cockpit-dial-value",children:P(l.value)}),a.jsx("span",{className:"s-lane-card-cockpit-dial-label",children:l.label})]},l.label))})]})}function I({pops:s}){const l=s.edits.rows.length>0,n=l?s.edits:s.files;if(n.rows.length===0)return null;const r=l?"Files modified":"Files touched";return a.jsxs("div",{className:"s-lane-card-cockpit-files","aria-label":r,children:[a.jsxs("div",{className:"s-lane-card-cockpit-tokens-head",children:[a.jsx("span",{className:"s-lane-card-cockpit-tokens-label",children:r}),a.jsx("span",{className:"s-lane-card-cockpit-tokens-hint",children:n.rows.length+n.more})]}),a.jsxs("div",{className:"s-lane-card-cockpit-files-list",children:[n.rows.map((e,c)=>a.jsxs("span",{className:"s-lane-card-cockpit-file",title:e.full??e.text,children:[a.jsx("span",{className:`s-lane-card-pop-mark s-lane-card-pop-mark--${e.tone}`,children:e.mark}),a.jsx("span",{className:"s-lane-card-cockpit-file-text",children:e.text})]},`${c}:${e.full||e.text}`)),n.more>0&&a.jsxs("span",{className:"s-lane-card-cockpit-file s-lane-card-cockpit-file--more",children:["+",n.more," more"]})]})]})}function g({model:s,cockpitHeight:l=null}){const n=y(l)==="stats";return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"s-lane-card-summary",children:s.head?.placeholder?a.jsxs("div",{className:`s-lane-card-wait${s.working?" s-lane-card-wait--working":""}`,children:[a.jsx("span",{className:"s-lane-card-wait-dot","aria-hidden":"true"}),a.jsx("span",{className:"s-lane-card-wait-label",children:s.head.text})]}):a.jsxs("div",{className:`s-lane-card-current${s.head?.dir?"":" s-lane-card-current--console"}`,children:[s.head?.dir?a.jsx(W,{dir:s.head.dir}):a.jsx("span",{className:"s-lane-card-prompt","aria-hidden":"true",children:"❯"}),a.jsxs("span",{className:"s-lane-card-headwrap",children:[a.jsx("span",{className:"s-lane-card-head-text",children:s.head?.text??"Waiting for trace activity…"}),s.head?.full&&a.jsx("span",{className:"s-lane-card-headpop",role:"tooltip",children:s.head.full})]})]})}),a.jsxs("div",{className:"s-lane-card-accs",children:[a.jsx("div",{className:"s-lane-card-accs-tools",children:s.stats.tools>0?a.jsxs(a.Fragment,{children:[a.jsx(N,{value:s.stats.tools,label:"tools",group:s.pops.tools}),s.stats.edits>0&&a.jsx(N,{value:s.stats.edits,label:"edits",group:s.pops.edits}),s.stats.reads>0&&a.jsx(N,{value:s.stats.reads,label:"reads",group:s.pops.reads}),s.stats.files>0&&a.jsx(N,{value:s.stats.files,label:"files",group:s.pops.files})]}):a.jsx("span",{className:"s-lane-card-accs-empty",children:"no tool activity yet"})}),a.jsxs("div",{className:"s-lane-card-vitals",children:[a.jsxs("span",{className:`s-lane-card-instr s-lane-card-instr--ctx${s.context==null?" s-lane-card-instr--ctx-pending":""}`,title:s.context==null?"Context window — awaiting usage":`Context window ${s.context}% used`,children:[a.jsx("span",{className:"s-lane-card-gauge","aria-hidden":"true",children:a.jsx("span",{className:"s-lane-card-gauge-fill",style:{width:`${s.context??0}%`}})}),a.jsx("span",{className:"s-lane-card-instr-val",children:s.context==null?"—":`${s.context}%`}),a.jsx("span",{className:"s-lane-card-instr-label",children:"ctx"})]}),s.tokens&&a.jsxs("span",{className:"s-lane-card-instr",title:"Tokens currently in context",children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s.tokens}),a.jsx("span",{className:"s-lane-card-instr-label",children:"ctx tokens"})]}),s.turns!=null&&a.jsxs("span",{className:"s-lane-card-instr",children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s.turns}),a.jsx("span",{className:"s-lane-card-instr-label",children:s.turns===1?"turn":"turns"})]})]})]}),n&&(s.tokenUsage?a.jsx(S,{usage:s.tokenUsage}):a.jsx(I,{pops:s.pops}))]})}function V({model:s,avatar:l,trace:n,collapsed:r=!1,onToggleCollapsed:e,onOpen:c,cockpitHeight:i}){const{name:t,harness:o,model:h,effort:k,cwd:p,cwdFull:f,branch:x,sessionId:j,sessionIdFull:v,parentSessionId:m,parentSessionLabel:b}=s;return a.jsxs("section",{className:`s-lane-card${s.working?" s-lane-card--working":""}${r?" s-lane-card--collapsed":""}`,"aria-label":`${t} lane`,children:[c&&a.jsx("button",{type:"button",className:"s-lane-card-hit",onClick:c,"aria-label":`Inspect ${t}`}),a.jsxs("div",{className:"s-lane-card-head",children:[a.jsxs("span",{className:"s-lane-card-anchor s-lane-card-anchor--av",children:[a.jsx(M,{}),l]}),a.jsxs("div",{className:"s-lane-card-ident",children:[a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-namebox",children:[a.jsx("span",{className:"s-lane-card-name s-lane-card-sel",children:t}),s.authority&&a.jsx("span",{className:"s-lane-card-authority",title:s.authority.title,children:s.authority.label}),a.jsx(d,{value:t,label:"agent name",side:"trail"})]}),p&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-d s-lane-card-d--strong",title:f??p,children:[a.jsx(F,{}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:p}),a.jsx(d,{value:f??p,label:"working directory",side:"trail"})]}),x&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-d",title:x,children:[a.jsx("span",{className:"s-lane-card-gchar","aria-hidden":"true",children:"⎇"}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:x}),a.jsx(d,{value:x,label:"branch",side:"trail"})]})]}),a.jsxs("div",{className:"s-lane-card-meta",children:[o&&a.jsx("span",{className:"s-lane-card-anchor s-lane-card-anchor--hm",children:a.jsx(L,{harness:o,size:30,className:"s-lane-card-hmark"})}),a.jsxs("div",{className:"s-lane-card-meta-lines",children:[(h||k)&&a.jsxs("div",{className:"s-lane-card-meta-run",children:[h&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--lead s-lane-card-modelwrap",children:[a.jsx("span",{className:"s-lane-card-meta-model s-lane-card-sel",children:h}),a.jsx(d,{value:h,label:"model",side:"lead"})]}),k&&a.jsx("span",{className:"s-lane-card-meta-effort s-lane-card-sel",children:k})]}),(j||m)&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--lead s-lane-card-meta-sid",children:[a.jsx(T,{}),j&&a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:j}),m&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"s-lane-card-gchar","aria-hidden":"true",children:"↳"}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:b??m})]}),a.jsx(d,{value:v??m??j??"",label:"session id",side:"lead"})]}),a.jsxs("div",{className:"s-lane-card-meta-foot",children:[s.time&&a.jsxs("span",{className:"s-lane-card-time",children:[a.jsx("span",{className:"s-lane-card-time-dot","aria-hidden":"true"}),s.time]}),e&&a.jsx("button",{type:"button",className:"s-lane-card-caret","aria-label":r?"Expand summary":"Collapse summary","aria-expanded":!r,onClick:C=>{C.stopPropagation(),e()},children:a.jsx("svg",{viewBox:"0 0 10 10",width:"10",height:"10","aria-hidden":"true",children:a.jsx("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})]}),!r&&(i!==void 0?a.jsx(w,{cockpitHeight:i,children:a.jsx(g,{model:s,cockpitHeight:i})}):a.jsx(g,{model:s})),n]})}export{V as AgentLaneCard};
1
+ import{j as a,r as u}from"./index-BZovGpDk.js";/* empty css */import{AgentLaneCockpitPane as w,cockpitHeightTier as y}from"./AgentLaneSummaryResize-FyYweLo_.js";import{c as $}from"./clipboard-e3fSpeo7.js";import{H as L}from"./HarnessMark-DrE57dUq.js";function F(){return a.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",className:"s-lane-card-gmark",children:a.jsx("path",{d:"M2 4.2c0-.4.3-.7.7-.7h2.1l1 1h3.5c.4 0 .7.3.7.7V9c0 .4-.3.7-.7.7H2.7c-.4 0-.7-.3-.7-.7V4.2Z",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinejoin:"round"})})}function T(){return a.jsxs("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",className:"s-lane-card-gmark",children:[a.jsx("circle",{cx:"6",cy:"3",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("circle",{cx:"6",cy:"9",r:"1.5",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("path",{d:"M6 4.5v3",stroke:"currentColor",strokeWidth:"1"})]})}function W({dir:s}){return a.jsx("span",{className:"s-lane-card-dir","aria-hidden":"true",children:s==="from"?"←":"→"})}function M(){return a.jsxs(a.Fragment,{children:[a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-t","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-b","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-l","aria-hidden":"true"}),a.jsx("i",{className:"s-lane-card-gl s-lane-card-gl-r","aria-hidden":"true"})]})}function d({value:s,label:l,side:n}){const[r,e]=u.useState(!1),c=u.useRef(null);u.useEffect(()=>()=>{c.current&&clearTimeout(c.current)},[]);const i=u.useCallback(t=>{t.preventDefault(),t.stopPropagation(),$(s).then(o=>{o&&(e(!0),c.current&&clearTimeout(c.current),c.current=setTimeout(()=>e(!1),1100))})},[s]);return a.jsx("button",{type:"button",className:`s-lane-card-copydot s-lane-card-copydot--${n}${r?" s-lane-card-copydot--done":""}`,onClick:i,title:r?"Copied":`Copy ${l}`,"aria-label":r?`Copied ${l}`:`Copy ${l}`,children:r?a.jsx("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:a.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"})}):a.jsxs("svg",{viewBox:"0 0 12 12",width:"11",height:"11","aria-hidden":"true",children:[a.jsx("rect",{x:"3.4",y:"3.4",width:"5.8",height:"5.8",rx:"1.3",fill:"none",stroke:"currentColor",strokeWidth:"1"}),a.jsx("path",{d:"M2.4 7.2V2.8c0-.4.3-.7.7-.7h4",fill:"none",stroke:"currentColor",strokeWidth:"1",strokeLinecap:"round"})]})})}function N({value:s,label:l,group:n}){const r=!!n&&n.rows.length>0;return a.jsxs("span",{className:`s-lane-card-instr${r?" s-lane-card-instr--pop":""}`,children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s}),a.jsx("span",{className:"s-lane-card-instr-label",children:l}),r&&a.jsxs("span",{className:"s-lane-card-pop",role:"tooltip",children:[a.jsxs("span",{className:"s-lane-card-pop-h",children:[a.jsx("span",{className:"s-lane-card-pop-title",children:l}),a.jsx("span",{className:"s-lane-card-pop-count",children:n.more>0?`top ${n.rows.length} · ${s}`:s})]}),a.jsxs("span",{className:"s-lane-card-pop-list",children:[n.rows.map((e,c)=>a.jsxs("span",{className:"s-lane-card-pop-row",title:e.full??e.text,children:[a.jsx("span",{className:`s-lane-card-pop-mark s-lane-card-pop-mark--${e.tone}`,children:e.mark}),a.jsx("span",{className:"s-lane-card-pop-text",children:e.text})]},`${c}:${e.full||e.text}`)),n.more>0&&a.jsxs("span",{className:"s-lane-card-pop-more",children:["+",n.more," more"]})]})]})]})}function P(s){return s.toLocaleString()}function B(s){return s>=1e6?`${(s/1e6).toFixed(1)}M`:s>=1e3?`${(s/1e3).toFixed(s>=1e5?0:1)}k`:`${s}`}function S({usage:s}){return s.dials.length===0?null:a.jsxs("div",{className:"s-lane-card-cockpit-tokens","aria-label":"Token usage",children:[a.jsxs("div",{className:"s-lane-card-cockpit-tokens-head",children:[a.jsxs("span",{className:"s-lane-card-cockpit-tokens-label",children:[a.jsx("span",{className:"s-lane-card-cockpit-tokens-mark","aria-hidden":"true",children:"◎"}),"Tokens"]}),s.total!=null&&a.jsx("span",{className:"s-lane-card-cockpit-tokens-hint",children:B(s.total)})]}),a.jsx("div",{className:"s-lane-card-cockpit-dials",children:s.dials.map(l=>a.jsxs("span",{className:"s-lane-card-cockpit-dial",children:[a.jsx("span",{className:"s-lane-card-cockpit-dial-value",children:P(l.value)}),a.jsx("span",{className:"s-lane-card-cockpit-dial-label",children:l.label})]},l.label))})]})}function I({pops:s}){const l=s.edits.rows.length>0,n=l?s.edits:s.files;if(n.rows.length===0)return null;const r=l?"Files modified":"Files touched";return a.jsxs("div",{className:"s-lane-card-cockpit-files","aria-label":r,children:[a.jsxs("div",{className:"s-lane-card-cockpit-tokens-head",children:[a.jsx("span",{className:"s-lane-card-cockpit-tokens-label",children:r}),a.jsx("span",{className:"s-lane-card-cockpit-tokens-hint",children:n.rows.length+n.more})]}),a.jsxs("div",{className:"s-lane-card-cockpit-files-list",children:[n.rows.map((e,c)=>a.jsxs("span",{className:"s-lane-card-cockpit-file",title:e.full??e.text,children:[a.jsx("span",{className:`s-lane-card-pop-mark s-lane-card-pop-mark--${e.tone}`,children:e.mark}),a.jsx("span",{className:"s-lane-card-cockpit-file-text",children:e.text})]},`${c}:${e.full||e.text}`)),n.more>0&&a.jsxs("span",{className:"s-lane-card-cockpit-file s-lane-card-cockpit-file--more",children:["+",n.more," more"]})]})]})}function g({model:s,cockpitHeight:l=null}){const n=y(l)==="stats";return a.jsxs(a.Fragment,{children:[a.jsx("div",{className:"s-lane-card-summary",children:s.head?.placeholder?a.jsxs("div",{className:`s-lane-card-wait${s.working?" s-lane-card-wait--working":""}`,children:[a.jsx("span",{className:"s-lane-card-wait-dot","aria-hidden":"true"}),a.jsx("span",{className:"s-lane-card-wait-label",children:s.head.text})]}):a.jsxs("div",{className:`s-lane-card-current${s.head?.dir?"":" s-lane-card-current--console"}`,children:[s.head?.dir?a.jsx(W,{dir:s.head.dir}):a.jsx("span",{className:"s-lane-card-prompt","aria-hidden":"true",children:"❯"}),a.jsxs("span",{className:"s-lane-card-headwrap",children:[a.jsx("span",{className:"s-lane-card-head-text",children:s.head?.text??"Waiting for trace activity…"}),s.head?.full&&a.jsx("span",{className:"s-lane-card-headpop",role:"tooltip",children:s.head.full})]})]})}),a.jsxs("div",{className:"s-lane-card-accs",children:[a.jsx("div",{className:"s-lane-card-accs-tools",children:s.stats.tools>0?a.jsxs(a.Fragment,{children:[a.jsx(N,{value:s.stats.tools,label:"tools",group:s.pops.tools}),s.stats.edits>0&&a.jsx(N,{value:s.stats.edits,label:"edits",group:s.pops.edits}),s.stats.reads>0&&a.jsx(N,{value:s.stats.reads,label:"reads",group:s.pops.reads}),s.stats.files>0&&a.jsx(N,{value:s.stats.files,label:"files",group:s.pops.files})]}):a.jsx("span",{className:"s-lane-card-accs-empty",children:"no tool activity yet"})}),a.jsxs("div",{className:"s-lane-card-vitals",children:[a.jsxs("span",{className:`s-lane-card-instr s-lane-card-instr--ctx${s.context==null?" s-lane-card-instr--ctx-pending":""}`,title:s.context==null?"Context window — awaiting usage":`Context window ${s.context}% used`,children:[a.jsx("span",{className:"s-lane-card-gauge","aria-hidden":"true",children:a.jsx("span",{className:"s-lane-card-gauge-fill",style:{width:`${s.context??0}%`}})}),a.jsx("span",{className:"s-lane-card-instr-val",children:s.context==null?"—":`${s.context}%`}),a.jsx("span",{className:"s-lane-card-instr-label",children:"ctx"})]}),s.tokens&&a.jsxs("span",{className:"s-lane-card-instr",title:"Tokens currently in context",children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s.tokens}),a.jsx("span",{className:"s-lane-card-instr-label",children:"ctx tokens"})]}),s.turns!=null&&a.jsxs("span",{className:"s-lane-card-instr",children:[a.jsx("span",{className:"s-lane-card-instr-val",children:s.turns}),a.jsx("span",{className:"s-lane-card-instr-label",children:s.turns===1?"turn":"turns"})]})]})]}),n&&(s.tokenUsage?a.jsx(S,{usage:s.tokenUsage}):a.jsx(I,{pops:s.pops}))]})}function V({model:s,avatar:l,trace:n,collapsed:r=!1,onToggleCollapsed:e,onOpen:c,cockpitHeight:i}){const{name:t,harness:o,model:h,effort:k,cwd:p,cwdFull:f,branch:x,sessionId:j,sessionIdFull:v,parentSessionId:m,parentSessionLabel:b}=s;return a.jsxs("section",{className:`s-lane-card${s.working?" s-lane-card--working":""}${r?" s-lane-card--collapsed":""}`,"aria-label":`${t} lane`,children:[c&&a.jsx("button",{type:"button",className:"s-lane-card-hit",onClick:c,"aria-label":`Inspect ${t}`}),a.jsxs("div",{className:"s-lane-card-head",children:[a.jsxs("span",{className:"s-lane-card-anchor s-lane-card-anchor--av",children:[a.jsx(M,{}),l]}),a.jsxs("div",{className:"s-lane-card-ident",children:[a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-namebox",children:[a.jsx("span",{className:"s-lane-card-name s-lane-card-sel",children:t}),s.authority&&a.jsx("span",{className:"s-lane-card-authority",title:s.authority.title,children:s.authority.label}),a.jsx(d,{value:t,label:"agent name",side:"trail"})]}),p&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-d s-lane-card-d--strong",title:f??p,children:[a.jsx(F,{}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:p}),a.jsx(d,{value:f??p,label:"working directory",side:"trail"})]}),x&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--trail s-lane-card-d",title:x,children:[a.jsx("span",{className:"s-lane-card-gchar","aria-hidden":"true",children:"⎇"}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:x}),a.jsx(d,{value:x,label:"branch",side:"trail"})]})]}),a.jsxs("div",{className:"s-lane-card-meta",children:[o&&a.jsx("span",{className:"s-lane-card-anchor s-lane-card-anchor--hm",children:a.jsx(L,{harness:o,size:30,className:"s-lane-card-hmark"})}),a.jsxs("div",{className:"s-lane-card-meta-lines",children:[(h||k)&&a.jsxs("div",{className:"s-lane-card-meta-run",children:[h&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--lead s-lane-card-modelwrap",children:[a.jsx("span",{className:"s-lane-card-meta-model s-lane-card-sel",children:h}),a.jsx(d,{value:h,label:"model",side:"lead"})]}),k&&a.jsx("span",{className:"s-lane-card-meta-effort s-lane-card-sel",children:k})]}),(j||m)&&a.jsxs("span",{className:"s-lane-card-fieldc s-lane-card-fieldc--lead s-lane-card-meta-sid",children:[a.jsx(T,{}),j&&a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:j}),m&&a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"s-lane-card-gchar","aria-hidden":"true",children:"↳"}),a.jsx("span",{className:"s-lane-card-val s-lane-card-sel",children:b??m})]}),a.jsx(d,{value:v??m??j??"",label:"session id",side:"lead"})]}),a.jsxs("div",{className:"s-lane-card-meta-foot",children:[s.time&&a.jsxs("span",{className:"s-lane-card-time",children:[a.jsx("span",{className:"s-lane-card-time-dot","aria-hidden":"true"}),s.time]}),e&&a.jsx("button",{type:"button",className:"s-lane-card-caret","aria-label":r?"Expand summary":"Collapse summary","aria-expanded":!r,onClick:C=>{C.stopPropagation(),e()},children:a.jsx("svg",{viewBox:"0 0 10 10",width:"10",height:"10","aria-hidden":"true",children:a.jsx("path",{d:"M2 3.5 L5 6.5 L8 3.5",fill:"none",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round",strokeLinejoin:"round"})})})]})]})]})]}),!r&&(i!==void 0?a.jsx(w,{cockpitHeight:i,children:a.jsx(g,{model:s,cockpitHeight:i})}):a.jsx(g,{model:s})),n]})}export{V as AgentLaneCard};
@@ -1 +1 @@
1
- import{j as e}from"./index-NRbRrZw-.js";const p=["sm","md","lg"];function j({title:n,width:l,defaultWidth:c,pinned:s,onTogglePin:h,onWidthChange:d,onResizeStart:m,resizing:r,widthControls:o=!0,statusLabel:t,live:g}){const i=typeof l=="string"?l:c;return e.jsxs("div",{className:`s-agent-lane-chrome${r?" s-agent-lane-chrome--resizing":""}`,children:[e.jsxs("div",{className:"s-agent-lane-chrome-body",children:[e.jsxs("div",{className:"s-agent-lane-chrome-top",children:[e.jsx("button",{type:"button",className:`s-agent-lane-chrome-pin${s?" s-agent-lane-chrome-pin--on":""}`,"aria-pressed":s,title:s?"Unpin lane":"Pin lane",onClick:h,children:e.jsx(u,{filled:s})}),e.jsx("span",{className:"s-agent-lane-chrome-title",title:n,children:n}),t?e.jsxs("span",{className:`s-agent-lane-chrome-status${g?" s-agent-lane-chrome-status--live":""}`,title:t,children:[e.jsx("span",{className:"s-agent-lane-chrome-status-dot","aria-hidden":"true"}),e.jsx("span",{className:"s-agent-lane-chrome-status-label",children:t})]}):null]}),o?e.jsx("div",{className:"s-agent-lane-chrome-widths",role:"group","aria-label":"Lane width",children:p.map(a=>e.jsx("button",{type:"button",className:`s-agent-lane-chrome-width-btn${i===a?" s-agent-lane-chrome-width-btn--on":""}`,"aria-pressed":i===a,title:`${a.toUpperCase()} width`,onClick:()=>d(a),children:a.toUpperCase()},a))}):null]}),o?e.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize lane width",title:"Drag to resize lane",className:`s-agent-lane-width-handle${r?" s-agent-lane-width-handle--active":""}`,onPointerDown:m}):null]})}function u({filled:n}){return e.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12","aria-hidden":"true",children:e.jsx("path",{d:"M4.2 1.8h3.6l.5 1.8 1.9.8-.2 1.1-1.7.4-.8 3.1H4.3l-.8-3.1-1.7-.4-.2-1.1 1.9-.8.5-1.8Z",fill:n?"currentColor":"none",stroke:"currentColor",strokeWidth:"0.9",strokeLinejoin:"round"})})}export{j as AgentLaneChrome};
1
+ import{j as e}from"./index-BZovGpDk.js";const p=["sm","md","lg"];function j({title:n,width:l,defaultWidth:c,pinned:s,onTogglePin:h,onWidthChange:d,onResizeStart:m,resizing:r,widthControls:o=!0,statusLabel:t,live:g}){const i=typeof l=="string"?l:c;return e.jsxs("div",{className:`s-agent-lane-chrome${r?" s-agent-lane-chrome--resizing":""}`,children:[e.jsxs("div",{className:"s-agent-lane-chrome-body",children:[e.jsxs("div",{className:"s-agent-lane-chrome-top",children:[e.jsx("button",{type:"button",className:`s-agent-lane-chrome-pin${s?" s-agent-lane-chrome-pin--on":""}`,"aria-pressed":s,title:s?"Unpin lane":"Pin lane",onClick:h,children:e.jsx(u,{filled:s})}),e.jsx("span",{className:"s-agent-lane-chrome-title",title:n,children:n}),t?e.jsxs("span",{className:`s-agent-lane-chrome-status${g?" s-agent-lane-chrome-status--live":""}`,title:t,children:[e.jsx("span",{className:"s-agent-lane-chrome-status-dot","aria-hidden":"true"}),e.jsx("span",{className:"s-agent-lane-chrome-status-label",children:t})]}):null]}),o?e.jsx("div",{className:"s-agent-lane-chrome-widths",role:"group","aria-label":"Lane width",children:p.map(a=>e.jsx("button",{type:"button",className:`s-agent-lane-chrome-width-btn${i===a?" s-agent-lane-chrome-width-btn--on":""}`,"aria-pressed":i===a,title:`${a.toUpperCase()} width`,onClick:()=>d(a),children:a.toUpperCase()},a))}):null]}),o?e.jsx("div",{role:"separator","aria-orientation":"vertical","aria-label":"Resize lane width",title:"Drag to resize lane",className:`s-agent-lane-width-handle${r?" s-agent-lane-width-handle--active":""}`,onPointerDown:m}):null]})}function u({filled:n}){return e.jsx("svg",{viewBox:"0 0 12 12",width:"12",height:"12","aria-hidden":"true",children:e.jsx("path",{d:"M4.2 1.8h3.6l.5 1.8 1.9.8-.2 1.1-1.7.4-.8 3.1H4.3l-.8-3.1-1.7-.4-.2-1.1 1.9-.8.5-1.8Z",fill:n?"currentColor":"none",stroke:"currentColor",strokeWidth:"0.9",strokeLinejoin:"round"})})}export{j as AgentLaneChrome};
@@ -0,0 +1,4 @@
1
+ import{r as c,j as e}from"./index-BZovGpDk.js";import{S as ze}from"./SlidePanel-RFXJpfUa.js";import{a as de}from"./api-h5zurxmi.js";import{A as We}from"./AgentAvatar-CneOa70z.js";import{H as He}from"./HarnessMark-DrE57dUq.js";import{t as ce}from"./time-Dhsh_2EG.js";import{h as qe}from"./tail-display-BRcJltQa.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-63XV_E7f.js";import{u as Ue}from"./Provider-p-xuaAoE.js";import{s as Qe,t as Xe,b as Ye}from"./bash-format-BRV5C6Gv.js";import{i as Ze}from"./keyboard-nav-CHo_xmjw.js";import{o as te}from"./openContent-C6XO6kr5.js";import{b as es,f as Ce}from"./agent-lane-preview-C33Dwpn7.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-BNNm6FNu.js";import{l as is,a as cs,s as rs}from"./agent-lanes-model-VYQ5a68i.js";import{E as he}from"./external-link-Dd8xaveL.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:"plan",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 +1 @@
1
- import{r as a,j as R}from"./index-NRbRrZw-.js";const d="openscout:agent-lanes-cockpit-height",S="openscout:agent-lanes-summary-height",m=48,i=220,_=120,h=112,T=80,C=200,H=112;function v(e){if(!e)return i;const t=e.getBoundingClientRect().height,r=Math.floor(t-H-C);return Math.max(m,Math.min(i,r))}function x(e){return e===null?"auto":e<T?"compact":e<h?"default":"stats"}function w(){try{const e=sessionStorage.getItem(d)??sessionStorage.getItem(S);if(!e||e==="auto")return null;const t=Number(e);return Number.isFinite(t)?Math.min(i,Math.max(m,t)):null}catch{return null}}function f(e){try{if(e===null){sessionStorage.setItem(d,"auto");return}sessionStorage.setItem(d,String(Math.round(e)))}catch{}}function y(e){const[t,r]=a.useState(!1),s=a.useRef({y:0,h:_,max:i}),c=a.useRef(null),L=a.useCallback((n,o)=>{n.preventDefault(),n.currentTarget.setPointerCapture(n.pointerId);const u=n.currentTarget.closest(".s-agent-lane"),l=u?.querySelector(".s-agent-lane-cockpit")?.getBoundingClientRect().height??_,p=o??l,A=v(u);s.current={y:n.clientY,h:p,max:A},c.current=p,r(!0),document.body.classList.add("s-agent-lanes--resizing-summary")},[]),E=a.useCallback(()=>{r(n=>(n&&(document.body.classList.remove("s-agent-lanes--resizing-summary"),f(c.current)),!1))},[]);a.useEffect(()=>{if(!t)return;const n=u=>{const g=u.clientY-s.current.y,l=Math.min(s.current.max,Math.max(m,s.current.h+g));c.current=l,e(l)},o=()=>E();return window.addEventListener("pointermove",n),window.addEventListener("pointerup",o),window.addEventListener("pointercancel",o),()=>{window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o)}},[E,t,e]);const M=a.useCallback(()=>{c.current=null,e(null),f(null)},[e]);return{beginResize:L,resetSummaryHeight:M,resizing:t}}function z({cockpitHeight:e,children:t}){const r=e!==null,s=x(e);return R.jsx("div",{className:`s-agent-lane-cockpit${r?` s-agent-lane-cockpit--sized s-agent-lane-cockpit--${s}`:""}`,style:r?{height:e,maxHeight:e}:void 0,children:t})}function N({onResizeStart:e,onReset:t,active:r}){return R.jsx("div",{role:"separator","aria-orientation":"horizontal","aria-label":"Resize tools panel",title:"Drag to resize tools panel · double-click to reset","aria-valuemin":m,"aria-valuemax":i,className:`s-agent-lane-split${r?" s-agent-lane-split--active":""}`,onPointerDown:e,onDoubleClick:s=>{s.preventDefault(),s.stopPropagation(),t()}})}export{z as AgentLaneCockpitPane,N as AgentLaneSummaryResizeHandle,T as LANE_COCKPIT_COMPACT_HEIGHT,h as LANE_COCKPIT_STATS_HEIGHT,_ as LANE_SUMMARY_HEIGHT_DEFAULT,i as LANE_SUMMARY_HEIGHT_MAX,m as LANE_SUMMARY_HEIGHT_MIN,d as LANE_SUMMARY_HEIGHT_STORAGE_KEY,v as cockpitHeightMaxForLane,x as cockpitHeightTier,w as readStoredLaneSummaryHeight,y as useLaneSummaryResize,f as writeStoredLaneSummaryHeight};
1
+ import{r as a,j as R}from"./index-BZovGpDk.js";const d="openscout:agent-lanes-cockpit-height",S="openscout:agent-lanes-summary-height",m=48,i=220,_=120,h=112,T=80,C=200,H=112;function v(e){if(!e)return i;const t=e.getBoundingClientRect().height,r=Math.floor(t-H-C);return Math.max(m,Math.min(i,r))}function x(e){return e===null?"auto":e<T?"compact":e<h?"default":"stats"}function w(){try{const e=sessionStorage.getItem(d)??sessionStorage.getItem(S);if(!e||e==="auto")return null;const t=Number(e);return Number.isFinite(t)?Math.min(i,Math.max(m,t)):null}catch{return null}}function f(e){try{if(e===null){sessionStorage.setItem(d,"auto");return}sessionStorage.setItem(d,String(Math.round(e)))}catch{}}function y(e){const[t,r]=a.useState(!1),s=a.useRef({y:0,h:_,max:i}),c=a.useRef(null),L=a.useCallback((n,o)=>{n.preventDefault(),n.currentTarget.setPointerCapture(n.pointerId);const u=n.currentTarget.closest(".s-agent-lane"),l=u?.querySelector(".s-agent-lane-cockpit")?.getBoundingClientRect().height??_,p=o??l,A=v(u);s.current={y:n.clientY,h:p,max:A},c.current=p,r(!0),document.body.classList.add("s-agent-lanes--resizing-summary")},[]),E=a.useCallback(()=>{r(n=>(n&&(document.body.classList.remove("s-agent-lanes--resizing-summary"),f(c.current)),!1))},[]);a.useEffect(()=>{if(!t)return;const n=u=>{const g=u.clientY-s.current.y,l=Math.min(s.current.max,Math.max(m,s.current.h+g));c.current=l,e(l)},o=()=>E();return window.addEventListener("pointermove",n),window.addEventListener("pointerup",o),window.addEventListener("pointercancel",o),()=>{window.removeEventListener("pointermove",n),window.removeEventListener("pointerup",o),window.removeEventListener("pointercancel",o)}},[E,t,e]);const M=a.useCallback(()=>{c.current=null,e(null),f(null)},[e]);return{beginResize:L,resetSummaryHeight:M,resizing:t}}function z({cockpitHeight:e,children:t}){const r=e!==null,s=x(e);return R.jsx("div",{className:`s-agent-lane-cockpit${r?` s-agent-lane-cockpit--sized s-agent-lane-cockpit--${s}`:""}`,style:r?{height:e,maxHeight:e}:void 0,children:t})}function N({onResizeStart:e,onReset:t,active:r}){return R.jsx("div",{role:"separator","aria-orientation":"horizontal","aria-label":"Resize tools panel",title:"Drag to resize tools panel · double-click to reset","aria-valuemin":m,"aria-valuemax":i,className:`s-agent-lane-split${r?" s-agent-lane-split--active":""}`,onPointerDown:e,onDoubleClick:s=>{s.preventDefault(),s.stopPropagation(),t()}})}export{z as AgentLaneCockpitPane,N as AgentLaneSummaryResizeHandle,T as LANE_COCKPIT_COMPACT_HEIGHT,h as LANE_COCKPIT_STATS_HEIGHT,_ as LANE_SUMMARY_HEIGHT_DEFAULT,i as LANE_SUMMARY_HEIGHT_MAX,m as LANE_SUMMARY_HEIGHT_MIN,d as LANE_SUMMARY_HEIGHT_STORAGE_KEY,v as cockpitHeightMaxForLane,x as cockpitHeightTier,w as readStoredLaneSummaryHeight,y as useLaneSummaryResize,f as writeStoredLaneSummaryHeight};
@@ -0,0 +1 @@
1
+ import{r as t,j as m}from"./index-BZovGpDk.js";import{u as a}from"./Provider-p-xuaAoE.js";import{A as n}from"./AgentLanesView-DPfO8MOo.js";import{i as c,j as l}from"./router-63XV_E7f.js";import"./api-h5zurxmi.js";import"./sse-Bb0EOcU9.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./createLucideIcon-DCq_3fQn.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./conversation-model-CHwHZNw-.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";/* empty css */import"./tail-events-C12pfUax.js";import"./observe-DVHAcIrv.js";import"./terminal-sessions-AmSgHklm.js";import"./types-B0PlfpKc.js";import"./AgentAvatar-CneOa70z.js";import"./SpriteAvatar-CEYdCzem.js";import"./agent-identity-BxCsXnDp.js";import"./SessionObserve-B-SkP3tu.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BkBcDYm-.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-BjXfeF7t.js";import"./AgentDetailCard-Dtc02KUO.js";import"./AgentLiveActions-DwScaVRF.js";import"./terminal-takeover--05EYhJm.js";import"./openContent-C6XO6kr5.js";import"./eye-DkU59kfl.js";import"./terminal-xGf_F3y7.js";import"./message-markup-DlVX-iuc.js";import"./ObservedTopologyPanel-BlmGoxCE.js";import"./ObserveTextFlow-DWNlmTVm.js";import"./use-reduced-motion-C8cWvIZ3.js";import"./SessionObserveEvidence-CF5jnH3-.js";import"./message-circle-BwVx5X0q.js";import"./wrench-_tHBGTop.js";import"./external-link-Dd8xaveL.js";import"./AgentFloorView-B5raPB_U.js";/* empty css */import"./agent-lanes-model-VYQ5a68i.js";import"./context-budget-DX_fwUs3.js";import"./lane-roster-store-B6ybJlHJ.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./AgentLanesPreflight-Cil3dNwu.js";import"./AgentLaneChrome-T8QE5742.js";import"./AgentLaneCard-BRAkw8YJ.js";/* empty css */import"./AgentLaneSummaryResize-FyYweLo_.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-q4cwzLX4.js";import"./agent-lane-preview-C33Dwpn7.js";import"./AgentLaneDetailSheet-C8RYotnv.js";import"./SlidePanel-RFXJpfUa.js";import"./agent-lane-detail-BNNm6FNu.js";import"./LaneTraceDetailSheet-CzTd44rf.js";import"./LaneTraceEventFocus-BmMmPTyJ.js";function p(r){return new URLSearchParams(window.location.search).get(r)?.trim()||null}function Kr(){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{Kr as AgentLanesEmbedScreen};
@@ -1 +1 @@
1
- import{r as d,j as s}from"./index-NRbRrZw-.js";import{t as k}from"./time-Dhsh_2EG.js";const w=3,E=12;function A(e){const n=e?.trim();return n?n.slice(0,13):null}function x(e){const n=e.lastEventAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:e.mtimeMs}function D(e){return e.sessionId?.trim()||e.transcriptPath}function T(e){const n=e.max??E;if(e.discoveryPhase==="loading")return{cells:[],blindCells:Math.min(e.blindCells??w,n),identified:!1};const i=e.discovery?.transcripts??[],a=new Set,t=[];for(const l of i.filter(c=>{if(e.matchTranscript&&!e.matchTranscript(c))return!1;const r=e.now-x(c);return r>=0?r<=e.windowMs:!0}).sort((c,r)=>x(r)-x(c))){const c=D(l);if(!a.has(c)&&(a.add(c),t.push({key:c,source:l.source,sessionLabel:A(l.sessionId),project:l.project,cwd:l.cwd,lastActiveAt:x(l)}),t.length>=n))break}return{cells:t,blindCells:0,identified:!0}}function I(e){return e.sessionLabel?`${e.source}:${e.sessionLabel}`:e.source}const K=260,_=100;function S(e,n){const[i,a]=d.useState(e),[t,l]=d.useState(!1);return d.useEffect(()=>{if(e){a(!0),l(!1);return}if(!i)return;if(n<=0){a(!1),l(!1);return}l(!0);const c=setTimeout(()=>{a(!1),l(!1)},n);return()=>clearTimeout(c)},[e,n,i]),{visible:i,exiting:t}}function P(e,n){const i=d.useRef(Date.now()),[a,t]=d.useState({discoveryMs:null,recentMs:null,deckMs:null}),[l,c]=d.useState(0);return d.useEffect(()=>{t(r=>{const o=r.discoveryMs===null&&e.discovery!=="loading"?Date.now()-i.current:r.discoveryMs,m=r.recentMs===null&&e.recent!=="loading"?Date.now()-i.current:r.recentMs;return o===r.discoveryMs&&m===r.recentMs?r:{...r,discoveryMs:o,recentMs:m}})},[e.discovery,e.recent]),d.useEffect(()=>{n&&t(r=>r.deckMs===null?{...r,deckMs:Date.now()-i.current}:r)},[n]),d.useEffect(()=>{if(a.deckMs!==null)return;const r=()=>c(Date.now()-i.current);r();const o=setInterval(r,_);return()=>clearInterval(o)},[a.deckMs]),{...a,elapsedMs:l}}function N({seed:e,rows:n}){const i=d.useMemo(()=>{const a=[68,92,54,80,61,74];return Array.from({length:n},(t,l)=>a[(e+l)%a.length])},[n,e]);return s.jsx("div",{className:"s-lane-pre-bars","aria-hidden":"true",children:i.map((a,t)=>s.jsx("span",{className:"s-lane-pre-bar",style:{width:`${a}%`,animationDelay:`${e*110+t*90}ms`}},`${t}-${a}`))})}function R({cell:e,index:n,nowMs:i,style:a}){if(!e)return s.jsxs("div",{className:"s-lane-pre s-lane-pre--blind",style:a,"aria-hidden":"true",children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--dot"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--name"}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--meta"})]}),s.jsx(N,{seed:n,rows:6})]});const t=[e.project,e.cwd].find(l=>!!l)??"—";return s.jsxs("div",{className:"s-lane-pre",style:a,children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-dot","aria-hidden":"true"}),s.jsx("span",{className:"s-lane-pre-title",children:I(e)}),s.jsx("span",{className:"s-lane-pre-where",title:e.cwd??t,children:t}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-age",children:k(e.lastActiveAt,i)})]}),s.jsx(N,{seed:n,rows:5})]})}function V({discovery:e,discoveryPhase:n,windowMs:i,nowMs:a,layout:t,gridColumns:l,laneWidthPx:c,matchTranscript:r}){const o=t==="grid",m=d.useMemo(()=>T({discovery:e,discoveryPhase:n,windowMs:i,now:a,matchTranscript:r}),[e,n,r,a,i]),h=m.identified?m.cells:Array.from({length:m.blindCells},()=>null);if(t==="none"||h.length===0)return s.jsx("div",{className:"s-agent-lanes-preflight-empty","aria-hidden":"true"});const p=h.map((f,b)=>s.jsx(R,{cell:f,index:b,nowMs:a,style:o?void 0:{width:`${c}px`,flex:"none"}},f?.key??`blind-${b}`));return o?s.jsx("div",{className:"s-agent-lanes-grid s-agent-lanes-grid--preflight","data-grid-columns":l,"aria-label":"Lane deck loading",children:p}):s.jsx("div",{className:"s-agent-lanes-body",children:s.jsx("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main",children:s.jsx("div",{className:"s-agent-lanes-scroll","aria-label":"Lane deck loading",children:p})})})}function v(e){return e==="ready"?"OK":e==="error"?"WARN":"RUN"}function j(e){return`s-lane-boot-step s-lane-boot-step--${e}`}function u(e,n){return`${e.toLocaleString()} ${n}${e===1?"":"s"}`}function g(e){return e===null?"":`${Math.round(e)}ms`}function G({loadState:e,sourceCount:n,processCount:i,eventCount:a,laneCount:t,horizonLabel:l,handedOff:c,exiting:r}){const o=P(e,c),m=e.discovery!=="loading"&&e.recent!=="loading",h=e.discovery==="ready"?`${u(n,"session source")} indexed`:e.discovery==="error"?"session source scan unavailable":"scanning local transcripts and harness processes",p=e.recent==="ready"?`${u(a,"recent event")} merged`:e.recent==="error"?"history replay unavailable; live signals remain enabled":`reading turns and tool output for the ${l} view`,f=t>0?`${u(t,"lane")} composed`:e.recent==="error"?`${u(a,"live signal")} in, no history`:a>0?`${u(a,"signal")} in, waiting on replay`:"waiting on first signals",b=e.discovery==="ready"?"done":e.discovery==="error"?"warn":"running",y=e.recent==="ready"?"done":e.recent==="error"?"warn":e.discovery==="loading"?"pending":"running",M=c?"done":e.recent==="loading"?"pending":"running",L=o.deckMs!==null?g(o.deckMs):o.elapsedMs<1e3?g(o.elapsedMs):`${(o.elapsedMs/1e3).toFixed(1)}s`,$=t>0;return s.jsxs("div",{className:["s-lane-boot",$?"s-lane-boot--bare":null,r?"s-lane-boot--exiting":null].filter(Boolean).join(" "),role:"status","aria-live":"polite","aria-busy":!m,children:[s.jsx("div",{className:"s-lane-boot-veil","aria-hidden":"true"}),s.jsxs("div",{className:"s-lane-boot-sheet",children:[s.jsxs("div",{className:"s-lane-boot-head",children:[s.jsx("span",{className:`s-lane-boot-dot${m?" s-lane-boot-dot--done":""}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-lane-boot-lead",children:"Starting agent tail"}),s.jsxs("span",{className:"s-lane-boot-count",children:[n.toLocaleString()," sources"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[i.toLocaleString()," live"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[a.toLocaleString()," events"]}),t>0?s.jsxs("span",{className:"s-lane-boot-count",children:[t.toLocaleString()," lanes"]}):null,s.jsx("span",{className:"s-lane-boot-spacer"}),s.jsxs("span",{className:"s-lane-boot-meta",children:["lookback ",l]}),s.jsx("span",{className:"s-lane-boot-elapsed","aria-hidden":"true",children:L})]}),s.jsxs("div",{className:"s-lane-boot-log",children:[s.jsxs("div",{className:j(b),children:[s.jsx("span",{className:"s-lane-boot-state",children:v(e.discovery)}),s.jsx("strong",{className:"s-lane-boot-name",children:"discover sessions"}),s.jsx("code",{className:"s-lane-boot-detail",children:h}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.discoveryMs)})]}),s.jsxs("div",{className:j(y),children:[s.jsx("span",{className:"s-lane-boot-state",children:v(e.recent)}),s.jsx("strong",{className:"s-lane-boot-name",children:"replay recent tail"}),s.jsx("code",{className:"s-lane-boot-detail",children:p}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.recentMs)})]}),s.jsxs("div",{className:j(M),children:[s.jsx("span",{className:"s-lane-boot-state",children:c?"OK":"LIVE"}),s.jsx("strong",{className:"s-lane-boot-name",children:"assemble lanes"}),s.jsx("code",{className:"s-lane-boot-detail",children:f}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.deckMs)})]})]})]})]})}export{G as AgentLanesLoadingSheet,V as AgentLanesPreflightDeck,K as LANE_BOOT_EXIT_MS,S as useLaneBootVisibility};
1
+ import{r as d,j as s}from"./index-BZovGpDk.js";import{t as k}from"./time-Dhsh_2EG.js";const w=3,E=12;function A(e){const n=e?.trim();return n?n.slice(0,13):null}function x(e){const n=e.lastEventAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:e.mtimeMs}function D(e){return e.sessionId?.trim()||e.transcriptPath}function T(e){const n=e.max??E;if(e.discoveryPhase==="loading")return{cells:[],blindCells:Math.min(e.blindCells??w,n),identified:!1};const i=e.discovery?.transcripts??[],a=new Set,t=[];for(const l of i.filter(c=>{if(e.matchTranscript&&!e.matchTranscript(c))return!1;const r=e.now-x(c);return r>=0?r<=e.windowMs:!0}).sort((c,r)=>x(r)-x(c))){const c=D(l);if(!a.has(c)&&(a.add(c),t.push({key:c,source:l.source,sessionLabel:A(l.sessionId),project:l.project,cwd:l.cwd,lastActiveAt:x(l)}),t.length>=n))break}return{cells:t,blindCells:0,identified:!0}}function I(e){return e.sessionLabel?`${e.source}:${e.sessionLabel}`:e.source}const K=260,_=100;function S(e,n){const[i,a]=d.useState(e),[t,l]=d.useState(!1);return d.useEffect(()=>{if(e){a(!0),l(!1);return}if(!i)return;if(n<=0){a(!1),l(!1);return}l(!0);const c=setTimeout(()=>{a(!1),l(!1)},n);return()=>clearTimeout(c)},[e,n,i]),{visible:i,exiting:t}}function P(e,n){const i=d.useRef(Date.now()),[a,t]=d.useState({discoveryMs:null,recentMs:null,deckMs:null}),[l,c]=d.useState(0);return d.useEffect(()=>{t(r=>{const o=r.discoveryMs===null&&e.discovery!=="loading"?Date.now()-i.current:r.discoveryMs,m=r.recentMs===null&&e.recent!=="loading"?Date.now()-i.current:r.recentMs;return o===r.discoveryMs&&m===r.recentMs?r:{...r,discoveryMs:o,recentMs:m}})},[e.discovery,e.recent]),d.useEffect(()=>{n&&t(r=>r.deckMs===null?{...r,deckMs:Date.now()-i.current}:r)},[n]),d.useEffect(()=>{if(a.deckMs!==null)return;const r=()=>c(Date.now()-i.current);r();const o=setInterval(r,_);return()=>clearInterval(o)},[a.deckMs]),{...a,elapsedMs:l}}function N({seed:e,rows:n}){const i=d.useMemo(()=>{const a=[68,92,54,80,61,74];return Array.from({length:n},(t,l)=>a[(e+l)%a.length])},[n,e]);return s.jsx("div",{className:"s-lane-pre-bars","aria-hidden":"true",children:i.map((a,t)=>s.jsx("span",{className:"s-lane-pre-bar",style:{width:`${a}%`,animationDelay:`${e*110+t*90}ms`}},`${t}-${a}`))})}function R({cell:e,index:n,nowMs:i,style:a}){if(!e)return s.jsxs("div",{className:"s-lane-pre s-lane-pre--blind",style:a,"aria-hidden":"true",children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--dot"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--name"}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--meta"})]}),s.jsx(N,{seed:n,rows:6})]});const t=[e.project,e.cwd].find(l=>!!l)??"—";return s.jsxs("div",{className:"s-lane-pre",style:a,children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-dot","aria-hidden":"true"}),s.jsx("span",{className:"s-lane-pre-title",children:I(e)}),s.jsx("span",{className:"s-lane-pre-where",title:e.cwd??t,children:t}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-age",children:k(e.lastActiveAt,i)})]}),s.jsx(N,{seed:n,rows:5})]})}function V({discovery:e,discoveryPhase:n,windowMs:i,nowMs:a,layout:t,gridColumns:l,laneWidthPx:c,matchTranscript:r}){const o=t==="grid",m=d.useMemo(()=>T({discovery:e,discoveryPhase:n,windowMs:i,now:a,matchTranscript:r}),[e,n,r,a,i]),h=m.identified?m.cells:Array.from({length:m.blindCells},()=>null);if(t==="none"||h.length===0)return s.jsx("div",{className:"s-agent-lanes-preflight-empty","aria-hidden":"true"});const p=h.map((f,b)=>s.jsx(R,{cell:f,index:b,nowMs:a,style:o?void 0:{width:`${c}px`,flex:"none"}},f?.key??`blind-${b}`));return o?s.jsx("div",{className:"s-agent-lanes-grid s-agent-lanes-grid--preflight","data-grid-columns":l,"aria-label":"Lane deck loading",children:p}):s.jsx("div",{className:"s-agent-lanes-body",children:s.jsx("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main",children:s.jsx("div",{className:"s-agent-lanes-scroll","aria-label":"Lane deck loading",children:p})})})}function v(e){return e==="ready"?"OK":e==="error"?"WARN":"RUN"}function j(e){return`s-lane-boot-step s-lane-boot-step--${e}`}function u(e,n){return`${e.toLocaleString()} ${n}${e===1?"":"s"}`}function g(e){return e===null?"":`${Math.round(e)}ms`}function G({loadState:e,sourceCount:n,processCount:i,eventCount:a,laneCount:t,horizonLabel:l,handedOff:c,exiting:r}){const o=P(e,c),m=e.discovery!=="loading"&&e.recent!=="loading",h=e.discovery==="ready"?`${u(n,"session source")} indexed`:e.discovery==="error"?"session source scan unavailable":"scanning local transcripts and harness processes",p=e.recent==="ready"?`${u(a,"recent event")} merged`:e.recent==="error"?"history replay unavailable; live signals remain enabled":`reading turns and tool output for the ${l} view`,f=t>0?`${u(t,"lane")} composed`:e.recent==="error"?`${u(a,"live signal")} in, no history`:a>0?`${u(a,"signal")} in, waiting on replay`:"waiting on first signals",b=e.discovery==="ready"?"done":e.discovery==="error"?"warn":"running",y=e.recent==="ready"?"done":e.recent==="error"?"warn":e.discovery==="loading"?"pending":"running",M=c?"done":e.recent==="loading"?"pending":"running",L=o.deckMs!==null?g(o.deckMs):o.elapsedMs<1e3?g(o.elapsedMs):`${(o.elapsedMs/1e3).toFixed(1)}s`,$=t>0;return s.jsxs("div",{className:["s-lane-boot",$?"s-lane-boot--bare":null,r?"s-lane-boot--exiting":null].filter(Boolean).join(" "),role:"status","aria-live":"polite","aria-busy":!m,children:[s.jsx("div",{className:"s-lane-boot-veil","aria-hidden":"true"}),s.jsxs("div",{className:"s-lane-boot-sheet",children:[s.jsxs("div",{className:"s-lane-boot-head",children:[s.jsx("span",{className:`s-lane-boot-dot${m?" s-lane-boot-dot--done":""}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-lane-boot-lead",children:"Starting agent tail"}),s.jsxs("span",{className:"s-lane-boot-count",children:[n.toLocaleString()," sources"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[i.toLocaleString()," live"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[a.toLocaleString()," events"]}),t>0?s.jsxs("span",{className:"s-lane-boot-count",children:[t.toLocaleString()," lanes"]}):null,s.jsx("span",{className:"s-lane-boot-spacer"}),s.jsxs("span",{className:"s-lane-boot-meta",children:["lookback ",l]}),s.jsx("span",{className:"s-lane-boot-elapsed","aria-hidden":"true",children:L})]}),s.jsxs("div",{className:"s-lane-boot-log",children:[s.jsxs("div",{className:j(b),children:[s.jsx("span",{className:"s-lane-boot-state",children:v(e.discovery)}),s.jsx("strong",{className:"s-lane-boot-name",children:"discover sessions"}),s.jsx("code",{className:"s-lane-boot-detail",children:h}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.discoveryMs)})]}),s.jsxs("div",{className:j(y),children:[s.jsx("span",{className:"s-lane-boot-state",children:v(e.recent)}),s.jsx("strong",{className:"s-lane-boot-name",children:"replay recent tail"}),s.jsx("code",{className:"s-lane-boot-detail",children:p}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.recentMs)})]}),s.jsxs("div",{className:j(M),children:[s.jsx("span",{className:"s-lane-boot-state",children:c?"OK":"LIVE"}),s.jsx("strong",{className:"s-lane-boot-name",children:"assemble lanes"}),s.jsx("code",{className:"s-lane-boot-detail",children:f}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.deckMs)})]})]})]})]})}export{G as AgentLanesLoadingSheet,V as AgentLanesPreflightDeck,K as LANE_BOOT_EXIT_MS,S as useLaneBootVisibility};