@openscout/scout 0.2.78 → 0.2.80

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 (428) hide show
  1. package/README.md +19 -0
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-DMnobKch.js → AddProjectForm-CtEiLQnm.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-D90c1Rzk.js → AgentAvatar-CszU5eaU.js} +1 -1
  7. package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-BcRBRp88.js → AgentDetailCard-sZuHl1de.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-DMivAYHU.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-RrNnDZu8.js → AgentLaneCard-nB68f2CI.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-D9ZwUKrl.js → AgentLaneChrome-O9Yf0uR-.js} +1 -1
  14. package/dist/client/assets/AgentLaneDetailSheet-BfhpaEQ3.js +4 -0
  15. package/dist/client/assets/{AgentLaneSummaryResize-BhFmGNzT.js → AgentLaneSummaryResize-Ct3b0TQR.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-eSAoDsPi.js → AgentLanesPreflight-DNGvZvjd.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-DqRK5-d2.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-DBtnD0qE.js → AgentLiveActions-DI4ooSHW.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-DyqOf4nG.js → AgentSessions-BxWIPkWh.js} +2 -2
  21. package/dist/client/assets/AgentsConsole-D6VHSCfZ.js +1 -0
  22. package/dist/client/assets/AgentsScreen-zR6b2bUL.js +1 -0
  23. package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +1 -0
  24. package/dist/client/assets/{AtopView-BCkae3e1.js → AtopView-VZkk40v0.js} +1 -1
  25. package/dist/client/assets/BackToPicker-DZg_4nHL.js +1 -0
  26. package/dist/client/assets/{BriefingDetailScreen-BwFyysT8.js → BriefingDetailScreen-BZU4qMwE.js} +1 -1
  27. package/dist/client/assets/{BriefingsScreen-BQEevztH.js → BriefingsScreen-Bfc3tqPp.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-7UjcuNjd.js → BrokerMetadataPanel-CaFe6kdh.js} +1 -1
  29. package/dist/client/assets/BrokerScreen-Chh8sGen.js +5 -0
  30. package/dist/client/assets/{ChatCollapsedStrip-CQSYSd8s.js → ChatCollapsedStrip-Cov54p9V.js} +1 -1
  31. package/dist/client/assets/CodeDiffPane-C1ebFt-Y.js +1 -0
  32. package/dist/client/assets/{CodeProjectPicker-DqKFCpLU.js → CodeProjectPicker-tsCly-f3.js} +1 -1
  33. package/dist/client/assets/CodeScreen-D0hpZNLP.js +1 -0
  34. package/dist/client/assets/{ContextMenu-bARZqTzD.js → ContextMenu-N-Z6X0Z1.js} +1 -1
  35. package/dist/client/assets/ConversationComposer-CiEF7dhd.js +1 -0
  36. package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +1 -0
  37. package/dist/client/assets/ConversationHeader-BGgbITvr.js +1 -0
  38. package/dist/client/assets/ConversationPanels-vI9YuQJh.js +2 -0
  39. package/dist/client/assets/ConversationScreen-C-PrCRz1.js +1 -0
  40. package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
  41. package/dist/client/assets/ConversationStatus-COEj5loj.js +1 -0
  42. package/dist/client/assets/{DataTable-E8s_MmoA.js → DataTable-BoofV-_4.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-Dpe88DFX.js → DispatchAftermath-OXYlMbT1.js} +1 -1
  44. package/dist/client/assets/{DocumentFocusViewer-BeVwwl26.js → DocumentFocusViewer-BCG2kOmd.js} +1 -1
  45. package/dist/client/assets/{EmbeddableSurfacesLab-BQqFQVnI.js → EmbeddableSurfacesLab-C2SZvrHJ.js} +1 -1
  46. package/dist/client/assets/{EmptyState-4F9XDFQm.js → EmptyState-DypEjx0V.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-CLgUhSm4.js → FileViewerPane-CXCq-oKj.js} +1 -1
  48. package/dist/client/assets/{FleetSearch-Dz5euQJe.js → FleetSearch-Dj7-CfNi.js} +1 -1
  49. package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +1 -0
  50. package/dist/client/assets/FollowScreen-DRgYuAvp.js +1 -0
  51. package/dist/client/assets/HarnessMark-BE-YSyci.js +1 -0
  52. package/dist/client/assets/HarnessesScreen-L-emPcXd.js +1 -0
  53. package/dist/client/assets/HerdrSession-DKFCJMst.js +4 -0
  54. package/dist/client/assets/{HomeHero-B3uYd-pP.js → HomeHero-CAEg8Yg5.js} +1 -1
  55. package/dist/client/assets/KnowledgeSearchInspector-C2EZsQ5i.js +1 -0
  56. package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +1 -0
  57. package/dist/client/assets/{LaneToolHoverCard-Bla0gBdm.js → LaneToolHoverCard-DrPXYZvQ.js} +1 -1
  58. package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +1 -0
  59. package/dist/client/assets/{LaneTraceEventFocus-BF9ERP5O.js → LaneTraceEventFocus-X4-DDFEo.js} +1 -1
  60. package/dist/client/assets/{MeshCanvas-DFEPkpqY.js → MeshCanvas-rtCBD7s6.js} +2 -2
  61. package/dist/client/assets/{MeshCanvasMinimap-CyVFYixr.js → MeshCanvasMinimap-CuvXOkc7.js} +1 -1
  62. package/dist/client/assets/MeshScreen-D5zzTn0o.js +1 -0
  63. package/dist/client/assets/{MeshTopologyView-CalkZghg.js → MeshTopologyView-CeTShs-U.js} +2 -2
  64. package/dist/client/assets/{MessageComposerSuggestions-DpxN9WiB.js → MessageComposerSuggestions-Cs9u-F_3.js} +1 -1
  65. package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +1 -0
  66. package/dist/client/assets/MissionContextRail-0O-Zu1Tn.js +1 -0
  67. package/dist/client/assets/MissionControlView-D2JO9u-y.js +1 -0
  68. package/dist/client/assets/{MissionFocusOverlay-wlCmWDCT.js → MissionFocusOverlay-LnjmqBiW.js} +1 -1
  69. package/dist/client/assets/MissionLeftAgentRow-nc1Jyq3D.js +1 -0
  70. package/dist/client/assets/MissionLogPane-lZ9vUftY.js +1 -0
  71. package/dist/client/assets/{NewAgentModal-Bg-eWHpY.js → NewAgentModal-K1cvdmZr.js} +1 -1
  72. package/dist/client/assets/NewChatComposer-C5LT7MF7.css +1 -0
  73. package/dist/client/assets/NewChatComposer-DXDxV2Mh.js +19 -0
  74. package/dist/client/assets/{NewChatOrigin-Bk2OyVjI.js → NewChatOrigin-CnjoswTG.js} +1 -1
  75. package/dist/client/assets/ObserveEmbedScreen-CRpzYf0Y.js +2 -0
  76. package/dist/client/assets/{ObserveTextFlow-rsFj_rVo.js → ObserveTextFlow-DJxQc2H6.js} +2 -2
  77. package/dist/client/assets/{ObservedTopologyPanel-DyUeV98H.js → ObservedTopologyPanel-C1AQM0Mq.js} +1 -1
  78. package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +87 -0
  79. package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +1 -0
  80. package/dist/client/assets/OpsScreen-BeC0lieE.js +1 -0
  81. package/dist/client/assets/OpsSubnav-D5Bpowtk.js +1 -0
  82. package/dist/client/assets/{PlanView-C1CjH3PG.js → PlanView-DDXdC19M.js} +1 -1
  83. package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +1 -0
  84. package/dist/client/assets/{ProjectAgentProfileBar-CtTpj6fU.js → ProjectAgentProfileBar-MODhG0P6.js} +1 -1
  85. package/dist/client/assets/ProjectAgentProfileHero-C1ImgGDu.js +1 -0
  86. package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +2 -0
  87. package/dist/client/assets/{ProjectsRail-BgiuV4LR.js → ProjectsRail-B1zrQLZe.js} +1 -1
  88. package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +1 -0
  89. package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +1 -0
  90. package/dist/client/assets/Provider-DSsb2gLR.js +1 -0
  91. package/dist/client/assets/{RailRow-BoGxAHNF.js → RailRow-DerXOXQS.js} +1 -1
  92. package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +1 -0
  93. package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +1 -0
  94. package/dist/client/assets/{RepoDiffEmbedScreen-C0rumUME.js → RepoDiffEmbedScreen-C9oLCcZX.js} +1 -1
  95. package/dist/client/assets/{RepoDiffPageScreen-DMv6DioL.js → RepoDiffPageScreen-CGEMAv2Z.js} +1 -1
  96. package/dist/client/assets/RepoDiffViewer-CB8PSVey.js +7 -0
  97. package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +2 -0
  98. package/dist/client/assets/{ReposScreen-CB_YBWYf.js → ReposScreen-BN1lVjOj.js} +2 -2
  99. package/dist/client/assets/{ScoutDeckSurface-CxIYFyWx.js → ScoutDeckSurface-BCpl0QCx.js} +1 -1
  100. package/dist/client/assets/{ScoutSurface-CYz_TcWC.js → ScoutSurface-BEnDlynn.js} +1 -1
  101. package/dist/client/assets/{ScoutbotBroadcastChip-L_R9atj0.js → ScoutbotBroadcastChip-z9R_pC_U.js} +1 -1
  102. package/dist/client/assets/{ScoutbotFxLab-CgiZMDMW.js → ScoutbotFxLab-fAROyIfz.js} +1 -1
  103. package/dist/client/assets/{ScoutbotRealtimeVoiceCall-FMQOr1Np.js → ScoutbotRealtimeVoiceCall-CDyFJX8m.js} +1 -1
  104. package/dist/client/assets/{SecondaryNav-B3-nh5dM.js → SecondaryNav-Hv5AJ3Fv.js} +1 -1
  105. package/dist/client/assets/SessionEmbedScreen-CDRpQc3g.js +1 -0
  106. package/dist/client/assets/SessionObserve-BmmJ8dEh.js +12 -0
  107. package/dist/client/assets/SessionObserve-CLrHfAKZ.css +1 -0
  108. package/dist/client/assets/SessionObserveEvidence-CEedIk2a.js +1 -0
  109. package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +1 -0
  110. package/dist/client/assets/SessionsScreen-BJEjuo2X.js +1 -0
  111. package/dist/client/assets/{SettingsDrawer-XfdAa_nD.js → SettingsDrawer-DL-SVLdd.js} +3 -3
  112. package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
  113. package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +1 -0
  114. package/dist/client/assets/{ShikiPane-Ap1iPxYb.js → ShikiPane-B7O4if20.js} +1 -1
  115. package/dist/client/assets/{SlidePanel-COwtoJqR.js → SlidePanel-B3gc5HnM.js} +1 -1
  116. package/dist/client/assets/SpriteAvatar-BpQDpOkq.js +1 -0
  117. package/dist/client/assets/{StatusPill-DhBL__p8.js → StatusPill-B33sQinT.js} +1 -1
  118. package/dist/client/assets/{TailView-DGj_5HA9.js → TailView-DL3YZkzE.js} +2 -2
  119. package/dist/client/assets/Terminal-Dp1FSGIS.js +1 -0
  120. package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +1 -0
  121. package/dist/client/assets/{TextDocumentSurface-BpAw4eQS.js → TextDocumentSurface-DRjctOIt.js} +1 -1
  122. package/dist/client/assets/{TmuxPeek-m1osv33Q.js → TmuxPeek-DNC4uWky.js} +1 -1
  123. package/dist/client/assets/{VoicePermissionsPanel-DsK53ar4.js → VoicePermissionsPanel-WLN0V-Xv.js} +1 -1
  124. package/dist/client/assets/{WorkDetailScreen-Bx0JimPC.js → WorkDetailScreen-D2Yl0mYZ.js} +3 -3
  125. package/dist/client/assets/{WorkFilesViewer-Btl6C2Q1.js → WorkFilesViewer-BbVfcUN-.js} +1 -1
  126. package/dist/client/assets/{activity-CA8qS6PI.js → activity-BxwKkT8z.js} +1 -1
  127. package/dist/client/assets/{addon-fit-BZ-kXjeN.js → addon-fit-B9O2vJoh.js} +1 -1
  128. package/dist/client/assets/{addon-webgl-D9-EQVEK.js → addon-webgl-BhRZFDcn.js} +1 -1
  129. package/dist/client/assets/{agent-essentials-BSY1o46q.js → agent-essentials-SrzMYEXV.js} +1 -1
  130. package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
  131. package/dist/client/assets/agent-lane-card-BkWVDYM8.css +1 -0
  132. package/dist/client/assets/{agent-lane-card-model-r2frk57c.js → agent-lane-card-model-DSWdGu-v.js} +1 -1
  133. package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +2 -0
  134. package/dist/client/assets/{agent-lane-preview-CmHVe3dU.js → agent-lane-preview-C33Dwpn7.js} +1 -1
  135. package/dist/client/assets/{agent-lanes-model-B4YTt4OF.js → agent-lanes-model-CPgQRenB.js} +2 -2
  136. package/dist/client/assets/{arc.es-CQBb-dVu.js → arc.es-NlJw-19N.js} +1 -1
  137. package/dist/client/assets/{arrow-down-BPLe0am9.js → arrow-down-D3-IbArq.js} +1 -1
  138. package/dist/client/assets/{arrow-left-DEZzHiPS.js → arrow-left-_vS7itsV.js} +1 -1
  139. package/dist/client/assets/{arrow-up-right-ClxBnsi7.js → arrow-up-right-CcrWONpD.js} +1 -1
  140. package/dist/client/assets/{bot-eu8pBNvI.js → bot-BRINYlC6.js} +1 -1
  141. package/dist/client/assets/{check-DjgFiBxb.js → check-COxArFXG.js} +1 -1
  142. package/dist/client/assets/{chevron-down-BGk5qoEw.js → chevron-down-DRCbnzyY.js} +1 -1
  143. package/dist/client/assets/{chevron-right-XiIHsk4m.js → chevron-right-CNE6QAVr.js} +1 -1
  144. package/dist/client/assets/chunk-HRAB3GC3-CAeEKaf5.js +1 -0
  145. package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +46 -0
  146. package/dist/client/assets/{chunk-T65CQEWV-CrzwSeEt.js → chunk-T65CQEWV-CiZ_ICHW.js} +1 -1
  147. package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +2 -0
  148. package/dist/client/assets/clock-CyfvRmj6.js +1 -0
  149. package/dist/client/assets/{code-xml-B6jOCM4V.js → code-xml--LjSM4Mv.js} +1 -1
  150. package/dist/client/assets/content-7ZeCPAEt.js +1 -0
  151. package/dist/client/assets/content-BHUcUCH5.js +1 -0
  152. package/dist/client/assets/content-BUhvLPkv.js +1 -0
  153. package/dist/client/assets/content-BomQ5YWo.js +1 -0
  154. package/dist/client/assets/content-C39ELNgC.js +1 -0
  155. package/dist/client/assets/content-C4RYKHut.js +1 -0
  156. package/dist/client/assets/content-CCiZfG4H.js +1 -0
  157. package/dist/client/assets/content-CDpDtVI-.js +1 -0
  158. package/dist/client/assets/content-CO-9CeFd.js +1 -0
  159. package/dist/client/assets/content-CuOLxp1x.js +1 -0
  160. package/dist/client/assets/content-CvtLIjXS.js +1 -0
  161. package/dist/client/assets/content-CzwTUb9n.js +1 -0
  162. package/dist/client/assets/content-DQXbo2RO.js +1 -0
  163. package/dist/client/assets/content-DRTQ9QQb.js +1 -0
  164. package/dist/client/assets/content-LCELs6zg.js +1 -0
  165. package/dist/client/assets/content-Uqt8AG-s.css +1 -0
  166. package/dist/client/assets/content-qsDjA4Au.js +1 -0
  167. package/dist/client/assets/{context-budget-CbB4BDcO.js → context-budget-DX_fwUs3.js} +1 -1
  168. package/dist/client/assets/{conversation-icons-IIG5ha6D.js → conversation-icons-c-hXv7hY.js} +1 -1
  169. package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
  170. package/dist/client/assets/conversation-motion-features-T8vF9zED.js +1 -0
  171. package/dist/client/assets/{copy-CQGYbxdu.js → copy-4LfKIdQJ.js} +1 -1
  172. package/dist/client/assets/{createLucideIcon-OpA4Amw5.js → createLucideIcon-ClCdc3F9.js} +1 -1
  173. package/dist/client/assets/discover-7Ks00w-M.js +2 -0
  174. package/dist/client/assets/embed-entry-n2ThmSSX.js +2 -0
  175. package/dist/client/assets/{external-link-CXBytO9o.js → external-link-CnaI1QFS.js} +1 -1
  176. package/dist/client/assets/{eye-0PvebX_a.js → eye-BFlhMzQL.js} +1 -1
  177. package/dist/client/assets/{file-text-BODxCjcz.js → file-text-DG-pufl1.js} +1 -1
  178. package/dist/client/assets/{gestures-CcwOTu8C.js → gestures-CxG3Dphs.js} +1 -1
  179. package/dist/client/assets/home-live-action-BkqGLVRY.js +1 -0
  180. package/dist/client/assets/home-moving-signal-aNJusIzL.js +1 -0
  181. package/dist/client/assets/home-now-card-BQK4EFHx.js +1 -0
  182. package/dist/client/assets/{home-now-card-nano-BcjnOU9H.js → home-now-card-nano-CdtzqSIF.js} +1 -1
  183. package/dist/client/assets/hooks-Dst1TH7n.js +2 -0
  184. package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +1 -0
  185. package/dist/client/assets/index-9as_JTUs.css +1 -0
  186. package/dist/client/assets/index-CU9dtwJk.js +1 -0
  187. package/dist/client/assets/{index-DMiGbrBt.js → index-CzVeWScw.js} +6 -6
  188. package/dist/client/assets/index-Dewd56RX.js +1 -0
  189. package/dist/client/assets/index-_YQXKEhb.js +1 -0
  190. package/dist/client/assets/{inspector-panel-DPoCWxKs.js → inspector-panel-DgOM8nCo.js} +2 -2
  191. package/dist/client/assets/keyboard-nav-BJnFoFDP.js +1 -0
  192. package/dist/client/assets/knowledge-search-D_bLoYtC.css +1 -0
  193. package/dist/client/assets/{lane-observe-D0rfKDnU.js → lane-observe-BA3g9aVd.js} +1 -1
  194. package/dist/client/assets/{lane-roster-store-D8x1jac2.js → lane-roster-store-pR4ZaYQm.js} +1 -1
  195. package/dist/client/assets/left-BhzPp-_E.js +1 -0
  196. package/dist/client/assets/left-CN1MABD0.js +2 -0
  197. package/dist/client/assets/left-DDgbsio7.js +1 -0
  198. package/dist/client/assets/left-Dpf2R9uD.js +1 -0
  199. package/dist/client/assets/left-HwwbMVtl.js +2 -0
  200. package/dist/client/assets/left-YfH0daht.js +1 -0
  201. package/dist/client/assets/left-agents-CYUwAy2Z.js +1 -0
  202. package/dist/client/assets/left-default-vEGZALPv.js +1 -0
  203. package/dist/client/assets/left-lanes-bphF-vlX.js +1 -0
  204. package/dist/client/assets/left-mission-B54-c3hq.js +1 -0
  205. package/dist/client/assets/left-np5USKqG.js +1 -0
  206. package/dist/client/assets/left-plan-BNBuDoPQ.js +2 -0
  207. package/dist/client/assets/library-DbCVJG_O.js +1 -0
  208. package/dist/client/assets/{loader-circle-CbHjZsz1.js → loader-circle-Byb9kSFx.js} +1 -1
  209. package/dist/client/assets/{local-agents--00gLMqr.js → local-agents-DBaUbP-_.js} +1 -1
  210. package/dist/client/assets/{mentions-jSuTGeet.js → mentions-fbQJ2mBI.js} +1 -1
  211. package/dist/client/assets/mesh-ops-B1kDjizF.css +1 -0
  212. package/dist/client/assets/mesh-ops-Cnw3vwAu.js +1 -0
  213. package/dist/client/assets/{mesh-view-store-CWidRbTE.js → mesh-view-store-Btlyc7rW.js} +1 -1
  214. package/dist/client/assets/{message-circle-CG-96zts.js → message-circle-aGOfQWm2.js} +1 -1
  215. package/dist/client/assets/{message-markup-3J9pi3nx.js → message-markup-mGF07emJ.js} +1 -1
  216. package/dist/client/assets/{message-square-DSaGpjFU.js → message-square-CIXda-Y7.js} +1 -1
  217. package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
  218. package/dist/client/assets/{mission-control-store-BlnEhiCq.js → mission-control-store-CcoNeQHG.js} +1 -1
  219. package/dist/client/assets/mission-wall-CocIM1cF.js +1 -0
  220. package/dist/client/assets/{model-CpAxGuis.js → model-IGCUEsMy.js} +1 -1
  221. package/dist/client/assets/{observe-CuLGD9Zp.js → observe-BNFzh-7B.js} +1 -1
  222. package/dist/client/assets/openAgent-Dbv5wfuL.js +1 -0
  223. package/dist/client/assets/{page-status-DpkedE1F.js → page-status-DDvNdA8s.js} +1 -1
  224. package/dist/client/assets/paperclip-DfpJkR4s.js +1 -0
  225. package/dist/client/assets/{plus--b1raV_O.js → plus-CmFQp9Uj.js} +1 -1
  226. package/dist/client/assets/profile-s3KRbip1.js +1 -0
  227. package/dist/client/assets/{projects-inbox-CHyUFQ6w.js → projects-inbox-Diddml6e.js} +1 -1
  228. package/dist/client/assets/{radio-Bz8ZePxj.js → radio-PauJIekM.js} +1 -1
  229. package/dist/client/assets/{refresh-cw-BBmAnCB7.js → refresh-cw-4oeFn1Jn.js} +1 -1
  230. package/dist/client/assets/repo-diff-DyYmQMSA.css +1 -0
  231. package/dist/client/assets/resolve-panes-cp6eNewO.js +1 -0
  232. package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +1 -0
  233. package/dist/client/assets/right-09W2JJFg.js +1 -0
  234. package/dist/client/assets/right-B-MKhiJ6.js +1 -0
  235. package/dist/client/assets/right-B91Zl8lQ.js +1 -0
  236. package/dist/client/assets/{right-DjRXbnRP.js → right-BcFnuse9.js} +1 -1
  237. package/dist/client/assets/right-BdtMzn35.js +1 -0
  238. package/dist/client/assets/right-BqmKXLtf.js +1 -0
  239. package/dist/client/assets/right-BzeB-Dpt.js +1 -0
  240. package/dist/client/assets/right-CkGOs-sq.js +1 -0
  241. package/dist/client/assets/right-CzGiNBzB.js +1 -0
  242. package/dist/client/assets/right-Dc7uqv7l.js +1 -0
  243. package/dist/client/assets/{rocket-BSNS_rLs.js → rocket-C-AskjZH.js} +1 -1
  244. package/dist/client/assets/router-B-K15T7B.js +1 -0
  245. package/dist/client/assets/{runtime-picker-Bcl5iIX5.js → runtime-picker-BCQD7d4K.js} +1 -1
  246. package/dist/client/assets/{scope-views-U-ucT9m0.js → scope-views-BhkbIFPY.js} +1 -1
  247. package/dist/client/assets/{scout-voice-CU5c0LGi.js → scout-voice-S5_YZ2v8.js} +1 -1
  248. package/dist/client/assets/{scroll-text-D6Pdnar7.js → scroll-text-BV-BB7v-.js} +1 -1
  249. package/dist/client/assets/{search-CWfZtOt2.js → search-C3bSJluv.js} +1 -1
  250. package/dist/client/assets/secondaryNavConfig-Bg4Tc0gT.js +1 -0
  251. package/dist/client/assets/{selection-bridge-16pk1qyG.js → selection-bridge-B1dmkX3P.js} +1 -1
  252. package/dist/client/assets/{send-horizontal-Bg5-QggH.js → send-horizontal-CqogPmbY.js} +1 -1
  253. package/dist/client/assets/{server-CPp4ZJhZ.js → server-Brw5Y1Gh.js} +1 -1
  254. package/dist/client/assets/{session-catalog-BmoyVTJ_.js → session-catalog-9FqXmjBw.js} +1 -1
  255. package/dist/client/assets/session-table-1xdSxSXq.js +1 -0
  256. package/dist/client/assets/{sliders-horizontal-1oW76Xc9.js → sliders-horizontal-CUiOH26y.js} +1 -1
  257. package/dist/client/assets/sparkles-BjCA3Evu.js +1 -0
  258. package/dist/client/assets/{sse-CjIkKo46.js → sse-QcU9bikk.js} +1 -1
  259. package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +1 -0
  260. package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
  261. package/dist/client/assets/{tail-display-BdyoLvzY.js → tail-display-BRcJltQa.js} +2 -2
  262. package/dist/client/assets/{tail-events-D19uAGe3.js → tail-events-C6K7bCWB.js} +1 -1
  263. package/dist/client/assets/{terminal-B9AOZQKR.js → terminal-DrTkVXIj.js} +1 -1
  264. package/dist/client/assets/{terminal-relay-CWbJ1RCW.js → terminal-relay-BkXjjSkq.js} +1 -1
  265. package/dist/client/assets/{terminal-screen-19jAI0Cw.css → terminal-screen-BqVnCwl0.css} +1 -1
  266. package/dist/client/assets/terminal-sessions-C3qU8tnY.js +1 -0
  267. package/dist/client/assets/{terminal-takeover-B8UeD9OX.js → terminal-takeover-KvmTwABa.js} +1 -1
  268. package/dist/client/assets/{time-DltNTpLl.js → time-Dhsh_2EG.js} +1 -1
  269. package/dist/client/assets/{use-conversation-list-Byab41G6.js → use-conversation-list-C5sF6WBR.js} +1 -1
  270. package/dist/client/assets/{use-fleet-active-asks-BIbQx5AS.js → use-fleet-active-asks-BOMPW0nl.js} +1 -1
  271. package/dist/client/assets/use-mesh-ops-items-Co05vcTV.js +1 -0
  272. package/dist/client/assets/{use-reduced-motion-RRBkmVkk.js → use-reduced-motion-Dla-G_Jz.js} +1 -1
  273. package/dist/client/assets/use-scout-dev-flags-BOQF3fW2.js +1 -0
  274. package/dist/client/assets/{useAgentHoverCard-DMrbBif0.js → useAgentHoverCard-FtCmY-b9.js} +1 -1
  275. package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +1 -0
  276. package/dist/client/assets/usePierreRuntime-Bo4lD7Ui.js +50 -0
  277. package/dist/client/assets/{wrench-Bkc_0lKF.js → wrench-CeCdjiPF.js} +1 -1
  278. package/dist/client/assets/{x-D3GElQbe.js → x-D4X_y1j_.js} +1 -1
  279. package/dist/client/assets/{xterm-BKR8oAkR.js → xterm-D2a5wrkJ.js} +1 -1
  280. package/dist/client/index.html +2 -2
  281. package/dist/drizzle/0007_lean_venus.sql +26 -0
  282. package/dist/drizzle/0008_luxuriant_ted_forrester.sql +1 -0
  283. package/dist/drizzle/meta/0007_snapshot.json +5767 -0
  284. package/dist/drizzle/meta/0008_snapshot.json +5774 -0
  285. package/dist/drizzle/meta/_journal.json +14 -0
  286. package/dist/main.mjs +29271 -4824
  287. package/dist/node/main.mjs +31635 -11915
  288. package/dist/openscout-terminal-relay.mjs +16 -4
  289. package/dist/pairing-runtime-controller.mjs +37812 -16924
  290. package/dist/runtime/base-daemon.mjs +109 -18
  291. package/dist/runtime/broker-daemon.mjs +22247 -2746
  292. package/dist/runtime/broker-process-manager.mjs +122 -12
  293. package/dist/runtime/mesh-discover.mjs +90 -13
  294. package/dist/scout-control-plane-web.mjs +23083 -3481
  295. package/dist/scout-web-server.mjs +23083 -3481
  296. package/dist/statusline.mjs +2 -0
  297. package/package.json +3 -1
  298. package/dist/client/assets/ActivityScreen-Cu_1V4bq.js +0 -1
  299. package/dist/client/assets/AgentConfigurationScreen-BqfOz90D.js +0 -1
  300. package/dist/client/assets/AgentDefinitionsWorkspace-CUpUrY57.js +0 -1
  301. package/dist/client/assets/AgentFloorView-8LoAEBwS.js +0 -1
  302. package/dist/client/assets/AgentInfoScreen-DZs2_ibL.js +0 -1
  303. package/dist/client/assets/AgentLaneDetailSheet-BXbPls9N.js +0 -5
  304. package/dist/client/assets/AgentLanesEmbedScreen-W3qs022h.js +0 -1
  305. package/dist/client/assets/AgentLanesView-B9vuEEmZ.js +0 -2
  306. package/dist/client/assets/AgentsConsole-BgiYP2wR.js +0 -1
  307. package/dist/client/assets/AgentsScreen-DBi8x4MB.js +0 -1
  308. package/dist/client/assets/AgentsSubnav-DIEO4NPx.js +0 -1
  309. package/dist/client/assets/BackToPicker-BRvfostO.js +0 -1
  310. package/dist/client/assets/BrokerScreen-7ekklu88.js +0 -5
  311. package/dist/client/assets/CodeDiffPane-DDPt6KPh.js +0 -1
  312. package/dist/client/assets/CodeScreen-BxCrpRHd.js +0 -1
  313. package/dist/client/assets/ConversationComposer-Bla3DDvM.js +0 -1
  314. package/dist/client/assets/ConversationFeedRows-B_gPxcqA.js +0 -1
  315. package/dist/client/assets/ConversationHeader-DE3FC0m-.js +0 -1
  316. package/dist/client/assets/ConversationPanels-DLek4H6A.js +0 -2
  317. package/dist/client/assets/ConversationScreen-BDRhx-RU.js +0 -1
  318. package/dist/client/assets/ConversationScreen-C9yMAMYF.css +0 -1
  319. package/dist/client/assets/ConversationStatus-BwVLiiO4.js +0 -1
  320. package/dist/client/assets/FlightObserveScreen-6RpZYwVz.js +0 -1
  321. package/dist/client/assets/FollowScreen-DZ4qfYOY.js +0 -1
  322. package/dist/client/assets/HarnessMark-Cbv3Ib0c.js +0 -1
  323. package/dist/client/assets/HarnessesScreen-CznAImej.js +0 -1
  324. package/dist/client/assets/KnowledgeSearchInspector-Dgdkfvvz.js +0 -1
  325. package/dist/client/assets/KnowledgeSearchScreen-DJDGGaqC.js +0 -1
  326. package/dist/client/assets/LaneTraceDetailSheet-D1CspRbl.js +0 -1
  327. package/dist/client/assets/MeshScreen-DFgevn8N.js +0 -1
  328. package/dist/client/assets/MessagesScreen-C8YKW10Y.js +0 -1
  329. package/dist/client/assets/MissionControlView-lUeAiSVg.js +0 -1
  330. package/dist/client/assets/MissionLeftAgentRow-BpZWntfl.js +0 -1
  331. package/dist/client/assets/MissionLogPane-__MVtEl9.js +0 -1
  332. package/dist/client/assets/NewChatComposer-Cs6OsxK6.js +0 -19
  333. package/dist/client/assets/NewChatComposer-W-t-L4oV.css +0 -1
  334. package/dist/client/assets/ObserveEmbedScreen-y2EpuqRZ.js +0 -2
  335. package/dist/client/assets/OpenScoutAppShell-C_URc8sV.js +0 -87
  336. package/dist/client/assets/OpsAgentsView-UN7iOscs.js +0 -1
  337. package/dist/client/assets/OpsScreen-Buf3LKjb.js +0 -1
  338. package/dist/client/assets/OpsSubnav-DsuXzHah.js +0 -1
  339. package/dist/client/assets/ProjectAgentProfile-DJusrAV-.js +0 -1
  340. package/dist/client/assets/ProjectAgentProfileHero-BFwNJo_N.js +0 -1
  341. package/dist/client/assets/ProjectsInbox-GhVMxOhw.js +0 -2
  342. package/dist/client/assets/ProjectsScreen-eNUBy4YU.js +0 -1
  343. package/dist/client/assets/ProjectsThreadAside-CoBgnHmr.js +0 -1
  344. package/dist/client/assets/Provider-C7UKGHQy.js +0 -1
  345. package/dist/client/assets/RawSessionsTable-DL8y_eEy.js +0 -1
  346. package/dist/client/assets/RealtimeVoiceScreen-ffS-39zy.js +0 -1
  347. package/dist/client/assets/RepoDiffViewer-D_exm6xK.js +0 -7
  348. package/dist/client/assets/RepoDiffViewerLazy-BPgF92Bg.js +0 -2
  349. package/dist/client/assets/SessionEmbedScreen-BVC7yvWF.js +0 -1
  350. package/dist/client/assets/SessionObserve-BpggNO_M.css +0 -1
  351. package/dist/client/assets/SessionObserve-yfXFafp8.js +0 -12
  352. package/dist/client/assets/SessionRefScreen-DRgJu7Jo.js +0 -1
  353. package/dist/client/assets/SessionsScreen-D6XUsZfA.js +0 -1
  354. package/dist/client/assets/SettingsDrawer-CmJt72ww.css +0 -1
  355. package/dist/client/assets/SettingsScreen-Cy8z-EuR.js +0 -1
  356. package/dist/client/assets/SpriteAvatar-DyaGuhik.js +0 -1
  357. package/dist/client/assets/Terminal-CqvGbjXU.js +0 -1
  358. package/dist/client/assets/TerminalEmbedScreen-DuZZFFzW.js +0 -1
  359. package/dist/client/assets/agent-chat-Bfjd9y6c.js +0 -1
  360. package/dist/client/assets/agent-lane-card-Dm7YWoew.css +0 -1
  361. package/dist/client/assets/agent-lane-detail-Djm3YJEa.js +0 -1
  362. package/dist/client/assets/chunk-YOZR3KYS-Bet8khjg.js +0 -47
  363. package/dist/client/assets/content-BDt9VBPk.js +0 -1
  364. package/dist/client/assets/content-BIXf4cKR.js +0 -1
  365. package/dist/client/assets/content-BLm0NBJM.js +0 -1
  366. package/dist/client/assets/content-C2EwTb2y.js +0 -1
  367. package/dist/client/assets/content-C5UbLsDF.js +0 -1
  368. package/dist/client/assets/content-CHU0wwA3.css +0 -1
  369. package/dist/client/assets/content-CR3vdrYY.js +0 -1
  370. package/dist/client/assets/content-CSPVmo2s.js +0 -1
  371. package/dist/client/assets/content-C_FGqx1X.js +0 -1
  372. package/dist/client/assets/content-CvlVUOG8.js +0 -1
  373. package/dist/client/assets/content-D5kJmfgl.js +0 -1
  374. package/dist/client/assets/content-DTpQsomG.js +0 -1
  375. package/dist/client/assets/content-DikVsqLf.js +0 -1
  376. package/dist/client/assets/content-DlUe5Ono.js +0 -1
  377. package/dist/client/assets/content-GIBv_55n.js +0 -1
  378. package/dist/client/assets/content-Q2oclDzi.js +0 -1
  379. package/dist/client/assets/conversation-model-B47vYmWN.js +0 -1
  380. package/dist/client/assets/conversation-motion-features-BdAONVls.js +0 -1
  381. package/dist/client/assets/discover-C1YwpBDE.js +0 -2
  382. package/dist/client/assets/embed-entry-BAcGL3g9.js +0 -2
  383. package/dist/client/assets/home-live-action-B22u89j7.js +0 -1
  384. package/dist/client/assets/home-moving-signal-CK147hxn.js +0 -1
  385. package/dist/client/assets/home-now-card-BgvNWuea.js +0 -1
  386. package/dist/client/assets/hooks-B6y_O2FB.js +0 -2
  387. package/dist/client/assets/inbox-thread-redesign-Bz4FjWzr.css +0 -1
  388. package/dist/client/assets/index-BcuhqXLe.js +0 -1
  389. package/dist/client/assets/index-CJXzfjo9.js +0 -1
  390. package/dist/client/assets/index-DQPvraRS.js +0 -1
  391. package/dist/client/assets/index-DxGoC5l5.css +0 -1
  392. package/dist/client/assets/keyboard-nav-2kv_tGUS.js +0 -1
  393. package/dist/client/assets/knowledge-search-CVxQwxPn.js +0 -1
  394. package/dist/client/assets/knowledge-search-DjrQdiiW.css +0 -1
  395. package/dist/client/assets/left-C--GiIh8.js +0 -2
  396. package/dist/client/assets/left-Cj7Rt89X.js +0 -1
  397. package/dist/client/assets/left-CpNEtFEg.js +0 -1
  398. package/dist/client/assets/left-CzXAuK_t.js +0 -2
  399. package/dist/client/assets/left-agents-Bo9sO1by.js +0 -1
  400. package/dist/client/assets/left-bN4PCAXa.js +0 -1
  401. package/dist/client/assets/left-default-DV9GdvYi.js +0 -1
  402. package/dist/client/assets/left-jYYGAOYD.js +0 -1
  403. package/dist/client/assets/left-lanes-D0l_Co7V.js +0 -1
  404. package/dist/client/assets/left-mission-Ci7zREkQ.js +0 -1
  405. package/dist/client/assets/left-plan-D4U1uflW.js +0 -2
  406. package/dist/client/assets/library-D-RxGiCw.js +0 -1
  407. package/dist/client/assets/mission-control-D3ikEPND.css +0 -1
  408. package/dist/client/assets/openAgent-Bjt57GdM.js +0 -1
  409. package/dist/client/assets/profile-CVRziEDA.js +0 -1
  410. package/dist/client/assets/repo-diff-C9Qs-bEn.css +0 -1
  411. package/dist/client/assets/resolve-panes-r9B3mpW7.js +0 -1
  412. package/dist/client/assets/resolve-sidebar-context-DcG8xGaB.js +0 -1
  413. package/dist/client/assets/right-BHeiIaty.js +0 -1
  414. package/dist/client/assets/right-BkgKo9VT.js +0 -1
  415. package/dist/client/assets/right-BpEU5jWE.js +0 -1
  416. package/dist/client/assets/right-CRZXoy-X.js +0 -1
  417. package/dist/client/assets/right-ChF_pbPy.js +0 -1
  418. package/dist/client/assets/right-DMoUT3KN.js +0 -1
  419. package/dist/client/assets/right-T4Ue6EqM.js +0 -1
  420. package/dist/client/assets/right-wzrLXKur.js +0 -1
  421. package/dist/client/assets/router-Bq5dwf78.js +0 -1
  422. package/dist/client/assets/secondaryNavConfig-DqUIp0Es.js +0 -1
  423. package/dist/client/assets/session-table-DZcrKoIH.js +0 -1
  424. package/dist/client/assets/sparkles-ClfRJQ6w.js +0 -1
  425. package/dist/client/assets/system-surfaces-redesign-CD26LFc0.css +0 -1
  426. package/dist/client/assets/terminal-sessions-D5CIR2OL.js +0 -1
  427. package/dist/client/assets/useContentSecondaryNav-DMl1WNm7.js +0 -1
  428. package/dist/client/assets/usePierreRuntime-wC-yMtBb.js +0 -50
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-CzVeWScw.js";import{ActivityContent as s}from"./content-CDpDtVI-.js";import"./index-BWHgHrtv.js";import"./router-B-K15T7B.js";import"./index-Dewd56RX.js";import"./Provider-DSsb2gLR.js";import"./AgentDetailCard-sZuHl1de.js";/* empty css */import{AgentsLeft as e}from"./left-BhzPp-_E.js";import{AgentsContent as n}from"./content-BHUcUCH5.js";import{AgentsInspector as m}from"./right-B-MKhiJ6.js";/* empty css */import"./secondaryNavConfig-Bg4Tc0gT.js";/* empty css */import"./BackToPicker-DZg_4nHL.js";import"./runtime-picker-BCQD7d4K.js";import"./ConversationScreen-C-PrCRz1.js";/* empty css */import"./ObservedTopologyPanel-C1AQM0Mq.js";import"./SessionObserve-BmmJ8dEh.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-DI4ooSHW.js";import{P as c}from"./ProjectsRail-B1zrQLZe.js";import{ProjectsScreen as f}from"./ProjectsScreen-PW_NH5VK.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-DaCEUWN1.js";import{BriefingsContent as x}from"./content-CvtLIjXS.js";/* empty css */import{BrokerContent as j}from"./content-CuOLxp1x.js";import"./NewChatComposer-DXDxV2Mh.js";import{ChatLeft as u}from"./left-CN1MABD0.js";/* empty css */import{ChatContent as l}from"./content-CO-9CeFd.js";import{ConversationInspector as i}from"./right-Dc7uqv7l.js";import{CodeContent as h}from"./CodeScreen-D0hpZNLP.js";import{FollowContent as C}from"./content-C39ELNgC.js";/* empty css */import{HarnessesContent as d}from"./content-BUhvLPkv.js";/* empty css */import{HomeLeft as I}from"./left-HwwbMVtl.js";import{H as p}from"./content-qsDjA4Au.js";import{HomeRight as w}from"./right-BqmKXLtf.js";import{MeshLeft as P}from"./left-YfH0daht.js";import{MeshContent as L}from"./content-DQXbo2RO.js";import{MeshInspectorPanel as R}from"./right-B91Zl8lQ.js";import"./mesh-view-store-Btlyc7rW.js";/* empty css */import{MeshOpsLeft as k}from"./left-DDgbsio7.js";import{MeshOpsContent as A}from"./content-C4RYKHut.js";import{MeshOpsInspector as M}from"./right-CkGOs-sq.js";import{OpsLeft as S}from"./left-np5USKqG.js";import{OpsContent as b}from"./content-BomQ5YWo.js";/* empty css */import"./RailRow-DerXOXQS.js";import"./left-mission-B54-c3hq.js";import"./mission-control-store-CcoNeQHG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-B3gc5HnM.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-DL3YZkzE.js";import{ReposContent as g}from"./content-LCELs6zg.js";import{ReposInspector as H}from"./right-BcFnuse9.js";/* empty css */import"./RepoDiffViewerLazy-DIxkiMto.js";import"./cache-Dr0why2k.js";import{SearchContent as O}from"./content-7ZeCPAEt.js";import{K as T}from"./KnowledgeSearchInspector-C2EZsQ5i.js";/* empty css */import{SessionsContent as y}from"./content-CzwTUb9n.js";import{SessionsInspector as B}from"./right-BzeB-Dpt.js";/* empty css */import{SettingsContent as K}from"./content-DRTQ9QQb.js";import"./SettingsDrawer-DL-SVLdd.js";import{TerminalLeft as W}from"./left-Dpf2R9uD.js";import{TerminalContent as E}from"./Terminal-Dp1FSGIS.js";import{TerminalInspector as F}from"./right-09W2JJFg.js";import{WorkContent as V}from"./content-CCiZfG4H.js";import{WorkInspector as q}from"./right-BdtMzn35.js";import{RealtimeVoicePage as z}from"./RealtimeVoiceScreen-XtxbCjOs.js";import"./ActivityScreen-BXm6nJ6L.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./sse-QcU9bikk.js";import"./colors-BtO5_zlx.js";import"./mentions-fbQJ2mBI.js";import"./time-Dhsh_2EG.js";import"./ContextMenu-N-Z6X0Z1.js";import"./EmptyState-DypEjx0V.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./AgentInfoScreen-CPkLg1pK.js";import"./conversation-model-CHwHZNw-.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-zR6b2bUL.js";import"./AgentsSubnav-q0xcZi6C.js";import"./SecondaryNav-Hv5AJ3Fv.js";import"./library-DbCVJG_O.js";import"./HarnessMark-BE-YSyci.js";import"./AgentSessions-BxWIPkWh.js";import"./agents-project-model-UYiamtrU.js";import"./profile-s3KRbip1.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-9FqXmjBw.js";import"./terminal-relay-BkXjjSkq.js";import"./AgentDefinitionsWorkspace-4Z0aN8AR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CXCq-oKj.js";import"./chevron-down-DRCbnzyY.js";import"./agent-essentials-SrzMYEXV.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-KvmTwABa.js";import"./TmuxPeek-DNC4uWky.js";import"./refresh-cw-4oeFn1Jn.js";import"./message-square-CIXda-Y7.js";import"./search-C3bSJluv.js";import"./terminal-DrTkVXIj.js";import"./scroll-text-BV-BB7v-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BGgbITvr.js";import"./eye-BFlhMzQL.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./AddProjectForm-CtEiLQnm.js";import"./projects-inbox-Diddml6e.js";import"./model-IGCUEsMy.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Dk-O4OVt.js";import"./arrow-up-right-CcrWONpD.js";import"./ProjectAgentProfile-zE1cApxw.js";import"./ProjectAgentProfileBar-MODhG0P6.js";import"./BriefingDetailScreen-BZU4qMwE.js";import"./BriefingsScreen-Bfc3tqPp.js";import"./BrokerScreen-Chh8sGen.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-CaFe6kdh.js";import"./DispatchAftermath-OXYlMbT1.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-B7O4if20.js";import"./arrow-down-D3-IbArq.js";import"./sparkles-BjCA3Evu.js";import"./paperclip-DfpJkR4s.js";import"./plus-CmFQp9Uj.js";import"./send-horizontal-CqogPmbY.js";import"./check-COxArFXG.js";import"./copy-4LfKIdQJ.js";import"./radio-PauJIekM.js";import"./bot-BRINYlC6.js";import"./NewChatOrigin-CnjoswTG.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./MessagesScreen-BhOJ7_tj.js";import"./CodeDiffPane-C1ebFt-Y.js";import"./usePierreRuntime-Bo4lD7Ui.js";/* empty css */import"./CodeProjectPicker-tsCly-f3.js";/* empty css */import"./FollowScreen-DRgYuAvp.js";import"./HarnessesScreen-L-emPcXd.js";import"./useContentSecondaryNav-BX7Sq7vy.js";import"./OpsSubnav-D5Bpowtk.js";import"./operator-attention-BwSPeheT.js";import"./HomeHero-CAEg8Yg5.js";import"./observe-BNFzh-7B.js";import"./agent-lanes-model-CPgQRenB.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./MeshScreen-D5zzTn0o.js";import"./MeshCanvas-rtCBD7s6.js";import"./chunk-T65CQEWV-CiZ_ICHW.js";import"./useAgentHoverCard-FtCmY-b9.js";import"./local-agents-DBaUbP-_.js";import"./mesh-ops-Cnw3vwAu.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-plan-BNBuDoPQ.js";import"./OpsScreen-BeC0lieE.js";import"./page-status-DDvNdA8s.js";import"./AgentLanesView-DqRK5-d2.js";import"./AgentFloorView-DMivAYHU.js";import"./AgentLanesPreflight-DNGvZvjd.js";import"./AgentLaneChrome-O9Yf0uR-.js";import"./AgentLaneCard-nB68f2CI.js";import"./AgentLaneSummaryResize-Ct3b0TQR.js";import"./agent-lane-card-model-DSWdGu-v.js";import"./agent-lane-preview-C33Dwpn7.js";import"./AgentLaneDetailSheet-BfhpaEQ3.js";import"./agent-lane-detail-BNNm6FNu.js";import"./LaneTraceDetailSheet-Dl7foF88.js";import"./LaneTraceEventFocus-X4-DDFEo.js";import"./MissionControlView-D2JO9u-y.js";import"./MissionContextRail-0O-Zu1Tn.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-LnjmqBiW.js";import"./MissionLogPane-lZ9vUftY.js";import"./OpsAgentsView-BnMX0vEY.js";import"./DataTable-BoofV-_4.js";import"./sliders-horizontal-CUiOH26y.js";import"./PlanView-DDXdC19M.js";import"./AtopView-VZkk40v0.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./RepoDiffPageScreen-CGEMAv2Z.js";import"./ReposScreen-BN1lVjOj.js";import"./selection-bridge-B1dmkX3P.js";import"./KnowledgeSearchScreen-DvdOFh-b.js";import"./clock-CyfvRmj6.js";import"./SessionsScreen-BJEjuo2X.js";import"./RawSessionsTable-LWEvXJzj.js";import"./FlightObserveScreen-Yq5NtQQJ.js";import"./SettingsScreen-DJ-BhBwR.js";import"./StatusPill-B33sQinT.js";import"./AgentConfigurationScreen-CfBXxrsD.js";import"./server-Brw5Y1Gh.js";import"./VoicePermissionsPanel-WLN0V-Xv.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./session-table-1xdSxSXq.js";/* empty css */import"./HerdrSession-DKFCJMst.js";import"./chunk-JTPDIGGW-s6WbxdjC.js";import"./WorkDetailScreen-D2Yl0mYZ.js";import"./WorkFilesViewer-BbVfcUN-.js";import"./ScoutbotRealtimeVoiceCall-CDyFJX8m.js";function mp(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 ip(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(O,{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 pp(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(H,{});default:return null}}export{ip as resolveContentPane,mp as resolveLeftPane,pp as resolveRightPane};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-CzVeWScw.js";import{AgentsLeft as i}from"./left-BhzPp-_E.js";/* empty css */import"./index-BWHgHrtv.js";import"./Provider-DSsb2gLR.js";import"./router-B-K15T7B.js";import"./BackToPicker-DZg_4nHL.js";import"./AgentLiveActions-DI4ooSHW.js";import"./ObservedTopologyPanel-C1AQM0Mq.js";/* empty css */import"./secondaryNavConfig-Bg4Tc0gT.js";/* empty css */import"./runtime-picker-BCQD7d4K.js";import"./index-Dewd56RX.js";import"./AgentDetailCard-sZuHl1de.js";import"./ConversationScreen-C-PrCRz1.js";/* empty css */import"./SessionObserve-BmmJ8dEh.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-B1zrQLZe.js";import"./ProjectsInbox-C3Jd6JTk.js";import"./projects-inbox-Diddml6e.js";import{ChatLeft as p}from"./left-CN1MABD0.js";/* empty css */import{HomeLeft as e}from"./left-HwwbMVtl.js";import"./content-qsDjA4Au.js";import{MeshLeft as s}from"./left-YfH0daht.js";import"./mesh-view-store-Btlyc7rW.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-DDgbsio7.js";import"./use-scout-dev-flags-BOQF3fW2.js";import"./mesh-ops-Cnw3vwAu.js";import{OpsLeft as l}from"./left-np5USKqG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-B3gc5HnM.js";/* empty css */import"./mission-control-store-CcoNeQHG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-DL3YZkzE.js";import"./RailRow-DerXOXQS.js";import"./left-mission-B54-c3hq.js";import{TerminalLeft as a}from"./left-Dpf2R9uD.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-CuvXOkc7.js";import"./NewChatComposer-DXDxV2Mh.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./api-h5zurxmi.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-CnjoswTG.js";import"./keyboard-nav-BJnFoFDP.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-D4X_y1j_.js";import"./createLucideIcon-ClCdc3F9.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./loader-circle-Byb9kSFx.js";import"./file-text-DG-pufl1.js";import"./AgentAvatar-CszU5eaU.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./sse-QcU9bikk.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./TextDocumentSurface-DRjctOIt.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./terminal-takeover-KvmTwABa.js";import"./openContent-C6XO6kr5.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./message-square-CIXda-Y7.js";import"./scroll-text-BV-BB7v-.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-CiEF7dhd.js";import"./message-markup-mGF07emJ.js";import"./mentions-fbQJ2mBI.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BGgbITvr.js";import"./ConversationFeedRows-5it6QNBV.js";import"./ConversationPanels-vI9YuQJh.js";import"./use-reduced-motion-Dla-G_Jz.js";import"./activity-BxwKkT8z.js";import"./message-circle-aGOfQWm2.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C6K7bCWB.js";import"./ConversationStatus-COEj5loj.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-DrPXYZvQ.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-DJxQc2H6.js";import"./SessionObserveEvidence-CEedIk2a.js";import"./wrench-CeCdjiPF.js";import"./external-link-CnaI1QFS.js";import"./AddProjectForm-CtEiLQnm.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Dk-O4OVt.js";/* empty css */import"./cache-Dr0why2k.js";import"./arrow-up-right-CcrWONpD.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C5sF6WBR.js";import"./use-fleet-active-asks-BOMPW0nl.js";import"./operator-attention-BwSPeheT.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-CAEg8Yg5.js";import"./observe-BNFzh-7B.js";import"./agent-lanes-model-CPgQRenB.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-aNJusIzL.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Dj7-CfNi.js";import"./use-mesh-ops-items-Co05vcTV.js";import"./left-agents-CYUwAy2Z.js";import"./left-default-vEGZALPv.js";import"./left-lanes-bphF-vlX.js";import"./lane-roster-store-pR4ZaYQm.js";import"./left-plan-BNBuDoPQ.js";import"./MissionLeftAgentRow-nc1Jyq3D.js";import"./page-status-DDvNdA8s.js";import"./chunk-YOZR3KYS-DLOc92uD.js";import"./arrow-down-D3-IbArq.js";import"./terminal-relay-BkXjjSkq.js";import"./session-table-1xdSxSXq.js";import"./refresh-cw-4oeFn1Jn.js";import"./clock-CyfvRmj6.js";function lt(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{lt as resolveSidebarContext};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./index-CzVeWScw.js";import{u as k}from"./Provider-DSsb2gLR.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-CszU5eaU.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./text-DsBWV_4k.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-C3qU8tnY.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function Se(){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{Se as TerminalInspector};
@@ -0,0 +1 @@
1
+ import{j as t,r as h}from"./index-CzVeWScw.js";import{u as Z}from"./Provider-DSsb2gLR.js";import{o as ee}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as pe,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-DsBWV_4k.js";import{a as R}from"./api-h5zurxmi.js";import{u as L}from"./sse-QcU9bikk.js";import{r as E}from"./terminal-relay-BkXjjSkq.js";import{q as re}from"./terminal-takeover-KvmTwABa.js";import{r as fe,s as ve,a as be,b as je,c as ke}from"./session-catalog-9FqXmjBw.js";import{p as ae}from"./model-Co0zkMIc.js";import{u as ge}from"./ContextMenu-N-Z6X0Z1.js";import{A as Ne}from"./AgentAvatar-CszU5eaU.js";import{A as we}from"./AgentLiveActions-DI4ooSHW.js";import{T as H}from"./TmuxPeek-DNC4uWky.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./index-BWHgHrtv.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";/* empty css */import"./refresh-cw-4oeFn1Jn.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 _t(){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=pe(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=fe(e,f),S=h.useMemo(()=>ve(f?.sessions??[],N),[f?.sessions,N]),$=r.view==="agents-v2"&&r.agentId===e.id?r.sessionId:null,I=be(e.id,d,N,S,$),P=je($,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?ke(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=ge(),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{_t as AgentsInspector};
@@ -0,0 +1 @@
1
+ import{r as p,j as s}from"./index-CzVeWScw.js";import{u as R,s as v,a as b}from"./mesh-view-store-Btlyc7rW.js";import{u as E}from"./local-agents-DBaUbP-_.js";import{n as _,b as B,a as P}from"./colors-BtO5_zlx.js";import{a as g}from"./api-h5zurxmi.js";import{t as U}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./Provider-DSsb2gLR.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";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 Es(){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{Es as MeshInspectorPanel};
@@ -1,2 +1,2 @@
1
- import{r as d,j as s}from"./index-DMiGbrBt.js";/* empty css */import{a as P}from"./api-h5zurxmi.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-16pk1qyG.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
1
+ import{r as d,j as s}from"./index-CzVeWScw.js";/* empty css */import{a as P}from"./api-h5zurxmi.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-B1dmkX3P.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
2
2
  `)}function ds({worktree:n,project:t,generatedAt:u}){const[l,p]=d.useState(""),[i,T]=d.useState("scout"),[h,k]=d.useState(!1),[R,g]=d.useState(null),[O,A]=d.useState(null),[B,K]=d.useState(!1),x=d.useMemo(()=>n?U(n):[],[n]),E=d.useMemo(()=>x.slice(0,8),[x]),I=d.useMemo(()=>{if(i==="scout")return"Scout";const e=i.replace(/^agent:/,""),c=E.find(m=>m.id===e);return c?$(c):"Agent"},[E,i]);async function w(){const e=l.trim();if(!(!e||h||!n||!t)){k(!0),g(null),A(null);try{const c=rs(e,n,t);if(i==="scout")await P("/api/send",{method:"POST",body:JSON.stringify({body:c})}),g("Sent to Scout");else{const m=i.replace(/^agent:/,"");await P("/api/ask",{method:"POST",body:JSON.stringify({body:c,targetAgentId:m,targetLabel:m,metadata:{source:"repo-watch",originSurface:"repo-watch",handoffKind:"repo-watch-agent-ask",targetAgentId:m}})}),g(`Sent to ${I}`)}p("")}catch(c){A(c instanceof Error?c.message:String(c))}finally{k(!1)}}}if(!n||!t)return s.jsx("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:s.jsxs("div",{className:"rw-ctx-empty",children:[s.jsx("span",{className:"eb",children:"CONTEXT · WORKTREE"}),s.jsx("span",{className:"msg",children:"Select a worktree to inspect"})]})});const a=n,r=a.branch,N=5,f=x.length+a.sessions.length,b=!B&&f>N,y=b?x.slice(0,N):x,D=b?a.sessions.slice(0,Math.max(0,N-y.length)):a.sessions,q=f-y.length-D.length,L=ts(a),j=M(a),v=H(a),{add:S,del:C,has:G}=X(a),W=S+C||1,F=[{label:"staged",n:a.status.staged},{label:"unstaged",n:a.status.unstaged},{label:"untracked",n:a.status.untracked},{label:"conflicts",n:a.status.conflicts,cls:"conf"}].filter(e=>e.n>0);return s.jsxs("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:[s.jsxs("div",{className:"ctx-h",children:[s.jsx("div",{className:"ctx-eyebrow",children:s.jsx("span",{children:"CONTEXT · WORKTREE"})}),s.jsxs("div",{className:"ctx-repo",children:[s.jsx("span",{className:"dot "+V(a)}),s.jsx("span",{className:"rn",children:t.name}),s.jsx("span",{className:"ctx-state "+L.cls,children:L.label})]}),s.jsx("div",{className:"ctx-branch",children:s.jsx(as,{branch:r,fallback:a.name})}),s.jsxs("div",{className:"ctx-path",children:[a.path,r.upstream?s.jsxs("span",{className:"ref",children:[" · ",r.upstream]}):null]})]}),s.jsxs("div",{className:"ctx-stats",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.ahead>0?" mint":" dim"),children:["↑",r.ahead]}),s.jsx("div",{className:"k",children:"AHEAD"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.behind>0?" amber":" dim"),children:["↓",r.behind]}),s.jsx("div",{className:"k",children:"BEHIND"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"v"+(a.status.changedFiles>0?"":" dim"),children:a.status.changedFiles}),s.jsx("div",{className:"k",children:"FILES"})]})]}),F.length>0?s.jsx("div",{className:"ctx-breakdown",children:F.map(e=>s.jsxs("span",{className:"ctx-chip"+(e.cls?" "+e.cls:""),children:[s.jsx("span",{className:"n",children:e.n}),e.label]},e.label))}):null,s.jsxs("div",{className:"ctx-body",children:[a.attentionReasons.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTENTION"}),s.jsx("span",{className:"n",children:a.attentionReasons.length})]}),s.jsx("div",{className:"ctx-why",children:a.attentionReasons.map((e,c)=>s.jsx("span",{className:"pill",children:e},c))})]}):null,a.error?s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"SCAN ERROR"})}),s.jsx("div",{className:"ctx-err",children:a.error})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"CHURN"}),s.jsx("span",{className:"n",children:j.has?"reviewable":"working tree"})]}),G?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ctx-churn",children:[s.jsxs("span",{className:"nums",children:[s.jsxs("span",{className:"add",children:["+",o(S)]}),s.jsx("span",{className:"sl",children:"/"}),s.jsxs("span",{className:"del",children:["−",o(C)]})]}),s.jsxs("span",{className:"cbar",title:`+${o(S)} −${o(C)}`,children:[s.jsx("span",{className:"g",style:{width:S/W*100+"%"}}),s.jsx("span",{className:"r",style:{width:C/W*100+"%"}})]})]}),s.jsxs("span",{className:"ctx-churn-clean",children:[j.has?`branch +${o(j.add)} −${o(j.del)}`:null,j.has&&v.has?" · ":null,v.has?`working tree +${o(v.add)} −${o(v.del)}`:null]})]}):s.jsx("div",{className:"ctx-churn-clean",children:a.status.clean?"working tree clean":"no line changes"})]}),a.status.files.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"FILES CHANGED"}),s.jsx("span",{className:"n",children:a.status.files.length})]}),a.status.files.map(e=>{const c=Y(e.status),{dir:m,file:J}=ls(e.path);return s.jsxs("div",{className:"ctx-fchg",children:[s.jsx("span",{className:"badge",style:{color:Q(c),background:z(c)},title:e.status,children:_(e.status)}),s.jsxs("span",{className:"fp",title:e.path,children:[s.jsx("span",{className:"dir",children:m}),J]})]},e.path)})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"LAST COMMIT"})}),s.jsx("div",{className:"ctx-commit",children:a.lastCommitAt!=null||r.head?s.jsxs(s.Fragment,{children:[r.head?s.jsx("span",{className:"hash",children:r.head.slice(0,7)}):null,s.jsxs("span",{className:"t",children:[Z(a.lastCommitAt,u)," ago"]})]}):s.jsx("span",{className:"none",children:"no commit data"})})]}),s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTACHED SESSIONS"}),s.jsxs("span",{className:"n",children:[x.length," handle",x.length===1?"":"s",a.sessions.length>0?` · ${a.sessions.length} session${a.sessions.length===1?"":"s"}`:""]})]}),f>0?s.jsxs(s.Fragment,{children:[y.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d "+(ss(e)?"on":"off")}),s.jsx("span",{className:"h",children:$(e)}),s.jsx("span",{className:"role",children:cs(e)})]},$(e))),D.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d off"}),s.jsx("span",{className:"h",children:es(e)}),s.jsx("span",{className:"role",children:"SESSION"})]},e.id)),f>N?s.jsx("button",{type:"button",className:"ctx-more",onClick:()=>K(e=>!e),"aria-expanded":!b,children:b?`+${q} more`:"Show less"}):null]}):s.jsx("div",{className:"ctx-none",children:"no attached sessions"})]})]}),s.jsxs("div",{className:"ctx-ask",children:[s.jsx("textarea",{value:l,onChange:e=>{p(e.currentTarget.value),g(null),A(null)},onKeyDown:e=>{e.stopPropagation(),(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),w())},disabled:h,rows:3,placeholder:i==="scout"?"Message Scout about this worktree":"Message this agent about the worktree"}),s.jsxs("div",{className:"ctx-ask-bar",children:[s.jsxs("select",{value:i,onChange:e=>T(e.currentTarget.value),onKeyDown:e=>e.stopPropagation(),disabled:h,"aria-label":"Message target",children:[s.jsx("option",{value:"scout",children:"Scout"}),E.map(e=>s.jsx("option",{value:`agent:${e.id}`,children:$(e)},e.id))]}),s.jsx("button",{className:"ctx-btn primary",type:"button",disabled:h||l.trim().length===0,onClick:()=>{w()},children:h?"Sending":"Send"})]}),s.jsxs("div",{className:"ctx-ask-foot",children:[O?s.jsx("span",{className:"err",children:O}):R?s.jsx("span",{className:"ok",children:R}):s.jsxs("span",{children:["Repo Watch context included · ",I]}),s.jsx("button",{type:"button",title:"Copy worktree path",onClick:()=>{navigator.clipboard?.writeText(a.path)},children:"Copy path"})]})]})]})}function ps(){const{worktree:n,project:t,generatedAt:u,tone:l}=ns();return s.jsx("div",{className:"rw-scope rw-ctx-rail-scope tone-"+l,children:s.jsx(ds,{worktree:n,project:t,generatedAt:u})})}export{ps as ReposInspector,ps as default};
@@ -0,0 +1 @@
1
+ import{r as u,j as e}from"./index-CzVeWScw.js";import{u as j}from"./Provider-DSsb2gLR.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-h5zurxmi.js";import{u as w}from"./sse-QcU9bikk.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-DRCbnzyY.js";import{C as I}from"./chevron-right-CNE6QAVr.js";import{M as C}from"./message-square-CIXda-Y7.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./index-BWHgHrtv.js";const M=5;function je(){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{je as WorkInspector};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-CzVeWScw.js";import{u as h}from"./Provider-DSsb2gLR.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-CszU5eaU.js";import{t as g}from"./time-Dhsh_2EG.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./api-h5zurxmi.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./openContent-C6XO6kr5.js";import"./SpriteAvatar-BpQDpOkq.js";import"./agent-identity-BxCsXnDp.js";function pt(){const{agents:r,agentsLoaded:s,apiConnection:o,navigate:a,route:f}=h(),n=e=>j(a,e,{returnTo:f});if(!s)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:o.status==="offline"?"Roster unavailable":"No agents"}),t.jsx("div",{children:o.status==="offline"?o.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:s,children:o}){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:s})]}),t.jsx("div",{className:"flex flex-col gap-0.5",children:o})]})}function p({agent:r,onOpen:s,subLabel:o,dim:a}){return t.jsxs("button",{onClick:()=>s(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}),o?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:o}):r.updatedAt?t.jsx("span",{className:"truncate text-xs text-[var(--scout-chrome-ink-ghost)]",children:g(r.updatedAt)}):null]})]})}export{pt as HomeRight};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./index-CzVeWScw.js";import{u as P}from"./Provider-DSsb2gLR.js";import{a as g}from"./api-h5zurxmi.js";import{u as A}from"./sse-QcU9bikk.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./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 je(){const{route:t,navigate:n}=P(),[r,c]=l.useState([]),[a,h]=l.useState(null),p=l.useCallback(async()=>{const[u,d]=await Promise.allSettled([g("/api/sessions"),g("/api/tail/discover")]);u.status==="fulfilled"&&c(u.value),d.status==="fulfilled"&&h(d.value)},[]);if(l.useEffect(()=>{p()},[p]),A(()=>{p()}),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]),p=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]),d=n?.processes?.length??0,S=n?.totals.transcripts??a.length,R=d>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:`${d}`})]}),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:p,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{je as SessionsInspector};
@@ -0,0 +1 @@
1
+ import{r as y,j as e}from"./index-CzVeWScw.js";import{a as O}from"./api-h5zurxmi.js";import{a as r,t as f}from"./time-Dhsh_2EG.js";import{u as M,j as R}from"./mesh-ops-Cnw3vwAu.js";import{u as L}from"./mesh-view-store-Btlyc7rW.js";import{u as H}from"./Provider-DSsb2gLR.js";/* empty css */import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./sse-QcU9bikk.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";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 Ae(){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{Ae as MeshOpsInspector};
@@ -0,0 +1 @@
1
+ import{j as e,r as i}from"./index-CzVeWScw.js";import{u as w}from"./Provider-DSsb2gLR.js";import{a as C}from"./api-h5zurxmi.js";import{u as B}from"./sse-QcU9bikk.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-Chh8sGen.js";import{b as S}from"./broker-display-pp33bLsu.js";import"./router-B-K15T7B.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./index-BWHgHrtv.js";import"./EmptyState-DypEjx0V.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-CaFe6kdh.js";import"./DispatchAftermath-OXYlMbT1.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-CcrWONpD.js";import"./ShikiPane-B7O4if20.js";import"./types-B0PlfpKc.js";/* empty css */import"./refresh-cw-4oeFn1Jn.js";import"./arrow-down-D3-IbArq.js";import"./external-link-CnaI1QFS.js";import"./sparkles-BjCA3Evu.js";import"./paperclip-DfpJkR4s.js";import"./plus-CmFQp9Uj.js";import"./send-horizontal-CqogPmbY.js";import"./check-COxArFXG.js";import"./copy-4LfKIdQJ.js";import"./message-square-CIXda-Y7.js";import"./radio-PauJIekM.js";import"./bot-BRINYlC6.js";function $(r){return`${Math.round(r*100)}%`}function R(r){switch(r){case"success":return"sent";case"failed_query":return"query";case"failed_delivery":return"delivery";default:return"attempt"}}function q(r){switch(r){case"dm":return"direct";case"channel":return"channel";case"broadcast":return"broadcast";case null:return"no route";default:return r}}function A(r){const t=new Map;for(const o of r){const n=q(o.route);t.set(n,(t.get(n)??0)+1)}return[...t.entries()].map(([o,n])=>({label:o,count:n})).sort((o,n)=>n.count-o.count||o.label.localeCompare(n.label)).slice(0,5)}function D(r){const t={sent:0,query:0,delivery:0,failures:0};for(const o of r)o.kind==="success"?t.sent+=1:o.kind==="failed_query"?t.query+=1:(o.kind==="failed_delivery"||o.kind==="delivery_attempt")&&(t.delivery+=1),S(o)&&(t.failures+=1);return t}function L(){const{inspectBrokerAttempt:r}=w(),[t,o]=i.useState(null),[n,f]=i.useState(null),l=i.useCallback(async()=>{try{const s=await C(M());o(s),f(null)}catch(s){f(s instanceof Error?s.message:String(s))}},[]);i.useEffect(()=>{l()},[l]),B(s=>{(s.kind==="message.posted"||s.kind==="delivery.planned"||s.kind==="delivery.attempted"||s.kind==="delivery.state.changed"||s.kind==="scout.dispatched")&&l()});const h=i.useMemo(()=>t?[...t.failedQueries,...t.failedDeliveries].sort((s,m)=>m.ts-s.ts).slice(0,4):[],[t]),v=i.useMemo(()=>t?t.attempts.slice().sort((s,m)=>m.ts-s.ts).slice(0,5):[],[t]),j=i.useMemo(()=>t?A(t.attempts):[],[t]),a=i.useMemo(()=>t?D(t.attempts):null,[t]),b=i.useCallback(s=>{r(s),window.dispatchEvent(new CustomEvent("scout:set-inspector-width",{detail:{width:420}}))},[r]);if(!t&&!n)return e.jsx("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:e.jsx(u,{title:"Dispatch context",status:"Loading broker ledger..."})});if(!t)return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsx(u,{title:"Dispatch context",status:"Broker diagnostics unavailable"}),e.jsx("div",{className:"rounded border border-[var(--scout-chrome-border-soft)] bg-[var(--scout-chrome-hover)] p-2.5 text-sm leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:n})]});const c=t.attempts.length,y=t.ledger.hasMore.attempts?"+":"",N=c>0&&a?a.failures/c:0;return e.jsxs("div",{className:"flex h-full flex-col overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[e.jsxs(u,{title:"Dispatch context",status:`${c}${y} latest route${c===1?"":"s"}`,children:[e.jsxs("div",{className:"mt-2 grid grid-cols-3 gap-1",children:[e.jsx(d,{label:"Sent",value:`${a?.sent??0}`}),e.jsx(d,{label:"Query",value:`${a?.query??0}`}),e.jsx(d,{label:"Delivery",value:`${a?.delivery??0}`})]}),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.jsxs("span",{children:[$(N)," failed"]}),e.jsx("span",{children:g(t.generatedAt)})]})]}),e.jsx(p,{label:"Route mix",children:e.jsx(_,{items:j,empty:"No route records visible"})}),e.jsx(p,{label:"Needs attention",children:h.length===0?e.jsx(x,{children:"No failed routes in history."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:h.map(s=>e.jsx(k,{attempt:s,onOpen:b},s.id))})}),e.jsx(p,{label:"Recent dispatch",children:v.length===0?e.jsx(x,{children:"No recent dispatch rows."}):e.jsx("div",{className:"flex flex-col gap-1",children:v.map(s=>e.jsx(k,{attempt:s,onOpen:b,compact:!0},s.id))})})]})}function u({title:r,status:t,children:o}){return 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:r}),e.jsx("div",{className:"mt-1 font-mono text-xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-soft)]",children:t}),o]})}function d({label:r,value:t}){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:r}),e.jsx("div",{className:"mt-0.5 truncate font-mono text-lg text-[var(--scout-chrome-ink-strong)]",children:t})]})}function p({label:r,children:t}){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:r}),t]})}function _({items:r,empty:t}){return r.length===0?e.jsx(x,{children:t}):e.jsx("div",{className:"flex flex-wrap gap-1",children:r.map(o=>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:`${o.count} ${o.label}`,children:[o.label," ",o.count]},o.label))})}function x({children:r}){return e.jsx("div",{className:"text-xs font-mono uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-ghost)]",children:r})}function k({attempt:r,onOpen:t,compact:o=!1}){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:()=>t(r),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:R(r.kind)}),e.jsx("span",{className:"min-w-0 flex-1 truncate text-sm text-[var(--scout-chrome-ink)]",children:r.detail}),e.jsx("span",{className:"shrink-0 font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(r.ts)})]}),!o&&e.jsxs("div",{className:"mt-0.5 flex items-center gap-2 font-mono text-2xs text-[var(--scout-chrome-ink-ghost)]",children:[e.jsx("span",{className:"truncate",children:r.actorName??"unknown"}),e.jsx("span",{className:"shrink-0",children:"->"}),e.jsx("span",{className:"truncate",children:r.target??"none"})]})]})}function He({selectedAttempt:r,navigate:t,onClose:o}){return r?e.jsx(E,{attempt:r,navigate:t,onClose:o}):e.jsx(L,{})}export{He as BrokerRight};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./index-CzVeWScw.js";import{u as ct}from"./Provider-DSsb2gLR.js";import{o as $e}from"./openContent-C6XO6kr5.js";import{a as B}from"./api-h5zurxmi.js";import{u as rt}from"./sse-QcU9bikk.js";import{u as lt}from"./tail-events-C6K7bCWB.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-DI4ooSHW.js";import{i as mt}from"./message-visibility-kJM8XcSG.js";import{o as pt,q as ht,s as vt,m as xt,c as Be,u as ft}from"./conversation-model-CHwHZNw-.js";import{c as jt,e as gt,t as W,f as oe}from"./time-Dhsh_2EG.js";import{b as Nt}from"./router-B-K15T7B.js";import{T as yt}from"./TmuxPeek-DNC4uWky.js";import{S as It}from"./scroll-text-BV-BB7v-.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-N-Z6X0Z1.js";import"./DocumentFocusViewer-BCG2kOmd.js";import"./createLucideIcon-ClCdc3F9.js";import"./TextDocumentSurface-DRjctOIt.js";/* empty css */import"./file-text-DG-pufl1.js";import"./x-D4X_y1j_.js";import"./chevron-right-CNE6QAVr.js";import"./code-xml--LjSM4Mv.js";import"./arrow-left-_vS7itsV.js";import"./scout-voice-S5_YZ2v8.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BJnFoFDP.js";import"./MessageComposerSuggestions-Cs9u-F_3.js";import"./NewChatComposer-DXDxV2Mh.js";import"./runtime-picker-BCQD7d4K.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-Byb9kSFx.js";import"./index-Dewd56RX.js";import"./HarnessMark-BE-YSyci.js";import"./NewChatOrigin-CnjoswTG.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-DRCbnzyY.js";import"./search-C3bSJluv.js";import"./chunk-HRAB3GC3-CAeEKaf5.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-KvmTwABa.js";import"./eye-BFlhMzQL.js";import"./terminal-DrTkVXIj.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-C3qU8tnY.js";/* empty css */import"./refresh-cw-4oeFn1Jn.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 Ws(){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),q=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),R=i.useRef(new Set),O=i.useCallback(()=>{S.current!==null&&(window.clearTimeout(S.current),S.current=null),q.current=null},[]),P=i.useCallback(()=>{if(!r)return;const n=Date.now(),l=q.current??n;q.current=l;const p=n-l>=Et?0:Ct;S.current!==null&&window.clearTimeout(S.current),S.current=window.setTimeout(()=>{S.current=null,q.current=null,V()},p)},[r,V]);i.useEffect(()=>O,[O]),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 qe=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(()=>{O(),R.current.clear()},[O,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 Oe=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:Oe}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:qe}),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{Ws as ConversationInspector};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-OpA4Amw5.js";const e=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],t=c("rocket",e);export{t as R};
1
+ import{c}from"./createLucideIcon-ClCdc3F9.js";const e=[["path",{d:"M12 15v5s3.03-.55 4-2c1.08-1.62 0-5 0-5",key:"qeys4"}],["path",{d:"M4.5 16.5c-1.5 1.26-2 5-2 5s3.74-.5 5-2c.71-.84.7-2.13-.09-2.91a2.18 2.18 0 0 0-2.91-.09",key:"u4xsad"}],["path",{d:"M9 12a22 22 0 0 1 2-3.95A12.88 12.88 0 0 1 22 2c0 2.72-.78 7.5-6 11a22.4 22.4 0 0 1-4 2z",key:"676m9"}],["path",{d:"M9 12H4s.55-3.03 2-4c1.62-1.08 5 .05 5 .05",key:"92ym6u"}]],t=c("rocket",e);export{t as R};