@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
@@ -1 +0,0 @@
1
- import{j as r}from"./index-NRbRrZw-.js";import{ActivityContent as s}from"./content-CIJo_-JS.js";import"./index-BWHgHrtv.js";import"./router-Bx1tiwVe.js";import"./index-CD2foMB8.js";import"./Provider-Cd-QZltN.js";import"./AgentDetailCard-2DZQahiN.js";/* empty css */import{AgentsLeft as e}from"./left-BWBZQhxQ.js";import{AgentsContent as n}from"./content-BwCmeUmF.js";import{AgentsInspector as m}from"./right-C4GXB45w.js";/* empty css */import"./secondaryNavConfig-BVQiyAXu.js";/* empty css */import"./AgentAvatar-CQqJcwOQ.js";import"./BackToPicker-CXsbxbHM.js";import"./text-B2UZi3l9.js";import"./ConversationScreen-D77SoLos.js";/* empty css */import"./ObservedTopologyPanel-CfHYu-4Z.js";import"./SessionObserve-pbozyqVv.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-BmXDRxER.js";import{P as c}from"./ProjectsRail-CzS0qTCI.js";import{ProjectsScreen as f}from"./ProjectsScreen-0gx7f30h.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-BsQRFbdy.js";import{BriefingsContent as x}from"./content-BMvXPLiQ.js";/* empty css */import{BrokerContent as j}from"./content-BWTbfMDg.js";import"./NewChatComposer-BPsg8shF.js";import{ChatLeft as u}from"./left-CCGR6tIF.js";/* empty css */import{ChatContent as l}from"./content-B-i0XY-t.js";import{ConversationInspector as i}from"./right-HJJzRuGD.js";import{CodeContent as h}from"./CodeScreen-WhTvVUKY.js";import{FollowContent as C}from"./content-3b_jmxEx.js";/* empty css */import{HarnessesContent as d}from"./content-C1K3NcZa.js";/* empty css */import{HomeLeft as I}from"./left-B3ofA1Pr.js";import{HomeContent as p}from"./content-C34J5_Af.js";import{HomeRight as w}from"./right-D2_rmbAH.js";import{MeshLeft as P}from"./left-Dfwzkwh_.js";import{MeshContent as L}from"./content-CvqIqVAV.js";import{MeshInspectorPanel as R}from"./right-CXetlD8X.js";import"./mesh-view-store-B0lqpw8M.js";/* empty css */import{MeshOpsLeft as k}from"./left-BmTKCv4f.js";import{MeshOpsContent as A}from"./content-Dh39SSvP.js";import{MeshOpsInspector as M}from"./right-Dqp--KwX.js";import{OpsLeft as S}from"./left-41_3QKk1.js";import{OpsContent as b}from"./content-DoypqDj5.js";/* empty css */import"./RailRow-BY6fxePa.js";import"./left-mission-Bbd-fW6W.js";import"./mission-control-store-HeCy97KT.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-BLrLF9dt.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-C3rjOV7i.js";import{ReposContent as g}from"./content-DRnwm-Vu.js";import{ReposInspector as O}from"./right-CIzaNH58.js";/* empty css */import"./RepoDiffViewerLazy-BU3V7Kwq.js";import"./cache-BO2Bd_LV.js";import{SearchContent as H}from"./content-n3mvc6NQ.js";import{K as T}from"./KnowledgeSearchInspector-GjmxYBi_.js";/* empty css */import{SessionsContent as y}from"./content-CGRtIS2m.js";import{SessionsInspector as B}from"./right-BA0F8fPI.js";/* empty css */import{SettingsContent as K}from"./content-BGeo5tgd.js";import"./SettingsDrawer-CWdj0VvN.js";import{TerminalLeft as W}from"./left-BhA6essi.js";import{TerminalContent as E}from"./Terminal-CMQFmHnn.js";import{TerminalInspector as F}from"./right-CnRcQS_I.js";import{WorkContent as V}from"./content-BD-DNFmb.js";import{WorkInspector as q}from"./right-WCMb8YXJ.js";import"./DocumentFocusViewer-CetjnYut.js";import{R as z}from"./RealtimeVoiceScreen-CU4uXz4C.js";import"./ActivityScreen-DRHTQIxu.js";import"./api-DEHEgJ9m.js";import"./clipboard-e3fSpeo7.js";import"./sse-QSbhyq9A.js";import"./colors-BtO5_zlx.js";import"./mentions-KNASbAjG.js";import"./time-Dhsh_2EG.js";import"./EmptyState-uQbB-bvP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./provider-Bq0ScH3v.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./TextDocumentSurface-B29xZNlI.js";import"./chevron-right-CV7sEVBS.js";import"./createLucideIcon-Da0lq809.js";import"./file-text-BGVkHS4_.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./AgentInfoScreen-5ybfIL9p.js";import"./conversation-model-CIzM7aXT.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-Bod6AHlA.js";import"./AgentsSubnav-CsvYzzQ-.js";import"./SecondaryNav-CCQqTT3e.js";import"./library-Dx14WNGd.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./HarnessMark-CEzmPFHC.js";import"./AgentSessions-C_tAfGN2.js";import"./agents-project-model-UYiamtrU.js";import"./profile-Y0X7HZHc.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-b7B1Sof1.js";import"./terminal-relay-C2TUIuh1.js";import"./AgentDefinitionsWorkspace-D0LDEqfl.js";import"./agent-specialization-D3-sqwhU.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-ebbCtnHE.js";import"./chevron-down-Jh540uf3.js";import"./agent-essentials-DbbJm3ne.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-BArLfNtd.js";import"./TmuxPeek-eVfqPB4m.js";import"./refresh-cw-C4E58VJK.js";import"./message-square-DURSOrUr.js";import"./search-HmdKXdtR.js";import"./compass-D5Io6BIV.js";import"./settings-BpKRzxOD.js";import"./terminal-DNZTCr6a.js";import"./git-branch-CdJU49Af.js";import"./scroll-text-uulNqrf7.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./ConversationComposer-DPWu3HvK.js";import"./zap-CocRNtyr.js";import"./x-DuzAbpk5.js";import"./message-markup-BP2nH9kQ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Ce7TENb9.js";import"./AstronautSuit-C05Ezxl9.js";import"./eye-B908WSFH.js";import"./ConversationFeedRows-MhcPfxUr.js";import"./ConversationPanels-D-b5SLO-.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-0fAsybdo.js";import"./proxy-DtC2iXnT.js";import"./activity-DTqqWiyV.js";import"./message-circle-2v9Udia0.js";import"./tail-events-B7BrDaFi.js";import"./ConversationStatus-lIvSKRic.js";import"./check-BdovFDz8.js";import"./sparkles-CgTby-ap.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DCY-m0JK.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CKYltTPJ.js";import"./SessionObserveEvidence-C54Xvbps.js";import"./wrench-DwFKomxg.js";import"./external-link-BheHazeW.js";import"./AddProjectForm-Dw2oyCcz.js";import"./projects-inbox-Cbfj4Hx7.js";import"./model-IGCUEsMy.js";import"./archive-DPMdoW_D.js";import"./ProjectsInbox--ZIqo-IE.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-UVNVrwAf.js";import"./CrewWorkspaces-CdojnRMG.js";import"./cpu-CtQc0Z9D.js";import"./sliders-horizontal-D2O6QiDN.js";import"./api-BHHEUSS3.js";import"./arrow-up-right-CilNLf4t.js";import"./ProjectAgentProfile-BjykZ2Xd.js";import"./ProjectAgentProfileBar-B4RqrI0Q.js";import"./BriefingDetailScreen-Uvnk3t0v.js";import"./scoutbot-markdown-DIhLsYxz.js";import"./BriefingsScreen-DLIJ8eYj.js";import"./BrokerScreen-LZ3T7hGG.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-Q75fupqG.js";import"./BrokerMetadataPanel-C8WERmHF.js";import"./DispatchAftermath-D797PbCe.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-CiVH-45m.js";import"./plus-ZReaTFF-.js";import"./send-horizontal-DOjHkZCD.js";import"./copy-DQAM0eSY.js";import"./radio-BC9TO5Pl.js";import"./bot-Ba3gcRVa.js";import"./NewChatOrigin-CCiPg_WR.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-htp0Ui63.js";import"./use-fleet-active-asks-BhuTn5mV.js";import"./MessagesScreen-CR5v-WIE.js";import"./CodeDiffPane-CtgqIuS0.js";import"./usePierreRuntime-CVTMzChM.js";/* empty css */import"./CodeProjectPicker-C4W_udc7.js";/* empty css */import"./FollowScreen-Bfu2_KtU.js";import"./HarnessesScreen-CGhRsqD5.js";import"./useContentSecondaryNav-4atpGgFw.js";import"./OpsSubnav-BK9Fj3gU.js";import"./operator-attention-BqoWAlhp.js";import"./HomeHero-DdxTQ-6a.js";import"./observe-DkAhvkfn.js";import"./persistent-state-Bm_0TmZL.js";import"./agent-lanes-model-BKOs_32K.js";import"./home-moving-signal-CZo2bYBi.js";import"./home-live-action-BkqGLVRY.js";import"./file-code-corner-C5Pc6znt.js";import"./mesh-buckets-CfAukILK.js";import"./MeshScreen-dxNxRtKm.js";import"./MeshCanvas-CZYHLTvw.js";import"./Canvas-BO9mx5_P.js";import"./useAgentHoverCard-BIrm8esH.js";import"./local-agents-Q6KQ12B9.js";import"./mesh-ops-C-i8OMiM.js";import"./use-mesh-ops-items-CD-qsvNX.js";import"./use-scout-dev-flags-DV_I6URU.js";import"./left-agents-Bgahk0FF.js";import"./left-default-CtkfAquc.js";import"./left-lanes-CpujaVN3.js";import"./lane-roster-store-BAmj273z.js";import"./left-advisor-yrzW1Kwz.js";import"./server-CX-xQjJA.js";import"./layers-D9fblkql.js";import"./gauge-sc_gb5Zw.js";import"./OpsScreen-QXRJY8Vf.js";import"./page-status-CEP5pGf3.js";import"./AgentLanesView-Bm85ittm.js";import"./AgentFloorView-CoGh2q5f.js";import"./AgentLanesPreflight-BwkGk8JH.js";import"./AgentLaneChrome-Do7CXwin.js";import"./AgentLaneCard-CeSjWWwh.js";import"./AgentLaneSummaryResize--lHgnncr.js";import"./agent-lane-card-model-CSugZCdy.js";import"./agent-lane-preview-BhplDYGf.js";import"./AgentLaneDetailSheet-BD8B51ka.js";import"./agent-lane-detail-D5EIlX7_.js";import"./LaneTraceDetailSheet-CFsCvKa3.js";import"./LaneTraceEventFocus-BfKZ7G5c.js";import"./MissionControlView-BGj1qnI2.js";import"./MissionContextRail-MTL2EAnr.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-hWi6y87j.js";import"./MissionLogPane-bbG_pM9B.js";import"./OpsAgentsView-dEtw9yt-.js";import"./DataTable-DFacT2uu.js";import"./HostAdvisorView-BAUi5ZxX.js";import"./layout-grid-Vd1chalc.js";import"./AtopView-DOKJbiJL.js";import"./MissionLeftAgentRow-BSRRiiig.js";import"./RepoDiffPageScreen-DeC8fsh_.js";import"./ReposScreen-BQwIShXf.js";import"./selection-bridge-n4wNTm1B.js";import"./KnowledgeSearchScreen-CRei9pyl.js";import"./clock-DpfYdWcr.js";import"./SessionsScreen-KeDb5gz4.js";import"./RawSessionsTable-CbopOF34.js";import"./FlightObserveScreen-sqvt7HUO.js";import"./SettingsScreen-C7zJgZzj.js";import"./StatusPill-a3XBw1GG.js";import"./AgentConfigurationScreen-C3OI6JmZ.js";import"./credentials-qwds23lv.js";import"./VoicePermissionsPanel-DpInOlVq.js";import"./usePersistentState-InmPXIN4.js";import"./session-table-Djain1Qr.js";/* empty css */import"./HerdrSession-BDLa_rrK.js";import"./TerminalRelay-CIHlLVf1.js";import"./WorkDetailScreen-DYwgGaJs.js";import"./WorkFilesViewer-C7H5fXaZ.js";import"./agent-autocomplete-cOPLtuhM.js";import"./gestures-AzPBSf20.js";import"./rocket-BahfIwFz.js";function hp(t,o){switch(t.view){case"ops":return r.jsx(S,{});case"agents-v2":return r.jsx(c,{route:t,navigate:o});case"agent-info":return r.jsx(e,{});case"messages":case"conversation":return r.jsx(u,{});case"mesh":return r.jsx(P,{});case"mesh-ops":return r.jsx(k,{});case"terminal":return r.jsx(W,{});default:return r.jsx(I,{})}}function Cp(t,o,D=[]){switch(t.view){case"conversation":case"messages":return r.jsx(l,{route:t,navigate:o});case"agents-v2":return r.jsx(f,{route:t,navigate:o});case"agent-info":return r.jsx(n,{route:t,navigate:o});case"settings":return r.jsx(K,{route:t,navigate:o});case"inbox":return r.jsx(p,{navigate:o});case"sessions":return r.jsx(y,{route:t,navigate:o});case"search":return r.jsx(H,{route:t,navigate:o});case"mesh":return r.jsx(L,{route:t,navigate:o});case"mesh-ops":return r.jsx(A,{route:t,navigate:o});case"broker":return r.jsx(j,{route:t,navigate:o});case"code":return r.jsx(h,{route:t,navigate:o});case"repos":case"repo-diff":return r.jsx(g,{route:t,navigate:o});case"harnesses":return r.jsx(d,{route:t,navigate:o});case"briefings":return r.jsx(x,{route:t,navigate:o});case"activity":return r.jsx(s,{route:t,navigate:o});case"voice":return r.jsx(z,{});case"ops":return r.jsx(b,{route:t,navigate:o});case"terminal":return r.jsx(E,{route:t,navigate:o});case"work":return r.jsx(V,{route:t,navigate:o});case"follow":return r.jsx(C,{route:t,navigate:o});default:return r.jsx(p,{navigate:o})}}function dp(t,o){switch(t.view){case"inbox":return r.jsx(w,{});case"agents-v2":return t.agentId?r.jsx(m,{}):t.selectedAgentId||t.sessionId?r.jsx(a,{route:t,navigate:o}):null;case"agent-info":return r.jsx(m,{});case"sessions":return t.flightId?null:r.jsx(B,{});case"search":return r.jsx(T,{});case"conversation":return r.jsx(i,{});case"messages":return r.jsx(i,{});case"terminal":return r.jsx(F,{});case"work":return r.jsx(q,{});case"mesh":return r.jsx(R,{});case"mesh-ops":return r.jsx(M,{});case"repos":return r.jsx(O,{});default:return null}}export{Cp as resolveContentPane,hp as resolveLeftPane,dp as resolveRightPane};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-NRbRrZw-.js";import{AgentsLeft as i}from"./left-BWBZQhxQ.js";/* empty css */import"./index-BWHgHrtv.js";import"./Provider-Cd-QZltN.js";import"./router-Bx1tiwVe.js";import"./BackToPicker-CXsbxbHM.js";import"./AgentLiveActions-BmXDRxER.js";import"./ObservedTopologyPanel-CfHYu-4Z.js";/* empty css */import"./secondaryNavConfig-BVQiyAXu.js";/* empty css */import"./AgentAvatar-CQqJcwOQ.js";import"./text-B2UZi3l9.js";import"./index-CD2foMB8.js";import"./AgentDetailCard-2DZQahiN.js";import"./ConversationScreen-D77SoLos.js";/* empty css */import"./SessionObserve-pbozyqVv.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-CzS0qTCI.js";import"./ProjectsInbox--ZIqo-IE.js";import"./projects-inbox-Cbfj4Hx7.js";import{ChatLeft as p}from"./left-CCGR6tIF.js";/* empty css */import{HomeLeft as e}from"./left-B3ofA1Pr.js";import"./content-C34J5_Af.js";import{MeshLeft as s}from"./left-Dfwzkwh_.js";import"./mesh-view-store-B0lqpw8M.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-BmTKCv4f.js";import"./use-scout-dev-flags-DV_I6URU.js";import"./mesh-ops-C-i8OMiM.js";import{OpsLeft as l}from"./left-41_3QKk1.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-BLrLF9dt.js";/* empty css */import"./mission-control-store-HeCy97KT.js";/* empty css *//* empty css *//* empty css */import"./TailView-C3rjOV7i.js";import"./RailRow-BY6fxePa.js";import"./left-mission-Bbd-fW6W.js";import{TerminalLeft as a}from"./left-BhA6essi.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-D3mJ78CM.js";import"./NewChatComposer-BPsg8shF.js";import"./conversation-model-CIzM7aXT.js";import"./createLucideIcon-Da0lq809.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./api-DEHEgJ9m.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./keyboard-nav-feLCB3Zm.js";import"./x-DuzAbpk5.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./loader-circle-Be0T8xv2.js";import"./file-text-BGVkHS4_.js";import"./sse-QSbhyq9A.js";import"./surface-activity-B1rgWB1i.js";import"./provider-Bq0ScH3v.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./TextDocumentSurface-B29xZNlI.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./terminal-takeover-BArLfNtd.js";import"./openContent-C6XO6kr5.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./message-square-DURSOrUr.js";import"./compass-D5Io6BIV.js";import"./settings-BpKRzxOD.js";import"./git-branch-CdJU49Af.js";import"./scroll-text-uulNqrf7.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-DPWu3HvK.js";import"./zap-CocRNtyr.js";import"./message-markup-BP2nH9kQ.js";import"./mentions-KNASbAjG.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Ce7TENb9.js";import"./AstronautSuit-C05Ezxl9.js";import"./ConversationFeedRows-MhcPfxUr.js";import"./ConversationPanels-D-b5SLO-.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-0fAsybdo.js";import"./proxy-DtC2iXnT.js";import"./activity-DTqqWiyV.js";import"./message-circle-2v9Udia0.js";import"./tail-events-B7BrDaFi.js";import"./ConversationStatus-lIvSKRic.js";import"./check-BdovFDz8.js";import"./sparkles-CgTby-ap.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DCY-m0JK.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CKYltTPJ.js";import"./SessionObserveEvidence-C54Xvbps.js";import"./wrench-DwFKomxg.js";import"./external-link-BheHazeW.js";import"./AddProjectForm-Dw2oyCcz.js";import"./project-overview-helpers-BQTc_Ous.js";import"./archive-DPMdoW_D.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-UVNVrwAf.js";/* empty css */import"./CrewWorkspaces-CdojnRMG.js";import"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";import"./agent-specialization-D3-sqwhU.js";import"./cpu-CtQc0Z9D.js";import"./sliders-horizontal-D2O6QiDN.js";import"./api-BHHEUSS3.js";import"./cache-BO2Bd_LV.js";import"./arrow-up-right-CilNLf4t.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-htp0Ui63.js";import"./use-fleet-active-asks-BhuTn5mV.js";import"./operator-attention-BqoWAlhp.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-DdxTQ-6a.js";import"./refresh-cw-C4E58VJK.js";import"./observe-DkAhvkfn.js";import"./persistent-state-Bm_0TmZL.js";import"./agent-lanes-model-BKOs_32K.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-CZo2bYBi.js";import"./home-live-action-BkqGLVRY.js";import"./file-code-corner-C5Pc6znt.js";import"./mesh-buckets-CfAukILK.js";import"./use-mesh-ops-items-CD-qsvNX.js";import"./left-agents-Bgahk0FF.js";import"./left-default-CtkfAquc.js";import"./left-lanes-CpujaVN3.js";import"./lane-roster-store-BAmj273z.js";import"./left-advisor-yrzW1Kwz.js";import"./server-CX-xQjJA.js";import"./layers-D9fblkql.js";import"./gauge-sc_gb5Zw.js";import"./MissionLeftAgentRow-BSRRiiig.js";import"./page-status-CEP5pGf3.js";import"./usePersistentState-InmPXIN4.js";import"./terminal-relay-C2TUIuh1.js";import"./session-table-Djain1Qr.js";import"./clock-DpfYdWcr.js";function gt(r,t){switch(r.view){case"inbox":case"activity":case"briefings":return{body:o.jsx(e,{}),footer:null};case"agents-v2":return{body:o.jsx(m,{route:r,navigate:t}),footer:null};case"agent-info":return{body:o.jsx(i,{}),footer:null};case"repos":case"repo-diff":case"code":return{body:null,footer:null};case"sessions":return{body:null,footer:null};case"terminal":return{body:o.jsx(a,{}),footer:null};case"messages":case"conversation":return{body:o.jsx(p,{}),footer:null};case"broker":case"work":case"follow":return{body:null,footer:null};case"search":return{body:null,footer:null};case"ops":return{body:o.jsx(l,{}),footer:null};case"mesh":return{body:o.jsx(s,{}),footer:o.jsx(f,{})};case"mesh-ops":return{body:o.jsx(n,{}),footer:null};case"harnesses":return{body:null,footer:null};case"settings":case"voice":return{body:null,footer:null};default:return{body:null,footer:null}}}export{gt as resolveSidebarContext};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./index-NRbRrZw-.js";import{u as P}from"./Provider-Cd-QZltN.js";import{a as g}from"./api-DEHEgJ9m.js";import{u as A}from"./sse-QSbhyq9A.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./index-BWHgHrtv.js";function f(t){const r=t.replace(/[\\/]+$/,"").split(/[\\/]/).filter(Boolean);return r[r.length-1]??t}function N(t){const n=t?.trim();if(!n)return null;const r=f(n);return r.endsWith(".jsonl")?r.slice(0,-6):r}function L(t){return t.workspaceRoot?f(t.workspaceRoot):t.agentName??"unassigned"}function $(t){return t.harness?.trim()||t.kind?.trim()||"scout"}function w(t){return t.project?.trim()||(t.cwd?f(t.cwd):null)||"unknown"}function y(t,n=4){const r=new Map;for(const c of t){const a=c.trim()||"unknown";r.set(a,(r.get(a)??0)+1)}return[...r.entries()].map(([c,a])=>({label:c,count:a})).sort((c,a)=>a.count-c.count||c.label.localeCompare(a.label)).slice(0,n)}function fe(){const{route:t,navigate:n}=P(),[r,c]=l.useState([]),[a,h]=l.useState(null),d=l.useCallback(async()=>{const[u,p]=await Promise.allSettled([g("/api/sessions"),g("/api/tail/discover")]);u.status==="fulfilled"&&c(u.value),p.status==="fulfilled"&&h(p.value)},[]);if(l.useEffect(()=>{d()},[d]),A(()=>{d()}),t.view!=="sessions")return null;const s=t.sessionId?r.find(u=>u.id===t.sessionId)??null:null;return s?e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[e.jsx("div",{className:"text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:s.title}),e.jsx("div",{className:"text-xs font-mono uppercase tracking-wider text-cyan-400/70 mt-1",children:s.kind})]}),s.agentName&&e.jsxs(m,{label:"Agent",children:[e.jsx(x,{label:"Name",value:s.agentName}),s.harness&&e.jsx(x,{label:"Harness",value:s.harness})]}),(s.currentBranch||s.workspaceRoot)&&e.jsxs(m,{label:"Workspace",children:[s.currentBranch&&e.jsx(x,{label:"Branch",value:s.currentBranch}),s.workspaceRoot&&e.jsx(x,{label:"Root",value:s.workspaceRoot})]}),e.jsxs(m,{label:"Activity",children:[e.jsx(x,{label:"Messages",value:`${s.messageCount}`}),s.lastMessageAt&&e.jsx(x,{label:"Last",value:b(s.lastMessageAt)}),s.participantIds.length>0&&e.jsx(x,{label:"Participants",value:`${s.participantIds.length}`})]}),s.preview&&e.jsx(m,{label:"Preview",children:e.jsxs("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:['"',s.preview,'"']})})]}):e.jsx(I,{sessions:r,discovery:a,navigate:n,route:t})}function I({sessions:t,discovery:n,navigate:r,route:c}){const a=n?.transcripts??[],h=l.useMemo(()=>y([...t.map($),...a.map(o=>o.source||"unknown")],5),[t,a]),d=l.useMemo(()=>y([...t.map(L),...a.map(w)],5),[t,a]),s=l.useMemo(()=>a.slice().sort((o,i)=>i.mtimeMs-o.mtimeMs).slice(0,5),[a]),u=l.useMemo(()=>t.filter(o=>o.lastMessageAt).slice().sort((o,i)=>(i.lastMessageAt??0)-(o.lastMessageAt??0)).slice(0,5),[t]),p=n?.processes?.length??0,S=n?.totals.transcripts??a.length,R=p>0?"Live harness activity":"Quiet session surface";return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5",children:[e.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:"Sessions context"}),e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(v,{label:"Scout",value:`${t.length}`}),e.jsx(v,{label:"Raw",value:`${S}`}),e.jsx(v,{label:"Live",value:`${p}`})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-2 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{children:R}),e.jsxs("span",{children:[h.length," sources"]})]})]}),e.jsx(m,{label:"Sources",children:e.jsx(M,{items:h,empty:"No sources visible"})}),e.jsx(m,{label:"Project mix",children:e.jsx(M,{items:d,empty:"No projects visible"})}),e.jsx(m,{label:"Recent raw",children:s.length===0?e.jsx(j,{children:"No raw transcripts discovered."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:s.map(o=>{const i=N(o.sessionId)??N(o.transcriptPath);return e.jsxs("button",{type:"button",className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5 text-left transition-colors hover:border-[var(--scout-chrome-border)]",onClick:()=>{i&&k(r,{view:"sessions",sessionId:i},{returnTo:c})},disabled:!i,children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-bg)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:o.source||"raw"}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:w(o)}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:b(o.mtimeMs)})]}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:i??f(o.transcriptPath)})]},`${o.source}:${o.transcriptPath}`)})})}),e.jsx(m,{label:"Recent Scout sessions",children:u.length===0?e.jsx(j,{children:"No recent Scout session messages."}):e.jsx("div",{className:"flex flex-col gap-1",children:u.map(o=>e.jsxs("button",{type:"button",className:"flex items-center gap-2 bg-transparent px-0 py-0.5 text-left",onClick:()=>k(r,{view:"sessions",sessionId:o.id},{returnTo:c}),children:[e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink-soft)]",children:o.title}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:o.lastMessageAt?b(o.lastMessageAt):"-"})]},o.id))})})]})}function v({label:t,value:n}){return e.jsxs("div",{className:"min-w-0 rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-bg)] px-1.5 py-1",children:[e.jsx("div",{className:"font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:n})]})}function M({items:t,empty:n}){return t.length===0?e.jsx(j,{children:n}):e.jsx("div",{className:"flex flex-wrap gap-1",children:t.map(r=>e.jsxs("span",{className:"rounded-sm border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 font-mono text-xs text-[var(--scout-chrome-ink-soft)]",title:`${r.count} ${r.label}`,children:[r.label," ",r.count]},r.label))})}function j({children:t}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:t})}function m({label:t,children:n}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),n]})}function x({label:t,value:n}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:n})]})}export{fe as SessionsInspector};
@@ -1 +0,0 @@
1
- import{j as t,r as h}from"./index-NRbRrZw-.js";import{u as Z,a as pe}from"./Provider-Cd-QZltN.js";import{o as ee}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as fe,s as te,c as se,n as D,d as X}from"./colors-BtO5_zlx.js";import{t as O,c as ne}from"./time-Dhsh_2EG.js";import{f as oe}from"./text-B2UZi3l9.js";import{a as R}from"./api-DEHEgJ9m.js";import{u as L}from"./sse-QSbhyq9A.js";import{r as E}from"./terminal-relay-C2TUIuh1.js";import{q as re}from"./terminal-takeover-BArLfNtd.js";import{r as ve,s as be,a as je,b as ke,c as ge}from"./session-catalog-b7B1Sof1.js";import{p as ae}from"./NewChatComposer-BPsg8shF.js";import{A as Ne}from"./AgentAvatar-CQqJcwOQ.js";import{A as we}from"./AgentLiveActions-BmXDRxER.js";import{T as H}from"./TmuxPeek-eVfqPB4m.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./index-BWHgHrtv.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";/* empty css */import"./refresh-cw-C4E58VJK.js";const ye=new Intl.NumberFormat("en-US"),Ce=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function M(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?ye.format(e):Ce.format(e).toLowerCase()}function Se(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const s=Math.round(e),a=Math.floor(s/3600),r=Math.floor(s%3600/60),i=s%60;return a>0?`${a}h ${r}m`:r>=10||i===0?`${r}m`:`${r}m ${i}s`}function Ie(e){return e.replace(/\.local$/i,"").replace(/-local-openscout$/i,"")}function z(e){const s=e?.trim();return s?s.toLowerCase()==="a2a"?"A2A":s:null}function Y(e){const s=e?.trim();return s?s==="claude_stream_json"?"Claude stream-json worker":s==="codex_app_server"?"Codex app server":s==="pi_rpc"?"Pi RPC":s==="tmux"?"tmux terminal":s:null}function ie(e){return!!(e.providerName||z(e.protocol)||(e.skills?.length??0)>0)}async function Ae(e){await R("/api/local-path/reveal",{method:"POST",body:JSON.stringify({path:e.path,agentId:e.agentId,...e.basePath?{basePath:e.basePath}:{},...e.sessionId?{sessionId:e.sessionId}:{}})})}function ce(e){Ae(e).catch(s=>{console.warn("Failed to reveal local path",s)})}function Pt(){const{route:e,agents:s,navigate:a}=Z();if(e.view==="agent-info")return t.jsx(Re,{conversationId:e.conversationId,agents:s,navigate:a,route:e});if(e.view==="agents-v2"){if(!e.agentId)return null;const r=s.find(i=>i.id===e.agentId)??null;return r?t.jsx(le,{agent:r,agents:s,navigate:a,route:e,observeMode:e.tab==="observe",showStaticIdentity:!1}):null}return null}function Re({conversationId:e,agents:s,navigate:a,route:r}){const[i,m]=h.useState(null),[x,v]=h.useState(null),[p,f]=h.useState(!1),n=h.useCallback(async()=>{const o=await R(`/api/session/${encodeURIComponent(e)}`).catch(()=>null);m(o),f(!0)},[e]);h.useEffect(()=>{f(!1),n()},[n]),L(()=>{n()});const l=i?.agentId??null;h.useEffect(()=>{if(!l||s.some(c=>c.id===l)){v(null);return}let o=!1;return R(`/api/agents/${encodeURIComponent(l)}`).then(c=>{o||v(c)}).catch(()=>{o||v(null)}),()=>{o=!0}},[s,l]);const u=h.useMemo(()=>l?s.find(o=>o.id===l)??(x?.id===l?x:null):null,[x,s,l]);return p?u?t.jsx(le,{agent:u,agents:s,navigate:a,route:r,observeMode:!1}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsx(w,{label:"Conversation",value:e}),t.jsx("div",{className:"mt-2 text-xs font-mono uppercase tracking-[0.15em] leading-relaxed text-[var(--scout-chrome-ink-ghost)]",children:"No live agent registration matches this profile."})]}):t.jsx("div",{className:"flex h-full items-center justify-center p-4 text-center text-sm italic text-[var(--scout-chrome-ink-faint)]",children:"Loading agent context..."})}function le({agent:e,agents:s,navigate:a,route:r,observeMode:i,showStaticIdentity:m=!0}){const x=fe(e.state),[v,p]=h.useState(null),[f,n]=h.useState(null),[l,u]=h.useState(null),o=e.skills??[],c=z(e.protocol),j=ie(e),y=h.useCallback(async()=>{const[k,xe,he]=await Promise.all([R("/api/fleet").catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null),R(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null)]);k&&p(k),n(xe),u(he)},[e.id]);h.useEffect(()=>{y()},[y]),h.useEffect(()=>{n(null),u(null)},[e.id]),L(()=>{y()});const{focusedSession:d,focusSession:C}=Z(),N=ve(e,f),S=h.useMemo(()=>be(f?.sessions??[],N),[f?.sessions,N]),$=r.view==="agents-v2"&&r.agentId===e.id?r.sessionId:null,I=je(e.id,d,N,S,$),P=ke($,S);h.useEffect(()=>{P&&(d?.agentId===e.id&&d.sessionId===P||C(e.id,P))},[e.id,d?.agentId,d?.sessionId,C,P]);const b=S.find(k=>k.id===I)??null,_=!!(b&&N&&b.id===N),G=l?.sessionId?.trim()||l?.data.metadata?.session?.externalSessionId?.trim()||l?.data.metadata?.session?.threadId?.trim()||null,T=b&&_&&G?G:b?.id??null,U=b&&T&&T!==b.id?b.id:null,W=b?ge(e,f,b,_):{canObserve:!1,canTakeover:!1},me=()=>F(a,{view:"terminal",agentId:e.id,mode:"observe"},{returnTo:r}),B=()=>F(a,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:r}),ue=()=>{if(E(e)){B();return}const k=f?.resumeCommand;if(k){re({command:k,cwd:f?.resumeCwd,agentId:e.id}).then(()=>B());return}B()};return m?t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[t.jsxs("div",{className:"flex items-center gap-3 border-b border-[var(--scout-chrome-border-soft)] pb-3",children:[t.jsx(Ne,{agent:e,placement:"inspector"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate text-lg text-[var(--scout-chrome-ink-strong)]",children:e.name}),e.handle&&t.jsxs("span",{className:"text-xs font-mono text-[var(--scout-chrome-ink-faint)]",children:["@",e.handle]})]})]}),t.jsx(we,{agent:e,catalog:f,navigate:a,returnTo:r,variant:"compact"}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsxs(g,{label:"State",children:[t.jsxs("div",{className:"flex items-baseline gap-2",children:[t.jsx("span",{className:"w-1.5 h-1.5 rounded-full",style:{background:te(e.state),opacity:x?1:.4}}),t.jsx("span",{className:"text-md capitalize text-[var(--scout-chrome-ink)]",children:se(e.state)})]}),e.updatedAt&&t.jsxs("div",{className:"mt-1 text-xs font-mono text-[var(--scout-chrome-ink-faint)]",children:["Updated ",O(e.updatedAt)]})]}),t.jsx(g,{label:"Presence",children:t.jsx(_e,{focusAgent:e,agents:s,onOpenAgent:k=>ee(a,k,{returnTo:r})})}),i&&t.jsx(J,{agentId:e.id}),v&&t.jsx(V,{asks:v.activeAsks,agentId:e.id,navigate:a}),t.jsxs(g,{label:"Identity",children:[e.providerName&&t.jsx(w,{label:"Provider",value:e.providerName}),c&&t.jsx(w,{label:"Protocol",value:c}),!j&&t.jsx(w,{label:"Class",value:e.agentClass}),!j&&e.role&&t.jsx(w,{label:"Role",value:oe(e.role)??e.role}),!j&&e.harness&&t.jsx(w,{label:"Harness",value:e.harness}),!j&&e.transport&&t.jsx(w,{label:"Transport",value:Y(e.transport)??e.transport}),(e.homeNodeName||e.homeNodeId)&&t.jsx(w,{label:"Host",value:Ie(e.homeNodeName??e.homeNodeId??"")})]}),o.length>0&&t.jsx(g,{label:`Skills · ${o.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:o.map(k=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:k},k))})}),(e.project||e.branch||e.cwd)&&t.jsxs(g,{label:"Project",children:[e.project&&t.jsx(w,{label:"Name",value:e.project}),e.branch&&t.jsx(w,{label:"Branch",value:e.branch}),e.cwd&&t.jsx(w,{label:"Cwd",value:e.cwd})]}),e.capabilities.length>0&&t.jsx(g,{label:`Capabilities · ${e.capabilities.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:e.capabilities.map(k=>t.jsx("span",{className:"rounded-sm bg-[var(--scout-chrome-hover)] px-1.5 py-0.5 text-xs font-mono text-[var(--scout-chrome-ink-soft)]",children:k},k))})}),t.jsx(Me,{agent:e,catalog:f,navigate:a,returnTo:r})]}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[b&&t.jsxs(g,{label:"Session",children:[t.jsxs("div",{className:"flex items-baseline justify-between gap-2",children:[t.jsx("span",{className:"truncate font-mono text-md text-[var(--scout-chrome-ink)]",title:T??b.id,children:de(T??b.id)}),t.jsx("span",{className:"shrink-0 font-mono text-2xs uppercase tracking-[0.12em]",style:{color:_?"var(--accent)":"var(--scout-chrome-ink-faint)"},children:_?"now":b.endedAt?`ended · ${O(b.endedAt)||"recent"}`:O(b.startedAt)||"recent"})]}),b.cwd&&t.jsx("div",{className:"mt-1 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:b.cwd,children:b.cwd}),T&&t.jsxs("div",{className:"mt-1 break-all font-mono text-2xs leading-snug text-[var(--scout-chrome-ink-faint)]",title:T,children:[t.jsx("span",{className:"uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:"id"})," ",T]}),U&&t.jsxs("div",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",title:U,children:["profile ",U]}),t.jsx("div",{className:"mt-2.5 flex flex-col gap-1.5",children:t.jsxs(Te,{label:"Terminal",children:[t.jsx(q,{onClick:me,disabled:!W.canObserve,title:W.canObserve?"Watch the live terminal, read-only":"No live terminal to observe",children:"Observe"}),t.jsx(q,{onClick:ue,disabled:!W.canTakeover,title:W.canTakeover?"Grab the keyboard and drive it":"Can't take over this session",children:"Take over"})]})})]}),!i&&b&&t.jsx(Ee,{agentId:e.id,navigate:a,cwd:b.cwd??e.cwd,route:r}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsx(g,{label:"Runtime",children:t.jsx($e,{agent:e})}),i&&t.jsx(J,{agentId:e.id}),v&&t.jsx(V,{asks:v.activeAsks,agentId:e.id,navigate:a})]})}function $e({agent:e}){const s=[],a=(m,x)=>{x&&x.trim()&&s.push({label:m,value:x.trim()})},r=z(e.protocol);return ie(e)?a("Protocol",r):(a("Role",oe(e.role)),a("Class",e.agentClass)),s.length===0?null:t.jsx("div",{className:"grid grid-cols-2 gap-x-3 gap-y-2",children:s.map(m=>t.jsxs("div",{className:"min-w-0",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:m.label}),t.jsx("div",{className:"truncate font-mono text-sm text-[var(--scout-chrome-ink)]",children:m.value})]},m.label))})}function Te({label:e,children:s}){return t.jsxs("div",{className:"flex items-center gap-2.5",children:[t.jsx("span",{className:"w-[56px] shrink-0 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"flex gap-1.5",children:s})]})}function q({onClick:e,disabled:s,title:a,children:r}){return t.jsx("button",{type:"button",onClick:e,disabled:s,title:a,className:"rounded-[4px] border border-[var(--scout-chrome-border-soft)] px-2.5 py-1 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-soft)] transition-colors hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)] disabled:cursor-default disabled:opacity-40 disabled:hover:bg-transparent disabled:hover:text-[var(--scout-chrome-ink-soft)]",children:r})}function Me({agent:e,catalog:s,navigate:a,returnTo:r}){const i=pe(),m=E(e),x=s?.activeSessionId??(m?e.harnessSessionId??m.sessionName:null),p=h.useMemo(()=>Pe(e,s,x),[e,s,x]).filter(c=>c.id===x||!c.endedAt),f=p.slice(0,5);if(f.length===0)return null;const n=c=>F(a,{view:"terminal",agentId:e.id,mode:c},{returnTo:r}),l=()=>{if(m){n("takeover");return}s?.resumeCommand&&re({command:s.resumeCommand,cwd:s.resumeCwd,agentId:e.id}).then(()=>n("takeover"))},u=c=>F(a,{view:"sessions",sessionId:c},{returnTo:r}),o=(c,j,y)=>{const d=[];return j&&d.push({kind:"action",label:"Observe in terminal",onSelect:()=>n("observe")}),y&&d.push({kind:"action",label:"Takeover terminal",onSelect:l}),d.length>0&&d.push({kind:"separator"}),d.push({kind:"action",label:"Open session detail",onSelect:()=>u(c.id)}),d.push({kind:"action",label:"Open agent profile",onSelect:()=>ee(a,e,{returnTo:r})}),d};return t.jsx(g,{label:`Running sessions · ${p.length}`,children:t.jsxs("div",{className:"flex flex-col gap-1.5",children:[f.map(c=>{const j=c.id===x,y=j&&!!m,d=j&&(!!m||!!s?.resumeCommand),C=O(c.startedAt)||"recent",N=Y(c.transport)??c.harness??Y(e.transport)??e.harness??"session",S=j?C:c.endedAt?`${O(c.endedAt)||C} ended`:N,$=o(c,y,d);return t.jsxs("div",{onContextMenu:I=>i(I,$),className:`rounded border px-2 py-1.5 transition-colors ${j?"border-[color-mix(in_srgb,var(--accent)_40%,transparent)] bg-[color-mix(in_srgb,var(--accent)_8%,transparent)]":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)]"}`,children:[t.jsxs("button",{type:"button",title:y?`Observe terminal ${c.id}`:`Open session ${c.id}`,onClick:()=>y?n("observe"):u(c.id),className:"flex w-full items-center justify-between gap-2 bg-transparent p-0 text-left",children:[t.jsxs("span",{className:"flex min-w-0 flex-col",children:[t.jsxs("span",{className:"flex min-w-0 items-center gap-1.5",children:[j&&t.jsx("span",{className:"h-1.5 w-1.5 shrink-0 rounded-full bg-[var(--accent)]"}),t.jsx("span",{className:"truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:de(c.id)}),t.jsx("span",{className:"shrink-0 rounded-sm bg-[var(--scout-chrome-hover)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)]",children:N})]}),t.jsx("span",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:c.cwd?ae(c.cwd):"workspace"})]}),t.jsxs("span",{className:"flex shrink-0 flex-col items-end",children:[t.jsx("span",{className:"font-mono text-2xs uppercase tracking-[0.12em] text-[var(--accent)]",children:j?"active":"running"}),t.jsx("span",{className:"mt-0.5 max-w-[78px] truncate font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:S})]})]}),t.jsx("button",{type:"button",title:"Session actions",onClick:I=>i(I,$),className:"mt-1.5 h-5 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-1.5 font-mono text-3xs uppercase tracking-[0.08em] text-[var(--scout-chrome-ink-faint)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]",children:"..."})]},c.id)}),p.length>f.length&&t.jsxs("div",{className:"px-1 pt-0.5 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[p.length-f.length," more running"]})]})})}function Pe(e,s,a){const r=[...s?.sessions??[]],i=E(e);return i&&a&&!r.some(m=>m.id===a)&&r.unshift({id:a,startedAt:e.createdAt??e.updatedAt??Date.now(),cwd:e.cwd??e.projectRoot??".",...e.harness?{harness:e.harness}:{},transport:i.backend,model:e.model}),r.sort((m,x)=>{const v=m.endedAt??m.startedAt,p=x.endedAt??x.startedAt;return ne(v,p)})}function de(e){const s=e.replace(/^session[_:-]?/i,"");return s.length>10?s.slice(0,8):s}function J({agentId:e}){const[s,a]=h.useState(null),r=h.useCallback(async()=>{const i=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);a(i)},[e]);return h.useEffect(()=>{r()},[r]),L(()=>{r()}),s?.data?t.jsx(Oe,{agentId:e,data:s.data,sessionId:s.sessionId}):t.jsx(g,{label:"Trace",children:t.jsx("div",{className:"text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Resolving session trace."})})}function Oe({agentId:e,data:s,sessionId:a}){const r=s.metadata?.session,i=s.events,m=s.files,x=i.filter(o=>o.kind==="tool").length,v=i.filter(o=>o.kind==="think").length,p=i.filter(o=>o.kind==="ask").length,f=i.filter(o=>o.kind==="tool"&&o.tool==="read").length,n=i.filter(o=>o.kind==="tool"&&(o.tool==="edit"||o.tool==="write")).length,l=i.length>0?i[i.length-1].t:0,u=r?.threadPath;return t.jsxs(t.Fragment,{children:[t.jsxs(g,{label:"Session",children:[a&&t.jsx(w,{label:"Active",value:a}),u&&t.jsx(Q,{label:"Source",path:u,basePath:r?.cwd??null,value:ae(u),agentId:e,sessionId:a}),r?.cwd&&t.jsx(Q,{label:"Workspace",path:r.cwd,value:r.cwd,agentId:e,sessionId:a})]}),t.jsx(g,{label:"Trace stats",children:t.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[t.jsx(A,{label:"Turns",value:M(r?.turnCount)}),t.jsx(A,{label:"Tools",value:M(x)}),t.jsx(A,{label:"Thinks",value:M(v)}),t.jsx(A,{label:"Requests",value:M(p)}),t.jsx(A,{label:"Reads",value:M(f)}),t.jsx(A,{label:"Edits",value:M(n)}),t.jsx(A,{label:"Files",value:M(m.length)}),t.jsx(A,{label:"Window",value:Se(l)})]})}),m.length>0&&t.jsx(g,{label:`Files touched · ${m.length}`,children:t.jsx("div",{className:"flex flex-col gap-1",children:m.slice(0,8).map(o=>t.jsxs("button",{type:"button",title:o.path,onClick:()=>ce({path:o.path,basePath:r?.cwd??null,agentId:e,sessionId:a}),className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1 text-left hover:border-[var(--accent)]",children:[t.jsx("span",{className:"min-w-0 truncate font-mono text-xs text-[var(--scout-chrome-ink-soft)]",children:o.path}),t.jsxs("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:["x",o.touches]})]},o.path))})})]})}function K(e,s){return e?.view==="agents-v2"?{...e,view:"agents-v2",agentId:s,tab:"observe"}:{view:"agents-v2",agentId:s,tab:"observe"}}function Ee({agentId:e,navigate:s,cwd:a,route:r}){const[i,m]=h.useState(null),x=h.useCallback(async()=>{const d=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);m(d)},[e]);h.useEffect(()=>{x()},[x]),L(()=>{x()});const v=i?.data;if(!v||v.files.length===0)return null;const p=v.files,n=[...p].sort((d,C)=>{const N=d.state==="read"?0:1,S=C.state==="read"?0:1;return N!==S?S-N:C.touches-d.touches}).slice(0,6),l=p.length-n.length,u=p.filter(d=>d.state!=="read").length,o=v.metadata?.session?.cwd??a??null,c=i.sessionId??v.metadata?.session?.externalSessionId??void 0,j=()=>s(o?{view:"repo-diff",path:o,agentId:e,include:"changed",...c?{sessionId:c}:{}}:K(r,e)),y=()=>s(o?{view:"repo-diff",path:o}:K(r,e));return t.jsxs(g,{label:"Files changed",children:[t.jsxs("div",{className:"mb-1.5 flex items-baseline justify-between font-mono text-3xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("span",{children:u>0?`${u} changed`:"touched"}),t.jsx("span",{className:"tabular-nums",children:p.length})]}),t.jsxs("div",{className:"flex flex-col gap-1",children:[n.map(d=>{const C=d.path.replace(/\/+$/,"").split("/"),N=C.pop()??d.path,S=C.pop(),$=S?`${S}/`:"",I=d.state!=="read",P=d.state==="created"?"+":d.state==="modified"?"~":"·";return t.jsxs("div",{className:"flex items-baseline justify-between gap-2 font-mono text-xs leading-tight",title:`${d.path} · ${d.state}`,children:[t.jsxs("span",{className:"flex min-w-0 items-baseline gap-1.5",children:[t.jsx("span",{className:"flex-none tabular-nums",style:{color:I?"var(--accent)":"var(--scout-chrome-ink-ghost)"},children:P}),t.jsxs("span",{className:"flex min-w-0 items-baseline",children:[t.jsx("span",{className:"truncate text-[var(--scout-chrome-ink-ghost)]",children:$}),t.jsx("span",{className:"flex-none",style:{color:I?"var(--scout-chrome-ink-soft)":"var(--scout-chrome-ink-faint)"},children:N})]})]}),t.jsxs("span",{className:"shrink-0 tabular-nums text-2xs text-[var(--scout-chrome-ink-faint)]",children:["×",d.touches]})]},d.path)}),t.jsxs("div",{className:"mt-1 flex flex-wrap gap-x-3 gap-y-1",children:[t.jsxs("button",{type:"button",onClick:j,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--accent)] hover:underline",children:["Session diff",l>0?` · +${l}`:""," →"]}),t.jsx("button",{type:"button",onClick:y,className:"w-fit cursor-pointer font-mono text-2xs uppercase tracking-[0.1em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--accent)] hover:underline",children:"Worktree diff →"})]})]})]})}function Q({label:e,path:s,basePath:a,value:r,agentId:i,sessionId:m}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("button",{type:"button",title:`Reveal ${s}`,onClick:()=>ce({path:s,basePath:a,agentId:i,sessionId:m}),className:"min-w-0 truncate bg-transparent p-0 text-right font-mono text-sm text-[var(--accent)] hover:text-[var(--scout-chrome-ink)] hover:underline",children:r})]})}function A({label:e,value:s}){return t.jsxs("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] px-2 py-1.5",children:[t.jsx("div",{className:"font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("div",{className:"mt-0.5 font-mono text-md text-[var(--scout-chrome-ink)]",children:s})]})}function _e({focusAgent:e,agents:s,onOpenAgent:a}){const p=h.useMemo(()=>{const n=s.filter(u=>u.id!==e.id),l=u=>{const o=D(u);return o==="in_turn"?0:o==="in_flight"?1:2};return n.slice().sort((u,o)=>{const c=l(u.state??""),j=l(o.state??"");return c!==j?c-j:ne(u.updatedAt,o.updatedAt)}).slice(0,8)},[s,e.id]),f=h.useMemo(()=>{const n=[{agent:e,x:120,y:90,focused:!0}];return p.forEach((l,u)=>{const o=2*Math.PI*u/Math.max(p.length,1)-Math.PI/2;n.push({agent:l,x:120+68*Math.cos(o),y:90+68*Math.sin(o),focused:!1})}),n},[e,p,120,90,68]);return t.jsxs("div",{className:"@container flex flex-wrap items-start gap-3",children:[t.jsxs("svg",{viewBox:"0 0 240 180",className:"block mx-auto shrink-0 w-full",style:{maxWidth:240},xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("defs",{children:t.jsxs("radialGradient",{id:"inspMeshGlow",cx:"50%",cy:"50%",r:"50%",children:[t.jsx("stop",{offset:"0%",stopColor:"var(--accent)",stopOpacity:"0.06"}),t.jsx("stop",{offset:"100%",stopColor:"var(--accent)",stopOpacity:"0"})]})}),t.jsx("circle",{cx:120,cy:90,r:82,fill:"url(#inspMeshGlow)"}),t.jsx("circle",{cx:120,cy:90,r:68,fill:"none",stroke:"var(--border)",strokeDasharray:"2 4"}),f.slice(1).map((n,l)=>t.jsxs("g",{children:[t.jsx("line",{x1:120,y1:90,x2:n.x,y2:n.y,stroke:"var(--accent)",strokeWidth:1,opacity:.6}),t.jsx("circle",{r:2,fill:"var(--accent)",children:t.jsx("animateMotion",{dur:`${2+l*.3}s`,repeatCount:"indefinite",path:`M 120,90 L ${n.x},${n.y}`})})]},`e-${n.agent.id}`)),f.map(n=>{const l=D(n.agent.state),u=l==="in_turn"||l==="in_flight"||l==="callable",o=n.focused?14:9;return t.jsxs("g",{style:{cursor:"pointer"},onClick:()=>a(n.agent),children:[u&&t.jsxs("circle",{cx:n.x,cy:n.y,r:o+5,fill:"none",stroke:X(n.agent.name),strokeWidth:.8,opacity:.3,children:[t.jsx("animate",{attributeName:"r",values:`${o};${o+8};${o}`,dur:"2.5s",repeatCount:"indefinite"}),t.jsx("animate",{attributeName:"opacity",values:"0.3;0;0.3",dur:"2.5s",repeatCount:"indefinite"})]}),t.jsx("circle",{cx:n.x,cy:n.y,r:o,fill:X(n.agent.name),stroke:n.focused?"var(--accent)":"var(--surface)",strokeWidth:n.focused?1.5:1}),t.jsx("text",{x:n.x,y:n.y,dy:"0.35em",textAnchor:"middle",fontFamily:"var(--font-mono)",fontSize:n.focused?10:8,fontWeight:600,fill:"var(--scout-chrome-avatar-ink)",children:n.agent.name[0].toUpperCase()}),t.jsx("text",{x:n.x,y:n.y+o+10,textAnchor:"middle",fontFamily:"var(--font-mono)",fontSize:8,fill:"var(--dim)",letterSpacing:"0.04em",children:n.agent.name.length>9?n.agent.name.slice(0,8)+"...":n.agent.name})]},n.agent.id)})]}),p.length>0&&t.jsx("ul",{className:"@max-[380px]:hidden flex-1 min-w-[120px] flex flex-col gap-1 m-0 p-0 list-none",children:p.map(n=>{const l=D(n.state);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>a(n),className:"w-full flex items-center gap-2 py-1 px-1.5 rounded hover:bg-[var(--surface-hover)] text-left",children:[t.jsx("span",{"aria-hidden":!0,className:"shrink-0 w-2 h-2 rounded-full",style:{background:X(n.name)}}),t.jsx("span",{className:"flex-1 truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:n.name}),t.jsx("span",{"aria-hidden":!0,title:se(n.state),className:"shrink-0 w-1.5 h-1.5 rounded-full",style:{background:te(l)}})]})},n.id)})})]})}function V({asks:e,agentId:s,navigate:a}){const r=e.filter(i=>i.agentId===s&&(i.status==="needs_attention"||i.status==="queued"));return r.length===0?null:t.jsx(g,{label:`Incoming requests · ${r.length}`,children:t.jsx("div",{className:"flex flex-col gap-2",children:r.map(i=>t.jsxs("div",{className:"p-2.5 rounded-md border border-amber-500/30 bg-amber-500/[0.04] cursor-pointer hover:bg-amber-500/[0.08] transition-colors",onClick:()=>{i.conversationId&&a({view:"agents-v2",agentId:s,conversationId:i.conversationId})},children:[t.jsx("div",{className:"text-2xs font-mono uppercase tracking-[0.12em] text-amber-500/80 mb-1",children:"awaiting"}),t.jsx("div",{className:"line-clamp-2 text-sm leading-relaxed text-[var(--scout-chrome-ink)]",children:i.summary??i.task}),t.jsxs("div",{className:"mt-1.5 text-2xs font-mono text-[var(--scout-chrome-ink-ghost)]",children:[i.harness??"operator"," → ",i.agentName??"agent"]})]},i.invocationId))})})}function g({label:e,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:e}),s]})}function w({label:e,value:s}){return t.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[t.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:e}),t.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",title:s,children:s})]})}export{Pt as AgentsInspector};
@@ -1 +0,0 @@
1
- import{r as p,j as s}from"./index-NRbRrZw-.js";import{u as R,s as v,a as b}from"./mesh-view-store-B0lqpw8M.js";import{u as E}from"./local-agents-Q6KQ12B9.js";import{n as _,b as B,a as P}from"./colors-BtO5_zlx.js";import{a as g}from"./api-DEHEgJ9m.js";import{t as U}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./Provider-Cd-QZltN.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";function D(e){return e.issues.some(t=>t.code==="mesh_loopback")?"loopback":e.identity.discoverable?"discoverable":e.tailscale.available?e.tailscale.running?"local-only":"tailnet-stopped":"unavailable"}function F(e){const t=new Map;for(const i of e){const r=(i.harness??i.agentClass??"agent").toLowerCase(),c=t.get(r)??{total:0,working:0};c.total+=1,P(i.state)&&(c.working+=1),t.set(r,c)}return Array.from(t.entries()).map(([i,r])=>({label:i,total:r.total,working:r.working})).sort((i,r)=>r.total-i.total).slice(0,6)}function S(e){return e?e.replace(/^https?:\/\//,"").split("/")[0]??e:"Unavailable"}function z(e){return e.split("/")[0]}function H(e){return new Promise(t=>window.setTimeout(t,e))}async function T(e,t){let i=null,r=null;for(let c=0;c<=t.attempts;c+=1){try{if(i=await g("/api/mesh"),v(i),e(i))return i}catch(u){r=u}c<t.attempts&&await H(t.intervalMs)}if(i)return i;throw r instanceof Error?r:new Error("Mesh status is temporarily unavailable.")}function W(e){return e.issues.find(t=>t.code==="local_only"||t.code==="mesh_loopback"||t.code==="tailscale_stopped")?.summary??null}function Is(){const{meshSnapshot:e,selectedId:t,selectedType:i,probeCache:r}=R(),{agents:c}=E(),[u,f]=p.useState(!1),[C,k]=p.useState(!1),[x,h]=p.useState(null),A=p.useCallback(async()=>{f(!0),h({tone:"info",text:"Restarting broker with mesh discovery enabled..."});try{const l=await g("/api/mesh/announce",{method:"POST",body:"{}"});v(l);const a=l.identity.discoverable?l:await T(n=>n.identity.discoverable,{attempts:6,intervalMs:750});a.identity.discoverable?h({tone:"success",text:`Discoverable at ${S(a.identity.announceUrl??a.brokerUrl)}.`}):h({tone:"warning",text:W(a)??"Scout restarted the broker, but it is not discoverable yet."})}catch(l){h({tone:"error",text:l instanceof Error?l.message:String(l)})}finally{f(!1)}},[]),M=p.useCallback(async()=>{k(!0),h({tone:"info",text:"Opening Tailscale and waiting for the backend..."});try{const l=await g("/api/mesh/tailscale",{method:"POST",body:JSON.stringify({action:"open_app"})});v(l);const a=l.tailscale.running?l:await T(n=>n.tailscale.running,{attempts:12,intervalMs:1e3});a.tailscale.running?h({tone:"success",text:`Tailscale is running with ${a.tailscale.onlineCount} online peer${a.tailscale.onlineCount===1?"":"s"}.`}):h({tone:"warning",text:`Tailscale opened, but the backend is still ${a.tailscale.backendState??"not running"}. Finish startup or sign-in in Tailscale.app.`})}catch(l){h({tone:"error",text:l instanceof Error?l.message:String(l)})}finally{k(!1)}},[]),y=p.useMemo(()=>{const l={total:c.length,working:0,ready:0,notReady:0};for(const a of c){const n=_(a.state);n==="in_turn"||n==="in_flight"?l.working+=1:n==="callable"?l.ready+=1:l.notReady+=1}return l},[c]),w=p.useMemo(()=>F(c),[c]);if(!e)return s.jsx("div",{className:"sys-inspector-empty",children:s.jsx("p",{children:"Loading mesh…"})});if(t?.startsWith("tailnet:")&&i==="node"){const l=t.slice(8),a=e.tailscale.peers.find(m=>m.id===l),n=r[t]??null,d=a?.addresses?.[0]?z(a.addresses[0]):null,N=a?.hostName?.split(".")[0]??a?.hostName??"Tailnet peer";return s.jsxs("div",{className:"sys-inspector-content",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:N}),s.jsx("span",{className:`sys-chip sys-chip-${a?.online?"success":"failed"}`,children:a?.online?"Online":"Offline"})]}),s.jsxs("div",{className:"sys-detail-grid",children:[d&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Address"}),s.jsx("code",{className:"sys-detail-value",children:d})]}),a?.os&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Platform"}),s.jsx("span",{className:"sys-detail-value",children:a.os})]}),n?.result?.node?.meshId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Mesh ID"}),s.jsxs("code",{className:"sys-detail-value",children:[n.result.node.meshId.slice(0,14),"…"]})]}),n?.result?.node?.name&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node name"}),s.jsx("span",{className:"sys-detail-value",children:n.result.node.name})]})]}),(!n||n.status==="loading")&&s.jsx("div",{className:"sys-banner sys-banner-muted",style:{marginTop:8},children:s.jsx("span",{children:"Connecting to Scout broker…"})}),n?.status==="error"&&s.jsxs("div",{className:"sys-banner sys-banner-warning",style:{marginTop:8},children:[s.jsx("strong",{children:"Broker unreachable."}),s.jsx("span",{children:n.result?.error??"Could not reach the remote broker."})]}),n?.status==="done"&&n.result?.node?.capabilities?.length&&s.jsxs("div",{style:{marginTop:10},children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Capabilities"}),s.jsx("div",{style:{display:"flex",flexWrap:"wrap",gap:4},children:n.result.node.capabilities.map(m=>s.jsx("span",{className:"sys-chip sys-chip-neutral",children:m},m))})]}),n?.status==="done"&&n.result?.home&&s.jsxs("div",{style:{marginTop:14},children:[s.jsxs("div",{className:"sys-inspector-section-label",children:["Agents — ",n.result.home.agents.length," registered"]}),n.result.home.agents.length===0?s.jsx("div",{className:"sys-list-empty",style:{marginTop:4},children:s.jsx("p",{children:"No agents registered on this broker."})}):s.jsx("div",{className:"mesh-agent-table",style:{marginTop:4},children:n.result.home.agents.map(m=>{const j=B(m.state);return s.jsxs("div",{className:"mesh-detail-agent",style:{padding:"4px 0"},children:[s.jsx("span",{className:`mesh-detail-dot mesh-detail-dot--${j}`}),s.jsxs("div",{className:"mesh-detail-agent-body",children:[s.jsx("span",{className:"mesh-detail-agent-name",style:{fontSize:12},children:m.title}),m.activeTask&&s.jsx("span",{className:"mesh-detail-agent-task",children:m.activeTask})]}),s.jsx("span",{className:`mesh-detail-agent-state mesh-detail-agent-state--${j}`,children:m.statusLabel||j})]},m.id)})})]}),s.jsx("button",{type:"button",className:"s-btn",style:{marginTop:14},onClick:()=>b(null,null),children:"Clear selection"})]})}if(t&&i==="node"){const a=Object.values(e.nodes).find(d=>d.id===t)??(e.localNode?.id===t?e.localNode:null),n=e.localNode?.id===t;return a?s.jsxs("div",{className:"sys-inspector-content",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:a.hostName?.split(".")[0]??a.name??"Node"}),n&&s.jsx("span",{className:"sys-chip sys-chip-neutral",children:"this broker"})]}),s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Node ID"}),s.jsxs("code",{className:"sys-detail-value",children:[a.id.slice(0,16),"…"]})]}),a.brokerUrl&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Broker URL"}),s.jsx("code",{className:"sys-detail-value",children:S(a.brokerUrl)})]}),a.hostName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Host"}),s.jsx("span",{className:"sys-detail-value",children:a.hostName})]}),!n&&"lastSeenAt"in a&&typeof a.lastSeenAt=="number"&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Last seen"}),s.jsx("span",{className:"sys-detail-value",children:U(a.lastSeenAt)})]}),!n&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Scope"}),s.jsx("span",{className:"sys-detail-value",children:a.advertiseScope==="mesh"?"Announced to mesh":"Local only"})]})]}),n&&e.issues.length>0&&s.jsx("div",{className:"sys-issue-grid",style:{marginTop:12},children:e.issues.map((d,N)=>s.jsxs("article",{className:`sys-issue-card sys-issue-card-${d.severity==="error"?"error":"warning"}`,children:[s.jsx("div",{className:"sys-issue-head",children:s.jsx("h3",{className:"sys-issue-title",children:d.title})}),s.jsx("p",{className:"sys-issue-body",children:d.summary}),d.actionCommand&&s.jsx("div",{className:"sys-issue-action",children:s.jsx("code",{className:"sys-code-inline",children:d.actionCommand})})]},N))}),s.jsx("button",{type:"button",className:"s-btn",style:{marginTop:12},onClick:()=>b(null,null),children:"Clear selection"})]}):s.jsxs("div",{className:"sys-inspector-empty",children:[s.jsx("p",{children:"Node not found."}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>b(null,null),children:"Clear"})]})}const o=e,L=D(o),$=Object.values(o.nodes).filter(l=>l.id!==o.localNode?.id).length,I=o.tailscale.onlineCount??0,O=o.localNode?.hostName?.split(".")[0]??o.localNode?.name??o.identity.name??"this broker";return s.jsxs("div",{className:"sys-inspector-content mesh-summary",children:[s.jsxs("div",{className:"sys-inspector-head",children:[s.jsx("h3",{className:"sys-inspector-title",children:O}),s.jsx("span",{className:"mesh-summary-mode",children:o.identity.modeLabel})]}),s.jsx("section",{className:"mesh-summary-section",children:s.jsxs("div",{className:"mesh-summary-counts",children:[s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.total}),s.jsx("span",{className:"mesh-summary-count-label",children:"agents"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--working",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.working}),s.jsx("span",{className:"mesh-summary-count-label",children:"working"})]}),s.jsxs("div",{className:"mesh-summary-count",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.ready}),s.jsx("span",{className:"mesh-summary-count-label",children:"ready"})]}),s.jsxs("div",{className:"mesh-summary-count mesh-summary-count--offline",children:[s.jsx("span",{className:"mesh-summary-count-value",children:y.notReady}),s.jsx("span",{className:"mesh-summary-count-label",children:"not ready"})]})]})}),w.length>0&&s.jsxs("section",{className:"mesh-summary-section",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"By harness"}),s.jsx("div",{className:"mesh-summary-harness",children:w.map(l=>s.jsxs("div",{className:"mesh-summary-harness-row",children:[s.jsx("span",{className:"mesh-summary-harness-name",children:l.label}),s.jsx("span",{className:"mesh-summary-harness-count",children:l.total}),l.working>0&&s.jsxs("span",{className:"mesh-summary-harness-working",children:[l.working," working"]})]},l.label))})]}),s.jsxs("section",{className:"mesh-summary-section",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Peers"}),s.jsxs("div",{className:"mesh-summary-peers",children:[s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Mesh"}),s.jsx("span",{className:"mesh-summary-peer-value",children:$})]}),o.tailscale.available&&s.jsxs("div",{className:"mesh-summary-peer-row",children:[s.jsx("span",{className:"mesh-summary-peer-label",children:"Tailnet"}),s.jsx("span",{className:`mesh-summary-peer-value${o.tailscale.running?"":" mesh-summary-peer-value--dim"}`,children:o.tailscale.running?`${I} online`:"stopped"})]})]})]}),s.jsxs("section",{className:"mesh-summary-section mesh-summary-reach",children:[s.jsx("div",{className:"sys-inspector-section-label",children:"Reach"}),s.jsx(J,{state:L,tailscaleAvailable:o.tailscale.available,announcing:u,tailscaleBusy:C,onAnnounce:()=>{A()},onStartTailscale:()=>{M()}}),x&&s.jsx("div",{className:`sys-banner mesh-action-message sys-banner-${x.tone}`,children:s.jsx("span",{children:x.text})})]})]})}function J({state:e,tailscaleAvailable:t,announcing:i,tailscaleBusy:r,onAnnounce:c,onStartTailscale:u}){return e==="discoverable"?s.jsxs("div",{className:"mesh-reach mesh-reach--on",children:[s.jsx("span",{className:"mesh-reach-dot"}),s.jsx("span",{className:"mesh-reach-label",children:"Discoverable on mesh"})]}):e==="tailnet-stopped"?s.jsxs("div",{className:"mesh-reach",children:[s.jsxs("div",{className:"mesh-reach-row",children:[s.jsx("span",{className:"mesh-reach-dot mesh-reach-dot--off"}),s.jsx("span",{className:"mesh-reach-label",children:"Tailscale stopped"})]}),s.jsx("button",{type:"button",className:"s-btn mesh-reach-action",disabled:r,onClick:u,children:r?"Opening…":"Start Tailscale"})]}):e==="loopback"?s.jsxs("div",{className:"mesh-reach",children:[s.jsxs("div",{className:"mesh-reach-row",children:[s.jsx("span",{className:"mesh-reach-dot mesh-reach-dot--off"}),s.jsx("span",{className:"mesh-reach-label",children:"Announcement broken"})]}),s.jsx("button",{type:"button",className:"s-btn mesh-reach-action",disabled:i,onClick:c,children:i?"Fixing…":"Fix announcement"})]}):e==="unavailable"?s.jsxs("div",{className:"mesh-reach mesh-reach--neutral",children:[s.jsx("span",{className:"mesh-reach-dot mesh-reach-dot--off"}),s.jsx("span",{className:"mesh-reach-label",children:"Local only — no tailnet on this host"})]}):s.jsxs("div",{className:"mesh-reach",children:[s.jsxs("div",{className:"mesh-reach-row",children:[s.jsx("span",{className:"mesh-reach-dot mesh-reach-dot--off"}),s.jsx("span",{className:"mesh-reach-label",children:"Local only"})]}),s.jsx("button",{type:"button",className:"s-btn s-btn-primary mesh-reach-action",disabled:i||!t,onClick:c,children:i?"Announcing…":"Make discoverable"})]})}export{Is as MeshInspectorPanel};
@@ -1 +0,0 @@
1
- import{r as d,j as e}from"./index-NRbRrZw-.js";import{u as k}from"./Provider-Cd-QZltN.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-CQqJcwOQ.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./text-B2UZi3l9.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-D4dHTRkt.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./api-DEHEgJ9m.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./loader-circle-Be0T8xv2.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";import"./voice-levels-Dcr3jglk.js";function ge(){const{route:t,agents:o,navigate:s}=k();if(t.view!=="terminal")return null;const r=t.agentId?o.find(i=>i.id===t.agentId)??null:null,l=t.mode??"takeover",[f,p]=d.useState(null);d.useEffect(()=>{if(t.view!=="terminal"||t.agentId||!t.terminalSurfaceKey){p(null);return}let i=!1;return T().then(g=>{i||p(C(g,t.terminalSessionId,t.terminalSurfaceKey))}).catch(()=>{i||p(null)}),()=>{i=!0}},[t.agentId,t.terminalSessionId,t.terminalSurfaceKey,t.view]);const j=f?R(f.surface):null,n=(r?$(r):null)??j,c=d.useMemo(()=>n?A(n):null,[n]);return r?e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsx(D,{agent:r}),e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),e.jsx(a,{label:"Backend",value:n?.backend??"pty"}),n&&e.jsx(a,{label:"Session",value:n.sessionName}),n?.paneId&&e.jsx(a,{label:"Pane",value:n.paneId}),e.jsx(a,{label:"State",value:y(r.state)})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c}),e.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[n&&e.jsx(m,{active:l==="observe",label:"Observe",onClick:()=>s(b(r.id,"observe"))}),e.jsx(m,{active:l==="takeover",label:"Takeover",onClick:()=>s(b(r.id,"takeover"))}),e.jsx(m,{label:"Profile",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"profile"})}),e.jsx(m,{label:"Trace",onClick:()=>s({view:"agents-v2",agentId:r.id,tab:"observe"})})]}),e.jsxs(u,{label:"Agent",children:[e.jsx(a,{label:"Harness",value:r.harness??"-"}),e.jsx(a,{label:"Transport",value:r.transport??"-"}),r.role&&e.jsx(a,{label:"Role",value:w(r.role)??r.role}),r.handle&&e.jsx(a,{label:"Handle",value:`@${r.handle}`}),r.updatedAt&&e.jsx(a,{label:"Updated",value:N(r.updatedAt)})]}),(r.project||r.branch||r.cwd||r.projectRoot)&&e.jsxs(u,{label:"Workspace",children:[r.project&&e.jsx(a,{label:"Name",value:r.project}),r.branch&&e.jsx(a,{label:"Branch",value:r.branch}),r.cwd&&e.jsx(a,{label:"Cwd",value:r.cwd}),!r.cwd&&r.projectRoot&&e.jsx(a,{label:"Root",value:r.projectRoot})]})]}):e.jsxs("div",{className:"flex h-full flex-col gap-4 overflow-y-auto p-4 text-sm frame-scrollbar",children:[e.jsxs(u,{label:"Terminal",children:[e.jsx(a,{label:"Mode",value:v(l)}),t.agentId&&e.jsx(a,{label:"Agent",value:t.agentId}),n&&e.jsx(a,{label:"Backend",value:n.backend}),n&&e.jsx(a,{label:"Session",value:n.sessionName})]}),c&&e.jsx(h,{label:"Open in your own terminal",command:c})]})}function x(t){return/^[A-Za-z0-9_./:@%+=,-]+$/u.test(t)?t:`'${t.replace(/'/gu,"'\\''")}'`}function A(t){return t.backend==="tmux"?`tmux attach -t ${x(t.sessionName)}`:`${t.socketDir?`ZELLIJ_SOCKET_DIR=${x(t.socketDir)} `:""}zellij attach ${x(t.sessionName)}`}function b(t,o){return{view:"terminal",agentId:t,mode:o}}function $(t){return t.terminalSurface?t.terminalSurface:t.transport==="tmux"&&t.harnessSessionId?{backend:"tmux",sessionName:t.harnessSessionId,paneId:null,socketDir:null}:null}function v(t){return t==="observe"?"Read-only observe":"Interactive takeover"}function D({agent:t}){return e.jsx("div",{className:"border-b border-[var(--scout-chrome-border-soft)] pb-3",children:e.jsxs("div",{className:"flex items-center gap-2.5",children:[e.jsx(S,{agent:t,placement:"row",size:32,presence:!1}),e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-lg leading-snug text-[var(--scout-chrome-ink-strong)]",children:t.name}),t.handle&&e.jsxs("div",{className:"truncate font-mono text-xs text-cyan-400/70",children:["@",t.handle]})]})]})})}function m({active:t,label:o,onClick:s}){return e.jsx("button",{type:"button",onClick:s,className:`h-7 rounded border px-2 font-mono text-2xs uppercase tracking-[0.1em] transition-colors ${t?"border-cyan-400/35 bg-cyan-400/[0.12] text-cyan-200":"border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] text-[var(--scout-chrome-ink-soft)] hover:bg-[var(--scout-chrome-active)] hover:text-[var(--scout-chrome-ink)]"}`,children:o})}function h({label:t,command:o}){const[s,r]=d.useState(!1);return e.jsxs("details",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2",children:[e.jsx("summary",{className:"cursor-pointer select-none font-mono text-2xs uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("div",{className:"mb-1.5 mt-2 flex items-center justify-end gap-2",children:e.jsx("button",{type:"button",className:"rounded border border-cyan-400/20 bg-cyan-400/[0.08] px-2 py-1 font-mono text-2xs uppercase tracking-[0.1em] text-cyan-100/80 hover:bg-cyan-400/[0.14]",onClick:()=>{I(o).then(l=>{l&&(r(!0),window.setTimeout(()=>r(!1),1200))})},children:s?"Copied":"Copy"})}),e.jsx("code",{className:"block select-text break-all rounded bg-black/25 p-2 font-mono text-xs leading-relaxed text-[var(--scout-chrome-ink)]",children:o})]})}function u({label:t,children:o}){return e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),o]})}function a({label:t,value:o}){return e.jsxs("div",{className:"flex items-baseline justify-between gap-2 py-0.5",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-right text-sm font-mono text-[var(--scout-chrome-ink)]",children:o})]})}export{ge as TerminalInspector};
@@ -1 +0,0 @@
1
- import{j as t}from"./index-NRbRrZw-.js";import{u as h}from"./Provider-Cd-QZltN.js";import{o as j}from"./openAgent-Dbv5wfuL.js";import{n as v,i as u,c as d}from"./colors-BtO5_zlx.js";import{A as b}from"./AgentAvatar-CQqJcwOQ.js";import{t as g}from"./time-Dhsh_2EG.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./api-DEHEgJ9m.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./openContent-C6XO6kr5.js";import"./SpriteAvatar-vpHO-rXs.js";import"./agent-identity-CIMT7oV6.js";function lt(){const{agents:r,agentsLoaded:o,apiConnection:s,navigate:a,route:f}=h(),n=e=>j(a,e,{returnTo:f});if(!o)return t.jsx("div",{className:"flex h-full flex-col justify-center","aria-busy":"true",children:t.jsxs("div",{className:"base-rail-loading",role:"status","aria-label":"Loading agent roster",children:[t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"}),t.jsx("span",{"aria-hidden":"true"})]})});if(r.length===0)return t.jsxs("div",{className:"flex h-full flex-col items-center justify-center px-4 text-center font-mono text-sm leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:[t.jsx("div",{className:"mb-1 uppercase tracking-[0.15em]",children:s.status==="offline"?"Roster unavailable":"No agents"}),t.jsx("div",{children:s.status==="offline"?s.message:"Connect an agent to see your roster here."})]});const i=r.filter(e=>{const x=v(e.state,e);return x==="in_turn"||x==="in_flight"}),l=r.filter(e=>u(e.state,e)&&!i.includes(e)),m=r.filter(e=>!u(e.state,e));return t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[i.length>0&&t.jsx(c,{label:"In progress",count:i.length,children:i.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e)},e.id))}),l.length>0&&t.jsx(c,{label:"Callable",count:l.length,children:l.map(e=>t.jsx(p,{agent:e,onOpen:n},e.id))}),m.length>0&&t.jsx(c,{label:"Blocked",count:m.length,children:m.map(e=>t.jsx(p,{agent:e,onOpen:n,subLabel:d(e.state,e),dim:!0},e.id))})]})}function c({label:r,count:o,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsxs("div",{className:"flex items-baseline justify-between mb-1.5",children:[t.jsx("span",{className:"text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:r}),t.jsx("span",{className:"text-2xs font-mono tabular-nums text-[var(--scout-chrome-ink-ghost)]",children:o})]}),t.jsx("div",{className:"flex flex-col gap-0.5",children:s})]})}function p({agent:r,onOpen:o,subLabel:s,dim:a}){return t.jsxs("button",{onClick:()=>o(r),className:`group flex items-center gap-2.5 px-2 py-1.5 rounded-sm text-left transition-colors ${a?"opacity-60 hover:opacity-100 hover:bg-[var(--scout-chrome-hover)]":"hover:bg-[var(--scout-chrome-hover)]"}`,children:[t.jsx(b,{agent:r,placement:"row"}),t.jsxs("div",{className:"flex flex-col min-w-0 flex-1",children:[t.jsx("span",{className:"truncate font-medium text-[var(--scout-chrome-ink)]",children:r.name}),s?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:s}):r.updatedAt?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-ghost)]",children:g(r.updatedAt)}):null]})]})}export{lt as HomeRight};
@@ -1 +0,0 @@
1
- import{r as y,j as e}from"./index-NRbRrZw-.js";import{a as O}from"./api-DEHEgJ9m.js";import{a as r,t as f}from"./time-Dhsh_2EG.js";import{u as M,j as R}from"./mesh-ops-C-i8OMiM.js";import{u as L}from"./mesh-view-store-B0lqpw8M.js";import{u as H}from"./Provider-Cd-QZltN.js";/* empty css */import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./sse-QSbhyq9A.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";function E(o){return o.state==="waiting"&&o.nextMoveOwnerId==="operator"&&o.waitingOn?.label==="Held by operator"}function t({label:o,value:c}){return c?e.jsxs("div",{className:"mesh-ops-detail-row",children:[e.jsx("span",{className:"mesh-ops-detail-label",children:o}),e.jsx("span",{className:"mesh-ops-detail-value",children:c})]}):null}function ye(){const{navigate:o}=H(),{items:c,hosts:h,selectedItemId:w,lab:A}=M(),{meshSnapshot:p}=L(),[i,x]=y.useState(null),[v,j]=y.useState(null),s=c.find(l=>l.id===w)??null,u=async l=>{if(!(!s||i)){x(l),j(null);try{await O(`/api/mesh-ops/items/${encodeURIComponent(s.id)}/${l}`,{method:"POST",body:"{}"}),R()}catch(d){j(d instanceof Error?d.message:String(d))}finally{x(null)}}};if(!s){const l=new Map;for(const n of c)n.hostNodeId&&l.set(n.hostNodeId,(l.get(n.hostNodeId)??0)+1);const d=p?.localNode?.id??null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Mesh"}),h.map(n=>e.jsx(t,{label:n.nodeId===d?"this host":"peer",value:`${n.label} · ${l.get(n.nodeId)??0} items${n.liveSessionCount>0?` · ${n.liveSessionCount} live`:""}`},n.nodeId)),h.length===0&&e.jsx("div",{className:"ctx-panel-empty",children:"No hosts yet."})]}),e.jsx("div",{className:"ctx-panel-section",children:e.jsx("p",{className:"mesh-ops-inspector-note",children:"Select an item to inspect it. Counts are items attributed to each host; the map stays in the mesh screen."})})]})}if(s.kind==="session"&&s.session){const l=s.session;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),e.jsxs("div",{className:"mesh-ops-inspector-summary",children:[l.live?`Live ${l.harness} session`:l.endedAt!==null?`Ended ${l.harness} session`:`Lost ${l.harness} session — no end marker, last seen ${r(l.lastSeenAt)}`,l.alias?` · ${l.alias}`:""]})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsx(t,{label:"harness",value:l.harness}),e.jsx(t,{label:"state",value:l.endedAt!==null?"ended":l.state}),e.jsx(t,{label:"agent",value:s.ownerId}),e.jsx(t,{label:"started",value:l.startedAt!==null?r(l.startedAt):null}),e.jsx(t,{label:"last seen",value:r(l.lastSeenAt)}),e.jsx(t,{label:"ended",value:l.endedAt!==null?r(l.endedAt):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"host",value:s.hostLabel}),e.jsx(t,{label:"project",value:s.projectRoot}),e.jsx(t,{label:"cwd",value:l.cwd})]})]})}const S=E(s),I=s.state==="done"||s.state==="cancelled",$=s.state==="open"||s.state==="working",C=S,m=s.state==="review",a=s.latestFlight,k=a!==null&&(a.state==="running"||a.state==="queued"),b=p?.localNode?.hostName?.split(".")[0]??p?.localNode?.name??"here",N=s.hostLabel??"unattributed",g=N===b||s.hostNodeId===null;return e.jsxs("div",{className:"ctx-panel mesh-ops-inspector",children:[e.jsxs("div",{className:"mesh-ops-inspector-header",children:[e.jsx("div",{className:"mesh-ops-inspector-title",children:s.title}),s.summary&&e.jsx("div",{className:"mesh-ops-inspector-summary",children:s.summary})]}),A.routeStrip&&e.jsx("div",{className:"mesh-ops-routestrip","aria-hidden":!0,children:e.jsxs("svg",{viewBox:"0 0 260 40",className:"mesh-ops-routestrip-svg",children:[e.jsx("line",{x1:"24",y1:"18",x2:"236",y2:"18",className:`mesh-ops-routestrip-line${k&&!g?" mesh-ops-routestrip-line--moving":""}`}),e.jsx("rect",{x:"14",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("rect",{x:"234",y:"12",width:"12",height:"12",rx:"2",className:"mesh-ops-routestrip-node"}),e.jsx("text",{x:"20",y:"36",textAnchor:"middle",className:"mesh-ops-routestrip-label",children:b}),e.jsx("text",{x:"246",y:"36",textAnchor:"end",className:"mesh-ops-routestrip-label",children:g?"(same host)":N})]})}),!I&&e.jsxs("div",{className:"mesh-ops-actions",children:[C?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("release")},children:i==="release"?"Releasing…":"Release"}):$?e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u("hold")},children:i==="hold"?"Holding…":"Hold"}):null,(s.state==="review"||s.attention!=="silent")&&e.jsx("button",{type:"button",className:"mesh-ops-button",disabled:i!==null,onClick:()=>{u(m?"accept":"clear")},title:m?"Accept this work item":"Dismiss this item from the attention queue",children:i==="accept"||i==="clear"?m?"Accepting…":"Clearing…":m?"Accept":"Clear"}),e.jsx("button",{type:"button",className:"mesh-ops-button",onClick:()=>o({view:"work",workId:s.id}),title:"Open the full work item",children:"Open item"})]}),v&&e.jsx("div",{className:"ctx-panel-empty","data-tone":"error",children:v}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"State"}),e.jsx(t,{label:"phase",value:s.currentPhase}),e.jsx(t,{label:"state",value:s.state}),e.jsx(t,{label:"attention",value:s.attention==="silent"?null:s.attention}),e.jsx(t,{label:"waiting on",value:s.waitingOn?.label??null}),e.jsx(t,{label:"acceptance",value:s.acceptanceState==="none"?null:s.acceptanceState}),e.jsx(t,{label:"priority",value:s.priority}),e.jsx(t,{label:"labels",value:s.labels.length>0?s.labels.join(", "):null})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Venue"}),e.jsx(t,{label:"owner",value:s.ownerName??s.ownerId}),e.jsx(t,{label:"host",value:s.hostLabel??(s.hostNodeId?s.hostNodeId:null)}),e.jsx(t,{label:"project",value:s.projectRoot})]}),a&&e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Latest flight"}),e.jsx(t,{label:"state",value:a.state}),e.jsx(t,{label:"summary",value:a.summary}),e.jsx(t,{label:"started",value:a.startedAt!==null?r(a.startedAt):null}),e.jsx(t,{label:"completed",value:a.completedAt!==null?r(a.completedAt):null}),s.activeFlightCount>0&&e.jsx(t,{label:"active",value:`${s.activeFlightCount} in flight`})]}),e.jsxs("div",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsx(t,{label:"last",value:s.lastMeaningfulSummary}),e.jsx(t,{label:"updated",value:`${f(s.updatedAt)} · created ${f(s.createdAt)}`})]})]})}export{ye as MeshOpsInspector};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./index-NRbRrZw-.js";import{u as ct}from"./Provider-Cd-QZltN.js";import{o as $e}from"./openContent-C6XO6kr5.js";import{a as B}from"./api-DEHEgJ9m.js";import{u as rt}from"./sse-QSbhyq9A.js";import{u as lt}from"./tail-events-B7BrDaFi.js";import{n as ot,a as dt,s as Me,c as _e}from"./colors-BtO5_zlx.js";import{A as ut}from"./AgentLiveActions-BmXDRxER.js";import{i as mt}from"./message-visibility-kJM8XcSG.js";import{h as pt,j as ht,k as vt,m as xt,c as Be,l as ft}from"./conversation-model-CIzM7aXT.js";import{c as jt,e as gt,t as W,f as oe}from"./time-Dhsh_2EG.js";import{d as Nt}from"./router-Bx1tiwVe.js";import{T as yt}from"./TmuxPeek-eVfqPB4m.js";import{S as It}from"./scroll-text-uulNqrf7.js";import"./provider-Bq0ScH3v.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./chevron-right-CV7sEVBS.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./chevron-down-Jh540uf3.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-BArLfNtd.js";import"./eye-B908WSFH.js";import"./terminal-DNZTCr6a.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";/* empty css */import"./refresh-cw-C4E58VJK.js";const wt=20;function de(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.split(/[\\/]/).filter(Boolean).at(-1)??s:null}function ue(t){const s=t?.trim();return s?s.length>18?`${s.slice(0,8)}...${s.slice(-6)}`:s:null}function b(t){const s=new Set,a=[];for(const c of t){const m=c?.trim();if(!m)continue;const h=m.toLowerCase();s.has(h)||(s.add(h),a.push(m))}return a}function Ue(t,s){const a=t?.trim().replace(/[\\/]+$/,""),c=s.trim().replace(/[\\/]+$/,"");if(!a||!c)return!1;if(a===c)return!0;if(c.startsWith("~/")){const m=c.slice(1);if(a.endsWith(m)||a.includes(`${m}/`))return!0}if(a.startsWith("~/")){const m=a.slice(1);if(c.endsWith(m)||c.includes(`${m}/`))return!0}return a.startsWith(`${c}/`)||c.startsWith(`${a}/`)}function Fe(t,s){const a=t?.trim().toLowerCase(),c=s.trim().toLowerCase();return!a||!c?!1:a.includes(c)||c.includes(a)}function Ve(t,s){const a=t?.trim().toLowerCase(),c=s.trim().toLowerCase();return!a||!c?!1:a===c}function St(t){const{activeSessionId:s,agent:a,sessionMeta:c}=t,m=b([s,a?.harnessSessionId]),h=b([a?.cwd,a?.projectRoot,c?.workspaceRoot]),r=b([a?.project,de(a?.cwd),de(a?.projectRoot),de(c?.workspaceRoot)]).filter(U=>U.length>2),o=b([...m.slice(0,2),...r.slice(0,2)]).join("|");return{sessionIds:m,paths:h,projects:r,query:o}}function he(t,s){return!!(s.sessionIds.some(a=>Fe(t.sessionId,a))||s.paths.some(a=>Ue(t.cwd,a))||s.projects.some(a=>Ve(t.project,a)))}function Tt(t,s){const a=s.filter(r=>he(r,t)),c=b(a.filter(r=>t.sessionIds.some(o=>Fe(r.sessionId,o))).map(r=>r.sessionId));if(c[0])return c[0];const m=b(a.filter(r=>t.paths.some(o=>Ue(r.cwd,o))).map(r=>r.sessionId));if(m[0])return m[0];const h=b(a.filter(r=>t.projects.some(o=>Ve(r.project,o))).map(r=>r.sessionId));return h[0]?h[0]:t.paths[0]?t.paths[0]:t.sessionIds[0]?t.sessionIds[0]:t.projects[0]?t.projects[0]:t.query}function X(t,s){const a=new Map;for(const c of[...s,...t])a.set(c.id,c);return[...a.values()].sort((c,m)=>jt(c.ts,m.ts)).slice(0,wt)}function bt(t){return t==="tool-result"?"tool result":t}function kt(t){const s=t.replace(/\s+/g," ").trim();return s.length<=180?s:`${s.slice(0,177)}...`}const At={direct:"Conversation",channel:"Conversation",group_direct:"Conversation",thread:"Thread"},Ct=1800,Et=4800,We=2,Lt=120,Rt=650,Pt=1800;function me(t,s){try{return JSON.stringify(t)===JSON.stringify(s)?t:s}catch{return s}}function ze(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.split(/[\\/]/).filter(Boolean).at(-1)??s:null}function $t(t){if(!t)return null;const s=t.replace(/[\\/]+$/,"");return s?s.replace(/^\/Users\/[^/]+(?=\/|$)/,"~"):null}function z(t){switch(t){case"queued":return"Queued";case"waking":return"Waking";case"waiting":return"Thinking";case"running":return"Working";default:return t.replace(/_/g," ")}}function Ms(){const{route:t,agents:s,navigate:a,apiConnection:c,reload:m}=ct(),h=Nt(t),r=t.view==="conversation"||t.view==="messages"?t.conversationId??null:null,[o,U]=i.useState(null),[E,ve]=i.useState([]),[G,xe]=i.useState(null),[He,F]=i.useState(!1),V=i.useCallback(async()=>{if(!r){U(null),ve([]),xe(null),F(!0);return}try{const[n,l,f]=await Promise.all([B(`/api/session/${encodeURIComponent(r)}`).catch(()=>null),B(`/api/flights?conversationId=${encodeURIComponent(r)}`).catch(()=>[]),B(`/api/messages?conversationId=${encodeURIComponent(r)}&limit=8`).catch(()=>[])]);U(p=>me(p,n)),ve(p=>me(p,l??[])),xe(p=>me(p,f?.filter(_=>!mt(_)).sort((_,it)=>gt(_.createdAt,it.createdAt)).at(-1)??null)),F(!0)}catch{F(!0)}},[r]);i.useEffect(()=>{F(!1),V()},[V]);const j=o?.agentId??null,d=i.useMemo(()=>j?s.find(n=>n.id===j)??null:null,[s,j]),H=d?.id??null,fe=pt(o),ee=ht({resolvedAgentId:H,sessionId:fe,machineId:h}),[je,ge]=i.useState(null),[L,te]=i.useState([]),[w,se]=i.useState([]),Ne=i.useRef([]),S=i.useRef(null),O=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),R=i.useRef(new Set),q=i.useCallback(()=>{S.current!==null&&(window.clearTimeout(S.current),S.current=null),O.current=null},[]),P=i.useCallback(()=>{if(!r)return;const n=Date.now(),l=O.current??n;O.current=l;const p=n-l>=Et?0:Ct;S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{S.current=null,O.current=null,V()},p)},[r,V]);i.useEffect(()=>q,[q]),i.useEffect(()=>{if(ge(null),!H)return;let n=!1;return B(`/api/agents/${encodeURIComponent(H)}/session-catalog`).then(l=>{n||ge(l)}).catch(()=>{}),()=>{n=!0}},[H]);const Oe=vt({name:d?.name,agentName:o?.agentName,id:j,title:o?.title}),ye=d?xt(d)??Be(d.id)??d.id:j?Be(j)??j:null,u=i.useMemo(()=>E.filter(ft).sort((n,l)=>(l.startedAt??0)-(n.startedAt??0))[0]??null,[E]);i.useEffect(()=>{R.current=new Set(E.map(n=>n.invocationId))},[E]),i.useEffect(()=>{q(),R.current.clear()},[q,r]),rt(n=>{if(r){if(n.kind==="message.posted"){n.payload?.message?.conversationId===r&&P();return}if(n.kind==="conversation.upserted"){n.payload?.conversation?.id===r&&P();return}if(n.kind==="invocation.requested"){const l=n.payload?.invocation;if(l?.conversationId===r){R.current.add(l.id),P();return}!l?.conversationId&&j&&l?.targetAgentId===j&&(R.current.add(l.id),P());return}if(n.kind==="flight.updated"){const l=n.payload?.flight;if(!l)return;(u?.id===l.id||u?.invocationId===l.invocationId||R.current.has(l.invocationId)||E.some(p=>p.id===l.id||p.invocationId===l.invocationId))&&P()}}});const v=je?.activeSessionId??d?.harnessSessionId??fe??o?.harnessSessionId??null,I=d?.harnessSessionId??o?.harnessSessionId??null,k=d?.harnessLogPath??null,y=i.useMemo(()=>St({activeSessionId:v,agent:d,sessionMeta:o}),[v,d,o]),ne=JSON.stringify({sessionIds:y.sessionIds,paths:y.paths,projects:y.projects}),$=y.sessionIds.length>0||y.paths.length>0||y.projects.length>0,D=i.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),N.current!==null&&(window.clearInterval(N.current),N.current=null),x.current=[]},[]),K=i.useCallback(()=>{D()},[D]),Ie=i.useCallback(()=>{if(N.current!==null||(g.current!==null&&(window.clearTimeout(g.current),g.current=null),x.current.length===0))return;const l=()=>{const f=x.current.slice(0,We);x.current=x.current.slice(We),f.length>0&&se(p=>X(p,f)),!(x.current.length>0)&&N.current!==null&&(window.clearInterval(N.current),N.current=null)};l(),x.current.length>0&&(N.current=window.setInterval(l,Lt))},[]),we=i.useCallback(n=>{N.current===null&&g.current===null&&(g.current=window.setTimeout(()=>{g.current=null,Ie()},n))},[Ie]);i.useEffect(()=>{Ne.current=w},[w]),i.useEffect(()=>D,[D]),i.useEffect(()=>{K(),te([]),se([])},[K,ne]),i.useEffect(()=>{if(!$)return;let n=!1;const l=new URLSearchParams({limit:"180",transcripts:"true"});return B(`/api/tail/recent?${l.toString()}`).then(f=>{if(n)return;const p=(f.events??[]).filter(_=>he(_,y));te(X([],p))}).catch(()=>{}),()=>{n=!0}},[$,ne]),lt(i.useCallback(n=>{$&&he(n,y)&&te(l=>X(l,[n]))},[$,ne])),i.useEffect(()=>{if(L.length===0){K(),se([]);return}const n=Ne.current,l=new Set([...n.map(p=>p.id),...x.current.map(p=>p.id)]),f=L.filter(p=>!l.has(p.id));f.length!==0&&(x.current=X(x.current,f),x.current.length>0&&we(n.length===0?Rt:Pt))},[we,K,L]);const ae=i.useMemo(()=>w.flatMap(Bt).slice(0,5),[w]);if(!r)return e.jsx(Mt,{apiOffline:c.status==="offline",onRetry:()=>{m()}});if(!He)return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsx("div",{className:"ctx-panel-empty-hint",children:"Loading conversation…"})})});const qe=o?.kind?At[o.kind]??o.kind:"Conversation",J=o?.workspaceRoot??null,ie=ze(J),Q=$t(J),Se=o?.currentBranch??null,ce=d?.harness??o?.harness??null,Y=o?.lastMessageAt??G?.createdAt??null,Te=o?.messageCount??null,be=o?o.participantIds.filter(n=>n!=="operator").length+1:null,A=d?.state??null,De=ot(A),ke=G?.body?.trim()||o?.preview?.trim()||null,Ae=G?.actorName??null,Ce=ue(v),M=v??I,Ee=ue(M),Ke=ue(I),Le=!!(I&&I!==M),Re=[ce,d?.transport].filter(Boolean).join(" · "),Je=!!(v||I||k),T=!!(d?.terminalSurface?.backend==="tmux"||d?.transport==="tmux"&&d.harnessSessionId),C=!!(u||dt(A,d)),Qe=C?u?z(u.state):"In motion":"At rest",Ye=u?.summary?.trim()??(Y?`Last update ${W(Y)??"recently"}`:"No recent activity recorded"),re=[Se?`branch ${Se}`:null,ce,d?.transport].filter(Boolean),Ze=!!(ie||Q||re.length>0),Xe=C?"Live activity":T?"Terminal":"Activity",le=u?.summary?.trim()??(v&&!T?"Terminal session is live.":w.length>0&&!T?"Streaming matching Tail events.":null),Z=Tt(y,L),Ge=!!(d&&(u||v||L.length>0||T)),et=!T,tt=v?T?"Terminal session":"Trace session":u?"Session starting":"Session context",st=v?Ee??v:u?z(u.state):"Waiting for a session id",Pe=v?[ce,d?.transport,u?z(u.state):null].filter(Boolean).join(" · "):u?.summary?.trim()??le??null,nt=()=>{ee&&$e(a,ee,{returnTo:t})},at=()=>{$e(a,{view:"ops",mode:"tail",...Z?{tailQuery:Z}:{}},{returnTo:t})};return e.jsxs("div",{className:"ctx-panel ctx-panel--conversation",children:[e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-summary",children:[e.jsx("div",{className:"ctx-panel-section-label",children:qe}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:Oe}),ye&&e.jsxs("div",{className:"ctx-panel-conversation-handle",children:["@",ye]}),e.jsxs("div",{className:"ctx-panel-conversation-state",children:[e.jsx("span",{className:"ctx-panel-conversation-state-dot",style:{background:Me(A)}}),e.jsx("span",{children:_e(A)})]})]})]}),u&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Now"}),e.jsxs("div",{className:"ctx-panel-conversation-flight",children:[e.jsxs("div",{className:"ctx-panel-conversation-flight-row",children:[e.jsx("span",{className:"ctx-panel-conversation-flight-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-conversation-flight-time",children:W(u.startedAt)})]}),u.summary&&e.jsx("div",{className:"ctx-panel-conversation-flight-summary",children:u.summary})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Workspace"}),Ze?e.jsxs("div",{className:"ctx-panel-workspace-card",children:[e.jsxs("div",{className:"ctx-panel-workspace-head",children:[e.jsx("div",{className:"ctx-panel-workspace-kicker",children:"Project"}),e.jsx("div",{className:"ctx-panel-workspace-title",title:J??ie??void 0,children:ie??"Unscoped workspace"})]}),Q&&e.jsx("div",{className:"ctx-panel-workspace-path",title:J??Q,children:Q}),re.length>0&&e.jsx("div",{className:"ctx-panel-workspace-strip",children:re.map(n=>e.jsx("span",{className:"ctx-panel-workspace-chip",children:n},n))})]}):e.jsx("div",{className:"ctx-panel-empty",children:"No workspace metadata yet"})]}),Je&&e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Session"}),e.jsxs("div",{className:"ctx-panel-session-card",children:[e.jsx("div",{className:"ctx-panel-session-head",children:e.jsxs("div",{className:"ctx-panel-session-primary",children:[Re&&e.jsx("div",{className:"ctx-panel-session-kind",children:Re}),M&&e.jsx("div",{className:"ctx-panel-session-id",title:M,children:Ee??M})]})}),(Le||k)&&e.jsxs("div",{className:"ctx-panel-session-meta",children:[Le&&I&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness session"}),e.jsx("strong",{title:I,children:Ke??I})]}),k&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness log"}),e.jsx("strong",{title:k,children:ze(k)??k})]})]})]})]}),e.jsxs("section",{className:"ctx-panel-section",children:[e.jsx("div",{className:"ctx-panel-section-label",children:"Activity"}),e.jsxs("div",{className:`ctx-panel-activity-card${C?" ctx-panel-activity-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-activity-head",children:[e.jsx("span",{className:"ctx-panel-activity-dot",style:{background:C?"var(--green)":Me(A)}}),e.jsxs("div",{className:"ctx-panel-activity-main",children:[e.jsx("div",{className:"ctx-panel-activity-title",children:Qe}),e.jsx("div",{className:"ctx-panel-activity-sub",title:Y?oe(Y):void 0,children:Ye})]})]}),u&&e.jsxs("div",{className:"ctx-panel-activity-ledger",children:[e.jsx("span",{className:"ctx-panel-activity-ledger-label",children:z(u.state)}),u.startedAt&&e.jsx("span",{className:"ctx-panel-activity-ledger-time",title:oe(u.startedAt),children:W(u.startedAt)})]}),e.jsxs("div",{className:"ctx-panel-activity-facts",children:[typeof Te=="number"&&e.jsx(pe,{label:"Messages",value:`${Te}`}),typeof be=="number"&&e.jsx(pe,{label:"People",value:`${be}`}),De&&e.jsx(pe,{label:"Agent",value:_e(A)})]})]})]}),ke&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-preview",children:[e.jsx("div",{className:"ctx-panel-section-label",children:Ae?`Latest · ${Ae}`:"Latest"}),e.jsx("div",{className:"ctx-panel-conversation-preview-body",children:ke})]}),Ge&&d&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-live-section",children:[e.jsxs("div",{className:"ctx-panel-section-label",children:[e.jsx("span",{children:Xe}),Ce&&e.jsx("span",{className:"ctx-panel-live-session",title:v??void 0,children:Ce})]}),e.jsxs("div",{className:`ctx-panel-live-card${C?" ctx-panel-live-card--active":""}`,children:[e.jsxs("div",{className:`ctx-panel-live-session-card${C?" ctx-panel-live-session-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-live-session-copy",children:[e.jsx("span",{children:tt}),e.jsx("strong",{title:v??void 0,children:st}),Pe&&e.jsx("small",{children:Pe})]}),e.jsx("div",{className:"ctx-panel-live-session-pulse","aria-hidden":"true",children:e.jsx("span",{})})]}),e.jsx(ut,{agent:d,catalog:je,navigate:a,returnTo:t,variant:"compact",className:"ctx-panel-live-actions"}),le&&e.jsx("div",{className:"ctx-panel-live-summary",children:le}),T&&e.jsx(yt,{agentId:d.id,lines:24,columns:132,className:"ctx-panel-tmux-peek--conversation"}),ae.length>0&&e.jsxs("div",{className:"ctx-panel-live-files","aria-live":"polite",children:[e.jsxs("div",{className:"ctx-panel-live-files-label",children:[e.jsx("span",{children:"Files"}),e.jsx("strong",{children:ae.length})]}),e.jsx("ol",{className:"ctx-panel-live-file-list",children:ae.map(n=>e.jsxs("li",{className:`ctx-panel-live-file ctx-panel-live-file--${n.tone}`,title:`${n.path} · ${n.verb}`,children:[e.jsx("span",{className:"ctx-panel-live-file-mark",children:n.mark}),e.jsx("span",{className:"ctx-panel-live-file-path",children:Ft(n.path)}),e.jsx("span",{className:"ctx-panel-live-file-time",children:W(n.ts)})]},`${n.eventId}:${n.path}`))})]}),et&&e.jsx("div",{className:"ctx-panel-live-stream","aria-live":"polite",children:w.length>0?e.jsx("ol",{className:"ctx-panel-live-events",children:w.map(n=>e.jsxs("li",{className:"ctx-panel-live-event",children:[e.jsx("span",{className:"ctx-panel-live-event-kind",children:bt(n.kind)}),e.jsx("span",{className:"ctx-panel-live-event-summary",children:kt(n.summary)}),e.jsx("span",{className:"ctx-panel-live-event-time",title:oe(n.ts),children:W(n.ts)})]},n.id))}):e.jsx("div",{className:"ctx-panel-live-stream-empty",children:"Waiting for matching Tail events"})}),$&&e.jsxs("button",{type:"button",className:"ctx-panel-live-tail-button",onClick:at,title:Z?`Tail filter: ${Z}`:"Open Tail",children:[e.jsx(It,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Tail"})]})]})]}),ee&&e.jsx("section",{className:"ctx-panel-section ctx-panel-conversation-profile-section",children:e.jsxs("button",{type:"button",className:"ctx-panel-roster-button ctx-panel-conversation-profile-button",onClick:nt,children:[e.jsx("span",{className:"ctx-panel-roster-label",children:d?"Open agent profile":"Open session trace"}),e.jsx("span",{className:"ctx-panel-roster-count",children:e.jsx("span",{children:"→"})})]})})]})}function Mt({apiOffline:t,onRetry:s}){return e.jsx("div",{className:"ctx-panel ctx-panel--conversation",children:e.jsx("div",{className:"ctx-panel-empty-state",children:e.jsxs("div",{className:"ctx-panel-empty-card","data-tone":t?"error":"neutral",children:[e.jsx("div",{className:"ctx-panel-empty-card-title",children:t?"Context unavailable":"No conversation selected"}),e.jsx("div",{className:"ctx-panel-empty-card-detail",children:t?"Scout context will load after the server reconnects.":"Select a chat to inspect participants, sessions, and recent activity."}),t&&e.jsx("button",{type:"button",className:"ctx-panel-empty-card-action",onClick:s,children:"Retry"})]})})})}function pe({label:t,value:s}){return e.jsxs("div",{className:"ctx-panel-fact",children:[e.jsx("span",{className:"ctx-panel-fact-value",children:s}),e.jsx("span",{className:"ctx-panel-fact-label",children:t})]})}const _t=/(?:["'`])?((?:~|\/|\.{1,2}\/|[A-Za-z0-9_.-]+\/)[^\s"'`),;]+?\.(?:ts|tsx|js|jsx|mjs|cjs|css|scss|swift|md|json|jsonc|yml|yaml|toml|sql|py|rs|go|sh|html|m|mm))(?:["'`])?/gi;function Bt(t){const s=new Set,a=[],c=Wt(t.summary);for(const m of t.summary.matchAll(_t)){const h=m[1]?.trim();if(!h)continue;const r=h.toLowerCase();s.has(r)||(s.add(r),a.push({eventId:t.id,path:h,verb:c,mark:Ut(c),tone:zt(c),ts:t.ts}))}return a}function Wt(t){return/\b(created|create|wrote|write|edited|edit|modified|modify|updated|update|changed|change|patched|patch)\b/i.test(t)?"changed":/\b(read|opened|viewed|cat|sed)\b/i.test(t)?"read":"touched"}function zt(t){return t==="changed"?"changed":t==="read"?"read":"touched"}function Ut(t){return t==="changed"?"+":t==="read"?"r":"·"}function Ft(t){const s=t.replace(/[\\/]+$/g,""),a=s.split(/[\\/]/).filter(Boolean);return a.length<=2?s:`${a.at(-2)}/${a.at(-1)}`}export{Ms as ConversationInspector};
@@ -1 +0,0 @@
1
- import{r as u,j as e}from"./index-NRbRrZw-.js";import{u as j}from"./Provider-Cd-QZltN.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-DEHEgJ9m.js";import{u as w}from"./sse-QSbhyq9A.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-Jh540uf3.js";import{C as I}from"./chevron-right-CV7sEVBS.js";import{M as C}from"./message-square-DURSOrUr.js";import"./provider-Bq0ScH3v.js";import"./router-Bx1tiwVe.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-D4dHTRkt.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D4vuKzOL.js";import"./DocumentFocusViewer-CetjnYut.js";import"./createLucideIcon-Da0lq809.js";import"./TextDocumentSurface-B29xZNlI.js";import"./file-text-BGVkHS4_.js";import"./x-DuzAbpk5.js";import"./code-xml-CPzpZkhu.js";import"./arrow-left-B0CdJdAC.js";import"./arrow-right-YRBoTTyf.js";import"./scout-voice-BT3gYDhU.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-feLCB3Zm.js";import"./NewChatComposer-BPsg8shF.js";import"./text-B2UZi3l9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Be0T8xv2.js";import"./conversation-model-CIzM7aXT.js";import"./index-CD2foMB8.js";import"./HarnessMark-CEzmPFHC.js";import"./NewChatOrigin-CCiPg_WR.js";import"./search-HmdKXdtR.js";import"./chunk-HRAB3GC3-BYQZ1LOn.js";import"./index-BWHgHrtv.js";const M=5;function ve(){const{route:t,navigate:s}=j(),a=t.view==="work"?t.workId:null,[r,o]=u.useState(null),i=u.useCallback(async()=>{if(!a){o(null);return}try{o(await N(`/api/work/${encodeURIComponent(a)}`))}catch{o(null)}},[a]);if(u.useEffect(()=>{i()},[i]),w(()=>{a&&i()}),t.view!=="work")return null;if(!r)return e.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-ghost)]",children:"Loading work item…"});const d=O(r.state),m=T(r.attention),f=r.ownerName??r.ownerId??"Unassigned",l=r.nextMoveOwnerName??r.nextMoveOwnerId??null,h=l!==null&&(r.ownerId??null)!==(r.nextMoveOwnerId??null)&&l!==f,k=1+(h?1:0)+(r.priority?1:0)+2+(r.parentId?1:0)+(r.conversationId?1:0);return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar text-sm",children:[e.jsx("div",{className:"sticky top-0 z-10 border-b border-[var(--scout-chrome-border-soft)] bg-black/55 px-4 py-2 backdrop-blur",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),e.jsx("span",{className:`font-mono text-xs uppercase tracking-[0.15em] ${d.text}`,children:L(r.state)}),e.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:f}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"px-1 text-[var(--scout-chrome-ink-ghost)]",children:"→"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:l})]})]}),m&&e.jsx("span",{className:"shrink-0 rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-amber-300/90",children:m})]})}),e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsxs(c,{label:"Case facts",children:[e.jsx(n,{label:"Phase",value:r.currentPhase}),e.jsx(n,{label:"Acceptance",value:r.acceptanceState.replace(/_/g," ")}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority})]}),e.jsx(c,{label:"Timeline",children:r.timeline.length===0?e.jsx("div",{className:"text-xs text-[var(--scout-chrome-ink-faint)]",children:"No activity yet."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:r.timeline.slice(0,M).map(x=>e.jsx(W,{item:x,onOpen:x.conversationId?()=>b(s,{view:"conversation",conversationId:x.conversationId},{returnTo:t}):void 0},x.id))})}),e.jsxs(c,{label:"Routing",collapsible:!0,defaultOpen:!1,count:k,children:[e.jsx(n,{label:"Owner",value:f}),h&&l&&e.jsx(n,{label:"Next move",value:l}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority}),e.jsx(n,{label:"Children",value:`${r.activeChildWorkCount}`}),e.jsx(n,{label:"Flights",value:`${r.activeFlightCount}`}),r.lastMeaningfulAt&&e.jsx(n,{label:"Last update",value:g(r.lastMeaningfulAt)}),(r.conversationId||r.parentId)&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.conversationId&&e.jsx(v,{label:"Open thread",onClick:()=>b(s,{view:"conversation",conversationId:r.conversationId},{returnTo:t})}),r.parentId&&r.parentTitle&&e.jsx(v,{label:r.parentTitle,eyebrow:"Parent",onClick:()=>b(s,{view:"work",workId:r.parentId},{returnTo:t})})]})]}),e.jsxs(c,{label:"Record",collapsible:!0,defaultOpen:!1,children:[e.jsx(n,{label:"Case ID",value:r.id}),e.jsx(n,{label:"Created",value:p(r.createdAt)}),e.jsx(n,{label:"Updated",value:p(r.updatedAt)}),e.jsx(n,{label:"Last activity",value:p(r.lastMeaningfulAt)})]}),r.lastMeaningfulSummary&&e.jsxs(c,{label:"Hudson context",collapsible:!0,defaultOpen:!1,children:[e.jsx("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:r.lastMeaningfulSummary}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Plan"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Docs"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Code"})]})]})]})]})}function L(t){switch(t){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return t.replace(/_/g," ")}}function T(t){switch(t){case"badge":return"Noteworthy";case"interrupt":return"Blocked";default:return null}}function O(t){return/complete|done|finished/i.test(t)?{dot:"bg-emerald-400",text:"text-emerald-300/90"}:/fail|error/i.test(t)?{dot:"bg-red-400",text:"text-red-300/90"}:/block|wait|pause/i.test(t)?{dot:"bg-amber-400",text:"text-amber-300/90"}:/active|working|in[_-]?progress/i.test(t)?{dot:"bg-cyan-400",text:"text-cyan-300/90"}:{dot:"bg-[var(--scout-chrome-ink-faint)]",text:"text-[var(--scout-chrome-ink)]"}}function c({label:t,children:s,collapsible:a=!1,defaultOpen:r=!0,count:o}){const[i,d]=u.useState(r);return a?e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("button",{type:"button",onClick:()=>d(m=>!m),className:"flex items-center gap-1.5 text-left text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]",children:[i?e.jsx(y,{"aria-hidden":"true",size:10,strokeWidth:2}):e.jsx(I,{"aria-hidden":"true",size:10,strokeWidth:2}),e.jsx("span",{children:t}),typeof o=="number"&&o>0&&e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0 font-mono text-3xs tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:o})]}),i&&e.jsx("div",{className:"mt-1.5",children:s})]}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),s]})}function v({label:t,eyebrow:s,onClick:a}){return e.jsxs("button",{type:"button",onClick:a,className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-white/[0.025] px-2 py-1.5 text-left hover:border-cyan-400/25 hover:bg-cyan-400/10",children:[e.jsxs("span",{className:"min-w-0",children:[s&&e.jsx("span",{className:"block font-mono text-2xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:s}),e.jsx("span",{className:"block truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:t})]}),e.jsx(C,{"aria-hidden":"true",size:11,strokeWidth:1.8,className:"shrink-0 text-cyan-300/75"})]})}function W({item:t,onOpen:s}){const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`mt-1 h-1.5 w-1.5 shrink-0 rounded-full ${A(t)}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(t.at)}),e.jsx("span",{className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:_(t)})]}),e.jsx("span",{className:"mt-0.5 block truncate text-xs font-semibold text-[var(--scout-chrome-ink-strong)]",children:t.actorName??"system"}),t.title&&e.jsx("span",{className:"mt-0.5 block truncate text-xs leading-snug text-[var(--scout-chrome-ink)]",children:t.title}),t.summary&&e.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:t.summary})]})]}),r="flex gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-1.5 first:border-t-0 first:pt-0",o=p(t.at);return s?e.jsx("button",{type:"button",onClick:s,title:o,className:`${r} text-left hover:text-cyan-300/90`,children:a}):e.jsx("div",{className:r,title:o,children:a})}function _(t){switch(t.kind){case"flight_started":return"flight started";case"flight_completed":return t.detailKind?`flight ${t.detailKind}`:"flight ended";case"message":return"message";default:return t.title??t.detailKind??"event"}}function A(t){return t.kind==="message"?"bg-cyan-400":t.kind==="flight_started"?"bg-lime-400":t.kind==="flight_completed"?t.detailKind?.includes("fail")?"bg-red-400":"bg-emerald-400":t.detailKind?.includes("interrupt")||t.detailKind?.includes("block")?"bg-amber-400":"bg-[var(--scout-chrome-ink-faint)]"}function n({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:s})]})}export{ve as WorkInspector};
@@ -1 +0,0 @@
1
- import{t as ie,v as Dn,w as je,x as Ne,k as Fn,y as On,s as k,l as g,z as xn,A as Z,B as jn,C as Nn,r as P}from"./index-NRbRrZw-.js";import{n as ce}from"./synthetic-agent-routing-aduMYO7P.js";import{o as Mn,q as Me,n as Bn,u as zn}from"./terminal-sessions-D4dHTRkt.js";const Be=["local","url","sharedConfig","env"];function Wn(e){const n=Kn(e),t=e.audienceIncludes??Gn(e.audienceOrder),s=new Set;function o(a){!e.warnOnUnknown||s.has(a)||(s.add(a),typeof console<"u"&&typeof console.warn=="function"&&console.warn(`[hudsonkit/flags] Unknown feature flag "${a}" resolved false.`))}const r=e.registry;function i(a){const u=r[a];if(!u)return o(a),{key:a,enabled:!1,value:!1,layer:"default",audience:n,reason:"unknown-flag"};const d=Hn(e.layers,a);return d?{key:a,enabled:d.value,value:d.value,layer:d.layer,audience:n,requiredTier:u.tier,reason:"override",definition:u}:u.defaultEnabled?u.tier&&!t(n,u.tier)?{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"audience-denied",definition:u}:{key:a,enabled:!0,value:!0,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}:{key:a,enabled:!1,value:!1,layer:"default",audience:n,requiredTier:u.tier,reason:"default",definition:u}}return{registry:e.registry,isEnabled:a=>i(String(a)).enabled,explain:a=>i(String(a)),all:()=>Object.keys(e.registry).sort().map(i),audience:()=>n}}function Kn(e){let n=e.audience.tier;for(const t of Be.slice().reverse()){const s=e.layers?.[t]?.audience;s&&(n=s)}return{...e.audience,tier:n}}function Gn(e){return(n,t)=>{if(n.tier===t)return!0;if(!e||e.length===0)return!1;const s=e.indexOf(n.tier),o=e.indexOf(t);return s<0||o<0?!1:s>=o}}function Hn(e,n){for(const t of Be){const s=Vn(e?.[t]?.flags?.[n]);if(s!==null)return{layer:t,value:s}}return null}function Vn(e){return e===!0||e==="on"?!0:e===!1||e==="off"?!1:null}function Yn(e){if(e===!0||e===!1)return e;if(typeof e=="number"){if(e===1)return!0;if(e===0)return!1}if(typeof e!="string")return;const n=e.trim().toLowerCase();if(["1","true","on","yes","enabled","enable"].includes(n))return!0;if(["0","false","off","no","disabled","disable"].includes(n))return!1;if(["default","null","unset","clear"].includes(n))return"default"}function qn(e,n={}){const t=n.paramPrefix??"ff.",s=n.audienceParam??"ffAudience",o=typeof e=="string"?new URL(e,"http://hudson.local"):e,r={};let i;for(const[a,u]of o.searchParams.entries()){if(a===s&&u.trim()&&(i=u.trim()),!a.startsWith(t))continue;const d=a.slice(t.length),f=Yn(u);d&&f!==void 0&&(r[d]=f)}return{flags:r,audience:i}}const D=1;function Qn(e){if(typeof window>"u")return{version:D};try{const n=window.localStorage?.getItem(e);return Xn(n)}catch{return{version:D}}}function _s(e,n){if(typeof window>"u")return;const t=ze(n),s=JSON.stringify(t);try{window.localStorage?.setItem(e,s)}catch{}Zn(e,s)}function Xn(e){if(!e)return{version:D};try{const n=JSON.parse(e);return!n||typeof n!="object"?{version:D}:ze(n)}catch{return{version:D}}}function ze(e){const n={version:D};if(e.audience&&(n.audience=e.audience),e.flags&&typeof e.flags=="object"){n.flags={};for(const[t,s]of Object.entries(e.flags))(s===!0||s===!1)&&(n.flags[t]=s);Object.keys(n.flags).length===0&&delete n.flags}return n}function Zn(e,n){if(!(typeof document>"u"))try{const t=encodeURIComponent(n);document.cookie=`${encodeURIComponent(e)}=${t}; Path=/; SameSite=Lax; Max-Age=31536000`}catch{}}const Jn=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal"],et=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.scoutbot","surface.workflows"];function Le(e,n){return Object.fromEntries(e.map(t=>[t,n]))}const We={label:"Surface · Scope",description:`Scope presentation on Scout infra — lean lanes/tail/sessions/agents at ${Dn}/*.`,defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","scope","observability"]},nt={...We,label:"Surface · Scope (legacy alias)",description:`Legacy alias for ${ie}. Prefer the primary flag; ${je} remains for old dev links.`},Us=ie;function tt(){return{audience:"everyone",flags:{"ops.control":!0,"ops.lanes":!0,...Le(Jn,!1),...Le(et,!1)}}}const Ke=["ffBundle","ffVariant","scoutBundle","scoutExperience","ab"],Ge=["ffGlobal","scoutGlobalBundle"],He=["ffPersist","persistBundle"],st=new Set(["no-ops","ffAudience",...Ke,...Ge,...He]);function ks(e){for(const n of[...e.searchParams.keys()])(st.has(n)||n.startsWith("ff."))&&e.searchParams.delete(n);return e}const ot=["everyone","internal","power"],rt="openscout.flags",J="openscout.flagBundle",at={tier:"power"},ye=["ops.control","ops.mesh","ops.runtime","ops.plans","ops.terminal","ops.lanes"],$e=["surface.search","surface.sessions","surface.briefings","surface.work","surface.activity","surface.follow","surface.mesh-ops","surface.scoutbot","surface.realtime-voice","surface.workflows"],it={"nav.sidebar":{label:"Nav · Sidebar",description:"Classic sidebar chrome (8 primary areas + icon rail). Default on since sco-083 soak; opt out with ?ff.nav.sidebar=off. Not included in max-pro.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["nav","chrome"]},"ops.control":{label:"Ops · Control",description:"Mission control, issues, and the Ops section shell.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops","nav"]},"ops.mesh":{label:"Ops · Mesh",description:"Mesh topology and peer status.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.runtime":{label:"Ops · Runtime",description:"Runtime / atop process telemetry.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.plans":{label:"Ops · Plans",description:"Plan documents and plan-mode review.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.terminal":{label:"Ops · Terminal",description:"Observe / takeover terminal sessions.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"ops.lanes":{label:"Ops · Agent Lanes",description:"One column per local agent — follow live harness work in power-user mode.",defaultEnabled:!0,tier:"power",owner:"scout-web",tags:["ops"]},"surface.search":{label:"Surface · Search",description:"Knowledge + indexer search as a top-level nav entry.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.sessions":{label:"Surface · Sessions",description:"Standalone top-level Sessions entry (still reachable under Agents).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","nav"]},"surface.briefings":{label:"Surface · Briefings",description:"Briefings list + detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.work":{label:"Surface · Work",description:"Work item detail.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.activity":{label:"Surface · Activity",description:"Activity stream.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.follow":{label:"Surface · Follow",description:"Follow view.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface"]},"surface.mesh-ops":{label:"Surface · Mesh Ops",description:"Mesh Ops — work-item triage over the mesh (hosts rail, item list, inspector).",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","ops"]},"surface.scoutbot":{label:"Surface · Scoutbot",description:"Scoutbot assistant — the inspector panel, the status-bar broadcast chip, and the Message-Scout command-palette actions.",defaultEnabled:!0,tier:"everyone",owner:"scout-web",tags:["surface","assistant"]},"surface.realtime-voice":{label:"Surface · Realtime voice",description:"Live WebRTC voice conversations with Scoutbot through OpenAI Realtime.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","assistant","voice"]},"surface.workflows":{label:"Surface · Workflows",description:"Observed harness families / workflow topology telemetry on the Agents directory. Off in the lean view — the directory is just the project-grouped agent board.",defaultEnabled:!1,tier:"everyone",owner:"scout-web",tags:["surface","observability"]},[ie]:We,[je]:nt},ct={a:"light-prod",control:"light-prod",light:"light-prod","light-prod":"light-prod",prod:"light-prod",production:"light-prod",b:"max-pro",max:"max-pro","max-pro":"max-pro",pro:"max-pro",treatment:"max-pro",...On},Ee=new Set(["clear","default","none","reset","unset"]);function K(e,n){return Object.fromEntries(e.map(t=>[t,n]))}function Ve(...e){const n={};for(const t of e)t.audience&&(n.audience=t.audience),t.flags&&Object.keys(t.flags).length>0&&(n.flags={...n.flags??{},...t.flags});return n}function ue(e){switch(e){case"light-prod":return{audience:"everyone",flags:{...K(ye,!1),...K($e,!1)}};case"max-pro":return{audience:"power",flags:{...K(ye,!0),...K($e,!0)}};case Fn:return tt()}}function O(e){return e?ct[e.trim().toLowerCase()]??null:null}function ee(e,n){for(const t of n){const s=e.get(t);if(s!==null)return s}return null}function Ye(e){const n=ee(e,Ke);return O(n)}function ut(e){const n=ee(e,Ge);if(n){const i=n.trim().toLowerCase();if(Ee.has(i))return{action:"clear"};const a=O(n);return a?{action:"set",bundle:a}:null}const t=ee(e,He);if(!t)return null;const s=t.trim().toLowerCase();if(Ee.has(s))return{action:"clear"};if(["0","false","no"].includes(s))return null;const o=O(t);if(o)return{action:"set",bundle:o};const r=Ye(e);return r?{action:"set",bundle:r}:null}function qe(){if(typeof window>"u")return null;try{return O(window.localStorage.getItem(J))}catch{return null}}function lt(e){if(!(typeof window>"u"))try{e.action==="clear"?window.localStorage.removeItem(J):window.localStorage.setItem(J,e.bundle)}catch{}}function Ts(){return qe()??O(Ne())??Xe}function Qe(){const e=qe();return e?ue(e):{}}const Xe="light-prod";function Ze(){const e=O(Ne())??Xe;return ue(e)}function dt(e){const n=ut(e);n&&lt(n)}function Je(e=new URLSearchParams(window.location.search)){const n=qn(window.location.href),t=Ye(e),s=t?ue(t):{},o={audience:n.audience??s.audience,flags:{...s.flags??{},...n.flags??{}}};return e.has("no-ops")&&(o.flags={...o.flags,"ops.control":!1}),o}function ft(){const e=Qn(rt);return{flags:e.flags,audience:e.audience??void 0}}function Ds(){if(typeof window>"u")return{};const e=new URLSearchParams(window.location.search);return dt(e),{sharedConfig:Ve(Ze(),Qe()),url:Je(e)}}function mt(e){const n=typeof window>"u"?{}:{sharedConfig:Ve(Ze(),Qe()),url:Je(),local:ft()};return Wn({registry:it,audience:at,audienceOrder:ot,layers:n,warnOnUnknown:!1}).isEnabled(e)}function en(){return mt("ops.control")}const ne={sm:408,md:512,lg:616},nn=240,tn=640,pt=24,sn="openscout:lane-deck:v1",gt=new Set(["web.ops","macos.lanes","hud.tail","web.embed"]),le=new Set(["sm","md","lg"]),on={"web.ops":{defaultLaneWidth:"lg",showAutoLanes:!0},"macos.lanes":{defaultLaneWidth:"md",showAutoLanes:!0},"hud.tail":{defaultLaneWidth:"sm",showAutoLanes:!0,defaultHorizon:"30m"},"web.embed":{defaultLaneWidth:"md",showAutoLanes:!0}},ht=on["web.ops"];function de(e){return rn(e)?on[e]:ht}const H={pinned_left:0,main:1,pinned_right:2};function rn(e){return gt.has(e)}function Fs(e=window.location.search,n=window.location.pathname){const t=new URLSearchParams(e),s=t.get("profile")?.trim().toLowerCase();if(s&&rn(s))return s;const o=t.get("embed")?.trim().toLowerCase();return o==="hud"?"hud.tail":o==="app"?"macos.lanes":n.includes("/lanes/embed")?"web.embed":(n.includes("/ops/lanes"),"web.ops")}function Os(e=window.location.search){const n=new URLSearchParams(e),t=(n.get("lanes")??n.get("size"))?.trim().toLowerCase();return t&&le.has(t)?t:"lg"}function xs(e,n){if(typeof e=="number"&&Number.isFinite(e))return Math.min(tn,Math.max(nn,Math.round(e)));const t=typeof e=="string"&&le.has(e)?e:n;return ne[t]}function js(e){const n=Math.min(tn,Math.max(nn,Math.round(e)));let t=null,s=Number.POSITIVE_INFINITY;for(const[o,r]of Object.entries(ne)){const i=Math.abs(r-n);i<s&&(s=i,t=o)}return t&&s<=pt?{px:ne[t],tier:t}:{px:n,tier:null}}function fe(e,n,t){return{version:1,profileId:e,defaultLaneWidth:n??t.defaultLaneWidth,defaultHorizon:t.defaultHorizon,laneWidths:{},laneDefs:[],slots:[],showAutoLanes:t.showAutoLanes,updatedAt:Date.now()}}function Re(e,n){const t=de(e);return fe(e,n,t)}function te(e){if(typeof e=="number"&&Number.isFinite(e)||typeof e=="string"&&le.has(e))return e}function wt(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||n.kind!=="session"&&n.kind!=="harness"&&n.kind!=="project"&&n.kind!=="attention"||typeof n.title!="string"||!n.title.trim()?null:{id:n.id.trim(),kind:n.kind,title:n.title.trim(),sessionId:typeof n.sessionId=="string"?n.sessionId.trim():void 0,harness:typeof n.harness=="string"?n.harness.trim():void 0,projectPath:typeof n.projectPath=="string"?n.projectPath.trim():void 0}}function It(e){if(!e||typeof e!="object")return null;const n=e;return typeof n.id!="string"||!n.id.trim()||typeof n.laneDefId!="string"||!n.laneDefId.trim()||n.zone!=="pinned_left"&&n.zone!=="main"&&n.zone!=="pinned_right"||typeof n.position!="number"||!Number.isFinite(n.position)?null:{id:n.id.trim(),laneDefId:n.laneDefId.trim(),zone:n.zone,position:n.position,width:te(n.width)}}function an(e,n,t,s){if(!e||typeof e!="object")return fe(n,t,s);const o=e,r=Array.isArray(o.laneDefs)?o.laneDefs.map(wt).filter(d=>d!==null):[],i=Array.isArray(o.slots)?o.slots.map(It).filter(d=>d!==null):[],a={};if(o.laneWidths&&typeof o.laneWidths=="object")for(const[d,f]of Object.entries(o.laneWidths)){const L=te(f);L!==void 0&&(a[d]=L)}const u=te(o.defaultLaneWidth);return{version:1,profileId:n,defaultLaneWidth:(typeof u=="string"?u:void 0)??t??s.defaultLaneWidth,defaultHorizon:typeof o.defaultHorizon=="string"?o.defaultHorizon:s.defaultHorizon,laneWidths:a,laneDefs:r,slots:i,showAutoLanes:typeof o.showAutoLanes=="boolean"?o.showAutoLanes:s.showAutoLanes,updatedAt:typeof o.updatedAt=="number"?o.updatedAt:Date.now()}}function vt(e,n,t){return an(e,n,t,de(n))}function Ns(e,n){const t=de(e),s=n??t.defaultLaneWidth;try{const o=localStorage.getItem(`${sn}:${e}`);return o?vt(JSON.parse(o),e,s):Re(e,s)}catch{return Re(e,s)}}function St(e){try{localStorage.setItem(`${sn}:${e.profileId}`,JSON.stringify({...e,updatedAt:Date.now()}))}catch{}}function Ms(e){return[...e].sort((n,t)=>{const s=H[n.zone]-H[t.zone];return s!==0?s:n.position-t.position})}function Bs(e,n){return H[e]-H[n]}function cn(){return`slot:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,8)}`}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Y(e){return`session:${e}`}function bt(e){return`harness:${me(e)}`}function Lt(e){return`project:${me(e)}`}const yt="attention:needs-input";function un(e,n){const t=e.filter(s=>s.zone===n);return t.length===0?0:Math.max(...t.map(s=>s.position))+1}function ln(e,n){const t=e.laneDefs.some(s=>s.id===n.id);return{...e,laneDefs:t?e.laneDefs.map(s=>s.id===n.id?n:s):[...e.laneDefs,n]}}function dn(e,n){const t=e.slots.some(s=>s.id===n.id);return{...e,slots:t?e.slots.map(s=>s.id===n.id?n:s):[...e.slots,n]}}function fn(e,n){return{...e,slots:e.slots.filter(t=>t.laneDefId!==n)}}function $t(e,n){const t=Y(n);return{...fn(e,t),laneDefs:e.laneDefs.filter(s=>s.id!==t)}}function zs(e,n){const t=Y(n);return e.slots.some(s=>s.laneDefId===t&&s.zone!=="main")}function Ws(e,n){const t=Y(n),s=e.slots.find(o=>o.laneDefId===t);return!s||s.zone==="main"?null:s.zone}function Ks(e,n){const t=n.zone??"pinned_left",s=Y(n.laneId),o=$t(e,n.laneId),r=ln(o,{id:s,kind:"session",title:n.title,sessionId:n.laneId});return dn(r,{id:cn(),laneDefId:s,zone:t,position:un(r.slots,t),width:n.width})}function Gs(e,n){const t=n.zone??"pinned_left",s=n.kind==="attention"?yt:n.kind==="harness"&&n.harness?bt(n.harness):n.kind==="project"&&n.projectPath?Lt(n.projectPath):`${n.kind}:${me(n.title)}`,o=fn(e,s),r=ln(o,{id:s,kind:n.kind,title:n.title,harness:n.harness,projectPath:n.projectPath});return dn(r,{id:cn(),laneDefId:s,zone:t,position:un(r.slots,t),width:n.width})}function Hs(e,n,t){return{...e,laneWidths:{...e.laneWidths,[n]:t},updatedAt:Date.now()}}function Vs(e,n){return{...e,defaultLaneWidth:n,updatedAt:Date.now()}}function Ys(e){const n=new Set(e.slots.filter(t=>t.zone!=="main").map(t=>t.laneDefId));return{...e,slots:e.slots.filter(t=>t.zone==="main"),laneDefs:e.laneDefs.filter(t=>!n.has(t.id))}}const V="scope.lanes",se={defaultLaneWidth:"md",showAutoLanes:!0,defaultHorizon:"30m"},Et="openscout:lane-deck:v1";function Pe(e){return fe(V,e,se)}function qs(e){const n=e??se.defaultLaneWidth;try{const t=localStorage.getItem(`${Et}:${V}`);return t?an(JSON.parse(t),V,n,se):Pe(n)}catch{return Pe(n)}}function Qs(e){St(e)}const Rt=[g.lanes,g.tail,g.sessions,g.agents];function Pt(e){return Rt.includes(e)}function Ct(e){return e===jn||e===Nn}function mn(e){return xn(e)}function q(e,n={}){switch(e){case g.tail:{const t=new URLSearchParams;n.tailQuery&&t.set("q",n.tailQuery);const s=t.toString();return k(e,s?`?${s}`:"")}case g.sessions:return n.sessionId?k(e,`/${encodeURIComponent(n.sessionId)}`):k(e);case g.lanes:return k(Z);case g.agents:return k(e);default:return k(Z)}}function pn(e){switch(e.view){case"ops":return!e.mode||e.mode==="lanes"?g.lanes:e.mode==="tail"?g.tail:null;case"sessions":return e.agentId?null:g.sessions;case"agents-v2":return e.agentId||e.projectSlug||e.sessionId||e.conversationId?null:g.agents;default:return null}}function At(e){const n=pn(e);return n?n===g.tail&&e.view==="ops"?q(n,{tailQuery:e.tailQuery}):n===g.sessions&&e.view==="sessions"?q(n,{sessionId:e.sessionId}):q(n):null}function _t(e,n,t){if(!Ct(e[0]))return null;const s=e[1]??Z;if(!Pt(s))return{view:"ops",mode:"lanes"};switch(s){case g.tail:{const o=n.searchParams.get("q")?.trim();return{view:"ops",mode:"tail",...o?{tailQuery:o}:{}}}case g.sessions:return e[2]?t({view:"sessions",sessionId:decodeURIComponent(e[2])}):t({view:"sessions"});case g.agents:return t({view:"agents-v2"});case g.lanes:default:return{view:"ops",mode:"lanes"}}}const Ut=new Set(["no-ops","ffBundle","ffVariant","scoutBundle","scoutExperience","ab","ffGlobal","scoutGlobalBundle","ffPersist","persistBundle","ffAudience","studio","studioInjection","studioMode"]),kt=["ff.","studio.","studioMode."];function Tt(e){return Ut.has(e)||kt.some(n=>e.startsWith(n))}function gn(e,n=""){const t=new URL(e,"http://scout.local");new URLSearchParams(n).forEach((r,i)=>{Tt(i)&&(t.searchParams.has(i)||t.searchParams.set(i,r))});const o=t.searchParams.toString();return`${t.pathname}${o?`?${o}`:""}`}function Xs(e){switch(e){case g.tail:return{view:"ops",mode:"tail"};case g.sessions:return{view:"sessions"};case g.agents:return{view:"agents-v2"};case g.lanes:default:return{view:"ops",mode:"lanes"}}}function Dt(e=typeof window<"u"?window.location.pathname:""){return mn(e)}function Zs(){return V}function Js(e=Dt()){return e?{"data-scope-presentation":!0}:void 0}function hn(e,n=typeof window<"u"?window.location.pathname:""){return mn(n)?At(e):null}function Ft(e,n=typeof window<"u"?window.location.pathname:""){return hn(e,n)!==null}function eo(e,n=typeof window<"u"?window.location.pathname:""){return Ft(e,n)?pn(e):null}const no={days:3,sessionLimit:200,hitLimit:60,debounceMs:180};function oe(e){return e.root==="HOME"?`~/${e.relPath}`:e.root==="ABSOLUTE"?e.relPath:`$${e.root}/${e.relPath}`}function Ce(e){const n=e?.trim();if(!n)return null;const t=n.replace(/[\\/]+$/,""),s=t.split(/[\\/]/).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function _(e){return e.sourceRefs.find(n=>n.kind==="harness_transcript")??null}function wn(e){return e.sourceRefs.find(n=>n.kind==="file")??null}function pe(e){return e?Ce(e.sessionId)??Ce(oe(e.path)):null}function to(e){const n=pe(e);if(!n)return null;const t=e?.recordRange;return t?`${n}|records ${t[0]}..${t[1]}`:n}function B(e,n){const t=e.facets[n];return Array.isArray(t)?t.filter(Boolean).join(", "):typeof t=="string"?t:""}function N(e){const n=new Set;return e.split(/[^A-Za-z0-9_./-]+/u).map(t=>t.trim()).filter(t=>t.length>1).filter(t=>{const s=t.toLowerCase();return n.has(s)?!1:(n.add(s),!0)}).slice(0,12)}const Ot=/^(events?\s+window(\s+\d+)?|files?\s+touched|tool\s+calls?|indexed\s+snippet|manifest|summary|decisions?|context\s+pack)\b/iu,Ae=/^(claude|codex|kimi|cursor|gpt|gemini)\b/iu,_e=/^(?:claude|codex|kimi|cursor|gpt|gemini)?\s*[a-z0-9._/-]*\s*(?:jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:am|pm)?)?\s*[-–—:]\s*/iu;function In(e){return Ot.test(e.replace(/\s+/g," ").trim())}function xt(e){let n=e.replace(/\s+/g," ").trim();if(!n)return"";if(n=n.replace(/<[^>\n]+>/g," ").replace(/\s+/g," ").trim(),_e.test(n))n=n.replace(_e,"").trim();else{const t=n.match(/^(.{6,72}?)\s[-–—]\s+(.+)$/u);if(t){const s=t[1]??"",o=t[2]??"";(Ae.test(s)||/\b(?:am|pm|\d{1,2}:\d{2}|plugin|session|openscout)\b/iu.test(s))&&(n=o.trim())}}return n=n.replace(Ae,"").replace(/^\s*[-–—:]\s*/,"").trim(),n=n.replace(/\s{2,}/g," ").trim(),n.length>72&&(n=`${n.slice(0,69).replace(/\s+\S*$/u,"").trimEnd()}…`),n}function jt(e){const n=B(e,"project"),t=e.title.replace(/\s+/g," ").trim();if(t&&!In(t)){const o=xt(t);if(o&&o.toLowerCase()!==n.toLowerCase()||o)return o}if(n)return n;const s=pe(_(e));return s?s.length>18?`${s.slice(0,16)}…`:s:"Session match"}function vn(e){const n=M(e,"recordKind",8).map(s=>s.toLowerCase());if(n.length===0&&n.push(...M(e,"recordTag",8).map(s=>s.toLowerCase())),n.some(s=>s.includes("assistant")))return"assistant";if(n.some(s=>s.includes("user")))return"user";if(n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response")))return"tool";const t=he(e);return t==="tool activity"?"tool":t==="overview"?"overview":""}function so(e,n){const t=we(e.snippet,n),s=vn(e),o=ge(e);let r="";if(t){const i=N(n).map(d=>d.toLowerCase()),a=t.split(new RegExp("(?<=[.!?])\\s+|\\s+[–—]\\s+|\\s+·\\s+","u")).map(d=>d.replace(/^…+|…+$/gu,"").trim()).filter(d=>d.length>12);r=((i.length>0?a.find(d=>i.some(f=>re(d,f)>=0)):void 0)??a[0]??t).replace(/^…+|…+$/gu,"").trim()}return r?(r.length>78&&(r=`${r.slice(0,75).replace(/\s+\S*$/u,"").trimEnd()}…`),r):s&&o?`${s} · ${o}`:o||s||jt(e)}function Nt(e){return e.freshness&&e.freshness!=="unknown"?e.freshness:e.title.replace(/\s+/g," ").trim().match(/\b((?:Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)[a-z]*\s+\d{1,2}(?:\s+at\s+\d{1,2}:\d{2}\s*(?:AM|PM)?)?)\b/iu)?.[1]??""}function Ue(e){const n=e.trim().toLowerCase();return n?n==="events"||n.startsWith("events")?"conversation":n==="overview"||n==="summary"?"overview":n==="tool-calls"||n==="tools"?"tool activity":n==="files"||n==="files-touched"?"files touched":n==="manifest"?"session index":n.replace(/[-_]+/g," "):""}function Mt(e){const n=e.trim();return n?n.charAt(0).toUpperCase()+n.slice(1):""}function Bt(e){const n=B(e,"harness")||_(e)?.harness||"";if(!n)return"";const t=n.toLowerCase();return t==="claude"?"Claude":t==="codex"?"Codex":t==="kimi"?"Kimi":t==="cursor"?"Cursor":Mt(n)}function zt(e){const n=B(e,"sessionId").trim(),t=pe(_(e)),s=(n||t||"").trim();return s?s.length>14?s.slice(0,8):s:""}function ge(e){const n=_(e)?.recordRange;if(n){const[s,o]=n;return s===o?`turn ${s}`:o-s<=1?`turns ${s}–${o}`:`turns ${s}–${o}`}const t=e.title.match(/events?\s+window\s+(\d+)/iu);return t?`window ${Number(t[1])}`:""}function Wt(e){const n=M(e,"recordKind",8).map(s=>s.toLowerCase());n.length===0&&n.push(...M(e,"recordTag",8).map(s=>s.toLowerCase()));const t=[];return n.some(s=>s.includes("user"))&&t.push("user"),n.some(s=>s.includes("assistant"))&&t.push("assistant"),n.some(s=>s.includes("tool")||s.includes("command")||s.includes("response"))&&t.push("tool"),t.length===0?"":t.join(" · ")}function he(e){const n=B(e,"documentKind");if(n){const s=n.split(",")[0]?.trim()??n;return Ue(s)}return In(e.title)?Ue(e.title):wn(e)?"file":_(e)?"conversation":""}function M(e,n,t=3){const s=e.facets[n];return(Array.isArray(s)?s:typeof s=="string"?s.split(","):[]).map(r=>r.trim()).filter(Boolean).slice(0,t)}function oo(e){return{agent:Bt(e),project:B(e,"project"),session:zt(e),when:Nt(e),turn:ge(e),role:Wt(e),where:he(e)}}function ro(e){const n=[],t=ge(e);t&&n.push(t);const s=vn(e);s&&n.push(s);const o=he(e);o&&o!=="conversation"&&n.push(o);const r=M(e,"toolName",2);r.length===1&&n.push(r[0]),r.length>1&&n.push(r.join(", "));const i=new Set;return n.filter(a=>{const u=a.toLowerCase();return i.has(u)?!1:(i.add(u),!0)})}function re(e,n){return new RegExp(`(?<![A-Za-z0-9_./~-])${Ln(n)}(?![A-Za-z0-9_./~-])`,"iu").exec(e)?.index??-1}function we(e,n=""){let t=e.replace(/\s+/g," ").trim();if(!t)return"";if(t=t.replace(/\s*-\s*\[\d{3,}\]\s*`[^`]+`(?:\s*\([^)]*\))?\s*-\s*/gu," "),t=t.replace(/\[\d{3,}\]\s*`[^`]+`\s*/gu,""),t=t.replace(/\*\*/gu,""),t=t.replace(/\b(?:assistant_turn|user_turn|agent_reasoning|command_or_tool|response_item|system_record)\b/giu," "),t=t.replace(/(?:~\/|\.\.?\/|\/(?:Users|home|var|tmp|opt)\/)\S+/gu," "),t=t.replace(/https?:\/\/\S+/gu," "),t=t.replace(/\b[\w.-]+\.(?:com|net|org|io|dev|app)(?:\/\S*)?/giu," "),t=t.replace(/\{[^{}]{0,160}\}/gu," "),t=t.replace(/`[^`]{0,64}`/gu,r=>{const i=r.slice(1,-1);return N(n).some(a=>re(i,a)>=0)||/^[A-Za-z][\w.-]{0,24}$/u.test(i)?i:" "}),t=t.replace(/\s{2,}/g," ").trim(),t=t.replace(/^[\s,;:.\-–—|/]+/u,"").trim(),t.includes("{")||t.includes("[")){const r=t.search(/[\[{]/u);if(r>18){const i=t.slice(0,r).trim().replace(/[-–—,:;]+$/u,"").trim();i&&(t=i)}}const s=N(n),o=200;if(s.length>0&&t.length>o){let r=-1;for(const i of s){const a=re(t,i);a>=0&&(r<0||a<r)&&(r=a)}if(r<0)for(const i of s){if(i.length<4)continue;const a=t.toLowerCase().indexOf(i.toLowerCase());a>=0&&(r<0||a<r)&&(r=a)}if(r>=0){const a=Math.max(0,r-48),u=Math.min(t.length,a+o),d=t.slice(a,u).trim();t=`${a>0?"…":""}${d}${u<t.length?"…":""}`}else t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`}else t.length>o&&(t=`${t.slice(0,o-1).replace(/\s+\S*$/u,"").trimEnd()}…`);return t.replace(/\s{2,}/g," ").trim()}function ao(e,n,t){const s=we(e.snippet,n);return s.length<=t?s:`${s.slice(0,t-1).replace(/\s+\S*$/u,"").trimEnd()}…`}function Kt(e,n){return N(n).filter(t=>{const s=t.toLowerCase();return e.title.toLowerCase().includes(s)||e.snippet.toLowerCase().includes(s)||we(e.snippet,n).toLowerCase().includes(s)})}function Sn(e){const n=(e.kind||e.role||e.type||"record").toLowerCase();return n==="assistant_turn"||n==="assistant"?"assistant":n==="user_turn"||n==="user"?"user":n==="system_record"||n==="system"?"system":n==="command_or_tool"||n==="tool_use"?"tool":n==="response_item"?"tool output":n==="agent_reasoning"||n==="reasoning"?"reasoning":n.replace(/_/gu," ")}function bn(e){const n=(e.kind||e.role||e.type||"").toLowerCase();return n==="assistant"||n==="assistant_turn"||n==="user"||n==="user_turn"||n==="last-prompt"||n==="ai-title"?0:n==="system"||n==="system_record"||n.includes("reasoning")?1:2}function io(e){return e.scoreSource==="hybrid"?"Words and meaning":e.scoreSource==="vector"?"Similar in meaning":"Exact words"}function co(e,n,t){const s=Kt(e,n),o=s.length===1?`Matched “${s[0]}”`:s.length>1?`Matched ${s.length} terms`:"Matched in this session";if(!t?.matched)return o;const r=[t.renderedText,t.summary].filter(Boolean).join(" ").toLowerCase(),i=s.filter(d=>r.includes(d.toLowerCase()));if(i.length===0)return o;const a=Sn(t),u=a==="assistant"?"an assistant reply":a==="user"?"your message":a==="tool"?"a tool call":a==="tool output"?"tool output":a==="system"?"a system record":a==="reasoning"?"agent reasoning":`a ${a} record`;return i.length===1?`Matched “${i[0]}” in ${u}`:`Matched ${i.length} terms in ${u}`}function uo(e){const n=_(e);if(n){const s=oe(n.path),o=n.recordRange;return o?`${s}#R${o[0]}-R${o[1]}`:s}const t=wn(e);if(t){const s=oe(t.path),o=t.lineRange;return o?`${s}#L${o[0]}-L${o[1]}`:s}return e.id}function Gt(e){const n=e.filter(o=>bn(o)===2).length,t=e.length-n,s=e.some(o=>o.matched)?" · match inside":"";return n>0&&t===0?`${n} tool step${n===1?"":"s"}${s}`:n===0?`${t} process step${t===1?"":"s"}${s}`:`${n} tool + ${t} process step${e.length===1?"":"s"}${s}`}function Ht(e){return`${e.length} more conversation turn${e.length===1?"":"s"}`}function lo(e,n={}){if(e.length===0)return[];const t=n.contextRadius??3,s=n.maxTurns??6,o=n.centerRecordIndex===void 0?-1:e.findIndex(v=>v.index===n.centerRecordIndex),r=e.findIndex(v=>v.matched),i=o>=0?o:r>=0?r:0,a=e.slice(Math.max(0,i-t),Math.min(e.length,i+t+1)),u=[];let d=[],f=[],L=0;const C=()=>{d.length!==0&&(u.push({kind:"folded",records:d,summary:Gt(d)}),d=[])},R=()=>{f.length!==0&&(u.push({kind:"folded",records:f,summary:Ht(f)}),f=[])};for(const v of a){if(bn(v)>0){R(),d.push(v);continue}if(C(),L>=s){f.push(v);continue}u.push({kind:"turn",record:v,role:Sn(v)}),L+=1}return C(),R(),u}function ke(e){const n=_(e)?.recordRange;return n?n[0]:Number.MAX_SAFE_INTEGER}function fo(e){const n=[],t=new Map;for(const s of e){const o=s.collectionId||s.id,r=t.get(o);r?r.push(s):(n.push(o),t.set(o,[s]))}return n.map(s=>{const o=[...t.get(s)??[]].sort((i,a)=>{const u=ke(i)-ke(a);return u!==0?u:i.score-a.score}),r=t.get(s)?.[0]??o[0];return{collectionId:s,best:r,moments:o}})}function Ln(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function mo(e,n){const t=N(n);if(t.length===0||e.length===0)return[{text:e,match:!1}];const s=t.map(a=>`(?<![A-Za-z0-9_./~-])${Ln(a)}(?![A-Za-z0-9_./~-])`),o=new RegExp(`(${s.join("|")})`,"giu"),r=[];let i=0;for(const a of e.matchAll(o)){const u=a.index??0;u>i&&r.push({text:e.slice(i,u),match:!1}),r.push({text:a[0],match:!0}),i=u+a[0].length}return i<e.length&&r.push({text:e.slice(i),match:!1}),r.length>0?r:[{text:e,match:!1}]}const po={sessions:"Sessions",skills:"Skills",mcp:"MCP",codebase:"Codebase",context_pack:"Context packs",mixed:"Mixed"},yn=[{value:"1",label:"Last 24h"},{value:"3",label:"Last 3 days"},{value:"7",label:"Last 7 days"},{value:"30",label:"Last 30 days"}],go=["sessions","skills","mcp","codebase","context_pack"];function ho(){return{query:"",sourceKinds:[],harness:[],project:[],timeWindow:"all"}}function Vt(e){return e?yn.some(n=>n.value===e):!1}function Q(e){return e?e.split(",").map(n=>n.trim()).filter(n=>n.length>0):[]}function Yt(e){const n=e==null?new URLSearchParams:typeof e=="string"?new URLSearchParams(e):e,t=n.get("time"),s=Vt(t)?t:"all";return{query:n.get("q")?.trim()??"",sourceKinds:Q(n.get("source")),harness:Q(n.get("harness")),project:Q(n.get("project")),timeWindow:s}}function qt(e,n={}){const t=new URLSearchParams,s=e.query.trim();return s&&t.set("q",s),e.sourceKinds.length>0&&t.set("source",e.sourceKinds.join(",")),e.harness.length>0&&t.set("harness",e.harness.join(",")),e.project.length>0&&t.set("project",e.project.join(",")),e.timeWindow!=="all"&&t.set("time",e.timeWindow),n.hitId&&t.set("hit",n.hitId),t}function wo(e,n){return e.query.trim()===n.query.trim()&&e.timeWindow===n.timeWindow&&X(e.sourceKinds,n.sourceKinds)&&X(e.harness,n.harness)&&X(e.project,n.project)}function X(e,n){if(e.length!==n.length)return!1;const t=[...e].map(o=>o.trim().toLowerCase()).sort(),s=[...n].map(o=>o.trim().toLowerCase()).sort();return t.every((o,r)=>o===s[r])}function Qt(e){return e.query.trim().length>0||e.sourceKinds.length>0||e.harness.length>0||e.project.length>0||e.timeWindow!=="all"}function Io(e){if(e==="all")return null;const n=Number.parseInt(e,10);return!Number.isFinite(n)||n<=0?null:Date.now()-n*24*60*60*1e3}function vo(e){return e==="all"?"Any time":yn.find(t=>t.value===e)?.label??e}const $n=typeof window<"u"?window.location.href:"http://scout.local/";function Xt(e){const n=e.toString();return new URL(n,$n)}function Zt(e){switch(e){case"profile":case"config":case"definitions":return e==="definitions"?"config":e;case"observe":case"message":return e;default:return}}function Jt(e){const n=e.trim().replace(/^#/,"");if(!n.startsWith("msg-"))return null;const t=n.slice(4).trim();if(!t)return null;try{return decodeURIComponent(t)}catch{return t}}function es(e){switch(e){case"control":case"mission":case"command":case"warroom":case"conduct":case"conductor":return"mission";case"plan":case"advisor":return"advisor";case"issues":case"errors":case"warnings":return"issues";case"agents":case"tail":case"atop":case"lanes":return e;default:return}}function ns(e){return e==="delivered"||e==="failed"||e==="all"?e:void 0}function ts(e){return e==="indexer"||e==="knowledge"?e:void 0}function ss(e){switch(e){case"pairing":case"agents":case"appearance":case"operator":case"comms":case"credentials":case"voice":case"devices":case"about":return e;case"communications":return"comms";default:return}}function os(e){switch(e){case"tail":case"session":case"chat":case"work":return e;default:return}}function rs(e){const n=e?.trim().replace(/\.+$/u,"");return n==="observe"||n==="takeover"?n:void 0}function as(e){const n=e?.trim().toLowerCase();return n==="pty"||n==="tmux"||n==="zellij"||n==="herdr"?n:void 0}function is(e){const n=e?.trim().toLowerCase();return n==="shell"||n==="claude"||n==="codex"||n==="pi"?n:void 0}function cs(e){return e==="all"||e==="touched"?"all":e==="changed"?"changed":void 0}function Te(e){if(!e)return;const n=Number.parseInt(e,10);return Number.isSafeInteger(n)&&n>0?n:void 0}function De(e){return e==="mission"?"control":e}function us(e){return e.searchParams.has("no-ops")?!1:typeof window>"u"?!0:en()}function ls(e){return e==="tail"}function ds(e){return e==="lanes"}function En(e){return ls(e)||ds(e)}const Ie="machineId",Rn=new Set(["inbox","conversation","agents-v2","messages","sessions","repos","harnesses","mesh","mesh-ops","activity","work","follow"]);function fs(e){return e.searchParams.get(Ie)?.trim()||void 0}function ms(e,n){return!n||!Rn.has(e.view)?e:{...e,machineId:n}}function ve(e){return Rn.has(e.view)}function ps(e){return"machineId"in e&&e.machineId?e.machineId:null}function Fe(e,n){if(!ve(e))return e;const t={...e},s=n?.trim();return s?t.machineId=s:delete t.machineId,t}function So(e){return ve(e)?{...e,machineId:""}:e}function gs(e,n){return ve(e)?"machineId"in e?Fe(e,e.machineId??null):Fe(e,ps(n)):e}function A(e,n){"machineId"in n&&n.machineId&&e.set(Ie,n.machineId)}function w(e){const n=e.toString();return n?`?${n}`:""}function T(e,n){const t=new URLSearchParams;return A(t,n),`${e}${w(t)}`}function hs(e){return"machineId"in e&&e.machineId?`:machine:${e.machineId}`:""}function Pn(e){const n=Xt(e),t=n.pathname.replace(/^\/+/,"").split("/").filter(Boolean),s=fs(n),o=c=>ms(c,s),r=_t(t,n,o);if(r)return r;const i=Jt(n.hash),a=Zt(n.searchParams.get("tab"))??(i?"message":void 0),u=n.searchParams.get("project")?.trim()||void 0,d=n.searchParams.get("agentId")?.trim()||void 0;if(t[0]==="agent"&&t[1])return{view:"agent-info",conversationId:decodeURIComponent(t[1])};const f=n.searchParams.get("project")?.trim()||void 0,L=n.searchParams.get("harness")?.trim()||void 0,C=n.searchParams.get("node")?.trim()||void 0,R=n.searchParams.get("set")?.trim(),v=R==="live"||R==="ephemeral"||R==="archived"?R:void 0,x=n.searchParams.get("view")?.trim(),z=x==="sessions"||x==="agents"?x:void 0,U=n.searchParams.get("state")?.trim(),Se=U==="needs"||U==="live"||U==="idle"?U:void 0,Tn=n.searchParams.get("ephemeral")==="1",W=n.searchParams.get("session")?.trim()||void 0,S=n.searchParams.get("select")?.trim()||void 0,y={...L?{harness:L}:{},...C?{node:C}:{},...v?{set:v}:{},...z?{indexView:z}:{},...Se?{stateFilter:Se}:{},...Tn?{showEphemeral:!0}:{}};if(t[0]==="projects"){const c=t[1]?decodeURIComponent(t[1]):void 0;if(!c)return o({view:"agents-v2",...S?{selectedAgentId:S}:{},...y});if(t[2]==="agents"){const l=t[3]?decodeURIComponent(t[3]):void 0;if(l){if(t[4]==="c"&&t[5])return o({view:"agents-v2",projectSlug:c,agentId:l,conversationId:decodeURIComponent(t[5]),tab:a??"message",...y});const m=t[4]==="sessions"&&t[5]?decodeURIComponent(t[5]):W;return o({view:"agents-v2",projectSlug:c,agentId:l,...m?{sessionId:m}:{},...a?{tab:a}:{},...y})}return o({view:"agents-v2",projectSlug:c,indexView:"agents",...S?{selectedAgentId:S}:{},...y})}return t[2]==="sessions"?o({view:"agents-v2",projectSlug:c,indexView:"sessions",...t[3]?{sessionId:decodeURIComponent(t[3])}:{},...S?{selectedAgentId:S}:{},...y}):o({view:"agents-v2",projectSlug:c,...S?{selectedAgentId:S}:{},...y})}if(t[0]==="agents-v2"&&t[1]==="sessions"&&t[2])return o({view:"agents-v2",sessionId:decodeURIComponent(t[2]),...S?{selectedAgentId:S}:{},...f?{projectSlug:f}:{},...y});if(t[0]==="agents-v2"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...W?{sessionId:W}:{},...f?{projectSlug:f}:{},...y})}if(t[0]==="agents-v2")return o({view:"agents-v2",...S?{selectedAgentId:S}:{},...f?{projectSlug:f}:{},...y});if(t[0]==="agents"&&t[1]){const c=decodeURIComponent(t[1]),l=t[2]==="sessions"&&t[3]?decodeURIComponent(t[3]):W;return t[2]==="c"&&t[3]?o({view:"agents-v2",agentId:c,conversationId:decodeURIComponent(t[3]),tab:a??"message",...y}):o({view:"agents-v2",agentId:c,...l?{sessionId:l}:{},...a?{tab:a}:{},...y})}if(t[0]==="agents")return o({view:"agents-v2",...S?{selectedAgentId:S}:{},...f?{projectSlug:f}:{},...y});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="sessions"&&t[3])return o({view:"sessions",agentId:decodeURIComponent(t[1]),sessionId:decodeURIComponent(t[3])});if(t[0]==="agents.deprecated"&&t[1]&&t[2]==="c"&&t[3])return o({view:"agents-v2",agentId:decodeURIComponent(t[1]),conversationId:decodeURIComponent(t[3]),tab:a??"message"});if(t[0]==="agents.deprecated"&&t[1]){const c=decodeURIComponent(t[1]);return o({view:"agents-v2",agentId:c,...a?{tab:a}:{},...!a&&u?{projectSlug:u}:{}})}if(t[0]==="agents.deprecated")return o({view:"agents-v2",...u?{projectSlug:u}:{}});if(t[0]==="fleet")return o({view:"inbox"});if(t[0]==="c"&&t[1])return o({view:"conversation",conversationId:decodeURIComponent(t[1])});if(t[0]==="flights"&&t[1]&&t[2]==="observe"){const c=n.searchParams.get("session")?.trim()||void 0,l=n.searchParams.get("compare")?.trim()||void 0;return o({view:"sessions",flightId:decodeURIComponent(t[1]),...c?{sessionId:c}:{},...l?{compareSessionId:l}:{}})}if(t[0]==="sessions"&&t[1])return o({view:"sessions",sessionId:decodeURIComponent(t[1]),...d?{agentId:d}:{}});if(t[0]==="conversations")return o({view:"messages"});if(t[0]==="messages"){const c={view:"messages",...t[1]?{conversationId:decodeURIComponent(t[1])}:{}};return o(c)}if(t[0]==="sessions")return o({view:"sessions",...d?{agentId:d}:{}});if(t[0]==="repos"){const c=n.searchParams.get("root")?.trim()||void 0;return o({view:"repos",...c?{root:c}:{}})}if(t[0]==="providers"||t[0]==="harnesses")return o({view:"harnesses"});if(t[0]==="repo-diff"){const c=n.searchParams.get("path")?.trim();if(c){const l=n.searchParams.getAll("layer").filter(h=>h==="unstaged"||h==="staged"||h==="branch"),m=n.searchParams.getAll("file").map(h=>h.trim()).filter(Boolean),p=n.searchParams.get("sessionId")?.trim()||void 0,I=n.searchParams.get("agentId")?.trim()||void 0,b=cs(n.searchParams.get("include"));return{view:"repo-diff",path:c,...l.length>0?{layers:l}:{},...m.length>0?{files:m}:{},...p?{sessionId:p}:{},...I?{agentId:I}:{},...b?{include:b}:{}}}}if(t[0]==="search"){const c=ts(t[1]),l=n.searchParams.get("hit")?.trim()||void 0,m=Yt(n.searchParams);return{view:"search",...c&&c!=="knowledge"?{mode:c}:{},...l?{hitId:l}:{},...Qt(m)?{filters:m}:{}}}if(t[0]==="channels"&&t[1])return o({view:"messages",conversationId:decodeURIComponent(t[1])});if(t[0]==="channels")return o({view:"messages"});if(t[0]==="mesh")return o({view:"mesh"});if(t[0]==="mesh-ops")return o({view:"mesh-ops",...t[1]?{itemId:decodeURIComponent(t[1])}:{}});if(t[0]==="dispatch"||t[0]==="broker"){const c=n.searchParams.get("attempt")?.trim()||void 0,l=ns(n.searchParams.get("filter"));return{view:"broker",...c?{attemptId:c}:{},...l&&l!=="all"?{filter:l}:{}}}if(t[0]==="code"){const c=n.searchParams.get("wt")?.trim()||void 0,l=n.searchParams.get("fromConversation")?.trim()||void 0,m=Te(n.searchParams.get("line")),p=Te(n.searchParams.get("endLine")),I=m&&p&&p>=m?p:void 0;if(t[1]){const E=decodeURIComponent(t[1]),$=t.length>2?t.slice(2).map(decodeURIComponent).join("/"):void 0;return{view:"code",project:E,...$?{path:$}:{},...c?{wt:c}:{},...m?{line:m}:{},...I?{endLine:I}:{},...l?{returnConversationId:l}:{}}}const b=n.searchParams.get("root")?.trim()||void 0,h=n.searchParams.get("file")?.trim()||void 0;return{view:"code",...b?{root:b}:{},...h?{file:h}:{},...c?{wt:c}:{},...m?{line:m}:{},...I?{endLine:I}:{},...l?{returnConversationId:l}:{}}}if(t[0]==="briefings"&&t[1])return{view:"briefings",briefingId:decodeURIComponent(t[1])};if(t[0]==="briefings")return{view:"briefings"};if(t[0]==="activity")return o({view:"activity"});if(t[0]==="voice")return{view:"voice"};if(t[0]==="work"&&t[1])return o({view:"work",workId:decodeURIComponent(t[1])});if(t[0]==="follow"){const c=os(n.searchParams.get("view")),l={view:"follow",...c?{preferredView:c}:{}},m=t[1],p=t[2]?decodeURIComponent(t[2]):"";m==="flight"&&p&&(l.flightId=p),m==="invocation"&&p&&(l.invocationId=p),m==="conversation"&&p&&(l.conversationId=p),m==="work"&&p&&(l.workId=p),m==="session"&&p&&(l.sessionId=p),m==="agent"&&p&&(l.targetAgentId=p);const I=n.searchParams.get("flightId"),b=n.searchParams.get("invocationId"),h=n.searchParams.get("conversationId"),E=n.searchParams.get("workId"),$=n.searchParams.get("sessionId"),be=n.searchParams.get("targetAgentId");return I&&(l.flightId=I),b&&(l.invocationId=b),h&&(l.conversationId=h),E&&(l.workId=E),$&&(l.sessionId=$),be&&(l.targetAgentId=be),o(l)}if(t[0]==="settings"){if(t[1]==="agents")return{view:"settings",section:"agents",...t[2]?{agentId:decodeURIComponent(t[2])}:{}};const c=ss(t[1]);return{view:"settings",...c?{section:c}:{}}}if(t[0]==="terminal"){const c=rs(n.searchParams.get("mode")),l=n.searchParams.get("session")?.trim()||void 0,m=Mn(n.searchParams.get("surface"))??void 0;if(t[1]==="new"){const I=as(n.searchParams.get("backend"))??"pty",b=is(n.searchParams.get("agent"))??"shell",h=n.searchParams.get("name")?.trim()||void 0,E=n.searchParams.get("tab")?.trim()||void 0,$=n.searchParams.get("socketDir")?.trim()||void 0;return{view:"terminal",terminalBackend:I,terminalAgent:b,...h?{terminalSessionName:h}:{},...E?{terminalTabId:E}:{},...$?{zellijSocketDir:$}:{}}}const p=t[1]==="s"&&t[2]?Me(decodeURIComponent(t.slice(2).join("/")))?decodeURIComponent(t.slice(2).join("/")):null:Bn(t[1]?decodeURIComponent(t[1]):void 0,t[2]?decodeURIComponent(t.slice(2).join("/")):void 0);return p?{view:"terminal",terminalSurfaceKey:p,...l?{terminalSessionId:l}:{},...c?{mode:c}:{}}:{view:"terminal",...t[1]?{agentId:decodeURIComponent(t[1])}:{},...c?{mode:c}:{},...!t[1]&&l?{terminalSessionId:l}:{},...!t[1]&&m?{terminalSurfaceKey:m}:{}}}if(t[0]==="ops"){const c=es(t[1])??"mission";if(!En(c)&&!us(n))return o({view:"inbox"});const l=c==="tail"?n.searchParams.get("q")?.trim():"",m=c==="advisor"?n.searchParams.get("plan")?.trim():"",p=n.searchParams.get("flightId")?.trim(),I=n.searchParams.get("invocationId")?.trim(),b=n.searchParams.get("conversationId")?.trim(),h=n.searchParams.get("workId")?.trim(),E=n.searchParams.get("sessionId")?.trim(),$=n.searchParams.get("targetAgentId")?.trim()??n.searchParams.get("agentId")?.trim();return{view:"ops",mode:c,...l?{tailQuery:l}:{},...m?{planDocumentId:m}:{},...p?{flightId:p}:{},...I?{invocationId:I}:{},...b?{conversationId:b}:{},...h?{workId:h}:{},...E?{sessionId:E}:{},...$?{targetAgentId:$}:{}}}return o({view:"inbox"})}function Cn(e,n){const t=e.view==="sessions"&&e.flightId?null:hn(e,n);if(t)return t;switch(e.view){case"inbox":return T("/",e);case"conversation":{const s=new URLSearchParams;return A(s,e),`/c/${encodeURIComponent(e.conversationId)}${w(s)}`}case"agent-info":return`/agent/${encodeURIComponent(e.conversationId)}`;case"agents-v2":{const s=new URLSearchParams;e.harness&&s.set("harness",e.harness),e.node&&s.set("node",e.node),e.set&&s.set("set",e.set),!e.projectSlug&&e.indexView&&e.indexView!=="agents"&&s.set("view",e.indexView),e.stateFilter&&s.set("state",e.stateFilter),e.showEphemeral&&s.set("ephemeral","1"),e.selectedAgentId&&!e.agentId&&!e.sessionId&&s.set("select",e.selectedAgentId);const o=e.conversationId?"message":"profile";e.agentId&&e.tab&&e.tab!==o&&s.set("tab",e.tab),A(s,e);const r=e.projectSlug?`/projects/${encodeURIComponent(e.projectSlug)}`:null;return`${r?e.agentId?e.conversationId?`${r}/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`${r}/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`${r}/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`${r}/sessions/${encodeURIComponent(e.sessionId)}`:e.indexView==="sessions"?`${r}/sessions`:e.indexView==="agents"?`${r}/agents`:r:e.agentId?e.conversationId?`/agents/${encodeURIComponent(e.agentId)}/c/${encodeURIComponent(e.conversationId)}`:e.sessionId?`/agents/${encodeURIComponent(e.agentId)}/sessions/${encodeURIComponent(e.sessionId)}`:`/agents/${encodeURIComponent(e.agentId)}`:e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/projects"}${w(s)}`}case"messages":{const s=new URLSearchParams;return A(s,e),`${e.conversationId?`/messages/${encodeURIComponent(e.conversationId)}`:"/messages"}${w(s)}`}case"sessions":{const s=new URLSearchParams;return e.agentId&&s.set("agentId",e.agentId),e.flightId?(e.sessionId&&s.set("session",e.sessionId),e.compareSessionId&&s.set("compare",e.compareSessionId),A(s,e),`/flights/${encodeURIComponent(e.flightId)}/observe${w(s)}`):(A(s,e),`${e.sessionId?`/sessions/${encodeURIComponent(e.sessionId)}`:"/sessions"}${w(s)}`)}case"repos":{const s=new URLSearchParams;return e.root&&s.set("root",e.root),A(s,e),`/repos${w(s)}`}case"harnesses":return T("/providers",e);case"repo-diff":{const s=new URLSearchParams;s.set("path",e.path);for(const o of e.layers??[])s.append("layer",o);for(const o of e.files??[])s.append("file",o);return e.sessionId&&s.set("sessionId",e.sessionId),e.agentId&&s.set("agentId",e.agentId),e.include&&s.set("include",e.include),`/repo-diff${w(s)}`}case"search":{const s=e.mode==="indexer"?"/search/indexer":"/search",o=e.filters?qt(e.filters,{hitId:e.hitId??null}):new URLSearchParams;return!e.filters&&e.hitId&&o.set("hit",e.hitId),`${s}${w(o)}`}case"mesh":return T("/mesh",e);case"mesh-ops":return T(e.itemId?`/mesh-ops/${encodeURIComponent(e.itemId)}`:"/mesh-ops",e);case"broker":{const s=new URLSearchParams;return e.attemptId&&s.set("attempt",e.attemptId),e.filter&&e.filter!=="all"&&s.set("filter",e.filter),`/dispatch${w(s)}`}case"code":{const s=new URLSearchParams;if(e.wt&&s.set("wt",e.wt),e.line&&s.set("line",String(e.line)),e.line&&e.endLine&&e.endLine>=e.line&&s.set("endLine",String(e.endLine)),e.project){e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const r=[encodeURIComponent(e.project)];return e.path&&r.push(...e.path.split("/").map(encodeURIComponent)),`${`/code/${r.join("/")}`}${w(s)}`}e.root&&s.set("root",e.root),e.file&&s.set("file",e.file),e.returnConversationId&&s.set("fromConversation",e.returnConversationId);const o=s.toString();return o?`/code?${o}`:"/code"}case"briefings":return e.briefingId?`/briefings/${encodeURIComponent(e.briefingId)}`:"/briefings";case"activity":return T("/activity",e);case"voice":return"/voice";case"work":return T(`/work/${encodeURIComponent(e.workId)}`,e);case"settings":return e.section==="agents"?e.agentId?`/settings/agents/${encodeURIComponent(e.agentId)}`:"/settings/agents":e.section?e.section==="pairing"?"/settings/pairing":e.section==="comms"?"/settings/comms":`/settings/${e.section}`:"/settings";case"ops":if(!e.mode)return"/ops";if(e.mode==="tail"||e.mode==="advisor"){const s=new URLSearchParams;return e.mode==="tail"&&e.tailQuery&&s.set("q",e.tailQuery),e.mode==="advisor"&&e.planDocumentId&&s.set("plan",e.planDocumentId),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),`/ops/${De(e.mode)}${w(s)}`}return`/ops/${De(e.mode)}`;case"follow":{const s=new URLSearchParams;e.preferredView&&s.set("view",e.preferredView),e.flightId&&s.set("flightId",e.flightId),e.invocationId&&s.set("invocationId",e.invocationId),e.conversationId&&s.set("conversationId",e.conversationId),e.workId&&s.set("workId",e.workId),e.sessionId&&s.set("sessionId",e.sessionId),e.targetAgentId&&s.set("targetAgentId",e.targetAgentId),e.machineId&&s.set(Ie,e.machineId);const o=s.toString();return`/follow${o?`?${o}`:""}`}case"terminal":if(e.agentId){const s=new URLSearchParams;return e.mode&&s.set("mode",e.mode),`/terminal/${encodeURIComponent(e.agentId)}${w(s)}`}{const s=new URLSearchParams;if(e.terminalBackend)return e.terminalBackend!=="pty"&&s.set("backend",e.terminalBackend),e.terminalAgent&&e.terminalAgent!=="shell"&&s.set("agent",e.terminalAgent),e.terminalSessionName&&s.set("name",e.terminalSessionName),e.terminalTabId&&s.set("tab",e.terminalTabId),e.zellijSocketDir&&s.set("socketDir",e.zellijSocketDir),`/terminal/new${w(s)}`;e.mode&&s.set("mode",e.mode);const o=zn(e.terminalSurfaceKey);return o?`/terminal/${encodeURIComponent(o.backend)}/${encodeURIComponent(o.sessionName)}${w(s)}`:Me(e.terminalSurfaceKey)?`/terminal/s/${encodeURIComponent(e.terminalSurfaceKey)}${w(s)}`:(e.terminalSessionId&&s.set("session",e.terminalSessionId),e.terminalSurfaceKey&&s.set("surface",e.terminalSurfaceKey),`/terminal${w(s)}`)}}}function j(e){const n=hs(e);switch(e.view){case"conversation":return`conv:${e.conversationId}${n}`;case"agent-info":return`agent-info:${e.conversationId}`;case"settings":return`settings:${e.section??"pairing"}:${e.agentId??""}`;case"agents-v2":return["agents-v2",e.projectSlug??"",e.harness??"",e.node??"",e.set??"",e.indexView??"agents",e.stateFilter??"",e.showEphemeral?"eph":"",e.agentId??"",e.sessionId??"",n].join(":");case"sessions":return e.flightId?`flight-observe:${e.flightId}:${e.sessionId??""}:${e.compareSessionId??""}${n}`:e.sessionId?`session:${e.agentId??""}:${e.sessionId}${n}`:`sessions${n}`;case"messages":return e.conversationId?`messages:${e.conversationId}${n}`:`messages${n}`;case"work":return`work:${e.workId}${n}`;case"ops":return`ops:${e.mode??"advisor"}:${e.tailQuery??""}:${e.planDocumentId??""}:${e.flightId??""}:${e.invocationId??""}:${e.workId??""}:${e.conversationId??""}:${e.sessionId??""}:${e.targetAgentId??""}`;case"search":return`search:${e.mode??"knowledge"}:${e.hitId??""}`;case"broker":return`broker:${e.attemptId??""}`;case"follow":return`follow:${e.flightId??e.invocationId??e.conversationId??e.workId??e.sessionId??e.targetAgentId??""}:${e.preferredView??""}${n}`;case"terminal":return`terminal:${e.agentId??""}:${e.terminalSessionId??""}:${e.terminalSurfaceKey??""}:${e.terminalBackend??""}:${e.terminalAgent??""}:${e.terminalSessionName??""}:${e.terminalTabId??""}:${e.mode??"detail"}`;case"repo-diff":return`repo-diff:${e.path}`;default:return`${e.view}${n}`}}function G(e,n){return ce(Pn(`${e}${n}`))}function An(e){return e?`#${e}`:""}function ws(e){return e.startsWith("/embed/")||e==="/ops/lanes/embed"}function Oe(){if(typeof window>"u"){const e=new URL($n);return{pathname:e.pathname,searchStr:e.search,hash:e.hash.replace(/^#/,""),state:null}}return{pathname:window.location.pathname,searchStr:window.location.search,hash:window.location.hash.replace(/^#/,""),state:window.history.state}}function Is(e,n){return e.pathname===n.pathname&&e.searchStr===n.searchStr&&e.hash===n.hash&&Object.is(e.state,n.state)}function vs(e){let n=e.read();const t=new Set;let s=null;const o=()=>{const r=e.read();if(!Is(n,r)){n=r;for(const i of t)i()}};return{getSnapshot:()=>n,subscribe(r){return s||(s=e.observe(o)),t.add(r),()=>{t.delete(r)}},navigateTo(r,i={}){const a=i.state===void 0?n.state:i.state;i.replace?e.replace(r,a):e.push(r,a),o()}}}function Ss(){return typeof window>"u"?{read:Oe,push:()=>{},replace:()=>{},observe:()=>()=>{}}:{read:Oe,push:(e,n)=>window.history.pushState(n,"",e),replace:(e,n)=>window.history.replaceState(n,"",e),observe:e=>(window.addEventListener("popstate",e),window.addEventListener("hashchange",e),()=>{window.removeEventListener("popstate",e),window.removeEventListener("hashchange",e)})}}const F=vs(Ss());function bs(){return P.useSyncExternalStore(F.subscribe,F.getSnapshot,F.getSnapshot)}function ae(e,n={}){F.navigateTo(e,n)}function _n(){return typeof window>"u"?null:window.navigation??null}function Un(){if(typeof window>"u")return!1;const e=_n();return e?e.canGoBack:window.history.length>1}function Ls(){if(!Un())return;const e=_n();if(e){e.back();return}window.history.back()}function bo(e){if(!e||typeof e!="object")return null;const n=e.returnTo;return!n||typeof n!="object"||typeof n.view!="string"?null:n}function Lo(e){return!e||typeof e!="object"?!1:e.returnUseHistory===!0}function xe(e){if(!e||typeof e!="object")return e;const{returnTo:n,returnUseHistory:t,settingsEntry:s,...o}=e;return o}function ys(e,n){if(n.returnTo!==void 0){const t=n.state!==void 0?n.state:xe(e),s=t&&typeof t=="object"?{...t}:{};return s.returnTo=n.returnTo,s.returnUseHistory=n.replace!==!0,s}return n.state!==void 0?n.state:n.replace?e:xe(e)}function kn(e){return e?e.replace(/^#/,""):""}function $s(e,n,t={}){const s=G(e.pathname,e.searchStr),o=gs(n,s),r=t.preserveSearch===!1?"":e.searchStr,i=gn(Cn(o,e.pathname),r),a=kn(t.hash);return{route:o,href:`${i}${a?`#${a}`:""}`}}function Es(e,n){const t=new URLSearchParams(e.searchStr);for(const[r,i]of Object.entries(n.searchPatch??{}))i===null?t.delete(r):t.set(r,i);const s=t.toString(),o=n.hash===void 0?e.hash:kn(n.hash);return`${e.pathname}${s?`?${s}`:""}${o?`#${o}`:""}`}function yo(e){const n=F.getSnapshot(),t=Es(n,e),s=`${n.pathname}${n.searchStr}${An(n.hash)}`;t!==s&&ae(t,{replace:e.replace??!0,state:e.state})}function Rs(e,n,t){if(ws(e))return null;const s=`${e}${n}`,o=Pn(s),r=ce(o),i=gn(Cn(r,e),n);return!(j(o)!==j(r)||r.view==="agents-v2"||s!==i)||s===i?null:`${i}${An(t)}`}function $o(){const{pathname:e,searchStr:n,hash:t}=bs(),s=`${e}${n}`,o=P.useMemo(()=>G(e,n),[e,n]),r=P.useRef({}),i=P.useRef(s);P.useEffect(()=>{const f=Rs(e,n,t);f&&ae(f,{replace:!0})},[e,n,t]),P.useEffect(()=>{if(i.current===s)return;const f=G(e,n);requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(f)]??0)}),i.current=s},[s,e,n]);const a=P.useCallback((f,L={})=>{const C=ce(f.view==="ops"&&!en()&&!En(f.mode)?{view:"inbox"}:f),R=G(e,n),{route:v,href:x}=$s({pathname:e,searchStr:n},C,L);r.current[j(R)]=window.scrollY;const z=F.getSnapshot().state,U=ys(z,L);ae(x,{replace:L.replace,state:U}),requestAnimationFrame(()=>{window.scrollTo(0,r.current[j(v)]??0)})},[e,n]),u=P.useCallback(()=>Ls(),[]),d=Un();return{route:o,navigate:a,navigateBack:u,canNavigateBack:d}}export{Ks as $,jt as A,pe as B,_ as C,so as D,ao as E,ro as F,Io as G,mo as H,vo as I,rt as J,no as K,ot as L,at as M,it as N,Ds as O,yo as P,Xs as Q,pn as R,go as S,mn as T,Js as U,Ms as V,xs as W,Bs as X,yt as Y,Ns as Z,St as _,Cn as a,$t as a0,Hs as a1,Vs as a2,Gs as a3,Ys as a4,zs as a5,Ws as a6,js as a7,tn as a8,nn as a9,oe as aA,co as aB,io as aC,Sn as aD,ve as aa,qs as ab,Qs as ac,V as ad,ne as ae,Us as af,se as ag,q as ah,At as ai,Dt as aj,_t as ak,gn as al,Ft as am,tt as an,Zs as ao,hn as ap,We as aq,eo as ar,$o as as,Vn as at,wn as au,B as av,to as aw,uo as ax,bn as ay,lo as az,Qn as b,Wn as c,ps as d,So as e,qe as f,Ts as g,ue as h,lt as i,ks as j,Fs as k,Os as l,bo as m,Lo as n,ho as o,Yt as p,fo as q,Pn as r,Fe as s,Qt as t,bs as u,wo as v,_s as w,po as x,yn as y,oo as z};
@@ -1 +0,0 @@
1
- import{_ as x}from"./index-NRbRrZw-.js";import{b as k,p as A,V as q,D as N}from"./fx-z37u1o2z.js";function he(t){return t?t.hint?`${t.message} ${t.hint}`:t.message:"Scout voice is unavailable."}async function fe(t={}){const e=await fetch("/api/voice/engage",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(e.status===404)return j(t);if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}return await e.json()}async function j(t={}){const e=await de(),n=e.settings,i=e.devices,r=i.length>0||(n.permissions?.length??0)>0,o=n.permissions?.find(w=>w.kind==="microphone")??null,a=n.permissions?.find(w=>w.kind==="speechRecognition")??null,u=U(n,i);if(t.requestPermissions&&(o&&!o.granted&&o.status!=="restricted"?await C("microphone").catch(()=>{}):(o?.granted??!1)&&a&&!a.granted&&a.status!=="restricted"&&await C("speechRecognition").catch(()=>{})),!r)return{ready:!1,issue:{code:"host_offline",title:"Scout Menu is not running",message:"Launch Scout Menu on this Mac to dictate in web chat.",hint:"Restart the web server if you just updated Scout — `scout server restart` or restart `bun run server/index.ts`.",action:"launch_host"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:!1};const h=$(o);if(h)return{ready:!1,issue:h,warnings:[],settings:n,devices:i,inputDevice:u,hostOnline:r};if(!u)return{ready:!1,issue:{code:"no_input_device",title:"No microphone detected",message:"Scout Menu did not report any audio input devices.",hint:"Plug in a microphone, check Sound settings, then refresh Settings → Voice.",action:"open_voice_settings"},warnings:[],settings:n,devices:i,inputDevice:null,hostOnline:r};const d=F(a);return{ready:!0,issue:null,warnings:d?[d]:[],settings:n,devices:i,inputDevice:u,hostOnline:r}}function U(t,e){if(e.length===0)return null;const n=t.inputDeviceId?e.find(o=>o.id===t.inputDeviceId):null,i=e.find(o=>o.isDefault)??e[0]??null,r=n??i;return r?{id:r.id,name:r.name}:null}function $(t){return!t||t.granted?null:t.canRequest?{code:"microphone_not_requested",title:"Microphone access needed",message:"Scout Menu needs microphone access before dictation can start.",hint:"Request access or tap the mic again to show the macOS prompt.",action:"request_microphone"}:{code:"microphone_denied",title:"Microphone blocked",message:"Scout Menu cannot record because microphone access is off.",hint:"Scout is opening macOS Microphone settings and will detect the change automatically.",action:"open_microphone_settings"}}function F(t){return!t||t.granted?null:t.canRequest?{code:"speech_not_requested",title:"Speech recognition needed",message:"Scout Menu needs speech recognition for live partials.",hint:"Request access to show the macOS prompt.",action:"request_speech"}:{code:"speech_denied",title:"Speech recognition blocked",message:"Speech recognition is off for Scout Menu.",hint:"Choose Retry access to reopen macOS Speech Recognition settings.",action:"open_speech_settings"}}function H(t,e){switch(e){case"microphone_permission":return"Microphone access is off for Scout Menu. Tap the mic to retry; Scout will open macOS Microphone settings.";case"empty_transcript":return"No speech was detected. Check your microphone input in Settings → Voice.";default:return t}}const G=6e4,J=3e3,z=2e4,B=8e3,W=45e3;let M=null,E=null,l=null,_=!1;const R=new Set;function X(){return typeof window>"u"?!1:typeof fetch=="function"}function K(){return M||(M=new Q),M}function me(t){return R.add(t),l&&t(l),()=>{R.delete(t)}}function we(){if(_||!X())return;_=!0;const t=K();t.probe();const e=()=>{t.probeIfStale()};window.addEventListener("focus",e),document.addEventListener("visibilitychange",()=>{document.visibilityState==="visible"&&e()})}function I(t){for(const e of R)e(t)}function O(t,e=Date.now()){const n=t.ok?z:B;return e-t.probedAt<n}class Q{state="unknown";unavailableReason=null;captureMode=null;hostReachable=!1;microphoneGranted=null;microphoneCanRequest=null;inputDeviceName=null;get connectionState(){return this.state}get lastUnavailableReason(){return this.unavailableReason}get preferredCaptureMode(){return this.captureMode}get isVoiceHostReachable(){return this.hostReachable}get activeInputDeviceName(){return this.inputDeviceName}get isMicrophoneGranted(){return this.microphoneGranted}get canRequestMicrophone(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!0}get isMicrophoneHardDenied(){return this.hostReachable&&this.microphoneGranted===!1&&this.microphoneCanRequest===!1}get isMicrophoneDenied(){return this.isMicrophoneHardDenied}async probeIfStale(){const e=Date.now();return l&&O(l,e)?(this.applyProbeSnapshot(l),l.ok):l&&l.ok&&e-l.probedAt<W?(this.applyProbeSnapshot(l),!0):l&&!l.ok?this.probe({force:!0}):this.probe()}async probe(e={}){const n=typeof e=="number"?{timeoutMs:e}:e,i=n.force??!1,r=n.timeoutMs??J,o=Date.now();return!i&&l&&O(l,o)?(this.applyProbeSnapshot(l),l.ok):E||(this.state="probing",E=this.fetchProbe(r).finally(()=>{E=null}),E)}async fetchProbe(e){const n=new AbortController,i=window.setTimeout(()=>n.abort(),e);try{const r=await fetch("/api/voice/health?quiet=1",{signal:n.signal}),o=await r.json().catch(()=>({})),a=!!o.host?.hostId,u=typeof o.microphoneGranted=="boolean"?o.microphoneGranted:null,h=typeof o.microphoneCanRequest=="boolean"?o.microphoneCanRequest:null,d=typeof o.inputDevice?.name=="string"&&o.inputDevice.name.trim()?o.inputDevice.name.trim():null,w=o.capture==="browser"?"browser":"native",S=r.ok&&o.ok===!0,v=S?null:o.detail??o.error??(a?"Scout voice is not ready.":"Scout voice service is unavailable."),f={ok:S,reason:v,captureMode:S?w:null,hostReachable:a,microphoneGranted:u,microphoneCanRequest:h,inputDeviceName:d,probedAt:Date.now()};return l=f,this.applyProbeSnapshot(f),I(f),S}catch(r){const a={ok:!1,reason:r instanceof Error&&r.name==="AbortError"?"Scout voice service did not respond.":"Scout voice service is unavailable.",captureMode:null,hostReachable:!1,microphoneGranted:null,microphoneCanRequest:null,inputDeviceName:null,probedAt:Date.now()};return l=a,this.applyProbeSnapshot(a),I(a),!1}finally{window.clearTimeout(i)}}applyProbeSnapshot(e){if(this.hostReachable=e.hostReachable,this.microphoneGranted=e.microphoneGranted,this.microphoneCanRequest=e.microphoneCanRequest,this.inputDeviceName=e.inputDeviceName,e.ok){this.unavailableReason=null,this.captureMode=e.captureMode,this.state="connected";return}this.unavailableReason=e.reason,this.captureMode=null,this.state="unavailable"}async launch(e={}){try{const i=await(await fetch("/api/scout-services/restart-link",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({target:"all"})})).json().catch(()=>({}));if(i.url?.startsWith("scout://services/restart/")){window.location.href=i.url;return}}catch{}window.location.href="scout://hud/show"}async startLive(e={},n={}){return this.captureMode!=="browser"?await Y(e,n):await Z(e)}}async function Y(t={},e={}){t.onState?.("starting");const n=await fetch("/api/voice/session",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({clientId:"openscout-web",surface:e.surface?.trim()||"chat-composer"})});if(!n.ok){const s=await n.text().catch(()=>"");throw new Error(y(s,n.status))}const r=(await n.json()).sessionId?.trim();if(!r)throw new Error("Scout voice did not return a session id.");let o=!1,a,u;const h=new Promise((s,p)=>{a=s,u=p});let d=null;const w=()=>{d&&window.clearTimeout(d),d=window.setTimeout(()=>{v(new Error("Scout voice transcription timed out. Try again or check voice settings."))},G)},S=()=>{d&&(window.clearTimeout(d),d=null)},v=(s,p="error")=>{o||(o=!0,S(),m.close(),t.onState?.(p),u(s))},f=s=>{o||(o=!0,S(),m.close(),t.onFinal?.(s),t.onState?.("done"),a(s))},m=new EventSource(`/api/voice/session/${encodeURIComponent(r)}/events`),c=s=>p=>{if(o)return;let g={};try{g=JSON.parse(p.data)}catch{return}if(s==="session.partial"){const b=typeof g.text=="string"?g.text:"";t.onPartial?.(b);return}if(s==="session.state"){const b=ee(g.state);b&&(t.onState?.(b),b==="processing"&&w());return}if(s==="session.final"){f({sessionId:r,text:typeof g.text=="string"?g.text.trim():"",durationMs:Number(g.durationMs??0)});return}if(s==="session.cancelled"){v(T(),"cancelled");return}if(s==="session.error"){const b=typeof g.message=="string"?g.message:"Scout voice session failed.",L=typeof g.code=="string"?g.code:null;v(new Error(H(b,L)))}};return m.addEventListener("session.started",()=>{t.onState?.("starting")}),m.addEventListener("session.state",c("session.state")),m.addEventListener("session.partial",c("session.partial")),m.addEventListener("session.final",c("session.final")),m.addEventListener("session.cancelled",c("session.cancelled")),m.addEventListener("session.error",c("session.error")),m.onerror=()=>{o||v(new Error("Scout voice event stream disconnected."))},{get sessionId(){return r},result:h,stop:async()=>{t.onState?.("processing"),w();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/stop`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}},cancel:async()=>{o=!0,S(),m.close();const s=await fetch(`/api/voice/session/${encodeURIComponent(r)}/cancel`,{method:"POST"});if(!s.ok){const p=await s.text().catch(()=>"");throw new Error(y(p,s.status))}t.onState?.("cancelled"),u(T())}}}async function Z(t={}){if(typeof MediaRecorder>"u"||!navigator.mediaDevices?.getUserMedia)throw new Error("Scout voice capture is unavailable in this browser.");const{startStreamLevelMeter:e}=await x(async()=>{const{startStreamLevelMeter:c}=await import("./voice-levels-Dcr3jglk.js");return{startStreamLevelMeter:c}},[]),n=ue(),i=[];let r=null,o=null,a=null,u=!1,h=!1,d,w;const S=new Promise((c,s)=>{d=c,w=s}),v=()=>{a?.stop(),a=null;for(const c of r?.getTracks()??[])c.stop();r=null},f=(c,s="error")=>{h||(h=!0,v(),t.onState?.(s),w(c))},m=async()=>{if(h)return;if(v(),u){f(T(),"cancelled");return}t.onState?.("processing");const c=o?.mimeType||V()||"application/octet-stream",s=new Blob(i,{type:c});if(s.size===0){f(new Error("No voice audio was captured."));return}try{const p=await re(s,{sessionId:n});if(h)return;h=!0,t.onFinal?.(p),t.onState?.("done"),d(p)}catch(p){f(p instanceof Error?p:new Error(String(p)))}};try{t.onState?.("starting"),r=await navigator.mediaDevices.getUserMedia({audio:!0}),t.onLevel&&(a=e(r,t.onLevel));const c=V();o=new MediaRecorder(r,c?{mimeType:c}:void 0),o.addEventListener("dataavailable",s=>{s.data.size>0&&i.push(s.data)}),o.addEventListener("error",()=>{f(new Error("Scout voice recorder failed."))}),o.addEventListener("stop",()=>{m()},{once:!0}),o.start(),t.onPartial?.(""),t.onState?.("recording")}catch(c){const s=c instanceof Error?c:new Error(String(c));throw f(s),S.catch(()=>{}),s}return{get sessionId(){return n},result:S,stop:async()=>{!o||o.state==="inactive"||o.stop()},cancel:async()=>{if(u=!0,o&&o.state!=="inactive"){o.stop();return}f(T(),"cancelled")}}}function ee(t){return t==="starting"||t==="recording"||t==="processing"||t==="done"||t==="cancelled"||t==="error"?t:null}function y(t,e){try{return JSON.parse(t).error??`Scout voice returned HTTP ${e}`}catch{return t||`Scout voice returned HTTP ${e}`}}function Se(t){return t instanceof Error&&t.name==="AbortError"}async function D(t,e={}){const n={text:t,speed:ce(e.speed)};e.modelId&&(n.modelId=e.modelId),e.voiceId&&(n.voiceId=e.voiceId),e.originAppId&&(n.originAppId=e.originAppId),e.utteranceId&&(n.utteranceId=e.utteranceId),e.instructions&&(n.instructions=e.instructions),e.speechTiming?.enabled&&(n.speechTiming=e.speechTiming);const i=await fetch("/api/voice/speak",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(n),signal:e.signal});if(!i.ok){const r=await i.text().catch(()=>"");try{const o=JSON.parse(r);throw new Error(o.error??`Scout voice returned HTTP ${i.status}`)}catch(o){throw o instanceof SyntaxError?new Error(r||`Scout voice returned HTTP ${i.status}`):o}}return await i.json()}async function ge(t){const e=t?`?modelId=${encodeURIComponent(t)}`:"",n=await fetch(`/api/voice/catalog${e}`,{headers:{accept:"application/json"}});if(!n.ok)throw new Error(`Scout voice catalog returned HTTP ${n.status}`);return await n.json()}async function te(t,e={}){if(e.signal?.aborted)throw P();const n=new Audio(`data:${t.contentType};base64,${t.audioBase64}`),i=()=>{n.pause(),n.currentTime=0};e.signal?.addEventListener("abort",i,{once:!0}),await n.play(),e.onPlaybackStart?.();try{return await new Promise((r,o)=>{const a=()=>{n.removeEventListener("ended",u),n.removeEventListener("error",h),e.signal?.removeEventListener("abort",d)},u=()=>{a(),r()},h=()=>{a(),o(new Error("Scout voice playback failed."))},d=()=>{a(),o(P())};if(e.signal?.aborted){d();return}n.addEventListener("ended",u,{once:!0}),n.addEventListener("error",h,{once:!0}),e.signal?.addEventListener("abort",d,{once:!0})}),t}finally{e.signal?.removeEventListener("abort",i)}}async function ne(t,e={}){const n=await D(t,e);return await te(n,{signal:e.signal})}function ve(t,e={}){const n=new AbortController;return{promise:ne(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function oe(t,e={}){const n=await D(t,e);if(e.signal?.aborted)throw P();const i=await k(n.audioBase64,n.contentType),r=ae(e.presetId,e.params);return await A(i,{params:r,signal:e.signal}).promise,n}function ye(t,e={}){const n=new AbortController;return{promise:oe(t,{...e,signal:n.signal}),stop:()=>n.abort()}}async function re(t,e){const n=new FormData,i=ie(t.type);n.append("audio",t,`audio.${se(t.type)}`),n.append("sessionId",e.sessionId),i&&n.append("format",i);const r=await fetch("/api/voice/transcribe",{method:"POST",body:n});if(!r.ok){const a=await r.text().catch(()=>"");try{const u=JSON.parse(a);throw new Error(u.error??`Scout voice returned HTTP ${r.status}`)}catch(u){throw u instanceof SyntaxError?new Error(a||`Scout voice returned HTTP ${r.status}`):u}}const o=await r.json();return{sessionId:e.sessionId,text:o.text?.trim()??"",durationMs:Number(o.durationMs??0)}}function P(){const t=new Error("Speech stopped.");return t.name="AbortError",t}function T(){const t=new Error("Voice recording was cancelled.");return t.name="AbortError",t}function V(){return typeof MediaRecorder>"u"||typeof MediaRecorder.isTypeSupported!="function"?void 0:["audio/webm;codecs=opus","audio/ogg;codecs=opus","audio/mp4","audio/webm","audio/wav"].find(e=>{try{return MediaRecorder.isTypeSupported(e)}catch{return!1}})}function ie(t){const e=t.toLowerCase();if(e.includes("mp3")||e.includes("mpeg"))return"mp3";if(e.includes("wav"))return"wav";if(e.includes("aac")||e.includes("mp4"))return"aac";if(e.includes("opus")||e.includes("ogg")||e.includes("webm"))return"opus"}function se(t){const e=t.toLowerCase();return e.includes("webm")?"webm":e.includes("ogg")||e.includes("opus")?"opus":e.includes("mp4")||e.includes("aac")?"m4a":e.includes("wav")?"wav":e.includes("mp3")||e.includes("mpeg")?"mp3":"audio"}function ae(t,e){const n=t?q.find(i=>i.id===t)?.params:void 0;return{...N,...n??{},...e??{}}}function ce(t){if(!(t===void 0||!Number.isFinite(t)))return Math.min(2,Math.max(.5,Number(t.toFixed(2))))}function ue(){return typeof crypto<"u"&&typeof crypto.randomUUID=="function"?`scout-voice:${crypto.randomUUID()}`:`scout-voice:${Date.now().toString(36)}:${Math.random().toString(36).slice(2)}`}async function de(){const t=await fetch("/api/voice/settings");if(!t.ok){const e=await t.text().catch(()=>"");throw new Error(y(e,t.status))}return await t.json()}async function be(t="microphone"){const e=await fetch("/api/voice/permissions/open",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}}async function C(t="microphone"){const e=await fetch("/api/voice/permissions/request",{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify({kind:t})});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}}async function Ee(t=12){const e=await fetch(`/api/voice/history?limit=${t}`);if(!e.ok){const i=await e.text().catch(()=>"");throw new Error(y(i,e.status))}return(await e.json()).sessions??[]}async function Te(t){const e=await fetch("/api/voice/settings",{method:"PUT",headers:{"content-type":"application/json"},body:JSON.stringify(t)});if(!e.ok){const n=await e.text().catch(()=>"");throw new Error(y(n,e.status))}return await e.json()}export{fe as a,ge as b,te as c,de as d,we as e,he as f,K as g,ve as h,Se as i,ye as j,Ee as k,Te as l,be as o,D as p,C as r,me as s};