@openscout/scout 0.2.106 → 0.2.108

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 (473) hide show
  1. package/README.md +79 -16
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-C1H-vL0L.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-CusDRiVO.js → AddProjectForm-4sVXmjfN.js} +1 -1
  6. package/dist/client/assets/{AdventureEvidence-CyegKk1V.js → AdventureEvidence-D5wq1vu8.js} +1 -1
  7. package/dist/client/assets/{AdventureReader-X-hbTOi0.js → AdventureReader-BICypcDY.js} +1 -1
  8. package/dist/client/assets/{AdventureScenery-LPXSVP67.js → AdventureScenery-CGEcG0zV.js} +1 -1
  9. package/dist/client/assets/AgentAdventures-5yBt-Zl3.js +1 -0
  10. package/dist/client/assets/{AgentAvatar-CrP1eXxk.js → AgentAvatar-Dn8TUv5W.js} +1 -1
  11. package/dist/client/assets/AgentConfigurationScreen-C0D9WNyL.js +1 -0
  12. package/dist/client/assets/AgentDefinitionsWorkspace-BzcBdC_s.js +1 -0
  13. package/dist/client/assets/{AgentDetailCard-DtHT3sCo.js → AgentDetailCard-CI-ufaEP.js} +1 -1
  14. package/dist/client/assets/AgentFloorView-D8tlGlgy.js +1 -0
  15. package/dist/client/assets/{AgentFloorWorld-CjoIa6jA.js → AgentFloorWorld-DqmnQexg.js} +1 -1
  16. package/dist/client/assets/AgentInfoScreen-BnRhfcFy.js +1 -0
  17. package/dist/client/assets/{AgentLaneCard-BaZ2g-f8.js → AgentLaneCard-pppHFROz.js} +1 -1
  18. package/dist/client/assets/{AgentLaneChrome-TF1SlJSc.js → AgentLaneChrome-RptImDFc.js} +1 -1
  19. package/dist/client/assets/{AgentLaneDetailSheet-EzEPsn3g.js → AgentLaneDetailSheet-BqbwGskh.js} +1 -1
  20. package/dist/client/assets/{AgentLaneSummaryResize-dpp7YvrX.js → AgentLaneSummaryResize-DaIgwyVh.js} +1 -1
  21. package/dist/client/assets/AgentLanesEmbedScreen-De6C4ZOw.js +1 -0
  22. package/dist/client/assets/{AgentLanesPreflight-Ry-aqDTr.js → AgentLanesPreflight-BQfj2twF.js} +1 -1
  23. package/dist/client/assets/{AgentLanesView-BJi9xXz6.js → AgentLanesView-CiISx7pu.js} +1 -1
  24. package/dist/client/assets/{AgentLiveActions-CfTupTEl.js → AgentLiveActions-CkRGkv13.js} +1 -1
  25. package/dist/client/assets/AgentMasterScreen-CijN_4tN.js +1 -0
  26. package/dist/client/assets/{AgentSessions-B1gOhDBf.js → AgentSessions-ghjQcSrh.js} +2 -2
  27. package/dist/client/assets/AgentsConsole-D8upjDpn.js +1 -0
  28. package/dist/client/assets/AgentsScreen-C17BFqjf.js +1 -0
  29. package/dist/client/assets/AgentsSubnav-_1GVC4hj.js +1 -0
  30. package/dist/client/assets/{AstronautSuit-Cchnc4Ug.js → AstronautSuit-Dzu4GOMR.js} +1 -1
  31. package/dist/client/assets/{AtopView-gkEp4y__.js → AtopView-DJK5b3lZ.js} +1 -1
  32. package/dist/client/assets/{BackToPicker-CUkjnoVk.js → BackToPicker-BPU7kbXq.js} +1 -1
  33. package/dist/client/assets/BriefingDetailScreen-CTvFw523.js +1 -0
  34. package/dist/client/assets/{BriefingsScreen-B1HlBMGZ.js → BriefingsScreen-DpVC3OUk.js} +1 -1
  35. package/dist/client/assets/{BrokerMetadataPanel-Dk242Yh_.js → BrokerMetadataPanel-glRVdwkU.js} +1 -1
  36. package/dist/client/assets/BrokerScreen-CqKsBwEx.js +8 -0
  37. package/dist/client/assets/{CastPicker-BXUtPAGC.js → CastPicker-Y29K5kKk.js} +1 -1
  38. package/dist/client/assets/ChannelComposer-D4EY9jVW.js +1 -0
  39. package/dist/client/assets/{ChannelSidebar-e9DOPulb.js → ChannelSidebar-CVmykV4d.js} +1 -1
  40. package/dist/client/assets/{CharacterFamilyPreview-DMfw7UM_.js → CharacterFamilyPreview-Bj8oMD-5.js} +1 -1
  41. package/dist/client/assets/{ChatAvatar-C3a_o5Hj.js → ChatAvatar-BsAOShUr.js} +1 -1
  42. package/dist/client/assets/{ChatBits-CsvxbToF.js → ChatBits-Cq54CmyB.js} +1 -1
  43. package/dist/client/assets/{ChatCollapsedStrip-FEmQ_G9J.js → ChatCollapsedStrip-B0DdrOo2.js} +1 -1
  44. package/dist/client/assets/{ChatRichInput-DhtwFxQE.js → ChatRichInput-DYJRhGTP.js} +1 -1
  45. package/dist/client/assets/ChatRightPanel-D94Lw7ud.js +1 -0
  46. package/dist/client/assets/ChatSpaceSurface-Cp532VmZ.js +1 -0
  47. package/dist/client/assets/{ChatSpaceTheme-CUH8bTZc.js → ChatSpaceTheme-DPzYpw-v.js} +1 -1
  48. package/dist/client/assets/{CodeDiffPane-DuQRwpgK.js → CodeDiffPane-DCgMUi39.js} +1 -1
  49. package/dist/client/assets/{CodeProjectPicker-ZQ6gSBpg.js → CodeProjectPicker-Dq787L77.js} +1 -1
  50. package/dist/client/assets/{CodeScreen-BXyKeL5T.js → CodeScreen-BN4TkiR0.js} +1 -1
  51. package/dist/client/assets/{CommsCanvas-THp0r_U8.js → CommsCanvas-Dh056d91.js} +1 -1
  52. package/dist/client/assets/{CommsDeck-BVmSMV2V.js → CommsDeck-CRXKIerH.js} +1 -1
  53. package/dist/client/assets/{CommsFlowGraph-DxoOaLF_.js → CommsFlowGraph-Cc48o9u_.js} +1 -1
  54. package/dist/client/assets/{CommsFlowMap-Vi8ziCPg.js → CommsFlowMap-Ckasql5e.js} +1 -1
  55. package/dist/client/assets/{CommsSelection-BUoRbu9o.js → CommsSelection-CuphnUny.js} +1 -1
  56. package/dist/client/assets/{ComposerAttachments-DW0AIb8k.js → ComposerAttachments-9uYp_Lh5.js} +1 -1
  57. package/dist/client/assets/ConversationComposer-hYtLurqy.js +1 -0
  58. package/dist/client/assets/ConversationFeedRows-Bu0ZJcy8.js +1 -0
  59. package/dist/client/assets/ConversationHeader-L9738YVP.js +1 -0
  60. package/dist/client/assets/{ConversationPanels-D9oC0xG5.js → ConversationPanels-D6KuqvGu.js} +2 -2
  61. package/dist/client/assets/ConversationScreen-Pzxy9x4m.js +2 -0
  62. package/dist/client/assets/ConversationStatus-BEefIbXq.js +1 -0
  63. package/dist/client/assets/{CrewAvatar-kTznzqcO.js → CrewAvatar-a_C_F9r_.js} +1 -1
  64. package/dist/client/assets/{CrewSprite-Dhryjx2c.js → CrewSprite-CguHb2Ny.js} +1 -1
  65. package/dist/client/assets/{CrewStage-vdO0qm3D.js → CrewStage-IPpS3Oja.js} +1 -1
  66. package/dist/client/assets/{CrewWorkspaces-DCBzAAS4.js → CrewWorkspaces-BTPtcEcx.js} +1 -1
  67. package/dist/client/assets/{DataTable-aH-jCyDq.js → DataTable-DnL_8SAu.js} +1 -1
  68. package/dist/client/assets/{DispatchAftermath-66uQAorV.js → DispatchAftermath-CoAYaL3B.js} +1 -1
  69. package/dist/client/assets/{DocumentFocusViewer-DJr0v0D_.js → DocumentFocusViewer-mxzPxQQW.js} +1 -1
  70. package/dist/client/assets/{EmbeddableSurfacesLab-BBa70EhJ.js → EmbeddableSurfacesLab-BAZ_eRMc.js} +1 -1
  71. package/dist/client/assets/{EmptyState-CZlrHXy-.js → EmptyState-DLiLgtPK.js} +1 -1
  72. package/dist/client/assets/{FileViewerPane-BAO6mtjD.js → FileViewerPane-Dc7AoVod.js} +1 -1
  73. package/dist/client/assets/{FleetRollCallHud-C5q2567n.js → FleetRollCallHud-VhpxVcGO.js} +1 -1
  74. package/dist/client/assets/FlightObserveScreen-C1kASP3J.js +1 -0
  75. package/dist/client/assets/{FloorContextSheet-2_NVPQor.js → FloorContextSheet-BfrXNoBn.js} +1 -1
  76. package/dist/client/assets/{FloorExchangePanel-BU1pPu8K.js → FloorExchangePanel-DsG1cRzu.js} +1 -1
  77. package/dist/client/assets/{FloorMessagePasses-cLW2UGNP.js → FloorMessagePasses-Cm3LbkHd.js} +1 -1
  78. package/dist/client/assets/{FloorReplay-VFzA6Kxc.js → FloorReplay-Bg7kA-tR.js} +1 -1
  79. package/dist/client/assets/FloorResourcesSheet-Ba9HubO2.js +1 -0
  80. package/dist/client/assets/{FloorSavedWork-BeHDejWz.js → FloorSavedWork-BDOvV3mA.js} +1 -1
  81. package/dist/client/assets/{FloorTacticalHUD-CO-iiFpb.js → FloorTacticalHUD-4d-Hr-YL.js} +1 -1
  82. package/dist/client/assets/{FollowScreen-CFfkIbc6.js → FollowScreen-DFVSlsQV.js} +1 -1
  83. package/dist/client/assets/{HarnessMark-C4naWc16.js → HarnessMark-CP-PWk2W.js} +1 -1
  84. package/dist/client/assets/HarnessesScreen-j-91IoOo.js +1 -0
  85. package/dist/client/assets/{HerdrSession-_t7yM8vX.js → HerdrSession-H2mmxeTK.js} +1 -1
  86. package/dist/client/assets/{HomeHero-DouPyNmz.js → HomeHero-g4H3Ctxg.js} +1 -1
  87. package/dist/client/assets/{HostAdvisorView-CnM1i8hW.js → HostAdvisorView-Cyt3b5Fq.js} +1 -1
  88. package/dist/client/assets/{InviteLandingScreen-CEjG2E34.js → InviteLandingScreen-C3DtAGD4.js} +1 -1
  89. package/dist/client/assets/{InviteSheet-CwxZtWCl.js → InviteSheet-BiGMNpsE.js} +1 -1
  90. package/dist/client/assets/{JumpPalette-O1aJE9gR.js → JumpPalette-goXAVByA.js} +1 -1
  91. package/dist/client/assets/{KnowledgeSearchInspector-32n9baT-.js → KnowledgeSearchInspector-BbOQIqdF.js} +1 -1
  92. package/dist/client/assets/KnowledgeSearchScreen-DC8yX-kA.js +1 -0
  93. package/dist/client/assets/{LaneToolHoverCard-CJa110yk.js → LaneToolHoverCard-B8Am_1DC.js} +1 -1
  94. package/dist/client/assets/LaneTraceDetailSheet-CngYIxdI.js +1 -0
  95. package/dist/client/assets/{LaneTraceEventFocus-TbrNHRj_.js → LaneTraceEventFocus-BRR_jcl9.js} +1 -1
  96. package/dist/client/assets/{MeshCanvas-DWZHYh1A.js → MeshCanvas-DzkuY_XI.js} +1 -1
  97. package/dist/client/assets/{MeshCanvasMinimap-iswYFpIb.js → MeshCanvasMinimap-BrscEPAH.js} +1 -1
  98. package/dist/client/assets/MeshScreen-CAtRB8K6.js +1 -0
  99. package/dist/client/assets/{MeshTopologyView-BVvtqI8q.js → MeshTopologyView-B1I2dAhu.js} +2 -2
  100. package/dist/client/assets/{MessageEmbeds-ksPazAKH.js → MessageEmbeds-B-FbWI7a.js} +1 -1
  101. package/dist/client/assets/MessagesScreen-hq7D3Lfi.js +1 -0
  102. package/dist/client/assets/{MissionContextRail-D62-Wis8.js → MissionContextRail-ClR8amG1.js} +1 -1
  103. package/dist/client/assets/MissionControlView-D6gbMrgx.js +1 -0
  104. package/dist/client/assets/{MissionFocusOverlay-C1zys3Jv.js → MissionFocusOverlay-CzeNgI9Q.js} +1 -1
  105. package/dist/client/assets/MissionLeftAgentRow-CB3cgeYr.js +1 -0
  106. package/dist/client/assets/{MissionLogPane-B19lYSY9.js → MissionLogPane-2PMEoG44.js} +1 -1
  107. package/dist/client/assets/NativeAreaScreen-BnlrAWT8.js +1 -0
  108. package/dist/client/assets/NativeAreaScreen-DSR5Tf6F.js +1 -0
  109. package/dist/client/assets/NativeAreaScreen-fGsxyeC3.js +1 -0
  110. package/dist/client/assets/{NewAgentModal-Bh-L-emz.js → NewAgentModal-4b_3aoZE.js} +1 -1
  111. package/dist/client/assets/{NewChatComposer-C97-iTMK.js → NewChatComposer-D-VB5vdt.js} +1 -1
  112. package/dist/client/assets/{NewChatOrigin-DFbF_XvR.js → NewChatOrigin-BYsEu9dZ.js} +1 -1
  113. package/dist/client/assets/{NodeDetailPanel-CElOEpCh.js → NodeDetailPanel-9NaEnZAQ.js} +1 -1
  114. package/dist/client/assets/{NodeMenu-B-jjHf1c.js → NodeMenu-BgJMmffZ.js} +1 -1
  115. package/dist/client/assets/{ObserveEmbedScreen-B7Qt69Ms.js → ObserveEmbedScreen-W7Q5HbXP.js} +2 -2
  116. package/dist/client/assets/{ObserveTextFlow-PFnG_10h.js → ObserveTextFlow-C0oQEerY.js} +2 -2
  117. package/dist/client/assets/{ObservedTopologyPanel-CUTIoLZJ.js → ObservedTopologyPanel-Ci7emnnj.js} +1 -1
  118. package/dist/client/assets/OpenScoutAppShell-Di9qdmI0.js +22 -0
  119. package/dist/client/assets/OpsAgentsView-DVotOMg2.js +1 -0
  120. package/dist/client/assets/OpsScreen-C955zgr3.js +1 -0
  121. package/dist/client/assets/OpsSubnav-CjMVj7Sk.js +1 -0
  122. package/dist/client/assets/ProjectAgentProfile-B1VqGSmu.js +1 -0
  123. package/dist/client/assets/{ProjectAgentProfileBar-DHuMKJj-.js → ProjectAgentProfileBar-DhVU7zew.js} +1 -1
  124. package/dist/client/assets/ProjectAgentProfileHero-CJk-Dx4t.js +1 -0
  125. package/dist/client/assets/ProjectsInbox-B7kap8nR.js +2 -0
  126. package/dist/client/assets/ProjectsRail-BhSaqbv0.js +1 -0
  127. package/dist/client/assets/ProjectsScreen-CSb7nwjb.js +1 -0
  128. package/dist/client/assets/ProjectsThreadAside-pEJutIO8.js +1 -0
  129. package/dist/client/assets/{Provider-C35yu29I.js → Provider-BEXAZWd9.js} +2 -2
  130. package/dist/client/assets/{RailRow-BjmWK420.js → RailRow-Ddz90weI.js} +1 -1
  131. package/dist/client/assets/RawSessionsTable-TdKlJIPl.js +1 -0
  132. package/dist/client/assets/RealtimeVoiceScreen-BU5KmlNo.js +8 -0
  133. package/dist/client/assets/{RenderedWorkerSprite-Dhlyg89J.js → RenderedWorkerSprite-BNhFXMIo.js} +1 -1
  134. package/dist/client/assets/{ReplayClock-348f17bW.js → ReplayClock-wLpb4VqN.js} +1 -1
  135. package/dist/client/assets/{ReplayLog-CBnAM3ui.js → ReplayLog-IUyQdklN.js} +1 -1
  136. package/dist/client/assets/{ReplayOutpost-DyRPfNFx.js → ReplayOutpost-C4djhjZJ.js} +1 -1
  137. package/dist/client/assets/{RepoDiffEmbedScreen-BWxvRDrS.js → RepoDiffEmbedScreen-BmQX_8E-.js} +1 -1
  138. package/dist/client/assets/{RepoDiffPageScreen-DN94irmY.js → RepoDiffPageScreen-B9oAjrC6.js} +1 -1
  139. package/dist/client/assets/{RepoDiffViewer-_4JVXBIW.js → RepoDiffViewer-Ch_lIMt-.js} +1 -1
  140. package/dist/client/assets/RepoDiffViewerLazy-DL6A2o_z.js +2 -0
  141. package/dist/client/assets/{ReposScreen-uMCpt0e9.js → ReposScreen-D-E7fSAB.js} +2 -2
  142. package/dist/client/assets/{RiggedWorkerCharacter-q6QRc7_o.js → RiggedWorkerCharacter-CF6fhzGd.js} +1 -1
  143. package/dist/client/assets/{SageModelStudio-CNDhZhgD.js → SageModelStudio-CSet_ITs.js} +1 -1
  144. package/dist/client/assets/{ScoutDeckSurface-CUaU4R6T.js → ScoutDeckSurface-BJ-fl8AX.js} +1 -1
  145. package/dist/client/assets/{ScoutSurface-3_25USO_.js → ScoutSurface-BvFRdce6.js} +1 -1
  146. package/dist/client/assets/{ScoutbotFxLab-CRqhYe0a.js → ScoutbotFxLab-CfPzycZ7.js} +1 -1
  147. package/dist/client/assets/{SecondaryNav-D7dbV2qo.js → SecondaryNav-1FjBDWuY.js} +1 -1
  148. package/dist/client/assets/{SessionContextStrip-CXfs9hUD.js → SessionContextStrip-BoiIxXvS.js} +1 -1
  149. package/dist/client/assets/{SessionEmbedScreen-D0zFmou-.js → SessionEmbedScreen-BizGNGOz.js} +1 -1
  150. package/dist/client/assets/{SessionHopMenu-E6VJZrE0.js → SessionHopMenu-DX6PJPNk.js} +1 -1
  151. package/dist/client/assets/{SessionObserve-DXxBvejJ.js → SessionObserve-Dw3bVQYF.js} +1 -1
  152. package/dist/client/assets/{SessionObserveEvidence-Cuj_KHxR.js → SessionObserveEvidence-uD1OX-R5.js} +1 -1
  153. package/dist/client/assets/SessionRefScreen-Ch9H-qVk.js +1 -0
  154. package/dist/client/assets/SessionsScreen-DUeP23Xy.js +1 -0
  155. package/dist/client/assets/{SettingsDrawer-juCpnbH6.js → SettingsDrawer-BVrP6J52.js} +3 -3
  156. package/dist/client/assets/SettingsScreen-BcJ05LE5.js +1 -0
  157. package/dist/client/assets/{SharedFloorCharacter-DNEiaOUh.js → SharedFloorCharacter-dnamlt1p.js} +1 -1
  158. package/dist/client/assets/SharedWorkFloor-H-e2TVj9.js +2 -0
  159. package/dist/client/assets/{ShikiPane-CRtTYkMj.js → ShikiPane-CDiIT_qn.js} +1 -1
  160. package/dist/client/assets/{SlidePanel-_CHAQdOa.js → SlidePanel-D5oPQocF.js} +1 -1
  161. package/dist/client/assets/{SpaceSwitcher-BLgSCf_T.js → SpaceSwitcher-WccPJ0fS.js} +1 -1
  162. package/dist/client/assets/{SpriteAvatar-CpZWf54-.js → SpriteAvatar-D53GaaK3.js} +1 -1
  163. package/dist/client/assets/{SproutActionSprite-BSiTS4en.js → SproutActionSprite-BrFCmgWS.js} +1 -1
  164. package/dist/client/assets/{StatusPill-2gCP6H7A.js → StatusPill-jT--OXbn.js} +1 -1
  165. package/dist/client/assets/{TailView-CYSijNTy.js → TailView-B44cSuyl.js} +2 -2
  166. package/dist/client/assets/Terminal-D0PanmIk.js +4 -0
  167. package/dist/client/assets/TerminalEmbedScreen-Eddi4sts.js +1 -0
  168. package/dist/client/assets/{TerminalHeaderMount-Cq4OD_xN.js → TerminalHeaderMount-CYYcKxQ-.js} +1 -1
  169. package/dist/client/assets/{TextDocumentSurface-D52m7Vd8.js → TextDocumentSurface-DBslUq9k.js} +1 -1
  170. package/dist/client/assets/{TmuxPeek-CXFeweMg.js → TmuxPeek-Ctw5yYO5.js} +1 -1
  171. package/dist/client/assets/{VoiceControlWell-DF3bjcYA.js → VoiceControlWell-BkjuWjYu.js} +1 -1
  172. package/dist/client/assets/{VoicePathDiagram-CmpHWfO-.js → VoicePathDiagram-u0i6ntbx.js} +1 -1
  173. package/dist/client/assets/{VoicePermissionsPanel-Ok2nfxHw.js → VoicePermissionsPanel-9Nuw-xCr.js} +1 -1
  174. package/dist/client/assets/{VoiceTurnDetails-wAByRaNB.js → VoiceTurnDetails-kS7lfbmt.js} +1 -1
  175. package/dist/client/assets/{VoiceTurnStage-edoJalLV.js → VoiceTurnStage-DLY6aYDg.js} +1 -1
  176. package/dist/client/assets/{VoiceTurnView-D-8g5E4r.js → VoiceTurnView-CF4tIldB.js} +1 -1
  177. package/dist/client/assets/{WorkDetailScreen-zQkNVy2F.js → WorkDetailScreen-BrrkENYq.js} +2 -2
  178. package/dist/client/assets/{WorkFilesViewer-vNt01sDd.js → WorkFilesViewer-B63sKRYZ.js} +1 -1
  179. package/dist/client/assets/{WorkRunView-BDkR7Edq.js → WorkRunView-DLIzAsc3.js} +1 -1
  180. package/dist/client/assets/WorldActorTalk-CHhFTiQV.js +1 -0
  181. package/dist/client/assets/{WorldCharacter-CIIlutQq.js → WorldCharacter-CJGx2DVy.js} +1 -1
  182. package/dist/client/assets/{WorldMinimap-B6HNgcDe.js → WorldMinimap-DL12pBw3.js} +1 -1
  183. package/dist/client/assets/{WorldSky-Jm2Z6dfW.js → WorldSky-BlPNvGLo.js} +1 -1
  184. package/dist/client/assets/{activity-CIlFrfPJ.js → activity-CXkZ620t.js} +1 -1
  185. package/dist/client/assets/{addon-fit-dFpj9Kfq.js → addon-fit-G3qi01sy.js} +1 -1
  186. package/dist/client/assets/{addon-webgl-BFCGRtGh.js → addon-webgl-Bo7kSgOB.js} +1 -1
  187. package/dist/client/assets/{agent-essentials-BGGvT5G6.js → agent-essentials-DnfdGmIX.js} +1 -1
  188. package/dist/client/assets/{agent-specialization-DDc7mLCW.js → agent-specialization-DYX_DSlY.js} +1 -1
  189. package/dist/client/assets/{arc.es-C1SQHJ3k.js → arc.es-CLA3XI14.js} +1 -1
  190. package/dist/client/assets/arrow-down--OUDFWIq.js +1 -0
  191. package/dist/client/assets/{arrow-left-MVUKauwQ.js → arrow-left-DNjQHf4C.js} +1 -1
  192. package/dist/client/assets/{arrow-right-Bp-FpE5V.js → arrow-right-A_yyXwoH.js} +1 -1
  193. package/dist/client/assets/arrow-up-DFy-9ghF.js +1 -0
  194. package/dist/client/assets/{arrow-up-right-BPedAgxO.js → arrow-up-right-DUW1A1Hb.js} +1 -1
  195. package/dist/client/assets/{book-open-CV98WMSp.js → book-open-B_idZgTF.js} +1 -1
  196. package/dist/client/assets/{bot-B4zLQ4IN.js → bot-BNv_ZJzi.js} +1 -1
  197. package/dist/client/assets/{chat-api-DSJMBYoT.js → chat-api-BHGHALv2.js} +1 -1
  198. package/dist/client/assets/{chat-message-markup-91DIry6R.js → chat-message-markup-esR-YLtN.js} +1 -1
  199. package/dist/client/assets/{chat-transport-DNS5CB2I.js → chat-transport-CtxnPLMU.js} +1 -1
  200. package/dist/client/assets/{check-lrJ3a73a.js → check-BM6QtbB7.js} +1 -1
  201. package/dist/client/assets/{chevron-down-l1mrh5S9.js → chevron-down-DEDSNJNY.js} +1 -1
  202. package/dist/client/assets/{chevron-right-DrfqcerI.js → chevron-right-B02kAw12.js} +1 -1
  203. package/dist/client/assets/{chevron-up-CETZJzjV.js → chevron-up-CzveykKG.js} +1 -1
  204. package/dist/client/assets/{chunk-HRAB3GC3-DbVLgbWX.js → chunk-HRAB3GC3-DVhUsgOw.js} +1 -1
  205. package/dist/client/assets/chunk-JTPDIGGW-hdpdYwXb.js +46 -0
  206. package/dist/client/assets/chunk-T65CQEWV-G_Z0lqtn.js +1 -0
  207. package/dist/client/assets/chunk-YOZR3KYS-apgUnfXh.js +2 -0
  208. package/dist/client/assets/{clock-BV1aqPkK.js → clock-8tb9t2t9.js} +1 -1
  209. package/dist/client/assets/{code-xml-BhcNbLWU.js → code-xml-E9gBuiVs.js} +1 -1
  210. package/dist/client/assets/{coffee-D7EAOdCk.js → coffee-D0YEK6-l.js} +1 -1
  211. package/dist/client/assets/{compass-63TUaz5_.js → compass-EmGkpxIe.js} +1 -1
  212. package/dist/client/assets/content-B-rn1rka.js +1 -0
  213. package/dist/client/assets/content-BHV-ZU8_.js +1 -0
  214. package/dist/client/assets/content-BI9yWpWC.js +1 -0
  215. package/dist/client/assets/content-BLVuukzF.js +1 -0
  216. package/dist/client/assets/content-BP3cQkAj.js +1 -0
  217. package/dist/client/assets/content-BRY-UTkP.js +1 -0
  218. package/dist/client/assets/content-BXTmYOPB.js +1 -0
  219. package/dist/client/assets/content-C3DZ77HZ.js +1 -0
  220. package/dist/client/assets/content-CPchclaV.js +1 -0
  221. package/dist/client/assets/{content-nGlEZhUI.js → content-CVqPTQnr.js} +1 -1
  222. package/dist/client/assets/content-CjAERU44.js +1 -0
  223. package/dist/client/assets/content-CoYG0nWL.js +1 -0
  224. package/dist/client/assets/content-DK1KeRPw.js +1 -0
  225. package/dist/client/assets/content-iWBSSXa6.js +1 -0
  226. package/dist/client/assets/content-ryJeaQk8.js +1 -0
  227. package/dist/client/assets/content-srNyLgDt.js +1 -0
  228. package/dist/client/assets/{conversation-icons-Tqba2d56.js → conversation-icons-Dxn9N1Kx.js} +1 -1
  229. package/dist/client/assets/conversation-motion-features-BfmPlONx.js +1 -0
  230. package/dist/client/assets/{copy-xKeM5ZtU.js → copy-C1XrY27_.js} +1 -1
  231. package/dist/client/assets/{cpu-BOTa_WLr.js → cpu-DVZ_LhPn.js} +1 -1
  232. package/dist/client/assets/{createLucideIcon-zZ8Hx7er.js → createLucideIcon-CKbjXlwv.js} +1 -1
  233. package/dist/client/assets/direct-voice-DAOUU-kc.js +10 -0
  234. package/dist/client/assets/discover-BNa3BPr_.js +2 -0
  235. package/dist/client/assets/embed-entry-gK3z8Yxi.js +2 -0
  236. package/dist/client/assets/{external-link-CUObqmgX.js → external-link-Df1R34rX.js} +1 -1
  237. package/dist/client/assets/{eye-LrO-cXQt.js → eye-CD-_aphP.js} +1 -1
  238. package/dist/client/assets/{file-code-corner-CsU7jJpu.js → file-code-corner-DtMWHBN3.js} +1 -1
  239. package/dist/client/assets/{file-text-CnISiiw6.js → file-text-BOJQiS8p.js} +1 -1
  240. package/dist/client/assets/{flag-C4wl8z2-.js → flag-CeKO8NoD.js} +1 -1
  241. package/dist/client/assets/{folder-D5prSkzz.js → folder-C2emmTHq.js} +1 -1
  242. package/dist/client/assets/{gauge-D9_5iJEm.js → gauge-BR5CrhRM.js} +1 -1
  243. package/dist/client/assets/{gestures-QZub3Ot9.js → gestures-Dh8szhcU.js} +1 -1
  244. package/dist/client/assets/{git-branch-B0_fPLO7.js → git-branch-C45vy8qT.js} +1 -1
  245. package/dist/client/assets/{go-shortcuts-DicR7sUf.js → go-shortcuts--25Qg0lD.js} +1 -1
  246. package/dist/client/assets/{home-moving-signal-rpMhsOJB.js → home-moving-signal-BiiyEKEb.js} +1 -1
  247. package/dist/client/assets/home-now-card-DaCpqUZe.js +1 -0
  248. package/dist/client/assets/{home-now-card-nano-B5Dv3-pb.js → home-now-card-nano-wbxgyY4q.js} +1 -1
  249. package/dist/client/assets/hooks-JNwYSH18.js +2 -0
  250. package/dist/client/assets/{index-EsrkGBcv.js → index-BFbLvCJn.js} +2 -2
  251. package/dist/client/assets/index-BRNHY2fp.css +1 -0
  252. package/dist/client/assets/index-BrXaMEdK.js +1 -0
  253. package/dist/client/assets/index-CXzJ_hGx.js +1 -0
  254. package/dist/client/assets/{index-CHD0qcfL.js → index-V8FYEUpD.js} +1 -1
  255. package/dist/client/assets/index-mYtyYeAe.js +1 -0
  256. package/dist/client/assets/{inspector-panel-BkgUDn6G.js → inspector-panel-BgU5xUln.js} +2 -2
  257. package/dist/client/assets/{keyboard-nav-DDHegDbx.js → keyboard-nav-CEe-ApvZ.js} +1 -1
  258. package/dist/client/assets/{lane-roster-store-D-RSWjb-.js → lane-roster-store-MraynTHP.js} +1 -1
  259. package/dist/client/assets/{layers-C8PDiMul.js → layers-ClmyjwpB.js} +1 -1
  260. package/dist/client/assets/{layout-grid-Cor2frzj.js → layout-grid-DG2-JaPn.js} +1 -1
  261. package/dist/client/assets/left-B66YR0c5.js +1 -0
  262. package/dist/client/assets/left-BP5P8lzw.js +2 -0
  263. package/dist/client/assets/left-BbCKRDbW.js +1 -0
  264. package/dist/client/assets/left-CaY5FK2k.js +1 -0
  265. package/dist/client/assets/left-CemrfeSs.js +1 -0
  266. package/dist/client/assets/left-DcYA26sH.js +1 -0
  267. package/dist/client/assets/left-DdMMaqFT.js +2 -0
  268. package/dist/client/assets/left-advisor-DBml48M5.js +1 -0
  269. package/dist/client/assets/left-agents-DowYF2ag.js +1 -0
  270. package/dist/client/assets/left-default-Bifaeg_V.js +1 -0
  271. package/dist/client/assets/left-lanes-BGhjdqpD.js +1 -0
  272. package/dist/client/assets/left-mission-CvXPUovR.js +1 -0
  273. package/dist/client/assets/library-CnC8uzJt.js +1 -0
  274. package/dist/client/assets/{loader-circle-OvccU82H.js → loader-circle-CCG7hG7z.js} +1 -1
  275. package/dist/client/assets/{local-agents-BqnoxJrq.js → local-agents-BMcFlY_x.js} +1 -1
  276. package/dist/client/assets/{log-in-7SnYqW5w.js → log-in-VL9mdgeE.js} +1 -1
  277. package/dist/client/assets/{machine-children-DxcqCLmd.js → machine-children-DvCiQxwA.js} +1 -1
  278. package/dist/client/assets/{mentions-ByUvhS-v.js → mentions-s5oW4aQU.js} +1 -1
  279. package/dist/client/assets/{mesh-ops-CiZ8xSAx.js → mesh-ops-9SzD3sPw.js} +1 -1
  280. package/dist/client/assets/{mesh-view-store-DZvJC4KU.js → mesh-view-store-CVqzYz4K.js} +1 -1
  281. package/dist/client/assets/{message-circle-CxRVKNE-.js → message-circle-BB3rFCVD.js} +1 -1
  282. package/dist/client/assets/{message-markup-Zwo3t4cI.js → message-markup-D1C7GzHo.js} +1 -1
  283. package/dist/client/assets/{message-square-BxesYglW.js → message-square-BwqBIfv5.js} +1 -1
  284. package/dist/client/assets/{mission-control-store-elEEsIvb.js → mission-control-store-e8F85JhP.js} +1 -1
  285. package/dist/client/assets/{monitor-DTTYEb73.js → monitor-M0VSmHQ-.js} +1 -1
  286. package/dist/client/assets/{nav-destinations-uorRqFxf.js → nav-destinations-B3R5zxFX.js} +1 -1
  287. package/dist/client/assets/{observe-BJqERJVj.js → observe-M3rLosT5.js} +1 -1
  288. package/dist/client/assets/{page-status-BswZLqvA.js → page-status-BIuh3C5p.js} +1 -1
  289. package/dist/client/assets/{panel-right-Bv7sP_fc.js → panel-right-WKLdPm0F.js} +1 -1
  290. package/dist/client/assets/{paperclip-BjcuP_Hx.js → paperclip-DLf_ABSv.js} +1 -1
  291. package/dist/client/assets/{pause-C2XTlkjs.js → pause-7mmEEvVx.js} +1 -1
  292. package/dist/client/assets/{persistent-state-KRk_yb0q.js → persistent-state-3mbBFRDO.js} +1 -1
  293. package/dist/client/assets/{pin-C2mFOV1l.js → pin-q_0gAA6i.js} +1 -1
  294. package/dist/client/assets/{play-FT6K3It1.js → play-N5-hnPCV.js} +1 -1
  295. package/dist/client/assets/{plus-DFDDeGKu.js → plus-B0hdY0fF.js} +1 -1
  296. package/dist/client/assets/profile-B7ZGToTo.js +1 -0
  297. package/dist/client/assets/{projects-inbox-C0FUCv_p.js → projects-inbox-CMFBjQt0.js} +1 -1
  298. package/dist/client/assets/{proxy-AJsmwA6h.js → proxy-k0ILOVkK.js} +1 -1
  299. package/dist/client/assets/{radio-DRoOZsws.js → radio-Bjqmv997.js} +1 -1
  300. package/dist/client/assets/{refresh-cw-BmVr7sCD.js → refresh-cw-BcqctLqo.js} +1 -1
  301. package/dist/client/assets/resolve-panes-wzGu9d8o.js +1 -0
  302. package/dist/client/assets/resolve-sidebar-context-C8SOo5oZ.js +1 -0
  303. package/dist/client/assets/right-9rMRZN_r.js +1 -0
  304. package/dist/client/assets/right-BHZq648O.js +1 -0
  305. package/dist/client/assets/{right-DWPVB-nK.js → right-BNJzCaH9.js} +1 -1
  306. package/dist/client/assets/right-CAd7lTvY.js +1 -0
  307. package/dist/client/assets/right-Cc57bCTW.js +1 -0
  308. package/dist/client/assets/right-DY49Prjj.js +1 -0
  309. package/dist/client/assets/right-DfU47xKY.js +1 -0
  310. package/dist/client/assets/right-Dr7vxdZl.js +1 -0
  311. package/dist/client/assets/right-DsE4aR3A.js +1 -0
  312. package/dist/client/assets/right-zlkRjnkv.js +1 -0
  313. package/dist/client/assets/{rocket-CGl4RTV7.js → rocket-BahsdUe6.js} +1 -1
  314. package/dist/client/assets/router-CJIx83Ia.js +1 -0
  315. package/dist/client/assets/runtime-picker-IRcTkMZ5.js +1 -0
  316. package/dist/client/assets/{scope-views-RUWwCVAr.js → scope-views-KDtZoLUC.js} +1 -1
  317. package/dist/client/assets/{scout-voice-CZx60X6E.js → scout-voice-Cdh6pCsb.js} +1 -1
  318. package/dist/client/assets/{scoutbot-markdown-BKEBSbG0.js → scoutbot-markdown-7PRQHaAc.js} +1 -1
  319. package/dist/client/assets/{scroll-text-DNjxhyO2.js → scroll-text-CA0QxBHu.js} +1 -1
  320. package/dist/client/assets/{search-DT42oyRW.js → search-Bv2IONmc.js} +1 -1
  321. package/dist/client/assets/secondaryNavConfig-Bmb-oRvD.js +1 -0
  322. package/dist/client/assets/{selection-bridge-x3wFUjxj.js → selection-bridge-CthAuPRw.js} +1 -1
  323. package/dist/client/assets/{send-horizontal-CH0-fbZE.js → send-horizontal-_Tf_It04.js} +1 -1
  324. package/dist/client/assets/{send-to-agent-session-DoKCDBJ4.js → send-to-agent-session-CWDHHgFB.js} +1 -1
  325. package/dist/client/assets/{server-QfsgMLk1.js → server-U_l8A83n.js} +1 -1
  326. package/dist/client/assets/{session-catalog-CvSdPHPe.js → session-catalog-Dx4tl3sx.js} +1 -1
  327. package/dist/client/assets/{session-recap-queue-41l2XVkI.js → session-recap-queue-GeicPLsQ.js} +1 -1
  328. package/dist/client/assets/{session-table-L-pns6Zl.js → session-table-BI62J4NP.js} +1 -1
  329. package/dist/client/assets/{sessions-view-Dc-QAa7O.js → sessions-view-lGMwwZY7.js} +1 -1
  330. package/dist/client/assets/{settings-BVh7kldq.js → settings-bo9X410k.js} +1 -1
  331. package/dist/client/assets/{sliders-horizontal-782VC_yy.js → sliders-horizontal-CPSx6wd2.js} +1 -1
  332. package/dist/client/assets/{sparkles-BjHq_DNK.js → sparkles-Br-bA2aZ.js} +1 -1
  333. package/dist/client/assets/{sse-BCPRocpq.js → sse-BVxO0zNp.js} +1 -1
  334. package/dist/client/assets/{tail-events-d0yAYxR0.js → tail-events-C6NWFB1N.js} +1 -1
  335. package/dist/client/assets/{terminal-hQKQygcf.js → terminal-DMBAZjPP.js} +1 -1
  336. package/dist/client/assets/{terminal-relay-Bxs1hp-j.js → terminal-relay-CpGHpDa8.js} +1 -1
  337. package/dist/client/assets/{terminal-takeover-Ay5C2c-M.js → terminal-takeover-CXwdoZ5j.js} +1 -1
  338. package/dist/client/assets/{triangle-alert-CHoRGdVO.js → triangle-alert-BZikHKuT.js} +1 -1
  339. package/dist/client/assets/use-beside-DopIbJwf.js +1 -0
  340. package/dist/client/assets/{use-conversation-list-CY4JciOV.js → use-conversation-list-CGtcpdPd.js} +1 -1
  341. package/dist/client/assets/{use-fleet-active-asks-CymmXWH4.js → use-fleet-active-asks-DAHOPYPV.js} +1 -1
  342. package/dist/client/assets/{use-mesh-node-state-BvaqtODo.js → use-mesh-node-state-BlWIPTc4.js} +1 -1
  343. package/dist/client/assets/{use-mesh-ops-items-BSYaqH_0.js → use-mesh-ops-items-pKWBro7o.js} +1 -1
  344. package/dist/client/assets/{use-reduced-motion-3gMYZNIp.js → use-reduced-motion-DkdIQBwh.js} +1 -1
  345. package/dist/client/assets/use-scout-dev-flags-CduUFb7l.js +1 -0
  346. package/dist/client/assets/{useAgentHoverCard-BANmpjMh.js → useAgentHoverCard-DNlXPYQf.js} +1 -1
  347. package/dist/client/assets/useContentSecondaryNav-LJGNYG3U.js +1 -0
  348. package/dist/client/assets/{useEmbedHeadline-D6pJRxUg.js → useEmbedHeadline-BeeBDb7E.js} +1 -1
  349. package/dist/client/assets/{usePierreRuntime-BAQdiN0L.js → usePierreRuntime-DUXZ-DTK.js} +1 -1
  350. package/dist/client/assets/useSidebarCollapse-DoMvU_2R.js +1 -0
  351. package/dist/client/assets/{users-BUjx36gx.js → users-BQPEIUfd.js} +1 -1
  352. package/dist/client/assets/{wrench-DR0i5BU7.js → wrench-C-wjicn5.js} +1 -1
  353. package/dist/client/assets/{x-DAehov0E.js → x-BcfhXYiF.js} +1 -1
  354. package/dist/client/assets/{xterm-BXQiLVnI.js → xterm-qXD45dc0.js} +1 -1
  355. package/dist/client/assets/{zap-CEjZNZbI.js → zap-BqL8ttGz.js} +1 -1
  356. package/dist/client/index.html +2 -2
  357. package/dist/main.mjs +1 -1
  358. package/package.json +29 -5
  359. package/server.json +31 -0
  360. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +0 -1
  361. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +0 -1
  362. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +0 -1
  363. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +0 -1
  364. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +0 -1
  365. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +0 -1
  366. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +0 -1
  367. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +0 -1
  368. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +0 -1
  369. package/dist/client/assets/AgentsScreen-ChwMBs11.js +0 -1
  370. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +0 -1
  371. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +0 -1
  372. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +0 -8
  373. package/dist/client/assets/Canvas-X9pVSkw3.js +0 -1
  374. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +0 -1
  375. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +0 -1
  376. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +0 -1
  377. package/dist/client/assets/ConversationComposer-CUQyArlk.js +0 -1
  378. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +0 -1
  379. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +0 -1
  380. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +0 -2
  381. package/dist/client/assets/ConversationStatus--IPm2nGh.js +0 -1
  382. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +0 -1
  383. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +0 -1
  384. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +0 -1
  385. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +0 -1
  386. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +0 -1
  387. package/dist/client/assets/MeshScreen-8nAzQVbm.js +0 -1
  388. package/dist/client/assets/MessagesScreen-C3WB4T21.js +0 -1
  389. package/dist/client/assets/MissionControlView-B9cNPXvl.js +0 -1
  390. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +0 -1
  391. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +0 -1
  392. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +0 -1
  393. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +0 -1
  394. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +0 -31
  395. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +0 -1
  396. package/dist/client/assets/OpsScreen-jVcaBKGi.js +0 -1
  397. package/dist/client/assets/OpsSubnav-BOOYShHE.js +0 -1
  398. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +0 -1
  399. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +0 -1
  400. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +0 -2
  401. package/dist/client/assets/ProjectsRail-CDWocin_.js +0 -1
  402. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +0 -1
  403. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +0 -1
  404. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +0 -1
  405. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +0 -16
  406. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +0 -2
  407. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +0 -1
  408. package/dist/client/assets/SessionsScreen-BLIRkohT.js +0 -1
  409. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +0 -1
  410. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +0 -2
  411. package/dist/client/assets/Terminal-Bi97yb5s.js +0 -4
  412. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +0 -1
  413. package/dist/client/assets/TerminalRelay-DrikpUSJ.js +0 -46
  414. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +0 -1
  415. package/dist/client/assets/content-B1lgE8qr.js +0 -1
  416. package/dist/client/assets/content-B5l11YyQ.js +0 -1
  417. package/dist/client/assets/content-BNZOZEpX.js +0 -1
  418. package/dist/client/assets/content-BRIxP155.js +0 -1
  419. package/dist/client/assets/content-BWd8gt8L.js +0 -1
  420. package/dist/client/assets/content-BfwS2jAK.js +0 -1
  421. package/dist/client/assets/content-C4p43_eT.js +0 -1
  422. package/dist/client/assets/content-CdYfaoDV.js +0 -1
  423. package/dist/client/assets/content-CzldLxw0.js +0 -1
  424. package/dist/client/assets/content-D-olnc4U.js +0 -1
  425. package/dist/client/assets/content-DTioimq4.js +0 -1
  426. package/dist/client/assets/content-LOebm3_d.js +0 -1
  427. package/dist/client/assets/content-oyzDM-LK.js +0 -1
  428. package/dist/client/assets/content-x1PHxED7.js +0 -1
  429. package/dist/client/assets/content-zX3ZY3T9.js +0 -1
  430. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +0 -1
  431. package/dist/client/assets/direct-voice-BbLPuJ04.js +0 -2
  432. package/dist/client/assets/discover-DJFxyV1k.js +0 -2
  433. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +0 -2
  434. package/dist/client/assets/home-now-card-ByE6Umcx.js +0 -1
  435. package/dist/client/assets/hooks-_eCZZPsR.js +0 -2
  436. package/dist/client/assets/index-724SdE6r.js +0 -1
  437. package/dist/client/assets/index-CN4rBB_s.css +0 -1
  438. package/dist/client/assets/index-D1d98iYf.js +0 -1
  439. package/dist/client/assets/index-gGHPA-By.js +0 -1
  440. package/dist/client/assets/left-Bn5X7x2o.js +0 -2
  441. package/dist/client/assets/left-BqS0fYX1.js +0 -1
  442. package/dist/client/assets/left-CTCeeeD3.js +0 -1
  443. package/dist/client/assets/left-DhtVPVux.js +0 -1
  444. package/dist/client/assets/left-K39b-Wvx.js +0 -2
  445. package/dist/client/assets/left-KGmueNPt.js +0 -1
  446. package/dist/client/assets/left-P_GOYB-s.js +0 -1
  447. package/dist/client/assets/left-advisor-B0N47De2.js +0 -1
  448. package/dist/client/assets/left-agents-CsSNc51Y.js +0 -1
  449. package/dist/client/assets/left-default-BlO5LP2T.js +0 -1
  450. package/dist/client/assets/left-lanes-C4PhaJE6.js +0 -1
  451. package/dist/client/assets/left-mission-BjTE5vPa.js +0 -1
  452. package/dist/client/assets/library-CkWNPHRp.js +0 -1
  453. package/dist/client/assets/profile-DTmzN16I.js +0 -1
  454. package/dist/client/assets/provider-Dojd8quC.js +0 -1
  455. package/dist/client/assets/resolve-panes-pbY1fCWi.js +0 -1
  456. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +0 -1
  457. package/dist/client/assets/right-49kO-6nD.js +0 -1
  458. package/dist/client/assets/right-APtItA8A.js +0 -1
  459. package/dist/client/assets/right-BJwhPqtn.js +0 -1
  460. package/dist/client/assets/right-BPqrf4ek.js +0 -1
  461. package/dist/client/assets/right-D7djOy6K.js +0 -1
  462. package/dist/client/assets/right-DKOUCRob.js +0 -1
  463. package/dist/client/assets/right-DMNrVzg7.js +0 -1
  464. package/dist/client/assets/right-DppeMCy4.js +0 -1
  465. package/dist/client/assets/right-GAL5Mw1v.js +0 -1
  466. package/dist/client/assets/router-DCtl8wqb.js +0 -1
  467. package/dist/client/assets/runtime-picker-DXu2bOTh.js +0 -1
  468. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +0 -1
  469. package/dist/client/assets/use-beside-DoRC1nt0.js +0 -1
  470. package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +0 -1
  471. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +0 -1
  472. package/dist/client/assets/usePersistentState-B8lP7TRb.js +0 -1
  473. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as u,j as s}from"./index-BFbLvCJn.js";import{A as Z}from"./AgentAvatar-Dn8TUv5W.js";import{a as B}from"./api-DSqpVKC7.js";import{d as _,c as rs}from"./context-budget-8qFKqM-j.js";import{b as ls,p as K,n as ss,h as q}from"./NewChatComposer-D-VB5vdt.js";import{b as Q,r as es,s as ts,a as ns}from"./session-catalog-Dx4tl3sx.js";import{u as X}from"./sse-BVxO0zNp.js";import{t as z}from"./time-Dhsh_2EG.js";import{B as cs}from"./BackToPicker-BPU7kbXq.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-BEXAZWd9.js";import{ConversationScreen as ds}from"./ConversationScreen-Pzxy9x4m.js";import{S as ms}from"./SessionObserve-Dw3bVQYF.js";import{H as as}from"./HarnessMark-CP-PWk2W.js";/* empty css */import{AgentDefinitionsWorkspace as ps}from"./AgentDefinitionsWorkspace-BzcBdC_s.js";import{AgentEssentialsGlyph as us}from"./agent-essentials-DnfdGmIX.js";import"./SpriteAvatar-D53GaaK3.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-a_C_F9r_.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./colors-CFlbwC25.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./terminal-relay-CpGHpDa8.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./ComposerAttachments-9uYp_Lh5.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./mentions-s5oW4aQU.js";import"./AgentDetailCard-CI-ufaEP.js";import"./AgentLiveActions-CkRGkv13.js";import"./terminal-takeover-CXwdoZ5j.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-B-FbWI7a.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-L9738YVP.js";import"./AstronautSuit-Dzu4GOMR.js";import"./panel-right-WKLdPm0F.js";import"./CommsFlowGraph-Cc48o9u_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-Dh056d91.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";/* empty css */import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DopIbJwf.js";import"./ConversationComposer-hYtLurqy.js";import"./zap-BqL8ttGz.js";import"./ConversationFeedRows-Bu0ZJcy8.js";import"./ConversationPanels-D6KuqvGu.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./tail-events-C6NWFB1N.js";import"./ConversationStatus-BEefIbXq.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";import"./SessionContextStrip-BoiIxXvS.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-DX6PJPNk.js";import"./external-link-Df1R34rX.js";import"./ObservedTopologyPanel-Ci7emnnj.js";import"./ObserveTextFlow-C0oQEerY.js";import"./SessionObserveEvidence-uD1OX-R5.js";import"./wrench-C-wjicn5.js";import"./agent-specialization-DYX_DSlY.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Dc7AoVod.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 ys({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 ws({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 j=r?.data,v=(j?.events??[]).filter(bs),b=v.filter(g=>g.kind==="tool"),S=b.filter(g=>g.tool==="edit"||g.tool==="write"),w=b.filter(g=>g.tool==="read"),y=j?.files.length??0,N=j?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||y>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(N??$)},{k:"tools",v:U(b.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(w.length)},{k:"files",v:U(y)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=j?.metadata?.usage,a=_(D,{model:j?.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,f=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(f&&f!==t.id?t.id:null),M=f??t.id,W=f&&t.harness==="codex"?"codex session id":f&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?K(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(ys,{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 Bt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=es(e,o),x=u.useMemo(()=>ts(o?.sessions??[],h),[o?.sessions,h]),j=x.find(n=>n.id===h)??null,I=j?.model??null,v=j?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[w,y]=u.useState("idle"),[N,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{y("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ns(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(w!=="starting"){y("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(e))}),f=n.sessionId?.trim();if(f){F(i,{view:"sessions",sessionId:f},{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{y("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,placement:"hero",size:46})}),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(us,{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:w==="starting",onClick:T,children:w==="starting"?"Starting...":"+ New session"}),N&&s.jsx("div",{className:"s-sess-action-error",children:N}),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 f=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=f?"now":n.endedAt?`ended · ${z(n.endedAt)||"recent"}`:z(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${f?" 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:f?"var(--accent)":"var(--dim)",opacity:f?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?K(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${f?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ws,{agentId:e.id,session:n,active:f,onPrimary:()=>f?void E():O(n),primaryLabel:f?"Continue":"Resume",primaryTitle:f?"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?K(t.cwd):"main"),j=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?K(t.cwd):null)??e.name,b=r?.data.metadata?.usage??null,S=b?.assistantMessages??null,w=_(b,{model:r?.data.metadata?.session?.model??j,adapterType:I}),y=w?Math.min(100,w.pct):null,N=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?z(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":N,"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":N,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,j?` · ${j}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(as,{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:[y!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),y,"%"]}):null,b&&(b.inputTokens||b.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(b.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=es(e,o),h=u.useMemo(()=>ts(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,j=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ns(e.id,r,l,h,j),v=Q(j,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const b=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,w=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,y=e.handle?.trim().replace(/^@+/,"")||null,N=t,$=[e.project?`/${e.project}`:null,e.branch,b].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(ss(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,placement:"hero",size:48}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(as,{harness:e.harness,size:13})}):null,s.jsx("h1",{className:"ap-profileName",title:N,children:N})]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),y?s.jsxs("span",{className:"ap-profileId",title:e.id,children:["@",y]}):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 · ${z(a.endedAt)||"recent"}`:z(a.startedAt)||"recent",O=a.cwd?K(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,f=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,f,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,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):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,b?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:b})]}):null]})]})]})]})}function Ht({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=ls(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[j,I]=u.useState(null),{route:v}=G(),b=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(b,j?.sessions??[])??b,w=u.useCallback(async()=>{const N=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(N)},[e.id]),y=u.useCallback(async()=>{x(!0);try{const N=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${N?`?${N}`:""}`);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),w();const N=window.setTimeout(()=>{w()},3e3);return()=>window.clearTimeout(N)},[w]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&y()},[i,y]),X(()=>{w(),i==="observe"&&y()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const N=setInterval(()=>{y()},2500);return()=>clearInterval(N)},[i,p?.data.live,y]),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:j,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:j,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ps,{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(ms,{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(ds,{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 Wt({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(cs,{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{Ht as AgentDetailWithRail,Wt as AgentProfileBar,Bt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
@@ -1 +1 @@
1
- import{r as T}from"./index-EsrkGBcv.js";import{a as p}from"./api-DSqpVKC7.js";import{d as H}from"./router-DCtl8wqb.js";import{u as V}from"./sse-BCPRocpq.js";import{i as A,o as $}from"./surface-activity-B1rgWB1i.js";import{u as q}from"./tail-events-d0yAYxR0.js";import{i as P,u as x,j as W,k as Y,l as J}from"./Provider-C35yu29I.js";import{l as E}from"./conversation-model-FxDeWlle.js";const U=50;function N(e){const s=e.source.trim().toLowerCase(),t=e.sessionId.trim(),n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return s&&o?`${s}\0${o}`:`event\0${e.id}`}function D(e,s){const t=new Map;for(const n of e){if(!P(n))continue;const o=N(n),l=t.get(o);(!l||n.ts>=l.ts)&&t.set(o,n)}return[...t.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,s)}function z(e){const s=e.now??Date.now;let t="idle",n=0,o=null,l=0;const c=()=>t==="idle"||t==="error"&&s()>=n;return{shouldRun:c,run(){if(o)return o;if(!c())return Promise.resolve();t="loading";const a=l;let i;return i=Promise.resolve().then(e.load).then(()=>{l===a&&(t="ready")}).catch(()=>{l===a&&(t="error",n=s()+e.retryDelayMs)}).finally(()=>{o===i&&(o=null)}),o=i,i},reset(){l+=1,t="idle",n=0,o=null}}}function G(e,s=t=>{const n=setTimeout(t,U);return()=>clearTimeout(n)}){const t=new Map;let n=null;const o=()=>{if(n=null,t.size===0)return;const l=[...t.values()];t.clear(),e(l)};return{push(l){t.set(N(l),l),n??=s(o)},cancel(){n?.(),n=null,t.clear()}}}function Q(e){if(typeof window<"u"){const t=window;if(t.requestIdleCallback){const n=t.requestIdleCallback(e,{timeout:1e3});return()=>t.cancelIdleCallback?.(n)}}const s=setTimeout(e,0);return()=>clearTimeout(s)}const X=6e4,O=3e4,Z=1e3,b=200,ee=5e3,te="/api/tail/discover?scope=hot&limit=160",se=`/api/tail/recent?limit=${b}&transcripts=1&mode=assistant-replies`;let r={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const M=new Set;let u=0,m=null,S=!1,h=null,d=null,w=null,g=null,C=null,j=0;function B(){for(const e of[...M])e()}function ne(e,s){const t=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&t(e)===t(s)?e:s}function I(e){r={...r,...e},B()}const _=z({retryDelayMs:ee,load:async()=>{const e=await p(se),s=D([...r.recentEvents,...e.events??[]],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})}});function oe(){h||!_.shouldRun()||(h=Q(()=>{h=null,u>0&&_.run()}))}const K=G(e=>{const s=D([...r.recentEvents,...e],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})});function re(e){P(e)&&K.push(e)}async function f(e){if(m)return S=!0,m;m=(async()=>{j+=1,typeof window<"u"&&(window.__projectsInboxLoads=j),r.loadedAt===null&&e!=="background"&&I({loading:!0,error:null});const[s,t,n]=await Promise.allSettled([p("/api/conversations"),p("/api/fleet"),p(te)]),o=s.status==="fulfilled"?E(r.sessions,s.value):r.sessions,l=t.status==="fulfilled"?Y(r.fleet,t.value):r.fleet,c=n.status==="fulfilled"?ne(r.discovery,n.value):r.discovery,a=[s,t,n].find(F=>F.status==="rejected"),i=a?a.reason instanceof Error?a.reason.message:String(a.reason):null,y=o!==r.sessions||l!==r.fleet||c!==r.discovery||i!==r.error||r.loading;r={...r,sessions:o,fleet:l,discovery:c,error:i,loading:!1,loadedAt:Date.now()},y&&B(),oe()})();try{await m}finally{m=null,S&&u>0&&(S=!1,f("background"))}}function le(){A()&&(d||(d=setTimeout(()=>{d=null,f("background")},Z)))}function ce(){f("initial"),w=setInterval(()=>{A()&&f("background")},X),g=setInterval(()=>{A()&&I({nowMs:Date.now()})},O),C=$(()=>{f("background")})}function ie(){h?.(),h=null,_.reset(),K.cancel(),d&&(clearTimeout(d),d=null),w&&(clearInterval(w),w=null),g&&(clearInterval(g),g=null),C?.(),C=null}function Ie(){f("background")}function ae(){const[e,s]=T.useState(r);return T.useEffect(()=>{const t=()=>s(r);return M.add(t),u+=1,u===1&&ce(),t(),()=>{M.delete(t),u-=1,u===0&&ie()}},[]),V(le),q(re),e}let L=null,v=null,k=null;function ue(e,s){return!!e&&e.length===s.length&&e.every((t,n)=>t===s[n])}function R(e,s,t){if(!e?.length)return s;const n=new Map(e.map(c=>[t(c),c]));let o=e.length===s.length;const l=s.map((c,a)=>{const i=n.get(t(c)),y=i?E(i,c):c;return y!==e[a]&&(o=!1),y});return o?e:l}function de(e,s){if(!e)return s;const t=R(e.projects,s.projects,c=>c.slug),n=R(e.threads,s.threads,c=>c.id),o=R(e.sessions,s.sessions,c=>c.id),l=E(e.projectAliases,J(e.projectAliases,s.projectAliases,t));return t===e.projects&&n===e.threads&&o===e.sessions&&l===e.projectAliases?e:{projects:t,threads:n,sessions:o,projectAliases:l}}function fe(e){const s=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/O),e.showEphemeral];if(ue(L,s)&&v)return v;const t=W(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=de(k===n?v:null,t);return L=s,v=o,k=n,o}function Se(e){const s=ae(),{agents:t}=x(),n=H(e),o=!!e.showEphemeral;return{model:T.useMemo(()=>fe({agents:t,machineId:n,sessions:s.sessions,fleet:s.fleet,discovery:s.discovery,recentEvents:s.recentEvents,nowMs:s.nowMs,showEphemeral:o}),[t,n,s.sessions,s.fleet,s.discovery,s.recentEvents,s.nowMs,o]),agents:t,nowMs:s.nowMs,loading:s.loading,loadedAt:s.loadedAt,error:s.error}}export{Ie as r,Se as u};
1
+ import{r as T}from"./index-BFbLvCJn.js";import{a as p}from"./api-DSqpVKC7.js";import{b as H}from"./router-CJIx83Ia.js";import{u as V}from"./sse-BVxO0zNp.js";import{i as A,o as $}from"./surface-activity-B1rgWB1i.js";import{u as q}from"./tail-events-C6NWFB1N.js";import{i as P,u as x,j as W,k as Y,l as J}from"./Provider-BEXAZWd9.js";import{l as E}from"./conversation-model-FxDeWlle.js";const U=50;function N(e){const s=e.source.trim().toLowerCase(),t=e.sessionId.trim(),n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return s&&o?`${s}\0${o}`:`event\0${e.id}`}function D(e,s){const t=new Map;for(const n of e){if(!P(n))continue;const o=N(n),l=t.get(o);(!l||n.ts>=l.ts)&&t.set(o,n)}return[...t.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,s)}function z(e){const s=e.now??Date.now;let t="idle",n=0,o=null,l=0;const c=()=>t==="idle"||t==="error"&&s()>=n;return{shouldRun:c,run(){if(o)return o;if(!c())return Promise.resolve();t="loading";const a=l;let i;return i=Promise.resolve().then(e.load).then(()=>{l===a&&(t="ready")}).catch(()=>{l===a&&(t="error",n=s()+e.retryDelayMs)}).finally(()=>{o===i&&(o=null)}),o=i,i},reset(){l+=1,t="idle",n=0,o=null}}}function G(e,s=t=>{const n=setTimeout(t,U);return()=>clearTimeout(n)}){const t=new Map;let n=null;const o=()=>{if(n=null,t.size===0)return;const l=[...t.values()];t.clear(),e(l)};return{push(l){t.set(N(l),l),n??=s(o)},cancel(){n?.(),n=null,t.clear()}}}function Q(e){if(typeof window<"u"){const t=window;if(t.requestIdleCallback){const n=t.requestIdleCallback(e,{timeout:1e3});return()=>t.cancelIdleCallback?.(n)}}const s=setTimeout(e,0);return()=>clearTimeout(s)}const X=6e4,O=3e4,Z=1e3,b=200,ee=5e3,te="/api/tail/discover?scope=hot&limit=160",se=`/api/tail/recent?limit=${b}&transcripts=1&mode=assistant-replies`;let r={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const M=new Set;let u=0,m=null,S=!1,h=null,d=null,w=null,g=null,C=null,j=0;function B(){for(const e of[...M])e()}function ne(e,s){const t=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&t(e)===t(s)?e:s}function I(e){r={...r,...e},B()}const _=z({retryDelayMs:ee,load:async()=>{const e=await p(se),s=D([...r.recentEvents,...e.events??[]],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})}});function oe(){h||!_.shouldRun()||(h=Q(()=>{h=null,u>0&&_.run()}))}const K=G(e=>{const s=D([...r.recentEvents,...e],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})});function re(e){P(e)&&K.push(e)}async function f(e){if(m)return S=!0,m;m=(async()=>{j+=1,typeof window<"u"&&(window.__projectsInboxLoads=j),r.loadedAt===null&&e!=="background"&&I({loading:!0,error:null});const[s,t,n]=await Promise.allSettled([p("/api/conversations"),p("/api/fleet"),p(te)]),o=s.status==="fulfilled"?E(r.sessions,s.value):r.sessions,l=t.status==="fulfilled"?Y(r.fleet,t.value):r.fleet,c=n.status==="fulfilled"?ne(r.discovery,n.value):r.discovery,a=[s,t,n].find(F=>F.status==="rejected"),i=a?a.reason instanceof Error?a.reason.message:String(a.reason):null,y=o!==r.sessions||l!==r.fleet||c!==r.discovery||i!==r.error||r.loading;r={...r,sessions:o,fleet:l,discovery:c,error:i,loading:!1,loadedAt:Date.now()},y&&B(),oe()})();try{await m}finally{m=null,S&&u>0&&(S=!1,f("background"))}}function le(){A()&&(d||(d=setTimeout(()=>{d=null,f("background")},Z)))}function ce(){f("initial"),w=setInterval(()=>{A()&&f("background")},X),g=setInterval(()=>{A()&&I({nowMs:Date.now()})},O),C=$(()=>{f("background")})}function ie(){h?.(),h=null,_.reset(),K.cancel(),d&&(clearTimeout(d),d=null),w&&(clearInterval(w),w=null),g&&(clearInterval(g),g=null),C?.(),C=null}function Ie(){f("background")}function ae(){const[e,s]=T.useState(r);return T.useEffect(()=>{const t=()=>s(r);return M.add(t),u+=1,u===1&&ce(),t(),()=>{M.delete(t),u-=1,u===0&&ie()}},[]),V(le),q(re),e}let L=null,v=null,k=null;function ue(e,s){return!!e&&e.length===s.length&&e.every((t,n)=>t===s[n])}function R(e,s,t){if(!e?.length)return s;const n=new Map(e.map(c=>[t(c),c]));let o=e.length===s.length;const l=s.map((c,a)=>{const i=n.get(t(c)),y=i?E(i,c):c;return y!==e[a]&&(o=!1),y});return o?e:l}function de(e,s){if(!e)return s;const t=R(e.projects,s.projects,c=>c.slug),n=R(e.threads,s.threads,c=>c.id),o=R(e.sessions,s.sessions,c=>c.id),l=E(e.projectAliases,J(e.projectAliases,s.projectAliases,t));return t===e.projects&&n===e.threads&&o===e.sessions&&l===e.projectAliases?e:{projects:t,threads:n,sessions:o,projectAliases:l}}function fe(e){const s=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/O),e.showEphemeral];if(ue(L,s)&&v)return v;const t=W(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=de(k===n?v:null,t);return L=s,v=o,k=n,o}function Se(e){const s=ae(),{agents:t}=x(),n=H(e),o=!!e.showEphemeral;return{model:T.useMemo(()=>fe({agents:t,machineId:n,sessions:s.sessions,fleet:s.fleet,discovery:s.discovery,recentEvents:s.recentEvents,nowMs:s.nowMs,showEphemeral:o}),[t,n,s.sessions,s.fleet,s.discovery,s.recentEvents,s.nowMs,o]),agents:t,nowMs:s.nowMs,loading:s.loading,loadedAt:s.loadedAt,error:s.error}}export{Ie as r,Se as u};
@@ -1 +1 @@
1
- import{r as s,j as u}from"./index-EsrkGBcv.js";import{l as c,L as f,c as l}from"./use-reduced-motion-3gMYZNIp.js";function p({children:r,features:e,strict:d=!1}){const[,i]=s.useState(!a(e)),t=s.useRef(void 0);if(!a(e)){const{renderer:n,...o}=e;t.current=n,c(o)}return s.useEffect(()=>{a(e)&&e().then(({renderer:n,...o})=>{c(o),t.current=n,i(!0)})},[]),u.jsx(f.Provider,{value:{renderer:t.current,strict:d},children:r})}function a(r){return typeof r=="function"}const L=l();export{p as L,L as m};
1
+ import{r as s,j as u}from"./index-BFbLvCJn.js";import{l as c,L as f,c as l}from"./use-reduced-motion-DkdIQBwh.js";function p({children:r,features:e,strict:d=!1}){const[,i]=s.useState(!a(e)),t=s.useRef(void 0);if(!a(e)){const{renderer:n,...o}=e;t.current=n,c(o)}return s.useEffect(()=>{a(e)&&e().then(({renderer:n,...o})=>{c(o),t.current=n,i(!0)})},[]),u.jsx(f.Provider,{value:{renderer:t.current,strict:d},children:r})}function a(r){return typeof r=="function"}const L=l();export{p as L,L as m};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-zZ8Hx7er.js";const c=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=a("radio",c);export{o as R};
1
+ import{c as a}from"./createLucideIcon-CKbjXlwv.js";const c=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=a("radio",c);export{o as R};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-zZ8Hx7er.js";const c=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],a=e("refresh-cw",c);export{a as R};
1
+ import{c as e}from"./createLucideIcon-CKbjXlwv.js";const c=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],a=e("refresh-cw",c);export{a as R};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-BFbLvCJn.js";import{ActivityContent as s}from"./content-CPchclaV.js";import"./api-DSqpVKC7.js";import"./index-BWHgHrtv.js";import"./router-CJIx83Ia.js";import"./index-CXzJ_hGx.js";import"./Provider-BEXAZWd9.js";import"./AgentDetailCard-CI-ufaEP.js";/* empty css */import{AgentsLeft as e}from"./left-CemrfeSs.js";import{AgentsContent as n}from"./content-BHV-ZU8_.js";import{AgentsInspector as m}from"./right-DsE4aR3A.js";/* empty css */import"./secondaryNavConfig-Bmb-oRvD.js";/* empty css */import"./CrewAvatar-a_C_F9r_.js";import"./BackToPicker-BPU7kbXq.js";import"./runtime-picker-IRcTkMZ5.js";import"./ConversationScreen-Pzxy9x4m.js";/* empty css */import"./CommsFlowGraph-Cc48o9u_.js";import"./CommsCanvas-Dh056d91.js";/* empty css */import"./SessionContextStrip-BoiIxXvS.js";import"./ObservedTopologyPanel-Ci7emnnj.js";import"./SessionObserve-Dw3bVQYF.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-CkRGkv13.js";import{ProjectsRail as c}from"./ProjectsRail-BhSaqbv0.js";import{ProjectsScreen as f}from"./ProjectsScreen-CSb7nwjb.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-pEJutIO8.js";import{BriefingsContent as x}from"./content-srNyLgDt.js";/* empty css */import{BrokerContent as j}from"./content-iWBSSXa6.js";import"./NewChatComposer-D-VB5vdt.js";import{ChatLeft as u}from"./left-BP5P8lzw.js";/* empty css */import{ChatContent as l}from"./content-BI9yWpWC.js";import{ConversationInspector as i}from"./right-Cc57bCTW.js";/* empty css */import{CodeContent as h}from"./CodeScreen-BN4TkiR0.js";import{FollowContent as C}from"./content-CVqPTQnr.js";/* empty css */import{HarnessesContent as d}from"./content-BXTmYOPB.js";/* empty css */import{HomeLeft as I}from"./left-DdMMaqFT.js";import{HomeContent as p}from"./content-BP3cQkAj.js";import{HomeRight as w}from"./right-BHZq648O.js";import{MeshLeft as L}from"./left-B66YR0c5.js";import{MeshContent as P}from"./content-C3DZ77HZ.js";import{MeshInspectorPanel as R}from"./right-zlkRjnkv.js";import"./mesh-view-store-CVqzYz4K.js";import"./NodeMenu-BgJMmffZ.js";/* empty css */import{MeshOpsLeft as k}from"./left-DcYA26sH.js";import{MeshOpsContent as A}from"./content-BRY-UTkP.js";import{MeshOpsInspector as M}from"./right-DfU47xKY.js";import{OpsLeft as S}from"./left-CaY5FK2k.js";import{OpsContent as b}from"./content-BLVuukzF.js";/* empty css */import"./RailRow-Ddz90weI.js";import"./left-mission-CvXPUovR.js";import"./mission-control-store-e8F85JhP.js";/* empty css *//* empty css *//* empty css */import"./CrewSprite-CguHb2Ny.js";/* empty css *//* empty css *//* empty css */import"./SharedWorkFloor-H-e2TVj9.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-D5oPQocF.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-B44cSuyl.js";/* empty css */import{ReposContent as g}from"./content-DK1KeRPw.js";import{ReposInspector as O}from"./right-BNJzCaH9.js";/* empty css */import"./RepoDiffViewerLazy-DL6A2o_z.js";import"./cache-DGBo3vIf.js";import{SearchContent as T}from"./content-CjAERU44.js";import{K as H}from"./KnowledgeSearchInspector-BbOQIqdF.js";/* empty css */import{SessionsContent as y}from"./content-B-rn1rka.js";import{SessionsInspector as B}from"./right-DY49Prjj.js";/* empty css */import{SettingsContent as K}from"./content-ryJeaQk8.js";import"./CastPicker-Y29K5kKk.js";import"./SettingsDrawer-BVrP6J52.js";import{TerminalLeft as W}from"./left-BbCKRDbW.js";import{T as E}from"./Terminal-D0PanmIk.js";import{TerminalInspector as F}from"./right-9rMRZN_r.js";import{WorkContent as V}from"./content-CoYG0nWL.js";import{WorkInspector as q}from"./right-Dr7vxdZl.js";import"./DocumentFocusViewer-mxzPxQQW.js";import{R as z}from"./RealtimeVoiceScreen-BU5KmlNo.js";import"./ActivityScreen-C1H-vL0L.js";import"./clipboard-e3fSpeo7.js";import"./sse-BVxO0zNp.js";import"./machine-scope-DJt9RZ2w.js";import"./mentions-s5oW4aQU.js";import"./colors-CFlbwC25.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./SessionHopMenu-DX6PJPNk.js";import"./terminal-sessions-3RfJpen8.js";import"./openContent-C6XO6kr5.js";import"./createLucideIcon-CKbjXlwv.js";import"./external-link-Df1R34rX.js";import"./EmptyState-DLiLgtPK.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./theme-vars-DNK0nn3k.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./index-V8FYEUpD.js";import"./TextDocumentSurface-DBslUq9k.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./file-text-BOJQiS8p.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-CEe-ApvZ.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./AgentAvatar-Dn8TUv5W.js";import"./SpriteAvatar-D53GaaK3.js";import"./AgentInfoScreen-BnRhfcFy.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./CrewStage-IPpS3Oja.js";import"./AgentsScreen-C17BFqjf.js";import"./AgentsSubnav-_1GVC4hj.js";import"./SecondaryNav-1FjBDWuY.js";import"./library-CnC8uzJt.js";import"./HarnessMark-CP-PWk2W.js";import"./AgentSessions-ghjQcSrh.js";import"./profile-B7ZGToTo.js";import"./context-budget-8qFKqM-j.js";import"./session-catalog-Dx4tl3sx.js";import"./terminal-relay-CpGHpDa8.js";import"./AgentDefinitionsWorkspace-BzcBdC_s.js";import"./agent-specialization-DYX_DSlY.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Dc7AoVod.js";import"./chevron-down-DEDSNJNY.js";import"./agent-essentials-DnfdGmIX.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-CXwdoZ5j.js";import"./TmuxPeek-Ctw5yYO5.js";import"./refresh-cw-BcqctLqo.js";import"./nav-destinations-B3R5zxFX.js";import"./message-square-BwqBIfv5.js";import"./terminal-DMBAZjPP.js";import"./search-Bv2IONmc.js";import"./compass-EmGkpxIe.js";import"./settings-bo9X410k.js";import"./git-branch-C45vy8qT.js";import"./scroll-text-CA0QxBHu.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./ComposerAttachments-9uYp_Lh5.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./MessageEmbeds-B-FbWI7a.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-L9738YVP.js";import"./AstronautSuit-Dzu4GOMR.js";import"./eye-CD-_aphP.js";import"./panel-right-WKLdPm0F.js";import"./use-beside-DopIbJwf.js";import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./comms-deck-CBhsXnY-.js";import"./ConversationComposer-hYtLurqy.js";import"./zap-BqL8ttGz.js";import"./x-BcfhXYiF.js";import"./ConversationFeedRows-Bu0ZJcy8.js";import"./ConversationPanels-D6KuqvGu.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./tail-events-C6NWFB1N.js";import"./ConversationStatus-BEefIbXq.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./ObserveTextFlow-C0oQEerY.js";import"./SessionObserveEvidence-uD1OX-R5.js";import"./wrench-C-wjicn5.js";import"./AddProjectForm-4sVXmjfN.js";import"./projects-inbox-CMFBjQt0.js";import"./ProjectsInbox-B7kap8nR.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Ch9H-qVk.js";import"./session-ref-lookup-state-SATH_jAP.js";import"./CrewWorkspaces-BTPtcEcx.js";import"./plus-B0hdY0fF.js";import"./useEmbedHeadline-BeeBDb7E.js";import"./api-BQYTwoz6.js";import"./arrow-up-right-DUW1A1Hb.js";import"./ProjectAgentProfile-B1VqGSmu.js";import"./ProjectAgentProfileBar-DhVU7zew.js";import"./BriefingDetailScreen-CTvFw523.js";import"./scoutbot-markdown-7PRQHaAc.js";import"./BriefingsScreen-DpVC3OUk.js";import"./BrokerScreen-CqKsBwEx.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-BkBzyvbR.js";import"./BrokerMetadataPanel-glRVdwkU.js";import"./DispatchAftermath-CoAYaL3B.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-CDiIT_qn.js";import"./arrow-down--OUDFWIq.js";import"./paperclip-DLf_ABSv.js";import"./send-horizontal-_Tf_It04.js";import"./copy-C1XrY27_.js";import"./radio-Bjqmv997.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-DAHOPYPV.js";import"./sessions-view-lGMwwZY7.js";import"./MessagesScreen-hq7D3Lfi.js";import"./AgentMasterScreen-CijN_4tN.js";import"./CommsDeck-CRXKIerH.js";import"./CodeDiffPane-DCgMUi39.js";import"./usePierreRuntime-DUXZ-DTK.js";/* empty css */import"./CodeProjectPicker-Dq787L77.js";/* empty css */import"./FollowScreen-DFVSlsQV.js";import"./HarnessesScreen-j-91IoOo.js";import"./useContentSecondaryNav-LJGNYG3U.js";import"./OpsSubnav-CjMVj7Sk.js";import"./HomeHero-g4H3Ctxg.js";import"./observe-M3rLosT5.js";import"./persistent-state-3mbBFRDO.js";import"./agent-lanes-model-DMAdqCmK.js";import"./home-moving-signal-BiiyEKEb.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DVZ_LhPn.js";import"./file-code-corner-DtMWHBN3.js";import"./machine-children-DvCiQxwA.js";import"./use-mesh-node-state-BlWIPTc4.js";import"./MeshScreen-CAtRB8K6.js";import"./MeshCanvas-DzkuY_XI.js";import"./chunk-T65CQEWV-G_Z0lqtn.js";import"./useAgentHoverCard-DNlXPYQf.js";import"./local-agents-BMcFlY_x.js";import"./NodeDetailPanel-9NaEnZAQ.js";import"./mesh-ops-9SzD3sPw.js";import"./use-mesh-ops-items-pKWBro7o.js";import"./use-scout-dev-flags-CduUFb7l.js";import"./left-agents-DowYF2ag.js";import"./left-default-Bifaeg_V.js";import"./left-lanes-BGhjdqpD.js";import"./lane-roster-store-MraynTHP.js";import"./left-advisor-DBml48M5.js";import"./server-U_l8A83n.js";import"./layers-ClmyjwpB.js";import"./gauge-BR5CrhRM.js";import"./OpsScreen-C955zgr3.js";import"./page-status-BIuh3C5p.js";import"./AgentLanesView-CiISx7pu.js";import"./AgentFloorView-D8tlGlgy.js";import"./AgentAdventures-5yBt-Zl3.js";import"./ReplayClock-wLpb4VqN.js";import"./SproutActionSprite-BrFCmgWS.js";import"./adventure-playback-DTfkhIc0.js";import"./AdventureScenery-CGEcG0zV.js";import"./adventure-habitats-v1-M1lcpTJh.js";import"./AdventureReader-BICypcDY.js";import"./floor-preview-text-HrORUJ7D.js";import"./book-open-B_idZgTF.js";import"./ReplayLog-IUyQdklN.js";import"./AdventureEvidence-D5wq1vu8.js";import"./agent-lane-detail-Ti3trpfH.js";import"./flag-CeKO8NoD.js";import"./pause-7mmEEvVx.js";import"./play-N5-hnPCV.js";import"./FloorReplay-Bg7kA-tR.js";import"./agent-floor-actor-DW8zLht0.js";import"./AgentFloorWorld-DqmnQexg.js";import"./agent-floor-world-layout-hfMjuoui.js";import"./coffee-D0YEK6-l.js";import"./floor-context-model-rWKqaKmV.js";import"./floor-memory-YMM8AlLY.js";import"./FloorTacticalHUD-4d-Hr-YL.js";import"./FloorSavedWork-BDOvV3mA.js";import"./pin-q_0gAA6i.js";import"./FloorResourcesSheet-Ba9HubO2.js";import"./shared-work-artifacts-DfNl9KTo.js";import"./FloorContextSheet-BfrXNoBn.js";import"./floor-character-name-CqJPOlXb.js";import"./session-recap-lanes-D-eVJnpY.js";import"./AgentLanesPreflight-BQfj2twF.js";import"./AgentLaneChrome-RptImDFc.js";import"./AgentLaneCard-pppHFROz.js";import"./AgentLaneSummaryResize-DaIgwyVh.js";import"./agent-lane-card-model-CeqQGp-8.js";import"./agent-lane-preview-Dpa3DuOn.js";import"./AgentLaneDetailSheet-BqbwGskh.js";import"./LaneTraceDetailSheet-CngYIxdI.js";import"./LaneTraceEventFocus-BRR_jcl9.js";import"./MissionControlView-D6gbMrgx.js";import"./send-to-agent-session-CWDHHgFB.js";import"./MissionContextRail-ClR8amG1.js";import"./mission-wall-CAo4BKfa.js";import"./mission-control-model-BpJHDV5D.js";import"./MissionFocusOverlay-CzeNgI9Q.js";import"./MissionLogPane-2PMEoG44.js";import"./OpsAgentsView-DVotOMg2.js";import"./DataTable-DnL_8SAu.js";import"./sliders-horizontal-CPSx6wd2.js";import"./HostAdvisorView-Cyt3b5Fq.js";import"./layout-grid-DG2-JaPn.js";import"./AtopView-DJK5b3lZ.js";import"./FleetRollCallHud-VhpxVcGO.js";import"./session-recap-queue-GeicPLsQ.js";import"./MissionLeftAgentRow-CB3cgeYr.js";import"./WorldMinimap-DL12pBw3.js";import"./WorldSky-BlPNvGLo.js";import"./WorldActorTalk-CHhFTiQV.js";import"./FloorExchangePanel-DsG1cRzu.js";import"./floor-message-passes-CO3Ix_wR.js";import"./CharacterFamilyPreview-Bj8oMD-5.js";import"./RenderedWorkerSprite-BNhFXMIo.js";import"./FloorMessagePasses-Cm3LbkHd.js";import"./WorkRunView-DLIzAsc3.js";import"./SharedFloorCharacter-dnamlt1p.js";import"./WorldCharacter-CJGx2DVy.js";import"./RiggedWorkerCharacter-CF6fhzGd.js";import"./RepoDiffPageScreen-B9oAjrC6.js";import"./ReposScreen-D-E7fSAB.js";import"./selection-bridge-CthAuPRw.js";import"./KnowledgeSearchScreen-DC8yX-kA.js";import"./clock-8tb9t2t9.js";import"./SessionsScreen-DUeP23Xy.js";import"./RawSessionsTable-TdKlJIPl.js";import"./FlightObserveScreen-C1kASP3J.js";import"./SettingsScreen-BcJ05LE5.js";import"./StatusPill-jT--OXbn.js";import"./AgentConfigurationScreen-C0D9WNyL.js";import"./bot-BNv_ZJzi.js";import"./credentials-OeoF-VKJ.js";import"./VoicePermissionsPanel-9Nuw-xCr.js";import"./monitor-M0VSmHQ-.js";import"./chunk-YOZR3KYS-apgUnfXh.js";import"./arrow-up-DFy-9ghF.js";import"./session-table-BI62J4NP.js";import"./log-in-VL9mdgeE.js";/* empty css */import"./HerdrSession-H2mmxeTK.js";import"./chunk-JTPDIGGW-hdpdYwXb.js";import"./TerminalHeaderMount-CYYcKxQ-.js";import"./WorkDetailScreen-BrrkENYq.js";import"./WorkFilesViewer-B63sKRYZ.js";import"./direct-voice-DAOUU-kc.js";import"./gestures-Dh8szhcU.js";import"./VoiceControlWell-BkjuWjYu.js";import"./rocket-BahsdUe6.js";import"./VoiceTurnDetails-kS7lfbmt.js";import"./VoiceTurnStage-DLY6aYDg.js";import"./VoiceTurnView-CF4tIldB.js";/* empty css *//* empty css */function ce(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(L,{});case"mesh-ops":return r.jsx(k,{});case"terminal":return r.jsx(W,{});default:return r.jsx(I,{})}}function fe(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(T,{route:t,navigate:o});case"mesh":return r.jsx(P,{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 ae(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(H,{});case"conversation":return r.jsx(i,{});case"messages":return r.jsx(i,{});case"terminal":return r.jsx(F,{});case"work":return r.jsx(q,{});case"mesh":return r.jsx(R,{});case"mesh-ops":return r.jsx(M,{});case"repos":return r.jsx(O,{});default:return null}}export{fe as resolveContentPane,ce as resolveLeftPane,ae as resolveRightPane};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-BFbLvCJn.js";import{AgentsLeft as i}from"./left-CemrfeSs.js";/* empty css *//* empty css */import"./api-DSqpVKC7.js";import"./index-BWHgHrtv.js";import"./Provider-BEXAZWd9.js";import"./router-CJIx83Ia.js";import"./BackToPicker-BPU7kbXq.js";import"./AgentLiveActions-CkRGkv13.js";import"./CrewAvatar-a_C_F9r_.js";import"./ObservedTopologyPanel-Ci7emnnj.js";/* empty css */import"./secondaryNavConfig-Bmb-oRvD.js";/* empty css */import"./runtime-picker-IRcTkMZ5.js";import"./index-CXzJ_hGx.js";import"./AgentDetailCard-CI-ufaEP.js";import"./ConversationScreen-Pzxy9x4m.js";/* empty css */import"./CommsFlowGraph-Cc48o9u_.js";import"./CommsCanvas-Dh056d91.js";/* empty css */import"./SessionContextStrip-BoiIxXvS.js";import"./SessionObserve-Dw3bVQYF.js";/* empty css *//* empty css *//* empty css */import{ProjectsRail as m}from"./ProjectsRail-BhSaqbv0.js";import"./ProjectsInbox-B7kap8nR.js";/* empty css */import"./projects-inbox-CMFBjQt0.js";import{ChatLeft as p}from"./left-BP5P8lzw.js";/* empty css *//* empty css */import{HomeLeft as e}from"./left-DdMMaqFT.js";import"./content-BP3cQkAj.js";import{MeshLeft as s}from"./left-B66YR0c5.js";import"./mesh-view-store-CVqzYz4K.js";import"./NodeMenu-BgJMmffZ.js";/* empty css */import{MeshOpsLeft as n}from"./left-DcYA26sH.js";import"./use-scout-dev-flags-CduUFb7l.js";import"./mesh-ops-9SzD3sPw.js";import{OpsLeft as l}from"./left-CaY5FK2k.js";/* empty css *//* empty css *//* empty css */import"./CrewSprite-CguHb2Ny.js";/* empty css *//* empty css *//* empty css */import"./SharedWorkFloor-H-e2TVj9.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-D5oPQocF.js";/* empty css */import"./mission-control-store-e8F85JhP.js";/* empty css *//* empty css *//* empty css */import"./TailView-B44cSuyl.js";/* empty css */import"./RailRow-Ddz90weI.js";import"./left-mission-CvXPUovR.js";import{TerminalLeft as a}from"./left-BbCKRDbW.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-BrscEPAH.js";import"./NewChatComposer-D-VB5vdt.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./agent-state-DDhnFEEP.js";import"./time-Dhsh_2EG.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./loader-circle-CCG7hG7z.js";import"./file-text-BOJQiS8p.js";import"./AgentAvatar-Dn8TUv5W.js";import"./SpriteAvatar-D53GaaK3.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./surface-activity-B1rgWB1i.js";import"./theme-vars-DNK0nn3k.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./terminal-takeover-CXwdoZ5j.js";import"./openContent-C6XO6kr5.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./nav-destinations-B3R5zxFX.js";import"./message-square-BwqBIfv5.js";import"./compass-EmGkpxIe.js";import"./settings-bo9X410k.js";import"./git-branch-C45vy8qT.js";import"./scroll-text-CA0QxBHu.js";import"./voice-levels-Dcr3jglk.js";import"./ComposerAttachments-9uYp_Lh5.js";import"./message-markup-D1C7GzHo.js";import"./message-markup-BQW5jdJw.js";import"./mentions-s5oW4aQU.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-B-FbWI7a.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-L9738YVP.js";import"./AstronautSuit-Dzu4GOMR.js";import"./panel-right-WKLdPm0F.js";import"./use-beside-DopIbJwf.js";import"./use-conversation-list-CGtcpdPd.js";import"./agent-master-model-Bk_yuUXJ.js";import"./comms-deck-CBhsXnY-.js";import"./ConversationComposer-hYtLurqy.js";import"./zap-BqL8ttGz.js";import"./ConversationFeedRows-Bu0ZJcy8.js";import"./ConversationPanels-D6KuqvGu.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-DkdIQBwh.js";import"./proxy-k0ILOVkK.js";import"./activity-CXkZ620t.js";import"./message-circle-BB3rFCVD.js";import"./tail-events-C6NWFB1N.js";import"./ConversationStatus-BEefIbXq.js";import"./check-BM6QtbB7.js";import"./sparkles-Br-bA2aZ.js";import"./triangle-alert-BZikHKuT.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsFlowMap-Ckasql5e.js";import"./CommsSelection-CuphnUny.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-B8Am_1DC.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-DX6PJPNk.js";import"./external-link-Df1R34rX.js";import"./ObserveTextFlow-C0oQEerY.js";import"./SessionObserveEvidence-uD1OX-R5.js";import"./wrench-C-wjicn5.js";import"./AddProjectForm-4sVXmjfN.js";import"./project-overview-helpers-BQTc_Ous.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-Ch9H-qVk.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./CrewWorkspaces-BTPtcEcx.js";import"./agent-specialization-DYX_DSlY.js";import"./plus-B0hdY0fF.js";import"./useEmbedHeadline-BeeBDb7E.js";import"./api-BQYTwoz6.js";import"./cache-DGBo3vIf.js";import"./arrow-up-right-DUW1A1Hb.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-DAHOPYPV.js";import"./sessions-view-lGMwwZY7.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-g4H3Ctxg.js";import"./refresh-cw-BcqctLqo.js";import"./observe-M3rLosT5.js";import"./persistent-state-3mbBFRDO.js";import"./agent-lanes-model-DMAdqCmK.js";import"./context-budget-8qFKqM-j.js";import"./home-moving-signal-BiiyEKEb.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DVZ_LhPn.js";import"./file-code-corner-DtMWHBN3.js";import"./machine-children-DvCiQxwA.js";import"./use-mesh-node-state-BlWIPTc4.js";import"./use-mesh-ops-items-pKWBro7o.js";import"./left-agents-DowYF2ag.js";import"./left-default-Bifaeg_V.js";import"./left-lanes-BGhjdqpD.js";import"./lane-roster-store-MraynTHP.js";import"./left-advisor-DBml48M5.js";import"./server-U_l8A83n.js";import"./layers-ClmyjwpB.js";import"./gauge-BR5CrhRM.js";import"./MissionLeftAgentRow-CB3cgeYr.js";import"./page-status-BIuh3C5p.js";import"./WorldMinimap-DL12pBw3.js";import"./WorldSky-BlPNvGLo.js";import"./WorldActorTalk-CHhFTiQV.js";import"./send-to-agent-session-CWDHHgFB.js";import"./FloorExchangePanel-DsG1cRzu.js";import"./floor-character-name-CqJPOlXb.js";import"./floor-message-passes-CO3Ix_wR.js";import"./floor-preview-text-HrORUJ7D.js";import"./shared-work-artifacts-DfNl9KTo.js";import"./agent-lane-detail-Ti3trpfH.js";import"./floor-memory-YMM8AlLY.js";import"./CharacterFamilyPreview-Bj8oMD-5.js";import"./RenderedWorkerSprite-BNhFXMIo.js";import"./FloorMessagePasses-Cm3LbkHd.js";import"./WorkRunView-DLIzAsc3.js";import"./floor-context-model-rWKqaKmV.js";import"./agent-floor-actor-DW8zLht0.js";import"./SharedFloorCharacter-dnamlt1p.js";import"./WorldCharacter-CJGx2DVy.js";import"./RiggedWorkerCharacter-CF6fhzGd.js";import"./chunk-YOZR3KYS-apgUnfXh.js";import"./arrow-up-DFy-9ghF.js";import"./arrow-down--OUDFWIq.js";import"./terminal-relay-CpGHpDa8.js";import"./session-table-BI62J4NP.js";import"./clock-8tb9t2t9.js";import"./log-in-VL9mdgeE.js";function Hi(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{Hi as resolveSidebarContext};
@@ -0,0 +1 @@
1
+ import{r as d,j as e}from"./index-BFbLvCJn.js";import{u as k}from"./Provider-BEXAZWd9.js";import{c as y}from"./agent-state-DDhnFEEP.js";import{A as S}from"./AgentAvatar-Dn8TUv5W.js";import{t as N}from"./time-Dhsh_2EG.js";import{f as w}from"./runtime-picker-IRcTkMZ5.js";import{c as I}from"./clipboard-e3fSpeo7.js";import{f as T,r as C,t as R}from"./terminal-sessions-3RfJpen8.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./loader-circle-CCG7hG7z.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./voice-levels-Dcr3jglk.js";function Re(){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{Re as TerminalInspector};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-BFbLvCJn.js";import{u as h}from"./Provider-BEXAZWd9.js";import{o as j}from"./openAgent-Dbv5wfuL.js";import{n as v,i as u,c as d}from"./agent-state-DDhnFEEP.js";import{A as b}from"./AgentAvatar-Dn8TUv5W.js";import{t as g}from"./time-Dhsh_2EG.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./openContent-C6XO6kr5.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";function jt(){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{jt as HomeRight};
@@ -1,2 +1,2 @@
1
- import{r as d,j as s}from"./index-EsrkGBcv.js";/* empty css */import{a as P}from"./api-DSqpVKC7.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-x3wFUjxj.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
1
+ import{r as d,j as s}from"./index-BFbLvCJn.js";/* empty css */import{a as P}from"./api-DSqpVKC7.js";import{u as U,a as $,b as M,c as H,r as X,w as V,f as o,d as Y,e as _,t as z,g as Q,h as Z,i as ss,s as es}from"./ui-LM8pS8qE.js";import{B as as,u as ns}from"./selection-bridge-CthAuPRw.js";function ts(n){return n.error!=null?{label:"SCAN ERR",cls:"err"}:n.status.conflicts>0?{label:"CONFLICT",cls:"conflict"}:n.status.clean?{label:"CLEAN",cls:"clean"}:{label:"DIRTY",cls:"dirty"}}function cs(n){const t=(n.state??"").toLowerCase();return t==="active"?"ACTIVE":t==="idle"?"IDLE":t==="waiting"?"WAITING":"—"}function ls(n){const t=n.lastIndexOf("/");return t<0?{dir:"",file:n}:{dir:n.slice(0,t+1),file:n.slice(t+1)}}function is(n){return n.status.clean?"clean":`staged ${n.status.staged}, unstaged ${n.status.unstaged}, untracked ${n.status.untracked}, conflicts ${n.status.conflicts}, changed files ${n.status.changedFiles}`}function rs(n,t,u){const l=["Operator request:",n,"","Repo Watch context:",`- Project: ${u.name}`,`- Project root: ${u.root}`,`- Project attention: ${u.attention}`,`- Worktree: ${t.path}`,`- Branch: ${t.branch.name??t.branch.head??"detached"}`];t.branch.upstream&&l.push(`- Upstream: ${t.branch.upstream}`),l.push(`- Drift: ahead ${t.branch.ahead}, behind ${t.branch.behind}`,`- Status: ${is(t)}`);const p=M(t),i=H(t);if(p.has&&l.push(`- Branch churn: +${p.add} -${p.del}`),i.has&&l.push(`- Working-tree churn: +${i.add} -${i.del}`),t.attentionReasons.length>0&&l.push(`- Attention reasons: ${t.attentionReasons.join("; ")}`),t.status.files.length>0){const T=t.status.files.slice(0,8).map(h=>`${h.status}: ${h.path}`).join(", ");l.push(`- Changed files: ${T}`)}return l.join(`
2
2
  `)}function ds({worktree:n,project:t,generatedAt:u}){const[l,p]=d.useState(""),[i,T]=d.useState("scout"),[h,k]=d.useState(!1),[R,g]=d.useState(null),[O,A]=d.useState(null),[B,K]=d.useState(!1),x=d.useMemo(()=>n?U(n):[],[n]),E=d.useMemo(()=>x.slice(0,8),[x]),I=d.useMemo(()=>{if(i==="scout")return"Scout";const e=i.replace(/^agent:/,""),c=E.find(m=>m.id===e);return c?$(c):"Agent"},[E,i]);async function w(){const e=l.trim();if(!(!e||h||!n||!t)){k(!0),g(null),A(null);try{const c=rs(e,n,t);if(i==="scout")await P("/api/send",{method:"POST",body:JSON.stringify({body:c})}),g("Sent to Scout");else{const m=i.replace(/^agent:/,"");await P("/api/ask",{method:"POST",body:JSON.stringify({body:c,targetAgentId:m,targetLabel:m,metadata:{source:"repo-watch",originSurface:"repo-watch",handoffKind:"repo-watch-agent-ask",targetAgentId:m}})}),g(`Sent to ${I}`)}p("")}catch(c){A(c instanceof Error?c.message:String(c))}finally{k(!1)}}}if(!n||!t)return s.jsx("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:s.jsxs("div",{className:"rw-ctx-empty",children:[s.jsx("span",{className:"eb",children:"CONTEXT · WORKTREE"}),s.jsx("span",{className:"msg",children:"Select a worktree to inspect"})]})});const a=n,r=a.branch,N=5,f=x.length+a.sessions.length,b=!B&&f>N,y=b?x.slice(0,N):x,D=b?a.sessions.slice(0,Math.max(0,N-y.length)):a.sessions,q=f-y.length-D.length,L=ts(a),j=M(a),v=H(a),{add:S,del:C,has:G}=X(a),W=S+C||1,F=[{label:"staged",n:a.status.staged},{label:"unstaged",n:a.status.unstaged},{label:"untracked",n:a.status.untracked},{label:"conflicts",n:a.status.conflicts,cls:"conf"}].filter(e=>e.n>0);return s.jsxs("aside",{className:"rw-ctx","aria-label":"Worktree detail",children:[s.jsxs("div",{className:"ctx-h",children:[s.jsx("div",{className:"ctx-eyebrow",children:s.jsx("span",{children:"CONTEXT · WORKTREE"})}),s.jsxs("div",{className:"ctx-repo",children:[s.jsx("span",{className:"dot "+V(a)}),s.jsx("span",{className:"rn",children:t.name}),s.jsx("span",{className:"ctx-state "+L.cls,children:L.label})]}),s.jsx("div",{className:"ctx-branch",children:s.jsx(as,{branch:r,fallback:a.name})}),s.jsxs("div",{className:"ctx-path",children:[a.path,r.upstream?s.jsxs("span",{className:"ref",children:[" · ",r.upstream]}):null]})]}),s.jsxs("div",{className:"ctx-stats",children:[s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.ahead>0?" mint":" dim"),children:["↑",r.ahead]}),s.jsx("div",{className:"k",children:"AHEAD"})]}),s.jsxs("div",{children:[s.jsxs("div",{className:"v"+(r.behind>0?" amber":" dim"),children:["↓",r.behind]}),s.jsx("div",{className:"k",children:"BEHIND"})]}),s.jsxs("div",{children:[s.jsx("div",{className:"v"+(a.status.changedFiles>0?"":" dim"),children:a.status.changedFiles}),s.jsx("div",{className:"k",children:"FILES"})]})]}),F.length>0?s.jsx("div",{className:"ctx-breakdown",children:F.map(e=>s.jsxs("span",{className:"ctx-chip"+(e.cls?" "+e.cls:""),children:[s.jsx("span",{className:"n",children:e.n}),e.label]},e.label))}):null,s.jsxs("div",{className:"ctx-body",children:[a.attentionReasons.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTENTION"}),s.jsx("span",{className:"n",children:a.attentionReasons.length})]}),s.jsx("div",{className:"ctx-why",children:a.attentionReasons.map((e,c)=>s.jsx("span",{className:"pill",children:e},c))})]}):null,a.error?s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"SCAN ERROR"})}),s.jsx("div",{className:"ctx-err",children:a.error})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"CHURN"}),s.jsx("span",{className:"n",children:j.has?"reviewable":"working tree"})]}),G?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"ctx-churn",children:[s.jsxs("span",{className:"nums",children:[s.jsxs("span",{className:"add",children:["+",o(S)]}),s.jsx("span",{className:"sl",children:"/"}),s.jsxs("span",{className:"del",children:["−",o(C)]})]}),s.jsxs("span",{className:"cbar",title:`+${o(S)} −${o(C)}`,children:[s.jsx("span",{className:"g",style:{width:S/W*100+"%"}}),s.jsx("span",{className:"r",style:{width:C/W*100+"%"}})]})]}),s.jsxs("span",{className:"ctx-churn-clean",children:[j.has?`branch +${o(j.add)} −${o(j.del)}`:null,j.has&&v.has?" · ":null,v.has?`working tree +${o(v.add)} −${o(v.del)}`:null]})]}):s.jsx("div",{className:"ctx-churn-clean",children:a.status.clean?"working tree clean":"no line changes"})]}),a.status.files.length>0?s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"FILES CHANGED"}),s.jsx("span",{className:"n",children:a.status.files.length})]}),a.status.files.map(e=>{const c=Y(e.status),{dir:m,file:J}=ls(e.path);return s.jsxs("div",{className:"ctx-fchg",children:[s.jsx("span",{className:"badge",style:{color:Q(c),background:z(c)},title:e.status,children:_(e.status)}),s.jsxs("span",{className:"fp",title:e.path,children:[s.jsx("span",{className:"dir",children:m}),J]})]},e.path)})]}):null,s.jsxs("div",{className:"ctx-sec",children:[s.jsx("div",{className:"ctx-sec-h",children:s.jsx("span",{children:"LAST COMMIT"})}),s.jsx("div",{className:"ctx-commit",children:a.lastCommitAt!=null||r.head?s.jsxs(s.Fragment,{children:[r.head?s.jsx("span",{className:"hash",children:r.head.slice(0,7)}):null,s.jsxs("span",{className:"t",children:[Z(a.lastCommitAt,u)," ago"]})]}):s.jsx("span",{className:"none",children:"no commit data"})})]}),s.jsxs("div",{className:"ctx-sec",children:[s.jsxs("div",{className:"ctx-sec-h",children:[s.jsx("span",{children:"ATTACHED SESSIONS"}),s.jsxs("span",{className:"n",children:[x.length," handle",x.length===1?"":"s",a.sessions.length>0?` · ${a.sessions.length} session${a.sessions.length===1?"":"s"}`:""]})]}),f>0?s.jsxs(s.Fragment,{children:[y.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d "+(ss(e)?"on":"off")}),s.jsx("span",{className:"h",children:$(e)}),s.jsx("span",{className:"role",children:cs(e)})]},$(e))),D.map(e=>s.jsxs("div",{className:"ctx-agent",children:[s.jsx("span",{className:"d off"}),s.jsx("span",{className:"h",children:es(e)}),s.jsx("span",{className:"role",children:"SESSION"})]},e.id)),f>N?s.jsx("button",{type:"button",className:"ctx-more",onClick:()=>K(e=>!e),"aria-expanded":!b,children:b?`+${q} more`:"Show less"}):null]}):s.jsx("div",{className:"ctx-none",children:"no attached sessions"})]})]}),s.jsxs("div",{className:"ctx-ask",children:[s.jsx("textarea",{value:l,onChange:e=>{p(e.currentTarget.value),g(null),A(null)},onKeyDown:e=>{e.stopPropagation(),(e.metaKey||e.ctrlKey)&&e.key==="Enter"&&(e.preventDefault(),w())},disabled:h,rows:3,placeholder:i==="scout"?"Message Scout about this worktree":"Message this agent about the worktree"}),s.jsxs("div",{className:"ctx-ask-bar",children:[s.jsxs("select",{value:i,onChange:e=>T(e.currentTarget.value),onKeyDown:e=>e.stopPropagation(),disabled:h,"aria-label":"Message target",children:[s.jsx("option",{value:"scout",children:"Scout"}),E.map(e=>s.jsx("option",{value:`agent:${e.id}`,children:$(e)},e.id))]}),s.jsx("button",{className:"ctx-btn primary",type:"button",disabled:h||l.trim().length===0,onClick:()=>{w()},children:h?"Sending":"Send"})]}),s.jsxs("div",{className:"ctx-ask-foot",children:[O?s.jsx("span",{className:"err",children:O}):R?s.jsx("span",{className:"ok",children:R}):s.jsxs("span",{children:["Repo Watch context included · ",I]}),s.jsx("button",{type:"button",title:"Copy worktree path",onClick:()=>{navigator.clipboard?.writeText(a.path)},children:"Copy path"})]})]})]})}function ps(){const{worktree:n,project:t,generatedAt:u,tone:l}=ns();return s.jsx("div",{className:"rw-scope rw-ctx-rail-scope tone-"+l,children:s.jsx(ds,{worktree:n,project:t,generatedAt:u})})}export{ps as ReposInspector,ps as default};
@@ -0,0 +1 @@
1
+ import{j as e,r as i}from"./index-BFbLvCJn.js";import{u as w}from"./Provider-BEXAZWd9.js";import{a as C}from"./api-DSqpVKC7.js";import{u as B}from"./sse-BVxO0zNp.js";import{t as g}from"./time-Dhsh_2EG.js";import{B as E,b as M}from"./BrokerScreen-CqKsBwEx.js";import{b as S}from"./broker-display-BkBzyvbR.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./index-BWHgHrtv.js";import"./EmptyState-DLiLgtPK.js";import"./clipboard-e3fSpeo7.js";import"./status-tone-BM_zuRy1.js";import"./openContent-C6XO6kr5.js";import"./BrokerMetadataPanel-glRVdwkU.js";import"./DispatchAftermath-CoAYaL3B.js";import"./follow-route-BvcGtBIL.js";import"./arrow-up-right-DUW1A1Hb.js";import"./ShikiPane-CDiIT_qn.js";import"./types-B0PlfpKc.js";import"./useEmbedHeadline-BeeBDb7E.js";/* empty css */import"./refresh-cw-BcqctLqo.js";import"./arrow-down--OUDFWIq.js";import"./external-link-Df1R34rX.js";import"./message-square-BwqBIfv5.js";import"./paperclip-DLf_ABSv.js";import"./plus-B0hdY0fF.js";import"./send-horizontal-_Tf_It04.js";import"./check-BM6QtbB7.js";import"./copy-C1XrY27_.js";import"./radio-Bjqmv997.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 Ye({selectedAttempt:r,navigate:t,onClose:o}){return r?e.jsx(E,{attempt:r,navigate:t,onClose:o}):e.jsx(L,{})}export{Ye as BrokerRight};
@@ -0,0 +1 @@
1
+ import{r as i,j as e}from"./index-BFbLvCJn.js";import{u as xt}from"./Provider-BEXAZWd9.js";import{o as pe}from"./openContent-C6XO6kr5.js";import{a as W}from"./api-DSqpVKC7.js";import{u as ft}from"./sse-BVxO0zNp.js";import{u as jt}from"./tail-events-C6NWFB1N.js";import{n as gt,a as Nt,c as Ue}from"./agent-state-DDhnFEEP.js";import{s as Oe}from"./colors-CFlbwC25.js";import{A as It}from"./AgentLiveActions-CkRGkv13.js";import{i as yt,a as wt,c as St}from"./message-visibility-DwxgcgYK.js";import{d as bt,b as Tt,e as kt,g as Ct,m as At,c as Ve,s as Rt,a as Lt}from"./conversation-model-FxDeWlle.js";import{c as Et,e as Pt,t as F,f as he}from"./time-Dhsh_2EG.js";import{b as $t}from"./conversations-DoAAO6kA.js";import{b as Mt}from"./router-CJIx83Ia.js";import{T as _t}from"./TmuxPeek-Ctw5yYO5.js";import{S as Bt}from"./scroll-text-CA0QxBHu.js";import"./theme-vars-DNK0nn3k.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./index-BWHgHrtv.js";import"./terminal-takeover-CXwdoZ5j.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";/* empty css */import"./refresh-cw-BcqctLqo.js";const Wt=20;function ve(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function xe(t){const n=t?.trim();return n?n.length>18?`${n.slice(0,8)}...${n.slice(-6)}`:n:null}function C(t){const n=new Set,a=[];for(const r of t){const m=r?.trim();if(!m)continue;const h=m.toLowerCase();n.has(h)||(n.add(h),a.push(m))}return a}function De(t,n){const a=t?.trim().replace(/[\\/]+$/,""),r=n.trim().replace(/[\\/]+$/,"");if(!a||!r)return!1;if(a===r)return!0;if(r.startsWith("~/")){const m=r.slice(1);if(a.endsWith(m)||a.includes(`${m}/`))return!0}if(a.startsWith("~/")){const m=a.slice(1);if(r.endsWith(m)||r.includes(`${m}/`))return!0}return a.startsWith(`${r}/`)||r.startsWith(`${a}/`)}function Ke(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a.includes(r)||r.includes(a)}function Je(t,n){const a=t?.trim().toLowerCase(),r=n.trim().toLowerCase();return!a||!r?!1:a===r}function Ft(t){const{activeSessionId:n,agent:a,sessionMeta:r}=t,m=C([n,a?.harnessSessionId]),h=C([a?.cwd,a?.projectRoot,r?.workspaceRoot]),c=C([a?.project,ve(a?.cwd),ve(a?.projectRoot),ve(r?.workspaceRoot)]).filter(U=>U.length>2),o=C([...m.slice(0,2),...c.slice(0,2)]).join("|");return{sessionIds:m,paths:h,projects:c,query:o}}function ge(t,n){return!!(n.sessionIds.some(a=>Ke(t.sessionId,a))||n.paths.some(a=>De(t.cwd,a))||n.projects.some(a=>Je(t.project,a)))}function zt(t,n){const a=n.filter(c=>ge(c,t)),r=C(a.filter(c=>t.sessionIds.some(o=>Ke(c.sessionId,o))).map(c=>c.sessionId));if(r[0])return r[0];const m=C(a.filter(c=>t.paths.some(o=>De(c.cwd,o))).map(c=>c.sessionId));if(m[0])return m[0];const h=C(a.filter(c=>t.projects.some(o=>Je(c.project,o))).map(c=>c.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 te(t,n){const a=new Map;for(const r of[...n,...t])a.set(r.id,r);return[...a.values()].sort((r,m)=>Et(r.ts,m.ts)).slice(0,Wt)}function Ut(t){return t==="tool-result"?"tool result":t}function Ot(t){const n=t.replace(/\s+/g," ").trim();return n.length<=180?n:`${n.slice(0,177)}...`}const Vt={direct:"Conversation",channel:"Conversation",group_direct:"Conversation",thread:"Thread"},Ht=1800,qt=4800,He=2,Dt=120,Kt=650,Jt=1800;function fe(t,n){try{return JSON.stringify(t)===JSON.stringify(n)?t:n}catch{return n}}function qe(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.split(/[\\/]/).filter(Boolean).at(-1)??n:null}function Qt(t){if(!t)return null;const n=t.replace(/[\\/]+$/,"");return n?n.replace(/^\/Users\/[^/]+(?=\/|$)/,"~"):null}function z(t){switch(t){case"queued":return"Queued";case"waking":return"Waking";case"waiting":return"Thinking";case"running":return"Working";case"completed":return"Completed";case"failed":return"Failed";case"cancelled":return"Cancelled";default:return t.replace(/_/g," ")}}function cn(){const{route:t,agents:n,navigate:a,apiConnection:r,reload:m}=xt(),h=Mt(t),c=t.view==="conversation"||t.view==="messages"?t.conversationId??null:null,[o,U]=i.useState(null),[S,Ne]=i.useState([]),[E,Ie]=i.useState(null),[Qe,O]=i.useState(!1),ye=i.useRef(c);ye.current=c;const V=i.useCallback(async()=>{if(!c){U(null),Ne([]),Ie(null),O(!0);return}try{const[s,l,f]=await Promise.all([W(`/api/session/${encodeURIComponent(c)}`).catch(()=>null),W(`/api/flights?conversationId=${encodeURIComponent(c)}&active=false`).catch(()=>[]),W(`/api/messages?conversationId=${encodeURIComponent(c)}&limit=8`).catch(()=>[])]);if(ye.current!==c)return;U(p=>fe(p,s)),Ne(p=>fe(p,l??[])),Ie(p=>fe(p,f?.filter(B=>!yt(B)).sort((B,vt)=>Pt(B.createdAt,vt.createdAt)).at(-1)??null)),O(!0)}catch{O(!0)}},[c]);i.useEffect(()=>{O(!1),V()},[V]);const j=o?.agentId??null,d=i.useMemo(()=>j?n.find(s=>s.id===j)??null:null,[n,j]),H=d?.id??null,q=bt(o),D=Tt(o),se=kt({resolvedAgentId:H,sessionId:q,machineId:h}),[we,Se]=i.useState(null),[P,ne]=i.useState([]),[b,ae]=i.useState([]),be=i.useRef([]),T=i.useRef(null),K=i.useRef(null),x=i.useRef([]),g=i.useRef(null),N=i.useRef(null),$=i.useRef(new Set),J=i.useCallback(()=>{T.current!==null&&(window.clearTimeout(T.current),T.current=null),K.current=null},[]),M=i.useCallback(()=>{if(!c)return;const s=Date.now(),l=K.current??s;K.current=l;const p=s-l>=qt?0:Ht;T.current!==null&&window.clearTimeout(T.current),T.current=window.setTimeout(()=>{T.current=null,K.current=null,V()},p)},[c,V]);i.useEffect(()=>J,[J]),i.useEffect(()=>{if(Se(null),!H)return;let s=!1;return W(`/api/agents/${encodeURIComponent(H)}/session-catalog`).then(l=>{s||Se(l)}).catch(()=>{}),()=>{s=!0}},[H]);const Ye=Ct({name:d?.name,agentName:o?.agentName,id:j,title:o?.title}),Te=d?At(d)??Ve(d.id)??d.id:j?Ve(j)??j:null,u=i.useMemo(()=>S.filter($t).sort((s,l)=>(l.startedAt??0)-(s.startedAt??0))[0]??null,[S]),Ze=i.useMemo(()=>Rt(S),[S]);i.useEffect(()=>{$.current=new Set(S.map(s=>s.invocationId))},[S]),i.useEffect(()=>{J(),$.current.clear()},[J,c]),ft(s=>{if(c){if(s.kind==="message.posted"){s.payload?.message?.conversationId===c&&M();return}if(s.kind==="conversation.upserted"){s.payload?.conversation?.id===c&&M();return}if(s.kind==="invocation.requested"){const l=s.payload?.invocation;if(l?.conversationId===c){$.current.add(l.id),M();return}!l?.conversationId&&j&&l?.targetAgentId===j&&($.current.add(l.id),M());return}if(s.kind==="flight.updated"){const l=s.payload?.flight;if(!l)return;(u?.id===l.id||u?.invocationId===l.invocationId||$.current.has(l.invocationId)||S.some(p=>p.id===l.id||p.invocationId===l.invocationId))&&M()}}});const v=q??we?.activeSessionId??d?.harnessSessionId??o?.harnessSessionId??null,w=d?.harnessSessionId??o?.harnessSessionId??null,A=d?.harnessLogPath??null,I=i.useMemo(()=>Ft({activeSessionId:v,agent:d,sessionMeta:o}),[v,d,o]),ie=JSON.stringify({sessionIds:I.sessionIds,paths:I.paths,projects:I.projects}),_=I.sessionIds.length>0||I.paths.length>0||I.projects.length>0,Q=i.useCallback(()=>{g.current!==null&&(window.clearTimeout(g.current),g.current=null),N.current!==null&&(window.clearInterval(N.current),N.current=null),x.current=[]},[]),Y=i.useCallback(()=>{Q()},[Q]),ke=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,He);x.current=x.current.slice(He),f.length>0&&ae(p=>te(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,Dt))},[]),Ce=i.useCallback(s=>{N.current===null&&g.current===null&&(g.current=window.setTimeout(()=>{g.current=null,ke()},s))},[ke]);i.useEffect(()=>{be.current=b},[b]),i.useEffect(()=>Q,[Q]),i.useEffect(()=>{Y(),ne([]),ae([])},[Y,ie]),i.useEffect(()=>{if(!_)return;let s=!1;const l=new URLSearchParams({limit:"180",transcripts:"true"});return W(`/api/tail/recent?${l.toString()}`).then(f=>{if(s)return;const p=(f.events??[]).filter(B=>ge(B,I));ne(te([],p))}).catch(()=>{}),()=>{s=!0}},[_,ie]),jt(i.useCallback(s=>{_&&ge(s,I)&&ne(l=>te(l,[s]))},[_,ie])),i.useEffect(()=>{if(P.length===0){Y(),ae([]);return}const s=be.current,l=new Set([...s.map(p=>p.id),...x.current.map(p=>p.id)]),f=P.filter(p=>!l.has(p.id));f.length!==0&&(x.current=te(x.current,f),x.current.length>0&&Ce(s.length===0?Kt:Jt))},[Ce,Y,P]);const ce=i.useMemo(()=>b.flatMap(Xt).slice(0,5),[b]);if(!c)return e.jsx(Yt,{apiOffline:r.status==="offline",onRetry:()=>{m()}});if(!Qe)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 Xe=o?.kind?Vt[o.kind]??o.kind:"Conversation",Ge=D?o?.participants?.find(s=>s.sessionId===D||s.kind==="session"&&s.actorId===D)??null:null,et=!q||d?.harnessSessionId===q,Z=o?.workspaceRoot?.trim()||Ge?.workspaceRoot?.trim()||et&&(d?.projectRoot?.trim()||d?.cwd?.trim())||null||null,re=qe(Z),X=Qt(Z),Ae=o?.currentBranch??null,le=d?.harness??o?.harness??null,G=o?.lastMessageAt??E?.createdAt??null,Re=o?.messageCount??null,Le=o?o.participantCount??o.participantIds.filter(s=>s!=="operator").length+1:null,R=d?.state??null,tt=gt(R),st=E?wt(E):null,Ee=E?.body?.trim()||o?.preview?.trim()||null,Pe=Ee?St(Ee):null,$e=st?null:E?.actorName??null,Me=xe(v),y=D??v??w,oe=xe(y),nt=xe(w),_e=!!(w&&w!==y),Be=[le,d?.transport].filter(Boolean).join(" · "),at=!!(v||w||A),k=!!(d?.terminalSurface?.backend==="tmux"||d?.transport==="tmux"&&d.harnessSessionId),L=!!(u||Nt(R,d)),de=u??Ze,it=de?z(de.state):L?"In motion":"At rest",ct=de?.summary?.trim()??(G?`Last update ${F(G)??"recently"}`:"No recent activity recorded"),ue=[Ae?`branch ${Ae}`:null,le,d?.transport].filter(Boolean),rt=!!(re||X||ue.length>0),lt=L?"Live activity":k?"Terminal":"Activity",me=u?.summary?.trim()??(v&&!k?"Session linked.":b.length>0&&!k?"Streaming matching Tail events.":null),ee=zt(I,P),ot=!!(d&&(u||v||P.length>0||k)),dt=!k,ut=v?k?"Terminal session":"Trace session":u?"Session starting":"Session context",mt=v?oe??v:u?z(u.state):"Waiting for a session id",We=v?[le,d?.transport,u?z(u.state):null].filter(Boolean).join(" · "):u?.summary?.trim()??me??null,Fe=Lt({sessionId:y,machineId:h}),ze=Fe?()=>{pe(a,Fe,{returnTo:t})}:void 0,pt=()=>{se&&pe(a,se,{returnTo:t})},ht=()=>{pe(a,{view:"ops",mode:"tail",...ee?{tailQuery:ee}:{}},{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:Xe}),e.jsxs("div",{className:"ctx-panel-conversation-card",children:[e.jsx("div",{className:"ctx-panel-conversation-title",children:Ye}),Te&&e.jsxs("div",{className:"ctx-panel-conversation-handle",children:["@",Te]}),e.jsxs("div",{className:"ctx-panel-conversation-state",children:[e.jsx("span",{className:"ctx-panel-conversation-state-dot",style:{background:Oe(R)}}),e.jsx("span",{children:Ue(R)})]})]})]}),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:F(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"}),rt?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:Z??re??void 0,children:re??"Unscoped workspace"})]}),X&&e.jsx("div",{className:"ctx-panel-workspace-path",title:Z??X,children:X}),ue.length>0&&e.jsx("div",{className:"ctx-panel-workspace-strip",children:ue.map(s=>e.jsx("span",{className:"ctx-panel-workspace-chip",children:s},s))})]}):e.jsx("div",{className:"ctx-panel-empty",children:"No workspace metadata yet"})]}),at&&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:[Be&&e.jsx("div",{className:"ctx-panel-session-kind",children:Be}),y&&(ze?e.jsxs("button",{type:"button",className:"btn btn--ghost ctx-panel-session-id ctx-panel-session-id--button","aria-label":`Open session ${y}`,title:y,onClick:ze,children:[e.jsx("span",{children:oe??y}),e.jsx("span",{className:"ctx-panel-session-id-action",children:"Open session"})]}):e.jsx("div",{className:"ctx-panel-session-id",title:y,children:oe??y}))]})}),(_e||A)&&e.jsxs("div",{className:"ctx-panel-session-meta",children:[_e&&w&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness session"}),e.jsx("strong",{title:w,children:nt??w})]}),A&&e.jsxs("div",{className:"ctx-panel-session-meta-item",children:[e.jsx("span",{children:"Harness log"}),e.jsx("strong",{title:A,children:qe(A)??A})]})]})]})]}),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${L?" 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:L?"var(--green)":Oe(R)}}),e.jsxs("div",{className:"ctx-panel-activity-main",children:[e.jsx("div",{className:"ctx-panel-activity-title",children:it}),e.jsx("div",{className:"ctx-panel-activity-sub",title:G?he(G):void 0,children:ct})]})]}),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:he(u.startedAt),children:F(u.startedAt)})]}),e.jsxs("div",{className:"ctx-panel-activity-facts",children:[typeof Re=="number"&&e.jsx(je,{label:"Messages",value:`${Re}`}),typeof Le=="number"&&e.jsx(je,{label:"People",value:`${Le}`}),tt&&e.jsx(je,{label:"Agent",value:Ue(R)})]})]})]}),Pe&&e.jsxs("section",{className:"ctx-panel-section ctx-panel-conversation-preview",children:[e.jsx("div",{className:"ctx-panel-section-label",children:$e?`Latest · ${$e}`:"Latest"}),e.jsx("div",{className:"ctx-panel-conversation-preview-body",children:Pe})]}),ot&&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:lt}),Me&&e.jsx("span",{className:"ctx-panel-live-session",title:v??void 0,children:Me})]}),e.jsxs("div",{className:`ctx-panel-live-card${L?" ctx-panel-live-card--active":""}`,children:[e.jsxs("div",{className:`ctx-panel-live-session-card${L?" ctx-panel-live-session-card--active":""}`,children:[e.jsxs("div",{className:"ctx-panel-live-session-copy",children:[e.jsx("span",{children:ut}),e.jsx("strong",{title:v??void 0,children:mt}),We&&e.jsx("small",{children:We})]}),e.jsx("div",{className:"ctx-panel-live-session-pulse","aria-hidden":"true",children:e.jsx("span",{})})]}),e.jsx(It,{agent:d,catalog:we,navigate:a,returnTo:t,variant:"compact",className:"ctx-panel-live-actions"}),me&&e.jsx("div",{className:"ctx-panel-live-summary",children:me}),k&&e.jsx(_t,{agentId:d.id,lines:24,columns:132,className:"ctx-panel-tmux-peek--conversation"}),ce.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:ce.length})]}),e.jsx("ol",{className:"ctx-panel-live-file-list",children:ce.map(s=>e.jsxs("li",{className:`ctx-panel-live-file ctx-panel-live-file--${s.tone}`,title:`${s.path} · ${s.verb}`,children:[e.jsx("span",{className:"ctx-panel-live-file-mark",children:s.mark}),e.jsx("span",{className:"ctx-panel-live-file-path",children:ss(s.path)}),e.jsx("span",{className:"ctx-panel-live-file-time",children:F(s.ts)})]},`${s.eventId}:${s.path}`))})]}),dt&&e.jsx("div",{className:"ctx-panel-live-stream","aria-live":"polite",children:b.length>0?e.jsx("ol",{className:"ctx-panel-live-events",children:b.map(s=>e.jsxs("li",{className:"ctx-panel-live-event",children:[e.jsx("span",{className:"ctx-panel-live-event-kind",children:Ut(s.kind)}),e.jsx("span",{className:"ctx-panel-live-event-summary",children:Ot(s.summary)}),e.jsx("span",{className:"ctx-panel-live-event-time",title:he(s.ts),children:F(s.ts)})]},s.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:ht,title:ee?`Tail filter: ${ee}`:"Open Tail",children:[e.jsx(Bt,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Tail"})]})]})]}),se&&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:pt,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 Yt({apiOffline:t,onRetry:n}){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:n,children:"Retry"})]})})})}function je({label:t,value:n}){return e.jsxs("div",{className:"ctx-panel-fact",children:[e.jsx("span",{className:"ctx-panel-fact-value",children:n}),e.jsx("span",{className:"ctx-panel-fact-label",children:t})]})}const Zt=/(?:["'`])?((?:~|\/|\.{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 Xt(t){const n=new Set,a=[],r=Gt(t.summary);for(const m of t.summary.matchAll(Zt)){const h=m[1]?.trim();if(!h)continue;const c=h.toLowerCase();n.has(c)||(n.add(c),a.push({eventId:t.id,path:h,verb:r,mark:ts(r),tone:es(r),ts:t.ts}))}return a}function Gt(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 es(t){return t==="changed"?"changed":t==="read"?"read":"touched"}function ts(t){return t==="changed"?"+":t==="read"?"r":"·"}function ss(t){const n=t.replace(/[\\/]+$/g,""),a=n.split(/[\\/]/).filter(Boolean);return a.length<=2?n:`${a.at(-2)}/${a.at(-1)}`}export{cn as ConversationInspector};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./index-BFbLvCJn.js";import{u as P}from"./Provider-BEXAZWd9.js";import{a as g}from"./api-DSqpVKC7.js";import{u as A}from"./sse-BVxO0zNp.js";import{t as b}from"./time-Dhsh_2EG.js";import{o as k}from"./openContent-C6XO6kr5.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.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 C(t){return t.workspaceRoot?f(t.workspaceRoot):t.agentName??"unassigned"}function L(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 i of t){const a=i.trim()||"unknown";r.set(a,(r.get(a)??0)+1)}return[...r.entries()].map(([i,a])=>({label:i,count:a})).sort((i,a)=>a.count-i.count||i.label.localeCompare(a.label)).slice(0,n)}function Me(){const{route:t,navigate:n}=P(),[r,i]=l.useState([]),[a,h]=l.useState(null),x=l.useCallback(async()=>{const[u,d]=await Promise.allSettled([g("/api/sessions"),g("/api/tail/discover")]);u.status==="fulfilled"&&i(u.value),d.status==="fulfilled"&&h(d.value)},[]);if(l.useEffect(()=>{x()},[x]),A(()=>{x()}),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(p,{label:"Name",value:s.agentName}),s.harness&&e.jsx(p,{label:"Harness",value:s.harness})]}),(s.currentBranch||s.workspaceRoot)&&e.jsxs(m,{label:"Workspace",children:[s.currentBranch&&e.jsx(p,{label:"Branch",value:s.currentBranch}),s.workspaceRoot&&e.jsx(p,{label:"Root",value:s.workspaceRoot})]}),e.jsxs(m,{label:"Activity",children:[e.jsx(p,{label:"Messages",value:`${s.messageCount}`}),s.lastMessageAt&&e.jsx(p,{label:"Last",value:b(s.lastMessageAt)}),(s.participantCount??s.participantIds.length)>0&&e.jsx(p,{label:"Participants",value:`${s.participantCount??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($,{sessions:r,discovery:a,navigate:n,route:t})}function $({sessions:t,discovery:n,navigate:r,route:i}){const a=n?.transcripts??[],h=l.useMemo(()=>y([...t.map(L),...a.map(o=>o.source||"unknown")],5),[t,a]),x=l.useMemo(()=>y([...t.map(C),...a.map(w)],5),[t,a]),s=l.useMemo(()=>a.slice().sort((o,c)=>c.mtimeMs-o.mtimeMs).slice(0,5),[a]),u=l.useMemo(()=>t.filter(o=>o.lastMessageAt).slice().sort((o,c)=>(c.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:x,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 c=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:()=>{c&&k(r,{view:"sessions",sessionId:c},{returnTo:i})},disabled:!c,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:c??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:i}),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 p({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{Me as SessionsInspector};
@@ -0,0 +1 @@
1
+ import{r as y,j as e}from"./index-BFbLvCJn.js";import{a as O}from"./api-DSqpVKC7.js";import{a as r,t as f}from"./time-Dhsh_2EG.js";import{u as M,j as R}from"./mesh-ops-9SzD3sPw.js";import{u as L}from"./mesh-view-store-CVqzYz4K.js";import{u as H}from"./Provider-BEXAZWd9.js";/* empty css */import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BVxO0zNp.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.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 Oe(){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{Oe as MeshOpsInspector};
@@ -0,0 +1 @@
1
+ import{r as u,j as e}from"./index-BFbLvCJn.js";import{u as j}from"./Provider-BEXAZWd9.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-DSqpVKC7.js";import{u as w}from"./sse-BVxO0zNp.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-DEDSNJNY.js";import{C as I}from"./chevron-right-B02kAw12.js";import{M as C}from"./message-square-BwqBIfv5.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-D-VB5vdt.js";import"./runtime-picker-IRcTkMZ5.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./createLucideIcon-CKbjXlwv.js";import"./media-blobs-Bi8pxr1u.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./keyboard-nav-CEe-ApvZ.js";import"./x-BcfhXYiF.js";import"./search-Bv2IONmc.js";import"./file-text-BOJQiS8p.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./TextDocumentSurface-DBslUq9k.js";import"./index-V8FYEUpD.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./index-BWHgHrtv.js";const M=5;function Me(){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{Me as WorkInspector};
@@ -0,0 +1 @@
1
+ import{j as t,r as h}from"./index-BFbLvCJn.js";import{u as V,a as he}from"./Provider-BEXAZWd9.js";import{o as Z}from"./openAgent-Dbv5wfuL.js";import{o as F}from"./openContent-C6XO6kr5.js";import{i as pe,c as ee,n as D}from"./agent-state-DDhnFEEP.js";import{s as te}from"./colors-CFlbwC25.js";import{t as O,c as se}from"./time-Dhsh_2EG.js";import{f as ne}from"./runtime-picker-IRcTkMZ5.js";import{a as R}from"./api-DSqpVKC7.js";import{u as L}from"./sse-BVxO0zNp.js";import{r as E}from"./terminal-relay-CpGHpDa8.js";import{q as oe}from"./terminal-takeover-CXwdoZ5j.js";import{r as fe,s as ve,a as be,b as je,c as ke}from"./session-catalog-Dx4tl3sx.js";import{p as re}from"./NewChatComposer-D-VB5vdt.js";import{p as ge,r as Ne,s as we}from"./SessionHopMenu-DX6PJPNk.js";import{A as ye}from"./AgentAvatar-Dn8TUv5W.js";import{A as Ce}from"./AgentLiveActions-CkRGkv13.js";import{T as H}from"./TmuxPeek-Ctw5yYO5.js";import"./theme-vars-DNK0nn3k.js";import"./router-CJIx83Ia.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-mxzPxQQW.js";import"./createLucideIcon-CKbjXlwv.js";import"./TextDocumentSurface-DBslUq9k.js";import"./file-text-BOJQiS8p.js";import"./x-BcfhXYiF.js";import"./index-V8FYEUpD.js";import"./chevron-right-B02kAw12.js";import"./folder-C2emmTHq.js";import"./chevron-up-CzveykKG.js";import"./code-xml-E9gBuiVs.js";import"./arrow-left-DNjQHf4C.js";import"./arrow-right-A_yyXwoH.js";import"./scout-voice-Cdh6pCsb.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-CEe-ApvZ.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DVhUsgOw.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CCG7hG7z.js";import"./index-BWHgHrtv.js";import"./index-CXzJ_hGx.js";import"./HarnessMark-CP-PWk2W.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-BYsEu9dZ.js";import"./chevron-down-DEDSNJNY.js";import"./search-Bv2IONmc.js";import"./external-link-Df1R34rX.js";import"./SpriteAvatar-D53GaaK3.js";import"./CrewAvatar-a_C_F9r_.js";import"./eye-CD-_aphP.js";import"./terminal-DMBAZjPP.js";/* empty css */import"./refresh-cw-BcqctLqo.js";const Se=new Intl.NumberFormat("en-US"),Ie=new Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1});function M(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?Se.format(e):Ie.format(e).toLowerCase()}function Ae(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),n=Math.floor(s%3600/60),i=s%60;return a>0?`${a}h ${n}m`:n>=10||i===0?`${n}m`:`${n}m ${i}s`}function Re(e){return e.replace(/\.local$/i,"").replace(/-local-openscout$/i,"")}function Y(e){const s=e?.trim();return s?s.toLowerCase()==="a2a"?"A2A":s:null}function X(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 ae(e){return!!(e.providerName||Y(e.protocol)||(e.skills?.length??0)>0)}async function $e(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 ie(e){$e(e).catch(s=>{console.warn("Failed to reveal local path",s)})}function Ht(){const{route:e,agents:s,navigate:a}=V();if(e.view==="agent-info")return t.jsx(Te,{conversationId:e.conversationId,agents:s,navigate:a,route:e});if(e.view==="agents-v2"){if(!e.agentId)return null;const n=s.find(i=>i.id===e.agentId)??null;return n?t.jsx(ce,{agent:n,agents:s,navigate:a,route:e,observeMode:e.tab==="observe",showStaticIdentity:!1}):null}return null}function Te({conversationId:e,agents:s,navigate:a,route:n}){const[i,m]=h.useState(null),[x,v]=h.useState(null),[p,f]=h.useState(!1),r=h.useCallback(async()=>{const o=await R(`/api/session/${encodeURIComponent(e)}`).catch(()=>null);m(o),f(!0)},[e]);h.useEffect(()=>{f(!1),r()},[r]),L(()=>{r()});const d=i?.agentId??null;h.useEffect(()=>{if(!d||s.some(c=>c.id===d)){v(null);return}let o=!1;return R(`/api/agents/${encodeURIComponent(d)}`).then(c=>{o||v(c)}).catch(()=>{o||v(null)}),()=>{o=!0}},[s,d]);const u=h.useMemo(()=>d?s.find(o=>o.id===d)??(x?.id===d?x:null):null,[x,s,d]);return p?u?t.jsx(ce,{agent:u,agents:s,navigate:a,route:n,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(C,{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 ce({agent:e,agents:s,navigate:a,route:n,observeMode:i,showStaticIdentity:m=!0}){const x=pe(e.state),[v,p]=h.useState(null),[f,r]=h.useState(null),[d,u]=h.useState(null),o=e.skills??[],c=Y(e.protocol),j=ae(e),S=h.useCallback(async()=>{const[g,ue,xe]=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)]);g&&p(g),r(ue),u(xe)},[e.id]);h.useEffect(()=>{S()},[S]),h.useEffect(()=>{r(null),u(null)},[e.id]),L(()=>{S()});const{focusedSession:l,focusSession:w}=V(),k=fe(e,f),y=h.useMemo(()=>ve(f?.sessions??[],k),[f?.sessions,k]),$=n.view==="agents-v2"&&n.agentId===e.id?n.sessionId:null,I=be(e.id,l,k,y,$),P=je($,y);h.useEffect(()=>{P&&(l?.agentId===e.id&&l.sessionId===P||w(e.id,P))},[e.id,l?.agentId,l?.sessionId,w,P]);const b=y.find(g=>g.id===I)??null,_=!!(b&&k&&b.id===k),z=d?.sessionId?.trim()||d?.data.metadata?.session?.externalSessionId?.trim()||d?.data.metadata?.session?.threadId?.trim()||null,T=b&&_&&z?z:b?.id??null,U=b&&T&&T!==b.id?b.id:null,W=b?ke(e,f,b,_):{canObserve:!1,canTakeover:!1},de=()=>F(a,{view:"terminal",agentId:e.id,mode:"observe"},{returnTo:n}),B=()=>F(a,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:n}),me=()=>{if(E(e)){B();return}const g=f?.resumeCommand;if(g){oe({command:g,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(ye,{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:"truncate text-md font-mono text-[var(--scout-chrome-ink-faint)]",title:e.handle,children:["@",e.handle.replace(/^@+/,"")]})]})]}),t.jsx(Ce,{agent:e,catalog:f,navigate:a,returnTo:n,variant:"compact"}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsxs(N,{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:ee(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(N,{label:"Presence",children:t.jsx(Fe,{focusAgent:e,agents:s,onOpenAgent:g=>Z(a,g,{returnTo:n})})}),i&&t.jsx(q,{agentId:e.id}),v&&t.jsx(Q,{asks:v.activeAsks,agentId:e.id,navigate:a}),t.jsxs(N,{label:"Identity",children:[e.providerName&&t.jsx(C,{label:"Provider",value:e.providerName}),c&&t.jsx(C,{label:"Protocol",value:c}),!j&&t.jsx(C,{label:"Class",value:e.agentClass}),!j&&e.role&&t.jsx(C,{label:"Role",value:ne(e.role)??e.role}),!j&&e.harness&&t.jsx(C,{label:"Harness",value:e.harness}),!j&&e.transport&&t.jsx(C,{label:"Transport",value:X(e.transport)??e.transport}),(e.homeNodeName||e.homeNodeId)&&t.jsx(C,{label:"Host",value:Re(e.homeNodeName??e.homeNodeId??"")})]}),o.length>0&&t.jsx(N,{label:`Skills · ${o.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:o.map(g=>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:g},g))})}),(e.project||e.branch||e.cwd)&&t.jsxs(N,{label:"Project",children:[e.project&&t.jsx(C,{label:"Name",value:e.project}),e.branch&&t.jsx(C,{label:"Branch",value:e.branch}),e.cwd&&t.jsx(C,{label:"Cwd",value:e.cwd})]}),e.capabilities.length>0&&t.jsx(N,{label:`Capabilities · ${e.capabilities.length}`,children:t.jsx("div",{className:"flex flex-wrap gap-1",children:e.capabilities.map(g=>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:g},g))})}),t.jsx(Oe,{agent:e,catalog:f,navigate:a,returnTo:n})]}):t.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar p-4 gap-4 text-sm",children:[b&&t.jsxs(N,{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:le(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(Pe,{label:"Terminal",children:[t.jsx(G,{onClick:de,disabled:!W.canObserve,title:W.canObserve?"Watch the live terminal, read-only":"No live terminal to observe",children:"Observe"}),t.jsx(G,{onClick:me,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(We,{agentId:e.id,navigate:a,cwd:b.cwd??e.cwd,route:n}),E(e)?.backend==="tmux"&&t.jsx(H,{agentId:e.id,lines:44,columns:132}),t.jsx(N,{label:"Runtime",children:t.jsx(Me,{agent:e})}),i&&t.jsx(q,{agentId:e.id}),v&&t.jsx(Q,{asks:v.activeAsks,agentId:e.id,navigate:a})]})}function Me({agent:e}){const s=[],a=(m,x)=>{x&&x.trim()&&s.push({label:m,value:x.trim()})},n=Y(e.protocol);return ae(e)?a("Protocol",n):(a("Role",ne(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 Pe({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 G({onClick:e,disabled:s,title:a,children:n}){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:n})}function Oe({agent:e,catalog:s,navigate:a,returnTo:n}){const i=he(),m=E(e),x=s?.activeSessionId??(m?e.harnessSessionId??m.sessionName:null),p=h.useMemo(()=>Ee(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 r=c=>F(a,{view:"terminal",agentId:e.id,mode:c},{returnTo:n}),d=()=>{if(m){r("takeover");return}s?.resumeCommand&&oe({command:s.resumeCommand,cwd:s.resumeCwd,agentId:e.id}).then(()=>r("takeover"))},u=c=>F(a,{view:"sessions",sessionId:c},{returnTo:n}),o=(c,j,S)=>{const l=[];j&&l.push({kind:"action",label:"Observe in terminal",onSelect:()=>r("observe")}),S&&l.push({kind:"action",label:"Takeover terminal",onSelect:d});const w=ge(),k=w?Ne(w,{agentId:e.id,sessionRefs:[c.id,e.harnessSessionId]}):null,y=we({target:k,agentId:e.id,navigate:a,returnTo:n,includeWeb:!1,emptyFallback:!1});return y.length>0&&l.push({kind:"separator"},...y),l.length>0&&l.push({kind:"separator"}),l.push({kind:"action",label:"Open session detail",onSelect:()=>u(c.id)}),l.push({kind:"action",label:"Open agent profile",onSelect:()=>Z(a,e,{returnTo:n})}),l};return t.jsx(N,{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,S=j&&!!m,l=j&&(!!m||!!s?.resumeCommand),w=O(c.startedAt)||"recent",k=X(c.transport)??c.harness??X(e.transport)??e.harness??"session",y=j?w:c.endedAt?`${O(c.endedAt)||w} ended`:k,$=o(c,S,l);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:S?`Observe terminal ${c.id}`:`Open session ${c.id}`,onClick:()=>S?r("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:le(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:k})]}),t.jsx("span",{className:"mt-0.5 truncate font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:c.cwd?re(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:y})]})]}),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 Ee(e,s,a){const n=[...s?.sessions??[]],i=E(e);return i&&a&&!n.some(m=>m.id===a)&&n.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}),n.sort((m,x)=>{const v=m.endedAt??m.startedAt,p=x.endedAt??x.startedAt;return se(v,p)})}function le(e){const s=e.replace(/^session[_:-]?/i,"");return s.length>10?s.slice(0,8):s}function q({agentId:e}){const[s,a]=h.useState(null),n=h.useCallback(async()=>{const i=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);a(i)},[e]);return h.useEffect(()=>{n()},[n]),L(()=>{n()}),s?.data?t.jsx(_e,{agentId:e,data:s.data,sessionId:s.sessionId}):t.jsx(N,{label:"Trace",children:t.jsx("div",{className:"text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",children:"Resolving session trace."})})}function _e({agentId:e,data:s,sessionId:a}){const n=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,r=i.filter(o=>o.kind==="tool"&&(o.tool==="edit"||o.tool==="write")).length,d=i.length>0?i[i.length-1].t:0,u=n?.threadPath;return t.jsxs(t.Fragment,{children:[t.jsxs(N,{label:"Session",children:[a&&t.jsx(C,{label:"Active",value:a}),u&&t.jsx(K,{label:"Source",path:u,basePath:n?.cwd??null,value:re(u),agentId:e,sessionId:a}),n?.cwd&&t.jsx(K,{label:"Workspace",path:n.cwd,value:n.cwd,agentId:e,sessionId:a})]}),t.jsx(N,{label:"Trace stats",children:t.jsxs("div",{className:"grid grid-cols-2 gap-1.5",children:[t.jsx(A,{label:"Turns",value:M(n?.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(r)}),t.jsx(A,{label:"Files",value:M(m.length)}),t.jsx(A,{label:"Window",value:Ae(d)})]})}),m.length>0&&t.jsx(N,{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:()=>ie({path:o.path,basePath:n?.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 J(e,s){return e?.view==="agents-v2"?{...e,view:"agents-v2",agentId:s,tab:"observe"}:{view:"agents-v2",agentId:s,tab:"observe"}}function We({agentId:e,navigate:s,cwd:a,route:n}){const[i,m]=h.useState(null),x=h.useCallback(async()=>{const l=await R(`/api/agents/${encodeURIComponent(e)}/observe`).catch(()=>null);m(l)},[e]);h.useEffect(()=>{x()},[x]),L(()=>{x()});const v=i?.data;if(!v||v.files.length===0)return null;const p=v.files,r=[...p].sort((l,w)=>{const k=l.state==="read"?0:1,y=w.state==="read"?0:1;return k!==y?y-k:w.touches-l.touches}).slice(0,6),d=p.length-r.length,u=p.filter(l=>l.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}:{}}:J(n,e)),S=()=>s(o?{view:"repo-diff",path:o}:J(n,e));return t.jsxs(N,{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:[r.map(l=>{const w=l.path.replace(/\/+$/,"").split("/"),k=w.pop()??l.path,y=w.pop(),$=y?`${y}/`:"",I=l.state!=="read",P=l.state==="created"?"+":l.state==="modified"?"~":"·";return t.jsxs("div",{className:"flex items-baseline justify-between gap-2 font-mono text-xs leading-tight",title:`${l.path} · ${l.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:k})]})]}),t.jsxs("span",{className:"shrink-0 tabular-nums text-2xs text-[var(--scout-chrome-ink-faint)]",children:["×",l.touches]})]},l.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",d>0?` · +${d}`:""," →"]}),t.jsx("button",{type:"button",onClick:S,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 K({label:e,path:s,basePath:a,value:n,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:()=>ie({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:n})]})}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 Fe({focusAgent:e,agents:s,onOpenAgent:a}){const p=h.useMemo(()=>{const r=s.filter(u=>u.id!==e.id),d=u=>{const o=D(u);return o==="in_turn"?0:o==="in_flight"?1:2};return r.slice().sort((u,o)=>{const c=d(u.state??""),j=d(o.state??"");return c!==j?c-j:se(u.updatedAt,o.updatedAt)}).slice(0,8)},[s,e.id]),f=h.useMemo(()=>{const r=[{agent:e,x:120,y:90,focused:!0}];return p.forEach((d,u)=>{const o=2*Math.PI*u/Math.max(p.length,1)-Math.PI/2;r.push({agent:d,x:120+68*Math.cos(o),y:90+68*Math.sin(o),focused:!1})}),r},[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((r,d)=>t.jsxs("g",{children:[t.jsx("line",{x1:120,y1:90,x2:r.x,y2:r.y,stroke:"var(--accent)",strokeWidth:1,opacity:.6}),t.jsx("circle",{r:2,fill:"var(--accent)",children:t.jsx("animateMotion",{dur:`${2+d*.3}s`,repeatCount:"indefinite",path:`M 120,90 L ${r.x},${r.y}`})})]},`e-${r.agent.id}`)),f.map(r=>{const d=D(r.agent.state),u=d==="in_turn"||d==="in_flight"||d==="callable",o=r.focused?14:9;return t.jsxs("g",{style:{cursor:"pointer"},onClick:()=>a(r.agent),children:[u&&t.jsxs("circle",{cx:r.x,cy:r.y,r:o+5,fill:"none",stroke:"var(--accent)",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:r.x,cy:r.y,r:o,fill:"var(--hud-surface)",stroke:r.focused?"var(--accent)":"var(--surface)",strokeWidth:r.focused?1.5:1}),t.jsx("text",{x:r.x,y:r.y,dy:"0.35em",textAnchor:"middle",fontFamily:"var(--hud-font-sans)",fontSize:r.focused?10:8,fontWeight:600,fill:"var(--scout-chrome-ink-strong)",children:r.agent.name[0].toUpperCase()}),t.jsx("text",{x:r.x,y:r.y+o+10,textAnchor:"middle",fontFamily:"var(--hud-font-sans)",fontSize:8,fill:"var(--dim)",letterSpacing:"0.04em",children:r.agent.name.length>9?r.agent.name.slice(0,8)+"...":r.agent.name})]},r.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(r=>{const d=D(r.state);return t.jsx("li",{children:t.jsxs("button",{type:"button",onClick:()=>a(r),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:"var(--scout-chrome-ink-faint)"}}),t.jsx("span",{className:"flex-1 truncate text-md font-sans text-[var(--scout-chrome-ink)]",children:r.name}),t.jsx("span",{"aria-hidden":!0,title:ee(r.state),className:"shrink-0 w-1.5 h-1.5 rounded-full",style:{background:te(d)}})]})},r.id)})})]})}function Q({asks:e,agentId:s,navigate:a}){const n=e.filter(i=>i.agentId===s&&(i.status==="needs_attention"||i.status==="queued"));return n.length===0?null:t.jsx(N,{label:`Incoming requests · ${n.length}`,children:t.jsx("div",{className:"flex flex-col gap-2",children:n.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 N({label:e,children:s}){return t.jsxs("div",{className:"flex flex-col",children:[t.jsx("div",{className:"mb-1.5 text-md font-sans font-medium text-[var(--scout-chrome-ink-faint)]",children:e}),s]})}function C({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{Ht as AgentsInspector};