@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,2 +1,2 @@
1
- import{d as Ke,i as xe}from"./context-budget-DX_fwUs3.js";import{i as we}from"./terminal-sessions-BQ6t92tJ.js";import{c as ze,d as Re,o as Ge,i as Ue,l as Q,L as ke}from"./lane-observe-vfyACHi0.js";import{a as qe,i as Ve,b as Xe,c as Se,d as Qe}from"./lane-edit-display-C_Aujldz.js";import{i as Je,b as Ze,t as Ye,e as et,f as tt,g as nt}from"./tail-display-DcliDVkW.js";function H(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ee(e,t){return H(H(e)?.[t])}function st(e){const s=H(e.raw)?.type;return typeof s=="string"?s:void 0}function ot(e){const s=Ee(e.raw,"payload")?.type;return typeof s=="string"?s:void 0}const rt=/context\s+compacted|compacted\s+·/iu;function it(e){const t=e.summary.trim();return t&&(e.source==="codex"&&(Ee(H(e.raw),"payload"),ot(e)==="context_compacted"||st(e)==="compacted")||rt.test(t))?t:null}function at(e,t,s){let n=null,o=null;for(const c of e){const l=it(c);l&&(n===null||c.ts>=n)&&(n=c.ts,o=l)}const r=Ke(t,s);let i=null;return r?.overLimit?i="over_limit":r&&r.pct>=80?i="high_context":n!==null&&(i="post_compaction_point"),{eligible:!!(r&&(r.overLimit||r.pct>=75||n!==null)),reason:i,lastCompactedAt:n,lastCompactedSummary:o}}function hn(e){const t=e?.trim().toLowerCase()??"";return t==="codex"||t==="claude"||t==="claude-code"}const re="5m",te=[{key:"5m",label:"5m",windowMs:5*6e4},{key:"30m",label:"30m",windowMs:30*6e4},{key:"4h",label:"4h",windowMs:240*6e4},{key:"24h",label:"24h",windowMs:1440*6e4}];function ie(e){return te.find(t=>t.key===e)?.windowMs??te[0].windowMs}function gn(e){return te.find(t=>t.key===e)?.label??e}function yn(e){switch(e){case"5m":case"30m":return 2e3;case"4h":return 5e3;case"24h":return 1e4;default:return 2e3}}const be=400;function ct(e){return e?`${e[0]?.toUpperCase()}${e.slice(1).toLowerCase()}`:""}function ut(e){const t=e.name.trim();if(!t||e.agentClass==="organic")return!0;const s=e.harness?.trim();if(!s)return!1;const n=ct(s);return new RegExp(`^${n}\\s+[0-9a-f]{6}`,"i").test(t)}function ae(e,t=null){const s=e?.trim();if(!s)return!1;if(/^relay[-:]/i.test(s))return!0;const n=t?.sessionName?.trim();return!!(n&&s===n)}function N(e){const t=e.harnessSessionId?.trim();return t?!ae(t,e.terminalSurface):!1}function q(e){return e.transport==="codex_app_server"&&e.state==="available"}function lt(e,t,s){return(e.brokerActivity??[]).filter(n=>n.at>0&&t-n.at<=s)}function wn(e,t=Date.now(),s=re){if(q(e))return!1;if(e.harnessSessionId?.trim()||e.state&&/^(working|active|running|in_turn|in_flight|queued|waking|dispatching)$/i.test(e.state.trim()))return!0;const n=ie(s);return e.updatedAt?t-e.updatedAt<=n:!1}function j(e,t){return t==="scout"&&e.agentClass!=="organic"&&!ut(e)&&(N(e)||(e.brokerActivity?.length??0)>0)}function dt(e,t){return e.role==="subagent"?e.name.trim()||"Subagent":j(e,t)?e.name.trim()||"Agent":e.project?.trim()||e.harness?.trim()||"local"}function kn(e,t){return e.harness?.trim()||dt(e,t)}function Sn(e,t){if(j(e,t))return[e.project,e.branch].filter(Boolean).join(" · ")||e.harness||"local";const s=e.harness?.trim(),n=e.harnessSessionId?.trim();return s&&n?`${s} · ${n.replace(/\.jsonl$/u,"").slice(0,8)}`:s||n?.slice(0,8)||"native"}function ft(e){let t=2166136261;for(let s=0;s<e.length;s+=1)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ne(e){const t=e.sessionId?.trim();return t?`native:${e.source}:${t}`:`native:${e.source}:path:${ft(e.transcriptPath)}`}function T(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function $(e){const t=T(e.raw);return T(t?.payload)}function ce(e){const s=T(e.raw)?.type;return typeof s=="string"?s:null}function V(e){const s=$(e)?.type;return typeof s=="string"?s:null}function f(...e){for(const t of e){if(typeof t!="string")continue;const s=t.trim();if(s)return s}}function k(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function I(e,t){return T(e?.[t])}function Fe(e,t){let s=null;for(const n of e){if(ce(n)!==t)continue;const o=$(n);o&&(!s||n.ts>=s.event.ts)&&(s={event:n,payload:o})}return s?.payload??null}function ue(e){return Fe(e,"turn_context")}function Le(e){return Fe(e,"session_meta")}function Ce(e){const t=I(e,"collaboration_mode"),s=I(t,"settings");return f(e?.effort,s?.reasoning_effort)}function K(e){return f(e?.gitBranch,e?.git_branch,e?.currentBranch,e?.current_branch,e?.branch)}function mt(e,t,s="session"){if(e.source!=="codex")return null;if(ce(e)!=="event_msg"||V(e)!=="token_count"){const b=e.summary.match(/^tokens? · ([0-9,]+)/i)?.[1]?.replace(/,/g,""),w=b?Number.parseInt(b,10):NaN;return Number.isFinite(w)?{totalTokens:w}:null}const n=$(e),o=I(n,"info"),r=I(o,"total_token_usage"),i=I(o,"last_token_usage"),u=I(n,"rate_limits");if(!r&&!o&&!u)return null;const c=s==="turn"?i??r:r??i,l={},p=k(c?.input_tokens),d=k(i?.input_tokens),m=k(c?.output_tokens),g=k(c?.reasoning_output_tokens),v=k(c?.cached_input_tokens)??k(c?.cache_read_input_tokens),x=k(c?.cache_creation_input_tokens)??k(c?.cache_write_input_tokens),M=k(c?.total_tokens)??(p!==void 0||m!==void 0?(p??0)+(m??0):void 0),D=k(o?.model_context_window)??xe({model:t,adapterType:"codex"}),a=f(n?.service_tier,u?.service_tier),S=f(n?.speed,u?.speed),y=f(n?.plan_type,u?.plan_type);return p!==void 0&&(l.inputTokens=p),d!==void 0&&(l.contextInputTokens=d),m!==void 0&&(l.outputTokens=m),g!==void 0&&(l.reasoningOutputTokens=g),v!==void 0&&(l.cacheReadInputTokens=v),x!==void 0&&(l.cacheCreationInputTokens=x),M!==void 0&&(l.totalTokens=M),D!==void 0&&(l.contextWindowTokens=D),a&&(l.serviceTier=a),S&&(l.speed=S),y&&(l.planType=y),Object.keys(l).length>0?l:null}function pt(e){if(e.source!=="claude"||ce(e)!=="assistant")return null;const t=T(e.raw),s=T(t?.message),n=T(s?.usage);if(!s||!n)return null;const o=k(n.input_tokens),r=k(n.output_tokens),i=k(n.cache_read_input_tokens),u=k(n.cache_creation_input_tokens),c=(o??0)+(i??0)+(u??0),l=k(n.context_window_tokens)??k(n.contextWindowTokens)??k(n.model_context_window)??k(s.context_window_tokens)??k(s.contextWindowTokens)??k(s.model_context_window)??xe({model:f(s.model),adapterType:"claude-code"}),p=(o??0)+(r??0)+(i??0)+(u??0),h=T(n.server_tool_use),d={};o!==void 0&&(d.inputTokens=o),c>0&&(d.contextInputTokens=c),r!==void 0&&(d.outputTokens=r),i!==void 0&&(d.cacheReadInputTokens=i),u!==void 0&&(d.cacheCreationInputTokens=u),p>0&&(d.totalTokens=p),l>0&&(d.contextWindowTokens=l);const m=k(h?.web_search_requests),g=k(h?.web_fetch_requests);m!==void 0&&(d.webSearchRequests=m),g!==void 0&&(d.webFetchRequests=g);const v=f(s.service_tier,n.service_tier),x=f(s.speed,n.speed);return v&&(d.serviceTier=v),x&&(d.speed=x),Object.keys(d).length>0?d:null}function Ne(e,t){let s=null;const n=ue(e),o=f(n?.model,I(I(n,"collaboration_mode"),"settings")?.model),r=t?.scope??"session";for(const i of e){if(i.source!=="codex"&&i.source!=="claude"||i.source==="codex"&&V(i)!=="token_count"&&!/^tokens?(?: ·|$)/i.test(i.summary.trim()))continue;const u=i.source==="codex"?mt(i,o,r):pt(i);u&&(!s||i.ts>=s.ts)&&(s={ts:i.ts,usage:u})}return s?.usage}function ht(e,t){const s=Le(t),n=ue(t),o=I(n,"collaboration_mode"),r=I(o,"settings"),i=T(n?.sandbox_policy),u=T(n?.permission_profile),c={adapterType:e.source,cwd:f(n?.cwd,s?.cwd,e.cwd)??void 0,externalSessionId:f(s?.id,e.sessionId)??void 0,threadId:f(n?.turn_id)??void 0,threadPath:e.transcriptPath,model:f(n?.model,r?.model)??void 0,effort:Ce(n),gitBranch:K(n)??K(s),cliVersion:f(s?.cli_version),entrypoint:f(s?.thread_source,s?.source),originator:f(s?.originator,s?.source),source:f(s?.source),approvalPolicy:f(n?.approval_policy),sandbox:f(i?.type,n?.sandbox),permissionMode:f(u?.type,n?.permission_mode),userType:f(s?.user_type,n?.user_type),modelProvider:f(s?.model_provider,n?.model_provider),timezone:f(n?.timezone)};for(const l of Object.keys(c))c[l]===void 0&&delete c[l];return c}function gt(e){let t,s,n;for(const o of e){if(o.source!=="claude")continue;const r=T(o.raw);if(!r)continue;const i=f(r.gitBranch);i&&(!s||o.ts>=s.ts)&&(s={ts:o.ts,value:i});const u=f(r.cwd);u&&(!n||o.ts>=n.ts)&&(n={ts:o.ts,value:u});const c=I(r,"message"),l=f(c?.model);l&&(!t||o.ts>=t.ts)&&(t={ts:o.ts,value:l})}return{model:t?.value,gitBranch:s?.value,cwd:n?.value}}function yt(e,t){const s=new Map;for(const n of[...e??[],...t??[]]){const o=n.path?.trim();if(!o||!Ue(o))continue;const r=s.get(o);if(!r){s.set(o,{...n,path:o});continue}r.touches+=n.touches,r.lastT=Math.max(r.lastT,n.lastT),r.state==="read"&&n.state!=="read"&&(r.state=n.state),r.state==="modified"&&n.state==="created"&&(r.state="created")}return[...s.values()].sort((n,o)=>{const r=n.state==="read"?0:1,i=o.state==="read"?0:1;return r!==i?i-r:o.lastT-n.lastT})}function wt(e){let t=-1,s=-1,n=0;for(const o of e){const r=o.summary.trim().toLowerCase(),i=V(o);(r==="task started"||i==="task_started")&&(t=Math.max(t,o.ts),n+=1),(r==="task complete"||i==="task_complete"||i==="turn_aborted")&&(s=Math.max(s,o.ts))}return n===0&&s<0?{phase:"idle"}:{phase:t>s?"started":"complete",index:n||void 0}}function kt(e,t){const s=[...t?.events??[]].reverse().find(n=>n.kind==="ask"&&n.text.trim());if(s)return Q(s.text,160,2);for(const n of[...e].sort((o,r)=>r.ts-o.ts)){if(n.kind==="user"&&n.summary.trim())return Q(n.summary,160,2);const o=$(n);if(V(n)==="user_message"){const r=f(o?.message);if(r)return Q(r,160,2)}}}function St(e){let t;for(const s of e)(!t||(U[s.harness]??0)>(U[t]??0))&&(t=s.harness);return t}function bt(e,t,s){const n=ht(e,t),o=gt(t);return{...n,model:n.model??o.model,gitBranch:n.gitBranch??o.gitBranch,cwd:n.cwd??o.cwd??e.cwd??void 0,externalSessionId:n.externalSessionId??e.sessionId??void 0,sessionStart:s}}function Me(e){if(!e?.trim())return null;try{return T(JSON.parse(e))}catch{return null}}function vt(e){const t=$(e);return f(t?.name,t?.type)}function Pe(e){const t=$(e),s=t?.arguments;if(typeof s=="string")return s;const n=t?.input;if(typeof n=="string")return n;const o=t?.command;if(Array.isArray(o))return o.filter(r=>typeof r=="string").join(" ");if(typeof o=="string")return o}function Tt(e){if(e.source!=="codex")return;const t=vt(e)?.toLowerCase();if(t!=="apply_patch"&&t!=="patch_apply")return;const s=Pe(e),n=Me(s);return f(n?.patch,n?.input,s)}function _t(e){if(!e?.trim())return;let t=0,s=0;const n=[];for(const o of e.split(/\r?\n/))o.startsWith("+")&&!o.startsWith("+++")&&(t+=1),o.startsWith("-")&&!o.startsWith("---")&&(s+=1),n.length<24&&/^(?:\*\*\* |@@|\+\+\+|---|[+-])/.test(o)&&n.push(o);if(!(t===0&&s===0&&n.length===0))return{add:t,del:s,preview:n.join(`
2
- `)}}function At(e){const t=T(e.raw);return t?T(t.tool_input):null}function $e(e,t){if(!Ve(t))return null;if(e.source==="grok"){const o=Xe(e.summary);if(o)return o;const r=Se(At(e));if(r)return r}const s=Pe(e),n=Se(Me(s));return n||null}function It(e,t){const s=Tt(e);if(s)return s;const n=$e(e,t);if(n&&(n.oldText||n.newText))return Qe(n)}function Oe(e,t,s){const n=[...e].sort((o,r)=>o.ts-r.ts);return typeof s=="number"&&s>0?n.filter(o=>o.ts>=t-s):n}function ve(e,t,s){const n=Oe(e,t,s),o=nt(n);return o.length>be?o.slice(-be):o}function xt(e,t,s,n){const o=n?.now??Date.now(),r=Oe(t,o,n?.windowMs),i=ve(r,o,void 0),u=i.length>=ke?i:ve(t,o,void 0).slice(-ke),c=u[0]?.ts??e.mtimeMs,l=u.map(d=>{const m=Ze(d),g=$e(d,m.tool),v=Ye(d,e)??It(d,m.tool),x=g&&(g.oldText||g.newText)?qe(g):_t(v);return{id:d.id,t:Math.max(0,Math.round((d.ts-c)/1e3)),at:d.ts,kind:tt(d),text:et(d,m),tool:m.tool,arg:m.arg,result:m.result,stream:m.stream,diff:x,detail:v,live:s&&d.id===u[u.length-1]?.id}}),p=Re(l),h=Ne(r,{scope:typeof n?.windowMs=="number"&&n.windowMs>0?"turn":"session"});return{events:l,files:p,live:s&&l.length>0,metadata:{session:bt(e,t,c),usage:h}}}function z(e){return e?`${e[0]?.toUpperCase()}${e.slice(1)}`:"Native"}function se(e){return e?e.replace(/\.jsonl$/u,"").slice(0,8):"session"}function Te(e,t,s){const n=e.sessionId?.trim()||null,o=!!e.subagentId,r=o?`${z(e.source)} subagent ${se(e.subagentId)}`:`${z(e.source)} ${se(n)}`;return{id:ne(e),definitionId:`native:${e.source}`,name:r,handle:null,agentClass:"organic",harness:e.source,state:s?"working":"idle",projectRoot:e.cwd,cwd:e.cwd,updatedAt:t,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:e.project,branch:null,role:o?"subagent":null,model:null,harnessSessionId:n,harnessLogPath:e.transcriptPath,conversationId:n??ne(e),homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null,terminalSurface:null}}const Rt=new Set(["tmux","zellij","herdr"]);function Et(e){const t=e?.trim();if(!t)return null;const s=t.split("/").filter(Boolean);return s[s.length-1]??t}function _e(e){const t=e.surfaces.find(s=>we(s.backend));return!t||!we(t.backend)?null:{backend:t.backend,sessionName:t.sessionName,paneId:t.paneId,socketDir:t.socketDir??null}}function Ft(e){const t=e.harness?.trim();return!t||Rt.has(t.toLowerCase())||!e.sourceSessionId?.trim()||e.origin==="discovered"||e.metadata?.registryState==="discovered"?!1:e.surfaces.length>0}function X(e){const t=new Set;for(const s of[e.id,e.sourceSessionId,B(e.sourceSessionId)]){const n=s?.trim();n&&t.add(n)}for(const s of e.surfaces){const n=s.sessionName?.trim();n&&t.add(n)}return[...t]}function le(e){return`native:${e.harness}:terminal:${e.id}`}function Lt(e,t,s){const n=e.harness.trim()||"native",o=e.sourceSessionId.trim()||e.id,r=Et(e.cwd);return{id:le(e),definitionId:`native:${n}`,name:`${z(n)} ${se(o)}`,handle:null,agentClass:"organic",harness:n,state:s?"working":"idle",projectRoot:e.cwd||null,cwd:e.cwd||null,updatedAt:t,createdAt:e.createdAt??null,transport:_e(e)?.backend??null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:r,branch:null,role:null,model:null,harnessSessionId:o,harnessLogPath:null,conversationId:o,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null,terminalSurface:_e(e)}}function Ct(e){const t=e.surfaces[0];return t?`${t.backend}:${t.sessionName}`:null}function Be(e){const t=e.harness?.trim()||"Native";return{events:[{id:`${e.id}:session-ready`,t:0,at:e.startedAt,kind:"system",text:`${z(t)} session ready`,detail:e.detail??e.cwd??e.sessionId??void 0,live:e.current}],files:[],live:e.current,metadata:{session:{adapterType:e.harness??void 0,cwd:e.cwd??void 0,externalSessionId:e.sessionId??void 0,sessionStart:e.startedAt,model:e.model??void 0,source:"session-registry"}}}}function Nt(e,t,s){const n=Ct(e),o=[n?`surface: ${n}`:null,e.cwd].filter(Boolean).join(" · ");return Be({id:le(e),harness:e.harness,sessionId:e.sourceSessionId,cwd:e.cwd,startedAt:s,current:t,detail:o||null})}function je(e){if(!e)return null;const t=e.metadata?.session?.sessionStart;let s=null;for(const n of e.events){if(!de(n))continue;const o=Ge(n,t);o!==null&&(s=s===null?o:Math.max(s,o))}if(typeof t=="number"&&Number.isFinite(t))for(const n of e.files){if(!Number.isFinite(n.lastT)||n.lastT<0)continue;const o=t+n.lastT*1e3;s=s===null?o:Math.max(s,o)}return s}function G(e){return e?.live?e.events.some(t=>t.live===!0&&de(t)):!1}function Ae(e,t,s){const n=je(e);return n===null?!1:t-n<=s}function Mt(e,t,s){if(G(t?.data))return s;const n=je(t?.data),o=e.updatedAt??0;return n!==null?Math.max(n,o):0}function J(e){return G(e)}const Pt=["transcript discovered","waiting for events","no session trace","waiting for a live session"];function $t(e){if(e.kind!=="boot"&&e.kind!=="system")return!1;const t=e.text.trim().toLowerCase(),s=(e.detail??"").trim().toLowerCase();return t.includes("session started")?s.includes("turns: 0")&&s.includes("status: idle"):!1}function de(e){if(e.kind==="tool"||e.kind==="think"||e.kind==="ask"||e.kind==="message"||e.kind==="note")return!0;if(e.kind==="system"||e.kind==="boot"){if($t(e))return!1;const t=e.text.trim().toLowerCase();return!Pt.some(s=>t.includes(s))}return!1}const U={"scout-managed":3,"hudson-managed":2,unattributed:1};function Ot(e,t){const s=e.cwd?.trim();if(!s)return e.harness;const n=t.filter(o=>o.source===e.source&&o.cwd===s);return n.length===0?e.harness:n.reduce((o,r)=>{const i=U[o.harness]??0,u=U[r.harness]??0;return u>i||u===i&&r.pid<o.pid?r:o}).harness}function Z(e,t,s,n,o,r){const i=o?.metadata?.session,u=ue(t),c=Le(t),l=e?Ot(e,n):St(t),p=o?Re(o.events):[],h=yt(o?.files,p),d=Ne(t,{scope:"turn"})??o?.metadata?.usage,m={touchedFiles:h,model:f(i?.model,u?.model,I(I(u,"collaboration_mode"),"settings")?.model,s.model),effort:f(i?.effort,Ce(u)),branch:f(i?.gitBranch,K(u),K(c),s.branch),cwd:f(i?.cwd,c?.cwd,s.cwd,s.projectRoot),originator:f(i?.originator,c?.originator,c?.source),attribution:l,turn:t.length>0?wt(t):o?.live?{phase:"started"}:{phase:"idle"},usage:d,parentSessionId:e?.parentSessionId?.trim()||void 0,parentAgentName:e?.parentSessionId&&r?C(r):void 0,currentTask:kt(t,o)},g=at(t,d,{model:m.model,adapterType:e?.source??s.harness});(g.eligible||g.lastCompactedAt!==null)&&(m.compaction={eligible:g.eligible,reason:g.reason,...g.lastCompactedAt!==null?{lastCompactedAt:g.lastCompactedAt}:{},...g.lastCompactedSummary?{lastCompactedSummary:g.lastCompactedSummary}:{}});for(const v of["model","effort","branch","cwd","originator","attribution","usage","compaction","currentTask"])m[v]===void 0&&delete m[v];return m}function Bt(e){if(Je(e))return!1;if(e.kind==="tool"||e.kind==="tool-result"||e.kind==="assistant"||e.kind==="user")return!0;if(e.kind!=="system")return!1;if(e.source==="grok")return/^turn /u.test(e.summary);if(e.source==="codex"){const t=e.summary.trim().toLowerCase();if(t==="task started"||t==="task complete"||t.startsWith("turn aborted"))return!0;const s=e.raw;if(s&&typeof s=="object"&&!Array.isArray(s)){const n=s.payload;if(n&&typeof n=="object"&&!Array.isArray(n)&&n.type==="reasoning"&&t!=="[reasoning]")return!0}}return!1}function Y(e){return e?.events.some(de)??!1}function B(e){const t=e?.trim();if(!t)return null;const s=t.split("/").pop()??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function fe(e){const t=new Set;for(const s of[e.sessionId,e.transcriptPath,B(e.sessionId),B(e.transcriptPath)]){const n=s?.trim();n&&t.add(n)}return[...t]}function De(e,t){const s=fe(e),n=new Set,o=[];for(const r of s)for(const i of t.get(r)??[])n.has(i.id)||(n.add(i.id),o.push(i));return o}function me(e){const t=new Set,s=e.harnessSessionId?.trim();if(s){t.add(s);const n=B(s);n&&t.add(n);const o=W(s);o&&t.add(o)}for(const n of[e.harnessLogPath,e.conversationId,W(e.harnessLogPath),W(e.conversationId)]){const o=n?.trim();o&&t.add(o)}return[...t]}function Ie(e){return j(e,"scout")?N(e)?2:1:0}function jt(e,t,s){const n=e.get(t);if(!n){e.set(t,s);return}const o=Ie(n),r=Ie(s);if(r>o){e.set(t,s);return}r===o&&s.id.localeCompare(n.id)<0&&e.set(t,s)}function Dt(e,t){for(const s of fe(e)){const n=t.get(s);if(n)return n}}function Wt(e,t){return me(e).some(s=>t.has(s))}function Ht(e,t){return X(e).some(s=>t.has(s))}function pe(e,t,s){const n=s?De(s,t):e?.trim()?t.get(e.trim())??[]:[];let o=0;for(const r of n)Bt(r)&&(o=Math.max(o,r.ts));return o}function Kt(e,t){let s=0;for(const n of X(e))s=Math.max(s,pe(n,t));return s}function zt(e,t){return pe(e.sessionId,t,e)}function Gt(e,t){for(const s of X(e)){const n=t.get(s);if(n)return n}}function Ut(e,t,s){if(!N(e)||q(e))return!1;const n=e.transport?.trim();if(n!=="pi_rpc"&&n!=="pairing_bridge")return!1;const o=e.updatedAt??0;return o>0&&t-o<=s}function qt(e){return e.retiredFromFleet||e.staleLocalRegistration||!j(e,"scout")||!N(e)||q(e)?0:Math.max(e.updatedAt??0,e.createdAt??0)}function Vt(e,t,s){return Be({id:e.id,harness:e.harness,sessionId:e.harnessSessionId,cwd:e.cwd??e.projectRoot,model:e.model,startedAt:s,current:t,detail:[e.transport,e.cwd??e.projectRoot,e.harnessSessionId].filter(Boolean).join(" · ")||null})}function Xt(e,t){return{events:[],files:[],live:!1,metadata:{session:{adapterType:e.harness??void 0,cwd:e.cwd??e.projectRoot??void 0,externalSessionId:e.harnessSessionId??void 0,sessionStart:t,model:e.model??void 0,source:"agent-presence"}}}}function Qt(e,t){const s=new Set(["queued","waking","running","waiting","in_flight"]);return{events:t.map((n,o)=>({id:`broker:${n.kind}:${n.id}`,t:o,at:n.at,kind:n.kind==="flight"?"tool":n.kind==="invocation"?"ask":"message",text:n.summary,...n.kind==="flight"?{tool:"scout flight",arg:n.state??void 0,live:!!(n.state&&s.has(n.state))}:{}})),files:[],live:t.some(n=>!!(n.state&&s.has(n.state))),metadata:{session:{adapterType:e.harness??"scout",cwd:e.cwd??e.projectRoot??void 0,sessionStart:t[0]?.at,source:"broker-native",approvalPolicy:e.runtimePolicy?.approvalPolicy??void 0,sandbox:e.runtimePolicy?.sandbox??void 0}}}}function ee(e,t=Date.now(),s=ie(re),n=0){const{agent:o,observe:r,lastActiveAt:i,source:u}=e;return i<=0||t-i>s?!1:u==="native"?n>0&&t-n<=s?!0:G(r)||Ae(r,t,s):!!(n>0&&t-n<=s||G(r)||Ae(r,t,s))}function oe(e,t){return e.id.localeCompare(t.id)}function Jt(e){return[e.agent.harnessSessionId,e.agent.conversationId,e.observe?.metadata?.session?.externalSessionId].filter(t=>!!t?.trim())}function Zt(e,t){const s=new Map;for(const o of e)for(const r of Jt(o))s.set(r,o);const n=new Map;for(const o of e){const r=o.facts?.parentSessionId?.trim(),i=r?s.get(r):void 0;i&&i.id!==o.id&&n.set(o.id,i)}return[...e].sort((o,r)=>{const i=n.get(o.id),u=n.get(r.id),c=i??o,l=u??r,p=t.slots.get(c.id)??Number.MAX_SAFE_INTEGER,h=t.slots.get(l.id)??Number.MAX_SAFE_INTEGER;if(p!==h)return p-h;if(c.id!==l.id)return oe(c,l);if(o.id===c.id)return-1;if(r.id===l.id)return 1;const d=t.slots.get(o.id)??Number.MAX_SAFE_INTEGER,m=t.slots.get(r.id)??Number.MAX_SAFE_INTEGER;return d!==m?d-m:oe(o,r)})}const Yt=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;function W(e){return e?.match(Yt)?.[0]?.toLowerCase()??null}function bn(){return{slots:new Map,nextSlot:0}}function vn(e,t){const s=[];for(const r of e){const i=r.id;t.slots.has(i)||(t.slots.set(i,t.nextSlot),t.nextSlot+=1,s.push(r.id))}const n=new Set(e.map(r=>r.id));for(const r of[...t.slots.keys()])n.has(r)||t.slots.delete(r);return{lanes:Zt(e,t),newLaneIds:s}}function We(e){return W(e.harnessSessionId)??B(e.harnessSessionId)??e.harnessSessionId?.trim()??null}function C(e){return e.name.trim()||e.id}function He(e,t){return`${e}:${t}`}function O(e,t,s){const n=s.sessionRef??s.kind,o=s.id??He(s.kind,n);t.has(o)||(t.add(o),e.push({...s,id:o}))}function en(e,t){for(const s of e)for(const n of me(s)){const o=t.get(n);if(o&&e.some(r=>r.id===o.id))return o}}function tn(e){if(e.source==="cursor")return`${e.source}:path:${e.transcriptPath}`;const t=e.sessionId?.trim();return t?`${e.source}:${t}`:`${e.source}:path:${e.transcriptPath}`}function nn(e){const t=new Map,s=[];for(const n of e){if(n.source!=="cursor"){s.push(n);continue}const o=n.sessionId?.trim()||n.transcriptPath,r=t.get(o);(!r||n.mtimeMs>r.mtimeMs)&&t.set(o,n)}return[...s,...t.values()]}const sn=new Set(["codex_app_server","claude_stream_json","pairing_bridge","pi_rpc"]);function on(e){return e.retiredFromFleet||e.staleLocalRegistration?!1:ae(e.harnessSessionId,e.terminalSurface)||e.terminalSurface||e.transport?.trim()||e.state==="in_flight"?!0:N(e)}function rn(e){if(e.agentClass==="organic"||(e.brokerActivity?.length??0)>0||e.terminalSurface)return!1;const t=e.transport?.trim();return!t||t==="tmux"||t==="zellij"||!e.harness?.trim()||e.state!=="in_flight"?!1:sn.has(t)}function an(e){const t=[],s=new Set,n=new Map;for(const o of e){const r=tn(o),i=n.get(r)??[];i.push(o),n.set(r,i)}for(const[o,r]of n)r.length<=1||O(t,s,{kind:"duplicate_transcript_session",sessionRef:o,transcriptPaths:r.map(i=>i.transcriptPath),message:`Tail discovery returned ${r.length} transcripts for ${o}.`});return t}function cn(e,t){const s=e.filter(on),n=[],o=new Set,r=new Map;for(const c of s){const l=We(c);if(!l)continue;const p=r.get(l)??[];p.some(h=>h.id===c.id)||p.push(c),r.set(l,p)}const i=s.filter(c=>ae(c.harnessSessionId,c.terminalSurface));i.length>0&&O(n,o,{kind:"harness_session_polluted",sessionRef:"harness-slot",agentIds:i.map(c=>c.id),agentNames:i.map(C),message:`${i.length} agent(s) store a transport ref in harnessSessionId — use terminalSurface for attach and harnessSessionId for provider ids only.`});const u=s.filter(c=>rn(c)&&!N(c));u.length>0&&O(n,o,{kind:"harness_session_unbound",sessionRef:"fleet",agentIds:u.map(c=>c.id),agentNames:u.map(C),message:`${u.length} scout agent(s) have no provider harness session bound (lanes use tail transcripts, not agent.id).`});for(const[c,l]of r){if(l.length<=1)continue;const p=en(l,t);l.filter(d=>d.id!==p?.id).length!==0&&O(n,o,{kind:"session_binding_conflict",sessionRef:c,agentIds:l.map(d=>d.id),agentNames:l.map(C),selectedAgentId:p?.id,message:p?`Multiple scout agents claim ${c}; showing ${C(p)}.`:`Multiple scout agents claim ${c} but none could be selected.`})}return n}function Tn(e){if(!e?.issues?.length)return[];const t=new Set,s=[];for(const n of e.issues)n.sessionKey.startsWith("cursor:")||t.has(n.sessionKey)||(t.add(n.sessionKey),s.push({id:He("transcript_path_collision",n.sessionKey),kind:"transcript_path_collision",sessionRef:n.sessionKey,transcriptPaths:n.transcriptPaths,message:n.message}));return s}function _n(e){const{transcripts:t,tailEvents:s,processes:n=[],scoutAgents:o=e.agents??[],terminalSessions:r=[],observeCache:i={},now:u,workingOnly:c=!0,horizon:l=re}=e,p=nn(t),h=ie(l),d=[],m=new Map;for(const a of s){const S=m.get(a.sessionId)??[];S.push(a),m.set(a.sessionId,S)}const g=new Map;for(const a of o)for(const S of me(a))jt(g,S,a);const v=new Set,x=new Set,M=[...an(p),...cn(o,g)],D=new Set(M.map(a=>a.id));for(const a of p){a.sessionId?.trim();const S=De(a,m),y=zt(a,m),b=y>0&&u-y<=h;if(!b)continue;const w=Dt(a,g),E=a.parentSessionId?g.get(a.parentSessionId):void 0;w&&x.add(w.id);const _=xt(a,S,b,{now:u,windowMs:h}),F=S.length>0,L=Z(a,S,w??Te(a,y,b),n,_,E),R=y,P=w?{id:w.id,agent:{...w,updatedAt:y},source:"scout",observe:_,facts:L,lastActiveAt:y,current:b}:{id:ne(a),agent:Te(a,y,b),source:"native",observe:_,facts:L,lastActiveAt:y,current:b};if(!(c&&!ee(P,u,h,R))&&!(F&&!Y(_)&&!J(_))){for(const A of fe(a))v.add(A);d.push(P)}}for(const a of r){if(!Ft(a)||Ht(a,v))continue;const S=Kt(a,m),y=Math.max(S,a.updatedAt??0,a.createdAt??0),b=y>0&&u-y<=h;if(!b)continue;const w=Gt(a,g);w&&x.add(w.id);const E=Lt(a,y,b),_=w?{...w,harnessSessionId:w.harnessSessionId??a.sourceSessionId,terminalSurface:w.terminalSurface??E.terminalSurface,updatedAt:Math.max(w.updatedAt??0,y)}:E,F=Nt(a,b,y),L={id:w?w.id:le(a),agent:_,source:w?"scout":"native",observe:F,facts:Z(null,[],_,n,F),lastActiveAt:y,current:b};if(!(c&&!ee(L,u,h,S||y))){for(const R of X(a))v.add(R);d.push(L)}}for(const a of o){const S=lt(a,u,h);if(q(a)&&S.length===0||!j(a,"scout"))continue;const y=N(a);if(!y&&S.length===0)continue;if(y&&Wt(a,v)){if(!x.has(a.id)){const ye=We(a)??a.id;O(M,D,{kind:"shadowed_scout_card",sessionRef:ye,agentIds:[a.id],agentNames:[C(a)],message:`${C(a)} is active but hidden because another lane already represents ${ye}.`})}continue}const b=i[a.id],w=y?pe(a.harnessSessionId,m):0,E=S.at(-1)?.at??0,_=qt(a),F=Ut(a,u,h),L=F?a.updatedAt??0:0,R=Math.max(Mt(a,b,u),w,L,_,E),P=R>0&&u-R<=h;let A=ze(b?.data??null,u,h);!A&&S.length>0&&(A=Qt(a,S)),F&&P&&!Y(A)&&!J(A)?A=Vt(a,P,R):!A&&_>0&&(A=Xt(a,R));const he={id:a.id,agent:a,source:"scout",observe:A,facts:Z(null,[],a,n,A),lastActiveAt:R,current:P},ge=_>0&&u-_<=h||E>0;c&&!ge&&!ee(he,u,h,w)||!ge&&!Y(A)&&!J(A)||d.push(he)}return{lanes:d.sort(oe),issues:M}}export{te as A,re as D,Sn as a,q as b,on as c,kn as d,wn as e,je as f,_n as g,yn as h,J as i,ie as j,gn as k,dt as l,bn as m,vn as n,xt as o,Tn as r,hn as s};
1
+ import{d as Ke,i as xe}from"./context-budget-DX_fwUs3.js";import{i as we}from"./terminal-sessions-BQ6t92tJ.js";import{c as ze,d as Re,o as Ge,i as Ue,l as Q,L as ke}from"./lane-observe-vfyACHi0.js";import{a as qe,i as Ve,b as Xe,c as Se,d as Qe}from"./lane-edit-display-C_Aujldz.js";import{i as Je,b as Ze,t as Ye,e as et,f as tt,g as nt}from"./tail-display-DcliDVkW.js";function H(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Ee(e,t){return H(H(e)?.[t])}function st(e){const s=H(e.raw)?.type;return typeof s=="string"?s:void 0}function ot(e){const s=Ee(e.raw,"payload")?.type;return typeof s=="string"?s:void 0}const rt=/context\s+compacted|compacted\s+·/iu;function it(e){const t=e.summary.trim();return t&&(e.source==="codex"&&(Ee(H(e.raw),"payload"),ot(e)==="context_compacted"||st(e)==="compacted")||rt.test(t))?t:null}function at(e,t,s){let n=null,o=null;for(const c of e){const l=it(c);l&&(n===null||c.ts>=n)&&(n=c.ts,o=l)}const r=Ke(t,s);let i=null;return r?.overLimit?i="over_limit":r&&r.pct>=80?i="high_context":n!==null&&(i="post_compaction_point"),{eligible:!!(r&&(r.overLimit||r.pct>=75||n!==null)),reason:i,lastCompactedAt:n,lastCompactedSummary:o}}function hn(e){const t=e?.trim().toLowerCase()??"";return t==="codex"||t==="claude"||t==="claude-code"}const re="5m",te=[{key:"5m",label:"5m",windowMs:5*6e4},{key:"30m",label:"30m",windowMs:30*6e4},{key:"4h",label:"4h",windowMs:240*6e4},{key:"24h",label:"24h",windowMs:1440*6e4}];function ie(e){return te.find(t=>t.key===e)?.windowMs??te[0].windowMs}function gn(e){return te.find(t=>t.key===e)?.label??e}function yn(e){return 1e3}const be=400;function ct(e){return e?`${e[0]?.toUpperCase()}${e.slice(1).toLowerCase()}`:""}function ut(e){const t=e.name.trim();if(!t||e.agentClass==="organic")return!0;const s=e.harness?.trim();if(!s)return!1;const n=ct(s);return new RegExp(`^${n}\\s+[0-9a-f]{6}`,"i").test(t)}function ae(e,t=null){const s=e?.trim();if(!s)return!1;if(/^relay[-:]/i.test(s))return!0;const n=t?.sessionName?.trim();return!!(n&&s===n)}function N(e){const t=e.harnessSessionId?.trim();return t?!ae(t,e.terminalSurface):!1}function q(e){return e.transport==="codex_app_server"&&e.state==="available"}function lt(e,t,s){return(e.brokerActivity??[]).filter(n=>n.at>0&&t-n.at<=s)}function wn(e,t=Date.now(),s=re){if(q(e))return!1;if(e.harnessSessionId?.trim()||e.state&&/^(working|active|running|in_turn|in_flight|queued|waking|dispatching)$/i.test(e.state.trim()))return!0;const n=ie(s);return e.updatedAt?t-e.updatedAt<=n:!1}function j(e,t){return t==="scout"&&e.agentClass!=="organic"&&!ut(e)&&(N(e)||(e.brokerActivity?.length??0)>0)}function dt(e,t){return e.role==="subagent"?e.name.trim()||"Subagent":j(e,t)?e.name.trim()||"Agent":e.project?.trim()||e.harness?.trim()||"local"}function kn(e,t){return e.harness?.trim()||dt(e,t)}function Sn(e,t){if(j(e,t))return[e.project,e.branch].filter(Boolean).join(" · ")||e.harness||"local";const s=e.harness?.trim(),n=e.harnessSessionId?.trim();return s&&n?`${s} · ${n.replace(/\.jsonl$/u,"").slice(0,8)}`:s||n?.slice(0,8)||"native"}function ft(e){let t=2166136261;for(let s=0;s<e.length;s+=1)t^=e.charCodeAt(s),t=Math.imul(t,16777619);return(t>>>0).toString(36)}function ne(e){const t=e.sessionId?.trim();return t?`native:${e.source}:${t}`:`native:${e.source}:path:${ft(e.transcriptPath)}`}function _(e){return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function $(e){const t=_(e.raw);return _(t?.payload)}function ce(e){const s=_(e.raw)?.type;return typeof s=="string"?s:null}function V(e){const s=$(e)?.type;return typeof s=="string"?s:null}function f(...e){for(const t of e){if(typeof t!="string")continue;const s=t.trim();if(s)return s}}function k(e){return typeof e=="number"&&Number.isFinite(e)?e:void 0}function I(e,t){return _(e?.[t])}function Fe(e,t){let s=null;for(const n of e){if(ce(n)!==t)continue;const o=$(n);o&&(!s||n.ts>=s.event.ts)&&(s={event:n,payload:o})}return s?.payload??null}function ue(e){return Fe(e,"turn_context")}function Le(e){return Fe(e,"session_meta")}function Ce(e){const t=I(e,"collaboration_mode"),s=I(t,"settings");return f(e?.effort,s?.reasoning_effort)}function K(e){return f(e?.gitBranch,e?.git_branch,e?.currentBranch,e?.current_branch,e?.branch)}function mt(e,t,s="session"){if(e.source!=="codex")return null;if(ce(e)!=="event_msg"||V(e)!=="token_count"){const b=e.summary.match(/^tokens? · ([0-9,]+)/i)?.[1]?.replace(/,/g,""),w=b?Number.parseInt(b,10):NaN;return Number.isFinite(w)?{totalTokens:w}:null}const n=$(e),o=I(n,"info"),r=I(o,"total_token_usage"),i=I(o,"last_token_usage"),u=I(n,"rate_limits");if(!r&&!o&&!u)return null;const c=s==="turn"?i??r:r??i,l={},p=k(c?.input_tokens),d=k(i?.input_tokens),m=k(c?.output_tokens),g=k(c?.reasoning_output_tokens),v=k(c?.cached_input_tokens)??k(c?.cache_read_input_tokens),x=k(c?.cache_creation_input_tokens)??k(c?.cache_write_input_tokens),M=k(c?.total_tokens)??(p!==void 0||m!==void 0?(p??0)+(m??0):void 0),D=k(o?.model_context_window)??xe({model:t,adapterType:"codex"}),a=f(n?.service_tier,u?.service_tier),S=f(n?.speed,u?.speed),y=f(n?.plan_type,u?.plan_type);return p!==void 0&&(l.inputTokens=p),d!==void 0&&(l.contextInputTokens=d),m!==void 0&&(l.outputTokens=m),g!==void 0&&(l.reasoningOutputTokens=g),v!==void 0&&(l.cacheReadInputTokens=v),x!==void 0&&(l.cacheCreationInputTokens=x),M!==void 0&&(l.totalTokens=M),D!==void 0&&(l.contextWindowTokens=D),a&&(l.serviceTier=a),S&&(l.speed=S),y&&(l.planType=y),Object.keys(l).length>0?l:null}function pt(e){if(e.source!=="claude"||ce(e)!=="assistant")return null;const t=_(e.raw),s=_(t?.message),n=_(s?.usage);if(!s||!n)return null;const o=k(n.input_tokens),r=k(n.output_tokens),i=k(n.cache_read_input_tokens),u=k(n.cache_creation_input_tokens),c=(o??0)+(i??0)+(u??0),l=k(n.context_window_tokens)??k(n.contextWindowTokens)??k(n.model_context_window)??k(s.context_window_tokens)??k(s.contextWindowTokens)??k(s.model_context_window)??xe({model:f(s.model),adapterType:"claude-code"}),p=(o??0)+(r??0)+(i??0)+(u??0),h=_(n.server_tool_use),d={};o!==void 0&&(d.inputTokens=o),c>0&&(d.contextInputTokens=c),r!==void 0&&(d.outputTokens=r),i!==void 0&&(d.cacheReadInputTokens=i),u!==void 0&&(d.cacheCreationInputTokens=u),p>0&&(d.totalTokens=p),l>0&&(d.contextWindowTokens=l);const m=k(h?.web_search_requests),g=k(h?.web_fetch_requests);m!==void 0&&(d.webSearchRequests=m),g!==void 0&&(d.webFetchRequests=g);const v=f(s.service_tier,n.service_tier),x=f(s.speed,n.speed);return v&&(d.serviceTier=v),x&&(d.speed=x),Object.keys(d).length>0?d:null}function Ne(e,t){let s=null;const n=ue(e),o=f(n?.model,I(I(n,"collaboration_mode"),"settings")?.model),r=t?.scope??"session";for(const i of e){if(i.source!=="codex"&&i.source!=="claude"||i.source==="codex"&&V(i)!=="token_count"&&!/^tokens?(?: ·|$)/i.test(i.summary.trim()))continue;const u=i.source==="codex"?mt(i,o,r):pt(i);u&&(!s||i.ts>=s.ts)&&(s={ts:i.ts,usage:u})}return s?.usage}function ht(e,t){const s=Le(t),n=ue(t),o=I(n,"collaboration_mode"),r=I(o,"settings"),i=_(n?.sandbox_policy),u=_(n?.permission_profile),c={adapterType:e.source,cwd:f(n?.cwd,s?.cwd,e.cwd)??void 0,externalSessionId:f(s?.id,e.sessionId)??void 0,threadId:f(n?.turn_id)??void 0,threadPath:e.transcriptPath,model:f(n?.model,r?.model)??void 0,effort:Ce(n),gitBranch:K(n)??K(s),cliVersion:f(s?.cli_version),entrypoint:f(s?.thread_source,s?.source),originator:f(s?.originator,s?.source),source:f(s?.source),approvalPolicy:f(n?.approval_policy),sandbox:f(i?.type,n?.sandbox),permissionMode:f(u?.type,n?.permission_mode),userType:f(s?.user_type,n?.user_type),modelProvider:f(s?.model_provider,n?.model_provider),timezone:f(n?.timezone)};for(const l of Object.keys(c))c[l]===void 0&&delete c[l];return c}function gt(e){let t,s,n;for(const o of e){if(o.source!=="claude")continue;const r=_(o.raw);if(!r)continue;const i=f(r.gitBranch);i&&(!s||o.ts>=s.ts)&&(s={ts:o.ts,value:i});const u=f(r.cwd);u&&(!n||o.ts>=n.ts)&&(n={ts:o.ts,value:u});const c=I(r,"message"),l=f(c?.model);l&&(!t||o.ts>=t.ts)&&(t={ts:o.ts,value:l})}return{model:t?.value,gitBranch:s?.value,cwd:n?.value}}function yt(e,t){const s=new Map;for(const n of[...e??[],...t??[]]){const o=n.path?.trim();if(!o||!Ue(o))continue;const r=s.get(o);if(!r){s.set(o,{...n,path:o});continue}r.touches+=n.touches,r.lastT=Math.max(r.lastT,n.lastT),r.state==="read"&&n.state!=="read"&&(r.state=n.state),r.state==="modified"&&n.state==="created"&&(r.state="created")}return[...s.values()].sort((n,o)=>{const r=n.state==="read"?0:1,i=o.state==="read"?0:1;return r!==i?i-r:o.lastT-n.lastT})}function wt(e){let t=-1,s=-1,n=0;for(const o of e){const r=o.summary.trim().toLowerCase(),i=V(o);(r==="task started"||i==="task_started")&&(t=Math.max(t,o.ts),n+=1),(r==="task complete"||i==="task_complete"||i==="turn_aborted")&&(s=Math.max(s,o.ts))}return n===0&&s<0?{phase:"idle"}:{phase:t>s?"started":"complete",index:n||void 0}}function kt(e,t){const s=[...t?.events??[]].reverse().find(n=>n.kind==="ask"&&n.text.trim());if(s)return Q(s.text,160,2);for(const n of[...e].sort((o,r)=>r.ts-o.ts)){if(n.kind==="user"&&n.summary.trim())return Q(n.summary,160,2);const o=$(n);if(V(n)==="user_message"){const r=f(o?.message);if(r)return Q(r,160,2)}}}function St(e){let t;for(const s of e)(!t||(U[s.harness]??0)>(U[t]??0))&&(t=s.harness);return t}function bt(e,t,s){const n=ht(e,t),o=gt(t);return{...n,model:n.model??o.model,gitBranch:n.gitBranch??o.gitBranch,cwd:n.cwd??o.cwd??e.cwd??void 0,externalSessionId:n.externalSessionId??e.sessionId??void 0,sessionStart:s}}function Me(e){if(!e?.trim())return null;try{return _(JSON.parse(e))}catch{return null}}function vt(e){const t=$(e);return f(t?.name,t?.type)}function Pe(e){const t=$(e),s=t?.arguments;if(typeof s=="string")return s;const n=t?.input;if(typeof n=="string")return n;const o=t?.command;if(Array.isArray(o))return o.filter(r=>typeof r=="string").join(" ");if(typeof o=="string")return o}function _t(e){if(e.source!=="codex")return;const t=vt(e)?.toLowerCase();if(t!=="apply_patch"&&t!=="patch_apply")return;const s=Pe(e),n=Me(s);return f(n?.patch,n?.input,s)}function Tt(e){if(!e?.trim())return;let t=0,s=0;const n=[];for(const o of e.split(/\r?\n/))o.startsWith("+")&&!o.startsWith("+++")&&(t+=1),o.startsWith("-")&&!o.startsWith("---")&&(s+=1),n.length<24&&/^(?:\*\*\* |@@|\+\+\+|---|[+-])/.test(o)&&n.push(o);if(!(t===0&&s===0&&n.length===0))return{add:t,del:s,preview:n.join(`
2
+ `)}}function At(e){const t=_(e.raw);return t?_(t.tool_input):null}function $e(e,t){if(!Ve(t))return null;if(e.source==="grok"){const o=Xe(e.summary);if(o)return o;const r=Se(At(e));if(r)return r}const s=Pe(e),n=Se(Me(s));return n||null}function It(e,t){const s=_t(e);if(s)return s;const n=$e(e,t);if(n&&(n.oldText||n.newText))return Qe(n)}function Oe(e,t,s){const n=[...e].sort((o,r)=>o.ts-r.ts);return typeof s=="number"&&s>0?n.filter(o=>o.ts>=t-s):n}function ve(e,t,s){const n=Oe(e,t,s),o=nt(n);return o.length>be?o.slice(-be):o}function xt(e,t,s,n){const o=n?.now??Date.now(),r=Oe(t,o,n?.windowMs),i=ve(r,o,void 0),u=i.length>=ke?i:ve(t,o,void 0).slice(-ke),c=u[0]?.ts??e.mtimeMs,l=u.map(d=>{const m=Ze(d),g=$e(d,m.tool),v=Ye(d,e)??It(d,m.tool),x=g&&(g.oldText||g.newText)?qe(g):Tt(v);return{id:d.id,t:Math.max(0,Math.round((d.ts-c)/1e3)),at:d.ts,kind:tt(d),text:et(d,m),tool:m.tool,arg:m.arg,result:m.result,stream:m.stream,diff:x,detail:v,live:s&&d.id===u[u.length-1]?.id}}),p=Re(l),h=Ne(r,{scope:typeof n?.windowMs=="number"&&n.windowMs>0?"turn":"session"});return{events:l,files:p,live:s&&l.length>0,metadata:{session:bt(e,t,c),usage:h}}}function z(e){return e?`${e[0]?.toUpperCase()}${e.slice(1)}`:"Native"}function se(e){return e?e.replace(/\.jsonl$/u,"").slice(0,8):"session"}function _e(e,t,s){const n=e.sessionId?.trim()||null,o=!!e.subagentId,r=o?`${z(e.source)} subagent ${se(e.subagentId)}`:`${z(e.source)} ${se(n)}`;return{id:ne(e),definitionId:`native:${e.source}`,name:r,handle:null,agentClass:"organic",harness:e.source,state:s?"working":"idle",projectRoot:e.cwd,cwd:e.cwd,updatedAt:t,createdAt:null,transport:null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:e.project,branch:null,role:o?"subagent":null,model:null,harnessSessionId:n,harnessLogPath:e.transcriptPath,conversationId:n??ne(e),homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null,terminalSurface:null}}const Rt=new Set(["tmux","zellij","herdr"]);function Et(e){const t=e?.trim();if(!t)return null;const s=t.split("/").filter(Boolean);return s[s.length-1]??t}function Te(e){const t=e.surfaces.find(s=>we(s.backend));return!t||!we(t.backend)?null:{backend:t.backend,sessionName:t.sessionName,paneId:t.paneId,socketDir:t.socketDir??null}}function Ft(e){const t=e.harness?.trim();return!t||Rt.has(t.toLowerCase())||!e.sourceSessionId?.trim()||e.origin==="discovered"||e.metadata?.registryState==="discovered"?!1:e.surfaces.length>0}function X(e){const t=new Set;for(const s of[e.id,e.sourceSessionId,B(e.sourceSessionId)]){const n=s?.trim();n&&t.add(n)}for(const s of e.surfaces){const n=s.sessionName?.trim();n&&t.add(n)}return[...t]}function le(e){return`native:${e.harness}:terminal:${e.id}`}function Lt(e,t,s){const n=e.harness.trim()||"native",o=e.sourceSessionId.trim()||e.id,r=Et(e.cwd);return{id:le(e),definitionId:`native:${n}`,name:`${z(n)} ${se(o)}`,handle:null,agentClass:"organic",harness:n,state:s?"working":"idle",projectRoot:e.cwd||null,cwd:e.cwd||null,updatedAt:t,createdAt:e.createdAt??null,transport:Te(e)?.backend??null,selector:null,defaultSelector:null,nodeQualifier:null,workspaceQualifier:null,wakePolicy:null,capabilities:[],project:r,branch:null,role:null,model:null,harnessSessionId:o,harnessLogPath:null,conversationId:o,homeNodeId:null,homeNodeName:null,ownerId:null,ownerName:null,ownerHandle:null,staleLocalRegistration:!1,retiredFromFleet:!1,replacedByAgentId:null,terminalSurface:Te(e)}}function Ct(e){const t=e.surfaces[0];return t?`${t.backend}:${t.sessionName}`:null}function Be(e){const t=e.harness?.trim()||"Native";return{events:[{id:`${e.id}:session-ready`,t:0,at:e.startedAt,kind:"system",text:`${z(t)} session ready`,detail:e.detail??e.cwd??e.sessionId??void 0,live:e.current}],files:[],live:e.current,metadata:{session:{adapterType:e.harness??void 0,cwd:e.cwd??void 0,externalSessionId:e.sessionId??void 0,sessionStart:e.startedAt,model:e.model??void 0,source:"session-registry"}}}}function Nt(e,t,s){const n=Ct(e),o=[n?`surface: ${n}`:null,e.cwd].filter(Boolean).join(" · ");return Be({id:le(e),harness:e.harness,sessionId:e.sourceSessionId,cwd:e.cwd,startedAt:s,current:t,detail:o||null})}function je(e){if(!e)return null;const t=e.metadata?.session?.sessionStart;let s=null;for(const n of e.events){if(!de(n))continue;const o=Ge(n,t);o!==null&&(s=s===null?o:Math.max(s,o))}if(typeof t=="number"&&Number.isFinite(t))for(const n of e.files){if(!Number.isFinite(n.lastT)||n.lastT<0)continue;const o=t+n.lastT*1e3;s=s===null?o:Math.max(s,o)}return s}function G(e){return e?.live?e.events.some(t=>t.live===!0&&de(t)):!1}function Ae(e,t,s){const n=je(e);return n===null?!1:t-n<=s}function Mt(e,t,s){if(G(t?.data))return s;const n=je(t?.data),o=e.updatedAt??0;return n!==null?Math.max(n,o):0}function J(e){return G(e)}const Pt=["transcript discovered","waiting for events","no session trace","waiting for a live session"];function $t(e){if(e.kind!=="boot"&&e.kind!=="system")return!1;const t=e.text.trim().toLowerCase(),s=(e.detail??"").trim().toLowerCase();return t.includes("session started")?s.includes("turns: 0")&&s.includes("status: idle"):!1}function de(e){if(e.kind==="tool"||e.kind==="think"||e.kind==="ask"||e.kind==="message"||e.kind==="note")return!0;if(e.kind==="system"||e.kind==="boot"){if($t(e))return!1;const t=e.text.trim().toLowerCase();return!Pt.some(s=>t.includes(s))}return!1}const U={"scout-managed":3,"hudson-managed":2,unattributed:1};function Ot(e,t){const s=e.cwd?.trim();if(!s)return e.harness;const n=t.filter(o=>o.source===e.source&&o.cwd===s);return n.length===0?e.harness:n.reduce((o,r)=>{const i=U[o.harness]??0,u=U[r.harness]??0;return u>i||u===i&&r.pid<o.pid?r:o}).harness}function Z(e,t,s,n,o,r){const i=o?.metadata?.session,u=ue(t),c=Le(t),l=e?Ot(e,n):St(t),p=o?Re(o.events):[],h=yt(o?.files,p),d=Ne(t,{scope:"turn"})??o?.metadata?.usage,m={touchedFiles:h,model:f(i?.model,u?.model,I(I(u,"collaboration_mode"),"settings")?.model,s.model),effort:f(i?.effort,Ce(u)),branch:f(i?.gitBranch,K(u),K(c),s.branch),cwd:f(i?.cwd,c?.cwd,s.cwd,s.projectRoot),originator:f(i?.originator,c?.originator,c?.source),attribution:l,turn:t.length>0?wt(t):o?.live?{phase:"started"}:{phase:"idle"},usage:d,parentSessionId:e?.parentSessionId?.trim()||void 0,parentAgentName:e?.parentSessionId&&r?C(r):void 0,currentTask:kt(t,o)},g=at(t,d,{model:m.model,adapterType:e?.source??s.harness});(g.eligible||g.lastCompactedAt!==null)&&(m.compaction={eligible:g.eligible,reason:g.reason,...g.lastCompactedAt!==null?{lastCompactedAt:g.lastCompactedAt}:{},...g.lastCompactedSummary?{lastCompactedSummary:g.lastCompactedSummary}:{}});for(const v of["model","effort","branch","cwd","originator","attribution","usage","compaction","currentTask"])m[v]===void 0&&delete m[v];return m}function Bt(e){if(Je(e))return!1;if(e.kind==="tool"||e.kind==="tool-result"||e.kind==="assistant"||e.kind==="user")return!0;if(e.kind!=="system")return!1;if(e.source==="grok")return/^turn /u.test(e.summary);if(e.source==="codex"){const t=e.summary.trim().toLowerCase();if(t==="task started"||t==="task complete"||t.startsWith("turn aborted"))return!0;const s=e.raw;if(s&&typeof s=="object"&&!Array.isArray(s)){const n=s.payload;if(n&&typeof n=="object"&&!Array.isArray(n)&&n.type==="reasoning"&&t!=="[reasoning]")return!0}}return!1}function Y(e){return e?.events.some(de)??!1}function B(e){const t=e?.trim();if(!t)return null;const s=t.split("/").pop()??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function fe(e){const t=new Set;for(const s of[e.sessionId,e.transcriptPath,B(e.sessionId),B(e.transcriptPath)]){const n=s?.trim();n&&t.add(n)}return[...t]}function De(e,t){const s=fe(e),n=new Set,o=[];for(const r of s)for(const i of t.get(r)??[])n.has(i.id)||(n.add(i.id),o.push(i));return o}function me(e){const t=new Set,s=e.harnessSessionId?.trim();if(s){t.add(s);const n=B(s);n&&t.add(n);const o=W(s);o&&t.add(o)}for(const n of[e.harnessLogPath,e.conversationId,W(e.harnessLogPath),W(e.conversationId)]){const o=n?.trim();o&&t.add(o)}return[...t]}function Ie(e){return j(e,"scout")?N(e)?2:1:0}function jt(e,t,s){const n=e.get(t);if(!n){e.set(t,s);return}const o=Ie(n),r=Ie(s);if(r>o){e.set(t,s);return}r===o&&s.id.localeCompare(n.id)<0&&e.set(t,s)}function Dt(e,t){for(const s of fe(e)){const n=t.get(s);if(n)return n}}function Wt(e,t){return me(e).some(s=>t.has(s))}function Ht(e,t){return X(e).some(s=>t.has(s))}function pe(e,t,s){const n=s?De(s,t):e?.trim()?t.get(e.trim())??[]:[];let o=0;for(const r of n)Bt(r)&&(o=Math.max(o,r.ts));return o}function Kt(e,t){let s=0;for(const n of X(e))s=Math.max(s,pe(n,t));return s}function zt(e,t){return pe(e.sessionId,t,e)}function Gt(e,t){for(const s of X(e)){const n=t.get(s);if(n)return n}}function Ut(e,t,s){if(!N(e)||q(e))return!1;const n=e.transport?.trim();if(n!=="pi_rpc"&&n!=="pairing_bridge")return!1;const o=e.updatedAt??0;return o>0&&t-o<=s}function qt(e){return e.retiredFromFleet||e.staleLocalRegistration||!j(e,"scout")||!N(e)||q(e)?0:Math.max(e.updatedAt??0,e.createdAt??0)}function Vt(e,t,s){return Be({id:e.id,harness:e.harness,sessionId:e.harnessSessionId,cwd:e.cwd??e.projectRoot,model:e.model,startedAt:s,current:t,detail:[e.transport,e.cwd??e.projectRoot,e.harnessSessionId].filter(Boolean).join(" · ")||null})}function Xt(e,t){return{events:[],files:[],live:!1,metadata:{session:{adapterType:e.harness??void 0,cwd:e.cwd??e.projectRoot??void 0,externalSessionId:e.harnessSessionId??void 0,sessionStart:t,model:e.model??void 0,source:"agent-presence"}}}}function Qt(e,t){const s=new Set(["queued","waking","running","waiting","in_flight"]);return{events:t.map((n,o)=>({id:`broker:${n.kind}:${n.id}`,t:o,at:n.at,kind:n.kind==="flight"?"tool":n.kind==="invocation"?"ask":"message",text:n.summary,...n.kind==="flight"?{tool:"scout flight",arg:n.state??void 0,live:!!(n.state&&s.has(n.state))}:{}})),files:[],live:t.some(n=>!!(n.state&&s.has(n.state))),metadata:{session:{adapterType:e.harness??"scout",cwd:e.cwd??e.projectRoot??void 0,sessionStart:t[0]?.at,source:"broker-native",approvalPolicy:e.runtimePolicy?.approvalPolicy??void 0,sandbox:e.runtimePolicy?.sandbox??void 0}}}}function ee(e,t=Date.now(),s=ie(re),n=0){const{agent:o,observe:r,lastActiveAt:i,source:u}=e;return i<=0||t-i>s?!1:u==="native"?n>0&&t-n<=s?!0:G(r)||Ae(r,t,s):!!(n>0&&t-n<=s||G(r)||Ae(r,t,s))}function oe(e,t){return e.id.localeCompare(t.id)}function Jt(e){return[e.agent.harnessSessionId,e.agent.conversationId,e.observe?.metadata?.session?.externalSessionId].filter(t=>!!t?.trim())}function Zt(e,t){const s=new Map;for(const o of e)for(const r of Jt(o))s.set(r,o);const n=new Map;for(const o of e){const r=o.facts?.parentSessionId?.trim(),i=r?s.get(r):void 0;i&&i.id!==o.id&&n.set(o.id,i)}return[...e].sort((o,r)=>{const i=n.get(o.id),u=n.get(r.id),c=i??o,l=u??r,p=t.slots.get(c.id)??Number.MAX_SAFE_INTEGER,h=t.slots.get(l.id)??Number.MAX_SAFE_INTEGER;if(p!==h)return p-h;if(c.id!==l.id)return oe(c,l);if(o.id===c.id)return-1;if(r.id===l.id)return 1;const d=t.slots.get(o.id)??Number.MAX_SAFE_INTEGER,m=t.slots.get(r.id)??Number.MAX_SAFE_INTEGER;return d!==m?d-m:oe(o,r)})}const Yt=/[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}/i;function W(e){return e?.match(Yt)?.[0]?.toLowerCase()??null}function bn(){return{slots:new Map,nextSlot:0}}function vn(e,t){const s=[];for(const r of e){const i=r.id;t.slots.has(i)||(t.slots.set(i,t.nextSlot),t.nextSlot+=1,s.push(r.id))}const n=new Set(e.map(r=>r.id));for(const r of[...t.slots.keys()])n.has(r)||t.slots.delete(r);return{lanes:Zt(e,t),newLaneIds:s}}function We(e){return W(e.harnessSessionId)??B(e.harnessSessionId)??e.harnessSessionId?.trim()??null}function C(e){return e.name.trim()||e.id}function He(e,t){return`${e}:${t}`}function O(e,t,s){const n=s.sessionRef??s.kind,o=s.id??He(s.kind,n);t.has(o)||(t.add(o),e.push({...s,id:o}))}function en(e,t){for(const s of e)for(const n of me(s)){const o=t.get(n);if(o&&e.some(r=>r.id===o.id))return o}}function tn(e){if(e.source==="cursor")return`${e.source}:path:${e.transcriptPath}`;const t=e.sessionId?.trim();return t?`${e.source}:${t}`:`${e.source}:path:${e.transcriptPath}`}function nn(e){const t=new Map,s=[];for(const n of e){if(n.source!=="cursor"){s.push(n);continue}const o=n.sessionId?.trim()||n.transcriptPath,r=t.get(o);(!r||n.mtimeMs>r.mtimeMs)&&t.set(o,n)}return[...s,...t.values()]}const sn=new Set(["codex_app_server","claude_stream_json","pairing_bridge","pi_rpc"]);function on(e){return e.retiredFromFleet||e.staleLocalRegistration?!1:ae(e.harnessSessionId,e.terminalSurface)||e.terminalSurface||e.transport?.trim()||e.state==="in_flight"?!0:N(e)}function rn(e){if(e.agentClass==="organic"||(e.brokerActivity?.length??0)>0||e.terminalSurface)return!1;const t=e.transport?.trim();return!t||t==="tmux"||t==="zellij"||!e.harness?.trim()||e.state!=="in_flight"?!1:sn.has(t)}function an(e){const t=[],s=new Set,n=new Map;for(const o of e){const r=tn(o),i=n.get(r)??[];i.push(o),n.set(r,i)}for(const[o,r]of n)r.length<=1||O(t,s,{kind:"duplicate_transcript_session",sessionRef:o,transcriptPaths:r.map(i=>i.transcriptPath),message:`Tail discovery returned ${r.length} transcripts for ${o}.`});return t}function cn(e,t){const s=e.filter(on),n=[],o=new Set,r=new Map;for(const c of s){const l=We(c);if(!l)continue;const p=r.get(l)??[];p.some(h=>h.id===c.id)||p.push(c),r.set(l,p)}const i=s.filter(c=>ae(c.harnessSessionId,c.terminalSurface));i.length>0&&O(n,o,{kind:"harness_session_polluted",sessionRef:"harness-slot",agentIds:i.map(c=>c.id),agentNames:i.map(C),message:`${i.length} agent(s) store a transport ref in harnessSessionId — use terminalSurface for attach and harnessSessionId for provider ids only.`});const u=s.filter(c=>rn(c)&&!N(c));u.length>0&&O(n,o,{kind:"harness_session_unbound",sessionRef:"fleet",agentIds:u.map(c=>c.id),agentNames:u.map(C),message:`${u.length} scout agent(s) have no provider harness session bound (lanes use tail transcripts, not agent.id).`});for(const[c,l]of r){if(l.length<=1)continue;const p=en(l,t);l.filter(d=>d.id!==p?.id).length!==0&&O(n,o,{kind:"session_binding_conflict",sessionRef:c,agentIds:l.map(d=>d.id),agentNames:l.map(C),selectedAgentId:p?.id,message:p?`Multiple scout agents claim ${c}; showing ${C(p)}.`:`Multiple scout agents claim ${c} but none could be selected.`})}return n}function _n(e){if(!e?.issues?.length)return[];const t=new Set,s=[];for(const n of e.issues)n.sessionKey.startsWith("cursor:")||t.has(n.sessionKey)||(t.add(n.sessionKey),s.push({id:He("transcript_path_collision",n.sessionKey),kind:"transcript_path_collision",sessionRef:n.sessionKey,transcriptPaths:n.transcriptPaths,message:n.message}));return s}function Tn(e){const{transcripts:t,tailEvents:s,processes:n=[],scoutAgents:o=e.agents??[],terminalSessions:r=[],observeCache:i={},now:u,workingOnly:c=!0,horizon:l=re}=e,p=nn(t),h=ie(l),d=[],m=new Map;for(const a of s){const S=m.get(a.sessionId)??[];S.push(a),m.set(a.sessionId,S)}const g=new Map;for(const a of o)for(const S of me(a))jt(g,S,a);const v=new Set,x=new Set,M=[...an(p),...cn(o,g)],D=new Set(M.map(a=>a.id));for(const a of p){a.sessionId?.trim();const S=De(a,m),y=zt(a,m),b=y>0&&u-y<=h;if(!b)continue;const w=Dt(a,g),E=a.parentSessionId?g.get(a.parentSessionId):void 0;w&&x.add(w.id);const T=xt(a,S,b,{now:u,windowMs:h}),F=S.length>0,L=Z(a,S,w??_e(a,y,b),n,T,E),R=y,P=w?{id:w.id,agent:{...w,updatedAt:y},source:"scout",observe:T,facts:L,lastActiveAt:y,current:b}:{id:ne(a),agent:_e(a,y,b),source:"native",observe:T,facts:L,lastActiveAt:y,current:b};if(!(c&&!ee(P,u,h,R))&&!(F&&!Y(T)&&!J(T))){for(const A of fe(a))v.add(A);d.push(P)}}for(const a of r){if(!Ft(a)||Ht(a,v))continue;const S=Kt(a,m),y=Math.max(S,a.updatedAt??0,a.createdAt??0),b=y>0&&u-y<=h;if(!b)continue;const w=Gt(a,g);w&&x.add(w.id);const E=Lt(a,y,b),T=w?{...w,harnessSessionId:w.harnessSessionId??a.sourceSessionId,terminalSurface:w.terminalSurface??E.terminalSurface,updatedAt:Math.max(w.updatedAt??0,y)}:E,F=Nt(a,b,y),L={id:w?w.id:le(a),agent:T,source:w?"scout":"native",observe:F,facts:Z(null,[],T,n,F),lastActiveAt:y,current:b};if(!(c&&!ee(L,u,h,S||y))){for(const R of X(a))v.add(R);d.push(L)}}for(const a of o){const S=lt(a,u,h);if(q(a)&&S.length===0||!j(a,"scout"))continue;const y=N(a);if(!y&&S.length===0)continue;if(y&&Wt(a,v)){if(!x.has(a.id)){const ye=We(a)??a.id;O(M,D,{kind:"shadowed_scout_card",sessionRef:ye,agentIds:[a.id],agentNames:[C(a)],message:`${C(a)} is active but hidden because another lane already represents ${ye}.`})}continue}const b=i[a.id],w=y?pe(a.harnessSessionId,m):0,E=S.at(-1)?.at??0,T=qt(a),F=Ut(a,u,h),L=F?a.updatedAt??0:0,R=Math.max(Mt(a,b,u),w,L,T,E),P=R>0&&u-R<=h;let A=ze(b?.data??null,u,h);!A&&S.length>0&&(A=Qt(a,S)),F&&P&&!Y(A)&&!J(A)?A=Vt(a,P,R):!A&&T>0&&(A=Xt(a,R));const he={id:a.id,agent:a,source:"scout",observe:A,facts:Z(null,[],a,n,A),lastActiveAt:R,current:P},ge=T>0&&u-T<=h||E>0;c&&!ge&&!ee(he,u,h,w)||!ge&&!Y(A)&&!J(A)||d.push(he)}return{lanes:d.sort(oe),issues:M}}export{te as A,re as D,Sn as a,q as b,on as c,kn as d,wn as e,je as f,Tn as g,yn as h,J as i,ie as j,gn as k,dt as l,bn as m,vn as n,xt as o,_n as r,hn as s};
@@ -0,0 +1 @@
1
+ .amv{display:flex;height:100%;min-height:0;background:var(--bg)}.amv-main{flex:1;min-width:0;display:flex;flex-direction:column;min-height:0}.amv-head{display:flex;align-items:center;gap:10px;padding:10px 16px;border-bottom:1px solid var(--border)}.amv-ident{flex:1;min-width:0;display:flex;flex-direction:column;gap:2px}.amv-name{font:600 14px/1.2 var(--font-sans);color:var(--ink)}.amv-sub{display:flex;align-items:center;gap:6px;font:400 11.5px/1.3 var(--font-sans);color:var(--dim);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.amv-dot{flex:none;width:6px;height:6px;border-radius:50%;background:var(--green, #4ade80)}.amv-dot[data-tone=attention]{background:var(--accent)}.amv-dot[data-tone=pending]{background:var(--dim)}.amv-strip{display:flex;gap:8px;padding:8px 16px;border-bottom:1px solid var(--border);overflow-x:auto;scrollbar-width:thin}.amv-card{display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--border);border-radius:var(--radius-md);background:var(--surface);color:var(--muted);cursor:pointer;white-space:nowrap;font:400 11.5px/1.3 var(--font-sans);flex:none}.amv-card:hover{background:color-mix(in srgb,var(--ink) 5%,var(--surface))}.amv-card--on{border-color:var(--accent);color:var(--ink)}.amv-cardTitle{font-weight:550;color:var(--ink);overflow:hidden;text-overflow:ellipsis;max-width:260px}.amv-cardMeta{font-family:var(--font-mono);font-size:10px;color:var(--dim)}.amv-mark{flex:none;width:7px;height:7px;border-radius:2px;box-shadow:inset 0 0 0 1px var(--border)}.amv-mark[data-state=working]{background:var(--green, #4ade80);box-shadow:none}.amv-mark[data-state=needs_you]{background:var(--accent);box-shadow:none}.amv-feed{flex:1;min-height:0;display:flex;flex-direction:column}.amv-feed>*{flex:1;min-height:0}.amv-empty{flex:1;display:grid;place-items:center;color:var(--dim);font:400 12.5px/1.4 var(--font-sans)}.amv-thread{width:min(420px,44%);min-width:320px;border-left:1px solid var(--border);display:flex;flex-direction:column;min-height:0;background:var(--bg)}.amv-threadHead{display:flex;align-items:center;gap:6px;padding:10px 12px;border-bottom:1px solid var(--border)}.amv-threadIdent{flex:1;min-width:0;display:flex;flex-direction:column;gap:1px}.amv-threadKicker{font:600 9.5px/1.2 var(--font-mono);letter-spacing:.08em;text-transform:uppercase;color:var(--dim)}.amv-threadTitle{font:550 12.5px/1.3 var(--font-sans);color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.amv-threadBtn{flex:none;border:0;background:none;color:var(--dim);cursor:pointer;padding:4px;border-radius:var(--radius-sm);display:grid;place-items:center}.amv-threadBtn:hover{color:var(--ink);background:color-mix(in srgb,var(--ink) 6%,transparent)}.amv-threadBody{flex:1;min-height:0;display:flex;flex-direction:column}.amv-threadBody>*{flex:1;min-height:0}
@@ -0,0 +1 @@
1
+ import{f as M}from"./use-fleet-active-asks-DAspZQjE.js";import{a as C}from"./message-visibility-CGOmSSKs.js";import{h as j}from"./conversation-model-Dc02NsGp.js";import{d as v,m as T,e as b}from"./Provider-CtXJeLrP.js";const h="No project";function B(e){const t=e?.project?.trim();if(t)return t;const s=e?.projectRoot?.trim();if(s){const i=s.replace(/\/+$/,"").split("/").pop();if(i)return i}return h}function P(e){const t=(e.title??"").trim()||e.agentName||e.id,s=(e.agentName??"").trim().toLowerCase();if(t&&t.trim().toLowerCase()!==s)return t;const i=e.preview?C(e.preview).replace(/\s+/g," ").trim():"";return i?i.length>64?`${i.slice(0,61)}…`:i:e.currentBranch??t}const A={needs_you:"Needs you",working:"Working",queued:"Starting",quiet:"Quiet"},E=["needs_you","working","queued","quiet"];function N(e){return e?.status==="needs_attention"?"needs_you":e?.status==="working"?"working":e?.status==="queued"?"queued":"quiet"}const _=1440*60*1e3,q=["Today","Yesterday","This week","Earlier"];function D(e,t){if(!e)return"Earlier";const s=f=>{const u=new Date(f);return u.setHours(0,0,0,0),u.getTime()},i=Math.round((s(t)-s(e))/_);return i<=0?"Today":i===1?"Yesterday":i<7?"This week":"Earlier"}function J(e,t,s,i,f){const u=o=>{const r=o.agentId?s.get(o.agentId):void 0;switch(t){case"project":return B(r);case"agent":return r?.name??o.agentName??"Unknown agent";case"day":return D(o.lastMessageAt,f);case"state":return A[N(M(i,o))]}},c=new Map;for(const o of e){const r=u(o),a=c.get(r);a?a.push(o):c.set(r,[o])}for(const o of c.values())o.sort((r,a)=>(a.lastMessageAt??0)-(r.lastMessageAt??0));return(()=>{const o=[...c.keys()];return t==="day"?q.filter(r=>c.has(r)):t==="state"?E.map(r=>A[r]).filter(r=>c.has(r)):o.sort((r,a)=>r===h?1:a===h?-1:r.localeCompare(a))})().map(o=>({label:o,sessions:c.get(o)}))}function O(e){const t=e.project?.trim().toLowerCase();if(t)return`project:${t}`;const s=e.projectRoot?.trim().replace(/\/+$/,"").toLowerCase();return s?`root:${s}`:"project:"}function $(e){return(e.authorityNodeId??e.homeNodeId??"").trim().toLowerCase()}function w(e,t){const s=e?.definitionId.trim().toLowerCase();return!e||!s?`agent:${t}`:JSON.stringify(["definition",s,O(e),$(e)])}function y(e,t){const s=e.id===e.definitionId?0:1,i=t.id===t.definitionId?0:1;return s-i||e.id.localeCompare(t.id)}function K(e){return[...e].sort(y)[0]}function p(e,t){return e.id===t||!!e.equivalentConversationIds?.includes(t)}function I(e,t){return(e.agentId??"").localeCompare(t.agentId??"")||e.id.localeCompare(t.id)}function Q(e){const t=e.machineId?.trim()||null,s=v(e.agents,t),i=T(e.agents,t),f=b(e.sessions,i,t),u=s.find(n=>n.id===e.agentId),c=w(u,e.agentId),g=u?s.filter(n=>w(n,n.id)===c):[],o=new Set(g.map(n=>n.id));o.size===0&&o.add(e.agentId);const r=f.filter(n=>j(n)&&!!(n.agentId&&o.has(n.agentId))).sort((n,l)=>(l.lastMessageAt??0)-(n.lastMessageAt??0)||I(n,l)),a=[...g].sort(y),m=a[0]??u;let d;for(const n of a)if(n.conversationId&&(d=r.find(l=>p(l,n.conversationId)),d))break;!d&&m&&(d=[...r].filter(n=>n.agentId===m.id).sort(I)[0]),d??=[...r].sort(I)[0];const S=r.filter(n=>n.id!==d?.id),k=!!(e.threadId&&d&&p(d,e.threadId)),L=e.threadId&&!k?r.find(n=>p(n,e.threadId)):void 0;return{agent:m,memberAgentIds:[...o].sort(),sessions:r,master:d,threads:S,thread:L}}export{h as N,w as a,Q as b,K as c,J as g,B as p,P as t};
@@ -1 +1 @@
1
- import{f as s}from"./text-CnZ0e1-V.js";const c={general:"Generalist",builder:"Builder",reviewer:"Reviewer",researcher:"Researcher",operator:"Operator",bridge:"Bridge",system:"System",organic:"Organic",managed:"Managed"};function u(e){if(!e?.trim())return"Generalist";const r=e.trim().toLowerCase();return c[r]??e.replace(/_/g," ")}function m(e){return e?.trim()?s(e)?.trim()??null:null}function g(e,r){const i=e.agentClass?.trim()||"general",t=u(i),n=m(e.role),a=[...new Set(e.skills??[])].filter(Boolean),l=[...new Set([...e.capabilities??[],...r?.capabilities??[]])].filter(Boolean),o=i==="general"&&!n&&a.length===0;return{kind:t,kindRaw:i,role:n,isGeneralist:o,headline:n??t,skills:a,capabilities:l}}export{g as a};
1
+ import{f as s}from"./text-BP3oyl8-.js";const c={general:"Generalist",builder:"Builder",reviewer:"Reviewer",researcher:"Researcher",operator:"Operator",bridge:"Bridge",system:"System",organic:"Organic",managed:"Managed"};function u(e){if(!e?.trim())return"Generalist";const r=e.trim().toLowerCase();return c[r]??e.replace(/_/g," ")}function m(e){return e?.trim()?s(e)?.trim()??null:null}function g(e,r){const i=e.agentClass?.trim()||"general",t=u(i),n=m(e.role),a=[...new Set(e.skills??[])].filter(Boolean),l=[...new Set([...e.capabilities??[],...r?.capabilities??[]])].filter(Boolean),o=i==="general"&&!n&&a.length===0;return{kind:t,kindRaw:i,role:n,isGeneralist:o,headline:n??t,skills:a,capabilities:l}}export{g as a};