@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
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@openscout/scout",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.106",
|
|
4
4
|
"description": "Local-first control plane for discovering, messaging, and coordinating AI agents across Claude Code, Codex, and more",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"openscout",
|
|
@@ -62,5 +62,5 @@
|
|
|
62
62
|
"publishConfig": {
|
|
63
63
|
"access": "public"
|
|
64
64
|
},
|
|
65
|
-
"gitHead": "
|
|
65
|
+
"gitHead": "02db44c5ccdacb0dddbd4647e36da5d7d8f630bf"
|
|
66
66
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as s}from"./index-C8uS5szO.js";import{p as Y,a as J}from"./api-CaROe5_H.js";import{c as k}from"./clipboard-e3fSpeo7.js";import{u as Q}from"./sse-v5QLsOHV.js";import{a as Z}from"./colors-CFlbwC25.js";import{m as ss,a as es}from"./machine-scope-DJt9RZ2w.js";import{b as as}from"./router-BKiMcYa7.js";import{r as B}from"./mentions-Ctw1ECUC.js";import{t as I,b as U}from"./time-Dhsh_2EG.js";import{u as ts,a as ns}from"./Provider-5Hotn7NQ.js";import{E as C}from"./EmptyState-uyYN5piI.js";/* empty css */import"./index-BWHgHrtv.js";import"./agent-state-DDhnFEEP.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./index-C5cX8dkl.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./createLucideIcon-DkjnzvcJ.js";import"./terminal-96JWDYDL.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./conversation-model-BGFHoxQ0.js";import"./conversations-Cbg9h_Af.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";const is=3e4,ls={"agent.registered":"registered","agent.online":"came online","agent.offline":"went offline","flight.started":"started task","message.sent":"sent message","message.received":"received message","collaboration.ask":"asked a question","collaboration.answer":"answered",ask_sent:"sent a request",ask_working:"working",flight_created:"started task",message_sent:"sent",message_received:"received"},rs=new Set(["ask_failed","ask_replied","flight.completed","flight.updated","flight_updated"]),os={presence:{label:"Presence",tone:"notice"},work:{label:"Execution",tone:"working"},message:{label:"Delivery",tone:"completed"},collaboration:{label:"Coordination",tone:"working"},system:{label:"System",tone:"notice"}};function q(a){return ls[a]??a.replace(/[._]/g," ")}function cs(a){return a.startsWith("agent.")||a.includes("registered")||a.includes("online")||a.includes("offline")?"presence":a.startsWith("flight")||a.startsWith("ask_")?"work":a.startsWith("message")?"message":a.startsWith("collaboration")?"collaboration":"system"}function ds(a){return(a??"system").charAt(0).toUpperCase()}function u(a){return a.length<=14?a:`${a.slice(0,8)}...${a.slice(-4)}`}function us(a){if(!a)return null;const p=a.split("/").filter(Boolean);return p[p.length-1]??a}function ps(a){return`${a.actorName??"system"} ${q(a.kind)}`}function hs(a){return a.workspaceRoot?`Recorded from ${a.workspaceRoot}.`:a.conversationId?`Linked to thread ${u(a.conversationId)}.`:"No additional detail was captured for this event."}function pe({navigate:a}){const{agents:p,route:z}=ts(),[w]=t.useState(()=>Y("/api/activity",is)),[g,F]=t.useState(w??[]),[x,S]=t.useState(null),[y,R]=t.useState(w===null),[_,T]=t.useState(!1),[h,E]=t.useState(null),[N,G]=t.useState(null),$=t.useRef(w??[]),b=t.useRef(0),f=t.useRef(null),K=ns(),L=as(z),D=t.useMemo(()=>ss(p,L),[p,L]),i=t.useMemo(()=>es(g,D).filter(e=>!rs.has(e.kind)),[g,D]);t.useEffect(()=>{$.current=g},[g]),t.useEffect(()=>{x&&!i.some(e=>e.id===x)&&S(null)},[x,i]);const m=t.useCallback(async(e="initial")=>{const l=++b.current;!($.current.length>0)&&e!=="background"?(R(!0),E(null)):T(!0);try{const o=await J("/api/activity");if(l!==b.current)return;F(o),E(null),G(Date.now()),S(v=>o.some(A=>A.id===v)?v:null)}catch(o){if(l!==b.current)return;E(o instanceof Error?o.message:String(o))}finally{l===b.current&&(R(!1),T(!1))}},[]),P=t.useCallback(()=>{f.current||(f.current=setTimeout(()=>{f.current=null,m("background")},250))},[m]);t.useEffect(()=>(m("initial"),()=>{f.current&&clearTimeout(f.current)}),[m]),Q(P);const H=t.useMemo(()=>{const e=new Set(i.map(c=>c.actorName??"system")),l=new Set(i.map(c=>c.conversationId).filter(c=>!!c));return[{label:"Events",value:`${i.length}`,detail:i.length>0?`Latest ${I(i[0].ts)}`:"Waiting for records"},{label:"Actors",value:`${e.size}`,detail:e.size>0?"Distinct event owners":"No actors yet"},{label:"Threads",value:`${l.size}`,detail:l.size>0?"Conversation-linked records":"No linked threads"}]},[i]),V=!y&&i.length===0&&!!h,X=!y&&i.length===0&&!h;return s.jsxs("div",{className:"sys-surface-page",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Activity Log"}),s.jsx("p",{className:"sys-page-subtitle",children:"Broker events, task execution, and collaboration handoffs."})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("div",{className:"sys-sync-note",children:y?"Loading audit ledger...":h&&i.length>0?`Showing last confirmed snapshot from ${N?I(N):"earlier"}`:N?`Updated ${I(N)}`:"Waiting for first snapshot"}),s.jsx("button",{type:"button",className:"s-btn",disabled:y||_,onClick:()=>{m("manual")},children:_?"Refreshing...":"Refresh"})]})]}),s.jsx("div",{className:"sys-stat-grid",children:H.map(e=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:e.label}),s.jsx("strong",{className:"sys-stat-value",children:e.value}),s.jsx("span",{className:"sys-stat-detail",children:e.detail})]},e.label))}),h&&i.length>0&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Refresh failed."}),s.jsx("span",{children:h})]}),y&&i.length===0&&s.jsx(C,{title:"Loading activity",body:"Pulling the latest records from the broker database."}),V&&s.jsx(C,{className:"sys-state-card-error",title:"Activity is unavailable",body:h,action:s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{m("manual")},children:"Try again"})}),X&&s.jsx(C,{title:"No activity yet",body:"Events appear here after agents register, send messages, or advance work."}),i.length>0&&s.jsx("div",{className:"sys-audit-list",children:i.map(e=>{const l=x===e.id,c=cs(e.kind),o=os[c],v=us(e.workspaceRoot),A=e.summary&&e.summary!==e.title?e.summary:hs(e),r=[];if(e.conversationId&&r.push({key:"thread",label:"Thread",title:`Open thread ${u(e.conversationId)}`,route:{view:"conversation",conversationId:e.conversationId}}),e.recordId&&r.push({key:"work",label:"Work",title:"Open work item",route:{view:"work",workId:e.recordId}}),e.agentId){const n=e.agentName??"Agent";r.push({key:"agent",label:n,title:`Open agent ${n}`,route:{view:"agents-v2",agentId:e.agentId}})}e.sessionId&&r.push({key:"session",label:"Session",title:"Open session",route:{view:"sessions",sessionId:e.sessionId}}),(e.flightId||e.invocationId)&&r.push({key:"follow",label:"Follow",title:"Follow live execution",route:{view:"follow",...e.flightId?{flightId:e.flightId}:{},...e.invocationId?{invocationId:e.invocationId}:{},...e.conversationId?{conversationId:e.conversationId}:{}}});const M=()=>S(l?null:e.id);return s.jsxs("article",{className:`sys-audit-entry${l?" sys-audit-entry-expanded":""}`,onContextMenu:n=>{const j=window.getSelection()?.toString().trim(),d=[];j&&(d.push({kind:"action",label:"Copy Selection",shortcut:"⌘C",onSelect:()=>{k(j)}}),d.push({kind:"separator"}));const W=e.title??e.summary??"";if(W&&d.push({kind:"action",label:"Copy Details",onSelect:()=>{k(W)}}),e.actorName&&d.push({kind:"action",label:"Copy Actor",onSelect:()=>{k(e.actorName)}}),d.push({kind:"action",label:"Copy Event ID",onSelect:()=>{k(e.id)}}),r.length>0){d.push({kind:"separator"});for(const O of r)d.push({kind:"action",label:`Open ${O.label}`,onSelect:()=>a(O.route)})}K(n,d)},children:[s.jsxs("div",{className:"sys-audit-toggle",role:"button",tabIndex:0,"aria-expanded":l,onClick:M,onKeyDown:n=>{(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),M())},children:[s.jsxs("div",{className:"sys-audit-stamp",children:[s.jsx("span",{className:"sys-audit-time",children:I(e.ts)}),s.jsx("span",{className:"sys-audit-date",children:U(e.ts)})]}),s.jsx("div",{className:`sys-audit-marker sys-audit-marker-${o.tone}`,children:s.jsx("span",{})}),s.jsxs("div",{className:"sys-audit-body",children:[s.jsxs("div",{className:"sys-audit-topline",children:[s.jsx("span",{className:"sys-audit-category",children:o.label}),s.jsx("span",{className:"sys-audit-kind",children:q(e.kind)})]}),s.jsx("h3",{className:"sys-audit-title",children:B(e.title??ps(e))}),s.jsx("p",{className:"sys-audit-summary",children:B(A)}),s.jsxs("div",{className:"sys-audit-meta",children:[s.jsxs("span",{className:"sys-audit-meta-item",children:[s.jsx("span",{className:"sys-audit-avatar",style:{background:Z(e.actorName??"system")},children:ds(e.actorName)}),e.actorName??"system"]}),v&&s.jsxs("span",{className:"sys-audit-meta-item",children:["Workspace ",v]})]}),r.length>0&&s.jsxs("div",{className:"sys-audit-jumps",children:[s.jsx("span",{className:"sys-audit-jumps-label",children:"Open"}),r.map(n=>s.jsx("button",{type:"button",className:"sys-audit-jump",title:n.title,onClick:j=>{j.stopPropagation(),a(n.route)},children:n.label},n.key))]})]}),s.jsx("div",{className:"sys-audit-expand",children:l?"Close":"Details"})]}),l&&s.jsxs("div",{className:"sys-audit-details",children:[s.jsxs("div",{className:"sys-detail-grid",children:[s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Event"}),s.jsx("code",{className:"sys-detail-value",children:e.kind})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Recorded"}),s.jsx("span",{className:"sys-detail-value",children:U(e.ts)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Actor"}),s.jsx("span",{className:"sys-detail-value",children:e.actorName??"system"})]}),e.agentName&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Agent"}),s.jsx("span",{className:"sys-detail-value",children:e.agentName})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Workspace"}),s.jsx("span",{className:"sys-detail-value",children:e.workspaceRoot??"Not attached"})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Thread"}),s.jsx("span",{className:"sys-detail-value",children:e.conversationId?u(e.conversationId):"Not attached"})]}),e.recordId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Work"}),s.jsx("span",{className:"sys-detail-value",children:u(e.recordId)})]}),e.sessionId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Session"}),s.jsx("span",{className:"sys-detail-value",children:u(e.sessionId)})]}),e.flightId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Flight"}),s.jsx("span",{className:"sys-detail-value",children:u(e.flightId)})]}),e.invocationId&&s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Invocation"}),s.jsx("span",{className:"sys-detail-value",children:u(e.invocationId)})]}),s.jsxs("div",{className:"sys-detail-card",children:[s.jsx("span",{className:"sys-detail-label",children:"Record id"}),s.jsx("code",{className:"sys-detail-value",children:e.id})]})]}),r.length>0&&s.jsx("div",{className:"sys-inline-actions",children:r.map(n=>s.jsxs("button",{type:"button",className:"s-btn s-btn-sm",onClick:()=>a(n.route),children:["Open ",n.label]},n.key))})]})]},e.id)})})]})}export{pe as ActivityScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r,m as se,g as ne,j as e,h as ke}from"./index-C8uS5szO.js";import{ReplayClock as be}from"./ReplayClock-B7JLTp8A.js";import{S as _e}from"./SproutActionSprite-DveCzg6l.js";import{C as B}from"./CrewSprite-hgpA3SWB.js";import{l as ie}from"./agent-lanes-model-CX0wTcnF.js";import{o as ye}from"./lane-observe-BD21P8BB.js";import{b as L,a as O,c as we}from"./adventure-playback-DTfkhIc0.js";import{AdventureScenery as Ne}from"./AdventureScenery-D548O0x4.js";import{AdventureReader as Se}from"./AdventureReader-ClMxT0e4.js";import{ReplayLog as Ce}from"./ReplayLog-DZTpf2CW.js";import{H as $e,A as Pe}from"./AdventureEvidence-Dzz9VbuE.js";import{f as H}from"./floor-preview-text-HrORUJ7D.js";/* empty css */import{c as K}from"./createLucideIcon-DkjnzvcJ.js";import{F as V}from"./flag-CqdOxVkI.js";import{W as Me}from"./wrench-BsMTSeji.js";import{B as oe}from"./book-open-BlJnpf2U.js";import{P as Te}from"./pause-DWS7YGQ3.js";import{P as Ae}from"./play-D_Pggug4.js";import{R as Re}from"./radio-C_jtwbFP.js";import{A as ze}from"./arrow-left-PuKdO3NM.js";import{A as ae}from"./arrow-right-ldbfp4SZ.js";/* empty css */import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./terminal-sessions-Ch9aYlgi.js";import"./api-CaROe5_H.js";import"./lane-edit-display-BjdT9oZl.js";import"./tail-display-DHSNmvor.js";import"./time-Dhsh_2EG.js";import"./adventure-habitats-v1-M1lcpTJh.js";import"./index-CvsM3jm8.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./file-text-ChtICwub.js";/* empty css */import"./x-DI1ktCYb.js";import"./terminal-96JWDYDL.js";import"./scroll-text-DwC8r2g6.js";import"./observe-CkfOxYx_.js";import"./agent-state-DDhnFEEP.js";import"./surface-activity-B1rgWB1i.js";import"./Provider-5Hotn7NQ.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./agent-lane-detail-Db7KyAlf.js";/* empty css */import"./arrow-up-right-Hn754ybA.js";const Ie=[["path",{d:"m22 7-8.991 5.727a2 2 0 0 1-2.009 0L2 7",key:"132q7q"}],["rect",{x:"2",y:"4",width:"20",height:"16",rx:"2",key:"izxlao"}]],le=K("mail",Ie);const Le=[["path",{d:"m8 3 4 8 5-5 5 15H2L8 3z",key:"otkl63"}]],Ee=K("mountain",Le);const We=[["path",{d:"M3.5 21 14 3",key:"1szst5"}],["path",{d:"M20.5 21 10 3",key:"1310c3"}],["path",{d:"M15.5 21 12 15l-3.5 6",key:"1ddtfw"}],["path",{d:"M2 21h20",key:"1nyx9w"}]],re=K("tent",We),De={start:"Trailhead",think:"Lookout",read:"Field library",edit:"Workbench",tool:"Tool shed",message:"Post station",wait:"Waiting camp",end:"Turn complete",stopped:"Journey interrupted"};function Fe(n){const p=n.text.trim().toLowerCase();if(n.kind==="note"||n.kind==="system"||n.kind==="boot")return/^(task started|turn started|\[turn_started\])$/.test(p)?"start":/^(task complete|task completed|turn complete|turn completed|turn ended|\[turn_ended\])$/.test(p)?"end":/^(?:(?:turn|task) (?:aborted|failed|cancelled|canceled))(?:$|[ :])/.test(p)?"stopped":/\b(waiting|approval required|permission requested|blocked)\b/.test(p)?"wait":null;if(n.kind==="think")return"think";if(n.kind==="ask"||n.kind==="message")return"message";const c=n.tool?.toLowerCase()??"";return/wait|sleep|request_user_input/.test(c)?"wait":n.diff||/(?:^|[._/])(?:edit|write|write_file|edit_file|apply_patch|multiedit|str_replace_editor)$/.test(c)?"edit":/read|search|find|open|view|fetch/.test(c)?"read":n.kind==="tool"?"tool":null}function Je(n,p){const c=new Set,x=(n.observe?.events??[]).flatMap(o=>{const b=ye(o,n.observe?.metadata?.session?.sessionStart),v=Fe(o);return b===null||b>p||!v||c.has(o.id)?[]:(c.add(o.id),[{id:`${n.id}:${o.id}`,event:o,at:b,kind:v,label:De[v],artifact:o.arg||o.tool||o.text}])}).sort((o,b)=>o.at-b.at),m=[];let k;for(const o of x)(!k||o.kind==="start"||k.closed)&&(k={id:o.id,stops:[],partial:o.kind!=="start",closed:!1},m.push(k)),k.stops.push(o),k.closed=o.kind==="end"||o.kind==="stopped";return m}function I(n,p){if(p==="continuous")return null;const c=n.event.result?.exit_code??n.event.result?.exitCode,x=typeof c=="number"?c:typeof c=="string"&&/^-?\d+$/.test(c)?Number(c):null;if(x!==null&&x!==0)return`Command needs attention · exit ${x}`;if(n.kind==="stopped")return"Journey interrupted";if(n.kind==="wait")return"Waiting for input";if(p==="problems")return null;if(n.kind==="end")return"Turn complete";if(p==="all")return L(n).checkpoint?L(n).label:null;const m=O(n);return m&&x!==null&&we(m)?"Validation result ready":null}const qe={start:V,think:Ee,read:oe,edit:$e,tool:Me,message:le,wait:re,end:V,stopped:re},M=n=>new Date(n).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit",second:"2-digit"}),w=218;function xs({lanes:n,now:p,onActor:c}){const[x,m]=r.useState(null),[k,o]=r.useState(n[0]?.id??""),[b,v]=r.useState(null),[de,_]=r.useState(0),[ce,He]=r.useState(!0),[ue,Oe]=r.useState(!0),[Ve,Ke]=r.useState(!1),[U,Ue]=r.useState(!1),[f,Ye]=r.useState(!1),[u,h]=r.useState(!0),[j,pe]=r.useState(1),[E,T]=r.useState("rest"),[S,Y]=r.useState("results"),[me,A]=r.useState(null),[C,he]=r.useState(!document.hidden);r.useEffect(()=>{const t=()=>he(!document.hidden);return document.addEventListener("visibilitychange",t),()=>document.removeEventListener("visibilitychange",t)},[]);const R=r.useRef(null),l=n.find(t=>t.id===k)??n[0],W=r.useMemo(()=>l?Je(l,p):[],[l,p]),g=W.find(t=>t.id===b)??W.at(-1),a=g?.stops??[],i=Math.min(de??a.length-1,a.length-1),s=a[i],Z=l?se(l.agent.name)??ne(l.id):"sprout",D=s?.event.to?n.find(t=>[t.id,t.agent.id,t.agent.name,t.agent.handle].includes(s.event.to)):void 0;ce&&l&&n.filter(t=>t.id!==l.id&&!!l.agent.project&&t.agent.project===l.agent.project).slice(0,4);const G=b===null,y=s?L(s):null,F=s?I(s,S):null,Q=a.findIndex((t,d)=>d>i&&I(t,S==="continuous"?"results":S)),$=!!(u&&F&&me!==s?.id),J=$||!u&&!!s,P=u&&!$;r.useEffect(()=>{if(!u||f||!C||!s){T("rest");return}T("travel");const t=window.setTimeout(()=>T(y?.routine?"land":"rest"),700/j),d=window.setTimeout(()=>T("rest"),960/j);return()=>{window.clearTimeout(t),window.clearTimeout(d)}},[s?.id,u,f,C,j]);const xe=E==="travel"?y?.routine?"jump":"run":E==="land"?"land":"idle",X=s?O(s):null,ee=s?.event.result?.exit_code??s?.event.result?.exitCode,ve=ee!==void 0?`Process exited with code ${ee}`:s?.event.live?"Command is still running":"Inspect the observed command and collected evidence below",q=ue&&!U;r.useEffect(()=>{_(0),A(null)},[l?.id,g?.id]),r.useEffect(()=>{if(!C||!P||!s||i>=a.length-1)return;const t=window.setTimeout(()=>{document.hidden||_(i+1)},Math.max(1e3,y?.durationMs??1600)/j);return()=>window.clearTimeout(t)},[C,P,s?.id,i,a.length,y?.durationMs,j]),r.useEffect(()=>{!R.current||i<0||R.current.scrollTo({left:Math.max(0,150+i*w-R.current.clientWidth*.5),behavior:u&&!f&&!window.matchMedia("(prefers-reduced-motion: reduce)").matches?"smooth":"auto"})},[i,l?.id,g?.id]);const fe=t=>{o(t),v(null),_(0),h(!0)},N=t=>{h(!1),v(g?.id??null),_(Math.max(0,Math.min(a.length-1,t)))},te=()=>{h(!u),u||A(s?.id??null)},je=$?"Checkpoint":u?i>=a.length-1?g?.closed?"Journey complete":"Following live":"Playing journey":"Paused for review";return e.jsxs("section",{onKeyDown:t=>{t.code==="Space"&&!t.target.closest("button,input,select,textarea,summary,[contenteditable=true]")&&(t.preventDefault(),te())},className:`adventures${J?" is-reviewing":""}${f||!u?" is-paused":""}`,"aria-label":"Agent Replay",onPointerDown:t=>t.stopPropagation(),onWheel:t=>t.stopPropagation(),children:[e.jsx("div",{className:"adventures__scene",ref:R,tabIndex:0,"aria-label":"Replay landscape, follows the seek position",children:e.jsxs("div",{className:"adventures__landscape",style:{width:Math.max(1e3,a.length*w+450)},children:[e.jsx(Ne,{}),e.jsx("div",{className:"adventures__trail","aria-hidden":"true"}),a.length?null:e.jsxs("div",{className:"adventures__empty",children:[e.jsx(B,{slug:"sprout",size:120,paused:f}),e.jsx("h3",{children:"The trail is quiet."}),e.jsx("p",{children:n.length?"No journey observations are available for this agent. Choose another agent or keep watching.":"Your crew will appear when agent activity arrives."})]}),a.map((t,d)=>{const ge=qe[t.kind],z=L(t);return e.jsxs("button",{type:"button",className:`adventures__stop adventures__stop--${t.kind}${z.checkpoint?" is-checkpoint":z.routine?" is-routine":""}${d===i?" is-current":""}${d>i?" is-ahead":""}`,style:{left:150+d*w},onClick:()=>N(d),"aria-label":`${t.label}, ${M(t.at)}`,"aria-pressed":d===i,children:[e.jsx("span",{className:"adventures__stop-title",children:z.checkpoint?z.label:t.label}),e.jsxs("span",{className:"adventures__prop",children:[e.jsx(ge,{size:36,strokeWidth:1.5}),t.kind==="edit"?e.jsx("span",{className:"adventures__sparks"}):null]}),e.jsx("span",{className:"adventures__artifact",children:H(O(t)??t.artifact).slice(0,100)}),e.jsx("time",{children:M(t.at)})]},t.id)}),s&&l?e.jsxs("div",{className:`adventures__traveler adventures__traveler--${s.kind}${q?" has-action-sprite":""}${y?.checkpoint?" is-checkpoint":""}${y?.routine&&E==="travel"?" is-hopping":""}`,style:{left:112+i*w,transitionDuration:`${700/j}ms`},children:[s.kind==="think"?e.jsx("span",{className:"adventures__thought",children:"Thinking"}):null,e.jsx("button",{type:"button",onClick:()=>{h(!1),c(l)},"aria-label":`Inspect ${ie(l.agent,l.source)}`,children:e.jsx(e.Fragment,{children:q?e.jsx(_e,{action:xe,playbackRate:j,size:128,paused:f||!u}):e.jsx(B,{slug:Z,size:112,pixel:U&&ke(Z),paused:f||!P,expression:J?"look-right":Be(s.kind)})})},s.id),e.jsx("span",{className:"adventures__shadow"}),s.kind!=="think"?e.jsxs("span",{className:"adventures__action-caption",children:[e.jsx("strong",{children:s.event.tool||(s.kind==="message"?"Message":s.kind==="end"?"Turn complete":s.kind==="wait"?"Waiting":s.label)}),s.event.tool?e.jsx("small",{children:H(X||s.event.arg).slice(0,90)}):null]}):null]}):null,s&&J?e.jsxs("button",{type:"button",className:"adventures__world-artifact",style:{left:252+i*w},onClick:()=>{h(!1),m({path:null})},"aria-label":"Inspect current artifact",children:[e.jsxs("span",{className:"adventures__artifact-sheet",children:[e.jsx(oe,{size:23}),e.jsx("strong",{children:F||s.label}),e.jsx("span",{children:H(X||s.artifact).slice(0,110)}),e.jsx("small",{children:"Inspect artifact ↗"})]}),e.jsx("span",{className:"adventures__artifact-stand"})]}):null,s?.event.to?e.jsxs("div",{className:"adventures__handoff",style:{left:218+i*w},children:[e.jsx(le,{size:20}),e.jsxs("span",{children:["Message to ",s.event.to]}),D?e.jsx(B,{slug:se(D.agent.name)??ne(D.id),size:70,paused:f||!P}):null]}):null,s?e.jsxs("div",{className:"adventures__frontier",style:{left:240+a.length*w},children:[e.jsx("span",{children:g?.closed?"Until the next turn":"Uncharted"}),e.jsx("small",{children:g?.closed?"This journey has ended.":"The next step is not known yet."})]}):null]})}),e.jsxs("div",{className:"adventures__console",children:[e.jsxs("details",{className:"replay-selection",children:[e.jsx("summary",{children:"Choose agent / journey"}),e.jsxs("div",{className:"adventures__navigation",children:[e.jsxs("label",{children:[q?"Sprout follows":"Follow",e.jsx("select",{"aria-label":"Follow agent",value:l?.id??"",onChange:t=>fe(t.target.value),children:n.map(t=>e.jsxs("option",{value:t.id,children:[ie(t.agent,t.source)," · ",t.id.slice(-5)]},t.id))})]}),e.jsxs("label",{children:["Journey",e.jsx("select",{"aria-label":"Select journey",value:g?.id??"",onChange:t=>{v(t.target.value),_(0),h(!0)},children:W.map((t,d)=>e.jsxs("option",{value:t.id,children:[d+1," · ",M(t.stops[0].at)," · ",t.closed?t.stops.at(-1).label:"end not observed"]},t.id))})]})]})]}),e.jsxs("div",{className:"adventures__transport",children:[e.jsxs("div",{className:"adventures__recording-clock",children:[e.jsx(be,{at:s?.at??0,nextAt:a[i+1]?.at??s?.at??0,start:a[0]?.at??0,duration:Math.max(1e3,y?.durationMs??1600)/j,running:C&&P&&!f}),e.jsx("span",{className:"adventures__clock-divider","aria-hidden":"true"}),s?e.jsx("time",{dateTime:new Date(s.at).toISOString(),children:new Date(s.at).toLocaleString([],{year:"numeric",month:"short",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit",timeZoneName:"short"})}):e.jsx("span",{children:"No recorded timestamp"})]}),e.jsxs("div",{className:"adventures__transport-top",children:[e.jsxs("button",{type:"button",className:"adventures__play-button",title:"Play or pause · Space","aria-label":u?"Pause journey":"Play journey",onClick:te,children:[u?e.jsx(Te,{size:17}):e.jsx(Ae,{size:17}),e.jsx("span",{children:u?"Pause":"Play"})]}),e.jsxs("span",{className:`adventures__transport-status${$?" is-checkpoint":""}`,role:"status",children:[e.jsx("i",{}),je]}),e.jsxs("label",{className:"adventures__speed",children:[e.jsx("span",{children:"Speed"}),e.jsxs("select",{"aria-label":"Playback pace",value:j,onChange:t=>pe(Number(t.target.value)),children:[e.jsx("option",{value:.75,children:"0.75×"}),e.jsx("option",{value:1,children:"1×"}),e.jsx("option",{value:1.5,children:"1.5×"})]})]}),e.jsxs("select",{className:"adventures__checkpoint-mode","aria-label":"Checkpoint behavior",value:S,onChange:t=>Y(t.target.value),children:[e.jsx("option",{value:"results",children:"Review results"}),e.jsx("option",{value:"all",children:"Every checkpoint"}),e.jsx("option",{value:"problems",children:"Only problems"}),e.jsx("option",{value:"continuous",children:"Play straight through"})]})]}),e.jsxs("button",{className:"adventures__next-review",type:"button",disabled:Q<0,onClick:()=>{v(g?.id??null),_(Q),h(!0),A(null),S==="continuous"&&Y("results")},children:[e.jsx(V,{size:12})," Next review point"]}),e.jsxs("div",{className:"adventures__playhead",children:[e.jsxs("button",{type:"button",className:G?"is-live":"","aria-pressed":G,onClick:()=>{v(null),_(null),h(!0)},children:[e.jsx(Re,{size:14})," Live edge"]}),e.jsx("button",{type:"button","aria-label":"Previous observation",disabled:i<=0,onClick:()=>N(i-1),children:e.jsx(ze,{size:15})}),e.jsxs("div",{className:"adventures__seek-track",children:[e.jsx("input",{type:"range","aria-label":"Journey observation",min:0,max:Math.max(0,a.length-1),value:Math.max(0,i),disabled:!a.length,onChange:t=>N(Number(t.target.value))}),e.jsx("div",{className:"adventures__seek-markers",children:a.map((t,d)=>I(t,"all")?e.jsx("button",{type:"button",style:{left:`${a.length>1?d/(a.length-1)*100:0}%`},className:d<=i?"is-visited":"","aria-label":`Seek to ${I(t,"all")} at ${M(t.at)}`,title:`${t.label} · ${M(t.at)}`,onClick:()=>N(d)},t.id):null)})]}),e.jsx("button",{type:"button","aria-label":"Next observation",disabled:i>=a.length-1,onClick:()=>N(i+1),children:e.jsx(ae,{size:15})}),e.jsx("span",{children:a.length?`${i+1} / ${a.length}`:"No observations"})]}),$?e.jsxs("div",{className:"adventures__checkpoint-review",children:[e.jsxs("div",{children:[e.jsx("strong",{children:F}),e.jsx("small",{children:ve})]}),e.jsxs("button",{type:"button",onClick:()=>A(s?.id??null),children:["Continue ",e.jsx(ae,{size:14})]})]}):null]}),e.jsx(Ce,{stops:a,index:i,onInspect:t=>{N(t),m({path:null})}}),l?e.jsx("div",{onClickCapture:()=>h(!1),children:e.jsx(Pe,{stops:a,index:i,lane:l,onFile:t=>{h(!1),m({path:t})}})}):null]}),x?e.jsx(Se,{stop:s,path:x.path,onClose:()=>m(null),onPath:t=>m({path:t})}):null]})}function Be(n){return n==="think"?"look-up":n==="message"?"look-left":"look-right"}export{xs as AgentAdventures};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{j as i,f as B,m as f,g as L,C as F,h as G}from"./index-C8uS5szO.js";import{d as J}from"./Provider-5Hotn7NQ.js";import{a as K,S as Q}from"./SpriteAvatar-BW1JzkDt.js";import{C as U}from"./CrewAvatar-CJhuqTsJ.js";import{s as X}from"./colors-CFlbwC25.js";import{i as Y,d as $}from"./agent-state-DDhnFEEP.js";const z={hero:{tile:!1,presence:!1,glow:!0},inspector:{sizes:{compact:32,regular:40,large:52},tile:!0,presence:!0},row:{sizes:{compact:20,regular:24,large:32},tile:!0,presence:!0},turn:{tile:!1,presence:!1},list:{tile:!1,presence:!1},roster:{tile:!1,presence:!1},node:{sizes:{compact:14,regular:16,large:20},tile:!1,presence:!1}},ee={compact:.85,regular:1,large:1.25};function le(e,a){return z[e].sizes?.[a]}function re(e,a){if(a==="regular")return e;const l=Math.round(e*ee[a]);return a==="compact"?Math.max(20,Math.min(e,l)):l}function ce({agent:e,name:a,slug:l,avatarStyle:E,project:D,harness:R,state:I,kind:M="agent",placement:d="row",size:w,scaleWithPreference:P=!0,presence:g,tile:T,salt:O,className:s,channelClassName:_,style:o,title:c}){const r=e?.name??a??"?";if(M==="channel")return i.jsx("span",{className:_??s,style:o,title:c??r,children:"#"});const t=J(),k=t?.operatorName||t?.onboarding?.operatorName?.trim()||t?.onboarding?.operatorNameSuggestion?.trim()||"operator",m=r.toLowerCase()==="operator"||r.toLowerCase()==="you"||r.toLowerCase()===k.toLowerCase()||r.toLowerCase()==="art",A=t?.appearanceDetails?.operatorCharacter||"milo",h=E??t?.appearanceDetails?.avatarStyle??"crew",y=m?void 0:B(t?.appearanceDetails?.agentCharacters,{id:e?.id,name:r},t?.agents??[]),p=l?f(l)??L(l):m?f(A)??L(A):f(y)??f(e?.slug||r),H=p!=null&&F[p]!=null&&(h!=="chip"||G(p)),n=z[d],S=P?t?.appearanceDetails?.avatarSize??"regular":"regular",u=w!=null?re(w,S):n.sizes?.[S];if(h!=="sprite"&&H&&p){const b=R??e?.harness??void 0,Z=I??e?.state??null,q=D??e?.project??"openscout",C=i.jsx(U,{slug:p,name:r,project:q,harness:b,state:Z,size:u,badge:b?g??n.presence:!1,ring:g??(d==="hero"||d==="turn"?!1:n.presence),chip:h==="chip",glow:n.glow,title:c??r});return u==null?i.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",display:"inline-grid",placeItems:"center",...o},title:c??r,children:C}):s||o?i.jsx("span",{className:s,style:{display:"inline-grid",placeItems:"center",...o},children:C}):C}const j=e?K(e):null,x=g??n.presence,N=Y(e?.state??null),V=x&&N?X(e?.state??null):void 0,W=x&&$(e?.state??null),v=i.jsx(Q,{name:r,size:u,hue:j?.hue,tone:j?.tone,salt:O,tile:T??n.tile,glow:n.glow,corner:V,cornerPulse:W,title:c??r});return u==null?i.jsx("span",{className:s,style:{background:"transparent",overflow:"visible",...o},title:c??r,children:v}):s||o?i.jsx("span",{className:s,style:o,children:v}):v}export{ce as A,le as p};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as s,f as W,z as V}from"./index-C8uS5szO.js";import{E as Y}from"./EmptyState-uyYN5piI.js";import{C as F}from"./CastPicker-BuwE_JQp.js";import{a as D}from"./api-CaROe5_H.js";import{h as G}from"./NewChatComposer-JjLbm3W2.js";import{d as J}from"./time-Dhsh_2EG.js";import{u as L}from"./Provider-5Hotn7NQ.js";import{o as Q}from"./openContent-C6XO6kr5.js";import{AgentsSubnav as X}from"./AgentsSubnav-BOobgtGE.js";/* empty css */import{R as Z}from"./refresh-cw-Da9DDLk2.js";import{S as ss}from"./settings-TJIkkZ0P.js";import{c as H}from"./createLucideIcon-DkjnzvcJ.js";import{B as _}from"./bot-CfN9PSBF.js";import{W as es}from"./wrench-BsMTSeji.js";import{S as as}from"./server-ms1yxUYJ.js";import{C as ns}from"./cpu-Ck_4tB_-.js";import"./CrewAvatar-CJhuqTsJ.js";import"./HarnessMark-Bt47OeHy.js";import"./check-B8dMv3Is.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./conversation-model-BGFHoxQ0.js";import"./agent-state-DDhnFEEP.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SecondaryNav-BkTn5tkq.js";import"./secondaryNavConfig-DAXIFtVd.js";import"./nav-destinations-CyXnw9kh.js";import"./message-square-NmXWtWLR.js";import"./terminal-96JWDYDL.js";import"./compass-DTZdCpv9.js";import"./git-branch-CA3cHKCI.js";import"./scroll-text-DwC8r2g6.js";const is=[["path",{d:"M2.586 17.414A2 2 0 0 0 2 18.828V21a1 1 0 0 0 1 1h3a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h1a1 1 0 0 0 1-1v-1a1 1 0 0 1 1-1h.172a2 2 0 0 0 1.414-.586l.814-.814a6.5 6.5 0 1 0-4-4z",key:"1s6t7t"}],["circle",{cx:"16.5",cy:"7.5",r:".5",fill:"currentColor",key:"w0ekpg"}]],K=H("key-round",is);const ts=[["path",{d:"M15.2 3a2 2 0 0 1 1.4.6l3.8 3.8a2 2 0 0 1 .6 1.4V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2z",key:"1c8476"}],["path",{d:"M17 21v-7a1 1 0 0 0-1-1H8a1 1 0 0 0-1 1v7",key:"1ydtos"}],["path",{d:"M7 3v4a1 1 0 0 0 1 1h7",key:"t51u73"}]],cs=H("save",ts);function A(e){switch(e){case"ready":case"running":case"available":case"enabled":return"sys-chip-success";case"configured":case"installed":case"working":return"sys-chip-warning";case"missing":case"offline":case"not_ready":case"error":return"sys-chip-danger";default:return"sys-chip-neutral"}}function M(e){switch(e){case"available":case"ready":return"ready";case"offline":case"not_ready":return"not ready";default:return e}}function I(e){return e?e.replace(/^\/Users\/[^/]+/,"~"):"Not reported"}function rs(e){return e.length>0?e.join(", "):"No capabilities reported"}function ls({runtime:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(ns,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.label}),s.jsx("div",{className:"agent-config-row-detail",children:e.description}),s.jsx("div",{className:"agent-config-row-meta",children:e.detail})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.state)}`,children:e.state}),s.jsx("span",{className:"agent-config-row-meta",children:e.binaryPath??e.loginCommand??e.source})]})]})}function os({provider:e}){return s.jsxs("div",{className:"agent-config-row",children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(K,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.protocol}),s.jsx("code",{className:"agent-config-code",children:e.baseUrl}),s.jsxs("div",{className:"agent-config-row-meta",children:["Keys: ",e.envKeys.join(", ")]}),s.jsx("div",{className:"agent-config-row-meta",children:e.note})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:e.status}),s.jsx("a",{className:"agent-config-link",href:e.docsUrl,target:"_blank",rel:"noreferrer",children:"Docs"})]})]})}function ds({agent:e,selected:o,navigate:g}){return s.jsxs("button",{type:"button",className:`agent-config-row agent-config-row-button${o?" agent-config-row-selected":""}`,onClick:()=>g({view:"agents-v2",agentId:e.id,tab:"config"}),children:[s.jsxs("div",{className:"agent-config-row-main",children:[s.jsx("span",{className:"agent-config-icon",children:s.jsx(_,{size:14})}),s.jsxs("div",{className:"agent-config-row-copy",children:[s.jsx("div",{className:"agent-config-row-title",children:e.name}),s.jsx("div",{className:"agent-config-row-detail",children:e.id}),s.jsxs("div",{className:"agent-config-row-meta",children:[e.harness??"unknown harness"," / ",e.transport??"unknown transport",e.model?` / ${e.model}`:""]})]})]}),s.jsxs("div",{className:"agent-config-row-side",children:[s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:M(e.status)}),s.jsx("span",{className:"agent-config-row-meta",children:I(e.projectRoot??e.cwd)})]})]})}function B(e,o,g,n,N){o(e),g(e.model??""),n(e.runtime.cwd),N(e.runtime.harness)}function ms({agent:e,agents:o,navigate:g,onConfigSaved:n}){const{route:N,appearanceDetails:y,updateAppearanceDetails:b}=L(),h=e?.id??null,x=e?W(y.agentCharacters,e,o):void 0,[c,f]=t.useState(null),[d,p]=t.useState(!1),[j,m]=t.useState(null),[w,a]=t.useState(""),[v,l]=t.useState(""),[C,S]=t.useState(""),[$,E]=t.useState(!1),[u,T]=t.useState("idle"),[O,z]=t.useState(null),k=t.useRef(0),P=t.useCallback(async()=>{const i=++k.current;if(z(null),E(!1),!h){f(null),m(null),p(!1);return}p(!0),m(null);try{const r=await D(`/api/agents/${encodeURIComponent(h)}/config`);if(i!==k.current)return;B(r,f,a,l,S)}catch(r){if(i!==k.current)return;f(null),a(""),l(""),S(e?.harness??""),m(r instanceof Error?r.message:String(r))}finally{i===k.current&&p(!1)}},[e?.harness,h]);t.useEffect(()=>{P()},[P]);const U=t.useMemo(()=>{const i=["claude","codex","pi",c?.runtime.harness,e?.harness,C].filter(r=>!!r?.trim());return Array.from(new Set(i))},[e?.harness,c?.runtime.harness,C]),q=async i=>{if(i.preventDefault(),!(!h||!c||u==="saving")){T("saving"),z(null),m(null);try{const r=await D(`/api/agents/${encodeURIComponent(h)}/config`,{method:"POST",body:JSON.stringify({model:w.trim()||null,runtime:{cwd:v.trim()||c.runtime.cwd,harness:C.trim()||c.runtime.harness},restart:$})});B(r.config,f,a,l,S),E(!1),z(r.restarted?"Saved and restarted":"Saved"),n?.()}catch(r){m(r instanceof Error?r.message:String(r))}finally{T("idle")}}};return e?s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:e.name}),s.jsx("p",{className:"sys-section-subtitle",children:e.id})]}),s.jsxs("div",{className:"sys-page-actions",children:[s.jsx("button",{type:"button",className:"s-btn",onClick:()=>g({view:"agents-v2",agentId:e.id}),children:"Open Agent"}),s.jsx("button",{type:"button",className:"s-btn",onClick:()=>{G(e).then(i=>{Q(g,{view:"conversation",conversationId:i},{returnTo:N})})},children:"Open Chat"})]})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Status"}),s.jsx("span",{className:`sys-chip ${A(e.status)}`,children:M(e.status)})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Harness"}),s.jsx("strong",{className:"agent-config-selectable",children:e.harness??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Transport"}),s.jsx("strong",{className:"agent-config-selectable",children:e.transport??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Reported model"}),s.jsx("strong",{className:"agent-config-selectable",children:e.model??"Not reported"})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Configured model"}),s.jsx("strong",{className:"agent-config-selectable",children:d?"Loading...":c?c.model??"Harness default":"Not editable"})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Project"}),s.jsx("code",{className:"agent-config-inline-code",title:e.projectRoot??void 0,children:I(e.projectRoot)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Working dir"}),s.jsx("code",{className:"agent-config-inline-code",title:e.cwd??c?.runtime.cwd??void 0,children:I(e.cwd??c?.runtime.cwd??null)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Capabilities"}),s.jsx("span",{className:"agent-config-selectable",children:rs(e.capabilities)})]}),s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:"Character"}),x?s.jsx("span",{className:"sys-chip sys-chip-neutral",children:x}):s.jsx("span",{className:"agent-config-selectable",children:"Generative sprite"})]})]}),s.jsx("div",{className:"agent-config-cast",children:s.jsx(F,{selectedSlug:x,onSelect:i=>{const r=V(y.agentCharacters,o),R={...r.byId};R[e.id]===i?delete R[e.id]:R[e.id]=i,b({agentCharacters:{...r,byId:R}})}})}),d&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-note",children:"Loading editable launch config..."})}),!d&&c&&s.jsxs("form",{className:"agent-config-edit",onSubmit:q,children:[s.jsxs("div",{className:"agent-config-edit-grid",children:[s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Model"}),s.jsx("input",{name:"model",value:w,placeholder:"Harness default",disabled:!c.editable||u==="saving",onChange:i=>a(i.currentTarget.value)})]}),s.jsxs("label",{className:"agent-config-field",children:[s.jsx("span",{children:"Harness"}),s.jsx("select",{name:"harness",value:C,disabled:!c.editable||u==="saving",onChange:i=>S(i.currentTarget.value),children:U.map(i=>s.jsx("option",{value:i,children:i},i))})]}),s.jsxs("label",{className:"agent-config-field agent-config-field-wide",children:[s.jsx("span",{children:"Working dir"}),s.jsx("input",{name:"cwd",value:v,disabled:!c.editable||u==="saving",onChange:i=>l(i.currentTarget.value)})]})]}),s.jsxs("div",{className:"agent-config-save-row",children:[s.jsxs("label",{className:"agent-config-check",children:[s.jsx("input",{type:"checkbox",checked:$,disabled:!c.editable||u==="saving",onChange:i=>E(i.currentTarget.checked)}),s.jsx("span",{children:"Restart after saving"})]}),s.jsxs("button",{type:"submit",className:"s-btn",disabled:!c.editable||u==="saving",children:[s.jsx(cs,{size:13}),u==="saving"?"Saving...":"Save config"]}),O&&s.jsx("span",{className:"agent-config-save-note",children:O}),j&&s.jsx("span",{className:"agent-config-save-error",children:j})]})]}),!d&&!c&&s.jsx("div",{className:"agent-config-edit agent-config-edit-empty",children:s.jsx("span",{className:"agent-config-save-error",children:j??"No editable local config found"})})]}):s.jsxs("div",{className:"sys-panel agent-config-detail-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agent Details"}),s.jsx("p",{className:"sys-section-subtitle",children:"Select an agent to inspect runtime, model, and tool context."})]})}),s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agent selected"}),s.jsx("p",{children:"Choose an agent from the configuration roster."})]})]})}function ye({navigate:e,selectedAgentId:o}){const{route:g}=L(),[n,N]=t.useState(null),[y,b]=t.useState(!0),[h,x]=t.useState(!1),[c,f]=t.useState(null),d=t.useRef(0),p=t.useCallback(async(a="initial")=>{const v=++d.current;a==="initial"?b(!0):x(!0),f(null);try{const l=await D("/api/agent-config/snapshot");if(v!==d.current)return;N(l)}catch(l){if(v!==d.current)return;f(l instanceof Error?l.message:String(l))}finally{v===d.current&&(b(!1),x(!1))}},[]);t.useEffect(()=>{p()},[p]);const j=t.useMemo(()=>n?n.agents.find(a=>a.id===o)??n.agents[0]??null:null,[o,n]),m=n?.providers??[],w=n?[{label:"Runtimes",value:String(n.runtimes.length),detail:`${n.runtimes.filter(a=>a.state==="ready").length} ready`},{label:"BYOK",value:String(m.length),detail:`${m.filter(a=>a.status==="configured").length} configured`},{label:"Agents",value:String(n.agents.length),detail:`${n.agents.filter(a=>M(a.status)!=="not ready").length} ready`},{label:"Broker",value:n.broker.label,detail:n.broker.nodeId??"No node id"}]:[];return s.jsxs("div",{className:"s-secondary-nav-shell",children:[s.jsx("div",{className:"s-secondary-nav-bar",children:s.jsx(X,{activeRoute:g,navigate:e})}),s.jsx("div",{className:"s-secondary-nav-body s-secondary-nav-body--scroll",children:s.jsxs("div",{className:"sys-surface-page sys-surface-page-wide",children:[s.jsxs("div",{className:"sys-page-head",children:[s.jsxs("div",{className:"sys-page-title-group",children:[s.jsx("h2",{className:"sys-page-title",children:"Agent Configuration"}),s.jsx("p",{className:"sys-page-subtitle",children:"Runtimes, agents, project inventory, delivery bridges, and the missing tool/provider surfaces in one control plane."})]}),s.jsxs("div",{className:"sys-page-actions",children:[n&&s.jsxs("div",{className:"sys-sync-note",children:["Updated ",J(n.generatedAt)||"unknown"]}),s.jsxs("button",{type:"button",className:"s-btn",disabled:y||h,onClick:()=>{p("manual")},children:[s.jsx(Z,{size:13}),h?"Refreshing...":"Refresh"]})]})]}),n&&s.jsx("div",{className:"sys-stat-grid",children:w.map(a=>s.jsxs("div",{className:"sys-stat-card",children:[s.jsx("span",{className:"sys-stat-label",children:a.label}),s.jsx("strong",{className:"sys-stat-value",children:a.value}),s.jsx("span",{className:"sys-stat-detail",children:a.detail})]},a.label))}),c&&s.jsxs("div",{className:"sys-banner sys-banner-warning",children:[s.jsx("strong",{children:"Configuration snapshot failed."}),s.jsx("span",{children:c})]}),y&&!n&&s.jsx(Y,{title:"Loading configuration",body:"Reading Scout settings, runtime readiness, broker agents, and project inventory."}),n&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Runtimes"}),s.jsx("p",{className:"sys-section-subtitle",children:"Harness readiness replaces provider auth for the current local-first posture."})]}),s.jsx(ss,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:n.runtimes.map(a=>s.jsx(ls,{runtime:a},a.id))})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"BYOK Providers"}),s.jsx("p",{className:"sys-section-subtitle",children:"OpenAI-compatible vendors OpenScout can discover from local environment configuration."})]}),s.jsx(K,{size:15})]}),s.jsx("div",{className:"agent-config-list",children:m.map(a=>s.jsx(os,{provider:a},a.id))})]})]}),s.jsxs("div",{className:"agent-config-layout agent-config-layout-primary",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Agents"}),s.jsx("p",{className:"sys-section-subtitle",children:"Broker-visible endpoints with runtime, model, and source state."})]}),s.jsx(_,{size:15})]}),s.jsx("div",{className:"agent-config-list agent-config-list-scroll",children:n.agents.length===0?s.jsxs("div",{className:"sys-list-empty",children:[s.jsx("h3",{children:"No agents registered"}),s.jsx("p",{children:"Run setup or start a local agent to populate this roster."})]}):n.agents.map(a=>s.jsx(ds,{agent:a,selected:a.id===j?.id,navigate:e},a.id))})]}),s.jsx(ms,{agent:j,agents:n.agents,navigate:e,onConfigSaved:()=>{p("manual")}})]}),s.jsxs("div",{className:"agent-config-layout",children:[s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Tools & Context"}),s.jsx("p",{className:"sys-section-subtitle",children:"The next model boundary to make first-class."})]}),s.jsx(es,{size:15})]}),s.jsx("p",{className:"agent-config-copy",children:n.toolContext.note}),s.jsxs("div",{className:"agent-config-chip-row",children:[s.jsxs("span",{className:"sys-chip sys-chip-neutral",children:[n.toolContext.mcpServerCount," MCP servers"]}),s.jsx("span",{className:"sys-chip sys-chip-warning",children:"loadouts pending"})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsxs("div",{className:"sys-section-head",children:[s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Broker & Delivery"}),s.jsx("p",{className:"sys-section-subtitle",children:"Control-plane state and bridges that route attention back to you."})]}),s.jsx(as,{size:15})]}),s.jsxs("div",{className:"agent-config-detail-grid",children:[s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Broker"}),s.jsx("span",{className:`sys-chip ${n.broker.healthy?"sys-chip-success":"sys-chip-danger"}`,children:n.broker.label})]}),s.jsxs("div",{children:[s.jsx("span",{className:"agent-config-label",children:"Messages"}),s.jsx("strong",{children:n.broker.messageCount})]}),n.integrations.map(a=>s.jsxs("div",{className:"agent-config-detail-wide",children:[s.jsx("span",{className:"agent-config-label",children:a.name}),s.jsx("span",{children:a.detail})]},a.id))]})]})]}),s.jsxs("div",{className:"sys-panel",children:[s.jsx("div",{className:"sys-section-head",children:s.jsxs("div",{children:[s.jsx("h3",{className:"sys-section-title",children:"Known Missing Pieces"}),s.jsx("p",{className:"sys-section-subtitle",children:"The configuration model is now visible; these are the next root-cause surfaces to build."})]})}),s.jsx("div",{className:"agent-config-gap-list",children:n.gaps.map(a=>s.jsx("span",{children:a},a))})]})]})]})})]})}export{ye as AgentConfigurationScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-C8uS5szO.js";import{A as k}from"./AgentAvatar-BIwg54Tj.js";import{a as R}from"./api-CaROe5_H.js";import{c as T}from"./agent-state-DDhnFEEP.js";import{t as D}from"./time-Dhsh_2EG.js";import{u as M}from"./Provider-5Hotn7NQ.js";import{a as I}from"./agent-specialization-CiVxQsFT.js";import{p as O}from"./project-overview-helpers-BQTc_Ous.js";import{FileViewerPane as $}from"./FileViewerPane-HtiDbj9N.js";/* empty css */import{C as z}from"./chevron-right-C7UGFpkl.js";import{C as L}from"./chevron-down-B5eMsn5c.js";import{F as H}from"./folder-0fWevPvQ.js";import{F as U}from"./DocumentFocusViewer-f12RRQpV.js";import{F as G}from"./file-text-ChtICwub.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./HarnessMark-Bt47OeHy.js";import"./colors-CFlbwC25.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./search-C4VlW_0l.js";import"./model-CBkMvT1w.js";import"./index-CvsM3jm8.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";function B({payload:t,selectedSlug:n,selectedFile:v,filter:S,collapsed:i,onToggleFolder:N,onSelectFile:h}){const p=S.trim().toLowerCase(),b=t.folders.filter(o=>!p||o.slug.includes(p)?!0:o.files.some(c=>c.name.toLowerCase().includes(p)||c.relativePath.toLowerCase().includes(p)));return b.length===0?e.jsx("div",{className:"adef-treeEmpty",children:t.agentsRootExists?"No agent folders in .agents yet.":"No .agents directory on disk."}):e.jsx(e.Fragment,{children:b.map(o=>{const c=i.has(o.slug),C=o.slug===n;return e.jsxs("div",{className:"adef-folder","data-selected-agent":C||void 0,children:[e.jsxs("button",{type:"button",className:"adef-folderRow",onClick:()=>N(o.slug),children:[e.jsx("span",{className:"adef-folderChevron","aria-hidden":!0,children:c?e.jsx(z,{size:12}):e.jsx(L,{size:12})}),e.jsx("span",{className:"adef-folderIcon","aria-hidden":!0,children:c?e.jsx(H,{size:13}):e.jsx(U,{size:13})}),e.jsx("span",{className:"adef-folderName",children:o.slug})]}),c?null:o.files.map(d=>{const f=v?.absolutePath===d.absolutePath;return e.jsxs("button",{type:"button",className:"adef-fileRow","data-selected":f||void 0,onClick:()=>h({slug:o.slug,name:d.name,relativePath:`.agents/${d.relativePath}`,absolutePath:d.absolutePath,excerpt:d.excerpt}),children:[e.jsx("span",{className:"adef-fileIcon","aria-hidden":!0,children:e.jsx(G,{size:12})}),e.jsx("span",{className:"adef-fileName",children:d.name})]},d.absolutePath)})]},o.slug)})})}function J({agent:t,config:n,onConfigSaved:v,sessionCatalog:S,navigate:i,homeView:N}){const h=I(t,n),p=t.handle?.replace(/^@+/,"")||t.name,b=S?.sessions.length??0,[o,c]=l.useState(""),[C,d]=l.useState(""),[f,x]=l.useState(""),[E,w]=l.useState(!1),[m,g]=l.useState("idle"),[P,y]=l.useState(null),[j,F]=l.useState(null);l.useEffect(()=>{if(!n){c(""),d(""),x(t.harness??"");return}c(n.model??""),d(n.runtime.cwd),x(n.runtime.harness),w(!1),y(null),F(null)},[t.harness,t.id,n]);const A=l.useMemo(()=>{const s=["claude","codex","pi",n?.runtime.harness,t.harness,f].filter(u=>!!u?.trim());return Array.from(new Set(s))},[t.harness,n?.runtime.harness,f]),a=async s=>{if(s.preventDefault(),!(!n||m==="saving")){g("saving"),y(null),F(null);try{const u=await R(`/api/agents/${encodeURIComponent(t.id)}/config`,{method:"POST",body:JSON.stringify({model:o.trim()||null,runtime:{cwd:C.trim()||n.runtime.cwd,harness:f.trim()||n.runtime.harness},restart:E})});v(u.config),w(!1),y(u.restarted?"Saved and restarted":"Saved")}catch(u){F(u instanceof Error?u.message:"Could not save config")}finally{g("idle")}}},r=()=>i({view:N,agentId:t.id,tab:"profile"});return e.jsxs("aside",{className:"adef-inspector",children:[e.jsxs("header",{className:"adef-inspectorHead",children:[e.jsx(k,{agent:t,size:36,tile:!0,presence:!1}),e.jsxs("div",{className:"adef-inspectorIdent",children:[e.jsxs("span",{className:"adef-inspectorHandle",children:["@",p]}),e.jsx("span",{className:"adef-inspectorSpec",children:h.headline})]})]}),e.jsxs("dl",{className:"adef-inspectorFacts",children:[e.jsxs("div",{children:[e.jsx("dt",{children:"State"}),e.jsx("dd",{children:T(t.state,t)})]}),e.jsxs("div",{children:[e.jsx("dt",{children:"Sessions"}),e.jsx("dd",{children:b})]})]}),n?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"adef-inspectorSec",children:"Runtime"}),e.jsxs("form",{className:"adef-configEdit",onSubmit:a,children:[e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Model"}),e.jsx("input",{value:o,placeholder:"Harness default",disabled:!n.editable||m==="saving",onChange:s=>c(s.currentTarget.value)})]}),e.jsxs("label",{className:"adef-configField",children:[e.jsx("span",{children:"Harness"}),e.jsx("select",{value:f,disabled:!n.editable||m==="saving",onChange:s=>x(s.currentTarget.value),children:A.map(s=>e.jsx("option",{value:s,children:s},s))})]}),e.jsxs("label",{className:"adef-configField adef-configField--wide",children:[e.jsx("span",{children:"Working dir"}),e.jsx("input",{value:C,disabled:!n.editable||m==="saving",onChange:s=>d(s.currentTarget.value)})]}),e.jsxs("div",{className:"adef-configSaveRow",children:[e.jsxs("label",{className:"adef-configCheck",children:[e.jsx("input",{type:"checkbox",checked:E,disabled:!n.editable||m==="saving",onChange:s=>w(s.currentTarget.checked)}),e.jsx("span",{children:"Restart"})]}),e.jsx("button",{type:"submit",className:"adef-inspectorAct","data-primary":!0,disabled:!n.editable||m==="saving",children:m==="saving"?"Saving…":"Save"})]}),P?e.jsx("p",{className:"adef-inspectorMeta",children:P}):null,j?e.jsx("p",{className:"adef-configError",children:j}):null]}),e.jsx("div",{className:"adef-inspectorSec",children:"Permissions"}),e.jsx("p",{className:"adef-inspectorMono",children:O(n.permissionProfile)}),e.jsx("div",{className:"adef-inspectorSec",children:"Tools"}),e.jsx("div",{className:"adef-inspectorChips",children:(h.capabilities.length>0?h.capabilities:["—"]).map(s=>e.jsx("span",{className:"adef-inspectorChip",children:s},s))})]}):e.jsx("p",{className:"adef-inspectorMeta",children:"No editable local config on disk."}),t.updatedAt?e.jsxs("p",{className:"adef-inspectorMeta",children:["Updated ",D(t.updatedAt)]}):null,e.jsx("div",{className:"adef-inspectorActs",children:e.jsx("button",{type:"button",className:"adef-inspectorAct","data-primary":!0,onClick:r,children:"Sessions"})})]})}function He({agent:t,navigate:n,homeView:v="agents-v2"}){const{openFilePreview:S}=M(),[i,N]=l.useState(null),[h,p]=l.useState(null),[b,o]=l.useState(null),[c,C]=l.useState(null),[d,f]=l.useState("loading"),[x,E]=l.useState(""),[w,m]=l.useState(()=>new Set),[g,P]=l.useState(null),y=l.useCallback(async a=>{await R("/api/file/reveal",{method:"POST",body:JSON.stringify({path:a})}).catch(()=>{})},[]);l.useEffect(()=>{let a=!1;return f("loading"),(async()=>{const[r,s,u]=await Promise.allSettled([R(`/api/agents/${encodeURIComponent(t.id)}/definitions`),R(`/api/agents/${encodeURIComponent(t.id)}/config`).catch(()=>null),R(`/api/agents/${encodeURIComponent(t.id)}/session-catalog`).catch(()=>null)]);a||(r.status==="fulfilled"&&N(r.value),s.status==="fulfilled"&&p(s.value),u.status==="fulfilled"&&o(u.value),f("ready"))})(),()=>{a=!0}},[t.id]);const j=l.useMemo(()=>{if(!i)return null;const a=i.folders.find(s=>s.slug===i.selectedSlug)??i.folders[0]??null,r=a?.files.find(s=>s.name==="AGENT.md")??a?.files[0]??null;return!a||!r?null:{slug:a.slug,name:r.name,relativePath:`.agents/${r.relativePath}`,absolutePath:r.absolutePath,excerpt:r.excerpt}},[i]);l.useEffect(()=>{j&&(P(a=>a&&i?.folders.some(r=>r.files.some(s=>s.absolutePath===a.absolutePath))?a:j),i?.selectedSlug&&m(a=>{const r=new Set(a);return r.delete(i.selectedSlug),r}))},[j,i]);const F=i?.folders.reduce((a,r)=>a+r.files.length,0)??0,A=l.useCallback(a=>{m(r=>{const s=new Set(r);return s.has(a)?s.delete(a):s.add(a),s})},[]);return e.jsxs("div",{className:"adef-workspace",children:[e.jsxs("header",{className:"adef-head",children:[e.jsxs("div",{className:"adef-headCopy",children:[e.jsx("span",{className:"adef-headKind",children:"Config"}),e.jsxs("span",{className:"adef-headPath",title:i?.agentsRoot,children:[i?.agentsRootExists?".agents · explore & edit":"explore & edit",i?` · ${i.folders.length} agents · ${F} files`:""]})]}),e.jsx("input",{type:"search",className:"adef-filter",placeholder:"Filter agents & files…",value:x,onChange:a=>E(a.target.value)})]}),d==="loading"?e.jsx("div",{className:"adef-loading",children:"Loading agent config…"}):e.jsxs("div",{className:"adef-frame",children:[e.jsx("aside",{className:"adef-tree","aria-label":"Agent definition files",children:i?e.jsx(B,{payload:i,selectedSlug:i.selectedSlug,selectedFile:g,filter:x,collapsed:w,onToggleFolder:A,onSelectFile:P}):null}),e.jsx("section",{className:"adef-viewer","aria-label":"Definition file",children:g?e.jsx($,{artifact:g,onOpen:S,onReveal:a=>{y(a)},onBrowse:i?a=>n({view:"code",root:i.projectRoot,file:a}):void 0}):e.jsx("div",{className:"av2-repoViewerState",children:i?.agentsRootExists?"Select a definition file — or create .agents/<handle>/AGENT.md":"Create .agents/<handle>/AGENT.md in the project root to define this expert on disk."})}),e.jsx(J,{agent:t,config:h,onConfigSaved:p,sessionCatalog:c,navigate:n,homeView:v})]})]})}export{He as AgentDefinitionsWorkspace};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,j as e}from"./index-C8uS5szO.js";import{AgentAdventures as rt}from"./AgentAdventures-NwTKeF0F.js";import{SharedWorkFloor as it}from"./SharedWorkFloor-yPWFLZwX.js";import{FloorReplay as ct}from"./FloorReplay-BHo79HCD.js";import{a as dt}from"./floor-memory-YMM8AlLY.js";import{FloorTacticalHUD as mt}from"./FloorTacticalHUD-Bngao6sn.js";import{FloorResourcesSheet as pt}from"./FloorResourcesSheet-Djrgd_ZU.js";/* empty css */import{F as Se,b as ut,a as we}from"./agent-floor-world-layout-hfMjuoui.js";import{FloorContextSheet as ft}from"./FloorContextSheet-DV-SYA0K.js";import{AgentFloorWorld as gt}from"./AgentFloorWorld-BDJmXl3C.js";import{f as Be}from"./agent-floor-actor-3v9drnxh.js";import{f as _t}from"./floor-character-name-CqJPOlXb.js";import{H as Ke}from"./HarnessMark-Bt47OeHy.js";import{a as Oe,S as Ae}from"./SpriteAvatar-BW1JzkDt.js";import{n as ht}from"./agent-state-DDhnFEEP.js";import{o as xt,b as jt}from"./lane-observe-BD21P8BB.js";import{t as bt}from"./time-Dhsh_2EG.js";import{S as Nt}from"./SessionObserve-DaqDhqDI.js";import{l as Q}from"./agent-lanes-model-CX0wTcnF.js";import{p as kt,s as We,a as He}from"./lane-roster-store-DzNHP392.js";import{c as vt}from"./createLucideIcon-DkjnzvcJ.js";import{T as St}from"./terminal-96JWDYDL.js";import{F as wt}from"./file-code-corner-D_Aptal2.js";import{M as yt}from"./message-square-NmXWtWLR.js";import"./ReplayClock-B7JLTp8A.js";import"./SproutActionSprite-DveCzg6l.js";/* empty css */import"./CrewSprite-hgpA3SWB.js";import"./adventure-playback-DTfkhIc0.js";import"./AdventureScenery-D548O0x4.js";import"./adventure-habitats-v1-M1lcpTJh.js";import"./AdventureReader-ClMxT0e4.js";import"./api-CaROe5_H.js";import"./index-CvsM3jm8.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./file-text-ChtICwub.js";import"./floor-preview-text-HrORUJ7D.js";/* empty css */import"./book-open-BlJnpf2U.js";import"./x-DI1ktCYb.js";import"./scroll-text-DwC8r2g6.js";import"./ReplayLog-DZTpf2CW.js";import"./observe-CkfOxYx_.js";import"./surface-activity-B1rgWB1i.js";import"./AdventureEvidence-Dzz9VbuE.js";import"./Provider-5Hotn7NQ.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./agent-lane-detail-Db7KyAlf.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";/* empty css */import"./arrow-up-right-Hn754ybA.js";/* empty css */import"./flag-CqdOxVkI.js";import"./wrench-BsMTSeji.js";import"./pause-DWS7YGQ3.js";import"./play-D_Pggug4.js";import"./radio-C_jtwbFP.js";import"./WorldMinimap-Blqg0d5r.js";import"./WorldSky-DV9bpvXj.js";import"./WorldActorTalk-uIH2jGqA.js";import"./send-to-agent-session-BZGq_ycy.js";import"./FloorExchangePanel-D59nvRCF.js";import"./floor-message-passes-CJh9f8Jp.js";import"./shared-work-artifacts-4IIQXQfc.js";import"./CharacterFamilyPreview-CfO3j8Of.js";import"./RenderedWorkerSprite-CvdWO32C.js";import"./FloorMessagePasses-BCwsz9VS.js";import"./WorkRunView-x5PH1byG.js";import"./floor-context-model-DZBpo_oD.js";import"./lane-ask-display-B6iCAVcd.js";import"./context-budget-DemtXu7E.js";import"./SharedFloorCharacter-CSYG_t9t.js";import"./WorldCharacter-Dn4sIXNP.js";import"./RiggedWorkerCharacter-DNe731GE.js";/* empty css */import"./FloorSavedWork-2tjBoy06.js";import"./pin-DWlD1BOF.js";/* empty css *//* empty css */import"./git-branch-CA3cHKCI.js";import"./coffee-C_D9zooM.js";/* empty css */import"./bash-format-BRV5C6Gv.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-C6YehJqD.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./message-markup-DgFSyb3f.js";import"./ObservedTopologyPanel-DkEkQzo-.js";import"./ObserveTextFlow-ET0dD1wO.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./SessionObserveEvidence-Drv-D8Oh.js";import"./message-circle-CSiJj6yo.js";import"./external-link-RT4Ph-6-.js";const $t=[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["circle",{cx:"12",cy:"12",r:"1",key:"41hilf"}]],Mt=vt("circle-dot",$t),U=5*6e4,Ot=3,ne=Ot+1,se=8,At=15*6e4,Ge=.65,ae=1.45,Ye=.1,je=360,be=260;function ye(o){return Math.round(Math.min(ae,Math.max(Ge,o))*100)/100}function Y(o,a){return Math.round(Math.min(a,Math.max(-a,o)))}const le=128,$e=34,Xe=14,Ct=12,V=44,Me=7,J=58,I=440,Lt=48,Rt=24,Ft=480,qe="openscout:agent-floor-orient",Ue="openscout:agent-floor-lane-order";function Et(){try{const o=localStorage.getItem(qe);if(o==="past-left"||o==="past-right")return o}catch{}return"past-left"}function Pt(){try{const o=JSON.parse(sessionStorage.getItem(Ue)??"[]");return Array.isArray(o)?o.filter(a=>typeof a=="string"):[]}catch{return[]}}function Ne(o){return new Date(o).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit",hour12:!1})}const Tt=/^(edit|multi_?edit|write|apply_?patch|patch_apply|str_?replace|notebook_?edit|create_file)/i;function It(o){return o.kind==="tool"?o.diff||o.tool&&Tt.test(o.tool.trim())?"edit":"tool":o.kind==="message"||o.kind==="ask"?"msg":null}function Ze(o,a,n){const r=o.observe?.metadata?.session?.sessionStart,m={tool:0,edit:0,msg:0},i=Array.from({length:ne},()=>({blocks:[],counts:{tool:0,edit:0,msg:0},tools:new Map,total:0})),h=[];let f=null;for(const g of o.observe?.events??[]){const b=It(g);if(!b)continue;const d=xt(g,r),P=d===null||d>=a?0:Math.floor((a-d)/U)+1;if(P>=ne)continue;const p=i[P];p.blocks.push(b),p.counts[b]+=1,p.total+=1,m[b]+=1;const x=b==="msg"?null:g.tool?.trim()||"tool";x&&p.tools.set(x,(p.tools.get(x)??0)+1),h.push({kind:b,label:b==="msg"?jt(g.text,44,1):g.text.trim()||x||"tool",at:d}),f={at:d,label:b==="msg"?"message":g.tool?.trim()||"tool"}}return{lane:o,live:Be(o,n).posture==="working",slots:i.map(g=>({blocks:g.blocks.slice(-8),counts:g.counts,tools:[...g.tools.entries()].sort((b,d)=>d[1]-b[1]),total:g.total})),counts:m,strip:h.slice(-10).map(g=>g.kind),lastLabel:f?.label??null,lastAt:f?.at??(o.lastActiveAt||null)}}function ke(o){const a=(n,r,m)=>`${n} ${n===1?r:m}`;return[a(o.tool,"tool","tools"),a(o.edit,"edit","edits"),a(o.msg,"msg","msgs")].join(" · ")}function Dt(o){return/^(working|active|running|in_turn|in_flight)/i.test(o.lane.agent.state??"")?"quiet":"idle"}function B(o){return o.tool+o.edit+o.msg}function Ve(o){if(B(o)===0)return"quiet";const n=[["tool-led",o.tool],["edit-heavy",o.edit],["conversation-led",o.msg]];return n.sort((r,m)=>m[1]-r[1]),n[0][1]===n[1][1]?"balanced":n[0][0]}function zt(o){const a=new Map;for(const r of o.slots)for(const[m,i]of r.tools)a.set(m,(a.get(m)??0)+i);const[n]=[...a.entries()].sort((r,m)=>m[1]-r[1]);return n?{value:n[0],detail:`${n[1]} call${n[1]===1?"":"s"} · 15m`}:{value:"no tool pattern",detail:"messages and edits only"}}function Wt(o){const a=o.slots[0]?.total??0,n=o.slots[1]?.total??0;return a===0&&n===0?{value:"quiet",detail:"no work in the last 10m"}:a===0?{value:"paused",detail:`${n} in the prior 5m`}:n===0?{value:"new burst",detail:`${a} in the current 5m`}:a>=n+3?{value:"building",detail:`${a} now · ${n} prior`}:n>=a+3?{value:"easing",detail:`${a} now · ${n} prior`}:{value:"steady",detail:`${a} now · ${n} prior`}}function X({label:o,value:a,detail:n,mix:r}){const m=r?Math.max(1,B(r)):1;return e.jsxs("span",{className:"agent-floor__dock-insight",children:[e.jsx("span",{className:"agent-floor__dock-insight-label",children:o}),e.jsx("span",{className:"agent-floor__dock-insight-value",children:a}),e.jsx("span",{className:"agent-floor__dock-insight-detail",children:n}),r?e.jsx("span",{className:"agent-floor__dock-mix",style:{"--mix-tool":`${r.tool/m*100}%`,"--mix-edit":`${(r.tool+r.edit)/m*100}%`},"aria-hidden":"true"}):null]})}function Je(o,a){const n=o.lastAt?bt(o.lastAt,a):null;return o.live?{glyph:"▸",label:o.lastLabel??"working",meta:n??"now"}:{glyph:"⏸",label:Dt(o),meta:n?`· ${n}`:""}}function Ht({series:o,now:a}){const n=Je(o,a);return o.live?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-run",children:n.glyph}),e.jsx("span",{className:"agent-floor__card-tool",children:n.label}),e.jsx("span",{className:"agent-floor__card-ago",children:n.meta})]}):e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__card-pause",children:n.glyph}),e.jsxs("span",{className:"agent-floor__card-idle",children:[n.label,n.meta?` ${n.meta}`:""]})]})}function Yt({kind:o,z:a,size:n=$e,faceH:r=Ct,pad:m,live:i}){return e.jsxs("span",{className:`agent-floor__block is-${o}${m?" is-pedestal":""}${i?" is-live":""}`,style:{"--z":`${a}px`,"--bs":`${n}px`,"--bh":`${r}px`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function Xt({slot:o}){const a=Math.max(1,o.total),n=o.counts.tool/a*100,r=o.counts.edit/a*100;return e.jsxs("span",{className:"agent-floor__block agent-floor__slab",style:{"--z":"0px","--bs":`${V}px`,"--bh":`${Me}px`,"--mix-a":`${n.toFixed(1)}%`,"--mix-b":`${(n+r).toFixed(1)}%`},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__face is-left"}),e.jsx("span",{className:"agent-floor__face is-right"}),e.jsx("span",{className:"agent-floor__face is-top"})]})}function Zt({slot:o,slotIndex:a,periodStart:n}){const r=a===0?`${Ne(n)} — now`:`${Ne(n-a*U)} – ${Ne(n-(a-1)*U)}`;return e.jsxs("span",{className:"agent-floor__peek",children:[e.jsx("span",{className:"agent-floor__peek-range",children:r}),e.jsxs("span",{className:"agent-floor__peek-cols",children:[e.jsxs("span",{className:"agent-floor__peek-col",children:[o.tools.slice(0,3).map(([m,i])=>e.jsxs("span",{className:"agent-floor__peek-tool",children:[m,i>1?` ×${i}`:""]},m)),o.tools.length===0?e.jsx("span",{className:"agent-floor__peek-tool is-empty",children:"no tools"}):null]}),e.jsxs("span",{className:"agent-floor__peek-col is-right",children:[e.jsxs("span",{children:[o.counts.edit," edit",o.counts.edit===1?"":"s"]}),e.jsxs("span",{children:[o.counts.msg," msg",o.counts.msg===1?"":"s"]})]})]})]})}function Vt({series:o,index:a,planeW:n,flip:r,periodStart:m,now:i,focused:h,pinned:f,dimmed:g,peekSlot:b,onFocus:d,onPeek:P,onSelect:p}){const{lane:x,live:c,slots:M}=o,S=x.agent,y=Q(S,x.source),re=Oe(S),K=(le-V)/2,ie=_=>{const k=(J-V)/2;return r?I+_*J+k:n-I-(_+1)*J+k},O=Be(x,i),G=[{id:"home",label:"READY",x:55,y:44},{id:"tools",label:"TOOLS",x:165,y:44},{id:"edit",label:"EDIT",x:275,y:44},{id:"message",label:"COMMS",x:380,y:44}],ce=G.find(_=>_.id===O.station),N=r?0:n-I,$=N+ce.x,de=ce.y,ee=x.id.replace(/[^a-zA-Z0-9]/g,"").slice(-5);return e.jsxs("button",{type:"button",className:`agent-floor__lane${c?" is-live":""}${a%2===1?" is-alt":""}${h?" is-focus":""}${f?" is-pinned":""}${g?" is-dim":""}`,style:{left:0,top:a*le,width:n,height:le},onClick:()=>p(x),onMouseEnter:()=>d(x.id),onMouseLeave:()=>{d(null),P(x.id,null)},onFocus:()=>d(x.id),onBlur:()=>d(null),"aria-label":`${y} ${S.harness??""} ${ee} — ${O.label} — ${f?"open timeline":"pin details"}`,children:[e.jsx("span",{className:"agent-floor__lane-strip","aria-hidden":"true"}),M.map((_,k)=>{if(_.total===0)return null;const D=h&&b===k,T=Me+2+_.blocks.length*Xe;return e.jsxs("span",{className:`agent-floor__stack${k===0?" is-now":" is-minted"}${D?" is-peeking":""}`,style:{left:ie(k),top:K},onMouseEnter:()=>P(x.id,k),children:[e.jsx(Xt,{slot:_}),e.jsx("span",{className:"agent-floor__stack-blocks",style:{left:(V-$e)/2,top:(V-$e)/2},children:_.blocks.map((z,me)=>e.jsx(Yt,{kind:z,z:Me+2+me*Xe},me))}),D?e.jsx("span",{className:"agent-floor__bb agent-floor__peek-anchor",style:{left:V/2,top:V/2,"--z":`${T+46}px`},children:e.jsx(Zt,{slot:_,slotIndex:k,periodStart:m})}):null]},k)}),e.jsxs("span",{className:"agent-floor__work-zone",style:{left:N,width:I},"aria-hidden":"true",children:[e.jsx("span",{className:"agent-floor__route"}),G.map(_=>e.jsxs("span",{className:`agent-floor__station${_.id===O.station?" is-occupied":""}`,style:{left:_.x,top:_.y},children:[e.jsx("span",{className:"agent-floor__station-surface",children:_.id==="home"?e.jsx(Mt,{size:22}):_.id==="tools"?e.jsx(St,{size:22}):_.id==="edit"?e.jsx(wt,{size:22}):e.jsx(yt,{size:22})}),e.jsx("span",{className:"agent-floor__bb agent-floor__station-label",children:_.label})]},_.id))]}),e.jsxs("span",{className:`agent-floor__actor-position is-${O.posture}${f||h?" is-selected":""}`,style:{left:$,top:de},"data-station":O.station,children:[e.jsx("span",{className:"agent-floor__selection-ring"}),e.jsxs("span",{className:"agent-floor__bb agent-floor__actor-body",style:{"--z":"42px"},children:[e.jsx(Ae,{name:S.name,size:56,hue:re.hue,tone:re.tone,glow:!1}),O.posture==="attention"||O.posture==="blocked"?e.jsx("span",{className:"agent-floor__actor-alert",children:"!"}):null]})]}),e.jsx("span",{className:"agent-floor__bb agent-floor__flag-anchor agent-floor__unit-label",style:{left:N+220,top:91,"--z":"76px"},children:e.jsxs("span",{className:`agent-floor__flag${h?" is-focus":""}${f?" is-pinned":""}`,children:[e.jsx("span",{className:"agent-floor__flag-name",children:y}),e.jsxs("span",{className:"agent-floor__unit-id",children:[S.harness," · ",ee]}),e.jsx("span",{className:`agent-floor__unit-status is-${O.posture}`,children:O.label})]})})]})}function Bt({focus:o,pinned:a,ledger:n,liveCount:r,now:m}){if(!o){const d=n.reduce((c,M)=>(c.tool+=M.counts.tool,c.edit+=M.counts.edit,c.msg+=M.counts.msg,c),{tool:0,edit:0,msg:0}),P=n.filter(c=>B(c.counts)>0).length,p=[...n].sort((c,M)=>B(M.counts)-B(c.counts))[0]??null,x=p?B(p.counts):0;return e.jsxs("div",{className:"agent-floor__dock is-resting",children:[e.jsx("span",{className:"agent-floor__dock-id agent-floor__dock-fleet",children:e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsx("span",{className:"agent-floor__dock-title",children:"fleet at a glance"}),e.jsxs("span",{children:[n.length," lane",n.length===1?"":"s"," · ",r," live"]})]})}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(X,{label:"coverage",value:`${P}/${n.length} lanes`,detail:"showed work · 15m"}),e.jsx(X,{label:"hottest lane",value:p?Q(p.lane.agent,p.lane.source):"none yet",detail:p?`${x} classified events`:"waiting for activity"}),e.jsx(X,{label:"throughput",value:`${B(d)} events`,detail:"classified · 15m"}),e.jsx(X,{label:"activity mix",value:Ve(d),detail:ke(d),mix:d})]})]})}const i=o.lane.agent,h=Oe(i),f=Wt(o),g=zt(o),b=o.slots.filter(d=>d.total>0).length;return e.jsxs("div",{className:`agent-floor__dock${a?" is-pinned":""}`,children:[e.jsxs("span",{className:"agent-floor__dock-id",children:[e.jsx(Ae,{name:i.name,size:30,tile:!0,hue:h.hue,tone:h.tone}),e.jsxs("span",{className:"agent-floor__dock-id-copy",children:[e.jsxs("span",{className:"agent-floor__dock-name",children:[Q(i,o.lane.source),e.jsx(Ke,{harness:i.harness,size:12,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${o.live?" is-live":""}`}),a?e.jsx("span",{className:"agent-floor__dock-lock",children:"locked"}):null]}),e.jsx("span",{className:"agent-floor__dock-action",children:e.jsx(Ht,{series:o,now:m})})]})]}),e.jsxs("span",{className:"agent-floor__dock-insights",children:[e.jsx(X,{label:"momentum",value:f.value,detail:f.detail}),e.jsx(X,{label:"cadence",value:`${b}/${o.slots.length} windows`,detail:"active five-minute bands"}),e.jsx(X,{label:"signature",value:g.value,detail:g.detail}),e.jsx(X,{label:"activity mix",value:Ve(o.counts),detail:ke(o.counts),mix:o.counts})]})]})}function Kt({series:o,now:a,concise:n,onConciseChange:r,onClose:m,onOpenFull:i,operatorName:h}){const{agent:f,observe:g,source:b}=o.lane,d=Q(f,b);return e.jsxs("aside",{className:"agent-floor__trace-panel","aria-label":`${d} selected lane trace`,children:[e.jsx("button",{type:"button",className:"agent-floor__trace-close",onClick:m,"aria-label":"Close selected lane trace",children:"×"}),e.jsx("div",{className:"agent-floor__trace-body",children:g?e.jsx(Nt,{data:g,agentId:b==="scout"?f.id:void 0,sessionId:f.harnessSessionId,showRail:!1,variant:"lane",nowMs:a,traceWindowMs:At,traceWindowLabel:"15m",laneCollapseTechnicalEvents:n,onLaneCollapseTechnicalEventsChange:r,laneOperatorName:h,onLaneEventSelect:i}):e.jsx("div",{className:"agent-floor__trace-empty",children:"Waiting for trace activity…"})})]})}function Gt({zoom:o,fit:a,onZoomChange:n,onReset:r}){const m=Math.round(o*100);return e.jsxs("div",{className:"agent-floor__zoom",role:"group","aria-label":"Floor zoom",children:[e.jsx("button",{type:"button","aria-label":"Zoom out",disabled:o<=Ge,onClick:()=>n(ye(o-Ye)),children:"−"}),e.jsx("button",{type:"button",className:"agent-floor__zoom-reset","aria-label":"Reset floor zoom to fit",title:"Reset zoom and position to automatic fit",onClick:r,children:a?"fit":`${m}%`}),e.jsx("button",{type:"button","aria-label":"Zoom in",disabled:o>=ae,onClick:()=>n(ye(o+Ye)),children:"+"})]})}function bn({lanes:o,now:a,onOpenTrace:n,railLedger:r=!1,operatorName:m}){const i=Math.max(a,Date.now()),[h,f]=l.useState(null),[g,b]=l.useState(!1),[d,P]=l.useState(!0),[p,x]=l.useState(!1),[c,M]=l.useState(!1),[S,y]=l.useState(null),[re,K]=l.useState(0),[ie,O]=l.useState(Et),[G,ce]=l.useState(null),[N,$]=l.useState(null),[de,ee]=l.useState(null),[Ce,_]=l.useState(!1),[k,D]=l.useState(1),[T,z]=l.useState({x:0,y:0}),[me,Le]=l.useState(!1),[pe,Re]=l.useState(Pt),A=l.useMemo(()=>dt(pe,o.map(t=>t.id)),[pe,o]),ue=Math.max(1,Math.ceil(A.length/se)),W=Math.min(re,ue-1),Fe=Object.fromEntries(A.map((t,s)=>[t,s%se])),Ee=l.useRef(null),fe=l.useRef(null),[ge,Qe]=l.useState(null),_e=ie==="past-right";l.useEffect(()=>{const t=Ee.current;if(!t)return;const s=new ResizeObserver(u=>{const v=u[0]?.contentRect;v&&Qe(j=>j&&Math.abs(j.w-v.width)<2&&Math.abs(j.h-v.height)<2?j:{w:v.width,h:v.height})});return s.observe(t),()=>s.disconnect()},[]);const et=l.useCallback(()=>{O(t=>{const s=t==="past-left"?"past-right":"past-left";try{localStorage.setItem(qe,s)}catch{}return s})},[]),L=l.useCallback(t=>{ce(t),t===null&&ee(null)},[]),tt=l.useCallback((t,s)=>{ee(s===null?null:{laneId:t,slot:s})},[]),R=l.useCallback(t=>{const s=A.indexOf(t.id);s>=0&&K(Math.floor(s/se)),y(null),f(null),c&&N===t.id?n(t):$(t.id)},[N,n,A,c]),he=l.useCallback(()=>{D(1),z({x:0,y:0})},[]),ot=l.useCallback(t=>{if(!(t.target instanceof Element?t.target:null)?.closest(".agent-floor__trace-panel, .agent-floor__zoom, .floor-tactical, .shared-floor, .floor-replay")){if(t.preventDefault(),t.metaKey||t.ctrlKey){D(u=>ye(u-t.deltaY*.002));return}z(u=>({x:Y(u.x-t.deltaX,je),y:Y(u.y-t.deltaY,be)}))}},[]),st=l.useCallback(t=>{const s=t.target instanceof Element?t.target:null;t.button!==0||s?.closest("button, .agent-floor__trace-panel, .floor-tactical, .shared-floor, .floor-replay")||(fe.current={pointerId:t.pointerId,startX:t.clientX,startY:t.clientY,panX:T.x,panY:T.y},t.currentTarget.setPointerCapture(t.pointerId),Le(!0))},[T]),nt=l.useCallback(t=>{const s=fe.current;!s||s.pointerId!==t.pointerId||z({x:Y(s.panX+t.clientX-s.startX,je),y:Y(s.panY+t.clientY-s.startY,be)})},[]),Pe=l.useCallback(t=>{fe.current?.pointerId===t.pointerId&&(fe.current=null,t.currentTarget.hasPointerCapture(t.pointerId)&&t.currentTarget.releasePointerCapture(t.pointerId),Le(!1))},[]);l.useEffect(()=>{if(N===null&&S===null&&h===null)return;const t=s=>{s.key==="Escape"&&($(null),y(null),f(null))};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[N,S,h]);const q=Math.floor(i/U)*U,C=l.useMemo(()=>{const t=new Map(o.map(j=>[j.id,j])),s=pe.flatMap(j=>{const E=t.get(j);return E?[E]:[]}),u=new Set(s.map(j=>j.id)),v=o.filter(j=>!u.has(j.id)).sort((j,E)=>E.lastActiveAt-j.lastActiveAt);return s.concat(v)},[o,pe]);l.useEffect(()=>{const t=A;Re(s=>s.length===t.length&&s.every((u,v)=>u===t[v])?s:t);try{sessionStorage.setItem(Ue,JSON.stringify(t))}catch{}},[A]);const{series:te,hidden:Te,planeW:Z,planeD:xe,lanesStartY:Ie}=l.useMemo(()=>{const t=C.map(E=>Ze(E,q,i)),s=new Set(A.slice(W*se,(W+1)*se)),u=t.filter(E=>s.has(E.lane.id)),v=u.length*le,j=Math.max(Ft,v+Rt*2);return{series:u,hidden:t.filter(E=>!u.includes(E)),planeW:Lt+ne*J+I,planeD:j,lanesStartY:(j-v)/2}},[C,A,q,W,i]),w=l.useMemo(()=>C.map(t=>Ze(t,q,i)),[C,q,i]),ve=w.filter(t=>t.live).length,F=G??N,at=F===null?null:w.find(t=>t.lane.id===F)??null,H=N===null?null:w.find(t=>t.lane.id===N)??null;l.useEffect(()=>{N!==null&&!w.some(t=>t.lane.id===N)&&$(null)},[w,N]),l.useEffect(()=>{_(!1)},[N]),l.useEffect(()=>{if(!r)return;const t=w.map(s=>{const u=Je(s,i);return{id:s.lane.id,label:Q(s.lane.agent,s.lane.source),statusLabel:s.lane.agent.harness?.trim()||"lane",tone:ht(s.lane.agent.state,s.lane.agent),updatedAt:s.lane.lastActiveAt>0?s.lane.lastActiveAt:void 0,floor:{live:s.live,harness:s.lane.agent.harness,identity:_t(s.lane).label,project:s.lane.agent.project?.trim()||null,actionGlyph:u.glyph,actionLabel:u.label,actionMeta:u.meta,strip:s.strip,countsLabel:ke(s.counts)}}});kt(t)},[r,w,i]),l.useEffect(()=>{if(r)return We({onHover:L,onSelect:t=>{const s=w.find(u=>u.lane.id===t);s&&R(s.lane)}}),()=>We(null)},[r,w,L,R]),l.useEffect(()=>{if(r)return He(F),()=>He(null)},[r,F]);const De=t=>_e?I+t*J:Z-I-t*J,ze=Ie+te.length*le+26,oe=l.useMemo(()=>{if(!ge)return 1;const t=(c?Z:we)+40,s=(c?xe:Se)+35,u=Math.min((ge.w-40)/t,(ge.h-55)/s);return Math.round(Math.min(1.6,Math.max(.15,u))*100)/100},[ge,Z,xe,c]),lt=Math.round(oe*k*100)/100;return e.jsxs("div",{className:`agent-floor is-tactical${r?" is-rail-ledger":""}`,"data-live-count":ve,"data-floor-orient":ie,children:[e.jsxs("div",{className:"agent-floor__body",children:[r?null:e.jsxs("aside",{className:"agent-floor__ledger","aria-label":"Fleet ledger",children:[e.jsxs("header",{className:"agent-floor__ledger-head",children:[e.jsx("span",{className:"agent-floor__ledger-title",children:"fleet"}),e.jsxs("span",{className:"agent-floor__ledger-meta",children:[w.length," lane",w.length===1?"":"s"," · ",ve," live"]}),e.jsx("span",{className:"agent-floor__ledger-trace",children:"trace 15m"})]}),e.jsx("div",{className:"agent-floor__ledger-rows",children:w.map(t=>{const s=t.lane.agent,u=Oe(s);return e.jsxs("button",{type:"button",className:`agent-floor__ledger-row${F===t.lane.id?" is-focus":""}`,onClick:()=>R(t.lane),onMouseEnter:()=>L(t.lane.id),onMouseLeave:()=>L(null),children:[e.jsxs("span",{className:"agent-floor__ledger-id",children:[e.jsx(Ae,{name:s.name,size:18,tile:!0,hue:u.hue,tone:u.tone}),e.jsx("span",{className:"agent-floor__ledger-name",children:Q(s,t.lane.source)}),e.jsx(Ke,{harness:s.harness,size:11,className:"agent-floor__card-mark"}),e.jsx("span",{className:`agent-floor__card-dot${t.live?" is-live":""}`})]}),e.jsxs("span",{className:"agent-floor__ledger-tally",children:[e.jsx("span",{className:"agent-floor__ledger-strip",children:t.strip.map((v,j)=>e.jsx("span",{className:`agent-floor__ledger-cell is-${v}`},j))}),e.jsx("span",{className:"agent-floor__ledger-counts",children:ke(t.counts)})]})]},t.lane.id)})}),e.jsx("footer",{className:"agent-floor__ledger-foot",children:"rows and flags are linked — hover to unroll, click to pin"})]}),e.jsxs("div",{className:`agent-floor__viewport${H||S||h?" is-inspecting":""}${me?" is-dragging":""}`,ref:Ee,onWheel:ot,onPointerDown:st,onPointerMove:nt,onPointerUp:Pe,onPointerCancel:Pe,children:[e.jsxs("div",{className:"agent-floor__command-bar",children:[c||!d?e.jsx("strong",{children:"Operations floor"}):null,e.jsxs("div",{className:"agent-floor__view-switch",role:"group","aria-label":"Floor view",children:[e.jsx("button",{type:"button","aria-pressed":!c&&!p,onClick:()=>{x(!1),M(!1),he()},children:"World"}),e.jsx("button",{type:"button","aria-pressed":p,onClick:()=>{x(!0),M(!1),y(null),f(null),he()},children:"Replay"}),e.jsx("button",{type:"button","aria-pressed":c,onClick:()=>{x(!1),M(!0),y(null),f(null),he()},children:"History"})]}),!c&&!p?e.jsx("button",{type:"button",onClick:()=>P(!d),children:d?"Rooms":"Shared map"}):null,!c&&!p?e.jsx("div",{className:"agent-floor__view-switch","aria-label":"Floor resources",children:["artifacts","branches","terminals"].map(t=>e.jsx("button",{type:"button","aria-pressed":h===t,onClick:()=>{f(t),$(null),y(null)},children:t==="artifacts"?"Artifacts":t==="branches"?"Branches":"Terminals"},t))}):null,!c&&!p&&!d&&A.length>o.length?e.jsxs("button",{type:"button",title:"Release vacant desks and compact sectors",onClick:()=>{Re(C.map(t=>t.id)),K(0)},children:["Release ",A.length-o.length," ",A.length-o.length===1?"desk":"desks"]}):null,!c&&!p&&!d&&ue>1?e.jsxs("span",{className:"agent-floor__page-controls",children:[e.jsx("button",{type:"button","aria-label":"Previous floor sector",disabled:W===0,onClick:()=>{K(W-1),$(null),L(null)},children:"←"}),"Sector ",W+1," / ",ue,e.jsx("button",{type:"button","aria-label":"Next floor sector",disabled:W===ue-1,onClick:()=>{K(W+1),$(null),L(null)},children:"→"})]}):null]}),!c&&!p&&!d?e.jsx(mt,{berths:Fe,allLanes:C,lanes:te.map(t=>t.lane),now:i,selectedId:F,sheetOpen:!!(H||S||h),motionPaused:g,onPause:()=>b(!g),onActor:t=>{R(t),z({x:-100,y:0}),D(1)},onRoom:t=>{f(null),y(t),$(null),L(null)}}):null,!c&&!p&&h?e.jsx(pt,{view:h,lanes:C,onView:f,onClose:()=>f(null),onActor:R}):null,!c&&!p&&d?e.jsx(it,{now:i,lanes:C,onActor:R}):null,p?e.jsx(rt,{lanes:C,now:i,onActor:n}):null,c?e.jsx(ct,{lanes:C,now:i,onActor:R}):null,!c&&!p&&!d?e.jsx(Gt,{zoom:k,fit:k===1&&T.x===0&&T.y===0,onZoomChange:D,onReset:he}):null,e.jsx("div",{className:"agent-floor__stage",style:{display:p||c||d?"none":void 0,transform:`translate3d(${T.x}px, ${T.y}px, 0) scale(${lt})`},children:c?e.jsxs("div",{className:"agent-floor__field",style:{width:Z,height:xe,left:-Z/2,top:-xe/2},children:[e.jsx("div",{className:"agent-floor__plane"}),Array.from({length:ne+1},(t,s)=>e.jsx("div",{className:`agent-floor__seam${s===0?" is-front":""}`,style:{left:De(s)}},s)),Array.from({length:ne+1},(t,s)=>e.jsx("div",{className:`agent-floor__bb agent-floor__tick${s===0?" is-now":""}`,style:{left:De(s),top:ze},children:s===0?e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"agent-floor__tick-pulse"}),e.jsx("span",{children:"now"})]}):Ne(q-(s-1)*U)},s)),e.jsx("div",{className:"agent-floor__lanes",style:{left:0,top:Ie},"data-focus":F!==null||void 0,children:te.map((t,s)=>e.jsx(Vt,{series:t,index:s,planeW:Z,flip:_e,periodStart:q,now:i,focused:F===t.lane.id,pinned:N===t.lane.id,dimmed:N===null&&G!==null&&G!==t.lane.id,peekSlot:de?.laneId===t.lane.id?de.slot:null,onFocus:L,onPeek:tt,onSelect:R},t.lane.id))}),Te.length>0?e.jsxs("div",{className:"agent-floor__bb agent-floor__chip",style:{left:_e?I/2:Z-I/2,top:ze+30},children:["+",Te.length," more in the ledger"]}):null]}):e.jsx(gt,{berths:Fe,lanes:te.map(t=>t.lane),now:i,motionPaused:g,selectedId:F,onFocus:L,onSelect:R,onFocusRoom:(t,s,u)=>{f(null),y(t),$(null),L(null),D(ae),z({x:Y((we/2-s)*oe*ae-140,je),y:Y((Se/2-u)*oe*ae,be)})}})}),!c&&(H||S)?e.jsx(ft,{lane:H?.lane??null,room:S,lanes:te.map(t=>t.lane),allLanes:C,now:i,onClose:()=>{$(null),y(null)},onSelectRoom:t=>{f(null),y(t);const s=ut[t];z({x:Y((we/2-s.x-205)*oe*k-140,je),y:Y((Se/2-s.y-132)*oe*k,be)})},onSelectLane:R,onOpenTrace:n},H?.lane.id??S):H?e.jsx(Kt,{series:H,now:i,concise:Ce,onConciseChange:_,onClose:()=>$(null),onOpenFull:()=>n(H.lane),operatorName:m}):null]})]}),p?null:e.jsx(Bt,{focus:at,pinned:N!==null&&F===N,ledger:w,liveCount:ve,now:i}),e.jsxs("footer",{className:"agent-floor__legend",style:{display:p?"none":void 0},children:[e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-tool"}),"tool call"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-edit"}),"file edit"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-swatch is-msg"}),"message"]}),e.jsxs("span",{className:"agent-floor__legend-item",children:[e.jsx("span",{className:"agent-floor__legend-pulse"}),"actors follow recent activity"]}),e.jsxs("button",{type:"button",className:"agent-floor__legend-flip",hidden:!c,onClick:et,title:"Flip which side history accumulates on",children:["past ",_e?"→":"←"]}),e.jsx("span",{className:"agent-floor__legend-note",children:"Rooms open their own sheets · actors open task details · History retains the trace"})]})]})}export{bn as AgentFloorView};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,j as a}from"./index-C8uS5szO.js";/* empty css */import{c as J,b as X}from"./agent-state-DDhnFEEP.js";import{m as Y,c as Z}from"./conversation-model-BGFHoxQ0.js";import{a as ee,s as ae}from"./colors-CFlbwC25.js";import{a as U}from"./api-CaROe5_H.js";import{u as te}from"./sse-v5QLsOHV.js";import{b as se,t as le}from"./time-Dhsh_2EG.js";import{f as m}from"./runtime-picker-DdsttHHc.js";import{u as oe}from"./Provider-5Hotn7NQ.js";import{o as re}from"./openContent-C6XO6kr5.js";import{B as L}from"./BackToPicker-Bys9ColC.js";import{A as ie}from"./AgentLiveActions-lYzicnNa.js";import{O as ne}from"./ObservedTopologyPanel-DkEkQzo-.js";import{a as ce}from"./NewChatComposer-JjLbm3W2.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversations-Cbg9h_Af.js";import"./index-BWHgHrtv.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./file-text-ChtICwub.js";import"./x-DI1ktCYb.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./keyboard-nav-CXfav14z.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./terminal-takeover-BlpxpvSp.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";function A({values:t}){return a.jsx("span",{className:"s-agent-token-list",children:t.map(s=>a.jsx("span",{className:"s-agent-token",children:s},s))})}function o({value:t}){return a.jsx("span",{className:"s-agent-code-value",children:t})}function I({label:t,value:s}){return s?.trim()?a.jsxs("span",{className:"s-agent-profile-chip",children:[a.jsx("span",{className:"s-agent-profile-chip-label",children:t}),a.jsx("span",{className:"s-agent-profile-chip-value",children:s})]}):null}function T(t){return(t??"").toLowerCase().replace(/[^a-z0-9]+/g,"")}function de(t){return t.trim().replace(/^@+/,"").replace(/^(project|agent|session)[-_.:\s]+/iu,"").split(/[-_\s·]+/u).filter(Boolean).map(s=>s.slice(0,1).toUpperCase()+s.slice(1)).join(" ")}function ue(t,s,i,n){let l=t.trim().replace(/^@+/,"");const h=[s,i,n,n?m(n):null].filter(p=>!!p?.trim());for(const p of h){const f=p.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");l=l.replace(new RegExp(`^${f}[-_.:\\s·]+`,"iu"),"")}return l}function pe(t,s,i,n){const l=s?.participants?.find(d=>d.agentId===t.id||d.actorId===t.id),h=T(t.harness),p=T(i),f=[l?.scopedAlias,s?.alias,t.handle,l?.displayName,s?.agentName,t.name];for(const d of f){if(!d?.trim())continue;const v=ue(d,i,n,t.harness),N=de(v),g=T(N);if(!(!g||g===p||g===h))return N}return null}function me(t){const s=t?.trim();return s?s.toLowerCase()==="a2a"?"A2A":m(s)??s:null}function he({name:t,url:s}){return s?a.jsx("a",{href:s,target:"_blank",rel:"noreferrer",children:t}):a.jsx(a.Fragment,{children:t})}function j({title:t,subtitle:s,items:i,variant:n}){return i.length===0?null:a.jsxs("section",{className:`s-agent-profile-card${n?` s-agent-profile-card-${n}`:""}`,children:[a.jsx("div",{className:"s-agent-profile-card-header",children:a.jsxs("div",{children:[a.jsx("div",{className:"s-agent-profile-card-title",children:t}),s&&a.jsx("div",{className:"s-agent-profile-card-subtitle",children:s})]})}),a.jsx("div",{className:"s-agent-meta-card-body",children:i.map(l=>a.jsxs("div",{className:"s-agent-meta-row",children:[a.jsx("span",{className:"s-agent-meta-label",children:l.label}),a.jsx("span",{className:"s-agent-meta-value",children:l.value})]},l.label))})]})}function ua({conversationId:t,navigate:s}){const{agents:i,route:n}=oe(),[l,h]=u.useState(null),[p,f]=u.useState(!1),[d,v]=u.useState(null),[N,g]=u.useState(null),[y,B]=u.useState(null),S=u.useCallback(async()=>{B(null);try{const r=await U(`/api/session/${encodeURIComponent(t)}`).catch(()=>null);h(r)}catch(r){B(r instanceof Error?r.message:String(r)),h(null)}finally{f(!0)}},[t]);u.useEffect(()=>{f(!1),S()},[S]),te(()=>{S()});const c=l?.agentId??null;u.useEffect(()=>{if(!c||i.some(R=>R.id===c)){v(null);return}let r=!1;return U(`/api/agents/${encodeURIComponent(c)}`).then(R=>{r||v(R)}).catch(()=>{r||v(null)}).finally(()=>{r||g(c)}),()=>{r=!0}},[i,c]);const e=u.useMemo(()=>c?i.find(r=>r.id===c)??(d?.id===c?d:null):null,[d,i,c]);if(!e)return!p||c!==null&&N!==c?a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Loading…"})})]}):a.jsxs("div",{children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsx("div",{className:"s-empty",children:a.jsx("p",{children:"Agent not found"})})]});const W=Y(e),C=e.handle?`@${e.handle.replace(/^@+/,"")}`:null,P=e.selector??e.defaultSelector??C,D=J(e.state),E=e.authorityNodeName?`${e.authorityNodeName} (${e.authorityNodeId??"unknown"})`:e.authorityNodeId,H=e.homeNodeName?`${e.homeNodeName} (${e.homeNodeId??"unknown"})`:e.homeNodeId,$=e.skills??[],b=me(e.protocol),k=!!(e.providerName||b||$.length>0),F=ce(e),x=F.title,w=pe(e,l,x,F.slug),z=w?`${x} · ${w}`:x,M=l?.participants?.find(r=>r.agentId===e.id||r.actorId===e.id),O=e.model&&e.harness&&e.model.startsWith(`${e.harness}-`)?e.model.slice(e.harness.length+1):e.model,Q=[m(e.harness??"")??e.harness,O].filter(r=>!!r).join(" · "),_=[{label:"Project",value:x},{label:"Alias",value:w??"Default project participant"},...P?[{label:"Primary selector",value:a.jsx(o,{value:P})}]:[],...M?.scopedAlias?[{label:"Scoped alias",value:a.jsx(o,{value:M.scopedAlias})}]:[],...C?[{label:"Handle",value:a.jsx(o,{value:C})}]:[],...e.defaultSelector&&e.defaultSelector!==e.selector?[{label:"Default selector",value:a.jsx(o,{value:e.defaultSelector})}]:[],{label:"Definition",value:a.jsx(o,{value:e.definitionId})}],q=[{label:"Routable agent ID",value:a.jsx(o,{value:e.id})},...e.providerName?[{label:"Provider",value:a.jsx(he,{name:e.providerName,url:e.providerUrl})}]:[],...b?[{label:"Protocol",value:b}]:[],...$.length>0?[{label:"Skills",value:a.jsx(A,{values:$})}]:[],...k?[]:[{label:"Class",value:m(e.agentClass)??"—"}],...!k&&e.role?[{label:"Role",value:m(e.role)??e.role}]:[],...e.authorityProfile?[{label:"Authority profile",value:a.jsx(o,{value:e.authorityProfile.roleId})}]:[],...e.workspaceQualifier?[{label:"Workspace qualifier",value:a.jsx(o,{value:e.workspaceQualifier})}]:[],...e.nodeQualifier?[{label:"Node qualifier",value:a.jsx(o,{value:e.nodeQualifier})}]:[],...e.staleLocalRegistration?[{label:"Registration",value:e.replacedByAgentId?`Superseded by ${e.replacedByAgentId}`:"Historical registration"}]:[],...e.retiredFromFleet?[{label:"Fleet state",value:"Retired"}]:[]],K=[...e.projectRoot?[{label:"Project path",value:a.jsx(o,{value:e.projectRoot})}]:[],...e.cwd?[{label:"Working dir",value:a.jsx(o,{value:e.cwd})}]:[],...e.branch?[{label:"Branch",value:e.branch}]:[],...E?[{label:"Authority node",value:a.jsx(o,{value:E})}]:[],...H?[{label:"Home node",value:a.jsx(o,{value:H})}]:[],...e.ownerId?[{label:"Owner",value:e.ownerName?`${e.ownerName} (${e.ownerId})`:e.ownerId}]:[],...e.conversationId?[{label:"Direct conversation",value:a.jsx(o,{value:e.conversationId})}]:[]],V=[...!k&&e.harness?[{label:"Harness",value:e.harness}]:[],...e.model?[{label:"Model",value:e.model}]:[],...!k&&e.transport?[{label:"Transport",value:m(e.transport)??e.transport}]:[],...e.wakePolicy?[{label:"Wake policy",value:m(e.wakePolicy)??e.wakePolicy}]:[],...e.harnessSessionId?[{label:b?`${b} session`:"Harness session",value:a.jsx(o,{value:e.harnessSessionId})}]:[],...e.harnessLogPath?[{label:"Harness log",value:a.jsx(o,{value:e.harnessLogPath})}]:[],...e.capabilities.length>0?[{label:"Capabilities",value:a.jsx(A,{values:e.capabilities})}]:[],...e.authorityProfile?.readTools.length?[{label:"Broker reads",value:a.jsx(A,{values:e.authorityProfile.readTools})}]:[],...e.authorityProfile?.writeTools.length?[{label:"Broker writes",value:a.jsx(A,{values:e.authorityProfile.writeTools})}]:[],...e.authorityProfile?[{label:"Machine access",value:`shell ${e.authorityProfile.shell?"allowed":"blocked"} · code writes ${e.authorityProfile.codebaseWrites?"allowed":"blocked"}`}]:[],...e.runtimePolicy?.sandbox?[{label:"Sandbox",value:e.runtimePolicy.sandbox}]:[]],G=[{label:"Conversation ID",value:a.jsx(o,{value:t})},...l?.alias?[{label:"Conversation alias",value:a.jsx(o,{value:l.alias})}]:[],...l?.naturalKey?[{label:"Natural key",value:a.jsx(o,{value:l.naturalKey})}]:[],...l?.workspaceRoot?[{label:"Workspace",value:a.jsx(o,{value:l.workspaceRoot})}]:[],...l?.currentBranch?[{label:"Session branch",value:l.currentBranch}]:[],...l?.messageCount!=null?[{label:"Messages",value:String(l.messageCount)}]:[],...l?.lastMessageAt?[{label:"Last message",value:se(l.lastMessageAt)}]:[]];return a.jsxs("div",{className:"s-agent-profile-page",children:[a.jsxs("div",{className:"s-agent-profile-page-topbar",children:[a.jsx(L,{slot:"agent-info",fallback:{view:"conversation",conversationId:t},navigate:s}),a.jsx("button",{type:"button",className:"s-btn",onClick:()=>s({view:"agents-v2",agentId:e.id}),children:"Open in Agents"})]}),y&&a.jsx("p",{className:"s-error",children:y}),a.jsxs("section",{className:"s-agent-profile-hero",children:[a.jsx("div",{className:"s-agent-profile-hero-main",children:a.jsxs("div",{className:"s-agent-profile-hero-title-row",children:[a.jsx("div",{className:"s-avatar s-agent-profile-hero-avatar",style:{background:ee(e.name)},children:e.name[0].toUpperCase()}),a.jsxs("div",{className:"s-agent-profile-hero-copy",children:[a.jsxs("div",{className:"s-agent-casefile-title-meta",children:[a.jsx("span",{className:"s-agent-casefile-record",children:P??W??Z(e.id)??e.id}),D&&a.jsxs("span",{className:`s-agent-state-chip s-agent-state-chip-${X(e.state)}`,children:[a.jsx("span",{className:"s-dot",style:{background:ae(e.state)}}),D]}),e.staleLocalRegistration&&a.jsx("span",{className:"s-agent-state-chip s-agent-state-chip-offline",children:"Superseded registration"})]}),a.jsx("h1",{className:"s-agent-profile-hero-title",children:z}),a.jsxs("div",{className:"s-agent-profile-hero-tags",children:[a.jsx(I,{label:"Project",value:x}),a.jsx(I,{label:"Alias",value:w??"Default"}),a.jsx(I,{label:"Runtime",value:Q||null}),a.jsx(I,{label:"Host",value:e.homeNodeName?.replace(/\.local$/i,"")??null})]}),a.jsxs("p",{className:"s-agent-profile-hero-context",children:[l?.title?`Conversation: ${l.title}.`:"Attached to this conversation.",e.updatedAt?` Updated ${le(e.updatedAt)}.`:""]})]})]})}),a.jsxs("div",{className:"s-agent-profile-hero-actions",children:[a.jsx(ie,{agent:e,navigate:s,returnTo:n}),a.jsx("button",{type:"button",className:"s-btn s-btn-primary",onClick:()=>re(s,{view:"conversation",conversationId:t},{returnTo:n}),children:"Open conversation"})]})]}),a.jsxs("div",{className:"s-agent-profile-grid",children:[a.jsx(j,{title:"Stable alias",subtitle:"Repeatable project identity used to route future work.",items:_,variant:"primary"}),a.jsx(j,{title:"Current conversation",subtitle:"Unique DM/context attached to this page.",items:G}),a.jsx(j,{title:"Runtime instance",subtitle:"Concrete harness state for the current attachment.",items:V}),a.jsx(j,{title:"Location",subtitle:"Where this alias resolves right now.",items:K}),a.jsx(j,{title:"Diagnostics",subtitle:"Broker and provider fields for debugging.",items:q,variant:"secondary"})]}),a.jsx(ne,{title:"Observed harness families",size:"compact",maxAgents:8,maxTasks:4,showEmpty:!0})]})}export{ua as AgentInfoScreen};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,j as m}from"./index-C8uS5szO.js";import{u as a}from"./Provider-5Hotn7NQ.js";import{A as n}from"./AgentLanesView-aAyC7lHf.js";import{l as c,m as l}from"./router-BKiMcYa7.js";import"./api-CaROe5_H.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./time-Dhsh_2EG.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";/* empty css */import"./tail-events-DQ46QBW1.js";import"./observe-CkfOxYx_.js";import"./terminal-sessions-Ch9aYlgi.js";import"./types-B0PlfpKc.js";import"./useEmbedHeadline-BL8wQawZ.js";import"./AgentAvatar-BIwg54Tj.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.js";import"./SessionObserve-DaqDhqDI.js";import"./bash-format-BRV5C6Gv.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./lane-tool-detail-Czggx8oM.js";import"./LaneToolHoverCard-C6YehJqD.js";import"./lane-observe-BD21P8BB.js";import"./lane-ask-display-B6iCAVcd.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./message-markup-DgFSyb3f.js";import"./ObservedTopologyPanel-DkEkQzo-.js";import"./ObserveTextFlow-ET0dD1wO.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./SessionObserveEvidence-Drv-D8Oh.js";import"./message-circle-CSiJj6yo.js";import"./wrench-BsMTSeji.js";import"./external-link-RT4Ph-6-.js";import"./AgentFloorView-l2wNKFob.js";import"./AgentAdventures-NwTKeF0F.js";import"./ReplayClock-B7JLTp8A.js";import"./SproutActionSprite-DveCzg6l.js";/* empty css */import"./CrewSprite-hgpA3SWB.js";import"./agent-lanes-model-CX0wTcnF.js";import"./context-budget-DemtXu7E.js";import"./adventure-playback-DTfkhIc0.js";import"./AdventureScenery-D548O0x4.js";import"./adventure-habitats-v1-M1lcpTJh.js";import"./AdventureReader-ClMxT0e4.js";import"./floor-preview-text-HrORUJ7D.js";/* empty css */import"./book-open-BlJnpf2U.js";import"./scroll-text-DwC8r2g6.js";import"./ReplayLog-DZTpf2CW.js";import"./AdventureEvidence-Dzz9VbuE.js";import"./agent-lane-detail-Db7KyAlf.js";/* empty css */import"./arrow-up-right-Hn754ybA.js";/* empty css */import"./flag-CqdOxVkI.js";import"./pause-DWS7YGQ3.js";import"./play-D_Pggug4.js";import"./radio-C_jtwbFP.js";import"./SharedWorkFloor-yPWFLZwX.js";import"./WorldMinimap-Blqg0d5r.js";import"./WorldSky-DV9bpvXj.js";import"./WorldActorTalk-uIH2jGqA.js";import"./send-to-agent-session-BZGq_ycy.js";import"./FloorExchangePanel-D59nvRCF.js";import"./floor-character-name-CqJPOlXb.js";import"./floor-message-passes-CJh9f8Jp.js";import"./shared-work-artifacts-4IIQXQfc.js";import"./floor-memory-YMM8AlLY.js";import"./CharacterFamilyPreview-CfO3j8Of.js";import"./RenderedWorkerSprite-CvdWO32C.js";import"./FloorMessagePasses-BCwsz9VS.js";import"./WorkRunView-x5PH1byG.js";import"./floor-context-model-DZBpo_oD.js";import"./agent-floor-actor-3v9drnxh.js";import"./SharedFloorCharacter-CSYG_t9t.js";import"./WorldCharacter-Dn4sIXNP.js";import"./RiggedWorkerCharacter-DNe731GE.js";import"./file-code-corner-D_Aptal2.js";import"./FloorReplay-BHo79HCD.js";import"./AgentFloorWorld-BDJmXl3C.js";/* empty css */import"./agent-floor-world-layout-hfMjuoui.js";import"./coffee-C_D9zooM.js";import"./git-branch-CA3cHKCI.js";/* empty css */import"./FloorTacticalHUD-Bngao6sn.js";import"./FloorSavedWork-2tjBoy06.js";import"./pin-DWlD1BOF.js";/* empty css */import"./FloorResourcesSheet-Djrgd_ZU.js";/* empty css */import"./synthetic-agent-routing-aduMYO7P.js";/* empty css */import"./FloorContextSheet-DV-SYA0K.js";import"./lane-roster-store-DzNHP392.js";import"./message-square-NmXWtWLR.js";import"./AgentLanesPreflight-pw2vMO3Q.js";import"./AgentLaneChrome-D9uJ4QY7.js";import"./AgentLaneCard-C6YmwPxQ.js";/* empty css */import"./AgentLaneSummaryResize-BBYBS3DO.js";import"./clipboard-e3fSpeo7.js";import"./agent-lane-card-model-l0stnU9N.js";import"./agent-lane-preview-B8lsQJOQ.js";import"./AgentLaneDetailSheet-KYckCBCX.js";import"./SlidePanel-Datu7XG4.js";import"./LaneTraceDetailSheet-mAhj7MJi.js";import"./LaneTraceEventFocus-WLNZZVi_.js";function p(r){return new URLSearchParams(window.location.search).get(r)?.trim()||null}function ro(){const{agents:r,navigate:o}=a(),e=t.useMemo(()=>c(),[]),s=t.useMemo(()=>l(),[]),i=t.useMemo(()=>({harnessFilter:p("harness"),projectFilter:p("project")}),[]);return m.jsx("div",{className:"s-agent-lanes-embed","data-scout-theme":!0,children:m.jsx(n,{navigate:o,agents:r,embedded:!0,profileId:e,laneSize:s,harnessFilter:i.harnessFilter,projectFilter:i.projectFilter})})}export{ro as AgentLanesEmbedScreen};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{r,j as o}from"./index-C8uS5szO.js";/* empty css */import{a as cn}from"./api-CaROe5_H.js";import{u as Vn}from"./tail-events-DQ46QBW1.js";import{i as _e,o as dn}from"./surface-activity-B1rgWB1i.js";import{u as Gn}from"./observe-CkfOxYx_.js";import{f as Kn}from"./terminal-sessions-Ch9aYlgi.js";import{n as un}from"./agent-state-DDhnFEEP.js";import{S as Un}from"./Provider-5Hotn7NQ.js";import{d as qn}from"./types-B0PlfpKc.js";import{u as Yn}from"./useEmbedHeadline-BL8wQawZ.js";import{A as Zn}from"./AgentAvatar-BIwg54Tj.js";import{h as Xn,S as Jn}from"./SessionObserve-DaqDhqDI.js";import{X as Qn,Y as fn,Z as et,_ as nt,$ as tt,a0 as Qe,a1 as st,a2 as at,a3 as rt,a4 as ot,a5 as it,a6 as Ce,a7 as lt,a8 as ct,a9 as dt,aa as mn,ab as ut,ac as ft,l as hn,m as gn}from"./router-BKiMcYa7.js";import{AgentFloorView as mt}from"./AgentFloorView-l2wNKFob.js";import{u as ht,s as gt,A as pt,a as Lt,L as yt}from"./AgentLanesPreflight-pw2vMO3Q.js";import{AgentLaneChrome as bt}from"./AgentLaneChrome-D9uJ4QY7.js";import{AgentLaneCard as vt}from"./AgentLaneCard-C6YmwPxQ.js";import{a as St}from"./agent-lane-card-model-l0stnU9N.js";import{c as kt}from"./agent-lane-detail-Db7KyAlf.js";import{i as xt,A as wt}from"./AgentLaneDetailSheet-KYckCBCX.js";import{LaneTraceDetailSheet as Et}from"./LaneTraceDetailSheet-mAhj7MJi.js";import{readStoredLaneSummaryHeight as Nt,useLaneSummaryResize as Rt,AgentLaneSummaryResizeHandle as jt}from"./AgentLaneSummaryResize-BBYBS3DO.js";import{A as he,l as X,k as Ct,m as pn,n as It,e as At,g as Tt,p as _t,r as Pt,d as Ln,D as Dt,h as Mt,i as zt}from"./agent-lanes-model-CX0wTcnF.js";import{i as Ot,c as $t,n as en}from"./keyboard-nav-CXfav14z.js";import{p as nn}from"./lane-roster-store-DzNHP392.js";function Pe(e){return[e.source,e.sessionId,e.ts,e.kind,e.summary].join("\0")}function Ft(e){const n=new Set,t=[];for(const s of e){const i=Pe(s);n.has(i)||(n.add(i),t.push(s))}return t}function Wt(e,n){return e.length<=n?e:[...e].sort((t,s)=>t.ts-s.ts).slice(e.length-n)}function Ht(e,n,t){const s=Pe(n);for(const l of e)if(Pe(l)===s)return e;const i=[...e,n];return i.length>t?i.slice(i.length-t):i}function Bt(e,n,t){return Wt(Ft([...n,...e]),t)}const Vt=500;function Ie(e){return typeof e=="number"&&Number.isFinite(e)&&e>0?Math.floor(e):null}function Gt(e){return JSON.stringify([Ie(e.recentLimit),e.includeTranscriptReplay,Ie(e.recentWindowMs),e.discoveryScope??null,Ie(e.discoveryLimit)])}function Kt(e,n){return e==="error"||n==="error"}function Ut(e,n){return n?Math.min(e,Vt):e}async function qt(e){const n=await e.load(!1);if(e.publish(n,"live"),e.markReady(),!e.includeTranscriptReplay)return{replay:"not-requested"};try{return e.publish(await e.load(!0),"replay"),{replay:"loaded"}}catch{return{replay:"failed"}}}function Yt(e){return e.discovery==="error"||e.recent==="error"?e.discoveryLoaded&&e.recentLoaded?"degraded":"blank":"none"}const Zt=500,Xt=6e4;function Jt(){return{generatedAt:Date.now(),processes:[],transcripts:[],totals:{total:0,scoutManaged:0,hudsonManaged:0,unattributed:0,transcripts:0}}}async function Qt(e,n,t){const s=new URLSearchParams({limit:String(e)});return n&&s.set("transcripts","true"),typeof t=="number"&&Number.isFinite(t)&&t>0&&s.set("windowMs",String(Math.floor(t))),(await cn(`/api/tail/recent?${s.toString()}`)).events??[]}function es(e,n){const t=new URLSearchParams;e&&t.set("scope",e),typeof n=="number"&&Number.isFinite(n)&&n>0&&t.set("limit",String(Math.floor(n)));const s=t.toString();return s?`/api/tail/discover?${s}`:"/api/tail/discover"}function ns(e){const n=e?.recentLimit??Zt,t=e?.enabled??!0,s=e?.discoveryIntervalMs??Xt,i=e?.includeTranscriptReplay??!1,l=e?.discoveryScope,f=e?.discoveryLimit,b=e?.recentWindowMs,u=e?.pauseWhenHidden??!1,d=Gt({recentLimit:n,includeTranscriptReplay:i,recentWindowMs:b,discoveryScope:l,discoveryLimit:f}),[m,c]=r.useState(null),[g,p]=r.useState([]),[v,w]=r.useState({discovery:"loading",recent:"loading",discoveryLoaded:!1,recentLoaded:!1}),P=r.useRef("loading"),L=r.useRef("idle"),R=r.useRef(null),C=r.useRef(null),S=r.useRef(0);Vn(y=>{p(k=>Ht(k,y,n))},t);const D=r.useCallback((y=!1)=>{if(!t||u&&!y&&!_e())return Promise.resolve();y&&(P.current="loading",w(j=>({...j,recent:"loading"})));const k=d,x=C.current;if(x?.key===k)return x.promise;const A=++S.current;L.current=i?"loading":"ready";let z;return z=qt({includeTranscriptReplay:i,load:j=>Qt(j?n:Ut(n,i),j,b),publish:(j,H)=>{if(A!==S.current)return;const V=()=>{p(F=>Bt(F,j,n))};H==="replay"?r.startTransition(V):V()},markReady:()=>{A===S.current&&(P.current="ready",w(j=>({...j,recent:"ready",recentLoaded:!0})))}}).then(j=>{A===S.current&&(i&&(L.current=j.replay==="failed"?"error":"ready"),j.replay!=="failed"&&(R.current=d))}).catch(()=>{A===S.current&&(P.current="error",i&&(L.current="error"),w(j=>({...j,recent:"error"})))}).finally(()=>{C.current?.promise===z&&(C.current=null)}),C.current={key:k,promise:z},z},[t,d,i,u,n,b]),I=r.useCallback(async(y=!1)=>{if(t&&!(u&&!y&&!_e())){y&&w(k=>({...k,discovery:"loading"}));try{const k=await cn(es(l,f));c(k),w(x=>({...x,discovery:"ready",discoveryLoaded:!0})),Kt(P.current,L.current)&&D()}catch{c(k=>k??Jt()),w(k=>({...k,discovery:"error"}))}}},[f,l,t,u,D]),M=r.useCallback(async()=>{await Promise.all([I(!0),D(!0)])},[I,D]);return r.useEffect(()=>{if(!t)return;let y=!1,k=!0;const x=()=>{y||I(k),k=!1};x();const A=setInterval(x,s),z=u?dn(x):null;return()=>{y=!0,clearInterval(A),z?.()}},[s,t,u,I]),r.useEffect(()=>{t||(S.current+=1,C.current=null,R.current=null,L.current="idle")},[t]),r.useEffect(()=>{t&&R.current!==d&&D(!0)},[t,d,D]),{discovery:m,events:g,loadState:v,refreshDiscovery:I,retryInitialLoad:M}}function ts({lanes:e,inspectedLaneId:n,onInspect:t,onHorizonChange:s,onTogglePin:i}){const[l,f]=r.useState(-1),b=r.useRef(new Map);r.useEffect(()=>{if(l<0)return;if(l>=e.length){f(e.length-1);return}const m=e[l];if(!m)return;const c=b.current.get(m.id);c?.scrollIntoView({block:"nearest",inline:"nearest"}),c?.focus()},[l,e]),r.useEffect(()=>{n||l>=e.length&&f(e.length>0?e.length-1:-1)},[l,n,e.length]);const u=r.useCallback((m,c)=>{c?b.current.set(m,c):b.current.delete(m)},[]);r.useEffect(()=>{const m=c=>{if(!document.querySelector(".s-agent-lanes")||Ot(c.target)||$t()||n||e.length===0)return;const g=Number(c.key)-1;if(!c.metaKey&&!c.ctrlKey&&!c.altKey&&g>=0&&g<he.length){c.preventDefault(),s(he[g].key);return}if(c.key==="ArrowDown"||c.key==="j"){c.preventDefault(),f(p=>en(p,e.length,1));return}if(c.key==="ArrowUp"||c.key==="k"){c.preventDefault(),f(p=>en(p,e.length,-1));return}if(c.key==="Home"||c.key==="g"&&!c.shiftKey){c.preventDefault(),f(0);return}if(c.key==="End"||c.key==="G"){c.preventDefault(),f(e.length-1);return}if(c.key==="Enter"||c.key==="i"){const p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),t(v);return}if(c.key.toLowerCase()==="p"&&i){const p=l<0?0:l,v=e[p];if(!v)return;c.preventDefault(),f(p),i(v)}};return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[l,n,e,s,t,i]);const d=r.useCallback((m,c)=>({"data-cursor":l===m?!0:void 0,tabIndex:l===m?0:-1,ref:g=>u(c,g),onFocus:()=>f(m)}),[l,u]);return{focusedIndex:l,getLaneFocusProps:d}}function ss(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function me(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function yn(e,n){if(!n)return!0;const t=me(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=ss(i);return l===n||me(i)===t||!!(f&&(f.toLowerCase()===n||me(f)===t))})}function as(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.harness,s.definitionId,i?.attribution,l],t)}function rs(e,n){const t=n?.trim().toLowerCase()||null,{agent:s,facts:i,source:l}=e;return yn([s.project,s.projectRoot,s.cwd,i?.cwd,X(s,l)],t)}function os(e){return un(e.agent.state??null,e.agent)==="needs_attention"?!0:Xn(e.observe?.events??[])}function tn(e,n,t,s){return fn(t?.width??e.laneWidths[n.id],s??e.defaultLaneWidth)}function is(e,n){switch(e.kind){case"session":return n.filter(t=>t.id===e.sessionId);case"harness":return n.filter(t=>as(t,e.harness));case"project":return n.filter(t=>rs(t,e.projectPath));case"attention":return n.filter(t=>os(t));default:return[]}}function sn(e,n,t){n.has(t.lane.id)||(n.add(t.lane.id),e.push({key:t.slot?`${t.slot.id}:${t.lane.id}`:t.lane.id,lane:t.lane,widthPx:t.widthPx,zone:t.zone,position:t.position,slotId:t.slot?.id,laneDefId:t.laneDef?.id,isPinned:t.zone!=="main"}))}function Ae(e){return[...e].sort((n,t)=>{const s=et(n.zone,t.zone);return s!==0?s:n.position!==t.position?n.position-t.position:n.lane.id.localeCompare(t.lane.id)})}function ls(e){const{autoLanes:n,deck:t,defaultWidthTier:s}=e,i=new Set,l=[],f=[],b=[],u=new Map(t.laneDefs.map(g=>[g.id,g]));for(const g of Qn(t.slots)){const p=u.get(g.laneDefId);if(!p)continue;const v=is(p,n),w=g.zone==="pinned_left"?l:g.zone==="pinned_right"?b:f;for(const P of v)sn(w,i,{lane:P,zone:g.zone,position:g.position,widthPx:tn(t,P,g,s),slot:g,laneDef:p})}if(t.showAutoLanes){let g=0;for(const p of n)i.has(p.id)||(sn(f,i,{lane:p,zone:"main",position:g,widthPx:tn(t,p,void 0,s)}),g+=1)}const d=Ae(l),m=Ae(f),c=Ae(b);return{pinnedLeft:d,main:m,pinnedRight:c,flat:[...d,...m,...c]}}function cs(e){return e.slots.some(n=>n.laneDefId===tt)}function fe(e,n){const t=`harness:${me(n)}`;return e.slots.some(s=>s.laneDefId===t)}function ds(e,n){const t=nt(n);return e.slots.some(s=>s.laneDefId===t)}function us(e,n,t){const[s,i]=r.useState(()=>Qe(e,n));r.useEffect(()=>{i(Qe(e,n))},[n,e]);const l=r.useCallback(L=>{st(L),i(L)},[]),f=r.useMemo(()=>ls({autoLanes:t,deck:s,defaultWidthTier:n}),[t,s,n]),b=r.useCallback((L,R="pinned_left")=>{l(at(s,{laneId:L.id,title:X(L.agent,L.source),zone:R,width:s.laneWidths[L.id]}))},[s,l]),u=r.useCallback(L=>{l(rt(s,L))},[s,l]),d=r.useCallback((L,R)=>{l(ot(s,L,R))},[s,l]),m=r.useCallback(L=>{l(it(s,L))},[s,l]),c=r.useCallback((L,R)=>{l(Ce(s,{kind:"harness",title:R??`${L} sessions`,harness:L,zone:"pinned_left",width:s.defaultLaneWidth}))},[s,l]),g=r.useCallback((L,R)=>{const C=L.trim();if(!C)return;const S=R?.trim()||C.split(/[\\/]/u).filter(Boolean).pop()||C;l(Ce(s,{kind:"project",title:S,projectPath:C,zone:"main",width:s.defaultLaneWidth}))},[s,l]),p=r.useCallback(()=>{l(Ce(s,{kind:"attention",title:"Needs attention",zone:"pinned_left",width:"sm"}))},[s,l]),v=r.useCallback(()=>{l(lt(s))},[s,l]),w=r.useCallback(L=>ct(s,L),[s]),P=r.useCallback(L=>dt(s,L),[s]);return{deck:s,layout:f,pinLane:b,unpinLane:u,setLaneWidth:d,setDefaultLaneWidth:m,addHarnessLane:c,addAttentionLane:p,addProjectLane:g,clearPins:v,isPinned:w,pinnedZone:P}}function fs(e){const[n,t]=r.useState(null),s=r.useRef({laneId:"",x:0,width:512}),i=r.useRef(512),l=r.useCallback((u,d,m)=>{d.preventDefault(),d.stopPropagation(),d.currentTarget.setPointerCapture(d.pointerId),s.current={laneId:u,x:d.clientX,width:m},i.current=m,t(u),document.body.classList.add("s-agent-lanes--resizing-width")},[]),f=r.useCallback(()=>{t(u=>{if(u){document.body.classList.remove("s-agent-lanes--resizing-width");const d=mn(i.current);e(s.current.laneId,d.tier??d.px)}return null})},[e]);r.useEffect(()=>{if(!n)return;const u=m=>{const c=m.clientX-s.current.x;i.current=Math.min(ut,Math.max(ft,s.current.width+c));const g=document.querySelector(`[data-lane-id="${s.current.laneId}"]`);g&&g.style.setProperty("--lane-width",`${i.current}px`)},d=()=>f();return window.addEventListener("pointermove",u),window.addEventListener("pointerup",d),window.addEventListener("pointercancel",d),()=>{window.removeEventListener("pointermove",u),window.removeEventListener("pointerup",d),window.removeEventListener("pointercancel",d)}},[f,n]);const b=r.useCallback((u,d)=>{e(u,d),document.querySelector(`[data-lane-id="${u}"]`)?.style.removeProperty("--lane-width")},[e]);return{beginResize:l,resetLaneWidth:b,resizingLaneId:n}}const an=[{key:"lanes",label:"lanes"},{key:"grid",label:"grid"},{key:"floor",label:"floor"}],ms=[{key:"auto",label:"auto"},{key:"2",label:"2"},{key:"3",label:"3"},{key:"4",label:"4"}];function hs(e,n=!1){return e==="grid"?"grid":e==="floor"?n?"lanes":"floor":"lanes"}function gs(e){return e==="2"||e==="3"||e==="4"?e:"auto"}function ps(e){return e?an.filter(n=>n.key!=="floor"):an}const bn="openscout:agent-lanes-horizon",vn="openscout:agent-lanes-layout",Sn="openscout:agent-lanes-grid-columns",kn="openscout:agent-lanes-technical-rollup",Ls=`${kn}:lane:`,ys="openscout:agent-lanes-scroll",bs=96,vs=160,Ss=6e4,ks=6e4,xs=3e4,ws=3e4,Es=3e4,Ns=12e4,Rs=["pinned-left","main","pinned-right"];function rn(){return!_e()}function xn(e,n){return`${ys}:${e}:${n}`}function js(e,n){try{const t=sessionStorage.getItem(xn(e,n)),s=t?Number.parseFloat(t):0;return Number.isFinite(s)&&s>0?s:0}catch{return 0}}function Cs(e,n,t){try{sessionStorage.setItem(xn(e,n),String(Math.max(0,Math.round(t))))}catch{}}function Is(){try{const e=sessionStorage.getItem(bn);if(e&&he.some(n=>n.key===e))return e}catch{}return Dt}function As(e){try{const n=sessionStorage.getItem(vn);return hs(n,e)}catch{}return"lanes"}function on(e){const n=As(e);return n==="floor"?"lanes":n}function Ts(){try{return gs(sessionStorage.getItem(Sn))}catch{return"auto"}}function _s(){try{const e=sessionStorage.getItem(kn);if(e==="0")return!1;if(e==="1")return!0}catch{}return null}function wn(e){return`${Ls}${encodeURIComponent(e)}`}function ln(e){try{const n=sessionStorage.getItem(wn(e));if(n==="0")return!1;if(n==="1")return!0}catch{}return _s()??!1}function Ps(e,n){try{sessionStorage.setItem(wn(e),n?"1":"0")}catch{}}function Ds(e,n){const t=r.useRef(new Map),s=r.useRef({}),i=r.useCallback((u,d=t.current.get(u))=>{if(!d)return;const m=s.current[u]??js(e,u);if(m<=0)return;const c=Math.max(0,d.scrollWidth-d.clientWidth),g=Math.min(m,c);Math.abs(d.scrollLeft-g)>1&&(d.scrollLeft=g)},[e]),l=r.useCallback(()=>{for(const u of Rs)i(u)},[i]);r.useLayoutEffect(()=>{l();const u=window.requestAnimationFrame(l);return()=>window.cancelAnimationFrame(u)},[e,l,n]);const f=r.useCallback((u,d)=>{if(!d){t.current.delete(u);return}t.current.set(u,d),i(u,d)},[i]);return{handleLaneScroll:r.useCallback((u,d)=>{const m=d.currentTarget.scrollLeft;s.current[u]=m,Cs(e,u,m)},[e]),setLaneScrollNode:f}}function Ms({issue:e}){const n=e.agentNames?.length?e.agentNames.join(", "):e.agentIds?.join(", "),t=e.transcriptPaths?.join(" · "),s=[n,t].filter(Boolean).join(" · ");return o.jsxs("li",{className:"s-agent-lanes-issues-item",children:[o.jsx("span",{className:"s-agent-lanes-issues-kind",children:e.kind.replaceAll("_"," ")}),o.jsx("span",{className:"s-agent-lanes-issues-message",children:e.message}),s?o.jsx("span",{className:"s-agent-lanes-issues-detail",children:s}):null]})}function zs({loadState:e,onRetry:n}){const t=[e.discovery==="error"?"session discovery":"",e.recent==="error"?"recent history":""].filter(Boolean).join(" and "),s=e.recent==="error"?"Recent activity could not be loaded":"Session discovery could not be completed";return o.jsx("div",{className:"s-agent-lanes-empty s-agent-lanes-empty--degraded",role:"alert",children:o.jsxs("div",{className:"s-agent-lanes-empty-card",children:[o.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[o.jsx("span",{className:"s-agent-lanes-empty-kicker",children:"Tail incomplete"}),o.jsx("h2",{children:s}),o.jsxs("p",{children:["Scout could not finish ",t||"the tail scan",", so this is not being treated as a quiet interval."]}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:"Live events can still arrive while Scout retries."})]}),o.jsx("div",{className:"s-agent-lanes-empty-actions",children:o.jsx("button",{type:"button",onClick:n,children:"Retry tail scan"})})]})})}function Os({activeFilterLabel:e,horizon:n,horizonLabel:t,showAutoLanes:s,onHorizonChange:i,onAddAttentionLane:l,onAddCodexLane:f,sourceCount:b,eventCount:u,degraded:d=!1,onRetry:m}){const c=!!e,g=c?"No matching lanes":s?`No activity in the last ${t}`:"No pinned lanes",p=c?`${e} has no activity in the last ${t}.`:s?`Scout checked ${b.toLocaleString()} session source${b===1?"":"s"} and ${u.toLocaleString()} recent tail event${u===1?"":"s"}; nothing is active in this interval.`:"Automatic lanes are off, and this deck has no pinned sessions.",v=d?"The last tail refresh failed, so this reading is from the previous scan and may be behind.":s?"Scout will keep listening. New turns and tool output will appear here automatically.":"Pin a session lane or turn automatic lanes back on to populate the deck.",w=n==="5m"?"30m":n==="24h"?null:"24h";return o.jsx("div",{className:"s-agent-lanes-empty",role:"status","aria-live":"polite",children:o.jsxs("div",{className:"s-agent-lanes-empty-card",children:[o.jsxs("div",{className:"s-agent-lanes-empty-rail","aria-hidden":"true",children:[o.jsx("span",{}),o.jsx("span",{}),o.jsx("span",{})]}),o.jsxs("div",{className:"s-agent-lanes-empty-copy",children:[o.jsx("span",{className:"s-agent-lanes-empty-kicker",children:d?"Tail refresh behind":c?"Filter checked":s?"Tail scanned":"Lane deck ready"}),o.jsx("h2",{children:g}),o.jsx("p",{children:p}),o.jsx("p",{className:"s-agent-lanes-empty-secondary",children:v})]}),o.jsxs("div",{className:"s-agent-lanes-empty-actions",children:[d&&m?o.jsx("button",{type:"button",onClick:m,children:"Retry tail scan"}):null,w?o.jsxs("button",{type:"button",onClick:()=>i(w),children:["Look back ",pn(w)]}):null,o.jsx("button",{type:"button",onClick:l,children:"Show attention"}),o.jsx("button",{type:"button",onClick:f,children:"Pin Codex sessions"})]})]})})}function $s({lane:e,widthPx:n,laneTitle:t,pinned:s,laneWidth:i,defaultWidth:l,isNew:f,nowMs:b,traceWindowMs:u,traceWindowLabel:d,summaryHeight:m,onSummaryResizeStart:c,onSummaryResizeReset:g,summaryResizing:p,onInspect:v,onTraceEventSelect:w,onTogglePin:P,onWidthChange:L,onWidthResizeStart:R,widthResizing:C,focusProps:S,operatorName:D,grid:I=!1}){const{agent:M,observe:y,source:k}=e,x=zt(y),A=!!y,z=x?" s-agent-lane--live":"",j=f?" s-agent-lane--new":"",[H,V]=r.useState(!0),[F,J]=r.useState(()=>ln(e.id)),Q=r.useRef(e.id);r.useEffect(()=>{if(Q.current!==e.id){Q.current=e.id,J(ln(e.id));return}Ps(e.id,F)},[F,e.id]);const Le=S?.ref,G=S?{"data-cursor":S["data-cursor"],tabIndex:S.tabIndex,onFocus:S.onFocus}:void 0,K=()=>o.jsx("section",{className:"s-agent-lane-trace","aria-label":`${X(M,k)} trace`,children:o.jsx("div",{className:"s-agent-lane-body",children:A?o.jsx(Jn,{data:y??void 0,agentId:e.source==="scout"?M.id:void 0,sessionId:M.harnessSessionId,showRail:!1,variant:"lane",nowMs:b,traceWindowMs:u,traceWindowLabel:d,laneCollapseTechnicalEvents:F,onLaneCollapseTechnicalEventsChange:J,laneOperatorName:D,onLaneEventSelect:W=>w(e,W)}):o.jsx("div",{className:"s-agent-lane-empty",children:"Waiting for trace activity…"})})}),O=r.useMemo(()=>St(e,{isLive:x,nowMs:b}),[e,x,b]),U=r.useMemo(K,[A,y,e.source,M.id,M.harnessSessionId,b,u,d,F,D,w,e]);return o.jsxs("article",{ref:Le,"data-lane-id":e.id,className:`s-agent-lane${I?" s-agent-lane--grid":""}${z}${j}${s?" s-agent-lane--pinned":""}${S?.["data-cursor"]?" s-agent-lane--cursor":""}`,style:I?void 0:{"--lane-width":`${n}px`},...G,children:[o.jsx(bt,{title:t,width:i,defaultWidth:l,pinned:s,onTogglePin:P,onWidthChange:L,onResizeStart:R,resizing:C,statusLabel:Ln(M,k),live:x,widthControls:!I}),o.jsx(vt,{model:O,avatar:o.jsx(Zn,{agent:M,placement:"row",size:44,presence:!1,tile:!1}),collapsed:H,cockpitHeight:H?void 0:m,onToggleCollapsed:()=>V(W=>!W),onOpen:()=>v(e)}),!H&&o.jsx(jt,{onResizeStart:c,onReset:g,active:p}),U]})}function Fs({navigate:e,agents:n,data:t,embedded:s=!1,laneSize:i="lg",profileId:l,harnessFilter:f,projectFilter:b}){Yn("Lanes",s);const u=r.useContext(Un),d=t?.agents??n??u?.agents??[],m=t?.operatorName?.trim()||u?.onboarding?.operatorName?.trim()||void 0,c=l??hn(),g=i??gn(),p=!s&&u?.route.view==="ops"&&u.route.mode==="world",[v,w]=r.useState(Date.now()),[P,L]=r.useState("4h"),[R,C]=r.useState(Is),[S,D]=r.useState(()=>p?"floor":on(s)),[I,M]=r.useState(Ts),y=p,k=!p&&S==="grid",x=y?P:R,[A,z]=r.useState(Nt),[j,H]=r.useState([]),{beginResize:V,resetSummaryHeight:F,resizing:J}=Rt(z),Q=r.useCallback(a=>V(a,A),[V,A]),Le=Mt(),G=Ct(x),K=ns({enabled:!t,includeTranscriptReplay:!0,discoveryIntervalMs:s?Ss:ks,recentLimit:Le,recentWindowMs:G,discoveryLimit:s?bs:vs,pauseWhenHidden:!0}),O=t?.discovery??K.discovery,U=t?.tailEvents??K.events,W=t?.loadState??K.loadState,De=t?.retryInitialLoad??K.retryInitialLoad,Me=t?.terminalSessions??j,En={view:"ops",mode:p?"world":"lanes"},q=pn(x),ze=s?xs:1e4,Oe=s?ws:1e4;r.useEffect(()=>{const a=setInterval(()=>{rn()||w(Date.now())},ze);return()=>clearInterval(a)},[ze]),r.useEffect(()=>{if(t)return;let a=!1;const h=async()=>{if(!rn())try{const Re=await Kn({includeDiscovered:!1});a||H(Re)}catch{a||H([])}};h();const N=setInterval(()=>{h()},Oe),_=dn(()=>{h()});return()=>{a=!0,clearInterval(N),_()}},[t,Oe]),r.useEffect(()=>{try{sessionStorage.setItem(bn,R)}catch{}},[R]),r.useEffect(()=>{D(p?"floor":a=>a==="floor"?on(s):a)},[p,s]),r.useEffect(()=>{if(S!=="floor")try{sessionStorage.setItem(vn,S)}catch{}},[S]),r.useEffect(()=>{try{sessionStorage.setItem(Sn,I)}catch{}},[I]);const Nn=r.useRef(It()),$e=r.useRef(""),[se,Fe]=r.useState(()=>new Set),[ye,We]=r.useState(null),Rn=r.useMemo(()=>d.filter(a=>At(a,v,x)),[d,v,x]),jn=Gn(Rn,{enabled:!t,activeIntervalMs:s?Es:void 0,idleIntervalMs:s?Ns:void 0,pauseWhenHidden:!0}),He=t?.observeCache??jn,Be=Yt(W),Ve=Be==="blank",Cn=Be==="degraded",Ge=O?.totals.transcripts??O?.transcripts?.length??0;r.useEffect(()=>{if(se.size===0)return;const a=setTimeout(()=>Fe(new Set),900);return()=>clearTimeout(a)},[se]);const{lanes:ae,issues:$,freshLaneIds:be}=r.useMemo(()=>{const a=Tt({transcripts:O?.transcripts??[],tailEvents:U,processes:O?.processes??[],scoutAgents:d,terminalSessions:Me,observeCache:He,now:v,workingOnly:!0,horizon:x}),h=_t(a.lanes,Nn.current),N=[...Pt(O),...a.issues];return{lanes:h.lanes,issues:N,freshLaneIds:h.newLaneIds}},[O,U,d,Me,He,v,x]);r.useEffect(()=>{const a=$.map(h=>`${h.id}\0${h.message}`).join(`
|
|
2
|
-
`);a!==$e.current&&($e.current=a,$.length!==0&&console.warn(`[agent-lanes] ${$.length} roster issue${$.length===1?"":"s"}`,$))},[$]),r.useEffect(()=>{be.length!==0&&Fe(a=>{const h=new Set(a);for(const N of be)h.add(N);return h})},[be.join("\0")]);const ee=r.useMemo(()=>ae.find(a=>a.id===ye)??null,[ye,ae]),ve=r.useMemo(()=>ae.filter(a=>Hs(a,{harnessFilter:f,projectFilter:b})),[ae,f,b]),In=r.useCallback(a=>Bs(a,{harnessFilter:f,projectFilter:b}),[f,b]),{deck:T,layout:E,pinLane:re,unpinLane:oe,setLaneWidth:Se,addHarnessLane:ne,addAttentionLane:Ke,addProjectLane:An,clearPins:Tn,isPinned:ie}=us(c,g,ve),{beginResize:Ue,resizingLaneId:qe}=fs(Se),ke=r.useMemo(()=>Vs({harnessFilter:f,projectFilter:b}),[f,b]),xe=r.useMemo(()=>ee?kt(ee):null,[ee]),_n=r.useMemo(()=>xe?ds(T,xe):!1,[T,xe]),Pn=r.useMemo(()=>[E.pinnedLeft,E.main,E.pinnedRight].map(a=>a.map(h=>`${h.key}:${h.widthPx}`).join(",")).join("/"),[E.main,E.pinnedLeft,E.pinnedRight]),{handleLaneScroll:Y,setLaneScrollNode:Z}=Ds(c,Pn),Dn=r.useCallback(a=>{Z("pinned-left",a)},[Z]),Mn=r.useCallback(a=>{Z("main",a)},[Z]),zn=r.useCallback(a=>{Z("pinned-right",a)},[Z]),On=r.useCallback(a=>{Y("pinned-left",a)},[Y]),$n=r.useCallback(a=>{Y("main",a)},[Y]),Fn=r.useCallback(a=>{Y("pinned-right",a)},[Y]),te=E.flat,we=E.pinnedLeft.length+E.pinnedRight.length,le=y?ve.length:te.length,ce=ht(gt(W,le),Ve?0:yt);r.useEffect(()=>{if(y)return;const a=te.map(h=>{const{lane:N}=h;return{id:N.id,label:X(N.agent,N.source),statusLabel:Ln(N.agent,N.source),tone:un(N.agent.state,N.agent),agentId:xt(N.agent)?void 0:N.agent.id,updatedAt:N.lastActiveAt>0?N.lastActiveAt:void 0}});nn(a)},[te,y]),r.useEffect(()=>()=>nn(null),[]);const[Ye,Ee]=r.useState(null),Ne=r.useCallback(a=>{We(a.id)},[]),Ze=r.useCallback((a,h)=>{Ee({lane:a,event:h})},[]),Wn=r.useCallback(a=>{const h=a.observe?.events.at(-1);h&&Ee({lane:a,event:h})},[]),Hn=r.useCallback(a=>{ie(a.id)?oe(a.id):re(a)},[ie,re,oe]),{getLaneFocusProps:Xe}=ts({lanes:te.map(a=>a.lane),inspectedLaneId:ye,onInspect:Ne,onHorizonChange:C,onTogglePin:Hn}),[de,B]=r.useState(!1),Je=r.useRef(null);r.useEffect(()=>{if(!de)return;const a=h=>{Je.current?.contains(h.target)||B(!1)};return window.addEventListener("pointerdown",a),()=>window.removeEventListener("pointerdown",a)},[de]);const ue=r.useCallback((a,h,N=!1)=>{const{lane:_}=a,Re=X(_.agent,_.source),Bn=T.laneWidths[_.id]??mn(a.widthPx).tier??a.widthPx;return o.jsx($s,{lane:_,widthPx:a.widthPx,laneTitle:Re,pinned:a.isPinned,laneWidth:Bn,defaultWidth:T.defaultLaneWidth,isNew:se.has(_.id),nowMs:v,traceWindowMs:G,traceWindowLabel:q,summaryHeight:A,onSummaryResizeStart:Q,onSummaryResizeReset:F,summaryResizing:J,onInspect:Ne,onTraceEventSelect:Ze,onTogglePin:()=>{ie(_.id)?oe(_.id):re(_)},onWidthChange:je=>Se(_.id,je),onWidthResizeStart:je=>Ue(_.id,je,a.widthPx),widthResizing:qe===_.id,focusProps:Xe(h,_.id),operatorName:m,grid:N},a.key)},[Ue,T.defaultLaneWidth,T.laneWidths,Xe,Q,q,Ne,Ze,ie,m,se,v,re,F,qe,Se,A,J,G,oe]);return o.jsxs("div",{className:`s-agent-lanes${s?" s-agent-lanes--embedded s-agent-lanes--low-motion":""}`,"data-lane-profile":c,"data-lane-layout":y?"floor":S,"data-lanes-deck-version":"1",children:[o.jsxs("div",{className:"s-agent-lanes-bar",children:[o.jsxs("div",{className:"s-agent-lanes-bar-leading",children:[o.jsx("div",{className:"s-agent-lanes-title",children:y?"World":"Agent Lanes"}),o.jsxs("div",{className:"s-agent-lanes-meta","aria-label":"Lane deck status",children:[o.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[le," ",y?"actors":"live"]}),!y&&we>0?o.jsxs("span",{className:"s-agent-lanes-meta-stat",children:[we," pinned"]}):null,o.jsx("span",{className:"s-agent-lanes-meta-stat",children:y?`history 15m · actors ${q}`:`trace ${q}`}),ke?o.jsx("span",{className:"s-agent-lanes-meta-filter",children:ke}):null,o.jsxs("span",{className:"s-agent-lanes-meta-detail",children:["deck v1 · ",c]})]})]}),o.jsxs("div",{className:"s-agent-lanes-bar-controls",children:[o.jsx("div",{className:"s-agent-lanes-layouts",role:"group","aria-label":"Lane layout",children:ps(s).map(a=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${S===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":a.key==="floor"?y:!y&&S===a.key,onClick:()=>{D(a.key),a.key==="floor"?e({view:"ops",mode:"world"}):p&&e({view:"ops",mode:"lanes"})},children:a.label},a.key))}),k?o.jsx("div",{className:"s-agent-lanes-grid-density",role:"group","aria-label":"Grid columns",children:ms.map(a=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${I===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":I===a.key,title:a.key==="auto"?"Fit columns to the available width":`${a.key} columns`,onClick:()=>M(a.key),children:a.label},a.key))}):null,o.jsxs("div",{className:"s-agent-lanes-deck-menu",ref:Je,hidden:y,children:[o.jsx("button",{type:"button",className:"s-agent-lanes-deck-btn","aria-expanded":de,onClick:()=>B(a=>!a),children:"+ Lane"}),de?o.jsxs("div",{className:"s-agent-lanes-deck-popover",role:"menu",children:[o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{Ke(),B(!1)},disabled:cs(T),children:"Needs attention"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("codex","Codex sessions"),B(!1)},disabled:fe(T,"codex"),children:"Codex sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("claude","Claude sessions"),B(!1)},disabled:fe(T,"claude"),children:"Claude sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("grok","Grok sessions"),B(!1)},disabled:fe(T,"grok"),children:"Grok sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item",onClick:()=>{ne("kimi","Kimi sessions"),B(!1)},disabled:fe(T,"kimi"),children:"Kimi sessions"}),o.jsx("button",{type:"button",role:"menuitem",className:"s-agent-lanes-deck-item s-agent-lanes-deck-item--danger",onClick:()=>{Tn(),B(!1)},disabled:we===0,children:"Clear pinned lanes"})]}):null]}),o.jsx("div",{className:"s-agent-lanes-horizons",role:"group","aria-label":y?"Map activity window":"Activity window",children:he.map((a,h)=>o.jsx("button",{type:"button",className:`s-agent-lanes-horizon${x===a.key?" s-agent-lanes-horizon--on":""}`,"aria-pressed":x===a.key,title:`${a.label} window (${h+1})`,onClick:()=>y?L(a.key):C(a.key),children:a.label},a.key))})]})]}),t==null&&$.length>0?o.jsxs("div",{className:"s-agent-lanes-issues",role:"status","aria-live":"polite",children:[o.jsxs("div",{className:"s-agent-lanes-issues-head",children:[o.jsx("span",{className:"s-agent-lanes-issues-badge",children:"Roster issues"}),o.jsxs("span",{className:"s-agent-lanes-issues-meta",children:[$.length," fleet/transcript warning",$.length===1?"":"s"," — lanes follow tail, not agent registry"]})]}),o.jsx("ul",{className:"s-agent-lanes-issues-list",children:$.map(a=>o.jsx(Ms,{issue:a},a.id))})]}):null,le===0?ce.visible?o.jsx(pt,{discovery:O,discoveryPhase:W.discovery,windowMs:G,nowMs:v,layout:y?"none":k?"grid":"scroll",gridColumns:I,laneWidthPx:fn(T.defaultLaneWidth,T.defaultLaneWidth),matchTranscript:In}):Ve?o.jsx(zs,{loadState:W,onRetry:()=>{De()}}):o.jsx(Os,{activeFilterLabel:ke,horizon:R,horizonLabel:q,showAutoLanes:T.showAutoLanes,onHorizonChange:C,onAddAttentionLane:Ke,onAddCodexLane:()=>ne("codex","Codex sessions"),sourceCount:Ge,eventCount:U.length,degraded:Cn,onRetry:()=>{De()}}):y?o.jsx(mt,{lanes:ve,now:v,onOpenTrace:Wn,railLedger:!0,operatorName:m}):k?o.jsx("div",{className:"s-agent-lanes-grid","data-grid-columns":I,role:"listbox","aria-label":"Agent lane grid",children:te.map((a,h)=>ue(a,h,!0))}):o.jsxs("div",{className:"s-agent-lanes-body",children:[E.pinnedLeft.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-left","aria-label":"Pinned lanes",children:[o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),o.jsx("div",{ref:Dn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned agent lanes",onScroll:On,children:E.pinnedLeft.map((a,h)=>ue(a,h))})]}):null,E.main.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--main","aria-label":"Active lanes",children:[E.pinnedLeft.length>0?o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Live"}):null,o.jsx("div",{ref:Mn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Active agent lanes",onScroll:$n,children:E.main.map((a,h)=>ue(a,E.pinnedLeft.length+h))})]}):null,E.pinnedRight.length>0?o.jsxs("section",{className:"s-agent-lanes-zone s-agent-lanes-zone--pinned-right","aria-label":"Pinned right lanes",children:[o.jsx("div",{className:"s-agent-lanes-zone-label",children:"Pinned"}),o.jsx("div",{ref:zn,className:"s-agent-lanes-scroll",role:"listbox","aria-label":"Pinned right agent lanes",onScroll:Fn,children:E.pinnedRight.map((a,h)=>ue(a,E.pinnedLeft.length+E.main.length+h))})]}):null]}),ce.visible?o.jsx(Lt,{loadState:W,sourceCount:Ge,processCount:O?.processes.length??0,eventCount:U.length,laneCount:le,horizonLabel:q,handedOff:ce.exiting,exiting:ce.exiting}):null,ee&&o.jsx(wt,{lane:ee,navigate:e,returnRoute:En,navigationEnabled:t==null,onClose:()=>We(null),onPinProject:An,projectPinned:_n}),Ye&&o.jsx(Et,{target:Ye,onClose:()=>Ee(null)})]})}function ge(e){const n=e?.trim().toLowerCase();return n||null}function Te(e){return e.trim().toLowerCase().replace(/['"]/gu,"").replace(/[^a-z0-9]+/gu,"-").replace(/^-+|-+$/gu,"")}function Ws(e){return e.trim().replace(/\/+$/u,"").split(/[\\/]/u).filter(Boolean).pop()?.trim()||null}function pe(e,n){if(!n)return!0;const t=Te(n);return e.some(s=>{const i=s?.trim();if(!i)return!1;const l=i.toLowerCase(),f=Ws(i);return l===n||Te(i)===t||!!(f&&(f.toLowerCase()===n||Te(f)===t))})}function Hs(e,n){const t=ge(n.harnessFilter),s=ge(n.projectFilter),{agent:i,facts:l,source:f}=e;return pe([i.harness,i.definitionId,l?.attribution,f],t)&&pe([i.project,i.projectRoot,i.cwd,l?.cwd,X(i,f)],s)}function Bs(e,n){return pe([e.harness,e.source],ge(n.harnessFilter))&&pe([e.project,e.cwd],ge(n.projectFilter))}function Vs(e){return[e.harnessFilter?.trim()?`harness ${e.harnessFilter.trim()}`:"",e.projectFilter?.trim()?`project ${e.projectFilter.trim()}`:""].filter(Boolean).join(" · ")}const Gs=qn({id:"lanes",label:"Agent Lanes",route:{view:"ops",mode:"lanes"},webPath:"/ops/lanes",screen:"AgentLanesView",embed:{path:"/embed/agent-lanes",aliases:["/ops/lanes/embed","/embed/lanes","/embed/traces"],profile:"macos.lanes",rootClassName:"s-agent-lanes-embed",chrome:{showSecondaryNav:!1,showPageStatusBar:!1},hosts:{macos:!0},resolveEmbedProps:e=>({profileId:hn(),laneSize:gn(),harnessFilter:e.get("harness")?.trim()||null,projectFilter:e.get("project")?.trim()||null})}}),ya=Object.freeze(Object.defineProperty({__proto__:null,AgentLanesView:Fs,scoutSurface:Gs},Symbol.toStringTag,{value:"Module"}));export{Fs as A,ya as a,ls as r,ns as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as o,j as e}from"./index-C8uS5szO.js";import{A as O}from"./AgentAvatar-BIwg54Tj.js";import{H as W}from"./HarnessMark-Bt47OeHy.js";import{u as q,b as I,f as V}from"./use-fleet-active-asks-DFs_u-vM.js";import{p as z,N as K,t as U}from"./sessions-view-DzYGsKWS.js";import{t as G}from"./time-Dhsh_2EG.js";import{a as H}from"./api-CaROe5_H.js";import{u as J}from"./use-conversation-list-A_YUf8lo.js";import{u as D}from"./router-BKiMcYa7.js";import{u as Q}from"./Provider-5Hotn7NQ.js";import{CommsFlowView as X}from"./CommsFlowGraph-Czg-KTS0.js";import{mapIdentities as Y}from"./CommsFlowMap-CzBWvSa5.js";import{p as Z,f as tt,e as et,a as st}from"./comms-gesture-_aGFo6g3.js";import{u as rt,a as at}from"./use-beside-Df-F2Uvg.js";import{ConversationScreen as ot}from"./ConversationScreen-tTP6B_F-.js";import{b as it,s as nt}from"./agent-master-model-C-KdOFDK.js";/* empty css */import{P as lt}from"./panel-right-BNTJhy8M.js";import"./SpriteAvatar-BW1JzkDt.js";import"./agent-state-DDhnFEEP.js";import"./CrewAvatar-CJhuqTsJ.js";import"./colors-CFlbwC25.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./message-visibility-DwxgcgYK.js";import"./machine-scope-DJt9RZ2w.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./CommsCanvas-DOKw3Q8i.js";import"./comms-deck-CBhsXnY-.js";import"./CommsSelection-g1twA-Lb.js";/* empty css */import"./ConversationComposer-B7RU6LKd.js";import"./zap-sKPkh4sQ.js";import"./message-markup-DgFSyb3f.js";import"./mentions-Ctw1ECUC.js";import"./AgentDetailCard-CFDE8TLi.js";import"./AgentLiveActions-lYzicnNa.js";import"./terminal-takeover-BlpxpvSp.js";import"./openContent-C6XO6kr5.js";import"./eye-CtqSV8BS.js";import"./terminal-96JWDYDL.js";import"./operator-attention-DGR4kOog.js";import"./sessionRead-CvFz2RHv.js";import"./clipboard-e3fSpeo7.js";import"./types-B0PlfpKc.js";/* empty css */import"./ConversationHeader-CCSU8uo_.js";import"./BackToPicker-Bys9ColC.js";import"./AstronautSuit-C-4I5YKi.js";import"./ConversationFeedRows-DVqnZQH0.js";import"./ConversationPanels-C9yCAoJy.js";import"./tail-display-DHSNmvor.js";import"./lane-edit-display-BjdT9oZl.js";import"./use-reduced-motion-D7n3vK8t.js";import"./proxy-DOG46ja4.js";import"./activity-CSUhvjD0.js";import"./message-circle-CSiJj6yo.js";import"./tail-events-DQ46QBW1.js";import"./ConversationStatus-CK-YfLpi.js";import"./check-B8dMv3Is.js";import"./sparkles-BbOFw3d0.js";const mt=500;function ct(s,n){const[i,m]=o.useState([]),[f,c]=o.useState(!1),[l,d]=o.useState(null);return o.useEffect(()=>{if(m([]),!n||!s){c(!1),d(null);return}let a=!0;return c(!0),d(null),H(`/api/messages?actor=${encodeURIComponent(s)}&limit=${mt}`).then(r=>{a&&m([...r].sort((x,v)=>x.createdAt-v.createdAt))}).catch(r=>{a&&(m([]),d(r instanceof Error?r.message:"Could not load this agent's messages."))}).finally(()=>{a&&c(!1)}),()=>{a=!1}},[s,n]),{messages:i,loading:f,error:l}}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:m,error:f}=ct(s,n),{passes:c,flights:l}=o.useMemo(()=>{const a=i.filter(r=>!!r.actorId).map(r=>({id:r.id,conversationId:r.conversationId,actorId:r.actorId,actorName:r.actorName,body:r.body,createdAt:r.createdAt,class:r.class,metadata:r.metadata??null,replyToMessageId:r.replyToMessageId??null}));return et(a)},[i]),d=o.useMemo(()=>st(c,l),[c,l]);return{passes:c,flights:l,tasks:d,loading:m,error:f,count:i.length}}function Ze({agentId:s,threadId:n,machineId:i,navigate:m}){const{agents:f}=Q(),c=D(),l=rt(),d=at(m,i),[a,r]=o.useState(()=>{if(typeof window>"u")return"chat";const t=new URLSearchParams(window.location.search).get("view");return t==="flow"||t==="map"||t==="canvas"?t:"chat"}),[x,v]=o.useState(null),b=`${s}\0${n??""}`,S=o.useRef(b);o.useEffect(()=>{S.current!==b&&(S.current=b,r("chat"),v(null))},[b]),o.useEffect(()=>v(null),[a]),o.useEffect(()=>{if(typeof window>"u")return;const t=new URL(window.location.href),h=a==="chat"?"":a;(t.searchParams.get("view")??"")!==h&&(h?t.searchParams.set("view",h):t.searchParams.delete("view"),window.history.replaceState(window.history.state,"",`${t.pathname}${t.search}${t.hash}`))},[a,c.searchStr]);const{sessions:C,loading:T}=J(),N=q(),{agent:g,memberAgentIds:E,sessions:k,master:p,threads:A}=o.useMemo(()=>it({agentId:s,threadId:n,machineId:i,agents:f,sessions:C}),[s,n,i,f,C]),$=o.useMemo(()=>I(N,E),[N,E]),u=dt(s,a!=="chat"),B=o.useMemo(()=>Y(k.flatMap(t=>t.participants??[])),[k]),w=n??p?.id??null,L=o.useMemo(()=>p?[p,...A]:A,[p,A]),_=t=>!!w&&nt(t,w),P=t=>{m({view:"messages",agentId:s,...p&&t.id===p.id?{}:{threadId:t.id},...i?{machineId:i}:{}})},y=g?.name??k[0]?.agentName??s.split(".")[0]??s,R=(()=>{const t=z(g);return t===K?null:t})(),M=ut($),F=[R,M?.label??g?.branch??null].filter(Boolean).join(" · ");return e.jsxs(e.Fragment,{children:[e.jsxs("header",{className:"amv-head",children:[e.jsx(O,{agent:g??{name:y,harness:p?.harness??null,state:null},placement:"row",size:32}),e.jsxs("div",{className:"amv-ident",children:[e.jsx("span",{className:"amv-name",children:y}),F?e.jsxs("span",{className:"amv-sub",children:[M?e.jsx("span",{className:"amv-dot","data-tone":M.tone,"aria-hidden":!0}):null,F]}):null]}),g?.harness??p?.harness?e.jsx(W,{harness:g?.harness??p?.harness??"",size:14}):null,e.jsx("div",{className:"s-thread-view-toggle",role:"group","aria-label":"View",children:pt.map(t=>e.jsx("button",{type:"button",className:`s-thread-view-option${a===t.id?" is-active":""}`,onClick:()=>r(t.id),"aria-pressed":a===t.id,title:t.hint,children:t.label},t.id))})]}),L.length>0?e.jsx("div",{className:"amv-strip",role:"list","aria-label":"Conversations",children:L.map(t=>{const h=_(t),j=l.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)},()=>l.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:()=>l.toggle(t.id),children:e.jsx(lt,{size:12,strokeWidth:2,"aria-hidden":!0})})]},t.id)})}):null,e.jsx("div",{className:"amv-feed",children:a!=="chat"?u.error?e.jsx("div",{className:"amv-empty",children:u.error}):u.loading&&u.count===0?e.jsx("div",{className:"amv-empty",children:"Loading this agent’s work…"}):u.count===0?e.jsx("div",{className:"amv-empty",children:"Nothing has passed through this agent yet."}):e.jsx(X,{passes:u.passes,flights:u.flights,rootId:tt(s),identities:B,view:a,selected:x,onSelect:v,onStage:t=>{r("chat"),d(t)},beside:l}):w?e.jsx(ot,{conversationId:w,navigate:m,embedded:!0,showBackNav:!1,beside:l},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{Ze as AgentMasterScreen};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import{j as s,r as p}from"./index-C8uS5szO.js";import{u as K}from"./Provider-5Hotn7NQ.js";import{o as E}from"./openContent-C6XO6kr5.js";import{a as H}from"./api-CaROe5_H.js";import{c as P}from"./clipboard-e3fSpeo7.js";import{t as D}from"./time-Dhsh_2EG.js";import"./router-BKiMcYa7.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./agent-state-DDhnFEEP.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./runtime-picker-DdsttHHc.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./voice-levels-Dcr3jglk.js";import"./loader-circle-DurUYl7E.js";import"./createLucideIcon-DkjnzvcJ.js";import"./conversation-model-BGFHoxQ0.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./HarnessMark-Bt47OeHy.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";const q=30*6e4,z=/^(?:hey|hi|hello)\b[^,]{0,24},\s*|^(?:can|could|would|will)\s+(?:you|we|i)\s+(?:please\s+)?|^please\s+|^let'?s\s+/i,L={created:"+",modified:"~",read:"·"};function J(e){const a=(e.preview??"").replace(/^\[ask:[^\]]+\]\s*/i,"").replace(/\s+/g," ").replace(z,"").trim();if(a)return a.length>150?`${a.slice(0,150).replace(/\s+\S*$/,"")}…`:a;const t=e.title?.trim();return t&&t!==e.agentName?t:"Untitled session"}function R(e){if(!e)return"—";const a=e.replace(/\.jsonl$/,"").replace(/^c\./,"").replace(/^session[_:-]?/i,"");return a.length<=10?a:`${a.slice(0,8)}…${a.slice(-3)}`}function Q(e){return e.replace(/^\/(?:Users|home)\/[^/]+\/(?:dev\/|projects\/|src\/|code\/)?/,"")}function u(e){return!e||e<=0?"0":e<1e3?`${e}`:`${(e/1e3).toFixed(e<1e4?1:0).replace(/\.0$/,"")}k`}function X(e){const a=new Map;for(const t of e){if(t.kind!=="tool")continue;const l=(t.tool??"tool").toLowerCase();a.set(l,(a.get(l)??0)+1)}return[...a.entries()].map(([t,l])=>({name:t,n:l})).sort((t,l)=>l.n-t.n).slice(0,8)}function F(){const[e,a]=p.useState(!1),t=p.useRef(null),l=p.useCallback(o=>{P(o).then(r=>{r&&(a(!0),t.current&&window.clearTimeout(t.current),t.current=window.setTimeout(()=>a(!1),1200))})},[]);return p.useEffect(()=>()=>{t.current&&window.clearTimeout(t.current)},[]),[e,l]}function B({copied:e}){return s.jsx("svg",{className:"ap-sx-copyIco",width:"11",height:"11",viewBox:"0 0 12 12",fill:"none","aria-hidden":!0,children:e?s.jsx("path",{d:"M2.6 6.3 5 8.6 9.5 3.5",stroke:"currentColor",strokeWidth:"1.4",strokeLinecap:"round",strokeLinejoin:"round"}):s.jsxs(s.Fragment,{children:[s.jsx("rect",{x:"3.6",y:"3.6",width:"6",height:"6",rx:"1.3",stroke:"currentColor",strokeWidth:"1.05"}),s.jsx("path",{d:"M7.8 3.6V2.5A1.1 1.1 0 0 0 6.7 1.4H2.5A1.1 1.1 0 0 0 1.4 2.5v4.2A1.1 1.1 0 0 0 2.5 7.8h1.1",stroke:"currentColor",strokeWidth:"1.05",strokeLinecap:"round",strokeLinejoin:"round"})]})})}function Y({value:e,display:a,title:t,className:l}){const[o,r]=F();return s.jsxs("button",{type:"button",className:l?`ap-sx-copy ${l}`:"ap-sx-copy","data-copied":o||void 0,title:o?"Copied":t??e,"aria-label":`Copy ${e}`,onClick:c=>{c.stopPropagation(),r(e)},children:[s.jsx("span",{className:"ap-sx-copyText",children:a}),s.jsx(B,{copied:o})]})}function Z({session:e,agentId:a,status:t}){const{route:l,navigate:o}=K(),[r,c]=p.useState(null),[v,d]=p.useState("loading"),h=e.harnessSessionId??e.id;p.useEffect(()=>{if(!a){d("loaded");return}let n=!1;return d("loading"),c(null),H(`/api/agents/${encodeURIComponent(a)}/observe`).then(i=>{n||(c(i),d("loaded"))}).catch(()=>{n||d("loaded")}),()=>{n=!0}},[a]);const m=r?.data??null,b=m?.metadata,x=b?.usage,g=b?.session,f=m?.files??[],k=p.useMemo(()=>X(m?.events??[]),[m?.events]),[T,O]=F(),M=g?.gitBranch?.trim()||e.currentBranch?.trim()||"—",S=g?.model?.trim()||"—",y=g?.turnCount??x?.assistantMessages??e.messageCount??null,w=g?.sessionStart??e.lastMessageAt??null,A=x?.contextInputTokens??0,C=x?.contextWindowTokens??0,j=C>0?Math.min(100,Math.round(A/C*100)):null,I=(x?.cacheReadInputTokens??0)+(x?.cacheCreationInputTokens??0),W=()=>E(o,{view:"sessions",sessionId:e.id},{returnTo:l}),U=()=>E(o,{view:"terminal",agentId:a,mode:"takeover"},{returnTo:l}),V=[["branch",M],["model",S],["started",w?D(w):"—"],["turns",y!=null?`${y}`:"—"]],_=()=>{const i=[["session",h],["agent",a||"—"],["branch",M],["model",S],["cwd",g?.cwd?.trim()||"—"],["started",w?new Date(w).toISOString():"—"],["turns",y!=null?`${y}`:"—"],["context",j!=null?`${u(A)} / ${u(C)} (${j}%)`:"—"]].map(([N,G])=>`${`${N}:`.padEnd(9)}${G}`).join(`
|
|
2
|
-
`),$=f.length?`
|
|
3
|
-
|
|
4
|
-
files touched:
|
|
5
|
-
${[...f].slice(0,24).map(N=>` ${L[N.state]} ${N.path}`).join(`
|
|
6
|
-
`)}`:"";return i+$};return v==="loading"?s.jsx("div",{className:"ap-sx-card ap-sx-loading",children:"Loading session…"}):s.jsxs("div",{className:"ap-sx-card",children:[s.jsxs("div",{className:"ap-sx-statGrid",children:[s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:"session"}),s.jsx(Y,{className:"ap-sx-copyStat",value:h,display:`#${R(h)}`,title:h})]}),V.map(([n,i])=>s.jsxs("div",{className:"ap-sx-stat",children:[s.jsx("span",{className:"ap-sx-statKey",children:n}),s.jsx("span",{className:"ap-sx-statVal",title:i,children:i})]},n))]}),m?s.jsxs("div",{className:"ap-sx-cols",children:[s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"context"}),j!=null?s.jsxs("span",{className:"ap-sx-read",children:[s.jsx("span",{className:"ap-sx-num",children:u(A)}),s.jsxs("span",{className:"ap-sx-dim",children:[" / ",u(C)]}),s.jsx("span",{className:"ap-sx-sep",children:"·"}),s.jsxs("span",{className:"ap-sx-num",children:[j,"%"]})]}):null]}),j!=null?s.jsxs(s.Fragment,{children:[s.jsx("div",{className:"ap-sx-gauge","aria-hidden":!0,children:s.jsx("span",{className:"ap-sx-gaugeFill",style:{width:`${j}%`}})}),s.jsxs("div",{className:"ap-sx-flow",children:[s.jsxs("span",{children:["↑",u(x?.inputTokens)," in"]}),s.jsxs("span",{children:["↓",u(x?.outputTokens)," out"]}),I>0?s.jsxs("span",{className:"ap-sx-faint",children:["cache ",u(I)]}):null]})]}):s.jsx("div",{className:"ap-sx-empty",children:"No usage captured."})]}),s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"tools"}),k.length>0?s.jsxs("span",{className:"ap-sx-meta",children:[k.reduce((n,i)=>n+i.n,0)," calls"]}):null]}),k.length>0?s.jsx("div",{className:"ap-sx-tools",children:k.map(n=>s.jsxs("span",{className:"ap-sx-tool",children:[s.jsx("span",{className:"ap-sx-toolName",children:n.name}),s.jsxs("span",{className:"ap-sx-toolN",children:["×",n.n]})]},n.name))}):s.jsx("div",{className:"ap-sx-empty",children:"No tools yet."})]})]}):s.jsx("div",{className:"ap-sx-empty ap-sx-noTrace",children:"No live trace for this session."}),f.length>0?s.jsxs("div",{className:"ap-sx-block",children:[s.jsxs("div",{className:"ap-sx-head",children:[s.jsx("span",{className:"ap-sx-lbl",children:"files touched"}),s.jsx("span",{className:"ap-sx-meta",children:f.length})]}),s.jsx("div",{className:"ap-sx-files",children:[...f].sort((n,i)=>(n.state==="read"?1:0)-(i.state==="read"?1:0)).slice(0,8).map(n=>{const i=n.state!=="read",$=n.path.replace(/\/+$/,"").split("/").pop()??n.path,N=Q(n.path.slice(0,n.path.length-$.length));return s.jsxs("div",{className:"ap-sx-fileRow","data-changed":i||void 0,children:[s.jsx("span",{className:"ap-sx-fileMark","data-state":n.state,"aria-hidden":!0,children:L[n.state]}),s.jsx("span",{className:"ap-sx-fileName",children:$}),s.jsx("span",{className:"ap-sx-fileDir",children:N}),s.jsxs("span",{className:"ap-sx-fileN",children:["×",n.touches]})]},n.path)})})]}):null,s.jsxs("div",{className:"ap-sx-actions",children:[s.jsx("button",{type:"button",className:"ap-sx-open",onClick:W,children:"Open ↗"}),s.jsx("button",{type:"button",className:"ap-sx-resume",onClick:U,children:t==="running"?"Send":"Take over"}),s.jsxs("button",{type:"button",className:"ap-sx-copyAll","data-copied":T||void 0,title:"Copy session id + metadata",onClick:()=>O(_()),children:[s.jsx(B,{copied:T}),T?"Copied":"Copy details"]})]})]})}function ss({session:e,fallbackAgentId:a}){const t=e.agentId??a,[l,o]=p.useState(!1),c=e.lastMessageAt!=null&&Date.now()-e.lastMessageAt<q?"running":"idle",v=J(e),d=e.currentBranch?.trim(),h=R(e.harnessSessionId??e.id),m=e.lastMessageAt?D(e.lastMessageAt):"—";return s.jsxs("div",{className:"ap-sx-session","data-open":l||void 0,"data-status":c,children:[s.jsxs("button",{type:"button",className:"ap-sx-row",onClick:()=>o(b=>!b),children:[s.jsx("span",{className:"ap-sx-tri","data-open":l||void 0,"aria-hidden":!0,children:"▸"}),s.jsx("span",{className:"ap-sx-dot","data-tone":c,"aria-hidden":!0}),s.jsxs("span",{className:"ap-sx-rowBody",children:[s.jsxs("span",{className:"ap-sx-line",children:[s.jsx("span",{className:"ap-sx-title",title:v,children:v}),s.jsxs("span",{className:"ap-sx-rowMeta",children:[s.jsx("span",{className:"ap-sx-badge","data-tone":c,children:c==="running"?"RUNNING":"IDLE"}),s.jsx("span",{className:"ap-sx-age",children:m})]})]}),l?null:s.jsxs("span",{className:"ap-sx-sub",children:[d?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subBranch",children:d}),s.jsx("span",{className:"ap-sx-subSep",children:"·"})]}):null,s.jsxs("span",{className:"ap-sx-subId",children:["#",h]}),e.messageCount>0?s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"ap-sx-subSep",children:"·"}),s.jsxs("span",{children:[e.messageCount," turn",e.messageCount===1?"":"s"]})]}):null]})]})]}),l?s.jsx(Z,{session:e,agentId:t,status:c}):null]})}function Hs({agentIds:e,sessions:a}){const t=e??[],l=(a??[]).filter(r=>r.agentId!=null&&t.includes(r.agentId)).slice().sort((r,c)=>(c.lastMessageAt??0)-(r.lastMessageAt??0)).slice(0,8);if(l.length===0)return null;const o=t[0]??"";return s.jsx("div",{className:"ap-sx-list",children:l.map(r=>s.jsx(ss,{session:r,fallbackAgentId:o},r.id))})}export{Hs as AgentSessions};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as u,j as s}from"./index-C8uS5szO.js";import{A as B}from"./AgentAvatar-BIwg54Tj.js";import{H as S,h as w}from"./HarnessMark-Bt47OeHy.js";import{c as P}from"./agent-state-DDhnFEEP.js";import{f as R}from"./runtime-picker-DdsttHHc.js";import{t as C}from"./time-Dhsh_2EG.js";import"./Provider-5Hotn7NQ.js";import"./router-BKiMcYa7.js";import"./api-CaROe5_H.js";import"./synthetic-agent-routing-aduMYO7P.js";import"./terminal-sessions-Ch9aYlgi.js";import"./machine-scope-DJt9RZ2w.js";import"./sse-v5QLsOHV.js";import"./index-BWHgHrtv.js";import"./surface-activity-B1rgWB1i.js";import"./scoutbot-Bk3nyrkj.js";import"./NewChatComposer-JjLbm3W2.js";import"./conversation-model-BGFHoxQ0.js";import"./createLucideIcon-DkjnzvcJ.js";import"./colors-CFlbwC25.js";import"./conversations-Cbg9h_Af.js";import"./index-C5cX8dkl.js";import"./NewChatOrigin-CyPPWTJP.js";import"./keyboard-nav-CXfav14z.js";import"./x-DI1ktCYb.js";import"./chevron-down-B5eMsn5c.js";import"./search-C4VlW_0l.js";import"./loader-circle-DurUYl7E.js";import"./file-text-ChtICwub.js";import"./model-CBkMvT1w.js";import"./DocumentFocusViewer-f12RRQpV.js";import"./TextDocumentSurface-BhYvAB0o.js";import"./index-CvsM3jm8.js";import"./chevron-right-C7UGFpkl.js";import"./folder-0fWevPvQ.js";import"./chevron-up-BHOEgHcn.js";import"./code-xml-BmyLM0I2.js";import"./arrow-left-PuKdO3NM.js";import"./arrow-right-ldbfp4SZ.js";import"./scout-voice-DOQ_B77g.js";import"./fx-z37u1o2z.js";import"./chunk-HRAB3GC3-C5X-kFhb.js";import"./SpriteAvatar-BW1JzkDt.js";import"./CrewAvatar-CJhuqTsJ.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 qs({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{qs as AgentsConsole};
|