@openscout/scout 0.2.102 → 0.2.105

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 (505) hide show
  1. package/README.md +37 -0
  2. package/bin/scout.mjs +6 -0
  3. package/bin/scoutd +0 -0
  4. package/dist/build-manifest.json +4 -4
  5. package/dist/chat.mjs +285 -0
  6. package/dist/client/assets/ActivityScreen-CcDdQTBK.js +1 -0
  7. package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CHNJ4NnS.js} +1 -1
  8. package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-B4mEvXeD.js} +1 -1
  9. package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-ZsBDQITY.js} +1 -1
  10. package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-DSxDlqG1.js} +1 -1
  11. package/dist/client/assets/AgentAdventures-BxrYq_2v.js +1 -0
  12. package/dist/client/assets/{AgentAvatar-BIwg54Tj.js → AgentAvatar-NZOqcsB2.js} +1 -1
  13. package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +1 -0
  14. package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +1 -0
  15. package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-MIEBKw_S.js} +1 -1
  16. package/dist/client/assets/AgentFloorView-A0dDRlRV.js +1 -0
  17. package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-BTqwmK5G.js} +1 -1
  18. package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +1 -0
  19. package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-C4rKLLdT.js} +1 -1
  20. package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-fGC-ZrJS.js} +1 -1
  21. package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-BTF4_th9.js} +1 -1
  22. package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-DgSeA_vS.js} +1 -1
  23. package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +1 -0
  24. package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-CcS23wij.js} +1 -1
  25. package/dist/client/assets/{AgentLanesView-aAyC7lHf.js → AgentLanesView-WZhEDBFE.js} +1 -1
  26. package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-6Kfr1uOT.js} +1 -1
  27. package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +1 -0
  28. package/dist/client/assets/{AgentSessions-Cox2zS-e.js → AgentSessions-CO1WGa8Z.js} +2 -2
  29. package/dist/client/assets/AgentsConsole-BQOWkj35.js +1 -0
  30. package/dist/client/assets/AgentsScreen-BMNAj1PH.js +1 -0
  31. package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +1 -0
  32. package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-D67fIBdR.js} +1 -1
  33. package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-Ck30FbzG.js} +1 -1
  34. package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CkBhGRlD.js} +1 -1
  35. package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +1 -0
  36. package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-DTxYMr3a.js} +1 -1
  37. package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-crirZCdo.js} +1 -1
  38. package/dist/client/assets/BrokerScreen-CT37VQiL.js +8 -0
  39. package/dist/client/assets/Canvas-CRP0KjKb.js +1 -0
  40. package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-ZPomvOf-.js} +1 -1
  41. package/dist/client/assets/ChannelComposer-BVItWlEz.js +1 -0
  42. package/dist/client/assets/ChannelSidebar-B-2spawY.js +1 -0
  43. package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-ckVkecDO.js} +1 -1
  44. package/dist/client/assets/ChatAvatar-DKBsbOqk.js +1 -0
  45. package/dist/client/assets/ChatBits-CLJ71hTY.js +1 -0
  46. package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-Co0NmqOO.js} +1 -1
  47. package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +1 -0
  48. package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +1 -0
  49. package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +1 -0
  51. package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-D-iv28LJ.js} +1 -1
  52. package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-CZ3gDdiT.js} +1 -1
  53. package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-CSC-zbP9.js} +1 -1
  54. package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-DdNAwjGW.js} +1 -1
  55. package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-mGWY7Ivi.js} +1 -1
  56. package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-voDD9M5R.js} +1 -1
  57. package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-C33sgD48.js} +1 -1
  58. package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BL8aYD7z.js} +1 -1
  59. package/dist/client/assets/{ConversationComposer-B7RU6LKd.js → ConversationComposer-DNcn5U6D.js} +1 -1
  60. package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +1 -0
  61. package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +1 -0
  62. package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-6pprBpmq.js} +2 -2
  63. package/dist/client/assets/ConversationScreen-tpj4cqWs.js +2 -0
  64. package/dist/client/assets/{ConversationStatus-CK-YfLpi.js → ConversationStatus-Cv-7hErW.js} +1 -1
  65. package/dist/client/assets/{CrewAvatar-CJhuqTsJ.js → CrewAvatar-zgzC3cbU.js} +1 -1
  66. package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dp9KBBGY.js} +1 -1
  67. package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
  68. package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +1 -0
  69. package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-av71ehJV.js} +1 -1
  70. package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-CcYGUB10.js} +1 -1
  71. package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DlMiEALb.js} +1 -1
  72. package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-CTkO_tQR.js} +1 -1
  73. package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CYUwYyAW.js} +1 -1
  74. package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-Cxhixtks.js} +1 -1
  75. package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +1 -0
  76. package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-Vj_wVZq1.js} +1 -1
  77. package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-CjHSDXad.js} +1 -1
  78. package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-BG4ebnX5.js} +1 -1
  79. package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-BoYaGY9t.js} +1 -1
  80. package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +1 -0
  81. package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-jbtRs-YE.js} +1 -1
  82. package/dist/client/assets/{FloorTacticalHUD-Bngao6sn.js → FloorTacticalHUD-BhyOqlL5.js} +1 -1
  83. package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CupyOgt4.js} +1 -1
  84. package/dist/client/assets/HarnessMark-DSvM_H7H.js +1 -0
  85. package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +1 -0
  86. package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-Dcm3vf9U.js} +1 -1
  87. package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-pIZtE1cC.js} +1 -1
  88. package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-Dv5meXo2.js} +1 -1
  89. package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +1 -0
  90. package/dist/client/assets/InviteSheet--5Zjct25.js +1 -0
  91. package/dist/client/assets/JumpPalette-BmiSOEmp.js +1 -0
  92. package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-B8yiM524.js} +1 -1
  93. package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +1 -0
  94. package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-D2cnTeUd.js} +1 -1
  95. package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +1 -0
  96. package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-BLhVHwff.js} +1 -1
  97. package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-BR25OBTJ.js} +1 -1
  98. package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-ClVolr4-.js} +1 -1
  99. package/dist/client/assets/MeshScreen-BW1dMFWF.js +1 -0
  100. package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BT3ke2D1.js} +2 -2
  101. package/dist/client/assets/MessagesScreen-CtNMfIvC.js +1 -0
  102. package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-CafjuseK.js} +1 -1
  103. package/dist/client/assets/MissionControlView-BjPOViGY.js +1 -0
  104. package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-nhy3hkxQ.js} +1 -1
  105. package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +1 -0
  106. package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-DiUf3vWW.js} +1 -1
  107. package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +1 -0
  108. package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +1 -0
  109. package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +1 -0
  110. package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-BQ2wQ5gp.js} +1 -1
  111. package/dist/client/assets/NewChatComposer-BEXS8vV6.js +19 -0
  112. package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-C8ROO4ps.js} +1 -1
  113. package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-BNTqYC7m.js} +1 -1
  114. package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-CcOeFRCB.js} +1 -1
  115. package/dist/client/assets/{ObserveEmbedScreen-BPiSXXvm.js → ObserveEmbedScreen-Dh30EjAQ.js} +2 -2
  116. package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-CC5mnngm.js} +2 -2
  117. package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-DF6tRZL_.js} +1 -1
  118. package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +31 -0
  119. package/dist/client/assets/OpsAgentsView-D3rM0udq.js +1 -0
  120. package/dist/client/assets/OpsScreen-DySeNQ1V.js +1 -0
  121. package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +1 -0
  122. package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +1 -0
  123. package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-C8z22pJ2.js} +1 -1
  124. package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +1 -0
  125. package/dist/client/assets/ProjectsInbox-DfCXReZK.js +2 -0
  126. package/dist/client/assets/ProjectsRail-CELVubfJ.js +1 -0
  127. package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +1 -0
  128. package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +1 -0
  129. package/dist/client/assets/{Provider-5Hotn7NQ.js → Provider-CNZluAZb.js} +2 -2
  130. package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-DUPqXMZh.js} +1 -1
  131. package/dist/client/assets/RailToggle-BwmY70B8.js +1 -0
  132. package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +1 -0
  133. package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +9 -0
  134. package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-C8fxndAh.js} +1 -1
  135. package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-DUVJjrIu.js} +1 -1
  136. package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-Bek1Vc4W.js} +1 -1
  137. package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DlRg3172.js} +1 -1
  138. package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-CVUMnt6A.js} +1 -1
  139. package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-D9-s5PyB.js} +1 -1
  140. package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-D7FN-oyY.js} +1 -1
  141. package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +2 -0
  142. package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-BQ7HO1om.js} +2 -2
  143. package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-CJMWlvV-.js} +1 -1
  144. package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-B526NSnw.js} +1 -1
  145. package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-ChkvGyEW.js} +1 -1
  146. package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-6g1f5chk.js} +1 -1
  147. package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-BuwBdnPf.js} +1 -1
  148. package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-Bs-_VwTC.js} +1 -1
  149. package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-C2wf35-P.js} +1 -1
  150. package/dist/client/assets/{SessionObserve-DaqDhqDI.js → SessionObserve-B64YsYhy.js} +9 -9
  151. package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
  152. package/dist/client/assets/{SessionObserveEvidence-Drv-D8Oh.js → SessionObserveEvidence-CS1aQBpQ.js} +1 -1
  153. package/dist/client/assets/SessionRefScreen-DURV0MpF.js +1 -0
  154. package/dist/client/assets/SessionsScreen-D71ZR-8t.js +1 -0
  155. package/dist/client/assets/{SettingsDrawer-BDapR4E9.js → SettingsDrawer-Nz98oBVl.js} +3 -3
  156. package/dist/client/assets/SettingsScreen-CYBHal6y.js +1 -0
  157. package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-V04kD5T9.js} +1 -1
  158. package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +2 -0
  159. package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-XwFI-pCp.js} +1 -1
  160. package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-BMpkXai_.js} +1 -1
  161. package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +1 -0
  162. package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-aHeF4ZQZ.js} +1 -1
  163. package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-DI5N3gOj.js} +1 -1
  164. package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-Dw4LP7wu.js} +1 -1
  165. package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-BofjmUMJ.js} +2 -2
  166. package/dist/client/assets/Terminal-jIqnIZZ6.js +4 -0
  167. package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +1 -0
  168. package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-CwbQhXcI.js} +1 -1
  169. package/dist/client/assets/TerminalRelay--qOBwnbR.js +46 -0
  170. package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-BK6Qy41F.js} +1 -1
  171. package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-DpUT9Tpc.js} +1 -1
  172. package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-D35fOnQj.js} +1 -1
  173. package/dist/client/assets/{WorkDetailScreen-CwtRCm_-.js → WorkDetailScreen-Bcf_yHhU.js} +2 -2
  174. package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-t8AEyx3Q.js} +1 -1
  175. package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-_mhG_FR2.js} +1 -1
  176. package/dist/client/assets/WorldActorTalk-CKerDikx.js +1 -0
  177. package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-BRrj3MQN.js} +1 -1
  178. package/dist/client/assets/{WorldMinimap-Blqg0d5r.js → WorldMinimap-DOptgrc4.js} +1 -1
  179. package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-D-RJzSa6.js} +1 -1
  180. package/dist/client/assets/{activity-CSUhvjD0.js → activity-BJqFrZyB.js} +1 -1
  181. package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-CHohcvS3.js} +1 -1
  182. package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-CaRy2x2b.js} +1 -1
  183. package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +2 -0
  184. package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-bKWYOZaH.js} +1 -1
  185. package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
  186. package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
  187. package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
  188. package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
  189. package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
  190. package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-BplZUa_0.js} +1 -1
  191. package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
  192. package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
  193. package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-CubLvQ4W.js} +1 -1
  194. package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-DFfKAq0d.js} +1 -1
  195. package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-DmAWnyAH.js} +1 -1
  196. package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-B0aLKiyF.js} +1 -1
  197. package/dist/client/assets/at-sign-DM7xeppo.js +1 -0
  198. package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-BL9qvhEI.js} +1 -1
  199. package/dist/client/assets/{bot-CfN9PSBF.js → bot-BhAVbcCA.js} +1 -1
  200. package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
  201. package/dist/client/assets/chat-api-BPVC0asu.js +1 -0
  202. package/dist/client/assets/chat-space-model-B6Jg2CY4.js +4 -0
  203. package/dist/client/assets/{check-B8dMv3Is.js → check-g7D7-c1J.js} +1 -1
  204. package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-CDzRQQGl.js} +1 -1
  205. package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DKGTLiqc.js} +1 -1
  206. package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-DX7R6KY2.js} +1 -1
  207. package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-Dvk_QpRq.js} +1 -1
  208. package/dist/client/assets/{clock-DFcRbtrl.js → clock-CQb4FeMf.js} +1 -1
  209. package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-Cmadr3pQ.js} +1 -1
  210. package/dist/client/assets/{coffee-C_D9zooM.js → coffee-ljG1_krY.js} +1 -1
  211. package/dist/client/assets/{compass-DTZdCpv9.js → compass-CvzkzkIh.js} +1 -1
  212. package/dist/client/assets/content-0AXa0klu.js +1 -0
  213. package/dist/client/assets/content-BEyJ19Lx.js +1 -0
  214. package/dist/client/assets/content-BN5weWKW.js +1 -0
  215. package/dist/client/assets/content-BNokkm7C.js +1 -0
  216. package/dist/client/assets/content-BV4PUM9q.js +1 -0
  217. package/dist/client/assets/content-BxUPlcx5.js +1 -0
  218. package/dist/client/assets/content-CIC5sku8.js +1 -0
  219. package/dist/client/assets/content-CKJ9zb7Z.js +1 -0
  220. package/dist/client/assets/content-CdkTyxqk.js +1 -0
  221. package/dist/client/assets/content-CnhhSCZq.js +1 -0
  222. package/dist/client/assets/content-D1Ze_FG9.js +1 -0
  223. package/dist/client/assets/content-DY3F9Vfr.js +1 -0
  224. package/dist/client/assets/content-DrKBYpcb.js +1 -0
  225. package/dist/client/assets/content-LSStQYj5.js +1 -0
  226. package/dist/client/assets/content-YvU-D0hF.js +1 -0
  227. package/dist/client/assets/content-oKQMyVnH.js +1 -0
  228. package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
  229. package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-CIRaxmid.js} +1 -1
  230. package/dist/client/assets/{conversation-model-BGFHoxQ0.js → conversation-model-m8HhzroS.js} +1 -1
  231. package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +1 -0
  232. package/dist/client/assets/{copy-D9WUpQRf.js → copy-BGOC1tJB.js} +1 -1
  233. package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-Q6nrHFTN.js} +1 -1
  234. package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-ChvMq-zl.js} +1 -1
  235. package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
  236. package/dist/client/assets/discover-DlwbftpC.js +2 -0
  237. package/dist/client/assets/embed-entry-c0lwtjBG.js +2 -0
  238. package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-BVccgH0n.js} +1 -1
  239. package/dist/client/assets/{eye-CtqSV8BS.js → eye-CsGfEVR6.js} +1 -1
  240. package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-Be6da5l3.js} +1 -1
  241. package/dist/client/assets/{file-text-ChtICwub.js → file-text-DP6txVW-.js} +1 -1
  242. package/dist/client/assets/{flag-CqdOxVkI.js → flag-DAFE2wZ5.js} +1 -1
  243. package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
  244. package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
  245. package/dist/client/assets/{folder-0fWevPvQ.js → folder-B_S7gBVr.js} +1 -1
  246. package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-DQCGlE3o.js} +1 -1
  247. package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-CofqY4Km.js} +1 -1
  248. package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-DcUCsWdJ.js} +1 -1
  249. package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-KQy-ZOpV.js} +1 -1
  250. package/dist/client/assets/{home-moving-signal-B7m-ngb2.js → home-moving-signal-BIHUGNfI.js} +1 -1
  251. package/dist/client/assets/home-now-card-CaLgZze2.js +1 -0
  252. package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-CvU8B61b.js} +1 -1
  253. package/dist/client/assets/hooks-DaUOREpP.js +2 -0
  254. package/dist/client/assets/index-CGbs0SBm.css +1 -0
  255. package/dist/client/assets/index-CbqBwfIW.js +1 -0
  256. package/dist/client/assets/index-CyPMl7Up.js +1 -0
  257. package/dist/client/assets/index-DReVb7jZ.js +10 -0
  258. package/dist/client/assets/index-PQpJveGO.js +1 -0
  259. package/dist/client/assets/{index-CvsM3jm8.js → index-kkXUq-zf.js} +1 -1
  260. package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-CLU7wjnT.js} +2 -2
  261. package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-CJXPaHXj.js} +1 -1
  262. package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
  263. package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
  264. package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-Ch9t6lb0.js} +1 -1
  265. package/dist/client/assets/{layers-Bolb8ejU.js → layers-BOwyWodP.js} +1 -1
  266. package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-B36Qsh0y.js} +1 -1
  267. package/dist/client/assets/left-0vBrvrBG.js +2 -0
  268. package/dist/client/assets/left-C6SyaqlJ.js +1 -0
  269. package/dist/client/assets/left-CTuXysZR.js +2 -0
  270. package/dist/client/assets/left-Cc6s4DT2.js +1 -0
  271. package/dist/client/assets/left-DF5caiyh.js +1 -0
  272. package/dist/client/assets/left-DgT4tWCx.js +1 -0
  273. package/dist/client/assets/left-R0wppTTr.js +1 -0
  274. package/dist/client/assets/left-advisor-C-kt8V28.js +1 -0
  275. package/dist/client/assets/left-agents-thnBO156.js +1 -0
  276. package/dist/client/assets/left-default-CT42fnpF.js +1 -0
  277. package/dist/client/assets/left-lanes-CSmZgciK.js +1 -0
  278. package/dist/client/assets/left-mission-C86x6i9h.js +1 -0
  279. package/dist/client/assets/library-DdhYL_9v.js +1 -0
  280. package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-DNUsuPWz.js} +1 -1
  281. package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-I40PawYA.js} +1 -1
  282. package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-CdhNzDF0.js} +1 -1
  283. package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-Ck_Vjnyp.js} +1 -1
  284. package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-DSlvHp-D.js} +1 -1
  285. package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-C1-mdP3P.js} +1 -1
  286. package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-cI5_A5mj.js} +1 -1
  287. package/dist/client/assets/{message-markup-DgFSyb3f.js → message-markup-6Tgo4qFJ.js} +1 -1
  288. package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-CJW4WRlo.js} +1 -1
  289. package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-p_cboAm4.js} +1 -1
  290. package/dist/client/assets/monitor-C7_cHlkC.js +1 -0
  291. package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-CU_euC-Q.js} +1 -1
  292. package/dist/client/assets/{observe-CkfOxYx_.js → observe-CtS0l3zu.js} +1 -1
  293. package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
  294. package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-DwFR4wSw.js} +1 -1
  295. package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-qP17MwMl.js} +1 -1
  296. package/dist/client/assets/{pause-DWS7YGQ3.js → pause-B_hliKuR.js} +1 -1
  297. package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-BUsTTZFE.js} +1 -1
  298. package/dist/client/assets/{pin-DWlD1BOF.js → pin-Oi4qHR6M.js} +1 -1
  299. package/dist/client/assets/{play-D_Pggug4.js → play-CVeRmqLH.js} +1 -1
  300. package/dist/client/assets/{plus-D_wLGJGT.js → plus-D5NLH_fM.js} +1 -1
  301. package/dist/client/assets/profile-BegEUmB7.js +1 -0
  302. package/dist/client/assets/projects-inbox-CKPLZN8s.css +1 -0
  303. package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-CfwxCTdN.js} +1 -1
  304. package/dist/client/assets/provider-DwmCoSlc.js +1 -0
  305. package/dist/client/assets/{proxy-DOG46ja4.js → proxy-DgzP27W8.js} +1 -1
  306. package/dist/client/assets/{radio-C_jtwbFP.js → radio-Cas2qg1D.js} +1 -1
  307. package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-IcD2lPoT.js} +1 -1
  308. package/dist/client/assets/resolve-panes-pfZTezKo.js +1 -0
  309. package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +1 -0
  310. package/dist/client/assets/right-BDaCJ0CF.js +1 -0
  311. package/dist/client/assets/right-BP6lXRFS.js +1 -0
  312. package/dist/client/assets/right-Cb1VCrdj.js +1 -0
  313. package/dist/client/assets/right-CeFaxfBo.js +1 -0
  314. package/dist/client/assets/right-Ck2SrYCj.js +1 -0
  315. package/dist/client/assets/right-D-uv5YfF.js +1 -0
  316. package/dist/client/assets/right-DJMSICky.js +1 -0
  317. package/dist/client/assets/right-Dnljs8ah.js +1 -0
  318. package/dist/client/assets/right-SdCSF8PP.js +1 -0
  319. package/dist/client/assets/{right-BLJsc2-p.js → right-cjPTwPXS.js} +1 -1
  320. package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-DAqYvu8I.js} +1 -1
  321. package/dist/client/assets/router-C-MF5-mb.js +1 -0
  322. package/dist/client/assets/{runtime-picker-DdsttHHc.js → runtime-picker-C_AVYF63.js} +1 -1
  323. package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-Dl3ml9OZ.js} +1 -1
  324. package/dist/client/assets/{scout-voice-DOQ_B77g.js → scout-voice-CqAyfblr.js} +1 -1
  325. package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-DwvGQOWo.js} +1 -1
  326. package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-B0tKI9Sg.js} +1 -1
  327. package/dist/client/assets/{search-C4VlW_0l.js → search-UsM-9-_W.js} +1 -1
  328. package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
  329. package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +1 -0
  330. package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-OTS2iFkt.js} +1 -1
  331. package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-BlQsRK6C.js} +1 -1
  332. package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-C1mgqdow.js} +1 -1
  333. package/dist/client/assets/{server-ms1yxUYJ.js → server-DBlPW0Mp.js} +1 -1
  334. package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CnpZMB7C.js} +1 -1
  335. package/dist/client/assets/{session-table-CDx_16xf.js → session-table-CGkfG5Yd.js} +1 -1
  336. package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Bge4XZ4I.js} +1 -1
  337. package/dist/client/assets/{settings-TJIkkZ0P.js → settings-C69Zjrpq.js} +1 -1
  338. package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
  339. package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-6bzeod7c.js} +1 -1
  340. package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-Cc5lPZRv.js} +1 -1
  341. package/dist/client/assets/{sse-v5QLsOHV.js → sse-A8AyLH0g.js} +1 -1
  342. package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-C4WdhVeK.js} +1 -1
  343. package/dist/client/assets/{terminal-96JWDYDL.js → terminal-DMZjX1es.js} +1 -1
  344. package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-mO89dX-Y.js} +1 -1
  345. package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
  346. package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-CZZsnPzj.js} +1 -1
  347. package/dist/client/assets/use-beside-D3cJpA5p.js +1 -0
  348. package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-D5EnpVba.js} +1 -1
  349. package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-D_QOmjg5.js} +1 -1
  350. package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-3V3ADQ-G.js} +1 -1
  351. package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-DI9GKWlF.js} +1 -1
  352. package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-CiaZHMnk.js} +1 -1
  353. package/dist/client/assets/use-scout-dev-flags-CkdAHlDR.js +1 -0
  354. package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-A3QGXqIy.js} +1 -1
  355. package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +1 -0
  356. package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-atkQVfGw.js} +1 -1
  357. package/dist/client/assets/usePersistentState-Y8XwSTg-.js +1 -0
  358. package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-DTvcwISe.js} +1 -1
  359. package/dist/client/assets/users-RLK3P5U4.js +1 -0
  360. package/dist/client/assets/{wrench-BsMTSeji.js → wrench-B4maQJai.js} +1 -1
  361. package/dist/client/assets/{x-DI1ktCYb.js → x-rlMdRqJF.js} +1 -1
  362. package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-B1zHHOLQ.js} +1 -1
  363. package/dist/client/assets/{zap-sKPkh4sQ.js → zap-B4X0OrEw.js} +1 -1
  364. package/dist/client/index.html +15 -3
  365. package/dist/drizzle/0019_session_actor_targets.sql +227 -0
  366. package/dist/drizzle/README.md +19 -0
  367. package/dist/drizzle/meta/0019_snapshot.json +6804 -0
  368. package/dist/drizzle/meta/_journal.json +7 -0
  369. package/dist/highlights-eq9cgrbb.scm +604 -0
  370. package/dist/highlights-ghv9g403.scm +205 -0
  371. package/dist/highlights-hk7bwhj4.scm +284 -0
  372. package/dist/highlights-r812a2qc.scm +150 -0
  373. package/dist/highlights-x6tmsnaa.scm +115 -0
  374. package/dist/injections-73j83es3.scm +27 -0
  375. package/dist/main.mjs +1214 -722
  376. package/dist/node/main.mjs +133 -22
  377. package/dist/pairing-runtime-controller.mjs +715 -492
  378. package/dist/runtime/base-daemon.mjs +14176 -58
  379. package/dist/runtime/broker-daemon.mjs +15520 -445
  380. package/dist/runtime/broker-process-manager.mjs +5 -3
  381. package/dist/runtime/mesh-discover.mjs +5 -3
  382. package/dist/scout-control-plane-web.mjs +21065 -3387
  383. package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
  384. package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
  385. package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
  386. package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
  387. package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
  388. package/dist/update-helper.mjs +83 -17
  389. package/package.json +2 -2
  390. package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
  391. package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
  392. package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
  393. package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
  394. package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
  395. package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
  396. package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
  397. package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
  398. package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
  399. package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
  400. package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
  401. package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
  402. package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
  403. package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
  404. package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
  405. package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
  406. package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
  407. package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
  408. package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
  409. package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
  410. package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
  411. package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
  412. package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
  413. package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
  414. package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
  415. package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
  416. package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
  417. package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
  418. package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
  419. package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
  420. package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
  421. package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
  422. package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
  423. package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
  424. package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
  425. package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
  426. package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
  427. package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
  428. package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
  429. package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
  430. package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
  431. package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
  432. package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
  433. package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
  434. package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
  435. package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
  436. package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
  437. package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
  438. package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
  439. package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
  440. package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
  441. package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
  442. package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
  443. package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
  444. package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
  445. package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
  446. package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
  447. package/dist/client/assets/content-B5Q4pb9R.js +0 -1
  448. package/dist/client/assets/content-BK1IfOZs.js +0 -1
  449. package/dist/client/assets/content-BeEsWLEm.js +0 -1
  450. package/dist/client/assets/content-BkOwEknW.js +0 -1
  451. package/dist/client/assets/content-C32W5kAG.js +0 -1
  452. package/dist/client/assets/content-CoqyLs9v.js +0 -1
  453. package/dist/client/assets/content-CwpdIS5b.js +0 -1
  454. package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
  455. package/dist/client/assets/content-DXKaPDfn.js +0 -1
  456. package/dist/client/assets/content-DZt5-dkI.js +0 -1
  457. package/dist/client/assets/content-DbQJH8L1.js +0 -1
  458. package/dist/client/assets/content-DetoiaHq.js +0 -1
  459. package/dist/client/assets/content-Dhu3wL7J.js +0 -1
  460. package/dist/client/assets/content-Dpv34iZu.js +0 -1
  461. package/dist/client/assets/content-TtQJb61D.js +0 -1
  462. package/dist/client/assets/content-ymNb2R7g.js +0 -1
  463. package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
  464. package/dist/client/assets/discover-C8IOY7_K.js +0 -2
  465. package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
  466. package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
  467. package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
  468. package/dist/client/assets/index-C5cX8dkl.js +0 -1
  469. package/dist/client/assets/index-C8uS5szO.js +0 -10
  470. package/dist/client/assets/index-Ck1__1yL.css +0 -1
  471. package/dist/client/assets/index-ClOOrVG1.js +0 -1
  472. package/dist/client/assets/index-Crtgfc9I.js +0 -1
  473. package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
  474. package/dist/client/assets/left-B-_z_nqj.js +0 -2
  475. package/dist/client/assets/left-B1LY7rJc.js +0 -1
  476. package/dist/client/assets/left-C6bdjWcG.js +0 -2
  477. package/dist/client/assets/left-CF4iuqlz.js +0 -1
  478. package/dist/client/assets/left-DLtNyZl1.js +0 -1
  479. package/dist/client/assets/left-Fpxoq-VY.js +0 -1
  480. package/dist/client/assets/left-N2wXfTlp.js +0 -1
  481. package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
  482. package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
  483. package/dist/client/assets/left-default-08gmdCtb.js +0 -1
  484. package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
  485. package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
  486. package/dist/client/assets/library-DLKBVUJ6.js +0 -1
  487. package/dist/client/assets/profile-C3KgiZvc.js +0 -1
  488. package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
  489. package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
  490. package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
  491. package/dist/client/assets/right-B9OUA6Ho.js +0 -1
  492. package/dist/client/assets/right-BDQnjetX.js +0 -1
  493. package/dist/client/assets/right-BUbKHmRH.js +0 -1
  494. package/dist/client/assets/right-Ci2IcD4s.js +0 -1
  495. package/dist/client/assets/right-CmCce3e5.js +0 -1
  496. package/dist/client/assets/right-D7w0zM5a.js +0 -1
  497. package/dist/client/assets/right-DIoON_bv.js +0 -1
  498. package/dist/client/assets/right-E0Jr3VN5.js +0 -1
  499. package/dist/client/assets/right-lCdAk9dW.js +0 -1
  500. package/dist/client/assets/router-BKiMcYa7.js +0 -1
  501. package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
  502. package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
  503. package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
  504. package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
  505. package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as s,j as o}from"./index-DReVb7jZ.js";/* empty css */import{a as h}from"./api-DSqpVKC7.js";import{n as f}from"./agent-state-DDhnFEEP.js";import{r as g,a as j}from"./operator-attention-DBaRg5ep.js";import{u as N}from"./sse-A8AyLH0g.js";import{t as c}from"./time-Dhsh_2EG.js";import{u as w}from"./Provider-CNZluAZb.js";import{o as l}from"./openContent-C6XO6kr5.js";import{R as m}from"./RailRow-DUPqXMZh.js";import"./index-BWHgHrtv.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.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"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./HarnessMark-DSvM_H7H.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./AgentAvatar-NZOqcsB2.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.js";const A=[{name:"Control",route:{view:"ops",mode:"mission"},active:e=>e.view==="ops"&&(e.mode===void 0||e.mode==="mission")},{name:"Dispatch",route:{view:"broker"},active:e=>e.view==="broker"},{name:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{name:"Tail",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{name:"Runtime",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop"}];function jt(){const{navigate:e,route:n}=w(),[p,d]=s.useState(null),r=s.useCallback(async()=>{const t=await h("/api/fleet").catch(()=>null);d(t)},[]);s.useEffect(()=>{r()},[r]),N(t=>{(t.kind==="message.posted"||t.kind==="flight.updated"||t.kind==="collaboration.event.appended")&&r()});const i=p?.needsAttention??[],a=(p?.activeAsks??[]).filter(t=>t.status!=="needs_attention"),u=t=>{l(e,g(t),{returnTo:n})},v=t=>{l(e,j(t),{returnTo:n})};return o.jsxs("div",{className:"ctx-panel ctx-panel--ops",children:[o.jsxs("section",{className:"ctx-panel-section",children:[o.jsx("div",{className:"ctx-panel-section-label",children:"Surfaces"}),A.map(t=>o.jsx(m,{name:t.name,tone:"neutral",active:t.active(n),onClick:()=>e(t.route)},t.name))]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Needs you",i.length>0&&o.jsx("span",{className:"ctx-panel-count",children:i.length})]}),i.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"All clear"}):i.slice(0,4).map(t=>{const x=t.agentName??t.agentId??"operator";return o.jsx(m,{name:t.title,meta:c(t.updatedAt),tone:"in_turn",unread:!0,title:`${x} · ${t.kind}`,onClick:()=>u(t)},t.recordId)})]}),o.jsxs("section",{className:"ctx-panel-section",children:[o.jsxs("div",{className:"ctx-panel-section-label",children:["Active",a.length>0&&o.jsx("span",{className:"ctx-panel-count",children:a.length})]}),a.length===0?o.jsx("div",{className:"ctx-panel-empty",children:"No active requests"}):a.slice(0,10).map(t=>o.jsx(m,{name:t.task,meta:c(t.updatedAt),tone:f(t.agentState),title:`${t.agentName??t.agentId} · ${t.statusLabel}`,onClick:()=>v(t)},t.invocationId))]})]})}export{jt as OpsDefaultLeft};
@@ -0,0 +1 @@
1
+ import{r as f,j as t}from"./index-DReVb7jZ.js";/* empty css */import{t as x}from"./time-Dhsh_2EG.js";import{u as g}from"./Provider-CNZluAZb.js";import{R as b}from"./RailRow-DUPqXMZh.js";import{H as h}from"./HarnessMark-DSvM_H7H.js";import{n as j}from"./agent-state-DDhnFEEP.js";import{b as v,c as L,l as m,d as _}from"./agent-lanes-model-DMAdqCmK.js";import{u as N,b as A,g as p}from"./lane-roster-store-Ch9t6lb0.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./AgentAvatar-NZOqcsB2.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.js";import"./lane-ask-display-BTVSakyo.js";import"./context-budget-8qFKqM-j.js";import"./lane-observe-CteDwdD-.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";function c(s,e,i){const r=`[data-lane-id="${s.replace(/["\\]/g,"\\$&")}"]`,a=typeof document<"u"?document.querySelector(r):null;if(a){a.scrollIntoView({behavior:"smooth",inline:"center",block:"nearest"}),a.focus();return}e&&i({view:"agents-v2",agentId:e,tab:"profile"})}function R(s){return s.filter(e=>!v(e)&&L(e)).sort((e,i)=>{const r=(i.updatedAt??0)-(e.updatedAt??0);return r!==0?r:m(e,"scout").localeCompare(m(i,"scout"))}).map(e=>({id:e.id,label:m(e,"scout"),statusLabel:_(e,"scout"),tone:j(e.state,e),agentId:e.id,updatedAt:e.updatedAt??void 0}))}function wo(){const{agents:s,navigate:e}=g(),i=N(),r=A(),a=f.useMemo(()=>R(s),[s]),l=i??a,d=l.some(o=>o.floor);return t.jsx("div",{className:"ctx-panel ctx-panel--ops",children:t.jsxs("section",{className:"ctx-panel-section",children:[t.jsxs("div",{className:"ctx-panel-section-label",children:[d?"Fleet":"Lanes",l.length>0&&t.jsx("span",{className:"ctx-panel-count",children:l.length})]}),l.length===0?t.jsx("div",{className:"ctx-panel-empty",children:"No active lanes"}):l.map(o=>o.floor?t.jsxs("button",{type:"button",className:`agent-floor__ledger-row is-rail${r===o.id?" is-focus":""}`,onClick:()=>{const n=p();n?n.onSelect(o.id):c(o.id,o.agentId,e)},onPointerEnter:()=>p()?.onHover(o.id),onPointerLeave:()=>p()?.onHover(null),children:[t.jsxs("span",{className:"agent-floor__ledger-id",children:[t.jsx(h,{harness:o.floor.harness,size:15,title:null}),t.jsxs("span",{className:"agent-floor__ledger-lines",children:[t.jsx("span",{className:"agent-floor__ledger-name",children:o.floor.identity}),o.floor.project?t.jsx("span",{className:"agent-floor__ledger-where",children:o.floor.project}):null]}),t.jsx("span",{className:`agent-floor__card-dot${o.floor.live?" is-live":""}`})]}),t.jsx("span",{className:"agent-floor__ledger-strip",children:o.floor.strip.slice(-6).map((n,u)=>t.jsx("span",{className:`agent-floor__ledger-cell is-${n}`},u))})]},o.id):t.jsx(b,{name:o.label,sub:o.statusLabel||void 0,meta:o.updatedAt?x(o.updatedAt):void 0,tone:o.tone,title:o.statusLabel,onClick:()=>c(o.id,o.agentId,e)},o.id))]})})}export{wo as OpsLanesLeft};
@@ -0,0 +1 @@
1
+ import{r,j as s}from"./index-DReVb7jZ.js";/* empty css */import{n as S}from"./agent-state-DDhnFEEP.js";import{u as M,m as I,s as w,a as u,M as k,b as A,c as C,d as E,r as F,t as R}from"./mission-control-store-p_cboAm4.js";import{u as T}from"./Provider-CNZluAZb.js";import{a as K,b as q,r as L,m as B}from"./keyboard-nav-CJXPaHXj.js";import{MissionLeftAgentRow as D}from"./MissionLeftAgentRow-Dms0DBjO.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./HarnessMark-DSvM_H7H.js";import"./NewChatOrigin-C8ROO4ps.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./page-status-DwFR4wSw.js";import"./RailRow-DUPqXMZh.js";import"./AgentAvatar-NZOqcsB2.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.js";function Le(){const{navigate:a}=T(),i=M(),l=i.visibleAgents,m=r.useRef(null),p=r.useRef(null),h=K(),x=B(()=>m.current);q(r.useCallback(()=>p.current,[]));const[d,v]=r.useState(null),j=I(i),c=i.selectedIds.length,b=e=>{v(t=>t===e?null:e)},N=()=>{if(c===0)return;const t=l.filter(o=>i.selectedIds.includes(o.id)).map(o=>o.handle??o.name).filter(Boolean).join("|");t&&a({view:"ops",mode:"tail",tailQuery:t})};return s.jsxs("div",{className:"ctx-panel ml-panel",children:[s.jsxs("div",{className:"ml-section",children:[s.jsx("div",{className:"ml-section-label",children:"Source"}),s.jsx("div",{className:"ml-chips ml-chips--primary",children:["all","scout","native"].map(e=>s.jsx("button",{type:"button",className:["ml-chip",i.sourceFilter===e&&"ml-chip--active"].filter(Boolean).join(" "),onClick:()=>w(e),children:e==="all"?"All":e==="scout"?"Scout":"Native"},e))})]}),s.jsx("div",{className:"ctx-panel-search",children:s.jsx("input",{ref:p,type:"text",className:"ctx-panel-search-input",placeholder:"Filter agents… (press /)",value:i.query,onChange:e=>u(e.target.value),onKeyDown:e=>{x(e),e.key==="Escape"&&i.query&&u("")}})}),s.jsx("div",{className:"ml-section ml-section--secondary",children:s.jsxs("div",{className:"ml-chips ml-chips--secondary",role:"group","aria-label":"Show logs active within",children:[s.jsx("span",{className:"ml-section-label ml-section-label--inline",children:"Within"}),k.map(e=>{const t=j===e.id;return s.jsx("button",{type:"button",className:["ml-chip ml-chip--ghost",t&&"ml-chip--ghost-active"].filter(Boolean).join(" "),"aria-pressed":t,onClick:()=>A(e.id),children:e.label},e.id)})]})}),s.jsxs("div",{className:"ml-section ml-section--grouping",children:[s.jsx("div",{className:"ml-section-label",children:"Order by"}),s.jsx("div",{className:"ml-chips ml-chips--grouping",children:[["activity","Activity"],["workspace","Project"],["harness","Harness"],["state","Status"],["source","Source"]].map(([e,t])=>s.jsx("button",{type:"button",className:["ml-chip","ml-chip--group",i.groupMode===e&&"ml-chip--group-active"].filter(Boolean).join(" "),"aria-pressed":i.groupMode===e,onClick:()=>C(e),children:t},e))})]}),c>0?s.jsxs("div",{className:"ml-selection",children:[s.jsxs("span",{className:"ml-selection-label",children:[c," selected"]}),s.jsxs("div",{className:"ml-selection-actions",children:[s.jsx("button",{type:"button",className:"ml-selection-btn ml-selection-btn--primary",onClick:N,children:"Tail ↗"}),s.jsx("button",{type:"button",className:"ml-selection-btn",onClick:E,children:"Clear"})]})]}):s.jsxs("div",{className:"ml-count",children:[l.length," visible",s.jsx("span",{className:"ml-count-hint",children:"⌘-click · ⌘A all"})]}),s.jsx("div",{ref:m,className:"ctx-panel-list ctx-panel-list--scroll",onKeyDown:h,children:l.length===0?s.jsx("div",{className:"ctx-panel-empty",children:i.query?"No match":"Nothing visible"}):l.map((e,t)=>{const o=e.id===d,y=l.some(n=>n.id===d),g=i.selectedIds.includes(e.id),f=S(e.state);return s.jsx(D,{agent:e,state:f,isExpanded:o,isSelected:g,tabIndex:L(o,y,t===0),onToggle:n=>{n.metaKey||n.ctrlKey||n.shiftKey?R(e.id):b(e.id)},onReveal:()=>F(e.id),onOpen:()=>a({view:"agents-v2",agentId:e.id})},e.id)})})]})}export{Le as OpsMissionLeft};
@@ -0,0 +1 @@
1
+ import{r as l,j as e}from"./index-DReVb7jZ.js";/* empty css */import{t as O}from"./time-Dhsh_2EG.js";import{u as H,a as $}from"./Provider-CNZluAZb.js";import{S as G}from"./SpriteAvatar-aHeF4ZQZ.js";import{H as R}from"./HarnessMark-DSvM_H7H.js";import{AgentSessions as J}from"./AgentSessions-CO1WGa8Z.js";import{a as T}from"./api-DSqpVKC7.js";import{g as q,p as V,b as _}from"./model-CBkMvT1w.js";import{c as Q,e as X,f as Y,g as Z}from"./NewChatComposer-BEXS8vV6.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./createLucideIcon-ChvMq-zl.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./file-text-DP6txVW-.js";import"./x-rlMdRqJF.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CJXPaHXj.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./runtime-picker-C_AVYF63.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";const ee=30*6e4,D=a=>a==="pi"?"grok":a,K=a=>a?a.replace(/^claude-/,"").replace(/-\d{8}$/,""):null;function Ze({agents:a,fleet:d,sessionByAgentId:c,sessions:A,discovery:k,loading:C,navigate:N,selectedAgentId:S}){const{route:u,reload:p,openContextCapture:j}=H(),m=u.view==="agents-v2"?u.projectSlug:void 0,v=l.useMemo(()=>{const n=new Map;for(const b of d?.activeAsks??[]){const i=n.get(b.agentId)??[];i.push(b),n.set(b.agentId,i)}return n},[d?.activeAsks]),f=l.useMemo(()=>a.map(n=>Q(n,c.get(n.id)??null,v.get(n.id)??[])),[v,a,c]),g=l.useMemo(()=>X(k,Date.now()),[k]),h=l.useMemo(()=>Y(f,A,g),[f,A,g]),w=l.useMemo(()=>h.find(n=>n.slice.slug===m)??h[0]??null,[h,m]),r=w?.slice.slug,M={selectAgent:n=>N({view:"agents-v2",agentId:n.agent.id,...r?{projectSlug:r}:{}}),openAgentPage:n=>N({view:"agents-v2",agentId:n.agent.id,tab:"profile"}),startSession:n=>j({intent:"new-task",projectPath:n.agent.projectRoot??n.agent.cwd??void 0}),openSession:n=>N(n),configureAgent:n=>N({view:"agents-v2",agentId:n.agent.id,tab:"config"}),restartAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/config`,{method:"POST",body:JSON.stringify({restart:!0})}).catch(()=>{})},stopAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/interrupt`,{method:"POST",body:JSON.stringify({})}).catch(()=>{})},archiveAgent:n=>{T(`/api/agents/${encodeURIComponent(n.agent.id)}/archive`,{method:"POST",body:JSON.stringify({archived:!0})}).then(()=>p()).catch(()=>{})}};return!w&&C?e.jsx("div",{className:"s-aproj","aria-busy":"true",children:e.jsx("div",{className:"ap-loading",role:"status","aria-label":"Loading agents",children:Array.from({length:7},(n,b)=>e.jsx("span",{"aria-hidden":"true"},b))})}):w?e.jsx("div",{className:"s-aproj",children:e.jsx(te,{project:w,selectedAgentId:S,gestures:M,sessions:A})}):e.jsx("div",{className:"s-aproj",children:e.jsx("div",{className:"ap-empty",children:"No agents discovered yet — they appear here as harnesses register and work."})})}function se(){return e.jsxs("svg",{width:"13",height:"13",viewBox:"0 0 16 16",fill:"none","aria-hidden":!0,children:[e.jsx("circle",{cx:"7",cy:"7",r:"4.2",stroke:"currentColor",strokeWidth:"1.3"}),e.jsx("path",{d:"m10.5 10.5 3 3",stroke:"currentColor",strokeWidth:"1.3",strokeLinecap:"round"})]})}function ae({tone:a}){return a==="idle"?null:e.jsx("span",{className:"ap-dot","data-tone":a,"aria-hidden":!0})}function ne({g:a,gestures:d,sessions:c,selected:A,cursor:k,rowRef:C}){const N=$(),S=Date.now()-a.lastActivityAt<ee,u=a.needs?"needs":S?"live":"idle",p=a.nodes[0];if(!p)return null;const j=p.row.agent.handle?.trim()||a.name,m=a.branches.length>0?a.branches:["main"],v=m.length>1,f=v?`${m.length} branches`:m[0],g=[...new Set(a.nodes.map(r=>r.row.agent.model).filter(r=>!!r))],h=g.length>1,w=[{kind:"action",label:"Configure…",onSelect:()=>d.configureAgent(p.row)},{kind:"action",label:"Restart",onSelect:()=>d.restartAgent(p.row)},{kind:"separator"},{kind:"action",label:"Stop",onSelect:()=>d.stopAgent(p.row)},{kind:"action",label:"Archive",onSelect:()=>d.archiveAgent(p.row)}];return e.jsxs("div",{ref:C,tabIndex:-1,className:"ap-row","data-tone":u,"data-selected":A||void 0,"data-cursor":k||void 0,children:[e.jsxs("div",{className:"ap-rowMain",onClick:()=>d.selectAgent(p.row),children:[e.jsxs("div",{className:"ap-rowBody",children:[e.jsxs("div",{className:"ap-rowTop",children:[e.jsx(ae,{tone:u}),e.jsx("span",{className:"ap-rowMark","data-idle":u==="idle"||void 0,"aria-hidden":!0,children:e.jsx(R,{harness:D(a.harness),size:11})}),e.jsxs("span",{className:"ap-rowName","data-idle":u==="idle"||void 0,children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),j]}),a.needs?e.jsx("span",{className:"ap-needsWord",children:"needs you"}):u==="live"?e.jsx("span",{className:"ap-rowState",children:"working"}):null]}),e.jsxs("div",{className:"ap-rowMeta",children:[e.jsx("span",{className:"ap-rowBranch","data-dim":!0,title:v?m.join(" · "):void 0,children:f}),h?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",title:g.join(" · "),children:[g.length," models"]})]}):null,a.sessionCount?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"ap-rowDivider","aria-hidden":!0}),e.jsxs("span",{className:"ap-rowDim",children:[a.sessionCount," session",a.sessionCount===1?"":"s"]})]}):null]})]}),e.jsxs("div",{className:"ap-rowTailWrap",children:[e.jsxs("div",{className:"ap-rowTail",children:[e.jsxs("div",{className:"ap-tailMeta","aria-hidden":u==="needs"||void 0,children:[e.jsx("span",{className:"ap-rowAgo",children:a.lastActivityAt?O(a.lastActivityAt):"—"}),!h&&K(a.model)?e.jsx("span",{className:"ap-rowModel",children:K(a.model)}):null]}),e.jsxs("div",{className:"ap-rowActions",children:[e.jsx("button",{type:"button",className:"ap-act ap-actPrimary",onClick:r=>{r.stopPropagation(),d.openAgentPage(p.row)},children:"Open ↗"}),e.jsx("button",{type:"button",className:"ap-act",onClick:r=>{r.stopPropagation(),d.startSession(p.row)},children:"+ Session"})]})]}),e.jsx("button",{type:"button",className:"ap-rowMore","aria-label":"Agent actions",title:"Configure · restart · stop",onClick:r=>{r.stopPropagation(),N(r,w)},children:"⋯"})]})]}),e.jsx(J,{agentIds:a.nodes.map(r=>r.row.agent.id),sessions:c})]})}function te({project:a,selectedAgentId:d,gestures:c,sessions:A}){const[k,C]=l.useState(""),[N,S]=l.useState(null),[u,p]=l.useState(!1),[j,m]=l.useState(-1),v=l.useRef(null),f=l.useRef(new Map),g=l.useMemo(()=>q(a),[a]),{primary:h,ephemeral:w}=l.useMemo(()=>V(g),[g]),r=l.useMemo(()=>_(a),[a]),M=l.useMemo(()=>[...new Set(h.map(s=>D(s.harness)))],[h]),n=k.trim().toLowerCase(),b=s=>(!N||D(s.harness)===N)&&(!n||s.name.toLowerCase().includes(n)||s.branches.some(t=>t.toLowerCase().includes(n))||s.harness.includes(n)),i=h.filter(b),I=w.filter(b),E=!!(n||N),o=i.find(s=>s.needs)??i[0],U=i.some(s=>s.needs),B=h.length<=1;Z(a);const W=g.reduce((s,t)=>s+t.sessionCount,0),z=s=>!!(d&&s.nodes.some(t=>t.row.agent.id===d));return l.useEffect(()=>{function s(t){const y=document.activeElement,L=!!y&&(y.tagName==="INPUT"||y.tagName==="TEXTAREA"||y.isContentEditable);if(t.key.toLowerCase()==="k"&&(t.metaKey||t.ctrlKey)||t.key==="/"&&!L){t.preventDefault(),v.current?.focus(),v.current?.select();return}if(t.key==="Escape"){L&&y?.blur();return}if(L)return;const F=i.length;if(F){if(t.key==="ArrowDown"||t.key==="j")t.preventDefault(),m(x=>x<0?0:Math.min(F-1,x+1));else if(t.key==="ArrowUp"||t.key==="k")t.preventDefault(),m(x=>x<0?0:Math.max(0,x-1));else if(t.key==="Enter"&&(t.metaKey||t.ctrlKey)){const x=i.find(P=>P.needs)??i[0];x&&(t.preventDefault(),m(i.indexOf(x)),c.selectAgent(x.nodes[0].row))}else if(t.key==="Enter"){const x=j<0?0:j,P=i[x];P&&(t.preventDefault(),m(x),c.selectAgent(P.nodes[0].row))}}}return document.addEventListener("keydown",s),()=>document.removeEventListener("keydown",s)},[i,j,c]),l.useEffect(()=>{if(!(j<0)){if(j>=i.length){m(i.length-1);return}f.current.get(i[j]?.name??"")?.scrollIntoView({block:"nearest"})}},[j,i]),e.jsx("div",{className:"ap-view",children:e.jsxs("div",{className:"ap-content",children:[e.jsxs("header",{className:"ap-head",children:[e.jsx(G,{name:a.slice.title,size:56,tile:!0}),e.jsxs("div",{className:"ap-headIdent",children:[e.jsx("div",{className:"ap-headTop",children:e.jsxs("h1",{className:"ap-headName",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"/"}),a.slice.title]})}),a.slice.root?e.jsx("span",{className:"ap-headRoot",children:a.slice.root}):null]}),e.jsx("div",{className:"ap-headActions",children:e.jsx("button",{type:"button",className:"ap-headCta",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent"})})]}),e.jsxs("div",{className:"ap-digest",children:[e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:h.length}),e.jsx("span",{className:"ap-statLbl",children:h.length===1?"agent":"agents"})]}),e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:W}),e.jsx("span",{className:"ap-statLbl",children:W===1?"session":"sessions"})]}),r.length>0?e.jsxs("span",{className:"ap-stat",children:[e.jsx("span",{className:"ap-statNum",children:r.length}),e.jsx("span",{className:"ap-statLbl",children:"in flight"})]}):null,e.jsx("span",{className:"ap-statMarks",children:M.map(s=>e.jsx("span",{title:s,"aria-hidden":!0,children:e.jsx(R,{harness:s,size:12})},s))})]}),o&&!E&&!B?e.jsxs("div",{className:"ap-resume","data-tone":o.needs?"needs":"live","aria-live":"polite",children:[e.jsx("span",{className:"ap-dot","data-tone":o.needs?"needs":"live","aria-hidden":!0}),e.jsx("span",{className:"ap-resumeLbl",children:o.needs?"Waiting on you":"Most recent"}),e.jsxs("span",{className:"ap-resumeWho",children:[e.jsx("span",{className:"ap-sigil","aria-hidden":!0,children:"@"}),o.nodes[0].row.agent.handle?.trim()||o.name]}),e.jsxs("span",{className:"ap-resumeMeta",children:[o.branches[0]??"main"," · ",o.lastActivityAt?O(o.lastActivityAt):"—"]}),e.jsxs("span",{className:"ap-resumeActions",children:[e.jsx("button",{type:"button",className:"ap-linkAccent",onClick:()=>c.selectAgent(o.nodes[0].row),children:o.needs?"Continue":"Resume"}),e.jsx("button",{type:"button",className:"ap-link",onClick:()=>c.openAgentPage(o.nodes[0].row),children:"Open ↗"})]})]}):null,B?null:e.jsxs("div",{className:"ap-find",children:[e.jsx("span",{className:"ap-findIco","aria-hidden":!0,children:e.jsx(se,{})}),e.jsx("input",{ref:v,className:"ap-findInput",placeholder:"Find an agent, branch, or harness… (⌘K)",value:k,onChange:s=>C(s.target.value)}),e.jsx("div",{className:"ap-findFilters",children:M.map(s=>e.jsxs("button",{type:"button",className:"ap-filter","data-on":N===s||void 0,onClick:()=>S(t=>t===s?null:s),children:[e.jsx(R,{harness:s,size:11}),s.charAt(0).toUpperCase()+s.slice(1)]},s))})]}),e.jsxs("div",{className:"ap-main",children:[e.jsxs("div",{className:"ap-sectionHead",children:[e.jsx("span",{className:"ap-sectionTitle",children:"Agents"}),e.jsxs("span",{className:"ap-sectionMeta",children:[i.length," shown",E?" · filtered":""]}),e.jsxs("span",{className:"ap-kbdHint","aria-hidden":!0,children:["↑↓ move · ↵ open",U?" · ⌘↵ needs":""]})]}),e.jsxs("div",{className:"ap-roster",children:[i.map((s,t)=>e.jsx(ne,{g:s,gestures:c,sessions:A,selected:z(s),cursor:j===t,rowRef:y=>{y?f.current.set(s.name,y):f.current.delete(s.name)}},s.name)),i.length===0?e.jsx("div",{className:"ap-empty",children:E?"No agents match.":I.length?"No primary agents — workflow & clone agents are in the fold below.":"No agents in this project yet."}):null]}),I.length?e.jsxs("div",{className:"ap-ephBlock",children:[e.jsxs("button",{type:"button",className:"ap-ephToggle",onClick:()=>p(s=>!s),children:[e.jsx("span",{className:"ap-ephCount",children:I.length})," ephemeral · workflow & clone agents",e.jsx("span",{className:"ap-ephCaret",children:u?"▴":"▾"})]}),u?e.jsx("div",{className:"ap-ephList",children:I.map(s=>e.jsxs("button",{type:"button",className:"ap-ephRow",onClick:()=>c.openAgentPage(s.nodes[0].row),children:[e.jsx("span",{className:"ap-ephMark","aria-hidden":!0,children:e.jsx(R,{harness:D(s.harness),size:10})}),e.jsx("span",{className:"ap-ephName",children:s.name}),e.jsx("span",{className:"ap-ephBranch",children:s.branches[0]??"main"}),e.jsx("span",{className:"ap-ephAgo",children:s.lastActivityAt?O(s.lastActivityAt):"—"})]},s.name))}):null]}):null,e.jsx("button",{type:"button",className:"ap-newAgent",disabled:!o,onClick:()=>o&&c.startSession(o.nodes[0].row),children:"+ New agent on this project"})]})]})})}export{Ze as AgentsLibrary};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-DkjnzvcJ.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
1
+ import{c}from"./createLucideIcon-ChvMq-zl.js";const e=[["path",{d:"M21 12a9 9 0 1 1-6.219-8.56",key:"13zald"}]],a=c("loader-circle",e);export{a as L};
@@ -1 +1 @@
1
- import{r}from"./index-C8uS5szO.js";import{a as d}from"./api-CaROe5_H.js";import{u as f}from"./Provider-5Hotn7NQ.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};
1
+ import{r}from"./index-DReVb7jZ.js";import{a as d}from"./api-DSqpVKC7.js";import{u as f}from"./Provider-CNZluAZb.js";function p(e){if(!e)return null;const s=e.split("/").filter(Boolean);return s[s.length-1]??null}function m(e,s){if(!e)return[];const l=new Set;for(const t of s)t.cwd&&l.add(t.cwd),t.projectRoot&&l.add(t.projectRoot);const o=new Map;for(const t of e.transcripts){if(!t.cwd)continue;const n=o.get(t.cwd),a=t.lastEventAt??t.mtimeMs,c=n?.lastEventAt??n?.mtimeMs??0;(!n||a>c)&&o.set(t.cwd,t)}const i=[];for(const t of e.processes){if(t.harness==="scout-managed"||t.cwd&&l.has(t.cwd))continue;const n=t.cwd?o.get(t.cwd):void 0,a=n?.project??p(t.cwd)??null,c=n?.lastEventAt??n?.mtimeMs??e.generatedAt,u=n?.sessionId??null;i.push({id:`harness:${t.source}:${t.pid}`,definitionId:`harness:${t.source}:${t.pid}`,name:t.source,handle:null,agentClass:"organic",harness:t.source,state:"working",projectRoot:t.cwd,cwd:t.cwd,updatedAt:c,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:a,branch:null,role:null,model:null,harnessSessionId:u,terminalSurface:null,harnessLogPath:n?.transcriptPath??null,conversationId:u??`harness:${t.pid}`,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null})}return i}function A(){const{agents:e}=f(),[s,l]=r.useState(null);r.useEffect(()=>{let t=!1;const n=async()=>{const c=await d("/api/tail/discover").catch(()=>null);t||l(c)};n();const a=setInterval(()=>{n()},1e4);return()=>{t=!0,clearInterval(a)}},[]);const o=r.useMemo(()=>m(s,e),[s,e]);return{agents:r.useMemo(()=>[...e,...o],[e,o]),scoutAgents:e,organicAgents:o,discovery:s}}export{A as u};
@@ -1 +1 @@
1
- import{a as A,n as H}from"./agent-state-DDhnFEEP.js";import{g as R}from"./Provider-5Hotn7NQ.js";import{s as v}from"./use-mesh-node-state-Ck9CYplv.js";function c(e){return e?e.replace(/^https?:\/\//,"").split("/")[0].split(":")[0].split(".")[0]||e.slice(0,8):""}function m(e){return e&&((e.hostName?c(e.hostName):null)||e.name)||"this host"}function j(e){if(!e)return"Host";const n=m(e.localNode);return n==="this host"?"Host":n}const u=new Set(["localhost","localhost.localdomain","127.0.0.1","::1"]);function I(e){const n=(e??"").trim().toLowerCase();return n.length===0||u.has(n)}function $(e){if(!I(e.hostName)){const a=c(e.hostName);if(a)return a}const n=c(e.dnsName);if(n&&!u.has(n.toLowerCase()))return n;const t=(e.name??"").trim();return t&&!u.has(t.toLowerCase())?t:"tailnet peer"}function g(e){const n=c(e.dnsName);if(n&&!u.has(n.toLowerCase()))return n.toLowerCase();if(!I(e.hostName)){const t=c(e.hostName);if(t)return t.toLowerCase()}return(e.name??"").trim().toLowerCase()}function b(e){return(c(e.hostName)||(e.name?c(e.name):"")).toLowerCase()}function M(e){return g(e).length===0}function N(e){if(e)return{nodeId:e.id,brokerUrl:e.brokerUrl??null,advertiseScope:e.advertiseScope??null,lastSeenAt:typeof e.lastSeenAt=="number"?e.lastSeenAt:null,capabilities:e.capabilities??[]}}function L(e){const n=(e??"").split("/")[0]?.trim();return n||null}function P(e,n){const t=R(e),a=new Map,r=n.localNode?.id??"local",S=m(n.localNode),y=(n.localNode&&n.nodes?.[n.localNode.id])??n.nodes?.[r];a.set(r,{machineId:r,machineLabel:S,kind:"this",reachability:"this",presence:"self",online:!0,host:y?.host,node:N(y)??{nodeId:r,brokerUrl:n.localNode?.brokerUrl??null,advertiseScope:n.localNode?.advertiseScope??null,lastSeenAt:null,capabilities:n.localNode?.capabilities??[]},agents:[]});const d=!!n.tailscale?.running,h=new Map;for(const o of n.tailscale?.peers??[]){const i=g(o);i&&(h.has(i)||h.set(i,o))}for(const o of Object.values(n.nodes??{})){if(!o?.id||o.id===r)continue;const i=h.get(b(o)),s=!i||!d?"unknown":i.online?"reachable":"unreachable";a.set(o.id,{machineId:o.id,machineLabel:m(o)||o.id,kind:"node",reachability:"peer",presence:s,online:s!=="unreachable",host:o.host,node:N(o),...i?{tailnet:{peerId:i.id,address:L(i.addresses?.[0]),os:i.os??null,online:!!(i.online&&d)}}:{},agents:[]})}for(const o of t){const i=o.authorityNodeId??o.homeNodeId??r,s=a.get(i);s&&s.agents.push(o)}const l=new Set;for(const o of a.values()){l.add(o.machineLabel.toLowerCase());const i=n.nodes?.[o.machineId];if(i){const s=b(i);s&&l.add(s)}}const k=n.localNode?b(n.localNode):"";k&&l.add(k);for(const o of n.tailscale?.peers??[]){if(M(o))continue;const i=$(o),s=g(o);if(s&&l.has(s)||l.has(i.toLowerCase()))continue;const f=`tailnet:${o.id}`;if(a.has(f))continue;const p=!!(o.online&&d);a.set(f,{machineId:f,machineLabel:i,kind:"tailnet",reachability:"tailnet",presence:d?p?"reachable":"unreachable":"unknown",online:p,tailnet:{peerId:o.id,address:L(o.addresses?.[0]),os:o.os??null,online:p},agents:[]}),s&&l.add(s),l.add(i.toLowerCase())}const w=o=>o.reachability==="this"?0:o.reachability==="peer"?1:2;return Array.from(a.values()).sort((o,i)=>{const s=w(o)-w(i);return s!==0?s:o.machineLabel.localeCompare(i.machineLabel)})}function z(e){const{machineId:n,on:t}=e,a=[{id:"open",label:"Show what's running here",hint:"Load this machine's current agents and activity",run:()=>t.select(n)},{id:"refresh",label:e.checking?"Checking…":"Refresh this node",hint:"Check reachability and re-read state now",disabled:e.checking,run:()=>t.refresh(n)},{id:"focus",label:`Focus on ${e.machineLabel}`,hint:"Show only this machine",run:()=>t.focus(n)},{id:"visibility",label:e.hidden?"Show this machine":"Hide this machine",run:()=>t.toggleHidden(n)}];return e.anyHidden&&a.push({id:"show-all",label:"Show all machines",run:()=>t.showAll()}),e.positioned&&t.clearPosition&&a.push({id:"clear-position",label:"Reset position",hint:"Put this machine back in the automatic layout",run:()=>t.clearPosition?.(n)}),e.canCopy&&e.nodeId&&a.push({id:"copy-node-id",label:"Copy node ID",run:()=>t.copy(e.nodeId)}),e.canCopy&&e.brokerUrl&&a.push({id:"copy-broker-url",label:"Copy broker address",run:()=>t.copy(e.brokerUrl)}),a}function C(e){return e.updatedAt??e.createdAt??0}function F(e,n){return e.kind==="this"?[...e.agents].sort((t,a)=>C(a)-C(t)).map(t=>({key:t.id,name:t.name,tone:H(t.state),title:t.name,agent:t,selectId:t.id})):!n||n.roster.length===0?[]:n.roster.map(t=>({key:t.id,name:t.title,meta:t.statusLabel??void 0,tone:B(t.state),title:t.projectRoot?`${t.title} — ${t.projectRoot}`:t.title,agent:null,selectId:null}))}function B(e){return e==="working"?"in_turn":e==="available"?"callable":"neutral"}function T(e,n,t){const a=n?.workload??null;if(a){const r=a.working===null?`${a.total}`:`${a.working}/${a.total}`;return n?.stale?`${r} · last known`:r}return t?"checking…":e.kind==="this"&&e.agents.length>0?`${e.agents.filter(r=>A(r.state)).length}/${e.agents.length}`:v(n).label.toLowerCase()}function _(e,n){return P(e,n).map(t=>t.kind==="this"?t:{...t,agents:[]})}export{P as a,z as b,_ as c,F as d,j as l,T as m};
1
+ import{a as A,n as H}from"./agent-state-DDhnFEEP.js";import{g as R}from"./Provider-CNZluAZb.js";import{s as v}from"./use-mesh-node-state-3V3ADQ-G.js";function c(e){return e?e.replace(/^https?:\/\//,"").split("/")[0].split(":")[0].split(".")[0]||e.slice(0,8):""}function m(e){return e&&((e.hostName?c(e.hostName):null)||e.name)||"this host"}function j(e){if(!e)return"Host";const n=m(e.localNode);return n==="this host"?"Host":n}const u=new Set(["localhost","localhost.localdomain","127.0.0.1","::1"]);function I(e){const n=(e??"").trim().toLowerCase();return n.length===0||u.has(n)}function $(e){if(!I(e.hostName)){const a=c(e.hostName);if(a)return a}const n=c(e.dnsName);if(n&&!u.has(n.toLowerCase()))return n;const t=(e.name??"").trim();return t&&!u.has(t.toLowerCase())?t:"tailnet peer"}function g(e){const n=c(e.dnsName);if(n&&!u.has(n.toLowerCase()))return n.toLowerCase();if(!I(e.hostName)){const t=c(e.hostName);if(t)return t.toLowerCase()}return(e.name??"").trim().toLowerCase()}function b(e){return(c(e.hostName)||(e.name?c(e.name):"")).toLowerCase()}function M(e){return g(e).length===0}function N(e){if(e)return{nodeId:e.id,brokerUrl:e.brokerUrl??null,advertiseScope:e.advertiseScope??null,lastSeenAt:typeof e.lastSeenAt=="number"?e.lastSeenAt:null,capabilities:e.capabilities??[]}}function L(e){const n=(e??"").split("/")[0]?.trim();return n||null}function P(e,n){const t=R(e),a=new Map,r=n.localNode?.id??"local",S=m(n.localNode),y=(n.localNode&&n.nodes?.[n.localNode.id])??n.nodes?.[r];a.set(r,{machineId:r,machineLabel:S,kind:"this",reachability:"this",presence:"self",online:!0,host:y?.host,node:N(y)??{nodeId:r,brokerUrl:n.localNode?.brokerUrl??null,advertiseScope:n.localNode?.advertiseScope??null,lastSeenAt:null,capabilities:n.localNode?.capabilities??[]},agents:[]});const d=!!n.tailscale?.running,h=new Map;for(const o of n.tailscale?.peers??[]){const i=g(o);i&&(h.has(i)||h.set(i,o))}for(const o of Object.values(n.nodes??{})){if(!o?.id||o.id===r)continue;const i=h.get(b(o)),s=!i||!d?"unknown":i.online?"reachable":"unreachable";a.set(o.id,{machineId:o.id,machineLabel:m(o)||o.id,kind:"node",reachability:"peer",presence:s,online:s!=="unreachable",host:o.host,node:N(o),...i?{tailnet:{peerId:i.id,address:L(i.addresses?.[0]),os:i.os??null,online:!!(i.online&&d)}}:{},agents:[]})}for(const o of t){const i=o.authorityNodeId??o.homeNodeId??r,s=a.get(i);s&&s.agents.push(o)}const l=new Set;for(const o of a.values()){l.add(o.machineLabel.toLowerCase());const i=n.nodes?.[o.machineId];if(i){const s=b(i);s&&l.add(s)}}const k=n.localNode?b(n.localNode):"";k&&l.add(k);for(const o of n.tailscale?.peers??[]){if(M(o))continue;const i=$(o),s=g(o);if(s&&l.has(s)||l.has(i.toLowerCase()))continue;const f=`tailnet:${o.id}`;if(a.has(f))continue;const p=!!(o.online&&d);a.set(f,{machineId:f,machineLabel:i,kind:"tailnet",reachability:"tailnet",presence:d?p?"reachable":"unreachable":"unknown",online:p,tailnet:{peerId:o.id,address:L(o.addresses?.[0]),os:o.os??null,online:p},agents:[]}),s&&l.add(s),l.add(i.toLowerCase())}const w=o=>o.reachability==="this"?0:o.reachability==="peer"?1:2;return Array.from(a.values()).sort((o,i)=>{const s=w(o)-w(i);return s!==0?s:o.machineLabel.localeCompare(i.machineLabel)})}function z(e){const{machineId:n,on:t}=e,a=[{id:"open",label:"Show what's running here",hint:"Load this machine's current agents and activity",run:()=>t.select(n)},{id:"refresh",label:e.checking?"Checking…":"Refresh this node",hint:"Check reachability and re-read state now",disabled:e.checking,run:()=>t.refresh(n)},{id:"focus",label:`Focus on ${e.machineLabel}`,hint:"Show only this machine",run:()=>t.focus(n)},{id:"visibility",label:e.hidden?"Show this machine":"Hide this machine",run:()=>t.toggleHidden(n)}];return e.anyHidden&&a.push({id:"show-all",label:"Show all machines",run:()=>t.showAll()}),e.positioned&&t.clearPosition&&a.push({id:"clear-position",label:"Reset position",hint:"Put this machine back in the automatic layout",run:()=>t.clearPosition?.(n)}),e.canCopy&&e.nodeId&&a.push({id:"copy-node-id",label:"Copy node ID",run:()=>t.copy(e.nodeId)}),e.canCopy&&e.brokerUrl&&a.push({id:"copy-broker-url",label:"Copy broker address",run:()=>t.copy(e.brokerUrl)}),a}function C(e){return e.updatedAt??e.createdAt??0}function F(e,n){return e.kind==="this"?[...e.agents].sort((t,a)=>C(a)-C(t)).map(t=>({key:t.id,name:t.name,tone:H(t.state),title:t.name,agent:t,selectId:t.id})):!n||n.roster.length===0?[]:n.roster.map(t=>({key:t.id,name:t.title,meta:t.statusLabel??void 0,tone:B(t.state),title:t.projectRoot?`${t.title} — ${t.projectRoot}`:t.title,agent:null,selectId:null}))}function B(e){return e==="working"?"in_turn":e==="available"?"callable":"neutral"}function T(e,n,t){const a=n?.workload??null;if(a){const r=a.working===null?`${a.total}`:`${a.working}/${a.total}`;return n?.stale?`${r} · last known`:r}return t?"checking…":e.kind==="this"&&e.agents.length>0?`${e.agents.filter(r=>A(r.state)).length}/${e.agents.length}`:v(n).label.toLowerCase()}function _(e,n){return P(e,n).map(t=>t.kind==="this"?t:{...t,agents:[]})}export{P as a,z as b,_ as c,F as d,j as l,T as m};
@@ -1 +1 @@
1
- import{j as l,r as d}from"./index-C8uS5szO.js";import{a as y}from"./colors-CFlbwC25.js";import{r as T}from"./index-C5cX8dkl.js";import{a as F}from"./api-CaROe5_H.js";import{n as V,d as K,e as Z}from"./agent-state-DDhnFEEP.js";import{u as N}from"./Provider-5Hotn7NQ.js";import{A as U}from"./AgentDetailCard-CFDE8TLi.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;V(e.state);const c=K(e.state,e)?30:Z(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await F(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Le(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":y(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Le as r};
1
+ import{j as l,r as d}from"./index-DReVb7jZ.js";import{a as y}from"./colors-CFlbwC25.js";import{r as T}from"./index-CbqBwfIW.js";import{a as F}from"./api-DSqpVKC7.js";import{n as V,d as K,e as Z}from"./agent-state-DDhnFEEP.js";import{u as N}from"./Provider-CNZluAZb.js";import{A as U}from"./AgentDetailCard-MIEBKw_S.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;V(e.state);const c=K(e.state,e)?30:Z(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await F(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Le(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":y(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Le as r};
@@ -1 +1 @@
1
- import{r as p}from"./index-C8uS5szO.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
1
+ import{r as p}from"./index-DReVb7jZ.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
@@ -1 +1 @@
1
- import{r as d}from"./index-C8uS5szO.js";const u=new Set(["in_turn","in_flight","needs_attention","callable","blocked"]),r="openscout.mesh.machinePositions.v1";function f(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(r);if(!e)return{};const n=JSON.parse(e);if(n&&typeof n=="object"){const i={};for(const[c,o]of Object.entries(n))o&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"&&(i[c]={x:o.x,y:o.y});return i}}catch{}return{}}function l(e){if(!(typeof window>"u"))try{window.localStorage.setItem(r,JSON.stringify(e))}catch{}}let t={mode:"map",density:"comfortable",selectedId:null,selectedType:null,meshSnapshot:null,probeCache:{},query:"",stateFilter:"all",agentStateFilters:u,hiddenMachineIds:new Set,collapsedMachineIds:new Set,treeFullMachineIds:new Set,scrollTargetMachineId:null,machinePositions:f()};const a=new Set;function s(){for(const e of a)e()}function p(e){t.mode!==e&&(t={...t,mode:e},s())}function g(e){t.density!==e&&(t={...t,density:e},s())}function w(e,n){t.selectedId===e&&t.selectedType===n||(t={...t,selectedId:e,selectedType:n},s())}function y(e){t={...t,meshSnapshot:e},s()}function P(e){t.query!==e&&(t={...t,query:e},s())}function I(e){t.stateFilter!==e&&(t={...t,stateFilter:e},s())}function b(e){const n=new Set(t.agentStateFilters);n.has(e)?n.delete(e):n.add(e),t={...t,agentStateFilters:n},s()}function m(e){const n=new Set(t.treeFullMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,treeFullMachineIds:n},s()}function x(e){const n=new Set(t.hiddenMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,hiddenMachineIds:n},s()}function T(e,n){const i=new Set;for(const c of n)c!==e&&i.add(c);t={...t,hiddenMachineIds:i},s()}function _(){t.hiddenMachineIds.size!==0&&(t={...t,hiddenMachineIds:new Set},s())}function F(e){const n=new Set(t.collapsedMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,collapsedMachineIds:n},s()}function A(e,n){const i={...t.machinePositions,[e]:n};t={...t,machinePositions:i},l(i),s()}function O(e){if(!(e in t.machinePositions))return;const n={...t.machinePositions};delete n[e],t={...t,machinePositions:n},l(n),s()}function E(){if(Object.keys(t.machinePositions).length===0)return;const e={};t={...t,machinePositions:e},l(e),s()}function j(e){t={...t,scrollTargetMachineId:e},s(),queueMicrotask(()=>{t.scrollTargetMachineId===e&&(t={...t,scrollTargetMachineId:null},s())})}function h(e){return a.add(e),()=>{a.delete(e)}}function M(){return t}function N(){return d.useSyncExternalStore(h,M)}export{w as a,F as b,A as c,O as d,_ as e,T as f,E as g,p as h,g as i,P as j,I as k,b as l,m,j as r,y as s,x as t,N as u};
1
+ import{r as d}from"./index-DReVb7jZ.js";const u=new Set(["in_turn","in_flight","needs_attention","callable","blocked"]),r="openscout.mesh.machinePositions.v1";function f(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(r);if(!e)return{};const n=JSON.parse(e);if(n&&typeof n=="object"){const i={};for(const[c,o]of Object.entries(n))o&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"&&(i[c]={x:o.x,y:o.y});return i}}catch{}return{}}function l(e){if(!(typeof window>"u"))try{window.localStorage.setItem(r,JSON.stringify(e))}catch{}}let t={mode:"map",density:"comfortable",selectedId:null,selectedType:null,meshSnapshot:null,probeCache:{},query:"",stateFilter:"all",agentStateFilters:u,hiddenMachineIds:new Set,collapsedMachineIds:new Set,treeFullMachineIds:new Set,scrollTargetMachineId:null,machinePositions:f()};const a=new Set;function s(){for(const e of a)e()}function p(e){t.mode!==e&&(t={...t,mode:e},s())}function g(e){t.density!==e&&(t={...t,density:e},s())}function w(e,n){t.selectedId===e&&t.selectedType===n||(t={...t,selectedId:e,selectedType:n},s())}function y(e){t={...t,meshSnapshot:e},s()}function P(e){t.query!==e&&(t={...t,query:e},s())}function I(e){t.stateFilter!==e&&(t={...t,stateFilter:e},s())}function b(e){const n=new Set(t.agentStateFilters);n.has(e)?n.delete(e):n.add(e),t={...t,agentStateFilters:n},s()}function m(e){const n=new Set(t.treeFullMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,treeFullMachineIds:n},s()}function x(e){const n=new Set(t.hiddenMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,hiddenMachineIds:n},s()}function T(e,n){const i=new Set;for(const c of n)c!==e&&i.add(c);t={...t,hiddenMachineIds:i},s()}function _(){t.hiddenMachineIds.size!==0&&(t={...t,hiddenMachineIds:new Set},s())}function F(e){const n=new Set(t.collapsedMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,collapsedMachineIds:n},s()}function A(e,n){const i={...t.machinePositions,[e]:n};t={...t,machinePositions:i},l(i),s()}function O(e){if(!(e in t.machinePositions))return;const n={...t.machinePositions};delete n[e],t={...t,machinePositions:n},l(n),s()}function E(){if(Object.keys(t.machinePositions).length===0)return;const e={};t={...t,machinePositions:e},l(e),s()}function j(e){t={...t,scrollTargetMachineId:e},s(),queueMicrotask(()=>{t.scrollTargetMachineId===e&&(t={...t,scrollTargetMachineId:null},s())})}function h(e){return a.add(e),()=>{a.delete(e)}}function M(){return t}function N(){return d.useSyncExternalStore(h,M)}export{w as a,F as b,A as c,O as d,_ as e,T as f,E as g,p as h,g as i,P as j,I as k,b as l,m,j as r,y as s,x as t,N as u};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DkjnzvcJ.js";const c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],a=e("message-circle",c);export{a as M};
1
+ import{c as e}from"./createLucideIcon-ChvMq-zl.js";const c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],a=e("message-circle",c);export{a as M};
@@ -1,4 +1,4 @@
1
- import{j as i}from"./index-C8uS5szO.js";import{r as c}from"./mentions-Ctw1ECUC.js";const h=/^```([a-z0-9_-]+)?\s*$/iu,E=/^(#{1,6})\s+(.+)$/u,L=/^(?:-{3,}|\*{3,}|_{3,})$/u,_=/^\s*[-*]\s+(.+)$/u,M=/^\s*\d+[.)]\s+(.+)$/u,w=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function B(e){return/[\r\n]/u.test(e)||!(/(?:(?:\\r)?\\n){2}/u.test(e)||/(?:\\r)?\\n(?=\s*(?:#{1,6}\s|[-*+]\s|>\s|\d+[.)]\s|[A-Z][A-Za-z ]{0,40}:))/u.test(e))?e:e.replace(/\\r\\n|\\n|\\r/gu,`
1
+ import{j as i}from"./index-DReVb7jZ.js";import{r as c}from"./mentions-Ck_Vjnyp.js";const h=/^```([a-z0-9_-]+)?\s*$/iu,E=/^(#{1,6})\s+(.+)$/u,L=/^(?:-{3,}|\*{3,}|_{3,})$/u,_=/^\s*[-*]\s+(.+)$/u,M=/^\s*\d+[.)]\s+(.+)$/u,w=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function B(e){return/[\r\n]/u.test(e)||!(/(?:(?:\\r)?\\n){2}/u.test(e)||/(?:\\r)?\\n(?=\s*(?:#{1,6}\s|[-*+]\s|>\s|\d+[.)]\s|[A-Z][A-Za-z ]{0,40}:))/u.test(e))?e:e.replace(/\\r\\n|\\n|\\r/gu,`
2
2
  `)}function P(e){const s=B(e).replace(/\r\n?/gu,`
3
3
  `).trim();return s?s.replace(/([^\n])\s+---\s+(?=(?:#{1,6}\s|\*\*|[A-Z0-9]))/gu,`$1
4
4
 
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DkjnzvcJ.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],o=a("message-square",e);export{o as M};
1
+ import{c as a}from"./createLucideIcon-ChvMq-zl.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],o=a("message-square",e);export{o as M};
@@ -1 +1 @@
1
- import{r as c}from"./index-C8uS5szO.js";const a=[{label:"5m",value:5*6e4},{label:"30m",value:30*6e4},{label:"4h",value:240*6e4},{label:"24h",value:1440*6e4}],f=[{id:"live",label:"live",activityFilter:"live",windowMs:null},...a.map(e=>({id:e.label,label:e.label,activityFilter:"active",windowMs:e.value})),{id:"all",label:"all",activityFilter:"all",windowMs:null}];function F(e){return e.activityFilter==="live"?"live":e.activityFilter==="all"?"all":a.find(i=>i.value===e.activityWindowMs)?.label??a[a.length-1].label}function d(e,i){const l=f.find(r=>r.id===i);if(!l)return e;const s=l.windowMs??e.activityWindowMs;return e.activityFilter===l.activityFilter&&e.activityWindowMs===s?e:{activityFilter:l.activityFilter,activityWindowMs:s}}let t={activityFilter:"active",sourceFilter:"all",activityWindowMs:a[3].value,groupMode:"activity",query:"",focusedId:null,revealRequest:null,visibleAgents:[],selectedIds:[]};const u=new Set;let o=0;function n(){for(const e of u)e()}function b(e){t.sourceFilter!==e&&(t={...t,sourceFilter:e},n())}function S(e){const i=d(t,e);i!==t&&(t={...t,...i},n())}function g(e){t.groupMode!==e&&(t={...t,groupMode:e},n())}function m(e){t.query!==e&&(t={...t,query:e},n())}function w(e){t.focusedId!==e&&(t={...t,focusedId:e},n())}function A(e){o+=1,t={...t,revealRequest:{id:e,serial:o}},n()}function _(e){t.revealRequest?.serial===e&&(t={...t,revealRequest:null},n())}function v(e,i){if(e===i)return!0;if(e.length!==i.length)return!1;for(let l=0;l<e.length;l++){const s=e[l],r=i[l];if(s.id!==r.id||s.state!==r.state||s.updatedAt!==r.updatedAt||s.activity!==r.activity||s.lastActiveAt!==r.lastActiveAt)return!1}return!0}function h(e){v(t.visibleAgents,e)||(t={...t,visibleAgents:e},n())}function p(e){const i=t.selectedIds.includes(e);t={...t,selectedIds:i?t.selectedIds.filter(l=>l!==e):[...t.selectedIds,e]},n()}function q(){t.selectedIds.length!==0&&(t={...t,selectedIds:[]},n())}function M(e){return u.add(e),()=>{u.delete(e)}}function y(){return t}function R(){return c.useSyncExternalStore(M,y)}export{f as M,m as a,S as b,g as c,q as d,h as e,_ as f,w as g,F as m,A as r,b as s,p as t,R as u};
1
+ import{r as c}from"./index-DReVb7jZ.js";const a=[{label:"5m",value:5*6e4},{label:"30m",value:30*6e4},{label:"4h",value:240*6e4},{label:"24h",value:1440*6e4}],f=[{id:"live",label:"live",activityFilter:"live",windowMs:null},...a.map(e=>({id:e.label,label:e.label,activityFilter:"active",windowMs:e.value})),{id:"all",label:"all",activityFilter:"all",windowMs:null}];function F(e){return e.activityFilter==="live"?"live":e.activityFilter==="all"?"all":a.find(i=>i.value===e.activityWindowMs)?.label??a[a.length-1].label}function d(e,i){const l=f.find(r=>r.id===i);if(!l)return e;const s=l.windowMs??e.activityWindowMs;return e.activityFilter===l.activityFilter&&e.activityWindowMs===s?e:{activityFilter:l.activityFilter,activityWindowMs:s}}let t={activityFilter:"active",sourceFilter:"all",activityWindowMs:a[3].value,groupMode:"activity",query:"",focusedId:null,revealRequest:null,visibleAgents:[],selectedIds:[]};const u=new Set;let o=0;function n(){for(const e of u)e()}function b(e){t.sourceFilter!==e&&(t={...t,sourceFilter:e},n())}function S(e){const i=d(t,e);i!==t&&(t={...t,...i},n())}function g(e){t.groupMode!==e&&(t={...t,groupMode:e},n())}function m(e){t.query!==e&&(t={...t,query:e},n())}function w(e){t.focusedId!==e&&(t={...t,focusedId:e},n())}function A(e){o+=1,t={...t,revealRequest:{id:e,serial:o}},n()}function _(e){t.revealRequest?.serial===e&&(t={...t,revealRequest:null},n())}function v(e,i){if(e===i)return!0;if(e.length!==i.length)return!1;for(let l=0;l<e.length;l++){const s=e[l],r=i[l];if(s.id!==r.id||s.state!==r.state||s.updatedAt!==r.updatedAt||s.activity!==r.activity||s.lastActiveAt!==r.lastActiveAt)return!1}return!0}function h(e){v(t.visibleAgents,e)||(t={...t,visibleAgents:e},n())}function p(e){const i=t.selectedIds.includes(e);t={...t,selectedIds:i?t.selectedIds.filter(l=>l!==e):[...t.selectedIds,e]},n()}function q(){t.selectedIds.length!==0&&(t={...t,selectedIds:[]},n())}function M(e){return u.add(e),()=>{u.delete(e)}}function y(){return t}function R(){return c.useSyncExternalStore(M,y)}export{f as M,m as a,S as b,g as c,q as d,h as e,_ as f,w as g,F as m,A as r,b as s,p as t,R as u};
@@ -0,0 +1 @@
1
+ import{c as e}from"./createLucideIcon-ChvMq-zl.js";const o=[["rect",{width:"20",height:"14",x:"2",y:"3",rx:"2",key:"48i651"}],["line",{x1:"8",x2:"16",y1:"21",y2:"21",key:"1svkeh"}],["line",{x1:"12",x2:"12",y1:"17",y2:"21",key:"vw1qmm"}]],t=e("monitor",o);export{t as M};
@@ -1 +1 @@
1
- import{c as s}from"./createLucideIcon-DkjnzvcJ.js";import{M as w}from"./message-square-NmXWtWLR.js";import{T as l}from"./terminal-96JWDYDL.js";import{S as c}from"./search-C4VlW_0l.js";import{C as p}from"./compass-DTZdCpv9.js";import{S as f}from"./settings-TJIkkZ0P.js";import{F as g}from"./file-text-ChtICwub.js";import{G as k}from"./git-branch-CA3cHKCI.js";import{C as y}from"./code-xml-BmyLM0I2.js";import{S as A}from"./scroll-text-DwC8r2g6.js";const O=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],R=s("folder-kanban",O);const C=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],v=s("house",C);const S=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],b=s("send",S),j=[{id:"home",label:"Home",icon:v,defaultRoute:{view:"inbox"},section:"navigate"},{id:"chat",label:"Chat",icon:w,defaultRoute:{view:"messages"},section:"navigate"},{id:"projects",label:"Agents",icon:R,defaultRoute:{view:"agents-v2"},section:"navigate"},{id:"sessions",label:"Terminals",icon:l,defaultRoute:{view:"terminal"},section:"navigate"},{id:"dispatch",label:"Broker",icon:b,defaultRoute:{view:"broker"},section:"navigate"},{id:"search",label:"Search",icon:c,defaultRoute:{view:"search"},section:"navigate"},{id:"ops",label:"Ops",icon:p,defaultRoute:{view:"ops",mode:"mission"},section:"system"},{id:"settings",label:"Settings",icon:f,defaultRoute:{view:"settings",section:"appearance"},section:"system"}],n={inbox:"home",activity:"home",briefings:"home","agents-v2":"projects","agent-info":"projects",repos:"projects","repo-diff":"projects",code:"projects",sessions:"sessions",terminal:"sessions",messages:"chat",conversation:"chat",broker:"dispatch",work:"dispatch",follow:"dispatch",search:"search",ops:"ops",mesh:"ops","mesh-ops":"ops",harnesses:"ops",settings:"settings",voice:"settings"},N=new Map(j.map(e=>[e.id,e]));function _(e){const i=N.get(e);if(!i)throw new Error(`Unknown primary area: ${e}`);return i}function Q(e){if(e.view==="follow"&&e.preferredView)switch(e.preferredView){case"tail":return"ops";case"session":return"sessions";case"chat":return"chat";case"work":return"dispatch"}return n[e.view]}function ee(e,i){const t=_(e);return e==="ops"?i?.opsControlEnabled??!0?{view:"ops",mode:"mission"}:{view:"ops",mode:"tail"}:t.defaultRoute}function G(e){return e.view==="ops"&&(e.mode===void 0||e.mode==="mission"||e.mode==="issues")}const E=[{id:"home",label:"Home",route:{view:"inbox"},active:e=>e.view==="inbox"},{id:"projects",label:"Agents",route:{view:"agents-v2"},active:e=>e.view==="agents-v2"||e.view==="agent-info"},{id:"sessions",label:"Sessions",route:{view:"sessions"},active:e=>e.view==="sessions"},{id:"chat",label:"Chat",route:{view:"messages"},active:e=>e.view==="messages"||e.view==="conversation"},{id:"search",label:"Search",route:{view:"search"},active:e=>e.view==="search"},{id:"terminals",label:"Terminals",route:{view:"terminal"},active:e=>e.view==="terminal"},{id:"tail",label:"Live Activity",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{id:"dispatch",label:"Broker",route:{view:"broker"},active:e=>e.view==="broker"},{id:"activity",label:"Activity Log",route:{view:"activity"},active:e=>e.view==="activity"},{id:"mesh",label:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{id:"mesh-ops",label:"Mesh Ops",route:{view:"mesh-ops"},active:e=>e.view==="mesh-ops",capability:"surface.mesh-ops"},{id:"mission-control",label:"Mission Control",route:{view:"ops",mode:"mission"},active:G,capability:"ops.control"},{id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},active:e=>e.view==="ops"&&e.mode==="lanes"},{id:"world",label:"World",route:{view:"ops",mode:"world"},active:e=>e.view==="ops"&&e.mode==="world"},{id:"repos",label:"Repositories",route:{view:"repos"},active:e=>e.view==="repos"||e.view==="repo-diff"},{id:"code",label:"Code Browser",route:{view:"code"},active:e=>e.view==="code"},{id:"providers",label:"Agent Providers",route:{view:"harnesses"},active:e=>e.view==="harnesses"},{id:"runtime",label:"Runtime Monitor",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop",capability:"ops.control"},{id:"advisor",label:"Host Advisor",route:{view:"ops",mode:"advisor"},active:e=>e.view==="ops"&&e.mode==="advisor"},{id:"agent-config",label:"Agent Configuration",route:{view:"settings",section:"agents"},active:e=>e.view==="settings"&&e.section==="agents"},{id:"ops",label:"Ops",route:{view:"ops"},active:e=>e.view==="ops"}],T=new Map(E.map(e=>[e.id,e]));function a(e){const i=T.get(e);if(!i)throw new Error(`Unknown nav destination: ${e}`);return i}function d(e,i){const t=a(e);return{id:t.id,label:i?.label??t.label,route:i?.route??t.route,active:i?.active??t.active,capability:t.capability}}const M=[{destinationId:"home",key:"home"},{destinationId:"chat",key:"chat"},{destinationId:"projects",key:"agents"},{destinationId:"terminals",key:"terminals"},{destinationId:"dispatch",key:"broker"},{destinationId:"search",key:"search"},{destinationId:"ops",key:"ops"}];function ie(){return M.map(e=>{const i=a(e.destinationId);return{key:e.key,label:e.label??i.label,route:i.route}})}function u(e){return{items:e.map(i=>{const t=d(i.destinationId,{label:i.label,route:i.route,active:i.active});return{id:i.id,label:t.label,route:t.route,active:t.active}})}}function te(){return[u([{destinationId:"agent-config",id:"config",label:"Agent Configuration"}])]}function oe(){return[u([{destinationId:"lanes",id:"lanes"},{destinationId:"world",id:"world"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Agent Providers"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"runtime",id:"runtime"},{destinationId:"advisor",id:"advisor"}])]}const P=[{key:"h",label:"Go home",destinationId:"home"},{key:"i",label:"Go to messages",destinationId:"chat"},{key:"c",label:"Go to messages",destinationId:"chat"},{key:"p",label:"Go to agents",destinationId:"projects"},{key:"s",label:"Go to sessions",destinationId:"sessions"},{key:"t",label:"Go to terminals",destinationId:"terminals"},{key:"r",label:"Go to repositories",destinationId:"repos"},{key:"b",label:"Go to code browser",destinationId:"code"},{key:"f",label:"Go to search",destinationId:"search"},{key:"l",label:"Go to live activity",destinationId:"tail"},{key:"w",label:"Go to world",destinationId:"world"},{key:"o",label:"Go to operations",destinationId:"mission-control",route:{view:"ops"}},{key:"d",label:"Go to broker",destinationId:"dispatch"},{key:"m",label:"Go to network",destinationId:"mesh"},{key:"a",label:"Go to activity log",destinationId:"activity"}];function ae(){return P.map(e=>{const i=a(e.destinationId);return{key:e.key,label:e.label,route:e.route??i.route,destinationId:e.destinationId}})}const B=[{destinationId:"sessions",id:"sessions",icon:g},{destinationId:"terminals",id:"terminals",icon:l},{destinationId:"repos",id:"repos",icon:k},{destinationId:"code",id:"code",icon:y},{destinationId:"search",id:"search",icon:c},{destinationId:"tail",id:"tail",icon:A},{destinationId:"mission-control",id:"ops",label:"Ops",icon:p,route:{view:"ops",mode:"mission"},opsGated:!0},{destinationId:"home",id:"home",icon:v},{destinationId:"dispatch",id:"dispatch",icon:b}];function se(){return B.map(e=>{const i=a(e.destinationId);return{id:e.id,label:e.label??i.label,icon:e.icon,route:e.route??i.route,destinationId:e.destinationId,opsGated:e.opsGated??i.capability==="ops.control"}})}const x=[{id:"nav:home",label:"Go to Home",destinationId:"home",shortcut:"Cmd+1"},{id:"nav:agents",label:"Go to Agents",destinationId:"projects",shortcut:"Cmd+2"},{id:"nav:messages",label:"Go to Chat",destinationId:"chat",shortcut:"Cmd+3"},{id:"nav:sessions",label:"Open Sessions",destinationId:"sessions"},{id:"nav:terminals",label:"Open Terminals",destinationId:"terminals"},{id:"nav:search",label:"Go to Search",destinationId:"search",shortcut:"Cmd+4"},{id:"nav:activity",label:"Open Activity",destinationId:"activity"},{id:"nav:mesh",label:"Open Network",destinationId:"mesh"},{id:"nav:dispatch",label:"Open Broker",destinationId:"dispatch"},{id:"nav:repos",label:"Open Repositories",destinationId:"repos"},{id:"nav:code",label:"Open Code Browser",destinationId:"code"},{id:"nav:harnesses",label:"Open Providers",destinationId:"providers"},{id:"nav:ops-lanes",label:"Open Agent Lanes",destinationId:"lanes"},{id:"nav:ops-world",label:"Open World",destinationId:"world"},{id:"nav:ops",label:"Go to Ops",destinationId:"mission-control",route:{view:"ops"},shortcut:"Cmd+5",capability:"ops.control"},{id:"nav:ops-atop",label:"Open Runtime",destinationId:"runtime",capability:"ops.control"},{id:"nav:agent-config",label:"Open Agent Configuration",destinationId:"agent-config"}];function D(e){const i=e?.opsEnabled??!0;return x.filter(t=>!((t.capability??a(t.destinationId).capability)==="ops.control"&&!i)).map(t=>{const o=a(t.destinationId);return{id:t.id,label:t.label,destinationId:t.destinationId,route:t.route??o.route,shortcut:t.shortcut,capability:t.capability??o.capability}})}function ne(e,i){return D(i).map(t=>({id:t.id,label:t.label,action:()=>e(t.route),shortcut:t.shortcut}))}const m={projects:[{destinationId:"projects",id:"projects"},{destinationId:"repos",id:"repos"},{destinationId:"code",id:"code"}],sessions:[{destinationId:"sessions",id:"sessions"},{destinationId:"terminals",id:"terminals"}]};function F(e){const i=d(e.destinationId,{label:e.label});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function H(e){return m[e].map(F)}function de(e){const i=n[e.view];if(i!=="projects"&&i!=="sessions")return null;const t=i;return{areaId:t,items:H(t)}}const r={...m,dispatch:[{destinationId:"dispatch",id:"dispatch-all",label:"All Dispatches",route:{view:"broker"},active:e=>e.view==="broker"&&(e.filter===void 0||e.filter==="all")},{destinationId:"dispatch",id:"dispatch-delivered",label:"Delivered",route:{view:"broker",filter:"delivered"},active:e=>e.view==="broker"&&e.filter==="delivered"},{destinationId:"dispatch",id:"dispatch-failed",label:"Failed",route:{view:"broker",filter:"failed"},active:e=>e.view==="broker"&&e.filter==="failed"}],ops:[{destinationId:"lanes",id:"lanes",label:"Lanes"},{destinationId:"world",id:"world",label:"World"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Providers"},{destinationId:"runtime",id:"runtime",label:"Runtime"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"advisor",id:"advisor"}]};function J(e){const i=d(e.destinationId,{label:e.label,route:e.route,active:e.active});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function re(e,i){const t=n[e.view];if(!(t in r))return null;const o=t,h=r[o].map(J).filter(I=>a(I.destinationId).capability!=="ops.control"||i?.opsControlEnabled!==!1);return{areaId:o,items:h}}export{j as P,oe as a,te as b,ie as c,ne as d,se as e,Q as f,ee as g,_ as h,de as i,ae as p,re as s};
1
+ import{c as s}from"./createLucideIcon-ChvMq-zl.js";import{M as w}from"./message-square-CJW4WRlo.js";import{T as l}from"./terminal-DMZjX1es.js";import{S as c}from"./search-UsM-9-_W.js";import{C as p}from"./compass-CvzkzkIh.js";import{S as f}from"./settings-C69Zjrpq.js";import{F as g}from"./file-text-DP6txVW-.js";import{G as k}from"./git-branch-DcUCsWdJ.js";import{C as y}from"./code-xml-Cmadr3pQ.js";import{S as A}from"./scroll-text-B0tKI9Sg.js";const O=[["path",{d:"M4 20h16a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.93a2 2 0 0 1-1.66-.9l-.82-1.2A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13c0 1.1.9 2 2 2Z",key:"1fr9dc"}],["path",{d:"M8 10v4",key:"tgpxqk"}],["path",{d:"M12 10v2",key:"hh53o1"}],["path",{d:"M16 10v6",key:"1d6xys"}]],R=s("folder-kanban",O);const C=[["path",{d:"M15 21v-8a1 1 0 0 0-1-1h-4a1 1 0 0 0-1 1v8",key:"5wwlr5"}],["path",{d:"M3 10a2 2 0 0 1 .709-1.528l7-6a2 2 0 0 1 2.582 0l7 6A2 2 0 0 1 21 10v9a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2z",key:"r6nss1"}]],v=s("house",C);const S=[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]],b=s("send",S),j=[{id:"home",label:"Home",icon:v,defaultRoute:{view:"inbox"},section:"navigate"},{id:"chat",label:"Chat",icon:w,defaultRoute:{view:"messages"},section:"navigate"},{id:"projects",label:"Agents",icon:R,defaultRoute:{view:"agents-v2"},section:"navigate"},{id:"sessions",label:"Terminals",icon:l,defaultRoute:{view:"terminal"},section:"navigate"},{id:"dispatch",label:"Broker",icon:b,defaultRoute:{view:"broker"},section:"navigate"},{id:"search",label:"Search",icon:c,defaultRoute:{view:"search"},section:"navigate"},{id:"ops",label:"Ops",icon:p,defaultRoute:{view:"ops",mode:"mission"},section:"system"},{id:"settings",label:"Settings",icon:f,defaultRoute:{view:"settings",section:"appearance"},section:"system"}],n={inbox:"home",activity:"home",briefings:"home","agents-v2":"projects","agent-info":"projects",repos:"projects","repo-diff":"projects",code:"projects",sessions:"sessions",terminal:"sessions",messages:"chat",conversation:"chat",broker:"dispatch",work:"dispatch",follow:"dispatch",search:"search",ops:"ops",mesh:"ops","mesh-ops":"ops",harnesses:"ops",settings:"settings",voice:"settings"},N=new Map(j.map(e=>[e.id,e]));function _(e){const i=N.get(e);if(!i)throw new Error(`Unknown primary area: ${e}`);return i}function Q(e){if(e.view==="follow"&&e.preferredView)switch(e.preferredView){case"tail":return"ops";case"session":return"sessions";case"chat":return"chat";case"work":return"dispatch"}return n[e.view]}function ee(e,i){const t=_(e);return e==="ops"?i?.opsControlEnabled??!0?{view:"ops",mode:"mission"}:{view:"ops",mode:"tail"}:t.defaultRoute}function G(e){return e.view==="ops"&&(e.mode===void 0||e.mode==="mission"||e.mode==="issues")}const E=[{id:"home",label:"Home",route:{view:"inbox"},active:e=>e.view==="inbox"},{id:"projects",label:"Agents",route:{view:"agents-v2"},active:e=>e.view==="agents-v2"||e.view==="agent-info"},{id:"sessions",label:"Sessions",route:{view:"sessions"},active:e=>e.view==="sessions"},{id:"chat",label:"Chat",route:{view:"messages"},active:e=>e.view==="messages"||e.view==="conversation"},{id:"search",label:"Search",route:{view:"search"},active:e=>e.view==="search"},{id:"terminals",label:"Terminals",route:{view:"terminal"},active:e=>e.view==="terminal"},{id:"tail",label:"Live Activity",route:{view:"ops",mode:"tail"},active:e=>e.view==="ops"&&e.mode==="tail"},{id:"dispatch",label:"Broker",route:{view:"broker"},active:e=>e.view==="broker"},{id:"activity",label:"Activity Log",route:{view:"activity"},active:e=>e.view==="activity"},{id:"mesh",label:"Network",route:{view:"mesh"},active:e=>e.view==="mesh"},{id:"mesh-ops",label:"Mesh Ops",route:{view:"mesh-ops"},active:e=>e.view==="mesh-ops",capability:"surface.mesh-ops"},{id:"mission-control",label:"Mission Control",route:{view:"ops",mode:"mission"},active:G,capability:"ops.control"},{id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},active:e=>e.view==="ops"&&e.mode==="lanes"},{id:"world",label:"World",route:{view:"ops",mode:"world"},active:e=>e.view==="ops"&&e.mode==="world"},{id:"repos",label:"Repositories",route:{view:"repos"},active:e=>e.view==="repos"||e.view==="repo-diff"},{id:"code",label:"Code Browser",route:{view:"code"},active:e=>e.view==="code"},{id:"providers",label:"Agent Providers",route:{view:"harnesses"},active:e=>e.view==="harnesses"},{id:"runtime",label:"Runtime Monitor",route:{view:"ops",mode:"atop"},active:e=>e.view==="ops"&&e.mode==="atop",capability:"ops.control"},{id:"advisor",label:"Host Advisor",route:{view:"ops",mode:"advisor"},active:e=>e.view==="ops"&&e.mode==="advisor"},{id:"agent-config",label:"Agent Configuration",route:{view:"settings",section:"agents"},active:e=>e.view==="settings"&&e.section==="agents"},{id:"ops",label:"Ops",route:{view:"ops"},active:e=>e.view==="ops"}],T=new Map(E.map(e=>[e.id,e]));function a(e){const i=T.get(e);if(!i)throw new Error(`Unknown nav destination: ${e}`);return i}function d(e,i){const t=a(e);return{id:t.id,label:i?.label??t.label,route:i?.route??t.route,active:i?.active??t.active,capability:t.capability}}const M=[{destinationId:"home",key:"home"},{destinationId:"chat",key:"chat"},{destinationId:"projects",key:"agents"},{destinationId:"terminals",key:"terminals"},{destinationId:"dispatch",key:"broker"},{destinationId:"search",key:"search"},{destinationId:"ops",key:"ops"}];function ie(){return M.map(e=>{const i=a(e.destinationId);return{key:e.key,label:e.label??i.label,route:i.route}})}function u(e){return{items:e.map(i=>{const t=d(i.destinationId,{label:i.label,route:i.route,active:i.active});return{id:i.id,label:t.label,route:t.route,active:t.active}})}}function te(){return[u([{destinationId:"agent-config",id:"config",label:"Agent Configuration"}])]}function oe(){return[u([{destinationId:"lanes",id:"lanes"},{destinationId:"world",id:"world"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Agent Providers"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"runtime",id:"runtime"},{destinationId:"advisor",id:"advisor"}])]}const P=[{key:"h",label:"Go home",destinationId:"home"},{key:"i",label:"Go to messages",destinationId:"chat"},{key:"c",label:"Go to messages",destinationId:"chat"},{key:"p",label:"Go to agents",destinationId:"projects"},{key:"s",label:"Go to sessions",destinationId:"sessions"},{key:"t",label:"Go to terminals",destinationId:"terminals"},{key:"r",label:"Go to repositories",destinationId:"repos"},{key:"b",label:"Go to code browser",destinationId:"code"},{key:"f",label:"Go to search",destinationId:"search"},{key:"l",label:"Go to live activity",destinationId:"tail"},{key:"w",label:"Go to world",destinationId:"world"},{key:"o",label:"Go to operations",destinationId:"mission-control",route:{view:"ops"}},{key:"d",label:"Go to broker",destinationId:"dispatch"},{key:"m",label:"Go to network",destinationId:"mesh"},{key:"a",label:"Go to activity log",destinationId:"activity"}];function ae(){return P.map(e=>{const i=a(e.destinationId);return{key:e.key,label:e.label,route:e.route??i.route,destinationId:e.destinationId}})}const B=[{destinationId:"sessions",id:"sessions",icon:g},{destinationId:"terminals",id:"terminals",icon:l},{destinationId:"repos",id:"repos",icon:k},{destinationId:"code",id:"code",icon:y},{destinationId:"search",id:"search",icon:c},{destinationId:"tail",id:"tail",icon:A},{destinationId:"mission-control",id:"ops",label:"Ops",icon:p,route:{view:"ops",mode:"mission"},opsGated:!0},{destinationId:"home",id:"home",icon:v},{destinationId:"dispatch",id:"dispatch",icon:b}];function se(){return B.map(e=>{const i=a(e.destinationId);return{id:e.id,label:e.label??i.label,icon:e.icon,route:e.route??i.route,destinationId:e.destinationId,opsGated:e.opsGated??i.capability==="ops.control"}})}const x=[{id:"nav:home",label:"Go to Home",destinationId:"home",shortcut:"Cmd+1"},{id:"nav:agents",label:"Go to Agents",destinationId:"projects",shortcut:"Cmd+2"},{id:"nav:messages",label:"Go to Chat",destinationId:"chat",shortcut:"Cmd+3"},{id:"nav:sessions",label:"Open Sessions",destinationId:"sessions"},{id:"nav:terminals",label:"Open Terminals",destinationId:"terminals"},{id:"nav:search",label:"Go to Search",destinationId:"search",shortcut:"Cmd+4"},{id:"nav:activity",label:"Open Activity",destinationId:"activity"},{id:"nav:mesh",label:"Open Network",destinationId:"mesh"},{id:"nav:dispatch",label:"Open Broker",destinationId:"dispatch"},{id:"nav:repos",label:"Open Repositories",destinationId:"repos"},{id:"nav:code",label:"Open Code Browser",destinationId:"code"},{id:"nav:harnesses",label:"Open Providers",destinationId:"providers"},{id:"nav:ops-lanes",label:"Open Agent Lanes",destinationId:"lanes"},{id:"nav:ops-world",label:"Open World",destinationId:"world"},{id:"nav:ops",label:"Go to Ops",destinationId:"mission-control",route:{view:"ops"},shortcut:"Cmd+5",capability:"ops.control"},{id:"nav:ops-atop",label:"Open Runtime",destinationId:"runtime",capability:"ops.control"},{id:"nav:agent-config",label:"Open Agent Configuration",destinationId:"agent-config"}];function D(e){const i=e?.opsEnabled??!0;return x.filter(t=>!((t.capability??a(t.destinationId).capability)==="ops.control"&&!i)).map(t=>{const o=a(t.destinationId);return{id:t.id,label:t.label,destinationId:t.destinationId,route:t.route??o.route,shortcut:t.shortcut,capability:t.capability??o.capability}})}function ne(e,i){return D(i).map(t=>({id:t.id,label:t.label,action:()=>e(t.route),shortcut:t.shortcut}))}const m={projects:[{destinationId:"projects",id:"projects"},{destinationId:"repos",id:"repos"},{destinationId:"code",id:"code"}],sessions:[{destinationId:"sessions",id:"sessions"},{destinationId:"terminals",id:"terminals"}]};function F(e){const i=d(e.destinationId,{label:e.label});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function H(e){return m[e].map(F)}function de(e){const i=n[e.view];if(i!=="projects"&&i!=="sessions")return null;const t=i;return{areaId:t,items:H(t)}}const r={...m,dispatch:[{destinationId:"dispatch",id:"dispatch-all",label:"All Dispatches",route:{view:"broker"},active:e=>e.view==="broker"&&(e.filter===void 0||e.filter==="all")},{destinationId:"dispatch",id:"dispatch-delivered",label:"Delivered",route:{view:"broker",filter:"delivered"},active:e=>e.view==="broker"&&e.filter==="delivered"},{destinationId:"dispatch",id:"dispatch-failed",label:"Failed",route:{view:"broker",filter:"failed"},active:e=>e.view==="broker"&&e.filter==="failed"}],ops:[{destinationId:"lanes",id:"lanes",label:"Lanes"},{destinationId:"world",id:"world",label:"World"},{destinationId:"mission-control",id:"control"},{destinationId:"providers",id:"harnesses",label:"Providers"},{destinationId:"runtime",id:"runtime",label:"Runtime"},{destinationId:"mesh",id:"mesh"},{destinationId:"tail",id:"tail"},{destinationId:"advisor",id:"advisor"}]};function J(e){const i=d(e.destinationId,{label:e.label,route:e.route,active:e.active});return{id:e.id,label:i.label,route:i.route,active:i.active,destinationId:i.id}}function re(e,i){const t=n[e.view];if(!(t in r))return null;const o=t,h=r[o].map(J).filter(I=>a(I.destinationId).capability!=="ops.control"||i?.opsControlEnabled!==!1);return{areaId:o,items:h}}export{j as P,oe as a,te as b,ie as c,ne as d,se as e,Q as f,ee as g,_ as h,de as i,ae as p,re as s};
@@ -1 +1 @@
1
- import{r}from"./index-C8uS5szO.js";import{a as g}from"./api-CaROe5_H.js";import{a as x}from"./agent-state-DDhnFEEP.js";import{i as A,o as L}from"./surface-activity-B1rgWB1i.js";const y=1e4,E=6e4;function $(e,n){const[v,i]=r.useState({}),c=n?.enabled??!0,o=r.useRef(!0),l=r.useRef(!1),f=r.useRef(!1),a=n?.pauseWhenHidden??!1,d=e.map(t=>t.id.trim()).filter(t=>t.length>0).join(","),p=e.some(t=>x(t.state))?n?.activeIntervalMs??y:n?.idleIntervalMs??E,s=r.useCallback(async()=>{if(c){if(e.length===0){i({});return}if(!(a&&!A())){if(l.current){f.current=!0;return}l.current=!0;try{const t=d?`?ids=${encodeURIComponent(d)}`:"",m=await g(`/api/observe/agents${t}`);if(!o.current)return;i(I=>{const h={};for(const u of e)h[u.id]=I[u.id];for(const u of m){const{agentId:R,...b}=u;h[R]=b}return h})}catch(t){console.warn("[observe] Refresh failed; keeping previous observations",t)}finally{l.current=!1,f.current&&(f.current=!1,s())}}}},[d,e,c,a]);return r.useEffect(()=>{if(o.current=!0,!c||e.length===0)return i({}),()=>{o.current=!1};s();const t=setInterval(()=>{s()},p),m=a?L(()=>{s()}):null;return()=>{o.current=!1,clearInterval(t),m?.()}},[e.length,c,s,a,p]),v}function C(e){switch(e.kind){case"tool":return`${e.tool??"tool"} ${e.arg??""}`.trim();case"think":return e.text.slice(0,120);case"ask":return`ask: ${e.text}`.slice(0,120);case"message":return e.text.slice(0,100);case"note":return e.text.slice(0,100);case"system":case"boot":return e.text.slice(0,100)}}export{C as s,$ as u};
1
+ import{r}from"./index-DReVb7jZ.js";import{a as g}from"./api-DSqpVKC7.js";import{a as x}from"./agent-state-DDhnFEEP.js";import{i as A,o as L}from"./surface-activity-B1rgWB1i.js";const y=1e4,E=6e4;function $(e,n){const[v,i]=r.useState({}),c=n?.enabled??!0,o=r.useRef(!0),l=r.useRef(!1),f=r.useRef(!1),a=n?.pauseWhenHidden??!1,d=e.map(t=>t.id.trim()).filter(t=>t.length>0).join(","),p=e.some(t=>x(t.state))?n?.activeIntervalMs??y:n?.idleIntervalMs??E,s=r.useCallback(async()=>{if(c){if(e.length===0){i({});return}if(!(a&&!A())){if(l.current){f.current=!0;return}l.current=!0;try{const t=d?`?ids=${encodeURIComponent(d)}`:"",m=await g(`/api/observe/agents${t}`);if(!o.current)return;i(I=>{const h={};for(const u of e)h[u.id]=I[u.id];for(const u of m){const{agentId:R,...b}=u;h[R]=b}return h})}catch(t){console.warn("[observe] Refresh failed; keeping previous observations",t)}finally{l.current=!1,f.current&&(f.current=!1,s())}}}},[d,e,c,a]);return r.useEffect(()=>{if(o.current=!0,!c||e.length===0)return i({}),()=>{o.current=!1};s();const t=setInterval(()=>{s()},p),m=a?L(()=>{s()}):null;return()=>{o.current=!1,clearInterval(t),m?.()}},[e.length,c,s,a,p]),v}function C(e){switch(e.kind){case"tool":return`${e.tool??"tool"} ${e.arg??""}`.trim();case"think":return e.text.slice(0,120);case"ask":return`ask: ${e.text}`.slice(0,120);case"message":return e.text.slice(0,100);case"note":return e.text.slice(0,100);case"system":case"boot":return e.text.slice(0,100)}}export{C as s,$ as u};
@@ -1 +1 @@
1
- import{a as n}from"./api-CaROe5_H.js";function e({conversationId:t,workId:o,agentId:r}){return t?{view:"conversation",conversationId:t}:o?{view:"follow",workId:o,preferredView:"chat",...r?{targetAgentId:r}:{}}:r?{view:"agents-v2",agentId:r,tab:"message"}:{view:"inbox"}}function a(t){return e({conversationId:t.conversationId,workId:t.kind==="work_item"?t.recordId:null,agentId:t.agentId})}function s(t){return e({conversationId:t.conversationId,workId:t.collaborationRecordId,agentId:t.agentId})}async function d(t){await n("/api/operator-attention/dismiss",{method:"POST",body:JSON.stringify(t)})}export{s as a,d,a as r};
1
+ import{a as n}from"./api-DSqpVKC7.js";function e({conversationId:t,workId:o,agentId:r}){return t?{view:"conversation",conversationId:t}:o?{view:"follow",workId:o,preferredView:"chat",...r?{targetAgentId:r}:{}}:r?{view:"agents-v2",agentId:r,tab:"message"}:{view:"inbox"}}function a(t){return e({conversationId:t.conversationId,workId:t.kind==="work_item"?t.recordId:null,agentId:t.agentId})}function s(t){return e({conversationId:t.conversationId,workId:t.collaborationRecordId,agentId:t.agentId})}async function d(t){await n("/api/operator-attention/dismiss",{method:"POST",body:JSON.stringify(t)})}export{s as a,d,a as r};
@@ -1 +1 @@
1
- import{r as i}from"./index-C8uS5szO.js";let e={hover:null,content:null};const r=new Set;function s(){for(const t of r)t()}function a(t){return r.add(t),()=>{r.delete(t)}}function o(){return e}function c(){return i.useSyncExternalStore(a,o,o)}function l(t,n){return t===n?!0:!t||!n?!1:t.route===n.route&&t.label===n.label}function u(t){e.hover!==t&&(e={...e,hover:t},s())}function S(t){return!t||!t.route&&!t.label?{onPointerEnter:void 0,onPointerLeave:void 0}:{onPointerEnter:()=>u(t),onPointerLeave:()=>{l(e.hover,t)&&u(null)}}}export{S as s,c as u};
1
+ import{r as i}from"./index-DReVb7jZ.js";let e={hover:null,content:null};const r=new Set;function s(){for(const t of r)t()}function a(t){return r.add(t),()=>{r.delete(t)}}function o(){return e}function c(){return i.useSyncExternalStore(a,o,o)}function l(t,n){return t===n?!0:!t||!n?!1:t.route===n.route&&t.label===n.label}function u(t){e.hover!==t&&(e={...e,hover:t},s())}function S(t){return!t||!t.route&&!t.label?{onPointerEnter:void 0,onPointerLeave:void 0}:{onPointerEnter:()=>u(t),onPointerLeave:()=>{l(e.hover,t)&&u(null)}}}export{S as s,c as u};
@@ -1 +1 @@
1
- import{c as t}from"./createLucideIcon-DkjnzvcJ.js";const e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],i=t("panel-right",e);export{i as P};
1
+ import{c as t}from"./createLucideIcon-ChvMq-zl.js";const e=[["rect",{width:"18",height:"18",x:"3",y:"3",rx:"2",key:"afitv7"}],["path",{d:"M15 3v18",key:"14nvp0"}]],i=t("panel-right",e);export{i as P};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DkjnzvcJ.js";const t=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],o=e("pause",t);export{o as P};
1
+ import{c as e}from"./createLucideIcon-ChvMq-zl.js";const t=[["rect",{x:"14",y:"3",width:"5",height:"18",rx:"1",key:"kaeet6"}],["rect",{x:"5",y:"3",width:"5",height:"18",rx:"1",key:"1wsw3u"}]],o=e("pause",t);export{o as P};
@@ -1 +1 @@
1
- import{r as a}from"./index-C8uS5szO.js";const i="openscout:persistent-state-change";function d(t,e){typeof window>"u"||window.dispatchEvent(new CustomEvent(i,{detail:{key:t,value:e}}))}function w(t){try{return window.localStorage.getItem(t)}catch{return null}}function c(t,e){try{window.localStorage.setItem(t,e)}catch{}d(t,e)}function l(t){const[e,n]=a.useState(()=>typeof window>"u"?null:w(t));return a.useEffect(()=>{n(w(t));const s=r=>{const u=r.detail;!u||u.key!==t||n(u.value)},o=r=>{r.key===t&&n(r.newValue)};return window.addEventListener(i,s),window.addEventListener("storage",o),()=>{window.removeEventListener(i,s),window.removeEventListener("storage",o)}},[t]),e}function m(t,e){const n=l(t),s=n===null?e:n==="true",o=a.useCallback(r=>{c(t,r?"true":"false")},[t]);return[s,o]}function g(t,e){const n=l(t),s=n===null?Number.NaN:Number(n),o=Number.isFinite(s)?s:e,r=a.useCallback(u=>{c(t,String(u))},[t]);return[o,r]}function E(t,e){const s=l(t)??e,o=a.useCallback(r=>{c(t,r)},[t]);return[s,o]}export{E as a,m as b,g as u};
1
+ import{r as a}from"./index-DReVb7jZ.js";const i="openscout:persistent-state-change";function d(t,e){typeof window>"u"||window.dispatchEvent(new CustomEvent(i,{detail:{key:t,value:e}}))}function w(t){try{return window.localStorage.getItem(t)}catch{return null}}function c(t,e){try{window.localStorage.setItem(t,e)}catch{}d(t,e)}function l(t){const[e,n]=a.useState(()=>typeof window>"u"?null:w(t));return a.useEffect(()=>{n(w(t));const s=r=>{const u=r.detail;!u||u.key!==t||n(u.value)},o=r=>{r.key===t&&n(r.newValue)};return window.addEventListener(i,s),window.addEventListener("storage",o),()=>{window.removeEventListener(i,s),window.removeEventListener("storage",o)}},[t]),e}function m(t,e){const n=l(t),s=n===null?e:n==="true",o=a.useCallback(r=>{c(t,r?"true":"false")},[t]);return[s,o]}function g(t,e){const n=l(t),s=n===null?Number.NaN:Number(n),o=Number.isFinite(s)?s:e,r=a.useCallback(u=>{c(t,String(u))},[t]);return[o,r]}function E(t,e){const s=l(t)??e,o=a.useCallback(r=>{c(t,r)},[t]);return[s,o]}export{E as a,m as b,g as u};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DkjnzvcJ.js";const o=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],e=a("pin",o);export{e as P};
1
+ import{c as a}from"./createLucideIcon-ChvMq-zl.js";const o=[["path",{d:"M12 17v5",key:"bb1du9"}],["path",{d:"M9 10.76a2 2 0 0 1-1.11 1.79l-1.78.9A2 2 0 0 0 5 15.24V16a1 1 0 0 0 1 1h12a1 1 0 0 0 1-1v-.76a2 2 0 0 0-1.11-1.79l-1.78-.9A2 2 0 0 1 15 10.76V7a1 1 0 0 1 1-1 2 2 0 0 0 0-4H8a2 2 0 0 0 0 4 1 1 0 0 1 1 1z",key:"1nkz8b"}]],e=a("pin",o);export{e as P};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DkjnzvcJ.js";const o=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],e=a("play",o);export{e as P};
1
+ import{c as a}from"./createLucideIcon-ChvMq-zl.js";const o=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],e=a("play",o);export{e as P};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DkjnzvcJ.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);export{c as P};
1
+ import{c as e}from"./createLucideIcon-ChvMq-zl.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);export{c as P};
@@ -0,0 +1 @@
1
+ import{r as u,j as s}from"./index-DReVb7jZ.js";import{A as Z}from"./AgentAvatar-NZOqcsB2.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-BEXS8vV6.js";import{b as Q,r as es,s as ts,a as ns}from"./session-catalog-CnpZMB7C.js";import{u as X}from"./sse-A8AyLH0g.js";import{t as z}from"./time-Dhsh_2EG.js";import{B as cs}from"./BackToPicker-CkBhGRlD.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-CNZluAZb.js";import{ConversationScreen as ds}from"./ConversationScreen-tpj4cqWs.js";import{S as ms}from"./SessionObserve-B64YsYhy.js";import{H as as}from"./HarnessMark-DSvM_H7H.js";/* empty css */import{AgentDefinitionsWorkspace as ps}from"./AgentDefinitionsWorkspace-BqS6MXqF.js";import{AgentEssentialsGlyph as us}from"./agent-essentials-bKWYOZaH.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-zgzC3cbU.js";import"./colors-CFlbwC25.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./conversation-model-m8HhzroS.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./terminal-relay-mO89dX-Y.js";import"./index-BWHgHrtv.js";import"./provider-DwmCoSlc.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./ConversationComposer-DNcn5U6D.js";import"./zap-B4X0OrEw.js";import"./message-markup-6Tgo4qFJ.js";import"./mentions-Ck_Vjnyp.js";import"./AgentDetailCard-MIEBKw_S.js";import"./AgentLiveActions-6Kfr1uOT.js";import"./terminal-takeover-CZZsnPzj.js";import"./eye-CsGfEVR6.js";import"./terminal-DMZjX1es.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Y9TEJxP_.js";import"./AstronautSuit-D67fIBdR.js";import"./panel-right-qP17MwMl.js";import"./CommsFlowGraph-voDD9M5R.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DdNAwjGW.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-C33sgD48.js";import"./CommsSelection-BL8aYD7z.js";/* empty css */import"./use-conversation-list-D5EnpVba.js";import"./agent-master-model-C-KdOFDK.js";import"./use-beside-D3cJpA5p.js";import"./ConversationFeedRows-RnYSa7Io.js";import"./ConversationPanels-6pprBpmq.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-CiaZHMnk.js";import"./proxy-DgzP27W8.js";import"./activity-BJqFrZyB.js";import"./message-circle-cI5_A5mj.js";import"./tail-events-C4WdhVeK.js";import"./ConversationStatus-Cv-7hErW.js";import"./check-g7D7-c1J.js";import"./sparkles-Cc5lPZRv.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-D2cnTeUd.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./ObservedTopologyPanel-DF6tRZL_.js";import"./ObserveTextFlow-CC5mnngm.js";import"./SessionObserveEvidence-CS1aQBpQ.js";import"./wrench-B4maQJai.js";import"./external-link-BVccgH0n.js";import"./agent-specialization-BplZUa_0.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Cxhixtks.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ws({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ys({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const N=r?.data,v=(N?.events??[]).filter(bs),w=v.filter(g=>g.kind==="tool"),S=w.filter(g=>g.tool==="edit"||g.tool==="write"),y=w.filter(g=>g.tool==="read"),f=N?.files.length??0,b=N?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||f>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(b??$)},{k:"tools",v:U(w.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(y.length)},{k:"files",v:U(f)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=N?.metadata?.usage,a=_(D,{model:N?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,j=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(j&&j!==t.id?t.id:null),M=j??t.id,W=j&&t.harness==="codex"?"codex session id":j&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?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(ws,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function Et({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]),N=x.find(n=>n.id===h)??null,I=N?.model??null,v=N?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[y,f]=u.useState("idle"),[b,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{f("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=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(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(e))}),j=n.sessionId?.trim();if(j){F(i,{view:"sessions",sessionId:j},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{f("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,size:46,tile:!0,presence:!1})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(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:y==="starting",onClick:T,children:y==="starting"?"Starting...":"+ New session"}),b&&s.jsx("div",{className:"s-sess-action-error",children:b}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const j=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=j?"now":n.endedAt?`ended · ${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${j?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:j?"var(--accent)":"var(--dim)",opacity:j?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?K(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${j?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ys,{agentId:e.id,session:n,active:j,onPrimary:()=>j?void E():O(n),primaryLabel:j?"Continue":"Resume",primaryTitle:j?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?K(t.cwd):"main"),N=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?K(t.cwd):null)??e.name,w=r?.data.metadata?.usage??null,S=w?.assistantMessages??null,y=_(w,{model:r?.data.metadata?.session?.model??N,adapterType:I}),f=y?Math.min(100,y.pct):null,b=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?z(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":b,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":b,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,N?` · ${N}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(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:[f!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),f,"%"]}):null,w&&(w.inputTokens||w.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(w.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=es(e,o),h=u.useMemo(()=>ts(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,N=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ns(e.id,r,l,h,N),v=Q(N,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const w=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,y=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,f=e.handle?.trim().replace(/^@+/,"")||null,b=f?`@${f}`:t,$=f&&t.toLowerCase()!==f.toLowerCase()?t:[e.project?`/${e.project}`:null,e.branch,w].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(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,size:48,tile:!0,presence:!1}),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:b,children:b})]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),f&&t.toLowerCase()!==f.toLowerCase()?s.jsx("span",{className:"ap-profileId",title:e.id,children:t}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${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,j=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,j,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,y?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:y})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null]})]})]})]})}function Mt({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),[N,I]=u.useState(null),{route:v}=G(),w=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(w,N?.sessions??[])??w,y=u.useCallback(async()=>{const b=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(b)},[e.id]),f=u.useCallback(async()=>{x(!0);try{const b=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${b?`?${b}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),y();const b=window.setTimeout(()=>{y()},3e3);return()=>window.clearTimeout(b)},[y]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&f()},[i,f]),X(()=>{y(),i==="observe"&&f()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const b=setInterval(()=>{f()},2500);return()=>clearInterval(b)},[i,p?.data.live,f]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:N,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:N,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(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 Rt({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{Mt as AgentDetailWithRail,Rt as AgentProfileBar,Et as AgentProfileSessionsCenter,ks as CurrentSessionCard};