@openscout/scout 0.2.102 → 0.2.105
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 +37 -0
- package/bin/scout.mjs +6 -0
- package/bin/scoutd +0 -0
- package/dist/build-manifest.json +4 -4
- package/dist/chat.mjs +285 -0
- package/dist/client/assets/ActivityScreen-CcDdQTBK.js +1 -0
- package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CHNJ4NnS.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-B4mEvXeD.js} +1 -1
- package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-ZsBDQITY.js} +1 -1
- package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-DSxDlqG1.js} +1 -1
- package/dist/client/assets/AgentAdventures-BxrYq_2v.js +1 -0
- package/dist/client/assets/{AgentAvatar-BIwg54Tj.js → AgentAvatar-NZOqcsB2.js} +1 -1
- package/dist/client/assets/AgentConfigurationScreen-BhD1PEAM.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-BqS6MXqF.js +1 -0
- package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-MIEBKw_S.js} +1 -1
- package/dist/client/assets/AgentFloorView-A0dDRlRV.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-BTqwmK5G.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DuaN0sgE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-C4rKLLdT.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-fGC-ZrJS.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-BTF4_th9.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-DgSeA_vS.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-CeNiaZ9_.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-CcS23wij.js} +1 -1
- package/dist/client/assets/{AgentLanesView-aAyC7lHf.js → AgentLanesView-WZhEDBFE.js} +1 -1
- package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-6Kfr1uOT.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-DUDUTAnU.js +1 -0
- package/dist/client/assets/{AgentSessions-Cox2zS-e.js → AgentSessions-CO1WGa8Z.js} +2 -2
- package/dist/client/assets/AgentsConsole-BQOWkj35.js +1 -0
- package/dist/client/assets/AgentsScreen-BMNAj1PH.js +1 -0
- package/dist/client/assets/AgentsSubnav-CeHhuzyM.js +1 -0
- package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-D67fIBdR.js} +1 -1
- package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-Ck30FbzG.js} +1 -1
- package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CkBhGRlD.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-yZG8_m4h.js +1 -0
- package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-DTxYMr3a.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-crirZCdo.js} +1 -1
- package/dist/client/assets/BrokerScreen-CT37VQiL.js +8 -0
- package/dist/client/assets/Canvas-CRP0KjKb.js +1 -0
- package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-ZPomvOf-.js} +1 -1
- package/dist/client/assets/ChannelComposer-BVItWlEz.js +1 -0
- package/dist/client/assets/ChannelSidebar-B-2spawY.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-ckVkecDO.js} +1 -1
- package/dist/client/assets/ChatAvatar-DKBsbOqk.js +1 -0
- package/dist/client/assets/ChatBits-CLJ71hTY.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-Co0NmqOO.js} +1 -1
- package/dist/client/assets/ChatRightPanel-pKQtkAgl.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-NrLwdPkE.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-BPMgPdVK.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-D37Jk7bl.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-D-iv28LJ.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-CZ3gDdiT.js} +1 -1
- package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-CSC-zbP9.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-DdNAwjGW.js} +1 -1
- package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-mGWY7Ivi.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-voDD9M5R.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-C33sgD48.js} +1 -1
- package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BL8aYD7z.js} +1 -1
- package/dist/client/assets/{ConversationComposer-B7RU6LKd.js → ConversationComposer-DNcn5U6D.js} +1 -1
- package/dist/client/assets/ConversationFeedRows-RnYSa7Io.js +1 -0
- package/dist/client/assets/ConversationHeader-Y9TEJxP_.js +1 -0
- package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-6pprBpmq.js} +2 -2
- package/dist/client/assets/ConversationScreen-tpj4cqWs.js +2 -0
- package/dist/client/assets/{ConversationStatus-CK-YfLpi.js → ConversationStatus-Cv-7hErW.js} +1 -1
- package/dist/client/assets/{CrewAvatar-CJhuqTsJ.js → CrewAvatar-zgzC3cbU.js} +1 -1
- package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dp9KBBGY.js} +1 -1
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/CrewWorkspaces-K2jcyLec.js +1 -0
- package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-av71ehJV.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-CcYGUB10.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DlMiEALb.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-CTkO_tQR.js} +1 -1
- package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CYUwYyAW.js} +1 -1
- package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-Cxhixtks.js} +1 -1
- package/dist/client/assets/FlightObserveScreen-CvzhzuWc.js +1 -0
- package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-Vj_wVZq1.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-CjHSDXad.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-BG4ebnX5.js} +1 -1
- package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-BoYaGY9t.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-_Iy5UqgY.js +1 -0
- package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-jbtRs-YE.js} +1 -1
- package/dist/client/assets/{FloorTacticalHUD-Bngao6sn.js → FloorTacticalHUD-BhyOqlL5.js} +1 -1
- package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CupyOgt4.js} +1 -1
- package/dist/client/assets/HarnessMark-DSvM_H7H.js +1 -0
- package/dist/client/assets/HarnessesScreen-DyjqbZ4k.js +1 -0
- package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-Dcm3vf9U.js} +1 -1
- package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-pIZtE1cC.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-Dv5meXo2.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-xZQ2na1z.js +1 -0
- package/dist/client/assets/InviteSheet--5Zjct25.js +1 -0
- package/dist/client/assets/JumpPalette-BmiSOEmp.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-B8yiM524.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-BPqAjHnH.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-D2cnTeUd.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-jl4XQmEx.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-BLhVHwff.js} +1 -1
- package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-BR25OBTJ.js} +1 -1
- package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-ClVolr4-.js} +1 -1
- package/dist/client/assets/MeshScreen-BW1dMFWF.js +1 -0
- package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BT3ke2D1.js} +2 -2
- package/dist/client/assets/MessagesScreen-CtNMfIvC.js +1 -0
- package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-CafjuseK.js} +1 -1
- package/dist/client/assets/MissionControlView-BjPOViGY.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-nhy3hkxQ.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-Dms0DBjO.js +1 -0
- package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-DiUf3vWW.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-BQSTo8As.js +1 -0
- package/dist/client/assets/NativeAreaScreen-Brix6xDB.js +1 -0
- package/dist/client/assets/NativeAreaScreen-D7HyQNlM.js +1 -0
- package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-BQ2wQ5gp.js} +1 -1
- package/dist/client/assets/NewChatComposer-BEXS8vV6.js +19 -0
- package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-C8ROO4ps.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-BNTqYC7m.js} +1 -1
- package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-CcOeFRCB.js} +1 -1
- package/dist/client/assets/{ObserveEmbedScreen-BPiSXXvm.js → ObserveEmbedScreen-Dh30EjAQ.js} +2 -2
- package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-CC5mnngm.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-DF6tRZL_.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-D9pgw36i.js +31 -0
- package/dist/client/assets/OpsAgentsView-D3rM0udq.js +1 -0
- package/dist/client/assets/OpsScreen-DySeNQ1V.js +1 -0
- package/dist/client/assets/OpsSubnav-C9E0r3GZ.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-FUav75j2.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-C8z22pJ2.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-BLK0EwMg.js +1 -0
- package/dist/client/assets/ProjectsInbox-DfCXReZK.js +2 -0
- package/dist/client/assets/ProjectsRail-CELVubfJ.js +1 -0
- package/dist/client/assets/ProjectsScreen-DMw4TLKy.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-D1Sh4fnX.js +1 -0
- package/dist/client/assets/{Provider-5Hotn7NQ.js → Provider-CNZluAZb.js} +2 -2
- package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-DUPqXMZh.js} +1 -1
- package/dist/client/assets/RailToggle-BwmY70B8.js +1 -0
- package/dist/client/assets/RawSessionsTable-6OVJq0JZ.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-D41TYY0x.js +9 -0
- package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-C8fxndAh.js} +1 -1
- package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-DUVJjrIu.js} +1 -1
- package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-Bek1Vc4W.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DlRg3172.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-CVUMnt6A.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-D9-s5PyB.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-D7FN-oyY.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-BpMR7tlx.js +2 -0
- package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-BQ7HO1om.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-CJMWlvV-.js} +1 -1
- package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-B526NSnw.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-ChkvGyEW.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-6g1f5chk.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-BuwBdnPf.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-Bs-_VwTC.js} +1 -1
- package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-C2wf35-P.js} +1 -1
- package/dist/client/assets/{SessionObserve-DaqDhqDI.js → SessionObserve-B64YsYhy.js} +9 -9
- package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/{SessionObserveEvidence-Drv-D8Oh.js → SessionObserveEvidence-CS1aQBpQ.js} +1 -1
- package/dist/client/assets/SessionRefScreen-DURV0MpF.js +1 -0
- package/dist/client/assets/SessionsScreen-D71ZR-8t.js +1 -0
- package/dist/client/assets/{SettingsDrawer-BDapR4E9.js → SettingsDrawer-Nz98oBVl.js} +3 -3
- package/dist/client/assets/SettingsScreen-CYBHal6y.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-V04kD5T9.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-C0xxW4SN.js +2 -0
- package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-XwFI-pCp.js} +1 -1
- package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-BMpkXai_.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BfeIf-ad.js +1 -0
- package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-aHeF4ZQZ.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-DI5N3gOj.js} +1 -1
- package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-Dw4LP7wu.js} +1 -1
- package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-BofjmUMJ.js} +2 -2
- package/dist/client/assets/Terminal-jIqnIZZ6.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-3XsjuySR.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-CwbQhXcI.js} +1 -1
- package/dist/client/assets/TerminalRelay--qOBwnbR.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-BK6Qy41F.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-DpUT9Tpc.js} +1 -1
- package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-D35fOnQj.js} +1 -1
- package/dist/client/assets/{WorkDetailScreen-CwtRCm_-.js → WorkDetailScreen-Bcf_yHhU.js} +2 -2
- package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-t8AEyx3Q.js} +1 -1
- package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-_mhG_FR2.js} +1 -1
- package/dist/client/assets/WorldActorTalk-CKerDikx.js +1 -0
- package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-BRrj3MQN.js} +1 -1
- package/dist/client/assets/{WorldMinimap-Blqg0d5r.js → WorldMinimap-DOptgrc4.js} +1 -1
- package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-D-RJzSa6.js} +1 -1
- package/dist/client/assets/{activity-CSUhvjD0.js → activity-BJqFrZyB.js} +1 -1
- package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-CHohcvS3.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-CaRy2x2b.js} +1 -1
- package/dist/client/assets/agent-autocomplete-_u9o5EZu.js +2 -0
- package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-bKWYOZaH.js} +1 -1
- package/dist/client/assets/{agent-floor-actor-3v9drnxh.js → agent-floor-actor-DW8zLht0.js} +1 -1
- package/dist/client/assets/{agent-lane-card-model-l0stnU9N.js → agent-lane-card-model-CeqQGp-8.js} +1 -1
- package/dist/client/assets/{agent-lane-detail-Db7KyAlf.js → agent-lane-detail-Ti3trpfH.js} +1 -1
- package/dist/client/assets/{agent-lane-preview-B8lsQJOQ.js → agent-lane-preview-Dpa3DuOn.js} +1 -1
- package/dist/client/assets/{agent-lanes-model-CX0wTcnF.js → agent-lanes-model-DMAdqCmK.js} +1 -1
- package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-BplZUa_0.js} +1 -1
- package/dist/client/assets/{api-B9_IqFKY.js → api-BQYTwoz6.js} +1 -1
- package/dist/client/assets/{api-CaROe5_H.js → api-DSqpVKC7.js} +1 -1
- package/dist/client/assets/{arc.es-BzhWalCl.js → arc.es-CubLvQ4W.js} +1 -1
- package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-DFfKAq0d.js} +1 -1
- package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-DmAWnyAH.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-B0aLKiyF.js} +1 -1
- package/dist/client/assets/at-sign-DM7xeppo.js +1 -0
- package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-BL9qvhEI.js} +1 -1
- package/dist/client/assets/{bot-CfN9PSBF.js → bot-BhAVbcCA.js} +1 -1
- package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-BPVC0asu.js +1 -0
- package/dist/client/assets/chat-space-model-B6Jg2CY4.js +4 -0
- package/dist/client/assets/{check-B8dMv3Is.js → check-g7D7-c1J.js} +1 -1
- package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-CDzRQQGl.js} +1 -1
- package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DKGTLiqc.js} +1 -1
- package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-DX7R6KY2.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-Dvk_QpRq.js} +1 -1
- package/dist/client/assets/{clock-DFcRbtrl.js → clock-CQb4FeMf.js} +1 -1
- package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-Cmadr3pQ.js} +1 -1
- package/dist/client/assets/{coffee-C_D9zooM.js → coffee-ljG1_krY.js} +1 -1
- package/dist/client/assets/{compass-DTZdCpv9.js → compass-CvzkzkIh.js} +1 -1
- package/dist/client/assets/content-0AXa0klu.js +1 -0
- package/dist/client/assets/content-BEyJ19Lx.js +1 -0
- package/dist/client/assets/content-BN5weWKW.js +1 -0
- package/dist/client/assets/content-BNokkm7C.js +1 -0
- package/dist/client/assets/content-BV4PUM9q.js +1 -0
- package/dist/client/assets/content-BxUPlcx5.js +1 -0
- package/dist/client/assets/content-CIC5sku8.js +1 -0
- package/dist/client/assets/content-CKJ9zb7Z.js +1 -0
- package/dist/client/assets/content-CdkTyxqk.js +1 -0
- package/dist/client/assets/content-CnhhSCZq.js +1 -0
- package/dist/client/assets/content-D1Ze_FG9.js +1 -0
- package/dist/client/assets/content-DY3F9Vfr.js +1 -0
- package/dist/client/assets/content-DrKBYpcb.js +1 -0
- package/dist/client/assets/content-LSStQYj5.js +1 -0
- package/dist/client/assets/content-YvU-D0hF.js +1 -0
- package/dist/client/assets/content-oKQMyVnH.js +1 -0
- package/dist/client/assets/{context-budget-DemtXu7E.js → context-budget-8qFKqM-j.js} +1 -1
- package/dist/client/assets/{conversation-icons-BQ4OeOmr.js → conversation-icons-CIRaxmid.js} +1 -1
- package/dist/client/assets/{conversation-model-BGFHoxQ0.js → conversation-model-m8HhzroS.js} +1 -1
- package/dist/client/assets/conversation-motion-features-D9PxLoDt.js +1 -0
- package/dist/client/assets/{copy-D9WUpQRf.js → copy-BGOC1tJB.js} +1 -1
- package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-Q6nrHFTN.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-ChvMq-zl.js} +1 -1
- package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/discover-DlwbftpC.js +2 -0
- package/dist/client/assets/embed-entry-c0lwtjBG.js +2 -0
- package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-BVccgH0n.js} +1 -1
- package/dist/client/assets/{eye-CtqSV8BS.js → eye-CsGfEVR6.js} +1 -1
- package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-Be6da5l3.js} +1 -1
- package/dist/client/assets/{file-text-ChtICwub.js → file-text-DP6txVW-.js} +1 -1
- package/dist/client/assets/{flag-CqdOxVkI.js → flag-DAFE2wZ5.js} +1 -1
- package/dist/client/assets/{floor-context-model-DZBpo_oD.js → floor-context-model-rWKqaKmV.js} +1 -1
- package/dist/client/assets/{floor-message-passes-CJh9f8Jp.js → floor-message-passes-CO3Ix_wR.js} +1 -1
- package/dist/client/assets/{folder-0fWevPvQ.js → folder-B_S7gBVr.js} +1 -1
- package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-DQCGlE3o.js} +1 -1
- package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-CofqY4Km.js} +1 -1
- package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-DcUCsWdJ.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-KQy-ZOpV.js} +1 -1
- package/dist/client/assets/{home-moving-signal-B7m-ngb2.js → home-moving-signal-BIHUGNfI.js} +1 -1
- package/dist/client/assets/home-now-card-CaLgZze2.js +1 -0
- package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-CvU8B61b.js} +1 -1
- package/dist/client/assets/hooks-DaUOREpP.js +2 -0
- package/dist/client/assets/index-CGbs0SBm.css +1 -0
- package/dist/client/assets/index-CbqBwfIW.js +1 -0
- package/dist/client/assets/index-CyPMl7Up.js +1 -0
- package/dist/client/assets/index-DReVb7jZ.js +10 -0
- package/dist/client/assets/index-PQpJveGO.js +1 -0
- package/dist/client/assets/{index-CvsM3jm8.js → index-kkXUq-zf.js} +1 -1
- package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-CLU7wjnT.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-CJXPaHXj.js} +1 -1
- package/dist/client/assets/lane-ask-display-BTVSakyo.js +18 -0
- package/dist/client/assets/{lane-observe-BD21P8BB.js → lane-observe-CteDwdD-.js} +3 -3
- package/dist/client/assets/{lane-roster-store-DzNHP392.js → lane-roster-store-Ch9t6lb0.js} +1 -1
- package/dist/client/assets/{layers-Bolb8ejU.js → layers-BOwyWodP.js} +1 -1
- package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-B36Qsh0y.js} +1 -1
- package/dist/client/assets/left-0vBrvrBG.js +2 -0
- package/dist/client/assets/left-C6SyaqlJ.js +1 -0
- package/dist/client/assets/left-CTuXysZR.js +2 -0
- package/dist/client/assets/left-Cc6s4DT2.js +1 -0
- package/dist/client/assets/left-DF5caiyh.js +1 -0
- package/dist/client/assets/left-DgT4tWCx.js +1 -0
- package/dist/client/assets/left-R0wppTTr.js +1 -0
- package/dist/client/assets/left-advisor-C-kt8V28.js +1 -0
- package/dist/client/assets/left-agents-thnBO156.js +1 -0
- package/dist/client/assets/left-default-CT42fnpF.js +1 -0
- package/dist/client/assets/left-lanes-CSmZgciK.js +1 -0
- package/dist/client/assets/left-mission-C86x6i9h.js +1 -0
- package/dist/client/assets/library-DdhYL_9v.js +1 -0
- package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-DNUsuPWz.js} +1 -1
- package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-I40PawYA.js} +1 -1
- package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-CdhNzDF0.js} +1 -1
- package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-Ck_Vjnyp.js} +1 -1
- package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-DSlvHp-D.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-C1-mdP3P.js} +1 -1
- package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-cI5_A5mj.js} +1 -1
- package/dist/client/assets/{message-markup-DgFSyb3f.js → message-markup-6Tgo4qFJ.js} +1 -1
- package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-CJW4WRlo.js} +1 -1
- package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-p_cboAm4.js} +1 -1
- package/dist/client/assets/monitor-C7_cHlkC.js +1 -0
- package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-CU_euC-Q.js} +1 -1
- package/dist/client/assets/{observe-CkfOxYx_.js → observe-CtS0l3zu.js} +1 -1
- package/dist/client/assets/{operator-attention-DGR4kOog.js → operator-attention-DBaRg5ep.js} +1 -1
- package/dist/client/assets/{page-status-CkS3SZu-.js → page-status-DwFR4wSw.js} +1 -1
- package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-qP17MwMl.js} +1 -1
- package/dist/client/assets/{pause-DWS7YGQ3.js → pause-B_hliKuR.js} +1 -1
- package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-BUsTTZFE.js} +1 -1
- package/dist/client/assets/{pin-DWlD1BOF.js → pin-Oi4qHR6M.js} +1 -1
- package/dist/client/assets/{play-D_Pggug4.js → play-CVeRmqLH.js} +1 -1
- package/dist/client/assets/{plus-D_wLGJGT.js → plus-D5NLH_fM.js} +1 -1
- package/dist/client/assets/profile-BegEUmB7.js +1 -0
- package/dist/client/assets/projects-inbox-CKPLZN8s.css +1 -0
- package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-CfwxCTdN.js} +1 -1
- package/dist/client/assets/provider-DwmCoSlc.js +1 -0
- package/dist/client/assets/{proxy-DOG46ja4.js → proxy-DgzP27W8.js} +1 -1
- package/dist/client/assets/{radio-C_jtwbFP.js → radio-Cas2qg1D.js} +1 -1
- package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-IcD2lPoT.js} +1 -1
- package/dist/client/assets/resolve-panes-pfZTezKo.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-D5ksvrb_.js +1 -0
- package/dist/client/assets/right-BDaCJ0CF.js +1 -0
- package/dist/client/assets/right-BP6lXRFS.js +1 -0
- package/dist/client/assets/right-Cb1VCrdj.js +1 -0
- package/dist/client/assets/right-CeFaxfBo.js +1 -0
- package/dist/client/assets/right-Ck2SrYCj.js +1 -0
- package/dist/client/assets/right-D-uv5YfF.js +1 -0
- package/dist/client/assets/right-DJMSICky.js +1 -0
- package/dist/client/assets/right-Dnljs8ah.js +1 -0
- package/dist/client/assets/right-SdCSF8PP.js +1 -0
- package/dist/client/assets/{right-BLJsc2-p.js → right-cjPTwPXS.js} +1 -1
- package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-DAqYvu8I.js} +1 -1
- package/dist/client/assets/router-C-MF5-mb.js +1 -0
- package/dist/client/assets/{runtime-picker-DdsttHHc.js → runtime-picker-C_AVYF63.js} +1 -1
- package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-Dl3ml9OZ.js} +1 -1
- package/dist/client/assets/{scout-voice-DOQ_B77g.js → scout-voice-CqAyfblr.js} +1 -1
- package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-DwvGQOWo.js} +1 -1
- package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-B0tKI9Sg.js} +1 -1
- package/dist/client/assets/{search-C4VlW_0l.js → search-UsM-9-_W.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/secondaryNavConfig-DzNHk6IH.js +1 -0
- package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-OTS2iFkt.js} +1 -1
- package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-BlQsRK6C.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-C1mgqdow.js} +1 -1
- package/dist/client/assets/{server-ms1yxUYJ.js → server-DBlPW0Mp.js} +1 -1
- package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CnpZMB7C.js} +1 -1
- package/dist/client/assets/{session-table-CDx_16xf.js → session-table-CGkfG5Yd.js} +1 -1
- package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Bge4XZ4I.js} +1 -1
- package/dist/client/assets/{settings-TJIkkZ0P.js → settings-C69Zjrpq.js} +1 -1
- package/dist/client/assets/{shared-work-artifacts-4IIQXQfc.js → shared-work-artifacts-DfNl9KTo.js} +1 -1
- package/dist/client/assets/{sliders-horizontal-CHf3ntw0.js → sliders-horizontal-6bzeod7c.js} +1 -1
- package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-Cc5lPZRv.js} +1 -1
- package/dist/client/assets/{sse-v5QLsOHV.js → sse-A8AyLH0g.js} +1 -1
- package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-C4WdhVeK.js} +1 -1
- package/dist/client/assets/{terminal-96JWDYDL.js → terminal-DMZjX1es.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-mO89dX-Y.js} +1 -1
- package/dist/client/assets/{terminal-sessions-Ch9aYlgi.js → terminal-sessions-3RfJpen8.js} +1 -1
- package/dist/client/assets/{terminal-takeover-BlpxpvSp.js → terminal-takeover-CZZsnPzj.js} +1 -1
- package/dist/client/assets/use-beside-D3cJpA5p.js +1 -0
- package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-D5EnpVba.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-D_QOmjg5.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-3V3ADQ-G.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-DI9GKWlF.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-CiaZHMnk.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-CkdAHlDR.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-A3QGXqIy.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-DrL_nkCZ.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-atkQVfGw.js} +1 -1
- package/dist/client/assets/usePersistentState-Y8XwSTg-.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-DTvcwISe.js} +1 -1
- package/dist/client/assets/users-RLK3P5U4.js +1 -0
- package/dist/client/assets/{wrench-BsMTSeji.js → wrench-B4maQJai.js} +1 -1
- package/dist/client/assets/{x-DI1ktCYb.js → x-rlMdRqJF.js} +1 -1
- package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-B1zHHOLQ.js} +1 -1
- package/dist/client/assets/{zap-sKPkh4sQ.js → zap-B4X0OrEw.js} +1 -1
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/0019_snapshot.json +6804 -0
- package/dist/drizzle/meta/_journal.json +7 -0
- package/dist/highlights-eq9cgrbb.scm +604 -0
- package/dist/highlights-ghv9g403.scm +205 -0
- package/dist/highlights-hk7bwhj4.scm +284 -0
- package/dist/highlights-r812a2qc.scm +150 -0
- package/dist/highlights-x6tmsnaa.scm +115 -0
- package/dist/injections-73j83es3.scm +27 -0
- package/dist/main.mjs +1214 -722
- package/dist/node/main.mjs +133 -22
- package/dist/pairing-runtime-controller.mjs +715 -492
- package/dist/runtime/base-daemon.mjs +14176 -58
- package/dist/runtime/broker-daemon.mjs +15520 -445
- package/dist/runtime/broker-process-manager.mjs +5 -3
- package/dist/runtime/mesh-discover.mjs +5 -3
- package/dist/scout-control-plane-web.mjs +21065 -3387
- package/dist/tree-sitter-javascript-nd0q4pe9.wasm +0 -0
- package/dist/tree-sitter-markdown-411r6y9b.wasm +0 -0
- package/dist/tree-sitter-markdown_inline-j5349f42.wasm +0 -0
- package/dist/tree-sitter-typescript-zxjzwt75.wasm +0 -0
- package/dist/tree-sitter-zig-e78zbjpm.wasm +0 -0
- package/dist/update-helper.mjs +83 -17
- package/package.json +2 -2
- package/dist/client/assets/ActivityScreen-DCALiEXY.js +0 -1
- package/dist/client/assets/AgentAdventures-NwTKeF0F.js +0 -1
- package/dist/client/assets/AgentConfigurationScreen-B2Hw0ce1.js +0 -1
- package/dist/client/assets/AgentDefinitionsWorkspace-CwZJ833X.js +0 -1
- package/dist/client/assets/AgentFloorView-l2wNKFob.js +0 -1
- package/dist/client/assets/AgentInfoScreen-ClZM1wQb.js +0 -1
- package/dist/client/assets/AgentLanesEmbedScreen-DqHwqY0X.js +0 -1
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
- package/dist/client/assets/AgentsConsole-Dq0S_hRA.js +0 -1
- package/dist/client/assets/AgentsScreen-Bi9Lx47B.js +0 -1
- package/dist/client/assets/AgentsSubnav-BOobgtGE.js +0 -1
- package/dist/client/assets/BriefingDetailScreen-sprFl4Nk.js +0 -1
- package/dist/client/assets/BrokerScreen-CejzhRsB.js +0 -8
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
- package/dist/client/assets/CrewWorkspaces-4O8dgRUD.js +0 -1
- package/dist/client/assets/CrewWorkspaces-Diq11KDq.css +0 -1
- package/dist/client/assets/FlightObserveScreen-DDXfNbsw.js +0 -1
- package/dist/client/assets/FloorResourcesSheet-Djrgd_ZU.js +0 -1
- package/dist/client/assets/HarnessMark-Bt47OeHy.js +0 -1
- package/dist/client/assets/HarnessesScreen-M84sFjWY.js +0 -1
- package/dist/client/assets/KnowledgeSearchScreen-WC0WhFio.js +0 -1
- package/dist/client/assets/LaneTraceDetailSheet-mAhj7MJi.js +0 -1
- package/dist/client/assets/MeshScreen-DlfiMlaR.js +0 -1
- package/dist/client/assets/MessagesScreen-BZ7yaGJx.js +0 -1
- package/dist/client/assets/MissionControlView-DpGhxG4a.js +0 -1
- package/dist/client/assets/MissionLeftAgentRow-DhhRRim0.js +0 -1
- package/dist/client/assets/NativeAreaScreen-BQyHHRAM.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Ditv-TYW.js +0 -1
- package/dist/client/assets/NativeAreaScreen-Dq3uPSEI.js +0 -1
- package/dist/client/assets/NewChatComposer-JjLbm3W2.js +0 -19
- package/dist/client/assets/OpenScoutAppShell-CzKbjwCA.js +0 -22
- package/dist/client/assets/OpsAgentsView-CZbtkcQH.js +0 -1
- package/dist/client/assets/OpsScreen-DJq-aBmX.js +0 -1
- package/dist/client/assets/OpsSubnav-9sURjajO.js +0 -1
- package/dist/client/assets/ProjectAgentProfile-q_1tMJIL.js +0 -1
- package/dist/client/assets/ProjectAgentProfileHero-DyEFyTFs.js +0 -1
- package/dist/client/assets/ProjectsInbox-Bs8I__my.js +0 -2
- package/dist/client/assets/ProjectsRail-Deb38OJ1.js +0 -1
- package/dist/client/assets/ProjectsScreen-CgLiYiss.js +0 -1
- package/dist/client/assets/ProjectsThreadAside-C0Yw3yIL.js +0 -1
- package/dist/client/assets/RawSessionsTable-DIhmlvk-.js +0 -1
- package/dist/client/assets/RealtimeVoiceScreen-3oU7b7V5.js +0 -1
- package/dist/client/assets/RepoDiffViewerLazy-BQ6ZCrsq.js +0 -2
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
- package/dist/client/assets/SharedWorkFloor-yPWFLZwX.js +0 -2
- package/dist/client/assets/Terminal-D-DsQlmV.js +0 -4
- package/dist/client/assets/TerminalEmbedScreen-9Gmln759.js +0 -1
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
- package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
- package/dist/client/assets/arrow-down-WoVlkUmg.js +0 -1
- package/dist/client/assets/chunk-JTPDIGGW-ZC-98AHT.js +0 -46
- package/dist/client/assets/chunk-T65CQEWV-CSVUz2rY.js +0 -1
- package/dist/client/assets/chunk-YOZR3KYS-B59jqwO0.js +0 -2
- package/dist/client/assets/content-B5Q4pb9R.js +0 -1
- package/dist/client/assets/content-BK1IfOZs.js +0 -1
- package/dist/client/assets/content-BeEsWLEm.js +0 -1
- package/dist/client/assets/content-BkOwEknW.js +0 -1
- package/dist/client/assets/content-C32W5kAG.js +0 -1
- package/dist/client/assets/content-CoqyLs9v.js +0 -1
- package/dist/client/assets/content-CwpdIS5b.js +0 -1
- package/dist/client/assets/content-DS2OkJ3Q.js +0 -1
- package/dist/client/assets/content-DXKaPDfn.js +0 -1
- package/dist/client/assets/content-DZt5-dkI.js +0 -1
- package/dist/client/assets/content-DbQJH8L1.js +0 -1
- package/dist/client/assets/content-DetoiaHq.js +0 -1
- package/dist/client/assets/content-Dhu3wL7J.js +0 -1
- package/dist/client/assets/content-Dpv34iZu.js +0 -1
- package/dist/client/assets/content-TtQJb61D.js +0 -1
- package/dist/client/assets/content-ymNb2R7g.js +0 -1
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
- package/dist/client/assets/discover-C8IOY7_K.js +0 -2
- package/dist/client/assets/embed-entry-CG3CfCbm.js +0 -2
- package/dist/client/assets/home-now-card-DduXkHRR.js +0 -1
- package/dist/client/assets/hooks-C6VyQTQe.js +0 -2
- package/dist/client/assets/index-C5cX8dkl.js +0 -1
- package/dist/client/assets/index-C8uS5szO.js +0 -10
- package/dist/client/assets/index-Ck1__1yL.css +0 -1
- package/dist/client/assets/index-ClOOrVG1.js +0 -1
- package/dist/client/assets/index-Crtgfc9I.js +0 -1
- package/dist/client/assets/lane-ask-display-B6iCAVcd.js +0 -18
- package/dist/client/assets/left-B-_z_nqj.js +0 -2
- package/dist/client/assets/left-B1LY7rJc.js +0 -1
- package/dist/client/assets/left-C6bdjWcG.js +0 -2
- package/dist/client/assets/left-CF4iuqlz.js +0 -1
- package/dist/client/assets/left-DLtNyZl1.js +0 -1
- package/dist/client/assets/left-Fpxoq-VY.js +0 -1
- package/dist/client/assets/left-N2wXfTlp.js +0 -1
- package/dist/client/assets/left-advisor-CeIjCKbd.js +0 -1
- package/dist/client/assets/left-agents-upjHVlOj.js +0 -1
- package/dist/client/assets/left-default-08gmdCtb.js +0 -1
- package/dist/client/assets/left-lanes-Cvsp73Hw.js +0 -1
- package/dist/client/assets/left-mission-W1LLaz74.js +0 -1
- package/dist/client/assets/library-DLKBVUJ6.js +0 -1
- package/dist/client/assets/profile-C3KgiZvc.js +0 -1
- package/dist/client/assets/projects-inbox-BIW7nv-H.css +0 -1
- package/dist/client/assets/resolve-panes-DuowGRTk.js +0 -1
- package/dist/client/assets/resolve-sidebar-context-BkTbqteq.js +0 -1
- package/dist/client/assets/right-B9OUA6Ho.js +0 -1
- package/dist/client/assets/right-BDQnjetX.js +0 -1
- package/dist/client/assets/right-BUbKHmRH.js +0 -1
- package/dist/client/assets/right-Ci2IcD4s.js +0 -1
- package/dist/client/assets/right-CmCce3e5.js +0 -1
- package/dist/client/assets/right-D7w0zM5a.js +0 -1
- package/dist/client/assets/right-DIoON_bv.js +0 -1
- package/dist/client/assets/right-E0Jr3VN5.js +0 -1
- package/dist/client/assets/right-lCdAk9dW.js +0 -1
- package/dist/client/assets/router-BKiMcYa7.js +0 -1
- package/dist/client/assets/secondaryNavConfig-DAXIFtVd.js +0 -1
- package/dist/client/assets/secondaryNavConfig-xssF_ubT.css +0 -1
- package/dist/client/assets/use-beside-Df-F2Uvg.js +0 -1
- package/dist/client/assets/use-scout-dev-flags-0TXfQcG0.js +0 -1
- package/dist/client/assets/useContentSecondaryNav-CGvMOVGY.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{r,j as o}from"./index-C8uS5szO.js";/* empty css */import{a as cn}from"./api-CaROe5_H.js";import{u as Vn}from"./tail-events-DQ46QBW1.js";import{i as _e,o as dn}from"./surface-activity-B1rgWB1i.js";import{u as Gn}from"./observe-CkfOxYx_.js";import{f as Kn}from"./terminal-sessions-Ch9aYlgi.js";import{n as un}from"./agent-state-DDhnFEEP.js";import{S as Un}from"./Provider-5Hotn7NQ.js";import{d as qn}from"./types-B0PlfpKc.js";import{u as Yn}from"./useEmbedHeadline-BL8wQawZ.js";import{A as Zn}from"./AgentAvatar-BIwg54Tj.js";import{h as Xn,S as Jn}from"./SessionObserve-DaqDhqDI.js";import{X as Qn,Y as fn,Z as et,_ as nt,$ as tt,a0 as Qe,a1 as st,a2 as at,a3 as rt,a4 as ot,a5 as it,a6 as Ce,a7 as lt,a8 as ct,a9 as dt,aa as mn,ab as ut,ac as ft,l as hn,m as gn}from"./router-BKiMcYa7.js";import{AgentFloorView as mt}from"./AgentFloorView-l2wNKFob.js";import{u as ht,s as gt,A as pt,a as Lt,L as yt}from"./AgentLanesPreflight-pw2vMO3Q.js";import{AgentLaneChrome as bt}from"./AgentLaneChrome-D9uJ4QY7.js";import{AgentLaneCard as vt}from"./AgentLaneCard-C6YmwPxQ.js";import{a as St}from"./agent-lane-card-model-l0stnU9N.js";import{c as kt}from"./agent-lane-detail-Db7KyAlf.js";import{i as xt,A as wt}from"./AgentLaneDetailSheet-KYckCBCX.js";import{LaneTraceDetailSheet as Et}from"./LaneTraceDetailSheet-mAhj7MJi.js";import{readStoredLaneSummaryHeight as Nt,useLaneSummaryResize as Rt,AgentLaneSummaryResizeHandle as jt}from"./AgentLaneSummaryResize-BBYBS3DO.js";import{A as he,l as X,k as Ct,m as pn,n as It,e as At,g as Tt,p as _t,r as Pt,d as Ln,D as Dt,h as Mt,i as zt}from"./agent-lanes-model-CX0wTcnF.js";import{i as Ot,c as $t,n as en}from"./keyboard-nav-CXfav14z.js";import{p as nn}from"./lane-roster-store-DzNHP392.js";function Pe(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Ft(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 Wt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Ht(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 Bt(e,n,t){return Wt(Ft([...n,...e]),t)}const Vt=500;function Ie(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):null}function Gt(e){return JSON.stringify([Ie(e.recentLimit),e.includeTranscriptReplay,Ie(e.recentWindowMs),e.discoveryScope??null,Ie(e.discoveryLimit)])}function Kt(e,n){return e==="error"||n==="error"}function Ut(e,n){return n?Math.min(e,Vt):e}async function qt(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 Yt(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const Zt=500,Xt=6e4;function Jt(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function Qt(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 cn(`/api/tail/recent?${s.toString()}`)).events??[]}function es(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 ns(e){const n=e?.recentLimit??Zt,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Xt,i=e?.includeTranscriptReplay??!1,l=e?.discoveryScope,f=e?.discoveryLimit,b=e?.recentWindowMs,u=e?.pauseWhenHidden??!1,d=Gt({recentLimit:n,includeTranscriptReplay:i,recentWindowMs:b,discoveryScope:l,discoveryLimit:f}),[m,c]=r.useState(null),[g,p]=r.useState([]),[v,w]=r.useState({discovery:"loading",recent:"loading",discoveryLoaded:!1,recentLoaded:!1}),P=r.useRef("loading"),L=r.useRef("idle"),R=r.useRef(null),C=r.useRef(null),S=r.useRef(0);Vn(y=>{p(k=>Ht(k,y,n))},t);const D=r.useCallback((y=!1)=>{if(!t||u&&!y&&!_e())return Promise.resolve();y&&(P.current="loading",w(j=>({...j,recent:"loading"})));const k=d,x=C.current;if(x?.key===k)return x.promise;const A=++S.current;L.current=i?"loading":"ready";let z;return z=qt({includeTranscriptReplay:i,load:j=>Qt(j?n:Ut(n,i),j,b),publish:(j,H)=>{if(A!==S.current)return;const V=()=>{p(F=>Bt(F,j,n))};H==="replay"?r.startTransition(V):V()},markReady:()=>{A===S.current&&(P.current="ready",w(j=>({...j,recent:"ready",recentLoaded:!0})))}}).then(j=>{A===S.current&&(i&&(L.current=j.replay==="failed"?"error":"ready"),j.replay!=="failed"&&(R.current=d))}).catch(()=>{A===S.current&&(P.current="error",i&&(L.current="error"),w(j=>({...j,recent:"error"})))}).finally(()=>{C.current?.promise===z&&(C.current=null)}),C.current={key:k,promise:z},z},[t,d,i,u,n,b]),I=r.useCallback(async(y=!1)=>{if(t&&!(u&&!y&&!_e())){y&&w(k=>({...k,discovery:"loading"}));try{const k=await cn(es(l,f));c(k),w(x=>({...x,discovery:"ready",discoveryLoaded:!0})),Kt(P.current,L.current)&&D()}catch{c(k=>k??Jt()),w(k=>({...k,discovery:"error"}))}}},[f,l,t,u,D]),M=r.useCallback(async()=>{await Promise.all([I(!0),D(!0)])},[I,D]);return r.useEffect(()=>{if(!t)return;let y=!1,k=!0;const x=()=>{y||I(k),k=!1};x();const A=setInterval(x,s),z=u?dn(x):null;return()=>{y=!0,clearInterval(A),z?.()}},[s,t,u,I]),r.useEffect(()=>{t||(S.current+=1,C.current=null,R.current=null,L.current="idle")},[t]),r.useEffect(()=>{t&&R.current!==d&&D(!0)},[t,d,D]),{discovery:m,events:g,loadState:v,refreshDiscovery:I,retryInitialLoad:M}}function ts({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s,onTogglePin:i}){const[l,f]=r.useState(-1),b=r.useRef(new Map);r.useEffect(()=>{if(l<0)return;if(l>=e.length){f(e.length-1);return}const m=e[l];if(!m)return;const c=b.current.get(m.id);c?.scrollIntoView({block:"nearest",inline:"nearest"}),c?.focus()},[l,e]),r.useEffect(()=>{n||l>=e.length&&f(e.length>0?e.length-1:-1)},[l,n,e.length]);const u=r.useCallback((m,c)=>{c?b.current.set(m,c):b.current.delete(m)},[]);r.useEffect(()=>{const m=c=>{if(!document.querySelector(".s-agent-lanes")||Ot(c.target)||$t()||n||e.length===0)return;const g=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&g>=0&&g<he.length){c.preventDefault(),s(he[g].key);return}if(c.key==="ArrowDown"||c.key==="j"){c.preventDefault(),f(p=>en(p,e.length,1));return}if(c.key==="ArrowUp"||c.key==="k"){c.preventDefault(),f(p=>en(p,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 p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),t(v);return}if(c.key.toLowerCase()==="p"&&i){const p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),i(v)}};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l,n,e,s,t,i]);const d=r.useCallback((m,c)=>({"data-cursor":l===m?!0:void 0,tabIndex:l===m?0:-1,ref:g=>u(c,g),onFocus:()=>f(m)}),[l,u]);return{focusedIndex:l,getLaneFocusProps:d}}function ss(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function yn(e,n){if(!n)return!0;const t=me(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=ss(i);return l===n||me(i)===t||!!(f&&(f.toLowerCase()===n||me(f)===t))})}function as(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.harness,s.definitionId,i?.attribution,l],t)}function rs(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.project,s.projectRoot,s.cwd,i?.cwd,X(s,l)],t)}function os(e){return un(e.agent.state??null,e.agent)==="needs_attention"?!0:Xn(e.observe?.events??[])}function tn(e,n,t,s){return fn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function is(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>as(t,e.harness));case"project":return n.filter(t=>rs(t,e.projectPath));case"attention":return n.filter(t=>os(t));default:return[]}}function sn(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=et(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function ls(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,l=[],f=[],b=[],u=new Map(t.laneDefs.map(g=>[g.id,g]));for(const g of Qn(t.slots)){const p=u.get(g.laneDefId);if(!p)continue;const v=is(p,n),w=g.zone==="pinned_left"?l:g.zone==="pinned_right"?b:f;for(const P of v)sn(w,i,{lane:P,zone:g.zone,position:g.position,widthPx:tn(t,P,g,s),slot:g,laneDef:p})}if(t.showAutoLanes){let g=0;for(const p of n)i.has(p.id)||(sn(f,i,{lane:p,zone:"main",position:g,widthPx:tn(t,p,void 0,s)}),g+=1)}const d=Ae(l),m=Ae(f),c=Ae(b);return{pinnedLeft:d,main:m,pinnedRight:c,flat:[...d,...m,...c]}}function cs(e){return e.slots.some(n=>n.laneDefId===tt)}function fe(e,n){const t=`harness:${me(n)}`;return e.slots.some(s=>s.laneDefId===t)}function ds(e,n){const t=nt(n);return e.slots.some(s=>s.laneDefId===t)}function us(e,n,t){const[s,i]=r.useState(()=>Qe(e,n));r.useEffect(()=>{i(Qe(e,n))},[n,e]);const l=r.useCallback(L=>{st(L),i(L)},[]),f=r.useMemo(()=>ls({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),b=r.useCallback((L,R="pinned_left")=>{l(at(s,{laneId:L.id,title:X(L.agent,L.source),zone:R,width:s.laneWidths[L.id]}))},[s,l]),u=r.useCallback(L=>{l(rt(s,L))},[s,l]),d=r.useCallback((L,R)=>{l(ot(s,L,R))},[s,l]),m=r.useCallback(L=>{l(it(s,L))},[s,l]),c=r.useCallback((L,R)=>{l(Ce(s,{kind:"harness",title:R??`${L} sessions`,harness:L,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,l]),g=r.useCallback((L,R)=>{const C=L.trim();if(!C)return;const S=R?.trim()||C.split(/[\\/]/u).filter(Boolean).pop()||C;l(Ce(s,{kind:"project",title:S,projectPath:C,zone:"main",width:s.defaultLaneWidth}))},[s,l]),p=r.useCallback(()=>{l(Ce(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,l]),v=r.useCallback(()=>{l(lt(s))},[s,l]),w=r.useCallback(L=>ct(s,L),[s]),P=r.useCallback(L=>dt(s,L),[s]);return{deck:s,layout:f,pinLane:b,unpinLane:u,setLaneWidth:d,setDefaultLaneWidth:m,addHarnessLane:c,addAttentionLane:p,addProjectLane:g,clearPins:v,isPinned:w,pinnedZone:P}}function fs(e){const[n,t]=r.useState(null),s=r.useRef({laneId:"",x:0,width:512}),i=r.useRef(512),l=r.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=r.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const d=mn(i.current);e(s.current.laneId,d.tier??d.px)}return null})},[e]);r.useEffect(()=>{if(!n)return;const u=m=>{const c=m.clientX-s.current.x;i.current=Math.min(ut,Math.max(ft,s.current.width+c));const g=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);g&&g.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 b=r.useCallback((u,d)=>{e(u,d),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:l,resetLaneWidth:b,resizingLaneId:n}}const an=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],ms=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function hs(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function gs(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function ps(e){return e?an.filter(n=>n.key!=="floor"):an}const bn="openscout:agent-lanes-horizon",vn="openscout:agent-lanes-layout",Sn="openscout:agent-lanes-grid-columns",kn="openscout:agent-lanes-technical-rollup",Ls=`${kn}:lane:`,ys="openscout:agent-lanes-scroll",bs=96,vs=160,Ss=6e4,ks=6e4,xs=3e4,ws=3e4,Es=3e4,Ns=12e4,Rs=["pinned-left","main","pinned-right"];function rn(){return!_e()}function xn(e,n){return`${ys}:${e}:${n}`}function js(e,n){try{const t=sessionStorage.getItem(xn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function Cs(e,n,t){try{sessionStorage.setItem(xn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function Is(){try{const e=sessionStorage.getItem(bn);if(e&&he.some(n=>n.key===e))return e}catch{}return Dt}function As(e){try{const n=sessionStorage.getItem(vn);return hs(n,e)}catch{}return"lanes"}function on(e){const n=As(e);return n==="floor"?"lanes":n}function Ts(){try{return gs(sessionStorage.getItem(Sn))}catch{return"auto"}}function _s(){try{const e=sessionStorage.getItem(kn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function wn(e){return`${Ls}${encodeURIComponent(e)}`}function ln(e){try{const n=sessionStorage.getItem(wn(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return _s()??!1}function Ps(e,n){try{sessionStorage.setItem(wn(e),n?"1":"0")}catch{}}function Ds(e,n){const t=r.useRef(new Map),s=r.useRef({}),i=r.useCallback((u,d=t.current.get(u))=>{if(!d)return;const m=s.current[u]??js(e,u);if(m<=0)return;const c=Math.max(0,d.scrollWidth-d.clientWidth),g=Math.min(m,c);Math.abs(d.scrollLeft-g)>1&&(d.scrollLeft=g)},[e]),l=r.useCallback(()=>{for(const u of Rs)i(u)},[i]);r.useLayoutEffect(()=>{l();const u=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(u)},[e,l,n]);const f=r.useCallback((u,d)=>{if(!d){t.current.delete(u);return}t.current.set(u,d),i(u,d)},[i]);return{handleLaneScroll:r.useCallback((u,d)=>{const m=d.currentTarget.scrollLeft;s.current[u]=m,Cs(e,u,m)},[e]),setLaneScrollNode:f}}function Ms({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 zs({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 Os({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:l,onAddCodexLane:f,sourceCount:b,eventCount:u,degraded:d=!1,onRetry:m}){const c=!!e,g=c?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",p=c?`${e} has no activity in the last ${t}.`:s?`Scout checked ${b.toLocaleString()} session source${b===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.",v=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.",w=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:g}),o.jsx("p",{children:p}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:v})]}),o.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[d&&m?o.jsx("button",{type:"button",onClick:m,children:"Retry tail scan"}):null,w?o.jsxs("button",{type:"button",onClick:()=>i(w),children:["Look back ",pn(w)]}):null,o.jsx("button",{type:"button",onClick:l,children:"Show attention"}),o.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function $s({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:l,isNew:f,nowMs:b,traceWindowMs:u,traceWindowLabel:d,summaryHeight:m,onSummaryResizeStart:c,onSummaryResizeReset:g,summaryResizing:p,onInspect:v,onTraceEventSelect:w,onTogglePin:P,onWidthChange:L,onWidthResizeStart:R,widthResizing:C,focusProps:S,operatorName:D,grid:I=!1}){const{agent:M,observe:y,source:k}=e,x=zt(y),A=!!y,z=x?" s-agent-lane--live":"",j=f?" s-agent-lane--new":"",[H,V]=r.useState(!0),[F,J]=r.useState(()=>ln(e.id)),Q=r.useRef(e.id);r.useEffect(()=>{if(Q.current!==e.id){Q.current=e.id,J(ln(e.id));return}Ps(e.id,F)},[F,e.id]);const Le=S?.ref,G=S?{"data-cursor":S["data-cursor"],tabIndex:S.tabIndex,onFocus:S.onFocus}:void 0,K=()=>o.jsx("section",{className:"s-agent-lane-trace","aria-label":`${X(M,k)} trace`,children:o.jsx("div",{className:"s-agent-lane-body",children:A?o.jsx(Jn,{data:y??void 0,agentId:e.source==="scout"?M.id:void 0,sessionId:M.harnessSessionId,showRail:!1,variant:"lane",nowMs:b,traceWindowMs:u,traceWindowLabel:d,laneCollapseTechnicalEvents:F,onLaneCollapseTechnicalEventsChange:J,laneOperatorName:D,onLaneEventSelect:W=>w(e,W)}):o.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})}),O=r.useMemo(()=>St(e,{isLive:x,nowMs:b}),[e,x,b]),U=r.useMemo(K,[A,y,e.source,M.id,M.harnessSessionId,b,u,d,F,D,w,e]);return o.jsxs("article",{ref:Le,"data-lane-id":e.id,className:`s-agent-lane${I?" s-agent-lane--grid":""}${z}${j}${s?" s-agent-lane--pinned":""}${S?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:I?void 0:{"--lane-width":`${n}px`},...G,children:[o.jsx(bt,{title:t,width:i,defaultWidth:l,pinned:s,onTogglePin:P,onWidthChange:L,onResizeStart:R,resizing:C,statusLabel:Ln(M,k),live:x,widthControls:!I}),o.jsx(vt,{model:O,avatar:o.jsx(Zn,{agent:M,placement:"row",size:44,presence:!1,tile:!1}),collapsed:H,cockpitHeight:H?void 0:m,onToggleCollapsed:()=>V(W=>!W),onOpen:()=>v(e)}),!H&&o.jsx(jt,{onResizeStart:c,onReset:g,active:p}),U]})}function Fs({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:l,harnessFilter:f,projectFilter:b}){Yn("Lanes",s);const u=r.useContext(Un),d=t?.agents??n??u?.agents??[],m=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,c=l??hn(),g=i??gn(),p=!s&&u?.route.view==="ops"&&u.route.mode==="world",[v,w]=r.useState(Date.now()),[P,L]=r.useState("4h"),[R,C]=r.useState(Is),[S,D]=r.useState(()=>p?"floor":on(s)),[I,M]=r.useState(Ts),y=p,k=!p&&S==="grid",x=y?P:R,[A,z]=r.useState(Nt),[j,H]=r.useState([]),{beginResize:V,resetSummaryHeight:F,resizing:J}=Rt(z),Q=r.useCallback(a=>V(a,A),[V,A]),Le=Mt(),G=Ct(x),K=ns({enabled:!t,includeTranscriptReplay:!0,discoveryIntervalMs:s?Ss:ks,recentLimit:Le,recentWindowMs:G,discoveryLimit:s?bs:vs,pauseWhenHidden:!0}),O=t?.discovery??K.discovery,U=t?.tailEvents??K.events,W=t?.loadState??K.loadState,De=t?.retryInitialLoad??K.retryInitialLoad,Me=t?.terminalSessions??j,En={view:"ops",mode:p?"world":"lanes"},q=pn(x),ze=s?xs:1e4,Oe=s?ws:1e4;r.useEffect(()=>{const a=setInterval(()=>{rn()||w(Date.now())},ze);return()=>clearInterval(a)},[ze]),r.useEffect(()=>{if(t)return;let a=!1;const h=async()=>{if(!rn())try{const Re=await Kn({includeDiscovered:!1});a||H(Re)}catch{a||H([])}};h();const N=setInterval(()=>{h()},Oe),_=dn(()=>{h()});return()=>{a=!0,clearInterval(N),_()}},[t,Oe]),r.useEffect(()=>{try{sessionStorage.setItem(bn,R)}catch{}},[R]),r.useEffect(()=>{D(p?"floor":a=>a==="floor"?on(s):a)},[p,s]),r.useEffect(()=>{if(S!=="floor")try{sessionStorage.setItem(vn,S)}catch{}},[S]),r.useEffect(()=>{try{sessionStorage.setItem(Sn,I)}catch{}},[I]);const Nn=r.useRef(It()),$e=r.useRef(""),[se,Fe]=r.useState(()=>new Set),[ye,We]=r.useState(null),Rn=r.useMemo(()=>d.filter(a=>At(a,v,x)),[d,v,x]),jn=Gn(Rn,{enabled:!t,activeIntervalMs:s?Es:void 0,idleIntervalMs:s?Ns:void 0,pauseWhenHidden:!0}),He=t?.observeCache??jn,Be=Yt(W),Ve=Be==="blank",Cn=Be==="degraded",Ge=O?.totals.transcripts??O?.transcripts?.length??0;r.useEffect(()=>{if(se.size===0)return;const a=setTimeout(()=>Fe(new Set),900);return()=>clearTimeout(a)},[se]);const{lanes:ae,issues:$,freshLaneIds:be}=r.useMemo(()=>{const a=Tt({transcripts:O?.transcripts??[],tailEvents:U,processes:O?.processes??[],scoutAgents:d,terminalSessions:Me,observeCache:He,now:v,workingOnly:!0,horizon:x}),h=_t(a.lanes,Nn.current),N=[...Pt(O),...a.issues];return{lanes:h.lanes,issues:N,freshLaneIds:h.newLaneIds}},[O,U,d,Me,He,v,x]);r.useEffect(()=>{const a=$.map(h=>`${h.id}\0${h.message}`).join(`
|
|
1
|
+
import{r,j as o}from"./index-DReVb7jZ.js";/* empty css */import{a as cn}from"./api-DSqpVKC7.js";import{u as Vn}from"./tail-events-C4WdhVeK.js";import{i as _e,o as dn}from"./surface-activity-B1rgWB1i.js";import{u as Gn}from"./observe-CtS0l3zu.js";import{f as Kn}from"./terminal-sessions-3RfJpen8.js";import{n as un}from"./agent-state-DDhnFEEP.js";import{S as Un}from"./Provider-CNZluAZb.js";import{d as qn}from"./types-B0PlfpKc.js";import{u as Yn}from"./useEmbedHeadline-atkQVfGw.js";import{A as Zn}from"./AgentAvatar-NZOqcsB2.js";import{h as Xn,S as Jn}from"./SessionObserve-B64YsYhy.js";import{X as Qn,Y as fn,Z as et,_ as nt,$ as tt,a0 as Qe,a1 as st,a2 as at,a3 as rt,a4 as ot,a5 as it,a6 as Ce,a7 as lt,a8 as ct,a9 as dt,aa as mn,ab as ut,ac as ft,m as hn,n as gn}from"./router-C-MF5-mb.js";import{AgentFloorView as mt}from"./AgentFloorView-A0dDRlRV.js";import{u as ht,s as gt,A as pt,a as Lt,L as yt}from"./AgentLanesPreflight-CcS23wij.js";import{AgentLaneChrome as bt}from"./AgentLaneChrome-fGC-ZrJS.js";import{AgentLaneCard as vt}from"./AgentLaneCard-C4rKLLdT.js";import{a as St}from"./agent-lane-card-model-CeqQGp-8.js";import{c as kt}from"./agent-lane-detail-Ti3trpfH.js";import{i as xt,A as wt}from"./AgentLaneDetailSheet-BTF4_th9.js";import{LaneTraceDetailSheet as Et}from"./LaneTraceDetailSheet-jl4XQmEx.js";import{readStoredLaneSummaryHeight as Nt,useLaneSummaryResize as Rt,AgentLaneSummaryResizeHandle as jt}from"./AgentLaneSummaryResize-DgSeA_vS.js";import{A as he,l as X,k as Ct,m as pn,n as It,e as At,g as Tt,p as _t,r as Pt,d as Ln,D as Dt,h as Mt,i as zt}from"./agent-lanes-model-DMAdqCmK.js";import{i as Ot,c as $t,n as en}from"./keyboard-nav-CJXPaHXj.js";import{p as nn}from"./lane-roster-store-Ch9t6lb0.js";function Pe(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Ft(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 Wt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Ht(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 Bt(e,n,t){return Wt(Ft([...n,...e]),t)}const Vt=500;function Ie(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):null}function Gt(e){return JSON.stringify([Ie(e.recentLimit),e.includeTranscriptReplay,Ie(e.recentWindowMs),e.discoveryScope??null,Ie(e.discoveryLimit)])}function Kt(e,n){return e==="error"||n==="error"}function Ut(e,n){return n?Math.min(e,Vt):e}async function qt(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 Yt(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const Zt=500,Xt=6e4;function Jt(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function Qt(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 cn(`/api/tail/recent?${s.toString()}`)).events??[]}function es(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 ns(e){const n=e?.recentLimit??Zt,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Xt,i=e?.includeTranscriptReplay??!1,l=e?.discoveryScope,f=e?.discoveryLimit,b=e?.recentWindowMs,u=e?.pauseWhenHidden??!1,d=Gt({recentLimit:n,includeTranscriptReplay:i,recentWindowMs:b,discoveryScope:l,discoveryLimit:f}),[m,c]=r.useState(null),[g,p]=r.useState([]),[v,w]=r.useState({discovery:"loading",recent:"loading",discoveryLoaded:!1,recentLoaded:!1}),P=r.useRef("loading"),L=r.useRef("idle"),R=r.useRef(null),C=r.useRef(null),S=r.useRef(0);Vn(y=>{p(k=>Ht(k,y,n))},t);const D=r.useCallback((y=!1)=>{if(!t||u&&!y&&!_e())return Promise.resolve();y&&(P.current="loading",w(j=>({...j,recent:"loading"})));const k=d,x=C.current;if(x?.key===k)return x.promise;const A=++S.current;L.current=i?"loading":"ready";let z;return z=qt({includeTranscriptReplay:i,load:j=>Qt(j?n:Ut(n,i),j,b),publish:(j,H)=>{if(A!==S.current)return;const V=()=>{p(F=>Bt(F,j,n))};H==="replay"?r.startTransition(V):V()},markReady:()=>{A===S.current&&(P.current="ready",w(j=>({...j,recent:"ready",recentLoaded:!0})))}}).then(j=>{A===S.current&&(i&&(L.current=j.replay==="failed"?"error":"ready"),j.replay!=="failed"&&(R.current=d))}).catch(()=>{A===S.current&&(P.current="error",i&&(L.current="error"),w(j=>({...j,recent:"error"})))}).finally(()=>{C.current?.promise===z&&(C.current=null)}),C.current={key:k,promise:z},z},[t,d,i,u,n,b]),I=r.useCallback(async(y=!1)=>{if(t&&!(u&&!y&&!_e())){y&&w(k=>({...k,discovery:"loading"}));try{const k=await cn(es(l,f));c(k),w(x=>({...x,discovery:"ready",discoveryLoaded:!0})),Kt(P.current,L.current)&&D()}catch{c(k=>k??Jt()),w(k=>({...k,discovery:"error"}))}}},[f,l,t,u,D]),M=r.useCallback(async()=>{await Promise.all([I(!0),D(!0)])},[I,D]);return r.useEffect(()=>{if(!t)return;let y=!1,k=!0;const x=()=>{y||I(k),k=!1};x();const A=setInterval(x,s),z=u?dn(x):null;return()=>{y=!0,clearInterval(A),z?.()}},[s,t,u,I]),r.useEffect(()=>{t||(S.current+=1,C.current=null,R.current=null,L.current="idle")},[t]),r.useEffect(()=>{t&&R.current!==d&&D(!0)},[t,d,D]),{discovery:m,events:g,loadState:v,refreshDiscovery:I,retryInitialLoad:M}}function ts({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s,onTogglePin:i}){const[l,f]=r.useState(-1),b=r.useRef(new Map);r.useEffect(()=>{if(l<0)return;if(l>=e.length){f(e.length-1);return}const m=e[l];if(!m)return;const c=b.current.get(m.id);c?.scrollIntoView({block:"nearest",inline:"nearest"}),c?.focus()},[l,e]),r.useEffect(()=>{n||l>=e.length&&f(e.length>0?e.length-1:-1)},[l,n,e.length]);const u=r.useCallback((m,c)=>{c?b.current.set(m,c):b.current.delete(m)},[]);r.useEffect(()=>{const m=c=>{if(!document.querySelector(".s-agent-lanes")||Ot(c.target)||$t()||n||e.length===0)return;const g=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&g>=0&&g<he.length){c.preventDefault(),s(he[g].key);return}if(c.key==="ArrowDown"||c.key==="j"){c.preventDefault(),f(p=>en(p,e.length,1));return}if(c.key==="ArrowUp"||c.key==="k"){c.preventDefault(),f(p=>en(p,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 p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),t(v);return}if(c.key.toLowerCase()==="p"&&i){const p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),i(v)}};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l,n,e,s,t,i]);const d=r.useCallback((m,c)=>({"data-cursor":l===m?!0:void 0,tabIndex:l===m?0:-1,ref:g=>u(c,g),onFocus:()=>f(m)}),[l,u]);return{focusedIndex:l,getLaneFocusProps:d}}function ss(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function yn(e,n){if(!n)return!0;const t=me(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=ss(i);return l===n||me(i)===t||!!(f&&(f.toLowerCase()===n||me(f)===t))})}function as(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.harness,s.definitionId,i?.attribution,l],t)}function rs(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.project,s.projectRoot,s.cwd,i?.cwd,X(s,l)],t)}function os(e){return un(e.agent.state??null,e.agent)==="needs_attention"?!0:Xn(e.observe?.events??[])}function tn(e,n,t,s){return fn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function is(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>as(t,e.harness));case"project":return n.filter(t=>rs(t,e.projectPath));case"attention":return n.filter(t=>os(t));default:return[]}}function sn(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=et(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function ls(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,l=[],f=[],b=[],u=new Map(t.laneDefs.map(g=>[g.id,g]));for(const g of Qn(t.slots)){const p=u.get(g.laneDefId);if(!p)continue;const v=is(p,n),w=g.zone==="pinned_left"?l:g.zone==="pinned_right"?b:f;for(const P of v)sn(w,i,{lane:P,zone:g.zone,position:g.position,widthPx:tn(t,P,g,s),slot:g,laneDef:p})}if(t.showAutoLanes){let g=0;for(const p of n)i.has(p.id)||(sn(f,i,{lane:p,zone:"main",position:g,widthPx:tn(t,p,void 0,s)}),g+=1)}const d=Ae(l),m=Ae(f),c=Ae(b);return{pinnedLeft:d,main:m,pinnedRight:c,flat:[...d,...m,...c]}}function cs(e){return e.slots.some(n=>n.laneDefId===tt)}function fe(e,n){const t=`harness:${me(n)}`;return e.slots.some(s=>s.laneDefId===t)}function ds(e,n){const t=nt(n);return e.slots.some(s=>s.laneDefId===t)}function us(e,n,t){const[s,i]=r.useState(()=>Qe(e,n));r.useEffect(()=>{i(Qe(e,n))},[n,e]);const l=r.useCallback(L=>{st(L),i(L)},[]),f=r.useMemo(()=>ls({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),b=r.useCallback((L,R="pinned_left")=>{l(at(s,{laneId:L.id,title:X(L.agent,L.source),zone:R,width:s.laneWidths[L.id]}))},[s,l]),u=r.useCallback(L=>{l(rt(s,L))},[s,l]),d=r.useCallback((L,R)=>{l(ot(s,L,R))},[s,l]),m=r.useCallback(L=>{l(it(s,L))},[s,l]),c=r.useCallback((L,R)=>{l(Ce(s,{kind:"harness",title:R??`${L} sessions`,harness:L,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,l]),g=r.useCallback((L,R)=>{const C=L.trim();if(!C)return;const S=R?.trim()||C.split(/[\\/]/u).filter(Boolean).pop()||C;l(Ce(s,{kind:"project",title:S,projectPath:C,zone:"main",width:s.defaultLaneWidth}))},[s,l]),p=r.useCallback(()=>{l(Ce(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,l]),v=r.useCallback(()=>{l(lt(s))},[s,l]),w=r.useCallback(L=>ct(s,L),[s]),P=r.useCallback(L=>dt(s,L),[s]);return{deck:s,layout:f,pinLane:b,unpinLane:u,setLaneWidth:d,setDefaultLaneWidth:m,addHarnessLane:c,addAttentionLane:p,addProjectLane:g,clearPins:v,isPinned:w,pinnedZone:P}}function fs(e){const[n,t]=r.useState(null),s=r.useRef({laneId:"",x:0,width:512}),i=r.useRef(512),l=r.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=r.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const d=mn(i.current);e(s.current.laneId,d.tier??d.px)}return null})},[e]);r.useEffect(()=>{if(!n)return;const u=m=>{const c=m.clientX-s.current.x;i.current=Math.min(ut,Math.max(ft,s.current.width+c));const g=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);g&&g.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 b=r.useCallback((u,d)=>{e(u,d),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:l,resetLaneWidth:b,resizingLaneId:n}}const an=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],ms=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function hs(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function gs(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function ps(e){return e?an.filter(n=>n.key!=="floor"):an}const bn="openscout:agent-lanes-horizon",vn="openscout:agent-lanes-layout",Sn="openscout:agent-lanes-grid-columns",kn="openscout:agent-lanes-technical-rollup",Ls=`${kn}:lane:`,ys="openscout:agent-lanes-scroll",bs=96,vs=160,Ss=6e4,ks=6e4,xs=3e4,ws=3e4,Es=3e4,Ns=12e4,Rs=["pinned-left","main","pinned-right"];function rn(){return!_e()}function xn(e,n){return`${ys}:${e}:${n}`}function js(e,n){try{const t=sessionStorage.getItem(xn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function Cs(e,n,t){try{sessionStorage.setItem(xn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function Is(){try{const e=sessionStorage.getItem(bn);if(e&&he.some(n=>n.key===e))return e}catch{}return Dt}function As(e){try{const n=sessionStorage.getItem(vn);return hs(n,e)}catch{}return"lanes"}function on(e){const n=As(e);return n==="floor"?"lanes":n}function Ts(){try{return gs(sessionStorage.getItem(Sn))}catch{return"auto"}}function _s(){try{const e=sessionStorage.getItem(kn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function wn(e){return`${Ls}${encodeURIComponent(e)}`}function ln(e){try{const n=sessionStorage.getItem(wn(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return _s()??!1}function Ps(e,n){try{sessionStorage.setItem(wn(e),n?"1":"0")}catch{}}function Ds(e,n){const t=r.useRef(new Map),s=r.useRef({}),i=r.useCallback((u,d=t.current.get(u))=>{if(!d)return;const m=s.current[u]??js(e,u);if(m<=0)return;const c=Math.max(0,d.scrollWidth-d.clientWidth),g=Math.min(m,c);Math.abs(d.scrollLeft-g)>1&&(d.scrollLeft=g)},[e]),l=r.useCallback(()=>{for(const u of Rs)i(u)},[i]);r.useLayoutEffect(()=>{l();const u=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(u)},[e,l,n]);const f=r.useCallback((u,d)=>{if(!d){t.current.delete(u);return}t.current.set(u,d),i(u,d)},[i]);return{handleLaneScroll:r.useCallback((u,d)=>{const m=d.currentTarget.scrollLeft;s.current[u]=m,Cs(e,u,m)},[e]),setLaneScrollNode:f}}function Ms({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 zs({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 Os({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:l,onAddCodexLane:f,sourceCount:b,eventCount:u,degraded:d=!1,onRetry:m}){const c=!!e,g=c?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",p=c?`${e} has no activity in the last ${t}.`:s?`Scout checked ${b.toLocaleString()} session source${b===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.",v=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.",w=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:g}),o.jsx("p",{children:p}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:v})]}),o.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[d&&m?o.jsx("button",{type:"button",onClick:m,children:"Retry tail scan"}):null,w?o.jsxs("button",{type:"button",onClick:()=>i(w),children:["Look back ",pn(w)]}):null,o.jsx("button",{type:"button",onClick:l,children:"Show attention"}),o.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function $s({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:l,isNew:f,nowMs:b,traceWindowMs:u,traceWindowLabel:d,summaryHeight:m,onSummaryResizeStart:c,onSummaryResizeReset:g,summaryResizing:p,onInspect:v,onTraceEventSelect:w,onTogglePin:P,onWidthChange:L,onWidthResizeStart:R,widthResizing:C,focusProps:S,operatorName:D,grid:I=!1}){const{agent:M,observe:y,source:k}=e,x=zt(y),A=!!y,z=x?" s-agent-lane--live":"",j=f?" s-agent-lane--new":"",[H,V]=r.useState(!0),[F,J]=r.useState(()=>ln(e.id)),Q=r.useRef(e.id);r.useEffect(()=>{if(Q.current!==e.id){Q.current=e.id,J(ln(e.id));return}Ps(e.id,F)},[F,e.id]);const Le=S?.ref,G=S?{"data-cursor":S["data-cursor"],tabIndex:S.tabIndex,onFocus:S.onFocus}:void 0,K=()=>o.jsx("section",{className:"s-agent-lane-trace","aria-label":`${X(M,k)} trace`,children:o.jsx("div",{className:"s-agent-lane-body",children:A?o.jsx(Jn,{data:y??void 0,agentId:e.source==="scout"?M.id:void 0,sessionId:M.harnessSessionId,showRail:!1,variant:"lane",nowMs:b,traceWindowMs:u,traceWindowLabel:d,laneCollapseTechnicalEvents:F,onLaneCollapseTechnicalEventsChange:J,laneOperatorName:D,onLaneEventSelect:W=>w(e,W)}):o.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})}),O=r.useMemo(()=>St(e,{isLive:x,nowMs:b}),[e,x,b]),U=r.useMemo(K,[A,y,e.source,M.id,M.harnessSessionId,b,u,d,F,D,w,e]);return o.jsxs("article",{ref:Le,"data-lane-id":e.id,className:`s-agent-lane${I?" s-agent-lane--grid":""}${z}${j}${s?" s-agent-lane--pinned":""}${S?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:I?void 0:{"--lane-width":`${n}px`},...G,children:[o.jsx(bt,{title:t,width:i,defaultWidth:l,pinned:s,onTogglePin:P,onWidthChange:L,onResizeStart:R,resizing:C,statusLabel:Ln(M,k),live:x,widthControls:!I}),o.jsx(vt,{model:O,avatar:o.jsx(Zn,{agent:M,placement:"row",size:44,presence:!1,tile:!1}),collapsed:H,cockpitHeight:H?void 0:m,onToggleCollapsed:()=>V(W=>!W),onOpen:()=>v(e)}),!H&&o.jsx(jt,{onResizeStart:c,onReset:g,active:p}),U]})}function Fs({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:l,harnessFilter:f,projectFilter:b}){Yn("Lanes",s);const u=r.useContext(Un),d=t?.agents??n??u?.agents??[],m=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,c=l??hn(),g=i??gn(),p=!s&&u?.route.view==="ops"&&u.route.mode==="world",[v,w]=r.useState(Date.now()),[P,L]=r.useState("4h"),[R,C]=r.useState(Is),[S,D]=r.useState(()=>p?"floor":on(s)),[I,M]=r.useState(Ts),y=p,k=!p&&S==="grid",x=y?P:R,[A,z]=r.useState(Nt),[j,H]=r.useState([]),{beginResize:V,resetSummaryHeight:F,resizing:J}=Rt(z),Q=r.useCallback(a=>V(a,A),[V,A]),Le=Mt(),G=Ct(x),K=ns({enabled:!t,includeTranscriptReplay:!0,discoveryIntervalMs:s?Ss:ks,recentLimit:Le,recentWindowMs:G,discoveryLimit:s?bs:vs,pauseWhenHidden:!0}),O=t?.discovery??K.discovery,U=t?.tailEvents??K.events,W=t?.loadState??K.loadState,De=t?.retryInitialLoad??K.retryInitialLoad,Me=t?.terminalSessions??j,En={view:"ops",mode:p?"world":"lanes"},q=pn(x),ze=s?xs:1e4,Oe=s?ws:1e4;r.useEffect(()=>{const a=setInterval(()=>{rn()||w(Date.now())},ze);return()=>clearInterval(a)},[ze]),r.useEffect(()=>{if(t)return;let a=!1;const h=async()=>{if(!rn())try{const Re=await Kn({includeDiscovered:!1});a||H(Re)}catch{a||H([])}};h();const N=setInterval(()=>{h()},Oe),_=dn(()=>{h()});return()=>{a=!0,clearInterval(N),_()}},[t,Oe]),r.useEffect(()=>{try{sessionStorage.setItem(bn,R)}catch{}},[R]),r.useEffect(()=>{D(p?"floor":a=>a==="floor"?on(s):a)},[p,s]),r.useEffect(()=>{if(S!=="floor")try{sessionStorage.setItem(vn,S)}catch{}},[S]),r.useEffect(()=>{try{sessionStorage.setItem(Sn,I)}catch{}},[I]);const Nn=r.useRef(It()),$e=r.useRef(""),[se,Fe]=r.useState(()=>new Set),[ye,We]=r.useState(null),Rn=r.useMemo(()=>d.filter(a=>At(a,v,x)),[d,v,x]),jn=Gn(Rn,{enabled:!t,activeIntervalMs:s?Es:void 0,idleIntervalMs:s?Ns:void 0,pauseWhenHidden:!0}),He=t?.observeCache??jn,Be=Yt(W),Ve=Be==="blank",Cn=Be==="degraded",Ge=O?.totals.transcripts??O?.transcripts?.length??0;r.useEffect(()=>{if(se.size===0)return;const a=setTimeout(()=>Fe(new Set),900);return()=>clearTimeout(a)},[se]);const{lanes:ae,issues:$,freshLaneIds:be}=r.useMemo(()=>{const a=Tt({transcripts:O?.transcripts??[],tailEvents:U,processes:O?.processes??[],scoutAgents:d,terminalSessions:Me,observeCache:He,now:v,workingOnly:!0,horizon:x}),h=_t(a.lanes,Nn.current),N=[...Pt(O),...a.issues];return{lanes:h.lanes,issues:N,freshLaneIds:h.newLaneIds}},[O,U,d,Me,He,v,x]);r.useEffect(()=>{const a=$.map(h=>`${h.id}\0${h.message}`).join(`
|
|
2
2
|
`);a!==$e.current&&($e.current=a,$.length!==0&&console.warn(`[agent-lanes] ${$.length} roster issue${$.length===1?"":"s"}`,$))},[$]),r.useEffect(()=>{be.length!==0&&Fe(a=>{const h=new Set(a);for(const N of be)h.add(N);return h})},[be.join("\0")]);const ee=r.useMemo(()=>ae.find(a=>a.id===ye)??null,[ye,ae]),ve=r.useMemo(()=>ae.filter(a=>Hs(a,{harnessFilter:f,projectFilter:b})),[ae,f,b]),In=r.useCallback(a=>Bs(a,{harnessFilter:f,projectFilter:b}),[f,b]),{deck:T,layout:E,pinLane:re,unpinLane:oe,setLaneWidth:Se,addHarnessLane:ne,addAttentionLane:Ke,addProjectLane:An,clearPins:Tn,isPinned:ie}=us(c,g,ve),{beginResize:Ue,resizingLaneId:qe}=fs(Se),ke=r.useMemo(()=>Vs({harnessFilter:f,projectFilter:b}),[f,b]),xe=r.useMemo(()=>ee?kt(ee):null,[ee]),_n=r.useMemo(()=>xe?ds(T,xe):!1,[T,xe]),Pn=r.useMemo(()=>[E.pinnedLeft,E.main,E.pinnedRight].map(a=>a.map(h=>`${h.key}:${h.widthPx}`).join(",")).join("/"),[E.main,E.pinnedLeft,E.pinnedRight]),{handleLaneScroll:Y,setLaneScrollNode:Z}=Ds(c,Pn),Dn=r.useCallback(a=>{Z("pinned-left",a)},[Z]),Mn=r.useCallback(a=>{Z("main",a)},[Z]),zn=r.useCallback(a=>{Z("pinned-right",a)},[Z]),On=r.useCallback(a=>{Y("pinned-left",a)},[Y]),$n=r.useCallback(a=>{Y("main",a)},[Y]),Fn=r.useCallback(a=>{Y("pinned-right",a)},[Y]),te=E.flat,we=E.pinnedLeft.length+E.pinnedRight.length,le=y?ve.length:te.length,ce=ht(gt(W,le),Ve?0:yt);r.useEffect(()=>{if(y)return;const a=te.map(h=>{const{lane:N}=h;return{id:N.id,label:X(N.agent,N.source),statusLabel:Ln(N.agent,N.source),tone:un(N.agent.state,N.agent),agentId:xt(N.agent)?void 0:N.agent.id,updatedAt:N.lastActiveAt>0?N.lastActiveAt:void 0}});nn(a)},[te,y]),r.useEffect(()=>()=>nn(null),[]);const[Ye,Ee]=r.useState(null),Ne=r.useCallback(a=>{We(a.id)},[]),Ze=r.useCallback((a,h)=>{Ee({lane:a,event:h})},[]),Wn=r.useCallback(a=>{const h=a.observe?.events.at(-1);h&&Ee({lane:a,event:h})},[]),Hn=r.useCallback(a=>{ie(a.id)?oe(a.id):re(a)},[ie,re,oe]),{getLaneFocusProps:Xe}=ts({lanes:te.map(a=>a.lane),inspectedLaneId:ye,onInspect:Ne,onHorizonChange:C,onTogglePin:Hn}),[de,B]=r.useState(!1),Je=r.useRef(null);r.useEffect(()=>{if(!de)return;const a=h=>{Je.current?.contains(h.target)||B(!1)};return window.addEventListener("pointerdown",a),()=>window.removeEventListener("pointerdown",a)},[de]);const ue=r.useCallback((a,h,N=!1)=>{const{lane:_}=a,Re=X(_.agent,_.source),Bn=T.laneWidths[_.id]??mn(a.widthPx).tier??a.widthPx;return o.jsx($s,{lane:_,widthPx:a.widthPx,laneTitle:Re,pinned:a.isPinned,laneWidth:Bn,defaultWidth:T.defaultLaneWidth,isNew:se.has(_.id),nowMs:v,traceWindowMs:G,traceWindowLabel:q,summaryHeight:A,onSummaryResizeStart:Q,onSummaryResizeReset:F,summaryResizing:J,onInspect:Ne,onTraceEventSelect:Ze,onTogglePin:()=>{ie(_.id)?oe(_.id):re(_)},onWidthChange:je=>Se(_.id,je),onWidthResizeStart:je=>Ue(_.id,je,a.widthPx),widthResizing:qe===_.id,focusProps:Xe(h,_.id),operatorName:m,grid:N},a.key)},[Ue,T.defaultLaneWidth,T.laneWidths,Xe,Q,q,Ne,Ze,ie,m,se,v,re,F,qe,Se,A,J,G,oe]);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":y?"floor":S,"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:y?"World":"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:[le," ",y?"actors":"live"]}),!y&&we>0?o.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[we," pinned"]}):null,o.jsx("span",{className:"s-agent-lanes-meta-stat",children:y?`history 15m · actors ${q}`:`trace ${q}`}),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:ps(s).map(a=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${S===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":a.key==="floor"?y:!y&&S===a.key,onClick:()=>{D(a.key),a.key==="floor"?e({view:"ops",mode:"world"}):p&&e({view:"ops",mode:"lanes"})},children:a.label},a.key))}),k?o.jsx("div",{className:"s-agent-lanes-grid-density",role:"group","aria-label":"Grid columns",children:ms.map(a=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${I===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":I===a.key,title:a.key==="auto"?"Fit columns to the available width":`${a.key} columns`,onClick:()=>M(a.key),children:a.label},a.key))}):null,o.jsxs("div",{className:"s-agent-lanes-deck-menu",ref:Je,hidden:y,children:[o.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":de,onClick:()=>B(a=>!a),children:"+ Lane"}),de?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:()=>{Ke(),B(!1)},disabled:cs(T),children:"Needs attention"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("codex","Codex sessions"),B(!1)},disabled:fe(T,"codex"),children:"Codex sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("claude","Claude sessions"),B(!1)},disabled:fe(T,"claude"),children:"Claude sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("grok","Grok sessions"),B(!1)},disabled:fe(T,"grok"),children:"Grok sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("kimi","Kimi sessions"),B(!1)},disabled:fe(T,"kimi"),children:"Kimi sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item s-agent-lanes-deck-item--danger",onClick:()=>{Tn(),B(!1)},disabled:we===0,children:"Clear pinned lanes"})]}):null]}),o.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":y?"Map activity window":"Activity window",children:he.map((a,h)=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${x===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":x===a.key,title:`${a.label} window (${h+1})`,onClick:()=>y?L(a.key):C(a.key),children:a.label},a.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(a=>o.jsx(Ms,{issue:a},a.id))})]}):null,le===0?ce.visible?o.jsx(pt,{discovery:O,discoveryPhase:W.discovery,windowMs:G,nowMs:v,layout:y?"none":k?"grid":"scroll",gridColumns:I,laneWidthPx:fn(T.defaultLaneWidth,T.defaultLaneWidth),matchTranscript:In}):Ve?o.jsx(zs,{loadState:W,onRetry:()=>{De()}}):o.jsx(Os,{activeFilterLabel:ke,horizon:R,horizonLabel:q,showAutoLanes:T.showAutoLanes,onHorizonChange:C,onAddAttentionLane:Ke,onAddCodexLane:()=>ne("codex","Codex sessions"),sourceCount:Ge,eventCount:U.length,degraded:Cn,onRetry:()=>{De()}}):y?o.jsx(mt,{lanes:ve,now:v,onOpenTrace:Wn,railLedger:!0,operatorName:m}):k?o.jsx("div",{className:"s-agent-lanes-grid","data-grid-columns":I,role:"listbox","aria-label":"Agent lane grid",children:te.map((a,h)=>ue(a,h,!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:Dn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:On,children:E.pinnedLeft.map((a,h)=>ue(a,h))})]}):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:Mn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:$n,children:E.main.map((a,h)=>ue(a,E.pinnedLeft.length+h))})]}):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:zn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:Fn,children:E.pinnedRight.map((a,h)=>ue(a,E.pinnedLeft.length+E.main.length+h))})]}):null]}),ce.visible?o.jsx(Lt,{loadState:W,sourceCount:Ge,processCount:O?.processes.length??0,eventCount:U.length,laneCount:le,horizonLabel:q,handedOff:ce.exiting,exiting:ce.exiting}):null,ee&&o.jsx(wt,{lane:ee,navigate:e,returnRoute:En,navigationEnabled:t==null,onClose:()=>We(null),onPinProject:An,projectPinned:_n}),Ye&&o.jsx(Et,{target:Ye,onClose:()=>Ee(null)})]})}function ge(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 Ws(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function pe(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=Ws(i);return l===n||Te(i)===t||!!(f&&(f.toLowerCase()===n||Te(f)===t))})}function Hs(e,n){const t=ge(n.harnessFilter),s=ge(n.projectFilter),{agent:i,facts:l,source:f}=e;return pe([i.harness,i.definitionId,l?.attribution,f],t)&&pe([i.project,i.projectRoot,i.cwd,l?.cwd,X(i,f)],s)}function Bs(e,n){return pe([e.harness,e.source],ge(n.harnessFilter))&&pe([e.project,e.cwd],ge(n.projectFilter))}function Vs(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const Gs=qn({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:hn(),laneSize:gn(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),ya=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:Fs,scoutSurface:Gs},Symbol.toStringTag,{value:"Module"}));export{Fs as A,ya as a,ls as r,ns as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as t}from"./index-
|
|
1
|
+
import{r as i,j as t}from"./index-DReVb7jZ.js";import{n as W,d as q,e as D}from"./agent-state-DDhnFEEP.js";import{a as G}from"./api-DSqpVKC7.js";import{q as M}from"./terminal-takeover-CZZsnPzj.js";import{t as S}from"./time-Dhsh_2EG.js";import{u as U}from"./Provider-CNZluAZb.js";import{o as N}from"./openContent-C6XO6kr5.js";import{E as F}from"./eye-CsGfEVR6.js";import{T as H}from"./terminal-DMZjX1es.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,d=e.terminalSurface??(e.transport==="tmux"&&e.harnessSessionId?{backend:"tmux",sessionName:e.harnessSessionId,paneId:null,socketDir:null}:null),o=a?.activeSessionId??(d?e.harnessSessionId??d.sessionName:null),T=i.useMemo(()=>a?.sessions.find(s=>s.id===o)??null,[o,a?.sessions]);W(e.state);const n=!!(d&&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",u=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){u("takeover");return}const s=a?.resumeCommand;s&&(b(!0),M({command:s,cwd:a?.resumeCwd,agentId:e.id}).then(()=>u("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?u("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 o,j as e}from"./index-DReVb7jZ.js";import{A as O}from"./AgentAvatar-NZOqcsB2.js";import{H as W}from"./HarnessMark-DSvM_H7H.js";import{u as q,b as I,f as V}from"./use-fleet-active-asks-D_QOmjg5.js";import{p as z,N as K,t as U}from"./sessions-view-Bge4XZ4I.js";import{t as G}from"./time-Dhsh_2EG.js";import{a as H}from"./api-DSqpVKC7.js";import{u as J}from"./use-conversation-list-D5EnpVba.js";import{u as D}from"./router-C-MF5-mb.js";import{u as Q}from"./Provider-CNZluAZb.js";import{CommsFlowView as X}from"./CommsFlowGraph-voDD9M5R.js";import{mapIdentities as Y}from"./CommsFlowMap-C33sgD48.js";import{p as Z,f as tt,e as et,a as st}from"./comms-gesture-_aGFo6g3.js";import{u as rt,a as at}from"./use-beside-D3cJpA5p.js";import{ConversationScreen as ot}from"./ConversationScreen-tpj4cqWs.js";import{b as it,s as nt}from"./agent-master-model-C-KdOFDK.js";/* empty css */import{P as mt}from"./panel-right-qP17MwMl.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-zgzC3cbU.js";import"./colors-CFlbwC25.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./message-visibility-DwxgcgYK.js";import"./machine-scope-DJt9RZ2w.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./provider-DwmCoSlc.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./CommsCanvas-DdNAwjGW.js";import"./comms-deck-CBhsXnY-.js";import"./CommsSelection-BL8aYD7z.js";/* empty css */import"./ConversationComposer-DNcn5U6D.js";import"./zap-B4X0OrEw.js";import"./message-markup-6Tgo4qFJ.js";import"./mentions-Ck_Vjnyp.js";import"./AgentDetailCard-MIEBKw_S.js";import"./AgentLiveActions-6Kfr1uOT.js";import"./terminal-takeover-CZZsnPzj.js";import"./openContent-C6XO6kr5.js";import"./eye-CsGfEVR6.js";import"./terminal-DMZjX1es.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-Y9TEJxP_.js";import"./BackToPicker-CkBhGRlD.js";import"./AstronautSuit-D67fIBdR.js";import"./ConversationFeedRows-RnYSa7Io.js";import"./ConversationPanels-6pprBpmq.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-CiaZHMnk.js";import"./proxy-DgzP27W8.js";import"./activity-BJqFrZyB.js";import"./message-circle-cI5_A5mj.js";import"./tail-events-C4WdhVeK.js";import"./ConversationStatus-Cv-7hErW.js";import"./check-g7D7-c1J.js";import"./sparkles-Cc5lPZRv.js";const lt=500;function ct(s,n){const[i,l]=o.useState([]),[f,c]=o.useState(!1),[m,d]=o.useState(null);return o.useEffect(()=>{if(l([]),!n||!s){c(!1),d(null);return}let a=!0;return c(!0),d(null),H(`/api/messages?actor=${encodeURIComponent(s)}&limit=${lt}`).then(r=>{a&&l([...r].sort((x,v)=>x.createdAt-v.createdAt))}).catch(r=>{a&&(l([]),d(r instanceof Error?r.message:"Could not load this agent's messages."))}).finally(()=>{a&&c(!1)}),()=>{a=!1}},[s,n]),{messages:i,loading:f,error:m}}const pt=[{id:"chat",label:"Chat",hint:"The conversation on the stage"},{id:"flow",label:"Flow",hint:"Who asked whom across everything this agent is in"},{id:"map",label:"Map",hint:"Who this agent exchanges work with, and on which model"},{id:"canvas",label:"Canvas",hint:"The same window laid out left to right, with nobody folded away"}];function dt(s,n){const{messages:i,loading:l,error:f}=ct(s,n),{passes:c,flights:m}=o.useMemo(()=>{const a=i.filter(r=>!!r.actorId).map(r=>({id:r.id,conversationId:r.conversationId,actorId:r.actorId,actorName:r.actorName,body:r.body,createdAt:r.createdAt,class:r.class,metadata:r.metadata??null,replyToMessageId:r.replyToMessageId??null}));return et(a)},[i]),d=o.useMemo(()=>st(c,m),[c,m]);return{passes:c,flights:m,tasks:d,loading:l,error:f,count:i.length}}function ts({agentId:s,threadId:n,machineId:i,navigate:l}){const{agents:f}=Q(),c=D(),m=rt(),d=at(l,i),[a,r]=o.useState(()=>{if(typeof window>"u")return"chat";const t=new URLSearchParams(window.location.search).get("view");return t==="flow"||t==="map"||t==="canvas"?t:"chat"}),[x,v]=o.useState(null),b=`${s}\0${n??""}`,S=o.useRef(b);o.useEffect(()=>{S.current!==b&&(S.current=b,r("chat"),v(null))},[b]),o.useEffect(()=>v(null),[a]),o.useEffect(()=>{if(typeof window>"u")return;const t=new URL(window.location.href),h=a==="chat"?"":a;(t.searchParams.get("view")??"")!==h&&(h?t.searchParams.set("view",h):t.searchParams.delete("view"),window.history.replaceState(window.history.state,"",`${t.pathname}${t.search}${t.hash}`))},[a,c.searchStr]);const{sessions:C,loading:T}=J(),N=q(),{agent:g,memberAgentIds:E,sessions:k,master:p,threads:A}=o.useMemo(()=>it({agentId:s,threadId:n,machineId:i,agents:f,sessions:C}),[s,n,i,f,C]),$=o.useMemo(()=>I(N,E),[N,E]),u=dt(s,a!=="chat"),B=o.useMemo(()=>Y(k.flatMap(t=>t.participants??[])),[k]),w=n??p?.id??null,L=o.useMemo(()=>p?[p,...A]:A,[p,A]),_=t=>!!w&&nt(t,w),P=t=>{l({view:"messages",agentId:s,...p&&t.id===p.id?{}:{threadId:t.id},...i?{machineId:i}:{}})},y=g?.name??k[0]?.agentName??s.split(".")[0]??s,R=(()=>{const t=z(g);return t===K?null:t})(),M=ut($),F=[R,M?.label??g?.branch??null].filter(Boolean).join(" · ");return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"amv-head",children:[e.jsx(O,{agent:g??{name:y,harness:p?.harness??null,state:null},placement:"row",size:32}),e.jsxs("div",{className:"amv-ident",children:[e.jsx("span",{className:"amv-name",children:y}),F?e.jsxs("span",{className:"amv-sub",children:[M?e.jsx("span",{className:"amv-dot","data-tone":M.tone,"aria-hidden":!0}):null,F]}):null]}),g?.harness??p?.harness?e.jsx(W,{harness:g?.harness??p?.harness??"",size:14}):null,e.jsx("div",{className:"s-thread-view-toggle",role:"group","aria-label":"View",children:pt.map(t=>e.jsx("button",{type:"button",className:`s-thread-view-option${a===t.id?" is-active":""}`,onClick:()=>r(t.id),"aria-pressed":a===t.id,title:t.hint,children:t.label},t.id))})]}),L.length>0?e.jsx("div",{className:"amv-strip",role:"list","aria-label":"Conversations",children:L.map(t=>{const h=_(t),j=m.has(t.id);return e.jsxs("div",{role:"listitem",className:`amv-card${h?" amv-card--on":""}${j?" amv-card--kept":""}`,children:[e.jsxs("button",{type:"button",className:"amv-cardMain",title:h?"On the stage":"Open on the stage · double-click to keep beside","aria-current":h?"true":void 0,...Z(()=>{r("chat"),P(t)},()=>m.add(t.id)),children:[e.jsx("span",{className:"amv-mark","data-state":ft(t,N),"aria-hidden":!0}),e.jsx("span",{className:"amv-cardTitle",children:U(t)}),e.jsx("span",{className:"amv-cardMeta",children:t.lastMessageAt?G(t.lastMessageAt):"—"})]}),e.jsx("button",{type:"button",className:"amv-cardBeside",title:j?"Close the column beside the stage":"Keep beside the stage","aria-label":j?"Close beside":"Keep beside","aria-pressed":j,onClick:()=>m.toggle(t.id),children:e.jsx(mt,{size:12,strokeWidth:2,"aria-hidden":!0})})]},t.id)})}):null,e.jsx("div",{className:"amv-feed",children:a!=="chat"?u.error?e.jsx("div",{className:"amv-empty",children:u.error}):u.loading&&u.count===0?e.jsx("div",{className:"amv-empty",children:"Loading this agent’s work…"}):u.count===0?e.jsx("div",{className:"amv-empty",children:"Nothing has passed through this agent yet."}):e.jsx(X,{passes:u.passes,flights:u.flights,rootId:tt(s),identities:B,view:a,selected:x,onSelect:v,onStage:t=>{r("chat"),d(t)},beside:m}):w?e.jsx(ot,{conversationId:w,navigate:l,embedded:!0,showBackNav:!1,beside:m},w):e.jsx("div",{className:"amv-empty",children:T?"Loading conversations…":`No conversations with ${y} yet.`})})]})}function ut(s){return s?s.status==="working"?{label:"working",tone:"working"}:s.status==="needs_attention"?{label:"needs you",tone:"attention"}:s.status==="queued"?{label:"starting",tone:"pending"}:null:null}function ht(s){return s.status==="needs_attention"?"needs_you":s.status==="working"||s.status==="queued"?"working":"quiet"}function ft(s,n){const i=V(n,s);return i?ht(i):"quiet"}export{ts 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-DReVb7jZ.js";import{u as K}from"./Provider-CNZluAZb.js";import{o as E}from"./openContent-C6XO6kr5.js";import{a as H}from"./api-DSqpVKC7.js";import{c as P}from"./clipboard-e3fSpeo7.js";import{t as D}from"./time-Dhsh_2EG.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./HarnessMark-DSvM_H7H.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.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(o=>{P(o).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[o,r]=F();return s.jsxs("button",{type:"button",className:l?`ap-sx-copy ${l}`:"ap-sx-copy","data-copied":o||void 0,title:o?"Copied":t??e,"aria-label":`Copy ${e}`,onClick:c=>{c.stopPropagation(),r(e)},children:[s.jsx("span",{className:"ap-sx-copyText",children:a}),s.jsx(B,{copied:o})]})}function Z({session:e,agentId:a,status:t}){const{route:l,navigate:o}=K(),[r,c]=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"),c(null),H(`/api/agents/${encodeURIComponent(a)}/observe`).then(i=>{n||(c(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(o,{view:"sessions",sessionId:e.id},{returnTo:l}),U=()=>E(o,{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,o]=p.useState(!1),c=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":c,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>o(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":c,"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":c,children:c==="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:c}):null]})}function
|
|
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,o]=p.useState(!1),c=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":c,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>o(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":c,"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":c,children:c==="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:c}):null]})}function Ps({agentIds:e,sessions:a}){const t=e??[],l=(a??[]).filter(r=>r.agentId!=null&&t.includes(r.agentId)).slice().sort((r,c)=>(c.lastMessageAt??0)-(r.lastMessageAt??0)).slice(0,8);if(l.length===0)return null;const o=t[0]??"";return s.jsx("div",{className:"ap-sx-list",children:l.map(r=>s.jsx(ss,{session:r,fallbackAgentId:o},r.id))})}export{Ps as AgentSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./index-DReVb7jZ.js";import{A as B}from"./AgentAvatar-NZOqcsB2.js";import{H as S,h as w}from"./HarnessMark-DSvM_H7H.js";import{c as P}from"./agent-state-DDhnFEEP.js";import{f as R}from"./runtime-picker-C_AVYF63.js";import{t as C}from"./time-Dhsh_2EG.js";import"./Provider-CNZluAZb.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./conversation-model-m8HhzroS.js";import"./createLucideIcon-ChvMq-zl.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./loader-circle-DNUsuPWz.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./SpriteAvatar-aHeF4ZQZ.js";import"./CrewAvatar-zgzC3cbU.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 Us({projects:n,initialSelection:e,onEdit:a,onInterrupt:l,onResetContext:i,onOpenConversation:m,onNewAgent:o}){const d=u.useMemo(()=>n.flatMap(t=>t.agents.map(c=>[t,c])),[n]),x=d[0]?.[1],[p,A]=u.useState(e?.agentId??x?.agent.id??null),[F,E]=u.useState(e?.facet??"prompt"),[I,y]=u.useState(()=>new Set(p?[p]:[])),[M,V]=u.useState(""),g=M.trim().toLowerCase(),D=u.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=u.useMemo(()=>{for(const[t,c]of d)if(c.agent.id===p)return{project:t,entry:c};return null},[d,p]),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===p;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,p=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,p&&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(h,{k:"Harness",v:w(a.harness),mark:a.harness}),s.jsx(h,{k:"Model",v:l.model??"—"}),m?s.jsx(h,{k:"Owner",v:m}):null,a.branch?s.jsx(h,{k:"Branch",v:a.branch,mono:!0}):null,s.jsx(h,{k:"State",v:P(a.state)}),a.updatedAt?s.jsx(h,{k:"Updated",v:C(a.updatedAt)}):null,s.jsx(h,{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 h({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{Us as AgentsConsole};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as d}from"./index-DReVb7jZ.js";import{p as S,a as E}from"./api-DSqpVKC7.js";import{b as W}from"./machine-scope-DJt9RZ2w.js";import{f as X,d as Y}from"./router-C-MF5-mb.js";import{a as J}from"./sse-A8AyLH0g.js";import{o as Q,i as C}from"./surface-activity-B1rgWB1i.js";import{u as Z}from"./Provider-CNZluAZb.js";/* empty css */import{AgentsSubnav as ee}from"./AgentsSubnav-CeHhuzyM.js";import{AgentsLibrary as te}from"./library-DdhYL_9v.js";import{r as se,d as oe}from"./NewChatComposer-BEXS8vV6.js";import{AgentDetailWithRail as ie,AgentProfileBar as ne}from"./profile-BegEUmB7.js";/* empty css *//* empty css *//* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./index-BWHgHrtv.js";import"./provider-DwmCoSlc.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./createLucideIcon-ChvMq-zl.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./file-text-DP6txVW-.js";import"./x-rlMdRqJF.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./keyboard-nav-CJXPaHXj.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./SecondaryNav-Bs-_VwTC.js";import"./secondaryNavConfig-DzNHk6IH.js";import"./nav-destinations-CU_euC-Q.js";import"./message-square-CJW4WRlo.js";import"./terminal-DMZjX1es.js";import"./search-UsM-9-_W.js";import"./compass-CvzkzkIh.js";import"./settings-C69Zjrpq.js";import"./git-branch-DcUCsWdJ.js";import"./scroll-text-B0tKI9Sg.js";/* empty css */import"./SpriteAvatar-aHeF4ZQZ.js";import"./HarnessMark-DSvM_H7H.js";import"./AgentSessions-CO1WGa8Z.js";import"./openContent-C6XO6kr5.js";import"./clipboard-e3fSpeo7.js";import"./runtime-picker-C_AVYF63.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./NewChatOrigin-C8ROO4ps.js";import"./chevron-down-CDzRQQGl.js";import"./AgentAvatar-NZOqcsB2.js";import"./CrewAvatar-zgzC3cbU.js";import"./context-budget-8qFKqM-j.js";import"./session-catalog-CnpZMB7C.js";import"./terminal-relay-mO89dX-Y.js";import"./BackToPicker-CkBhGRlD.js";import"./ConversationScreen-tpj4cqWs.js";import"./ConversationComposer-DNcn5U6D.js";import"./zap-B4X0OrEw.js";import"./message-markup-6Tgo4qFJ.js";import"./mentions-Ck_Vjnyp.js";import"./AgentDetailCard-MIEBKw_S.js";import"./AgentLiveActions-6Kfr1uOT.js";import"./terminal-takeover-CZZsnPzj.js";import"./eye-CsGfEVR6.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-Y9TEJxP_.js";import"./AstronautSuit-D67fIBdR.js";import"./panel-right-qP17MwMl.js";import"./CommsFlowGraph-voDD9M5R.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-DdNAwjGW.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-C33sgD48.js";import"./CommsSelection-BL8aYD7z.js";/* empty css */import"./use-conversation-list-D5EnpVba.js";import"./agent-master-model-C-KdOFDK.js";import"./use-beside-D3cJpA5p.js";import"./ConversationFeedRows-RnYSa7Io.js";import"./ConversationPanels-6pprBpmq.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-CiaZHMnk.js";import"./proxy-DgzP27W8.js";import"./activity-BJqFrZyB.js";import"./message-circle-cI5_A5mj.js";import"./tail-events-C4WdhVeK.js";import"./ConversationStatus-Cv-7hErW.js";import"./check-g7D7-c1J.js";import"./sparkles-Cc5lPZRv.js";import"./SessionObserve-B64YsYhy.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-D2cnTeUd.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./ObservedTopologyPanel-DF6tRZL_.js";import"./ObserveTextFlow-CC5mnngm.js";import"./SessionObserveEvidence-CS1aQBpQ.js";import"./wrench-B4maQJai.js";import"./external-link-BVccgH0n.js";import"./AgentDefinitionsWorkspace-BqS6MXqF.js";import"./agent-specialization-BplZUa_0.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-Cxhixtks.js";/* empty css */import"./agent-essentials-bKWYOZaH.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,n=[]){const r=V(t);if(r!==null)return r;if(!t)return null;const l=o.toLowerCase(),a=new Set([l,l.replace(/-/g,""),...n.map(i=>i.trim().toLowerCase()).filter(Boolean)]),s=t.split(",").map(i=>i.trim().toLowerCase()).filter(Boolean);return s.some(i=>U.has(i))?!1:s.some(i=>a.has(i))?!0:null}function le({studyId:t,aliases:o,href:n,storedEnabled:r,storedMode:l,dev:a,defaultMode:s="after"}){const i=n?new URL(n,"http://localhost"):null,p=L(i?.searchParams.get("studio"),t,o)??L(i?.searchParams.get(`studio.${t}`),t,o)??L(i?.searchParams.get("studioInjection"),t,o),c=i?ae.has(de(i.hostname)):!1;if(!a&&!c)return{enabled:!1,mode:s};const u=p??V(r)??!1,g=M(i?.searchParams.get("studioMode"))??M(i?.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"||X({searchPatch:{studio:null,[`studio.${t}`]:null,studioInjection:null,studioMode:null,[`studioMode.${t}`]:null},replace:!0})}function fe(t,o=[]){const[n,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(!n.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)}},[n.enabled]);const s=d.useCallback(c=>{O(D(t),c?"1":"0"),r(u=>({...u,enabled:c}))},[t]),i=d.useCallback(c=>{O($(t),c),r(u=>({...u,mode:c}))},[t]),p=l?pe(n.mode):n.mode;return d.useMemo(()=>({...n,renderedMode:p,peeking:p!==n.mode,setEnabled:s,setMode:i}),[p,s,i,n])}function ge({studyId:t,aliases:o,anchor:n,title:r,children:l,renderStudy:a}){const s=fe(t,o);return s.enabled?e.jsxs("div",{className:"s-studio-injection","data-studio-anchor":n,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:n})]}),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"),n=t.filter(s=>s.state==="ready"),r=t.filter(s=>s.state==="attention"),l=b.reduce((s,i)=>s+i.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:n.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(i=>e.jsxs("span",{className:`s-agent-studio-agent-pill s-agent-studio-agent-pill--${i.state}`,children:[e.jsx("span",{className:"s-agent-studio-dot","data-state":i.state}),i.name]},i.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:n}){return e.jsxs("div",{className:`s-agent-studio-metric${n?` s-agent-studio-metric--${n}`:""}`,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 Is({navigate:t,selectedAgentId:o,conversationId:n,tab:r,activeRoute:l}){const{agents:a,agentsLoaded:s,route:i}=Z(),[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(i),A=d.useMemo(()=>W(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=Q(h);return()=>{window.clearInterval(f),w()}},[x]),J(()=>!0,()=>{C()&&x()});const m=se(A,o),B=!!(o&&m&&m.id!==o),v=i.view==="agents-v2"?i.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}:{},...n?{conversationId:n}:{},...r?{tab:r}:{}})},[n,r,k,t,v,m,o,B]),m&&!k){const h=n??_.get(m.id)??m.conversationId??null,f=r??(n?"message":"profile");return e.jsx(F,{activeRoute:l??i,navigate:t,bar:e.jsx(ne,{agent:m,conversationId:h,activeTab:f,navigate:t}),children:e.jsx(ie,{agent:m,allAgents:A,conversationId:h,navigate:t,activeTab:f})})}return e.jsx(F,{activeRoute:l??i,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:n,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:n})}),e.jsx("div",{className:"s-secondary-nav-body",children:o})]})}export{Is as AgentsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-DReVb7jZ.js";import{S as i}from"./SecondaryNav-Bs-_VwTC.js";import{A as m}from"./secondaryNavConfig-DzNHk6IH.js";import"./nav-destinations-CU_euC-Q.js";import"./createLucideIcon-ChvMq-zl.js";import"./message-square-CJW4WRlo.js";import"./terminal-DMZjX1es.js";import"./search-UsM-9-_W.js";import"./compass-CvzkzkIh.js";import"./settings-C69Zjrpq.js";import"./file-text-DP6txVW-.js";import"./git-branch-DcUCsWdJ.js";import"./code-xml-Cmadr3pQ.js";import"./scroll-text-B0tKI9Sg.js";function E({activeRoute:r,navigate:o}){return t.jsx(i,{ariaLabel:"Agents sections",activeRoute:r,groups:m,navigate:o})}export{E as AgentsSubnav};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./index-
|
|
1
|
+
import{j as t}from"./index-DReVb7jZ.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-C8uS5szO.js";/* empty css */import{D as ys}from"./DataTable-BMOZ1-z8.js";import{H,h as F}from"./HarnessMark-Bt47OeHy.js";import{O as vs}from"./ObservedTopologyPanel-DkEkQzo-.js";import{a as es}from"./api-CaROe5_H.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-DQ46QBW1.js";/* empty css */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]??"",l=n.lastIndexOf("/");return l>=0?n.slice(l+1):n}function ws(s,n=60){const l=s.split(/\s+/);if(l.length===0)return s;l[0]=G(l[0]);const c=l.join(" ");return c.length<=n?c:c.slice(0,n-1)+"…"}function Ms(s){for(const n of s){const l=G(n.command);if(l&&!(l==="sh"||l==="zsh"||l==="bash"||l==="login"))return l}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[,l,c,m,p]=n;let f=Number.parseInt(p,10)+Number.parseInt(m,10)*60;return c&&(f+=Number.parseInt(c,10)*3600),l&&(f+=Number.parseInt(l,10)*86400),f}function rs(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),l=Math.floor(s%86400/3600);return`${n}d${String(l).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,l){if(!s)return[];const c=new Map,m=new Map;for(const t of n){let r=c.get(t.pid);if(r||(r={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,r)),t.ts<r.firstEventAt&&(r.firstEventAt=t.ts),t.ts>=r.lastEventAt&&(r.lastEventAt=t.ts,r.lastKind=t.kind,r.lastSummary=t.summary),r.eventCount++,t.kind==="tool"&&r.toolCount++,J(t)&&r.reqCount++,as(t)&&r.permCount++,t.sessionId&&!r.sessionId&&(r.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 r=Y(t.source,t.cwd),a=p.get(r);(!a||t.pid<a.pid)&&p.set(r,t)}const f=new Map,u=new Map;for(const t of s.transcripts??[]){const r=Y(t.source,t.cwd),a=os(t),j=u.get(r)??Number.NEGATIVE_INFINITY,N=f.get(r)??"";(t.mtimeMs>j||t.mtimeMs===j&&a>N)&&(u.set(r,t.mtimeMs),f.set(r,a))}const h=new Set,I=(t,r,a,j)=>{r&&h.add(r.pid);let N="idle";const w=Math.max(a?.lastEventAt??0,j?.mtimeMs??0);a&&l-a.lastEventAt<Es&&(N=a.lastKind==="tool"?"tool":"run"),N==="idle"&&l-w<6e4&&(N="run");const L=r?As(r.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,_=r?.pid??Os(t),R=j?.cwd??r?.cwd??"";return{key:t,pid:_,ppid:r?.ppid??0,sessionId:j?.sessionId??a?.sessionId??null,transcriptPath:j?.transcriptPath??null,harness:cs(j?.source??r?.source),attribution:r?.harness??j?.harness??"unattributed",project:j?.project?.trim()||(R?Ps(R):"(unknown)"),cwd:R,command:r?.command??`${j?.source??"unknown"} transcript`,parentLabel:r?Ms(r.parentChain??[]):"transcript",procRuntimeSec:L,procEtime:r?.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 r=os(t),a=Y(t.source,t.cwd),j=f.get(a)===r?p.get(a)??null:null,N=t.sessionId?m.get(t.sessionId):void 0;return I(r,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 l=0;l<s.length;l+=1)n^=s.charCodeAt(l),n=Math.imul(n,16777619);return-((n>>>0)%9e5+1e3)}function Y(s,n){return`${s}\0${n??""}`}function Ks(s,n,l){const c=l-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,l,c){switch(l){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 ls({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 ne(){const[s,n]=d.useState([]),[l,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,r]=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(l,s,m),[l,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?l?.processes.find(o=>o.pid===g.pid)??null:null,[l,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:r,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:l}){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(ls,{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(ls,{values:l,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:l,harnessFilter:c,onToggleHarness:m,statusOptions:p,statusFilter:f,onToggleStatus:u,summary:h}){const I=t=>h.harnesses.find(r=>r.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=r=>{if(r.key!=="/")return;const a=r.target;a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1)||(r.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:"/"})]}),l.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"harness"}),l.map(t=>{const r=c.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--harness${r?" 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 r=f.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--status-${t}${r?" 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=>rs(s.sessionRuntimeSec)}];function W({value:s,accent:n}){const l=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:l,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:l}){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"]}),l&&e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," close"]})]})}function zs({row:s,process:n,events:l,now:c,onClose:m}){const p=d.useMemo(()=>{const u={};for(const k of l){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}))},[l]),f=l.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 ",rs(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:[l.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:l,accent:c}){const m=`s-atop-metric${l?" 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{ne as AtopView};
|
|
1
|
+
import{r as d,j as e}from"./index-DReVb7jZ.js";/* empty css */import{D as ys}from"./DataTable-av71ehJV.js";import{H,h as F}from"./HarnessMark-DSvM_H7H.js";import{O as vs}from"./ObservedTopologyPanel-DF6tRZL_.js";import{a as es}from"./api-DSqpVKC7.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-C4WdhVeK.js";/* empty css */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]??"",l=n.lastIndexOf("/");return l>=0?n.slice(l+1):n}function ws(s,n=60){const l=s.split(/\s+/);if(l.length===0)return s;l[0]=G(l[0]);const c=l.join(" ");return c.length<=n?c:c.slice(0,n-1)+"…"}function Ms(s){for(const n of s){const l=G(n.command);if(l&&!(l==="sh"||l==="zsh"||l==="bash"||l==="login"))return l}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[,l,c,m,p]=n;let f=Number.parseInt(p,10)+Number.parseInt(m,10)*60;return c&&(f+=Number.parseInt(c,10)*3600),l&&(f+=Number.parseInt(l,10)*86400),f}function rs(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),l=Math.floor(s%86400/3600);return`${n}d${String(l).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,l){if(!s)return[];const c=new Map,m=new Map;for(const t of n){let r=c.get(t.pid);if(r||(r={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,r)),t.ts<r.firstEventAt&&(r.firstEventAt=t.ts),t.ts>=r.lastEventAt&&(r.lastEventAt=t.ts,r.lastKind=t.kind,r.lastSummary=t.summary),r.eventCount++,t.kind==="tool"&&r.toolCount++,J(t)&&r.reqCount++,as(t)&&r.permCount++,t.sessionId&&!r.sessionId&&(r.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 r=Y(t.source,t.cwd),a=p.get(r);(!a||t.pid<a.pid)&&p.set(r,t)}const f=new Map,u=new Map;for(const t of s.transcripts??[]){const r=Y(t.source,t.cwd),a=os(t),j=u.get(r)??Number.NEGATIVE_INFINITY,N=f.get(r)??"";(t.mtimeMs>j||t.mtimeMs===j&&a>N)&&(u.set(r,t.mtimeMs),f.set(r,a))}const h=new Set,I=(t,r,a,j)=>{r&&h.add(r.pid);let N="idle";const w=Math.max(a?.lastEventAt??0,j?.mtimeMs??0);a&&l-a.lastEventAt<Es&&(N=a.lastKind==="tool"?"tool":"run"),N==="idle"&&l-w<6e4&&(N="run");const L=r?As(r.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,_=r?.pid??Os(t),R=j?.cwd??r?.cwd??"";return{key:t,pid:_,ppid:r?.ppid??0,sessionId:j?.sessionId??a?.sessionId??null,transcriptPath:j?.transcriptPath??null,harness:cs(j?.source??r?.source),attribution:r?.harness??j?.harness??"unattributed",project:j?.project?.trim()||(R?Ps(R):"(unknown)"),cwd:R,command:r?.command??`${j?.source??"unknown"} transcript`,parentLabel:r?Ms(r.parentChain??[]):"transcript",procRuntimeSec:L,procEtime:r?.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 r=os(t),a=Y(t.source,t.cwd),j=f.get(a)===r?p.get(a)??null:null,N=t.sessionId?m.get(t.sessionId):void 0;return I(r,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 l=0;l<s.length;l+=1)n^=s.charCodeAt(l),n=Math.imul(n,16777619);return-((n>>>0)%9e5+1e3)}function Y(s,n){return`${s}\0${n??""}`}function Ks(s,n,l){const c=l-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,l,c){switch(l){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 ls({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 ne(){const[s,n]=d.useState([]),[l,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,r]=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(l,s,m),[l,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?l?.processes.find(o=>o.pid===g.pid)??null:null,[l,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:r,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:l}){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(ls,{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(ls,{values:l,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:l,harnessFilter:c,onToggleHarness:m,statusOptions:p,statusFilter:f,onToggleStatus:u,summary:h}){const I=t=>h.harnesses.find(r=>r.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=r=>{if(r.key!=="/")return;const a=r.target;a instanceof HTMLInputElement||a instanceof HTMLTextAreaElement||(a?.isContentEditable??!1)||(r.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:"/"})]}),l.length>1&&e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"s-atop-fbar-label",children:"harness"}),l.map(t=>{const r=c.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--harness${r?" 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 r=f.has(t);return e.jsxs("button",{className:`s-atop-pill s-atop-pill--status-${t}${r?" 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=>rs(s.sessionRuntimeSec)}];function W({value:s,accent:n}){const l=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:l,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:l}){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"]}),l&&e.jsxs("span",{children:[e.jsx("kbd",{children:"esc"})," close"]})]})}function zs({row:s,process:n,events:l,now:c,onClose:m}){const p=d.useMemo(()=>{const u={};for(const k of l){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}))},[l]),f=l.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 ",rs(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:[l.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:l,accent:c}){const m=`s-atop-metric${l?" 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{ne as AtopView};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as k,j as s}from"./index-
|
|
1
|
+
import{r as k,j as s}from"./index-DReVb7jZ.js";import{u as d,g as B,o as p}from"./router-C-MF5-mb.js";function m(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:o,label:i}){const e=d(),r=k.useMemo(()=>B(e.state),[e.state]),a=r??n,u=i??m(a),l=p(e.state)&&!!r;return s.jsxs("button",{type:"button",className:`s-back-pill${o?` ${o}`:""}`,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-DReVb7jZ.js";import{E as p}from"./EmptyState-CYUwYyAW.js";import{a as f}from"./api-DSqpVKC7.js";import{S as b}from"./scoutbot-markdown-DwvGQOWo.js";import{b as h,t as u}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./Provider-CNZluAZb.js";import"./provider-DwmCoSlc.js";import"./router-C-MF5-mb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-A8AyLH0g.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-BEXS8vV6.js";import"./runtime-picker-C_AVYF63.js";import"./scout-voice-CqAyfblr.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DNUsuPWz.js";import"./createLucideIcon-ChvMq-zl.js";import"./conversation-model-m8HhzroS.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-CbqBwfIW.js";import"./HarnessMark-DSvM_H7H.js";import"./NewChatOrigin-C8ROO4ps.js";import"./keyboard-nav-CJXPaHXj.js";import"./x-rlMdRqJF.js";import"./chevron-down-CDzRQQGl.js";import"./search-UsM-9-_W.js";import"./file-text-DP6txVW-.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DlMiEALb.js";import"./TextDocumentSurface-BK6Qy41F.js";import"./index-kkXUq-zf.js";import"./chevron-right-DKGTLiqc.js";import"./folder-B_S7gBVr.js";import"./chevron-up-DX7R6KY2.js";import"./code-xml-Cmadr3pQ.js";import"./arrow-left-DFfKAq0d.js";import"./arrow-right-DmAWnyAH.js";import"./chunk-HRAB3GC3-Dvk_QpRq.js";import"./external-link-BVccgH0n.js";const g={"fleet-home":"fleet briefing",tour:"tour briefing"};function ye({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{ye as BriefingDetailScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-DReVb7jZ.js";import{E as c}from"./EmptyState-CYUwYyAW.js";import{p as g,a as m}from"./api-DSqpVKC7.js";import{t as p}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */const b={"fleet-home":"fleet",tour:"tour"},d="/api/briefings?limit=50",u=3e4;function E({navigate:f}){const[r,h]=i.useState(()=>g(d,u)?.briefings??null),[n,t]=i.useState(null),[l,o]=i.useState(!1),a=i.useCallback(async()=>{o(!0);try{const s=await m(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{E as BriefingsScreen};
|