@openscout/scout 0.2.102 → 0.2.106
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 +307 -0
- package/dist/client/assets/ActivityScreen-CZmGwQ2U.js +1 -0
- package/dist/client/assets/{AddProjectForm-DfbjlFfy.js → AddProjectForm-CusDRiVO.js} +1 -1
- package/dist/client/assets/{AdventureEvidence-Dzz9VbuE.js → AdventureEvidence-CyegKk1V.js} +1 -1
- package/dist/client/assets/{AdventureReader-ClMxT0e4.js → AdventureReader-X-hbTOi0.js} +1 -1
- package/dist/client/assets/{AdventureScenery-D548O0x4.js → AdventureScenery-LPXSVP67.js} +1 -1
- package/dist/client/assets/AgentAdventures-BAgxdOF8.js +1 -0
- package/dist/client/assets/AgentAvatar-CrP1eXxk.js +1 -0
- package/dist/client/assets/AgentConfigurationScreen-1L0IQm2w.js +1 -0
- package/dist/client/assets/AgentDefinitionsWorkspace-DguGs7jZ.js +1 -0
- package/dist/client/assets/{AgentDetailCard-CFDE8TLi.js → AgentDetailCard-DtHT3sCo.js} +1 -1
- package/dist/client/assets/AgentFloorView-DH4jiDgw.js +1 -0
- package/dist/client/assets/{AgentFloorWorld-BDJmXl3C.js → AgentFloorWorld-CjoIa6jA.js} +1 -1
- package/dist/client/assets/AgentInfoScreen-DYtmKkeE.js +1 -0
- package/dist/client/assets/{AgentLaneCard-C6YmwPxQ.js → AgentLaneCard-BaZ2g-f8.js} +1 -1
- package/dist/client/assets/{AgentLaneChrome-D9uJ4QY7.js → AgentLaneChrome-TF1SlJSc.js} +1 -1
- package/dist/client/assets/{AgentLaneDetailSheet-KYckCBCX.js → AgentLaneDetailSheet-EzEPsn3g.js} +1 -1
- package/dist/client/assets/{AgentLaneSummaryResize-BBYBS3DO.js → AgentLaneSummaryResize-dpp7YvrX.js} +1 -1
- package/dist/client/assets/AgentLanesEmbedScreen-BlSof_6S.js +1 -0
- package/dist/client/assets/{AgentLanesPreflight-pw2vMO3Q.js → AgentLanesPreflight-Ry-aqDTr.js} +1 -1
- package/dist/client/assets/AgentLanesView-BJi9xXz6.js +2 -0
- package/dist/client/assets/{AgentLiveActions-lYzicnNa.js → AgentLiveActions-CfTupTEl.js} +1 -1
- package/dist/client/assets/AgentMasterScreen-EJhmuKgl.js +1 -0
- package/dist/client/assets/AgentSessions-B1gOhDBf.js +6 -0
- package/dist/client/assets/AgentsConsole-RXGqRvcb.js +1 -0
- package/dist/client/assets/AgentsScreen-ChwMBs11.js +1 -0
- package/dist/client/assets/AgentsSubnav-DwNX4yy0.js +1 -0
- package/dist/client/assets/{AstronautSuit-C-4I5YKi.js → AstronautSuit-Cchnc4Ug.js} +1 -1
- package/dist/client/assets/{AtopView-DKm-ERYC.js → AtopView-gkEp4y__.js} +1 -1
- package/dist/client/assets/{BackToPicker-Bys9ColC.js → BackToPicker-CUkjnoVk.js} +1 -1
- package/dist/client/assets/BriefingDetailScreen-DrlC3qkm.js +1 -0
- package/dist/client/assets/{BriefingsScreen-D4Zf31Y6.js → BriefingsScreen-B1HlBMGZ.js} +1 -1
- package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js} +1 -1
- package/dist/client/assets/BrokerScreen-DwOF6bMA.js +8 -0
- package/dist/client/assets/Canvas-X9pVSkw3.js +1 -0
- package/dist/client/assets/{CastPicker-BuwE_JQp.js → CastPicker-BXUtPAGC.js} +1 -1
- package/dist/client/assets/ChannelComposer-DoK7IDGa.js +1 -0
- package/dist/client/assets/ChannelSidebar-e9DOPulb.js +1 -0
- package/dist/client/assets/{CharacterFamilyPreview-CfO3j8Of.js → CharacterFamilyPreview-DMfw7UM_.js} +1 -1
- package/dist/client/assets/ChatAvatar-C3a_o5Hj.js +1 -0
- package/dist/client/assets/ChatBits-CsvxbToF.js +1 -0
- package/dist/client/assets/{ChatCollapsedStrip-TV0j1xTB.js → ChatCollapsedStrip-FEmQ_G9J.js} +1 -1
- package/dist/client/assets/ChatRichInput-DhtwFxQE.js +31 -0
- package/dist/client/assets/ChatRightPanel-C1h_aIkn.js +1 -0
- package/dist/client/assets/ChatSpaceSurface-BXyLYKHn.js +1 -0
- package/dist/client/assets/ChatSpaceTheme-3wLZGsvT.css +1 -0
- package/dist/client/assets/ChatSpaceTheme-CUH8bTZc.js +1 -0
- package/dist/client/assets/{CodeDiffPane-DB6-mqtX.js → CodeDiffPane-DuQRwpgK.js} +1 -1
- package/dist/client/assets/{CodeProjectPicker-B_LNLpIK.js → CodeProjectPicker-ZQ6gSBpg.js} +1 -1
- package/dist/client/assets/{CodeScreen-C9H160XS.js → CodeScreen-BXyKeL5T.js} +1 -1
- package/dist/client/assets/{CommsCanvas-DOKw3Q8i.js → CommsCanvas-THp0r_U8.js} +1 -1
- package/dist/client/assets/{CommsDeck-C18JA7rK.js → CommsDeck-BVmSMV2V.js} +1 -1
- package/dist/client/assets/{CommsFlowGraph-Czg-KTS0.js → CommsFlowGraph-DxoOaLF_.js} +1 -1
- package/dist/client/assets/{CommsFlowMap-CzBWvSa5.js → CommsFlowMap-Vi8ziCPg.js} +1 -1
- package/dist/client/assets/{CommsSelection-g1twA-Lb.js → CommsSelection-BUoRbu9o.js} +1 -1
- package/dist/client/assets/ComposerAttachments-DW0AIb8k.js +1 -0
- package/dist/client/assets/ConversationComposer-CUQyArlk.js +1 -0
- package/dist/client/assets/ConversationFeedRows-DWiOfT-y.js +1 -0
- package/dist/client/assets/ConversationHeader-C-ZWscKj.js +1 -0
- package/dist/client/assets/{ConversationPanels-C9yCAoJy.js → ConversationPanels-D9oC0xG5.js} +2 -2
- package/dist/client/assets/ConversationScreen-9MlMnEo4.css +1 -0
- package/dist/client/assets/ConversationScreen-CUfsQ4MR.js +2 -0
- package/dist/client/assets/ConversationStatus--IPm2nGh.js +1 -0
- package/dist/client/assets/{CrewAvatar-D0c9z5Qr.css → CrewAvatar-BnIPIn_Z.css} +1 -1
- package/dist/client/assets/CrewAvatar-kTznzqcO.js +1 -0
- package/dist/client/assets/{CrewSprite-hgpA3SWB.js → CrewSprite-Dhryjx2c.js} +1 -1
- package/dist/client/assets/CrewStage-vdO0qm3D.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DCBzAAS4.js +1 -0
- package/dist/client/assets/CrewWorkspaces-DDuYMByu.css +1 -0
- package/dist/client/assets/{DataTable-BMOZ1-z8.js → DataTable-aH-jCyDq.js} +1 -1
- package/dist/client/assets/{DispatchAftermath-DDlwqSCY.js → DispatchAftermath-66uQAorV.js} +1 -1
- package/dist/client/assets/{DocumentFocusViewer-f12RRQpV.js → DocumentFocusViewer-DJr0v0D_.js} +1 -1
- package/dist/client/assets/{EmbeddableSurfacesLab-DGl9EMRV.js → EmbeddableSurfacesLab-BBa70EhJ.js} +1 -1
- package/dist/client/assets/{EmptyState-uyYN5piI.js → EmptyState-CZlrHXy-.js} +1 -1
- package/dist/client/assets/{FileViewerPane-HtiDbj9N.js → FileViewerPane-BAO6mtjD.js} +1 -1
- package/dist/client/assets/FleetRollCallHud-C5q2567n.js +1 -0
- package/dist/client/assets/FlightObserveScreen-DZ2mrw91.js +1 -0
- package/dist/client/assets/{FloorContextSheet-DV-SYA0K.js → FloorContextSheet-2_NVPQor.js} +1 -1
- package/dist/client/assets/{FloorExchangePanel-D59nvRCF.js → FloorExchangePanel-BU1pPu8K.js} +1 -1
- package/dist/client/assets/{FloorMessagePasses-BCwsz9VS.js → FloorMessagePasses-cLW2UGNP.js} +1 -1
- package/dist/client/assets/{FloorReplay-BHo79HCD.js → FloorReplay-VFzA6Kxc.js} +1 -1
- package/dist/client/assets/FloorResourcesSheet-C-kQ6Ren.js +1 -0
- package/dist/client/assets/{FloorSavedWork-2tjBoy06.js → FloorSavedWork-BeHDejWz.js} +1 -1
- package/dist/client/assets/FloorTacticalHUD-CO-iiFpb.js +1 -0
- package/dist/client/assets/{FollowScreen-eHXOlK-u.js → FollowScreen-CFfkIbc6.js} +1 -1
- package/dist/client/assets/HarnessMark-C4naWc16.js +1 -0
- package/dist/client/assets/HarnessesScreen-DX3NLcDG.js +1 -0
- package/dist/client/assets/{HerdrSession-CtJOUn7H.js → HerdrSession-_t7yM8vX.js} +2 -2
- package/dist/client/assets/{HomeHero-Cvwx2H0w.js → HomeHero-DouPyNmz.js} +1 -1
- package/dist/client/assets/{HostAdvisorView-CTJXIc1Q.js → HostAdvisorView-CnM1i8hW.js} +1 -1
- package/dist/client/assets/InviteLandingScreen-CEjG2E34.js +1 -0
- package/dist/client/assets/InviteSheet-CwxZtWCl.js +1 -0
- package/dist/client/assets/JumpPalette-O1aJE9gR.js +1 -0
- package/dist/client/assets/{KnowledgeSearchInspector-DwGMVmFL.js → KnowledgeSearchInspector-32n9baT-.js} +1 -1
- package/dist/client/assets/KnowledgeSearchScreen-Dd6jrQ0A.js +1 -0
- package/dist/client/assets/{LaneToolHoverCard-C6YehJqD.js → LaneToolHoverCard-CJa110yk.js} +1 -1
- package/dist/client/assets/LaneTraceDetailSheet-DYrd0BIf.js +1 -0
- package/dist/client/assets/{LaneTraceEventFocus-WLNZZVi_.js → LaneTraceEventFocus-TbrNHRj_.js} +1 -1
- package/dist/client/assets/{MeshCanvas-FDDGE69h.js → MeshCanvas-DWZHYh1A.js} +2 -2
- package/dist/client/assets/{MeshCanvasMinimap-CGRzQCac.js → MeshCanvasMinimap-iswYFpIb.js} +1 -1
- package/dist/client/assets/MeshScreen-8nAzQVbm.js +1 -0
- package/dist/client/assets/{MeshTopologyView-C2Cv_2gx.js → MeshTopologyView-BVvtqI8q.js} +2 -2
- package/dist/client/assets/MessageEmbeds-ksPazAKH.js +1 -0
- package/dist/client/assets/MessagesScreen-C3WB4T21.js +1 -0
- package/dist/client/assets/{MissionContextRail-CVSZJnvX.js → MissionContextRail-D62-Wis8.js} +1 -1
- package/dist/client/assets/MissionControlView-B9cNPXvl.js +1 -0
- package/dist/client/assets/{MissionFocusOverlay-B9SiuO-i.js → MissionFocusOverlay-C1zys3Jv.js} +1 -1
- package/dist/client/assets/MissionLeftAgentRow-vycMV77n.js +1 -0
- package/dist/client/assets/{MissionLogPane-CMBiI29U.js → MissionLogPane-B19lYSY9.js} +1 -1
- package/dist/client/assets/NativeAreaScreen-B1RLa85C.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CV0OhGra.js +1 -0
- package/dist/client/assets/NativeAreaScreen-CzuZt6o1.js +1 -0
- package/dist/client/assets/{NewAgentModal-Cl4nsGhu.js → NewAgentModal-Bh-L-emz.js} +1 -1
- package/dist/client/assets/NewChatComposer-C97-iTMK.js +19 -0
- package/dist/client/assets/{NewChatOrigin-CyPPWTJP.js → NewChatOrigin-DFbF_XvR.js} +1 -1
- package/dist/client/assets/{NodeDetailPanel-BUG8rOb-.js → NodeDetailPanel-CElOEpCh.js} +1 -1
- package/dist/client/assets/{NodeMenu-Fw8ATWQA.js → NodeMenu-B-jjHf1c.js} +1 -1
- package/dist/client/assets/ObserveEmbedScreen-B7Qt69Ms.js +2 -0
- package/dist/client/assets/{ObserveTextFlow-ET0dD1wO.js → ObserveTextFlow-PFnG_10h.js} +2 -2
- package/dist/client/assets/{ObservedTopologyPanel-DkEkQzo-.js → ObservedTopologyPanel-CUTIoLZJ.js} +1 -1
- package/dist/client/assets/OpenScoutAppShell-37PDFfA4.js +31 -0
- package/dist/client/assets/OpsAgentsView-DajlX8LO.js +1 -0
- package/dist/client/assets/OpsScreen-jVcaBKGi.js +1 -0
- package/dist/client/assets/OpsSubnav-BOOYShHE.js +1 -0
- package/dist/client/assets/ProjectAgentProfile-D_wlW4sQ.js +1 -0
- package/dist/client/assets/{ProjectAgentProfileBar-C1fR65Eh.js → ProjectAgentProfileBar-DHuMKJj-.js} +1 -1
- package/dist/client/assets/ProjectAgentProfileHero-Dbebtug1.js +1 -0
- package/dist/client/assets/ProjectsInbox-B8zYE4vP.css +1 -0
- package/dist/client/assets/ProjectsInbox-Cgu7B4--.js +2 -0
- package/dist/client/assets/ProjectsRail-CDWocin_.js +1 -0
- package/dist/client/assets/ProjectsScreen-B_CJycqW.js +1 -0
- package/dist/client/assets/ProjectsThreadAside-1MMl_qUD.js +1 -0
- package/dist/client/assets/Provider-C35yu29I.js +5 -0
- package/dist/client/assets/{RailRow-BYguXNm4.js → RailRow-BjmWK420.js} +1 -1
- package/dist/client/assets/RawSessionsTable-DzT90hWu.js +1 -0
- package/dist/client/assets/RealtimeVoiceScreen-B6ylX3WQ.js +16 -0
- package/dist/client/assets/{RenderedWorkerSprite-CvdWO32C.js → RenderedWorkerSprite-Dhlyg89J.js} +1 -1
- package/dist/client/assets/{ReplayClock-B7JLTp8A.js → ReplayClock-348f17bW.js} +1 -1
- package/dist/client/assets/{ReplayLog-DZTpf2CW.js → ReplayLog-CBnAM3ui.js} +1 -1
- package/dist/client/assets/{ReplayOutpost-CvWQa30T.js → ReplayOutpost-DyRPfNFx.js} +1 -1
- package/dist/client/assets/{RepoDiffEmbedScreen-Cbu0_PJW.js → RepoDiffEmbedScreen-BWxvRDrS.js} +1 -1
- package/dist/client/assets/{RepoDiffPageScreen-Chwm6GXL.js → RepoDiffPageScreen-DN94irmY.js} +1 -1
- package/dist/client/assets/{RepoDiffViewer-C2mb0Wj-.js → RepoDiffViewer-_4JVXBIW.js} +1 -1
- package/dist/client/assets/RepoDiffViewerLazy-XGVC3WXv.js +2 -0
- package/dist/client/assets/{ReposScreen-C7JZQmyh.js → ReposScreen-uMCpt0e9.js} +2 -2
- package/dist/client/assets/{RiggedWorkerCharacter-DNe731GE.js → RiggedWorkerCharacter-q6QRc7_o.js} +1 -1
- package/dist/client/assets/{SageModelStudio-BR1J2D4R.js → SageModelStudio-CNDhZhgD.js} +1 -1
- package/dist/client/assets/{ScoutDeckSurface-flRamdvE.js → ScoutDeckSurface-CUaU4R6T.js} +1 -1
- package/dist/client/assets/{ScoutSurface-BpklGmDL.js → ScoutSurface-3_25USO_.js} +1 -1
- package/dist/client/assets/{ScoutbotFxLab-DeK7ySWZ.js → ScoutbotFxLab-CRqhYe0a.js} +1 -1
- package/dist/client/assets/{SecondaryNav-BkTn5tkq.js → SecondaryNav-D7dbV2qo.js} +1 -1
- package/dist/client/assets/SessionContextStrip-CXfs9hUD.js +1 -0
- package/dist/client/assets/SessionContextStrip-DAIXwtHd.css +1 -0
- package/dist/client/assets/{SessionEmbedScreen-CcQN6xlo.js → SessionEmbedScreen-D0zFmou-.js} +1 -1
- package/dist/client/assets/SessionHopMenu-E6VJZrE0.js +1 -0
- package/dist/client/assets/{SessionObserve-BOBJSfs0.css → SessionObserve-CDdJ7fAE.css} +1 -1
- package/dist/client/assets/SessionObserve-DXxBvejJ.js +12 -0
- package/dist/client/assets/SessionObserveEvidence-Cuj_KHxR.js +1 -0
- package/dist/client/assets/SessionRefScreen-DqLSUlCE.js +1 -0
- package/dist/client/assets/SessionsScreen-BLIRkohT.js +1 -0
- package/dist/client/assets/SettingsDrawer-juCpnbH6.js +3 -0
- package/dist/client/assets/SettingsScreen-BtGzE2-O.js +1 -0
- package/dist/client/assets/{SharedFloorCharacter-CSYG_t9t.js → SharedFloorCharacter-DNEiaOUh.js} +1 -1
- package/dist/client/assets/SharedWorkFloor-0rqtdF-n.css +1 -0
- package/dist/client/assets/SharedWorkFloor-D9mf9KSg.js +2 -0
- package/dist/client/assets/{ShikiPane-BudrOxNK.js → ShikiPane-CRtTYkMj.js} +1 -1
- package/dist/client/assets/{SlidePanel-Datu7XG4.js → SlidePanel-_CHAQdOa.js} +1 -1
- package/dist/client/assets/SpaceSwitcher-BLgSCf_T.js +1 -0
- package/dist/client/assets/{SpriteAvatar-BW1JzkDt.js → SpriteAvatar-CpZWf54-.js} +1 -1
- package/dist/client/assets/{SproutActionSprite-DveCzg6l.js → SproutActionSprite-BSiTS4en.js} +1 -1
- package/dist/client/assets/{StatusPill-MxYClPG5.js → StatusPill-2gCP6H7A.js} +1 -1
- package/dist/client/assets/{TailView-Dn7uWmPz.js → TailView-CYSijNTy.js} +2 -2
- package/dist/client/assets/Terminal-Bi97yb5s.js +4 -0
- package/dist/client/assets/TerminalEmbedScreen-Bqop67Bq.js +1 -0
- package/dist/client/assets/{TerminalHeaderMount-DCGstkZ4.js → TerminalHeaderMount-Cq4OD_xN.js} +1 -1
- package/dist/client/assets/TerminalRelay-DrikpUSJ.js +46 -0
- package/dist/client/assets/{TextDocumentSurface-BhYvAB0o.js → TextDocumentSurface-D52m7Vd8.js} +1 -1
- package/dist/client/assets/{TmuxPeek-BhK0V9Qt.js → TmuxPeek-CXFeweMg.js} +1 -1
- package/dist/client/assets/VoiceControlWell-DF3bjcYA.js +1 -0
- package/dist/client/assets/VoicePathDiagram-CmpHWfO-.js +1 -0
- package/dist/client/assets/{VoicePermissionsPanel-CecFWzva.js → VoicePermissionsPanel-Ok2nfxHw.js} +1 -1
- package/dist/client/assets/VoiceTurnDetails-wAByRaNB.js +8 -0
- package/dist/client/assets/VoiceTurnStage-edoJalLV.js +1 -0
- package/dist/client/assets/VoiceTurnView-D-8g5E4r.js +1 -0
- package/dist/client/assets/WorkDetailScreen-zQkNVy2F.js +5 -0
- package/dist/client/assets/{WorkFilesViewer-DJHftsH9.js → WorkFilesViewer-vNt01sDd.js} +1 -1
- package/dist/client/assets/{WorkRunView-x5PH1byG.js → WorkRunView-BDkR7Edq.js} +1 -1
- package/dist/client/assets/WorldActorTalk-BvSg_b1y.js +1 -0
- package/dist/client/assets/{WorldCharacter-Dn4sIXNP.js → WorldCharacter-CIIlutQq.js} +1 -1
- package/dist/client/assets/WorldMinimap-B6HNgcDe.js +1 -0
- package/dist/client/assets/{WorldSky-DV9bpvXj.js → WorldSky-Jm2Z6dfW.js} +1 -1
- package/dist/client/assets/{activity-CSUhvjD0.js → activity-CIlFrfPJ.js} +1 -1
- package/dist/client/assets/{addon-fit-MR98IWES.js → addon-fit-dFpj9Kfq.js} +1 -1
- package/dist/client/assets/{addon-webgl-CIIKXrvK.js → addon-webgl-BFCGRtGh.js} +1 -1
- package/dist/client/assets/{agent-essentials-8t2il7PV.js → agent-essentials-BGGvT5G6.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-master-model-C-KdOFDK.js → agent-master-model-Bk_yuUXJ.js} +1 -1
- package/dist/client/assets/{agent-specialization-CiVxQsFT.js → agent-specialization-DDc7mLCW.js} +1 -1
- package/dist/client/assets/agents-screen-BYakbO50.css +1 -0
- 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-C1SQHJ3k.js} +1 -1
- package/dist/client/assets/{arrow-left-PuKdO3NM.js → arrow-left-MVUKauwQ.js} +1 -1
- package/dist/client/assets/{arrow-right-ldbfp4SZ.js → arrow-right-Bp-FpE5V.js} +1 -1
- package/dist/client/assets/{arrow-up-right-Hn754ybA.js → arrow-up-right-BPedAgxO.js} +1 -1
- package/dist/client/assets/{book-open-BlJnpf2U.js → book-open-CV98WMSp.js} +1 -1
- package/dist/client/assets/{bot-CfN9PSBF.js → bot-B4zLQ4IN.js} +1 -1
- package/dist/client/assets/{cache-DEy9E34b.js → cache-DGBo3vIf.js} +1 -1
- package/dist/client/assets/chat-api-DSJMBYoT.js +2 -0
- package/dist/client/assets/chat-message-markup-91DIry6R.js +1 -0
- package/dist/client/assets/chat-space-model-aW3Fd8_U.js +4 -0
- package/dist/client/assets/chat-transport-DNS5CB2I.js +1 -0
- package/dist/client/assets/{check-B8dMv3Is.js → check-lrJ3a73a.js} +1 -1
- package/dist/client/assets/{chevron-down-B5eMsn5c.js → chevron-down-l1mrh5S9.js} +1 -1
- package/dist/client/assets/{chevron-right-C7UGFpkl.js → chevron-right-DrfqcerI.js} +1 -1
- package/dist/client/assets/{chevron-up-BHOEgHcn.js → chevron-up-CETZJzjV.js} +1 -1
- package/dist/client/assets/{chunk-HRAB3GC3-C5X-kFhb.js → chunk-HRAB3GC3-DbVLgbWX.js} +1 -1
- package/dist/client/assets/{clock-DFcRbtrl.js → clock-BV1aqPkK.js} +1 -1
- package/dist/client/assets/{code-xml-BmyLM0I2.js → code-xml-BhcNbLWU.js} +1 -1
- package/dist/client/assets/{coffee-C_D9zooM.js → coffee-D7EAOdCk.js} +1 -1
- package/dist/client/assets/{compass-DTZdCpv9.js → compass-63TUaz5_.js} +1 -1
- package/dist/client/assets/content-B1lgE8qr.js +1 -0
- package/dist/client/assets/content-B5l11YyQ.js +1 -0
- package/dist/client/assets/content-BNZOZEpX.js +1 -0
- package/dist/client/assets/content-BRIxP155.js +1 -0
- package/dist/client/assets/content-BWd8gt8L.js +1 -0
- package/dist/client/assets/content-BfwS2jAK.js +1 -0
- package/dist/client/assets/content-C4p43_eT.js +1 -0
- package/dist/client/assets/content-CdYfaoDV.js +1 -0
- package/dist/client/assets/content-CzldLxw0.js +1 -0
- package/dist/client/assets/content-D-olnc4U.js +1 -0
- package/dist/client/assets/content-DTioimq4.js +1 -0
- package/dist/client/assets/content-LOebm3_d.js +1 -0
- package/dist/client/assets/content-nGlEZhUI.js +1 -0
- package/dist/client/assets/content-oyzDM-LK.js +1 -0
- package/dist/client/assets/content-x1PHxED7.js +1 -0
- package/dist/client/assets/content-zX3ZY3T9.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-Tqba2d56.js} +1 -1
- package/dist/client/assets/conversation-model-FxDeWlle.js +1 -0
- package/dist/client/assets/conversation-motion-features-C5zjuNwE.js +1 -0
- package/dist/client/assets/conversations-DoAAO6kA.js +1 -0
- package/dist/client/assets/{copy-D9WUpQRf.js → copy-xKeM5ZtU.js} +1 -1
- package/dist/client/assets/{cpu-Ck_4tB_-.js → cpu-BOTa_WLr.js} +1 -1
- package/dist/client/assets/{createLucideIcon-DkjnzvcJ.js → createLucideIcon-zZ8Hx7er.js} +1 -1
- package/dist/client/assets/{credentials-C4VXz2hr.js → credentials-OeoF-VKJ.js} +1 -1
- package/dist/client/assets/ctx-panel-BC8fpcWJ.css +1 -0
- package/dist/client/assets/direct-voice-BbLPuJ04.js +2 -0
- package/dist/client/assets/direct-voice-DbO7CSv_.css +1 -0
- package/dist/client/assets/discover-DJFxyV1k.js +2 -0
- package/dist/client/assets/embed-entry-Lyvu0Kfc.js +2 -0
- package/dist/client/assets/{external-link-RT4Ph-6-.js → external-link-CUObqmgX.js} +1 -1
- package/dist/client/assets/{eye-CtqSV8BS.js → eye-LrO-cXQt.js} +1 -1
- package/dist/client/assets/{file-code-corner-D_Aptal2.js → file-code-corner-CsU7jJpu.js} +1 -1
- package/dist/client/assets/{file-text-ChtICwub.js → file-text-CnISiiw6.js} +1 -1
- package/dist/client/assets/{flag-CqdOxVkI.js → flag-C4wl8z2-.js} +1 -1
- package/dist/client/assets/fleet-roll-call-BUgf7w-V.css +1 -0
- 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-D5prSkzz.js} +1 -1
- package/dist/client/assets/{gauge-Dgtfxf_o.js → gauge-D9_5iJEm.js} +1 -1
- package/dist/client/assets/{gestures-BDCZ1FRG.js → gestures-QZub3Ot9.js} +1 -1
- package/dist/client/assets/{git-branch-CA3cHKCI.js → git-branch-B0_fPLO7.js} +1 -1
- package/dist/client/assets/{go-shortcuts-DKtw4qYx.js → go-shortcuts-DicR7sUf.js} +1 -1
- package/dist/client/assets/home-moving-signal-rpMhsOJB.js +1 -0
- package/dist/client/assets/home-now-card-ByE6Umcx.js +1 -0
- package/dist/client/assets/{home-now-card-nano-D1ScGrgv.js → home-now-card-nano-B5Dv3-pb.js} +1 -1
- package/dist/client/assets/hooks-_eCZZPsR.js +2 -0
- package/dist/client/assets/index-724SdE6r.js +1 -0
- package/dist/client/assets/{index-CvsM3jm8.js → index-CHD0qcfL.js} +1 -1
- package/dist/client/assets/index-CN4rBB_s.css +1 -0
- package/dist/client/assets/index-D1d98iYf.js +1 -0
- package/dist/client/assets/index-EsrkGBcv.js +10 -0
- package/dist/client/assets/index-gGHPA-By.js +1 -0
- package/dist/client/assets/{inspector-panel-BLhDODb3.js → inspector-panel-BkgUDn6G.js} +2 -2
- package/dist/client/assets/{keyboard-nav-CXfav14z.js → keyboard-nav-DDHegDbx.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-D-RSWjb-.js} +1 -1
- package/dist/client/assets/{layers-Bolb8ejU.js → layers-C8PDiMul.js} +1 -1
- package/dist/client/assets/{layout-grid-DI9tVJ2E.js → layout-grid-Cor2frzj.js} +1 -1
- package/dist/client/assets/left-Bn5X7x2o.js +2 -0
- package/dist/client/assets/left-BqS0fYX1.js +1 -0
- package/dist/client/assets/left-CTCeeeD3.js +1 -0
- package/dist/client/assets/left-DhtVPVux.js +1 -0
- package/dist/client/assets/left-K39b-Wvx.js +2 -0
- package/dist/client/assets/left-KGmueNPt.js +1 -0
- package/dist/client/assets/left-P_GOYB-s.js +1 -0
- package/dist/client/assets/left-advisor-B0N47De2.js +1 -0
- package/dist/client/assets/left-agents-CsSNc51Y.js +1 -0
- package/dist/client/assets/left-default-BlO5LP2T.js +1 -0
- package/dist/client/assets/left-lanes-C4PhaJE6.js +1 -0
- package/dist/client/assets/left-mission-BjTE5vPa.js +1 -0
- package/dist/client/assets/library-CkWNPHRp.js +1 -0
- package/dist/client/assets/{loader-circle-DurUYl7E.js → loader-circle-OvccU82H.js} +1 -1
- package/dist/client/assets/{local-agents-D9fYYRyj.js → local-agents-BqnoxJrq.js} +1 -1
- package/dist/client/assets/log-in-7SnYqW5w.js +1 -0
- package/dist/client/assets/{machine-children-RGS4Q0r6.js → machine-children-DxcqCLmd.js} +1 -1
- package/dist/client/assets/media-blobs-Bi8pxr1u.js +1 -0
- package/dist/client/assets/{mentions-Ctw1ECUC.js → mentions-ByUvhS-v.js} +1 -1
- package/dist/client/assets/{mesh-ops-CGpRk4ik.js → mesh-ops-CiZ8xSAx.js} +1 -1
- package/dist/client/assets/{mesh-view-store-CliSYsmt.js → mesh-view-store-DZvJC4KU.js} +1 -1
- package/dist/client/assets/{message-circle-CSiJj6yo.js → message-circle-CxRVKNE-.js} +1 -1
- package/dist/client/assets/message-markup-BQW5jdJw.js +15 -0
- package/dist/client/assets/message-markup-Zwo3t4cI.js +1 -0
- package/dist/client/assets/{message-square-NmXWtWLR.js → message-square-BxesYglW.js} +1 -1
- package/dist/client/assets/mission-control-model-BpJHDV5D.js +1 -0
- package/dist/client/assets/{mission-control-store-DZ29Mlj1.js → mission-control-store-elEEsIvb.js} +1 -1
- package/dist/client/assets/{mission-wall-DOuGOxQy.js → mission-wall-CAo4BKfa.js} +1 -1
- package/dist/client/assets/monitor-DTTYEb73.js +1 -0
- package/dist/client/assets/{nav-destinations-CyXnw9kh.js → nav-destinations-uorRqFxf.js} +1 -1
- package/dist/client/assets/{observe-CkfOxYx_.js → observe-BJqERJVj.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-BswZLqvA.js} +1 -1
- package/dist/client/assets/{panel-right-BNTJhy8M.js → panel-right-Bv7sP_fc.js} +1 -1
- package/dist/client/assets/paperclip-BjcuP_Hx.js +1 -0
- package/dist/client/assets/{pause-DWS7YGQ3.js → pause-C2XTlkjs.js} +1 -1
- package/dist/client/assets/{persistent-state-xsuk6Kc-.js → persistent-state-KRk_yb0q.js} +1 -1
- package/dist/client/assets/{pin-DWlD1BOF.js → pin-C2mFOV1l.js} +1 -1
- package/dist/client/assets/{play-D_Pggug4.js → play-FT6K3It1.js} +1 -1
- package/dist/client/assets/{plus-D_wLGJGT.js → plus-DFDDeGKu.js} +1 -1
- package/dist/client/assets/profile-DTmzN16I.js +1 -0
- package/dist/client/assets/{projects-inbox-DvbqJO3q.js → projects-inbox-C0FUCv_p.js} +1 -1
- package/dist/client/assets/projects-inbox-ColX6lpx.css +1 -0
- package/dist/client/assets/provider-Dojd8quC.js +1 -0
- package/dist/client/assets/{proxy-DOG46ja4.js → proxy-AJsmwA6h.js} +1 -1
- package/dist/client/assets/{radio-C_jtwbFP.js → radio-DRoOZsws.js} +1 -1
- package/dist/client/assets/{refresh-cw-Da9DDLk2.js → refresh-cw-BmVr7sCD.js} +1 -1
- package/dist/client/assets/resolve-panes-pbY1fCWi.js +1 -0
- package/dist/client/assets/resolve-sidebar-context-YWkZTq1t.js +1 -0
- package/dist/client/assets/right-49kO-6nD.js +1 -0
- package/dist/client/assets/right-APtItA8A.js +1 -0
- package/dist/client/assets/right-BJwhPqtn.js +1 -0
- package/dist/client/assets/right-BPqrf4ek.js +1 -0
- package/dist/client/assets/right-D7djOy6K.js +1 -0
- package/dist/client/assets/right-DKOUCRob.js +1 -0
- package/dist/client/assets/right-DMNrVzg7.js +1 -0
- package/dist/client/assets/{right-BLJsc2-p.js → right-DWPVB-nK.js} +1 -1
- package/dist/client/assets/right-DppeMCy4.js +1 -0
- package/dist/client/assets/right-GAL5Mw1v.js +1 -0
- package/dist/client/assets/{rocket-DyrYDo8V.js → rocket-CGl4RTV7.js} +1 -1
- package/dist/client/assets/router-DCtl8wqb.js +1 -0
- package/dist/client/assets/runtime-picker-DXu2bOTh.js +1 -0
- package/dist/client/assets/{scope-views-B7PZGlhY.js → scope-views-RUWwCVAr.js} +1 -1
- package/dist/client/assets/scout-voice-CZx60X6E.js +1 -0
- package/dist/client/assets/{scoutbot-markdown-Bz0Vbto2.js → scoutbot-markdown-BKEBSbG0.js} +1 -1
- package/dist/client/assets/{scroll-text-DwC8r2g6.js → scroll-text-DNjxhyO2.js} +1 -1
- package/dist/client/assets/{search-C4VlW_0l.js → search-DT42oyRW.js} +1 -1
- package/dist/client/assets/secondaryNavConfig-CS1svh6n.js +1 -0
- package/dist/client/assets/secondaryNavConfig-D15P1Y9k.css +1 -0
- package/dist/client/assets/{selection-bridge-B5jqyMR9.js → selection-bridge-x3wFUjxj.js} +1 -1
- package/dist/client/assets/{send-horizontal-pOtGI7FM.js → send-horizontal-CH0-fbZE.js} +1 -1
- package/dist/client/assets/{send-to-agent-session-BZGq_ycy.js → send-to-agent-session-DoKCDBJ4.js} +1 -1
- package/dist/client/assets/{server-ms1yxUYJ.js → server-QfsgMLk1.js} +1 -1
- package/dist/client/assets/{session-catalog-s-T_w41t.js → session-catalog-CvSdPHPe.js} +1 -1
- package/dist/client/assets/session-recap-lanes-D-eVJnpY.js +1 -0
- package/dist/client/assets/session-recap-queue-41l2XVkI.js +1 -0
- package/dist/client/assets/{session-table-CDx_16xf.js → session-table-L-pns6Zl.js} +1 -1
- package/dist/client/assets/{sessions-view-DzYGsKWS.js → sessions-view-Dc-QAa7O.js} +1 -1
- package/dist/client/assets/{settings-TJIkkZ0P.js → settings-BVh7kldq.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-782VC_yy.js} +1 -1
- package/dist/client/assets/{sparkles-BbOFw3d0.js → sparkles-BjHq_DNK.js} +1 -1
- package/dist/client/assets/{sse-v5QLsOHV.js → sse-BCPRocpq.js} +1 -1
- package/dist/client/assets/system-surfaces-redesign-q2BmCB7e.css +1 -0
- package/dist/client/assets/{tail-events-DQ46QBW1.js → tail-events-d0yAYxR0.js} +1 -1
- package/dist/client/assets/{terminal-96JWDYDL.js → terminal-hQKQygcf.js} +1 -1
- package/dist/client/assets/{terminal-relay-Bfx8pg80.js → terminal-relay-Bxs1hp-j.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-Ay5C2c-M.js} +1 -1
- package/dist/client/assets/theme-vars-DNK0nn3k.js +1 -0
- package/dist/client/assets/triangle-alert-CHoRGdVO.js +1 -0
- package/dist/client/assets/use-beside-DoRC1nt0.js +1 -0
- package/dist/client/assets/{use-conversation-list-A_YUf8lo.js → use-conversation-list-CY4JciOV.js} +1 -1
- package/dist/client/assets/{use-fleet-active-asks-DFs_u-vM.js → use-fleet-active-asks-CymmXWH4.js} +1 -1
- package/dist/client/assets/{use-mesh-node-state-Ck9CYplv.js → use-mesh-node-state-BvaqtODo.js} +1 -1
- package/dist/client/assets/{use-mesh-ops-items-Be1WmwCg.js → use-mesh-ops-items-BSYaqH_0.js} +1 -1
- package/dist/client/assets/{use-reduced-motion-D7n3vK8t.js → use-reduced-motion-3gMYZNIp.js} +1 -1
- package/dist/client/assets/use-scout-dev-flags-DS_pYYQd.js +1 -0
- package/dist/client/assets/{useAgentHoverCard-Dr-OjNFF.js → useAgentHoverCard-BANmpjMh.js} +1 -1
- package/dist/client/assets/useContentSecondaryNav-C6OBu-3_.js +1 -0
- package/dist/client/assets/{useEmbedHeadline-BL8wQawZ.js → useEmbedHeadline-D6pJRxUg.js} +1 -1
- package/dist/client/assets/usePersistentState-B8lP7TRb.js +1 -0
- package/dist/client/assets/{usePierreRuntime-DJkRHMoe.js → usePierreRuntime-BAQdiN0L.js} +1 -1
- package/dist/client/assets/useSidebarCollapse-OL_8J5cL.js +1 -0
- package/dist/client/assets/users-BUjx36gx.js +1 -0
- package/dist/client/assets/voice-paths-CJUuBPh3.css +1 -0
- package/dist/client/assets/voice-turn-DftA0iIb.css +1 -0
- package/dist/client/assets/voice-turn-ledger-BMZxlSjg.js +1 -0
- package/dist/client/assets/{wrench-BsMTSeji.js → wrench-DR0i5BU7.js} +1 -1
- package/dist/client/assets/{x-DI1ktCYb.js → x-DAehov0E.js} +1 -1
- package/dist/client/assets/{xterm-B1YBE4Gq.js → xterm-BXQiLVnI.js} +1 -1
- package/dist/client/assets/{zap-sKPkh4sQ.js → zap-CEjZNZbI.js} +1 -1
- package/dist/client/crew/sheets/eye-plate-v1/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-down.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/eye-plate-v1/look-up.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-half.webp +0 -0
- package/dist/client/crew/sheets/sprout/blink-shut.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-down.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-left.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up-right.webp +0 -0
- package/dist/client/crew/sheets/sprout/look-up.webp +0 -0
- package/dist/client/index.html +15 -3
- package/dist/drizzle/0019_session_actor_targets.sql +227 -0
- package/dist/drizzle/0020_message_reactions.sql +11 -0
- package/dist/drizzle/README.md +19 -0
- package/dist/drizzle/meta/_journal.json +14 -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 +1721 -837
- package/dist/node/main.mjs +264 -39
- package/dist/pairing-runtime-controller.mjs +1090 -570
- package/dist/runtime/base-daemon.mjs +14272 -61
- package/dist/runtime/broker-daemon.mjs +16999 -1243
- package/dist/runtime/broker-process-manager.mjs +101 -6
- package/dist/runtime/mesh-discover.mjs +101 -6
- package/dist/scout-control-plane-web.mjs +27057 -6178
- 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 +294 -56
- 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/AgentAvatar-BIwg54Tj.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/AgentLanesView-aAyC7lHf.js +0 -2
- package/dist/client/assets/AgentMasterScreen-By6DN0jF.js +0 -1
- package/dist/client/assets/AgentSessions-Cox2zS-e.js +0 -6
- 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/ConversationComposer-B7RU6LKd.js +0 -1
- package/dist/client/assets/ConversationFeedRows-DVqnZQH0.js +0 -1
- package/dist/client/assets/ConversationHeader-CCSU8uo_.js +0 -1
- package/dist/client/assets/ConversationScreen-Brfas2y0.css +0 -1
- package/dist/client/assets/ConversationScreen-tTP6B_F-.js +0 -2
- package/dist/client/assets/ConversationStatus-CK-YfLpi.js +0 -1
- package/dist/client/assets/CrewAvatar-CJhuqTsJ.js +0 -1
- 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/FloorTacticalHUD-Bngao6sn.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/ObserveEmbedScreen-BPiSXXvm.js +0 -2
- 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/Provider-5Hotn7NQ.js +0 -5
- 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/SessionObserve-DaqDhqDI.js +0 -12
- package/dist/client/assets/SessionObserveEvidence-Drv-D8Oh.js +0 -1
- package/dist/client/assets/SessionRefScreen-BOQ1_ydg.js +0 -1
- package/dist/client/assets/SessionsScreen-R8QKvoey.js +0 -1
- package/dist/client/assets/SettingsDrawer-BDapR4E9.js +0 -3
- package/dist/client/assets/SettingsScreen-DirtO7Z0.js +0 -1
- package/dist/client/assets/SharedWorkFloor-BCmdeb3Q.css +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/WorkDetailScreen-CwtRCm_-.js +0 -5
- package/dist/client/assets/WorldActorTalk-uIH2jGqA.js +0 -1
- package/dist/client/assets/WorldMinimap-Blqg0d5r.js +0 -1
- package/dist/client/assets/agent-autocomplete-C7xwIcwd.css +0 -1
- package/dist/client/assets/agent-autocomplete-CeHQpuG9.js +0 -10
- package/dist/client/assets/agents-screen-BMu6PpRY.css +0 -1
- 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-model-BGFHoxQ0.js +0 -1
- package/dist/client/assets/conversation-motion-features-9x8uZpwh.js +0 -1
- package/dist/client/assets/conversations-Cbg9h_Af.js +0 -1
- package/dist/client/assets/ctx-panel-F05jXK4Q.css +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-moving-signal-B7m-ngb2.js +0 -1
- 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/message-markup-DgFSyb3f.js +0 -15
- package/dist/client/assets/mission-control-model-C30vU1Fe.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/runtime-picker-DdsttHHc.js +0 -1
- package/dist/client/assets/scout-voice-DOQ_B77g.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/system-surfaces-redesign-DKFg4GB5.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
- package/dist/drizzle/meta/0000_snapshot.json +0 -4575
- package/dist/drizzle/meta/0001_snapshot.json +0 -4624
- package/dist/drizzle/meta/0002_snapshot.json +0 -4631
- package/dist/drizzle/meta/0003_snapshot.json +0 -4952
- package/dist/drizzle/meta/0004_snapshot.json +0 -5235
- package/dist/drizzle/meta/0005_snapshot.json +0 -5599
- package/dist/drizzle/meta/0006_snapshot.json +0 -5606
- package/dist/drizzle/meta/0007_snapshot.json +0 -5767
- package/dist/drizzle/meta/0008_snapshot.json +0 -5774
- package/dist/drizzle/meta/0009_snapshot.json +0 -6262
- package/dist/drizzle/meta/0010_snapshot.json +0 -6286
- package/dist/drizzle/meta/0011_snapshot.json +0 -6337
- package/dist/drizzle/meta/0012_snapshot.json +0 -6458
- package/dist/drizzle/meta/0013_snapshot.json +0 -6465
- package/dist/drizzle/meta/0014_snapshot.json +0 -6503
- package/dist/drizzle/meta/0015_snapshot.json +0 -6596
- package/dist/drizzle/meta/0016_snapshot.json +0 -6611
- package/dist/drizzle/meta/0017_snapshot.json +0 -6785
- package/dist/drizzle/meta/0018_snapshot.json +0 -6804
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{r,j as o}from"./index-EsrkGBcv.js";/* empty css */import{a as dn}from"./api-DSqpVKC7.js";import{u as Gn}from"./tail-events-d0yAYxR0.js";import{i as _e,o as un}from"./surface-activity-B1rgWB1i.js";import{u as Kn}from"./observe-BJqERJVj.js";import{f as Un}from"./terminal-sessions-3RfJpen8.js";import{n as fn}from"./agent-state-DDhnFEEP.js";import{S as qn}from"./Provider-C35yu29I.js";import{d as Yn}from"./types-B0PlfpKc.js";import{u as Zn}from"./useEmbedHeadline-D6pJRxUg.js";import{A as Xn}from"./AgentAvatar-CrP1eXxk.js";import{h as Jn,S as Qn}from"./SessionObserve-DXxBvejJ.js";import{X as et,Y as mn,Z as nt,_ as tt,$ as st,a0 as Qe,a1 as at,a2 as rt,a3 as ot,a4 as it,a5 as lt,a6 as Ce,a7 as ct,a8 as dt,a9 as ut,aa as hn,ab as ft,ac as mt,m as gn,n as pn}from"./router-DCtl8wqb.js";import{AgentFloorView as ht}from"./AgentFloorView-DH4jiDgw.js";import{u as gt,s as pt,A as Lt,a as yt,L as bt}from"./AgentLanesPreflight-Ry-aqDTr.js";import{AgentLaneChrome as vt}from"./AgentLaneChrome-TF1SlJSc.js";import{AgentLaneCard as St}from"./AgentLaneCard-BaZ2g-f8.js";import{a as kt}from"./agent-lane-card-model-CeqQGp-8.js";import{c as xt}from"./agent-lane-detail-Ti3trpfH.js";import{i as wt,A as Et}from"./AgentLaneDetailSheet-EzEPsn3g.js";import{LaneTraceDetailSheet as Nt}from"./LaneTraceDetailSheet-DYrd0BIf.js";import{readStoredLaneSummaryHeight as Rt,useLaneSummaryResize as jt,AgentLaneSummaryResizeHandle as Ct}from"./AgentLaneSummaryResize-dpp7YvrX.js";import{A as ge,l as J,k as It,m as Ln,n as At,e as Tt,g as _t,p as Pt,r as Dt,d as yn,D as Mt,h as zt,i as Ot}from"./agent-lanes-model-DMAdqCmK.js";import{i as $t,c as Ft,n as en}from"./keyboard-nav-DDHegDbx.js";import{p as nn}from"./lane-roster-store-D-RSWjb-.js";import{b as tn}from"./session-recap-lanes-D-eVJnpY.js";function Pe(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Wt(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 Ht(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Bt(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 Vt(e,n,t){return Ht(Wt([...n,...e]),t)}const Gt=500;function Ie(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):null}function Kt(e){return JSON.stringify([Ie(e.recentLimit),e.includeTranscriptReplay,Ie(e.recentWindowMs),e.discoveryScope??null,Ie(e.discoveryLimit)])}function Ut(e,n){return e==="error"||n==="error"}function qt(e,n){return n?Math.min(e,Gt):e}async function Yt(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 Zt(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const Xt=500,Jt=6e4;function Qt(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function es(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 dn(`/api/tail/recent?${s.toString()}`)).events??[]}function ns(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 ts(e){const n=e?.recentLimit??Xt,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Jt,i=e?.includeTranscriptReplay??!1,l=e?.discoveryScope,f=e?.discoveryLimit,b=e?.recentWindowMs,u=e?.pauseWhenHidden??!1,d=Kt({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"),y=r.useRef("idle"),R=r.useRef(null),C=r.useRef(null),S=r.useRef(0);Gn(L=>{p(k=>Bt(k,L,n))},t);const D=r.useCallback((L=!1)=>{if(!t||u&&!L&&!_e())return Promise.resolve();L&&(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;y.current=i?"loading":"ready";let z;return z=Yt({includeTranscriptReplay:i,load:j=>es(j?n:qt(n,i),j,b),publish:(j,H)=>{if(A!==S.current)return;const V=()=>{p(F=>Vt(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&&(y.current=j.replay==="failed"?"error":"ready"),j.replay!=="failed"&&(R.current=d))}).catch(()=>{A===S.current&&(P.current="error",i&&(y.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(L=!1)=>{if(t&&!(u&&!L&&!_e())){L&&w(k=>({...k,discovery:"loading"}));try{const k=await dn(ns(l,f));c(k),w(x=>({...x,discovery:"ready",discoveryLoaded:!0})),Ut(P.current,y.current)&&D()}catch{c(k=>k??Qt()),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 L=!1,k=!0;const x=()=>{L||I(k),k=!1};x();const A=setInterval(x,s),z=u?un(x):null;return()=>{L=!0,clearInterval(A),z?.()}},[s,t,u,I]),r.useEffect(()=>{t||(S.current+=1,C.current=null,R.current=null,y.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 ss({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")||$t(c.target)||Ft()||n||e.length===0)return;const g=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&g>=0&&g<ge.length){c.preventDefault(),s(ge[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 as(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function he(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function bn(e,n){if(!n)return!0;const t=he(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=as(i);return l===n||he(i)===t||!!(f&&(f.toLowerCase()===n||he(f)===t))})}function rs(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return bn([s.harness,s.definitionId,i?.attribution,l],t)}function os(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return bn([s.project,s.projectRoot,s.cwd,i?.cwd,J(s,l)],t)}function is(e){return fn(e.agent.state??null,e.agent)==="needs_attention"?!0:Jn(e.observe?.events??[])}function sn(e,n,t,s){return mn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function ls(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>rs(t,e.harness));case"project":return n.filter(t=>os(t,e.projectPath));case"attention":return n.filter(t=>is(t));default:return[]}}function an(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=nt(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function cs(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 et(t.slots)){const p=u.get(g.laneDefId);if(!p)continue;const v=ls(p,n),w=g.zone==="pinned_left"?l:g.zone==="pinned_right"?b:f;for(const P of v)an(w,i,{lane:P,zone:g.zone,position:g.position,widthPx:sn(t,P,g,s),slot:g,laneDef:p})}if(t.showAutoLanes){let g=0;for(const p of n)i.has(p.id)||(an(f,i,{lane:p,zone:"main",position:g,widthPx:sn(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 ds(e){return e.slots.some(n=>n.laneDefId===st)}function me(e,n){const t=`harness:${he(n)}`;return e.slots.some(s=>s.laneDefId===t)}function us(e,n){const t=tt(n);return e.slots.some(s=>s.laneDefId===t)}function fs(e,n,t){const[s,i]=r.useState(()=>Qe(e,n));r.useEffect(()=>{i(Qe(e,n))},[n,e]);const l=r.useCallback(y=>{at(y),i(y)},[]),f=r.useMemo(()=>cs({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),b=r.useCallback((y,R="pinned_left")=>{l(rt(s,{laneId:y.id,title:J(y.agent,y.source),zone:R,width:s.laneWidths[y.id]}))},[s,l]),u=r.useCallback(y=>{l(ot(s,y))},[s,l]),d=r.useCallback((y,R)=>{l(it(s,y,R))},[s,l]),m=r.useCallback(y=>{l(lt(s,y))},[s,l]),c=r.useCallback((y,R)=>{l(Ce(s,{kind:"harness",title:R??`${y} sessions`,harness:y,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,l]),g=r.useCallback((y,R)=>{const C=y.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(ct(s))},[s,l]),w=r.useCallback(y=>dt(s,y),[s]),P=r.useCallback(y=>ut(s,y),[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 ms(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=hn(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(ft,Math.max(mt,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 rn=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],hs=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function gs(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function ps(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function Ls(e){return e?rn.filter(n=>n.key!=="floor"):rn}const vn="openscout:agent-lanes-horizon",Sn="openscout:agent-lanes-layout",kn="openscout:agent-lanes-grid-columns",xn="openscout:agent-lanes-technical-rollup",ys=`${xn}:lane:`,bs="openscout:agent-lanes-scroll",vs=96,Ss=160,ks=6e4,xs=6e4,ws=3e4,Es=3e4,Ns=3e4,Rs=12e4,js=["pinned-left","main","pinned-right"];function on(){return!_e()}function wn(e,n){return`${bs}:${e}:${n}`}function Cs(e,n){try{const t=sessionStorage.getItem(wn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function Is(e,n,t){try{sessionStorage.setItem(wn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function As(){try{const e=sessionStorage.getItem(vn);if(e&&ge.some(n=>n.key===e))return e}catch{}return Mt}function Ts(e){try{const n=sessionStorage.getItem(Sn);return gs(n,e)}catch{}return"lanes"}function ln(e){const n=Ts(e);return n==="floor"?"lanes":n}function _s(){try{return ps(sessionStorage.getItem(kn))}catch{return"auto"}}function Ps(){try{const e=sessionStorage.getItem(xn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function En(e){return`${ys}${encodeURIComponent(e)}`}function cn(e){try{const n=sessionStorage.getItem(En(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return Ps()??!1}function Ds(e,n){try{sessionStorage.setItem(En(e),n?"1":"0")}catch{}}function Ms(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]??Cs(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 js)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,Is(e,u,m)},[e]),setLaneScrollNode:f}}function zs({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 Os({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 $s({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 ",Ln(w)]}):null,o.jsx("button",{type:"button",onClick:l,children:"Show attention"}),o.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function Fs({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:y,onWidthResizeStart:R,widthResizing:C,focusProps:S,operatorName:D,grid:I=!1}){const{agent:M,observe:L,source:k}=e,x=Ot(L),A=!!L,z=x?" s-agent-lane--live":"",j=f?" s-agent-lane--new":"",[H,V]=r.useState(!0),[F,Q]=r.useState(()=>cn(e.id)),ee=r.useRef(e.id);r.useEffect(()=>{if(ee.current!==e.id){ee.current=e.id,Q(cn(e.id));return}Ds(e.id,F)},[F,e.id]);const ye=S?.ref,K=S?{"data-cursor":S["data-cursor"],tabIndex:S.tabIndex,onFocus:S.onFocus}:void 0,U=()=>o.jsx("section",{className:"s-agent-lane-trace","aria-label":`${J(M,k)} trace`,children:o.jsx("div",{className:"s-agent-lane-body",children:A?o.jsx(Qn,{data:L??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:Q,laneOperatorName:D,onLaneEventSelect:W=>w(e,W)}):o.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})}),O=r.useMemo(()=>kt(e,{isLive:x,nowMs:b}),[e,x,b]),q=r.useMemo(U,[A,L,e.source,M.id,M.harnessSessionId,b,u,d,F,D,w,e]);return o.jsxs("article",{ref:ye,"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`},...K,children:[o.jsx(vt,{title:t,width:i,defaultWidth:l,pinned:s,onTogglePin:P,onWidthChange:y,onResizeStart:R,resizing:C,statusLabel:yn(M,k),live:x,widthControls:!I}),o.jsx(St,{model:O,avatar:o.jsx(Xn,{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(Ct,{onResizeStart:c,onReset:g,active:p}),q]})}function Ws({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:l,harnessFilter:f,projectFilter:b}){Zn("Lanes",s);const u=r.useContext(qn),d=t?.agents??n??u?.agents??[],m=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,c=l??gn(),g=i??pn(),p=!s&&u?.route.view==="ops"&&u.route.mode==="world",[v,w]=r.useState(Date.now()),[P,y]=r.useState("4h"),[R,C]=r.useState(As),[S,D]=r.useState(()=>p?"floor":ln(s)),[I,M]=r.useState(_s),L=p,k=!p&&S==="grid",x=L?P:R,[A,z]=r.useState(Rt),[j,H]=r.useState([]),{beginResize:V,resetSummaryHeight:F,resizing:Q}=jt(z),ee=r.useCallback(a=>V(a,A),[V,A]),ye=zt(),K=It(x),U=ts({enabled:!t,includeTranscriptReplay:!0,discoveryIntervalMs:s?ks:xs,recentLimit:ye,recentWindowMs:K,discoveryLimit:s?vs:Ss,pauseWhenHidden:!0}),O=t?.discovery??U.discovery,q=t?.tailEvents??U.events,W=t?.loadState??U.loadState,De=t?.retryInitialLoad??U.retryInitialLoad,Me=t?.terminalSessions??j,Nn={view:"ops",mode:p?"world":"lanes"},Y=Ln(x),ze=s?ws:1e4,Oe=s?Es:1e4;r.useEffect(()=>{const a=setInterval(()=>{on()||w(Date.now())},ze);return()=>clearInterval(a)},[ze]),r.useEffect(()=>{if(t)return;let a=!1;const h=async()=>{if(!on())try{const Re=await Un({includeDiscovered:!1});a||H(Re)}catch{a||H([])}};h();const N=setInterval(()=>{h()},Oe),_=un(()=>{h()});return()=>{a=!0,clearInterval(N),_()}},[t,Oe]),r.useEffect(()=>{try{sessionStorage.setItem(vn,R)}catch{}},[R]),r.useEffect(()=>{D(p?"floor":a=>a==="floor"?ln(s):a)},[p,s]),r.useEffect(()=>{if(S!=="floor")try{sessionStorage.setItem(Sn,S)}catch{}},[S]),r.useEffect(()=>{try{sessionStorage.setItem(kn,I)}catch{}},[I]);const Rn=r.useRef(At()),$e=r.useRef(""),[ae,Fe]=r.useState(()=>new Set),[be,We]=r.useState(null),jn=r.useMemo(()=>d.filter(a=>Tt(a,v,x)),[d,v,x]),Cn=Kn(jn,{enabled:!t,activeIntervalMs:s?Ns:void 0,idleIntervalMs:s?Rs:void 0,pauseWhenHidden:!0}),He=t?.observeCache??Cn,Be=Zt(W),Ve=Be==="blank",In=Be==="degraded",Ge=O?.totals.transcripts??O?.transcripts?.length??0;r.useEffect(()=>{if(ae.size===0)return;const a=setTimeout(()=>Fe(new Set),900);return()=>clearTimeout(a)},[ae]);const{lanes:re,issues:$,freshLaneIds:ve}=r.useMemo(()=>{const a=_t({transcripts:O?.transcripts??[],tailEvents:q,processes:O?.processes??[],scoutAgents:d,terminalSessions:Me,observeCache:He,now:v,workingOnly:!0,horizon:x}),h=Pt(a.lanes,Rn.current),N=[...Dt(O),...a.issues];return{lanes:h.lanes,issues:N,freshLaneIds:h.newLaneIds}},[O,q,d,Me,He,v,x]);r.useEffect(()=>{const a=$.map(h=>`${h.id}\0${h.message}`).join(`
|
|
2
|
+
`);a!==$e.current&&($e.current=a,$.length!==0&&console.warn(`[agent-lanes] ${$.length} roster issue${$.length===1?"":"s"}`,$))},[$]),r.useEffect(()=>{ve.length!==0&&Fe(a=>{const h=new Set(a);for(const N of ve)h.add(N);return h})},[ve.join("\0")]);const ne=r.useMemo(()=>re.find(a=>a.id===be)??null,[be,re]),te=r.useMemo(()=>re.filter(a=>Bs(a,{harnessFilter:f,projectFilter:b})),[re,f,b]),An=r.useCallback(a=>Vs(a,{harnessFilter:f,projectFilter:b}),[f,b]),{deck:T,layout:E,pinLane:oe,unpinLane:ie,setLaneWidth:Se,addHarnessLane:se,addAttentionLane:Ke,addProjectLane:Tn,clearPins:_n,isPinned:le}=fs(c,g,te),{beginResize:Ue,resizingLaneId:qe}=ms(Se),ke=r.useMemo(()=>Gs({harnessFilter:f,projectFilter:b}),[f,b]),xe=r.useMemo(()=>ne?xt(ne):null,[ne]),Pn=r.useMemo(()=>xe?us(T,xe):!1,[T,xe]),Dn=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:Z,setLaneScrollNode:X}=Ms(c,Dn),Mn=r.useCallback(a=>{X("pinned-left",a)},[X]),zn=r.useCallback(a=>{X("main",a)},[X]),On=r.useCallback(a=>{X("pinned-right",a)},[X]),$n=r.useCallback(a=>{Z("pinned-left",a)},[Z]),Fn=r.useCallback(a=>{Z("main",a)},[Z]),Wn=r.useCallback(a=>{Z("pinned-right",a)},[Z]),G=E.flat,we=E.pinnedLeft.length+E.pinnedRight.length,ce=L?te.length:G.length,de=gt(pt(W,ce),Ve?0:bt);r.useEffect(()=>{if(L)return;const a=G.map(h=>{const{lane:N}=h;return{id:N.id,label:J(N.agent,N.source),statusLabel:yn(N.agent,N.source),tone:fn(N.agent.state,N.agent),agentId:wt(N.agent)?void 0:N.agent.id,updatedAt:N.lastActiveAt>0?N.lastActiveAt:void 0}});nn(a)},[G,L]),r.useEffect(()=>{const a=L?te:G.map(h=>h.lane);tn(a)},[te,L,G]),r.useEffect(()=>()=>{nn(null),tn([])},[]);const[Ye,Ee]=r.useState(null),Ne=r.useCallback(a=>{We(a.id)},[]),Ze=r.useCallback((a,h)=>{Ee({lane:a,event:h})},[]),Hn=r.useCallback(a=>{const h=a.observe?.events.at(-1);h&&Ee({lane:a,event:h})},[]),Bn=r.useCallback(a=>{le(a.id)?ie(a.id):oe(a)},[le,oe,ie]),{getLaneFocusProps:Xe}=ss({lanes:G.map(a=>a.lane),inspectedLaneId:be,onInspect:Ne,onHorizonChange:C,onTogglePin:Bn}),[ue,B]=r.useState(!1),Je=r.useRef(null);r.useEffect(()=>{if(!ue)return;const a=h=>{Je.current?.contains(h.target)||B(!1)};return window.addEventListener("pointerdown",a),()=>window.removeEventListener("pointerdown",a)},[ue]);const fe=r.useCallback((a,h,N=!1)=>{const{lane:_}=a,Re=J(_.agent,_.source),Vn=T.laneWidths[_.id]??hn(a.widthPx).tier??a.widthPx;return o.jsx(Fs,{lane:_,widthPx:a.widthPx,laneTitle:Re,pinned:a.isPinned,laneWidth:Vn,defaultWidth:T.defaultLaneWidth,isNew:ae.has(_.id),nowMs:v,traceWindowMs:K,traceWindowLabel:Y,summaryHeight:A,onSummaryResizeStart:ee,onSummaryResizeReset:F,summaryResizing:Q,onInspect:Ne,onTraceEventSelect:Ze,onTogglePin:()=>{le(_.id)?ie(_.id):oe(_)},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,ee,Y,Ne,Ze,le,m,ae,v,oe,F,qe,Se,A,Q,K,ie]);return o.jsxs("div",{className:`s-agent-lanes${s?" s-agent-lanes--embedded s-agent-lanes--low-motion":""}`,"data-lane-profile":c,"data-lane-layout":L?"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:L?"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:[ce," ",L?"actors":"live"]}),!L&&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:L?`history 15m · actors ${Y}`:`trace ${Y}`}),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:Ls(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"?L:!L&&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:hs.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:L,children:[o.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":ue,onClick:()=>B(a=>!a),children:"+ Lane"}),ue?o.jsxs("div",{className:"s-agent-lanes-deck-popover",role:"menu",children:[o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{Ke(),B(!1)},disabled:ds(T),children:"Needs attention"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{se("codex","Codex sessions"),B(!1)},disabled:me(T,"codex"),children:"Codex sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{se("claude","Claude sessions"),B(!1)},disabled:me(T,"claude"),children:"Claude sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{se("grok","Grok sessions"),B(!1)},disabled:me(T,"grok"),children:"Grok sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{se("kimi","Kimi sessions"),B(!1)},disabled:me(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:()=>{_n(),B(!1)},disabled:we===0,children:"Clear pinned lanes"})]}):null]}),o.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":L?"Map activity window":"Activity window",children:ge.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:()=>L?y(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(zs,{issue:a},a.id))})]}):null,ce===0?de.visible?o.jsx(Lt,{discovery:O,discoveryPhase:W.discovery,windowMs:K,nowMs:v,layout:L?"none":k?"grid":"scroll",gridColumns:I,laneWidthPx:mn(T.defaultLaneWidth,T.defaultLaneWidth),matchTranscript:An}):Ve?o.jsx(Os,{loadState:W,onRetry:()=>{De()}}):o.jsx($s,{activeFilterLabel:ke,horizon:R,horizonLabel:Y,showAutoLanes:T.showAutoLanes,onHorizonChange:C,onAddAttentionLane:Ke,onAddCodexLane:()=>se("codex","Codex sessions"),sourceCount:Ge,eventCount:q.length,degraded:In,onRetry:()=>{De()}}):L?o.jsx(ht,{lanes:te,now:v,onOpenTrace:Hn,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:G.map((a,h)=>fe(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:Mn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:$n,children:E.pinnedLeft.map((a,h)=>fe(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:zn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:Fn,children:E.main.map((a,h)=>fe(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:On,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:Wn,children:E.pinnedRight.map((a,h)=>fe(a,E.pinnedLeft.length+E.main.length+h))})]}):null]}),de.visible?o.jsx(yt,{loadState:W,sourceCount:Ge,processCount:O?.processes.length??0,eventCount:q.length,laneCount:ce,horizonLabel:Y,handedOff:de.exiting,exiting:de.exiting}):null,ne&&o.jsx(Et,{lane:ne,navigate:e,returnRoute:Nn,navigationEnabled:t==null,onClose:()=>We(null),onPinProject:Tn,projectPinned:Pn}),Ye&&o.jsx(Nt,{target:Ye,onClose:()=>Ee(null)})]})}function pe(e){const n=e?.trim().toLowerCase();return n||null}function Te(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Hs(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function Le(e,n){if(!n)return!0;const t=Te(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=Hs(i);return l===n||Te(i)===t||!!(f&&(f.toLowerCase()===n||Te(f)===t))})}function Bs(e,n){const t=pe(n.harnessFilter),s=pe(n.projectFilter),{agent:i,facts:l,source:f}=e;return Le([i.harness,i.definitionId,l?.attribution,f],t)&&Le([i.project,i.projectRoot,i.cwd,l?.cwd,J(i,f)],s)}function Vs(e,n){return Le([e.harness,e.source],pe(n.harnessFilter))&&Le([e.project,e.cwd],pe(n.projectFilter))}function Gs(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const Ks=Yn({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:gn(),laneSize:pn(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),va=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:Ws,scoutSurface:Ks},Symbol.toStringTag,{value:"Module"}));export{Ws as A,va as a,cs as r,ts as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as t}from"./index-
|
|
1
|
+
import{r as i,j as t}from"./index-EsrkGBcv.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-Ay5C2c-M.js";import{t as S}from"./time-Dhsh_2EG.js";import{u as U}from"./Provider-C35yu29I.js";import{o as N}from"./openContent-C6XO6kr5.js";import{E as F}from"./eye-LrO-cXQt.js";import{T as H}from"./terminal-hQKQygcf.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 a,j as e}from"./index-EsrkGBcv.js";import{A as O}from"./AgentAvatar-CrP1eXxk.js";import{H as W}from"./HarnessMark-C4naWc16.js";import{u as q,b as I,f as V}from"./use-fleet-active-asks-CymmXWH4.js";import{p as z,N as K,t as U}from"./sessions-view-Dc-QAa7O.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-CY4JciOV.js";import{u as D}from"./router-DCtl8wqb.js";import{u as Q}from"./Provider-C35yu29I.js";import{CommsFlowView as X}from"./CommsFlowGraph-DxoOaLF_.js";import{mapIdentities as Y}from"./CommsFlowMap-Vi8ziCPg.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 ot}from"./use-beside-DoRC1nt0.js";import{ConversationScreen as at}from"./ConversationScreen-CUfsQ4MR.js";import{b as it,s as nt}from"./agent-master-model-Bk_yuUXJ.js";/* empty css */import{P as mt}from"./panel-right-Bv7sP_fc.js";import"./SpriteAvatar-CpZWf54-.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-kTznzqcO.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./colors-CFlbwC25.js";import"./sse-BCPRocpq.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"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./ComposerAttachments-DW0AIb8k.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./openContent-C6XO6kr5.js";import"./eye-LrO-cXQt.js";import"./terminal-hQKQygcf.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./MessageEmbeds-ksPazAKH.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-C-ZWscKj.js";import"./BackToPicker-CUkjnoVk.js";import"./AstronautSuit-Cchnc4Ug.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./tail-events-d0yAYxR0.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";const lt=500;function ct(s,n){const[i,l]=a.useState([]),[f,c]=a.useState(!1),[m,d]=a.useState(null);return a.useEffect(()=>{if(l([]),!n||!s){c(!1),d(null);return}let o=!0;return c(!0),d(null),H(`/api/messages?actor=${encodeURIComponent(s)}&limit=${lt}`).then(r=>{o&&l([...r].sort((x,v)=>x.createdAt-v.createdAt))}).catch(r=>{o&&(l([]),d(r instanceof Error?r.message:"Could not load this agent's messages."))}).finally(()=>{o&&c(!1)}),()=>{o=!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}=a.useMemo(()=>{const o=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(o)},[i]),d=a.useMemo(()=>st(c,m),[c,m]);return{passes:c,flights:m,tasks:d,loading:l,error:f,count:i.length}}function ms({agentId:s,threadId:n,machineId:i,navigate:l}){const{agents:f}=Q(),c=D(),m=rt(),d=ot(l,i),[o,r]=a.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]=a.useState(null),b=`${s}\0${n??""}`,S=a.useRef(b);a.useEffect(()=>{S.current!==b&&(S.current=b,r("chat"),v(null))},[b]),a.useEffect(()=>v(null),[o]),a.useEffect(()=>{if(typeof window>"u")return;const t=new URL(window.location.href),h=o==="chat"?"":o;(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}`))},[o,c.searchStr]);const{sessions:C,loading:T}=J(),N=q(),{agent:g,memberAgentIds:E,sessions:k,master:p,threads:A}=a.useMemo(()=>it({agentId:s,threadId:n,machineId:i,agents:f,sessions:C}),[s,n,i,f,C]),$=a.useMemo(()=>I(N,E),[N,E]),u=dt(s,o!=="chat"),B=a.useMemo(()=>Y(k.flatMap(t=>t.participants??[])),[k]),w=n??p?.id??null,L=a.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${o===t.id?" is-active":""}`,onClick:()=>r(t.id),"aria-pressed":o===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:o!=="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:o,selected:x,onSelect:v,onStage:t=>{r("chat"),d(t)},beside:m}):w?e.jsx(at,{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{ms as AgentMasterScreen};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{j as s,r as p}from"./index-EsrkGBcv.js";import{u as H}from"./Provider-C35yu29I.js";import{o as E}from"./openContent-C6XO6kr5.js";import{S as K}from"./SessionHopMenu-E6VJZrE0.js";import{a as P}from"./api-DSqpVKC7.js";import{c as q}from"./clipboard-e3fSpeo7.js";import{t as R}from"./time-Dhsh_2EG.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./external-link-CUObqmgX.js";const z=30*6e4,J=/^(?: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 Q(e){const a=(e.preview??"").replace(/^\[ask:[^\]]+\]\s*/i,"").replace(/\s+/g," ").replace(J,"").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 D(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 X(e){return e.replace(/^\/(?:Users|home)\/[^/]+\/(?:dev\/|projects\/|src\/|code\/)?/,"")}function h(e){return!e||e<=0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(e<1e4?1:0).replace(/\.0$/,"")}k`}function Y(e){const a=new Map;for(const t of e){if(t.kind!=="tool")continue;const r=(t.tool??"tool").toLowerCase();a.set(r,(a.get(r)??0)+1)}return[...a.entries()].map(([t,r])=>({name:t,n:r})).sort((t,r)=>r.n-t.n).slice(0,8)}function F(){const[e,a]=p.useState(!1),t=p.useRef(null),r=p.useCallback(l=>{q(l).then(o=>{o&&(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,r]}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 Z({value:e,display:a,title:t,className:r}){const[l,o]=F();return s.jsxs("button",{type:"button",className:r?`ap-sx-copy ${r}`:"ap-sx-copy","data-copied":l||void 0,title:l?"Copied":t??e,"aria-label":`Copy ${e}`,onClick:i=>{i.stopPropagation(),o(e)},children:[s.jsx("span",{className:"ap-sx-copyText",children:a}),s.jsx(B,{copied:l})]})}function ss({session:e,agentId:a,status:t}){const{route:r,navigate:l}=H(),[o,i]=p.useState(null),[v,d]=p.useState("loading"),m=e.harnessSessionId??e.id;p.useEffect(()=>{if(!a){d("loaded");return}let n=!1;return d("loading"),i(null),P(`/api/agents/${encodeURIComponent(a)}/observe`).then(c=>{n||(i(c),d("loaded"))}).catch(()=>{n||d("loaded")}),()=>{n=!0}},[a]);const x=o?.data??null,b=x?.metadata,u=b?.usage,g=b?.session,f=x?.files??[],k=p.useMemo(()=>Y(x?.events??[]),[x?.events]),[T,O]=F(),M=g?.gitBranch?.trim()||e.currentBranch?.trim()||"—",A=g?.model?.trim()||"—",y=g?.turnCount??u?.assistantMessages??e.messageCount??null,w=g?.sessionStart??e.lastMessageAt??null,S=u?.contextInputTokens??0,C=u?.contextWindowTokens??0,j=C>0?Math.min(100,Math.round(S/C*100)):null,I=(u?.cacheReadInputTokens??0)+(u?.cacheCreationInputTokens??0),W=()=>E(l,{view:"sessions",sessionId:e.id},{returnTo:r}),U=()=>E(l,{view:"terminal",agentId:a,mode:"takeover"},{returnTo:r}),V=[["branch",M],["model",A],["started",w?R(w):"—"],["turns",y!=null?`${y}`:"—"]],_=()=>{const c=[["session",m],["agent",a||"—"],["branch",M],["model",A],["cwd",g?.cwd?.trim()||"—"],["started",w?new Date(w).toISOString():"—"],["turns",y!=null?`${y}`:"—"],["context",j!=null?`${h(S)} / ${h(C)} (${j}%)`:"—"]].map(([N,G])=>`${`${N}:`.padEnd(9)}${G}`).join(`
|
|
2
|
+
`),$=f.length?`
|
|
3
|
+
|
|
4
|
+
files touched:
|
|
5
|
+
${[...f].slice(0,24).map(N=>` ${L[N.state]} ${N.path}`).join(`
|
|
6
|
+
`)}`:"";return c+$};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(Z,{className:"ap-sx-copyStat",value:m,display:`#${D(m)}`,title:m})]}),V.map(([n,c])=>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:c,children:c})]},n))]}),x?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:h(S)}),s.jsxs("span",{className:"ap-sx-dim",children:[" / ",h(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:["↑",h(u?.inputTokens)," in"]}),s.jsxs("span",{children:["↓",h(u?.outputTokens)," out"]}),I>0?s.jsxs("span",{className:"ap-sx-faint",children:["cache ",h(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,c)=>n+c.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,c)=>(n.state==="read"?1:0)-(c.state==="read"?1:0)).slice(0,8).map(n=>{const c=n.state!=="read",$=n.path.replace(/\/+$/,"").split("/").pop()??n.path,N=X(n.path.slice(0,n.path.length-$.length));return s.jsxs("div",{className:"ap-sx-fileRow","data-changed":c||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.jsx(K,{className:"ap-sx-resume",label:"Terminal ▾",hints:{agentId:a,sessionRefs:[m,e.id]},navigate:l,returnTo:r}),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 es({session:e,fallbackAgentId:a}){const t=e.agentId??a,[r,l]=p.useState(!1),i=e.lastMessageAt!=null&&Date.now()-e.lastMessageAt<z?"running":"idle",v=Q(e),d=e.currentBranch?.trim(),m=D(e.harnessSessionId??e.id),x=e.lastMessageAt?R(e.lastMessageAt):"—";return s.jsxs("div",{className:"ap-sx-session","data-open":r||void 0,"data-status":i,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>l(b=>!b),children:[s.jsx("span",{className:"ap-sx-tri","data-open":r||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ap-sx-dot","data-tone":i,"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":i,children:i==="running"?"RUNNING":"IDLE"}),s.jsx("span",{className:"ap-sx-age",children:x})]})]}),r?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:["#",m]}),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]})]})]}),r?s.jsx(ss,{session:e,agentId:t,status:i}):null]})}function Ys({agentIds:e,sessions:a}){const t=e??[],r=(a??[]).filter(o=>o.agentId!=null&&t.includes(o.agentId)).slice().sort((o,i)=>(i.lastMessageAt??0)-(o.lastMessageAt??0)).slice(0,8);if(r.length===0)return null;const l=t[0]??"";return s.jsx("div",{className:"ap-sx-list",children:r.map(o=>s.jsx(es,{session:o,fallbackAgentId:l},o.id))})}export{Ys as AgentSessions};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as u,j as s}from"./index-EsrkGBcv.js";import{A as B}from"./AgentAvatar-CrP1eXxk.js";import{H as S,h as w}from"./HarnessMark-C4naWc16.js";import{c as P}from"./agent-state-DDhnFEEP.js";import{f as R}from"./runtime-picker-DXu2bOTh.js";import{t as C}from"./time-Dhsh_2EG.js";import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./api-DSqpVKC7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./loader-circle-OvccU82H.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SpriteAvatar-CpZWf54-.js";import"./CrewAvatar-kTznzqcO.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 Js({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{Js as AgentsConsole};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e,r as d}from"./index-EsrkGBcv.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-DCtl8wqb.js";import{a as J}from"./sse-BCPRocpq.js";import{o as Q,i as C}from"./surface-activity-B1rgWB1i.js";import{u as Z}from"./Provider-C35yu29I.js";/* empty css */import{AgentsSubnav as ee}from"./AgentsSubnav-DwNX4yy0.js";import{AgentsLibrary as te}from"./library-CkWNPHRp.js";import{r as se,d as oe}from"./NewChatComposer-C97-iTMK.js";import{AgentDetailWithRail as ie,AgentProfileBar as ne}from"./profile-DTmzN16I.js";/* empty css *//* empty css *//* empty css */import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./index-BWHgHrtv.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./time-Dhsh_2EG.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./createLucideIcon-zZ8Hx7er.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./file-text-CnISiiw6.js";import"./x-DAehov0E.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./keyboard-nav-DDHegDbx.js";import"./media-blobs-Bi8pxr1u.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./SecondaryNav-D7dbV2qo.js";import"./secondaryNavConfig-CS1svh6n.js";import"./nav-destinations-uorRqFxf.js";import"./message-square-BxesYglW.js";import"./terminal-hQKQygcf.js";import"./search-DT42oyRW.js";import"./compass-63TUaz5_.js";import"./settings-BVh7kldq.js";import"./git-branch-B0_fPLO7.js";import"./scroll-text-DNjxhyO2.js";/* empty css */import"./SpriteAvatar-CpZWf54-.js";import"./HarnessMark-C4naWc16.js";import"./AgentSessions-B1gOhDBf.js";import"./openContent-C6XO6kr5.js";import"./SessionHopMenu-E6VJZrE0.js";import"./external-link-CUObqmgX.js";import"./clipboard-e3fSpeo7.js";import"./runtime-picker-DXu2bOTh.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./index-724SdE6r.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./chevron-down-l1mrh5S9.js";import"./AgentAvatar-CrP1eXxk.js";import"./CrewAvatar-kTznzqcO.js";import"./context-budget-8qFKqM-j.js";import"./session-catalog-CvSdPHPe.js";import"./terminal-relay-Bxs1hp-j.js";import"./BackToPicker-CUkjnoVk.js";import"./ConversationScreen-CUfsQ4MR.js";import"./ComposerAttachments-DW0AIb8k.js";import"./message-markup-Zwo3t4cI.js";import"./message-markup-BQW5jdJw.js";import"./mentions-ByUvhS-v.js";import"./AgentDetailCard-DtHT3sCo.js";import"./AgentLiveActions-CfTupTEl.js";import"./terminal-takeover-Ay5C2c-M.js";import"./eye-LrO-cXQt.js";import"./message-visibility-DwxgcgYK.js";import"./operator-attention-DBaRg5ep.js";import"./sessionRead-CvFz2RHv.js";import"./MessageEmbeds-ksPazAKH.js";import"./types-B0PlfpKc.js";import"./ConversationHeader-C-ZWscKj.js";import"./AstronautSuit-Cchnc4Ug.js";import"./panel-right-Bv7sP_fc.js";import"./CommsFlowGraph-DxoOaLF_.js";import"./comms-gesture-_aGFo6g3.js";import"./CommsCanvas-THp0r_U8.js";import"./comms-deck-CBhsXnY-.js";import"./CommsFlowMap-Vi8ziCPg.js";import"./CommsSelection-BUoRbu9o.js";/* empty css */import"./use-conversation-list-CY4JciOV.js";import"./agent-master-model-Bk_yuUXJ.js";import"./use-beside-DoRC1nt0.js";import"./ConversationComposer-CUQyArlk.js";import"./zap-CEjZNZbI.js";import"./ConversationFeedRows-DWiOfT-y.js";import"./ConversationPanels-D9oC0xG5.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-3gMYZNIp.js";import"./proxy-AJsmwA6h.js";import"./activity-CIlFrfPJ.js";import"./message-circle-CxRVKNE-.js";import"./tail-events-d0yAYxR0.js";import"./ConversationStatus--IPm2nGh.js";import"./check-lrJ3a73a.js";import"./sparkles-BjHq_DNK.js";import"./triangle-alert-CHoRGdVO.js";import"./SessionContextStrip-CXfs9hUD.js";import"./SessionObserve-DXxBvejJ.js";import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-CJa110yk.js";import"./lane-observe-CteDwdD-.js";import"./lane-ask-display-BTVSakyo.js";import"./ObservedTopologyPanel-CUTIoLZJ.js";import"./ObserveTextFlow-PFnG_10h.js";import"./SessionObserveEvidence-Cuj_KHxR.js";import"./wrench-DR0i5BU7.js";import"./AgentDefinitionsWorkspace-DguGs7jZ.js";import"./agent-specialization-DDc7mLCW.js";import"./project-overview-helpers-BQTc_Ous.js";import"./FileViewerPane-BAO6mtjD.js";/* empty css */import"./agent-essentials-BGGvT5G6.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 qs({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{qs as AgentsScreen};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as t}from"./index-EsrkGBcv.js";import{S as i}from"./SecondaryNav-D7dbV2qo.js";import{A as m}from"./secondaryNavConfig-CS1svh6n.js";import"./nav-destinations-uorRqFxf.js";import"./createLucideIcon-zZ8Hx7er.js";import"./message-square-BxesYglW.js";import"./terminal-hQKQygcf.js";import"./search-DT42oyRW.js";import"./compass-63TUaz5_.js";import"./settings-BVh7kldq.js";import"./file-text-CnISiiw6.js";import"./git-branch-B0_fPLO7.js";import"./code-xml-BhcNbLWU.js";import"./scroll-text-DNjxhyO2.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-EsrkGBcv.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-EsrkGBcv.js";/* empty css */import{D as ys}from"./DataTable-aH-jCyDq.js";import{H,h as F}from"./HarnessMark-C4naWc16.js";import{O as vs}from"./ObservedTopologyPanel-CUTIoLZJ.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-d0yAYxR0.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-EsrkGBcv.js";import{u as d,g as B,o as p}from"./router-DCtl8wqb.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-EsrkGBcv.js";import{E as p}from"./EmptyState-CZlrHXy-.js";import{a as f}from"./api-DSqpVKC7.js";import{S as b}from"./scoutbot-markdown-BKEBSbG0.js";import{b as h,t as u}from"./time-Dhsh_2EG.js";/* empty css *//* empty css */import"./Provider-C35yu29I.js";import"./theme-vars-DNK0nn3k.js";import"./provider-Dojd8quC.js";import"./router-DCtl8wqb.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-3RfJpen8.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-BCPRocpq.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-C97-iTMK.js";import"./runtime-picker-DXu2bOTh.js";import"./scout-voice-CZx60X6E.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-OvccU82H.js";import"./createLucideIcon-zZ8Hx7er.js";import"./media-blobs-Bi8pxr1u.js";import"./index-724SdE6r.js";import"./HarnessMark-C4naWc16.js";import"./conversation-model-FxDeWlle.js";import"./conversations-DoAAO6kA.js";import"./colors-CFlbwC25.js";import"./NewChatOrigin-DFbF_XvR.js";import"./keyboard-nav-DDHegDbx.js";import"./x-DAehov0E.js";import"./chevron-down-l1mrh5S9.js";import"./search-DT42oyRW.js";import"./file-text-CnISiiw6.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-DJr0v0D_.js";import"./TextDocumentSurface-D52m7Vd8.js";import"./index-CHD0qcfL.js";import"./chevron-right-DrfqcerI.js";import"./folder-D5prSkzz.js";import"./chevron-up-CETZJzjV.js";import"./code-xml-BhcNbLWU.js";import"./arrow-left-MVUKauwQ.js";import"./arrow-right-Bp-FpE5V.js";import"./voice-turn-ledger-BMZxlSjg.js";import"./chunk-HRAB3GC3-DbVLgbWX.js";import"./external-link-CUObqmgX.js";const g={"fleet-home":"fleet briefing",tour:"tour briefing"};function we({briefingId:s,navigate:i}){const[r,t]=o.useState(null),[n,a]=o.useState(null),c=o.useCallback(async()=>{try{const d=await f(`/api/briefings/${encodeURIComponent(s)}`);t(d),a(null)}catch(d){a(d instanceof Error?d.message:"Failed to load briefing")}},[s]);return o.useEffect(()=>{c()},[c]),n?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:n})]}):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:t,note:n}){const a=t?.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}),n?e.jsx("span",{className:"briefing-telemetry-note",children:n}):null]}),e.jsxs("div",{className:"briefing-telemetry-stats",children:[e.jsx("span",{children:t&&t.elapsedMs>0?`${(t.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,t)=>e.jsxs("li",{className:"briefing-step",children:[e.jsxs("div",{className:"briefing-step-label",children:[t+1,". ",r.label]}),r.narration?e.jsx("p",{className:"briefing-step-narration",children:r.narration}):null]},r.id??t))}):null,s.actions.length>0?e.jsx("div",{className:"briefing-actions",children:s.actions.map((r,t)=>e.jsx("button",{type:"button",className:"s-btn",onClick:()=>{r.route&&i(r.route)},children:r.label},`${r.label}-${t}`))}):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,t)=>{const n=r.tone==="warn"?"briefing-observation-warn":r.tone==="err"||r.tone==="error"?"briefing-observation-err":"";return e.jsxs("div",{className:`briefing-observation ${n}`.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]},t)})})]})}function w({reference:s,navigate:i}){const r=!!s.route,t=s.detail?`${s.label} · ${s.detail}`:s.label;return r?e.jsx("button",{type:"button",className:"briefing-ref-chip",onClick:()=>i(s.route),children:t}):e.jsx("span",{className:"briefing-ref-chip briefing-ref-chip-static",children:t})}function v({snapshot:s,call:i}){const r=o.useMemo(()=>C(s),[s]),[t,n]=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:()=>n(a=>!a),children:t?"Hide raw snapshot":"Show raw snapshot JSON"}),t?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=[],t=(n,a)=>{Array.isArray(a)&&r.push({label:n,value:a.length})};if(t("agents",i.agents),i.fleet&&typeof i.fleet=="object"){const n=i.fleet;t("active requests",n.activeAsks),t("attention",n.needsAttention),t("recent",n.recentCompleted)}if(i.broker&&typeof i.broker=="object"){const n=i.broker;t("broker msgs",n.recentMessages)}if(t("scout chatter",i.scoutChatter),t("tail events",i.agentLogMessages),i.operatorAttention&&typeof i.operatorAttention=="object"){const n=i.operatorAttention;t("operator items",n.items)}return r}export{we as BriefingDetailScreen};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as i,j as e}from"./index-
|
|
1
|
+
import{r as i,j as e}from"./index-EsrkGBcv.js";import{E as c}from"./EmptyState-CZlrHXy-.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};
|
package/dist/client/assets/{BrokerMetadataPanel-1GoSl2BV.js → BrokerMetadataPanel-Dk242Yh_.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as m,j as s}from"./index-
|
|
1
|
+
import{r as m,j as s}from"./index-EsrkGBcv.js";import{a as y,c as p,d as b,f as x}from"./broker-display-BkBzyvbR.js";import{C as u}from"./chevron-down-l1mrh5S9.js";import{C as j}from"./chevron-right-DrfqcerI.js";import"./status-tone-BM_zuRy1.js";import"./createLucideIcon-zZ8Hx7er.js";function i({label:e,value:a}){return s.jsxs("div",{className:"sys-broker-metadata-row",children:[s.jsx("span",{className:"sys-broker-metadata-key",children:e}),s.jsx("code",{className:"sys-broker-metadata-value",children:a})]})}function h({label:e,value:a,depth:t=0,defaultOpen:d=!0}){const[n,l]=m.useState(d&&t<2);if(a==null)return s.jsx(i,{label:e,value:"—"});if(Array.isArray(a))return a.length===0?s.jsx(i,{label:e,value:"[]"}):a.every(r=>typeof r!="object"||r===null)?s.jsx(i,{label:e,value:a.map(r=>x(r)).join(", ")}):s.jsxs("div",{className:"sys-broker-metadata-group",style:{marginLeft:t*12},children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-group-toggle",onClick:()=>l(r=>!r),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),s.jsx("span",{className:"sys-broker-metadata-group-label",children:e}),s.jsxs("span",{className:"sys-broker-metadata-count",children:[a.length," items"]})]}),n&&s.jsx("div",{className:"sys-broker-metadata-children",children:a.map((r,c)=>s.jsx(h,{label:`[${c}]`,value:r,depth:t+1,defaultOpen:t<1},`${e}-${c}`))})]});if(typeof a=="object"){const o=Object.entries(a);return o.length===0?s.jsx(i,{label:e,value:"{}"}):s.jsxs("div",{className:"sys-broker-metadata-group",style:{marginLeft:t*12},children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-group-toggle",onClick:()=>l(r=>!r),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),s.jsx("span",{className:"sys-broker-metadata-group-label",children:e}),s.jsxs("span",{className:"sys-broker-metadata-count",children:[o.length," fields"]})]}),n&&s.jsx("div",{className:"sys-broker-metadata-children",children:o.map(([r,c])=>s.jsx(h,{label:r,value:c,depth:t+1,defaultOpen:t<1},`${e}-${r}`))})]})}return s.jsx(i,{label:e,value:x(a)})}function k({entries:e}){return e.length===0?null:s.jsx("div",{className:"sys-broker-inspector-rows",children:e.map(a=>s.jsxs("div",{className:"sys-broker-inspector-row",children:[s.jsx("span",{className:"sys-detail-label",children:a.key}),s.jsx("code",{className:"sys-detail-value",children:a.value})]},a.key))})}function S({metadata:e,rawJson:a}){const t=m.useMemo(()=>y(e),[e]),d=m.useMemo(()=>p(e),[e]),[n,l]=m.useState(!1);return!e||Object.keys(e).length===0?s.jsx("div",{className:"sys-broker-metadata-empty",children:"No metadata payload attached to this dispatch row."}):s.jsxs("div",{className:"sys-broker-metadata-panel",children:[t.length>0&&s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsx("div",{className:"sys-broker-metadata-section-head",children:s.jsx("span",{className:"sys-detail-label",children:"Summary"})}),s.jsx(k,{entries:t})]}),d!==null&&s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsx("div",{className:"sys-broker-metadata-section-head",children:s.jsx("span",{className:"sys-detail-label",children:"Payload"})}),s.jsx("div",{className:"sys-broker-metadata-tree",children:s.jsx(h,{label:"payload",value:d,defaultOpen:!0})})]}),s.jsxs("section",{className:"sys-broker-metadata-section",children:[s.jsxs("button",{type:"button",className:"sys-broker-metadata-raw-toggle",onClick:()=>l(o=>!o),"aria-expanded":n,children:[n?s.jsx(u,{size:12,"aria-hidden":"true"}):s.jsx(j,{size:12,"aria-hidden":"true"}),"Raw JSON"]}),n&&s.jsx("pre",{className:"sys-broker-metadata-raw",children:a||b(e)})]})]})}export{S as BrokerMetadataPanel};
|