@openscout/scout 0.2.78 → 0.2.79

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 (391) hide show
  1. package/README.md +19 -0
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/ActivityScreen-DnqqRSlS.js +1 -0
  5. package/dist/client/assets/{AddProjectForm-DMnobKch.js → AddProjectForm-BoVtelSP.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-D90c1Rzk.js → AgentAvatar-CufDA4A-.js} +1 -1
  7. package/dist/client/assets/AgentConfigurationScreen-CJqoMA0J.js +1 -0
  8. package/dist/client/assets/AgentDefinitionsWorkspace-FpEkb-tu.js +1 -0
  9. package/dist/client/assets/{AgentDetailCard-BcRBRp88.js → AgentDetailCard-DxxVkgT1.js} +1 -1
  10. package/dist/client/assets/AgentFloorView-CycUn0Lv.js +1 -0
  11. package/dist/client/assets/AgentInfoScreen-CAQAxpAK.js +1 -0
  12. package/dist/client/assets/{AgentLaneCard-RrNnDZu8.js → AgentLaneCard-DTUvE96I.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-D9ZwUKrl.js → AgentLaneChrome-BfVygkgL.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-BXbPls9N.js → AgentLaneDetailSheet-CWs9wKWk.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-BhFmGNzT.js → AgentLaneSummaryResize-CMgzYvAA.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-BUCW4nUj.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-eSAoDsPi.js → AgentLanesPreflight-KWfLcaNB.js} +1 -1
  18. package/dist/client/assets/AgentLanesView-CxfbV8Kd.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-DBtnD0qE.js → AgentLiveActions-CZdAInEu.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-DyqOf4nG.js → AgentSessions-Bkr0lyry.js} +2 -2
  21. package/dist/client/assets/AgentsConsole-WtFVqaPJ.js +1 -0
  22. package/dist/client/assets/AgentsScreen-BMXvuiA2.js +1 -0
  23. package/dist/client/assets/AgentsSubnav-BTNjPYoA.js +1 -0
  24. package/dist/client/assets/{AtopView-BCkae3e1.js → AtopView-_OKDlZ1h.js} +1 -1
  25. package/dist/client/assets/BackToPicker-CkUmHuuo.js +1 -0
  26. package/dist/client/assets/{BriefingDetailScreen-BwFyysT8.js → BriefingDetailScreen-i54EtZKW.js} +1 -1
  27. package/dist/client/assets/{BriefingsScreen-BQEevztH.js → BriefingsScreen-CBrHojlQ.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-7UjcuNjd.js → BrokerMetadataPanel-opTLuZU6.js} +1 -1
  29. package/dist/client/assets/{BrokerScreen-7ekklu88.js → BrokerScreen-CObCQvoy.js} +2 -2
  30. package/dist/client/assets/{ChatCollapsedStrip-CQSYSd8s.js → ChatCollapsedStrip-Dr2vmKXQ.js} +1 -1
  31. package/dist/client/assets/CodeDiffPane-CLOGjwul.js +1 -0
  32. package/dist/client/assets/{CodeProjectPicker-DqKFCpLU.js → CodeProjectPicker-DTV8hR6A.js} +1 -1
  33. package/dist/client/assets/CodeScreen-BXqi72NK.js +1 -0
  34. package/dist/client/assets/{ContextMenu-bARZqTzD.js → ContextMenu-BlBQhpax.js} +1 -1
  35. package/dist/client/assets/{ConversationComposer-Bla3DDvM.js → ConversationComposer-BBNPa5S9.js} +1 -1
  36. package/dist/client/assets/ConversationFeedRows-BuejHMCY.js +1 -0
  37. package/dist/client/assets/ConversationHeader-DXMT-YXv.js +1 -0
  38. package/dist/client/assets/ConversationPanels-DHCtilQF.js +2 -0
  39. package/dist/client/assets/ConversationScreen-DSxIt9pq.css +1 -0
  40. package/dist/client/assets/ConversationScreen-Dz2d_Z_F.js +1 -0
  41. package/dist/client/assets/ConversationStatus-DSgdVofa.js +1 -0
  42. package/dist/client/assets/{DataTable-E8s_MmoA.js → DataTable-0DwuXyvW.js} +1 -1
  43. package/dist/client/assets/{DispatchAftermath-Dpe88DFX.js → DispatchAftermath-BrreQifA.js} +1 -1
  44. package/dist/client/assets/{DocumentFocusViewer-BeVwwl26.js → DocumentFocusViewer-DU_9BHsD.js} +1 -1
  45. package/dist/client/assets/{EmbeddableSurfacesLab-BQqFQVnI.js → EmbeddableSurfacesLab-DdaswbfI.js} +1 -1
  46. package/dist/client/assets/{EmptyState-4F9XDFQm.js → EmptyState-CoL-QuUO.js} +1 -1
  47. package/dist/client/assets/{FileViewerPane-CLgUhSm4.js → FileViewerPane-C9Ly01Ef.js} +1 -1
  48. package/dist/client/assets/{FleetSearch-Dz5euQJe.js → FleetSearch-DlWTLl-v.js} +1 -1
  49. package/dist/client/assets/FlightObserveScreen-C-9S0nA5.js +1 -0
  50. package/dist/client/assets/{FollowScreen-DZ4qfYOY.js → FollowScreen--Q04xSSE.js} +1 -1
  51. package/dist/client/assets/{HarnessMark-Cbv3Ib0c.js → HarnessMark-Dm_qm1Ku.js} +1 -1
  52. package/dist/client/assets/HarnessesScreen-Y54viPX8.js +1 -0
  53. package/dist/client/assets/{HomeHero-B3uYd-pP.js → HomeHero-Cfsow7qL.js} +1 -1
  54. package/dist/client/assets/KnowledgeSearchInspector-DKashKoH.js +1 -0
  55. package/dist/client/assets/KnowledgeSearchScreen-DsdDz8wY.js +1 -0
  56. package/dist/client/assets/{LaneToolHoverCard-Bla0gBdm.js → LaneToolHoverCard-BzehBmdi.js} +1 -1
  57. package/dist/client/assets/LaneTraceDetailSheet-CBf_aNZx.js +1 -0
  58. package/dist/client/assets/{LaneTraceEventFocus-BF9ERP5O.js → LaneTraceEventFocus-DYvHfs_3.js} +1 -1
  59. package/dist/client/assets/{MeshCanvas-DFEPkpqY.js → MeshCanvas-DIjlrMPU.js} +2 -2
  60. package/dist/client/assets/{MeshCanvasMinimap-CyVFYixr.js → MeshCanvasMinimap-DEq-PkF0.js} +1 -1
  61. package/dist/client/assets/MeshScreen-TgDtz-1l.js +1 -0
  62. package/dist/client/assets/{MeshTopologyView-CalkZghg.js → MeshTopologyView-BMHpH5BU.js} +2 -2
  63. package/dist/client/assets/{MessageComposerSuggestions-DpxN9WiB.js → MessageComposerSuggestions-zAUUcLOv.js} +1 -1
  64. package/dist/client/assets/MessagesScreen-BTQL0UcE.js +1 -0
  65. package/dist/client/assets/{MissionControlView-lUeAiSVg.js → MissionControlView-D59SPnAm.js} +1 -1
  66. package/dist/client/assets/{MissionFocusOverlay-wlCmWDCT.js → MissionFocusOverlay-C7cPt6eU.js} +1 -1
  67. package/dist/client/assets/MissionLeftAgentRow-CxlH3dON.js +1 -0
  68. package/dist/client/assets/{MissionLogPane-__MVtEl9.js → MissionLogPane-Ye3YlF9s.js} +1 -1
  69. package/dist/client/assets/{NewAgentModal-Bg-eWHpY.js → NewAgentModal-DprvD4EK.js} +1 -1
  70. package/dist/client/assets/NewChatComposer-B5FnPyzS.js +19 -0
  71. package/dist/client/assets/{NewChatOrigin-Bk2OyVjI.js → NewChatOrigin--pHWUb4V.js} +1 -1
  72. package/dist/client/assets/ObserveEmbedScreen-CfvrnOiZ.js +2 -0
  73. package/dist/client/assets/{ObserveTextFlow-rsFj_rVo.js → ObserveTextFlow-CBitljxi.js} +2 -2
  74. package/dist/client/assets/{ObservedTopologyPanel-DyUeV98H.js → ObservedTopologyPanel-Dv6fbHzW.js} +1 -1
  75. package/dist/client/assets/OpenScoutAppShell-BIp0WitK.js +87 -0
  76. package/dist/client/assets/OpsAgentsView-CoBfAigH.js +1 -0
  77. package/dist/client/assets/OpsScreen-Bbo0W64T.js +1 -0
  78. package/dist/client/assets/OpsSubnav-CoN8utF8.js +1 -0
  79. package/dist/client/assets/{PlanView-C1CjH3PG.js → PlanView-DYtt8H37.js} +1 -1
  80. package/dist/client/assets/ProjectAgentProfile-FiiIcB5R.js +1 -0
  81. package/dist/client/assets/{ProjectAgentProfileBar-CtTpj6fU.js → ProjectAgentProfileBar-B3IvVbqS.js} +1 -1
  82. package/dist/client/assets/ProjectAgentProfileHero-D5E8yvDj.js +1 -0
  83. package/dist/client/assets/ProjectsInbox-BWiXjGi7.js +2 -0
  84. package/dist/client/assets/{ProjectsRail-BgiuV4LR.js → ProjectsRail-DEDS-M1c.js} +1 -1
  85. package/dist/client/assets/ProjectsScreen-Cxk4CuYn.js +1 -0
  86. package/dist/client/assets/ProjectsThreadAside-BF66ugT5.js +1 -0
  87. package/dist/client/assets/Provider-tFc3jqZ4.js +1 -0
  88. package/dist/client/assets/{RailRow-BoGxAHNF.js → RailRow-BTlVAnHS.js} +1 -1
  89. package/dist/client/assets/RawSessionsTable-BsGVgZB3.js +1 -0
  90. package/dist/client/assets/RealtimeVoiceScreen-B0Bem5Rc.js +1 -0
  91. package/dist/client/assets/{RepoDiffEmbedScreen-C0rumUME.js → RepoDiffEmbedScreen-CtTdlQ2A.js} +1 -1
  92. package/dist/client/assets/{RepoDiffPageScreen-DMv6DioL.js → RepoDiffPageScreen-BRvaVYoC.js} +1 -1
  93. package/dist/client/assets/RepoDiffViewer-Bo0gREMj.js +7 -0
  94. package/dist/client/assets/RepoDiffViewerLazy-C8UPk4oo.js +2 -0
  95. package/dist/client/assets/{ReposScreen-CB_YBWYf.js → ReposScreen-BBkJf8xT.js} +2 -2
  96. package/dist/client/assets/{ScoutDeckSurface-CxIYFyWx.js → ScoutDeckSurface-Bi9ov9Bm.js} +1 -1
  97. package/dist/client/assets/{ScoutSurface-CYz_TcWC.js → ScoutSurface-DEQg_7Io.js} +1 -1
  98. package/dist/client/assets/{ScoutbotBroadcastChip-L_R9atj0.js → ScoutbotBroadcastChip-DJXuyn73.js} +1 -1
  99. package/dist/client/assets/{ScoutbotFxLab-CgiZMDMW.js → ScoutbotFxLab-BgsuLDjo.js} +1 -1
  100. package/dist/client/assets/{ScoutbotRealtimeVoiceCall-FMQOr1Np.js → ScoutbotRealtimeVoiceCall-Bzyl0BCS.js} +1 -1
  101. package/dist/client/assets/{SecondaryNav-B3-nh5dM.js → SecondaryNav-Bks0CO2h.js} +1 -1
  102. package/dist/client/assets/SessionEmbedScreen-b0Zgmfx5.js +1 -0
  103. package/dist/client/assets/SessionObserve-CLrHfAKZ.css +1 -0
  104. package/dist/client/assets/SessionObserve-Dlx5vDaV.js +12 -0
  105. package/dist/client/assets/SessionObserveEvidence-ChBD1d4c.js +1 -0
  106. package/dist/client/assets/SessionRefScreen-D7TfPYPN.js +1 -0
  107. package/dist/client/assets/SessionsScreen-BlknOWAd.js +1 -0
  108. package/dist/client/assets/{SettingsDrawer-XfdAa_nD.js → SettingsDrawer-C587L1i1.js} +3 -3
  109. package/dist/client/assets/SettingsDrawer-UX7pFJU_.css +1 -0
  110. package/dist/client/assets/SettingsScreen-BIlYxv_a.js +1 -0
  111. package/dist/client/assets/{ShikiPane-Ap1iPxYb.js → ShikiPane-I_OTW5NO.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-COwtoJqR.js → SlidePanel-FCqT1zO3.js} +1 -1
  113. package/dist/client/assets/SpriteAvatar-CQs-jC-v.js +1 -0
  114. package/dist/client/assets/{StatusPill-DhBL__p8.js → StatusPill-CbABggnQ.js} +1 -1
  115. package/dist/client/assets/{TailView-DGj_5HA9.js → TailView-C_MXVSum.js} +2 -2
  116. package/dist/client/assets/Terminal-DwZyo8kA.js +1 -0
  117. package/dist/client/assets/TerminalEmbedScreen-Czp3tQyd.js +1 -0
  118. package/dist/client/assets/{TextDocumentSurface-BpAw4eQS.js → TextDocumentSurface-C-9EtYqt.js} +1 -1
  119. package/dist/client/assets/{TmuxPeek-m1osv33Q.js → TmuxPeek-Dz1gJ2pU.js} +1 -1
  120. package/dist/client/assets/{VoicePermissionsPanel-DsK53ar4.js → VoicePermissionsPanel-MfICy9kk.js} +1 -1
  121. package/dist/client/assets/{WorkDetailScreen-Bx0JimPC.js → WorkDetailScreen-Cs7kdllj.js} +3 -3
  122. package/dist/client/assets/{WorkFilesViewer-Btl6C2Q1.js → WorkFilesViewer-CF-nhtZ4.js} +1 -1
  123. package/dist/client/assets/{activity-CA8qS6PI.js → activity-WhBf3FXP.js} +1 -1
  124. package/dist/client/assets/{addon-fit-BZ-kXjeN.js → addon-fit-q-x_HytU.js} +1 -1
  125. package/dist/client/assets/{addon-webgl-D9-EQVEK.js → addon-webgl-fhhvEA9h.js} +1 -1
  126. package/dist/client/assets/{agent-essentials-BSY1o46q.js → agent-essentials-DyJiUGpZ.js} +1 -1
  127. package/dist/client/assets/agent-identity-xQHedtLl.js +1 -0
  128. package/dist/client/assets/agent-lane-card-BkWVDYM8.css +1 -0
  129. package/dist/client/assets/{agent-lane-card-model-r2frk57c.js → agent-lane-card-model-BCIwPjEh.js} +1 -1
  130. package/dist/client/assets/{agent-lane-detail-Djm3YJEa.js → agent-lane-detail-Cw4QVAgH.js} +1 -1
  131. package/dist/client/assets/{agent-lane-preview-CmHVe3dU.js → agent-lane-preview-BtnfNyFR.js} +1 -1
  132. package/dist/client/assets/{agent-lanes-model-B4YTt4OF.js → agent-lanes-model-Bl6xfviL.js} +1 -1
  133. package/dist/client/assets/{arc.es-CQBb-dVu.js → arc.es-DPJ0xRV6.js} +1 -1
  134. package/dist/client/assets/{arrow-down-BPLe0am9.js → arrow-down-DsD-dYj-.js} +1 -1
  135. package/dist/client/assets/{arrow-left-DEZzHiPS.js → arrow-left-WjQIN9J6.js} +1 -1
  136. package/dist/client/assets/{arrow-up-right-ClxBnsi7.js → arrow-up-right-CtTDrZJr.js} +1 -1
  137. package/dist/client/assets/{bot-eu8pBNvI.js → bot-B_Uzf4_O.js} +1 -1
  138. package/dist/client/assets/{check-DjgFiBxb.js → check-BbgHJX8u.js} +1 -1
  139. package/dist/client/assets/{chevron-down-BGk5qoEw.js → chevron-down-BFai6ZfE.js} +1 -1
  140. package/dist/client/assets/{chevron-right-XiIHsk4m.js → chevron-right-CyUa1zXx.js} +1 -1
  141. package/dist/client/assets/chunk-HRAB3GC3-CvwpNg-G.js +1 -0
  142. package/dist/client/assets/{chunk-T65CQEWV-CrzwSeEt.js → chunk-T65CQEWV-DI4NKdNq.js} +1 -1
  143. package/dist/client/assets/{chunk-YOZR3KYS-Bet8khjg.js → chunk-YOZR3KYS-BW85tiCr.js} +3 -3
  144. package/dist/client/assets/clock-DviOalxA.js +1 -0
  145. package/dist/client/assets/{code-xml-B6jOCM4V.js → code-xml-05TD3uOC.js} +1 -1
  146. package/dist/client/assets/content-2u_eV3fX.js +1 -0
  147. package/dist/client/assets/content-5irOghrY.js +1 -0
  148. package/dist/client/assets/content-8Z_0CwtD.js +1 -0
  149. package/dist/client/assets/content-B38YRDBu.js +1 -0
  150. package/dist/client/assets/content-BE3uK0LB.js +1 -0
  151. package/dist/client/assets/{content-C2EwTb2y.js → content-BtIxSqVY.js} +1 -1
  152. package/dist/client/assets/content-CFsPAihU.js +1 -0
  153. package/dist/client/assets/content-CKj5g5tu.js +1 -0
  154. package/dist/client/assets/{content-D5kJmfgl.js → content-CLDWXf9Z.js} +1 -1
  155. package/dist/client/assets/content-CRr73E0r.js +1 -0
  156. package/dist/client/assets/content-CVR75_Uj.js +1 -0
  157. package/dist/client/assets/content-Czdp7_JQ.js +1 -0
  158. package/dist/client/assets/content-D0_EJ6nP.js +1 -0
  159. package/dist/client/assets/content-DNmxpNhD.js +1 -0
  160. package/dist/client/assets/content-XpbI9uxd.js +1 -0
  161. package/dist/client/assets/content-cyxWdgKQ.js +1 -0
  162. package/dist/client/assets/{context-budget-CbB4BDcO.js → context-budget-DX_fwUs3.js} +1 -1
  163. package/dist/client/assets/{conversation-icons-IIG5ha6D.js → conversation-icons-DohQL6GI.js} +1 -1
  164. package/dist/client/assets/conversation-model-C4yb6_FA.js +1 -0
  165. package/dist/client/assets/conversation-motion-features-CifSdJtm.js +1 -0
  166. package/dist/client/assets/{copy-CQGYbxdu.js → copy-CwCAivnc.js} +1 -1
  167. package/dist/client/assets/{createLucideIcon-OpA4Amw5.js → createLucideIcon-DlxlBfLC.js} +1 -1
  168. package/dist/client/assets/discover-DoiAJo4Z.js +2 -0
  169. package/dist/client/assets/embed-entry-D1Or9S4d.js +2 -0
  170. package/dist/client/assets/{external-link-CXBytO9o.js → external-link-CnjcXf32.js} +1 -1
  171. package/dist/client/assets/{eye-0PvebX_a.js → eye-So8tNNK6.js} +1 -1
  172. package/dist/client/assets/{file-text-BODxCjcz.js → file-text-i3xTDUjJ.js} +1 -1
  173. package/dist/client/assets/{gestures-CcwOTu8C.js → gestures-CgvAMd6F.js} +1 -1
  174. package/dist/client/assets/{home-moving-signal-CK147hxn.js → home-moving-signal-BdkERL6B.js} +1 -1
  175. package/dist/client/assets/home-now-card-lLkv6nQs.js +1 -0
  176. package/dist/client/assets/{home-now-card-nano-BcjnOU9H.js → home-now-card-nano-CkLHUQ4J.js} +1 -1
  177. package/dist/client/assets/hooks-BPLDD9yu.js +2 -0
  178. package/dist/client/assets/inbox-thread-redesign-B_1ocqaX.css +1 -0
  179. package/dist/client/assets/index-DGoLx89y.js +1 -0
  180. package/dist/client/assets/index-DITWsjFb.css +1 -0
  181. package/dist/client/assets/index-m6dFtY5f.js +1 -0
  182. package/dist/client/assets/index-pY8-Mz7y.js +1 -0
  183. package/dist/client/assets/{index-DMiGbrBt.js → index-sUomXsrf.js} +6 -6
  184. package/dist/client/assets/{inspector-panel-DPoCWxKs.js → inspector-panel-DhXd-YbT.js} +2 -2
  185. package/dist/client/assets/{keyboard-nav-2kv_tGUS.js → keyboard-nav-BhZZ5HEq.js} +1 -1
  186. package/dist/client/assets/knowledge-search-D_bLoYtC.css +1 -0
  187. package/dist/client/assets/{lane-observe-D0rfKDnU.js → lane-observe-DrhKkQ3A.js} +1 -1
  188. package/dist/client/assets/{lane-roster-store-D8x1jac2.js → lane-roster-store-NE15Oe6M.js} +1 -1
  189. package/dist/client/assets/left-B6eawimv.js +1 -0
  190. package/dist/client/assets/left-BL2uBHe0.js +2 -0
  191. package/dist/client/assets/left-BNJguPDG.js +1 -0
  192. package/dist/client/assets/left-BvCtvN0f.js +1 -0
  193. package/dist/client/assets/left-CfBb6bxM.js +1 -0
  194. package/dist/client/assets/left-DTrlBF0h.js +2 -0
  195. package/dist/client/assets/left-agents-DsOHgDCY.js +1 -0
  196. package/dist/client/assets/left-d4hlBBxY.js +1 -0
  197. package/dist/client/assets/left-default-BRCwoCJr.js +1 -0
  198. package/dist/client/assets/left-lanes-DNtoRzoV.js +1 -0
  199. package/dist/client/assets/left-mission-DsTu2X5Y.js +1 -0
  200. package/dist/client/assets/left-plan-CtySjsXC.js +2 -0
  201. package/dist/client/assets/library-CLpgWNJO.js +1 -0
  202. package/dist/client/assets/{loader-circle-CbHjZsz1.js → loader-circle-lWOOKezu.js} +1 -1
  203. package/dist/client/assets/{local-agents--00gLMqr.js → local-agents-C7fDHLVC.js} +1 -1
  204. package/dist/client/assets/{mentions-jSuTGeet.js → mentions-CY_wPZc5.js} +1 -1
  205. package/dist/client/assets/mesh-ops-B1kDjizF.css +1 -0
  206. package/dist/client/assets/mesh-ops-Kn8pCtyJ.js +1 -0
  207. package/dist/client/assets/{mesh-view-store-CWidRbTE.js → mesh-view-store-D14ihwkF.js} +1 -1
  208. package/dist/client/assets/{message-circle-CG-96zts.js → message-circle-C5UZ6fO7.js} +1 -1
  209. package/dist/client/assets/{message-markup-3J9pi3nx.js → message-markup-C8Nx04sP.js} +1 -1
  210. package/dist/client/assets/{message-square-DSaGpjFU.js → message-square-BD-4UUdc.js} +1 -1
  211. package/dist/client/assets/{mission-control-store-BlnEhiCq.js → mission-control-store-xQHVQdm8.js} +1 -1
  212. package/dist/client/assets/{model-CpAxGuis.js → model-IGCUEsMy.js} +1 -1
  213. package/dist/client/assets/{observe-CuLGD9Zp.js → observe-uJfIlIUV.js} +1 -1
  214. package/dist/client/assets/{page-status-DpkedE1F.js → page-status-BymFEFai.js} +1 -1
  215. package/dist/client/assets/paperclip-DL9BXPp2.js +1 -0
  216. package/dist/client/assets/{plus--b1raV_O.js → plus-C9lTjsgd.js} +1 -1
  217. package/dist/client/assets/profile-BqY5tesX.js +1 -0
  218. package/dist/client/assets/{projects-inbox-CHyUFQ6w.js → projects-inbox-DfVmGFFk.js} +1 -1
  219. package/dist/client/assets/{radio-Bz8ZePxj.js → radio-DedMyP8J.js} +1 -1
  220. package/dist/client/assets/{refresh-cw-BBmAnCB7.js → refresh-cw-D8PFyhUa.js} +1 -1
  221. package/dist/client/assets/repo-diff-DyYmQMSA.css +1 -0
  222. package/dist/client/assets/resolve-panes-1xeZMuaw.js +1 -0
  223. package/dist/client/assets/resolve-sidebar-context-PLr32WHN.js +1 -0
  224. package/dist/client/assets/right-1x7HzabC.js +1 -0
  225. package/dist/client/assets/{right-DjRXbnRP.js → right-C1sIsSHR.js} +1 -1
  226. package/dist/client/assets/right-CFzPUzlF.js +1 -0
  227. package/dist/client/assets/right-CRKyeJDk.js +1 -0
  228. package/dist/client/assets/right-CagzkLWg.js +1 -0
  229. package/dist/client/assets/right-CsV149pN.js +1 -0
  230. package/dist/client/assets/right-DITNyG2s.js +1 -0
  231. package/dist/client/assets/right-E3nNcLE3.js +1 -0
  232. package/dist/client/assets/right-eUQvSjd7.js +1 -0
  233. package/dist/client/assets/right-ozp4nM44.js +1 -0
  234. package/dist/client/assets/{rocket-BSNS_rLs.js → rocket-CriBwkHM.js} +1 -1
  235. package/dist/client/assets/router-Dja9_ygK.js +1 -0
  236. package/dist/client/assets/{runtime-picker-Bcl5iIX5.js → runtime-picker-DOZpZOlt.js} +1 -1
  237. package/dist/client/assets/{scope-views-U-ucT9m0.js → scope-views-BF_RvGKU.js} +1 -1
  238. package/dist/client/assets/{scout-voice-CU5c0LGi.js → scout-voice-BZ4KqADJ.js} +1 -1
  239. package/dist/client/assets/{scroll-text-D6Pdnar7.js → scroll-text-BIYf6g6N.js} +1 -1
  240. package/dist/client/assets/{search-CWfZtOt2.js → search-DCT_EvPr.js} +1 -1
  241. package/dist/client/assets/secondaryNavConfig-Drb7wPG4.js +1 -0
  242. package/dist/client/assets/{selection-bridge-16pk1qyG.js → selection-bridge-CJOTyYQs.js} +1 -1
  243. package/dist/client/assets/{send-horizontal-Bg5-QggH.js → send-horizontal-DDwOgEs3.js} +1 -1
  244. package/dist/client/assets/{server-CPp4ZJhZ.js → server-CHZCp3cF.js} +1 -1
  245. package/dist/client/assets/{session-catalog-BmoyVTJ_.js → session-catalog-XhGxCtP-.js} +1 -1
  246. package/dist/client/assets/{session-table-DZcrKoIH.js → session-table-sAVe44a4.js} +1 -1
  247. package/dist/client/assets/{sliders-horizontal-1oW76Xc9.js → sliders-horizontal-B9Nj-Y4J.js} +1 -1
  248. package/dist/client/assets/sparkles-up7pVlX-.js +1 -0
  249. package/dist/client/assets/{sse-CjIkKo46.js → sse-CVoGDiKW.js} +1 -1
  250. package/dist/client/assets/{tail-events-D19uAGe3.js → tail-events-CTipUIli.js} +1 -1
  251. package/dist/client/assets/{terminal-B9AOZQKR.js → terminal-DXQISjZn.js} +1 -1
  252. package/dist/client/assets/{terminal-relay-CWbJ1RCW.js → terminal-relay-B5Sma7fK.js} +1 -1
  253. package/dist/client/assets/{terminal-takeover-B8UeD9OX.js → terminal-takeover-X97KCSJk.js} +1 -1
  254. package/dist/client/assets/{time-DltNTpLl.js → time-Dhsh_2EG.js} +1 -1
  255. package/dist/client/assets/{use-conversation-list-Byab41G6.js → use-conversation-list-B1T6J_qE.js} +1 -1
  256. package/dist/client/assets/{use-fleet-active-asks-BIbQx5AS.js → use-fleet-active-asks-DLofGhhK.js} +1 -1
  257. package/dist/client/assets/use-mesh-ops-items-ByGZk8rU.js +1 -0
  258. package/dist/client/assets/{use-reduced-motion-RRBkmVkk.js → use-reduced-motion-Cvk-HRKg.js} +1 -1
  259. package/dist/client/assets/use-scout-dev-flags-BHvg3G2c.js +1 -0
  260. package/dist/client/assets/{useAgentHoverCard-DMrbBif0.js → useAgentHoverCard-D5e8Qg1z.js} +1 -1
  261. package/dist/client/assets/useContentSecondaryNav-ZfBNi3d4.js +1 -0
  262. package/dist/client/assets/usePierreRuntime-DIVunfX0.js +50 -0
  263. package/dist/client/assets/{wrench-Bkc_0lKF.js → wrench-pEVd8JnN.js} +1 -1
  264. package/dist/client/assets/{x-D3GElQbe.js → x-0XjXwGqq.js} +1 -1
  265. package/dist/client/assets/{xterm-BKR8oAkR.js → xterm-CRLlV1Xp.js} +1 -1
  266. package/dist/client/index.html +2 -2
  267. package/dist/drizzle/0007_lean_venus.sql +26 -0
  268. package/dist/drizzle/0008_luxuriant_ted_forrester.sql +1 -0
  269. package/dist/drizzle/meta/0007_snapshot.json +5767 -0
  270. package/dist/drizzle/meta/0008_snapshot.json +5774 -0
  271. package/dist/drizzle/meta/_journal.json +14 -0
  272. package/dist/main.mjs +27836 -4437
  273. package/dist/node/main.mjs +31770 -12098
  274. package/dist/pairing-runtime-controller.mjs +37653 -16847
  275. package/dist/runtime/base-daemon.mjs +109 -18
  276. package/dist/runtime/broker-daemon.mjs +22018 -2739
  277. package/dist/runtime/broker-process-manager.mjs +122 -12
  278. package/dist/runtime/mesh-discover.mjs +90 -13
  279. package/dist/scout-control-plane-web.mjs +22453 -3299
  280. package/dist/scout-web-server.mjs +22453 -3299
  281. package/dist/statusline.mjs +2 -0
  282. package/package.json +3 -1
  283. package/dist/client/assets/ActivityScreen-Cu_1V4bq.js +0 -1
  284. package/dist/client/assets/AgentConfigurationScreen-BqfOz90D.js +0 -1
  285. package/dist/client/assets/AgentDefinitionsWorkspace-CUpUrY57.js +0 -1
  286. package/dist/client/assets/AgentFloorView-8LoAEBwS.js +0 -1
  287. package/dist/client/assets/AgentInfoScreen-DZs2_ibL.js +0 -1
  288. package/dist/client/assets/AgentLanesEmbedScreen-W3qs022h.js +0 -1
  289. package/dist/client/assets/AgentLanesView-B9vuEEmZ.js +0 -2
  290. package/dist/client/assets/AgentsConsole-BgiYP2wR.js +0 -1
  291. package/dist/client/assets/AgentsScreen-DBi8x4MB.js +0 -1
  292. package/dist/client/assets/AgentsSubnav-DIEO4NPx.js +0 -1
  293. package/dist/client/assets/BackToPicker-BRvfostO.js +0 -1
  294. package/dist/client/assets/CodeDiffPane-DDPt6KPh.js +0 -1
  295. package/dist/client/assets/CodeScreen-BxCrpRHd.js +0 -1
  296. package/dist/client/assets/ConversationFeedRows-B_gPxcqA.js +0 -1
  297. package/dist/client/assets/ConversationHeader-DE3FC0m-.js +0 -1
  298. package/dist/client/assets/ConversationPanels-DLek4H6A.js +0 -2
  299. package/dist/client/assets/ConversationScreen-BDRhx-RU.js +0 -1
  300. package/dist/client/assets/ConversationScreen-C9yMAMYF.css +0 -1
  301. package/dist/client/assets/ConversationStatus-BwVLiiO4.js +0 -1
  302. package/dist/client/assets/FlightObserveScreen-6RpZYwVz.js +0 -1
  303. package/dist/client/assets/HarnessesScreen-CznAImej.js +0 -1
  304. package/dist/client/assets/KnowledgeSearchInspector-Dgdkfvvz.js +0 -1
  305. package/dist/client/assets/KnowledgeSearchScreen-DJDGGaqC.js +0 -1
  306. package/dist/client/assets/LaneTraceDetailSheet-D1CspRbl.js +0 -1
  307. package/dist/client/assets/MeshScreen-DFgevn8N.js +0 -1
  308. package/dist/client/assets/MessagesScreen-C8YKW10Y.js +0 -1
  309. package/dist/client/assets/MissionLeftAgentRow-BpZWntfl.js +0 -1
  310. package/dist/client/assets/NewChatComposer-Cs6OsxK6.js +0 -19
  311. package/dist/client/assets/ObserveEmbedScreen-y2EpuqRZ.js +0 -2
  312. package/dist/client/assets/OpenScoutAppShell-C_URc8sV.js +0 -87
  313. package/dist/client/assets/OpsAgentsView-UN7iOscs.js +0 -1
  314. package/dist/client/assets/OpsScreen-Buf3LKjb.js +0 -1
  315. package/dist/client/assets/OpsSubnav-DsuXzHah.js +0 -1
  316. package/dist/client/assets/ProjectAgentProfile-DJusrAV-.js +0 -1
  317. package/dist/client/assets/ProjectAgentProfileHero-BFwNJo_N.js +0 -1
  318. package/dist/client/assets/ProjectsInbox-GhVMxOhw.js +0 -2
  319. package/dist/client/assets/ProjectsScreen-eNUBy4YU.js +0 -1
  320. package/dist/client/assets/ProjectsThreadAside-CoBgnHmr.js +0 -1
  321. package/dist/client/assets/Provider-C7UKGHQy.js +0 -1
  322. package/dist/client/assets/RawSessionsTable-DL8y_eEy.js +0 -1
  323. package/dist/client/assets/RealtimeVoiceScreen-ffS-39zy.js +0 -1
  324. package/dist/client/assets/RepoDiffViewer-D_exm6xK.js +0 -7
  325. package/dist/client/assets/RepoDiffViewerLazy-BPgF92Bg.js +0 -2
  326. package/dist/client/assets/SessionEmbedScreen-BVC7yvWF.js +0 -1
  327. package/dist/client/assets/SessionObserve-BpggNO_M.css +0 -1
  328. package/dist/client/assets/SessionObserve-yfXFafp8.js +0 -12
  329. package/dist/client/assets/SessionRefScreen-DRgJu7Jo.js +0 -1
  330. package/dist/client/assets/SessionsScreen-D6XUsZfA.js +0 -1
  331. package/dist/client/assets/SettingsDrawer-CmJt72ww.css +0 -1
  332. package/dist/client/assets/SettingsScreen-Cy8z-EuR.js +0 -1
  333. package/dist/client/assets/SpriteAvatar-DyaGuhik.js +0 -1
  334. package/dist/client/assets/Terminal-CqvGbjXU.js +0 -1
  335. package/dist/client/assets/TerminalEmbedScreen-DuZZFFzW.js +0 -1
  336. package/dist/client/assets/agent-lane-card-Dm7YWoew.css +0 -1
  337. package/dist/client/assets/content-BDt9VBPk.js +0 -1
  338. package/dist/client/assets/content-BIXf4cKR.js +0 -1
  339. package/dist/client/assets/content-BLm0NBJM.js +0 -1
  340. package/dist/client/assets/content-C5UbLsDF.js +0 -1
  341. package/dist/client/assets/content-CR3vdrYY.js +0 -1
  342. package/dist/client/assets/content-CSPVmo2s.js +0 -1
  343. package/dist/client/assets/content-C_FGqx1X.js +0 -1
  344. package/dist/client/assets/content-CvlVUOG8.js +0 -1
  345. package/dist/client/assets/content-DTpQsomG.js +0 -1
  346. package/dist/client/assets/content-DikVsqLf.js +0 -1
  347. package/dist/client/assets/content-DlUe5Ono.js +0 -1
  348. package/dist/client/assets/content-GIBv_55n.js +0 -1
  349. package/dist/client/assets/content-Q2oclDzi.js +0 -1
  350. package/dist/client/assets/conversation-model-B47vYmWN.js +0 -1
  351. package/dist/client/assets/conversation-motion-features-BdAONVls.js +0 -1
  352. package/dist/client/assets/discover-C1YwpBDE.js +0 -2
  353. package/dist/client/assets/embed-entry-BAcGL3g9.js +0 -2
  354. package/dist/client/assets/home-now-card-BgvNWuea.js +0 -1
  355. package/dist/client/assets/hooks-B6y_O2FB.js +0 -2
  356. package/dist/client/assets/inbox-thread-redesign-Bz4FjWzr.css +0 -1
  357. package/dist/client/assets/index-BcuhqXLe.js +0 -1
  358. package/dist/client/assets/index-CJXzfjo9.js +0 -1
  359. package/dist/client/assets/index-DQPvraRS.js +0 -1
  360. package/dist/client/assets/index-DxGoC5l5.css +0 -1
  361. package/dist/client/assets/knowledge-search-CVxQwxPn.js +0 -1
  362. package/dist/client/assets/knowledge-search-DjrQdiiW.css +0 -1
  363. package/dist/client/assets/left-C--GiIh8.js +0 -2
  364. package/dist/client/assets/left-Cj7Rt89X.js +0 -1
  365. package/dist/client/assets/left-CpNEtFEg.js +0 -1
  366. package/dist/client/assets/left-CzXAuK_t.js +0 -2
  367. package/dist/client/assets/left-agents-Bo9sO1by.js +0 -1
  368. package/dist/client/assets/left-bN4PCAXa.js +0 -1
  369. package/dist/client/assets/left-default-DV9GdvYi.js +0 -1
  370. package/dist/client/assets/left-jYYGAOYD.js +0 -1
  371. package/dist/client/assets/left-lanes-D0l_Co7V.js +0 -1
  372. package/dist/client/assets/left-mission-Ci7zREkQ.js +0 -1
  373. package/dist/client/assets/left-plan-D4U1uflW.js +0 -2
  374. package/dist/client/assets/library-D-RxGiCw.js +0 -1
  375. package/dist/client/assets/profile-CVRziEDA.js +0 -1
  376. package/dist/client/assets/repo-diff-C9Qs-bEn.css +0 -1
  377. package/dist/client/assets/resolve-panes-r9B3mpW7.js +0 -1
  378. package/dist/client/assets/resolve-sidebar-context-DcG8xGaB.js +0 -1
  379. package/dist/client/assets/right-BHeiIaty.js +0 -1
  380. package/dist/client/assets/right-BkgKo9VT.js +0 -1
  381. package/dist/client/assets/right-BpEU5jWE.js +0 -1
  382. package/dist/client/assets/right-CRZXoy-X.js +0 -1
  383. package/dist/client/assets/right-ChF_pbPy.js +0 -1
  384. package/dist/client/assets/right-DMoUT3KN.js +0 -1
  385. package/dist/client/assets/right-T4Ue6EqM.js +0 -1
  386. package/dist/client/assets/right-wzrLXKur.js +0 -1
  387. package/dist/client/assets/router-Bq5dwf78.js +0 -1
  388. package/dist/client/assets/secondaryNavConfig-DqUIp0Es.js +0 -1
  389. package/dist/client/assets/sparkles-ClfRJQ6w.js +0 -1
  390. package/dist/client/assets/useContentSecondaryNav-DMl1WNm7.js +0 -1
  391. package/dist/client/assets/usePierreRuntime-wC-yMtBb.js +0 -50
@@ -1,4 +1,6 @@
1
1
  #!/usr/bin/env bun
2
+ import "reflect-metadata";
3
+
2
4
  // ../../apps/desktop/src/cli/commands/statusline.ts
3
5
  import { spawn } from "child_process";
4
6
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openscout/scout",
3
- "version": "0.2.78",
3
+ "version": "0.2.79",
4
4
  "description": "Public Scout package that installs the `scout` command and bundled local runtime",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
@@ -27,7 +27,9 @@
27
27
  ],
28
28
  "dependencies": {
29
29
  "@lydell/node-pty": "1.2.0-beta.12",
30
+ "bonjour-service": "^1.4.4",
30
31
  "picomatch": "^4.0.4",
32
+ "reflect-metadata": "0.2.2",
31
33
  "ws": "^8.18.3"
32
34
  },
33
35
  "scripts": {
@@ -1 +0,0 @@
1
- import{r as n,j as s}from"./index-DMiGbrBt.js";import{a as J}from"./api-h5zurxmi.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as Q}from"./sse-CjIkKo46.js";import{d as V}from"./colors-BtO5_zlx.js";import{u as X,m as Z,d as ss}from"./Provider-C7UKGHQy.js";import{b as es}from"./router-Bq5dwf78.js";import{r as O}from"./mentions-jSuTGeet.js";import{t as I,a as B}from"./time-DltNTpLl.js";import{u as as}from"./ContextMenu-bARZqTzD.js";import{E as C}from"./EmptyState-4F9XDFQm.js";/* empty css */import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./conversation-model-B47vYmWN.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./terminal-sessions-D5CIR2OL.js";import"./AgentDetailCard-BcRBRp88.js";import"./AgentLiveActions-DBtnD0qE.js";import"./terminal-takeover-B8UeD9OX.js";import"./openContent-C6XO6kr5.js";import"./eye-0PvebX_a.js";import"./terminal-B9AOZQKR.js";const ts={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","flight.completed":"completed task","flight.updated":"updated task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"sent a request",ask_replied:"replied",ask_working:"working",flight_created:"started task",flight_updated:"updated task",message_sent:"sent",message_received:"received"},ns={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function q(a){return ts[a]??a.replace(/[._]/g," ")}function ls(a){return a.startsWith("agent.")||a.includes("registered")||a.includes("online")||a.includes("offline")?"presence":a.startsWith("flight")||a.startsWith("ask_")?"work":a.startsWith("message")?"message":a.startsWith("collaboration")?"collaboration":"system"}function is(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function rs(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function os(a){return`${a.actorName??"system"} ${q(a.kind)}`}function cs(a){return a.workspaceRoot?`Recorded from ${a.workspaceRoot}.`:a.conversationId?`Linked to thread ${u(a.conversationId)}.`:"No additional detail was captured for this event."}function ne({navigate:a}){const{agents:p,route:z}=X(),[v,F]=n.useState([]),[x,w]=n.useState(null),[y,A]=n.useState(!0),[R,$]=n.useState(!1),[h,S]=n.useState(null),[N,P]=n.useState(null),L=n.useRef([]),b=n.useRef(0),f=n.useRef(null),U=as(),T=es(z),W=n.useMemo(()=>Z(p,T),[p,T]),l=n.useMemo(()=>ss(v,W),[v,W]);n.useEffect(()=>{L.current=v},[v]),n.useEffect(()=>{x&&!l.some(e=>e.id===x)&&w(null)},[x,l]);const m=n.useCallback(async(e="initial")=>{const i=++b.current;!(L.current.length>0)&&e!=="background"?(A(!0),S(null)):$(!0);try{const o=await J("/api/activity");if(i!==b.current)return;F(o),S(null),P(Date.now()),w(g=>o.some(E=>E.id===g)?g:null)}catch(o){if(i!==b.current)return;S(o instanceof Error?o.message:String(o))}finally{i===b.current&&(A(!1),$(!1))}},[]),K=n.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);n.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),Q(K);const G=n.useMemo(()=>{const e=new Set(l.map(c=>c.actorName??"system")),i=new Set(l.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${l.length}`,detail:l.length>0?`Latest ${I(l[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${i.size}`,detail:i.size>0?"Conversation-linked records":"No linked threads"}]},[l]),Y=!y&&l.length===0&&!!h,H=!y&&l.length===0&&!h;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity Log"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:y?"Loading audit ledger...":h&&l.length>0?`Showing last confirmed snapshot from ${N?I(N):"earlier"}`:N?`Updated ${I(N)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:y||R,onClick:()=>{m("manual")},children:R?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:G.map(e=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:e.label}),s.jsx("strong",{className:"sys-stat-value",children:e.value}),s.jsx("span",{className:"sys-stat-detail",children:e.detail})]},e.label))}),h&&l.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&l.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),Y&&s.jsx(C,{className:"sys-state-card-error",title:"Activity is unavailable",body:h,action:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{m("manual")},children:"Try again"})}),H&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),l.length>0&&s.jsx("div",{className:"sys-audit-list",children:l.map(e=>{const i=x===e.id,c=ls(e.kind),o=ns[c],g=rs(e.workspaceRoot),E=e.summary&&e.summary!==e.title?e.summary:cs(e),r=[];if(e.conversationId&&r.push({key:"thread",label:"Thread",title:`Open thread ${u(e.conversationId)}`,route:{view:"conversation",conversationId:e.conversationId}}),e.recordId&&r.push({key:"work",label:"Work",title:"Open work item",route:{view:"work",workId:e.recordId}}),e.agentId){const t=e.agentName??"Agent";r.push({key:"agent",label:t,title:`Open agent ${t}`,route:{view:"agents-v2",agentId:e.agentId}})}e.sessionId&&r.push({key:"session",label:"Session",title:"Open session",route:{view:"sessions",sessionId:e.sessionId}}),(e.flightId||e.invocationId)&&r.push({key:"follow",label:"Follow",title:"Follow live execution",route:{view:"follow",...e.flightId?{flightId:e.flightId}:{},...e.invocationId?{invocationId:e.invocationId}:{},...e.conversationId?{conversationId:e.conversationId}:{}}});const _=()=>w(i?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${i?" sys-audit-entry-expanded":""}`,onContextMenu:t=>{const j=window.getSelection()?.toString().trim(),d=[];j&&(d.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{k(j)}}),d.push({kind:"separator"}));const M=e.title??e.summary??"";if(M&&d.push({kind:"action",label:"Copy Details",onSelect:()=>{k(M)}}),e.actorName&&d.push({kind:"action",label:"Copy Actor",onSelect:()=>{k(e.actorName)}}),d.push({kind:"action",label:"Copy Event ID",onSelect:()=>{k(e.id)}}),r.length>0){d.push({kind:"separator"});for(const D of r)d.push({kind:"action",label:`Open ${D.label}`,onSelect:()=>a(D.route)})}U(t,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":i,onClick:_,onKeyDown:t=>{(t.key==="Enter"||t.key===" ")&&(t.preventDefault(),_())},children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:I(e.ts)}),s.jsx("span",{className:"sys-audit-date",children:B(e.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${o.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:o.label}),s.jsx("span",{className:"sys-audit-kind",children:q(e.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:O(e.title??os(e))}),s.jsx("p",{className:"sys-audit-summary",children:O(E)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:V(e.actorName??"system")},children:is(e.actorName)}),e.actorName??"system"]}),g&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",g]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(t=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:t.title,onClick:j=>{j.stopPropagation(),a(t.route)},children:t.label},t.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:i?"Close":"Details"})]}),i&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:e.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:B(e.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:e.actorName??"system"})]}),e.agentName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Agent"}),s.jsx("span",{className:"sys-detail-value",children:e.agentName})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:e.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:e.conversationId?u(e.conversationId):"Not attached"})]}),e.recordId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Work"}),s.jsx("span",{className:"sys-detail-value",children:u(e.recordId)})]}),e.sessionId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Session"}),s.jsx("span",{className:"sys-detail-value",children:u(e.sessionId)})]}),e.flightId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Flight"}),s.jsx("span",{className:"sys-detail-value",children:u(e.flightId)})]}),e.invocationId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Invocation"}),s.jsx("span",{className:"sys-detail-value",children:u(e.invocationId)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:e.id})]})]}),r.length>0&&s.jsx("div",{className:"sys-inline-actions",children:r.map(t=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(t.route),children:["Open ",t.label]},t.key))})]})]},e.id)})})]})}export{ne as ActivityScreen};
@@ -1 +0,0 @@
1
- import{r as t,j as s}from"./index-DMiGbrBt.js";import{E as H}from"./EmptyState-4F9XDFQm.js";import{a as R}from"./api-h5zurxmi.js";import{e as L}from"./agent-chat-Bfjd9y6c.js";import{b as K}from"./time-DltNTpLl.js";import{u as I}from"./Provider-C7UKGHQy.js";import{o as U}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as q}from"./AgentsSubnav-DIEO4NPx.js";/* empty css */import{R as W}from"./refresh-cw-BBmAnCB7.js";import{S as V}from"./secondaryNavConfig-DqUIp0Es.js";import{c as E}from"./createLucideIcon-OpA4Amw5.js";import{B as O}from"./bot-eu8pBNvI.js";import{W as Y}from"./wrench-Bkc_0lKF.js";import{S as F}from"./server-CPp4ZJhZ.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./conversation-model-B47vYmWN.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./SecondaryNav-B3-nh5dM.js";import"./message-square-DSaGpjFU.js";import"./terminal-B9AOZQKR.js";import"./scroll-text-D6Pdnar7.js";const J=[["path",{d:"M12 20v2",key:"1lh1kg"}],["path",{d:"M12 2v2",key:"tus03m"}],["path",{d:"M17 20v2",key:"1rnc9c"}],["path",{d:"M17 2v2",key:"11trls"}],["path",{d:"M2 12h2",key:"1t8f8n"}],["path",{d:"M2 17h2",key:"7oei6x"}],["path",{d:"M2 7h2",key:"asdhe0"}],["path",{d:"M20 12h2",key:"1q8mjw"}],["path",{d:"M20 17h2",key:"1fpfkl"}],["path",{d:"M20 7h2",key:"1o8tra"}],["path",{d:"M7 20v2",key:"4gnj0m"}],["path",{d:"M7 2v2",key:"1i4yhu"}],["rect",{x:"4",y:"4",width:"16",height:"16",rx:"2",key:"1vbyd7"}],["rect",{x:"8",y:"8",width:"8",height:"8",rx:"1",key:"z9xiuo"}]],G=E("cpu",J);const Q=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],B=E("key-round",Q);const X=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],Z=E("save",X);function S(e){switch(e){case"ready":case"running":case"available":case"enabled":return"sys-chip-success";case"configured":case"installed":case"working":return"sys-chip-warning";case"missing":case"offline":case"not_ready":case"error":return"sys-chip-danger";default:return"sys-chip-neutral"}}function A(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function M(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function ss(e){return e.length>0?e.join(", "):"No capabilities reported"}function es({runtime:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(G,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.label}),s.jsx("div",{className:"agent-config-row-detail",children:e.description}),s.jsx("div",{className:"agent-config-row-meta",children:e.detail})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${S(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function as({provider:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(B,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.protocol}),s.jsx("code",{className:"agent-config-code",children:e.baseUrl}),s.jsxs("div",{className:"agent-config-row-meta",children:["Keys: ",e.envKeys.join(", ")]}),s.jsx("div",{className:"agent-config-row-meta",children:e.note})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${S(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function ns({agent:e,selected:l,navigate:p}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${l?" agent-config-row-selected":""}`,onClick:()=>p({view:"agents-v2",agentId:e.id,tab:"config"}),children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(O,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.id}),s.jsxs("div",{className:"agent-config-row-meta",children:[e.harness??"unknown harness"," / ",e.transport??"unknown transport",e.model?` / ${e.model}`:""]})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${S(e.status)}`,children:A(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:M(e.projectRoot??e.cwd)})]})]})}function D(e,l,p,n,o){l(e),p(e.model??""),n(e.runtime.cwd),o(e.runtime.harness)}function is({agent:e,navigate:l,onConfigSaved:p}){const{route:n}=I(),o=e?.id??null,[c,f]=t.useState(null),[u,v]=t.useState(!1),[y,g]=t.useState(null),[x,d]=t.useState(""),[w,m]=t.useState(""),[N,a]=t.useState(""),[b,h]=t.useState(!1),[j,$]=t.useState("idle"),[z,C]=t.useState(null),k=t.useRef(0),T=t.useCallback(async()=>{const i=++k.current;if(C(null),h(!1),!o){f(null),g(null),v(!1);return}v(!0),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`);if(i!==k.current)return;D(r,f,d,m,a)}catch(r){if(i!==k.current)return;f(null),d(""),m(""),a(e?.harness??""),g(r instanceof Error?r.message:String(r))}finally{i===k.current&&v(!1)}},[e?.harness,o]);t.useEffect(()=>{T()},[T]);const P=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,N].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,N]),_=async i=>{if(i.preventDefault(),!(!o||!c||j==="saving")){$("saving"),C(null),g(null);try{const r=await R(`/api/agents/${encodeURIComponent(o)}/config`,{method:"POST",body:JSON.stringify({model:x.trim()||null,runtime:{cwd:w.trim()||c.runtime.cwd,harness:N.trim()||c.runtime.harness},restart:b})});D(r.config,f,d,m,a),h(!1),C(r.restarted?"Saved and restarted":"Saved"),p?.()}catch(r){g(r instanceof Error?r.message:String(r))}finally{$("idle")}}};return e?s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:e.name}),s.jsx("p",{className:"sys-section-subtitle",children:e.id})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("button",{type:"button",className:"s-btn",onClick:()=>l({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{L(e).then(i=>{U(l,{view:"conversation",conversationId:i},{returnTo:n})})},children:"Open Chat"})]})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Status"}),s.jsx("span",{className:`sys-chip ${S(e.status)}`,children:A(e.status)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Harness"}),s.jsx("strong",{className:"agent-config-selectable",children:e.harness??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Transport"}),s.jsx("strong",{className:"agent-config-selectable",children:e.transport??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Reported model"}),s.jsx("strong",{className:"agent-config-selectable",children:e.model??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Configured model"}),s.jsx("strong",{className:"agent-config-selectable",children:u?"Loading...":c?c.model??"Harness default":"Not editable"})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Project"}),s.jsx("code",{className:"agent-config-inline-code",title:e.projectRoot??void 0,children:M(e.projectRoot)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Working dir"}),s.jsx("code",{className:"agent-config-inline-code",title:e.cwd??c?.runtime.cwd??void 0,children:M(e.cwd??c?.runtime.cwd??null)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Capabilities"}),s.jsx("span",{className:"agent-config-selectable",children:ss(e.capabilities)})]})]}),u&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-note",children:"Loading editable launch config..."})}),!u&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:_,children:[s.jsxs("div",{className:"agent-config-edit-grid",children:[s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Model"}),s.jsx("input",{name:"model",value:x,placeholder:"Harness default",disabled:!c.editable||j==="saving",onChange:i=>d(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:N,disabled:!c.editable||j==="saving",onChange:i=>a(i.currentTarget.value),children:P.map(i=>s.jsx("option",{value:i,children:i},i))})]}),s.jsxs("label",{className:"agent-config-field agent-config-field-wide",children:[s.jsx("span",{children:"Working dir"}),s.jsx("input",{name:"cwd",value:w,disabled:!c.editable||j==="saving",onChange:i=>m(i.currentTarget.value)})]})]}),s.jsxs("div",{className:"agent-config-save-row",children:[s.jsxs("label",{className:"agent-config-check",children:[s.jsx("input",{type:"checkbox",checked:b,disabled:!c.editable||j==="saving",onChange:i=>h(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||j==="saving",children:[s.jsx(Z,{size:13}),j==="saving"?"Saving...":"Save config"]}),z&&s.jsx("span",{className:"agent-config-save-note",children:z}),y&&s.jsx("span",{className:"agent-config-save-error",children:y})]})]}),!u&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:y??"No editable local config found"})})]}):s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agent Details"}),s.jsx("p",{className:"sys-section-subtitle",children:"Select an agent to inspect runtime, model, and tool context."})]})}),s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agent selected"}),s.jsx("p",{children:"Choose an agent from the configuration roster."})]})]})}function ae({navigate:e,selectedAgentId:l}){const{route:p}=I(),[n,o]=t.useState(null),[c,f]=t.useState(!0),[u,v]=t.useState(!1),[y,g]=t.useState(null),x=t.useRef(0),d=t.useCallback(async(a="initial")=>{const b=++x.current;a==="initial"?f(!0):v(!0),g(null);try{const h=await R("/api/agent-config/snapshot");if(b!==x.current)return;o(h)}catch(h){if(b!==x.current)return;g(h instanceof Error?h.message:String(h))}finally{b===x.current&&(f(!1),v(!1))}},[]);t.useEffect(()=>{d()},[d]);const w=t.useMemo(()=>n?n.agents.find(a=>a.id===l)??n.agents[0]??null:null,[l,n]),m=n?.providers??[],N=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(m.length),detail:`${m.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>A(a.status)!=="not ready").length} ready`},{label:"Broker",value:n.broker.label,detail:n.broker.nodeId??"No node id"}]:[];return s.jsxs("div",{className:"s-secondary-nav-shell",children:[s.jsx("div",{className:"s-secondary-nav-bar",children:s.jsx(q,{activeRoute:p,navigate:e})}),s.jsx("div",{className:"s-secondary-nav-body s-secondary-nav-body--scroll",children:s.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Agent Configuration"}),s.jsx("p",{className:"sys-page-subtitle",children:"Runtimes, agents, project inventory, delivery bridges, and the missing tool/provider surfaces in one control plane."})]}),s.jsxs("div",{className:"sys-page-actions",children:[n&&s.jsxs("div",{className:"sys-sync-note",children:["Updated ",K(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:c||u,onClick:()=>{d("manual")},children:[s.jsx(W,{size:13}),u?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:N.map(a=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:a.label}),s.jsx("strong",{className:"sys-stat-value",children:a.value}),s.jsx("span",{className:"sys-stat-detail",children:a.detail})]},a.label))}),y&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:y})]}),c&&!n&&s.jsx(H,{title:"Loading configuration",body:"Reading Scout settings, runtime readiness, broker agents, and project inventory."}),n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Runtimes"}),s.jsx("p",{className:"sys-section-subtitle",children:"Harness readiness replaces provider auth for the current local-first posture."})]}),s.jsx(V,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(es,{runtime:a},a.id))})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"BYOK Providers"}),s.jsx("p",{className:"sys-section-subtitle",children:"OpenAI-compatible vendors OpenScout can discover from local environment configuration."})]}),s.jsx(B,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:m.map(a=>s.jsx(as,{provider:a},a.id))})]})]}),s.jsxs("div",{className:"agent-config-layout agent-config-layout-primary",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agents"}),s.jsx("p",{className:"sys-section-subtitle",children:"Broker-visible endpoints with runtime, model, and source state."})]}),s.jsx(O,{size:15})]}),s.jsx("div",{className:"agent-config-list agent-config-list-scroll",children:n.agents.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agents registered"}),s.jsx("p",{children:"Run setup or start a local agent to populate this roster."})]}):n.agents.map(a=>s.jsx(ns,{agent:a,selected:a.id===w?.id,navigate:e},a.id))})]}),s.jsx(is,{agent:w,navigate:e,onConfigSaved:()=>{d("manual")}})]}),s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tools & Context"}),s.jsx("p",{className:"sys-section-subtitle",children:"The next model boundary to make first-class."})]}),s.jsx(Y,{size:15})]}),s.jsx("p",{className:"agent-config-copy",children:n.toolContext.note}),s.jsxs("div",{className:"agent-config-chip-row",children:[s.jsxs("span",{className:"sys-chip sys-chip-neutral",children:[n.toolContext.mcpServerCount," MCP servers"]}),s.jsx("span",{className:"sys-chip sys-chip-warning",children:"loadouts pending"})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Broker & Delivery"}),s.jsx("p",{className:"sys-section-subtitle",children:"Control-plane state and bridges that route attention back to you."})]}),s.jsx(F,{size:15})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Broker"}),s.jsx("span",{className:`sys-chip ${n.broker.healthy?"sys-chip-success":"sys-chip-danger"}`,children:n.broker.label})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Messages"}),s.jsx("strong",{children:n.broker.messageCount})]}),n.integrations.map(a=>s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:a.name}),s.jsx("span",{children:a.detail})]},a.id))]})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Known Missing Pieces"}),s.jsx("p",{className:"sys-section-subtitle",children:"The configuration model is now visible; these are the next root-cause surfaces to build."})]})}),s.jsx("div",{className:"agent-config-gap-list",children:n.gaps.map(a=>s.jsx("span",{children:a},a))})]})]})]})})]})}export{ae as AgentConfigurationScreen};
@@ -1 +0,0 @@
1
- import{r as l,j as e}from"./index-DMiGbrBt.js";import{A as E}from"./AgentAvatar-D90c1Rzk.js";import{a as F}from"./api-h5zurxmi.js";import{c as T}from"./colors-BtO5_zlx.js";import{t as D}from"./time-DltNTpLl.js";import{u as L}from"./Provider-C7UKGHQy.js";import{f as M}from"./text-DsBWV_4k.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as z}from"./FileViewerPane-CLgUhSm4.js";/* empty css */import{C as I}from"./chevron-right-XiIHsk4m.js";import{C as $}from"./chevron-down-BGk5qoEw.js";import{F as B,a as G}from"./DocumentFocusViewer-BeVwwl26.js";import{F as H}from"./file-text-BODxCjcz.js";import"./SpriteAvatar-DyaGuhik.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./TextDocumentSurface-BpAw4eQS.js";import"./createLucideIcon-OpA4Amw5.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./conversation-model-B47vYmWN.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./x-D3GElQbe.js";import"./search-CWfZtOt2.js";/* empty css */const U={general:"Generalist",builder:"Builder",reviewer:"Reviewer",researcher:"Researcher",operator:"Operator",bridge:"Bridge",system:"System",organic:"Organic",managed:"Managed"};function J(s){if(!s?.trim())return"Generalist";const i=s.trim().toLowerCase();return U[i]??s.replace(/_/g," ")}function V(s){return s?.trim()?M(s)?.trim()??null:null}function W(s,i){const f=s.agentClass?.trim()||"general",g=J(f),n=V(s.role),v=[...new Set(s.skills??[])].filter(Boolean),h=[...new Set([...s.capabilities??[],...i?.capabilities??[]])].filter(Boolean),u=f==="general"&&!n&&v.length===0;return{kind:g,kindRaw:f,role:n,isGeneralist:u,headline:n??g,skills:v,capabilities:h}}function _({payload:s,selectedSlug:i,selectedFile:f,filter:g,collapsed:n,onToggleFolder:v,onSelectFile:h}){const u=g.trim().toLowerCase(),j=s.folders.filter(o=>!u||o.slug.includes(u)?!0:o.files.some(c=>c.name.toLowerCase().includes(u)||c.relativePath.toLowerCase().includes(u)));return j.length===0?e.jsx("div",{className:"adef-treeEmpty",children:s.agentsRootExists?"No agent folders in .agents yet.":"No .agents directory on disk."}):e.jsx(e.Fragment,{children:j.map(o=>{const c=n.has(o.slug),C=o.slug===i;return e.jsxs("div",{className:"adef-folder","data-selected-agent":C||void 0,children:[e.jsxs("button",{type:"button",className:"adef-folderRow",onClick:()=>v(o.slug),children:[e.jsx("span",{className:"adef-folderChevron","aria-hidden":!0,children:c?e.jsx(I,{size:12}):e.jsx($,{size:12})}),e.jsx("span",{className:"adef-folderIcon","aria-hidden":!0,children:c?e.jsx(B,{size:13}):e.jsx(G,{size:13})}),e.jsx("span",{className:"adef-folderName",children:o.slug})]}),c?null:o.files.map(d=>{const x=f?.absolutePath===d.absolutePath;return e.jsxs("button",{type:"button",className:"adef-fileRow","data-selected":x||void 0,onClick:()=>h({slug:o.slug,name:d.name,relativePath:`.agents/${d.relativePath}`,absolutePath:d.absolutePath,excerpt:d.excerpt}),children:[e.jsx("span",{className:"adef-fileIcon","aria-hidden":!0,children:e.jsx(H,{size:12})}),e.jsx("span",{className:"adef-fileName",children:d.name})]},d.absolutePath)})]},o.slug)})})}function K({agent:s,config:i,onConfigSaved:f,sessionCatalog:g,navigate:n,homeView:v}){const h=W(s,i),u=s.handle?.replace(/^@+/,"")||s.name,j=g?.sessions.length??0,[o,c]=l.useState(""),[C,d]=l.useState(""),[x,S]=l.useState(""),[k,w]=l.useState(!1),[m,N]=l.useState("idle"),[y,P]=l.useState(null),[b,R]=l.useState(null);l.useEffect(()=>{if(!i){c(""),d(""),S(s.harness??"");return}c(i.model??""),d(i.runtime.cwd),S(i.runtime.harness),w(!1),P(null),R(null)},[s.harness,s.id,i]);const A=l.useMemo(()=>{const t=["claude","codex","pi",i?.runtime.harness,s.harness,x].filter(p=>!!p?.trim());return Array.from(new Set(t))},[s.harness,i?.runtime.harness,x]),a=async t=>{if(t.preventDefault(),!(!i||m==="saving")){N("saving"),P(null),R(null);try{const p=await F(`/api/agents/${encodeURIComponent(s.id)}/config`,{method:"POST",body:JSON.stringify({model:o.trim()||null,runtime:{cwd:C.trim()||i.runtime.cwd,harness:x.trim()||i.runtime.harness},restart:k})});f(p.config),w(!1),P(p.restarted?"Saved and restarted":"Saved")}catch(p){R(p instanceof Error?p.message:"Could not save config")}finally{N("idle")}}},r=()=>n({view:v,agentId:s.id,tab:"profile"});return e.jsxs("aside",{className:"adef-inspector",children:[e.jsxs("header",{className:"adef-inspectorHead",children:[e.jsx(E,{agent:s,size:36,tile:!0,presence:!1}),e.jsxs("div",{className:"adef-inspectorIdent",children:[e.jsxs("span",{className:"adef-inspectorHandle",children:["@",u]}),e.jsx("span",{className:"adef-inspectorSpec",children:h.headline})]})]}),e.jsxs("dl",{className:"adef-inspectorFacts",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"State"}),e.jsx("dd",{children:T(s.state,s)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sessions"}),e.jsx("dd",{children:j})]})]}),i?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"adef-inspectorSec",children:"Runtime"}),e.jsxs("form",{className:"adef-configEdit",onSubmit:a,children:[e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Model"}),e.jsx("input",{value:o,placeholder:"Harness default",disabled:!i.editable||m==="saving",onChange:t=>c(t.currentTarget.value)})]}),e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Harness"}),e.jsx("select",{value:x,disabled:!i.editable||m==="saving",onChange:t=>S(t.currentTarget.value),children:A.map(t=>e.jsx("option",{value:t,children:t},t))})]}),e.jsxs("label",{className:"adef-configField adef-configField--wide",children:[e.jsx("span",{children:"Working dir"}),e.jsx("input",{value:C,disabled:!i.editable||m==="saving",onChange:t=>d(t.currentTarget.value)})]}),e.jsxs("div",{className:"adef-configSaveRow",children:[e.jsxs("label",{className:"adef-configCheck",children:[e.jsx("input",{type:"checkbox",checked:k,disabled:!i.editable||m==="saving",onChange:t=>w(t.currentTarget.checked)}),e.jsx("span",{children:"Restart"})]}),e.jsx("button",{type:"submit",className:"adef-inspectorAct","data-primary":!0,disabled:!i.editable||m==="saving",children:m==="saving"?"Saving…":"Save"})]}),y?e.jsx("p",{className:"adef-inspectorMeta",children:y}):null,b?e.jsx("p",{className:"adef-configError",children:b}):null]}),e.jsx("div",{className:"adef-inspectorSec",children:"Permissions"}),e.jsx("p",{className:"adef-inspectorMono",children:O(i.permissionProfile)}),e.jsx("div",{className:"adef-inspectorSec",children:"Tools"}),e.jsx("div",{className:"adef-inspectorChips",children:(h.capabilities.length>0?h.capabilities:["—"]).map(t=>e.jsx("span",{className:"adef-inspectorChip",children:t},t))})]}):e.jsx("p",{className:"adef-inspectorMeta",children:"No editable local config on disk."}),s.updatedAt?e.jsxs("p",{className:"adef-inspectorMeta",children:["Updated ",D(s.updatedAt)]}):null,e.jsx("div",{className:"adef-inspectorActs",children:e.jsx("button",{type:"button",className:"adef-inspectorAct","data-primary":!0,onClick:r,children:"Sessions"})})]})}function Ie({agent:s,navigate:i,homeView:f="agents-v2"}){const{openFilePreview:g}=L(),[n,v]=l.useState(null),[h,u]=l.useState(null),[j,o]=l.useState(null),[c,C]=l.useState(null),[d,x]=l.useState("loading"),[S,k]=l.useState(""),[w,m]=l.useState(()=>new Set),[N,y]=l.useState(null),P=l.useCallback(async a=>{await F("/api/file/reveal",{method:"POST",body:JSON.stringify({path:a})}).catch(()=>{})},[]);l.useEffect(()=>{let a=!1;return x("loading"),(async()=>{const[r,t,p]=await Promise.allSettled([F(`/api/agents/${encodeURIComponent(s.id)}/definitions`),F(`/api/agents/${encodeURIComponent(s.id)}/config`).catch(()=>null),F(`/api/agents/${encodeURIComponent(s.id)}/session-catalog`).catch(()=>null)]);a||(r.status==="fulfilled"&&v(r.value),t.status==="fulfilled"&&u(t.value),p.status==="fulfilled"&&o(p.value),x("ready"))})(),()=>{a=!0}},[s.id]);const b=l.useMemo(()=>{if(!n)return null;const a=n.folders.find(t=>t.slug===n.selectedSlug)??n.folders[0]??null,r=a?.files.find(t=>t.name==="AGENT.md")??a?.files[0]??null;return!a||!r?null:{slug:a.slug,name:r.name,relativePath:`.agents/${r.relativePath}`,absolutePath:r.absolutePath,excerpt:r.excerpt}},[n]);l.useEffect(()=>{b&&(y(a=>a&&n?.folders.some(r=>r.files.some(t=>t.absolutePath===a.absolutePath))?a:b),n?.selectedSlug&&m(a=>{const r=new Set(a);return r.delete(n.selectedSlug),r}))},[b,n]);const R=n?.folders.reduce((a,r)=>a+r.files.length,0)??0,A=l.useCallback(a=>{m(r=>{const t=new Set(r);return t.has(a)?t.delete(a):t.add(a),t})},[]);return e.jsxs("div",{className:"adef-workspace",children:[e.jsxs("header",{className:"adef-head",children:[e.jsxs("div",{className:"adef-headCopy",children:[e.jsx("span",{className:"adef-headKind",children:"Config"}),e.jsxs("span",{className:"adef-headPath",title:n?.agentsRoot,children:[n?.agentsRootExists?".agents · explore & edit":"explore & edit",n?` · ${n.folders.length} agents · ${R} files`:""]})]}),e.jsx("input",{type:"search",className:"adef-filter",placeholder:"Filter agents & files…",value:S,onChange:a=>k(a.target.value)})]}),d==="loading"?e.jsx("div",{className:"adef-loading",children:"Loading agent config…"}):e.jsxs("div",{className:"adef-frame",children:[e.jsx("aside",{className:"adef-tree","aria-label":"Agent definition files",children:n?e.jsx(_,{payload:n,selectedSlug:n.selectedSlug,selectedFile:N,filter:S,collapsed:w,onToggleFolder:A,onSelectFile:y}):null}),e.jsx("section",{className:"adef-viewer","aria-label":"Definition file",children:N?e.jsx(z,{artifact:N,onOpen:g,onReveal:a=>{P(a)},onBrowse:n?a=>i({view:"code",root:n.projectRoot,file:a}):void 0}):e.jsx("div",{className:"av2-repoViewerState",children:n?.agentsRootExists?"Select a definition file — or create .agents/<handle>/AGENT.md":"Create .agents/<handle>/AGENT.md in the project root to define this expert on disk."})}),e.jsx(K,{agent:s,config:h,onConfigSaved:u,sessionCatalog:c,navigate:i,homeView:f})]})]})}export{Ie as AgentDefinitionsWorkspace};
@@ -1 +0,0 @@
1
- import{r as i,j as e}from"./index-DMiGbrBt.js";/* empty css */import{H as Me}from"./HarnessMark-Cbv3Ib0c.js";import{a as ue,S as fe}from"./SpriteAvatar-DyaGuhik.js";import{n as Ze}from"./colors-BtO5_zlx.js";import{o as He,l as Ke}from"./lane-observe-D0rfKDnU.js";import{t as We}from"./time-DltNTpLl.js";import{SessionObserve as Be}from"./SessionObserve-yfXFafp8.js";import{l as X,i as Ge}from"./agent-lanes-model-B4YTt4OF.js";import{p as Ve,s as je,a as Ne}from"./lane-roster-store-D8x1jac2.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bla0gBdm.js";import"./index-CJXzfjo9.js";import"./lane-ask-display-B6iCAVcd.js";import"./api-h5zurxmi.js";import"./mentions-jSuTGeet.js";import"./Provider-C7UKGHQy.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./conversation-model-B47vYmWN.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./AgentDetailCard-BcRBRp88.js";import"./AgentLiveActions-DBtnD0qE.js";import"./terminal-takeover-B8UeD9OX.js";import"./openContent-C6XO6kr5.js";import"./eye-0PvebX_a.js";import"./terminal-B9AOZQKR.js";import"./message-markup-3J9pi3nx.js";import"./ObservedTopologyPanel-DyUeV98H.js";import"./ObserveTextFlow-rsFj_rVo.js";import"./use-reduced-motion-RRBkmVkk.js";import"./message-circle-CG-96zts.js";import"./wrench-Bkc_0lKF.js";import"./external-link-CXBytO9o.js";import"./context-budget-CbB4BDcO.js";const z=5*6e4,qe=6,Z=qe+1,be=8,Ue=30*6e4,ye=.65,Ae=1.45,ke=.1,ve=360,$e=260;function pe(t){return Math.round(Math.min(Ae,Math.max(ye,t))*100)/100}function se(t,o){return Math.round(Math.min(o,Math.max(-o,t)))}const I=164,ne=56,Se=14,Le=12,C=66,me=7,P=96,ce=12,D=88,M=150,Je=48,Qe=24,et=480,tt=38,Oe="openscout:agent-floor-orient",Ee="openscout:agent-floor-lane-order";function st(){try{const t=localStorage.getItem(Oe);if(t==="past-left"||t==="past-right")return t}catch{}return"past-left"}function nt(){try{const t=JSON.parse(sessionStorage.getItem(Ee)??"[]");return Array.isArray(t)?t.filter(o=>typeof o=="string"):[]}catch{return[]}}function ae(t){return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}const at=/^(edit|multi_?edit|write|apply_?patch|patch_apply|str_?replace|notebook_?edit|create_file)/i;function ot(t){return t.kind==="tool"?t.diff||t.tool&&at.test(t.tool.trim())?"edit":"tool":t.kind==="message"||t.kind==="ask"?"msg":null}function lt(t,o){const a=t.observe?.metadata?.session?.sessionStart,l={tool:0,edit:0,msg:0},c=Array.from({length:Z},()=>({blocks:[],counts:{tool:0,edit:0,msg:0},tools:new Map,total:0})),u=[];let b=0,g=null;for(const m of t.observe?.events??[]){const r=ot(m);if(!r)continue;const d=He(m,a),w=d===null||d>=o?0:Math.floor((o-d)/z)+1;if(w>=Z)continue;const _=c[w];_.blocks.push(r),_.counts[r]+=1,_.total+=1,l[r]+=1,b+=1;const x=r==="msg"?null:m.tool?.trim()||"tool";x&&_.tools.set(x,(_.tools.get(x)??0)+1),u.push({kind:r,label:r==="msg"?Ke(m.text,44,1):m.text.trim()||x||"tool",at:d}),g={at:d,label:r==="msg"?"message":m.tool?.trim()||"tool"}}return{lane:t,live:Ge(t.observe)&&b>0,slots:c.map(m=>({blocks:m.blocks.slice(-8),counts:m.counts,tools:[...m.tools.entries()].sort((r,d)=>d[1]-r[1]),total:m.total})),counts:l,strip:u.slice(-10).map(m=>m.kind),lastLabel:g?.label??null,lastAt:g?.at??(t.lastActiveAt||null)}}function oe(t){const o=(a,l,c)=>`${a} ${a===1?l:c}`;return[o(t.tool,"tool","tools"),o(t.edit,"edit","edits"),o(t.msg,"msg","msgs")].join(" · ")}function rt(t){return/^(working|active|running|in_turn|in_flight)/i.test(t.lane.agent.state??"")?"quiet":"idle"}function F(t){return t.tool+t.edit+t.msg}function we(t){if(F(t)===0)return"quiet";const a=[["tool-led",t.tool],["edit-heavy",t.edit],["conversation-led",t.msg]].sort((l,c)=>c[1]-l[1]);return a[0][1]===a[1][1]?"balanced":a[0][0]}function it(t){const o=new Map;for(const l of t.slots)for(const[c,u]of l.tools)o.set(c,(o.get(c)??0)+u);const[a]=[...o.entries()].sort((l,c)=>c[1]-l[1]);return a?{value:a[0],detail:`${a[1]} call${a[1]===1?"":"s"} · 30m`}:{value:"no tool pattern",detail:"messages and edits only"}}function ct(t){const o=t.slots[0]?.total??0,a=t.slots[1]?.total??0;return o===0&&a===0?{value:"quiet",detail:"no work in the last 10m"}:o===0?{value:"paused",detail:`${a} in the prior 5m`}:a===0?{value:"new burst",detail:`${o} in the current 5m`}:o>=a+3?{value:"building",detail:`${o} now · ${a} prior`}:a>=o+3?{value:"easing",detail:`${o} now · ${a} prior`}:{value:"steady",detail:`${o} now · ${a} prior`}}function L({label:t,value:o,detail:a,mix:l}){const c=l?Math.max(1,F(l)):1;return e.jsxs("span",{className:"agent-floor__dock-insight",children:[e.jsx("span",{className:"agent-floor__dock-insight-label",children:t}),e.jsx("span",{className:"agent-floor__dock-insight-value",children:o}),e.jsx("span",{className:"agent-floor__dock-insight-detail",children:a}),l?e.jsx("span",{className:"agent-floor__dock-mix",style:{"--mix-tool":`${l.tool/c*100}%`,"--mix-edit":`${(l.tool+l.edit)/c*100}%`},"aria-hidden":"true"}):null]})}function Ce(t,o){const a=t.lastAt?We(t.lastAt,o):null;return t.live?{glyph:"▸",label:t.lastLabel??"working",meta:a??"now"}:{glyph:"⏸",label:rt(t),meta:a?`· ${a}`:""}}function Fe({series:t,now:o}){const a=Ce(t,o);return t.live?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-run",children:a.glyph}),e.jsx("span",{className:"agent-floor__card-tool",children:a.label}),e.jsx("span",{className:"agent-floor__card-ago",children:a.meta})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-pause",children:a.glyph}),e.jsxs("span",{className:"agent-floor__card-idle",children:[a.label,a.meta?` ${a.meta}`:""]})]})}function de({kind:t,z:o,size:a=ne,faceH:l=Le,pad:c,live:u}){return e.jsxs("span",{className:`agent-floor__block is-${t}${c?" is-pedestal":""}${u?" is-live":""}`,style:{"--z":`${o}px`,"--bs":`${a}px`,"--bh":`${l}px`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function dt({slot:t}){const o=Math.max(1,t.total),a=t.counts.tool/o*100,l=t.counts.edit/o*100;return e.jsxs("span",{className:"agent-floor__block agent-floor__slab",style:{"--z":"0px","--bs":`${C}px`,"--bh":`${me}px`,"--mix-a":`${a.toFixed(1)}%`,"--mix-b":`${(a+l).toFixed(1)}%`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function pt({slot:t,slotIndex:o,periodStart:a}){const l=o===0?`${ae(a)} — now`:`${ae(a-o*z)} – ${ae(a-(o-1)*z)}`;return e.jsxs("span",{className:"agent-floor__peek",children:[e.jsx("span",{className:"agent-floor__peek-range",children:l}),e.jsxs("span",{className:"agent-floor__peek-cols",children:[e.jsxs("span",{className:"agent-floor__peek-col",children:[t.tools.slice(0,3).map(([c,u])=>e.jsxs("span",{className:"agent-floor__peek-tool",children:[c,u>1?` ×${u}`:""]},c)),t.tools.length===0?e.jsx("span",{className:"agent-floor__peek-tool is-empty",children:"no tools"}):null]}),e.jsxs("span",{className:"agent-floor__peek-col is-right",children:[e.jsxs("span",{children:[t.counts.edit," edit",t.counts.edit===1?"":"s"]}),e.jsxs("span",{children:[t.counts.msg," msg",t.counts.msg===1?"":"s"]})]})]})]})}function mt({series:t,index:o,planeW:a,flip:l,periodStart:c,now:u,focused:b,pinned:g,dimmed:m,peekSlot:r,onFocus:d,onPeek:w,onSelect:_}){const{lane:x,live:j,slots:$}=t,O=x.agent,S=X(O,x.source),R=ue(O),H=l?(M-P)/2:a-M+(M-P)/2,Y=(I-P)/2,K=(I-C)/2,le=k=>{const N=(D-C)/2;return l?M+k*D+N:a-M-(k+1)*D+N},W=ce+tt+o%2*14;return e.jsxs("button",{type:"button",className:`agent-floor__lane${j?" is-live":""}${o%2===1?" is-alt":""}${b?" is-focus":""}${g?" is-pinned":""}${m?" is-dim":""}`,style:{left:0,top:o*I,width:a,height:I},onClick:()=>_(x),onMouseEnter:()=>d(x.id),onMouseLeave:()=>{d(null),w(x.id,null)},"aria-label":g?`${S} — open timeline`:`${S} — pin details`,children:[e.jsx("span",{className:"agent-floor__lane-strip","aria-hidden":"true"}),$.map((k,N)=>{if(k.total===0)return null;const B=b&&r===N,T=me+2+k.blocks.length*Se;return e.jsxs("span",{className:`agent-floor__stack${N===0?" is-now":" is-minted"}${B?" is-peeking":""}`,style:{left:le(N),top:K},onMouseEnter:()=>w(x.id,N),children:[e.jsx(dt,{slot:k}),e.jsx("span",{className:"agent-floor__stack-blocks",style:{left:(C-ne)/2,top:(C-ne)/2},children:k.blocks.map((re,y)=>e.jsx(de,{kind:re,z:me+2+y*Se},y))}),B?e.jsx("span",{className:"agent-floor__bb agent-floor__peek-anchor",style:{left:C/2,top:C/2,"--z":`${T+46}px`},children:e.jsx(pt,{slot:k,slotIndex:N,periodStart:c})}):null]},N)}),e.jsxs("span",{className:"agent-floor__pad",style:{left:H,top:Y},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__ground"}),e.jsx(de,{kind:"pad",z:0,size:P,faceH:ce,pad:!0}),j?e.jsx(de,{kind:"head",z:ce+2,size:ne,faceH:Le,live:!0}):null]}),e.jsx("span",{className:"agent-floor__bb agent-floor__flag-anchor",style:{left:H+P/2,top:Y+P/2,"--z":`${W}px`},children:e.jsxs("span",{className:`agent-floor__flag${b?" is-focus":""}${g?" is-pinned":""}`,children:[e.jsx(fe,{name:O.name,size:15,tile:!0,hue:R.hue,tone:R.tone}),e.jsx("span",{className:"agent-floor__flag-name",children:S}),e.jsx("span",{className:"agent-floor__flag-action",children:e.jsx(Fe,{series:t,now:u})}),e.jsx("span",{className:`agent-floor__card-dot${j?" is-live":""}`})]})})]})}function ut({focus:t,pinned:o,ledger:a,liveCount:l,now:c}){if(!t){const d=a.reduce((j,$)=>(j.tool+=$.counts.tool,j.edit+=$.counts.edit,j.msg+=$.counts.msg,j),{tool:0,edit:0,msg:0}),w=a.filter(j=>F(j.counts)>0).length,_=[...a].sort((j,$)=>F($.counts)-F(j.counts))[0]??null,x=_?F(_.counts):0;return e.jsxs("div",{className:"agent-floor__dock is-resting",children:[e.jsx("span",{className:"agent-floor__dock-id agent-floor__dock-fleet",children:e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsx("span",{className:"agent-floor__dock-title",children:"fleet at a glance"}),e.jsxs("span",{children:[a.length," lane",a.length===1?"":"s"," · ",l," live"]})]})}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"coverage",value:`${w}/${a.length} lanes`,detail:"showed work · 30m"}),e.jsx(L,{label:"hottest lane",value:_?X(_.lane.agent,_.lane.source):"none yet",detail:_?`${x} classified events`:"waiting for activity"}),e.jsx(L,{label:"throughput",value:`${F(d)} events`,detail:"classified · 30m"}),e.jsx(L,{label:"activity mix",value:we(d),detail:oe(d),mix:d})]})]})}const u=t.lane.agent,b=ue(u),g=ct(t),m=it(t),r=t.slots.filter(d=>d.total>0).length;return e.jsxs("div",{className:`agent-floor__dock${o?" is-pinned":""}`,children:[e.jsxs("span",{className:"agent-floor__dock-id",children:[e.jsx(fe,{name:u.name,size:30,tile:!0,hue:b.hue,tone:b.tone}),e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsxs("span",{className:"agent-floor__dock-name",children:[X(u,t.lane.source),e.jsx(Me,{harness:u.harness,size:12,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${t.live?" is-live":""}`}),o?e.jsx("span",{className:"agent-floor__dock-lock",children:"locked"}):null]}),e.jsx("span",{className:"agent-floor__dock-action",children:e.jsx(Fe,{series:t,now:c})})]})]}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(L,{label:"momentum",value:g.value,detail:g.detail}),e.jsx(L,{label:"cadence",value:`${r}/${t.slots.length} windows`,detail:"active five-minute bands"}),e.jsx(L,{label:"signature",value:m.value,detail:m.detail}),e.jsx(L,{label:"activity mix",value:we(t.counts),detail:oe(t.counts),mix:t.counts})]})]})}function ft({series:t,now:o,concise:a,onConciseChange:l,onClose:c,onOpenFull:u,operatorName:b}){const{agent:g,observe:m,source:r}=t.lane,d=X(g,r);return e.jsxs("aside",{className:"agent-floor__trace-panel","aria-label":`${d} selected lane trace`,children:[e.jsx("button",{type:"button",className:"agent-floor__trace-close",onClick:c,"aria-label":"Close selected lane trace",children:"×"}),e.jsx("div",{className:"agent-floor__trace-body",children:m?e.jsx(Be,{data:m,agentId:r==="scout"?g.id:void 0,sessionId:g.harnessSessionId,showRail:!1,variant:"lane",nowMs:o,traceWindowMs:Ue,traceWindowLabel:"30m",laneCollapseTechnicalEvents:a,onLaneCollapseTechnicalEventsChange:l,laneOperatorName:b,onLaneEventSelect:u}):e.jsx("div",{className:"agent-floor__trace-empty",children:"Waiting for trace activity…"})})]})}function gt({zoom:t,fit:o,onZoomChange:a,onReset:l}){const c=Math.round(t*100);return e.jsxs("div",{className:"agent-floor__zoom",role:"group","aria-label":"Floor zoom",children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:t<=ye,onClick:()=>a(pe(t-ke)),children:"−"}),e.jsx("button",{type:"button",className:"agent-floor__zoom-reset","aria-label":"Reset floor zoom to fit",title:"Reset zoom and position to automatic fit",onClick:l,children:o?"fit":`${c}%`}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:t>=Ae,onClick:()=>a(pe(t+ke)),children:"+"})]})}function Ms({lanes:t,now:o,onOpenTrace:a,railLedger:l=!1,operatorName:c}){const[u,b]=i.useState(st),[g,m]=i.useState(null),[r,d]=i.useState(null),[w,_]=i.useState(null),[x,j]=i.useState(!1),[$,O]=i.useState(1),[S,R]=i.useState({x:0,y:0}),[H,Y]=i.useState(!1),[K,le]=i.useState(nt),W=i.useRef(null),k=i.useRef(null),[N,B]=i.useState(null),T=u==="past-right";i.useEffect(()=>{const s=W.current;if(!s)return;const n=new ResizeObserver(p=>{const h=p[0]?.contentRect;h&&B(f=>f&&Math.abs(f.w-h.width)<2&&Math.abs(f.h-h.height)<2?f:{w:h.width,h:h.height})});return n.observe(s),()=>n.disconnect()},[]);const re=i.useCallback(()=>{b(s=>{const n=s==="past-left"?"past-right":"past-left";try{localStorage.setItem(Oe,n)}catch{}return n})},[]),y=i.useCallback(s=>{m(s),s===null&&_(null)},[]),Re=i.useCallback((s,n)=>{_(n===null?null:{laneId:s,slot:n})},[]),G=i.useCallback(s=>{r===s.id?a(s):d(s.id)},[r,a]),Te=i.useCallback(()=>{O(1),R({x:0,y:0})},[]),Pe=i.useCallback(s=>{if(!(s.target instanceof Element?s.target:null)?.closest(".agent-floor__trace-panel, .agent-floor__zoom")){if(s.preventDefault(),s.metaKey||s.ctrlKey){O(p=>pe(p-s.deltaY*.002));return}R(p=>({x:se(p.x-s.deltaX,ve),y:se(p.y-s.deltaY,$e)}))}},[]),Ie=i.useCallback(s=>{const n=s.target instanceof Element?s.target:null;s.button!==0||n?.closest("button, .agent-floor__trace-panel")||(k.current={pointerId:s.pointerId,startX:s.clientX,startY:s.clientY,panX:S.x,panY:S.y},s.currentTarget.setPointerCapture(s.pointerId),Y(!0))},[S]),ze=i.useCallback(s=>{const n=k.current;!n||n.pointerId!==s.pointerId||R({x:se(n.panX+s.clientX-n.startX,ve),y:se(n.panY+s.clientY-n.startY,$e)})},[]),ge=i.useCallback(s=>{k.current?.pointerId===s.pointerId&&(k.current=null,s.currentTarget.hasPointerCapture(s.pointerId)&&s.currentTarget.releasePointerCapture(s.pointerId),Y(!1))},[]);i.useEffect(()=>{if(r===null)return;const s=n=>{n.key==="Escape"&&d(null)};return window.addEventListener("keydown",s),()=>window.removeEventListener("keydown",s)},[r]);const V=Math.floor(o/z)*z,q=i.useMemo(()=>{const s=new Map(t.map(f=>[f.id,f])),n=K.flatMap(f=>{const te=s.get(f);return te?[te]:[]}),p=new Set(n.map(f=>f.id)),h=t.filter(f=>!p.has(f.id)).sort((f,te)=>te.lastActiveAt-f.lastActiveAt);return n.concat(h)},[t,K]);i.useEffect(()=>{const s=q.map(n=>n.id);le(n=>n.length===s.length&&n.every((p,h)=>p===s[h])?n:s);try{sessionStorage.setItem(Ee,JSON.stringify(s))}catch{}},[q]);const{series:U,hidden:J,planeW:E,planeD:Q,lanesStartY:_e}=i.useMemo(()=>{const s=q.map(f=>lt(f,V)),n=s.slice(0,be),p=n.length*I,h=Math.max(et,p+Qe*2);return{series:n,hidden:s.slice(be),planeW:Je+Z*D+M,planeD:h,lanesStartY:(h-p)/2}},[q,V]),v=i.useMemo(()=>U.concat(J),[U,J]),ie=v.filter(s=>s.live).length,A=g??r,De=A===null?null:v.find(s=>s.lane.id===A)??null,ee=r===null?null:v.find(s=>s.lane.id===r)??null;i.useEffect(()=>{r!==null&&!v.some(s=>s.lane.id===r)&&d(null)},[v,r]),i.useEffect(()=>{j(!1)},[r]),i.useEffect(()=>{if(!l)return;const s=v.map(n=>{const p=Ce(n,o);return{id:n.lane.id,label:X(n.lane.agent,n.lane.source),statusLabel:n.lane.agent.harness?.trim()||"lane",tone:Ze(n.lane.agent.state,n.lane.agent),updatedAt:n.lane.lastActiveAt>0?n.lane.lastActiveAt:void 0,floor:{live:n.live,harness:n.lane.agent.harness,actionGlyph:p.glyph,actionLabel:p.label,actionMeta:p.meta,strip:n.strip,countsLabel:oe(n.counts)}}});Ve(s)},[l,v,o]),i.useEffect(()=>{if(l)return je({onHover:y,onSelect:s=>{const n=v.find(p=>p.lane.id===s);n&&G(n.lane)}}),()=>je(null)},[l,v,y,G]),i.useEffect(()=>{if(l)return Ne(A),()=>Ne(null)},[l,A]);const he=s=>T?M+s*D:E-M-s*D,xe=_e+U.length*I+26,Xe=i.useMemo(()=>{if(!N)return 1;const s=E+Q,n=.708*s+60,p=.386*s+250,h=Math.min(N.w/n,N.h/p);return Math.round(Math.min(1.6,Math.max(.7,h))*100)/100},[N,E,Q]),Ye=Math.round(Xe*$*100)/100;return e.jsxs("div",{className:`agent-floor${l?" is-rail-ledger":""}`,"data-live-count":ie,"data-floor-orient":u,children:[e.jsxs("div",{className:"agent-floor__body",children:[l?null:e.jsxs("aside",{className:"agent-floor__ledger","aria-label":"Fleet ledger",children:[e.jsxs("header",{className:"agent-floor__ledger-head",children:[e.jsx("span",{className:"agent-floor__ledger-title",children:"fleet"}),e.jsxs("span",{className:"agent-floor__ledger-meta",children:[v.length," lane",v.length===1?"":"s"," · ",ie," live"]}),e.jsx("span",{className:"agent-floor__ledger-trace",children:"trace 30m"})]}),e.jsx("div",{className:"agent-floor__ledger-rows",children:v.map(s=>{const n=s.lane.agent,p=ue(n);return e.jsxs("button",{type:"button",className:`agent-floor__ledger-row${A===s.lane.id?" is-focus":""}`,onClick:()=>G(s.lane),onMouseEnter:()=>y(s.lane.id),onMouseLeave:()=>y(null),children:[e.jsxs("span",{className:"agent-floor__ledger-id",children:[e.jsx(fe,{name:n.name,size:18,tile:!0,hue:p.hue,tone:p.tone}),e.jsx("span",{className:"agent-floor__ledger-name",children:X(n,s.lane.source)}),e.jsx(Me,{harness:n.harness,size:11,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${s.live?" is-live":""}`})]}),e.jsxs("span",{className:"agent-floor__ledger-tally",children:[e.jsx("span",{className:"agent-floor__ledger-strip",children:s.strip.map((h,f)=>e.jsx("span",{className:`agent-floor__ledger-cell is-${h}`},f))}),e.jsx("span",{className:"agent-floor__ledger-counts",children:oe(s.counts)})]})]},s.lane.id)})}),e.jsx("footer",{className:"agent-floor__ledger-foot",children:"rows and flags are linked — hover to unroll, click to pin"})]}),e.jsxs("div",{className:`agent-floor__viewport${ee?" is-inspecting":""}${H?" is-dragging":""}`,ref:W,onWheel:Pe,onPointerDown:Ie,onPointerMove:ze,onPointerUp:ge,onPointerCancel:ge,children:[e.jsx(gt,{zoom:$,fit:$===1&&S.x===0&&S.y===0,onZoomChange:O,onReset:Te}),e.jsx("div",{className:"agent-floor__stage",style:{transform:`translate3d(${S.x}px, ${S.y}px, 0) scale(${Ye}) rotateX(57deg) rotateZ(45deg)`},children:e.jsxs("div",{className:"agent-floor__field",style:{width:E,height:Q,left:-E/2,top:-Q/2},children:[e.jsx("div",{className:"agent-floor__plane"}),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__seam${n===0?" is-front":""}`,style:{left:he(n)}},n)),Array.from({length:Z+1},(s,n)=>e.jsx("div",{className:`agent-floor__bb agent-floor__tick${n===0?" is-now":""}`,style:{left:he(n),top:xe},children:n===0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__tick-pulse"}),e.jsx("span",{children:"now"})]}):ae(V-(n-1)*z)},n)),e.jsx("div",{className:"agent-floor__lanes",style:{left:0,top:_e},"data-focus":A!==null||void 0,children:U.map((s,n)=>e.jsx(mt,{series:s,index:n,planeW:E,flip:T,periodStart:V,now:o,focused:A===s.lane.id,pinned:r===s.lane.id,dimmed:r===null&&g!==null&&g!==s.lane.id,peekSlot:w?.laneId===s.lane.id?w.slot:null,onFocus:y,onPeek:Re,onSelect:G},s.lane.id))}),J.length>0?e.jsxs("div",{className:"agent-floor__bb agent-floor__chip",style:{left:T?M/2:E-M/2,top:xe+30},children:["+",J.length," more in the ledger"]}):null]})}),ee?e.jsx(ft,{series:ee,now:o,concise:x,onConciseChange:j,onClose:()=>d(null),onOpenFull:()=>a(ee.lane),operatorName:c}):null]})]}),e.jsx(ut,{focus:De,pinned:r!==null&&A===r,ledger:v,liveCount:ie,now:o}),e.jsxs("footer",{className:"agent-floor__legend",children:[e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-tool"}),"tool call"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-edit"}),"file edit"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-msg"}),"message"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-pulse"}),"live — pad glows"]}),e.jsxs("button",{type:"button",className:"agent-floor__legend-flip",onClick:re,title:"Flip which side history accumulates on",children:["past ",T?"→":"←"]}),e.jsx("span",{className:"agent-floor__legend-note",children:"Towers mint every 5 min · details land in the dock · click to pin, click again for the timeline"})]})]})}export{Ms as AgentFloorView};
@@ -1 +0,0 @@
1
- import{r as m,j as a}from"./index-DMiGbrBt.js";/* empty css */import{c as q,d as K,s as V,b as G}from"./colors-BtO5_zlx.js";import{m as J,c as X}from"./conversation-model-B47vYmWN.js";import{a as D}from"./api-h5zurxmi.js";import{u as Y}from"./sse-CjIkKo46.js";import{a as Z,t as ee}from"./time-DltNTpLl.js";import{f as h}from"./text-DsBWV_4k.js";import{u as ae}from"./Provider-C7UKGHQy.js";import{o as te}from"./openContent-C6XO6kr5.js";import{B as E}from"./BackToPicker-BRvfostO.js";import{A as se}from"./AgentLiveActions-DBtnD0qE.js";import{O as le}from"./ObservedTopologyPanel-DyUeV98H.js";import{a as re}from"./model-Co0zkMIc.js";import"./index-BWHgHrtv.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./terminal-takeover-B8UeD9OX.js";import"./eye-0PvebX_a.js";import"./terminal-B9AOZQKR.js";function k({values:t}){return a.jsx("span",{className:"s-agent-token-list",children:t.map(s=>a.jsx("span",{className:"s-agent-token",children:s},s))})}function r({value:t}){return a.jsx("span",{className:"s-agent-code-value",children:t})}function w({label:t,value:s}){return s?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:t}),a.jsx("span",{className:"s-agent-profile-chip-value",children:s})]}):null}function $(t){return(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function oe(t){return t.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(s=>s.slice(0,1).toUpperCase()+s.slice(1)).join(" ")}function ie(t,s,i,c){let l=t.trim().replace(/^@+/,"");const f=[s,i,c,c?h(c):null].filter(d=>!!d?.trim());for(const d of f){const p=d.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${p}[-_.:\\s·]+`,"iu"),"")}return l}function ne(t,s,i,c){const l=s?.participants?.find(u=>u.agentId===t.id||u.actorId===t.id),f=$(t.harness),d=$(i),p=[l?.scopedAlias,s?.alias,t.handle,l?.displayName,s?.agentName,t.name];for(const u of p){if(!u?.trim())continue;const j=ie(u,i,c,t.harness),v=oe(j),n=$(v);if(!(!n||n===d||n===f))return v}return null}function ce(t){const s=t?.trim();return s?s.toLowerCase()==="a2a"?"A2A":h(s)??s:null}function ue({name:t,url:s}){return s?a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:t}):a.jsx(a.Fragment,{children:t})}function x({title:t,subtitle:s,items:i,variant:c}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${c?` s-agent-profile-card-${c}`:""}`,children:[a.jsx("div",{className:"s-agent-profile-card-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"s-agent-profile-card-title",children:t}),s&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:s})]})}),a.jsx("div",{className:"s-agent-meta-card-body",children:i.map(l=>a.jsxs("div",{className:"s-agent-meta-row",children:[a.jsx("span",{className:"s-agent-meta-label",children:l.label}),a.jsx("span",{className:"s-agent-meta-value",children:l.value})]},l.label))})]})}function sa({conversationId:t,navigate:s}){const{agents:i,route:c}=ae(),[l,f]=m.useState(null),[d,p]=m.useState(null),[u,j]=m.useState(null),v=m.useCallback(async()=>{j(null);try{const o=await D(`/api/session/${encodeURIComponent(t)}`).catch(()=>null);f(o)}catch(o){j(o instanceof Error?o.message:String(o)),f(null)}},[t]);m.useEffect(()=>{v()},[v]),Y(()=>{v()});const n=l?.agentId??null;m.useEffect(()=>{if(!n||i.some(P=>P.id===n)){p(null);return}let o=!1;return D(`/api/agents/${encodeURIComponent(n)}`).then(P=>{o||p(P)}).catch(()=>{o||p(null)}),()=>{o=!0}},[i,n]);const e=m.useMemo(()=>n?i.find(o=>o.id===n)??(d?.id===n?d:null):null,[d,i,n]);if(!e)return a.jsxs("div",{children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const H=J(e),A=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,I=e.selector??e.defaultSelector??A,S=q(e.state),L=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,R=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,C=e.skills??[],b=ce(e.protocol),N=!!(e.providerName||b||C.length>0),T=re(e),g=T.title,y=ne(e,l,g,T.slug),F=y?`${g} · ${y}`:g,B=l?.participants?.find(o=>o.agentId===e.id||o.actorId===e.id),M=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,U=[h(e.harness??"")??e.harness,M].filter(o=>!!o).join(" · "),W=[{label:"Project",value:g},{label:"Alias",value:y??"Default project participant"},...I?[{label:"Primary selector",value:a.jsx(r,{value:I})}]:[],...B?.scopedAlias?[{label:"Scoped alias",value:a.jsx(r,{value:B.scopedAlias})}]:[],...A?[{label:"Handle",value:a.jsx(r,{value:A})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(r,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(r,{value:e.definitionId})}],z=[{label:"Routable agent ID",value:a.jsx(r,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(ue,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...C.length>0?[{label:"Skills",value:a.jsx(k,{values:C})}]:[],...N?[]:[{label:"Class",value:h(e.agentClass)??"—"}],...!N&&e.role?[{label:"Role",value:h(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(r,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(r,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(r,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],O=[...e.projectRoot?[{label:"Project path",value:a.jsx(r,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(r,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...L?[{label:"Authority node",value:a.jsx(r,{value:L})}]:[],...R?[{label:"Home node",value:a.jsx(r,{value:R})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(r,{value:e.conversationId})}]:[]],Q=[...!N&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!N&&e.transport?[{label:"Transport",value:h(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:h(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(r,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(r,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(k,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(k,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(k,{values:e.authorityProfile.writeTools})}]:[],...e.authorityProfile?[{label:"Machine access",value:`shell ${e.authorityProfile.shell?"allowed":"blocked"} · code writes ${e.authorityProfile.codebaseWrites?"allowed":"blocked"}`}]:[],...e.runtimePolicy?.sandbox?[{label:"Sandbox",value:e.runtimePolicy.sandbox}]:[]],_=[{label:"Conversation ID",value:a.jsx(r,{value:t})},...l?.alias?[{label:"Conversation alias",value:a.jsx(r,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(r,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(r,{value:l.workspaceRoot})}]:[],...l?.currentBranch?[{label:"Session branch",value:l.currentBranch}]:[],...l?.messageCount!=null?[{label:"Messages",value:String(l.messageCount)}]:[],...l?.lastMessageAt?[{label:"Last message",value:Z(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(E,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>s({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),u&&a.jsx("p",{className:"s-error",children:u}),a.jsxs("section",{className:"s-agent-profile-hero",children:[a.jsx("div",{className:"s-agent-profile-hero-main",children:a.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[a.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:K(e.name)},children:e.name[0].toUpperCase()}),a.jsxs("div",{className:"s-agent-profile-hero-copy",children:[a.jsxs("div",{className:"s-agent-casefile-title-meta",children:[a.jsx("span",{className:"s-agent-casefile-record",children:I??H??X(e.id)??e.id}),S&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${G(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:V(e.state)}}),S]}),e.staleLocalRegistration&&a.jsx("span",{className:"s-agent-state-chip s-agent-state-chip-offline",children:"Superseded registration"})]}),a.jsx("h1",{className:"s-agent-profile-hero-title",children:F}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(w,{label:"Project",value:g}),a.jsx(w,{label:"Alias",value:y??"Default"}),a.jsx(w,{label:"Runtime",value:U||null}),a.jsx(w,{label:"Host",value:e.homeNodeName?.replace(/\.local$/i,"")??null})]}),a.jsxs("p",{className:"s-agent-profile-hero-context",children:[l?.title?`Conversation: ${l.title}.`:"Attached to this conversation.",e.updatedAt?` Updated ${ee(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(se,{agent:e,navigate:s,returnTo:c}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>te(s,{view:"conversation",conversationId:t},{returnTo:c}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(x,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:W,variant:"primary"}),a.jsx(x,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:_}),a.jsx(x,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:Q}),a.jsx(x,{title:"Location",subtitle:"Where this alias resolves right now.",items:O}),a.jsx(x,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:z,variant:"secondary"})]}),a.jsx(le,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{sa as AgentInfoScreen};
@@ -1 +0,0 @@
1
- import{r as t,j as m}from"./index-DMiGbrBt.js";import{u as a}from"./Provider-C7UKGHQy.js";import{A as n}from"./AgentLanesView-B9vuEEmZ.js";import{c,d as l}from"./router-Bq5dwf78.js";import"./api-h5zurxmi.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./conversation-model-B47vYmWN.js";import"./time-DltNTpLl.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";/* empty css */import"./tail-events-D19uAGe3.js";import"./observe-CuLGD9Zp.js";import"./terminal-sessions-D5CIR2OL.js";import"./types-B0PlfpKc.js";import"./AgentAvatar-D90c1Rzk.js";import"./SpriteAvatar-DyaGuhik.js";import"./SessionObserve-yfXFafp8.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bla0gBdm.js";import"./lane-observe-D0rfKDnU.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-jSuTGeet.js";import"./AgentDetailCard-BcRBRp88.js";import"./AgentLiveActions-DBtnD0qE.js";import"./terminal-takeover-B8UeD9OX.js";import"./openContent-C6XO6kr5.js";import"./eye-0PvebX_a.js";import"./terminal-B9AOZQKR.js";import"./message-markup-3J9pi3nx.js";import"./ObservedTopologyPanel-DyUeV98H.js";import"./ObserveTextFlow-rsFj_rVo.js";import"./use-reduced-motion-RRBkmVkk.js";import"./message-circle-CG-96zts.js";import"./wrench-Bkc_0lKF.js";import"./external-link-CXBytO9o.js";import"./AgentFloorView-8LoAEBwS.js";/* empty css */import"./agent-lanes-model-B4YTt4OF.js";import"./context-budget-CbB4BDcO.js";import"./lane-roster-store-D8x1jac2.js";import"./AgentLanesPreflight-eSAoDsPi.js";import"./AgentLaneChrome-D9ZwUKrl.js";import"./AgentLaneCard-RrNnDZu8.js";/* empty css */import"./AgentLaneSummaryResize-BhFmGNzT.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-r2frk57c.js";import"./agent-lane-preview-CmHVe3dU.js";import"./AgentLaneDetailSheet-BXbPls9N.js";import"./SlidePanel-COwtoJqR.js";import"./agent-lane-detail-Djm3YJEa.js";import"./LaneTraceDetailSheet-D1CspRbl.js";import"./LaneTraceEventFocus-BF9ERP5O.js";function p(r){return new URLSearchParams(window.location.search).get(r)?.trim()||null}function Gr(){const{agents:r,navigate:o}=a(),e=t.useMemo(()=>c(),[]),s=t.useMemo(()=>l(),[]),i=t.useMemo(()=>({harnessFilter:p("harness"),projectFilter:p("project")}),[]);return m.jsx("div",{className:"s-agent-lanes-embed","data-scout-theme":!0,children:m.jsx(n,{navigate:o,agents:r,embedded:!0,profileId:e,laneSize:s,harnessFilter:i.harnessFilter,projectFilter:i.projectFilter})})}export{Gr as AgentLanesEmbedScreen};
@@ -1,2 +0,0 @@
1
- import{r as o,j as r}from"./index-DMiGbrBt.js";/* empty css */import{a as nn}from"./api-h5zurxmi.js";import{u as _n}from"./tail-events-D19uAGe3.js";import{i as le,o as we}from"./surface-activity-B1rgWB1i.js";import{u as Dn}from"./observe-CuLGD9Zp.js";import{f as zn}from"./terminal-sessions-D5CIR2OL.js";import{n as Mn}from"./colors-BtO5_zlx.js";import{S as Pn}from"./Provider-C7UKGHQy.js";import{d as On}from"./types-B0PlfpKc.js";import{A as $n}from"./AgentAvatar-D90c1Rzk.js";import{SessionObserve as Wn}from"./SessionObserve-yfXFafp8.js";import{q as Fn,t as tn,v as Hn,A as Bn,w as Ke,x as Gn,y as Vn,z as Kn,B as Un,C as qn,D as Ue,E as Yn,G as Zn,H as Xn,I as sn,J as Jn,K as Qn,c as an,d as rn}from"./router-Bq5dwf78.js";import{AgentFloorView as et}from"./AgentFloorView-8LoAEBwS.js";import{useLaneBootVisibility as nt,AgentLanesPreflightDeck as tt,AgentLanesLoadingSheet as st,LANE_BOOT_EXIT_MS as at}from"./AgentLanesPreflight-eSAoDsPi.js";import{AgentLaneChrome as rt}from"./AgentLaneChrome-D9ZwUKrl.js";import{AgentLaneCard as ot}from"./AgentLaneCard-RrNnDZu8.js";import{a as it}from"./agent-lane-card-model-r2frk57c.js";import{i as lt,A as ct}from"./AgentLaneDetailSheet-BXbPls9N.js";import{LaneTraceDetailSheet as dt}from"./LaneTraceDetailSheet-D1CspRbl.js";import{readStoredLaneSummaryHeight as ut,useLaneSummaryResize as ft,AgentLaneSummaryResizeHandle as mt}from"./AgentLaneSummaryResize-BhFmGNzT.js";import{A as de,i as on,l as K,h as ht,j as ln,k as gt,e as pt,f as Lt,m as yt,r as vt,d as cn,D as bt,g as St}from"./agent-lanes-model-B4YTt4OF.js";import{i as kt,c as xt,n as qe}from"./keyboard-nav-2kv_tGUS.js";import{p as Ye}from"./lane-roster-store-D8x1jac2.js";function Ne(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function wt(e){const n=new Set,t=[];for(const s of e){const i=Ne(s);n.has(i)||(n.add(i),t.push(s))}return t}function Nt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Et(e,n,t){const s=Ne(n);for(const d of e)if(Ne(d)===s)return e;const i=[...e,n];return i.length>t?i.slice(i.length-t):i}function jt(e,n,t){return Nt(wt([...n,...e]),t)}const Ct=500,Rt=3e4;function At(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function It(e,n){const t=new URLSearchParams({limit:String(e)});return n&&t.set("transcripts","true"),(await nn(`/api/tail/recent?${t.toString()}`)).events??[]}function Tt(e,n){const t=new URLSearchParams;e&&t.set("scope",e),typeof n=="number"&&Number.isFinite(n)&&n>0&&t.set("limit",String(Math.floor(n)));const s=t.toString();return s?`/api/tail/discover?${s}`:"/api/tail/discover"}function _t(e){const n=e?.recentLimit??Ct,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Rt,i=e?.includeTranscriptReplay??!1,d=e?.hydrateOnDiscovery??i,f=e?.discoveryScope,y=e?.discoveryLimit,u=e?.pauseWhenHidden??!1,[l,c]=o.useState(null),[v,m]=o.useState([]),[L,j]=o.useState({discovery:"loading",recent:"loading"}),N=o.useRef(null),p=o.useRef(0);_n(S=>{m(h=>Et(h,S,n))},t);const b=o.useCallback((S=!1)=>{if(!t||u&&!le())return Promise.resolve();S&&j(T=>({...T,recent:"loading"}));const h=`${n}:${i?"replay":"live"}`,E=N.current;if(E?.key===h)return E.promise;const k=++p.current;let R;return R=It(n,i).then(T=>{m(M=>jt(M,T,n)),k===p.current&&j(M=>({...M,recent:"ready"}))}).catch(()=>{k===p.current&&j(T=>({...T,recent:"error"}))}).finally(()=>{N.current?.promise===R&&(N.current=null)}),N.current={key:h,promise:R},R},[t,i,u,n]),z=o.useCallback(async(S=!1)=>{if(t&&!(u&&!le())){S&&j(h=>({...h,discovery:"loading"}));try{const h=await nn(Tt(f,y));c(h),j(E=>({...E,discovery:"ready"})),d&&((h.transcripts?.length??0)>0||h.processes.length>0)&&b()}catch{c(h=>h??At()),j(h=>({...h,discovery:"error"}))}}},[y,f,t,d,u,b]),I=o.useCallback(async()=>{await Promise.all([z(!0),b(!0)])},[z,b]);return o.useEffect(()=>{if(!t)return;let S=!1;const h=()=>{S||z()};h();const E=setInterval(h,s),k=u?we(h):null;return()=>{S=!0,clearInterval(E),k?.()}},[s,t,u,z]),o.useEffect(()=>{if(!t)return;let S=!1,h=!1;const E=()=>{S||h||u&&!le()||(h=!0,b(!0))};E();const k=u?we(E):null;return()=>{S=!0,k?.()}},[t,u,b]),{discovery:l,events:v,loadState:L,refreshDiscovery:z,retryInitialLoad:I}}function Dt({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s}){const[i,d]=o.useState(-1),f=o.useRef(new Map);o.useEffect(()=>{if(i<0)return;if(i>=e.length){d(e.length-1);return}const l=e[i];if(!l)return;const c=f.current.get(l.id);c?.scrollIntoView({block:"nearest",inline:"nearest"}),c?.focus()},[i,e]),o.useEffect(()=>{n||i>=e.length&&d(e.length>0?e.length-1:-1)},[i,n,e.length]);const y=o.useCallback((l,c)=>{c?f.current.set(l,c):f.current.delete(l)},[]);o.useEffect(()=>{const l=c=>{if(!document.querySelector(".s-agent-lanes")||kt(c.target)||xt()||n||e.length===0)return;const v=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&v>=0&&v<de.length){c.preventDefault(),s(de[v].key);return}if(c.key==="ArrowDown"||c.key==="j"){c.preventDefault(),d(m=>qe(m,e.length,1));return}if(c.key==="ArrowUp"||c.key==="k"){c.preventDefault(),d(m=>qe(m,e.length,-1));return}if(c.key==="Home"||c.key==="g"&&!c.shiftKey){c.preventDefault(),d(0);return}if(c.key==="End"||c.key==="G"){c.preventDefault(),d(e.length-1);return}if(c.key==="Enter"||c.key==="i"){const m=i<0?0:i,L=e[m];if(!L)return;c.preventDefault(),d(m),t(L)}};return window.addEventListener("keydown",l),()=>window.removeEventListener("keydown",l)},[i,n,e,s,t]);const u=o.useCallback((l,c)=>({"data-cursor":i===l?!0:void 0,tabIndex:i===l?0:-1,ref:v=>y(c,v),onFocus:()=>d(l)}),[i,y]);return{focusedIndex:i,getLaneFocusProps:u}}function zt(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function ce(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function dn(e,n){if(!n)return!0;const t=ce(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const d=i.toLowerCase(),f=zt(i);return d===n||ce(i)===t||!!(f&&(f.toLowerCase()===n||ce(f)===t))})}function Mt(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:d}=e;return dn([s.harness,s.definitionId,i?.attribution,d],t)}function Pt(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:d}=e;return dn([s.project,s.projectRoot,s.cwd,i?.cwd,K(s,d)],t)}function Ot(e){return e.current||on(e.observe)}function Ze(e,n,t,s){return tn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function $t(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>Mt(t,e.harness));case"project":return n.filter(t=>Pt(t,e.projectPath));case"attention":return n.filter(t=>Ot(t));default:return[]}}function Xe(e,n,t){n.has(t.lane.id)||(n.add(t.lane.id),e.push({key:t.slot?`${t.slot.id}:${t.lane.id}`:t.lane.id,lane:t.lane,widthPx:t.widthPx,zone:t.zone,position:t.position,slotId:t.slot?.id,laneDefId:t.laneDef?.id,isPinned:t.zone!=="main"}))}function ke(e){return[...e].sort((n,t)=>{const s=Hn(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function Wt(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,d=[],f=[],y=[],u=new Map(t.laneDefs.map(m=>[m.id,m]));for(const m of Fn(t.slots)){const L=u.get(m.laneDefId);if(!L)continue;const j=$t(L,n),N=m.zone==="pinned_left"?d:m.zone==="pinned_right"?y:f;for(const p of j)Xe(N,i,{lane:p,zone:m.zone,position:m.position,widthPx:Ze(t,p,m,s),slot:m,laneDef:L})}if(t.showAutoLanes){let m=0;for(const L of n)i.has(L.id)||(Xe(f,i,{lane:L,zone:"main",position:m,widthPx:Ze(t,L,void 0,s)}),m+=1)}const l=ke(d),c=ke(f),v=ke(y);return{pinnedLeft:l,main:c,pinnedRight:v,flat:[...l,...c,...v]}}function Ft(e){return e.slots.some(n=>n.laneDefId===Bn)}function ie(e,n){const t=`harness:${ce(n)}`;return e.slots.some(s=>s.laneDefId===t)}function Ht(e,n,t){const[s,i]=o.useState(()=>Ke(e,n));o.useEffect(()=>{i(Ke(e,n))},[n,e]);const d=o.useCallback(p=>{Gn(p),i(p)},[]),f=o.useMemo(()=>Wt({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),y=o.useCallback((p,b="pinned_left")=>{d(Vn(s,{laneId:p.id,title:K(p.agent,p.source),zone:b,width:s.laneWidths[p.id]}))},[s,d]),u=o.useCallback(p=>{d(Kn(s,p))},[s,d]),l=o.useCallback((p,b)=>{d(Un(s,p,b))},[s,d]),c=o.useCallback(p=>{d(qn(s,p))},[s,d]),v=o.useCallback((p,b)=>{d(Ue(s,{kind:"harness",title:b??`${p} sessions`,harness:p,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,d]),m=o.useCallback(()=>{d(Ue(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,d]),L=o.useCallback(()=>{d(Yn(s))},[s,d]),j=o.useCallback(p=>Zn(s,p),[s]),N=o.useCallback(p=>Xn(s,p),[s]);return{deck:s,layout:f,pinLane:y,unpinLane:u,setLaneWidth:l,setDefaultLaneWidth:c,addHarnessLane:v,addAttentionLane:m,clearPins:L,isPinned:j,pinnedZone:N}}function Bt(e){const[n,t]=o.useState(null),s=o.useRef({laneId:"",x:0,width:512}),i=o.useRef(512),d=o.useCallback((u,l,c)=>{l.preventDefault(),l.stopPropagation(),l.currentTarget.setPointerCapture(l.pointerId),s.current={laneId:u,x:l.clientX,width:c},i.current=c,t(u),document.body.classList.add("s-agent-lanes--resizing-width")},[]),f=o.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const l=sn(i.current);e(s.current.laneId,l.tier??l.px)}return null})},[e]);o.useEffect(()=>{if(!n)return;const u=c=>{const v=c.clientX-s.current.x;i.current=Math.min(Jn,Math.max(Qn,s.current.width+v));const m=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);m&&m.style.setProperty("--lane-width",`${i.current}px`)},l=()=>f();return window.addEventListener("pointermove",u),window.addEventListener("pointerup",l),window.addEventListener("pointercancel",l),()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l)}},[f,n]);const y=o.useCallback((u,l)=>{e(u,l),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:d,resetLaneWidth:y,resizingLaneId:n}}const Je=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],Gt=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function Vt(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function Kt(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function Ut(e){return e?Je.filter(n=>n.key!=="floor"):Je}const un="openscout:agent-lanes-horizon",fn="openscout:agent-lanes-layout",mn="openscout:agent-lanes-grid-columns",hn="openscout:agent-lanes-technical-rollup",qt=`${hn}:lane:`,Yt="openscout:agent-lanes-scroll",Zt=96,Xt=3e4,Jt=3e4,Qt=3e4,es=3e4,ns=12e4,ts=["pinned-left","main","pinned-right"];function Qe(){return!le()}function gn(e,n){return`${Yt}:${e}:${n}`}function ss(e,n){try{const t=sessionStorage.getItem(gn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function as(e,n,t){try{sessionStorage.setItem(gn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function rs(){try{const e=sessionStorage.getItem(un);if(e&&de.some(n=>n.key===e))return e}catch{}return bt}function os(e){try{const n=sessionStorage.getItem(fn);return Vt(n,e)}catch{}return"lanes"}function is(){try{return Kt(sessionStorage.getItem(mn))}catch{return"auto"}}function ls(){try{const e=sessionStorage.getItem(hn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function pn(e){return`${qt}${encodeURIComponent(e)}`}function en(e){try{const n=sessionStorage.getItem(pn(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return ls()??!1}function cs(e,n){try{sessionStorage.setItem(pn(e),n?"1":"0")}catch{}}function ds(e,n){const t=o.useRef(new Map),s=o.useRef({}),i=o.useCallback((u,l=t.current.get(u))=>{if(!l)return;const c=s.current[u]??ss(e,u);if(c<=0)return;const v=Math.max(0,l.scrollWidth-l.clientWidth),m=Math.min(c,v);Math.abs(l.scrollLeft-m)>1&&(l.scrollLeft=m)},[e]),d=o.useCallback(()=>{for(const u of ts)i(u)},[i]);o.useLayoutEffect(()=>{d();const u=window.requestAnimationFrame(d);return()=>window.cancelAnimationFrame(u)},[e,d,n]);const f=o.useCallback((u,l)=>{if(!l){t.current.delete(u);return}t.current.set(u,l),i(u,l)},[i]);return{handleLaneScroll:o.useCallback((u,l)=>{const c=l.currentTarget.scrollLeft;s.current[u]=c,as(e,u,c)},[e]),setLaneScrollNode:f}}function us({issue:e}){const n=e.agentNames?.length?e.agentNames.join(", "):e.agentIds?.join(", "),t=e.transcriptPaths?.join(" · "),s=[n,t].filter(Boolean).join(" · ");return r.jsxs("li",{className:"s-agent-lanes-issues-item",children:[r.jsx("span",{className:"s-agent-lanes-issues-kind",children:e.kind.replaceAll("_"," ")}),r.jsx("span",{className:"s-agent-lanes-issues-message",children:e.message}),s?r.jsx("span",{className:"s-agent-lanes-issues-detail",children:s}):null]})}function fs({loadState:e,onRetry:n}){const t=[e.discovery==="error"?"session discovery":"",e.recent==="error"?"recent history":""].filter(Boolean).join(" and ");return r.jsx("div",{className:"s-agent-lanes-empty s-agent-lanes-empty--degraded",role:"alert",children:r.jsxs("div",{className:"s-agent-lanes-empty-card",children:[r.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[r.jsx("span",{className:"s-agent-lanes-empty-kicker",children:"Tail incomplete"}),r.jsx("h2",{children:"Recent activity could not be loaded"}),r.jsxs("p",{children:["Scout could not finish ",t||"the tail scan",", so this is not being treated as a quiet interval."]}),r.jsx("p",{className:"s-agent-lanes-empty-secondary",children:"Live events can still arrive while Scout retries."})]}),r.jsx("div",{className:"s-agent-lanes-empty-actions",children:r.jsx("button",{type:"button",onClick:n,children:"Retry tail scan"})})]})})}function ms({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:d,onAddCodexLane:f,sourceCount:y,eventCount:u}){const l=!!e,c=l?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",v=l?`${e} has no activity in the last ${t}.`:s?`Scout checked ${y.toLocaleString()} session source${y===1?"":"s"} and ${u.toLocaleString()} recent tail event${u===1?"":"s"}; nothing is active in this interval.`:"Automatic lanes are off, and this deck has no pinned sessions.",m=s?"Scout will keep listening. New turns and tool output will appear here automatically.":"Pin a session lane or turn automatic lanes back on to populate the deck.",L=n==="5m"?"30m":n==="24h"?null:"24h";return r.jsx("div",{className:"s-agent-lanes-empty",role:"status","aria-live":"polite",children:r.jsxs("div",{className:"s-agent-lanes-empty-card",children:[r.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[r.jsx("span",{}),r.jsx("span",{}),r.jsx("span",{})]}),r.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[r.jsx("span",{className:"s-agent-lanes-empty-kicker",children:l?"Filter checked":s?"Tail scanned":"Lane deck ready"}),r.jsx("h2",{children:c}),r.jsx("p",{children:v}),r.jsx("p",{className:"s-agent-lanes-empty-secondary",children:m})]}),r.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[L?r.jsxs("button",{type:"button",onClick:()=>i(L),children:["Look back ",ln(L)]}):null,r.jsx("button",{type:"button",onClick:d,children:"Show attention"}),r.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function hs({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:d,isNew:f,nowMs:y,traceWindowMs:u,traceWindowLabel:l,summaryHeight:c,onSummaryResizeStart:v,onSummaryResizeReset:m,summaryResizing:L,onInspect:j,onTraceEventSelect:N,onTogglePin:p,onWidthChange:b,onWidthResizeStart:z,widthResizing:I,focusProps:S,operatorName:h,grid:E=!1}){const{agent:k,observe:R,source:T}=e,M=on(R),J=!!R,Q=M?" s-agent-lane--live":"",ee=f?" s-agent-lane--new":"",[F,ne]=o.useState(!0),[U,H]=o.useState(()=>en(e.id)),$=o.useRef(e.id);o.useEffect(()=>{if($.current!==e.id){$.current=e.id,H(en(e.id));return}cs(e.id,U)},[U,e.id]);const _=S?.ref,B=S?{"data-cursor":S["data-cursor"],tabIndex:S.tabIndex,onFocus:S.onFocus}:void 0,P=()=>r.jsx("section",{className:"s-agent-lane-trace","aria-label":`${K(k,T)} trace`,children:r.jsx("div",{className:"s-agent-lane-body",children:J?r.jsx(Wn,{data:R??void 0,agentId:e.source==="scout"?k.id:void 0,sessionId:k.harnessSessionId,showRail:!1,variant:"lane",nowMs:y,traceWindowMs:u,traceWindowLabel:l,laneCollapseTechnicalEvents:U,onLaneCollapseTechnicalEventsChange:H,laneOperatorName:h,onLaneEventSelect:q=>N(e,q)}):r.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})});return r.jsxs("article",{ref:_,"data-lane-id":e.id,className:`s-agent-lane${E?" s-agent-lane--grid":""}${Q}${ee}${s?" s-agent-lane--pinned":""}${S?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:E?void 0:{"--lane-width":`${n}px`},...B,children:[r.jsx(rt,{title:t,width:i,defaultWidth:d,pinned:s,onTogglePin:p,onWidthChange:b,onResizeStart:z,resizing:I,statusLabel:cn(k,T),live:M,widthControls:!E}),r.jsx(ot,{model:it(e,{isLive:M,nowMs:y}),avatar:r.jsx($n,{agent:k,placement:"row",size:44,presence:!1,tile:!1}),collapsed:F,cockpitHeight:F?void 0:c,onToggleCollapsed:()=>ne(q=>!q),onOpen:()=>j(e)}),!F&&r.jsx(mt,{onResizeStart:v,onReset:m,active:L}),P()]})}function gs({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:d,harnessFilter:f,projectFilter:y}){const u=o.useContext(Pn),l=t?.agents??n??u?.agents??[],c=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,v=d??an(),m=i??rn(),[L,j]=o.useState(Date.now()),[N,p]=o.useState(rs),[b,z]=o.useState(()=>os(s)),[I,S]=o.useState(is),h=!s&&b==="floor",E=b==="grid",k=h?"4h":N,[R,T]=o.useState(ut),[M,J]=o.useState([]),{beginResize:Q,resetSummaryHeight:ee,resizing:F}=ft(T),ne=o.useCallback(a=>Q(a,R),[Q,R]),U=St(k),H=ht(k),$=_t({enabled:!t,includeTranscriptReplay:!0,hydrateOnDiscovery:!0,discoveryIntervalMs:s?Xt:5e3,recentLimit:U,discoveryLimit:s?Zt:void 0,pauseWhenHidden:!0}),_=t?.discovery??$.discovery,B=t?.tailEvents??$.events,P=t?.loadState??$.loadState,q=t?.retryInitialLoad??$.retryInitialLoad,Ee=t?.terminalSessions??M,Ln={view:"ops",mode:"lanes"},Y=ln(k),je=s?Jt:1e4,Ce=s?Qt:1e4;o.useEffect(()=>{const a=setInterval(()=>{Qe()||j(Date.now())},je);return()=>clearInterval(a)},[je]),o.useEffect(()=>{if(t)return;let a=!1;const g=async()=>{if(!Qe())try{const be=await zn({includeDiscovered:!1});a||J(be)}catch{a||J([])}};g();const w=setInterval(()=>{g()},Ce),C=we(()=>{g()});return()=>{a=!0,clearInterval(w),C()}},[t,Ce]),o.useEffect(()=>{try{sessionStorage.setItem(un,N)}catch{}},[N]),o.useEffect(()=>{try{sessionStorage.setItem(fn,b)}catch{}},[b]),o.useEffect(()=>{try{sessionStorage.setItem(mn,I)}catch{}},[I]);const yn=o.useRef(gt()),Re=o.useRef(""),[te,Ae]=o.useState(()=>new Set),[me,Ie]=o.useState(null),vn=o.useMemo(()=>l.filter(a=>pt(a,L,k)),[l,L,k]),bn=Dn(vn,{enabled:!t,activeIntervalMs:s?es:void 0,idleIntervalMs:s?ns:void 0,pauseWhenHidden:!0}),Te=t?.observeCache??bn,Sn=P.discovery==="loading"||P.recent==="loading",_e=P.discovery==="error"||P.recent==="error",De=_?.totals.transcripts??_?.transcripts?.length??0,se=nt(Sn,_e?0:at);o.useEffect(()=>{if(te.size===0)return;const a=setTimeout(()=>Ae(new Set),900);return()=>clearTimeout(a)},[te]);const{lanes:ae,issues:D,freshLaneIds:he}=o.useMemo(()=>{const a=Lt({transcripts:_?.transcripts??[],tailEvents:B,processes:_?.processes??[],scoutAgents:l,terminalSessions:Ee,observeCache:Te,now:L,workingOnly:!0,horizon:k}),g=yt(a.lanes,yn.current),w=[...vt(_),...a.issues];return{lanes:g.lanes,issues:w,freshLaneIds:g.newLaneIds}},[_,B,l,Ee,Te,L,k]);o.useEffect(()=>{const a=D.map(g=>`${g.id}\0${g.message}`).join(`
2
- `);a!==Re.current&&(Re.current=a,D.length!==0&&console.warn(`[agent-lanes] ${D.length} roster issue${D.length===1?"":"s"}`,D))},[D]),o.useEffect(()=>{he.length!==0&&Ae(a=>{const g=new Set(a);for(const w of he)g.add(w);return g})},[he.join("\0")]);const ze=o.useMemo(()=>ae.find(a=>a.id===me)??null,[me,ae]),Z=o.useMemo(()=>ae.filter(a=>Ls(a,{harnessFilter:f,projectFilter:y})),[ae,f,y]),kn=o.useCallback(a=>ys(a,{harnessFilter:f,projectFilter:y}),[f,y]),{deck:A,layout:x,pinLane:Me,unpinLane:Pe,setLaneWidth:ge,addHarnessLane:X,addAttentionLane:Oe,clearPins:xn,isPinned:$e}=Ht(v,m,Z),{beginResize:We,resizingLaneId:Fe}=Bt(ge),pe=o.useMemo(()=>vs({harnessFilter:f,projectFilter:y}),[f,y]),W=x.flat,Le=x.pinnedLeft.length+x.pinnedRight.length,wn=o.useMemo(()=>[x.pinnedLeft,x.main,x.pinnedRight].map(a=>a.map(g=>`${g.key}:${g.widthPx}`).join(",")).join("/"),[x.main,x.pinnedLeft,x.pinnedRight]),{handleLaneScroll:G,setLaneScrollNode:V}=ds(v,wn),Nn=o.useCallback(a=>{V("pinned-left",a)},[V]),En=o.useCallback(a=>{V("main",a)},[V]),jn=o.useCallback(a=>{V("pinned-right",a)},[V]),Cn=o.useCallback(a=>{G("pinned-left",a)},[G]),Rn=o.useCallback(a=>{G("main",a)},[G]),An=o.useCallback(a=>{G("pinned-right",a)},[G]);o.useEffect(()=>{if(h)return;const a=W.map(g=>{const{lane:w}=g;return{id:w.id,label:K(w.agent,w.source),statusLabel:cn(w.agent,w.source),tone:Mn(w.agent.state,w.agent),agentId:lt(w.agent)?void 0:w.agent.id,updatedAt:w.lastActiveAt>0?w.lastActiveAt:void 0}});Ye(a)},[W,h]),o.useEffect(()=>()=>Ye(null),[]);const[He,ye]=o.useState(null),ve=o.useCallback(a=>{Ie(a.id)},[]),Be=o.useCallback((a,g)=>{ye({lane:a,event:g})},[]),In=o.useCallback(a=>{const g=a.observe?.events.at(-1);g&&ye({lane:a,event:g})},[]),{getLaneFocusProps:Ge}=Dt({lanes:W.map(a=>a.lane),inspectedLaneId:me,onInspect:ve,onHorizonChange:p}),[re,O]=o.useState(!1),Ve=o.useRef(null);o.useEffect(()=>{if(!re)return;const a=g=>{Ve.current?.contains(g.target)||O(!1)};return window.addEventListener("pointerdown",a),()=>window.removeEventListener("pointerdown",a)},[re]);const oe=o.useCallback((a,g,w=!1)=>{const{lane:C}=a,be=K(C.agent,C.source),Tn=A.laneWidths[C.id]??sn(a.widthPx).tier??a.widthPx;return r.jsx(hs,{lane:C,widthPx:a.widthPx,laneTitle:be,pinned:a.isPinned,laneWidth:Tn,defaultWidth:A.defaultLaneWidth,isNew:te.has(C.id),nowMs:L,traceWindowMs:H,traceWindowLabel:Y,summaryHeight:R,onSummaryResizeStart:ne,onSummaryResizeReset:ee,summaryResizing:F,onInspect:ve,onTraceEventSelect:Be,onTogglePin:()=>{$e(C.id)?Pe(C.id):Me(C)},onWidthChange:Se=>ge(C.id,Se),onWidthResizeStart:Se=>We(C.id,Se,a.widthPx),widthResizing:Fe===C.id,focusProps:Ge(g,C.id),operatorName:c,grid:w},a.key)},[We,A.defaultLaneWidth,A.laneWidths,Ge,ne,Y,ve,Be,$e,c,te,L,Me,ee,Fe,ge,R,F,H,Pe]);return r.jsxs("div",{className:`s-agent-lanes${s?" s-agent-lanes--embedded s-agent-lanes--low-motion":""}`,"data-lane-profile":v,"data-lane-layout":h?"floor":b,"data-lanes-deck-version":"1",children:[r.jsxs("div",{className:"s-agent-lanes-bar",children:[r.jsxs("div",{className:"s-agent-lanes-bar-leading",children:[r.jsx("div",{className:"s-agent-lanes-title",children:"Agent Lanes"}),r.jsxs("div",{className:"s-agent-lanes-meta","aria-label":"Lane deck status",children:[r.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[h?Z.length:W.length," live"]}),!h&&Le>0?r.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[Le," pinned"]}):null,r.jsx("span",{className:"s-agent-lanes-meta-stat",children:h?"past 30m · lanes 4h":`trace ${Y}`}),pe?r.jsx("span",{className:"s-agent-lanes-meta-filter",children:pe}):null,r.jsxs("span",{className:"s-agent-lanes-meta-detail",children:["deck v1 · ",v]})]})]}),r.jsxs("div",{className:"s-agent-lanes-bar-controls",children:[r.jsx("div",{className:"s-agent-lanes-layouts",role:"group","aria-label":"Lane layout",children:Ut(s).map(a=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${b===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":b===a.key,onClick:()=>z(a.key),children:a.label},a.key))}),E?r.jsx("div",{className:"s-agent-lanes-grid-density",role:"group","aria-label":"Grid columns",children:Gt.map(a=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${I===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":I===a.key,title:a.key==="auto"?"Fit columns to the available width":`${a.key} columns`,onClick:()=>S(a.key),children:a.label},a.key))}):null,r.jsxs("div",{className:"s-agent-lanes-deck-menu",ref:Ve,hidden:h,children:[r.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":re,onClick:()=>O(a=>!a),children:"+ Lane"}),re?r.jsxs("div",{className:"s-agent-lanes-deck-popover",role:"menu",children:[r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{Oe(),O(!1)},disabled:Ft(A),children:"Needs attention"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{X("codex","Codex sessions"),O(!1)},disabled:ie(A,"codex"),children:"Codex sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{X("claude","Claude sessions"),O(!1)},disabled:ie(A,"claude"),children:"Claude sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{X("grok","Grok sessions"),O(!1)},disabled:ie(A,"grok"),children:"Grok sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{X("kimi","Kimi sessions"),O(!1)},disabled:ie(A,"kimi"),children:"Kimi sessions"}),r.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item s-agent-lanes-deck-item--danger",onClick:()=>{xn(),O(!1)},disabled:Le===0,children:"Clear pinned lanes"})]}):null]}),h?null:r.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":"Activity window",children:de.map((a,g)=>r.jsx("button",{type:"button",className:`s-agent-lanes-horizon${N===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":N===a.key,title:`${a.label} window (${g+1})`,onClick:()=>p(a.key),children:a.label},a.key))})]})]}),t==null&&D.length>0?r.jsxs("div",{className:"s-agent-lanes-issues",role:"status","aria-live":"polite",children:[r.jsxs("div",{className:"s-agent-lanes-issues-head",children:[r.jsx("span",{className:"s-agent-lanes-issues-badge",children:"Roster issues"}),r.jsxs("span",{className:"s-agent-lanes-issues-meta",children:[D.length," fleet/transcript warning",D.length===1?"":"s"," — lanes follow tail, not agent registry"]})]}),r.jsx("ul",{className:"s-agent-lanes-issues-list",children:D.map(a=>r.jsx(us,{issue:a},a.id))})]}):null,(h?Z.length:W.length)===0?se.visible?r.jsx(tt,{discovery:_,discoveryPhase:P.discovery,windowMs:H,nowMs:L,layout:h?"none":E?"grid":"scroll",gridColumns:I,laneWidthPx:tn(A.defaultLaneWidth,A.defaultLaneWidth),matchTranscript:kn}):_e?r.jsx(fs,{loadState:P,onRetry:()=>{q()}}):r.jsx(ms,{activeFilterLabel:pe,horizon:N,horizonLabel:Y,showAutoLanes:A.showAutoLanes,onHorizonChange:p,onAddAttentionLane:Oe,onAddCodexLane:()=>X("codex","Codex sessions"),sourceCount:De,eventCount:B.length}):h?r.jsx(et,{lanes:Z,now:L,onOpenTrace:In,railLedger:!0,operatorName:c}):E?r.jsx("div",{className:"s-agent-lanes-grid","data-grid-columns":I,role:"listbox","aria-label":"Agent lane grid",children:W.map((a,g)=>oe(a,g,!0))}):r.jsxs("div",{className:"s-agent-lanes-body",children:[x.pinnedLeft.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-left","aria-label":"Pinned lanes",children:[r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),r.jsx("div",{ref:Nn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:Cn,children:x.pinnedLeft.map((a,g)=>oe(a,g))})]}):null,x.main.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main","aria-label":"Active lanes",children:[x.pinnedLeft.length>0?r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Live"}):null,r.jsx("div",{ref:En,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:Rn,children:x.main.map((a,g)=>oe(a,x.pinnedLeft.length+g))})]}):null,x.pinnedRight.length>0?r.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-right","aria-label":"Pinned right lanes",children:[r.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),r.jsx("div",{ref:jn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:An,children:x.pinnedRight.map((a,g)=>oe(a,x.pinnedLeft.length+x.main.length+g))})]}):null]}),se.visible?r.jsx(st,{loadState:P,sourceCount:De,processCount:_?.processes.length??0,eventCount:B.length,laneCount:h?Z.length:W.length,horizonLabel:Y,handedOff:se.exiting,exiting:se.exiting}):null,ze&&r.jsx(ct,{lane:ze,navigate:e,returnRoute:Ln,navigationEnabled:t==null,onClose:()=>Ie(null)}),He&&r.jsx(dt,{target:He,onClose:()=>ye(null)})]})}function ue(e){const n=e?.trim().toLowerCase();return n||null}function xe(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function ps(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function fe(e,n){if(!n)return!0;const t=xe(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const d=i.toLowerCase(),f=ps(i);return d===n||xe(i)===t||!!(f&&(f.toLowerCase()===n||xe(f)===t))})}function Ls(e,n){const t=ue(n.harnessFilter),s=ue(n.projectFilter),{agent:i,facts:d,source:f}=e;return fe([i.harness,i.definitionId,d?.attribution,f],t)&&fe([i.project,i.projectRoot,i.cwd,d?.cwd,K(i,f)],s)}function ys(e,n){return fe([e.harness,e.source],ue(n.harnessFilter))&&fe([e.project,e.cwd],ue(n.projectFilter))}function vs(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const bs=On({id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},webPath:"/ops/lanes",screen:"AgentLanesView",embed:{path:"/embed/agent-lanes",aliases:["/ops/lanes/embed","/embed/lanes","/embed/traces"],profile:"macos.lanes",rootClassName:"s-agent-lanes-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:e=>({profileId:an(),laneSize:rn(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),Vs=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:gs,scoutSurface:bs},Symbol.toStringTag,{value:"Module"}));export{gs as A,Vs as a,Wt as r,_t as u};
@@ -1 +0,0 @@
1
- import{r as h,j as s}from"./index-DMiGbrBt.js";import{A as B}from"./AgentAvatar-D90c1Rzk.js";import{H as S,h as w}from"./HarnessMark-Cbv3Ib0c.js";import{c as P}from"./colors-BtO5_zlx.js";import{f as R}from"./text-DsBWV_4k.js";import{t as C}from"./time-DltNTpLl.js";import"./SpriteAvatar-DyaGuhik.js";function K(n){return n.needsYou?"needs":n.status==="in_turn"||n.status==="in_flight"?"live":"idle"}const H=[{id:"prompt",label:"System prompt",sigil:"◆"},{id:"config",label:"Config",sigil:"▤"},{id:"conversations",label:"Conversations",sigil:"◇"},{id:"context",label:"Context",sigil:"▸"}],q={prompt:"System prompt",config:"Config",conversations:"Conversations",context:"Context"};function U(n){return n?n.replace(/^\/Users\/[^/]+/,"~").replace(/^\/home\/[^/]+/,"~"):""}const k=(n,e)=>`${n} ${e}${n===1?"":"s"}`;function rs({projects:n,initialSelection:e,onEdit:a,onInterrupt:t,onResetContext:i,onOpenConversation:m,onNewAgent:d}){const o=h.useMemo(()=>n.flatMap(l=>l.agents.map(c=>[l,c])),[n]),p=o[0]?.[1],[u,A]=h.useState(e?.agentId??p?.agent.id??null),[F,E]=h.useState(e?.facet??"prompt"),[I,y]=h.useState(()=>new Set(u?[u]:[])),[M,V]=h.useState(""),g=M.trim().toLowerCase(),D=h.useMemo(()=>g?n.map(l=>({...l,agents:l.agents.filter(c=>c.agent.name.toLowerCase().includes(g)||(c.agent.harness??"").toLowerCase().includes(g)||l.slug.toLowerCase().includes(g))})).filter(l=>l.agents.length>0):n,[n,g]),v=h.useMemo(()=>{for(const[l,c]of o)if(c.agent.id===u)return{project:l,entry:c};return null},[o,u]),T=n.reduce((l,c)=>l+c.agents.length,0),_=T*H.length,z=(l,c)=>{A(l),c&&E(c),y(r=>new Set(r).add(l))},$=l=>{y(c=>{const r=new Set(c);return r.has(l)?r.delete(l):r.add(l),r}),A(l)};return s.jsxs("div",{className:"s-acon",children:[s.jsxs("div",{className:"ac-shell",children:[s.jsxs("aside",{className:"ac-tree",children:[s.jsxs("div",{className:"ac-treeHead",children:[s.jsx("span",{className:"ac-treeIco","aria-hidden":!0,children:"⌕"}),s.jsx("input",{className:"ac-treeFind",placeholder:"Filter agents…",value:M,onChange:l=>V(l.target.value)})]}),s.jsxs("div",{className:"ac-treeScroll",children:[D.map(l=>s.jsxs("div",{className:"ac-treeGroup",children:[s.jsxs("div",{className:"ac-treeProject",children:[s.jsx("span",{className:"ac-sigil",children:"/"}),l.slug,s.jsx("span",{className:"ac-treeProjectCount",children:l.agents.length})]}),l.agents.map(c=>{const r=I.has(c.agent.id),f=K(c),G=c.agent.id===u;return s.jsxs("div",{className:"ac-agentBlock",children:[s.jsxs("button",{type:"button",className:"ac-agent","data-open":r||void 0,onClick:()=>$(c.agent.id),children:[s.jsx("span",{className:"ac-agentChev","data-open":r||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ac-agentAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:c.agent.name,harness:c.agent.harness,state:c.agent.state},placement:"node",size:16})}),s.jsx("span",{className:"ac-agentName","data-idle":f==="idle"||void 0,children:c.agent.name}),f==="needs"?s.jsx("span",{className:"ac-needs",children:"needs you"}):null,s.jsxs("span",{className:"ac-agentTail",children:[f!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":f,"aria-hidden":!0}):null,c.agent.harness?s.jsx("span",{className:"ac-agentMark","aria-hidden":!0,children:s.jsx(S,{harness:c.agent.harness,size:11})}):null]})]}),r?s.jsx("div",{className:"ac-facets",children:H.map(j=>{const L=j.id==="conversations"?c.sessions.length:void 0,W=G&&F===j.id;return s.jsxs("button",{type:"button",className:"ac-facet","data-active":W||void 0,onClick:()=>z(c.agent.id,j.id),children:[s.jsx("span",{className:"ac-facetSigil","aria-hidden":!0,children:j.sigil}),s.jsx("span",{className:"ac-facetLabel",children:j.label}),L!=null?s.jsx("span",{className:"ac-facetCount",children:L}):null]},j.id)})}):null]},c.agent.id)})]},l.key)),d?s.jsx("button",{type:"button",className:"ac-newAgent",onClick:d,children:"+ new agent"}):null]})]}),s.jsx("main",{className:"ac-read",children:v?s.jsx(Y,{project:v.project,entry:v.entry,facet:F,onEdit:a,onInterrupt:t,onResetContext:i,onOpenConversation:m}):s.jsx("div",{className:"ac-empty",children:"No agents."})}),s.jsx("aside",{className:"ac-rail",children:v?s.jsx(ss,{entry:v.entry,onOpenConversation:m}):null})]}),s.jsxs("div",{className:"ac-foot",children:[s.jsx("span",{className:"ac-footStat",children:k(n.length,"project")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(T,"agent")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(_,"facet")})]})]})}function Y({project:n,entry:e,facet:a,onEdit:t,onInterrupt:i,onResetContext:m,onOpenConversation:d}){const{agent:o,config:p}=e,u=e.status==="in_turn"||e.status==="in_flight";return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"ac-readHead",children:[s.jsxs("div",{className:"ac-crumb",children:[s.jsx("span",{className:"ac-crumbDim",children:n.slug}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsxs("span",{className:"ac-crumbAgent",children:["@",o.name]}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsx("span",{className:"ac-crumbFacet",children:q[a]})]}),s.jsxs("div",{className:"ac-readActions",children:[(a==="prompt"||a==="config")&&t&&p.editable?s.jsx("button",{type:"button",className:"ac-actPrimary",onClick:()=>t(o.id),children:"Edit"}):null,u&&i?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>i(o.id),children:"Interrupt"}):null,a==="context"&&m?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>m(o.id),children:"Reset"}):null,d?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>d(o.id),children:"Open ↗"}):null]})]}),s.jsxs("div",{className:"ac-metaStrip",children:[s.jsx(b,{k:"Type",v:Q(a)}),p.model?s.jsx(b,{k:"Model",v:p.model,mono:!0}):null,s.jsx(b,{k:"Editable",v:p.editable?"yes":"read-only"}),e.lastActivityAt?s.jsx(b,{k:"Active",v:C(e.lastActivityAt)}):null]}),s.jsxs("div",{className:"ac-readBody",children:[a==="prompt"?s.jsx(J,{entry:e}):null,a==="config"?s.jsx(X,{entry:e}):null,a==="conversations"?s.jsx(Z,{entry:e,onOpenConversation:d}):null,a==="context"?s.jsx(O,{entry:e}):null]})]})}function Q(n){switch(n){case"prompt":return"Markdown · system prompt";case"config":return"Runtime config";case"conversations":return"Conversation list";case"context":return"Live context window"}}function J({entry:n}){const{agent:e,config:a}=n,t=a.systemPrompt.trim()||a.templateHint||"default template",i=!a.systemPrompt.trim();return s.jsxs("div",{className:"ac-doc",children:[s.jsxs("div",{className:"ac-docHead",children:[s.jsx("span",{className:"ac-docKey",children:"name"}),s.jsx("span",{className:"ac-docVal",children:e.name}),e.role?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"role"}),s.jsx("span",{className:"ac-docVal",children:R(e.role)??e.role})]}):null,s.jsx("span",{className:"ac-docKey",children:"harness"}),s.jsx("span",{className:"ac-docVal",children:w(e.harness)}),a.model?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"model"}),s.jsx("span",{className:"ac-docVal",children:a.model})]}):null]}),s.jsx("div",{className:"ac-docLabel",children:i?"Default template":"System prompt"}),s.jsx("pre",{className:"ac-prose","data-default":i||void 0,children:t})]})}function X({entry:n}){const{agent:e,config:a}=n;return s.jsxs("div",{className:"ac-config",children:[s.jsxs(N,{k:"Harness",children:[s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:e.harness,size:12})}),w(e.harness)]}),s.jsx(N,{k:"Model",children:a.model??"—"}),s.jsx(N,{k:"Permissions",children:a.permission??"default"}),s.jsx(N,{k:"Transport",children:a.runtime.transport}),s.jsx(N,{k:"Workdir",mono:!0,title:a.runtime.cwd,children:U(a.runtime.cwd)||a.runtime.cwd}),s.jsx(N,{k:"Session",mono:!0,children:a.runtime.sessionId}),a.launchArgs.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Launch"}),s.jsxs("pre",{className:"ac-cmd",children:[a.runtime.harness," ",a.launchArgs.join(" ")]})]}):null,a.capabilities.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Capabilities"}),s.jsx("div",{className:"ac-chips",children:a.capabilities.map(t=>s.jsx("span",{className:"ac-chip",children:t},t))})]}):null]})}function Z({entry:n,onOpenConversation:e}){return n.sessions.length?s.jsx("div",{className:"ac-convos",children:n.sessions.map(a=>s.jsxs("button",{type:"button",className:"ac-convo",disabled:!e,onClick:()=>e?.(n.agent.id,a.id),children:[s.jsx("span",{className:"ac-convoDot","aria-hidden":!0}),s.jsxs("span",{className:"ac-convoBody",children:[s.jsx("span",{className:"ac-convoTitle",children:a.title||a.preview||"Conversation"}),a.preview&&a.title?s.jsx("span",{className:"ac-convoPreview",children:a.preview}):null,s.jsxs("span",{className:"ac-convoMeta",children:[a.currentBranch?s.jsx("span",{className:"ac-convoBranch",children:a.currentBranch}):null,s.jsxs("span",{children:[a.messageCount," msgs"]}),a.lastMessageAt?s.jsx("span",{children:C(a.lastMessageAt)}):null]})]})]},a.id))}):s.jsx("div",{className:"ac-empty",children:"No conversations yet."})}function O({entry:n}){const e=n.context;if(!e)return s.jsx("div",{className:"ac-empty",children:"No live context — agent is not in an active session."});const a=e.usedPercent!=null?Math.round(e.usedPercent):null;return s.jsxs("div",{className:"ac-ctx",children:[s.jsxs("div",{className:"ac-ctxTop",children:[s.jsx("span",{className:"ac-ctxState","data-state":e.state,children:e.state}),s.jsxs("span",{className:"ac-ctxTurns",children:[e.turnCount," turns"]})]}),a!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ac-ctxGauge",children:s.jsx("span",{className:"ac-ctxFill",style:{width:`${Math.min(100,a)}%`}})}),s.jsxs("div",{className:"ac-ctxRead",children:[s.jsxs("span",{className:"ac-ctxNum",children:[a,"%"]}),s.jsx("span",{className:"ac-ctxDim",children:"of context window used"})]})]}):null,e.contextInputTokens!=null&&e.contextWindowTokens!=null?s.jsxs("div",{className:"ac-ctxTokens",children:[e.contextInputTokens.toLocaleString()," / ",e.contextWindowTokens.toLocaleString()," ","tokens"]}):null]})}function ss({entry:n,onOpenConversation:e}){const{agent:a,config:t}=n,i=K(n),m=a.ownerName||a.ownerHandle||null;return s.jsxs("div",{className:"ac-railInner",children:[s.jsxs("div",{className:"ac-railIdent",children:[s.jsx("span",{className:"ac-railAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:a.name,harness:a.harness,state:a.state},placement:"inspector"})}),s.jsxs("div",{className:"ac-railNames",children:[s.jsxs("div",{className:"ac-railName",children:["@",a.name]}),a.role?s.jsx("div",{className:"ac-railRole",children:R(a.role)??a.role}):null]})]}),s.jsxs("div",{className:"ac-railState","data-tone":i==="idle"?void 0:i,children:[i!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":i,"aria-hidden":!0}):null,s.jsx("span",{children:n.needsYou?"Needs you":P(a.state)})]}),n.activeTask?s.jsx("div",{className:"ac-railTask",children:n.activeTask}):null,s.jsxs("div",{className:"ac-railGroup",children:[s.jsx(x,{k:"Harness",v:w(a.harness),mark:a.harness}),s.jsx(x,{k:"Model",v:t.model??"—"}),m?s.jsx(x,{k:"Owner",v:m}):null,a.branch?s.jsx(x,{k:"Branch",v:a.branch,mono:!0}):null,s.jsx(x,{k:"State",v:P(a.state)}),a.updatedAt?s.jsx(x,{k:"Updated",v:C(a.updatedAt)}):null,s.jsx(x,{k:"Sessions",v:String(n.sessions.length)})]}),t.permission?s.jsxs("div",{className:"ac-railSub",children:[s.jsx("div",{className:"ac-railSubHead",children:"Permissions"}),s.jsx("span",{className:"ac-chip",children:t.permission})]}):null,t.capabilities.length?s.jsxs("div",{className:"ac-railSub",children:[s.jsxs("div",{className:"ac-railSubHead",children:["Capabilities · ",t.capabilities.length]}),s.jsx("div",{className:"ac-chips",children:t.capabilities.map(d=>s.jsx("span",{className:"ac-chip",children:d},d))})]}):null,a.conversationId&&e?s.jsx("button",{type:"button",className:"ac-railOpen",onClick:()=>e(a.id),children:"Open conversation →"}):null]})}function b({k:n,v:e,mono:a}){return s.jsxs("span",{className:"ac-metaItem",children:[s.jsx("span",{className:"ac-metaKey",children:n}),s.jsx("span",{className:"ac-metaVal","data-mono":a||void 0,children:e})]})}function N({k:n,children:e,mono:a,title:t}){return s.jsxs("div",{className:"ac-configRow",children:[s.jsx("span",{className:"ac-configKey",children:n}),s.jsx("span",{className:"ac-configVal","data-mono":a||void 0,title:t,children:e})]})}function x({k:n,v:e,mono:a,mark:t}){return s.jsxs("div",{className:"ac-railFact",children:[s.jsx("span",{className:"ac-railFactKey",children:n}),s.jsxs("span",{className:"ac-railFactVal","data-mono":a||void 0,children:[t?s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:t,size:11})}):null,e]})]})}export{rs as AgentsConsole};
@@ -1 +0,0 @@
1
- import{j as e,r as d}from"./index-DMiGbrBt.js";import{p as v,a as b}from"./api-h5zurxmi.js";import{u as Q,e as Z}from"./Provider-C7UKGHQy.js";import{l as ee,b as te}from"./router-Bq5dwf78.js";import{u as se}from"./sse-CjIkKo46.js";import{o as oe,i as D}from"./surface-activity-B1rgWB1i.js";/* empty css */import{AgentsSubnav as ne}from"./AgentsSubnav-DIEO4NPx.js";import{AgentsLibrary as ie}from"./library-D-RxGiCw.js";import{r as re,d as ae}from"./model-Co0zkMIc.js";import{AgentDetailWithRail as de,AgentProfileBar as le}from"./profile-CVRziEDA.js";/* empty css *//* empty css *//* empty css */import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./conversation-model-B47vYmWN.js";import"./time-DltNTpLl.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./terminal-sessions-D5CIR2OL.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-B3-nh5dM.js";import"./secondaryNavConfig-DqUIp0Es.js";import"./message-square-DSaGpjFU.js";import"./terminal-B9AOZQKR.js";import"./scroll-text-D6Pdnar7.js";/* empty css */import"./SpriteAvatar-DyaGuhik.js";import"./AgentSessions-DyqOf4nG.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./text-DsBWV_4k.js";import"./agents-project-model-UYiamtrU.js";import"./AgentAvatar-D90c1Rzk.js";import"./context-budget-CbB4BDcO.js";import"./session-catalog-BmoyVTJ_.js";import"./terminal-relay-CWbJ1RCW.js";import"./BackToPicker-BRvfostO.js";import"./ConversationScreen-BDRhx-RU.js";import"./ConversationComposer-Bla3DDvM.js";import"./message-markup-3J9pi3nx.js";import"./mentions-jSuTGeet.js";import"./AgentDetailCard-BcRBRp88.js";import"./AgentLiveActions-DBtnD0qE.js";import"./terminal-takeover-B8UeD9OX.js";import"./eye-0PvebX_a.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-DE3FC0m-.js";import"./ConversationFeedRows-B_gPxcqA.js";import"./ConversationPanels-DLek4H6A.js";import"./use-reduced-motion-RRBkmVkk.js";import"./activity-CA8qS6PI.js";import"./message-circle-CG-96zts.js";import"./tail-display-BdyoLvzY.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-D19uAGe3.js";import"./ConversationStatus-BwVLiiO4.js";import"./conversation-icons-IIG5ha6D.js";import"./SessionObserve-yfXFafp8.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bla0gBdm.js";import"./lane-observe-D0rfKDnU.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-DyUeV98H.js";import"./ObserveTextFlow-rsFj_rVo.js";import"./wrench-Bkc_0lKF.js";import"./external-link-CXBytO9o.js";import"./AgentDefinitionsWorkspace-CUpUrY57.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CLgUhSm4.js";/* empty css */import"./agent-essentials-BSY1o46q.js";const K=new Set(["0","false","off","no","clear","none"]),ce=new Set(["1","true","on","yes"]),ue=new Set(["localhost","127.0.0.1","::1"]);function me(t){return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}function L(t){const o=t?.trim().toLowerCase();return o==="before"||o==="after"?o:null}function z(t){if(!t)return null;const o=t.trim().toLowerCase();return ce.has(o)?!0:K.has(o)?!1:null}function M(t,o,i=[]){const r=z(t);if(r!==null)return r;if(!t)return null;const l=o.toLowerCase(),a=new Set([l,l.replace(/-/g,""),...i.map(n=>n.trim().toLowerCase()).filter(Boolean)]),s=t.split(",").map(n=>n.trim().toLowerCase()).filter(Boolean);return s.some(n=>K.has(n))?!1:s.some(n=>a.has(n))?!0:null}function pe({studyId:t,aliases:o,href:i,storedEnabled:r,storedMode:l,dev:a,defaultMode:s="after"}){const n=i?new URL(i,"http://localhost"):null,p=M(n?.searchParams.get("studio"),t,o)??M(n?.searchParams.get(`studio.${t}`),t,o)??M(n?.searchParams.get("studioInjection"),t,o),c=n?ue.has(me(n.hostname)):!1;if(!a&&!c)return{enabled:!1,mode:s};const m=p??z(r)??!1,g=L(n?.searchParams.get("studioMode"))??L(n?.searchParams.get(`studioMode.${t}`))??L(l)??s;return{enabled:m,mode:g}}const he="openscout.studio.inject.",fe="openscout.studio.mode.";function O(t){return`${he}${t}`}function T(t){return`${fe}${t}`}function $(t){if(typeof window>"u")return null;try{return window.localStorage.getItem(t)}catch{return null}}function I(t,o){if(!(typeof window>"u"))try{window.localStorage.setItem(t,o)}catch{}}function ge(){return import.meta.env?.DEV===!0}function je(t){return t==="before"?"after":"before"}function xe(t){typeof window>"u"||ee({searchPatch:{studio:null,[`studio.${t}`]:null,studioInjection:null,studioMode:null,[`studioMode.${t}`]:null},replace:!0})}function ve(t,o=[]){const[i,r]=d.useState(()=>pe({studyId:t,aliases:o,href:typeof window>"u"?void 0:window.location.href,storedEnabled:$(O(t)),storedMode:$(T(t)),dev:ge()})),[l,a]=d.useState(!1);d.useEffect(()=>{if(!i.enabled){a(!1);return}const c=j=>{j.altKey&&a(!0)},m=j=>{j.altKey||a(!1)},g=()=>a(!1);return window.addEventListener("keydown",c),window.addEventListener("keyup",m),window.addEventListener("blur",g),()=>{window.removeEventListener("keydown",c),window.removeEventListener("keyup",m),window.removeEventListener("blur",g)}},[i.enabled]);const s=d.useCallback(c=>{I(O(t),c?"1":"0"),r(m=>({...m,enabled:c}))},[t]),n=d.useCallback(c=>{I(T(t),c),r(m=>({...m,mode:c}))},[t]),p=l?je(i.mode):i.mode;return d.useMemo(()=>({...i,renderedMode:p,peeking:p!==i.mode,setEnabled:s,setMode:n}),[p,s,n,i])}function Se({studyId:t,aliases:o,anchor:i,title:r,children:l,renderStudy:a}){const s=ve(t,o);return s.enabled?e.jsxs("div",{className:"s-studio-injection","data-studio-anchor":i,children:[e.jsxs("div",{className:"s-studio-injection-bar",children:[e.jsxs("div",{className:"s-studio-injection-label",children:[e.jsx("span",{className:"s-studio-injection-kicker",children:"Studio injection"}),e.jsx("span",{className:"s-studio-injection-title",children:r}),e.jsx("span",{className:"s-studio-injection-anchor",children:i})]}),e.jsxs("div",{className:"s-studio-injection-controls",role:"group","aria-label":`${r} mode`,children:[e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="before","aria-pressed":s.mode==="before",onClick:()=>s.setMode("before"),children:"Before"}),e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="after","aria-pressed":s.mode==="after",onClick:()=>s.setMode("after"),children:"After"})]}),e.jsx("span",{className:"s-studio-injection-state",children:s.peeking?`Option: ${s.renderedMode}`:s.renderedMode}),e.jsx("button",{type:"button",className:"s-studio-injection-close",onClick:()=>{xe(t),s.setEnabled(!1)},children:"Close"})]}),e.jsx("div",{className:"s-studio-injection-body","data-studio-mode":s.renderedMode,children:s.renderedMode==="before"?l:a()})]}):e.jsx(e.Fragment,{children:l})}const N=[{id:"openscout",title:"openscout",root:"~/dev/openscout",signal:"Studio mode injection for agent directory",sessions:9,agents:[{id:"hudson",name:"Hudson",handle:"@hudson",state:"working",role:"web design system",branch:"feat/studio-mode",task:"Refactoring the agent directory into insertion points",last:"18s"},{id:"scout",name:"Scout",handle:"@scout",state:"attention",role:"operator assistant",branch:"main",task:"Needs placement decision",last:"1m"},{id:"quill",name:"Quill",handle:"@quill",state:"ready",role:"docs",branch:"docs/agent-view",task:"Ready to write the study summary",last:"7m"}]},{id:"hudson",title:"hudson",root:"~/dev/hudson",signal:"Slot contracts and chrome primitives",sessions:4,agents:[{id:"atlas",name:"Atlas",handle:"@atlas",state:"working",role:"framework",branch:"slots/studio-anchor",task:"Mapping chrome slots to page anchors",last:"3m"},{id:"mira",name:"Mira",handle:"@mira",state:"ready",role:"qa",branch:"main",task:"Idle",last:"12m"}]},{id:"lattices",title:"lattices",root:"~/dev/lattices",signal:"macOS web view parity pass",sessions:2,agents:[{id:"north",name:"North",handle:"@north",state:"offline",role:"native",branch:"main",task:"No active session",last:"1h"}]}],we={working:"working",ready:"ready",attention:"attention",offline:"offline"};function ye({children:t}){return e.jsx(Se,{studyId:"agent-directory",aliases:["agents","agent","agent-directory-before-after"],anchor:"agents.directory",title:"Agent Directory",renderStudy:()=>e.jsx(be,{}),children:t})}function be(){const t=N.flatMap(s=>s.agents),o=t.filter(s=>s.state==="working"),i=t.filter(s=>s.state==="ready"),r=t.filter(s=>s.state==="attention"),l=N.reduce((s,n)=>s+n.sessions,0),a=o[0]??t[0];return e.jsxs("section",{className:"s-agent-studio-study","aria-label":"Agent directory injected study",children:[e.jsxs("div",{className:"s-agent-studio-banner",children:[e.jsx("span",{children:"After study"}),e.jsx("strong",{children:"Injected static view inside the live Agents route"}),e.jsx("em",{children:"Fixture data · insertion-point prototype · no backend writes"})]}),e.jsxs("header",{className:"s-agent-studio-head","data-studio-anchor":"agent.directory.header",children:[e.jsxs("div",{className:"s-agent-studio-title-block",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Studio / agents.directory / after"}),e.jsx("h1",{className:"s-agent-studio-title",children:"Project command center"}),e.jsxs("span",{className:"s-agent-studio-subtitle",children:[t.length," agents across ",N.length," projects"]})]}),e.jsxs("div",{className:"s-agent-studio-metrics","aria-label":"Agent study summary",children:[e.jsx(A,{label:"working",value:o.length,tone:"working"}),e.jsx(A,{label:"ready",value:i.length}),e.jsx(A,{label:"attention",value:r.length,tone:"attention"}),e.jsx(A,{label:"sessions",value:l})]})]}),e.jsxs("div",{className:"s-agent-studio-layout",children:[e.jsxs("div",{className:"s-agent-studio-main",children:[e.jsxs("section",{className:"s-agent-studio-pressure","data-studio-anchor":"agent.active-strip",children:[e.jsxs("div",{className:"s-agent-studio-section-head",children:[e.jsx("span",{children:"Pressure queue"}),e.jsx("strong",{children:o.length+r.length})]}),e.jsx("div",{className:"s-agent-studio-pressure-list",children:[...o,...r].map(s=>e.jsxs("article",{className:`s-agent-studio-pressure-card s-agent-studio-pressure-card--${s.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":s.state}),e.jsxs("div",{className:"s-agent-studio-pressure-copy",children:[e.jsx("strong",{children:s.name}),e.jsx("span",{children:s.task})]}),e.jsx("time",{children:s.last})]},s.id))})]}),e.jsx("section",{className:"s-agent-studio-projects","data-studio-anchor":"agent.project-board",children:N.map(s=>e.jsxs("article",{className:"s-agent-studio-project",children:[e.jsxs("div",{className:"s-agent-studio-project-main",children:[e.jsxs("div",{children:[e.jsx("span",{className:"s-agent-studio-project-root",children:s.root}),e.jsx("h2",{children:s.title})]}),e.jsxs("span",{className:"s-agent-studio-project-sessions",children:[s.sessions," sessions"]})]}),e.jsx("p",{children:s.signal}),e.jsx("div",{className:"s-agent-studio-agent-row",children:s.agents.map(n=>e.jsxs("span",{className:`s-agent-studio-agent-pill s-agent-studio-agent-pill--${n.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":n.state}),n.name]},n.id))})]},s.id))})]}),e.jsxs("aside",{className:"s-agent-studio-detail","data-studio-anchor":"agent.detail-preview",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Pinned agent"}),e.jsx("h2",{children:a.name}),e.jsx("span",{className:`s-agent-studio-state s-agent-studio-state--${a.state}`,children:we[a.state]}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Handle"}),e.jsx("dd",{children:a.handle})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Role"}),e.jsx("dd",{children:a.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Branch"}),e.jsx("dd",{children:a.branch})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Current task"}),e.jsx("dd",{children:a.task})]})]})]})]})]})}function A({label:t,value:o,tone:i}){return e.jsxs("div",{className:`s-agent-studio-metric${i?` s-agent-studio-metric--${i}`:""}`,children:[e.jsx("strong",{children:o}),e.jsx("span",{children:t})]})}const P="/api/conversations",H="/api/fleet",F="/api/tail/discover",U="/api/topology/snapshot?force=1",S=3e4;function hs({navigate:t,selectedAgentId:o,conversationId:i,tab:r,activeRoute:l}){const{agents:a,agentsLoaded:s,route:n}=Q(),[p,c]=d.useState(()=>v(P,S)??[]),[m,g]=d.useState(()=>v(H,S)),[j,G]=d.useState(()=>v(F,S)),[q,W]=d.useState(()=>v(U,S)),[X,Y]=d.useState(()=>v(P,S)===null),R=te(n),k=d.useMemo(()=>Z(a,R),[a,R]),x=d.useCallback(async()=>{const[h,f,y,C]=await Promise.allSettled([b(P),b(H),b(F),b(U)]);h.status==="fulfilled"&&c(h.value),f.status==="fulfilled"&&g(f.value),y.status==="fulfilled"&&G(y.value),C.status==="fulfilled"&&W(C.value),Y(!1)},[]);d.useEffect(()=>{x()},[x]),d.useEffect(()=>{const h=()=>{D()&&x()},f=window.setInterval(h,1e4),y=oe(h);return()=>{window.clearInterval(f),y()}},[x]),se(()=>{D()&&x()});const u=re(k,o),_=!!(o&&u&&u.id!==o),w=n.view==="agents-v2"?n.projectSlug:void 0,E=!!(w&&!r),{conversationByAgentId:B,sessionByAgentId:J}=ae(p);if(d.useEffect(()=>{!o||!u||!_||t({view:"agents-v2",agentId:u.id,...E&&w?{projectSlug:w}:{},...i?{conversationId:i}:{},...r?{tab:r}:{}})},[i,r,E,t,w,u,o,_]),u&&!E){const h=i??B.get(u.id)??u.conversationId??null,f=r??(i?"message":"profile");return e.jsx(V,{activeRoute:l??n,navigate:t,bar:e.jsx(le,{agent:u,conversationId:h,activeTab:f,navigate:t}),children:e.jsx(de,{agent:u,allAgents:k,conversationId:h,navigate:t,activeTab:f})})}return e.jsx(V,{activeRoute:l??n,navigate:t,children:e.jsx(ye,{children:e.jsx(ie,{agents:k,fleet:m,sessionByAgentId:J,conversationByAgentId:B,sessions:p,discovery:j,topologySnapshot:q,loading:!s||X,navigate:t,selectedAgentId:u?.id??o})})})}function V({activeRoute:t,children:o,navigate:i,bar:r}){return e.jsxs("div",{className:"s-secondary-nav-shell",children:[e.jsx("div",{className:"s-secondary-nav-bar",children:r??e.jsx(ne,{activeRoute:t,navigate:i})}),e.jsx("div",{className:"s-secondary-nav-body",children:o})]})}export{hs as AgentsScreen};
@@ -1 +0,0 @@
1
- import{j as t}from"./index-DMiGbrBt.js";import{S as i}from"./SecondaryNav-B3-nh5dM.js";import{A as m}from"./secondaryNavConfig-DqUIp0Es.js";import"./createLucideIcon-OpA4Amw5.js";import"./message-square-DSaGpjFU.js";import"./file-text-BODxCjcz.js";import"./search-CWfZtOt2.js";import"./terminal-B9AOZQKR.js";import"./code-xml-B6jOCM4V.js";import"./scroll-text-D6Pdnar7.js";function N({activeRoute:r,navigate:o}){return t.jsx(i,{ariaLabel:"Agents sections",activeRoute:r,groups:m,navigate:o})}export{N as AgentsSubnav};
@@ -1 +0,0 @@
1
- import{r as k,j as s}from"./index-DMiGbrBt.js";import{e as d,f as B,g as p}from"./router-Bq5dwf78.js";function m(t){switch(t.view){case"mesh":return"Back to mesh";case"ops":return"Back to ops";case"agents-v2":return t.agentId?"Registry":"All agents";case"messages":return"Back to conversations";case"conversation":return"Back to conversation";case"inbox":return"Back to inbox";case"sessions":return"Back to sessions";case"terminal":return"Terminal Control";case"work":return"Back to work";case"broker":return"Back to broker";case"activity":return"Back to activity";default:return"Back"}}function w({slot:t,fallback:n,navigate:c,className:r,label:i}){const e=d(),o=k.useMemo(()=>B(e.state),[e.state]),a=o??n,u=i??m(a),l=p(e.state)&&!!o;return s.jsxs("button",{type:"button",className:`s-back-pill${r?` ${r}`:""}`,onClick:()=>{if(l&&typeof window<"u"&&window.history.length>1){window.history.back();return}c(a)},children:[s.jsx("span",{"aria-hidden":!0,className:"s-back-pill-glyph",children:"←"}),s.jsx("span",{children:u})]})}export{w as B};
@@ -1 +0,0 @@
1
- import{r as o,j as a}from"./index-DMiGbrBt.js";import{f as E}from"./cache-Dr0why2k.js";import{u as k,f as F,l as I,L as N,D as _}from"./usePierreRuntime-wC-yMtBb.js";/* empty css */const D=["unstaged","staged","branch"];function L(n){if(!n.startsWith("/"))return null;const t=[];for(const e of n.split("/"))if(!(!e||e==="."))if(e===".."){if(t.length===0)return null;t.pop()}else t.push(e);return t}function R(n,t){const e=L(n),s=L(t);return!e||!s||s.length<=e.length||e.some((c,d)=>s[d]!==c)?null:s.slice(e.length).join("/")}function y(n,t){return n.files.findIndex(e=>e.newPath===t||e.oldPath===t)}function A(n,t){return n.find(e=>y(e,t)>=0)?.kind??null}const K=()=>{},M=()=>{};function T({root:n,file:t}){const e=o.useMemo(()=>R(n,t),[t,n]),[s,c]=o.useState(null),[d,u]=o.useState("loading"),[P,m]=o.useState(null),[S,h]=o.useState(null),{pierre:j,pierrePhase:v,pierreError:C,retryPierre:b}=k(s);o.useEffect(()=>{let r=!1;if(c(null),u("loading"),m(null),h(null),!e){u("ready");return}return E(n,D,{files:[e],tier:"patch"}).then(l=>{r||(c(l.snapshot),h(A(l.snapshot.layers,e)),u("ready"))},l=>{r||(m(l instanceof Error?l.message:String(l)),u("error"))}),()=>{r=!0}},[e,n]);const f=o.useMemo(()=>e?s?.layers.filter(r=>y(r,e)>=0)??[]:[],[e,s]),i=f.find(r=>r.kind===S)??f[0]??null,p=i&&e?y(i,e):-1,g=i&&p>=0?F(i.files[p],p):null;return d==="loading"?a.jsx("div",{className:"s-code-empty",children:"Loading file changes…"}):d==="error"?a.jsx("div",{className:"s-code-empty",children:P??"Couldn’t load this file’s changes."}):!s||!i||!g?a.jsx("div",{className:"s-code-empty",children:"No tracked patch is available. The file is clean, or it is untracked and has no Git baseline yet."}):a.jsxs("div",{className:"s-code-diff",children:[f.length>1?a.jsx("div",{className:"s-code-diffLayers",role:"tablist","aria-label":"Change layer",children:f.map(r=>{const l=I(r),x=r.kind===i.kind;return a.jsxs("button",{type:"button",role:"tab","aria-selected":x,className:"s-code-diffLayer","data-selected":x||void 0,onClick:()=>h(r.kind),children:[N[r.kind],a.jsxs("span",{children:["+",l.add," −",l.del]})]},r.kind)})}):null,a.jsx(_,{layer:i,patchLayer:i,patchPhase:"ready",patchError:null,selectedFileKey:g,renderKey:s.render.renderKey,theme:s.render.preferredTheme,layout:"split",pierre:j,pierrePhase:v,pierreError:C,onRetryPierre:b,onIncludeLineContext:K,onIncludeSelectionContext:M,contextActions:!1})]})}const B=Object.freeze(Object.defineProperty({__proto__:null,CodeDiffPane:T},Symbol.toStringTag,{value:"Module"}));export{T as C,B as a,R as r};
@@ -1 +0,0 @@
1
- import{r,j as i}from"./index-DMiGbrBt.js";import{a as te}from"./api-h5zurxmi.js";import{c as pe}from"./clipboard-e3fSpeo7.js";import{f as Ie}from"./scoutbot-BTIErYHo.js";import{g as Be,f as he}from"./api-BkjHJfgJ.js";import{d as Pe}from"./types-B0PlfpKc.js";import{r as We,C as _e}from"./CodeDiffPane-DDPt6KPh.js";import{r as Ue,a as ze,w as Ae,b as Oe,f as me,C as He,s as Ke}from"./CodeProjectPicker-DqKFCpLU.js";import{ShikiPane as qe}from"./ShikiPane-Ap1iPxYb.js";/* empty css */import{A as Ge}from"./arrow-left-DEZzHiPS.js";import{C as Ve}from"./chevron-right-XiIHsk4m.js";import{C as Xe}from"./check-DjgFiBxb.js";import{C as Je}from"./copy-CQGYbxdu.js";import"./cache-Dr0why2k.js";import"./usePierreRuntime-wC-yMtBb.js";/* empty css */import"./chevron-down-BGk5qoEw.js";import"./createLucideIcon-OpA4Amw5.js";import"./search-CWfZtOt2.js";const Qe=new Set(["node_modules",".git","dist",".next",".build","DerivedData","__pycache__",".venv","target"]);function ke(n){const l=n.lastIndexOf("/");return l>0?n.slice(0,l):"/"}function ne(n){const l=n.lastIndexOf("/");return l>=0?n.slice(l+1):n}function z(n){return n<1024?`${n} B`:n<1024*1024?`${(n/1024).toFixed(1)} KB`:`${(n/(1024*1024)).toFixed(1)} MB`}function b(n){return n.toLowerCase().replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Ye(n,l,m){const k=b(l),f=n.projects.find(d=>b(d.name)===k||b(ne(d.root))===k);if(!f)return null;const w=m?f.worktrees.find(d=>d.name===m||d.branch.name===m||b(d.name)===b(m)):f.worktrees[0];return{projectName:f.name,root:w?.path??f.root}}function ve(n,l){if(!l.startsWith(`${n}/`))return[];const m=l.slice(n.length+1).split("/"),k=[];let f=n;for(const w of m.slice(0,-1))f=`${f}/${w}`,k.push(f);return k}function Ze(n){switch(n){case"untracked":return"U";case"conflicted":return"C";case"staged":return"S";case"unstaged":return"M";case"staged+unstaged":return"SM";default:return n.charAt(0).toUpperCase()}}function je(n,l,m,k,f){const w=m.get(n);if(!w){f.push({path:`${n}#loading`,name:"Loading…",kind:"file",depth:l,loading:!0});return}for(const d of w)d.kind==="directory"&&Qe.has(d.name)||(f.push({path:d.path,name:d.name,kind:d.kind,depth:l}),d.kind==="directory"&&k.has(d.path)&&je(d.path,l+1,m,k,f))}function wt({route:n,navigate:l,root:m,file:k,project:f,path:w,wt:d,line:we,endLine:Ce,returnConversationId:xe,embedded:A=!1}){const $=m??n?.root??null,M=k??n?.file??null,C=f??n?.project??null,O=w??n?.path??null,se=d??n?.wt??null,g=we??n?.line,x=Ce??n?.endLine,j=xe??n?.returnConversationId??null,[p,re]=r.useState(()=>Be()),[s,H]=r.useState(()=>$??(C?null:Ue())),[S,K]=r.useState(()=>new Map),[y,D]=r.useState(()=>new Set),[ie,q]=r.useState(null),[a,T]=r.useState(M),[c,I]=r.useState(null),[Se,G]=r.useState(!1),[oe,B]=r.useState(null),[ae,V]=r.useState("idle"),[R,X]=r.useState("source"),[h,J]=r.useState(()=>g&&g>0?{line:g,...x&&x>=g?{endLine:x}:{}}:null);r.useEffect(()=>{J(g&&g>0?{line:g,...x&&x>=g?{endLine:x}:{}}:null)},[x,g]),r.useEffect(()=>{if(p)return;let e=!1;return he("quick",!1,2e4).then(t=>{e||re(t)}).catch(()=>{}),()=>{e=!0}},[p]);const L=r.useCallback(async e=>{try{const t=await te(`/api/file/preview?path=${encodeURIComponent(e)}`);if(t.kind!=="directory")return;const o=t.entries.map(u=>({name:u.name,path:u.path,kind:u.kind}));K(u=>new Map(u).set(e,o))}catch(t){q(t instanceof Error?t.message:String(t))}},[]),N=r.useCallback((e,t)=>{if(!t)return;const o=ve(e,t);if(o.length!==0){D(u=>new Set([...u,...o]));for(const u of o)L(u)}},[L]);r.useEffect(()=>{if(!C||!p)return;const e=Ye(p,C,se);if(!e){q(`No project matching "${C}".`);return}const t=O?`${e.root}/${O}`:null;H(e.root),T(t),N(e.root,t)},[C,O,se,p,N]),r.useEffect(()=>{if(s||C||!p)return;const e=p.projects[0];e&&H(e.worktrees[0]?.path??e.root)},[s,C,p]);const ce=r.useRef(a);ce.current=a,r.useEffect(()=>{if(!s)return;q(null);const e=ze(s),t=ce.current,o=t?ve(s,t):[];e?(K(new Map(Object.entries(e.entries))),D(new Set([...e.expanded,...o])),!t&&e.selectedFile&&T(e.selectedFile)):(K(new Map),D(new Set(o)));const u=new Set([s,...e?.expanded??[],...o]);for(const ee of u)L(ee);he("quick",!1,2e4).then(re).catch(()=>{})},[s,L]),r.useEffect(()=>{!s||S.size===0||(Ae(s,{entries:S,expanded:y,selectedFile:a}),Oe(s))},[s,S,y,a]),r.useEffect(()=>{!$||!M||N($,M)},[$,M,N]);const Q=r.useRef(new Map),Y=r.useRef(new Set),be=3e4,P=r.useCallback(e=>{const t=Q.current.get(e);return t?Date.now()-t.at>be?(Q.current.delete(e),null):t.preview:null},[]),W=r.useCallback((e,t)=>{const o=Q.current;if(o.set(e,{at:Date.now(),preview:t}),o.size>80){const u=o.keys().next().value;u&&o.delete(u)}},[]),ye=r.useCallback(e=>{P(e)||Y.current.has(e)||(Y.current.add(e),te(`/api/file/preview?path=${encodeURIComponent(e)}`).then(t=>W(e,t)).catch(()=>{}).finally(()=>Y.current.delete(e)))},[P,W]);r.useEffect(()=>{if(V("idle"),!a){I(null),B(null);return}const e=P(a);if(e){I(e.kind==="file"?e:null),B(null),G(!1);return}let t=!1;return G(!0),B(null),te(`/api/file/preview?path=${encodeURIComponent(a)}`).then(o=>{t||(W(a,o),I(o.kind==="file"?o:null))}).catch(o=>{t||(I(null),B(o instanceof Error?o.message:String(o)))}).finally(()=>{t||G(!1)}),()=>{t=!0}},[a,P,W]);const Le=r.useMemo(()=>{if(!s)return[];const e=[];return je(s,0,S,y,e),e},[s,S,y]),le=r.useCallback((e,t)=>{const o=j?{returnConversationId:j}:{};if(p){for(const u of p.projects)for(const[ee,ue]of u.worktrees.entries())if(ue.path===e){const fe=t&&t.startsWith(`${e}/`)?t.slice(e.length+1):void 0;return{view:"code",project:b(u.name),...fe?{path:fe}:{},...ee>0?{wt:ue.name}:{},...o}}}return{view:"code",root:e,...t?{file:t}:{},...o}},[j,p]),Z=r.useCallback(()=>{if(!j)return;const e={view:"conversation",conversationId:j};Ie({type:"navigate",route:e})||l?.(e)},[l,j]);r.useEffect(()=>{if(!j)return;const e=t=>{if(!(!t.metaKey||t.key!=="[")){if(t.target instanceof HTMLElement){const o=t.target.tagName;if(o==="INPUT"||o==="TEXTAREA"||t.target.isContentEditable)return}t.preventDefault(),Z()}};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[j,Z]);const _=r.useCallback((e,t)=>{A||!l||l(le(e,t))},[A,l,le]),Ne=r.useCallback(e=>{D(t=>{const o=new Set(t);return o.has(e)?o.delete(e):o.add(e),o}),S.has(e)||L(e)},[S,L]),Ee=r.useCallback(e=>{J(null),T(e),s&&_(s,e)},[s,_]),v=r.useMemo(()=>{if(!p||!s)return null;for(const e of p.projects)for(const t of e.worktrees)if(t.path===s)return{project:e,worktree:t};return null},[p,s]),E=r.useMemo(()=>{const e=new Map;if(!s||!v)return e;for(const t of v.worktree.status.files)e.set(`${s}/${t.path}`,t.status);return e},[s,v]),Re=r.useMemo(()=>{const e=new Set;if(!s)return e;for(const t of E.keys()){let o=ke(t);for(;o.startsWith(s)&&(e.add(o),o!==s);)o=ke(o)}return e},[s,E]),U=!!(s&&a&&We(s,a));r.useEffect(()=>{U||X("source")},[U]);const Fe=a&&s&&a.startsWith(`${s}/`)?a.slice(s.length+1):c?.kind==="file"?c.title:a?ne(a):null,$e=r.useCallback(async()=>{if(!c||c.kind!=="file"||!c.previewable)return;await pe(c.content)&&(V("copied"),window.setTimeout(()=>V("idle"),1500))},[c]),[Me,de]=r.useState("idle"),F=r.useMemo(()=>{if(!s)return null;if(v){const e=a&&a.startsWith(`${s}/`)?a.slice(s.length+1):void 0,t=v.project.worktrees[0]?.path;return me({project:b(v.project.name),...e?{path:e}:{},...t&&t!==s?{wt:v.worktree.name}:{},...h?.line?{line:h.line}:{},...h?.endLine?{endLine:h.endLine}:{}})}return me({...a?{file:a}:{root:s},...h?.line?{line:h.line}:{},...h?.endLine?{endLine:h.endLine}:{}})},[s,a,v,h]),De=r.useCallback(async()=>{if(!F)return;await pe(F)&&(de("copied"),window.setTimeout(()=>de("idle"),1500))},[F]),Te=r.useCallback(e=>{J(e.line&&e.line>0?{line:e.line,...e.endLine&&e.endLine>=e.line?{endLine:e.endLine}:{}}:null),T(e.file??null),H(e.root),e.file&&N(e.root,e.file),_(e.root,e.file??null)},[N,_]);return i.jsxs("div",{className:"s-code-screen","data-embedded":A||void 0,children:[i.jsxs("div",{className:"s-code-head",children:[j?i.jsxs("button",{type:"button",className:"s-code-returnThread",onClick:Z,title:"Back to thread (⌘[)",children:[i.jsx(Ge,{size:13,strokeWidth:1.9,"aria-hidden":!0}),i.jsx("span",{children:"Back to thread"})]}):null,i.jsx(He,{snapshot:p,root:s,onSelect:Te}),v?.worktree.diff.branchShortstat?i.jsx("span",{className:"s-code-headStat",children:v.worktree.diff.branchShortstat}):null,s?i.jsx("span",{className:"s-code-headPath",title:s,children:Ke(s)}):null,F?i.jsx("button",{type:"button",className:"s-code-copyLink",title:F,onClick:()=>{De()},children:Me==="copied"?"Copied scout://":"Copy scout://"}):null]}),i.jsxs("div",{className:"s-code-body",children:[i.jsx("div",{className:"s-code-tree",role:"tree","aria-label":"Files",children:ie?i.jsx("div",{className:"s-code-treeNote",children:ie}):s?Le.map(e=>e.loading?i.jsx("div",{className:"s-code-node s-code-node--loading",style:{paddingLeft:10+e.depth*14},children:e.name},e.path):i.jsxs("button",{type:"button",role:"treeitem",className:"s-code-node","data-selected":e.path===a||void 0,"data-diff":e.kind==="file"?E.get(e.path):void 0,"aria-expanded":e.kind==="directory"?y.has(e.path):void 0,style:{paddingLeft:10+e.depth*14},onClick:()=>e.kind==="directory"?Ne(e.path):Ee(e.path),onMouseEnter:e.kind==="file"?()=>ye(e.path):void 0,children:[e.kind==="directory"?i.jsx(Ve,{size:11,strokeWidth:2,className:"s-code-nodeChevron","data-open":y.has(e.path)||void 0,"aria-hidden":!0}):i.jsx("span",{className:"s-code-nodeSpacer","aria-hidden":!0}),i.jsx("span",{className:"s-code-nodeName",children:e.name}),e.kind==="file"&&E.has(e.path)?i.jsx("span",{className:"s-code-nodeBadge","data-diff":E.get(e.path),children:Ze(E.get(e.path)??"")}):null,e.kind==="directory"&&Re.has(e.path)?i.jsx("span",{className:"s-code-nodeDot","aria-label":"Contains changes"}):null]},e.path)):i.jsx("div",{className:"s-code-treeNote",children:"No repo selected."})}),i.jsxs("div",{className:"s-code-main",children:[a?i.jsxs("div",{className:"s-code-fileHead",children:[i.jsx("span",{className:"s-code-filePath",children:Fe}),U?i.jsxs("div",{className:"s-code-fileMode",role:"tablist","aria-label":"File view",children:[i.jsx("button",{type:"button",role:"tab","aria-selected":R==="source","data-selected":R==="source"||void 0,onClick:()=>X("source"),children:"Source"}),i.jsx("button",{type:"button",role:"tab","aria-selected":R==="changes","data-selected":R==="changes"||void 0,onClick:()=>X("changes"),children:"Changes"})]}):null,c?.kind==="file"?i.jsxs("span",{className:"s-code-fileMeta",children:[z(c.sizeBytes),c.previewable&&c.truncated?" · truncated":"",h?` · L${h.line}${h.endLine?`–${h.endLine}`:""}`:""]}):null,c?.kind==="file"&&c.previewable?i.jsxs(i.Fragment,{children:[i.jsxs("button",{type:"button",className:"s-code-fileAction",onClick:()=>{$e()},title:"Copy file contents",children:[ae==="copied"?i.jsx(Xe,{size:12,"aria-hidden":!0}):i.jsx(Je,{size:12,"aria-hidden":!0}),ae==="copied"?"Copied":"Copy"]}),i.jsx("a",{className:"s-code-fileAction",href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"Raw"})]}):null]}):null,R==="changes"&&U&&s&&a?i.jsx(_e,{root:s,file:a},`${s}\0${a}`):Se?i.jsxs("div",{className:"s-code-empty",children:["Loading ",a?ne(a):"file","…"]}):oe?i.jsx("div",{className:"s-code-empty",children:oe}):c&&c.kind==="file"&&c.previewable?i.jsxs(i.Fragment,{children:[c.truncated?i.jsxs("div",{className:"s-code-fileNote",children:["Showing the first ",z(256*1024)," of ",z(c.sizeBytes)," ·"," ",i.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):null,i.jsx(qe,{code:c.content,path:c.path,focusLine:h?.line,endLine:h?.endLine})]}):c&&c.kind==="file"?i.jsxs("div",{className:"s-code-empty",children:[c.previewReason," · ",z(c.sizeBytes)," ·"," ",i.jsx("a",{href:c.rawUrl,target:"_blank",rel:"noreferrer",children:"open raw"})]}):i.jsx("div",{className:"s-code-empty",children:"Pick a file to read."})]})]})]})}const Ct=Pe({id:"code",label:"Code Browser",route:{view:"code"},webPath:"/code",screen:"CodeContent",embed:{path:"/embed/code",profile:"macos.code",rootClassName:"s-code-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:n=>({root:n.get("root")?.trim()||void 0,file:n.get("file")?.trim()||void 0,project:n.get("project")?.trim()||void 0,path:n.get("path")?.trim()||void 0,wt:n.get("wt")?.trim()||void 0,line:ge(n.get("line")),endLine:ge(n.get("endLine")),returnConversationId:n.get("fromConversation")?.trim()||void 0})}});function ge(n){if(!n)return;const l=Number.parseInt(n,10);return Number.isSafeInteger(l)&&l>0?l:void 0}export{wt as CodeContent,Ct as scoutSurface};
@@ -1 +0,0 @@
1
- import{j as t}from"./index-DMiGbrBt.js";import{M as p}from"./message-markup-3J9pi3nx.js";import{f as n}from"./conversation-model-B47vYmWN.js";import{t as d}from"./time-DltNTpLl.js";import"./mentions-jSuTGeet.js";import"./colors-BtO5_zlx.js";import"./index-CJXzfjo9.js";import"./api-h5zurxmi.js";import"./Provider-C7UKGHQy.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./HarnessMark-Cbv3Ib0c.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";import"./AgentDetailCard-BcRBRp88.js";import"./AgentLiveActions-DBtnD0qE.js";import"./terminal-takeover-B8UeD9OX.js";import"./openContent-C6XO6kr5.js";import"./eye-0PvebX_a.js";import"./terminal-B9AOZQKR.js";function l({at:a}){const r=n(a);return t.jsxs("div",{className:"s-thread-day-divider","aria-label":r,children:[t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"}),t.jsx("span",{className:"s-thread-day-label",children:r}),t.jsx("span",{className:"s-thread-day-line","aria-hidden":"true"})]})}function et({row:a,expanded:r,showDayDivider:e,onToggle:s}){const m=`Sent to ${a.recipients.length} agents`;return t.jsxs("div",{className:["s-thread-feed-block","s-thread-fanout",e&&"s-thread-feed-block--full-width"].filter(Boolean).join(" "),children:[e&&t.jsx(l,{at:a.createdAt}),a.messages.map(i=>t.jsx("span",{id:`msg-${i.id}`,className:"s-thread-fanout-anchor","aria-hidden":"true"},i.id)),t.jsxs("button",{type:"button",className:"s-thread-fanout-summary","aria-expanded":r,onClick:s,title:a.recipients.join(", "),children:[t.jsx("span",{className:"s-thread-fanout-caret","aria-hidden":"true",children:r?"▾":"▸"}),t.jsx("span",{className:"s-thread-fanout-label",children:m}),t.jsx("span",{className:"s-thread-fanout-time",children:d(a.createdAt)})]}),r&&t.jsxs("div",{className:"s-thread-fanout-detail",children:[t.jsx("ul",{className:"s-thread-fanout-recipients",children:a.messages.map((i,o)=>t.jsx("li",{className:"s-thread-fanout-recipient",children:a.recipients[o]},i.id))}),t.jsx("div",{className:"s-thread-fanout-body",children:t.jsx(p,{text:a.messages[0].body})})]})]})}export{et as FanOutRow,l as ThreadDayDivider};
@@ -1 +0,0 @@
1
- import{j as e}from"./index-DMiGbrBt.js";import{c as p}from"./clipboard-e3fSpeo7.js";import{A as j}from"./AgentAvatar-D90c1Rzk.js";import{u as g}from"./ContextMenu-bARZqTzD.js";import{B as k}from"./BackToPicker-BRvfostO.js";import{o as b}from"./openContent-C6XO6kr5.js";import{s as C,u as w}from"./conversation-model-B47vYmWN.js";import{E as A}from"./eye-0PvebX_a.js";import{c as $}from"./createLucideIcon-OpA4Amw5.js";import"./SpriteAvatar-DyaGuhik.js";import"./colors-BtO5_zlx.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./time-DltNTpLl.js";const T=[["path",{d:"M16 21v-2a4 4 0 0 0-4-4H6a4 4 0 0 0-4 4v2",key:"1yyitq"}],["circle",{cx:"9",cy:"7",r:"4",key:"nufk8"}],["line",{x1:"19",x2:"19",y1:"8",y2:"14",key:"1bvyxn"}],["line",{x1:"22",x2:"16",y1:"11",y2:"11",key:"1shjgl"}]],L=$("user-plus",T);function Y({showBackNav:n,isDm:a,navigate:l,route:i,canonicalConversationId:d,threadTitle:h,agentId:m,visibleParticipants:s,hiddenParticipantCount:u,operator:c,canAddParticipants:v,onToggleAddParticipant:y}){const N=g();return e.jsxs("div",{className:"s-thread-center-header",onClick:t=>{t.target?.closest("button,a,input,select,textarea")||a&&b(l,{view:"agent-info",conversationId:d},{returnTo:i})},style:a?{cursor:"pointer"}:void 0,onContextMenu:t=>{const o=[{kind:"action",label:"Copy Title",onSelect:()=>{p(h)}}];m&&o.push({kind:"action",label:"Copy Agent ID",onSelect:()=>{p(m)}}),o.push({kind:"action",label:"Copy Conversation ID",onSelect:()=>{p(d)}}),N(t,o)},children:[n&&e.jsx(k,{slot:"conversation",fallback:{view:"inbox"},navigate:l,label:"Back",className:"s-thread-header-back"}),e.jsx("div",{className:"s-thread-center-header-info",children:e.jsx("span",{className:"s-thread-center-header-name",children:h})}),e.jsxs("div",{className:"s-thread-center-header-right",children:[s.length>0&&e.jsxs("div",{className:"s-thread-participants","aria-label":"Conversation participants",children:[s.map(t=>{const r=[t.model??(t.harness?"model unknown":null),t.reasoningEffort].filter(Boolean).join(" · ")||null,f=r?`${t.name} · ${r}`:t.title,x=e.jsxs(e.Fragment,{children:[e.jsx(j,{agent:t.agent??void 0,name:t.name,placement:"turn",className:"s-thread-participant-avatar",title:t.name}),e.jsxs("span",{className:"s-thread-participant-identity",children:[e.jsx("span",{className:"s-thread-participant-name",children:t.name}),r&&e.jsx("span",{className:"s-thread-participant-model",title:r,children:r})]})]});return t.agent?e.jsx("button",{type:"button",className:"s-thread-participant-pill s-thread-participant-pill--button",title:`Open ${t.name} profile${r?` · ${r}`:""}`,onClick:()=>b(l,{view:"agents-v2",agentId:t.agent.id},{returnTo:i}),children:x},t.id):e.jsx("span",{className:"s-thread-participant-pill",title:f,children:x},t.id)}),u>0&&e.jsxs("span",{className:"s-thread-participant-overflow",children:["+",u]}),c.active?e.jsxs("span",{className:"s-thread-participant-pill s-thread-participant-pill--operator",title:`${c.name} · in this conversation`,children:[e.jsx(j,{name:c.name,placement:"turn",className:"s-thread-participant-avatar s-thread-participant-avatar--operator",title:c.name}),e.jsx("span",{className:"s-thread-participant-identity",children:e.jsx("span",{className:"s-thread-participant-name",children:"You"})})]}):e.jsxs("span",{className:"s-thread-participant-observer",title:`${c.name} · observing (not in thread)`,children:[e.jsx(A,{size:12,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Observing"})]})]}),v&&e.jsx("button",{type:"button",className:"s-thread-add-participant-trigger",onClick:y,title:"Add participant","aria-label":"Add participant",children:e.jsx(L,{size:14,strokeWidth:1.9,"aria-hidden":"true"})})]})]})}function G({canonicalConversationId:n,conversationAlias:a}){return e.jsxs("div",{className:"s-thread-identity-row",children:[e.jsxs("button",{type:"button",className:"s-thread-identity-chip",title:n,onClick:()=>{p(n)},children:[e.jsx("span",{children:C()}),e.jsx("strong",{children:w(n)})]}),a&&e.jsxs("span",{className:"s-thread-identity-chip",title:a,children:[e.jsx("span",{children:"Alias"}),e.jsx("strong",{children:a})]})]})}function J({agents:n,addParticipantId:a,setAddParticipantId:l,addingParticipant:i,addParticipantError:d,onCancel:h,onSubmit:m}){return e.jsxs("form",{className:"s-thread-add-participant",onSubmit:s=>{s.preventDefault(),m()},children:[e.jsxs("div",{className:"s-thread-add-participant-row",children:[e.jsxs("div",{className:"s-thread-add-participant-field",children:[e.jsx("label",{className:"s-thread-add-participant-label",htmlFor:"thread-add-participant-select",children:"Agent"}),e.jsx("select",{id:"thread-add-participant-select",className:"s-thread-add-participant-select",value:a,onChange:s=>l(s.target.value),autoFocus:!0,children:n.map(s=>e.jsx("option",{value:s.id,children:s.name},s.id))})]}),e.jsxs("div",{className:"s-thread-add-participant-actions",children:[e.jsx("button",{type:"button",className:"s-btn s-btn-sm",onClick:h,disabled:i,children:"Cancel"}),e.jsx("button",{type:"submit",className:"s-btn s-btn-primary s-btn-sm",disabled:i||a.trim().length===0,children:i?"Adding...":"Add"})]})]}),d&&e.jsx("div",{className:"s-thread-add-participant-error",children:d})]})}export{J as AddParticipantForm,Y as ConversationHeader,G as ConversationIdentityRow};
@@ -1,2 +0,0 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/conversation-motion-features-BdAONVls.js","assets/gestures-CcwOTu8C.js","assets/index-DMiGbrBt.js","assets/index-DxGoC5l5.css","assets/use-reduced-motion-RRBkmVkk.js"])))=>i.map(i=>d[i]);
2
- import{j as e,_ as M,r as x}from"./index-DMiGbrBt.js";import{b as L,t as _,g as S,r as R,d as $,m as w,c as E,e as I,p as P}from"./conversation-model-B47vYmWN.js";import{n as W,d as b,f as B,s as z}from"./colors-BtO5_zlx.js";import{i as y}from"./sessionRead-CvFz2RHv.js";import{t as j,f as k}from"./time-DltNTpLl.js";import{u as U}from"./Provider-C7UKGHQy.js";import{o as f}from"./openContent-C6XO6kr5.js";import{u as D,L as F,m as p}from"./use-reduced-motion-RRBkmVkk.js";import{A as O}from"./activity-CA8qS6PI.js";import{T as H}from"./terminal-B9AOZQKR.js";import{M as K}from"./message-circle-CG-96zts.js";import"./router-Bq5dwf78.js";import"./terminal-sessions-D5CIR2OL.js";import"./api-h5zurxmi.js";import"./sse-CjIkKo46.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-bARZqTzD.js";import"./DocumentFocusViewer-BeVwwl26.js";import"./createLucideIcon-OpA4Amw5.js";import"./TextDocumentSurface-BpAw4eQS.js";/* empty css */import"./file-text-BODxCjcz.js";import"./x-D3GElQbe.js";import"./chevron-right-XiIHsk4m.js";import"./code-xml-B6jOCM4V.js";import"./arrow-left-DEZzHiPS.js";import"./scout-voice-CU5c0LGi.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-2kv_tGUS.js";import"./MessageComposerSuggestions-DpxN9WiB.js";import"./NewChatComposer-Cs6OsxK6.js";import"./runtime-picker-Bcl5iIX5.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-CbHjZsz1.js";import"./index-CJXzfjo9.js";import"./HarnessMark-Cbv3Ib0c.js";import"./NewChatOrigin-Bk2OyVjI.js";import"./agent-chat-Bfjd9y6c.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./chevron-down-BGk5qoEw.js";import"./search-CWfZtOt2.js";const G=[{head:"30%",body:"88%",short:"62%"},{head:"22%",body:"76%",short:"48%"},{head:"34%",body:"82%",short:"68%"}],J=()=>M(()=>import("./conversation-motion-features-BdAONVls.js"),__vite__mapDeps([0,1,2,3,4])).then(a=>a.default);function Y({onOpenTrace:a,onOpenTerminal:i,onSteer:d,compact:r=!1}){return!a&&!i&&!d?null:e.jsxs("nav",{className:`s-thread-working-actions${r?" s-thread-working-actions--compact":""}`,"aria-label":"Working turn actions",children:[a&&e.jsxs("button",{type:"button",className:"s-thread-working-action s-thread-working-action--primary",onClick:a,title:"Watch this run's live trace",children:[e.jsx(O,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Live trace"})]}),i&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:i,title:"Jump into this agent's terminal",children:[e.jsx(H,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Terminal"})]}),d&&e.jsxs("button",{type:"button",className:"s-thread-working-action",onClick:d,title:"Write an interrupting message to steer this turn",children:[e.jsx(K,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),e.jsx("span",{children:"Steer…"})]})]})}const q={think:"Thinking",tool:"Tool",ask:"Prompt",message:"Says",note:"Note",system:"System",boot:"Boot"};function N({steps:a,phase:i,limit:d=5,compact:r=!1}){const l=a.slice(-d),o=a.length-l.length;return l.length===0?i?e.jsxs("div",{className:"s-thread-steps-phase",children:[e.jsx("span",{children:i.label}),e.jsx("strong",{children:i.detail})]}):null:e.jsxs("div",{className:`s-thread-steps${r?" s-thread-steps--compact":""}`,children:[o>0&&e.jsxs("div",{className:"s-thread-steps-elided",children:[o," earlier step",o===1?"":"s"]}),e.jsx("ol",{"aria-label":"Live steps in this turn",children:l.map(s=>e.jsxs("li",{"data-kind":s.kind,children:[e.jsx("span",{className:"s-thread-step-mark","aria-hidden":"true"}),e.jsx("span",{className:"s-thread-step-kind",children:q[s.kind]}),e.jsxs("span",{className:"s-thread-step-body",children:[s.tool?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-thread-step-tool",children:s.tool}),s.arg&&e.jsx("span",{className:"s-thread-step-arg",children:s.arg})]}):e.jsx("span",{className:"s-thread-step-text",children:s.text}),s.repeatCount>1&&e.jsxs("span",{className:"s-thread-step-repeat",children:["×",s.repeatCount]}),s.outcome&&e.jsx("span",{className:"s-thread-step-outcome",children:s.outcome})]}),e.jsx("time",{title:k(s.ts),children:j(s.ts)})]},s.id))})]})}function Q({events:a,limit:i=3,compact:d=!1}){const r=a.slice(0,i);return r.length===0?null:e.jsx("ol",{className:`s-thread-motion-events${d?" s-thread-motion-events--compact":""}`,"aria-label":"Latest run activity",children:r.map(l=>e.jsxs("li",{children:[e.jsx("span",{className:"s-thread-motion-event-kind",children:L(l.kind)}),e.jsx("span",{className:"s-thread-motion-event-summary",children:_(l)??"Activity recorded"}),e.jsx("time",{title:k(l.ts),children:j(l.ts)})]},l.id))})}function Oe(){const a=D();return e.jsx(F,{features:J,strict:!0,children:e.jsxs(p.section,{className:"s-thread-skeleton","aria-busy":"true","aria-live":"polite",initial:a?!1:{opacity:0,y:6},animate:{opacity:1,y:0},transition:{duration:.2,ease:[.2,.7,.3,1]},children:[e.jsxs("div",{className:"s-thread-skeleton-intro",role:"status",children:[e.jsxs("div",{className:"s-thread-loader-mark","aria-hidden":"true",children:[e.jsx(p.span,{className:"s-thread-loader-orbit",animate:a?void 0:{rotate:360},transition:{duration:3.2,ease:"linear",repeat:1/0},children:e.jsx("span",{})}),e.jsx(p.span,{className:"s-thread-loader-core",animate:a?void 0:{scale:[.88,1,.88],opacity:[.58,1,.58]},transition:{duration:1.8,ease:"easeInOut",repeat:1/0}})]}),e.jsxs("span",{className:"s-thread-skeleton-copy",children:[e.jsx("strong",{children:"Composer ready"}),e.jsx("span",{children:"Gathering the conversation…"})]})]}),e.jsx("div",{className:"s-thread-skeleton-turns","aria-hidden":"true",children:G.map((i,d)=>e.jsxs(p.div,{className:"s-thread-skeleton-turn",initial:a?!1:{opacity:0,y:7},animate:{opacity:1,y:0},transition:{delay:a?0:.05+d*.055,duration:.24,ease:[.2,.7,.3,1]},children:[e.jsx("span",{className:"s-thread-skeleton-avatar"}),e.jsxs("div",{className:"s-thread-skeleton-lines",children:[e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--head",style:{width:i.head}}),e.jsx("span",{className:"s-thread-skeleton-line",style:{width:i.body}}),e.jsx("span",{className:"s-thread-skeleton-line s-thread-skeleton-line--short",style:{width:i.short}})]})]},`${i.head}-${i.body}`))})]})})}function He({sessions:a,activeConversationId:i,needsYouIds:d,lastViewed:r,navigate:l}){const o=a.filter(n=>d.has(n.id)||n.agentId&&d.has(n.agentId)),s=x.useMemo(()=>S(a),[a]);return e.jsx("aside",{className:"s-thread-rail",children:e.jsxs("div",{className:"s-thread-rail-scroll",children:[o.length>0&&e.jsxs("div",{className:"s-thread-rail-section s-thread-rail-section--needs-you",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:"Needs you"}),o.map(n=>e.jsx(g,{session:n,active:n.id===i,unread:y(n.lastMessageAt,n.id,r),needsYou:!0,navigate:l},`needs-${n.id}`))]}),s.map(n=>e.jsxs("div",{className:"s-thread-rail-section",children:[e.jsx("div",{className:"s-thread-rail-section-label",children:n.workspace}),n.sessions.map(c=>e.jsx(g,{session:c,active:c.id===i,unread:y(c.lastMessageAt,c.id,r),needsYou:!1,navigate:l},c.id))]},n.workspace))]})})}function Ke({sessionMeta:a,agents:i,flights:d,conversationId:r,navigate:l,route:o}){const s=x.useMemo(()=>a?a.participantIds.filter(t=>t!=="operator").map(t=>R(i,[t])).filter(t=>t!==null):[],[a,i]),n={id:"operator",name:"You",handle:"operator",activity:null,state:"ready",agent:null},c=x.useMemo(()=>s.map(t=>({id:t.id,name:t.name,handle:w(t)??E(t.id)??t.id,activity:$(t,d,r),state:W(t.state),agent:t})),[s,d,r]),h=[n,...c];return e.jsxs("aside",{className:"s-thread-sidebar",children:[e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"In this conversation"}),h.map(t=>{const m=e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"s-ops-avatar",style:{"--size":"28px",background:b(t.name)},children:t.name[0]?.toUpperCase()??"?"}),e.jsxs("div",{className:"s-thread-sidebar-participant-info",children:[e.jsx("span",{className:"s-thread-sidebar-participant-name",children:t.name}),e.jsxs("span",{className:"s-thread-sidebar-participant-handle",children:["@",t.handle]})]}),e.jsx("div",{className:"s-thread-sidebar-participant-activity",children:t.activity?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-thread-sidebar-activity-dot s-thread-sidebar-activity-dot--pulse",style:{background:"var(--green)"}}),e.jsx("span",{className:"s-thread-sidebar-activity-label",children:t.activity})]}):B(t.state)||t.id==="operator"?e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:z(t.state)}}):e.jsx("span",{className:"s-thread-sidebar-activity-dot",style:{background:"var(--dim)"}})})]});return t.agent?e.jsx("button",{type:"button",className:"s-thread-sidebar-participant s-thread-sidebar-participant--clickable",onClick:()=>f(l,{view:"agents-v2",agentId:t.agent.id},{returnTo:o}),title:`Open ${t.name} profile`,children:m},t.id):e.jsx("div",{className:"s-thread-sidebar-participant",children:m},t.id)})]}),c.length>0&&e.jsxs("div",{className:"s-thread-sidebar-section",children:[e.jsx("div",{className:"s-thread-sidebar-label",children:"Conversation mesh"}),e.jsx(V,{participants:c})]})]})}function Ge({agentName:a,title:i,detail:d,snapshot:r,events:l,steps:o,phase:s,tone:n,workspaceName:c,branch:h,startedAt:t,onOpenTrace:m,onOpenTerminal:A,onSteer:C}){const T=t?j(t):"now";return e.jsxs("section",{className:`s-thread-motion-panel s-thread-motion-panel--${n}`,"aria-live":"polite",children:[e.jsxs("div",{className:"s-thread-motion-head",children:[e.jsx("div",{className:"s-thread-motion-beacon","aria-hidden":"true",children:e.jsx("span",{})}),e.jsxs("div",{className:"s-thread-motion-title-block",children:[e.jsx("div",{className:"s-thread-motion-kicker",children:"Currently working"}),e.jsx("h2",{children:i}),e.jsx("p",{children:d})]})]}),e.jsx("div",{className:"s-thread-motion-meter","aria-hidden":"true",children:X.map((u,v)=>e.jsx("span",{style:{"--bar-height":`${u}%`,"--bar-delay":`${v*74}ms`}},`${u}-${v}`))}),e.jsxs("dl",{className:"s-thread-motion-stats",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Session"}),e.jsx("dd",{children:T})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Activity"}),e.jsx("dd",{children:r.activityLabel})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Last"}),e.jsx("dd",{children:r.lastActivityLabel})]})]}),e.jsxs("div",{className:"s-thread-motion-latest",children:[e.jsx("span",{children:a}),e.jsx("strong",{children:r.latest})]}),o.length>0?e.jsx(N,{steps:o,phase:null,limit:6}):l.length>0?e.jsx(Q,{events:l,limit:4}):s?e.jsx(N,{steps:o,phase:s,limit:6}):e.jsxs("div",{className:"s-thread-motion-waiting",children:[e.jsx("span",{children:"Session created"}),e.jsx("strong",{children:"waiting for the first trace event"})]}),(c||h)&&e.jsxs("div",{className:"s-thread-motion-chips",children:[c&&e.jsx("span",{children:c}),h&&e.jsx("span",{children:h})]}),e.jsx(Y,{onOpenTrace:m,onOpenTerminal:A,onSteer:C})]})}function g({session:a,active:i,unread:d,needsYou:r,navigate:l}){const{route:o}=U(),s=I(a),n=(a.agentName??s)[0]?.toUpperCase()??"?",c=a.kind==="direct",h=P(a.workspaceRoot)??a.kind;return e.jsxs("button",{type:"button",className:["s-thread-rail-item",i&&"s-thread-rail-item--active",r&&"s-thread-rail-item--needs-you"].filter(Boolean).join(" "),onClick:()=>f(l,{view:"conversation",conversationId:a.id},{returnTo:o}),children:[c?e.jsx("div",{className:"s-thread-rail-avatar",style:{background:b(a.agentName??s)},children:n}):e.jsx("div",{className:"s-thread-rail-avatar s-thread-rail-avatar--channel",children:"#"}),e.jsxs("div",{className:"s-thread-rail-body",children:[e.jsx("span",{className:"s-thread-rail-name",children:s}),e.jsx("span",{className:"s-thread-rail-sub",children:h})]}),e.jsxs("div",{className:"s-thread-rail-trailing",children:[d&&!r&&e.jsx("span",{className:"s-thread-rail-presence-dot",style:{background:"var(--accent)"}}),r&&e.jsx("span",{className:"s-thread-rail-badge s-thread-rail-badge--amber",children:"!"})]})]})}function V({participants:a}){const o=a.map((s,n)=>{const c=2*Math.PI*n/a.length-Math.PI/2;return{...s,x:130+55*Math.cos(c),y:80+55*Math.sin(c)}});return e.jsx("div",{className:"s-thread-mini-mesh",children:e.jsxs("svg",{viewBox:"0 0 260 160","aria-label":"Conversation participant mesh",children:[o.map(s=>e.jsx("line",{x1:130,y1:80,x2:s.x,y2:s.y,className:"s-thread-mini-mesh-edge"},`edge-${s.id}`)),e.jsx("circle",{cx:130,cy:80,r:16,className:"s-thread-mini-mesh-node s-thread-mini-mesh-node--center"}),e.jsx("text",{x:130,y:80,className:"s-thread-mini-mesh-label s-thread-mini-mesh-label--center",children:"OP"}),o.map(s=>e.jsxs("g",{children:[e.jsx("circle",{cx:s.x,cy:s.y,r:16,className:"s-thread-mini-mesh-node",style:s.state==="in_turn"||s.state==="in_flight"?{stroke:"var(--green)"}:void 0}),e.jsx("text",{x:s.x,y:s.y,className:"s-thread-mini-mesh-label",children:s.name.slice(0,3).toUpperCase()})]},`node-${s.id}`))]})})}const X=[42,76,54,88,34,66,92,48,72,38,84,58];export{He as ChannelRail,Ke as PresenceSidebar,Oe as ThreadLoadingSkeleton,Ge as ThreadMotionPanel,Y as WorkingTurnActions,Q as WorkingTurnActivityPreview,N as WorkingTurnSteps};