@openscout/scout 0.2.105 → 0.2.107

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 (575) hide show
  1. package/README.md +26 -0
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/chat.mjs +23 -1
  5. package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
  6. package/dist/client/assets/{AddProjectForm-CHNJ4NnS.js → AddProjectForm-CusDRiVO.js} +1 -1
  7. package/dist/client/assets/{AdventureEvidence-B4mEvXeD.js → AdventureEvidence-CyegKk1V.js} +1 -1
  8. package/dist/client/assets/{AdventureReader-ZsBDQITY.js → AdventureReader-X-hbTOi0.js} +1 -1
  9. package/dist/client/assets/{AdventureScenery-DSxDlqG1.js → AdventureScenery-LPXSVP67.js} +1 -1
  10. package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
  11. package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
  12. package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
  13. package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
  14. package/dist/client/assets/{AgentDetailCard-MIEBKw_S.js → AgentDetailCard-DtHT3sCo.js} +1 -1
  15. package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
  16. package/dist/client/assets/{AgentFloorWorld-BTqwmK5G.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
  17. package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
  18. package/dist/client/assets/{AgentLaneCard-C4rKLLdT.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
  19. package/dist/client/assets/{AgentLaneChrome-fGC-ZrJS.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
  20. package/dist/client/assets/{AgentLaneDetailSheet-BTF4_th9.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
  21. package/dist/client/assets/{AgentLaneSummaryResize-DgSeA_vS.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
  22. package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
  23. package/dist/client/assets/{AgentLanesPreflight-CcS23wij.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
  24. package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
  25. package/dist/client/assets/{AgentLiveActions-6Kfr1uOT.js → AgentLiveActions-CfTupTEl.js} +1 -1
  26. package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
  27. package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
  28. package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
  29. package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
  30. package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
  31. package/dist/client/assets/{AstronautSuit-D67fIBdR.js → AstronautSuit-Cchnc4Ug.js} +1 -1
  32. package/dist/client/assets/{AtopView-Ck30FbzG.js → AtopView-gkEp4y__.js} +1 -1
  33. package/dist/client/assets/{BackToPicker-CkBhGRlD.js → BackToPicker-CUkjnoVk.js} +1 -1
  34. package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
  35. package/dist/client/assets/{BriefingsScreen-DTxYMr3a.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
  36. package/dist/client/assets/{BrokerMetadataPanel-crirZCdo.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
  37. package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
  38. package/dist/client/assets/{Canvas-CRP0KjKb.js → Canvas-X9pVSkw3.js} +1 -1
  39. package/dist/client/assets/{CastPicker-ZPomvOf-.js → CastPicker-BXUtPAGC.js} +1 -1
  40. package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
  41. package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
  42. package/dist/client/assets/{CharacterFamilyPreview-ckVkecDO.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
  43. package/dist/client/assets/{ChatAvatar-DKBsbOqk.js → ChatAvatar-C3a_o5Hj.js} +1 -1
  44. package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
  45. package/dist/client/assets/{ChatCollapsedStrip-Co0NmqOO.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
  46. package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
  47. package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
  48. package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
  49. package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
  50. package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
  51. package/dist/client/assets/{CodeDiffPane-D-iv28LJ.js → CodeDiffPane-DuQRwpgK.js} +1 -1
  52. package/dist/client/assets/{CodeProjectPicker-CZ3gDdiT.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
  53. package/dist/client/assets/{CodeScreen-CSC-zbP9.js → CodeScreen-BXyKeL5T.js} +1 -1
  54. package/dist/client/assets/{CommsCanvas-DdNAwjGW.js → CommsCanvas-THp0r_U8.js} +1 -1
  55. package/dist/client/assets/{CommsDeck-mGWY7Ivi.js → CommsDeck-BVmSMV2V.js} +1 -1
  56. package/dist/client/assets/{CommsFlowGraph-voDD9M5R.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
  57. package/dist/client/assets/{CommsFlowMap-C33sgD48.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
  58. package/dist/client/assets/{CommsSelection-BL8aYD7z.js → CommsSelection-BUoRbu9o.js} +1 -1
  59. package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
  60. package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
  61. package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
  62. package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
  63. package/dist/client/assets/{ConversationPanels-6pprBpmq.js → ConversationPanels-D9oC0xG5.js} +2 -2
  64. package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
  65. package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
  66. package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
  67. package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
  68. package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
  69. package/dist/client/assets/{CrewSprite-Dp9KBBGY.js → CrewSprite-Dhryjx2c.js} +1 -1
  70. package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
  71. package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
  72. package/dist/client/assets/{DataTable-av71ehJV.js → DataTable-aH-jCyDq.js} +1 -1
  73. package/dist/client/assets/{DispatchAftermath-CcYGUB10.js → DispatchAftermath-66uQAorV.js} +1 -1
  74. package/dist/client/assets/{DocumentFocusViewer-DlMiEALb.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
  75. package/dist/client/assets/{EmbeddableSurfacesLab-CTkO_tQR.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
  76. package/dist/client/assets/{EmptyState-CYUwYyAW.js → EmptyState-CZlrHXy-.js} +1 -1
  77. package/dist/client/assets/{FileViewerPane-Cxhixtks.js → FileViewerPane-BAO6mtjD.js} +1 -1
  78. package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
  79. package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
  80. package/dist/client/assets/{FloorContextSheet-Vj_wVZq1.js → FloorContextSheet-2_NVPQor.js} +1 -1
  81. package/dist/client/assets/{FloorExchangePanel-CjHSDXad.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
  82. package/dist/client/assets/{FloorMessagePasses-BG4ebnX5.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
  83. package/dist/client/assets/{FloorReplay-BoYaGY9t.js → FloorReplay-VFzA6Kxc.js} +1 -1
  84. package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
  85. package/dist/client/assets/{FloorSavedWork-jbtRs-YE.js → FloorSavedWork-BeHDejWz.js} +1 -1
  86. package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
  87. package/dist/client/assets/{FollowScreen-CupyOgt4.js → FollowScreen-CFfkIbc6.js} +1 -1
  88. package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
  89. package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
  90. package/dist/client/assets/{HerdrSession-Dcm3vf9U.js → HerdrSession-_t7yM8vX.js} +2 -2
  91. package/dist/client/assets/{HomeHero-pIZtE1cC.js → HomeHero-DouPyNmz.js} +1 -1
  92. package/dist/client/assets/{HostAdvisorView-Dv5meXo2.js → HostAdvisorView-CnM1i8hW.js} +1 -1
  93. package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
  94. package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
  95. package/dist/client/assets/{JumpPalette-BmiSOEmp.js → JumpPalette-O1aJE9gR.js} +1 -1
  96. package/dist/client/assets/{KnowledgeSearchInspector-B8yiM524.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
  97. package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
  98. package/dist/client/assets/{LaneToolHoverCard-D2cnTeUd.js → LaneToolHoverCard-CJa110yk.js} +1 -1
  99. package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
  100. package/dist/client/assets/{LaneTraceEventFocus-BLhVHwff.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
  101. package/dist/client/assets/{MeshCanvas-BR25OBTJ.js → MeshCanvas-DWZHYh1A.js} +2 -2
  102. package/dist/client/assets/{MeshCanvasMinimap-ClVolr4-.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
  103. package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
  104. package/dist/client/assets/{MeshTopologyView-BT3ke2D1.js → MeshTopologyView-BVvtqI8q.js} +2 -2
  105. package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
  106. package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
  107. package/dist/client/assets/{MissionContextRail-CafjuseK.js → MissionContextRail-D62-Wis8.js} +1 -1
  108. package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
  109. package/dist/client/assets/{MissionFocusOverlay-nhy3hkxQ.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
  110. package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
  111. package/dist/client/assets/{MissionLogPane-DiUf3vWW.js → MissionLogPane-B19lYSY9.js} +1 -1
  112. package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
  113. package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
  114. package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
  115. package/dist/client/assets/{NewAgentModal-BQ2wQ5gp.js → NewAgentModal-Bh-L-emz.js} +1 -1
  116. package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
  117. package/dist/client/assets/{NewChatOrigin-C8ROO4ps.js → NewChatOrigin-DFbF_XvR.js} +1 -1
  118. package/dist/client/assets/{NodeDetailPanel-BNTqYC7m.js → NodeDetailPanel-CElOEpCh.js} +1 -1
  119. package/dist/client/assets/{NodeMenu-CcOeFRCB.js → NodeMenu-B-jjHf1c.js} +1 -1
  120. package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
  121. package/dist/client/assets/{ObserveTextFlow-CC5mnngm.js → ObserveTextFlow-PFnG_10h.js} +2 -2
  122. package/dist/client/assets/{ObservedTopologyPanel-DF6tRZL_.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
  123. package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
  124. package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
  125. package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
  126. package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
  127. package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
  128. package/dist/client/assets/{ProjectAgentProfileBar-C8z22pJ2.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
  129. package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
  130. package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
  131. package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
  132. package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
  133. package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
  134. package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
  135. package/dist/client/assets/Provider-C35yu29I.js +5 -0
  136. package/dist/client/assets/{RailRow-DUPqXMZh.js → RailRow-BjmWK420.js} +1 -1
  137. package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
  138. package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
  139. package/dist/client/assets/{RenderedWorkerSprite-C8fxndAh.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
  140. package/dist/client/assets/{ReplayClock-DUVJjrIu.js → ReplayClock-348f17bW.js} +1 -1
  141. package/dist/client/assets/{ReplayLog-Bek1Vc4W.js → ReplayLog-CBnAM3ui.js} +1 -1
  142. package/dist/client/assets/{ReplayOutpost-DlRg3172.js → ReplayOutpost-DyRPfNFx.js} +1 -1
  143. package/dist/client/assets/{RepoDiffEmbedScreen-CVUMnt6A.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
  144. package/dist/client/assets/{RepoDiffPageScreen-D9-s5PyB.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
  145. package/dist/client/assets/{RepoDiffViewer-D7FN-oyY.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
  146. package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
  147. package/dist/client/assets/{ReposScreen-BQ7HO1om.js → ReposScreen-uMCpt0e9.js} +2 -2
  148. package/dist/client/assets/{RiggedWorkerCharacter-CJMWlvV-.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
  149. package/dist/client/assets/{SageModelStudio-B526NSnw.js → SageModelStudio-CNDhZhgD.js} +1 -1
  150. package/dist/client/assets/{ScoutDeckSurface-ChkvGyEW.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
  151. package/dist/client/assets/{ScoutSurface-6g1f5chk.js → ScoutSurface-3_25USO_.js} +1 -1
  152. package/dist/client/assets/{ScoutbotFxLab-BuwBdnPf.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
  153. package/dist/client/assets/{SecondaryNav-Bs-_VwTC.js → SecondaryNav-D7dbV2qo.js} +1 -1
  154. package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
  155. package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
  156. package/dist/client/assets/{SessionEmbedScreen-C2wf35-P.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
  157. package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
  158. package/dist/client/assets/{SessionObserve-B64YsYhy.js → SessionObserve-DXxBvejJ.js} +9 -9
  159. package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
  160. package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
  161. package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
  162. package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
  163. package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
  164. package/dist/client/assets/{SharedFloorCharacter-V04kD5T9.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
  165. package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
  166. package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
  167. package/dist/client/assets/{ShikiPane-XwFI-pCp.js → ShikiPane-CRtTYkMj.js} +1 -1
  168. package/dist/client/assets/{SlidePanel-BMpkXai_.js → SlidePanel-_CHAQdOa.js} +1 -1
  169. package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
  170. package/dist/client/assets/{SpriteAvatar-aHeF4ZQZ.js → SpriteAvatar-CpZWf54-.js} +1 -1
  171. package/dist/client/assets/{SproutActionSprite-DI5N3gOj.js → SproutActionSprite-BSiTS4en.js} +1 -1
  172. package/dist/client/assets/{StatusPill-Dw4LP7wu.js → StatusPill-2gCP6H7A.js} +1 -1
  173. package/dist/client/assets/{TailView-BofjmUMJ.js → TailView-CYSijNTy.js} +2 -2
  174. package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
  175. package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
  176. package/dist/client/assets/{TerminalHeaderMount-CwbQhXcI.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
  177. package/dist/client/assets/{TerminalRelay--qOBwnbR.js → TerminalRelay-DrikpUSJ.js} +3 -3
  178. package/dist/client/assets/{TextDocumentSurface-BK6Qy41F.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
  179. package/dist/client/assets/{TmuxPeek-DpUT9Tpc.js → TmuxPeek-CXFeweMg.js} +1 -1
  180. package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
  181. package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
  182. package/dist/client/assets/{VoicePermissionsPanel-D35fOnQj.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
  183. package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
  184. package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
  185. package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
  186. package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
  187. package/dist/client/assets/{WorkFilesViewer-t8AEyx3Q.js → WorkFilesViewer-vNt01sDd.js} +1 -1
  188. package/dist/client/assets/{WorkRunView-_mhG_FR2.js → WorkRunView-BDkR7Edq.js} +1 -1
  189. package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
  190. package/dist/client/assets/{WorldCharacter-BRrj3MQN.js → WorldCharacter-CIIlutQq.js} +1 -1
  191. package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
  192. package/dist/client/assets/{WorldSky-D-RJzSa6.js → WorldSky-Jm2Z6dfW.js} +1 -1
  193. package/dist/client/assets/{activity-BJqFrZyB.js → activity-CIlFrfPJ.js} +1 -1
  194. package/dist/client/assets/{addon-fit-CHohcvS3.js → addon-fit-dFpj9Kfq.js} +1 -1
  195. package/dist/client/assets/{addon-webgl-CaRy2x2b.js → addon-webgl-BFCGRtGh.js} +1 -1
  196. package/dist/client/assets/{agent-essentials-bKWYOZaH.js → agent-essentials-BGGvT5G6.js} +1 -1
  197. package/dist/client/assets/{agent-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
  198. package/dist/client/assets/{agent-specialization-BplZUa_0.js → agent-specialization-DDc7mLCW.js} +1 -1
  199. package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
  200. package/dist/client/assets/{arc.es-CubLvQ4W.js → arc.es-C1SQHJ3k.js} +1 -1
  201. package/dist/client/assets/{arrow-left-DFfKAq0d.js → arrow-left-MVUKauwQ.js} +1 -1
  202. package/dist/client/assets/{arrow-right-DmAWnyAH.js → arrow-right-Bp-FpE5V.js} +1 -1
  203. package/dist/client/assets/{arrow-up-right-B0aLKiyF.js → arrow-up-right-BPedAgxO.js} +1 -1
  204. package/dist/client/assets/{book-open-BL9qvhEI.js → book-open-CV98WMSp.js} +1 -1
  205. package/dist/client/assets/{bot-BhAVbcCA.js → bot-B4zLQ4IN.js} +1 -1
  206. package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
  207. package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
  208. package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
  209. package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
  210. package/dist/client/assets/{check-g7D7-c1J.js → check-lrJ3a73a.js} +1 -1
  211. package/dist/client/assets/{chevron-down-CDzRQQGl.js → chevron-down-l1mrh5S9.js} +1 -1
  212. package/dist/client/assets/{chevron-right-DKGTLiqc.js → chevron-right-DrfqcerI.js} +1 -1
  213. package/dist/client/assets/{chevron-up-DX7R6KY2.js → chevron-up-CETZJzjV.js} +1 -1
  214. package/dist/client/assets/{chunk-HRAB3GC3-Dvk_QpRq.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
  215. package/dist/client/assets/{clock-CQb4FeMf.js → clock-BV1aqPkK.js} +1 -1
  216. package/dist/client/assets/{code-xml-Cmadr3pQ.js → code-xml-BhcNbLWU.js} +1 -1
  217. package/dist/client/assets/{coffee-ljG1_krY.js → coffee-D7EAOdCk.js} +1 -1
  218. package/dist/client/assets/{compass-CvzkzkIh.js → compass-63TUaz5_.js} +1 -1
  219. package/dist/client/assets/content-B1lgE8qr.js +1 -0
  220. package/dist/client/assets/content-B5l11YyQ.js +1 -0
  221. package/dist/client/assets/content-BNZOZEpX.js +1 -0
  222. package/dist/client/assets/content-BRIxP155.js +1 -0
  223. package/dist/client/assets/content-BWd8gt8L.js +1 -0
  224. package/dist/client/assets/content-BfwS2jAK.js +1 -0
  225. package/dist/client/assets/content-C4p43_eT.js +1 -0
  226. package/dist/client/assets/content-CdYfaoDV.js +1 -0
  227. package/dist/client/assets/content-CzldLxw0.js +1 -0
  228. package/dist/client/assets/content-D-olnc4U.js +1 -0
  229. package/dist/client/assets/content-DTioimq4.js +1 -0
  230. package/dist/client/assets/content-LOebm3_d.js +1 -0
  231. package/dist/client/assets/{content-CKJ9zb7Z.js → content-nGlEZhUI.js} +1 -1
  232. package/dist/client/assets/{content-D1Ze_FG9.js → content-oyzDM-LK.js} +1 -1
  233. package/dist/client/assets/content-x1PHxED7.js +1 -0
  234. package/dist/client/assets/content-zX3ZY3T9.js +1 -0
  235. package/dist/client/assets/{conversation-icons-CIRaxmid.js → conversation-icons-Tqba2d56.js} +1 -1
  236. package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
  237. package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
  238. package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
  239. package/dist/client/assets/{copy-BGOC1tJB.js → copy-xKeM5ZtU.js} +1 -1
  240. package/dist/client/assets/{cpu-Q6nrHFTN.js → cpu-BOTa_WLr.js} +1 -1
  241. package/dist/client/assets/{createLucideIcon-ChvMq-zl.js → createLucideIcon-zZ8Hx7er.js} +1 -1
  242. package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
  243. package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
  244. package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
  245. package/dist/client/assets/discover-DJFxyV1k.js +2 -0
  246. package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
  247. package/dist/client/assets/{external-link-BVccgH0n.js → external-link-CUObqmgX.js} +1 -1
  248. package/dist/client/assets/{eye-CsGfEVR6.js → eye-LrO-cXQt.js} +1 -1
  249. package/dist/client/assets/{file-code-corner-Be6da5l3.js → file-code-corner-CsU7jJpu.js} +1 -1
  250. package/dist/client/assets/{file-text-DP6txVW-.js → file-text-CnISiiw6.js} +1 -1
  251. package/dist/client/assets/{flag-DAFE2wZ5.js → flag-C4wl8z2-.js} +1 -1
  252. package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
  253. package/dist/client/assets/{folder-B_S7gBVr.js → folder-D5prSkzz.js} +1 -1
  254. package/dist/client/assets/{gauge-DQCGlE3o.js → gauge-D9_5iJEm.js} +1 -1
  255. package/dist/client/assets/{gestures-CofqY4Km.js → gestures-QZub3Ot9.js} +1 -1
  256. package/dist/client/assets/{git-branch-DcUCsWdJ.js → git-branch-B0_fPLO7.js} +1 -1
  257. package/dist/client/assets/{go-shortcuts-KQy-ZOpV.js → go-shortcuts-DicR7sUf.js} +1 -1
  258. package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
  259. package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
  260. package/dist/client/assets/{home-now-card-nano-CvU8B61b.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
  261. package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
  262. package/dist/client/assets/index-724SdE6r.js +1 -0
  263. package/dist/client/assets/{index-kkXUq-zf.js → index-CHD0qcfL.js} +1 -1
  264. package/dist/client/assets/index-CN4rBB_s.css +1 -0
  265. package/dist/client/assets/index-D1d98iYf.js +1 -0
  266. package/dist/client/assets/{index-DReVb7jZ.js → index-EsrkGBcv.js} +8 -8
  267. package/dist/client/assets/index-gGHPA-By.js +1 -0
  268. package/dist/client/assets/{inspector-panel-CLU7wjnT.js → inspector-panel-BkgUDn6G.js} +2 -2
  269. package/dist/client/assets/{keyboard-nav-CJXPaHXj.js → keyboard-nav-DDHegDbx.js} +1 -1
  270. package/dist/client/assets/{lane-roster-store-Ch9t6lb0.js → lane-roster-store-D-RSWjb-.js} +1 -1
  271. package/dist/client/assets/{layers-BOwyWodP.js → layers-C8PDiMul.js} +1 -1
  272. package/dist/client/assets/{layout-grid-B36Qsh0y.js → layout-grid-Cor2frzj.js} +1 -1
  273. package/dist/client/assets/left-Bn5X7x2o.js +2 -0
  274. package/dist/client/assets/left-BqS0fYX1.js +1 -0
  275. package/dist/client/assets/left-CTCeeeD3.js +1 -0
  276. package/dist/client/assets/left-DhtVPVux.js +1 -0
  277. package/dist/client/assets/left-K39b-Wvx.js +2 -0
  278. package/dist/client/assets/left-KGmueNPt.js +1 -0
  279. package/dist/client/assets/left-P_GOYB-s.js +1 -0
  280. package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
  281. package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
  282. package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
  283. package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
  284. package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
  285. package/dist/client/assets/library-CkWNPHRp.js +1 -0
  286. package/dist/client/assets/{loader-circle-DNUsuPWz.js → loader-circle-OvccU82H.js} +1 -1
  287. package/dist/client/assets/{local-agents-I40PawYA.js → local-agents-BqnoxJrq.js} +1 -1
  288. package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
  289. package/dist/client/assets/{machine-children-CdhNzDF0.js → machine-children-DxcqCLmd.js} +1 -1
  290. package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
  291. package/dist/client/assets/{mentions-Ck_Vjnyp.js → mentions-ByUvhS-v.js} +1 -1
  292. package/dist/client/assets/{mesh-ops-DSlvHp-D.js → mesh-ops-CiZ8xSAx.js} +1 -1
  293. package/dist/client/assets/{mesh-view-store-C1-mdP3P.js → mesh-view-store-DZvJC4KU.js} +1 -1
  294. package/dist/client/assets/{message-circle-cI5_A5mj.js → message-circle-CxRVKNE-.js} +1 -1
  295. package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
  296. package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
  297. package/dist/client/assets/{message-square-CJW4WRlo.js → message-square-BxesYglW.js} +1 -1
  298. package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
  299. package/dist/client/assets/{mission-control-store-p_cboAm4.js → mission-control-store-elEEsIvb.js} +1 -1
  300. package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
  301. package/dist/client/assets/{monitor-C7_cHlkC.js → monitor-DTTYEb73.js} +1 -1
  302. package/dist/client/assets/{nav-destinations-CU_euC-Q.js → nav-destinations-uorRqFxf.js} +1 -1
  303. package/dist/client/assets/{observe-CtS0l3zu.js → observe-BJqERJVj.js} +1 -1
  304. package/dist/client/assets/{page-status-DwFR4wSw.js → page-status-BswZLqvA.js} +1 -1
  305. package/dist/client/assets/{panel-right-qP17MwMl.js → panel-right-Bv7sP_fc.js} +1 -1
  306. package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
  307. package/dist/client/assets/{pause-B_hliKuR.js → pause-C2XTlkjs.js} +1 -1
  308. package/dist/client/assets/{persistent-state-BUsTTZFE.js → persistent-state-KRk_yb0q.js} +1 -1
  309. package/dist/client/assets/{pin-Oi4qHR6M.js → pin-C2mFOV1l.js} +1 -1
  310. package/dist/client/assets/{play-CVeRmqLH.js → play-FT6K3It1.js} +1 -1
  311. package/dist/client/assets/{plus-D5NLH_fM.js → plus-DFDDeGKu.js} +1 -1
  312. package/dist/client/assets/profile-DTmzN16I.js +1 -0
  313. package/dist/client/assets/{projects-inbox-CfwxCTdN.js → projects-inbox-C0FUCv_p.js} +1 -1
  314. package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
  315. package/dist/client/assets/{provider-DwmCoSlc.js → provider-Dojd8quC.js} +1 -1
  316. package/dist/client/assets/{proxy-DgzP27W8.js → proxy-AJsmwA6h.js} +1 -1
  317. package/dist/client/assets/{radio-Cas2qg1D.js → radio-DRoOZsws.js} +1 -1
  318. package/dist/client/assets/{refresh-cw-IcD2lPoT.js → refresh-cw-BmVr7sCD.js} +1 -1
  319. package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
  320. package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
  321. package/dist/client/assets/right-49kO-6nD.js +1 -0
  322. package/dist/client/assets/right-APtItA8A.js +1 -0
  323. package/dist/client/assets/right-BJwhPqtn.js +1 -0
  324. package/dist/client/assets/right-BPqrf4ek.js +1 -0
  325. package/dist/client/assets/right-D7djOy6K.js +1 -0
  326. package/dist/client/assets/right-DKOUCRob.js +1 -0
  327. package/dist/client/assets/right-DMNrVzg7.js +1 -0
  328. package/dist/client/assets/{right-cjPTwPXS.js → right-DWPVB-nK.js} +1 -1
  329. package/dist/client/assets/right-DppeMCy4.js +1 -0
  330. package/dist/client/assets/right-GAL5Mw1v.js +1 -0
  331. package/dist/client/assets/{rocket-DAqYvu8I.js → rocket-CGl4RTV7.js} +1 -1
  332. package/dist/client/assets/router-DCtl8wqb.js +1 -0
  333. package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
  334. package/dist/client/assets/{scope-views-Dl3ml9OZ.js → scope-views-RUWwCVAr.js} +1 -1
  335. package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
  336. package/dist/client/assets/{scoutbot-markdown-DwvGQOWo.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
  337. package/dist/client/assets/{scroll-text-B0tKI9Sg.js → scroll-text-DNjxhyO2.js} +1 -1
  338. package/dist/client/assets/{search-UsM-9-_W.js → search-DT42oyRW.js} +1 -1
  339. package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
  340. package/dist/client/assets/{selection-bridge-OTS2iFkt.js → selection-bridge-x3wFUjxj.js} +1 -1
  341. package/dist/client/assets/{send-horizontal-BlQsRK6C.js → send-horizontal-CH0-fbZE.js} +1 -1
  342. package/dist/client/assets/{send-to-agent-session-C1mgqdow.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
  343. package/dist/client/assets/{server-DBlPW0Mp.js → server-QfsgMLk1.js} +1 -1
  344. package/dist/client/assets/{session-catalog-CnpZMB7C.js → session-catalog-CvSdPHPe.js} +1 -1
  345. package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
  346. package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
  347. package/dist/client/assets/{session-table-CGkfG5Yd.js → session-table-L-pns6Zl.js} +1 -1
  348. package/dist/client/assets/{sessions-view-Bge4XZ4I.js → sessions-view-Dc-QAa7O.js} +1 -1
  349. package/dist/client/assets/{settings-C69Zjrpq.js → settings-BVh7kldq.js} +1 -1
  350. package/dist/client/assets/{sliders-horizontal-6bzeod7c.js → sliders-horizontal-782VC_yy.js} +1 -1
  351. package/dist/client/assets/{sparkles-Cc5lPZRv.js → sparkles-BjHq_DNK.js} +1 -1
  352. package/dist/client/assets/{sse-A8AyLH0g.js → sse-BCPRocpq.js} +1 -1
  353. package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
  354. package/dist/client/assets/{tail-events-C4WdhVeK.js → tail-events-d0yAYxR0.js} +1 -1
  355. package/dist/client/assets/{terminal-DMZjX1es.js → terminal-hQKQygcf.js} +1 -1
  356. package/dist/client/assets/{terminal-relay-mO89dX-Y.js → terminal-relay-Bxs1hp-j.js} +1 -1
  357. package/dist/client/assets/{terminal-takeover-CZZsnPzj.js → terminal-takeover-Ay5C2c-M.js} +1 -1
  358. package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
  359. package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
  360. package/dist/client/assets/{use-beside-D3cJpA5p.js → use-beside-DoRC1nt0.js} +1 -1
  361. package/dist/client/assets/{use-conversation-list-D5EnpVba.js → use-conversation-list-CY4JciOV.js} +1 -1
  362. package/dist/client/assets/{use-fleet-active-asks-D_QOmjg5.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
  363. package/dist/client/assets/{use-mesh-node-state-3V3ADQ-G.js → use-mesh-node-state-BvaqtODo.js} +1 -1
  364. package/dist/client/assets/{use-mesh-ops-items-DI9GKWlF.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
  365. package/dist/client/assets/{use-reduced-motion-CiaZHMnk.js → use-reduced-motion-3gMYZNIp.js} +1 -1
  366. package/dist/client/assets/{use-scout-dev-flags-CkdAHlDR.js → use-scout-dev-flags-DS_pYYQd.js} +1 -1
  367. package/dist/client/assets/{useAgentHoverCard-A3QGXqIy.js → useAgentHoverCard-BANmpjMh.js} +1 -1
  368. package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
  369. package/dist/client/assets/{useEmbedHeadline-atkQVfGw.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
  370. package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
  371. package/dist/client/assets/{usePierreRuntime-DTvcwISe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
  372. package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
  373. package/dist/client/assets/{users-RLK3P5U4.js → users-BUjx36gx.js} +1 -1
  374. package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
  375. package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
  376. package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
  377. package/dist/client/assets/{wrench-B4maQJai.js → wrench-DR0i5BU7.js} +1 -1
  378. package/dist/client/assets/{x-rlMdRqJF.js → x-DAehov0E.js} +1 -1
  379. package/dist/client/assets/{xterm-B1zHHOLQ.js → xterm-BXQiLVnI.js} +1 -1
  380. package/dist/client/assets/{zap-B4X0OrEw.js → zap-CEjZNZbI.js} +1 -1
  381. package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
  382. package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
  383. package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
  384. package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
  385. package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
  386. package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
  387. package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
  388. package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
  389. package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
  390. package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
  391. package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
  392. package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
  393. package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
  394. package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
  395. package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
  396. package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
  397. package/dist/client/index.html +2 -2
  398. package/dist/drizzle/0020_message_reactions.sql +11 -0
  399. package/dist/drizzle/meta/_journal.json +7 -0
  400. package/dist/main.mjs +542 -150
  401. package/dist/node/main.mjs +131 -17
  402. package/dist/pairing-runtime-controller.mjs +375 -78
  403. package/dist/runtime/base-daemon.mjs +98 -5
  404. package/dist/runtime/broker-daemon.mjs +1879 -1198
  405. package/dist/runtime/broker-process-manager.mjs +96 -3
  406. package/dist/runtime/mesh-discover.mjs +96 -3
  407. package/dist/scout-control-plane-web.mjs +4817 -1616
  408. package/dist/update-helper.mjs +211 -39
  409. package/package.json +5 -3
  410. package/server.json +31 -0
  411. package/dist/client/assets/ActivityScreen-CcDdQTBK.js +0 -1
  412. package/dist/client/assets/AgentAdventures-BxrYq_2v.js +0 -1
  413. package/dist/client/assets/AgentAvatar-NZOqcsB2.js +0 -1
  414. package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +0 -1
  415. package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +0 -1
  416. package/dist/client/assets/AgentFloorView-A0dDRlRV.js +0 -1
  417. package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +0 -1
  418. package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +0 -1
  419. package/dist/client/assets/AgentLanesView-WZhEDBFE.js +0 -2
  420. package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +0 -1
  421. package/dist/client/assets/AgentSessions-CO1WGa8Z.js +0 -6
  422. package/dist/client/assets/AgentsConsole-BQOWkj35.js +0 -1
  423. package/dist/client/assets/AgentsScreen-BMNAj1PH.js +0 -1
  424. package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +0 -1
  425. package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +0 -1
  426. package/dist/client/assets/BrokerScreen-CT37VQiL.js +0 -8
  427. package/dist/client/assets/ChannelComposer-BVItWlEz.js +0 -1
  428. package/dist/client/assets/ChannelSidebar-B-2spawY.js +0 -1
  429. package/dist/client/assets/ChatBits-CLJ71hTY.js +0 -1
  430. package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +0 -1
  431. package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +0 -1
  432. package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +0 -1
  433. package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +0 -1
  434. package/dist/client/assets/ConversationComposer-DNcn5U6D.js +0 -1
  435. package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +0 -1
  436. package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +0 -1
  437. package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
  438. package/dist/client/assets/ConversationScreen-tpj4cqWs.js +0 -2
  439. package/dist/client/assets/ConversationStatus-Cv-7hErW.js +0 -1
  440. package/dist/client/assets/CrewAvatar-zgzC3cbU.js +0 -1
  441. package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +0 -1
  442. package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +0 -1
  443. package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +0 -1
  444. package/dist/client/assets/FloorTacticalHUD-BhyOqlL5.js +0 -1
  445. package/dist/client/assets/HarnessMark-DSvM_H7H.js +0 -1
  446. package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +0 -1
  447. package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +0 -1
  448. package/dist/client/assets/InviteSheet--5Zjct25.js +0 -1
  449. package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +0 -1
  450. package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +0 -1
  451. package/dist/client/assets/MeshScreen-BW1dMFWF.js +0 -1
  452. package/dist/client/assets/MessagesScreen-CtNMfIvC.js +0 -1
  453. package/dist/client/assets/MissionControlView-BjPOViGY.js +0 -1
  454. package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +0 -1
  455. package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +0 -1
  456. package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +0 -1
  457. package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +0 -1
  458. package/dist/client/assets/NewChatComposer-BEXS8vV6.js +0 -19
  459. package/dist/client/assets/ObserveEmbedScreen-Dh30EjAQ.js +0 -2
  460. package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +0 -31
  461. package/dist/client/assets/OpsAgentsView-D3rM0udq.js +0 -1
  462. package/dist/client/assets/OpsScreen-DySeNQ1V.js +0 -1
  463. package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +0 -1
  464. package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +0 -1
  465. package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +0 -1
  466. package/dist/client/assets/ProjectsInbox-DfCXReZK.js +0 -2
  467. package/dist/client/assets/ProjectsRail-CELVubfJ.js +0 -1
  468. package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +0 -1
  469. package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +0 -1
  470. package/dist/client/assets/Provider-CNZluAZb.js +0 -5
  471. package/dist/client/assets/RailToggle-BwmY70B8.js +0 -1
  472. package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +0 -1
  473. package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +0 -9
  474. package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +0 -2
  475. package/dist/client/assets/SessionObserveEvidence-CS1aQBpQ.js +0 -1
  476. package/dist/client/assets/SessionRefScreen-DURV0MpF.js +0 -1
  477. package/dist/client/assets/SessionsScreen-D71ZR-8t.js +0 -1
  478. package/dist/client/assets/SettingsDrawer-Nz98oBVl.js +0 -3
  479. package/dist/client/assets/SettingsScreen-CYBHal6y.js +0 -1
  480. package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +0 -1
  481. package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +0 -2
  482. package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +0 -1
  483. package/dist/client/assets/Terminal-jIqnIZZ6.js +0 -4
  484. package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +0 -1
  485. package/dist/client/assets/WorkDetailScreen-Bcf_yHhU.js +0 -5
  486. package/dist/client/assets/WorldActorTalk-CKerDikx.js +0 -1
  487. package/dist/client/assets/WorldMinimap-DOptgrc4.js +0 -1
  488. package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
  489. package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +0 -2
  490. package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
  491. package/dist/client/assets/at-sign-DM7xeppo.js +0 -1
  492. package/dist/client/assets/chat-api-BPVC0asu.js +0 -1
  493. package/dist/client/assets/chat-space-model-B6Jg2CY4.js +0 -4
  494. package/dist/client/assets/content-0AXa0klu.js +0 -1
  495. package/dist/client/assets/content-BEyJ19Lx.js +0 -1
  496. package/dist/client/assets/content-BN5weWKW.js +0 -1
  497. package/dist/client/assets/content-BNokkm7C.js +0 -1
  498. package/dist/client/assets/content-BV4PUM9q.js +0 -1
  499. package/dist/client/assets/content-BxUPlcx5.js +0 -1
  500. package/dist/client/assets/content-CIC5sku8.js +0 -1
  501. package/dist/client/assets/content-CdkTyxqk.js +0 -1
  502. package/dist/client/assets/content-CnhhSCZq.js +0 -1
  503. package/dist/client/assets/content-DY3F9Vfr.js +0 -1
  504. package/dist/client/assets/content-DrKBYpcb.js +0 -1
  505. package/dist/client/assets/content-LSStQYj5.js +0 -1
  506. package/dist/client/assets/content-YvU-D0hF.js +0 -1
  507. package/dist/client/assets/content-oKQMyVnH.js +0 -1
  508. package/dist/client/assets/conversation-model-m8HhzroS.js +0 -1
  509. package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +0 -1
  510. package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
  511. package/dist/client/assets/ctx-panel-F05jXK4Q.css +0 -1
  512. package/dist/client/assets/discover-DlwbftpC.js +0 -2
  513. package/dist/client/assets/embed-entry-c0lwtjBG.js +0 -2
  514. package/dist/client/assets/home-moving-signal-BIHUGNfI.js +0 -1
  515. package/dist/client/assets/home-now-card-CaLgZze2.js +0 -1
  516. package/dist/client/assets/hooks-DaUOREpP.js +0 -2
  517. package/dist/client/assets/index-CGbs0SBm.css +0 -1
  518. package/dist/client/assets/index-CbqBwfIW.js +0 -1
  519. package/dist/client/assets/index-CyPMl7Up.js +0 -1
  520. package/dist/client/assets/index-PQpJveGO.js +0 -1
  521. package/dist/client/assets/left-0vBrvrBG.js +0 -2
  522. package/dist/client/assets/left-C6SyaqlJ.js +0 -1
  523. package/dist/client/assets/left-CTuXysZR.js +0 -2
  524. package/dist/client/assets/left-Cc6s4DT2.js +0 -1
  525. package/dist/client/assets/left-DF5caiyh.js +0 -1
  526. package/dist/client/assets/left-DgT4tWCx.js +0 -1
  527. package/dist/client/assets/left-R0wppTTr.js +0 -1
  528. package/dist/client/assets/left-advisor-C-kt8V28.js +0 -1
  529. package/dist/client/assets/left-agents-thnBO156.js +0 -1
  530. package/dist/client/assets/left-default-CT42fnpF.js +0 -1
  531. package/dist/client/assets/left-lanes-CSmZgciK.js +0 -1
  532. package/dist/client/assets/left-mission-C86x6i9h.js +0 -1
  533. package/dist/client/assets/library-DdhYL_9v.js +0 -1
  534. package/dist/client/assets/message-markup-6Tgo4qFJ.js +0 -15
  535. package/dist/client/assets/mission-control-model-C30vU1Fe.js +0 -1
  536. package/dist/client/assets/profile-BegEUmB7.js +0 -1
  537. package/dist/client/assets/projects-inbox-CKPLZN8s.css +0 -1
  538. package/dist/client/assets/resolve-panes-pfZTezKo.js +0 -1
  539. package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +0 -1
  540. package/dist/client/assets/right-BDaCJ0CF.js +0 -1
  541. package/dist/client/assets/right-BP6lXRFS.js +0 -1
  542. package/dist/client/assets/right-Cb1VCrdj.js +0 -1
  543. package/dist/client/assets/right-CeFaxfBo.js +0 -1
  544. package/dist/client/assets/right-Ck2SrYCj.js +0 -1
  545. package/dist/client/assets/right-D-uv5YfF.js +0 -1
  546. package/dist/client/assets/right-DJMSICky.js +0 -1
  547. package/dist/client/assets/right-Dnljs8ah.js +0 -1
  548. package/dist/client/assets/right-SdCSF8PP.js +0 -1
  549. package/dist/client/assets/router-C-MF5-mb.js +0 -1
  550. package/dist/client/assets/runtime-picker-C_AVYF63.js +0 -1
  551. package/dist/client/assets/scout-voice-CqAyfblr.js +0 -1
  552. package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +0 -1
  553. package/dist/client/assets/system-surfaces-redesign-DKFg4GB5.css +0 -1
  554. package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +0 -1
  555. package/dist/client/assets/usePersistentState-Y8XwSTg-.js +0 -1
  556. package/dist/drizzle/meta/0000_snapshot.json +0 -4575
  557. package/dist/drizzle/meta/0001_snapshot.json +0 -4624
  558. package/dist/drizzle/meta/0002_snapshot.json +0 -4631
  559. package/dist/drizzle/meta/0003_snapshot.json +0 -4952
  560. package/dist/drizzle/meta/0004_snapshot.json +0 -5235
  561. package/dist/drizzle/meta/0005_snapshot.json +0 -5599
  562. package/dist/drizzle/meta/0006_snapshot.json +0 -5606
  563. package/dist/drizzle/meta/0007_snapshot.json +0 -5767
  564. package/dist/drizzle/meta/0008_snapshot.json +0 -5774
  565. package/dist/drizzle/meta/0009_snapshot.json +0 -6262
  566. package/dist/drizzle/meta/0010_snapshot.json +0 -6286
  567. package/dist/drizzle/meta/0011_snapshot.json +0 -6337
  568. package/dist/drizzle/meta/0012_snapshot.json +0 -6458
  569. package/dist/drizzle/meta/0013_snapshot.json +0 -6465
  570. package/dist/drizzle/meta/0014_snapshot.json +0 -6503
  571. package/dist/drizzle/meta/0015_snapshot.json +0 -6596
  572. package/dist/drizzle/meta/0016_snapshot.json +0 -6611
  573. package/dist/drizzle/meta/0017_snapshot.json +0 -6785
  574. package/dist/drizzle/meta/0018_snapshot.json +0 -6804
  575. package/dist/drizzle/meta/0019_snapshot.json +0 -6804
@@ -1 +1 @@
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
+ import{r}from"./index-EsrkGBcv.js";import{a as d}from"./api-DSqpVKC7.js";import{u as f}from"./Provider-C35yu29I.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};
@@ -0,0 +1 @@
1
+ import{c as o}from"./createLucideIcon-zZ8Hx7er.js";const a=[["path",{d:"m10 17 5-5-5-5",key:"1bsop3"}],["path",{d:"M15 12H3",key:"6jk70r"}],["path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4",key:"u53s6r"}]],t=o("log-in",a);export{t as L};
@@ -1 +1 @@
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
+ import{a as A,n as H}from"./agent-state-DDhnFEEP.js";import{g as R}from"./Provider-C35yu29I.js";import{s as v}from"./use-mesh-node-state-BvaqtODo.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};
@@ -0,0 +1 @@
1
+ import{a as x}from"./api-DSqpVKC7.js";const u=new Set(["png","jpg","jpeg","gif","webp","avif","heic","heif","bmp"]),l=new Set(["mp4","webm","mov","m4v"]),m=new Set(["mp3","wav","m4a","aac","ogg","oga"]),p=new Set(["md","markdown","mdx","mdown","mkd"]),g=new Set(["c","cc","cpp","cxx","h","hh","hpp","hxx","cjs","mjs","js","jsx","ts","tsx","py","pyw","pyi","rs","go","java","kt","kts","swift","cs","rb","php","lua","r","sh","bash","zsh","fish","ps1","bat","cmd","sql","prisma","json","jsonc","json5","yaml","yml","toml","xml","html","htm","xhtml","css","scss","sass","less","vue","svelte","astro","graphql","gql","zig","ex","exs","erl","hrl","hs","clj","cljs","cljc","dart","tf","hcl","nix","env","ini","cfg","conf","properties","txt","log","cmake","gradle","groovy","patch","diff","proto","wat"]),w=new Set(["dockerfile","containerfile","makefile","gemfile","rakefile","procfile","brewfile"]),y=new Set(["text/markdown","text/x-markdown","text/plain","text/javascript","text/typescript","text/css","text/html","text/yaml","text/toml","text/x-shellscript","application/json","application/javascript"]);function d(e){return e.trim().split(/[/\\]/).pop()?.toLowerCase()??""}function o(e){const t=d(e),r=t.lastIndexOf(".");return r>=0?t.slice(r+1):""}function j(e){return p.has(o(e))}function v(e){const t=d(e);return w.has(t)?!0:g.has(o(e))}function f(e){return j(e)||v(e)}function h(e,t){if(!f(t))return null;const r=o(t);if(p.has(r))return"text/markdown";switch(r){case"json":case"jsonc":case"json5":return"application/json";case"yaml":case"yml":return"text/yaml";case"toml":return"text/toml";case"html":case"htm":case"xhtml":return"text/html";case"css":case"scss":case"sass":case"less":return"text/css";case"js":case"jsx":case"mjs":case"cjs":return"text/javascript";case"ts":case"tsx":return"text/typescript";case"sh":case"bash":case"zsh":case"fish":return"text/x-shellscript"}const n=e.trim().toLowerCase();return y.has(n)?n:"text/plain"}function E(e){return u.has(o(e))}function S(e){return l.has(o(e))}function k(e){return m.has(o(e))}function F(e,t){const r=e.trim().toLowerCase();return r.startsWith("image/")||r.startsWith("video/")||r.startsWith("audio/")||r==="text/markdown"||r==="text/x-markdown"?!0:t?E(t)||S(t)||k(t)||h(r,t)?!0:!r||r==="application/octet-stream"?f(t):!1:!1}function C(e){const t=e.type.trim().toLowerCase();if(t.startsWith("image/")||t.startsWith("video/")||t.startsWith("audio/"))return t;const r=o(e.name);return u.has(r)?r==="jpg"||r==="jpeg"?"image/jpeg":r==="svg"?"image/svg+xml":`image/${r}`:l.has(r)?r==="mov"?"video/quicktime":r==="m4v"?"video/mp4":`video/${r}`:m.has(r)?r==="mp3"?"audio/mpeg":r==="m4a"?"audio/mp4":r==="oga"?"audio/ogg":`audio/${r}`:h(t,e.name)??t}function a(e){return F(e.type,e.name)}function M(e){return C(e)}function L(e){return e?e.files.length>0||[...e.types].some(t=>t.toLowerCase()==="files")?!0:[...e.items].some(t=>t.kind==="file"):!1}function N(e){if(!e)return[];const t=new Set,r=[],n=s=>{if(!s)return;const i=`${s.name}:${s.size}:${s.lastModified}:${s.type}`;t.has(i)||(t.add(i),r.push(s))};for(const s of e.files)n(s);if(e.items)for(const s of e.items)(s.kind==="file"||s.type.startsWith("image/")||s.type.startsWith("video/"))&&n(s.getAsFile());return b(e,r),r}const O=new WeakMap;function b(e,t){const r=typeof e.getData=="function"?e.getData("text/uri-list"):"",n=T(r);if(!(n.length===0||t.length===0))for(let s=0;s<t.length;s+=1){const i=t[s],c=n[s];i&&c&&O.set(i,c)}}function T(e){if(!e.trim())return[];const t=[];for(const r of e.split(/\r?\n/u))if(!(!r||r.startsWith("#")))try{const n=new URL(r.trim());if(n.protocol!=="file:")continue;const s=decodeURIComponent(n.pathname);t.push(s)}catch{}return t}function D(e){return N(e).filter(a)}function R(e){return D(e)}function I(e){return new Promise((t,r)=>{const n=new FileReader;n.onload=()=>{const s=typeof n.result=="string"?n.result:"",i=s.indexOf(",");t(i>=0?s.slice(i+1):s)},n.onerror=()=>r(n.error??new Error("Could not read file.")),n.readAsDataURL(e)})}async function W(e){if(!a(e))throw new Error("Only markdown, code, image, and video files can be routed.");const t=await I(e);return x("/api/blobs",{method:"POST",body:JSON.stringify({data:t,mediaType:M(e),fileName:e.name})})}async function U(e){const t=e.filter(a);if(t.length===0)throw new Error("Drop markdown, code, an image, or a video clip to route.");return(await Promise.all(t.map(n=>W(n)))).map((n,s)=>({id:n.id,mediaType:n.mediaType,fileName:n.fileName??t[s]?.name,url:n.url}))}export{L as dataTransferMayContainFiles,v as isCodeFileName,j as isMarkdownFileName,a as isRoutableMediaFile,f as isTextCaptureFileName,R as readClipboardMediaFiles,D as readRoutableFiles,N as readTransferredFiles,M as resolvedUploadMediaType,W as uploadMediaFile,U as uploadMediaFiles};
@@ -1 +1 @@
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
+ import{j as l,r as d}from"./index-EsrkGBcv.js";import{a as y}from"./colors-CFlbwC25.js";import{r as T}from"./index-724SdE6r.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-C35yu29I.js";import{A as U}from"./AgentDetailCard-DtHT3sCo.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-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
+ import{r as p}from"./index-EsrkGBcv.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-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
+ import{r as d}from"./index-EsrkGBcv.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-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
+ import{c as e}from"./createLucideIcon-zZ8Hx7er.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};
@@ -0,0 +1,15 @@
1
+ const a=/^```([a-z0-9_-]+)?\s*$/iu,T=/^(#{1,6})\s+(.+)$/u,$=/^(?:-{3,}|\*{3,}|_{3,})$/u,y=/^\s*[-*]\s+(.+)$/u,N=/^\s*\d+[.)]\s+(.+)$/u,k=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function w(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
+ `)}function P(e){const r=w(e).replace(/\r\n?/gu,`
3
+ `).trim();return r?r.replace(/([^\n])\s+---\s+(?=(?:#{1,6}\s|\*\*|[A-Z0-9]))/gu,`$1
4
+
5
+ ---
6
+
7
+ `).replace(/([^\n])\s+(#{1,6}\s+)/gu,`$1
8
+
9
+ $2`).replace(/\n{3,}/gu,`
10
+
11
+ `):""}function R(e){return e.trim().length===0}function b(e){return T.test(e.trim())}function A(e){return $.test(e.trim())}function h(e){return e.match(y)?.[1]?.trim()??null}function p(e){return e.match(N)?.[1]?.trim()??null}function x(e){return h(e)!==null||p(e)!==null}function E(e){return e.trim().replace(/^\|/u,"").replace(/\|$/u,"").split("|").map(t=>t.trim())}function L(e,r){const t=e[r]?.trim(),s=e[r+1]?.trim();return!!(t&&s&&t.includes("|")&&k.test(s))}function B(e,r){const t=e[r]??"",s=t.trim();return!!(R(t)||a.test(s)||b(t)||A(t)||x(t)||s.startsWith(">")||L(e,r))}function I(e){const r=P(e);if(!r)return[];const t=r.split(`
12
+ `),s=[];let n=0;for(;n<t.length;){const u=t[n]??"",c=u.trim();if(!c){n+=1;continue}const m=c.match(a);if(m){const i=[];for(n+=1;n<t.length&&!a.test(t[n].trim());)i.push(t[n]),n+=1;n<t.length&&(n+=1),s.push({type:"code",language:m[1]??null,text:i.join(`
13
+ `)});continue}if(A(u)){s.push({type:"hr"}),n+=1;continue}const l=c.match(T);if(l){s.push({type:"heading",depth:l[1].length,text:l[2].trim()}),n+=1;continue}if(L(t,n)){const i=E(t[n]);n+=2;const o=[];for(;n<t.length&&t[n].includes("|")&&!R(t[n]);)o.push(E(t[n])),n+=1;s.push({type:"table",headers:i,rows:o});continue}const _=h(u),d=p(u);if(_!==null||d!==null){const i=d!==null,o=[];for(;n<t.length;){const g=i?p(t[n]):h(t[n]);if(g===null)break;o.push(g),n+=1}s.push({type:"list",ordered:i,items:o});continue}if(c.startsWith(">")){const i=[];for(;n<t.length&&t[n].trim().startsWith(">");)i.push(t[n].trim().replace(/^>\s?/u,"")),n+=1;s.push({type:"blockquote",text:i.join(`
14
+ `).trim()});continue}const f=[];for(;n<t.length&&!B(t,n);)f.push(t[n].trimEnd()),n+=1;s.push({type:"paragraph",text:f.join(`
15
+ `).trim()})}return s}export{I as p};
@@ -0,0 +1 @@
1
+ import{j as a}from"./index-EsrkGBcv.js";import{p as m}from"./message-markup-BQW5jdJw.js";import{r as n}from"./mentions-ByUvhS-v.js";function d(e,s){const r=Math.min(6,Math.max(2,e.depth+1));return a.jsx("div",{role:"heading","aria-level":r,className:`s-message-markup-heading s-message-markup-heading-${e.depth}`,children:n(e.text)},s)}function l(e,s){return a.jsx("div",{className:"s-message-markup-table-wrap",children:a.jsxs("table",{className:"s-message-markup-table",children:[a.jsx("thead",{children:a.jsx("tr",{children:e.headers.map((r,t)=>a.jsx("th",{children:n(r)},`${s}:h:${t}`))})}),a.jsx("tbody",{children:e.rows.map((r,t)=>a.jsx("tr",{children:e.headers.map((c,i)=>a.jsx("td",{children:n(r[i]??"")},`${s}:c:${t}:${i}`))},`${s}:r:${t}`))})]})},s)}function h(e,s){switch(e.type){case"paragraph":return a.jsx("p",{className:"s-message-markup-paragraph",children:n(e.text)},s);case"heading":return d(e,s);case"hr":return a.jsx("hr",{className:"s-message-markup-rule"},s);case"list":return e.ordered?a.jsx("ol",{className:"s-message-markup-list",children:e.items.map((r,t)=>a.jsx("li",{children:n(r)},`${s}:${t}`))},s):a.jsx("ul",{className:"s-message-markup-list",children:e.items.map((r,t)=>a.jsx("li",{children:n(r)},`${s}:${t}`))},s);case"blockquote":return a.jsx("blockquote",{className:"s-message-markup-quote",children:n(e.text)},s);case"code":return a.jsx("pre",{className:"s-message-markup-code",children:a.jsx("code",{children:e.text})},s);case"table":return l(e,s)}}function j({text:e,className:s}){const r=m(e??"");return r.length===0?e??"":a.jsx("div",{className:["s-message-markup",s].filter(Boolean).join(" "),children:r.map(h)})}export{j as M};
@@ -1 +1 @@
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
+ import{c as a}from"./createLucideIcon-zZ8Hx7er.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};
@@ -0,0 +1 @@
1
+ import{s as a}from"./colors-CFlbwC25.js";import{c as e}from"./agent-state-DDhnFEEP.js";const i=6e4,n=1500;function c(t=n){return`/api/tail/recent?${new URLSearchParams({limit:String(t),transcripts:"true"}).toString()}`}function m(t,s){switch(s){case"activity":return t.activityLabel;case"workspace":return t.workspace?.trim()||"Unassigned";case"harness":return t.harness?.trim()||"Unknown harness";case"state":return e(t.state??null);case"source":return t.source==="native"?"Native sessions":"Scout agents"}}const l={think:"think",tool:"tool",ask:"ask",message:"msg",note:"note",system:"sys",boot:"boot"};function u(t){return a(t)}export{i as A,l as K,c as a,m,u as s};
@@ -1 +1 @@
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};
1
+ import{r as c}from"./index-EsrkGBcv.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 +1 @@
1
- import{m as L}from"./mission-control-model-C30vU1Fe.js";const p=16,g=300,M=180,v=8,W=400,m=1.55,w={w:1440,h:860};function b(n,e,i,s,c,l){let a=null;for(let t=1;t<=n;t+=1){const r=Math.ceil(n/t),o=(e-s*(t-1))/t,u=(i-s*(r-1))/r;if(o<c||u<l)continue;const f=t*r-n,h=Math.min(o,u*m)*Math.min(o/m,u);(!a||f<a.waste||f===a.waste&&h>a.fit)&&(a={cols:t,rows:r,paneW:o,paneH:u,waste:f,fit:h})}return a}function I(n,e,i={}){const s=i.max??p,c=i.minW??g,l=i.minH??M,a=i.gap??v,t=e.w>0?e.w:w.w,r=e.h>0?e.h:w.h,o=Math.max(0,Math.floor(n));if(o===0)return{cols:0,rows:0,shown:0,hidden:0,paneW:0,paneH:0};for(let u=Math.min(o,s);u>=1;u-=1){const f=b(u,t,r,a,c,l);if(f)return{cols:f.cols,rows:f.rows,shown:u,hidden:o-u,paneW:f.paneW,paneH:f.paneH}}return{cols:1,rows:1,shown:1,hidden:o-1,paneW:t,paneH:r}}function j(n,e,i,s={}){const c=I(e,i,s);return n&&n.cols===c.cols&&n.rows===c.rows&&n.shown===c.shown&&n.hidden===c.hidden?n:c}function P(n){const e=n.sessionId?.trim();return e||null}function E(n){const e=n.bufferPerLog??W,i=new Map;for(const t of n.agents)for(const r of t.sessionIds){const o=r.trim();o&&i.set(o,t)}const s=new Map,c=(t,r)=>{const o=s.get(t);if(o)return o;const u={id:t,sessionId:t,lines:[],lastActiveAt:0,live:!1,agent:i.get(t)??null,...r};return s.set(t,u),u};for(const t of n.transcripts){const r=P(t);if(!r)continue;const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:t.transcriptPath});o.lastActiveAt=Math.max(o.lastActiveAt,t.mtimeMs??0)}const l=new Set;for(const t of n.events){const r=t.sessionId?.trim();if(!r)continue;if(t.id){if(l.has(t.id))continue;l.add(t.id)}const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:null});o.source=t.source,o.attribution=t.harness,o.project=t.project||o.project,o.cwd=t.cwd||o.cwd,o.lines.push(t),o.lastActiveAt=Math.max(o.lastActiveAt,t.ts)}const a=[];for(const t of s.values())t.lines.length>e&&(t.lines=t.lines.slice(t.lines.length-e)),t.live=t.lastActiveAt>0&&n.now-t.lastActiveAt<=n.liveWindowMs,a.push(t);return a}function _(n,e){const i=e.trim().toLowerCase();return i?[n.agent?.name,n.agent?.handle,n.agent?.branch,n.project,n.source,n.sessionId,n.cwd,n.logPath].filter(s=>!!s).some(s=>s.toLowerCase().includes(i)):!0}function d(n){return n.attribution==="scout-managed"||n.agent!==null}function F(n,e){const i=e.requireOutput??!0;return n.filter(s=>{if(i&&s.lines.length===0||e.sourceFilter==="scout"&&!d(s)||e.sourceFilter==="native"&&d(s)||e.activityFilter==="live"&&!s.live)return!1;if(e.activityFilter==="active"){const c=e.now-s.lastActiveAt;if(!(s.lastActiveAt>0&&c<=e.activeWindowMs))return!1}return _(s,e.query)})}function A(n,e){return e==="activity"?"":L({activityLabel:"",workspace:n.project,harness:n.source,state:n.agent?.state??null,source:d(n)?"scout":"native"},e)}function H(n,e){const i=new Map;for(const s of n){const c=A(s,e);i.set(c,Math.max(i.get(c)??0,s.lastActiveAt))}return[...n].sort((s,c)=>{const l=A(s,e),a=A(c,e);if(l!==a){const t=(i.get(a)??0)-(i.get(l)??0);return t!==0?t:l.localeCompare(a)}return s.lastActiveAt!==c.lastActiveAt?c.lastActiveAt-s.lastActiveAt:s.sessionId.localeCompare(c.sessionId)})}function y(n){return n.sessionId.slice(0,13)}function N(n){const e=n.agent?.handle?.trim();if(e)return`@${e}`;const i=n.agent?.name?.trim();return i||`${n.source}:${y(n)}`}function S(n){const e=n.logPath?.trim();return e?e.split("/").pop()||e:`${n.sessionId.slice(0,12)}.log`}export{v as W,S as a,E as b,I as c,y as d,F as f,N as m,j as n,H as s};
1
+ import{m as L}from"./mission-control-model-BpJHDV5D.js";const p=16,g=300,M=180,v=8,W=400,m=1.55,w={w:1440,h:860};function b(n,e,i,s,c,l){let a=null;for(let t=1;t<=n;t+=1){const r=Math.ceil(n/t),o=(e-s*(t-1))/t,u=(i-s*(r-1))/r;if(o<c||u<l)continue;const f=t*r-n,h=Math.min(o,u*m)*Math.min(o/m,u);(!a||f<a.waste||f===a.waste&&h>a.fit)&&(a={cols:t,rows:r,paneW:o,paneH:u,waste:f,fit:h})}return a}function I(n,e,i={}){const s=i.max??p,c=i.minW??g,l=i.minH??M,a=i.gap??v,t=e.w>0?e.w:w.w,r=e.h>0?e.h:w.h,o=Math.max(0,Math.floor(n));if(o===0)return{cols:0,rows:0,shown:0,hidden:0,paneW:0,paneH:0};for(let u=Math.min(o,s);u>=1;u-=1){const f=b(u,t,r,a,c,l);if(f)return{cols:f.cols,rows:f.rows,shown:u,hidden:o-u,paneW:f.paneW,paneH:f.paneH}}return{cols:1,rows:1,shown:1,hidden:o-1,paneW:t,paneH:r}}function j(n,e,i,s={}){const c=I(e,i,s);return n&&n.cols===c.cols&&n.rows===c.rows&&n.shown===c.shown&&n.hidden===c.hidden?n:c}function P(n){const e=n.sessionId?.trim();return e||null}function E(n){const e=n.bufferPerLog??W,i=new Map;for(const t of n.agents)for(const r of t.sessionIds){const o=r.trim();o&&i.set(o,t)}const s=new Map,c=(t,r)=>{const o=s.get(t);if(o)return o;const u={id:t,sessionId:t,lines:[],lastActiveAt:0,live:!1,agent:i.get(t)??null,...r};return s.set(t,u),u};for(const t of n.transcripts){const r=P(t);if(!r)continue;const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:t.transcriptPath});o.lastActiveAt=Math.max(o.lastActiveAt,t.mtimeMs??0)}const l=new Set;for(const t of n.events){const r=t.sessionId?.trim();if(!r)continue;if(t.id){if(l.has(t.id))continue;l.add(t.id)}const o=c(r,{source:t.source,attribution:t.harness,project:t.project,cwd:t.cwd,logPath:null});o.source=t.source,o.attribution=t.harness,o.project=t.project||o.project,o.cwd=t.cwd||o.cwd,o.lines.push(t),o.lastActiveAt=Math.max(o.lastActiveAt,t.ts)}const a=[];for(const t of s.values())t.lines.length>e&&(t.lines=t.lines.slice(t.lines.length-e)),t.live=t.lastActiveAt>0&&n.now-t.lastActiveAt<=n.liveWindowMs,a.push(t);return a}function _(n,e){const i=e.trim().toLowerCase();return i?[n.agent?.name,n.agent?.handle,n.agent?.branch,n.project,n.source,n.sessionId,n.cwd,n.logPath].filter(s=>!!s).some(s=>s.toLowerCase().includes(i)):!0}function d(n){return n.attribution==="scout-managed"||n.agent!==null}function F(n,e){const i=e.requireOutput??!0;return n.filter(s=>{if(i&&s.lines.length===0||e.sourceFilter==="scout"&&!d(s)||e.sourceFilter==="native"&&d(s)||e.activityFilter==="live"&&!s.live)return!1;if(e.activityFilter==="active"){const c=e.now-s.lastActiveAt;if(!(s.lastActiveAt>0&&c<=e.activeWindowMs))return!1}return _(s,e.query)})}function A(n,e){return e==="activity"?"":L({activityLabel:"",workspace:n.project,harness:n.source,state:n.agent?.state??null,source:d(n)?"scout":"native"},e)}function H(n,e){const i=new Map;for(const s of n){const c=A(s,e);i.set(c,Math.max(i.get(c)??0,s.lastActiveAt))}return[...n].sort((s,c)=>{const l=A(s,e),a=A(c,e);if(l!==a){const t=(i.get(a)??0)-(i.get(l)??0);return t!==0?t:l.localeCompare(a)}return s.lastActiveAt!==c.lastActiveAt?c.lastActiveAt-s.lastActiveAt:s.sessionId.localeCompare(c.sessionId)})}function y(n){return n.sessionId.slice(0,13)}function N(n){const e=n.agent?.handle?.trim();if(e)return`@${e}`;const i=n.agent?.name?.trim();return i||`${n.source}:${y(n)}`}function S(n){const e=n.logPath?.trim();return e?e.split("/").pop()||e:`${n.sessionId.slice(0,12)}.log`}export{v as W,S as a,E as b,I as c,y as d,F as f,N as m,j as n,H as s};
@@ -1 +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
+ import{c as e}from"./createLucideIcon-zZ8Hx7er.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-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
+ import{c as s}from"./createLucideIcon-zZ8Hx7er.js";import{M as w}from"./message-square-BxesYglW.js";import{T as l}from"./terminal-hQKQygcf.js";import{S as c}from"./search-DT42oyRW.js";import{C as p}from"./compass-63TUaz5_.js";import{S as f}from"./settings-BVh7kldq.js";import{F as g}from"./file-text-CnISiiw6.js";import{G as k}from"./git-branch-B0_fPLO7.js";import{C as y}from"./code-xml-BhcNbLWU.js";import{S as A}from"./scroll-text-DNjxhyO2.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-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
+ import{r}from"./index-EsrkGBcv.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{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
+ import{r as i}from"./index-EsrkGBcv.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-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
+ import{c as t}from"./createLucideIcon-zZ8Hx7er.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};
@@ -0,0 +1 @@
1
+ import{c}from"./createLucideIcon-zZ8Hx7er.js";const a=[["circle",{cx:"12",cy:"12",r:"4",key:"4exip2"}],["path",{d:"M16 8v5a3 3 0 0 0 6 0v-1a10 10 0 1 0-4 8",key:"7n84p3"}]],i=c("at-sign",a);const e=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],p=c("paperclip",e);export{i as A,p as P};
@@ -1 +1 @@
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
+ import{c as e}from"./createLucideIcon-zZ8Hx7er.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-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
+ import{r as a}from"./index-EsrkGBcv.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-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
+ import{c as a}from"./createLucideIcon-zZ8Hx7er.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-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
+ import{c as a}from"./createLucideIcon-zZ8Hx7er.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-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};
1
+ import{c as e}from"./createLucideIcon-zZ8Hx7er.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-EsrkGBcv.js";import{A as Z}from"./AgentAvatar-CrP1eXxk.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-C97-iTMK.js";import{b as Q,r as es,s as ts,a as ns}from"./session-catalog-CvSdPHPe.js";import{u as X}from"./sse-BCPRocpq.js";import{t as z}from"./time-Dhsh_2EG.js";import{B as cs}from"./BackToPicker-CUkjnoVk.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-C35yu29I.js";import{ConversationScreen as ds}from"./ConversationScreen-CUfsQ4MR.js";import{S as ms}from"./SessionObserve-DXxBvejJ.js";import{H as as}from"./HarnessMark-C4naWc16.js";/* empty css */import{AgentDefinitionsWorkspace as ps}from"./AgentDefinitionsWorkspace-DguGs7jZ.js";import{AgentEssentialsGlyph as us}from"./agent-essentials-BGGvT5G6.js";import"./SpriteAvatar-CpZWf54-.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-kTznzqcO.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./colors-CFlbwC25.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./terminal-relay-Bxs1hp-j.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./ComposerAttachments-DW0AIb8k.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-C-ZWscKj.js";import"./AstronautSuit-Cchnc4Ug.js";import"./panel-right-Bv7sP_fc.js";import"./CommsFlowGraph-DxoOaLF_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Vi8ziCPg.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./use-conversation-list-CY4JciOV.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DoRC1nt0.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./tail-events-d0yAYxR0.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-CJa110yk.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./SessionHopMenu-E6VJZrE0.js";import"./external-link-CUObqmgX.js";import"./ObservedTopologyPanel-CUTIoLZJ.js";import"./ObserveTextFlow-PFnG_10h.js";import"./SessionObserveEvidence-Cuj_KHxR.js";import"./wrench-DR0i5BU7.js";import"./agent-specialization-DDc7mLCW.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-BAO6mtjD.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ys({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ws({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const j=r?.data,v=(j?.events??[]).filter(bs),b=v.filter(g=>g.kind==="tool"),S=b.filter(g=>g.tool==="edit"||g.tool==="write"),w=b.filter(g=>g.tool==="read"),y=j?.files.length??0,N=j?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||y>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(N??$)},{k:"tools",v:U(b.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(w.length)},{k:"files",v:U(y)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=j?.metadata?.usage,a=_(D,{model:j?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,f=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(f&&f!==t.id?t.id:null),M=f??t.id,W=f&&t.harness==="codex"?"codex session id":f&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?K(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(ys,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function Ht({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=es(e,o),x=u.useMemo(()=>ts(o?.sessions??[],h),[o?.sessions,h]),j=x.find(n=>n.id===h)??null,I=j?.model??null,v=j?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[w,y]=u.useState("idle"),[N,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{y("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ns(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(w!=="starting"){y("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(e))}),f=n.sessionId?.trim();if(f){F(i,{view:"sessions",sessionId:f},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{y("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,placement:"hero",size:46})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(us,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled:w==="starting",onClick:T,children:w==="starting"?"Starting...":"+ New session"}),N&&s.jsx("div",{className:"s-sess-action-error",children:N}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const f=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=f?"now":n.endedAt?`ended · ${z(n.endedAt)||"recent"}`:z(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${f?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:f?"var(--accent)":"var(--dim)",opacity:f?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?K(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${f?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ws,{agentId:e.id,session:n,active:f,onPrimary:()=>f?void E():O(n),primaryLabel:f?"Continue":"Resume",primaryTitle:f?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?K(t.cwd):"main"),j=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?K(t.cwd):null)??e.name,b=r?.data.metadata?.usage??null,S=b?.assistantMessages??null,w=_(b,{model:r?.data.metadata?.session?.model??j,adapterType:I}),y=w?Math.min(100,w.pct):null,N=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?z(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":N,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":N,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,j?` · ${j}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(as,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[y!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),y,"%"]}):null,b&&(b.inputTokens||b.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(b.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=es(e,o),h=u.useMemo(()=>ts(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,j=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ns(e.id,r,l,h,j),v=Q(j,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const b=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,w=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,y=e.handle?.trim().replace(/^@+/,"")||null,N=t,$=[e.project?`/${e.project}`:null,e.branch,b].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,placement:"hero",size:48}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(as,{harness:e.harness,size:13})}):null,s.jsx("h1",{className:"ap-profileName",title:N,children:N})]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),y?s.jsxs("span",{className:"ap-profileId",title:e.id,children:["@",y]}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${z(a.endedAt)||"recent"}`:z(a.startedAt)||"recent",O=a.cwd?K(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,f=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,f,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,b?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:b})]}):null]})]})]})]})}function Wt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=ls(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[j,I]=u.useState(null),{route:v}=G(),b=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(b,j?.sessions??[])??b,w=u.useCallback(async()=>{const N=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(N)},[e.id]),y=u.useCallback(async()=>{x(!0);try{const N=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${N?`?${N}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),w();const N=window.setTimeout(()=>{w()},3e3);return()=>window.clearTimeout(N)},[w]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&y()},[i,y]),X(()=>{w(),i==="observe"&&y()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const N=setInterval(()=>{y()},2500);return()=>clearInterval(N)},[i,p?.data.live,y]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:j,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:j,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ps,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ms,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(ds,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function Dt({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(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{Wt as AgentDetailWithRail,Dt as AgentProfileBar,Ht as AgentProfileSessionsCenter,ks as CurrentSessionCard};
@@ -1 +1 @@
1
- import{r as T}from"./index-DReVb7jZ.js";import{a as p}from"./api-DSqpVKC7.js";import{d as H}from"./router-C-MF5-mb.js";import{u as V}from"./sse-A8AyLH0g.js";import{i as A,o as $}from"./surface-activity-B1rgWB1i.js";import{u as q}from"./tail-events-C4WdhVeK.js";import{i as P,u as x,j as W,k as Y,l as J}from"./Provider-CNZluAZb.js";import{k as E}from"./conversation-model-m8HhzroS.js";const U=50;function N(e){const s=e.source.trim().toLowerCase(),t=e.sessionId.trim(),n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return s&&o?`${s}\0${o}`:`event\0${e.id}`}function D(e,s){const t=new Map;for(const n of e){if(!P(n))continue;const o=N(n),l=t.get(o);(!l||n.ts>=l.ts)&&t.set(o,n)}return[...t.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,s)}function z(e){const s=e.now??Date.now;let t="idle",n=0,o=null,l=0;const c=()=>t==="idle"||t==="error"&&s()>=n;return{shouldRun:c,run(){if(o)return o;if(!c())return Promise.resolve();t="loading";const a=l;let i;return i=Promise.resolve().then(e.load).then(()=>{l===a&&(t="ready")}).catch(()=>{l===a&&(t="error",n=s()+e.retryDelayMs)}).finally(()=>{o===i&&(o=null)}),o=i,i},reset(){l+=1,t="idle",n=0,o=null}}}function G(e,s=t=>{const n=setTimeout(t,U);return()=>clearTimeout(n)}){const t=new Map;let n=null;const o=()=>{if(n=null,t.size===0)return;const l=[...t.values()];t.clear(),e(l)};return{push(l){t.set(N(l),l),n??=s(o)},cancel(){n?.(),n=null,t.clear()}}}function Q(e){if(typeof window<"u"){const t=window;if(t.requestIdleCallback){const n=t.requestIdleCallback(e,{timeout:1e3});return()=>t.cancelIdleCallback?.(n)}}const s=setTimeout(e,0);return()=>clearTimeout(s)}const X=6e4,O=3e4,Z=1e3,b=200,ee=5e3,te="/api/tail/discover?scope=hot&limit=160",se=`/api/tail/recent?limit=${b}&transcripts=1&mode=assistant-replies`;let r={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const M=new Set;let u=0,m=null,S=!1,h=null,d=null,w=null,g=null,C=null,j=0;function B(){for(const e of[...M])e()}function ne(e,s){const t=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&t(e)===t(s)?e:s}function I(e){r={...r,...e},B()}const _=z({retryDelayMs:ee,load:async()=>{const e=await p(se),s=D([...r.recentEvents,...e.events??[]],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})}});function oe(){h||!_.shouldRun()||(h=Q(()=>{h=null,u>0&&_.run()}))}const K=G(e=>{const s=D([...r.recentEvents,...e],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})});function re(e){P(e)&&K.push(e)}async function f(e){if(m)return S=!0,m;m=(async()=>{j+=1,typeof window<"u"&&(window.__projectsInboxLoads=j),r.loadedAt===null&&e!=="background"&&I({loading:!0,error:null});const[s,t,n]=await Promise.allSettled([p("/api/conversations"),p("/api/fleet"),p(te)]),o=s.status==="fulfilled"?E(r.sessions,s.value):r.sessions,l=t.status==="fulfilled"?Y(r.fleet,t.value):r.fleet,c=n.status==="fulfilled"?ne(r.discovery,n.value):r.discovery,a=[s,t,n].find(F=>F.status==="rejected"),i=a?a.reason instanceof Error?a.reason.message:String(a.reason):null,y=o!==r.sessions||l!==r.fleet||c!==r.discovery||i!==r.error||r.loading;r={...r,sessions:o,fleet:l,discovery:c,error:i,loading:!1,loadedAt:Date.now()},y&&B(),oe()})();try{await m}finally{m=null,S&&u>0&&(S=!1,f("background"))}}function le(){A()&&(d||(d=setTimeout(()=>{d=null,f("background")},Z)))}function ce(){f("initial"),w=setInterval(()=>{A()&&f("background")},X),g=setInterval(()=>{A()&&I({nowMs:Date.now()})},O),C=$(()=>{f("background")})}function ie(){h?.(),h=null,_.reset(),K.cancel(),d&&(clearTimeout(d),d=null),w&&(clearInterval(w),w=null),g&&(clearInterval(g),g=null),C?.(),C=null}function Ie(){f("background")}function ae(){const[e,s]=T.useState(r);return T.useEffect(()=>{const t=()=>s(r);return M.add(t),u+=1,u===1&&ce(),t(),()=>{M.delete(t),u-=1,u===0&&ie()}},[]),V(le),q(re),e}let k=null,v=null,L=null;function ue(e,s){return!!e&&e.length===s.length&&e.every((t,n)=>t===s[n])}function R(e,s,t){if(!e?.length)return s;const n=new Map(e.map(c=>[t(c),c]));let o=e.length===s.length;const l=s.map((c,a)=>{const i=n.get(t(c)),y=i?E(i,c):c;return y!==e[a]&&(o=!1),y});return o?e:l}function de(e,s){if(!e)return s;const t=R(e.projects,s.projects,c=>c.slug),n=R(e.threads,s.threads,c=>c.id),o=R(e.sessions,s.sessions,c=>c.id),l=E(e.projectAliases,J(e.projectAliases,s.projectAliases,t));return t===e.projects&&n===e.threads&&o===e.sessions&&l===e.projectAliases?e:{projects:t,threads:n,sessions:o,projectAliases:l}}function fe(e){const s=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/O),e.showEphemeral];if(ue(k,s)&&v)return v;const t=W(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=de(L===n?v:null,t);return k=s,v=o,L=n,o}function Se(e){const s=ae(),{agents:t}=x(),n=H(e),o=!!e.showEphemeral;return{model:T.useMemo(()=>fe({agents:t,machineId:n,sessions:s.sessions,fleet:s.fleet,discovery:s.discovery,recentEvents:s.recentEvents,nowMs:s.nowMs,showEphemeral:o}),[t,n,s.sessions,s.fleet,s.discovery,s.recentEvents,s.nowMs,o]),agents:t,nowMs:s.nowMs,loading:s.loading,loadedAt:s.loadedAt,error:s.error}}export{Ie as r,Se as u};
1
+ import{r as T}from"./index-EsrkGBcv.js";import{a as p}from"./api-DSqpVKC7.js";import{d as H}from"./router-DCtl8wqb.js";import{u as V}from"./sse-BCPRocpq.js";import{i as A,o as $}from"./surface-activity-B1rgWB1i.js";import{u as q}from"./tail-events-d0yAYxR0.js";import{i as P,u as x,j as W,k as Y,l as J}from"./Provider-C35yu29I.js";import{l as E}from"./conversation-model-FxDeWlle.js";const U=50;function N(e){const s=e.source.trim().toLowerCase(),t=e.sessionId.trim(),n=t.split(/[\\/]/u).filter(Boolean).at(-1)??t,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return s&&o?`${s}\0${o}`:`event\0${e.id}`}function D(e,s){const t=new Map;for(const n of e){if(!P(n))continue;const o=N(n),l=t.get(o);(!l||n.ts>=l.ts)&&t.set(o,n)}return[...t.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,s)}function z(e){const s=e.now??Date.now;let t="idle",n=0,o=null,l=0;const c=()=>t==="idle"||t==="error"&&s()>=n;return{shouldRun:c,run(){if(o)return o;if(!c())return Promise.resolve();t="loading";const a=l;let i;return i=Promise.resolve().then(e.load).then(()=>{l===a&&(t="ready")}).catch(()=>{l===a&&(t="error",n=s()+e.retryDelayMs)}).finally(()=>{o===i&&(o=null)}),o=i,i},reset(){l+=1,t="idle",n=0,o=null}}}function G(e,s=t=>{const n=setTimeout(t,U);return()=>clearTimeout(n)}){const t=new Map;let n=null;const o=()=>{if(n=null,t.size===0)return;const l=[...t.values()];t.clear(),e(l)};return{push(l){t.set(N(l),l),n??=s(o)},cancel(){n?.(),n=null,t.clear()}}}function Q(e){if(typeof window<"u"){const t=window;if(t.requestIdleCallback){const n=t.requestIdleCallback(e,{timeout:1e3});return()=>t.cancelIdleCallback?.(n)}}const s=setTimeout(e,0);return()=>clearTimeout(s)}const X=6e4,O=3e4,Z=1e3,b=200,ee=5e3,te="/api/tail/discover?scope=hot&limit=160",se=`/api/tail/recent?limit=${b}&transcripts=1&mode=assistant-replies`;let r={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const M=new Set;let u=0,m=null,S=!1,h=null,d=null,w=null,g=null,C=null,j=0;function B(){for(const e of[...M])e()}function ne(e,s){const t=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&t(e)===t(s)?e:s}function I(e){r={...r,...e},B()}const _=z({retryDelayMs:ee,load:async()=>{const e=await p(se),s=D([...r.recentEvents,...e.events??[]],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})}});function oe(){h||!_.shouldRun()||(h=Q(()=>{h=null,u>0&&_.run()}))}const K=G(e=>{const s=D([...r.recentEvents,...e],b),t=E(r.recentEvents,s);t!==r.recentEvents&&I({recentEvents:t})});function re(e){P(e)&&K.push(e)}async function f(e){if(m)return S=!0,m;m=(async()=>{j+=1,typeof window<"u"&&(window.__projectsInboxLoads=j),r.loadedAt===null&&e!=="background"&&I({loading:!0,error:null});const[s,t,n]=await Promise.allSettled([p("/api/conversations"),p("/api/fleet"),p(te)]),o=s.status==="fulfilled"?E(r.sessions,s.value):r.sessions,l=t.status==="fulfilled"?Y(r.fleet,t.value):r.fleet,c=n.status==="fulfilled"?ne(r.discovery,n.value):r.discovery,a=[s,t,n].find(F=>F.status==="rejected"),i=a?a.reason instanceof Error?a.reason.message:String(a.reason):null,y=o!==r.sessions||l!==r.fleet||c!==r.discovery||i!==r.error||r.loading;r={...r,sessions:o,fleet:l,discovery:c,error:i,loading:!1,loadedAt:Date.now()},y&&B(),oe()})();try{await m}finally{m=null,S&&u>0&&(S=!1,f("background"))}}function le(){A()&&(d||(d=setTimeout(()=>{d=null,f("background")},Z)))}function ce(){f("initial"),w=setInterval(()=>{A()&&f("background")},X),g=setInterval(()=>{A()&&I({nowMs:Date.now()})},O),C=$(()=>{f("background")})}function ie(){h?.(),h=null,_.reset(),K.cancel(),d&&(clearTimeout(d),d=null),w&&(clearInterval(w),w=null),g&&(clearInterval(g),g=null),C?.(),C=null}function Ie(){f("background")}function ae(){const[e,s]=T.useState(r);return T.useEffect(()=>{const t=()=>s(r);return M.add(t),u+=1,u===1&&ce(),t(),()=>{M.delete(t),u-=1,u===0&&ie()}},[]),V(le),q(re),e}let L=null,v=null,k=null;function ue(e,s){return!!e&&e.length===s.length&&e.every((t,n)=>t===s[n])}function R(e,s,t){if(!e?.length)return s;const n=new Map(e.map(c=>[t(c),c]));let o=e.length===s.length;const l=s.map((c,a)=>{const i=n.get(t(c)),y=i?E(i,c):c;return y!==e[a]&&(o=!1),y});return o?e:l}function de(e,s){if(!e)return s;const t=R(e.projects,s.projects,c=>c.slug),n=R(e.threads,s.threads,c=>c.id),o=R(e.sessions,s.sessions,c=>c.id),l=E(e.projectAliases,J(e.projectAliases,s.projectAliases,t));return t===e.projects&&n===e.threads&&o===e.sessions&&l===e.projectAliases?e:{projects:t,threads:n,sessions:o,projectAliases:l}}function fe(e){const s=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/O),e.showEphemeral];if(ue(L,s)&&v)return v;const t=W(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=de(k===n?v:null,t);return L=s,v=o,k=n,o}function Se(e){const s=ae(),{agents:t}=x(),n=H(e),o=!!e.showEphemeral;return{model:T.useMemo(()=>fe({agents:t,machineId:n,sessions:s.sessions,fleet:s.fleet,discovery:s.discovery,recentEvents:s.recentEvents,nowMs:s.nowMs,showEphemeral:o}),[t,n,s.sessions,s.fleet,s.discovery,s.recentEvents,s.nowMs,o]),agents:t,nowMs:s.nowMs,loading:s.loading,loadedAt:s.loadedAt,error:s.error}}export{Ie as r,Se as u};