@openscout/scout 0.2.96 → 0.2.97
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.
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/{ActivityScreen-BnoaUkVZ.js → ActivityScreen-y-5DLleY.js} +1 -1
- package/dist/client/assets/{AddProjectForm-IqOtJfRs.js → AddProjectForm-r_1tVuWk.js} +1 -1
- package/dist/client/assets/{AgentAvatar-6-KBVKUu.js → AgentAvatar-B7c0egdP.js} +1 -1
- package/dist/client/assets/{AgentConfigurationScreen-CuZJy07q.js → AgentConfigurationScreen-BD7Unt2P.js} +1 -1
- package/dist/client/assets/{AgentDefinitionsWorkspace-Iyl4BesU.js → AgentDefinitionsWorkspace-BbcZc9Xk.js} +1 -1
- package/dist/client/assets/{AgentDetailCard-C9rn3Fj5.js → AgentDetailCard-B_KLcgsP.js} +1 -1
- package/dist/client/assets/{AgentFloorView-YT-Jjccf.js → AgentFloorView-DMFiHs21.js} +1 -1
- package/dist/client/assets/{AgentInfoScreen-Dr99gQEZ.js → AgentInfoScreen-DHGLRddI.js} +1 -1
- package/dist/client/assets/{AgentLaneCard-DI2iW9zO.js → AgentLaneCard-ajZvcfdW.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D8bARHMx.js → AgentLaneChrome-CTp39syR.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-52un7dKC.js → AgentLaneDetailSheet-DRc-TpMB.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-CEBjmPTa.js → AgentLaneSummaryResize-VMNDo7kD.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-q20mTjms.js → AgentLanesPreflight-CFadSaia.js} +1 -1
- package/dist/client/assets/{AgentLanesView-CetZZDyF.js → AgentLanesView-u5vpLwQf.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-DrEJDJef.js → AgentLiveActions-CsQA3pu_.js} +1 -1
- package/dist/client/assets/{AgentMasterScreen-DJPnstoD.js → AgentMasterScreen-C5WlWNmk.js} +1 -1
- package/dist/client/assets/{AgentSessions-DCPCG4xb.js → AgentSessions-BePq5Lgc.js} +1 -1
- package/dist/client/assets/{AgentsConsole-CsYOoFJi.js → AgentsConsole-BuiZ_bDo.js} +1 -1
- package/dist/client/assets/{AgentsScreen-k8LvBuU_.js → AgentsScreen-CRi-hG2k.js} +1 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +1 -0
- package/dist/client/assets/{AstronautSuit-DbjQtfD_.js → AstronautSuit-Cjjcv6yQ.js} +1 -1
- package/dist/client/assets/{AtopView-Daq_ob3z.js → AtopView-PxWQd-sX.js} +1 -1
- package/dist/client/assets/{BackToPicker-CXZjBRAe.js → BackToPicker-Cto0Ioz9.js} +1 -1
- package/dist/client/assets/{BriefingDetailScreen-CUCXO-KH.js → BriefingDetailScreen-C29smC5d.js} +1 -1
- package/dist/client/assets/{BriefingsScreen-B5oMTGKv.js → BriefingsScreen-DNyFBrPn.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-BsiU8lTD.js → BrokerMetadataPanel-DbaCQlhw.js} +1 -1
- package/dist/client/assets/{BrokerScreen-BPbOHhCS.js → BrokerScreen-CS0s4Gm4.js} +1 -1
- package/dist/client/assets/{CastPicker-_5E5hNUe.js → CastPicker-CTBHjjGw.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-D-eXhzPf.js → ChatCollapsedStrip-D4rc7wBQ.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-n7W4iGUG.js → CodeDiffPane-QvxCUzTi.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-CMsbSTDq.js → CodeProjectPicker-DplkpM7f.js} +1 -1
- package/dist/client/assets/{CodeScreen-CeuO3EhR.js → CodeScreen-CrR2JaVj.js} +1 -1
- package/dist/client/assets/{ConversationComposer-CXPKx86g.js → ConversationComposer-H8_hsYSc.js} +1 -1
- package/dist/client/assets/{ConversationFeedRows-WrH-YI3L.js → ConversationFeedRows-hlEFlURs.js} +1 -1
- package/dist/client/assets/{ConversationHeader-BQWzGzLK.js → ConversationHeader-B0ZBhE_E.js} +1 -1
- package/dist/client/assets/{ConversationPanels-Dujvnmup.js → ConversationPanels-fMo6Uy1v.js} +2 -2
- package/dist/client/assets/{ConversationScreen-CR9pWB65.js → ConversationScreen-CXAHQwQ3.js} +1 -1
- package/dist/client/assets/{ConversationStatus-DVzSb2Hv.js → ConversationStatus-DI5GCiyW.js} +1 -1
- package/dist/client/assets/{CrewAvatar-BwXjyg8N.js → CrewAvatar-CXJHLNVM.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +1 -0
- package/dist/client/assets/{DataTable-Bp8tU9AK.js → DataTable-DXIlOlVu.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-B-6rmXzL.js → DispatchAftermath-CrELgl2e.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-Do3wQ_3Z.js → DocumentFocusViewer-DFFE85Tq.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-C1orRyP9.js → EmbeddableSurfacesLab-DgpewB3y.js} +1 -1
- package/dist/client/assets/{EmptyState-CJzXj1l5.js → EmptyState-D9X16fKq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-Df6VzXjA.js → FileViewerPane-CY0RN78e.js} +1 -1
- package/dist/client/assets/{FlightObserveScreen-6mGnmWQA.js → FlightObserveScreen-qyzHzxLa.js} +1 -1
- package/dist/client/assets/{FollowScreen-DvnxYLVh.js → FollowScreen-wZ-z67mX.js} +1 -1
- package/dist/client/assets/{HarnessMark-B979GCSB.js → HarnessMark-DAaWPiT_.js} +1 -1
- package/dist/client/assets/{HarnessesScreen-CHTuv8p6.js → HarnessesScreen-DbKkQM4o.js} +1 -1
- package/dist/client/assets/{HerdrSession-B3McuYgi.js → HerdrSession-CYKRfBad.js} +1 -1
- package/dist/client/assets/{HomeHero-CdUVPjkG.js → HomeHero-DYyd3cpz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-Bok5Sk5c.js → HostAdvisorView-NtM0bsg8.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-B7XSoJsu.js → KnowledgeSearchInspector-CU6BCFcS.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchScreen-D3o3IODW.js → KnowledgeSearchScreen-DvbRRPQB.js} +1 -1
- package/dist/client/assets/{LaneToolHoverCard-HByf2ndx.js → LaneToolHoverCard-Bo2Zl-1a.js} +1 -1
- package/dist/client/assets/{LaneTraceDetailSheet-BUgHz-sd.js → LaneTraceDetailSheet-C3C8UjXv.js} +1 -1
- package/dist/client/assets/{LaneTraceEventFocus-DM-hoPxG.js → LaneTraceEventFocus-Cek_64zR.js} +1 -1
- package/dist/client/assets/{MeshCanvas-DCLJRsBy.js → MeshCanvas-TvsID4fe.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-cEFS9eW7.js → MeshCanvasMinimap-CxqeVVco.js} +1 -1
- package/dist/client/assets/{MeshScreen-BcxPkhm6.js → MeshScreen-BJ-j9YXv.js} +1 -1
- package/dist/client/assets/{MeshTopologyView-CCRPd8PU.js → MeshTopologyView-BjprutE8.js} +2 -2
- package/dist/client/assets/{MessagesScreen-Bb5l13MO.js → MessagesScreen-CyNIZ3-X.js} +1 -1
- package/dist/client/assets/{MissionContextRail-DF0_kiU7.js → MissionContextRail-Be0uXljQ.js} +1 -1
- package/dist/client/assets/{MissionControlView-E3V7bENU.js → MissionControlView-Bj7cAbZd.js} +1 -1
- package/dist/client/assets/{MissionFocusOverlay-h15sQFvP.js → MissionFocusOverlay-DvTw6ts5.js} +1 -1
- package/dist/client/assets/{MissionLeftAgentRow-KPdk9rSa.js → MissionLeftAgentRow-B0QG7Gys.js} +1 -1
- package/dist/client/assets/{MissionLogPane-BbdDKjUl.js → MissionLogPane-EsM_S3ro.js} +1 -1
- package/dist/client/assets/{NewAgentModal-DfHxad34.js → NewAgentModal-Cqiq1CE1.js} +1 -1
- package/dist/client/assets/{NewChatComposer-_Stj0fZy.js → NewChatComposer-C_1op4dH.js} +1 -1
- package/dist/client/assets/{NewChatOrigin-B1u7ki70.js → NewChatOrigin-D7hwp6dm.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-Co0xTii6.js → ObserveEmbedScreen-CGHI_hb5.js} +1 -1
- package/dist/client/assets/{ObserveTextFlow-ZQWwrK3i.js → ObserveTextFlow-BcrGQet8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BJUhDSuQ.js → ObservedTopologyPanel-BhVsvwkh.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-CUd2yOLu.js → OpenScoutAppShell-BtfvMkAp.js} +1 -1
- package/dist/client/assets/{OpsAgentsView-DI5wu1si.js → OpsAgentsView-DBYtmLnh.js} +1 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +1 -0
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-k2QHHHsQ.js → ProjectAgentProfileBar-uJw9Wdfk.js} +1 -1
- package/dist/client/assets/{ProjectAgentProfileHero-Bpxk1ui2.js → ProjectAgentProfileHero-CIMS4Dy_.js} +1 -1
- package/dist/client/assets/{ProjectsInbox-C_bMHLCc.js → ProjectsInbox-JgU0lrY8.js} +1 -1
- package/dist/client/assets/{ProjectsRail-J-aH_pxT.js → ProjectsRail-p99BRBOa.js} +1 -1
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +1 -0
- package/dist/client/assets/{ProjectsThreadAside-_ourdM-Q.js → ProjectsThreadAside-BHDTJWOz.js} +1 -1
- package/dist/client/assets/{Provider-CtXJeLrP.js → Provider-Bu-C8Hxc.js} +1 -1
- package/dist/client/assets/{RailRow-CEH2MFBw.js → RailRow-ClMmtaIE.js} +1 -1
- package/dist/client/assets/{RawSessionsTable-CDyrom-F.js → RawSessionsTable-BtKdQPiv.js} +1 -1
- package/dist/client/assets/{RealtimeVoiceScreen-DBl3DN1H.js → RealtimeVoiceScreen-KPHJgO1l.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-kY2pHjIs.js → RepoDiffEmbedScreen-CjZ5ew3y.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-C6LhoKrn.js → RepoDiffPageScreen-CdTFfmbk.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-BhcIIQQg.js → RepoDiffViewer-BFperHQg.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-Csy_j9LD.js → RepoDiffViewerLazy-BkBmbi1Z.js} +2 -2
- package/dist/client/assets/{ReposScreen-B_cB0zu7.js → ReposScreen-C8dT4bK0.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-CSy_fjcG.js → ScoutDeckSurface-BcJsm2Kq.js} +1 -1
- package/dist/client/assets/{ScoutSurface-CQVcSrin.js → ScoutSurface-DmzEtrx8.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DqGiLYNy.js → ScoutbotFxLab-DU15Plja.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BR4VRdgh.js → SecondaryNav-BrXMtvKE.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-BTlZ9gAg.js → SessionEmbedScreen-Bt4flmAx.js} +1 -1
- package/dist/client/assets/{SessionObserve-dQDN23pP.js → SessionObserve-BCehTlO8.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-BRBGKAgd.js → SessionObserveEvidence-Bb6U-dem.js} +1 -1
- package/dist/client/assets/{SessionRefScreen-COVQMbtE.js → SessionRefScreen-C8BiRVPx.js} +1 -1
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +1 -0
- package/dist/client/assets/{SettingsDrawer-RGVK_bmE.js → SettingsDrawer-BieUmb8g.js} +1 -1
- package/dist/client/assets/{SettingsScreen-CCxzy5IU.js → SettingsScreen-3JvX1WFL.js} +1 -1
- package/dist/client/assets/{ShikiPane-DYI9Hkge.js → ShikiPane-DPWsVNtn.js} +1 -1
- package/dist/client/assets/{SlidePanel-B9ugxWgA.js → SlidePanel-BMRIR6bH.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-z5hHesx9.js → SpriteAvatar-56DTXxSV.js} +1 -1
- package/dist/client/assets/{StatusPill-BFvMjmZV.js → StatusPill-BcuYUgsD.js} +1 -1
- package/dist/client/assets/{TailView-0uEIj2JH.js → TailView-BDy8c2VB.js} +1 -1
- package/dist/client/assets/{Terminal-DouZeNxc.js → Terminal-BlUQY9_Z.js} +1 -1
- package/dist/client/assets/{TerminalEmbedScreen-dMNUbzXr.js → TerminalEmbedScreen-DTjxktyr.js} +1 -1
- package/dist/client/assets/{TerminalHeaderMount-BL07cd0q.js → TerminalHeaderMount-Cy-uxkey.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BflAwXeZ.js → TextDocumentSurface-BeSwe3Yl.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BTnjOQi0.js → TmuxPeek-B4no_aGI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CgQ6GGS-.js → VoicePermissionsPanel-Bd16scwz.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CaLG-zDs.js → WorkDetailScreen-DIFQufak.js} +1 -1
- package/dist/client/assets/{WorkFilesViewer-B9Sil_No.js → WorkFilesViewer-CT5XEFGf.js} +1 -1
- package/dist/client/assets/{activity-DcrMApUY.js → activity-CqZafWfx.js} +1 -1
- package/dist/client/assets/{addon-fit-DMVrz5Sv.js → addon-fit-CM6F_JRD.js} +1 -1
- package/dist/client/assets/{addon-webgl-BYvpZUyu.js → addon-webgl-DRTiePFC.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-B-5QTeas.js → agent-autocomplete-DXUBnlkN.js} +1 -1
- package/dist/client/assets/{agent-essentials-D7KRGYvF.js → agent-essentials-vytdybaX.js} +1 -1
- package/dist/client/assets/{agent-master-model-DqjrVI2h.js → agent-master-model-DAZL92oe.js} +1 -1
- package/dist/client/assets/{agent-specialization-BujJVUTD.js → agent-specialization-BtxLN4UR.js} +1 -1
- package/dist/client/assets/agents-project-DgbqDc65.css +1 -0
- package/dist/client/assets/{arc.es-NHqHWohb.js → arc.es-Bh84oHJ7.js} +1 -1
- package/dist/client/assets/{arrow-down-CKtSUjmW.js → arrow-down-DvTsLokL.js} +1 -1
- package/dist/client/assets/{arrow-left-Czpf-AE4.js → arrow-left-DHfdXJVZ.js} +1 -1
- package/dist/client/assets/{arrow-right-BuzMnLYP.js → arrow-right-BBsrogWf.js} +1 -1
- package/dist/client/assets/{arrow-up-right-C6Wl-1uw.js → arrow-up-right-CY0Vw_67.js} +1 -1
- package/dist/client/assets/{bot-rd0awxD3.js → bot-DzkOUFBb.js} +1 -1
- package/dist/client/assets/{check-ofKUE8yH.js → check-DbIkldnK.js} +1 -1
- package/dist/client/assets/{chevron-down-wciXnOQz.js → chevron-down-C475vltS.js} +1 -1
- package/dist/client/assets/{chevron-right-D-HdlPg8.js → chevron-right-CnZRSd-V.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-Tyv9rzx7.js → chunk-HRAB3GC3-DLNT8aOo.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-BC2Mandc.js → chunk-JTPDIGGW-Ci5j4vzV.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-C1AWTYZZ.js → chunk-T65CQEWV-BtNvicWs.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-DwHPHa6f.js → chunk-YOZR3KYS-DN5EJulq.js} +1 -1
- package/dist/client/assets/{clock-B88r8OrZ.js → clock-DVvENUU5.js} +1 -1
- package/dist/client/assets/{code-xml-D7pOQM9l.js → code-xml-CvKBY3KA.js} +1 -1
- package/dist/client/assets/{compass-Dt1AMXz2.js → compass-BcRI_YXo.js} +1 -1
- package/dist/client/assets/content--T3p6akp.js +1 -0
- package/dist/client/assets/content-4nFMLuzF.js +1 -0
- package/dist/client/assets/content-BJ4nHvcu.js +1 -0
- package/dist/client/assets/{content-nkx0swDe.js → content-BNyAjpUl.js} +1 -1
- package/dist/client/assets/content-BmGp9wNl.js +1 -0
- package/dist/client/assets/content-CBWhwaRo.js +1 -0
- package/dist/client/assets/{content-C9ijJxyl.js → content-CQlykFbe.js} +1 -1
- package/dist/client/assets/content-CevL0DgF.js +1 -0
- package/dist/client/assets/content-Ch8pf2bj.js +1 -0
- package/dist/client/assets/content-Cpvdcm_l.js +1 -0
- package/dist/client/assets/content-DfS3vgAu.js +1 -0
- package/dist/client/assets/content-DpQdNePJ.js +1 -0
- package/dist/client/assets/content-Dqpibejl.js +1 -0
- package/dist/client/assets/content-TV0nd6-r.js +1 -0
- package/dist/client/assets/{content-BWPNyXJ0.js → content-odbb5H4U.js} +1 -1
- package/dist/client/assets/content-uXHLPHe0.js +1 -0
- package/dist/client/assets/{conversation-icons-tp9BX6X2.js → conversation-icons-CBMKBGHd.js} +1 -1
- package/dist/client/assets/{conversation-model-Dc02NsGp.js → conversation-model-QsJVfSeG.js} +1 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +1 -0
- package/dist/client/assets/{copy-CWWAJ75H.js → copy-Cj-owMb-.js} +1 -1
- package/dist/client/assets/{cpu-DrqejfkB.js → cpu-DuD3RFX5.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DezKXSG2.js → createLucideIcon-DthwWQIg.js} +1 -1
- package/dist/client/assets/{discover-C2CZO4Tk.js → discover-B3uQlh5L.js} +2 -2
- package/dist/client/assets/embed-entry-DkRcHKTh.js +2 -0
- package/dist/client/assets/{external-link-Dp_a2vRZ.js → external-link-C_nxk0MJ.js} +1 -1
- package/dist/client/assets/{eye-BRyD0jno.js → eye-FnaaPfja.js} +1 -1
- package/dist/client/assets/{file-code-corner-muIVH_xO.js → file-code-corner-DDPq4Cur.js} +1 -1
- package/dist/client/assets/{file-text-CqJgwxmv.js → file-text--hfhwZH1.js} +1 -1
- package/dist/client/assets/{gauge-hU--hKVP.js → gauge-BVEknshP.js} +1 -1
- package/dist/client/assets/{gestures-DN4hEeqv.js → gestures-3gw5VgUS.js} +1 -1
- package/dist/client/assets/{git-branch-CK5v8F2v.js → git-branch-DJyvr0k-.js} +1 -1
- package/dist/client/assets/{home-moving-signal-BjDtEJUP.js → home-moving-signal-BPqBoNSm.js} +1 -1
- package/dist/client/assets/{home-now-card-nF8OotI-.js → home-now-card-UspVW2-2.js} +1 -1
- package/dist/client/assets/{home-now-card-nano-C-r_bBg5.js → home-now-card-nano-G8kMB32m.js} +1 -1
- package/dist/client/assets/{hooks-D46bABUP.js → hooks-BMsQzo9j.js} +1 -1
- package/dist/client/assets/{index-DvLtl7rV.js → index-BI9AljSD.js} +2 -2
- package/dist/client/assets/{index-kL1WLbeS.js → index-C-v0Z6ZS.js} +1 -1
- package/dist/client/assets/{index-CPrU5q04.js → index-D9DzUORB.js} +1 -1
- package/dist/client/assets/index-DfsTyYDx.js +1 -0
- package/dist/client/assets/{inspector-panel-Dkc7rLvY.js → inspector-panel-CFSArQ8Y.js} +1 -1
- package/dist/client/assets/{keyboard-nav-BLYDhL3Z.js → keyboard-nav-e6yGeorb.js} +1 -1
- package/dist/client/assets/{lane-roster-store-DOdI1O13.js → lane-roster-store-Q7pcblY5.js} +1 -1
- package/dist/client/assets/{layers-CSsg3JVP.js → layers-Dz2dKOnU.js} +1 -1
- package/dist/client/assets/{layout-grid-DOChPJdZ.js → layout-grid-Bvs5fdB4.js} +1 -1
- package/dist/client/assets/{left-BNRFiRsb.js → left-B4Ak-Ibt.js} +1 -1
- package/dist/client/assets/{left-BggzhgXN.js → left-BMb493FZ.js} +1 -1
- package/dist/client/assets/{left-YT7mIGuH.js → left-BjFLvVOC.js} +1 -1
- package/dist/client/assets/{left-B3wSE6ql.js → left-CsXQ8Q3G.js} +1 -1
- package/dist/client/assets/left-FNH7faCI.js +1 -0
- package/dist/client/assets/{left-CARCvvxS.js → left-POkqE8gI.js} +1 -1
- package/dist/client/assets/{left-CpokZYHt.js → left-UulOTcWh.js} +1 -1
- package/dist/client/assets/{left-advisor-CCY0vkcO.js → left-advisor-CJkQS2d6.js} +1 -1
- package/dist/client/assets/{left-agents-trhO5sL8.js → left-agents-CFMxyEjT.js} +1 -1
- package/dist/client/assets/{left-default-CG33elBs.js → left-default-rnX5HANc.js} +1 -1
- package/dist/client/assets/{left-lanes-CitMgeTp.js → left-lanes-BpLXT_qH.js} +1 -1
- package/dist/client/assets/{left-mission-Zl2m_5eU.js → left-mission-B0bhseWw.js} +1 -1
- package/dist/client/assets/library-D1iXfda2.js +1 -0
- package/dist/client/assets/{loader-circle-pM56HNhR.js → loader-circle-B2W9DPG5.js} +1 -1
- package/dist/client/assets/{local-agents-C8xAhbO5.js → local-agents-DKr-gIDC.js} +1 -1
- package/dist/client/assets/{mentions-DG6OQrsc.js → mentions-DuLQnEcn.js} +1 -1
- package/dist/client/assets/{mesh-ops-BZ1h5RQs.js → mesh-ops-CRR-KnCG.js} +1 -1
- package/dist/client/assets/{mesh-view-store-ChUOASK8.js → mesh-view-store-CiET-yN8.js} +1 -1
- package/dist/client/assets/{message-circle-mZCv8tvB.js → message-circle-B2DoYKDO.js} +1 -1
- package/dist/client/assets/{message-markup-C2LQDm_k.js → message-markup-Cc_O-WdA.js} +1 -1
- package/dist/client/assets/{message-square-C7t_qtuj.js → message-square-O-Hu9Mk2.js} +1 -1
- package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-DDAgWKUl.js} +1 -1
- package/dist/client/assets/{observe-BpEm1INu.js → observe-Da2mRAsc.js} +1 -1
- package/dist/client/assets/{page-status-E5jnk48p.js → page-status-Crtgjbq3.js} +1 -1
- package/dist/client/assets/{paperclip-C64lkcbM.js → paperclip-BudMKSyr.js} +1 -1
- package/dist/client/assets/{persistent-state-EHXw8WNy.js → persistent-state-xJz-qAFc.js} +1 -1
- package/dist/client/assets/{plus-Co-dqKul.js → plus-BJ1If8vj.js} +1 -1
- package/dist/client/assets/{profile-APxDsN2P.js → profile-B3qDSbrH.js} +1 -1
- package/dist/client/assets/{projects-inbox-Cg4X2lUQ.js → projects-inbox-CLek3QaG.js} +1 -1
- package/dist/client/assets/{proxy-BiW5suC7.js → proxy-1BABCaDb.js} +1 -1
- package/dist/client/assets/{radio-BOxBQX-T.js → radio-B5OpHrrK.js} +1 -1
- package/dist/client/assets/{refresh-cw-DMxGzDwn.js → refresh-cw-DmNAhaH0.js} +1 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +1 -0
- package/dist/client/assets/{right-Bmfd3pjP.js → right-BgJ4mQLf.js} +1 -1
- package/dist/client/assets/{right-Dz_xD0Vj.js → right-Bk6h7o-Z.js} +1 -1
- package/dist/client/assets/{right-CkCCPbCX.js → right-BrICCmEt.js} +1 -1
- package/dist/client/assets/{right-CdkcrmeD.js → right-C1QIbqFZ.js} +1 -1
- package/dist/client/assets/{right-BwlW6E57.js → right-CfliKiHY.js} +1 -1
- package/dist/client/assets/{right-BuCgE0fZ.js → right-CtOLXB9s.js} +1 -1
- package/dist/client/assets/{right-CimaAvQN.js → right-D8id_DWQ.js} +1 -1
- package/dist/client/assets/{right-C0ybUw0j.js → right-DJ34yMAi.js} +1 -1
- package/dist/client/assets/{right-D3eSiy41.js → right-DiFmtw6d.js} +1 -1
- package/dist/client/assets/{right-BqI-nr9G.js → right-Lx79pxpG.js} +1 -1
- package/dist/client/assets/{rocket-BQm5_CvR.js → rocket-D3-TUJ2m.js} +1 -1
- package/dist/client/assets/{router-B9vQkNJL.js → router-DTtux5sP.js} +1 -1
- package/dist/client/assets/{scope-views-1IYJdl41.js → scope-views-CPM0sBw_.js} +1 -1
- package/dist/client/assets/{scout-voice-BVUqGhth.js → scout-voice-BZKsdquE.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-BQ_Ee2Ic.js → scoutbot-markdown-CQ7Y1McC.js} +1 -1
- package/dist/client/assets/{scroll-text-Dze_dXtQ.js → scroll-text-kPhYbh-M.js} +1 -1
- package/dist/client/assets/{search-CDko0PKE.js → search-DmFM_9jm.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-BoQ_zYR9.js → secondaryNavConfig-C9bQ9_IA.js} +1 -1
- package/dist/client/assets/{selection-bridge-Din6yV3h.js → selection-bridge-Dy2mtMyi.js} +1 -1
- package/dist/client/assets/{send-horizontal-CSjIm6xg.js → send-horizontal-qyjNgEaV.js} +1 -1
- package/dist/client/assets/{server-Bzj7lPIx.js → server-nWqndnxu.js} +1 -1
- package/dist/client/assets/{session-catalog-DsaZJXZt.js → session-catalog-BkmktBHI.js} +1 -1
- package/dist/client/assets/{session-table-BQfR7u6r.js → session-table-DKSF0mrS.js} +1 -1
- package/dist/client/assets/{settings-Dyvpkb1D.js → settings-C6h9y5XX.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-C8njVwfg.js → sliders-horizontal-BhHKxsCO.js} +1 -1
- package/dist/client/assets/{sparkles-CETYrxGA.js → sparkles-Cf8gin88.js} +1 -1
- package/dist/client/assets/{sse-CD9MMUxl.js → sse-DDHEHUgz.js} +1 -1
- package/dist/client/assets/{tail-events-Ps8KpKah.js → tail-events-BdUrO0kb.js} +1 -1
- package/dist/client/assets/{terminal-9GRS_Qdc.js → terminal-C3YRPfyz.js} +1 -1
- package/dist/client/assets/{terminal-relay-GYMIvKs1.js → terminal-relay-BFhdIstF.js} +1 -1
- package/dist/client/assets/{terminal-takeover-_Jyys4me.js → terminal-takeover-B6H4llRR.js} +1 -1
- package/dist/client/assets/{text-BP3oyl8-.js → text-Faa3ZStB.js} +1 -1
- package/dist/client/assets/{use-conversation-list-C9ABzjXI.js → use-conversation-list-DO5J8T1H.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DAspZQjE.js → use-fleet-active-asks-BtgNnRgK.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Dh54ymEp.js → use-mesh-ops-items-N1HHhChY.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-x8pJMVrG.js → use-reduced-motion-8WuxLa5l.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-DhCbiDK3.js → use-scout-dev-flags-B31qTy6m.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-DoBwV0LX.js → useAgentHoverCard-Bkv-Uz_V.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-ejq9dCWV.js → usePierreRuntime-BfZHKAkI.js} +1 -1
- package/dist/client/assets/{wrench-DjkoAOQt.js → wrench-DkxnZRlR.js} +1 -1
- package/dist/client/assets/{x-CAbNespN.js → x-DfRJbqrh.js} +1 -1
- package/dist/client/assets/{xterm-Cf-ngcGP.js → xterm-CJw8Epxv.js} +1 -1
- package/dist/client/assets/{zap-Cq8eWkcF.js → zap-CIo8msJB.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +65 -21
- package/dist/pairing-runtime-controller.mjs +8 -0
- package/dist/runtime/broker-daemon.mjs +58 -10
- package/dist/scout-control-plane-web.mjs +8 -0
- package/package.json +2 -2
- package/dist/client/assets/AgentLanesEmbedScreen-Dgcm7zd_.js +0 -1
- package/dist/client/assets/AgentsSubnav-C4xpQhsv.js +0 -1
- package/dist/client/assets/CrewWorkspaces-CkQDhyie.css +0 -1
- package/dist/client/assets/CrewWorkspaces-NKujRzwh.js +0 -1
- package/dist/client/assets/OpsScreen-D8fQafCl.js +0 -1
- package/dist/client/assets/OpsSubnav-1K4Jaf__.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-Bdjd_dAx.js +0 -1
- package/dist/client/assets/ProjectsScreen-cVUkGbPz.js +0 -1
- package/dist/client/assets/SessionsScreen--5OJ3p3v.js +0 -1
- package/dist/client/assets/agents-project-COzHxZAF.css +0 -1
- package/dist/client/assets/content-9K38QchR.js +0 -1
- package/dist/client/assets/content-BRgnyXWh.js +0 -1
- package/dist/client/assets/content-BdkI07v3.js +0 -1
- package/dist/client/assets/content-C4oWa8SB.js +0 -1
- package/dist/client/assets/content-CFZ4rghn.js +0 -1
- package/dist/client/assets/content-CIqu_Ci_.js +0 -1
- package/dist/client/assets/content-CnJF9DGO.js +0 -1
- package/dist/client/assets/content-CriW8Y8u.js +0 -1
- package/dist/client/assets/content-DDCyPPk_.js +0 -1
- package/dist/client/assets/content-DtcZeh5m.js +0 -1
- package/dist/client/assets/content-U9tsdtle.js +0 -1
- package/dist/client/assets/content-hFLK3CON.js +0 -1
- package/dist/client/assets/content-p00KQrtD.js +0 -1
- package/dist/client/assets/conversation-motion-features-D9-RmBSq.js +0 -1
- package/dist/client/assets/embed-entry-BSMUykuG.js +0 -2
- package/dist/client/assets/index-zvhpRHao.js +0 -1
- package/dist/client/assets/left-B-SdEJSJ.js +0 -1
- package/dist/client/assets/library-DkALuCh5.js +0 -1
- package/dist/client/assets/resolve-panes-DeVJbS9c.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BQe5J6xF.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-pZe2Zfk1.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l,r as d}from"./index-DvLtl7rV.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-zvhpRHao.js";import{a as Z}from"./api-Co9aQ2Jw.js";import{u as N}from"./Provider-CtXJeLrP.js";import{A as U}from"./AgentDetailCard-C9rn3Fj5.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-BI9AljSD.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-DfsTyYDx.js";import{a as Z}from"./api-Co9aQ2Jw.js";import{u as N}from"./Provider-Bu-C8Hxc.js";import{A as U}from"./AgentDetailCard-B_KLcgsP.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-
|
|
1
|
+
import{r as p}from"./index-BI9AljSD.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-
|
|
1
|
+
import{r as d}from"./index-BI9AljSD.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{F as a,A as b,w 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-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DthwWQIg.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-
|
|
1
|
+
import{j as i}from"./index-BI9AljSD.js";import{r as c}from"./mentions-DuLQnEcn.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-
|
|
1
|
+
import{c as a}from"./createLucideIcon-DthwWQIg.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};
|
package/dist/client/assets/{mission-control-store-nDLdUZPA.js → mission-control-store-DDAgWKUl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as o}from"./index-
|
|
1
|
+
import{r as o}from"./index-BI9AljSD.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-
|
|
1
|
+
import{r}from"./index-BI9AljSD.js";import{a as L}from"./api-Co9aQ2Jw.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-
|
|
1
|
+
import{r as u}from"./index-BI9AljSD.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-
|
|
1
|
+
import{c}from"./createLucideIcon-DthwWQIg.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{r as a}from"./index-
|
|
1
|
+
import{r as a}from"./index-BI9AljSD.js";const i="openscout:persistent-state-change";function d(t,e){typeof window>"u"||window.dispatchEvent(new CustomEvent(i,{detail:{key:t,value:e}}))}function w(t){try{return window.localStorage.getItem(t)}catch{return null}}function c(t,e){try{window.localStorage.setItem(t,e)}catch{}d(t,e)}function l(t){const[e,n]=a.useState(()=>typeof window>"u"?null:w(t));return a.useEffect(()=>{n(w(t));const s=r=>{const u=r.detail;!u||u.key!==t||n(u.value)},o=r=>{r.key===t&&n(r.newValue)};return window.addEventListener(i,s),window.addEventListener("storage",o),()=>{window.removeEventListener(i,s),window.removeEventListener("storage",o)}},[t]),e}function m(t,e){const n=l(t),s=n===null?e:n==="true",o=a.useCallback(r=>{c(t,r?"true":"false")},[t]);return[s,o]}function g(t,e){const n=l(t),s=n===null?Number.NaN:Number(n),o=Number.isFinite(s)?s:e,r=a.useCallback(u=>{c(t,String(u))},[t]);return[o,r]}function E(t,e){const s=l(t)??e,o=a.useCallback(r=>{c(t,r)},[t]);return[s,o]}export{E as a,m as b,g as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as e}from"./createLucideIcon-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DthwWQIg.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-DvLtl7rV.js";import{A as Z}from"./AgentAvatar-6-KBVKUu.js";import{a as B}from"./api-Co9aQ2Jw.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{b as ls,p as K,n as ss,h as q}from"./NewChatComposer-_Stj0fZy.js";import{b as Q,r as es,s as ts,a as ns}from"./session-catalog-DsaZJXZt.js";import{u as X}from"./sse-CD9MMUxl.js";import{t as z}from"./time-Dhsh_2EG.js";import{B as cs}from"./BackToPicker-CXZjBRAe.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-CtXJeLrP.js";import{ConversationScreen as ds}from"./ConversationScreen-CR9pWB65.js";import{S as ms}from"./SessionObserve-dQDN23pP.js";import{H as as}from"./HarnessMark-B979GCSB.js";/* empty css */import{AgentDefinitionsWorkspace as ps}from"./AgentDefinitionsWorkspace-Iyl4BesU.js";import{AgentEssentialsGlyph as us}from"./agent-essentials-D7KRGYvF.js";import"./SpriteAvatar-z5hHesx9.js";import"./colors-BtO5_zlx.js";import"./CrewAvatar-BwXjyg8N.js";import"./perf-PX8Rx0EP.js";import"./text-BP3oyl8-.js";import"./scout-voice-BVUqGhth.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-pM56HNhR.js";import"./createLucideIcon-DezKXSG2.js";import"./conversation-model-Dc02NsGp.js";import"./index-zvhpRHao.js";import"./NewChatOrigin-B1u7ki70.js";import"./keyboard-nav-BLYDhL3Z.js";import"./x-CAbNespN.js";import"./chevron-down-wciXnOQz.js";import"./search-CDko0PKE.js";import"./file-text-CqJgwxmv.js";import"./terminal-relay-GYMIvKs1.js";import"./router-B9vQkNJL.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-Do3wQ_3Z.js";import"./TextDocumentSurface-BflAwXeZ.js";import"./chevron-right-D-HdlPg8.js";import"./code-xml-D7pOQM9l.js";import"./arrow-left-Czpf-AE4.js";import"./arrow-right-BuzMnLYP.js";import"./chunk-HRAB3GC3-Tyv9rzx7.js";import"./ConversationComposer-CXPKx86g.js";import"./zap-Cq8eWkcF.js";import"./message-markup-C2LQDm_k.js";import"./mentions-DG6OQrsc.js";import"./AgentDetailCard-C9rn3Fj5.js";import"./AgentLiveActions-DrEJDJef.js";import"./terminal-takeover-_Jyys4me.js";import"./eye-BRyD0jno.js";import"./terminal-9GRS_Qdc.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-BQWzGzLK.js";import"./AstronautSuit-DbjQtfD_.js";import"./ConversationFeedRows-WrH-YI3L.js";import"./ConversationPanels-Dujvnmup.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-x8pJMVrG.js";import"./proxy-BiW5suC7.js";import"./activity-DcrMApUY.js";import"./message-circle-mZCv8tvB.js";import"./tail-events-Ps8KpKah.js";import"./ConversationStatus-DVzSb2Hv.js";import"./check-ofKUE8yH.js";import"./sparkles-CETYrxGA.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-HByf2ndx.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BJUhDSuQ.js";import"./ObserveTextFlow-ZQWwrK3i.js";import"./SessionObserveEvidence-BRBGKAgd.js";import"./wrench-DjkoAOQt.js";import"./external-link-Dp_a2vRZ.js";import"./agent-specialization-BujJVUTD.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Df6VzXjA.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function 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?K(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(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 mt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=es(e,o),x=u.useMemo(()=>ts(o?.sessions??[],h),[o?.sessions,h]),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=ns(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(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(us,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled: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 · ${z(n.endedAt)||"recent"}`:z(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${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?K(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?K(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?K(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?z(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(as,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[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=es(e,o),h=u.useMemo(()=>ts(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=ns(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(ss(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,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(as,{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 · ${z(a.endedAt)||"recent"}`:z(a.startedAt)||"recent",O=a.cwd?K(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,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 pt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=ls(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[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(ps,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ms,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(ds,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function ut({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(cs,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{pt as AgentDetailWithRail,ut as AgentProfileBar,mt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
|
|
1
|
+
import{r as u,j as s}from"./index-BI9AljSD.js";import{A as Z}from"./AgentAvatar-B7c0egdP.js";import{a as B}from"./api-Co9aQ2Jw.js";import{d as _,c as rs}from"./context-budget-DX_fwUs3.js";import{b as ls,p as K,n as ss,h as q}from"./NewChatComposer-C_1op4dH.js";import{b as Q,r as es,s as ts,a as ns}from"./session-catalog-BkmktBHI.js";import{u as X}from"./sse-DDHEHUgz.js";import{t as z}from"./time-Dhsh_2EG.js";import{B as cs}from"./BackToPicker-Cto0Ioz9.js";import{o as F}from"./openContent-C6XO6kr5.js";import{u as G}from"./Provider-Bu-C8Hxc.js";import{ConversationScreen as ds}from"./ConversationScreen-CXAHQwQ3.js";import{S as ms}from"./SessionObserve-BCehTlO8.js";import{H as as}from"./HarnessMark-DAaWPiT_.js";/* empty css */import{AgentDefinitionsWorkspace as ps}from"./AgentDefinitionsWorkspace-BbcZc9Xk.js";import{AgentEssentialsGlyph as us}from"./agent-essentials-vytdybaX.js";import"./SpriteAvatar-56DTXxSV.js";import"./colors-BtO5_zlx.js";import"./CrewAvatar-CXJHLNVM.js";import"./perf-PX8Rx0EP.js";import"./text-Faa3ZStB.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./createLucideIcon-DthwWQIg.js";import"./conversation-model-QsJVfSeG.js";import"./index-DfsTyYDx.js";import"./NewChatOrigin-D7hwp6dm.js";import"./keyboard-nav-e6yGeorb.js";import"./x-DfRJbqrh.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./file-text--hfhwZH1.js";import"./terminal-relay-BFhdIstF.js";import"./router-DTtux5sP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./message-markup-Cc_O-WdA.js";import"./mentions-DuLQnEcn.js";import"./AgentDetailCard-B_KLcgsP.js";import"./AgentLiveActions-CsQA3pu_.js";import"./terminal-takeover-B6H4llRR.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-BhVsvwkh.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./agent-specialization-BtxLN4UR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CY0RN78e.js";/* empty css */function hs(e){if(e===null)return"age unknown";const t=Math.max(0,Math.round(e/6e4));if(t<60)return`${t}m old`;const o=Math.floor(t/60),c=t%60;return c>0?`${o}h ${c}m old`:`${o}h old`}function Y(e){return`${e.turnCount} turn${e.turnCount===1?"":"s"}`}function xs(e){return e?e.startsWith("/Users/")?"~/"+e.split("/").slice(3).join("/"):e:null}function is(e){return/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/iu.test(e)?e:e.length>16?`${e.slice(0,8)}…${e.slice(-4)}`:e}function vs(e){return e.replace(/^relay-/u,"").replace(/-arts-mac-mini-local-(claude|codex)$/u,"")}function fs(e){return e>=1e6?`${(e/1e6).toFixed(1)}M`:e>=1e3?`${Math.round(e/1e3)}k`:`${e}`}function U(e){return typeof e!="number"||!Number.isFinite(e)?"-":Math.abs(e)<1e3?`${Math.round(e)}`:Math.abs(e)<1e6?`${(e/1e3).toFixed(e%1e3===0?0:1)}k`:`${(e/1e6).toFixed(1)}m`}function js(e){if(!Number.isFinite(e)||e<=0)return"0s";if(e<60)return`${Math.round(e)}s`;const t=Math.round(e),o=Math.floor(t/3600),c=Math.floor(t%3600/60),i=t%60;return o>0?`${o}h ${c}m`:c>=10||i===0?`${c}m`:`${c}m ${i}s`}function Ns(e,t=32){if(e.length===0)return[];const o=e[e.length-1].t||1,c=new Array(t).fill(0);for(const i of e){const m=Math.min(t-1,Math.max(0,Math.floor(i.t/o*t)));c[m]+=1}return c}function bs(e){return e.kind!=="boot"&&e.kind!=="system"}function 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?K(t.cwd):"workspace";return s.jsxs("div",{className:"s-sum",children:[s.jsxs("div",{className:"s-sum-session-state",children:[s.jsx("span",{className:`s-sum-session-dot${o?" s-sum-session-dot--active":""}`}),s.jsxs("span",{className:"s-sum-session-copy",children:[s.jsx("strong",{children:o?"Session attached":"Previous session"}),s.jsxs("span",{className:"s-sum-session-ref",title:M,children:[s.jsx("span",{children:W}),s.jsx("code",{children:M})]}),k&&k!==M&&s.jsxs("span",{className:"s-sum-session-profile",title:k,children:["runtime ",k]}),s.jsx("small",{title:t.cwd||void 0,children:V})]}),d!=="observed"?s.jsx("span",{className:`s-sum-trace-pill s-sum-trace-pill--${d}`,children:d==="waiting"?"waiting for work":d==="loading"?"checking trace":"no trace"}):null]}),s.jsxs("div",{className:"s-sum-cols",children:[s.jsxs("div",{className:"s-sum-col s-sum-col--activity",children:[s.jsx("div",{className:"s-sum-label",children:"Observed work"}),s.jsx(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 mt({agent:e,name:t,sessionCatalog:o,conversationId:c,navigate:i,route:m,homeView:r="agents-v2"}){const{focusedSession:p,focusSession:l}=G(),h=es(e,o),x=u.useMemo(()=>ts(o?.sessions??[],h),[o?.sessions,h]),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=ns(e.id,p,h,x,H),a=Q(H,x);u.useEffect(()=>{a&&(p?.agentId===e.id&&p.sessionId===a||l(e.id,a))},[e.id,p?.agentId,p?.sessionId,l,a]);const E=async()=>{if(C!=="opening"){d("opening"),L(null);try{const n=await q({...e,conversationId:c});i({view:r,agentId:e.id,conversationId:n,tab:"message"})}catch(n){L(n instanceof Error?n.message:"Could not open chat.")}finally{d("idle")}}},T=async()=>{if(y!=="starting"){f("starting"),$(null);try{const n=await B("/api/sessions",{method:"POST",body:JSON.stringify(ss(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(us,{agent:e,chipTitle:S})]})]}),s.jsxs("div",{className:"s-sess-head-actions",children:[s.jsx("button",{type:"button",className:"s-sess-action",onClick:()=>i({view:r,agentId:e.id,tab:"config"}),children:"Edit config"}),s.jsx("button",{type:"button",className:"s-sess-action s-sess-action--accent",disabled: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 · ${z(n.endedAt)||"recent"}`:z(n.startedAt)||"recent";return s.jsxs("div",{className:`s-sess-item${k?" s-sess-item--selected":""}`,children:[s.jsxs("button",{type:"button",className:`s-sess-row${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?K(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?K(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?K(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?z(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(as,{harness:I,size:11})})]}),s.jsxs("div",{className:"ap-decision",children:[s.jsx("button",{type:"button",className:"ap-decisionPrimary",onClick:c,children:o?"Continue":"Resume"}),s.jsx("button",{type:"button",className:"ap-decisionGhost",onClick:i,children:"Take over"}),s.jsxs("span",{className:"ap-decisionMeta",children:[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=es(e,o),h=u.useMemo(()=>ts(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=ns(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(ss(e))}),E=a.sessionId?.trim();if(E){F(i,{view:"sessions",sessionId:E},{returnTo:m});return}const T=a.conversationId?.trim();i(C({agentId:a.agentId?.trim()||e.id,...T?{conversationId:T}:{},tab:"message"}))}catch{}},L=a=>F(i,{view:"sessions",sessionId:a.id},{returnTo:m}),H=()=>F(i,{view:"terminal",agentId:e.id,mode:"takeover"},{returnTo:m}),D=a=>{p(e.id,a)};return s.jsxs("div",{className:"ap-profile",children:[s.jsxs("header",{className:"ap-profileHead",children:[s.jsx(Z,{agent:e,size:48,tile:!0,presence:!1}),s.jsxs("div",{className:"ap-profileIdent",children:[s.jsxs("div",{className:"ap-profileTop",children:[e.harness?s.jsx("span",{className:"ap-rowMark","aria-hidden":!0,children:s.jsx(as,{harness:e.harness,size:13})}):null,s.jsx("h1",{className:"ap-profileName",title:b,children:b})]}),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 · ${z(a.endedAt)||"recent"}`:z(a.startedAt)||"recent",O=a.cwd?K(a.cwd):is(a.id),A=a.harness??e.harness??"session",n=a.model??e.model,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 pt({agent:e,allAgents:t,conversationId:o,navigate:c,activeTab:i,renderProfile:m}){const{name:r}=ls(e,t),[p,l]=u.useState(null),[h,x]=u.useState(!1),[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(ps,{agent:e,navigate:c,homeView:"agents-v2"}),i==="observe"&&s.jsx("div",{className:"s-profile-tab-conversation",children:h&&!p?s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"Loading trace"}),s.jsx("div",{className:"s-profile-activity-empty-detail",children:"Resolving the best available live or history-backed session stream for this agent."})]}):s.jsx(ms,{data:p?.data,agentId:e.id,sessionId:p?.sessionId,observeSource:p?.source,observeFidelity:p?.fidelity,showRail:!1})}),i==="message"&&(o?s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsx(ds,{conversationId:o,navigate:c,embedded:!0})}):s.jsx(Is,{agent:e,navigate:c}))]})}function Is({agent:e,navigate:t}){const{route:o}=G(),[c,i]=u.useState("idle"),[m,r]=u.useState(null),p=async()=>{if(c!=="opening"){i("opening"),r(null);try{const l=await q(e);t(o.view==="agents-v2"?{...o,view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"}:{view:"agents-v2",agentId:e.id,conversationId:l,tab:"message"})}catch(l){r(l instanceof Error?l.message:"Could not open chat.")}finally{i("idle")}}};return s.jsx("div",{className:"s-profile-tab-conversation",children:s.jsxs("div",{className:"s-profile-activity-empty",children:[s.jsx("div",{className:"s-profile-activity-empty-title",children:"No chat yet"}),s.jsxs("div",{className:"s-profile-activity-empty-detail",children:["Open a direct chat with ",e.name,". The broker will create a real chat ID and keep routing by this agent identity."]}),m&&s.jsx("div",{className:"s-sess-action-error",children:m}),s.jsx("button",{type:"button",className:"s-sess-action",disabled:c==="opening",onClick:()=>{p()},children:c==="opening"?"Opening...":"Open chat"})]})})}function ut({agent:e,conversationId:t,activeTab:o,navigate:c}){const i=[{key:"profile",label:"Sessions"},{key:"config",label:"Config"},{key:"observe",label:"Trace"},{key:"message",label:"Message"}],m=r=>c({view:"agents-v2",agentId:e.id,...t?{conversationId:t}:{},tab:r});return s.jsxs("div",{className:"s-agent-bar",children:[s.jsx(cs,{slot:"agents",fallback:{view:"agents-v2"},navigate:c,className:"s-agent-bar-back"}),s.jsx("nav",{className:"s-profile-tabs s-agent-bar-tabs",children:i.map(r=>s.jsx("button",{type:"button",className:`s-profile-tab${o===r.key?" s-profile-tab--active":""}`,disabled:r.disabled,onClick:()=>m(r.key),children:r.label},r.key))})]})}export{pt as AgentDetailWithRail,ut as AgentProfileBar,mt as AgentProfileSessionsCenter,ks as CurrentSessionCard};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as W}from"./index-DvLtl7rV.js";import{a as T}from"./api-Co9aQ2Jw.js";import{b as Ie}from"./router-B9vQkNJL.js";import{u as ke}from"./sse-CD9MMUxl.js";import{i as q,o as Re}from"./surface-activity-B1rgWB1i.js";import{u as je}from"./tail-events-Ps8KpKah.js";import{d as be,u as Ee}from"./Provider-CtXJeLrP.js";import{x as C}from"./conversation-model-Dc02NsGp.js";import{i as Ce,a as Me}from"./mesh-roster-Bc7T4b7z.js";import{d as Te,c as Ne,e as _e,f as Pe,I as G}from"./NewChatComposer-_Stj0fZy.js";import{i as xe}from"./agents-project-model-UYiamtrU.js";import{o as ae,b as Be,a as Le,h as U,c as ue}from"./model-IGCUEsMy.js";const Oe=["codex","claude","grok","grok-acp","kimi","flue","cursor","opencode","native","worker","bridge","http","pi"],$e=new Set(Oe);function Y(e){const t=e?.trim().toLowerCase().replace(/_/gu,"-")??"",s=t==="claude-code"||t==="claude-stream-json"?"claude":t==="codex-app-server"||t==="codex-exec"?"codex":t==="pi-rpc"?"pi":t;return $e.has(s)?s:null}function O(e){const t=e?.trim();if(!t)return null;const s=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function J(e){const t=e?.trim();if(!t)return null;if(t.startsWith("session:")){const n=t.slice(8),o=n.indexOf(":");if(o>0){const i=Y(n.slice(0,o)),c=O(n.slice(o+1));if(i&&c)return{refId:c,harness:i,qualified:!0}}const r=O(n);return r?{refId:r,harness:null,qualified:!1}:null}const s=O(t);return s?{refId:s,harness:null,qualified:!1}:null}function fe(e,t){const s=J(t);if(!s)return null;if(s.qualified)return`session:${s.harness}:${s.refId}`;const n=Y(e);return n?`session:${n}:${s.refId}`:s.refId}const de=1440*6e4;function De(e,t){const s=n=>JSON.stringify([n.activeAsks,n.needsAttention]);return e&&s(e)===s(t)?e:t}function We(e){const t=new Map;for(const s of e?.activeAsks??[]){const n=t.get(s.agentId)??[];n.push(s),t.set(s.agentId,n)}return t}function qe(e){const t=new Map,s=(n,o)=>{if(!n)return;const r=t.get(n)??[];r.push(o),t.set(n,r)};for(const n of e?.needsAttention??[])s(n.agentId,{title:n.title,summary:n.summary,conversationId:n.conversationId,updatedAt:n.updatedAt});for(const n of t.values())n.sort((o,r)=>r.updatedAt-o.updatedAt);return t}function ge(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Harness"}function pe(e){return e.length===1?e[0]??null:e.length>1?`${e.length} branches`:null}function Fe(e,t,s,n){const o=e.group,r=o.nodes.flatMap(h=>s.get(h.row.agent.id)??[]).sort((h,A)=>A.updatedAt-h.updatedAt)[0]??null,i=!!r,c=!i&&o.nodes.some(h=>G(h.row)),a=xe(o,n),v=i?"needs":c?"working":"recent",l=i?"needs":c||a?"live":"idle",f=e.leadAgent,g=r?.conversationId??t.get(f.id)??f.conversationId??null;return{id:`${e.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:e.projectSlug,projectTitle:e.projectTitle,projectRoot:e.projectRoot,workspaceRoot:f.cwd??f.projectRoot??e.projectRoot,agentId:f.id,agentName:o.name,harness:U(o.harness),branch:pe(o.branches),work:r?.summary?.trim()||r?.title.trim()||Le(e,l),group:v,needs:i,working:c,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:g,sessionId:null}}function He(e){return e&&e.view==="sessions"&&e.sessionId?e.sessionId:null}function Ke(e,t,s){const n=U(t.harness);return{id:`${e.slice.slug}:native:${t.key}`,kind:"native",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:e.slice.root,agentId:null,agentName:`${ge(n)} session`,harness:n,source:t.harness,branch:null,work:ue(t.detail??t.label)||t.label,group:"working",needs:!1,working:!0,lastActivityAt:t.lastActivityAt??s,sessionCount:1,contextPct:null,conversationId:null,sessionId:He(t.route)}}function ze(e,t){return e.status==="active"||e.status==="workflow"?"working":(e.lastActivityAt&&t-e.lastActivityAt<de,"recent")}function P(e){return e?e.view==="sessions"?e.sessionId??null:e.view==="conversation"?e.conversationId:null:null}function F(e){return!!P(e.route)}function H(e,t,s,n,o,r){const i=U(t.harness),c=P(t.route),a=t.status==="active"||t.status==="workflow";return{id:`${e.slice.slug}:session:${t.key}`,kind:"session",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:n?.cwd??n?.projectRoot??e.slice.root,agentId:n?.id??null,agentName:n?.name??`${ge(i)} session`,harness:i,source:t.harness,branch:pe(o?[o]:[]),work:ue(t.detail??t.label)||t.label,group:ze(t,s),needs:!1,working:a,lastActivityAt:t.lastActivityAt??s,latestReplyAt:r?.ts??null,latestReplyPreview:r?.summary.trim()||null,sessionCount:1,contextPct:null,conversationId:t.route?.view==="conversation"?t.route.conversationId:null,sessionId:t.route?.view==="sessions"?t.route.sessionId??c:c,route:t.route}}function ve(e){const t=e?.trim();if(!t)return null;const s=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function k(e,t){const s=ve(t);return s?`${Y(e)??e.trim().toLowerCase()}\0${s}`:null}function Ve(e){if(!e.raw||typeof e.raw!="object"||Array.isArray(e.raw))return null;const t=e.raw.payload;if(!t||typeof t!="object"||Array.isArray(t))return null;const s=t.role;return typeof s=="string"?s.trim().toLowerCase():null}function Ge(e){const t=e.trim();if(!t.startsWith("{"))return!1;if(t.startsWith('{"risk_level":')&&t.includes('"user_authorization":')&&t.includes('"outcome":')&&t.includes('"rationale":'))return!0;try{const s=JSON.parse(t);return typeof s.risk_level=="string"&&typeof s.user_authorization=="string"&&typeof s.outcome=="string"&&typeof s.rationale=="string"}catch{return!1}}function Q(e){if(e.kind!=="assistant")return!1;const t=e.summary.trim();if(!t||/^\[(?:assistant|message)\]$/iu.test(t))return!1;const s=Ve(e);return s&&s!=="assistant"?!1:!Ge(t)}function Ue(e){const t=new Map;for(const s of e){if(!Q(s))continue;const n=k(s.source,s.sessionId);if(!n)continue;const o=t.get(n);(!o||s.ts>o.ts)&&t.set(n,s)}return t}function Ye(e,t,s){const n=[];for(const o of e.agents)for(const r of o.sessions)F(r)&&n.push(H(e,r,t,o.row.agent,o.row.branch,s.get(k(r.harness,P(r.route))??"")??null));for(const o of e.unassigned)F(o)&&n.push(H(e,o,t,void 0,void 0,s.get(k(o.harness,P(o.route))??"")??null));return n.sort((o,r)=>r.lastActivityAt-o.lastActivityAt||o.agentName.localeCompare(r.agentName))}function Je(e,t,s,n){const o=new Set;for(const r of t){const i=k(r.source??r.harness,r.sessionId);i&&o.add(i)}for(const r of e)for(const i of r.agents){if(!i.sessions.some(F))continue;const c=i.row.agent,a=k(c.harness??i.row.harness,c.harnessSessionId);a&&o.add(a)}for(const r of e)for(const i of r.agents){const c=i.row.agent;if(!Me(c))continue;const a=c.harness?.trim()||i.row.harness,v=ve(c.harnessSessionId),l=k(a,v);if(!v||!l||o.has(l))continue;o.add(l);const f=G(i.row),g={key:`fallback:${c.id}`,status:f?"active":"idle",harness:a,label:c.name,detail:i.row.activeTask??c.harnessLogPath??v,lastActivityAt:i.row.lastActivityAt??c.createdAt??s,route:{view:"sessions",sessionId:v}};t.push(H(r,g,s,c,i.row.branch,n.get(l)??null))}t.sort((r,i)=>i.lastActivityAt-r.lastActivityAt||r.agentName.localeCompare(i.agentName))}function Qe(e){const t=new Map,s=(n,o,r,i)=>{const c=t.get(n);if(!c){t.set(n,{root:n,branch:o,working:r,lastActivityAt:i});return}(r||!c.branch)&&o&&(c.branch=o),c.working||=r,c.lastActivityAt=Math.max(c.lastActivityAt,i)};for(const n of e.agents){const o=n.row.agent.cwd??n.row.agent.projectRoot??e.slice.root;if(!o)continue;const r=n.row.branch&&n.row.branch!=="—"?n.row.branch:null;s(o,r,G(n.row),n.row.lastActivityAt??0)}for(const n of e.slice.nativeSessions)n.cwd&&s(n.cwd,null,n.status==="active",n.lastActivityAt??0);return t.size===0&&e.slice.root&&s(e.slice.root,null,!1,e.lastActivityAt??0),[...t.values()].sort((n,o)=>Number(o.working)-Number(n.working)||o.lastActivityAt-n.lastActivityAt||n.root.localeCompare(o.root))}function ne(e,t){return e.needs?3:e.working?2:t-e.lastActivityAt<de?1:0}function Xe(e){const{nowMs:t,showEphemeral:s}=e,n=be(e.agents,e.machineId),o=We(e.fleet),r=qe(e.fleet),{conversationByAgentId:i,sessionByAgentId:c}=Te(e.sessions),a=n.map(u=>Ne(u,c.get(u.id)??null,o.get(u.id)??[])),v=_e(e.discovery,t),l=Pe(a,e.sessions,v),f=Be(l,s).filter(u=>Ce(u.leadAgent)),g=Ue(e.recentEvents??[]),h=f.map(u=>Fe(u,i,r,t));for(const u of l)for(const p of u.unassigned)p.kind!=="native"||p.status!=="active"||!p.route||h.push(Ke(u,p,t));h.sort((u,p)=>ne(p,t)-ne(u,t)||p.lastActivityAt-u.lastActivityAt);const A=l.flatMap(u=>Ye(u,t,g));Je(l,A,t,g);const S=new Map;for(const u of h){const p=S.get(u.projectSlug)??[];p.push(u),S.set(u.projectSlug,p)}const m=new Map;for(const u of A){const p=m.get(u.projectSlug)??[];p.push(u),m.set(u.projectSlug,p)}const ee=l.map(u=>{const p=S.get(u.slice.slug)??[],te=m.get(u.slice.slug)??[],Se=[...new Set(u.agents.map(w=>w.row.branch).filter(w=>!!w&&w!=="—"&&w!=="main"))],se=Qe(u);return{slug:u.slice.slug,title:u.slice.title,root:u.slice.root,agentCount:1,sessionCount:te.length,liveSessionCount:te.filter(w=>w.working).length,worktreeCount:se.length,worktrees:se,needs:p.filter(w=>w.needs).length,working:p.filter(w=>w.working).length,threadCount:p.length,lastActivityAt:u.lastActivityAt,branches:Se}});return ee.sort((u,p)=>x(p)-x(u)||p.lastActivityAt-u.lastActivityAt||u.title.localeCompare(p.title)),et({projects:ee,threads:h,sessions:A,projectAliases:{}})}function x(e){return e.needs>0?2:e.working>0?1:0}function oe(e){return e?/\/(?:\.codex|\.claude|\.agents?)\/worktrees\/[^/]+\//iu.test(e)||/\/\.worktrees\/[^/]+/iu.test(e):!1}function re(e){return e.replace(/^\/Users\/[^/]+(?=\/)/u,"~").replace(/\/+$/u,"")}function Ze(e){const t=new Map;for(const s of e)for(const n of s.worktrees){const o=t.get(n.root);if(!o){t.set(n.root,{...n});continue}o.branch??=n.branch,o.working||=n.working,o.lastActivityAt=Math.max(o.lastActivityAt,n.lastActivityAt)}return[...t.values()].sort((s,n)=>Number(n.working)-Number(s.working)||n.lastActivityAt-s.lastActivityAt||s.root.localeCompare(n.root))}function et(e){const t=new Map;for(const l of e.projects){if(!l.root||!oe(l.root))continue;const f=e.projects.filter(g=>g.slug!==l.slug&&!oe(g.root)&&g.worktrees.some(h=>re(h.root)===re(l.root)));f.length===1&&t.set(l.slug,f[0].slug)}if(t.size===0)return e;const s=new Map(e.projects.map(l=>[l.slug,l])),n=l=>{const f=t.get(l.projectSlug);if(!f)return l;const g=s.get(f);return{...l,projectSlug:g.slug,projectTitle:g.title,projectRoot:g.root}},o=l=>{const f=t.get(l.projectSlug);if(!f)return l;const g=s.get(f);return{...l,projectSlug:g.slug,projectTitle:g.title,projectRoot:g.root}},r=e.threads.map(n),i=e.sessions.map(o),c=new Map;for(const l of e.projects){const f=t.get(l.slug)??l.slug,g=c.get(f)??[];g.push(l),c.set(f,g)}const a=[...c.entries()].map(([l,f])=>{const g=s.get(l),h=r.filter(m=>m.projectSlug===l),A=i.filter(m=>m.projectSlug===l),S=Ze(f);return{...g,agentCount:1,sessionCount:A.length,liveSessionCount:A.filter(m=>m.working).length,worktreeCount:S.length,worktrees:S,needs:h.filter(m=>m.needs).length,working:h.filter(m=>m.working).length,threadCount:h.length,lastActivityAt:Math.max(...f.map(m=>m.lastActivityAt)),branches:[...new Set(f.flatMap(m=>m.branches))]}});a.sort((l,f)=>x(f)-x(l)||f.lastActivityAt-l.lastActivityAt||l.title.localeCompare(f.title));const v={...e.projectAliases};for(const[l,f]of t)v[l]=f;return{projects:a,threads:r,sessions:i,projectAliases:v}}function Ot(e,t){if(e.projects.some(o=>o.slug===t))return t;let s=t;const n=new Set;for(;Object.hasOwn(e.projectAliases,s);){if(n.has(s))return null;n.add(s),s=e.projectAliases[s]}return e.projects.some(o=>o.slug===s)?s:null}function tt(e,t,s){const n=new Set(s.map(r=>r.slug)),o={...t};for(const[r,i]of Object.entries(e??{}))n.has(r)||!n.has(i)||o[r]||(o[r]=i);return o}function $t(e,t){return e.filter(s=>s.projectSlug===t)}function Dt(e,t){return e.filter(s=>s.projectSlug===t)}const st=["needs","working","recent"],nt={needs:"Your turn",working:"In flight",recent:"Recent"};function Wt(e){const t=new Map;for(const s of e){const n=t.get(s.group)??[];n.push(s),t.set(s.group,n)}return st.filter(s=>t.has(s)).map(s=>({group:s,label:nt[s],items:t.get(s)}))}function y(e){return{view:"agents-v2",...e.projectSlug?{projectSlug:e.projectSlug}:{},...e.machineId?{machineId:e.machineId}:{}}}function B(e){return e.kind!=="native"||!e.sessionId?null:fe(e.source??e.harness,e.sessionId)}function ot(e,t){const s=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e;if(t.selectedAgentId){const a=s.filter(v=>v.agentId===t.selectedAgentId);return a.length===1?a[0]:null}const n=t.sessionId?.trim();if(!n)return null;const o=s.filter(a=>B(a)===n);if(o.length===1)return o[0];const r=J(n);if(o.length>1||r?.qualified)return null;const i=r?.refId??n,c=s.filter(a=>a.kind==="native"&&a.sessionId===i);return c.length===1?c[0]:null}function qt(e,t,s){return ot(s,t)===e}function Ft(e,t){return e.kind==="native"?{...y(t),sessionId:B(e)??void 0}:{...y(t),selectedAgentId:e.agentId??void 0}}function Ht(e,t){const s=B(e);return s?{view:"sessions",sessionId:s}:e.conversationId?{view:"conversation",conversationId:e.conversationId}:e.agentId?ae(t,e.agentId):y(t)}function Kt(e,t){const s=B(e);return s?{view:"sessions",sessionId:s}:e.agentId?{...ae(t,e.agentId),tab:"observe"}:null}function zt(e,t){const s=X(e);return s?{...y(t),indexView:"sessions",...s?{sessionId:s}:{},selectedAgentId:void 0}:y(t)}function Vt(e,t,s){return rt(s,t)===e}function X(e){return e.conversationId&&e.route?.view==="conversation"?e.conversationId:e.sessionId?fe(e.source??e.harness,e.sessionId):e.conversationId?e.conversationId:null}function rt(e,t){const s=t.sessionId?.trim();if(!s)return null;const n=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e,o=n.filter(a=>X(a)===s);if(o.length===1)return o[0];const r=J(s);if(o.length>1||r?.qualified)return null;const i=r?.refId??s,c=n.filter(a=>a.sessionId===i||a.conversationId===i||a.id===i);return c.length===1?c[0]:null}function Gt(e,t){const s=X(e);return s?{...y(t),projectSlug:e.projectSlug,indexView:"sessions",sessionId:s,selectedAgentId:void 0}:{...y(t),projectSlug:e.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const it=50;function me(e){const t=e.source.trim().toLowerCase(),s=e.sessionId.trim(),n=s.split(/[\\/]/u).filter(Boolean).at(-1)??s,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return t&&o?`${t}\0${o}`:`event\0${e.id}`}function he(e,t){const s=new Map;for(const n of e){if(!Q(n))continue;const o=me(n),r=s.get(o);(!r||n.ts>=r.ts)&&s.set(o,n)}return[...s.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,t)}function ct(e){const t=e.now??Date.now;let s="idle",n=0,o=null,r=0;const i=()=>s==="idle"||s==="error"&&t()>=n;return{shouldRun:i,run(){if(o)return o;if(!i())return Promise.resolve();s="loading";const c=r;let a;return a=Promise.resolve().then(e.load).then(()=>{r===c&&(s="ready")}).catch(()=>{r===c&&(s="error",n=t()+e.retryDelayMs)}).finally(()=>{o===a&&(o=null)}),o=a,a},reset(){r+=1,s="idle",n=0,o=null}}}function lt(e,t=s=>{const n=setTimeout(s,it);return()=>clearTimeout(n)}){const s=new Map;let n=null;const o=()=>{if(n=null,s.size===0)return;const r=[...s.values()];s.clear(),e(r)};return{push(r){s.set(me(r),r),n??=t(o)},cancel(){n?.(),n=null,s.clear()}}}function at(e){if(typeof window<"u"){const s=window;if(s.requestIdleCallback){const n=s.requestIdleCallback(e,{timeout:1e3});return()=>s.cancelIdleCallback?.(n)}}const t=setTimeout(e,0);return()=>clearTimeout(t)}const ut=6e4,we=3e4,ft=1e3,Z=200,dt=5e3,gt="/api/tail/discover?scope=hot&limit=160",pt=`/api/tail/recent?limit=${Z}&transcripts=1&mode=assistant-replies`;let d={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const K=new Set;let I=0,b=null,$=!1,E=null,R=null,N=null,_=null,z=null,ie=0;function Ae(){for(const e of[...K])e()}function vt(e,t){const s=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&s(e)===s(t)?e:t}function L(e){d={...d,...e},Ae()}const V=ct({retryDelayMs:dt,load:async()=>{const e=await T(pt),t=he([...d.recentEvents,...e.events??[]],Z),s=C(d.recentEvents,t);s!==d.recentEvents&&L({recentEvents:s})}});function mt(){E||!V.shouldRun()||(E=at(()=>{E=null,I>0&&V.run()}))}const ye=lt(e=>{const t=he([...d.recentEvents,...e],Z),s=C(d.recentEvents,t);s!==d.recentEvents&&L({recentEvents:s})});function ht(e){Q(e)&&ye.push(e)}async function j(e){if(b)return $=!0,b;b=(async()=>{ie+=1,typeof window<"u"&&(window.__projectsInboxLoads=ie),d.loadedAt===null&&e!=="background"&&L({loading:!0,error:null});const[t,s,n]=await Promise.allSettled([T("/api/conversations"),T("/api/fleet"),T(gt)]),o=t.status==="fulfilled"?C(d.sessions,t.value):d.sessions,r=s.status==="fulfilled"?De(d.fleet,s.value):d.fleet,i=n.status==="fulfilled"?vt(d.discovery,n.value):d.discovery,c=[t,s,n].find(l=>l.status==="rejected"),a=c?c.reason instanceof Error?c.reason.message:String(c.reason):null,v=o!==d.sessions||r!==d.fleet||i!==d.discovery||a!==d.error||d.loading;d={...d,sessions:o,fleet:r,discovery:i,error:a,loading:!1,loadedAt:Date.now()},v&&Ae(),mt()})();try{await b}finally{b=null,$&&I>0&&($=!1,j("background"))}}function wt(){q()&&(R||(R=setTimeout(()=>{R=null,j("background")},ft)))}function At(){j("initial"),N=setInterval(()=>{q()&&j("background")},ut),_=setInterval(()=>{q()&&L({nowMs:Date.now()})},we),z=Re(()=>{j("background")})}function yt(){E?.(),E=null,V.reset(),ye.cancel(),R&&(clearTimeout(R),R=null),N&&(clearInterval(N),N=null),_&&(clearInterval(_),_=null),z?.(),z=null}function Ut(){j("background")}function St(){const[e,t]=W.useState(d);return W.useEffect(()=>{const s=()=>t(d);return K.add(s),I+=1,I===1&&At(),s(),()=>{K.delete(s),I-=1,I===0&&yt()}},[]),ke(wt),je(ht),e}let ce=null,M=null,le=null;function It(e,t){return!!e&&e.length===t.length&&e.every((s,n)=>s===t[n])}function D(e,t,s){if(!e?.length)return t;const n=new Map(e.map(i=>[s(i),i]));let o=e.length===t.length;const r=t.map((i,c)=>{const a=n.get(s(i)),v=a?C(a,i):i;return v!==e[c]&&(o=!1),v});return o?e:r}function kt(e,t){if(!e)return t;const s=D(e.projects,t.projects,i=>i.slug),n=D(e.threads,t.threads,i=>i.id),o=D(e.sessions,t.sessions,i=>i.id),r=C(e.projectAliases,tt(e.projectAliases,t.projectAliases,s));return s===e.projects&&n===e.threads&&o===e.sessions&&r===e.projectAliases?e:{projects:s,threads:n,sessions:o,projectAliases:r}}function Rt(e){const t=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/we),e.showEphemeral];if(It(ce,t)&&M)return M;const s=Xe(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=kt(le===n?M:null,s);return ce=t,M=o,le=n,o}function Yt(e){const t=St(),{agents:s}=Ee(),n=Ie(e),o=!!e.showEphemeral;return{model:W.useMemo(()=>Rt({agents:s,machineId:n,sessions:t.sessions,fleet:t.fleet,discovery:t.discovery,recentEvents:t.recentEvents,nowMs:t.nowMs,showEphemeral:o}),[s,n,t.sessions,t.fleet,t.discovery,t.recentEvents,t.nowMs,o]),agents:s,nowMs:t.nowMs,loading:t.loading,loadedAt:t.loadedAt,error:t.error}}export{Ht as a,ot as b,$t as c,Dt as d,zt as e,rt as f,Wt as g,Ft as h,Vt as i,qt as j,Ut as k,Ot as r,Gt as s,Kt as t,Yt as u};
|
|
1
|
+
import{r as W}from"./index-BI9AljSD.js";import{a as T}from"./api-Co9aQ2Jw.js";import{b as Ie}from"./router-DTtux5sP.js";import{u as ke}from"./sse-DDHEHUgz.js";import{i as q,o as Re}from"./surface-activity-B1rgWB1i.js";import{u as je}from"./tail-events-BdUrO0kb.js";import{d as be,u as Ee}from"./Provider-Bu-C8Hxc.js";import{x as C}from"./conversation-model-QsJVfSeG.js";import{i as Ce,a as Me}from"./mesh-roster-Bc7T4b7z.js";import{d as Te,c as Ne,e as _e,f as Pe,I as G}from"./NewChatComposer-C_1op4dH.js";import{i as xe}from"./agents-project-model-UYiamtrU.js";import{o as ae,b as Be,a as Le,h as U,c as ue}from"./model-IGCUEsMy.js";const Oe=["codex","claude","grok","grok-acp","kimi","flue","cursor","opencode","native","worker","bridge","http","pi"],$e=new Set(Oe);function Y(e){const t=e?.trim().toLowerCase().replace(/_/gu,"-")??"",s=t==="claude-code"||t==="claude-stream-json"?"claude":t==="codex-app-server"||t==="codex-exec"?"codex":t==="pi-rpc"?"pi":t;return $e.has(s)?s:null}function O(e){const t=e?.trim();if(!t)return null;const s=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function J(e){const t=e?.trim();if(!t)return null;if(t.startsWith("session:")){const n=t.slice(8),o=n.indexOf(":");if(o>0){const i=Y(n.slice(0,o)),c=O(n.slice(o+1));if(i&&c)return{refId:c,harness:i,qualified:!0}}const r=O(n);return r?{refId:r,harness:null,qualified:!1}:null}const s=O(t);return s?{refId:s,harness:null,qualified:!1}:null}function fe(e,t){const s=J(t);if(!s)return null;if(s.qualified)return`session:${s.harness}:${s.refId}`;const n=Y(e);return n?`session:${n}:${s.refId}`:s.refId}const de=1440*6e4;function De(e,t){const s=n=>JSON.stringify([n.activeAsks,n.needsAttention]);return e&&s(e)===s(t)?e:t}function We(e){const t=new Map;for(const s of e?.activeAsks??[]){const n=t.get(s.agentId)??[];n.push(s),t.set(s.agentId,n)}return t}function qe(e){const t=new Map,s=(n,o)=>{if(!n)return;const r=t.get(n)??[];r.push(o),t.set(n,r)};for(const n of e?.needsAttention??[])s(n.agentId,{title:n.title,summary:n.summary,conversationId:n.conversationId,updatedAt:n.updatedAt});for(const n of t.values())n.sort((o,r)=>r.updatedAt-o.updatedAt);return t}function ge(e){return e?e.charAt(0).toUpperCase()+e.slice(1):"Harness"}function pe(e){return e.length===1?e[0]??null:e.length>1?`${e.length} branches`:null}function Fe(e,t,s,n){const o=e.group,r=o.nodes.flatMap(h=>s.get(h.row.agent.id)??[]).sort((h,A)=>A.updatedAt-h.updatedAt)[0]??null,i=!!r,c=!i&&o.nodes.some(h=>G(h.row)),a=xe(o,n),v=i?"needs":c?"working":"recent",l=i?"needs":c||a?"live":"idle",f=e.leadAgent,g=r?.conversationId??t.get(f.id)??f.conversationId??null;return{id:`${e.projectSlug}:agent:${f.id}`,kind:"agent",projectSlug:e.projectSlug,projectTitle:e.projectTitle,projectRoot:e.projectRoot,workspaceRoot:f.cwd??f.projectRoot??e.projectRoot,agentId:f.id,agentName:o.name,harness:U(o.harness),branch:pe(o.branches),work:r?.summary?.trim()||r?.title.trim()||Le(e,l),group:v,needs:i,working:c,lastActivityAt:o.lastActivityAt,sessionCount:o.sessionCount,contextPct:null,conversationId:g,sessionId:null}}function He(e){return e&&e.view==="sessions"&&e.sessionId?e.sessionId:null}function Ke(e,t,s){const n=U(t.harness);return{id:`${e.slice.slug}:native:${t.key}`,kind:"native",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:e.slice.root,agentId:null,agentName:`${ge(n)} session`,harness:n,source:t.harness,branch:null,work:ue(t.detail??t.label)||t.label,group:"working",needs:!1,working:!0,lastActivityAt:t.lastActivityAt??s,sessionCount:1,contextPct:null,conversationId:null,sessionId:He(t.route)}}function ze(e,t){return e.status==="active"||e.status==="workflow"?"working":(e.lastActivityAt&&t-e.lastActivityAt<de,"recent")}function P(e){return e?e.view==="sessions"?e.sessionId??null:e.view==="conversation"?e.conversationId:null:null}function F(e){return!!P(e.route)}function H(e,t,s,n,o,r){const i=U(t.harness),c=P(t.route),a=t.status==="active"||t.status==="workflow";return{id:`${e.slice.slug}:session:${t.key}`,kind:"session",projectSlug:e.slice.slug,projectTitle:e.slice.title,projectRoot:e.slice.root,workspaceRoot:n?.cwd??n?.projectRoot??e.slice.root,agentId:n?.id??null,agentName:n?.name??`${ge(i)} session`,harness:i,source:t.harness,branch:pe(o?[o]:[]),work:ue(t.detail??t.label)||t.label,group:ze(t,s),needs:!1,working:a,lastActivityAt:t.lastActivityAt??s,latestReplyAt:r?.ts??null,latestReplyPreview:r?.summary.trim()||null,sessionCount:1,contextPct:null,conversationId:t.route?.view==="conversation"?t.route.conversationId:null,sessionId:t.route?.view==="sessions"?t.route.sessionId??c:c,route:t.route}}function ve(e){const t=e?.trim();if(!t)return null;const s=t.split(/[\\/]/u).filter(Boolean).at(-1)??t;return s.endsWith(".jsonl")?s.slice(0,-6):s}function k(e,t){const s=ve(t);return s?`${Y(e)??e.trim().toLowerCase()}\0${s}`:null}function Ve(e){if(!e.raw||typeof e.raw!="object"||Array.isArray(e.raw))return null;const t=e.raw.payload;if(!t||typeof t!="object"||Array.isArray(t))return null;const s=t.role;return typeof s=="string"?s.trim().toLowerCase():null}function Ge(e){const t=e.trim();if(!t.startsWith("{"))return!1;if(t.startsWith('{"risk_level":')&&t.includes('"user_authorization":')&&t.includes('"outcome":')&&t.includes('"rationale":'))return!0;try{const s=JSON.parse(t);return typeof s.risk_level=="string"&&typeof s.user_authorization=="string"&&typeof s.outcome=="string"&&typeof s.rationale=="string"}catch{return!1}}function Q(e){if(e.kind!=="assistant")return!1;const t=e.summary.trim();if(!t||/^\[(?:assistant|message)\]$/iu.test(t))return!1;const s=Ve(e);return s&&s!=="assistant"?!1:!Ge(t)}function Ue(e){const t=new Map;for(const s of e){if(!Q(s))continue;const n=k(s.source,s.sessionId);if(!n)continue;const o=t.get(n);(!o||s.ts>o.ts)&&t.set(n,s)}return t}function Ye(e,t,s){const n=[];for(const o of e.agents)for(const r of o.sessions)F(r)&&n.push(H(e,r,t,o.row.agent,o.row.branch,s.get(k(r.harness,P(r.route))??"")??null));for(const o of e.unassigned)F(o)&&n.push(H(e,o,t,void 0,void 0,s.get(k(o.harness,P(o.route))??"")??null));return n.sort((o,r)=>r.lastActivityAt-o.lastActivityAt||o.agentName.localeCompare(r.agentName))}function Je(e,t,s,n){const o=new Set;for(const r of t){const i=k(r.source??r.harness,r.sessionId);i&&o.add(i)}for(const r of e)for(const i of r.agents){if(!i.sessions.some(F))continue;const c=i.row.agent,a=k(c.harness??i.row.harness,c.harnessSessionId);a&&o.add(a)}for(const r of e)for(const i of r.agents){const c=i.row.agent;if(!Me(c))continue;const a=c.harness?.trim()||i.row.harness,v=ve(c.harnessSessionId),l=k(a,v);if(!v||!l||o.has(l))continue;o.add(l);const f=G(i.row),g={key:`fallback:${c.id}`,status:f?"active":"idle",harness:a,label:c.name,detail:i.row.activeTask??c.harnessLogPath??v,lastActivityAt:i.row.lastActivityAt??c.createdAt??s,route:{view:"sessions",sessionId:v}};t.push(H(r,g,s,c,i.row.branch,n.get(l)??null))}t.sort((r,i)=>i.lastActivityAt-r.lastActivityAt||r.agentName.localeCompare(i.agentName))}function Qe(e){const t=new Map,s=(n,o,r,i)=>{const c=t.get(n);if(!c){t.set(n,{root:n,branch:o,working:r,lastActivityAt:i});return}(r||!c.branch)&&o&&(c.branch=o),c.working||=r,c.lastActivityAt=Math.max(c.lastActivityAt,i)};for(const n of e.agents){const o=n.row.agent.cwd??n.row.agent.projectRoot??e.slice.root;if(!o)continue;const r=n.row.branch&&n.row.branch!=="—"?n.row.branch:null;s(o,r,G(n.row),n.row.lastActivityAt??0)}for(const n of e.slice.nativeSessions)n.cwd&&s(n.cwd,null,n.status==="active",n.lastActivityAt??0);return t.size===0&&e.slice.root&&s(e.slice.root,null,!1,e.lastActivityAt??0),[...t.values()].sort((n,o)=>Number(o.working)-Number(n.working)||o.lastActivityAt-n.lastActivityAt||n.root.localeCompare(o.root))}function ne(e,t){return e.needs?3:e.working?2:t-e.lastActivityAt<de?1:0}function Xe(e){const{nowMs:t,showEphemeral:s}=e,n=be(e.agents,e.machineId),o=We(e.fleet),r=qe(e.fleet),{conversationByAgentId:i,sessionByAgentId:c}=Te(e.sessions),a=n.map(u=>Ne(u,c.get(u.id)??null,o.get(u.id)??[])),v=_e(e.discovery,t),l=Pe(a,e.sessions,v),f=Be(l,s).filter(u=>Ce(u.leadAgent)),g=Ue(e.recentEvents??[]),h=f.map(u=>Fe(u,i,r,t));for(const u of l)for(const p of u.unassigned)p.kind!=="native"||p.status!=="active"||!p.route||h.push(Ke(u,p,t));h.sort((u,p)=>ne(p,t)-ne(u,t)||p.lastActivityAt-u.lastActivityAt);const A=l.flatMap(u=>Ye(u,t,g));Je(l,A,t,g);const S=new Map;for(const u of h){const p=S.get(u.projectSlug)??[];p.push(u),S.set(u.projectSlug,p)}const m=new Map;for(const u of A){const p=m.get(u.projectSlug)??[];p.push(u),m.set(u.projectSlug,p)}const ee=l.map(u=>{const p=S.get(u.slice.slug)??[],te=m.get(u.slice.slug)??[],Se=[...new Set(u.agents.map(w=>w.row.branch).filter(w=>!!w&&w!=="—"&&w!=="main"))],se=Qe(u);return{slug:u.slice.slug,title:u.slice.title,root:u.slice.root,agentCount:1,sessionCount:te.length,liveSessionCount:te.filter(w=>w.working).length,worktreeCount:se.length,worktrees:se,needs:p.filter(w=>w.needs).length,working:p.filter(w=>w.working).length,threadCount:p.length,lastActivityAt:u.lastActivityAt,branches:Se}});return ee.sort((u,p)=>x(p)-x(u)||p.lastActivityAt-u.lastActivityAt||u.title.localeCompare(p.title)),et({projects:ee,threads:h,sessions:A,projectAliases:{}})}function x(e){return e.needs>0?2:e.working>0?1:0}function oe(e){return e?/\/(?:\.codex|\.claude|\.agents?)\/worktrees\/[^/]+\//iu.test(e)||/\/\.worktrees\/[^/]+/iu.test(e):!1}function re(e){return e.replace(/^\/Users\/[^/]+(?=\/)/u,"~").replace(/\/+$/u,"")}function Ze(e){const t=new Map;for(const s of e)for(const n of s.worktrees){const o=t.get(n.root);if(!o){t.set(n.root,{...n});continue}o.branch??=n.branch,o.working||=n.working,o.lastActivityAt=Math.max(o.lastActivityAt,n.lastActivityAt)}return[...t.values()].sort((s,n)=>Number(n.working)-Number(s.working)||n.lastActivityAt-s.lastActivityAt||s.root.localeCompare(n.root))}function et(e){const t=new Map;for(const l of e.projects){if(!l.root||!oe(l.root))continue;const f=e.projects.filter(g=>g.slug!==l.slug&&!oe(g.root)&&g.worktrees.some(h=>re(h.root)===re(l.root)));f.length===1&&t.set(l.slug,f[0].slug)}if(t.size===0)return e;const s=new Map(e.projects.map(l=>[l.slug,l])),n=l=>{const f=t.get(l.projectSlug);if(!f)return l;const g=s.get(f);return{...l,projectSlug:g.slug,projectTitle:g.title,projectRoot:g.root}},o=l=>{const f=t.get(l.projectSlug);if(!f)return l;const g=s.get(f);return{...l,projectSlug:g.slug,projectTitle:g.title,projectRoot:g.root}},r=e.threads.map(n),i=e.sessions.map(o),c=new Map;for(const l of e.projects){const f=t.get(l.slug)??l.slug,g=c.get(f)??[];g.push(l),c.set(f,g)}const a=[...c.entries()].map(([l,f])=>{const g=s.get(l),h=r.filter(m=>m.projectSlug===l),A=i.filter(m=>m.projectSlug===l),S=Ze(f);return{...g,agentCount:1,sessionCount:A.length,liveSessionCount:A.filter(m=>m.working).length,worktreeCount:S.length,worktrees:S,needs:h.filter(m=>m.needs).length,working:h.filter(m=>m.working).length,threadCount:h.length,lastActivityAt:Math.max(...f.map(m=>m.lastActivityAt)),branches:[...new Set(f.flatMap(m=>m.branches))]}});a.sort((l,f)=>x(f)-x(l)||f.lastActivityAt-l.lastActivityAt||l.title.localeCompare(f.title));const v={...e.projectAliases};for(const[l,f]of t)v[l]=f;return{projects:a,threads:r,sessions:i,projectAliases:v}}function Ot(e,t){if(e.projects.some(o=>o.slug===t))return t;let s=t;const n=new Set;for(;Object.hasOwn(e.projectAliases,s);){if(n.has(s))return null;n.add(s),s=e.projectAliases[s]}return e.projects.some(o=>o.slug===s)?s:null}function tt(e,t,s){const n=new Set(s.map(r=>r.slug)),o={...t};for(const[r,i]of Object.entries(e??{}))n.has(r)||!n.has(i)||o[r]||(o[r]=i);return o}function $t(e,t){return e.filter(s=>s.projectSlug===t)}function Dt(e,t){return e.filter(s=>s.projectSlug===t)}const st=["needs","working","recent"],nt={needs:"Your turn",working:"In flight",recent:"Recent"};function Wt(e){const t=new Map;for(const s of e){const n=t.get(s.group)??[];n.push(s),t.set(s.group,n)}return st.filter(s=>t.has(s)).map(s=>({group:s,label:nt[s],items:t.get(s)}))}function y(e){return{view:"agents-v2",...e.projectSlug?{projectSlug:e.projectSlug}:{},...e.machineId?{machineId:e.machineId}:{}}}function B(e){return e.kind!=="native"||!e.sessionId?null:fe(e.source??e.harness,e.sessionId)}function ot(e,t){const s=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e;if(t.selectedAgentId){const a=s.filter(v=>v.agentId===t.selectedAgentId);return a.length===1?a[0]:null}const n=t.sessionId?.trim();if(!n)return null;const o=s.filter(a=>B(a)===n);if(o.length===1)return o[0];const r=J(n);if(o.length>1||r?.qualified)return null;const i=r?.refId??n,c=s.filter(a=>a.kind==="native"&&a.sessionId===i);return c.length===1?c[0]:null}function qt(e,t,s){return ot(s,t)===e}function Ft(e,t){return e.kind==="native"?{...y(t),sessionId:B(e)??void 0}:{...y(t),selectedAgentId:e.agentId??void 0}}function Ht(e,t){const s=B(e);return s?{view:"sessions",sessionId:s}:e.conversationId?{view:"conversation",conversationId:e.conversationId}:e.agentId?ae(t,e.agentId):y(t)}function Kt(e,t){const s=B(e);return s?{view:"sessions",sessionId:s}:e.agentId?{...ae(t,e.agentId),tab:"observe"}:null}function zt(e,t){const s=X(e);return s?{...y(t),indexView:"sessions",...s?{sessionId:s}:{},selectedAgentId:void 0}:y(t)}function Vt(e,t,s){return rt(s,t)===e}function X(e){return e.conversationId&&e.route?.view==="conversation"?e.conversationId:e.sessionId?fe(e.source??e.harness,e.sessionId):e.conversationId?e.conversationId:null}function rt(e,t){const s=t.sessionId?.trim();if(!s)return null;const n=t.projectSlug?e.filter(a=>a.projectSlug===t.projectSlug):e,o=n.filter(a=>X(a)===s);if(o.length===1)return o[0];const r=J(s);if(o.length>1||r?.qualified)return null;const i=r?.refId??s,c=n.filter(a=>a.sessionId===i||a.conversationId===i||a.id===i);return c.length===1?c[0]:null}function Gt(e,t){const s=X(e);return s?{...y(t),projectSlug:e.projectSlug,indexView:"sessions",sessionId:s,selectedAgentId:void 0}:{...y(t),projectSlug:e.projectSlug,indexView:"sessions",selectedAgentId:void 0,sessionId:void 0}}const it=50;function me(e){const t=e.source.trim().toLowerCase(),s=e.sessionId.trim(),n=s.split(/[\\/]/u).filter(Boolean).at(-1)??s,o=n.endsWith(".jsonl")?n.slice(0,-6):n;return t&&o?`${t}\0${o}`:`event\0${e.id}`}function he(e,t){const s=new Map;for(const n of e){if(!Q(n))continue;const o=me(n),r=s.get(o);(!r||n.ts>=r.ts)&&s.set(o,n)}return[...s.values()].sort((n,o)=>o.ts-n.ts||o.id.localeCompare(n.id)).slice(0,t)}function ct(e){const t=e.now??Date.now;let s="idle",n=0,o=null,r=0;const i=()=>s==="idle"||s==="error"&&t()>=n;return{shouldRun:i,run(){if(o)return o;if(!i())return Promise.resolve();s="loading";const c=r;let a;return a=Promise.resolve().then(e.load).then(()=>{r===c&&(s="ready")}).catch(()=>{r===c&&(s="error",n=t()+e.retryDelayMs)}).finally(()=>{o===a&&(o=null)}),o=a,a},reset(){r+=1,s="idle",n=0,o=null}}}function lt(e,t=s=>{const n=setTimeout(s,it);return()=>clearTimeout(n)}){const s=new Map;let n=null;const o=()=>{if(n=null,s.size===0)return;const r=[...s.values()];s.clear(),e(r)};return{push(r){s.set(me(r),r),n??=t(o)},cancel(){n?.(),n=null,s.clear()}}}function at(e){if(typeof window<"u"){const s=window;if(s.requestIdleCallback){const n=s.requestIdleCallback(e,{timeout:1e3});return()=>s.cancelIdleCallback?.(n)}}const t=setTimeout(e,0);return()=>clearTimeout(t)}const ut=6e4,we=3e4,ft=1e3,Z=200,dt=5e3,gt="/api/tail/discover?scope=hot&limit=160",pt=`/api/tail/recent?limit=${Z}&transcripts=1&mode=assistant-replies`;let d={sessions:[],fleet:null,discovery:null,recentEvents:[],loadedAt:null,loading:!0,error:null,nowMs:Date.now()};const K=new Set;let I=0,b=null,$=!1,E=null,R=null,N=null,_=null,z=null,ie=0;function Ae(){for(const e of[...K])e()}function vt(e,t){const s=n=>JSON.stringify([n?.transcripts??[],n?.processes??[]]);return e&&s(e)===s(t)?e:t}function L(e){d={...d,...e},Ae()}const V=ct({retryDelayMs:dt,load:async()=>{const e=await T(pt),t=he([...d.recentEvents,...e.events??[]],Z),s=C(d.recentEvents,t);s!==d.recentEvents&&L({recentEvents:s})}});function mt(){E||!V.shouldRun()||(E=at(()=>{E=null,I>0&&V.run()}))}const ye=lt(e=>{const t=he([...d.recentEvents,...e],Z),s=C(d.recentEvents,t);s!==d.recentEvents&&L({recentEvents:s})});function ht(e){Q(e)&&ye.push(e)}async function j(e){if(b)return $=!0,b;b=(async()=>{ie+=1,typeof window<"u"&&(window.__projectsInboxLoads=ie),d.loadedAt===null&&e!=="background"&&L({loading:!0,error:null});const[t,s,n]=await Promise.allSettled([T("/api/conversations"),T("/api/fleet"),T(gt)]),o=t.status==="fulfilled"?C(d.sessions,t.value):d.sessions,r=s.status==="fulfilled"?De(d.fleet,s.value):d.fleet,i=n.status==="fulfilled"?vt(d.discovery,n.value):d.discovery,c=[t,s,n].find(l=>l.status==="rejected"),a=c?c.reason instanceof Error?c.reason.message:String(c.reason):null,v=o!==d.sessions||r!==d.fleet||i!==d.discovery||a!==d.error||d.loading;d={...d,sessions:o,fleet:r,discovery:i,error:a,loading:!1,loadedAt:Date.now()},v&&Ae(),mt()})();try{await b}finally{b=null,$&&I>0&&($=!1,j("background"))}}function wt(){q()&&(R||(R=setTimeout(()=>{R=null,j("background")},ft)))}function At(){j("initial"),N=setInterval(()=>{q()&&j("background")},ut),_=setInterval(()=>{q()&&L({nowMs:Date.now()})},we),z=Re(()=>{j("background")})}function yt(){E?.(),E=null,V.reset(),ye.cancel(),R&&(clearTimeout(R),R=null),N&&(clearInterval(N),N=null),_&&(clearInterval(_),_=null),z?.(),z=null}function Ut(){j("background")}function St(){const[e,t]=W.useState(d);return W.useEffect(()=>{const s=()=>t(d);return K.add(s),I+=1,I===1&&At(),s(),()=>{K.delete(s),I-=1,I===0&&yt()}},[]),ke(wt),je(ht),e}let ce=null,M=null,le=null;function It(e,t){return!!e&&e.length===t.length&&e.every((s,n)=>s===t[n])}function D(e,t,s){if(!e?.length)return t;const n=new Map(e.map(i=>[s(i),i]));let o=e.length===t.length;const r=t.map((i,c)=>{const a=n.get(s(i)),v=a?C(a,i):i;return v!==e[c]&&(o=!1),v});return o?e:r}function kt(e,t){if(!e)return t;const s=D(e.projects,t.projects,i=>i.slug),n=D(e.threads,t.threads,i=>i.id),o=D(e.sessions,t.sessions,i=>i.id),r=C(e.projectAliases,tt(e.projectAliases,t.projectAliases,s));return s===e.projects&&n===e.threads&&o===e.sessions&&r===e.projectAliases?e:{projects:s,threads:n,sessions:o,projectAliases:r}}function Rt(e){const t=[e.agents,e.sessions,e.fleet,e.discovery,e.recentEvents,e.machineId,Math.floor(e.nowMs/we),e.showEphemeral];if(It(ce,t)&&M)return M;const s=Xe(e),n=`${e.machineId??""}\0${e.showEphemeral?"ephemeral":"durable"}`,o=kt(le===n?M:null,s);return ce=t,M=o,le=n,o}function Yt(e){const t=St(),{agents:s}=Ee(),n=Ie(e),o=!!e.showEphemeral;return{model:W.useMemo(()=>Rt({agents:s,machineId:n,sessions:t.sessions,fleet:t.fleet,discovery:t.discovery,recentEvents:t.recentEvents,nowMs:t.nowMs,showEphemeral:o}),[s,n,t.sessions,t.fleet,t.discovery,t.recentEvents,t.nowMs,o]),agents:s,nowMs:t.nowMs,loading:t.loading,loadedAt:t.loadedAt,error:t.error}}export{Ht as a,ot as b,$t as c,Dt as d,zt as e,rt as f,Wt as g,Ft as h,Vt as i,qt as j,Ut as k,Ot as r,Gt as s,Kt as t,Yt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as s,j as u}from"./index-
|
|
1
|
+
import{r as s,j as u}from"./index-BI9AljSD.js";import{l as c,L as f,c as l}from"./use-reduced-motion-8WuxLa5l.js";function p({children:r,features:e,strict:d=!1}){const[,i]=s.useState(!a(e)),t=s.useRef(void 0);if(!a(e)){const{renderer:n,...o}=e;t.current=n,c(o)}return s.useEffect(()=>{a(e)&&e().then(({renderer:n,...o})=>{c(o),t.current=n,i(!0)})},[]),u.jsx(f.Provider,{value:{renderer:t.current,strict:d},children:r})}function a(r){return typeof r=="function"}const L=l();export{p as L,L as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./createLucideIcon-
|
|
1
|
+
import{c as a}from"./createLucideIcon-DthwWQIg.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-
|
|
1
|
+
import{c as e}from"./createLucideIcon-DthwWQIg.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-BI9AljSD.js";import{ActivityContent as s}from"./content--T3p6akp.js";import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./router-DTtux5sP.js";import"./index-DfsTyYDx.js";import"./Provider-Bu-C8Hxc.js";import"./AgentDetailCard-B_KLcgsP.js";/* empty css */import{AgentsLeft as e}from"./left-BjFLvVOC.js";import{AgentsContent as n}from"./content-TV0nd6-r.js";import{AgentsInspector as m}from"./right-CfliKiHY.js";/* empty css */import"./secondaryNavConfig-C9bQ9_IA.js";/* empty css */import"./CrewAvatar-CXJHLNVM.js";import"./BackToPicker-Cto0Ioz9.js";import"./text-Faa3ZStB.js";import"./ConversationScreen-CXAHQwQ3.js";/* empty css */import"./ObservedTopologyPanel-BhVsvwkh.js";import"./SessionObserve-BCehTlO8.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./AgentLiveActions-CsQA3pu_.js";import{ProjectsRail as c}from"./ProjectsRail-p99BRBOa.js";import{ProjectsScreen as f}from"./ProjectsScreen-BB45DU53.js";import{ProjectsThreadAside as a}from"./ProjectsThreadAside-BHDTJWOz.js";import{BriefingsContent as x}from"./content-Dqpibejl.js";/* empty css */import{BrokerContent as j}from"./content-uXHLPHe0.js";import"./NewChatComposer-C_1op4dH.js";import{ChatLeft as u}from"./left-POkqE8gI.js";/* empty css */import{ChatContent as l}from"./content-BmGp9wNl.js";import{ConversationInspector as i}from"./right-C1QIbqFZ.js";/* empty css */import{CodeContent as h}from"./CodeScreen-CrR2JaVj.js";import{FollowContent as C}from"./content-odbb5H4U.js";/* empty css */import{HarnessesContent as d}from"./content-BJ4nHvcu.js";/* empty css */import{HomeLeft as I}from"./left-B4Ak-Ibt.js";import{HomeContent as p}from"./content-CQlykFbe.js";import{HomeRight as w}from"./right-BrICCmEt.js";import{MeshLeft as L}from"./left-UulOTcWh.js";import{MeshContent as P}from"./content-DpQdNePJ.js";import{MeshInspectorPanel as R}from"./right-BgJ4mQLf.js";import"./mesh-view-store-CiET-yN8.js";/* empty css */import{MeshOpsLeft as k}from"./left-BMb493FZ.js";import{MeshOpsContent as A}from"./content-BNyAjpUl.js";import{MeshOpsInspector as M}from"./right-CtOLXB9s.js";import{OpsLeft as S}from"./left-FNH7faCI.js";import{OpsContent as b}from"./content-CBWhwaRo.js";/* empty css */import"./RailRow-ClMmtaIE.js";import"./left-mission-B0bhseWw.js";import"./mission-control-store-DDAgWKUl.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-BMRIR6bH.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./TailView-BDy8c2VB.js";import{ReposContent as g}from"./content-Cpvdcm_l.js";import{ReposInspector as O}from"./right-D8id_DWQ.js";/* empty css */import"./RepoDiffViewerLazy-BkBmbi1Z.js";import"./cache-CeWH_KzJ.js";import{SearchContent as H}from"./content-4nFMLuzF.js";import{K as T}from"./KnowledgeSearchInspector-CU6BCFcS.js";/* empty css */import{SessionsContent as y}from"./content-CevL0DgF.js";import{SessionsInspector as B}from"./right-DJ34yMAi.js";/* empty css */import{SettingsContent as K}from"./content-Ch8pf2bj.js";import"./CastPicker-CTBHjjGw.js";import"./SettingsDrawer-BieUmb8g.js";import{TerminalLeft as W}from"./left-CsXQ8Q3G.js";import{TerminalContent as E}from"./Terminal-BlUQY9_Z.js";import{TerminalInspector as F}from"./right-DiFmtw6d.js";import{WorkContent as V}from"./content-DfS3vgAu.js";import{WorkInspector as q}from"./right-Bk6h7o-Z.js";import"./DocumentFocusViewer-DFFE85Tq.js";import{R as z}from"./RealtimeVoiceScreen-KPHJgO1l.js";import"./ActivityScreen-y-5DLleY.js";import"./api-Co9aQ2Jw.js";import"./clipboard-e3fSpeo7.js";import"./sse-DDHEHUgz.js";import"./colors-BtO5_zlx.js";import"./mentions-DuLQnEcn.js";import"./time-Dhsh_2EG.js";import"./EmptyState-D9X16fKq.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./createLucideIcon-DthwWQIg.js";import"./file-text--hfhwZH1.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-e6yGeorb.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./AgentInfoScreen-DHGLRddI.js";import"./conversation-model-QsJVfSeG.js";import"./openContent-C6XO6kr5.js";import"./AgentsScreen-CRi-hG2k.js";import"./AgentsSubnav-DUsya4WK.js";import"./SecondaryNav-BrXMtvKE.js";import"./library-D1iXfda2.js";import"./HarnessMark-DAaWPiT_.js";import"./AgentSessions-BePq5Lgc.js";import"./agents-project-model-UYiamtrU.js";import"./profile-B3qDSbrH.js";import"./context-budget-DX_fwUs3.js";import"./session-catalog-BkmktBHI.js";import"./terminal-relay-BFhdIstF.js";import"./AgentDefinitionsWorkspace-BbcZc9Xk.js";import"./agent-specialization-BtxLN4UR.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CY0RN78e.js";import"./chevron-down-C475vltS.js";import"./agent-essentials-vytdybaX.js";import"./openAgent-Dbv5wfuL.js";import"./terminal-takeover-B6H4llRR.js";import"./TmuxPeek-B4no_aGI.js";import"./refresh-cw-DmNAhaH0.js";import"./message-square-O-Hu9Mk2.js";import"./search-DmFM_9jm.js";import"./compass-BcRI_YXo.js";import"./settings-C6h9y5XX.js";import"./terminal-C3YRPfyz.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-B2W9DPG5.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./x-DfRJbqrh.js";import"./message-markup-Cc_O-WdA.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./eye-FnaaPfja.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./AddProjectForm-r_1tVuWk.js";import"./projects-inbox-CLek3QaG.js";import"./mesh-roster-Bc7T4b7z.js";import"./model-IGCUEsMy.js";import"./ProjectsInbox-JgU0lrY8.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-C8BiRVPx.js";import"./session-ref-lookup-state-SATH_jAP.js";import"./CrewWorkspaces-Bz2Dcnt4.js";import"./sliders-horizontal-BhHKxsCO.js";import"./api-HFH8wFyb.js";import"./arrow-up-right-CY0Vw_67.js";import"./ProjectAgentProfile-BhXAZEkW.js";import"./ProjectAgentProfileBar-uJw9Wdfk.js";import"./BriefingDetailScreen-C29smC5d.js";import"./scoutbot-markdown-CQ7Y1McC.js";import"./BriefingsScreen-DNyFBrPn.js";import"./BrokerScreen-CS0s4Gm4.js";import"./status-tone-BM_zuRy1.js";import"./broker-display-Q75fupqG.js";import"./BrokerMetadataPanel-DbaCQlhw.js";import"./DispatchAftermath-CrELgl2e.js";import"./follow-route-BvcGtBIL.js";import"./ShikiPane-DPWsVNtn.js";import"./arrow-down-DvTsLokL.js";import"./paperclip-BudMKSyr.js";import"./plus-BJ1If8vj.js";import"./send-horizontal-qyjNgEaV.js";import"./copy-Cj-owMb-.js";import"./radio-B5OpHrrK.js";import"./bot-DzkOUFBb.js";import"./NewChatOrigin-D7hwp6dm.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-BtgNnRgK.js";import"./agent-master-model-DAZL92oe.js";import"./use-conversation-list-DO5J8T1H.js";import"./MessagesScreen-CyNIZ3-X.js";import"./AgentMasterScreen-C5WlWNmk.js";import"./CodeDiffPane-QvxCUzTi.js";import"./usePierreRuntime-BfZHKAkI.js";/* empty css */import"./CodeProjectPicker-DplkpM7f.js";/* empty css */import"./FollowScreen-wZ-z67mX.js";import"./HarnessesScreen-DbKkQM4o.js";import"./useContentSecondaryNav-Bpkc8ayb.js";import"./OpsSubnav-BEU4kKXm.js";import"./HomeHero-DYyd3cpz.js";import"./observe-Da2mRAsc.js";import"./persistent-state-xJz-qAFc.js";import"./agent-lanes-model-DXqjs0OK.js";import"./home-moving-signal-BPqBoNSm.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DuD3RFX5.js";import"./file-code-corner-DDPq4Cur.js";import"./mesh-buckets-6y3ZIibI.js";import"./MeshScreen-BJ-j9YXv.js";import"./MeshCanvas-TvsID4fe.js";import"./chunk-T65CQEWV-BtNvicWs.js";import"./useAgentHoverCard-Bkv-Uz_V.js";import"./local-agents-DKr-gIDC.js";import"./mesh-ops-CRR-KnCG.js";import"./use-mesh-ops-items-N1HHhChY.js";import"./use-scout-dev-flags-B31qTy6m.js";import"./left-agents-CFMxyEjT.js";import"./left-default-rnX5HANc.js";import"./left-lanes-BpLXT_qH.js";import"./lane-roster-store-Q7pcblY5.js";import"./left-advisor-CJkQS2d6.js";import"./server-nWqndnxu.js";import"./layers-Dz2dKOnU.js";import"./gauge-BVEknshP.js";import"./OpsScreen-CuYVgkC_.js";import"./page-status-Crtgjbq3.js";import"./AgentLanesView-u5vpLwQf.js";import"./AgentFloorView-DMFiHs21.js";import"./AgentLanesPreflight-CFadSaia.js";import"./AgentLaneChrome-CTp39syR.js";import"./AgentLaneCard-ajZvcfdW.js";import"./AgentLaneSummaryResize-VMNDo7kD.js";import"./agent-lane-card-model-CNZMPkhc.js";import"./agent-lane-preview-BhplDYGf.js";import"./agent-lane-detail-ppJId6Jc.js";import"./AgentLaneDetailSheet-DRc-TpMB.js";import"./LaneTraceDetailSheet-C3C8UjXv.js";import"./LaneTraceEventFocus-Cek_64zR.js";import"./MissionControlView-Bj7cAbZd.js";import"./MissionContextRail-Be0uXljQ.js";import"./mission-wall-CocIM1cF.js";import"./mission-control-model-C0fByIjm.js";import"./MissionFocusOverlay-DvTw6ts5.js";import"./MissionLogPane-EsM_S3ro.js";import"./OpsAgentsView-DBYtmLnh.js";import"./DataTable-DXIlOlVu.js";import"./HostAdvisorView-NtM0bsg8.js";import"./layout-grid-Bvs5fdB4.js";import"./AtopView-PxWQd-sX.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./RepoDiffPageScreen-CdTFfmbk.js";import"./ReposScreen-C8dT4bK0.js";import"./selection-bridge-Dy2mtMyi.js";import"./KnowledgeSearchScreen-DvbRRPQB.js";import"./clock-DVvENUU5.js";import"./SessionsScreen-BNvjUflN.js";import"./RawSessionsTable-BtKdQPiv.js";import"./FlightObserveScreen-qyzHzxLa.js";import"./SettingsScreen-3JvX1WFL.js";import"./StatusPill-BcuYUgsD.js";import"./AgentConfigurationScreen-BD7Unt2P.js";import"./credentials-BTce3VP1.js";import"./VoicePermissionsPanel-Bd16scwz.js";import"./chunk-YOZR3KYS-DN5EJulq.js";import"./session-table-DKSF0mrS.js";/* empty css */import"./HerdrSession-CYKRfBad.js";import"./chunk-JTPDIGGW-Ci5j4vzV.js";import"./TerminalHeaderMount-Cy-uxkey.js";import"./WorkDetailScreen-DIFQufak.js";import"./WorkFilesViewer-CT5XEFGf.js";import"./agent-autocomplete-DXUBnlkN.js";import"./gestures-3gw5VgUS.js";import"./rocket-D3-TUJ2m.js";function kp(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(L,{});case"mesh-ops":return r.jsx(k,{});case"terminal":return r.jsx(W,{});default:return r.jsx(I,{})}}function Ap(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(H,{route:t,navigate:o});case"mesh":return r.jsx(P,{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 Mp(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(O,{});default:return null}}export{Ap as resolveContentPane,kp as resolveLeftPane,Mp as resolveRightPane};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as o}from"./index-BI9AljSD.js";import{AgentsLeft as i}from"./left-BjFLvVOC.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";import"./Provider-Bu-C8Hxc.js";import"./router-DTtux5sP.js";import"./BackToPicker-Cto0Ioz9.js";import"./AgentLiveActions-CsQA3pu_.js";import"./ObservedTopologyPanel-BhVsvwkh.js";/* empty css */import"./secondaryNavConfig-C9bQ9_IA.js";/* empty css */import"./CrewAvatar-CXJHLNVM.js";import"./text-Faa3ZStB.js";import"./index-DfsTyYDx.js";import"./AgentDetailCard-B_KLcgsP.js";import"./ConversationScreen-CXAHQwQ3.js";/* empty css */import"./SessionObserve-BCehTlO8.js";/* empty css *//* empty css *//* empty css *//* empty css */import{ProjectsRail as m}from"./ProjectsRail-p99BRBOa.js";import"./ProjectsInbox-JgU0lrY8.js";import"./projects-inbox-CLek3QaG.js";import{ChatLeft as p}from"./left-POkqE8gI.js";/* empty css *//* empty css */import{HomeLeft as e}from"./left-B4Ak-Ibt.js";import"./content-CQlykFbe.js";import{MeshLeft as s}from"./left-UulOTcWh.js";import"./mesh-view-store-CiET-yN8.js";/* empty css *//* empty css */import{MeshOpsLeft as n}from"./left-BMb493FZ.js";import"./use-scout-dev-flags-B31qTy6m.js";import"./mesh-ops-CRR-KnCG.js";import{OpsLeft as l}from"./left-FNH7faCI.js";/* empty css *//* empty css *//* empty css *//* empty css */import"./SlidePanel-BMRIR6bH.js";/* empty css */import"./mission-control-store-DDAgWKUl.js";/* empty css *//* empty css *//* empty css */import"./TailView-BDy8c2VB.js";import"./RailRow-ClMmtaIE.js";import"./left-mission-B0bhseWw.js";import{TerminalLeft as a}from"./left-CsXQ8Q3G.js";/* empty css */import{M as f}from"./MeshCanvasMinimap-CxqeVVco.js";import"./NewChatComposer-C_1op4dH.js";import"./conversation-model-QsJVfSeG.js";import"./createLucideIcon-DthwWQIg.js";import"./colors-BtO5_zlx.js";import"./time-Dhsh_2EG.js";import"./api-Co9aQ2Jw.js";import"./HarnessMark-DAaWPiT_.js";import"./NewChatOrigin-D7hwp6dm.js";import"./keyboard-nav-e6yGeorb.js";import"./x-DfRJbqrh.js";import"./chevron-down-C475vltS.js";import"./search-DmFM_9jm.js";import"./loader-circle-B2W9DPG5.js";import"./file-text--hfhwZH1.js";import"./AgentAvatar-B7c0egdP.js";import"./SpriteAvatar-56DTXxSV.js";import"./sse-DDHEHUgz.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-BJIamJOH.js";import"./DocumentFocusViewer-DFFE85Tq.js";import"./TextDocumentSurface-BeSwe3Yl.js";import"./chevron-right-CnZRSd-V.js";import"./code-xml-CvKBY3KA.js";import"./arrow-left-DHfdXJVZ.js";import"./arrow-right-BBsrogWf.js";import"./scout-voice-BZKsdquE.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-DLNT8aOo.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-BQ6t92tJ.js";import"./terminal-takeover-B6H4llRR.js";import"./openContent-C6XO6kr5.js";import"./eye-FnaaPfja.js";import"./terminal-C3YRPfyz.js";import"./message-square-O-Hu9Mk2.js";import"./compass-BcRI_YXo.js";import"./settings-C6h9y5XX.js";import"./git-branch-DJyvr0k-.js";import"./scroll-text-kPhYbh-M.js";import"./voice-levels-Dcr3jglk.js";import"./ConversationComposer-H8_hsYSc.js";import"./zap-CIo8msJB.js";import"./message-markup-Cc_O-WdA.js";import"./mentions-DuLQnEcn.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-B0ZBhE_E.js";import"./AstronautSuit-Cjjcv6yQ.js";import"./ConversationFeedRows-hlEFlURs.js";import"./ConversationPanels-fMo6Uy1v.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-8WuxLa5l.js";import"./proxy-1BABCaDb.js";import"./activity-CqZafWfx.js";import"./message-circle-B2DoYKDO.js";import"./tail-events-BdUrO0kb.js";import"./ConversationStatus-DI5GCiyW.js";import"./check-DbIkldnK.js";import"./sparkles-Cf8gin88.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-Bo2Zl-1a.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObserveTextFlow-BcrGQet8.js";import"./SessionObserveEvidence-Bb6U-dem.js";import"./wrench-DkxnZRlR.js";import"./external-link-C_nxk0MJ.js";import"./AddProjectForm-r_1tVuWk.js";import"./project-overview-helpers-BQTc_Ous.js";import"./mesh-roster-Bc7T4b7z.js";import"./agents-project-model-UYiamtrU.js";import"./model-IGCUEsMy.js";import"./ui-LM8pS8qE.js";import"./SessionRefScreen-C8BiRVPx.js";import"./session-ref-lookup-state-SATH_jAP.js";/* empty css */import"./CrewWorkspaces-Bz2Dcnt4.js";import"./agent-specialization-BtxLN4UR.js";import"./sliders-horizontal-BhHKxsCO.js";import"./api-HFH8wFyb.js";import"./cache-CeWH_KzJ.js";import"./arrow-up-right-CY0Vw_67.js";import"./conversation-prefs-DNre-Lcx.js";import"./use-fleet-active-asks-BtgNnRgK.js";import"./agent-master-model-DAZL92oe.js";import"./use-conversation-list-DO5J8T1H.js";import"./openAgent-Dbv5wfuL.js";import"./HomeHero-DYyd3cpz.js";import"./refresh-cw-DmNAhaH0.js";import"./observe-Da2mRAsc.js";import"./persistent-state-xJz-qAFc.js";import"./agent-lanes-model-DXqjs0OK.js";import"./context-budget-DX_fwUs3.js";import"./home-moving-signal-BPqBoNSm.js";import"./home-live-action-BkqGLVRY.js";import"./cpu-DuD3RFX5.js";import"./file-code-corner-DDPq4Cur.js";import"./mesh-buckets-6y3ZIibI.js";import"./use-mesh-ops-items-N1HHhChY.js";import"./left-agents-CFMxyEjT.js";import"./left-default-rnX5HANc.js";import"./left-lanes-BpLXT_qH.js";import"./lane-roster-store-Q7pcblY5.js";import"./left-advisor-CJkQS2d6.js";import"./server-nWqndnxu.js";import"./layers-Dz2dKOnU.js";import"./gauge-BVEknshP.js";import"./MissionLeftAgentRow-B0QG7Gys.js";import"./page-status-Crtgjbq3.js";import"./chunk-YOZR3KYS-DN5EJulq.js";import"./arrow-down-DvTsLokL.js";import"./terminal-relay-BFhdIstF.js";import"./session-table-DKSF0mrS.js";import"./clock-DVvENUU5.js";function kt(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{kt as resolveSidebarContext};
|