@openscout/scout 0.2.97 → 0.2.98
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/README.md +0 -1
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +3 -3
- package/dist/client/assets/ActivityScreen-sfonf5SR.js +1 -0
- package/dist/client/assets/{AddProjectForm-r_1tVuWk.js → AddProjectForm-fXndbzXT.js} +1 -1
- package/dist/client/assets/{AgentAvatar-B7c0egdP.js → AgentAvatar-Dz79iTxB.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-DDc3udYM.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DHDS9Pgd.js +1 -0
- package/dist/client/assets/{AgentDetailCard-B_KLcgsP.js → AgentDetailCard-8viaEY8b.js} +1 -1
- package/dist/client/assets/AgentFloorView-DuyvyMMj.js +1 -0
- package/dist/client/assets/AgentInfoScreen-qntgg2q2.js +1 -0
- package/dist/client/assets/{AgentLaneCard-ajZvcfdW.js → AgentLaneCard-Cc9uyfBr.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-CTp39syR.js → AgentLaneChrome-Dv2lBFoH.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-DRc-TpMB.js → AgentLaneDetailSheet-CGqtqSHQ.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-VMNDo7kD.js → AgentLaneSummaryResize-Di4u6df2.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BA6fRwkD.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-CFadSaia.js → AgentLanesPreflight-CCGBArIb.js} +1 -1
- package/dist/client/assets/AgentLanesView-96lHsoX7.js +2 -0
- package/dist/client/assets/{AgentLiveActions-CsQA3pu_.js → AgentLiveActions-DlSKL60c.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-DHrMuQ6_.js +1 -0
- package/dist/client/assets/{AgentSessions-BePq5Lgc.js → AgentSessions-DV9v34aq.js} +2 -2
- package/dist/client/assets/AgentsConsole-DTpVhS67.js +1 -0
- package/dist/client/assets/AgentsScreen-hZ4o2I-e.js +1 -0
- package/dist/client/assets/AgentsSubnav-Ci7uWM7P.js +1 -0
- package/dist/client/assets/{AstronautSuit-Cjjcv6yQ.js → AstronautSuit-CwB4Dw07.js} +1 -1
- package/dist/client/assets/{AtopView-PxWQd-sX.js → AtopView-D7vyQDtE.js} +1 -1
- package/dist/client/assets/{BackToPicker-Cto0Ioz9.js → BackToPicker-BHicJyfc.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-B-wD_Bot.js +1 -0
- package/dist/client/assets/{BriefingsScreen-DNyFBrPn.js → BriefingsScreen-Cn4Mbam9.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-DbaCQlhw.js → BrokerMetadataPanel-BJSwU9XZ.js} +1 -1
- package/dist/client/assets/BrokerScreen-C8FQ5rlg.js +5 -0
- package/dist/client/assets/{CastPicker-CTBHjjGw.js → CastPicker-CkgTalIt.js} +1 -1
- package/dist/client/assets/{ChatCollapsedStrip-D4rc7wBQ.js → ChatCollapsedStrip-7Wrg8Ge0.js} +1 -1
- package/dist/client/assets/{CodeDiffPane-QvxCUzTi.js → CodeDiffPane-DfluIWmO.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-DplkpM7f.js → CodeProjectPicker-By_Wz9ex.js} +1 -1
- package/dist/client/assets/CodeScreen-cLC0tJ4S.js +1 -0
- package/dist/client/assets/ConversationComposer-BUIjWMBi.js +1 -0
- package/dist/client/assets/ConversationFeedRows-Bx0gFyG_.js +1 -0
- package/dist/client/assets/ConversationHeader-Bt2RBj93.js +1 -0
- package/dist/client/assets/{ConversationPanels-fMo6Uy1v.js → ConversationPanels-o6W-cOoU.js} +2 -2
- package/dist/client/assets/ConversationScreen-DIU7m_aC.js +2 -0
- package/dist/client/assets/{ConversationStatus-DI5GCiyW.js → ConversationStatus-CTYOywFh.js} +1 -1
- package/dist/client/assets/{CrewAvatar-CXJHLNVM.js → CrewAvatar-CZ_faQ_s.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-DNX-QQ1h.js +1 -0
- package/dist/client/assets/{DataTable-DXIlOlVu.js → DataTable-C6aMSilS.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-CrELgl2e.js → DispatchAftermath-ZCEB75hh.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-DFFE85Tq.js → DocumentFocusViewer-D8iB6SMt.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DgpewB3y.js → EmbeddableSurfacesLab-D3iZiS8o.js} +1 -1
- package/dist/client/assets/{EmptyState-D9X16fKq.js → EmptyState-CKPWFSjq.js} +1 -1
- package/dist/client/assets/{FileViewerPane-CY0RN78e.js → FileViewerPane-CxNbcTYf.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-BTe1YRPr.js +1 -0
- package/dist/client/assets/{FollowScreen-wZ-z67mX.js → FollowScreen-CkR-okdL.js} +1 -1
- package/dist/client/assets/{HarnessMark-DAaWPiT_.js → HarnessMark-DttReffF.js} +1 -1
- package/dist/client/assets/HarnessesScreen-COO_Q8VY.js +1 -0
- package/dist/client/assets/{HerdrSession-CYKRfBad.js → HerdrSession-DsuxCtfX.js} +1 -1
- package/dist/client/assets/{HomeHero-DYyd3cpz.js → HomeHero-DXJo2QSO.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-NtM0bsg8.js → HostAdvisorView-DeJ-8RZV.js} +1 -1
- package/dist/client/assets/{KnowledgeSearchInspector-CU6BCFcS.js → KnowledgeSearchInspector-W_zNIBRV.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-_rxJNUUh.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-Bo2Zl-1a.js → LaneToolHoverCard-t7-XJP-h.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DNIECgEl.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-Cek_64zR.js → LaneTraceEventFocus-BB5DhFQm.js} +1 -1
- package/dist/client/assets/{MeshCanvas-TvsID4fe.js → MeshCanvas-DZv2ipsy.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CxqeVVco.js → MeshCanvasMinimap-BXHRNb7l.js} +1 -1
- package/dist/client/assets/MeshScreen-DuNvpDC5.js +1 -0
- package/dist/client/assets/{MeshTopologyView-BjprutE8.js → MeshTopologyView-Dc0GSrKa.js} +2 -2
- package/dist/client/assets/MessagesScreen-dNNPFwAc.js +1 -0
- package/dist/client/assets/{MissionContextRail-Be0uXljQ.js → MissionContextRail-DnCWPzAM.js} +1 -1
- package/dist/client/assets/MissionControlView-DmaThhNR.js +1 -0
- package/dist/client/assets/MissionFocusOverlay-K21ssTxv.js +1 -0
- package/dist/client/assets/MissionLeftAgentRow-CbQm4BLv.js +1 -0
- package/dist/client/assets/{MissionLogPane-EsM_S3ro.js → MissionLogPane-BLvSSIdT.js} +1 -1
- package/dist/client/assets/{NewAgentModal-Cqiq1CE1.js → NewAgentModal-B7qxjZlW.js} +1 -1
- package/dist/client/assets/NewChatComposer-D2Ah4T-W.js +19 -0
- package/dist/client/assets/{NewChatOrigin-D7hwp6dm.js → NewChatOrigin-DCn5cWPZ.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-CGHI_hb5.js → ObserveEmbedScreen-DvKGsaLv.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-BcrGQet8.js → ObserveTextFlow-DCJ5EmD8.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-BhVsvwkh.js → ObservedTopologyPanel-CJVqIqQ2.js} +1 -1
- package/dist/client/assets/{OpenScoutAppShell-BtfvMkAp.js → OpenScoutAppShell-C9TOLB7u.js} +2 -2
- package/dist/client/assets/OpsAgentsView-vIoY-AW1.js +1 -0
- package/dist/client/assets/OpsScreen-CJBwshEp.js +1 -0
- package/dist/client/assets/OpsSubnav-CjDTnp64.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-Br1eTD7G.js +1 -0
- package/dist/client/assets/ProjectAgentProfileBar-CUzZ4Rpx.js +1 -0
- package/dist/client/assets/ProjectAgentProfileHero-mjxNcRvw.js +1 -0
- package/dist/client/assets/ProjectsInbox-Bq29DE_o.js +2 -0
- package/dist/client/assets/ProjectsRail-kMDA0yn4.js +1 -0
- package/dist/client/assets/ProjectsScreen-BDaJYhc0.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-B940p3vW.js +1 -0
- package/dist/client/assets/Provider-D0bB7q6y.js +1 -0
- package/dist/client/assets/{RailRow-ClMmtaIE.js → RailRow-B88JVr62.js} +1 -1
- package/dist/client/assets/RawSessionsTable-CzGhEdiZ.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-CyP1CWsX.js +1 -0
- package/dist/client/assets/{RepoDiffEmbedScreen-CjZ5ew3y.js → RepoDiffEmbedScreen-mexrJPhW.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-CdTFfmbk.js → RepoDiffPageScreen-DbqX4L3q.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-BFperHQg.js → RepoDiffViewer-Bw5yMC4A.js} +1 -1
- package/dist/client/assets/{RepoDiffViewerLazy-BkBmbi1Z.js → RepoDiffViewerLazy-DzfoFhbl.js} +2 -2
- package/dist/client/assets/{ReposScreen-C8dT4bK0.js → ReposScreen-CzbO1Fuy.js} +2 -2
- package/dist/client/assets/{ScoutDeckSurface-BcJsm2Kq.js → ScoutDeckSurface-DQoZofzH.js} +1 -1
- package/dist/client/assets/{ScoutSurface-DmzEtrx8.js → ScoutSurface-NlhDsPzg.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DU15Plja.js → ScoutbotFxLab-l2WAahCg.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BrXMtvKE.js → SecondaryNav-Cs0_FQdj.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-Bt4flmAx.js → SessionEmbedScreen-CpduQ0O9.js} +1 -1
- package/dist/client/assets/{SessionObserve-BCehTlO8.js → SessionObserve-BVeTkcIl.js} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Bb6U-dem.js → SessionObserveEvidence-BkOezTGV.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DetLMkTT.js +1 -0
- package/dist/client/assets/SessionsScreen-B-McKw6d.js +1 -0
- package/dist/client/assets/{SettingsDrawer-BieUmb8g.js → SettingsDrawer-CPB32w0n.js} +3 -3
- package/dist/client/assets/SettingsScreen-BEzYFdjz.js +1 -0
- package/dist/client/assets/{ShikiPane-DPWsVNtn.js → ShikiPane-C0TuCATU.js} +1 -1
- package/dist/client/assets/{SlidePanel-BMRIR6bH.js → SlidePanel-CETQ5NTx.js} +1 -1
- package/dist/client/assets/{SpriteAvatar-56DTXxSV.js → SpriteAvatar-DFO4Kb4Z.js} +1 -1
- package/dist/client/assets/{StatusPill-BcuYUgsD.js → StatusPill-BllrY-eg.js} +1 -1
- package/dist/client/assets/{TailView-BDy8c2VB.js → TailView-_gKWfaQM.js} +2 -2
- package/dist/client/assets/Terminal-DWyZTZdY.js +1 -0
- package/dist/client/assets/TerminalEmbedScreen-_SSzwhWa.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-Cy-uxkey.js → TerminalHeaderMount-CY7uIWBg.js} +1 -1
- package/dist/client/assets/{TextDocumentSurface-BeSwe3Yl.js → TextDocumentSurface-2X1Gw4eA.js} +1 -1
- package/dist/client/assets/{TmuxPeek-B4no_aGI.js → TmuxPeek-CqTJRhkI.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-Bd16scwz.js → VoicePermissionsPanel-C4vkU-sU.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-DIFQufak.js → WorkDetailScreen-DqGnuK0e.js} +3 -3
- package/dist/client/assets/{WorkFilesViewer-CT5XEFGf.js → WorkFilesViewer-D8-4vF5l.js} +1 -1
- package/dist/client/assets/{activity-CqZafWfx.js → activity-CzTJ-YMX.js} +1 -1
- package/dist/client/assets/{addon-fit-CM6F_JRD.js → addon-fit-Zx3A7pGS.js} +1 -1
- package/dist/client/assets/{addon-webgl-DRTiePFC.js → addon-webgl-DitJj-N0.js} +1 -1
- package/dist/client/assets/{agent-autocomplete-DXUBnlkN.js → agent-autocomplete-BlK8wY06.js} +1 -1
- package/dist/client/assets/{agent-essentials-vytdybaX.js → agent-essentials-K9B6kbTS.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-CNZMPkhc.js → agent-lane-card-model-CY3OE1Xu.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-DXqjs0OK.js → agent-lanes-model-tc-1hE6q.js} +1 -1
- package/dist/client/assets/{agent-master-model-DAZL92oe.js → agent-master-model-DMcHeNq3.js} +1 -1
- package/dist/client/assets/agent-specialization-CtF_jI34.js +1 -0
- package/dist/client/assets/{arc.es-Bh84oHJ7.js → arc.es-BNXJqSw7.js} +1 -1
- package/dist/client/assets/{arrow-down-DvTsLokL.js → arrow-down-BAGkhHA6.js} +1 -1
- package/dist/client/assets/{arrow-left-DHfdXJVZ.js → arrow-left-eToA6GxC.js} +1 -1
- package/dist/client/assets/{arrow-right-BBsrogWf.js → arrow-right-DTX42clh.js} +1 -1
- package/dist/client/assets/{arrow-up-right-CY0Vw_67.js → arrow-up-right-B09GPwFl.js} +1 -1
- package/dist/client/assets/{bot-DzkOUFBb.js → bot-WxKXYtEX.js} +1 -1
- package/dist/client/assets/{check-DbIkldnK.js → check-Dz2SRHft.js} +1 -1
- package/dist/client/assets/{chevron-down-C475vltS.js → chevron-down-D120PY4g.js} +1 -1
- package/dist/client/assets/{chevron-right-CnZRSd-V.js → chevron-right-CowuvuE6.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-DLNT8aOo.js → chunk-HRAB3GC3-KjjrTLCU.js} +1 -1
- package/dist/client/assets/{chunk-JTPDIGGW-Ci5j4vzV.js → chunk-JTPDIGGW-COJ00z94.js} +3 -3
- package/dist/client/assets/{chunk-T65CQEWV-BtNvicWs.js → chunk-T65CQEWV-H2QEKfr1.js} +1 -1
- package/dist/client/assets/{chunk-YOZR3KYS-DN5EJulq.js → chunk-YOZR3KYS-CrCgXw9l.js} +1 -1
- package/dist/client/assets/{clock-DVvENUU5.js → clock-_9FDplIT.js} +1 -1
- package/dist/client/assets/{code-xml-CvKBY3KA.js → code-xml-CkkNdRmu.js} +1 -1
- package/dist/client/assets/{compass-BcRI_YXo.js → compass-BdpImt_W.js} +1 -1
- package/dist/client/assets/content-0RBfbCIJ.js +1 -0
- package/dist/client/assets/content-BTmnk2bl.js +1 -0
- package/dist/client/assets/content-Bk5DKhyP.js +1 -0
- package/dist/client/assets/{content-BNyAjpUl.js → content-Bw_8GE_S.js} +1 -1
- package/dist/client/assets/content-CI4gLEWi.js +1 -0
- package/dist/client/assets/content-CLCtp9Rb.js +1 -0
- package/dist/client/assets/content-C_FAGTNk.js +1 -0
- package/dist/client/assets/content-CnnzWOE3.js +1 -0
- package/dist/client/assets/content-DKlY98pO.js +1 -0
- package/dist/client/assets/content-Df7ndXTG.js +1 -0
- package/dist/client/assets/content-DkZDzzx3.js +1 -0
- package/dist/client/assets/content-DnGmb2L0.js +1 -0
- package/dist/client/assets/content-Ds-zs-Ss.js +1 -0
- package/dist/client/assets/content-JIWSyC0f.js +1 -0
- package/dist/client/assets/content-Q3TIYC8q.js +1 -0
- package/dist/client/assets/content-evaBfvxD.js +1 -0
- package/dist/client/assets/{context-budget-DX_fwUs3.js → context-budget-DqxWzalx.js} +1 -1
- package/dist/client/assets/{conversation-icons-CBMKBGHd.js → conversation-icons-DHGc9wbT.js} +1 -1
- package/dist/client/assets/conversation-model-C2KuZUXc.js +1 -0
- package/dist/client/assets/conversation-motion-features-BJnHs3Ul.js +1 -0
- package/dist/client/assets/{copy-Cj-owMb-.js → copy-BzdzWsQd.js} +1 -1
- package/dist/client/assets/{cpu-DuD3RFX5.js → cpu-CHFIGw87.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DthwWQIg.js → createLucideIcon-Dv8H8m7J.js} +1 -1
- package/dist/client/assets/discover-DutlV0ZU.js +2 -0
- package/dist/client/assets/embed-entry-CJG7WEVw.js +2 -0
- package/dist/client/assets/{external-link-C_nxk0MJ.js → external-link-BvX5PfLh.js} +1 -1
- package/dist/client/assets/{eye-FnaaPfja.js → eye-C9cGk5z6.js} +1 -1
- package/dist/client/assets/{file-code-corner-DDPq4Cur.js → file-code-corner-jlGFdr8d.js} +1 -1
- package/dist/client/assets/{file-text--hfhwZH1.js → file-text-BHro8MkG.js} +1 -1
- package/dist/client/assets/{gauge-BVEknshP.js → gauge-DSflSery.js} +1 -1
- package/dist/client/assets/{gestures-3gw5VgUS.js → gestures-YA5IIwp-.js} +1 -1
- package/dist/client/assets/{git-branch-DJyvr0k-.js → git-branch-Bc_eDIpG.js} +1 -1
- package/dist/client/assets/{home-moving-signal-BPqBoNSm.js → home-moving-signal-PHSqSBu_.js} +1 -1
- package/dist/client/assets/home-now-card-C_qsI6C6.js +1 -0
- package/dist/client/assets/{home-now-card-nano-G8kMB32m.js → home-now-card-nano-Jmy7eJ6H.js} +1 -1
- package/dist/client/assets/{hooks-BMsQzo9j.js → hooks-ME7rmhpE.js} +1 -1
- package/dist/client/assets/{index-BI9AljSD.js → index-C1VaWNuD.js} +2 -2
- package/dist/client/assets/index-C8UCRm2W.js +1 -0
- package/dist/client/assets/index-Cn0I2Hgi.js +1 -0
- package/dist/client/assets/index-Cx6Gbr6n.js +1 -0
- package/dist/client/assets/{inspector-panel-CFSArQ8Y.js → inspector-panel-CwrHjRaQ.js} +2 -2
- package/dist/client/assets/{keyboard-nav-e6yGeorb.js → keyboard-nav-B8sQ_8IF.js} +1 -1
- package/dist/client/assets/{lane-roster-store-Q7pcblY5.js → lane-roster-store-DN2jxXF-.js} +1 -1
- package/dist/client/assets/{layers-Dz2dKOnU.js → layers-CW2-qHsG.js} +1 -1
- package/dist/client/assets/{layout-grid-Bvs5fdB4.js → layout-grid-BoVnPOk-.js} +1 -1
- package/dist/client/assets/left-BRu9pnqx.js +2 -0
- package/dist/client/assets/left-BjS1dKNV.js +2 -0
- package/dist/client/assets/left-CL-TVLJ7.js +1 -0
- package/dist/client/assets/left-DLpsDi55.js +1 -0
- package/dist/client/assets/left-DPcM9o8Y.js +1 -0
- package/dist/client/assets/left-MmTJf1tK.js +1 -0
- package/dist/client/assets/left-P80i5V8L.js +1 -0
- package/dist/client/assets/left-advisor-CbXVzAqS.js +1 -0
- package/dist/client/assets/left-agents-7mJsiNyr.js +1 -0
- package/dist/client/assets/left-default-COK26l3H.js +1 -0
- package/dist/client/assets/left-lanes-Dbdm9Veu.js +1 -0
- package/dist/client/assets/left-mission-DqGR5jby.js +1 -0
- package/dist/client/assets/library-COnWzUWv.js +1 -0
- package/dist/client/assets/{loader-circle-B2W9DPG5.js → loader-circle-DmUG_YC7.js} +1 -1
- package/dist/client/assets/{local-agents-DKr-gIDC.js → local-agents-VP1-ZlPw.js} +1 -1
- package/dist/client/assets/{mentions-DuLQnEcn.js → mentions-BZ5SBMtc.js} +1 -1
- package/dist/client/assets/mesh-buckets-CLYS8Jx8.js +1 -0
- package/dist/client/assets/{mesh-ops-CRR-KnCG.js → mesh-ops-CKSWgax2.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CiET-yN8.js → mesh-view-store-CBM1za_N.js} +1 -1
- package/dist/client/assets/{message-circle-B2DoYKDO.js → message-circle-joGFxfj1.js} +1 -1
- package/dist/client/assets/{message-markup-Cc_O-WdA.js → message-markup-DC0QFEZn.js} +1 -1
- package/dist/client/assets/{message-square-O-Hu9Mk2.js → message-square-BLiFqpe_.js} +1 -1
- package/dist/client/assets/{mission-control-store-DDAgWKUl.js → mission-control-store-CM8mQGg8.js} +1 -1
- package/dist/client/assets/model-CBkMvT1w.js +1 -0
- package/dist/client/assets/{observe-Da2mRAsc.js → observe-BLmy4quB.js} +1 -1
- package/dist/client/assets/{page-status-Crtgjbq3.js → page-status-BE0-J1xY.js} +1 -1
- package/dist/client/assets/{paperclip-BudMKSyr.js → paperclip-Br7wUDFl.js} +1 -1
- package/dist/client/assets/{persistent-state-xJz-qAFc.js → persistent-state-BubPQ7tT.js} +1 -1
- package/dist/client/assets/{plus-BJ1If8vj.js → plus-BWKhylds.js} +1 -1
- package/dist/client/assets/profile-BCvk8jOQ.js +1 -0
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +1 -0
- package/dist/client/assets/projects-inbox-DFbgVlXL.js +1 -0
- package/dist/client/assets/{proxy-1BABCaDb.js → proxy-DVDRhSRR.js} +1 -1
- package/dist/client/assets/{radio-B5OpHrrK.js → radio-CxIXS1nU.js} +1 -1
- package/dist/client/assets/{refresh-cw-DmNAhaH0.js → refresh-cw-Bkh7Cvnd.js} +1 -1
- package/dist/client/assets/resolve-panes-DhD5qmQO.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-GqhZNRPY.js +1 -0
- package/dist/client/assets/right-B_08ilv6.js +1 -0
- package/dist/client/assets/right-Brm67HOL.js +1 -0
- package/dist/client/assets/right-BveAPKBW.js +1 -0
- package/dist/client/assets/right-CpTB_-Ya.js +1 -0
- package/dist/client/assets/right-CqC4Qdot.js +1 -0
- package/dist/client/assets/right-D91j9d5Y.js +1 -0
- package/dist/client/assets/{right-D8id_DWQ.js → right-DVUq5374.js} +1 -1
- package/dist/client/assets/right-DaLRhYl3.js +1 -0
- package/dist/client/assets/right-Dt1wOwA5.js +1 -0
- package/dist/client/assets/right-DtzqIZQF.js +1 -0
- package/dist/client/assets/{rocket-D3-TUJ2m.js → rocket-CnxqjX_K.js} +1 -1
- package/dist/client/assets/{router-DTtux5sP.js → router-kfcaYqZr.js} +1 -1
- package/dist/client/assets/runtime-picker-C20lTGhV.js +1 -0
- package/dist/client/assets/{scope-views-CPM0sBw_.js → scope-views-KPY85UUx.js} +1 -1
- package/dist/client/assets/{scout-voice-BZKsdquE.js → scout-voice-Cg1qfepC.js} +1 -1
- package/dist/client/assets/scoutbot-D7kGGyK_.js +3 -0
- package/dist/client/assets/{scoutbot-markdown-CQ7Y1McC.js → scoutbot-markdown-yb87JlSE.js} +1 -1
- package/dist/client/assets/{scroll-text-kPhYbh-M.js → scroll-text-DFcBYy5J.js} +1 -1
- package/dist/client/assets/{search-DmFM_9jm.js → search-FB2vVxCp.js} +1 -1
- package/dist/client/assets/{secondaryNavConfig-C9bQ9_IA.js → secondaryNavConfig-C0Srrmy8.js} +1 -1
- package/dist/client/assets/{selection-bridge-Dy2mtMyi.js → selection-bridge-qBGFCJv8.js} +1 -1
- package/dist/client/assets/{send-horizontal-qyjNgEaV.js → send-horizontal-CS7mxVhX.js} +1 -1
- package/dist/client/assets/{server-nWqndnxu.js → server-WY6gsbZz.js} +1 -1
- package/dist/client/assets/{session-catalog-BkmktBHI.js → session-catalog-CG4oL_yN.js} +1 -1
- package/dist/client/assets/{session-table-DKSF0mrS.js → session-table-uJh3v-ly.js} +1 -1
- package/dist/client/assets/{settings-C6h9y5XX.js → settings-DQEtqkM9.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-BhHKxsCO.js → sliders-horizontal-57e99_qO.js} +1 -1
- package/dist/client/assets/{sparkles-Cf8gin88.js → sparkles-D0vWLTyC.js} +1 -1
- package/dist/client/assets/{sse-DDHEHUgz.js → sse-B29iGBnw.js} +1 -1
- package/dist/client/assets/{system-surfaces-redesign-QVXNeGYw.css → system-surfaces-redesign-kuf3wuE_.css} +1 -1
- package/dist/client/assets/{tail-events-BdUrO0kb.js → tail-events-LK29oCKm.js} +1 -1
- package/dist/client/assets/{terminal-C3YRPfyz.js → terminal-UDy4lzV1.js} +1 -1
- package/dist/client/assets/{terminal-relay-BFhdIstF.js → terminal-relay-CXHMdain.js} +1 -1
- package/dist/client/assets/{terminal-screen-BLk4PAYt.css → terminal-screen-vMICbBJh.css} +1 -1
- package/dist/client/assets/{terminal-sessions-BQ6t92tJ.js → terminal-sessions-Bdt2W3Y4.js} +1 -1
- package/dist/client/assets/{terminal-takeover-B6H4llRR.js → terminal-takeover-BMeBjBB2.js} +1 -1
- package/dist/client/assets/{use-conversation-list-DO5J8T1H.js → use-conversation-list-UG-tMN67.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-BtgNnRgK.js → use-fleet-active-asks-CCGrll5q.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-N1HHhChY.js → use-mesh-ops-items-BjyeFJTz.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-8WuxLa5l.js → use-reduced-motion-CPoX8iV2.js} +1 -1
- package/dist/client/assets/{use-scout-dev-flags-B31qTy6m.js → use-scout-dev-flags-DTseRrFi.js} +1 -1
- package/dist/client/assets/{useAgentHoverCard-Bkv-Uz_V.js → useAgentHoverCard-BgTLNcF-.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-CoIoz7JU.js +1 -0
- package/dist/client/assets/useEmbedHeadline-DuUnwTB7.js +1 -0
- package/dist/client/assets/{usePierreRuntime-BfZHKAkI.js → usePierreRuntime-35AHf9RQ.js} +1 -1
- package/dist/client/assets/{wrench-DkxnZRlR.js → wrench-BfVeded5.js} +1 -1
- package/dist/client/assets/{x-DfRJbqrh.js → x-DgmmnPKt.js} +1 -1
- package/dist/client/assets/{xterm-CJw8Epxv.js → xterm-DnJJmrCA.js} +1 -1
- package/dist/client/assets/{zap-CIo8msJB.js → zap-Bcja1lHG.js} +1 -1
- package/dist/client/index.html +1 -1
- package/dist/main.mjs +5116 -9854
- package/dist/node/main.mjs +18 -2
- package/dist/pairing-runtime-controller.mjs +23 -2
- package/dist/runtime/broker-daemon.mjs +29 -3
- package/dist/scout-control-plane-web.mjs +27 -3
- package/package.json +2 -5
- package/dist/client/assets/ActivityScreen-y-5DLleY.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-BD7Unt2P.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-BbcZc9Xk.js +0 -1
- package/dist/client/assets/AgentFloorView-DMFiHs21.js +0 -1
- package/dist/client/assets/AgentInfoScreen-DHGLRddI.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-C5k_dDS8.js +0 -1
- package/dist/client/assets/AgentLanesView-u5vpLwQf.js +0 -2
- package/dist/client/assets/AgentMasterScreen-C5WlWNmk.js +0 -1
- package/dist/client/assets/AgentsConsole-BuiZ_bDo.js +0 -1
- package/dist/client/assets/AgentsScreen-CRi-hG2k.js +0 -1
- package/dist/client/assets/AgentsSubnav-DUsya4WK.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-C29smC5d.js +0 -1
- package/dist/client/assets/BrokerScreen-CS0s4Gm4.js +0 -5
- package/dist/client/assets/CodeScreen-CrR2JaVj.js +0 -1
- package/dist/client/assets/ConversationComposer-H8_hsYSc.js +0 -1
- package/dist/client/assets/ConversationFeedRows-hlEFlURs.js +0 -1
- package/dist/client/assets/ConversationHeader-B0ZBhE_E.js +0 -1
- package/dist/client/assets/ConversationScreen-CXAHQwQ3.js +0 -2
- package/dist/client/assets/CrewWorkspaces-Bz2Dcnt4.js +0 -1
- package/dist/client/assets/FlightObserveScreen-qyzHzxLa.js +0 -1
- package/dist/client/assets/HarnessesScreen-DbKkQM4o.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-DvbRRPQB.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-C3C8UjXv.js +0 -1
- package/dist/client/assets/MeshScreen-BJ-j9YXv.js +0 -1
- package/dist/client/assets/MessagesScreen-CyNIZ3-X.js +0 -1
- package/dist/client/assets/MissionControlView-Bj7cAbZd.js +0 -1
- package/dist/client/assets/MissionFocusOverlay-DvTw6ts5.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-B0QG7Gys.js +0 -1
- package/dist/client/assets/NewChatComposer-C_1op4dH.js +0 -19
- package/dist/client/assets/OpsAgentsView-DBYtmLnh.js +0 -1
- package/dist/client/assets/OpsScreen-CuYVgkC_.js +0 -1
- package/dist/client/assets/OpsSubnav-BEU4kKXm.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-BhXAZEkW.js +0 -1
- package/dist/client/assets/ProjectAgentProfileBar-uJw9Wdfk.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-CIMS4Dy_.js +0 -1
- package/dist/client/assets/ProjectsInbox-JgU0lrY8.js +0 -2
- package/dist/client/assets/ProjectsRail-p99BRBOa.js +0 -1
- package/dist/client/assets/ProjectsScreen-BB45DU53.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-BHDTJWOz.js +0 -1
- package/dist/client/assets/Provider-Bu-C8Hxc.js +0 -1
- package/dist/client/assets/RawSessionsTable-BtKdQPiv.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-KPHJgO1l.js +0 -1
- package/dist/client/assets/SessionRefScreen-C8BiRVPx.js +0 -1
- package/dist/client/assets/SessionsScreen-BNvjUflN.js +0 -1
- package/dist/client/assets/SettingsScreen-3JvX1WFL.js +0 -1
- package/dist/client/assets/Terminal-BlUQY9_Z.js +0 -1
- package/dist/client/assets/TerminalEmbedScreen-DTjxktyr.js +0 -1
- package/dist/client/assets/agent-specialization-BtxLN4UR.js +0 -1
- package/dist/client/assets/agents-project-model-UYiamtrU.js +0 -1
- package/dist/client/assets/content--T3p6akp.js +0 -1
- package/dist/client/assets/content-4nFMLuzF.js +0 -1
- package/dist/client/assets/content-BJ4nHvcu.js +0 -1
- package/dist/client/assets/content-BmGp9wNl.js +0 -1
- package/dist/client/assets/content-CBWhwaRo.js +0 -1
- package/dist/client/assets/content-CQlykFbe.js +0 -1
- package/dist/client/assets/content-CevL0DgF.js +0 -1
- package/dist/client/assets/content-Ch8pf2bj.js +0 -1
- package/dist/client/assets/content-Cpvdcm_l.js +0 -1
- package/dist/client/assets/content-DfS3vgAu.js +0 -1
- package/dist/client/assets/content-DpQdNePJ.js +0 -1
- package/dist/client/assets/content-Dqpibejl.js +0 -1
- package/dist/client/assets/content-TV0nd6-r.js +0 -1
- package/dist/client/assets/content-odbb5H4U.js +0 -1
- package/dist/client/assets/content-uXHLPHe0.js +0 -1
- package/dist/client/assets/conversation-model-QsJVfSeG.js +0 -1
- package/dist/client/assets/conversation-motion-features-BFLHX2eg.js +0 -1
- package/dist/client/assets/discover-B3uQlh5L.js +0 -2
- package/dist/client/assets/embed-entry-DkRcHKTh.js +0 -2
- package/dist/client/assets/home-now-card-UspVW2-2.js +0 -1
- package/dist/client/assets/index-C-v0Z6ZS.js +0 -1
- package/dist/client/assets/index-D9DzUORB.js +0 -1
- package/dist/client/assets/index-DfsTyYDx.js +0 -1
- package/dist/client/assets/left-B4Ak-Ibt.js +0 -2
- package/dist/client/assets/left-BMb493FZ.js +0 -1
- package/dist/client/assets/left-BjFLvVOC.js +0 -1
- package/dist/client/assets/left-CsXQ8Q3G.js +0 -1
- package/dist/client/assets/left-FNH7faCI.js +0 -1
- package/dist/client/assets/left-POkqE8gI.js +0 -2
- package/dist/client/assets/left-UulOTcWh.js +0 -1
- package/dist/client/assets/left-advisor-CJkQS2d6.js +0 -1
- package/dist/client/assets/left-agents-CFMxyEjT.js +0 -1
- package/dist/client/assets/left-default-rnX5HANc.js +0 -1
- package/dist/client/assets/left-lanes-BpLXT_qH.js +0 -1
- package/dist/client/assets/left-mission-B0bhseWw.js +0 -1
- package/dist/client/assets/library-D1iXfda2.js +0 -1
- package/dist/client/assets/mesh-buckets-6y3ZIibI.js +0 -1
- package/dist/client/assets/mesh-roster-Bc7T4b7z.js +0 -1
- package/dist/client/assets/model-IGCUEsMy.js +0 -1
- package/dist/client/assets/profile-B3qDSbrH.js +0 -1
- package/dist/client/assets/projects-inbox-CLek3QaG.js +0 -1
- package/dist/client/assets/projects-inbox-DRBl2N85.css +0 -1
- package/dist/client/assets/resolve-panes-DXw-cHaj.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-CDdbRDEa.js +0 -1
- package/dist/client/assets/right-BgJ4mQLf.js +0 -1
- package/dist/client/assets/right-Bk6h7o-Z.js +0 -1
- package/dist/client/assets/right-BrICCmEt.js +0 -1
- package/dist/client/assets/right-C1QIbqFZ.js +0 -1
- package/dist/client/assets/right-CfliKiHY.js +0 -1
- package/dist/client/assets/right-CtOLXB9s.js +0 -1
- package/dist/client/assets/right-DJ34yMAi.js +0 -1
- package/dist/client/assets/right-DiFmtw6d.js +0 -1
- package/dist/client/assets/right-Lx79pxpG.js +0 -1
- package/dist/client/assets/scoutbot-BJIamJOH.js +0 -3
- package/dist/client/assets/text-Faa3ZStB.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-Bpkc8ayb.js +0 -1
- /package/dist/client/assets/{text-BYAFNLNq.css → runtime-picker-BYAFNLNq.css} +0 -0
package/dist/client/assets/{AgentLanesPreflight-CFadSaia.js → AgentLanesPreflight-CCGBArIb.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as s}from"./index-
|
|
1
|
+
import{r as d,j as s}from"./index-C1VaWNuD.js";import{t as $}from"./time-Dhsh_2EG.js";const w=3,E=12;function z(e,n){return n===0&&(e.discovery==="loading"||e.recent==="loading")}function A(e){const n=e?.trim();return n?n.slice(0,13):null}function x(e){const n=e.lastEventAt;return typeof n=="number"&&Number.isFinite(n)&&n>0?n:e.mtimeMs}function D(e){return e.sessionId?.trim()||e.transcriptPath}function _(e){const n=e.max??E;if(e.discoveryPhase==="loading")return{cells:[],blindCells:Math.min(e.blindCells??w,n),identified:!1};const i=e.discovery?.transcripts??[],a=new Set,t=[];for(const l of i.filter(c=>{if(e.matchTranscript&&!e.matchTranscript(c))return!1;const r=e.now-x(c);return r>=0?r<=e.windowMs:!0}).sort((c,r)=>x(r)-x(c))){const c=D(l);if(!a.has(c)&&(a.add(c),t.push({key:c,source:l.source,sessionLabel:A(l.sessionId),project:l.project,cwd:l.cwd,lastActiveAt:x(l)}),t.length>=n))break}return{cells:t,blindCells:0,identified:!0}}function T(e){return e.sessionLabel?`${e.source}:${e.sessionLabel}`:e.source}const I=260,P=100;function B(e,n){const[i,a]=d.useState(e),[t,l]=d.useState(!1);return d.useEffect(()=>{if(e){a(!0),l(!1);return}if(!i)return;if(n<=0){a(!1),l(!1);return}l(!0);const c=setTimeout(()=>{a(!1),l(!1)},n);return()=>clearTimeout(c)},[e,n,i]),{visible:i,exiting:t}}function R(e,n){const i=d.useRef(Date.now()),[a,t]=d.useState({discoveryMs:null,recentMs:null,deckMs:null}),[l,c]=d.useState(0);return d.useEffect(()=>{t(r=>{const o=r.discoveryMs===null&&e.discovery!=="loading"?Date.now()-i.current:r.discoveryMs,m=r.recentMs===null&&e.recent!=="loading"?Date.now()-i.current:r.recentMs;return o===r.discoveryMs&&m===r.recentMs?r:{...r,discoveryMs:o,recentMs:m}})},[e.discovery,e.recent]),d.useEffect(()=>{n&&t(r=>r.deckMs===null?{...r,deckMs:Date.now()-i.current}:r)},[n]),d.useEffect(()=>{if(a.deckMs!==null)return;const r=()=>c(Date.now()-i.current);r();const o=setInterval(r,P);return()=>clearInterval(o)},[a.deckMs]),{...a,elapsedMs:l}}function N({seed:e,rows:n}){const i=d.useMemo(()=>{const a=[68,92,54,80,61,74];return Array.from({length:n},(t,l)=>a[(e+l)%a.length])},[n,e]);return s.jsx("div",{className:"s-lane-pre-bars","aria-hidden":"true",children:i.map((a,t)=>s.jsx("span",{className:"s-lane-pre-bar",style:{width:`${a}%`,animationDelay:`${e*110+t*90}ms`}},`${t}-${a}`))})}function S({cell:e,index:n,nowMs:i,style:a}){if(!e)return s.jsxs("div",{className:"s-lane-pre s-lane-pre--blind",style:a,"aria-hidden":"true",children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--dot"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--name"}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-ghost s-lane-pre-ghost--meta"})]}),s.jsx(N,{seed:n,rows:6})]});const t=[e.project,e.cwd].find(l=>!!l)??"—";return s.jsxs("div",{className:"s-lane-pre",style:a,children:[s.jsxs("div",{className:"s-lane-pre-head",children:[s.jsx("span",{className:"s-lane-pre-dot","aria-hidden":"true"}),s.jsx("span",{className:"s-lane-pre-title",children:T(e)}),s.jsx("span",{className:"s-lane-pre-where",title:e.cwd??t,children:t}),s.jsx("span",{className:"s-lane-pre-spacer"}),s.jsx("span",{className:"s-lane-pre-age",children:$(e.lastActiveAt,i)})]}),s.jsx(N,{seed:n,rows:5})]})}function F({discovery:e,discoveryPhase:n,windowMs:i,nowMs:a,layout:t,gridColumns:l,laneWidthPx:c,matchTranscript:r}){const o=t==="grid",m=d.useMemo(()=>_({discovery:e,discoveryPhase:n,windowMs:i,now:a,matchTranscript:r}),[e,n,r,a,i]),h=m.identified?m.cells:Array.from({length:m.blindCells},()=>null);if(t==="none"||h.length===0)return s.jsx("div",{className:"s-agent-lanes-preflight-empty","aria-hidden":"true"});const p=h.map((f,b)=>s.jsx(S,{cell:f,index:b,nowMs:a,style:o?void 0:{width:`${c}px`,flex:"none"}},f?.key??`blind-${b}`));return o?s.jsx("div",{className:"s-agent-lanes-grid s-agent-lanes-grid--preflight","data-grid-columns":l,"aria-label":"Lane deck loading",children:p}):s.jsx("div",{className:"s-agent-lanes-body",children:s.jsx("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main",children:s.jsx("div",{className:"s-agent-lanes-scroll","aria-label":"Lane deck loading",children:p})})})}function y(e){return e==="ready"?"OK":e==="error"?"WARN":"RUN"}function j(e){return`s-lane-boot-step s-lane-boot-step--${e}`}function u(e,n){return`${e.toLocaleString()} ${n}${e===1?"":"s"}`}function g(e){return e===null?"":`${Math.round(e)}ms`}function K({loadState:e,sourceCount:n,processCount:i,eventCount:a,laneCount:t,horizonLabel:l,handedOff:c,exiting:r}){const o=R(e,c),m=e.discovery!=="loading"&&e.recent!=="loading",h=e.discovery==="ready"?`${u(n,"session source")} indexed`:e.discovery==="error"?"session source scan unavailable":"scanning local transcripts and harness processes",p=e.recent==="ready"?`${u(a,"recent event")} merged`:e.recent==="error"?"history replay unavailable; live signals remain enabled":`reading turns and tool output for the ${l} view`,f=t>0?`${u(t,"lane")} composed`:e.recent==="error"?`${u(a,"live signal")} in, no history`:a>0?`${u(a,"signal")} in, waiting on replay`:"waiting on first signals",b=e.discovery==="ready"?"done":e.discovery==="error"?"warn":"running",v=e.recent==="ready"?"done":e.recent==="error"?"warn":e.discovery==="loading"?"pending":"running",L=c?"done":e.recent==="loading"?"pending":"running",M=o.deckMs!==null?g(o.deckMs):o.elapsedMs<1e3?g(o.elapsedMs):`${(o.elapsedMs/1e3).toFixed(1)}s`,k=t>0;return s.jsxs("div",{className:["s-lane-boot",k?"s-lane-boot--bare":null,r?"s-lane-boot--exiting":null].filter(Boolean).join(" "),role:"status","aria-live":"polite","aria-busy":!m,children:[s.jsx("div",{className:"s-lane-boot-veil","aria-hidden":"true"}),s.jsxs("div",{className:"s-lane-boot-sheet",children:[s.jsxs("div",{className:"s-lane-boot-head",children:[s.jsx("span",{className:`s-lane-boot-dot${m?" s-lane-boot-dot--done":""}`,"aria-hidden":"true"}),s.jsx("span",{className:"s-lane-boot-lead",children:"Starting agent tail"}),s.jsxs("span",{className:"s-lane-boot-count",children:[n.toLocaleString()," sources"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[i.toLocaleString()," live"]}),s.jsxs("span",{className:"s-lane-boot-count",children:[a.toLocaleString()," events"]}),t>0?s.jsxs("span",{className:"s-lane-boot-count",children:[t.toLocaleString()," lanes"]}):null,s.jsx("span",{className:"s-lane-boot-spacer"}),s.jsxs("span",{className:"s-lane-boot-meta",children:["lookback ",l]}),s.jsx("span",{className:"s-lane-boot-elapsed","aria-hidden":"true",children:M})]}),s.jsxs("div",{className:"s-lane-boot-log",children:[s.jsxs("div",{className:j(b),children:[s.jsx("span",{className:"s-lane-boot-state",children:y(e.discovery)}),s.jsx("strong",{className:"s-lane-boot-name",children:"discover sessions"}),s.jsx("code",{className:"s-lane-boot-detail",children:h}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.discoveryMs)})]}),s.jsxs("div",{className:j(v),children:[s.jsx("span",{className:"s-lane-boot-state",children:y(e.recent)}),s.jsx("strong",{className:"s-lane-boot-name",children:"replay recent tail"}),s.jsx("code",{className:"s-lane-boot-detail",children:p}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.recentMs)})]}),s.jsxs("div",{className:j(L),children:[s.jsx("span",{className:"s-lane-boot-state",children:c?"OK":"LIVE"}),s.jsx("strong",{className:"s-lane-boot-name",children:"assemble lanes"}),s.jsx("code",{className:"s-lane-boot-detail",children:f}),s.jsx("span",{className:"s-lane-boot-timing",children:g(o.deckMs)})]})]})]})]})}const G=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesLoadingSheet:K,AgentLanesPreflightDeck:F,LANE_BOOT_EXIT_MS:I,useLaneBootVisibility:B},Symbol.toStringTag,{value:"Module"}));export{F as A,I as L,K as a,G as b,z as s,B as u};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r as a,j as o}from"./index-C1VaWNuD.js";/* empty css */import{a as rn}from"./api-Co9aQ2Jw.js";import{u as Fn}from"./tail-events-LK29oCKm.js";import{i as _e,o as on}from"./surface-activity-B1rgWB1i.js";import{u as Wn}from"./observe-BLmy4quB.js";import{f as Hn}from"./terminal-sessions-Bdt2W3Y4.js";import{n as ln}from"./colors-BtO5_zlx.js";import{S as Bn}from"./Provider-D0bB7q6y.js";import{d as Vn}from"./types-B0PlfpKc.js";import{u as Gn}from"./useEmbedHeadline-DuUnwTB7.js";import{A as Kn}from"./AgentAvatar-Dz79iTxB.js";import{h as Un,S as qn}from"./SessionObserve-BVeTkcIl.js";import{W as Yn,X as cn,Y as Zn,Z as Xn,_ as Jn,$ as Xe,a0 as Qn,a1 as et,a2 as nt,a3 as tt,a4 as st,a5 as Ce,a6 as at,a7 as rt,a8 as ot,a9 as dn,aa as it,ab as lt,i as un,j as fn}from"./router-kfcaYqZr.js";import{AgentFloorView as ct}from"./AgentFloorView-DuyvyMMj.js";import{u as dt,s as ut,A as ft,a as mt,L as ht}from"./AgentLanesPreflight-CCGBArIb.js";import{AgentLaneChrome as gt}from"./AgentLaneChrome-Dv2lBFoH.js";import{AgentLaneCard as pt}from"./AgentLaneCard-Cc9uyfBr.js";import{a as Lt}from"./agent-lane-card-model-CY3OE1Xu.js";import{c as yt}from"./agent-lane-detail-ppJId6Jc.js";import{i as bt,A as vt}from"./AgentLaneDetailSheet-CGqtqSHQ.js";import{LaneTraceDetailSheet as St}from"./LaneTraceDetailSheet-DNIECgEl.js";import{readStoredLaneSummaryHeight as kt,useLaneSummaryResize as xt,AgentLaneSummaryResizeHandle as Et}from"./AgentLaneSummaryResize-Di4u6df2.js";import{A as ge,l as Z,j as Nt,k as mn,m as wt,e as Rt,g as jt,n as Ct,r as It,d as hn,D as At,h as Tt,i as _t}from"./agent-lanes-model-tc-1hE6q.js";import{i as Pt,c as Dt,n as Je}from"./keyboard-nav-B8sQ_8IF.js";import{p as Qe}from"./lane-roster-store-DN2jxXF-.js";function Pe(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Mt(e){const n=new Set,t=[];for(const s of e){const i=Pe(s);n.has(i)||(n.add(i),t.push(s))}return t}function zt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Ot(e,n,t){const s=Pe(n);for(const l of e)if(Pe(l)===s)return e;const i=[...e,n];return i.length>t?i.slice(i.length-t):i}function $t(e,n,t){return zt(Mt([...n,...e]),t)}const Ft=500;function Ie(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):null}function Wt(e){return JSON.stringify([Ie(e.recentLimit),e.includeTranscriptReplay,Ie(e.recentWindowMs),e.discoveryScope??null,Ie(e.discoveryLimit)])}function Ht(e,n){return e==="error"||n==="error"}function Bt(e,n){return n?Math.min(e,Ft):e}async function Vt(e){const n=await e.load(!1);if(e.publish(n,"live"),e.markReady(),!e.includeTranscriptReplay)return{replay:"not-requested"};try{return e.publish(await e.load(!0),"replay"),{replay:"loaded"}}catch{return{replay:"failed"}}}function Gt(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const Kt=500,Ut=6e4;function qt(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function Yt(e,n,t){const s=new URLSearchParams({limit:String(e)});return n&&s.set("transcripts","true"),typeof t=="number"&&Number.isFinite(t)&&t>0&&s.set("windowMs",String(Math.floor(t))),(await rn(`/api/tail/recent?${s.toString()}`)).events??[]}function Zt(e,n){const t=new URLSearchParams;e&&t.set("scope",e),typeof n=="number"&&Number.isFinite(n)&&n>0&&t.set("limit",String(Math.floor(n)));const s=t.toString();return s?`/api/tail/discover?${s}`:"/api/tail/discover"}function Xt(e){const n=e?.recentLimit??Kt,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Ut,i=e?.includeTranscriptReplay??!1,l=e?.discoveryScope,f=e?.discoveryLimit,y=e?.recentWindowMs,u=e?.pauseWhenHidden??!1,d=Wt({recentLimit:n,includeTranscriptReplay:i,recentWindowMs:y,discoveryScope:l,discoveryLimit:f}),[m,c]=a.useState(null),[p,L]=a.useState([]),[R,b]=a.useState({discovery:"loading",recent:"loading",discoveryLoaded:!1,recentLoaded:!1}),I=a.useRef("loading"),h=a.useRef("idle"),A=a.useRef(null),x=a.useRef(null),j=a.useRef(0);Fn(S=>{L(k=>Ot(k,S,n))},t);const v=a.useCallback((S=!1)=>{if(!t||u&&!S&&!_e())return Promise.resolve();S&&(I.current="loading",b(w=>({...w,recent:"loading"})));const k=d,T=x.current;if(T?.key===k)return T.promise;const M=++j.current;h.current=i?"loading":"ready";let z;return z=Vt({includeTranscriptReplay:i,load:w=>Yt(w?n:Bt(n,i),w,y),publish:(w,F)=>{if(M!==j.current)return;const B=()=>{L(W=>$t(W,w,n))};F==="replay"?a.startTransition(B):B()},markReady:()=>{M===j.current&&(I.current="ready",b(w=>({...w,recent:"ready",recentLoaded:!0})))}}).then(w=>{M===j.current&&(i&&(h.current=w.replay==="failed"?"error":"ready"),w.replay!=="failed"&&(A.current=d))}).catch(()=>{M===j.current&&(I.current="error",i&&(h.current="error"),b(w=>({...w,recent:"error"})))}).finally(()=>{x.current?.promise===z&&(x.current=null)}),x.current={key:k,promise:z},z},[t,d,i,u,n,y]),D=a.useCallback(async(S=!1)=>{if(t&&!(u&&!S&&!_e())){S&&b(k=>({...k,discovery:"loading"}));try{const k=await rn(Zt(l,f));c(k),b(T=>({...T,discovery:"ready",discoveryLoaded:!0})),Ht(I.current,h.current)&&v()}catch{c(k=>k??qt()),b(k=>({...k,discovery:"error"}))}}},[f,l,t,u,v]),C=a.useCallback(async()=>{await Promise.all([D(!0),v(!0)])},[D,v]);return a.useEffect(()=>{if(!t)return;let S=!1,k=!0;const T=()=>{S||D(k),k=!1};T();const M=setInterval(T,s),z=u?on(T):null;return()=>{S=!0,clearInterval(M),z?.()}},[s,t,u,D]),a.useEffect(()=>{t||(j.current+=1,x.current=null,A.current=null,h.current="idle")},[t]),a.useEffect(()=>{t&&A.current!==d&&v(!0)},[t,d,v]),{discovery:m,events:p,loadState:R,refreshDiscovery:D,retryInitialLoad:C}}function Jt({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s,onTogglePin:i}){const[l,f]=a.useState(-1),y=a.useRef(new Map);a.useEffect(()=>{if(l<0)return;if(l>=e.length){f(e.length-1);return}const m=e[l];if(!m)return;const c=y.current.get(m.id);c?.scrollIntoView({block:"nearest",inline:"nearest"}),c?.focus()},[l,e]),a.useEffect(()=>{n||l>=e.length&&f(e.length>0?e.length-1:-1)},[l,n,e.length]);const u=a.useCallback((m,c)=>{c?y.current.set(m,c):y.current.delete(m)},[]);a.useEffect(()=>{const m=c=>{if(!document.querySelector(".s-agent-lanes")||Pt(c.target)||Dt()||n||e.length===0)return;const p=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&p>=0&&p<ge.length){c.preventDefault(),s(ge[p].key);return}if(c.key==="ArrowDown"||c.key==="j"){c.preventDefault(),f(L=>Je(L,e.length,1));return}if(c.key==="ArrowUp"||c.key==="k"){c.preventDefault(),f(L=>Je(L,e.length,-1));return}if(c.key==="Home"||c.key==="g"&&!c.shiftKey){c.preventDefault(),f(0);return}if(c.key==="End"||c.key==="G"){c.preventDefault(),f(e.length-1);return}if(c.key==="Enter"||c.key==="i"){const L=l<0?0:l,R=e[L];if(!R)return;c.preventDefault(),f(L),t(R);return}if(c.key.toLowerCase()==="p"&&i){const L=l<0?0:l,R=e[L];if(!R)return;c.preventDefault(),f(L),i(R)}};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l,n,e,s,t,i]);const d=a.useCallback((m,c)=>({"data-cursor":l===m?!0:void 0,tabIndex:l===m?0:-1,ref:p=>u(c,p),onFocus:()=>f(m)}),[l,u]);return{focusedIndex:l,getLaneFocusProps:d}}function Qt(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function he(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function gn(e,n){if(!n)return!0;const t=he(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=Qt(i);return l===n||he(i)===t||!!(f&&(f.toLowerCase()===n||he(f)===t))})}function es(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return gn([s.harness,s.definitionId,i?.attribution,l],t)}function ns(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return gn([s.project,s.projectRoot,s.cwd,i?.cwd,Z(s,l)],t)}function ts(e){return ln(e.agent.state??null,e.agent)==="needs_attention"?!0:Un(e.observe?.events??[])}function en(e,n,t,s){return cn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function ss(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>es(t,e.harness));case"project":return n.filter(t=>ns(t,e.projectPath));case"attention":return n.filter(t=>ts(t));default:return[]}}function nn(e,n,t){n.has(t.lane.id)||(n.add(t.lane.id),e.push({key:t.slot?`${t.slot.id}:${t.lane.id}`:t.lane.id,lane:t.lane,widthPx:t.widthPx,zone:t.zone,position:t.position,slotId:t.slot?.id,laneDefId:t.laneDef?.id,isPinned:t.zone!=="main"}))}function Ae(e){return[...e].sort((n,t)=>{const s=Zn(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function as(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,l=[],f=[],y=[],u=new Map(t.laneDefs.map(p=>[p.id,p]));for(const p of Yn(t.slots)){const L=u.get(p.laneDefId);if(!L)continue;const R=ss(L,n),b=p.zone==="pinned_left"?l:p.zone==="pinned_right"?y:f;for(const I of R)nn(b,i,{lane:I,zone:p.zone,position:p.position,widthPx:en(t,I,p,s),slot:p,laneDef:L})}if(t.showAutoLanes){let p=0;for(const L of n)i.has(L.id)||(nn(f,i,{lane:L,zone:"main",position:p,widthPx:en(t,L,void 0,s)}),p+=1)}const d=Ae(l),m=Ae(f),c=Ae(y);return{pinnedLeft:d,main:m,pinnedRight:c,flat:[...d,...m,...c]}}function rs(e){return e.slots.some(n=>n.laneDefId===Jn)}function me(e,n){const t=`harness:${he(n)}`;return e.slots.some(s=>s.laneDefId===t)}function os(e,n){const t=Xn(n);return e.slots.some(s=>s.laneDefId===t)}function is(e,n,t){const[s,i]=a.useState(()=>Xe(e,n));a.useEffect(()=>{i(Xe(e,n))},[n,e]);const l=a.useCallback(h=>{Qn(h),i(h)},[]),f=a.useMemo(()=>as({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),y=a.useCallback((h,A="pinned_left")=>{l(et(s,{laneId:h.id,title:Z(h.agent,h.source),zone:A,width:s.laneWidths[h.id]}))},[s,l]),u=a.useCallback(h=>{l(nt(s,h))},[s,l]),d=a.useCallback((h,A)=>{l(tt(s,h,A))},[s,l]),m=a.useCallback(h=>{l(st(s,h))},[s,l]),c=a.useCallback((h,A)=>{l(Ce(s,{kind:"harness",title:A??`${h} sessions`,harness:h,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,l]),p=a.useCallback((h,A)=>{const x=h.trim();if(!x)return;const j=A?.trim()||x.split(/[\\/]/u).filter(Boolean).pop()||x;l(Ce(s,{kind:"project",title:j,projectPath:x,zone:"main",width:s.defaultLaneWidth}))},[s,l]),L=a.useCallback(()=>{l(Ce(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,l]),R=a.useCallback(()=>{l(at(s))},[s,l]),b=a.useCallback(h=>rt(s,h),[s]),I=a.useCallback(h=>ot(s,h),[s]);return{deck:s,layout:f,pinLane:y,unpinLane:u,setLaneWidth:d,setDefaultLaneWidth:m,addHarnessLane:c,addAttentionLane:L,addProjectLane:p,clearPins:R,isPinned:b,pinnedZone:I}}function ls(e){const[n,t]=a.useState(null),s=a.useRef({laneId:"",x:0,width:512}),i=a.useRef(512),l=a.useCallback((u,d,m)=>{d.preventDefault(),d.stopPropagation(),d.currentTarget.setPointerCapture(d.pointerId),s.current={laneId:u,x:d.clientX,width:m},i.current=m,t(u),document.body.classList.add("s-agent-lanes--resizing-width")},[]),f=a.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const d=dn(i.current);e(s.current.laneId,d.tier??d.px)}return null})},[e]);a.useEffect(()=>{if(!n)return;const u=m=>{const c=m.clientX-s.current.x;i.current=Math.min(it,Math.max(lt,s.current.width+c));const p=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);p&&p.style.setProperty("--lane-width",`${i.current}px`)},d=()=>f();return window.addEventListener("pointermove",u),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d)}},[f,n]);const y=a.useCallback((u,d)=>{e(u,d),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:l,resetLaneWidth:y,resizingLaneId:n}}const tn=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],cs=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function ds(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function us(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function fs(e){return e?tn.filter(n=>n.key!=="floor"):tn}const pn="openscout:agent-lanes-horizon",Ln="openscout:agent-lanes-layout",yn="openscout:agent-lanes-grid-columns",bn="openscout:agent-lanes-technical-rollup",ms=`${bn}:lane:`,hs="openscout:agent-lanes-scroll",gs=96,ps=160,Ls=6e4,ys=6e4,bs=3e4,vs=3e4,Ss=3e4,ks=12e4,xs=["pinned-left","main","pinned-right"];function sn(){return!_e()}function vn(e,n){return`${hs}:${e}:${n}`}function Es(e,n){try{const t=sessionStorage.getItem(vn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function Ns(e,n,t){try{sessionStorage.setItem(vn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function ws(){try{const e=sessionStorage.getItem(pn);if(e&&ge.some(n=>n.key===e))return e}catch{}return At}function Rs(e){try{const n=sessionStorage.getItem(Ln);return ds(n,e)}catch{}return"lanes"}function js(){try{return us(sessionStorage.getItem(yn))}catch{return"auto"}}function Cs(){try{const e=sessionStorage.getItem(bn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function Sn(e){return`${ms}${encodeURIComponent(e)}`}function an(e){try{const n=sessionStorage.getItem(Sn(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return Cs()??!1}function Is(e,n){try{sessionStorage.setItem(Sn(e),n?"1":"0")}catch{}}function As(e,n){const t=a.useRef(new Map),s=a.useRef({}),i=a.useCallback((u,d=t.current.get(u))=>{if(!d)return;const m=s.current[u]??Es(e,u);if(m<=0)return;const c=Math.max(0,d.scrollWidth-d.clientWidth),p=Math.min(m,c);Math.abs(d.scrollLeft-p)>1&&(d.scrollLeft=p)},[e]),l=a.useCallback(()=>{for(const u of xs)i(u)},[i]);a.useLayoutEffect(()=>{l();const u=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(u)},[e,l,n]);const f=a.useCallback((u,d)=>{if(!d){t.current.delete(u);return}t.current.set(u,d),i(u,d)},[i]);return{handleLaneScroll:a.useCallback((u,d)=>{const m=d.currentTarget.scrollLeft;s.current[u]=m,Ns(e,u,m)},[e]),setLaneScrollNode:f}}function Ts({issue:e}){const n=e.agentNames?.length?e.agentNames.join(", "):e.agentIds?.join(", "),t=e.transcriptPaths?.join(" · "),s=[n,t].filter(Boolean).join(" · ");return o.jsxs("li",{className:"s-agent-lanes-issues-item",children:[o.jsx("span",{className:"s-agent-lanes-issues-kind",children:e.kind.replaceAll("_"," ")}),o.jsx("span",{className:"s-agent-lanes-issues-message",children:e.message}),s?o.jsx("span",{className:"s-agent-lanes-issues-detail",children:s}):null]})}function _s({loadState:e,onRetry:n}){const t=[e.discovery==="error"?"session discovery":"",e.recent==="error"?"recent history":""].filter(Boolean).join(" and "),s=e.recent==="error"?"Recent activity could not be loaded":"Session discovery could not be completed";return o.jsx("div",{className:"s-agent-lanes-empty s-agent-lanes-empty--degraded",role:"alert",children:o.jsxs("div",{className:"s-agent-lanes-empty-card",children:[o.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[o.jsx("span",{className:"s-agent-lanes-empty-kicker",children:"Tail incomplete"}),o.jsx("h2",{children:s}),o.jsxs("p",{children:["Scout could not finish ",t||"the tail scan",", so this is not being treated as a quiet interval."]}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:"Live events can still arrive while Scout retries."})]}),o.jsx("div",{className:"s-agent-lanes-empty-actions",children:o.jsx("button",{type:"button",onClick:n,children:"Retry tail scan"})})]})})}function Ps({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:l,onAddCodexLane:f,sourceCount:y,eventCount:u,degraded:d=!1,onRetry:m}){const c=!!e,p=c?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",L=c?`${e} has no activity in the last ${t}.`:s?`Scout checked ${y.toLocaleString()} session source${y===1?"":"s"} and ${u.toLocaleString()} recent tail event${u===1?"":"s"}; nothing is active in this interval.`:"Automatic lanes are off, and this deck has no pinned sessions.",R=d?"The last tail refresh failed, so this reading is from the previous scan and may be behind.":s?"Scout will keep listening. New turns and tool output will appear here automatically.":"Pin a session lane or turn automatic lanes back on to populate the deck.",b=n==="5m"?"30m":n==="24h"?null:"24h";return o.jsx("div",{className:"s-agent-lanes-empty",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"s-agent-lanes-empty-card",children:[o.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[o.jsx("span",{className:"s-agent-lanes-empty-kicker",children:d?"Tail refresh behind":c?"Filter checked":s?"Tail scanned":"Lane deck ready"}),o.jsx("h2",{children:p}),o.jsx("p",{children:L}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:R})]}),o.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[d&&m?o.jsx("button",{type:"button",onClick:m,children:"Retry tail scan"}):null,b?o.jsxs("button",{type:"button",onClick:()=>i(b),children:["Look back ",mn(b)]}):null,o.jsx("button",{type:"button",onClick:l,children:"Show attention"}),o.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function Ds({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:l,isNew:f,nowMs:y,traceWindowMs:u,traceWindowLabel:d,summaryHeight:m,onSummaryResizeStart:c,onSummaryResizeReset:p,summaryResizing:L,onInspect:R,onTraceEventSelect:b,onTogglePin:I,onWidthChange:h,onWidthResizeStart:A,widthResizing:x,focusProps:j,operatorName:v,grid:D=!1}){const{agent:C,observe:S,source:k}=e,T=_t(S),M=!!S,z=T?" s-agent-lane--live":"",w=f?" s-agent-lane--new":"",[F,B]=a.useState(!0),[W,V]=a.useState(()=>an(e.id)),G=a.useRef(e.id);a.useEffect(()=>{if(G.current!==e.id){G.current=e.id,V(an(e.id));return}Is(e.id,W)},[W,e.id]);const O=j?.ref,U=j?{"data-cursor":j["data-cursor"],tabIndex:j.tabIndex,onFocus:j.onFocus}:void 0,K=()=>o.jsx("section",{className:"s-agent-lane-trace","aria-label":`${Z(C,k)} trace`,children:o.jsx("div",{className:"s-agent-lane-body",children:M?o.jsx(qn,{data:S??void 0,agentId:e.source==="scout"?C.id:void 0,sessionId:C.harnessSessionId,showRail:!1,variant:"lane",nowMs:y,traceWindowMs:u,traceWindowLabel:d,laneCollapseTechnicalEvents:W,onLaneCollapseTechnicalEventsChange:V,laneOperatorName:v,onLaneEventSelect:X=>b(e,X)}):o.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})}),te=a.useMemo(()=>Lt(e,{isLive:T,nowMs:y}),[e,T,y]),se=a.useMemo(K,[M,S,e.source,C.id,C.harnessSessionId,y,u,d,W,v,b,e]);return o.jsxs("article",{ref:O,"data-lane-id":e.id,className:`s-agent-lane${D?" s-agent-lane--grid":""}${z}${w}${s?" s-agent-lane--pinned":""}${j?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:D?void 0:{"--lane-width":`${n}px`},...U,children:[o.jsx(gt,{title:t,width:i,defaultWidth:l,pinned:s,onTogglePin:I,onWidthChange:h,onResizeStart:A,resizing:x,statusLabel:hn(C,k),live:T,widthControls:!D}),o.jsx(pt,{model:te,avatar:o.jsx(Kn,{agent:C,placement:"row",size:44,presence:!1,tile:!1}),collapsed:F,cockpitHeight:F?void 0:m,onToggleCollapsed:()=>B(X=>!X),onOpen:()=>R(e)}),!F&&o.jsx(Et,{onResizeStart:c,onReset:p,active:L}),se]})}function Ms({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:l,harnessFilter:f,projectFilter:y}){Gn("Lanes",s);const u=a.useContext(Bn),d=t?.agents??n??u?.agents??[],m=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,c=l??un(),p=i??fn(),[L,R]=a.useState(Date.now()),[b,I]=a.useState(ws),[h,A]=a.useState(()=>Rs(s)),[x,j]=a.useState(js),v=!s&&h==="floor",D=h==="grid",C=v?"4h":b,[S,k]=a.useState(kt),[T,M]=a.useState([]),{beginResize:z,resetSummaryHeight:w,resizing:F}=xt(k),B=a.useCallback(r=>z(r,S),[z,S]),W=Tt(),V=Nt(C),G=Xt({enabled:!t,includeTranscriptReplay:!0,discoveryIntervalMs:s?Ls:ys,recentLimit:W,recentWindowMs:V,discoveryLimit:s?gs:ps,pauseWhenHidden:!0}),O=t?.discovery??G.discovery,U=t?.tailEvents??G.events,K=t?.loadState??G.loadState,te=t?.retryInitialLoad??G.retryInitialLoad,se=t?.terminalSessions??T,X={view:"ops",mode:"lanes"},J=mn(C),De=s?bs:1e4,Me=s?vs:1e4;a.useEffect(()=>{const r=setInterval(()=>{sn()||R(Date.now())},De);return()=>clearInterval(r)},[De]),a.useEffect(()=>{if(t)return;let r=!1;const g=async()=>{if(!sn())try{const Re=await Hn({includeDiscovered:!1});r||M(Re)}catch{r||M([])}};g();const N=setInterval(()=>{g()},Me),P=on(()=>{g()});return()=>{r=!0,clearInterval(N),P()}},[t,Me]),a.useEffect(()=>{try{sessionStorage.setItem(pn,b)}catch{}},[b]),a.useEffect(()=>{try{sessionStorage.setItem(Ln,h)}catch{}},[h]),a.useEffect(()=>{try{sessionStorage.setItem(yn,x)}catch{}},[x]);const kn=a.useRef(wt()),ze=a.useRef(""),[ae,Oe]=a.useState(()=>new Set),[ye,$e]=a.useState(null),xn=a.useMemo(()=>d.filter(r=>Rt(r,L,C)),[d,L,C]),En=Wn(xn,{enabled:!t,activeIntervalMs:s?Ss:void 0,idleIntervalMs:s?ks:void 0,pauseWhenHidden:!0}),Fe=t?.observeCache??En,We=Gt(K),He=We==="blank",Nn=We==="degraded",Be=O?.totals.transcripts??O?.transcripts?.length??0;a.useEffect(()=>{if(ae.size===0)return;const r=setTimeout(()=>Oe(new Set),900);return()=>clearTimeout(r)},[ae]);const{lanes:re,issues:$,freshLaneIds:be}=a.useMemo(()=>{const r=jt({transcripts:O?.transcripts??[],tailEvents:U,processes:O?.processes??[],scoutAgents:d,terminalSessions:se,observeCache:Fe,now:L,workingOnly:!0,horizon:C}),g=Ct(r.lanes,kn.current),N=[...It(O),...r.issues];return{lanes:g.lanes,issues:N,freshLaneIds:g.newLaneIds}},[O,U,d,se,Fe,L,C]);a.useEffect(()=>{const r=$.map(g=>`${g.id}\0${g.message}`).join(`
|
|
2
|
+
`);r!==ze.current&&(ze.current=r,$.length!==0&&console.warn(`[agent-lanes] ${$.length} roster issue${$.length===1?"":"s"}`,$))},[$]),a.useEffect(()=>{be.length!==0&&Oe(r=>{const g=new Set(r);for(const N of be)g.add(N);return g})},[be.join("\0")]);const Q=a.useMemo(()=>re.find(r=>r.id===ye)??null,[ye,re]),ve=a.useMemo(()=>re.filter(r=>Os(r,{harnessFilter:f,projectFilter:y})),[re,f,y]),wn=a.useCallback(r=>$s(r,{harnessFilter:f,projectFilter:y}),[f,y]),{deck:_,layout:E,pinLane:oe,unpinLane:ie,setLaneWidth:Se,addHarnessLane:ee,addAttentionLane:Ve,addProjectLane:Rn,clearPins:jn,isPinned:le}=is(c,p,ve),{beginResize:Ge,resizingLaneId:Ke}=ls(Se),ke=a.useMemo(()=>Fs({harnessFilter:f,projectFilter:y}),[f,y]),xe=a.useMemo(()=>Q?yt(Q):null,[Q]),Cn=a.useMemo(()=>xe?os(_,xe):!1,[_,xe]),In=a.useMemo(()=>[E.pinnedLeft,E.main,E.pinnedRight].map(r=>r.map(g=>`${g.key}:${g.widthPx}`).join(",")).join("/"),[E.main,E.pinnedLeft,E.pinnedRight]),{handleLaneScroll:q,setLaneScrollNode:Y}=As(c,In),An=a.useCallback(r=>{Y("pinned-left",r)},[Y]),Tn=a.useCallback(r=>{Y("main",r)},[Y]),_n=a.useCallback(r=>{Y("pinned-right",r)},[Y]),Pn=a.useCallback(r=>{q("pinned-left",r)},[q]),Dn=a.useCallback(r=>{q("main",r)},[q]),Mn=a.useCallback(r=>{q("pinned-right",r)},[q]),ne=E.flat,Ee=E.pinnedLeft.length+E.pinnedRight.length,ce=v?ve.length:ne.length,de=dt(ut(K,ce),He?0:ht);a.useEffect(()=>{if(v)return;const r=ne.map(g=>{const{lane:N}=g;return{id:N.id,label:Z(N.agent,N.source),statusLabel:hn(N.agent,N.source),tone:ln(N.agent.state,N.agent),agentId:bt(N.agent)?void 0:N.agent.id,updatedAt:N.lastActiveAt>0?N.lastActiveAt:void 0}});Qe(r)},[ne,v]),a.useEffect(()=>()=>Qe(null),[]);const[Ue,Ne]=a.useState(null),we=a.useCallback(r=>{$e(r.id)},[]),qe=a.useCallback((r,g)=>{Ne({lane:r,event:g})},[]),zn=a.useCallback(r=>{const g=r.observe?.events.at(-1);g&&Ne({lane:r,event:g})},[]),On=a.useCallback(r=>{le(r.id)?ie(r.id):oe(r)},[le,oe,ie]),{getLaneFocusProps:Ye}=Jt({lanes:ne.map(r=>r.lane),inspectedLaneId:ye,onInspect:we,onHorizonChange:I,onTogglePin:On}),[ue,H]=a.useState(!1),Ze=a.useRef(null);a.useEffect(()=>{if(!ue)return;const r=g=>{Ze.current?.contains(g.target)||H(!1)};return window.addEventListener("pointerdown",r),()=>window.removeEventListener("pointerdown",r)},[ue]);const fe=a.useCallback((r,g,N=!1)=>{const{lane:P}=r,Re=Z(P.agent,P.source),$n=_.laneWidths[P.id]??dn(r.widthPx).tier??r.widthPx;return o.jsx(Ds,{lane:P,widthPx:r.widthPx,laneTitle:Re,pinned:r.isPinned,laneWidth:$n,defaultWidth:_.defaultLaneWidth,isNew:ae.has(P.id),nowMs:L,traceWindowMs:V,traceWindowLabel:J,summaryHeight:S,onSummaryResizeStart:B,onSummaryResizeReset:w,summaryResizing:F,onInspect:we,onTraceEventSelect:qe,onTogglePin:()=>{le(P.id)?ie(P.id):oe(P)},onWidthChange:je=>Se(P.id,je),onWidthResizeStart:je=>Ge(P.id,je,r.widthPx),widthResizing:Ke===P.id,focusProps:Ye(g,P.id),operatorName:m,grid:N},r.key)},[Ge,_.defaultLaneWidth,_.laneWidths,Ye,B,J,we,qe,le,m,ae,L,oe,w,Ke,Se,S,F,V,ie]);return o.jsxs("div",{className:`s-agent-lanes${s?" s-agent-lanes--embedded s-agent-lanes--low-motion":""}`,"data-lane-profile":c,"data-lane-layout":v?"floor":h,"data-lanes-deck-version":"1",children:[o.jsxs("div",{className:"s-agent-lanes-bar",children:[o.jsxs("div",{className:"s-agent-lanes-bar-leading",children:[o.jsx("div",{className:"s-agent-lanes-title",children:"Agent Lanes"}),o.jsxs("div",{className:"s-agent-lanes-meta","aria-label":"Lane deck status",children:[o.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[ce," live"]}),!v&&Ee>0?o.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[Ee," pinned"]}):null,o.jsx("span",{className:"s-agent-lanes-meta-stat",children:v?"past 30m · lanes 4h":`trace ${J}`}),ke?o.jsx("span",{className:"s-agent-lanes-meta-filter",children:ke}):null,o.jsxs("span",{className:"s-agent-lanes-meta-detail",children:["deck v1 · ",c]})]})]}),o.jsxs("div",{className:"s-agent-lanes-bar-controls",children:[o.jsx("div",{className:"s-agent-lanes-layouts",role:"group","aria-label":"Lane layout",children:fs(s).map(r=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${h===r.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":h===r.key,onClick:()=>A(r.key),children:r.label},r.key))}),D?o.jsx("div",{className:"s-agent-lanes-grid-density",role:"group","aria-label":"Grid columns",children:cs.map(r=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${x===r.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":x===r.key,title:r.key==="auto"?"Fit columns to the available width":`${r.key} columns`,onClick:()=>j(r.key),children:r.label},r.key))}):null,o.jsxs("div",{className:"s-agent-lanes-deck-menu",ref:Ze,hidden:v,children:[o.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":ue,onClick:()=>H(r=>!r),children:"+ Lane"}),ue?o.jsxs("div",{className:"s-agent-lanes-deck-popover",role:"menu",children:[o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{Ve(),H(!1)},disabled:rs(_),children:"Needs attention"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ee("codex","Codex sessions"),H(!1)},disabled:me(_,"codex"),children:"Codex sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ee("claude","Claude sessions"),H(!1)},disabled:me(_,"claude"),children:"Claude sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ee("grok","Grok sessions"),H(!1)},disabled:me(_,"grok"),children:"Grok sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ee("kimi","Kimi sessions"),H(!1)},disabled:me(_,"kimi"),children:"Kimi sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item s-agent-lanes-deck-item--danger",onClick:()=>{jn(),H(!1)},disabled:Ee===0,children:"Clear pinned lanes"})]}):null]}),v?null:o.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":"Activity window",children:ge.map((r,g)=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${b===r.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":b===r.key,title:`${r.label} window (${g+1})`,onClick:()=>I(r.key),children:r.label},r.key))})]})]}),t==null&&$.length>0?o.jsxs("div",{className:"s-agent-lanes-issues",role:"status","aria-live":"polite",children:[o.jsxs("div",{className:"s-agent-lanes-issues-head",children:[o.jsx("span",{className:"s-agent-lanes-issues-badge",children:"Roster issues"}),o.jsxs("span",{className:"s-agent-lanes-issues-meta",children:[$.length," fleet/transcript warning",$.length===1?"":"s"," — lanes follow tail, not agent registry"]})]}),o.jsx("ul",{className:"s-agent-lanes-issues-list",children:$.map(r=>o.jsx(Ts,{issue:r},r.id))})]}):null,ce===0?de.visible?o.jsx(ft,{discovery:O,discoveryPhase:K.discovery,windowMs:V,nowMs:L,layout:v?"none":D?"grid":"scroll",gridColumns:x,laneWidthPx:cn(_.defaultLaneWidth,_.defaultLaneWidth),matchTranscript:wn}):He?o.jsx(_s,{loadState:K,onRetry:()=>{te()}}):o.jsx(Ps,{activeFilterLabel:ke,horizon:b,horizonLabel:J,showAutoLanes:_.showAutoLanes,onHorizonChange:I,onAddAttentionLane:Ve,onAddCodexLane:()=>ee("codex","Codex sessions"),sourceCount:Be,eventCount:U.length,degraded:Nn,onRetry:()=>{te()}}):v?o.jsx(ct,{lanes:ve,now:L,onOpenTrace:zn,railLedger:!0,operatorName:m}):D?o.jsx("div",{className:"s-agent-lanes-grid","data-grid-columns":x,role:"listbox","aria-label":"Agent lane grid",children:ne.map((r,g)=>fe(r,g,!0))}):o.jsxs("div",{className:"s-agent-lanes-body",children:[E.pinnedLeft.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-left","aria-label":"Pinned lanes",children:[o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),o.jsx("div",{ref:An,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:Pn,children:E.pinnedLeft.map((r,g)=>fe(r,g))})]}):null,E.main.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main","aria-label":"Active lanes",children:[E.pinnedLeft.length>0?o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Live"}):null,o.jsx("div",{ref:Tn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:Dn,children:E.main.map((r,g)=>fe(r,E.pinnedLeft.length+g))})]}):null,E.pinnedRight.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-right","aria-label":"Pinned right lanes",children:[o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),o.jsx("div",{ref:_n,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:Mn,children:E.pinnedRight.map((r,g)=>fe(r,E.pinnedLeft.length+E.main.length+g))})]}):null]}),de.visible?o.jsx(mt,{loadState:K,sourceCount:Be,processCount:O?.processes.length??0,eventCount:U.length,laneCount:ce,horizonLabel:J,handedOff:de.exiting,exiting:de.exiting}):null,Q&&o.jsx(vt,{lane:Q,navigate:e,returnRoute:X,navigationEnabled:t==null,onClose:()=>$e(null),onPinProject:Rn,projectPinned:Cn}),Ue&&o.jsx(St,{target:Ue,onClose:()=>Ne(null)})]})}function pe(e){const n=e?.trim().toLowerCase();return n||null}function Te(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function zs(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function Le(e,n){if(!n)return!0;const t=Te(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=zs(i);return l===n||Te(i)===t||!!(f&&(f.toLowerCase()===n||Te(f)===t))})}function Os(e,n){const t=pe(n.harnessFilter),s=pe(n.projectFilter),{agent:i,facts:l,source:f}=e;return Le([i.harness,i.definitionId,l?.attribution,f],t)&&Le([i.project,i.projectRoot,i.cwd,l?.cwd,Z(i,f)],s)}function $s(e,n){return Le([e.harness,e.source],pe(n.harnessFilter))&&Le([e.project,e.cwd],pe(n.projectFilter))}function Fs(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const Ws=Vn({id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},webPath:"/ops/lanes",screen:"AgentLanesView",embed:{path:"/embed/agent-lanes",aliases:["/ops/lanes/embed","/embed/lanes","/embed/traces"],profile:"macos.lanes",rootClassName:"s-agent-lanes-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:e=>({profileId:un(),laneSize:fn(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),ha=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:Ms,scoutSurface:Ws},Symbol.toStringTag,{value:"Module"}));export{Ms as A,ha as a,as as r,Xt as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as t}from"./index-
|
|
1
|
+
import{r as i,j as t}from"./index-C1VaWNuD.js";import{n as W,e as q,f as D}from"./colors-BtO5_zlx.js";import{a as G}from"./api-Co9aQ2Jw.js";import{q as M}from"./terminal-takeover-BMeBjBB2.js";import{t as S}from"./time-Dhsh_2EG.js";import{u as U}from"./Provider-D0bB7q6y.js";import{o as N}from"./openContent-C6XO6kr5.js";import{E as F}from"./eye-C9cGk5z6.js";import{T as H}from"./terminal-UDy4lzV1.js";function A(e){return e?e.length>18?`${e.slice(0,8)}...${e.slice(-6)}`:e:null}function ee({agent:e,catalog:r,navigate:I,returnTo:g,variant:m="default",className:O,onNavigate:v}){const p=U(),[L,c]=i.useState(null),[$,b]=i.useState(!1),f=I??p.navigate,h=g??p.route;i.useEffect(()=>{b(!1)},[e.id]),i.useEffect(()=>{if(r!==void 0){c(null);return}let s=!1;return G(`/api/agents/${encodeURIComponent(e.id)}/session-catalog`).then(R=>{s||c(R)}).catch(()=>{s||c(null)}),()=>{s=!0}},[e.id,r]);const a=r===void 0?L:r,u=e.terminalSurface??(e.transport==="tmux"&&e.harnessSessionId?{backend:"tmux",sessionName:e.harnessSessionId,paneId:null,socketDir:null}:null),o=a?.activeSessionId??(u?e.harnessSessionId??u.sessionName:null),T=i.useMemo(()=>a?.sessions.find(s=>s.id===o)??null,[o,a?.sessions]);W(e.state);const n=!!(u&&o),w=n||!!a?.resumeCommand,x=q(e.state,e),l=m==="compact",E=x?o?l?n?"Live terminal":"Live trace":`Live ${A(o)}`:"Working":o?l?n?"Terminal":"Trace":`${n?"Terminal":"Trace"} ${A(o)}`:D(e.state,e)?"Callable":"No live turn",j=T?.startedAt?S(T.startedAt):e.updatedAt?S(e.updatedAt):null,y=n?l?"Observe":"Observe terminal":l?"Trace":"Observe trace",k=n?"Observe the live terminal":"Open the web observe trace",d=s=>{v?.(),N(f,{view:"terminal",agentId:e.id,mode:s},{returnTo:h})},C=()=>{v?.(),N(f,{view:"agents-v2",agentId:e.id,tab:"observe"},{returnTo:h})},z=()=>{if(n){d("takeover");return}const s=a?.resumeCommand;s&&(b(!0),M({command:s,cwd:a?.resumeCwd,agentId:e.id}).then(()=>d("takeover")))},B=["agent-live-actions",`agent-live-actions--${m}`,x?"agent-live-actions--live":"",O??""].filter(Boolean).join(" ");return t.jsxs("div",{className:B,children:[t.jsxs("div",{className:"agent-live-actions-status",children:[t.jsx("span",{className:"agent-live-actions-dot"}),t.jsx("span",{className:"agent-live-actions-status-main",children:E}),j&&t.jsx("span",{className:"agent-live-actions-status-detail",children:j})]}),t.jsxs("div",{className:"agent-live-actions-buttons",children:[t.jsxs("button",{type:"button",className:"agent-live-actions-button agent-live-actions-button--primary",onClick:()=>n?d("observe"):C(),title:k,"aria-label":k,children:[t.jsx(F,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),t.jsx("span",{children:y})]}),n&&t.jsx("button",{type:"button",className:"agent-live-actions-button",onClick:C,title:"Open the web observe trace",children:t.jsx("span",{children:"Trace"})}),w&&t.jsxs("button",{type:"button",className:"agent-live-actions-button",onClick:z,title:a?.resumeCommand??"Open interactive terminal takeover",children:[t.jsx(H,{size:13,strokeWidth:1.9,"aria-hidden":"true"}),t.jsx("span",{children:$?"Going...":"Takeover"})]})]})]})}export{ee as A};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as b,j as t}from"./index-C1VaWNuD.js";import{A as C}from"./AgentAvatar-Dz79iTxB.js";import{H as S}from"./HarnessMark-DttReffF.js";import{u as B,b as L,f as T}from"./use-fleet-active-asks-CCGrll5q.js";import{b as F,p as R,N as _,t as u}from"./agent-master-model-DMcHeNq3.js";import{t as q}from"./time-Dhsh_2EG.js";import{u as z}from"./use-conversation-list-UG-tMN67.js";import{u as E}from"./Provider-D0bB7q6y.js";import{ConversationScreen as A}from"./ConversationScreen-DIU7m_aC.js";/* empty css */import{A as O}from"./arrow-up-right-B09GPwFl.js";import{X as H}from"./x-DgmmnPKt.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./colors-BtO5_zlx.js";import"./CrewAvatar-CZ_faQ_s.js";import"./api-Co9aQ2Jw.js";import"./perf-PX8Rx0EP.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./message-visibility-CGOmSSKs.js";import"./conversation-model-C2KuZUXc.js";import"./createLucideIcon-Dv8H8m7J.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./ConversationComposer-BUIjWMBi.js";import"./zap-Bcja1lHG.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./openContent-C6XO6kr5.js";import"./eye-C9cGk5z6.js";import"./terminal-UDy4lzV1.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Bt2RBj93.js";import"./BackToPicker-BHicJyfc.js";import"./AstronautSuit-CwB4Dw07.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./activity-CzTJ-YMX.js";import"./message-circle-joGFxfj1.js";import"./tail-events-LK29oCKm.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./sparkles-D0vWLTyC.js";function ce({agentId:e,threadId:m,machineId:r,navigate:n}){const{agents:h}=E(),{sessions:v,loading:k}=z(),l=B(),{agent:i,memberAgentIds:j,sessions:g,master:o,threads:x,thread:a}=b.useMemo(()=>F({agentId:e,threadId:m,machineId:r,agents:h,sessions:v}),[e,m,r,h,v]),w=b.useMemo(()=>L(l,j),[l,j]),p=s=>({view:"messages",agentId:e,...s?{threadId:s}:{},...r?{machineId:r}:{}}),M=s=>({view:"messages",conversationId:s,...r?{machineId:r}:{}}),d=i?.name??g[0]?.agentName??e.split(".")[0]??e,y=(()=>{const s=R(i);return s===_?null:s})(),c=W(w),f=[y,c?.label??i?.branch??null].filter(Boolean).join(" · ");return t.jsxs("div",{className:"amv",children:[t.jsxs("section",{className:"amv-main",children:[t.jsxs("header",{className:"amv-head",children:[t.jsx(C,{agent:i??{name:d,harness:o?.harness??null,state:null},placement:"row",size:32}),t.jsxs("div",{className:"amv-ident",children:[t.jsx("span",{className:"amv-name",children:d}),f?t.jsxs("span",{className:"amv-sub",children:[c?t.jsx("span",{className:"amv-dot","data-tone":c.tone,"aria-hidden":!0}):null,f]}):null]}),i?.harness??o?.harness?t.jsx(S,{harness:i?.harness??o?.harness??"",size:14}):null]}),x.length>0?t.jsx("div",{className:"amv-strip",role:"list","aria-label":"Session threads",children:x.map(s=>{const N=s.id===a?.id;return t.jsxs("button",{type:"button",role:"listitem",className:`amv-card${N?" amv-card--on":""}`,onClick:()=>n(N?p():p(s.id)),children:[t.jsx("span",{className:"amv-mark","data-state":J(s,l),"aria-hidden":!0}),t.jsx("span",{className:"amv-cardTitle",children:u(s)}),t.jsx("span",{className:"amv-cardMeta",children:s.lastMessageAt?q(s.lastMessageAt):"—"})]},s.id)})}):null,t.jsx("div",{className:"amv-feed",children:o?t.jsx(A,{conversationId:o.id,navigate:n,embedded:!0,showBackNav:!1},o.id):t.jsx("div",{className:"amv-empty",children:k?"Loading conversations…":`No conversations with ${d} yet.`})})]}),a?t.jsxs("aside",{className:"amv-thread","aria-label":"Thread",children:[t.jsxs("header",{className:"amv-threadHead",children:[t.jsxs("div",{className:"amv-threadIdent",children:[t.jsx("span",{className:"amv-threadKicker",children:"Thread"}),t.jsx("span",{className:"amv-threadTitle",title:u(a),children:u(a)})]}),t.jsx("button",{type:"button",className:"amv-threadBtn",title:"Open as full conversation","aria-label":"Open as full conversation",onClick:()=>n(M(a.id)),children:t.jsx(O,{size:14,strokeWidth:2,"aria-hidden":!0})}),t.jsx("button",{type:"button",className:"amv-threadBtn",title:"Close thread","aria-label":"Close thread",onClick:()=>n(p()),children:t.jsx(H,{size:14,strokeWidth:2,"aria-hidden":!0})})]}),t.jsx("div",{className:"amv-threadBody",children:t.jsx(A,{conversationId:a.id,navigate:n,embedded:!0,showBackNav:!1},a.id)})]}):null]})}function W(e){return e?e.status==="working"?{label:"working",tone:"working"}:e.status==="needs_attention"?{label:"needs you",tone:"attention"}:e.status==="queued"?{label:"starting",tone:"pending"}:null:null}function $(e){return e.status==="needs_attention"?"needs_you":e.status==="working"||e.status==="queued"?"working":"quiet"}function J(e,m){const r=T(m,e);return r?$(r):"quiet"}export{ce as AgentMasterScreen};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import{j as s,r as p}from"./index-
|
|
1
|
+
import{j as s,r as p}from"./index-C1VaWNuD.js";import{u as K}from"./Provider-D0bB7q6y.js";import{o as E}from"./openContent-C6XO6kr5.js";import{a as H}from"./api-Co9aQ2Jw.js";import{c as P}from"./clipboard-e3fSpeo7.js";import{t as D}from"./time-Dhsh_2EG.js";import"./router-kfcaYqZr.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";const q=30*6e4,z=/^(?:hey|hi|hello)\b[^,]{0,24},\s*|^(?:can|could|would|will)\s+(?:you|we|i)\s+(?:please\s+)?|^please\s+|^let'?s\s+/i,L={created:"+",modified:"~",read:"·"};function J(e){const a=(e.preview??"").replace(/^\[ask:[^\]]+\]\s*/i,"").replace(/\s+/g," ").replace(z,"").trim();if(a)return a.length>150?`${a.slice(0,150).replace(/\s+\S*$/,"")}…`:a;const t=e.title?.trim();return t&&t!==e.agentName?t:"Untitled session"}function R(e){if(!e)return"—";const a=e.replace(/\.jsonl$/,"").replace(/^c\./,"").replace(/^session[_:-]?/i,"");return a.length<=10?a:`${a.slice(0,8)}…${a.slice(-3)}`}function Q(e){return e.replace(/^\/(?:Users|home)\/[^/]+\/(?:dev\/|projects\/|src\/|code\/)?/,"")}function u(e){return!e||e<=0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(e<1e4?1:0).replace(/\.0$/,"")}k`}function X(e){const a=new Map;for(const t of e){if(t.kind!=="tool")continue;const l=(t.tool??"tool").toLowerCase();a.set(l,(a.get(l)??0)+1)}return[...a.entries()].map(([t,l])=>({name:t,n:l})).sort((t,l)=>l.n-t.n).slice(0,8)}function F(){const[e,a]=p.useState(!1),t=p.useRef(null),l=p.useCallback(c=>{P(c).then(r=>{r&&(a(!0),t.current&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>a(!1),1200))})},[]);return p.useEffect(()=>()=>{t.current&&window.clearTimeout(t.current)},[]),[e,l]}function B({copied:e}){return s.jsx("svg",{className:"ap-sx-copyIco",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none","aria-hidden":!0,children:e?s.jsx("path",{d:"M2.6 6.3 5 8.6 9.5 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}):s.jsxs(s.Fragment,{children:[s.jsx("rect",{x:"3.6",y:"3.6",width:"6",height:"6",rx:"1.3",stroke:"currentColor",strokeWidth:"1.05"}),s.jsx("path",{d:"M7.8 3.6V2.5A1.1 1.1 0 0 0 6.7 1.4H2.5A1.1 1.1 0 0 0 1.4 2.5v4.2A1.1 1.1 0 0 0 2.5 7.8h1.1",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function Y({value:e,display:a,title:t,className:l}){const[c,r]=F();return s.jsxs("button",{type:"button",className:l?`ap-sx-copy ${l}`:"ap-sx-copy","data-copied":c||void 0,title:c?"Copied":t??e,"aria-label":`Copy ${e}`,onClick:o=>{o.stopPropagation(),r(e)},children:[s.jsx("span",{className:"ap-sx-copyText",children:a}),s.jsx(B,{copied:c})]})}function Z({session:e,agentId:a,status:t}){const{route:l,navigate:c}=K(),[r,o]=p.useState(null),[v,d]=p.useState("loading"),h=e.harnessSessionId??e.id;p.useEffect(()=>{if(!a){d("loaded");return}let n=!1;return d("loading"),o(null),H(`/api/agents/${encodeURIComponent(a)}/observe`).then(i=>{n||(o(i),d("loaded"))}).catch(()=>{n||d("loaded")}),()=>{n=!0}},[a]);const m=r?.data??null,b=m?.metadata,x=b?.usage,g=b?.session,f=m?.files??[],k=p.useMemo(()=>X(m?.events??[]),[m?.events]),[T,O]=F(),M=g?.gitBranch?.trim()||e.currentBranch?.trim()||"—",S=g?.model?.trim()||"—",y=g?.turnCount??x?.assistantMessages??e.messageCount??null,w=g?.sessionStart??e.lastMessageAt??null,A=x?.contextInputTokens??0,C=x?.contextWindowTokens??0,j=C>0?Math.min(100,Math.round(A/C*100)):null,I=(x?.cacheReadInputTokens??0)+(x?.cacheCreationInputTokens??0),W=()=>E(c,{view:"sessions",sessionId:e.id},{returnTo:l}),U=()=>E(c,{view:"terminal",agentId:a,mode:"takeover"},{returnTo:l}),V=[["branch",M],["model",S],["started",w?D(w):"—"],["turns",y!=null?`${y}`:"—"]],_=()=>{const i=[["session",h],["agent",a||"—"],["branch",M],["model",S],["cwd",g?.cwd?.trim()||"—"],["started",w?new Date(w).toISOString():"—"],["turns",y!=null?`${y}`:"—"],["context",j!=null?`${u(A)} / ${u(C)} (${j}%)`:"—"]].map(([N,G])=>`${`${N}:`.padEnd(9)}${G}`).join(`
|
|
2
2
|
`),$=f.length?`
|
|
3
3
|
|
|
4
4
|
files touched:
|
|
5
5
|
${[...f].slice(0,24).map(N=>` ${L[N.state]} ${N.path}`).join(`
|
|
6
|
-
`)}`:"";return i+$};return v==="loading"?s.jsx("div",{className:"ap-sx-card ap-sx-loading",children:"Loading session…"}):s.jsxs("div",{className:"ap-sx-card",children:[s.jsxs("div",{className:"ap-sx-statGrid",children:[s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:"session"}),s.jsx(Y,{className:"ap-sx-copyStat",value:h,display:`#${R(h)}`,title:h})]}),V.map(([n,i])=>s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:n}),s.jsx("span",{className:"ap-sx-statVal",title:i,children:i})]},n))]}),m?s.jsxs("div",{className:"ap-sx-cols",children:[s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"context"}),j!=null?s.jsxs("span",{className:"ap-sx-read",children:[s.jsx("span",{className:"ap-sx-num",children:u(A)}),s.jsxs("span",{className:"ap-sx-dim",children:[" / ",u(C)]}),s.jsx("span",{className:"ap-sx-sep",children:"·"}),s.jsxs("span",{className:"ap-sx-num",children:[j,"%"]})]}):null]}),j!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ap-sx-gauge","aria-hidden":!0,children:s.jsx("span",{className:"ap-sx-gaugeFill",style:{width:`${j}%`}})}),s.jsxs("div",{className:"ap-sx-flow",children:[s.jsxs("span",{children:["↑",u(x?.inputTokens)," in"]}),s.jsxs("span",{children:["↓",u(x?.outputTokens)," out"]}),I>0?s.jsxs("span",{className:"ap-sx-faint",children:["cache ",u(I)]}):null]})]}):s.jsx("div",{className:"ap-sx-empty",children:"No usage captured."})]}),s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"tools"}),k.length>0?s.jsxs("span",{className:"ap-sx-meta",children:[k.reduce((n,i)=>n+i.n,0)," calls"]}):null]}),k.length>0?s.jsx("div",{className:"ap-sx-tools",children:k.map(n=>s.jsxs("span",{className:"ap-sx-tool",children:[s.jsx("span",{className:"ap-sx-toolName",children:n.name}),s.jsxs("span",{className:"ap-sx-toolN",children:["×",n.n]})]},n.name))}):s.jsx("div",{className:"ap-sx-empty",children:"No tools yet."})]})]}):s.jsx("div",{className:"ap-sx-empty ap-sx-noTrace",children:"No live trace for this session."}),f.length>0?s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"files touched"}),s.jsx("span",{className:"ap-sx-meta",children:f.length})]}),s.jsx("div",{className:"ap-sx-files",children:[...f].sort((n,i)=>(n.state==="read"?1:0)-(i.state==="read"?1:0)).slice(0,8).map(n=>{const i=n.state!=="read",$=n.path.replace(/\/+$/,"").split("/").pop()??n.path,N=Q(n.path.slice(0,n.path.length-$.length));return s.jsxs("div",{className:"ap-sx-fileRow","data-changed":i||void 0,children:[s.jsx("span",{className:"ap-sx-fileMark","data-state":n.state,"aria-hidden":!0,children:L[n.state]}),s.jsx("span",{className:"ap-sx-fileName",children:$}),s.jsx("span",{className:"ap-sx-fileDir",children:N}),s.jsxs("span",{className:"ap-sx-fileN",children:["×",n.touches]})]},n.path)})})]}):null,s.jsxs("div",{className:"ap-sx-actions",children:[s.jsx("button",{type:"button",className:"ap-sx-open",onClick:W,children:"Open ↗"}),s.jsx("button",{type:"button",className:"ap-sx-resume",onClick:U,children:t==="running"?"Send":"Take over"}),s.jsxs("button",{type:"button",className:"ap-sx-copyAll","data-copied":T||void 0,title:"Copy session id + metadata",onClick:()=>O(_()),children:[s.jsx(B,{copied:T}),T?"Copied":"Copy details"]})]})]})}function ss({session:e,fallbackAgentId:a}){const t=e.agentId??a,[l,
|
|
6
|
+
`)}`:"";return i+$};return v==="loading"?s.jsx("div",{className:"ap-sx-card ap-sx-loading",children:"Loading session…"}):s.jsxs("div",{className:"ap-sx-card",children:[s.jsxs("div",{className:"ap-sx-statGrid",children:[s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:"session"}),s.jsx(Y,{className:"ap-sx-copyStat",value:h,display:`#${R(h)}`,title:h})]}),V.map(([n,i])=>s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:n}),s.jsx("span",{className:"ap-sx-statVal",title:i,children:i})]},n))]}),m?s.jsxs("div",{className:"ap-sx-cols",children:[s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"context"}),j!=null?s.jsxs("span",{className:"ap-sx-read",children:[s.jsx("span",{className:"ap-sx-num",children:u(A)}),s.jsxs("span",{className:"ap-sx-dim",children:[" / ",u(C)]}),s.jsx("span",{className:"ap-sx-sep",children:"·"}),s.jsxs("span",{className:"ap-sx-num",children:[j,"%"]})]}):null]}),j!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ap-sx-gauge","aria-hidden":!0,children:s.jsx("span",{className:"ap-sx-gaugeFill",style:{width:`${j}%`}})}),s.jsxs("div",{className:"ap-sx-flow",children:[s.jsxs("span",{children:["↑",u(x?.inputTokens)," in"]}),s.jsxs("span",{children:["↓",u(x?.outputTokens)," out"]}),I>0?s.jsxs("span",{className:"ap-sx-faint",children:["cache ",u(I)]}):null]})]}):s.jsx("div",{className:"ap-sx-empty",children:"No usage captured."})]}),s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"tools"}),k.length>0?s.jsxs("span",{className:"ap-sx-meta",children:[k.reduce((n,i)=>n+i.n,0)," calls"]}):null]}),k.length>0?s.jsx("div",{className:"ap-sx-tools",children:k.map(n=>s.jsxs("span",{className:"ap-sx-tool",children:[s.jsx("span",{className:"ap-sx-toolName",children:n.name}),s.jsxs("span",{className:"ap-sx-toolN",children:["×",n.n]})]},n.name))}):s.jsx("div",{className:"ap-sx-empty",children:"No tools yet."})]})]}):s.jsx("div",{className:"ap-sx-empty ap-sx-noTrace",children:"No live trace for this session."}),f.length>0?s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"files touched"}),s.jsx("span",{className:"ap-sx-meta",children:f.length})]}),s.jsx("div",{className:"ap-sx-files",children:[...f].sort((n,i)=>(n.state==="read"?1:0)-(i.state==="read"?1:0)).slice(0,8).map(n=>{const i=n.state!=="read",$=n.path.replace(/\/+$/,"").split("/").pop()??n.path,N=Q(n.path.slice(0,n.path.length-$.length));return s.jsxs("div",{className:"ap-sx-fileRow","data-changed":i||void 0,children:[s.jsx("span",{className:"ap-sx-fileMark","data-state":n.state,"aria-hidden":!0,children:L[n.state]}),s.jsx("span",{className:"ap-sx-fileName",children:$}),s.jsx("span",{className:"ap-sx-fileDir",children:N}),s.jsxs("span",{className:"ap-sx-fileN",children:["×",n.touches]})]},n.path)})})]}):null,s.jsxs("div",{className:"ap-sx-actions",children:[s.jsx("button",{type:"button",className:"ap-sx-open",onClick:W,children:"Open ↗"}),s.jsx("button",{type:"button",className:"ap-sx-resume",onClick:U,children:t==="running"?"Send":"Take over"}),s.jsxs("button",{type:"button",className:"ap-sx-copyAll","data-copied":T||void 0,title:"Copy session id + metadata",onClick:()=>O(_()),children:[s.jsx(B,{copied:T}),T?"Copied":"Copy details"]})]})]})}function ss({session:e,fallbackAgentId:a}){const t=e.agentId??a,[l,c]=p.useState(!1),o=e.lastMessageAt!=null&&Date.now()-e.lastMessageAt<q?"running":"idle",v=J(e),d=e.currentBranch?.trim(),h=R(e.harnessSessionId??e.id),m=e.lastMessageAt?D(e.lastMessageAt):"—";return s.jsxs("div",{className:"ap-sx-session","data-open":l||void 0,"data-status":o,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>c(b=>!b),children:[s.jsx("span",{className:"ap-sx-tri","data-open":l||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ap-sx-dot","data-tone":o,"aria-hidden":!0}),s.jsxs("span",{className:"ap-sx-rowBody",children:[s.jsxs("span",{className:"ap-sx-line",children:[s.jsx("span",{className:"ap-sx-title",title:v,children:v}),s.jsxs("span",{className:"ap-sx-rowMeta",children:[s.jsx("span",{className:"ap-sx-badge","data-tone":o,children:o==="running"?"RUNNING":"IDLE"}),s.jsx("span",{className:"ap-sx-age",children:m})]})]}),l?null:s.jsxs("span",{className:"ap-sx-sub",children:[d?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subBranch",children:d}),s.jsx("span",{className:"ap-sx-subSep",children:"·"})]}):null,s.jsxs("span",{className:"ap-sx-subId",children:["#",h]}),e.messageCount>0?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subSep",children:"·"}),s.jsxs("span",{children:[e.messageCount," turn",e.messageCount===1?"":"s"]})]}):null]})]})]}),l?s.jsx(Z,{session:e,agentId:t,status:o}):null]})}function Us({agentIds:e,sessions:a}){const t=e??[],l=(a??[]).filter(r=>r.agentId!=null&&t.includes(r.agentId)).slice().sort((r,o)=>(o.lastMessageAt??0)-(r.lastMessageAt??0)).slice(0,8);if(l.length===0)return null;const c=t[0]??"";return s.jsx("div",{className:"ap-sx-list",children:l.map(r=>s.jsx(ss,{session:r,fallbackAgentId:c},r.id))})}export{Us as AgentSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as h,j as s}from"./index-C1VaWNuD.js";import{A as B}from"./AgentAvatar-Dz79iTxB.js";import{H as S,h as w}from"./HarnessMark-DttReffF.js";import{c as P}from"./colors-BtO5_zlx.js";import{f as R}from"./runtime-picker-C20lTGhV.js";import{t as C}from"./time-Dhsh_2EG.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./perf-PX8Rx0EP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./api-Co9aQ2Jw.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./conversation-model-C2KuZUXc.js";import"./createLucideIcon-Dv8H8m7J.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./loader-circle-DmUG_YC7.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./SpriteAvatar-DFO4Kb4Z.js";import"./CrewAvatar-CZ_faQ_s.js";import"./voice-levels-Dcr3jglk.js";function K(n){return n.needsYou?"needs":n.status==="in_turn"||n.status==="in_flight"?"live":"idle"}const H=[{id:"prompt",label:"System prompt",sigil:"◆"},{id:"config",label:"Config",sigil:"▤"},{id:"conversations",label:"Conversations",sigil:"◇"},{id:"context",label:"Context",sigil:"▸"}],q={prompt:"System prompt",config:"Config",conversations:"Conversations",context:"Context"};function U(n){return n?n.replace(/^\/Users\/[^/]+/,"~").replace(/^\/home\/[^/]+/,"~"):""}const k=(n,e)=>`${n} ${e}${n===1?"":"s"}`;function _s({projects:n,initialSelection:e,onEdit:a,onInterrupt:l,onResetContext:i,onOpenConversation:m,onNewAgent:o}){const d=h.useMemo(()=>n.flatMap(t=>t.agents.map(c=>[t,c])),[n]),x=d[0]?.[1],[u,A]=h.useState(e?.agentId??x?.agent.id??null),[F,E]=h.useState(e?.facet??"prompt"),[I,y]=h.useState(()=>new Set(u?[u]:[])),[M,V]=h.useState(""),g=M.trim().toLowerCase(),D=h.useMemo(()=>g?n.map(t=>({...t,agents:t.agents.filter(c=>c.agent.name.toLowerCase().includes(g)||(c.agent.harness??"").toLowerCase().includes(g)||t.slug.toLowerCase().includes(g))})).filter(t=>t.agents.length>0):n,[n,g]),v=h.useMemo(()=>{for(const[t,c]of d)if(c.agent.id===u)return{project:t,entry:c};return null},[d,u]),T=n.reduce((t,c)=>t+c.agents.length,0),_=T*H.length,z=(t,c)=>{A(t),c&&E(c),y(r=>new Set(r).add(t))},$=t=>{y(c=>{const r=new Set(c);return r.has(t)?r.delete(t):r.add(t),r}),A(t)};return s.jsxs("div",{className:"s-acon",children:[s.jsxs("div",{className:"ac-shell",children:[s.jsxs("aside",{className:"ac-tree",children:[s.jsxs("div",{className:"ac-treeHead",children:[s.jsx("span",{className:"ac-treeIco","aria-hidden":!0,children:"⌕"}),s.jsx("input",{className:"ac-treeFind",placeholder:"Filter agents…",value:M,onChange:t=>V(t.target.value)})]}),s.jsxs("div",{className:"ac-treeScroll",children:[D.map(t=>s.jsxs("div",{className:"ac-treeGroup",children:[s.jsxs("div",{className:"ac-treeProject",children:[s.jsx("span",{className:"ac-sigil",children:"/"}),t.slug,s.jsx("span",{className:"ac-treeProjectCount",children:t.agents.length})]}),t.agents.map(c=>{const r=I.has(c.agent.id),f=K(c),G=c.agent.id===u;return s.jsxs("div",{className:"ac-agentBlock",children:[s.jsxs("button",{type:"button",className:"ac-agent","data-open":r||void 0,onClick:()=>$(c.agent.id),children:[s.jsx("span",{className:"ac-agentChev","data-open":r||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ac-agentAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:c.agent.name,harness:c.agent.harness,state:c.agent.state},placement:"node",size:16})}),s.jsx("span",{className:"ac-agentName","data-idle":f==="idle"||void 0,children:c.agent.name}),f==="needs"?s.jsx("span",{className:"ac-needs",children:"needs you"}):null,s.jsxs("span",{className:"ac-agentTail",children:[f!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":f,"aria-hidden":!0}):null,c.agent.harness?s.jsx("span",{className:"ac-agentMark","aria-hidden":!0,children:s.jsx(S,{harness:c.agent.harness,size:11})}):null]})]}),r?s.jsx("div",{className:"ac-facets",children:H.map(j=>{const L=j.id==="conversations"?c.sessions.length:void 0,W=G&&F===j.id;return s.jsxs("button",{type:"button",className:"ac-facet","data-active":W||void 0,onClick:()=>z(c.agent.id,j.id),children:[s.jsx("span",{className:"ac-facetSigil","aria-hidden":!0,children:j.sigil}),s.jsx("span",{className:"ac-facetLabel",children:j.label}),L!=null?s.jsx("span",{className:"ac-facetCount",children:L}):null]},j.id)})}):null]},c.agent.id)})]},t.key)),o?s.jsx("button",{type:"button",className:"ac-newAgent",onClick:o,children:"+ new agent"}):null]})]}),s.jsx("main",{className:"ac-read",children:v?s.jsx(Y,{project:v.project,entry:v.entry,facet:F,onEdit:a,onInterrupt:l,onResetContext:i,onOpenConversation:m}):s.jsx("div",{className:"ac-empty",children:"No agents."})}),s.jsx("aside",{className:"ac-rail",children:v?s.jsx(ss,{entry:v.entry,onOpenConversation:m}):null})]}),s.jsxs("div",{className:"ac-foot",children:[s.jsx("span",{className:"ac-footStat",children:k(n.length,"project")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(T,"agent")}),s.jsx("span",{className:"ac-footSep",children:"·"}),s.jsx("span",{className:"ac-footStat",children:k(_,"facet")})]})]})}function Y({project:n,entry:e,facet:a,onEdit:l,onInterrupt:i,onResetContext:m,onOpenConversation:o}){const{agent:d,config:x}=e,u=e.status==="in_turn"||e.status==="in_flight";return s.jsxs(s.Fragment,{children:[s.jsxs("header",{className:"ac-readHead",children:[s.jsxs("div",{className:"ac-crumb",children:[s.jsx("span",{className:"ac-crumbDim",children:n.slug}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsxs("span",{className:"ac-crumbAgent",children:["@",d.name]}),s.jsx("span",{className:"ac-crumbSep",children:"/"}),s.jsx("span",{className:"ac-crumbFacet",children:q[a]})]}),s.jsxs("div",{className:"ac-readActions",children:[(a==="prompt"||a==="config")&&l&&x.editable?s.jsx("button",{type:"button",className:"ac-actPrimary",onClick:()=>l(d.id),children:"Edit"}):null,u&&i?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>i(d.id),children:"Interrupt"}):null,a==="context"&&m?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>m(d.id),children:"Reset"}):null,o?s.jsx("button",{type:"button",className:"ac-act",onClick:()=>o(d.id),children:"Open ↗"}):null]})]}),s.jsxs("div",{className:"ac-metaStrip",children:[s.jsx(b,{k:"Type",v:Q(a)}),x.model?s.jsx(b,{k:"Model",v:x.model,mono:!0}):null,s.jsx(b,{k:"Editable",v:x.editable?"yes":"read-only"}),e.lastActivityAt?s.jsx(b,{k:"Active",v:C(e.lastActivityAt)}):null]}),s.jsxs("div",{className:"ac-readBody",children:[a==="prompt"?s.jsx(J,{entry:e}):null,a==="config"?s.jsx(X,{entry:e}):null,a==="conversations"?s.jsx(Z,{entry:e,onOpenConversation:o}):null,a==="context"?s.jsx(O,{entry:e}):null]})]})}function Q(n){switch(n){case"prompt":return"Markdown · system prompt";case"config":return"Runtime config";case"conversations":return"Conversation list";case"context":return"Live context window"}}function J({entry:n}){const{agent:e,config:a}=n,l=a.systemPrompt.trim()||a.templateHint||"default template",i=!a.systemPrompt.trim();return s.jsxs("div",{className:"ac-doc",children:[s.jsxs("div",{className:"ac-docHead",children:[s.jsx("span",{className:"ac-docKey",children:"name"}),s.jsx("span",{className:"ac-docVal",children:e.name}),e.role?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"role"}),s.jsx("span",{className:"ac-docVal",children:R(e.role)??e.role})]}):null,s.jsx("span",{className:"ac-docKey",children:"harness"}),s.jsx("span",{className:"ac-docVal",children:w(e.harness)}),a.model?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ac-docKey",children:"model"}),s.jsx("span",{className:"ac-docVal",children:a.model})]}):null]}),s.jsx("div",{className:"ac-docLabel",children:i?"Default template":"System prompt"}),s.jsx("pre",{className:"ac-prose","data-default":i||void 0,children:l})]})}function X({entry:n}){const{agent:e,config:a}=n;return s.jsxs("div",{className:"ac-config",children:[s.jsxs(N,{k:"Harness",children:[s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:e.harness,size:12})}),w(e.harness)]}),s.jsx(N,{k:"Model",children:a.model??"—"}),s.jsx(N,{k:"Permissions",children:a.permission??"default"}),s.jsx(N,{k:"Transport",children:a.runtime.transport}),s.jsx(N,{k:"Workdir",mono:!0,title:a.runtime.cwd,children:U(a.runtime.cwd)||a.runtime.cwd}),s.jsx(N,{k:"Session",mono:!0,children:a.runtime.sessionId}),a.launchArgs.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Launch"}),s.jsxs("pre",{className:"ac-cmd",children:[a.runtime.harness," ",a.launchArgs.join(" ")]})]}):null,a.capabilities.length?s.jsxs("div",{className:"ac-configBlock",children:[s.jsx("div",{className:"ac-configKey",children:"Capabilities"}),s.jsx("div",{className:"ac-chips",children:a.capabilities.map(l=>s.jsx("span",{className:"ac-chip",children:l},l))})]}):null]})}function Z({entry:n,onOpenConversation:e}){return n.sessions.length?s.jsx("div",{className:"ac-convos",children:n.sessions.map(a=>s.jsxs("button",{type:"button",className:"ac-convo",disabled:!e,onClick:()=>e?.(n.agent.id,a.id),children:[s.jsx("span",{className:"ac-convoDot","aria-hidden":!0}),s.jsxs("span",{className:"ac-convoBody",children:[s.jsx("span",{className:"ac-convoTitle",children:a.title||a.preview||"Conversation"}),a.preview&&a.title?s.jsx("span",{className:"ac-convoPreview",children:a.preview}):null,s.jsxs("span",{className:"ac-convoMeta",children:[a.currentBranch?s.jsx("span",{className:"ac-convoBranch",children:a.currentBranch}):null,s.jsxs("span",{children:[a.messageCount," msgs"]}),a.lastMessageAt?s.jsx("span",{children:C(a.lastMessageAt)}):null]})]})]},a.id))}):s.jsx("div",{className:"ac-empty",children:"No conversations yet."})}function O({entry:n}){const e=n.context;if(!e)return s.jsx("div",{className:"ac-empty",children:"No live context — agent is not in an active session."});const a=e.usedPercent!=null?Math.round(e.usedPercent):null;return s.jsxs("div",{className:"ac-ctx",children:[s.jsxs("div",{className:"ac-ctxTop",children:[s.jsx("span",{className:"ac-ctxState","data-state":e.state,children:e.state}),s.jsxs("span",{className:"ac-ctxTurns",children:[e.turnCount," turns"]})]}),a!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ac-ctxGauge",children:s.jsx("span",{className:"ac-ctxFill",style:{width:`${Math.min(100,a)}%`}})}),s.jsxs("div",{className:"ac-ctxRead",children:[s.jsxs("span",{className:"ac-ctxNum",children:[a,"%"]}),s.jsx("span",{className:"ac-ctxDim",children:"of context window used"})]})]}):null,e.contextInputTokens!=null&&e.contextWindowTokens!=null?s.jsxs("div",{className:"ac-ctxTokens",children:[e.contextInputTokens.toLocaleString()," / ",e.contextWindowTokens.toLocaleString()," ","tokens"]}):null]})}function ss({entry:n,onOpenConversation:e}){const{agent:a,config:l}=n,i=K(n),m=a.ownerName||a.ownerHandle||null;return s.jsxs("div",{className:"ac-railInner",children:[s.jsxs("div",{className:"ac-railIdent",children:[s.jsx("span",{className:"ac-railAvatar","aria-hidden":!0,children:s.jsx(B,{agent:{name:a.name,harness:a.harness,state:a.state},placement:"inspector"})}),s.jsxs("div",{className:"ac-railNames",children:[s.jsxs("div",{className:"ac-railName",children:["@",a.name]}),a.role?s.jsx("div",{className:"ac-railRole",children:R(a.role)??a.role}):null]})]}),s.jsxs("div",{className:"ac-railState","data-tone":i==="idle"?void 0:i,children:[i!=="idle"?s.jsx("span",{className:"ac-dot","data-tone":i,"aria-hidden":!0}):null,s.jsx("span",{children:n.needsYou?"Needs you":P(a.state)})]}),n.activeTask?s.jsx("div",{className:"ac-railTask",children:n.activeTask}):null,s.jsxs("div",{className:"ac-railGroup",children:[s.jsx(p,{k:"Harness",v:w(a.harness),mark:a.harness}),s.jsx(p,{k:"Model",v:l.model??"—"}),m?s.jsx(p,{k:"Owner",v:m}):null,a.branch?s.jsx(p,{k:"Branch",v:a.branch,mono:!0}):null,s.jsx(p,{k:"State",v:P(a.state)}),a.updatedAt?s.jsx(p,{k:"Updated",v:C(a.updatedAt)}):null,s.jsx(p,{k:"Sessions",v:String(n.sessions.length)})]}),l.permission?s.jsxs("div",{className:"ac-railSub",children:[s.jsx("div",{className:"ac-railSubHead",children:"Permissions"}),s.jsx("span",{className:"ac-chip",children:l.permission})]}):null,l.capabilities.length?s.jsxs("div",{className:"ac-railSub",children:[s.jsxs("div",{className:"ac-railSubHead",children:["Capabilities · ",l.capabilities.length]}),s.jsx("div",{className:"ac-chips",children:l.capabilities.map(o=>s.jsx("span",{className:"ac-chip",children:o},o))})]}):null,a.conversationId&&e?s.jsx("button",{type:"button",className:"ac-railOpen",onClick:()=>e(a.id),children:"Open conversation →"}):null]})}function b({k:n,v:e,mono:a}){return s.jsxs("span",{className:"ac-metaItem",children:[s.jsx("span",{className:"ac-metaKey",children:n}),s.jsx("span",{className:"ac-metaVal","data-mono":a||void 0,children:e})]})}function N({k:n,children:e,mono:a,title:l}){return s.jsxs("div",{className:"ac-configRow",children:[s.jsx("span",{className:"ac-configKey",children:n}),s.jsx("span",{className:"ac-configVal","data-mono":a||void 0,title:l,children:e})]})}function p({k:n,v:e,mono:a,mark:l}){return s.jsxs("div",{className:"ac-railFact",children:[s.jsx("span",{className:"ac-railFactKey",children:n}),s.jsxs("span",{className:"ac-railFactVal","data-mono":a||void 0,children:[l?s.jsx("span",{className:"ac-inlineMark",children:s.jsx(S,{harness:l,size:11})}):null,e]})]})}export{_s as AgentsConsole};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as d}from"./index-C1VaWNuD.js";import{p as S,a as E}from"./api-Co9aQ2Jw.js";import{u as W,i as X}from"./Provider-D0bB7q6y.js";import{Q,b as Y}from"./router-kfcaYqZr.js";import{a as J}from"./sse-B29iGBnw.js";import{o as Z,i as C}from"./surface-activity-B1rgWB1i.js";/* empty css */import{AgentsSubnav as ee}from"./AgentsSubnav-Ci7uWM7P.js";import{AgentsLibrary as te}from"./library-COnWzUWv.js";import{r as se,d as oe}from"./NewChatComposer-D2Ah4T-W.js";import{AgentDetailWithRail as ne,AgentProfileBar as ie}from"./profile-BCvk8jOQ.js";/* empty css *//* empty css *//* empty css */import"./perf-PX8Rx0EP.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./createLucideIcon-Dv8H8m7J.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./file-text-BHro8MkG.js";import"./x-DgmmnPKt.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-B8sQ_8IF.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./index-BWHgHrtv.js";import"./SecondaryNav-Cs0_FQdj.js";import"./secondaryNavConfig-C0Srrmy8.js";import"./message-square-BLiFqpe_.js";import"./search-FB2vVxCp.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./terminal-UDy4lzV1.js";import"./git-branch-Bc_eDIpG.js";import"./scroll-text-DFcBYy5J.js";/* empty css */import"./SpriteAvatar-DFO4Kb4Z.js";import"./HarnessMark-DttReffF.js";import"./AgentSessions-DV9v34aq.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./runtime-picker-C20lTGhV.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./chevron-down-D120PY4g.js";import"./AgentAvatar-Dz79iTxB.js";import"./CrewAvatar-CZ_faQ_s.js";import"./context-budget-DqxWzalx.js";import"./session-catalog-CG4oL_yN.js";import"./terminal-relay-CXHMdain.js";import"./BackToPicker-BHicJyfc.js";import"./ConversationScreen-DIU7m_aC.js";import"./ConversationComposer-BUIjWMBi.js";import"./zap-Bcja1lHG.js";import"./message-markup-DC0QFEZn.js";import"./mentions-BZ5SBMtc.js";import"./AgentDetailCard-8viaEY8b.js";import"./AgentLiveActions-DlSKL60c.js";import"./terminal-takeover-BMeBjBB2.js";import"./eye-C9cGk5z6.js";import"./message-visibility-CGOmSSKs.js";import"./operator-attention-RqieiSY8.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Bt2RBj93.js";import"./AstronautSuit-CwB4Dw07.js";import"./ConversationFeedRows-Bx0gFyG_.js";import"./ConversationPanels-o6W-cOoU.js";import"./tail-display-DcliDVkW.js";import"./lane-edit-display-C_Aujldz.js";import"./use-reduced-motion-CPoX8iV2.js";import"./proxy-DVDRhSRR.js";import"./activity-CzTJ-YMX.js";import"./message-circle-joGFxfj1.js";import"./tail-events-LK29oCKm.js";import"./ConversationStatus-CTYOywFh.js";import"./check-Dz2SRHft.js";import"./sparkles-D0vWLTyC.js";import"./SessionObserve-BVeTkcIl.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-0WhMf4Vj.js";import"./LaneToolHoverCard-t7-XJP-h.js";import"./lane-observe-vfyACHi0.js";import"./lane-ask-display-B6iCAVcd.js";import"./ObservedTopologyPanel-CJVqIqQ2.js";import"./ObserveTextFlow-DCJ5EmD8.js";import"./SessionObserveEvidence-BkOezTGV.js";import"./wrench-BfVeded5.js";import"./external-link-BvX5PfLh.js";import"./AgentDefinitionsWorkspace-DHDS9Pgd.js";import"./agent-specialization-CtF_jI34.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-CxNbcTYf.js";/* empty css */import"./agent-essentials-K9B6kbTS.js";const U=new Set(["0","false","off","no","clear","none"]),re=new Set(["1","true","on","yes"]),ae=new Set(["localhost","127.0.0.1","::1"]);function de(t){return t.startsWith("[")&&t.endsWith("]")?t.slice(1,-1):t}function M(t){const o=t?.trim().toLowerCase();return o==="before"||o==="after"?o:null}function V(t){if(!t)return null;const o=t.trim().toLowerCase();return re.has(o)?!0:U.has(o)?!1:null}function L(t,o,i=[]){const r=V(t);if(r!==null)return r;if(!t)return null;const l=o.toLowerCase(),a=new Set([l,l.replace(/-/g,""),...i.map(n=>n.trim().toLowerCase()).filter(Boolean)]),s=t.split(",").map(n=>n.trim().toLowerCase()).filter(Boolean);return s.some(n=>U.has(n))?!1:s.some(n=>a.has(n))?!0:null}function le({studyId:t,aliases:o,href:i,storedEnabled:r,storedMode:l,dev:a,defaultMode:s="after"}){const n=i?new URL(i,"http://localhost"):null,p=L(n?.searchParams.get("studio"),t,o)??L(n?.searchParams.get(`studio.${t}`),t,o)??L(n?.searchParams.get("studioInjection"),t,o),c=n?ae.has(de(n.hostname)):!1;if(!a&&!c)return{enabled:!1,mode:s};const u=p??V(r)??!1,g=M(n?.searchParams.get("studioMode"))??M(n?.searchParams.get(`studioMode.${t}`))??M(l)??s;return{enabled:u,mode:g}}const ce="openscout.studio.inject.",me="openscout.studio.mode.";function D(t){return`${ce}${t}`}function $(t){return`${me}${t}`}function I(t){if(typeof window>"u")return null;try{return window.localStorage.getItem(t)}catch{return null}}function O(t,o){if(!(typeof window>"u"))try{window.localStorage.setItem(t,o)}catch{}}function ue(){return import.meta.env?.DEV===!0}function pe(t){return t==="before"?"after":"before"}function he(t){typeof window>"u"||Q({searchPatch:{studio:null,[`studio.${t}`]:null,studioInjection:null,studioMode:null,[`studioMode.${t}`]:null},replace:!0})}function fe(t,o=[]){const[i,r]=d.useState(()=>le({studyId:t,aliases:o,href:typeof window>"u"?void 0:window.location.href,storedEnabled:I(D(t)),storedMode:I($(t)),dev:ue()})),[l,a]=d.useState(!1);d.useEffect(()=>{if(!i.enabled){a(!1);return}const c=j=>{j.altKey&&a(!0)},u=j=>{j.altKey||a(!1)},g=()=>a(!1);return window.addEventListener("keydown",c),window.addEventListener("keyup",u),window.addEventListener("blur",g),()=>{window.removeEventListener("keydown",c),window.removeEventListener("keyup",u),window.removeEventListener("blur",g)}},[i.enabled]);const s=d.useCallback(c=>{O(D(t),c?"1":"0"),r(u=>({...u,enabled:c}))},[t]),n=d.useCallback(c=>{O($(t),c),r(u=>({...u,mode:c}))},[t]),p=l?pe(i.mode):i.mode;return d.useMemo(()=>({...i,renderedMode:p,peeking:p!==i.mode,setEnabled:s,setMode:n}),[p,s,n,i])}function ge({studyId:t,aliases:o,anchor:i,title:r,children:l,renderStudy:a}){const s=fe(t,o);return s.enabled?e.jsxs("div",{className:"s-studio-injection","data-studio-anchor":i,children:[e.jsxs("div",{className:"s-studio-injection-bar",children:[e.jsxs("div",{className:"s-studio-injection-label",children:[e.jsx("span",{className:"s-studio-injection-kicker",children:"Studio injection"}),e.jsx("span",{className:"s-studio-injection-title",children:r}),e.jsx("span",{className:"s-studio-injection-anchor",children:i})]}),e.jsxs("div",{className:"s-studio-injection-controls",role:"group","aria-label":`${r} mode`,children:[e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="before","aria-pressed":s.mode==="before",onClick:()=>s.setMode("before"),children:"Before"}),e.jsx("button",{type:"button",className:"s-studio-injection-mode","data-active":s.mode==="after","aria-pressed":s.mode==="after",onClick:()=>s.setMode("after"),children:"After"})]}),e.jsx("span",{className:"s-studio-injection-state",children:s.peeking?`Option: ${s.renderedMode}`:s.renderedMode}),e.jsx("button",{type:"button",className:"s-studio-injection-close",onClick:()=>{he(t),s.setEnabled(!1)},children:"Close"})]}),e.jsx("div",{className:"s-studio-injection-body","data-studio-mode":s.renderedMode,children:s.renderedMode==="before"?l:a()})]}):e.jsx(e.Fragment,{children:l})}const b=[{id:"openscout",title:"openscout",root:"~/dev/openscout",signal:"Studio mode injection for agent directory",sessions:9,agents:[{id:"hudson",name:"Hudson",handle:"@hudson",state:"working",role:"web design system",branch:"feat/studio-mode",task:"Refactoring the agent directory into insertion points",last:"18s"},{id:"scout",name:"Scout",handle:"@scout",state:"attention",role:"operator assistant",branch:"main",task:"Needs placement decision",last:"1m"},{id:"quill",name:"Quill",handle:"@quill",state:"ready",role:"docs",branch:"docs/agent-view",task:"Ready to write the study summary",last:"7m"}]},{id:"hudson",title:"hudson",root:"~/dev/hudson",signal:"Slot contracts and chrome primitives",sessions:4,agents:[{id:"atlas",name:"Atlas",handle:"@atlas",state:"working",role:"framework",branch:"slots/studio-anchor",task:"Mapping chrome slots to page anchors",last:"3m"},{id:"mira",name:"Mira",handle:"@mira",state:"ready",role:"qa",branch:"main",task:"Idle",last:"12m"}]},{id:"lattices",title:"lattices",root:"~/dev/lattices",signal:"macOS web view parity pass",sessions:2,agents:[{id:"north",name:"North",handle:"@north",state:"offline",role:"native",branch:"main",task:"No active session",last:"1h"}]}],je={working:"working",ready:"ready",attention:"attention",offline:"offline"};function xe({children:t}){return e.jsx(ge,{studyId:"agent-directory",aliases:["agents","agent","agent-directory-before-after"],anchor:"agents.directory",title:"Agent Directory",renderStudy:()=>e.jsx(ve,{}),children:t})}function ve(){const t=b.flatMap(s=>s.agents),o=t.filter(s=>s.state==="working"),i=t.filter(s=>s.state==="ready"),r=t.filter(s=>s.state==="attention"),l=b.reduce((s,n)=>s+n.sessions,0),a=o[0]??t[0];return e.jsxs("section",{className:"s-agent-studio-study","aria-label":"Agent directory injected study",children:[e.jsxs("div",{className:"s-agent-studio-banner",children:[e.jsx("span",{children:"After study"}),e.jsx("strong",{children:"Injected static view inside the live Agents route"}),e.jsx("em",{children:"Fixture data · insertion-point prototype · no backend writes"})]}),e.jsxs("header",{className:"s-agent-studio-head","data-studio-anchor":"agent.directory.header",children:[e.jsxs("div",{className:"s-agent-studio-title-block",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Studio / agents.directory / after"}),e.jsx("h1",{className:"s-agent-studio-title",children:"Project command center"}),e.jsxs("span",{className:"s-agent-studio-subtitle",children:[t.length," agents across ",b.length," projects"]})]}),e.jsxs("div",{className:"s-agent-studio-metrics","aria-label":"Agent study summary",children:[e.jsx(y,{label:"working",value:o.length,tone:"working"}),e.jsx(y,{label:"ready",value:i.length}),e.jsx(y,{label:"attention",value:r.length,tone:"attention"}),e.jsx(y,{label:"sessions",value:l})]})]}),e.jsxs("div",{className:"s-agent-studio-layout",children:[e.jsxs("div",{className:"s-agent-studio-main",children:[e.jsxs("section",{className:"s-agent-studio-pressure","data-studio-anchor":"agent.active-strip",children:[e.jsxs("div",{className:"s-agent-studio-section-head",children:[e.jsx("span",{children:"Pressure queue"}),e.jsx("strong",{children:o.length+r.length})]}),e.jsx("div",{className:"s-agent-studio-pressure-list",children:[...o,...r].map(s=>e.jsxs("article",{className:`s-agent-studio-pressure-card s-agent-studio-pressure-card--${s.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":s.state}),e.jsxs("div",{className:"s-agent-studio-pressure-copy",children:[e.jsx("strong",{children:s.name}),e.jsx("span",{children:s.task})]}),e.jsx("time",{children:s.last})]},s.id))})]}),e.jsx("section",{className:"s-agent-studio-projects","data-studio-anchor":"agent.project-board",children:b.map(s=>e.jsxs("article",{className:"s-agent-studio-project",children:[e.jsxs("div",{className:"s-agent-studio-project-main",children:[e.jsxs("div",{children:[e.jsx("span",{className:"s-agent-studio-project-root",children:s.root}),e.jsx("h2",{children:s.title})]}),e.jsxs("span",{className:"s-agent-studio-project-sessions",children:[s.sessions," sessions"]})]}),e.jsx("p",{children:s.signal}),e.jsx("div",{className:"s-agent-studio-agent-row",children:s.agents.map(n=>e.jsxs("span",{className:`s-agent-studio-agent-pill s-agent-studio-agent-pill--${n.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":n.state}),n.name]},n.id))})]},s.id))})]}),e.jsxs("aside",{className:"s-agent-studio-detail","data-studio-anchor":"agent.detail-preview",children:[e.jsx("span",{className:"s-agent-studio-kicker",children:"Pinned agent"}),e.jsx("h2",{children:a.name}),e.jsx("span",{className:`s-agent-studio-state s-agent-studio-state--${a.state}`,children:je[a.state]}),e.jsxs("dl",{children:[e.jsxs("div",{children:[e.jsx("dt",{children:"Handle"}),e.jsx("dd",{children:a.handle})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Role"}),e.jsx("dd",{children:a.role})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Branch"}),e.jsx("dd",{children:a.branch})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Current task"}),e.jsx("dd",{children:a.task})]})]})]})]})]})}function y({label:t,value:o,tone:i}){return e.jsxs("div",{className:`s-agent-studio-metric${i?` s-agent-studio-metric--${i}`:""}`,children:[e.jsx("strong",{children:o}),e.jsx("span",{children:t})]})}const R="/api/conversations",T="/api/fleet",H="/api/tail/discover",N=3e4;function vs({navigate:t,selectedAgentId:o,conversationId:i,tab:r,activeRoute:l}){const{agents:a,agentsLoaded:s,route:n}=W(),[p,c]=d.useState(()=>S(R,N)??[]),[u,g]=d.useState(()=>S(T,N)),[j,K]=d.useState(()=>S(H,N)),[z,q]=d.useState(()=>S(R,N)===null),P=Y(n),A=d.useMemo(()=>X(a,P),[a,P]),x=d.useCallback(async()=>{const[h,f,w]=await Promise.allSettled([E(R),E(T),E(H)]);h.status==="fulfilled"&&c(h.value),f.status==="fulfilled"&&g(f.value),w.status==="fulfilled"&&K(w.value),q(!1)},[]);d.useEffect(()=>{x()},[x]),d.useEffect(()=>{const h=()=>{C()&&x()},f=window.setInterval(h,1e4),w=Z(h);return()=>{window.clearInterval(f),w()}},[x]),J(()=>!0,()=>{C()&&x()});const m=se(A,o),B=!!(o&&m&&m.id!==o),v=n.view==="agents-v2"?n.projectSlug:void 0,k=!!(v&&!r),{conversationByAgentId:_,sessionByAgentId:G}=d.useMemo(()=>oe(p),[p]);if(d.useEffect(()=>{!o||!m||!B||t({view:"agents-v2",agentId:m.id,...k&&v?{projectSlug:v}:{},...i?{conversationId:i}:{},...r?{tab:r}:{}})},[i,r,k,t,v,m,o,B]),m&&!k){const h=i??_.get(m.id)??m.conversationId??null,f=r??(i?"message":"profile");return e.jsx(F,{activeRoute:l??n,navigate:t,bar:e.jsx(ie,{agent:m,conversationId:h,activeTab:f,navigate:t}),children:e.jsx(ne,{agent:m,allAgents:A,conversationId:h,navigate:t,activeTab:f})})}return e.jsx(F,{activeRoute:l??n,navigate:t,children:e.jsx(xe,{children:e.jsx(te,{agents:A,fleet:u,sessionByAgentId:G,conversationByAgentId:_,sessions:p,discovery:j,loading:!s||z,navigate:t,selectedAgentId:m?.id??o})})})}function F({activeRoute:t,children:o,navigate:i,bar:r}){return e.jsxs("div",{className:"s-secondary-nav-shell",children:[e.jsx("div",{className:"s-secondary-nav-bar",children:r??e.jsx(ee,{activeRoute:t,navigate:i})}),e.jsx("div",{className:"s-secondary-nav-body",children:o})]})}export{vs as AgentsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-C1VaWNuD.js";import{S as i}from"./SecondaryNav-Cs0_FQdj.js";import{A as m}from"./secondaryNavConfig-C0Srrmy8.js";import"./createLucideIcon-Dv8H8m7J.js";import"./message-square-BLiFqpe_.js";import"./file-text-BHro8MkG.js";import"./search-FB2vVxCp.js";import"./compass-BdpImt_W.js";import"./settings-DQEtqkM9.js";import"./terminal-UDy4lzV1.js";import"./git-branch-Bc_eDIpG.js";import"./code-xml-CkkNdRmu.js";import"./scroll-text-DFcBYy5J.js";function j({activeRoute:r,navigate:o}){return t.jsx(i,{ariaLabel:"Agents sections",activeRoute:r,groups:m,navigate:o})}export{j as AgentsSubnav};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./index-
|
|
1
|
+
import{j as t}from"./index-C1VaWNuD.js";function r(){return t.jsxs("svg",{className:"s-thread-participant-suit",viewBox:"0 0 42 42","aria-hidden":"true",children:[t.jsx("path",{d:"M 21 30.5 C 31 30.5 40 34.5 41.5 42 L 0.5 42 C 2 34.5 11 30.5 21 30.5 Z",fill:"var(--fp-suit)"}),t.jsx("rect",{x:"15.5",y:"26.5",width:"11",height:"4",rx:"2",fill:"var(--fp-suit-light)"}),t.jsx("path",{d:"M 8.5 15 A 13 13 0 0 1 19 5.5",fill:"none",stroke:"var(--fp-visor)",strokeWidth:"2.4",strokeLinecap:"round"})]})}export{r as AstronautSuit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as d,j as e}from"./index-BI9AljSD.js";/* empty css */import{D as ys}from"./DataTable-DXIlOlVu.js";import{H,h as F}from"./HarnessMark-DAaWPiT_.js";import{O as vs}from"./ObservedTopologyPanel-BhVsvwkh.js";import{a as es}from"./api-Co9aQ2Jw.js";import{o as ts,i as U}from"./surface-activity-B1rgWB1i.js";import{a as Ns,d as gs}from"./time-Dhsh_2EG.js";import{u as Is}from"./tail-events-BdUrO0kb.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";const ns=4e3,bs=500,Cs=5e3,Es=5e3,Ss=6e4,q={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},X={tool:"working",run:"active",idle:"idle"};function G(s){const n=s.split(/\s+/)[0]??"",r=n.lastIndexOf("/");return r>=0?n.slice(r+1):n}function ws(s,n=60){const r=s.split(/\s+/);if(r.length===0)return s;r[0]=G(r[0]);const c=r.join(" ");return c.length<=n?c:c.slice(0,n-1)+"…"}function Ms(s){for(const n of s){const r=G(n.command);if(r&&!(r==="sh"||r==="zsh"||r==="bash"||r==="login"))return r}return s[0]?.command?G(s[0].command):"—"}function As(s){const n=s.match(/^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+)$/);if(!n){const u=s.match(/^(\d+)$/);return u?Number.parseInt(u[1],10):0}const[,r,c,m,p]=n;let f=Number.parseInt(p,10)+Number.parseInt(m,10)*60;return c&&(f+=Number.parseInt(c,10)*3600),r&&(f+=Number.parseInt(r,10)*86400),f}function ls(s){if(s<60)return`${s}s`;if(s<3600)return`${Math.floor(s/60)}m${String(s%60).padStart(2,"0")}`;if(s<86400){const c=Math.floor(s/3600),m=Math.floor(s%3600/60);return`${c}h${String(m).padStart(2,"0")}`}const n=Math.floor(s/86400),r=Math.floor(s%86400/3600);return`${n}d${String(r).padStart(2,"0")}h`}function is(s,n){return Ns(s,n)||"—"}function $s(s){return gs(s)||"—"}function Q(s){return s?s.slice(0,8):"—"}function cs(s){return s?.trim().toLowerCase()||"unknown"}function Rs(s){return cs(s).replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Z(s){return`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${Rs(s)}`}const Ts=/permission-mode/i;function as(s){return s.kind!=="system"?!1:Ts.test(s.summary)}function J(s){return s.kind==="assistant"}function Ws(s,n,r){if(!s)return[];const c=new Map,m=new Map;for(const t of n){let l=c.get(t.pid);if(l||(l={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId||null,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},c.set(t.pid,l)),t.ts<l.firstEventAt&&(l.firstEventAt=t.ts),t.ts>=l.lastEventAt&&(l.lastEventAt=t.ts,l.lastKind=t.kind,l.lastSummary=t.summary),l.eventCount++,t.kind==="tool"&&l.toolCount++,J(t)&&l.reqCount++,as(t)&&l.permCount++,t.sessionId&&!l.sessionId&&(l.sessionId=t.sessionId),t.sessionId){let a=m.get(t.sessionId);a||(a={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},m.set(t.sessionId,a)),t.ts<a.firstEventAt&&(a.firstEventAt=t.ts),t.ts>=a.lastEventAt&&(a.lastEventAt=t.ts,a.lastKind=t.kind,a.lastSummary=t.summary),a.eventCount++,t.kind==="tool"&&a.toolCount++,J(t)&&a.reqCount++,as(t)&&a.permCount++}}const p=new Map;for(const t of s.processes){if(!t.cwd)continue;const l=Y(t.source,t.cwd),a=p.get(l);(!a||t.pid<a.pid)&&p.set(l,t)}const f=new Map,u=new Map;for(const t of s.transcripts??[]){const l=Y(t.source,t.cwd),a=os(t),j=u.get(l)??Number.NEGATIVE_INFINITY,N=f.get(l)??"";(t.mtimeMs>j||t.mtimeMs===j&&a>N)&&(u.set(l,t.mtimeMs),f.set(l,a))}const h=new Set,I=(t,l,a,j)=>{l&&h.add(l.pid);let N="idle";const w=Math.max(a?.lastEventAt??0,j?.mtimeMs??0);a&&r-a.lastEventAt<Es&&(N=a.lastKind==="tool"?"tool":"run"),N==="idle"&&r-w<6e4&&(N="run");const L=l?As(l.etime):0,D=a?.firstEventAt??null,V=a&&a.firstEventAt<a.lastEventAt?Math.min(Math.max(0,Math.round((a.lastEventAt-a.firstEventAt)/1e3)),L||Number.POSITIVE_INFINITY):0,_=l?.pid??Os(t),R=j?.cwd??l?.cwd??"";return{key:t,pid:_,ppid:l?.ppid??0,sessionId:j?.sessionId??a?.sessionId??null,transcriptPath:j?.transcriptPath??null,harness:cs(j?.source??l?.source),attribution:l?.harness??j?.harness??"unattributed",project:j?.project?.trim()||(R?Ps(R):"(unknown)"),cwd:R,command:l?.command??`${j?.source??"unknown"} transcript`,parentLabel:l?Ms(l.parentChain??[]):"transcript",procRuntimeSec:L,procEtime:l?.etime??"0",sessionStartAt:D,sessionRuntimeSec:V,status:N,lastEventAt:w||null,lastEventKind:a?.lastKind??null,lastSummary:a?.lastSummary??null,reqCount:a?.reqCount??0,toolCount:a?.toolCount??0,permCount:a?.permCount??0,eventCount:a?.eventCount??0,model:a?.model??null,tokIn:a?.tokIn??null,tokOut:a?.tokOut??null,cacheReadIn:a?.cacheReadIn??null,cacheWriteIn:a?.cacheWriteIn??null}},k=(s.transcripts??[]).map(t=>{const l=os(t),a=Y(t.source,t.cwd),j=f.get(a)===l?p.get(a)??null:null,N=t.sessionId?m.get(t.sessionId):void 0;return I(l,j,N,t)}),y=s.processes.filter(t=>!h.has(t.pid)).map(t=>I(Ls(t),t,c.get(t.pid),null));return[...k,...y]}function $(s){if(s.cacheReadIn==null||s.tokIn==null)return null;const n=s.cacheReadIn+s.tokIn;return n===0?null:s.cacheReadIn/n}function S(s){return s==null?"—":s===0?"0":s>=1e6?(s/1e6).toFixed(s>=1e7?0:1)+"M":s>=1e3?(s/1e3).toFixed(s>=1e4?0:1)+"k":String(s)}function us(s){return s==null?"—":`${Math.round(s*100)}%`}function Ps(s){if(!s)return"";const n=s.lastIndexOf("/");return n>=0?s.slice(n+1):s}function os(s){return`session:${s.source}:${s.sessionId??s.transcriptPath}`}function Ls(s){return`process:${s.source}:${s.pid}`}function Os(s){let n=2166136261;for(let r=0;r<s.length;r+=1)n^=s.charCodeAt(r),n=Math.imul(n,16777619);return-((n>>>0)%9e5+1e3)}function Y(s,n){return`${s}\0${n??""}`}function Ks(s,n,r){const c=r-Ss;let m=0;for(const u of n)J(u)&&u.ts>=c&&m++;const p={total:s.length,running:0,tooling:0,idle:0,harnesses:[],reqsPerMin:m},f=new Map;for(const u of s)u.status==="tool"?(p.tooling++,p.running++):u.status==="run"?p.running++:p.idle++,f.set(u.harness,(f.get(u.harness)??0)+1);return p.harnesses=[...f.entries()].map(([u,h])=>({harness:u,count:h})).sort((u,h)=>h.count-u.count||u.harness.localeCompare(h.harness)),p}const P={tool:0,run:1,idle:2};function A(s){return s??-1}function qs(s,n,r,c){switch(r){case"status":return(P[s.status]-P[n.status])*c;case"agent":{const m=s.harness.localeCompare(n.harness);return m!==0?m*c:(s.sessionId??"").localeCompare(n.sessionId??"")*c}case"project":return s.project.localeCompare(n.project)*c;case"reqs":return(s.reqCount-n.reqCount)*c;case"tokIn":return(A(s.tokIn)-A(n.tokIn))*c;case"tokOut":return(A(s.tokOut)-A(n.tokOut))*c;case"cache":return(A($(s))-A($(n)))*c;case"tools":return(s.toolCount-n.toolCount)*c;case"perms":return(s.permCount-n.permCount)*c;case"last":{const m=s.lastEventAt??0,p=n.lastEventAt??0;return(m-p)*c}case"runtime":return(s.sessionRuntimeSec-n.sessionRuntimeSec)*c}}function rs({values:s,color:n}){if(s.length<2)return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18"});const m=Math.max(1,...s),p=88/(s.length-1),f=s.map((u,h)=>`${(h*p).toFixed(1)},${(18-u/m*18).toFixed(1)}`).join(" ");return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18",children:e.jsx("polyline",{fill:"none",stroke:n,strokeWidth:"1.25",points:f})})}function ae(){const[s,n]=d.useState([]),[r,c]=d.useState(null),[m,p]=d.useState(()=>Date.now()),[f,u]=d.useState(""),[h,I]=d.useState(()=>new Set),[k,y]=d.useState(()=>new Set),[t,l]=d.useState({key:"status",dir:1}),[a,j]=d.useState(null),N=d.useRef([]),w=d.useRef([]),[L,D]=d.useState([]),[V,_]=d.useState([]),R=d.useCallback(o=>{n(i=>i.length>=ns?[...i.slice(i.length-ns+1),o]:[...i,o])},[]);Is(R),d.useEffect(()=>{let o=!1,i=!1;const x=async()=>{if(!(i||!U()))try{const O=await es(`/api/tail/recent?limit=${bs}`);o||(i=!0,n(O.events??[]))}catch{}};x();const E=ts(()=>{x()});return()=>{o=!0,E()}},[]);const T=d.useCallback(async()=>{if(U())try{const o=await es("/api/tail/discover");c(o)}catch{}},[]);d.useEffect(()=>{T();const o=setInterval(()=>{T()},Cs),i=ts(()=>{T()});return()=>{clearInterval(o),i()}},[T]),d.useEffect(()=>{const o=setInterval(()=>{U()&&p(Date.now())},1e3);return()=>clearInterval(o)},[]);const v=d.useMemo(()=>Ws(r,s,m),[r,s,m]),M=d.useMemo(()=>Ks(v,s,m),[v,s,m]);d.useEffect(()=>{N.current=[...N.current,M.running].slice(-24),w.current=[...w.current,M.tooling].slice(-24),D(N.current),_(w.current)},[M.running,M.tooling]);const ds=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.harness)),[...o]},[v]),ms=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.status)),[...o]},[v]),z=d.useMemo(()=>{const o=f.trim().toLowerCase();return v.filter(i=>{if(h.size>0&&!h.has(i.harness)||k.size>0&&!k.has(i.status))return!1;if(!o)return!0;const x=q[i.attribution];return`${i.pid} ${i.project} ${i.command} ${i.harness} ${i.attribution} ${x} ${i.sessionId??""} ${i.transcriptPath??""} ${i.lastSummary??""}`.toLowerCase().includes(o)})},[v,f,h,k]),B=d.useMemo(()=>t.key==="status"?void 0:(o,i)=>P[o.status]-P[i.status],[t.key]),C=d.useMemo(()=>z.map((o,i)=>({row:o,index:i})).sort((o,i)=>{const x=qs(o.row,i.row,t.key,t.dir);if(x!==0)return x;const E=B?.(o.row,i.row)??0;return E!==0?E:o.index-i.index}).map(o=>o.row),[z,t,B]);d.useEffect(()=>{a!=null&&(v.some(o=>o.key===a)||j(null))},[v,a]),d.useEffect(()=>{const o=i=>{const x=i.target,E=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||(x?.isContentEditable??!1);if(i.key==="Escape"&&a!=null){i.preventDefault(),j(null);return}if(E)return;const O=i.key==="j"||i.key==="ArrowDown",js=i.key==="k"||i.key==="ArrowUp";if(O||js){if(C.length===0)return;i.preventDefault();const K=C.findIndex(ks=>ks.key===a),ss=O?C[Math.min(C.length-1,K<0?0:K+1)]:C[Math.max(0,K<0?0:K-1)];ss&&j(ss.key);return}if(i.key==="Enter"&&a!=null){i.preventDefault();return}};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[C,a]);const ps=o=>{I(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},hs=o=>{y(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},g=d.useMemo(()=>a!=null?v.find(o=>o.key===a)??null:null,[v,a]),fs=d.useMemo(()=>g?r?.processes.find(o=>o.pid===g.pid)??null:null,[r,g]),xs=d.useMemo(()=>g?s.filter(o=>g.sessionId?o.sessionId===g.sessionId:o.pid===g.pid).slice(-40):[],[s,g]);return e.jsxs("div",{className:"s-atop",children:[e.jsx(Hs,{summary:M,runHistory:L,toolHistory:V}),e.jsx(vs,{title:"Harness families",size:"compact",maxAgents:6,maxTasks:3,showEmpty:!0}),e.jsx(Fs,{search:f,onSearch:u,harnessOptions:ds,harnessFilter:h,onToggleHarness:ps,statusOptions:ms,statusFilter:k,onToggleStatus:hs,summary:M}),e.jsx(ys,{rows:z,columns:Ds,rowId:o=>o.key,storageKey:"openscout.atop.cols",sort:t,onSortChange:l,secondarySort:B,onRowClick:o=>j(o.key),rowClassName:o=>a===o.key?"s-atop-row--selected":void 0,empty:{title:"no agents match",body:"adjust filters or start a session to populate"},density:"compact",className:"s-atop-data-table",ariaLabel:"Agent activity inventory"}),e.jsx(_s,{shown:C.length,total:v.length,hasSelection:a!=null}),g&&e.jsx(zs,{row:g,process:fs,events:xs,now:m,onClose:()=>j(null)})]})}function Hs({summary:s,runHistory:n,toolHistory:r}){return e.jsxs("div",{className:"s-atop-summary",children:[e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--primary",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.running}),e.jsxs("span",{className:"s-atop-summary-of",children:["/ ",s.total]})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"active"}),e.jsx(rs,{values:n,color:"var(--green)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.tooling})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"working"}),e.jsx(rs,{values:r,color:"var(--accent)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.idle})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"idle"})]}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--breakdown",children:[e.jsx("span",{className:"s-atop-summary-lbl",children:"harness"}),e.jsx("div",{className:"s-atop-summary-row",children:s.harnesses.length>0?s.harnesses.slice(0,4).map(c=>e.jsxs("span",{className:Z(c.harness),children:[e.jsx(H,{harness:c.harness,size:11,title:null}),F(c.harness)," ",c.count]},c.harness)):e.jsx("span",{className:"s-atop-chip s-atop-chip--mute",children:"none"})})]}),e.jsx("div",{className:"s-atop-summary-spacer"}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--rate",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.reqsPerMin}),e.jsx("span",{className:"s-atop-summary-of",children:"/ min"})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"requests"})]})]})}function Fs({search:s,onSearch:n,harnessOptions:r,harnessFilter:c,onToggleHarness:m,statusOptions:p,statusFilter:f,onToggleStatus:u,summary:h}){const I=t=>h.harnesses.find(l=>l.harness===t)?.count??0,k=t=>t==="tool"?h.tooling:t==="run"?h.running-h.tooling:h.idle,y=d.useRef(null);return d.useEffect(()=>{const t=l=>{if(l.key!=="/")return;const a=l.target;a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1)||(l.preventDefault(),y.current?.focus())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),e.jsxs("div",{className:"s-atop-fbar",children:[e.jsxs("div",{className:"s-atop-search",children:[e.jsx("span",{className:"s-atop-search-prompt",children:"▸"}),e.jsx("input",{ref:y,className:"s-atop-search-input",value:s,onChange:t=>n(t.target.value),placeholder:"filter by pid · project · command · summary",spellCheck:!1}),e.jsx("span",{className:"s-atop-search-kbd",children:"/"})]}),r.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"harness"}),r.map(t=>{const l=c.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--harness${l?" s-atop-pill--on":""}`,onClick:()=>m(t),children:[e.jsx(H,{harness:t,size:11,title:null}),F(t),e.jsx("span",{className:"s-atop-pill-ct",children:I(t)})]},t)})]}),p.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"status"}),["tool","run","idle"].filter(t=>p.includes(t)).map(t=>{const l=f.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--status-${t}${l?" s-atop-pill--on":""}`,onClick:()=>u(t),children:[X[t],e.jsx("span",{className:"s-atop-pill-ct",children:k(t)})]},t)})]}),e.jsx("div",{className:"s-atop-fbar-spacer"})]})}const Ds=[{key:"status",label:"Status",cls:"s-atop-col-status",kind:"text",defaultWidth:96,minWidth:70,sortValue:s=>P[s.status],render:s=>e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]})},{key:"agent",label:"Agent",cls:"s-atop-col-agent",kind:"text",tip:"Harness · short session id",defaultWidth:168,minWidth:110,sortValue:s=>`${s.harness}\0${s.sessionId??""}`,render:s=>e.jsxs("div",{className:"s-atop-agent-cell",children:[e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsx("span",{className:"s-atop-agent-id",title:s.sessionId??`pid ${s.pid}`,children:Q(s.sessionId)})]})},{key:"project",label:"Project",cls:"s-atop-col-project",kind:"text",defaultWidth:200,minWidth:96,maxWidth:480,sortValue:s=>s.project,render:s=>e.jsx("span",{title:s.cwd,children:s.project})},{key:"reqs",label:"Reqs",cls:"s-atop-col-num",kind:"number",tip:"Model invocations (assistant turns) for this session",defaultWidth:64,minWidth:56,sortValue:s=>s.reqCount,render:s=>e.jsx(W,{value:s.reqCount||null})},{key:"tokIn",label:"Tok ↓",cls:"s-atop-col-num",kind:"number",tip:"Input tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokIn,render:s=>e.jsx(W,{value:s.tokIn})},{key:"tokOut",label:"Tok ↑",cls:"s-atop-col-num",kind:"number",tip:"Output tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokOut,render:s=>e.jsx(W,{value:s.tokOut})},{key:"cache",label:"Cache",cls:"s-atop-col-num",kind:"number",tip:"Cache hit rate — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>$(s),render:s=>e.jsx(Vs,{value:$(s)})},{key:"tools",label:"Tools",cls:"s-atop-col-num",kind:"number",defaultWidth:64,minWidth:56,sortValue:s=>s.toolCount,render:s=>e.jsx(W,{value:s.toolCount||null})},{key:"perms",label:"Perms",cls:"s-atop-col-num",kind:"number",tip:"Permission requests — heuristic count of permission-mode events",defaultWidth:64,minWidth:56,sortValue:s=>s.permCount,render:s=>e.jsx(W,{value:s.permCount||null,accent:s.permCount>0?"amber":void 0})},{key:"last",label:"Last",cls:"s-atop-col-last",kind:"time",defaultWidth:86,minWidth:64,sortValue:s=>s.lastEventAt,render:s=>is(s.lastEventAt,Date.now())},{key:"runtime",label:"Runtime",cls:"s-atop-col-runtime",kind:"number",tip:"Session duration (active period in current buffer)",defaultWidth:80,minWidth:64,sortValue:s=>s.sessionRuntimeSec,render:s=>ls(s.sessionRuntimeSec)}];function W({value:s,accent:n}){const r=s==null?"s-atop-col-num s-atop-col-num--dim":`s-atop-col-num${n?` s-atop-col-num--${n}`:""}`;return e.jsx("span",{className:r,children:S(s)})}function Vs({value:s}){const n=s==null?"s-atop-col-num s-atop-col-num--dim":"s-atop-col-num";return e.jsx("span",{className:n,children:us(s)})}function _s({shown:s,total:n,hasSelection:r}){return e.jsxs("div",{className:"s-atop-keys",children:[e.jsxs("span",{className:"s-atop-keys-count",children:[e.jsx("strong",{children:s})," / ",n," agents"]}),e.jsx("span",{className:"s-atop-keys-spacer"}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"click"})," drill in"]}),r&&e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," close"]})]})}function zs({row:s,process:n,events:r,now:c,onClose:m}){const p=d.useMemo(()=>{const u={};for(const k of r){if(k.kind!=="tool")continue;const y=k.summary.match(/^([a-z_][a-z0-9_]*)/i),t=y?y[1]:"(tool)";u[t]=(u[t]??0)+1}const h=Object.entries(u).sort((k,y)=>y[1]-k[1]).slice(0,6),I=Math.max(1,...h.map(k=>k[1]));return h.map(([k,y])=>({name:k,count:y,frac:y/I}))},[r]),f=r.slice(-40).reverse();return e.jsxs("aside",{className:"s-atop-drawer","aria-label":`Agent ${s.key}`,children:[e.jsxs("header",{className:"s-atop-drawer-head",children:[e.jsxs("div",{className:"s-atop-drawer-head-meta",children:[e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]}),e.jsx("span",{className:"s-atop-drawer-pid",children:s.pid>0?`pid ${s.pid}`:"transcript"}),e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsxs("span",{className:"s-atop-drawer-session",children:["session ",Q(s.sessionId)]})]}),e.jsx("h2",{className:"s-atop-drawer-title",children:s.project}),e.jsxs("p",{className:"s-atop-drawer-sub",children:["session ",Q(s.sessionId)," · runtime ",ls(s.sessionRuntimeSec)," · last activity ",is(s.lastEventAt,c)]}),e.jsx("button",{className:"s-atop-drawer-close",onClick:m,"aria-label":"Close (Esc)",children:"✕"})]}),e.jsxs("div",{className:"s-atop-drawer-body",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Activity"}),e.jsxs("div",{className:"s-atop-metrics",children:[e.jsx(b,{label:"Requests",value:S(s.reqCount||null)}),e.jsx(b,{label:"Tools",value:S(s.toolCount||null)}),e.jsx(b,{label:"Permissions",value:S(s.permCount||null),accent:s.permCount>0?"amber":void 0}),e.jsx(b,{label:"Tok in",value:S(s.tokIn),dim:s.tokIn==null}),e.jsx(b,{label:"Tok out",value:S(s.tokOut),dim:s.tokOut==null}),e.jsx(b,{label:"Cache hit",value:us($(s)),dim:$(s)==null}),e.jsx(b,{label:"Model",value:s.model??"—",dim:s.model==null}),e.jsx(b,{label:"Events",value:S(s.eventCount||null)})]})]}),p.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Tool calls"}),e.jsx("ul",{className:"s-atop-histo",children:p.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-histo-name",children:u.name}),e.jsx("span",{className:"s-atop-histo-bar",children:e.jsx("span",{className:"s-atop-histo-fill",style:{width:`${(u.frac*100).toFixed(1)}%`}})}),e.jsx("span",{className:"s-atop-histo-count",children:u.count})]},u.name))})]}),e.jsxs("section",{children:[e.jsxs("h3",{className:"s-atop-drawer-h3",children:["Recent activity",e.jsxs("span",{className:"s-atop-drawer-h3-aside",children:[r.length," buffered"]})]}),f.length===0?e.jsx("div",{className:"s-atop-peek-empty",children:"no events buffered for this agent yet"}):e.jsx("ol",{className:"s-atop-peek",children:f.map(u=>e.jsxs("li",{className:`s-atop-peek-row s-atop-peek-row--${u.kind}`,children:[e.jsx("span",{className:"s-atop-peek-time",children:$s(u.ts)}),e.jsx("span",{className:"s-atop-peek-kind",children:u.kind}),e.jsx("span",{className:"s-atop-peek-text",children:u.summary})]},u.id))})]}),e.jsxs("section",{className:"s-atop-drawer-section--secondary",children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Process"}),e.jsx("code",{className:"s-atop-codeblock",children:s.command}),e.jsxs("dl",{className:"s-atop-kvs",children:[e.jsx("dt",{children:"PID"}),e.jsx("dd",{children:s.pid>0?s.pid:"transcript-only"}),e.jsx("dt",{children:"Parent"}),e.jsxs("dd",{children:[s.parentLabel," (ppid ",s.ppid,")"]}),e.jsx("dt",{children:"Process etime"}),e.jsx("dd",{children:s.procEtime}),s.transcriptPath&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Transcript"}),e.jsx("dd",{children:s.transcriptPath})]}),e.jsx("dt",{children:"Origin"}),e.jsx("dd",{children:q[s.attribution]}),e.jsx("dt",{children:"CWD"}),e.jsx("dd",{children:s.cwd||"(none)"})]}),n?.parentChain&&n.parentChain.length>0&&e.jsx("ol",{className:"s-atop-chain",children:n.parentChain.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-chain-pid",children:u.pid}),e.jsx("span",{className:"s-atop-chain-cmd",children:ws(u.command,80)})]},u.pid))})]})]})]})}function b({label:s,value:n,dim:r,accent:c}){const m=`s-atop-metric${r?" s-atop-metric--dim":""}${c?` s-atop-metric--${c}`:""}`;return e.jsxs("div",{className:m,children:[e.jsx("span",{className:"s-atop-metric-lbl",children:s}),e.jsx("span",{className:"s-atop-metric-val",children:n})]})}export{ae as AtopView};
|
|
1
|
+
import{r as d,j as e}from"./index-C1VaWNuD.js";/* empty css */import{D as ys}from"./DataTable-C6aMSilS.js";import{H,h as F}from"./HarnessMark-DttReffF.js";import{O as vs}from"./ObservedTopologyPanel-CJVqIqQ2.js";import{a as es}from"./api-Co9aQ2Jw.js";import{o as ts,i as U}from"./surface-activity-B1rgWB1i.js";import{a as Ns,d as gs}from"./time-Dhsh_2EG.js";import{u as Is}from"./tail-events-LK29oCKm.js";/* empty css */import"./perf-PX8Rx0EP.js";import"./index-BWHgHrtv.js";const ns=4e3,bs=500,Cs=5e3,Es=5e3,Ss=6e4,q={"scout-managed":"scout","hudson-managed":"hudson",unattributed:"native"},X={tool:"working",run:"active",idle:"idle"};function G(s){const n=s.split(/\s+/)[0]??"",r=n.lastIndexOf("/");return r>=0?n.slice(r+1):n}function ws(s,n=60){const r=s.split(/\s+/);if(r.length===0)return s;r[0]=G(r[0]);const c=r.join(" ");return c.length<=n?c:c.slice(0,n-1)+"…"}function Ms(s){for(const n of s){const r=G(n.command);if(r&&!(r==="sh"||r==="zsh"||r==="bash"||r==="login"))return r}return s[0]?.command?G(s[0].command):"—"}function As(s){const n=s.match(/^(?:(\d+)-)?(?:(\d+):)?(\d+):(\d+)$/);if(!n){const u=s.match(/^(\d+)$/);return u?Number.parseInt(u[1],10):0}const[,r,c,m,p]=n;let f=Number.parseInt(p,10)+Number.parseInt(m,10)*60;return c&&(f+=Number.parseInt(c,10)*3600),r&&(f+=Number.parseInt(r,10)*86400),f}function ls(s){if(s<60)return`${s}s`;if(s<3600)return`${Math.floor(s/60)}m${String(s%60).padStart(2,"0")}`;if(s<86400){const c=Math.floor(s/3600),m=Math.floor(s%3600/60);return`${c}h${String(m).padStart(2,"0")}`}const n=Math.floor(s/86400),r=Math.floor(s%86400/3600);return`${n}d${String(r).padStart(2,"0")}h`}function is(s,n){return Ns(s,n)||"—"}function $s(s){return gs(s)||"—"}function Q(s){return s?s.slice(0,8):"—"}function cs(s){return s?.trim().toLowerCase()||"unknown"}function Rs(s){return cs(s).replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"")||"unknown"}function Z(s){return`s-atop-chip s-atop-chip--harness s-atop-chip--harness-${Rs(s)}`}const Ts=/permission-mode/i;function as(s){return s.kind!=="system"?!1:Ts.test(s.summary)}function J(s){return s.kind==="assistant"}function Ws(s,n,r){if(!s)return[];const c=new Map,m=new Map;for(const t of n){let l=c.get(t.pid);if(l||(l={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId||null,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},c.set(t.pid,l)),t.ts<l.firstEventAt&&(l.firstEventAt=t.ts),t.ts>=l.lastEventAt&&(l.lastEventAt=t.ts,l.lastKind=t.kind,l.lastSummary=t.summary),l.eventCount++,t.kind==="tool"&&l.toolCount++,J(t)&&l.reqCount++,as(t)&&l.permCount++,t.sessionId&&!l.sessionId&&(l.sessionId=t.sessionId),t.sessionId){let a=m.get(t.sessionId);a||(a={firstEventAt:t.ts,lastEventAt:t.ts,lastKind:t.kind,lastSummary:t.summary,reqCount:0,toolCount:0,permCount:0,eventCount:0,sessionId:t.sessionId,model:null,tokIn:null,tokOut:null,cacheReadIn:null,cacheWriteIn:null},m.set(t.sessionId,a)),t.ts<a.firstEventAt&&(a.firstEventAt=t.ts),t.ts>=a.lastEventAt&&(a.lastEventAt=t.ts,a.lastKind=t.kind,a.lastSummary=t.summary),a.eventCount++,t.kind==="tool"&&a.toolCount++,J(t)&&a.reqCount++,as(t)&&a.permCount++}}const p=new Map;for(const t of s.processes){if(!t.cwd)continue;const l=Y(t.source,t.cwd),a=p.get(l);(!a||t.pid<a.pid)&&p.set(l,t)}const f=new Map,u=new Map;for(const t of s.transcripts??[]){const l=Y(t.source,t.cwd),a=os(t),j=u.get(l)??Number.NEGATIVE_INFINITY,N=f.get(l)??"";(t.mtimeMs>j||t.mtimeMs===j&&a>N)&&(u.set(l,t.mtimeMs),f.set(l,a))}const h=new Set,I=(t,l,a,j)=>{l&&h.add(l.pid);let N="idle";const w=Math.max(a?.lastEventAt??0,j?.mtimeMs??0);a&&r-a.lastEventAt<Es&&(N=a.lastKind==="tool"?"tool":"run"),N==="idle"&&r-w<6e4&&(N="run");const L=l?As(l.etime):0,D=a?.firstEventAt??null,V=a&&a.firstEventAt<a.lastEventAt?Math.min(Math.max(0,Math.round((a.lastEventAt-a.firstEventAt)/1e3)),L||Number.POSITIVE_INFINITY):0,_=l?.pid??Os(t),R=j?.cwd??l?.cwd??"";return{key:t,pid:_,ppid:l?.ppid??0,sessionId:j?.sessionId??a?.sessionId??null,transcriptPath:j?.transcriptPath??null,harness:cs(j?.source??l?.source),attribution:l?.harness??j?.harness??"unattributed",project:j?.project?.trim()||(R?Ps(R):"(unknown)"),cwd:R,command:l?.command??`${j?.source??"unknown"} transcript`,parentLabel:l?Ms(l.parentChain??[]):"transcript",procRuntimeSec:L,procEtime:l?.etime??"0",sessionStartAt:D,sessionRuntimeSec:V,status:N,lastEventAt:w||null,lastEventKind:a?.lastKind??null,lastSummary:a?.lastSummary??null,reqCount:a?.reqCount??0,toolCount:a?.toolCount??0,permCount:a?.permCount??0,eventCount:a?.eventCount??0,model:a?.model??null,tokIn:a?.tokIn??null,tokOut:a?.tokOut??null,cacheReadIn:a?.cacheReadIn??null,cacheWriteIn:a?.cacheWriteIn??null}},k=(s.transcripts??[]).map(t=>{const l=os(t),a=Y(t.source,t.cwd),j=f.get(a)===l?p.get(a)??null:null,N=t.sessionId?m.get(t.sessionId):void 0;return I(l,j,N,t)}),y=s.processes.filter(t=>!h.has(t.pid)).map(t=>I(Ls(t),t,c.get(t.pid),null));return[...k,...y]}function $(s){if(s.cacheReadIn==null||s.tokIn==null)return null;const n=s.cacheReadIn+s.tokIn;return n===0?null:s.cacheReadIn/n}function S(s){return s==null?"—":s===0?"0":s>=1e6?(s/1e6).toFixed(s>=1e7?0:1)+"M":s>=1e3?(s/1e3).toFixed(s>=1e4?0:1)+"k":String(s)}function us(s){return s==null?"—":`${Math.round(s*100)}%`}function Ps(s){if(!s)return"";const n=s.lastIndexOf("/");return n>=0?s.slice(n+1):s}function os(s){return`session:${s.source}:${s.sessionId??s.transcriptPath}`}function Ls(s){return`process:${s.source}:${s.pid}`}function Os(s){let n=2166136261;for(let r=0;r<s.length;r+=1)n^=s.charCodeAt(r),n=Math.imul(n,16777619);return-((n>>>0)%9e5+1e3)}function Y(s,n){return`${s}\0${n??""}`}function Ks(s,n,r){const c=r-Ss;let m=0;for(const u of n)J(u)&&u.ts>=c&&m++;const p={total:s.length,running:0,tooling:0,idle:0,harnesses:[],reqsPerMin:m},f=new Map;for(const u of s)u.status==="tool"?(p.tooling++,p.running++):u.status==="run"?p.running++:p.idle++,f.set(u.harness,(f.get(u.harness)??0)+1);return p.harnesses=[...f.entries()].map(([u,h])=>({harness:u,count:h})).sort((u,h)=>h.count-u.count||u.harness.localeCompare(h.harness)),p}const P={tool:0,run:1,idle:2};function A(s){return s??-1}function qs(s,n,r,c){switch(r){case"status":return(P[s.status]-P[n.status])*c;case"agent":{const m=s.harness.localeCompare(n.harness);return m!==0?m*c:(s.sessionId??"").localeCompare(n.sessionId??"")*c}case"project":return s.project.localeCompare(n.project)*c;case"reqs":return(s.reqCount-n.reqCount)*c;case"tokIn":return(A(s.tokIn)-A(n.tokIn))*c;case"tokOut":return(A(s.tokOut)-A(n.tokOut))*c;case"cache":return(A($(s))-A($(n)))*c;case"tools":return(s.toolCount-n.toolCount)*c;case"perms":return(s.permCount-n.permCount)*c;case"last":{const m=s.lastEventAt??0,p=n.lastEventAt??0;return(m-p)*c}case"runtime":return(s.sessionRuntimeSec-n.sessionRuntimeSec)*c}}function rs({values:s,color:n}){if(s.length<2)return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18"});const m=Math.max(1,...s),p=88/(s.length-1),f=s.map((u,h)=>`${(h*p).toFixed(1)},${(18-u/m*18).toFixed(1)}`).join(" ");return e.jsx("svg",{className:"s-atop-spark",width:88,height:18,viewBox:"0 0 88 18",children:e.jsx("polyline",{fill:"none",stroke:n,strokeWidth:"1.25",points:f})})}function ae(){const[s,n]=d.useState([]),[r,c]=d.useState(null),[m,p]=d.useState(()=>Date.now()),[f,u]=d.useState(""),[h,I]=d.useState(()=>new Set),[k,y]=d.useState(()=>new Set),[t,l]=d.useState({key:"status",dir:1}),[a,j]=d.useState(null),N=d.useRef([]),w=d.useRef([]),[L,D]=d.useState([]),[V,_]=d.useState([]),R=d.useCallback(o=>{n(i=>i.length>=ns?[...i.slice(i.length-ns+1),o]:[...i,o])},[]);Is(R),d.useEffect(()=>{let o=!1,i=!1;const x=async()=>{if(!(i||!U()))try{const O=await es(`/api/tail/recent?limit=${bs}`);o||(i=!0,n(O.events??[]))}catch{}};x();const E=ts(()=>{x()});return()=>{o=!0,E()}},[]);const T=d.useCallback(async()=>{if(U())try{const o=await es("/api/tail/discover");c(o)}catch{}},[]);d.useEffect(()=>{T();const o=setInterval(()=>{T()},Cs),i=ts(()=>{T()});return()=>{clearInterval(o),i()}},[T]),d.useEffect(()=>{const o=setInterval(()=>{U()&&p(Date.now())},1e3);return()=>clearInterval(o)},[]);const v=d.useMemo(()=>Ws(r,s,m),[r,s,m]),M=d.useMemo(()=>Ks(v,s,m),[v,s,m]);d.useEffect(()=>{N.current=[...N.current,M.running].slice(-24),w.current=[...w.current,M.tooling].slice(-24),D(N.current),_(w.current)},[M.running,M.tooling]);const ds=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.harness)),[...o]},[v]),ms=d.useMemo(()=>{const o=new Set;return v.forEach(i=>o.add(i.status)),[...o]},[v]),z=d.useMemo(()=>{const o=f.trim().toLowerCase();return v.filter(i=>{if(h.size>0&&!h.has(i.harness)||k.size>0&&!k.has(i.status))return!1;if(!o)return!0;const x=q[i.attribution];return`${i.pid} ${i.project} ${i.command} ${i.harness} ${i.attribution} ${x} ${i.sessionId??""} ${i.transcriptPath??""} ${i.lastSummary??""}`.toLowerCase().includes(o)})},[v,f,h,k]),B=d.useMemo(()=>t.key==="status"?void 0:(o,i)=>P[o.status]-P[i.status],[t.key]),C=d.useMemo(()=>z.map((o,i)=>({row:o,index:i})).sort((o,i)=>{const x=qs(o.row,i.row,t.key,t.dir);if(x!==0)return x;const E=B?.(o.row,i.row)??0;return E!==0?E:o.index-i.index}).map(o=>o.row),[z,t,B]);d.useEffect(()=>{a!=null&&(v.some(o=>o.key===a)||j(null))},[v,a]),d.useEffect(()=>{const o=i=>{const x=i.target,E=x instanceof HTMLInputElement||x instanceof HTMLTextAreaElement||(x?.isContentEditable??!1);if(i.key==="Escape"&&a!=null){i.preventDefault(),j(null);return}if(E)return;const O=i.key==="j"||i.key==="ArrowDown",js=i.key==="k"||i.key==="ArrowUp";if(O||js){if(C.length===0)return;i.preventDefault();const K=C.findIndex(ks=>ks.key===a),ss=O?C[Math.min(C.length-1,K<0?0:K+1)]:C[Math.max(0,K<0?0:K-1)];ss&&j(ss.key);return}if(i.key==="Enter"&&a!=null){i.preventDefault();return}};return window.addEventListener("keydown",o),()=>window.removeEventListener("keydown",o)},[C,a]);const ps=o=>{I(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},hs=o=>{y(i=>{const x=new Set(i);return x.has(o)?x.delete(o):x.add(o),x})},g=d.useMemo(()=>a!=null?v.find(o=>o.key===a)??null:null,[v,a]),fs=d.useMemo(()=>g?r?.processes.find(o=>o.pid===g.pid)??null:null,[r,g]),xs=d.useMemo(()=>g?s.filter(o=>g.sessionId?o.sessionId===g.sessionId:o.pid===g.pid).slice(-40):[],[s,g]);return e.jsxs("div",{className:"s-atop",children:[e.jsx(Hs,{summary:M,runHistory:L,toolHistory:V}),e.jsx(vs,{title:"Harness families",size:"compact",maxAgents:6,maxTasks:3,showEmpty:!0}),e.jsx(Fs,{search:f,onSearch:u,harnessOptions:ds,harnessFilter:h,onToggleHarness:ps,statusOptions:ms,statusFilter:k,onToggleStatus:hs,summary:M}),e.jsx(ys,{rows:z,columns:Ds,rowId:o=>o.key,storageKey:"openscout.atop.cols",sort:t,onSortChange:l,secondarySort:B,onRowClick:o=>j(o.key),rowClassName:o=>a===o.key?"s-atop-row--selected":void 0,empty:{title:"no agents match",body:"adjust filters or start a session to populate"},density:"compact",className:"s-atop-data-table",ariaLabel:"Agent activity inventory"}),e.jsx(_s,{shown:C.length,total:v.length,hasSelection:a!=null}),g&&e.jsx(zs,{row:g,process:fs,events:xs,now:m,onClose:()=>j(null)})]})}function Hs({summary:s,runHistory:n,toolHistory:r}){return e.jsxs("div",{className:"s-atop-summary",children:[e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--primary",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.running}),e.jsxs("span",{className:"s-atop-summary-of",children:["/ ",s.total]})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"active"}),e.jsx(rs,{values:n,color:"var(--green)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.tooling})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"working"}),e.jsx(rs,{values:r,color:"var(--accent)"})]}),e.jsxs("div",{className:"s-atop-summary-cell",children:[e.jsx("div",{className:"s-atop-summary-num",children:e.jsx("strong",{children:s.idle})}),e.jsx("span",{className:"s-atop-summary-lbl",children:"idle"})]}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--breakdown",children:[e.jsx("span",{className:"s-atop-summary-lbl",children:"harness"}),e.jsx("div",{className:"s-atop-summary-row",children:s.harnesses.length>0?s.harnesses.slice(0,4).map(c=>e.jsxs("span",{className:Z(c.harness),children:[e.jsx(H,{harness:c.harness,size:11,title:null}),F(c.harness)," ",c.count]},c.harness)):e.jsx("span",{className:"s-atop-chip s-atop-chip--mute",children:"none"})})]}),e.jsx("div",{className:"s-atop-summary-spacer"}),e.jsxs("div",{className:"s-atop-summary-cell s-atop-summary-cell--rate",children:[e.jsxs("div",{className:"s-atop-summary-num",children:[e.jsx("strong",{children:s.reqsPerMin}),e.jsx("span",{className:"s-atop-summary-of",children:"/ min"})]}),e.jsx("span",{className:"s-atop-summary-lbl",children:"requests"})]})]})}function Fs({search:s,onSearch:n,harnessOptions:r,harnessFilter:c,onToggleHarness:m,statusOptions:p,statusFilter:f,onToggleStatus:u,summary:h}){const I=t=>h.harnesses.find(l=>l.harness===t)?.count??0,k=t=>t==="tool"?h.tooling:t==="run"?h.running-h.tooling:h.idle,y=d.useRef(null);return d.useEffect(()=>{const t=l=>{if(l.key!=="/")return;const a=l.target;a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1)||(l.preventDefault(),y.current?.focus())};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[]),e.jsxs("div",{className:"s-atop-fbar",children:[e.jsxs("div",{className:"s-atop-search",children:[e.jsx("span",{className:"s-atop-search-prompt",children:"▸"}),e.jsx("input",{ref:y,className:"s-atop-search-input",value:s,onChange:t=>n(t.target.value),placeholder:"filter by pid · project · command · summary",spellCheck:!1}),e.jsx("span",{className:"s-atop-search-kbd",children:"/"})]}),r.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"harness"}),r.map(t=>{const l=c.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--harness${l?" s-atop-pill--on":""}`,onClick:()=>m(t),children:[e.jsx(H,{harness:t,size:11,title:null}),F(t),e.jsx("span",{className:"s-atop-pill-ct",children:I(t)})]},t)})]}),p.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"status"}),["tool","run","idle"].filter(t=>p.includes(t)).map(t=>{const l=f.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--status-${t}${l?" s-atop-pill--on":""}`,onClick:()=>u(t),children:[X[t],e.jsx("span",{className:"s-atop-pill-ct",children:k(t)})]},t)})]}),e.jsx("div",{className:"s-atop-fbar-spacer"})]})}const Ds=[{key:"status",label:"Status",cls:"s-atop-col-status",kind:"text",defaultWidth:96,minWidth:70,sortValue:s=>P[s.status],render:s=>e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]})},{key:"agent",label:"Agent",cls:"s-atop-col-agent",kind:"text",tip:"Harness · short session id",defaultWidth:168,minWidth:110,sortValue:s=>`${s.harness}\0${s.sessionId??""}`,render:s=>e.jsxs("div",{className:"s-atop-agent-cell",children:[e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsx("span",{className:"s-atop-agent-id",title:s.sessionId??`pid ${s.pid}`,children:Q(s.sessionId)})]})},{key:"project",label:"Project",cls:"s-atop-col-project",kind:"text",defaultWidth:200,minWidth:96,maxWidth:480,sortValue:s=>s.project,render:s=>e.jsx("span",{title:s.cwd,children:s.project})},{key:"reqs",label:"Reqs",cls:"s-atop-col-num",kind:"number",tip:"Model invocations (assistant turns) for this session",defaultWidth:64,minWidth:56,sortValue:s=>s.reqCount,render:s=>e.jsx(W,{value:s.reqCount||null})},{key:"tokIn",label:"Tok ↓",cls:"s-atop-col-num",kind:"number",tip:"Input tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokIn,render:s=>e.jsx(W,{value:s.tokIn})},{key:"tokOut",label:"Tok ↑",cls:"s-atop-col-num",kind:"number",tip:"Output tokens — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>s.tokOut,render:s=>e.jsx(W,{value:s.tokOut})},{key:"cache",label:"Cache",cls:"s-atop-col-num",kind:"number",tip:"Cache hit rate — populated when backend emits usage",defaultWidth:64,minWidth:56,sortValue:s=>$(s),render:s=>e.jsx(Vs,{value:$(s)})},{key:"tools",label:"Tools",cls:"s-atop-col-num",kind:"number",defaultWidth:64,minWidth:56,sortValue:s=>s.toolCount,render:s=>e.jsx(W,{value:s.toolCount||null})},{key:"perms",label:"Perms",cls:"s-atop-col-num",kind:"number",tip:"Permission requests — heuristic count of permission-mode events",defaultWidth:64,minWidth:56,sortValue:s=>s.permCount,render:s=>e.jsx(W,{value:s.permCount||null,accent:s.permCount>0?"amber":void 0})},{key:"last",label:"Last",cls:"s-atop-col-last",kind:"time",defaultWidth:86,minWidth:64,sortValue:s=>s.lastEventAt,render:s=>is(s.lastEventAt,Date.now())},{key:"runtime",label:"Runtime",cls:"s-atop-col-runtime",kind:"number",tip:"Session duration (active period in current buffer)",defaultWidth:80,minWidth:64,sortValue:s=>s.sessionRuntimeSec,render:s=>ls(s.sessionRuntimeSec)}];function W({value:s,accent:n}){const r=s==null?"s-atop-col-num s-atop-col-num--dim":`s-atop-col-num${n?` s-atop-col-num--${n}`:""}`;return e.jsx("span",{className:r,children:S(s)})}function Vs({value:s}){const n=s==null?"s-atop-col-num s-atop-col-num--dim":"s-atop-col-num";return e.jsx("span",{className:n,children:us(s)})}function _s({shown:s,total:n,hasSelection:r}){return e.jsxs("div",{className:"s-atop-keys",children:[e.jsxs("span",{className:"s-atop-keys-count",children:[e.jsx("strong",{children:s})," / ",n," agents"]}),e.jsx("span",{className:"s-atop-keys-spacer"}),e.jsxs("span",{children:[e.jsx("kbd",{children:"/"})," filter"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"j"}),"/",e.jsx("kbd",{children:"k"})," select"]}),e.jsxs("span",{children:[e.jsx("kbd",{children:"click"})," drill in"]}),r&&e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," close"]})]})}function zs({row:s,process:n,events:r,now:c,onClose:m}){const p=d.useMemo(()=>{const u={};for(const k of r){if(k.kind!=="tool")continue;const y=k.summary.match(/^([a-z_][a-z0-9_]*)/i),t=y?y[1]:"(tool)";u[t]=(u[t]??0)+1}const h=Object.entries(u).sort((k,y)=>y[1]-k[1]).slice(0,6),I=Math.max(1,...h.map(k=>k[1]));return h.map(([k,y])=>({name:k,count:y,frac:y/I}))},[r]),f=r.slice(-40).reverse();return e.jsxs("aside",{className:"s-atop-drawer","aria-label":`Agent ${s.key}`,children:[e.jsxs("header",{className:"s-atop-drawer-head",children:[e.jsxs("div",{className:"s-atop-drawer-head-meta",children:[e.jsxs("span",{className:`s-atop-status s-atop-status--${s.status}`,children:[e.jsx("span",{className:"s-atop-status-dot"}),X[s.status]]}),e.jsx("span",{className:"s-atop-drawer-pid",children:s.pid>0?`pid ${s.pid}`:"transcript"}),e.jsxs("span",{className:Z(s.harness),title:`origin: ${q[s.attribution]}`,children:[e.jsx(H,{harness:s.harness,size:11,title:null}),F(s.harness)]}),e.jsxs("span",{className:"s-atop-drawer-session",children:["session ",Q(s.sessionId)]})]}),e.jsx("h2",{className:"s-atop-drawer-title",children:s.project}),e.jsxs("p",{className:"s-atop-drawer-sub",children:["session ",Q(s.sessionId)," · runtime ",ls(s.sessionRuntimeSec)," · last activity ",is(s.lastEventAt,c)]}),e.jsx("button",{className:"s-atop-drawer-close",onClick:m,"aria-label":"Close (Esc)",children:"✕"})]}),e.jsxs("div",{className:"s-atop-drawer-body",children:[e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Activity"}),e.jsxs("div",{className:"s-atop-metrics",children:[e.jsx(b,{label:"Requests",value:S(s.reqCount||null)}),e.jsx(b,{label:"Tools",value:S(s.toolCount||null)}),e.jsx(b,{label:"Permissions",value:S(s.permCount||null),accent:s.permCount>0?"amber":void 0}),e.jsx(b,{label:"Tok in",value:S(s.tokIn),dim:s.tokIn==null}),e.jsx(b,{label:"Tok out",value:S(s.tokOut),dim:s.tokOut==null}),e.jsx(b,{label:"Cache hit",value:us($(s)),dim:$(s)==null}),e.jsx(b,{label:"Model",value:s.model??"—",dim:s.model==null}),e.jsx(b,{label:"Events",value:S(s.eventCount||null)})]})]}),p.length>0&&e.jsxs("section",{children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Tool calls"}),e.jsx("ul",{className:"s-atop-histo",children:p.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-histo-name",children:u.name}),e.jsx("span",{className:"s-atop-histo-bar",children:e.jsx("span",{className:"s-atop-histo-fill",style:{width:`${(u.frac*100).toFixed(1)}%`}})}),e.jsx("span",{className:"s-atop-histo-count",children:u.count})]},u.name))})]}),e.jsxs("section",{children:[e.jsxs("h3",{className:"s-atop-drawer-h3",children:["Recent activity",e.jsxs("span",{className:"s-atop-drawer-h3-aside",children:[r.length," buffered"]})]}),f.length===0?e.jsx("div",{className:"s-atop-peek-empty",children:"no events buffered for this agent yet"}):e.jsx("ol",{className:"s-atop-peek",children:f.map(u=>e.jsxs("li",{className:`s-atop-peek-row s-atop-peek-row--${u.kind}`,children:[e.jsx("span",{className:"s-atop-peek-time",children:$s(u.ts)}),e.jsx("span",{className:"s-atop-peek-kind",children:u.kind}),e.jsx("span",{className:"s-atop-peek-text",children:u.summary})]},u.id))})]}),e.jsxs("section",{className:"s-atop-drawer-section--secondary",children:[e.jsx("h3",{className:"s-atop-drawer-h3",children:"Process"}),e.jsx("code",{className:"s-atop-codeblock",children:s.command}),e.jsxs("dl",{className:"s-atop-kvs",children:[e.jsx("dt",{children:"PID"}),e.jsx("dd",{children:s.pid>0?s.pid:"transcript-only"}),e.jsx("dt",{children:"Parent"}),e.jsxs("dd",{children:[s.parentLabel," (ppid ",s.ppid,")"]}),e.jsx("dt",{children:"Process etime"}),e.jsx("dd",{children:s.procEtime}),s.transcriptPath&&e.jsxs(e.Fragment,{children:[e.jsx("dt",{children:"Transcript"}),e.jsx("dd",{children:s.transcriptPath})]}),e.jsx("dt",{children:"Origin"}),e.jsx("dd",{children:q[s.attribution]}),e.jsx("dt",{children:"CWD"}),e.jsx("dd",{children:s.cwd||"(none)"})]}),n?.parentChain&&n.parentChain.length>0&&e.jsx("ol",{className:"s-atop-chain",children:n.parentChain.map(u=>e.jsxs("li",{children:[e.jsx("span",{className:"s-atop-chain-pid",children:u.pid}),e.jsx("span",{className:"s-atop-chain-cmd",children:ws(u.command,80)})]},u.pid))})]})]})]})}function b({label:s,value:n,dim:r,accent:c}){const m=`s-atop-metric${r?" s-atop-metric--dim":""}${c?` s-atop-metric--${c}`:""}`;return e.jsxs("div",{className:m,children:[e.jsx("span",{className:"s-atop-metric-lbl",children:s}),e.jsx("span",{className:"s-atop-metric-val",children:n})]})}export{ae as AtopView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as k,j as s}from"./index-
|
|
1
|
+
import{r as k,j as s}from"./index-C1VaWNuD.js";import{k as d,l as B,m}from"./router-kfcaYqZr.js";function p(t){switch(t.view){case"mesh":return"Back to mesh";case"ops":return"Back to ops";case"agents-v2":return t.agentId?"Registry":"All agents";case"messages":return"Back to conversations";case"conversation":return"Back to conversation";case"inbox":return"Back to inbox";case"sessions":return"Back to sessions";case"terminal":return"Terminal Control";case"work":return"Back to work";case"broker":return"Back to broker";case"activity":return"Back to activity";default:return"Back"}}function w({slot:t,fallback:n,navigate:c,className:r,label:i}){const e=d(),o=k.useMemo(()=>B(e.state),[e.state]),a=o??n,u=i??p(a),l=m(e.state)&&!!o;return s.jsxs("button",{type:"button",className:`s-back-pill${r?` ${r}`:""}`,onClick:()=>{if(l&&typeof window<"u"&&window.history.length>1){window.history.back();return}c(a)},children:[s.jsx("span",{"aria-hidden":!0,className:"s-back-pill-glyph",children:"←"}),s.jsx("span",{children:u})]})}export{w as B};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as o,j as e}from"./index-C1VaWNuD.js";import{E as p}from"./EmptyState-CKPWFSjq.js";import{a as f}from"./api-Co9aQ2Jw.js";import{S as b}from"./scoutbot-markdown-yb87JlSE.js";import{b as h,t as u}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./perf-PX8Rx0EP.js";import"./Provider-D0bB7q6y.js";import"./router-kfcaYqZr.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Bdt2W3Y4.js";import"./sse-B29iGBnw.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./colors-BtO5_zlx.js";import"./scoutbot-D7kGGyK_.js";import"./NewChatComposer-D2Ah4T-W.js";import"./runtime-picker-C20lTGhV.js";import"./scout-voice-Cg1qfepC.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DmUG_YC7.js";import"./createLucideIcon-Dv8H8m7J.js";import"./conversation-model-C2KuZUXc.js";import"./index-Cx6Gbr6n.js";import"./HarnessMark-DttReffF.js";import"./NewChatOrigin-DCn5cWPZ.js";import"./keyboard-nav-B8sQ_8IF.js";import"./x-DgmmnPKt.js";import"./chevron-down-D120PY4g.js";import"./search-FB2vVxCp.js";import"./file-text-BHro8MkG.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-D8iB6SMt.js";import"./TextDocumentSurface-2X1Gw4eA.js";import"./chevron-right-CowuvuE6.js";import"./code-xml-CkkNdRmu.js";import"./arrow-left-eToA6GxC.js";import"./arrow-right-DTX42clh.js";import"./chunk-HRAB3GC3-KjjrTLCU.js";import"./external-link-BvX5PfLh.js";const g={"fleet-home":"fleet briefing",tour:"tour briefing"};function be({briefingId:s,navigate:i}){const[r,n]=o.useState(null),[t,a]=o.useState(null),c=o.useCallback(async()=>{try{const d=await f(`/api/briefings/${encodeURIComponent(s)}`);n(d),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to load briefing")}},[s]);return o.useEffect(()=>{c()},[c]),t?e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>i({view:"briefings"}),children:"← back to briefings"}),e.jsx(p,{title:"Couldn't load briefing",body:t})]}):r?e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide briefing-detail",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>i({view:"briefings"}),children:"← back to briefings"}),e.jsxs("header",{className:"briefing-detail-header",children:[e.jsx("h2",{children:r.title}),e.jsxs("div",{className:"briefing-detail-header-meta",children:[e.jsx("span",{className:`briefing-kind briefing-kind-${r.kind}`,children:g[r.kind]}),e.jsx("span",{children:h(r.preparedAt)}),e.jsxs("span",{children:["· ",u(r.preparedAt)]})]}),e.jsx("p",{className:"briefing-detail-summary",children:r.summary}),r.recommendation?e.jsx("div",{className:"briefing-detail-recommendation",children:r.recommendation}):null]}),r.markdown?e.jsx(x,{markdown:r.markdown}):null,r.brief?.presented?e.jsx(y,{presented:r.brief.presented}):null,e.jsx(j,{call:r.call}),e.jsx(N,{brief:r.brief,navigate:i}),e.jsx(k,{observations:r.observations,navigate:i}),e.jsx(v,{snapshot:r.snapshot,call:r.call})]}):e.jsx("div",{className:"sys-surface-page sys-surface-page-wide",children:e.jsx("div",{className:"briefings-placeholder",children:"Loading briefing..."})})}function x({markdown:s}){return e.jsxs("section",{className:"briefing-layer briefing-layer-markdown",children:[e.jsx(l,{eyebrow:"Layer 0",title:"Brief (markdown)"}),e.jsx("div",{className:"briefing-markdown",children:e.jsx(b,{text:s})})]})}function j({call:s}){return!s||!s.telemetry&&!s.presenter?null:e.jsxs("section",{className:"briefing-layer briefing-layer-telemetry",children:[e.jsx(l,{eyebrow:"Telemetry",title:"Calls & usage"}),e.jsxs("dl",{className:"briefing-telemetry",children:[e.jsx(m,{label:"Analyst",model:s.model,responseId:s.responseId,telemetry:s.telemetry??null}),s.presenter?e.jsx(m,{label:"Presenter",model:s.presenter.model,responseId:s.presenter.responseId,telemetry:s.presenter,note:s.presenter.skipped==="rate-guard"?"skipped — rate-guard hit":s.presenter.skipped==="error"?`failed — ${s.presenter.errorMessage??"unknown"}`:null}):null]})]})}function m({label:s,model:i,responseId:r,telemetry:n,note:t}){const a=n?.usage??null;return e.jsxs("div",{className:"briefing-telemetry-row",children:[e.jsxs("div",{className:"briefing-telemetry-row-head",children:[e.jsx("span",{className:"briefing-telemetry-label",children:s}),e.jsx("span",{className:"briefing-telemetry-model",children:i}),t?e.jsx("span",{className:"briefing-telemetry-note",children:t}):null]}),e.jsxs("div",{className:"briefing-telemetry-stats",children:[e.jsx("span",{children:n&&n.elapsedMs>0?`${(n.elapsedMs/1e3).toFixed(2)}s`:"—"}),e.jsxs("span",{children:["in ",a?.inputTokens??"—"]}),e.jsxs("span",{children:["out ",a?.outputTokens??"—"]}),e.jsxs("span",{children:["total ",a?.totalTokens??"—"]}),r?e.jsx("span",{className:"briefing-telemetry-response",children:r}):null]})]})}function y({presented:s}){return e.jsxs("section",{className:"briefing-layer briefing-layer-presented",children:[e.jsx(l,{eyebrow:"Spoken",title:`Presented as · ${s.voiceSpec.persona}, ~${s.voiceSpec.targetWords} words`}),e.jsx("ol",{className:"briefing-presented-sentences",children:s.sentences.map((i,r)=>e.jsx("li",{className:"briefing-presented-sentence",children:i},r))}),e.jsxs("div",{className:"briefing-presented-meta",children:["model: ",s.model,s.responseId?` · response: ${s.responseId}`:""]})]})}function N({brief:s,navigate:i}){return s?e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 3",title:"Brief"}),s.steps.length>0?e.jsx("ol",{className:"briefing-steps",children:s.steps.map((r,n)=>e.jsxs("li",{className:"briefing-step",children:[e.jsxs("div",{className:"briefing-step-label",children:[n+1,". ",r.label]}),r.narration?e.jsx("p",{className:"briefing-step-narration",children:r.narration}):null]},r.id??n))}):null,s.actions.length>0?e.jsx("div",{className:"briefing-actions",children:s.actions.map((r,n)=>e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{r.route&&i(r.route)},children:r.label},`${r.label}-${n}`))}):null]}):e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 3",title:"Brief & call"}),e.jsx("p",{className:"briefings-placeholder",children:"No brief body persisted."})]})}function k({observations:s,navigate:i}){return e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 2",title:`Observations (${s.length})`}),s.length===0?e.jsx("p",{className:"briefings-placeholder",children:"No observations on this brief."}):e.jsx("div",{className:"briefing-observations",children:s.map((r,n)=>{const t=r.tone==="warn"?"briefing-observation-warn":r.tone==="err"||r.tone==="error"?"briefing-observation-err":"";return e.jsxs("div",{className:`briefing-observation ${t}`.trim(),children:[e.jsx("div",{className:"briefing-observation-text",children:r.text}),r.references.length>0?e.jsx("div",{className:"briefing-observation-refs",children:r.references.map((a,c)=>e.jsx(w,{reference:a,navigate:i},`${a.label}-${c}`))}):null]},n)})})]})}function w({reference:s,navigate:i}){const r=!!s.route,n=s.detail?`${s.label} · ${s.detail}`:s.label;return r?e.jsx("button",{type:"button",className:"briefing-ref-chip",onClick:()=>i(s.route),children:n}):e.jsx("span",{className:"briefing-ref-chip briefing-ref-chip-static",children:n})}function v({snapshot:s,call:i}){const r=o.useMemo(()=>C(s),[s]),[n,t]=o.useState(!1);return e.jsxs("section",{className:"briefing-layer",children:[e.jsx(l,{eyebrow:"Layer 1",title:"Read snapshot"}),r.length>0?e.jsx("div",{className:"briefing-snapshot-counts",children:r.map(a=>e.jsxs("span",{className:"briefing-snapshot-count",children:[e.jsx("strong",{children:a.value})," ",a.label]},a.label))}):null,i?e.jsxs("details",{className:"briefing-snapshot-section",children:[e.jsx("summary",{className:"briefing-snapshot-section-head",children:"Call metadata"}),e.jsxs("dl",{className:"briefing-call-grid",children:[e.jsx("dt",{children:"Model"}),e.jsx("dd",{children:i.model}),e.jsx("dt",{children:"Response ID"}),e.jsx("dd",{children:i.responseId??"—"}),e.jsx("dt",{children:"System prompt"}),e.jsx("dd",{children:e.jsx("pre",{className:"briefing-call-prompt",children:i.systemPrompt})}),e.jsx("dt",{children:"Operator request"}),e.jsx("dd",{children:e.jsx("pre",{className:"briefing-call-prompt",children:i.operatorRequest})})]})]}):null,e.jsxs("div",{className:"briefing-snapshot-section",children:[e.jsx("button",{type:"button",className:"briefing-detail-back",onClick:()=>t(a=>!a),children:n?"Hide raw snapshot":"Show raw snapshot JSON"}),n?e.jsx("pre",{className:"briefing-snapshot-raw",children:JSON.stringify(s??{},null,2)}):null]})]})}function l({eyebrow:s,title:i}){return e.jsxs("div",{className:"briefing-layer-head",children:[e.jsx("span",{className:"briefing-layer-eyebrow",children:s}),e.jsx("span",{className:"briefing-layer-title",children:i})]})}function C(s){if(!s?.state)return[];const i=s.state,r=[],n=(t,a)=>{Array.isArray(a)&&r.push({label:t,value:a.length})};if(n("agents",i.agents),i.fleet&&typeof i.fleet=="object"){const t=i.fleet;n("active requests",t.activeAsks),n("attention",t.needsAttention),n("recent",t.recentCompleted)}if(i.broker&&typeof i.broker=="object"){const t=i.broker;n("broker msgs",t.recentMessages)}if(n("scout chatter",i.scoutChatter),n("tail events",i.agentLogMessages),i.operatorAttention&&typeof i.operatorAttention=="object"){const t=i.operatorAttention;n("operator items",t.items)}return r}export{be as BriefingDetailScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-C1VaWNuD.js";import{E as c}from"./EmptyState-CKPWFSjq.js";import{p as m,a as g}from"./api-Co9aQ2Jw.js";import{t as p}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./perf-PX8Rx0EP.js";const b={"fleet-home":"fleet",tour:"tour"},d="/api/briefings?limit=50",u=3e4;function S({navigate:f}){const[r,h]=i.useState(()=>m(d,u)?.briefings??null),[n,t]=i.useState(null),[l,o]=i.useState(!1),a=i.useCallback(async()=>{o(!0);try{const s=await g(d);h(s.briefings),t(null)}catch(s){t(s instanceof Error?s.message:"Failed to load briefings")}finally{o(!1)}},[]);return i.useEffect(()=>{a()},[a]),e.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[e.jsxs("div",{className:"sys-page-head",children:[e.jsxs("div",{className:"sys-page-title-group",children:[e.jsx("h2",{className:"sys-page-title",children:"Briefings"}),e.jsx("p",{className:"sys-page-subtitle",children:"Scoutbot's archived fleet briefs — what it told you, when, and what it saw. Rolling 100."})]}),e.jsx("div",{className:"sys-page-actions",children:e.jsx("button",{type:"button",className:"s-btn",disabled:l,onClick:()=>{a()},children:l?"Refreshing...":"Refresh"})})]}),n?e.jsx(c,{title:"Couldn't load briefings",body:n}):r===null?e.jsx("div",{className:"briefings-placeholder",children:"Loading briefings..."}):r.length===0?e.jsx(c,{title:"No briefings yet",body:"Scoutbot writes here when it generates a fleet brief — either on Home or via tour. Briefs land in this archive automatically."}):e.jsx("ul",{className:"briefings-list",children:r.map(s=>e.jsx("li",{children:e.jsxs("button",{type:"button",className:"briefing-row",onClick:()=>f({view:"briefings",briefingId:s.id}),children:[e.jsxs("div",{className:"briefing-row-head",children:[e.jsx("span",{className:`briefing-kind briefing-kind-${s.kind}`,children:b[s.kind]}),e.jsx("span",{className:"briefing-row-title",children:s.title}),e.jsx("span",{className:"briefing-row-time",children:p(s.preparedAt)})]}),e.jsx("div",{className:"briefing-row-summary",children:s.summary}),e.jsxs("div",{className:"briefing-row-meta",children:[e.jsxs("span",{children:[s.observationCount," observations"]}),s.recommendation?e.jsxs("span",{children:["· ",s.recommendation]}):null]})]})},s.id))})]})}export{S as BriefingsScreen};
|
package/dist/client/assets/{BrokerMetadataPanel-DbaCQlhw.js → BrokerMetadataPanel-BJSwU9XZ.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as s}from"./index-
|
|
1
|
+
import{r as m,j as s}from"./index-C1VaWNuD.js";import{a as y,c as p,d as b,f as x}from"./broker-display-Q75fupqG.js";import{C as u}from"./chevron-down-D120PY4g.js";import{C as j}from"./chevron-right-CowuvuE6.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-Dv8H8m7J.js";function i({label:e,value:a}){return s.jsxs("div",{className:"sys-broker-metadata-row",children:[s.jsx("span",{className:"sys-broker-metadata-key",children:e}),s.jsx("code",{className:"sys-broker-metadata-value",children:a})]})}function h({label:e,value:a,depth:t=0,defaultOpen:d=!0}){const[n,l]=m.useState(d&&t<2);if(a==null)return s.jsx(i,{label:e,value:"—"});if(Array.isArray(a))return a.length===0?s.jsx(i,{label:e,value:"[]"}):a.every(r=>typeof r!="object"||r===null)?s.jsx(i,{label:e,value:a.map(r=>x(r)).join(", ")}):s.jsxs("div",{className:"sys-broker-metadata-group",style:{marginLeft:t*12},children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-group-toggle",onClick:()=>l(r=>!r),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),s.jsx("span",{className:"sys-broker-metadata-group-label",children:e}),s.jsxs("span",{className:"sys-broker-metadata-count",children:[a.length," items"]})]}),n&&s.jsx("div",{className:"sys-broker-metadata-children",children:a.map((r,c)=>s.jsx(h,{label:`[${c}]`,value:r,depth:t+1,defaultOpen:t<1},`${e}-${c}`))})]});if(typeof a=="object"){const o=Object.entries(a);return o.length===0?s.jsx(i,{label:e,value:"{}"}):s.jsxs("div",{className:"sys-broker-metadata-group",style:{marginLeft:t*12},children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-group-toggle",onClick:()=>l(r=>!r),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),s.jsx("span",{className:"sys-broker-metadata-group-label",children:e}),s.jsxs("span",{className:"sys-broker-metadata-count",children:[o.length," fields"]})]}),n&&s.jsx("div",{className:"sys-broker-metadata-children",children:o.map(([r,c])=>s.jsx(h,{label:r,value:c,depth:t+1,defaultOpen:t<1},`${e}-${r}`))})]})}return s.jsx(i,{label:e,value:x(a)})}function k({entries:e}){return e.length===0?null:s.jsx("div",{className:"sys-broker-inspector-rows",children:e.map(a=>s.jsxs("div",{className:"sys-broker-inspector-row",children:[s.jsx("span",{className:"sys-detail-label",children:a.key}),s.jsx("code",{className:"sys-detail-value",children:a.value})]},a.key))})}function S({metadata:e,rawJson:a}){const t=m.useMemo(()=>y(e),[e]),d=m.useMemo(()=>p(e),[e]),[n,l]=m.useState(!1);return!e||Object.keys(e).length===0?s.jsx("div",{className:"sys-broker-metadata-empty",children:"No metadata payload attached to this dispatch row."}):s.jsxs("div",{className:"sys-broker-metadata-panel",children:[t.length>0&&s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsx("div",{className:"sys-broker-metadata-section-head",children:s.jsx("span",{className:"sys-detail-label",children:"Summary"})}),s.jsx(k,{entries:t})]}),d!==null&&s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsx("div",{className:"sys-broker-metadata-section-head",children:s.jsx("span",{className:"sys-detail-label",children:"Payload"})}),s.jsx("div",{className:"sys-broker-metadata-tree",children:s.jsx(h,{label:"payload",value:d,defaultOpen:!0})})]}),s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-raw-toggle",onClick:()=>l(o=>!o),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),"Raw JSON"]}),n&&s.jsx("pre",{className:"sys-broker-metadata-raw",children:a||b(e)})]})]})}export{S as BrokerMetadataPanel};
|