@openscout/scout 0.2.91 → 0.2.92

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 (283) hide show
  1. package/README.md +12 -4
  2. package/bin/scoutd +0 -0
  3. package/dist/build-manifest.json +3 -3
  4. package/dist/client/assets/{ActivityScreen-BUeb4ERK.js → ActivityScreen-DkUP7V7M.js} +1 -1
  5. package/dist/client/assets/{AddProjectForm-DtTfn4Zk.js → AddProjectForm-CpyytDf2.js} +1 -1
  6. package/dist/client/assets/{AgentAvatar-CneOa70z.js → AgentAvatar-D8ZtMluU.js} +1 -1
  7. package/dist/client/assets/{AgentConfigurationScreen-CkZ7EjZh.js → AgentConfigurationScreen-BlGI6fuM.js} +1 -1
  8. package/dist/client/assets/{AgentDefinitionsWorkspace-0Y3kqMtv.js → AgentDefinitionsWorkspace-CfaDVCVt.js} +1 -1
  9. package/dist/client/assets/{AgentDetailCard-Dtc02KUO.js → AgentDetailCard-BTiOmh-a.js} +1 -1
  10. package/dist/client/assets/{AgentFloorView-B5raPB_U.js → AgentFloorView-DjNLILLt.js} +1 -1
  11. package/dist/client/assets/{AgentInfoScreen-DFG4ElZD.js → AgentInfoScreen-DG5dlHb_.js} +1 -1
  12. package/dist/client/assets/{AgentLaneCard-BRAkw8YJ.js → AgentLaneCard-lfRNb7JD.js} +1 -1
  13. package/dist/client/assets/{AgentLaneChrome-T8QE5742.js → AgentLaneChrome-Dlwrbq3g.js} +1 -1
  14. package/dist/client/assets/{AgentLaneDetailSheet-C8RYotnv.js → AgentLaneDetailSheet-BzYzBfcW.js} +1 -1
  15. package/dist/client/assets/{AgentLaneSummaryResize-FyYweLo_.js → AgentLaneSummaryResize-6SOEWUnr.js} +1 -1
  16. package/dist/client/assets/AgentLanesEmbedScreen-Crxx1srt.js +1 -0
  17. package/dist/client/assets/{AgentLanesPreflight-Cil3dNwu.js → AgentLanesPreflight-C3uOiOzd.js} +1 -1
  18. package/dist/client/assets/{AgentLanesView-DPfO8MOo.js → AgentLanesView-ChNlmY-F.js} +1 -1
  19. package/dist/client/assets/{AgentLiveActions-DwScaVRF.js → AgentLiveActions-BJ5dIfL3.js} +1 -1
  20. package/dist/client/assets/{AgentSessions-DKoWA0Lm.js → AgentSessions-DpY0htZV.js} +1 -1
  21. package/dist/client/assets/{AgentsConsole-DoBIWGoq.js → AgentsConsole-CHyXrjhm.js} +1 -1
  22. package/dist/client/assets/{AgentsScreen-JuUiSuwY.js → AgentsScreen-BhCjX2lD.js} +1 -1
  23. package/dist/client/assets/AgentsSubnav-az_VDkri.js +1 -0
  24. package/dist/client/assets/{AtopView-ycxMrRwp.js → AtopView-BjjPM8OX.js} +1 -1
  25. package/dist/client/assets/{BackToPicker-D6WgIDb-.js → BackToPicker-D1LV6Cqp.js} +1 -1
  26. package/dist/client/assets/{BriefingDetailScreen-Zw-taW1s.js → BriefingDetailScreen-B7qJ90Np.js} +1 -1
  27. package/dist/client/assets/{BriefingsScreen-BerYOoWS.js → BriefingsScreen-CW6N829d.js} +1 -1
  28. package/dist/client/assets/{BrokerMetadataPanel-Cu93j-Ga.js → BrokerMetadataPanel-BhjECqOK.js} +1 -1
  29. package/dist/client/assets/{BrokerScreen-CeN90URH.js → BrokerScreen-X3z50712.js} +1 -1
  30. package/dist/client/assets/{ChatCollapsedStrip-DdKyMSEM.js → ChatCollapsedStrip-DNR9osDy.js} +1 -1
  31. package/dist/client/assets/{CodeDiffPane-BjCOBLze.js → CodeDiffPane-Bx_2VAzv.js} +1 -1
  32. package/dist/client/assets/{CodeProjectPicker-NSGdCaK0.js → CodeProjectPicker-C1yOJKvs.js} +1 -1
  33. package/dist/client/assets/{CodeScreen-CA9Sq6Dx.js → CodeScreen-CIKK1LcZ.js} +1 -1
  34. package/dist/client/assets/{ContextMenu-DnFcmfMR.js → ContextMenu-CHIuVKz7.js} +1 -1
  35. package/dist/client/assets/{ConversationComposer-CjRXFkvY.js → ConversationComposer-Bf7Ga_49.js} +1 -1
  36. package/dist/client/assets/{ConversationFeedRows-CgRTIpAv.js → ConversationFeedRows-Cm1Lgo43.js} +1 -1
  37. package/dist/client/assets/{ConversationHeader-CRmdtuL7.js → ConversationHeader-B_GXrKR0.js} +1 -1
  38. package/dist/client/assets/{ConversationPanels-DCkcLIHk.js → ConversationPanels-BTBbEvrP.js} +2 -2
  39. package/dist/client/assets/{ConversationScreen-Br0QQ3xo.js → ConversationScreen-B3l2m3JI.js} +1 -1
  40. package/dist/client/assets/{ConversationStatus-BJ1CMbAv.js → ConversationStatus-BqhUHD85.js} +1 -1
  41. package/dist/client/assets/{DataTable-Dzqiaha4.js → DataTable-CJbbgBdA.js} +1 -1
  42. package/dist/client/assets/{DispatchAftermath-B0WMg_z3.js → DispatchAftermath-BDA9CrOd.js} +1 -1
  43. package/dist/client/assets/{DocumentFocusViewer-CZVVIAD5.js → DocumentFocusViewer-B9vodVmG.js} +1 -1
  44. package/dist/client/assets/{EmbeddableSurfacesLab-C3a7hJWO.js → EmbeddableSurfacesLab-BdsYRDky.js} +1 -1
  45. package/dist/client/assets/{EmptyState-CYNJZMrZ.js → EmptyState-BRY5jTpz.js} +1 -1
  46. package/dist/client/assets/{FileViewerPane-Fwt8_KmD.js → FileViewerPane-9Bveqm9c.js} +1 -1
  47. package/dist/client/assets/{FleetSearch-Dsi_l2KW.js → FleetSearch-Bj9SCl2f.js} +1 -1
  48. package/dist/client/assets/{FlightObserveScreen-g_tiGmvz.js → FlightObserveScreen-BVMdsiCC.js} +1 -1
  49. package/dist/client/assets/{FollowScreen-Bb_rcrzi.js → FollowScreen-BifwHWOV.js} +1 -1
  50. package/dist/client/assets/{HarnessMark-DrE57dUq.js → HarnessMark-BPAphNjx.js} +1 -1
  51. package/dist/client/assets/{HarnessesScreen-CAsCJ_tG.js → HarnessesScreen-fMnbnrD4.js} +1 -1
  52. package/dist/client/assets/{HerdrSession-1eVu9Owj.js → HerdrSession-BujfGzrP.js} +1 -1
  53. package/dist/client/assets/{HomeHero-W445QrG1.js → HomeHero-BgM6S39l.js} +1 -1
  54. package/dist/client/assets/{KnowledgeSearchInspector-CbPVg3fr.js → KnowledgeSearchInspector-B4ZY24xE.js} +1 -1
  55. package/dist/client/assets/{KnowledgeSearchScreen-C1lN1xJk.js → KnowledgeSearchScreen-Ch_WENUC.js} +1 -1
  56. package/dist/client/assets/{LaneToolHoverCard-BkBcDYm-.js → LaneToolHoverCard-B7KdvQvf.js} +1 -1
  57. package/dist/client/assets/{LaneTraceDetailSheet-CzTd44rf.js → LaneTraceDetailSheet-H3AnN-vN.js} +1 -1
  58. package/dist/client/assets/{LaneTraceEventFocus-BmMmPTyJ.js → LaneTraceEventFocus-mkMw2wJU.js} +1 -1
  59. package/dist/client/assets/{MeshCanvas-DwkjsiJ5.js → MeshCanvas-CpKcWxKy.js} +1 -1
  60. package/dist/client/assets/{MeshCanvasMinimap-vmCpU1sD.js → MeshCanvasMinimap-C9IoGHbe.js} +1 -1
  61. package/dist/client/assets/{MeshScreen-CkMepUpT.js → MeshScreen-48QkJSDI.js} +1 -1
  62. package/dist/client/assets/{MeshTopologyView-BD2xLE2C.js → MeshTopologyView-DFzr0IZM.js} +2 -2
  63. package/dist/client/assets/{MessageComposerSuggestions-qbalTne_.js → MessageComposerSuggestions-FdVHnT_q.js} +1 -1
  64. package/dist/client/assets/{MessagesScreen-C8UynyLC.js → MessagesScreen-BMOOfbWX.js} +1 -1
  65. package/dist/client/assets/{MissionContextRail-D5MEP2f4.js → MissionContextRail-Y8QxUZGE.js} +1 -1
  66. package/dist/client/assets/{MissionControlView-K_I7eftL.js → MissionControlView-BpsHKu1F.js} +1 -1
  67. package/dist/client/assets/{MissionFocusOverlay-CWKLdUKG.js → MissionFocusOverlay-BPnAEA3F.js} +1 -1
  68. package/dist/client/assets/{MissionLeftAgentRow-ByGrNAcs.js → MissionLeftAgentRow-iOZ6ds9L.js} +1 -1
  69. package/dist/client/assets/{MissionLogPane-ZwHJ137T.js → MissionLogPane-B0csI89E.js} +1 -1
  70. package/dist/client/assets/{NewAgentModal-Do9aVvan.js → NewAgentModal-DBHJR9Qm.js} +1 -1
  71. package/dist/client/assets/{NewChatComposer-DKlNX1UA.js → NewChatComposer-Hd7pI5Ac.js} +1 -1
  72. package/dist/client/assets/{NewChatOrigin-DXPvX-hh.js → NewChatOrigin-DmuJ32wa.js} +1 -1
  73. package/dist/client/assets/{ObserveEmbedScreen-Dghsq2on.js → ObserveEmbedScreen-DyArn7Id.js} +1 -1
  74. package/dist/client/assets/{ObserveTextFlow-DWNlmTVm.js → ObserveTextFlow-CkMrtT8s.js} +2 -2
  75. package/dist/client/assets/{ObservedTopologyPanel-BlmGoxCE.js → ObservedTopologyPanel-CaSZZP05.js} +1 -1
  76. package/dist/client/assets/{OpenScoutAppShell-DDqQi-oe.js → OpenScoutAppShell-BtlKkiuF.js} +1 -1
  77. package/dist/client/assets/{OpsAgentsView-Bn_fGBdo.js → OpsAgentsView-CnqrwbC2.js} +1 -1
  78. package/dist/client/assets/OpsScreen-DOlmlVkP.js +1 -0
  79. package/dist/client/assets/OpsSubnav-Dj3ShAKv.js +1 -0
  80. package/dist/client/assets/{PlanView-B6gKo543.js → PlanView-BLGdWDx6.js} +1 -1
  81. package/dist/client/assets/ProjectAgentProfile-Dv1sVnQl.js +1 -0
  82. package/dist/client/assets/{ProjectAgentProfileBar-C5QWwZCn.js → ProjectAgentProfileBar-BLVg5EeA.js} +1 -1
  83. package/dist/client/assets/{ProjectAgentProfileHero-DC7Dd8VL.js → ProjectAgentProfileHero-0-GDhsPT.js} +1 -1
  84. package/dist/client/assets/{ProjectsInbox-DCLrDmj1.js → ProjectsInbox-B3DpAI5b.js} +1 -1
  85. package/dist/client/assets/{ProjectsRail-C4hiXYSb.js → ProjectsRail-BDl7U9Jq.js} +1 -1
  86. package/dist/client/assets/ProjectsScreen-Dl2FcGrR.js +1 -0
  87. package/dist/client/assets/{ProjectsThreadAside-DYmL2dCY.js → ProjectsThreadAside-BcGC5mHE.js} +1 -1
  88. package/dist/client/assets/{Provider-p-xuaAoE.js → Provider-cJCdHAxu.js} +1 -1
  89. package/dist/client/assets/{RailRow-bRkkXIpR.js → RailRow-CLcVmywd.js} +1 -1
  90. package/dist/client/assets/{RawSessionsTable-B7WKmXrk.js → RawSessionsTable-DBto4Ts-.js} +1 -1
  91. package/dist/client/assets/{RealtimeVoiceScreen-BzP3BQq9.js → RealtimeVoiceScreen-DXEU5v3g.js} +1 -1
  92. package/dist/client/assets/{RepoDiffEmbedScreen-xjzjcJ_c.js → RepoDiffEmbedScreen-BCDXFE3D.js} +1 -1
  93. package/dist/client/assets/{RepoDiffPageScreen-DRzIY-dk.js → RepoDiffPageScreen-m62FiWXC.js} +1 -1
  94. package/dist/client/assets/{RepoDiffViewer-CNDp01KM.js → RepoDiffViewer-PaNeZMhJ.js} +1 -1
  95. package/dist/client/assets/RepoDiffViewerLazy-CWE5GxMP.js +2 -0
  96. package/dist/client/assets/{ReposScreen-CpaLC_NU.js → ReposScreen-Cksv1cAD.js} +1 -1
  97. package/dist/client/assets/{ScoutDeckSurface-DkpZ-0DH.js → ScoutDeckSurface-BCjPl7C4.js} +1 -1
  98. package/dist/client/assets/{ScoutSurface-BENBUt5-.js → ScoutSurface-CkgT7A-c.js} +1 -1
  99. package/dist/client/assets/{ScoutbotBroadcastChip-CGZyxS5H.js → ScoutbotBroadcastChip-DkiRCHuK.js} +1 -1
  100. package/dist/client/assets/{ScoutbotFxLab-Bk2ZsfPp.js → ScoutbotFxLab-D-kV5j4T.js} +1 -1
  101. package/dist/client/assets/{ScoutbotRealtimeVoiceCall-n63LdBZs.js → ScoutbotRealtimeVoiceCall-1ixiEn1L.js} +1 -1
  102. package/dist/client/assets/{SecondaryNav-B4IsujYh.js → SecondaryNav-_wyKjwNf.js} +1 -1
  103. package/dist/client/assets/{SessionEmbedScreen-CPfH-jqN.js → SessionEmbedScreen-CJZmIBV7.js} +1 -1
  104. package/dist/client/assets/{SessionObserve-B-SkP3tu.js → SessionObserve-yYA8Gy5s.js} +1 -1
  105. package/dist/client/assets/{SessionObserveEvidence-CF5jnH3-.js → SessionObserveEvidence-cHdjYOJe.js} +1 -1
  106. package/dist/client/assets/{SessionRefScreen-C-4jjmVG.js → SessionRefScreen-OkTY7Szg.js} +1 -1
  107. package/dist/client/assets/SessionsScreen-B-GFjxIA.js +1 -0
  108. package/dist/client/assets/{SettingsDrawer-DATxwZrn.js → SettingsDrawer-Co11RFX0.js} +1 -1
  109. package/dist/client/assets/{SettingsScreen-Bu53X7J_.js → SettingsScreen-Cn09nq5_.js} +1 -1
  110. package/dist/client/assets/{ShikiPane-DH8yYDks.js → ShikiPane-dBS9hD-z.js} +1 -1
  111. package/dist/client/assets/{SlidePanel-RFXJpfUa.js → SlidePanel-CH-3-8_2.js} +1 -1
  112. package/dist/client/assets/{SpriteAvatar-CEYdCzem.js → SpriteAvatar-DS6Tmyua.js} +1 -1
  113. package/dist/client/assets/{StatusPill-9uy70ttd.js → StatusPill-C8m9ZymF.js} +1 -1
  114. package/dist/client/assets/{TailView-6bIrgdxN.js → TailView-B0BSopPs.js} +1 -1
  115. package/dist/client/assets/{Terminal-BI6km7H4.js → Terminal-U8gjIdm3.js} +1 -1
  116. package/dist/client/assets/{TerminalEmbedScreen-D4JOWwtm.js → TerminalEmbedScreen-CTmdE7us.js} +1 -1
  117. package/dist/client/assets/{TextDocumentSurface-BcP9vvji.js → TextDocumentSurface-BWJCGBZf.js} +1 -1
  118. package/dist/client/assets/{TmuxPeek-IaWqCgyJ.js → TmuxPeek-B4QdHbGm.js} +1 -1
  119. package/dist/client/assets/{VoicePermissionsPanel-C80iZxgy.js → VoicePermissionsPanel-Dd4ITJy_.js} +1 -1
  120. package/dist/client/assets/{WorkDetailScreen-CweZ6fEd.js → WorkDetailScreen-mJs0mb99.js} +1 -1
  121. package/dist/client/assets/{WorkFilesViewer-Dy_-06iI.js → WorkFilesViewer-ODzLXKxj.js} +1 -1
  122. package/dist/client/assets/{activity-DS0u0Itf.js → activity-CC8JzJNH.js} +1 -1
  123. package/dist/client/assets/{addon-fit-CN888B3D.js → addon-fit-CaZ-uLrg.js} +1 -1
  124. package/dist/client/assets/{addon-webgl-CoAnanQS.js → addon-webgl-B8utL3bM.js} +1 -1
  125. package/dist/client/assets/{agent-essentials-CuK4G_zS.js → agent-essentials-B3wcxg_v.js} +1 -1
  126. package/dist/client/assets/{arc.es-BET9ev6q.js → arc.es-uFv9UrHn.js} +1 -1
  127. package/dist/client/assets/{arrow-down-DxxPnPwh.js → arrow-down-w1HPzDSE.js} +1 -1
  128. package/dist/client/assets/{arrow-left-CXDkJuCg.js → arrow-left-B-3GJ7ct.js} +1 -1
  129. package/dist/client/assets/{arrow-up-right-Bj8RjSqW.js → arrow-up-right-G6bJXxhK.js} +1 -1
  130. package/dist/client/assets/{bot-BSGSicKC.js → bot-DzCOGKi6.js} +1 -1
  131. package/dist/client/assets/{check-BfA0T8UD.js → check-BX8nRgop.js} +1 -1
  132. package/dist/client/assets/{chevron-down-BVg09D6U.js → chevron-down-B3VVRJcV.js} +1 -1
  133. package/dist/client/assets/{chevron-right-CaEwYkxE.js → chevron-right-BYMV1511.js} +1 -1
  134. package/dist/client/assets/{chunk-HRAB3GC3-HhKwnZCi.js → chunk-HRAB3GC3-dRd2eQMJ.js} +1 -1
  135. package/dist/client/assets/{chunk-JTPDIGGW-DX2eTIQ_.js → chunk-JTPDIGGW-BjX67kHU.js} +3 -3
  136. package/dist/client/assets/{chunk-T65CQEWV-D-bOfuCH.js → chunk-T65CQEWV-kP6nJjkU.js} +1 -1
  137. package/dist/client/assets/{chunk-YOZR3KYS-oS9dlQCI.js → chunk-YOZR3KYS-C13bZPVd.js} +1 -1
  138. package/dist/client/assets/{clock-C3TUL7D7.js → clock-B9ukVaVn.js} +1 -1
  139. package/dist/client/assets/{code-xml-Dbvjk9Kw.js → code-xml-BFc3TMSm.js} +1 -1
  140. package/dist/client/assets/{content-CiOMtgQc.js → content-B8gahuBy.js} +1 -1
  141. package/dist/client/assets/content-BIqX06OQ.js +1 -0
  142. package/dist/client/assets/content-BKDZ6Fxe.js +1 -0
  143. package/dist/client/assets/content-C15Ya-iu.js +1 -0
  144. package/dist/client/assets/content-CDE9tJDF.js +1 -0
  145. package/dist/client/assets/content-CSAfI-PX.js +1 -0
  146. package/dist/client/assets/content-CTF9D60D.js +1 -0
  147. package/dist/client/assets/{content-CJuH5cDP.js → content-CbAGkYQO.js} +1 -1
  148. package/dist/client/assets/content-CtqLJOVp.js +1 -0
  149. package/dist/client/assets/content-Dvs1KRfo.js +1 -0
  150. package/dist/client/assets/content-DyJdVZjI.js +1 -0
  151. package/dist/client/assets/{content-C2TZOKSE.js → content-Ji7ATaf7.js} +1 -1
  152. package/dist/client/assets/content-eqZXKWcP.js +1 -0
  153. package/dist/client/assets/content-iyyQKwvA.js +1 -0
  154. package/dist/client/assets/content-pDE7Fpb9.js +1 -0
  155. package/dist/client/assets/content-pPSd2dua.js +1 -0
  156. package/dist/client/assets/{conversation-icons-DmC_Ak3z.js → conversation-icons-gpsv650H.js} +1 -1
  157. package/dist/client/assets/conversation-motion-features-DXtKlmuM.js +1 -0
  158. package/dist/client/assets/{copy-C79v_7D-.js → copy-BFmOcWof.js} +1 -1
  159. package/dist/client/assets/{createLucideIcon-DCq_3fQn.js → createLucideIcon-CFBn0Sdk.js} +1 -1
  160. package/dist/client/assets/{discover-IEnbrH8_.js → discover-DKf0aTr_.js} +2 -2
  161. package/dist/client/assets/embed-entry-RlQUTtc4.js +2 -0
  162. package/dist/client/assets/{external-link-Dd8xaveL.js → external-link-B1TI5yIt.js} +1 -1
  163. package/dist/client/assets/{eye-DkU59kfl.js → eye-1J4yOUoG.js} +1 -1
  164. package/dist/client/assets/{file-text-BITQqGtF.js → file-text-DcYSrI4v.js} +1 -1
  165. package/dist/client/assets/{gestures-B5rLNRpi.js → gestures-CcEOV6Sr.js} +1 -1
  166. package/dist/client/assets/{home-moving-signal-Bs635mVw.js → home-moving-signal-Bh2FugbH.js} +1 -1
  167. package/dist/client/assets/{home-now-card-VxlLjg1A.js → home-now-card-ByRH5fFx.js} +1 -1
  168. package/dist/client/assets/{home-now-card-nano-C06GMiwD.js → home-now-card-nano-y1EhBvVL.js} +1 -1
  169. package/dist/client/assets/{hooks-BWiLxTw1.js → hooks-DUZwL3Aq.js} +1 -1
  170. package/dist/client/assets/index-BBznYVWk.css +1 -0
  171. package/dist/client/assets/{index-BTj2MguM.js → index-BTuq-8Iv.js} +1 -1
  172. package/dist/client/assets/index-CmwGCxUk.js +1 -0
  173. package/dist/client/assets/{index-BZovGpDk.js → index-DmFAhGPj.js} +2 -2
  174. package/dist/client/assets/{index-vbaJ8sin.js → index-Dtaswdsh.js} +1 -1
  175. package/dist/client/assets/{inspector-panel-C96HcyK5.js → inspector-panel-DzgS5_Mv.js} +1 -1
  176. package/dist/client/assets/{keyboard-nav-CHo_xmjw.js → keyboard-nav-h1IdakpD.js} +1 -1
  177. package/dist/client/assets/{lane-roster-store-B6ybJlHJ.js → lane-roster-store-71vFgAem.js} +1 -1
  178. package/dist/client/assets/{left-DMJkmJOF.js → left-8NITBvFX.js} +1 -1
  179. package/dist/client/assets/{left-COMAiMfB.js → left-B2HEqrTM.js} +1 -1
  180. package/dist/client/assets/{left-C6Zj3cR4.js → left-CTYUvXbe.js} +1 -1
  181. package/dist/client/assets/{left-BuJ0wJW1.js → left-CwDRT50z.js} +1 -1
  182. package/dist/client/assets/{left-l92tw5Kc.js → left-CxlDLJlw.js} +1 -1
  183. package/dist/client/assets/{left-Ce4WKYPK.js → left-XFXxNd4g.js} +1 -1
  184. package/dist/client/assets/{left-agents-BuSyVNGE.js → left-agents-Ck4Xn-R8.js} +1 -1
  185. package/dist/client/assets/{left-default-DRHywOKX.js → left-default-BeOyS0bR.js} +1 -1
  186. package/dist/client/assets/{left-lanes-4-aUyyrV.js → left-lanes-DZp3jJMo.js} +1 -1
  187. package/dist/client/assets/{left-mission-e849d_Td.js → left-mission-CuKFQ5xL.js} +1 -1
  188. package/dist/client/assets/left-p1hkO6P0.js +1 -0
  189. package/dist/client/assets/{left-plan-MchYwAB_.js → left-plan-3rrFENhp.js} +1 -1
  190. package/dist/client/assets/{library-DygjpA6u.js → library-E--gKzEZ.js} +1 -1
  191. package/dist/client/assets/{loader-circle-B-l2Wj3-.js → loader-circle-d6PKL_KD.js} +1 -1
  192. package/dist/client/assets/{local-agents-Wof5knTJ.js → local-agents-B5pq17tZ.js} +1 -1
  193. package/dist/client/assets/{mentions-BjXfeF7t.js → mentions-agCGDgyA.js} +1 -1
  194. package/dist/client/assets/{mesh-ops-C1gq8zKf.js → mesh-ops-5pZCYptW.js} +1 -1
  195. package/dist/client/assets/{mesh-view-store-B56D3f77.js → mesh-view-store-KJzABIkN.js} +1 -1
  196. package/dist/client/assets/{message-circle-BwVx5X0q.js → message-circle-CJO-pi7b.js} +1 -1
  197. package/dist/client/assets/{message-markup-DlVX-iuc.js → message-markup-CyRDLdOn.js} +1 -1
  198. package/dist/client/assets/{message-square-BnkG6tae.js → message-square-D1hMsMj_.js} +1 -1
  199. package/dist/client/assets/{mission-control-store-CMgIVjLJ.js → mission-control-store-Ce6dOvnZ.js} +1 -1
  200. package/dist/client/assets/{observe-DVHAcIrv.js → observe-BSWVM8YA.js} +1 -1
  201. package/dist/client/assets/{page-status-Bg2hd27j.js → page-status-D2FQLJOX.js} +1 -1
  202. package/dist/client/assets/{paperclip-DblaLD_N.js → paperclip-iZmDMOS5.js} +1 -1
  203. package/dist/client/assets/{plus-BAI0t5g9.js → plus-gZ0T0eBI.js} +1 -1
  204. package/dist/client/assets/{profile-3Q4sUtvJ.js → profile-Dxj3VVOM.js} +1 -1
  205. package/dist/client/assets/{projects-inbox-Da2hYEn6.js → projects-inbox-Dzt_GQDv.js} +1 -1
  206. package/dist/client/assets/{radio-BGtkyCG9.js → radio-RMLfV4EO.js} +1 -1
  207. package/dist/client/assets/{refresh-cw-DtF8xPqX.js → refresh-cw-C4x1x6b_.js} +1 -1
  208. package/dist/client/assets/resolve-panes-C9gF0w4e.js +1 -0
  209. package/dist/client/assets/resolve-sidebar-context-DxbY5RCH.js +1 -0
  210. package/dist/client/assets/{right-Dd2DscRz.js → right-5L7Tn0zG.js} +1 -1
  211. package/dist/client/assets/{right-BU_W1kSH.js → right-CYtkMmRu.js} +1 -1
  212. package/dist/client/assets/{right-CUP-NIDG.js → right-CreoQzPP.js} +1 -1
  213. package/dist/client/assets/{right-c4PAdFYZ.js → right-D-k9Z1Fe.js} +1 -1
  214. package/dist/client/assets/{right-ByptvkVX.js → right-D9xFfy2b.js} +1 -1
  215. package/dist/client/assets/{right-BlR7h0US.js → right-DI7zHADe.js} +1 -1
  216. package/dist/client/assets/{right-BwgwTGGd.js → right-DUbJ3WVc.js} +1 -1
  217. package/dist/client/assets/{right-DmVHd8Xj.js → right-DiybhsiK.js} +1 -1
  218. package/dist/client/assets/{right-Ch_jrNe2.js → right-Jh_1Q88s.js} +1 -1
  219. package/dist/client/assets/{right-B8qg3JdB.js → right-udr1qTJG.js} +1 -1
  220. package/dist/client/assets/{rocket-BWh18pt_.js → rocket-CMM-IdLy.js} +1 -1
  221. package/dist/client/assets/{router-63XV_E7f.js → router-Cn_s9IGH.js} +1 -1
  222. package/dist/client/assets/{runtime-picker-BXKJbLot.js → runtime-picker--IW3cRry.js} +1 -1
  223. package/dist/client/assets/{scope-views-Dm2_-NPi.js → scope-views-BIfMTXU4.js} +1 -1
  224. package/dist/client/assets/{scout-voice-D8Q5sZOL.js → scout-voice-CwbOz6EN.js} +1 -1
  225. package/dist/client/assets/{scroll-text-DZb3mmYo.js → scroll-text-DPPYrqB9.js} +1 -1
  226. package/dist/client/assets/{search-1QMVOxF3.js → search-DAyagUtF.js} +1 -1
  227. package/dist/client/assets/{secondaryNavConfig-c0cz3MkJ.js → secondaryNavConfig-Dw3gS1jR.js} +1 -1
  228. package/dist/client/assets/{selection-bridge-O9C4kGfF.js → selection-bridge-BXw09aRF.js} +1 -1
  229. package/dist/client/assets/{send-horizontal-DbyEkGql.js → send-horizontal-IcG46D2M.js} +1 -1
  230. package/dist/client/assets/{server-Bncn9S7r.js → server-BySujhDV.js} +1 -1
  231. package/dist/client/assets/{session-catalog-DC6BlBBC.js → session-catalog-ClS9xf6i.js} +1 -1
  232. package/dist/client/assets/{session-table-BUPq9Viy.js → session-table-BdpHs1GN.js} +1 -1
  233. package/dist/client/assets/{sliders-horizontal-CMe8Bay1.js → sliders-horizontal-R5pWUUcH.js} +1 -1
  234. package/dist/client/assets/{sparkles-_7cTZsIH.js → sparkles-DJOBD_8l.js} +1 -1
  235. package/dist/client/assets/{sse-Bb0EOcU9.js → sse-CxXt4tqI.js} +1 -1
  236. package/dist/client/assets/{tail-events-C12pfUax.js → tail-events-BdvqZHLr.js} +1 -1
  237. package/dist/client/assets/{terminal-xGf_F3y7.js → terminal-DJPUp_Qn.js} +1 -1
  238. package/dist/client/assets/{terminal-relay-BgfVJXIL.js → terminal-relay-TffuSPGs.js} +1 -1
  239. package/dist/client/assets/{terminal-takeover--05EYhJm.js → terminal-takeover-BOFPRPjR.js} +1 -1
  240. package/dist/client/assets/{use-conversation-list-DWX02INv.js → use-conversation-list-C-dPcjQe.js} +1 -1
  241. package/dist/client/assets/{use-fleet-active-asks-Cnwa4hTK.js → use-fleet-active-asks-BHzeBZSW.js} +1 -1
  242. package/dist/client/assets/{use-mesh-ops-items-BRFm37oY.js → use-mesh-ops-items-KmaauBr_.js} +1 -1
  243. package/dist/client/assets/{use-reduced-motion-C8cWvIZ3.js → use-reduced-motion-CYqhYqHO.js} +1 -1
  244. package/dist/client/assets/{use-scout-dev-flags-FkMreOOb.js → use-scout-dev-flags-BJbw87PK.js} +1 -1
  245. package/dist/client/assets/{useAgentHoverCard-DvPZSJK3.js → useAgentHoverCard-C6o0tlat.js} +1 -1
  246. package/dist/client/assets/useContentSecondaryNav-DjHBrgnS.js +1 -0
  247. package/dist/client/assets/{usePierreRuntime-C8WJ0X3F.js → usePierreRuntime-Cm7-qdm0.js} +1 -1
  248. package/dist/client/assets/{wrench-_tHBGTop.js → wrench-CvRjjByE.js} +1 -1
  249. package/dist/client/assets/{x-CrGUKNRv.js → x-C8ayPBtj.js} +1 -1
  250. package/dist/client/assets/{xterm-Ks-VlLTq.js → xterm-B0ci4Q9a.js} +1 -1
  251. package/dist/client/index.html +2 -2
  252. package/dist/main.mjs +348 -254
  253. package/dist/scout-web-server.mjs +2 -96660
  254. package/package.json +3 -3
  255. package/dist/client/assets/AgentLanesEmbedScreen-Br7cmZVO.js +0 -1
  256. package/dist/client/assets/AgentsSubnav-BV0WAgzf.js +0 -1
  257. package/dist/client/assets/OpsScreen-DHnT-Q9R.js +0 -1
  258. package/dist/client/assets/OpsSubnav-CJRD7MjM.js +0 -1
  259. package/dist/client/assets/ProjectAgentProfile-Be1VOkI4.js +0 -1
  260. package/dist/client/assets/ProjectsScreen-jruZRjgD.js +0 -1
  261. package/dist/client/assets/RepoDiffViewerLazy-b6vjYxez.js +0 -2
  262. package/dist/client/assets/SessionsScreen-HAjFvmIq.js +0 -1
  263. package/dist/client/assets/content-BQuEedeL.js +0 -1
  264. package/dist/client/assets/content-BUae-L_N.js +0 -1
  265. package/dist/client/assets/content-BfG98J1k.js +0 -1
  266. package/dist/client/assets/content-BkVTfkAC.js +0 -1
  267. package/dist/client/assets/content-BsNMos_d.js +0 -1
  268. package/dist/client/assets/content-CCn98eSk.js +0 -1
  269. package/dist/client/assets/content-CYnPp9yo.js +0 -1
  270. package/dist/client/assets/content-CcrUhm4P.js +0 -1
  271. package/dist/client/assets/content-CxuVONeQ.js +0 -1
  272. package/dist/client/assets/content-Dmq9n1_L.js +0 -1
  273. package/dist/client/assets/content-DskHP2NI.js +0 -1
  274. package/dist/client/assets/content-DvvzL2HK.js +0 -1
  275. package/dist/client/assets/content-snCAUbwv.js +0 -1
  276. package/dist/client/assets/conversation-motion-features-DPiGTO21.js +0 -1
  277. package/dist/client/assets/embed-entry-XUPb-AzL.js +0 -2
  278. package/dist/client/assets/index-9as_JTUs.css +0 -1
  279. package/dist/client/assets/index-DiiEQwdc.js +0 -1
  280. package/dist/client/assets/left-DrCbY6ja.js +0 -1
  281. package/dist/client/assets/resolve-panes-D4tlKNCT.js +0 -1
  282. package/dist/client/assets/resolve-sidebar-context-B27lj3Ci.js +0 -1
  283. package/dist/client/assets/useContentSecondaryNav-CNlrhvvx.js +0 -1
@@ -1 +1 @@
1
- import{j as l,r as d}from"./index-BZovGpDk.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-DiiEQwdc.js";import{a as Z}from"./api-h5zurxmi.js";import{u as N}from"./Provider-p-xuaAoE.js";import{A as U}from"./AgentDetailCard-Dtc02KUO.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
1
+ import{j as l,r as d}from"./index-DmFAhGPj.js";import{n as y,e as F,f as V,d as K}from"./colors-BtO5_zlx.js";import{r as T}from"./index-CmwGCxUk.js";import{a as Z}from"./api-h5zurxmi.js";import{u as N}from"./Provider-cJCdHAxu.js";import{A as U}from"./AgentDetailCard-BTiOmh-a.js";const X={workspace:"workspace",worktree:"workspace",branch:"workspace",profile:"profile",persona:"profile",harness:"harness",runtime:"harness",model:"model",node:"node",host:"node"};function G(e){return e.trim().replace(/^@+/,"").replace(/[.,!?;)\]]+$/,"")}function m(e){return e.trim().toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/-+/g,"-").replace(/^-+|-+$/g,"")}const Y="scout";function B(e){return X[m(e)]??null}function D(e){const n=m(e.definitionId),t=e.workspaceQualifier?m(e.workspaceQualifier):void 0,r=e.profile?m(e.profile):void 0,o=e.harness?m(e.harness):void 0,i=o==="oc"?"opencode":o,s=e.model?m(e.model):void 0,c=e.nodeQualifier?m(e.nodeQualifier):void 0;return n?{definitionId:n,...t?{workspaceQualifier:t}:{},...r?{profile:r}:{},...i?{harness:i}:{},...s?{model:s}:{},...c?{nodeQualifier:c}:{}}:null}function O(e){const n=e.split(".").filter(Boolean),t=n.shift();if(!t)return null;const r={definitionId:t},o=[];for(const i of n){if(i.includes(":")){const[s,c=""]=i.split(":",2),a=B(s),u=m(c);if(!a||!u)return null;a==="workspace"?r.workspaceQualifier=u:a==="profile"?r.profile=u:a==="harness"?r.harness=u:a==="model"?r.model=u:a==="node"&&(r.nodeQualifier=u);continue}o.push(i)}if(o.length===1){const i=m(o[0]);if(!i)return null;r.workspaceQualifier=i}else if(o.length===2){const i=m(o[0]),s=m(o[1]);if(!i||!s)return null;r.workspaceQualifier||(r.workspaceQualifier=i),r.nodeQualifier||(r.nodeQualifier=s)}else if(o.length>2)return null;return M(r,{raw:e})}function J(e){const n=e.indexOf("#"),t=e.indexOf("?");if(n===-1&&t===-1||e.indexOf("#",n+1)!==-1||e.indexOf("?",t+1)!==-1||n!==-1&&t!==-1&&t<n)return null;const r=Math.min(...[n,t].filter(a=>a>=0)),o=e.slice(0,r);if(!o)return null;const i=O(o);if(!i)return null;const s=n>=0?e.slice(n+1,t>=0?t:e.length):"",c=t>=0?e.slice(t+1):"";return n>=0&&!s||t>=0&&!c||s.includes("#")||s.includes("?")||c.includes("#")||c.includes("?")||i.harness&&s||i.model&&c?null:M({definitionId:i.definitionId,nodeQualifier:i.nodeQualifier,workspaceQualifier:i.workspaceQualifier,profile:i.profile,harness:s||i.harness,model:c||i.model},{raw:e})}function q(e){const n=G(e);return!n||n.includes("@")?null:n.includes("#")||n.includes("?")?J(n):O(n)}function L(e,n={}){const t=D(e);if(!t)return n.includeSigil===!1?"":"@";const o=[`${n.includeSigil===!1?"":"@"}${t.definitionId}`];return t.workspaceQualifier&&o.push(t.workspaceQualifier),t.profile&&o.push(`profile:${t.profile}`),t.harness&&o.push(`harness:${t.harness}`),t.model&&o.push(`model:${t.model}`),t.nodeQualifier&&o.push(`node:${t.nodeQualifier}`),o.join(".")}function M(e,n={}){const t=D(e);return t?{raw:n.raw??L(t,{includeSigil:!1}),label:L(t),definitionId:t.definitionId,...t.nodeQualifier?{nodeQualifier:t.nodeQualifier}:{},...t.workspaceQualifier?{workspaceQualifier:t.workspaceQualifier}:{},...t.profile?{profile:t.profile}:{},...t.harness?{harness:t.harness}:{},...t.model?{model:t.model}:{}}:null}function ee(e){return ne(e).parsed}function ne(e){const n=Array.from(e.matchAll(/(^|[\s([{'"`])@([a-z0-9][a-z0-9._/:-]*(?:#[a-z0-9][a-z0-9._/:-]*)?(?:\?[a-z0-9][a-z0-9._/:-]*)?)(?=$|[\s)\]}",.!?:;'"`])/gi)),t=new Map,r=[];for(const o of n){const i=o[2]??"",s=q(i);if(!s){i&&r.push(`@${i}`);continue}t.set(s.label,s)}return{parsed:Array.from(t.values()),unparsed:Array.from(new Set(r))}}const te=280,re=120,E=320,j=8,Q=new Map,ie=1e4;function p(e){const n=e?.trim().replace(/^@+/,"").toLowerCase();return n&&n.length>0?n:null}function W(e){const n=new Set,t=r=>{const o=p(r);o&&n.add(o)};return t(e.id),t(e.handle),t(e.name),t(e.selector),t(e.defaultSelector),t(e.definitionId),e.definitionId&&e.workspaceQualifier&&t(`${e.definitionId}.${e.workspaceQualifier}`),e.definitionId&&e.workspaceQualifier&&e.nodeQualifier&&(t(`${e.definitionId}.${e.workspaceQualifier}.${e.nodeQualifier}`),t(`${e.definitionId}.${e.workspaceQualifier}.node:${e.nodeQualifier}`)),e.definitionId&&e.nodeQualifier&&t(`${e.definitionId}.node:${e.nodeQualifier}`),n}function oe(e,n){const t=p(n.label),r=p(n.raw),o=W(e);return t&&o.has(t)||r&&o.has(r)?!0:n.definitionId&&p(e.definitionId)!==p(n.definitionId)||n.workspaceQualifier&&p(e.workspaceQualifier)!==p(n.workspaceQualifier)||n.nodeQualifier&&p(e.nodeQualifier)!==p(n.nodeQualifier)||n.harness&&p(e.harness)!==p(n.harness)||n.model&&p(e.model)!==p(n.model)?!1:!!n.definitionId}function _(e,n){const t=p(n.label),r=p(n.raw),o=W(e),i=t&&o.has(t)||r&&o.has(r)?1e3:0,s=[n.workspaceQualifier,n.nodeQualifier,n.harness,n.model,n.profile].filter(Boolean).length*100;y(e.state);const c=F(e.state,e)?30:V(e.state,e)?20:0;return i+s+c+Math.min(e.updatedAt??0,9999999999)/1e9}function se(e){const n=p(e.raw);return n&&n.split(".").length>=3?n:null}function H(e,n){const t=n.filter(r=>oe(r,e)).sort((r,o)=>_(o,e)-_(r,e));return t[0]?t[0]:null}async function le(e,n){const t=H(e,n),r=t?.id??se(e),o=r??e.label,i=Q.get(o);if(i&&Date.now()-i.fetchedAt<ie)return i.agent;if(!r)return Q.set(o,{agent:t,fetchedAt:Date.now()}),t;try{const s=await Z(`/api/agents/${encodeURIComponent(r)}`);return Q.set(o,{agent:s,fetchedAt:Date.now()}),s}catch{return Q.set(o,{agent:t,fetchedAt:Date.now()}),t}}function C(e){const n=window.innerWidth,t=window.innerHeight,r=Math.max(j,Math.min(n-E-j,e.left+e.width/2-E/2)),o=e.top-j;return o>200||e.bottom>t-200?{top:o,left:r,placement:"above"}:{top:e.bottom+j,left:r,placement:"below"}}function ae(e){let n=e;for(;n;){if(n instanceof HTMLElement&&n.dataset.scoutTheme)return n;n=n.parentElement??null}return document.body}function ce({identity:e,agent:n,triggerEl:t,onRequestClose:r}){const{agents:o,navigate:i}=N(),[s,c]=d.useState(()=>n??H(e,o)),[a,u]=d.useState(!n),[f,w]=d.useState(()=>C(t.getBoundingClientRect())),x=d.useRef(null),g=ae(t);d.useEffect(()=>{if(n){c(n),u(!1);return}let h=!1;return u(!0),le(e,o).then(I=>{h||(c(I),u(!1))}),()=>{h=!0}},[e,o,n]),d.useEffect(()=>{const h=()=>{w(C(t.getBoundingClientRect()))};return window.addEventListener("scroll",h,!0),window.addEventListener("resize",h),()=>{window.removeEventListener("scroll",h,!0),window.removeEventListener("resize",h)}},[t]),d.useEffect(()=>{const h=I=>{I.key==="Escape"&&r()};return window.addEventListener("keydown",h),()=>window.removeEventListener("keydown",h)},[r]);const k=d.useCallback(()=>{s&&(i({view:"agents-v2",agentId:s.id}),r())},[s,i,r]),b=f.placement==="above"?"bottom center":"top center",A=f.placement==="above"?"translateY(-100%)":"",$={position:"fixed",top:f.top,left:f.left,width:E,transform:A,transformOrigin:b};return s?T.createPortal(l.jsx("div",{onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx(U,{ref:x,agent:s,pinned:!0,onOpen:k,onClose:r,onAction:r,style:$,className:"agent-card--mention"})}),g):T.createPortal(l.jsx("div",{ref:x,className:"agent-card agent-card--pinned agent-card--mention",role:"dialog","aria-label":`${e.label} snapshot`,style:$,onMouseEnter:()=>{},onMouseLeave:r,children:l.jsx("div",{style:{fontSize:"12px",color:"var(--dim)",padding:"4px 2px"},children:a?"loading…":l.jsxs(l.Fragment,{children:["No agent registered as ",l.jsx("code",{children:e.label}),"."]})})}),g)}function ue(e){return M({definitionId:e.definitionId,workspaceQualifier:e.workspaceQualifier??void 0,nodeQualifier:e.nodeQualifier??void 0,harness:e.harness??void 0,model:e.model??void 0})}function fe(e){const{agent:n,identity:t}=e,[r,o]=d.useState(!1),[i,s]=d.useState(!1),c=d.useRef(null),a=d.useRef(null),u=d.useRef(null),f=d.useCallback(()=>{a.current!==null&&(window.clearTimeout(a.current),a.current=null),u.current!==null&&(window.clearTimeout(u.current),u.current=null)},[]),w=d.useCallback(()=>{r||(f(),a.current=window.setTimeout(()=>o(!0),te))},[r,f]),x=d.useCallback(()=>{i||(f(),u.current=window.setTimeout(()=>o(!1),re))},[i,f]),g=d.useCallback(()=>{f(),o(!1),s(!1)},[f]);d.useEffect(()=>()=>f(),[f]);const k=d.useMemo(()=>t??(n?ue(n):null),[t,n]),b=!!k,A=d.useCallback(v=>{if(v.preventDefault(),v.stopPropagation(),r&&i){g();return}f(),s(!0),o(!0)},[r,i,g,f]),$=d.useCallback(v=>{(v.key==="Enter"||v.key===" ")&&(v.preventDefault(),s(!0),o(!0))},[]),h=b?{ref:c,onMouseEnter:w,onMouseLeave:x,onFocus:w,onBlur:x,onClick:A,onKeyDown:$,"data-hover-open":r?"true":void 0,"aria-haspopup":"dialog","aria-expanded":r}:{ref:c},I=r&&c.current&&k?l.jsx(ce,{identity:k,agent:n??null,triggerEl:c.current,onRequestClose:()=>{i?g():x()}}):null;return{triggerProps:h,popover:I,open:r,pinned:i}}function de({identity:e,color:n}){const{triggerProps:t,popover:r}=fe({identity:e});return l.jsxs(l.Fragment,{children:[l.jsx("span",{...t,className:"s-mention",role:"button",tabIndex:0,style:{"--mention-color":n},children:e.label}),r]})}const pe=["ts","tsx","js","jsx","mjs","cjs","md","mdx","txt","log","json","jsonc","yaml","yml","toml","css","scss","html","htm","sh","py","rb","go","rs","swift","kt","java","c","cpp","h","png","jpg","jpeg","gif","svg","webp","avif","env","conf","ini","gitignore","sql","xml"],he=pe.join("|"),S=new RegExp(`\\.(?:${he})(?:$|[?#])`,"i"),me=/^(?:\/Users\/|\/home\/|\/Volumes\/|\/var\/|\/etc\/|\/opt\/|\/tmp\/|\/private\/|\/mnt\/|\/Applications\/|\/usr\/|\/Library\/)/u,we=/(?:^|[\s(\[`'"])((?:~\/|\.\/|\.\.\/|\/)[A-Za-z0-9._/\-]+|[A-Za-z0-9._\-]+(?:\/[A-Za-z0-9._\-]+)+)/g;function xe(e){return e.startsWith("~/")||e.startsWith("./")||e.startsWith("../")?!0:e.startsWith("/")&&me.test(e)||S.test(e)}function P(e){const n=[],t=new RegExp(we.source,"g");let r;for(;(r=t.exec(e))!==null;){const o=r[1];if(!o)continue;const i=o.replace(/[.,;:!?]+$/u,"");if(!i||!xe(i))continue;const s=r[0].lastIndexOf(o);if(s<0)continue;const c=r.index+s;n.push({start:c,end:c+i.length,path:i})}return n}function ge(e){return/\.(png|jpe?g|gif|svg|webp|avif)(?:$|[?#])/iu.test(e)}function ve(e){return e.endsWith("/")?!0:!(e.split("/").pop()??"").includes(".")&&!e.startsWith("./")&&!e.startsWith("../")}function ke({kind:e}){return e==="dir"?l.jsx("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:l.jsx("path",{d:"M2 5a1 1 0 0 1 1-1h3.5l1.5 1.5h5a1 1 0 0 1 1 1v5a1 1 0 0 1-1 1H3a1 1 0 0 1-1-1Z"})}):e==="image"?l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("rect",{x:"2",y:"3",width:"12",height:"10",rx:"1.5"}),l.jsx("circle",{cx:"6",cy:"7",r:"1"}),l.jsx("path",{d:"m3 12 3.5-3 2.5 2 3-2.5L14 11"})]}):l.jsxs("svg",{className:"s-path-token-icon",viewBox:"0 0 16 16",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":!0,children:[l.jsx("path",{d:"M4 2h5l3 3v9a1 1 0 0 1-1 1H4a1 1 0 0 1-1-1V3a1 1 0 0 1 1-1Z"}),l.jsx("path",{d:"M9 2v3h3"})]})}function R({path:e}){const{openFilePreview:n}=N(),t=ge(e)?"image":ve(e)?"dir":"file";return l.jsxs("button",{type:"button",className:"s-path-token",onClick:r=>{r.preventDefault(),r.stopPropagation(),n(e)},title:`Open ${e}`,children:[l.jsx(ke,{kind:t}),e]})}function Ie(e,n){if(n.length===0)return[{kind:"text",value:e}];const t=new Map;for(const s of n)t.set(s.label.toLowerCase(),s);const r=[];let o=e;const i=/@([a-z0-9][a-z0-9._/:-]*)/i;for(;o.length>0;){const s=i.exec(o);if(!s||s.index===void 0){r.push({kind:"text",value:o});break}s.index>0&&r.push({kind:"text",value:o.slice(0,s.index)});const c=s[0],a=c.toLowerCase(),u=t.get(a);u?r.push({kind:"mention",identity:u}):r.push({kind:"text",value:c}),o=o.slice(s.index+c.length)}return r}function $e(e,n){const t=[],r=/`([^`\n]+)`|\*\*(.+?)\*\*|\*([^*\s][^*]*?)\*|\[([^\]\n]+)\]\(([^)\s]+)\)|(https?:\/\/[^\s<>"')\]]+)/g;let o=0,i,s=0;const c=a=>{if(!a)return;const u=P(a);if(u.length===0){t.push(l.jsx("span",{children:a},`${n}-${s++}`));return}let f=0;for(const w of u)w.start>f&&t.push(l.jsx("span",{children:a.slice(f,w.start)},`${n}-${s++}`)),t.push(l.jsx(R,{path:w.path},`${n}-${s++}`)),f=w.end;f<a.length&&t.push(l.jsx("span",{children:a.slice(f)},`${n}-${s++}`))};for(;(i=r.exec(e))!==null;){if(i.index>o&&c(e.slice(o,i.index)),i[1]!==void 0){const a=i[1],u=P(` ${a}`);u.length===1&&u[0].path===a?t.push(l.jsx(R,{path:a},`${n}-${s++}`)):t.push(l.jsx("code",{className:"s-inline-code",children:a},`${n}-${s++}`))}else if(i[2]!==void 0)t.push(l.jsx("strong",{children:i[2]},`${n}-${s++}`));else if(i[3]!==void 0)t.push(l.jsx("em",{children:i[3]},`${n}-${s++}`));else if(i[4]!==void 0&&i[5]!==void 0&&z(i[5]))t.push(l.jsx("a",{className:"s-inline-link",href:i[5],target:"_blank",rel:"noreferrer",children:i[4]},`${n}-${s++}`));else if(i[6]!==void 0&&z(i[6])){const a=i[6].replace(/[.,;:!?]+$/u,""),u=i[6].slice(a.length);t.push(l.jsx("a",{className:"s-inline-link",href:a,target:"_blank",rel:"noreferrer",children:a},`${n}-${s++}`)),u&&t.push(l.jsx("span",{children:u},`${n}-${s++}`))}else t.push(l.jsx("span",{children:i[0]},`${n}-${s++}`));o=i.index+i[0].length}return o<e.length&&c(e.slice(o)),t.length>0?t:[l.jsx("span",{children:e},n)]}function z(e){return/^(?:https?:\/\/|mailto:|\/|#)/iu.test(e)}function Te(e){if(!e)return e??"";const n=ee(e);return Ie(e,n).flatMap((r,o)=>{if(r.kind==="text")return $e(r.value,o*100);const{identity:i}=r,c=i.definitionId===Y?"var(--accent)":K(i.definitionId);return l.jsx(de,{identity:i,color:c},o)})}export{Te as r};
@@ -1 +1 @@
1
- import{r as p}from"./index-BZovGpDk.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
1
+ import{r as p}from"./index-DmFAhGPj.js";const M={active:"active",moving:"moving",done:"done",archive:"archive"},b=["active","moving","done","archive"],h=300*1e3,O=1800*1e3,S=1440*60*1e3;function L(t,n=Date.now()){const o=n-u(t);return o<=h?"active":o<=O?"moving":o<=S?"done":"archive"}const i="openscout.meshOps.lastLookAt";function y(){if(typeof window>"u")return 0;try{const t=window.localStorage.getItem(i);return t?Number(t)||0:Date.now()}catch{return Date.now()}}function A(){if(!(typeof window>"u"))try{window.localStorage.setItem(i,String(Date.now()))}catch{}}function E(t,n){return u(t)>n}function v(t){if(t.labels.length>0)return t.labels[0];if(t.projectRoot){const n=t.projectRoot.split("/").filter(Boolean);return n[n.length-1]??t.projectRoot}return"unlabeled"}function u(t){return t.lastMeaningfulAt??t.updatedAt}const l="openscout.mesh-ops.lab.",r={lastLook:!0,routeStrip:!0,compact:!1,relays:!1,simulateHosts:!1};function m(){if(typeof window>"u")return r;const t=n=>{try{const o=window.localStorage.getItem(`${l}${n}`);return o===null?r[n]:o==="1"}catch{return r[n]}};return{lastLook:t("lastLook"),routeStrip:t("routeStrip"),compact:t("compact"),relays:t("relays"),simulateHosts:t("simulateHosts")}}function _(t,n){if(!(typeof window>"u"))try{window.localStorage.setItem(`${l}${t}`,n?"1":"0")}catch{}}let e={status:"idle",error:null,generatedAt:null,items:[],hosts:[],machineId:null,selectedItemId:null,groupBy:"family",attnFilter:null,unattributedOnly:!1,lab:m(),refreshToken:0};const a=new Set;function s(){for(const t of a)t()}function D(t){e={...e,status:"loading",error:null,machineId:t},s()}function R(t,n,o,c=[]){const f=e.selectedItemId!==null&&!n.some(d=>d.id===e.selectedItemId);e={...e,status:"ready",error:null,items:n,hosts:c,generatedAt:o,machineId:t,selectedItemId:f?null:e.selectedItemId},s()}function F(t,n){e={...e,status:"error",error:n,machineId:t},s()}function T(t){e.selectedItemId!==t&&(e={...e,selectedItemId:t},s())}function H(t){e.groupBy!==t&&(e={...e,groupBy:t},s())}function N(t){e.attnFilter!==t&&(e={...e,attnFilter:t},s())}function B(t){e.unattributedOnly!==t&&(e={...e,unattributedOnly:t},s())}function G(t){const n={...e.lab,[t]:!e.lab[t]};_(t,n[t]),e={...e,lab:n},s()}function P(){e={...e,refreshToken:e.refreshToken+1},s()}function g(t){return a.add(t),()=>{a.delete(t)}}function I(){return e}function W(){return p.useSyncExternalStore(g,I)}function k(){return e}export{b as M,T as a,A as b,u as c,M as d,N as e,v as f,H as g,G as h,E as i,P as j,D as k,R as l,k as m,F as n,y as r,B as s,L as t,W as u};
@@ -1 +1 @@
1
- import{r as d}from"./index-BZovGpDk.js";const u=new Set(["in_turn","in_flight","needs_attention","callable","blocked"]),l="openscout.mesh.machinePositions.v1";function f(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(l);if(!e)return{};const n=JSON.parse(e);if(n&&typeof n=="object"){const i={};for(const[c,o]of Object.entries(n))o&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"&&(i[c]={x:o.x,y:o.y});return i}}catch{}return{}}function r(e){if(!(typeof window>"u"))try{window.localStorage.setItem(l,JSON.stringify(e))}catch{}}let t={mode:"map",density:"comfortable",selectedId:null,selectedType:null,meshSnapshot:null,probeCache:{},query:"",stateFilter:"all",agentStateFilters:u,hiddenMachineIds:new Set,collapsedMachineIds:new Set,treeFullMachineIds:new Set,scrollTargetMachineId:null,machinePositions:f()};const a=new Set;function s(){for(const e of a)e()}function p(e){t.mode!==e&&(t={...t,mode:e},s())}function g(e){t.density!==e&&(t={...t,density:e},s())}function w(e,n){t.selectedId===e&&t.selectedType===n||(t={...t,selectedId:e,selectedType:n},s())}function y(e){t={...t,meshSnapshot:e},s()}function I(e){t.query!==e&&(t={...t,query:e},s())}function b(e){t.stateFilter!==e&&(t={...t,stateFilter:e},s())}function T(e){const n=new Set(t.agentStateFilters);n.has(e)?n.delete(e):n.add(e),t={...t,agentStateFilters:n},s()}function x(e){const n=new Set(t.treeFullMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,treeFullMachineIds:n},s()}function P(e){const n=new Set(t.hiddenMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,hiddenMachineIds:n},s()}function _(e,n){const i=new Set;for(const c of n)c!==e&&i.add(c);t={...t,hiddenMachineIds:i},s()}function m(){t.hiddenMachineIds.size!==0&&(t={...t,hiddenMachineIds:new Set},s())}function F(e){const n=new Set(t.collapsedMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,collapsedMachineIds:n},s()}function A(e,n){const i={...t.machinePositions,[e]:n};t={...t,machinePositions:i},r(i),s()}function O(){if(Object.keys(t.machinePositions).length===0)return;const e={};t={...t,machinePositions:e},r(e),s()}function E(e){t={...t,scrollTargetMachineId:e},s(),queueMicrotask(()=>{t.scrollTargetMachineId===e&&(t={...t,scrollTargetMachineId:null},s())})}function h(e){return a.add(e),()=>{a.delete(e)}}function S(){return t}function j(){return d.useSyncExternalStore(h,S)}export{w as a,F as b,A as c,O as d,p as e,g as f,I as g,b as h,T as i,m as j,x as k,_ as l,E as r,y as s,P as t,j as u};
1
+ import{r as d}from"./index-DmFAhGPj.js";const u=new Set(["in_turn","in_flight","needs_attention","callable","blocked"]),l="openscout.mesh.machinePositions.v1";function f(){if(typeof window>"u")return{};try{const e=window.localStorage.getItem(l);if(!e)return{};const n=JSON.parse(e);if(n&&typeof n=="object"){const i={};for(const[c,o]of Object.entries(n))o&&typeof o=="object"&&typeof o.x=="number"&&typeof o.y=="number"&&(i[c]={x:o.x,y:o.y});return i}}catch{}return{}}function r(e){if(!(typeof window>"u"))try{window.localStorage.setItem(l,JSON.stringify(e))}catch{}}let t={mode:"map",density:"comfortable",selectedId:null,selectedType:null,meshSnapshot:null,probeCache:{},query:"",stateFilter:"all",agentStateFilters:u,hiddenMachineIds:new Set,collapsedMachineIds:new Set,treeFullMachineIds:new Set,scrollTargetMachineId:null,machinePositions:f()};const a=new Set;function s(){for(const e of a)e()}function p(e){t.mode!==e&&(t={...t,mode:e},s())}function g(e){t.density!==e&&(t={...t,density:e},s())}function w(e,n){t.selectedId===e&&t.selectedType===n||(t={...t,selectedId:e,selectedType:n},s())}function y(e){t={...t,meshSnapshot:e},s()}function I(e){t.query!==e&&(t={...t,query:e},s())}function b(e){t.stateFilter!==e&&(t={...t,stateFilter:e},s())}function T(e){const n=new Set(t.agentStateFilters);n.has(e)?n.delete(e):n.add(e),t={...t,agentStateFilters:n},s()}function x(e){const n=new Set(t.treeFullMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,treeFullMachineIds:n},s()}function P(e){const n=new Set(t.hiddenMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,hiddenMachineIds:n},s()}function _(e,n){const i=new Set;for(const c of n)c!==e&&i.add(c);t={...t,hiddenMachineIds:i},s()}function m(){t.hiddenMachineIds.size!==0&&(t={...t,hiddenMachineIds:new Set},s())}function F(e){const n=new Set(t.collapsedMachineIds);n.has(e)?n.delete(e):n.add(e),t={...t,collapsedMachineIds:n},s()}function A(e,n){const i={...t.machinePositions,[e]:n};t={...t,machinePositions:i},r(i),s()}function O(){if(Object.keys(t.machinePositions).length===0)return;const e={};t={...t,machinePositions:e},r(e),s()}function E(e){t={...t,scrollTargetMachineId:e},s(),queueMicrotask(()=>{t.scrollTargetMachineId===e&&(t={...t,scrollTargetMachineId:null},s())})}function h(e){return a.add(e),()=>{a.delete(e)}}function S(){return t}function j(){return d.useSyncExternalStore(h,S)}export{w as a,F as b,A as c,O as d,p as e,g as f,I as g,b as h,T as i,m as j,x as k,_ as l,E as r,y as s,P as t,j as u};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DCq_3fQn.js";const c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],a=e("message-circle",c);export{a as M};
1
+ import{c as e}from"./createLucideIcon-CFBn0Sdk.js";const c=[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]],a=e("message-circle",c);export{a as M};
@@ -1,4 +1,4 @@
1
- import{j as i}from"./index-BZovGpDk.js";import{r as c}from"./mentions-BjXfeF7t.js";const h=/^```([a-z0-9_-]+)?\s*$/iu,E=/^(#{1,6})\s+(.+)$/u,L=/^(?:-{3,}|\*{3,}|_{3,})$/u,_=/^\s*[-*]\s+(.+)$/u,M=/^\s*\d+[.)]\s+(.+)$/u,w=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function B(e){return/[\r\n]/u.test(e)||!(/(?:(?:\\r)?\\n){2}/u.test(e)||/(?:\\r)?\\n(?=\s*(?:#{1,6}\s|[-*+]\s|>\s|\d+[.)]\s|[A-Z][A-Za-z ]{0,40}:))/u.test(e))?e:e.replace(/\\r\\n|\\n|\\r/gu,`
1
+ import{j as i}from"./index-DmFAhGPj.js";import{r as c}from"./mentions-agCGDgyA.js";const h=/^```([a-z0-9_-]+)?\s*$/iu,E=/^(#{1,6})\s+(.+)$/u,L=/^(?:-{3,}|\*{3,}|_{3,})$/u,_=/^\s*[-*]\s+(.+)$/u,M=/^\s*\d+[.)]\s+(.+)$/u,w=/^\|?\s*:?-{3,}:?\s*(?:\|\s*:?-{3,}:?\s*)+\|?$/u;function B(e){return/[\r\n]/u.test(e)||!(/(?:(?:\\r)?\\n){2}/u.test(e)||/(?:\\r)?\\n(?=\s*(?:#{1,6}\s|[-*+]\s|>\s|\d+[.)]\s|[A-Z][A-Za-z ]{0,40}:))/u.test(e))?e:e.replace(/\\r\\n|\\n|\\r/gu,`
2
2
  `)}function P(e){const s=B(e).replace(/\r\n?/gu,`
3
3
  `).trim();return s?s.replace(/([^\n])\s+---\s+(?=(?:#{1,6}\s|\*\*|[A-Z0-9]))/gu,`$1
4
4
 
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DCq_3fQn.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],o=a("message-square",e);export{o as M};
1
+ import{c as a}from"./createLucideIcon-CFBn0Sdk.js";const e=[["path",{d:"M22 17a2 2 0 0 1-2 2H6.828a2 2 0 0 0-1.414.586l-2.202 2.202A.71.71 0 0 1 2 21.286V5a2 2 0 0 1 2-2h16a2 2 0 0 1 2 2z",key:"18887p"}]],o=a("message-square",e);export{o as M};
@@ -1 +1 @@
1
- import{r as o}from"./index-BZovGpDk.js";const c=[{label:"5m",value:5*6e4},{label:"30m",value:30*6e4},{label:"4h",value:240*6e4},{label:"24h",value:1440*6e4}];let t={activityFilter:"active",sourceFilter:"all",activityWindowMs:c[3].value,groupMode:"activity",query:"",focusedId:null,revealRequest:null,visibleAgents:[],selectedIds:[]};const u=new Set;let a=0;function s(){for(const e of u)e()}function I(e){t.activityFilter!==e&&(t={...t,activityFilter:e},s())}function g(e){t.sourceFilter!==e&&(t={...t,sourceFilter:e},s())}function y(e){t.activityWindowMs!==e&&(t={...t,activityWindowMs:e},s())}function A(e){t.groupMode!==e&&(t={...t,groupMode:e},s())}function S(e){t.query!==e&&(t={...t,query:e},s())}function h(e){t.focusedId!==e&&(t={...t,focusedId:e},s())}function b(e){a+=1,t={...t,revealRequest:{id:e,serial:a}},s()}function p(e){t.revealRequest?.serial===e&&(t={...t,revealRequest:null},s())}function f(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],l=n[i];if(r.id!==l.id||r.state!==l.state||r.updatedAt!==l.updatedAt||r.activity!==l.activity||r.lastActiveAt!==l.lastActiveAt)return!1}return!0}function q(e){f(t.visibleAgents,e)||(t={...t,visibleAgents:e},s())}function _(e){const n=t.selectedIds.includes(e);t={...t,selectedIds:n?t.selectedIds.filter(i=>i!==e):[...t.selectedIds,e]},s()}function R(){t.selectedIds.length!==0&&(t={...t,selectedIds:[]},s())}function d(e){return u.add(e),()=>{u.delete(e)}}function v(){return t}function F(){return o.useSyncExternalStore(d,v)}export{c as M,S as a,I as b,y as c,A as d,R as e,q as f,p as g,h,b as r,g as s,_ as t,F as u};
1
+ import{r as o}from"./index-DmFAhGPj.js";const c=[{label:"5m",value:5*6e4},{label:"30m",value:30*6e4},{label:"4h",value:240*6e4},{label:"24h",value:1440*6e4}];let t={activityFilter:"active",sourceFilter:"all",activityWindowMs:c[3].value,groupMode:"activity",query:"",focusedId:null,revealRequest:null,visibleAgents:[],selectedIds:[]};const u=new Set;let a=0;function s(){for(const e of u)e()}function I(e){t.activityFilter!==e&&(t={...t,activityFilter:e},s())}function g(e){t.sourceFilter!==e&&(t={...t,sourceFilter:e},s())}function y(e){t.activityWindowMs!==e&&(t={...t,activityWindowMs:e},s())}function A(e){t.groupMode!==e&&(t={...t,groupMode:e},s())}function S(e){t.query!==e&&(t={...t,query:e},s())}function h(e){t.focusedId!==e&&(t={...t,focusedId:e},s())}function b(e){a+=1,t={...t,revealRequest:{id:e,serial:a}},s()}function p(e){t.revealRequest?.serial===e&&(t={...t,revealRequest:null},s())}function f(e,n){if(e===n)return!0;if(e.length!==n.length)return!1;for(let i=0;i<e.length;i++){const r=e[i],l=n[i];if(r.id!==l.id||r.state!==l.state||r.updatedAt!==l.updatedAt||r.activity!==l.activity||r.lastActiveAt!==l.lastActiveAt)return!1}return!0}function q(e){f(t.visibleAgents,e)||(t={...t,visibleAgents:e},s())}function _(e){const n=t.selectedIds.includes(e);t={...t,selectedIds:n?t.selectedIds.filter(i=>i!==e):[...t.selectedIds,e]},s()}function R(){t.selectedIds.length!==0&&(t={...t,selectedIds:[]},s())}function d(e){return u.add(e),()=>{u.delete(e)}}function v(){return t}function F(){return o.useSyncExternalStore(d,v)}export{c as M,S as a,I as b,y as c,A as d,R as e,q as f,p as g,h,b as r,g as s,_ as t,F as u};
@@ -1 +1 @@
1
- import{r}from"./index-BZovGpDk.js";import{a as L}from"./api-h5zurxmi.js";import{a as S}from"./colors-BtO5_zlx.js";import{i as y,o as E}from"./surface-activity-B1rgWB1i.js";const _=1e4,b=6e4;function O(t,s){const[p,i]=r.useState({}),c=s?.enabled??!0,o=r.useRef(!0),f=r.useRef(!1),l=r.useRef(!1),u=s?.pauseWhenHidden??!1,d=t.map(e=>e.id.trim()).filter(e=>e.length>0).join(","),I=t.some(e=>S(e.state))?s?.activeIntervalMs??_:s?.idleIntervalMs??b,n=r.useCallback(async()=>{if(c){if(t.length===0){i({});return}if(!(u&&!y())){if(f.current){l.current=!0;return}f.current=!0;try{const e=d?`?ids=${encodeURIComponent(d)}`:"",v=await L(`/api/observe/agents${e}`);if(!o.current)return;i(h=>{const m={};for(const a of t)m[a.id]=h[a.id];for(const a of v){const{agentId:R,...A}=a;m[R]=A}return m})}finally{f.current=!1,l.current&&(l.current=!1,n())}}}},[d,t,c,u]);return r.useEffect(()=>{if(o.current=!0,!c||t.length===0)return i({}),()=>{o.current=!1};n();const e=setInterval(()=>{n()},I),v=u?E(()=>{n()}):null;return()=>{o.current=!1,clearInterval(e),v?.()}},[t.length,c,n,u,I]),p}export{O as u};
1
+ import{r}from"./index-DmFAhGPj.js";import{a as L}from"./api-h5zurxmi.js";import{a as S}from"./colors-BtO5_zlx.js";import{i as y,o as E}from"./surface-activity-B1rgWB1i.js";const _=1e4,b=6e4;function O(t,s){const[p,i]=r.useState({}),c=s?.enabled??!0,o=r.useRef(!0),f=r.useRef(!1),l=r.useRef(!1),u=s?.pauseWhenHidden??!1,d=t.map(e=>e.id.trim()).filter(e=>e.length>0).join(","),I=t.some(e=>S(e.state))?s?.activeIntervalMs??_:s?.idleIntervalMs??b,n=r.useCallback(async()=>{if(c){if(t.length===0){i({});return}if(!(u&&!y())){if(f.current){l.current=!0;return}f.current=!0;try{const e=d?`?ids=${encodeURIComponent(d)}`:"",v=await L(`/api/observe/agents${e}`);if(!o.current)return;i(h=>{const m={};for(const a of t)m[a.id]=h[a.id];for(const a of v){const{agentId:R,...A}=a;m[R]=A}return m})}finally{f.current=!1,l.current&&(l.current=!1,n())}}}},[d,t,c,u]);return r.useEffect(()=>{if(o.current=!0,!c||t.length===0)return i({}),()=>{o.current=!1};n();const e=setInterval(()=>{n()},I),v=u?E(()=>{n()}):null;return()=>{o.current=!1,clearInterval(e),v?.()}},[t.length,c,n,u,I]),p}export{O as u};
@@ -1 +1 @@
1
- import{r as u}from"./index-BZovGpDk.js";let e={hover:null,content:null};const n=new Set;function s(){for(const t of n)t()}function i(t){return n.add(t),()=>{n.delete(t)}}function r(){return e}function c(){return u.useSyncExternalStore(i,r,r)}function o(t){e.hover!==t&&(e={...e,hover:t},s())}function f(t){return!t||!t.route&&!t.label?{onPointerEnter:void 0,onPointerLeave:void 0}:{onPointerEnter:()=>o(t),onPointerLeave:()=>{e.hover===t&&o(null)}}}export{f as s,c as u};
1
+ import{r as u}from"./index-DmFAhGPj.js";let e={hover:null,content:null};const n=new Set;function s(){for(const t of n)t()}function i(t){return n.add(t),()=>{n.delete(t)}}function r(){return e}function c(){return u.useSyncExternalStore(i,r,r)}function o(t){e.hover!==t&&(e={...e,hover:t},s())}function f(t){return!t||!t.route&&!t.label?{onPointerEnter:void 0,onPointerLeave:void 0}:{onPointerEnter:()=>o(t),onPointerLeave:()=>{e.hover===t&&o(null)}}}export{f as s,c as u};
@@ -1 +1 @@
1
- import{c}from"./createLucideIcon-DCq_3fQn.js";const a=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],o=c("paperclip",a);export{o as P};
1
+ import{c}from"./createLucideIcon-CFBn0Sdk.js";const a=[["path",{d:"m16 6-8.414 8.586a2 2 0 0 0 2.829 2.829l8.414-8.586a4 4 0 1 0-5.657-5.657l-8.379 8.551a6 6 0 1 0 8.485 8.485l8.379-8.551",key:"1miecu"}]],o=c("paperclip",a);export{o as P};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DCq_3fQn.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);export{c as P};
1
+ import{c as e}from"./createLucideIcon-CFBn0Sdk.js";const o=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],c=e("plus",o);export{c as P};
@@ -1 +1 @@
1
- import{r as u,j as s}from"./index-BZovGpDk.js";import{A as Z}from"./AgentAvatar-CneOa70z.js";import{a as B}from"./api-h5zurxmi.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{e as q}from"./NewChatComposer-DKlNX1UA.js";import{b as Q,r as ss,s as es,a as ts}from"./session-catalog-DC6BlBBC.js";import{u as X}from"./sse-Bb0EOcU9.js";import{t as K}from"./time-Dhsh_2EG.js";import{B as ls}from"./BackToPicker-D6WgIDb-.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-p-xuaAoE.js";import{ConversationScreen as cs}from"./ConversationScreen-Br0QQ3xo.js";import{S as ds}from"./SessionObserve-B-SkP3tu.js";import{H as ns}from"./HarnessMark-DrE57dUq.js";/* empty css */import{AgentDefinitionsWorkspace as ms}from"./AgentDefinitionsWorkspace-0Y3kqMtv.js";import{AgentEssentialsGlyph as ps}from"./agent-essentials-CuK4G_zS.js";import{b as us,p as z,n as as}from"./model-Co0zkMIc.js";import"./SpriteAvatar-CEYdCzem.js";import"./agent-identity-BxCsXnDp.js";import"./colors-BtO5_zlx.js";import"./runtime-picker-BXKJbLot.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./createLucideIcon-DCq_3fQn.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./index-DiiEQwdc.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./keyboard-nav-CHo_xmjw.js";import"./x-CrGUKNRv.js";import"./chevron-down-BVg09D6U.js";import"./search-1QMVOxF3.js";import"./file-text-BITQqGtF.js";import"./terminal-relay-BgfVJXIL.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./chevron-right-CaEwYkxE.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./ConversationComposer-CjRXFkvY.js";import"./message-markup-DlVX-iuc.js";import"./mentions-BjXfeF7t.js";import"./AgentDetailCard-Dtc02KUO.js";import"./AgentLiveActions-DwScaVRF.js";import"./terminal-takeover--05EYhJm.js";import"./eye-DkU59kfl.js";import"./terminal-xGf_F3y7.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-CRmdtuL7.js";import"./ConversationFeedRows-CgRTIpAv.js";import"./ConversationPanels-DCkcLIHk.js";import"./use-reduced-motion-C8cWvIZ3.js";import"./activity-DS0u0Itf.js";import"./message-circle-BwVx5X0q.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-C12pfUax.js";import"./ConversationStatus-BJ1CMbAv.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-BkBcDYm-.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BlmGoxCE.js";import"./ObserveTextFlow-DWNlmTVm.js";import"./SessionObserveEvidence-CF5jnH3-.js";import"./wrench-_tHBGTop.js";import"./external-link-Dd8xaveL.js";import"./text-DsBWV_4k.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Fwt8_KmD.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-dev-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ws({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ys({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const N=r?.data,v=(N?.events??[]).filter(bs),w=v.filter(g=>g.kind==="tool"),S=w.filter(g=>g.tool==="edit"||g.tool==="write"),y=w.filter(g=>g.tool==="read"),f=N?.files.length??0,b=N?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||f>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(b??$)},{k:"tools",v:U(w.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(y.length)},{k:"files",v:U(f)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=N?.metadata?.usage,a=_(D,{model:N?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,j=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(j&&j!==t.id?t.id:null),M=j??t.id,W=j&&t.harness==="codex"?"codex session id":j&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?z(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(ws,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function rt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=ss(e,o),x=u.useMemo(()=>es(o?.sessions??[],h),[o?.sessions,h]),N=x.find(n=>n.id===h)??null,I=N?.model??null,v=N?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[y,f]=u.useState("idle"),[b,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{f("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ts(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),j=n.sessionId?.trim();if(j){F(i,{view:"sessions",sessionId:j},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{f("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,size:46,tile:!0,presence:!1})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(ps,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled:y==="starting",onClick:T,children:y==="starting"?"Starting...":"+ New session"}),b&&s.jsx("div",{className:"s-sess-action-error",children:b}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const j=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=j?"now":n.endedAt?`ended · ${K(n.endedAt)||"recent"}`:K(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${j?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:j?"var(--accent)":"var(--dim)",opacity:j?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?z(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${j?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ys,{agentId:e.id,session:n,active:j,onPrimary:()=>j?void E():O(n),primaryLabel:j?"Continue":"Resume",primaryTitle:j?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?z(t.cwd):"main"),N=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?z(t.cwd):null)??e.name,w=r?.data.metadata?.usage??null,S=w?.assistantMessages??null,y=_(w,{model:r?.data.metadata?.session?.model??N,adapterType:I}),f=y?Math.min(100,y.pct):null,b=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?K(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":b,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":b,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,N?` · ${N}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[f!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),f,"%"]}):null,w&&(w.inputTokens||w.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(w.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=ss(e,o),h=u.useMemo(()=>es(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,N=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ts(e.id,r,l,h,N),v=Q(N,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const w=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,y=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,f=e.handle?.trim().replace(/^@+/,"")||null,b=f?`@${f}`:t,$=f&&t.toLowerCase()!==f.toLowerCase()?t:[e.project?`/${e.project}`:null,e.branch,w].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,size:48,tile:!0,presence:!1}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[s.jsx("h1",{className:"ap-profileName",title:b,children:b}),e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:e.harness,size:13})}):null]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),f&&t.toLowerCase()!==f.toLowerCase()?s.jsx("span",{className:"ap-profileId",title:e.id,children:t}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${K(a.endedAt)||"recent"}`:K(a.startedAt)||"recent",O=a.cwd?z(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,j=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,j,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,y?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:y})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null]})]})]})]})}function lt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=us(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[N,I]=u.useState(null),{route:v}=G(),w=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(w,N?.sessions??[])??w,y=u.useCallback(async()=>{const b=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(b)},[e.id]),f=u.useCallback(async()=>{x(!0);try{const b=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${b?`?${b}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),y();const b=window.setTimeout(()=>{y()},3e3);return()=>window.clearTimeout(b)},[y]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&f()},[i,f]),X(()=>{y(),i==="observe"&&f()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const b=setInterval(()=>{f()},2500);return()=>clearInterval(b)},[i,p?.data.live,f]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:N,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:N,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ms,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ds,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(cs,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function ct({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(ls,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{lt as AgentDetailWithRail,ct as AgentProfileBar,rt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
1
+ import{r as u,j as s}from"./index-DmFAhGPj.js";import{A as Z}from"./AgentAvatar-D8ZtMluU.js";import{a as B}from"./api-h5zurxmi.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{e as q}from"./NewChatComposer-Hd7pI5Ac.js";import{b as Q,r as ss,s as es,a as ts}from"./session-catalog-ClS9xf6i.js";import{u as X}from"./sse-CxXt4tqI.js";import{t as K}from"./time-Dhsh_2EG.js";import{B as ls}from"./BackToPicker-D1LV6Cqp.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-cJCdHAxu.js";import{ConversationScreen as cs}from"./ConversationScreen-B3l2m3JI.js";import{S as ds}from"./SessionObserve-yYA8Gy5s.js";import{H as ns}from"./HarnessMark-BPAphNjx.js";/* empty css */import{AgentDefinitionsWorkspace as ms}from"./AgentDefinitionsWorkspace-CfaDVCVt.js";import{AgentEssentialsGlyph as ps}from"./agent-essentials-B3wcxg_v.js";import{b as us,p as z,n as as}from"./model-Co0zkMIc.js";import"./SpriteAvatar-DS6Tmyua.js";import"./agent-identity-BxCsXnDp.js";import"./colors-BtO5_zlx.js";import"./runtime-picker--IW3cRry.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-d6PKL_KD.js";import"./createLucideIcon-CFBn0Sdk.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./index-CmwGCxUk.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DmuJ32wa.js";import"./keyboard-nav-h1IdakpD.js";import"./x-C8ayPBtj.js";import"./chevron-down-B3VVRJcV.js";import"./search-DAyagUtF.js";import"./file-text-DcYSrI4v.js";import"./terminal-relay-TffuSPGs.js";import"./router-Cn_s9IGH.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CHIuVKz7.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./TextDocumentSurface-BWJCGBZf.js";/* empty css */import"./chevron-right-BYMV1511.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./ConversationComposer-Bf7Ga_49.js";import"./message-markup-CyRDLdOn.js";import"./mentions-agCGDgyA.js";import"./AgentDetailCard-BTiOmh-a.js";import"./AgentLiveActions-BJ5dIfL3.js";import"./terminal-takeover-BOFPRPjR.js";import"./eye-1J4yOUoG.js";import"./terminal-DJPUp_Qn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-B_GXrKR0.js";import"./ConversationFeedRows-Cm1Lgo43.js";import"./ConversationPanels-BTBbEvrP.js";import"./use-reduced-motion-CYqhYqHO.js";import"./activity-CC8JzJNH.js";import"./message-circle-CJO-pi7b.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-BdvqZHLr.js";import"./ConversationStatus-BqhUHD85.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-B7KdvQvf.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CaSZZP05.js";import"./ObserveTextFlow-CkMrtT8s.js";import"./SessionObserveEvidence-cHdjYOJe.js";import"./wrench-CvRjjByE.js";import"./external-link-B1TI5yIt.js";import"./text-DsBWV_4k.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-9Bveqm9c.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-dev-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function ws({buckets:e,emptyTitle:t,emptyDetail:o}){if(e.length===0)return s.jsxs("div",{className:"s-sum-observed-empty",children:[s.jsx("span",{children:t}),s.jsx("strong",{children:o})]});const c=Math.max(...e,1),i=240,m=20,r=1,p=(i-r*(e.length-1))/e.length;return s.jsxs("div",{className:"s-sum-spark",children:[s.jsx("svg",{viewBox:`0 0 ${i} ${m}`,preserveAspectRatio:"none",className:"s-sum-spark-svg","aria-hidden":!0,children:e.map((l,h)=>{const x=Math.max(1,l/c*m);return s.jsx("rect",{x:h*(p+r),y:m-x,width:p,height:x,fill:"var(--accent)",opacity:.22+.62*(l/c)},h)})}),s.jsxs("div",{className:"s-sum-spark-axis",children:[s.jsx("span",{children:"session start"}),s.jsx("span",{children:"now"})]})]})}function ys({agentId:e,session:t,active:o,onPrimary:c,primaryLabel:i,primaryTitle:m}){const[r,p]=u.useState(null),[l,h]=u.useState(null),x=u.useCallback(async()=>{const g=new URLSearchParams({sessionId:t.id}),[P,J]=await Promise.all([B(`/api/agents/${encodeURIComponent(e)}/observe?${g}`).catch(()=>null),B(`/api/agents/${encodeURIComponent(e)}/session/context`).catch(()=>null)]);p(P),h(J)},[e,t.id]);u.useEffect(()=>{x()},[x]),X(()=>{x()});const N=r?.data,v=(N?.events??[]).filter(bs),w=v.filter(g=>g.kind==="tool"),S=w.filter(g=>g.tool==="edit"||g.tool==="write"),y=w.filter(g=>g.tool==="read"),f=N?.files.length??0,b=N?.metadata?.session?.turnCount,$=l?.activeSessionId===t.id?l.turnCount:void 0,C=v.length>0||f>0,d=r?r.source==="unavailable"?"unavailable":C?"observed":"waiting":"loading",R=d==="loading"?"Loading trace":d==="unavailable"?"No trace source":"Session created",L=d==="loading"?"checking for terminal or transcript activity":d==="unavailable"?"this session has no observable transcript attached":"no agent work has been recorded yet",H=[{k:"turns",v:U(b??$)},{k:"tools",v:U(w.length)},{k:"edits",v:U(S.length)},{k:"reads",v:U(y.length)},{k:"files",v:U(f)},{k:"window",v:js(v.length>0?v[v.length-1].t:0)}],D=N?.metadata?.usage,a=_(D,{model:N?.metadata?.session?.model??t.model,adapterType:t.harness}),E=a?`${a.usedLabel} / ${a.budgetLabel} ctx`:l?Y(l):"context",T=a?`${a.pct}%${a.overLimit?" over":""}`:"tokens unavailable",O=l&&l.sessionAgeMs!==null?hs(l.sessionAgeMs):null,A=a&&l?`${Y(l)}${O?` · ${O}`:""}`:O,n=r?.sessionId?.trim()||r?.data.metadata?.session?.externalSessionId?.trim()||r?.data.metadata?.session?.threadId?.trim()||null,j=t.harnessSessionId?.trim()||t.threadId?.trim()||t.externalSessionId?.trim()||(o?n:null)||null,k=t.runtimeSessionId?.trim()||t.surfaceSessionId?.trim()||(j&&j!==t.id?t.id:null),M=j??t.id,W=j&&t.harness==="codex"?"codex session id":j&&t.harness?`${t.harness} session id`:t.id.startsWith("relay-")?"runtime id":"session id",V=t.cwd?z(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(ws,{buckets:Ns(v),emptyTitle:R,emptyDetail:L})]}),s.jsxs("div",{className:"s-sum-col s-sum-col--context",children:[s.jsx("div",{className:"s-sum-label",children:"Context"}),s.jsxs("div",{className:"s-sum-ctx-head",children:[s.jsx("span",{className:"s-sum-ctx-size",children:E}),s.jsx("span",{className:"s-sum-ctx-pct",children:T})]}),a?s.jsx("div",{className:"s-sum-gauge","aria-label":`Context ${a.pct}%`,children:s.jsx("div",{className:"s-sum-gauge-fill",style:{width:`${rs(a)}%`}})}):s.jsx("div",{className:"s-sum-ctx-unavailable",children:"No token-window usage yet"}),A&&s.jsx("div",{className:"s-sum-ctx-runway",children:A})]})]}),s.jsxs("div",{className:"s-sum-foot",children:[C?s.jsx("div",{className:"s-sum-stats",children:H.map((g,P)=>s.jsxs("span",{className:"s-sum-stat",children:[P>0&&s.jsx("span",{className:"s-sum-stat-sep",children:"·"}),s.jsx("span",{className:"s-sum-stat-v",children:g.v}),s.jsx("span",{className:"s-sum-stat-k",children:g.k})]},g.k))}):s.jsx("div",{className:"s-sum-status-note",children:o?"The session exists, but no turn/tool/file activity has reached Scout yet.":"This prior session has no observable work trace."}),s.jsx("button",{type:"button",className:"s-sess-explore-primary",onClick:c,title:m,children:i})]})]})}function rt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=ss(e,o),x=u.useMemo(()=>es(o?.sessions??[],h),[o?.sessions,h]),N=x.find(n=>n.id===h)??null,I=N?.model??null,v=N?.reasoningEffort??e.reasoningEffort??null,S=[!!(I&&I!==e.model)&&I?`Session model: ${I}`:null,v?`Effort: ${v}`:null].filter(Boolean).join(" · ")||null,[y,f]=u.useState("idle"),[b,$]=u.useState(null),[C,d]=u.useState("idle"),[R,L]=u.useState(null);u.useEffect(()=>{f("idle"),$(null),d("idle"),L(null)},[e.id]);const H=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,D=ts(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),j=n.sessionId?.trim();if(j){F(i,{view:"sessions",sessionId:j},{returnTo:m});return}const k=n.conversationId?.trim();if(!k)throw new Error("Session started, but no conversation was returned.");i({view:r,agentId:n.agentId?.trim()||e.id,conversationId:k,tab:"message"})}catch(n){$(n instanceof Error?n.message:"Could not start a new session.")}finally{f("idle")}}},O=n=>F(i,{view:"sessions",sessionId:n.id},{returnTo:m}),A=n=>{l(e.id,n)};return s.jsxs("div",{className:"s-sess-root",children:[s.jsxs("header",{className:"s-sess-head",children:[s.jsxs("div",{className:"s-sess-id",children:[s.jsx("span",{className:"s-sess-avatar",children:s.jsx(Z,{agent:e,size:46,tile:!0,presence:!1})}),s.jsxs("div",{className:"s-sess-id-copy",children:[s.jsxs("div",{className:"s-sess-name-row",children:[s.jsx("span",{className:"s-sess-name",children:t}),e.handle&&s.jsxs("span",{className:"s-sess-handle",children:["@",e.handle.replace(/^@+/,"")]})]}),s.jsx(ps,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled:y==="starting",onClick:T,children:y==="starting"?"Starting...":"+ New session"}),b&&s.jsx("div",{className:"s-sess-action-error",children:b}),R&&s.jsx("div",{className:"s-sess-action-error",children:R})]})]}),s.jsxs("section",{className:"s-sess-band",children:[s.jsxs("header",{className:"s-sess-band-head",children:[s.jsx("span",{className:"s-sess-band-label",children:"Recent sessions"}),x.length>0&&s.jsxs("span",{className:"s-sess-band-meta",children:[x.length," sessions"]})]}),s.jsx("div",{className:"s-sess-list",children:x.length===0?s.jsxs("div",{className:"s-sess-empty",children:["No sessions yet — start a new session for ",t,"."]}):x.map(n=>{const j=n.id===h,k=n.id===D,M=n.harness??e.harness??"session",W=n.model??e.model,V=W&&M&&W.startsWith(`${M}-`)?W.slice(M.length+1):W,g=[M,V,n.reasoningEffort].filter(os=>!!os).join(" · "),P=n.surfaceSessionId?`${n.transport??e.transport??"terminal"} surface ${vs(n.surfaceSessionId)}`:n.transport&&n.transport!==M?`${n.transport} surface`:null,J=j?"now":n.endedAt?`ended · ${K(n.endedAt)||"recent"}`:K(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${j?" s-sess-row--active":""}${k?" s-sess-row--selected":""}`,onClick:()=>A(n.id),"aria-expanded":k,children:[s.jsx("span",{className:"s-mod-dot s-sess-row-dot",style:{background:j?"var(--accent)":"var(--dim)",opacity:j?1:.55}}),s.jsxs("span",{className:"s-sess-row-main",children:[s.jsxs("span",{className:"s-sess-row-top",children:[s.jsx("span",{className:"s-sess-row-id",title:n.id,children:is(n.id)}),s.jsx("span",{className:"s-sess-row-tag",children:g})]}),s.jsxs("span",{className:"s-sess-row-sub",title:P??void 0,children:[n.cwd?z(n.cwd):"workspace",P?` · ${P}`:""]})]}),s.jsx("span",{className:`s-sess-row-when${j?" s-sess-row-when--active":""}`,children:J})]}),k&&s.jsx(ys,{agentId:e.id,session:n,active:j,onPrimary:()=>j?void E():O(n),primaryLabel:j?"Continue":"Resume",primaryTitle:j?"Send a message into this conversation":"Reopen this conversation and message it"})]},n.id)})})]})]})}function Ss(e){let t;if(e.kind==="tool"){const o=e.arg?.trim()||e.text?.trim()||"";t=`${e.tool??"tool"}${o?` ${o}`:""}`.trim()}else t=e.text?.trim()||e.kind;return t.length>160?`${t.slice(0,157)}…`:t}function ks({agent:e,session:t,active:o,onContinue:c,onTakeover:i,onOpen:m}){const[r,p]=u.useState(null),l=u.useCallback(async()=>{const d=await B(`/api/agents/${encodeURIComponent(e.id)}/observe`).catch(()=>null);p(d)},[e.id]);u.useEffect(()=>{p(null),l()},[l]),X(()=>{l()});const h=r?.data.events??[],x=e.branch||(t.cwd?z(t.cwd):"main"),N=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,I=t.harness??e.harness??"session",v=(()=>{for(const d of h)if((d.kind==="message"||d.kind==="ask")&&d.text?.trim())return d.text.trim();return null})()??(t.cwd?z(t.cwd):null)??e.name,w=r?.data.metadata?.usage??null,S=w?.assistantMessages??null,y=_(w,{model:r?.data.metadata?.session?.model??N,adapterType:I}),f=y?Math.min(100,y.pct):null,b=o?"live":"idle",$=h.length,C=h.slice(-6).map(d=>({t:d.at??d.t?K(d.at??d.t):"",text:Ss(d),kind:d.kind}));return s.jsxs("section",{className:"ap-focus ap-profileCard","data-tone":b,"aria-label":v,children:[s.jsxs("header",{className:"ap-focusHead",children:[s.jsx("h1",{className:"ap-focusTitle",children:v}),s.jsx("span",{className:"ap-focusState","data-tone":b,children:o?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0})," working"]}):"idle"}),s.jsx("button",{type:"button",className:"ap-focusOpen",onClick:m,children:"Open ↗"})]}),s.jsxs("div",{className:"ap-focusAttr",children:[s.jsxs("span",{className:"ap-focusAttrText",children:[x,N?` · ${N}`:""]}),s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[f!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"ctx"}),f,"%"]}):null,w&&(w.inputTokens||w.outputTokens)?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"tokens"}),fs(w.inputTokens??0)," in"]}):null,S!=null?s.jsxs("span",{children:[s.jsx("span",{className:"ap-metaKey",children:"turns"}),S]}):null]})]}),s.jsxs("div",{className:"ap-logHead",children:[s.jsx("span",{className:"ap-logHeadTitle",children:"Session log"}),s.jsx("span",{className:"ap-logHeadMeta",children:r===null?"loading…":`${r.source} · ${$} events`})]}),s.jsx("div",{className:"ap-log",children:r===null?s.jsx("div",{className:"ap-traceLoading",children:"Resolving the most recent session…"}):C.length===0?s.jsx("div",{className:"ap-traceLoading",children:"No activity captured for this session yet."}):C.map((d,R)=>s.jsxs("div",{className:"ap-logLine","data-kind":d.kind,children:[s.jsx("span",{className:"ap-logT",children:d.t}),s.jsx("span",{className:"ap-logText",children:d.text})]},R))})]})}function gs({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m}){const{focusedSession:r,focusSession:p}=G(),l=ss(e,o),h=u.useMemo(()=>es(o?.sessions??[],l),[o?.sessions,l]),x=h.find(a=>a.id===l)??h[0]??null,N=m.view==="agents-v2"&&m.agentId===e.id?m.sessionId:null,I=ts(e.id,r,l,h,N),v=Q(N,h);u.useEffect(()=>{v&&(r?.agentId===e.id&&r.sessionId===v||p(e.id,v))},[e.id,r?.agentId,r?.sessionId,p,v]);const w=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model??null,S=e.cwd?xs(e.cwd)??e.cwd:null,y=e.homeNodeName?e.homeNodeName.replace(/\.local$/i,""):null,f=e.handle?.trim().replace(/^@+/,"")||null,b=f?`@${f}`:t,$=f&&t.toLowerCase()!==f.toLowerCase()?t:[e.project?`/${e.project}`:null,e.branch,w].filter(Boolean).join(" · "),C=a=>m.view==="agents-v2"?{...m,...a,view:"agents-v2"}:{view:"agents-v2",agentId:e.id,...a},d=async()=>{try{const a=await q({...e,conversationId:c});i(C({agentId:e.id,conversationId:a,tab:"message"}))}catch{}},R=async()=>{try{const a=await B("/api/sessions",{method:"POST",body:JSON.stringify(as(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,size:48,tile:!0,presence:!1}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[s.jsx("h1",{className:"ap-profileName",title:b,children:b}),e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(ns,{harness:e.harness,size:13})}):null]}),s.jsx("span",{className:"ap-profileSub",title:$,children:$||S||"—"}),f&&t.toLowerCase()!==f.toLowerCase()?s.jsx("span",{className:"ap-profileId",title:e.id,children:t}):null]}),s.jsxs("div",{className:"ap-headActions",children:[s.jsx("button",{type:"button",className:"ap-headGhost",onClick:()=>i(C({agentId:e.id,tab:"config"})),children:"Edit config"}),s.jsx("button",{type:"button",className:"ap-headCta",onClick:()=>{R()},children:"+ New session"})]})]}),s.jsxs("div",{className:"ap-profileBody",children:[s.jsxs("div",{className:"ap-profileMain",children:[s.jsx("div",{className:"ap-profileSection",children:"Current session"}),x?s.jsx(ks,{agent:e,session:x,active:x.id===l,onContinue:()=>{d()},onTakeover:H,onOpen:()=>{d()}}):s.jsxs("div",{className:"ap-traceLoading",children:["No active session for ",t,"."]}),s.jsxs("div",{className:"ap-profileSection",children:["Sessions ",s.jsx("span",{className:"ap-profileCount",children:h.length})]}),h.length===0?s.jsxs("div",{className:"ap-empty",children:["No sessions yet — start a new session for ",t,"."]}):s.jsxs("div",{className:"ap-sessTable",children:[s.jsxs("div",{className:"ap-sessTableHead","aria-hidden":!0,children:[s.jsx("span",{}),s.jsx("span",{children:"Session"}),s.jsx("span",{children:"Engine"}),s.jsx("span",{children:"Last"})]}),h.map(a=>{const E=a.id===l,T=E?"now":a.endedAt?`ended · ${K(a.endedAt)||"recent"}`:K(a.startedAt)||"recent",O=a.cwd?z(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,j=n&&n.startsWith(`${A}-`)?n.slice(A.length+1):n,k=[A,j,a.reasoningEffort].filter(Boolean).join(" · ");return s.jsxs("button",{type:"button",className:"ap-sessRow","data-tone":E?"live":"idle","data-selected":a.id===I||void 0,onClick:()=>E?D(a.id):L(a),children:[E?s.jsx("span",{className:"ap-dot","data-tone":"live","aria-hidden":!0}):s.jsx("span",{className:"ap-sessRowDot","aria-hidden":!0}),s.jsx("span",{className:"ap-sessRowName",title:a.id,children:O}),s.jsx("span",{className:"ap-sessRowEngine",children:k}),s.jsx("span",{className:"ap-sessRowWhen",children:T})]},a.id)})]})]}),s.jsxs("aside",{className:"ap-profileAside",children:[s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Place"}),S?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"root"}),s.jsx("span",{className:"ap-kvVal",children:S})]}):null,y?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"host"}),s.jsx("span",{className:"ap-kvVal",children:y})]}):null,e.branch?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"branch"}),s.jsx("span",{className:"ap-kvVal",children:e.branch})]}):null]}),s.jsxs("div",{className:"ap-group",children:[s.jsx("div",{className:"ap-groupHead",children:"Runtime"}),e.harness?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"harness"}),s.jsx("span",{className:"ap-kvVal",children:e.harness})]}):null,w?s.jsxs("div",{className:"ap-kv",children:[s.jsx("span",{className:"ap-kvKey",children:"model"}),s.jsx("span",{className:"ap-kvVal",children:w})]}):null]})]})]})]})}function lt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=us(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[N,I]=u.useState(null),{route:v}=G(),w=v.view==="agents-v2"&&v.agentId===e.id?v.sessionId??null:null,S=Q(w,N?.sessions??[])??w,y=u.useCallback(async()=>{const b=await B(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).catch(()=>null);I(b)},[e.id]),f=u.useCallback(async()=>{x(!0);try{const b=S?new URLSearchParams({sessionId:S}):null,$=await B(`/api/agents/${encodeURIComponent(e.id)}/observe${b?`?${b}`:""}`);l($)}catch{l({agentId:e.id,source:"unavailable",fidelity:"synthetic",historyPath:null,sessionId:null,updatedAt:Date.now(),data:{events:[{id:`${e.id}:observe-error`,t:0,kind:"system",text:"Observer data is temporarily unavailable.",detail:"Retrying will resume once the session source becomes reachable."}],files:[],contextUsage:[],live:!1}})}finally{x(!1)}},[e.id,S]);return u.useEffect(()=>{I(null),y();const b=window.setTimeout(()=>{y()},3e3);return()=>window.clearTimeout(b)},[y]),u.useEffect(()=>{l(null),x(!1)},[e.id,S]),u.useEffect(()=>{i==="observe"&&f()},[i,f]),X(()=>{y(),i==="observe"&&f()}),u.useEffect(()=>{if(i!=="observe"||!p?.data.live)return;const b=setInterval(()=>{f()},2500);return()=>clearInterval(b)},[i,p?.data.live,f]),s.jsxs("div",{className:`s-profile-center${i!=="profile"?" s-profile-center--tabbed":" s-profile-center--modular"}`,children:[i==="profile"&&(m?m({agent:e,sessionCatalog:N,conversationId:o,navigate:c,route:v}):s.jsx("div",{className:"s-aproj s-aproj--profile",children:s.jsx(gs,{agent:e,name:r,sessionCatalog:N,conversationId:o,navigate:c,route:v})})),i==="config"&&s.jsx(ms,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ds,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(cs,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function ct({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(ls,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{lt as AgentDetailWithRail,ct as AgentProfileBar,rt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
@@ -1 +1 @@
1
- import{r as E}from"./index-BZovGpDk.js";import{a as C}from"./api-h5zurxmi.js";import{b as ot}from"./router-63XV_E7f.js";import{u as it}from"./sse-Bb0EOcU9.js";import{i as P,o as rt}from"./surface-activity-B1rgWB1i.js";import{e as ct,u as lt}from"./Provider-p-xuaAoE.js";import{x as H}from"./conversation-model-CHwHZNw-.js";import{d as at,c as ut,e as dt,f as ft,i as q}from"./model-Co0zkMIc.js";import{i as gt}from"./agents-project-model-UYiamtrU.js";import{o as z,b as vt,a as wt,h as x,c as Y}from"./model-IGCUEsMy.js";const O=1440*6e4;function It(t){const e=new Map;for(const n of t?.activeAsks??[]){const s=e.get(n.agentId)??[];s.push(n),e.set(n.agentId,s)}return e}function At(t){const e=new Map,n=(s,o)=>{if(!s)return;const r=e.get(s)??[];r.push(o),e.set(s,r)};for(const s of t?.needsAttention??[])n(s.agentId,{title:s.title,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of t?.activeAsks??[])s.status==="needs_attention"&&n(s.agentId,{title:s.task,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of e.values())s.sort((o,r)=>r.updatedAt-o.updatedAt);return e}function Q(t){return t?t.charAt(0).toUpperCase()+t.slice(1):"Harness"}function X(t){return t.length===1?t[0]??null:t.length>1?`${t.length} branches`:null}function mt(t,e,n,s){const o=t.group,r=o.nodes.flatMap(I=>n.get(I.row.agent.id)??[]).sort((I,h)=>h.updatedAt-I.updatedAt)[0]??null,c=!!r,a=!c&&o.nodes.some(I=>q(I.row)),d=gt(o,s),v=c?"needs":a?"working":"recent",w=c?"needs":a||d?"live":"idle",f=t.leadAgent,m=r?.conversationId??e.get(f.id)??f.conversationId??null;return{id:`${t.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:t.projectSlug,projectTitle:t.projectTitle,projectRoot:t.projectRoot,workspaceRoot:f.cwd??f.projectRoot??t.projectRoot,agentId:f.id,agentName:o.name,harness:x(o.harness),branch:X(o.branches),work:r?.summary?.trim()||r?.title.trim()||wt(t,w),group:v,needs:c,working:a,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:m,sessionId:null}}function pt(t){return t&&t.view==="sessions"&&t.sessionId?t.sessionId:null}function ht(t,e,n){const s=x(e.harness);return{id:`${t.slice.slug}:native:${e.key}`,kind:"native",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:t.slice.root,agentId:null,agentName:`${Q(s)} session`,harness:s,branch:null,work:Y(e.detail??e.label)||e.label,group:"working",needs:!1,working:!0,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:null,sessionId:pt(e.route)}}function yt(t,e){return t.status==="active"||t.status==="workflow"?"working":(t.lastActivityAt&&e-t.lastActivityAt<O,"recent")}function Z(t){return t?t.view==="sessions"?t.sessionId??null:t.view==="conversation"?t.conversationId:null:null}function F(t){return!!Z(t.route)}function G(t,e,n,s,o){const r=x(e.harness),c=Z(e.route),a=e.status==="active"||e.status==="workflow";return{id:`${t.slice.slug}:session:${e.key}`,kind:"session",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:s?.cwd??s?.projectRoot??t.slice.root,agentId:s?.id??null,agentName:s?.name??`${Q(r)} session`,harness:r,branch:X(o?[o]:[]),work:Y(e.detail??e.label)||e.label,group:yt(e,n),needs:!1,working:a,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:e.route?.view==="conversation"?e.route.conversationId:null,sessionId:e.route?.view==="sessions"?e.route.sessionId??c:c,route:e.route}}function kt(t,e){const n=[];for(const s of t.agents)for(const o of s.sessions)F(o)&&n.push(G(t,o,e,s.row.agent,s.row.branch));for(const s of t.unassigned)F(s)&&n.push(G(t,s,e));return n.sort((s,o)=>o.lastActivityAt-s.lastActivityAt||s.agentName.localeCompare(o.agentName))}function St(t){const e=new Map,n=(s,o,r,c)=>{const a=e.get(s);if(!a){e.set(s,{root:s,branch:o,working:r,lastActivityAt:c});return}(r||!a.branch)&&o&&(a.branch=o),a.working||=r,a.lastActivityAt=Math.max(a.lastActivityAt,c)};for(const s of t.agents){const o=s.row.agent.cwd??s.row.agent.projectRoot??t.slice.root;if(!o)continue;const r=s.row.branch&&s.row.branch!=="—"?s.row.branch:null;n(o,r,q(s.row),s.row.lastActivityAt??0)}for(const s of t.slice.nativeSessions)s.cwd&&n(s.cwd,null,s.status==="active",s.lastActivityAt??0);return e.size===0&&t.slice.root&&n(t.slice.root,null,!1,t.lastActivityAt??0),[...e.values()].sort((s,o)=>Number(o.working)-Number(s.working)||o.lastActivityAt-s.lastActivityAt||s.root.localeCompare(o.root))}function K(t,e){return t.needs?3:t.working?2:e-t.lastActivityAt<O?1:0}function Rt(t){const{nowMs:e,showEphemeral:n}=t,s=ct(t.agents,t.machineId),o=It(t.fleet),r=At(t.fleet),{conversationByAgentId:c,sessionByAgentId:a}=at(t.sessions),d=s.map(i=>ut(i,a.get(i.id)??null,o.get(i.id)??[])),v=dt(t.discovery,e),w=ft(d,t.sessions,v),f=vt(w,n),m=f.map(i=>mt(i,c,r,e));for(const i of w)for(const l of i.unassigned)l.kind!=="native"||l.status!=="active"||!l.route||m.push(ht(i,l,e));m.sort((i,l)=>K(l,e)-K(i,e)||l.lastActivityAt-i.lastActivityAt);const I=w.flatMap(i=>kt(i,e)),h=new Map;for(const i of m){const l=h.get(i.projectSlug)??[];l.push(i),h.set(i.projectSlug,l)}const M=new Map;for(const i of I){const l=M.get(i.projectSlug)??[];l.push(i),M.set(i.projectSlug,l)}const j=new Map;for(const i of f)j.set(i.projectSlug,(j.get(i.projectSlug)??0)+1);const D=w.map(i=>{const l=h.get(i.slice.slug)??[],L=M.get(i.slice.slug)??[],nt=[...new Set(i.agents.map(g=>g.row.branch).filter(g=>!!g&&g!=="—"&&g!=="main"))],$=St(i);return{slug:i.slice.slug,title:i.slice.title,root:i.slice.root,agentCount:j.get(i.slice.slug)??0,sessionCount:L.length,liveSessionCount:L.filter(g=>g.working).length,worktreeCount:$.length,worktrees:$,needs:l.filter(g=>g.needs).length,working:l.filter(g=>g.working).length,threadCount:l.length,lastActivityAt:i.lastActivityAt,branches:nt}});return D.sort((i,l)=>V(l)-V(i)||l.lastActivityAt-i.lastActivityAt||i.title.localeCompare(l.title)),{projects:D,threads:m,sessions:I}}function V(t){return t.needs>0?2:t.working>0?1:0}function qt(t,e){return t.needs===0&&t.working===0&&(t.threadCount===0||e-t.lastActivityAt>O)}function zt(t,e){return t.filter(n=>n.projectSlug===e)}function Yt(t,e){return t.filter(n=>n.projectSlug===e)}const bt=["needs","working","recent"],Mt={needs:"Your turn",working:"In flight",recent:"Recent"};function Qt(t){const e=new Map;for(const n of t){const s=e.get(n.group)??[];s.push(n),e.set(n.group,s)}return bt.filter(n=>e.has(n)).map(n=>({group:n,label:Mt[n],items:e.get(n)}))}function A(t){return{view:"agents-v2",...t.projectSlug?{projectSlug:t.projectSlug}:{},...t.machineId?{machineId:t.machineId}:{}}}function Xt(t,e){return t.agentId&&e.selectedAgentId?e.selectedAgentId===t.agentId:t.kind==="native"&&t.sessionId&&e.sessionId?e.sessionId===t.sessionId:!1}function Zt(t,e){return t.kind==="native"?{...A(e),sessionId:t.sessionId??void 0}:{...A(e),selectedAgentId:t.agentId??void 0}}function te(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?z(e,t.agentId):A(e)}function ee(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.agentId?{...z(e,t.agentId),tab:"observe"}:null}function se(t,e){const n=_(t);return n?{...A(e),indexView:"sessions",...n?{sessionId:n}:{},selectedAgentId:void 0}:A(e)}function ne(t,e){const n=_(t);return n&&e.sessionId?e.sessionId===n:!1}function _(t){return t.sessionId?t.sessionId:t.conversationId?t.conversationId:null}function oe(t,e){const n=_(t);return n?{...A(e),projectSlug:t.projectSlug,indexView:"sessions",sessionId:n,selectedAgentId:void 0}:{...A(e),projectSlug:t.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const jt=15e3,tt=3e4,Ct=250;let u={sessions:[],fleet:null,discovery:null,loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const N=new Set;let k=0,W=0,p=null,R=null,b=null,T=null,J=0;function et(){for(const t of[...N])t()}function Bt(t,e){return t&&JSON.stringify(t.activeAsks)===JSON.stringify(e.activeAsks)?t:e}function Et(t,e){const n=s=>JSON.stringify([s?.transcripts??[],s?.processes??[]]);return t&&n(t)===n(e)?t:e}function st(t){u={...u,...t},et()}async function y(t){const e=++W;J+=1,typeof window<"u"&&(window.__projectsInboxLoads=J),u.loadedAt===null&&t!=="background"&&st({loading:!0,error:null});const[n,s,o]=await Promise.allSettled([C("/api/conversations"),C("/api/fleet"),C("/api/tail/discover")]);if(e!==W)return;const r=n.status==="fulfilled"?H(u.sessions,n.value):u.sessions,c=s.status==="fulfilled"?Bt(u.fleet,s.value):u.fleet,a=o.status==="fulfilled"?Et(u.discovery,o.value):u.discovery,d=[n,s,o].find(f=>f.status==="rejected"),v=d?d.reason instanceof Error?d.reason.message:String(d.reason):null,w=r!==u.sessions||c!==u.fleet||a!==u.discovery||v!==u.error||u.loading;u={...u,sessions:r,fleet:c,discovery:a,error:v,loading:!1,loadedAt:Date.now()},w&&et()}function Pt(){P()&&(p||(p=setTimeout(()=>{p=null,y("background")},Ct)))}function Nt(){y("initial"),R=setInterval(()=>{P()&&y("background")},jt),b=setInterval(()=>{P()&&st({nowMs:Date.now()})},tt),T=rt(()=>{y("background")})}function Tt(){p&&(clearTimeout(p),p=null),R&&(clearInterval(R),R=null),b&&(clearInterval(b),b=null),T?.(),T=null}function ie(){y("background")}function xt(){const[t,e]=E.useState(u);return E.useEffect(()=>{const n=()=>e(u);return N.add(n),k+=1,k===1&&Nt(),n(),()=>{N.delete(n),k-=1,k===0&&Tt()}},[]),it(Pt),t}let U=null,S=null;function Ot(t,e){return!!t&&t.length===e.length&&t.every((n,s)=>n===e[s])}function B(t,e,n){if(!t?.length)return e;const s=new Map(t.map(c=>[n(c),c]));let o=t.length===e.length;const r=e.map((c,a)=>{const d=s.get(n(c)),v=d?H(d,c):c;return v!==t[a]&&(o=!1),v});return o?t:r}function _t(t,e){if(!t)return e;const n=B(t.projects,e.projects,r=>r.slug),s=B(t.threads,e.threads,r=>r.id),o=B(t.sessions,e.sessions,r=>r.id);return n===t.projects&&s===t.threads&&o===t.sessions?t:{projects:n,threads:s,sessions:o}}function Dt(t){const e=[t.agents,t.sessions,t.fleet,t.discovery,t.machineId,Math.floor(t.nowMs/tt),t.showEphemeral];if(Ot(U,e)&&S)return S;const n=Rt(t),s=_t(S,n);return U=e,S=s,s}function re(t){const e=xt(),{agents:n}=lt(),s=ot(t),o=!!t.showEphemeral;return{model:E.useMemo(()=>Dt({agents:n,machineId:s,sessions:e.sessions,fleet:e.fleet,discovery:e.discovery,nowMs:e.nowMs,showEphemeral:o}),[n,s,e.sessions,e.fleet,e.discovery,e.nowMs,o]),nowMs:e.nowMs,loading:e.loading,loadedAt:e.loadedAt,error:e.error}}export{te as a,ne as b,_ as c,Yt as d,zt as e,se as f,Qt as g,Zt as h,qt as i,Xt as j,ie as r,oe as s,ee as t,re as u};
1
+ import{r as E}from"./index-DmFAhGPj.js";import{a as C}from"./api-h5zurxmi.js";import{b as ot}from"./router-Cn_s9IGH.js";import{u as it}from"./sse-CxXt4tqI.js";import{i as P,o as rt}from"./surface-activity-B1rgWB1i.js";import{e as ct,u as lt}from"./Provider-cJCdHAxu.js";import{x as H}from"./conversation-model-CHwHZNw-.js";import{d as at,c as ut,e as dt,f as ft,i as q}from"./model-Co0zkMIc.js";import{i as gt}from"./agents-project-model-UYiamtrU.js";import{o as z,b as vt,a as wt,h as x,c as Y}from"./model-IGCUEsMy.js";const O=1440*6e4;function It(t){const e=new Map;for(const n of t?.activeAsks??[]){const s=e.get(n.agentId)??[];s.push(n),e.set(n.agentId,s)}return e}function At(t){const e=new Map,n=(s,o)=>{if(!s)return;const r=e.get(s)??[];r.push(o),e.set(s,r)};for(const s of t?.needsAttention??[])n(s.agentId,{title:s.title,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of t?.activeAsks??[])s.status==="needs_attention"&&n(s.agentId,{title:s.task,summary:s.summary,conversationId:s.conversationId,updatedAt:s.updatedAt});for(const s of e.values())s.sort((o,r)=>r.updatedAt-o.updatedAt);return e}function Q(t){return t?t.charAt(0).toUpperCase()+t.slice(1):"Harness"}function X(t){return t.length===1?t[0]??null:t.length>1?`${t.length} branches`:null}function mt(t,e,n,s){const o=t.group,r=o.nodes.flatMap(I=>n.get(I.row.agent.id)??[]).sort((I,h)=>h.updatedAt-I.updatedAt)[0]??null,c=!!r,a=!c&&o.nodes.some(I=>q(I.row)),d=gt(o,s),v=c?"needs":a?"working":"recent",w=c?"needs":a||d?"live":"idle",f=t.leadAgent,m=r?.conversationId??e.get(f.id)??f.conversationId??null;return{id:`${t.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:t.projectSlug,projectTitle:t.projectTitle,projectRoot:t.projectRoot,workspaceRoot:f.cwd??f.projectRoot??t.projectRoot,agentId:f.id,agentName:o.name,harness:x(o.harness),branch:X(o.branches),work:r?.summary?.trim()||r?.title.trim()||wt(t,w),group:v,needs:c,working:a,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:m,sessionId:null}}function pt(t){return t&&t.view==="sessions"&&t.sessionId?t.sessionId:null}function ht(t,e,n){const s=x(e.harness);return{id:`${t.slice.slug}:native:${e.key}`,kind:"native",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:t.slice.root,agentId:null,agentName:`${Q(s)} session`,harness:s,branch:null,work:Y(e.detail??e.label)||e.label,group:"working",needs:!1,working:!0,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:null,sessionId:pt(e.route)}}function yt(t,e){return t.status==="active"||t.status==="workflow"?"working":(t.lastActivityAt&&e-t.lastActivityAt<O,"recent")}function Z(t){return t?t.view==="sessions"?t.sessionId??null:t.view==="conversation"?t.conversationId:null:null}function F(t){return!!Z(t.route)}function G(t,e,n,s,o){const r=x(e.harness),c=Z(e.route),a=e.status==="active"||e.status==="workflow";return{id:`${t.slice.slug}:session:${e.key}`,kind:"session",projectSlug:t.slice.slug,projectTitle:t.slice.title,projectRoot:t.slice.root,workspaceRoot:s?.cwd??s?.projectRoot??t.slice.root,agentId:s?.id??null,agentName:s?.name??`${Q(r)} session`,harness:r,branch:X(o?[o]:[]),work:Y(e.detail??e.label)||e.label,group:yt(e,n),needs:!1,working:a,lastActivityAt:e.lastActivityAt??n,sessionCount:1,contextPct:null,conversationId:e.route?.view==="conversation"?e.route.conversationId:null,sessionId:e.route?.view==="sessions"?e.route.sessionId??c:c,route:e.route}}function kt(t,e){const n=[];for(const s of t.agents)for(const o of s.sessions)F(o)&&n.push(G(t,o,e,s.row.agent,s.row.branch));for(const s of t.unassigned)F(s)&&n.push(G(t,s,e));return n.sort((s,o)=>o.lastActivityAt-s.lastActivityAt||s.agentName.localeCompare(o.agentName))}function St(t){const e=new Map,n=(s,o,r,c)=>{const a=e.get(s);if(!a){e.set(s,{root:s,branch:o,working:r,lastActivityAt:c});return}(r||!a.branch)&&o&&(a.branch=o),a.working||=r,a.lastActivityAt=Math.max(a.lastActivityAt,c)};for(const s of t.agents){const o=s.row.agent.cwd??s.row.agent.projectRoot??t.slice.root;if(!o)continue;const r=s.row.branch&&s.row.branch!=="—"?s.row.branch:null;n(o,r,q(s.row),s.row.lastActivityAt??0)}for(const s of t.slice.nativeSessions)s.cwd&&n(s.cwd,null,s.status==="active",s.lastActivityAt??0);return e.size===0&&t.slice.root&&n(t.slice.root,null,!1,t.lastActivityAt??0),[...e.values()].sort((s,o)=>Number(o.working)-Number(s.working)||o.lastActivityAt-s.lastActivityAt||s.root.localeCompare(o.root))}function K(t,e){return t.needs?3:t.working?2:e-t.lastActivityAt<O?1:0}function Rt(t){const{nowMs:e,showEphemeral:n}=t,s=ct(t.agents,t.machineId),o=It(t.fleet),r=At(t.fleet),{conversationByAgentId:c,sessionByAgentId:a}=at(t.sessions),d=s.map(i=>ut(i,a.get(i.id)??null,o.get(i.id)??[])),v=dt(t.discovery,e),w=ft(d,t.sessions,v),f=vt(w,n),m=f.map(i=>mt(i,c,r,e));for(const i of w)for(const l of i.unassigned)l.kind!=="native"||l.status!=="active"||!l.route||m.push(ht(i,l,e));m.sort((i,l)=>K(l,e)-K(i,e)||l.lastActivityAt-i.lastActivityAt);const I=w.flatMap(i=>kt(i,e)),h=new Map;for(const i of m){const l=h.get(i.projectSlug)??[];l.push(i),h.set(i.projectSlug,l)}const M=new Map;for(const i of I){const l=M.get(i.projectSlug)??[];l.push(i),M.set(i.projectSlug,l)}const j=new Map;for(const i of f)j.set(i.projectSlug,(j.get(i.projectSlug)??0)+1);const D=w.map(i=>{const l=h.get(i.slice.slug)??[],L=M.get(i.slice.slug)??[],nt=[...new Set(i.agents.map(g=>g.row.branch).filter(g=>!!g&&g!=="—"&&g!=="main"))],$=St(i);return{slug:i.slice.slug,title:i.slice.title,root:i.slice.root,agentCount:j.get(i.slice.slug)??0,sessionCount:L.length,liveSessionCount:L.filter(g=>g.working).length,worktreeCount:$.length,worktrees:$,needs:l.filter(g=>g.needs).length,working:l.filter(g=>g.working).length,threadCount:l.length,lastActivityAt:i.lastActivityAt,branches:nt}});return D.sort((i,l)=>V(l)-V(i)||l.lastActivityAt-i.lastActivityAt||i.title.localeCompare(l.title)),{projects:D,threads:m,sessions:I}}function V(t){return t.needs>0?2:t.working>0?1:0}function qt(t,e){return t.needs===0&&t.working===0&&(t.threadCount===0||e-t.lastActivityAt>O)}function zt(t,e){return t.filter(n=>n.projectSlug===e)}function Yt(t,e){return t.filter(n=>n.projectSlug===e)}const bt=["needs","working","recent"],Mt={needs:"Your turn",working:"In flight",recent:"Recent"};function Qt(t){const e=new Map;for(const n of t){const s=e.get(n.group)??[];s.push(n),e.set(n.group,s)}return bt.filter(n=>e.has(n)).map(n=>({group:n,label:Mt[n],items:e.get(n)}))}function A(t){return{view:"agents-v2",...t.projectSlug?{projectSlug:t.projectSlug}:{},...t.machineId?{machineId:t.machineId}:{}}}function Xt(t,e){return t.agentId&&e.selectedAgentId?e.selectedAgentId===t.agentId:t.kind==="native"&&t.sessionId&&e.sessionId?e.sessionId===t.sessionId:!1}function Zt(t,e){return t.kind==="native"?{...A(e),sessionId:t.sessionId??void 0}:{...A(e),selectedAgentId:t.agentId??void 0}}function te(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.conversationId?{view:"conversation",conversationId:t.conversationId}:t.agentId?z(e,t.agentId):A(e)}function ee(t,e){return t.kind==="native"&&t.sessionId?{view:"sessions",sessionId:t.sessionId}:t.agentId?{...z(e,t.agentId),tab:"observe"}:null}function se(t,e){const n=_(t);return n?{...A(e),indexView:"sessions",...n?{sessionId:n}:{},selectedAgentId:void 0}:A(e)}function ne(t,e){const n=_(t);return n&&e.sessionId?e.sessionId===n:!1}function _(t){return t.sessionId?t.sessionId:t.conversationId?t.conversationId:null}function oe(t,e){const n=_(t);return n?{...A(e),projectSlug:t.projectSlug,indexView:"sessions",sessionId:n,selectedAgentId:void 0}:{...A(e),projectSlug:t.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const jt=15e3,tt=3e4,Ct=250;let u={sessions:[],fleet:null,discovery:null,loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const N=new Set;let k=0,W=0,p=null,R=null,b=null,T=null,J=0;function et(){for(const t of[...N])t()}function Bt(t,e){return t&&JSON.stringify(t.activeAsks)===JSON.stringify(e.activeAsks)?t:e}function Et(t,e){const n=s=>JSON.stringify([s?.transcripts??[],s?.processes??[]]);return t&&n(t)===n(e)?t:e}function st(t){u={...u,...t},et()}async function y(t){const e=++W;J+=1,typeof window<"u"&&(window.__projectsInboxLoads=J),u.loadedAt===null&&t!=="background"&&st({loading:!0,error:null});const[n,s,o]=await Promise.allSettled([C("/api/conversations"),C("/api/fleet"),C("/api/tail/discover")]);if(e!==W)return;const r=n.status==="fulfilled"?H(u.sessions,n.value):u.sessions,c=s.status==="fulfilled"?Bt(u.fleet,s.value):u.fleet,a=o.status==="fulfilled"?Et(u.discovery,o.value):u.discovery,d=[n,s,o].find(f=>f.status==="rejected"),v=d?d.reason instanceof Error?d.reason.message:String(d.reason):null,w=r!==u.sessions||c!==u.fleet||a!==u.discovery||v!==u.error||u.loading;u={...u,sessions:r,fleet:c,discovery:a,error:v,loading:!1,loadedAt:Date.now()},w&&et()}function Pt(){P()&&(p||(p=setTimeout(()=>{p=null,y("background")},Ct)))}function Nt(){y("initial"),R=setInterval(()=>{P()&&y("background")},jt),b=setInterval(()=>{P()&&st({nowMs:Date.now()})},tt),T=rt(()=>{y("background")})}function Tt(){p&&(clearTimeout(p),p=null),R&&(clearInterval(R),R=null),b&&(clearInterval(b),b=null),T?.(),T=null}function ie(){y("background")}function xt(){const[t,e]=E.useState(u);return E.useEffect(()=>{const n=()=>e(u);return N.add(n),k+=1,k===1&&Nt(),n(),()=>{N.delete(n),k-=1,k===0&&Tt()}},[]),it(Pt),t}let U=null,S=null;function Ot(t,e){return!!t&&t.length===e.length&&t.every((n,s)=>n===e[s])}function B(t,e,n){if(!t?.length)return e;const s=new Map(t.map(c=>[n(c),c]));let o=t.length===e.length;const r=e.map((c,a)=>{const d=s.get(n(c)),v=d?H(d,c):c;return v!==t[a]&&(o=!1),v});return o?t:r}function _t(t,e){if(!t)return e;const n=B(t.projects,e.projects,r=>r.slug),s=B(t.threads,e.threads,r=>r.id),o=B(t.sessions,e.sessions,r=>r.id);return n===t.projects&&s===t.threads&&o===t.sessions?t:{projects:n,threads:s,sessions:o}}function Dt(t){const e=[t.agents,t.sessions,t.fleet,t.discovery,t.machineId,Math.floor(t.nowMs/tt),t.showEphemeral];if(Ot(U,e)&&S)return S;const n=Rt(t),s=_t(S,n);return U=e,S=s,s}function re(t){const e=xt(),{agents:n}=lt(),s=ot(t),o=!!t.showEphemeral;return{model:E.useMemo(()=>Dt({agents:n,machineId:s,sessions:e.sessions,fleet:e.fleet,discovery:e.discovery,nowMs:e.nowMs,showEphemeral:o}),[n,s,e.sessions,e.fleet,e.discovery,e.nowMs,o]),nowMs:e.nowMs,loading:e.loading,loadedAt:e.loadedAt,error:e.error}}export{te as a,ne as b,_ as c,Yt as d,zt as e,se as f,Qt as g,Zt as h,qt as i,Xt as j,ie as r,oe as s,ee as t,re as u};
@@ -1 +1 @@
1
- import{c as a}from"./createLucideIcon-DCq_3fQn.js";const c=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=a("radio",c);export{o as R};
1
+ import{c as a}from"./createLucideIcon-CFBn0Sdk.js";const c=[["path",{d:"M16.247 7.761a6 6 0 0 1 0 8.478",key:"1fwjs5"}],["path",{d:"M19.075 4.933a10 10 0 0 1 0 14.134",key:"ehdyv1"}],["path",{d:"M4.925 19.067a10 10 0 0 1 0-14.134",key:"1q22gi"}],["path",{d:"M7.753 16.239a6 6 0 0 1 0-8.478",key:"r2q7qm"}],["circle",{cx:"12",cy:"12",r:"2",key:"1c9p78"}]],o=a("radio",c);export{o as R};
@@ -1 +1 @@
1
- import{c as e}from"./createLucideIcon-DCq_3fQn.js";const c=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],a=e("refresh-cw",c);export{a as R};
1
+ import{c as e}from"./createLucideIcon-CFBn0Sdk.js";const c=[["path",{d:"M3 12a9 9 0 0 1 9-9 9.75 9.75 0 0 1 6.74 2.74L21 8",key:"v9h5vc"}],["path",{d:"M21 3v5h-5",key:"1q7to0"}],["path",{d:"M21 12a9 9 0 0 1-9 9 9.75 9.75 0 0 1-6.74-2.74L3 16",key:"3uifl3"}],["path",{d:"M8 16H3v5",key:"1cv678"}]],a=e("refresh-cw",c);export{a as R};
@@ -0,0 +1 @@
1
+ import{j as r}from"./index-DmFAhGPj.js";import{ActivityContent as s}from"./content-pPSd2dua.js";import"./index-BWHgHrtv.js";import"./router-Cn_s9IGH.js";import"./index-CmwGCxUk.js";import"./Provider-cJCdHAxu.js";import"./AgentDetailCard-BTiOmh-a.js";/* empty css */import{AgentsLeft as e}from"./left-CTYUvXbe.js";import{AgentsContent as n}from"./content-BIqX06OQ.js";import{AgentsInspector as m}from"./right-CreoQzPP.js";/* empty css */import"./secondaryNavConfig-Dw3gS1jR.js";/* empty css */import"./BackToPicker-D1LV6Cqp.js";import"./runtime-picker--IW3cRry.js";import"./ConversationScreen-B3l2m3JI.js";/* empty css */import"./ObservedTopologyPanel-CaSZZP05.js";import"./SessionObserve-yYA8Gy5s.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-BJ5dIfL3.js";import{P as c}from"./ProjectsRail-BDl7U9Jq.js";import{ProjectsScreen as f}from"./ProjectsScreen-Dl2FcGrR.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-BcGC5mHE.js";import{BriefingsContent as x}from"./content-C15Ya-iu.js";/* empty css */import{BrokerContent as j}from"./content-CtqLJOVp.js";import"./NewChatComposer-Hd7pI5Ac.js";import{ChatLeft as u}from"./left-CwDRT50z.js";/* empty css */import{ChatContent as l}from"./content-BKDZ6Fxe.js";import{ConversationInspector as i}from"./right-Jh_1Q88s.js";import{CodeContent as h}from"./CodeScreen-CIKK1LcZ.js";import{FollowContent as C}from"./content-B8gahuBy.js";/* empty css */import{HarnessesContent as d}from"./content-Dvs1KRfo.js";/* empty css */import{HomeLeft as I}from"./left-B2HEqrTM.js";import{H as p}from"./content-CbAGkYQO.js";import{HomeRight as w}from"./right-DUbJ3WVc.js";import{MeshLeft as P}from"./left-XFXxNd4g.js";import{MeshContent as L}from"./content-CSAfI-PX.js";import{MeshInspectorPanel as R}from"./right-D9xFfy2b.js";import"./mesh-view-store-KJzABIkN.js";/* empty css */import{MeshOpsLeft as k}from"./left-CxlDLJlw.js";import{MeshOpsContent as A}from"./content-Ji7ATaf7.js";import{MeshOpsInspector as M}from"./right-DiybhsiK.js";import{OpsLeft as S}from"./left-p1hkO6P0.js";import{OpsContent as b}from"./content-iyyQKwvA.js";/* empty css */import"./RailRow-CLcVmywd.js";import"./left-mission-CuKFQ5xL.js";import"./mission-control-store-Ce6dOvnZ.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-CH-3-8_2.js";/* empty css *//* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-B0BSopPs.js";import{ReposContent as g}from"./content-DyJdVZjI.js";import{ReposInspector as H}from"./right-D-k9Z1Fe.js";/* empty css */import"./RepoDiffViewerLazy-CWE5GxMP.js";import"./cache-Dr0why2k.js";import{SearchContent as O}from"./content-pDE7Fpb9.js";import{K as T}from"./KnowledgeSearchInspector-B4ZY24xE.js";/* empty css */import{SessionsContent as y}from"./content-CTF9D60D.js";import{SessionsInspector as B}from"./right-DI7zHADe.js";/* empty css */import{SettingsContent as K}from"./content-eqZXKWcP.js";import"./SettingsDrawer-Co11RFX0.js";import{TerminalLeft as W}from"./left-8NITBvFX.js";import{TerminalContent as E}from"./Terminal-U8gjIdm3.js";import{TerminalInspector as F}from"./right-udr1qTJG.js";import{WorkContent as V}from"./content-CDE9tJDF.js";import{WorkInspector as q}from"./right-5L7Tn0zG.js";import{RealtimeVoicePage as z}from"./RealtimeVoiceScreen-DXEU5v3g.js";import"./ActivityScreen-DkUP7V7M.js";import"./api-h5zurxmi.js";import"./clipboard-e3fSpeo7.js";import"./sse-CxXt4tqI.js";import"./colors-BtO5_zlx.js";import"./mentions-agCGDgyA.js";import"./time-Dhsh_2EG.js";import"./ContextMenu-CHIuVKz7.js";import"./EmptyState-BRY5jTpz.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./createLucideIcon-CFBn0Sdk.js";import"./TextDocumentSurface-BWJCGBZf.js";import"./file-text-DcYSrI4v.js";import"./x-C8ayPBtj.js";import"./chevron-right-BYMV1511.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-h1IdakpD.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./AgentAvatar-D8ZtMluU.js";import"./SpriteAvatar-DS6Tmyua.js";import"./agent-identity-BxCsXnDp.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./AgentInfoScreen-DG5dlHb_.js";import"./conversation-model-CHwHZNw-.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-BhCjX2lD.js";import"./AgentsSubnav-az_VDkri.js";import"./SecondaryNav-_wyKjwNf.js";import"./library-E--gKzEZ.js";import"./HarnessMark-BPAphNjx.js";import"./AgentSessions-DpY0htZV.js";import"./agents-project-model-UYiamtrU.js";import"./profile-Dxj3VVOM.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-ClS9xf6i.js";import"./terminal-relay-TffuSPGs.js";import"./AgentDefinitionsWorkspace-CfaDVCVt.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-9Bveqm9c.js";import"./chevron-down-B3VVRJcV.js";import"./agent-essentials-B3wcxg_v.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-BOFPRPjR.js";import"./TmuxPeek-B4QdHbGm.js";import"./refresh-cw-C4x1x6b_.js";import"./message-square-D1hMsMj_.js";import"./search-DAyagUtF.js";import"./terminal-DJPUp_Qn.js";import"./scroll-text-DPPYrqB9.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-d6PKL_KD.js";import"./ConversationComposer-Bf7Ga_49.js";import"./message-markup-CyRDLdOn.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-B_GXrKR0.js";import"./eye-1J4yOUoG.js";import"./ConversationFeedRows-Cm1Lgo43.js";import"./ConversationPanels-BTBbEvrP.js";import"./use-reduced-motion-CYqhYqHO.js";import"./activity-CC8JzJNH.js";import"./message-circle-CJO-pi7b.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-BdvqZHLr.js";import"./ConversationStatus-BqhUHD85.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-B7KdvQvf.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CkMrtT8s.js";import"./SessionObserveEvidence-cHdjYOJe.js";import"./wrench-CvRjjByE.js";import"./external-link-B1TI5yIt.js";import"./AddProjectForm-CpyytDf2.js";import"./projects-inbox-Dzt_GQDv.js";import"./model-IGCUEsMy.js";import"./ProjectsInbox-B3DpAI5b.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-OkTY7Szg.js";import"./arrow-up-right-G6bJXxhK.js";import"./ProjectAgentProfile-Dv1sVnQl.js";import"./ProjectAgentProfileBar-BLVg5EeA.js";import"./BriefingDetailScreen-B7qJ90Np.js";import"./BriefingsScreen-CW6N829d.js";import"./BrokerScreen-X3z50712.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-pp33bLsu.js";import"./BrokerMetadataPanel-BhjECqOK.js";import"./DispatchAftermath-BDA9CrOd.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-dBS9hD-z.js";import"./arrow-down-w1HPzDSE.js";import"./sparkles-DJOBD_8l.js";import"./paperclip-iZmDMOS5.js";import"./plus-gZ0T0eBI.js";import"./send-horizontal-IcG46D2M.js";import"./check-BX8nRgop.js";import"./copy-BFmOcWof.js";import"./radio-RMLfV4EO.js";import"./bot-DzCOGKi6.js";import"./NewChatOrigin-DmuJ32wa.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C-dPcjQe.js";import"./use-fleet-active-asks-BHzeBZSW.js";import"./MessagesScreen-BMOOfbWX.js";import"./CodeDiffPane-Bx_2VAzv.js";import"./usePierreRuntime-Cm7-qdm0.js";/* empty css */import"./CodeProjectPicker-C1yOJKvs.js";/* empty css */import"./FollowScreen-BifwHWOV.js";import"./HarnessesScreen-fMnbnrD4.js";import"./useContentSecondaryNav-DjHBrgnS.js";import"./OpsSubnav-Dj3ShAKv.js";import"./operator-attention-BwSPeheT.js";import"./HomeHero-BgM6S39l.js";import"./observe-BSWVM8YA.js";import"./agent-lanes-model-VYQ5a68i.js";import"./home-moving-signal-Bh2FugbH.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Bj9SCl2f.js";import"./MeshScreen-48QkJSDI.js";import"./MeshCanvas-CpKcWxKy.js";import"./chunk-T65CQEWV-kP6nJjkU.js";import"./useAgentHoverCard-C6o0tlat.js";import"./local-agents-B5pq17tZ.js";import"./mesh-ops-5pZCYptW.js";import"./use-mesh-ops-items-KmaauBr_.js";import"./use-scout-dev-flags-BJbw87PK.js";import"./left-agents-Ck4Xn-R8.js";import"./left-default-BeOyS0bR.js";import"./left-lanes-DZp3jJMo.js";import"./lane-roster-store-71vFgAem.js";import"./left-plan-3rrFENhp.js";import"./OpsScreen-DOlmlVkP.js";import"./page-status-D2FQLJOX.js";import"./AgentLanesView-ChNlmY-F.js";import"./AgentFloorView-DjNLILLt.js";import"./AgentLanesPreflight-C3uOiOzd.js";import"./AgentLaneChrome-Dlwrbq3g.js";import"./AgentLaneCard-lfRNb7JD.js";import"./AgentLaneSummaryResize-6SOEWUnr.js";import"./agent-lane-card-model-q4cwzLX4.js";import"./agent-lane-preview-C33Dwpn7.js";import"./AgentLaneDetailSheet-BzYzBfcW.js";import"./agent-lane-detail-BNNm6FNu.js";import"./LaneTraceDetailSheet-H3AnN-vN.js";import"./LaneTraceEventFocus-mkMw2wJU.js";import"./MissionControlView-BpsHKu1F.js";import"./MissionContextRail-Y8QxUZGE.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-BPnAEA3F.js";import"./MissionLogPane-B0csI89E.js";import"./OpsAgentsView-CnqrwbC2.js";import"./DataTable-CJbbgBdA.js";import"./sliders-horizontal-R5pWUUcH.js";import"./PlanView-BLGdWDx6.js";import"./AtopView-BjjPM8OX.js";import"./MissionLeftAgentRow-iOZ6ds9L.js";import"./RepoDiffPageScreen-m62FiWXC.js";import"./ReposScreen-Cksv1cAD.js";import"./selection-bridge-BXw09aRF.js";import"./KnowledgeSearchScreen-Ch_WENUC.js";import"./clock-B9ukVaVn.js";import"./SessionsScreen-B-GFjxIA.js";import"./RawSessionsTable-DBto4Ts-.js";import"./FlightObserveScreen-BVMdsiCC.js";import"./SettingsScreen-Cn09nq5_.js";import"./StatusPill-C8m9ZymF.js";import"./AgentConfigurationScreen-BlGI6fuM.js";import"./server-BySujhDV.js";import"./VoicePermissionsPanel-Dd4ITJy_.js";import"./chunk-YOZR3KYS-C13bZPVd.js";import"./session-table-BdpHs1GN.js";/* empty css */import"./HerdrSession-BujfGzrP.js";import"./chunk-JTPDIGGW-BjX67kHU.js";import"./WorkDetailScreen-mJs0mb99.js";import"./WorkFilesViewer-ODzLXKxj.js";import"./ScoutbotRealtimeVoiceCall-1ixiEn1L.js";function mp(t,o){switch(t.view){case"ops":return r.jsx(S,{});case"agents-v2":return r.jsx(c,{route:t,navigate:o});case"agent-info":return r.jsx(e,{});case"messages":case"conversation":return r.jsx(u,{});case"mesh":return r.jsx(P,{});case"mesh-ops":return r.jsx(k,{});case"terminal":return r.jsx(W,{});default:return r.jsx(I,{})}}function ip(t,o,D=[]){switch(t.view){case"conversation":case"messages":return r.jsx(l,{route:t,navigate:o});case"agents-v2":return r.jsx(f,{route:t,navigate:o});case"agent-info":return r.jsx(n,{route:t,navigate:o});case"settings":return r.jsx(K,{route:t,navigate:o});case"inbox":return r.jsx(p,{navigate:o});case"sessions":return r.jsx(y,{route:t,navigate:o});case"search":return r.jsx(O,{route:t,navigate:o});case"mesh":return r.jsx(L,{route:t,navigate:o});case"mesh-ops":return r.jsx(A,{route:t,navigate:o});case"broker":return r.jsx(j,{route:t,navigate:o});case"code":return r.jsx(h,{route:t,navigate:o});case"repos":case"repo-diff":return r.jsx(g,{route:t,navigate:o});case"harnesses":return r.jsx(d,{route:t,navigate:o});case"briefings":return r.jsx(x,{route:t,navigate:o});case"activity":return r.jsx(s,{route:t,navigate:o});case"voice":return r.jsx(z,{});case"ops":return r.jsx(b,{route:t,navigate:o});case"terminal":return r.jsx(E,{route:t,navigate:o});case"work":return r.jsx(V,{route:t,navigate:o});case"follow":return r.jsx(C,{route:t,navigate:o});default:return r.jsx(p,{navigate:o})}}function pp(t,o){switch(t.view){case"inbox":return r.jsx(w,{});case"agents-v2":return t.agentId?r.jsx(m,{}):t.selectedAgentId||t.sessionId?r.jsx(a,{route:t,navigate:o}):null;case"agent-info":return r.jsx(m,{});case"sessions":return t.flightId?null:r.jsx(B,{});case"search":return r.jsx(T,{});case"conversation":return r.jsx(i,{});case"messages":return r.jsx(i,{});case"terminal":return r.jsx(F,{});case"work":return r.jsx(q,{});case"mesh":return r.jsx(R,{});case"mesh-ops":return r.jsx(M,{});case"repos":return r.jsx(H,{});default:return null}}export{ip as resolveContentPane,mp as resolveLeftPane,pp as resolveRightPane};
@@ -0,0 +1 @@
1
+ import{j as o}from"./index-DmFAhGPj.js";import{AgentsLeft as i}from"./left-CTYUvXbe.js";/* empty css */import"./index-BWHgHrtv.js";import"./Provider-cJCdHAxu.js";import"./router-Cn_s9IGH.js";import"./BackToPicker-D1LV6Cqp.js";import"./AgentLiveActions-BJ5dIfL3.js";import"./ObservedTopologyPanel-CaSZZP05.js";/* empty css */import"./secondaryNavConfig-Dw3gS1jR.js";/* empty css */import"./runtime-picker--IW3cRry.js";import"./index-CmwGCxUk.js";import"./AgentDetailCard-BTiOmh-a.js";import"./ConversationScreen-B3l2m3JI.js";/* empty css */import"./SessionObserve-yYA8Gy5s.js";/* empty css *//* empty css *//* empty css *//* empty css */import{P as m}from"./ProjectsRail-BDl7U9Jq.js";import"./ProjectsInbox-B3DpAI5b.js";import"./projects-inbox-Dzt_GQDv.js";import{ChatLeft as p}from"./left-CwDRT50z.js";/* empty css */import{HomeLeft as e}from"./left-B2HEqrTM.js";import"./content-CbAGkYQO.js";import{MeshLeft as s}from"./left-XFXxNd4g.js";import"./mesh-view-store-KJzABIkN.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-CxlDLJlw.js";import"./use-scout-dev-flags-BJbw87PK.js";import"./mesh-ops-5pZCYptW.js";import{OpsLeft as l}from"./left-p1hkO6P0.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-CH-3-8_2.js";/* empty css */import"./mission-control-store-Ce6dOvnZ.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-B0BSopPs.js";import"./RailRow-CLcVmywd.js";import"./left-mission-CuKFQ5xL.js";import{TerminalLeft as a}from"./left-8NITBvFX.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-C9IoGHbe.js";import"./NewChatComposer-Hd7pI5Ac.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./api-h5zurxmi.js";import"./HarnessMark-BPAphNjx.js";import"./conversation-model-CHwHZNw-.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./NewChatOrigin-DmuJ32wa.js";import"./keyboard-nav-h1IdakpD.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./x-C8ayPBtj.js";import"./createLucideIcon-CFBn0Sdk.js";import"./chevron-down-B3VVRJcV.js";import"./search-DAyagUtF.js";import"./loader-circle-d6PKL_KD.js";import"./file-text-DcYSrI4v.js";import"./AgentAvatar-D8ZtMluU.js";import"./SpriteAvatar-DS6Tmyua.js";import"./agent-identity-BxCsXnDp.js";import"./sse-CxXt4tqI.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CHIuVKz7.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./TextDocumentSurface-BWJCGBZf.js";import"./chevron-right-BYMV1511.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./terminal-takeover-BOFPRPjR.js";import"./openContent-C6XO6kr5.js";import"./eye-1J4yOUoG.js";import"./terminal-DJPUp_Qn.js";import"./message-square-D1hMsMj_.js";import"./scroll-text-DPPYrqB9.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-Bf7Ga_49.js";import"./message-markup-CyRDLdOn.js";import"./mentions-agCGDgyA.js";import"./message-visibility-kJM8XcSG.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-B_GXrKR0.js";import"./ConversationFeedRows-Cm1Lgo43.js";import"./ConversationPanels-BTBbEvrP.js";import"./use-reduced-motion-CYqhYqHO.js";import"./activity-CC8JzJNH.js";import"./message-circle-CJO-pi7b.js";import"./tail-display-BRcJltQa.js";import"./lane-edit-display-C_Aujldz.js";import"./tail-events-BdvqZHLr.js";import"./ConversationStatus-BqhUHD85.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-B7KdvQvf.js";import"./lane-observe-BA3g9aVd.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-CkMrtT8s.js";import"./SessionObserveEvidence-cHdjYOJe.js";import"./wrench-CvRjjByE.js";import"./external-link-B1TI5yIt.js";import"./AddProjectForm-CpyytDf2.js";import"./project-overview-helpers-BQTc_Ous.js";import"./api-BkjHJfgJ.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-OkTY7Szg.js";/* empty css */import"./cache-Dr0why2k.js";import"./arrow-up-right-G6bJXxhK.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-conversation-list-C-dPcjQe.js";import"./use-fleet-active-asks-BHzeBZSW.js";import"./operator-attention-BwSPeheT.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-BgM6S39l.js";import"./observe-BSWVM8YA.js";import"./agent-lanes-model-VYQ5a68i.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-Bh2FugbH.js";import"./home-live-action-BkqGLVRY.js";import"./mesh-buckets-CfAukILK.js";import"./FleetSearch-Bj9SCl2f.js";import"./use-mesh-ops-items-KmaauBr_.js";import"./left-agents-Ck4Xn-R8.js";import"./left-default-BeOyS0bR.js";import"./left-lanes-DZp3jJMo.js";import"./lane-roster-store-71vFgAem.js";import"./left-plan-3rrFENhp.js";import"./MissionLeftAgentRow-iOZ6ds9L.js";import"./page-status-D2FQLJOX.js";import"./chunk-YOZR3KYS-C13bZPVd.js";import"./arrow-down-w1HPzDSE.js";import"./terminal-relay-TffuSPGs.js";import"./session-table-BdpHs1GN.js";import"./refresh-cw-C4x1x6b_.js";import"./clock-B9ukVaVn.js";function lt(r,t){switch(r.view){case"inbox":case"activity":case"briefings":return{body:o.jsx(e,{}),footer:null};case"agents-v2":return{body:o.jsx(m,{route:r,navigate:t}),footer:null};case"agent-info":return{body:o.jsx(i,{}),footer:null};case"repos":case"repo-diff":case"code":return{body:null,footer:null};case"sessions":return{body:null,footer:null};case"terminal":return{body:o.jsx(a,{}),footer:null};case"messages":case"conversation":return{body:o.jsx(p,{}),footer:null};case"broker":case"work":case"follow":return{body:null,footer:null};case"search":return{body:null,footer:null};case"ops":return{body:o.jsx(l,{}),footer:null};case"mesh":return{body:o.jsx(s,{}),footer:o.jsx(f,{})};case"mesh-ops":return{body:o.jsx(n,{}),footer:null};case"harnesses":return{body:null,footer:null};case"settings":case"voice":return{body:null,footer:null};default:return{body:null,footer:null}}}export{lt as resolveSidebarContext};
@@ -1 +1 @@
1
- import{r as u,j as e}from"./index-BZovGpDk.js";import{u as j}from"./Provider-p-xuaAoE.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-h5zurxmi.js";import{u as w}from"./sse-Bb0EOcU9.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-BVg09D6U.js";import{C as I}from"./chevron-right-CaEwYkxE.js";import{M as C}from"./message-square-BnkG6tae.js";import"./router-63XV_E7f.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-DnFcmfMR.js";import"./DocumentFocusViewer-CZVVIAD5.js";import"./createLucideIcon-DCq_3fQn.js";import"./TextDocumentSurface-BcP9vvji.js";/* empty css */import"./file-text-BITQqGtF.js";import"./x-CrGUKNRv.js";import"./code-xml-Dbvjk9Kw.js";import"./arrow-left-CXDkJuCg.js";import"./scout-voice-D8Q5sZOL.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CHo_xmjw.js";import"./MessageComposerSuggestions-qbalTne_.js";import"./NewChatComposer-DKlNX1UA.js";import"./runtime-picker-BXKJbLot.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B-l2Wj3-.js";import"./index-DiiEQwdc.js";import"./HarnessMark-DrE57dUq.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DXPvX-hh.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./search-1QMVOxF3.js";import"./chunk-HRAB3GC3-HhKwnZCi.js";import"./index-BWHgHrtv.js";const M=5;function je(){const{route:t,navigate:s}=j(),a=t.view==="work"?t.workId:null,[r,o]=u.useState(null),i=u.useCallback(async()=>{if(!a){o(null);return}try{o(await N(`/api/work/${encodeURIComponent(a)}`))}catch{o(null)}},[a]);if(u.useEffect(()=>{i()},[i]),w(()=>{a&&i()}),t.view!=="work")return null;if(!r)return e.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-ghost)]",children:"Loading work item…"});const d=O(r.state),m=T(r.attention),f=r.ownerName??r.ownerId??"Unassigned",l=r.nextMoveOwnerName??r.nextMoveOwnerId??null,h=l!==null&&(r.ownerId??null)!==(r.nextMoveOwnerId??null)&&l!==f,k=1+(h?1:0)+(r.priority?1:0)+2+(r.parentId?1:0)+(r.conversationId?1:0);return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar text-sm",children:[e.jsx("div",{className:"sticky top-0 z-10 border-b border-[var(--scout-chrome-border-soft)] bg-black/55 px-4 py-2 backdrop-blur",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),e.jsx("span",{className:`font-mono text-xs uppercase tracking-[0.15em] ${d.text}`,children:L(r.state)}),e.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:f}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"px-1 text-[var(--scout-chrome-ink-ghost)]",children:"→"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:l})]})]}),m&&e.jsx("span",{className:"shrink-0 rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-amber-300/90",children:m})]})}),e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsxs(c,{label:"Case facts",children:[e.jsx(n,{label:"Phase",value:r.currentPhase}),e.jsx(n,{label:"Acceptance",value:r.acceptanceState.replace(/_/g," ")}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority})]}),e.jsx(c,{label:"Timeline",children:r.timeline.length===0?e.jsx("div",{className:"text-xs text-[var(--scout-chrome-ink-faint)]",children:"No activity yet."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:r.timeline.slice(0,M).map(x=>e.jsx(W,{item:x,onOpen:x.conversationId?()=>b(s,{view:"conversation",conversationId:x.conversationId},{returnTo:t}):void 0},x.id))})}),e.jsxs(c,{label:"Routing",collapsible:!0,defaultOpen:!1,count:k,children:[e.jsx(n,{label:"Owner",value:f}),h&&l&&e.jsx(n,{label:"Next move",value:l}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority}),e.jsx(n,{label:"Children",value:`${r.activeChildWorkCount}`}),e.jsx(n,{label:"Flights",value:`${r.activeFlightCount}`}),r.lastMeaningfulAt&&e.jsx(n,{label:"Last update",value:g(r.lastMeaningfulAt)}),(r.conversationId||r.parentId)&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.conversationId&&e.jsx(v,{label:"Open thread",onClick:()=>b(s,{view:"conversation",conversationId:r.conversationId},{returnTo:t})}),r.parentId&&r.parentTitle&&e.jsx(v,{label:r.parentTitle,eyebrow:"Parent",onClick:()=>b(s,{view:"work",workId:r.parentId},{returnTo:t})})]})]}),e.jsxs(c,{label:"Record",collapsible:!0,defaultOpen:!1,children:[e.jsx(n,{label:"Case ID",value:r.id}),e.jsx(n,{label:"Created",value:p(r.createdAt)}),e.jsx(n,{label:"Updated",value:p(r.updatedAt)}),e.jsx(n,{label:"Last activity",value:p(r.lastMeaningfulAt)})]}),r.lastMeaningfulSummary&&e.jsxs(c,{label:"Hudson context",collapsible:!0,defaultOpen:!1,children:[e.jsx("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:r.lastMeaningfulSummary}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Plan"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Docs"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Code"})]})]})]})]})}function L(t){switch(t){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return t.replace(/_/g," ")}}function T(t){switch(t){case"badge":return"Noteworthy";case"interrupt":return"Blocked";default:return null}}function O(t){return/complete|done|finished/i.test(t)?{dot:"bg-emerald-400",text:"text-emerald-300/90"}:/fail|error/i.test(t)?{dot:"bg-red-400",text:"text-red-300/90"}:/block|wait|pause/i.test(t)?{dot:"bg-amber-400",text:"text-amber-300/90"}:/active|working|in[_-]?progress/i.test(t)?{dot:"bg-cyan-400",text:"text-cyan-300/90"}:{dot:"bg-[var(--scout-chrome-ink-faint)]",text:"text-[var(--scout-chrome-ink)]"}}function c({label:t,children:s,collapsible:a=!1,defaultOpen:r=!0,count:o}){const[i,d]=u.useState(r);return a?e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("button",{type:"button",onClick:()=>d(m=>!m),className:"flex items-center gap-1.5 text-left text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]",children:[i?e.jsx(y,{"aria-hidden":"true",size:10,strokeWidth:2}):e.jsx(I,{"aria-hidden":"true",size:10,strokeWidth:2}),e.jsx("span",{children:t}),typeof o=="number"&&o>0&&e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0 font-mono text-3xs tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:o})]}),i&&e.jsx("div",{className:"mt-1.5",children:s})]}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),s]})}function v({label:t,eyebrow:s,onClick:a}){return e.jsxs("button",{type:"button",onClick:a,className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-white/[0.025] px-2 py-1.5 text-left hover:border-cyan-400/25 hover:bg-cyan-400/10",children:[e.jsxs("span",{className:"min-w-0",children:[s&&e.jsx("span",{className:"block font-mono text-2xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:s}),e.jsx("span",{className:"block truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:t})]}),e.jsx(C,{"aria-hidden":"true",size:11,strokeWidth:1.8,className:"shrink-0 text-cyan-300/75"})]})}function W({item:t,onOpen:s}){const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`mt-1 h-1.5 w-1.5 shrink-0 rounded-full ${A(t)}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(t.at)}),e.jsx("span",{className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:_(t)})]}),e.jsx("span",{className:"mt-0.5 block truncate text-xs font-semibold text-[var(--scout-chrome-ink-strong)]",children:t.actorName??"system"}),t.title&&e.jsx("span",{className:"mt-0.5 block truncate text-xs leading-snug text-[var(--scout-chrome-ink)]",children:t.title}),t.summary&&e.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:t.summary})]})]}),r="flex gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-1.5 first:border-t-0 first:pt-0",o=p(t.at);return s?e.jsx("button",{type:"button",onClick:s,title:o,className:`${r} text-left hover:text-cyan-300/90`,children:a}):e.jsx("div",{className:r,title:o,children:a})}function _(t){switch(t.kind){case"flight_started":return"flight started";case"flight_completed":return t.detailKind?`flight ${t.detailKind}`:"flight ended";case"message":return"message";default:return t.title??t.detailKind??"event"}}function A(t){return t.kind==="message"?"bg-cyan-400":t.kind==="flight_started"?"bg-lime-400":t.kind==="flight_completed"?t.detailKind?.includes("fail")?"bg-red-400":"bg-emerald-400":t.detailKind?.includes("interrupt")||t.detailKind?.includes("block")?"bg-amber-400":"bg-[var(--scout-chrome-ink-faint)]"}function n({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:s})]})}export{je as WorkInspector};
1
+ import{r as u,j as e}from"./index-DmFAhGPj.js";import{u as j}from"./Provider-cJCdHAxu.js";import{o as b}from"./openContent-C6XO6kr5.js";import{a as N}from"./api-h5zurxmi.js";import{u as w}from"./sse-CxXt4tqI.js";import{t as g,b as p}from"./time-Dhsh_2EG.js";import{C as y}from"./chevron-down-B3VVRJcV.js";import{C as I}from"./chevron-right-BYMV1511.js";import{M as C}from"./message-square-D1hMsMj_.js";import"./router-Cn_s9IGH.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-AmSgHklm.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-BTIErYHo.js";import"./ContextMenu-CHIuVKz7.js";import"./DocumentFocusViewer-B9vodVmG.js";import"./createLucideIcon-CFBn0Sdk.js";import"./TextDocumentSurface-BWJCGBZf.js";/* empty css */import"./file-text-DcYSrI4v.js";import"./x-C8ayPBtj.js";import"./code-xml-BFc3TMSm.js";import"./arrow-left-B-3GJ7ct.js";import"./scout-voice-CwbOz6EN.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-h1IdakpD.js";import"./MessageComposerSuggestions-FdVHnT_q.js";import"./NewChatComposer-Hd7pI5Ac.js";import"./runtime-picker--IW3cRry.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-d6PKL_KD.js";import"./index-CmwGCxUk.js";import"./HarnessMark-BPAphNjx.js";import"./conversation-model-CHwHZNw-.js";import"./NewChatOrigin-DmuJ32wa.js";import"./model-Co0zkMIc.js";import"./text-DsBWV_4k.js";import"./search-DAyagUtF.js";import"./chunk-HRAB3GC3-dRd2eQMJ.js";import"./index-BWHgHrtv.js";const M=5;function je(){const{route:t,navigate:s}=j(),a=t.view==="work"?t.workId:null,[r,o]=u.useState(null),i=u.useCallback(async()=>{if(!a){o(null);return}try{o(await N(`/api/work/${encodeURIComponent(a)}`))}catch{o(null)}},[a]);if(u.useEffect(()=>{i()},[i]),w(()=>{a&&i()}),t.view!=="work")return null;if(!r)return e.jsx("div",{className:"flex h-full items-center justify-center px-4 text-center text-sm font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-ghost)]",children:"Loading work item…"});const d=O(r.state),m=T(r.attention),f=r.ownerName??r.ownerId??"Unassigned",l=r.nextMoveOwnerName??r.nextMoveOwnerId??null,h=l!==null&&(r.ownerId??null)!==(r.nextMoveOwnerId??null)&&l!==f,k=1+(h?1:0)+(r.priority?1:0)+2+(r.parentId?1:0)+(r.conversationId?1:0);return e.jsxs("div",{className:"flex flex-col h-full overflow-y-auto frame-scrollbar text-sm",children:[e.jsx("div",{className:"sticky top-0 z-10 border-b border-[var(--scout-chrome-border-soft)] bg-black/55 px-4 py-2 backdrop-blur",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${d.dot}`}),e.jsx("span",{className:`font-mono text-xs uppercase tracking-[0.15em] ${d.text}`,children:L(r.state)}),e.jsxs("span",{className:"min-w-0 flex-1 truncate text-xs text-[var(--scout-chrome-ink-faint)]",children:[e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:f}),h&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"px-1 text-[var(--scout-chrome-ink-ghost)]",children:"→"}),e.jsx("span",{className:"text-[var(--scout-chrome-ink)]",children:l})]})]}),m&&e.jsx("span",{className:"shrink-0 rounded border border-amber-400/30 bg-amber-400/10 px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-amber-300/90",children:m})]})}),e.jsxs("div",{className:"flex flex-col gap-4 p-4",children:[e.jsxs(c,{label:"Case facts",children:[e.jsx(n,{label:"Phase",value:r.currentPhase}),e.jsx(n,{label:"Acceptance",value:r.acceptanceState.replace(/_/g," ")}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority})]}),e.jsx(c,{label:"Timeline",children:r.timeline.length===0?e.jsx("div",{className:"text-xs text-[var(--scout-chrome-ink-faint)]",children:"No activity yet."}):e.jsx("div",{className:"flex flex-col gap-1.5",children:r.timeline.slice(0,M).map(x=>e.jsx(W,{item:x,onOpen:x.conversationId?()=>b(s,{view:"conversation",conversationId:x.conversationId},{returnTo:t}):void 0},x.id))})}),e.jsxs(c,{label:"Routing",collapsible:!0,defaultOpen:!1,count:k,children:[e.jsx(n,{label:"Owner",value:f}),h&&l&&e.jsx(n,{label:"Next move",value:l}),r.priority&&e.jsx(n,{label:"Priority",value:r.priority}),e.jsx(n,{label:"Children",value:`${r.activeChildWorkCount}`}),e.jsx(n,{label:"Flights",value:`${r.activeFlightCount}`}),r.lastMeaningfulAt&&e.jsx(n,{label:"Last update",value:g(r.lastMeaningfulAt)}),(r.conversationId||r.parentId)&&e.jsxs("div",{className:"mt-2 flex flex-col gap-1.5",children:[r.conversationId&&e.jsx(v,{label:"Open thread",onClick:()=>b(s,{view:"conversation",conversationId:r.conversationId},{returnTo:t})}),r.parentId&&r.parentTitle&&e.jsx(v,{label:r.parentTitle,eyebrow:"Parent",onClick:()=>b(s,{view:"work",workId:r.parentId},{returnTo:t})})]})]}),e.jsxs(c,{label:"Record",collapsible:!0,defaultOpen:!1,children:[e.jsx(n,{label:"Case ID",value:r.id}),e.jsx(n,{label:"Created",value:p(r.createdAt)}),e.jsx(n,{label:"Updated",value:p(r.updatedAt)}),e.jsx(n,{label:"Last activity",value:p(r.lastMeaningfulAt)})]}),r.lastMeaningfulSummary&&e.jsxs(c,{label:"Hudson context",collapsible:!0,defaultOpen:!1,children:[e.jsx("div",{className:"text-sm italic leading-relaxed text-[var(--scout-chrome-ink-soft)]",children:r.lastMeaningfulSummary}),e.jsxs("div",{className:"mt-2 flex gap-1.5",children:[e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Plan"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Docs"}),e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1.5 py-0.5 font-mono text-2xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:"Code"})]})]})]})]})}function L(t){switch(t){case"review":return"In review";case"waiting":return"Waiting";case"working":return"Working";case"done":return"Done";default:return t.replace(/_/g," ")}}function T(t){switch(t){case"badge":return"Noteworthy";case"interrupt":return"Blocked";default:return null}}function O(t){return/complete|done|finished/i.test(t)?{dot:"bg-emerald-400",text:"text-emerald-300/90"}:/fail|error/i.test(t)?{dot:"bg-red-400",text:"text-red-300/90"}:/block|wait|pause/i.test(t)?{dot:"bg-amber-400",text:"text-amber-300/90"}:/active|working|in[_-]?progress/i.test(t)?{dot:"bg-cyan-400",text:"text-cyan-300/90"}:{dot:"bg-[var(--scout-chrome-ink-faint)]",text:"text-[var(--scout-chrome-ink)]"}}function c({label:t,children:s,collapsible:a=!1,defaultOpen:r=!0,count:o}){const[i,d]=u.useState(r);return a?e.jsxs("div",{className:"flex flex-col",children:[e.jsxs("button",{type:"button",onClick:()=>d(m=>!m),className:"flex items-center gap-1.5 text-left text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)] hover:text-[var(--scout-chrome-ink)]",children:[i?e.jsx(y,{"aria-hidden":"true",size:10,strokeWidth:2}):e.jsx(I,{"aria-hidden":"true",size:10,strokeWidth:2}),e.jsx("span",{children:t}),typeof o=="number"&&o>0&&e.jsx("span",{className:"rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0 font-mono text-3xs tracking-[0.1em] text-[var(--scout-chrome-ink-faint)]",children:o})]}),i&&e.jsx("div",{className:"mt-1.5",children:s})]}):e.jsxs("div",{className:"flex flex-col",children:[e.jsx("div",{className:"mb-1.5 text-2xs font-mono uppercase tracking-[0.15em] text-[var(--scout-chrome-ink-faint)]",children:t}),s]})}function v({label:t,eyebrow:s,onClick:a}){return e.jsxs("button",{type:"button",onClick:a,className:"flex items-center justify-between gap-2 rounded border border-[var(--scout-chrome-border-soft)] bg-white/[0.025] px-2 py-1.5 text-left hover:border-cyan-400/25 hover:bg-cyan-400/10",children:[e.jsxs("span",{className:"min-w-0",children:[s&&e.jsx("span",{className:"block font-mono text-2xs uppercase tracking-[0.14em] text-[var(--scout-chrome-ink-faint)]",children:s}),e.jsx("span",{className:"block truncate font-mono text-xs text-[var(--scout-chrome-ink)]",children:t})]}),e.jsx(C,{"aria-hidden":"true",size:11,strokeWidth:1.8,className:"shrink-0 text-cyan-300/75"})]})}function W({item:t,onOpen:s}){const a=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:`mt-1 h-1.5 w-1.5 shrink-0 rounded-full ${A(t)}`}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex items-center justify-between gap-2",children:[e.jsx("span",{className:"font-mono text-2xs text-[var(--scout-chrome-ink-faint)]",children:g(t.at)}),e.jsx("span",{className:"shrink-0 rounded border border-[var(--scout-chrome-border-soft)] px-1 py-0.5 font-mono text-3xs uppercase tracking-[0.12em] text-[var(--scout-chrome-ink-faint)]",children:_(t)})]}),e.jsx("span",{className:"mt-0.5 block truncate text-xs font-semibold text-[var(--scout-chrome-ink-strong)]",children:t.actorName??"system"}),t.title&&e.jsx("span",{className:"mt-0.5 block truncate text-xs leading-snug text-[var(--scout-chrome-ink)]",children:t.title}),t.summary&&e.jsx("span",{className:"mt-0.5 block text-xs leading-relaxed text-[var(--scout-chrome-ink-faint)]",style:{display:"-webkit-box",WebkitBoxOrient:"vertical",WebkitLineClamp:2,overflow:"hidden"},children:t.summary})]})]}),r="flex gap-2 border-t border-[var(--scout-chrome-border-soft)] pt-1.5 first:border-t-0 first:pt-0",o=p(t.at);return s?e.jsx("button",{type:"button",onClick:s,title:o,className:`${r} text-left hover:text-cyan-300/90`,children:a}):e.jsx("div",{className:r,title:o,children:a})}function _(t){switch(t.kind){case"flight_started":return"flight started";case"flight_completed":return t.detailKind?`flight ${t.detailKind}`:"flight ended";case"message":return"message";default:return t.title??t.detailKind??"event"}}function A(t){return t.kind==="message"?"bg-cyan-400":t.kind==="flight_started"?"bg-lime-400":t.kind==="flight_completed"?t.detailKind?.includes("fail")?"bg-red-400":"bg-emerald-400":t.detailKind?.includes("interrupt")||t.detailKind?.includes("block")?"bg-amber-400":"bg-[var(--scout-chrome-ink-faint)]"}function n({label:t,value:s}){return e.jsxs("div",{className:"flex items-baseline justify-between py-0.5 gap-2",children:[e.jsx("span",{className:"shrink-0 text-xs font-mono uppercase tracking-wider text-[var(--scout-chrome-ink-faint)]",children:t}),e.jsx("span",{className:"truncate text-sm font-mono text-[var(--scout-chrome-ink)]",children:s})]})}export{je as WorkInspector};