@openscout/scout 0.2.95 → 0.2.96

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 (360) hide show
  1. package/bin/scout +26 -10
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/{ActivityScreen--eANwuxa.js → ActivityScreen-BnoaUkVZ.js} +1 -1
  5. package/dist/client/assets/{AddProjectForm-CcD6qvV8.js → AddProjectForm-IqOtJfRs.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-CYhf6twS.js → AgentAvatar-6-KBVKUu.js} +1 -1
  7. package/dist/client/assets/{AgentConfigurationScreen-BTI24HQX.js → AgentConfigurationScreen-CuZJy07q.js} +1 -1
  8. package/dist/client/assets/{AgentDefinitionsWorkspace-srmN6-vj.js → AgentDefinitionsWorkspace-Iyl4BesU.js} +1 -1
  9. package/dist/client/assets/{AgentDetailCard-UqPNpcvB.js → AgentDetailCard-C9rn3Fj5.js} +1 -1
  10. package/dist/client/assets/{AgentFloorView-XXNgI5Cj.js → AgentFloorView-YT-Jjccf.js} +1 -1
  11. package/dist/client/assets/{AgentInfoScreen-CimdOnZ9.js → AgentInfoScreen-Dr99gQEZ.js} +1 -1
  12. package/dist/client/assets/{AgentLaneCard-Z-aOBR3W.js → AgentLaneCard-DI2iW9zO.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-CyhA1reW.js → AgentLaneChrome-D8bARHMx.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-BNzjMjIH.js → AgentLaneDetailSheet-52un7dKC.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-Box8-_rS.js → AgentLaneSummaryResize-CEBjmPTa.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +1 -0
  17. package/dist/client/assets/AgentLanesPreflight-q20mTjms.js +1 -0
  18. package/dist/client/assets/AgentLanesView-CetZZDyF.js +2 -0
  19. package/dist/client/assets/{AgentLiveActions-BwuzOE8h.js → AgentLiveActions-DrEJDJef.js} +1 -1
  20. package/dist/client/assets/AgentMasterScreen-DJPnstoD.js +1 -0
  21. package/dist/client/assets/{AgentSessions-CsZwoukw.js → AgentSessions-DCPCG4xb.js} +1 -1
  22. package/dist/client/assets/{AgentsConsole-KCao4XmX.js → AgentsConsole-CsYOoFJi.js} +1 -1
  23. package/dist/client/assets/{AgentsScreen-CtPAmwRX.js → AgentsScreen-k8LvBuU_.js} +1 -1
  24. package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +1 -0
  25. package/dist/client/assets/{AstronautSuit-Ckx7lu7G.js → AstronautSuit-DbjQtfD_.js} +1 -1
  26. package/dist/client/assets/{AtopView-DYlpgEHf.js → AtopView-Daq_ob3z.js} +1 -1
  27. package/dist/client/assets/{BackToPicker-4JaeRvDm.js → BackToPicker-CXZjBRAe.js} +1 -1
  28. package/dist/client/assets/{BriefingDetailScreen-D6-xqrpo.js → BriefingDetailScreen-CUCXO-KH.js} +1 -1
  29. package/dist/client/assets/{BriefingsScreen-DKxSDEmk.js → BriefingsScreen-B5oMTGKv.js} +1 -1
  30. package/dist/client/assets/{BrokerMetadataPanel-BbREmsbK.js → BrokerMetadataPanel-BsiU8lTD.js} +1 -1
  31. package/dist/client/assets/{BrokerScreen-fbPIouMw.js → BrokerScreen-BPbOHhCS.js} +1 -1
  32. package/dist/client/assets/{CastPicker-BcA2vDDV.js → CastPicker-_5E5hNUe.js} +1 -1
  33. package/dist/client/assets/ChatCollapsedStrip-D-eXhzPf.js +1 -0
  34. package/dist/client/assets/{CodeDiffPane-Cn8Y9hAt.js → CodeDiffPane-n7W4iGUG.js} +1 -1
  35. package/dist/client/assets/{CodeProjectPicker-nPFktrco.js → CodeProjectPicker-CMsbSTDq.js} +1 -1
  36. package/dist/client/assets/{CodeScreen-BlAxtxE5.js → CodeScreen-CeuO3EhR.js} +1 -1
  37. package/dist/client/assets/{ConversationComposer-2HjbGPL9.js → ConversationComposer-CXPKx86g.js} +1 -1
  38. package/dist/client/assets/{ConversationFeedRows-C6wUqJrx.js → ConversationFeedRows-WrH-YI3L.js} +1 -1
  39. package/dist/client/assets/{ConversationHeader-C8vfXaTF.js → ConversationHeader-BQWzGzLK.js} +1 -1
  40. package/dist/client/assets/{ConversationPanels-CNCIbpqU.js → ConversationPanels-Dujvnmup.js} +2 -2
  41. package/dist/client/assets/ConversationScreen-CR9pWB65.js +2 -0
  42. package/dist/client/assets/{ConversationStatus-DZuyKsWN.js → ConversationStatus-DVzSb2Hv.js} +1 -1
  43. package/dist/client/assets/{CrewAvatar-CTIuxp4G.js → CrewAvatar-BwXjyg8N.js} +1 -1
  44. package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +1 -0
  45. package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +1 -0
  46. package/dist/client/assets/{DataTable-6IDhanr5.js → DataTable-Bp8tU9AK.js} +1 -1
  47. package/dist/client/assets/{DispatchAftermath-DC1u9itO.js → DispatchAftermath-B-6rmXzL.js} +1 -1
  48. package/dist/client/assets/{DocumentFocusViewer-DZVhS7as.js → DocumentFocusViewer-Do3wQ_3Z.js} +1 -1
  49. package/dist/client/assets/{EmbeddableSurfacesLab-BKUFJMCV.js → EmbeddableSurfacesLab-C1orRyP9.js} +1 -1
  50. package/dist/client/assets/{EmptyState-CeBl0iGd.js → EmptyState-CJzXj1l5.js} +1 -1
  51. package/dist/client/assets/{FileViewerPane-DQlpNt2S.js → FileViewerPane-Df6VzXjA.js} +1 -1
  52. package/dist/client/assets/FlightObserveScreen-6mGnmWQA.js +1 -0
  53. package/dist/client/assets/{FollowScreen-BXHOp3gb.js → FollowScreen-DvnxYLVh.js} +1 -1
  54. package/dist/client/assets/{HarnessMark-D5CA5uSp.js → HarnessMark-B979GCSB.js} +1 -1
  55. package/dist/client/assets/{HarnessesScreen-DhFXq1qz.js → HarnessesScreen-CHTuv8p6.js} +1 -1
  56. package/dist/client/assets/{HerdrSession-BRhs5LIR.js → HerdrSession-B3McuYgi.js} +1 -1
  57. package/dist/client/assets/{HomeHero-DMABJuze.js → HomeHero-CdUVPjkG.js} +1 -1
  58. package/dist/client/assets/{HostAdvisorView-RAociATV.js → HostAdvisorView-Bok5Sk5c.js} +1 -1
  59. package/dist/client/assets/{KnowledgeSearchInspector-CZPyVNSw.js → KnowledgeSearchInspector-B7XSoJsu.js} +1 -1
  60. package/dist/client/assets/{KnowledgeSearchScreen-mGTKIg00.js → KnowledgeSearchScreen-D3o3IODW.js} +1 -1
  61. package/dist/client/assets/{LaneToolHoverCard-D_DMlBeT.js → LaneToolHoverCard-HByf2ndx.js} +1 -1
  62. package/dist/client/assets/{LaneTraceDetailSheet-BEHg3LmH.js → LaneTraceDetailSheet-BUgHz-sd.js} +1 -1
  63. package/dist/client/assets/{LaneTraceEventFocus-DVimcizS.js → LaneTraceEventFocus-DM-hoPxG.js} +1 -1
  64. package/dist/client/assets/{MeshCanvas-BOuZx4AM.js → MeshCanvas-DCLJRsBy.js} +1 -1
  65. package/dist/client/assets/{MeshCanvasMinimap-wL-1N94e.js → MeshCanvasMinimap-cEFS9eW7.js} +1 -1
  66. package/dist/client/assets/{MeshScreen-DMY9Bmh5.js → MeshScreen-BcxPkhm6.js} +1 -1
  67. package/dist/client/assets/{MeshTopologyView-DiDcX5f4.js → MeshTopologyView-CCRPd8PU.js} +2 -2
  68. package/dist/client/assets/MessagesScreen-Bb5l13MO.js +1 -0
  69. package/dist/client/assets/{MissionContextRail-DrNKXG5u.js → MissionContextRail-DF0_kiU7.js} +1 -1
  70. package/dist/client/assets/{MissionControlView-ByBlHVN8.js → MissionControlView-E3V7bENU.js} +1 -1
  71. package/dist/client/assets/{MissionFocusOverlay-D1i6R6Zt.js → MissionFocusOverlay-h15sQFvP.js} +1 -1
  72. package/dist/client/assets/{MissionLeftAgentRow-DN9NcCML.js → MissionLeftAgentRow-KPdk9rSa.js} +1 -1
  73. package/dist/client/assets/{MissionLogPane-DSeIv3Xo.js → MissionLogPane-BbdDKjUl.js} +1 -1
  74. package/dist/client/assets/{NewAgentModal-V7yK6J6j.js → NewAgentModal-DfHxad34.js} +1 -1
  75. package/dist/client/assets/NewChatComposer-_Stj0fZy.js +19 -0
  76. package/dist/client/assets/{NewChatOrigin-DdpzE4kz.js → NewChatOrigin-B1u7ki70.js} +1 -1
  77. package/dist/client/assets/{ObserveEmbedScreen-l_Q3ts2q.js → ObserveEmbedScreen-Co0xTii6.js} +1 -1
  78. package/dist/client/assets/{ObserveTextFlow-BSEtYTxU.js → ObserveTextFlow-ZQWwrK3i.js} +2 -2
  79. package/dist/client/assets/{ObservedTopologyPanel-CdGUXxGR.js → ObservedTopologyPanel-BJUhDSuQ.js} +1 -1
  80. package/dist/client/assets/{OpenScoutAppShell-DN8dOSK4.js → OpenScoutAppShell-CUd2yOLu.js} +25 -25
  81. package/dist/client/assets/{OpsAgentsView-ntGr4pz4.js → OpsAgentsView-DI5wu1si.js} +1 -1
  82. package/dist/client/assets/OpsScreen-D8fQafCl.js +1 -0
  83. package/dist/client/assets/OpsSubnav-1K4Jaf__.js +1 -0
  84. package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +1 -0
  85. package/dist/client/assets/{ProjectAgentProfileBar-BQET-qrY.js → ProjectAgentProfileBar-k2QHHHsQ.js} +1 -1
  86. package/dist/client/assets/{ProjectAgentProfileHero-Ck8mThtx.js → ProjectAgentProfileHero-Bpxk1ui2.js} +1 -1
  87. package/dist/client/assets/ProjectsInbox-C_bMHLCc.js +2 -0
  88. package/dist/client/assets/ProjectsRail-J-aH_pxT.js +1 -0
  89. package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +1 -0
  90. package/dist/client/assets/ProjectsThreadAside-_ourdM-Q.js +1 -0
  91. package/dist/client/assets/{Provider-B2xuo3rf.js → Provider-CtXJeLrP.js} +1 -1
  92. package/dist/client/assets/{RailRow-B-GycCBx.js → RailRow-CEH2MFBw.js} +1 -1
  93. package/dist/client/assets/{RawSessionsTable-AQThi6sm.js → RawSessionsTable-CDyrom-F.js} +1 -1
  94. package/dist/client/assets/RealtimeVoiceScreen-DBl3DN1H.js +1 -0
  95. package/dist/client/assets/{RepoDiffEmbedScreen-DXWoRF_c.js → RepoDiffEmbedScreen-kY2pHjIs.js} +1 -1
  96. package/dist/client/assets/{RepoDiffPageScreen-D_274ExO.js → RepoDiffPageScreen-C6LhoKrn.js} +1 -1
  97. package/dist/client/assets/{RepoDiffViewer-DbedmHDX.js → RepoDiffViewer-BhcIIQQg.js} +1 -1
  98. package/dist/client/assets/{RepoDiffViewerLazy-C0--fPtk.js → RepoDiffViewerLazy-Csy_j9LD.js} +2 -2
  99. package/dist/client/assets/{ReposScreen-D39_YG4H.js → ReposScreen-B_cB0zu7.js} +1 -1
  100. package/dist/client/assets/ScoutDeckSurface-CSy_fjcG.js +1 -0
  101. package/dist/client/assets/{ScoutSurface-UsRy0t-I.js → ScoutSurface-CQVcSrin.js} +1 -1
  102. package/dist/client/assets/{ScoutbotFxLab-Fmdfboxs.js → ScoutbotFxLab-DqGiLYNy.js} +1 -1
  103. package/dist/client/assets/{SecondaryNav-o2RL9H8H.js → SecondaryNav-BR4VRdgh.js} +1 -1
  104. package/dist/client/assets/SessionEmbedScreen-BTlZ9gAg.js +1 -0
  105. package/dist/client/assets/{SessionObserve-Dsd0j05N.js → SessionObserve-dQDN23pP.js} +1 -1
  106. package/dist/client/assets/{SessionObserveEvidence-DopQYDkD.js → SessionObserveEvidence-BRBGKAgd.js} +1 -1
  107. package/dist/client/assets/SessionRefScreen-COVQMbtE.js +1 -0
  108. package/dist/client/assets/SessionsScreen--5OJ3p3v.js +1 -0
  109. package/dist/client/assets/{SettingsDrawer-_AwuopMS.js → SettingsDrawer-RGVK_bmE.js} +1 -1
  110. package/dist/client/assets/{SettingsScreen-Cw4DDfJP.js → SettingsScreen-CCxzy5IU.js} +1 -1
  111. package/dist/client/assets/{ShikiPane-BfHc_3pM.js → ShikiPane-DYI9Hkge.js} +1 -1
  112. package/dist/client/assets/{SlidePanel-C-q7XwTa.js → SlidePanel-B9ugxWgA.js} +1 -1
  113. package/dist/client/assets/{SpriteAvatar-Bs68ZENy.js → SpriteAvatar-z5hHesx9.js} +1 -1
  114. package/dist/client/assets/{StatusPill-ZZQwxB1a.js → StatusPill-BFvMjmZV.js} +1 -1
  115. package/dist/client/assets/{TailView-Q4FVMsUH.js → TailView-0uEIj2JH.js} +1 -1
  116. package/dist/client/assets/{Terminal-D7zqHwHV.js → Terminal-DouZeNxc.js} +1 -1
  117. package/dist/client/assets/{TerminalEmbedScreen-CXIJ7qv6.js → TerminalEmbedScreen-dMNUbzXr.js} +1 -1
  118. package/dist/client/assets/{TerminalHeaderMount-BnBLOPbb.js → TerminalHeaderMount-BL07cd0q.js} +1 -1
  119. package/dist/client/assets/{TextDocumentSurface-CKQP-cBT.js → TextDocumentSurface-BflAwXeZ.js} +1 -1
  120. package/dist/client/assets/{TmuxPeek-V9dGESfO.js → TmuxPeek-BTnjOQi0.js} +1 -1
  121. package/dist/client/assets/{VoicePermissionsPanel-k7sbLXx2.js → VoicePermissionsPanel-CgQ6GGS-.js} +1 -1
  122. package/dist/client/assets/{WorkDetailScreen-60p9litn.js → WorkDetailScreen-CaLG-zDs.js} +1 -1
  123. package/dist/client/assets/{WorkFilesViewer-BjJS7GyM.js → WorkFilesViewer-B9Sil_No.js} +1 -1
  124. package/dist/client/assets/{activity-Bj3Hnbj3.js → activity-DcrMApUY.js} +1 -1
  125. package/dist/client/assets/{addon-fit-BL-NTWRU.js → addon-fit-DMVrz5Sv.js} +1 -1
  126. package/dist/client/assets/{addon-webgl-CIMgmNjg.js → addon-webgl-BYvpZUyu.js} +1 -1
  127. package/dist/client/assets/{agent-autocomplete-DXlvdc4b.js → agent-autocomplete-B-5QTeas.js} +1 -1
  128. package/dist/client/assets/{agent-essentials-BOMHR0_U.js → agent-essentials-D7KRGYvF.js} +1 -1
  129. package/dist/client/assets/{agent-lane-card-model-CTLxf3R4.js → agent-lane-card-model-CNZMPkhc.js} +1 -1
  130. package/dist/client/assets/{agent-lanes-model-AfrjRNK5.js → agent-lanes-model-DXqjs0OK.js} +2 -2
  131. package/dist/client/assets/agent-master-I1W-5d-x.css +1 -0
  132. package/dist/client/assets/agent-master-model-DqjrVI2h.js +1 -0
  133. package/dist/client/assets/{agent-specialization-BIPIBW8u.js → agent-specialization-BujJVUTD.js} +1 -1
  134. package/dist/client/assets/{arc.es-IR5r6sj_.js → arc.es-NHqHWohb.js} +1 -1
  135. package/dist/client/assets/{arrow-down-BydciYFZ.js → arrow-down-CKtSUjmW.js} +1 -1
  136. package/dist/client/assets/{arrow-left-CghA0kTw.js → arrow-left-Czpf-AE4.js} +1 -1
  137. package/dist/client/assets/{arrow-right-iJFv3jNh.js → arrow-right-BuzMnLYP.js} +1 -1
  138. package/dist/client/assets/{arrow-up-right-CCfZXPqD.js → arrow-up-right-C6Wl-1uw.js} +1 -1
  139. package/dist/client/assets/{bot-B5sub1-i.js → bot-rd0awxD3.js} +1 -1
  140. package/dist/client/assets/{check-C18YQC90.js → check-ofKUE8yH.js} +1 -1
  141. package/dist/client/assets/{chevron-down-Mp9mu_yd.js → chevron-down-wciXnOQz.js} +1 -1
  142. package/dist/client/assets/{chevron-right-CzH-TaSF.js → chevron-right-D-HdlPg8.js} +1 -1
  143. package/dist/client/assets/{chunk-HRAB3GC3-swV8PA2k.js → chunk-HRAB3GC3-Tyv9rzx7.js} +1 -1
  144. package/dist/client/assets/{chunk-JTPDIGGW-BKXqcLKw.js → chunk-JTPDIGGW-BC2Mandc.js} +3 -3
  145. package/dist/client/assets/{chunk-T65CQEWV-vYbNJ8E6.js → chunk-T65CQEWV-C1AWTYZZ.js} +1 -1
  146. package/dist/client/assets/{chunk-YOZR3KYS-U65yUmqt.js → chunk-YOZR3KYS-DwHPHa6f.js} +1 -1
  147. package/dist/client/assets/{clock-B4PTFi5m.js → clock-B88r8OrZ.js} +1 -1
  148. package/dist/client/assets/{code-xml-Jtxsp5d1.js → code-xml-D7pOQM9l.js} +1 -1
  149. package/dist/client/assets/{compass-0_54-vz3.js → compass-Dt1AMXz2.js} +1 -1
  150. package/dist/client/assets/content-9K38QchR.js +1 -0
  151. package/dist/client/assets/content-BRgnyXWh.js +1 -0
  152. package/dist/client/assets/{content-CHghn-rT.js → content-BWPNyXJ0.js} +1 -1
  153. package/dist/client/assets/content-BdkI07v3.js +1 -0
  154. package/dist/client/assets/content-C4oWa8SB.js +1 -0
  155. package/dist/client/assets/content-C9ijJxyl.js +1 -0
  156. package/dist/client/assets/content-CFZ4rghn.js +1 -0
  157. package/dist/client/assets/content-CIqu_Ci_.js +1 -0
  158. package/dist/client/assets/content-CnJF9DGO.js +1 -0
  159. package/dist/client/assets/content-CriW8Y8u.js +1 -0
  160. package/dist/client/assets/content-DDCyPPk_.js +1 -0
  161. package/dist/client/assets/content-DtcZeh5m.js +1 -0
  162. package/dist/client/assets/content-U9tsdtle.js +1 -0
  163. package/dist/client/assets/content-hFLK3CON.js +1 -0
  164. package/dist/client/assets/{content-DMbawvqU.js → content-nkx0swDe.js} +1 -1
  165. package/dist/client/assets/content-p00KQrtD.js +1 -0
  166. package/dist/client/assets/{conversation-icons-BV10B2Me.js → conversation-icons-tp9BX6X2.js} +1 -1
  167. package/dist/client/assets/{conversation-model-CwF6Y9gx.js → conversation-model-Dc02NsGp.js} +1 -1
  168. package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +1 -0
  169. package/dist/client/assets/{copy-Dtpx4FOE.js → copy-CWWAJ75H.js} +1 -1
  170. package/dist/client/assets/{cpu-BjVis9mc.js → cpu-DrqejfkB.js} +1 -1
  171. package/dist/client/assets/{createLucideIcon-DXpqZP7I.js → createLucideIcon-DezKXSG2.js} +1 -1
  172. package/dist/client/assets/{ctx-panel-D_HJ3nhb.css → ctx-panel-F05jXK4Q.css} +1 -1
  173. package/dist/client/assets/discover-C2CZO4Tk.js +2 -0
  174. package/dist/client/assets/embed-entry-BSMUykuG.js +2 -0
  175. package/dist/client/assets/{external-link-Ckiyzjwo.js → external-link-Dp_a2vRZ.js} +1 -1
  176. package/dist/client/assets/{eye-CpfyvdLq.js → eye-BRyD0jno.js} +1 -1
  177. package/dist/client/assets/{file-code-corner-7mo7EviR.js → file-code-corner-muIVH_xO.js} +1 -1
  178. package/dist/client/assets/{file-text-KijGBnME.js → file-text-CqJgwxmv.js} +1 -1
  179. package/dist/client/assets/{gauge-y-Xg8Mrv.js → gauge-hU--hKVP.js} +1 -1
  180. package/dist/client/assets/{gestures-Bq9XnSqY.js → gestures-DN4hEeqv.js} +1 -1
  181. package/dist/client/assets/{git-branch-BQ_x8KZL.js → git-branch-CK5v8F2v.js} +1 -1
  182. package/dist/client/assets/{home-moving-signal-DtRpiNa0.js → home-moving-signal-BjDtEJUP.js} +1 -1
  183. package/dist/client/assets/{home-now-card-DFb4GOgM.js → home-now-card-nF8OotI-.js} +1 -1
  184. package/dist/client/assets/{home-now-card-nano-D--m9jpq.js → home-now-card-nano-C-r_bBg5.js} +1 -1
  185. package/dist/client/assets/{hooks-9d1SoaQA.js → hooks-D46bABUP.js} +1 -1
  186. package/dist/client/assets/index-CPrU5q04.js +1 -0
  187. package/dist/client/assets/{index-CZ-05hKz.js → index-DvLtl7rV.js} +5 -5
  188. package/dist/client/assets/index-kL1WLbeS.js +1 -0
  189. package/dist/client/assets/index-zvhpRHao.js +1 -0
  190. package/dist/client/assets/{inspector-panel-C-EhEDYy.js → inspector-panel-Dkc7rLvY.js} +1 -1
  191. package/dist/client/assets/{keyboard-nav-DFhAJkW3.js → keyboard-nav-BLYDhL3Z.js} +1 -1
  192. package/dist/client/assets/{lane-roster-store-gUBsydNf.js → lane-roster-store-DOdI1O13.js} +1 -1
  193. package/dist/client/assets/{layers-CGou-LwV.js → layers-CSsg3JVP.js} +1 -1
  194. package/dist/client/assets/{layout-grid-BrZt31QH.js → layout-grid-DOChPJdZ.js} +1 -1
  195. package/dist/client/assets/left-B-SdEJSJ.js +1 -0
  196. package/dist/client/assets/{left-B_o51JV6.js → left-B3wSE6ql.js} +1 -1
  197. package/dist/client/assets/{left-CwHZCGO3.js → left-BNRFiRsb.js} +1 -1
  198. package/dist/client/assets/{left-DA0amyfu.js → left-BggzhgXN.js} +1 -1
  199. package/dist/client/assets/left-CARCvvxS.js +2 -0
  200. package/dist/client/assets/left-CpokZYHt.js +1 -0
  201. package/dist/client/assets/{left-CwLs0okF.js → left-YT7mIGuH.js} +1 -1
  202. package/dist/client/assets/{left-advisor-DU3s01gk.js → left-advisor-CCY0vkcO.js} +1 -1
  203. package/dist/client/assets/left-agents-trhO5sL8.js +1 -0
  204. package/dist/client/assets/{left-default-uvuvDmt0.js → left-default-CG33elBs.js} +1 -1
  205. package/dist/client/assets/{left-lanes-DnNLgec8.js → left-lanes-CitMgeTp.js} +1 -1
  206. package/dist/client/assets/{left-mission-DN3-NLPC.js → left-mission-Zl2m_5eU.js} +1 -1
  207. package/dist/client/assets/{library-DIo5NiGP.js → library-DkALuCh5.js} +1 -1
  208. package/dist/client/assets/{loader-circle-BiohlpM3.js → loader-circle-pM56HNhR.js} +1 -1
  209. package/dist/client/assets/{local-agents-wUIaBcEr.js → local-agents-C8xAhbO5.js} +1 -1
  210. package/dist/client/assets/{mentions-CcPFMbmZ.js → mentions-DG6OQrsc.js} +1 -1
  211. package/dist/client/assets/{mesh-buckets-ByyFXdKT.js → mesh-buckets-6y3ZIibI.js} +1 -1
  212. package/dist/client/assets/{mesh-ops-CvGyjK84.js → mesh-ops-BZ1h5RQs.js} +1 -1
  213. package/dist/client/assets/{mesh-roster-n2nDpEmA.js → mesh-roster-Bc7T4b7z.js} +1 -1
  214. package/dist/client/assets/{mesh-view-store-BpxGm71b.js → mesh-view-store-ChUOASK8.js} +1 -1
  215. package/dist/client/assets/{message-circle-B2ddzBrX.js → message-circle-mZCv8tvB.js} +1 -1
  216. package/dist/client/assets/{message-markup-RkfmDfME.js → message-markup-C2LQDm_k.js} +1 -1
  217. package/dist/client/assets/{message-square-D9YYWE0x.js → message-square-C7t_qtuj.js} +1 -1
  218. package/dist/client/assets/{message-visibility-DwxgcgYK.js → message-visibility-CGOmSSKs.js} +1 -1
  219. package/dist/client/assets/{mission-control-store-Bf4b54MV.js → mission-control-store-nDLdUZPA.js} +1 -1
  220. package/dist/client/assets/{observe-CJRIvOCn.js → observe-BpEm1INu.js} +1 -1
  221. package/dist/client/assets/{page-status-BptpTdQ-.js → page-status-E5jnk48p.js} +1 -1
  222. package/dist/client/assets/{paperclip-B1UNGl5d.js → paperclip-C64lkcbM.js} +1 -1
  223. package/dist/client/assets/{persistent-state-YI-WHSCF.js → persistent-state-EHXw8WNy.js} +1 -1
  224. package/dist/client/assets/{plus-CuU_X0-8.js → plus-Co-dqKul.js} +1 -1
  225. package/dist/client/assets/{profile-rY8jO38P.js → profile-APxDsN2P.js} +1 -1
  226. package/dist/client/assets/projects-inbox-Cg4X2lUQ.js +1 -0
  227. package/dist/client/assets/projects-inbox-DRBl2N85.css +1 -0
  228. package/dist/client/assets/{proxy-DnLpZIi9.js → proxy-BiW5suC7.js} +1 -1
  229. package/dist/client/assets/{radio-Dm1ItnA4.js → radio-BOxBQX-T.js} +1 -1
  230. package/dist/client/assets/{refresh-cw-BRn9Oxxl.js → refresh-cw-DMxGzDwn.js} +1 -1
  231. package/dist/client/assets/resolve-panes-DeVJbS9c.js +1 -0
  232. package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +1 -0
  233. package/dist/client/assets/{right-BJltPRnd.js → right-Bmfd3pjP.js} +1 -1
  234. package/dist/client/assets/{right-Beh3nCUB.js → right-BqI-nr9G.js} +1 -1
  235. package/dist/client/assets/{right-D3aTKf1F.js → right-BuCgE0fZ.js} +1 -1
  236. package/dist/client/assets/{right-Shpw_xDy.js → right-BwlW6E57.js} +1 -1
  237. package/dist/client/assets/{right-CPP7GyOm.js → right-C0ybUw0j.js} +1 -1
  238. package/dist/client/assets/{right-BbyYdzHn.js → right-CdkcrmeD.js} +1 -1
  239. package/dist/client/assets/{right-CJnB_Bg7.js → right-CimaAvQN.js} +1 -1
  240. package/dist/client/assets/{right-C1yumXNx.js → right-CkCCPbCX.js} +1 -1
  241. package/dist/client/assets/{right-DI1B79nR.js → right-D3eSiy41.js} +1 -1
  242. package/dist/client/assets/{right-DtsRNX5b.js → right-Dz_xD0Vj.js} +1 -1
  243. package/dist/client/assets/{rocket-DOwXHKWA.js → rocket-BQm5_CvR.js} +1 -1
  244. package/dist/client/assets/router-B9vQkNJL.js +1 -0
  245. package/dist/client/assets/{scope-views-A4_vP97W.js → scope-views-1IYJdl41.js} +1 -1
  246. package/dist/client/assets/{scout-voice-BhPzrc6P.js → scout-voice-BVUqGhth.js} +1 -1
  247. package/dist/client/assets/{scoutbot-markdown-jh7tzFB1.js → scoutbot-markdown-BQ_Ee2Ic.js} +1 -1
  248. package/dist/client/assets/{scroll-text-DO0GQzvN.js → scroll-text-Dze_dXtQ.js} +1 -1
  249. package/dist/client/assets/{search-D1tJSAWe.js → search-CDko0PKE.js} +1 -1
  250. package/dist/client/assets/{secondaryNavConfig-B9IF8wXl.js → secondaryNavConfig-BoQ_zYR9.js} +1 -1
  251. package/dist/client/assets/{selection-bridge-i2S9zpf8.js → selection-bridge-Din6yV3h.js} +1 -1
  252. package/dist/client/assets/{send-horizontal-CgLppsIC.js → send-horizontal-CSjIm6xg.js} +1 -1
  253. package/dist/client/assets/{server-Dymv5Emh.js → server-Bzj7lPIx.js} +1 -1
  254. package/dist/client/assets/{session-catalog-DNaOEzoQ.js → session-catalog-DsaZJXZt.js} +1 -1
  255. package/dist/client/assets/session-ref-lookup-state-SATH_jAP.js +1 -0
  256. package/dist/client/assets/{session-table-PTQVoTyc.js → session-table-BQfR7u6r.js} +1 -1
  257. package/dist/client/assets/{settings-2fC_G9nX.js → settings-Dyvpkb1D.js} +1 -1
  258. package/dist/client/assets/{sliders-horizontal-BPSMHhbm.js → sliders-horizontal-C8njVwfg.js} +1 -1
  259. package/dist/client/assets/{sparkles-Dy8p5xN8.js → sparkles-CETYrxGA.js} +1 -1
  260. package/dist/client/assets/{sse-CiOSzE5n.js → sse-CD9MMUxl.js} +1 -1
  261. package/dist/client/assets/{tail-events-BMQmSx1n.js → tail-events-Ps8KpKah.js} +1 -1
  262. package/dist/client/assets/{terminal-yN9xN-h9.js → terminal-9GRS_Qdc.js} +1 -1
  263. package/dist/client/assets/{terminal-relay-9lhzEp2V.js → terminal-relay-GYMIvKs1.js} +1 -1
  264. package/dist/client/assets/{terminal-takeover-DANQfTcy.js → terminal-takeover-_Jyys4me.js} +1 -1
  265. package/dist/client/assets/{text-CnZ0e1-V.js → text-BP3oyl8-.js} +1 -1
  266. package/dist/client/assets/{text-rLpBg4_z.css → text-BYAFNLNq.css} +1 -1
  267. package/dist/client/assets/{use-conversation-list-D9BNLfnW.js → use-conversation-list-C9ABzjXI.js} +1 -1
  268. package/dist/client/assets/use-fleet-active-asks-DAspZQjE.js +1 -0
  269. package/dist/client/assets/{use-mesh-ops-items-BIvIHlqe.js → use-mesh-ops-items-Dh54ymEp.js} +1 -1
  270. package/dist/client/assets/{use-reduced-motion-CKkhq9c5.js → use-reduced-motion-x8pJMVrG.js} +1 -1
  271. package/dist/client/assets/{use-scout-dev-flags-B2KCzPxn.js → use-scout-dev-flags-DhCbiDK3.js} +1 -1
  272. package/dist/client/assets/{useAgentHoverCard-CHBsxcbp.js → useAgentHoverCard-DoBwV0LX.js} +1 -1
  273. package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +1 -0
  274. package/dist/client/assets/{usePierreRuntime-DUuXH5yp.js → usePierreRuntime-ejq9dCWV.js} +1 -1
  275. package/dist/client/assets/{wrench-YcXMlsh2.js → wrench-DjkoAOQt.js} +1 -1
  276. package/dist/client/assets/{x-e3h2hDsp.js → x-CAbNespN.js} +1 -1
  277. package/dist/client/assets/{xterm-Byp1Hep_.js → xterm-Cf-ngcGP.js} +1 -1
  278. package/dist/client/assets/{zap-nMcjPoWB.js → zap-Cq8eWkcF.js} +1 -1
  279. package/dist/client/index.html +1 -1
  280. package/dist/drizzle/0009_old_korg.sql +72 -0
  281. package/dist/drizzle/0010_sparkling_colonel_america.sql +2 -0
  282. package/dist/drizzle/0011_funny_onslaught.sql +4 -0
  283. package/dist/drizzle/0012_high_blazing_skull.sql +16 -0
  284. package/dist/drizzle/0013_perfect_juggernaut.sql +1 -0
  285. package/dist/drizzle/0014_legal_meggan.sql +6 -0
  286. package/dist/drizzle/0015_lame_marvel_boy.sql +12 -0
  287. package/dist/drizzle/0016_early_goliath.sql +6 -0
  288. package/dist/drizzle/meta/0009_snapshot.json +6262 -0
  289. package/dist/drizzle/meta/0010_snapshot.json +6286 -0
  290. package/dist/drizzle/meta/0011_snapshot.json +6337 -0
  291. package/dist/drizzle/meta/0012_snapshot.json +6458 -0
  292. package/dist/drizzle/meta/0013_snapshot.json +6465 -0
  293. package/dist/drizzle/meta/0014_snapshot.json +6503 -0
  294. package/dist/drizzle/meta/0015_snapshot.json +6596 -0
  295. package/dist/drizzle/meta/0016_snapshot.json +6611 -0
  296. package/dist/drizzle/meta/_journal.json +56 -0
  297. package/dist/main.mjs +1306 -360
  298. package/dist/node/main.mjs +314 -12
  299. package/dist/pairing-runtime-controller.mjs +608 -108
  300. package/dist/runtime/base-daemon.mjs +30 -3
  301. package/dist/runtime/broker-daemon.mjs +4771 -529
  302. package/dist/runtime/broker-process-manager.mjs +23 -2
  303. package/dist/runtime/mesh-discover.mjs +23 -2
  304. package/dist/scout-control-plane-web.mjs +1914 -478
  305. package/package.json +2 -2
  306. package/dist/client/assets/AgentLanesEmbedScreen-BmLnN4on.js +0 -1
  307. package/dist/client/assets/AgentLanesPreflight-5B6sXvRB.js +0 -1
  308. package/dist/client/assets/AgentLanesView-DHyzVBk6.js +0 -2
  309. package/dist/client/assets/AgentsSubnav-CDMjKeYC.js +0 -1
  310. package/dist/client/assets/ChatCollapsedStrip-Ycm0ecaX.js +0 -1
  311. package/dist/client/assets/ConversationScreen-BNULZAp2.js +0 -2
  312. package/dist/client/assets/CrewWorkspaces-CJhBKVoZ.css +0 -1
  313. package/dist/client/assets/CrewWorkspaces-CkPYIA46.js +0 -1
  314. package/dist/client/assets/FlightObserveScreen-CDWGSKZg.js +0 -1
  315. package/dist/client/assets/MessagesScreen-Eulveud3.js +0 -1
  316. package/dist/client/assets/NewChatComposer-hlWT-nbR.js +0 -19
  317. package/dist/client/assets/OpsScreen-Ppen_Lmj.js +0 -1
  318. package/dist/client/assets/OpsSubnav-GAKsoSor.js +0 -1
  319. package/dist/client/assets/ProjectAgentProfile-BLlp2e6t.js +0 -1
  320. package/dist/client/assets/ProjectsInbox-Dlt8OQ8O.js +0 -2
  321. package/dist/client/assets/ProjectsRail-DCfNMmnW.js +0 -1
  322. package/dist/client/assets/ProjectsScreen-BP-hmI1m.js +0 -1
  323. package/dist/client/assets/ProjectsThreadAside-CWpMjGIH.js +0 -1
  324. package/dist/client/assets/RealtimeVoiceScreen-D7zZHK_t.js +0 -1
  325. package/dist/client/assets/ScoutDeckSurface-CKT3qdqY.js +0 -1
  326. package/dist/client/assets/SessionEmbedScreen-RD5XOx7R.js +0 -1
  327. package/dist/client/assets/SessionRefScreen-B_cTv47v.js +0 -1
  328. package/dist/client/assets/SessionsScreen-Bq0Z77On.js +0 -1
  329. package/dist/client/assets/archive-BjcGiAy8.js +0 -1
  330. package/dist/client/assets/content-6RvWTrtk.js +0 -1
  331. package/dist/client/assets/content-BCgwMUqz.js +0 -1
  332. package/dist/client/assets/content-Bf2VLhx0.js +0 -1
  333. package/dist/client/assets/content-BrU_38-m.js +0 -1
  334. package/dist/client/assets/content-BvvJN8rN.js +0 -1
  335. package/dist/client/assets/content-CAeEqYPw.js +0 -1
  336. package/dist/client/assets/content-CI_Z9DXk.js +0 -1
  337. package/dist/client/assets/content-CbyKONhW.js +0 -1
  338. package/dist/client/assets/content-Czogvp43.js +0 -1
  339. package/dist/client/assets/content-DFk0zNzX.js +0 -1
  340. package/dist/client/assets/content-DHe4DgkA.js +0 -1
  341. package/dist/client/assets/content-DTz7cKjo.js +0 -1
  342. package/dist/client/assets/content-E3kudY-W.js +0 -1
  343. package/dist/client/assets/content-LpO0aO_U.js +0 -1
  344. package/dist/client/assets/conversation-motion-features-BKkCRaWR.js +0 -1
  345. package/dist/client/assets/discover-CHbrEItO.js +0 -2
  346. package/dist/client/assets/embed-entry-vil28MyU.js +0 -2
  347. package/dist/client/assets/index-BVlMw8x_.js +0 -1
  348. package/dist/client/assets/index-Cn0GR-q1.js +0 -1
  349. package/dist/client/assets/index-DosI4AG9.js +0 -1
  350. package/dist/client/assets/left-BpgWnaah.js +0 -1
  351. package/dist/client/assets/left-Cx0kv6pe.js +0 -1
  352. package/dist/client/assets/left-agents-qL5PpUY-.js +0 -1
  353. package/dist/client/assets/left-z-6CkuBe.js +0 -2
  354. package/dist/client/assets/projects-inbox-BBs1hG13.css +0 -1
  355. package/dist/client/assets/projects-inbox-D-zAb9Gp.js +0 -1
  356. package/dist/client/assets/resolve-panes-DO6LkwhQ.js +0 -1
  357. package/dist/client/assets/resolve-sidebar-context-CIF288wY.js +0 -1
  358. package/dist/client/assets/router-DJj2WbDg.js +0 -1
  359. package/dist/client/assets/use-fleet-active-asks-BeAdcl09.js +0 -1
  360. package/dist/client/assets/useContentSecondaryNav-D0mUhxTF.js +0 -1
@@ -1 +1 @@
1
- import{r as p,j as r}from"./index-CZ-05hKz.js";/* empty css */import{i as J,n as Z,s as ee}from"./colors-BtO5_zlx.js";import{a as A}from"./api-Co9aQ2Jw.js";import{u as te}from"./sse-CiOSzE5n.js";import{t as re}from"./time-Dhsh_2EG.js";import{D as ne}from"./DataTable-6IDhanr5.js";import{u as ae}from"./useAgentHoverCard-CHBsxcbp.js";import{S as se}from"./search-D1tJSAWe.js";import{S as oe}from"./sliders-horizontal-BPSMHhbm.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";/* empty css */import"./index-BVlMw8x_.js";import"./AgentDetailCard-UqPNpcvB.js";import"./AgentLiveActions-BwuzOE8h.js";import"./terminal-takeover-DANQfTcy.js";import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./NewChatComposer-hlWT-nbR.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./HarnessMark-D5CA5uSp.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./openContent-C6XO6kr5.js";import"./eye-CpfyvdLq.js";import"./terminal-yN9xN-h9.js";function ie(e,t){return{model:t?.data.metadata?.session?.model??e.model??null,provider:t?.data.metadata?.session?.modelProvider??e.providerName??null}}const ce=["openai","codex","codex_app_server"],ue=["anthropic","claude","claude-code","claude_stream_json"],W={"openai:gpt-5.5":{provider:"openai",model:"gpt-5.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:30,webSearchPer1K:10},"openai:gpt-5.5-pro":{provider:"openai",model:"gpt-5.5-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.4":{provider:"openai",model:"gpt-5.4",inputPerM:2.5,cachedInputPerM:.25,cacheWritePerM:null,outputPerM:15,webSearchPer1K:10},"openai:gpt-5.4-mini":{provider:"openai",model:"gpt-5.4-mini",inputPerM:.75,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:4.5,webSearchPer1K:10},"openai:gpt-5.4-nano":{provider:"openai",model:"gpt-5.4-nano",inputPerM:.2,cachedInputPerM:.02,cacheWritePerM:null,outputPerM:1.25,webSearchPer1K:10},"openai:gpt-5.4-pro":{provider:"openai",model:"gpt-5.4-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.3-codex":{provider:"openai",model:"gpt-5.3-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.3-chat-latest":{provider:"openai",model:"gpt-5.3-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2":{provider:"openai",model:"gpt-5.2",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-codex":{provider:"openai",model:"gpt-5.2-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-chat-latest":{provider:"openai",model:"gpt-5.2-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-pro":{provider:"openai",model:"gpt-5.2-pro",inputPerM:21,cachedInputPerM:null,cacheWritePerM:null,outputPerM:168,webSearchPer1K:10},"openai:gpt-5.1":{provider:"openai",model:"gpt-5.1",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex":{provider:"openai",model:"gpt-5.1-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex-max":{provider:"openai",model:"gpt-5.1-codex-max",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-chat-latest":{provider:"openai",model:"gpt-5.1-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5":{provider:"openai",model:"gpt-5",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-codex":{provider:"openai",model:"gpt-5-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-chat-latest":{provider:"openai",model:"gpt-5-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-mini":{provider:"openai",model:"gpt-5-mini",inputPerM:.25,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:2,webSearchPer1K:10},"openai:gpt-5-nano":{provider:"openai",model:"gpt-5-nano",inputPerM:.05,cachedInputPerM:.005,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-5-pro":{provider:"openai",model:"gpt-5-pro",inputPerM:15,cachedInputPerM:null,cacheWritePerM:null,outputPerM:120,webSearchPer1K:10},"openai:gpt-4.1":{provider:"openai",model:"gpt-4.1",inputPerM:2,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:8,webSearchPer1K:10},"openai:gpt-4.1-mini":{provider:"openai",model:"gpt-4.1-mini",inputPerM:.4,cachedInputPerM:.1,cacheWritePerM:null,outputPerM:1.6,webSearchPer1K:10},"openai:gpt-4.1-nano":{provider:"openai",model:"gpt-4.1-nano",inputPerM:.1,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-4o":{provider:"openai",model:"gpt-4o",inputPerM:2.5,cachedInputPerM:1.25,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-4o-mini":{provider:"openai",model:"gpt-4o-mini",inputPerM:.15,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:.6,webSearchPer1K:10},"anthropic:claude-opus-4.6":{provider:"anthropic",model:"claude-opus-4.6",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.5":{provider:"anthropic",model:"claude-opus-4.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.1":{provider:"anthropic",model:"claude-opus-4.1",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-opus-4":{provider:"anthropic",model:"claude-opus-4",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-sonnet-4.6":{provider:"anthropic",model:"claude-sonnet-4.6",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4.5":{provider:"anthropic",model:"claude-sonnet-4.5",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4":{provider:"anthropic",model:"claude-sonnet-4",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-3-7-sonnet":{provider:"anthropic",model:"claude-3-7-sonnet",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-haiku-4.5":{provider:"anthropic",model:"claude-haiku-4.5",inputPerM:1,cachedInputPerM:.1,cacheWritePerM:1.25,outputPerM:5,webSearchPer1K:10}},le={"claude-sonnet-4-5":"anthropic:claude-sonnet-4.5","claude-sonnet-4-6":"anthropic:claude-sonnet-4.6","claude-opus-4-5":"anthropic:claude-opus-4.5","claude-opus-4-6":"anthropic:claude-opus-4.6","claude-haiku-4-5":"anthropic:claude-haiku-4.5"};function pe(e){const t=e.provider?.trim().toLowerCase()??"",s=e.adapterType?.trim().toLowerCase()??"",a=V(e.model)??"",i=[t,s].filter(Boolean);return i.some(o=>ce.some(c=>o.includes(c)))?"openai":i.some(o=>ue.some(c=>o.includes(c)))?"anthropic":a.startsWith("gpt-")||a.startsWith("o")||a.includes("codex")?"openai":a.startsWith("claude-")?"anthropic":"unknown"}function V(e){return e?e.trim().toLowerCase().replace(/^(openai|anthropic)\//,"").replace(/_/g,"-").replace(/-\d{8}$/,""):null}function de(e){const t=x(e?.inputTokens),s=x(e?.cacheReadInputTokens),a=x(e?.cacheCreationInputTokens),i=x(e?.outputTokens),o=x(e?.reasoningOutputTokens),c=[t,i].reduce((m,b)=>m+(b??0),0),h=x(e?.totalTokens)??(c||null);return{input:t,uncachedInput:t==null?null:Math.max(0,t-(s??0)-(a??0)),cachedInput:s,cacheWrite:a,output:i,reasoningOutput:o,total:h,webSearchRequests:x(e?.webSearchRequests),webFetchRequests:x(e?.webFetchRequests)}}function he(e){const t=pe(e),s=V(e.model),a=de(e.usage),i=me(t,s),o=ge(e);if(!i.rateCard)return{provider:t,model:s,rateCard:null,rateCardSource:"unknown",capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:[],totalUsd:null,billedTotalUsd:null,billingMode:o,subscriptionWindows:e.subscriptionWindows??[]};const c=i.rateCard,h=a.uncachedInput??a.input??0,m=a.cachedInput??0,b=a.cacheWrite??0,g=a.output??0,v=a.webSearchRequests??0,f=[j("input","Input",h,c.inputPerM,o),j("cached_input","Cached input",m,c.cachedInputPerM??c.inputPerM,o),j("cache_write","Cache write",b,c.cacheWritePerM??c.inputPerM,o),j("output","Output",g,c.outputPerM,o),{key:"web_search",label:"Web search",quantity:v,unit:"requests",rate:c.webSearchPer1K??0,billedRate:o==="subscription"?0:c.webSearchPer1K??0,costUsd:v/1e3*(c.webSearchPer1K??0),billedCostUsd:o==="subscription"?0:v/1e3*(c.webSearchPer1K??0)}].filter(P=>P.quantity>0);return{provider:t,model:s,rateCard:c,rateCardSource:i.source,capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:f,totalUsd:f.reduce((P,d)=>P+d.costUsd,0),billedTotalUsd:f.reduce((P,d)=>P+d.billedCostUsd,0),billingMode:o,subscriptionWindows:e.subscriptionWindows??[]}}function me(e,t){if(e==="unknown")return{rateCard:null,source:"unknown"};const s=t?`${e}:${t}`:null;if(s&&W[s])return{rateCard:W[s],source:"exact"};const a=t?le[t]:null;if(a&&W[a])return{rateCard:W[a],source:"alias"};if(e==="anthropic"){if(t?.includes("opus"))return{rateCard:W["anthropic:claude-opus-4.5"],source:"provider-default"};if(t?.includes("haiku"))return{rateCard:W["anthropic:claude-haiku-4.5"],source:"provider-default"};if(t?.includes("sonnet")||!t)return{rateCard:W["anthropic:claude-sonnet-4.5"],source:"provider-default"}}return{rateCard:null,source:"unknown"}}function j(e,t,s,a,i){const o=i==="subscription"?0:a;return{key:e,label:t,quantity:s,unit:"tokens",rate:a,billedRate:o,costUsd:s/1e6*a,billedCostUsd:s/1e6*o}}function x(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function ge(e){if(e.billingMode)return e.billingMode;const t=e.adapterType?.trim().toLowerCase();if(t==="claude-code"||t==="claude_stream_json")return"subscription";const s=e.usage?.planType?.trim().toLowerCase();return!s||s==="api"||s.includes("api")?"api":"subscription"}const Pe=1500,T=1440*6e4,Me=90*6e4,E={needs_attention:0,in_turn:1,in_flight:2,callable:3,blocked:4},be=[{key:"agent",label:"Agent",kind:"custom",sortable:!0,sortValue:e=>e.agent.name.toLowerCase(),defaultWidth:220,minWidth:160,render:e=>r.jsxs("div",{className:"s-ops-agents-agent-cell",children:[r.jsx("span",{className:"s-ops-agents-dot",style:{background:ee(e.state)},"aria-hidden":!0}),r.jsx("span",{className:"s-ops-agents-agent-name",title:e.agent.name,children:e.agent.handle??e.agent.name})]})},{key:"task",label:"Active task",kind:"custom",sortable:!0,sortValue:e=>(e.activeTask??"").toLowerCase()||null,defaultWidth:240,minWidth:140,render:e=>e.activeTask?r.jsx("span",{className:"s-ops-agents-task",title:e.activeTask,children:e.activeTask}):r.jsx("span",{className:"s-ops-agents-task s-ops-agents-task--idle",children:"—"})},{key:"team",label:"Project",kind:"text",defaultWidth:140,minWidth:90,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.team}),sortValue:e=>e.team.toLowerCase()},{key:"machine",label:"Machine",kind:"text",defaultWidth:120,minWidth:88,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.machine}),sortValue:e=>e.machine.toLowerCase()},{key:"active",label:"Active",kind:"number",defaultWidth:90,minWidth:64,cls:"s-ops-agents-num",render:e=>e.activeFlights,sortValue:e=>e.activeFlights},{key:"sessions24h",label:"24h sessions",kind:"number",defaultWidth:108,minWidth:78,cls:"s-ops-agents-num",render:e=>e.sessions24h,sortValue:e=>e.sessions24h},{key:"throughput",label:"Throughput",kind:"custom",sortable:!1,defaultWidth:110,minWidth:90,render:e=>r.jsx(ke,{values:e.throughput,warn:e.errors>0})},{key:"avgLatency",label:"Avg latency",kind:"number",defaultWidth:108,minWidth:80,cls:"s-ops-agents-num",render:e=>D(e.avgLatencyMs),sortValue:e=>e.avgLatencyMs},{key:"input",label:"Input",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.uncachedInput??e.usage.input),sortValue:e=>e.usage.uncachedInput??e.usage.input??null},{key:"cacheRead",label:"Cache read",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cachedInput),sortValue:e=>e.usage.cachedInput??null},{key:"cacheWrite",label:"Cache write",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cacheWrite),sortValue:e=>e.usage.cacheWrite??null},{key:"output",label:"Output",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.output),sortValue:e=>e.usage.output??null},{key:"apiEquiv",label:"API equiv",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.rateCardSource==="unknown"?"s-ops-agents-num--dim":void 0,children:N(e.cost.totalUsd)}),sortValue:e=>e.cost.totalUsd??null},{key:"billed",label:"Billed",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.billingMode==="subscription"?"s-ops-agents-num--covered":void 0,children:N(e.cost.billedTotalUsd)}),sortValue:e=>e.cost.billedTotalUsd??null},{key:"errors",label:"Errors",kind:"number",defaultWidth:72,minWidth:58,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.errors>0?"s-ops-agents-num--warn":void 0,children:e.errors}),sortValue:e=>e.errors},{key:"lastActive",label:"Last active",kind:"time",defaultWidth:104,minWidth:78,cls:"s-ops-agents-last",render:e=>e.lastActiveAt?re(e.lastActiveAt):"—",sortValue:e=>e.lastActiveAt}];function U(e){if(!e)return null;const t=e.replace(/\/+$/,""),s=t.lastIndexOf("/");return s>=0?t.slice(s+1):t}function w(e){return e==null?"—":e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function D(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function N(e){return e==null?"$—":e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}function fe(e,t){if(!e)return null;const s=e.data.events.filter(i=>i.kind==="message"||i.kind==="tool").filter(i=>t-i.t<=Me).sort((i,o)=>i.t-o.t);if(s.length<2)return null;const a=[];for(let i=1;i<s.length;i+=1){const o=s[i].t-s[i-1].t;o>0&&o<12e4&&a.push(o)}return a.length===0?null:Math.round(a.reduce((i,o)=>i+o,0)/a.length)}function ve(e,t){const s=new Array(24).fill(0),a=t-T;for(const i of e){if(i.ts<a||i.ts>t)continue;const o=Math.min(23,Math.max(0,Math.floor((i.ts-a)/T*s.length)));s[o]+=1}return s}function ke({values:e,warn:t=!1}){const i=Math.max(1,...e),o=e.map((c,h)=>{const m=h/Math.max(1,e.length-1)*92,b=22-c/i*19-1.5;return`${m.toFixed(1)},${b.toFixed(1)}`}).join(" ");return r.jsx("svg",{className:`s-ops-agents-spark${t?" s-ops-agents-spark--warn":""}`,viewBox:"0 0 92 22","aria-hidden":"true",children:r.jsx("polyline",{points:o,fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe(e){return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??U(e.cwd)??U(e.projectRoot)??"local"}function We(e){return e.project??e.role??e.agentClass??"Unassigned"}function Se(e){if(e.length===0)return null;const t={working:0,needs_attention:1,queued:2,failed:3,completed:4},a=[...e].sort((o,c)=>{const h=t[o.status]-t[c.status];return h!==0?h:(c.updatedAt??0)-(o.updatedAt??0)})[0];return(a.task??a.summary??"").trim()||null}function we(e,t,s,a,i,o){const c=t.filter(l=>l.agentId===e.id),h=c.filter(l=>{const I=l.lastMessageAt??0;return I>0&&o-I<=T}),m=e.conversationId,b=s.filter(l=>l.actorName===e.name||!!(m&&l.conversationId===m)),g=i.get(e.id),{model:v,provider:f}=ie(e,g),P=he({adapterType:g?.data.metadata?.session?.adapterType,capturedAt:g?.updatedAt??o,model:v,provider:f,usage:g?.data.metadata?.usage}),d=a.filter(l=>l.agentId===e.id);return{agent:e,team:We(e),machine:xe(e),model:v,provider:f,state:Z(e.state),activeFlights:d.length,activeTask:Se(d),sessions24h:h.length,throughput:ve(b,o),avgLatencyMs:fe(g,o),usage:P.usage,cost:P,errors:d.filter(l=>l.status==="failed"||l.status==="needs_attention").length,lastActiveAt:Math.max(0,...c.map(l=>l.lastMessageAt??0),...b.map(l=>l.ts),e.updatedAt??0)||null}}function ft({navigate:e,agents:t}){const[s,a]=p.useState(null),[i,o]=p.useState([]),[c,h]=p.useState([]),[m,b]=p.useState([]),[g,v]=p.useState(""),[f,P]=p.useState(()=>Date.now()),d=p.useRef(null),l=p.useCallback(async()=>{const n=t.map(X=>X.id).join(","),[u,k,L,$]=await Promise.allSettled([A("/api/fleet"),A("/api/conversations"),A("/api/activity"),n?A(`/api/observe/agents?ids=${encodeURIComponent(n)}`):Promise.resolve([])]);u.status==="fulfilled"&&a(u.value),k.status==="fulfilled"&&o(k.value),L.status==="fulfilled"&&h(L.value),$.status==="fulfilled"&&b($.value),P(Date.now())},[t]);p.useEffect(()=>{l()},[l]);const I=p.useCallback(()=>{d.current||(d.current=setTimeout(()=>{d.current=null,l()},Pe))},[l]);te(I),p.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),p.useEffect(()=>{const n=setInterval(()=>P(Date.now()),1e3);return()=>clearInterval(n)},[]);const R=p.useMemo(()=>new Map(m.map(n=>[n.agentId,n])),[m]),M=p.useMemo(()=>{const n=s?.activeAsks??[];return t.map(u=>we(u,i,c,n,R,f))},[c,t,s?.activeAsks,f,R,i]),S=p.useMemo(()=>{const n=g.trim().toLowerCase();return n?M.filter(u=>`${u.agent.name} ${u.team} ${u.machine} ${u.agent.handle??""} ${u.agent.harness??""} ${u.activeTask??""}`.toLowerCase().includes(n)):M},[g,M]),[K,F]=p.useState({key:"lastActive",dir:-1}),O=p.useMemo(()=>K?.key==="agent"?void 0:(n,u)=>E[n.state]-E[u.state],[K?.key]),q=p.useMemo(()=>S.map(n=>n.agent),[S]),B=p.useMemo(()=>S.map(n=>n.agent.id),[S]),y=ae({agents:q,orderedIds:B,navigate:e,selectMode:"preview"}),z=M.filter(n=>n.state==="in_turn"||n.state==="in_flight").length,H=M.filter(n=>J(n.agent.state,n.agent)).length,Y=M.reduce((n,u)=>n+(u.usage.total??0),0),_=M.some(n=>n.cost.totalUsd!=null)?M.reduce((n,u)=>n+(u.cost.totalUsd??0),0):null,G=M.some(n=>n.cost.billedTotalUsd!=null)?M.reduce((n,u)=>n+(u.cost.billedTotalUsd??0),0):null,Q=(()=>{const n=M.map(u=>u.avgLatencyMs).filter(u=>u!=null);return n.length===0?null:Math.round(n.reduce((u,k)=>u+k,0)/n.length)})();return r.jsxs("div",{className:"s-ops-agents",children:[r.jsxs("main",{className:"s-ops-agents-main",children:[r.jsxs("div",{className:"s-ops-agents-toolbar",children:[r.jsxs("div",{className:"s-ops-agents-breadcrumb",children:["Agents ",r.jsx("span",{children:"/"})," Directory"]}),r.jsxs("div",{className:"s-ops-agents-live",children:[r.jsx("span",{className:"s-ops-agents-live-dot"}),H," active"]}),r.jsxs("div",{className:"s-ops-agents-search",children:[r.jsx(se,{size:13}),r.jsx("input",{value:g,onChange:n=>v(n.target.value),placeholder:"Search agents, tasks, projects, machines…"})]}),r.jsx("button",{className:"s-ops-agents-icon-btn",type:"button",title:"Filters",children:r.jsx(oe,{size:14})})]}),r.jsx("section",{className:"s-ops-agents-hero",children:r.jsxs("div",{children:[r.jsx("div",{className:"s-ops-agents-kicker",children:"Agents"}),r.jsx("h1",{children:"All agents"}),r.jsx("p",{children:"Every registered agent across the local fleet, sorted by live status."})]})}),r.jsxs("section",{className:"s-ops-agents-stats",children:[r.jsx(C,{label:"Running",value:String(z),sub:`of ${t.length} total`}),r.jsx(C,{label:"Tokens",value:w(Y||null),sub:_==null?"usage metadata pending":`${N(_)} API equiv`}),r.jsx(C,{label:"Avg latency",value:D(Q),sub:"recent observe events"}),r.jsx(C,{label:"Billed",value:N(G),sub:"subscription usage can mark this down"})]}),r.jsxs("section",{className:"s-ops-agents-table-panel",children:[r.jsxs("div",{className:"s-ops-agents-table-title",children:["Agents ",r.jsx("span",{children:S.length}),r.jsxs("span",{className:"s-ops-agents-hint","aria-hidden":!0,children:[r.jsx("kbd",{children:"↑"}),r.jsx("kbd",{children:"↓"})," navigate · ",r.jsx("kbd",{children:"enter"})," pin · ",r.jsx("kbd",{children:"o"})," open · ",r.jsx("kbd",{children:"esc"})," clear"]})]}),r.jsx("div",{className:"s-ops-agents-table-wrap",ref:y.containerRef,children:r.jsx(ne,{rows:S,columns:be,rowId:n=>n.agent.id,storageKey:"openscout.opsAgents.cols",sort:K,onSortChange:F,secondarySort:O,density:"compact",rowBindings:n=>{const u=y.bind(n);return{...u,onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),u.onClick())}}},rowState:n=>y.getState(n),empty:{title:"No agents match",body:"Adjust the search to find a different slice of the fleet."},className:"s-ops-agents-data-table",ariaLabel:"Agents directory"})})]})]}),y.card]})}function C({label:e,value:t,sub:s,tone:a="default"}){return r.jsxs("div",{className:`s-ops-agents-metric s-ops-agents-metric--${a}`,children:[r.jsx("div",{className:"s-ops-agents-metric-label",children:e}),r.jsx("div",{className:"s-ops-agents-metric-value",children:t}),r.jsx("div",{className:"s-ops-agents-metric-sub",children:s})]})}export{ft as OpsAgentsView};
1
+ import{r as p,j as r}from"./index-DvLtl7rV.js";/* empty css */import{i as J,n as Z,s as ee}from"./colors-BtO5_zlx.js";import{a as A}from"./api-Co9aQ2Jw.js";import{u as te}from"./sse-CD9MMUxl.js";import{t as re}from"./time-Dhsh_2EG.js";import{D as ne}from"./DataTable-Bp8tU9AK.js";import{u as ae}from"./useAgentHoverCard-DoBwV0LX.js";import{S as se}from"./search-CDko0PKE.js";import{S as oe}from"./sliders-horizontal-C8njVwfg.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";/* empty css */import"./index-zvhpRHao.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./Provider-CtXJeLrP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./openContent-C6XO6kr5.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.js";function ie(e,t){return{model:t?.data.metadata?.session?.model??e.model??null,provider:t?.data.metadata?.session?.modelProvider??e.providerName??null}}const ce=["openai","codex","codex_app_server"],ue=["anthropic","claude","claude-code","claude_stream_json"],W={"openai:gpt-5.5":{provider:"openai",model:"gpt-5.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:30,webSearchPer1K:10},"openai:gpt-5.5-pro":{provider:"openai",model:"gpt-5.5-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.4":{provider:"openai",model:"gpt-5.4",inputPerM:2.5,cachedInputPerM:.25,cacheWritePerM:null,outputPerM:15,webSearchPer1K:10},"openai:gpt-5.4-mini":{provider:"openai",model:"gpt-5.4-mini",inputPerM:.75,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:4.5,webSearchPer1K:10},"openai:gpt-5.4-nano":{provider:"openai",model:"gpt-5.4-nano",inputPerM:.2,cachedInputPerM:.02,cacheWritePerM:null,outputPerM:1.25,webSearchPer1K:10},"openai:gpt-5.4-pro":{provider:"openai",model:"gpt-5.4-pro",inputPerM:30,cachedInputPerM:null,cacheWritePerM:null,outputPerM:180,webSearchPer1K:10},"openai:gpt-5.3-codex":{provider:"openai",model:"gpt-5.3-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.3-chat-latest":{provider:"openai",model:"gpt-5.3-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2":{provider:"openai",model:"gpt-5.2",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-codex":{provider:"openai",model:"gpt-5.2-codex",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-chat-latest":{provider:"openai",model:"gpt-5.2-chat-latest",inputPerM:1.75,cachedInputPerM:.175,cacheWritePerM:null,outputPerM:14,webSearchPer1K:10},"openai:gpt-5.2-pro":{provider:"openai",model:"gpt-5.2-pro",inputPerM:21,cachedInputPerM:null,cacheWritePerM:null,outputPerM:168,webSearchPer1K:10},"openai:gpt-5.1":{provider:"openai",model:"gpt-5.1",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex":{provider:"openai",model:"gpt-5.1-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-codex-max":{provider:"openai",model:"gpt-5.1-codex-max",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5.1-chat-latest":{provider:"openai",model:"gpt-5.1-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5":{provider:"openai",model:"gpt-5",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-codex":{provider:"openai",model:"gpt-5-codex",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-chat-latest":{provider:"openai",model:"gpt-5-chat-latest",inputPerM:1.25,cachedInputPerM:.125,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-5-mini":{provider:"openai",model:"gpt-5-mini",inputPerM:.25,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:2,webSearchPer1K:10},"openai:gpt-5-nano":{provider:"openai",model:"gpt-5-nano",inputPerM:.05,cachedInputPerM:.005,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-5-pro":{provider:"openai",model:"gpt-5-pro",inputPerM:15,cachedInputPerM:null,cacheWritePerM:null,outputPerM:120,webSearchPer1K:10},"openai:gpt-4.1":{provider:"openai",model:"gpt-4.1",inputPerM:2,cachedInputPerM:.5,cacheWritePerM:null,outputPerM:8,webSearchPer1K:10},"openai:gpt-4.1-mini":{provider:"openai",model:"gpt-4.1-mini",inputPerM:.4,cachedInputPerM:.1,cacheWritePerM:null,outputPerM:1.6,webSearchPer1K:10},"openai:gpt-4.1-nano":{provider:"openai",model:"gpt-4.1-nano",inputPerM:.1,cachedInputPerM:.025,cacheWritePerM:null,outputPerM:.4,webSearchPer1K:10},"openai:gpt-4o":{provider:"openai",model:"gpt-4o",inputPerM:2.5,cachedInputPerM:1.25,cacheWritePerM:null,outputPerM:10,webSearchPer1K:10},"openai:gpt-4o-mini":{provider:"openai",model:"gpt-4o-mini",inputPerM:.15,cachedInputPerM:.075,cacheWritePerM:null,outputPerM:.6,webSearchPer1K:10},"anthropic:claude-opus-4.6":{provider:"anthropic",model:"claude-opus-4.6",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.5":{provider:"anthropic",model:"claude-opus-4.5",inputPerM:5,cachedInputPerM:.5,cacheWritePerM:6.25,outputPerM:25,webSearchPer1K:10},"anthropic:claude-opus-4.1":{provider:"anthropic",model:"claude-opus-4.1",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-opus-4":{provider:"anthropic",model:"claude-opus-4",inputPerM:15,cachedInputPerM:1.5,cacheWritePerM:18.75,outputPerM:75,webSearchPer1K:10},"anthropic:claude-sonnet-4.6":{provider:"anthropic",model:"claude-sonnet-4.6",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4.5":{provider:"anthropic",model:"claude-sonnet-4.5",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-sonnet-4":{provider:"anthropic",model:"claude-sonnet-4",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-3-7-sonnet":{provider:"anthropic",model:"claude-3-7-sonnet",inputPerM:3,cachedInputPerM:.3,cacheWritePerM:3.75,outputPerM:15,webSearchPer1K:10},"anthropic:claude-haiku-4.5":{provider:"anthropic",model:"claude-haiku-4.5",inputPerM:1,cachedInputPerM:.1,cacheWritePerM:1.25,outputPerM:5,webSearchPer1K:10}},le={"claude-sonnet-4-5":"anthropic:claude-sonnet-4.5","claude-sonnet-4-6":"anthropic:claude-sonnet-4.6","claude-opus-4-5":"anthropic:claude-opus-4.5","claude-opus-4-6":"anthropic:claude-opus-4.6","claude-haiku-4-5":"anthropic:claude-haiku-4.5"};function pe(e){const t=e.provider?.trim().toLowerCase()??"",s=e.adapterType?.trim().toLowerCase()??"",a=V(e.model)??"",i=[t,s].filter(Boolean);return i.some(o=>ce.some(c=>o.includes(c)))?"openai":i.some(o=>ue.some(c=>o.includes(c)))?"anthropic":a.startsWith("gpt-")||a.startsWith("o")||a.includes("codex")?"openai":a.startsWith("claude-")?"anthropic":"unknown"}function V(e){return e?e.trim().toLowerCase().replace(/^(openai|anthropic)\//,"").replace(/_/g,"-").replace(/-\d{8}$/,""):null}function de(e){const t=x(e?.inputTokens),s=x(e?.cacheReadInputTokens),a=x(e?.cacheCreationInputTokens),i=x(e?.outputTokens),o=x(e?.reasoningOutputTokens),c=[t,i].reduce((m,b)=>m+(b??0),0),h=x(e?.totalTokens)??(c||null);return{input:t,uncachedInput:t==null?null:Math.max(0,t-(s??0)-(a??0)),cachedInput:s,cacheWrite:a,output:i,reasoningOutput:o,total:h,webSearchRequests:x(e?.webSearchRequests),webFetchRequests:x(e?.webFetchRequests)}}function he(e){const t=pe(e),s=V(e.model),a=de(e.usage),i=me(t,s),o=ge(e);if(!i.rateCard)return{provider:t,model:s,rateCard:null,rateCardSource:"unknown",capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:[],totalUsd:null,billedTotalUsd:null,billingMode:o,subscriptionWindows:e.subscriptionWindows??[]};const c=i.rateCard,h=a.uncachedInput??a.input??0,m=a.cachedInput??0,b=a.cacheWrite??0,g=a.output??0,v=a.webSearchRequests??0,f=[j("input","Input",h,c.inputPerM,o),j("cached_input","Cached input",m,c.cachedInputPerM??c.inputPerM,o),j("cache_write","Cache write",b,c.cacheWritePerM??c.inputPerM,o),j("output","Output",g,c.outputPerM,o),{key:"web_search",label:"Web search",quantity:v,unit:"requests",rate:c.webSearchPer1K??0,billedRate:o==="subscription"?0:c.webSearchPer1K??0,costUsd:v/1e3*(c.webSearchPer1K??0),billedCostUsd:o==="subscription"?0:v/1e3*(c.webSearchPer1K??0)}].filter(P=>P.quantity>0);return{provider:t,model:s,rateCard:c,rateCardSource:i.source,capturedAt:e.capturedAt??Date.now(),usage:a,lineItems:f,totalUsd:f.reduce((P,d)=>P+d.costUsd,0),billedTotalUsd:f.reduce((P,d)=>P+d.billedCostUsd,0),billingMode:o,subscriptionWindows:e.subscriptionWindows??[]}}function me(e,t){if(e==="unknown")return{rateCard:null,source:"unknown"};const s=t?`${e}:${t}`:null;if(s&&W[s])return{rateCard:W[s],source:"exact"};const a=t?le[t]:null;if(a&&W[a])return{rateCard:W[a],source:"alias"};if(e==="anthropic"){if(t?.includes("opus"))return{rateCard:W["anthropic:claude-opus-4.5"],source:"provider-default"};if(t?.includes("haiku"))return{rateCard:W["anthropic:claude-haiku-4.5"],source:"provider-default"};if(t?.includes("sonnet")||!t)return{rateCard:W["anthropic:claude-sonnet-4.5"],source:"provider-default"}}return{rateCard:null,source:"unknown"}}function j(e,t,s,a,i){const o=i==="subscription"?0:a;return{key:e,label:t,quantity:s,unit:"tokens",rate:a,billedRate:o,costUsd:s/1e6*a,billedCostUsd:s/1e6*o}}function x(e){return typeof e=="number"&&Number.isFinite(e)?e:null}function ge(e){if(e.billingMode)return e.billingMode;const t=e.adapterType?.trim().toLowerCase();if(t==="claude-code"||t==="claude_stream_json")return"subscription";const s=e.usage?.planType?.trim().toLowerCase();return!s||s==="api"||s.includes("api")?"api":"subscription"}const Pe=1500,T=1440*6e4,Me=90*6e4,E={needs_attention:0,in_turn:1,in_flight:2,callable:3,blocked:4},be=[{key:"agent",label:"Agent",kind:"custom",sortable:!0,sortValue:e=>e.agent.name.toLowerCase(),defaultWidth:220,minWidth:160,render:e=>r.jsxs("div",{className:"s-ops-agents-agent-cell",children:[r.jsx("span",{className:"s-ops-agents-dot",style:{background:ee(e.state)},"aria-hidden":!0}),r.jsx("span",{className:"s-ops-agents-agent-name",title:e.agent.name,children:e.agent.handle??e.agent.name})]})},{key:"task",label:"Active task",kind:"custom",sortable:!0,sortValue:e=>(e.activeTask??"").toLowerCase()||null,defaultWidth:240,minWidth:140,render:e=>e.activeTask?r.jsx("span",{className:"s-ops-agents-task",title:e.activeTask,children:e.activeTask}):r.jsx("span",{className:"s-ops-agents-task s-ops-agents-task--idle",children:"—"})},{key:"team",label:"Project",kind:"text",defaultWidth:140,minWidth:90,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.team}),sortValue:e=>e.team.toLowerCase()},{key:"machine",label:"Machine",kind:"text",defaultWidth:120,minWidth:88,cls:"s-ops-agents-meta",render:e=>r.jsx("span",{className:"s-ops-agents-meta-cell",children:e.machine}),sortValue:e=>e.machine.toLowerCase()},{key:"active",label:"Active",kind:"number",defaultWidth:90,minWidth:64,cls:"s-ops-agents-num",render:e=>e.activeFlights,sortValue:e=>e.activeFlights},{key:"sessions24h",label:"24h sessions",kind:"number",defaultWidth:108,minWidth:78,cls:"s-ops-agents-num",render:e=>e.sessions24h,sortValue:e=>e.sessions24h},{key:"throughput",label:"Throughput",kind:"custom",sortable:!1,defaultWidth:110,minWidth:90,render:e=>r.jsx(ke,{values:e.throughput,warn:e.errors>0})},{key:"avgLatency",label:"Avg latency",kind:"number",defaultWidth:108,minWidth:80,cls:"s-ops-agents-num",render:e=>D(e.avgLatencyMs),sortValue:e=>e.avgLatencyMs},{key:"input",label:"Input",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.uncachedInput??e.usage.input),sortValue:e=>e.usage.uncachedInput??e.usage.input??null},{key:"cacheRead",label:"Cache read",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cachedInput),sortValue:e=>e.usage.cachedInput??null},{key:"cacheWrite",label:"Cache write",kind:"number",defaultWidth:98,minWidth:72,cls:"s-ops-agents-num",render:e=>w(e.usage.cacheWrite),sortValue:e=>e.usage.cacheWrite??null},{key:"output",label:"Output",kind:"number",defaultWidth:88,minWidth:64,cls:"s-ops-agents-num",render:e=>w(e.usage.output),sortValue:e=>e.usage.output??null},{key:"apiEquiv",label:"API equiv",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.rateCardSource==="unknown"?"s-ops-agents-num--dim":void 0,children:N(e.cost.totalUsd)}),sortValue:e=>e.cost.totalUsd??null},{key:"billed",label:"Billed",kind:"number",defaultWidth:92,minWidth:72,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.cost.billingMode==="subscription"?"s-ops-agents-num--covered":void 0,children:N(e.cost.billedTotalUsd)}),sortValue:e=>e.cost.billedTotalUsd??null},{key:"errors",label:"Errors",kind:"number",defaultWidth:72,minWidth:58,cls:"s-ops-agents-num",render:e=>r.jsx("span",{className:e.errors>0?"s-ops-agents-num--warn":void 0,children:e.errors}),sortValue:e=>e.errors},{key:"lastActive",label:"Last active",kind:"time",defaultWidth:104,minWidth:78,cls:"s-ops-agents-last",render:e=>e.lastActiveAt?re(e.lastActiveAt):"—",sortValue:e=>e.lastActiveAt}];function U(e){if(!e)return null;const t=e.replace(/\/+$/,""),s=t.lastIndexOf("/");return s>=0?t.slice(s+1):t}function w(e){return e==null?"—":e>=1e6?`${(e/1e6).toFixed(e>=1e7?0:1)}M`:e>=1e3?`${(e/1e3).toFixed(e>=1e4?0:1)}K`:String(e)}function D(e){return e==null?"—":e<1e3?`${Math.round(e)}ms`:`${(e/1e3).toFixed(2)}s`}function N(e){return e==null?"$—":e<1?`$${e.toFixed(3)}`:`$${e.toFixed(2)}`}function fe(e,t){if(!e)return null;const s=e.data.events.filter(i=>i.kind==="message"||i.kind==="tool").filter(i=>t-i.t<=Me).sort((i,o)=>i.t-o.t);if(s.length<2)return null;const a=[];for(let i=1;i<s.length;i+=1){const o=s[i].t-s[i-1].t;o>0&&o<12e4&&a.push(o)}return a.length===0?null:Math.round(a.reduce((i,o)=>i+o,0)/a.length)}function ve(e,t){const s=new Array(24).fill(0),a=t-T;for(const i of e){if(i.ts<a||i.ts>t)continue;const o=Math.min(23,Math.max(0,Math.floor((i.ts-a)/T*s.length)));s[o]+=1}return s}function ke({values:e,warn:t=!1}){const i=Math.max(1,...e),o=e.map((c,h)=>{const m=h/Math.max(1,e.length-1)*92,b=22-c/i*19-1.5;return`${m.toFixed(1)},${b.toFixed(1)}`}).join(" ");return r.jsx("svg",{className:`s-ops-agents-spark${t?" s-ops-agents-spark--warn":""}`,viewBox:"0 0 92 22","aria-hidden":"true",children:r.jsx("polyline",{points:o,fill:"none",stroke:"currentColor",strokeWidth:"1.7",strokeLinecap:"round",strokeLinejoin:"round"})})}function xe(e){return e.authorityNodeName??e.homeNodeName??e.authorityNodeId??e.homeNodeId??e.transport??U(e.cwd)??U(e.projectRoot)??"local"}function We(e){return e.project??e.role??e.agentClass??"Unassigned"}function Se(e){if(e.length===0)return null;const t={working:0,needs_attention:1,queued:2,failed:3,completed:4},a=[...e].sort((o,c)=>{const h=t[o.status]-t[c.status];return h!==0?h:(c.updatedAt??0)-(o.updatedAt??0)})[0];return(a.task??a.summary??"").trim()||null}function we(e,t,s,a,i,o){const c=t.filter(l=>l.agentId===e.id),h=c.filter(l=>{const I=l.lastMessageAt??0;return I>0&&o-I<=T}),m=e.conversationId,b=s.filter(l=>l.actorName===e.name||!!(m&&l.conversationId===m)),g=i.get(e.id),{model:v,provider:f}=ie(e,g),P=he({adapterType:g?.data.metadata?.session?.adapterType,capturedAt:g?.updatedAt??o,model:v,provider:f,usage:g?.data.metadata?.usage}),d=a.filter(l=>l.agentId===e.id);return{agent:e,team:We(e),machine:xe(e),model:v,provider:f,state:Z(e.state),activeFlights:d.length,activeTask:Se(d),sessions24h:h.length,throughput:ve(b,o),avgLatencyMs:fe(g,o),usage:P.usage,cost:P,errors:d.filter(l=>l.status==="failed"||l.status==="needs_attention").length,lastActiveAt:Math.max(0,...c.map(l=>l.lastMessageAt??0),...b.map(l=>l.ts),e.updatedAt??0)||null}}function ft({navigate:e,agents:t}){const[s,a]=p.useState(null),[i,o]=p.useState([]),[c,h]=p.useState([]),[m,b]=p.useState([]),[g,v]=p.useState(""),[f,P]=p.useState(()=>Date.now()),d=p.useRef(null),l=p.useCallback(async()=>{const n=t.map(X=>X.id).join(","),[u,k,L,$]=await Promise.allSettled([A("/api/fleet"),A("/api/conversations"),A("/api/activity"),n?A(`/api/observe/agents?ids=${encodeURIComponent(n)}`):Promise.resolve([])]);u.status==="fulfilled"&&a(u.value),k.status==="fulfilled"&&o(k.value),L.status==="fulfilled"&&h(L.value),$.status==="fulfilled"&&b($.value),P(Date.now())},[t]);p.useEffect(()=>{l()},[l]);const I=p.useCallback(()=>{d.current||(d.current=setTimeout(()=>{d.current=null,l()},Pe))},[l]);te(I),p.useEffect(()=>()=>{d.current&&(clearTimeout(d.current),d.current=null)},[]),p.useEffect(()=>{const n=setInterval(()=>P(Date.now()),1e3);return()=>clearInterval(n)},[]);const R=p.useMemo(()=>new Map(m.map(n=>[n.agentId,n])),[m]),M=p.useMemo(()=>{const n=s?.activeAsks??[];return t.map(u=>we(u,i,c,n,R,f))},[c,t,s?.activeAsks,f,R,i]),S=p.useMemo(()=>{const n=g.trim().toLowerCase();return n?M.filter(u=>`${u.agent.name} ${u.team} ${u.machine} ${u.agent.handle??""} ${u.agent.harness??""} ${u.activeTask??""}`.toLowerCase().includes(n)):M},[g,M]),[K,F]=p.useState({key:"lastActive",dir:-1}),O=p.useMemo(()=>K?.key==="agent"?void 0:(n,u)=>E[n.state]-E[u.state],[K?.key]),q=p.useMemo(()=>S.map(n=>n.agent),[S]),B=p.useMemo(()=>S.map(n=>n.agent.id),[S]),y=ae({agents:q,orderedIds:B,navigate:e,selectMode:"preview"}),z=M.filter(n=>n.state==="in_turn"||n.state==="in_flight").length,H=M.filter(n=>J(n.agent.state,n.agent)).length,Y=M.reduce((n,u)=>n+(u.usage.total??0),0),_=M.some(n=>n.cost.totalUsd!=null)?M.reduce((n,u)=>n+(u.cost.totalUsd??0),0):null,G=M.some(n=>n.cost.billedTotalUsd!=null)?M.reduce((n,u)=>n+(u.cost.billedTotalUsd??0),0):null,Q=(()=>{const n=M.map(u=>u.avgLatencyMs).filter(u=>u!=null);return n.length===0?null:Math.round(n.reduce((u,k)=>u+k,0)/n.length)})();return r.jsxs("div",{className:"s-ops-agents",children:[r.jsxs("main",{className:"s-ops-agents-main",children:[r.jsxs("div",{className:"s-ops-agents-toolbar",children:[r.jsxs("div",{className:"s-ops-agents-breadcrumb",children:["Agents ",r.jsx("span",{children:"/"})," Directory"]}),r.jsxs("div",{className:"s-ops-agents-live",children:[r.jsx("span",{className:"s-ops-agents-live-dot"}),H," active"]}),r.jsxs("div",{className:"s-ops-agents-search",children:[r.jsx(se,{size:13}),r.jsx("input",{value:g,onChange:n=>v(n.target.value),placeholder:"Search agents, tasks, projects, machines…"})]}),r.jsx("button",{className:"s-ops-agents-icon-btn",type:"button",title:"Filters",children:r.jsx(oe,{size:14})})]}),r.jsx("section",{className:"s-ops-agents-hero",children:r.jsxs("div",{children:[r.jsx("div",{className:"s-ops-agents-kicker",children:"Agents"}),r.jsx("h1",{children:"All agents"}),r.jsx("p",{children:"Every registered agent across the local fleet, sorted by live status."})]})}),r.jsxs("section",{className:"s-ops-agents-stats",children:[r.jsx(C,{label:"Running",value:String(z),sub:`of ${t.length} total`}),r.jsx(C,{label:"Tokens",value:w(Y||null),sub:_==null?"usage metadata pending":`${N(_)} API equiv`}),r.jsx(C,{label:"Avg latency",value:D(Q),sub:"recent observe events"}),r.jsx(C,{label:"Billed",value:N(G),sub:"subscription usage can mark this down"})]}),r.jsxs("section",{className:"s-ops-agents-table-panel",children:[r.jsxs("div",{className:"s-ops-agents-table-title",children:["Agents ",r.jsx("span",{children:S.length}),r.jsxs("span",{className:"s-ops-agents-hint","aria-hidden":!0,children:[r.jsx("kbd",{children:"↑"}),r.jsx("kbd",{children:"↓"})," navigate · ",r.jsx("kbd",{children:"enter"})," pin · ",r.jsx("kbd",{children:"o"})," open · ",r.jsx("kbd",{children:"esc"})," clear"]})]}),r.jsx("div",{className:"s-ops-agents-table-wrap",ref:y.containerRef,children:r.jsx(ne,{rows:S,columns:be,rowId:n=>n.agent.id,storageKey:"openscout.opsAgents.cols",sort:K,onSortChange:F,secondarySort:O,density:"compact",rowBindings:n=>{const u=y.bind(n);return{...u,onKeyDown:k=>{k.key!=="Enter"&&k.key!==" "||(k.preventDefault(),u.onClick())}}},rowState:n=>y.getState(n),empty:{title:"No agents match",body:"Adjust the search to find a different slice of the fleet."},className:"s-ops-agents-data-table",ariaLabel:"Agents directory"})})]})]}),y.card]})}function C({label:e,value:t,sub:s,tone:a="default"}){return r.jsxs("div",{className:`s-ops-agents-metric s-ops-agents-metric--${a}`,children:[r.jsx("div",{className:"s-ops-agents-metric-label",children:e}),r.jsx("div",{className:"s-ops-agents-metric-value",children:t}),r.jsx("div",{className:"s-ops-agents-metric-sub",children:s})]})}export{ft as OpsAgentsView};
@@ -0,0 +1 @@
1
+ import{r as n,j as t}from"./index-DvLtl7rV.js";/* empty css */import{u as d}from"./Provider-CtXJeLrP.js";/* empty css */import{u as v}from"./page-status-E5jnk48p.js";import{A as x}from"./AgentLanesView-CetZZDyF.js";import{MissionControlView as j}from"./MissionControlView-E3V7bENU.js";import{OpsAgentsView as f}from"./OpsAgentsView-DI5wu1si.js";import{HostAdvisorView as w}from"./HostAdvisorView-Bok5Sk5c.js";import{AtopView as N}from"./AtopView-Daq_ob3z.js";import{TailView as c}from"./TailView-0uEIj2JH.js";import{u as g}from"./useContentSecondaryNav-pZe2Zfk1.js";import{OpsSubnav as S}from"./OpsSubnav-1K4Jaf__.js";import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";/* empty css */import"./tail-events-Ps8KpKah.js";import"./observe-BpEm1INu.js";import"./types-B0PlfpKc.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./SessionObserve-dQDN23pP.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./openContent-C6XO6kr5.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.js";import"./message-markup-C2LQDm_k.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./message-circle-mZCv8tvB.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.js";import"./AgentFloorView-YT-Jjccf.js";/* empty css */import"./agent-lanes-model-DXqjs0OK.js";import"./context-budget-DX_fwUs3.js";import"./lane-roster-store-DOdI1O13.js";import"./AgentLanesPreflight-q20mTjms.js";import"./AgentLaneChrome-D8bARHMx.js";import"./AgentLaneCard-DI2iW9zO.js";/* empty css */import"./AgentLaneSummaryResize-CEBjmPTa.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-CNZMPkhc.js";import"./agent-lane-preview-BhplDYGf.js";import"./agent-lane-detail-ppJId6Jc.js";import"./AgentLaneDetailSheet-52un7dKC.js";import"./SlidePanel-B9ugxWgA.js";import"./LaneTraceDetailSheet-BUgHz-sd.js";import"./LaneTraceEventFocus-DM-hoPxG.js";/* empty css */import"./mission-control-store-nDLdUZPA.js";import"./MissionContextRail-DF0_kiU7.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-h15sQFvP.js";import"./MissionLogPane-BbdDKjUl.js";/* empty css */import"./DataTable-Bp8tU9AK.js";/* empty css */import"./useAgentHoverCard-DoBwV0LX.js";import"./sliders-horizontal-C8njVwfg.js";/* empty css */import"./compass-Dt1AMXz2.js";import"./layout-grid-DOChPJdZ.js";import"./refresh-cw-DMxGzDwn.js";import"./arrow-up-right-C6Wl-1uw.js";import"./cpu-DrqejfkB.js";import"./gauge-hU--hKVP.js";/* empty css */import"./SecondaryNav-BR4VRdgh.js";import"./secondaryNavConfig-BoQ_zYR9.js";import"./message-square-C7t_qtuj.js";import"./settings-Dyvpkb1D.js";import"./git-branch-CK5v8F2v.js";import"./scroll-text-Dze_dXtQ.js";const A=220;function F(){const r=v(),o=!!(r.hover||r.content),[i,p]=n.useState(o?{hover:r.hover,content:r.content}:null),[e,s]=n.useState(o?"enter":"hidden"),m=n.useRef(null);if(n.useEffect(()=>{if(o){m.current&&(clearTimeout(m.current),m.current=null),p({hover:r.hover,content:r.content}),s(h=>h==="show"?"show":"enter");const u=requestAnimationFrame(()=>s("show"));return()=>cancelAnimationFrame(u)}return s("leave"),m.current=setTimeout(()=>{s("hidden"),p(null),m.current=null},A),()=>{m.current&&(clearTimeout(m.current),m.current=null)}},[o,r.hover,r.content]),e==="hidden"||!i)return null;const a=i.hover?.label??i.hover?.route??null,l=i.hover?.label&&i.hover?.route?i.hover.route:null;return t.jsxs("div",{className:`s-page-status s-page-status--${e}`,role:"status","aria-live":"polite",children:[t.jsx("div",{className:"s-page-status-left",children:a&&t.jsxs(t.Fragment,{children:[t.jsx("span",{className:"s-page-status-arrow","aria-hidden":!0,children:"→"}),t.jsx("span",{className:"s-page-status-target",children:a}),l&&t.jsx("span",{className:"s-page-status-route",children:l})]})}),t.jsx("div",{className:"s-page-status-right",children:i.content&&t.jsx("span",{className:"s-page-status-content",children:i.content})})]})}function qr({navigate:r,mode:o="mission",tailQuery:i}){const{agents:p,route:e}=d(),s=g();return t.jsxs("div",{className:"s-ops",children:[s?t.jsx("div",{className:"s-ops-header",children:t.jsx(S,{activeRoute:e,navigate:r})}):null,t.jsxs("div",{className:"s-ops-body",children:[o==="mission"&&t.jsx(j,{navigate:r,agents:p}),o==="agents"&&t.jsx(f,{navigate:r,agents:p}),o==="advisor"&&t.jsx(w,{navigate:r,agents:p}),o==="issues"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"issues"}),o==="tail"&&t.jsx(c,{navigate:r,initialFilter:i,variant:"tail"}),o==="atop"&&t.jsx(N,{}),o==="lanes"&&t.jsx(x,{navigate:r,agents:p})]}),t.jsx(F,{})]})}export{qr as OpsScreen};
@@ -0,0 +1 @@
1
+ import{j as t}from"./index-DvLtl7rV.js";import{S as p}from"./SecondaryNav-BR4VRdgh.js";import{O as i}from"./secondaryNavConfig-BoQ_zYR9.js";/* empty css */import"./createLucideIcon-DezKXSG2.js";import"./message-square-C7t_qtuj.js";import"./file-text-CqJgwxmv.js";import"./search-CDko0PKE.js";import"./compass-Dt1AMXz2.js";import"./settings-Dyvpkb1D.js";import"./terminal-9GRS_Qdc.js";import"./git-branch-CK5v8F2v.js";import"./code-xml-D7pOQM9l.js";import"./scroll-text-Dze_dXtQ.js";function v({activeRoute:r,navigate:o}){return t.jsx(p,{ariaLabel:"Ops sections",activeRoute:r,groups:i,navigate:o})}export{v as OpsSubnav};
@@ -0,0 +1 @@
1
+ import{r as m,j as o}from"./index-DvLtl7rV.js";import{a as A}from"./api-Co9aQ2Jw.js";import{u as b,d as S}from"./Provider-CtXJeLrP.js";import{b as y}from"./router-B9vQkNJL.js";import{u as P}from"./sse-CD9MMUxl.js";import{AgentsSubnav as N}from"./AgentsSubnav-C4xpQhsv.js";import{AgentDetailWithRail as B,AgentProfileSessionsCenter as E}from"./profile-APxDsN2P.js";import{r as R,d as C,b as M}from"./NewChatComposer-_Stj0fZy.js";/* empty css *//* empty css *//* empty css */import{ProjectAgentProfileBar as w}from"./ProjectAgentProfileBar-k2QHHHsQ.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-BR4VRdgh.js";import"./secondaryNavConfig-BoQ_zYR9.js";import"./message-square-C7t_qtuj.js";import"./search-CDko0PKE.js";import"./compass-Dt1AMXz2.js";import"./settings-Dyvpkb1D.js";import"./terminal-9GRS_Qdc.js";import"./git-branch-CK5v8F2v.js";import"./scroll-text-Dze_dXtQ.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./HarnessMark-B979GCSB.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-DsaZJXZt.js";import"./terminal-relay-GYMIvKs1.js";import"./time-Dhsh_2EG.js";import"./BackToPicker-CXZjBRAe.js";import"./openContent-C6XO6kr5.js";import"./ConversationScreen-CR9pWB65.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./ConversationComposer-CXPKx86g.js";import"./index-zvhpRHao.js";import"./zap-Cq8eWkcF.js";import"./conversation-model-Dc02NsGp.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./eye-BRyD0jno.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./chevron-down-wciXnOQz.js";import"./activity-DcrMApUY.js";import"./message-circle-mZCv8tvB.js";import"./tail-events-Ps8KpKah.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./sparkles-CETYrxGA.js";import"./SessionObserve-dQDN23pP.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.js";/* empty css */import"./AgentDefinitionsWorkspace-Iyl4BesU.js";import"./agent-specialization-BujJVUTD.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Df6VzXjA.js";import"./agent-essentials-D7KRGYvF.js";import"./NewChatOrigin-B1u7ki70.js";import"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";function wo({route:t,navigate:r}){const{agents:e}=b(),p=y(t),n=m.useMemo(()=>S(e,p),[e,p]),[f,g]=m.useState([]),a=m.useCallback(async()=>{const s=await A("/api/conversations").catch(()=>[]);g(s)},[]);m.useEffect(()=>{a()},[a]),P(()=>{a()});const i=R(n,t.agentId),c=!!(t.agentId&&i&&i.id!==t.agentId),{conversationByAgentId:j}=C(f);if(m.useEffect(()=>{!t.agentId||!i||!c||r({...t,view:"agents-v2",agentId:i.id})},[r,t,i,t.agentId,c]),!i)return o.jsx(v,{activeRoute:t,navigate:r,children:o.jsx("div",{className:"av2-empty",children:"Agent not found."})});const d=t.conversationId??j.get(i.id)??i.conversationId??null,l=t.tab??(t.conversationId?"message":"profile");return o.jsx("div",{className:"s-av2-profileShell",children:o.jsx(v,{activeRoute:t,navigate:r,bar:o.jsx(w,{agent:i,conversationId:d,activeTab:l,route:t,navigate:r}),children:o.jsx("div",{className:"av2-profileCanvas",children:o.jsx(B,{agent:i,allAgents:n,conversationId:d,navigate:r,activeTab:l,renderProfile:({agent:s,sessionCatalog:x,conversationId:h,navigate:I,route:u})=>o.jsx(E,{agent:s,name:M(s,n).name,sessionCatalog:x,conversationId:h,navigate:I,route:u,homeView:"agents-v2"})})})})})}function v({activeRoute:t,children:r,navigate:e,bar:p}){return o.jsxs("div",{className:"s-secondary-nav-shell",children:[o.jsx("div",{className:"s-secondary-nav-bar",children:p??o.jsx(N,{activeRoute:t,navigate:e})}),o.jsx("div",{className:"s-secondary-nav-body",children:r})]})}export{wo as ProjectAgentProfile};
@@ -1 +1 @@
1
- import{j as a}from"./index-CZ-05hKz.js";import{r as c}from"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";import"./time-Dhsh_2EG.js";function d({agent:i,conversationId:s,activeTab:o,route:l,navigate:r}){const t=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],n=e=>r({...l,view:"agents-v2",agentId:i.id,...s?{conversationId:s}:{},tab:e});return a.jsxs("div",{className:"av2-profileBar",children:[a.jsxs("button",{type:"button",className:"av2-profileBack",onClick:()=>r(c(l)),children:[a.jsx("span",{className:"av2-profileBackGlyph","aria-hidden":!0,children:"←"}),"Project"]}),a.jsx("nav",{className:"av2-profileTabs","aria-label":"Agent views",children:t.map(e=>a.jsx("button",{type:"button",className:"av2-profileTab","data-on":o===e.key||void 0,onClick:()=>n(e.key),children:e.label},e.key))})]})}export{d as ProjectAgentProfileBar};
1
+ import{j as a}from"./index-DvLtl7rV.js";import{r as c}from"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";import"./time-Dhsh_2EG.js";function d({agent:i,conversationId:s,activeTab:o,route:l,navigate:r}){const t=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],n=e=>r({...l,view:"agents-v2",agentId:i.id,...s?{conversationId:s}:{},tab:e});return a.jsxs("div",{className:"av2-profileBar",children:[a.jsxs("button",{type:"button",className:"av2-profileBack",onClick:()=>r(c(l)),children:[a.jsx("span",{className:"av2-profileBackGlyph","aria-hidden":!0,children:"←"}),"Project"]}),a.jsx("nav",{className:"av2-profileTabs","aria-label":"Agent views",children:t.map(e=>a.jsx("button",{type:"button",className:"av2-profileTab","data-on":o===e.key||void 0,onClick:()=>n(e.key),children:e.label},e.key))})]})}export{d as ProjectAgentProfileBar};
@@ -1 +1 @@
1
- import{r as c,j as e}from"./index-CZ-05hKz.js";import{i as y,c as L}from"./colors-BtO5_zlx.js";import{a as u}from"./api-Co9aQ2Jw.js";import{u as T}from"./sse-CiOSzE5n.js";import{t as P}from"./time-Dhsh_2EG.js";import{o as R}from"./openContent-C6XO6kr5.js";import{A as E}from"./AgentAvatar-CYhf6twS.js";import{H as O}from"./HarnessMark-D5CA5uSp.js";import{n as V}from"./NewChatComposer-hlWT-nbR.js";import{h as B}from"./model-IGCUEsMy.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./Provider-B2xuo3rf.js";import"./router-DJj2WbDg.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DZVhS7as.js";import"./createLucideIcon-DXpqZP7I.js";import"./TextDocumentSurface-CKQP-cBT.js";import"./file-text-KijGBnME.js";import"./x-e3h2hDsp.js";import"./chevron-right-CzH-TaSF.js";import"./code-xml-Jtxsp5d1.js";import"./arrow-left-CghA0kTw.js";import"./arrow-right-iJFv3jNh.js";import"./scout-voice-BhPzrc6P.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-DFhAJkW3.js";import"./chunk-HRAB3GC3-swV8PA2k.js";import"./SpriteAvatar-Bs68ZENy.js";import"./CrewAvatar-CTIuxp4G.js";import"./text-CnZ0e1-V.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-BiohlpM3.js";import"./conversation-model-CwF6Y9gx.js";import"./index-BVlMw8x_.js";import"./NewChatOrigin-DdpzE4kz.js";import"./chevron-down-Mp9mu_yd.js";import"./search-D1tJSAWe.js";import"./agents-project-model-UYiamtrU.js";function U(s){return s?s.startsWith("/Users/")?`~/${s.split("/").slice(3).join("/")}`:s:null}function _(s){const a=s.model?.trim();if(!a)return null;const o=s.harness?.trim();return o&&a.startsWith(`${o}-`)?a.slice(o.length+1).replace(/-\d{8}$/,""):a.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function g(s){const a=new Map;for(const o of s){if(o.kind!=="tool"||!o.tool)continue;const t=o.tool.toLowerCase();a.set(t,(a.get(t)??0)+1)}return[...a.entries()].sort((o,t)=>t[1]-o[1]||o[0].localeCompare(t[0])).map(([o])=>o).slice(0,6)}function i({label:s,value:a,title:o}){return a?.trim()?e.jsxs("div",{className:"av2-coreMetaItem",title:o??a,children:[e.jsx("span",{className:"av2-coreMetaLabel",children:s}),e.jsx("span",{className:"av2-coreMetaValue",children:a})]}):null}function ys({agent:s,route:a,navigate:o}){const[t,h]=c.useState(null),[C,v]=c.useState(null),m=c.useCallback(async()=>{const[r,l]=await Promise.all([u(`/api/agents/${encodeURIComponent(s.id)}/observe`).catch(()=>null),u(`/api/agents/${encodeURIComponent(s.id)}/session-catalog`).catch(()=>null)]);h(r),v(l)},[s.id]);c.useEffect(()=>{h(null),v(null),m()},[m]),T(()=>{m()});const p=s.handle?.trim().replace(/^@+/,"")||null,j=p?`@${p}`:s.name,n=s.harness?B(s.harness):null,H=_(s),w=U(s.cwd??s.projectRoot),M=(s.homeNodeName??s.authorityNodeName??"").replace(/\.local$/i,"").replace(/-local-openscout$/i,""),I=y(s.state),k=L(s.state,s),x=t?.data.events??[],d=c.useMemo(()=>g(x),[x]),f=t?.data.metadata?.usage??null,N=(()=>{const r=f?.contextWindowTokens??0,l=f?.contextInputTokens??0;return!r||r<=0||l<=0?null:Math.min(100,Math.max(0,Math.round(l/r*100)))})(),A=C?.sessions?.length??0,$=s.transport==="claude_stream_json"?"stream-json":s.transport==="codex_app_server"?"app-server":s.transport?.trim()||null,S=async()=>{try{const r=await u("/api/sessions",{method:"POST",body:JSON.stringify(V(s))}),l=r.sessionId?.trim();if(l){R(o,{view:"sessions",sessionId:l},{returnTo:a});return}const b=r.conversationId?.trim();o({...a,view:"agents-v2",agentId:r.agentId?.trim()||s.id,...b?{conversationId:b}:{},tab:"message"})}catch{}};return e.jsxs("header",{className:"av2-profileHero",children:[e.jsx(E,{agent:s,size:56,tile:!0,presence:!0}),e.jsxs("div",{className:"av2-profileHeroCore",children:[e.jsxs("div",{className:"av2-profileHeroTop",children:[e.jsxs("div",{className:"av2-profileHeroIdent",children:[e.jsx("h1",{className:"av2-profileHeroTitle",title:j,children:j}),e.jsxs("span",{className:"av2-profileHeroState","data-online":I||void 0,children:[e.jsx("span",{className:"av2-profileHeroDot","aria-hidden":!0}),k,s.updatedAt?` · ${P(s.updatedAt)}`:""]}),p&&s.name.toLowerCase()!==p.toLowerCase()?e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.name}):e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.id})]}),e.jsxs("div",{className:"av2-profileHeroActions",children:[e.jsx("button",{type:"button",className:"av2-heroGhost",onClick:()=>o({...a,view:"agents-v2",agentId:s.id,tab:"config"}),children:"Edit config"}),e.jsx("button",{type:"button",className:"av2-heroCta",onClick:()=>{S()},children:"+ New session"})]})]}),e.jsxs("div",{className:"av2-profileHeroMeta",children:[e.jsx(i,{label:"Project",value:s.project?`/${s.project}`:null}),e.jsx(i,{label:"Branch",value:s.branch}),e.jsx(i,{label:"Harness",value:n?n.charAt(0).toUpperCase()+n.slice(1):null,title:s.harness??void 0}),e.jsx(i,{label:"Model",value:H}),e.jsx(i,{label:"Host",value:M||null}),e.jsx(i,{label:"Root",value:w,title:s.cwd??s.projectRoot??void 0}),e.jsx(i,{label:"Transport",value:$})]}),e.jsxs("div",{className:"av2-profileHeroSignal",children:[n?e.jsx("span",{className:"av2-signalMark",title:s.harness??n,children:e.jsx(O,{harness:n,size:12})}):null,e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Sessions"}),e.jsx("span",{className:"av2-signalValue",children:A})]}),N!=null?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Ctx"}),e.jsxs("span",{className:"av2-signalValue",children:[N,"%"]})]}):null,d.length>0?e.jsxs("span",{className:"av2-signalChip av2-signalChip--wide",title:d.join(" · "),children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:d.join(" · ")})]}):t?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:"—"})]}):null]})]})]})}export{ys as ProjectAgentProfileHero};
1
+ import{r as c,j as e}from"./index-DvLtl7rV.js";import{i as y,c as L}from"./colors-BtO5_zlx.js";import{a as u}from"./api-Co9aQ2Jw.js";import{u as T}from"./sse-CD9MMUxl.js";import{t as P}from"./time-Dhsh_2EG.js";import{o as R}from"./openContent-C6XO6kr5.js";import{A as E}from"./AgentAvatar-6-KBVKUu.js";import{H as O}from"./HarnessMark-B979GCSB.js";import{n as V}from"./NewChatComposer-_Stj0fZy.js";import{h as B}from"./model-IGCUEsMy.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./Provider-CtXJeLrP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./agents-project-model-UYiamtrU.js";function U(s){return s?s.startsWith("/Users/")?`~/${s.split("/").slice(3).join("/")}`:s:null}function _(s){const a=s.model?.trim();if(!a)return null;const o=s.harness?.trim();return o&&a.startsWith(`${o}-`)?a.slice(o.length+1).replace(/-\d{8}$/,""):a.replace(/^claude-/,"").replace(/-\d{8}$/,"")}function g(s){const a=new Map;for(const o of s){if(o.kind!=="tool"||!o.tool)continue;const t=o.tool.toLowerCase();a.set(t,(a.get(t)??0)+1)}return[...a.entries()].sort((o,t)=>t[1]-o[1]||o[0].localeCompare(t[0])).map(([o])=>o).slice(0,6)}function i({label:s,value:a,title:o}){return a?.trim()?e.jsxs("div",{className:"av2-coreMetaItem",title:o??a,children:[e.jsx("span",{className:"av2-coreMetaLabel",children:s}),e.jsx("span",{className:"av2-coreMetaValue",children:a})]}):null}function ys({agent:s,route:a,navigate:o}){const[t,h]=c.useState(null),[C,v]=c.useState(null),m=c.useCallback(async()=>{const[r,l]=await Promise.all([u(`/api/agents/${encodeURIComponent(s.id)}/observe`).catch(()=>null),u(`/api/agents/${encodeURIComponent(s.id)}/session-catalog`).catch(()=>null)]);h(r),v(l)},[s.id]);c.useEffect(()=>{h(null),v(null),m()},[m]),T(()=>{m()});const p=s.handle?.trim().replace(/^@+/,"")||null,j=p?`@${p}`:s.name,n=s.harness?B(s.harness):null,H=_(s),w=U(s.cwd??s.projectRoot),M=(s.homeNodeName??s.authorityNodeName??"").replace(/\.local$/i,"").replace(/-local-openscout$/i,""),I=y(s.state),k=L(s.state,s),x=t?.data.events??[],d=c.useMemo(()=>g(x),[x]),f=t?.data.metadata?.usage??null,N=(()=>{const r=f?.contextWindowTokens??0,l=f?.contextInputTokens??0;return!r||r<=0||l<=0?null:Math.min(100,Math.max(0,Math.round(l/r*100)))})(),A=C?.sessions?.length??0,$=s.transport==="claude_stream_json"?"stream-json":s.transport==="codex_app_server"?"app-server":s.transport?.trim()||null,S=async()=>{try{const r=await u("/api/sessions",{method:"POST",body:JSON.stringify(V(s))}),l=r.sessionId?.trim();if(l){R(o,{view:"sessions",sessionId:l},{returnTo:a});return}const b=r.conversationId?.trim();o({...a,view:"agents-v2",agentId:r.agentId?.trim()||s.id,...b?{conversationId:b}:{},tab:"message"})}catch{}};return e.jsxs("header",{className:"av2-profileHero",children:[e.jsx(E,{agent:s,size:56,tile:!0,presence:!0}),e.jsxs("div",{className:"av2-profileHeroCore",children:[e.jsxs("div",{className:"av2-profileHeroTop",children:[e.jsxs("div",{className:"av2-profileHeroIdent",children:[e.jsx("h1",{className:"av2-profileHeroTitle",title:j,children:j}),e.jsxs("span",{className:"av2-profileHeroState","data-online":I||void 0,children:[e.jsx("span",{className:"av2-profileHeroDot","aria-hidden":!0}),k,s.updatedAt?` · ${P(s.updatedAt)}`:""]}),p&&s.name.toLowerCase()!==p.toLowerCase()?e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.name}):e.jsx("span",{className:"av2-profileHeroBroker",title:s.id,children:s.id})]}),e.jsxs("div",{className:"av2-profileHeroActions",children:[e.jsx("button",{type:"button",className:"av2-heroGhost",onClick:()=>o({...a,view:"agents-v2",agentId:s.id,tab:"config"}),children:"Edit config"}),e.jsx("button",{type:"button",className:"av2-heroCta",onClick:()=>{S()},children:"+ New session"})]})]}),e.jsxs("div",{className:"av2-profileHeroMeta",children:[e.jsx(i,{label:"Project",value:s.project?`/${s.project}`:null}),e.jsx(i,{label:"Branch",value:s.branch}),e.jsx(i,{label:"Harness",value:n?n.charAt(0).toUpperCase()+n.slice(1):null,title:s.harness??void 0}),e.jsx(i,{label:"Model",value:H}),e.jsx(i,{label:"Host",value:M||null}),e.jsx(i,{label:"Root",value:w,title:s.cwd??s.projectRoot??void 0}),e.jsx(i,{label:"Transport",value:$})]}),e.jsxs("div",{className:"av2-profileHeroSignal",children:[n?e.jsx("span",{className:"av2-signalMark",title:s.harness??n,children:e.jsx(O,{harness:n,size:12})}):null,e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Sessions"}),e.jsx("span",{className:"av2-signalValue",children:A})]}),N!=null?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Ctx"}),e.jsxs("span",{className:"av2-signalValue",children:[N,"%"]})]}):null,d.length>0?e.jsxs("span",{className:"av2-signalChip av2-signalChip--wide",title:d.join(" · "),children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:d.join(" · ")})]}):t?e.jsxs("span",{className:"av2-signalChip",children:[e.jsx("span",{className:"av2-signalLabel",children:"Tools"}),e.jsx("span",{className:"av2-signalValue",children:"—"})]}):null]})]})]})}export{ys as ProjectAgentProfileHero};
@@ -0,0 +1,2 @@
1
+ import{r as m,j as s}from"./index-DvLtl7rV.js";import{A as Me}from"./AgentAvatar-6-KBVKUu.js";import{H as ge}from"./HarnessMark-B979GCSB.js";import{a as Ee}from"./api-Co9aQ2Jw.js";import{r as Ie,i as $e}from"./ui-LM8pS8qE.js";import{t as _,d as We,n as ee}from"./time-Dhsh_2EG.js";import{p as Fe,l as De,s as Be,f as Oe}from"./terminal-sessions-BQ6t92tJ.js";import{u as ze}from"./Provider-CtXJeLrP.js";import{o as He}from"./openContent-C6XO6kr5.js";import{p as J}from"./NewChatComposer-_Stj0fZy.js";import{SessionRefScreen as qe}from"./SessionRefScreen-COVQMbtE.js";import{P as Ge,C as _e}from"./CrewWorkspaces-NKujRzwh.js";import{r as X,s as V}from"./project-overview-helpers-BQTc_Ous.js";import{u as Ve,r as Ke,c as Z,d as ae,g as Ue,s as re,a as le,e as Xe,h as be,i as Ye,j as Ze,f as Je,k as Qe}from"./projects-inbox-Cg4X2lUQ.js";import{g as es,a as ss,f as ce,b as ts}from"./api-HFH8wFyb.js";import{f as ns}from"./cache-CeWH_KzJ.js";import{A as ue}from"./arrow-up-right-C6Wl-1uw.js";import{C as is}from"./chevron-right-D-HdlPg8.js";import{F as os}from"./AddProjectForm-IqOtJfRs.js";import{S as as}from"./search-CDko0PKE.js";import{A as rs}from"./arrow-right-BuzMnLYP.js";import{E as ls}from"./external-link-Dp_a2vRZ.js";import{F as cs}from"./DocumentFocusViewer-Do3wQ_3Z.js";import"./SpriteAvatar-z5hHesx9.js";import"./colors-BtO5_zlx.js";import"./CrewAvatar-BwXjyg8N.js";import"./perf-PX8Rx0EP.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./createLucideIcon-DezKXSG2.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./NewChatOrigin-B1u7ki70.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./tail-events-Ps8KpKah.js";import"./BackToPicker-CXZjBRAe.js";import"./ConversationScreen-CR9pWB65.js";import"./ConversationComposer-CXPKx86g.js";import"./zap-Cq8eWkcF.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./activity-DcrMApUY.js";import"./message-circle-mZCv8tvB.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./sparkles-CETYrxGA.js";import"./SessionObserve-dQDN23pP.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./mesh-roster-Bc7T4b7z.js";import"./agent-specialization-BujJVUTD.js";import"./model-IGCUEsMy.js";import"./agents-project-model-UYiamtrU.js";import"./sliders-horizontal-C8njVwfg.js";import"./message-square-C7t_qtuj.js";function de(e){const t=e?.trim();if(!t)return null;const i=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return i.endsWith(".jsonl")?i.slice(0,-6):i}function us(e){return e.surfaces.filter(t=>t.backend==="tmux")}function ds(e,t){return{terminalSessionId:e.id,terminalSurfaceKey:Be(t),sessionName:t.sessionName}}function ps(e,t){const i=de(t.agentId),n=new Set(t.sessionRefs.map(de).filter(r=>!!r)),a=i?.split(".",1)[0]??null;a?.startsWith("session-")&&n.add(a);for(const r of e){const o=us(r).find(u=>n.has(u.sessionName));if(o)return ds(r,o)}return null}function ms(e,t){const i=Fe(e.terminalSurfaceKey);return i?`scout://terminal?${new URLSearchParams({session:e.terminalSessionId,surface:De(i),mode:t}).toString()}`:null}const hs=1e4,fs=2e4,js=6e4,xs=15e3,gs=45e3,bs=["branch","unstaged","staged"];function te(e){const t=()=>{document.visibilityState==="visible"&&e()};return window.addEventListener("focus",t),document.addEventListener("visibilitychange",t),()=>{window.removeEventListener("focus",t),document.removeEventListener("visibilitychange",t)}}function vs(e,t){const i=new Set;for(const n of[e,...t]){const a=n?.trim();a&&i.add(a.replace(/\/+$/u,""))}return[...i].slice(0,6)}function ws(e){return e.replace(/\/+$/u,"").split("/").pop()?.toLocaleLowerCase()??e.toLocaleLowerCase()}function Ns(e,t,i){return e.path===t||i?.worktrees.some(a=>a.path===e.path)?!0:e.repo.split("/").pop()?.toLocaleLowerCase()===(i?.name.toLocaleLowerCase()??ws(t))}function Q(e){return e&&typeof e=="object"&&"name"in e&&e.name==="AbortError"?"The repository scan timed out.":e instanceof Error?e.message:String(e)}function ks(e,t=[]){const i=vs(e,t).join("\0"),n=m.useMemo(()=>i?i.split("\0"):[],[i]),[a,r]=m.useState(()=>es()),[o,u]=m.useState(()=>ss()),[c,j]=m.useState(!!(e&&!X(a,e))),[h,v]=m.useState(!!e),[y,w]=m.useState(!!e),[I,L]=m.useState(null),[k,P]=m.useState(null),[F,M]=m.useState(()=>new Map),[B,A]=m.useState(()=>new Map),[S,$]=m.useState(0),R=m.useRef(null),T=m.useCallback(()=>{R.current=null,$(f=>f+1)},[]);m.useEffect(()=>{if(!e){j(!1),L(null);return}let f=!1,x=!1,b=!0;const D=async()=>{if(x)return;x=!0,f||(j(!0),L(null));let O=null;try{let W=null;const z=S>0&&b;b=!1;try{W=await ce("standard",z,xs)}catch(C){O=Q(C)}if((!W||!X(W,e))&&R.current!==e){R.current=e;try{const C=await ce("expanded",z,gs);X(C,e)&&(W=C)}catch(C){O=Q(C)}}!f&&W&&r(C=>X(W,e)?W:C&&X(C,e)?C:W),!f&&!X(W,e)&&L(O??"Repo Watch did not include this project in its latest scan.")}finally{x=!1,f||j(!1)}};D();const d=window.setInterval(()=>{document.visibilityState==="visible"&&D()},hs),E=te(()=>{D()});return()=>{f=!0,window.clearInterval(d),E()}},[e,S]),m.useEffect(()=>{if(n.length===0){w(!1),A(new Map);return}let f=!1,x=!1,b=!0;const D=async()=>{if(x)return;x=!0,f||w(!0);const O=await Promise.allSettled(n.map(W=>ns(W,[...bs],{force:S>0&&b,tier:"summary"})));if(b=!1,!f){const W=new Map,z=new Map;O.forEach((C,K)=>{const q=n[K];C.status==="fulfilled"?W.set(q,C.value.snapshot):z.set(q,Q(C.reason))}),M(C=>{const K=new Map(C);for(const q of n)K.delete(q);for(const[q,se]of W)K.set(q,se);return K}),A(z),w(!1)}x=!1};D();const d=window.setInterval(()=>{document.visibilityState==="visible"&&D()},fs),E=te(()=>{D()});return()=>{f=!0,window.clearInterval(d),E()}},[n,S]),m.useEffect(()=>{if(n.length===0){v(!1),P(null);return}let f=!1,x=!1;const b=async()=>{if(!x){x=!0;try{const E=await ts(n);f||(u(E),P(null))}catch(E){f||P(Q(E))}finally{x=!1,f||v(!1)}}};v(!0),P(null),b();const D=window.setInterval(()=>{document.visibilityState==="visible"&&b()},js),d=te(()=>{b()});return()=>{f=!0,window.clearInterval(D),d()}},[n,S]);const l=m.useMemo(()=>X(a,e),[e,a]),p=m.useMemo(()=>e?(o?.pullRequests??[]).filter(f=>Ns(f,e,l)):[],[l,e,o]),g=m.useMemo(()=>{const f=o?.paths.some(x=>n.includes(x))?o.warnings:[];return k?[k,...f]:f},[n,k,o]);return{project:l,pullRequests:p,pullRequestsLoading:h,pullRequestWarnings:g,repoLoading:c,repoError:I,diffSnapshots:F,diffErrors:B,diffLoading:y,refresh:T}}const Ss=[];function ys(e,t){return e.thread===t.thread&&e.crossProject===t.crossProject&&e.selected===t.selected&&e.cursor===t.cursor&&e.nowMs===t.nowMs&&e.workLabel===t.workLabel}const Cs=m.memo(function({thread:t,crossProject:i,selected:n,cursor:a,nowMs:r,onSelect:o,onOpen:u,rowRef:c,workLabel:j}){return s.jsxs("button",{ref:c,type:"button",className:"pi-row","data-state":t.group,"data-selected":n||void 0,"data-cursor":a||void 0,onClick:o,onDoubleClick:u,children:[s.jsx("span",{className:"pi-rowDot","aria-hidden":!0}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-rowWork",title:t.work,children:j??t.work}),s.jsxs("span",{className:"pi-rowAttr",children:[s.jsx("span",{className:"pi-rowAvatar",children:s.jsx(Me,{agent:{name:t.agentName,harness:t.harness,state:t.working?"in_turn":null},placement:"row",size:22})}),s.jsx("span",{className:"pi-rowAgent",title:t.agentName,children:t.agentName}),s.jsx("span",{className:"pi-rowHmark","aria-hidden":!0,children:s.jsx(ge,{harness:t.harness,size:11})}),i?s.jsxs("span",{className:"pi-rowChip",title:`/${t.projectTitle}`,children:["/",t.projectTitle]}):t.branch?s.jsx("span",{className:"pi-rowBranch",title:t.branch,children:t.branch}):null]})]}),s.jsxs("span",{className:"pi-rowVitals",children:[t.working?s.jsx("span",{className:"pi-rowLiveTag",children:"live"}):null,s.jsx("span",{className:"pi-rowAgo",children:t.lastActivityAt?_(t.lastActivityAt,r):"—"}),t.contextPct!=null?s.jsxs("span",{className:"pi-rowCtx",children:[t.contextPct,"%"]}):null]}),s.jsxs("span",{className:"pi-rowOpen","aria-hidden":!0,children:[s.jsx("span",{children:"Open"}),s.jsx(is,{size:14,strokeWidth:1.8})]})]})},ys);function pe({title:e,detail:t,tone:i="muted"}){return s.jsxs("div",{className:"pi-stateBlock","data-tone":i,role:i==="loading"?"status":"note",children:[s.jsx("span",{className:"pi-statePulse","aria-hidden":!0}),s.jsx("span",{className:"pi-stateTitle",children:e}),t?s.jsx("span",{className:"pi-stateDetail",children:t}):null]})}function As({rows:e=7}){return s.jsxs("div",{className:"pi-loadingRows","aria-hidden":"true",children:[s.jsxs("div",{className:"pi-sectionHead pi-sectionHead--loading",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--label"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--count"})]}),Array.from({length:e},(t,i)=>s.jsxs("div",{className:"pi-row pi-row--loading",children:[s.jsx("span",{className:"pi-rowDot"}),s.jsxs("span",{className:"pi-rowBody",children:[s.jsx("span",{className:"pi-loadingLine pi-loadingLine--title"}),s.jsx("span",{className:"pi-loadingLine pi-loadingLine--meta"})]}),s.jsx("span",{className:"pi-rowVitals",children:s.jsx("span",{className:"pi-loadingLine pi-loadingLine--time"})})]},i))]})}function Rs({route:e,navigate:t,slug:i,model:n,mode:a,repoProject:r}){const o=n.projects.find(k=>k.slug===i)??null,c=Z(n.threads,i).filter(k=>k.kind==="agent"),j=o?.title??i,h=o?.root??null,v=(o?.agentCount??c.length)>0,y=e.machineId?{machineId:e.machineId}:{},w={view:"agents-v2",projectSlug:i,...y},I=Ts(o?.needs??0,Math.max(o?.working??0,o?.liveSessionCount??0),o?.agentCount??(c.length>0?1:0),o?.sessionCount??0),L=r?.worktrees.length??o?.worktreeCount??0;return s.jsxs("header",{className:"pi-projectHead",children:[s.jsx("div",{className:"pi-projectHeadTop",children:s.jsxs("div",{className:"pi-projectIdent",children:[s.jsx("h1",{className:"pi-projectTitle",children:j}),s.jsxs("div",{className:"pi-projectMeta",children:[h?s.jsx("span",{title:h,children:V(h)}):null,s.jsx("span",{className:"pi-projectDigest",children:I})]})]})}),s.jsxs("div",{className:"pi-projectFacets","aria-label":"Project sections",children:[s.jsx("button",{type:"button",className:"pi-projectFacet","data-selected":a==="overview"||void 0,onClick:()=>t(w),children:s.jsx("span",{children:"Overview"})}),s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":a==="sessions"||void 0,onClick:()=>t({...w,indexView:"sessions"}),children:[s.jsx("span",{children:"Sessions"}),s.jsx("b",{children:o?.sessionCount??0})]}),v?s.jsxs("button",{type:"button",className:"pi-projectFacet","data-selected":a==="agents"||void 0,onClick:()=>t({...w,indexView:"agents"}),children:[s.jsx("span",{children:"Agents"}),s.jsx("b",{children:o?.agentCount??c.length})]}):null,s.jsxs("button",{type:"button",className:"pi-projectFacet",title:"Open worktrees in Repos",onClick:()=>t({view:"repos",...h?{root:h}:{},...y}),children:[s.jsx("span",{children:"Worktrees"}),s.jsx("b",{children:L}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]}),s.jsxs("button",{type:"button",className:"pi-projectFacet",disabled:!h,title:h?"Open this project's AGENTS.md":"No project root known",onClick:()=>t({view:"code",project:i,path:"AGENTS.md"}),children:[s.jsx("span",{children:"Rules"}),s.jsx("b",{children:h?"set":"—"}),s.jsx(ue,{className:"pi-projectFacetOut",size:11,strokeWidth:2,"aria-hidden":!0})]})]})]})}function Ts(e,t,i,n){const a=[];return t>0&&a.push(s.jsxs("b",{children:[t," active"]},"w")),e>0&&a.push(s.jsxs("b",{children:[e," needs you"]},"n")),a.push(s.jsxs("span",{children:[i," agent",i===1?"":"s"]},"a")),a.push(s.jsxs("span",{children:[n," session",n===1?"":"s"]},"s")),a.reduce((r,o,u)=>(u>0&&r.push(s.jsx("span",{children:" · "},`sep${u}`)),r.push(o),r),[])}function ve(e){if(e.length<=18)return e;const t=e.match(/^([0-9a-f]{8})-[0-9a-f-]{27,}$/iu);return t?t[1]:`${e.slice(0,10)}…${e.slice(-5)}`}function Ls(e,t){return`${t?0:e.projects.length} tracked`}function Ps({route:e,navigate:t,projects:i}){const{onboarding:n,refreshOnboarding:a,reload:r}=ze(),o=Ms(n?.defaultHarness),[u,c]=m.useState(""),[j,h]=m.useState(""),[v,y]=m.useState(o),[w,I]=m.useState(!1),[L,k]=m.useState(null),[P,F]=m.useState(null),[M,B]=m.useState(null);m.useEffect(()=>{y(o)},[o]);const A=m.useMemo(()=>Es(i),[i]),S=m.useMemo(()=>Is(A,u),[u,A]),$=m.useMemo(()=>A.find(d=>d.slug===j)??he(A,u),[u,A,j]),R=u.trim(),T=Ws(R)&&!he(A,R),l=$??(!T&&R?S[0]??null:null),p=l?"Open project":T?"Create project":"Find project",g=!!(l||T||R);m.useEffect(()=>{j&&(A.some(d=>d.slug===j)||h(""))},[A,j]),m.useEffect(()=>{if(!M)return;const d=A.find(E=>Fs(E,M));d&&(B(null),t(me(e,d.slug)))},[M,t,A,e]);const f=d=>{h(d.slug),c(d.title),k(null),F(null)},x=d=>{t(me(e,d.slug))},b=async d=>{I(!0),k(null),F(null);try{await Ee("/api/onboarding/project",{method:"POST",body:JSON.stringify({contextRoot:d,sourceRoots:[d],defaultHarness:v})}),B(d),F("Project created. Refreshing inventory."),h(""),c(""),Qe(),await Promise.all([a(),r()])}catch(E){k(E instanceof Error?E.message:"Could not create project.")}finally{I(!1)}},D=d=>{if(d.preventDefault(),!w){if(l){x(l);return}if(T){b(R);return}if(R){k("No project matches that search. Paste a repo path to create one.");return}k("Choose a project or paste a repo path.")}};return s.jsxs("div",{className:"pi-zero",children:[s.jsxs("div",{className:"pi-zeroHead",children:[s.jsxs("span",{className:"pi-zeroKicker",children:[s.jsx(os,{size:13,strokeWidth:1.9,"aria-hidden":!0}),"Projects"]}),s.jsx("h2",{children:"Pick a project to start."})]}),s.jsxs("form",{className:"pi-zeroComposer",onSubmit:D,children:[s.jsxs("div",{className:"pi-zeroBar",children:[s.jsxs("label",{className:"pi-zeroSelect",children:[s.jsx(as,{size:13,strokeWidth:1.8,"aria-hidden":!0}),s.jsxs("select",{value:j,"aria-label":"Choose project",onChange:d=>{const E=A.find(O=>O.slug===d.currentTarget.value);E?f(E):h("")},children:[s.jsx("option",{value:"",children:"Choose project"}),A.slice(0,80).map(d=>s.jsx("option",{value:d.slug,children:d.title},d.slug))]})]}),s.jsx("div",{className:"pi-zeroHarness",role:"group","aria-label":"Default harness",children:["claude","codex"].map(d=>s.jsx("button",{type:"button","data-on":v===d||void 0,onClick:()=>y(d),children:d==="claude"?"Claude":"Codex"},d))})]}),s.jsxs("div",{className:"pi-zeroInputRow",children:[s.jsx("textarea",{value:u,rows:2,placeholder:"Find project or paste /path/to/repo","aria-label":"Find or create project",onChange:d=>{c(d.currentTarget.value),h(""),k(null),F(null)},onKeyDown:d=>{d.key==="Enter"&&!d.shiftKey&&(d.preventDefault(),d.currentTarget.form?.requestSubmit())}}),s.jsxs("button",{type:"submit",className:"pi-zeroSend",disabled:w||!g,title:p,children:[s.jsx(rs,{size:15,strokeWidth:2,"aria-hidden":!0}),s.jsx("span",{children:w?"Working":p})]})]}),S.length>0?s.jsx("div",{className:"pi-zeroMatches","aria-label":"Matching projects",children:S.map(d=>s.jsxs("button",{type:"button",className:"pi-zeroMatch","data-selected":$?.slug===d.slug||void 0,onClick:()=>f(d),onDoubleClick:()=>x(d),children:[s.jsxs("span",{className:"pi-zeroMatchMain",children:[s.jsxs("span",{className:"pi-zeroMatchTitle",children:["/",d.title]}),s.jsx("span",{className:"pi-zeroMatchRoot",title:d.root??void 0,children:d.root?V(d.root):d.slug})]}),s.jsx("span",{className:"pi-zeroMatchMeta",children:Ds(d)})]},d.slug))}):R?s.jsx("div",{className:"pi-zeroEmpty",children:"No project matches."}):null,L?s.jsx("div",{className:"pi-zeroError",children:L}):null,P?s.jsx("div",{className:"pi-zeroStatus",children:P}):null]})]})}function Ms(e){return e==="codex"?"codex":"claude"}function me(e,t){return{view:"agents-v2",projectSlug:t,...e.showEphemeral?{showEphemeral:!0}:{},...e.machineId?{machineId:e.machineId}:{}}}function Es(e){return e.map(t=>({slug:t.slug,title:t.title,root:t.root,agentCount:t.agentCount,sessionCount:t.sessionCount,lastActivityAt:t.lastActivityAt})).sort((t,i)=>i.lastActivityAt-t.lastActivityAt||i.agentCount-t.agentCount||i.sessionCount-t.sessionCount||t.title.localeCompare(i.title))}function Is(e,t){const i=H(t);return i?e.map(n=>({option:n,score:$s(n,i)})).filter(n=>n.score!==null).sort((n,a)=>n.score-a.score||a.option.lastActivityAt-n.option.lastActivityAt||n.option.title.localeCompare(a.option.title)).slice(0,6).map(n=>n.option):e.slice(0,6)}function he(e,t){const i=H(t);return i?e.find(n=>{const a=H(n.root??""),r=H(n.root?J(n.root):"");return H(n.title)===i||H(n.slug)===i||a===i||r===i||H(n.root?V(n.root):"")===i})??null:null}function $s(e,t){const i=H(e.title),n=H(e.slug),a=H(e.root??""),r=H(e.root?J(e.root):"");return i===t||n===t||a===t||r===t?0:i.startsWith(t)||n.startsWith(t)||r.startsWith(t)?1:i.includes(t)||n.includes(t)||r.includes(t)?2:a.includes(t)?3:null}function H(e){return e.trim().toLowerCase().replace(/^~(?=\/)/u,"").replace(/\s+/g," ")}function Ws(e){const t=e.trim();return/^(~\/|\/|\.{1,2}\/)/u.test(t)||t.includes("/")}function Fs(e,t){const i=H(t);return i?[e.root??"",e.root?V(e.root):"",e.root?J(e.root):"",e.slug,e.title].map(H).some(a=>a===i||a.endsWith(i)):!1}function Ds(e){return[fe(e.agentCount,"agent"),fe(e.sessionCount,"session"),e.lastActivityAt?_(e.lastActivityAt):null].filter(Boolean).join(" · ")}function fe(e,t){return`${e} ${t}${e===1?"":"s"}`}function Bs(e,t){return Je(e,t)}function je(e){return/^native:process:/iu.test(e??"")}function Os(e){return e.startsWith("/")||e.startsWith("~/")||e.includes("/")&&/\.(jsonl?|events)$/i.test(e)}function we(e,t,i){const n=e?.trim()??"";return!n||Os(n)?t:n}function zs({session:e,sessionRef:t,threads:i,lookup:n,route:a,navigate:r,nowMs:o}){const[u,c]=m.useState(null),j=e?.agentName??a.selectedAgentId??a.agentId??"Session",h=e?.harness??"session",v=n?.kind==="observe"?n.observe.data:null,y=v?.metadata?.session,w=e?.lastActivityAt??n?.session?.lastMessageAt??null,[I,L,k]=m.useMemo(()=>[oe(v),ke(v,w),Vs(v,w)],[v,w]),P=y?.gitBranch??n?.session?.currentBranch??e?.branch??null,F=y?.model??null,M=y?.turnCount??v?.metadata?.usage?.assistantMessages??(n?.kind==="conversation"?n.session.messageCount:null),B=L?_(L,o):e?.lastActivityAt?_(e.lastActivityAt,o):"—",A=e?.working?`live · last ${B}`:B!=="—"?`last ${B}`:"trace resolving",S=we(e?.work,j),$=ve(t),R=n?.session??null,T=n?.kind==="observe"?n.observe.agentId??R?.agentId??e?.agentId:R?.agentId??e?.agentId,l=n?.kind==="observe"?n.observe.sessionId:R?.harnessSessionId,p=[j,h,F,P,I?`started ${We(I)}`:null,k,M!=null?`turn ${N(M)}`:null,$].filter(x=>!!x&&x!=="—");m.useEffect(()=>{let x=!0;return c(null),!T&&!l&&!t?()=>{x=!1}:(Oe({includeDiscovered:!0}).then(b=>{x&&c(ps(b,{agentId:T,sessionRefs:[t,l,e?.sessionId]}))}).catch(()=>{x&&c(null)}),()=>{x=!1})},[e?.sessionId,t,T,l]);const g=()=>{u&&He(r,{view:"terminal",terminalSessionId:u.terminalSessionId,terminalSurfaceKey:u.terminalSurfaceKey,mode:"takeover"},{returnTo:a})},f=u?ms(u,"takeover"):null;return s.jsxs("section",{className:"pi-sessionOverview","aria-label":"Session overview",children:[s.jsxs("section",{className:"pi-sessionMasthead","data-state":e?.working?"working":"recent",children:[s.jsxs("div",{className:"pi-sessionMastTop",children:[s.jsx("span",{className:"pi-sessionCrumb",children:"Sessions ▸"}),s.jsx("h2",{className:"pi-sessionHeadline",title:S,children:S}),s.jsxs("span",{className:"pi-sessionState",children:[e?.working?s.jsx("span",{className:"pi-sessionLiveDot","aria-hidden":!0}):null,A]})]}),s.jsx("div",{className:"pi-sessionMeta",children:p.map((x,b)=>s.jsxs("span",{title:b===p.length-1?t:x,children:[b===1?s.jsx(ge,{harness:h,size:11}):null,x]},`${x}:${b}`))}),u?s.jsxs("div",{className:"pi-sessionTerminalActions","aria-label":"tmux terminal actions",children:[s.jsxs("span",{className:"pi-sessionTerminalName",title:u.sessionName,children:["tmux · ",u.sessionName]}),s.jsx("button",{type:"button",onClick:g,children:"Open in web terminal"}),f?s.jsxs("a",{href:f,children:["Open in native terminal",s.jsx(ls,{size:11,strokeWidth:1.8,"aria-hidden":!0})]}):null]}):null]}),s.jsx(Qs,{lookup:n,session:e,threads:i,nowMs:o,route:a,navigate:r})]})}function Hs({session:e,sessionRef:t,threads:i,route:n,navigate:a,nowMs:r}){const[o,u]=m.useState(null);return m.useEffect(()=>{u(null)},[t]),s.jsx("main",{className:"pi-sessionDetail","aria-label":"Selected session",children:s.jsxs("div",{className:"pi-sessionContent",children:[s.jsx(zs,{session:e,sessionRef:t,threads:i,lookup:o,route:n,navigate:a,nowMs:r}),s.jsx(qe,{sessionRef:t,navigate:a,showObserveRail:!1,onLookup:u})]})})}function N(e){return typeof e!="number"||!Number.isFinite(e)?"—":Math.abs(e)<1e3?e.toLocaleString("en-US"):Intl.NumberFormat("en-US",{notation:"compact",maximumFractionDigits:1}).format(e).toLowerCase()}function Ne(e){return typeof e!="number"||!Number.isFinite(e)||e<=0?"—":`${N(e)} tok`}function G(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?e:null}function qs(e){const t=G(e?.contextInputTokens),i=G(e?.contextWindowTokens);return t===null||i===null?null:Math.max(0,Math.min(1,t/i))}function Gs(e){const t=[{key:"input",label:"input",value:G(e?.inputTokens)??0},{key:"cache-read",label:"cache rd",value:G(e?.cacheReadInputTokens)??0},{key:"cache-write",label:"cache wr",value:G(e?.cacheCreationInputTokens)??0},{key:"output",label:"output",value:G(e?.outputTokens)??0},{key:"reasoning",label:"reasoning",value:G(e?.reasoningOutputTokens)??0}].filter(r=>r.value>0),i=t.reduce((r,o)=>r+o.value,0),n=t.filter(r=>r.key!=="reasoning"||i>0&&r.value/i>=.02);if(n.length>0)return n;const a=G(e?.totalTokens);return a!==null?[{key:"total",label:"total",value:a}]:[]}function _s({buckets:e}){const t=e.reduce((i,n)=>i+n.value,0);return e.length===0?null:s.jsxs("div",{className:"pi-sessionGlanceTokens","aria-label":"Token usage",children:[s.jsx("div",{className:"pi-sessionGlanceTokenBars",children:e.map(i=>s.jsx("span",{className:"pi-sessionGlanceTokenSeg","data-kind":i.key,style:{flexGrow:t>0?Math.max(.035,i.value/t):1,flexBasis:0},title:`${i.label}: ${Ne(i.value)}`},i.key))}),s.jsx("div",{className:"pi-sessionGlanceTokenLegend",children:e.map(i=>s.jsxs("span",{children:[s.jsx("i",{"data-kind":i.key,"aria-hidden":!0}),i.label," ",s.jsx("b",{children:N(i.value)})]},i.key))})]})}function oe(e){const t=ee(e?.metadata?.session?.sessionStart);if(t!==null)return t;for(const i of e?.events??[]){const n=ee(i.at);if(n!==null)return n}return null}function ke(e,t){for(let a=(e?.events.length??0)-1;a>=0;a-=1){const r=ee(e?.events[a]?.at);if(r!==null)return r}const i=oe(e),n=e?.events.at(-1)?.t;return i!==null&&typeof n=="number"&&Number.isFinite(n)?i+n*1e3:ee(t)}function Vs(e,t){const i=oe(e),n=ke(e,t);if(i!==null&&n!==null)return ie(Math.max(0,n-i))||"—";const a=e?.events.at(-1)?.t;return typeof a=="number"&&Number.isFinite(a)&&ie(a*1e3)||"—"}function ie(e){if(typeof e!="number"||!Number.isFinite(e)||e<0)return"";const t=Math.floor(e/1e3);if(t<60)return`${t}s`;const i=Math.floor(t/60);if(i<60)return`${i}m`;const n=Math.floor(i/60),a=i%60;if(n<48)return a>0?`${n}h ${a}m`:`${n}h`;const r=Math.floor(n/24),o=n%24;return o>0?`${r}d ${o}h`:`${r}d`}function Ks(e){const t=e?.metadata?.topology;if(!t)return null;const i=t.agents.length,n=t.agents.filter(u=>u.role!=="lead").length,a=t.groups.filter(u=>u.kind==="workflow").length,r=t.tasks.length,o=[];return n>0?o.push(`${n} worker${n===1?"":"s"}`):i>0&&o.push(`${i} agent${i===1?"":"s"}`),a>0&&o.push(`${a} workflow${a===1?"":"s"}`),r>0&&o.push(`${r} task${r===1?"":"s"}`),o.length?o.join(" · "):null}function Us(e){return[...e].sort((t,i)=>xe(i.state)-xe(t.state)||i.touches-t.touches||i.lastT-t.lastT||t.path.localeCompare(i.path)).slice(0,5).map(t=>({path:t.path,kind:t.state,detail:[t.touches>1?`${N(t.touches)} touches`:"1 touch",t.lastT>0?`last ${ie(t.lastT*1e3)}`:null].filter(Boolean).join(" · ")}))}function xe(e){switch(e){case"created":return 3;case"modified":return 2;case"read":return 1}}function Xs(e){const t=new Map;for(const i of e){if(i.kind!=="tool")continue;const n=Ys(i.tool||i.text),a=t.get(n)??{count:0,samples:[]};a.count+=1;const r=i.arg||i.detail||i.text;r&&a.samples.length<2&&a.samples.push(r),t.set(n,a)}return[...t.entries()].sort((i,n)=>n[1].count-i[1].count||i[0].localeCompare(n[0])).slice(0,5).map(([i,n])=>({name:i,count:n.count,detail:n.samples.join(" · ")||`${N(n.count)} uses`}))}function Ys(e){return(e.trim().split(/\s+/u)[0]??"tool").replace(/[_-]+/gu," ").toLowerCase()}function Zs({usage:e,contextPct:t,topology:i,workspace:n,projectRoot:a,branch:r}){const o=[];return t!==null&&o.push({label:"Context",value:`${t}%`,detail:t>=80?"approaching limit":"within window",tone:t>=80?"warn":void 0}),(e?.serviceTier||e?.planType||e?.speed)&&o.push({label:"Budget",value:e.serviceTier??e.planType??e.speed??"usage",detail:[e.planType,e.speed].filter(Boolean).join(" · ")||"provider metadata"}),n&&a&&n!==a?o.push({label:"Worktree",value:V(n),detail:"session cwd differs from project root",tone:"warn"}):r&&o.push({label:"Repo",value:r,detail:"session branch"}),i&&o.push({label:"Topology",value:i,detail:"observed harness hierarchy"}),(e?.webSearchRequests||e?.webFetchRequests)&&o.push({label:"Network",value:`${N((e.webSearchRequests??0)+(e.webFetchRequests??0))} req`,detail:[e.webSearchRequests?`${N(e.webSearchRequests)} search`:null,e.webFetchRequests?`${N(e.webFetchRequests)} fetch`:null].filter(Boolean).join(" · ")}),o.slice(0,4)}function Js({session:e,threads:t,nowMs:i}){return t.filter(n=>n.kind==="agent").filter(n=>n.agentId!==e?.agentId||n.work!==e?.work).sort((n,a)=>Number(a.working)-Number(n.working)||a.lastActivityAt-n.lastActivityAt).slice(0,4).map(n=>{const a=!!(e?.branch&&n.branch===e.branch),r=!!(e?.agentName&&n.agentName===e.agentName);return{thread:n,title:we(n.work,n.agentName,n.id),channel:n.conversationId?ve(n.conversationId):n.agentName,state:n.needs?"needs":n.working?"working":"recent",time:n.lastActivityAt?_(n.lastActivityAt,i):"—",participants:n.agentName,why:a?"same branch":r?"same agent":n.working?"active in project":"project thread"}})}function Y({label:e,value:t,title:i,detail:n}){return s.jsxs("span",{className:"pi-sessionGlanceField",title:i,children:[s.jsx("span",{children:e}),s.jsx("b",{children:t}),n?s.jsx("small",{children:n}):null]})}function Qs({lookup:e,session:t,threads:i,nowMs:n,route:a,navigate:r}){const[o,u]=m.useState(!1),c=m.useMemo(()=>{const T=e?.kind==="observe"?e.observe.data:null,l=T?.metadata?.session,p=T?.metadata?.usage,g=T?.events??[],f=T?.files??[],x=l?.turnCount??p?.assistantMessages??(e?.kind==="conversation"?e.session.messageCount:null),b=g.filter(U=>U.kind==="tool").length,D=f.filter(U=>U.state==="created").length,d=f.filter(U=>U.state==="modified").length,E=f.filter(U=>U.state==="read").length,O=D+d,W=qs(p),z=W!==null?Math.round(W*100):null,C=l?.cwd??e?.session?.workspaceRoot??t?.projectRoot??null,K=l?.gitBranch??e?.session?.currentBranch??t?.branch??null,q=Ks(T),se=Ne(p?.totalTokens??(typeof p?.inputTokens=="number"||typeof p?.outputTokens=="number"?(p?.inputTokens??0)+(p?.outputTokens??0):null)),ye=Gs(p),Ce=O>0?[d>0?`${N(d)} mod`:null,D>0?`${N(D)} new`:null].filter(Boolean).join(" · "):E>0?"read-only":"no file trace",Ae=f.length>0?`${N(f.length)} touched`:"—",Re=Us(f),Te=Xs(g),Le=Zs({usage:p,contextPct:z,topology:q,workspace:C,projectRoot:t?.projectRoot,branch:K}),Pe=Js({session:t,threads:i,nowMs:n});return{turnCount:x,toolCount:b,editCount:O,fileCountLabel:Ae,fileStateLabel:Ce,workspace:C,contextPct:z,showContext:z!==null,contextWarn:z!==null&&z>=80,tokenTotal:se,buckets:ye,fileSignals:Re,toolSignals:Te,contextSignals:Le,threadSignals:Pe,projectRoot:t?.projectRoot??null}},[e,t,i,n]),{turnCount:j,toolCount:h,editCount:v,fileCountLabel:y,fileStateLabel:w,workspace:I,contextPct:L,showContext:k,contextWarn:P,tokenTotal:F,buckets:M,fileSignals:B,toolSignals:A,contextSignals:S,threadSignals:$,projectRoot:R}=c;return s.jsxs("section",{className:"pi-sessionGlance","aria-label":"Session glance",children:[s.jsxs("div",{className:"pi-sessionVitals","aria-label":"Session vitals",children:[s.jsx(Y,{label:"Turns",value:N(j)}),s.jsx(Y,{label:"Tools",value:N(h)}),s.jsx(Y,{label:"Edits",value:N(v)}),s.jsx(Y,{label:"Files",value:y,detail:w!=="no file trace"?w:null}),I&&R&&I!==R?s.jsx(Y,{label:"Worktree",value:V(I),title:I}):null,k?s.jsxs("span",{className:"pi-sessionContextVital",title:"Context window usage",children:[s.jsx("span",{children:"Ctx"}),s.jsx("span",{className:"pi-sessionContextBar","aria-hidden":!0,children:s.jsx("span",{"data-warn":P||void 0,style:{width:`${L}%`}})}),s.jsxs("b",{"data-warn":P||void 0,children:[L,"%"]})]}):null,M.length>0?s.jsxs("button",{type:"button",className:"pi-sessionTokenToggle","aria-expanded":o,onClick:()=>u(T=>!T),children:[s.jsx("span",{children:"Tokens"}),s.jsx("b",{children:F}),s.jsx("i",{children:o?"▾":"▸"})]}):null]}),o&&M.length>0?s.jsx(_s,{buckets:M}):null,s.jsx(et,{files:B,tools:A,context:S,threads:$,route:a,navigate:r})]})}function et({files:e,tools:t,context:i,threads:n,route:a,navigate:r}){return s.jsxs("section",{className:"pi-sessionSignals","aria-label":"Session work signals",children:[s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Files"}),s.jsx("b",{children:N(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-sessionFileList",children:e.map(o=>s.jsxs("div",{className:"pi-sessionFileRow",children:[s.jsx("span",{"data-kind":o.kind,children:o.kind}),s.jsx("code",{title:o.path,children:o.path}),s.jsx("small",{children:o.detail})]},`${o.kind}:${o.path}`))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No file trace yet."})]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsx("div",{className:"pi-sessionSignalHead",children:s.jsx("span",{children:"Tools · Context · Topology"})}),t.length>0?s.jsx("div",{className:"pi-sessionToolGrid",children:t.map(o=>s.jsxs("span",{className:"pi-sessionToolPill",title:o.detail,children:[s.jsx("b",{children:o.name}),s.jsx("em",{children:N(o.count)})]},o.name))}):null,i.length>0?s.jsx("div",{className:"pi-sessionContextList",children:i.map(o=>s.jsxs("div",{className:"pi-sessionContextRow",children:[s.jsx("span",{children:o.label}),s.jsx("b",{"data-tone":o.tone,children:o.value}),s.jsx("small",{children:o.detail})]},`${o.label}:${o.value}`))}):t.length===0?s.jsx("span",{className:"pi-sessionSignalEmpty",children:"Trace metadata is still resolving."}):null]}),s.jsxs("div",{className:"pi-sessionSignalCol",children:[s.jsxs("div",{className:"pi-sessionSignalHead",children:[s.jsx("span",{children:"Recent threads"}),s.jsx("b",{children:N(n.length)})]}),n.length>0?s.jsx("div",{className:"pi-sessionThreadList",children:n.map(o=>s.jsxs("button",{type:"button",className:"pi-sessionThreadRow",onClick:()=>r(be(o.thread,a)),children:[s.jsx("span",{className:"pi-sessionThreadTitle",title:o.title,children:o.title}),s.jsxs("span",{className:"pi-sessionThreadMeta",children:[s.jsx("b",{children:o.channel}),s.jsx("em",{children:o.state}),s.jsx("small",{children:o.time})]}),s.jsxs("span",{className:"pi-sessionThreadWhy",children:[o.participants," · ",o.why]})]},o.thread.id))}):s.jsx("span",{className:"pi-sessionSignalEmpty",children:"No recent agent threads."})]})]})}function ne(e){return!e||e==="—"||/^\d+\s+branches$/iu.test(e)?null:e}function Se(e,t,i,n){const a=new Map,r=(u,c)=>{const j=u??e,h=ne(c),v=j??"project",y=a.get(v);if(y)return!y.branch&&h&&(y.branch=h),y;const w={key:v,root:j,branch:h,sessions:0,work:0,moving:0,lastActivityAt:0,repoWatch:null};return a.set(v,w),w};for(const u of t){const c=r(u.root,u.branch);u.working&&(c.moving+=1),c.lastActivityAt=Math.max(c.lastActivityAt,u.lastActivityAt)}const o=(u,c)=>{const j=u??e,h=a.get(j??"project");return h||(t.length>0?a.get(e??"")??a.values().next().value:r(u,c))};for(const u of i){const c=o(u.workspaceRoot??u.projectRoot,u.branch);c.sessions+=1,u.working&&(c.moving+=1,c.branch=ne(u.branch)??c.branch),c.lastActivityAt=Math.max(c.lastActivityAt,u.lastActivityAt)}for(const u of n){const c=o(u.workspaceRoot??u.projectRoot,u.branch);c.work+=1,u.working&&(c.moving+=1,c.branch=ne(u.branch)??c.branch),c.lastActivityAt=Math.max(c.lastActivityAt,u.lastActivityAt)}return a.size===0&&r(e,null),[...a.values()].sort((u,c)=>c.moving-u.moving||c.lastActivityAt-u.lastActivityAt||(u.root??"").localeCompare(c.root??""))}function st(e){return e.worktrees.map(t=>({key:t.id,root:t.path,branch:t.branch.name,sessions:t.sessions.length,work:t.agents.length,moving:t.agents.some($e)?1:0,lastActivityAt:t.lastCommitAt??0,repoWatch:t}))}function tt({pullRequests:e,loading:t,warnings:i,onRefresh:n,nowMs:a}){return s.jsxs("section",{className:"pi-projectPullRequests","aria-label":"Open pull requests",children:[s.jsxs("div",{className:"pi-projectPullRequestsHead",children:[s.jsx("span",{children:"Open PRs"}),s.jsx("b",{children:t&&e.length===0?"…":N(e.length)})]}),e.length>0?s.jsx("div",{className:"pi-projectPullRequestList",children:e.slice(0,6).map(r=>{const o=r.updatedAt?Date.parse(r.updatedAt):Number.NaN;return s.jsxs("a",{className:"pi-projectPullRequest",href:r.url,target:"_blank",rel:"noreferrer",children:[s.jsxs("span",{className:"pi-projectPullRequestNumber",children:["#",r.number]}),s.jsx("b",{title:r.title,children:r.title}),s.jsxs("span",{className:"pi-projectPullRequestBranch",title:`${r.headRefName} → ${r.baseRefName}`,children:[r.headRefName," → ",r.baseRefName]}),s.jsx("em",{children:r.isDraft?"draft":"open"}),s.jsx("time",{children:Number.isFinite(o)?_(o,a):"updated"})]},r.id)})}):s.jsxs("div",{className:"pi-projectPullRequestState","data-loading":t||void 0,children:[s.jsx("span",{children:t?"Checking GitHub for open pull requests…":i[0]??"No open pull requests for this repository."}),!t&&i.length>0?s.jsx("button",{type:"button",onClick:n,children:"Retry"}):null]})]})}function nt(e){const t=new Set;let i=0,n=0;const a=[];for(const r of e.layers){r.files.length>0&&a.push(r.kind);for(const o of r.files)t.add(o.newPath??o.oldPath??"unknown"),i+=o.additions??0,n+=o.deletions??0}return{additions:i,deletions:n,files:[...t],layers:a}}function it({additions:e,deletions:t}){return e+t===0?s.jsx("span",{className:"pi-projectWorktreeChurnBar","data-empty":!0}):s.jsxs("span",{className:"pi-projectWorktreeChurnBar","aria-label":`${e} additions and ${t} deletions`,children:[e>0?s.jsx("i",{"data-add":!0,style:{flexGrow:e}}):null,t>0?s.jsx("i",{"data-delete":!0,style:{flexGrow:t}}):null]})}function ot({project:e,repoProject:t,repoLoading:i,repoError:n,diffSnapshots:a,diffErrors:r,diffLoading:o,pullRequests:u,pullRequestsLoading:c,pullRequestWarnings:j,onRepositoryRefresh:h,threads:v,sessions:y,route:w,navigate:I,nowMs:L}){const k=e?.root??y[0]?.projectRoot??v[0]?.projectRoot??null,P=v.length,F=e?.sessionCount??y.length,M=e?.agentCount??0,B=Math.max(e?.lastActivityAt??0,y[0]?.lastActivityAt??0,v[0]?.lastActivityAt??0),A=e?.branches.length?e.branches:[...new Set([...y.map(l=>l.branch),...v.map(l=>l.branch)].filter(l=>!!l&&l!=="—"&&l!=="main"))],S=t?.worktrees.length?st(t):Se(k,e?.worktrees??[],y,v),$=S.find(l=>l.moving>0&&l.branch)?.branch??S.find(l=>l.branch)?.branch??A[0]??"main",R=k?J(k):e?.title??w.projectSlug??"project",T=S.find(l=>l.moving>0)?.key??S.find(l=>l.branch===$)?.key??S[0]?.key;return s.jsxs("main",{className:"pi-projectOverview","aria-label":"Project overview",children:[s.jsxs("section",{className:"pi-projectSnapshot","aria-label":"Project snapshot",children:[s.jsxs("div",{className:"pi-projectRepository",children:[s.jsxs("div",{className:"pi-projectRepositoryHead",children:[s.jsx("span",{children:"Repository"}),s.jsx(cs,{size:13,strokeWidth:1.7,"aria-hidden":!0})]}),s.jsxs("div",{className:"pi-projectRepositoryIdentity",children:[s.jsx("b",{children:R}),s.jsx("span",{title:k??void 0,children:k?V(k):w.projectSlug??"project"})]}),s.jsxs("div",{className:"pi-projectRepositoryCurrent",children:[S.some(l=>l.moving>0)?s.jsx("span",{className:"pi-projectRepositoryPulse","aria-label":"Active now"}):null,s.jsxs("span",{children:[s.jsx("small",{children:"Current branch"}),s.jsx("b",{title:$,children:$})]}),s.jsx("time",{children:B?_(B,L):"no activity"})]}),F>0||M>0||P>0?s.jsxs("div",{className:"pi-projectRepositoryStats","aria-label":"Repository activity",children:[F>0?s.jsxs("span",{children:[s.jsx("b",{children:N(F)})," ",F===1?"session":"sessions"]}):null,M>0?s.jsxs("span",{children:[s.jsx("b",{children:N(M)})," ",M===1?"agent":"agents"]}):null,P>0?s.jsxs("span",{children:[s.jsx("b",{children:N(P)})," ",P===1?"thread":"threads"]}):null]}):null]}),s.jsxs("div",{className:"pi-projectWorktrees",children:[s.jsxs("div",{className:"pi-projectWorktreesHead",children:[s.jsx("span",{children:"Worktree preview"}),s.jsx("b",{children:N(S.length)})]}),s.jsx("div",{className:"pi-projectWorktreeList",children:S.slice(0,6).map(l=>{const p=l.repoWatch,g=l.root?a.get(l.root)??null:null,f=g?nt(g):null,x=p?Ie(p):null,b=f?.additions??x?.add??0,D=f?.deletions??x?.del??0,d=f?.files.length??(p?Math.max(p.status.changedFiles,x?.files??0):0),E=!!(d>0||p&&(!p.status.clean||p.branch.ahead>0||p.branch.behind>0)),O=u.filter(C=>C.headRefName===l.branch),W=!!(l.root&&o&&!g&&!r.has(l.root)),z=l.root?r.get(l.root)??null:"No worktree path is available.";return s.jsxs("article",{className:"pi-projectWorktree","data-active":l.key===T||void 0,"data-stranded":E||void 0,children:[s.jsx("span",{className:"pi-projectWorktreeTop",children:s.jsx("b",{title:l.branch??"main",children:l.branch??"main"})}),s.jsx("em",{title:l.root??void 0,children:l.root?V(l.root):"workspace"}),g||p?s.jsxs("div",{className:"pi-projectWorktreeDiff","data-clean":!E||void 0,children:[E?s.jsxs(s.Fragment,{children:[s.jsxs("span",{className:"pi-projectWorktreeChurn",children:[s.jsxs("b",{className:"pi-projectWorktreeAdd",children:["+",N(b)]}),s.jsxs("b",{className:"pi-projectWorktreeDel",children:["−",N(D)]}),s.jsx(it,{additions:b,deletions:D})]}),s.jsxs("small",{children:[N(d)," changed"]})]}):s.jsx("small",{children:"clean"}),l.root?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:()=>I({view:"repo-diff",path:l.root}),children:"View diff"}):null]}):s.jsxs("div",{className:"pi-projectWorktreeDiff","data-pending":!0,children:[s.jsx("small",{children:W||i?"Reading worktree diff…":z??n??"No diff data returned."}),!W&&!i?s.jsx("button",{type:"button",className:"pi-projectWorktreeOpenDiff",onClick:h,children:"Retry"}):null]}),f&&f.files.length>0?s.jsxs("span",{className:"pi-projectWorktreeFiles",title:f.files.join(`
2
+ `),children:[f.files.slice(0,2).map(C=>J(C)).join(" · "),f.files.length>2?` · +${f.files.length-2} more`:""]}):null,s.jsx("span",{className:"pi-projectWorktreeMeta",children:p?s.jsxs(s.Fragment,{children:[s.jsx("small",{children:p.branch.ahead>0||p.branch.behind>0?`${p.branch.ahead}↑ ${p.branch.behind}↓`:"synced"}),p.status.staged>0?s.jsxs("small",{children:[N(p.status.staged)," staged"]}):null,p.status.unstaged>0?s.jsxs("small",{children:[N(p.status.unstaged)," unstaged"]}):null,p.status.untracked>0?s.jsxs("small",{children:[N(p.status.untracked)," untracked"]}):null,p.status.conflicts>0?s.jsxs("small",{children:[N(p.status.conflicts)," conflicts"]}):null,f?.layers.map(C=>s.jsx("small",{children:C},C)),O.length>0?s.jsxs("small",{children:[O.length," PR",O.length===1?"":"s"]}):null]}):s.jsxs(s.Fragment,{children:[s.jsx("small",{children:l.lastActivityAt?_(l.lastActivityAt,L):"idle"}),s.jsxs("small",{children:[N(l.sessions)," sessions"]}),s.jsxs("small",{children:[N(l.work)," threads"]})]})})]},l.key)})}),S.length>6?s.jsxs("div",{className:"pi-projectWorktreeMore",children:["+",S.length-6," more worktrees"]}):null]})]}),s.jsx(tt,{pullRequests:u,loading:c,warnings:j,onRefresh:h,nowMs:L})]})}function at({project:e,threads:t,sessions:i,route:n,navigate:a,nowMs:r}){const o=e?.root??i[0]?.projectRoot??t[0]?.projectRoot??null,u=m.useMemo(()=>Se(o,e?.worktrees??[],i,t).map(j=>j.root).filter(j=>!!j),[e?.worktrees,o,i,t]),c=ks(o,u);return s.jsx(ot,{project:e,repoProject:c.project,repoLoading:c.repoLoading,repoError:c.repoError,diffSnapshots:c.diffSnapshots,diffErrors:c.diffErrors,diffLoading:c.diffLoading,pullRequests:c.pullRequests,pullRequestsLoading:c.pullRequestsLoading,pullRequestWarnings:c.pullRequestWarnings,onRepositoryRefresh:c.refresh,threads:t,sessions:i,route:n,navigate:a,nowMs:r})}function ei({route:e,navigate:t,zeroPreview:i=!1}){const{model:n,nowMs:a,loading:r,error:o,agents:u=Ss}=Ve(e),c=!!e.projectSlug,j=e.projectSlug?Ke(n,e.projectSlug)??e.projectSlug:null,h=j&&j!==e.projectSlug?{...e,projectSlug:j}:e,v=c&&!je(e.sessionId)?e.sessionId??null:null,y=m.useMemo(()=>v?Bs(n.sessions,h):null,[h,n.sessions,v]),w=c?e.indexView==="agents"?"agents":e.indexView==="sessions"?"sessions":"overview":"overview",I=c?n.projects.find(l=>l.slug===j)??null:null,L=m.useMemo(()=>{if(i)return[];if(!c)return[];const l=j,p=Z(n.threads,l),g=ae(n.sessions,l);return w==="overview"?[]:w==="agents"?[]:g.length>0?g:p},[j,n.sessions,n.threads,w,c,i]),k=m.useMemo(()=>Ue(L),[L]),P=m.useMemo(()=>k.flatMap(l=>l.items),[k]),F=n.projects.length>0||n.threads.length>0||n.sessions.length>0,M=r&&!F,B=r&&!i,A=!c&&!B&&(i||n.projects.length===0&&L.length===0),S=!c&&!A,[$,R]=m.useState(-1),T=m.useRef(new Map);return m.useEffect(()=>{!c||!e.sessionId||!je(e.sessionId)||t({...h,indexView:"sessions",sessionId:void 0,selectedAgentId:void 0})},[h,t,e.sessionId,c]),m.useEffect(()=>{R(-1)},[j]),m.useEffect(()=>{function l(p){const g=document.activeElement;if(!!g&&(g.tagName==="INPUT"||g.tagName==="TEXTAREA"||g.isContentEditable))return;const x=P.length;if(x){if(p.key==="ArrowDown"||p.key==="j")p.preventDefault(),R(b=>b<0?0:Math.min(x-1,b+1));else if(p.key==="ArrowUp"||p.key==="k")p.preventDefault(),R(b=>b<0?0:Math.max(0,b-1));else if(p.key==="Enter"){const b=P[$<0?0:$];b&&(p.preventDefault(),t(b.kind==="session"?re(b,h):le(b,h)))}}}return document.addEventListener("keydown",l),()=>document.removeEventListener("keydown",l)},[$,h,P,t]),m.useEffect(()=>{if($<0)return;const l=P[$];l&&T.current.get(l.id)?.scrollIntoView({block:"nearest"})},[$,P]),s.jsxs("div",{className:"s-pi s-pi-inbox","aria-busy":r||void 0,"data-loading":r||void 0,children:[c?s.jsx(Rs,{route:h,navigate:t,slug:j,model:n,mode:w,repoProject:null}):s.jsx("div",{className:"pi-inboxHead",children:s.jsxs("div",{className:"pi-inboxHeading",children:[s.jsx("h1",{className:"pi-inboxTitle",children:"Projects"}),s.jsx("span",{className:"pi-inboxDigest",children:Ls(n,i)})]})}),v?s.jsx(Hs,{session:y,sessionRef:v,threads:Z(n.threads,j),route:h,navigate:t,nowMs:a}):c&&w==="overview"?s.jsx(at,{project:I,threads:Z(n.threads,j),sessions:ae(n.sessions,j),route:h,navigate:t,nowMs:a}):c&&w==="agents"&&I?s.jsx(Ge,{project:I,threads:Z(n.threads,j),route:h,navigate:t,nowMs:a}):S?s.jsx(_e,{model:n,agents:u,route:e,navigate:t,nowMs:a}):s.jsxs("div",{className:"pi-threads",children:[M?s.jsx(As,{}):null,!M&&k.map(l=>{let p=0;for(const g of k){if(g.group===l.group)break;p+=g.items.length}return s.jsxs("div",{children:[s.jsxs("div",{className:"pi-sectionHead","data-tone":l.group,children:[s.jsx("span",{className:"pi-sectionLabel",children:l.label}),s.jsx("span",{className:"pi-sectionCount",children:l.items.length})]}),l.items.map((g,f)=>{const x=p+f;return s.jsx(Cs,{thread:g,crossProject:!c,selected:g.kind==="session"?Ye(g,h,n.sessions):Ze(g,h,n.threads),cursor:$===x,nowMs:a,onSelect:()=>{const b=g.kind==="session"?Xe(g,h):be(g,h);t(b)},onOpen:()=>t(g.kind==="session"?re(g,h):le(g,h)),rowRef:b=>{b?T.current.set(g.id,b):T.current.delete(g.id)}},g.id)})]},l.group)}),!M&&L.length===0?o&&!F?s.jsx(pe,{tone:"error",title:"Projects unavailable",detail:o}):A?s.jsx("div",{className:"pi-empty",children:s.jsx(Ps,{route:e,navigate:t,projects:n.projects})}):B?s.jsx("div",{className:"pi-empty",children:"Loading…"}):s.jsx(pe,{title:rt(c,w)}):null]})]})}function rt(e,t){return e&&t==="agents"?"No visible agents in this project.":e?"No sessions in this project yet.":"No projects yet."}export{ei as ProjectsInbox,Cs as ThreadRow};
@@ -0,0 +1 @@
1
+ import{r as p,j as e}from"./index-DvLtl7rV.js";import{t as P}from"./time-Dhsh_2EG.js";import{F as y,A as b}from"./AddProjectForm-IqOtJfRs.js";import{s as k}from"./project-overview-helpers-BQTc_Ous.js";import{u as C,r as A}from"./projects-inbox-Cg4X2lUQ.js";import{S as x}from"./search-CDko0PKE.js";import{X as w}from"./x-CAbNespN.js";import{C as F}from"./chevron-down-wciXnOQz.js";import{F as v}from"./DocumentFocusViewer-Do3wQ_3Z.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./createLucideIcon-DezKXSG2.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./tail-events-Ps8KpKah.js";import"./Provider-CtXJeLrP.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./chevron-right-D-HdlPg8.js";import"./file-text-CqJgwxmv.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./mesh-roster-Bc7T4b7z.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";function G(t){return t.needs>0?"needs":t.working>0||t.liveSessionCount>0?"working":"idle"}function L(t){return[t.title,t.slug,t.root??""].join(" ").toLowerCase()}function R(t,a,s){const o=a.trim().toLowerCase();return[...o?t.filter(i=>L(i).includes(o)):t].sort((i,n)=>s==="name"?i.title.localeCompare(n.title):n.lastActivityAt-i.lastActivityAt||i.title.localeCompare(n.title))}function W({rows:t=7}){return e.jsx("div",{className:"pi-railLoading","aria-hidden":"true",children:Array.from({length:t},(a,s)=>e.jsx("div",{className:"pi-projectGroup pi-projectGroup--loading",children:e.jsx("div",{className:"pi-projectGroupHead pi-projectGroupHead--flat",children:e.jsxs("span",{className:"pi-projectPath pi-projectPath--flat",children:[e.jsx(v,{size:13,strokeWidth:1.6,"aria-hidden":!0}),e.jsxs("span",{className:"pi-projectPathStack",children:[e.jsx("span",{className:"pi-loadingLine pi-loadingLine--railProject"}),e.jsx("span",{className:"pi-loadingLine pi-loadingLine--railRoot"})]})]})})},s))})}function be({route:t,navigate:a,zeroPreview:s=!1}){const{model:o,nowMs:l,loading:i,error:n}=C(t),[c,j]=p.useState(""),[d,N]=p.useState("recent"),[h,u]=p.useState(!1),m=p.useMemo(()=>R(s?[]:o.projects,c,d),[o.projects,c,d,s]),g=t.projectSlug?A(o,t.projectSlug)??t.projectSlug:void 0,f=i&&o.projects.length===0&&!s,S=p.useCallback(r=>{a({view:"agents-v2",projectSlug:r,...t.machineId?{machineId:t.machineId}:{},...t.showEphemeral?{showEphemeral:!0}:{}})},[a,t.machineId,t.showEphemeral]);return e.jsxs("nav",{className:"s-pi s-pi-rail","aria-label":"Projects","aria-busy":i||void 0,"data-loading":i||void 0,children:[e.jsxs("div",{className:"pi-railFind",role:"search",children:[e.jsx(x,{size:13,strokeWidth:1.8,"aria-hidden":!0}),e.jsx("input",{className:"pi-railFindInput",type:"search",value:c,placeholder:"Find project","aria-label":"Find project",onChange:r=>j(r.currentTarget.value)}),c?e.jsx("button",{type:"button",className:"pi-railFindClear","aria-label":"Clear",onClick:()=>j(""),children:e.jsx(w,{size:12,strokeWidth:2,"aria-hidden":!0})}):null]}),e.jsx("div",{className:"pi-railBody",children:e.jsxs("div",{className:"pi-railGroup pi-railGroup--projects",children:[e.jsxs("div",{className:"pi-railProjectTools",children:[e.jsx("div",{className:"pi-railLabel",children:"Projects"}),e.jsxs("label",{className:"pi-railSortWrap",title:"Sort projects",children:[e.jsx("span",{className:"pi-srOnly",children:"Sort projects"}),e.jsxs("select",{className:"pi-railSort",value:d,"aria-label":"Sort projects",onChange:r=>N(r.currentTarget.value),children:[e.jsx("option",{value:"recent",children:"Recent"}),e.jsx("option",{value:"name",children:"Name"})]}),e.jsx(F,{size:12,strokeWidth:2,"aria-hidden":!0})]}),e.jsx("button",{type:"button",className:"pi-railAddBtn","aria-expanded":h,"aria-label":"Add project",title:"Add a project by path",onClick:()=>u(r=>!r),children:e.jsx(y,{size:13,strokeWidth:1.8,"aria-hidden":!0})})]}),h?e.jsx(b,{onClose:()=>u(!1)}):null,f?e.jsx(W,{}):n&&m.length===0?e.jsx("div",{className:"pi-railEmpty",children:"Projects unavailable."}):m.length===0?e.jsx("div",{className:"pi-railEmpty",children:c?"No projects matched.":"No projects yet."}):e.jsx("div",{className:"pi-projectIndex",children:m.map(r=>e.jsx(E,{project:r,selected:g===r.slug,nowMs:l,onOpen:S},r.slug))})]})}),e.jsx("div",{className:"pi-railFoot",children:e.jsxs("button",{type:"button",className:"pi-railFootBtn",onClick:()=>a({view:"search"}),children:[e.jsx(x,{size:13,strokeWidth:1.8,"aria-hidden":!0}),"Search all Scout"]})})]})}function E({project:t,selected:a,nowMs:s,onOpen:o}){const l=G(t),i=t.lastActivityAt?P(t.lastActivityAt,s):"No activity";return e.jsx("div",{className:"pi-projectGroup pi-projectGroup--flat","data-selected":a||void 0,"data-state":l,children:e.jsx("div",{className:"pi-projectGroupHead pi-projectGroupHead--flat",children:e.jsxs("button",{type:"button",className:"pi-projectPath pi-projectPath--flat",title:t.root??t.title,"aria-current":a?"page":void 0,"aria-label":`Open /${t.title}`,onClick:()=>o(t.slug),children:[e.jsx(v,{size:13,strokeWidth:1.6,"aria-hidden":!0}),e.jsxs("span",{className:"pi-projectPathStack",children:[e.jsxs("span",{className:"pi-projectPathText",children:["/",t.title]}),e.jsxs("span",{className:"pi-projectPathMeta",children:[e.jsx("span",{children:t.root?k(t.root):"Discovered project"}),e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsxs("span",{children:[t.worktreeCount," ",t.worktreeCount===1?"worktree":"worktrees"]}),e.jsx("span",{"aria-hidden":!0,children:"·"}),e.jsx("time",{children:i})]})]}),l!=="idle"?e.jsx("span",{className:"pi-projectState","data-state":l,children:l==="needs"?"Needs you":"Active"}):null]})})})}export{be as ProjectsRail,R as filterAndSortProjects};
@@ -0,0 +1 @@
1
+ import{j as i}from"./index-DvLtl7rV.js";import{u as e}from"./Provider-CtXJeLrP.js";import{d as s}from"./types-B0PlfpKc.js";import{ProjectsInbox as c}from"./ProjectsInbox-C_bMHLCc.js";import{ProjectsRail as n}from"./ProjectsRail-J-aH_pxT.js";import{ProjectAgentProfile as a}from"./ProjectAgentProfile-Bdjd_dAx.js";import{i as l}from"./model-IGCUEsMy.js";/* empty css */import"./projects-inbox-Cg4X2lUQ.js";import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./time-Dhsh_2EG.js";import"./index-zvhpRHao.js";import"./HarnessMark-B979GCSB.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./AgentAvatar-6-KBVKUu.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./ui-LM8pS8qE.js";import"./openContent-C6XO6kr5.js";import"./SessionRefScreen-COVQMbtE.js";import"./tail-events-Ps8KpKah.js";import"./BackToPicker-CXZjBRAe.js";import"./ConversationScreen-CR9pWB65.js";import"./ConversationComposer-CXPKx86g.js";import"./zap-Cq8eWkcF.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";/* empty css */import"./ConversationHeader-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./activity-DcrMApUY.js";import"./message-circle-mZCv8tvB.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./sparkles-CETYrxGA.js";import"./SessionObserve-dQDN23pP.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./CrewWorkspaces-NKujRzwh.js";import"./AddProjectForm-IqOtJfRs.js";import"./mesh-roster-Bc7T4b7z.js";import"./agent-specialization-BujJVUTD.js";import"./project-overview-helpers-BQTc_Ous.js";import"./sliders-horizontal-C8njVwfg.js";import"./message-square-C7t_qtuj.js";import"./api-HFH8wFyb.js";import"./cache-CeWH_KzJ.js";import"./arrow-up-right-C6Wl-1uw.js";import"./agents-project-model-UYiamtrU.js";import"./AgentsSubnav-C4xpQhsv.js";import"./SecondaryNav-BR4VRdgh.js";import"./secondaryNavConfig-BoQ_zYR9.js";import"./compass-Dt1AMXz2.js";import"./settings-Dyvpkb1D.js";import"./git-branch-CK5v8F2v.js";import"./scroll-text-Dze_dXtQ.js";import"./profile-APxDsN2P.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-DsaZJXZt.js";import"./terminal-relay-GYMIvKs1.js";/* empty css */import"./AgentDefinitionsWorkspace-Iyl4BesU.js";import"./FileViewerPane-Df6VzXjA.js";import"./agent-essentials-D7KRGYvF.js";/* empty css *//* empty css */import"./ProjectAgentProfileBar-k2QHHHsQ.js";function f({route:o,navigate:r}){const t=l(o),m=t?`profile:${o.agentId}`:"index",p=!t&&j();return i.jsx("div",{className:"s-av2","data-view":t?"profile":"index",children:i.jsx("div",{className:"av2-stagePane",children:t?i.jsx(a,{route:o,navigate:r}):i.jsx(c,{route:o,navigate:r,zeroPreview:p})},m)})}function Cr({navigate:o}){const{route:r}=e(),t=r.view==="agents-v2"?r:{view:"agents-v2"};return i.jsxs("div",{className:"pi-projectsEmbedShell",children:[i.jsx(n,{route:t,navigate:o}),i.jsx(f,{route:t,navigate:o})]})}const Ir=s({id:"projects",label:"Projects",route:{view:"agents-v2"},webPath:"/projects",screen:"ProjectsEmbedScreen",embed:{path:"/embed/projects",profile:"macos.projects",ownsInternalRoutes:!0,rootClassName:"s-projects-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0}}});function j(){if(typeof window>"u")return!1;const o=window.location.hostname.toLowerCase();if(o!=="localhost"&&o!=="127.0.0.1"&&o!=="::1")return!1;const r=new URLSearchParams(window.location.search).get("zero")?.trim().toLowerCase();return r==="projects"||r==="project"||r==="1"||r==="true"}export{Cr as ProjectsEmbedScreen,f as ProjectsScreen,Ir as scoutSurface};
@@ -0,0 +1 @@
1
+ import{j as s}from"./index-DvLtl7rV.js";import{A as R}from"./AgentAvatar-6-KBVKUu.js";import{H as y}from"./HarnessMark-B979GCSB.js";import{t as O}from"./time-Dhsh_2EG.js";import{s as P}from"./project-overview-helpers-BQTc_Ous.js";import{u as H,t as T,a as B,s as C,f as L,b as z}from"./projects-inbox-Cg4X2lUQ.js";import{A as b}from"./arrow-up-right-C6Wl-1uw.js";import"./Provider-CtXJeLrP.js";import"./router-B9vQkNJL.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./api-Co9aQ2Jw.js";import"./sse-CD9MMUxl.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./createLucideIcon-DezKXSG2.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./file-text-CqJgwxmv.js";import"./x-CAbNespN.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-BLYDhL3Z.js";import"./NewChatComposer-_Stj0fZy.js";import"./text-BP3oyl8-.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./NewChatOrigin-B1u7ki70.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./SpriteAvatar-z5hHesx9.js";import"./CrewAvatar-BwXjyg8N.js";import"./tail-events-Ps8KpKah.js";import"./mesh-roster-Bc7T4b7z.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";function V(i,o,t){if(t.sessionId){const r=L(o,t);if(r)return{kind:"session",session:r};const a=z(i,t);if(a)return{kind:"thread",thread:a}}if(t.selectedAgentId){const r=i.find(l=>l.agentId===t.selectedAgentId)??null;if(r)return{kind:"thread",thread:r};const a=o.find(l=>!l.sessionId&&l.agentId===t.selectedAgentId)??null;if(a)return{kind:"session",session:a}}return null}function p({label:i,value:o}){return s.jsxs("span",{className:"pi-stat",children:[s.jsx("span",{className:"pi-statLabel",children:i}),s.jsx("span",{className:"pi-statValue",children:o})]})}function Ps({route:i,navigate:o}){const{model:t,nowMs:r,loading:a,error:l}=H(i);if(!i.sessionId&&!i.selectedAgentId)return null;const d=V(t.threads,t.sessions,i);if(!d)return s.jsxs("div",{className:"s-pi s-pi-aside",children:[s.jsx("header",{className:"pi-asideHead",children:s.jsxs("div",{className:"pi-asideIdent",children:[s.jsx("div",{className:"pi-asideTop",children:s.jsx("span",{className:"pi-asideName",children:a?"Resolving selection":l?"Project data unavailable":"Selection unavailable"})}),s.jsx("div",{className:"pi-asideSub",children:s.jsxs("span",{className:"pi-asideStatus","data-tone":a?"working":"recent",children:[a?s.jsx("span",{className:"pi-asidePulse","aria-hidden":!0}):null,a?"loading":"idle"]})})]})}),s.jsx("div",{className:"pi-asideBody",children:s.jsx("p",{className:"pi-asideMuted",children:l??"The selected item is not in the current project snapshot."})})]});const n=d.kind==="thread"?d.thread:null,e=d.kind==="session"?d.session:null,m=n?.agentName??e?.agentName??"Session",h=n?.harness??e?.harness??"session",g=n?.projectTitle??e?.projectTitle??i.projectSlug??"project",x=n?.branch??e?.branch??null,c=n?.working??e?.working??!1,f=n?.needs?"needs":c?"working":"recent",I=n?.needs?"your turn":c?"working":e?"selected":"idle",k=n?.work??e?.work??"No session detail available.",v=n?.lastActivityAt??e?.lastActivityAt??0,j=e?.sessionId??n?.sessionId??null,u=n?.projectRoot??e?.projectRoot??null,N=n?T(n,i):null,w=n?B(n,i):e?C(e,i):i,A=e?e.route?.view==="conversation"?"Open conversation":e.route?.view==="sessions"?"Open session":e.agentId?"Open agent":"Open project":n?.kind==="native"?"Open session":n?.conversationId?"Open conversation":"Open agent",S={view:"agents-v2",...i.projectSlug?{projectSlug:i.projectSlug}:{},...i.indexView?{indexView:i.indexView}:{},...i.machineId?{machineId:i.machineId}:{},...i.showEphemeral?{showEphemeral:!0}:{}};return s.jsxs("div",{className:"s-pi s-pi-aside",children:[s.jsxs("header",{className:"pi-asideHead",children:[s.jsx("span",{className:"pi-asideAvatar",children:s.jsx(R,{agent:{name:m,harness:h,state:c?"in_turn":null},placement:"row",size:38})}),s.jsxs("div",{className:"pi-asideIdent",children:[s.jsxs("div",{className:"pi-asideTop",children:[s.jsx("span",{className:"pi-asideName",title:m,children:m}),s.jsx("span",{className:"pi-asideHmark","aria-hidden":!0,children:s.jsx(y,{harness:h,size:13})}),s.jsxs("span",{className:"pi-asideProj",children:["/",g]})]}),s.jsxs("div",{className:"pi-asideSub",children:[x?s.jsx("span",{className:"pi-asideBranch",children:x}):null,s.jsxs("span",{className:"pi-asideStatus","data-tone":f,children:[c?s.jsx("span",{className:"pi-asidePulse","aria-hidden":!0}):null,I]})]})]})]}),s.jsxs("div",{className:"pi-asideBody",children:[s.jsx("h2",{className:"pi-asideHeadline",children:k}),s.jsxs("div",{className:"pi-asideReadouts",children:[s.jsx(p,{label:"Last active",value:v?O(v,r):"—"}),s.jsx(p,{label:e?"Session":"Conversations",value:e?"1":String(n?.sessionCount??0)}),s.jsx(p,{label:"Harness",value:h}),n?.contextPct!=null?s.jsx(p,{label:"Context",value:`${n.contextPct}%`}):null]}),e?s.jsxs("div",{className:"pi-asideSection",children:[s.jsx("div",{className:"pi-asideSectionHead",children:"Session context"}),s.jsxs("div",{className:"pi-asideLine",children:[j?s.jsxs("span",{title:j,children:["ref · ",j]}):s.jsx("span",{children:"No stable session reference yet."}),u?s.jsxs("span",{title:u,children:["root · ",P(u)]}):null,e.conversationId?s.jsxs("span",{title:e.conversationId,children:["conversation · ",e.conversationId]}):null]})]}):null,s.jsxs("div",{className:"pi-asideActions",children:[s.jsxs("button",{type:"button",className:"pi-asideBtn pi-asideBtnPrimary",onClick:()=>o(w),children:[A,s.jsx(b,{size:13,strokeWidth:2,"aria-hidden":!0})]}),N?s.jsxs("button",{type:"button",className:"pi-asideBtn",onClick:()=>o(N),children:["Observe",s.jsx(b,{size:13,strokeWidth:2,"aria-hidden":!0})]}):null,s.jsx("button",{type:"button",className:"pi-asideBtn",onClick:()=>o(S),children:"Clear"})]})]})]})}export{Ps as ProjectsThreadAside};