@openscout/scout 0.2.79 → 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 (389) hide show
  1. package/bin/scoutd +0 -0
  2. package/dist/build-manifest.json +3 -3
  3. package/dist/client/assets/ActivityScreen-BXm6nJ6L.js +1 -0
  4. package/dist/client/assets/{AddProjectForm-BoVtelSP.js → AddProjectForm-CtEiLQnm.js} +1 -1
  5. package/dist/client/assets/{AgentAvatar-CufDA4A-.js → AgentAvatar-CszU5eaU.js} +1 -1
  6. package/dist/client/assets/AgentConfigurationScreen-CfBXxrsD.js +1 -0
  7. package/dist/client/assets/AgentDefinitionsWorkspace-4Z0aN8AR.js +1 -0
  8. package/dist/client/assets/{AgentDetailCard-DxxVkgT1.js → AgentDetailCard-sZuHl1de.js} +1 -1
  9. package/dist/client/assets/AgentFloorView-DMivAYHU.js +1 -0
  10. package/dist/client/assets/AgentInfoScreen-CPkLg1pK.js +1 -0
  11. package/dist/client/assets/{AgentLaneCard-DTUvE96I.js → AgentLaneCard-nB68f2CI.js} +1 -1
  12. package/dist/client/assets/{AgentLaneChrome-BfVygkgL.js → AgentLaneChrome-O9Yf0uR-.js} +1 -1
  13. package/dist/client/assets/AgentLaneDetailSheet-BfhpaEQ3.js +4 -0
  14. package/dist/client/assets/{AgentLaneSummaryResize-CMgzYvAA.js → AgentLaneSummaryResize-Ct3b0TQR.js} +1 -1
  15. package/dist/client/assets/AgentLanesEmbedScreen-CjHMvy3v.js +1 -0
  16. package/dist/client/assets/{AgentLanesPreflight-KWfLcaNB.js → AgentLanesPreflight-DNGvZvjd.js} +1 -1
  17. package/dist/client/assets/{AgentLanesView-CxfbV8Kd.js → AgentLanesView-DqRK5-d2.js} +1 -1
  18. package/dist/client/assets/{AgentLiveActions-CZdAInEu.js → AgentLiveActions-DI4ooSHW.js} +1 -1
  19. package/dist/client/assets/{AgentSessions-Bkr0lyry.js → AgentSessions-BxWIPkWh.js} +1 -1
  20. package/dist/client/assets/{AgentsConsole-WtFVqaPJ.js → AgentsConsole-D6VHSCfZ.js} +1 -1
  21. package/dist/client/assets/AgentsScreen-zR6b2bUL.js +1 -0
  22. package/dist/client/assets/AgentsSubnav-q0xcZi6C.js +1 -0
  23. package/dist/client/assets/{AtopView-_OKDlZ1h.js → AtopView-VZkk40v0.js} +1 -1
  24. package/dist/client/assets/{BackToPicker-CkUmHuuo.js → BackToPicker-DZg_4nHL.js} +1 -1
  25. package/dist/client/assets/{BriefingDetailScreen-i54EtZKW.js → BriefingDetailScreen-BZU4qMwE.js} +1 -1
  26. package/dist/client/assets/{BriefingsScreen-CBrHojlQ.js → BriefingsScreen-Bfc3tqPp.js} +1 -1
  27. package/dist/client/assets/{BrokerMetadataPanel-opTLuZU6.js → BrokerMetadataPanel-CaFe6kdh.js} +1 -1
  28. package/dist/client/assets/BrokerScreen-Chh8sGen.js +5 -0
  29. package/dist/client/assets/{ChatCollapsedStrip-Dr2vmKXQ.js → ChatCollapsedStrip-Cov54p9V.js} +1 -1
  30. package/dist/client/assets/{CodeDiffPane-CLOGjwul.js → CodeDiffPane-C1ebFt-Y.js} +1 -1
  31. package/dist/client/assets/{CodeProjectPicker-DTV8hR6A.js → CodeProjectPicker-tsCly-f3.js} +1 -1
  32. package/dist/client/assets/CodeScreen-D0hpZNLP.js +1 -0
  33. package/dist/client/assets/{ContextMenu-BlBQhpax.js → ContextMenu-N-Z6X0Z1.js} +1 -1
  34. package/dist/client/assets/ConversationComposer-CiEF7dhd.js +1 -0
  35. package/dist/client/assets/ConversationFeedRows-5it6QNBV.js +1 -0
  36. package/dist/client/assets/ConversationHeader-BGgbITvr.js +1 -0
  37. package/dist/client/assets/ConversationPanels-vI9YuQJh.js +2 -0
  38. package/dist/client/assets/ConversationScreen-C-PrCRz1.js +1 -0
  39. package/dist/client/assets/ConversationScreen-yIKEsm-8.css +1 -0
  40. package/dist/client/assets/{ConversationStatus-DSgdVofa.js → ConversationStatus-COEj5loj.js} +1 -1
  41. package/dist/client/assets/{DataTable-0DwuXyvW.js → DataTable-BoofV-_4.js} +1 -1
  42. package/dist/client/assets/{DispatchAftermath-BrreQifA.js → DispatchAftermath-OXYlMbT1.js} +1 -1
  43. package/dist/client/assets/{DocumentFocusViewer-DU_9BHsD.js → DocumentFocusViewer-BCG2kOmd.js} +1 -1
  44. package/dist/client/assets/{EmbeddableSurfacesLab-DdaswbfI.js → EmbeddableSurfacesLab-C2SZvrHJ.js} +1 -1
  45. package/dist/client/assets/{EmptyState-CoL-QuUO.js → EmptyState-DypEjx0V.js} +1 -1
  46. package/dist/client/assets/{FileViewerPane-C9Ly01Ef.js → FileViewerPane-CXCq-oKj.js} +1 -1
  47. package/dist/client/assets/{FleetSearch-DlWTLl-v.js → FleetSearch-Dj7-CfNi.js} +1 -1
  48. package/dist/client/assets/FlightObserveScreen-Yq5NtQQJ.js +1 -0
  49. package/dist/client/assets/FollowScreen-DRgYuAvp.js +1 -0
  50. package/dist/client/assets/HarnessMark-BE-YSyci.js +1 -0
  51. package/dist/client/assets/HarnessesScreen-L-emPcXd.js +1 -0
  52. package/dist/client/assets/HerdrSession-DKFCJMst.js +4 -0
  53. package/dist/client/assets/{HomeHero-Cfsow7qL.js → HomeHero-CAEg8Yg5.js} +1 -1
  54. package/dist/client/assets/{KnowledgeSearchInspector-DKashKoH.js → KnowledgeSearchInspector-C2EZsQ5i.js} +1 -1
  55. package/dist/client/assets/KnowledgeSearchScreen-DvdOFh-b.js +1 -0
  56. package/dist/client/assets/{LaneToolHoverCard-BzehBmdi.js → LaneToolHoverCard-DrPXYZvQ.js} +1 -1
  57. package/dist/client/assets/LaneTraceDetailSheet-Dl7foF88.js +1 -0
  58. package/dist/client/assets/{LaneTraceEventFocus-DYvHfs_3.js → LaneTraceEventFocus-X4-DDFEo.js} +1 -1
  59. package/dist/client/assets/{MeshCanvas-DIjlrMPU.js → MeshCanvas-rtCBD7s6.js} +1 -1
  60. package/dist/client/assets/{MeshCanvasMinimap-DEq-PkF0.js → MeshCanvasMinimap-CuvXOkc7.js} +1 -1
  61. package/dist/client/assets/MeshScreen-D5zzTn0o.js +1 -0
  62. package/dist/client/assets/{MeshTopologyView-BMHpH5BU.js → MeshTopologyView-CeTShs-U.js} +2 -2
  63. package/dist/client/assets/{MessageComposerSuggestions-zAUUcLOv.js → MessageComposerSuggestions-Cs9u-F_3.js} +1 -1
  64. package/dist/client/assets/MessagesScreen-BhOJ7_tj.js +1 -0
  65. package/dist/client/assets/MissionContextRail-0O-Zu1Tn.js +1 -0
  66. package/dist/client/assets/MissionControlView-D2JO9u-y.js +1 -0
  67. package/dist/client/assets/{MissionFocusOverlay-C7cPt6eU.js → MissionFocusOverlay-LnjmqBiW.js} +1 -1
  68. package/dist/client/assets/{MissionLeftAgentRow-CxlH3dON.js → MissionLeftAgentRow-nc1Jyq3D.js} +1 -1
  69. package/dist/client/assets/MissionLogPane-lZ9vUftY.js +1 -0
  70. package/dist/client/assets/{NewAgentModal-DprvD4EK.js → NewAgentModal-K1cvdmZr.js} +1 -1
  71. package/dist/client/assets/NewChatComposer-C5LT7MF7.css +1 -0
  72. package/dist/client/assets/NewChatComposer-DXDxV2Mh.js +19 -0
  73. package/dist/client/assets/{NewChatOrigin--pHWUb4V.js → NewChatOrigin-CnjoswTG.js} +1 -1
  74. package/dist/client/assets/{ObserveEmbedScreen-CfvrnOiZ.js → ObserveEmbedScreen-CRpzYf0Y.js} +1 -1
  75. package/dist/client/assets/{ObserveTextFlow-CBitljxi.js → ObserveTextFlow-DJxQc2H6.js} +2 -2
  76. package/dist/client/assets/{ObservedTopologyPanel-Dv6fbHzW.js → ObservedTopologyPanel-C1AQM0Mq.js} +1 -1
  77. package/dist/client/assets/OpenScoutAppShell-DrHYD_pd.js +87 -0
  78. package/dist/client/assets/OpsAgentsView-BnMX0vEY.js +1 -0
  79. package/dist/client/assets/OpsScreen-BeC0lieE.js +1 -0
  80. package/dist/client/assets/OpsSubnav-D5Bpowtk.js +1 -0
  81. package/dist/client/assets/{PlanView-DYtt8H37.js → PlanView-DDXdC19M.js} +1 -1
  82. package/dist/client/assets/ProjectAgentProfile-zE1cApxw.js +1 -0
  83. package/dist/client/assets/{ProjectAgentProfileBar-B3IvVbqS.js → ProjectAgentProfileBar-MODhG0P6.js} +1 -1
  84. package/dist/client/assets/{ProjectAgentProfileHero-D5E8yvDj.js → ProjectAgentProfileHero-C1ImgGDu.js} +1 -1
  85. package/dist/client/assets/ProjectsInbox-C3Jd6JTk.js +2 -0
  86. package/dist/client/assets/{ProjectsRail-DEDS-M1c.js → ProjectsRail-B1zrQLZe.js} +1 -1
  87. package/dist/client/assets/ProjectsScreen-PW_NH5VK.js +1 -0
  88. package/dist/client/assets/ProjectsThreadAside-DaCEUWN1.js +1 -0
  89. package/dist/client/assets/Provider-DSsb2gLR.js +1 -0
  90. package/dist/client/assets/{RailRow-BTlVAnHS.js → RailRow-DerXOXQS.js} +1 -1
  91. package/dist/client/assets/RawSessionsTable-LWEvXJzj.js +1 -0
  92. package/dist/client/assets/RealtimeVoiceScreen-XtxbCjOs.js +1 -0
  93. package/dist/client/assets/{RepoDiffEmbedScreen-CtTdlQ2A.js → RepoDiffEmbedScreen-C9oLCcZX.js} +1 -1
  94. package/dist/client/assets/{RepoDiffPageScreen-BRvaVYoC.js → RepoDiffPageScreen-CGEMAv2Z.js} +1 -1
  95. package/dist/client/assets/{RepoDiffViewer-Bo0gREMj.js → RepoDiffViewer-CB8PSVey.js} +1 -1
  96. package/dist/client/assets/RepoDiffViewerLazy-DIxkiMto.js +2 -0
  97. package/dist/client/assets/{ReposScreen-BBkJf8xT.js → ReposScreen-BN1lVjOj.js} +1 -1
  98. package/dist/client/assets/{ScoutDeckSurface-Bi9ov9Bm.js → ScoutDeckSurface-BCpl0QCx.js} +1 -1
  99. package/dist/client/assets/{ScoutSurface-DEQg_7Io.js → ScoutSurface-BEnDlynn.js} +1 -1
  100. package/dist/client/assets/{ScoutbotBroadcastChip-DJXuyn73.js → ScoutbotBroadcastChip-z9R_pC_U.js} +1 -1
  101. package/dist/client/assets/{ScoutbotFxLab-BgsuLDjo.js → ScoutbotFxLab-fAROyIfz.js} +1 -1
  102. package/dist/client/assets/{ScoutbotRealtimeVoiceCall-Bzyl0BCS.js → ScoutbotRealtimeVoiceCall-CDyFJX8m.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-Bks0CO2h.js → SecondaryNav-Hv5AJ3Fv.js} +1 -1
  104. package/dist/client/assets/{SessionEmbedScreen-b0Zgmfx5.js → SessionEmbedScreen-CDRpQc3g.js} +1 -1
  105. package/dist/client/assets/{SessionObserve-Dlx5vDaV.js → SessionObserve-BmmJ8dEh.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-ChBD1d4c.js → SessionObserveEvidence-CEedIk2a.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-Dk-O4OVt.js +1 -0
  108. package/dist/client/assets/SessionsScreen-BJEjuo2X.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-C587L1i1.js → SettingsDrawer-DL-SVLdd.js} +1 -1
  110. package/dist/client/assets/SettingsScreen-DJ-BhBwR.js +1 -0
  111. package/dist/client/assets/{ShikiPane-I_OTW5NO.js → ShikiPane-B7O4if20.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-FCqT1zO3.js → SlidePanel-B3gc5HnM.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-CQs-jC-v.js → SpriteAvatar-BpQDpOkq.js} +1 -1
  114. package/dist/client/assets/{StatusPill-CbABggnQ.js → StatusPill-B33sQinT.js} +1 -1
  115. package/dist/client/assets/{TailView-C_MXVSum.js → TailView-DL3YZkzE.js} +2 -2
  116. package/dist/client/assets/Terminal-Dp1FSGIS.js +1 -0
  117. package/dist/client/assets/TerminalEmbedScreen-DP9IM4xf.js +1 -0
  118. package/dist/client/assets/{TextDocumentSurface-C-9EtYqt.js → TextDocumentSurface-DRjctOIt.js} +1 -1
  119. package/dist/client/assets/{TmuxPeek-Dz1gJ2pU.js → TmuxPeek-DNC4uWky.js} +1 -1
  120. package/dist/client/assets/{VoicePermissionsPanel-MfICy9kk.js → VoicePermissionsPanel-WLN0V-Xv.js} +1 -1
  121. package/dist/client/assets/{WorkDetailScreen-Cs7kdllj.js → WorkDetailScreen-D2Yl0mYZ.js} +1 -1
  122. package/dist/client/assets/{WorkFilesViewer-CF-nhtZ4.js → WorkFilesViewer-BbVfcUN-.js} +1 -1
  123. package/dist/client/assets/{activity-WhBf3FXP.js → activity-BxwKkT8z.js} +1 -1
  124. package/dist/client/assets/{addon-fit-q-x_HytU.js → addon-fit-B9O2vJoh.js} +1 -1
  125. package/dist/client/assets/{addon-webgl-fhhvEA9h.js → addon-webgl-BhRZFDcn.js} +1 -1
  126. package/dist/client/assets/{agent-essentials-DyJiUGpZ.js → agent-essentials-SrzMYEXV.js} +1 -1
  127. package/dist/client/assets/agent-identity-BxCsXnDp.js +1 -0
  128. package/dist/client/assets/{agent-lane-card-model-BCIwPjEh.js → agent-lane-card-model-DSWdGu-v.js} +1 -1
  129. package/dist/client/assets/agent-lane-detail-BNNm6FNu.js +2 -0
  130. package/dist/client/assets/{agent-lane-preview-BtnfNyFR.js → agent-lane-preview-C33Dwpn7.js} +1 -1
  131. package/dist/client/assets/{agent-lanes-model-Bl6xfviL.js → agent-lanes-model-CPgQRenB.js} +2 -2
  132. package/dist/client/assets/{arc.es-DPJ0xRV6.js → arc.es-NlJw-19N.js} +1 -1
  133. package/dist/client/assets/{arrow-down-DsD-dYj-.js → arrow-down-D3-IbArq.js} +1 -1
  134. package/dist/client/assets/{arrow-left-WjQIN9J6.js → arrow-left-_vS7itsV.js} +1 -1
  135. package/dist/client/assets/{arrow-up-right-CtTDrZJr.js → arrow-up-right-CcrWONpD.js} +1 -1
  136. package/dist/client/assets/{bot-B_Uzf4_O.js → bot-BRINYlC6.js} +1 -1
  137. package/dist/client/assets/{check-BbgHJX8u.js → check-COxArFXG.js} +1 -1
  138. package/dist/client/assets/{chevron-down-BFai6ZfE.js → chevron-down-DRCbnzyY.js} +1 -1
  139. package/dist/client/assets/{chevron-right-CyUa1zXx.js → chevron-right-CNE6QAVr.js} +1 -1
  140. package/dist/client/assets/{chunk-HRAB3GC3-CvwpNg-G.js → chunk-HRAB3GC3-CAeEKaf5.js} +1 -1
  141. package/dist/client/assets/chunk-JTPDIGGW-s6WbxdjC.js +46 -0
  142. package/dist/client/assets/{chunk-T65CQEWV-DI4NKdNq.js → chunk-T65CQEWV-CiZ_ICHW.js} +1 -1
  143. package/dist/client/assets/chunk-YOZR3KYS-DLOc92uD.js +2 -0
  144. package/dist/client/assets/{clock-DviOalxA.js → clock-CyfvRmj6.js} +1 -1
  145. package/dist/client/assets/{code-xml-05TD3uOC.js → code-xml--LjSM4Mv.js} +1 -1
  146. package/dist/client/assets/content-7ZeCPAEt.js +1 -0
  147. package/dist/client/assets/content-BHUcUCH5.js +1 -0
  148. package/dist/client/assets/content-BUhvLPkv.js +1 -0
  149. package/dist/client/assets/content-BomQ5YWo.js +1 -0
  150. package/dist/client/assets/content-C39ELNgC.js +1 -0
  151. package/dist/client/assets/content-C4RYKHut.js +1 -0
  152. package/dist/client/assets/content-CCiZfG4H.js +1 -0
  153. package/dist/client/assets/content-CDpDtVI-.js +1 -0
  154. package/dist/client/assets/content-CO-9CeFd.js +1 -0
  155. package/dist/client/assets/content-CuOLxp1x.js +1 -0
  156. package/dist/client/assets/content-CvtLIjXS.js +1 -0
  157. package/dist/client/assets/content-CzwTUb9n.js +1 -0
  158. package/dist/client/assets/content-DQXbo2RO.js +1 -0
  159. package/dist/client/assets/content-DRTQ9QQb.js +1 -0
  160. package/dist/client/assets/content-LCELs6zg.js +1 -0
  161. package/dist/client/assets/content-Uqt8AG-s.css +1 -0
  162. package/dist/client/assets/content-qsDjA4Au.js +1 -0
  163. package/dist/client/assets/{conversation-icons-DohQL6GI.js → conversation-icons-c-hXv7hY.js} +1 -1
  164. package/dist/client/assets/conversation-model-CHwHZNw-.js +1 -0
  165. package/dist/client/assets/conversation-motion-features-T8vF9zED.js +1 -0
  166. package/dist/client/assets/{copy-CwCAivnc.js → copy-4LfKIdQJ.js} +1 -1
  167. package/dist/client/assets/{createLucideIcon-DlxlBfLC.js → createLucideIcon-ClCdc3F9.js} +1 -1
  168. package/dist/client/assets/discover-7Ks00w-M.js +2 -0
  169. package/dist/client/assets/embed-entry-n2ThmSSX.js +2 -0
  170. package/dist/client/assets/{external-link-CnjcXf32.js → external-link-CnaI1QFS.js} +1 -1
  171. package/dist/client/assets/{eye-So8tNNK6.js → eye-BFlhMzQL.js} +1 -1
  172. package/dist/client/assets/{file-text-i3xTDUjJ.js → file-text-DG-pufl1.js} +1 -1
  173. package/dist/client/assets/{gestures-CgvAMd6F.js → gestures-CxG3Dphs.js} +1 -1
  174. package/dist/client/assets/home-live-action-BkqGLVRY.js +1 -0
  175. package/dist/client/assets/home-moving-signal-aNJusIzL.js +1 -0
  176. package/dist/client/assets/home-now-card-BQK4EFHx.js +1 -0
  177. package/dist/client/assets/{home-now-card-nano-CkLHUQ4J.js → home-now-card-nano-CdtzqSIF.js} +1 -1
  178. package/dist/client/assets/hooks-Dst1TH7n.js +2 -0
  179. package/dist/client/assets/index-9as_JTUs.css +1 -0
  180. package/dist/client/assets/index-CU9dtwJk.js +1 -0
  181. package/dist/client/assets/{index-sUomXsrf.js → index-CzVeWScw.js} +2 -2
  182. package/dist/client/assets/index-Dewd56RX.js +1 -0
  183. package/dist/client/assets/index-_YQXKEhb.js +1 -0
  184. package/dist/client/assets/{inspector-panel-DhXd-YbT.js → inspector-panel-DgOM8nCo.js} +1 -1
  185. package/dist/client/assets/keyboard-nav-BJnFoFDP.js +1 -0
  186. package/dist/client/assets/{lane-observe-DrhKkQ3A.js → lane-observe-BA3g9aVd.js} +1 -1
  187. package/dist/client/assets/{lane-roster-store-NE15Oe6M.js → lane-roster-store-pR4ZaYQm.js} +1 -1
  188. package/dist/client/assets/left-BhzPp-_E.js +1 -0
  189. package/dist/client/assets/left-CN1MABD0.js +2 -0
  190. package/dist/client/assets/left-DDgbsio7.js +1 -0
  191. package/dist/client/assets/left-Dpf2R9uD.js +1 -0
  192. package/dist/client/assets/left-HwwbMVtl.js +2 -0
  193. package/dist/client/assets/left-YfH0daht.js +1 -0
  194. package/dist/client/assets/left-agents-CYUwAy2Z.js +1 -0
  195. package/dist/client/assets/left-default-vEGZALPv.js +1 -0
  196. package/dist/client/assets/left-lanes-bphF-vlX.js +1 -0
  197. package/dist/client/assets/left-mission-B54-c3hq.js +1 -0
  198. package/dist/client/assets/left-np5USKqG.js +1 -0
  199. package/dist/client/assets/left-plan-BNBuDoPQ.js +2 -0
  200. package/dist/client/assets/library-DbCVJG_O.js +1 -0
  201. package/dist/client/assets/{loader-circle-lWOOKezu.js → loader-circle-Byb9kSFx.js} +1 -1
  202. package/dist/client/assets/{local-agents-C7fDHLVC.js → local-agents-DBaUbP-_.js} +1 -1
  203. package/dist/client/assets/{mentions-CY_wPZc5.js → mentions-fbQJ2mBI.js} +1 -1
  204. package/dist/client/assets/{mesh-ops-Kn8pCtyJ.js → mesh-ops-Cnw3vwAu.js} +1 -1
  205. package/dist/client/assets/{mesh-view-store-D14ihwkF.js → mesh-view-store-Btlyc7rW.js} +1 -1
  206. package/dist/client/assets/{message-circle-C5UZ6fO7.js → message-circle-aGOfQWm2.js} +1 -1
  207. package/dist/client/assets/{message-markup-C8Nx04sP.js → message-markup-mGF07emJ.js} +1 -1
  208. package/dist/client/assets/{message-square-BD-4UUdc.js → message-square-CIXda-Y7.js} +1 -1
  209. package/dist/client/assets/mission-control-m3BTDQ9l.css +1 -0
  210. package/dist/client/assets/{mission-control-store-xQHVQdm8.js → mission-control-store-CcoNeQHG.js} +1 -1
  211. package/dist/client/assets/mission-wall-CocIM1cF.js +1 -0
  212. package/dist/client/assets/{observe-uJfIlIUV.js → observe-BNFzh-7B.js} +1 -1
  213. package/dist/client/assets/openAgent-Dbv5wfuL.js +1 -0
  214. package/dist/client/assets/{page-status-BymFEFai.js → page-status-DDvNdA8s.js} +1 -1
  215. package/dist/client/assets/{paperclip-DL9BXPp2.js → paperclip-DfpJkR4s.js} +1 -1
  216. package/dist/client/assets/{plus-C9lTjsgd.js → plus-CmFQp9Uj.js} +1 -1
  217. package/dist/client/assets/profile-s3KRbip1.js +1 -0
  218. package/dist/client/assets/{projects-inbox-DfVmGFFk.js → projects-inbox-Diddml6e.js} +1 -1
  219. package/dist/client/assets/{radio-DedMyP8J.js → radio-PauJIekM.js} +1 -1
  220. package/dist/client/assets/{refresh-cw-D8PFyhUa.js → refresh-cw-4oeFn1Jn.js} +1 -1
  221. package/dist/client/assets/resolve-panes-cp6eNewO.js +1 -0
  222. package/dist/client/assets/resolve-sidebar-context-Dbo-5PWx.js +1 -0
  223. package/dist/client/assets/right-09W2JJFg.js +1 -0
  224. package/dist/client/assets/right-B-MKhiJ6.js +1 -0
  225. package/dist/client/assets/right-B91Zl8lQ.js +1 -0
  226. package/dist/client/assets/{right-C1sIsSHR.js → right-BcFnuse9.js} +1 -1
  227. package/dist/client/assets/right-BdtMzn35.js +1 -0
  228. package/dist/client/assets/right-BqmKXLtf.js +1 -0
  229. package/dist/client/assets/right-BzeB-Dpt.js +1 -0
  230. package/dist/client/assets/right-CkGOs-sq.js +1 -0
  231. package/dist/client/assets/right-CzGiNBzB.js +1 -0
  232. package/dist/client/assets/right-Dc7uqv7l.js +1 -0
  233. package/dist/client/assets/{rocket-CriBwkHM.js → rocket-C-AskjZH.js} +1 -1
  234. package/dist/client/assets/router-B-K15T7B.js +1 -0
  235. package/dist/client/assets/{runtime-picker-DOZpZOlt.js → runtime-picker-BCQD7d4K.js} +1 -1
  236. package/dist/client/assets/{scope-views-BF_RvGKU.js → scope-views-BhkbIFPY.js} +1 -1
  237. package/dist/client/assets/{scout-voice-BZ4KqADJ.js → scout-voice-S5_YZ2v8.js} +1 -1
  238. package/dist/client/assets/{scroll-text-BIYf6g6N.js → scroll-text-BV-BB7v-.js} +1 -1
  239. package/dist/client/assets/{search-DCT_EvPr.js → search-C3bSJluv.js} +1 -1
  240. package/dist/client/assets/{secondaryNavConfig-Drb7wPG4.js → secondaryNavConfig-Bg4Tc0gT.js} +1 -1
  241. package/dist/client/assets/{selection-bridge-CJOTyYQs.js → selection-bridge-B1dmkX3P.js} +1 -1
  242. package/dist/client/assets/{send-horizontal-DDwOgEs3.js → send-horizontal-CqogPmbY.js} +1 -1
  243. package/dist/client/assets/{server-CHZCp3cF.js → server-Brw5Y1Gh.js} +1 -1
  244. package/dist/client/assets/{session-catalog-XhGxCtP-.js → session-catalog-9FqXmjBw.js} +1 -1
  245. package/dist/client/assets/session-table-1xdSxSXq.js +1 -0
  246. package/dist/client/assets/{sliders-horizontal-B9Nj-Y4J.js → sliders-horizontal-CUiOH26y.js} +1 -1
  247. package/dist/client/assets/{sparkles-up7pVlX-.js → sparkles-BjCA3Evu.js} +1 -1
  248. package/dist/client/assets/{sse-CVoGDiKW.js → sse-QcU9bikk.js} +1 -1
  249. package/dist/client/assets/synthetic-agent-routing-aduMYO7P.js +1 -0
  250. package/dist/client/assets/system-surfaces-redesign-B7GQhfpw.css +1 -0
  251. package/dist/client/assets/{tail-display-BdyoLvzY.js → tail-display-BRcJltQa.js} +2 -2
  252. package/dist/client/assets/{tail-events-CTipUIli.js → tail-events-C6K7bCWB.js} +1 -1
  253. package/dist/client/assets/{terminal-DXQISjZn.js → terminal-DrTkVXIj.js} +1 -1
  254. package/dist/client/assets/{terminal-relay-B5Sma7fK.js → terminal-relay-BkXjjSkq.js} +1 -1
  255. package/dist/client/assets/{terminal-screen-19jAI0Cw.css → terminal-screen-BqVnCwl0.css} +1 -1
  256. package/dist/client/assets/terminal-sessions-C3qU8tnY.js +1 -0
  257. package/dist/client/assets/{terminal-takeover-X97KCSJk.js → terminal-takeover-KvmTwABa.js} +1 -1
  258. package/dist/client/assets/{use-conversation-list-B1T6J_qE.js → use-conversation-list-C5sF6WBR.js} +1 -1
  259. package/dist/client/assets/{use-fleet-active-asks-DLofGhhK.js → use-fleet-active-asks-BOMPW0nl.js} +1 -1
  260. package/dist/client/assets/{use-mesh-ops-items-ByGZk8rU.js → use-mesh-ops-items-Co05vcTV.js} +1 -1
  261. package/dist/client/assets/{use-reduced-motion-Cvk-HRKg.js → use-reduced-motion-Dla-G_Jz.js} +1 -1
  262. package/dist/client/assets/{use-scout-dev-flags-BHvg3G2c.js → use-scout-dev-flags-BOQF3fW2.js} +1 -1
  263. package/dist/client/assets/{useAgentHoverCard-D5e8Qg1z.js → useAgentHoverCard-FtCmY-b9.js} +1 -1
  264. package/dist/client/assets/useContentSecondaryNav-BX7Sq7vy.js +1 -0
  265. package/dist/client/assets/{usePierreRuntime-DIVunfX0.js → usePierreRuntime-Bo4lD7Ui.js} +1 -1
  266. package/dist/client/assets/{wrench-pEVd8JnN.js → wrench-CeCdjiPF.js} +1 -1
  267. package/dist/client/assets/{x-0XjXwGqq.js → x-D4X_y1j_.js} +1 -1
  268. package/dist/client/assets/{xterm-CRLlV1Xp.js → xterm-D2a5wrkJ.js} +1 -1
  269. package/dist/client/index.html +2 -2
  270. package/dist/main.mjs +1404 -356
  271. package/dist/node/main.mjs +63 -15
  272. package/dist/openscout-terminal-relay.mjs +16 -4
  273. package/dist/pairing-runtime-controller.mjs +3028 -2946
  274. package/dist/runtime/broker-daemon.mjs +356 -134
  275. package/dist/scout-control-plane-web.mjs +5631 -5183
  276. package/dist/scout-web-server.mjs +5631 -5183
  277. package/package.json +1 -1
  278. package/dist/client/assets/ActivityScreen-DnqqRSlS.js +0 -1
  279. package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +0 -1
  280. package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +0 -1
  281. package/dist/client/assets/AgentFloorView-CycUn0Lv.js +0 -1
  282. package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +0 -1
  283. package/dist/client/assets/AgentLaneDetailSheet-CWs9wKWk.js +0 -5
  284. package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +0 -1
  285. package/dist/client/assets/AgentsScreen-BMXvuiA2.js +0 -1
  286. package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +0 -1
  287. package/dist/client/assets/BrokerScreen-CObCQvoy.js +0 -5
  288. package/dist/client/assets/CodeScreen-BXqi72NK.js +0 -1
  289. package/dist/client/assets/ConversationComposer-BBNPa5S9.js +0 -1
  290. package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +0 -1
  291. package/dist/client/assets/ConversationHeader-DXMT-YXv.js +0 -1
  292. package/dist/client/assets/ConversationPanels-DHCtilQF.js +0 -2
  293. package/dist/client/assets/ConversationScreen-DSxIt9pq.css +0 -1
  294. package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +0 -1
  295. package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +0 -1
  296. package/dist/client/assets/FollowScreen--Q04xSSE.js +0 -1
  297. package/dist/client/assets/HarnessMark-Dm_qm1Ku.js +0 -1
  298. package/dist/client/assets/HarnessesScreen-Y54viPX8.js +0 -1
  299. package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +0 -1
  300. package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +0 -1
  301. package/dist/client/assets/MeshScreen-TgDtz-1l.js +0 -1
  302. package/dist/client/assets/MessagesScreen-BTQL0UcE.js +0 -1
  303. package/dist/client/assets/MissionControlView-D59SPnAm.js +0 -1
  304. package/dist/client/assets/MissionLogPane-Ye3YlF9s.js +0 -1
  305. package/dist/client/assets/NewChatComposer-B5FnPyzS.js +0 -19
  306. package/dist/client/assets/NewChatComposer-W-t-L4oV.css +0 -1
  307. package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +0 -87
  308. package/dist/client/assets/OpsAgentsView-CoBfAigH.js +0 -1
  309. package/dist/client/assets/OpsScreen-Bbo0W64T.js +0 -1
  310. package/dist/client/assets/OpsSubnav-CoN8utF8.js +0 -1
  311. package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +0 -1
  312. package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +0 -2
  313. package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +0 -1
  314. package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +0 -1
  315. package/dist/client/assets/Provider-tFc3jqZ4.js +0 -1
  316. package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +0 -1
  317. package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +0 -1
  318. package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +0 -2
  319. package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +0 -1
  320. package/dist/client/assets/SessionsScreen-BlknOWAd.js +0 -1
  321. package/dist/client/assets/SettingsScreen-BIlYxv_a.js +0 -1
  322. package/dist/client/assets/Terminal-DwZyo8kA.js +0 -1
  323. package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +0 -1
  324. package/dist/client/assets/agent-chat-Bfjd9y6c.js +0 -1
  325. package/dist/client/assets/agent-identity-xQHedtLl.js +0 -1
  326. package/dist/client/assets/agent-lane-detail-Cw4QVAgH.js +0 -1
  327. package/dist/client/assets/chunk-YOZR3KYS-BW85tiCr.js +0 -47
  328. package/dist/client/assets/content-2u_eV3fX.js +0 -1
  329. package/dist/client/assets/content-5irOghrY.js +0 -1
  330. package/dist/client/assets/content-8Z_0CwtD.js +0 -1
  331. package/dist/client/assets/content-B38YRDBu.js +0 -1
  332. package/dist/client/assets/content-BE3uK0LB.js +0 -1
  333. package/dist/client/assets/content-BtIxSqVY.js +0 -1
  334. package/dist/client/assets/content-CFsPAihU.js +0 -1
  335. package/dist/client/assets/content-CHU0wwA3.css +0 -1
  336. package/dist/client/assets/content-CKj5g5tu.js +0 -1
  337. package/dist/client/assets/content-CLDWXf9Z.js +0 -1
  338. package/dist/client/assets/content-CRr73E0r.js +0 -1
  339. package/dist/client/assets/content-CVR75_Uj.js +0 -1
  340. package/dist/client/assets/content-Czdp7_JQ.js +0 -1
  341. package/dist/client/assets/content-D0_EJ6nP.js +0 -1
  342. package/dist/client/assets/content-DNmxpNhD.js +0 -1
  343. package/dist/client/assets/content-XpbI9uxd.js +0 -1
  344. package/dist/client/assets/content-cyxWdgKQ.js +0 -1
  345. package/dist/client/assets/conversation-model-C4yb6_FA.js +0 -1
  346. package/dist/client/assets/conversation-motion-features-CifSdJtm.js +0 -1
  347. package/dist/client/assets/discover-DoiAJo4Z.js +0 -2
  348. package/dist/client/assets/embed-entry-D1Or9S4d.js +0 -2
  349. package/dist/client/assets/home-live-action-B22u89j7.js +0 -1
  350. package/dist/client/assets/home-moving-signal-BdkERL6B.js +0 -1
  351. package/dist/client/assets/home-now-card-lLkv6nQs.js +0 -1
  352. package/dist/client/assets/hooks-BPLDD9yu.js +0 -2
  353. package/dist/client/assets/index-DGoLx89y.js +0 -1
  354. package/dist/client/assets/index-DITWsjFb.css +0 -1
  355. package/dist/client/assets/index-m6dFtY5f.js +0 -1
  356. package/dist/client/assets/index-pY8-Mz7y.js +0 -1
  357. package/dist/client/assets/keyboard-nav-BhZZ5HEq.js +0 -1
  358. package/dist/client/assets/left-B6eawimv.js +0 -1
  359. package/dist/client/assets/left-BL2uBHe0.js +0 -2
  360. package/dist/client/assets/left-BNJguPDG.js +0 -1
  361. package/dist/client/assets/left-BvCtvN0f.js +0 -1
  362. package/dist/client/assets/left-CfBb6bxM.js +0 -1
  363. package/dist/client/assets/left-DTrlBF0h.js +0 -2
  364. package/dist/client/assets/left-agents-DsOHgDCY.js +0 -1
  365. package/dist/client/assets/left-d4hlBBxY.js +0 -1
  366. package/dist/client/assets/left-default-BRCwoCJr.js +0 -1
  367. package/dist/client/assets/left-lanes-DNtoRzoV.js +0 -1
  368. package/dist/client/assets/left-mission-DsTu2X5Y.js +0 -1
  369. package/dist/client/assets/left-plan-CtySjsXC.js +0 -2
  370. package/dist/client/assets/library-CLpgWNJO.js +0 -1
  371. package/dist/client/assets/mission-control-D3ikEPND.css +0 -1
  372. package/dist/client/assets/openAgent-Bjt57GdM.js +0 -1
  373. package/dist/client/assets/profile-BqY5tesX.js +0 -1
  374. package/dist/client/assets/resolve-panes-1xeZMuaw.js +0 -1
  375. package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +0 -1
  376. package/dist/client/assets/right-1x7HzabC.js +0 -1
  377. package/dist/client/assets/right-CFzPUzlF.js +0 -1
  378. package/dist/client/assets/right-CRKyeJDk.js +0 -1
  379. package/dist/client/assets/right-CagzkLWg.js +0 -1
  380. package/dist/client/assets/right-CsV149pN.js +0 -1
  381. package/dist/client/assets/right-DITNyG2s.js +0 -1
  382. package/dist/client/assets/right-E3nNcLE3.js +0 -1
  383. package/dist/client/assets/right-eUQvSjd7.js +0 -1
  384. package/dist/client/assets/right-ozp4nM44.js +0 -1
  385. package/dist/client/assets/router-Dja9_ygK.js +0 -1
  386. package/dist/client/assets/session-table-sAVe44a4.js +0 -1
  387. package/dist/client/assets/system-surfaces-redesign-CD26LFc0.css +0 -1
  388. package/dist/client/assets/terminal-sessions-D5CIR2OL.js +0 -1
  389. package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +0 -1
@@ -1 +0,0 @@
1
- import{r as u,j as s}from"./index-sUomXsrf.js";import{A as Z}from"./AgentAvatar-CufDA4A-.js";import{a as B}from"./api-h5zurxmi.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{e as q}from"./agent-chat-Bfjd9y6c.js";import{b as Q,r as ss,s as es,a as ts}from"./session-catalog-XhGxCtP-.js";import{u as X}from"./sse-CVoGDiKW.js";import{t as K}from"./time-Dhsh_2EG.js";import{B as ls}from"./BackToPicker-CkUmHuuo.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-tFc3jqZ4.js";import{ConversationScreen as cs}from"./ConversationScreen-Dz2d_Z_F.js";import{S as ds}from"./SessionObserve-Dlx5vDaV.js";import{H as ns}from"./HarnessMark-Dm_qm1Ku.js";/* empty css */import{AgentDefinitionsWorkspace as ms}from"./AgentDefinitionsWorkspace-FpEkb-tu.js";import{AgentEssentialsGlyph as ps}from"./agent-essentials-DyJiUGpZ.js";import{b as us,p as z,n as as}from"./model-Co0zkMIc.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./colors-BtO5_zlx.js";import"./terminal-relay-B5Sma7fK.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./AgentDetailCard-DxxVkgT1.js";import"./AgentLiveActions-CZdAInEu.js";import"./terminal-takeover-X97KCSJk.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-CTipUIli.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";import"./text-DsBWV_4k.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-C9Ly01Ef.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ws({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ys({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const N=r?.data,v=(N?.events??[]).filter(bs),w=v.filter(g=>g.kind==="tool"),S=w.filter(g=>g.tool==="edit"||g.tool==="write"),y=w.filter(g=>g.tool==="read"),f=N?.files.length??0,b=N?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||f>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(b??$)},{k:"tools",v:U(w.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(y.length)},{k:"files",v:U(f)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=N?.metadata?.usage,a=_(D,{model:N?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,j=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(j&&j!==t.id?t.id:null),M=j??t.id,W=j&&t.harness==="codex"?"codex session id":j&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?z(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(ws,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function lt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=ss(e,o),x=u.useMemo(()=>es(o?.sessions??[],h),[o?.sessions,h]),N=x.find(n=>n.id===h)??null,I=N?.model??null,v=N?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[y,f]=u.useState("idle"),[b,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{f("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ts(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),j=n.sessionId?.trim();if(j){F(i,{view:"sessions",sessionId:j},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{f("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,size:46,tile:!0,presence:!1})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(ps,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled:y==="starting",onClick:T,children:y==="starting"?"Starting...":"+ New session"}),b&&s.jsx("div",{className:"s-sess-action-error",children:b}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const j=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=j?"now":n.endedAt?`ended · ${K(n.endedAt)||"recent"}`:K(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${j?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:j?"var(--accent)":"var(--dim)",opacity:j?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?z(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${j?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ys,{agentId:e.id,session:n,active:j,onPrimary:()=>j?void E():O(n),primaryLabel:j?"Continue":"Resume",primaryTitle:j?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?z(t.cwd):"main"),N=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?z(t.cwd):null)??e.name,w=r?.data.metadata?.usage??null,S=w?.assistantMessages??null,y=_(w,{model:r?.data.metadata?.session?.model??N,adapterType:I}),f=y?Math.min(100,y.pct):null,b=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?K(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":b,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":b,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,N?` · ${N}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[f!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),f,"%"]}):null,w&&(w.inputTokens||w.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(w.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=ss(e,o),h=u.useMemo(()=>es(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,N=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ts(e.id,r,l,h,N),v=Q(N,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const w=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,y=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,f=e.handle?.trim().replace(/^@+/,"")||null,b=f?`@${f}`:t,$=f&&t.toLowerCase()!==f.toLowerCase()?t:[e.project?`/${e.project}`:null,e.branch,w].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,size:48,tile:!0,presence:!1}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[s.jsx("h1",{className:"ap-profileName",title:b,children:b}),e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:e.harness,size:13})}):null]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),f&&t.toLowerCase()!==f.toLowerCase()?s.jsx("span",{className:"ap-profileId",title:e.id,children:t}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${K(a.endedAt)||"recent"}`:K(a.startedAt)||"recent",O=a.cwd?z(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,j=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,j,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,y?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:y})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null]})]})]})]})}function ct({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=us(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[N,I]=u.useState(null),{route:v}=G(),w=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(w,N?.sessions??[])??w,y=u.useCallback(async()=>{const b=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(b)},[e.id]),f=u.useCallback(async()=>{x(!0);try{const b=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${b?`?${b}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),y();const b=window.setTimeout(()=>{y()},3e3);return()=>window.clearTimeout(b)},[y]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&f()},[i,f]),X(()=>{y(),i==="observe"&&f()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const b=setInterval(()=>{f()},2500);return()=>clearInterval(b)},[i,p?.data.live,f]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:N,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:N,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ms,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ds,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(cs,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function dt({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(ls,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{ct as AgentDetailWithRail,dt as AgentProfileBar,lt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
@@ -1 +0,0 @@
1
- import{j as r}from"./index-sUomXsrf.js";import{ActivityContent as s}from"./content-BE3uK0LB.js";import"./index-BWHgHrtv.js";import"./router-Dja9_ygK.js";import"./index-m6dFtY5f.js";import"./Provider-tFc3jqZ4.js";import"./AgentDetailCard-DxxVkgT1.js";/* empty css */import{AgentsLeft as e}from"./left-BvCtvN0f.js";import{AgentsContent as n}from"./content-D0_EJ6nP.js";import{AgentsInspector as m}from"./right-DITNyG2s.js";/* empty css */import"./secondaryNavConfig-Drb7wPG4.js";/* empty css */import"./BackToPicker-CkUmHuuo.js";import"./runtime-picker-DOZpZOlt.js";import"./ConversationScreen-Dz2d_Z_F.js";/* empty css */import"./ObservedTopologyPanel-Dv6fbHzW.js";import"./SessionObserve-Dlx5vDaV.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-CZdAInEu.js";import{P as c}from"./ProjectsRail-DEDS-M1c.js";import{ProjectsScreen as f}from"./ProjectsScreen-Cxk4CuYn.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-BF66ugT5.js";import{BriefingsContent as x}from"./content-CVR75_Uj.js";/* empty css */import{BrokerContent as j}from"./content-cyxWdgKQ.js";import"./NewChatComposer-B5FnPyzS.js";import{ChatLeft as u}from"./left-BL2uBHe0.js";/* empty css */import{ChatContent as l}from"./content-DNmxpNhD.js";import{ConversationInspector as i}from"./right-CagzkLWg.js";import{CodeContent as h}from"./CodeScreen-BXqi72NK.js";import{FollowContent as C}from"./content-CLDWXf9Z.js";/* empty css */import{HarnessesContent as d}from"./content-CRr73E0r.js";/* empty css */import{HomeLeft as I}from"./left-DTrlBF0h.js";import{H as p}from"./content-BtIxSqVY.js";import{HomeRight as w}from"./right-eUQvSjd7.js";import{MeshLeft as P}from"./left-CfBb6bxM.js";import{MeshContent as L}from"./content-Czdp7_JQ.js";import{MeshInspectorPanel as R}from"./right-CsV149pN.js";import"./mesh-view-store-D14ihwkF.js";/* empty css */import{MeshOpsLeft as k}from"./left-B6eawimv.js";import{MeshOpsContent as A}from"./content-5irOghrY.js";import{MeshOpsInspector as M}from"./right-CFzPUzlF.js";import{OpsLeft as S}from"./left-BNJguPDG.js";import{OpsContent as b}from"./content-CFsPAihU.js";/* empty css */import"./RailRow-BTlVAnHS.js";import"./left-mission-DsTu2X5Y.js";import"./mission-control-store-xQHVQdm8.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-FCqT1zO3.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-C_MXVSum.js";import{ReposContent as g}from"./content-2u_eV3fX.js";import{ReposInspector as H}from"./right-C1sIsSHR.js";/* empty css */import"./RepoDiffViewerLazy-C8UPk4oo.js";import"./cache-Dr0why2k.js";import{SearchContent as O}from"./content-B38YRDBu.js";import{K as T}from"./KnowledgeSearchInspector-DKashKoH.js";/* empty css */import{SessionsContent as y}from"./content-8Z_0CwtD.js";import{SessionsInspector as B}from"./right-E3nNcLE3.js";/* empty css */import{SettingsContent as K}from"./content-CKj5g5tu.js";import"./SettingsDrawer-C587L1i1.js";import{TerminalLeft as W}from"./left-d4hlBBxY.js";import{TerminalContent as E}from"./Terminal-DwZyo8kA.js";import{TerminalInspector as F}from"./right-CRKyeJDk.js";import{WorkContent as V}from"./content-XpbI9uxd.js";import{WorkInspector as q}from"./right-ozp4nM44.js";import{RealtimeVoicePage as z}from"./RealtimeVoiceScreen-B0Bem5Rc.js";import"./ActivityScreen-DnqqRSlS.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./sse-CVoGDiKW.js";import"./colors-BtO5_zlx.js";import"./mentions-CY_wPZc5.js";import"./time-Dhsh_2EG.js";import"./ContextMenu-BlBQhpax.js";import"./EmptyState-CoL-QuUO.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./AgentInfoScreen-CAQAxpAK.js";import"./conversation-model-C4yb6_FA.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-BMXvuiA2.js";import"./AgentsSubnav-BTNjPYoA.js";import"./SecondaryNav-Bks0CO2h.js";import"./library-CLpgWNJO.js";import"./HarnessMark-Dm_qm1Ku.js";import"./AgentSessions-Bkr0lyry.js";import"./agents-project-model-UYiamtrU.js";import"./profile-BqY5tesX.js";import"./context-budget-DX_fwUs3.js";import"./agent-chat-Bfjd9y6c.js";import"./session-catalog-XhGxCtP-.js";import"./terminal-relay-B5Sma7fK.js";import"./AgentDefinitionsWorkspace-FpEkb-tu.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-C9Ly01Ef.js";import"./chevron-down-BFai6ZfE.js";import"./agent-essentials-DyJiUGpZ.js";import"./openAgent-Bjt57GdM.js";import"./terminal-takeover-X97KCSJk.js";import"./TmuxPeek-Dz1gJ2pU.js";import"./refresh-cw-D8PFyhUa.js";import"./message-square-BD-4UUdc.js";import"./search-DCT_EvPr.js";import"./terminal-DXQISjZn.js";import"./scroll-text-BIYf6g6N.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-DXMT-YXv.js";import"./eye-So8tNNK6.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-CTipUIli.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";import"./AddProjectForm-BoVtelSP.js";import"./projects-inbox-DfVmGFFk.js";import"./model-IGCUEsMy.js";import"./ProjectsInbox-BWiXjGi7.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-D7TfPYPN.js";import"./arrow-up-right-CtTDrZJr.js";import"./ProjectAgentProfile-FiiIcB5R.js";import"./ProjectAgentProfileBar-B3IvVbqS.js";import"./BriefingDetailScreen-i54EtZKW.js";import"./BriefingsScreen-CBrHojlQ.js";import"./BrokerScreen-CObCQvoy.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-opTLuZU6.js";import"./DispatchAftermath-BrreQifA.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-I_OTW5NO.js";import"./arrow-down-DsD-dYj-.js";import"./bot-B_Uzf4_O.js";import"./check-BbgHJX8u.js";import"./copy-CwCAivnc.js";import"./sparkles-up7pVlX-.js";import"./paperclip-DL9BXPp2.js";import"./plus-C9lTjsgd.js";import"./send-horizontal-DDwOgEs3.js";import"./radio-DedMyP8J.js";import"./NewChatOrigin--pHWUb4V.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-B1T6J_qE.js";import"./use-fleet-active-asks-DLofGhhK.js";import"./MessagesScreen-BTQL0UcE.js";import"./CodeDiffPane-CLOGjwul.js";import"./usePierreRuntime-DIVunfX0.js";/* empty css */import"./CodeProjectPicker-DTV8hR6A.js";/* empty css */import"./FollowScreen--Q04xSSE.js";import"./HarnessesScreen-Y54viPX8.js";import"./useContentSecondaryNav-ZfBNi3d4.js";import"./OpsSubnav-CoN8utF8.js";import"./operator-attention-BwSPeheT.js";import"./HomeHero-Cfsow7qL.js";import"./observe-uJfIlIUV.js";import"./agent-lanes-model-Bl6xfviL.js";import"./home-moving-signal-BdkERL6B.js";import"./home-live-action-B22u89j7.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-DlWTLl-v.js";import"./MeshScreen-TgDtz-1l.js";import"./MeshCanvas-DIjlrMPU.js";import"./chunk-T65CQEWV-DI4NKdNq.js";import"./useAgentHoverCard-D5e8Qg1z.js";import"./local-agents-C7fDHLVC.js";import"./mesh-ops-Kn8pCtyJ.js";import"./use-mesh-ops-items-ByGZk8rU.js";import"./use-scout-dev-flags-BHvg3G2c.js";import"./left-agents-DsOHgDCY.js";import"./left-default-BRCwoCJr.js";import"./left-lanes-DNtoRzoV.js";import"./lane-roster-store-NE15Oe6M.js";import"./left-plan-CtySjsXC.js";import"./OpsScreen-Bbo0W64T.js";import"./page-status-BymFEFai.js";import"./AgentLanesView-CxfbV8Kd.js";import"./AgentFloorView-CycUn0Lv.js";import"./AgentLanesPreflight-KWfLcaNB.js";import"./AgentLaneChrome-BfVygkgL.js";import"./AgentLaneCard-DTUvE96I.js";import"./AgentLaneSummaryResize-CMgzYvAA.js";import"./agent-lane-card-model-BCIwPjEh.js";import"./agent-lane-preview-BtnfNyFR.js";import"./AgentLaneDetailSheet-CWs9wKWk.js";import"./agent-lane-detail-Cw4QVAgH.js";import"./LaneTraceDetailSheet-CBf_aNZx.js";import"./LaneTraceEventFocus-DYvHfs_3.js";import"./MissionControlView-D59SPnAm.js";import"./MissionFocusOverlay-C7cPt6eU.js";import"./mission-control-model-C0fByIjm.js";import"./MissionLogPane-Ye3YlF9s.js";import"./OpsAgentsView-CoBfAigH.js";import"./DataTable-0DwuXyvW.js";import"./sliders-horizontal-B9Nj-Y4J.js";import"./PlanView-DYtt8H37.js";import"./AtopView-_OKDlZ1h.js";import"./MissionLeftAgentRow-CxlH3dON.js";import"./RepoDiffPageScreen-BRvaVYoC.js";import"./ReposScreen-BBkJf8xT.js";import"./selection-bridge-CJOTyYQs.js";import"./KnowledgeSearchScreen-DsdDz8wY.js";import"./clock-DviOalxA.js";import"./SessionsScreen-BlknOWAd.js";import"./RawSessionsTable-BsGVgZB3.js";import"./FlightObserveScreen-C-9S0nA5.js";import"./SettingsScreen-BIlYxv_a.js";import"./StatusPill-CbABggnQ.js";import"./AgentConfigurationScreen-CJqoMA0J.js";import"./server-CHZCp3cF.js";import"./VoicePermissionsPanel-MfICy9kk.js";import"./session-table-sAVe44a4.js";/* empty css */import"./chunk-YOZR3KYS-BW85tiCr.js";import"./WorkDetailScreen-Cs7kdllj.js";import"./WorkFilesViewer-CF-nhtZ4.js";import"./ScoutbotRealtimeVoiceCall-Bzyl0BCS.js";function rp(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 tp(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 op(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{tp as resolveContentPane,rp as resolveLeftPane,op as resolveRightPane};
@@ -1 +0,0 @@
1
- import{j as o}from"./index-sUomXsrf.js";import{AgentsLeft as i}from"./left-BvCtvN0f.js";/* empty css */import"./index-BWHgHrtv.js";import"./Provider-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./BackToPicker-CkUmHuuo.js";import"./AgentLiveActions-CZdAInEu.js";import"./ObservedTopologyPanel-Dv6fbHzW.js";/* empty css */import"./secondaryNavConfig-Drb7wPG4.js";/* empty css */import"./runtime-picker-DOZpZOlt.js";import"./index-m6dFtY5f.js";import"./AgentDetailCard-DxxVkgT1.js";import"./ConversationScreen-Dz2d_Z_F.js";/* empty css */import"./SessionObserve-Dlx5vDaV.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-DEDS-M1c.js";import"./ProjectsInbox-BWiXjGi7.js";import"./projects-inbox-DfVmGFFk.js";import{ChatLeft as p}from"./left-BL2uBHe0.js";/* empty css */import{HomeLeft as e}from"./left-DTrlBF0h.js";import"./content-BtIxSqVY.js";import{MeshLeft as s}from"./left-CfBb6bxM.js";import"./mesh-view-store-D14ihwkF.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-B6eawimv.js";import"./use-scout-dev-flags-BHvg3G2c.js";import"./mesh-ops-Kn8pCtyJ.js";import{OpsLeft as l}from"./left-BNJguPDG.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-FCqT1zO3.js";/* empty css */import"./mission-control-store-xQHVQdm8.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-C_MXVSum.js";import"./RailRow-BTlVAnHS.js";import"./left-mission-DsTu2X5Y.js";import{TerminalLeft as a}from"./left-d4hlBBxY.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-DEq-PkF0.js";import"./NewChatComposer-B5FnPyzS.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./api-h5zurxmi.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin--pHWUb4V.js";import"./keyboard-nav-BhZZ5HEq.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-0XjXwGqq.js";import"./createLucideIcon-DlxlBfLC.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./loader-circle-lWOOKezu.js";import"./file-text-i3xTDUjJ.js";import"./AgentAvatar-CufDA4A-.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./sse-CVoGDiKW.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./TextDocumentSurface-C-9EtYqt.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./terminal-sessions-D5CIR2OL.js";import"./terminal-takeover-X97KCSJk.js";import"./openContent-C6XO6kr5.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./message-square-BD-4UUdc.js";import"./scroll-text-BIYf6g6N.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-BBNPa5S9.js";import"./message-markup-C8Nx04sP.js";import"./mentions-CY_wPZc5.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-DXMT-YXv.js";import"./ConversationFeedRows-BuejHMCY.js";import"./ConversationPanels-DHCtilQF.js";import"./use-reduced-motion-Cvk-HRKg.js";import"./activity-WhBf3FXP.js";import"./message-circle-C5UZ6fO7.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-CTipUIli.js";import"./ConversationStatus-DSgdVofa.js";import"./conversation-icons-DohQL6GI.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BzehBmdi.js";import"./lane-observe-DrhKkQ3A.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CBitljxi.js";import"./SessionObserveEvidence-ChBD1d4c.js";import"./wrench-pEVd8JnN.js";import"./external-link-CnjcXf32.js";import"./AddProjectForm-BoVtelSP.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-D7TfPYPN.js";/* empty css */import"./cache-Dr0why2k.js";import"./arrow-up-right-CtTDrZJr.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-B1T6J_qE.js";import"./use-fleet-active-asks-DLofGhhK.js";import"./operator-attention-BwSPeheT.js";import"./openAgent-Bjt57GdM.js";import"./HomeHero-Cfsow7qL.js";import"./observe-uJfIlIUV.js";import"./agent-lanes-model-Bl6xfviL.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-BdkERL6B.js";import"./home-live-action-B22u89j7.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-DlWTLl-v.js";import"./use-mesh-ops-items-ByGZk8rU.js";import"./left-agents-DsOHgDCY.js";import"./left-default-BRCwoCJr.js";import"./left-lanes-DNtoRzoV.js";import"./lane-roster-store-NE15Oe6M.js";import"./left-plan-CtySjsXC.js";import"./MissionLeftAgentRow-CxlH3dON.js";import"./page-status-BymFEFai.js";import"./terminal-relay-B5Sma7fK.js";import"./session-table-sAVe44a4.js";import"./refresh-cw-D8PFyhUa.js";function st(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{st as resolveSidebarContext};
@@ -1 +0,0 @@
1
- import{j as e,r as i}from"./index-sUomXsrf.js";import{u as w}from"./Provider-tFc3jqZ4.js";import{a as C}from"./api-h5zurxmi.js";import{u as B}from"./sse-CVoGDiKW.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-CObCQvoy.js";import{b as S}from"./broker-display-pp33bLsu.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./index-BWHgHrtv.js";import"./EmptyState-CoL-QuUO.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-opTLuZU6.js";import"./DispatchAftermath-BrreQifA.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-CtTDrZJr.js";import"./ShikiPane-I_OTW5NO.js";import"./types-B0PlfpKc.js";/* empty css */import"./external-link-CnjcXf32.js";import"./arrow-down-DsD-dYj-.js";import"./bot-B_Uzf4_O.js";import"./refresh-cw-D8PFyhUa.js";import"./check-BbgHJX8u.js";import"./copy-CwCAivnc.js";import"./message-square-BD-4UUdc.js";import"./sparkles-up7pVlX-.js";import"./paperclip-DL9BXPp2.js";import"./plus-C9lTjsgd.js";import"./send-horizontal-DDwOgEs3.js";import"./radio-DedMyP8J.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};
@@ -1 +0,0 @@
1
- import{r as y,j as e}from"./index-sUomXsrf.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-Kn8pCtyJ.js";import{u as L}from"./mesh-view-store-D14ihwkF.js";import{u as H}from"./Provider-tFc3jqZ4.js";/* empty css */import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.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};
@@ -1 +0,0 @@
1
- import{r as d,j as e}from"./index-sUomXsrf.js";import{u as k}from"./Provider-tFc3jqZ4.js";import{c as y}from"./colors-BtO5_zlx.js";import{A as S}from"./AgentAvatar-CufDA4A-.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-D5CIR2OL.js";import"./router-Dja9_ygK.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.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};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./index-sUomXsrf.js";import{u as ct}from"./Provider-tFc3jqZ4.js";import{o as $e}from"./openContent-C6XO6kr5.js";import{a as B}from"./api-h5zurxmi.js";import{u as rt}from"./sse-CVoGDiKW.js";import{u as lt}from"./tail-events-CTipUIli.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-CZdAInEu.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-C4yb6_FA.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-Dja9_ygK.js";import{T as yt}from"./TmuxPeek-Dz1gJ2pU.js";import{S as It}from"./scroll-text-BIYf6g6N.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-X97KCSJk.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";import"./terminal-sessions-D5CIR2OL.js";/* empty css */import"./refresh-cw-D8PFyhUa.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 +0,0 @@
1
- import{r as p,j as s}from"./index-sUomXsrf.js";import{u as R,s as v,a as b}from"./mesh-view-store-D14ihwkF.js";import{u as E}from"./local-agents-C7fDHLVC.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-tFc3jqZ4.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.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 +0,0 @@
1
- import{j as t,r as h}from"./index-sUomXsrf.js";import{u as Z}from"./Provider-tFc3jqZ4.js";import{o as ee}from"./openAgent-Bjt57GdM.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-CVoGDiKW.js";import{r as E}from"./terminal-relay-B5Sma7fK.js";import{q as re}from"./terminal-takeover-X97KCSJk.js";import{r as fe,s as ve,a as be,b as je,c as ke}from"./session-catalog-XhGxCtP-.js";import{p as ae}from"./model-Co0zkMIc.js";import{u as ge}from"./ContextMenu-BlBQhpax.js";import{A as Ne}from"./AgentAvatar-CufDA4A-.js";import{A as we}from"./AgentLiveActions-CZdAInEu.js";import{T as H}from"./TmuxPeek-Dz1gJ2pU.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./index-BWHgHrtv.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.js";import"./eye-So8tNNK6.js";import"./terminal-DXQISjZn.js";/* empty css */import"./refresh-cw-D8PFyhUa.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};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./index-sUomXsrf.js";import{u as P}from"./Provider-tFc3jqZ4.js";import{a as g}from"./api-h5zurxmi.js";import{u as A}from"./sse-CVoGDiKW.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.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};
@@ -1 +0,0 @@
1
- import{j as t}from"./index-sUomXsrf.js";import{u as h}from"./Provider-tFc3jqZ4.js";import{o as j}from"./openAgent-Bjt57GdM.js";import{n as v,i as u,c as d}from"./colors-BtO5_zlx.js";import{A as b}from"./AgentAvatar-CufDA4A-.js";import{t as g}from"./time-Dhsh_2EG.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CVoGDiKW.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./chevron-right-CyUa1zXx.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BFai6ZfE.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.js";import"./openContent-C6XO6kr5.js";import"./SpriteAvatar-CQs-jC-v.js";import"./agent-identity-xQHedtLl.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};
@@ -1 +0,0 @@
1
- import{r as u,j as e}from"./index-sUomXsrf.js";import{u as j}from"./Provider-tFc3jqZ4.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-h5zurxmi.js";import{u as w}from"./sse-CVoGDiKW.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-BFai6ZfE.js";import{C as I}from"./chevron-right-CyUa1zXx.js";import{M as C}from"./message-square-BD-4UUdc.js";import"./router-Dja9_ygK.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-BlBQhpax.js";import"./DocumentFocusViewer-DU_9BHsD.js";import"./createLucideIcon-DlxlBfLC.js";import"./TextDocumentSurface-C-9EtYqt.js";/* empty css */import"./file-text-i3xTDUjJ.js";import"./x-0XjXwGqq.js";import"./code-xml-05TD3uOC.js";import"./arrow-left-WjQIN9J6.js";import"./scout-voice-BZ4KqADJ.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BhZZ5HEq.js";import"./MessageComposerSuggestions-zAUUcLOv.js";import"./NewChatComposer-B5FnPyzS.js";import"./runtime-picker-DOZpZOlt.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-lWOOKezu.js";import"./index-m6dFtY5f.js";import"./HarnessMark-Dm_qm1Ku.js";import"./conversation-model-C4yb6_FA.js";import"./NewChatOrigin--pHWUb4V.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./search-DCT_EvPr.js";import"./chunk-HRAB3GC3-CvwpNg-G.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};